diff --git a/.env b/.env deleted file mode 100644 index 762a345..0000000 --- a/.env +++ /dev/null @@ -1,19 +0,0 @@ -APP_DEBUG = false -SYSTEM_SALT= YAdmin - -[APP] -DEFAULT_TIMEZONE = Asia/Chongqing - -[DATABASE] -TYPE = mysql -HOSTNAME = 127.0.0.1 -DATABASE = www_dj_com -USERNAME = 123456 -PASSWORD = 123456 -HOSTPORT = 3306 -CHARSET = utf8mb4 -DEBUG = false -PREFIX = qf_ - -[LANG] -default_lang = zh-cn \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 717dd9f..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/.svn -/.vscode -/runtime diff --git a/.htaccess b/.htaccess deleted file mode 100644 index 0519ecb..0000000 --- a/.htaccess +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/404.html b/404.html deleted file mode 100644 index 6f17eaf..0000000 --- a/404.html +++ /dev/null @@ -1,7 +0,0 @@ - -404 Not Found - -

404 Not Found

-
nginx
- - \ No newline at end of file diff --git a/app/AppService.php b/app/AppService.php deleted file mode 100644 index 96556e8..0000000 --- a/app/AppService.php +++ /dev/null @@ -1,22 +0,0 @@ - "编号", - ]; - //excel 表头 - protected $excelTitle = "数据导出表"; - //EXCEL 单元格字母 - protected $excelCells = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'AA', 'AB', 'AC', 'AD']; - - //主键key - protected $pk = ''; - //表名称 - protected $table = ''; - //主键value - protected $pk_value = 0; - - - //模型 - protected $adminModel; - protected $accessModel; - protected $authModel; - protected $nodeModel; - protected $groupModel; - protected $confModel; - - /** - * Request实例 - * @var \think\Request - */ - protected $request; - - /** - * 应用实例 - * @var \think\App - */ - protected $app; - protected $plat = 'all'; - protected $version = 0; - - - protected $module; - protected $controller; - protected $action; - /** - * 构造方法 - * @access public - * @param App $app 应用对象 - */ - public function __construct(App $app) - { - $this->app = $app; - $this->request = $this->app->request; - - // 控制器初始化 - $this->initialize(); - } - - //TODO !!!如有特殊需求请重写下面的方法到子类,请勿修改此处!!! BEGIN.........// - /** - * 添加接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function add() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //校验Insert字段是否填写 - $error = $this->validateInsertFields(); - if ($error) { - return $error; - } - //从请求中获取Insert数据 - $data = $this->getInsertDataFromRequest(); - //添加这行数据 - $this->insertRow($data); - return jok('添加成功'); - } - /** - * 修改接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function update() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //校验Update字段是否填写 - $error = $this->validateUpdateFields(); - if ($error) { - return $error; - } - //从请求中获取Update数据 - $data = $this->getUpdateDataFromRequest(); - //根据主键更新这条数据 - $this->updateByPk($data); - return jok('修改成功'); - } - /** - * 禁用接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function disable() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - if (isInteger($this->pk_value)) { - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //单个操作 - $this->disableBySingle(); - } else { - //批量操作 - $this->disableByMultiple(); - } - return jok("禁用成功"); - } - /** - * 启用接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function enable() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - if (isInteger($this->pk_value)) { - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //单个操作 - $this->enableBySingle(); - } else { - //批量操作 - $this->enableByMultiple(); - } - return jok("启用成功"); - } - - /** - * 删除接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function delete() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (isInteger($this->pk_value)) { - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //单个操作 - $this->deleteBySingle(); - } else { - //批量操作 - $this->deleteByMultiple(); - } - return jok('删除成功'); - } - /** - * 获取列表接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function getList() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //从请求中获取筛选数据的数组 - $map = $this->getDataFilterFromRequest(); - //从请求中获取排序方式 - $order = $this->getorderfromRequest(); - //设置Model中的 per_page - $this->setGetListPerPage(); - //查询数据 - $dataList = $this->model->getListByPage($map, $order, $this->selectList); - return jok('数据获取成功', $dataList); - } - /** - * 获取详情基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function detail() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("没有查询到数据", 404); - } - return jok('数据加载成功', $item); - } - /** - * 导出Excel基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function excel() - { - $error = $this->access(); - if ($error) { - return $error; - } - $this->exportExcelData(); - } - // !!!如有特殊需求请重写下面的方法到子类,请勿修改此处!!! END.........// - - // 初始化 - protected function initialize() - { - $this->module = "api"; - $this->controller = $this->request->controller() ? $this->request->controller() : "Index"; - $this->action = strtolower($this->request->action()) ? strtolower($this->request->action()) : "index"; - View::assign('controller', strtolower($this->controller)); - View::assign('action', strtolower($this->action)); - - $this->table = strtolower($this->controller); - $this->pk = $this->table . "_id"; - $this->pk_value = input($this->pk); - - $this->adminModel = new AdminModel(); - $this->accessModel = new AccessModel(); - $this->authModel = new AuthModel(); - $this->nodeModel = new NodeModel(); - $this->groupModel = new GroupModel(); - $this->confModel = new ConfModel(); - - $configs = $this->confModel->select()->toArray(); - $c = []; - foreach ($configs as $config) { - $c[$config['conf_key']] = $config['conf_value']; - } - config($c, 'qfshop'); - } - /** - * 检测授权 - * - * @return void - */ - protected function access() - { - if (!input("plat")) { - return jerr("plat参数为必须", 400); - } - $this->plat = input('plat'); - if (!input("version")) { - return jerr("version参数为必须", 400); - } - $this->version = input('version'); - - if (!input("access_token")) { - return jerr("AccessToken为必要参数", 400); - } - $access_token = input("access_token"); - $this->admin = $this->adminModel->getAdminByAccessToken($access_token); - if (!$this->admin) { - return jerr("登录过期,请重新登录", 401); - } - if ($this->admin['admin_status'] == 1) { - return jerr("你的账户被禁用,登录失败", 401); - } - } - /** - * 从请求中获取Request数据 - * - * @return void - */ - protected function getInsertDataFromRequest() - { - $data = []; - foreach (input('post.') as $k => $v) { - if (in_array($k, $this->insertFields)) { - $data[$k] = $v; - } - } - return $data; - } - /** - * 校验Insert的字段 - * - * @return void - */ - protected function validateInsertFields() - { - foreach ($this->insertRequire as $k => $v) { - if (!input($k)) { - return jerr($v, 400); - } - } - return null; - } - /** - * 从请求中获取Update数据 - * - * @return void - */ - protected function getUpdateDataFromRequest() - { - $data = []; - foreach (input('post.') as $k => $v) { - if (in_array($k, $this->updateFields)) { - $data[$k] = $v; - } - } - return $data; - } - /** - * 校验Update的字段 - * - * @return void - */ - protected function validateUpdateFields() - { - foreach ($this->updateRequire as $k => $v) { - if (!input($k)) { - return jerr($v, 400); - } - } - return null; - } - /** - * 按主键集合批量禁用 1,2,3,4 - * - * @return void - */ - protected function disableByMultiple() - { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->update([ - $this->table . "_status" => 1, - $this->table . "_updatetime" => time(), - ]); - } - /** - * 单个禁用 可传入自定义$map - * 默认按主键ID禁用 - * - * @param array $map - * @return void - */ - protected function disableBySingle($map = null) - { - if ($map == null) { - $map = [$this->pk => $this->pk_value]; - } - $this->model->where($map)->update([ - $this->table . "_status" => 1, - $this->table . "_updatetime" => time(), - ]); - } - /** - * 按主键集合批量启用 1,2,3,4 - * - * @return void - */ - protected function enableByMultiple() - { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->update([ - $this->table . "_status" => 0, - $this->table . "_updatetime" => time(), - ]); - } - /** - * 单个启用 可传入自定义$map - * 默认按主键ID启用 - * - * @param array $map - * @return void - */ - protected function enableBySingle($map = null) - { - if ($map == null) { - $map = [$this->pk => $this->pk_value]; - } - $this->model->where($map)->update([ - $this->table . "_status" => 0, - $this->table . "_updatetime" => time(), - ]); - } - /** - * 按主键集合批量删除1,2,3,4 - * - * @return void - */ - protected function deleteByMultiple() - { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->delete(); - } - /** - * 单个删除 默认主键ID - * - * @param array $map - * @return void - */ - protected function deleteBySingle($map = null) - { - if ($map == null) { - $map = [$this->pk => $this->pk_value]; - } - $this->model->where($map)->delete(); - } - /** - * 根据主键ID获取一行数据 - * - * @param int|null 主键ID - * @return array|null - */ - protected function getRowByPk($pk_value = null) - { - if (!$pk_value) { - $pk_value = $this->pk_value; - } - $item = $this->model->where($this->pk, $pk_value)->field($this->selectDetail)->find(); - return $item ? $item->toArray() : null; - } - /** - * 根据主键ID更新数据 - * - * @param array 需要更新的KV数组 - * @param int|null 主键ID 默认$this->pk_value - * @param bool 是否更新_updatetime字段 默认TRUE - * @return void - */ - protected function updateByPk($data, $pk_value = null, $auto_updatetime = true) - { - if (!$pk_value) { - $pk_value = $this->pk_value; - } - if ($auto_updatetime) { - $data[$this->table . "_updatetime"] = time(); - } - $this->model->where($this->pk, $this->pk_value)->update($data); - } - /** - * 添加一行数据 - * - * @param array 需要添加的KV数组 - * @param bool 是否自动记录_createtime和_updatetime字段 默认true - * @return int 添加返回的主键ID - */ - protected function insertRow($data, $auto_inserttime = true) - { - if ($auto_inserttime) { - $data[$this->table . "_updatetime"] = time(); - $data[$this->table . "_createtime"] = time(); - } else { - $data[$this->table . "_updatetime"] = 0; - $data[$this->table . "_createtime"] = 0; - } - $id = $this->model->insertGetId($data); - return $id; - } - /** - * 从请求中获取查询排序(默认主键DESC) - * - * @return void - */ - protected function getOrderFromRequest() - { - if (input('order')) { - $order = urldecode(input('order')); - } else { - $order = strtolower($this->controller) . "_id desc"; - } - return $order; - } - /** - * 设置分页查询每页数量 - * - * @param int|null 每页数量 - * @return void - */ - protected function setGetListPerPage($per_page = null) - { - if ($per_page) { - $this->model->per_page = intval($per_page); - } else if (input('per_page')) { - $this->model->per_page = input('per_page'); - } else { - $this->model->per_page = 10; - } - } - /** - * 获取查询列表的Where参数 - * - * @return array - */ - protected function getDataFilterFromRequest() - { - $map = []; - $filter = input('post.'); - foreach ($filter as $k => $v) { - if ($k == 'filter') { - $k = input('filter'); - $v = input('keyword'); - } - if ($v === '' || $v === null) { - continue; - } - if (array_key_exists($k, $this->searchFilter)) { - switch ($this->searchFilter[$k]) { - case "like": - array_push($map, [$k, 'like', "%" . $v . "%"]); - break; - case "=": - array_push($map, [$k, '=', $v]); - break; - default: - } - } - } - return $map; - } - protected function getExcelFields() - { - $excelField = []; - foreach ($this->excelField as $k => $v) { - if ($k == "*") { - continue; - } else { - array_push($excelField, [ - $k, $v - ]); - } - } - return $excelField; - } - /** - * 导出Excel - * - * @return string 下载文件名 - */ - protected function exportExcelData($data) - { - $datalist = $data ? $data->toArray() : []; - $excelField = $this->getExcelFields(); - $PHPExcel = new \PHPExcel(); //实例化 - $PHPExcel - ->getProperties() //获得文件属性对象,给下文提供设置资源 - ->setCreator("qfshop") //设置文件的创建者 - ->setLastModifiedBy("qfshop") //设置最后修改者 - ->setDescription("Export by qfshop"); //设置备注 - - $PHPSheet = $PHPExcel->getActiveSheet(); - - - if (count($excelField) > count($this->excelCells)) { - echo 'Error and you need check Excel Cells Keys...'; - die; - } - $PHPSheet->getRowDimension(1)->setRowHeight(30); - for ($column = 0; $column < count($excelField); $column++) { - $PHPSheet->setCellValue($this->excelCells[$column] . "1", $excelField[$column][1]); - $PHPSheet->getStyle($this->excelCells[$column])->getNumberFormat() - ->setFormatCode(\PHPExcel_Style_NumberFormat::FORMAT_TEXT); - for ($line = 0; $line < count($datalist); $line++) { - $string = $datalist[$line][$excelField[$column][0]]; - $PHPSheet->getColumnDimension($this->excelCells[$column])->setWidth(20); - $PHPSheet->setCellValueExplicit($this->excelCells[$column] . ($line + 2), $string, \PHPExcel_Cell_DataType::TYPE_STRING); - } - } - //***********************画出单元格边框***************************** - $styleArray = array( - - ); - $PHPSheet->getStyle('A2:' . $this->excelCells[count($excelField) - 1] . (count( - $datalist - ) + 2))->applyFromArray($styleArray); - //***********************画出单元格边框结束***************************** - - //设置全部居中对齐 - $PHPSheet->getStyle('A1:' . $this->excelCells[count($excelField) - 1] . (count( - $datalist - ) + 2))->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_CENTER)->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER)->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER); - //设置全部字体 - $PHPSheet->getStyle('A1:' . $this->excelCells[count($excelField) - 1] . (count( - $datalist - ) + 2))->getFont()->setName('微软雅黑'); - $PHPWriter = \PHPExcel_IOFactory::createWriter($PHPExcel, "Excel2007"); //创建生成的格式 - header('Content-Disposition: attachment;filename="' . $this->excelTitle . "_" . date('Y-m-d_H:i:s') . '.xlsx"'); //下载下来的表格名 - header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); - $PHPWriter->save("php://output"); //表示在$path路径下面生成demo.xlsx文件 - exit; - return $this->excelTitle . "_" . date('Y-m-d_H:i:s') . '.xlsx"'; - } - public function __call($method, $args) - { - return jerr("访问异常", 404); - } -} diff --git a/app/admin/controller/Admin.php b/app/admin/controller/Admin.php deleted file mode 100644 index 22ff8cb..0000000 --- a/app/admin/controller/Admin.php +++ /dev/null @@ -1,480 +0,0 @@ -selectList = "*"; - $this->selectDetail = "*"; - //筛选字段 - $this->searchFilter = [ - "admin_id" => "=", - "admin_account" => "like", - "admin_name" => "like", - "admin_truename" => "like", - "admin_status" => "=", - ]; - $this->insertFields = [ - "admin_account", "admin_password", "admin_name", "admin_idcard", "admin_email", "admin_group", "admin_truename" - ]; - $this->updateFields = [ - "admin_account", "admin_password", "admin_name", "admin_idcard", "admin_email", "admin_group", "admin_truename" - ]; - $this->insertRequire = [ - 'admin_name' => "用户昵称必须填写", - 'admin_account' => "用户帐号必须填写", - 'admin_password' => "密码必须填写", - 'admin_group' => "用户组必须填写", - ]; - $this->updateRequire = [ - 'admin_name' => "用户昵称必须填写", - 'admin_account' => "用户帐号必须填写", - 'admin_group' => "用户组必须填写", - ]; - $this->excelField = [ - "id" => "编号", - "account" => "帐号", - "name" => "昵称", - "idcard" => "身份证", - "email" => "邮箱", - "createtime" => "创建时间", - "updatetime" => "修改时间" - ]; - $this->model = new model(); - } - public function add() - { - $error = $this->access(); - if ($error) { - return $error; - } - $error = $this->validateInsertFields(); - if ($error) { - return $error; - } - $data = $this->getInsertDataFromRequest(); - $data['admin_ipreg'] = "127.0.0.1"; - $admin = $this->model->getAdminByAccount($data["admin_account"]); - if ($admin) { - return jerr("帐号已存在,请重新输入"); - } - $salt = getRandString(4); - $password = $data["admin_password"]; - $password = encodePassword($password, $salt); - $data["admin_salt"] = $salt; - $data["admin_password"] = $password; - $this->insertRow($data); - return jok('用户添加成功'); - } - public function update() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (!isInteger($this->pk_value)) { - return jerr("修改失败,参数错误", 400); - } - $item = $this->model->where($this->pk, $this->pk_value)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - if (intval($this->pk_value) == 1) { - return jerr("无法修改超管用户信息"); - } - foreach ($this->updateRequire as $k => $v) { - if (!input($k)) { - return jerr($v); - } - } - $data = []; - foreach (input('post.') as $k => $v) { - if (in_array($k, $this->updateFields)) { - $data[$k] = $v; - } - } - $admin = $this->model->getAdminByAccount($data["admin_account"]); - if ($admin && $admin[$this->pk] != $item[$this->pk]) { - return jerr("帐号已存在,请重新输入"); - } - if (input('new_password')) { - //设置密码 - $salt = getRandString(4); - $password = input('new_password'); - $password = encodePassword($password, $salt); - $data["admin_salt"] = $salt; - $data["admin_password"] = $password; - } - if ($this->admin['admin_group'] != 1) { - //除超级管理员组外 其他任何组不允许修改用户组 - unset($data['admin_group']); - } - $data[$this->table . "_updatetime"] = time(); - $this->model->where($this->pk, $this->pk_value)->update($data); - return jok('用户信息更新成功'); - } - - /** - * 禁用用户 - * - * @return void - */ - public function disable() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - if (isInteger($this->pk_value)) { - $map = [$this->pk => $this->pk_value]; - $item = $this->model->where($map)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - if ($item["admin_group"] == 1) { - return jerr("超级管理员不允许操作!"); - } - $this->model->where($map)->update([ - $this->table . "_status" => 1, - $this->table . "_updatetime" => time(), - ]); - } else { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->where("admin_group > 1")->update([ - $this->table . "_status" => 1, - $this->table . "_updatetime" => time(), - ]); - } - return jok("禁用用户成功"); - } - - /** - * 启用用户 - * - * @return void - */ - public function enable() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - if (isInteger($this->pk_value)) { - $map = [$this->pk => $this->pk_value]; - $item = $this->model->where($map)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - if ($item["admin_group"] == 1) { - return jerr("超级管理员不允许操作!"); - } - $this->model->where($map)->update([ - $this->table . "_status" => 0, - $this->table . "_updatetime" => time(), - ]); - } else { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->where("admin_group > 1")->update([ - $this->table . "_status" => 0, - $this->table . "_updatetime" => time(), - ]); - } - return jok("启用用户成功"); - } - - /** - * 删除用户 - * - * @return void - */ - public function delete() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (isInteger($this->pk_value)) { - $map = [$this->pk => $this->pk_value]; - $item = $this->model->where($map)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - // - if ($item["admin_group"] == 1) { - return jerr("超级管理员不允许操作!"); - } - $this->model->where($map)->delete(); - } else { - $list = explode(',', $this->pk_value); - //批量删除只允许删除用户组不为1的用户 - $this->model->where($this->pk, 'in', $list)->where("admin_group > 1")->delete(); - } - return jok('删除用户成功'); - } - public function detail() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - $item = $this->model->field($this->selectDetail)->where($this->pk, $this->pk_value)->find(); - if (empty($item)) { - return jerr("没有查询到数据", 404); - } - return jok('数据加载成功', $item); - } - public function getList() - { - $error = $this->access(); - if ($error) { - return $error; - } - $map = []; - $filter = input('post.'); - foreach ($filter as $k => $v) { - if ($k == 'filter') { - $k = input('filter'); - $v = input('keyword'); - } - if ($v === '' || $v === null) { - continue; - } - if (array_key_exists($k, $this->searchFilter)) { - switch ($this->searchFilter[$k]) { - case "like": - array_push($map, [$k, 'like', "%" . $v . "%"]); - break; - case "=": - array_push($map, [$k, '=', $v]); - break; - default: - } - } - } - $order = strtolower($this->controller) . "_id desc"; - if (input('order')) { - $order = urldecode(input('order')); - } - if (input('per_page')) { - $this->model->per_page = intval(input('per_page')); - } - $dataList = $this->model->getListByPage($map, $order, $this->selectList); - return jok('用户列表获取成功', $dataList); - } - public function login() - { - if (!input("admin_account")) { - return jerr('请确认帐号是否正确填写', 400); - } - if (!input("admin_password")) { - return jerr('请确认密码是否正确填写', 400); - } - if (!input("admin_code")) { - return jerr('请确认图形验证码是否填写', 400); - } - $plat = input("plat"); - $admin_account = input("admin_account"); - $admin_password = input("admin_password"); - - //验证图形验证码 - $validateModel = new ValidateModel(); - $error = $validateModel->validateImgCode(input('token'), input('admin_code')); - if ($error) { - return jerr('验证码错误', 400); - } - //登录获取用户信息 - $admin = $this->model->login($admin_account, $admin_password); - if ($admin) { - //创建一个新的授权 - $access = $this->accessModel->createAccess($admin['admin_id'], $plat); - if ($access) { - setCookie('access_token', $access['access_token'], time() + 3600, '/'); - return jok('登录成功', ['access_token' => $access['access_token']]); - } else { - return jerr('登录系统异常'); - } - } else { - return jerr('帐号或密码错误'); - } - } - /** - * 退出登录 - * - * @return void - */ - public function logout() - { - $access_token = input("access_token"); - cookie('access_token', null); - $this->accessModel->where('access_token', $access_token)->update(["access_status" => 1]); - return jok('已退出登录'); - } - - /** - * 用户注册接口 - * - * @return void - */ - public function reg() - { - if (!input("phone")) { - return jerr("手机号不能为空!", 400); - } - $phone = input("phone"); - if (!input("code")) { - return jerr("短信验证码不能为空!", 400); - } - $code = input("code"); - if (!input("password")) { - return jerr("密码不能为空!", 400); - } - $password = input("password"); - $name = $phone; - if (input("name")) { - $name = input("name"); - } - $smsModel = new SmsModel(); - if ($smsModel->validSmsCode($phone, $code)) { - $admin = $this->model->where([ - "admin_account" => $phone - ])->find(); - if ($admin) { - return jerr("该手机号已经注册!"); - } - $result = $this->model->reg($phone, $password, $name); - if ($result) { - return jok("用户注册成功"); - } else { - return jerr("注册失败,请重试!"); - } - } else { - return jerr("短信验证码已过期,请重新获取"); - } - } - public function motifyPassword() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!input("oldPassword")) { - return jerr("你必须要输入你的原密码!", 400); - } - if (!input("newPassword")) { - return jerr("你必须输入一个新的密码!", 400); - } - $old_password = input("oldPassword"); - $new_password = input("newPassword"); - if (strlen($new_password) < 6 || strlen($new_password) > 16) { - return jerr("新密码因为6-16位!"); - } - if ($this->admin['admin_password'] != encodePassword($old_password, $this->admin['admin_salt'])) { - return jerr("原密码输入不正确,请重试!"); - } - $result = $this->model->motifyPassword($this->admin['admin_id'], $new_password); - if ($result) { - return jok("密码已重置,请使用新密码登录"); - } else { - return jerr("注册失败,请重试!"); - } - } - - /** - * 重置密码 - * - * @return void - */ - public function resetPassword() - { - if (!input("phone")) { - return jerr("手机号不能为空!", 400); - } - if (!input("code")) { - return jerr("短信验证码不能为空!", 400); - } - if (!input("password")) { - return jerr("密码不能为空!", 400); - } - $phone = input("phone"); - $code = input("code"); - $password = input("password"); - $smsModel = new SmsModel(); - if ($smsModel->validSmsCode($phone, $code)) { - $admin = $this->model->where([ - "admin_account" => $phone - ])->find(); - if (!$admin) { - return jerr("该手机号尚未注册!", 404); - } - $result = $this->model->motifyPassword($admin['admin_id'], $password); - if ($result) { - return jok("密码已重置,请使用新密码登录"); - } else { - return jerr("注册失败,请重试!"); - } - } else { - return jerr("短信验证码已过期,请重新获取"); - } - } - - /** - * 获取我的信息 - * - * @return void - */ - public function getMyInfo() - { - $error = $this->access(); - if ($error) { - return $error; - } - $myInfo = $this->admin; - foreach (['admin_password', 'admin_salt', 'admin_accesstoken', 'admin_tokentime', 'admin_status'] as $key) { - unset($myInfo[$key]); - } - return jok('数据获取成功', $myInfo); - } - public function updateMyInfo() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!input("admin_name")) { - return jerr("你确定飘到连名字都可以不要了吗?", 400); - } - $data = [ - "admin_name" => input("admin_name"), - "admin_truename" => input("admin_truename"), - "admin_email" => input("admin_email"), - "admin_idcard" => input("admin_idcard"), - ]; - $this->model->where("admin_id", $this->admin['admin_id'])->update($data); - return jok("资料更新成功"); - } -} diff --git a/app/admin/controller/Attach.php b/app/admin/controller/Attach.php deleted file mode 100644 index 4197e6f..0000000 --- a/app/admin/controller/Attach.php +++ /dev/null @@ -1,221 +0,0 @@ -searchFilter = [ - "attach_id" => "=", //相同筛选 - "attach_key" => "like", //相似筛选 - "attach_value" => "like", //相似筛选 - "attach_desc" => "like", //相似筛选 - "attach_readonly" => "=", //相似筛选 - ]; - $this->model = new AttachModel(); - } - /** - * 上传图片 - * - * @return void - */ - public function uploadImage() - { - $error = $this->access(); - if ($error) { - return $error; - } - try { - $file = request()->file('file'); - try { - validate(['file' => 'filesize:' . config("qfshop.upload_max_image") . '|fileExt:' . config("qfshop.upload_image_type")]) - ->check(['file' => $file]); - $saveName = Filesystem::putFile('image', $file); - $attach_data = array( - 'attach_path' => "/uploads/".$saveName, - 'attach_name' => $file->getOriginalName(), - 'attach_type' => $file->extension(), - 'attach_size' => $file->getSize(), - 'attach_admin' => $this->admin['admin_id'] - ); - $attach_id = $this->insertRow($attach_data); - $attach_data = $this->getRowByPk($attach_id); - if (input("?extend")) { - $attach_data['extend'] = input("extend"); - } - return jok('上传成功!', $attach_data); - } catch (ValidateException $e) { - return jerr($e->getMessage()); - } - } catch (\Exception $error) { - return jerr('上传文件失败,请检查你的文件!'); - } - } - /** - * 删除图片 - * - * @return void - */ - public function delete() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (isInteger($this->pk_value)) { - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //单个操作 - $map = [$this->pk => $this->pk_value]; - $res = $this->model->where($map)->delete(); - if($res){ - try { - unlink("./uploads/".$item['attach_path']); - } catch (\Throwable $th) { - //throw $th; - } - } - } else { - //批量操作 - $list = explode(',', $this->pk_value); - foreach ($list as $key => $value) { - $item = $this->model->where("attach_id",$value)->find(); - if($item){ - try { - unlink("./uploads/".$item['attach_path']); - } catch (\Throwable $th) { - //throw $th; - } - } - } - $this->model->where($this->pk, 'in', $list)->delete(); - } - return jok('删除成功'); - } - /** - * 上传文件 - * - * @return void - */ - public function uploadFile() - { - $error = $this->access(); - if ($error) { - return $error; - } - try { - $file = request()->file('file'); - try { - validate(['file' => 'filesize:' . config("qfshop.upload_max_file") . '|fileExt:' . config("qfshop.upload_file_type")]) - ->check(['file' => $file]); - $saveName = Filesystem::putFile('normal', $file); - $attach_data = array( - 'attach_path' => $saveName, - 'attach_type' => $file->extension(), - 'attach_size' => $file->getSize(), - 'attach_admin' => $this->admin['admin_id'] - ); - $attach_id = $this->insertRow($attach_data); - $attach_data = $this->getRowByPk($attach_id); - if (input("?extend")) { - $attach_data['extend'] = input("extend"); - } - return jok('上传成功!', $attach_data); - } catch (ValidateException $e) { - return jerr($e); - } - } catch (\Exception $error) { - return jerr('上传文件失败,请检查你的文件!'); - } - } - - /** - * 富文本上传图片 - * - * @return void - */ - public function uploads() - { - header("Content-Type: text/html; charset=utf-8"); - $error = $this->access(); - if ($error) { - return $error; - } - $CONFIG = json_decode(preg_replace("/\/\*[\s\S]+?\*\//", "", file_get_contents("./static/admin/UEditor/config.json")), true); - $action = $_GET['action']; - - switch ($action) { - case 'config': - $result = json_encode($CONFIG); - break; - - /* 上传图片 */ - case 'uploadimage': - /* 上传涂鸦 */ - case 'uploadscrawl': - /* 上传视频 */ - case 'uploadvideo': - /* 上传文件 */ - case 'uploadfile': - try { - $file = request()->file('upfile'); - try { - validate(['file' => 'filesize:' . config("qfshop.upload_max_image") . '|fileExt:' . config("qfshop.upload_image_type")]) - ->check(['file' => $file]); - $saveName = Filesystem::putFile('normal', $file); - $result = json_encode(array( - 'original'=> $file->getOriginalName(), - 'state'=> "SUCCESS", - 'title'=> $file->getOriginalName(), - 'url'=> "/uploads/".$saveName, - 'type'=> $file->extension(), - )); - } catch (ValidateException $e) { - $result = json_encode(array( - 'state'=> $e->getMessage() - )); - } - } catch (\Exception $error) { - $result = json_encode(array( - 'state'=> '上传文件失败,请检查你的文件!' - )); - } - break; - default: - $result = json_encode(array( - 'state'=> '请求地址出错' - )); - break; - } - - /* 输出结果 */ - if (isset($_GET["callback"])) { - if (preg_match("/^[\w_]+$/", $_GET["callback"])) { - echo htmlspecialchars($_GET["callback"]) . '(' . $result . ')'; - } else { - echo json_encode(array( - 'state'=> 'callback参数不合法' - )); - } - } else { - echo $result; - } - die; - } -} diff --git a/app/admin/controller/Auth.php b/app/admin/controller/Auth.php deleted file mode 100644 index 819aa32..0000000 --- a/app/admin/controller/Auth.php +++ /dev/null @@ -1,35 +0,0 @@ -searchFilter = [ - "auth_id" => "=", //相同筛选 - ]; - $this->model = new AuthModel(); - } - - /** - * 清除访问日志 - * - * @return void - */ - public function clean() - { - $error = $this->access(); - if ($error) { - return $error; - } - $this->model->cleanAuth(); - return jok('授权信息清理成功'); - } -} diff --git a/app/admin/controller/Conf.php b/app/admin/controller/Conf.php deleted file mode 100644 index 01c71a0..0000000 --- a/app/admin/controller/Conf.php +++ /dev/null @@ -1,205 +0,0 @@ -searchFilter = [ - "conf_id" => "=", //相同筛选 - "conf_key" => "like", //相似筛选 - "conf_value" => "like", //相似筛选 - "conf_title" => "like", //相似筛选 - "conf_status" => "=", //相同筛选 - "conf_type" => "=", //相同筛选 - ]; - $this->insertFields = [ - "conf_key", "conf_value", "conf_title", "conf_desc", "conf_status", "conf_type", "conf_spec", "conf_content", "conf_sort", "conf_system" - ]; - $this->updateFields = [ - "conf_key", "conf_value", "conf_title", "conf_desc", "conf_status", "conf_type", "conf_spec", "conf_content", "conf_sort", "conf_system" - ]; - $this->insertRequire = [ - 'conf_title' => "参数名称必须填写", - 'conf_key' => "参数字段必须填写", - ]; - $this->updateRequire = [ - 'conf_title' => "参数名称必须填写", - 'conf_key' => "参数字段必须填写", - ]; - $this->model = new ConfModel(); - } - /** - * 获取列表接口基类 - * - * @return void - */ - public function getList() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //从请求中获取筛选数据的数组 - $map = $this->getDataFilterFromRequest(); - //从请求中获取排序方式 - $order = "conf_sort desc, conf_id asc"; - //设置Model中的 per_page - $this->setGetListPerPage(); - //查询数据 - $dataList = $this->model->getListByPage($map, $order, $this->selectList); - return jok('数据获取成功', $dataList); - } - /** - * 读取基本配置 - * - * @return void - */ - public function getBaseConfig() - { - $error = $this->access(); - if ($error) { - return $error; - } - $datalist = $this->model->where('conf_status', 1)->order("conf_sort desc ".$this->pk . " asc")->select(); - foreach ($datalist as $key => $value) { - if($value['conf_content']){ - $value['conf_content'] = explode("\n",$value['conf_content']); - } - } - return jok('', $datalist); - } - /** - * 更新基础配置 - * - * @return void - */ - public function updateBaseConfig() - { - $error = $this->access(); - if ($error) { - return $error; - } - foreach (input("post.") as $k => $v) { - $map["conf_key"] = $k; - $item = $this->model->where($map)->find(); - if (empty($item)) { - continue; - } - if(is_array($v)){ - $v = implode(",",$v); - } - $this->model->where("conf_key", $k)->update(["conf_value" => $v]); - } - return jok("配置修改成功"); - } - - /** - * 添加接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function add() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //校验Insert字段是否填写 - $error = $this->validateInsertFields(); - if ($error) { - return $error; - } - //从请求中获取Insert数据 - $data = $this->getInsertDataFromRequest(); - - $res = $this->model->where('conf_key',$data['conf_key'])->find(); - if ($res) { - return jerr("参数字段已存在"); - } - - //添加这行数据 - $data['conf_value'] = ''; - $this->insertRow($data); - return jok('添加成功'); - } - - /** - * 修改接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function update() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //校验Update字段是否填写 - $error = $this->validateUpdateFields(); - if ($error) { - return $error; - } - //从请求中获取Update数据 - $data = $this->getUpdateDataFromRequest(); - - $res = $this->model->where('conf_key',$data['conf_key'])->find(); - if ($res['conf_id']!= input("conf_id") && $res) { - return jerr("参数字段已存在"); - } - //根据主键更新这条数据 - $this->updateByPk($data); - return jok('修改成功'); - } - - /** - * 删除接口基类 - * - * @return void - */ - public function delete() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (isInteger($this->pk_value)) { - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - if($item['conf_system']==1){ - return jerr("系统参数,禁止删除", 404); - } - //单个操作 - $this->deleteBySingle(); - } else { - //批量操作 - return jerr("暂不支持批量删除", 400); - } - return jok('删除成功'); - } -} diff --git a/app/admin/controller/Error.php b/app/admin/controller/Error.php deleted file mode 100644 index d139675..0000000 --- a/app/admin/controller/Error.php +++ /dev/null @@ -1,13 +0,0 @@ -selectList = "*"; - //查询详情时允许的字段 - $this->selectDetail = "*"; - $this->model = new FeedbackModel(); - } - - - /** - * 获取列表接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function getList() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //从请求中获取筛选数据的数组 - $map = $this->getDataFilterFromRequest(); - //从请求中获取排序方式 - $order = $this->getorderfromRequest(); - //设置Model中的 per_page - $this->setGetListPerPage(); - //查询数据 - $dataList = $this->model->getListByPage($map, $order, $this->selectList); - return jok('数据获取成功', $dataList); - } - -} diff --git a/app/admin/controller/Group.php b/app/admin/controller/Group.php deleted file mode 100644 index 0a3b3e9..0000000 --- a/app/admin/controller/Group.php +++ /dev/null @@ -1,264 +0,0 @@ -searchFilter = [ - "group_id" => "=", //相同筛选 - "group_name" => "like", //相似筛选 - ]; - $this->insertFields = [ - "group_name", "group_desc" - ]; - $this->updateFields = [ - "group_name", "group_desc" - ]; - $this->insertRequire = [ - 'group_name' => "组名称必须填写" - ]; - $this->updateRequire = [ - 'group_name' => "组名称必须填写" - ]; - $this->model = new GroupModel(); - } - /** - * 修改用户组 - * - * @return void - */ - public function update() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (!isInteger($this->pk_value)) { - return jerr("修改失败,参数错误", 400); - } - $item = $this->model->where($this->pk, $this->pk_value)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - if ($item[$this->pk] == 1) { - return jerr("无法操作超级管理员组信息"); - } - foreach ($this->updateRequire as $k => $v) { - if (!input($k)) { - return jerr($v); - } - } - $data = []; - foreach (input('post.') as $k => $v) { - if (in_array($k, $this->updateFields)) { - $data[$k] = $v; - } - } - if (!input($this->table . "_name")) { - return jerr("组名称必须填写", 400); - } - $data[$this->table . "_updatetime"] = time(); - $this->model->where($this->pk, $this->pk_value)->update($data); - return jok('用户组信息更新成功'); - } - - /** - * 禁用用户组 - * - * @return void - */ - public function disable() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - if (isInteger($this->pk_value)) { - $map = [$this->pk => $this->pk_value]; - $item = $this->model->where($map)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - if ($item[$this->pk] == 1) { - return jerr("无法操作超级管理员组信息"); - } - $this->model->where($map)->update([ - $this->table . "_status" => 1, - $this->table . "_updatetime" => time(), - ]); - } else { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->where("group_id > 1")->update([ - $this->table . "_status" => 1, - $this->table . "_updatetime" => time(), - ]); - } - return jok("禁用用户组成功"); - } - - /** - * 启用用户组 - * - * @return void - */ - public function enable() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - if (isInteger($this->pk_value)) { - $map = [$this->pk => $this->pk_value]; - $item = $this->model->where($map)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - if ($item[$this->pk] == 1) { - return jerr("无法操作超级管理员组信息"); - } - $this->model->where($map)->update([ - $this->table . "_status" => 0, - $this->table . "_updatetime" => time(), - ]); - } else { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->where("group_id > 1")->update([ - $this->table . "_updatetime" => time(), - ]); - } - return jok("启用用户组成功"); - } - - /** - * 删除用户组 - * - * @return void - */ - public function delete() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (isInteger($this->pk_value)) { - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - if ($item[$this->pk] == 1) { - return jerr("无法删除超级管理员组"); - } - $this->deleteBySingle(); - //删除对应ID的授权记录 - $this->authModel->where([ - "auth_group" => $this->pk_value - ])->delete(); - } else { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->where("group_id > 1")->delete(); - //删除对应ID的授权记录 - $this->authModel->where("auth_group", "in", $list)->delete(); - } - return jok('删除用户组成功'); - } - - /** - * 为用户组授权节点 - * - * @return void - */ - public function authorize() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (!isInteger($this->pk_value)) { - return jerr("修改失败,参数错误", 400); - } - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("用户组信息查询失败,授权失败", 404); - } - $this->authModel->where([ - "auth_group" => $this->pk_value - ])->delete(); - if ($item[$this->pk] == 1) { - return jerr("超级管理组无需授权!"); - } - $node_ids = explode(",", input("node_ids")); - foreach ($node_ids as $node_id) { - if (intval($node_id) == 0) { - continue; - } - $this->authModel->insert([ - "auth_group" => $this->pk_value, - "auth_node" => $node_id, - "auth_createtime" => time(), - "auth_updatetime" => time() - ]); - } - return jok('用户组授权成功'); - } - /** - * 获取用户组拥有的权限 - * - * @return void - */ - public function getAuthorize() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (!isInteger($this->pk_value)) { - return jerr("修改失败,参数错误", 400); - } - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("用户组信息查询失败,授权失败", 404); - } - $myAuthorizeList = $this->authModel->where("auth_group", $this->pk_value)->select(); - return jok('ok', $myAuthorizeList); - } - /** - * 获取所有用户组 - * - * @return void - */ - public function getList() - { - $error = $this->access(); - if ($error) { - return $error; - } - $dataList = $this->model->select(); - return jok('用户组列表获取成功', $dataList); - } -} diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php deleted file mode 100644 index e4db535..0000000 --- a/app/admin/controller/Index.php +++ /dev/null @@ -1,14 +0,0 @@ -searchFilter = [ - "node_id" => "=", //相同筛选 - "node_show" => "=", //相同筛选 - "node_title" => "like", //相似筛选 - "node_desc" => "like", //相似筛选 - "node_module" => "like", //相似筛选 - "node_controller" => "like", //相似筛选 - "node_action" => "like", //相似筛选 - ]; - $this->insertFields = [ - "node_title", "node_desc", "node_module", "node_action", "node_controller", "node_icon", "node_show", "node_pid", "node_order", "node_login", "node_access" - ]; - $this->updateFields = [ - "node_title", "node_desc", "node_module", "node_action", "node_controller", "node_icon", "node_show", "node_pid", "node_order", "node_login", "node_access" - ]; - $this->insertRequire = [ - 'node_title' => "节点名称必须填写", - 'node_module' => "节点模块必须填写", - ]; - $this->updateRequire = [ - 'node_title' => "节点名称必须填写", - 'node_module' => "节点模块必须填写", - ]; - $this->model = new NodeModel(); - } - - /** - * 添加节点 - * - * @return void - */ - public function add() - { - $error = $this->access(); - if ($error) { - return $error; - } - $error = $this->validateInsertFields(); - if ($error) { - return $error; - } - $data = $this->getInsertDataFromRequest(); - $data['node_module'] = strtolower($data['node_module']); - $data['node_controller'] = input("node_controller") ? strtolower($data['node_controller']) : ""; - $data['node_action'] = input("node_action") ? strtolower($data['node_action']) : ""; - $this->insertRow($data); - return jok('用户添加成功'); - } - /** - * 更新节点 - * - * @return void - */ - public function update() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - if (!isInteger($this->pk_value)) { - return jerr("修改失败,参数错误", 400); - } - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - $error = $this->validateUpdateFields(); - if ($error) { - return $error; - } - $data = $this->getUpdateDataFromRequest(); - if($item['node_id'] == $data['node_pid']){ - return jerr("不能选择自己为上级菜单", 404); - } - $data['node_module'] = strtolower($data['node_module']); - $data['node_controller'] = input("node_controller") ? strtolower($data['node_controller']) : ""; - $data['node_action'] = input("node_action") ? strtolower($data['node_action']) : ""; - $this->updateByPk($data); - return jok('节点信息更新成功'); - } - - - /** - * 删除节点 - * - * @return void - */ - public function delete() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写"); - } - if (isInteger($this->pk_value)) { - $map = [$this->pk => $this->pk_value]; - $item = $this->model->where($map)->find(); - if (empty($item)) { - return jerr("数据查询失败"); - } - $this->deleteBySingle(); - //删除对应ID的授权记录 - $this->authModel->where("auth_node", $this->pk_value)->delete(); - } else { - $this->deleteByMultiple(); - //删除对应ID的授权记录 - $list = explode(',', $this->pk_value); - $this->authModel->where("auth_node", 'in', $list)->delete(); - } - return jok('删除节点成功'); - } - - /** - * 获取所有节点 - * - * @return void - */ - public function getList() - { - $error = $this->access(); - if ($error) { - return $error; - } - $order = $this->table . "_order desc," . $this->pk . " asc"; - $map = [ - "node_pid" => 0 - ]; - $datalist = $this->model->where($map)->order($order)->select(); - $subMap = $this->getDataFilterFromRequest(); - for ($i = 0; $i < count($datalist); $i++) { - $subDatalist = $this->model->field($this->selectList)->where($subMap)->where($this->table . "_pid", $datalist[$i][$this->pk])->order($order)->select(); - $datalist[$i]['sub'] = $subDatalist; - for ($j = 0; $j < count($datalist[$i]['sub']); $j++) { - $subDatalist2 = $this->model->field($this->selectList)->where($subMap)->where($this->table . "_pid", $datalist[$i]['sub'][$j][$this->pk])->order($order)->select(); - $datalist[$i]['sub'][$j]['sub'] = $subDatalist2; - } - } - return jok('success', [ - 'data' => $datalist, - 'map' => $map - ]); - } - /** - * 显示到菜单中 - * - * @return void - */ - public function show_menu() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (isInteger($this->pk_value)) { - $this->model->where($this->pk, $this->pk_value)->update([ - $this->table . "_show" => 1, - $this->table . "_updatetime" => time(), - ]); - } else { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->update([ - $this->table . "_show" => 1, - $this->table . "_updatetime" => time(), - ]); - } - return jok("显示成功"); - } - - /** - * 从菜单中隐藏 - * - * @return void - */ - public function hide_menu() - { - $error = $this->access(); - if ($error) { - return $error; - } - if (isInteger($this->pk_value)) { - $this->model->where($this->pk, $this->pk_value)->update([ - $this->table . "_show" => 0, - $this->table . "_updatetime" => time(), - ]); - } else { - $list = explode(',', $this->pk_value); - $this->model->where($this->pk, 'in', $list)->update([ - $this->table . "_show" => 0, - $this->table . "_updatetime" => time(), - ]); - } - return jok("隐藏成功"); - } -} diff --git a/app/admin/controller/Sms.php b/app/admin/controller/Sms.php deleted file mode 100644 index d823d96..0000000 --- a/app/admin/controller/Sms.php +++ /dev/null @@ -1,49 +0,0 @@ -model = new SmsModel(); - } - - /** - * 发送短信验证码 - * - * @return void - */ - public function send() - { - //验证图形验证码 - $validateModel = new ValidateModel(); - $error = $validateModel->validateImgCode(input('token'), input('code')); - if ($error) { - return $error; - } - if (input("phone")) { - $phone = input('phone'); - $code = cache("SMS_" . $phone); - if ($code) { - return jerr('发送短信太频繁,请稍候再试'); - } - - $code = rand(100000, 999999); - $error = $this->model->sendSms($phone, $code); - if ($error) { - return $error; - } - cache('SMS_' . $phone, $code, 300); - return jok('短信验证码已经发送至你的手机'); - } else { - return jerr("手机号为必填信息,请填写后提交"); - } - } -} diff --git a/app/admin/controller/Source.php b/app/admin/controller/Source.php deleted file mode 100644 index c10842d..0000000 --- a/app/admin/controller/Source.php +++ /dev/null @@ -1,486 +0,0 @@ -url = "https://pan.xinyuedh.com"; - //查询列表时允许的字段 - $this->selectList = "*"; - //查询详情时允许的字段 - $this->selectDetail = "*"; - //筛选字段 - $this->searchFilter = [ - "source_id" => "=", - "title"=>"like", - ]; - $this->insertFields = [ - //允许添加的字段列表 - "source_category_id","title","url","status","is_delete","sort","is_top" - ]; - $this->updateFields = [ - //允许更新的字段列表 - "source_category_id","title","url","status","is_delete","sort","is_top" - ]; - $this->insertRequire = [ - //添加时必须填写的字段 - // "字段名称"=>"该字段不能为空" - "title"=>"资源名称必须填写", - "url"=>"资源地址必须填写", - ]; - $this->updateRequire = [ - //修改时必须填写的字段 - // "字段名称"=>"该字段不能为空" - "source_id"=>"资源ID必须填写", - "title"=>"资源名称必须填写", - "url"=>"资源地址必须填写", - ]; - $this->model = new SourceModel(); - $this->SourceLogModel = new SourceLogModel(); - } - - - /** - * 获取列表接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function getList() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //从请求中获取筛选数据的数组 - $map = $this->getDataFilterFromRequest(); - $map[] = ['is_delete','=',0]; - if(!empty(input('source_category_id'))){ - $map[] = ['source_category_id','=',input('source_category_id')]; - } - //从请求中获取排序方式 - $order = ['is_top' => 'desc','sort' => 'desc','source_id' => 'desc']; - //设置Model中的 per_page - $this->setGetListPerPage(); - //查询数据 - $dataList = $this->model->getListByPage($map, $order, $this->selectList); - return jok('数据获取成功', $dataList); - } - - - /** - * 添加接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function add() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //校验Insert字段是否填写 - $error = $this->validateInsertFields(); - if ($error) { - return $error; - } - //从请求中获取Insert数据 - $data = $this->getInsertDataFromRequest(); - //添加这行数据 - $data["update_time"] = time(); - $data["create_time"] = time(); - $this->model->insertGetId($data); - return jok('添加成功'); - } - - /** - * 修改接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function update() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "参数必须填写", 400); - } - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //校验Update字段是否填写 - $error = $this->validateUpdateFields(); - if ($error) { - return $error; - } - //从请求中获取Update数据 - $data = $this->getUpdateDataFromRequest(); - //根据主键更新这条数据 - $data["update_time"] = time(); - $this->model->where($this->pk, $this->pk_value)->update($data); - return jok('修改成功'); - } - - - - /** - * 删除接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function delete() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - if (!$this->pk_value) { - return jerr($this->pk . "必须填写", 400); - } - - //根据主键获取一行数据 - $item = $this->getRowByPk(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - $this->model->where($this->pk, $this->pk_value)->delete(); - - return jok('删除成功'); - } - - // 判断文件编码 - function detectFileEncoding($filename) { - $handle = fopen($filename, 'r'); - $firstLine = fread($handle, 1024); // 读取文件的开头一部分内容 - fclose($handle); - // 尝试使用不同的编码进行解码,并检查是否成功 - if (mb_check_encoding($firstLine, 'UTF-8')) { - return 'UTF-8'; - } elseif (mb_check_encoding($firstLine, 'GBK')) { - return 'GBK'; - } else { - // 如果无法确定编码,则返回默认编码 - return 'UTF-8'; // 或者根据需要返回其他默认编码 - } - } - - - /** - * Excel导入 - * - * @return void - */ - public function imports() - { - $error = $this->access(); - if ($error) { - return $error; - } - // try { - $file = request()->file('file'); - try { - validate(['file' => 'filesize:' . config("qfshop.upload_max_file") . '|fileExt:' . config("qfshop.upload_file_type")]) - ->check(['file' => $file]); - $saveName = Filesystem::putFile('excel', $file, 'excel.csv'); - - ini_set("memory_limit",-1); - - $file_name = app()->getRootPath()."public/uploads/".$saveName; - - $extension = pathinfo($file_name, PATHINFO_EXTENSION); - if ($extension == 'csv') { - $PHPReader = new \PHPExcel_Reader_CSV(); - $encoding = $this->detectFileEncoding($file_name); - $PHPReader->setInputEncoding($encoding); - $PHPReader->setDelimiter(','); - } elseif ($extension == 'xlsx') { - $PHPReader = new \PHPExcel_Reader_Excel2007(); - } elseif ($extension == 'xls') { - $PHPReader = new \PHPExcel_Reader_Excel5(); - } else { - return jerr('不支持的文件类型'); - } - - //载入文件 - $objExcel = $PHPReader->load($file_name); - $excel_array = $objExcel ->getSheet(0)->toArray(); - array_shift($excel_array); //删除第一个数组(标题); - $data = []; - $i = 0; - $j = 0; - - //删除这个文件 - unlink("./uploads/".$saveName); - - // 生成二维码 - foreach ($excel_array as $k => $v) { - $patterns = '/^\d+\.|\d+\-/'; - $title = ''; - if (!empty($v[2]) && preg_match('/http[^ ]+/', $v[2], $matches)) { - $title = preg_replace($patterns, '', $v[1]); - $url = $matches[0]; - } else { - if (!empty($v[3]) && preg_match('/http[^ ]+/', $v[3], $matches)) { - $title = preg_replace($patterns, '', $v[2]); - $url = $matches[0]; - } else { - $url = ''; - } - } - $map = []; - $map[] = ['title', '=',$title]; - $res = $this->model->where($map)->find(); - if (empty($res) && $url) { - $data[$k]['title'] = $title; - $data[$k]['url'] = $url; - $data[$k]['source_category_id'] = input('source_category_id')??0; - $data[$k]['update_time'] = time(); - $data[$k]['create_time'] = time(); - $i++; - }else if($url){ - $this->model->where($map)->update(['url' => $url, 'update_time' => time()]); - $j++; - } - } - - $this->model->insertAll($data); - if($i == 0 && $j == 0){ - return jok('无可导入的资源,请检查表格格式'); - } - return jok('导入成功'.$i.'个资源,更新成功'.$j.'个资源'); - - } catch (ValidateException $e) { - return jerr($e->getMessage()); - } - // } catch (\Exception $error) { - // return jerr('上传文件失败,请检查你的文件!'); - // } - } - - /** - * 一键转存并分享夸克资源 - * - * @return void - */ - public function transfer() - { - $error = $this->access(); - if ($error) { - return $error; - } - - $url = input("url"); - $substring = strstr($url, 's/'); - if ($substring !== false) { - $pwd_id = substr($substring, 2); // 去除 's/' 部分 - } else { - return jerr("资源地址格式有误"); - } - - - $logId = $this->SourceLogModel->addLog('一键转存他人链接',1); - - $urlData = array( - 'cookie' => Config('qfshop.quark_cookie'), - 'url' => $url, - ); - $res = curlHelper($this->url."/api/open/transfer", "POST", $urlData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - $this->SourceLogModel->editLog($logId,1,'fail_num',$res['message'],1); - return jerr($res['message']); - } - $patterns = '/^\d+\./'; - $title = preg_replace($patterns, '', $res['data']['title']); - //添加资源到系统中 - $data["title"] = $title; - $data["url"] = $res['data']['share_url']; - $data["update_time"] = time(); - $data["create_time"] = time(); - $this->model->insertGetId($data); - $this->SourceLogModel->editLog($logId,1,'new_num','',1); - - return jok('已提交任务,稍后查看结果',$data); - } - - /** - * 全部转存 - * 转存心悦搜剧资源 - * @return void - */ - public function transferAll() - { - $error = $this->access(); - if ($error) { - return $error; - } - @set_time_limit(999999); - //分页转存 - $page_no = 1; - $dataList = ''; - $logId = ''; - while ($dataList=='' || !empty($dataList['items'])) { - $searchData = array( - 'page_no' => $page_no, - 'page_size' => 100, - 'type' => 2, - ); - $res = curlHelper($this->url."/api/search", "POST", $searchData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - return jerr($res['message']); - } - $dataList = $res['data']; - $page_no++; - - if($logId == ''){ - $logId = $this->SourceLogModel->addLog('全部转存',$dataList['total_result']); - } - - foreach ($dataList['items'] as $key => $value) { - //如已有此资源 跳过 - $detail = $this->model->where('title', $value['title'])->find(); - if(!empty($detail)){ - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'skip_num','重复跳过转存'); - continue; - } - - $url = $value['url']; - $substring = strstr($url, 's/'); - - if ($substring !== false) { - $pwd_id = substr($substring, 2); // 去除 's/' 部分 - } else { - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'fail_num','资源地址格式有误'); - continue; - } - - $urlData = array( - 'cookie' => Config('qfshop.quark_cookie'), - 'url' => $url, - ); - $res = curlHelper($this->url."/api/open/transfer", "POST", $urlData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - if($res['message'] == 'capacity limit[{0}]'){ - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'fail_num',$res['message']); - break; - }else{ - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'fail_num',$res['message']); - continue; - } - } - - //添加资源到系统中 - $data["title"] = $value['title']; - $data["url"] = $res['data']['share_url']; - $data["update_time"] = time(); - $data["create_time"] = time(); - $this->model->insertGetId($data); - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'new_num',''); - } - // 可以添加一个最大重试次数的限制,防止无限循环 - if ($page_no > 1000) { - break; - } - } - - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'','',3); - return jok('已提交任务,稍后查看结果',$dataList); - } - - /** - * 获取夸克网盘文件夹 - * - * @return void - */ - public function getFiles() - { - $error = $this->access(); - if ($error) { - return $error; - } - - $urlData = array( - 'cookie' => Config('qfshop.quark_cookie'), - ); - $res = curlHelper($this->url."/api/open/getFiles", "POST", $urlData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - return jerr($res['message']); - } - return jok('获取成功',$res['data']); - } - - - /** - * 导出 - * - * @return void - */ - public function excel() - { - $error = $this->access(); - if ($error) { - return $error; - } - - //查询数据 - $map = []; - $filter = input(''); - foreach ($filter as $k => $v) { - if ($k == 'filter') { - $k = input('filter'); - $v = input('keyword'); - } - if ($v === '' || $v === null) { - continue; - } - if (array_key_exists($k, $this->searchFilter)) { - switch ($this->searchFilter[$k]) { - case "like": - array_push($map, [$k, 'like', "%" . $v . "%"]); - break; - case "=": - array_push($map, [$k, '=', $v]); - break; - default: - } - } - } - - $field = 'title,url'; - $dataList = $this->model->field($field)->where($map)->select(); - $excelField = [ - "title" => "资源名称", - "url" => "资源地址", - ]; - $data = $dataList->toArray(); - - $this->excelField = $excelField; - $this->exportExcelData($dataList); - print_r(12); - } - -} diff --git a/app/admin/controller/SourceCategory.php b/app/admin/controller/SourceCategory.php deleted file mode 100644 index 1d546c6..0000000 --- a/app/admin/controller/SourceCategory.php +++ /dev/null @@ -1,258 +0,0 @@ -selectList = "*"; - //查询详情时允许的字段 - $this->selectDetail = "*"; - //筛选字段 - $this->searchFilter = [ - "source_category_id" => "=", - "name"=>"like" - ]; - $this->insertFields = [ - //允许添加的字段列表 - "name","sort","status" - ]; - $this->updateFields = [ - //允许更新的字段列表 - "name","sort","status" - ]; - $this->insertRequire = [ - //添加时必须填写的字段 - // "字段名称"=>"该字段不能为空" - "name"=>"分类名称必须填写", - ]; - $this->updateRequire = [ - //修改时必须填写的字段 - // "字段名称"=>"该字段不能为空" - "name"=>"分类名称必须填写", - ]; - $this->model = new SourceCategoryModel(); - } - - - /** - * 获取列表接口 - * - * @return void - */ - public function getList() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //查询数据 - $dataList = $this->model->order('sort', 'desc')->select(); - return jok('数据获取成功', $dataList); - } - - /** - * 获取详情基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function detail() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - $source_category_id = input("source_category_id"); - if (!$source_category_id) { - return jerr("ID参数必须填写", 400); - } - //根据主键获取一行数据 - $item = $this->model->where("source_category_id", $source_category_id)->field($this->selectDetail)->find(); - if (empty($item)) { - return jerr("没有查询到数据", 404); - } - return jok('数据加载成功', $item); - } - - /** - * 添加接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function add() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //校验Insert字段是否填写 - $error = $this->validateInsertFields(); - if ($error) { - return $error; - } - //从请求中获取Insert数据 - $data = $this->getInsertDataFromRequest(); - //添加这行数据 - $data['create_time'] = time(); - $data['update_time'] = time(); - $this->model->insertGetId($data); - return jok('添加成功'); - } - - /** - * 修改接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function update() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - $source_category_id = input("source_category_id"); - if (!$source_category_id) { - return jerr("ID参数必须填写", 400); - } - //根据主键获取一行数据 - $item = $this->model->where("source_category_id", $source_category_id)->field($this->selectDetail)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //校验Update字段是否填写 - $error = $this->validateUpdateFields(); - if ($error) { - return $error; - } - //从请求中获取Update数据 - $data = $this->getUpdateDataFromRequest(); - //根据主键更新这条数据 - $data['update_time'] = time(); - $this->model->where("source_category_id", $source_category_id)->update($data); - return jok('修改成功'); - } - - /** - * 删除接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function delete() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - $source_category_id = input("source_category_id"); - if (!$source_category_id) { - return jerr("ID参数必须填写", 400); - } - if (isInteger($source_category_id)) { - //根据主键获取一行数据 - $item = $this->model->where("source_category_id", $source_category_id)->field($this->selectDetail)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //单个操作 - $map = ["source_category_id" => $source_category_id]; - $this->model->where($map)->delete(); - } else { - //批量操作 - $list = explode(',', $source_category_id); - $this->model->where("source_category_id", 'in', $list)->delete(); - } - return jok('删除成功'); - } - - /** - * 禁用接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function disable() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - $source_category_id = input("source_category_id"); - if (!$source_category_id) { - return jerr("ID参数必须填写", 400); - } - if (isInteger($source_category_id)) { - //根据主键获取一行数据 - $item = $this->model->where("source_category_id", $source_category_id)->field($this->selectDetail)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //单个操作 - $map = ["source_category_id" => $source_category_id]; - $this->model->where($map)->update([ - "status" => 1, - "update_time" => time(), - ]); - } else { - //批量操作 - $list = explode(',', $source_category_id); - $this->model->where("source_category_id", 'in', $list)->update([ - "status" => 1, - "update_time" => time(), - ]); - } - return jok("禁用成功"); - } - - - /** - * 启用接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function enable() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - $source_category_id = input("source_category_id"); - if (!$source_category_id) { - return jerr("ID参数必须填写", 400); - } - if (isInteger($source_category_id)) { - //根据主键获取一行数据 - $item = $this->model->where("source_category_id", $source_category_id)->field($this->selectDetail)->find(); - if (empty($item)) { - return jerr("数据查询失败", 404); - } - //单个操作 - $map = ["source_category_id" => $source_category_id]; - $this->model->where($map)->update([ - "status" => 0, - "update_time" => time(), - ]); - } else { - //批量操作 - $list = explode(',', $source_category_id); - $this->model->where("source_category_id", 'in', $list)->update([ - "status" => 0, - "update_time" => time(), - ]); - } - return jok("启用成功"); - } - -} diff --git a/app/admin/controller/SourceLog.php b/app/admin/controller/SourceLog.php deleted file mode 100644 index 0a39c02..0000000 --- a/app/admin/controller/SourceLog.php +++ /dev/null @@ -1,46 +0,0 @@ -selectList = "*"; - //查询详情时允许的字段 - $this->selectDetail = "*"; - $this->model = new SourceLogModel(); - } - - - /** - * 获取列表接口基类 子类自动继承 如有特殊需求 可重写到子类 请勿修改父类方法 - * - * @return void - */ - public function getList() - { - //校验Access与RBAC - $error = $this->access(); - if ($error) { - return $error; - } - //从请求中获取筛选数据的数组 - $map = $this->getDataFilterFromRequest(); - //从请求中获取排序方式 - $order = $this->getorderfromRequest(); - //设置Model中的 per_page - $this->setGetListPerPage(); - //查询数据 - $dataList = $this->model->getListByPage($map, $order, $this->selectList); - return jok('数据获取成功', $dataList); - } - -} diff --git a/app/admin/controller/System.php b/app/admin/controller/System.php deleted file mode 100644 index 92569c7..0000000 --- a/app/admin/controller/System.php +++ /dev/null @@ -1,77 +0,0 @@ -access(); - // if ($error) { - // return $error; - // } - $validateModel = new ValidateModel(); - $imgData = $validateModel->getImg(); - $code = strtoupper($validateModel->getCode()); - $token = sha1($code . time()) . rand(100000, 999999); - cache($token, $code, 60); - return jok('验证码生成成功', [ - 'img' => $imgData, - 'token' => $token - ]); - } - /** - * 清除缓存 - * - * @return void - */ - public function clean() - { - $error = $this->access(); - if ($error) { - return $error; - } - Cache::clear(); - - if($this->del_dir("../runtime/")){ - return jok('缓存已清空'); - }else{ - return jerr('缓存清除失败'); - } - } - - function del_dir($dir) { - $dh=opendir($dir); - while ($file=readdir($dh)) { - if($file!="." && $file!="..") { - $fullpath=$dir."/".$file; - if(!is_dir($fullpath)) { - @unlink($fullpath); - } else { - $this->del_dir($fullpath); - } - } - } - closedir($dh); - if(rmdir($dir)) { - return true; - } else { - return false; - } - } -} diff --git a/app/api/QfShop.php b/app/api/QfShop.php deleted file mode 100644 index ab0d2f7..0000000 --- a/app/api/QfShop.php +++ /dev/null @@ -1,92 +0,0 @@ -app = $app; - $this->request = $this->app->request; - - // 控制器初始化 - $this->initialize(); - } - - // 初始化 - protected function initialize() - { - //访问XMLHttpRequest已被CORS政策阻止 - header('Access-Control-Allow-Origin: *'); - - $this->confModel = new ConfModel(); - $configs = $this->confModel->select()->toArray(); - $c = []; - foreach ($configs as $config) { - $c[$config['conf_key']] = $config['conf_value']; - } - config($c, 'qfshop'); - } - public function __call($method, $args) - { - return jerr("API接口方法不存在", 404); - } - - - /** - * 检测授权 获取当前用户登录信息 - * @param $type false不提示登录失败状态 - * @param user_id 顾客时为用户id - * @param action 操作者 顾客端为手机号,管理端为登录账号 - * @param client_type 0=顾客 1=管理组 -1=游客 - */ - protected function getLoginUser($type = true) - { - $is_login = true; - // 获取请求中的token - $access_token = request()->header('X-CSRF-TOKEN'); - if (!$access_token) { - if($type){ - return jerr("用户未登录", 401); - }else{ - $is_login = false; - } - } - $Token = new TokenModel(); - $user = $Token->getToken($access_token); - if (!$user) { - if($type){ - return jerr("登录过期,请重新登录", 401); - }else{ - $is_login = false; - } - } - if($is_login){ - $user['action'] = $user['mobile']; - $user['client_type'] = 0; - unset($user['mobile']); - unset($user['status']); - return $user; - }else{ - $user['client_type'] = -1; - return $user; - } - } - -} diff --git a/app/api/controller/Error.php b/app/api/controller/Error.php deleted file mode 100644 index 909d18e..0000000 --- a/app/api/controller/Error.php +++ /dev/null @@ -1,13 +0,0 @@ -url = "https://pan.xinyuedh.com"; - $this->model = new SourceModel(); - } - - /** - * 全网搜索 该接口仅用于微信自动回复 - * - * @return void - */ - public function search() - { - - $param = input(''); - if (empty($param['title'])) { - return jerr("请输入要看的内容"); - } - - $searchData = array( - 'cookie' => Config('qfshop.quark_cookie'), - 'title' => $param['title'], - ); - $res = curlHelper($this->url."/api/open/network_search", "POST", $searchData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - return jerr($res['message']); - } - - $urls = $res['data']; - - $datas = []; - foreach ($urls as $url) { - $substring = strstr($url, 's/'); - if ($substring !== false) { - $pwd_id = substr($substring, 2); // 去除 's/' 部分 - } else { - continue; - } - - $urlData = array( - 'cookie' => Config('qfshop.quark_cookie'), - 'url' => $url, - ); - $res = curlHelper($this->url."/api/open/transfer", "POST", $urlData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - continue; - } - $patterns = '/^\d+\./'; - $title = preg_replace($patterns, '', $res['data']['title']); - //添加资源到系统中 - $data["title"] = $title.'('.$param['title'].')'; - $data["url"] = $res['data']['share_url']; - $data["fid"] = $res['data']['first_file']['fid']; - $data["is_time"] = 1; - $data["update_time"] = time(); - $data["create_time"] = time(); - $this->model->insertGetId($data); - $datas[] = $data; - } - - return jok('临时资源获取成功',$datas); - } - - - /** - * 十分钟后清除临时资源 - * - * @return void - */ - public function delete_search() - { - // 搜索条件 - $map[] = ['is_time', '=', 1]; - $map[] = ['create_time', '<=', time() - (10 * 60)]; - - - $this->model->where($map)->chunk(100, function ($order) { - foreach ($order as $value) { - $deles = $value->toArray(); - $filelist = []; - $filelist[] = $deles['fid']; - - - $urlData = '{ "action_type": 2, "exclude_fids": [], "filelist": '.json_encode($filelist).' }'; - $urlHeader = array( - 'Accept: application/json, text/plain, */*', - 'Accept-Language: zh-CN,zh;q=0.9', - 'content-type: application/json;charset=UTF-8', - 'sec-ch-ua: "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"', - 'sec-ch-ua-mobile: ?0', - 'sec-ch-ua-platform: "Windows"', - 'sec-fetch-dest: empty', - 'sec-fetch-mode: cors', - 'sec-fetch-site: same-site', - 'Referer: https://pan.quark.cn/', - 'Referrer-Policy: strict-origin-when-cross-origin', - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', - 'cookie: '.Config('qfshop.quark_cookie'), - ); - $res = curlHelper("https://drive-pc.quark.cn/1/clouddrive/file/delete?pr=ucpro&fr=pc&uc_param_str=", "POST", $urlData, $urlHeader)['body']; - $res = json_decode($res, true); - if($res['status'] == 200){ - $this->model->where('fid', $deles['fid'])->delete(); - } - } - }); - - return jok('临时资源删除成功'); - } - -} diff --git a/app/api/controller/Search.php b/app/api/controller/Search.php deleted file mode 100644 index 10e0297..0000000 --- a/app/api/controller/Search.php +++ /dev/null @@ -1,45 +0,0 @@ -getList(input('')); - return jok('获取成功',$data); - } - - public function getDetail() - { - $SourceModel = new SourceModel(); - $data = $SourceModel->getDetail(input('')); - return jok('获取成功',$data); - } - - public function getNew() - { - $SourceModel = new SourceModel(); - $data = $SourceModel->getNew(input('')); - return jok('获取成功',$data); - } - - public function getHot() - { - $SourceModel = new SourceModel(); - $data = $SourceModel->getHot(input('')); - return jok('获取成功',$data); - } - - public function getCategory() - { - $SourceCategoryModel = new SourceCategoryModel(); - $data = $SourceCategoryModel->getList(input('')); - return jok('获取成功',$data); - } -} diff --git a/app/api/controller/Source.php b/app/api/controller/Source.php deleted file mode 100644 index b21ff3e..0000000 --- a/app/api/controller/Source.php +++ /dev/null @@ -1,118 +0,0 @@ -url = "https://pan.xinyuedh.com"; - - $this->model = new SourceModel(); - $this->SourceLogModel = new SourceLogModel(); - } - public function day() - { - // 当前日期 - $currentDate = Carbon::today()->toDateString(); - // 缓存键名 - $cacheKey = 'api_alone_date_' . $currentDate; - - // 检查缓存中是否存在该键 - if (Cache::has($cacheKey)) { - return jerr("请勿频繁调用,一个小时后再试!"); - } - - Cache::set($cacheKey, time(), 3600); - - ini_set('max_execution_time', -1); - //分页转存 - $page_no = 1; - $dataList = ''; - $logId = ''; - while ($dataList=='' || !empty($dataList['items'])) { - $searchData = array( - 'page_no' => $page_no, - 'page_size' => 100, - 'type' => 2, - 'day' => 2, - ); - $res = curlHelper($this->url."/api/search", "POST", $searchData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - ini_set('max_execution_time', 300); - return jerr($res['message']); - } - $dataList = $res['data']; - $page_no++; - - if($logId == ''){ - $logId = $this->SourceLogModel->addLog('每日更新',$dataList['total_result']); - } - - foreach ($dataList['items'] as $key => $value) { - //如已有此资源 跳过 - $detail = $this->model->where('title', $value['title'])->find(); - if(!empty($detail)){ - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'skip_num','重复跳过转存'); - continue; - } - - $url = $value['url']; - $substring = strstr($url, 's/'); - - if ($substring !== false) { - $pwd_id = substr($substring, 2); // 去除 's/' 部分 - } else { - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'fail_num','资源地址格式有误'); - continue; - } - - $urlData = array( - 'cookie' => Config('qfshop.quark_cookie'), - 'url' => $url, - ); - $res = curlHelper($this->url."/api/open/transfer", "POST", $urlData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - if($res['message'] == 'capacity limit[{0}]'){ - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'fail_num',$res['message']); - break; - }else{ - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'fail_num',$res['message']); - continue; - } - } - - //添加资源到系统中 - $data["title"] = $value['title']; - $data["url"] = $res['data']['share_url']; - $data["update_time"] = time(); - $data["create_time"] = time(); - $this->model->insertGetId($data); - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'new_num',''); - } - // 可以添加一个最大重试次数的限制,防止无限循环 - if ($page_no > 1000) { - break; - } - } - - $this->SourceLogModel->editLog($logId,$dataList['total_result'],'','',3); - ini_set('max_execution_time', 300); - return jok('已提交任务,稍后查看结果',$dataList); - } -} diff --git a/app/api/controller/Tool.php b/app/api/controller/Tool.php deleted file mode 100644 index b7cdfd7..0000000 --- a/app/api/controller/Tool.php +++ /dev/null @@ -1,75 +0,0 @@ - Config('qfshop.app_name'), - 'qcode' => getimgurl(Config('qfshop.qcode')), - 'logo' => getimgurl(Config('qfshop.logo')), - 'app_description' => Config('qfshop.app_description'), - ]; - return jok('获取成功',$data); - } - /** - * 上传图片 - * - * @return void - */ - public function Upload() - { - // 获取当前登录的用户信息 - $userInfo = $this->getLoginUser(); - - try { - $file = request()->file('file'); - } catch (\Exception $error) { - return jerr('上传文件失败,请检查你的文件!'); - } - $Usermodel = new Usermodel(); - $data = $Usermodel->Upload($file, $userInfo); - return jok('上传成功',$data); - } - - /** - * 根据广告位关键词获取广告图片列表 - * - * @return void - */ - public function getAdsCode() - { - $Adsmodel = new Adsmodel(); - $data = $Adsmodel->getAdsCode(input('')); - return jok('获取成功',$data); - } - - /** - * 用户反馈 - * - * @return void - */ - public function feedback() - { - $data = input(''); - if (empty($data['content'])) { - return jerr("请输入要看的内容"); - } - $FeedbackModel = new FeedbackModel(); - $FeedbackModel->save(['content' => $data['content']]); - return jok('已反馈'); - } -} diff --git a/app/common.php b/app/common.php deleted file mode 100644 index fe3daf1..0000000 --- a/app/common.php +++ /dev/null @@ -1,700 +0,0 @@ - 200, "message" => $message, 'data' => $data]); - } else { - echo json_encode(["code" => 200, "message" => $message, 'data' => $data??'']); - } - die; -} -/** - * 输出错误JSON - * - * @param string 错误信息 - * @param int 错误代码 - * @return json - */ -function jerr($message = 'error', $code = 500) -{ - header("content-type:application/json;chartset=uft-8"); - echo json_encode(["code" => $code, "message" => $message]); - die; -} -/** - * 密码+盐 加密 - * - * @param string 明文密码 - * @param string 盐 - * @return string - */ -function encodePassword($password, $salt) -{ - return sha1($password . $salt . $password . $salt); -} -/** - * 密码校验 6-16 - * - * @param string 明文密码 - * @return boolean 是否校验通过 - */ -function isValidPassword($password) -{ - return preg_match('/(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?!.*\s).{6,}/', $password); -} -/** - * 获取随机字符 - * - * @param int $len - * @return void - */ -function getRandString($len) -{ - $string = ''; - $randString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - for ($i = 0; $i < $len; $i++) { - $string .= $randString[rand(0, strlen($randString) - 1)]; - } - return $string; -} -/** - * 生成唯一会议编码 - * @param string $prefix 头部 - * @return string - */ -function get_order_no($prefix = 'QF') -{ - $order_no = $prefix; - $order_no .= mb_strtoupper(dechex(date('m')), 'utf-8'); - $order_no .= date('d') . mb_substr(time(), -5, null, 'utf-8'); - $order_no .= mb_substr(microtime(), 2, 5, 'utf-8'); - return $order_no; -} -/** - * 获取随机字母 - * - * @param int 长度 - * @return string - */ -function getRandChar($len) -{ - $string = ''; - $randString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - for ($i = 0; $i < $len; $i++) { - $string .= $randString[rand(0, strlen($randString) - 1)]; - } - return $string; -} -/** - * 驼峰转下划线 - * @param $camelCaps - * @param string $separator - * @return string - */ -function uncamelize($camelCaps, $separator = '_') -{ - return strtolower(preg_replace('/([a-z])([A-Z])/', "$1" . $separator . "$2", $camelCaps)); -} -/** - * 遍历类的方法 - * - * @param string 指定的类名称 - * @return array - */ -function getClassMethods($class) -{ - $array_result = []; - $array_all = get_class_methods($class); - if ($parent_class = get_parent_class($class)) { - $array_parent = get_class_methods($parent_class); - $array_result = array_diff($array_all, $array_parent); - } else { - $array_result = $array_all; - } - return $array_result; -} -/** - * 获取包含协议和端口的域名 - * - * @return string - */ -function getFullDomain() -{ - // return ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? $_SERVER['REQUEST_SCHEME']) . "://" . $_SERVER['HTTP_HOST']; - return "http://" . $_SERVER['HTTP_HOST']; -} -/** - * 图片地址转绝对路径 - * - * @return string - */ -function getimgurl($img) -{ - $result = ''; - if($img){ - // $url = ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? $_SERVER['REQUEST_SCHEME']) . "://" . $_SERVER['HTTP_HOST']; - $url = "http://" . $_SERVER['HTTP_HOST']; - if(is_array($img)){ - $result = []; - foreach ($img as $key => $value) { - if(!preg_match("/^http(s)?:\\/\\/.+/", $value)){ - $result[] = $url.$value; - }else{ - $result[] = $value; - } - } - }else{ - if(!preg_match("/^http(s)?:\\/\\/.+/", $img)){ - $result = $url.$img; - }else{ - $result = $img; - } - } - } - return $result; -} - -/** - * 替换编辑器内容中的文件地址 - * @param string $content 编辑器内容 - * @return string - */ -function app_replace_content_file_url($content) -{ - \phpQuery::newDocumentHTML($content); - $pq = pq(null); - $domain = request()->host(); - $images = $pq->find("img"); - if ($images->length) { - foreach ($images as $img) { - $img = pq($img); - $imgSrc = $img->attr("src"); - if(!preg_match("/^http(s)?:\\/\\/.+/", $imgSrc)){ - $img->attr("src", getimgurl($imgSrc)); - } - } - } - $links = $pq->find("a"); - if ($links->length) { - foreach ($links as $link) { - $link = pq($link); - $href = $link->attr("href"); - if(!preg_match("/^http(s)?:\\/\\/.+/", $href)){ - $img->attr("href", getimgurl($imgSrc)); - } - } - } - $content = $pq->htmlOuter(); - \phpQuery::$documents = null; - return $content; -} - -/** - * 获取客户端IP - * - * @return string - */ -function getClientIp() -{ - foreach (array( - 'HTTP_CLIENT_IP', - 'HTTP_X_FORWARDED_FOR', - 'HTTP_X_FORWARDED', - 'HTTP_X_CLUSTER_CLIENT_IP', - 'HTTP_FORWARDED_FOR', - 'HTTP_FORWARDED', - 'REMOTE_ADDR' - ) as $key) { - if (array_key_exists($key, $_SERVER)) { - foreach (explode(',', $_SERVER[$key]) as $ip) { - $ip = trim($ip); - if ((bool) filter_var( - $ip, - FILTER_VALIDATE_IP, - FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 - // FILTER_FLAG_NO_PRIV_RANGE | - // FILTER_FLAG_NO_RES_RANGE - )) { - return $ip; - } - } - } - } - return null; -} - -/** - * 取文本中间 - * - * @param string 原始字符串 - * @param string 左边字符串 - * @param string 右边字符串 - * @return string - */ -function getSubstr($str, $leftStr, $rightStr) -{ - $left = strpos($str, $leftStr); - $right = strpos($str, $rightStr, $left); - if ($left < 0 or $right < $left) return ''; - return substr($str, $left + strlen($leftStr), $right - $left - strlen($leftStr)); -} -/** - * 获取操作系统 - * - * @return string - */ -function getOs() -{ - if (empty($_SERVER['HTTP_USER_AGENT'])) { - return 'Other'; - } - $agent = strtolower($_SERVER['HTTP_USER_AGENT']); - if (strpos($agent, 'windows nt')) { - $platform = 'Windows'; - } elseif (strpos($agent, 'macintosh')) { - $platform = 'MacOS'; - } elseif (strpos($agent, 'ipod')) { - $platform = 'iPod'; - } elseif (strpos($agent, 'ipad')) { - $platform = 'iPad'; - } elseif (strpos($agent, 'iphone')) { - $platform = 'iPhone'; - } elseif (strpos($agent, 'android')) { - $platform = 'Android'; - } elseif (strpos($agent, 'unix')) { - $platform = 'Unix'; - } elseif (strpos($agent, 'linux')) { - $platform = 'Linux'; - } else { - $platform = 'Other'; - } - return $platform; -} -/** - * 获取浏览器 - * - * @return void - */ -function getBrowser() -{ - if (empty($_SERVER['HTTP_USER_AGENT'])) { - return 'Unknown'; - } - $agent = $_SERVER["HTTP_USER_AGENT"]; - if (strpos($agent, 'MSIE') !== false || strpos($agent, 'rv:11.0')) //ie11判断 - { - return "IE"; - } else if (strpos($agent, 'Firefox') !== false) { - return "Firefox"; - } else if (strpos($agent, 'Chrome') !== false) { - return "Chrome"; - } else if (strpos($agent, 'Opera') !== false) { - return 'Opera'; - } else if ((strpos($agent, 'Chrome') == false) && strpos($agent, 'Safari') !== false) { - return 'Safari'; - } else { - return 'Unknown'; - } -} -/** - * 是否手机请求 - * - * @return boolean - */ -function isMobileRequest() -{ - $_SERVER['ALL_HTTP'] = isset($_SERVER['ALL_HTTP']) ? $_SERVER['ALL_HTTP'] : ''; - $mobile_browser = '0'; - if (preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|uc|qq|wechat|micro|messenger|ipad|ipod|android|xoom)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) - $mobile_browser++; - if ((isset($_SERVER['HTTP_ACCEPT'])) and (strpos(strtolower($_SERVER['HTTP_ACCEPT']), 'application/vnd.wap.xhtml+xml') !== false)) - $mobile_browser++; - if (isset($_SERVER['HTTP_X_WAP_PROFILE'])) - $mobile_browser++; - if (isset($_SERVER['HTTP_PROFILE'])) - $mobile_browser++; - $mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'], 0, 4)); - $mobile_agents = array( - 'w3c ', 'acs-', 'alav', 'alca', 'amoi', 'audi', 'avan', 'benq', 'bird', 'blac', - 'blaz', 'brew', 'cell', 'cldc', 'cmd-', 'dang', 'doco', 'eric', 'hipt', 'inno', - 'ipaq', 'java', 'jigs', 'kddi', 'keji', 'leno', 'lg-c', 'lg-d', 'lg-g', 'lge-', - 'maui', 'maxo', 'midp', 'mits', 'mmef', 'mobi', 'mot-', 'moto', 'mwbp', 'nec-', - 'newt', 'noki', 'oper', 'palm', 'pana', 'pant', 'phil', 'play', 'port', 'prox', - 'qwap', 'sage', 'sams', 'sany', 'sch-', 'sec-', 'send', 'seri', 'sgh-', 'shar', - 'sie-', 'siem', 'smal', 'smar', 'sony', 'sph-', 'symb', 't-mo', 'teli', 'tim-', - 'tosh', 'tsm-', 'upg1', 'upsi', 'vk-v', 'voda', 'wap-', 'wapa', 'wapi', 'wapp', - 'wapr', 'webc', 'winw', 'winw', 'xda', 'xda-' - ); - if (in_array($mobile_ua, $mobile_agents)) - $mobile_browser++; - if (strpos(strtolower($_SERVER['ALL_HTTP']), 'operamini') !== false) - $mobile_browser++; - // Pre-final check to reset everything if the user is on Windows - if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows') !== false) - $mobile_browser = 0; - // But WP7 is also Windows, with a slightly different characteristic - if (strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows phone') !== false) - $mobile_browser++; - if ($mobile_browser > 0) - return true; - else - return false; -} -/** - * 身份证号验证 - * @param $id - * @return bool - */ -function isIDCard($id) -{ - $id = strtoupper($id); - $regx = "/(^\d{15}$)|(^\d{17}([0-9]|X)$)/"; - $arr_split = array(); - if (!preg_match($regx, $id)) { - return FALSE; - } - if (15 == strlen($id)) //检查15位 - { - $regx = "/^(\d{6})+(\d{2})+(\d{2})+(\d{2})+(\d{3})$/"; - @preg_match($regx, $id, $arr_split); - //检查生日日期是否正确 - $dtm_birth = "19" . $arr_split[2] . '/' . $arr_split[3] . '/' . $arr_split[4]; - if (!strtotime($dtm_birth)) { - return FALSE; - } else { - return TRUE; - } - } else { //检查18位 - $regx = "/^(\d{6})+(\d{4})+(\d{2})+(\d{2})+(\d{3})([0-9]|X)$/"; - @preg_match($regx, $id, $arr_split); - $dtm_birth = $arr_split[2] . '/' . $arr_split[3] . '/' . $arr_split[4]; - if (!strtotime($dtm_birth)) //检查生日日期是否正确 - { - return FALSE; - } else { - //检验18位身份证的校验码是否正确。 - //校验位按照ISO 7064:1983.MOD 11-2的规定生成,X可以认为是数字10。 - $arr_int = array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2); - $arr_ch = array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'); - $sign = 0; - for ($i = 0; $i < 17; $i++) { - $b = (int) $id[$i]; - $w = $arr_int[$i]; - $sign += $b * $w; - } - $n = $sign % 11; - $val_num = $arr_ch[$n]; - if ($val_num != substr($id, 17, 1)) { - return FALSE; - } else { - return TRUE; - } - } - } -} -/** - * 是否是整数 - * - * @param string 输入内容 - * @return boolean - */ -function isInteger($input) -{ - return (ctype_digit(strval($input))); -} -/** - * 获取一个key摘要 - * - * @param string 原始key - * @return string - */ -function getTicket($key) -{ - return sha1($key . (env('SYSTEM_SALT') ?? 'qfshop') . $key); -} -/** - * CURL请求 - * - * @param string URL地址 - * @param mixed 请求方法,支持GET/POST/PUT/DELETE/PATCH/TRACE/OPTION/HEAD 默认GET - * @param mixed 请求数据包体 - * @param mixed 请求头 数组 - * @param mixed 请求COOKIES字符串 - * @return void - */ -function curlHelper($url, $method = 'GET', $data = null, $header = [], $queryParams = [], $cookies = "") -{ - // 构建查询参数 - if (!empty($queryParams)) { - $queryString = http_build_query($queryParams); - $url .= '?' . $queryString; - } - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($ch, CURLOPT_HTTPHEADER, $header); - curl_setopt($ch, CURLOPT_COOKIE, $cookies); - switch ($method) { - case "GET": - curl_setopt($ch, CURLOPT_HTTPGET, true); - break; - case "POST": - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - case "PUT": - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - case "DELETE": - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - case "PATCH": - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH"); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - case "TRACE": - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "TRACE"); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - case "OPTIONS": - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "OPTIONS"); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - case "HEAD": - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "HEAD"); - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - break; - default: - } - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_HEADER, 1); - $response = curl_exec($ch); - $output = []; - $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE); - // 根据头大小去获取头信息内容 - $output['header'] = substr($response, 0, $headerSize); - $output['body'] = substr($response, $headerSize, strlen($response) - $headerSize); - $output['detail'] = curl_getinfo($ch); - curl_close($ch); - return $output; -} -/** - * 模拟表单上传文件请求 - * @param $$url 提交地址 - * @param $data 提交数据 - * @param $cookies 如设置了Content-Type将被自动覆写为formdata - * ex. - * $data = ['file'=>new \CURLFile(realpath($file_dir)),appid"=>"1234"]; - * $result = curl_form($url,$data); - * @return mixed - */ -function curlForm($url, $data = null, $header = [], $cookies = "") -{ - $header[] = 'Content-Type: multipart/form-data'; - return curlHelper($url, "POST", $data, $header, $cookies); -} -/** - * 多维数组合并(支持多数组) - * @param arraylist arrayMergeMulti(['1'=>'1','2'=>'2','3'=>'3'],['4'=>'4','5'=>'5','6'=>'6']) - * @return array - */ -function arrayMergeMulti() -{ - //获取当前方法捕获到的所有参数数组 - $args = func_get_args(); - $array = []; - foreach ($args as $arg) { - if (is_array($arg)) { - foreach ($arg as $k => $v) { - if (is_array($v)) { - $array[$k] = isset($array[$k]) ? $array[$k] : []; - $array[$k] = arrayMergeMulti($array[$k], $v); - } else { - $array[$k] = $v; - } - } - } - } - - return $array; -} -/** - * 对查询结果集进行排序 - * @access public - * @param array $list 查询结果 - * @param string $field 排序的字段名 - * @param array $sortBy 排序类型 - * asc正向排序 desc逆向排序 nat自然排序 - * @return array|bool - */ -function listSortBy($list, $field, $sortBy = 'asc') -{ - if (is_array($list)) { - $refer = $resultSet = []; - foreach ($list as $i => $data) { - $refer[$i] = &$data[$field]; - } - switch ($sortBy) { - case 'asc': // 正向排序 - asort($refer); - break; - case 'desc': // 逆向排序 - arsort($refer); - break; - case 'nat': // 自然排序 - natcasesort($refer); - break; - } - foreach ($refer as $key => $val) { - $resultSet[] = &$list[$key]; - } - return $resultSet; - } - - return false; -} - -/** - * 格式化字节大小 - * @param number $size 字节数 - * @param int $float 小数保留位数 - * @param string $delimiter 数字和单位分隔符 - * @return string 格式化后的带单位的大小 - */ -function formatBytes($size, $float = 2, $delimiter = '') -{ - $units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; - for ($i = 0; $size >= 1024 && $i < 5; $i++) $size /= 1024; - - return round($size, $float) . $delimiter . $units[$i]; -} -/** - * 生成标准UUID - * - * @return string - */ -function getUuid() -{ - mt_srand((float) microtime() * 10000); - $uuid = sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)); - return $uuid; -} - - -/** - * 判断是否为空参数 - * @param mixed $parm - * @return bool - */ -function is_empty_parm(&$parm) -{ - return !(isset($parm) && '' !== $parm); -} - -/** - * 返回当前账号openid - * $openid wxapp_openid wechat_openid - * @return string - */ -function get_client_openid($user_id, $openid) -{ - return \think\facade\Db::name('user')->where('user_id', $user_id)->value($openid); -} - -/** - * 产生数字与字母混合随机字符串 - * @param int $len 数值长度,默认6位 - * @return string - */ -function get_randstr($len = 6) -{ - $chars = [ - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', - 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', - 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', - '3', '4', '5', '6', '7', '8', '9', - ]; - - $charsLen = count($chars) - 1; - shuffle($chars); - - $output = ''; - for ($i = 0; $i < $len; $i++) { - $output .= $chars[mt_rand(0, $charsLen)]; - } - - return $output; -} - -/** - * 产生随机数值 - * @param int $len 数值长度,默认8位 - * @return string - */ -function rand_number($len = 8) -{ - $chars = str_repeat('123456789', 3); - if ($len > 10) { - $chars = str_repeat($chars, $len); - } - - $chars = str_shuffle($chars); - return mb_substr($chars, 0, $len, 'utf-8'); -} - -/** - * 智能字符串模糊化 - * @param string $str 被模糊的字符串 - * @param int $len 模糊的长度 - * @return string - */ -function auto_hid_substr(string $str, $len = 3) -{ - if (empty($str)) { - return null; - } - - $sub_str = mb_substr($str, 0, 1, 'utf-8'); - for ($i = 0; $i < $len; $i++) { - $sub_str .= '*'; - } - - if (mb_strlen($str, 'utf-8') <= 2) { - $str = $sub_str; - } - - $sub_str .= mb_substr($str, -1, 1, 'utf-8'); - return $sub_str; -} - -/** - * 多维数组,根据某个特定字段过滤重复值 - * @return array - */ -function assoc_unique($arr, $key) { - $tmp_arr = array(); - foreach ($arr as $k => $v) { - if (in_array($v[$key], $tmp_arr)) {//搜索$v[$key]是否在$tmp_arr数组中存在,若存在返回true - unset($arr[$k]); - } else { - $tmp_arr[] = $v[$key]; - } - } - sort($arr); //sort函数对数组进行排序 - return $arr; -} diff --git a/app/event.php b/app/event.php deleted file mode 100644 index e9851bb..0000000 --- a/app/event.php +++ /dev/null @@ -1,17 +0,0 @@ - [ - ], - - 'listen' => [ - 'AppInit' => [], - 'HttpRun' => [], - 'HttpEnd' => [], - 'LogLevel' => [], - 'LogWrite' => [], - ], - - 'subscribe' => [ - ], -]; diff --git a/app/index/QfShop.php b/app/index/QfShop.php deleted file mode 100644 index f131ee6..0000000 --- a/app/index/QfShop.php +++ /dev/null @@ -1,171 +0,0 @@ -app = $app; - $this->request = $this->app->request; - // 控制器初始化 - // $this->initialize(); - } - - // 初始化 - protected function initialize() - { - $this->module = "index"; - $this->controller = "index"; - $this->action = strtolower($this->request->action()) ? strtolower($this->request->action()) : "index"; - $this->confModel = new ConfModel(); - $this->UserModel = new UserModel(); - - $configs = $this->confModel->select()->toArray(); - $c = []; - foreach ($configs as $config) { - $c[$config['conf_key']] = $config['conf_value']; - } - config($c, 'qfshop'); - $this->initWechatConfig(); - } - /** - * 微信服务登录 $this->user将为用户数据 - * - * @param mixed $openid - * @return void - */ - protected function updateWechatUserInfo($openid) - { - $user = $this->easyWeChat->user->get($openid); - if (array_key_exists("errcode", $user)) { - return false; - } else { - $nickname = $user['nickname']??""; - $sex = $user['sex']??""; - $headimgurl = empty($user['headimgurl'])?'' : str_replace("http://", 'https://', $user['headimgurl']); - $this->user = $this->UserModel->where('openid', $openid)->find(); - if (!$this->user) { - //注册 - $data = ["openid" => $openid, "nickname" => $nickname, "head_pic" => $headimgurl, "sex" => $sex, "create_time" => time(), "update_time" => time()]; - $this->UserModel->insert($data); - } else { - //更新 - $this->UserModel->where('openid', $openid)->update(["nickname" => $nickname, "head_pic" => $headimgurl, "sex" => $sex,"update_time" => time()]); - } - $this->user = $this->UserModel->where('openid', $openid)->find(); - return $this->user; - } - } - protected function initWechatConfig() - { - $this->wechat_appid = config("qfshop.mp_appid"); - $this->wechat_appkey = config("qfshop.mp_appsecret"); - if (!$this->wechat_appid || !$this->wechat_appkey) { - die('Input wechat appid and appkey first!'); - } - $this->wechat_config = [ - 'app_id' => $this->wechat_appid, - 'secret' => $this->wechat_appkey, - 'token' => 'qfshop', - 'aes_key' => 'qfshop', - //必须添加部分 - 'http' => [ // 配置 - 'verify' => false, - 'timeout' => 4.0, - ], - ]; - $this->easyWeChat = Factory::officialAccount($this->wechat_config); - $user_id = cookie('user_id'); - $user_ticket = cookie('user_ticket'); - if ($user_ticket == getTicket($user_id)) { - $this->user = $this->UserModel->where('user_id', $user_id)->find(); - if ($this->user) { - $this->user = $this->user->toArray(); - } - } - } - /** - * 调用微信授权 - * - * @return void - */ - protected function authorize() - { - if ($this->user) { - return null; - } - //生成授权所需要的回调地址 并重定向到Authorize控制器进行微信授权 - $callback = '/'; - if ($this->module != "index") { - $callback .= strtolower($this->module) . '/'; - } else { - if ($this->controller != "Index" && $this->action != "index") { - $callback .= strtolower($this->module) . '/'; - } - } - if ($this->controller != "Index") { - $callback .= strtolower($this->controller) . '/'; - } else { - if ($this->action != "index") { - $callback .= strtolower($this->controller) . '/'; - } - } - if ($this->action != "index") { - $callback .= strtolower($this->action) . '/'; - } - $i = 0; - foreach (input('get.') as $k => $v) { - if ($i == 0) { - $callback .= "?"; - } else { - $callback .= "&"; - } - if (!in_array($k, ['code', 'state', 'from', 'isappinstalled'])) { - $callback .= $k . "=" . $v; - } - $i++; - } - return redirect('/index/authorize?callback=' . urlencode($callback)); - } -} diff --git a/app/index/controller/Authorize.php b/app/index/controller/Authorize.php deleted file mode 100644 index 245b1be..0000000 --- a/app/index/controller/Authorize.php +++ /dev/null @@ -1,43 +0,0 @@ -wechat_appid . "&redirect_uri=" . $callbackWechat . "&response_type=code&scope=snsapi_base&state=" . urlencode($callback) . "#wechat_redirect"); - } - public function callback() - { - $callback = '/index'; - if (input('state')) { - $callback = urldecode(input('state')); - } - if (!input('code')) { - return redirect($callback); - } - $code = input('code'); - $retStr = curlHelper("https://api.weixin.qq.com/sns/oauth2/access_token?appid=" . $this->wechat_appid . "&secret=" . $this->wechat_appkey . "&code={$code}&grant_type=authorization_code")['body']; - $retObj = json_decode($retStr); - if (isset($retObj->errcode)) { - return redirect($callback); - } else { - $access_token = $retObj->access_token; - $openid = $retObj->openid; - if (!$this->updateWechatUserInfo($openid)) { - return redirect($callback); - } - cookie('user_id', $this->user['user_id'], 3600000); - cookie('user_ticket', getTicket($this->user['user_id']), 3600000); - return redirect($callback); - } - } -} diff --git a/app/index/controller/Error.php b/app/index/controller/Error.php deleted file mode 100644 index 593e9eb..0000000 --- a/app/index/controller/Error.php +++ /dev/null @@ -1,32 +0,0 @@ -authorize(); - if ($error) { - return $error; - } - View::assign('wechat', $this->wechat); - if (file_exists(app_path() . "/view/" . strtolower($this->request->controller()) . "/" . $method . ".html")) { - if (key_exists('callback', $args)) { - View::assign('callback', $args['callback']); - } else { - View::assign('callback', '/admin'); - } - return View::fetch(); - } else { - return 404; - } - } - public static function show($msg = null) - { - View::assign('msg', $msg); - return View::fetch("/error"); - } -} diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php deleted file mode 100644 index 8f70846..0000000 --- a/app/index/controller/Index.php +++ /dev/null @@ -1,29 +0,0 @@ -easyWeChat->jssdk->setUrl(input('url')); - $ret = $this->easyWeChat->jssdk->buildConfig([ - 'scanQRCode', - 'closeWindow', - 'showMenuItems', - 'hideAllNonBaseMenuItem', - 'updateAppMessageShareData', - 'updateTimelineShareData' - ], false, false, false); - return $ret; - } -} diff --git a/app/index/view/error.html b/app/index/view/error.html deleted file mode 100644 index 196c5e4..0000000 --- a/app/index/view/error.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - - 提示 - - - - - -
-
-
-
-

提示

-

{$msg}

-
-
- -
- - - - - - \ No newline at end of file diff --git a/app/index/view/index/index.html b/app/index/view/index/index.html deleted file mode 100644 index 9326b18..0000000 --- a/app/index/view/index/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - 心悦搜剧-短剧搜索 - - - - - - - - - - -
- - diff --git a/app/job/InsertDataJob.php b/app/job/InsertDataJob.php deleted file mode 100644 index 05bc1c5..0000000 --- a/app/job/InsertDataJob.php +++ /dev/null @@ -1,63 +0,0 @@ -model = new SourceModel(); - $this->SourceLogModel = new SourceLogModel(); - $logId = $value['logId']; - - $detail = $this->model->where('title', $value['title'])->find(); - if(empty($detail)){ - $url = $value['url']; - $substring = strstr($url, 's/'); - - if ($substring !== false) { - $pwd_id = substr($substring, 2); // 去除 's/' 部分 - - $urlData = array( - 'cookie' => Config('qfshop.quark_cookie'), - 'url' => $url, - ); - $res = curlHelper($value['urls']."/api/open/transfer", "POST", $urlData)['body']; - $res = json_decode($res, true); - - if($res['code'] !== 200){ - $this->SourceLogModel->editLog($logId,'fail_num',$res['message']); - return; - } - - //添加资源到系统中 - $data["title"] = $value['title']; - $data["url"] = $res['data']['share_url']; - $data["update_time"] = time(); - $data["create_time"] = time(); - $this->model->insertGetId($data); - $this->SourceLogModel->editLog($logId,'new_num',''); - } else { - $this->SourceLogModel->editLog($logId,'fail_num','资源地址格式有误'); - } - }else{ - //如已有此资源 跳过 - $this->SourceLogModel->editLog($logId,'skip_num','重复跳过转存'); - } - - // 处理完成后可以删除任务,避免重复执行 - $job->delete(); - } catch (\Exception $e) { - // 处理异常情况,例如记录日志等 - \think\facade\Log::error('数据插入失败:' . $e->getMessage()); - - // 记录日志后可以选择重新放回队列,等待下次重试 - // $job->release(60); // 重新放回队列,延迟 60 秒后重试 - } - } -} \ No newline at end of file diff --git a/app/middleware.php b/app/middleware.php deleted file mode 100644 index fc907de..0000000 --- a/app/middleware.php +++ /dev/null @@ -1,12 +0,0 @@ -where([ - // "access_admin" => $access_admin, - // "access_plat" => $access_plat - // ])->update(['access_status' => 1]); - //生成一个新的Access_token - $access_token = sha1(time()) . rand(100000, 99999) . sha1(time()); - $access_id = $this->insertGetId([ - "access_admin" => $access_admin, - "access_plat" => $access_plat, - "access_token" => $access_token, - "access_ip" => request()->ip(), - "access_createtime" => time(), - "access_updatetime" => time() - ]); - $access = $this->where("access_id", $access_id)->find(); - return $access ?? false; - } -} diff --git a/app/model/Admin.php b/app/model/Admin.php deleted file mode 100644 index 7a159de..0000000 --- a/app/model/Admin.php +++ /dev/null @@ -1,130 +0,0 @@ -where([ - "admin_account" => $admin_account, - ])->find(); - if ($admin) { - //判断密码是否正确 - $salt = $admin['admin_salt']; - $password = $admin['admin_password']; - if ($password != encodePassword($admin_password, $salt)) { - return false; - } - return $admin->toArray() ?? false; - } else { - return false; - } - } - - public function getListByPage($maps, $order = null, $field = "*") - { - $resource = $this->view('admin', $field)->view('group', '*', 'group.group_id = admin.admin_group', 'left'); - foreach ($maps as $map) { - switch (count($map)) { - case 1: - $resource = $resource->where($map[0]); - break; - case 2: - $resource = $resource->where($map[0], $map[1]); - break; - case 3: - $resource = $resource->where($map[0], $map[1], $map[2]); - break; - default: - } - } - if ($order) { - $resource = $resource->order($order); - } - return $resource->paginate($this->per_page); - } - - /** - * 重置密码 - * - * @param string UID - * @param string 密码 - * @return void - */ - public function motifyPassword($admin_id, $password) - { - $access = new Access(); - //将所有授权记录标记为失效 - $access->where('access_admin', $admin_id)->update(['access_status' => 1]); - $salt = getRandString(4); - $password = encodePassword($password, $salt); - return $this->where([ - "admin_id" => $admin_id - ])->update([ - "admin_password" => $password, - "admin_salt" => $salt, - ]); - } - - /** - * 通过帐号获取用户信息 - * - * @param string 帐号/手机号 - * @return void - */ - public function getAdminByAccount($admin_account) - { - $admin = $this->where([ - "admin_account" => $admin_account - ])->find(); - if ($admin) { - return $admin->toArray() ?? false; - } else { - return false; - } - } - /** - * AccessToken获取用户信息 - * - * @param string access_token - * @return void - */ - public function getAdminByAccessToken($access_token) - { - $Access = new Access(); - $access = $Access->where([ - "access_token" => $access_token, - "access_status" => 0, - ])->find(); - if ($access) { - if (time() > $access['access_updatetime'] + 7200) { - return false; - } - if ($access['access_updatetime'] - $access['access_createtime'] > 86400) { - return false; - } - $Access->where([ - "access_id" => $access['access_id'], - ])->update([ - 'access_updatetime' => time() - ]); - $this->where("admin_id", $access['access_admin'])->update([ - 'admin_updatetime' => time() - ]); - $admin = $this->where("admin_id", $access['access_admin'])->find(); - return $admin->toArray() ?? false; - } else { - return false; - } - } -} diff --git a/app/model/App.php b/app/model/App.php deleted file mode 100644 index d77bd18..0000000 --- a/app/model/App.php +++ /dev/null @@ -1,9 +0,0 @@ -where([ - "auth_group" => $auth_group, - "auth_node" => $auth_node - ])->find(); - return $auth ? true : false; - } - - /** - * 根据用户组 获取管理后台菜单 - * - * @param int 用户组ID - * @return void - */ - public function getAdminMenuListByAdminId($group_id) - { - if ($group_id == 1) { - //超级管理员组 - $list = Node::where([ - "node_pid" => 0, - "node_show" => 1, - ]) - ->order("node_order desc,node_id asc") - ->select(); - for ($i = 0; $i < count($list); $i++) { - $list[$i]['subList'] = $this->getSubAdminListByPid($list[$i]['node_id'], $group_id); - for ($j = 0; $j < count($list[$i]['subList']); $j++) { - $list[$i]['subList'][$j]['subList'] = $this->getSubAdminListByPid($list[$i]['subList'][$j]['node_id'], $group_id); - } - } - return $list; - } else { - //其他组 - $list = Node::where([ - "node_pid" => 0, - "node_show" => 1, - ]) - ->order("node_order desc,node_id asc") - ->select(); - for ($i = 0; $i < count($list); $i++) { - $list[$i]['subList'] = $this->getSubAdminListByPid($list[$i]['node_id'], 1); - for ($j = 0; $j < count($list[$i]['subList']); $j++) { - $list[$i]['subList'][$j]['subList'] = $this->getSubAdminListByPid($list[$i]['subList'][$j]['node_id'], 1); - } - } - if($list){ - $list = $list->toArray(); - } - $list2 = Node::alias("node") - ->view('node', '*') - ->view('auth', '*', 'node.node_id=auth.auth_node', 'left') - ->where([ - "node_module" => "qfadmin", - "node_show" => 1, - "auth_group" => $group_id - ]) - ->order("node_order desc,node_id asc") - ->select()->toArray(); - - foreach ($list2 as $k => $v) { - //一级 - foreach ($list as $key => $value) { - if($v['node_id'] == $value['node_id']){ - $list[$key]['select'] = 1; - } - //2级 - foreach ($value['subList'] as $key2 => $value2) { - if($v['node_id'] == $value2['node_id']){ - $list[$key]['subList'][$key2]['select'] = 1; - } - //3级 - foreach ($value2['subList'] as $key3 => $value3) { - if($v['node_id'] == $value3['node_id']){ - $list[$key]['subList'][$key2]['subList'][$key3]['select'] = 1; - } - } - } - } - } - foreach ($list as $key => $value) { - //一级 - if(empty($value['select'])){ - if(!empty($value['subList'])){ - foreach ($value['subList'] as $key2 => $value2) { - //2级 - if(empty($value2['select'])){ - if(!empty($value2['subList'])){ - foreach ($value2['subList'] as $key3 => $value3) { - //3级 - if(empty($value3['select'])){ - if(empty($value3['subList'])){ - unset($list[$key]['subList'][$key2]['subList'][$key3]); - if(empty($list[$key]['subList'][$key2]['subList'])){ - unset($list[$key]['subList'][$key2]); - } - } - } - } - }else{ - unset($list[$key]['subList'][$key2]); - if(empty($list[$key]['subList'])){ - unset($list[$key]); - } - } - } - } - }else{ - unset($list[$key]); - } - } - } - $list = array_values($list); - foreach ($list as $key => $value) { - if(!empty($value['subList'])){ - $list[$key]['subList'] = array_values($list[$key]['subList']); - foreach ($value['subList'] as $key2 => $value2) { - if(!empty($value2['subList'])){ - try { - $list[$key]['subList'][$key2]['subList'] = array_values($list[$key]['subList'][$key2]['subList']); - } catch (\Throwable $th) { - //throw $th; - } - } - } - } - } - return $list; - } - } - - /** - * 根据节点ID 获取用户组的子菜单 - * - * @param int 节点ID - * @param int 用户组ID - * @return void - */ - public function getSubAdminListByPid($node_id, $group_id = 1) - { - if ($group_id == 1) { - //超级管理员组 - return Node::where([ - "node_pid" => $node_id, - "node_show" => 1 - ]) - ->order("node_order desc,node_id asc") - ->select(); - } else { - //其他组 - return Node::alias("node") - ->view('node', '*') - ->view('auth', '*', 'node.node_id=auth.auth_node', 'left') - ->where([ - "node_pid" => $node_id, - "node_show" => 1, - "auth_group" => $group_id - ]) - ->order("node_order desc,node_id asc") - ->select(); - } - } - /** - * 删除授权记录 - * - * @return void - */ - public function cleanAuth() - { - //清空auth表 - Db::execute("truncate table " . config('database.connections.mysql.prefix') . "auth"); - return true; - } -} diff --git a/app/model/Conf.php b/app/model/Conf.php deleted file mode 100644 index e386c74..0000000 --- a/app/model/Conf.php +++ /dev/null @@ -1,30 +0,0 @@ -where([ - "conf_key" => $key, - "conf_readonly" => 0, - ])->update($data); - } -} diff --git a/app/model/Feedback.php b/app/model/Feedback.php deleted file mode 100644 index 01087ee..0000000 --- a/app/model/Feedback.php +++ /dev/null @@ -1,36 +0,0 @@ - 'integer', - ]; -} diff --git a/app/model/Group.php b/app/model/Group.php deleted file mode 100644 index 0724947..0000000 --- a/app/model/Group.php +++ /dev/null @@ -1,9 +0,0 @@ -page_size; - $query->page($pageNo, $pageSize); - } - - /** - * 排序搜索器 - * @access public - * @param object $query - * @param mixed $value - * @param mixed $data - */ - public function searchOrderAttr($query, $value, $data) - { - $order = []; - if (!empty($data['order_field']) || !empty($data['order_type'])) { - $order[$data['order_field']] = $data['order_type']; - } else { - $order = $this->defaultOrder; - } - if (!empty($this->fixedOrder)) { - // 固定排序必须在前,否则将导致自定义排序无法覆盖 - $order = array_merge($this->fixedOrder, $order); - if (!empty($data['order_field']) && $this->isReverse) { - $order = array_reverse($order); - } - } - if (!empty($order)) { - $query->order($order); - } - } - - /** - * 设置默认排序 - * @access public - * @param array $order 默认排序 - * @param array $fixed 固定排序 - * @param bool $reverse 是否调整顺序 - * @return $this - */ - public function setDefaultOrder(array $order, $fixed = [], $reverse = false) - { - $this->defaultOrder = $order; - $this->fixedOrder = $fixed; - $this->isReverse = $reverse; - return $this; - } - - /** - * 模型验证器 - * @access public - * @param array|object $data 验证数据 - * @param string|null $scene 场景名 - * @param bool $clean 是否清理规则键值不存在的$data - * @param string $validate 验证器规则或类 - * @return bool - */ - public function validateData(array &$data, $scene = null, $clean = false, $validate = '') - { - try { - // 确定规则来源 - if (empty($validate)) { - $class = '\\app\\validate\\' . $this->getName(); - if ($scene) { - $v = new $class(); - $v->extractScene($data, $scene, $clean, $this->getPk()); - } else { - $v = validate($class); - } - } else { - $v = validate($validate); - if ($scene) { - $v->extractScene($data, $scene, $clean, $this->getPk()); - } - } - - if ($clean) { - $keys = $v->getRuleKey(); - foreach ($data as $key => $value) { - if (!in_array($key, $keys, true)) { - unset($data[$key]); - } - } - - unset($key, $value); - } - - $v->failException(true)->check($data); - } catch (ValidateException $e) { - return $this->setError($e->getMessage()); - } - - return true; - } - - /** - * 检测是否存在相同值 - * @access public - * @param array $map 查询条件 - * @return bool false:不存在 - */ - public static function checkUnique(array $map) - { - if (empty($map)) { - return true; - } - - $count = self::where($map)->count(); - if (is_numeric($count) && $count <= 0) { - return false; - } - - return true; - } - - /** - * 后台使用分页获取数据 - * - * @param array 筛选数组 - * @param string 排序方式 - * @param string 搜索字段 - * @return void - */ - public function getListByPage($maps, $order = null, $field = "*") - { - $resource = $this->field($field); - foreach ($maps as $map) { - switch (count($map)) { - case 1: - $resource = $resource->where($map[0]); - break; - case 2: - $resource = $resource->where($map[0], $map[1]); - break; - case 3: - $resource = $resource->where($map[0], $map[1], $map[2]); - break; - default: - } - } - if ($order) { - $resource = $resource->order($order); - } - return $resource->paginate($this->per_page); - } - - - /** - * 替换数组中的驼峰键名为下划线 - * @access public - * @param array $name 需要修改的键名 - * @param array &$data 源数据 - */ - public static function keyToSnake(array $name, array &$data) - { - if (!is_array($name)) { - return; - } - - foreach ($name as $value) { - foreach ($data as &$item) { - if (!array_key_exists($value, $item)) { - continue; - } - - $temp = $item[$value]; - unset($item[$value]); - - $item[Str::snake($value)] = $temp; - } - } - } - - /** - * 将数组键名驼峰转下划线 - * @access public - * @param array $data 数据 - * @return array - */ - public static function snake(array $data) - { - if (empty($data)) { - return []; - } - - foreach ($data as $itemKey => $item) { - foreach ($item as $valueKey => $value) { - $data[$itemKey][Str::snake($valueKey)] = $value; - unset($data[$itemKey][$valueKey]); - } - } - - return $data; - } - -} diff --git a/app/model/Sms.php b/app/model/Sms.php deleted file mode 100644 index e215471..0000000 --- a/app/model/Sms.php +++ /dev/null @@ -1,133 +0,0 @@ - $smsData['qrcodeUrl'], - 'TermOfValidity' => "1-year", - ] - ]; - $urlHeader = array( - 'Content-Type: application/json; charset=UTF-8', - 'Dwz-Token: '.$baidu_token, - ); - $res = curlHelper("https://dwz.cn/api/v3/short-urls", "POST", json_encode($urlData,256), $urlHeader)['body']; - $res = json_decode($res, true); - if($res['Code'] != 0){ - return false; - } - - $smsData['qrcodeurl'] = $res['ShortUrls'][0]['ShortUrl']; - - $result = $this->sendSms($smsData); - if($result){ - return true; - }else{ - return false; - } - } - /** - * 发送短信(百度) - * - * @param string 手机号码 - * @param string 内容 - * @return void - */ - private function sendSms($smsData) - { - //初始化短信相关配置 - $sms_sign = config('qfshop.sms_sign'); - $sms_tmpl = config('qfshop.sms_tmpl_1'); - $error = null; - if (!($sms_sign && $sms_tmpl)) { - $error = jerr('请先在后台系统设置短信相关参数!'); - } - - require_once __DIR__ . "/../../extend/baidu/baidusmsv3.php"; - $config = array( - 'endPoint' => 'smsv3.bj.baidubce.com', - 'accessKey' => 'b71eab07ebcc4f09b3f770e43a9d126d', - 'secretAccessKey' => '3c6c8b3d85274baab4c38481996919ec', - ); - $smsClient = new \Baidusmsv3($config); - $message = array( - 'template' => $sms_tmpl, //短信模板ID - 'signatureId' => $sms_sign, //短信签名ID - 'mobile' => $smsData['mobile'], - "contentVar" => array( - 'param1' => '“'.$smsData['title'].'“', - 'param2' => $smsData['time'], - 'param3' => $smsData['address'], - 'param4' => '青峰网络', - 'param5' => $smsData['qrcodeurl'], - ), - ); - $result = $smsClient->sendMessage($message); - if($result['code'] == 1000){ - return true; - }else{ - return false; - } - - } - - - /** - * 发送短信验证码 - * - * @param string 手机号码 - * @return void - */ - public function sendSmsCode($mobile,$code) - { - //初始化短信相关配置 - $sms_sign = config('qfshop.sms_sign'); - $sms_tmpl = config('qfshop.sms_tmpl_2'); - $error = null; - if (!($sms_sign && $sms_tmpl)) { - $error = jerr('请先在后台系统设置短信相关参数!'); - } - - require_once __DIR__ . "/../../extend/baidu/baidusmsv3.php"; - $config = array( - 'endPoint' => 'smsv3.bj.baidubce.com', - 'accessKey' => 'b71eab07ebcc4f09b3f770e43a9d126d', - 'secretAccessKey' => '3c6c8b3d85274baab4c38481996919ec', - ); - $smsClient = new \Baidusmsv3($config); - $message = array( - 'template' => $sms_tmpl, //短信模板ID - 'signatureId' => $sms_sign, //短信签名ID - 'mobile' => $mobile, - "contentVar" => array( - 'code' => ''.$code, - 'time' => '5', - ), - ); - $result = $smsClient->sendMessage($message); - if($result['code'] == 1000){ - return true; - }else{ - return false; - } - } - -} diff --git a/app/model/Source.php b/app/model/Source.php deleted file mode 100644 index 5617050..0000000 --- a/app/model/Source.php +++ /dev/null @@ -1,203 +0,0 @@ - 'integer', - 'is_delete' => 'integer', - 'status' => 'integer', - 'time' => 'timestamp', - ]; - - /** - * hasOne qf_source_category - * @access public - * @return mixed - */ - public function category() - { - return $this - ->hasOne(SourceCategory::class, 'source_category_id', 'source_category_id') - ->joinType('left') - ->field('source_category_id,name'); - } - - - /** - * @description: 获取一个信息 - * @param {*} $code - * @return {*} - */ - public function getDetail(array $data) - { - $map[] = ['status', '=', 1]; - $map[] = ['is_delete', '=', 0]; - $map[] = ['source_id', '=', $data['id']]; - $field = 'source_id as id,source_category_id,title,url,update_time as time'; - $result = $this->with('category')->where($map)->field($field)->find(); - if(!is_null($result)){ - $result->inc('page_views')->update(); - } - $result['times'] = substr($result['time'], 0, 10); - unset($result['time']); - return $result; - } - - /** - * 获取列表 - * @access public - * @param array $data 外部数据 - * @return array|false - * @throws - */ - public function getList(array $data) - { - - // 搜索条件 - $map = []; - empty($data['title']) ?: $map[] = ['title', 'like', '%' . $data['title'] . '%']; - - $map[] = ['status', '=', 1]; - $map[] = ['is_time', '=', 0]; - - if(!empty($data['day']) && $data['day']==2){ - // 获取今天的时间戳范围 - $todayStart = strtotime(date('Y-m-d')); - $todayEnd = $todayStart + 86400; // 86400 秒 = 24 小时 - // 获取昨天的时间戳范围 - $yesterdayStart = $todayStart - 86400; - $yesterdayEnd = $todayStart; - // 添加日期范围条件 - $map[] = ['create_time', 'between', [$yesterdayStart, $todayEnd]]; - } - - if(!empty($data['is_time']) && $data['is_time']==1){ - unset($map[array_search(['is_time', '=', 0], $map)]); - } - - if(!empty($data['category_id'])){ - $map[] = ['source_category_id', '=', $data['category_id']]; - } - - $result['total_result'] = $this->where($map)->count(); - if ($result['total_result'] <= 0) { - return $result; - } - - $order = ['source_id' => 'desc']; - if(!empty($data['type']) && $data['type']==2){ - $order = ['source_id' => 'asc']; - } - - $result['items'] = $this->setDefaultOrder($order) - ->field('source_id as id,source_category_id,title,url,update_time as time,is_time') - ->with('category') - ->where($map) - ->withSearch(['page', 'order'], $data) - ->select()->each(function($item,$key){ - $item['times'] = substr($item['time'], 0, 10); - unset($item['time']); - return $item; - }) - ->toArray(); - return $result; - } - - /** - * 获取最新 - * @access public - * @param array $data 外部数据 - * @return array|false - * @throws - */ - public function getNew(array $data) - { - - // 搜索条件 - $map = []; - - $map[] = ['status', '=', 1]; - $map[] = ['is_time', '=', 0]; - - $result['total_result'] = $this->where($map)->count(); - if ($result['total_result'] <= 0) { - return $result; - } - - $result['items'] = $this->setDefaultOrder(['update_time' => 'desc']) - ->field('title,update_time as time') - ->where($map) - ->withSearch(['page', 'order'], $data) - ->select()->each(function($item,$key){ - $item['times'] = substr($item['time'], 5, 5); - unset($item['time']); - return $item; - }) - ->toArray(); - return $result; - } - - - /** - * 获取最热 - * @access public - * @param array $data 外部数据 - * @return array|false - * @throws - */ - public function getHot(array $data) - { - // 搜索条件 - $map = []; - - $map[] = ['status', '=', 1]; - $map[] = ['is_time', '=', 0]; - - $result['total_result'] = $this->where($map)->count(); - if ($result['total_result'] <= 0) { - return $result; - } - - $result['items'] = $this->setDefaultOrder(['page_views' => 'desc']) - ->field('title,update_time as time') - ->where($map) - ->withSearch(['page', 'order'], $data) - ->select()->each(function($item,$key){ - $item['times'] = substr($item['time'], 5, 5); - unset($item['time']); - return $item; - }) - ->toArray(); - return $result; - } - - -} diff --git a/app/model/SourceCategory.php b/app/model/SourceCategory.php deleted file mode 100644 index 073f9d0..0000000 --- a/app/model/SourceCategory.php +++ /dev/null @@ -1,25 +0,0 @@ -where($map)->order('sort', 'desc')->select(); - return $result; - } -} diff --git a/app/model/SourceLog.php b/app/model/SourceLog.php deleted file mode 100644 index 7fc67b9..0000000 --- a/app/model/SourceLog.php +++ /dev/null @@ -1,79 +0,0 @@ - 'integer', - 'end_time' => 'timestamp', - ]; - - public function addLog($name="任务名称",$total_num=0) - { - try { - $Log = [ - 'name' => $name, - 'total_num' => $total_num, - 'create_time' => time(), - 'update_time' => time(), - ]; - $logId = $this->insertGetId($Log); - return $logId; - } catch (\Throwable $th) { - //throw $th; - } - } - - public function editLog($source_log_id,$total_num,$edit_name,$fail_dec='',$type=0) - { - try { - $data = []; - $data['total_num'] = $total_num; - if(!empty($fail_dec)){ - $data['fail_dec'] = $fail_dec; - } - $data['update_time'] = time(); - if($type==3){ - $this->where('source_log_id', $source_log_id) - ->update(['end_time' => time()]); - }else{ - if($type==1){ - $data['end_time'] = time(); - } - $this->where('source_log_id', $source_log_id) - ->inc($edit_name) - ->update($data); - } - } catch (\Throwable $th) { - //throw $th; - } - - } -} diff --git a/app/model/Token.php b/app/model/Token.php deleted file mode 100644 index 946ebe9..0000000 --- a/app/model/Token.php +++ /dev/null @@ -1,83 +0,0 @@ -where([ - "user_id" => $user_id, - "platform" => $platform - ])->find(); - //生成一个新的Access_token - $access_token = sha1(time()) . rand(100000, 99999) . sha1(time()); - $expires = time() + (30 * 24 * 60 * 60); // 30天 - if($token){ - //如果已有token 执行更新 - $token_id = $token['token_id']; - $this->where('token_id',$token_id)->update([ - "token" => $access_token, - "ip" => request()->ip(), - "token_expires" => $expires, - "create_time" => time(), - ]); - }else{ - //如果没有token 执行新增 - $token_id = $this->insertGetId([ - "user_id" => $user_id, - "platform" => $platform, - "token" => $access_token, - "ip" => request()->ip(), - "token_expires" => $expires, - "create_time" => time(), - ]); - } - $access = $this->where("token_id", $token_id)->find(); - return $access ?? false; - } - - /** - * 授权校验 - * - * @param string token - * @return void - * 校验成功 更新授权码过期时间 - */ - public function getToken($access_token) - { - $token = $this->where([ - "token" => $access_token - ])->find(); - if ($token) { - if (time() > $token['token_expires']) { - return false; - } - $expires = time() + (30 * 24 * 60 * 60); // 30天 - $this->where([ - "token_id" => $token['token_id'], - ])->update([ - 'token_expires' => $expires - ]); - $user = User::field("user_id,status,mobile")->where(["user_id" => $token['user_id'],"is_delete" => 0])->find(); - if(!$user){ - return jerr("账号不存在"); - } - if ($user['status'] == 0) { - return jerr("你的账户被禁用"); - } - return $user; - } else { - return false; - } - } -} diff --git a/app/model/User.php b/app/model/User.php deleted file mode 100644 index dcc4c27..0000000 --- a/app/model/User.php +++ /dev/null @@ -1,9 +0,0 @@ -font = $_SERVER['DOCUMENT_ROOT'] . '/static/admin/css/fonts/code.ttc'; - } - - //生成随机码 - private function createCode() - { - $_len = strlen($this->charset) - 1; - for ($i = 0; $i < $this->codelen; $i++) { - $this->code .= $this->charset[mt_rand(0, $_len)]; - } - } - - //生成背景 - private function createBg() - { - $this->img = imagecreatetruecolor($this->width, $this->height); - $color = imagecolorallocate($this->img, mt_rand(157, 255), mt_rand(157, 255), mt_rand(157, 255)); - imagefilledrectangle($this->img, 0, $this->height, $this->width, 0, $color); - } - - //生成文字 - private function createFont() - { - $_x = $this->width / $this->codelen; - for ($i = 0; $i < $this->codelen; $i++) { - $this->fontcolor = imagecolorallocate($this->img, mt_rand(0, 156), mt_rand(0, 156), mt_rand(0, 156)); - imagettftext($this->img, $this->fontsize, mt_rand(-30, 30), $_x * $i + mt_rand(1, 5), $this->height / 1.4, $this->fontcolor, $this->font, $this->code[$i]); - } - } - - //生成线条、雪花 - private function createLine() - { - for ($i = 0; $i < 6; $i++) { - $color = imagecolorallocate($this->img, mt_rand(0, 156), mt_rand(0, 156), mt_rand(0, 156)); - imageline($this->img, mt_rand(0, $this->width), mt_rand(0, $this->height), mt_rand(0, $this->width), mt_rand(0, $this->height), $color); - } - for ($i = 0; $i < 100; $i++) { - $color = imagecolorallocate($this->img, mt_rand(200, 255), mt_rand(200, 255), mt_rand(200, 255)); - imagestring($this->img, mt_rand(1, 5), mt_rand(0, $this->width), mt_rand(0, $this->height), '*', $color); - } - } - - //对外生成 - public function getImg() - { - $this->createBg(); - $this->createCode(); - $this->createLine(); - $this->createFont(); - imagepng($this->img); - $image_data = ob_get_contents(); - ob_end_clean(); - imagedestroy($this->img); - return "data:image/png;base64," . base64_encode($image_data); - } - - //获取验证码 - public function getCode() - { - return strtolower($this->code); - } - /** - * 验证图形验证码 - * - * @return void - */ - public function validateImgCode($token, $code) - { - if (!$token) { - return jerr("TOKEN参数丢失"); - } - if (!$code) { - return jerr("请输入验证码"); - } - $code = strtoupper($code); - $token = $token; - $_code = cache($token); - if (!$_code) { - return jerr("验证码已过期"); - } - if ($code != $_code) { - return jerr('验证码错误'); - } - // 删除设置的缓存 - cache($token, null); - return null; - } -} diff --git a/app/pages/error.php b/app/pages/error.php deleted file mode 100644 index eea08dd..0000000 --- a/app/pages/error.php +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - - 系统错误 - - - - - -
-
-
-
-

系统发生错误:

-

虽然不知道错在哪,但是确实出了点小问题...

-
-
- -
- - - - - - \ No newline at end of file diff --git a/app/pages/exception.php b/app/pages/exception.php deleted file mode 100644 index e4f0a1b..0000000 --- a/app/pages/exception.php +++ /dev/null @@ -1,585 +0,0 @@ -' . end($names) . ''; - } -} - -if (!function_exists('parse_file')) { - function parse_file($file, $line) - { - return '' . basename($file) . " line {$line}" . ''; - } -} - -if (!function_exists('parse_args')) { - function parse_args($args) - { - $result = []; - foreach ($args as $key => $item) { - switch (true) { - case is_object($item): - $value = sprintf('object(%s)', parse_class(get_class($item))); - break; - case is_array($item): - if (count($item) > 3) { - $value = sprintf('[%s, ...]', parse_args(array_slice($item, 0, 3))); - } else { - $value = sprintf('[%s]', parse_args($item)); - } - break; - case is_string($item): - if (strlen($item) > 20) { - $value = sprintf( - '\'%s...\'', - htmlentities($item), - htmlentities(substr($item, 0, 20)) - ); - } else { - $value = sprintf("'%s'", htmlentities($item)); - } - break; - case is_int($item): - case is_float($item): - $value = $item; - break; - case is_null($item): - $value = 'null'; - break; - case is_bool($item): - $value = '' . ($item ? 'true' : 'false') . ''; - break; - case is_resource($item): - $value = 'resource'; - break; - default: - $value = htmlentities(str_replace("\n", '', var_export(strval($item), true))); - break; - } - - $result[] = is_int($key) ? $value : "'{$key}' => {$value}"; - } - - return implode(', ', $result); - } -} -if (!function_exists('echo_value')) { - function echo_value($val) - { - if (is_array($val) || is_object($val)) { - echo htmlentities(json_encode($val, JSON_PRETTY_PRINT)); - } elseif (is_bool($val)) { - echo $val ? 'true' : 'false'; - } elseif (is_scalar($val)) { - echo htmlentities($val); - } else { - echo 'Resource'; - } - } -} -?> - - - - - - 系统发生错误 - - - - - - - $trace) { ?> -
-
-
-
-

-
-
-

-
-
-
- -
-
    $value) { ?>
  1. ">
-
- -
-

Call Stack

-
    -
  1. - -
  2. - -
  3. - -
-
-
- - -
-
-

-
-
- - - -
-

Exception Datas

- $value) { ?> - - - - - - - $val) { ?> - - - - - - - -
empty
- -
- - - -
-

Environment Variables

- $value) { ?> - - - - - - - $val) { ?> - - - - - - - -
empty
- -
- - - - - - - \ No newline at end of file diff --git a/app/pages/success.php b/app/pages/success.php deleted file mode 100644 index b38d85f..0000000 --- a/app/pages/success.php +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - 系统操作成功 - - - - - -
-
-
-
-

系统操作成功:

-

-
-
- -
- - - - - - \ No newline at end of file diff --git a/app/provider.php b/app/provider.php deleted file mode 100644 index 73d99fa..0000000 --- a/app/provider.php +++ /dev/null @@ -1,9 +0,0 @@ - Request::class, - 'think\exception\Handle' => ExceptionHandle::class, -]; diff --git a/app/qfadmin/QfShop.php b/app/qfadmin/QfShop.php deleted file mode 100644 index 11ea2b0..0000000 --- a/app/qfadmin/QfShop.php +++ /dev/null @@ -1,162 +0,0 @@ -app = $app; - $this->request = $this->app->request; - - // 控制器初始化 - $this->initialize(); - } - - // 初始化 - protected function initialize() - { - $this->module = "qfadmin"; - $this->controller = $this->request->controller() ? $this->request->controller() : "Index"; - $this->action = strtolower($this->request->action()) ? strtolower($this->request->action()) : "index"; - View::assign('controller', strtolower($this->controller)); - View::assign('action', strtolower($this->action)); - - $this->table = strtolower($this->controller); - $this->pk = $this->table . "_id"; - $this->pk_value = input($this->pk); - - $this->adminModel = new AdminModel(); - $this->accessModel = new AccessModel(); - $this->authModel = new AuthModel(); - $this->nodeModel = new NodeModel(); - $this->groupModel = new GroupModel(); - $this->confModel = new ConfModel(); - - - $configs = $this->confModel->select()->toArray(); - $c = []; - foreach ($configs as $config) { - $c[$config['conf_key']] = $config['conf_value']; - } - config($c, 'yadmin'); - } - /** - * 后台简单的身份判断 - * - * @return void - */ - protected function access() - { - $callback = "/qfadmin"; - if (strtolower($this->controller) != "index") { - $callback .= "/" . strtolower($this->controller); - } - if ($this->action != "index") { - $callback .= "/" . $this->action; - } - $access_token = cookie('access_token'); - if (!$access_token) { - return redirect('/qfadmin/admin/login/?callback=' . urlencode($callback)); - } - View::assign("access_token", $access_token); - $this->admin = $this->adminModel->getAdminByAccessToken($access_token); - if (!$this->admin) { - return redirect('/qfadmin/admin/login/?callback=' . urlencode($callback)); - } - if ($this->admin['admin_status'] > 0) { - return $this->error("抱歉,你的帐号已被禁用,暂时无法登录系统!"); - } - cookie("access_token", $access_token); - View::assign('adminInfo', $this->admin); - $this->group = $this->groupModel->where('group_id', $this->admin['admin_group'])->find(); - if ($this->group) { - if ($this->group['group_id'] != 1 && $this->group['group_status'] == 1) { - return $this->error("抱歉,你所在的用户组已被禁用,暂时无法登录系统"); - } else { - $menuList = $this->authModel->getAdminMenuListByAdminId($this->group['group_id']); - View::assign('menuList', $menuList); - - $node = $this->nodeModel->where(['node_module' => $this->module, 'node_controller' => strtolower($this->controller), 'node_action' => $this->action])->find(); - View::assign('node', $node); - - if($node['node_pid']==0){ - View::assign('menu', 0); - }else{ - $res = $this->nodeModel->where('node_id',$node['node_pid'])->find(); - View::assign('menu', $res['node_pid']); - } - $menuLists = []; - foreach ($menuList as $key => $value) { - if($value['node_id'] == $node['node_pid']){ - $menuLists = $value['subList']; - }else{ - foreach ($value['subList'] as $k => $v) { - if($v['node_id'] == $node['node_pid']){ - $menuLists = $value['subList']; - } - } - } - } - View::assign('menuLists', $menuLists); - View::assign('action', $this->request->action()); - } - } else { - return $this->error("抱歉,没有查到你的用户组信息,暂时无法登录系统"); - } - } - protected function error($message) - { - echo $message; - die; - } -} diff --git a/app/qfadmin/controller/Error.php b/app/qfadmin/controller/Error.php deleted file mode 100644 index 1cab2c0..0000000 --- a/app/qfadmin/controller/Error.php +++ /dev/null @@ -1,33 +0,0 @@ -controller) == "admin" && in_array(strtolower($this->action), ['login', 'resetpassword', 'reg']))) { - $error = $this->access(); - if ($error) { - return $error; - } - }else{ - cookie('access_token', null); - } - if (key_exists('callback', $args)) { - View::assign('callback', $args['callback']); - } else { - View::assign('callback', '/qfadmin'); - } - View::assign('datas', $args); - return View::fetch(); - } -} diff --git a/app/qfadmin/view/admin/index.html b/app/qfadmin/view/admin/index.html deleted file mode 100644 index 22305f4..0000000 --- a/app/qfadmin/view/admin/index.html +++ /dev/null @@ -1,449 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - - - - 添加 - - - 批量删除 - -
- - - - - - - - - - - - - - - - - - - - - - - - - 搜索 - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/admin/login.html b/app/qfadmin/view/admin/login.html deleted file mode 100644 index 3c141f6..0000000 --- a/app/qfadmin/view/admin/login.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - 后台管理系统 - - - - - - - - -
-
- -
-
- - - - - - - - \ No newline at end of file diff --git a/app/qfadmin/view/admin/motifypassword.html b/app/qfadmin/view/admin/motifypassword.html deleted file mode 100644 index 8c2b5ff..0000000 --- a/app/qfadmin/view/admin/motifypassword.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - -
- 修改我的密码 -
-
- - - - - - - - - - - - - 修改密码 - - -
-
- {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/admin/updatemyinfo.html b/app/qfadmin/view/admin/updatemyinfo.html deleted file mode 100644 index a1ef91d..0000000 --- a/app/qfadmin/view/admin/updatemyinfo.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - -
- 修改我的资料 -
-
- - - - - - - - - - - - - - - 更新资料 - - -
-
- {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/attach/index.html b/app/qfadmin/view/attach/index.html deleted file mode 100644 index 94cb424..0000000 --- a/app/qfadmin/view/attach/index.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - - - - 上传图片 - - - - 批量删除 - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/common/footer.html b/app/qfadmin/view/common/footer.html deleted file mode 100644 index 970c997..0000000 --- a/app/qfadmin/view/common/footer.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - -{include file="component/view"/} - - - - - - - - - - - diff --git a/app/qfadmin/view/common/header.html b/app/qfadmin/view/common/header.html deleted file mode 100644 index 75a3b13..0000000 --- a/app/qfadmin/view/common/header.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - -
- - - - - {volist name="menuList" id="item"} - {if condition="count($item.subList)>0"} - {if condition="count($item.subList[0]['subList'])>0"} - - {$item.node_title} - - {else} - - {$item.node_title} - - {/if} - {else} - {if condition="count($item.subList)>0 || $item.node_controller=='index'"} - - {$item.node_title} - - {/if} - {/if} - {/volist} - - - - - - - - -  {$adminInfo['admin_name']} - - 修改资料 - - 修改密码 - - 清除缓存 - - 退出登录 - - - - - - - {include file="common/menu"/} - \ No newline at end of file diff --git a/app/qfadmin/view/common/meeting_header.html b/app/qfadmin/view/common/meeting_header.html deleted file mode 100644 index 50ffd80..0000000 --- a/app/qfadmin/view/common/meeting_header.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - -
- - - - - - 客户管理 - - - 团队管理 - - - 会务人员管理 - - - - - - - - - -  {$adminInfo['admin_name']} - - 退出登录 - - - - - - - {include file="common/menu"/} - \ No newline at end of file diff --git a/app/qfadmin/view/common/menu.html b/app/qfadmin/view/common/menu.html deleted file mode 100644 index 4602037..0000000 --- a/app/qfadmin/view/common/menu.html +++ /dev/null @@ -1,44 +0,0 @@ -{if condition="$menuLists"} - - - - {volist name="menuLists" id="item"} - {if condition="count($item.subList)>0"} - - - {volist name="$item.subList" id="subItem"} - {$subItem.node_title} - {/volist} - - {else} - {if condition="$item.node_controller=='' && $item.node_action==''"} - - - {$item.node_title} - - {else} - - - {$item.node_title} - - {/if} - {/if} - {/volist} -
-
-
资源管理系统
Version 1.0.0
-
-{else} -
- -
-{/if} diff --git a/app/qfadmin/view/component/view.html b/app/qfadmin/view/component/view.html deleted file mode 100644 index 6bcd689..0000000 --- a/app/qfadmin/view/component/view.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/app/qfadmin/view/conf/base.html b/app/qfadmin/view/conf/base.html deleted file mode 100644 index bc53cb4..0000000 --- a/app/qfadmin/view/conf/base.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - {$node.node_title} - {include file="common/header"/} - - - -
- - - - - - - - {{val.name}} - - - - {{val.name}} - - - - - - - - - - - - - - -  最多上传10张 - - - - 保存配置 - - -
-
-
- -
- {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/conf/index.html b/app/qfadmin/view/conf/index.html deleted file mode 100644 index 389c68e..0000000 --- a/app/qfadmin/view/conf/index.html +++ /dev/null @@ -1,467 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - - - - 添加 - -
- - - - - - - - - - - - - - - 搜索 - -
-
- - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - 参数名称,如:网站LOGO - - - - 参数字段,如:logo - - - - 参数描述,如:建议尺寸: 300*300 - - - - 文本框 - 多行文本框 - 单选框 - 多选框 - 单图 - 多图 - 富文本 - - - - - - - - - - - -
开启后,添加的参数将无法删除
-
-
- -
- - - - - - - - - - - - - - - - - - - - - - 参数名称,如:网站LOGO - - - - 参数字段,切勿随意修改 - - - - 参数描述,如:建议尺寸: 300*300 - - - - 文本框 - 多行文本框 - 单选框 - 多选框 - 单图 - 多图 - 富文本 - - - - - - - - - - - - - - {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/group/index.html b/app/qfadmin/view/group/index.html deleted file mode 100644 index 03f8092..0000000 --- a/app/qfadmin/view/group/index.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - - - - 添加 - - - 批量删除 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- - {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/index/index.html b/app/qfadmin/view/index/index.html deleted file mode 100644 index 2a6aae8..0000000 --- a/app/qfadmin/view/index/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - 后台管理系统 - {include file="common/header"/} -
-
- -

@资源管理系统

-
-
- {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/node/index.html b/app/qfadmin/view/node/index.html deleted file mode 100644 index e11c3ed..0000000 --- a/app/qfadmin/view/node/index.html +++ /dev/null @@ -1,462 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - - - - 添加 - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - 搜索 - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/source/category.html b/app/qfadmin/view/source/category.html deleted file mode 100644 index e8b3f73..0000000 --- a/app/qfadmin/view/source/category.html +++ /dev/null @@ -1,279 +0,0 @@ - - - - - 资源分类 - {include file="common/header"/} - - - 添加 - - - 批量删除 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/source/deposit.html b/app/qfadmin/view/source/deposit.html deleted file mode 100644 index 78bda6e..0000000 --- a/app/qfadmin/view/source/deposit.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - -
- 目前仅支持夸克 -
-
- -
- 设置夸克cookie -
-
- - - - - - 保存 - - -

Tips:夸克云盘网页版的cookie,不懂如何获取请百度;填写并保存后才能使用下面功能

-
-
-
- -
- 一键转存他人链接 -
-
- 简单理解就是将别人的资源分享转成自己的并添加该资源到系统中 -

功能说明:

-

1、转存短剧资源到自己的网盘

-

2、生成自己的分享链接

-

3、将分享链接添加到该系统资源管理中

-

Tips:该功能仅支持单条操作;资源标题重复的会跳过;复制他人分享的网盘链接,如:https://pan.quark.cn/s/fb8402aed9c4

-
- 立即转存 -
-
- -
- 每日自动更新 -
-
-

自动更新:转存当日及昨天的资源数据;

- 将此接口添加到计划任务中,计划任务每2个小时执行一次即可;接口地址:https://你的域名/api/source/day -

Tips:添加计划任务后方可生效;名称重复的资源会跳过转存;

-
-
-
- -
- 转存心悦搜剧资源 -
-
-

全部转存:一键转存心悦搜剧所有资源到自己的网盘及系统中

- 全部转存速度比较慢,提交后请耐心等待;名称重复的资源会跳过转存; -

Tips:心悦搜剧:https://pan.xinyuedh.com;

-
- 全部转存 -
- -
-
- {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/source/feedback.html b/app/qfadmin/view/source/feedback.html deleted file mode 100644 index 027f9c0..0000000 --- a/app/qfadmin/view/source/feedback.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - - - - - - - - - - - -
- - -
- - {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/source/index.html b/app/qfadmin/view/source/index.html deleted file mode 100644 index 35252b1..0000000 --- a/app/qfadmin/view/source/index.html +++ /dev/null @@ -1,417 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - - - - 添加资源 - 导入资源 - 导出资源 - -
- - - - - - - - - - - 搜索 - - 重置 - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
将文件拖到此处,或点击上传
-
- 请导入夸克官方导出的csv文件 -
-
- -
- - {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/source/log.html b/app/qfadmin/view/source/log.html deleted file mode 100644 index e456512..0000000 --- a/app/qfadmin/view/source/log.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - - - - - - - - - - - - - - - - - - - - - -
- - -
- - {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/qfadmin/view/system/clean.html b/app/qfadmin/view/system/clean.html deleted file mode 100644 index 8781f97..0000000 --- a/app/qfadmin/view/system/clean.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - {$node.node_title} - {include file="common/header"/} - -
- 系统数据清理 -
-
- - -
- 清除缓存 -
-
- 清除缓存 - 不可逆操作 -
- 清除缓存 -
-
-
- {include file="common/footer"/} - - - - \ No newline at end of file diff --git a/app/service.php b/app/service.php deleted file mode 100644 index db1ee6a..0000000 --- a/app/service.php +++ /dev/null @@ -1,9 +0,0 @@ -field[$field]) ? $this->field[$field] : $field; - } - - /** - * 获取规则全部键名 - * @access public - * @return array - */ - public function getRuleKey() - { - return array_keys($this->rule); - } - - /** - * 提取场景字段载入到规则 - * @access public - * @param array $data 验证数据 - * @param string $name 场景名 - * @param bool $clean 当需要清理$data时场景过滤启用 - * @param string $pk 模型主键 - * @throws \Exception - */ - public function extractScene(array $data, string $name, bool $clean, string $pk) - { - // 为了兼容数组格式的场景验证,不对函数式场景做检测 - if (!isset($this->scene[$name])) { - throw new \Exception('验证规则场景 ' . $name . ' 不存在'); - } - - $rule = []; - $scene = $this->scene[$name]; - - foreach ($scene as $key => $value) { - $sceneKey = is_numeric($key) ? $value : $key; - if ($clean && $sceneKey != $pk) { - if (!array_key_exists($sceneKey, $data)) { - continue; - } - } - - if (is_numeric($key)) { - $rule[$value] = $this->rule[$value]; - } else { - $rule[$key] = $value; - } - } - - $this->rule = $rule; - } - - /** - * 日期是否在合理范围内 - * @access public - * @param array $args 参数 - * @return bool - */ - public function betweenTime(...$args) - { - if (strtotime($args[0]) >= 0 && strtotime($args[0]) <= 2147483647) { - return true; - } - - return $args[4] . '不在合理日期范围内'; - } - - /** - * 某个字段的值是否小于某个字段(日期) - * @access public - * @param array $args 参数 - * @return bool - */ - public function beforeTime(...$args) - { - if (!isset($args[2][$args[1]])) { - return $this->getField($args[1]) . '不能为空'; - } - - if (strtotime($args[0]) <= strtotime($args[2][$args[1]])) { - return true; - } - - return $args[4] . '不能大于 ' . $this->getField($args[1]); - } - - /** - * 某个字段的值是否大于某个字段(日期) - * @access public - * @param array $args 参数 - * @return bool - */ - public function afterTime(...$args) - { - if (!isset($args[2][$args[1]])) { - return $this->getField($args[1]) . '不能为空'; - } - - if (strtotime($args[0]) >= strtotime($args[2][$args[1]])) { - return true; - } - - return $args[4] . '不能小于 ' . $this->getField($args[1]); - } - - /** - * 检测数组内所有键值是否都为int - * @access public - * @param array $args 参数 - * @return bool - */ - public function arrayHasOnlyInts(...$args) - { - if (!is_array($args[0])) { - return $args[4] . '必须是数组'; - } - - $isZero = 'zero' == $args[1]; // 允许存在小于等于0的整数 - if ($args[0] === array_filter($args[0], function ($value) use ($isZero) { - if ($this->filter($value, FILTER_VALIDATE_INT)) { - if (false == $isZero && $value <= 0) { - return false; - } - - return true; - } - - return false; - }) - ) { - return true; - } - - return $args[4] . ($isZero ? '内的键值必须是合法的整数' : '内的键值必须是大于零的整数'); - } - - /** - * 检测数组内所有键值是否都为string - * @access public - * @param array $args 参数 - * @return bool - */ - public function arrayHasOnlyStrings(...$args) - { - if (!is_array($args[0])) { - return $args[4] . '必须是数组'; - } - - if ($args[0] === array_filter($args[0], function ($value) { - return is_string($value); - }) - ) { - return true; - } - - return $args[4] . '内的键值必须是字符串'; - } - - /** - * 验证模块是否在指定范围内 - * @access public - * @param array $args 参数 - * @return bool - */ - public function checkModule(...$args) - { - $moduleList = config('extra.module_group'); - if (!isset($moduleList[$args[0]])) { - return sprintf('%s必须在 %s 范围内', $args[4], implode(',', array_keys($moduleList))); - } - - return true; - } -} diff --git a/composer.json b/composer.json deleted file mode 100644 index faa3854..0000000 --- a/composer.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "hamm/y-admin", - "description": "Fast build your php project", - "type": "project", - "keywords": [ - "YAdmin" - ], - "homepage": "https://www.baidu.com/", - "license": "Apache-2.0", - "authors": [ - { - "name": "", - "email": "admin@qq.cn" - } - ], - "require": { - "php": ">=7.1.0", - "topthink/framework": "^6.0.0", - "topthink/think-orm": "^2.0", - "topthink/think-multi-app": "^1.0", - "topthink/think-view": "^1.0", - "alibabacloud/client": "^1.5", - "phpoffice/phpexcel": "^1.8", - "overtrue/wechat": "~4.0", - "jaeger/querylist": "^4.2", - "topthink/think-queue": "3.0", - "topthink/think-filesystem": "1.0.1" - }, - "require-dev": { - "symfony/var-dumper": "^4.2", - "topthink/think-trace": "^1.0" - }, - "autoload": { - "psr-4": { - "app\\": "app" - }, - "psr-0": { - "": "extend/" - } - }, - "config": { - "preferred-install": "dist", - "allow-plugins": { - "easywechat-composer/easywechat-composer": true - } - }, - "scripts": { - "post-autoload-dump": [ - "@php think service:discover", - "@php think vendor:publish" - ] - } -} diff --git a/composer.lock b/composer.lock deleted file mode 100644 index e2db277..0000000 --- a/composer.lock +++ /dev/null @@ -1,4147 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "1346841c35ed676c7f6819ff68f05fc1", - "packages": [ - { - "name": "adbario/php-dot-notation", - "version": "2.5.0", - "source": { - "type": "git", - "url": "https://github.com/adbario/php-dot-notation.git", - "reference": "081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae", - "reference": "081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^5.5 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8|^5.7|^6.6|^7.5|^8.5|^9.5", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Adbar\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Riku Särkinen", - "email": "riku@adbar.io" - } - ], - "description": "PHP dot notation access to arrays", - "homepage": "https://github.com/adbario/php-dot-notation", - "keywords": [ - "ArrayAccess", - "dotnotation" - ], - "support": { - "issues": "https://github.com/adbario/php-dot-notation/issues", - "source": "https://github.com/adbario/php-dot-notation/tree/2.5.0" - }, - "time": "2022-10-14T20:31:46+00:00" - }, - { - "name": "alibabacloud/client", - "version": "1.5.32", - "source": { - "type": "git", - "url": "https://github.com/aliyun/openapi-sdk-php-client.git", - "reference": "5bc6f6d660797dcee2c3aef29700ab41ee764f4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/aliyun/openapi-sdk-php-client/zipball/5bc6f6d660797dcee2c3aef29700ab41ee764f4d", - "reference": "5bc6f6d660797dcee2c3aef29700ab41ee764f4d", - "shasum": "" - }, - "require": { - "adbario/php-dot-notation": "^2.4.1", - "clagiordano/weblibs-configmanager": "^1.0", - "ext-curl": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-openssl": "*", - "ext-simplexml": "*", - "ext-xmlwriter": "*", - "guzzlehttp/guzzle": "^6.3|^7.0", - "mtdowling/jmespath.php": "^2.5", - "php": ">=5.5" - }, - "require-dev": { - "composer/composer": "^1.8", - "drupal/coder": "^8.3", - "ext-dom": "*", - "ext-pcre": "*", - "ext-sockets": "*", - "ext-spl": "*", - "league/climate": "^3.2.4", - "mikey179/vfsstream": "^1.6", - "monolog/monolog": "^1.24", - "phpunit/phpunit": "^5.7|^6.6|^7.5|^8.5|^9.5", - "psr/cache": "^1.0", - "symfony/dotenv": "^3.4", - "symfony/var-dumper": "^3.4" - }, - "suggest": { - "ext-sockets": "To use client-side monitoring" - }, - "type": "library", - "autoload": { - "files": [ - "src/Functions.php" - ], - "psr-4": { - "AlibabaCloud\\Client\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Alibaba Cloud SDK", - "email": "sdk-team@alibabacloud.com", - "homepage": "http://www.alibabacloud.com" - } - ], - "description": "Alibaba Cloud Client for PHP - Use Alibaba Cloud in your PHP project", - "homepage": "https://www.alibabacloud.com/", - "keywords": [ - "alibaba", - "alibabacloud", - "aliyun", - "client", - "cloud", - "library", - "sdk", - "tool" - ], - "support": { - "issues": "https://github.com/aliyun/openapi-sdk-php-client/issues", - "source": "https://github.com/aliyun/openapi-sdk-php-client" - }, - "time": "2022-12-09T04:05:55+00:00" - }, - { - "name": "cache/adapter-common", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/adapter-common.git", - "reference": "6b87c5cbdf03be42437b595dbe5de8e97cd1d497" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/adapter-common/zipball/6b87c5cbdf03be42437b595dbe5de8e97cd1d497", - "reference": "6b87c5cbdf03be42437b595dbe5de8e97cd1d497", - "shasum": "" - }, - "require": { - "cache/tag-interop": "^1.0", - "php": "^5.6 || ^7.0 || ^8.0", - "psr/cache": "^1.0", - "psr/log": "^1.0", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "cache/integration-tests": "^0.16", - "phpunit/phpunit": "^5.7.21" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\Adapter\\Common\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "Common classes for PSR-6 adapters", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr-6", - "tag" - ], - "support": { - "source": "https://github.com/php-cache/adapter-common/tree/1.2.0" - }, - "time": "2020-12-14T12:17:39+00:00" - }, - { - "name": "cache/filesystem-adapter", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/filesystem-adapter.git", - "reference": "1501ca71502f45114844824209e6a41d87afb221" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/filesystem-adapter/zipball/1501ca71502f45114844824209e6a41d87afb221", - "reference": "1501ca71502f45114844824209e6a41d87afb221", - "shasum": "" - }, - "require": { - "cache/adapter-common": "^1.0", - "league/flysystem": "^1.0", - "php": "^5.6 || ^7.0 || ^8.0", - "psr/cache": "^1.0", - "psr/simple-cache": "^1.0" - }, - "provide": { - "psr/cache-implementation": "^1.0", - "psr/simple-cache-implementation": "^1.0" - }, - "require-dev": { - "cache/integration-tests": "^0.16", - "phpunit/phpunit": "^5.7.21" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\Adapter\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Aaron Scherer", - "email": "aequasi@gmail.com", - "homepage": "https://github.com/aequasi" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - } - ], - "description": "A PSR-6 cache implementation using filesystem. This implementation supports tags", - "homepage": "http://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "filesystem", - "psr-6", - "tag" - ], - "support": { - "source": "https://github.com/php-cache/filesystem-adapter/tree/1.1.0" - }, - "time": "2020-12-14T12:17:39+00:00" - }, - { - "name": "cache/tag-interop", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-cache/tag-interop.git", - "reference": "b062b1d735357da50edf8387f7a8696f3027d328" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-cache/tag-interop/zipball/b062b1d735357da50edf8387f7a8696f3027d328", - "reference": "b062b1d735357da50edf8387f7a8696f3027d328", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0 || ^8.0", - "psr/cache": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Cache\\TagInterop\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/nyholm" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com", - "homepage": "https://github.com/nicolas-grekas" - } - ], - "description": "Framework interoperable interfaces for tags", - "homepage": "https://www.php-cache.com/en/latest/", - "keywords": [ - "cache", - "psr", - "psr6", - "tag" - ], - "support": { - "issues": "https://github.com/php-cache/tag-interop/issues", - "source": "https://github.com/php-cache/tag-interop/tree/1.1.0" - }, - "time": "2021-12-31T10:03:23+00:00" - }, - { - "name": "carbonphp/carbon-doctrine-types", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", - "reference": "3c430083d0b41ceed84ecccf9dac613241d7305d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/3c430083d0b41ceed84ecccf9dac613241d7305d", - "reference": "3c430083d0b41ceed84ecccf9dac613241d7305d", - "shasum": "" - }, - "require": { - "php": "^7.1.8 || ^8.0" - }, - "conflict": { - "doctrine/dbal": ">=3.7.0" - }, - "require-dev": { - "doctrine/dbal": ">=2.0.0", - "nesbot/carbon": "^2.71.0 || ^3.0.0", - "phpunit/phpunit": "^10.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "KyleKatarn", - "email": "kylekatarnls@gmail.com" - } - ], - "description": "Types to use Carbon in Doctrine", - "keywords": [ - "carbon", - "date", - "datetime", - "doctrine", - "time" - ], - "support": { - "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", - "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/1.0.0" - }, - "funding": [ - { - "url": "https://github.com/kylekatarnls", - "type": "github" - }, - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], - "time": "2023-10-01T12:35:29+00:00" - }, - { - "name": "clagiordano/weblibs-configmanager", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/clagiordano/weblibs-configmanager.git", - "reference": "5c8ebcc62782313b1278afe802b120d18c07a059" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/clagiordano/weblibs-configmanager/zipball/5c8ebcc62782313b1278afe802b120d18c07a059", - "reference": "5c8ebcc62782313b1278afe802b120d18c07a059", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "clagiordano/phpunit-result-printer": "^1", - "phpunit/phpunit": "^4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "clagiordano\\weblibs\\configmanager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Claudio Giordano", - "email": "claudio.giordano@autistici.org", - "role": "Developer" - } - ], - "description": "weblibs-configmanager is a tool library for easily read and access to php config array file and direct read/write configuration file / object", - "keywords": [ - "clagiordano", - "configuration", - "manager", - "tool", - "weblibs" - ], - "support": { - "issues": "https://github.com/clagiordano/weblibs-configmanager/issues", - "source": "https://github.com/clagiordano/weblibs-configmanager/tree/v1.2.0" - }, - "time": "2021-05-18T17:55:57+00:00" - }, - { - "name": "easywechat-composer/easywechat-composer", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/mingyoung/easywechat-composer.git", - "reference": "3fc6a7ab6d3853c0f4e2922539b56cc37ef361cd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mingyoung/easywechat-composer/zipball/3fc6a7ab6d3853c0f4e2922539b56cc37ef361cd", - "reference": "3fc6a7ab6d3853c0f4e2922539b56cc37ef361cd", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0", - "php": ">=7.0" - }, - "require-dev": { - "composer/composer": "^1.0 || ^2.0", - "phpunit/phpunit": "^6.5 || ^7.0" - }, - "type": "composer-plugin", - "extra": { - "class": "EasyWeChatComposer\\Plugin" - }, - "autoload": { - "psr-4": { - "EasyWeChatComposer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "张铭阳", - "email": "mingyoungcheung@gmail.com" - } - ], - "description": "The composer plugin for EasyWeChat", - "support": { - "issues": "https://github.com/mingyoung/easywechat-composer/issues", - "source": "https://github.com/mingyoung/easywechat-composer/tree/1.4.1" - }, - "time": "2021-07-05T04:03:22+00:00" - }, - { - "name": "guzzlehttp/guzzle", - "version": "7.8.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "time": "2023-12-03T20:35:24+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "time": "2023-12-03T20:19:20+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "2.6.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2023-12-03T20:05:35+00:00" - }, - { - "name": "jaeger/g-http", - "version": "V1.7.3", - "source": { - "type": "git", - "url": "https://github.com/jae-jae/GHttp.git", - "reference": "035fe0ff6e3e0390769647ce14694875bf02cf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jae-jae/GHttp/zipball/035fe0ff6e3e0390769647ce14694875bf02cf22", - "reference": "035fe0ff6e3e0390769647ce14694875bf02cf22", - "shasum": "" - }, - "require": { - "cache/filesystem-adapter": "^1", - "guzzlehttp/guzzle": "^6.0 || ^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jaeger\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaeger", - "email": "JaegerCode@gmail.com" - } - ], - "description": "Simple Http client base on GuzzleHttp", - "support": { - "issues": "https://github.com/jae-jae/GHttp/issues", - "source": "https://github.com/jae-jae/GHttp/tree/V1.7.3" - }, - "time": "2024-03-24T14:55:49+00:00" - }, - { - "name": "jaeger/phpquery-single", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/jae-jae/phpQuery-single.git", - "reference": "39a650ade692a6b480c22220dce0c198d6a946fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jae-jae/phpQuery-single/zipball/39a650ade692a6b480c22220dce0c198d6a946fb", - "reference": "39a650ade692a6b480c22220dce0c198d6a946fb", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "phpQuery.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Tobiasz Cudnik", - "email": "tobiasz.cudnik@gmail.com", - "homepage": "https://github.com/TobiaszCudnik", - "role": "Developer" - }, - { - "name": "Jaeger", - "role": "Packager" - } - ], - "description": "phpQuery单文件版本,是Querylist的依赖(http://querylist.cc/),phpQuery项目主页:http://code.google.com/p/phpquery/", - "homepage": "http://code.google.com/p/phpquery/", - "support": { - "issues": "https://github.com/jae-jae/phpQuery-single/issues", - "source": "https://github.com/jae-jae/phpQuery-single/tree/1.1.1" - }, - "time": "2022-03-26T15:01:16+00:00" - }, - { - "name": "jaeger/querylist", - "version": "V4.2.8", - "source": { - "type": "git", - "url": "https://github.com/jae-jae/QueryList.git", - "reference": "39dc0ca9c668bec7a793e20472ccd7d26ef89ea4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jae-jae/QueryList/zipball/39dc0ca9c668bec7a793e20472ccd7d26ef89ea4", - "reference": "39dc0ca9c668bec7a793e20472ccd7d26ef89ea4", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "jaeger/g-http": "^1.1", - "jaeger/phpquery-single": "^1", - "php": ">=7.1", - "tightenco/collect": ">5.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.5", - "symfony/var-dumper": "^3.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "QL\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaeger", - "email": "JaegerCode@gmail.com" - } - ], - "description": "Simple, elegant, extensible PHP Web Scraper (crawler/spider),Use the css3 dom selector,Based on phpQuery! 简洁、优雅、可扩展的PHP采集工具(爬虫),基于phpQuery。", - "homepage": "http://querylist.cc", - "keywords": [ - "QueryList", - "phpQuery", - "spider" - ], - "support": { - "issues": "https://github.com/jae-jae/QueryList/issues", - "source": "https://github.com/jae-jae/QueryList/tree/V4.2.8" - }, - "funding": [ - { - "url": "https://opencollective.com/querylist", - "type": "open_collective" - } - ], - "time": "2021-07-05T06:07:58+00:00" - }, - { - "name": "league/flysystem", - "version": "1.1.10", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem.git", - "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3239285c825c152bcc315fe0e87d6b55f5972ed1", - "reference": "3239285c825c152bcc315fe0e87d6b55f5972ed1", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "league/mime-type-detection": "^1.3", - "php": "^7.2.5 || ^8.0" - }, - "conflict": { - "league/flysystem-sftp": "<1.0.6" - }, - "require-dev": { - "phpspec/prophecy": "^1.11.1", - "phpunit/phpunit": "^8.5.8" - }, - "suggest": { - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Flysystem\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frenky.net" - } - ], - "description": "Filesystem abstraction: Many filesystems, one API.", - "keywords": [ - "Cloud Files", - "WebDAV", - "abstraction", - "aws", - "cloud", - "copy.com", - "dropbox", - "file systems", - "files", - "filesystem", - "filesystems", - "ftp", - "rackspace", - "remote", - "s3", - "sftp", - "storage" - ], - "support": { - "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.10" - }, - "funding": [ - { - "url": "https://offset.earth/frankdejonge", - "type": "other" - } - ], - "time": "2022-10-04T09:16:37+00:00" - }, - { - "name": "league/flysystem-cached-adapter", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/flysystem-cached-adapter.git", - "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff", - "reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff", - "shasum": "" - }, - "require": { - "league/flysystem": "~1.0", - "psr/cache": "^1.0.0" - }, - "require-dev": { - "mockery/mockery": "~0.9", - "phpspec/phpspec": "^3.4", - "phpunit/phpunit": "^5.7", - "predis/predis": "~1.0", - "tedivm/stash": "~0.12" - }, - "suggest": { - "ext-phpredis": "Pure C implemented extension for PHP" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\Flysystem\\Cached\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "frankdejonge", - "email": "info@frenky.net" - } - ], - "description": "An adapter decorator to enable meta-data caching.", - "support": { - "issues": "https://github.com/thephpleague/flysystem-cached-adapter/issues", - "source": "https://github.com/thephpleague/flysystem-cached-adapter/tree/master" - }, - "time": "2020-07-25T15:56:04+00:00" - }, - { - "name": "league/mime-type-detection", - "version": "1.12.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "c7f2872fb273bf493811473dafc88d60ae829f48" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/c7f2872fb273bf493811473dafc88d60ae829f48", - "reference": "c7f2872fb273bf493811473dafc88d60ae829f48", - "shasum": "" - }, - "require": { - "ext-fileinfo": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.2", - "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\MimeTypeDetection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Frank de Jonge", - "email": "info@frankdejonge.nl" - } - ], - "description": "Mime-type detection for Flysystem", - "support": { - "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.12.0" - }, - "funding": [ - { - "url": "https://github.com/frankdejonge", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/flysystem", - "type": "tidelift" - } - ], - "time": "2023-08-03T07:14:11+00:00" - }, - { - "name": "monolog/monolog", - "version": "2.9.2", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", - "reference": "437cb3628f4cf6042cc10ae97fc2b8472e48ca1f", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", - "guzzlehttp/guzzle": "^7.4", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.2" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2023-10-27T15:25:26+00:00" - }, - { - "name": "mtdowling/jmespath.php", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/bbb69a935c2cbb0c03d7f481a238027430f6440b", - "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "symfony/polyfill-mbstring": "^1.17" - }, - "require-dev": { - "composer/xdebug-handler": "^3.0.3", - "phpunit/phpunit": "^8.5.33" - }, - "bin": [ - "bin/jp.php" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "files": [ - "src/JmesPath.php" - ], - "psr-4": { - "JmesPath\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": [ - "json", - "jsonpath" - ], - "support": { - "issues": "https://github.com/jmespath/jmespath.php/issues", - "source": "https://github.com/jmespath/jmespath.php/tree/2.7.0" - }, - "time": "2023-08-25T10:54:48+00:00" - }, - { - "name": "nesbot/carbon", - "version": "2.72.3", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/0c6fd108360c562f6e4fd1dedb8233b423e91c83", - "reference": "0c6fd108360c562f6e4fd1dedb8233b423e91c83", - "shasum": "" - }, - "require": { - "carbonphp/carbon-doctrine-types": "*", - "ext-json": "*", - "php": "^7.1.8 || ^8.0", - "psr/clock": "^1.0", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" - }, - "provide": { - "psr/clock-implementation": "1.0" - }, - "require-dev": { - "doctrine/dbal": "^2.0 || ^3.1.4 || ^4.0", - "doctrine/orm": "^2.7 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.0", - "kylekatarnls/multi-tester": "^2.0", - "ondrejmirtes/better-reflection": "*", - "phpmd/phpmd": "^2.9", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12.99 || ^1.7.14", - "phpunit/php-file-iterator": "^2.0.5 || ^3.0.6", - "phpunit/phpunit": "^7.5.20 || ^8.5.26 || ^9.5.20", - "squizlabs/php_codesniffer": "^3.4" - }, - "bin": [ - "bin/carbon" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-3.x": "3.x-dev", - "dev-master": "2.x-dev" - }, - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "https://markido.com" - }, - { - "name": "kylekatarnls", - "homepage": "https://github.com/kylekatarnls" - } - ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "https://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "support": { - "docs": "https://carbon.nesbot.com/docs", - "issues": "https://github.com/briannesbitt/Carbon/issues", - "source": "https://github.com/briannesbitt/Carbon" - }, - "funding": [ - { - "url": "https://github.com/sponsors/kylekatarnls", - "type": "github" - }, - { - "url": "https://opencollective.com/Carbon#sponsor", - "type": "opencollective" - }, - { - "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", - "type": "tidelift" - } - ], - "time": "2024-01-25T10:35:09+00:00" - }, - { - "name": "overtrue/socialite", - "version": "2.0.24", - "source": { - "type": "git", - "url": "https://github.com/overtrue/socialite.git", - "reference": "ee7e7b000ec7d64f2b8aba1f6a2eec5cdf3f8bec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/overtrue/socialite/zipball/ee7e7b000ec7d64f2b8aba1f6a2eec5cdf3f8bec", - "reference": "ee7e7b000ec7d64f2b8aba1f6a2eec5cdf3f8bec", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/guzzle": "^5.0|^6.0|^7.0", - "php": ">=5.6", - "symfony/http-foundation": "^2.7|^3.0|^4.0|^5.0" - }, - "require-dev": { - "mockery/mockery": "~1.2", - "phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Overtrue\\Socialite\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "overtrue", - "email": "anzhengchao@gmail.com" - } - ], - "description": "A collection of OAuth 2 packages that extracts from laravel/socialite.", - "keywords": [ - "login", - "oauth", - "qq", - "social", - "wechat", - "weibo" - ], - "support": { - "issues": "https://github.com/overtrue/socialite/issues", - "source": "https://github.com/overtrue/socialite/tree/2.0.24" - }, - "funding": [ - { - "url": "https://www.patreon.com/overtrue", - "type": "patreon" - } - ], - "time": "2021-05-13T16:04:48+00:00" - }, - { - "name": "overtrue/wechat", - "version": "4.9.0", - "source": { - "type": "git", - "url": "https://github.com/w7corp/easywechat.git", - "reference": "92791f5d957269c633b9aa175f842f6006f945b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/w7corp/easywechat/zipball/92791f5d957269c633b9aa175f842f6006f945b1", - "reference": "92791f5d957269c633b9aa175f842f6006f945b1", - "shasum": "" - }, - "require": { - "easywechat-composer/easywechat-composer": "^1.1", - "ext-fileinfo": "*", - "ext-openssl": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.2 || ^7.0", - "monolog/monolog": "^1.22 || ^2.0", - "overtrue/socialite": "~2.0", - "php": ">=7.2", - "pimple/pimple": "^3.0", - "psr/simple-cache": "^1.0", - "symfony/cache": "^3.3 || ^4.3 || ^5.0", - "symfony/event-dispatcher": "^4.3 || ^5.0", - "symfony/http-foundation": "^2.7 || ^3.0 || ^4.0 || ^5.0", - "symfony/psr-http-message-bridge": "^0.3 || ^1.0 || ^2.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.15", - "mikey179/vfsstream": "^1.6", - "mockery/mockery": "^1.2.3", - "phpstan/phpstan": "^0.12.0", - "phpunit/phpunit": "^7.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/Kernel/Support/Helpers.php", - "src/Kernel/Helpers.php" - ], - "psr-4": { - "EasyWeChat\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "overtrue", - "email": "anzhengchao@gmail.com" - } - ], - "description": "微信SDK", - "keywords": [ - "easywechat", - "sdk", - "wechat", - "weixin", - "weixin-sdk" - ], - "support": { - "issues": "https://github.com/w7corp/easywechat/issues", - "source": "https://github.com/w7corp/easywechat/tree/4.9.0" - }, - "funding": [ - { - "url": "https://github.com/overtrue", - "type": "github" - } - ], - "abandoned": "w7corp/easywechat", - "time": "2023-04-28T03:30:34+00:00" - }, - { - "name": "phpoffice/phpexcel", - "version": "1.8.2", - "source": { - "type": "git", - "url": "https://github.com/PHPOffice/PHPExcel.git", - "reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PHPExcel/zipball/1441011fb7ecdd8cc689878f54f8b58a6805f870", - "reference": "1441011fb7ecdd8cc689878f54f8b58a6805f870", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "php": "^5.2|^7.0" - }, - "require-dev": { - "squizlabs/php_codesniffer": "2.*" - }, - "type": "library", - "autoload": { - "psr-0": { - "PHPExcel": "Classes/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1" - ], - "authors": [ - { - "name": "Maarten Balliauw", - "homepage": "http://blog.maartenballiauw.be" - }, - { - "name": "Erik Tilt" - }, - { - "name": "Franck Lefevre", - "homepage": "http://rootslabs.net" - }, - { - "name": "Mark Baker", - "homepage": "http://markbakeruk.net" - } - ], - "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", - "homepage": "https://github.com/PHPOffice/PHPExcel", - "keywords": [ - "OpenXML", - "excel", - "php", - "spreadsheet", - "xls", - "xlsx" - ], - "support": { - "issues": "https://github.com/PHPOffice/PHPExcel/issues", - "source": "https://github.com/PHPOffice/PHPExcel/tree/master" - }, - "abandoned": "phpoffice/phpspreadsheet", - "time": "2018-11-22T23:07:24+00:00" - }, - { - "name": "pimple/pimple", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1 || ^2.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^5.4@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", - "keywords": [ - "container", - "dependency injection" - ], - "support": { - "source": "https://github.com/silexphp/Pimple/tree/v3.5.0" - }, - "time": "2021-10-28T11:13:42+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/master" - }, - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/clock", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/clock.git", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Clock\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for reading the clock.", - "homepage": "https://github.com/php-fig/clock", - "keywords": [ - "clock", - "now", - "psr", - "psr-20", - "time" - ], - "support": { - "issues": "https://github.com/php-fig/clock/issues", - "source": "https://github.com/php-fig/clock/tree/1.0.0" - }, - "time": "2022-11-25T14:36:26+00:00" - }, - { - "name": "psr/container", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" - }, - "time": "2021-03-05T17:36:06+00:00" - }, - { - "name": "psr/event-dispatcher", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/event-dispatcher.git", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", - "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Standard interfaces for event handling.", - "keywords": [ - "events", - "psr", - "psr-14" - ], - "support": { - "issues": "https://github.com/php-fig/event-dispatcher/issues", - "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" - }, - "time": "2019-01-08T18:20:26+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client" - }, - "time": "2023-09-23T14:17:50+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "e616d01114759c4c489f93b099585439f795fe35" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", - "reference": "e616d01114759c4c489f93b099585439f795fe35", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/1.0.2" - }, - "time": "2023-04-10T20:10:41+00:00" - }, - { - "name": "psr/http-message", - "version": "1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/1.1" - }, - "time": "2023-04-04T09:50:52+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" - }, - "time": "2017-10-23T01:57:42+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, - { - "name": "symfony/cache", - "version": "v5.4.38", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache.git", - "reference": "223c3afac82e003a76931b71d77db408636a0de8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/223c3afac82e003a76931b71d77db408636a0de8", - "reference": "223c3afac82e003a76931b71d77db408636a0de8", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^1.1.7|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "conflict": { - "doctrine/dbal": "<2.13.1", - "symfony/dependency-injection": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/var-dumper": "<4.4" - }, - "provide": { - "psr/cache-implementation": "1.0|2.0", - "psr/simple-cache-implementation": "1.0|2.0", - "symfony/cache-implementation": "1.0|2.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/cache": "^1.6|^2.0", - "doctrine/dbal": "^2.13.1|^3|^4", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0|^2.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Cache\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", - "homepage": "https://symfony.com", - "keywords": [ - "caching", - "psr6" - ], - "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.38" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-03-19T09:55:32+00:00" - }, - { - "name": "symfony/cache-contracts", - "version": "v2.5.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/cache-contracts.git", - "reference": "fee6db04d913094e2fb55ff8e7db5685a8134463" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/fee6db04d913094e2fb55ff8e7db5685a8134463", - "reference": "fee6db04d913094e2fb55ff8e7db5685a8134463", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "suggest": { - "symfony/cache-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to caching", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v2.5.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-23T13:51:25+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", - "reference": "80d075412b557d41002320b96a096ca65aa2c98d", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-24T14:02:46+00:00" - }, - { - "name": "symfony/event-dispatcher", - "version": "v5.4.35", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "7a69a85c7ea5bdd1e875806a99c51a87d3a74b38" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7a69a85c7ea5bdd1e875806a99c51a87d3a74b38", - "reference": "7a69a85c7ea5bdd1e875806a99c51a87d3a74b38", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.35" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-23T13:51:25+00:00" - }, - { - "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "540f4c73e87fd0c71ca44a6aa305d024ac68cb73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/540f4c73e87fd0c71ca44a6aa305d024ac68cb73", - "reference": "540f4c73e87fd0c71ca44a6aa305d024ac68cb73", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to dispatching event", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-23T13:51:25+00:00" - }, - { - "name": "symfony/http-foundation", - "version": "v5.4.38", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "d8c13d35f68c69e15595fe37fa2c225d11c10f7e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d8c13d35f68c69e15595fe37fa2c225d11c10f7e", - "reference": "d8c13d35f68c69e15595fe37fa2c225d11c10f7e", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" - }, - "suggest": { - "symfony/mime": "To use the file extension guesser" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Defines an object-oriented layer for the HTTP specification", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.38" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-03-19T10:19:25+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/861391a8da9a04cbad2d232ddd9e4893220d6e25", - "reference": "861391a8da9a04cbad2d232ddd9e4893220d6e25", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.29.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/21bd091060673a1177ae842c0ef8fe30893114d2", - "reference": "21bd091060673a1177ae842c0ef8fe30893114d2", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.29.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.29.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "reference": "87b68208d5c1188808dd7839ee1e6c8ec3b02f1b", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.29.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-29T20:11:03+00:00" - }, - { - "name": "symfony/process", - "version": "v4.4.44", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "5cee9cdc4f7805e2699d9fd66991a0e6df8252a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5cee9cdc4f7805e2699d9fd66991a0e6df8252a2", - "reference": "5cee9cdc4f7805e2699d9fd66991a0e6df8252a2", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "symfony/polyfill-php80": "^1.16" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Executes commands in sub-processes", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/process/tree/v4.4.44" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-06-27T13:16:42+00:00" - }, - { - "name": "symfony/psr-http-message-bridge", - "version": "v2.3.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/581ca6067eb62640de5ff08ee1ba6850a0ee472e", - "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/http-message": "^1.0 || ^2.0", - "symfony/deprecation-contracts": "^2.5 || ^3.0", - "symfony/http-foundation": "^5.4 || ^6.0" - }, - "require-dev": { - "nyholm/psr7": "^1.1", - "psr/log": "^1.1 || ^2 || ^3", - "symfony/browser-kit": "^5.4 || ^6.0", - "symfony/config": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/framework-bundle": "^5.4 || ^6.0", - "symfony/http-kernel": "^5.4 || ^6.0", - "symfony/phpunit-bridge": "^6.2" - }, - "suggest": { - "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" - }, - "type": "symfony-bridge", - "extra": { - "branch-alias": { - "dev-main": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bridge\\PsrHttpMessage\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "PSR HTTP message bridge", - "homepage": "http://symfony.com", - "keywords": [ - "http", - "http-message", - "psr-17", - "psr-7" - ], - "support": { - "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.3.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-07-26T11:53:26+00:00" - }, - { - "name": "symfony/service-contracts", - "version": "v2.5.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a2329596ddc8fd568900e3fc76cba42489ecc7f3", - "reference": "a2329596ddc8fd568900e3fc76cba42489ecc7f3", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-04-21T15:04:16+00:00" - }, - { - "name": "symfony/translation", - "version": "v5.4.35", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "77d7d1e46f52827585e65e6cd6f52a2542e59c72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/77d7d1e46f52827585e65e6cd6f52a2542e59c72", - "reference": "77d7d1e46f52827585e65e6cd6f52a2542e59c72", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" - }, - "conflict": { - "symfony/config": "<4.4", - "symfony/console": "<5.3", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4" - }, - "provide": { - "symfony/translation-implementation": "2.3" - }, - "require-dev": { - "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0" - }, - "suggest": { - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides tools to internationalize your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/translation/tree/v5.4.35" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-23T13:51:25+00:00" - }, - { - "name": "symfony/translation-contracts", - "version": "v2.5.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "b0073a77ac0b7ea55131020e87b1e3af540f4664" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b0073a77ac0b7ea55131020e87b1e3af540f4664", - "reference": "b0073a77ac0b7ea55131020e87b1e3af540f4664", - "shasum": "" - }, - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v2.5.3" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-23T13:51:25+00:00" - }, - { - "name": "symfony/var-dumper", - "version": "v4.4.47", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "1069c7a3fca74578022fab6f81643248d02f8e63" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1069c7a3fca74578022fab6f81643248d02f8e63", - "reference": "1069c7a3fca74578022fab6f81643248d02f8e63", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.43|^2.13|^3.0.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, - "bin": [ - "Resources/bin/var-dump-server" - ], - "type": "library", - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ], - "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.47" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-10-03T15:15:11+00:00" - }, - { - "name": "symfony/var-exporter", - "version": "v5.4.35", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-exporter.git", - "reference": "abb0a151b62d6b07e816487e20040464af96cae7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/abb0a151b62d6b07e816487e20040464af96cae7", - "reference": "abb0a151b62d6b07e816487e20040464af96cae7", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\VarExporter\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "homepage": "https://symfony.com", - "keywords": [ - "clone", - "construct", - "export", - "hydrate", - "instantiate", - "serialize" - ], - "support": { - "source": "https://github.com/symfony/var-exporter/tree/v5.4.35" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-01-23T13:51:25+00:00" - }, - { - "name": "tightenco/collect", - "version": "8.78.0", - "source": { - "type": "git", - "url": "https://github.com/tighten/collect.git", - "reference": "3a42ca9b730a88e942fe05180d4f15e045464e40" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tighten/collect/zipball/3a42ca9b730a88e942fe05180d4f15e045464e40", - "reference": "3a42ca9b730a88e942fe05180d4f15e045464e40", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0", - "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "nesbot/carbon": "^2.23.0", - "phpunit/phpunit": "^8.3" - }, - "type": "library", - "autoload": { - "files": [ - "src/Collect/Support/helpers.php", - "src/Collect/Support/alias.php" - ], - "psr-4": { - "Tightenco\\Collect\\": "src/Collect" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "Collect - Illuminate Collections as a separate package.", - "keywords": [ - "collection", - "laravel" - ], - "support": { - "issues": "https://github.com/tighten/collect/issues", - "source": "https://github.com/tighten/collect/tree/8.78.0" - }, - "abandoned": "illuminate/collections", - "time": "2022-01-04T21:38:24+00:00" - }, - { - "name": "topthink/framework", - "version": "v6.1.4", - "source": { - "type": "git", - "url": "https://github.com/top-think/framework.git", - "reference": "66eb9cf4d627df12911344cd328faf9bb596bf2c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/66eb9cf4d627df12911344cd328faf9bb596bf2c", - "reference": "66eb9cf4d627df12911344cd328faf9bb596bf2c", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": ">=7.2.5", - "psr/container": "~1.0", - "psr/http-message": "^1.0", - "psr/log": "~1.0", - "psr/simple-cache": "^1.0", - "topthink/think-helper": "^3.1.1", - "topthink/think-orm": "^2.0|^3.0" - }, - "require-dev": { - "guzzlehttp/psr7": "^2.1.0", - "mikey179/vfsstream": "^1.6", - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "autoload": { - "files": [], - "psr-4": { - "think\\": "src/think/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - }, - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "The ThinkPHP Framework.", - "homepage": "http://thinkphp.cn/", - "keywords": [ - "framework", - "orm", - "thinkphp" - ], - "support": { - "issues": "https://github.com/top-think/framework/issues", - "source": "https://github.com/top-think/framework/tree/v6.1.4" - }, - "time": "2023-07-11T15:16:03+00:00" - }, - { - "name": "topthink/think-factory", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-factory.git", - "reference": "b8080a6472aae1cff47ceb8c30feec3c2835364b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-factory/zipball/b8080a6472aae1cff47ceb8c30feec3c2835364b", - "reference": "b8080a6472aae1cff47ceb8c30feec3c2835364b", - "shasum": "" - }, - "require": { - "topthink/framework": "^6.0.0", - "topthink/think-helper": "^3.0.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "support": { - "issues": "https://github.com/top-think/think-factory/issues", - "source": "https://github.com/top-think/think-factory/tree/v1.0.1" - }, - "abandoned": true, - "time": "2019-04-15T06:55:28+00:00" - }, - { - "name": "topthink/think-filesystem", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-filesystem.git", - "reference": "cfc510520db9bcd22d8d80f51d7e415a2f470af6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-filesystem/zipball/cfc510520db9bcd22d8d80f51d7e415a2f470af6", - "reference": "cfc510520db9bcd22d8d80f51d7e415a2f470af6", - "shasum": "" - }, - "require": { - "league/flysystem": "^1.1.4", - "league/flysystem-cached-adapter": "^1.0", - "php": ">=7.2.5", - "topthink/framework": "^6.1" - }, - "require-dev": { - "mikey179/vfsstream": "^1.6", - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "The ThinkPHP6.1 Filesystem Package", - "support": { - "issues": "https://github.com/top-think/think-filesystem/issues", - "source": "https://github.com/top-think/think-filesystem/tree/v1.0.1" - }, - "time": "2022-10-26T03:50:24+00:00" - }, - { - "name": "topthink/think-helper", - "version": "v3.1.6", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-helper.git", - "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-helper/zipball/769acbe50a4274327162f9c68ec2e89a38eb2aff", - "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff", - "shasum": "" - }, - "require": { - "php": ">=7.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/helper.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "The ThinkPHP6 Helper Package", - "support": { - "issues": "https://github.com/top-think/think-helper/issues", - "source": "https://github.com/top-think/think-helper/tree/v3.1.6" - }, - "time": "2021-12-15T04:27:55+00:00" - }, - { - "name": "topthink/think-multi-app", - "version": "v1.0.17", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-multi-app.git", - "reference": "4055a6187296ac16c0bc7bbab4ed5d92f82f791c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/4055a6187296ac16c0bc7bbab4ed5d92f82f791c", - "reference": "4055a6187296ac16c0bc7bbab4ed5d92f82f791c", - "shasum": "" - }, - "require": { - "php": ">=7.1.0", - "topthink/framework": "^6.0|^8.0" - }, - "type": "library", - "extra": { - "think": { - "services": [ - "think\\app\\Service" - ] - } - }, - "autoload": { - "psr-4": { - "think\\app\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "thinkphp multi app support", - "support": { - "issues": "https://github.com/top-think/think-multi-app/issues", - "source": "https://github.com/top-think/think-multi-app/tree/v1.0.17" - }, - "time": "2023-03-29T02:04:29+00:00" - }, - { - "name": "topthink/think-orm", - "version": "v2.0.61", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-orm.git", - "reference": "10528ebf4a5106b19c3bac9c6deae7a67ff49de6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-orm/zipball/10528ebf4a5106b19c3bac9c6deae7a67ff49de6", - "reference": "10528ebf4a5106b19c3bac9c6deae7a67ff49de6", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-pdo": "*", - "php": ">=7.1.0", - "psr/log": "^1.0|^2.0", - "psr/simple-cache": "^1.0|^2.0", - "topthink/think-helper": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7|^8|^9.5" - }, - "type": "library", - "autoload": { - "files": [ - "stubs/load_stubs.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "think orm", - "keywords": [ - "database", - "orm" - ], - "support": { - "issues": "https://github.com/top-think/think-orm/issues", - "source": "https://github.com/top-think/think-orm/tree/v2.0.61" - }, - "time": "2023-04-20T14:27:51+00:00" - }, - { - "name": "topthink/think-queue", - "version": "v3.0.0", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-queue.git", - "reference": "7e07fd55af7e3daf6adb8d78c134cefb42e48a63" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-queue/zipball/7e07fd55af7e3daf6adb8d78c134cefb42e48a63", - "reference": "7e07fd55af7e3daf6adb8d78c134cefb42e48a63", - "shasum": "" - }, - "require": { - "nesbot/carbon": "^2.16", - "symfony/process": "^4.2", - "topthink/framework": "^6.0.0", - "topthink/think-factory": "^1.0.0", - "topthink/think-helper": "^3.0.4" - }, - "require-dev": { - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^6.2", - "topthink/think-migration": "^3.0.0" - }, - "type": "library", - "extra": { - "think": { - "services": [ - "think\\queue\\Service" - ], - "config": { - "queue": "src/config.php" - } - } - }, - "autoload": { - "files": [ - "src/common.php" - ], - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "description": "The ThinkPHP5 Queue Package", - "support": { - "issues": "https://github.com/top-think/think-queue/issues", - "source": "https://github.com/top-think/think-queue/tree/v3.0.0" - }, - "time": "2019-04-16T06:14:09+00:00" - }, - { - "name": "topthink/think-template", - "version": "v2.0.9", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-template.git", - "reference": "6d25642ae0e306166742fd7073dc7a159e18073c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-template/zipball/6d25642ae0e306166742fd7073dc7a159e18073c", - "reference": "6d25642ae0e306166742fd7073dc7a159e18073c", - "shasum": "" - }, - "require": { - "php": ">=7.1.0", - "psr/simple-cache": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "think\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "the php template engine", - "support": { - "issues": "https://github.com/top-think/think-template/issues", - "source": "https://github.com/top-think/think-template/tree/v2.0.9" - }, - "time": "2023-02-14T10:50:39+00:00" - }, - { - "name": "topthink/think-view", - "version": "v1.0.14", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-view.git", - "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-view/zipball/edce0ae2c9551ab65f9e94a222604b0dead3576d", - "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d", - "shasum": "" - }, - "require": { - "php": ">=7.1.0", - "topthink/think-template": "^2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "think\\view\\driver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "thinkphp template driver", - "support": { - "issues": "https://github.com/top-think/think-view/issues", - "source": "https://github.com/top-think/think-view/tree/v1.0.14" - }, - "time": "2019-11-06T11:40:13+00:00" - } - ], - "packages-dev": [ - { - "name": "topthink/think-trace", - "version": "v1.6", - "source": { - "type": "git", - "url": "https://github.com/top-think/think-trace.git", - "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/top-think/think-trace/zipball/136cd5d97e8bdb780e4b5c1637c588ed7ca3e142", - "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142", - "shasum": "" - }, - "require": { - "php": ">=7.1.0", - "topthink/framework": "^6.0|^8.0" - }, - "type": "library", - "extra": { - "think": { - "services": [ - "think\\trace\\Service" - ], - "config": { - "trace": "src/config.php" - } - } - }, - "autoload": { - "psr-4": { - "think\\trace\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "description": "thinkphp debug trace", - "support": { - "issues": "https://github.com/top-think/think-trace/issues", - "source": "https://github.com/top-think/think-trace/tree/v1.6" - }, - "time": "2023-02-07T08:36:32+00:00" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=7.1.0" - }, - "platform-dev": [], - "plugin-api-version": "2.3.0" -} diff --git a/config/app.php b/config/app.php deleted file mode 100644 index 2c07fb8..0000000 --- a/config/app.php +++ /dev/null @@ -1,34 +0,0 @@ - env('app.host', ''), - // 应用的命名空间 - 'app_namespace' => '', - // 是否启用路由 - 'with_route' => true, - // 是否启用事件 - 'with_event' => true, - // 默认应用 - 'default_app' => 'index', - // 默认时区 - 'default_timezone' => env('DEFAULT_TIMEZONE','Asia/Chongqing'), - - // 应用映射(自动多应用模式有效) - 'app_map' => [], - // 域名绑定(自动多应用模式有效) - 'domain_bind' => [], - // 禁止URL访问的应用列表(自动多应用模式有效) - 'deny_app_list' => [], - - // 异常页面的模板文件 - 'exception_tmpl' => __DIR__ . "/../app/pages/" . (env('APP_DEBUG') ? "exception.php" : "error.php"), - - // 错误显示信息,非调试模式有效 - 'error_message' => '系统异常,请稍后再试。', - // 显示错误信息 - 'show_error_msg' => false, -]; diff --git a/config/cache.php b/config/cache.php deleted file mode 100644 index a8d69d2..0000000 --- a/config/cache.php +++ /dev/null @@ -1,29 +0,0 @@ - env('cache.driver', 'file'), - - // 缓存连接方式配置 - 'stores' => [ - 'file' => [ - // 驱动方式 - 'type' => 'File', - // 缓存保存目录 - 'path' => '', - // 缓存前缀 - 'prefix' => '', - // 缓存有效期 0表示永久缓存 - 'expire' => 0, - // 缓存标签前缀 - 'tag_prefix' => 'tag:', - // 序列化机制 例如 ['serialize', 'unserialize'] - 'serialize' => [], - ], - // 更多的缓存连接 - ], -]; diff --git a/config/console.php b/config/console.php deleted file mode 100644 index 7b79f33..0000000 --- a/config/console.php +++ /dev/null @@ -1,7 +0,0 @@ - 0, - // cookie 保存路径 - 'path' => '/', - // cookie 有效域名 - 'domain' => '', - // cookie 启用安全传输 - 'secure' => false, - // httponly设置 - 'httponly' => false, - // 是否使用 setcookie - 'setcookie' => true, -]; diff --git a/config/database.php b/config/database.php deleted file mode 100644 index 7b94ac1..0000000 --- a/config/database.php +++ /dev/null @@ -1,62 +0,0 @@ - env('database.driver', 'mysql'), - - // 自定义时间查询规则 - 'time_query_rule' => [], - - // 自动写入时间戳字段 - // true为自动识别类型 false关闭 - // 字符串则明确指定时间字段类型 支持 int timestamp datetime date - 'auto_timestamp' => true, - - // 时间字段取出后的默认时间格式 - 'datetime_format' => 'Y-m-d H:i:s', - - // 数据库连接配置信息 - 'connections' => [ - 'mysql' => [ - // 数据库类型 - 'type' => env('database.type', 'mysql'), - // 服务器地址 - 'hostname' => env('database.hostname', '127.0.0.1'), - // 数据库名 - 'database' => env('database.database', ''), - // 用户名 - 'username' => env('database.username', 'root'), - // 密码 - 'password' => env('database.password', ''), - // 端口 - 'hostport' => env('database.hostport', '3306'), - // 数据库连接参数 - 'params' => [], - // 数据库编码默认采用utf8 - 'charset' => env('database.charset', 'utf8'), - // 数据库表前缀 - 'prefix' => env('database.prefix', ''), - - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) - 'deploy' => 0, - // 数据库读写是否分离 主从式有效 - 'rw_separate' => false, - // 读写分离后 主服务器数量 - 'master_num' => 1, - // 指定从服务器序号 - 'slave_no' => '', - // 是否严格检查字段是否存在 - 'fields_strict' => true, - // 是否需要断线重连 - 'break_reconnect' => false, - // 监听SQL - 'trigger_sql' => env('app_debug', true), - // 开启字段缓存 - 'fields_cache' => false, - // 字段缓存路径 - 'schema_cache_path' => app()->getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR, - ], - - // 更多的数据库配置信息 - ], -]; diff --git a/config/filesystem.php b/config/filesystem.php deleted file mode 100644 index 5a04e5f..0000000 --- a/config/filesystem.php +++ /dev/null @@ -1,13 +0,0 @@ - 'public', - // 磁盘列表 - 'disks' => [ - 'public' => [ - 'type' => 'local', - 'root' => 'uploads', - ], - ], -]; diff --git a/config/lang.php b/config/lang.php deleted file mode 100644 index e3b4986..0000000 --- a/config/lang.php +++ /dev/null @@ -1,25 +0,0 @@ - env('lang.default_lang', 'zh-cn'), - // 允许的语言列表 - 'allow_lang_list' => [], - // 多语言自动侦测变量名 - 'detect_var' => 'lang', - // 是否使用Cookie记录 - 'use_cookie' => true, - // 多语言cookie变量 - 'cookie_var' => 'think_lang', - // 扩展语言包 - 'extend_list' => [], - // Accept-Language转义为对应语言包名称 - 'accept_language' => [ - 'zh-hans-cn' => 'zh-cn', - ], - // 是否支持语言分组 - 'allow_group' => false, -]; diff --git a/config/log.php b/config/log.php deleted file mode 100644 index ea24ff9..0000000 --- a/config/log.php +++ /dev/null @@ -1,45 +0,0 @@ - env('log.channel', 'file'), - // 日志记录级别 - 'level' => [], - // 日志类型记录的通道 ['error'=>'email',...] - 'type_channel' => [], - // 关闭全局日志写入 - 'close' => false, - // 全局日志处理 支持闭包 - 'processor' => null, - - // 日志通道列表 - 'channels' => [ - 'file' => [ - // 日志记录方式 - 'type' => 'File', - // 日志保存目录 - 'path' => '', - // 单文件日志写入 - 'single' => false, - // 独立日志级别 - 'apart_level' => [], - // 最大日志文件数量 - 'max_files' => 0, - // 使用JSON格式记录 - 'json' => false, - // 日志处理 - 'processor' => null, - // 关闭通道日志写入 - 'close' => false, - // 日志输出格式化 - 'format' => '[%s][%s] %s', - // 是否实时写入 - 'realtime_write' => false, - ], - // 其它日志通道配置 - ], - -]; diff --git a/config/middleware.php b/config/middleware.php deleted file mode 100644 index 7e1972f..0000000 --- a/config/middleware.php +++ /dev/null @@ -1,8 +0,0 @@ - [], - // 优先级设置,此数组中的中间件会按照数组中的顺序优先执行 - 'priority' => [], -]; diff --git a/config/queue.php b/config/queue.php deleted file mode 100644 index 2122a31..0000000 --- a/config/queue.php +++ /dev/null @@ -1,38 +0,0 @@ - -// +---------------------------------------------------------------------- - -return [ - 'default' => 'sync', - 'connectors' => [ - 'sync' => [ - 'driver' => 'sync', - ], - 'database' => [ - 'driver' => 'database', - 'queue' => 'default', - 'table' => 'jobs', - ], - 'redis' => [ - 'driver' => 'redis', - 'queue' => 'default', - 'host' => '127.0.0.1', - 'port' => 6379, - 'password' => '', - 'select' => 0, - 'timeout' => 0, - 'persistent' => false, - ], - ], - 'failed' => [ - 'type' => 'none', - 'table' => 'failed_jobs', - ], -]; diff --git a/config/route.php b/config/route.php deleted file mode 100644 index 955eeec..0000000 --- a/config/route.php +++ /dev/null @@ -1,45 +0,0 @@ - '/', - // URL伪静态后缀 - 'url_html_suffix' => 'html', - // URL普通方式参数 用于自动生成 - 'url_common_param' => true, - // 是否开启路由延迟解析 - 'url_lazy_route' => false, - // 是否强制使用路由 - 'url_route_must' => false, - // 合并路由规则 - 'route_rule_merge' => false, - // 路由是否完全匹配 - 'route_complete_match' => false, - // 访问控制器层名称 - 'controller_layer' => 'controller', - // 空控制器名 - 'empty_controller' => 'Error', - // 是否使用控制器后缀 - 'controller_suffix' => false, - // 默认的路由变量规则 - 'default_route_pattern' => '[\w\.]+', - // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 - 'request_cache' => false, - // 请求缓存有效期 - 'request_cache_expire' => null, - // 全局请求缓存排除规则 - 'request_cache_except' => [], - // 默认控制器名 - 'default_controller' => 'Index', - // 默认操作名 - 'default_action' => 'index', - // 操作方法后缀 - 'action_suffix' => '', - // 默认JSONP格式返回的处理方法 - 'default_jsonp_handler' => 'jsonpReturn', - // 默认JSONP处理方法 - 'var_jsonp_handler' => 'callback', -]; diff --git a/config/session.php b/config/session.php deleted file mode 100644 index c1ef6e1..0000000 --- a/config/session.php +++ /dev/null @@ -1,19 +0,0 @@ - 'PHPSESSID', - // SESSION_ID的提交变量,解决flash上传跨域 - 'var_session_id' => '', - // 驱动方式 支持file cache - 'type' => 'file', - // 存储连接标识 当type使用cache的时候有效 - 'store' => null, - // 过期时间 - 'expire' => 1440, - // 前缀 - 'prefix' => '', -]; diff --git a/config/trace.php b/config/trace.php deleted file mode 100644 index 9694295..0000000 --- a/config/trace.php +++ /dev/null @@ -1,10 +0,0 @@ - 'Console', - // 读取的日志通道名 - 'channel' => '', -]; diff --git a/config/view.php b/config/view.php deleted file mode 100644 index 01259a0..0000000 --- a/config/view.php +++ /dev/null @@ -1,25 +0,0 @@ - 'Think', - // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 - 'auto_rule' => 1, - // 模板目录名 - 'view_dir_name' => 'view', - // 模板后缀 - 'view_suffix' => 'html', - // 模板文件名分隔符 - 'view_depr' => DIRECTORY_SEPARATOR, - // 模板引擎普通标签开始标记 - 'tpl_begin' => '{', - // 模板引擎普通标签结束标记 - 'tpl_end' => '}', - // 标签库标签开始标记 - 'taglib_begin' => '{', - // 标签库标签结束标记 - 'taglib_end' => '}', -]; diff --git a/data.sql b/data.sql deleted file mode 100644 index c64a6e1..0000000 --- a/data.sql +++ /dev/null @@ -1,516 +0,0 @@ --- phpMyAdmin SQL Dump --- version 4.8.5 --- https://www.phpmyadmin.net/ --- --- 主机: localhost --- 生成日期: 2024-04-04 20:43:04 --- 服务器版本: 5.7.26 --- PHP 版本: 7.3.4 - -SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; -SET AUTOCOMMIT = 0; -START TRANSACTION; -SET time_zone = "+00:00"; - - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8mb4 */; - --- --- 数据库: `www_dj_com` --- - --- -------------------------------------------------------- - --- --- 表的结构 `qf_access` --- - -CREATE TABLE `qf_access` ( - `access_id` int(11) NOT NULL, - `access_admin` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID', - `access_token` varchar(255) NOT NULL DEFAULT '' COMMENT 'AccessToken', - `access_plat` varchar(255) NOT NULL DEFAULT 'all' COMMENT '登录平台', - `access_ip` varchar(255) NOT NULL DEFAULT '' COMMENT 'IP', - `access_status` int(11) NOT NULL DEFAULT '0' COMMENT '状态', - `access_createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `access_updatetime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='授权信息表'; - --- --- 转存表中的数据 `qf_access` --- - -INSERT INTO `qf_access` (`access_id`, `access_admin`, `access_token`, `access_plat`, `access_ip`, `access_status`, `access_createtime`, `access_updatetime`) VALUES -(1, 1, 'cb12654681713cfbaf0083826c6f60e1df14a3d7100000cb12654681713cfbaf0083826c6f60e1df14a3d7', 'admin', '61.136.79.242', 1, 1712108461, 1712137607), -(2, 1, '239f1a9c7fe1aab2ccc2bd7bee05e007ef35669f100000239f1a9c7fe1aab2ccc2bd7bee05e007ef35669f', 'admin', '61.136.79.242', 1, 1712137847, 1712137925), -(3, 1, 'e74a15119c2d1221aa3b24870646524bab197fe3100000e74a15119c2d1221aa3b24870646524bab197fe3', 'admin', '127.0.0.1', 1, 1712199252, 1712233520), -(4, 1, '7eabdae80e86156343c58b212fc80df5a92585851000007eabdae80e86156343c58b212fc80df5a9258585', 'admin', '127.0.0.1', 0, 1712233596, 1712234379); - --- -------------------------------------------------------- - --- --- 表的结构 `qf_admin` --- - -CREATE TABLE `qf_admin` ( - `admin_id` int(11) NOT NULL COMMENT 'UID', - `admin_account` varchar(64) CHARACTER SET utf8 NOT NULL COMMENT '帐号', - `admin_password` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '密码', - `admin_salt` varchar(4) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '密码盐', - `admin_name` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '用户昵称', - `admin_idcard` varchar(18) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '身份证', - `admin_truename` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '真实姓名', - `admin_email` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '邮箱', - `admin_money` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '余额', - `admin_group` int(11) NOT NULL DEFAULT '0' COMMENT '用户组', - `admin_ipreg` varchar(255) NOT NULL COMMENT '注册IP', - `admin_status` int(11) NOT NULL DEFAULT '0' COMMENT '1被禁用', - `admin_createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `admin_updatetime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表'; - --- --- 转存表中的数据 `qf_admin` --- - -INSERT INTO `qf_admin` (`admin_id`, `admin_account`, `admin_password`, `admin_salt`, `admin_name`, `admin_idcard`, `admin_truename`, `admin_email`, `admin_money`, `admin_group`, `admin_ipreg`, `admin_status`, `admin_createtime`, `admin_updatetime`) VALUES -(1, 'admin', 'bde25145afb5643cb45365783183f7b8ef46640f', 'nwYn', '超级管理员', '', '超级管理员', '', '0.00', 1, '127.0.0.1', 0, 0, 1712234379); - --- -------------------------------------------------------- - --- --- 表的结构 `qf_attach` --- - -CREATE TABLE `qf_attach` ( - `attach_id` int(11) NOT NULL, - `attach_name` varchar(255) DEFAULT NULL COMMENT '文件名', - `attach_path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径', - `attach_type` varchar(255) NOT NULL DEFAULT '' COMMENT '类型', - `attach_size` int(11) NOT NULL DEFAULT '0' COMMENT '大小', - `attach_admin` int(11) NOT NULL DEFAULT '0' COMMENT '用户', - `attach_status` int(11) NOT NULL DEFAULT '0' COMMENT '状态', - `attach_createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `attach_updatetime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='附件表'; - --- --- 转存表中的数据 `qf_attach` --- - -INSERT INTO `qf_attach` (`attach_id`, `attach_name`, `attach_path`, `attach_type`, `attach_size`, `attach_admin`, `attach_status`, `attach_createtime`, `attach_updatetime`) VALUES -(3, 'weixinq.png', '/uploads/image/20240328/e3661f5c8797a604c52ded5b8b278bed.png', 'png', 206556, 1, 0, 1711636964, 1711636964), -(5, '微信图片_20240402113107.jpg', '/uploads/image/20240402/5f3dcb0d0cf6d567f40cd7356079eb64.jpg', 'jpg', 107999, 1, 0, 1712028717, 1712028717); - --- -------------------------------------------------------- - --- --- 表的结构 `qf_auth` --- - -CREATE TABLE `qf_auth` ( - `auth_id` bigint(20) NOT NULL COMMENT '权限ID', - `auth_group` int(11) NOT NULL DEFAULT '0' COMMENT '权限管理组', - `auth_node` int(11) NOT NULL DEFAULT '0' COMMENT '功能ID', - `auth_status` int(11) NOT NULL DEFAULT '0' COMMENT '1被禁用', - `auth_createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `auth_updatetime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='权限表'; - --- -------------------------------------------------------- - --- --- 表的结构 `qf_conf` --- - -CREATE TABLE `qf_conf` ( - `conf_id` int(11) NOT NULL, - `conf_key` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '参数名', - `conf_value` text CHARACTER SET utf8 COMMENT '参数值', - `conf_title` varchar(255) CHARACTER SET utf8 DEFAULT '' COMMENT '参数名称', - `conf_desc` varchar(255) CHARACTER SET utf8 DEFAULT '' COMMENT '参数描述', - `conf_int` int(11) NOT NULL DEFAULT '0' COMMENT '参数到期', - `conf_spec` int(11) NOT NULL DEFAULT '0' COMMENT '文本类型', - `conf_content` varchar(255) DEFAULT NULL COMMENT '单选多选等文本类型的数据集', - `conf_type` int(11) NOT NULL DEFAULT '0' COMMENT '配置分类 ', - `conf_status` int(11) NOT NULL DEFAULT '0' COMMENT '显示隐藏 0是隐藏', - `conf_sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序', - `conf_system` int(11) NOT NULL DEFAULT '0' COMMENT '1为系统参数,请勿删除', - `conf_createtime` int(11) NOT NULL DEFAULT '0', - `conf_updatetime` int(11) NOT NULL DEFAULT '0' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置表'; - --- --- 转存表中的数据 `qf_conf` --- - -INSERT INTO `qf_conf` (`conf_id`, `conf_key`, `conf_value`, `conf_title`, `conf_desc`, `conf_int`, `conf_spec`, `conf_content`, `conf_type`, `conf_status`, `conf_sort`, `conf_system`, `conf_createtime`, `conf_updatetime`) VALUES -(1, 'app_name', '资源管理系统', '网站名称', '', 0, 0, NULL, 0, 1, 99, 1, 0, 1620610921), -(2, 'upload_max_file', '4097152', '最大文件上传限制', '', 0, 0, NULL, 2, 1, 0, 1, 0, 1617352067), -(3, 'upload_file_type', 'xls,xlsx,csv', '允许文件上传类型', '', 0, 0, NULL, 2, 1, 0, 1, 0, 1617351959), -(4, 'upload_max_image', '2097152', '最大图片上传限制', '', 0, 0, NULL, 2, 1, 0, 1, 0, 1617351961), -(5, 'upload_image_type', 'jpg,png,gif,jpeg,bmp', '允许上传图片类型', '', 0, 0, NULL, 2, 1, 0, 1, 0, 1617351964), -(6, 'sms_sign', '', '百度SMS签名', '', 0, 0, NULL, 3, 1, 0, 1, 0, 1617347740), -(7, 'sms_tmpl_1', '', '百度SMS通知模板ID', '', 0, 0, NULL, 3, 1, 0, 1, 0, 1712108519), -(8, 'sms_tmpl_2', '', '百度SMS短信验证模板ID', '', 0, 0, NULL, 3, 1, 0, 1, 0, 1712108525), -(18, 'mp_appid', '', '公众号appid', '', 0, 0, NULL, 8, 1, 1, 1, 1619170883, 1619170912), -(19, 'mp_appsecret', '', '公众号appsecret', '', 0, 0, NULL, 8, 1, 1, 1, 1619170903, 1619170915), -(20, 'baidu_token', '', '百度短链接Token', '', 0, 0, NULL, 3, 1, 0, 1, 1622862241, 1622862241), -(21, 'logo', '', '网站LOGO', '方形LOGO,最佳显示尺寸为80*80像素', 0, 4, NULL, 0, 1, 0, 0, 1711636952, 1712451684), -(22, 'quark_cookie', '', '夸克Cookie', '', 0, 0, NULL, 4, 1, 0, 1, 1712114435, 1712114652), -(23, 'qcode', '/uploads/image/20240402/5f3dcb0d0cf6d567f40cd7356079eb64.jpg', '群二维码', '微信群二维码', 0, 4, NULL, 0, 1, 0, 0, 1712451616, 1712451616), -(24, 'app_description', '免费分享百万级网盘资源,致力打造顶尖网盘搜索引擎,让您畅享资源无忧!', '网站描述', '用于首页副标题,如:免费分享百万级网盘资源,致力打造顶尖网盘搜索引擎,让您畅享资源无忧!', 0, 0, NULL, 0, 1, 1, 0, 1712451778, 1712451790); - --- -------------------------------------------------------- - --- --- 表的结构 `qf_feedback` --- - -CREATE TABLE `qf_feedback` ( - `id` int(11) NOT NULL, - `content` varchar(255) DEFAULT NULL, - `create_time` int(11) NOT NULL DEFAULT '0', - `update_time` int(11) NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- --- 转存表中的数据 `qf_feedback` --- - -INSERT INTO `qf_feedback` (`id`, `content`, `create_time`, `update_time`) VALUES -(1, '我啥都不想看', 1712231175, 1712231175); - --- -------------------------------------------------------- - --- --- 表的结构 `qf_group` --- - -CREATE TABLE `qf_group` ( - `group_id` int(11) NOT NULL, - `group_name` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '管理组名称', - `group_desc` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '管理组描述', - `group_status` int(11) NOT NULL DEFAULT '0' COMMENT '1被禁用', - `group_createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `group_updatetime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='管理组表'; - --- --- 转存表中的数据 `qf_group` --- - -INSERT INTO `qf_group` (`group_id`, `group_name`, `group_desc`, `group_status`, `group_createtime`, `group_updatetime`) VALUES -(1, '超级管理员', '不允许删除', 0, 0, 1575903468); - --- -------------------------------------------------------- - --- --- 表的结构 `qf_node` --- - -CREATE TABLE `qf_node` ( - `node_id` int(11) NOT NULL COMMENT '功能ID', - `node_title` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '功能名称', - `node_desc` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '功能描述', - `node_module` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT 'api' COMMENT '模块', - `node_controller` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '控制器', - `node_action` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '方法', - `node_pid` int(11) NOT NULL DEFAULT '0' COMMENT '父ID', - `node_order` int(11) NOT NULL DEFAULT '0' COMMENT '排序ID', - `node_show` int(11) NOT NULL DEFAULT '1' COMMENT '1显示到菜单', - `node_icon` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图标', - `node_extend` text CHARACTER SET utf8 COMMENT '扩展数据', - `node_status` int(11) NOT NULL DEFAULT '0' COMMENT '1被禁用', - `node_createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `node_updatetime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='功能节点表'; - --- --- 转存表中的数据 `qf_node` --- - -INSERT INTO `qf_node` (`node_id`, `node_title`, `node_desc`, `node_module`, `node_controller`, `node_action`, `node_pid`, `node_order`, `node_show`, `node_icon`, `node_extend`, `node_status`, `node_createtime`, `node_updatetime`) VALUES -(1, '概况', '', 'qfadmin', 'index', 'index', 0, 999, 1, 'el-icon-house', NULL, 0, 0, 1620874188), -(2, '运营人员', '', 'qfadmin', '', '', 3, 0, 1, 'el-icon-user', NULL, 0, 0, 1618302083), -(3, '系统', '', 'qfadmin', '', '', 0, 0, 1, 'el-icon-data-board', NULL, 0, 0, 1618301765), -(4, '配置', '', 'qfadmin', '', '', 0, 0, 0, 'el-icon-setting', NULL, 0, 1617269862, 1712213372), -(100, '管理员列表', '', 'qfadmin', 'admin', 'index', 2, 0, 1, 'el-icon-user', '', 0, 0, 1618794624), -(101, '用户组管理', '', 'qfadmin', 'group', 'index', 2, 0, 1, '', NULL, 0, 0, 1617246287), -(102, '参数配置', '', 'qfadmin', 'conf', 'index', 4, 5, 1, 'el-icon-set-up', '', 0, 0, 1617350626), -(104, '菜单管理', '', 'qfadmin', 'node', 'index', 4, 6, 1, 'el-icon-s-operation', '', 0, 0, 1617350880), -(105, '附件管理', '', 'qfadmin', 'attach', 'index', 4, 4, 1, 'el-icon-connection', '', 0, 0, 1617345521), -(106, '清理数据', '', 'qfadmin', 'system', 'clean', 0, 0, 0, '', '', 0, 0, 1620976142), -(107, '基础设置', '', 'qfadmin', 'conf', 'base', 3, 5, 1, 'el-icon-s-operation', '', 0, 0, 1617773467), -(108, '资源', '', 'qfadmin', '', '', 0, 1, 1, 'el-icon-files', NULL, 0, 1622538526, 1711117979), -(109, '资源管理', '', 'qfadmin', 'source', 'index', 108, 1, 1, 'el-icon-folder-opened', NULL, 0, 1622538567, 1712213423), -(112, '转存管理', '', 'qfadmin', 'source', 'deposit', 108, 1, 1, 'el-icon-crop', NULL, 0, 1712112542, 1712213455), -(113, '转存日志', '', 'qfadmin', 'source', 'log', 108, 1, 1, 'el-icon-discover', NULL, 0, 1712208103, 1712213467), -(114, '用户需求', '', 'qfadmin', 'source', 'feedback', 108, 1, 1, 'el-icon-edit', NULL, 0, 1712230638, 1712230717), -(118, '分类管理', '', 'qfadmin', 'source', 'category', 108, 0, 1, 'el-icon-s-operation', NULL, 0, 1712230638, 1712230717); - --- -------------------------------------------------------- - --- --- 表的结构 `qf_source_category` --- - -CREATE TABLE `qf_source_category` ( - `source_category_id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分类名称', - `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序', - `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态', - `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', - `update_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间', - PRIMARY KEY (`source_category_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='分类表'; - - --- -------------------------------------------------------- - - --- --- 表的结构 `qf_source` --- - -CREATE TABLE `qf_source` ( - `source_id` int(11) NOT NULL, - `title` varchar(255) NOT NULL DEFAULT '' COMMENT '资源名称', - `url` varchar(255) NOT NULL DEFAULT '' COMMENT '资源地址', - `description` varchar(255) NOT NULL DEFAULT '' COMMENT '描述', - `content` text COMMENT '内容', - `page_views` int(11) NOT NULL DEFAULT '0' COMMENT '浏览量', - `status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态 0=禁用 1=启用', - `is_delete` tinyint(3) NOT NULL DEFAULT '0' COMMENT '是否删除 0=正常 1=软删除', - `is_time` int(11) NOT NULL DEFAULT '0' COMMENT '是否临时文件', - `fid` varchar(255) NOT NULL DEFAULT '' COMMENT '网盘文件标识', - `source_category_id` int(11) NOT NULL DEFAULT 0 COMMENT '分类ID', - `sort` int(11) NOT NULL DEFAULT 99 COMMENT '排序', - `is_top` int(11) NOT NULL DEFAULT 0 COMMENT '是否置顶', - `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会议管理表'; - --- -------------------------------------------------------- - --- --- 表的结构 `qf_source_log` --- - -CREATE TABLE `qf_source_log` ( - `source_log_id` int(11) NOT NULL, - `name` varchar(255) NOT NULL DEFAULT '' COMMENT '转存任务名称', - `total_num` int(11) NOT NULL DEFAULT '0' COMMENT '转存总数', - `new_num` int(11) NOT NULL DEFAULT '0' COMMENT '新增数', - `update_num` int(11) NOT NULL DEFAULT '0' COMMENT '更新数(更新资源地址)', - `skip_num` int(11) NOT NULL DEFAULT '0' COMMENT '重复跳过数', - `fail_num` int(11) NOT NULL DEFAULT '0' COMMENT '失败数', - `fail_dec` varchar(255) DEFAULT NULL COMMENT '失败原因', - `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', - `end_time` int(11) NOT NULL DEFAULT '0' COMMENT '结束时间' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - --- -------------------------------------------------------- - --- --- 表的结构 `qf_token` --- - -CREATE TABLE `qf_token` ( - `token_id` int(11) NOT NULL, - `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID', - `token` varchar(255) NOT NULL DEFAULT '' COMMENT 'AccessToken', - `token_expires` int(11) NOT NULL DEFAULT '0' COMMENT '授权码过期时间', - `platform` varchar(255) NOT NULL DEFAULT 'all' COMMENT '来源终端', - `ip` varchar(255) NOT NULL DEFAULT '' COMMENT '登录IP', - `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '登录时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='授权信息表'; - --- -------------------------------------------------------- - --- --- 表的结构 `qf_user` --- - -CREATE TABLE `qf_user` ( - `user_id` int(11) NOT NULL COMMENT 'UID', - `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '微信openid', - `nickname` varchar(255) NOT NULL DEFAULT '' COMMENT '用户昵称', - `head_pic` varchar(512) NOT NULL DEFAULT '' COMMENT '头像', - `sex` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=保密 1=男 2=女', - `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0=禁用 1=启用', - `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', - `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='微信用户表'; - --- --- 转储表的索引 --- - --- --- 表的索引 `qf_access` --- -ALTER TABLE `qf_access` - ADD PRIMARY KEY (`access_id`) USING BTREE; - --- --- 表的索引 `qf_admin` --- -ALTER TABLE `qf_admin` - ADD PRIMARY KEY (`admin_id`) USING BTREE, - ADD KEY `admin_group` (`admin_group`) USING BTREE, - ADD KEY `admin_name` (`admin_name`) USING BTREE, - ADD KEY `admin_password` (`admin_password`) USING BTREE, - ADD KEY `admin_account` (`admin_account`) USING BTREE; - --- --- 表的索引 `qf_attach` --- -ALTER TABLE `qf_attach` - ADD PRIMARY KEY (`attach_id`) USING BTREE; - --- --- 表的索引 `qf_auth` --- -ALTER TABLE `qf_auth` - ADD PRIMARY KEY (`auth_id`) USING BTREE, - ADD KEY `role_group` (`auth_group`) USING BTREE, - ADD KEY `role_auth` (`auth_node`) USING BTREE; - --- --- 表的索引 `qf_conf` --- -ALTER TABLE `qf_conf` - ADD PRIMARY KEY (`conf_id`) USING BTREE, - ADD KEY `conf_key` (`conf_key`) USING BTREE; - --- --- 表的索引 `qf_feedback` --- -ALTER TABLE `qf_feedback` - ADD PRIMARY KEY (`id`); - --- --- 表的索引 `qf_group` --- -ALTER TABLE `qf_group` - ADD PRIMARY KEY (`group_id`) USING BTREE; - --- --- 表的索引 `qf_node` --- -ALTER TABLE `qf_node` - ADD PRIMARY KEY (`node_id`) USING BTREE, - ADD KEY `auth_pid` (`node_pid`) USING BTREE, - ADD KEY `node_module` (`node_module`) USING BTREE, - ADD KEY `node_controller` (`node_controller`) USING BTREE, - ADD KEY `node_action` (`node_action`) USING BTREE; - --- --- 表的索引 `qf_source` --- -ALTER TABLE `qf_source` - ADD PRIMARY KEY (`source_id`) USING BTREE; - --- --- 表的索引 `qf_source_log` --- -ALTER TABLE `qf_source_log` - ADD PRIMARY KEY (`source_log_id`); - --- --- 表的索引 `qf_token` --- -ALTER TABLE `qf_token` - ADD PRIMARY KEY (`token_id`) USING BTREE; - --- --- 表的索引 `qf_user` --- -ALTER TABLE `qf_user` - ADD PRIMARY KEY (`user_id`) USING BTREE; - --- --- 在导出的表使用AUTO_INCREMENT --- - --- --- 使用表AUTO_INCREMENT `qf_access` --- -ALTER TABLE `qf_access` - MODIFY `access_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; - --- --- 使用表AUTO_INCREMENT `qf_admin` --- -ALTER TABLE `qf_admin` - MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'UID', AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `qf_attach` --- -ALTER TABLE `qf_attach` - MODIFY `attach_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; - --- --- 使用表AUTO_INCREMENT `qf_auth` --- -ALTER TABLE `qf_auth` - MODIFY `auth_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '权限ID'; - --- --- 使用表AUTO_INCREMENT `qf_conf` --- -ALTER TABLE `qf_conf` - MODIFY `conf_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; - --- --- 使用表AUTO_INCREMENT `qf_feedback` --- -ALTER TABLE `qf_feedback` - MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `qf_group` --- -ALTER TABLE `qf_group` - MODIFY `group_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; - --- --- 使用表AUTO_INCREMENT `qf_node` --- -ALTER TABLE `qf_node` - MODIFY `node_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '功能ID', AUTO_INCREMENT=115; - --- --- 使用表AUTO_INCREMENT `qf_source` --- -ALTER TABLE `qf_source` - MODIFY `source_id` int(11) NOT NULL AUTO_INCREMENT; - --- --- 使用表AUTO_INCREMENT `qf_source_log` --- -ALTER TABLE `qf_source_log` - MODIFY `source_log_id` int(11) NOT NULL AUTO_INCREMENT; - --- --- 使用表AUTO_INCREMENT `qf_token` --- -ALTER TABLE `qf_token` - MODIFY `token_id` int(11) NOT NULL AUTO_INCREMENT; - --- --- 使用表AUTO_INCREMENT `qf_user` --- -ALTER TABLE `qf_user` - MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'UID'; -COMMIT; - -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/extend/baidu/baidusign.php b/extend/baidu/baidusign.php deleted file mode 100644 index 0db1bab..0000000 --- a/extend/baidu/baidusign.php +++ /dev/null @@ -1,332 +0,0 @@ - $v) { - //跳过Authorization字段 - if (strcasecmp('Authorization', $k) == 0) { - continue; - } - if (!isset($k)) { - throw new \InvalidArgumentException( - "parameter key should not be null" - ); - } - if (isset($v)) { - //对于有值的,编码后放在=号两边 - $parameterStrings[] = HttpUtil::urlEncode($k) - . '=' . HttpUtil::urlEncode((string) $v); - } else { - //对于没有值的,只将key编码后放在=号的左边,右边留空 - $parameterStrings[] = HttpUtil::urlEncode($k) . '='; - } - } - //按照字典序排序 - sort($parameterStrings); - - //使用'&'符号连接它们 - return implode('&', $parameterStrings); - } - - //生成标准化uri - public static function getCanonicalURIPath($path) - { - //空路径设置为'/' - if (empty($path)) { - return '/'; - } else { - //所有的uri必须以'/'开头 - if ($path[0] == '/') { - return HttpUtil::urlEncodeExceptSlash($path); - } else { - return '/' . HttpUtil::urlEncodeExceptSlash($path); - } - } - } - - //生成标准化http请求头串 - public static function getCanonicalHeaders($headers) - { - //如果没有headers,则返回空串 - if (count($headers) == 0) { - return ''; - } - - $headerStrings = array(); - foreach ($headers as $k => $v) { - //跳过key为null的 - if ($k === null) { - continue; - } - //如果value为null,则赋值为空串 - if ($v === null) { - $v = ''; - } - //trim后再encode,之后使用':'号连接起来 - $headerStrings[] = HttpUtil::urlEncode(strtolower(trim($k))) . ':' . HttpUtil::urlEncode(trim($v)); - } - //字典序排序 - sort($headerStrings); - - //用'\n'把它们连接起来 - return implode("\n", $headerStrings); - } - -} -HttpUtil::__init(); - - -class SampleSigner -{ - - const BCE_AUTH_VERSION = "bce-auth-v1"; - const BCE_PREFIX = 'x-bce-'; - - //不指定headersToSign情况下,默认签名http头,包括: - // 1.host - // 2.content-length - // 3.content-type - // 4.content-md5 - public static $defaultHeadersToSign; - - public static function __init() - { - SampleSigner::$defaultHeadersToSign = array( - "host", - "content-length", - "content-type", - "content-md5", - ); - } - - //签名函数 - public function sign( - array $credentials, - $httpMethod, - $path, - $headers, - $params, - $options = array() - ) { - //设定签名有效时间 - if (!isset($options[SignOption::EXPIRATION_IN_SECONDS])) { - //默认值1800秒 - $expirationInSeconds = SignOption::DEFAULT_EXPIRATION_IN_SECONDS; - } else { - $expirationInSeconds = $options[SignOption::EXPIRATION_IN_SECONDS]; - } - - //解析ak sk - $accessKeyId = $credentials['ak']; - $secretAccessKey = $credentials['sk']; - - //设定时间戳,注意:如果自行指定时间戳需要为UTC时间 - if (!isset($options[SignOption::TIMESTAMP])) { - //默认值当前时间 - $timestamp = new \DateTime(); - } else { - $timestamp = $options[SignOption::TIMESTAMP]; - } - $timestamp->setTimezone(new \DateTimeZone("UTC")); - - //生成authString - $authString = SampleSigner::BCE_AUTH_VERSION . '/' . $accessKeyId . '/' - . $timestamp->format("Y-m-d\TH:i:s\Z") . '/' . $expirationInSeconds; - - //使用sk和authString生成signKey - $signingKey = hash_hmac('sha256', $authString, $secretAccessKey); - - //生成标准化URI - $canonicalURI = HttpUtil::getCanonicalURIPath($path); - - //生成标准化QueryString - $canonicalQueryString = HttpUtil::getCanonicalQueryString($params); - - //填充headersToSign,也就是指明哪些header参与签名 - $headersToSignOption = null; - if (isset($options[SignOption::HEADERS_TO_SIGN])) { - $headersToSignOption = $options[SignOption::HEADERS_TO_SIGN]; - } - - $headersToSign = SampleSigner::getHeadersToSign($headers, $headersToSignOption); - - //生成标准化header - $canonicalHeader = HttpUtil::getCanonicalHeaders($headersToSign); - - $headersToSign = array_keys($headersToSign); - sort($headersToSign); - //整理headersToSign,以';'号连接 - $signedHeaders = ''; - if ($headersToSignOption !== null) { - $signedHeaders = strtolower( - trim(implode(";", $headersToSign)) - ); - } - - //组成标准请求串 - $canonicalRequest = "$httpMethod\n$canonicalURI\n" - . "$canonicalQueryString\n$canonicalHeader"; - - //使用signKey和标准请求串完成签名 - $signature = hash_hmac('sha256', $canonicalRequest, $signingKey); - - //组成最终签名串 - $authorizationHeader = "$authString/$signedHeaders/$signature"; - - return $authorizationHeader; - } - - /** 根据headsToSign过滤应该参与签名的header - * - * @param $headers array - * @param $headersToSign array - * @return array - */ - public static function getHeadersToSign($headers, $headersToSign) - { - - $ret = array(); - if ($headersToSign !== null) { - $tmp = array(); - - //处理headers的key:去掉前后的空白并转化成小写 - foreach ($headersToSign as $header) { - $tmp[] = strtolower(trim($header)); - } - $headersToSign = $tmp; - } - foreach ($headers as $k => $v) { - if (trim((string) $v) !== '') { - if ($headersToSign !== null) { - //预处理headersToSign:去掉前后的空白并转化成小写 - if (in_array(strtolower(trim($k)), $headersToSign)) { - $ret[$k] = $v; - } - } else { - //如果没有headersToSign,则根据默认规则来选取headers - if (SampleSigner::isDefaultHeaderToSign($k, $headersToSign)) { - $ret[$k] = $v; - } - } - } - } - return $ret; - } - - /** - * 检查header是不是默认参加签名的: - * 1.是host、content-type、content-md5、content-length之一 - * 2.以x-bce开头 - * - * @param $header string - * @return bool - */ - public static function isDefaultHeaderToSign($header) - { - $header = strtolower(trim($header)); - if (in_array($header, SampleSigner::$defaultHeadersToSign)) { - return true; - } - $prefix = substr($header, 0, strlen(SampleSigner::BCE_PREFIX)); - if ($prefix === SampleSigner::BCE_PREFIX) { - return true; - } else { - return false; - } - } -} - -SampleSigner::__init(); \ No newline at end of file diff --git a/extend/baidu/baidusmsv3.php b/extend/baidu/baidusmsv3.php deleted file mode 100644 index 6b52c80..0000000 --- a/extend/baidu/baidusmsv3.php +++ /dev/null @@ -1,148 +0,0 @@ - 'smsv3.bj.baidubce.com', - * 'accessKey' => '618888888888888888888888', - * 'secretAccessKey' => 'a6888888888888888888888888', - * ); - */ - function __construct(array $config) - { - $this->endPoint = isset($config['endPoint']) ? $config['endPoint'] : 'sms.bj.baidubce.com'; - $this->accessKey = isset($config['accessKey']) ? $config['accessKey'] : ''; - $this->secretAccessKey = isset($config['secretAccessKey']) ? $config['secretAccessKey'] : ''; - } - - public function sendMessage($message_array) - { - - //生成json格式 - $json_data = json_encode($message_array); - - //生成签名 - $signer = new SampleSigner(); - $credentials = array("ak" => $this->accessKey, "sk" => $this->secretAccessKey); - $httpMethod = "POST"; - $path = "/api/v3/sendSms"; - $params = array("clientToken" => $this->create_uuid()); - $timestamp = new \DateTime(); - $timestamp->setTimezone(new \DateTimeZone("GMT")); - $datetime = $timestamp->format("Y-m-d\TH:i:s\Z"); - //$datetime_gmt = $timestamp->format("D, d M Y H:i:s T"); - - $headers = array("Host" => $this->endPoint); - //$str_sha256 = hash('sha256', $json_data); - //$headers['x-bce-content-sha256'] = $str_sha256; - $headers['Content-Length'] = strlen($json_data); - $headers['Content-Type'] = "application/json"; - $headers['x-bce-date'] = $datetime; - $options = array(SignOption::TIMESTAMP => $timestamp, SignOption::HEADERS_TO_SIGN => array('host', 'x-bce-date',),); - $ret = $signer->sign($credentials, $httpMethod, $path, $headers, $params, $options); - $headers_curl = array( - 'Content-Type:application/json', - 'Host:' . $this->endPoint, - 'x-bce-date:' . $datetime, - 'Content-Length:' . strlen($json_data), - //'x-bce-content-sha256:' . $str_sha256, - 'Authorization:' . $ret, - //"Accept-Encoding: gzip,deflate", - //'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9) Gecko/2008052906 Firefox/3.0', - //'Date:' . $datetime_gmt, - ); - //$url = 'http://sms.bj.baidubce.com/bce/v2/message'; - $url = 'http://' . $this->endPoint . $path . "?" . http_build_query($params); - //$url = '/bce/v2/message'; - $curl = curl_init(); - curl_setopt($curl, CURLOPT_URL, $url); - curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); - //curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); - //curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); - curl_setopt($curl, CURLOPT_POST, 1); - curl_setopt($curl, CURLOPT_POSTFIELDS, $json_data); - //curl_setopt($curl, CURLOPT_HEADER, 1); - //curl_setopt($curl,CURLOPT_PROXY,'127.0.0.1:8888');//设置代理服务器 - curl_setopt($curl, CURLOPT_HTTPHEADER, $headers_curl); - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - $result = curl_exec($curl); - $errorno = curl_errno($curl); - curl_close($curl); - //print var_export($result, true); - return json_decode($result, true); - } - - private function create_uuid() - { - return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', - mt_rand(0, 0xffff), mt_rand(0, 0xffff), - mt_rand(0, 0xffff), - mt_rand(0, 0x0fff) | 0x4000, - mt_rand(0, 0x3fff) | 0x8000, - mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) - ); - } - - /** - * {} - */ - public function setEndPoint($endPoint) - { - $this->endPoint = $endPoint; - return $this; - } - - /** - * {} - */ - public function getEndPoint() - { - return $this->endPoint; - } - - /** - * {} - */ - public function setAccessKey($accessKey) - { - $this->accessKey = $accessKey; - return $this; - } - - /** - * {} - */ - public function getAccessKey() - { - return $this->accessKey; - } - - /** - * {} - */ - public function setSecretAccessKey($secretAccessKey) - { - $this->secretAccessKey = $secretAccessKey; - return $this; - } - - /** - * {} - */ - public function getSecretAccessKey() - { - return $this->secretAccessKey; - } - -} \ No newline at end of file diff --git a/extend/baidu/sendsms.php b/extend/baidu/sendsms.php deleted file mode 100644 index 162f8fe..0000000 --- a/extend/baidu/sendsms.php +++ /dev/null @@ -1,17 +0,0 @@ - 'smsv3.bj.baidubce.com', - 'accessKey' => '028xxxxxxxxxxxxxxxxxxxxxxx', - 'secretAccessKey' => '024xxxxxxxxxxxxxxxxxxxxxxxxxxx', -); -$smsClient = new Baidusmsv3($config); -$message = array( - "signatureId" => "sms-sign-jfMrIB59398", - "mobile" => $tel, - "template" => "sms-tmpl-yNtPhQ89473", - "contentVar" => array( - "code" => $code, - ), -); -echo json_encode($smsClient->sendMessage($message), JSON_UNESCAPED_UNICODE); \ No newline at end of file diff --git a/extend/phpqrcode/CHANGELOG b/extend/phpqrcode/CHANGELOG deleted file mode 100644 index a6c53d2..0000000 --- a/extend/phpqrcode/CHANGELOG +++ /dev/null @@ -1,38 +0,0 @@ -* 1.0.0 build 2010031920 - - - first public release - - help in readme, install - - cleanup ans separation of QRtools and QRspec - - now TCPDF binding requires minimal changes in TCPDF, having most of job - done in QRtools tcpdfBarcodeArray - - nicer QRtools::timeBenchmark output - - license and copyright notices in files - - indent cleanup - from tab to 4spc, keep it that way please :) - - sf project, repository, wiki - - simple code generator in index.php - -* 1.1.0 build 2010032113 - - - added merge tool wich generate merged version of code - located in phpqrcode.php - - splited qrconst.php from qrlib.php - -* 1.1.1 build 2010032405 - - - patch by Rick Seymour allowing saving PNG and displaying it at the same time - - added version info in VERSION file - - modified merge tool to include version info into generated file - - fixed e-mail in almost all head comments - -* 1.1.2 build 2010032722 - - - full integration with TCPDF thanks to Nicola Asuni, it's author - - fixed bug with alphanumeric encoding detection - -* 1.1.3 build 2010081807 - - - short opening tags replaced with standard ones - -* 1.1.4 build 2010100721 - - - added missing static keyword QRinput::check (found by Luke Brookhart, Onjax LLC) diff --git a/extend/phpqrcode/INSTALL b/extend/phpqrcode/INSTALL deleted file mode 100644 index 945c95a..0000000 --- a/extend/phpqrcode/INSTALL +++ /dev/null @@ -1,67 +0,0 @@ -== REQUIREMENTS == - - * PHP5 - * PHP GD2 extension with JPEG and PNG support - -== INSTALLATION == - -If you want to recreate cache by yourself make sure cache directory is -writable and you have permisions to write into it. Also make sure you are -able to read files in it if you have cache option enabled - -== CONFIGURATION == - -Feel free to modify config constants in qrconfig.php file. Read about it in -provided comments and project wiki page (links in README file) - -== QUICK START == - -Notice: probably you should'nt use all of this in same script :) - -encode('PHP QR Code :)'); -QRspec::debug($tab, true); - -== TCPDF INTEGRATION == - -Inside bindings/tcpdf you will find slightly modified 2dbarcodes.php. -Instal phpqrcode liblaty inside tcpdf folder, then overwrite (or merge) -2dbarcodes.php - -Then use similar as example #50 from TCPDF examples: - - true, - 'padding' => 4, - 'fgcolor' => array(0,0,0), - 'bgcolor' => false, //array(255,255,255) -); - -//code name: QR, specify error correction level after semicolon (L,M,Q,H) -$pdf->write2DBarcode('PHP QR Code :)', 'QR,L', '', '', 30, 30, $style, 'N'); diff --git a/extend/phpqrcode/LICENSE b/extend/phpqrcode/LICENSE deleted file mode 100644 index 31afd6d..0000000 --- a/extend/phpqrcode/LICENSE +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/extend/phpqrcode/README b/extend/phpqrcode/README deleted file mode 100644 index dd598f0..0000000 --- a/extend/phpqrcode/README +++ /dev/null @@ -1,45 +0,0 @@ -This is PHP implementation of QR Code 2-D barcode generator. It is pure-php -LGPL-licensed implementation based on C libqrencode by Kentaro Fukuchi. - -== LICENSING == - -Copyright (C) 2010 by Dominik Dzienia - -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 3 of the License, or any later version. - -This library is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU Lesser General Public License (LICENSE file) -for more details. - -You should have received a copy of the GNU Lesser General Public License along -with this library; if not, write to the Free Software Foundation, Inc., 51 -Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -== INSTALATION AND USAGE == - - * INSTALL file - * http://sourceforge.net/apps/mediawiki/phpqrcode/index.php?title=Main_Page - -== CONTACT == - -Fell free to contact me via e-mail (deltalab at poczta dot fm) or using -folowing project pages: - - * http://sourceforge.net/projects/phpqrcode/ - * http://phpqrcode.sourceforge.net/ - -== ACKNOWLEDGMENTS == - -Based on C libqrencode library (ver. 3.1.1) -Copyright (C) 2006-2010 by Kentaro Fukuchi -http://megaui.net/fukuchi/works/qrencode/index.en.html - -QR Code is registered trademarks of DENSO WAVE INCORPORATED in JAPAN and other -countries. - -Reed-Solomon code encoder is written by Phil Karn, KA9Q. -Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q - \ No newline at end of file diff --git a/extend/phpqrcode/VERSION b/extend/phpqrcode/VERSION deleted file mode 100644 index 2677b36..0000000 --- a/extend/phpqrcode/VERSION +++ /dev/null @@ -1,2 +0,0 @@ -1.1.4 -2010100721 \ No newline at end of file diff --git a/extend/phpqrcode/bindings/tcpdf/qrcode.php b/extend/phpqrcode/bindings/tcpdf/qrcode.php deleted file mode 100644 index 7995460..0000000 --- a/extend/phpqrcode/bindings/tcpdf/qrcode.php +++ /dev/null @@ -1,2875 +0,0 @@ - -// http://phpqrcode.sourceforge.net/ -// https://sourceforge.net/projects/phpqrcode/ -// -// The "PHP QR Code encoder" is based on -// "C libqrencode library" (ver. 3.1.1) -// License: GNU-LGPL 2.1 -// Copyright (C) 2006-2010 by Kentaro Fukuchi -// http://megaui.net/fukuchi/works/qrencode/index.en.html -// -// Reed-Solomon code encoder is written by Phil Karn, KA9Q. -// Copyright (C) 2002-2006 Phil Karn, KA9Q -// -// QR Code is registered trademark of DENSO WAVE INCORPORATED -// http://www.denso-wave.com/qrcode/index-e.html -// --------------------------------------------------------- -// -// Author: Nicola Asuni -// -// (c) Copyright 2010: -// Nicola Asuni -// Tecnick.com S.r.l. -// Via della Pace, 11 -// 09044 Quartucciu (CA) -// ITALY -// www.tecnick.com -// info@tecnick.com -//============================================================+ - -/** - * Class to create QR-code arrays for TCPDF class. - * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. - * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. - * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. - * - * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). - * Please read comments on this class source file for full copyright and license information. - * - * @package com.tecnick.tcpdf - * @abstract Class for generating QR-code array for TCPDF. - * @author Nicola Asuni - * @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com - * @link http://www.tcpdf.org - * @license http://www.gnu.org/copyleft/lesser.html LGPL - * @version 1.0.002 - */ - -// definitions -if (!defined('QRCODEDEFS')) { - - /** - * Indicate that definitions for this class are set - */ - define('QRCODEDEFS', true); - - // ----------------------------------------------------- - - // Encoding modes (characters which can be encoded in QRcode) - - /** - * Encoding mode - */ - define('QR_MODE_NL', -1); - - /** - * Encoding mode numeric (0-9). 3 characters are encoded to 10bit length. In theory, 7089 characters or less can be stored in a QRcode. - */ - define('QR_MODE_NM', 0); - - /** - * Encoding mode alphanumeric (0-9A-Z $%*+-./:) 45characters. 2 characters are encoded to 11bit length. In theory, 4296 characters or less can be stored in a QRcode. - */ - define('QR_MODE_AN', 1); - - /** - * Encoding mode 8bit byte data. In theory, 2953 characters or less can be stored in a QRcode. - */ - define('QR_MODE_8B', 2); - - /** - * Encoding mode KANJI. A KANJI character (multibyte character) is encoded to 13bit length. In theory, 1817 characters or less can be stored in a QRcode. - */ - define('QR_MODE_KJ', 3); - - /** - * Encoding mode STRUCTURED (currently unsupported) - */ - define('QR_MODE_ST', 4); - - // ----------------------------------------------------- - - // Levels of error correction. - // QRcode has a function of an error correcting for miss reading that white is black. - // Error correcting is defined in 4 level as below. - - /** - * Error correction level L : About 7% or less errors can be corrected. - */ - define('QR_ECLEVEL_L', 0); - - /** - * Error correction level M : About 15% or less errors can be corrected. - */ - define('QR_ECLEVEL_M', 1); - - /** - * Error correction level Q : About 25% or less errors can be corrected. - */ - define('QR_ECLEVEL_Q', 2); - - /** - * Error correction level H : About 30% or less errors can be corrected. - */ - define('QR_ECLEVEL_H', 3); - - // ----------------------------------------------------- - - // Version. Size of QRcode is defined as version. - // Version is from 1 to 40. - // Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. - // So version 40 is 177*177 matrix. - - /** - * Maximum QR Code version. - */ - define('QRSPEC_VERSION_MAX', 40); - - /** - * Maximum matrix size for maximum version (version 40 is 177*177 matrix). - */ - define('QRSPEC_WIDTH_MAX', 177); - - // ----------------------------------------------------- - - /** - * Matrix index to get width from $capacity array. - */ - define('QRCAP_WIDTH', 0); - - /** - * Matrix index to get number of words from $capacity array. - */ - define('QRCAP_WORDS', 1); - - /** - * Matrix index to get remainder from $capacity array. - */ - define('QRCAP_REMINDER', 2); - - /** - * Matrix index to get error correction level from $capacity array. - */ - define('QRCAP_EC', 3); - - // ----------------------------------------------------- - - // Structure (currently usupported) - - /** - * Number of header bits for structured mode - */ - define('STRUCTURE_HEADER_BITS', 20); - - /** - * Max number of symbols for structured mode - */ - define('MAX_STRUCTURED_SYMBOLS', 16); - - // ----------------------------------------------------- - - // Masks - - /** - * Down point base value for case 1 mask pattern (concatenation of same color in a line or a column) - */ - define('N1', 3); - - /** - * Down point base value for case 2 mask pattern (module block of same color) - */ - define('N2', 3); - - /** - * Down point base value for case 3 mask pattern (1:1:3:1:1(dark:bright:dark:bright:dark)pattern in a line or a column) - */ - define('N3', 40); - - /** - * Down point base value for case 4 mask pattern (ration of dark modules in whole) - */ - define('N4', 10); - - // ----------------------------------------------------- - - // Optimization settings - - /** - * if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code - */ - define('QR_FIND_BEST_MASK', true); - - /** - * if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly - */ - define('QR_FIND_FROM_RANDOM', 2); - - /** - * when QR_FIND_BEST_MASK === false - */ - define('QR_DEFAULT_MASK', 2); - - // ----------------------------------------------------- - -} // end of definitions - -// #*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# - -if (!class_exists('QRcode', false)) { - - // for compaibility with PHP4 - if (!function_exists('str_split')) { - /** - * Convert a string to an array (needed for PHP4 compatibility) - * @param string $string The input string. - * @param int $split_length Maximum length of the chunk. - * @return If the optional split_length parameter is specified, the returned array will be broken down into chunks with each being split_length in length, otherwise each chunk will be one character in length. FALSE is returned if split_length is less than 1. If the split_length length exceeds the length of string , the entire string is returned as the first (and only) array element. - */ - function str_split($string, $split_length=1) { - if ((strlen($string) > $split_length) OR (!$split_length)) { - do { - $c = strlen($string); - $parts[] = substr($string, 0, $split_length); - $string = substr($string, $split_length); - } while ($string !== false); - } else { - $parts = array($string); - } - return $parts; - } - } - - // ##################################################### - - /** - * Class to create QR-code arrays for TCPDF class. - * QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. - * The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. - * This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004. - * Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode. - * - * This class is derived from "PHP QR Code encoder" by Dominik Dzienia (http://phpqrcode.sourceforge.net/) based on "libqrencode C library 3.1.1." by Kentaro Fukuchi (http://megaui.net/fukuchi/works/qrencode/index.en.html), contains Reed-Solomon code written by Phil Karn, KA9Q. QR Code is registered trademark of DENSO WAVE INCORPORATED (http://www.denso-wave.com/qrcode/index-e.html). - * Please read comments on this class source file for full copyright and license information. - * - * @name QRcode - * @package com.tecnick.tcpdf - * @abstract Class for generating QR-code array for TCPDF. - * @author Nicola Asuni - * @copyright 2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com - * @link http://www.tcpdf.org - * @license http://www.gnu.org/copyleft/lesser.html LGPL - * @version 1.0.002 - */ - class QRcode { - - /** - * @var barcode array to be returned which is readable by TCPDF - * @access protected - */ - protected $barcode_array = array(); - - /** - * @var QR code version. Size of QRcode is defined as version. Version is from 1 to 40. Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177*177 matrix. - * @access protected - */ - protected $version = 0; - - /** - * @var Levels of error correction. See definitions for possible values. - * @access protected - */ - protected $level = QR_ECLEVEL_L; - - /** - * @var Encoding mode - * @access protected - */ - protected $hint = QR_MODE_8B; - - /** - * @var if true the input string will be converted to uppercase - * @access protected - */ - protected $casesensitive = true; - - /** - * @var structured QR code (not supported yet) - * @access protected - */ - protected $structured = 0; - - /** - * @var mask data - * @access protected - */ - protected $data; - - // FrameFiller - - /** - * @var width - * @access protected - */ - protected $width; - - /** - * @var frame - * @access protected - */ - protected $frame; - - /** - * @var X position of bit - * @access protected - */ - protected $x; - - /** - * @var Y position of bit - * @access protected - */ - protected $y; - - /** - * @var direction - * @access protected - */ - protected $dir; - - /** - * @var single bit - * @access protected - */ - protected $bit; - - // ---- QRrawcode ---- - - /** - * @var data code - * @access protected - */ - protected $datacode = array(); - - /** - * @var error correction code - * @access protected - */ - protected $ecccode = array(); - - /** - * @var blocks - * @access protected - */ - protected $blocks; - - /** - * @var Reed-Solomon blocks - * @access protected - */ - protected $rsblocks = array(); //of RSblock - - /** - * @var counter - * @access protected - */ - protected $count; - - /** - * @var data length - * @access protected - */ - protected $dataLength; - - /** - * @var error correction length - * @access protected - */ - protected $eccLength; - - /** - * @var b1 - * @access protected - */ - protected $b1; - - // ---- QRmask ---- - - /** - * @var run length - * @access protected - */ - protected $runLength = array(); - - // ---- QRsplit ---- - - /** - * @var input data string - * @access protected - */ - protected $dataStr = ''; - - /** - * @var input items - * @access protected - */ - protected $items; - - // Reed-Solomon items - - /** - * @var Reed-Solomon items - * @access protected - */ - protected $rsitems = array(); - - /** - * @var array of frames - * @access protected - */ - protected $frames = array(); - - /** - * @var alphabet-numeric convesion table - * @access protected - */ - protected $anTable = array( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, // - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, // - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, // - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // - ); - - /** - * @var array Table of the capacity of symbols - * See Table 1 (pp.13) and Table 12-16 (pp.30-36), JIS X0510:2004. - * @access protected - */ - protected $capacity = array( - array( 0, 0, 0, array( 0, 0, 0, 0)), // - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 - array( 25, 44, 7, array( 10, 16, 22, 28)), // - array( 29, 70, 7, array( 15, 26, 36, 44)), // - array( 33, 100, 7, array( 20, 36, 52, 64)), // - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 - array( 41, 172, 7, array( 36, 64, 96, 112)), // - array( 45, 196, 0, array( 40, 72, 108, 130)), // - array( 49, 242, 0, array( 48, 88, 132, 156)), // - array( 53, 292, 0, array( 60, 110, 160, 192)), // - array( 57, 346, 0, array( 72, 130, 192, 224)), // 10 - array( 61, 404, 0, array( 80, 150, 224, 264)), // - array( 65, 466, 0, array( 96, 176, 260, 308)), // - array( 69, 532, 0, array( 104, 198, 288, 352)), // - array( 73, 581, 3, array( 120, 216, 320, 384)), // - array( 77, 655, 3, array( 132, 240, 360, 432)), // 15 - array( 81, 733, 3, array( 144, 280, 408, 480)), // - array( 85, 815, 3, array( 168, 308, 448, 532)), // - array( 89, 901, 3, array( 180, 338, 504, 588)), // - array( 93, 991, 3, array( 196, 364, 546, 650)), // - array( 97, 1085, 3, array( 224, 416, 600, 700)), // 20 - array(101, 1156, 4, array( 224, 442, 644, 750)), // - array(105, 1258, 4, array( 252, 476, 690, 816)), // - array(109, 1364, 4, array( 270, 504, 750, 900)), // - array(113, 1474, 4, array( 300, 560, 810, 960)), // - array(117, 1588, 4, array( 312, 588, 870, 1050)), // 25 - array(121, 1706, 4, array( 336, 644, 952, 1110)), // - array(125, 1828, 4, array( 360, 700, 1020, 1200)), // - array(129, 1921, 3, array( 390, 728, 1050, 1260)), // - array(133, 2051, 3, array( 420, 784, 1140, 1350)), // - array(137, 2185, 3, array( 450, 812, 1200, 1440)), // 30 - array(141, 2323, 3, array( 480, 868, 1290, 1530)), // - array(145, 2465, 3, array( 510, 924, 1350, 1620)), // - array(149, 2611, 3, array( 540, 980, 1440, 1710)), // - array(153, 2761, 3, array( 570, 1036, 1530, 1800)), // - array(157, 2876, 0, array( 570, 1064, 1590, 1890)), // 35 - array(161, 3034, 0, array( 600, 1120, 1680, 1980)), // - array(165, 3196, 0, array( 630, 1204, 1770, 2100)), // - array(169, 3362, 0, array( 660, 1260, 1860, 2220)), // - array(173, 3532, 0, array( 720, 1316, 1950, 2310)), // - array(177, 3706, 0, array( 750, 1372, 2040, 2430)) // 40 - ); - - /** - * @var array Length indicator - * @access protected - */ - protected $lengthTableBits = array( - array(10, 12, 14), - array( 9, 11, 13), - array( 8, 16, 16), - array( 8, 10, 12) - ); - - /** - * @var array Table of the error correction code (Reed-Solomon block) - * See Table 12-16 (pp.30-36), JIS X0510:2004. - * @access protected - */ - protected $eccTable = array( - array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), // - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // - array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), // - array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), // - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 - array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), // - array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), // - array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), // - array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), // - array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), // 10 - array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), // - array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), // - array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), // - array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), // - array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), // 15 - array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), // - array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), // - array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), // - array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), // - array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), // 20 - array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), // - array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), // - array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), // - array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), // - array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), // 25 - array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), // - array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), // - array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), // - array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), // - array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), // 30 - array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), // - array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), // - array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), // - array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), // - array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), // 35 - array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), // - array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), // - array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), // - array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), // - array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)) // 40 - ); - - /** - * @var array Positions of alignment patterns. - * This array includes only the second and the third position of the alignment patterns. Rest of them can be calculated from the distance between them. - * See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - * @access protected - */ - protected $alignmentPattern = array( - array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 - array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), // 11-15 - array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), // 16-20 - array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), // 21-25 - array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), // 26-30 - array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), // 31-35 - array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58) // 35-40 - ); - - /** - * @var array Version information pattern (BCH coded). - * See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - * size: [QRSPEC_VERSION_MAX - 6] - * @access protected - */ - protected $versionPattern = array( - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, // - 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, // - 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, // - 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, // - 0x27541, 0x28c69 - ); - - /** - * @var array Format information - * @access protected - */ - protected $formatInfo = array( - array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), // - array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), // - array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), // - array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) // - ); - - - // ------------------------------------------------- - // ------------------------------------------------- - - - /** - * This is the class constructor. - * Creates a QRcode object - * @param string $code code to represent using QRcode - * @param string $eclevel error level:
  • L : About 7% or less errors can be corrected.
  • M : About 15% or less errors can be corrected.
  • Q : About 25% or less errors can be corrected.
  • H : About 30% or less errors can be corrected.
- * @access public - * @since 1.0.000 - */ - public function __construct($code, $eclevel = 'L') { - $barcode_array = array(); - if ((is_null($code)) OR ($code == '\0') OR ($code == '')) { - return false; - } - // set error correction level - $this->level = array_search($eclevel, array('L', 'M', 'Q', 'H')); - if ($this->level === false) { - $this->level = QR_ECLEVEL_L; - } - if (($this->hint != QR_MODE_8B) AND ($this->hint != QR_MODE_KJ)) { - return false; - } - if (($this->version < 0) OR ($this->version > QRSPEC_VERSION_MAX)) { - return false; - } - $this->items = array(); - $this->encodeString($code); - $qrTab = $this->binarize($this->data); - $size = count($qrTab); - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach (str_split($line) as $char) { - $arrAdd[] = ($char=='1')?1:0; - } - $barcode_array['bcode'][] = $arrAdd; - } - $this->barcode_array = $barcode_array; - } - - /** - * Returns a barcode array which is readable by TCPDF - * @return array barcode array readable by TCPDF; - * @access public - */ - public function getBarcodeArray() { - return $this->barcode_array; - } - - /** - * Convert the frame in binary form - * @param array $frame array to binarize - * @return array frame in binary form - */ - protected function binarize($frame) { - $len = count($frame); - // the frame is square (width = height) - foreach ($frame as &$frameLine) { - for ($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - return $frame; - } - - /** - * Encode the input string to QR code - * @param string $string input string to encode - */ - protected function encodeString($string) { - $this->dataStr = $string; - if (!$this->casesensitive) { - $this->toUpper(); - } - $ret = $this->splitString(); - if ($ret < 0) { - return NULL; - } - $this->encodeMask(-1); - } - - /** - * Encode mask - * @param int $mask masking mode - */ - protected function encodeMask($mask) { - $spec = array(0, 0, 0, 0, 0); - $this->datacode = $this->getByteStream($this->items); - if (is_null($this->datacode)) { - return NULL; - } - $spec = $this->getEccSpec($this->version, $this->level, $spec); - $this->b1 = $this->rsBlockNum1($spec); - $this->dataLength = $this->rsDataLength($spec); - $this->eccLength = $this->rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = $this->rsBlockNum($spec); - $ret = $this->init($spec); - if ($ret < 0) { - return NULL; - } - $this->count = 0; - $this->width = $this->getWidth($this->version); - $this->frame = $this->newFrame($this->version); - $this->x = $this->width - 1; - $this->y = $this->width - 1; - $this->dir = -1; - $this->bit = -1; - // inteleaved data and ecc codes - for ($i=0; $i < ($this->dataLength + $this->eccLength); $i++) { - $code = $this->getCode(); - $bit = 0x80; - for ($j=0; $j<8; $j++) { - $addr = $this->getNextPosition(); - $this->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - // remainder bits - $j = $this->getRemainder($this->version); - for ($i=0; $i<$j; $i++) { - $addr = $this->getNextPosition(); - $this->setFrameAt($addr, 0x02); - } - // masking - $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); - if ($mask < 0) { - if (QR_FIND_BEST_MASK) { - $masked = $this->mask($this->width, $this->frame, $this->level); - } else { - $masked = $this->makeMask($this->width, $this->frame, (intval(QR_DEFAULT_MASK) % 8), $this->level); - } - } else { - $masked = $this->makeMask($this->width, $this->frame, $mask, $this->level); - } - if ($masked == NULL) { - return NULL; - } - $this->data = $masked; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // FrameFiller - - /** - * Set frame value at specified position - * @param array $at x,y position - * @param int $val value of the character to set - */ - protected function setFrameAt($at, $val) { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - /** - * Get frame value at specified position - * @param array $at x,y position - * @return value at specified position - */ - protected function getFrameAt($at) { - return ord($this->frame[$at['y']][$at['x']]); - } - - /** - * Return the next frame position - * @return array of x,y coordinates - */ - protected function getNextPosition() { - do { - if ($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - $x = $this->x; - $y = $this->y; - $w = $this->width; - if ($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - if ($this->dir < 0) { - if ($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if ($x == 6) { - $x--; - $y = 9; - } - } - } else { - if ($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if ($x == 6) { - $x--; - $y -= 8; - } - } - } - if (($x < 0) OR ($y < 0)) { - return NULL; - } - $this->x = $x; - $this->y = $y; - } while(ord($this->frame[$y][$x]) & 0x80); - return array('x'=>$x, 'y'=>$y); - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrawcode - - /** - * Initialize code. - * @param array $spec array of ECC specification - * @return 0 in case of success, -1 in case of error - */ - protected function init($spec) { - $dl = $this->rsDataCodes1($spec); - $el = $this->rsEccCodes1($spec); - $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - $endfor = $this->rsBlockNum1($spec); - for ($i=0; $i < $endfor; ++$i) { - $ecc = array_slice($this->ecccode, $eccPos); - $this->rsblocks[$blockNo] = array(); - $this->rsblocks[$blockNo]['dataLength'] = $dl; - $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); - $this->rsblocks[$blockNo]['eccLength'] = $el; - $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); - $this->rsblocks[$blockNo]['ecc'] = $ecc; - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - if ($this->rsBlockNum2($spec) == 0) { - return 0; - } - $dl = $this->rsDataCodes2($spec); - $el = $this->rsEccCodes2($spec); - $rs = $this->init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - if ($rs == NULL) { - return -1; - } - $endfor = $this->rsBlockNum2($spec); - for ($i=0; $i < $endfor; ++$i) { - $ecc = array_slice($this->ecccode, $eccPos); - $this->rsblocks[$blockNo] = array(); - $this->rsblocks[$blockNo]['dataLength'] = $dl; - $this->rsblocks[$blockNo]['data'] = array_slice($this->datacode, $dataPos); - $this->rsblocks[$blockNo]['eccLength'] = $el; - $ecc = $this->encode_rs_char($rs, $this->rsblocks[$blockNo]['data'], $ecc); - $this->rsblocks[$blockNo]['ecc'] = $ecc; - $this->ecccode = array_merge(array_slice($this->ecccode, 0, $eccPos), $ecc); - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - return 0; - } - - /** - * Return Reed-Solomon block code. - * @return array rsblocks - */ - protected function getCode() { - if ($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if ($col >= $this->rsblocks[0]['dataLength']) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]['data'][$col]; - } elseif ($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]['ecc'][$col]; - } else { - return 0; - } - $this->count++; - return $ret; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRmask - - /** - * Write Format Information on frame and returns the number of black bits - * @param int $width frame width - * @param array $frame frame - * @param array $mask masking mode - * @param int $level error correction level - * @return int blacks - */ - protected function writeFormatInformation($width, &$frame, $mask, $level) { - $blacks = 0; - $format = $this->getFormatInfo($mask, $level); - for ($i=0; $i<8; ++$i) { - if ($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - $frame[8][$width - 1 - $i] = chr($v); - if ($i < 6) { - $frame[$i][8] = chr($v); - } else { - $frame[$i + 1][8] = chr($v); - } - $format = $format >> 1; - } - for ($i=0; $i<7; ++$i) { - if ($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - $frame[$width - 7 + $i][8] = chr($v); - if ($i == 0) { - $frame[8][7] = chr($v); - } else { - $frame[8][6 - $i] = chr($v); - } - $format = $format >> 1; - } - return $blacks; - } - - /** - * mask0 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask0($x, $y) { - return ($x + $y) & 1; - } - - /** - * mask1 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask1($x, $y) { - return ($y & 1); - } - - /** - * mask2 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask2($x, $y) { - return ($x % 3); - } - - /** - * mask3 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask3($x, $y) { - return ($x + $y) % 3; - } - - /** - * mask4 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask4($x, $y) { - return (((int)($y / 2)) + ((int)($x / 3))) & 1; - } - - /** - * mask5 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask5($x, $y) { - return (($x * $y) & 1) + ($x * $y) % 3; - } - - /** - * mask6 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask6($x, $y) { - return ((($x * $y) & 1) + ($x * $y) % 3) & 1; - } - - /** - * mask7 - * @param int $x X position - * @param int $y Y position - * @return int mask - */ - protected function mask7($x, $y) { - return ((($x * $y) % 3) + (($x + $y) & 1)) & 1; - } - - /** - * Return bitmask - * @param int $maskNo mask number - * @param int $width width - * @param array $frame frame - * @return array bitmask - */ - protected function generateMaskNo($maskNo, $width, $frame) { - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($y=0; $y<$width; ++$y) { - for ($x=0; $x<$width; ++$x) { - if (ord($frame[$y][$x]) & 0x80) { - $bitMask[$y][$x] = 0; - } else { - $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); - $bitMask[$y][$x] = ($maskFunc == 0)?1:0; - } - } - } - return $bitMask; - } - - /** - * makeMaskNo - * @param int $maskNo - * @param int $width - * @param int $s - * @param int $d - * @param boolean $maskGenOnly - * @return int b - */ - protected function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly=false) { - $b = 0; - $bitMask = array(); - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - if ($maskGenOnly) { - return; - } - $d = $s; - for ($y=0; $y<$width; ++$y) { - for ($x=0; $x<$width; ++$x) { - if ($bitMask[$y][$x] == 1) { - $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); - } - $b += (int)(ord($d[$y][$x]) & 1); - } - } - return $b; - } - - /** - * makeMask - * @param int $width - * @param array $frame - * @param int $maskNo - * @param int $level - * @return array mask - */ - protected function makeMask($width, $frame, $maskNo, $level) { - $masked = array_fill(0, $width, str_repeat("\0", $width)); - $this->makeMaskNo($maskNo, $width, $frame, $masked); - $this->writeFormatInformation($width, $masked, $maskNo, $level); - return $masked; - } - - /** - * calcN1N3 - * @param int $length - * @return int demerit - */ - protected function calcN1N3($length) { - $demerit = 0; - for ($i=0; $i<$length; ++$i) { - if ($this->runLength[$i] >= 5) { - $demerit += (N1 + ($this->runLength[$i] - 5)); - } - if ($i & 1) { - if (($i >= 3) AND ($i < ($length-2)) AND ($this->runLength[$i] % 3 == 0)) { - $fact = (int)($this->runLength[$i] / 3); - if (($this->runLength[$i-2] == $fact) - AND ($this->runLength[$i-1] == $fact) - AND ($this->runLength[$i+1] == $fact) - AND ($this->runLength[$i+2] == $fact)) { - if (($this->runLength[$i-3] < 0) OR ($this->runLength[$i-3] >= (4 * $fact))) { - $demerit += N3; - } elseif ((($i+3) >= $length) OR ($this->runLength[$i+3] >= (4 * $fact))) { - $demerit += N3; - } - } - } - } - } - return $demerit; - } - - /** - * evaluateSymbol - * @param int $width - * @param array $frame - * @return int demerit - */ - protected function evaluateSymbol($width, $frame) { - $head = 0; - $demerit = 0; - for ($y=0; $y<$width; ++$y) { - $head = 0; - $this->runLength[0] = 1; - $frameY = $frame[$y]; - if ($y > 0) { - $frameYM = $frame[$y-1]; - } - for ($x=0; $x<$width; ++$x) { - if (($x > 0) AND ($y > 0)) { - $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); - $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); - if (($b22 | ($w22 ^ 1)) & 1) { - $demerit += N2; - } - } - if (($x == 0) AND (ord($frameY[$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } elseif ($x > 0) { - if ((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - $demerit += $this->calcN1N3($head+1); - } - for ($x=0; $x<$width; ++$x) { - $head = 0; - $this->runLength[0] = 1; - for ($y=0; $y<$width; ++$y) { - if (($y == 0) AND (ord($frame[$y][$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } elseif ($y > 0) { - if ((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - $demerit += $this->calcN1N3($head+1); - } - return $demerit; - } - - /** - * mask - * @param int $width - * @param array $frame - * @param int $level - * @return array best mask - */ - protected function mask($width, $frame, $level) { - $minDemerit = PHP_INT_MAX; - $bestMaskNum = 0; - $bestMask = array(); - $checked_masks = array(0, 1, 2, 3, 4, 5, 6, 7); - if (QR_FIND_FROM_RANDOM !== false) { - $howManuOut = 8 - (QR_FIND_FROM_RANDOM % 9); - for ($i = 0; $i < $howManuOut; ++$i) { - $remPos = rand (0, count($checked_masks)-1); - unset($checked_masks[$remPos]); - $checked_masks = array_values($checked_masks); - } - } - $bestMask = $frame; - foreach ($checked_masks as $i) { - $mask = array_fill(0, $width, str_repeat("\0", $width)); - $demerit = 0; - $blacks = 0; - $blacks = $this->makeMaskNo($i, $width, $frame, $mask); - $blacks += $this->writeFormatInformation($width, $mask, $i, $level); - $blacks = (int)(100 * $blacks / ($width * $width)); - $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); - $demerit += $this->evaluateSymbol($width, $mask); - if ($demerit < $minDemerit) { - $minDemerit = $demerit; - $bestMask = $mask; - $bestMaskNum = $i; - } - } - return $bestMask; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRsplit - - /** - * Return true if the character at specified position is a number - * @param string $str string - * @param int $pos characted position - * @return boolean true of false - */ - protected function isdigitat($str, $pos) { - if ($pos >= strlen($str)) { - return false; - } - return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); - } - - /** - * Return true if the character at specified position is an alphanumeric character - * @param string $str string - * @param int $pos characted position - * @return boolean true of false - */ - protected function isalnumat($str, $pos) { - if ($pos >= strlen($str)) { - return false; - } - return ($this->lookAnTable(ord($str[$pos])) >= 0); - } - - /** - * identifyMode - * @param int $pos - * @return int mode - */ - protected function identifyMode($pos) { - if ($pos >= strlen($this->dataStr)) { - return QR_MODE_NL; - } - $c = $this->dataStr[$pos]; - if ($this->isdigitat($this->dataStr, $pos)) { - return QR_MODE_NM; - } elseif ($this->isalnumat($this->dataStr, $pos)) { - return QR_MODE_AN; - } elseif ($this->hint == QR_MODE_KJ) { - if ($pos+1 < strlen($this->dataStr)) { - $d = $this->dataStr[$pos+1]; - $word = (ord($c) << 8) | ord($d); - if (($word >= 0x8140 && $word <= 0x9ffc) OR ($word >= 0xe040 && $word <= 0xebbf)) { - return QR_MODE_KJ; - } - } - } - return QR_MODE_8B; - } - - /** - * eatNum - * @return int run - */ - protected function eatNum() { - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 0; - while($this->isdigitat($this->dataStr, $p)) { - $p++; - } - $run = $p; - $mode = $this->identifyMode($p); - if ($mode == QR_MODE_8B) { - $dif = $this->estimateBitsModeNum($run) + 4 + $ln - + $this->estimateBitsMode8(1) // + 4 + l8 - - $this->estimateBitsMode8($run + 1); // - 4 - l8 - if ($dif > 0) { - return $this->eat8(); - } - } - if ($mode == QR_MODE_AN) { - $dif = $this->estimateBitsModeNum($run) + 4 + $ln - + $this->estimateBitsModeAn(1) // + 4 + la - - $this->estimateBitsModeAn($run + 1);// - 4 - la - if ($dif > 0) { - return $this->eatAn(); - } - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_NM, $run, str_split($this->dataStr)); - return $run; - } - - /** - * eatAn - * @return int run - */ - protected function eatAn() { - $la = $this->lengthIndicator(QR_MODE_AN, $this->version); - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 0; - while($this->isalnumat($this->dataStr, $p)) { - if ($this->isdigitat($this->dataStr, $p)) { - $q = $p; - while($this->isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsModeAn($p) // + 4 + la - + $this->estimateBitsModeNum($q - $p) + 4 + $ln - - $this->estimateBitsModeAn($q); // - 4 - la - if ($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - $run = $p; - if (!$this->isalnumat($this->dataStr, $p)) { - $dif = $this->estimateBitsModeAn($run) + 4 + $la - + $this->estimateBitsMode8(1) // + 4 + l8 - - $this->estimateBitsMode8($run + 1); // - 4 - l8 - if ($dif > 0) { - return $this->eat8(); - } - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_AN, $run, str_split($this->dataStr)); - return $run; - } - - /** - * eatKanji - * @return int run - */ - protected function eatKanji() { - $p = 0; - while($this->identifyMode($p) == QR_MODE_KJ) { - $p += 2; - } - $this->items = $this->appendNewInputItem($this->items, QR_MODE_KJ, $p, str_split($this->dataStr)); - return $run; - } - - /** - * eat8 - * @return int run - */ - protected function eat8() { - $la = $this->lengthIndicator(QR_MODE_AN, $this->version); - $ln = $this->lengthIndicator(QR_MODE_NM, $this->version); - $p = 1; - $dataStrLen = strlen($this->dataStr); - while($p < $dataStrLen) { - $mode = $this->identifyMode($p); - if ($mode == QR_MODE_KJ) { - break; - } - if ($mode == QR_MODE_NM) { - $q = $p; - while($this->isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsMode8($p) // + 4 + l8 - + $this->estimateBitsModeNum($q - $p) + 4 + $ln - - $this->estimateBitsMode8($q); // - 4 - l8 - if ($dif < 0) { - break; - } else { - $p = $q; - } - } elseif ($mode == QR_MODE_AN) { - $q = $p; - while($this->isalnumat($this->dataStr, $q)) { - $q++; - } - $dif = $this->estimateBitsMode8($p) // + 4 + l8 - + $this->estimateBitsModeAn($q - $p) + 4 + $la - - $this->estimateBitsMode8($q); // - 4 - l8 - if ($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - $run = $p; - $this->items = $this->appendNewInputItem($this->items, QR_MODE_8B, $run, str_split($this->dataStr)); - return $run; - } - - /** - * splitString - */ - protected function splitString() { - while (strlen($this->dataStr) > 0) { - if ($this->dataStr == '') { - return 0; - } - $mode = $this->identifyMode(0); - switch ($mode) { - case QR_MODE_NM: { - $length = $this->eatNum(); - break; - } - case QR_MODE_AN: { - $length = $this->eatAn(); - break; - } - case QR_MODE_KJ: { - if ($hint == QR_MODE_KJ) { - $length = $this->eatKanji(); - } else { - $length = $this->eat8(); - } - break; - } - default: { - $length = $this->eat8(); - break; - } - } - if ($length == 0) { - return 0; - } - if ($length < 0) { - return -1; - } - $this->dataStr = substr($this->dataStr, $length); - } - } - - /** - * toUpper - */ - protected function toUpper() { - $stringLen = strlen($this->dataStr); - $p = 0; - while ($p < $stringLen) { - $mode = $this->identifyMode(substr($this->dataStr, $p), $this->hint); - if ($mode == QR_MODE_KJ) { - $p += 2; - } else { - if ((ord($this->dataStr[$p]) >= ord('a')) AND (ord($this->dataStr[$p]) <= ord('z'))) { - $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); - } - $p++; - } - } - return $this->dataStr; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRinputItem - - /** - * newInputItem - * @param int $mode - * @param int $size - * @param array $data - * @param array $bstream - * @return array input item - */ - protected function newInputItem($mode, $size, $data, $bstream=null) { - $setData = array_slice($data, 0, $size); - if (count($setData) < $size) { - $setData = array_merge($setData, array_fill(0, ($size - count($setData)), 0)); - } - if (!$this->check($mode, $size, $setData)) { - return NULL; - } - $inputitem = array(); - $inputitem['mode'] = $mode; - $inputitem['size'] = $size; - $inputitem['data'] = $setData; - $inputitem['bstream'] = $bstream; - return $inputitem; - } - - /** - * encodeModeNum - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeNum($inputitem, $version) { - $words = (int)($inputitem['size'] / 3); - $inputitem['bstream'] = array(); - $val = 0x1; - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_NM, $version), $inputitem['size']); - for ($i=0; $i < $words; ++$i) { - $val = (ord($inputitem['data'][$i*3 ]) - ord('0')) * 100; - $val += (ord($inputitem['data'][$i*3+1]) - ord('0')) * 10; - $val += (ord($inputitem['data'][$i*3+2]) - ord('0')); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 10, $val); - } - if ($inputitem['size'] - $words * 3 == 1) { - $val = ord($inputitem['data'][$words*3]) - ord('0'); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, $val); - } elseif (($inputitem['size'] - ($words * 3)) == 2) { - $val = (ord($inputitem['data'][$words*3 ]) - ord('0')) * 10; - $val += (ord($inputitem['data'][$words*3+1]) - ord('0')); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 7, $val); - } - return $inputitem; - } - - /** - * encodeModeAn - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeAn($inputitem, $version) { - $words = (int)($inputitem['size'] / 2); - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02); - $inputitem['bstream'] = $this->appendNum(v, $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']); - for ($i=0; $i < $words; ++$i) { - $val = (int)$this->lookAnTable(ord($inputitem['data'][$i*2 ])) * 45; - $val += (int)$this->lookAnTable(ord($inputitem['data'][$i*2+1])); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val); - } - if ($inputitem['size'] & 1) { - $val = $this->lookAnTable(ord($inputitem['data'][($words * 2)])); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 6, $val); - } - return $inputitem; - } - - /** - * encodeMode8 - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeMode8($inputitem, $version) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x4); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_8B, $version), $inputitem['size']); - for ($i=0; $i < $inputitem['size']; ++$i) { - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][$i])); - } - return $inputitem; - } - - /** - * encodeModeKanji - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeModeKanji($inputitem, $version) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x8); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_KJ, $version), (int)($inputitem['size'] / 2)); - for ($i=0; $i<$inputitem['size']; $i+=2) { - $val = (ord($inputitem['data'][$i]) << 8) | ord($inputitem['data'][$i+1]); - if ($val <= 0x9ffc) { - $val -= 0x8140; - } else { - $val -= 0xc140; - } - $h = ($val >> 8) * 0xc0; - $val = ($val & 0xff) + $h; - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 13, $val); - } - return $inputitem; - } - - /** - * encodeModeStructure - * @param array $inputitem - * @return array input item - */ - protected function encodeModeStructure($inputitem) { - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x03); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][1]) - 1); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, ord($inputitem['data'][0]) - 1); - $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 8, ord($inputitem['data'][2])); - return $inputitem; - } - - /** - * encodeBitStream - * @param array $inputitem - * @param int $version - * @return array input item - */ - protected function encodeBitStream($inputitem, $version) { - $inputitem['bstream'] = array(); - $words = $this->maximumWords($inputitem['mode'], $version); - if ($inputitem['size'] > $words) { - $st1 = $this->newInputItem($inputitem['mode'], $words, $inputitem['data']); - $st2 = $this->newInputItem($inputitem['mode'], $inputitem['size'] - $words, array_slice($inputitem['data'], $words)); - $st1 = $this->encodeBitStream($st1, $version); - $st2 = $this->encodeBitStream($st2, $version); - $inputitem['bstream'] = array(); - $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st1['bstream']); - $inputitem['bstream'] = $this->appendBitstream($inputitem['bstream'], $st2['bstream']); - } else { - switch($inputitem['mode']) { - case QR_MODE_NM: { - $inputitem = $this->encodeModeNum($inputitem, $version); - break; - } - case QR_MODE_AN: { - $inputitem = $this->encodeModeAn($inputitem, $version); - break; - } - case QR_MODE_8B: { - $inputitem = $this->encodeMode8($inputitem, $version); - break; - } - case QR_MODE_KJ: { - $inputitem = $this->encodeModeKanji($inputitem, $version); - break; - } - case QR_MODE_ST: { - $inputitem = $this->encodeModeStructure($inputitem); - break; - } - default: { - break; - } - } - } - return $inputitem; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRinput - - /** - * Append data to an input object. - * The data is copied and appended to the input object. - * @param array items input items - * @param int $mode encoding mode. - * @param int $size size of data (byte). - * @param array $data array of input data. - * @return items - * - */ - protected function appendNewInputItem($items, $mode, $size, $data) { - $items[] = $this->newInputItem($mode, $size, $data); - return $items; - } - - /** - * insertStructuredAppendHeader - * @param array $items - * @param int $size - * @param int $index - * @param int $parity - * @return array items - */ - protected function insertStructuredAppendHeader($items, $size, $index, $parity) { - if ($size > MAX_STRUCTURED_SYMBOLS) { - return -1; - } - if (($index <= 0) OR ($index > MAX_STRUCTURED_SYMBOLS)) { - return -1; - } - $buf = array($size, $index, $parity); - $entry = $this->newInputItem(QR_MODE_ST, 3, buf); - array_unshift($items, $entry); - return $items; - } - - /** - * calcParity - * @param array $items - * @return int parity - */ - protected function calcParity($items) { - $parity = 0; - foreach ($items as $item) { - if ($item['mode'] != QR_MODE_ST) { - for ($i=$item['size']-1; $i>=0; --$i) { - $parity ^= $item['data'][$i]; - } - } - } - return $parity; - } - - /** - * checkModeNum - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeNum($size, $data) { - for ($i=0; $i<$size; ++$i) { - if ((ord($data[$i]) < ord('0')) OR (ord($data[$i]) > ord('9'))){ - return false; - } - } - return true; - } - - /** - * estimateBitsModeNum - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeNum($size) { - $w = (int)$size / 3; - $bits = $w * 10; - switch($size - $w * 3) { - case 1: { - $bits += 4; - break; - } - case 2: { - $bits += 7; - break; - } - default: { - break; - } - } - return $bits; - } - - /** - * Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). - * @param int $c character value - * @return value - */ - protected function lookAnTable($c) { - return (($c > 127)?-1:$this->anTable[$c]); - } - - /** - * checkModeAn - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeAn($size, $data) { - for ($i=0; $i<$size; ++$i) { - if ($this->lookAnTable(ord($data[$i])) == -1) { - return false; - } - } - return true; - } - - /** - * estimateBitsModeAn - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeAn($size) { - $w = (int)($size / 2); - $bits = $w * 11; - if ($size & 1) { - $bits += 6; - } - return $bits; - } - - /** - * estimateBitsMode8 - * @param int $size - * @return int number of bits - */ - protected function estimateBitsMode8($size) { - return $size * 8; - } - - /** - * estimateBitsModeKanji - * @param int $size - * @return int number of bits - */ - protected function estimateBitsModeKanji($size) { - return (int)(($size / 2) * 13); - } - - /** - * checkModeKanji - * @param int $size - * @param array $data - * @return boolean true or false - */ - protected function checkModeKanji($size, $data) { - if ($size & 1) { - return false; - } - for ($i=0; $i<$size; $i+=2) { - $val = (ord($data[$i]) << 8) | ord($data[$i+1]); - if (($val < 0x8140) OR (($val > 0x9ffc) AND ($val < 0xe040)) OR ($val > 0xebbf)) { - return false; - } - } - return true; - } - - /** - * Validate the input data. - * @param int $mode encoding mode. - * @param int $size size of data (byte). - * @param array data data to validate - * @return boolean true in case of valid data, false otherwise - */ - protected function check($mode, $size, $data) { - if ($size <= 0) { - return false; - } - switch($mode) { - case QR_MODE_NM: { - return $this->checkModeNum($size, $data); - } - case QR_MODE_AN: { - return $this->checkModeAn($size, $data); - } - case QR_MODE_KJ: { - return $this->checkModeKanji($size, $data); - } - case QR_MODE_8B: { - return true; - } - case QR_MODE_ST: { - return true; - } - default: { - break; - } - } - return false; - } - - /** - * estimateBitStreamSize - * @param array $items - * @param int $version - * @return int bits - */ - protected function estimateBitStreamSize($items, $version) { - $bits = 0; - if ($version == 0) { - $version = 1; - } - foreach ($items as $item) { - switch($item['mode']) { - case QR_MODE_NM: { - $bits = $this->estimateBitsModeNum($item['size']); - break; - } - case QR_MODE_AN: { - $bits = $this->estimateBitsModeAn($item['size']); - break; - } - case QR_MODE_8B: { - $bits = $this->estimateBitsMode8($item['size']); - break; - } - case QR_MODE_KJ: { - $bits = $this->estimateBitsModeKanji($item['size']); - break; - } - case QR_MODE_ST: { - return STRUCTURE_HEADER_BITS; - } - default: { - return 0; - } - } - $l = $this->lengthIndicator($item['mode'], $version); - $m = 1 << $l; - $num = (int)(($item['size'] + $m - 1) / $m); - $bits += $num * (4 + $l); - } - return $bits; - } - - /** - * estimateVersion - * @param array $items - * @return int version - */ - protected function estimateVersion($items) { - $version = 0; - $prev = 0; - do { - $prev = $version; - $bits = $this->estimateBitStreamSize($items, $prev); - $version = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($version < 0) { - return -1; - } - } while ($version > $prev); - return $version; - } - - /** - * lengthOfCode - * @param int $mode - * @param int $version - * @param int $bits - * @return int size - */ - protected function lengthOfCode($mode, $version, $bits) { - $payload = $bits - 4 - $this->lengthIndicator($mode, $version); - switch($mode) { - case QR_MODE_NM: { - $chunks = (int)($payload / 10); - $remain = $payload - $chunks * 10; - $size = $chunks * 3; - if ($remain >= 7) { - $size += 2; - } elseif ($remain >= 4) { - $size += 1; - } - break; - } - case QR_MODE_AN: { - $chunks = (int)($payload / 11); - $remain = $payload - $chunks * 11; - $size = $chunks * 2; - if ($remain >= 6) { - ++$size; - } - break; - } - case QR_MODE_8B: { - $size = (int)($payload / 8); - break; - } - case QR_MODE_KJ: { - $size = (int)(($payload / 13) * 2); - break; - } - case QR_MODE_ST: { - $size = (int)($payload / 8); - break; - } - default: { - $size = 0; - break; - } - } - $maxsize = $this->maximumWords($mode, $version); - if ($size < 0) { - $size = 0; - } - if ($size > $maxsize) { - $size = $maxsize; - } - return $size; - } - - /** - * createBitStream - * @param array $items - * @return array of items and total bits - */ - protected function createBitStream($items) { - $total = 0; - foreach ($items as $key => $item) { - $items[$key] = $this->encodeBitStream($item, $this->version); - $bits = count($items[$key]['bstream']); - $total += $bits; - } - return array($items, $total); - } - - /** - * convertData - * @param array $items - * @return array items - */ - protected function convertData($items) { - $ver = $this->estimateVersion($items); - if ($ver > $this->version) { - $this->version = $ver; - } - for (;;) { - $cbs = $this->createBitStream($items); - $items = $cbs[0]; - $bits = $cbs[1]; - if ($bits < 0) { - return -1; - } - $ver = $this->getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($ver < 0) { - return -1; - } elseif ($ver > $this->version) { - $this->version = $ver; - } else { - break; - } - } - return $items; - } - - /** - * Append Padding Bit to bitstream - * @param array $bstream - * @return array bitstream - */ - protected function appendPaddingBit($bstream) { - $bits = count($bstream); - $maxwords = $this->getDataLength($this->version, $this->level); - $maxbits = $maxwords * 8; - if ($maxbits == $bits) { - return 0; - } - if ($maxbits - $bits < 5) { - return $this->appendNum($bstream, $maxbits - $bits, 0); - } - $bits += 4; - $words = (int)(($bits + 7) / 8); - $padding = array(); - $padding = $this->appendNum($padding, $words * 8 - $bits + 4, 0); - $padlen = $maxwords - $words; - if ($padlen > 0) { - $padbuf = array(); - for ($i=0; $i<$padlen; ++$i) { - $padbuf[$i] = ($i&1)?0x11:0xec; - } - $padding = $this->appendBytes($padding, $padlen, $padbuf); - } - return $this->appendBitstream($bstream, $padding); - } - - /** - * mergeBitStream - * @param array $bstream - * @return array bitstream - */ - protected function mergeBitStream($items) { - $items = $this->convertData($items); - $bstream = array(); - foreach ($items as $item) { - $bstream = $this->appendBitstream($bstream, $item['bstream']); - } - return $bstream; - } - - /** - * Returns a stream of bits. - * @param int $items - * @return array padded merged byte stream - */ - protected function getBitStream($items) { - $bstream = $this->mergeBitStream($items); - return $this->appendPaddingBit($bstream); - } - - /** - * Pack all bit streams padding bits into a byte array. - * @param int $items - * @return array padded merged byte stream - */ - protected function getByteStream($items) { - $bstream = $this->getBitStream($items); - return $this->bitstreamToByte($bstream); - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRbitstream - - /** - * Return an array with zeros - * @param int $setLength array size - * @return array - */ - protected function allocate($setLength) { - return array_fill(0, $setLength, 0); - } - - /** - * Return new bitstream from number - * @param int $bits number of bits - * @param int $num number - * @return array bitstream - */ - protected function newFromNum($bits, $num) { - $bstream = $this->allocate($bits); - $mask = 1 << ($bits - 1); - for ($i=0; $i<$bits; ++$i) { - if ($num & $mask) { - $bstream[$i] = 1; - } else { - $bstream[$i] = 0; - } - $mask = $mask >> 1; - } - return $bstream; - } - - /** - * Return new bitstream from bytes - * @param int $size size - * @param array $data bytes - * @return array bitstream - */ - protected function newFromBytes($size, $data) { - $bstream = $this->allocate($size * 8); - $p=0; - for ($i=0; $i<$size; ++$i) { - $mask = 0x80; - for ($j=0; $j<8; ++$j) { - if ($data[$i] & $mask) { - $bstream[$p] = 1; - } else { - $bstream[$p] = 0; - } - $p++; - $mask = $mask >> 1; - } - } - return $bstream; - } - - /** - * Append one bitstream to another - * @param array $bitstream original bitstream - * @param array $append bitstream to append - * @return array bitstream - */ - protected function appendBitstream($bitstream, $append) { - if ((!is_array($append)) OR (count($append) == 0)) { - return $bitstream; - } - if (count($bitstream) == 0) { - return $append; - } - return array_values(array_merge($bitstream, $append)); - } - - /** - * Append one bitstream created from number to another - * @param array $bitstream original bitstream - * @param int $bits number of bits - * @param int $num number - * @return array bitstream - */ - protected function appendNum($bitstream, $bits, $num) { - if ($bits == 0) { - return 0; - } - $b = $this->newFromNum($bits, $num); - return $this->appendBitstream($bitstream, $b); - } - - /** - * Append one bitstream created from bytes to another - * @param array $bitstream original bitstream - * @param int $size size - * @param array $data bytes - * @return array bitstream - */ - protected function appendBytes($bitstream, $size, $data) { - if ($size == 0) { - return 0; - } - $b = $this->newFromBytes($size, $data); - return $this->appendBitstream($bitstream, $b); - } - - /** - * Convert bitstream to bytes - * @param array $bitstream original bitstream - * @return array of bytes - */ - protected function bitstreamToByte($bstream) { - $size = count($bstream); - if ($size == 0) { - return array(); - } - $data = array_fill(0, (int)(($size + 7) / 8), 0); - $bytes = (int)($size / 8); - $p = 0; - for ($i=0; $i<$bytes; $i++) { - $v = 0; - for ($j=0; $j<8; $j++) { - $v = $v << 1; - $v |= $bstream[$p]; - $p++; - } - $data[$i] = $v; - } - if ($size & 7) { - $v = 0; - for ($j=0; $j<($size & 7); $j++) { - $v = $v << 1; - $v |= $bstream[$p]; - $p++; - } - $data[$bytes] = $v; - } - return $data; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRspec - - /** - * Replace a value on the array at the specified position - * @param array $srctab - * @param int $x X position - * @param int $y Y position - * @param string $repl value to replace - * @param int $replLen length of the repl string - * @return array srctab - */ - protected function qrstrset($srctab, $x, $y, $repl, $replLen=false) { - $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); - return $srctab; - } - - /** - * Return maximum data code length (bytes) for the version. - * @param int $version version - * @param int $level error correction level - * @return int maximum size (bytes) - */ - protected function getDataLength($version, $level) { - return $this->capacity[$version][QRCAP_WORDS] - $this->capacity[$version][QRCAP_EC][$level]; - } - - /** - * Return maximum error correction code length (bytes) for the version. - * @param int $version version - * @param int $level error correction level - * @return int ECC size (bytes) - */ - protected function getECCLength($version, $level){ - return $this->capacity[$version][QRCAP_EC][$level]; - } - - /** - * Return the width of the symbol for the version. - * @param int $version version - * @return int width - */ - protected function getWidth($version) { - return $this->capacity[$version][QRCAP_WIDTH]; - } - - /** - * Return the numer of remainder bits. - * @param int $version version - * @return int number of remainder bits - */ - protected function getRemainder($version) { - return $this->capacity[$version][QRCAP_REMINDER]; - } - - /** - * Return a version number that satisfies the input code length. - * @param int $size input code length (byte) - * @param int $level error correction level - * @return int version number - */ - protected function getMinimumVersion($size, $level) { - for ($i=1; $i <= QRSPEC_VERSION_MAX; ++$i) { - $words = $this->capacity[$i][QRCAP_WORDS] - $this->capacity[$i][QRCAP_EC][$level]; - if ($words >= $size) { - return $i; - } - } - return -1; - } - - /** - * Return the size of length indicator for the mode and version. - * @param int $mode encoding mode - * @param int $version version - * @return int the size of the appropriate length indicator (bits). - */ - protected function lengthIndicator($mode, $version) { - if ($mode == QR_MODE_ST) { - return 0; - } - if ($version <= 9) { - $l = 0; - } elseif ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - return $this->lengthTableBits[$mode][$l]; - } - - /** - * Return the maximum length for the mode and version. - * @param int $mode encoding mode - * @param int $version version - * @return int the maximum length (bytes) - */ - protected function maximumWords($mode, $version) { - if ($mode == QR_MODE_ST) { - return 3; - } - if ($version <= 9) { - $l = 0; - } else if ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - $bits = $this->lengthTableBits[$mode][$l]; - $words = (1 << $bits) - 1; - if ($mode == QR_MODE_KJ) { - $words *= 2; // the number of bytes is required - } - return $words; - } - - /** - * Return an array of ECC specification. - * @param int $version version - * @param int $level error correction level - * @param array $spec an array of ECC specification contains as following: {# of type1 blocks, # of data code, # of ecc code, # of type2 blocks, # of data code} - * @return array spec - */ - protected function getEccSpec($version, $level, $spec) { - if (count($spec) < 5) { - $spec = array(0, 0, 0, 0, 0); - } - $b1 = $this->eccTable[$version][$level][0]; - $b2 = $this->eccTable[$version][$level][1]; - $data = $this->getDataLength($version, $level); - $ecc = $this->getECCLength($version, $level); - if ($b2 == 0) { - $spec[0] = $b1; - $spec[1] = (int)($data / $b1); - $spec[2] = (int)($ecc / $b1); - $spec[3] = 0; - $spec[4] = 0; - } else { - $spec[0] = $b1; - $spec[1] = (int)($data / ($b1 + $b2)); - $spec[2] = (int)($ecc / ($b1 + $b2)); - $spec[3] = $b2; - $spec[4] = $spec[1] + 1; - } - return $spec; - } - - /** - * Put an alignment marker. - * @param array $frame frame - * @param int $width width - * @param int $ox X center coordinate of the pattern - * @param int $oy Y center coordinate of the pattern - * @return array frame - */ - protected function putAlignmentMarker($frame, $ox, $oy) { - $finder = array( - "\xa1\xa1\xa1\xa1\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa0\xa1\xa0\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa1\xa1\xa1\xa1" - ); - $yStart = $oy - 2; - $xStart = $ox - 2; - for ($y=0; $y < 5; $y++) { - $frame = $this->qrstrset($frame, $xStart, $yStart+$y, $finder[$y]); - } - return $frame; - } - - /** - * Put an alignment pattern. - * @param int $version version - * @param array $fram frame - * @param int $width width - * @return array frame - */ - protected function putAlignmentPattern($version, $frame, $width) { - if ($version < 2) { - return $frame; - } - $d = $this->alignmentPattern[$version][1] - $this->alignmentPattern[$version][0]; - if ($d < 0) { - $w = 2; - } else { - $w = (int)(($width - $this->alignmentPattern[$version][0]) / $d + 2); - } - if ($w * $w - 3 == 1) { - $x = $this->alignmentPattern[$version][0]; - $y = $this->alignmentPattern[$version][0]; - $frame = $this->putAlignmentMarker($frame, $x, $y); - return $frame; - } - $cx = $this->alignmentPattern[$version][0]; - $wo = $w - 1; - for ($x=1; $x < $wo; ++$x) { - $frame = $this->putAlignmentMarker($frame, 6, $cx); - $frame = $this->putAlignmentMarker($frame, $cx, 6); - $cx += $d; - } - $cy = $this->alignmentPattern[$version][0]; - for ($y=0; $y < $wo; ++$y) { - $cx = $this->alignmentPattern[$version][0]; - for ($x=0; $x < $wo; ++$x) { - $frame = $this->putAlignmentMarker($frame, $cx, $cy); - $cx += $d; - } - $cy += $d; - } - return $frame; - } - - /** - * Return BCH encoded version information pattern that is used for the symbol of version 7 or greater. Use lower 18 bits. - * @param int $version version - * @return BCH encoded version information pattern - */ - protected function getVersionPattern($version) { - if (($version < 7) OR ($version > QRSPEC_VERSION_MAX)) { - return 0; - } - return $this->versionPattern[($version - 7)]; - } - - /** - * Return BCH encoded format information pattern. - * @param array $mask - * @param int $level error correction level - * @return BCH encoded format information pattern - */ - protected function getFormatInfo($mask, $level) { - if (($mask < 0) OR ($mask > 7)) { - return 0; - } - if (($level < 0) OR ($level > 3)) { - return 0; - } - return $this->formatInfo[$level][$mask]; - } - - /** - * Put a finder pattern. - * @param array $frame frame - * @param int $width width - * @param int $ox X center coordinate of the pattern - * @param int $oy Y center coordinate of the pattern - * @return array frame - */ - protected function putFinderPattern($frame, $ox, $oy) { - $finder = array( - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" - ); - for ($y=0; $y < 7; $y++) { - $frame = $this->qrstrset($frame, $ox, ($oy + $y), $finder[$y]); - } - return $frame; - } - - /** - * Return a copy of initialized frame. - * @param int $version version - * @return Array of unsigned char. - */ - protected function createFrame($version) { - $width = $this->capacity[$version][QRCAP_WIDTH]; - $frameLine = str_repeat ("\0", $width); - $frame = array_fill(0, $width, $frameLine); - // Finder pattern - $frame = $this->putFinderPattern($frame, 0, 0); - $frame = $this->putFinderPattern($frame, $width - 7, 0); - $frame = $this->putFinderPattern($frame, 0, $width - 7); - // Separator - $yOffset = $width - 7; - for ($y=0; $y < 7; ++$y) { - $frame[$y][7] = "\xc0"; - $frame[$y][$width - 8] = "\xc0"; - $frame[$yOffset][7] = "\xc0"; - ++$yOffset; - } - $setPattern = str_repeat("\xc0", 8); - $frame = $this->qrstrset($frame, 0, 7, $setPattern); - $frame = $this->qrstrset($frame, $width-8, 7, $setPattern); - $frame = $this->qrstrset($frame, 0, $width - 8, $setPattern); - // Format info - $setPattern = str_repeat("\x84", 9); - $frame = $this->qrstrset($frame, 0, 8, $setPattern); - $frame = $this->qrstrset($frame, $width - 8, 8, $setPattern, 8); - $yOffset = $width - 8; - for ($y=0; $y < 8; ++$y,++$yOffset) { - $frame[$y][8] = "\x84"; - $frame[$yOffset][8] = "\x84"; - } - // Timing pattern - $wo = $width - 15; - for ($i=1; $i < $wo; ++$i) { - $frame[6][7+$i] = chr(0x90 | ($i & 1)); - $frame[7+$i][6] = chr(0x90 | ($i & 1)); - } - // Alignment pattern - $frame = $this->putAlignmentPattern($version, $frame, $width); - // Version information - if ($version >= 7) { - $vinf = $this->getVersionPattern($version); - $v = $vinf; - for ($x=0; $x<6; ++$x) { - for ($y=0; $y<3; ++$y) { - $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - $v = $vinf; - for ($y=0; $y<6; ++$y) { - for ($x=0; $x<3; ++$x) { - $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - } - // and a little bit... - $frame[$width - 8][8] = "\x81"; - return $frame; - } - - /** - * Set new frame for the specified version. - * @param int $version version - * @return Array of unsigned char. - */ - protected function newFrame($version) { - if (($version < 1) OR ($version > QRSPEC_VERSION_MAX)) { - return NULL; - } - if (!isset($this->frames[$version])) { - $this->frames[$version] = $this->createFrame($version); - } - if (is_null($this->frames[$version])) { - return NULL; - } - return $this->frames[$version]; - } - - /** - * Return block number 0 - * @param array $spec - * @return int value - */ - protected function rsBlockNum($spec) { - return ($spec[0] + $spec[3]); - } - - /** - * Return block number 1 - * @param array $spec - * @return int value - */ - protected function rsBlockNum1($spec) { - return $spec[0]; - } - - /** - * Return data codes 1 - * @param array $spec - * @return int value - */ - protected function rsDataCodes1($spec) { - return $spec[1]; - } - - /** - * Return ecc codes 1 - * @param array $spec - * @return int value - */ - protected function rsEccCodes1($spec) { - return $spec[2]; - } - - /** - * Return block number 2 - * @param array $spec - * @return int value - */ - protected function rsBlockNum2($spec) { - return $spec[3]; - } - - /** - * Return data codes 2 - * @param array $spec - * @return int value - */ - protected function rsDataCodes2($spec) { - return $spec[4]; - } - - /** - * Return ecc codes 2 - * @param array $spec - * @return int value - */ - protected function rsEccCodes2($spec) { - return $spec[2]; - } - - /** - * Return data length - * @param array $spec - * @return int value - */ - protected function rsDataLength($spec) { - return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); - } - - /** - * Return ecc length - * @param array $spec - * @return int value - */ - protected function rsEccLength($spec) { - return ($spec[0] + $spec[3]) * $spec[2]; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrs - - /** - * Initialize a Reed-Solomon codec and add it to existing rsitems - * @param int $symsize symbol size, bits - * @param int $gfpoly Field generator polynomial coefficients - * @param int $fcr first root of RS code generator polynomial, index form - * @param int $prim primitive element to generate polynomial roots - * @param int $nroots RS code generator polynomial degree (number of roots) - * @param int $pad padding bytes at front of shortened block - * @return array Array of RS values:
  • mm = Bits per symbol;
  • nn = Symbols per block;
  • alpha_to = log lookup table array;
  • index_of = Antilog lookup table array;
  • genpoly = Generator polynomial array;
  • nroots = Number of generator;
  • roots = number of parity symbols;
  • fcr = First consecutive root, index form;
  • prim = Primitive element, index form;
  • iprim = prim-th root of 1, index form;
  • pad = Padding bytes in shortened block;
  • gfpoly
. - */ - protected function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { - foreach ($this->rsitems as $rs) { - if (($rs['pad'] != $pad) OR ($rs['nroots'] != $nroots) OR ($rs['mm'] != $symsize) - OR ($rs['gfpoly'] != $gfpoly) OR ($rs['fcr'] != $fcr) OR ($rs['prim'] != $prim)) { - continue; - } - return $rs; - } - $rs = $this->init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); - array_unshift($this->rsitems, $rs); - return $rs; - } - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - // QRrsItem - - /** - * modnn - * @param array RS values - * @param int $x X position - * @return int X osition - */ - protected function modnn($rs, $x) { - while ($x >= $rs['nn']) { - $x -= $rs['nn']; - $x = ($x >> $rs['mm']) + ($x & $rs['nn']); - } - return $x; - } - - /** - * Initialize a Reed-Solomon codec and returns an array of values. - * @param int $symsize symbol size, bits - * @param int $gfpoly Field generator polynomial coefficients - * @param int $fcr first root of RS code generator polynomial, index form - * @param int $prim primitive element to generate polynomial roots - * @param int $nroots RS code generator polynomial degree (number of roots) - * @param int $pad padding bytes at front of shortened block - * @return array Array of RS values:
  • mm = Bits per symbol;
  • nn = Symbols per block;
  • alpha_to = log lookup table array;
  • index_of = Antilog lookup table array;
  • genpoly = Generator polynomial array;
  • nroots = Number of generator;
  • roots = number of parity symbols;
  • fcr = First consecutive root, index form;
  • prim = Primitive element, index form;
  • iprim = prim-th root of 1, index form;
  • pad = Padding bytes in shortened block;
  • gfpoly
. - */ - protected function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) { - // Based on Reed solomon encoder by Phil Karn, KA9Q (GNU-LGPLv2) - $rs = null; - // Check parameter ranges - if (($symsize < 0) OR ($symsize > 8)) { - return $rs; - } - if (($fcr < 0) OR ($fcr >= (1<<$symsize))) { - return $rs; - } - if (($prim <= 0) OR ($prim >= (1<<$symsize))) { - return $rs; - } - if (($nroots < 0) OR ($nroots >= (1<<$symsize))) { - return $rs; - } - if (($pad < 0) OR ($pad >= ((1<<$symsize) -1 - $nroots))) { - return $rs; - } - $rs = array(); - $rs['mm'] = $symsize; - $rs['nn'] = (1 << $symsize) - 1; - $rs['pad'] = $pad; - $rs['alpha_to'] = array_fill(0, ($rs['nn'] + 1), 0); - $rs['index_of'] = array_fill(0, ($rs['nn'] + 1), 0); - // PHP style macro replacement ;) - $NN =& $rs['nn']; - $A0 =& $NN; - // Generate Galois field lookup tables - $rs['index_of'][0] = $A0; // log(zero) = -inf - $rs['alpha_to'][$A0] = 0; // alpha**-inf = 0 - $sr = 1; - for ($i=0; $i<$rs['nn']; ++$i) { - $rs['index_of'][$sr] = $i; - $rs['alpha_to'][$i] = $sr; - $sr <<= 1; - if ($sr & (1 << $symsize)) { - $sr ^= $gfpoly; - } - $sr &= $rs['nn']; - } - if ($sr != 1) { - // field generator polynomial is not primitive! - return NULL; - } - // Form RS code generator polynomial from its roots - $rs['genpoly'] = array_fill(0, ($nroots + 1), 0); - $rs['fcr'] = $fcr; - $rs['prim'] = $prim; - $rs['nroots'] = $nroots; - $rs['gfpoly'] = $gfpoly; - // Find prim-th root of 1, used in decoding - for ($iprim=1; ($iprim % $prim) != 0; $iprim += $rs['nn']) { - ; // intentional empty-body loop! - } - $rs['iprim'] = (int)($iprim / $prim); - $rs['genpoly'][0] = 1; - - - for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { - $rs['genpoly'][$i+1] = 1; - // Multiply rs->genpoly[] by @**(root + x) - for ($j = $i; $j > 0; --$j) { - if ($rs['genpoly'][$j] != 0) { - $rs['genpoly'][$j] = $rs['genpoly'][$j-1] ^ $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][$j]] + $root)]; - } else { - $rs['genpoly'][$j] = $rs['genpoly'][$j-1]; - } - } - // rs->genpoly[0] can never be zero - $rs['genpoly'][0] = $rs['alpha_to'][$this->modnn($rs, $rs['index_of'][$rs['genpoly'][0]] + $root)]; - } - // convert rs->genpoly[] to index form for quicker encoding - for ($i = 0; $i <= $nroots; ++$i) { - $rs['genpoly'][$i] = $rs['index_of'][$rs['genpoly'][$i]]; - } - return $rs; - } - - /** - * Encode a Reed-Solomon codec and returns the parity array - * @param array $rs RS values - * @param array $data data - * @param array $parity parity - * @return parity array - */ - protected function encode_rs_char($rs, $data, $parity) { - $MM =& $rs['mm']; // bits per symbol - $NN =& $rs['nn']; // the total number of symbols in a RS block - $ALPHA_TO =& $rs['alpha_to']; // the address of an array of NN elements to convert Galois field elements in index (log) form to polynomial form - $INDEX_OF =& $rs['index_of']; // the address of an array of NN elements to convert Galois field elements in polynomial form to index (log) form - $GENPOLY =& $rs['genpoly']; // an array of NROOTS+1 elements containing the generator polynomial in index form - $NROOTS =& $rs['nroots']; // the number of roots in the RS code generator polynomial, which is the same as the number of parity symbols in a block - $FCR =& $rs['fcr']; // first consecutive root, index form - $PRIM =& $rs['prim']; // primitive element, index form - $IPRIM =& $rs['iprim']; // prim-th root of 1, index form - $PAD =& $rs['pad']; // the number of pad symbols in a block - $A0 =& $NN; - $parity = array_fill(0, $NROOTS, 0); - for ($i=0; $i < ($NN - $NROOTS - $PAD); $i++) { - $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; - if ($feedback != $A0) { - // feedback term is non-zero - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() - $feedback = $this->modnn($rs, $NN - $GENPOLY[$NROOTS] + $feedback); - for ($j=1; $j < $NROOTS; ++$j) { - $parity[$j] ^= $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[($NROOTS - $j)])]; - } - } - // Shift - array_shift($parity); - if ($feedback != $A0) { - array_push($parity, $ALPHA_TO[$this->modnn($rs, $feedback + $GENPOLY[0])]); - } else { - array_push($parity, 0); - } - } - return $parity; - } - - } // end QRcode class - -} // END OF "class_exists QRcode" -?> diff --git a/extend/phpqrcode/cache/frame_1.dat b/extend/phpqrcode/cache/frame_1.dat deleted file mode 100644 index be28fea..0000000 --- a/extend/phpqrcode/cache/frame_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -xڝ E9u`"PńC牗T!0$ -EɲQmh۾9{kI" 9Ln)Ap־>^zmnŖ;mn \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_1.png b/extend/phpqrcode/cache/frame_1.png deleted file mode 100644 index 86ce6e9..0000000 Binary files a/extend/phpqrcode/cache/frame_1.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_10.dat b/extend/phpqrcode/cache/frame_10.dat deleted file mode 100644 index aff163f..0000000 Binary files a/extend/phpqrcode/cache/frame_10.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_10.png b/extend/phpqrcode/cache/frame_10.png deleted file mode 100644 index dbfcd70..0000000 Binary files a/extend/phpqrcode/cache/frame_10.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_11.dat b/extend/phpqrcode/cache/frame_11.dat deleted file mode 100644 index 95af68a..0000000 Binary files a/extend/phpqrcode/cache/frame_11.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_11.png b/extend/phpqrcode/cache/frame_11.png deleted file mode 100644 index c07c761..0000000 Binary files a/extend/phpqrcode/cache/frame_11.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_12.dat b/extend/phpqrcode/cache/frame_12.dat deleted file mode 100644 index 73228b3..0000000 Binary files a/extend/phpqrcode/cache/frame_12.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_12.png b/extend/phpqrcode/cache/frame_12.png deleted file mode 100644 index 8ba6782..0000000 Binary files a/extend/phpqrcode/cache/frame_12.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_13.dat b/extend/phpqrcode/cache/frame_13.dat deleted file mode 100644 index 2256f0e..0000000 Binary files a/extend/phpqrcode/cache/frame_13.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_13.png b/extend/phpqrcode/cache/frame_13.png deleted file mode 100644 index 6e49d35..0000000 Binary files a/extend/phpqrcode/cache/frame_13.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_14.dat b/extend/phpqrcode/cache/frame_14.dat deleted file mode 100644 index e9ae093..0000000 Binary files a/extend/phpqrcode/cache/frame_14.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_14.png b/extend/phpqrcode/cache/frame_14.png deleted file mode 100644 index efc36c0..0000000 Binary files a/extend/phpqrcode/cache/frame_14.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_15.dat b/extend/phpqrcode/cache/frame_15.dat deleted file mode 100644 index 1872781..0000000 Binary files a/extend/phpqrcode/cache/frame_15.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_15.png b/extend/phpqrcode/cache/frame_15.png deleted file mode 100644 index a9f416c..0000000 Binary files a/extend/phpqrcode/cache/frame_15.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_16.dat b/extend/phpqrcode/cache/frame_16.dat deleted file mode 100644 index 60af678..0000000 --- a/extend/phpqrcode/cache/frame_16.dat +++ /dev/null @@ -1 +0,0 @@ -xA E]sIX;n6`qW6`%A/3!!g̡1N) E|;>6⸏97$c]kkw1[mC͜cR>E,hʼnp#xFyWVWG3+˓S}Ğ#G8b^c^cpc&3YQ"vk9܇} ĿQL/ \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_16.png b/extend/phpqrcode/cache/frame_16.png deleted file mode 100644 index 6ac8fe8..0000000 Binary files a/extend/phpqrcode/cache/frame_16.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_17.dat b/extend/phpqrcode/cache/frame_17.dat deleted file mode 100644 index 87f0cf5..0000000 Binary files a/extend/phpqrcode/cache/frame_17.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_17.png b/extend/phpqrcode/cache/frame_17.png deleted file mode 100644 index 5b929ac..0000000 Binary files a/extend/phpqrcode/cache/frame_17.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_18.dat b/extend/phpqrcode/cache/frame_18.dat deleted file mode 100644 index bb7138c..0000000 --- a/extend/phpqrcode/cache/frame_18.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0E]օ,2;s&͚hO1&09OIv@DD &ىKXFv<dq9<%h Ys !(ds;~||b(Yůg#`KSĶsidߍLg:әt/gmkM3{4rTQes><әt3;H#љt3Y+oghٽlnF>i^#awm;g~pgNs{6zp' \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_18.png b/extend/phpqrcode/cache/frame_18.png deleted file mode 100644 index ee0d6a3..0000000 Binary files a/extend/phpqrcode/cache/frame_18.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_19.dat b/extend/phpqrcode/cache/frame_19.dat deleted file mode 100644 index 95e26ad..0000000 --- a/extend/phpqrcode/cache/frame_19.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA - E.No7ћiiRN2W%x@ڜ' -u6.*S;}àT zrt%,};)ZLP$qgLdJ;w.]z#[͝Og" B}};w#1Gb;w_C+w@Dfu2N9R7|pWkk \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_19.png b/extend/phpqrcode/cache/frame_19.png deleted file mode 100644 index 20fddd8..0000000 Binary files a/extend/phpqrcode/cache/frame_19.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_2.dat b/extend/phpqrcode/cache/frame_2.dat deleted file mode 100644 index 7e42f31..0000000 --- a/extend/phpqrcode/cache/frame_2.dat +++ /dev/null @@ -1 +0,0 @@ -x͒ F{v& &Y+?Z1S'y!a815&۴HٞclF1#6 f6O7C֏8gIfB\DԻ( \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_2.png b/extend/phpqrcode/cache/frame_2.png deleted file mode 100644 index 9c150eb..0000000 Binary files a/extend/phpqrcode/cache/frame_2.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_20.dat b/extend/phpqrcode/cache/frame_20.dat deleted file mode 100644 index d5ecc1d..0000000 Binary files a/extend/phpqrcode/cache/frame_20.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_20.png b/extend/phpqrcode/cache/frame_20.png deleted file mode 100644 index 23a061d..0000000 Binary files a/extend/phpqrcode/cache/frame_20.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_21.dat b/extend/phpqrcode/cache/frame_21.dat deleted file mode 100644 index 1974dd9..0000000 --- a/extend/phpqrcode/cache/frame_21.dat +++ /dev/null @@ -1 +0,0 @@ -xA E]sIX;n6Upв]٘< i-eW)ŕ…H\jvqHL\6ЅrILܹ%@Vv(P4|Xngɝ~]Du1Us S\,2N?DKF-:eJ]p_,a0` X` w,` X]5 Y4{2vJs9)u۹,]^_7$_ \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_21.png b/extend/phpqrcode/cache/frame_21.png deleted file mode 100644 index 291598c..0000000 Binary files a/extend/phpqrcode/cache/frame_21.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_22.dat b/extend/phpqrcode/cache/frame_22.dat deleted file mode 100644 index 0f01802..0000000 --- a/extend/phpqrcode/cache/frame_22.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA -0 E]{.]{{{ZBepwe@VERZ3"*2o4y)i#dbdF҅I"4WIu45x.ZS{8k={o.q[:帒qy -)t#N8dCj-OOG}:/:sz!)^IO- 7p 7$}>ɷ7p tssrs Vmҹ}R~7&?7ԦIbh{<Mi- \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_23.png b/extend/phpqrcode/cache/frame_23.png deleted file mode 100644 index b8f16ae..0000000 Binary files a/extend/phpqrcode/cache/frame_23.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_24.dat b/extend/phpqrcode/cache/frame_24.dat deleted file mode 100644 index 7b92e29..0000000 --- a/extend/phpqrcode/cache/frame_24.dat +++ /dev/null @@ -1 +0,0 @@ -xA EMX0;nVP4HSSxU3/O LiJ4V JC%6VR&DBHjDJ??BlcDZ'UXUޏ0ywįj똳3ścj{:GqGNv;笓J <]#8#8H'GqGtr:9#8#8ؓhNt_>teS^\gQe?vuo;>*wlm \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_24.png b/extend/phpqrcode/cache/frame_24.png deleted file mode 100644 index 397c64f..0000000 Binary files a/extend/phpqrcode/cache/frame_24.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_25.dat b/extend/phpqrcode/cache/frame_25.dat deleted file mode 100644 index ba12518..0000000 --- a/extend/phpqrcode/cache/frame_25.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA - s낋]rxY51mMBG -*Sx|Ua5ƵZ-,1HPRjX5iG>WR/+uT廯 ӯ嗴u[Sa[kv5+5nJ%+VXbŊ߬u'SRtzZ++VXbŊٟٟٟ+VXb}Ŋ+VXVI+kq[toVZvoNVw}{r<ýR"R] Wr} \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_25.png b/extend/phpqrcode/cache/frame_25.png deleted file mode 100644 index 25bc445..0000000 Binary files a/extend/phpqrcode/cache/frame_25.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_26.dat b/extend/phpqrcode/cache/frame_26.dat deleted file mode 100644 index d34a73f..0000000 --- a/extend/phpqrcode/cache/frame_26.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA - Eօ,t77ћU E)i7*~cXEBFC6:&L,Mv.KgոYM>>mۚ?vmg?ұηdCUIkE\Msfafa>[sӈ9쬩ެ8b]LgEo w1 \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_26.png b/extend/phpqrcode/cache/frame_26.png deleted file mode 100644 index f4a6b39..0000000 Binary files a/extend/phpqrcode/cache/frame_26.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_27.dat b/extend/phpqrcode/cache/frame_27.dat deleted file mode 100644 index b4d9ffd..0000000 Binary files a/extend/phpqrcode/cache/frame_27.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_27.png b/extend/phpqrcode/cache/frame_27.png deleted file mode 100644 index 8419ec2..0000000 Binary files a/extend/phpqrcode/cache/frame_27.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_28.dat b/extend/phpqrcode/cache/frame_28.dat deleted file mode 100644 index 8cbaa19..0000000 Binary files a/extend/phpqrcode/cache/frame_28.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_28.png b/extend/phpqrcode/cache/frame_28.png deleted file mode 100644 index 7609d8e..0000000 Binary files a/extend/phpqrcode/cache/frame_28.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_29.dat b/extend/phpqrcode/cache/frame_29.dat deleted file mode 100644 index 5e4a711..0000000 --- a/extend/phpqrcode/cache/frame_29.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA a޺ @n7+*4!?J 抮]STf)sI"Ȕb0|"Luٸ,E1\6*uQ?>aυR-rn.ꯋ\T:*)|) , ,x_}:^RUoɢu~މX`XЏЏЏЏ_`X`XЏЏЏ_`X`XЏЏЏЏwbX`PU)D"c{z3<}^?bm잃a.] -{Q6uT,9 \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_29.png b/extend/phpqrcode/cache/frame_29.png deleted file mode 100644 index ffe072c..0000000 Binary files a/extend/phpqrcode/cache/frame_29.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_3.dat b/extend/phpqrcode/cache/frame_3.dat deleted file mode 100644 index 188d531..0000000 --- a/extend/phpqrcode/cache/frame_3.dat +++ /dev/null @@ -1 +0,0 @@ -x E{v& &Y+bk'ya:TXl޶$W+ӏv9}gR@H0YPBEm?s"bt2cn:ﺭ;YzQ7 \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_3.png b/extend/phpqrcode/cache/frame_3.png deleted file mode 100644 index 945ee7c..0000000 Binary files a/extend/phpqrcode/cache/frame_3.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_30.dat b/extend/phpqrcode/cache/frame_30.dat deleted file mode 100644 index 44cf3d3..0000000 Binary files a/extend/phpqrcode/cache/frame_30.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_30.png b/extend/phpqrcode/cache/frame_30.png deleted file mode 100644 index 75dbddd..0000000 Binary files a/extend/phpqrcode/cache/frame_30.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_31.dat b/extend/phpqrcode/cache/frame_31.dat deleted file mode 100644 index ce429d0..0000000 --- a/extend/phpqrcode/cache/frame_31.dat +++ /dev/null @@ -1 +0,0 @@ -xA a޺ &r4yķ!mV3Iv!Ҝ2i\NSS4EF2+65e/Ws]!?p=S~Đ?+x6r6y}ǴeR1-WllҌXz/>V櫷:ñA8-+mTbllltM&]ll&]Ill&]y 6` 6`iuyXWi\tz>.zk t77wJϔ4w҈85 \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_31.png b/extend/phpqrcode/cache/frame_31.png deleted file mode 100644 index b14d1fa..0000000 Binary files a/extend/phpqrcode/cache/frame_31.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_32.dat b/extend/phpqrcode/cache/frame_32.dat deleted file mode 100644 index aaa0808..0000000 --- a/extend/phpqrcode/cache/frame_32.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - ־. Dl, Mz6Ç gcJD;'.AIqމI,IrYFk%DOy|EDD(L_Y>*ߚ?aOkL_<[c>c˘uLI%#0#0#otѢ}4fv_)Eph5R881#0#0itZ#0#0#0itZ#0#0#0itZl0#09q"HܜHQ"L5}-Y׾k`>z鸳4&p!!`:5 \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_32.png b/extend/phpqrcode/cache/frame_32.png deleted file mode 100644 index 58d42db..0000000 Binary files a/extend/phpqrcode/cache/frame_32.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_33.dat b/extend/phpqrcode/cache/frame_33.dat deleted file mode 100644 index a261375..0000000 --- a/extend/phpqrcode/cache/frame_33.dat +++ /dev/null @@ -1,14 +0,0 @@ -xA a޺@n7+*L++柮bb*LCc kHrjJ5Yi~0_TT}e>5b_w͟?\Rai+7W\wLUNL -+ -+jOkc\˩|%o} 8 -+ -+ -+ 3g -+ -+ -+3g@ -+ -+ -+:RXB9I=ko/Swؘٯ`gr_ٙYVSYzIefnmQoz > \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_33.png b/extend/phpqrcode/cache/frame_33.png deleted file mode 100644 index 924c728..0000000 Binary files a/extend/phpqrcode/cache/frame_33.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_34.dat b/extend/phpqrcode/cache/frame_34.dat deleted file mode 100644 index 7ceb025..0000000 Binary files a/extend/phpqrcode/cache/frame_34.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_34.png b/extend/phpqrcode/cache/frame_34.png deleted file mode 100644 index a477042..0000000 Binary files a/extend/phpqrcode/cache/frame_34.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_35.dat b/extend/phpqrcode/cache/frame_35.dat deleted file mode 100644 index 56bc3e2..0000000 Binary files a/extend/phpqrcode/cache/frame_35.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_35.png b/extend/phpqrcode/cache/frame_35.png deleted file mode 100644 index d29806c..0000000 Binary files a/extend/phpqrcode/cache/frame_35.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_36.dat b/extend/phpqrcode/cache/frame_36.dat deleted file mode 100644 index 282c60d..0000000 Binary files a/extend/phpqrcode/cache/frame_36.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_36.png b/extend/phpqrcode/cache/frame_36.png deleted file mode 100644 index 96ecb42..0000000 Binary files a/extend/phpqrcode/cache/frame_36.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_37.dat b/extend/phpqrcode/cache/frame_37.dat deleted file mode 100644 index 015c0f2..0000000 Binary files a/extend/phpqrcode/cache/frame_37.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_37.png b/extend/phpqrcode/cache/frame_37.png deleted file mode 100644 index fcc5162..0000000 Binary files a/extend/phpqrcode/cache/frame_37.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_38.dat b/extend/phpqrcode/cache/frame_38.dat deleted file mode 100644 index 71cf53e..0000000 --- a/extend/phpqrcode/cache/frame_38.dat +++ /dev/null @@ -1 +0,0 @@ -xA0ЎuA2;Нk(gytp9$D\e^'t-aIFMSkIŤ:7|LkN8N7i}i,[WgӴ?31iN}}=OM:4)SL2eʔ)SL#$ JJM:}]L٧SQL2eʔ)SL2աPt(:)SL2eʔ)S:ECq2eʔ)SL2eʔECѡ8O2eʔ)SL2eTCѡPL2eʔ)SL2ݓsJCIKԂi93n_ +Ri4\g;% }an \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_38.png b/extend/phpqrcode/cache/frame_38.png deleted file mode 100644 index 89238f3..0000000 Binary files a/extend/phpqrcode/cache/frame_38.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_39.dat b/extend/phpqrcode/cache/frame_39.dat deleted file mode 100644 index 53511f7..0000000 Binary files a/extend/phpqrcode/cache/frame_39.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_39.png b/extend/phpqrcode/cache/frame_39.png deleted file mode 100644 index 1dc9cd1..0000000 Binary files a/extend/phpqrcode/cache/frame_39.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_4.dat b/extend/phpqrcode/cache/frame_4.dat deleted file mode 100644 index 67b30e8..0000000 --- a/extend/phpqrcode/cache/frame_4.dat +++ /dev/null @@ -1 +0,0 @@ -x E=u pجQCOM'ˏ$ @3eF\FNXRyؾC{a8R Ńa2@qkH1(`cj~0ܨعnXGĀ \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_4.png b/extend/phpqrcode/cache/frame_4.png deleted file mode 100644 index b72f9e7..0000000 Binary files a/extend/phpqrcode/cache/frame_4.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_40.dat b/extend/phpqrcode/cache/frame_40.dat deleted file mode 100644 index 90d36dd..0000000 --- a/extend/phpqrcode/cache/frame_40.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA@Ь@o7`Qfe䕫PA><]߳bZn^AQ}[9^]ynajM܇K̘1cƌ3f̘1{W5}{7lMޚxI<Kαyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘1ۻٻ={αyl3f̘1cƌ3f̘SʑӒ7HK޼g\u_r'4[-]qL8ƝY1q!/(% \ No newline at end of file diff --git a/extend/phpqrcode/cache/frame_40.png b/extend/phpqrcode/cache/frame_40.png deleted file mode 100644 index 8034d86..0000000 Binary files a/extend/phpqrcode/cache/frame_40.png and /dev/null differ diff --git a/extend/phpqrcode/cache/frame_5.dat b/extend/phpqrcode/cache/frame_5.dat deleted file mode 100644 index d5dafe1..0000000 --- a/extend/phpqrcode/cache/frame_5.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Eu7ЛZ|ND B0@R$l,->VKZ[I9+Es=ϤL1̄[FZU4?i<;7;P#W-[ݯ6ddddddc",;"sk摑Q&erw######L.摑Иy1^˲\3 v \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_117_0.dat b/extend/phpqrcode/cache/mask_0/mask_117_0.dat deleted file mode 100644 index 781c7f8..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_117_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 }OrR,#3,o5Cq:;;wvNJZG=m} ѱ2iRkj_YYYYYYYYe_/WVVVVVVkd-Ϻ,#OZc]|{ž$ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_121_0.dat b/extend/phpqrcode/cache/mask_0/mask_121_0.dat deleted file mode 100644 index 68810c3..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_121_0.dat +++ /dev/null @@ -1 +0,0 @@ -x1 О/w YMS8>2SFOEcW\ۼ{cpKGBКmxhfffffff/s22W|*d1*5̬RWas\xm~8߮r0wjsdm&y \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_125_0.dat b/extend/phpqrcode/cache/mask_0/mask_125_0.dat deleted file mode 100644 index 2c73ef1..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_125_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA - н_TH`3AOL4 k(ewGW. #2} \Ygggggggggg_d>j^s;;;;;;;;;;'q;;;;;;;;;'˰qu_PYw{e=dG/ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_129_0.dat b/extend/phpqrcode/cache/mask_0/mask_129_0.dat deleted file mode 100644 index 812ee8a..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_129_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - /*DE'hgt-}_pV \"b=s[J=8Dho۞' 0X ۴e0`  j" 0`Wf`^P0`2Ȁ  d07(Y/XLGby"pT \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_137_0.dat b/extend/phpqrcode/cache/mask_0/mask_137_0.dat deleted file mode 100644 index f6d993b..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_137_0.dat +++ /dev/null @@ -1 +0,0 @@ -x1 О/+FZ?J L7Ժ*Ba%L~˻ʓCJYIWJ .K]R0a„ $INTwlLaL0a„ &Ld@PO0a„ &L0e@P?a„ &L0aDe@ &L0aMIlL&)dlgacR<$v,ɺ?U2] \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_141_0.dat b/extend/phpqrcode/cache/mask_0/mask_141_0.dat deleted file mode 100644 index 8c685c8..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_141_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x= -0 нi9'EDx͘%I9+E{$m^&uS"D6ڟ]98UMbҾY[2拉Ĉ#F1bĈ%iRN潝ѳ#;#F1bĈN1i#F1bĈ#FtZ}Nk1bĈ#F1bktZ;#F1bFV-u"IoD-*7uj>bMV+ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_149_0.dat b/extend/phpqrcode/cache/mask_0/mask_149_0.dat deleted file mode 100644 index d258350..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_149_0.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA - н_MEQXP৞.|94e{JLv#^n[ ?; -ZIV-*w˒1*+VXbŊXgwqX}JRYbŊ+VXbeΠwfeΠ^bŊ+VXbʜAʜAbŊ+VXbŊ9ٜAbŊ+VXbŊl0*0Tj`?Ϊ;X=zZr* \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_153_0.dat b/extend/phpqrcode/cache/mask_0/mask_153_0.dat deleted file mode 100644 index fc79e9e..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_153_0.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Н/礑h&F`Ҽ@I;PZ^X͌mf.=5 [if-R+!wr˜g\j̘1cƌ3f̘1cfo.2?1z `ƌ3f̘1cƌzƌ3f̘1cƌ3fztf3f̘1cƌ3f̘kk030cƌ3f̘1c9;Ď`vf͚̆ZϘW9 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_157_0.dat b/extend/phpqrcode/cache/mask_0/mask_157_0.dat deleted file mode 100644 index ad749f3..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_157_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA - н_QRY k*q͵=j7~nN.p%ڵsi.رcǎ;vر{.-W2={mgy+رcǎ;vɳ2;yּcǎ;vرcNɳ;vرcǎ;v2I9+DyI4ˠ5:Wvdqߜܴ<d2x%[U%2]&K,Ydɒ%ˡ,S՗r2yd=,k_{Xdɒ%K,Yd)0m,Ydɒ%K,Yd)0m,Ydɒ%K,Yme,e%K,Ydɒ%K,eq Ò%K,Ydɒe:I9EQ=Ls I{ZtR}Sn:|R[?_*SL2eʔ)SL&ϦI O2O2eʔ)SL2e*C1PPSL2eʔ)SLP22)SL2eʔ)SLe(}2)SL2eʔ)SLe(}2)SL2eʔ)Sic7;"ޙFͦސٙvL ^2}oO'r \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_173_0.dat b/extend/phpqrcode/cache/mask_0/mask_173_0.dat deleted file mode 100644 index 5ef85e7..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_173_0.dat +++ /dev/null @@ -1 +0,0 @@ -x10ޯT [4v2ƽok݇;Ӳ]f֞dljlG0n+߻mG˖-[lٲe"Y}oV[lٲe˖-[lٲeհՃ[2lٲe˖-[lٲeհՃ[2lٲe˖-[lٲeհՃ[lٲe˖-[lٲeValٲe˖-[lٲef[BmаE;N-ۜT/rl?* \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_177_0.dat b/extend/phpqrcode/cache/mask_0/mask_177_0.dat deleted file mode 100644 index 78a26a7..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_177_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0>I9+?߁iև d̹xֈxN/է|{ظ8d0h=cFf̘1cƌ3f̘qq=w6;l4cƕ<nj3f̘1cƌ3fXһ1ֻcƌ3f̘1cƌ3fXbwnj3f̘1cƌ3f̘M'X&1cƌ3f̘1cƌ3ֻnn1cƌ3f̘1cƌÍ3U< \7+(<OƌΊnj4@ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_21_0.dat b/extend/phpqrcode/cache/mask_0/mask_21_0.dat deleted file mode 100644 index 368c994..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_21_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_25_0.dat b/extend/phpqrcode/cache/mask_0/mask_25_0.dat deleted file mode 100644 index e4a5b6d..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_25_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_29_0.dat b/extend/phpqrcode/cache/mask_0/mask_29_0.dat deleted file mode 100644 index 74a216b..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_29_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_33_0.dat b/extend/phpqrcode/cache/mask_0/mask_33_0.dat deleted file mode 100644 index 2ec712a..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_33_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_37_0.dat b/extend/phpqrcode/cache/mask_0/mask_37_0.dat deleted file mode 100644 index 1588cfc..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_37_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_41_0.dat b/extend/phpqrcode/cache/mask_0/mask_41_0.dat deleted file mode 100644 index e369027..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_41_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_45_0.dat b/extend/phpqrcode/cache/mask_0/mask_45_0.dat deleted file mode 100644 index 452f126..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_45_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_49_0.dat b/extend/phpqrcode/cache/mask_0/mask_49_0.dat deleted file mode 100644 index fdd2aac..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_49_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK E9o#?H/6g$-,X] -xݘ; X԰9<Ѻq2AfH7/5We{#fި?4=N > \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_53_0.dat b/extend/phpqrcode/cache/mask_0/mask_53_0.dat deleted file mode 100644 index 572d279..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_53_0.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -@!йoQϺ:(m&s-6Z{m4YX.F٭XZij=:έ֋b忑VH 8 #[Y^Xe \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_57_0.dat b/extend/phpqrcode/cache/mask_0/mask_57_0.dat deleted file mode 100644 index ea81e6d..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_57_0.dat +++ /dev/null @@ -1,4 +0,0 @@ -xA - {^s=YL՚ ( -ouj)  -Z7yv,ԴwVQ iGiҤDfەwo4ѤoLLȼ}4 h \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_61_0.dat b/extend/phpqrcode/cache/mask_0/mask_61_0.dat deleted file mode 100644 index 93d2444..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_61_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_65_0.dat b/extend/phpqrcode/cache/mask_0/mask_65_0.dat deleted file mode 100644 index df29d7b..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_65_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_0/mask_69_0.dat b/extend/phpqrcode/cache/mask_0/mask_69_0.dat deleted file mode 100644 index 8a2cfbd..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_69_0.dat +++ /dev/null @@ -1 +0,0 @@ -xK =_+mBd|Q"s+1"),=Ea T"ŐnE-3 ,KYw=ZZT .,K1#֞!Ŋ+V嬪.2XbŊ+VX.kBzwձ̀gkYZ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_89_0.dat b/extend/phpqrcode/cache/mask_0/mask_89_0.dat deleted file mode 100644 index aaa4c52..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_89_0.dat +++ /dev/null @@ -1 +0,0 @@ -x1 ὧi9'Hl?L^"&M?bq?˸,9!z]VScƌ3_c!`n3f̘1č 3f̘1/f>.Uc˻; 2;Y+7 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_93_0.dat b/extend/phpqrcode/cache/mask_0/mask_93_0.dat deleted file mode 100644 index e218fa0..0000000 --- a/extend/phpqrcode/cache/mask_0/mask_93_0.dat +++ /dev/null @@ -1,3 +0,0 @@ -xK - EyV,OmޠrPH0{2bc{tQ] -{Q{{弬֒ǎ;v_ڳ}L}l߱cǎ;v̑̑̑رcǎ.Legw3qeѾ@i \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_0/mask_97_0.dat b/extend/phpqrcode/cache/mask_0/mask_97_0.dat deleted file mode 100644 index 74ac719..0000000 Binary files a/extend/phpqrcode/cache/mask_0/mask_97_0.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_101_1.dat b/extend/phpqrcode/cache/mask_1/mask_101_1.dat deleted file mode 100644 index ec939b5..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_101_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - н\QEd  1N<#Ֆ-7u.lԦeiXXXXXRZVVeIo1,,,,,v%?gaaaaY K&K=/+ۍ˱ގ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_105_1.dat b/extend/phpqrcode/cache/mask_1/mask_105_1.dat deleted file mode 100644 index e1f5c99..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_105_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ӕ_Υb KB?"*#WʘtgӎJqUM9TLLvǤLLLLLLzgG01111yiߘ4m=՛n+2 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_109_1.dat b/extend/phpqrcode/cache/mask_1/mask_109_1.dat deleted file mode 100644 index 7e0d6d1..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_109_1.dat +++ /dev/null @@ -1 +0,0 @@ -xֱ >ӘK}:!iY'*3]fsmb[JƶŖK9}cccccc'u.6Ʀs6666R[^g{/lٷ 7͂ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_113_1.dat b/extend/phpqrcode/cache/mask_1/mask_113_1.dat deleted file mode 100644 index 1dd666d..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_113_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1  -8fL(pBlDM9";-;?1p{\%-3:@ad4*Nadddddd########c]751xYu \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_117_1.dat b/extend/phpqrcode/cache/mask_1/mask_117_1.dat deleted file mode 100644 index 8921f64..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_117_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -xֻ >ӘK$^ 8YQSV'z8jzʇ^]סekXYYYYYYYjݵ# -+yeeeeeeee#WVVVVVVVV;"+yeeeeeeel'e;b&^9{/J$p \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_121_1.dat b/extend/phpqrcode/cache/mask_1/mask_121_1.dat deleted file mode 100644 index 64bd8ba..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_121_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - н\CPbїE$DdƩYtڅλ0$ήꝝga7yٯ痽Y??{{D \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_129_1.dat b/extend/phpqrcode/cache/mask_1/mask_129_1.dat deleted file mode 100644 index 62cd1c9..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_129_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_133_1.dat b/extend/phpqrcode/cache/mask_1/mask_133_1.dat deleted file mode 100644 index 18d68dc..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_133_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ӕ_΅hh|"zۉ-*dNHQĢR ,X`c9Y(na_` ,X,X,X` #:8  ,X`Bd¾` ,X|ϢY\X; 7-; ` \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_137_1.dat b/extend/phpqrcode/cache/mask_1/mask_137_1.dat deleted file mode 100644 index 284d7be..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_137_1.dat +++ /dev/null @@ -1,3 +0,0 @@ -x1 -0 ӤKh]D,-t #ڌQ[T Ks7_?9|B&X^L0a„&3„M&L0a„ &2D4c0a„ &LȀЌe„ &L0abwȀf,&L0a„7&y2anoL<01O - \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_141_1.dat b/extend/phpqrcode/cache/mask_1/mask_141_1.dat deleted file mode 100644 index 83220dd..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_141_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - >946)3$`s uʮ>Wd )g'M{3\d6ubذaÆ 6lؼn]Nذ9FްaÆ 6lذa3a#oذaÆ 6lذذ5e16lذaÆ ]Sbk6lذaÆ mͤ;CcfIdsG \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_145_1.dat b/extend/phpqrcode/cache/mask_1/mask_145_1.dat deleted file mode 100644 index 6a9950f..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_145_1.dat +++ /dev/null @@ -1 +0,0 @@ -x!0@k 4a)q2i.YCUO{35UZFn]fN>bdwtzJF}F1bĈ#F(F6r1bĈ#F1E1ilF1bĈ#FtF#F1bĈ#FtZ}##F1bĈleHGܣ@ٝ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_149_1.dat b/extend/phpqrcode/cache/mask_1/mask_149_1.dat deleted file mode 100644 index 02a3cdc..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_149_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ӕ_΅qH_Xci#Gd̘Ք՛gLU^ݮVR>dKVXbŊ+VXeoXJ_bŊ+VXb;ݙ+}Ŋ+VXbŊ+VAVngŊ+VXbŊ}+ +VXbŊVj>hewf*`uTq \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_153_1.dat b/extend/phpqrcode/cache/mask_1/mask_153_1.dat deleted file mode 100644 index 2abfca2..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_153_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0\9btEc'HH9efߞmffM#.̘1cƌ3f̘1cf73f̘g̘1cƌ3f̘1co2c]?3f̘1cƌ3f5Mf3f̘1cƌ3f̘17utf3f̘1cƌ3f̘=lj3>V \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_157_1.dat b/extend/phpqrcode/cache/mask_1/mask_157_1.dat deleted file mode 100644 index 17344b8..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_157_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - >94Sd/51V)SkJv7eGcǎ;vرc]Zٱc'رcǎ;vر+رg;vرcǎ;}V`N+رcǎ;v:;v;vرcǎ;;}Vޱcǎ;vص'vz#;]klwoA` \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_161_1.dat b/extend/phpqrcode/cache/mask_1/mask_161_1.dat deleted file mode 100644 index 669ade1..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_161_1.dat +++ /dev/null @@ -1 +0,0 @@ -x10_΅Xš yi~Qbkvp7'M u=]([ 2dȐ +\' 2 2dȐ!C 2s0/3d() 2dȐ!C 241dh 2dȐ!C 2dhcȐSL2eʔ)SL2M SLSL2eʔ)SL2M}LSSL2eʔ)SLeSy)SŔ)SL2eʔ)S;ٔ)S;)SL2eʔ)Sv()Sv()SL2eʔ)SLdT6}a*3mljmzC' \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_173_1.dat b/extend/phpqrcode/cache/mask_1/mask_173_1.dat deleted file mode 100644 index 436918c..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_173_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ӕ_Υ''@y]X1?"g:1犝fn˶˻mm.?lٲe˖-F>glٲ2lٲe˖-[lٲeO`˖e˖-[lٲe˖-[l lٲlٲe˖-[lٲeVO`˖e˖-[lٲe˖-[z0}[z0y˖-[lٲe˖-[Ee[hOVWö=t*| \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_177_1.dat b/extend/phpqrcode/cache/mask_1/mask_177_1.dat deleted file mode 100644 index 12e2e52..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_177_1.dat +++ /dev/null @@ -1 +0,0 @@ -x1 Ep0X,a#r}6}nj~\8ƌ3f̘1cƌ7{3f,y3f̘1cƌ3fX_`X&3f̘1cƌ3f̘M_1cy̘1cƌ3f̘1cƌ+3f,y3f̘1cƌ3fX_bX&3f̘1cƌ3fx2dX'x[cy| 3 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_21_1.dat b/extend/phpqrcode/cache/mask_1/mask_21_1.dat deleted file mode 100644 index f87e0a1..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_21_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_25_1.dat b/extend/phpqrcode/cache/mask_1/mask_25_1.dat deleted file mode 100644 index 3a225e3..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_25_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_29_1.dat b/extend/phpqrcode/cache/mask_1/mask_29_1.dat deleted file mode 100644 index 0a1cb3b..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_29_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_33_1.dat b/extend/phpqrcode/cache/mask_1/mask_33_1.dat deleted file mode 100644 index 318949d..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_33_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_37_1.dat b/extend/phpqrcode/cache/mask_1/mask_37_1.dat deleted file mode 100644 index 5bd9e3a..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_37_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_41_1.dat b/extend/phpqrcode/cache/mask_1/mask_41_1.dat deleted file mode 100644 index 52e9e58..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_41_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_45_1.dat b/extend/phpqrcode/cache/mask_1/mask_45_1.dat deleted file mode 100644 index b35c567..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_45_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_49_1.dat b/extend/phpqrcode/cache/mask_1/mask_49_1.dat deleted file mode 100644 index d20d717..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_49_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_53_1.dat b/extend/phpqrcode/cache/mask_1/mask_53_1.dat deleted file mode 100644 index a676d7d..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_53_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_57_1.dat b/extend/phpqrcode/cache/mask_1/mask_57_1.dat deleted file mode 100644 index 896ed43..0000000 Binary files a/extend/phpqrcode/cache/mask_1/mask_57_1.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_1/mask_61_1.dat b/extend/phpqrcode/cache/mask_1/mask_61_1.dat deleted file mode 100644 index 4165a4b..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_61_1.dat +++ /dev/null @@ -1 +0,0 @@ -x30CbpPi`@&H^nadQG{n_.4Iy킎`)-5*(of[sm}6YM ;;;;;G{zطz1vw}=wuL%?"=~ei \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_1/mask_97_1.dat b/extend/phpqrcode/cache/mask_1/mask_97_1.dat deleted file mode 100644 index 24fa60f..0000000 --- a/extend/phpqrcode/cache/mask_1/mask_97_1.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0н1\tncKD"H$DH$D"Q&WerH$D"*x[(?/'nd \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_117_2.dat b/extend/phpqrcode/cache/mask_2/mask_117_2.dat deleted file mode 100644 index b4dcce4..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_117_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - >94!m dOs\0X,la5#E>Z[ַRT*JR?Q-*T*JR?UW*JRTݟ+JRԤ~m5;S&+ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_121_2.dat b/extend/phpqrcode/cache/mask_2/mask_121_2.dat deleted file mode 100644 index a2a0097..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_121_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_125_2.dat b/extend/phpqrcode/cache/mask_2/mask_125_2.dat deleted file mode 100644 index 0ea40fd..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_125_2.dat +++ /dev/null @@ -1 +0,0 @@ -x! PӔ_@ U(kp@^Mڮ5-:VF_\t:NtyNqt:NtG;Nt:.8:NtzA}yNq;+n& \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_129_2.dat b/extend/phpqrcode/cache/mask_2/mask_129_2.dat deleted file mode 100644 index bf04839..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_129_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0н_KVڡ'.!w]A0X~  !࣠fK# xFy4 vey@^+  ~  L#veI \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_133_2.dat b/extend/phpqrcode/cache/mask_2/mask_133_2.dat deleted file mode 100644 index 9e78b6d..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_133_2.dat +++ /dev/null @@ -1,10 +0,0 @@ -x1 - н&`LQ-g=Aqbʪl fƄȚ44& )OȚYF4444444444c4~9S:3ЌטpǮ> \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_145_2.dat b/extend/phpqrcode/cache/mask_2/mask_145_2.dat deleted file mode 100644 index 9ff2bbf..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_145_2.dat +++ /dev/null @@ -1,4 +0,0 @@ -x1 - нr] -,tQ^&C~ -щj~mɾ.FgMDDDDDDDDDDDST׈DHdZL+ɴDDDDDDDDDDD2-'"""""""":BתEYDd \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_149_2.dat b/extend/phpqrcode/cache/mask_2/mask_149_2.dat deleted file mode 100644 index d52e048..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_149_2.dat +++ /dev/null @@ -1 +0,0 @@ -x;@/gcaGBXB'-ˆouէUQdRVOmT*ǫ;;j廝Ee2PQQQQQQQQQQQ TTTTTTTTTTTTr33R &Tskz_e2P=d \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_153_2.dat b/extend/phpqrcode/cache/mask_2/mask_153_2.dat deleted file mode 100644 index 3b06041..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_153_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0 Ӥ8ZP!BZu賶"bu*)]MFFFFFFFFFFFF%= #ddddddddddddr ot2yFFFFFFFFFFFF& #k5L 2222222222(Y7"d@H \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_157_2.dat b/extend/phpqrcode/cache/mask_2/mask_157_2.dat deleted file mode 100644 index 2baf535..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_157_2.dat +++ /dev/null @@ -1,3 +0,0 @@ -x1 -0>s6MqUH1X&U̘f/u-'.[KGGGGGGGGGGH|NG(ttttttttttNF;::::::::::}Nz$ ->n A#^AG(t =3{ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_161_2.dat b/extend/phpqrcode/cache/mask_2/mask_161_2.dat deleted file mode 100644 index d2df759..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_161_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_165_2.dat b/extend/phpqrcode/cache/mask_2/mask_165_2.dat deleted file mode 100644 index 2e6cd7c..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_165_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0 Ӥ?BVUG%*+_fs MIIIIIIIII2d;l4()))))))))))eqJنIDIIIIIIIIIII)۠mPRRRRRRRRRRR6l JJJJJJJJJJJJن}RaQRRRRRRRRRRNeK?R퐔͔&W3U \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_169_2.dat b/extend/phpqrcode/cache/mask_2/mask_169_2.dat deleted file mode 100644 index 4052062..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_169_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_173_2.dat b/extend/phpqrcode/cache/mask_2/mask_173_2.dat deleted file mode 100644 index 0a30ba5..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_173_2.dat +++ /dev/null @@ -1 +0,0 @@ -x+@ Pift:>y &d U߬S[]5Z;a5V۞A[Z˴VՃI0ZZZZZZZZZZZZZZ=-Lhi`VFK?ݧhioJ0}o \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_177_2.dat b/extend/phpqrcode/cache/mask_2/mask_177_2.dat deleted file mode 100644 index d2c52f9..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_177_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - E>Y4V$~ ,C&U;Ook5bϙGx9%&&&&&&&&&&&n$OL|v#&&&&&&&&&&&&&bbݍXw#&l7bbbbbbbbbbbbbbM"l7bbbbbbbbbbbbbbMa!&݈3)U*F> \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_45_2.dat b/extend/phpqrcode/cache/mask_2/mask_45_2.dat deleted file mode 100644 index ad44ff1..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_45_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_49_2.dat b/extend/phpqrcode/cache/mask_2/mask_49_2.dat deleted file mode 100644 index 6e8edff..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_49_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_53_2.dat b/extend/phpqrcode/cache/mask_2/mask_53_2.dat deleted file mode 100644 index 682cae2..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_53_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_57_2.dat b/extend/phpqrcode/cache/mask_2/mask_57_2.dat deleted file mode 100644 index 66a5c05..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_57_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_61_2.dat b/extend/phpqrcode/cache/mask_2/mask_61_2.dat deleted file mode 100644 index 77d3815..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_61_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_65_2.dat b/extend/phpqrcode/cache/mask_2/mask_65_2.dat deleted file mode 100644 index caf184a..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_65_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_69_2.dat b/extend/phpqrcode/cache/mask_2/mask_69_2.dat deleted file mode 100644 index 6a3801b..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_69_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_73_2.dat b/extend/phpqrcode/cache/mask_2/mask_73_2.dat deleted file mode 100644 index 74945b7..0000000 Binary files a/extend/phpqrcode/cache/mask_2/mask_73_2.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_2/mask_77_2.dat b/extend/phpqrcode/cache/mask_2/mask_77_2.dat deleted file mode 100644 index 903cba4..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_77_2.dat +++ /dev/null @@ -1 +0,0 @@ -x1 н_CM>Gt ѫe+FWZEm&gއFѶhF+t/FYvFj[*7a \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_81_2.dat b/extend/phpqrcode/cache/mask_2/mask_81_2.dat deleted file mode 100644 index 17a9ac2..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_81_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0н_KҩVi!O\"A]:xbW1uȦ&_T ΋6H$U^D~bׯb=gX \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_85_2.dat b/extend/phpqrcode/cache/mask_2/mask_85_2.dat deleted file mode 100644 index 72c74ff..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_85_2.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0=1\B7O$A0$8Wwjguu槊RT*uS֧JRTJRRޢN浘V \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_2/mask_89_2.dat b/extend/phpqrcode/cache/mask_2/mask_89_2.dat deleted file mode 100644 index 06c9a4f..0000000 --- a/extend/phpqrcode/cache/mask_2/mask_89_2.dat +++ /dev/null @@ -1 +0,0 @@ -xٱ 0 >/&E*cQqŃ zf$rM)_%s_d3KO1^aL,$H"$KzRPt[I&X9$H"$I$ysI$DI$ɓI$I$Dɍ%es!=LAZ5'̓IVrn/2oƅ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_113_3.dat b/extend/phpqrcode/cache/mask_3/mask_113_3.dat deleted file mode 100644 index 023b273..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_113_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 D}NrnDFj2KCt?WݲZi.qoP %Smj7ަ:*N:@:***fW9d2*j*}S@`*j৪6Jlѿ}}էTUa24hnt \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_117_3.dat b/extend/phpqrcode/cache/mask_3/mask_117_3.dat deleted file mode 100644 index 79cc04d..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_117_3.dat +++ /dev/null @@ -1,4 +0,0 @@ -x1 -0 ]Q.xIB$?~!z#E)RHZ@bl-)ݿ<ߧ*OUR"5&5*ie J]+ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_145_3.dat b/extend/phpqrcode/cache/mask_3/mask_145_3.dat deleted file mode 100644 index 338b7e7..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_145_3.dat +++ /dev/null @@ -1,3 +0,0 @@ -x -@|:^ Jy̡yMj-' -9VS֦K9e)PyUwe-m jԨQF5jԨRi٫F4_wk}0+jRBRF5jԨQeOMBJHjԨQF5jwP״˪IH I5jԨQFͳc w5jԨQF:zS*2UZ_C*e_OZ%dIȯb \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_149_3.dat b/extend/phpqrcode/cache/mask_3/mask_149_3.dat deleted file mode 100644 index 30bc5fa..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_149_3.dat +++ /dev/null @@ -1 +0,0 @@ -xA0}Oܠ⦐H頯'Z2{oV|Ι%>yR{!8ÂI+JpI|#f5κ[P A $H Q})&X{ט+Wb`I)5%d \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_153_3.dat b/extend/phpqrcode/cache/mask_3/mask_153_3.dat deleted file mode 100644 index 89cdec0..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_153_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0}Ns˹)7mJ,}8X=cW^GeN}o%uJV/{%O>}ӧO}K~O>}ӧO>Q=/ї>}ӧO>}u{ח>}ӧO>}u{蟪/%?}ӧO>}ׯ.N4჏VMmRt(1| \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_177_3.dat b/extend/phpqrcode/cache/mask_3/mask_177_3.dat deleted file mode 100644 index 9586979..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_177_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_21_3.dat b/extend/phpqrcode/cache/mask_3/mask_21_3.dat deleted file mode 100644 index bcb4eec..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_21_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_25_3.dat b/extend/phpqrcode/cache/mask_3/mask_25_3.dat deleted file mode 100644 index 0ffc375..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_25_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_29_3.dat b/extend/phpqrcode/cache/mask_3/mask_29_3.dat deleted file mode 100644 index 6150ac1..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_29_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_33_3.dat b/extend/phpqrcode/cache/mask_3/mask_33_3.dat deleted file mode 100644 index 6053b5e..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_33_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_37_3.dat b/extend/phpqrcode/cache/mask_3/mask_37_3.dat deleted file mode 100644 index 5dea5b9..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_37_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_41_3.dat b/extend/phpqrcode/cache/mask_3/mask_41_3.dat deleted file mode 100644 index ca9ddc2..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_41_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_45_3.dat b/extend/phpqrcode/cache/mask_3/mask_45_3.dat deleted file mode 100644 index 3daad97..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_45_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK - DsFJ(&)0dЇFg![8=&iaD)d8&Aլa 1'II׳79 ex߾ I&֝CuJy \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_49_3.dat b/extend/phpqrcode/cache/mask_3/mask_49_3.dat deleted file mode 100644 index 7f6508d..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_49_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_53_3.dat b/extend/phpqrcode/cache/mask_3/mask_53_3.dat deleted file mode 100644 index 8800bea..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_53_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -0Ds ! -(.Bp&|"-t&`qQ-"9_+)Be/H8D%a~}spKFN=,;;a^t4\FSN \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_57_3.dat b/extend/phpqrcode/cache/mask_3/mask_57_3.dat deleted file mode 100644 index 4e1e5da..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_57_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_61_3.dat b/extend/phpqrcode/cache/mask_3/mask_61_3.dat deleted file mode 100644 index bf1a3cc..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_61_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0fz4-%*dp!yZܫu(~=&ۓ)R2"/"<9FΊ=rb"/rw"2B#3-0-KW \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_65_3.dat b/extend/phpqrcode/cache/mask_3/mask_65_3.dat deleted file mode 100644 index 8589208..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_65_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xQ - D4\?R ,!O-Nv1:cZu "UMÕF ~jK-la[^q^Q\=o-laZpUB @IKJzɢ|1Í  \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_69_3.dat b/extend/phpqrcode/cache/mask_3/mask_69_3.dat deleted file mode 100644 index 55318a8..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_69_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -x -0 {&2'd l=,Fy;$쇤WE-R:%T,O2g"",Ȣ/DyĈɧ{O䮳",:NvEWN#(&,,]x؅ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_73_3.dat b/extend/phpqrcode/cache/mask_3/mask_73_3.dat deleted file mode 100644 index 15be77f..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_73_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xQ -0 C{g;JJ?dԬK=RasJhTJ6exka\$nIE,-/XB*х=wee4t̒tLщtt߫b gFf qoddn-? \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_77_3.dat b/extend/phpqrcode/cache/mask_3/mask_77_3.dat deleted file mode 100644 index ec78280..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_77_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 &BiRaK"t`I@|fXyilE:Sza18GifK*?:YC1쌞졘(ቷJ*jl*TRIKR^ؙks)c)c)JZa \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_81_3.dat b/extend/phpqrcode/cache/mask_3/mask_81_3.dat deleted file mode 100644 index 47bc0f7..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_81_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 - F=\,JGAġhj>#3X:kԹ\FM Jhu3>TZ{PSgP'kVjժU_ۯUV=P oO:Wҝj[Wxm 5 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_85_3.dat b/extend/phpqrcode/cache/mask_3/mask_85_3.dat deleted file mode 100644 index 02c4f8c..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_85_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_3/mask_89_3.dat b/extend/phpqrcode/cache/mask_3/mask_89_3.dat deleted file mode 100644 index 2b4cb59..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_89_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 ὧ) *.@U |eŵ6ۢw5*) oiK4nk>1}d>@ 4XYCo ۡ1<AhFt - 4@51Wr>7G}}x7|NgN \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_93_3.dat b/extend/phpqrcode/cache/mask_3/mask_93_3.dat deleted file mode 100644 index b4cc8a9..0000000 --- a/extend/phpqrcode/cache/mask_3/mask_93_3.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 D}NrnJɪQ~B06na<<ׇe6MRCP L̓i9M 2 LkŮdDv*"aXjBdAddZTdAdqY0exqeN&WVQvc \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_3/mask_97_3.dat b/extend/phpqrcode/cache/mask_3/mask_97_3.dat deleted file mode 100644 index 7adc9eb..0000000 Binary files a/extend/phpqrcode/cache/mask_3/mask_97_3.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_4/mask_101_4.dat b/extend/phpqrcode/cache/mask_4/mask_101_4.dat deleted file mode 100644 index 1c97dc0..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_101_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA Fs^1bИ]4m+8+Ve^HR]\c -oWN#X+l HEcp \^.9qW9":.BB \0aPǨcp \ONqjpG}}$.˅ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_105_4.dat b/extend/phpqrcode/cache/mask_4/mask_105_4.dat deleted file mode 100644 index 0211cdb..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_105_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -0 D=Mr˹A TeEFL2 #鹢_I!딤Ѻ-իkmO]sS T6*'8 N$'NZ^}rU*G9r|c[cN[_=׫5^J 1*qv \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_117_4.dat b/extend/phpqrcode/cache/mask_4/mask_117_4.dat deleted file mode 100644 index 3867259..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_117_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - н_s]4Dgn2Jj}ҾRsSWGRɧ)5Em#ܯk_"z3\rʕ+r Lk|/{;'/#\p\p># \p\p#>qp\p.$Iq dGR_4  \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_137_4.dat b/extend/phpqrcode/cache/mask_4/mask_137_4.dat deleted file mode 100644 index 0c09c48..0000000 Binary files a/extend/phpqrcode/cache/mask_4/mask_137_4.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_4/mask_141_4.dat b/extend/phpqrcode/cache/mask_4/mask_141_4.dat deleted file mode 100644 index 62b03f2..0000000 Binary files a/extend/phpqrcode/cache/mask_4/mask_141_4.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_4/mask_145_4.dat b/extend/phpqrcode/cache/mask_4/mask_145_4.dat deleted file mode 100644 index 33fb211..0000000 Binary files a/extend/phpqrcode/cache/mask_4/mask_145_4.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_4/mask_149_4.dat b/extend/phpqrcode/cache/mask_4/mask_149_4.dat deleted file mode 100644 index de99310..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_149_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -x -!н_sm +XӋ9=.=Zka]ޒ> Kjo |SSWKZm׌j\Ъ2 W\qW\q"~ jvtv_\qW\qW\q%g3 }+++ r9ArW\qW\qŕA g3WA W\qW\qW]V~v{D3Ȝ!\W^Tڍ[S7vۜgq? -{peo383838{YXz,_OYfe3s38383\C!Ms38383r \C?37938383\C!07M8383q,mMrskWv3~W WB \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_157_4.dat b/extend/phpqrcode/cache/mask_4/mask_157_4.dat deleted file mode 100644 index ad5fcf6..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_157_4.dat +++ /dev/null @@ -1 +0,0 @@ -x10ޯs4"FP=iRX¢X0멪u 4ftl}m➭S|юS P5<]rwqwq^QN6ÏZsߙ,wqwqǝ>Μ5g;;Y}Vgw,wqwqw>9wqwq>3gY;[ww?P3Ƙggt퐮;].3w4A \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_161_4.dat b/extend/phpqrcode/cache/mask_4/mask_161_4.dat deleted file mode 100644 index 7604c45..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_161_4.dat +++ /dev/null @@ -1 +0,0 @@ -xA@ fs!AL_|,4l)iml׉0' +E ]N\x#2/_{7g9쏼ٷ}2r!?}-#Te9C9C9~6Sʇ겺!r!r!ۘse9C9C94_Ɯ|.r!r!s/s0 2r!r8}DwrDXΡ|x|!2 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_165_4.dat b/extend/phpqrcode/cache/mask_4/mask_165_4.dat deleted file mode 100644 index d83d631..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_165_4.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA -1 }Or."*?fPLHIkΫZQ8 -Gyqk-n5+?|֎kKnEŹK.K.?2.|EJ{2<:.Ku\K.K.ǝmu)_8\r%\r%\Џ;'2!_8\r%\r%\Џ;'2!_\r%\r%\rinC?nn9 RK.K.;.HqY'ݽNF?K㕢,R| My*3 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_169_4.dat b/extend/phpqrcode/cache/mask_4/mask_169_4.dat deleted file mode 100644 index 4aac95c..0000000 Binary files a/extend/phpqrcode/cache/mask_4/mask_169_4.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_4/mask_173_4.dat b/extend/phpqrcode/cache/mask_4/mask_173_4.dat deleted file mode 100644 index 9df4d86..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_173_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -1}Nrna ~ZY!Jt^5(/jkz[pj_?~v:|jwՖ_mXzo6?naCe \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_81_4.dat b/extend/phpqrcode/cache/mask_4/mask_81_4.dat deleted file mode 100644 index dd65216..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_81_4.dat +++ /dev/null @@ -1,3 +0,0 @@ -xA -0 yMyXE m7"892ѸQ1ݳ+xx;t35DIY1x\:u}e/ #Th< -UBz<5G<5{G<5<饫>]Urxu \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_85_4.dat b/extend/phpqrcode/cache/mask_4/mask_85_4.dat deleted file mode 100644 index c8d5123..0000000 Binary files a/extend/phpqrcode/cache/mask_4/mask_85_4.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_4/mask_89_4.dat b/extend/phpqrcode/cache/mask_4/mask_89_4.dat deleted file mode 100644 index 5b9bd7e..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_89_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -x1 -0 ὧI9%  Vڀfr0}z=#9ҕ:~s1BՁg&4pgq.p.&gT05rgsgqrg捯u38k.Egmb*&7? : \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_93_4.dat b/extend/phpqrcode/cache/mask_4/mask_93_4.dat deleted file mode 100644 index be7f5e5..0000000 --- a/extend/phpqrcode/cache/mask_4/mask_93_4.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK - ὧIn$}PŌB]N@%sfkҫ}CzoA}aʽ2|~D&l=Ywq}q\EYjK_ywqwz$==;_݋>+pH9Di \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_4/mask_97_4.dat b/extend/phpqrcode/cache/mask_4/mask_97_4.dat deleted file mode 100644 index 5d848ca..0000000 Binary files a/extend/phpqrcode/cache/mask_4/mask_97_4.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_101_5.dat b/extend/phpqrcode/cache/mask_5/mask_101_5.dat deleted file mode 100644 index c21869e..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_101_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - E+%=M3Cbv ѬNkûgqkqq{%Oo,iKee3[|iVh]` ` 0ʕz˴T0Gu/q8F13:W>#ȕ0c0Q8E=F#+a X͞+cV%9W>Q]TkY-gLqD艋 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_105_5.dat b/extend/phpqrcode/cache/mask_5/mask_105_5.dat deleted file mode 100644 index bc8798c..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_105_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_109_5.dat b/extend/phpqrcode/cache/mask_5/mask_109_5.dat deleted file mode 100644 index 25a3944..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_109_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_113_5.dat b/extend/phpqrcode/cache/mask_5/mask_113_5.dat deleted file mode 100644 index 25f42b8..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_113_5.dat +++ /dev/null @@ -1,9 +0,0 @@ -x -0D^6I63[[EDqc+jy81\c -7c?u}DK4},kkg--3[UƂyUXUXSV:ϫ՝,|кS⫰ - - -Vɫ*X[* - - -zU*NV*JUXUXSXijTi4fZkU^_~Ux }ծZ/r \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_117_5.dat b/extend/phpqrcode/cache/mask_5/mask_117_5.dat deleted file mode 100644 index f236940..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_117_5.dat +++ /dev/null @@ -1 +0,0 @@ -x D|Mn/*{M+pI_&m-ѾC32u?o-kgB7wc=U%yoRhӯșDo:ֶyRJkQ^aaaqOgiJ ;qOg)ӊ0 0 0 [vö>=>0 0 0 Ofz3=>0 0 0.3Z$׷8\pw4:Zp:qX 7 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_121_5.dat b/extend/phpqrcode/cache/mask_5/mask_121_5.dat deleted file mode 100644 index 9bb5c41..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_121_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_125_5.dat b/extend/phpqrcode/cache/mask_5/mask_125_5.dat deleted file mode 100644 index 2161c50..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_125_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA - E&fc;S$?؏Q4YahûyJ}9g==li.;nh_wz.qCWȧy uPk;<<<|*q, mkWqNl% yyyy^2䰅sX|aaaa3ϙ9lH<<<<̿웁[n`Tq8^vy \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_129_5.dat b/extend/phpqrcode/cache/mask_5/mask_129_5.dat deleted file mode 100644 index f0c1d65..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_129_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_133_5.dat b/extend/phpqrcode/cache/mask_5/mask_133_5.dat deleted file mode 100644 index 46be8b0..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_133_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 DѽOcr]4%1mCTxΜ[Dv={FEϏq?ݿ9keѭ}'2^c4G:3=JK-F0`#Hw'#<{~Z4 :BG舻F0`G~:`#?#tw-`#?##t#F0r}Q}eR;M/k1mX=hsH"k M:3qOW}9ԖIH1G;- sڶ?[%M - v#;zg^3d}69Ψޙ@7҄#gv`;׳ީ\$wlv`v;ލ}7wߑa;vkA#gv`=N2wxgWӤ@n?c}SQ:Zd?+9vz)P \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_141_5.dat b/extend/phpqrcode/cache/mask_5/mask_141_5.dat deleted file mode 100644 index 60c1a8e..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_141_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_145_5.dat b/extend/phpqrcode/cache/mask_5/mask_145_5.dat deleted file mode 100644 index 9303c07..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_145_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_149_5.dat b/extend/phpqrcode/cache/mask_5/mask_149_5.dat deleted file mode 100644 index 4256cef..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_149_5.dat +++ /dev/null @@ -1,3 +0,0 @@ -x[ -0&c}-s+'^;Ax=Q_gUݏﵪxGTȺV¹UUE_IǴ;T1̠ -]W 2 2 |o5uꆬuI:(WKU躒rPAdAdA; vo_zNO{2rPA9 2 29}^O挞rwQdAdAnMA9(dAdA^W Z.+G^K`׵}`_Fk \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_153_5.dat b/extend/phpqrcode/cache/mask_5/mask_153_5.dat deleted file mode 100644 index deea09d..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_153_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -x -@wfЬ`D"Ie<:au,7Of۳uP6~szs,jլcVZvߨm s^uHYu&l&l&_9 ;]^jsO;ܔrSn&l&l9yכzA rSnM6dM6dM6ރ@/$7ܔl&l&lzŽzACrSnM6dM6dOl7ᰚUuN֛FcPPS,l;HO \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_157_5.dat b/extend/phpqrcode/cache/mask_5/mask_157_5.dat deleted file mode 100644 index 176e2a6..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_157_5.dat +++ /dev/null @@ -1 +0,0 @@ -x10Dާri( r* \~>C*vs]Ŝ_{W!zﶬ/)˙v V6V޻,f1Yb n^o>\O],,b,f1YyVgYYYb,f1+ʳ<˳<˳1YbŬ<+ʳ,,b,f1YyVgYYYb,fukys77}vmb=wsw)tW: \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_161_5.dat b/extend/phpqrcode/cache/mask_5/mask_161_5.dat deleted file mode 100644 index 70d5fb0..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_161_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xI -@нDp@ o|m rHk㨤~co^Jzװ#5l¦S_92 [}ZÊ=T2ƀP2[cV衆CYf'-X9>v~usK5`e,2,2,2-///o_q}K\reYfeYf峖o+/,\feYfeYfٳexB.e2,2,̲g+l\r16,2,>ϰ=te&_4=tU}/>>>Or5/u>/g}g}gOsvO}/g}g}ٷGo-w{r_{g}g}g_n=n]4Nkβ_M8m?SF< \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_173_5.dat b/extend/phpqrcode/cache/mask_5/mask_173_5.dat deleted file mode 100644 index f9a6741..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_173_5.dat +++ /dev/null @@ -1,4 +0,0 @@ -x[ -0&G1gD)[CzeDѷц=RN6FJm JqP}x s_}GFy; -[;]ek[QbTmy&0 L`̄Y?رw؛ fcVN9&0 L`ׄZ}0=F=F9ANL`&0 L`BzYfI=F9AN&0 L`&0 fIsr ' L`&0 L`<i͒"9AN&0 L`VaBX",Um> -=wZgBΜP !8 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_177_5.dat b/extend/phpqrcode/cache/mask_5/mask_177_5.dat deleted file mode 100644 index b07c636..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_177_5.dat +++ /dev/null @@ -1,11 +0,0 @@ -xъ0~ܾح uO,"% :$Xui=ѶՃgƸ?Ώq.So~z׉W:=h1cq]Ƕi!r8Ɓ`+X -V jj;8ƁX+ -oV`+X -V?[1^h-ֳ5Z;rmS+ -oV`+X -V;Z,YMB+ -V`+X -VZeڦ}r\!W`+X -V`+3Km>SB+ -V`+X -Vc㊛{g;^Qq5ZUݮQL0+*&YDq*6 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_21_5.dat b/extend/phpqrcode/cache/mask_5/mask_21_5.dat deleted file mode 100644 index 04f97ea..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_21_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_25_5.dat b/extend/phpqrcode/cache/mask_5/mask_25_5.dat deleted file mode 100644 index c20b59b..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_25_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xڝa -@!4 ޳ʢ ?,""j?n=GZy:DR \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_33_5.dat b/extend/phpqrcode/cache/mask_5/mask_33_5.dat deleted file mode 100644 index 726d7fd..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_33_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_37_5.dat b/extend/phpqrcode/cache/mask_5/mask_37_5.dat deleted file mode 100644 index 6d32ca6..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_37_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_41_5.dat b/extend/phpqrcode/cache/mask_5/mask_41_5.dat deleted file mode 100644 index e07c617..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_41_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xTA - 5?7XMtxҴx ?@7@~"N$Sɰ{+CA'r\Pp<ޏ- ͺ:S3sԉۻީz#qw > \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_45_5.dat b/extend/phpqrcode/cache/mask_5/mask_45_5.dat deleted file mode 100644 index 5168a17..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_45_5.dat +++ /dev/null @@ -1 +0,0 @@ -xUA 5?U:N&Z":;4P1=bNvSGM1˛n'(κ J{Eѵs] ,sq \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_49_5.dat b/extend/phpqrcode/cache/mask_5/mask_49_5.dat deleted file mode 100644 index 9f3f3cd..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_49_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_53_5.dat b/extend/phpqrcode/cache/mask_5/mask_53_5.dat deleted file mode 100644 index 449807b..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_53_5.dat +++ /dev/null @@ -1 +0,0 @@ -xVA " zYf5ƐJC A;l\,dR. \(e_ еaNi5\żaLP(;2שjN6O u+l{y6od^ C[%  \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_57_5.dat b/extend/phpqrcode/cache/mask_5/mask_57_5.dat deleted file mode 100644 index c7dd81f..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_57_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xVA - 5?NlZHAbBZ0a Md`1z'"<Ր19nvͨ. )bݻ~;9Z#tB~ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_65_5.dat b/extend/phpqrcode/cache/mask_5/mask_65_5.dat deleted file mode 100644 index ecd9380..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_65_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_69_5.dat b/extend/phpqrcode/cache/mask_5/mask_69_5.dat deleted file mode 100644 index ead4edc..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_69_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_73_5.dat b/extend/phpqrcode/cache/mask_5/mask_73_5.dat deleted file mode 100644 index 0000117..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_73_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_77_5.dat b/extend/phpqrcode/cache/mask_5/mask_77_5.dat deleted file mode 100644 index 1652cdc..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_77_5.dat +++ /dev/null @@ -1 +0,0 @@ -xQ Cw#&C`T6ƹB(9 'ֆڢzk"hv.` cXB5[(F>71/34Ϊz^'[FyglgM>OTL4ϔ{&3Wy*ʧb*`<3;Vo0/s6n0ya[mcE \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_81_5.dat b/extend/phpqrcode/cache/mask_5/mask_81_5.dat deleted file mode 100644 index 71215e9..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_81_5.dat +++ /dev/null @@ -1,3 +0,0 @@ -x - C~M?tzU4" }tMX2|.ɋ˙F\~m4Xu -ٔ, w:EƄ>X̯=_]g>>zמ/)5ךkkkZsXXY{ܮ}~mt:S#&;U#) \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_85_5.dat b/extend/phpqrcode/cache/mask_5/mask_85_5.dat deleted file mode 100644 index 09cf0e2..0000000 Binary files a/extend/phpqrcode/cache/mask_5/mask_85_5.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_5/mask_89_5.dat b/extend/phpqrcode/cache/mask_5/mask_89_5.dat deleted file mode 100644 index 5fff530..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_89_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - 45enpQ Gcfl^^;;b5;`kU͹߮j`NsO=\[a6~nLD? !6uF%w*Ȭkf77SĆbÆXodw_—mbClNۙ ck&YVoܡ׷BעبAl6 Jjx \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_5/mask_93_5.dat b/extend/phpqrcode/cache/mask_5/mask_93_5.dat deleted file mode 100644 index ec4240b..0000000 --- a/extend/phpqrcode/cache/mask_5/mask_93_5.dat +++ /dev/null @@ -1,2 +0,0 @@ -xK -0 D>&&  fP^8BY5s(imҮ=f3/wۧEyYQwf[} [90303ef̙3'3=,ͼwxDַ.,;s%g,,,=Rὓ7uKKTD<(n lYhV۹sޕyPEtyY]ns ;ss,!LkԅcbL12cX91Z#XEn#;svT~L~LR11vs.1111J1&؍Ń111J1&ƞg KLƪjlk{gڞ5K1/ǐ~,ac$ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_105_6.dat b/extend/phpqrcode/cache/mask_6/mask_105_6.dat deleted file mode 100644 index a58fec7..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_105_6.dat +++ /dev/null @@ -1,3 +0,0 @@ -xQ -@ DskBZ#o)Sd}Gܷl쯯^)G]S4S?#BZ:+{sHKNiI!me1 -RWe9!``Uyˀu:檞U=w-oԺwB}cMK蹰{{=y蹰{{=y蹰{wScaoi'fyO=CyO=Cy[{S޻=;|v4}ϯ20 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_109_6.dat b/extend/phpqrcode/cache/mask_6/mask_109_6.dat deleted file mode 100644 index be7b474..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_109_6.dat +++ /dev/null @@ -1 +0,0 @@ -xA0 ~ρDBHCHV20nuol쯯˻=ۢs9[l'?7R" &2:7QqX_n ]$՚EIY*Lq0 0 0{LJз(s\ɳwX-7^ItIII$~?N0 0 0O'Itg7L$L-Iuzrfr M^'}(O~R]1YLĞu9Qӕ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_113_6.dat b/extend/phpqrcode/cache/mask_6/mask_113_6.dat deleted file mode 100644 index 397f527..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_113_6.dat +++ /dev/null @@ -1,3 +0,0 @@ -x E5NՉbF6on,m>gS9RWcǕ9&%1_cx= GR^w-z?dzv=,}ԥ?ǹژ:9m==@U䲉UXUXVe~by4Wi:e=ɼÆ$<>Ov'Cytaaaa~|'9liΣ<<<<Iæ<:<<<ٕWDzy:.z= ݓʯ sVöE=ll_k0_#vίmj \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_129_6.dat b/extend/phpqrcode/cache/mask_6/mask_129_6.dat deleted file mode 100644 index b4695c3..0000000 Binary files a/extend/phpqrcode/cache/mask_6/mask_129_6.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_6/mask_133_6.dat b/extend/phpqrcode/cache/mask_6/mask_133_6.dat deleted file mode 100644 index 40911dc..0000000 Binary files a/extend/phpqrcode/cache/mask_6/mask_133_6.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_6/mask_137_6.dat b/extend/phpqrcode/cache/mask_6/mask_137_6.dat deleted file mode 100644 index 43ccb68..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_137_6.dat +++ /dev/null @@ -1,2 +0,0 @@ -x E5?e^4fHp[1-e)UQV]UWN5o*8|۩W6bk?{f|>s֪r666rҟ=vڲWy -' -Ο;q tQE>U϶f곭xN]Tc(s❮7tAw`v`v`v`kvwfwt;];;;;;!ޙ;ao];l;;;÷| ʷ(3}l.?"މr};\}S-Aw<9;EV'ם \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_141_6.dat b/extend/phpqrcode/cache/mask_6/mask_141_6.dat deleted file mode 100644 index 0340409..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_141_6.dat +++ /dev/null @@ -1,10 +0,0 @@ -xa F4/c]زȐ[=[E럓sm,fn/|kj\j?g[q(NOZc5SGGP[oMVָfvL<WóCaz6U~һ{`nݻdvVy~rZ"qk{>g$XKU}m\bjaGx,f1Yb]z̞^.5[?嬜r,f1YY>grVb,f1Y>g,rVmYb,f,|VY9Yb,f,|VY9+g1Ybً ̦M7>2{9z϶hm3l|9xټ#f#x6 -v%N' \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_161_6.dat b/extend/phpqrcode/cache/mask_6/mask_161_6.dat deleted file mode 100644 index ecec68b..0000000 Binary files a/extend/phpqrcode/cache/mask_6/mask_161_6.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_6/mask_165_6.dat b/extend/phpqrcode/cache/mask_6/mask_165_6.dat deleted file mode 100644 index d641dfa..0000000 Binary files a/extend/phpqrcode/cache/mask_6/mask_165_6.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_6/mask_169_6.dat b/extend/phpqrcode/cache/mask_6/mask_169_6.dat deleted file mode 100644 index ae68972..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_169_6.dat +++ /dev/null @@ -1 +0,0 @@ -xJ0i9[Jɘk{1b!gnhHkS뉭-V?KIׁ1큏1ƣݎ/`/z)*=3ڏg6^k65CY>㵾+'{է_Vˊx-J<ӛܗr_>>i;rO}/g}g}ٿ}}xO}/g}g}ٷGo/{{r_>>o/z^#}g}ٿd'ʳ|QRNS3YڳZ'msEǷj5 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_173_6.dat b/extend/phpqrcode/cache/mask_6/mask_173_6.dat deleted file mode 100644 index 95fa97c..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_173_6.dat +++ /dev/null @@ -1 +0,0 @@ -xa09MrM S*:a_-5hh_)uZ֭[loےsmKN{H?x`l#f9>ڟ[eЄώߓ ?^m*/Kmhy%v-nKlkKL`&& g5(gwxYܞa¬pVcZ[#O=SN9&0 L`DŽ 'tjj]QN9&0 L`sYRc@QN9 L`&0 L`"YRc\ ' r&0 L`EH9AN&0 L`& 7p6`|hms R5Ƙȉ k\X/ )g9 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_177_6.dat b/extend/phpqrcode/cache/mask_6/mask_177_6.dat deleted file mode 100644 index e9f0476..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_177_6.dat +++ /dev/null @@ -1,14 +0,0 @@ -xn {ڤ*4v۴u1{f{_,,K9o 4ǵ7lniJiggir<-MG - - - -xuV+zRCr9+Gq6QWb"Qe"WL+ - XXXXX/|~j,nmuMۤ+ - XXXXXYa,X;M+ - XXXXXe)oӘf|5H늚7/D \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_21_6.dat b/extend/phpqrcode/cache/mask_6/mask_21_6.dat deleted file mode 100644 index 6bd505b..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_21_6.dat +++ /dev/null @@ -1 +0,0 @@ -xڝQ C9M{i]X1- C!D7 W ٜ&rD)~]<M 3(>{A aS \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_25_6.dat b/extend/phpqrcode/cache/mask_6/mask_25_6.dat deleted file mode 100644 index d45083a..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_25_6.dat +++ /dev/null @@ -1 +0,0 @@ -xڝQA 52)e+(XmZt*(ڹ;tJ<峂_ڤ3oڴ"̢azh}&qvSG֙,-J4}oS[}w \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_29_6.dat b/extend/phpqrcode/cache/mask_6/mask_29_6.dat deleted file mode 100644 index 0408e22..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_29_6.dat +++ /dev/null @@ -1,3 +0,0 @@ -xRA -0 XcL(4EԈB -8Cܾ޳nM+lǝՆO1]&ڍ4UD-6-$:6dZ?ylf? 8?߲_ݏ`8G1`B`;+}&s]<iK'l'9%.7 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_65_6.dat b/extend/phpqrcode/cache/mask_6/mask_65_6.dat deleted file mode 100644 index 550fc8f..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_65_6.dat +++ /dev/null @@ -1 +0,0 @@ -xWQ i{KNLk?e$Qik41{`+!ڮM ? 1b8 .^wsnFj5EaQX|=w@2v<ŋŞ|4w\UXBQz+TTcBz/48,5`ȱ OV$ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_69_6.dat b/extend/phpqrcode/cache/mask_6/mask_69_6.dat deleted file mode 100644 index a3e4fa0..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_69_6.dat +++ /dev/null @@ -1 +0,0 @@ -xK @dTh hLSSEq eY@<+*|窮 %>z*7e6QS`.>sE '%@[6@P0h aFxtpl2 Q-g1Nfeo^0FdT>N_OwG3ug {3<[Ժ b?'6^ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_73_6.dat b/extend/phpqrcode/cache/mask_6/mask_73_6.dat deleted file mode 100644 index ab71b70..0000000 Binary files a/extend/phpqrcode/cache/mask_6/mask_73_6.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_6/mask_77_6.dat b/extend/phpqrcode/cache/mask_6/mask_77_6.dat deleted file mode 100644 index ad5a660..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_77_6.dat +++ /dev/null @@ -1 +0,0 @@ -x E۲iVa.FpSTY4q~z=:͒ 6m8:#0PضiDy:2Š'Zs&}滜\r0\ŚXw;iPȔL)Seԕ{hDu9LbJSS))gZ{e)qJdLw+#3-V0շljڠS-S 9=ݯ5PPq1M?g \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_81_6.dat b/extend/phpqrcode/cache/mask_6/mask_81_6.dat deleted file mode 100644 index 28a6d07..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_81_6.dat +++ /dev/null @@ -1,3 +0,0 @@ -xQ0D9 rRLvk`0 ;i6\|_cc1huio#2}x*.Yt& -ְq/K;3ve̢ȊAH?`]5Kw!}{Zû߲W -yⷾ^_ykk^Kתb-bYSڸ'֜Nu#MfHSQ?|]IAiMyyuW \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_6/mask_85_6.dat b/extend/phpqrcode/cache/mask_6/mask_85_6.dat deleted file mode 100644 index d5403e4..0000000 Binary files a/extend/phpqrcode/cache/mask_6/mask_85_6.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_6/mask_89_6.dat b/extend/phpqrcode/cache/mask_6/mask_89_6.dat deleted file mode 100644 index eeeb5d1..0000000 Binary files a/extend/phpqrcode/cache/mask_6/mask_89_6.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_6/mask_93_6.dat b/extend/phpqrcode/cache/mask_6/mask_93_6.dat deleted file mode 100644 index 6ff38db..0000000 Binary files a/extend/phpqrcode/cache/mask_6/mask_93_6.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_6/mask_97_6.dat b/extend/phpqrcode/cache/mask_6/mask_97_6.dat deleted file mode 100644 index 3a2072e..0000000 --- a/extend/phpqrcode/cache/mask_6/mask_97_6.dat +++ /dev/null @@ -1,2 +0,0 @@ -xa0sdFx[=4Hoj34&s}* a Vc&35arW^aLClzq,1x SQN]/Giu`&w%,%DY"Kt+HE'|R2(v1vqiqd,%D~%ػJj}ͺĺgY"Kd,+K -]Wt+sF/)].zN'`>1='#`+bl]Z \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_101_7.dat b/extend/phpqrcode/cache/mask_7/mask_101_7.dat deleted file mode 100644 index 1f6bc51..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_101_7.dat +++ /dev/null @@ -1 +0,0 @@ -xQ C}rm`fjT#54'tfaЇo$cmOJ23c<6Xn0F ) \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_105_7.dat b/extend/phpqrcode/cache/mask_7/mask_105_7.dat deleted file mode 100644 index 6b0cacf..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_105_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0EFaMҙNPx)pQ_~|ñ(bF$.aoWGNPUǖM%{oHQUlִL^>+m#{{eo&Y2soM)gncO9sZ3wo+{=f.zޣ{{=zGcskCQϞp^&{^NʷU e5}EwGn+o \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_109_7.dat b/extend/phpqrcode/cache/mask_7/mask_109_7.dat deleted file mode 100644 index 9875cbe..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_109_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -xA -0 D9Mr}* _x-d:"NJ-k"⨚d{ջגɬ|'rQ5+ s)c7-1nn햺qɔJtg^ʉw̘Ň-?*&Mm@ee5^ -c - -,b\13j4TZfŢo* - - -:Ut* - - -Xů0"%6ed 8rS NsUnk5XejުuVXg,l`u!hXZ\VlM|[ͬ0 0 0 #hF'c]i>Hataaa~<ÆzyqkO0 0 0 㪞Faaa)2˰fÒ%z8tO=3=3:cw -V$ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_121_7.dat b/extend/phpqrcode/cache/mask_7/mask_121_7.dat deleted file mode 100644 index d5d577f..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_121_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -x[ - Edi;^az,#6ƞ^rh&^amY9_غ5Cr6t^^WlEز~ɿ|MmmS}( ۰ ۰ ۰}mQ]ZVq]vѲ"M1fG, qBmtaaazeF3cxIDmtaaamný$n۰ ۰ ۰ ۏa[}`[yޖ޻)n<4K/Oslnlm/G \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_125_7.dat b/extend/phpqrcode/cache/mask_7/mask_125_7.dat deleted file mode 100644 index f9ec088..0000000 Binary files a/extend/phpqrcode/cache/mask_7/mask_125_7.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_7/mask_129_7.dat b/extend/phpqrcode/cache/mask_7/mask_129_7.dat deleted file mode 100644 index 9bf51d5..0000000 Binary files a/extend/phpqrcode/cache/mask_7/mask_129_7.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_7/mask_133_7.dat b/extend/phpqrcode/cache/mask_7/mask_133_7.dat deleted file mode 100644 index b643ffe..0000000 Binary files a/extend/phpqrcode/cache/mask_7/mask_133_7.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_7/mask_137_7.dat b/extend/phpqrcode/cache/mask_7/mask_137_7.dat deleted file mode 100644 index 11d212b..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_137_7.dat +++ /dev/null @@ -1,5 +0,0 @@ -x - F4/ c_ǂ+{SK<o[l -Ο -07։Vl;b7fMS;1LCvR|KMH -#Н(Sqd \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_141_7.dat b/extend/phpqrcode/cache/mask_7/mask_141_7.dat deleted file mode 100644 index 98dffab..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_141_7.dat +++ /dev/null @@ -1 +0,0 @@ -xA E= rITY@Ä0!|1tbG0ԗѤs2Z/oa\qzOnҋMntX"KmeM}CpPL^S0S0S0SL )ǔژY߾%b,Sl?zC)tLLLLI2zRXh@)tLLLLI1zbϷB)~0S0S0S07)|B)))3ՖL% tfwM*:~hZsnc$1UTtJg8OYE \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_145_7.dat b/extend/phpqrcode/cache/mask_7/mask_145_7.dat deleted file mode 100644 index 4aa2bac..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_145_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -x - E5?W6Z-^2qbGX6(Ɖu"LbbGuμGk:HwA[jmHݞ3OkQ{l|TEm JfL?2"&)kRfc̉F,z=5X5X5X7F\pUs#5X5X5XFdYk!a ` ` `o8ct ]CC gM5[N%khZp?Iܣϲ^n$Y7AZP[ fȓ0 \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_149_7.dat b/extend/phpqrcode/cache/mask_7/mask_149_7.dat deleted file mode 100644 index 809f005..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_149_7.dat +++ /dev/null @@ -1 +0,0 @@ -xn {? uچ2G$ncFKb3֪tPc ̥7[?9:['9'*Ӗ Gah_/z+6XB>2qYJ0黏Bfa 1 9c7G Ol,^꽓3A:H  1A b0X4%٫#d>&C  1A b+g嬜,f1Yb|Y>+g嬜,f1Ylio.\Ɲo=gϙ-yk_TA \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_161_7.dat b/extend/phpqrcode/cache/mask_7/mask_161_7.dat deleted file mode 100644 index 35ba8ff..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_161_7.dat +++ /dev/null @@ -1 +0,0 @@ -xю y/皨E)Ʈ1~493,˵+ZT=ZeC.~iߏ&>,6e~,lW] 2\;׵2j"e,rXݵV(c쵵ZӖ18ީ/,'t.ee,cX2߱,_|yt|]t.cX2e,cy/ɗys.eLe,cX2lo|Z{+2]bl,cX2e{+֊[A2]X2e,c9CX;QIQH8R҈G"z,&;'o97%P8%6oǽ;]NWn[f7v \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_29_7.dat b/extend/phpqrcode/cache/mask_7/mask_29_7.dat deleted file mode 100644 index e3d7391..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_29_7.dat +++ /dev/null @@ -1,2 +0,0 @@ -xR9 QpX$lŲf!I2pgSMZj"te0#ԛ`_1-cha~/Eh4"~ \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_37_7.dat b/extend/phpqrcode/cache/mask_7/mask_37_7.dat deleted file mode 100644 index 87d9a1a..0000000 Binary files a/extend/phpqrcode/cache/mask_7/mask_37_7.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_7/mask_41_7.dat b/extend/phpqrcode/cache/mask_7/mask_41_7.dat deleted file mode 100644 index 8acec04..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_41_7.dat +++ /dev/null @@ -1 +0,0 @@ -xTA 5[fDY(O^bR3/~t/L"7SQQ5j\Sib#Նȏ+ǣw#zx?㽧A-wu曑Y7$b.%A;wRoxG}? \ No newline at end of file diff --git a/extend/phpqrcode/cache/mask_7/mask_45_7.dat b/extend/phpqrcode/cache/mask_7/mask_45_7.dat deleted file mode 100644 index dbba31d..0000000 Binary files a/extend/phpqrcode/cache/mask_7/mask_45_7.dat and /dev/null differ diff --git a/extend/phpqrcode/cache/mask_7/mask_49_7.dat b/extend/phpqrcode/cache/mask_7/mask_49_7.dat deleted file mode 100644 index be5dce8..0000000 --- a/extend/phpqrcode/cache/mask_7/mask_49_7.dat +++ /dev/null @@ -1 +0,0 @@ -xV0khC-X.ukv o40T%96U5*sI{`_>S?}(:yTl{G&E\6}"AX XϬback'); - - // user data - $filename = $PNG_TEMP_DIR.'test'.md5($_REQUEST['data'].'|'.$errorCorrectionLevel.'|'.$matrixPointSize).'.png'; - QRcode::png($_REQUEST['data'], $filename, $errorCorrectionLevel, $matrixPointSize, 2); - - } else { - - //default data - echo 'You can provide data in GET parameter: like that
'; - QRcode::png('PHP QR Code :)', $filename, $errorCorrectionLevel, $matrixPointSize, 2); - - } - - //display generated file - echo '
'; - - //config form - echo '
- Data:   - ECC:   - Size:   -

'; - - // benchmark - QRtools::timeBenchmark(); - - \ No newline at end of file diff --git a/extend/phpqrcode/phpqrcode.php b/extend/phpqrcode/phpqrcode.php deleted file mode 100644 index ea8c08f..0000000 --- a/extend/phpqrcode/phpqrcode.php +++ /dev/null @@ -1,3312 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - - -/* - * Version: 1.1.4 - * Build: 2010100721 - */ - - - -//---- qrconst.php ----------------------------- - - - - - -/* - * PHP QR Code encoder - * - * Common constants - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - // Encoding modes - - define('QR_MODE_NUL', -1); - define('QR_MODE_NUM', 0); - define('QR_MODE_AN', 1); - define('QR_MODE_8', 2); - define('QR_MODE_KANJI', 3); - define('QR_MODE_STRUCTURE', 4); - - // Levels of error correction. - - define('QR_ECLEVEL_L', 0); - define('QR_ECLEVEL_M', 1); - define('QR_ECLEVEL_Q', 2); - define('QR_ECLEVEL_H', 3); - - // Supported output formats - - define('QR_FORMAT_TEXT', 0); - define('QR_FORMAT_PNG', 1); - - class qrstr { - public static function set(&$srctab, $x, $y, $repl, $replLen = false) { - $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); - } - } - - - -//---- merged_config.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Config file, tuned-up for merged verion - */ - - define('QR_CACHEABLE', false); // use cache - more disk reads but less CPU power, masks and format templates are stored there - define('QR_CACHE_DIR', false); // used when QR_CACHEABLE === true - define('QR_LOG_DIR', false); // default error logs dir - - define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code - define('QR_FIND_FROM_RANDOM', 2); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly - define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false - - define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images - - - - -//---- qrtools.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Toolset, handy and debug utilites. - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRtools { - - //---------------------------------------------------------------------- - public static function binarize($frame) - { - $len = count($frame); - foreach ($frame as &$frameLine) { - - for($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - - return $frame; - } - - //---------------------------------------------------------------------- - public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') - { - $barcode_array = array(); - - if (!is_array($mode)) - $mode = explode(',', $mode); - - $eccLevel = 'L'; - - if (count($mode) > 1) { - $eccLevel = $mode[1]; - } - - $qrTab = QRcode::text($code, false, $eccLevel); - $size = count($qrTab); - - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach(str_split($line) as $char) - $arrAdd[] = ($char=='1')?1:0; - $barcode_array['bcode'][] = $arrAdd; - } - - return $barcode_array; - } - - //---------------------------------------------------------------------- - public static function clearCache() - { - self::$frames = array(); - } - - //---------------------------------------------------------------------- - public static function buildCache() - { - QRtools::markTime('before_build_cache'); - - $mask = new QRmask(); - for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { - $frame = QRspec::newFrame($a); - if (QR_IMAGE) { - $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; - QRimage::png(self::binarize($frame), $fileName, 1, 0); - } - - $width = count($frame); - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($maskNo=0; $maskNo<8; $maskNo++) - $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); - } - - QRtools::markTime('after_build_cache'); - } - - //---------------------------------------------------------------------- - public static function log($outfile, $err) - { - if (QR_LOG_DIR !== false) { - if ($err != '') { - if ($outfile !== false) { - file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } else { - file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } - } - } - } - - //---------------------------------------------------------------------- - public static function dumpMask($frame) - { - $width = count($frame); - for($y=0;$y<$width;$y++) { - for($x=0;$x<$width;$x++) { - echo ord($frame[$y][$x]).','; - } - } - } - - //---------------------------------------------------------------------- - public static function markTime($markerId) - { - list($usec, $sec) = explode(" ", microtime()); - $time = ((float)$usec + (float)$sec); - - if (!isset($GLOBALS['qr_time_bench'])) - $GLOBALS['qr_time_bench'] = array(); - - $GLOBALS['qr_time_bench'][$markerId] = $time; - } - - //---------------------------------------------------------------------- - public static function timeBenchmark() - { - self::markTime('finish'); - - $lastTime = 0; - $startTime = 0; - $p = 0; - - echo ' - - '; - - foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { - if ($p > 0) { - echo ''; - } else { - $startTime = $thisTime; - } - - $p++; - $lastTime = $thisTime; - } - - echo ' - - -
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; - } - - } - - //########################################################################## - - QRtools::markTime('start'); - - - - -//---- qrspec.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * QR Code specifications - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QRSPEC_VERSION_MAX', 40); - define('QRSPEC_WIDTH_MAX', 177); - - define('QRCAP_WIDTH', 0); - define('QRCAP_WORDS', 1); - define('QRCAP_REMINDER', 2); - define('QRCAP_EC', 3); - - class QRspec { - - public static $capacity = array( - array( 0, 0, 0, array( 0, 0, 0, 0)), - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 - array( 25, 44, 7, array( 10, 16, 22, 28)), - array( 29, 70, 7, array( 15, 26, 36, 44)), - array( 33, 100, 7, array( 20, 36, 52, 64)), - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 - array( 41, 172, 7, array( 36, 64, 96, 112)), - array( 45, 196, 0, array( 40, 72, 108, 130)), - array( 49, 242, 0, array( 48, 88, 132, 156)), - array( 53, 292, 0, array( 60, 110, 160, 192)), - array( 57, 346, 0, array( 72, 130, 192, 224)), //10 - array( 61, 404, 0, array( 80, 150, 224, 264)), - array( 65, 466, 0, array( 96, 176, 260, 308)), - array( 69, 532, 0, array( 104, 198, 288, 352)), - array( 73, 581, 3, array( 120, 216, 320, 384)), - array( 77, 655, 3, array( 132, 240, 360, 432)), //15 - array( 81, 733, 3, array( 144, 280, 408, 480)), - array( 85, 815, 3, array( 168, 308, 448, 532)), - array( 89, 901, 3, array( 180, 338, 504, 588)), - array( 93, 991, 3, array( 196, 364, 546, 650)), - array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 - array(101, 1156, 4, array( 224, 442, 644, 750)), - array(105, 1258, 4, array( 252, 476, 690, 816)), - array(109, 1364, 4, array( 270, 504, 750, 900)), - array(113, 1474, 4, array( 300, 560, 810, 960)), - array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 - array(121, 1706, 4, array( 336, 644, 952, 1110)), - array(125, 1828, 4, array( 360, 700, 1020, 1200)), - array(129, 1921, 3, array( 390, 728, 1050, 1260)), - array(133, 2051, 3, array( 420, 784, 1140, 1350)), - array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 - array(141, 2323, 3, array( 480, 868, 1290, 1530)), - array(145, 2465, 3, array( 510, 924, 1350, 1620)), - array(149, 2611, 3, array( 540, 980, 1440, 1710)), - array(153, 2761, 3, array( 570, 1036, 1530, 1800)), - array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 - array(161, 3034, 0, array( 600, 1120, 1680, 1980)), - array(165, 3196, 0, array( 630, 1204, 1770, 2100)), - array(169, 3362, 0, array( 660, 1260, 1860, 2220)), - array(173, 3532, 0, array( 720, 1316, 1950, 2310)), - array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 - ); - - //---------------------------------------------------------------------- - public static function getDataLength($version, $level) - { - return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; - } - - //---------------------------------------------------------------------- - public static function getECCLength($version, $level) - { - return self::$capacity[$version][QRCAP_EC][$level]; - } - - //---------------------------------------------------------------------- - public static function getWidth($version) - { - return self::$capacity[$version][QRCAP_WIDTH]; - } - - //---------------------------------------------------------------------- - public static function getRemainder($version) - { - return self::$capacity[$version][QRCAP_REMINDER]; - } - - //---------------------------------------------------------------------- - public static function getMinimumVersion($size, $level) - { - - for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { - $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; - if($words >= $size) - return $i; - } - - return -1; - } - - //###################################################################### - - public static $lengthTableBits = array( - array(10, 12, 14), - array( 9, 11, 13), - array( 8, 16, 16), - array( 8, 10, 12) - ); - - //---------------------------------------------------------------------- - public static function lengthIndicator($mode, $version) - { - if ($mode == QR_MODE_STRUCTURE) - return 0; - - if ($version <= 9) { - $l = 0; - } else if ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - - return self::$lengthTableBits[$mode][$l]; - } - - //---------------------------------------------------------------------- - public static function maximumWords($mode, $version) - { - if($mode == QR_MODE_STRUCTURE) - return 3; - - if($version <= 9) { - $l = 0; - } else if($version <= 26) { - $l = 1; - } else { - $l = 2; - } - - $bits = self::$lengthTableBits[$mode][$l]; - $words = (1 << $bits) - 1; - - if($mode == QR_MODE_KANJI) { - $words *= 2; // the number of bytes is required - } - - return $words; - } - - // Error correction code ----------------------------------------------- - // Table of the error correction code (Reed-Solomon block) - // See Table 12-16 (pp.30-36), JIS X0510:2004. - - public static $eccTable = array( - array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), - array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 - array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), - array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), - array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), - array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), - array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 - array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), - array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), - array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), - array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), - array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 - array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), - array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), - array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), - array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), - array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 - array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), - array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), - array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), - array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), - array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 - array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), - array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), - array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), - array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), - array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 - array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), - array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), - array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), - array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), - array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 - array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), - array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), - array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), - array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), - array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 - ); - - //---------------------------------------------------------------------- - // CACHEABLE!!! - - public static function getEccSpec($version, $level, array &$spec) - { - if (count($spec) < 5) { - $spec = array(0,0,0,0,0); - } - - $b1 = self::$eccTable[$version][$level][0]; - $b2 = self::$eccTable[$version][$level][1]; - $data = self::getDataLength($version, $level); - $ecc = self::getECCLength($version, $level); - - if($b2 == 0) { - $spec[0] = $b1; - $spec[1] = (int)($data / $b1); - $spec[2] = (int)($ecc / $b1); - $spec[3] = 0; - $spec[4] = 0; - } else { - $spec[0] = $b1; - $spec[1] = (int)($data / ($b1 + $b2)); - $spec[2] = (int)($ecc / ($b1 + $b2)); - $spec[3] = $b2; - $spec[4] = $spec[1] + 1; - } - } - - // Alignment pattern --------------------------------------------------- - - // Positions of alignment patterns. - // This array includes only the second and the third position of the - // alignment patterns. Rest of them can be calculated from the distance - // between them. - - // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - - public static $alignmentPattern = array( - array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 - array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 - array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 - array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 - array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 - array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 - array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 - ); - - - /** -------------------------------------------------------------------- - * Put an alignment marker. - * @param frame - * @param width - * @param ox,oy center coordinate of the pattern - */ - public static function putAlignmentMarker(array &$frame, $ox, $oy) - { - $finder = array( - "\xa1\xa1\xa1\xa1\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa0\xa1\xa0\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa1\xa1\xa1\xa1" - ); - - $yStart = $oy-2; - $xStart = $ox-2; - - for($y=0; $y<5; $y++) { - QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); - } - } - - //---------------------------------------------------------------------- - public static function putAlignmentPattern($version, &$frame, $width) - { - if($version < 2) - return; - - $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; - if($d < 0) { - $w = 2; - } else { - $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); - } - - if($w * $w - 3 == 1) { - $x = self::$alignmentPattern[$version][0]; - $y = self::$alignmentPattern[$version][0]; - self::putAlignmentMarker($frame, $x, $y); - return; - } - - $cx = self::$alignmentPattern[$version][0]; - for($x=1; $x<$w - 1; $x++) { - self::putAlignmentMarker($frame, 6, $cx); - self::putAlignmentMarker($frame, $cx, 6); - $cx += $d; - } - - $cy = self::$alignmentPattern[$version][0]; - for($y=0; $y<$w-1; $y++) { - $cx = self::$alignmentPattern[$version][0]; - for($x=0; $x<$w-1; $x++) { - self::putAlignmentMarker($frame, $cx, $cy); - $cx += $d; - } - $cy += $d; - } - } - - // Version information pattern ----------------------------------------- - - // Version information pattern (BCH coded). - // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - - // size: [QRSPEC_VERSION_MAX - 6] - - public static $versionPattern = array( - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, - 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, - 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, - 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, - 0x27541, 0x28c69 - ); - - //---------------------------------------------------------------------- - public static function getVersionPattern($version) - { - if($version < 7 || $version > QRSPEC_VERSION_MAX) - return 0; - - return self::$versionPattern[$version -7]; - } - - // Format information -------------------------------------------------- - // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) - - public static $formatInfo = array( - array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), - array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), - array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), - array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) - ); - - public static function getFormatInfo($mask, $level) - { - if($mask < 0 || $mask > 7) - return 0; - - if($level < 0 || $level > 3) - return 0; - - return self::$formatInfo[$level][$mask]; - } - - // Frame --------------------------------------------------------------- - // Cache of initial frames. - - public static $frames = array(); - - /** -------------------------------------------------------------------- - * Put a finder pattern. - * @param frame - * @param width - * @param ox,oy upper-left coordinate of the pattern - */ - public static function putFinderPattern(&$frame, $ox, $oy) - { - $finder = array( - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" - ); - - for($y=0; $y<7; $y++) { - QRstr::set($frame, $ox, $oy+$y, $finder[$y]); - } - } - - //---------------------------------------------------------------------- - public static function createFrame($version) - { - $width = self::$capacity[$version][QRCAP_WIDTH]; - $frameLine = str_repeat ("\0", $width); - $frame = array_fill(0, $width, $frameLine); - - // Finder pattern - self::putFinderPattern($frame, 0, 0); - self::putFinderPattern($frame, $width - 7, 0); - self::putFinderPattern($frame, 0, $width - 7); - - // Separator - $yOffset = $width - 7; - - for($y=0; $y<7; $y++) { - $frame[$y][7] = "\xc0"; - $frame[$y][$width - 8] = "\xc0"; - $frame[$yOffset][7] = "\xc0"; - $yOffset++; - } - - $setPattern = str_repeat("\xc0", 8); - - QRstr::set($frame, 0, 7, $setPattern); - QRstr::set($frame, $width-8, 7, $setPattern); - QRstr::set($frame, 0, $width - 8, $setPattern); - - // Format info - $setPattern = str_repeat("\x84", 9); - QRstr::set($frame, 0, 8, $setPattern); - QRstr::set($frame, $width - 8, 8, $setPattern, 8); - - $yOffset = $width - 8; - - for($y=0; $y<8; $y++,$yOffset++) { - $frame[$y][8] = "\x84"; - $frame[$yOffset][8] = "\x84"; - } - - // Timing pattern - - for($i=1; $i<$width-15; $i++) { - $frame[6][7+$i] = chr(0x90 | ($i & 1)); - $frame[7+$i][6] = chr(0x90 | ($i & 1)); - } - - // Alignment pattern - self::putAlignmentPattern($version, $frame, $width); - - // Version information - if($version >= 7) { - $vinf = self::getVersionPattern($version); - - $v = $vinf; - - for($x=0; $x<6; $x++) { - for($y=0; $y<3; $y++) { - $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - - $v = $vinf; - for($y=0; $y<6; $y++) { - for($x=0; $x<3; $x++) { - $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - } - - // and a little bit... - $frame[$width - 8][8] = "\x81"; - - return $frame; - } - - //---------------------------------------------------------------------- - public static function debug($frame, $binary_mode = false) - { - if ($binary_mode) { - - foreach ($frame as &$frameLine) { - $frameLine = join('  ', explode('0', $frameLine)); - $frameLine = join('██', explode('1', $frameLine)); - } - - ?> - -


        '; - echo join("
        ", $frame); - echo '






'; - - } else { - - foreach ($frame as &$frameLine) { - $frameLine = join(' ', explode("\xc0", $frameLine)); - $frameLine = join('', explode("\xc1", $frameLine)); - $frameLine = join(' ', explode("\xa0", $frameLine)); - $frameLine = join('', explode("\xa1", $frameLine)); - $frameLine = join('', explode("\x84", $frameLine)); //format 0 - $frameLine = join('', explode("\x85", $frameLine)); //format 1 - $frameLine = join('', explode("\x81", $frameLine)); //special bit - $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 - $frameLine = join('', explode("\x91", $frameLine)); //clock 1 - $frameLine = join(' ', explode("\x88", $frameLine)); //version - $frameLine = join('', explode("\x89", $frameLine)); //version - $frameLine = join('♦', explode("\x01", $frameLine)); - $frameLine = join('⋅', explode("\0", $frameLine)); - } - - ?> - - "; - echo join("
", $frame); - echo "
"; - - } - } - - //---------------------------------------------------------------------- - public static function serial($frame) - { - return gzcompress(join("\n", $frame), 9); - } - - //---------------------------------------------------------------------- - public static function unserial($code) - { - return explode("\n", gzuncompress($code)); - } - - //---------------------------------------------------------------------- - public static function newFrame($version) - { - if($version < 1 || $version > QRSPEC_VERSION_MAX) - return null; - - if(!isset(self::$frames[$version])) { - - $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; - - if (QR_CACHEABLE) { - if (file_exists($fileName)) { - self::$frames[$version] = self::unserial(file_get_contents($fileName)); - } else { - self::$frames[$version] = self::createFrame($version); - file_put_contents($fileName, self::serial(self::$frames[$version])); - } - } else { - self::$frames[$version] = self::createFrame($version); - } - } - - if(is_null(self::$frames[$version])) - return null; - - return self::$frames[$version]; - } - - //---------------------------------------------------------------------- - public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } - public static function rsBlockNum1($spec) { return $spec[0]; } - public static function rsDataCodes1($spec) { return $spec[1]; } - public static function rsEccCodes1($spec) { return $spec[2]; } - public static function rsBlockNum2($spec) { return $spec[3]; } - public static function rsDataCodes2($spec) { return $spec[4]; } - public static function rsEccCodes2($spec) { return $spec[2]; } - public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } - public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } - - } - - - -//---- qrimage.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Image output of code using GD2 - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QR_IMAGE', true); - - class QRimage { - - //---------------------------------------------------------------------- - public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/png"); - ImagePng($image); - } else { - if($saveandprint===TRUE){ - ImagePng($image, $filename); - header("Content-type: image/png"); - ImagePng($image); - }else{ - ImagePng($image, $filename); - } - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/jpeg"); - ImageJpeg($image, null, $q); - } else { - ImageJpeg($image, $filename, $q); - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4) - { - $h = count($frame); - $w = strlen($frame[0]); - - $imgW = $w + 2*$outerFrame; - $imgH = $h + 2*$outerFrame; - - $base_image =ImageCreate($imgW, $imgH); - - $col[0] = ImageColorAllocate($base_image,255,255,255); - $col[1] = ImageColorAllocate($base_image,0,0,0); - - imagefill($base_image, 0, 0, $col[0]); - - for($y=0; $y<$h; $y++) { - for($x=0; $x<$w; $x++) { - if ($frame[$y][$x] == '1') { - ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); - } - } - } - - $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); - ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); - ImageDestroy($base_image); - - return $target_image; - } - } - - - -//---- qrinput.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Input encoding class - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('STRUCTURE_HEADER_BITS', 20); - define('MAX_STRUCTURED_SYMBOLS', 16); - - class QRinputItem { - - public $mode; - public $size; - public $data; - public $bstream; - - public function __construct($mode, $size, $data, $bstream = null) - { - $setData = array_slice($data, 0, $size); - - if (count($setData) < $size) { - $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); - } - - if(!QRinput::check($mode, $size, $setData)) { - throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); - return null; - } - - $this->mode = $mode; - $this->size = $size; - $this->data = $setData; - $this->bstream = $bstream; - } - - //---------------------------------------------------------------------- - public function encodeModeNum($version) - { - try { - - $words = (int)($this->size / 3); - $bs = new QRbitstream(); - - $val = 0x1; - $bs->appendNum(4, $val); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); - - for($i=0; $i<$words; $i++) { - $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; - $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; - $val += (ord($this->data[$i*3+2]) - ord('0')); - $bs->appendNum(10, $val); - } - - if($this->size - $words * 3 == 1) { - $val = ord($this->data[$words*3]) - ord('0'); - $bs->appendNum(4, $val); - } else if($this->size - $words * 3 == 2) { - $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; - $val += (ord($this->data[$words*3+1]) - ord('0')); - $bs->appendNum(7, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeAn($version) - { - try { - $words = (int)($this->size / 2); - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x02); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); - - for($i=0; $i<$words; $i++) { - $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; - $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); - - $bs->appendNum(11, $val); - } - - if($this->size & 1) { - $val = QRinput::lookAnTable(ord($this->data[$words * 2])); - $bs->appendNum(6, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeMode8($version) - { - try { - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x4); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); - - for($i=0; $i<$this->size; $i++) { - $bs->appendNum(8, ord($this->data[$i])); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeKanji($version) - { - try { - - $bs = new QRbitrtream(); - - $bs->appendNum(4, 0x8); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); - - for($i=0; $i<$this->size; $i+=2) { - $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); - if($val <= 0x9ffc) { - $val -= 0x8140; - } else { - $val -= 0xc140; - } - - $h = ($val >> 8) * 0xc0; - $val = ($val & 0xff) + $h; - - $bs->appendNum(13, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeStructure() - { - try { - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x03); - $bs->appendNum(4, ord($this->data[1]) - 1); - $bs->appendNum(4, ord($this->data[0]) - 1); - $bs->appendNum(8, ord($this->data[2])); - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function estimateBitStreamSizeOfEntry($version) - { - $bits = 0; - - if($version == 0) - $version = 1; - - switch($this->mode) { - case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; - case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; - case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; - case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; - case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; - default: - return 0; - } - - $l = QRspec::lengthIndicator($this->mode, $version); - $m = 1 << $l; - $num = (int)(($this->size + $m - 1) / $m); - - $bits += $num * (4 + $l); - - return $bits; - } - - //---------------------------------------------------------------------- - public function encodeBitStream($version) - { - try { - - unset($this->bstream); - $words = QRspec::maximumWords($this->mode, $version); - - if($this->size > $words) { - - $st1 = new QRinputItem($this->mode, $words, $this->data); - $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); - - $st1->encodeBitStream($version); - $st2->encodeBitStream($version); - - $this->bstream = new QRbitstream(); - $this->bstream->append($st1->bstream); - $this->bstream->append($st2->bstream); - - unset($st1); - unset($st2); - - } else { - - $ret = 0; - - switch($this->mode) { - case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; - case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; - case QR_MODE_8: $ret = $this->encodeMode8($version); break; - case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; - case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; - - default: - break; - } - - if($ret < 0) - return -1; - } - - return $this->bstream->size(); - - } catch (Exception $e) { - return -1; - } - } - }; - - //########################################################################## - - class QRinput { - - public $items; - - private $version; - private $level; - - //---------------------------------------------------------------------- - public function __construct($version = 0, $level = QR_ECLEVEL_L) - { - if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { - throw new Exception('Invalid version no'); - return NULL; - } - - $this->version = $version; - $this->level = $level; - } - - //---------------------------------------------------------------------- - public function getVersion() - { - return $this->version; - } - - //---------------------------------------------------------------------- - public function setVersion($version) - { - if($version < 0 || $version > QRSPEC_VERSION_MAX) { - throw new Exception('Invalid version no'); - return -1; - } - - $this->version = $version; - - return 0; - } - - //---------------------------------------------------------------------- - public function getErrorCorrectionLevel() - { - return $this->level; - } - - //---------------------------------------------------------------------- - public function setErrorCorrectionLevel($level) - { - if($level > QR_ECLEVEL_H) { - throw new Exception('Invalid ECLEVEL'); - return -1; - } - - $this->level = $level; - - return 0; - } - - //---------------------------------------------------------------------- - public function appendEntry(QRinputItem $entry) - { - $this->items[] = $entry; - } - - //---------------------------------------------------------------------- - public function append($mode, $size, $data) - { - try { - $entry = new QRinputItem($mode, $size, $data); - $this->items[] = $entry; - return 0; - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - - public function insertStructuredAppendHeader($size, $index, $parity) - { - if( $size > MAX_STRUCTURED_SYMBOLS ) { - throw new Exception('insertStructuredAppendHeader wrong size'); - } - - if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { - throw new Exception('insertStructuredAppendHeader wrong index'); - } - - $buf = array($size, $index, $parity); - - try { - $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); - array_unshift($this->items, $entry); - return 0; - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function calcParity() - { - $parity = 0; - - foreach($this->items as $item) { - if($item->mode != QR_MODE_STRUCTURE) { - for($i=$item->size-1; $i>=0; $i--) { - $parity ^= $item->data[$i]; - } - } - } - - return $parity; - } - - //---------------------------------------------------------------------- - public static function checkModeNum($size, $data) - { - for($i=0; $i<$size; $i++) { - if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ - return false; - } - } - - return true; - } - - //---------------------------------------------------------------------- - public static function estimateBitsModeNum($size) - { - $w = (int)$size / 3; - $bits = $w * 10; - - switch($size - $w * 3) { - case 1: - $bits += 4; - break; - case 2: - $bits += 7; - break; - default: - break; - } - - return $bits; - } - - //---------------------------------------------------------------------- - public static $anTable = array( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - ); - - //---------------------------------------------------------------------- - public static function lookAnTable($c) - { - return (($c > 127)?-1:self::$anTable[$c]); - } - - //---------------------------------------------------------------------- - public static function checkModeAn($size, $data) - { - for($i=0; $i<$size; $i++) { - if (self::lookAnTable(ord($data[$i])) == -1) { - return false; - } - } - - return true; - } - - //---------------------------------------------------------------------- - public static function estimateBitsModeAn($size) - { - $w = (int)($size / 2); - $bits = $w * 11; - - if($size & 1) { - $bits += 6; - } - - return $bits; - } - - //---------------------------------------------------------------------- - public static function estimateBitsMode8($size) - { - return $size * 8; - } - - //---------------------------------------------------------------------- - public function estimateBitsModeKanji($size) - { - return (int)(($size / 2) * 13); - } - - //---------------------------------------------------------------------- - public static function checkModeKanji($size, $data) - { - if($size & 1) - return false; - - for($i=0; $i<$size; $i+=2) { - $val = (ord($data[$i]) << 8) | ord($data[$i+1]); - if( $val < 0x8140 - || ($val > 0x9ffc && $val < 0xe040) - || $val > 0xebbf) { - return false; - } - } - - return true; - } - - /*********************************************************************** - * Validation - **********************************************************************/ - - public static function check($mode, $size, $data) - { - if($size <= 0) - return false; - - switch($mode) { - case QR_MODE_NUM: return self::checkModeNum($size, $data); break; - case QR_MODE_AN: return self::checkModeAn($size, $data); break; - case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; - case QR_MODE_8: return true; break; - case QR_MODE_STRUCTURE: return true; break; - - default: - break; - } - - return false; - } - - - //---------------------------------------------------------------------- - public function estimateBitStreamSize($version) - { - $bits = 0; - - foreach($this->items as $item) { - $bits += $item->estimateBitStreamSizeOfEntry($version); - } - - return $bits; - } - - //---------------------------------------------------------------------- - public function estimateVersion() - { - $version = 0; - $prev = 0; - do { - $prev = $version; - $bits = $this->estimateBitStreamSize($prev); - $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($version < 0) { - return -1; - } - } while ($version > $prev); - - return $version; - } - - //---------------------------------------------------------------------- - public static function lengthOfCode($mode, $version, $bits) - { - $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); - switch($mode) { - case QR_MODE_NUM: - $chunks = (int)($payload / 10); - $remain = $payload - $chunks * 10; - $size = $chunks * 3; - if($remain >= 7) { - $size += 2; - } else if($remain >= 4) { - $size += 1; - } - break; - case QR_MODE_AN: - $chunks = (int)($payload / 11); - $remain = $payload - $chunks * 11; - $size = $chunks * 2; - if($remain >= 6) - $size++; - break; - case QR_MODE_8: - $size = (int)($payload / 8); - break; - case QR_MODE_KANJI: - $size = (int)(($payload / 13) * 2); - break; - case QR_MODE_STRUCTURE: - $size = (int)($payload / 8); - break; - default: - $size = 0; - break; - } - - $maxsize = QRspec::maximumWords($mode, $version); - if($size < 0) $size = 0; - if($size > $maxsize) $size = $maxsize; - - return $size; - } - - //---------------------------------------------------------------------- - public function createBitStream() - { - $total = 0; - - foreach($this->items as $item) { - $bits = $item->encodeBitStream($this->version); - - if($bits < 0) - return -1; - - $total += $bits; - } - - return $total; - } - - //---------------------------------------------------------------------- - public function convertData() - { - $ver = $this->estimateVersion(); - if($ver > $this->getVersion()) { - $this->setVersion($ver); - } - - for(;;) { - $bits = $this->createBitStream(); - - if($bits < 0) - return -1; - - $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if($ver < 0) { - throw new Exception('WRONG VERSION'); - return -1; - } else if($ver > $this->getVersion()) { - $this->setVersion($ver); - } else { - break; - } - } - - return 0; - } - - //---------------------------------------------------------------------- - public function appendPaddingBit(&$bstream) - { - $bits = $bstream->size(); - $maxwords = QRspec::getDataLength($this->version, $this->level); - $maxbits = $maxwords * 8; - - if ($maxbits == $bits) { - return 0; - } - - if ($maxbits - $bits < 5) { - return $bstream->appendNum($maxbits - $bits, 0); - } - - $bits += 4; - $words = (int)(($bits + 7) / 8); - - $padding = new QRbitstream(); - $ret = $padding->appendNum($words * 8 - $bits + 4, 0); - - if($ret < 0) - return $ret; - - $padlen = $maxwords - $words; - - if($padlen > 0) { - - $padbuf = array(); - for($i=0; $i<$padlen; $i++) { - $padbuf[$i] = ($i&1)?0x11:0xec; - } - - $ret = $padding->appendBytes($padlen, $padbuf); - - if($ret < 0) - return $ret; - - } - - $ret = $bstream->append($padding); - - return $ret; - } - - //---------------------------------------------------------------------- - public function mergeBitStream() - { - if($this->convertData() < 0) { - return null; - } - - $bstream = new QRbitstream(); - - foreach($this->items as $item) { - $ret = $bstream->append($item->bstream); - if($ret < 0) { - return null; - } - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function getBitStream() - { - - $bstream = $this->mergeBitStream(); - - if($bstream == null) { - return null; - } - - $ret = $this->appendPaddingBit($bstream); - if($ret < 0) { - return null; - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function getByteStream() - { - $bstream = $this->getBitStream(); - if($bstream == null) { - return null; - } - - return $bstream->toByte(); - } - } - - - - - - -//---- qrbitstream.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Bitstream class - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRbitstream { - - public $data = array(); - - //---------------------------------------------------------------------- - public function size() - { - return count($this->data); - } - - //---------------------------------------------------------------------- - public function allocate($setLength) - { - $this->data = array_fill(0, $setLength, 0); - return 0; - } - - //---------------------------------------------------------------------- - public static function newFromNum($bits, $num) - { - $bstream = new QRbitstream(); - $bstream->allocate($bits); - - $mask = 1 << ($bits - 1); - for($i=0; $i<$bits; $i++) { - if($num & $mask) { - $bstream->data[$i] = 1; - } else { - $bstream->data[$i] = 0; - } - $mask = $mask >> 1; - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public static function newFromBytes($size, $data) - { - $bstream = new QRbitstream(); - $bstream->allocate($size * 8); - $p=0; - - for($i=0; $i<$size; $i++) { - $mask = 0x80; - for($j=0; $j<8; $j++) { - if($data[$i] & $mask) { - $bstream->data[$p] = 1; - } else { - $bstream->data[$p] = 0; - } - $p++; - $mask = $mask >> 1; - } - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function append(QRbitstream $arg) - { - if (is_null($arg)) { - return -1; - } - - if($arg->size() == 0) { - return 0; - } - - if($this->size() == 0) { - $this->data = $arg->data; - return 0; - } - - $this->data = array_values(array_merge($this->data, $arg->data)); - - return 0; - } - - //---------------------------------------------------------------------- - public function appendNum($bits, $num) - { - if ($bits == 0) - return 0; - - $b = QRbitstream::newFromNum($bits, $num); - - if(is_null($b)) - return -1; - - $ret = $this->append($b); - unset($b); - - return $ret; - } - - //---------------------------------------------------------------------- - public function appendBytes($size, $data) - { - if ($size == 0) - return 0; - - $b = QRbitstream::newFromBytes($size, $data); - - if(is_null($b)) - return -1; - - $ret = $this->append($b); - unset($b); - - return $ret; - } - - //---------------------------------------------------------------------- - public function toByte() - { - - $size = $this->size(); - - if($size == 0) { - return array(); - } - - $data = array_fill(0, (int)(($size + 7) / 8), 0); - $bytes = (int)($size / 8); - - $p = 0; - - for($i=0; $i<$bytes; $i++) { - $v = 0; - for($j=0; $j<8; $j++) { - $v = $v << 1; - $v |= $this->data[$p]; - $p++; - } - $data[$i] = $v; - } - - if($size & 7) { - $v = 0; - for($j=0; $j<($size & 7); $j++) { - $v = $v << 1; - $v |= $this->data[$p]; - $p++; - } - $data[$bytes] = $v; - } - - return $data; - } - - } - - - - -//---- qrsplit.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Input splitting classes - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - class QRsplit { - - public $dataStr = ''; - public $input; - public $modeHint; - - //---------------------------------------------------------------------- - public function __construct($dataStr, $input, $modeHint) - { - $this->dataStr = $dataStr; - $this->input = $input; - $this->modeHint = $modeHint; - } - - //---------------------------------------------------------------------- - public static function isdigitat($str, $pos) - { - if ($pos >= strlen($str)) - return false; - - return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); - } - - //---------------------------------------------------------------------- - public static function isalnumat($str, $pos) - { - if ($pos >= strlen($str)) - return false; - - return (QRinput::lookAnTable(ord($str[$pos])) >= 0); - } - - //---------------------------------------------------------------------- - public function identifyMode($pos) - { - if ($pos >= strlen($this->dataStr)) - return QR_MODE_NUL; - - $c = $this->dataStr[$pos]; - - if(self::isdigitat($this->dataStr, $pos)) { - return QR_MODE_NUM; - } else if(self::isalnumat($this->dataStr, $pos)) { - return QR_MODE_AN; - } else if($this->modeHint == QR_MODE_KANJI) { - - if ($pos+1 < strlen($this->dataStr)) - { - $d = $this->dataStr[$pos+1]; - $word = (ord($c) << 8) | ord($d); - if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { - return QR_MODE_KANJI; - } - } - } - - return QR_MODE_8; - } - - //---------------------------------------------------------------------- - public function eatNum() - { - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 0; - while(self::isdigitat($this->dataStr, $p)) { - $p++; - } - - $run = $p; - $mode = $this->identifyMode($p); - - if($mode == QR_MODE_8) { - $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 - if($dif > 0) { - return $this->eat8(); - } - } - if($mode == QR_MODE_AN) { - $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsModeAn(1) // + 4 + la - - QRinput::estimateBitsModeAn($run + 1);// - 4 - la - if($dif > 0) { - return $this->eatAn(); - } - } - - $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eatAn() - { - $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 0; - - while(self::isalnumat($this->dataStr, $p)) { - if(self::isdigitat($this->dataStr, $p)) { - $q = $p; - while(self::isdigitat($this->dataStr, $q)) { - $q++; - } - - $dif = QRinput::estimateBitsModeAn($p) // + 4 + la - + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsModeAn($q); // - 4 - la - - if($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - - $run = $p; - - if(!self::isalnumat($this->dataStr, $p)) { - $dif = QRinput::estimateBitsModeAn($run) + 4 + $la - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 - if($dif > 0) { - return $this->eat8(); - } - } - - $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eatKanji() - { - $p = 0; - - while($this->identifyMode($p) == QR_MODE_KANJI) { - $p += 2; - } - - $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eat8() - { - $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 1; - $dataStrLen = strlen($this->dataStr); - - while($p < $dataStrLen) { - - $mode = $this->identifyMode($p); - if($mode == QR_MODE_KANJI) { - break; - } - if($mode == QR_MODE_NUM) { - $q = $p; - while(self::isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 - + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsMode8($q); // - 4 - l8 - if($dif < 0) { - break; - } else { - $p = $q; - } - } else if($mode == QR_MODE_AN) { - $q = $p; - while(self::isalnumat($this->dataStr, $q)) { - $q++; - } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 - + QRinput::estimateBitsModeAn($q - $p) + 4 + $la - - QRinput::estimateBitsMode8($q); // - 4 - l8 - if($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - - $run = $p; - $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); - - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function splitString() - { - while (strlen($this->dataStr) > 0) - { - if($this->dataStr == '') - return 0; - - $mode = $this->identifyMode(0); - - switch ($mode) { - case QR_MODE_NUM: $length = $this->eatNum(); break; - case QR_MODE_AN: $length = $this->eatAn(); break; - case QR_MODE_KANJI: - if ($hint == QR_MODE_KANJI) - $length = $this->eatKanji(); - else $length = $this->eat8(); - break; - default: $length = $this->eat8(); break; - - } - - if($length == 0) return 0; - if($length < 0) return -1; - - $this->dataStr = substr($this->dataStr, $length); - } - } - - //---------------------------------------------------------------------- - public function toUpper() - { - $stringLen = strlen($this->dataStr); - $p = 0; - - while ($p<$stringLen) { - $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint); - if($mode == QR_MODE_KANJI) { - $p += 2; - } else { - if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { - $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); - } - $p++; - } - } - - return $this->dataStr; - } - - //---------------------------------------------------------------------- - public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) - { - if(is_null($string) || $string == '\0' || $string == '') { - throw new Exception('empty string!!!'); - } - - $split = new QRsplit($string, $input, $modeHint); - - if(!$casesensitive) - $split->toUpper(); - - return $split->splitString(); - } - } - - - -//---- qrrscode.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Reed-Solomon error correction support - * - * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q - * (libfec is released under the GNU Lesser General Public License.) - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsItem { - - public $mm; // Bits per symbol - public $nn; // Symbols per block (= (1<= $this->nn) { - $x -= $this->nn; - $x = ($x >> $this->mm) + ($x & $this->nn); - } - - return $x; - } - - //---------------------------------------------------------------------- - public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) - { - // Common code for intializing a Reed-Solomon control block (char or int symbols) - // Copyright 2004 Phil Karn, KA9Q - // May be used under the terms of the GNU Lesser General Public License (LGPL) - - $rs = null; - - // Check parameter ranges - if($symsize < 0 || $symsize > 8) return $rs; - if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; - if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; - if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! - if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding - - $rs = new QRrsItem(); - $rs->mm = $symsize; - $rs->nn = (1<<$symsize)-1; - $rs->pad = $pad; - - $rs->alpha_to = array_fill(0, $rs->nn+1, 0); - $rs->index_of = array_fill(0, $rs->nn+1, 0); - - // PHP style macro replacement ;) - $NN =& $rs->nn; - $A0 =& $NN; - - // Generate Galois field lookup tables - $rs->index_of[0] = $A0; // log(zero) = -inf - $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 - $sr = 1; - - for($i=0; $i<$rs->nn; $i++) { - $rs->index_of[$sr] = $i; - $rs->alpha_to[$i] = $sr; - $sr <<= 1; - if($sr & (1<<$symsize)) { - $sr ^= $gfpoly; - } - $sr &= $rs->nn; - } - - if($sr != 1){ - // field generator polynomial is not primitive! - $rs = NULL; - return $rs; - } - - /* Form RS code generator polynomial from its roots */ - $rs->genpoly = array_fill(0, $nroots+1, 0); - - $rs->fcr = $fcr; - $rs->prim = $prim; - $rs->nroots = $nroots; - $rs->gfpoly = $gfpoly; - - /* Find prim-th root of 1, used in decoding */ - for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) - ; // intentional empty-body loop! - - $rs->iprim = (int)($iprim / $prim); - $rs->genpoly[0] = 1; - - for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { - $rs->genpoly[$i+1] = 1; - - // Multiply rs->genpoly[] by @**(root + x) - for ($j = $i; $j > 0; $j--) { - if ($rs->genpoly[$j] != 0) { - $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; - } else { - $rs->genpoly[$j] = $rs->genpoly[$j-1]; - } - } - // rs->genpoly[0] can never be zero - $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; - } - - // convert rs->genpoly[] to index form for quicker encoding - for ($i = 0; $i <= $nroots; $i++) - $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; - - return $rs; - } - - //---------------------------------------------------------------------- - public function encode_rs_char($data, &$parity) - { - $MM =& $this->mm; - $NN =& $this->nn; - $ALPHA_TO =& $this->alpha_to; - $INDEX_OF =& $this->index_of; - $GENPOLY =& $this->genpoly; - $NROOTS =& $this->nroots; - $FCR =& $this->fcr; - $PRIM =& $this->prim; - $IPRIM =& $this->iprim; - $PAD =& $this->pad; - $A0 =& $NN; - - $parity = array_fill(0, $NROOTS, 0); - - for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { - - $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; - if($feedback != $A0) { - // feedback term is non-zero - - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() - $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); - - for($j=1;$j<$NROOTS;$j++) { - $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; - } - } - - // Shift - array_shift($parity); - if($feedback != $A0) { - array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); - } else { - array_push($parity, 0); - } - } - } - } - - //########################################################################## - - class QRrs { - - public static $items = array(); - - //---------------------------------------------------------------------- - public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) - { - foreach(self::$items as $rs) { - if($rs->pad != $pad) continue; - if($rs->nroots != $nroots) continue; - if($rs->mm != $symsize) continue; - if($rs->gfpoly != $gfpoly) continue; - if($rs->fcr != $fcr) continue; - if($rs->prim != $prim) continue; - - return $rs; - } - - $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); - array_unshift(self::$items, $rs); - - return $rs; - } - } - - - -//---- qrmask.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Masking - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('N1', 3); - define('N2', 3); - define('N3', 40); - define('N4', 10); - - class QRmask { - - public $runLength = array(); - - //---------------------------------------------------------------------- - public function __construct() - { - $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); - } - - //---------------------------------------------------------------------- - public function writeFormatInformation($width, &$frame, $mask, $level) - { - $blacks = 0; - $format = QRspec::getFormatInfo($mask, $level); - - for($i=0; $i<8; $i++) { - if($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - - $frame[8][$width - 1 - $i] = chr($v); - if($i < 6) { - $frame[$i][8] = chr($v); - } else { - $frame[$i + 1][8] = chr($v); - } - $format = $format >> 1; - } - - for($i=0; $i<7; $i++) { - if($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - - $frame[$width - 7 + $i][8] = chr($v); - if($i == 0) { - $frame[8][7] = chr($v); - } else { - $frame[8][6 - $i] = chr($v); - } - - $format = $format >> 1; - } - - return $blacks; - } - - //---------------------------------------------------------------------- - public function mask0($x, $y) { return ($x+$y)&1; } - public function mask1($x, $y) { return ($y&1); } - public function mask2($x, $y) { return ($x%3); } - public function mask3($x, $y) { return ($x+$y)%3; } - public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } - public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } - public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } - public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } - - //---------------------------------------------------------------------- - private function generateMaskNo($maskNo, $width, $frame) - { - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - - for($y=0; $y<$width; $y++) { - for($x=0; $x<$width; $x++) { - if(ord($frame[$y][$x]) & 0x80) { - $bitMask[$y][$x] = 0; - } else { - $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); - $bitMask[$y][$x] = ($maskFunc == 0)?1:0; - } - - } - } - - return $bitMask; - } - - //---------------------------------------------------------------------- - public static function serial($bitFrame) - { - $codeArr = array(); - - foreach ($bitFrame as $line) - $codeArr[] = join('', $line); - - return gzcompress(join("\n", $codeArr), 9); - } - - //---------------------------------------------------------------------- - public static function unserial($code) - { - $codeArr = array(); - - $codeLines = explode("\n", gzuncompress($code)); - foreach ($codeLines as $line) - $codeArr[] = str_split($line); - - return $codeArr; - } - - //---------------------------------------------------------------------- - public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) - { - $b = 0; - $bitMask = array(); - - $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; - - if (QR_CACHEABLE) { - if (file_exists($fileName)) { - $bitMask = self::unserial(file_get_contents($fileName)); - } else { - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) - mkdir(QR_CACHE_DIR.'mask_'.$maskNo); - file_put_contents($fileName, self::serial($bitMask)); - } - } else { - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - } - - if ($maskGenOnly) - return; - - $d = $s; - - for($y=0; $y<$width; $y++) { - for($x=0; $x<$width; $x++) { - if($bitMask[$y][$x] == 1) { - $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); - } - $b += (int)(ord($d[$y][$x]) & 1); - } - } - - return $b; - } - - //---------------------------------------------------------------------- - public function makeMask($width, $frame, $maskNo, $level) - { - $masked = array_fill(0, $width, str_repeat("\0", $width)); - $this->makeMaskNo($maskNo, $width, $frame, $masked); - $this->writeFormatInformation($width, $masked, $maskNo, $level); - - return $masked; - } - - //---------------------------------------------------------------------- - public function calcN1N3($length) - { - $demerit = 0; - - for($i=0; $i<$length; $i++) { - - if($this->runLength[$i] >= 5) { - $demerit += (N1 + ($this->runLength[$i] - 5)); - } - if($i & 1) { - if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { - $fact = (int)($this->runLength[$i] / 3); - if(($this->runLength[$i-2] == $fact) && - ($this->runLength[$i-1] == $fact) && - ($this->runLength[$i+1] == $fact) && - ($this->runLength[$i+2] == $fact)) { - if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { - $demerit += N3; - } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { - $demerit += N3; - } - } - } - } - } - return $demerit; - } - - //---------------------------------------------------------------------- - public function evaluateSymbol($width, $frame) - { - $head = 0; - $demerit = 0; - - for($y=0; $y<$width; $y++) { - $head = 0; - $this->runLength[0] = 1; - - $frameY = $frame[$y]; - - if ($y>0) - $frameYM = $frame[$y-1]; - - for($x=0; $x<$width; $x++) { - if(($x > 0) && ($y > 0)) { - $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); - $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); - - if(($b22 | ($w22 ^ 1))&1) { - $demerit += N2; - } - } - if(($x == 0) && (ord($frameY[$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } else if($x > 0) { - if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - - $demerit += $this->calcN1N3($head+1); - } - - for($x=0; $x<$width; $x++) { - $head = 0; - $this->runLength[0] = 1; - - for($y=0; $y<$width; $y++) { - if($y == 0 && (ord($frame[$y][$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } else if($y > 0) { - if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - - $demerit += $this->calcN1N3($head+1); - } - - return $demerit; - } - - - //---------------------------------------------------------------------- - public function mask($width, $frame, $level) - { - $minDemerit = PHP_INT_MAX; - $bestMaskNum = 0; - $bestMask = array(); - - $checked_masks = array(0,1,2,3,4,5,6,7); - - if (QR_FIND_FROM_RANDOM !== false) { - - $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); - for ($i = 0; $i < $howManuOut; $i++) { - $remPos = rand (0, count($checked_masks)-1); - unset($checked_masks[$remPos]); - $checked_masks = array_values($checked_masks); - } - - } - - $bestMask = $frame; - - foreach($checked_masks as $i) { - $mask = array_fill(0, $width, str_repeat("\0", $width)); - - $demerit = 0; - $blacks = 0; - $blacks = $this->makeMaskNo($i, $width, $frame, $mask); - $blacks += $this->writeFormatInformation($width, $mask, $i, $level); - $blacks = (int)(100 * $blacks / ($width * $width)); - $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); - $demerit += $this->evaluateSymbol($width, $mask); - - if($demerit < $minDemerit) { - $minDemerit = $demerit; - $bestMask = $mask; - $bestMaskNum = $i; - } - } - - return $bestMask; - } - - //---------------------------------------------------------------------- - } - - - - -//---- qrencode.php ----------------------------- - - - - -/* - * PHP QR Code encoder - * - * Main encoder classes. - * - * Based on libqrencode C library distributed under LGPL 2.1 - * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsblock { - public $dataLength; - public $data = array(); - public $eccLength; - public $ecc = array(); - - public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) - { - $rs->encode_rs_char($data, $ecc); - - $this->dataLength = $dl; - $this->data = $data; - $this->eccLength = $el; - $this->ecc = $ecc; - } - }; - - //########################################################################## - - class QRrawcode { - public $version; - public $datacode = array(); - public $ecccode = array(); - public $blocks; - public $rsblocks = array(); //of RSblock - public $count; - public $dataLength; - public $eccLength; - public $b1; - - //---------------------------------------------------------------------- - public function __construct(QRinput $input) - { - $spec = array(0,0,0,0,0); - - $this->datacode = $input->getByteStream(); - if(is_null($this->datacode)) { - throw new Exception('null imput string'); - } - - QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); - - $this->version = $input->getVersion(); - $this->b1 = QRspec::rsBlockNum1($spec); - $this->dataLength = QRspec::rsDataLength($spec); - $this->eccLength = QRspec::rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = QRspec::rsBlockNum($spec); - - $ret = $this->init($spec); - if($ret < 0) { - throw new Exception('block alloc error'); - return null; - } - - $this->count = 0; - } - - //---------------------------------------------------------------------- - public function init(array $spec) - { - $dl = QRspec::rsDataCodes1($spec); - $el = QRspec::rsEccCodes1($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - if(QRspec::rsBlockNum2($spec) == 0) - return 0; - - $dl = QRspec::rsDataCodes2($spec); - $el = QRspec::rsEccCodes2($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - if($rs == NULL) return -1; - - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - return 0; - } - - //---------------------------------------------------------------------- - public function getCode() - { - $ret; - - if($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if($col >= $this->rsblocks[0]->dataLength) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]->data[$col]; - } else if($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]->ecc[$col]; - } else { - return 0; - } - $this->count++; - - return $ret; - } - } - - //########################################################################## - - class QRcode { - - public $version; - public $width; - public $data; - - //---------------------------------------------------------------------- - public function encodeMask(QRinput $input, $mask) - { - if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { - throw new Exception('wrong version'); - } - if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { - throw new Exception('wrong level'); - } - - $raw = new QRrawcode($input); - - QRtools::markTime('after_raw'); - - $version = $raw->version; - $width = QRspec::getWidth($version); - $frame = QRspec::newFrame($version); - - $filler = new FrameFiller($width, $frame); - if(is_null($filler)) { - return NULL; - } - - // inteleaved data and ecc codes - for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { - $code = $raw->getCode(); - $bit = 0x80; - for($j=0; $j<8; $j++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - - QRtools::markTime('after_filler'); - - unset($raw); - - // remainder bits - $j = QRspec::getRemainder($version); - for($i=0; $i<$j; $i++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02); - } - - $frame = $filler->frame; - unset($filler); - - - // masking - $maskObj = new QRmask(); - if($mask < 0) { - - if (QR_FIND_BEST_MASK) { - $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); - } else { - $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); - } - } else { - $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); - } - - if($masked == NULL) { - return NULL; - } - - QRtools::markTime('after_mask'); - - $this->version = $version; - $this->width = $width; - $this->data = $masked; - - return $this; - } - - //---------------------------------------------------------------------- - public function encodeInput(QRinput $input) - { - return $this->encodeMask($input, -1); - } - - //---------------------------------------------------------------------- - public function encodeString8bit($string, $version, $level) - { - if(string == NULL) { - throw new Exception('empty string!'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); - if($ret < 0) { - unset($input); - return NULL; - } - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public function encodeString($string, $version, $level, $hint, $casesensitive) - { - - if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { - throw new Exception('bad hint'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); - if($ret < 0) { - return NULL; - } - - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodePNG($text, $outfile, $saveandprint=false); - } - - //---------------------------------------------------------------------- - public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encode($text, $outfile); - } - - //---------------------------------------------------------------------- - public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodeRAW($text, $outfile); - } - } - - //########################################################################## - - class FrameFiller { - - public $width; - public $frame; - public $x; - public $y; - public $dir; - public $bit; - - //---------------------------------------------------------------------- - public function __construct($width, &$frame) - { - $this->width = $width; - $this->frame = $frame; - $this->x = $width - 1; - $this->y = $width - 1; - $this->dir = -1; - $this->bit = -1; - } - - //---------------------------------------------------------------------- - public function setFrameAt($at, $val) - { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - //---------------------------------------------------------------------- - public function getFrameAt($at) - { - return ord($this->frame[$at['y']][$at['x']]); - } - - //---------------------------------------------------------------------- - public function next() - { - do { - - if($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - - $x = $this->x; - $y = $this->y; - $w = $this->width; - - if($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - - if($this->dir < 0) { - if($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if($x == 6) { - $x--; - $y = 9; - } - } - } else { - if($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if($x == 6) { - $x--; - $y -= 8; - } - } - } - if($x < 0 || $y < 0) return null; - - $this->x = $x; - $this->y = $y; - - } while(ord($this->frame[$y][$x]) & 0x80); - - return array('x'=>$x, 'y'=>$y); - } - - } ; - - //########################################################################## - - class QRencode { - - public $casesensitive = true; - public $eightbit = false; - - public $version = 0; - public $size = 3; - public $margin = 4; - - public $structured = 0; // not supported yet - - public $level = QR_ECLEVEL_L; - public $hint = QR_MODE_8; - - //---------------------------------------------------------------------- - public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = new QRencode(); - $enc->size = $size; - $enc->margin = $margin; - - switch ($level.'') { - case '0': - case '1': - case '2': - case '3': - $enc->level = $level; - break; - case 'l': - case 'L': - $enc->level = QR_ECLEVEL_L; - break; - case 'm': - case 'M': - $enc->level = QR_ECLEVEL_M; - break; - case 'q': - case 'Q': - $enc->level = QR_ECLEVEL_Q; - break; - case 'h': - case 'H': - $enc->level = QR_ECLEVEL_H; - break; - } - - return $enc; - } - - //---------------------------------------------------------------------- - public function encodeRAW($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - return $code->data; - } - - //---------------------------------------------------------------------- - public function encode($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - QRtools::markTime('after_encode'); - - if ($outfile!== false) { - file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); - } else { - return QRtools::binarize($code->data); - } - } - - //---------------------------------------------------------------------- - public function encodePNG($intext, $outfile = false,$saveandprint=false) - { - try { - - ob_start(); - $tab = $this->encode($intext); - $err = ob_get_contents(); - ob_end_clean(); - - if ($err != '') - QRtools::log($outfile, $err); - - $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); - - QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint); - - } catch (Exception $e) { - - QRtools::log($outfile, $e->getMessage()); - - } - } - } - - diff --git a/extend/phpqrcode/qrbitstream.php b/extend/phpqrcode/qrbitstream.php deleted file mode 100644 index c8d1166..0000000 --- a/extend/phpqrcode/qrbitstream.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRbitstream { - - public $data = array(); - - //---------------------------------------------------------------------- - public function size() - { - return count($this->data); - } - - //---------------------------------------------------------------------- - public function allocate($setLength) - { - $this->data = array_fill(0, $setLength, 0); - return 0; - } - - //---------------------------------------------------------------------- - public static function newFromNum($bits, $num) - { - $bstream = new QRbitstream(); - $bstream->allocate($bits); - - $mask = 1 << ($bits - 1); - for($i=0; $i<$bits; $i++) { - if($num & $mask) { - $bstream->data[$i] = 1; - } else { - $bstream->data[$i] = 0; - } - $mask = $mask >> 1; - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public static function newFromBytes($size, $data) - { - $bstream = new QRbitstream(); - $bstream->allocate($size * 8); - $p=0; - - for($i=0; $i<$size; $i++) { - $mask = 0x80; - for($j=0; $j<8; $j++) { - if($data[$i] & $mask) { - $bstream->data[$p] = 1; - } else { - $bstream->data[$p] = 0; - } - $p++; - $mask = $mask >> 1; - } - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function append(QRbitstream $arg) - { - if (is_null($arg)) { - return -1; - } - - if($arg->size() == 0) { - return 0; - } - - if($this->size() == 0) { - $this->data = $arg->data; - return 0; - } - - $this->data = array_values(array_merge($this->data, $arg->data)); - - return 0; - } - - //---------------------------------------------------------------------- - public function appendNum($bits, $num) - { - if ($bits == 0) - return 0; - - $b = QRbitstream::newFromNum($bits, $num); - - if(is_null($b)) - return -1; - - $ret = $this->append($b); - unset($b); - - return $ret; - } - - //---------------------------------------------------------------------- - public function appendBytes($size, $data) - { - if ($size == 0) - return 0; - - $b = QRbitstream::newFromBytes($size, $data); - - if(is_null($b)) - return -1; - - $ret = $this->append($b); - unset($b); - - return $ret; - } - - //---------------------------------------------------------------------- - public function toByte() - { - - $size = $this->size(); - - if($size == 0) { - return array(); - } - - $data = array_fill(0, (int)(($size + 7) / 8), 0); - $bytes = (int)($size / 8); - - $p = 0; - - for($i=0; $i<$bytes; $i++) { - $v = 0; - for($j=0; $j<8; $j++) { - $v = $v << 1; - $v |= $this->data[$p]; - $p++; - } - $data[$i] = $v; - } - - if($size & 7) { - $v = 0; - for($j=0; $j<($size & 7); $j++) { - $v = $v << 1; - $v |= $this->data[$p]; - $p++; - } - $data[$bytes] = $v; - } - - return $data; - } - - } diff --git a/extend/phpqrcode/qrconfig.php b/extend/phpqrcode/qrconfig.php deleted file mode 100644 index 62e7f97..0000000 --- a/extend/phpqrcode/qrconfig.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - // Encoding modes - - define('QR_MODE_NUL', -1); - define('QR_MODE_NUM', 0); - define('QR_MODE_AN', 1); - define('QR_MODE_8', 2); - define('QR_MODE_KANJI', 3); - define('QR_MODE_STRUCTURE', 4); - - // Levels of error correction. - - define('QR_ECLEVEL_L', 0); - define('QR_ECLEVEL_M', 1); - define('QR_ECLEVEL_Q', 2); - define('QR_ECLEVEL_H', 3); - - // Supported output formats - - define('QR_FORMAT_TEXT', 0); - define('QR_FORMAT_PNG', 1); - - class qrstr { - public static function set(&$srctab, $x, $y, $repl, $replLen = false) { - $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); - } - } \ No newline at end of file diff --git a/extend/phpqrcode/qrencode.php b/extend/phpqrcode/qrencode.php deleted file mode 100644 index fc909fa..0000000 --- a/extend/phpqrcode/qrencode.php +++ /dev/null @@ -1,502 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsblock { - public $dataLength; - public $data = array(); - public $eccLength; - public $ecc = array(); - - public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) - { - $rs->encode_rs_char($data, $ecc); - - $this->dataLength = $dl; - $this->data = $data; - $this->eccLength = $el; - $this->ecc = $ecc; - } - }; - - //########################################################################## - - class QRrawcode { - public $version; - public $datacode = array(); - public $ecccode = array(); - public $blocks; - public $rsblocks = array(); //of RSblock - public $count; - public $dataLength; - public $eccLength; - public $b1; - - //---------------------------------------------------------------------- - public function __construct(QRinput $input) - { - $spec = array(0,0,0,0,0); - - $this->datacode = $input->getByteStream(); - if(is_null($this->datacode)) { - throw new Exception('null imput string'); - } - - QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); - - $this->version = $input->getVersion(); - $this->b1 = QRspec::rsBlockNum1($spec); - $this->dataLength = QRspec::rsDataLength($spec); - $this->eccLength = QRspec::rsEccLength($spec); - $this->ecccode = array_fill(0, $this->eccLength, 0); - $this->blocks = QRspec::rsBlockNum($spec); - - $ret = $this->init($spec); - if($ret < 0) { - throw new Exception('block alloc error'); - return null; - } - - $this->count = 0; - } - - //---------------------------------------------------------------------- - public function init(array $spec) - { - $dl = QRspec::rsDataCodes1($spec); - $el = QRspec::rsEccCodes1($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - - $blockNo = 0; - $dataPos = 0; - $eccPos = 0; - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - if(QRspec::rsBlockNum2($spec) == 0) - return 0; - - $dl = QRspec::rsDataCodes2($spec); - $el = QRspec::rsEccCodes2($spec); - $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); - - if($rs == NULL) return -1; - - for($i=0; $iecccode,$eccPos); - $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); - $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); - - $dataPos += $dl; - $eccPos += $el; - $blockNo++; - } - - return 0; - } - - //---------------------------------------------------------------------- - public function getCode() - { - $ret; - - if($this->count < $this->dataLength) { - $row = $this->count % $this->blocks; - $col = $this->count / $this->blocks; - if($col >= $this->rsblocks[0]->dataLength) { - $row += $this->b1; - } - $ret = $this->rsblocks[$row]->data[$col]; - } else if($this->count < $this->dataLength + $this->eccLength) { - $row = ($this->count - $this->dataLength) % $this->blocks; - $col = ($this->count - $this->dataLength) / $this->blocks; - $ret = $this->rsblocks[$row]->ecc[$col]; - } else { - return 0; - } - $this->count++; - - return $ret; - } - } - - //########################################################################## - - class QRcode { - - public $version; - public $width; - public $data; - - //---------------------------------------------------------------------- - public function encodeMask(QRinput $input, $mask) - { - if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { - throw new Exception('wrong version'); - } - if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { - throw new Exception('wrong level'); - } - - $raw = new QRrawcode($input); - - QRtools::markTime('after_raw'); - - $version = $raw->version; - $width = QRspec::getWidth($version); - $frame = QRspec::newFrame($version); - - $filler = new FrameFiller($width, $frame); - if(is_null($filler)) { - return NULL; - } - - // inteleaved data and ecc codes - for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { - $code = $raw->getCode(); - $bit = 0x80; - for($j=0; $j<8; $j++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); - $bit = $bit >> 1; - } - } - - QRtools::markTime('after_filler'); - - unset($raw); - - // remainder bits - $j = QRspec::getRemainder($version); - for($i=0; $i<$j; $i++) { - $addr = $filler->next(); - $filler->setFrameAt($addr, 0x02); - } - - $frame = $filler->frame; - unset($filler); - - - // masking - $maskObj = new QRmask(); - if($mask < 0) { - - if (QR_FIND_BEST_MASK) { - $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); - } else { - $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); - } - } else { - $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); - } - - if($masked == NULL) { - return NULL; - } - - QRtools::markTime('after_mask'); - - $this->version = $version; - $this->width = $width; - $this->data = $masked; - - return $this; - } - - //---------------------------------------------------------------------- - public function encodeInput(QRinput $input) - { - return $this->encodeMask($input, -1); - } - - //---------------------------------------------------------------------- - public function encodeString8bit($string, $version, $level) - { - if(string == NULL) { - throw new Exception('empty string!'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); - if($ret < 0) { - unset($input); - return NULL; - } - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public function encodeString($string, $version, $level, $hint, $casesensitive) - { - - if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { - throw new Exception('bad hint'); - return NULL; - } - - $input = new QRinput($version, $level); - if($input == NULL) return NULL; - - $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); - if($ret < 0) { - return NULL; - } - - return $this->encodeInput($input); - } - - //---------------------------------------------------------------------- - public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodePNG($text, $outfile, $saveandprint=false); - } - - //---------------------------------------------------------------------- - public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encode($text, $outfile); - } - - //---------------------------------------------------------------------- - public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = QRencode::factory($level, $size, $margin); - return $enc->encodeRAW($text, $outfile); - } - } - - //########################################################################## - - class FrameFiller { - - public $width; - public $frame; - public $x; - public $y; - public $dir; - public $bit; - - //---------------------------------------------------------------------- - public function __construct($width, &$frame) - { - $this->width = $width; - $this->frame = $frame; - $this->x = $width - 1; - $this->y = $width - 1; - $this->dir = -1; - $this->bit = -1; - } - - //---------------------------------------------------------------------- - public function setFrameAt($at, $val) - { - $this->frame[$at['y']][$at['x']] = chr($val); - } - - //---------------------------------------------------------------------- - public function getFrameAt($at) - { - return ord($this->frame[$at['y']][$at['x']]); - } - - //---------------------------------------------------------------------- - public function next() - { - do { - - if($this->bit == -1) { - $this->bit = 0; - return array('x'=>$this->x, 'y'=>$this->y); - } - - $x = $this->x; - $y = $this->y; - $w = $this->width; - - if($this->bit == 0) { - $x--; - $this->bit++; - } else { - $x++; - $y += $this->dir; - $this->bit--; - } - - if($this->dir < 0) { - if($y < 0) { - $y = 0; - $x -= 2; - $this->dir = 1; - if($x == 6) { - $x--; - $y = 9; - } - } - } else { - if($y == $w) { - $y = $w - 1; - $x -= 2; - $this->dir = -1; - if($x == 6) { - $x--; - $y -= 8; - } - } - } - if($x < 0 || $y < 0) return null; - - $this->x = $x; - $this->y = $y; - - } while(ord($this->frame[$y][$x]) & 0x80); - - return array('x'=>$x, 'y'=>$y); - } - - } ; - - //########################################################################## - - class QRencode { - - public $casesensitive = true; - public $eightbit = false; - - public $version = 0; - public $size = 3; - public $margin = 4; - - public $structured = 0; // not supported yet - - public $level = QR_ECLEVEL_L; - public $hint = QR_MODE_8; - - //---------------------------------------------------------------------- - public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4) - { - $enc = new QRencode(); - $enc->size = $size; - $enc->margin = $margin; - - switch ($level.'') { - case '0': - case '1': - case '2': - case '3': - $enc->level = $level; - break; - case 'l': - case 'L': - $enc->level = QR_ECLEVEL_L; - break; - case 'm': - case 'M': - $enc->level = QR_ECLEVEL_M; - break; - case 'q': - case 'Q': - $enc->level = QR_ECLEVEL_Q; - break; - case 'h': - case 'H': - $enc->level = QR_ECLEVEL_H; - break; - } - - return $enc; - } - - //---------------------------------------------------------------------- - public function encodeRAW($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - return $code->data; - } - - //---------------------------------------------------------------------- - public function encode($intext, $outfile = false) - { - $code = new QRcode(); - - if($this->eightbit) { - $code->encodeString8bit($intext, $this->version, $this->level); - } else { - $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); - } - - QRtools::markTime('after_encode'); - - if ($outfile!== false) { - file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); - } else { - return QRtools::binarize($code->data); - } - } - - //---------------------------------------------------------------------- - public function encodePNG($intext, $outfile = false,$saveandprint=false) - { - try { - - ob_start(); - $tab = $this->encode($intext); - $err = ob_get_contents(); - ob_end_clean(); - - if ($err != '') - QRtools::log($outfile, $err); - - $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); - - QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint); - - } catch (Exception $e) { - - QRtools::log($outfile, $e->getMessage()); - - } - } - } diff --git a/extend/phpqrcode/qrimage.php b/extend/phpqrcode/qrimage.php deleted file mode 100644 index 2175c5e..0000000 --- a/extend/phpqrcode/qrimage.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QR_IMAGE', true); - - class QRimage { - - //---------------------------------------------------------------------- - public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/png"); - ImagePng($image); - } else { - if($saveandprint===TRUE){ - ImagePng($image, $filename); - header("Content-type: image/png"); - ImagePng($image); - }else{ - ImagePng($image, $filename); - } - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) - { - $image = self::image($frame, $pixelPerPoint, $outerFrame); - - if ($filename === false) { - Header("Content-type: image/jpeg"); - ImageJpeg($image, null, $q); - } else { - ImageJpeg($image, $filename, $q); - } - - ImageDestroy($image); - } - - //---------------------------------------------------------------------- - private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4) - { - $h = count($frame); - $w = strlen($frame[0]); - - $imgW = $w + 2*$outerFrame; - $imgH = $h + 2*$outerFrame; - - $base_image =ImageCreate($imgW, $imgH); - - $col[0] = ImageColorAllocate($base_image,255,255,255); - $col[1] = ImageColorAllocate($base_image,0,0,0); - - imagefill($base_image, 0, 0, $col[0]); - - for($y=0; $y<$h; $y++) { - for($x=0; $x<$w; $x++) { - if ($frame[$y][$x] == '1') { - ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); - } - } - } - - $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); - ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); - ImageDestroy($base_image); - - return $target_image; - } - } \ No newline at end of file diff --git a/extend/phpqrcode/qrinput.php b/extend/phpqrcode/qrinput.php deleted file mode 100644 index c65f91a..0000000 --- a/extend/phpqrcode/qrinput.php +++ /dev/null @@ -1,729 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('STRUCTURE_HEADER_BITS', 20); - define('MAX_STRUCTURED_SYMBOLS', 16); - - class QRinputItem { - - public $mode; - public $size; - public $data; - public $bstream; - - public function __construct($mode, $size, $data, $bstream = null) - { - $setData = array_slice($data, 0, $size); - - if (count($setData) < $size) { - $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); - } - - if(!QRinput::check($mode, $size, $setData)) { - throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); - return null; - } - - $this->mode = $mode; - $this->size = $size; - $this->data = $setData; - $this->bstream = $bstream; - } - - //---------------------------------------------------------------------- - public function encodeModeNum($version) - { - try { - - $words = (int)($this->size / 3); - $bs = new QRbitstream(); - - $val = 0x1; - $bs->appendNum(4, $val); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); - - for($i=0; $i<$words; $i++) { - $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; - $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; - $val += (ord($this->data[$i*3+2]) - ord('0')); - $bs->appendNum(10, $val); - } - - if($this->size - $words * 3 == 1) { - $val = ord($this->data[$words*3]) - ord('0'); - $bs->appendNum(4, $val); - } else if($this->size - $words * 3 == 2) { - $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; - $val += (ord($this->data[$words*3+1]) - ord('0')); - $bs->appendNum(7, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeAn($version) - { - try { - $words = (int)($this->size / 2); - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x02); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); - - for($i=0; $i<$words; $i++) { - $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; - $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); - - $bs->appendNum(11, $val); - } - - if($this->size & 1) { - $val = QRinput::lookAnTable(ord($this->data[$words * 2])); - $bs->appendNum(6, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeMode8($version) - { - try { - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x4); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); - - for($i=0; $i<$this->size; $i++) { - $bs->appendNum(8, ord($this->data[$i])); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeKanji($version) - { - try { - - $bs = new QRbitrtream(); - - $bs->appendNum(4, 0x8); - $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); - - for($i=0; $i<$this->size; $i+=2) { - $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); - if($val <= 0x9ffc) { - $val -= 0x8140; - } else { - $val -= 0xc140; - } - - $h = ($val >> 8) * 0xc0; - $val = ($val & 0xff) + $h; - - $bs->appendNum(13, $val); - } - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function encodeModeStructure() - { - try { - $bs = new QRbitstream(); - - $bs->appendNum(4, 0x03); - $bs->appendNum(4, ord($this->data[1]) - 1); - $bs->appendNum(4, ord($this->data[0]) - 1); - $bs->appendNum(8, ord($this->data[2])); - - $this->bstream = $bs; - return 0; - - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function estimateBitStreamSizeOfEntry($version) - { - $bits = 0; - - if($version == 0) - $version = 1; - - switch($this->mode) { - case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; - case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; - case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; - case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; - case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; - default: - return 0; - } - - $l = QRspec::lengthIndicator($this->mode, $version); - $m = 1 << $l; - $num = (int)(($this->size + $m - 1) / $m); - - $bits += $num * (4 + $l); - - return $bits; - } - - //---------------------------------------------------------------------- - public function encodeBitStream($version) - { - try { - - unset($this->bstream); - $words = QRspec::maximumWords($this->mode, $version); - - if($this->size > $words) { - - $st1 = new QRinputItem($this->mode, $words, $this->data); - $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); - - $st1->encodeBitStream($version); - $st2->encodeBitStream($version); - - $this->bstream = new QRbitstream(); - $this->bstream->append($st1->bstream); - $this->bstream->append($st2->bstream); - - unset($st1); - unset($st2); - - } else { - - $ret = 0; - - switch($this->mode) { - case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; - case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; - case QR_MODE_8: $ret = $this->encodeMode8($version); break; - case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; - case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; - - default: - break; - } - - if($ret < 0) - return -1; - } - - return $this->bstream->size(); - - } catch (Exception $e) { - return -1; - } - } - }; - - //########################################################################## - - class QRinput { - - public $items; - - private $version; - private $level; - - //---------------------------------------------------------------------- - public function __construct($version = 0, $level = QR_ECLEVEL_L) - { - if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { - throw new Exception('Invalid version no'); - return NULL; - } - - $this->version = $version; - $this->level = $level; - } - - //---------------------------------------------------------------------- - public function getVersion() - { - return $this->version; - } - - //---------------------------------------------------------------------- - public function setVersion($version) - { - if($version < 0 || $version > QRSPEC_VERSION_MAX) { - throw new Exception('Invalid version no'); - return -1; - } - - $this->version = $version; - - return 0; - } - - //---------------------------------------------------------------------- - public function getErrorCorrectionLevel() - { - return $this->level; - } - - //---------------------------------------------------------------------- - public function setErrorCorrectionLevel($level) - { - if($level > QR_ECLEVEL_H) { - throw new Exception('Invalid ECLEVEL'); - return -1; - } - - $this->level = $level; - - return 0; - } - - //---------------------------------------------------------------------- - public function appendEntry(QRinputItem $entry) - { - $this->items[] = $entry; - } - - //---------------------------------------------------------------------- - public function append($mode, $size, $data) - { - try { - $entry = new QRinputItem($mode, $size, $data); - $this->items[] = $entry; - return 0; - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - - public function insertStructuredAppendHeader($size, $index, $parity) - { - if( $size > MAX_STRUCTURED_SYMBOLS ) { - throw new Exception('insertStructuredAppendHeader wrong size'); - } - - if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { - throw new Exception('insertStructuredAppendHeader wrong index'); - } - - $buf = array($size, $index, $parity); - - try { - $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); - array_unshift($this->items, $entry); - return 0; - } catch (Exception $e) { - return -1; - } - } - - //---------------------------------------------------------------------- - public function calcParity() - { - $parity = 0; - - foreach($this->items as $item) { - if($item->mode != QR_MODE_STRUCTURE) { - for($i=$item->size-1; $i>=0; $i--) { - $parity ^= $item->data[$i]; - } - } - } - - return $parity; - } - - //---------------------------------------------------------------------- - public static function checkModeNum($size, $data) - { - for($i=0; $i<$size; $i++) { - if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ - return false; - } - } - - return true; - } - - //---------------------------------------------------------------------- - public static function estimateBitsModeNum($size) - { - $w = (int)$size / 3; - $bits = $w * 10; - - switch($size - $w * 3) { - case 1: - $bits += 4; - break; - case 2: - $bits += 7; - break; - default: - break; - } - - return $bits; - } - - //---------------------------------------------------------------------- - public static $anTable = array( - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, - -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - ); - - //---------------------------------------------------------------------- - public static function lookAnTable($c) - { - return (($c > 127)?-1:self::$anTable[$c]); - } - - //---------------------------------------------------------------------- - public static function checkModeAn($size, $data) - { - for($i=0; $i<$size; $i++) { - if (self::lookAnTable(ord($data[$i])) == -1) { - return false; - } - } - - return true; - } - - //---------------------------------------------------------------------- - public static function estimateBitsModeAn($size) - { - $w = (int)($size / 2); - $bits = $w * 11; - - if($size & 1) { - $bits += 6; - } - - return $bits; - } - - //---------------------------------------------------------------------- - public static function estimateBitsMode8($size) - { - return $size * 8; - } - - //---------------------------------------------------------------------- - public function estimateBitsModeKanji($size) - { - return (int)(($size / 2) * 13); - } - - //---------------------------------------------------------------------- - public static function checkModeKanji($size, $data) - { - if($size & 1) - return false; - - for($i=0; $i<$size; $i+=2) { - $val = (ord($data[$i]) << 8) | ord($data[$i+1]); - if( $val < 0x8140 - || ($val > 0x9ffc && $val < 0xe040) - || $val > 0xebbf) { - return false; - } - } - - return true; - } - - /*********************************************************************** - * Validation - **********************************************************************/ - - public static function check($mode, $size, $data) - { - if($size <= 0) - return false; - - switch($mode) { - case QR_MODE_NUM: return self::checkModeNum($size, $data); break; - case QR_MODE_AN: return self::checkModeAn($size, $data); break; - case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; - case QR_MODE_8: return true; break; - case QR_MODE_STRUCTURE: return true; break; - - default: - break; - } - - return false; - } - - - //---------------------------------------------------------------------- - public function estimateBitStreamSize($version) - { - $bits = 0; - - foreach($this->items as $item) { - $bits += $item->estimateBitStreamSizeOfEntry($version); - } - - return $bits; - } - - //---------------------------------------------------------------------- - public function estimateVersion() - { - $version = 0; - $prev = 0; - do { - $prev = $version; - $bits = $this->estimateBitStreamSize($prev); - $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if ($version < 0) { - return -1; - } - } while ($version > $prev); - - return $version; - } - - //---------------------------------------------------------------------- - public static function lengthOfCode($mode, $version, $bits) - { - $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); - switch($mode) { - case QR_MODE_NUM: - $chunks = (int)($payload / 10); - $remain = $payload - $chunks * 10; - $size = $chunks * 3; - if($remain >= 7) { - $size += 2; - } else if($remain >= 4) { - $size += 1; - } - break; - case QR_MODE_AN: - $chunks = (int)($payload / 11); - $remain = $payload - $chunks * 11; - $size = $chunks * 2; - if($remain >= 6) - $size++; - break; - case QR_MODE_8: - $size = (int)($payload / 8); - break; - case QR_MODE_KANJI: - $size = (int)(($payload / 13) * 2); - break; - case QR_MODE_STRUCTURE: - $size = (int)($payload / 8); - break; - default: - $size = 0; - break; - } - - $maxsize = QRspec::maximumWords($mode, $version); - if($size < 0) $size = 0; - if($size > $maxsize) $size = $maxsize; - - return $size; - } - - //---------------------------------------------------------------------- - public function createBitStream() - { - $total = 0; - - foreach($this->items as $item) { - $bits = $item->encodeBitStream($this->version); - - if($bits < 0) - return -1; - - $total += $bits; - } - - return $total; - } - - //---------------------------------------------------------------------- - public function convertData() - { - $ver = $this->estimateVersion(); - if($ver > $this->getVersion()) { - $this->setVersion($ver); - } - - for(;;) { - $bits = $this->createBitStream(); - - if($bits < 0) - return -1; - - $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); - if($ver < 0) { - throw new Exception('WRONG VERSION'); - return -1; - } else if($ver > $this->getVersion()) { - $this->setVersion($ver); - } else { - break; - } - } - - return 0; - } - - //---------------------------------------------------------------------- - public function appendPaddingBit(&$bstream) - { - $bits = $bstream->size(); - $maxwords = QRspec::getDataLength($this->version, $this->level); - $maxbits = $maxwords * 8; - - if ($maxbits == $bits) { - return 0; - } - - if ($maxbits - $bits < 5) { - return $bstream->appendNum($maxbits - $bits, 0); - } - - $bits += 4; - $words = (int)(($bits + 7) / 8); - - $padding = new QRbitstream(); - $ret = $padding->appendNum($words * 8 - $bits + 4, 0); - - if($ret < 0) - return $ret; - - $padlen = $maxwords - $words; - - if($padlen > 0) { - - $padbuf = array(); - for($i=0; $i<$padlen; $i++) { - $padbuf[$i] = ($i&1)?0x11:0xec; - } - - $ret = $padding->appendBytes($padlen, $padbuf); - - if($ret < 0) - return $ret; - - } - - $ret = $bstream->append($padding); - - return $ret; - } - - //---------------------------------------------------------------------- - public function mergeBitStream() - { - if($this->convertData() < 0) { - return null; - } - - $bstream = new QRbitstream(); - - foreach($this->items as $item) { - $ret = $bstream->append($item->bstream); - if($ret < 0) { - return null; - } - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function getBitStream() - { - - $bstream = $this->mergeBitStream(); - - if($bstream == null) { - return null; - } - - $ret = $this->appendPaddingBit($bstream); - if($ret < 0) { - return null; - } - - return $bstream; - } - - //---------------------------------------------------------------------- - public function getByteStream() - { - $bstream = $this->getBitStream(); - if($bstream == null) { - return null; - } - - return $bstream->toByte(); - } - } - - - \ No newline at end of file diff --git a/extend/phpqrcode/qrlib.php b/extend/phpqrcode/qrlib.php deleted file mode 100644 index 43059b9..0000000 --- a/extend/phpqrcode/qrlib.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; - - // Required libs - - include $QR_BASEDIR."qrconst.php"; - include $QR_BASEDIR."qrconfig.php"; - include $QR_BASEDIR."qrtools.php"; - include $QR_BASEDIR."qrspec.php"; - include $QR_BASEDIR."qrimage.php"; - include $QR_BASEDIR."qrinput.php"; - include $QR_BASEDIR."qrbitstream.php"; - include $QR_BASEDIR."qrsplit.php"; - include $QR_BASEDIR."qrrscode.php"; - include $QR_BASEDIR."qrmask.php"; - include $QR_BASEDIR."qrencode.php"; - diff --git a/extend/phpqrcode/qrmask.php b/extend/phpqrcode/qrmask.php deleted file mode 100644 index 2d388e0..0000000 --- a/extend/phpqrcode/qrmask.php +++ /dev/null @@ -1,328 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('N1', 3); - define('N2', 3); - define('N3', 40); - define('N4', 10); - - class QRmask { - - public $runLength = array(); - - //---------------------------------------------------------------------- - public function __construct() - { - $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); - } - - //---------------------------------------------------------------------- - public function writeFormatInformation($width, &$frame, $mask, $level) - { - $blacks = 0; - $format = QRspec::getFormatInfo($mask, $level); - - for($i=0; $i<8; $i++) { - if($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - - $frame[8][$width - 1 - $i] = chr($v); - if($i < 6) { - $frame[$i][8] = chr($v); - } else { - $frame[$i + 1][8] = chr($v); - } - $format = $format >> 1; - } - - for($i=0; $i<7; $i++) { - if($format & 1) { - $blacks += 2; - $v = 0x85; - } else { - $v = 0x84; - } - - $frame[$width - 7 + $i][8] = chr($v); - if($i == 0) { - $frame[8][7] = chr($v); - } else { - $frame[8][6 - $i] = chr($v); - } - - $format = $format >> 1; - } - - return $blacks; - } - - //---------------------------------------------------------------------- - public function mask0($x, $y) { return ($x+$y)&1; } - public function mask1($x, $y) { return ($y&1); } - public function mask2($x, $y) { return ($x%3); } - public function mask3($x, $y) { return ($x+$y)%3; } - public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } - public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } - public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } - public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } - - //---------------------------------------------------------------------- - private function generateMaskNo($maskNo, $width, $frame) - { - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - - for($y=0; $y<$width; $y++) { - for($x=0; $x<$width; $x++) { - if(ord($frame[$y][$x]) & 0x80) { - $bitMask[$y][$x] = 0; - } else { - $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); - $bitMask[$y][$x] = ($maskFunc == 0)?1:0; - } - - } - } - - return $bitMask; - } - - //---------------------------------------------------------------------- - public static function serial($bitFrame) - { - $codeArr = array(); - - foreach ($bitFrame as $line) - $codeArr[] = join('', $line); - - return gzcompress(join("\n", $codeArr), 9); - } - - //---------------------------------------------------------------------- - public static function unserial($code) - { - $codeArr = array(); - - $codeLines = explode("\n", gzuncompress($code)); - foreach ($codeLines as $line) - $codeArr[] = str_split($line); - - return $codeArr; - } - - //---------------------------------------------------------------------- - public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) - { - $b = 0; - $bitMask = array(); - - $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; - - if (QR_CACHEABLE) { - if (file_exists($fileName)) { - $bitMask = self::unserial(file_get_contents($fileName)); - } else { - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) - mkdir(QR_CACHE_DIR.'mask_'.$maskNo); - file_put_contents($fileName, self::serial($bitMask)); - } - } else { - $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); - } - - if ($maskGenOnly) - return; - - $d = $s; - - for($y=0; $y<$width; $y++) { - for($x=0; $x<$width; $x++) { - if($bitMask[$y][$x] == 1) { - $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); - } - $b += (int)(ord($d[$y][$x]) & 1); - } - } - - return $b; - } - - //---------------------------------------------------------------------- - public function makeMask($width, $frame, $maskNo, $level) - { - $masked = array_fill(0, $width, str_repeat("\0", $width)); - $this->makeMaskNo($maskNo, $width, $frame, $masked); - $this->writeFormatInformation($width, $masked, $maskNo, $level); - - return $masked; - } - - //---------------------------------------------------------------------- - public function calcN1N3($length) - { - $demerit = 0; - - for($i=0; $i<$length; $i++) { - - if($this->runLength[$i] >= 5) { - $demerit += (N1 + ($this->runLength[$i] - 5)); - } - if($i & 1) { - if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { - $fact = (int)($this->runLength[$i] / 3); - if(($this->runLength[$i-2] == $fact) && - ($this->runLength[$i-1] == $fact) && - ($this->runLength[$i+1] == $fact) && - ($this->runLength[$i+2] == $fact)) { - if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { - $demerit += N3; - } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { - $demerit += N3; - } - } - } - } - } - return $demerit; - } - - //---------------------------------------------------------------------- - public function evaluateSymbol($width, $frame) - { - $head = 0; - $demerit = 0; - - for($y=0; $y<$width; $y++) { - $head = 0; - $this->runLength[0] = 1; - - $frameY = $frame[$y]; - - if ($y>0) - $frameYM = $frame[$y-1]; - - for($x=0; $x<$width; $x++) { - if(($x > 0) && ($y > 0)) { - $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); - $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); - - if(($b22 | ($w22 ^ 1))&1) { - $demerit += N2; - } - } - if(($x == 0) && (ord($frameY[$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } else if($x > 0) { - if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - - $demerit += $this->calcN1N3($head+1); - } - - for($x=0; $x<$width; $x++) { - $head = 0; - $this->runLength[0] = 1; - - for($y=0; $y<$width; $y++) { - if($y == 0 && (ord($frame[$y][$x]) & 1)) { - $this->runLength[0] = -1; - $head = 1; - $this->runLength[$head] = 1; - } else if($y > 0) { - if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { - $head++; - $this->runLength[$head] = 1; - } else { - $this->runLength[$head]++; - } - } - } - - $demerit += $this->calcN1N3($head+1); - } - - return $demerit; - } - - - //---------------------------------------------------------------------- - public function mask($width, $frame, $level) - { - $minDemerit = PHP_INT_MAX; - $bestMaskNum = 0; - $bestMask = array(); - - $checked_masks = array(0,1,2,3,4,5,6,7); - - if (QR_FIND_FROM_RANDOM !== false) { - - $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); - for ($i = 0; $i < $howManuOut; $i++) { - $remPos = rand (0, count($checked_masks)-1); - unset($checked_masks[$remPos]); - $checked_masks = array_values($checked_masks); - } - - } - - $bestMask = $frame; - - foreach($checked_masks as $i) { - $mask = array_fill(0, $width, str_repeat("\0", $width)); - - $demerit = 0; - $blacks = 0; - $blacks = $this->makeMaskNo($i, $width, $frame, $mask); - $blacks += $this->writeFormatInformation($width, $mask, $i, $level); - $blacks = (int)(100 * $blacks / ($width * $width)); - $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); - $demerit += $this->evaluateSymbol($width, $mask); - - if($demerit < $minDemerit) { - $minDemerit = $demerit; - $bestMask = $mask; - $bestMaskNum = $i; - } - } - - return $bestMask; - } - - //---------------------------------------------------------------------- - } diff --git a/extend/phpqrcode/qrrscode.php b/extend/phpqrcode/qrrscode.php deleted file mode 100644 index d7a97d9..0000000 --- a/extend/phpqrcode/qrrscode.php +++ /dev/null @@ -1,210 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRrsItem { - - public $mm; // Bits per symbol - public $nn; // Symbols per block (= (1<= $this->nn) { - $x -= $this->nn; - $x = ($x >> $this->mm) + ($x & $this->nn); - } - - return $x; - } - - //---------------------------------------------------------------------- - public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) - { - // Common code for intializing a Reed-Solomon control block (char or int symbols) - // Copyright 2004 Phil Karn, KA9Q - // May be used under the terms of the GNU Lesser General Public License (LGPL) - - $rs = null; - - // Check parameter ranges - if($symsize < 0 || $symsize > 8) return $rs; - if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; - if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; - if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! - if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding - - $rs = new QRrsItem(); - $rs->mm = $symsize; - $rs->nn = (1<<$symsize)-1; - $rs->pad = $pad; - - $rs->alpha_to = array_fill(0, $rs->nn+1, 0); - $rs->index_of = array_fill(0, $rs->nn+1, 0); - - // PHP style macro replacement ;) - $NN =& $rs->nn; - $A0 =& $NN; - - // Generate Galois field lookup tables - $rs->index_of[0] = $A0; // log(zero) = -inf - $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 - $sr = 1; - - for($i=0; $i<$rs->nn; $i++) { - $rs->index_of[$sr] = $i; - $rs->alpha_to[$i] = $sr; - $sr <<= 1; - if($sr & (1<<$symsize)) { - $sr ^= $gfpoly; - } - $sr &= $rs->nn; - } - - if($sr != 1){ - // field generator polynomial is not primitive! - $rs = NULL; - return $rs; - } - - /* Form RS code generator polynomial from its roots */ - $rs->genpoly = array_fill(0, $nroots+1, 0); - - $rs->fcr = $fcr; - $rs->prim = $prim; - $rs->nroots = $nroots; - $rs->gfpoly = $gfpoly; - - /* Find prim-th root of 1, used in decoding */ - for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) - ; // intentional empty-body loop! - - $rs->iprim = (int)($iprim / $prim); - $rs->genpoly[0] = 1; - - for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { - $rs->genpoly[$i+1] = 1; - - // Multiply rs->genpoly[] by @**(root + x) - for ($j = $i; $j > 0; $j--) { - if ($rs->genpoly[$j] != 0) { - $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; - } else { - $rs->genpoly[$j] = $rs->genpoly[$j-1]; - } - } - // rs->genpoly[0] can never be zero - $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; - } - - // convert rs->genpoly[] to index form for quicker encoding - for ($i = 0; $i <= $nroots; $i++) - $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; - - return $rs; - } - - //---------------------------------------------------------------------- - public function encode_rs_char($data, &$parity) - { - $MM =& $this->mm; - $NN =& $this->nn; - $ALPHA_TO =& $this->alpha_to; - $INDEX_OF =& $this->index_of; - $GENPOLY =& $this->genpoly; - $NROOTS =& $this->nroots; - $FCR =& $this->fcr; - $PRIM =& $this->prim; - $IPRIM =& $this->iprim; - $PAD =& $this->pad; - $A0 =& $NN; - - $parity = array_fill(0, $NROOTS, 0); - - for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { - - $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; - if($feedback != $A0) { - // feedback term is non-zero - - // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must - // always be for the polynomials constructed by init_rs() - $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); - - for($j=1;$j<$NROOTS;$j++) { - $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; - } - } - - // Shift - array_shift($parity); - if($feedback != $A0) { - array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); - } else { - array_push($parity, 0); - } - } - } - } - - //########################################################################## - - class QRrs { - - public static $items = array(); - - //---------------------------------------------------------------------- - public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) - { - foreach(self::$items as $rs) { - if($rs->pad != $pad) continue; - if($rs->nroots != $nroots) continue; - if($rs->mm != $symsize) continue; - if($rs->gfpoly != $gfpoly) continue; - if($rs->fcr != $fcr) continue; - if($rs->prim != $prim) continue; - - return $rs; - } - - $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); - array_unshift(self::$items, $rs); - - return $rs; - } - } \ No newline at end of file diff --git a/extend/phpqrcode/qrspec.php b/extend/phpqrcode/qrspec.php deleted file mode 100644 index 5a0c4b3..0000000 --- a/extend/phpqrcode/qrspec.php +++ /dev/null @@ -1,592 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - define('QRSPEC_VERSION_MAX', 40); - define('QRSPEC_WIDTH_MAX', 177); - - define('QRCAP_WIDTH', 0); - define('QRCAP_WORDS', 1); - define('QRCAP_REMINDER', 2); - define('QRCAP_EC', 3); - - class QRspec { - - public static $capacity = array( - array( 0, 0, 0, array( 0, 0, 0, 0)), - array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 - array( 25, 44, 7, array( 10, 16, 22, 28)), - array( 29, 70, 7, array( 15, 26, 36, 44)), - array( 33, 100, 7, array( 20, 36, 52, 64)), - array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 - array( 41, 172, 7, array( 36, 64, 96, 112)), - array( 45, 196, 0, array( 40, 72, 108, 130)), - array( 49, 242, 0, array( 48, 88, 132, 156)), - array( 53, 292, 0, array( 60, 110, 160, 192)), - array( 57, 346, 0, array( 72, 130, 192, 224)), //10 - array( 61, 404, 0, array( 80, 150, 224, 264)), - array( 65, 466, 0, array( 96, 176, 260, 308)), - array( 69, 532, 0, array( 104, 198, 288, 352)), - array( 73, 581, 3, array( 120, 216, 320, 384)), - array( 77, 655, 3, array( 132, 240, 360, 432)), //15 - array( 81, 733, 3, array( 144, 280, 408, 480)), - array( 85, 815, 3, array( 168, 308, 448, 532)), - array( 89, 901, 3, array( 180, 338, 504, 588)), - array( 93, 991, 3, array( 196, 364, 546, 650)), - array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 - array(101, 1156, 4, array( 224, 442, 644, 750)), - array(105, 1258, 4, array( 252, 476, 690, 816)), - array(109, 1364, 4, array( 270, 504, 750, 900)), - array(113, 1474, 4, array( 300, 560, 810, 960)), - array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 - array(121, 1706, 4, array( 336, 644, 952, 1110)), - array(125, 1828, 4, array( 360, 700, 1020, 1200)), - array(129, 1921, 3, array( 390, 728, 1050, 1260)), - array(133, 2051, 3, array( 420, 784, 1140, 1350)), - array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 - array(141, 2323, 3, array( 480, 868, 1290, 1530)), - array(145, 2465, 3, array( 510, 924, 1350, 1620)), - array(149, 2611, 3, array( 540, 980, 1440, 1710)), - array(153, 2761, 3, array( 570, 1036, 1530, 1800)), - array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 - array(161, 3034, 0, array( 600, 1120, 1680, 1980)), - array(165, 3196, 0, array( 630, 1204, 1770, 2100)), - array(169, 3362, 0, array( 660, 1260, 1860, 2220)), - array(173, 3532, 0, array( 720, 1316, 1950, 2310)), - array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 - ); - - //---------------------------------------------------------------------- - public static function getDataLength($version, $level) - { - return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; - } - - //---------------------------------------------------------------------- - public static function getECCLength($version, $level) - { - return self::$capacity[$version][QRCAP_EC][$level]; - } - - //---------------------------------------------------------------------- - public static function getWidth($version) - { - return self::$capacity[$version][QRCAP_WIDTH]; - } - - //---------------------------------------------------------------------- - public static function getRemainder($version) - { - return self::$capacity[$version][QRCAP_REMINDER]; - } - - //---------------------------------------------------------------------- - public static function getMinimumVersion($size, $level) - { - - for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { - $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; - if($words >= $size) - return $i; - } - - return -1; - } - - //###################################################################### - - public static $lengthTableBits = array( - array(10, 12, 14), - array( 9, 11, 13), - array( 8, 16, 16), - array( 8, 10, 12) - ); - - //---------------------------------------------------------------------- - public static function lengthIndicator($mode, $version) - { - if ($mode == QR_MODE_STRUCTURE) - return 0; - - if ($version <= 9) { - $l = 0; - } else if ($version <= 26) { - $l = 1; - } else { - $l = 2; - } - - return self::$lengthTableBits[$mode][$l]; - } - - //---------------------------------------------------------------------- - public static function maximumWords($mode, $version) - { - if($mode == QR_MODE_STRUCTURE) - return 3; - - if($version <= 9) { - $l = 0; - } else if($version <= 26) { - $l = 1; - } else { - $l = 2; - } - - $bits = self::$lengthTableBits[$mode][$l]; - $words = (1 << $bits) - 1; - - if($mode == QR_MODE_KANJI) { - $words *= 2; // the number of bytes is required - } - - return $words; - } - - // Error correction code ----------------------------------------------- - // Table of the error correction code (Reed-Solomon block) - // See Table 12-16 (pp.30-36), JIS X0510:2004. - - public static $eccTable = array( - array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 - array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), - array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), - array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 - array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), - array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), - array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), - array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), - array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 - array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), - array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), - array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), - array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), - array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 - array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), - array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), - array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), - array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), - array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 - array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), - array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), - array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), - array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), - array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 - array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), - array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), - array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), - array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), - array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 - array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), - array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), - array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), - array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), - array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 - array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), - array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), - array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), - array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), - array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 - ); - - //---------------------------------------------------------------------- - // CACHEABLE!!! - - public static function getEccSpec($version, $level, array &$spec) - { - if (count($spec) < 5) { - $spec = array(0,0,0,0,0); - } - - $b1 = self::$eccTable[$version][$level][0]; - $b2 = self::$eccTable[$version][$level][1]; - $data = self::getDataLength($version, $level); - $ecc = self::getECCLength($version, $level); - - if($b2 == 0) { - $spec[0] = $b1; - $spec[1] = (int)($data / $b1); - $spec[2] = (int)($ecc / $b1); - $spec[3] = 0; - $spec[4] = 0; - } else { - $spec[0] = $b1; - $spec[1] = (int)($data / ($b1 + $b2)); - $spec[2] = (int)($ecc / ($b1 + $b2)); - $spec[3] = $b2; - $spec[4] = $spec[1] + 1; - } - } - - // Alignment pattern --------------------------------------------------- - - // Positions of alignment patterns. - // This array includes only the second and the third position of the - // alignment patterns. Rest of them can be calculated from the distance - // between them. - - // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. - - public static $alignmentPattern = array( - array( 0, 0), - array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 - array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 - array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 - array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 - array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 - array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 - array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 - array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 - ); - - - /** -------------------------------------------------------------------- - * Put an alignment marker. - * @param frame - * @param width - * @param ox,oy center coordinate of the pattern - */ - public static function putAlignmentMarker(array &$frame, $ox, $oy) - { - $finder = array( - "\xa1\xa1\xa1\xa1\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa0\xa1\xa0\xa1", - "\xa1\xa0\xa0\xa0\xa1", - "\xa1\xa1\xa1\xa1\xa1" - ); - - $yStart = $oy-2; - $xStart = $ox-2; - - for($y=0; $y<5; $y++) { - QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); - } - } - - //---------------------------------------------------------------------- - public static function putAlignmentPattern($version, &$frame, $width) - { - if($version < 2) - return; - - $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; - if($d < 0) { - $w = 2; - } else { - $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); - } - - if($w * $w - 3 == 1) { - $x = self::$alignmentPattern[$version][0]; - $y = self::$alignmentPattern[$version][0]; - self::putAlignmentMarker($frame, $x, $y); - return; - } - - $cx = self::$alignmentPattern[$version][0]; - for($x=1; $x<$w - 1; $x++) { - self::putAlignmentMarker($frame, 6, $cx); - self::putAlignmentMarker($frame, $cx, 6); - $cx += $d; - } - - $cy = self::$alignmentPattern[$version][0]; - for($y=0; $y<$w-1; $y++) { - $cx = self::$alignmentPattern[$version][0]; - for($x=0; $x<$w-1; $x++) { - self::putAlignmentMarker($frame, $cx, $cy); - $cx += $d; - } - $cy += $d; - } - } - - // Version information pattern ----------------------------------------- - - // Version information pattern (BCH coded). - // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. - - // size: [QRSPEC_VERSION_MAX - 6] - - public static $versionPattern = array( - 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, - 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, - 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, - 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, - 0x27541, 0x28c69 - ); - - //---------------------------------------------------------------------- - public static function getVersionPattern($version) - { - if($version < 7 || $version > QRSPEC_VERSION_MAX) - return 0; - - return self::$versionPattern[$version -7]; - } - - // Format information -------------------------------------------------- - // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) - - public static $formatInfo = array( - array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), - array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), - array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), - array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) - ); - - public static function getFormatInfo($mask, $level) - { - if($mask < 0 || $mask > 7) - return 0; - - if($level < 0 || $level > 3) - return 0; - - return self::$formatInfo[$level][$mask]; - } - - // Frame --------------------------------------------------------------- - // Cache of initial frames. - - public static $frames = array(); - - /** -------------------------------------------------------------------- - * Put a finder pattern. - * @param frame - * @param width - * @param ox,oy upper-left coordinate of the pattern - */ - public static function putFinderPattern(&$frame, $ox, $oy) - { - $finder = array( - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", - "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", - "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" - ); - - for($y=0; $y<7; $y++) { - QRstr::set($frame, $ox, $oy+$y, $finder[$y]); - } - } - - //---------------------------------------------------------------------- - public static function createFrame($version) - { - $width = self::$capacity[$version][QRCAP_WIDTH]; - $frameLine = str_repeat ("\0", $width); - $frame = array_fill(0, $width, $frameLine); - - // Finder pattern - self::putFinderPattern($frame, 0, 0); - self::putFinderPattern($frame, $width - 7, 0); - self::putFinderPattern($frame, 0, $width - 7); - - // Separator - $yOffset = $width - 7; - - for($y=0; $y<7; $y++) { - $frame[$y][7] = "\xc0"; - $frame[$y][$width - 8] = "\xc0"; - $frame[$yOffset][7] = "\xc0"; - $yOffset++; - } - - $setPattern = str_repeat("\xc0", 8); - - QRstr::set($frame, 0, 7, $setPattern); - QRstr::set($frame, $width-8, 7, $setPattern); - QRstr::set($frame, 0, $width - 8, $setPattern); - - // Format info - $setPattern = str_repeat("\x84", 9); - QRstr::set($frame, 0, 8, $setPattern); - QRstr::set($frame, $width - 8, 8, $setPattern, 8); - - $yOffset = $width - 8; - - for($y=0; $y<8; $y++,$yOffset++) { - $frame[$y][8] = "\x84"; - $frame[$yOffset][8] = "\x84"; - } - - // Timing pattern - - for($i=1; $i<$width-15; $i++) { - $frame[6][7+$i] = chr(0x90 | ($i & 1)); - $frame[7+$i][6] = chr(0x90 | ($i & 1)); - } - - // Alignment pattern - self::putAlignmentPattern($version, $frame, $width); - - // Version information - if($version >= 7) { - $vinf = self::getVersionPattern($version); - - $v = $vinf; - - for($x=0; $x<6; $x++) { - for($y=0; $y<3; $y++) { - $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - - $v = $vinf; - for($y=0; $y<6; $y++) { - for($x=0; $x<3; $x++) { - $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); - $v = $v >> 1; - } - } - } - - // and a little bit... - $frame[$width - 8][8] = "\x81"; - - return $frame; - } - - //---------------------------------------------------------------------- - public static function debug($frame, $binary_mode = false) - { - if ($binary_mode) { - - foreach ($frame as &$frameLine) { - $frameLine = join('  ', explode('0', $frameLine)); - $frameLine = join('██', explode('1', $frameLine)); - } - - ?> - -


        '; - echo join("
        ", $frame); - echo '






'; - - } else { - - foreach ($frame as &$frameLine) { - $frameLine = join(' ', explode("\xc0", $frameLine)); - $frameLine = join('', explode("\xc1", $frameLine)); - $frameLine = join(' ', explode("\xa0", $frameLine)); - $frameLine = join('', explode("\xa1", $frameLine)); - $frameLine = join('', explode("\x84", $frameLine)); //format 0 - $frameLine = join('', explode("\x85", $frameLine)); //format 1 - $frameLine = join('', explode("\x81", $frameLine)); //special bit - $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 - $frameLine = join('', explode("\x91", $frameLine)); //clock 1 - $frameLine = join(' ', explode("\x88", $frameLine)); //version - $frameLine = join('', explode("\x89", $frameLine)); //version - $frameLine = join('♦', explode("\x01", $frameLine)); - $frameLine = join('⋅', explode("\0", $frameLine)); - } - - ?> - - "; - echo join("
", $frame); - echo "
"; - - } - } - - //---------------------------------------------------------------------- - public static function serial($frame) - { - return gzcompress(join("\n", $frame), 9); - } - - //---------------------------------------------------------------------- - public static function unserial($code) - { - return explode("\n", gzuncompress($code)); - } - - //---------------------------------------------------------------------- - public static function newFrame($version) - { - if($version < 1 || $version > QRSPEC_VERSION_MAX) - return null; - - if(!isset(self::$frames[$version])) { - - $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; - - if (QR_CACHEABLE) { - if (file_exists($fileName)) { - self::$frames[$version] = self::unserial(file_get_contents($fileName)); - } else { - self::$frames[$version] = self::createFrame($version); - file_put_contents($fileName, self::serial(self::$frames[$version])); - } - } else { - self::$frames[$version] = self::createFrame($version); - } - } - - if(is_null(self::$frames[$version])) - return null; - - return self::$frames[$version]; - } - - //---------------------------------------------------------------------- - public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } - public static function rsBlockNum1($spec) { return $spec[0]; } - public static function rsDataCodes1($spec) { return $spec[1]; } - public static function rsEccCodes1($spec) { return $spec[2]; } - public static function rsBlockNum2($spec) { return $spec[3]; } - public static function rsDataCodes2($spec) { return $spec[4]; } - public static function rsEccCodes2($spec) { return $spec[2]; } - public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } - public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } - - } \ No newline at end of file diff --git a/extend/phpqrcode/qrsplit.php b/extend/phpqrcode/qrsplit.php deleted file mode 100644 index 8099c41..0000000 --- a/extend/phpqrcode/qrsplit.php +++ /dev/null @@ -1,311 +0,0 @@ - - * - * PHP QR Code is distributed under LGPL 3 - * Copyright (C) 2010 Dominik Dzienia - * - * The following data / specifications are taken from - * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) - * or - * "Automatic identification and data capture techniques -- - * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - class QRsplit { - - public $dataStr = ''; - public $input; - public $modeHint; - - //---------------------------------------------------------------------- - public function __construct($dataStr, $input, $modeHint) - { - $this->dataStr = $dataStr; - $this->input = $input; - $this->modeHint = $modeHint; - } - - //---------------------------------------------------------------------- - public static function isdigitat($str, $pos) - { - if ($pos >= strlen($str)) - return false; - - return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); - } - - //---------------------------------------------------------------------- - public static function isalnumat($str, $pos) - { - if ($pos >= strlen($str)) - return false; - - return (QRinput::lookAnTable(ord($str[$pos])) >= 0); - } - - //---------------------------------------------------------------------- - public function identifyMode($pos) - { - if ($pos >= strlen($this->dataStr)) - return QR_MODE_NUL; - - $c = $this->dataStr[$pos]; - - if(self::isdigitat($this->dataStr, $pos)) { - return QR_MODE_NUM; - } else if(self::isalnumat($this->dataStr, $pos)) { - return QR_MODE_AN; - } else if($this->modeHint == QR_MODE_KANJI) { - - if ($pos+1 < strlen($this->dataStr)) - { - $d = $this->dataStr[$pos+1]; - $word = (ord($c) << 8) | ord($d); - if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { - return QR_MODE_KANJI; - } - } - } - - return QR_MODE_8; - } - - //---------------------------------------------------------------------- - public function eatNum() - { - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 0; - while(self::isdigitat($this->dataStr, $p)) { - $p++; - } - - $run = $p; - $mode = $this->identifyMode($p); - - if($mode == QR_MODE_8) { - $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 - if($dif > 0) { - return $this->eat8(); - } - } - if($mode == QR_MODE_AN) { - $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln - + QRinput::estimateBitsModeAn(1) // + 4 + la - - QRinput::estimateBitsModeAn($run + 1);// - 4 - la - if($dif > 0) { - return $this->eatAn(); - } - } - - $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eatAn() - { - $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 0; - - while(self::isalnumat($this->dataStr, $p)) { - if(self::isdigitat($this->dataStr, $p)) { - $q = $p; - while(self::isdigitat($this->dataStr, $q)) { - $q++; - } - - $dif = QRinput::estimateBitsModeAn($p) // + 4 + la - + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsModeAn($q); // - 4 - la - - if($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - - $run = $p; - - if(!self::isalnumat($this->dataStr, $p)) { - $dif = QRinput::estimateBitsModeAn($run) + 4 + $la - + QRinput::estimateBitsMode8(1) // + 4 + l8 - - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 - if($dif > 0) { - return $this->eat8(); - } - } - - $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eatKanji() - { - $p = 0; - - while($this->identifyMode($p) == QR_MODE_KANJI) { - $p += 2; - } - - $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function eat8() - { - $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); - $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); - - $p = 1; - $dataStrLen = strlen($this->dataStr); - - while($p < $dataStrLen) { - - $mode = $this->identifyMode($p); - if($mode == QR_MODE_KANJI) { - break; - } - if($mode == QR_MODE_NUM) { - $q = $p; - while(self::isdigitat($this->dataStr, $q)) { - $q++; - } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 - + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln - - QRinput::estimateBitsMode8($q); // - 4 - l8 - if($dif < 0) { - break; - } else { - $p = $q; - } - } else if($mode == QR_MODE_AN) { - $q = $p; - while(self::isalnumat($this->dataStr, $q)) { - $q++; - } - $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 - + QRinput::estimateBitsModeAn($q - $p) + 4 + $la - - QRinput::estimateBitsMode8($q); // - 4 - l8 - if($dif < 0) { - break; - } else { - $p = $q; - } - } else { - $p++; - } - } - - $run = $p; - $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); - - if($ret < 0) - return -1; - - return $run; - } - - //---------------------------------------------------------------------- - public function splitString() - { - while (strlen($this->dataStr) > 0) - { - if($this->dataStr == '') - return 0; - - $mode = $this->identifyMode(0); - - switch ($mode) { - case QR_MODE_NUM: $length = $this->eatNum(); break; - case QR_MODE_AN: $length = $this->eatAn(); break; - case QR_MODE_KANJI: - if ($hint == QR_MODE_KANJI) - $length = $this->eatKanji(); - else $length = $this->eat8(); - break; - default: $length = $this->eat8(); break; - - } - - if($length == 0) return 0; - if($length < 0) return -1; - - $this->dataStr = substr($this->dataStr, $length); - } - } - - //---------------------------------------------------------------------- - public function toUpper() - { - $stringLen = strlen($this->dataStr); - $p = 0; - - while ($p<$stringLen) { - $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint); - if($mode == QR_MODE_KANJI) { - $p += 2; - } else { - if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { - $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); - } - $p++; - } - } - - return $this->dataStr; - } - - //---------------------------------------------------------------------- - public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) - { - if(is_null($string) || $string == '\0' || $string == '') { - throw new Exception('empty string!!!'); - } - - $split = new QRsplit($string, $input, $modeHint); - - if(!$casesensitive) - $split->toUpper(); - - return $split->splitString(); - } - } \ No newline at end of file diff --git a/extend/phpqrcode/qrtools.php b/extend/phpqrcode/qrtools.php deleted file mode 100644 index e0412c4..0000000 --- a/extend/phpqrcode/qrtools.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - class QRtools { - - //---------------------------------------------------------------------- - public static function binarize($frame) - { - $len = count($frame); - foreach ($frame as &$frameLine) { - - for($i=0; $i<$len; $i++) { - $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; - } - } - - return $frame; - } - - //---------------------------------------------------------------------- - public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') - { - $barcode_array = array(); - - if (!is_array($mode)) - $mode = explode(',', $mode); - - $eccLevel = 'L'; - - if (count($mode) > 1) { - $eccLevel = $mode[1]; - } - - $qrTab = QRcode::text($code, false, $eccLevel); - $size = count($qrTab); - - $barcode_array['num_rows'] = $size; - $barcode_array['num_cols'] = $size; - $barcode_array['bcode'] = array(); - - foreach ($qrTab as $line) { - $arrAdd = array(); - foreach(str_split($line) as $char) - $arrAdd[] = ($char=='1')?1:0; - $barcode_array['bcode'][] = $arrAdd; - } - - return $barcode_array; - } - - //---------------------------------------------------------------------- - public static function clearCache() - { - self::$frames = array(); - } - - //---------------------------------------------------------------------- - public static function buildCache() - { - QRtools::markTime('before_build_cache'); - - $mask = new QRmask(); - for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { - $frame = QRspec::newFrame($a); - if (QR_IMAGE) { - $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; - QRimage::png(self::binarize($frame), $fileName, 1, 0); - } - - $width = count($frame); - $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); - for ($maskNo=0; $maskNo<8; $maskNo++) - $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); - } - - QRtools::markTime('after_build_cache'); - } - - //---------------------------------------------------------------------- - public static function log($outfile, $err) - { - if (QR_LOG_DIR !== false) { - if ($err != '') { - if ($outfile !== false) { - file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } else { - file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); - } - } - } - } - - //---------------------------------------------------------------------- - public static function dumpMask($frame) - { - $width = count($frame); - for($y=0;$y<$width;$y++) { - for($x=0;$x<$width;$x++) { - echo ord($frame[$y][$x]).','; - } - } - } - - //---------------------------------------------------------------------- - public static function markTime($markerId) - { - list($usec, $sec) = explode(" ", microtime()); - $time = ((float)$usec + (float)$sec); - - if (!isset($GLOBALS['qr_time_bench'])) - $GLOBALS['qr_time_bench'] = array(); - - $GLOBALS['qr_time_bench'][$markerId] = $time; - } - - //---------------------------------------------------------------------- - public static function timeBenchmark() - { - self::markTime('finish'); - - $lastTime = 0; - $startTime = 0; - $p = 0; - - echo ' - - '; - - foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { - if ($p > 0) { - echo ''; - } else { - $startTime = $thisTime; - } - - $p++; - $lastTime = $thisTime; - } - - echo ' - - -
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; - } - - } - - //########################################################################## - - QRtools::markTime('start'); - \ No newline at end of file diff --git a/extend/phpqrcode/tools/merge.bat b/extend/phpqrcode/tools/merge.bat deleted file mode 100644 index 2b5eebb..0000000 --- a/extend/phpqrcode/tools/merge.bat +++ /dev/null @@ -1,2 +0,0 @@ -php ./merge.php -pause \ No newline at end of file diff --git a/extend/phpqrcode/tools/merge.php b/extend/phpqrcode/tools/merge.php deleted file mode 100644 index 9e809c8..0000000 --- a/extend/phpqrcode/tools/merge.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - $QR_BASEDIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; - $QR_TOOLSDIR = dirname(__FILE__).DIRECTORY_SEPARATOR; - - $outputFile = $QR_BASEDIR.'phpqrcode.php'; - - // Required libs - - $fileList = array( - $QR_BASEDIR.'qrconst.php', - $QR_TOOLSDIR.'merged_config.php', - $QR_BASEDIR.'qrtools.php', - $QR_BASEDIR.'qrspec.php', - $QR_BASEDIR.'qrimage.php', - $QR_BASEDIR.'qrinput.php', - $QR_BASEDIR.'qrbitstream.php', - $QR_BASEDIR.'qrsplit.php', - $QR_BASEDIR.'qrrscode.php', - $QR_BASEDIR.'qrmask.php', - $QR_BASEDIR.'qrencode.php' - ); - - $headerFile = $QR_TOOLSDIR.'merged_header.php'; - $versionFile = $QR_BASEDIR.'VERSION'; - - $outputCode = ''; - - foreach($fileList as $fileName) { - $outputCode .= "\n\n".'//---- '.basename($fileName).' -----------------------------'."\n\n"; - $anotherCode = file_get_contents($fileName); - $anotherCode = preg_replace ('/^<\?php/', '', $anotherCode); - $anotherCode = preg_replace ('/\?>\*$/', '', $anotherCode); - $outputCode .= "\n\n".$anotherCode."\n\n"; - } - - $versionDataEx = explode("\n", file_get_contents($versionFile)); - - $outputContents = file_get_contents($headerFile); - $outputContents .= "\n\n/*\n * Version: ".trim($versionDataEx[0])."\n * Build: ".trim($versionDataEx[1])."\n */\n\n"; - $outputContents .= $outputCode; - - file_put_contents($outputFile, $outputContents); - - \ No newline at end of file diff --git a/extend/phpqrcode/tools/merge.sh b/extend/phpqrcode/tools/merge.sh deleted file mode 100644 index 1a2515b..0000000 --- a/extend/phpqrcode/tools/merge.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -php ./merge.php \ No newline at end of file diff --git a/extend/phpqrcode/tools/merged_config.php b/extend/phpqrcode/tools/merged_config.php deleted file mode 100644 index 8cd917d..0000000 --- a/extend/phpqrcode/tools/merged_config.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - \ No newline at end of file diff --git a/extend/util/Time.php b/extend/util/Time.php deleted file mode 100644 index 97c9bcd..0000000 --- a/extend/util/Time.php +++ /dev/null @@ -1,203 +0,0 @@ - -// +---------------------------------------------------------------------- -namespace util; - -class Time -{ - /** - * 返回今日开始和结束的时间戳 - * - * @return array - */ - public static function today() - { - list($y, $m, $d) = explode('-', date('Y-m-d')); - return [ - mktime(0, 0, 0, $m, $d, $y), - mktime(23, 59, 59, $m, $d, $y) - ]; - } - - /** - * 返回昨日开始和结束的时间戳 - * - * @return array - */ - public static function yesterday() - { - $yesterday = date('d') - 1; - return [ - mktime(0, 0, 0, date('m'), $yesterday, date('Y')), - mktime(23, 59, 59, date('m'), $yesterday, date('Y')) - ]; - } - - /** - * 返回本周开始和结束的时间戳 - * - * @return array - */ - public static function week() - { - list($y, $m, $d, $w) = explode('-', date('Y-m-d-w')); - if($w == 0) $w = 7; //修正周日的问题 - return [ - mktime(0, 0, 0, $m, $d - $w + 1, $y), mktime(23, 59, 59, $m, $d - $w + 7, $y) - ]; - } - - /** - * 返回上周开始和结束的时间戳 - * - * @return array - */ - public static function lastWeek() - { - $timestamp = time(); - return [ - strtotime(date('Y-m-d', strtotime("last week Monday", $timestamp))), - strtotime(date('Y-m-d', strtotime("last week Sunday", $timestamp))) + 24 * 3600 - 1 - ]; - } - - /** - * 返回本月开始和结束的时间戳 - * - * @return array - */ - public static function month($everyDay = false) - { - list($y, $m, $t) = explode('-', date('Y-m-t')); - return [ - mktime(0, 0, 0, $m, 1, $y), - mktime(23, 59, 59, $m, $t, $y) - ]; - } - - /** - * 返回上个月开始和结束的时间戳 - * - * @return array - */ - public static function lastMonth() - { - $y = date('Y'); - $m = date('m'); - $begin = mktime(0, 0, 0, $m - 1, 1, $y); - $end = mktime(23, 59, 59, $m - 1, date('t', $begin), $y); - - return [$begin, $end]; - } - - /** - * 返回今年开始和结束的时间戳 - * - * @return array - */ - public static function year() - { - $y = date('Y'); - return [ - mktime(0, 0, 0, 1, 1, $y), - mktime(23, 59, 59, 12, 31, $y) - ]; - } - - /** - * 返回去年开始和结束的时间戳 - * - * @return array - */ - public static function lastYear() - { - $year = date('Y') - 1; - return [ - mktime(0, 0, 0, 1, 1, $year), - mktime(23, 59, 59, 12, 31, $year) - ]; - } - - public static function dayOf() - { - - } - - /** - * 获取几天前零点到现在/昨日结束的时间戳 - * - * @param int $day 天数 - * @param bool $now 返回现在或者昨天结束时间戳 - * @return array - */ - public static function dayToNow($day = 1, $now = true) - { - $end = time(); - if (!$now) { - list($foo, $end) = self::yesterday(); - } - - return [ - mktime(0, 0, 0, date('m'), date('d') - $day, date('Y')), - $end - ]; - } - - /** - * 返回几天前的时间戳 - * - * @param int $day - * @return int - */ - public static function daysAgo($day = 1) - { - $nowTime = time(); - return $nowTime - self::daysToSecond($day); - } - - /** - * 返回几天后的时间戳 - * - * @param int $day - * @return int - */ - public static function daysAfter($day = 1) - { - $nowTime = time(); - return $nowTime + self::daysToSecond($day); - } - - /** - * 天数转换成秒数 - * - * @param int $day - * @return int - */ - public static function daysToSecond($day = 1) - { - return $day * 86400; - } - - /** - * 周数转换成秒数 - * - * @param int $week - * @return int - */ - public static function weekToSecond($week = 1) - { - return self::daysToSecond() * 7 * $week; - } - - private static function startTimeToEndTime() - { - - } -} diff --git a/public/.htaccess b/public/.htaccess deleted file mode 100644 index e69de29..0000000 diff --git a/public/assets/detail-C_zqW161.css b/public/assets/detail-C_zqW161.css deleted file mode 100644 index 0fec372..0000000 --- a/public/assets/detail-C_zqW161.css +++ /dev/null @@ -1 +0,0 @@ -.homeBox[data-v-d622f63e]{width:720px;margin:90px auto 15px;min-height:calc(100vh - 255px);text-align:center}.homeBox .logoBox[data-v-d622f63e]{display:inline-flex;align-items:center}.homeBox .logoBox .logo[data-v-d622f63e]{width:50px;height:50px}.homeBox .logoBox .title[data-v-d622f63e]{margin-left:18px;font-size:24px;font-weight:700}.homeBox .subTitle[data-v-d622f63e]{padding:15px 0;opacity:.6}.homeBox .search[data-v-d622f63e]{position:relative;margin:30px auto auto;background-color:#fff;height:48px;border-radius:12px;box-shadow:0 1px 6px rgba(32,33,36,.145);max-width:540px}.homeBox .search .selectBox[data-v-d622f63e]{position:absolute;top:0;bottom:0;width:90px}.homeBox .search uni-input[data-v-d622f63e]{text-align:left;height:100%;padding:0 60px 0 100px}.homeBox .search .iconfont[data-v-d622f63e]{position:absolute;top:10px;right:25px;font-size:18px}.homeBox .search.noSelect .selectBox[data-v-d622f63e]{display:none}.homeBox .search.noSelect uni-input[data-v-d622f63e]{padding:0 60px 0 24px}.homeBox .content[data-v-d622f63e]{box-shadow:0 0 5px rgba(214,214,214,.5);background-color:#fff;border-radius:12px;padding:15px;margin-top:72px}.homeBox .content .p[data-v-d622f63e]{padding:0 0 4px;text-align:left}.homeBox .content .p span[data-v-d622f63e]{padding:0 4px;font-weight:700;cursor:pointer}.homeBox .content .list[data-v-d622f63e]{text-align:left;margin-top:10px}.homeBox .content .list .item[data-v-d622f63e]{border-top:1px solid #f2f2f2;padding:20px 0 0;transition:transform .4s;opacity:.95}.homeBox .content .list .item .name[data-v-d622f63e]{padding-bottom:15px;font-size:15px;font-weight:700}.homeBox .content .list .item .numbox[data-v-d622f63e]{display:flex;align-items:center}.homeBox .content .list .item .numbox .ke[data-v-d622f63e]{position:relative;color:#999;flex:none;padding-left:25px}.homeBox .content .list .item .numbox .ke[data-v-d622f63e]:after{content:"";position:absolute;top:-3.2px;left:0;font-family:iconfont;font-size:18px;color:#3a25dd}.homeBox .content .list .item .numbox .num[data-v-d622f63e]{position:relative;color:#999;flex:none;padding-left:25px;margin-left:60px}.homeBox .content .list .item .numbox .num[data-v-d622f63e]:after{content:"";position:absolute;top:-5px;left:0;font-family:iconfont;font-size:20px}.homeBox .content .list .item .numbox .cate[data-v-d622f63e]{position:relative;color:#999;flex:none;padding-left:25px;margin-left:60px}.homeBox .content .list .item .numbox .cate[data-v-d622f63e]:after{content:"";position:absolute;top:-5px;left:0;font-family:iconfont;font-size:20px}.homeBox .content .list .item .btns[data-v-d622f63e]{display:flex;align-items:center;color:#1e80ff;margin-top:6px}.homeBox .content .list .item .btns .btn[data-v-d622f63e]{position:relative;padding:12px 0 10px 25px;margin-right:40px;cursor:pointer;font-weight:700}.homeBox .content .list .item .btns .btn[data-v-d622f63e]:nth-child(1):after{content:"";position:absolute;top:8px;left:0;font-family:iconfont;font-size:20px}.homeBox .content .list .item .btns .btn[data-v-d622f63e]:nth-child(2):after{content:"";position:absolute;top:8px;left:0;font-family:iconfont;font-size:20px}.homeBox .content .list .item .btns .btn[data-v-d622f63e]:nth-child(3):after{content:"";position:absolute;top:8px;left:0;font-family:iconfont;font-size:20px}@media screen and (max-width: 768px){.homeBox[data-v-d622f63e]{margin:5vw 4vw;width:auto;min-height:calc(100vh - 60vw)}.homeBox .logoBox[data-v-d622f63e]{display:none}.homeBox .logoBox .logo[data-v-d622f63e]{width:9vw;height:9vw}.homeBox .logoBox .title[data-v-d622f63e]{margin-left:3.2vw;font-size:5.2vw}.homeBox .subTitle[data-v-d622f63e]{padding:4vw 0}.homeBox .search[data-v-d622f63e]{margin-top:4vw;height:13vw;border-radius:3vw}.homeBox .search .selectBox[data-v-d622f63e]{width:20vw;font-size:30vw}.homeBox .search uni-input[data-v-d622f63e]{padding:0 14vw 0 22vw}.homeBox .search .iconfont[data-v-d622f63e]{top:2.5vw;right:5vw;font-size:5vw}.homeBox .search.noSelect uni-input[data-v-d622f63e]{padding:0 14vw 0 6vw}.homeBox .content[data-v-d622f63e]{border-radius:3vw;padding:4vw;margin-top:12vw}.homeBox .content .list[data-v-d622f63e]{margin-top:2vw}.homeBox .content .list .item[data-v-d622f63e]{padding:5vw 0 0}.homeBox .content .list .item .name[data-v-d622f63e]{padding-bottom:4vw;font-size:4.2vw}.homeBox .content .list .item .numbox .ke[data-v-d622f63e]{padding-left:6vw}.homeBox .content .list .item .numbox .ke[data-v-d622f63e]:after{top:-.7vw;font-size:4.8vw}.homeBox .content .list .item .numbox .num[data-v-d622f63e]{padding-left:6vw;margin-left:8vw}.homeBox .content .list .item .numbox .num[data-v-d622f63e]:after{top:-1.5vw;font-size:5.6vw}.homeBox .content .list .item .numbox .cate[data-v-d622f63e]{padding-left:6vw;margin-left:8vw}.homeBox .content .list .item .numbox .cate[data-v-d622f63e]:after{top:-1.5vw;font-size:5.6vw}.homeBox .content .list .item .btns[data-v-d622f63e]{margin-top:2vw}.homeBox .content .list .item .btns .btn[data-v-d622f63e]{padding:3vw 0 3vw 6vw;margin-right:8.5vw}.homeBox .content .list .item .btns .btn[data-v-d622f63e]:nth-child(1):after{top:2.1vw;font-size:5vw}.homeBox .content .list .item .btns .btn[data-v-d622f63e]:nth-child(2):after{top:2.1vw;font-size:5vw}.homeBox .content .list .item .btns .btn[data-v-d622f63e]:nth-child(3):after{top:2.1vw;font-size:5vw}} diff --git a/public/assets/footer-_DhgXmsd.css b/public/assets/footer-_DhgXmsd.css deleted file mode 100644 index 542618b..0000000 --- a/public/assets/footer-_DhgXmsd.css +++ /dev/null @@ -1 +0,0 @@ -.uniui-cart-filled[data-v-5610c8db]:before{content:""}.uniui-gift-filled[data-v-5610c8db]:before{content:""}.uniui-color[data-v-5610c8db]:before{content:""}.uniui-wallet[data-v-5610c8db]:before{content:""}.uniui-settings-filled[data-v-5610c8db]:before{content:""}.uniui-auth-filled[data-v-5610c8db]:before{content:""}.uniui-shop-filled[data-v-5610c8db]:before{content:""}.uniui-staff-filled[data-v-5610c8db]:before{content:""}.uniui-vip-filled[data-v-5610c8db]:before{content:""}.uniui-plus-filled[data-v-5610c8db]:before{content:""}.uniui-folder-add-filled[data-v-5610c8db]:before{content:""}.uniui-color-filled[data-v-5610c8db]:before{content:""}.uniui-tune-filled[data-v-5610c8db]:before{content:""}.uniui-calendar-filled[data-v-5610c8db]:before{content:""}.uniui-notification-filled[data-v-5610c8db]:before{content:""}.uniui-wallet-filled[data-v-5610c8db]:before{content:""}.uniui-medal-filled[data-v-5610c8db]:before{content:""}.uniui-fire-filled[data-v-5610c8db]:before{content:""}.uniui-refreshempty[data-v-5610c8db]:before{content:""}.uniui-location-filled[data-v-5610c8db]:before{content:""}.uniui-person-filled[data-v-5610c8db]:before{content:""}.uniui-personadd-filled[data-v-5610c8db]:before{content:""}.uniui-arrowthinleft[data-v-5610c8db]:before{content:""}.uniui-arrowthinup[data-v-5610c8db]:before{content:""}.uniui-arrowthindown[data-v-5610c8db]:before{content:""}.uniui-back[data-v-5610c8db]:before{content:""}.uniui-forward[data-v-5610c8db]:before{content:""}.uniui-arrow-right[data-v-5610c8db]:before{content:""}.uniui-arrow-left[data-v-5610c8db]:before{content:""}.uniui-arrow-up[data-v-5610c8db]:before{content:""}.uniui-arrow-down[data-v-5610c8db]:before{content:""}.uniui-arrowthinright[data-v-5610c8db]:before{content:""}.uniui-down[data-v-5610c8db]:before{content:""}.uniui-bottom[data-v-5610c8db]:before{content:""}.uniui-arrowright[data-v-5610c8db]:before{content:""}.uniui-right[data-v-5610c8db]:before{content:""}.uniui-up[data-v-5610c8db]:before{content:""}.uniui-top[data-v-5610c8db]:before{content:""}.uniui-left[data-v-5610c8db]:before{content:""}.uniui-arrowup[data-v-5610c8db]:before{content:""}.uniui-eye[data-v-5610c8db]:before{content:""}.uniui-eye-filled[data-v-5610c8db]:before{content:""}.uniui-eye-slash[data-v-5610c8db]:before{content:""}.uniui-eye-slash-filled[data-v-5610c8db]:before{content:""}.uniui-info-filled[data-v-5610c8db]:before{content:""}.uniui-reload[data-v-5610c8db]:before{content:""}.uniui-micoff-filled[data-v-5610c8db]:before{content:""}.uniui-map-pin-ellipse[data-v-5610c8db]:before{content:""}.uniui-map-pin[data-v-5610c8db]:before{content:""}.uniui-location[data-v-5610c8db]:before{content:""}.uniui-starhalf[data-v-5610c8db]:before{content:""}.uniui-star[data-v-5610c8db]:before{content:""}.uniui-star-filled[data-v-5610c8db]:before{content:""}.uniui-calendar[data-v-5610c8db]:before{content:""}.uniui-fire[data-v-5610c8db]:before{content:""}.uniui-medal[data-v-5610c8db]:before{content:""}.uniui-font[data-v-5610c8db]:before{content:""}.uniui-gift[data-v-5610c8db]:before{content:""}.uniui-link[data-v-5610c8db]:before{content:""}.uniui-notification[data-v-5610c8db]:before{content:""}.uniui-staff[data-v-5610c8db]:before{content:""}.uniui-vip[data-v-5610c8db]:before{content:""}.uniui-folder-add[data-v-5610c8db]:before{content:""}.uniui-tune[data-v-5610c8db]:before{content:""}.uniui-auth[data-v-5610c8db]:before{content:""}.uniui-person[data-v-5610c8db]:before{content:""}.uniui-email-filled[data-v-5610c8db]:before{content:""}.uniui-phone-filled[data-v-5610c8db]:before{content:""}.uniui-phone[data-v-5610c8db]:before{content:""}.uniui-email[data-v-5610c8db]:before{content:""}.uniui-personadd[data-v-5610c8db]:before{content:""}.uniui-chatboxes-filled[data-v-5610c8db]:before{content:""}.uniui-contact[data-v-5610c8db]:before{content:""}.uniui-chatbubble-filled[data-v-5610c8db]:before{content:""}.uniui-contact-filled[data-v-5610c8db]:before{content:""}.uniui-chatboxes[data-v-5610c8db]:before{content:""}.uniui-chatbubble[data-v-5610c8db]:before{content:""}.uniui-upload-filled[data-v-5610c8db]:before{content:""}.uniui-upload[data-v-5610c8db]:before{content:""}.uniui-weixin[data-v-5610c8db]:before{content:""}.uniui-compose[data-v-5610c8db]:before{content:""}.uniui-qq[data-v-5610c8db]:before{content:""}.uniui-download-filled[data-v-5610c8db]:before{content:""}.uniui-pyq[data-v-5610c8db]:before{content:""}.uniui-sound[data-v-5610c8db]:before{content:""}.uniui-trash-filled[data-v-5610c8db]:before{content:""}.uniui-sound-filled[data-v-5610c8db]:before{content:""}.uniui-trash[data-v-5610c8db]:before{content:""}.uniui-videocam-filled[data-v-5610c8db]:before{content:""}.uniui-spinner-cycle[data-v-5610c8db]:before{content:""}.uniui-weibo[data-v-5610c8db]:before{content:""}.uniui-videocam[data-v-5610c8db]:before{content:""}.uniui-download[data-v-5610c8db]:before{content:""}.uniui-help[data-v-5610c8db]:before{content:""}.uniui-navigate-filled[data-v-5610c8db]:before{content:""}.uniui-plusempty[data-v-5610c8db]:before{content:""}.uniui-smallcircle[data-v-5610c8db]:before{content:""}.uniui-minus-filled[data-v-5610c8db]:before{content:""}.uniui-micoff[data-v-5610c8db]:before{content:""}.uniui-closeempty[data-v-5610c8db]:before{content:""}.uniui-clear[data-v-5610c8db]:before{content:""}.uniui-navigate[data-v-5610c8db]:before{content:""}.uniui-minus[data-v-5610c8db]:before{content:""}.uniui-image[data-v-5610c8db]:before{content:""}.uniui-mic[data-v-5610c8db]:before{content:""}.uniui-paperplane[data-v-5610c8db]:before{content:""}.uniui-close[data-v-5610c8db]:before{content:""}.uniui-help-filled[data-v-5610c8db]:before{content:""}.uniui-paperplane-filled[data-v-5610c8db]:before{content:""}.uniui-plus[data-v-5610c8db]:before{content:""}.uniui-mic-filled[data-v-5610c8db]:before{content:""}.uniui-image-filled[data-v-5610c8db]:before{content:""}.uniui-locked-filled[data-v-5610c8db]:before{content:""}.uniui-info[data-v-5610c8db]:before{content:""}.uniui-locked[data-v-5610c8db]:before{content:""}.uniui-camera-filled[data-v-5610c8db]:before{content:""}.uniui-chat-filled[data-v-5610c8db]:before{content:""}.uniui-camera[data-v-5610c8db]:before{content:""}.uniui-circle[data-v-5610c8db]:before{content:""}.uniui-checkmarkempty[data-v-5610c8db]:before{content:""}.uniui-chat[data-v-5610c8db]:before{content:""}.uniui-circle-filled[data-v-5610c8db]:before{content:""}.uniui-flag[data-v-5610c8db]:before{content:""}.uniui-flag-filled[data-v-5610c8db]:before{content:""}.uniui-gear-filled[data-v-5610c8db]:before{content:""}.uniui-home[data-v-5610c8db]:before{content:""}.uniui-home-filled[data-v-5610c8db]:before{content:""}.uniui-gear[data-v-5610c8db]:before{content:""}.uniui-smallcircle-filled[data-v-5610c8db]:before{content:""}.uniui-map-filled[data-v-5610c8db]:before{content:""}.uniui-map[data-v-5610c8db]:before{content:""}.uniui-refresh-filled[data-v-5610c8db]:before{content:""}.uniui-refresh[data-v-5610c8db]:before{content:""}.uniui-cloud-upload[data-v-5610c8db]:before{content:""}.uniui-cloud-download-filled[data-v-5610c8db]:before{content:""}.uniui-cloud-download[data-v-5610c8db]:before{content:""}.uniui-cloud-upload-filled[data-v-5610c8db]:before{content:""}.uniui-redo[data-v-5610c8db]:before{content:""}.uniui-images-filled[data-v-5610c8db]:before{content:""}.uniui-undo-filled[data-v-5610c8db]:before{content:""}.uniui-more[data-v-5610c8db]:before{content:""}.uniui-more-filled[data-v-5610c8db]:before{content:""}.uniui-undo[data-v-5610c8db]:before{content:""}.uniui-images[data-v-5610c8db]:before{content:""}.uniui-paperclip[data-v-5610c8db]:before{content:""}.uniui-settings[data-v-5610c8db]:before{content:""}.uniui-search[data-v-5610c8db]:before{content:""}.uniui-redo-filled[data-v-5610c8db]:before{content:""}.uniui-list[data-v-5610c8db]:before{content:""}.uniui-mail-open-filled[data-v-5610c8db]:before{content:""}.uniui-hand-down-filled[data-v-5610c8db]:before{content:""}.uniui-hand-down[data-v-5610c8db]:before{content:""}.uniui-hand-up-filled[data-v-5610c8db]:before{content:""}.uniui-hand-up[data-v-5610c8db]:before{content:""}.uniui-heart-filled[data-v-5610c8db]:before{content:""}.uniui-mail-open[data-v-5610c8db]:before{content:""}.uniui-heart[data-v-5610c8db]:before{content:""}.uniui-loop[data-v-5610c8db]:before{content:""}.uniui-pulldown[data-v-5610c8db]:before{content:""}.uniui-scan[data-v-5610c8db]:before{content:""}.uniui-bars[data-v-5610c8db]:before{content:""}.uniui-checkbox[data-v-5610c8db]:before{content:""}.uniui-checkbox-filled[data-v-5610c8db]:before{content:""}.uniui-shop[data-v-5610c8db]:before{content:""}.uniui-headphones[data-v-5610c8db]:before{content:""}.uniui-cart[data-v-5610c8db]:before{content:""}@font-face{font-family:uniicons;src:url(/assets/uniicons-DN59BOw4.ttf)}.uni-icons[data-v-5610c8db]{font-family:uniicons;text-decoration:none;text-align:center}@media screen and (max-width: 500px){.hide-on-phone[data-v-fe4b6be6]{display:none}}.uni-stat__select[data-v-fe4b6be6]{display:flex;align-items:center;cursor:pointer;width:100%;flex:1;box-sizing:border-box}.uni-stat-box[data-v-fe4b6be6],.uni-stat__actived[data-v-fe4b6be6]{width:100%;flex:1}.uni-label-text[data-v-fe4b6be6]{font-size:14px;font-weight:700;color:#6a6a6a;margin:auto 5px auto 0}.uni-select[data-v-fe4b6be6]{font-size:14px;border:1px solid #e5e5e5;box-sizing:border-box;border-radius:4px;padding:0 5px 0 10px;position:relative;display:flex;-webkit-user-select:none;user-select:none;flex-direction:row;align-items:center;border-bottom:solid 1px #e5e5e5;width:100%;flex:1;height:35px}.uni-select--disabled[data-v-fe4b6be6]{background-color:#f5f7fa;cursor:not-allowed}.uni-select__label[data-v-fe4b6be6]{font-size:16px;height:35px;padding-right:10px;color:#909399}.uni-select__input-box[data-v-fe4b6be6]{height:35px;position:relative;display:flex;flex:1;flex-direction:row;align-items:center}.uni-select__input[data-v-fe4b6be6]{flex:1;font-size:14px;height:22px;line-height:22px}.uni-select__input-plac[data-v-fe4b6be6]{font-size:14px;color:#909399}.uni-select__selector[data-v-fe4b6be6]{box-sizing:border-box;position:absolute;left:0;width:100%;background-color:#fff;border:1px solid #EBEEF5;border-radius:6px;box-shadow:0 2px 12px rgba(0,0,0,.1);z-index:3;padding:4px 0}.uni-select__selector-scroll[data-v-fe4b6be6]{max-height:200px;box-sizing:border-box}@media (min-width: 768px){.uni-select__selector-scroll[data-v-fe4b6be6]{max-height:600px}}.uni-select__selector-empty[data-v-fe4b6be6],.uni-select__selector-item[data-v-fe4b6be6]{display:flex;cursor:pointer;line-height:35px;font-size:14px;text-align:center;padding:0 10px}.uni-select__selector-item[data-v-fe4b6be6]:hover{background-color:#f9f9f9}.uni-select__selector-empty[data-v-fe4b6be6]:last-child,.uni-select__selector-item[data-v-fe4b6be6]:last-child{border-bottom:none}.uni-select__selector__disabled[data-v-fe4b6be6]{opacity:.4;cursor:default}.uni-popper__arrow_bottom[data-v-fe4b6be6],.uni-popper__arrow_bottom[data-v-fe4b6be6]:after,.uni-popper__arrow_top[data-v-fe4b6be6],.uni-popper__arrow_top[data-v-fe4b6be6]:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:6px}.uni-popper__arrow_bottom[data-v-fe4b6be6]{filter:drop-shadow(0 2px 12px rgba(0,0,0,.03));top:-6px;left:10%;margin-right:3px;border-top-width:0;border-bottom-color:#ebeef5}.uni-popper__arrow_bottom[data-v-fe4b6be6]:after{content:" ";top:1px;margin-left:-6px;border-top-width:0;border-bottom-color:#fff}.uni-popper__arrow_top[data-v-fe4b6be6]{filter:drop-shadow(0 2px 12px rgba(0,0,0,.03));bottom:-6px;left:10%;margin-right:3px;border-bottom-width:0;border-top-color:#ebeef5}.uni-popper__arrow_top[data-v-fe4b6be6]:after{content:" ";bottom:1px;margin-left:-6px;border-bottom-width:0;border-top-color:#fff}.uni-select__input-text[data-v-fe4b6be6]{width:100%;color:#333;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden}.uni-select__input-placeholder[data-v-fe4b6be6]{color:#6a6a6a;font-size:12px}.uni-select--mask[data-v-fe4b6be6]{position:fixed;top:0;bottom:0;right:0;left:0;z-index:2}.uni-popup[data-v-2ba3757e]{position:fixed;z-index:99}.uni-popup.top[data-v-2ba3757e],.uni-popup.left[data-v-2ba3757e],.uni-popup.right[data-v-2ba3757e]{top:var(--window-top)}.uni-popup .uni-popup__wrapper[data-v-2ba3757e]{display:block;position:relative}.uni-popup .uni-popup__wrapper.left[data-v-2ba3757e],.uni-popup .uni-popup__wrapper.right[data-v-2ba3757e]{padding-top:var(--window-top);flex:1}.fixforpc-z-index[data-v-2ba3757e]{z-index:999}.fixforpc-top[data-v-2ba3757e]{top:0}.hbox[data-v-23f68e6a]{height:80px}.headerBox[data-v-23f68e6a]{position:fixed;top:0;left:0;right:0;height:80px;background-color:#fff;z-index:99;box-shadow:0 3px 5px rgba(214,214,214,.22)}.headerBox .box[data-v-23f68e6a]{display:flex;align-items:center;justify-content:space-between;margin:auto;height:100%;overflow:hidden;width:900px}@media (max-width: 1000px){.headerBox .box[data-v-23f68e6a]{width:720px}}@media (max-width: 768px){.headerBox .box[data-v-23f68e6a]{width:100%;padding:0 4.5vw}}.headerBox .box .logoBox[data-v-23f68e6a]{display:inline-flex;align-items:center}.headerBox .box .logoBox .logo[data-v-23f68e6a]{width:40px;height:40px}.headerBox .box .logoBox .title[data-v-23f68e6a]{margin-left:18px;font-size:20px;font-weight:700}.headerBox .box .navs[data-v-23f68e6a]{display:inline-flex}.headerBox .box .navs .item[data-v-23f68e6a]{padding:4px 0;margin-left:25px;cursor:pointer}.headerBox .box .navs .item[data-v-23f68e6a]:hover{color:#1e80ff}.layerBox[data-v-23f68e6a]{background-color:#fff;width:320px;height:400px;border-radius:12px;overflow:hidden}.layerBox uni-image[data-v-23f68e6a]{width:100%;height:100%}.vname[data-v-23f68e6a]{font-weight:700;color:#000;font-size:20px;text-align:center;padding:30px 0 0}.vbtn[data-v-23f68e6a]{background-color:#1e80ff;border-radius:8px;height:45px;line-height:45px;font-size:16px;color:#fff;text-align:center;width:280px;margin:15px auto 0;cursor:pointer}uni-textarea[data-v-23f68e6a]{background-color:#f7f7f7;border-radius:.25rem;width:280px;height:240px;margin:15px auto 0;padding:15px;box-sizing:border-box}@media screen and (max-width: 768px){.hbox[data-v-23f68e6a],.headerBox[data-v-23f68e6a]{height:15vw}.headerBox .box[data-v-23f68e6a]{box-sizing:border-box}.headerBox .box .logoBox .logo[data-v-23f68e6a]{width:10vw;height:10vw}.headerBox .box .logoBox .title[data-v-23f68e6a]{margin-left:3vw;font-size:4.5vw}.headerBox .box .navs .item[data-v-23f68e6a]{padding:2vw 0;margin-left:5vw;font-size:3.5vw}.layerBox[data-v-23f68e6a]{width:65vw;height:90vw;border-radius:3vw}.vname[data-v-23f68e6a]{font-size:4.2vw;padding:5vw 0 0}.vbtn[data-v-23f68e6a]{height:10vw;line-height:10vw;font-size:4.2vw;width:55vw;margin:5vw auto 0}uni-textarea[data-v-23f68e6a]{width:55vw;height:54vw;margin:5vw auto 0;padding:5vw}}.navsBox[data-v-23f68e6a]{position:fixed;bottom:15%;right:.9375rem;z-index:99}.navsBox .item[data-v-23f68e6a]{width:2.0625rem;height:2.0625rem;line-height:2.0625rem;text-align:center;border-radius:50%;background-color:#1e80ff;border:1px solid #1e80ff;color:#fff;margin-top:.9375rem;font-size:.9375rem}.navsBox .item[data-v-23f68e6a]:last-child{background-color:#fff;color:#1e80ff}.footerBox[data-v-300b0a0a]{background-color:#fff;box-shadow:0 -3px 5px rgba(214,214,214,.22);padding:20px 15px}.footerBox .box[data-v-300b0a0a]{text-align:center;margin:auto;height:100%;overflow:hidden;width:900px}@media (max-width: 1000px){.footerBox .box[data-v-300b0a0a]{width:720px}}@media (max-width: 768px){.footerBox .box[data-v-300b0a0a]{width:100%;padding:0 4.5vw}}.footerBox .box p[data-v-300b0a0a]{opacity:.6}@media screen and (max-width: 768px){.footerBox[data-v-300b0a0a]{font-size:3.6vw;padding:4vw}.footerBox .box[data-v-300b0a0a]{padding:0}} diff --git a/public/assets/footer.BS9rMale.js b/public/assets/footer.BS9rMale.js deleted file mode 100644 index c679cb6..0000000 --- a/public/assets/footer.BS9rMale.js +++ /dev/null @@ -1 +0,0 @@ -import{A as e,B as t,C as s,D as n,E as o,G as i,H as r,x as a,J as c,K as l,L as u,r as d,M as h,N as f,O as p,P as m,Q as g,R as y,S as _,n as w,T as k,U as b,v,V as S,W as I,X as T,Y as A,o as x,c as P,w as C,Z as O,_ as E,f as R,p as L,b as D,k as U,t as N,j as M,d as F,e as $,$ as q,F as j,l as B,i as K,a0 as H,a1 as V,a2 as W,a3 as z,a as J,m as Y,a4 as Q,g as G}from"./index-bFszJRU6.js";const X={pages:[{path:"pages/index/index",style:{navigationStyle:"custom",navigationBarTitleText:"首页"}},{path:"pages/index/list",style:{navigationStyle:"custom",navigationBarTitleText:"搜索"}},{path:"pages/index/detail",style:{navigationStyle:"custom",navigationBarTitleText:"资源详情"}}],globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},uniIdRouter:{}};function Z(e,t,s){return e(s={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&s.path)}},s.exports),s.exports}var ee=Z((function(e,t){var s;e.exports=(s=s||function(e,t){var s=Object.create||function(){function e(){}return function(t){var s;return e.prototype=t,s=new e,e.prototype=null,s}}(),n={},o=n.lib={},i=o.Base={extend:function(e){var t=s(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},r=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,s=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i>>2]>>>24-i%4*8&255;t[n+i>>>2]|=r<<24-(n+i)%4*8}else for(i=0;i>>2]=s[i>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,s=this.sigBytes;t[s>>>2]&=4294967295<<32-s%4*8,t.length=e.ceil(s/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var s,n=[],o=function(t){var s=987654321,n=4294967295;return function(){var o=((s=36969*(65535&s)+(s>>16)&n)<<16)+(t=18e3*(65535&t)+(t>>16)&n)&n;return o/=4294967296,(o+=.5)*(e.random()>.5?1:-1)}},i=0;i>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,s=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new r.init(s,t/2)}},l=a.Latin1={stringify:function(e){for(var t=e.words,s=e.sigBytes,n=[],o=0;o>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,s=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new r.init(s,t)}},u=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var s=this._data,n=s.words,o=s.sigBytes,i=this.blockSize,a=o/(4*i),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*i,l=e.min(4*c,o);if(c){for(var u=0;u>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,r=e[t+0],c=e[t+1],f=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],y=e[t+6],_=e[t+7],w=e[t+8],k=e[t+9],b=e[t+10],v=e[t+11],S=e[t+12],I=e[t+13],T=e[t+14],A=e[t+15],x=i[0],P=i[1],C=i[2],O=i[3];x=l(x,P,C,O,r,7,a[0]),O=l(O,x,P,C,c,12,a[1]),C=l(C,O,x,P,f,17,a[2]),P=l(P,C,O,x,p,22,a[3]),x=l(x,P,C,O,m,7,a[4]),O=l(O,x,P,C,g,12,a[5]),C=l(C,O,x,P,y,17,a[6]),P=l(P,C,O,x,_,22,a[7]),x=l(x,P,C,O,w,7,a[8]),O=l(O,x,P,C,k,12,a[9]),C=l(C,O,x,P,b,17,a[10]),P=l(P,C,O,x,v,22,a[11]),x=l(x,P,C,O,S,7,a[12]),O=l(O,x,P,C,I,12,a[13]),C=l(C,O,x,P,T,17,a[14]),x=u(x,P=l(P,C,O,x,A,22,a[15]),C,O,c,5,a[16]),O=u(O,x,P,C,y,9,a[17]),C=u(C,O,x,P,v,14,a[18]),P=u(P,C,O,x,r,20,a[19]),x=u(x,P,C,O,g,5,a[20]),O=u(O,x,P,C,b,9,a[21]),C=u(C,O,x,P,A,14,a[22]),P=u(P,C,O,x,m,20,a[23]),x=u(x,P,C,O,k,5,a[24]),O=u(O,x,P,C,T,9,a[25]),C=u(C,O,x,P,p,14,a[26]),P=u(P,C,O,x,w,20,a[27]),x=u(x,P,C,O,I,5,a[28]),O=u(O,x,P,C,f,9,a[29]),C=u(C,O,x,P,_,14,a[30]),x=d(x,P=u(P,C,O,x,S,20,a[31]),C,O,g,4,a[32]),O=d(O,x,P,C,w,11,a[33]),C=d(C,O,x,P,v,16,a[34]),P=d(P,C,O,x,T,23,a[35]),x=d(x,P,C,O,c,4,a[36]),O=d(O,x,P,C,m,11,a[37]),C=d(C,O,x,P,_,16,a[38]),P=d(P,C,O,x,b,23,a[39]),x=d(x,P,C,O,I,4,a[40]),O=d(O,x,P,C,r,11,a[41]),C=d(C,O,x,P,p,16,a[42]),P=d(P,C,O,x,y,23,a[43]),x=d(x,P,C,O,k,4,a[44]),O=d(O,x,P,C,S,11,a[45]),C=d(C,O,x,P,A,16,a[46]),x=h(x,P=d(P,C,O,x,f,23,a[47]),C,O,r,6,a[48]),O=h(O,x,P,C,_,10,a[49]),C=h(C,O,x,P,T,15,a[50]),P=h(P,C,O,x,g,21,a[51]),x=h(x,P,C,O,S,6,a[52]),O=h(O,x,P,C,p,10,a[53]),C=h(C,O,x,P,b,15,a[54]),P=h(P,C,O,x,c,21,a[55]),x=h(x,P,C,O,w,6,a[56]),O=h(O,x,P,C,A,10,a[57]),C=h(C,O,x,P,y,15,a[58]),P=h(P,C,O,x,I,21,a[59]),x=h(x,P,C,O,m,6,a[60]),O=h(O,x,P,C,v,10,a[61]),C=h(C,O,x,P,f,15,a[62]),P=h(P,C,O,x,k,21,a[63]),i[0]=i[0]+x|0,i[1]=i[1]+P|0,i[2]=i[2]+C|0,i[3]=i[3]+O|0},_doFinalize:function(){var t=this._data,s=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;s[o>>>5]|=128<<24-o%32;var i=e.floor(n/4294967296),r=n;s[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),s[14+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(s.length+1),this._process();for(var a=this._hash,c=a.words,l=0;l<4;l++){var u=c[l];c[l]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,s,n,o,i,r){var a=e+(t&s|~t&n)+o+r;return(a<>>32-i)+t}function u(e,t,s,n,o,i,r){var a=e+(t&n|s&~n)+o+r;return(a<>>32-i)+t}function d(e,t,s,n,o,i,r){var a=e+(t^s^n)+o+r;return(a<>>32-i)+t}function h(e,t,s,n,o,i,r){var a=e+(s^(t|~n))+o+r;return(a<>>32-i)+t}t.MD5=i._createHelper(c),t.HmacMD5=i._createHmacHelper(c)}(Math),s.MD5)})),Z((function(e,t){var s,n,o;e.exports=(n=(s=te).lib.Base,o=s.enc.Utf8,void(s.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=o.parse(t));var s=e.blockSize,n=4*s;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),r=this._iKey=t.clone(),a=i.words,c=r.words,l=0;l>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a>>6*(3-a)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,s=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i>>6-r%4*2;n[i>>>2]|=(a|c)<<24-i%4*8,i++}return o.create(n,i)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},s.enc.Base64)}));const ie="FUNCTION",re="pending",ae="rejected";function ce(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function le(e){return"object"===ce(e)}function ue(e){return"function"==typeof e}function de(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}const he="REJECTED",fe="NOT_PENDING";class pe{constructor({createPromise:e,retryRule:t=he}={}){this.createPromise=e,this.status=null,this.promise=null,this.retryRule=t}get needRetry(){if(!this.status)return!0;switch(this.retryRule){case he:return this.status===ae;case fe:return this.status!==re}}exec(){return this.needRetry?(this.status=re,this.promise=this.createPromise().then((e=>(this.status="fulfilled",Promise.resolve(e))),(e=>(this.status=ae,Promise.reject(e)))),this.promise):this.promise}}function me(e){return e&&"string"==typeof e?JSON.parse(e):e}const ge=me([]);me("");const ye=me("[]")||[];let _e="";try{_e="__UNI__F9A28FF"}catch(at){}let we={};function ke(e,t={}){var s,n;return s=we,n=e,Object.prototype.hasOwnProperty.call(s,n)||(we[e]=t),we[e]}const be=["invoke","success","fail","complete"],ve=ke("_globalUniCloudInterceptor");function Se(e,t){ve[e]||(ve[e]={}),le(t)&&Object.keys(t).forEach((s=>{be.indexOf(s)>-1&&function(e,t,s){let n=ve[e][t];n||(n=ve[e][t]=[]),-1===n.indexOf(s)&&ue(s)&&n.push(s)}(e,s,t[s])}))}function Ie(e,t){ve[e]||(ve[e]={}),le(t)?Object.keys(t).forEach((s=>{be.indexOf(s)>-1&&function(e,t,s){const n=ve[e][t];if(!n)return;const o=n.indexOf(s);o>-1&&n.splice(o,1)}(e,s,t[s])})):delete ve[e]}function Te(e,t){return e&&0!==e.length?e.reduce(((e,s)=>e.then((()=>s(t)))),Promise.resolve()):Promise.resolve()}function Ae(e,t){return ve[e]&&ve[e][t]||[]}function xe(e){Se("callObject",e)}const Pe=ke("_globalUniCloudListener"),Ce="response",Oe="needLogin",Ee="refreshToken",Re="clientdb",Le="cloudfunction",De="cloudobject";function Ue(e){return Pe[e]||(Pe[e]=[]),Pe[e]}function Ne(e,t){const s=Ue(e);s.includes(t)||s.push(t)}function Me(e,t){const s=Ue(e),n=s.indexOf(t);-1!==n&&s.splice(n,1)}function Fe(e,t){const s=Ue(e);for(let n=0;n{qe&&e(),function t(){if("function"==typeof s){const t=s();t&&t[0]&&(qe=!0,e())}qe||setTimeout((()=>{t()}),30)}()})),$e)}function Be(e){const t={};for(const s in e){const n=e[s];ue(n)&&(t[s]=de(n))}return t}class Ke extends Error{constructor(e){super(e.message),this.errMsg=e.message||e.errMsg||"unknown system error",this.code=this.errCode=e.code||e.errCode||"SYSTEM_ERROR",this.errSubject=this.subject=e.subject||e.errSubject,this.cause=e.cause,this.requestId=e.requestId}toJson(e=0){if(!(e>=10))return e++,{errCode:this.errCode,errMsg:this.errMsg,errSubject:this.errSubject,cause:this.cause&&this.cause.toJson?this.cause.toJson(e):this.cause}}}var He={request:e=>d(e),uploadFile:e=>h(e),setStorageSync:(e,t)=>f(e,t),getStorageSync:e=>p(e),removeStorageSync:e=>m(e),clearStorageSync:()=>g(),connectSocket:e=>y(e)};function Ve(e){return e&&Ve(e.__v_raw)||e}function We(){return{token:He.getStorageSync("uni_id_token")||He.getStorageSync("uniIdToken"),tokenExpired:He.getStorageSync("uni_id_token_expired")}}function ze({token:e,tokenExpired:t}={}){e&&He.setStorageSync("uni_id_token",e),t&&He.setStorageSync("uni_id_token_expired",t)}let Je,Ye;function Qe(){return Je||(Je=_()),Je}function Ge(){let e,t;try{if(A){if(A.toString().indexOf("not yet implemented")>-1)return;const{scene:s,channel:n}=A();e=n,t=s}}catch(s){}return{channel:e,scene:t}}let Xe={};function Ze(){const e=T&&T()||"en";if(Ye)return{...Xe,...Ye,locale:e,LOCALE:e};const t=Qe(),{deviceId:s,osName:n,uniPlatform:o,appId:i}=t,r=["appId","appLanguage","appName","appVersion","appVersionCode","appWgtVersion","browserName","browserVersion","deviceBrand","deviceId","deviceModel","deviceType","osName","osVersion","romName","romVersion","ua","hostName","hostVersion","uniPlatform","uniRuntimeVersion","uniRuntimeVersionCode","uniCompilerVersion","uniCompilerVersionCode"];for(const a in t)Object.hasOwnProperty.call(t,a)&&-1===r.indexOf(a)&&delete t[a];return Ye={PLATFORM:o,OS:n,APPID:i,DEVICEID:s,...Ge(),...t},{...Xe,...Ye,locale:e,LOCALE:e}}var et=function(e,t){let s="";return Object.keys(e).sort().forEach((function(t){e[t]&&(s=s+"&"+t+"="+e[t])})),s=s.slice(1),se(s,t).toString()},tt=function(e,t){return new Promise(((s,n)=>{t(Object.assign(e,{complete(e){e||(e={});const t=e.data&&e.data.header&&e.data.header["x-serverless-request-id"]||e.header&&e.header["request-id"];if(!e.statusCode||e.statusCode>=400){const s=e.data&&e.data.error&&e.data.error.code||"SYS_ERR",o=e.data&&e.data.error&&e.data.error.message||e.errMsg||"request:fail";return n(new Ke({code:s,message:o,requestId:t}))}const o=e.data;if(o.error)return n(new Ke({code:o.error.code,message:o.error.message,requestId:t}));o.result=o.data,o.requestId=t,delete o.data,s(o)}}))}))},st=function(e){return oe.stringify(ne.parse(e))},nt=class{constructor(e){["spaceId","clientSecret"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),this.config=Object.assign({},{endpoint:0===e.spaceId.indexOf("mp-")?"https://api.next.bspapp.com":"https://api.bspapp.com"},e),this.config.provider="aliyun",this.config.requestUrl=this.config.endpoint+"/client",this.config.envType=this.config.envType||"public",this.config.accessTokenKey="access_token_"+this.config.spaceId,this.adapter=He,this._getAccessTokenPromiseHub=new pe({createPromise:()=>this.requestAuth(this.setupRequest({method:"serverless.auth.user.anonymousAuthorize",params:"{}"},"auth")).then((e=>{if(!e.result||!e.result.accessToken)throw new Ke({code:"AUTH_FAILED",message:"获取accessToken失败"});this.setAccessToken(e.result.accessToken)})),retryRule:fe})}get hasAccessToken(){return!!this.accessToken}setAccessToken(e){this.accessToken=e}requestWrapped(e){return tt(e,this.adapter.request)}requestAuth(e){return this.requestWrapped(e)}request(e,t){return Promise.resolve().then((()=>this.hasAccessToken?t?this.requestWrapped(e):this.requestWrapped(e).catch((t=>new Promise(((e,s)=>{!t||"GATEWAY_INVALID_TOKEN"!==t.code&&"InvalidParameter.InvalidToken"!==t.code?s(t):e()})).then((()=>this.getAccessToken())).then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)})))):this.getAccessToken().then((()=>{const t=this.rebuildRequest(e);return this.request(t,!0)}))))}rebuildRequest(e){const t=Object.assign({},e);return t.data.token=this.accessToken,t.header["x-basement-token"]=this.accessToken,t.header["x-serverless-sign"]=et(t.data,this.config.clientSecret),t}setupRequest(e,t){const s=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};return"auth"!==t&&(s.token=this.accessToken,n["x-basement-token"]=this.accessToken),n["x-serverless-sign"]=et(s,this.config.clientSecret),{url:this.config.requestUrl,method:"POST",data:s,dataType:"json",header:n}}getAccessToken(){return this._getAccessTokenPromiseHub.exec()}async authorize(){await this.getAccessToken()}callFunction(e){const t={method:"serverless.function.runtime.invoke",params:JSON.stringify({functionTarget:e.name,functionArgs:e.data||{}})};return this.request(this.setupRequest(t))}getOSSUploadOptionsFromPath(e){const t={method:"serverless.file.resource.generateProximalSign",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}uploadFileToOSS({url:e,formData:t,name:s,filePath:n,fileType:o,onUploadProgress:i}){return new Promise(((r,a)=>{const c=this.adapter.uploadFile({url:e,formData:t,name:s,filePath:n,fileType:o,header:{"X-OSS-server-side-encrpytion":"AES256"},success(e){e&&e.statusCode<400?r(e):a(new Ke({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){a(new Ke({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof i&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((e=>{i({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}reportOSSUpload(e){const t={method:"serverless.file.resource.report",params:JSON.stringify(e)};return this.request(this.setupRequest(t))}async uploadFile({filePath:e,cloudPath:t,fileType:s="image",cloudPathAsRealPath:n=!1,onUploadProgress:o,config:i}){if("string"!==ce(t))throw new Ke({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new Ke({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new Ke({code:"INVALID_PARAM",message:"cloudPath不合法"});const r=i&&i.envType||this.config.envType;if(n&&("/"!==t[0]&&(t="/"+t),t.indexOf("\\")>-1))throw new Ke({code:"INVALID_PARAM",message:"使用cloudPath作为路径时,cloudPath不可包含“\\”"});const a=(await this.getOSSUploadOptionsFromPath({env:r,filename:n?t.split("/").pop():t,fileId:n?t:void 0})).result,c="https://"+a.cdnDomain+"/"+a.ossPath,{securityToken:l,accessKeyId:u,signature:d,host:h,ossPath:f,id:p,policy:m,ossCallbackUrl:g}=a,y={"Cache-Control":"max-age=2592000","Content-Disposition":"attachment",OSSAccessKeyId:u,Signature:d,host:h,id:p,key:f,policy:m,success_action_status:200};if(l&&(y["x-oss-security-token"]=l),g){const e=JSON.stringify({callbackUrl:g,callbackBody:JSON.stringify({fileId:p,spaceId:this.config.spaceId}),callbackBodyType:"application/json"});y.callback=st(e)}const _={url:"https://"+a.host,formData:y,fileName:"file",name:"file",filePath:e,fileType:s};if(await this.uploadFileToOSS(Object.assign({},_,{onUploadProgress:o})),g)return{success:!0,filePath:e,fileID:c};if((await this.reportOSSUpload({id:p})).success)return{success:!0,filePath:e,fileID:c};throw new Ke({code:"UPLOAD_FAILED",message:"文件上传失败"})}getTempFileURL({fileList:e}={}){return new Promise(((t,s)=>{Array.isArray(e)&&0!==e.length||s(new Ke({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"})),t({fileList:e.map((e=>({fileID:e,tempFileURL:e})))})}))}async getFileInfo({fileList:e}={}){if(!Array.isArray(e)||0===e.length)throw new Ke({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const t={method:"serverless.file.resource.info",params:JSON.stringify({id:e.map((e=>e.split("?")[0])).join(",")})};return{fileList:(await this.request(this.setupRequest(t))).result}}},ot={init(e){const t=new nt(e),s={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return s},t.customAuth=t.auth,t}};const it="undefined"!=typeof location&&"http:"===location.protocol?"http:":"https:";var rt,at;(at=rt||(rt={})).local="local",at.none="none",at.session="session";var ct=function(){},lt=Z((function(e,t){var s;e.exports=(s=te,function(e){var t=s,n=t.lib,o=n.WordArray,i=n.Hasher,r=t.algo,a=[],c=[];!function(){function t(t){for(var s=e.sqrt(t),n=2;n<=s;n++)if(!(t%n))return!1;return!0}function s(e){return 4294967296*(e-(0|e))|0}for(var n=2,o=0;o<64;)t(n)&&(o<8&&(a[o]=s(e.pow(n,.5))),c[o]=s(e.pow(n,1/3)),o++),n++}();var l=[],u=r.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(e,t){for(var s=this._hash.words,n=s[0],o=s[1],i=s[2],r=s[3],a=s[4],u=s[5],d=s[6],h=s[7],f=0;f<64;f++){if(f<16)l[f]=0|e[t+f];else{var p=l[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=l[f-2],y=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[f]=m+l[f-7]+y+l[f-16]}var _=n&o^n&i^o&i,w=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),k=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&u^~a&d)+c[f]+l[f];h=d,d=u,u=a,a=r+k|0,r=i,i=o,o=n,n=k+(w+_)|0}s[0]=s[0]+n|0,s[1]=s[1]+o|0,s[2]=s[2]+i|0,s[3]=s[3]+r|0,s[4]=s[4]+a|0,s[5]=s[5]+u|0,s[6]=s[6]+d|0,s[7]=s[7]+h|0},_doFinalize:function(){var t=this._data,s=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;return s[o>>>5]|=128<<24-o%32,s[14+(o+64>>>9<<4)]=e.floor(n/4294967296),s[15+(o+64>>>9<<4)]=n,t.sigBytes=4*s.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(u),t.HmacSHA256=i._createHmacHelper(u)}(Math),s.SHA256)})),ut=lt,dt=Z((function(e,t){e.exports=te.HmacSHA256}));const ht=()=>{let e;if(!Promise){e=()=>{},e.promise={};const t=()=>{throw new Ke({message:'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'})};return Object.defineProperty(e.promise,"then",{get:t}),Object.defineProperty(e.promise,"catch",{get:t}),e}const t=new Promise(((t,s)=>{e=(e,n)=>e?s(e):t(n)}));return e.promise=t,e};function ft(e){return void 0===e}function pt(e){return"[object Null]"===Object.prototype.toString.call(e)}var mt;!function(e){e.WEB="web",e.WX_MP="wx_mp"}(mt||(mt={}));const gt={adapter:null,runtime:void 0},yt=["anonymousUuidKey"];class _t extends ct{constructor(){super(),gt.adapter.root.tcbObject||(gt.adapter.root.tcbObject={})}setItem(e,t){gt.adapter.root.tcbObject[e]=t}getItem(e){return gt.adapter.root.tcbObject[e]}removeItem(e){delete gt.adapter.root.tcbObject[e]}clear(){delete gt.adapter.root.tcbObject}}function wt(e,t){switch(e){case"local":return t.localStorage||new _t;case"none":return new _t;default:return t.sessionStorage||new _t}}class kt{constructor(e){if(!this._storage){this._persistence=gt.adapter.primaryStorage||e.persistence,this._storage=wt(this._persistence,gt.adapter);const t=`access_token_${e.env}`,s=`access_token_expire_${e.env}`,n=`refresh_token_${e.env}`,o=`anonymous_uuid_${e.env}`,i=`login_type_${e.env}`,r=`user_info_${e.env}`;this.keys={accessTokenKey:t,accessTokenExpireKey:s,refreshTokenKey:n,anonymousUuidKey:o,loginTypeKey:i,userInfoKey:r}}}updatePersistence(e){if(e===this._persistence)return;const t="local"===this._persistence;this._persistence=e;const s=wt(e,gt.adapter);for(const n in this.keys){const e=this.keys[n];if(t&&yt.includes(n))continue;const o=this._storage.getItem(e);ft(o)||pt(o)||(s.setItem(e,o),this._storage.removeItem(e))}this._storage=s}setStore(e,t,s){if(!this._storage)return;const n={version:s||"localCachev1",content:t},o=JSON.stringify(n);try{this._storage.setItem(e,o)}catch(i){throw i}}getStore(e,t){try{if(!this._storage)return}catch(n){return""}t=t||"localCachev1";const s=this._storage.getItem(e);return s&&s.indexOf(t)>=0?JSON.parse(s).content:""}removeStore(e){this._storage.removeItem(e)}}const bt={},vt={};function St(e){return bt[e]}class It{constructor(e,t){this.data=t||null,this.name=e}}class Tt extends It{constructor(e,t){super("error",{error:e,data:t}),this.error=e}}const At=new class{constructor(){this._listeners={}}on(e,t){return s=e,n=t,(o=this._listeners)[s]=o[s]||[],o[s].push(n),this;var s,n,o}off(e,t){return function(e,t,s){if(s&&s[e]){const n=s[e].indexOf(t);-1!==n&&s[e].splice(n,1)}}(e,t,this._listeners),this}fire(e,t){if(e instanceof Tt)return console.error(e.error),this;const s="string"==typeof e?new It(e,t||{}):e,n=s.name;if(this._listens(n)){s.target=this;const e=this._listeners[n]?[...this._listeners[n]]:[];for(const t of e)t.call(this,s)}return this}_listens(e){return this._listeners[e]&&this._listeners[e].length>0}};function xt(e,t){At.on(e,t)}function Pt(e,t={}){At.fire(e,t)}function Ct(e,t){At.off(e,t)}const Ot="loginStateChanged",Et="loginStateExpire",Rt="loginTypeChanged",Lt="anonymousConverted",Dt="refreshAccessToken";var Ut;!function(e){e.ANONYMOUS="ANONYMOUS",e.WECHAT="WECHAT",e.WECHAT_PUBLIC="WECHAT-PUBLIC",e.WECHAT_OPEN="WECHAT-OPEN",e.CUSTOM="CUSTOM",e.EMAIL="EMAIL",e.USERNAME="USERNAME",e.NULL="NULL"}(Ut||(Ut={}));const Nt=["auth.getJwt","auth.logout","auth.signInWithTicket","auth.signInAnonymously","auth.signIn","auth.fetchAccessTokenWithRefreshToken","auth.signUpWithEmailAndPassword","auth.activateEndUserMail","auth.sendPasswordResetEmail","auth.resetPasswordWithToken","auth.isUsernameRegistered"],Mt={"X-SDK-Version":"1.3.5"};function Ft(e,t,s){const n=e[t];e[t]=function(t){const o={},i={};s.forEach((s=>{const{data:n,headers:r}=s.call(e,t);Object.assign(o,n),Object.assign(i,r)}));const r=t.data;return r&&(()=>{var e;if(e=r,"[object FormData]"!==Object.prototype.toString.call(e))t.data={...r,...o};else for(const t in o)r.append(t,o[t])})(),t.headers={...t.headers||{},...i},n.call(e,t)}}function $t(){const e=Math.random().toString(16).slice(2);return{data:{seqId:e},headers:{...Mt,"x-seqid":e}}}class qt{constructor(e={}){var t;this.config=e,this._reqClass=new gt.adapter.reqClass({timeout:this.config.timeout,timeoutMsg:`请求在${this.config.timeout/1e3}s内未完成,已中断`,restrictedMethods:["post"]}),this._cache=St(this.config.env),this._localCache=(t=this.config.env,vt[t]),Ft(this._reqClass,"post",[$t]),Ft(this._reqClass,"upload",[$t]),Ft(this._reqClass,"download",[$t])}async post(e){return await this._reqClass.post(e)}async upload(e){return await this._reqClass.upload(e)}async download(e){return await this._reqClass.download(e)}async refreshAccessToken(){let e,t;this._refreshAccessTokenPromise||(this._refreshAccessTokenPromise=this._refreshAccessToken());try{e=await this._refreshAccessTokenPromise}catch(s){t=s}if(this._refreshAccessTokenPromise=null,this._shouldRefreshAccessTokenHook=null,t)throw t;return e}async _refreshAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:s,loginTypeKey:n,anonymousUuidKey:o}=this._cache.keys;this._cache.removeStore(e),this._cache.removeStore(t);let i=this._cache.getStore(s);if(!i)throw new Ke({message:"未登录CloudBase"});const r={refresh_token:i},a=await this.request("auth.fetchAccessTokenWithRefreshToken",r);if(a.data.code){const{code:e}=a.data;if("SIGN_PARAM_INVALID"===e||"REFRESH_TOKEN_EXPIRED"===e||"INVALID_REFRESH_TOKEN"===e){if(this._cache.getStore(n)===Ut.ANONYMOUS&&"INVALID_REFRESH_TOKEN"===e){const e=this._cache.getStore(o),t=this._cache.getStore(s),n=await this.send("auth.signInAnonymously",{anonymous_uuid:e,refresh_token:t});return this.setRefreshToken(n.refresh_token),this._refreshAccessToken()}Pt(Et),this._cache.removeStore(s)}throw new Ke({code:a.data.code,message:`刷新access token失败:${a.data.code}`})}if(a.data.access_token)return Pt(Dt),this._cache.setStore(e,a.data.access_token),this._cache.setStore(t,a.data.access_token_expire+Date.now()),{accessToken:a.data.access_token,accessTokenExpire:a.data.access_token_expire};a.data.refresh_token&&(this._cache.removeStore(s),this._cache.setStore(s,a.data.refresh_token),this._refreshAccessToken())}async getAccessToken(){const{accessTokenKey:e,accessTokenExpireKey:t,refreshTokenKey:s}=this._cache.keys;if(!this._cache.getStore(s))throw new Ke({message:"refresh token不存在,登录状态异常"});let n=this._cache.getStore(e),o=this._cache.getStore(t),i=!0;return this._shouldRefreshAccessTokenHook&&!(await this._shouldRefreshAccessTokenHook(n,o))&&(i=!1),(!n||!o||o{e.wxOpenId&&e.wxPublicId&&(t=!0)})),{users:s,hasPrimaryUid:t}}setPrimaryUid(e){return this._request.send("auth.setPrimaryUid",{uid:e})}unlink(e){return this._request.send("auth.unlink",{platform:e})}async update(e){const{nickName:t,gender:s,avatarUrl:n,province:o,country:i,city:r}=e,{data:a}=await this._request.send("auth.updateUserInfo",{nickName:t,gender:s,avatarUrl:n,province:o,country:i,city:r});this.setLocalUserInfo(a)}async refresh(){const{data:e}=await this._request.send("auth.getUserInfo",{});return this.setLocalUserInfo(e),e}setUserInfo(){const{userInfoKey:e}=this._cache.keys,t=this._cache.getStore(e);["uid","loginType","openid","wxOpenId","wxPublicId","unionId","qqMiniOpenId","email","hasPassword","customUserId","nickName","gender","avatarUrl"].forEach((e=>{this[e]=t[e]})),this.location={country:t.country,province:t.province,city:t.city}}setLocalUserInfo(e){const{userInfoKey:t}=this._cache.keys;this._cache.setStore(t,e),this.setUserInfo()}}class Vt{constructor(e){if(!e)throw new Ke({code:"PARAM_ERROR",message:"envId is not defined"});this._cache=St(e);const{refreshTokenKey:t,accessTokenKey:s,accessTokenExpireKey:n}=this._cache.keys,o=this._cache.getStore(t),i=this._cache.getStore(s),r=this._cache.getStore(n);this.credential={refreshToken:o,accessToken:i,accessTokenExpire:r},this.user=new Ht(e)}get isAnonymousAuth(){return this.loginType===Ut.ANONYMOUS}get isCustomAuth(){return this.loginType===Ut.CUSTOM}get isWeixinAuth(){return this.loginType===Ut.WECHAT||this.loginType===Ut.WECHAT_OPEN||this.loginType===Ut.WECHAT_PUBLIC}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}}class Wt extends Kt{async signIn(){this._cache.updatePersistence("local");const{anonymousUuidKey:e,refreshTokenKey:t}=this._cache.keys,s=this._cache.getStore(e)||void 0,n=this._cache.getStore(t)||void 0,o=await this._request.send("auth.signInAnonymously",{anonymous_uuid:s,refresh_token:n});if(o.uuid&&o.refresh_token){this._setAnonymousUUID(o.uuid),this.setRefreshToken(o.refresh_token),await this._request.refreshAccessToken(),Pt(Ot),Pt(Rt,{env:this.config.env,loginType:Ut.ANONYMOUS,persistence:"local"});const e=new Vt(this.config.env);return await e.user.refresh(),e}throw new Ke({message:"匿名登录失败"})}async linkAndRetrieveDataWithTicket(e){const{anonymousUuidKey:t,refreshTokenKey:s}=this._cache.keys,n=this._cache.getStore(t),o=this._cache.getStore(s),i=await this._request.send("auth.linkAndRetrieveDataWithTicket",{anonymous_uuid:n,refresh_token:o,ticket:e});if(i.refresh_token)return this._clearAnonymousUUID(),this.setRefreshToken(i.refresh_token),await this._request.refreshAccessToken(),Pt(Lt,{env:this.config.env}),Pt(Rt,{loginType:Ut.CUSTOM,persistence:"local"}),{credential:{refreshToken:i.refresh_token}};throw new Ke({message:"匿名转化失败"})}_setAnonymousUUID(e){const{anonymousUuidKey:t,loginTypeKey:s}=this._cache.keys;this._cache.removeStore(t),this._cache.setStore(t,e),this._cache.setStore(s,Ut.ANONYMOUS)}_clearAnonymousUUID(){this._cache.removeStore(this._cache.keys.anonymousUuidKey)}}class zt extends Kt{async signIn(e){if("string"!=typeof e)throw new Ke({code:"PARAM_ERROR",message:"ticket must be a string"});const{refreshTokenKey:t}=this._cache.keys,s=await this._request.send("auth.signInWithTicket",{ticket:e,refresh_token:this._cache.getStore(t)||""});if(s.refresh_token)return this.setRefreshToken(s.refresh_token),await this._request.refreshAccessToken(),Pt(Ot),Pt(Rt,{env:this.config.env,loginType:Ut.CUSTOM,persistence:this.config.persistence}),await this.refreshUserInfo(),new Vt(this.config.env);throw new Ke({message:"自定义登录失败"})}}class Jt extends Kt{async signIn(e,t){if("string"!=typeof e)throw new Ke({code:"PARAM_ERROR",message:"email must be a string"});const{refreshTokenKey:s}=this._cache.keys,n=await this._request.send("auth.signIn",{loginType:"EMAIL",email:e,password:t,refresh_token:this._cache.getStore(s)||""}),{refresh_token:o,access_token:i,access_token_expire:r}=n;if(o)return this.setRefreshToken(o),i&&r?this.setAccessToken(i,r):await this._request.refreshAccessToken(),await this.refreshUserInfo(),Pt(Ot),Pt(Rt,{env:this.config.env,loginType:Ut.EMAIL,persistence:this.config.persistence}),new Vt(this.config.env);throw n.code?new Ke({code:n.code,message:`邮箱登录失败: ${n.message}`}):new Ke({message:"邮箱登录失败"})}async activate(e){return this._request.send("auth.activateEndUserMail",{token:e})}async resetPasswordWithToken(e,t){return this._request.send("auth.resetPasswordWithToken",{token:e,newPassword:t})}}class Yt extends Kt{async signIn(e,t){if("string"!=typeof e)throw new Ke({code:"PARAM_ERROR",message:"username must be a string"});"string"!=typeof t&&(t="",console.warn("password is empty"));const{refreshTokenKey:s}=this._cache.keys,n=await this._request.send("auth.signIn",{loginType:Ut.USERNAME,username:e,password:t,refresh_token:this._cache.getStore(s)||""}),{refresh_token:o,access_token_expire:i,access_token:r}=n;if(o)return this.setRefreshToken(o),r&&i?this.setAccessToken(r,i):await this._request.refreshAccessToken(),await this.refreshUserInfo(),Pt(Ot),Pt(Rt,{env:this.config.env,loginType:Ut.USERNAME,persistence:this.config.persistence}),new Vt(this.config.env);throw n.code?new Ke({code:n.code,message:`用户名密码登录失败: ${n.message}`}):new Ke({message:"用户名密码登录失败"})}}class Qt{constructor(e){this.config=e,this._cache=St(e.env),this._request=Bt(e.env),this._onAnonymousConverted=this._onAnonymousConverted.bind(this),this._onLoginTypeChanged=this._onLoginTypeChanged.bind(this),xt(Rt,this._onLoginTypeChanged)}get currentUser(){const e=this.hasLoginState();return e&&e.user||null}get loginType(){return this._cache.getStore(this._cache.keys.loginTypeKey)}anonymousAuthProvider(){return new Wt(this.config)}customAuthProvider(){return new zt(this.config)}emailAuthProvider(){return new Jt(this.config)}usernameAuthProvider(){return new Yt(this.config)}async signInAnonymously(){return new Wt(this.config).signIn()}async signInWithEmailAndPassword(e,t){return new Jt(this.config).signIn(e,t)}signInWithUsernameAndPassword(e,t){return new Yt(this.config).signIn(e,t)}async linkAndRetrieveDataWithTicket(e){return this._anonymousAuthProvider||(this._anonymousAuthProvider=new Wt(this.config)),xt(Lt,this._onAnonymousConverted),await this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e)}async signOut(){if(this.loginType===Ut.ANONYMOUS)throw new Ke({message:"匿名用户不支持登出操作"});const{refreshTokenKey:e,accessTokenKey:t,accessTokenExpireKey:s}=this._cache.keys,n=this._cache.getStore(e);if(!n)return;const o=await this._request.send("auth.logout",{refresh_token:n});return this._cache.removeStore(e),this._cache.removeStore(t),this._cache.removeStore(s),Pt(Ot),Pt(Rt,{env:this.config.env,loginType:Ut.NULL,persistence:this.config.persistence}),o}async signUpWithEmailAndPassword(e,t){return this._request.send("auth.signUpWithEmailAndPassword",{email:e,password:t})}async sendPasswordResetEmail(e){return this._request.send("auth.sendPasswordResetEmail",{email:e})}onLoginStateChanged(e){xt(Ot,(()=>{const t=this.hasLoginState();e.call(this,t)}));const t=this.hasLoginState();e.call(this,t)}onLoginStateExpired(e){xt(Et,e.bind(this))}onAccessTokenRefreshed(e){xt(Dt,e.bind(this))}onAnonymousConverted(e){xt(Lt,e.bind(this))}onLoginTypeChanged(e){xt(Rt,(()=>{const t=this.hasLoginState();e.call(this,t)}))}async getAccessToken(){return{accessToken:(await this._request.getAccessToken()).accessToken,env:this.config.env}}hasLoginState(){const{refreshTokenKey:e}=this._cache.keys;return this._cache.getStore(e)?new Vt(this.config.env):null}async isUsernameRegistered(e){if("string"!=typeof e)throw new Ke({code:"PARAM_ERROR",message:"username must be a string"});const{data:t}=await this._request.send("auth.isUsernameRegistered",{username:e});return t&&t.isRegistered}getLoginState(){return Promise.resolve(this.hasLoginState())}async signInWithTicket(e){return new zt(this.config).signIn(e)}shouldRefreshAccessToken(e){this._request._shouldRefreshAccessTokenHook=e.bind(this)}getUserInfo(){return this._request.send("auth.getUserInfo",{}).then((e=>e.code?e:{...e.data,requestId:e.seqId}))}getAuthHeader(){const{refreshTokenKey:e,accessTokenKey:t}=this._cache.keys,s=this._cache.getStore(e);return{"x-cloudbase-credentials":this._cache.getStore(t)+"/@@/"+s}}_onAnonymousConverted(e){const{env:t}=e.data;t===this.config.env&&this._cache.updatePersistence(this.config.persistence)}_onLoginTypeChanged(e){const{loginType:t,persistence:s,env:n}=e.data;n===this.config.env&&(this._cache.updatePersistence(s),this._cache.setStore(this._cache.keys.loginTypeKey,t))}}const Gt=function(e,t){t=t||ht();const s=Bt(this.config.env),{cloudPath:n,filePath:o,onUploadProgress:i,fileType:r="image"}=e;return s.send("storage.getUploadMetadata",{path:n}).then((e=>{const{data:{url:a,authorization:c,token:l,fileId:u,cosFileId:d},requestId:h}=e,f={key:n,signature:c,"x-cos-meta-fileid":d,success_action_status:"201","x-cos-security-token":l};s.upload({url:a,data:f,file:o,name:n,fileType:r,onUploadProgress:i}).then((e=>{201===e.statusCode?t(null,{fileID:u,requestId:h}):t(new Ke({code:"STORAGE_REQUEST_FAIL",message:`STORAGE_REQUEST_FAIL: ${e.data}`}))})).catch((e=>{t(e)}))})).catch((e=>{t(e)})),t.promise},Xt=function(e,t){t=t||ht();const s=Bt(this.config.env),{cloudPath:n}=e;return s.send("storage.getUploadMetadata",{path:n}).then((e=>{t(null,e)})).catch((e=>{t(e)})),t.promise},Zt=function({fileList:e},t){if(t=t||ht(),!e||!Array.isArray(e))return{code:"INVALID_PARAM",message:"fileList必须是非空的数组"};for(let n of e)if(!n||"string"!=typeof n)return{code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"};const s={fileid_list:e};return Bt(this.config.env).send("storage.batchDeleteFile",s).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.delete_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},es=function({fileList:e},t){t=t||ht(),e&&Array.isArray(e)||t(null,{code:"INVALID_PARAM",message:"fileList必须是非空的数组"});let s=[];for(let o of e)"object"==typeof o?(o.hasOwnProperty("fileID")&&o.hasOwnProperty("maxAge")||t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是包含fileID和maxAge的对象"}),s.push({fileid:o.fileID,max_age:o.maxAge})):"string"==typeof o?s.push({fileid:o}):t(null,{code:"INVALID_PARAM",message:"fileList的元素必须是字符串"});const n={file_list:s};return Bt(this.config.env).send("storage.batchGetDownloadUrl",n).then((e=>{e.code?t(null,e):t(null,{fileList:e.data.download_list,requestId:e.requestId})})).catch((e=>{t(e)})),t.promise},ts=async function({fileID:e},t){const s=(await es.call(this,{fileList:[{fileID:e,maxAge:600}]})).fileList[0];if("SUCCESS"!==s.code)return t?t(s):new Promise((e=>{e(s)}));const n=Bt(this.config.env);let o=s.download_url;if(o=encodeURI(o),!t)return n.download({url:o});t(await n.download({url:o}))},ss=function({name:e,data:t,query:s,parse:n,search:o},i){const r=i||ht();let a;try{a=t?JSON.stringify(t):""}catch(l){return Promise.reject(l)}if(!e)return Promise.reject(new Ke({code:"PARAM_ERROR",message:"函数名不能为空"}));const c={inQuery:s,parse:n,search:o,function_name:e,request_data:a};return Bt(this.config.env).send("functions.invokeFunction",c).then((e=>{if(e.code)r(null,e);else{let s=e.data.response_data;if(n)r(null,{result:s,requestId:e.requestId});else try{s=JSON.parse(e.data.response_data),r(null,{result:s,requestId:e.requestId})}catch(t){r(new Ke({message:"response data must be json"}))}}return r.promise})).catch((e=>{r(e)})),r.promise},ns={timeout:15e3,persistence:"session"},os={};class is{constructor(e){this.config=e||this.config,this.authObj=void 0}init(e){switch(gt.adapter||(this.requestClient=new gt.adapter.reqClass({timeout:e.timeout||5e3,timeoutMsg:`请求在${(e.timeout||5e3)/1e3}s内未完成,已中断`})),this.config={...ns,...e},!0){case this.config.timeout>6e5:console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"),this.config.timeout=6e5;break;case this.config.timeout<100:console.warn("timeout小于可配置下限[100ms],已重置为下限数值"),this.config.timeout=100}return new is(this.config)}auth({persistence:e}={}){if(this.authObj)return this.authObj;const t=e||gt.adapter.primaryStorage||ns.persistence;var s;return t!==this.config.persistence&&(this.config.persistence=t),function(e){const{env:t}=e;bt[t]=new kt(e),vt[t]=new kt({...e,persistence:"local"})}(this.config),s=this.config,jt[s.env]=new qt(s),this.authObj=new Qt(this.config),this.authObj}on(e,t){return xt.apply(this,[e,t])}off(e,t){return Ct.apply(this,[e,t])}callFunction(e,t){return ss.apply(this,[e,t])}deleteFile(e,t){return Zt.apply(this,[e,t])}getTempFileURL(e,t){return es.apply(this,[e,t])}downloadFile(e,t){return ts.apply(this,[e,t])}uploadFile(e,t){return Gt.apply(this,[e,t])}getUploadMetadata(e,t){return Xt.apply(this,[e,t])}registerExtension(e){os[e.name]=e}async invokeExtension(e,t){const s=os[e];if(!s)throw new Ke({message:`扩展${e} 必须先注册`});return await s.invoke(t,this)}useAdapters(e){const{adapter:t,runtime:s}=function(e){const t=(s=e,"[object Array]"===Object.prototype.toString.call(s)?e:[e]);var s;for(const n of t){const{isMatch:e,genAdapter:t,runtime:s}=n;if(e())return{adapter:t(),runtime:s}}}(e)||{};t&&(gt.adapter=t),s&&(gt.runtime=s)}}var rs=new is;function as(e,t,s){void 0===s&&(s={});var n=/\?/.test(t),o="";for(var i in s)""===o?!n&&(t+="?"):o+="&",o+=i+"="+encodeURIComponent(s[i]);return/^http(s)?:\/\//.test(t+=o)?t:""+e+t}class cs{post(e){const{url:t,data:s,headers:n}=e;return new Promise(((e,o)=>{He.request({url:as("https:",t),data:s,method:"POST",header:n,success(t){e(t)},fail(e){o(e)}})}))}upload(e){return new Promise(((t,s)=>{const{url:n,file:o,data:i,headers:r,fileType:a}=e,c=He.uploadFile({url:as("https:",n),name:"file",formData:Object.assign({},i),filePath:o,fileType:a,header:r,success(e){const s={statusCode:e.statusCode,data:e.data||{}};200===e.statusCode&&i.success_action_status&&(s.statusCode=parseInt(i.success_action_status,10)),t(s)},fail(e){s(new Error(e.errMsg||"uploadFile:fail"))}});"function"==typeof e.onUploadProgress&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((t=>{e.onUploadProgress({loaded:t.totalBytesSent,total:t.totalBytesExpectedToSend})}))}))}}const ls={setItem(e,t){He.setStorageSync(e,t)},getItem:e=>He.getStorageSync(e),removeItem(e){He.removeStorageSync(e)},clear(){He.clearStorageSync()}};var us={genAdapter:function(){return{root:{},reqClass:cs,localStorage:ls,primaryStorage:"local"}},isMatch:function(){return!0},runtime:"uni_app"};rs.useAdapters(us);const ds=rs,hs=ds.init;ds.init=function(e){e.env=e.spaceId;const t=hs.call(this,e);t.config.provider="tencent",t.config.spaceId=e.spaceId;const s=t.auth;return t.auth=function(e){const t=s.call(this,e);return["linkAndRetrieveDataWithTicket","signInAnonymously","signOut","getAccessToken","getLoginState","signInWithTicket","getUserInfo"].forEach((e=>{var s;t[e]=(s=t[e],function(e){e=e||{};const{success:t,fail:n,complete:o}=Be(e);if(!(t||n||o))return s.call(this,e);s.call(this,e).then((e=>{t&&t(e),o&&o(e)}),(e=>{n&&n(e),o&&o(e)}))}).bind(t)})),t},t.customAuth=t.auth,t};var fs=ds,ps=class extends nt{getAccessToken(){return new Promise(((e,t)=>{const s="Anonymous_Access_token";this.setAccessToken(s),e(s)}))}setupRequest(e,t){const s=Object.assign({},e,{spaceId:this.config.spaceId,timestamp:Date.now()}),n={"Content-Type":"application/json"};"auth"!==t&&(s.token=this.accessToken,n["x-basement-token"]=this.accessToken),n["x-serverless-sign"]=et(s,this.config.clientSecret);const o=Ze();n["x-client-info"]=encodeURIComponent(JSON.stringify(o));const{token:i}=We();return n["x-client-token"]=i,{url:this.config.requestUrl,method:"POST",data:s,dataType:"json",header:JSON.parse(JSON.stringify(n))}}uploadFileToOSS({url:e,formData:t,name:s,filePath:n,fileType:o,onUploadProgress:i}){return new Promise(((r,a)=>{const c=this.adapter.uploadFile({url:e,formData:t,name:s,filePath:n,fileType:o,success(e){e&&e.statusCode<400?r(e):a(new Ke({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){a(new Ke({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof i&&c&&"function"==typeof c.onProgressUpdate&&c.onProgressUpdate((e=>{i({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}uploadFile({filePath:e,cloudPath:t,fileType:s="image",onUploadProgress:n}){if(!t)throw new Ke({code:"CLOUDPATH_REQUIRED",message:"cloudPath不可为空"});let o;return this.getOSSUploadOptionsFromPath({cloudPath:t}).then((t=>{const{url:i,formData:r,name:a}=t.result;o=t.result.fileUrl;const c={url:i,formData:r,name:a,filePath:e,fileType:s};return this.uploadFileToOSS(Object.assign({},c,{onUploadProgress:n}))})).then((()=>this.reportOSSUpload({cloudPath:t}))).then((t=>new Promise(((s,n)=>{t.success?s({success:!0,filePath:e,fileID:o}):n(new Ke({code:"UPLOAD_FAILED",message:"文件上传失败"}))}))))}deleteFile({fileList:e}){const t={method:"serverless.file.resource.delete",params:JSON.stringify({fileList:e})};return this.request(this.setupRequest(t)).then((e=>{if(e.success)return e.result;throw new Ke({code:"DELETE_FILE_FAILED",message:"删除文件失败"})}))}getTempFileURL({fileList:e,maxAge:t}={}){if(!Array.isArray(e)||0===e.length)throw new Ke({code:"INVALID_PARAM",message:"fileList的元素必须是非空的字符串"});const s={method:"serverless.file.resource.getTempFileURL",params:JSON.stringify({fileList:e,maxAge:t})};return this.request(this.setupRequest(s)).then((e=>{if(e.success)return{fileList:e.result.fileList.map((e=>({fileID:e.fileID,tempFileURL:e.tempFileURL})))};throw new Ke({code:"GET_TEMP_FILE_URL_FAILED",message:"获取临时文件链接失败"})}))}},ms={init(e){const t=new ps(e),s={signInAnonymously:function(){return t.authorize()},getLoginState:function(){return Promise.resolve(!1)}};return t.auth=function(){return s},t.customAuth=t.auth,t}},gs=Z((function(e,t){e.exports=te.enc.Hex}));function ys(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function _s(e="",t={}){const{data:s,functionName:n,method:o,headers:i,signHeaderKeys:r=[],config:a}=t,c=Date.now(),l=ys(),u=Object.assign({},i,{"x-from-app-id":a.spaceAppId,"x-from-env-id":a.spaceId,"x-to-env-id":a.spaceId,"x-from-instance-id":c,"x-from-function-name":n,"x-client-timestamp":c,"x-alipay-source":"client","x-request-id":l,"x-alipay-callid":l,"x-trace-id":l}),d=["x-from-app-id","x-from-env-id","x-to-env-id","x-from-instance-id","x-from-function-name","x-client-timestamp"].concat(r),[h="",f=""]=e.split("?")||[],p=function(e){const t=e.signedHeaders.join(";"),s=e.signedHeaders.map((t=>`${t.toLowerCase()}:${e.headers[t]}\n`)).join(""),n=ut(e.body).toString(gs),o=`${e.method.toUpperCase()}\n${e.path}\n${e.query}\n${s}\n${t}\n${n}\n`,i=ut(o).toString(gs),r=`HMAC-SHA256\n${e.timestamp}\n${i}\n`,a=dt(r,e.secretKey).toString(gs);return`HMAC-SHA256 Credential=${e.secretId}, SignedHeaders=${t}, Signature=${a}`}({path:h,query:f,method:o,headers:u,timestamp:c,body:JSON.stringify(s),secretId:a.accessKey,secretKey:a.secretKey,signedHeaders:d.sort()});return{url:`${a.endpoint}${e}`,headers:Object.assign({},u,{Authorization:p})}}function ws({url:e,data:t,method:s="POST",headers:n={}}){return new Promise(((o,i)=>{He.request({url:e,method:s,data:"object"==typeof t?JSON.stringify(t):t,header:n,dataType:"json",complete:(e={})=>{const t=n["x-trace-id"]||"";if(!e.statusCode||e.statusCode>=400){const{message:s,errMsg:n,trace_id:o}=e.data||{};return i(new Ke({code:"SYS_ERR",message:s||n||"request:fail",requestId:o||t}))}o({status:e.statusCode,data:e.data,headers:e.header,requestId:t})}})}))}function ks(e,t){const{path:s,data:n,method:o="GET"}=e,{url:i,headers:r}=_s(s,{functionName:"",data:n,method:o,headers:{"x-alipay-cloud-mode":"oss","x-data-api-type":"oss","x-expire-timestamp":Date.now()+6e4},signHeaderKeys:["x-data-api-type","x-expire-timestamp"],config:t});return ws({url:i,data:n,method:o,headers:r}).then((e=>{const t=e.data||{};if(!t.success)throw new Ke({code:e.errCode,message:e.errMsg,requestId:e.requestId});return t.data||{}})).catch((e=>{throw new Ke({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}function bs(e=""){const t=e.trim().replace(/^cloud:\/\//,""),s=t.indexOf("/");if(s<=0)throw new Ke({code:"INVALID_PARAM",message:"fileID不合法"});const n=t.substring(0,s),o=t.substring(s+1);return n!==this.config.spaceId&&console.warn("file ".concat(e," does not belong to env ").concat(this.config.spaceId)),o}function vs(e=""){return"cloud://".concat(this.config.spaceId,"/").concat(e.replace(/^\/+/,""))}class Ss{constructor(e){this.config=e}signedURL(e,t={}){const s=`/ws/function/${e}`,n=this.config.wsEndpoint.replace(/^ws(s)?:\/\//,""),o=Object.assign({},t,{accessKeyId:this.config.accessKey,signatureNonce:ys(),timestamp:""+Date.now()}),i=[s,["accessKeyId","authorization","signatureNonce","timestamp"].sort().map((function(e){return o[e]?"".concat(e,"=").concat(o[e]):null})).filter(Boolean).join("&"),`host:${n}`].join("\n"),r=["HMAC-SHA256",ut(i).toString(gs)].join("\n"),a=dt(r,this.config.secretKey).toString(gs),c=Object.keys(o).map((e=>`${e}=${encodeURIComponent(o[e])}`)).join("&");return`${this.config.wsEndpoint}${s}?${c}&signature=${a}`}}var Is={init:e=>{e.provider="alipay";const t=new class{constructor(e){if(["spaceId","spaceAppId","accessKey","secretKey"].forEach((t=>{if(!Object.prototype.hasOwnProperty.call(e,t))throw new Error(`${t} required`)})),e.endpoint){if("string"!=typeof e.endpoint)throw new Error("endpoint must be string");if(!/^https:\/\//.test(e.endpoint))throw new Error("endpoint must start with https://");e.endpoint=e.endpoint.replace(/\/$/,"")}this.config=Object.assign({},e,{endpoint:e.endpoint||`https://${e.spaceId}.api-hz.cloudbasefunction.cn`,wsEndpoint:e.wsEndpoint||`wss://${e.spaceId}.api-hz.cloudbasefunction.cn`}),this._websocket=new Ss(this.config)}callFunction(e){return function(e,t){const{name:s,data:n,async:o=!1}=e,i="POST",r={"x-to-function-name":s};o&&(r["x-function-invoke-type"]="async");const{url:a,headers:c}=_s("/functions/invokeFunction",{functionName:s,data:n,method:i,headers:r,signHeaderKeys:["x-to-function-name"],config:t});return ws({url:a,data:n,method:i,headers:c}).then((e=>{let t=0;if(o){const s=e.data||{};t="200"===s.errCode?0:s.errCode,e.data=s.data||{},e.errMsg=s.errMsg}if(0!==t)throw new Ke({code:t,message:e.errMsg,requestId:e.requestId});return{errCode:t,success:0===t,requestId:e.requestId,result:e.data}})).catch((e=>{throw new Ke({code:e.errCode,message:e.errMsg,requestId:e.requestId})}))}(e,this.config)}uploadFileToOSS({url:e,filePath:t,fileType:s,formData:n,onUploadProgress:o}){return new Promise(((i,r)=>{const a=He.uploadFile({url:e,filePath:t,fileType:s,formData:n,name:"file",success(e){e&&e.statusCode<400?i(e):r(new Ke({code:"UPLOAD_FAILED",message:"文件上传失败"}))},fail(e){r(new Ke({code:e.code||"UPLOAD_FAILED",message:e.message||e.errMsg||"文件上传失败"}))}});"function"==typeof o&&a&&"function"==typeof a.onProgressUpdate&&a.onProgressUpdate((e=>{o({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend})}))}))}async uploadFile({filePath:e,cloudPath:t="",fileType:s="image",onUploadProgress:n}){if("string"!==ce(t))throw new Ke({code:"INVALID_PARAM",message:"cloudPath必须为字符串类型"});if(!(t=t.trim()))throw new Ke({code:"INVALID_PARAM",message:"cloudPath不可为空"});if(/:\/\//.test(t))throw new Ke({code:"INVALID_PARAM",message:"cloudPath不合法"});const o=await ks({path:"/".concat(t.replace(/^\//,""),"?post_url")},this.config),{file_id:i,upload_url:r,form_data:a}=o,c=a&&a.reduce(((e,t)=>(e[t.key]=t.value,e)),{});return this.uploadFileToOSS({url:r,filePath:e,fileType:s,formData:c,onUploadProgress:n}).then((()=>({fileID:i})))}async getTempFileURL({fileList:e}){return new Promise(((t,s)=>{(!e||e.length<0)&&s(new Ke({errCode:"INVALID_PARAM",errMsg:"fileList不能为空数组"})),e.length>50&&s(new Ke({errCode:"INVALID_PARAM",errMsg:"fileList数组长度不能超过50"}));const n=[];for(const o of e){"string"!==ce(o)&&s(new Ke({errCode:"INVALID_PARAM",errMsg:"fileList的元素必须是非空的字符串"}));const e=bs.call(this,o);n.push({file_id:e,expire:600})}ks({path:"/?download_url",data:{file_list:n},method:"POST"},this.config).then((e=>{const{file_list:s=[]}=e;t({fileList:s.map((e=>({fileID:vs.call(this,e.file_id),tempFileURL:e.download_url})))})})).catch((e=>s(e)))}))}async connectWebSocket(e){const{name:t,query:s}=e;return He.connectSocket({url:this._websocket.signedURL(t,s),complete:()=>{}})}}(e);return t.auth=function(){return{signInAnonymously:function(){return Promise.resolve()},getLoginState:function(){return Promise.resolve(!0)}}},t}};function Ts({data:e}){let t;t=Ze();const s=JSON.parse(JSON.stringify(e||{}));if(Object.assign(s,{clientInfo:t}),!s.uniIdToken){const{token:e}=We();e&&(s.uniIdToken=e)}return s}const As=[{rule:/fc_function_not_found|FUNCTION_NOT_FOUND/,content:",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",mode:"append"}];var xs=/[\\^$.*+?()[\]{}|]/g,Ps=RegExp(xs.source);function Cs(e,t,s){return e.replace(new RegExp((n=t)&&Ps.test(n)?n.replace(xs,"\\$&"):n,"g"),s);var n}const Os=2e4,Es={code:20101,message:"Invalid client"};function Rs(e){const{errSubject:t,subject:s,errCode:n,errMsg:o,code:i,message:r,cause:a}=e||{};return new Ke({subject:t||s||"uni-secure-network",code:n||i||Os,message:o||r,cause:a})}let Ls;function Ds({secretType:e}={}){return"request"===e||"response"===e||"both"===e}function Us({functionName:e,result:t,logPvd:s}){}function Ns(e){const t=e.callFunction,s=function(s){const n=s.name;s.data=Ts.call(e,{data:s.data});const o={aliyun:"aliyun",tencent:"tcb",tcb:"tcb",alipay:"alipay"}[this.config.provider],i=Ds(s)||false;return t.call(this,s).then((e=>(e.errCode=0,!i&&Us.call(this,{functionName:n,result:e,logPvd:o}),Promise.resolve(e))),(e=>(!i&&Us.call(this,{functionName:n,result:e,logPvd:o}),e&&e.message&&(e.message=function({message:e="",extraInfo:t={},formatter:s=[]}={}){for(let n=0;ns.provider===e&&s.spaceId===t));return n&&n.config}({provider:e,spaceId:t});if(!a||!a.accessControl||!a.accessControl.enable)return!1;const c=a.accessControl.function||{},l=Object.keys(c);if(0===l.length)return!0;const u=function(e,t){let s,n,o;for(let i=0;ie.trim())).indexOf(t)>-1&&(n=r):o=r:s=r}return s||n||o}(l,s);if(!u)return!1;if((c[u]||[]).find(((e={})=>e.appId===n&&(e.platform||"").toLowerCase()===r.toLowerCase())))return!0;throw console.error(`此应用[appId: ${n}, platform: ${r}]不在云端配置的允许访问的应用列表内,参考:https://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client`),Rs(Es)}({provider:n,spaceId:o,functionName:i})?new Ls({secretType:t.secretType,uniCloudIns:e}).wrapVerifyClientCallFunction(s.bind(e))(t):r(t),Object.defineProperty(a,"result",{get:()=>(console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"),{})}),a.then((e=>("undefined"!=typeof UTSJSONObject&&(e.result=new UTSJSONObject(e.result)),e)))}}Ls=class{constructor(){throw Rs({message:"Platform web is not supported by secure network"})}};const Ms=Symbol("CLIENT_DB_INTERNAL");function Fs(e,t){return e.then="DoNotReturnProxyWithAFunctionNamedThen",e._internalType=Ms,e.inspect=null,e.__v_raw=void 0,new Proxy(e,{get(e,s,n){if("_uniClient"===s)return null;if("symbol"==typeof s)return e[s];if(s in e||"string"!=typeof s){const t=e[s];return"function"==typeof t?t.bind(e):t}return t.get(e,s,n)}})}function $s(e){return{on:(t,s)=>{e[t]=e[t]||[],e[t].indexOf(s)>-1||e[t].push(s)},off:(t,s)=>{e[t]=e[t]||[];const n=e[t].indexOf(s);-1!==n&&e[t].splice(n,1)}}}const qs=["db.Geo","db.command","command.aggregate"];function js(e,t){return qs.indexOf(`${e}.${t}`)>-1}function Bs(e){switch(ce(e=Ve(e))){case"array":return e.map((e=>Bs(e)));case"object":return e._internalType===Ms||Object.keys(e).forEach((t=>{e[t]=Bs(e[t])})),e;case"regexp":return{$regexp:{source:e.source,flags:e.flags}};case"date":return{$date:e.toISOString()};default:return e}}function Ks(e){return e&&e.content&&e.content.$method}class Hs{constructor(e,t,s){this.content=e,this.prevStage=t||null,this.udb=null,this._database=s}toJSON(){let e=this;const t=[e.content];for(;e.prevStage;)e=e.prevStage,t.push(e.content);return{$db:t.reverse().map((e=>({$method:e.$method,$param:Bs(e.$param)})))}}toString(){return JSON.stringify(this.toJSON())}getAction(){const e=this.toJSON().$db.find((e=>"action"===e.$method));return e&&e.$param&&e.$param[0]}getCommand(){return{$db:this.toJSON().$db.filter((e=>"action"!==e.$method))}}get isAggregate(){let e=this;for(;e;){const t=Ks(e),s=Ks(e.prevStage);if("aggregate"===t&&"collection"===s||"pipeline"===t)return!0;e=e.prevStage}return!1}get isCommand(){let e=this;for(;e;){if("command"===Ks(e))return!0;e=e.prevStage}return!1}get isAggregateCommand(){let e=this;for(;e;){const t=Ks(e),s=Ks(e.prevStage);if("aggregate"===t&&"command"===s)return!0;e=e.prevStage}return!1}getNextStageFn(e){const t=this;return function(){return Vs({$method:e,$param:Bs(Array.from(arguments))},t,t._database)}}get count(){return this.isAggregate?this.getNextStageFn("count"):function(){return this._send("count",Array.from(arguments))}}get remove(){return this.isCommand?this.getNextStageFn("remove"):function(){return this._send("remove",Array.from(arguments))}}get(){return this._send("get",Array.from(arguments))}get add(){return this.isCommand?this.getNextStageFn("add"):function(){return this._send("add",Array.from(arguments))}}update(){return this._send("update",Array.from(arguments))}end(){return this._send("end",Array.from(arguments))}get set(){return this.isCommand?this.getNextStageFn("set"):function(){throw new Error("JQL禁止使用set方法")}}_send(e,t){const s=this.getAction(),n=this.getCommand();return n.$db.push({$method:e,$param:Bs(t)}),this._database._callCloudFunction({action:s,command:n})}}function Vs(e,t,s){return Fs(new Hs(e,t,s),{get(e,t){let n="db";return e&&e.content&&(n=e.content.$method),js(n,t)?Vs({$method:t},e,s):function(){return Vs({$method:t,$param:Bs(Array.from(arguments))},e,s)}}})}function Ws({path:e,method:t}){return class{constructor(){this.param=Array.from(arguments)}toJSON(){return{$newDb:[...e.map((e=>({$method:e}))),{$method:t,$param:this.param}]}}toString(){return JSON.stringify(this.toJSON())}}}function zs(e,t={}){return Fs(new e(t),{get:(e,t)=>js("db",t)?Vs({$method:t},null,e):function(){return Vs({$method:t,$param:Bs(Array.from(arguments))},null,e)}})}class Js extends class{constructor({uniClient:e={},isJQL:t=!1}={}){this._uniClient=e,this._authCallBacks={},this._dbCallBacks={},e._isDefault&&(this._dbCallBacks=ke("_globalUniCloudDatabaseCallback")),t||(this.auth=$s(this._authCallBacks)),this._isJQL=t,Object.assign(this,$s(this._dbCallBacks)),this.env=Fs({},{get:(e,t)=>({$env:t})}),this.Geo=Fs({},{get:(e,t)=>Ws({path:["Geo"],method:t})}),this.serverDate=Ws({path:[],method:"serverDate"}),this.RegExp=Ws({path:[],method:"RegExp"})}getCloudEnv(e){if("string"!=typeof e||!e.trim())throw new Error("getCloudEnv参数错误");return{$env:e.replace("$cloudEnv_","")}}_callback(e,t){const s=this._dbCallBacks;s[e]&&s[e].forEach((e=>{e(...t)}))}_callbackAuth(e,t){const s=this._authCallBacks;s[e]&&s[e].forEach((e=>{e(...t)}))}multiSend(){const e=Array.from(arguments),t=e.map((e=>{const t=e.getAction(),s=e.getCommand();if("getTemp"!==s.$db[s.$db.length-1].$method)throw new Error("multiSend只支持子命令内使用getTemp");return{action:t,command:s}}));return this._callCloudFunction({multiCommand:t,queryList:e})}}{_parseResult(e){return this._isJQL?e.result:e}_callCloudFunction({action:e,command:t,multiCommand:s,queryList:n}){function o(e,t){if(s&&n)for(let s=0;sTe(Ae(r,"complete"),e))).then((()=>(o(null,e),Fe(Ce,{type:Re,content:e}),Promise.reject(e))))}const c=Te(Ae(r,"invoke")),l=this._uniClient;return c.then((()=>l.callFunction({name:"DCloud-clientDB",type:"CLIENT_DB",data:{action:e,command:t,multiCommand:s}}))).then((e=>{const{code:t,message:s,token:n,tokenExpired:c,systemInfo:l=[]}=e.result;if(l)for(let o=0;o(console.warn(s),n)})}}return d=e,Te(Ae(r,"success"),d).then((()=>Te(Ae(r,"complete"),d))).then((()=>{o(d,null);const e=i._parseResult(d);return Fe(Ce,{type:Re,content:e}),Promise.resolve(e)}));var d}),(e=>(/fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message)&&console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB"),a(new Ke({code:e.code||"SYSTEM_ERROR",message:e.message,requestId:e.requestId})))))}}const Ys="token无效,跳转登录页面",Qs="token过期,跳转登录页面",Gs={TOKEN_INVALID_TOKEN_EXPIRED:Qs,TOKEN_INVALID_INVALID_CLIENTID:Ys,TOKEN_INVALID:Ys,TOKEN_INVALID_WRONG_TOKEN:Ys,TOKEN_INVALID_ANONYMOUS_USER:Ys},Xs={"uni-id-token-expired":Qs,"uni-id-check-token-failed":Ys,"uni-id-token-not-exist":Ys,"uni-id-check-device-feature-failed":Ys};function Zs(e,t){let s="";return s=e?`${e}/${t}`:t,s.replace(/^\//,"")}function en(e=[],t=""){const s=[],n=[];return e.forEach((e=>{!0===e.needLogin?s.push(Zs(t,e.path)):!1===e.needLogin&&n.push(Zs(t,e.path))})),{needLoginPage:s,notNeedLoginPage:n}}function tn(e){return e.split("?")[0].replace(/^\//,"")}function sn(){return function(e){let t=e&&e.$page&&e.$page.fullPath||"";return t?("/"!==t.charAt(0)&&(t="/"+t),t):t}(function(){const e=s();return e[e.length-1]}())}function nn(){return tn(sn())}function on(e="",t={}){if(!e)return!1;if(!(t&&t.list&&t.list.length))return!1;const s=t.list,n=tn(e);return s.some((e=>e.pagePath===n))}const rn=!!X.uniIdRouter,{loginPage:an,routerNeedLogin:cn,resToLogin:ln,needLoginPage:un,notNeedLoginPage:dn,loginPageInTabBar:hn}=function({pages:e=[],subPackages:t=[],uniIdRouter:s={},tabBar:n={}}=X){const{loginPage:o,needLogin:i=[],resToLogin:r=!0}=s,{needLoginPage:a,notNeedLoginPage:c}=en(e),{needLoginPage:l,notNeedLoginPage:u}=function(e=[]){const t=[],s=[];return e.forEach((e=>{const{root:n,pages:o=[]}=e,{needLoginPage:i,notNeedLoginPage:r}=en(o,n);t.push(...i),s.push(...r)})),{needLoginPage:t,notNeedLoginPage:s}}(t);return{loginPage:o,routerNeedLogin:i,resToLogin:r,needLoginPage:[...a,...l],notNeedLoginPage:[...c,...u],loginPageInTabBar:on(o,n)}}();if(un.indexOf(an)>-1)throw new Error(`Login page [${an}] should not be "needLogin", please check your pages.json`);function fn(e){const t=nn();if("/"===e.charAt(0))return e;const[s,n]=e.split("?"),o=s.replace(/^\//,"").split("/"),i=t.split("/");i.pop();for(let r=0;r-1?n+`&uniIdRedirectUrl=${encodeURIComponent(o)}`:n+`?uniIdRedirectUrl=${encodeURIComponent(o)}`:n);var n,o;hn?"navigateTo"!==e&&"redirectTo"!==e||(e="switchTab"):"switchTab"===e&&(e="navigateTo");const i={navigateTo:w,redirectTo:k,switchTab:b,reLaunch:v};setTimeout((()=>{i[e]({url:s})}),0)}function gn({url:e}={}){const t={abortLoginPageJump:!1,autoToLoginPage:!1},s=function(){const{token:e,tokenExpired:t}=We();let s;if(e){if(t-1)&&(un.indexOf(t)>-1||cn.some((t=>{return s=e,new RegExp(t).test(s);var s})))}(e)&&s){if(s.uniIdRedirectUrl=e,Ue(Oe).length>0)return setTimeout((()=>{Fe(Oe,s)}),0),t.abortLoginPageJump=!0,t;t.autoToLoginPage=!0}return t}function yn(){!function(){const e=sn(),{abortLoginPageJump:t,autoToLoginPage:s}=gn({url:e});t||s&&mn({api:"redirectTo",redirect:e})}();const e=["navigateTo","redirectTo","reLaunch","switchTab"];for(let t=0;t{const{type:t,content:s}=e;let n=!1;switch(t){case"cloudobject":n=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in Xs}(s);break;case"clientdb":n=function(e){if("object"!=typeof e)return!1;const{errCode:t}=e||{};return t in Gs}(s)}n&&function(e={}){const t=Ue(Oe);je().then((()=>{const s=sn();if(s&&pn({redirect:s}))return t.length>0?Fe(Oe,Object.assign({uniIdRedirectUrl:s},e)):void(an&&mn({api:"navigateTo",redirect:s}))}))}(s)}))}function wn(e){var t;(t=e).onResponse=function(e){Ne(Ce,e)},t.offResponse=function(e){Me(Ce,e)},function(e){e.onNeedLogin=function(e){Ne(Oe,e)},e.offNeedLogin=function(e){Me(Oe,e)},rn&&(ke("_globalUniCloudStatus").needLoginInit||(ke("_globalUniCloudStatus").needLoginInit=!0,je().then((()=>{yn.call(e)})),ln&&_n.call(e)))}(e),function(e){e.onRefreshToken=function(e){Ne(Ee,e)},e.offRefreshToken=function(e){Me(Ee,e)}}(e)}let kn;const bn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",vn=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;function Sn(){const e=We().token||"",t=e.split(".");if(!e||3!==t.length)return{uid:null,role:[],permission:[],tokenExpired:0};let s;try{s=JSON.parse((n=t[1],decodeURIComponent(kn(n).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(o){throw new Error("获取当前用户信息出错,详细错误信息为:"+o.message)}var n;return s.tokenExpired=1e3*s.exp,delete s.exp,delete s.iat,s}kn="function"!=typeof atob?function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!vn.test(e))throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var s,n,o="",i=0;i>16&255):64===n?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}:atob;var In=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Z((function(s,n){Object.defineProperty(n,"__esModule",{value:!0});const i="chooseAndUploadFile:ok",r="chooseAndUploadFile:fail";function a(e,t){return e.tempFiles.forEach(((e,s)=>{e.name||(e.name=e.path.substring(e.path.lastIndexOf("/")+1)),t&&(e.fileType=t),e.cloudPath=Date.now()+"_"+s+e.name.substring(e.name.lastIndexOf("."))})),e.tempFilePaths||(e.tempFilePaths=e.tempFiles.map((e=>e.path))),e}function c(e,t,{onChooseFile:s,onUploadProgress:n}){return t.then((e=>{if(s){const t=s(e);if(void 0!==t)return Promise.resolve(t).then((t=>void 0===t?e:t))}return e})).then((t=>!1===t?{errMsg:i,tempFilePaths:[],tempFiles:[]}:function(e,t,s=5,n){(t=Object.assign({},t)).errMsg=i;const o=t.tempFiles,r=o.length;let a=0;return new Promise((i=>{for(;a=r)return void(!o.find((e=>!e.url&&!e.errMsg))&&i(t));const l=o[s];e.uploadFile({provider:l.provider,filePath:l.path,cloudPath:l.cloudPath,fileType:l.fileType,cloudPathAsRealPath:l.cloudPathAsRealPath,onUploadProgress(e){e.index=s,e.tempFile=l,e.tempFilePath=l.path,n&&n(e)}}).then((e=>{l.url=e.fileID,s{l.errMsg=e.errMsg||e.message,s{e({count:s,sizeType:n,sourceType:o,extension:i,success(e){t(a(e,"image"))},fail(e){c({errMsg:e.errMsg.replace("chooseImage:fail",r)})}})}))}(n),n):"video"===n.type?c(s,function(e){const{camera:s,compressed:n,maxDuration:o,sourceType:i=["album","camera"],extension:c}=e;return new Promise(((e,l)=>{t({camera:s,compressed:n,maxDuration:o,sourceType:i,extension:c,success(t){const{tempFilePath:s,duration:n,size:o,height:i,width:r}=t;e(a({errMsg:"chooseVideo:ok",tempFilePaths:[s],tempFiles:[{name:t.tempFile&&t.tempFile.name||"",path:s,size:o,type:t.tempFile&&t.tempFile.type||"",width:r,height:i,duration:n,fileType:"video",cloudPath:""}]},"video"))},fail(e){l({errMsg:e.errMsg.replace("chooseVideo:fail",r)})}})}))}(n),n):c(s,function(e){const{count:t,extension:s}=e;return new Promise(((e,n)=>{let i=o;if("undefined"!=typeof wx&&"function"==typeof wx.chooseMessageFile&&(i=wx.chooseMessageFile),"function"!=typeof i)return n({errMsg:r+" 请指定 type 类型,该平台仅支持选择 image 或 video。"});i({type:"all",count:t,extension:s,success(t){e(a(t))},fail(e){n({errMsg:e.errMsg.replace("chooseFile:fail",r)})}})}))}(n),n)}}})));function Tn(e){return{props:{localdata:{type:Array,default:()=>[]},options:{type:[Object,Array],default:()=>({})},spaceInfo:{type:Object,default:()=>({})},collection:{type:[String,Array],default:""},action:{type:String,default:""},field:{type:String,default:""},orderby:{type:String,default:""},where:{type:[String,Object],default:""},pageData:{type:String,default:"add"},pageCurrent:{type:Number,default:1},pageSize:{type:Number,default:20},getcount:{type:[Boolean,String],default:!1},gettree:{type:[Boolean,String],default:!1},gettreepath:{type:[Boolean,String],default:!1},startwith:{type:String,default:""},limitlevel:{type:Number,default:10},groupby:{type:String,default:""},groupField:{type:String,default:""},distinct:{type:[Boolean,String],default:!1},foreignKey:{type:String,default:""},loadtime:{type:String,default:"auto"},manual:{type:Boolean,default:!1}},data:()=>({mixinDatacomLoading:!1,mixinDatacomHasMore:!1,mixinDatacomResData:[],mixinDatacomErrorMessage:"",mixinDatacomPage:{},mixinDatacomError:null}),created(){this.mixinDatacomPage={current:this.pageCurrent,size:this.pageSize,count:0},this.$watch((()=>{var e=[];return["pageCurrent","pageSize","localdata","collection","action","field","orderby","where","getont","getcount","gettree","groupby","groupField","distinct"].forEach((t=>{e.push(this[t])})),e}),((e,t)=>{if("manual"===this.loadtime)return;let s=!1;const n=[];for(let o=2;o{this.mixinDatacomLoading=!1;const{data:n,count:o}=s.result;this.getcount&&(this.mixinDatacomPage.count=o),this.mixinDatacomHasMore=n.length{this.mixinDatacomLoading=!1,this.mixinDatacomErrorMessage=e,this.mixinDatacomError=e,s&&s(e)})))},mixinDatacomGet(t={}){let s;t=t||{},s="undefined"!=typeof __uniX&&__uniX?e.databaseForJQL(this.spaceInfo):e.database(this.spaceInfo);const n=t.action||this.action;n&&(s=s.action(n));const o=t.collection||this.collection;s=Array.isArray(o)?s.collection(...o):s.collection(o);const i=t.where||this.where;i&&Object.keys(i).length&&(s=s.where(i));const r=t.field||this.field;r&&(s=s.field(r));const a=t.foreignKey||this.foreignKey;a&&(s=s.foreignKey(a));const c=t.groupby||this.groupby;c&&(s=s.groupBy(c));const l=t.groupField||this.groupField;l&&(s=s.groupField(l)),!0===(void 0!==t.distinct?t.distinct:this.distinct)&&(s=s.distinct());const u=t.orderby||this.orderby;u&&(s=s.orderBy(u));const d=void 0!==t.pageCurrent?t.pageCurrent:this.mixinDatacomPage.current,h=void 0!==t.pageSize?t.pageSize:this.mixinDatacomPage.size,f=void 0!==t.getcount?t.getcount:this.getcount,p=void 0!==t.gettree?t.gettree:this.gettree,m=void 0!==t.gettreepath?t.gettreepath:this.gettreepath,g={getCount:f},y={limitLevel:void 0!==t.limitlevel?t.limitlevel:this.limitlevel,startWith:void 0!==t.startwith?t.startwith:this.startwith};return p&&(g.getTree=y),m&&(g.getTreePath=y),s=s.skip(h*(d-1)).limit(h).get(g),s}}}}function An(e){return ke("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}",e.config.spaceId))}async function xn({openid:e,callLoginByWeixin:t=!1}={}){throw An(this),new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `web`")}async function Pn(e){const t=An(this);return t.initPromise||(t.initPromise=xn.call(this,e).then((e=>e)).catch((e=>{throw delete t.initPromise,e}))),t.initPromise}function Cn(e){Xe=e}function On(e){const t={getSystemInfo:S,getPushClientId:I};return function(s){return new Promise(((n,o)=>{t[e]({...s,success(e){n(e)},fail(e){o(e)}})}))}}class En extends class{constructor(){this._callback={}}addListener(e,t){this._callback[e]||(this._callback[e]=[]),this._callback[e].push(t)}on(e,t){return this.addListener(e,t)}removeListener(e,t){if(!t)throw new Error('The "listener" argument must be of type function. Received undefined');const s=this._callback[e];if(!s)return;const n=function(e,t){for(let s=e.length-1;s>=0;s--)if(e[s]===t)return s;return-1}(s,t);s.splice(n,1)}off(e,t){return this.removeListener(e,t)}removeAllListener(e){delete this._callback[e]}emit(e,...t){const s=this._callback[e];if(s)for(let n=0;n{if(!e)throw new Error("Invalid appId, please check the manifest.json file");if(!t)throw new Error("Invalid push client id");this._appId=e,this._pushClientId=t,this._seqId=Date.now()+"-"+Math.floor(9e5*Math.random()+1e5),this.emit("open"),this._initMessageListener()}),(e=>{throw this.emit("error",e),this.close(),e}))}async open(){return this.init()}_isUniCloudSSE(e){if("receive"!==e.type)return!1;const t=e&&e.data&&e.data.payload;return!(!t||"UNI_CLOUD_SSE"!==t.channel||t.seqId!==this._seqId)}_receivePushMessage(e){if(!this._isUniCloudSSE(e))return;const t=e&&e.data&&e.data.payload,{action:s,messageId:n,message:o}=t;this._payloadQueue.push({action:s,messageId:n,message:o}),this._consumMessage()}_consumMessage(){for(;;){const e=this._payloadQueue.find((e=>e.messageId===this._currentMessageId+1));if(!e)break;this._currentMessageId++,this._parseMessagePayload(e)}}_parseMessagePayload(e){const{action:t,messageId:s,message:n}=e;"end"===t?this._end({messageId:s,message:n}):"message"===t&&this._appendMessage({messageId:s,message:n})}_appendMessage({messageId:e,message:t}={}){this.emit("message",t)}_end({messageId:e,message:t}={}){this.emit("end",t),this.close()}_initMessageListener(){l(this._uniPushMessageCallback)}_destroy(){u(this._uniPushMessageCallback)}toJSON(){return{appId:this._appId,pushClientId:this._pushClientId,seqId:this._seqId}}close(){this._destroy(),this.emit("close")}}const Rn={tcb:fs,tencent:fs,aliyun:ot,private:ms,alipay:Is};let Ln=new class{init(e){let t={};const s=Rn[e.provider];if(!s)throw new Error("未提供正确的provider参数");var n;return t=s.init(e),function(e){e._initPromiseHub||(e._initPromiseHub=new pe({createPromise:function(){let t=Promise.resolve();t=new Promise((e=>{setTimeout((()=>{e()}),1)}));const s=e.auth();return t.then((()=>s.getLoginState())).then((e=>e?Promise.resolve():s.signInAnonymously()))}}))}(t),Ns(t),function(e){const t=e.uploadFile;e.uploadFile=function(e){return t.call(this,e)}}(t),(n=t).database=function(e){if(e&&Object.keys(e).length>0)return n.init(e).database();if(this._database)return this._database;const t=zs(Js,{uniClient:n});return this._database=t,t},n.databaseForJQL=function(e){if(e&&Object.keys(e).length>0)return n.init(e).databaseForJQL();if(this._databaseForJQL)return this._databaseForJQL;const t=zs(Js,{uniClient:n,isJQL:!0});return this._databaseForJQL=t,t},function(e){e.getCurrentUserInfo=Sn,e.chooseAndUploadFile=In.initChooseAndUploadFile(e),Object.assign(e,{get mixinDatacom(){return Tn(e)}}),e.SSEChannel=En,e.initSecureNetworkByWeixin=function(e){return function({openid:t,callLoginByWeixin:s=!1}={}){return Pn.call(e,{openid:t,callLoginByWeixin:s})}}(e),e.setCustomClientInfo=Cn,e.importObject=function(t){return function(s,n={}){n=function(e,t={}){return e.customUI=t.customUI||e.customUI,e.parseSystemError=t.parseSystemError||e.parseSystemError,Object.assign(e.loadingOptions,t.loadingOptions),Object.assign(e.errorOptions,t.errorOptions),"object"==typeof t.secretMethods&&(e.secretMethods=t.secretMethods),e}({customUI:!1,loadingOptions:{title:"加载中...",mask:!0},errorOptions:{type:"modal",retry:!1}},n);const{customUI:o,loadingOptions:l,errorOptions:u,parseSystemError:d}=n,h=!o;return new Proxy({},{get(o,f){switch(f){case"toString":return"[object UniCloudObject]";case"toJSON":return{}}return function({fn:e,interceptorName:t,getCallbackArgs:s}={}){return async function(...n){const o=s?s({params:n}):{};let i,r;try{return await Te(Ae(t,"invoke"),{...o}),i=await e(...n),await Te(Ae(t,"success"),{...o,result:i}),i}catch(a){throw r=a,await Te(Ae(t,"fail"),{...o,error:r}),r}finally{await Te(Ae(t,"complete"),r?{...o,error:r}:{...o,result:i})}}}({fn:async function o(...p){let m;h&&i({title:l.title,mask:l.mask});const g={name:s,type:"OBJECT",data:{method:f,params:p}};"object"==typeof n.secretMethods&&function(e,t){const s=t.data.method,n=e.secretMethods||{},o=n[s]||n["*"];o&&(t.secretType=o)}(n,g);let y=!1;try{m=await t.callFunction(g)}catch(e){y=!0,m={result:new Ke(e)}}const{errSubject:_,errCode:w,errMsg:k,newToken:b}=m.result||{};if(h&&r(),b&&b.token&&b.tokenExpired&&(ze(b),Fe(Ee,{...b})),w){let e=k;if(y&&d&&(e=(await d({objectName:s,methodName:f,params:p,errSubject:_,errCode:w,errMsg:k})).errMsg||k),h)if("toast"===u.type)a({title:e,icon:"none"});else{if("modal"!==u.type)throw new Error(`Invalid errorOptions.type: ${u.type}`);{const{confirm:t}=await async function({title:e,content:t,showCancel:s,cancelText:n,confirmText:o}={}){return new Promise(((i,r)=>{c({title:e,content:t,showCancel:s,cancelText:n,confirmText:o,success(e){i(e)},fail(){i({confirm:!1,cancel:!0})}})}))}({title:"提示",content:e,showCancel:u.retry,cancelText:"取消",confirmText:u.retry?"重试":"确定"});if(u.retry&&t)return o(...p)}}const t=new Ke({subject:_,code:w,message:k,requestId:m.requestId});throw t.detail=m.result,Fe(Ce,{type:De,content:t}),t}return Fe(Ce,{type:De,content:m.result}),m.result},interceptorName:"callObject",getCallbackArgs:function({params:e}={}){return{objectName:s,methodName:f,params:e}}})}})}}(e)}(t),["callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","chooseAndUploadFile"].forEach((e=>{if(!t[e])return;const s=t[e];t[e]=function(){return s.apply(t,Array.from(arguments))},t[e]=function(e,t){return function(s){let n=!1;if("callFunction"===t){const e=s&&s.type||ie;n=e!==ie}const o="callFunction"===t&&!n,i=this._initPromiseHub.exec();s=s||{};const{success:r,fail:a,complete:c}=Be(s),l=i.then((()=>n?Promise.resolve():Te(Ae(t,"invoke"),s))).then((()=>e.call(this,s))).then((e=>n?Promise.resolve(e):Te(Ae(t,"success"),e).then((()=>Te(Ae(t,"complete"),e))).then((()=>(o&&Fe(Ce,{type:Le,content:e}),Promise.resolve(e))))),(e=>n?Promise.reject(e):Te(Ae(t,"fail"),e).then((()=>Te(Ae(t,"complete"),e))).then((()=>(Fe(Ce,{type:Le,content:e}),Promise.reject(e))))));if(!(r||a||c))return l;l.then((e=>{r&&r(e),c&&c(e),o&&Fe(Ce,{type:Le,content:e})}),(e=>{a&&a(e),c&&c(e),o&&Fe(Ce,{type:Le,content:e})}))}}(t[e],e).bind(t)})),t.init=this.init,t}};(()=>{const e=ye;let t={};if(e&&1===e.length)t=e[0],Ln=Ln.init(t),Ln._isDefault=!0;else{const t=["auth","callFunction","uploadFile","deleteFile","getTempFileURL","downloadFile","database","getCurrentUSerInfo","importObject"];let s;s=e&&e.length>0?"应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间":"应用未关联服务空间,请在uniCloud目录右键关联服务空间",t.forEach((e=>{Ln[e]=function(){return console.error(s),Promise.reject(new Ke({code:"SYS_ERR",message:s}))}}))}Object.assign(Ln,{get mixinDatacom(){return Tn(Ln)}}),wn(Ln),Ln.addInterceptor=Se,Ln.removeInterceptor=Ie,Ln.interceptObject=xe})();var Dn=Ln;const Un=[{font_class:"arrow-down",unicode:""},{font_class:"arrow-left",unicode:""},{font_class:"arrow-right",unicode:""},{font_class:"arrow-up",unicode:""},{font_class:"auth",unicode:""},{font_class:"auth-filled",unicode:""},{font_class:"back",unicode:""},{font_class:"bars",unicode:""},{font_class:"calendar",unicode:""},{font_class:"calendar-filled",unicode:""},{font_class:"camera",unicode:""},{font_class:"camera-filled",unicode:""},{font_class:"cart",unicode:""},{font_class:"cart-filled",unicode:""},{font_class:"chat",unicode:""},{font_class:"chat-filled",unicode:""},{font_class:"chatboxes",unicode:""},{font_class:"chatboxes-filled",unicode:""},{font_class:"chatbubble",unicode:""},{font_class:"chatbubble-filled",unicode:""},{font_class:"checkbox",unicode:""},{font_class:"checkbox-filled",unicode:""},{font_class:"checkmarkempty",unicode:""},{font_class:"circle",unicode:""},{font_class:"circle-filled",unicode:""},{font_class:"clear",unicode:""},{font_class:"close",unicode:""},{font_class:"closeempty",unicode:""},{font_class:"cloud-download",unicode:""},{font_class:"cloud-download-filled",unicode:""},{font_class:"cloud-upload",unicode:""},{font_class:"cloud-upload-filled",unicode:""},{font_class:"color",unicode:""},{font_class:"color-filled",unicode:""},{font_class:"compose",unicode:""},{font_class:"contact",unicode:""},{font_class:"contact-filled",unicode:""},{font_class:"down",unicode:""},{font_class:"bottom",unicode:""},{font_class:"download",unicode:""},{font_class:"download-filled",unicode:""},{font_class:"email",unicode:""},{font_class:"email-filled",unicode:""},{font_class:"eye",unicode:""},{font_class:"eye-filled",unicode:""},{font_class:"eye-slash",unicode:""},{font_class:"eye-slash-filled",unicode:""},{font_class:"fire",unicode:""},{font_class:"fire-filled",unicode:""},{font_class:"flag",unicode:""},{font_class:"flag-filled",unicode:""},{font_class:"folder-add",unicode:""},{font_class:"folder-add-filled",unicode:""},{font_class:"font",unicode:""},{font_class:"forward",unicode:""},{font_class:"gear",unicode:""},{font_class:"gear-filled",unicode:""},{font_class:"gift",unicode:""},{font_class:"gift-filled",unicode:""},{font_class:"hand-down",unicode:""},{font_class:"hand-down-filled",unicode:""},{font_class:"hand-up",unicode:""},{font_class:"hand-up-filled",unicode:""},{font_class:"headphones",unicode:""},{font_class:"heart",unicode:""},{font_class:"heart-filled",unicode:""},{font_class:"help",unicode:""},{font_class:"help-filled",unicode:""},{font_class:"home",unicode:""},{font_class:"home-filled",unicode:""},{font_class:"image",unicode:""},{font_class:"image-filled",unicode:""},{font_class:"images",unicode:""},{font_class:"images-filled",unicode:""},{font_class:"info",unicode:""},{font_class:"info-filled",unicode:""},{font_class:"left",unicode:""},{font_class:"link",unicode:""},{font_class:"list",unicode:""},{font_class:"location",unicode:""},{font_class:"location-filled",unicode:""},{font_class:"locked",unicode:""},{font_class:"locked-filled",unicode:""},{font_class:"loop",unicode:""},{font_class:"mail-open",unicode:""},{font_class:"mail-open-filled",unicode:""},{font_class:"map",unicode:""},{font_class:"map-filled",unicode:""},{font_class:"map-pin",unicode:""},{font_class:"map-pin-ellipse",unicode:""},{font_class:"medal",unicode:""},{font_class:"medal-filled",unicode:""},{font_class:"mic",unicode:""},{font_class:"mic-filled",unicode:""},{font_class:"micoff",unicode:""},{font_class:"micoff-filled",unicode:""},{font_class:"minus",unicode:""},{font_class:"minus-filled",unicode:""},{font_class:"more",unicode:""},{font_class:"more-filled",unicode:""},{font_class:"navigate",unicode:""},{font_class:"navigate-filled",unicode:""},{font_class:"notification",unicode:""},{font_class:"notification-filled",unicode:""},{font_class:"paperclip",unicode:""},{font_class:"paperplane",unicode:""},{font_class:"paperplane-filled",unicode:""},{font_class:"person",unicode:""},{font_class:"person-filled",unicode:""},{font_class:"personadd",unicode:""},{font_class:"personadd-filled",unicode:""},{font_class:"personadd-filled-copy",unicode:""},{font_class:"phone",unicode:""},{font_class:"phone-filled",unicode:""},{font_class:"plus",unicode:""},{font_class:"plus-filled",unicode:""},{font_class:"plusempty",unicode:""},{font_class:"pulldown",unicode:""},{font_class:"pyq",unicode:""},{font_class:"qq",unicode:""},{font_class:"redo",unicode:""},{font_class:"redo-filled",unicode:""},{font_class:"refresh",unicode:""},{font_class:"refresh-filled",unicode:""},{font_class:"refreshempty",unicode:""},{font_class:"reload",unicode:""},{font_class:"right",unicode:""},{font_class:"scan",unicode:""},{font_class:"search",unicode:""},{font_class:"settings",unicode:""},{font_class:"settings-filled",unicode:""},{font_class:"shop",unicode:""},{font_class:"shop-filled",unicode:""},{font_class:"smallcircle",unicode:""},{font_class:"smallcircle-filled",unicode:""},{font_class:"sound",unicode:""},{font_class:"sound-filled",unicode:""},{font_class:"spinner-cycle",unicode:""},{font_class:"staff",unicode:""},{font_class:"staff-filled",unicode:""},{font_class:"star",unicode:""},{font_class:"star-filled",unicode:""},{font_class:"starhalf",unicode:""},{font_class:"trash",unicode:""},{font_class:"trash-filled",unicode:""},{font_class:"tune",unicode:""},{font_class:"tune-filled",unicode:""},{font_class:"undo",unicode:""},{font_class:"undo-filled",unicode:""},{font_class:"up",unicode:""},{font_class:"top",unicode:""},{font_class:"upload",unicode:""},{font_class:"upload-filled",unicode:""},{font_class:"videocam",unicode:""},{font_class:"videocam-filled",unicode:""},{font_class:"vip",unicode:""},{font_class:"vip-filled",unicode:""},{font_class:"wallet",unicode:""},{font_class:"wallet-filled",unicode:""},{font_class:"weibo",unicode:""},{font_class:"weixin",unicode:""}],Nn=(e,t)=>{const s=e.__vccOpts||e;for(const[n,o]of t)s[n]=o;return s};const Mn=Nn({name:"UniIcons",emits:["click"],props:{type:{type:String,default:""},color:{type:String,default:"#333333"},size:{type:[Number,String],default:16},customPrefix:{type:String,default:""},fontFamily:{type:String,default:""}},data:()=>({icons:Un}),computed:{unicode(){let e=this.icons.find((e=>e.font_class===this.type));return e?e.unicode:""},iconSize(){return"number"==typeof(e=this.size)||/^[0-9]*$/g.test(e)?e+"px":e;var e},styleObj(){return""!==this.fontFamily?`color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`:`color: ${this.color}; font-size: ${this.iconSize};`}},methods:{_onClick(){this.$emit("click")}}},[["render",function(e,t,s,n,o,i){const r=L;return x(),P(r,{style:E(i.styleObj),class:R(["uni-icons",["uniui-"+s.type,s.customPrefix,s.customPrefix?s.type:""]]),onClick:i._onClick},{default:C((()=>[O(e.$slots,"default",{},void 0,!0)])),_:3},8,["style","class","onClick"])}],["__scopeId","data-v-5610c8db"]]);function Fn(e,t){return"string"==typeof e?t:e}const $n=Nn({name:"uni-data-select",mixins:[Dn.mixinDatacom||{}],props:{localdata:{type:Array,default:()=>[]},value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},label:{type:String,default:""},placeholder:{type:String,default:"请选择"},emptyTips:{type:String,default:"无选项"},clear:{type:Boolean,default:!0},defItem:{type:Number,default:0},disabled:{type:Boolean,default:!1},format:{type:String,default:""},placement:{type:String,default:"bottom"}},data:()=>({showSelector:!1,current:"",mixinDatacomResData:[],apps:[],channels:[],cacheKey:"uni-data-select-lastSelectedValue"}),created(){this.debounceGet=this.debounce((()=>{this.query()}),300),this.collection&&!this.localdata.length&&this.debounceGet()},computed:{typePlaceholder(){const e=this.placeholder,t={"opendb-stat-app-versions":"版本","opendb-app-channels":"渠道","opendb-app-list":"应用"}[this.collection];return t?e+t:e},valueCom(){return this.modelValue},textShow(){let e=this.current;return e.length>10?e.slice(0,25)+"...":e},getOffsetByPlacement(){switch(this.placement){case"top":return"bottom:calc(100% + 12px);";case"bottom":return"top:calc(100% + 12px);"}}},watch:{localdata:{immediate:!0,handler(e,t){Array.isArray(e)&&t!==e&&(this.mixinDatacomResData=e)}},valueCom(e,t){this.initDefVal()},mixinDatacomResData:{immediate:!0,handler(e){e.length&&this.initDefVal()}}},methods:{debounce(e,t=100){let s=null;return function(...n){s&&clearTimeout(s),s=setTimeout((()=>{e.apply(this,n)}),t)}},query(){this.mixinDatacomEasyGet()},onMixinDatacomPropsChange(){this.collection&&this.debounceGet()},initDefVal(){let e="";if(!this.valueCom&&0!==this.valueCom||this.isDisabled(this.valueCom)){let t;if(this.collection&&(t=this.getCache()),t||0===t)e=t;else{let t="";this.defItem>0&&this.defItem<=this.mixinDatacomResData.length&&(t=this.mixinDatacomResData[this.defItem-1].value),e=t}(e||0===e)&&this.emit(e)}else e=this.valueCom;const t=this.mixinDatacomResData.find((t=>t.value===e));this.current=t?this.formatItemName(t):""},isDisabled(e){let t=!1;return this.mixinDatacomResData.forEach((s=>{s.value===e&&(t=s.disable)})),t},clearVal(){this.emit(""),this.collection&&this.removeCache()},change(e){e.disable||(this.showSelector=!1,this.current=this.formatItemName(e),this.emit(e.value))},emit(e){this.$emit("input",e),this.$emit("update:modelValue",e),this.$emit("change",e),this.collection&&this.setCache(e)},toggleSelector(){this.disabled||(this.showSelector=!this.showSelector)},formatItemName(e){let{text:t,value:s,channel_code:n}=e;if(n=n?`(${n})`:"",this.format){let t="";t=this.format;for(let s in e)t=t.replace(new RegExp(`{${s}}`,"g"),e[s]);return t}return this.collection.indexOf("app-list")>0?`${t}(${s})`:t||`未命名${n}`},getLoadData(){return this.mixinDatacomResData},getCurrentCacheKey(){return this.collection},getCache(e=this.getCurrentCacheKey()){return(p(this.cacheKey)||{})[e]},setCache(e,t=this.getCurrentCacheKey()){let s=p(this.cacheKey)||{};s[t]=e,f(this.cacheKey,s)},removeCache(e=this.getCurrentCacheKey()){let t=p(this.cacheKey)||{};delete t[e],f(this.cacheKey,t)}}},[["render",function(e,t,s,n,o,i){const r=K,a=Fn(D("uni-icons"),Mn),c=L,l=H;return x(),P(r,{class:"uni-stat__select"},{default:C((()=>[s.label?(x(),U("span",{key:0,class:"uni-label-text hide-on-phone"},N(s.label+":"),1)):M("",!0),F(r,{class:R(["uni-stat-box",{"uni-stat__actived":o.current}])},{default:C((()=>[F(r,{class:R(["uni-select",{"uni-select--disabled":s.disabled}])},{default:C((()=>[F(r,{class:"uni-select__input-box",onClick:i.toggleSelector},{default:C((()=>[o.current?(x(),P(r,{key:0,class:"uni-select__input-text"},{default:C((()=>[$(N(i.textShow),1)])),_:1})):(x(),P(r,{key:1,class:"uni-select__input-text uni-select__input-placeholder"},{default:C((()=>[$(N(i.typePlaceholder),1)])),_:1})),o.current&&s.clear&&!s.disabled?(x(),P(r,{key:2,onClick:q(i.clearVal,["stop"])},{default:C((()=>[F(a,{type:"clear",color:"#c0c4cc",size:"24"})])),_:1},8,["onClick"])):(x(),P(r,{key:3},{default:C((()=>[F(a,{type:o.showSelector?"top":"bottom",size:"14",color:"#999"},null,8,["type"])])),_:1}))])),_:1},8,["onClick"]),o.showSelector?(x(),P(r,{key:0,class:"uni-select--mask",onClick:i.toggleSelector},null,8,["onClick"])):M("",!0),o.showSelector?(x(),P(r,{key:1,class:"uni-select__selector",style:E(i.getOffsetByPlacement)},{default:C((()=>[F(r,{class:R("bottom"==s.placement?"uni-popper__arrow_bottom":"uni-popper__arrow_top")},null,8,["class"]),F(l,{"scroll-y":"true",class:"uni-select__selector-scroll"},{default:C((()=>[0===o.mixinDatacomResData.length?(x(),P(r,{key:0,class:"uni-select__selector-empty"},{default:C((()=>[F(c,null,{default:C((()=>[$(N(s.emptyTips),1)])),_:1})])),_:1})):(x(!0),U(j,{key:1},B(o.mixinDatacomResData,((e,t)=>(x(),P(r,{class:"uni-select__selector-item",key:t,onClick:t=>i.change(e)},{default:C((()=>[F(c,{class:R({"uni-select__selector__disabled":e.disable})},{default:C((()=>[$(N(i.formatItemName(e)),1)])),_:2},1032,["class"])])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1},8,["style"])):M("",!0)])),_:1},8,["class"])])),_:1},8,["class"])])),_:1})}],["__scopeId","data-v-fe4b6be6"]]);class qn{constructor(e,t){this.options=e,this.animation=V({...e}),this.currentStepAnimates={},this.next=0,this.$=t}_nvuePushAnimates(e,t){let s=this.currentStepAnimates[this.next],n={};if(n=s||{styles:{},config:{}},jn.includes(e)){n.styles.transform||(n.styles.transform="");let s="";"rotate"===e&&(s="deg"),n.styles.transform+=`${e}(${t+s}) `}else n.styles[e]=`${t}`;this.currentStepAnimates[this.next]=n}_animateRun(e={},t={}){let s=this.$.$refs.ani.ref;if(s)return new Promise(((n,o)=>{nvueAnimation.transition(s,{styles:e,...t},(e=>{n()}))}))}_nvueNextAnimate(e,t=0,s){let n=e[t];if(n){let{styles:o,config:i}=n;this._animateRun(o,i).then((()=>{t+=1,this._nvueNextAnimate(e,t,s)}))}else this.currentStepAnimates={},"function"==typeof s&&s(),this.isEnd=!0}step(e={}){return this.animation.step(e),this}run(e){this.$.animationData=this.animation.export(),this.$.timer=setTimeout((()=>{"function"==typeof e&&e()}),this.$.durationTime)}}const jn=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"];function Bn(e,t){if(t)return clearTimeout(t.timer),new qn(e,t)}jn.concat(["opacity","backgroundColor"],["width","height","left","right","top","bottom"]).forEach((e=>{qn.prototype[e]=function(...t){return this.animation[e](...t),this}}));const Kn=Nn({name:"uniTransition",emits:["click","change"],props:{show:{type:Boolean,default:!1},modeClass:{type:[Array,String],default:()=>"fade"},duration:{type:Number,default:300},styles:{type:Object,default:()=>({})},customClass:{type:String,default:""},onceRender:{type:Boolean,default:!1}},data:()=>({isShow:!1,transform:"",opacity:1,animationData:{},durationTime:300,config:{}}),watch:{show:{handler(e){e?this.open():this.isShow&&this.close()},immediate:!0}},computed:{stylesObject(){let e={...this.styles,"transition-duration":this.duration/1e3+"s"},t="";for(let s in e){t+=this.toLine(s)+":"+e[s]+";"}return t},transformStyles(){return"transform:"+this.transform+";opacity:"+this.opacity+";"+this.stylesObject}},created(){this.config={duration:this.duration,timingFunction:"ease",transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init(e={}){e.duration&&(this.durationTime=e.duration),this.animation=Bn(Object.assign(this.config,e),this)},onClick(){this.$emit("click",{detail:this.isShow})},step(e,t={}){if(this.animation){for(let t in e)try{"object"==typeof e[t]?this.animation[t](...e[t]):this.animation[t](e[t])}catch(at){console.error(`方法 ${t} 不存在`)}return this.animation.step(t),this}},run(e){this.animation&&this.animation.run(e)},open(){clearTimeout(this.timer),this.transform="",this.isShow=!0;let{opacity:e,transform:t}=this.styleInit(!1);void 0!==e&&(this.opacity=e),this.transform=t,this.$nextTick((()=>{this.timer=setTimeout((()=>{this.animation=Bn(this.config,this),this.tranfromInit(!1).step(),this.animation.run(),this.$emit("change",{detail:this.isShow})}),20)}))},close(e){this.animation&&this.tranfromInit(!0).step().run((()=>{this.isShow=!1,this.animationData=null,this.animation=null;let{opacity:e,transform:t}=this.styleInit(!1);this.opacity=e||1,this.transform=t,this.$emit("change",{detail:this.isShow})}))},styleInit(e){let t={transform:""},s=(e,s)=>{"fade"===s?t.opacity=this.animationType(e)[s]:t.transform+=this.animationType(e)[s]+" "};return"string"==typeof this.modeClass?s(e,this.modeClass):this.modeClass.forEach((t=>{s(e,t)})),t},tranfromInit(e){let t=(e,t)=>{let s=null;"fade"===t?s=e?0:1:(s=e?"-100%":"0","zoom-in"===t&&(s=e?.8:1),"zoom-out"===t&&(s=e?1.2:1),"slide-right"===t&&(s=e?"100%":"0"),"slide-bottom"===t&&(s=e?"100%":"0")),this.animation[this.animationMode()[t]](s)};return"string"==typeof this.modeClass?t(e,this.modeClass):this.modeClass.forEach((s=>{t(e,s)})),this.animation},animationType:e=>({fade:e?1:0,"slide-top":`translateY(${e?"0":"-100%"})`,"slide-right":`translateX(${e?"0":"100%"})`,"slide-bottom":`translateY(${e?"0":"100%"})`,"slide-left":`translateX(${e?"0":"-100%"})`,"zoom-in":`scaleX(${e?1:.8}) scaleY(${e?1:.8})`,"zoom-out":`scaleX(${e?1:1.2}) scaleY(${e?1:1.2})`}),animationMode:()=>({fade:"opacity","slide-top":"translateY","slide-right":"translateX","slide-bottom":"translateY","slide-left":"translateX","zoom-in":"scale","zoom-out":"scale"}),toLine:e=>e.replace(/([A-Z])/g,"-$1").toLowerCase()}},[["render",function(e,t,s,n,o,i){const r=K;return W((x(),P(r,{ref:"ani",animation:o.animationData,class:R(s.customClass),style:E(i.transformStyles),onClick:i.onClick},{default:C((()=>[O(e.$slots,"default")])),_:3},8,["animation","class","style","onClick"])),[[z,o.isShow]])}]]),Hn={name:"uniPopup",components:{keypress:{name:"Keypress",props:{disable:{type:Boolean,default:!1}},mounted(){const e={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]};document.addEventListener("keyup",(t=>{if(this.disable)return;const s=Object.keys(e).find((s=>{const n=t.key,o=e[s];return o===n||Array.isArray(o)&&o.includes(n)}));s&&setTimeout((()=>{this.$emit(s,{})}),0)}))},render:()=>{}}},emits:["change","maskClick"],props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},isMaskClick:{type:Boolean,default:null},maskClick:{type:Boolean,default:null},backgroundColor:{type:String,default:"none"},safeArea:{type:Boolean,default:!0},maskBackgroundColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},borderRadius:{type:String}},watch:{type:{handler:function(e){this.config[e]&&this[this.config[e]](!0)},immediate:!0},isDesktop:{handler:function(e){this.config[e]&&this[this.config[this.type]](!0)},immediate:!0},maskClick:{handler:function(e){this.mkclick=e},immediate:!0},isMaskClick:{handler:function(e){this.mkclick=e},immediate:!0},showPopup(e){document.getElementsByTagName("body")[0].style.overflow=e?"hidden":"visible"}},data(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{backgroundColor:"transparent",borderRadius:this.borderRadius||"0",position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:"top"}},computed:{getStyles(){let e={backgroundColor:this.bg};return this.borderRadius,e=Object.assign(e,{borderRadius:this.borderRadius}),e},isDesktop(){return this.popupWidth>=500&&this.popupHeight>=500},bg(){return""===this.backgroundColor||"none"===this.backgroundColor?"transparent":this.backgroundColor}},mounted(){(()=>{const{windowWidth:e,windowHeight:t,windowTop:s,safeArea:n,screenHeight:o,safeAreaInsets:i}=_();this.popupWidth=e,this.popupHeight=t+(s||0),n&&this.safeArea?this.safeAreaInsets=i.bottom:this.safeAreaInsets=0})()},unmounted(){this.setH5Visible()},created(){null===this.isMaskClick&&null===this.maskClick?this.mkclick=!0:this.mkclick=null!==this.isMaskClick?this.isMaskClick:this.maskClick,this.animation?this.duration=300:this.duration=0,this.messageChild=null,this.clearPropagation=!1,this.maskClass.backgroundColor=this.maskBackgroundColor},methods:{setH5Visible(){document.getElementsByTagName("body")[0].style.overflow="visible"},closeMask(){this.maskShow=!1},disableMask(){this.mkclick=!1},clear(e){e.stopPropagation(),this.clearPropagation=!0},open(e){if(this.showPopup)return;e&&-1!==["top","center","bottom","left","right","message","dialog","share"].indexOf(e)||(e=this.type),this.config[e]?(this[this.config[e]](),this.$emit("change",{show:!0,type:e})):console.error("缺少类型:",e)},close(e){this.showTrans=!1,this.$emit("change",{show:!1,type:this.type}),clearTimeout(this.timer),this.timer=setTimeout((()=>{this.showPopup=!1}),300)},touchstart(){this.clearPropagation=!1},onTap(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.mkclick&&this.close())},top(e){this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},e||(this.showPopup=!0,this.showTrans=!0,this.$nextTick((()=>{this.messageChild&&"message"===this.type&&this.messageChild.timerClose()})))},bottom(e){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0,paddingBottom:this.safeAreaInsets+"px",backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},e||(this.showPopup=!0,this.showTrans=!0)},center(e){this.popupstyle="center",this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center",borderRadius:this.borderRadius||"0"},e||(this.showPopup=!0,this.showTrans=!0)},left(e){this.popupstyle="left",this.ani=["slide-left"],this.transClass={position:"fixed",left:0,bottom:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)},right(e){this.popupstyle="right",this.ani=["slide-right"],this.transClass={position:"fixed",bottom:0,right:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},e||(this.showPopup=!0,this.showTrans=!0)}}};const Vn=Nn(Hn,[["render",function(e,t,s,n,o,i){const r=Fn(D("uni-transition"),Kn),a=K,c=J("keypress");return o.showPopup?(x(),P(a,{key:0,class:R(["uni-popup",[o.popupstyle,i.isDesktop?"fixforpc-z-index":""]])},{default:C((()=>[F(a,{onTouchstart:i.touchstart},{default:C((()=>[o.maskShow?(x(),P(r,{key:"1",name:"mask","mode-class":"fade",styles:o.maskClass,duration:o.duration,show:o.showTrans,onClick:i.onTap},null,8,["styles","duration","show","onClick"])):M("",!0),F(r,{key:"2","mode-class":o.ani,name:"content",styles:o.transClass,duration:o.duration,show:o.showTrans,onClick:i.onTap},{default:C((()=>[F(a,{class:R(["uni-popup__wrapper",[o.popupstyle]]),style:E(i.getStyles),onClick:i.clear},{default:C((()=>[O(e.$slots,"default",{},void 0,!0)])),_:3},8,["style","class","onClick"])])),_:3},8,["mode-class","styles","duration","show","onClick"])])),_:3},8,["onTouchstart"]),o.maskShow?(x(),P(c,{key:0,onEsc:i.onTap},null,8,["onEsc"])):M("",!0)])),_:3},8,["class"])):M("",!0)}],["__scopeId","data-v-2ba3757e"]]),Wn={data:()=>({qcode:"",content:"",statusBarHeight:0}),props:{},computed:{config(){return this.$store.state.config}},created(){},methods:{goHome(){k({url:"/pages/index/index"})},save(){this.$refs.popupFeedback.open("center")},saveBtn(){if(!this.content)return a({title:"请输入你想看的资源信息~",icon:"none"});this.load||(this.load=!0,d({url:uni.baseURL+"api/tool/feedback",data:{content:this.content},success:e=>{200==e.data.code?(a({title:e.data.message}),this.$refs.popupFeedback.close(),this.content=""):a({title:e.data.message,icon:"none"})},complete:()=>{setTimeout((()=>{this.load=!1}),1e3)}}))},showBtn(){if(this.qcode=this.config.qcode,!this.qcode)return a({title:"暂未开启该功能",icon:"none"});this.$refs.popup.open("center")},goMore(e){window.open(e)}}};const zn=Nn(Wn,[["render",function(e,t,s,n,o,i){const r=Y,a=K,c=Fn(D("uni-popup"),Vn),l=Q;return x(),U(j,null,[F(a,{class:"headerBox",style:E("padding-top: "+o.statusBarHeight+"px;")},{default:C((()=>[F(a,{class:"box"},{default:C((()=>[F(a,{class:"logoBox",onClick:i.goHome},{default:C((()=>[F(r,{class:"logo",src:i.config.logo},null,8,["src"]),F(a,{class:"title"},{default:C((()=>[$(N(i.config.app_name||""),1)])),_:1})])),_:1},8,["onClick"]),F(a,{class:"navs"},{default:C((()=>[F(a,{class:"item",onClick:i.showBtn},{default:C((()=>[$("加入群聊")])),_:1},8,["onClick"]),F(a,{class:"item",onClick:i.save},{default:C((()=>[$("提交需求")])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1},8,["style"]),F(a,{class:"hbox",style:E("padding-top: "+o.statusBarHeight+"px;")},null,8,["style"]),F(c,{ref:"popup","border-radius":"10px 10px 0 0"},{default:C((()=>[F(a,{class:"layerBox"},{default:C((()=>[F(r,{src:o.qcode,mode:"aspectFit"},null,8,["src"])])),_:1})])),_:1},512),F(c,{ref:"popupFeedback","border-radius":"10px 10px 0 0"},{default:C((()=>[F(a,{class:"layerBox"},{default:C((()=>[F(a,{class:"vname"},{default:C((()=>[$("提交需求")])),_:1}),F(l,{modelValue:o.content,"onUpdate:modelValue":t[0]||(t[0]=e=>o.content=e),placeholder:"请输入你想看的资源信息~"},null,8,["modelValue"]),F(a,{class:"vbtn",onClick:i.saveBtn},{default:C((()=>[$("提交")])),_:1},8,["onClick"])])),_:1})])),_:1},512)],64)}],["__scopeId","data-v-23f68e6a"]]);const Jn=Nn({data:()=>({}),props:{},methods:{}},[["render",function(e,t,s,n,o,i){const r=K;return x(),P(r,{class:"footerBox"},{default:C((()=>[F(r,{class:"box"},{default:C((()=>[G("p",null,"声明:本站是网盘索引系统,所有内容均来自互联网所提供的公开引用资源,未提供资源上传、存储服务。"),G("p",null,[$("© 2024 心悦搜剧 Powered by "),G("a",{href:"https://www.xinyuedh.com/",target:"_blank"},"心悦导航")])])),_:1})])),_:1})}],["__scopeId","data-v-300b0a0a"]]);export{Jn as F,zn as H,Nn as _,$n as a,Mn as b,Fn as r}; diff --git a/public/assets/index-5wLQciw2.css b/public/assets/index-5wLQciw2.css deleted file mode 100644 index e58d65e..0000000 --- a/public/assets/index-5wLQciw2.css +++ /dev/null @@ -1 +0,0 @@ -.homeBox[data-v-e95cc1ce]{width:720px;margin:90px auto 15px;min-height:calc(100vh - 255px);text-align:center}.homeBox .logoBox[data-v-e95cc1ce]{display:inline-flex;align-items:center}.homeBox .logoBox .logo[data-v-e95cc1ce]{width:50px;height:50px}.homeBox .logoBox .title[data-v-e95cc1ce]{margin-left:18px;font-size:24px;font-weight:700}.homeBox .subTitle[data-v-e95cc1ce]{padding:15px 0;opacity:.6}.homeBox .search[data-v-e95cc1ce]{position:relative;margin:30px auto auto;background-color:#fff;height:48px;border-radius:12px;box-shadow:0 1px 6px rgba(32,33,36,.145);max-width:540px}.homeBox .search .selectBox[data-v-e95cc1ce]{position:absolute;top:0;bottom:0;width:90px}.homeBox .search uni-input[data-v-e95cc1ce]{text-align:left;height:100%;padding:0 60px 0 100px}.homeBox .search .iconfont[data-v-e95cc1ce]{position:absolute;top:10px;right:25px;font-size:18px}.homeBox .search.noSelect .selectBox[data-v-e95cc1ce]{display:none}.homeBox .search.noSelect uni-input[data-v-e95cc1ce]{padding:0 60px 0 24px}.homeBox .content[data-v-e95cc1ce]{box-shadow:0 0 5px rgba(214,214,214,.5);background-color:#fff;border-radius:12px;padding:15px 15px 5px;margin-top:72px}.homeBox .content .tabs[data-v-e95cc1ce]{display:flex}.homeBox .content .tabs .item[data-v-e95cc1ce]{padding:5px 0;margin-right:20px;cursor:pointer}.homeBox .content .tabs .item.active[data-v-e95cc1ce]{font-weight:700;color:#1e80ff}.homeBox .content .list[data-v-e95cc1ce]{text-align:left;margin-top:10px}.homeBox .content .list .item[data-v-e95cc1ce]{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #f2f2f2;padding:13px 0 11px;cursor:pointer;transition:transform .4s;opacity:.9}.homeBox .content .list .item .name[data-v-e95cc1ce]{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.homeBox .content .list .item .num[data-v-e95cc1ce]{color:#ff6d29;flex:none;margin-left:30px;font-weight:700}.homeBox .content .list .item[data-v-e95cc1ce]:hover{opacity:1;transform:translateY(-2px)}.homeBox .content .list .item:hover .name[data-v-e95cc1ce]{color:#1e80ff}@media screen and (max-width: 768px){.homeBox[data-v-e95cc1ce]{margin:5vw 4vw;width:auto;min-height:calc(100vh - 60vw)}.homeBox .logoBox[data-v-e95cc1ce]{display:none}.homeBox .logoBox .logo[data-v-e95cc1ce]{width:9vw;height:9vw}.homeBox .logoBox .title[data-v-e95cc1ce]{margin-left:3.2vw;font-size:5.2vw}.homeBox .subTitle[data-v-e95cc1ce]{padding:4vw 0}.homeBox .search[data-v-e95cc1ce]{margin-top:4vw;height:13vw;border-radius:3vw}.homeBox .search .selectBox[data-v-e95cc1ce]{width:20vw;font-size:30vw}.homeBox .search uni-input[data-v-e95cc1ce]{padding:0 14vw 0 22vw}.homeBox .search .iconfont[data-v-e95cc1ce]{top:2.5vw;right:5vw;font-size:5vw}.homeBox .search.noSelect uni-input[data-v-e95cc1ce]{padding:0 14vw 0 6vw}.homeBox .content[data-v-e95cc1ce]{border-radius:3vw;padding:4vw 4vw 2vw;margin-top:12vw}.homeBox .content .tabs .item[data-v-e95cc1ce]{padding:1.5vw 0;margin-right:5vw}.homeBox .content .list[data-v-e95cc1ce]{margin-top:2vw}.homeBox .content .list .item[data-v-e95cc1ce]{padding:4vw 0}.homeBox .content .list .item .num[data-v-e95cc1ce]{margin-left:8vw}} diff --git a/public/assets/index-BLVVqZ0m.css b/public/assets/index-BLVVqZ0m.css deleted file mode 100644 index 90b9902..0000000 --- a/public/assets/index-BLVVqZ0m.css +++ /dev/null @@ -1 +0,0 @@ -*{margin:0;-webkit-tap-highlight-color:transparent}html,body{-webkit-user-select:none;user-select:none;width:100%;height:100%}body{overflow-x:hidden;font-size:16px}uni-app,uni-page,uni-page-wrapper,uni-page-body{display:block;box-sizing:border-box;width:100%}uni-page-wrapper{position:relative}#app,uni-app,uni-page,uni-page-wrapper{height:100%}.uni-mask{position:fixed;z-index:999;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,.5)}.uni-fade-enter-active,.uni-fade-leave-active{transition-duration:.25s;transition-property:opacity;transition-timing-function:ease}.uni-fade-enter-from,.uni-fade-leave-active{opacity:0}.uni-loading,uni-button[loading]:before{background-color:transparent;background-image:url(data:image/svg+xml;base64,\ PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=);background-repeat:no-repeat}.uni-loading{width:20px;height:20px;display:inline-block;vertical-align:middle;animation:uni-loading 1s steps(12,end) infinite;background-size:100%}@keyframes uni-loading{0%{transform:rotate3d(0,0,1,0)}to{transform:rotate3d(0,0,1,360deg)}}html{--primary-color: #007aff;--UI-BG: #fff;--UI-BG-1: #f7f7f7;--UI-BG-2: #fff;--UI-BG-3: #f7f7f7;--UI-BG-4: #4c4c4c;--UI-BG-5: #fff;--UI-FG: #000;--UI-FG-0: rgba(0, 0, 0, .9);--UI-FG-HALF: rgba(0, 0, 0, .9);--UI-FG-1: rgba(0, 0, 0, .5);--UI-FG-2: rgba(0, 0, 0, .3);--UI-FG-3: rgba(0, 0, 0, .1)}body:after{position:fixed;content:"";left:-1000px;top:-1000px;animation:shadow-preload .1s;animation-delay:3s}@keyframes shadow-preload{0%{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}to{background-image:url(https://cdn.dcloud.net.cn/img/shadow-grey.png)}}.uni-async-error{position:absolute;left:0;right:0;top:0;bottom:0;color:#999;padding:100px 10px;text-align:center}.uni-async-loading{box-sizing:border-box;width:100%;padding:50px;text-align:center}.uni-async-loading .uni-loading{width:30px;height:30px}*{margin:0;padding:0;box-sizing:border-box;outline:none!important}html,body{margin:0;font-size:14px;font-family:v-sans,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;line-height:1.6;color:#333}a{color:inherit;text-decoration:inherit;cursor:pointer}a:hover{color:#1e80ff}.nodata{text-align:center;padding:30px 0;color:#999}.nodata uni-image{width:18.75rem;height:18.75rem}.loading{text-align:center;padding:30px;color:#999}.uni-select{border:none!important;font-size:14px!important}.uni-select uni-text{margin:auto}.uni-select__input-placeholder{font-size:14px!important}@media screen and (max-width: 768px){html,body{font-size:4vw}.loading{padding:4vw}.uni-select,.uni-select__input-placeholder{font-size:3.6vw!important}}@font-face{font-family:iconfont;src:url(//at.alicdn.com/t/c/font_4485496_ugugvz0s26d.woff2?t=1716371950058) format("woff2"),url(//at.alicdn.com/t/c/font_4485496_ugugvz0s26d.woff?t=1716371950058) format("woff"),url(//at.alicdn.com/t/c/font_4485496_ugugvz0s26d.ttf?t=1716371950058) format("truetype")}.iconfont{font-family:iconfont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-fenlei:before{content:""}.icon-tiaozhuan:before{content:""}.icon--lianjie:before{content:""}.icon-fenxiang:before{content:""}.icon-fuzhi:before{content:""}.icon-date:before{content:""}.icon-kuake:before{content:""}.icon-sousuo:before{content:""} diff --git a/public/assets/index-bFszJRU6.js b/public/assets/index-bFszJRU6.js deleted file mode 100644 index 79cc0bf..0000000 --- a/public/assets/index-bFszJRU6.js +++ /dev/null @@ -1,30 +0,0 @@ -function __vite__mapDeps(indexes) { - if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/pages-index-index.ClyHdhya.js","assets/footer.BS9rMale.js","assets/footer-_DhgXmsd.css","assets/index-5wLQciw2.css","assets/pages-index-list.DyA6ZEg7.js","assets/list-CbK_uKq5.css","assets/pages-index-detail.DNWQcveo.js","assets/detail-C_zqW161.css"] - } - return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) -} -!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();const e={},t=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){const t=document.getElementsByTagName("link"),i=document.querySelector("meta[property=csp-nonce]"),s=(null==i?void 0:i.nonce)||(null==i?void 0:i.getAttribute("nonce"));r=Promise.all(n.map((n=>{if((n=function(e){return"/"+e}(n))in e)return;e[n]=!0;const r=n.endsWith(".css"),i=r?'[rel="stylesheet"]':"";if(!!o)for(let e=t.length-1;e>=0;e--){const o=t[e];if(o.href===n&&(!r||"stylesheet"===o.rel))return}else if(document.querySelector(`link[href="${n}"]${i}`))return;const a=document.createElement("link");return a.rel=r?"stylesheet":"modulepreload",r||(a.as="script",a.crossOrigin=""),a.href=n,s&&a.setAttribute("nonce",s),document.head.appendChild(a),r?new Promise(((e,t)=>{a.addEventListener("load",e),a.addEventListener("error",(()=>t(new Error(`Unable to preload CSS for ${n}`))))})):void 0})))}return r.then((()=>t())).catch((e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}))}; -/** -* @vue/shared v3.4.21 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/ -function n(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const o={},r=[],i=()=>{},s=()=>!1,a=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),l=e=>e.startsWith("onUpdate:"),c=Object.assign,u=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(e,t)=>d.call(e,t),p=Array.isArray,h=e=>"[object Map]"===x(e),m=e=>"[object Set]"===x(e),g=e=>"function"==typeof e,v=e=>"string"==typeof e,y=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,b=e=>(_(e)||g(e))&&g(e.then)&&g(e.catch),w=Object.prototype.toString,x=e=>w.call(e),S=e=>"[object Object]"===x(e),T=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,E=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),C=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},k=/-(\w)/g,O=C((e=>e.replace(k,((e,t)=>t?t.toUpperCase():"")))),L=/\B([A-Z])/g,A=C((e=>e.replace(L,"-$1").toLowerCase())),$=C((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=C((e=>e?`on${$(e)}`:"")),P=(e,t)=>!Object.is(e,t),j=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},N=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let I;const B=()=>I||(I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function D(e){if(p(e)){const t={};for(let n=0;n{if(e){const n=e.split(H);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function z(e){let t="";if(v(e))t=e;else if(p(e))for(let n=0;nv(e)?e:null==e?"":p(e)||_(e)&&(e.toString===w||!g(e.toString))?JSON.stringify(e,X,2):String(e),X=(e,t)=>t&&t.__v_isRef?X(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[K(t,o)+" =>"]=n,e)),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>K(e)))}:y(t)?K(t):!_(t)||p(t)||S(t)?t:String(t),K=(e,t="")=>{var n;return y(e)?`Symbol(${null!=(n=e.description)?n:t})`:e},G=["ad","ad-content-page","ad-draw","audio","button","camera","canvas","checkbox","checkbox-group","cover-image","cover-view","editor","form","functional-page-navigator","icon","image","input","label","live-player","live-pusher","map","movable-area","movable-view","navigator","official-account","open-data","picker","picker-view","picker-view-column","progress","radio","radio-group","rich-text","scroll-view","slider","swiper","swiper-item","switch","text","textarea","video","view","web-view"].map((e=>"uni-"+e)),J=["list-view","list-item","sticky-section","sticky-header","cloud-db-element"].map((e=>"uni-"+e)),Z=["list-item"].map((e=>"uni-"+e));function Q(e){if(-1!==Z.indexOf(e))return!1;const t="uni-"+e.replace("v-uni-","");return-1!==G.indexOf(t)||-1!==J.indexOf(t)}const ee=/^([a-z-]+:)?\/\//i,te=/^data:.*,.*/;function ne(e){if(!e)return;let t=e.type.name;for(;t&&Q(A(t));)t=(e=e.parent).type.name;return e.proxy}function oe(e){return 1===e.nodeType}function re(e){if(e instanceof Map){const t={};return e.forEach(((e,n)=>{t[n]=e})),D(t)}if(v(e))return W(e);if(p(e)){const t={};for(let n=0;n{e&&(t+=n+" ")}));else if(p(e))for(let n=0;n(e&&(n=e.apply(t,o),e=null),n)}const ce=e=>e>9?e:"0"+e;function ue({date:e=new Date,mode:t="date"}){return"time"===t?ce(e.getHours())+":"+ce(e.getMinutes()):e.getFullYear()+"-"+ce(e.getMonth()+1)+"-"+ce(e.getDate())}function de(e,t){e=e||{},v(t)&&(t={errMsg:t}),/:ok$/.test(t.errMsg)?g(e.success)&&e.success(t):g(e.fail)&&e.fail(t),g(e.complete)&&e.complete(t)}function fe(e){return O(e.substring(5))}const pe=le((()=>{const e=HTMLElement.prototype,t=e.setAttribute;e.setAttribute=function(e,n){if(e.startsWith("data-")&&this.tagName.startsWith("UNI-")){(this.__uniDataset||(this.__uniDataset={}))[fe(e)]=n}t.call(this,e,n)};const n=e.removeAttribute;e.removeAttribute=function(e){this.__uniDataset&&e.startsWith("data-")&&this.tagName.startsWith("UNI-")&&delete this.__uniDataset[fe(e)],n.call(this,e)}}));function he(e){return c({},e.dataset,e.__uniDataset)}const me=new RegExp("\"[^\"]+\"|'[^']+'|url\\([^)]+\\)|(\\d*\\.?\\d+)[r|u]px","g");function ge(e){return{passive:e}}function ve(e){const{id:t,offsetTop:n,offsetLeft:o}=e;return{id:t,dataset:he(e),offsetTop:n,offsetLeft:o}}function ye(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function _e(e={}){const t={};return Object.keys(e).forEach((n=>{try{t[n]=ye(e[n])}catch(o){t[n]=e[n]}})),t}const be=/\+/g;function we(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let o=0;oe.apply(this,arguments);r=o(i,t)};return i.cancel=function(){n(r)},i}class Se{constructor(e,t){this.id=e,this.listener={},this.emitCache=[],t&&Object.keys(t).forEach((e=>{this.on(e,t[e])}))}emit(e,...t){const n=this.listener[e];if(!n)return this.emitCache.push({eventName:e,args:t});n.forEach((e=>{e.fn.apply(e.fn,t)})),this.listener[e]=n.filter((e=>"once"!==e.type))}on(e,t){this._addListener(e,"on",t),this._clearCache(e)}once(e,t){this._addListener(e,"once",t),this._clearCache(e)}off(e,t){const n=this.listener[e];if(n)if(t)for(let o=0;o{if(g(e._component.onError))return t(e)})),Oe=function(){};Oe.prototype={on:function(e,t,n){var o=this.e||(this.e={});return(o[e]||(o[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var o=this;function r(){o.off(e,r),t.apply(n,arguments)}return r._=t,this.on(e,r,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),o=0,r=n.length;o=0;i--)if(o[i].fn===t||o[i].fn._===t){o.splice(i,1);break}r=o}return r.length?n[e]=r:delete n[e],this}};var Le=Oe;const Ae={black:"rgba(0,0,0,0.4)",white:"rgba(255,255,255,0.4)"};function $e(e,t,n){if(v(t)&&t.startsWith("@")){let r=e[t.replace("@","")]||t;switch(n){case"titleColor":r="black"===r?"#000000":"#ffffff";break;case"borderStyle":r=(o=r)&&o in Ae?Ae[o]:o}return r}var o;return t}function Me(e,t={},n="light"){const o=t[n],r={};return void 0===o?e:(Object.keys(e).forEach((i=>{const s=e[i];r[i]=S(s)?Me(s,t,n):p(s)?s.map((e=>"object"==typeof e?Me(e,t,n):$e(o,e))):$e(o,s,i)})),r)} -/** -* @dcloudio/uni-h5-vue v3.4.21 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Pe,je;class Re{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Pe,!e&&Pe&&(this.index=(Pe.scopes||(Pe.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=Pe;try{return Pe=this,e()}finally{Pe=t}}}on(){Pe=this}off(){Pe=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),Ue()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=He,t=je;try{return He=!0,je=this,this._runnings++,Be(this),this.fn()}finally{De(this),this._runnings--,je=t,He=e}}stop(){var e;this.active&&(Be(this),De(this),null==(e=this.onStop)||e.call(this),this.active=!1)}}function Be(e){e._trackId++,e._depsLength=0}function De(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},Ze=new WeakMap,Qe=Symbol(""),et=Symbol("");function tt(e,t,n){if(He&&je){let t=Ze.get(e);t||Ze.set(e,t=new Map);let o=t.get(n);o||t.set(n,o=Je((()=>t.delete(n)))),Xe(je,o)}}function nt(e,t,n,o,r,i){const s=Ze.get(e);if(!s)return;let a=[];if("clear"===t)a=[...s.values()];else if("length"===n&&p(e)){const e=Number(o);s.forEach(((t,n)=>{("length"===n||!y(n)&&n>=e)&&a.push(t)}))}else switch(void 0!==n&&a.push(s.get(n)),t){case"add":p(e)?T(n)&&a.push(s.get("length")):(a.push(s.get(Qe)),h(e)&&a.push(s.get(et)));break;case"delete":p(e)||(a.push(s.get(Qe)),h(e)&&a.push(s.get(et)));break;case"set":h(e)&&a.push(s.get(Qe))}Ye();for(const l of a)l&&Ge(l,4);qe()}const ot=n("__proto__,__v_isRef,__isVue"),rt=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),it=st();function st(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Xt(this);for(let t=0,r=this.length;t{e[t]=function(...e){ze(),Ye();const n=Xt(this)[t].apply(this,e);return qe(),Ue(),n}})),e}function at(e){const t=Xt(this);return tt(t,0,e),t.hasOwnProperty(e)}class lt{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?Bt:It:r?Nt:Rt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const i=p(e);if(!o){if(i&&f(it,t))return Reflect.get(it,t,n);if("hasOwnProperty"===t)return at}const s=Reflect.get(e,t,n);return(y(t)?rt.has(t):ot(t))?s:(o||tt(e,0,t),r?s:tn(s)?i&&T(t)?s:s.value:_(s)?o?Vt(s):Ft(s):s)}}class ct extends lt{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._isShallow){const t=Ut(r);if(Yt(n)||Ut(n)||(r=Xt(r),n=Xt(n)),!p(e)&&tn(r)&&!tn(n))return!t&&(r.value=n,!0)}const i=p(e)&&T(t)?Number(t)e,mt=e=>Reflect.getPrototypeOf(e);function gt(e,t,n=!1,o=!1){const r=Xt(e=e.__v_raw),i=Xt(t);n||(P(t,i)&&tt(r,0,t),tt(r,0,i));const{has:s}=mt(r),a=o?ht:n?Jt:Gt;return s.call(r,t)?a(e.get(t)):s.call(r,i)?a(e.get(i)):void(e!==r&&e.get(t))}function vt(e,t=!1){const n=this.__v_raw,o=Xt(n),r=Xt(e);return t||(P(e,r)&&tt(o,0,e),tt(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function yt(e,t=!1){return e=e.__v_raw,!t&&tt(Xt(e),0,Qe),Reflect.get(e,"size",e)}function _t(e){e=Xt(e);const t=Xt(this);return mt(t).has.call(t,e)||(t.add(e),nt(t,"add",e,e)),this}function bt(e,t){t=Xt(t);const n=Xt(this),{has:o,get:r}=mt(n);let i=o.call(n,e);i||(e=Xt(e),i=o.call(n,e));const s=r.call(n,e);return n.set(e,t),i?P(t,s)&&nt(n,"set",e,t):nt(n,"add",e,t),this}function wt(e){const t=Xt(this),{has:n,get:o}=mt(t);let r=n.call(t,e);r||(e=Xt(e),r=n.call(t,e)),o&&o.call(t,e);const i=t.delete(e);return r&&nt(t,"delete",e,void 0),i}function xt(){const e=Xt(this),t=0!==e.size,n=e.clear();return t&&nt(e,"clear",void 0,void 0),n}function St(e,t){return function(n,o){const r=this,i=r.__v_raw,s=Xt(i),a=t?ht:e?Jt:Gt;return!e&&tt(s,0,Qe),i.forEach(((e,t)=>n.call(o,a(e),a(t),r)))}}function Tt(e,t,n){return function(...o){const r=this.__v_raw,i=Xt(r),s=h(i),a="entries"===e||e===Symbol.iterator&&s,l="keys"===e&&s,c=r[e](...o),u=n?ht:t?Jt:Gt;return!t&&tt(i,0,l?et:Qe),{next(){const{value:e,done:t}=c.next();return t?{value:e,done:t}:{value:a?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Et(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Ct(){const e={get(e){return gt(this,e)},get size(){return yt(this)},has:vt,add:_t,set:bt,delete:wt,clear:xt,forEach:St(!1,!1)},t={get(e){return gt(this,e,!1,!0)},get size(){return yt(this)},has:vt,add:_t,set:bt,delete:wt,clear:xt,forEach:St(!1,!0)},n={get(e){return gt(this,e,!0)},get size(){return yt(this,!0)},has(e){return vt.call(this,e,!0)},add:Et("add"),set:Et("set"),delete:Et("delete"),clear:Et("clear"),forEach:St(!0,!1)},o={get(e){return gt(this,e,!0,!0)},get size(){return yt(this,!0)},has(e){return vt.call(this,e,!0)},add:Et("add"),set:Et("set"),delete:Et("delete"),clear:Et("clear"),forEach:St(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Tt(r,!1,!1),n[r]=Tt(r,!0,!1),t[r]=Tt(r,!1,!0),o[r]=Tt(r,!0,!0)})),[e,n,t,o]}const[kt,Ot,Lt,At]=Ct();function $t(e,t){const n=t?e?At:Lt:e?Ot:kt;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(f(n,o)&&o in t?n:t,o,r)}const Mt={get:$t(!1,!1)},Pt={get:$t(!1,!0)},jt={get:$t(!0,!1)},Rt=new WeakMap,Nt=new WeakMap,It=new WeakMap,Bt=new WeakMap;function Dt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>x(e).slice(8,-1))(e))}function Ft(e){return Ut(e)?e:Wt(e,!1,dt,Mt,Rt)}function Ht(e){return Wt(e,!1,pt,Pt,Nt)}function Vt(e){return Wt(e,!0,ft,jt,It)}function Wt(e,t,n,o,r){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const s=Dt(e);if(0===s)return e;const a=new Proxy(e,2===s?o:n);return r.set(e,a),a}function zt(e){return Ut(e)?zt(e.__v_raw):!(!e||!e.__v_isReactive)}function Ut(e){return!(!e||!e.__v_isReadonly)}function Yt(e){return!(!e||!e.__v_isShallow)}function qt(e){return zt(e)||Ut(e)}function Xt(e){const t=e&&e.__v_raw;return t?Xt(t):e}function Kt(e){return Object.isExtensible(e)&&R(e,"__v_skip",!0),e}const Gt=e=>_(e)?Ft(e):e,Jt=e=>_(e)?Vt(e):e;class Zt{constructor(e,t,n,o){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ie((()=>e(this._value)),(()=>en(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=Xt(this);return e._cacheable&&!e.effect.dirty||!P(e._value,e._value=e.effect.run())||en(e,4),Qt(e),e.effect._dirtyLevel>=2&&en(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Qt(e){var t;He&&je&&(e=Xt(e),Xe(je,null!=(t=e.dep)?t:e.dep=Je((()=>e.dep=void 0),e instanceof Zt?e:void 0)))}function en(e,t=4,n){const o=(e=Xt(e)).dep;o&&Ge(o,t)}function tn(e){return!(!e||!0!==e.__v_isRef)}function nn(e){return on(e,!1)}function on(e,t){return tn(e)?e:new rn(e,t)}class rn{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Xt(e),this._value=t?e:Gt(e)}get value(){return Qt(this),this._value}set value(e){const t=this.__v_isShallow||Yt(e)||Ut(e);e=t?e:Xt(e),P(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Gt(e),en(this,4))}}function sn(e){return tn(e)?e.value:e}const an={get:(e,t,n)=>sn(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return tn(r)&&!tn(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function ln(e){return zt(e)?e:new Proxy(e,an)}function cn(e,t,n,o){try{return o?e(...o):e()}catch(r){dn(r,t,n)}}function un(e,t,n,o){if(g(e)){const r=cn(e,t,n,o);return r&&b(r)&&r.catch((e=>{dn(e,t,n)})),r}const r=[];for(let i=0;i>>1,r=hn[o],i=Cn(r);iCn(e)-Cn(t)));if(gn.length=0,vn)return void vn.push(...e);for(vn=e,yn=0;ynnull==e.id?1/0:e.id,kn=(e,t)=>{const n=Cn(e)-Cn(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function On(e){pn=!1,fn=!0,hn.sort(kn);try{for(mn=0;mnv(e)?e.trim():e))),t&&(i=n.map(N))}let l,c=r[l=M(t)]||r[l=M(O(t))];!c&&s&&(c=r[l=M(A(t))]),c&&un(c,e,6,An(e,c,i));const u=r[l+"Once"];if(u){if(e.emitted){if(e.emitted[l])return}else e.emitted={};e.emitted[l]=!0,un(u,e,6,An(e,u,i))}}function An(e,t,n){if(1!==n.length)return n;if(g(t)){if(t.length<2)return n}else if(!t.find((e=>e.length>=2)))return n;const o=n[0];if(o&&f(o,"type")&&f(o,"timeStamp")&&f(o,"target")&&f(o,"currentTarget")&&f(o,"detail")){const t=e.proxy,o=t.$gcd(t,!0);o&&n.push(o)}return n}function $n(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const i=e.emits;let s={},a=!1;if(!g(e)){const o=e=>{const n=$n(e,t,!0);n&&(a=!0,c(s,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return i||a?(p(i)?i.forEach((e=>s[e]=null)):c(s,i),_(e)&&o.set(e,s),s):(_(e)&&o.set(e,null),null)}function Mn(e,t){return!(!e||!a(t))&&(t=t.slice(2).replace(/Once$/,""),f(e,t[0].toLowerCase()+t.slice(1))||f(e,A(t))||f(e,t))}let Pn=null,jn=null;function Rn(e){const t=Pn;return Pn=e,jn=e&&e.type.__scopeId||null,t}function Nn(e,t=Pn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Wr(-1);const r=Rn(t);let i;try{i=e(...n)}finally{Rn(r),o._d&&Wr(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function In(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:i,propsOptions:[s],slots:a,attrs:c,emit:u,render:d,renderCache:f,data:p,setupState:h,ctx:m,inheritAttrs:g}=e;let v,y;const _=Rn(e);try{if(4&n.shapeFlag){const e=r||o,t=e;v=oi(d.call(t,e,f,i,h,p,m)),y=c}else{const e=t;0,v=oi(e.length>1?e(i,{attrs:c,slots:a,emit:u}):e(i,null)),y=t.props?c:Bn(c)}}catch(w){Dr.length=0,dn(w,e,1),v=Qr(Ir)}let b=v;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=b;e.length&&7&t&&(s&&e.some(l)&&(y=Dn(y,s)),b=ei(b,y))}return n.dirs&&(b=ei(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),v=b,Rn(_),v}const Bn=e=>{let t;for(const n in e)("class"===n||"style"===n||a(n))&&((t||(t={}))[n]=e[n]);return t},Dn=(e,t)=>{const n={};for(const o in e)l(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Fn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;re.__isSuspense;const qn=Symbol.for("v-scx");function Xn(e,t){return Jn(e,null,t)}const Kn={};function Gn(e,t,n){return Jn(e,t,n)}function Jn(e,t,{immediate:n,deep:r,flush:s,once:a,onTrack:l,onTrigger:c}=o){if(t&&a){const e=t;t=(...t)=>{e(...t),C()}}const d=ui,f=e=>!0===r?e:eo(e,!1===r?1:void 0);let h,m,v=!1,y=!1;if(tn(e)?(h=()=>e.value,v=Yt(e)):zt(e)?(h=()=>f(e),v=!0):p(e)?(y=!0,v=e.some((e=>zt(e)||Yt(e))),h=()=>e.map((e=>tn(e)?e.value:zt(e)?f(e):g(e)?cn(e,d,2):void 0))):h=g(e)?t?()=>cn(e,d,2):()=>(m&&m(),un(e,d,3,[b])):i,t&&r){const e=h;h=()=>eo(e())}let _,b=e=>{m=T.onStop=()=>{cn(e,d,4),m=T.onStop=void 0}};if(vi){if(b=i,t?n&&un(t,d,3,[h(),y?[]:void 0,b]):h(),"sync"!==s)return i;{const e=mr(qn);_=e.__watcherHandles||(e.__watcherHandles=[])}}let w=y?new Array(e.length).fill(Kn):Kn;const x=()=>{if(T.active&&T.dirty)if(t){const e=T.run();(r||v||(y?e.some(((e,t)=>P(e,w[t]))):P(e,w)))&&(m&&m(),un(t,d,3,[e,w===Kn?void 0:y&&w[0]===Kn?[]:w,b]),w=e)}else T.run()};let S;x.allowRecurse=!!t,"sync"===s?S=x:"post"===s?S=()=>Lr(x,d&&d.suspense):(x.pre=!0,d&&(x.id=d.uid),S=()=>xn(x));const T=new Ie(h,i,S),E=Pe,C=()=>{T.stop(),E&&u(E.effects,T)};return t?n?x():w=T.run():"post"===s?Lr(T.run.bind(T),d&&d.suspense):T.run(),_&&_.push(C),C}function Zn(e,t,n){const o=this.proxy,r=v(e)?e.includes(".")?Qn(o,e):()=>o[e]:e.bind(o,o);let i;g(t)?i=t:(i=t.handler,n=t);const s=hi(this),a=Jn(r,i.bind(o),n);return s(),a}function Qn(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e0){if(n>=t)return e;n++}if((o=o||new Set).has(e))return e;if(o.add(e),tn(e))eo(e.value,t,n,o);else if(p(e))for(let r=0;r{eo(e,t,n,o)}));else if(S(e))for(const r in e)eo(e[r],t,n,o);return e}function to(e,t){if(null===Pn)return e;const n=bi(Pn)||Pn.proxy,r=e.dirs||(e.dirs=[]);for(let i=0;i{e.isMounted=!0})),Bo((()=>{e.isUnmounting=!0})),e}();return()=>{const r=t.default&&ho(t.default(),!0);if(!r||!r.length)return;let i=r[0];if(r.length>1)for(const e of r)if(e.type!==Ir){i=e;break}const s=Xt(e),{mode:a}=s;if(o.isLeaving)return uo(i);const l=fo(i);if(!l)return uo(i);const c=co(l,s,o,n);po(l,c);const u=n.subTree,d=u&&fo(u);if(d&&d.type!==Ir&&!Xr(l,d)){const e=co(d,s,o,n);if(po(d,e),"out-in"===a)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&(n.effect.dirty=!0,n.update())},uo(i);"in-out"===a&&l.type!==Ir&&(e.delayLeave=(e,t,n)=>{lo(o,d)[String(d.key)]=d,e[oo]=()=>{t(),e[oo]=void 0,delete c.delayedLeave},c.delayedLeave=n})}return i}}};function lo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function co(e,t,n,o){const{appear:r,mode:i,persisted:s=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:y,onAppearCancelled:_}=t,b=String(e.key),w=lo(n,e),x=(e,t)=>{e&&un(e,o,9,t)},S=(e,t)=>{const n=t[1];x(e,t),p(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},T={mode:i,persisted:s,beforeEnter(t){let o=a;if(!n.isMounted){if(!r)return;o=g||a}t[oo]&&t[oo](!0);const i=w[b];i&&Xr(e,i)&&i.el[oo]&&i.el[oo](),x(o,[t])},enter(e){let t=l,o=c,i=u;if(!n.isMounted){if(!r)return;t=v||l,o=y||c,i=_||u}let s=!1;const a=e[ro]=t=>{s||(s=!0,x(t?i:o,[e]),T.delayedLeave&&T.delayedLeave(),e[ro]=void 0)};t?S(t,[e,a]):a()},leave(t,o){const r=String(e.key);if(t[ro]&&t[ro](!0),n.isUnmounting)return o();x(d,[t]);let i=!1;const s=t[oo]=n=>{i||(i=!0,o(),x(n?m:h,[t]),t[oo]=void 0,w[r]===e&&delete w[r])};w[r]=e,f?S(f,[t,s]):s()},clone:e=>co(e,t,n,o)};return T}function uo(e){if(_o(e))return(e=ei(e)).children=null,e}function fo(e){return _o(e)?e.children?e.children[0]:void 0:e}function po(e,t){6&e.shapeFlag&&e.component?po(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ho(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;ic({name:e.name},t,{setup:e}))():e}const go=e=>!!e.type.__asyncLoader -/*! #__NO_SIDE_EFFECTS__ */;function vo(e){g(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:i,suspensible:s=!0,onError:a}=e;let l,c=null,u=0;const d=()=>{let e;return c||(e=c=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),a)return new Promise(((t,n)=>{a(e,(()=>t((u++,c=null,d()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==c&&c?c:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),l=t,t))))};return mo({name:"AsyncComponentWrapper",__asyncLoader:d,get __asyncResolved(){return l},setup(){const e=ui;if(l)return()=>yo(l,e);const t=t=>{c=null,dn(t,e,13,!o)};if(s&&e.suspense||vi)return d().then((t=>()=>yo(t,e))).catch((e=>(t(e),()=>o?Qr(o,{error:e}):null)));const a=nn(!1),u=nn(),f=nn(!!r);return r&&setTimeout((()=>{f.value=!1}),r),null!=i&&setTimeout((()=>{if(!a.value&&!u.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),u.value=e}}),i),d().then((()=>{a.value=!0,e.parent&&_o(e.parent.vnode)&&(e.parent.effect.dirty=!0,xn(e.parent.update))})).catch((e=>{t(e),u.value=e})),()=>a.value&&l?yo(l,e):u.value&&o?Qr(o,{error:u.value}):n&&!f.value?Qr(n):void 0}})}function yo(e,t){const{ref:n,props:o,children:r,ce:i}=t.vnode,s=Qr(e,o,r);return s.ref=n,s.ce=i,delete t.vnode.ce,s}const _o=e=>e.type.__isKeepAlive;class bo{constructor(e){this.max=e,this._cache=new Map,this._keys=new Set,this._max=parseInt(e,10)}get(e){const{_cache:t,_keys:n,_max:o}=this,r=t.get(e);if(r)n.delete(e),n.add(e);else if(n.add(e),o&&n.size>o){const e=n.values().next().value;this.pruneCacheEntry(t.get(e)),this.delete(e)}return r}set(e,t){this._cache.set(e,t)}delete(e){this._cache.delete(e),this._keys.delete(e)}forEach(e,t){this._cache.forEach(e.bind(t))}}const wo={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number],matchBy:{type:String,default:"name"},cache:Object},setup(e,{slots:t}){const n=di(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=e.cache||new bo(e.max);r.pruneCacheEntry=s;let i=null;function s(t){var o;!i||!Xr(t,i)||"key"===e.matchBy&&t.key!==i.key?(Oo(o=t),u(o,n,a,!0)):i&&Oo(i)}const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=o,f=d("div");function p(t){r.forEach(((n,o)=>{const i=Ao(n,e.matchBy);!i||t&&t(i)||(r.delete(o),s(n))}))}o.activate=(e,t,n,o,r)=>{const i=e.component;if(i.ba){const e=i.isDeactivated;i.isDeactivated=!1,j(i.ba),i.isDeactivated=e}c(e,t,n,0,a),l(i.vnode,e,t,n,i,a,o,e.slotScopeIds,r),Lr((()=>{i.isDeactivated=!1,i.a&&j(i.a);const t=e.props&&e.props.onVnodeMounted;t&&ai(t,i.parent,e)}),a)},o.deactivate=e=>{const t=e.component;t.bda&&$o(t.bda),c(e,f,null,1,a),Lr((()=>{t.bda&&t.bda.forEach((e=>e.__called=!1)),t.da&&j(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&ai(n,t.parent,e),t.isDeactivated=!0}),a)},Gn((()=>[e.include,e.exclude,e.matchBy]),(([e,t])=>{e&&p((t=>So(e,t))),t&&p((e=>!So(t,e)))}),{flush:"post",deep:!0});let h=null;const m=()=>{null!=h&&r.set(h,Lo(n.subTree))};return Ro(m),Io(m),Bo((()=>{r.forEach(((t,o)=>{r.delete(o),s(t);const{subTree:i,suspense:a}=n,l=Lo(i);if(t.type!==l.type||"key"===e.matchBy&&t.key!==l.key);else{l.component.bda&&j(l.component.bda),Oo(l);const e=l.component.da;e&&Lr(e,a)}}))})),()=>{if(h=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!qr(o)||!(4&o.shapeFlag)&&!Yn(o.type))return i=null,o;let s=Lo(o);const a=s.type,l=Ao(s,e.matchBy),{include:c,exclude:u}=e;if(c&&(!l||!So(c,l))||u&&l&&So(u,l))return i=s,o;const d=null==s.key?a:s.key,f=r.get(d);return s.el&&(s=ei(s),Yn(o.type)&&(o.ssContent=s)),h=d,f&&(s.el=f.el,s.component=f.component,s.transition&&po(s,s.transition),s.shapeFlag|=512),s.shapeFlag|=256,i=s,Yn(o.type)?o:s}}},xo=wo;function So(e,t){return p(e)?e.some((e=>So(e,t))):v(e)?e.split(",").includes(t):"[object RegExp]"===x(e)&&e.test(t)}function To(e,t){Co(e,"a",t)}function Eo(e,t){Co(e,"da",t)}function Co(e,t,n=ui){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(o.__called=!1,Mo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)_o(e.parent.vnode)&&ko(o,t,n,e),e=e.parent}}function ko(e,t,n,o){const r=Mo(t,e,o,!0);Do((()=>{u(o[t],r)}),n)}function Oo(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Lo(e){return Yn(e.type)?e.ssContent:e}function Ao(e,t){if("name"===t){const t=e.type;return wi(go(e)?t.__asyncResolved||{}:t)}return String(e.key)}function $o(e){for(let t=0;t-1&&n.$pageInstance){if(n.type.__reserved)return;if(n!==n.$pageInstance&&(n=n.$pageInstance,function(e){return["onLoad","onShow"].indexOf(e)>-1}(e))){const o=n.proxy;un(t.bind(o),n,e,"onLoad"===e?[o.$page.options]:[])}}const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;ze();const r=hi(n),i=un(t,n,e,o);return r(),Ue(),i});return o?i.unshift(s):i.push(s),s}var r}const Po=e=>(t,n=ui)=>(!vi||"sp"===e)&&Mo(e,((...e)=>t(...e)),n),jo=Po("bm"),Ro=Po("m"),No=Po("bu"),Io=Po("u"),Bo=Po("bum"),Do=Po("um"),Fo=Po("sp"),Ho=Po("rtg"),Vo=Po("rtc");function Wo(e,t=ui){Mo("ec",e,t)}function zo(e,t,n,o){let r;const i=n&&n[o];if(p(e)||v(e)){r=new Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,i&&i[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,s=n.length;o!qr(e)||e.type!==Ir&&!(e.type===Rr&&!Yo(e.children))))?e:null}const qo=e=>{if(!e)return null;if(gi(e)){return bi(e)||e.proxy}return qo(e.parent)},Xo=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>qo(e.parent),$root:e=>qo(e.root),$emit:e=>e.emit,$options:e=>nr(e),$forceUpdate:e=>e.f||(e.f=(e=>function(){e.effect.dirty=!0,xn(e.update)})(e)),$nextTick:e=>e.n||(e.n=wn.bind(e.proxy)),$watch:e=>Zn.bind(e)}),Ko=(e,t)=>e!==o&&!e.__isScriptSetup&&f(e,t),Go={get({_:e},t){const{ctx:n,setupState:r,data:i,props:s,accessCache:a,type:l,appContext:c}=e;let u;if("$"!==t[0]){const l=a[t];if(void 0!==l)switch(l){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(Ko(r,t))return a[t]=1,r[t];if(i!==o&&f(i,t))return a[t]=2,i[t];if((u=e.propsOptions[0])&&f(u,t))return a[t]=3,s[t];if(n!==o&&f(n,t))return a[t]=4,n[t];Zo&&(a[t]=0)}}const d=Xo[t];let p,h;return d?("$attrs"===t&&tt(e,0,t),d(e)):(p=l.__cssModules)&&(p=p[t])?p:n!==o&&f(n,t)?(a[t]=4,n[t]):(h=c.config.globalProperties,f(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:r,setupState:i,ctx:s}=e;return Ko(i,t)?(i[t]=n,!0):r!==o&&f(r,t)?(r[t]=n,!0):!f(e.props,t)&&(("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:s}},a){let l;return!!n[a]||e!==o&&f(e,a)||Ko(t,a)||(l=s[0])&&f(l,a)||f(r,a)||f(Xo,a)||f(i.config.globalProperties,a)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:f(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Jo(e){return p(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}let Zo=!0;function Qo(e){const t=nr(e),n=e.proxy,o=e.ctx;Zo=!1,t.beforeCreate&&er(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:a,watch:l,provide:c,inject:u,created:d,beforeMount:f,mounted:h,beforeUpdate:m,updated:v,activated:y,deactivated:b,beforeDestroy:w,beforeUnmount:x,destroyed:S,unmounted:T,render:E,renderTracked:C,renderTriggered:k,errorCaptured:O,serverPrefetch:L,expose:A,inheritAttrs:$,components:M,directives:P,filters:j}=t;if(u&&function(e,t,n=i){p(e)&&(e=sr(e));for(const o in e){const n=e[o];let r;r=_(n)?"default"in n?mr(n.from||o,n.default,!0):mr(n.from||o):mr(n),tn(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(u,o,null),a)for(const i in a){const e=a[i];g(e)&&(o[i]=e.bind(n))}if(r){const t=r.call(n,n);_(t)&&(e.data=Ft(t))}if(Zo=!0,s)for(const p in s){const e=s[p],t=g(e)?e.bind(n,n):g(e.get)?e.get.bind(n,n):i,r=!g(e)&&g(e.set)?e.set.bind(n):i,a=xi({get:t,set:r});Object.defineProperty(o,p,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(l)for(const i in l)tr(l[i],o,n,i);if(c){const e=g(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{hr(t,e[t])}))}function R(e,t){p(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&er(d,e,"c"),R(jo,f),R(Ro,h),R(No,m),R(Io,v),R(To,y),R(Eo,b),R(Wo,O),R(Vo,C),R(Ho,k),R(Bo,x),R(Do,T),R(Fo,L),p(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});E&&e.render===i&&(e.render=E),null!=$&&(e.inheritAttrs=$),M&&(e.components=M),P&&(e.directives=P);const N=e.appContext.config.globalProperties.$applyOptions;N&&N(t,e,n)}function er(e,t,n){un(p(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function tr(e,t,n,o){const r=o.includes(".")?Qn(n,o):()=>n[o];if(v(e)){const n=t[e];g(n)&&Gn(r,n)}else if(g(e))Gn(r,e.bind(n));else if(_(e))if(p(e))e.forEach((e=>tr(e,t,n,o)));else{const o=g(e.handler)?e.handler.bind(n):t[e.handler];g(o)&&Gn(r,o,e)}}function nr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,a=i.get(t);let l;return a?l=a:r.length||n||o?(l={},r.length&&r.forEach((e=>or(l,e,s,!0))),or(l,t,s)):l=t,_(t)&&i.set(t,l),l}function or(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&or(e,i,n,!0),r&&r.forEach((t=>or(e,t,n,!0)));for(const s in t)if(o&&"expose"===s);else{const o=rr[s]||n&&n[s];e[s]=o?o(e[s],t[s]):t[s]}return e}const rr={data:ir,props:cr,emits:cr,methods:lr,computed:lr,beforeCreate:ar,created:ar,beforeMount:ar,mounted:ar,beforeUpdate:ar,updated:ar,beforeDestroy:ar,beforeUnmount:ar,destroyed:ar,unmounted:ar,activated:ar,deactivated:ar,errorCaptured:ar,serverPrefetch:ar,components:lr,directives:lr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const o in t)n[o]=ar(e[o],t[o]);return n},provide:ir,inject:function(e,t){return lr(sr(e),sr(t))}};function ir(e,t){return t?e?function(){return c(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function sr(e){if(p(e)){const t={};for(let n=0;n(i.has(e)||(e&&g(e.install)?(i.add(e),e.install(a,...t)):g(e)&&(i.add(e),e(a,...t))),a),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),a),component:(e,t)=>t?(r.components[e]=t,a):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,a):r.directives[e],mount(i,l,c){if(!s){const u=Qr(n,o);return u.appContext=r,!0===c?c="svg":!1===c&&(c=void 0),l&&t?t(u,i):e(u,i,c),s=!0,a._container=i,i.__vue_app__=a,a._instance=u.component,bi(u.component)||u.component.proxy}},unmount(){s&&(e(null,a._container),delete a._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,a),runWithContext(e){const t=pr;pr=a;try{return e()}finally{pr=t}}};return a}}let pr=null;function hr(e,t){if(ui){let n=ui.provides;const o=ui.parent&&ui.parent.provides;o===n&&(n=ui.provides=Object.create(o)),n[e]=t,"app"===ui.type.mpType&&ui.appContext.app.provide(e,t)}else;}function mr(e,t,n=!1){const o=ui||Pn;if(o||pr){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:pr._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&g(t)?t.call(o&&o.proxy):t}}function gr(e,t,n,r){const[i,s]=e.propsOptions;let a,l=!1;if(t)for(let o in t){if(E(o))continue;const c=t[o];let u;i&&f(i,u=O(o))?s&&s.includes(u)?(a||(a={}))[u]=c:n[u]=c:Mn(e.emitsOptions,o)||o in r&&c===r[o]||(r[o]=c,l=!0)}if(s){const t=Xt(n),r=a||o;for(let o=0;o{d=!0;const[n,o]=yr(e,t,!0);c(l,n),o&&u.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!a&&!d)return _(e)&&i.set(e,r),r;if(p(a))for(let r=0;r-1,n[1]=o<0||t-1||f(n,"default"))&&u.push(e)}}}const h=[l,u];return _(e)&&i.set(e,h),h}function _r(e){return"$"!==e[0]&&!E(e)}function br(e){if(null===e)return"null";if("function"==typeof e)return e.name||"";if("object"==typeof e){return e.constructor&&e.constructor.name||""}return""}function wr(e,t){return br(e)===br(t)}function xr(e,t){return p(t)?t.findIndex((t=>wr(t,e))):g(t)&&wr(t,e)?0:-1}const Sr=e=>"_"===e[0]||"$stable"===e,Tr=e=>p(e)?e.map(oi):[oi(e)],Er=(e,t,n)=>{if(t._n)return t;const o=Nn(((...e)=>Tr(t(...e))),n);return o._c=!1,o},Cr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Sr(r))continue;const n=e[r];if(g(n))t[r]=Er(0,n,o);else if(null!=n){const e=Tr(n);t[r]=()=>e}}},kr=(e,t)=>{const n=Tr(t);e.slots.default=()=>n};function Or(e,t,n,r,i=!1){if(p(e))return void e.forEach(((e,o)=>Or(e,t&&(p(t)?t[o]:t),n,r,i)));if(go(r)&&!i)return;const s=4&r.shapeFlag?bi(r.component)||r.component.proxy:r.el,a=i?null:s,{i:l,r:c}=e,d=t&&t.r,h=l.refs===o?l.refs={}:l.refs,m=l.setupState;if(null!=d&&d!==c&&(v(d)?(h[d]=null,f(m,d)&&(m[d]=null)):tn(d)&&(d.value=null)),g(c))cn(c,l,12,[a,h]);else{const t=v(c),o=tn(c);if(t||o){const r=()=>{if(e.f){const n=t?f(m,c)?m[c]:h[c]:c.value;i?p(n)&&u(n,s):p(n)?n.includes(s)||n.push(s):t?(h[c]=[s],f(m,c)&&(m[c]=h[c])):(c.value=[s],e.k&&(h[e.k]=c.value))}else t?(h[c]=a,f(m,c)&&(m[c]=a)):o&&(c.value=a,e.k&&(h[e.k]=a))};a?(r.id=-1,Lr(r,n)):r()}}}const Lr=function(e,t){var n;t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):(p(n=e)?gn.push(...n):vn&&vn.includes(n,n.allowRecurse?yn+1:yn)||gn.push(n),Sn())};function Ar(e){return function(e,t){B().__VUE__=!0;const{insert:n,remove:s,patchProp:a,forcePatchProp:l,createElement:u,createText:d,createComment:p,setText:h,setElementText:m,parentNode:g,nextSibling:v,setScopeId:y=i,insertStaticContent:_}=e,w=(e,t,n,o=null,r=null,i=null,s,a=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Xr(e,t)&&(o=te(e),G(e,r,i,!0),e=null),-2===t.patchFlag&&(l=!1,t.dynamicChildren=null);const{type:c,ref:u,shapeFlag:d}=t;switch(c){case Nr:x(e,t,n,o);break;case Ir:S(e,t,n,o);break;case Br:null==e&&T(t,n,o,s);break;case Rr:F(e,t,n,o,r,i,s,a,l);break;default:1&d?L(e,t,n,o,r,i,s,a,l):6&d?H(e,t,n,o,r,i,s,a,l):(64&d||128&d)&&c.process(e,t,n,o,r,i,s,a,l,re)}null!=u&&r&&Or(u,e&&e.ref,i,t||e,!t)},x=(e,t,o,r)=>{if(null==e)n(t.el=d(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&h(n,t.children)}},S=(e,t,o,r)=>{null==e?n(t.el=p(t.children||""),o,r):t.el=e.el},T=(e,t,n,o)=>{[e.el,e.anchor]=_(e.children,t,n,o,e.el,e.anchor)},C=({el:e,anchor:t},o,r)=>{let i;for(;e&&e!==t;)i=v(e),n(e,o,r),e=i;n(t,o,r)},k=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=v(e),s(e),e=n;s(t)},L=(e,t,n,o,r,i,s,a,l)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?$(t,n,o,r,i,s,a,l):N(e,t,r,i,s,a,l)},$=(e,t,o,r,i,s,l,c)=>{let d,f;const{props:p,shapeFlag:h,transition:g,dirs:v}=e;if(d=e.el=u(e.type,s,p&&p.is,p),8&h?m(d,e.children):16&h&&P(e.children,d,null,r,i,$r(e,s),l,c),v&&no(e,null,r,"created"),M(d,e,e.scopeId,l,r),p){for(const t in p)"value"===t||E(t)||a(d,t,null,p[t],s,e.children,r,i,ee);"value"in p&&a(d,"value",null,p.value,s),(f=p.onVnodeBeforeMount)&&ai(f,r,e)}Object.defineProperty(d,"__vueParentComponent",{value:r,enumerable:!1}),v&&no(e,null,r,"beforeMount");const y=function(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}(i,g);y&&g.beforeEnter(d),n(d,t,o),((f=p&&p.onVnodeMounted)||y||v)&&Lr((()=>{f&&ai(f,r,e),y&&g.enter(d),v&&no(e,null,r,"mounted")}),i)},M=(e,t,n,o,r)=>{if(n&&y(e,n),o)for(let i=0;i{for(let c=l;c{const u=t.el=e.el;let{patchFlag:d,dynamicChildren:f,dirs:p}=t;d|=16&e.patchFlag;const h=e.props||o,g=t.props||o;let v;if(n&&Mr(n,!1),(v=g.onVnodeBeforeUpdate)&&ai(v,n,t,e),p&&no(t,e,n,"beforeUpdate"),n&&Mr(n,!0),f?I(e.dynamicChildren,f,u,n,r,$r(t,i),s):c||Y(e,t,u,null,n,r,$r(t,i),s,!1),d>0){if(16&d)D(u,t,h,g,n,r,i);else if(2&d&&h.class!==g.class&&a(u,"class",null,g.class,i),4&d&&a(u,"style",h.style,g.style,i),8&d){const o=t.dynamicProps;for(let t=0;t{v&&ai(v,n,t,e),p&&no(t,e,n,"updated")}),r)},I=(e,t,n,o,r,i,s)=>{for(let a=0;a{if(n!==r){if(n!==o)for(const o in n)E(o)||o in r||a(e,o,n[o],null,c,t.children,i,s,ee);for(const o in r){if(E(o))continue;const u=r[o],d=n[o];(u!==d&&"value"!==o||l&&l(e,o))&&a(e,o,d,u,c,t.children,i,s,ee)}"value"in r&&a(e,"value",n.value,r.value,c)}},F=(e,t,o,r,i,s,a,l,c)=>{const u=t.el=e?e.el:d(""),f=t.anchor=e?e.anchor:d("");let{patchFlag:p,dynamicChildren:h,slotScopeIds:m}=t;m&&(l=l?l.concat(m):m),null==e?(n(u,o,r),n(f,o,r),P(t.children||[],o,f,i,s,a,l,c)):p>0&&64&p&&h&&e.dynamicChildren?(I(e.dynamicChildren,h,o,i,s,a,l),(null!=t.key||i&&t===i.subTree)&&Pr(e,t,!0)):Y(e,t,o,f,i,s,a,l,c)},H=(e,t,n,o,r,i,s,a,l)=>{t.slotScopeIds=a,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,s,l):V(t,n,o,r,i,s,l):W(e,t,l)},V=(e,t,n,r,i,s,a)=>{const l=e.component=function(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||li,s={uid:ci++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Re(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:yr(r,i),emitsOptions:$n(r,i),emit:null,emitted:null,propsDefaults:o,inheritAttrs:r.inheritAttrs,ctx:o,data:o,props:o,attrs:o,slots:o,refs:o,setupState:o,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,bda:null,da:null,ba:null,a:null,rtg:null,rtc:null,ec:null,sp:null};s.ctx={_:s},s.root=t?t.root:s,s.emit=Ln.bind(null,s),s.$pageInstance=t&&t.$pageInstance,e.ce&&e.ce(s);return s}(e,r,i);if(_o(e)&&(l.ctx.renderer=re),function(e,t=!1){t&&pi(t);const{props:n,children:o}=e.vnode,r=gi(e);(function(e,t,n,o=!1){const r={},i={};R(i,Kr,1),e.propsDefaults=Object.create(null),gr(e,t,r,i);for(const s in e.propsOptions[0])s in r||(r[s]=void 0);n?e.props=o?r:Ht(r):e.type.props?e.props=r:e.props=i,e.attrs=i})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Xt(t),R(t,"_",n)):Cr(t,e.slots={})}else e.slots={},t&&kr(e,t);R(e.slots,Kr,1)})(e,o);const i=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Kt(new Proxy(e.ctx,Go));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(tt(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}(e):null,r=hi(e);ze();const i=cn(o,e,0,[e.props,n]);if(Ue(),r(),b(i)){if(i.then(mi,mi),t)return i.then((n=>{yi(e,n,t)})).catch((t=>{dn(t,e,0)}));e.asyncDep=i}else yi(e,i,t)}else _i(e,t)}(e,t):void 0;t&&pi(!1)}(l),l.asyncDep){if(i&&i.registerDep(l,z),!e.el){const e=l.subTree=Qr(Ir);S(null,e,t,n)}}else z(l,e,t,n,i,s,a)},W=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:i}=e,{props:s,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&l>=0))return!(!r&&!a||a&&a.$stable)||o!==s&&(o?!s||Fn(o,s,c):!!s);if(1024&l)return!0;if(16&l)return o?Fn(o,s,c):!!s;if(8&l){const e=t.dynamicProps;for(let t=0;tmn&&hn.splice(t,1)}(o.update),o.effect.dirty=!0,o.update()}else t.el=e.el,o.vnode=t},z=(e,t,n,o,r,s,a)=>{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:i,vnode:c}=e;{const n=jr(e);if(n)return t&&(t.el=c.el,U(e,t,a)),void n.asyncDep.then((()=>{e.isUnmounted||l()}))}let u,d=t;Mr(e,!1),t?(t.el=c.el,U(e,t,a)):t=c,n&&j(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&ai(u,i,t,c),Mr(e,!0);const f=In(e),p=e.subTree;e.subTree=f,w(p,f,g(p.el),te(p),e,r,s),t.el=f.el,null===d&&function({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o!==e)break;(e=t.vnode).el=n,t=t.parent}}(e,f.el),o&&Lr(o,r),(u=t.props&&t.props.onVnodeUpdated)&&Lr((()=>ai(u,i,t,c)),r)}else{let i;const{el:a,props:l}=t,{bm:c,m:u,parent:d}=e,f=go(t);if(Mr(e,!1),c&&j(c),!f&&(i=l&&l.onVnodeBeforeMount)&&ai(i,d,t),Mr(e,!0),a&&se){const n=()=>{e.subTree=In(e),se(a,e.subTree,e,r,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const i=e.subTree=In(e);w(null,i,n,o,e,r,s),t.el=i.el}if(u&&Lr(u,r),!f&&(i=l&&l.onVnodeMounted)){const e=t;Lr((()=>ai(i,d,e)),r)}(256&t.shapeFlag||d&&go(d.vnode)&&256&d.vnode.shapeFlag)&&(e.ba&&$o(e.ba),e.a&&Lr(e.a,r)),e.isMounted=!0,t=n=o=null}},c=e.effect=new Ie(l,i,(()=>xn(u)),e.scope),u=e.update=()=>{c.dirty&&c.run()};u.id=e.uid,Mr(e,!0),u()},U=(e,t,n)=>{t.component=e;const r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:s}}=e,a=Xt(r),[l]=e.propsOptions;let c=!1;if(!(o||s>0)||16&s){let o;gr(e,t,r,i)&&(c=!0);for(const i in a)t&&(f(t,i)||(o=A(i))!==i&&f(t,o))||(l?!n||void 0===n[i]&&void 0===n[o]||(r[i]=vr(l,a,i,void 0,e,!0)):delete r[i]);if(i!==a)for(const e in i)t&&f(t,e)||(delete i[e],c=!0)}else if(8&s){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:r,slots:i}=e;let s=!0,a=o;if(32&r.shapeFlag){const e=t._;e?n&&1===e?s=!1:(c(i,t),n||1!==e||delete i._):(s=!t.$stable,Cr(t,i)),a=t}else t&&(kr(e,t),a={default:1});if(s)for(const o in i)Sr(o)||null!=a[o]||delete i[o]})(e,t.children,n),ze(),Tn(e),Ue()},Y=(e,t,n,o,r,i,s,a,l=!1)=>{const c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:p}=t;if(f>0){if(128&f)return void X(c,d,n,o,r,i,s,a,l);if(256&f)return void q(c,d,n,o,r,i,s,a,l)}8&p?(16&u&&ee(c,r,i),d!==c&&m(n,d)):16&u?16&p?X(c,d,n,o,r,i,s,a,l):ee(c,r,i,!0):(8&u&&m(n,""),16&p&&P(d,n,o,r,i,s,a,l))},q=(e,t,n,o,i,s,a,l,c)=>{t=t||r;const u=(e=e||r).length,d=t.length,f=Math.min(u,d);let p;for(p=0;pd?ee(e,i,s,!0,!1,f):P(t,n,o,i,s,a,l,c,f)},X=(e,t,n,o,i,s,a,l,c)=>{let u=0;const d=t.length;let f=e.length-1,p=d-1;for(;u<=f&&u<=p;){const o=e[u],r=t[u]=c?ri(t[u]):oi(t[u]);if(!Xr(o,r))break;w(o,r,n,null,i,s,a,l,c),u++}for(;u<=f&&u<=p;){const o=e[f],r=t[p]=c?ri(t[p]):oi(t[p]);if(!Xr(o,r))break;w(o,r,n,null,i,s,a,l,c),f--,p--}if(u>f){if(u<=p){const e=p+1,r=ep)for(;u<=f;)G(e[u],i,s,!0),u++;else{const h=u,m=u,g=new Map;for(u=m;u<=p;u++){const e=t[u]=c?ri(t[u]):oi(t[u]);null!=e.key&&g.set(e.key,u)}let v,y=0;const _=p-m+1;let b=!1,x=0;const S=new Array(_);for(u=0;u<_;u++)S[u]=0;for(u=h;u<=f;u++){const o=e[u];if(y>=_){G(o,i,s,!0);continue}let r;if(null!=o.key)r=g.get(o.key);else for(v=m;v<=p;v++)if(0===S[v-m]&&Xr(o,t[v])){r=v;break}void 0===r?G(o,i,s,!0):(S[r-m]=u+1,r>=x?x=r:b=!0,w(o,t[r],n,null,i,s,a,l,c),y++)}const T=b?function(e){const t=e.slice(),n=[0];let o,r,i,s,a;const l=e.length;for(o=0;o>1,e[n[a]]0&&(t[o]=n[i-1]),n[i]=o)}}i=n.length,s=n[i-1];for(;i-- >0;)n[i]=s,s=t[s];return n}(S):r;for(v=T.length-1,u=_-1;u>=0;u--){const e=m+u,r=t[e],f=e+1{const{el:s,type:a,transition:l,children:c,shapeFlag:u}=e;if(6&u)return void K(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void a.move(e,t,o,re);if(a===Rr){n(s,t,o);for(let e=0;el.enter(s)),i);else{const{leave:e,delayLeave:r,afterLeave:i}=l,a=()=>n(s,t,o),c=()=>{e(s,(()=>{a(),i&&i()}))};r?r(s,a,c):c()}else n(s,t,o)},G=(e,t,n,o=!1,r=!1)=>{const{type:i,props:s,ref:a,children:l,dynamicChildren:c,shapeFlag:u,patchFlag:d,dirs:f}=e;if(null!=a&&Or(a,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const p=1&u&&f,h=!go(e);let m;if(h&&(m=s&&s.onVnodeBeforeUnmount)&&ai(m,t,e),6&u)Q(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);p&&no(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,re,o):c&&(i!==Rr||d>0&&64&d)?ee(c,t,n,!1,!0):(i===Rr&&384&d||!r&&16&u)&&ee(l,t,n),o&&J(e)}(h&&(m=s&&s.onVnodeUnmounted)||p)&&Lr((()=>{m&&ai(m,t,e),p&&no(e,null,t,"unmounted")}),n)},J=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===Rr)return void Z(n,o);if(t===Br)return void k(e);const i=()=>{s(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,s=()=>t(n,i);o?o(e.el,i,s):s()}else i()},Z=(e,t)=>{let n;for(;e!==t;)n=v(e),s(e),e=n;s(t)},Q=(e,t,n)=>{const{bum:o,scope:r,update:i,subTree:s,um:a}=e;o&&j(o),r.stop(),i&&(i.active=!1,G(s,e,t,n)),a&&Lr(a,t),Lr((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},ee=(e,t,n,o=!1,r=!1,i=0)=>{for(let s=i;s6&e.shapeFlag?te(e.component.subTree):128&e.shapeFlag?e.suspense.next():v(e.anchor||e.el);let ne=!1;const oe=(e,t,n)=>{null==e?t._vnode&&G(t._vnode,null,null,!0):w(t._vnode||null,e,t,null,null,null,n),ne||(ne=!0,Tn(),En(),ne=!1),t._vnode=e},re={p:w,um:G,m:K,r:J,mt:V,mc:P,pc:Y,pbc:I,n:te,o:e};let ie,se;t&&([ie,se]=t(re));return{render:oe,hydrate:ie,createApp:fr(oe,ie)}}(e)}function $r({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Mr({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Pr(e,t,n=!1){const o=e.children,r=t.children;if(p(o)&&p(r))for(let i=0;i0?Fr||r:null,Dr.pop(),Fr=Dr[Dr.length-1]||null,Vr>0&&Fr&&Fr.push(e),e}function Ur(e,t,n,o,r,i){return zr(Zr(e,t,n,o,r,i,!0))}function Yr(e,t,n,o,r){return zr(Qr(e,t,n,o,r,!0))}function qr(e){return!!e&&!0===e.__v_isVNode}function Xr(e,t){return e.type===t.type&&e.key===t.key}const Kr="__vInternal",Gr=({key:e})=>null!=e?e:null,Jr=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||tn(e)||g(e)?{i:Pn,r:e,k:t,f:!!n}:e:null);function Zr(e,t=null,n=null,o=0,r=null,i=(e===Rr?0:1),s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Gr(t),ref:t&&Jr(t),scopeId:jn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Pn};return a?(ii(l,n),128&i&&e.normalize(l)):n&&(l.shapeFlag|=v(n)?8:16),Vr>0&&!s&&Fr&&(l.patchFlag>0||6&i)&&32!==l.patchFlag&&Fr.push(l),l}const Qr=function(e,t=null,n=null,o=0,r=null,i=!1){e&&e!==Vn||(e=Ir);if(qr(e)){const o=ei(e,t,!0);return n&&ii(o,n),Vr>0&&!i&&Fr&&(6&o.shapeFlag?Fr[Fr.indexOf(e)]=o:Fr.push(o)),o.patchFlag|=-2,o}s=e,g(s)&&"__vccOpts"in s&&(e=e.__vccOpts);var s;if(t){t=function(e){return e?qt(e)||Kr in e?c({},e):e:null}(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=ie(e)),_(n)&&(qt(n)&&!p(n)&&(n=c({},n)),t.style=re(n))}const a=v(e)?1:Yn(e)?128:(e=>e.__isTeleport)(e)?64:_(e)?4:g(e)?2:0;return Zr(e,t,n,o,r,a,i,!0)};function ei(e,t,n=!1){const{props:o,ref:r,patchFlag:i,children:s}=e,a=t?si(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Gr(a),ref:t&&t.ref?n&&r?p(r)?r.concat(Jr(t)):[r,Jr(t)]:Jr(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Rr?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ei(e.ssContent),ssFallback:e.ssFallback&&ei(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function ti(e=" ",t=0){return Qr(Nr,null,e,t)}function ni(e="",t=!1){return t?(Hr(),Yr(Ir,null,e)):Qr(Ir,null,e)}function oi(e){return null==e||"boolean"==typeof e?Qr(Ir):p(e)?Qr(Rr,null,e.slice()):"object"==typeof e?ri(e):Qr(Nr,null,String(e))}function ri(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:ei(e)}function ii(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(p(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),ii(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Kr in t?3===o&&Pn&&(1===Pn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Pn}}else g(t)?(t={default:t,_ctx:Pn},n=32):(t=String(t),64&o?(n=16,t=[ti(t)]):n=8);e.children=t,e.shapeFlag|=n}function si(...e){const t={};for(let n=0;nui||Pn;let fi,pi;{const e=B(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};fi=t("__VUE_INSTANCE_SETTERS__",(e=>ui=e)),pi=t("__VUE_SSR_SETTERS__",(e=>vi=e))}const hi=e=>{const t=ui;return fi(e),e.scope.on(),()=>{e.scope.off(),fi(t)}},mi=()=>{ui&&ui.scope.off(),fi(null)};function gi(e){return 4&e.vnode.shapeFlag}let vi=!1;function yi(e,t,n){g(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:_(t)&&(e.setupState=ln(t)),_i(e,n)}function _i(e,t,n){const o=e.type;e.render||(e.render=o.render||i);{const t=hi(e);ze();try{Qo(e)}finally{Ue(),t()}}}function bi(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(ln(Kt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Xo?Xo[n](e):void 0,has:(e,t)=>t in e||t in Xo}))}function wi(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}const xi=(e,t)=>{const n=function(e,t,n=!1){let o,r;const s=g(e);return s?(o=e,r=i):(o=e.get,r=e.set),new Zt(o,r,s||!r,n)}(e,0,vi);return n};function Si(e,t,n){const o=arguments.length;return 2===o?_(t)&&!p(t)?qr(t)?Qr(e,null,[t]):Qr(e,t):Qr(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&qr(n)&&(n=[n]),Qr(e,t,n))}const Ti="3.4.21",Ei="undefined"!=typeof document?document:null,Ci=Ei&&Ei.createElement("template"),ki={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?Ei.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Ei.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?Ei.createElement(e,{is:n}):Ei.createElement(e);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>Ei.createTextNode(e),createComment:e=>Ei.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ei.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,i){const s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==i&&(r=r.nextSibling););else{Ci.innerHTML="svg"===o?`${e}`:"mathml"===o?`${e}`:e;const r=Ci.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Oi="transition",Li=Symbol("_vtc"),Ai=(e,{slots:t})=>Si(ao,function(e){const t={};for(const c in e)c in $i||(t[c]=e[c]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:u=s,appearToClass:d=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(_(e))return[ji(e.enter),ji(e.leave)];{const t=ji(e);return[t,t]}}(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:w,onLeave:x,onLeaveCancelled:S,onBeforeAppear:T=y,onAppear:E=b,onAppearCancelled:C=w}=t,k=(e,t,n)=>{Ni(e,t?d:a),Ni(e,t?u:s),n&&n()},O=(e,t)=>{e._isLeaving=!1,Ni(e,f),Ni(e,h),Ni(e,p),t&&t()},L=e=>(t,n)=>{const r=e?E:b,s=()=>k(t,e,n);Mi(r,[t,s]),Ii((()=>{Ni(t,e?l:i),Ri(t,e?d:a),Pi(r)||Di(t,o,g,s)}))};return c(t,{onBeforeEnter(e){Mi(y,[e]),Ri(e,i),Ri(e,s)},onBeforeAppear(e){Mi(T,[e]),Ri(e,l),Ri(e,u)},onEnter:L(!1),onAppear:L(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>O(e,t);Ri(e,f),document.body.offsetHeight,Ri(e,p),Ii((()=>{e._isLeaving&&(Ni(e,f),Ri(e,h),Pi(x)||Di(e,o,v,n))})),Mi(x,[e,n])},onEnterCancelled(e){k(e,!1),Mi(w,[e])},onAppearCancelled(e){k(e,!0),Mi(C,[e])},onLeaveCancelled(e){O(e),Mi(S,[e])}})}(e),t);Ai.displayName="Transition";const $i={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Ai.props=c({},so,$i);const Mi=(e,t=[])=>{p(e)?e.forEach((e=>e(...t))):e&&e(...t)},Pi=e=>!!e&&(p(e)?e.some((e=>e.length>1)):e.length>1);function ji(e){const t=(e=>{const t=v(e)?Number(e):NaN;return isNaN(t)?e:t})(e);return t}function Ri(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Li]||(e[Li]=new Set)).add(t)}function Ni(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Li];n&&(n.delete(t),n.size||(e[Li]=void 0))}function Ii(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Bi=0;function Di(e,t,n,o){const r=e._endId=++Bi,i=()=>{r===e._endId&&o()};if(n)return setTimeout(i,n);const{type:s,timeout:a,propCount:l}=function(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),i=o("transitionDuration"),s=Fi(r,i),a=o("animationDelay"),l=o("animationDuration"),c=Fi(a,l);let u=null,d=0,f=0;t===Oi?s>0&&(u=Oi,d=s,f=i.length):"animation"===t?c>0&&(u="animation",d=c,f=l.length):(d=Math.max(s,c),u=d>0?s>c?Oi:"animation":null,f=u?u===Oi?i.length:l.length:0);const p=u===Oi&&/\b(transform|all)(,|$)/.test(o("transitionProperty").toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}(e,t);if(!s)return o();const c=s+"end";let u=0;const d=()=>{e.removeEventListener(c,f),i()},f=t=>{t.target===e&&++u>=l&&d()};setTimeout((()=>{uHi(t)+Hi(e[n]))))}function Hi(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}const Vi=Symbol("_vod"),Wi=Symbol("_vsh"),zi={beforeMount(e,{value:t},{transition:n}){e[Vi]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Ui(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Ui(e,!0),o.enter(e)):o.leave(e,(()=>{Ui(e,!1)})):Ui(e,t))},beforeUnmount(e,{value:t}){Ui(e,t)}};function Ui(e,t){e.style.display=t?e[Vi]:"none",e[Wi]=!t}const Yi=Symbol(""),qi=/(^|;)\s*display\s*:/;const Xi=/\s*!important$/;function Ki(e,t,n){if(p(n))n.forEach((n=>Ki(e,t,n)));else if(null==n&&(n=""),n=is(n),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Ji[t];if(n)return n;let o=O(t);if("filter"!==o&&o in e)return Ji[t]=o;o=$(o);for(let r=0;re.replace(me,((e,t)=>{if(!t)return e;if(1===os)return`${t}${ns}`;const n=function(e,t){const n=Math.pow(10,t+1),o=Math.floor(e*n);return 10*Math.round(o/10)/n}(parseFloat(t)*os,rs);return 0===n?"0":`${n}${ns}`})));var ns,os,rs;const is=e=>v(e)?ts(e):e,ss="http://www.w3.org/1999/xlink";const as=Symbol("_vei");function ls(e,t,n,o,r=null){const i=e[as]||(e[as]={}),s=i[t];if(o&&s)s.value=o;else{const[n,a]=function(e){let t;if(cs.test(e)){let n;for(t={};n=e.match(cs);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):A(e.slice(2)),t]}(t);if(o){const s=i[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();const o=t&&t.proxy,r=o&&o.$nne,{value:i}=n;if(r&&p(i)){const n=fs(e,i);for(let o=0;ous||(ds.then((()=>us=0)),us=Date.now()))(),n}(o,r);!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,s,a)}else s&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,s,a),i[t]=void 0)}}const cs=/(?:Once|Passive|Capture)$/;let us=0;const ds=Promise.resolve();function fs(e,t){if(p(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>{const t=t=>!t._stopped&&e&&e(t);return t.__wwe=e.__wwe,t}))}return t}const ps=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123;const hs=["ctrl","shift","alt","meta"],ms={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>hs.some((n=>e[`${n}Key`]&&!t.includes(n)))},gs=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=A(n.key);return t.some((e=>e===o||vs[e]===o))?e(n):void 0})},_s=c({patchProp:(e,t,n,o,r,i,s,c,u)=>{if(0===t.indexOf("change:"))return function(e,t,n,o=null){if(!n||!o)return;const r=t.replace("change:",""),{attrs:i}=o,s=i[r],a=(e.__wxsProps||(e.__wxsProps={}))[r];if(a===s)return;e.__wxsProps[r]=s;const l=o.proxy;wn((()=>{n(s,a,l.$gcd(l,!0),l.$gcd(l,!1))}))}(e,t,o,s);const d="svg"===r;"class"===t?function(e,t,n){const{__wxsAddClass:o,__wxsRemoveClass:r}=e;r&&r.length&&(t=(t||"").split(/\s+/).filter((e=>-1===r.indexOf(e))).join(" "),r.length=0),o&&o.length&&(t=(t||"")+" "+o.join(" "));const i=e[Li];i&&(t=(t?[t,...i]:[...i]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,d):"style"===t?function(e,t,n){const o=e.style,r=v(n);let i=!1;if(n&&!r){if(t)if(v(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Ki(o,t,"")}else for(const e in t)null==n[e]&&Ki(o,e,"");for(const e in n)"display"===e&&(i=!0),Ki(o,e,n[e])}else if(r){if(t!==n){const e=o[Yi];e&&(n+=";"+e),o.cssText=n,i=qi.test(n)}}else t&&e.removeAttribute("style");Vi in e&&(e[Vi]=i?o.display:"",e[Wi]&&(o.display="none"));const{__wxsStyle:s}=e;if(s)for(const a in s)Ki(o,a,s[a])}(e,n,o):a(t)?l(t)||ls(e,t,0,o,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&ps(t)&&g(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}if(ps(t)&&v(n))return!1;return t in e}(e,t,o,d))?function(e,t,n,o,r,i,s){if("innerHTML"===t||"textContent"===t)return o&&s(o,r,i),void(e[t]=null==n?"":n);const a=e.tagName;if("value"===t&&"PROGRESS"!==a&&!a.includes("-")){const o=null==n?"":n;return("OPTION"===a?e.getAttribute("value")||"":e.value)===o&&"_value"in e||(e.value=o),null==n&&e.removeAttribute(t),void(e._value=n)}let l=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=Y(n):null==n&&"string"===o?(n="",l=!0):"number"===o&&(n=0,l=!0)}try{e[t]=n}catch(c){}l&&e.removeAttribute(t)}(e,t,o,i,s,c,u):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o,r){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(ss,t.slice(6,t.length)):e.setAttributeNS(ss,t,n);else{const o=U(t);null==n||o&&!Y(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,d))},forcePatchProp:(e,t)=>0===t.indexOf("change:")||("class"===t&&e.__wxsClassChanged?(e.__wxsClassChanged=!1,!0):!("style"!==t||!e.__wxsStyleChanged)&&(e.__wxsStyleChanged=!1,!0))},ki);let bs;const ws=(...e)=>{const t=(bs||(bs=Ar(_s))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(v(e)){return document.querySelector(e)}return e} -/*! - * vue-router v4.3.0 - * (c) 2024 Eduardo San Martin Morote - * @license MIT - */(e);if(!o)return;const r=t._component;g(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const i=n(o,!1,function(e){if(e instanceof SVGElement)return"svg";if("function"==typeof MathMLElement&&e instanceof MathMLElement)return"mathml"}(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};const xs="undefined"!=typeof document;const Ss=Object.assign;function Ts(e,t){const n={};for(const o in t){const r=t[o];n[o]=Cs(r)?r.map(e):e(r)}return n}const Es=()=>{},Cs=Array.isArray,ks=/#/g,Os=/&/g,Ls=/\//g,As=/=/g,$s=/\?/g,Ms=/\+/g,Ps=/%5B/g,js=/%5D/g,Rs=/%5E/g,Ns=/%60/g,Is=/%7B/g,Bs=/%7C/g,Ds=/%7D/g,Fs=/%20/g;function Hs(e){return encodeURI(""+e).replace(Bs,"|").replace(Ps,"[").replace(js,"]")}function Vs(e){return Hs(e).replace(Ms,"%2B").replace(Fs,"+").replace(ks,"%23").replace(Os,"%26").replace(Ns,"`").replace(Is,"{").replace(Ds,"}").replace(Rs,"^")}function Ws(e){return null==e?"":function(e){return Hs(e).replace(ks,"%23").replace($s,"%3F")}(e).replace(Ls,"%2F")}function zs(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}const Us=/\/$/;function Ys(e,t,n="/"){let o,r={},i="",s="";const a=t.indexOf("#");let l=t.indexOf("?");return a=0&&(l=-1),l>-1&&(o=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),r=e(i)),a>-1&&(o=o||t.slice(0,a),s=t.slice(a,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];".."!==r&&"."!==r||o.push("");let i,s,a=n.length-1;for(i=0;i1&&a--}return n.slice(0,a).join("/")+"/"+o.slice(i).join("/")}(null!=o?o:t,n),{fullPath:o+(i&&"?")+i+s,path:o,query:r,hash:zs(s)}}function qs(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function Xs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ks(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Gs(e[n],t[n]))return!1;return!0}function Gs(e,t){return Cs(e)?Js(e,t):Cs(t)?Js(t,e):e===t}function Js(e,t){return Cs(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}var Zs,Qs,ea,ta;function na(e){if(!e)if(xs){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(Us,"")}(Qs=Zs||(Zs={})).pop="pop",Qs.push="push",(ta=ea||(ea={})).back="back",ta.forward="forward",ta.unknown="";const oa=/^[^#]+#/;function ra(e,t){return e.replace(oa,"#")+t}const ia=()=>({left:window.scrollX,top:window.scrollY});function sa(e){let t;if("el"in e){const n=e.el,o="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}function aa(e,t){return(history.state?history.state.position-t:-1)+e}const la=new Map;function ca(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let t=r.includes(e.slice(i))?e.slice(i).length:1,n=r.slice(t);return"/"!==n[0]&&(n="/"+n),qs(n,"")}return qs(n,e)+o+r}function ua(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?ia():null}}function da(e){const{history:t,location:n}=window,o={value:ca(e,n)},r={value:t.state};function i(o,i,s){const a=e.indexOf("#"),l=a>-1?(n.host&&document.querySelector("base")?e:e.slice(a))+o:location.protocol+"//"+location.host+e+o;try{t[s?"replaceState":"pushState"](i,"",l),r.value=i}catch(c){console.error(c),n[s?"replace":"assign"](l)}}return r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:r,push:function(e,n){const s=Ss({},r.value,t.state,{forward:e,scroll:ia()});i(s.current,s,!0),i(e,Ss({},ua(o.value,e,null),{position:s.position+1},n),!1),o.value=e},replace:function(e,n){i(e,Ss({},t.state,ua(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),o.value=e}}}function fa(e){const t=da(e=na(e)),n=function(e,t,n,o){let r=[],i=[],s=null;const a=({state:i})=>{const a=ca(e,location),l=n.value,c=t.value;let u=0;if(i){if(n.value=a,t.value=i,s&&s===l)return void(s=null);u=c?i.position-c.position:0}else o(a);r.forEach((e=>{e(n.value,l,{delta:u,type:Zs.pop,direction:u?u>0?ea.forward:ea.back:ea.unknown})}))};function l(){const{history:e}=window;e.state&&e.replaceState(Ss({},e.state,{scroll:ia()}),"")}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",l,{passive:!0}),{pauseListeners:function(){s=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return i.push(t),t},destroy:function(){for(const e of i)e();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",l)}}}(e,t.state,t.location,t.replace);const o=Ss({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:ra.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function pa(e){return"string"==typeof e||"symbol"==typeof e}const ha={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},ma=Symbol("");var ga,va;function ya(e,t){return Ss(new Error,{type:e,[ma]:!0},t)}function _a(e,t){return e instanceof Error&&ma in e&&(null==t||!!(e.type&t))}(va=ga||(ga={}))[va.aborted=4]="aborted",va[va.cancelled=8]="cancelled",va[va.duplicated=16]="duplicated";const ba={sensitive:!1,strict:!1,start:!0,end:!0},wa=/[.+*?^${}()[\]/\\]/g;function xa(e,t){let n=0;for(;nt.length?1===t.length&&80===t[0]?1:-1:0}function Sa(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Ea={type:0,value:""},Ca=/[a-zA-Z0-9_]/;function ka(e,t,n){const o=function(e,t){const n=Ss({},ba,t),o=[];let r=n.start?"^":"";const i=[];for(const l of e){const e=l.length?[]:[90];n.strict&&!l.length&&(r+="/");for(let t=0;t1&&("*"===a||"+"===a)&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:c,regexp:u,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):t("Invalid state to consume buffer"),c="")}function f(){c+=a}for(;l{i(f)}:Es}function i(e){if(pa(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(i),t.alias.forEach(i))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(i),e.alias.forEach(i))}}function s(e){let t=0;for(;t=0&&(e.record.path!==n[t].record.path||!ja(e,n[t]));)t++;n.splice(t,0,e),e.record.name&&!$a(e)&&o.set(e.record.name,e)}return t=Pa({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>r(e))),{addRoute:r,resolve:function(e,t){let r,i,s,a={};if("name"in e&&e.name){if(r=o.get(e.name),!r)throw ya(1,{location:e});s=r.record.name,a=Ss(La(t.params,r.keys.filter((e=>!e.optional)).concat(r.parent?r.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&La(e.params,r.keys.map((e=>e.name)))),i=r.stringify(a)}else if(null!=e.path)i=e.path,r=n.find((e=>e.re.test(i))),r&&(a=r.parse(i),s=r.record.name);else{if(r=t.name?o.get(t.name):n.find((e=>e.re.test(t.path))),!r)throw ya(1,{location:e,currentLocation:t});s=r.record.name,a=Ss({},t.params,e.params),i=r.stringify(a)}const l=[];let c=r;for(;c;)l.unshift(c.record),c=c.parent;return{name:s,path:i,params:a,matched:l,meta:Ma(l)}},removeRoute:i,getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}function La(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Aa(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]="object"==typeof n?n[o]:n;return t}function $a(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ma(e){return e.reduce(((e,t)=>Ss(e,t.meta)),{})}function Pa(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function ja(e,t){return t.children.some((t=>t===e||ja(e,t)))}function Ra(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let o=0;oe&&Vs(e))):[o&&Vs(o)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))}))}return t}function Ia(e){const t={};for(const n in e){const o=e[n];void 0!==o&&(t[n]=Cs(o)?o.map((e=>null==e?null:""+e)):null==o?o:""+o)}return t}const Ba=Symbol(""),Da=Symbol(""),Fa=Symbol(""),Ha=Symbol(""),Va=Symbol("");function Wa(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function za(e,t,n,o,r,i=(e=>e())){const s=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise(((a,l)=>{const c=e=>{var i;!1===e?l(ya(4,{from:n,to:t})):e instanceof Error?l(e):"string"==typeof(i=e)||i&&"object"==typeof i?l(ya(2,{from:t,to:e})):(s&&o.enterCallbacks[r]===s&&"function"==typeof e&&s.push(e),a())},u=i((()=>e.call(o&&o.instances[r],t,n,c)));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch((e=>l(e)))}))}function Ua(e,t,n,o,r=(e=>e())){const i=[];for(const a of e)for(const e in a.components){let l=a.components[e];if("beforeRouteEnter"===t||a.instances[e])if("object"==typeof(s=l)||"displayName"in s||"props"in s||"__vccOpts"in s){const s=(l.__vccOpts||l)[t];s&&i.push(za(s,n,o,a,e,r))}else{let s=l();i.push((()=>s.then((i=>{if(!i)return Promise.reject(new Error(`Couldn't resolve component "${e}" at "${a.path}"`));const s=(l=i).__esModule||"Module"===l[Symbol.toStringTag]?i.default:i;var l;a.components[e]=s;const c=(s.__vccOpts||s)[t];return c&&za(c,n,o,a,e,r)()}))))}}var s;return i}function Ya(e){const t=mr(Fa),n=mr(Ha),o=xi((()=>t.resolve(sn(e.to)))),r=xi((()=>{const{matched:e}=o.value,{length:t}=e,r=e[t-1],i=n.matched;if(!r||!i.length)return-1;const s=i.findIndex(Xs.bind(null,r));if(s>-1)return s;const a=Ka(e[t-2]);return t>1&&Ka(r)===a&&i[i.length-1].path!==a?i.findIndex(Xs.bind(null,e[t-2])):s})),i=xi((()=>r.value>-1&&function(e,t){for(const n in t){const o=t[n],r=e[n];if("string"==typeof o){if(o!==r)return!1}else if(!Cs(r)||r.length!==o.length||o.some(((e,t)=>e!==r[t])))return!1}return!0}(n.params,o.value.params))),s=xi((()=>r.value>-1&&r.value===n.matched.length-1&&Ks(n.params,o.value.params)));return{route:o,href:xi((()=>o.value.href)),isActive:i,isExactActive:s,navigate:function(n={}){return function(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;if(void 0!==e.button&&0!==e.button)return;if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}e.preventDefault&&e.preventDefault();return!0}(n)?t[sn(e.replace)?"replace":"push"](sn(e.to)).catch(Es):Promise.resolve()}}}const qa=mo({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ya,setup(e,{slots:t}){const n=Ft(Ya(e)),{options:o}=mr(Fa),r=xi((()=>({[Ga(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Ga(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:Si("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),Xa=qa;function Ka(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ga=(e,t,n)=>null!=e?e:null!=t?t:n;function Ja(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const Za=mo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=mr(Va),r=xi((()=>e.route||o.value)),i=mr(Da,0),s=xi((()=>{let e=sn(i);const{matched:t}=r.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),a=xi((()=>r.value.matched[s.value]));hr(Da,xi((()=>s.value+1))),hr(Ba,a),hr(Va,r);const l=nn();return Gn((()=>[l.value,a.value,e.name]),(([e,t,n],[o,r,i])=>{t&&(t.instances[n]=e,r&&r!==t&&e&&e===o&&(t.leaveGuards.size||(t.leaveGuards=r.leaveGuards),t.updateGuards.size||(t.updateGuards=r.updateGuards))),!e||!t||r&&Xs(t,r)&&o||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=r.value,i=e.name,s=a.value,c=s&&s.components[i];if(!c)return Ja(n.default,{Component:c,route:o});const u=s.props[i],d=u?!0===u?o.params:"function"==typeof u?u(o):u:null,f=Si(c,Ss({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(s.instances[i]=null)},ref:l}));return Ja(n.default,{Component:f,route:o})||f}}});function Qa(e){const t=Oa(e.routes,e),n=e.parseQuery||Ra,o=e.stringifyQuery||Na,r=e.history,i=Wa(),s=Wa(),a=Wa(),l=on(ha,!0);let c=ha;xs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ts.bind(null,(e=>""+e)),d=Ts.bind(null,Ws),f=Ts.bind(null,zs);function p(e,i){if(i=Ss({},i||l.value),"string"==typeof e){const o=Ys(n,e,i.path),s=t.resolve({path:o.path},i),a=r.createHref(o.fullPath);return Ss(o,s,{params:f(s.params),hash:zs(o.hash),redirectedFrom:void 0,href:a})}let s;if(null!=e.path)s=Ss({},e,{path:Ys(n,e.path,i.path).path});else{const t=Ss({},e.params);for(const e in t)null==t[e]&&delete t[e];s=Ss({},e,{params:d(t)}),i.params=d(i.params)}const a=t.resolve(s,i),c=e.hash||"";a.params=u(f(a.params));const p=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,Ss({},e,{hash:(h=c,Hs(h).replace(Is,"{").replace(Ds,"}").replace(Rs,"^")),path:a.path}));var h;const m=r.createHref(p);return Ss({fullPath:p,hash:c,query:o===Na?Ia(e.query):e.query||{}},a,{redirectedFrom:void 0,href:m})}function h(e){return"string"==typeof e?Ys(n,e,l.value.path):Ss({},e)}function m(e,t){if(c!==e)return ya(8,{from:t,to:e})}function g(e){return y(e)}function v(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let o="function"==typeof n?n(e):n;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=h(o):{path:o},o.params={}),Ss({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function y(e,t){const n=c=p(e),r=l.value,i=e.state,s=e.force,a=!0===e.replace,u=v(n);if(u)return y(Ss(h(u),{state:"object"==typeof u?Ss({},i,u.state):i,force:s,replace:a}),t||n);const d=n;let f;return d.redirectedFrom=t,!s&&function(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Xs(t.matched[o],n.matched[r])&&Ks(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(f=ya(16,{to:d,from:r}),$(r,r,!0,!1)),(f?Promise.resolve(f):w(d,r)).catch((e=>_a(e)?_a(e,2)?e:A(e):L(e,d,r))).then((e=>{if(e){if(_a(e,2))return y(Ss({replace:a},h(e.to),{state:"object"==typeof e.to?Ss({},i,e.to.state):i,force:s}),t||d)}else e=S(d,r,!0,a,i);return x(d,r,e),e}))}function _(e,t){const n=m(e,t);return n?Promise.reject(n):Promise.resolve()}function b(e){const t=j.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function w(e,t){let n;const[o,r,a]=function(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;sXs(e,i)))?o.push(i):n.push(i));const a=e.matched[s];a&&(t.matched.find((e=>Xs(e,a)))||r.push(a))}return[n,o,r]}(e,t);n=Ua(o.reverse(),"beforeRouteLeave",e,t);for(const i of o)i.leaveGuards.forEach((o=>{n.push(za(o,e,t))}));const l=_.bind(null,e,t);return n.push(l),N(n).then((()=>{n=[];for(const o of i.list())n.push(za(o,e,t));return n.push(l),N(n)})).then((()=>{n=Ua(r,"beforeRouteUpdate",e,t);for(const o of r)o.updateGuards.forEach((o=>{n.push(za(o,e,t))}));return n.push(l),N(n)})).then((()=>{n=[];for(const o of a)if(o.beforeEnter)if(Cs(o.beforeEnter))for(const r of o.beforeEnter)n.push(za(r,e,t));else n.push(za(o.beforeEnter,e,t));return n.push(l),N(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=Ua(a,"beforeRouteEnter",e,t,b),n.push(l),N(n)))).then((()=>{n=[];for(const o of s.list())n.push(za(o,e,t));return n.push(l),N(n)})).catch((e=>_a(e,8)?e:Promise.reject(e)))}function x(e,t,n){a.list().forEach((o=>b((()=>o(e,t,n)))))}function S(e,t,n,o,i){const s=m(e,t);if(s)return s;const a=t===ha,c=xs?history.state:{};n&&(o||a?r.replace(e.fullPath,Ss({scroll:a&&c&&c.scroll},i)):r.push(e.fullPath,i)),l.value=e,$(e,t,n,a),A()}let T;function E(){T||(T=r.listen(((e,t,n)=>{if(!R.listening)return;const o=p(e),i=v(o);if(i)return void y(Ss(i,{replace:!0}),o).catch(Es);c=o;const s=l.value;var a,u;xs&&(a=aa(s.fullPath,n.delta),u=ia(),la.set(a,u)),w(o,s).catch((e=>_a(e,12)?e:_a(e,2)?(y(e.to,o).then((e=>{_a(e,20)&&!n.delta&&n.type===Zs.pop&&r.go(-1,!1)})).catch(Es),Promise.reject()):(n.delta&&r.go(-n.delta,!1),L(e,o,s)))).then((e=>{(e=e||S(o,s,!1))&&(n.delta&&!_a(e,8)?r.go(-n.delta,!1):n.type===Zs.pop&&_a(e,20)&&r.go(-1,!1)),x(o,s,e)})).catch(Es)})))}let C,k=Wa(),O=Wa();function L(e,t,n){A(e);const o=O.list();return o.length?o.forEach((o=>o(e,t,n))):console.error(e),Promise.reject(e)}function A(e){return C||(C=!e,E(),k.list().forEach((([t,n])=>e?n(e):t())),k.reset()),e}function $(t,n,o,r){const{scrollBehavior:i}=e;if(!xs||!i)return Promise.resolve();const s=!o&&function(e){const t=la.get(e);return la.delete(e),t}(aa(t.fullPath,0))||(r||!o)&&history.state&&history.state.scroll||null;return wn().then((()=>i(t,n,s))).then((e=>e&&sa(e))).catch((e=>L(e,t,n)))}const M=e=>r.go(e);let P;const j=new Set,R={currentRoute:l,listening:!0,addRoute:function(e,n){let o,r;return pa(e)?(o=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,o)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:p,options:e,push:g,replace:function(e){return g(Ss(h(e),{replace:!0}))},go:M,back:()=>M(-1),forward:()=>M(1),beforeEach:i.add,beforeResolve:s.add,afterEach:a.add,onError:O.add,isReady:function(){return C&&l.value!==ha?Promise.resolve():new Promise(((e,t)=>{k.add([e,t])}))},install(e){e.component("RouterLink",Xa),e.component("RouterView",Za),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>sn(l)}),xs&&!P&&l.value===ha&&(P=!0,g(r.location).catch((e=>{})));const t={};for(const o in ha)Object.defineProperty(t,o,{get:()=>l.value[o],enumerable:!0});e.provide(Fa,this),e.provide(Ha,Ht(t)),e.provide(Va,l);const n=e.unmount;j.add(e),e.unmount=function(){j.delete(e),j.size<1&&(c=ha,T&&T(),T=null,l.value=ha,P=!1,C=!1),n()}}};function N(e){return e.reduce(((e,t)=>e.then((()=>b(t)))),Promise.resolve())}return R}function el(){return mr(Ha)}const tl=["{","}"];const nl=/^(?:\d)+/,ol=/^(?:\w)+/;const rl=Object.prototype.hasOwnProperty,il=(e,t)=>rl.call(e,t),sl=new class{constructor(){this._caches=Object.create(null)}interpolate(e,t,n=tl){if(!t)return[e];let o=this._caches[e];return o||(o=function(e,[t,n]){const o=[];let r=0,i="";for(;r-1?"zh-Hans":e.indexOf("-hant")>-1?"zh-Hant":(n=e,["-tw","-hk","-mo","-cht"].find((e=>-1!==n.indexOf(e)))?"zh-Hant":"zh-Hans");var n;let o=["en","fr","es"];t&&Object.keys(t).length>0&&(o=Object.keys(t));const r=function(e,t){return t.find((t=>0===e.indexOf(t)))}(e,o);return r||void 0}class ll{constructor({locale:e,fallbackLocale:t,messages:n,watcher:o,formater:r}){this.locale="en",this.fallbackLocale="en",this.message={},this.messages={},this.watchers=[],t&&(this.fallbackLocale=t),this.formater=r||sl,this.messages=n||{},this.setLocale(e||"en"),o&&this.watchLocale(o)}setLocale(e){const t=this.locale;this.locale=al(e,this.messages)||this.fallbackLocale,this.messages[this.locale]||(this.messages[this.locale]={}),this.message=this.messages[this.locale],t!==this.locale&&this.watchers.forEach((e=>{e(this.locale,t)}))}getLocale(){return this.locale}watchLocale(e){const t=this.watchers.push(e)-1;return()=>{this.watchers.splice(t,1)}}add(e,t,n=!0){const o=this.messages[e];o?n?Object.assign(o,t):Object.keys(t).forEach((e=>{il(o,e)||(o[e]=t[e])})):this.messages[e]=t}f(e,t,n){return this.formater.interpolate(e,t,n).join("")}t(e,t,n){let o=this.message;return"string"==typeof t?(t=al(t,this.messages))&&(o=this.messages[t]):n=t,il(o,e)?this.formater.interpolate(o[e],n).join(""):(console.warn(`Cannot translate the value of keypath ${e}. Use the value of keypath as default.`),e)}}function cl(e,t={},n,o){if("string"!=typeof e){const n=[t,e];e=n[0],t=n[1]}"string"!=typeof e&&(e="undefined"!=typeof uni&&ad?ad():"undefined"!=typeof global&&global.getLocale?global.getLocale():"en"),"string"!=typeof n&&(n="undefined"!=typeof __uniConfig&&__uniConfig.fallbackLocale||"en");const r=new ll({locale:e,fallbackLocale:n,messages:t,watcher:o});let i=(e,t)=>{{let e=!1;i=function(t,n){const o=Fp().$vm;return o&&(o.$locale,e||(e=!0,function(e,t){e.$watchLocale?e.$watchLocale((e=>{t.setLocale(e)})):e.$watch((()=>e.$locale),(e=>{t.setLocale(e)}))}(o,r))),r.t(t,n)}}return i(e,t)};return{i18n:r,f:(e,t,n)=>r.f(e,t,n),t:(e,t)=>i(e,t),add:(e,t,n=!0)=>r.add(e,t,n),watch:e=>r.watchLocale(e),getLocale:()=>r.getLocale(),setLocale:e=>r.setLocale(e)}}const ul=le((()=>"undefined"!=typeof __uniConfig&&__uniConfig.locales&&!!Object.keys(__uniConfig.locales).length));let dl;function fl(){if(!dl){let e;if(e=navigator.cookieEnabled&&window.localStorage&&localStorage.UNI_LOCALE||__uniConfig.locale||navigator.language,dl=cl(e),ul()){const t=Object.keys(__uniConfig.locales||{});t.length&&t.forEach((e=>dl.add(e,__uniConfig.locales[e]))),dl.setLocale(e)}}return dl}function pl(e,t,n){return t.reduce(((t,o,r)=>(t[e+o]=n[r],t)),{})}const hl=le((()=>{const e="uni.async.",t=["error"];fl().add("en",pl(e,t,["The connection timed out, click the screen to try again."]),!1),fl().add("es",pl(e,t,["Se agotó el tiempo de conexión, haga clic en la pantalla para volver a intentarlo."]),!1),fl().add("fr",pl(e,t,["La connexion a expiré, cliquez sur l'écran pour réessayer."]),!1),fl().add("zh-Hans",pl(e,t,["连接服务器超时,点击屏幕重试"]),!1),fl().add("zh-Hant",pl(e,t,["連接服務器超時,點擊屏幕重試"]),!1)})),ml=le((()=>{const e="uni.showToast.",t=["unpaired"];fl().add("en",pl(e,t,["Please note showToast must be paired with hideToast"]),!1),fl().add("es",pl(e,t,["Tenga en cuenta que showToast debe estar emparejado con hideToast"]),!1),fl().add("fr",pl(e,t,["Veuillez noter que showToast doit être associé à hideToast"]),!1),fl().add("zh-Hans",pl(e,t,["请注意 showToast 与 hideToast 必须配对使用"]),!1),fl().add("zh-Hant",pl(e,t,["請注意 showToast 與 hideToast 必須配對使用"]),!1)})),gl=le((()=>{const e="uni.showLoading.",t=["unpaired"];fl().add("en",pl(e,t,["Please note showLoading must be paired with hideLoading"]),!1),fl().add("es",pl(e,t,["Tenga en cuenta que showLoading debe estar emparejado con hideLoading"]),!1),fl().add("fr",pl(e,t,["Veuillez noter que showLoading doit être associé à hideLoading"]),!1),fl().add("zh-Hans",pl(e,t,["请注意 showLoading 与 hideLoading 必须配对使用"]),!1),fl().add("zh-Hant",pl(e,t,["請注意 showLoading 與 hideLoading 必須配對使用"]),!1)})),vl=le((()=>{const e="uni.showModal.",t=["cancel","confirm"];fl().add("en",pl(e,t,["Cancel","OK"]),!1),fl().add("es",pl(e,t,["Cancelar","OK"]),!1),fl().add("fr",pl(e,t,["Annuler","OK"]),!1),fl().add("zh-Hans",pl(e,t,["取消","确定"]),!1),fl().add("zh-Hant",pl(e,t,["取消","確定"]),!1)})),yl=le((()=>{const e="uni.chooseFile.",t=["notUserActivation"];fl().add("en",pl(e,t,["File chooser dialog can only be shown with a user activation"]),!1),fl().add("es",pl(e,t,["El cuadro de diálogo del selector de archivos solo se puede mostrar con la activación del usuario"]),!1),fl().add("fr",pl(e,t,["La boîte de dialogue du sélecteur de fichier ne peut être affichée qu'avec une activation par l'utilisateur"]),!1),fl().add("zh-Hans",pl(e,t,["文件选择器对话框只能在由用户激活时显示"]),!1),fl().add("zh-Hant",pl(e,t,["文件選擇器對話框只能在由用戶激活時顯示"]),!1)})),_l=le((()=>{const e="uni.setClipboardData.",t=["success","fail"];fl().add("en",pl(e,t,["Content copied","Copy failed, please copy manually"]),!1),fl().add("es",pl(e,t,["Contenido copiado","Error al copiar, copie manualmente"]),!1),fl().add("fr",pl(e,t,["Contenu copié","Échec de la copie, copiez manuellement"]),!1),fl().add("zh-Hans",pl(e,t,["内容已复制","复制失败,请手动复制"]),!1),fl().add("zh-Hant",pl(e,t,["內容已復制","復制失敗,請手動復製"]),!1)})),bl=le((()=>{const e="uni.picker.",t=["done","cancel"];fl().add("en",pl(e,t,["Done","Cancel"]),!1),fl().add("es",pl(e,t,["OK","Cancelar"]),!1),fl().add("fr",pl(e,t,["OK","Annuler"]),!1),fl().add("zh-Hans",pl(e,t,["完成","取消"]),!1),fl().add("zh-Hant",pl(e,t,["完成","取消"]),!1)}));function wl(e){const t=new Le;return{on:(e,n)=>t.on(e,n),once:(e,n)=>t.once(e,n),off:(e,n)=>t.off(e,n),emit:(e,...n)=>t.emit(e,...n),subscribe(n,o,r=!1){t[r?"once":"on"](`${e}.${n}`,o)},unsubscribe(n,o){t.off(`${e}.${n}`,o)},subscribeHandler(n,o,r){t.emit(`${e}.${n}`,o,r)}}}let xl=1;const Sl=Object.create(null);function Tl(e,t){return e+"."+t}function El({id:e,name:t,args:n},o){t=Tl(o,t);const r=t=>{e&&Em.publishHandler("invokeViewApi."+e,t)},i=Sl[t];i?i(n,r):r({})}const Cl=c(wl("service"),{invokeServiceMethod:(e,t,n)=>{const{subscribe:o,publishHandler:r}=Em,i=n?xl++:0;n&&o("invokeServiceApi."+i,n,!0),r("invokeServiceApi",{id:i,name:e,args:t})}}),kl=ge(!0);let Ol;function Ll(){Ol&&(clearTimeout(Ol),Ol=null)}let Al=0,$l=0;function Ml(e){if(Ll(),1!==e.touches.length)return;const{pageX:t,pageY:n}=e.touches[0];Al=t,$l=n,Ol=setTimeout((function(){const t=new CustomEvent("longpress",{bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget});t.touches=e.touches,t.changedTouches=e.changedTouches,e.target.dispatchEvent(t)}),350)}function Pl(e){if(!Ol)return;if(1!==e.touches.length)return Ll();const{pageX:t,pageY:n}=e.touches[0];return Math.abs(t-Al)>10||Math.abs(n-$l)>10?Ll():void 0}function jl(e,t){const n=Number(e);return isNaN(n)?t:n}function Rl(){const e=__uniConfig.globalStyle||{},t=jl(e.rpxCalcMaxDeviceWidth,960),n=jl(e.rpxCalcBaseDeviceWidth,375);function o(){let e=function(){const e=/^Apple/.test(navigator.vendor)&&"number"==typeof window.orientation,t=e&&90===Math.abs(window.orientation);var n=e?Math[t?"max":"min"](screen.width,screen.height):screen.width;return Math.min(window.innerWidth,document.documentElement.clientWidth,n)||n}();e=e<=t?e:n,document.documentElement.style.fontSize=e/23.4375+"px"}o(),document.addEventListener("DOMContentLoaded",o),window.addEventListener("load",o),window.addEventListener("resize",o)}function Nl(){Rl(),pe(),window.addEventListener("touchstart",Ml,kl),window.addEventListener("touchmove",Pl,kl),window.addEventListener("touchend",Ll,kl),window.addEventListener("touchcancel",Ll,kl)}function Il(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bl,Dl,Fl=["top","left","right","bottom"],Hl={};function Vl(){return Dl="CSS"in window&&"function"==typeof CSS.supports?CSS.supports("top: env(safe-area-inset-top)")?"env":CSS.supports("top: constant(safe-area-inset-top)")?"constant":"":""}function Wl(){if(Dl="string"==typeof Dl?Dl:Vl()){var e=[],t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t={passive:!0}}});window.addEventListener("test",null,n)}catch(a){}var o=document.createElement("div");r(o,{position:"absolute",left:"0",top:"0",width:"0",height:"0",zIndex:"-1",overflow:"hidden",visibility:"hidden"}),Fl.forEach((function(e){s(o,e)})),document.body.appendChild(o),i(),Bl=!0}else Fl.forEach((function(e){Hl[e]=0}));function r(e,t){var n=e.style;Object.keys(t).forEach((function(e){var o=t[e];n[e]=o}))}function i(t){t?e.push(t):e.forEach((function(e){e()}))}function s(e,n){var o=document.createElement("div"),s=document.createElement("div"),a=document.createElement("div"),l=document.createElement("div"),c={position:"absolute",width:"100px",height:"200px",boxSizing:"border-box",overflow:"hidden",paddingBottom:Dl+"(safe-area-inset-"+n+")"};r(o,c),r(s,c),r(a,{transition:"0s",animation:"none",width:"400px",height:"400px"}),r(l,{transition:"0s",animation:"none",width:"250%",height:"250%"}),o.appendChild(a),s.appendChild(l),e.appendChild(o),e.appendChild(s),i((function(){o.scrollTop=s.scrollTop=1e4;var e=o.scrollTop,r=s.scrollTop;function i(){this.scrollTop!==(this===o?e:r)&&(o.scrollTop=s.scrollTop=1e4,e=o.scrollTop,r=s.scrollTop,function(e){Ul.length||setTimeout((function(){var e={};Ul.forEach((function(t){e[t]=Hl[t]})),Ul.length=0,Yl.forEach((function(t){t(e)}))}),0);Ul.push(e)}(n))}o.addEventListener("scroll",i,t),s.addEventListener("scroll",i,t)}));var u=getComputedStyle(o);Object.defineProperty(Hl,n,{configurable:!0,get:function(){return parseFloat(u.paddingBottom)}})}}function zl(e){return Bl||Wl(),Hl[e]}var Ul=[];var Yl=[];const ql=Il({get support(){return 0!=("string"==typeof Dl?Dl:Vl()).length},get top(){return zl("top")},get left(){return zl("left")},get right(){return zl("right")},get bottom(){return zl("bottom")},onChange:function(e){Vl()&&(Bl||Wl(),"function"==typeof e&&Yl.push(e))},offChange:function(e){var t=Yl.indexOf(e);t>=0&&Yl.splice(t,1)}}),Xl=gs((()=>{}),["prevent"]),Kl=gs((e=>{}),["stop"]);function Gl(e,t){return parseInt((e.getPropertyValue(t).match(/\d+/)||["0"])[0])}function Jl(){const e=Gl(document.documentElement.style,"--window-top");return e?e+ql.top:0}function Zl(e){const t=document.documentElement.style;Object.keys(e).forEach((n=>{t.setProperty(n,e[n])}))}function Ql(e){return Symbol(e)}const ec="M1.952 18.080q-0.32-0.352-0.416-0.88t0.128-0.976l0.16-0.352q0.224-0.416 0.64-0.528t0.8 0.176l6.496 4.704q0.384 0.288 0.912 0.272t0.88-0.336l17.312-14.272q0.352-0.288 0.848-0.256t0.848 0.352l-0.416-0.416q0.32 0.352 0.32 0.816t-0.32 0.816l-18.656 18.912q-0.32 0.352-0.8 0.352t-0.8-0.32l-7.936-8.064z",tc="M15.808 0.16q-4.224 0-7.872 2.176-3.552 2.112-5.632 5.728-2.144 3.744-2.144 8.128 0 4.192 2.144 7.872 2.112 3.52 5.632 5.632 3.68 2.144 7.872 2.144 4.384 0 8.128-2.144 3.616-2.080 5.728-5.632 2.176-3.648 2.176-7.872 0-4.384-2.176-8.128-2.112-3.616-5.728-5.728-3.744-2.176-8.128-2.176zM15.136 8.672h1.728q0.128 0 0.224 0.096t0.096 0.256l-0.384 10.24q0 0.064-0.048 0.112t-0.112 0.048h-1.248q-0.096 0-0.144-0.048t-0.048-0.112l-0.384-10.24q0-0.16 0.096-0.256t0.224-0.096zM16 23.328q-0.48 0-0.832-0.352t-0.352-0.848 0.352-0.848 0.832-0.352 0.832 0.352 0.352 0.848-0.352 0.848-0.832 0.352z";function nc(e,t="#000",n=27){return Qr("svg",{width:n,height:n,viewBox:"0 0 32 32"},[Qr("path",{d:e,fill:t},null,8,["d","fill"])],8,["width","height"])}function oc(){{const{$pageInstance:e}=di();return e&&e.proxy.$page.id}}function rc(){const e=gp(),t=e.length;if(t)return e[t-1]}function ic(){const e=rc();if(e)return e.$page.meta}function sc(){const e=ic();return e?e.id:-1}function ac(){const e=rc();if(e)return e.$vm}const lc=["navigationBar","pullToRefresh"];function cc(e,t){const n=JSON.parse(JSON.stringify(__uniConfig.globalStyle||{})),o=c({id:t},n,e);lc.forEach((t=>{o[t]=c({},n[t],e[t])}));const{navigationBar:r}=o;return r.titleText&&r.titleImage&&(r.titleText=""),o}function uc(e,t,n,o,r,i){const{id:s,route:a}=o,l=Me(o.navigationBar,__uniConfig.themeConfig,i).titleColor;return{id:s,path:ae(a),route:a,fullPath:t,options:n,meta:o,openType:e,eventChannel:r,statusBarStyle:"#ffffff"===l?"light":"dark"}}function dc(e,t,n){if(v(e))n=t,t=e,e=ac();else if("number"==typeof e){const t=gp().find((t=>t.$page.id===e));e=t?t.$vm:ac()}if(!e)return;const o=e.$[t];return o&&((e,t)=>{let n;for(let o=0;o{function s(){if((()=>{const{scrollHeight:e}=document.documentElement,t=window.innerHeight,o=window.scrollY,i=o>0&&e>t&&o+t+n>=e,s=Math.abs(e-hc)>n;return!i||r&&!s?(!i&&r&&(r=!1),!1):(hc=e,r=!0,!0)})())return t&&t(),i=!1,setTimeout((function(){i=!0}),350),!0}e&&e(window.pageYOffset),t&&i&&(s()||(pc=setTimeout(s,300))),o=!1};return function(){clearTimeout(pc),o||requestAnimationFrame(s),o=!0}}function gc(e,t){if(0===t.indexOf("/"))return t;if(0===t.indexOf("./"))return gc(e,t.slice(2));const n=t.split("/"),o=n.length;let r=0;for(;r0?e.split("/"):[];return i.splice(i.length-r-1,r+1),ae(i.concat(n).join("/"))}function vc(e,t=!1){return t?__uniRoutes.find((t=>t.path===e||t.alias===e)):__uniRoutes.find((t=>t.path===e))}class yc{constructor(e){this.$bindClass=!1,this.$bindStyle=!1,this.$vm=e,this.$el=function(e,t=!1){const{vnode:n}=e;if(oe(n.el))return t?n.el?[n.el]:[]:n.el;const{subTree:o}=e;if(16&o.shapeFlag){const e=o.children.filter((e=>e.el&&oe(e.el)));if(e.length>0)return t?e.map((e=>e.el)):e[0].el}return t?n.el?[n.el]:[]:n.el}(e.$),this.$el.getAttribute&&(this.$bindClass=!!this.$el.getAttribute("class"),this.$bindStyle=!!this.$el.getAttribute("style"))}selectComponent(e){if(!this.$el||!e)return;const t=xc(this.$el.querySelector(e));return t?_c(t,!1):void 0}selectAllComponents(e){if(!this.$el||!e)return[];const t=[],n=this.$el.querySelectorAll(e);for(let o=0;o-1&&t.splice(n,1)}const n=this.$el.__wxsRemoveClass||(this.$el.__wxsRemoveClass=[]);return-1===n.indexOf(e)&&(n.push(e),this.forceUpdate("class")),this}hasClass(e){return this.$el&&this.$el.classList.contains(e)}getDataset(){return this.$el&&this.$el.dataset}callMethod(e,t={}){const n=this.$vm[e];g(n)?n(JSON.parse(JSON.stringify(t))):this.$vm.ownerId&&Em.publishHandler("onWxsInvokeCallMethod",{nodeId:this.$el.__id,ownerId:this.$vm.ownerId,method:e,args:t})}requestAnimationFrame(e){return window.requestAnimationFrame(e)}getState(){return this.$el&&(this.$el.__wxsState||(this.$el.__wxsState={}))}triggerEvent(e,t={}){return this.$vm.$emit(e,t),this}getComputedStyle(e){if(this.$el){const t=window.getComputedStyle(this.$el);return e&&e.length?e.reduce(((e,n)=>(e[n]=t[n],e)),{}):t}return{}}setTimeout(e,t){return window.setTimeout(e,t)}clearTimeout(e){return window.clearTimeout(e)}getBoundingClientRect(){return this.$el.getBoundingClientRect()}}function _c(e,t=!0){if(t&&e&&(e=ne(e.$)),e&&e.$el)return e.$el.__wxsComponentDescriptor||(e.$el.__wxsComponentDescriptor=new yc(e)),e.$el.__wxsComponentDescriptor}function bc(e,t){return _c(e,t)}function wc(e,t,n,o=!0){if(t){e.__instance||(e.__instance=!0,Object.defineProperty(e,"instance",{get:()=>bc(n.proxy,!1)}));const r=function(e,t,n=!0){if(!t)return!1;if(n&&e.length<2)return!1;const o=ne(t);if(!o)return!1;const r=o.$.type;return!(!r.$wxs&&!r.$renderjs)&&o}(t,n,o);if(r)return[e,bc(r,!1)]}}function xc(e){if(e)return e.__vueParentComponent&&e.__vueParentComponent.proxy}function Sc(e,t=!1){const{type:n,timeStamp:o,target:r,currentTarget:i}=e;let s,a;s=ve(t?r:function(e){for(;e&&0!==e.tagName.indexOf("UNI-");)e=e.parentElement;return e}(r)),a=ve(i);const l={type:n,timeStamp:o,target:s,detail:{},currentTarget:a};return e._stopped&&(l._stopped=!0),e.type.startsWith("touch")&&(l.touches=e.touches,l.changedTouches=e.changedTouches),function(e,t){c(e,{preventDefault:()=>t.preventDefault(),stopPropagation:()=>t.stopPropagation()})}(l,e),l}function Tc(e,t){return{force:1,identifier:0,clientX:e.clientX,clientY:e.clientY-t,pageX:e.pageX,pageY:e.pageY-t}}function Ec(e,t){const n=[];for(let o=0;o0===e.type.indexOf("mouse")||["contextmenu"].includes(e.type))(e))!function(e,t){const n=Jl();e.pageX=t.pageX,e.pageY=t.pageY-n,e.clientX=t.clientX,e.clientY=t.clientY-n,e.touches=e.changedTouches=[Tc(t,n)]}(i,e);else if((e=>"undefined"!=typeof TouchEvent&&e instanceof TouchEvent||0===e.type.indexOf("touch")||["longpress"].indexOf(e.type)>=0)(e)){const t=Jl();i.touches=Ec(e.touches,t),i.changedTouches=Ec(e.changedTouches,t)}else if((e=>!e.type.indexOf("key")&&e instanceof KeyboardEvent)(e)){["key","code"].forEach((t=>{Object.defineProperty(i,t,{get:()=>e[t]})}))}return wc(i,t,n)||[i]},createNativeEvent:Sc},Symbol.toStringTag,{value:"Module"});function kc(e){!function(e){const t=e.globalProperties;c(t,Cc),t.$gcd=bc}(e._context.config)}let Oc=1;function Lc(e){return(e||sc())+".invokeViewApi"}const Ac=c(wl("view"),{invokeOnCallback:(e,t)=>Cm.emit("api."+e,t),invokeViewMethod:(e,t,n,o)=>{const{subscribe:r,publishHandler:i}=Cm,s=o?Oc++:0;o&&r("invokeViewApi."+s,o,!0),i(Lc(n),{id:s,name:e,args:t},n)},invokeViewMethodKeepAlive:(e,t,n,o)=>{const{subscribe:r,unsubscribe:i,publishHandler:s}=Cm,a=Oc++,l="invokeViewApi."+a;return r(l,n),s(Lc(o),{id:a,name:e,args:t},o),()=>{i(l)}}});function $c(e){dc(rc(),"onResize",e),Cm.invokeOnCallback("onWindowResize",e)}function Mc(e){const t=rc();dc(Fp(),"onShow",e),dc(t,"onShow")}function Pc(){dc(Fp(),"onHide"),dc(rc(),"onHide")}const jc=["onPageScroll","onReachBottom"];function Rc(){jc.forEach((e=>Cm.subscribe(e,function(e){return(t,n)=>{dc(parseInt(n),e,t)}}(e))))}function Nc(){!function(){const{on:e}=Cm;e("onResize",$c),e("onAppEnterForeground",Mc),e("onAppEnterBackground",Pc)}(),Rc()}function Ic(){if(this.$route){const e=this.$route.meta;return e.eventChannel||(e.eventChannel=new Se(this.$page.id)),e.eventChannel}}function Bc(e){e._context.config.globalProperties.getOpenerEventChannel=Ic}function Dc(){return{path:"",query:{},scene:1001,referrerInfo:{appId:"",extraData:{}}}}function Fc(e){return/^-?\d+[ur]px$/i.test(e)?e.replace(/(^-?\d+)[ur]px$/i,((e,t)=>`${Qu(parseFloat(t))}px`)):/^-?[\d\.]+$/.test(e)?`${e}px`:e||""}function Hc(e){const t=e.animation;if(!t||!t.actions||!t.actions.length)return;let n=0;const o=t.actions,r=t.actions.length;function i(){const t=o[n],s=t.option.transition,a=function(e){const t=["matrix","matrix3d","scale","scale3d","rotate3d","skew","translate","translate3d"],n=["scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","translateX","translateY","translateZ"],o=["opacity","background-color"],r=["width","height","left","right","top","bottom"],i=e.animates,s=e.option,a=s.transition,l={},c=[];return i.forEach((e=>{let i=e.type,s=[...e.args];if(t.concat(n).includes(i))i.startsWith("rotate")||i.startsWith("skew")?s=s.map((e=>parseFloat(e)+"deg")):i.startsWith("translate")&&(s=s.map(Fc)),n.indexOf(i)>=0&&(s.length=1),c.push(`${i}(${s.join(",")})`);else if(o.concat(r).includes(s[0])){i=s[0];const e=s[1];l[i]=r.includes(i)?Fc(e):e}})),l.transform=l.webkitTransform=c.join(" "),l.transition=l.webkitTransition=Object.keys(l).map((e=>`${function(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)).replace("webkit","-webkit")}(e)} ${a.duration}ms ${a.timingFunction} ${a.delay}ms`)).join(","),l.transformOrigin=l.webkitTransformOrigin=s.transformOrigin,l}(t);Object.keys(a).forEach((t=>{e.$el.style[t]=a[t]})),n+=1,n{i()}),0)}const Vc={props:["animation"],watch:{animation:{deep:!0,handler(){Hc(this)}}},mounted(){Hc(this)}},Wc=e=>{e.__reserved=!0;const{props:t,mixins:n}=e;return t&&t.animation||(n||(e.mixins=[])).push(Vc),zc(e)},zc=e=>(e.__reserved=!0,e.compatConfig={MODE:3},mo(e));function Uc(e){return e.__wwe=!0,e}function Yc(e,t){return(n,o,r)=>{e.value&&t(n,function(e,t,n,o){let r;return r=ve(n),{type:o.type||e,timeStamp:t.timeStamp||0,target:r,currentTarget:r,detail:o}}(n,o,e.value,r||{}))}}const qc={hoverClass:{type:String,default:"none"},hoverStopPropagation:{type:Boolean,default:!1},hoverStartTime:{type:[Number,String],default:50},hoverStayTime:{type:[Number,String],default:400}};function Xc(e){const t=nn(!1);let n,o,r=!1;function i(){requestAnimationFrame((()=>{clearTimeout(o),o=setTimeout((()=>{t.value=!1}),parseInt(e.hoverStayTime))}))}function s(o){o._hoverPropagationStopped||e.hoverClass&&"none"!==e.hoverClass&&!e.disabled&&(e.hoverStopPropagation&&(o._hoverPropagationStopped=!0),r=!0,n=setTimeout((()=>{t.value=!0,r||i()}),parseInt(e.hoverStartTime)))}function a(){r=!1,t.value&&i()}function l(){a(),window.removeEventListener("mouseup",l)}return{hovering:t,binding:{onTouchstartPassive:Uc((function(e){e.touches.length>1||s(e)})),onMousedown:Uc((function(e){r||(s(e),window.addEventListener("mouseup",l))})),onTouchend:Uc((function(){a()})),onMouseup:Uc((function(){r&&l()})),onTouchcancel:Uc((function(){r=!1,t.value=!1,clearTimeout(n)}))}}}function Kc(e,t){return v(t)&&(t=[t]),t.reduce(((t,n)=>(e[n]&&(t[n]=!0),t)),Object.create(null))}const Gc=Ql("uf"),Jc=Ql("ul");function Zc(e,t,n){const o=oc();n&&!e||S(t)&&Object.keys(t).forEach((r=>{n?0!==r.indexOf("@")&&0!==r.indexOf("uni-")&&Em.on(`uni-${r}-${o}-${e}`,t[r]):0===r.indexOf("uni-")?Em.on(r,t[r]):e&&Em.on(`uni-${r}-${o}-${e}`,t[r])}))}function Qc(e,t,n){const o=oc();n&&!e||S(t)&&Object.keys(t).forEach((r=>{n?0!==r.indexOf("@")&&0!==r.indexOf("uni-")&&Em.off(`uni-${r}-${o}-${e}`,t[r]):0===r.indexOf("uni-")?Em.off(r,t[r]):e&&Em.off(`uni-${r}-${o}-${e}`,t[r])}))}const eu=Wc({name:"Button",props:{id:{type:String,default:""},hoverClass:{type:String,default:"button-hover"},hoverStartTime:{type:[Number,String],default:20},hoverStayTime:{type:[Number,String],default:70},hoverStopPropagation:{type:Boolean,default:!1},disabled:{type:[Boolean,String],default:!1},formType:{type:String,default:""},openType:{type:String,default:""},loading:{type:[Boolean,String],default:!1},plain:{type:[Boolean,String],default:!1}},setup(e,{slots:t}){const n=nn(null),o=mr(Gc,!1),{hovering:r,binding:i}=Xc(e),s=Uc(((t,r)=>{if(e.disabled)return t.stopImmediatePropagation();r&&n.value.click();const i=e.formType;if(i){if(!o)return;"submit"===i?o.submit(t):"reset"===i&&o.reset(t)}else;})),a=mr(Jc,!1);return a&&(a.addHandler(s),Bo((()=>{a.removeHandler(s)}))),function(e,t){Zc(e.id,t),Gn((()=>e.id),((e,n)=>{Qc(n,t,!0),Zc(e,t,!0)})),Do((()=>{Qc(e.id,t)}))}(e,{"label-click":s}),()=>{const o=e.hoverClass,a=Kc(e,"disabled"),l=Kc(e,"loading"),c=Kc(e,"plain"),u=o&&"none"!==o;return Qr("uni-button",si({ref:n,onClick:s,id:e.id,class:u&&r.value?o:""},u&&i,a,l,c),[t.default&&t.default()],16,["onClick","id"])}}});function tu(e){const{base:t}=__uniConfig.router;return 0===ae(e).indexOf(t)?ae(e):t+e}function nu(e){const{base:t,assets:n}=__uniConfig.router;if("./"===t&&(0!==e.indexOf("./")||!e.includes("/static/")&&0!==e.indexOf("./"+(n||"assets")+"/")||(e=e.slice(1))),0===e.indexOf("/")){if(0!==e.indexOf("//"))return tu(e.slice(1));e="https:"+e}if(ee.test(e)||te.test(e)||0===e.indexOf("blob:"))return e;const o=gp();return o.length?tu(gc(o[o.length-1].$page.route,e).slice(1)):e}const ou=navigator.userAgent,ru=/android/i.test(ou),iu=/iphone|ipad|ipod/i.test(ou),su=ou.match(/Windows NT ([\d|\d.\d]*)/i),au=/Macintosh|Mac/i.test(ou),lu=/Linux|X11/i.test(ou),cu=au&&navigator.maxTouchPoints>0;function uu(){return/^Apple/.test(navigator.vendor)&&"number"==typeof window.orientation}function du(e){return e&&90===Math.abs(window.orientation)}function fu(e,t){return e?Math[t?"max":"min"](screen.width,screen.height):screen.width}function pu(e){return Math.min(window.innerWidth,document.documentElement.clientWidth,e)||e}const hu=["original","compressed"],mu=["album","camera"],gu=["GET","OPTIONS","HEAD","POST","PUT","DELETE","TRACE","CONNECT","PATCH"];function vu(e,t){return e&&-1!==t.indexOf(e)?e:t[0]}function yu(e,t){return!p(e)||0===e.length||e.find((e=>-1===t.indexOf(e)))?t:e}function _u(e){return function(){try{return e.apply(e,arguments)}catch(t){console.error(t)}}}let bu=1;const wu={};function xu(e,t,n){if("number"==typeof e){const o=wu[e];if(o)return o.keepAlive||delete wu[e],o.callback(t,n)}return t}const Su="success",Tu="fail",Eu="complete";function Cu(e,t={},{beforeAll:n,beforeSuccess:o}={}){S(t)||(t={});const{success:r,fail:i,complete:s}=function(e){const t={};for(const n in e){const o=e[n];g(o)&&(t[n]=_u(o),delete e[n])}return t}(t),a=g(r),l=g(i),c=g(s),u=bu++;return function(e,t,n,o=!1){wu[e]={name:t,keepAlive:o,callback:n}}(u,e,(u=>{(u=u||{}).errMsg=function(e,t){return e&&-1!==e.indexOf(":fail")?t+e.substring(e.indexOf(":fail")):t+":ok"}(u.errMsg,e),g(n)&&n(u),u.errMsg===e+":ok"?(g(o)&&o(u,t),a&&r(u)):l&&i(u),c&&s(u)})),u}const ku="success",Ou="fail",Lu="complete",Au={},$u={};function Mu(e,t){return function(n){return e(n,t)||n}}function Pu(e,t,n){let o=!1;for(let r=0;re(t),catch(){}}}function ju(e,t={}){return[ku,Ou,Lu].forEach((n=>{const o=e[n];if(!p(o))return;const r=t[n];t[n]=function(e){Pu(o,e,t).then((e=>g(r)&&r(e)||e))}})),t}function Ru(e,t){const n=[];p(Au.returnValue)&&n.push(...Au.returnValue);const o=$u[e];return o&&p(o.returnValue)&&n.push(...o.returnValue),n.forEach((e=>{t=e(t)||t})),t}function Nu(e){const t=Object.create(null);Object.keys(Au).forEach((e=>{"returnValue"!==e&&(t[e]=Au[e].slice())}));const n=$u[e];return n&&Object.keys(n).forEach((e=>{"returnValue"!==e&&(t[e]=(t[e]||[]).concat(n[e]))})),t}function Iu(e,t,n,o){const r=Nu(e);if(r&&Object.keys(r).length){if(p(r.invoke)){return Pu(r.invoke,n).then((n=>t(ju(Nu(e),n),...o)))}return t(ju(r,n),...o)}return t(n,...o)}function Bu(e,t){return(n={},...o)=>function(e){return!(!S(e)||![Su,Tu,Eu].find((t=>g(e[t]))))}(n)?Ru(e,Iu(e,t,n,o)):Ru(e,new Promise(((r,i)=>{Iu(e,t,c(n,{success:r,fail:i}),o)})))}function Du(e,t,n,o={}){const r=t+":fail"+(n?" "+n:"");return delete o.errCode,xu(e,c({errMsg:r},o))}function Fu(e,t,n,o){if(o&&o.beforeInvoke){const e=o.beforeInvoke(t);if(v(e))return e}const r=function(e,t){const n=e[0];if(!t||!t.formatArgs||!S(t.formatArgs)&&S(n))return;const o=t.formatArgs,r=Object.keys(o);for(let i=0;i{const r=Cu(e,n,o),i=Fu(0,[n],0,o);return i?Du(r,e,i):t(n,{resolve:t=>function(e,t,n){return xu(e,c(n||{},{errMsg:t+":ok"}))}(r,e,t),reject:(t,n)=>Du(r,e,function(e){return!e||v(e)?e:e.stack?(console.error(e.message+"\n"+e.stack),e.message):e}(t),n)})}}function Vu(e,t,n,o){return Bu(e,Hu(e,t,0,o))}function Wu(e,t,n,o){return function(e,t,n,o){return(...e)=>{const n=Fu(0,e,0,o);if(n)throw new Error(n);return t.apply(null,e)}}(0,t,0,o)}function zu(e,t,n,o){return Bu(e,function(e,t,n,o){return Hu(e,t,0,o)}(e,t,0,o))}let Uu=!1,Yu=0,qu=0,Xu=960,Ku=375,Gu=750;function Ju(){const{platform:e,pixelRatio:t,windowWidth:n}=function(){const e=uu(),t=pu(fu(e,du(e)));return{platform:iu?"ios":"other",pixelRatio:window.devicePixelRatio,windowWidth:t}}();Yu=n,qu=t,Uu="ios"===e}function Zu(e,t){const n=Number(e);return isNaN(n)?t:n}const Qu=Wu(0,((e,t)=>{if(0===Yu&&(Ju(),function(){const e=__uniConfig.globalStyle||{};Xu=Zu(e.rpxCalcMaxDeviceWidth,960),Ku=Zu(e.rpxCalcBaseDeviceWidth,375),Gu=Zu(e.rpxCalcBaseDeviceWidth,750)}()),0===(e=Number(e)))return 0;let n=t||Yu;n=e===Gu||n<=Xu?n:Ku;let o=e/750*n;return o<0&&(o=-o),o=Math.floor(o+1e-4),0===o&&(o=1!==qu&&Uu?.5:1),e<0?-o:o}));function ed(e,t){Object.keys(t).forEach((n=>{g(t[n])&&(e[n]=function(e,t){const n=t?e?e.concat(t):p(t)?t:[t]:e;return n?function(e){const t=[];for(let n=0;n{v(e)&&S(t)?ed($u[e]||($u[e]={}),t):S(e)&&ed(Au,e)})),nd={formatArgs:{}},od={duration:400,timingFunction:"linear",delay:0,transformOrigin:"50% 50% 0"};class rd{constructor(e){this.actions=[],this.currentTransform={},this.currentStepAnimates=[],this.option=c({},od,e)}_getOption(e){const t={transition:c({},this.option,e),transformOrigin:""};return t.transformOrigin=t.transition.transformOrigin,delete t.transition.transformOrigin,t}_pushAnimates(e,t){this.currentStepAnimates.push({type:e,args:t})}_converType(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}_getValue(e){return"number"==typeof e?`${e}px`:e}export(){const e=this.actions;return this.actions=[],{actions:e}}step(e){return this.currentStepAnimates.forEach((e=>{"style"!==e.type?this.currentTransform[e.type]=e:this.currentTransform[`${e.type}.${e.args[0]}`]=e})),this.actions.push({animates:Object.values(this.currentTransform),option:this._getOption(e)}),this.currentStepAnimates=[],this}}const id=le((()=>{const e=["opacity","backgroundColor"],t=["width","height","left","right","top","bottom"];["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"].concat(e,t).forEach((n=>{rd.prototype[n]=function(...o){return e.concat(t).includes(n)?this._pushAnimates("style",[this._converType(n),t.includes(n)?this._getValue(o[0]):o[0]]):this._pushAnimates(n,o),this}}))})),sd=Wu(0,(e=>(id(),new rd(e))),0,nd),ad=Wu(0,(()=>{const e=Fp();return e&&e.$vm?e.$vm.$locale:fl().getLocale()})),ld={onUnhandledRejection:[],onPageNotFound:[],onError:[],onShow:[],onHide:[]};const cd=Wu(0,(()=>c({},Xd)));let ud,dd,fd;const pd=[];const hd=zu("getPushClientId",((e,{resolve:t,reject:n})=>{Promise.resolve().then((()=>{var e,o;void 0===fd&&(fd=!1,ud="",dd="uniPush is not enabled"),pd.push(((e,o)=>{e?t({cid:e}):n(o)})),void 0!==ud&&(e=ud,o=dd,pd.forEach((t=>{t(e,o)})),pd.length=0)}))})),md=e=>{},gd=e=>{},vd={formatArgs:{showToast:!0},beforeInvoke(){_l()},beforeSuccess(e,t){if(!t.showToast)return;const{t:n}=fl(),o=n("uni.setClipboardData.success");o&&cm({title:o,icon:"success",mask:!1})}},yd=(Boolean,{formatArgs:{count(e,t){(!e||e<=0)&&(t.count=9)},sizeType(e,t){t.sizeType=yu(e,hu)},sourceType(e,t){t.sourceType=yu(e,mu)},extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=["*"])}}}),_d={formatArgs:{sourceType(e,t){t.sourceType=yu(e,mu)},compressed:!0,maxDuration:60,camera:"back",extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=["*"])}}},bd=(Boolean,["all","image","video"]),wd={formatArgs:{count(e,t){(!e||e<=0)&&(t.count=100)},sourceType(e,t){t.sourceType=yu(e,mu)},type(e,t){t.type=vu(e,bd)},extension(e,t){if(e instanceof Array&&0===e.length)return"param extension should not be empty.";e||(t.extension=[""])}}},xd="json",Sd=["text","arraybuffer"],Td=encodeURIComponent;ArrayBuffer,Boolean;const Ed={formatArgs:{method(e,t){t.method=vu((e||"").toUpperCase(),gu)},data(e,t){t.data=e||""},url(e,t){t.method===gu[0]&&S(t.data)&&Object.keys(t.data).length&&(t.url=function(e,t){let n=e.split("#");const o=n[1]||"";n=n[0].split("?");let r=n[1]||"";e=n[0];const i=r.split("&").filter((e=>e)),s={};i.forEach((e=>{const t=e.split("=");s[t[0]]=t[1]}));for(const a in t)if(f(t,a)){let e=t[a];null==e?e="":S(e)&&(e=JSON.stringify(e)),s[Td(a)]=Td(e)}return r=Object.keys(s).map((e=>`${e}=${s[e]}`)).join("&"),e+(r?"?"+r:"")+(o?"#"+o:"")}(e,t.data))},header(e,t){const n=t.header=e||{};t.method!==gu[0]&&(Object.keys(n).find((e=>"content-type"===e.toLowerCase()))||(n["Content-Type"]="application/json"))},dataType(e,t){t.dataType=(e||xd).toLowerCase()},responseType(e,t){t.responseType=(e||"").toLowerCase(),-1===Sd.indexOf(t.responseType)&&(t.responseType="text")}}},Cd={formatArgs:{filePath(e,t){e&&(t.filePath=nu(e))},header(e,t){t.header=e||{}},formData(e,t){t.formData=e||{}}}},kd={formatArgs:{header(e,t){t.header=e||{}},method(e,t){t.method=vu((e||"").toUpperCase(),gu)},protocols(e,t){v(e)&&(t.protocols=[e])}}};const Od={url:{type:String,required:!0}},Ld=(jd(["slide-in-right","slide-in-left","slide-in-top","slide-in-bottom","fade-in","zoom-out","zoom-fade-out","pop-in","none"]),jd(["slide-out-right","slide-out-left","slide-out-top","slide-out-bottom","fade-out","zoom-in","zoom-fade-in","pop-out","none"]),Id("navigateTo")),Ad=Id("redirectTo"),$d=Id("reLaunch"),Md=Id("switchTab"),Pd={formatArgs:{delta(e,t){e=parseInt(e+"")||1,t.delta=Math.min(gp().length-1,e)}}};function jd(e){return{animationType:{type:String,validator(t){if(t&&-1===e.indexOf(t))return"`"+t+"` is not supported for `animationType` (supported values are: `"+e.join("`|`")+"`)"}},animationDuration:{type:Number}}}let Rd;function Nd(){Rd=""}function Id(e){return{formatArgs:{url:Bd(e)},beforeAll:Nd}}function Bd(e){return function(t,n){if(!t)return'Missing required args: "url"';const o=(t=function(e){if(0===e.indexOf("/"))return e;let t="";const n=gp();return n.length&&(t=n[n.length-1].$page.route),gc(t,e)}(t)).split("?")[0],r=vc(o,!0);if(!r)return"page `"+t+"` is not found";if("navigateTo"===e||"redirectTo"===e){if(r.meta.isTabBar)return`can not ${e} a tabbar page`}else if("switchTab"===e&&!r.meta.isTabBar)return"can not switch to no-tabBar page";if("switchTab"!==e&&"preloadPage"!==e||!r.meta.isTabBar||"appLaunch"===n.openType||(t=o),r.meta.isEntry&&(t=t.replace(r.alias,"/")),n.url=function(e){if(!v(e))return e;const t=e.indexOf("?");if(-1===t)return e;const n=e.slice(t+1).trim().replace(/^(\?|#|&)/,"");if(!n)return e;e=e.slice(0,t);const o=[];return n.split("&").forEach((e=>{const t=e.replace(/\+/g," ").split("="),n=t.shift(),r=t.length>0?t.join("="):"";o.push(n+"="+encodeURIComponent(r))})),o.length?e+"?"+o.join("&"):e}(t),"unPreloadPage"!==e)if("preloadPage"!==e){if(Rd===t&&"appLaunch"!==n.openType)return`${Rd} locked`;__uniConfig.ready&&(Rd=t)}else if(r.meta.isTabBar){const e=gp(),t=r.path.slice(1);if(e.find((e=>e.route===t)))return"tabBar page `"+t+"` already exists"}}}Boolean;const Dd={formatArgs:{title:"",mask:!1}},Fd=(Boolean,{beforeInvoke(){vl()},formatArgs:{title:"",content:"",placeholderText:"",showCancel:!0,editable:!1,cancelText(e,t){if(!f(t,"cancelText")){const{t:e}=fl();t.cancelText=e("uni.showModal.cancel")}},cancelColor:"#000",confirmText(e,t){if(!f(t,"confirmText")){const{t:e}=fl();t.confirmText=e("uni.showModal.confirm")}},confirmColor:"#007aff"}}),Hd=["success","loading","none","error"],Vd=(Boolean,{formatArgs:{title:"",icon(e,t){t.icon=vu(e,Hd)},image(e,t){t.image=e?nu(e):""},duration:1500,mask:!1}}),Wd={};function zd(e,t){const n=Wd[e];return n?Promise.resolve(n):/^data:[a-z-]+\/[a-z-]+;base64,/.test(e)?Promise.resolve(function(e){const t=e.split(","),n=t[0].match(/:(.*?);/),o=n?n[1]:"",r=atob(t[1]);let i=r.length;const s=new Uint8Array(i);for(;i--;)s[i]=r.charCodeAt(i);return Ud(s,o)}(e)):t?Promise.reject(new Error("not find")):new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="blob",o.onload=function(){t(this.response)},o.onerror=n,o.send()}))}function Ud(e,t){let n;if(e instanceof File)n=e;else{t=t||e.type||"";const r=`${Date.now()}${function(e){const t=e.split("/")[1];return t?`.${t}`:""}(t)}`;try{n=new File([e],r,{type:t})}catch(o){n=e=e instanceof Blob?e:new Blob([e],{type:t}),n.name=n.name||r}}return n}function Yd(e){for(const n in Wd)if(f(Wd,n)){if(Wd[n]===e)return n}var t=(window.URL||window.webkitURL).createObjectURL(e);return Wd[t]=e,t}function qd(e){(window.URL||window.webkitURL).revokeObjectURL(e),delete Wd[e]}const Xd=Dc(),Kd=Dc();const Gd=Wc({name:"ResizeSensor",props:{initial:{type:Boolean,default:!1}},emits:["resize"],setup(e,{emit:t}){const n=nn(null),o=function(e){return()=>{const{firstElementChild:t,lastElementChild:n}=e.value;t.scrollLeft=1e5,t.scrollTop=1e5,n.scrollLeft=1e5,n.scrollTop=1e5}}(n),r=function(e,t,n){const o=Ft({width:-1,height:-1});return Gn((()=>c({},o)),(e=>t("resize",e))),()=>{const t=e.value;t&&(o.width=t.offsetWidth,o.height=t.offsetHeight,n())}}(n,t,o);return function(e,t,n,o){To(o),Ro((()=>{t.initial&&wn(n);const r=e.value;r.offsetParent!==r.parentElement&&(r.parentElement.style.position="relative"),"AnimationEvent"in window||o()}))}(n,e,r,o),()=>Qr("uni-resize-sensor",{ref:n,onAnimationstartOnce:r},[Qr("div",{onScroll:r},[Qr("div",null,null)],40,["onScroll"]),Qr("div",{onScroll:r},[Qr("div",null,null)],40,["onScroll"])],40,["onAnimationstartOnce"])}});function Jd(){}const Zd={cursorSpacing:{type:[Number,String],default:0},showConfirmBar:{type:[Boolean,String],default:"auto"},adjustPosition:{type:[Boolean,String],default:!0},autoBlur:{type:[Boolean,String],default:!1}};function Qd(e,t,n){function o(e){const t=xi((()=>0===String(navigator.vendor).indexOf("Apple")));e.addEventListener("focus",(()=>{clearTimeout(undefined),document.addEventListener("click",Jd,!1)}));e.addEventListener("blur",(()=>{t.value&&e.blur(),document.removeEventListener("click",Jd,!1),t.value&&document.documentElement.scrollTo(document.documentElement.scrollLeft,document.documentElement.scrollTop)}))}Gn((()=>t.value),(e=>e&&o(e)))}const ef={src:{type:String,default:""},mode:{type:String,default:"scaleToFill"},lazyLoad:{type:[Boolean,String],default:!1},draggable:{type:Boolean,default:!1}},tf={widthFix:["offsetWidth","height",(e,t)=>e/t],heightFix:["offsetHeight","width",(e,t)=>e*t]},nf={aspectFit:["center center","contain"],aspectFill:["center center","cover"],widthFix:[,"100% 100%"],heightFix:[,"100% 100%"],top:["center top"],bottom:["center bottom"],center:["center center"],left:["left center"],right:["right center"],"top left":["left top"],"top right":["right top"],"bottom left":["left bottom"],"bottom right":["right bottom"]},of=Wc({name:"Image",props:ef,setup(e,{emit:t}){const n=nn(null),o=function(e,t){const n=nn(""),o=xi((()=>{let e="auto",o="";const r=nf[t.mode];return r?(r[0]&&(o=r[0]),r[1]&&(e=r[1])):(o="0% 0%",e="100% 100%"),`background-image:${n.value?'url("'+n.value+'")':"none"};background-position:${o};background-size:${e};`})),r=Ft({rootEl:e,src:xi((()=>t.src?nu(t.src):"")),origWidth:0,origHeight:0,origStyle:{width:"",height:""},modeStyle:o,imgSrc:n});return Ro((()=>{const t=e.value.style;r.origWidth=Number(t.width)||0,r.origHeight=Number(t.height)||0})),r}(n,e),r=Yc(n,t),{fixSize:i}=function(e,t,n){const o=()=>{const{mode:o}=t,r=tf[o];if(!r)return;const{origWidth:i,origHeight:s}=n,a=i&&s?i/s:0;if(!a)return;const l=e.value,c=l[r[0]];c&&(l.style[r[1]]=function(e){rf&&e>10&&(e=2*Math.round(e/2));return e}(r[2](c,a))+"px")},r=()=>{const{style:t}=e.value,{origStyle:{width:o,height:r}}=n;t.width=o,t.height=r};return Gn((()=>t.mode),((e,t)=>{tf[t]&&r(),tf[e]&&o()})),{fixSize:o,resetSize:r}}(n,e,o);return function(e,t,n,o,r){let i,s;const a=(t=0,n=0,o="")=>{e.origWidth=t,e.origHeight=n,e.imgSrc=o},l=l=>{if(!l)return c(),void a();i=i||new Image,i.onload=e=>{const{width:u,height:d}=i;a(u,d,l),o(),i.draggable=t.draggable,s&&s.remove(),s=i,n.value.appendChild(i),c(),r("load",e,{width:u,height:d})},i.onerror=t=>{a(),c(),r("error",t,{errMsg:`GET ${e.src} 404 (Not Found)`})},i.src=l},c=()=>{i&&(i.onload=null,i.onerror=null,i=null)};Gn((()=>e.src),(e=>l(e))),Gn((()=>e.imgSrc),(e=>{!e&&s&&(s.remove(),s=null)})),Ro((()=>l(e.src))),Bo((()=>c()))}(o,e,n,i,r),()=>Qr("uni-image",{ref:n},[Qr("div",{style:o.modeStyle},null,4),tf[e.mode]?Qr(Gd,{onResize:i},null,8,["onResize"]):Qr("span",null,null)],512)}});const rf="Google Inc."===navigator.vendor;const sf=ge(!0),af=[];let lf=0,cf=!1;const uf=e=>af.forEach((t=>t.userAction=e));function df(e={userAction:!1}){if(!cf){["touchstart","touchmove","touchend","mousedown","mouseup"].forEach((e=>{document.addEventListener(e,(function(){!lf&&uf(!0),lf++,setTimeout((()=>{!--lf&&uf(!1)}),0)}),sf)})),cf=!0}af.push(e)}const ff=()=>!!lf;function pf(){const e=Ft({userAction:!1});return Ro((()=>{df(e)})),Bo((()=>{!function(e){const t=af.indexOf(e);t>=0&&af.splice(t,1)}(e)})),{state:e}}function hf(){const e=Ft({attrs:{}});return Ro((()=>{let t=di();for(;t;){const n=t.type.__scopeId;n&&(e.attrs[n]=""),t=t.proxy&&"page"===t.proxy.$mpType?null:t.parent}})),{state:e}}function mf(e,t){const n=document.activeElement;if(!n)return t({});const o={};["input","textarea"].includes(n.tagName.toLowerCase())&&(o.start=n.selectionStart,o.end=n.selectionEnd),t(o)}const gf=function(){var e,t,n;e=sc(),n=mf,t=Tl(e,t="getSelectedTextRange"),Sl[t]||(Sl[t]=n)};function vf(e,t,n){"number"===t&&isNaN(Number(e))&&(e="");const o=null==e?"":String(e);return null==n?o:o.slice(0,n)}const yf=["none","text","decimal","numeric","tel","search","email","url"],_f=c({},{name:{type:String,default:""},modelValue:{type:[String,Number]},value:{type:[String,Number]},disabled:{type:[Boolean,String],default:!1},autoFocus:{type:[Boolean,String],default:!1},focus:{type:[Boolean,String],default:!1},cursor:{type:[Number,String],default:-1},selectionStart:{type:[Number,String],default:-1},selectionEnd:{type:[Number,String],default:-1},type:{type:String,default:"text"},password:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},placeholderStyle:{type:String,default:""},placeholderClass:{type:String,default:""},maxlength:{type:[Number,String],default:140},confirmType:{type:String,default:"done"},confirmHold:{type:Boolean,default:!1},ignoreCompositionEvent:{type:Boolean,default:!0},step:{type:String,default:"0.000000000000000001"},inputmode:{type:String,default:void 0,validator:e=>!!~yf.indexOf(e)},cursorColor:{type:String,default:""}},Zd),bf=["input","focus","blur","update:value","update:modelValue","update:focus","compositionstart","compositionupdate","compositionend","keyboardheightchange"];function wf(e,t,n,o){let r=null;r=xe((n=>{t.value=vf(n,e.type)}),100,{setTimeout:setTimeout,clearTimeout:clearTimeout}),Gn((()=>e.modelValue),r),Gn((()=>e.value),r);const i=function(e,t){let n,o,r=0;const i=function(...i){const s=Date.now();clearTimeout(n),o=()=>{o=null,r=s,e.apply(this,i)},s-r{r.cancel(),n("update:modelValue",t.value),n("update:value",t.value),o("input",e,t)}),100);return jo((()=>{r.cancel(),i.cancel()})),{trigger:o,triggerInput:(e,t,n)=>{r.cancel(),i(e,t),n&&i.flush()}}}function xf(e,t){pf();const n=xi((()=>e.autoFocus||e.focus));function o(){if(!n.value)return;const e=t.value;e?e.focus():setTimeout(o,100)}Gn((()=>e.focus),(e=>{e?o():function(){const e=t.value;e&&e.blur()}()})),Ro((()=>{n.value&&wn(o)}))}function Sf(e,t,n,o){gf();const{fieldRef:r,state:i,trigger:s}=function(e,t,n){const o=nn(null),r=Yc(t,n),i=xi((()=>{const t=Number(e.selectionStart);return isNaN(t)?-1:t})),s=xi((()=>{const t=Number(e.selectionEnd);return isNaN(t)?-1:t})),a=xi((()=>{const t=Number(e.cursor);return isNaN(t)?-1:t})),l=xi((()=>{var t=Number(e.maxlength);return isNaN(t)?140:t}));let c="";c=vf(e.modelValue,e.type)||vf(e.value,e.type);const u=Ft({value:c,valueOrigin:c,maxlength:l,focus:e.focus,composing:!1,selectionStart:i,selectionEnd:s,cursor:a});return Gn((()=>u.focus),(e=>n("update:focus",e))),Gn((()=>u.maxlength),(e=>u.value=u.value.slice(0,e)),{immediate:!1}),{fieldRef:o,state:u,trigger:r}}(e,t,n),{triggerInput:a}=wf(e,i,n,s);xf(e,r),Qd(0,r);const{state:l}=hf();!function(e,t){const n=mr(Gc,!1);if(!n)return;const o=di(),r={submit(){const n=o.proxy;return[n[e],v(t)?n[t]:t.value]},reset(){v(t)?o.proxy[t]="":t.value=""}};n.addField(r),Bo((()=>{n.removeField(r)}))}("name",i),function(e,t,n,o,r,i){function s(){const n=e.value;n&&t.focus&&t.selectionStart>-1&&t.selectionEnd>-1&&"number"!==n.type&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd)}function a(){const n=e.value;n&&t.focus&&t.selectionStart<0&&t.selectionEnd<0&&t.cursor>-1&&"number"!==n.type&&(n.selectionEnd=n.selectionStart=t.cursor)}function l(e){return"number"===e.type?null:e.selectionEnd}Gn([()=>t.selectionStart,()=>t.selectionEnd],s),Gn((()=>t.cursor),a),Gn((()=>e.value),(function(){const c=e.value;if(!c)return;const u=function(e,o){e.stopPropagation(),g(i)&&!1===i(e,t)||(t.value=c.value,t.composing&&n.ignoreCompositionEvent||r(e,{value:c.value,cursor:l(c)},o))};function d(e){n.ignoreCompositionEvent||o(e.type,e,{value:e.data})}c.addEventListener("change",(e=>e.stopPropagation())),c.addEventListener("focus",(function(e){t.focus=!0,o("focus",e,{value:t.value}),s(),a()})),c.addEventListener("blur",(function(e){t.composing&&(t.composing=!1,u(e,!0)),t.focus=!1,o("blur",e,{value:t.value,cursor:l(e.target)})})),c.addEventListener("input",u),c.addEventListener("compositionstart",(e=>{e.stopPropagation(),t.composing=!0,d(e)})),c.addEventListener("compositionend",(e=>{e.stopPropagation(),t.composing&&(t.composing=!1,u(e)),d(e)})),c.addEventListener("compositionupdate",d)}))}(r,i,e,s,a,o);return{fieldRef:r,state:i,scopedAttrsState:l,fixDisabledColor:0===String(navigator.vendor).indexOf("Apple")&&CSS.supports("image-orientation:from-image"),trigger:s}}function Tf(e,t,n,o,r){if(t.value)if("."===e.data){if("."===t.value.slice(-1))return n.value=o.value=t.value=t.value.slice(0,-1),!1;if(t.value&&!t.value.includes("."))return t.value+=".",r&&(r.fn=()=>{n.value=o.value=t.value=t.value.slice(0,-1),o.removeEventListener("blur",r.fn)},o.addEventListener("blur",r.fn)),!1}else if("deleteContentBackward"===e.inputType&&navigator.userAgent.includes("iPhone OS 16")&&"."===t.value.slice(-2,-1))return t.value=n.value=o.value=t.value.slice(0,-2),!0}const Ef=Wc({name:"Input",props:c({},_f,{placeholderClass:{type:String,default:"input-placeholder"},textContentType:{type:String,default:""}}),emits:["confirm",...bf],setup(e,{emit:t,expose:n}){const o=["text","number","idcard","digit","password","tel"],r=["off","one-time-code"],i=xi((()=>{let t="";switch(e.type){case"text":"search"===e.confirmType&&(t="search");break;case"idcard":t="text";break;case"digit":t="number";break;default:t=~o.includes(e.type)?e.type:"text"}return e.password?"password":t})),s=xi((()=>{const t=r.indexOf(e.textContentType),n=r.indexOf(A(e.textContentType));return r[-1!==t?t:-1!==n?n:0]}));let a=function(e,t){if("number"===t.value){const t=void 0===e.modelValue?e.value:e.modelValue,n=nn(void 0!==t?t.toLocaleString():"");return Gn((()=>e.modelValue),(e=>{n.value=void 0!==e?e.toLocaleString():""})),Gn((()=>e.value),(e=>{n.value=void 0!==e?e.toLocaleString():""})),n}return nn("")}(e,i),l={fn:null};const c=nn(null),{fieldRef:u,state:d,scopedAttrsState:f,fixDisabledColor:p,trigger:h}=Sf(e,c,t,((e,t)=>{const n=e.target;if("number"===i.value){if(l.fn&&(n.removeEventListener("blur",l.fn),l.fn=null),n.validity&&!n.validity.valid){if((!a.value||!n.value)&&"-"===e.data||"-"===a.value[0]&&"deleteContentBackward"===e.inputType)return a.value="-",t.value="",l.fn=()=>{a.value=n.value=""},n.addEventListener("blur",l.fn),!1;const o=Tf(e,a,t,n,l);return"boolean"==typeof o?o:(a.value=t.value=n.value="-"===a.value?"":a.value,!1)}{const o=Tf(e,a,t,n,l);if("boolean"==typeof o)return o;a.value=n.value}const o=t.maxlength;if(o>0&&n.value.length>o)return n.value=n.value.slice(0,o),t.value=n.value,!1}}));Gn((()=>d.value),(t=>{"number"!==e.type||"-"===a.value&&""===t||(a.value=t.toString())}));const m=["number","digit"],g=xi((()=>m.includes(e.type)?e.step:""));function v(t){if("Enter"!==t.key)return;const n=t.target;t.stopPropagation(),h("confirm",t,{value:n.value}),!e.confirmHold&&n.blur()}return n({$triggerInput:e=>{t("update:modelValue",e.value),t("update:value",e.value),d.value=e.value}}),()=>{let t=e.disabled&&p?Qr("input",{key:"disabled-input",ref:u,value:d.value,tabindex:"-1",readonly:!!e.disabled,type:i.value,maxlength:d.maxlength,step:g.value,class:"uni-input-input",style:e.cursorColor?{caretColor:e.cursorColor}:{},onFocus:e=>e.target.blur()},null,44,["value","readonly","type","maxlength","step","onFocus"]):Qr("input",{key:"input",ref:u,value:d.value,onInput:e=>{d.value=e.target.value.toString()},disabled:!!e.disabled,type:i.value,maxlength:d.maxlength,step:g.value,enterkeyhint:e.confirmType,pattern:"number"===e.type?"[0-9]*":void 0,class:"uni-input-input",style:e.cursorColor?{caretColor:e.cursorColor}:{},autocomplete:s.value,onKeyup:v,inputmode:e.inputmode},null,44,["value","onInput","disabled","type","maxlength","step","enterkeyhint","pattern","autocomplete","onKeyup","inputmode"]);return Qr("uni-input",{ref:c},[Qr("div",{class:"uni-input-wrapper"},[to(Qr("div",si(f.attrs,{style:e.placeholderStyle,class:["uni-input-placeholder",e.placeholderClass]}),[e.placeholder],16),[[zi,!(d.value.length||"-"===a.value||a.value.includes("."))]]),"search"===e.confirmType?Qr("form",{action:"",onSubmit:e=>e.preventDefault(),class:"uni-input-form"},[t],40,["onSubmit"]):t])],512)}}});function Cf(e){const t=[];return p(e)&&e.forEach((e=>{qr(e)?e.type===Rr?t.push(...Cf(e.children)):t.push(e):p(e)&&t.push(...Cf(e))})),t}const kf=function(e,t,n,o){e.addEventListener(t,(e=>{g(n)&&!1===n(e)&&((void 0===e.cancelable||e.cancelable)&&e.preventDefault(),e.stopPropagation())}),{passive:!1})};let Of,Lf;const Af=Wc({name:"PickerView",props:{value:{type:Array,default:()=>[],validator:function(e){return p(e)&&e.filter((e=>"number"==typeof e)).length===e.length}},indicatorStyle:{type:String,default:""},indicatorClass:{type:String,default:""},maskStyle:{type:String,default:""},maskClass:{type:String,default:""}},emits:["change","pickstart","pickend","update:value"],setup(e,{slots:t,emit:n}){const o=nn(null),r=nn(null),i=Yc(o,n),s=function(e){const t=Ft([...e.value]),n=Ft({value:t,height:34});return Gn((()=>e.value),((e,t)=>{n.value.length=e.length,e.forEach(((e,t)=>{e!==n.value[t]&&n.value.splice(t,1,e)}))})),n}(e),a=nn(null);Ro((()=>{const e=a.value;e&&(s.height=e.$el.offsetHeight)}));let l=nn([]),c=nn([]);function u(e){let t=c.value;t=t.filter((e=>e.type!==Ir));let n=t.indexOf(e);return-1!==n?n:l.value.indexOf(e)}return hr("getPickerViewColumn",(function(e){return xi({get(){const t=u(e.vnode);return s.value[t]||0},set(t){const o=u(e.vnode);if(o<0)return;if(s.value[o]!==t){s.value[o]=t;const e=s.value.map((e=>e));n("update:value",e),i("change",{},{value:e})}}})})),hr("pickerViewProps",e),hr("pickerViewState",s),()=>{const e=t.default&&t.default();{const t=Cf(e);l.value=t,wn((()=>{c.value=t}))}return Qr("uni-picker-view",{ref:o},[Qr(Gd,{ref:a,onResize:({height:e})=>s.height=e},null,8,["onResize"]),Qr("div",{ref:r,class:"uni-picker-view-wrapper"},[e],512)],512)}}});class $f{constructor(e){this._drag=e,this._dragLog=Math.log(e),this._x=0,this._v=0,this._startTime=0}set(e,t){this._x=e,this._v=t,this._startTime=(new Date).getTime()}setVelocityByEnd(e){this._v=(e-this._x)*this._dragLog/(Math.pow(this._drag,100)-1)}x(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3);const t=e===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,e);return this._dt=e,this._x+this._v*t/this._dragLog-this._v/this._dragLog}dx(e){void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3);const t=e===this._dt&&this._powDragDt?this._powDragDt:this._powDragDt=Math.pow(this._drag,e);return this._dt=e,this._v*t}done(){return Math.abs(this.dx())<3}reconfigure(e){const t=this.x(),n=this.dx();this._drag=e,this._dragLog=Math.log(e),this.set(t,n)}configuration(){const e=this;return[{label:"Friction",read:function(){return e._drag},write:function(t){e.reconfigure(t)},min:.001,max:.1,step:.001}]}}function Mf(e,t,n){return e>t-n&&e0){const r=(-n-Math.sqrt(i))/(2*o),s=(-n+Math.sqrt(i))/(2*o),a=(t-r*e)/(s-r),l=e-a;return{x:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,r*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),l*t+a*n},dx:function(e){let t,n;return e===this._t&&(t=this._powER1T,n=this._powER2T),this._t=e,t||(t=this._powER1T=Math.pow(Math.E,r*e)),n||(n=this._powER2T=Math.pow(Math.E,s*e)),l*r*t+a*s*n}}}const s=Math.sqrt(4*o*r-n*n)/(2*o),a=-n/2*o,l=e,c=(t-a*e)/s;return{x:function(e){return Math.pow(Math.E,a*e)*(l*Math.cos(s*e)+c*Math.sin(s*e))},dx:function(e){const t=Math.pow(Math.E,a*e),n=Math.cos(s*e),o=Math.sin(s*e);return t*(c*s*n-l*s*o)+a*t*(c*o+l*n)}}}x(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._endPosition+this._solution.x(e):0}dx(e){return void 0===e&&(e=((new Date).getTime()-this._startTime)/1e3),this._solution?this._solution.dx(e):0}setEnd(e,t,n){if(n||(n=(new Date).getTime()),e!==this._endPosition||!Pf(t,.4)){t=t||0;let o=this._endPosition;this._solution&&(Pf(t,.4)&&(t=this._solution.dx((n-this._startTime)/1e3)),o=this._solution.x((n-this._startTime)/1e3),Pf(t,.4)&&(t=0),Pf(o,.4)&&(o=0),o+=this._endPosition),this._solution&&Pf(o-e,.4)&&Pf(t,.4)||(this._endPosition=e,this._solution=this._solve(o-this._endPosition,t),this._startTime=n)}}snap(e){this._startTime=(new Date).getTime(),this._endPosition=e,this._solution={x:function(){return 0},dx:function(){return 0}}}done(e){return e||(e=(new Date).getTime()),Mf(this.x(),this._endPosition,.4)&&Pf(this.dx(),.4)}reconfigure(e,t,n){this._m=e,this._k=t,this._c=n,this.done()||(this._solution=this._solve(this.x()-this._endPosition,this.dx()),this._startTime=(new Date).getTime())}springConstant(){return this._k}damping(){return this._c}configuration(){return[{label:"Spring Constant",read:this.springConstant.bind(this),write:function(e,t){e.reconfigure(1,t,e.damping())}.bind(this,this),min:100,max:1e3},{label:"Damping",read:this.damping.bind(this),write:function(e,t){e.reconfigure(1,e.springConstant(),t)}.bind(this,this),min:1,max:500}]}}class Rf{constructor(e,t,n){this._extent=e,this._friction=t||new $f(.01),this._spring=n||new jf(1,90,20),this._startTime=0,this._springing=!1,this._springOffset=0}snap(e,t){this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(t)}set(e,t){this._friction.set(e,t),e>0&&t>=0?(this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(0)):e<-this._extent&&t<=0?(this._springOffset=0,this._springing=!0,this._spring.snap(e),this._spring.setEnd(-this._extent)):this._springing=!1,this._startTime=(new Date).getTime()}x(e){if(!this._startTime)return 0;if(e||(e=((new Date).getTime()-this._startTime)/1e3),this._springing)return this._spring.x()+this._springOffset;let t=this._friction.x(e),n=this.dx(e);return(t>0&&n>=0||t<-this._extent&&n<=0)&&(this._springing=!0,this._spring.setEnd(0,n),t<-this._extent?this._springOffset=-this._extent:this._springOffset=0,t=this._spring.x()+this._springOffset),t}dx(e){let t;return t=this._lastTime===e?this._lastDx:this._springing?this._spring.dx(e):this._friction.dx(e),this._lastTime=e,this._lastDx=t,t}done(){return this._springing?this._spring.done():this._friction.done()}setVelocityByEnd(e){this._friction.setVelocityByEnd(e)}configuration(){const e=this._friction.configuration();return e.push.apply(e,this._spring.configuration()),e}}class Nf{constructor(e,t){t=t||{},this._element=e,this._options=t,this._enableSnap=t.enableSnap||!1,this._itemSize=t.itemSize||0,this._enableX=t.enableX||!1,this._enableY=t.enableY||!1,this._shouldDispatchScrollEvent=!!t.onScroll,this._enableX?(this._extent=(t.scrollWidth||this._element.offsetWidth)-this._element.parentElement.offsetWidth,this._scrollWidth=t.scrollWidth):(this._extent=(t.scrollHeight||this._element.offsetHeight)-this._element.parentElement.offsetHeight,this._scrollHeight=t.scrollHeight),this._position=0,this._scroll=new Rf(this._extent,t.friction,t.spring),this._onTransitionEnd=this.onTransitionEnd.bind(this),this.updatePosition()}onTouchStart(){this._startPosition=this._position,this._lastChangePos=this._startPosition,this._startPosition>0?this._startPosition/=.5:this._startPosition<-this._extent&&(this._startPosition=(this._startPosition+this._extent)/.5-this._extent),this._animation&&(this._animation.cancel(),this._scrolling=!1),this.updatePosition()}onTouchMove(e,t){let n=this._startPosition;this._enableX?n+=e:this._enableY&&(n+=t),n>0?n*=.5:n<-this._extent&&(n=.5*(n+this._extent)-this._extent),this._position=n,this.updatePosition(),this.dispatchScroll()}onTouchEnd(e,t,n){if(this._enableSnap&&this._position>-this._extent&&this._position<0){if(this._enableY&&(Math.abs(t)this._itemSize/2?e-(this._itemSize-Math.abs(t)):e-t,o<=0&&o>=-this._extent&&this._scroll.setVelocityByEnd(o)}this._lastTime=Date.now(),this._lastDelay=0,this._scrolling=!0,this._lastChangePos=this._position,this._lastIdx=Math.floor(Math.abs(this._position/this._itemSize)),this._animation=function(e,t,n){const o={id:0,cancelled:!1};return function e(t,n,o,r){if(!t||!t.cancelled){o(n);const i=n.done();i||t.cancelled||(t.id=requestAnimationFrame(e.bind(null,t,n,o,r))),i&&r&&r(n)}}(o,e,t,n),{cancel:function(e){e&&e.id&&cancelAnimationFrame(e.id),e&&(e.cancelled=!0)}.bind(null,o),model:e}}(this._scroll,(()=>{const e=Date.now(),t=(e-this._scroll._startTime)/1e3,n=this._scroll.x(t);this._position=n,this.updatePosition();const o=this._scroll.dx(t);this._shouldDispatchScrollEvent&&e-this._lastTime>this._lastDelay&&(this.dispatchScroll(),this._lastDelay=Math.abs(2e3/o),this._lastTime=e)}),(()=>{this._enableSnap&&(o<=0&&o>=-this._extent&&(this._position=o,this.updatePosition()),g(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._shouldDispatchScrollEvent&&this.dispatchScroll(),this._scrolling=!1}))}onTransitionEnd(){this._element.style.webkitTransition="",this._element.style.transition="",this._element.removeEventListener("transitionend",this._onTransitionEnd),this._snapping&&(this._snapping=!1),this.dispatchScroll()}snap(){const e=this._itemSize,t=this._position%e,n=Math.abs(t)>this._itemSize/2?this._position-(e-Math.abs(t)):this._position-t;this._position!==n&&(this._snapping=!0,this.scrollTo(-n),g(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize)))}scrollTo(e,t){this._animation&&(this._animation.cancel(),this._scrolling=!1),"number"==typeof e&&(this._position=-e),this._position<-this._extent?this._position=-this._extent:this._position>0&&(this._position=0);const n="transform "+(t||.2)+"s ease-out";this._element.style.webkitTransition="-webkit-"+n,this._element.style.transition=n,this.updatePosition(),this._element.addEventListener("transitionend",this._onTransitionEnd)}dispatchScroll(){if(g(this._options.onScroll)&&Math.round(Number(this._lastPos))!==Math.round(this._position)){this._lastPos=this._position;const e={target:{scrollLeft:this._enableX?-this._position:0,scrollTop:this._enableY?-this._position:0,scrollHeight:this._scrollHeight||this._element.offsetHeight,scrollWidth:this._scrollWidth||this._element.offsetWidth,offsetHeight:this._element.parentElement.offsetHeight,offsetWidth:this._element.parentElement.offsetWidth}};this._options.onScroll(e)}}update(e,t,n){let o=0;const r=this._position;this._enableX?(o=this._element.childNodes.length?(t||this._element.offsetWidth)-this._element.parentElement.offsetWidth:0,this._scrollWidth=t):(o=this._element.childNodes.length?(t||this._element.offsetHeight)-this._element.parentElement.offsetHeight:0,this._scrollHeight=t),"number"==typeof e&&(this._position=-e),this._position<-o?this._position=-o:this._position>0&&(this._position=0),this._itemSize=n||this._itemSize,this.updatePosition(),r!==this._position&&(this.dispatchScroll(),g(this._options.onSnap)&&this._options.onSnap(Math.floor(Math.abs(this._position)/this._itemSize))),this._extent=o,this._scroll._extent=o}updatePosition(){let e="";this._enableX?e="translateX("+this._position+"px) translateZ(0)":this._enableY&&(e="translateY("+this._position+"px) translateZ(0)"),this._element.style.webkitTransform=e,this._element.style.transform=e}isScrolling(){return this._scrolling||this._snapping}}const If=Wc({name:"PickerViewColumn",setup(e,{slots:t,emit:n}){const o=nn(null),r=nn(null),i=mr("getPickerViewColumn"),s=di(),a=i?i(s):nn(0),l=mr("pickerViewProps"),c=mr("pickerViewState"),u=nn(34),d=nn(null);Ro((()=>{const e=d.value;u.value=e.$el.offsetHeight}));const f=xi((()=>(c.height-u.value)/2)),{state:p}=hf();let h;const m=Ft({current:a.value,length:0});let g;function v(){h&&!g&&(g=!0,wn((()=>{g=!1;let e=Math.min(m.current,m.length-1);e=Math.max(e,0),h.update(e*u.value,void 0,u.value)})))}Gn((()=>a.value),(e=>{e!==m.current&&(m.current=e,v())})),Gn((()=>m.current),(e=>a.value=e)),Gn([()=>u.value,()=>m.length,()=>c.height],v);let y=0;function _(e){const t=y+e.deltaY;if(Math.abs(t)>10){y=0;let e=Math.min(m.current+(t<0?-1:1),m.length-1);m.current=e=Math.max(e,0),h.scrollTo(e*u.value)}else y=t;e.preventDefault()}function b({clientY:e}){const t=o.value;if(!h.isScrolling()){const n=e-t.getBoundingClientRect().top-c.height/2,o=u.value/2;if(!(Math.abs(n)<=o)){const e=Math.ceil((Math.abs(n)-o)/u.value),t=n<0?-e:e;let r=Math.min(m.current+t,m.length-1);m.current=r=Math.max(r,0),h.scrollTo(r*u.value)}}}const w=()=>{const e=o.value,t=r.value,{scroller:n,handleTouchStart:i,handleTouchMove:s,handleTouchEnd:a}=function(e,t){const n={trackingID:-1,maxDy:0,maxDx:0},o=new Nf(e,t);function r(e){const t=e,o=e;return"move"===t.detail.state||"end"===t.detail.state?{x:t.detail.dx,y:t.detail.dy}:{x:o.screenX-n.x,y:o.screenY-n.y}}return{scroller:o,handleTouchStart:function(e){const t=e,r=e;"start"===t.detail.state?(n.trackingID="touch",n.x=t.detail.x,n.y=t.detail.y):(n.trackingID="mouse",n.x=r.screenX,n.y=r.screenY),n.maxDx=0,n.maxDy=0,n.historyX=[0],n.historyY=[0],n.historyTime=[t.detail.timeStamp||r.timeStamp],n.listener=o,o.onTouchStart&&o.onTouchStart(),("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault()},handleTouchMove:function(e){const t=e,o=e;if(-1!==n.trackingID){("boolean"!=typeof e.cancelable||e.cancelable)&&e.preventDefault();const i=r(e);if(i){for(n.maxDy=Math.max(n.maxDy,Math.abs(i.y)),n.maxDx=Math.max(n.maxDx,Math.abs(i.x)),n.historyX.push(i.x),n.historyY.push(i.y),n.historyTime.push(t.detail.timeStamp||o.timeStamp);n.historyTime.length>10;)n.historyTime.shift(),n.historyX.shift(),n.historyY.shift();n.listener&&n.listener.onTouchMove&&n.listener.onTouchMove(i.x,i.y)}}},handleTouchEnd:function(e){if(-1!==n.trackingID){e.preventDefault();const t=r(e);if(t){const e=n.listener;n.trackingID=-1,n.listener=null;const o={x:0,y:0};if(n.historyTime.length>2)for(let t=n.historyTime.length-1,r=n.historyTime[t],i=n.historyX[t],s=n.historyY[t];t>0;){t--;const e=r-n.historyTime[t];if(e>30&&e<50){o.x=(i-n.historyX[t])/(e/1e3),o.y=(s-n.historyY[t])/(e/1e3);break}}n.historyTime=[],n.historyX=[],n.historyY=[],e&&e.onTouchEnd&&e.onTouchEnd(t.x,t.y,o)}}}}}(t,{enableY:!0,enableX:!1,enableSnap:!0,itemSize:u.value,friction:new $f(1e-4),spring:new jf(2,90,20),onSnap:e=>{isNaN(e)||e===m.current||(m.current=e)}});h=n,function(e,t,n){Bo((()=>{document.removeEventListener("mousemove",Of),document.removeEventListener("mouseup",Lf)}));let o=0,r=0,i=0,s=0;const a=function(e,n,a,l){if(!1===t({cancelable:e.cancelable,target:e.target,currentTarget:e.currentTarget,preventDefault:e.preventDefault.bind(e),stopPropagation:e.stopPropagation.bind(e),touches:e.touches,changedTouches:e.changedTouches,detail:{state:n,x:a,y:l,dx:a-o,dy:l-r,ddx:a-i,ddy:l-s,timeStamp:e.timeStamp}}))return!1};let l,c,u=null;kf(e,"touchstart",(function(e){if(l=!0,1===e.touches.length&&!u)return u=e,o=i=e.touches[0].pageX,r=s=e.touches[0].pageY,a(e,"start",o,r)})),kf(e,"mousedown",(function(e){if(c=!0,!l&&!u)return u=e,o=i=e.pageX,r=s=e.pageY,a(e,"start",o,r)})),kf(e,"touchmove",(function(e){if(1===e.touches.length&&u){const t=a(e,"move",e.touches[0].pageX,e.touches[0].pageY);return i=e.touches[0].pageX,s=e.touches[0].pageY,t}}));const d=Of=function(e){if(!l&&c&&u){const t=a(e,"move",e.pageX,e.pageY);return i=e.pageX,s=e.pageY,t}};document.addEventListener("mousemove",d),kf(e,"touchend",(function(e){if(0===e.touches.length&&u)return l=!1,u=null,a(e,"end",e.changedTouches[0].pageX,e.changedTouches[0].pageY)}));const f=Lf=function(e){if(c=!1,!l&&u)return u=null,a(e,"end",e.pageX,e.pageY)};document.addEventListener("mouseup",f),kf(e,"touchcancel",(function(e){if(u){l=!1;const t=u;return u=null,a(e,n?"cancel":"end",t.touches[0].pageX,t.touches[0].pageY)}}))}(e,(e=>{switch(e.detail.state){case"start":i(e);break;case"move":s(e),e.stopPropagation();break;case"end":case"cancel":a(e)}}),!0),function(e){let t=0,n=0;e.addEventListener("touchstart",(e=>{const o=e.changedTouches[0];t=o.clientX,n=o.clientY})),e.addEventListener("touchend",(e=>{const o=e.changedTouches[0];if(Math.abs(o.clientX-t)<20&&Math.abs(o.clientY-n)<20){const t={bubbles:!0,cancelable:!0,target:e.target,currentTarget:e.currentTarget},n=new CustomEvent("click",t);["screenX","screenY","clientX","clientY","pageX","pageY"].forEach((e=>{n[e]=o[e]})),e.target.dispatchEvent(n)}}))}(e),v()};return Ro(w),()=>{const e=t.default&&t.default();m.length=Cf(e).length;const n=`${f.value}px 0`;return Qr("uni-picker-view-column",{ref:o},[Qr("div",{onWheel:_,onClick:b,class:"uni-picker-view-group"},[Qr("div",si(p.attrs,{class:["uni-picker-view-mask",l.maskClass],style:`background-size: 100% ${f.value}px;${l.maskStyle}`}),null,16),Qr("div",si(p.attrs,{class:["uni-picker-view-indicator",l.indicatorClass],style:l.indicatorStyle}),[Qr(Gd,{ref:d,onResize:({height:e})=>u.value=e},null,8,["onResize"])],16),Qr("div",{ref:r,class:["uni-picker-view-content"],style:{padding:n,"--picker-view-column-indicator-height":`${u.value}px`}},[e],4)],40,["onWheel","onClick"])],512)}}}),Bf=Wc({name:"Refresher",props:{refreshState:{type:String,default:""},refresherHeight:{type:Number,default:0},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"black"},refresherBackground:{type:String,default:"#fff"}},setup(e,{slots:t}){const n=nn(null),o=xi((()=>{const t={backgroundColor:e.refresherBackground};switch(e.refreshState){case"pulling":t.height=e.refresherHeight+"px";break;case"refreshing":t.height=e.refresherThreshold+"px",t.transition="height 0.3s";break;case"":case"refresherabort":case"restore":t.height="0px",t.transition="height 0.3s"}return t})),r=xi((()=>{const t=e.refresherHeight/e.refresherThreshold;return 360*(t>1?1:t)}));return()=>{const{refreshState:i,refresherDefaultStyle:s,refresherThreshold:a}=e;return Qr("div",{ref:n,style:o.value,class:"uni-scroll-view-refresher"},["none"!==s?Qr("div",{class:"uni-scroll-view-refresh"},[Qr("div",{class:"uni-scroll-view-refresh-inner"},["pulling"==i?Qr("svg",{key:"refresh__icon",style:{transform:"rotate("+r.value+"deg)"},fill:"#2BD009",class:"uni-scroll-view-refresh__icon",width:"24",height:"24",viewBox:"0 0 24 24"},[Qr("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null),Qr("path",{d:"M0 0h24v24H0z",fill:"none"},null)],4):null,"refreshing"==i?Qr("svg",{key:"refresh__spinner",class:"uni-scroll-view-refresh__spinner",width:"24",height:"24",viewBox:"25 25 50 50"},[Qr("circle",{cx:"50",cy:"50",r:"20",fill:"none",style:"color: #2bd009","stroke-width":"3"},null)]):null])]):null,"none"===s?Qr("div",{class:"uni-scroll-view-refresher-container",style:{height:`${a}px`}},[t.default&&t.default()]):null],4)}}}),Df=ge(!0),Ff=Wc({name:"ScrollView",compatConfig:{MODE:3},props:{direction:{type:[String],default:"vertical"},scrollX:{type:[Boolean,String],default:!1},scrollY:{type:[Boolean,String],default:!1},showScrollbar:{type:[Boolean,String],default:!0},upperThreshold:{type:[Number,String],default:50},lowerThreshold:{type:[Number,String],default:50},scrollTop:{type:[Number,String],default:0},scrollLeft:{type:[Number,String],default:0},scrollIntoView:{type:String,default:""},scrollWithAnimation:{type:[Boolean,String],default:!1},enableBackToTop:{type:[Boolean,String],default:!1},refresherEnabled:{type:[Boolean,String],default:!1},refresherThreshold:{type:Number,default:45},refresherDefaultStyle:{type:String,default:"black"},refresherBackground:{type:String,default:"#fff"},refresherTriggered:{type:[Boolean,String],default:!1}},emits:["scroll","scrolltoupper","scrolltolower","refresherrefresh","refresherrestore","refresherpulling","refresherabort","update:refresherTriggered"],setup(e,{emit:t,slots:n,expose:o}){const r=nn(null),i=nn(null),s=nn(null),a=nn(null),l=Yc(r,t),{state:c,scrollTopNumber:u,scrollLeftNumber:d}=function(e){const t=xi((()=>Number(e.scrollTop)||0)),n=xi((()=>Number(e.scrollLeft)||0));return{state:Ft({lastScrollTop:t.value,lastScrollLeft:n.value,lastScrollToUpperTime:0,lastScrollToLowerTime:0,refresherHeight:0,refreshState:""}),scrollTopNumber:t,scrollLeftNumber:n}}(e),{realScrollX:f,realScrollY:p,_scrollLeftChanged:h,_scrollTopChanged:m}=function(e,t,n,o,r,i,s,a,l){let c=!1,u=0,d=!1,f=()=>{};const p=xi((()=>e.scrollX)),h=xi((()=>e.scrollY)),m=xi((()=>{let t=Number(e.upperThreshold);return isNaN(t)?50:t})),g=xi((()=>{let t=Number(e.lowerThreshold);return isNaN(t)?50:t}));function v(e,t){const n=s.value;let o=0,r="";if(e<0?e=0:"x"===t&&e>n.scrollWidth-n.offsetWidth?e=n.scrollWidth-n.offsetWidth:"y"===t&&e>n.scrollHeight-n.offsetHeight&&(e=n.scrollHeight-n.offsetHeight),"x"===t?o=n.scrollLeft-e:"y"===t&&(o=n.scrollTop-e),0===o)return;let i=a.value;i.style.transition="transform .3s ease-out",i.style.webkitTransition="-webkit-transform .3s ease-out","x"===t?r="translateX("+o+"px) translateZ(0)":"y"===t&&(r="translateY("+o+"px) translateZ(0)"),i.removeEventListener("transitionend",f),i.removeEventListener("webkitTransitionEnd",f),f=()=>x(e,t),i.addEventListener("transitionend",f),i.addEventListener("webkitTransitionEnd",f),"x"===t?n.style.overflowX="hidden":"y"===t&&(n.style.overflowY="hidden"),i.style.transform=r,i.style.webkitTransform=r}function y(e){const n=e.target;r("scroll",e,{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollHeight:n.scrollHeight,scrollWidth:n.scrollWidth,deltaX:t.lastScrollLeft-n.scrollLeft,deltaY:t.lastScrollTop-n.scrollTop}),h.value&&(n.scrollTop<=m.value&&t.lastScrollTop-n.scrollTop>0&&e.timeStamp-t.lastScrollToUpperTime>200&&(r("scrolltoupper",e,{direction:"top"}),t.lastScrollToUpperTime=e.timeStamp),n.scrollTop+n.offsetHeight+g.value>=n.scrollHeight&&t.lastScrollTop-n.scrollTop<0&&e.timeStamp-t.lastScrollToLowerTime>200&&(r("scrolltolower",e,{direction:"bottom"}),t.lastScrollToLowerTime=e.timeStamp)),p.value&&(n.scrollLeft<=m.value&&t.lastScrollLeft-n.scrollLeft>0&&e.timeStamp-t.lastScrollToUpperTime>200&&(r("scrolltoupper",e,{direction:"left"}),t.lastScrollToUpperTime=e.timeStamp),n.scrollLeft+n.offsetWidth+g.value>=n.scrollWidth&&t.lastScrollLeft-n.scrollLeft<0&&e.timeStamp-t.lastScrollToLowerTime>200&&(r("scrolltolower",e,{direction:"right"}),t.lastScrollToLowerTime=e.timeStamp)),t.lastScrollTop=n.scrollTop,t.lastScrollLeft=n.scrollLeft}function _(t){h.value&&(e.scrollWithAnimation?v(t,"y"):s.value.scrollTop=t)}function b(t){p.value&&(e.scrollWithAnimation?v(t,"x"):s.value.scrollLeft=t)}function w(t){if(t){if(!/^[_a-zA-Z][-_a-zA-Z0-9:]*$/.test(t))return void console.error(`id error: scroll-into-view=${t}`);let n=i.value.querySelector("#"+t);if(n){let t=s.value.getBoundingClientRect(),o=n.getBoundingClientRect();if(p.value){let n=o.left-t.left,r=s.value.scrollLeft+n;e.scrollWithAnimation?v(r,"x"):s.value.scrollLeft=r}if(h.value){let n=o.top-t.top,r=s.value.scrollTop+n;e.scrollWithAnimation?v(r,"y"):s.value.scrollTop=r}}}}function x(e,t){a.value.style.transition="",a.value.style.webkitTransition="",a.value.style.transform="",a.value.style.webkitTransform="";let n=s.value;"x"===t?(n.style.overflowX=p.value?"auto":"hidden",n.scrollLeft=e):"y"===t&&(n.style.overflowY=h.value?"auto":"hidden",n.scrollTop=e),a.value.removeEventListener("transitionend",f),a.value.removeEventListener("webkitTransitionEnd",f)}function S(n){if(e.refresherEnabled){switch(n){case"refreshing":t.refresherHeight=e.refresherThreshold,c||(c=!0,r("refresherrefresh",{},{dy:E.y-T.y}),l("update:refresherTriggered",!0));break;case"restore":case"refresherabort":c=!1,t.refresherHeight=u=0,"restore"===n&&(d=!1,r("refresherrestore",{},{dy:E.y-T.y})),"refresherabort"===n&&d&&(d=!1,r("refresherabort",{},{dy:E.y-T.y}))}t.refreshState=n}}let T={x:0,y:0},E={x:0,y:e.refresherThreshold};return Ro((()=>{wn((()=>{_(n.value),b(o.value)})),w(e.scrollIntoView);let i=function(e){e.preventDefault(),e.stopPropagation(),y(e)},a=null,l=function(n){if(null===T)return;let o=n.touches[0].pageX,i=n.touches[0].pageY,l=s.value;if(Math.abs(o-T.x)>Math.abs(i-T.y))if(p.value){if(0===l.scrollLeft&&o>T.x)return void(a=!1);if(l.scrollWidth===l.offsetWidth+l.scrollLeft&&oT.y)a=!1,e.refresherEnabled&&!1!==n.cancelable&&n.preventDefault();else{if(l.scrollHeight===l.offsetHeight+l.scrollTop&&i0&&(d=!0,r("refresherpulling",n,{deltaY:o,dy:o})))}},f=function(e){1===e.touches.length&&(T={x:e.touches[0].pageX,y:e.touches[0].pageY})},m=function(n){E={x:n.changedTouches[0].pageX,y:n.changedTouches[0].pageY},t.refresherHeight>=e.refresherThreshold?S("refreshing"):S("refresherabort"),T={x:0,y:0},E={x:0,y:e.refresherThreshold}};s.value.addEventListener("touchstart",f,Df),s.value.addEventListener("touchmove",l,ge(!1)),s.value.addEventListener("scroll",i,ge(!1)),s.value.addEventListener("touchend",m,Df),Bo((()=>{s.value.removeEventListener("touchstart",f),s.value.removeEventListener("touchmove",l),s.value.removeEventListener("scroll",i),s.value.removeEventListener("touchend",m)}))})),To((()=>{h.value&&(s.value.scrollTop=t.lastScrollTop),p.value&&(s.value.scrollLeft=t.lastScrollLeft)})),Gn(n,(e=>{_(e)})),Gn(o,(e=>{b(e)})),Gn((()=>e.scrollIntoView),(e=>{w(e)})),Gn((()=>e.refresherTriggered),(e=>{!0===e?S("refreshing"):!1===e&&S("restore")})),{realScrollX:p,realScrollY:h,_scrollTopChanged:_,_scrollLeftChanged:b}}(e,c,u,d,l,r,i,a,t),g=xi((()=>{let e="";return f.value?e+="overflow-x:auto;":e+="overflow-x:hidden;",p.value?e+="overflow-y:auto;":e+="overflow-y:hidden;",e})),v=xi((()=>{let t="uni-scroll-view";return!1===e.showScrollbar&&(t+=" uni-scroll-view-scrollbar-hidden"),t}));return o({$getMain:()=>i.value}),()=>{const{refresherEnabled:t,refresherBackground:o,refresherDefaultStyle:l,refresherThreshold:u}=e,{refresherHeight:d,refreshState:f}=c;return Qr("uni-scroll-view",{ref:r},[Qr("div",{ref:s,class:"uni-scroll-view"},[Qr("div",{ref:i,style:g.value,class:v.value},[t?Qr(Bf,{refreshState:f,refresherHeight:d,refresherThreshold:u,refresherDefaultStyle:l,refresherBackground:o},{default:()=>["none"==l?n.refresher&&n.refresher():null]},8,["refreshState","refresherHeight","refresherThreshold","refresherDefaultStyle","refresherBackground"]):null,Qr("div",{ref:a,class:"uni-scroll-view-content"},[n.default&&n.default()],512)],6)],512)],512)}}});const Hf={ensp:" ",emsp:" ",nbsp:" "};function Vf(e,t){return function(e,{space:t,decode:n}){let o="",r=!1;for(let i of e)t&&Hf[t]&&" "===i&&(i=Hf[t]),r?(o+="n"===i?"\n":"\\"===i?"\\":"\\"+i,r=!1):"\\"===i?r=!0:o+=i;return n?o.replace(/ /g,Hf.nbsp).replace(/ /g,Hf.ensp).replace(/ /g,Hf.emsp).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'"):o}(e,t).split("\n")}const Wf=Wc({name:"Text",props:{selectable:{type:[Boolean,String],default:!1},space:{type:String,default:""},decode:{type:[Boolean,String],default:!1}},setup(e,{slots:t}){const n=nn(null);return()=>{const o=[];return t.default&&t.default().forEach((t=>{if(8&t.shapeFlag&&t.type!==Ir){const n=Vf(t.children,{space:e.space,decode:e.decode}),r=n.length-1;n.forEach(((e,t)=>{(0!==t||e)&&o.push(ti(e)),t!==r&&o.push(Qr("br"))}))}else o.push(t)})),Qr("uni-text",{ref:n,selectable:!!e.selectable||null},[Qr("span",null,o)],8,["selectable"])}}}),zf=c({},_f,{placeholderClass:{type:String,default:"input-placeholder"},autoHeight:{type:[Boolean,String],default:!1},confirmType:{type:String,default:"return",validator:e=>Yf.concat("return").includes(e)}});let Uf=!1;const Yf=["done","go","next","search","send"];const qf=Wc({name:"Textarea",props:zf,emits:["confirm","linechange",...bf],setup(e,{emit:t,expose:n}){const o=nn(null),r=nn(null),{fieldRef:i,state:s,scopedAttrsState:a,fixDisabledColor:l,trigger:c}=Sf(e,o,t),u=xi((()=>s.value.split("\n"))),d=xi((()=>Yf.includes(e.confirmType))),f=nn(0),p=nn(null);function h({height:e}){f.value=e}function m(e){"Enter"===e.key&&d.value&&e.preventDefault()}function g(t){if("Enter"===t.key&&d.value){!function(e){c("confirm",e,{value:s.value})}(t);const n=t.target;!e.confirmHold&&n.blur()}}return Gn((()=>f.value),(t=>{const n=o.value,i=p.value,s=r.value;let a=parseFloat(getComputedStyle(n).lineHeight);isNaN(a)&&(a=i.offsetHeight);var l=Math.round(t/a);c("linechange",{},{height:t,heightRpx:750/window.innerWidth*t,lineCount:l}),e.autoHeight&&(n.style.height="auto",s.style.height=t+"px")})),function(){const e="(prefers-color-scheme: dark)";Uf=0===String(navigator.platform).indexOf("iP")&&0===String(navigator.vendor).indexOf("Apple")&&window.matchMedia(e).media!==e}(),n({$triggerInput:e=>{t("update:modelValue",e.value),t("update:value",e.value),s.value=e.value}}),()=>{let t=e.disabled&&l?Qr("textarea",{key:"disabled-textarea",ref:i,value:s.value,tabindex:"-1",readonly:!!e.disabled,maxlength:s.maxlength,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":Uf},style:{overflowY:e.autoHeight?"hidden":"auto",...e.cursorColor&&{caretColor:e.cursorColor}},onFocus:e=>e.target.blur()},null,46,["value","readonly","maxlength","onFocus"]):Qr("textarea",{key:"textarea",ref:i,value:s.value,disabled:!!e.disabled,maxlength:s.maxlength,enterkeyhint:e.confirmType,inputmode:e.inputmode,class:{"uni-textarea-textarea":!0,"uni-textarea-textarea-fix-margin":Uf},style:{overflowY:e.autoHeight?"hidden":"auto",...e.cursorColor&&{caretColor:e.cursorColor}},onKeydown:m,onKeyup:g},null,46,["value","disabled","maxlength","enterkeyhint","inputmode","onKeydown","onKeyup"]);return Qr("uni-textarea",{ref:o},[Qr("div",{ref:r,class:"uni-textarea-wrapper"},[to(Qr("div",si(a.attrs,{style:e.placeholderStyle,class:["uni-textarea-placeholder",e.placeholderClass]}),[e.placeholder],16),[[zi,!s.value.length]]),Qr("div",{ref:p,class:"uni-textarea-line"},[" "],512),Qr("div",{class:"uni-textarea-compute"},[u.value.map((e=>Qr("div",null,[e.trim()?e:"."]))),Qr(Gd,{initial:!0,onResize:h},null,8,["initial","onResize"])]),"search"===e.confirmType?Qr("form",{action:"",onSubmit:()=>!1,class:"uni-input-form"},[t],40,["onSubmit"]):t],512)],512)}}}),Xf=Wc({name:"View",props:c({},qc),setup(e,{slots:t}){const n=nn(null),{hovering:o,binding:r}=Xc(e);return()=>{const i=e.hoverClass;return i&&"none"!==i?Qr("uni-view",si({class:o.value?i:"",ref:n},r),[t.default&&t.default()],16):Qr("uni-view",{ref:n},[t.default&&t.default()],512)}}});function Kf(e,t,n,o){g(t)&&Mo(e,t.bind(n),o)}function Gf(e,t,n){var o;const r=e.mpType||n.$mpType;if(r&&"component"!==r&&(Object.keys(e).forEach((o=>{if(function(e,t,n=!0){return!(n&&!g(t))&&(Ee.indexOf(e)>-1||0===e.indexOf("on"))}(o,e[o],!1)){const r=e[o];p(r)?r.forEach((e=>Kf(o,e,n,t))):Kf(o,r,n,t)}})),"page"===r)){t.__isVisible=!0;try{const e=t.attrs.__pageQuery;0,dc(n,"onLoad",e),delete t.attrs.__pageQuery,"preloadPage"!==(null==(o=n.$page)?void 0:o.openType)&&dc(n,"onShow")}catch(i){console.error(i.message+"\n"+i.stack)}}}function Jf(e,t,n){Gf(e,t,n)}function Zf(e,t,n){return e[t]=n}function Qf(e,...t){const n=this[e];return n?n(...t):(console.error(`method ${e} not found`),null)}function ep(e){return function(t,n,o){if(!n)throw t;const r=e._instance;if(!r||!r.proxy)throw t;dc(r.proxy,"onError",t)}}function tp(e,t){return e?[...new Set([].concat(e,t))]:t}function np(e){const t=e._context.config;var n;t.errorHandler=ke(e,ep),n=t.optionMergeStrategies,Ee.forEach((e=>{n[e]=tp}));const o=t.globalProperties;o.$set=Zf,o.$applyOptions=Jf,o.$callMethod=Qf,function(e){Ce.forEach((t=>t(e)))}(e)}const op=Ql("upm");function rp(){return mr(op)}function ip(e){const t=function(e){return Ft(function(e){if(history.state){const t=history.state.__type__;"redirectTo"!==t&&"reLaunch"!==t||0!==gp().length||(e.isEntry=!0,e.isQuit=!0)}return e}(JSON.parse(JSON.stringify(cc(el().meta,e)))))}(e);return hr(op,t),t}function sp(){return el()}function ap(){return history.state&&history.state.__id__||1}const lp=window.CSS&&window.CSS.supports;function cp(e){return lp&&(lp(e)||lp.apply(window.CSS,e.split(":")))}const up=cp("top:env(a)"),dp=cp("top:constant(a)"),fp=(()=>up?"env":dp?"constant":"")();function pp(e){var t,n;Zl({"--window-top":(n=0,fp?`calc(${n}px + ${fp}(safe-area-inset-top))`:`${n}px`),"--window-bottom":(t=0,fp?`calc(${t}px + ${fp}(safe-area-inset-bottom))`:`${t}px`)})}const hp=new Map;function mp(){return hp}function gp(){const e=[],t=hp.values();for(const n of t)n.$.__isTabBar?n.$.__isActive&&e.push(n):e.push(n);return e}function vp(e,t=!0){const n=hp.get(e);n.$.__isUnload=!0,dc(n,"onUnload"),hp.delete(e),t&&function(e){const t=wp.get(e);t&&(wp.delete(e),xp.pruneCacheEntry(t))}(e)}let yp=ap();function _p(e){const t=function(e){const t=rp();let n=e.fullPath;return e.meta.isEntry&&-1===n.indexOf(e.meta.route)&&(n="/"+e.meta.route+n.replace("/","")),uc("navigateTo",n,{},t)}(e.$route);!function(e,t){e.route=t.route,e.$vm=e,e.$page=t,e.$mpType="page",e.$fontFamilySet=new Set,t.meta.isTabBar&&(e.$.__isTabBar=!0,e.$.__isActive=!0)}(e,t),hp.set(bp(t.path,t.id),e)}function bp(e,t){return e+"$$"+t}const wp=new Map,xp={get:e=>wp.get(e),set(e,t){!function(e){const t=parseInt(e.split("$$")[1]);if(!t)return;xp.forEach(((e,n)=>{const o=parseInt(n.split("$$")[1]);o&&o>t&&(xp.delete(n),xp.pruneCacheEntry(e),wn((()=>{hp.forEach(((e,t)=>{e.$.isUnmounted&&hp.delete(t)}))})))}))}(e),wp.set(e,t)},delete(e){wp.get(e)&&wp.delete(e)},forEach(e){wp.forEach(e)}};function Sp(e,t){!function(e){const t=Ep(e),{body:n}=document;Cp&&n.removeAttribute(Cp),t&&n.setAttribute(t,""),Cp=t}(e),pp(),function(e){{const t="nvue-dir-"+__uniConfig.nvue["flex-direction"];e.isNVue?(document.body.setAttribute("nvue",""),document.body.setAttribute(t,"")):(document.body.removeAttribute("nvue"),document.body.removeAttribute(t))}}(t),function(e,t){document.removeEventListener("touchmove",fc),kp&&document.removeEventListener("scroll",kp);if(t.disableScroll)return document.addEventListener("touchmove",fc);const{onPageScroll:n,onReachBottom:o}=e,r="transparent"===t.navigationBar.type;if(!n&&!o&&!r)return;const i={},s=e.proxy.$page.id;(n||r)&&(i.onPageScroll=function(e,t,n){return o=>{t&&Em.publishHandler("onPageScroll",{scrollTop:o},e),n&&Em.emit(e+".onPageScroll",{scrollTop:o})}}(s,n,r));o&&(i.onReachBottomDistance=t.onReachBottomDistance||50,i.onReachBottom=()=>Em.publishHandler("onReachBottom",{},s));kp=mc(i),requestAnimationFrame((()=>document.addEventListener("scroll",kp)))}(e,t)}function Tp(e){const t=Ep(e);t&&function(e){const t=document.querySelector("uni-page-body");t&&t.setAttribute(e,"")}(t)}function Ep(e){return e.type.__scopeId}let Cp,kp;function Op(e){const t=Qa({history:$p(),strict:!!__uniConfig.router.strict,routes:__uniRoutes,scrollBehavior:Ap});t.beforeEach(((e,t)=>{var n;e&&t&&e.meta.isTabBar&&t.meta.isTabBar&&(n=t.meta.tabBarIndex,"undefined"!=typeof window&&(Lp[n]={left:window.pageXOffset,top:window.pageYOffset}))})),e.router=t,e.use(t)}let Lp=Object.create(null);const Ap=(e,t,n)=>{if(n)return n;if(e&&t&&e.meta.isTabBar&&t.meta.isTabBar){const t=(o=e.meta.tabBarIndex,Lp[o]);if(t)return t}return{left:0,top:0};var o};function $p(){let{routerBase:e}=__uniConfig.router;"/"===e&&(e="");const t=(n=e,(n=location.host?n||location.pathname+location.search:"").includes("#")||(n+="#"),fa(n));var n;return t.listen(((e,t,n)=>{"back"===n.direction&&function(e=1){const t=gp(),n=t.length-1,o=n-e;for(let r=n;r>o;r--){const e=t[r].$page;vp(bp(e.path,e.id),!1)}}(Math.abs(n.delta))})),t}const Mp={install(e){np(e),kc(e),Bc(e),e.config.warnHandler||(e.config.warnHandler=Pp),Op(e)}};function Pp(e,t,n){if(t){if("PageMetaHead"===t.$.type.name)return;const e=t.$.parent;if(e&&"PageMeta"===e.type.name)return}const o=[`[Vue warn]: ${e}`];n.length&&o.push("\n",n),console.warn(...o)}const jp={class:"uni-async-loading"},Rp=Qr("i",{class:"uni-loading"},null,-1),Np=zc({name:"AsyncLoading",render:()=>(Hr(),Yr("div",jp,[Rp]))});function Ip(){window.location.reload()}const Bp=zc({name:"AsyncError",setup(){hl();const{t:e}=fl();return()=>Qr("div",{class:"uni-async-error",onClick:Ip},[e("uni.async.error")],8,["onClick"])}});let Dp;function Fp(){return Dp}function Hp(e){Dp=e,Object.defineProperty(Dp.$.ctx,"$children",{get:()=>gp().map((e=>e.$vm))});const t=Dp.$.appContext.app;t.component(Np.name)||t.component(Np.name,Np),t.component(Bp.name)||t.component(Bp.name,Bp),function(e){e.$vm=e,e.$mpType="app";const t=nn(fl().getLocale());Object.defineProperty(e,"$locale",{get:()=>t.value,set(e){t.value=e}})}(Dp),function(e,t){const n=e.$options||{};n.globalData=c(n.globalData||{},t),Object.defineProperty(e,"globalData",{get:()=>n.globalData,set(e){n.globalData=e}})}(Dp),Nc(),Nl()}function Vp(e,{clone:t,init:n,setup:o,before:r}){t&&(e=c({},e)),r&&r(e);const i=e.setup;return e.setup=(e,t)=>{const r=di();n(r.proxy);const s=o(r);if(i)return i(s||e,t)},e}function Wp(e,t){return e&&(e.__esModule||"Module"===e[Symbol.toStringTag])?Vp(e.default,t):Vp(e,t)}function zp(e){return Wp(e,{clone:!0,init:_p,setup(e){e.$pageInstance=e;const t=sp(),n=_e(t.query);e.attrs.__pageQuery=n,e.proxy.$page.options=n,e.proxy.options=n;const o=rp();var r,i,s;return jo((()=>{Sp(e,o)})),Ro((()=>{Tp(e);const{onReady:n}=e;n&&j(n),Xp(t)})),Co((()=>{if(!e.__isVisible){Sp(e,o),e.__isVisible=!0;const{onShow:n}=e;n&&j(n),wn((()=>{Xp(t)}))}}),"ba",r),function(e,t){Co(e,"bda",t)}((()=>{if(e.__isVisible&&!e.__isUnload){e.__isVisible=!1;const{onHide:t}=e;t&&j(t)}})),i=o.id,Em.subscribe(Tl(i,"invokeViewApi"),s?s(El):El),Bo((()=>{!function(e){Em.unsubscribe(Tl(e,"invokeViewApi")),Object.keys(Sl).forEach((t=>{0===t.indexOf(e+".")&&delete Sl[t]}))}(o.id)})),n}})}function Up(){const{windowWidth:e,windowHeight:t,screenWidth:n,screenHeight:o}=sh(),r=90===Math.abs(Number(window.orientation))?"landscape":"portrait";Cm.emit("onResize",{deviceOrientation:r,size:{windowWidth:e,windowHeight:t,screenWidth:n,screenHeight:o}})}function Yp(e){S(e.data)&&"WEB_INVOKE_APPSERVICE"===e.data.type&&Cm.emit("onWebInvokeAppService",e.data.data,e.data.pageId)}function qp(){const{emit:e}=Cm;"visible"===document.visibilityState?e("onAppEnterForeground",c({},Kd)):e("onAppEnterBackground")}function Xp(e){const{tabBarText:t,tabBarIndex:n,route:o}=e.meta;t&&dc("onTabItemTap",{index:n,text:t,pagePath:o})}const Kp=navigator.cookieEnabled&&(window.localStorage||window.sessionStorage)||{};let Gp;function Jp(){if(Gp=Gp||Kp.__DC_STAT_UUID,!Gp){Gp=Date.now()+""+Math.floor(1e7*Math.random());try{Kp.__DC_STAT_UUID=Gp}catch(e){}}return Gp}function Zp(){if(!0!==__uniConfig.darkmode)return v(__uniConfig.darkmode)?__uniConfig.darkmode:"light";try{return window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}catch(e){return"light"}}function Qp(){let e,t="0",n="",o="phone";const r=navigator.language;if(iu){e="iOS";const o=ou.match(/OS\s([\w_]+)\slike/);o&&(t=o[1].replace(/_/g,"."));const r=ou.match(/\(([a-zA-Z]+);/);r&&(n=r[1])}else if(ru){e="Android";const o=ou.match(/Android[\s/]([\w\.]+)[;\s]/);o&&(t=o[1]);const r=ou.match(/\((.+?)\)/),i=r?r[1].split(";"):ou.split(" "),s=[/\bAndroid\b/i,/\bLinux\b/i,/\bU\b/i,/^\s?[a-z][a-z]$/i,/^\s?[a-z][a-z]-[a-z][a-z]$/i,/\bwv\b/i,/\/[\d\.,]+$/,/^\s?[\d\.,]+$/,/\bBrowser\b/i,/\bMobile\b/i];for(let e=0;e0){n=t.split("Build")[0].trim();break}let o;for(let e=0;e-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Edge")>-1&&!t,o=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){new RegExp("MSIE (\\d+\\.\\d+);").test(e);const t=parseFloat(RegExp.$1);return t>6?t:6}return n?-1:o?11:-1}());if("-1"!==l)a="IE";else{const e=["Version","Firefox","Chrome","Edge{0,1}"],t=["Safari","Firefox","Chrome","Edge"];for(let n=0;n{const e=window.devicePixelRatio,t=uu(),n=du(t),o=fu(t,n),r=function(e,t){return e?Math[t?"min":"max"](screen.height,screen.width):screen.height}(t,n),i=pu(o);let s=window.innerHeight;const a=ql.top,l={left:ql.left,right:i-ql.right,top:ql.top,bottom:s-ql.bottom,width:i-ql.left-ql.right,height:s-ql.top-ql.bottom},{top:c,bottom:u}=function(){const e=document.documentElement.style,t=Jl(),n=Gl(e,"--window-bottom"),o=Gl(e,"--window-left"),r=Gl(e,"--window-right"),i=Gl(e,"--top-window-height");return{top:t,bottom:n?n+ql.bottom:0,left:o?o+ql.left:0,right:r?r+ql.right:0,topWindowHeight:i||0}}();return s-=c,s-=u,{windowTop:c,windowBottom:u,windowWidth:i,windowHeight:s,pixelRatio:e,screenWidth:o,screenHeight:r,statusBarHeight:a,safeArea:l,safeAreaInsets:{top:ql.top,right:ql.right,bottom:ql.bottom,left:ql.left},screenTop:r-s}}));let th,nh=!0;function oh(){nh&&(th=Qp())}const rh=Wu(0,(()=>{oh();const{deviceBrand:e,deviceModel:t,brand:n,model:o,platform:r,system:i,deviceOrientation:s,deviceType:a,osname:l,osversion:u}=th;return c({brand:n,deviceBrand:e,deviceModel:t,devicePixelRatio:window.devicePixelRatio,deviceId:Jp(),deviceOrientation:s,deviceType:a,model:o,platform:r,system:i},{})})),ih=Wu(0,(()=>{oh();const{theme:e,language:t,browserName:n,browserVersion:o}=th;return c({appId:__uniConfig.appId,appName:__uniConfig.appName,appVersion:__uniConfig.appVersion,appVersionCode:__uniConfig.appVersionCode,appLanguage:ad?ad():t,enableDebug:!1,hostSDKVersion:void 0,hostPackageName:void 0,hostFontSizeSetting:void 0,hostName:n,hostVersion:o,hostTheme:e,hostLanguage:t,language:t,SDKVersion:"",theme:e,version:""},{})})),sh=Wu(0,(()=>{nh=!0,oh(),nh=!1;const e=eh(),t=rh(),n=ih();nh=!0;const{ua:o,browserName:r,browserVersion:i,osname:s,osversion:a}=th,l=c(e,t,n,{ua:o,browserName:r,browserVersion:i,uniPlatform:"web",uniCompileVersion:__uniConfig.compilerVersion,uniRuntimeVersion:__uniConfig.compilerVersion,fontSizeSetting:void 0,osName:s.toLocaleLowerCase(),osVersion:a,osLanguage:void 0,osTheme:void 0});return delete l.screenTop,delete l.enableDebug,__uniConfig.darkmode||delete l.theme,function(e){let t={};return S(e)&&Object.keys(e).sort().forEach((n=>{const o=n;t[o]=e[o]})),Object.keys(t)?t:e}(l)})),ah=zu("getSystemInfo",((e,{resolve:t})=>t(sh())));const lh=zu("setClipboardData",((e,t)=>{return n=void 0,o=[e,t],r=function*({data:e},{resolve:t,reject:n}){try{yield navigator.clipboard.writeText(e),t()}catch(o){!function(e,t,n){const o=document.getElementById("#clipboard");o&&o.remove();const r=document.createElement("textarea");r.id="#clipboard",r.style.position="fixed",r.style.top="-9999px",r.style.zIndex="-9999",document.body.appendChild(r),r.value=e,r.select(),r.setSelectionRange(0,r.value.length);const i=document.execCommand("Copy",!1);r.blur(),i?t():n()}(e,t,n)}},new Promise(((e,t)=>{var i=e=>{try{a(r.next(e))}catch(n){t(n)}},s=e=>{try{a(r.throw(e))}catch(n){t(n)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(i,s);a((r=r.apply(n,o)).next())}));var n,o,r}),0,vd);const ch=Wu(0,((e,t)=>{const n=typeof t,o="string"===n?t:JSON.stringify({type:n,data:t});localStorage.setItem(e,o)}));function uh(e){const t=localStorage&&localStorage.getItem(e);if(!v(t))throw new Error("data not found");let n=t;try{const e=function(e){const t=["object","string","number","boolean","undefined"];try{const n=v(e)?JSON.parse(e):e,o=n.type;if(t.indexOf(o)>=0){const e=Object.keys(n);if(2===e.length&&"data"in n){if(typeof n.data===o)return n.data;if("object"===o&&/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/.test(n.data))return new Date(n.data)}else if(1===e.length)return""}}catch(n){}}(JSON.parse(t));void 0!==e&&(n=e)}catch(o){}return n}const dh=Wu(0,(e=>{try{return uh(e)}catch(t){return""}})),fh=Wu(0,(e=>{localStorage&&localStorage.removeItem(e)})),ph=Wu(0,(()=>{localStorage&&localStorage.clear()})),hh={image:{jpg:"jpeg",jpe:"jpeg",pbm:"x-portable-bitmap",pgm:"x-portable-graymap",pnm:"x-portable-anymap",ppm:"x-portable-pixmap",psd:"vnd.adobe.photoshop",pic:"x-pict",rgb:"x-rgb",svg:"svg+xml",svgz:"svg+xml",tif:"tiff",xif:"vnd.xiff",wbmp:"vnd.wap.wbmp",wdp:"vnd.ms-photo",xbm:"x-xbitmap",ico:"x-icon"},video:{"3g2":"3gpp2","3gp":"3gpp",avi:"x-msvideo",f4v:"x-f4v",flv:"x-flv",jpgm:"jpm",jpgv:"jpeg",m1v:"mpeg",m2v:"mpeg",mpe:"mpeg",mpg:"mpeg",mpg4:"mpeg",m4v:"x-m4v",mkv:"x-matroska",mov:"quicktime",qt:"quicktime",movie:"x-sgi-movie",mp4v:"mp4",ogv:"ogg",smv:"x-smv",wm:"x-ms-wm",wmv:"x-ms-wmv",wmx:"x-ms-wmx",wvx:"x-ms-wvx"}};function mh({count:e,sourceType:t,type:n,extension:o}){df();const r=document.createElement("input");return r.type="file",function(e,t){for(const n in t)e.style[n]=t[n]}(r,{position:"absolute",visibility:"hidden",zIndex:"-999",width:"0",height:"0",top:"0",left:"0"}),r.accept=o.map((e=>{if("all"!==n){const t=e.replace(".","");return`${n}/${hh[n][t]||t}`}return function(){const e=window.navigator.userAgent.toLowerCase().match(/MicroMessenger/i);return!(!e||"micromessenger"!==e[0])}()?".":0===e.indexOf(".")?e:`.${e}`})).join(","),e&&e>1&&(r.multiple=!0),"all"!==n&&t instanceof Array&&1===t.length&&"camera"===t[0]&&r.setAttribute("capture","camera"),r}let gh=null;const vh=zu("chooseFile",(({count:e,sourceType:t,type:n,extension:o},{resolve:r,reject:i})=>{yl();const{t:s}=fl();gh&&(document.body.removeChild(gh),gh=null),gh=mh({count:e,sourceType:t,type:n,extension:o}),document.body.appendChild(gh),gh.addEventListener("change",(function(t){const n=t.target,o=[];if(n&&n.files){const t=n.files.length;for(let r=0;r(i=i||Yd(t),i)}),re))},tempFiles:o})})),gh.click(),ff()||console.warn(s("uni.chooseFile.notUserActivation"))}),0,wd);let yh=null;const _h=zu("chooseImage",(({count:e,sourceType:t,extension:n},{resolve:o,reject:r})=>{yl();const{t:i}=fl();yh&&(document.body.removeChild(yh),yh=null),yh=mh({count:e,sourceType:t,extension:n,type:"image"}),document.body.appendChild(yh),yh.addEventListener("change",(function(t){const n=t.target,r=[];if(n&&n.files){const t=n.files.length;for(let o=0;o(i=i||Yd(t),i)}),oe))},tempFiles:r})})),yh.click(),ff()||console.warn(i("uni.chooseFile.notUserActivation"))}),0,yd),bh={esc:["Esc","Escape"],enter:["Enter"]},wh=Object.keys(bh);function xh(){const e=nn(""),t=nn(!1),n=n=>{if(t.value)return;const o=wh.find((e=>-1!==bh[e].indexOf(n.key)));o&&(e.value=o),wn((()=>e.value=""))};return Ro((()=>{document.addEventListener("keyup",n)})),Bo((()=>{document.removeEventListener("keyup",n)})),{key:e,disable:t}}const Sh=Qr("div",{class:"uni-mask"},null,-1);function Th(e,t,n){return t.onClose=(...e)=>(t.visible=!1,n.apply(null,e)),ws(mo({setup:()=>()=>(Hr(),Yr(e,t,null,16))}))}function Eh(e){let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.append(t)),t}function Ch(e,{onEsc:t,onEnter:n}){const o=nn(e.visible),{key:r,disable:i}=xh();return Gn((()=>e.visible),(e=>o.value=e)),Gn((()=>o.value),(e=>i.value=!e)),Xn((()=>{const{value:e}=r;"esc"===e?t&&t():"enter"===e&&n&&n()})),o}let kh=null;const Oh=zu("chooseVideo",(({sourceType:e,extension:t},{resolve:n,reject:o})=>{yl();const{t:r}=fl();kh&&(document.body.removeChild(kh),kh=null),kh=mh({sourceType:e,extension:t,type:"video"}),document.body.appendChild(kh),kh.addEventListener("change",(function(e){const t=e.target.files[0];let o="";const r={tempFilePath:o,tempFile:t,size:t.size,duration:0,width:0,height:0,name:t.name};Object.defineProperty(r,"tempFilePath",{get(){return o=o||Yd(this.tempFile),o}});const i=document.createElement("video");if(void 0!==i.onloadedmetadata){const e=Yd(t);i.onloadedmetadata=function(){qd(e),n(c(r,{duration:i.duration||0,width:i.videoWidth||0,height:i.videoHeight||0}))},setTimeout((()=>{i.onloadedmetadata=null,qd(e),n(r)}),300),i.src=e}else n(r)})),kh.click(),ff()||console.warn(r("uni.chooseFile.notUserActivation"))}),0,_d),Lh=Vu("request",(({url:e,data:t,header:n={},method:o,dataType:r,responseType:i,withCredentials:s,timeout:a=__uniConfig.networkTimeout.request},{resolve:l,reject:c})=>{let u=null;const d=function(e){const t=Object.keys(e).find((e=>"content-type"===e.toLowerCase()));if(!t)return;const n=e[t];if(0===n.indexOf("application/json"))return"json";if(0===n.indexOf("application/x-www-form-urlencoded"))return"urlencoded";return"string"}(n);if("GET"!==o)if(v(t)||t instanceof ArrayBuffer)u=t;else if("json"===d)try{u=JSON.stringify(t)}catch(g){u=t.toString()}else if("urlencoded"===d){const e=[];for(const n in t)f(t,n)&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));u=e.join("&")}else u=t.toString();const p=new XMLHttpRequest,h=new Ah(p);p.open(o,e);for(const v in n)f(n,v)&&p.setRequestHeader(v,n[v]);const m=setTimeout((function(){p.onload=p.onabort=p.onerror=null,h.abort(),c("timeout",{errCode:5})}),a);return p.responseType=i,p.onload=function(){clearTimeout(m);const e=p.status;let t="text"===i?p.responseText:p.response;if("text"===i&&"json"===r)try{t=JSON.parse(t)}catch(g){}l({data:t,statusCode:e,header:$h(p.getAllResponseHeaders()),cookies:[]})},p.onabort=function(){clearTimeout(m),c("abort",{errCode:600003})},p.onerror=function(){clearTimeout(m),c(void 0,{errCode:5})},p.withCredentials=s,p.send(u),h}),0,Ed);class Ah{constructor(e){this._xhr=e}abort(){this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}function $h(e){const t={};return e.split("\n").forEach((e=>{const n=e.match(/(\S+\s*):\s*(.*)/);n&&3===n.length&&(t[n[1]]=n[2])})),t}class Mh{constructor(e){this._callbacks=[],this._xhr=e}onProgressUpdate(e){g(e)&&this._callbacks.push(e)}offProgressUpdate(e){const t=this._callbacks.indexOf(e);t>=0&&this._callbacks.splice(t,1)}abort(){this._isAbort=!0,this._xhr&&(this._xhr.abort(),delete this._xhr)}onHeadersReceived(e){throw new Error("Method not implemented.")}offHeadersReceived(e){throw new Error("Method not implemented.")}}const Ph=Vu("uploadFile",(({url:e,file:t,filePath:n,name:o,files:r,header:i={},formData:s={},timeout:a=__uniConfig.networkTimeout.uploadFile},{resolve:l,reject:c})=>{var u=new Mh;return p(r)&&r.length||(r=[{name:o,file:t,uri:n}]),Promise.all(r.map((({file:e,uri:t})=>e instanceof Blob?Promise.resolve(Ud(e)):zd(t)))).then((function(t){var n,o=new XMLHttpRequest,d=new FormData;Object.keys(s).forEach((e=>{d.append(e,s[e])})),Object.values(r).forEach((({name:e},n)=>{const o=t[n];d.append(e||"file",o,o.name||`file-${Date.now()}`)})),o.open("POST",e),Object.keys(i).forEach((e=>{o.setRequestHeader(e,i[e])})),o.upload.onprogress=function(e){u._callbacks.forEach((t=>{var n=e.loaded,o=e.total;t({progress:Math.round(n/o*100),totalBytesSent:n,totalBytesExpectedToSend:o})}))},o.onerror=function(){clearTimeout(n),c("",{errCode:602001})},o.onabort=function(){clearTimeout(n),c("abort",{errCode:600003})},o.onload=function(){clearTimeout(n);const e=o.status;l({statusCode:e,data:o.responseText||o.response})},u._isAbort?c("abort",{errCode:600003}):(n=setTimeout((function(){o.upload.onprogress=o.onload=o.onabort=o.onerror=null,u.abort(),c("timeout",{errCode:5})}),a),o.send(d),u._xhr=o)})).catch((()=>{setTimeout((()=>{c("file error")}),0)})),u}),0,Cd),jh=[],Rh={open:"",close:"",error:"",message:""};class Nh{constructor(e,t,n){let o;this._callbacks={open:[],close:[],error:[],message:[]};try{const n=this._webSocket=new WebSocket(e,t);n.binaryType="arraybuffer";["open","close","error","message"].forEach((e=>{this._callbacks[e]=[],n.addEventListener(e,(t=>{const{data:n,code:o,reason:r}=t,i="message"===e?{data:n}:"close"===e?{code:o,reason:r}:{};if(this._callbacks[e].forEach((t=>{try{t(i)}catch(n){console.error(`thirdScriptError\n${n};at socketTask.on${$(e)} callback function\n`,n)}})),this===jh[0]&&Rh[e]&&Cm.invokeOnCallback(Rh[e],i),"error"===e||"close"===e){const e=jh.indexOf(this);e>=0&&jh.splice(e,1)}}))}));["CLOSED","CLOSING","CONNECTING","OPEN","readyState"].forEach((e=>{Object.defineProperty(this,e,{get:()=>n[e]})}))}catch(r){o=r}n&&n(o,this)}send(e){const t=(e||{}).data,n=this._webSocket;try{if(n.readyState!==n.OPEN)throw de(e,{errMsg:"sendSocketMessage:fail SocketTask.readyState is not OPEN",errCode:10002}),new Error("SocketTask.readyState is not OPEN");n.send(t),de(e,"sendSocketMessage:ok")}catch(o){de(e,{errMsg:`sendSocketMessage:fail ${o}`,errCode:602001})}}close(e={}){const t=this._webSocket;try{const n=e.code||1e3,o=e.reason;v(o)?t.close(n,o):t.close(n),de(e,"closeSocket:ok")}catch(n){de(e,`closeSocket:fail ${n}`)}}onOpen(e){this._callbacks.open.push(e)}onMessage(e){this._callbacks.message.push(e)}onError(e){this._callbacks.error.push(e)}onClose(e){this._callbacks.close.push(e)}}const Ih=Vu("connectSocket",(({url:e,protocols:t},{resolve:n,reject:o})=>new Nh(e,t,((e,t)=>{e?o(e.toString(),{errCode:600009}):(jh.push(t),n())}))),0,kd),Bh=zu("navigateBack",((e,{resolve:t,reject:n})=>{let o=!0;return!0===dc("onBackPress",{from:e.from||"navigateBack"})&&(o=!1),o?(Fp().$router.go(-e.delta),t()):n("onBackPress")}),0,Pd);function Dh({type:e,url:t,tabBarText:n,events:o,isAutomatedTesting:r},i){const s=Fp().$router,{path:a,query:l}=function(e){const[t,n]=e.split("?",2);return{path:t,query:we(n||"")}}(t);return new Promise(((t,c)=>{const u=function(e,t){return{__id__:t||++yp,__type__:e}}(e,i);s["navigateTo"===e?"push":"replace"]({path:a,query:l,state:u,force:!0}).then((i=>{if(_a(i))return c(i.message);if("switchTab"===e&&(s.currentRoute.value.meta.tabBarText=n),"navigateTo"===e){const e=s.currentRoute.value.meta;return e.eventChannel?o&&(Object.keys(o).forEach((t=>{e.eventChannel._addListener(t,"on",o[t])})),e.eventChannel._clearCache()):e.eventChannel=new Se(u.__id__,o),t(r?{__id__:u.__id__}:{eventChannel:e.eventChannel})}return r?t({__id__:u.__id__}):t()}))}))}const Fh=zu("navigateTo",(({url:e,events:t,isAutomatedTesting:n},{resolve:o,reject:r})=>Dh({type:"navigateTo",url:e,events:t,isAutomatedTesting:n}).then(o).catch(r)),0,Ld);const Hh=zu("redirectTo",(({url:e,isAutomatedTesting:t},{resolve:n,reject:o})=>(function(){const e=rc();if(!e)return;const t=e.$page;vp(bp(t.path,t.id))}(),Dh({type:"redirectTo",url:e,isAutomatedTesting:t}).then(n).catch(o))),0,Ad);const Vh=zu("reLaunch",(({url:e,isAutomatedTesting:t},{resolve:n,reject:o})=>(function(){const e=mp().keys();for(const t of e)vp(t)}(),Dh({type:"reLaunch",url:e,isAutomatedTesting:t}).then(n).catch(o))),0,$d);function Wh(e,t){return e===t.fullPath||"/"===e&&t.meta.isEntry}const zh=zu("switchTab",(({url:e,tabBarText:t,isAutomatedTesting:n},{resolve:o,reject:r})=>(function(){const e=ac();if(!e)return;const t=mp(),n=t.keys();for(const o of n){const e=t.get(o);e.$.__isTabBar?e.$.__isActive=!1:vp(o)}e.$.__isTabBar&&(e.$.__isVisible=!1,dc(e,"onHide"))}(),Dh({type:"switchTab",url:e,tabBarText:t,isAutomatedTesting:n},function(e){const t=mp().values();for(const n of t){const t=n.$page;if(Wh(e,t))return n.$.__isActive=!0,t.id}}(e)).then(o).catch(r))),0,Md);function Uh(e){__uniConfig.darkmode&&Cm.on("onThemeChange",e)}function Yh(e){Cm.off("onThemeChange",e)}const qh={light:{cancelColor:"#000000"},dark:{cancelColor:"rgb(170, 170, 170)"}},Xh=mo({props:{title:{type:String,default:""},content:{type:String,default:""},showCancel:{type:Boolean,default:!0},cancelText:{type:String,default:"Cancel"},cancelColor:{type:String,default:"#000000"},confirmText:{type:String,default:"OK"},confirmColor:{type:String,default:"#007aff"},visible:{type:Boolean},editable:{type:Boolean,default:!1},placeholderText:{type:String,default:""}},setup(e,{emit:t}){const n=nn(""),o=()=>s.value=!1,r=()=>(o(),t("close","cancel")),i=()=>(o(),t("close","confirm",n.value)),s=Ch(e,{onEsc:r,onEnter:()=>{!e.editable&&i()}}),a=function(e){const t=nn(e.cancelColor),n=({theme:e})=>{((e,t)=>{t.value=qh[e].cancelColor})(e,t)};return Xn((()=>{e.visible?(t.value=e.cancelColor,"#000"===e.cancelColor&&("dark"===Zp()&&n({theme:"dark"}),Uh(n))):Yh(n)})),t}(e);return()=>{const{title:t,content:o,showCancel:l,confirmText:c,confirmColor:u,editable:d,placeholderText:f}=e;return n.value=o,Qr(Ai,{name:"uni-fade"},{default:()=>[to(Qr("uni-modal",{onTouchmove:Xl},[Sh,Qr("div",{class:"uni-modal"},[t?Qr("div",{class:"uni-modal__hd"},[Qr("strong",{class:"uni-modal__title",textContent:t||""},null,8,["textContent"])]):null,d?Qr("textarea",{class:"uni-modal__textarea",rows:"1",placeholder:f,value:o,onInput:e=>n.value=e.target.value},null,40,["placeholder","value","onInput"]):Qr("div",{class:"uni-modal__bd",onTouchmovePassive:Kl,textContent:o},null,40,["onTouchmovePassive","textContent"]),Qr("div",{class:"uni-modal__ft"},[l&&Qr("div",{style:{color:a.value},class:"uni-modal__btn uni-modal__btn_default",onClick:r},[e.cancelText],12,["onClick"]),Qr("div",{style:{color:u},class:"uni-modal__btn uni-modal__btn_primary",onClick:i},[c],12,["onClick"])])])],40,["onTouchmove"]),[[zi,s.value]])]})}}});let Kh;const Gh=le((()=>{Cm.on("onHidePopup",(()=>Kh.visible=!1))}));let Jh;function Zh(e,t){const n="confirm"===e,o={confirm:n,cancel:"cancel"===e};n&&Kh.editable&&(o.content=t),Jh&&Jh(o)}const Qh=zu("showModal",((e,{resolve:t})=>{Gh(),Jh=t,Kh?(c(Kh,e),Kh.visible=!0):(Kh=Ft(e),wn((()=>(Th(Xh,Kh,Zh).mount(Eh("u-a-m")),wn((()=>Kh.visible=!0))))))}),0,Fd),em={title:{type:String,default:""},icon:{default:"success",validator:e=>-1!==Hd.indexOf(e)},image:{type:String,default:""},duration:{type:Number,default:1500},mask:{type:Boolean,default:!1},visible:{type:Boolean}},tm={light:"#fff",dark:"rgba(255,255,255,0.9)"},nm=e=>tm[e],om=mo({name:"Toast",props:em,setup(e){ml(),gl();const{Icon:t}=function(e){const t=nn(nm(Zp())),n=({theme:e})=>t.value=nm(e);Xn((()=>{e.visible?Uh(n):Yh(n)}));return{Icon:xi((()=>{switch(e.icon){case"success":return Qr(nc(ec,t.value,38),{class:"uni-toast__icon"});case"error":return Qr(nc(tc,t.value,38),{class:"uni-toast__icon"});case"loading":return Qr("i",{class:["uni-toast__icon","uni-loading"]},null,2);default:return null}}))}}(e),n=Ch(e,{});return()=>{const{mask:o,duration:r,title:i,image:s}=e;return Qr(Ai,{name:"uni-fade"},{default:()=>[to(Qr("uni-toast",{"data-duration":r},[o?Qr("div",{class:"uni-mask",style:"background: transparent;",onTouchmove:Xl},null,40,["onTouchmove"]):"",s||t.value?Qr("div",{class:"uni-toast"},[s?Qr("img",{src:s,class:"uni-toast__icon"},null,10,["src"]):t.value,Qr("p",{class:"uni-toast__content"},[i])]):Qr("div",{class:"uni-sample-toast"},[Qr("p",{class:"uni-simple-toast__text"},[i])])],8,["data-duration"]),[[zi,n.value]])]})}}});let rm,im,sm="";const am=Ne();function lm(e){rm?c(rm,e):(rm=Ft(c(e,{visible:!1})),wn((()=>{am.run((()=>{Gn([()=>rm.visible,()=>rm.duration],(([e,t])=>{if(e){if(im&&clearTimeout(im),"onShowLoading"===sm)return;im=setTimeout((()=>{pm("onHideToast")}),t)}else im&&clearTimeout(im)}))})),Cm.on("onHidePopup",(()=>pm("onHidePopup"))),Th(om,rm,(()=>{})).mount(Eh("u-a-t"))}))),setTimeout((()=>{rm.visible=!0}),10)}const cm=zu("showToast",((e,{resolve:t,reject:n})=>{lm(e),sm="onShowToast",t()}),0,Vd),um={icon:"loading",duration:1e8,image:""},dm=zu("showLoading",((e,{resolve:t,reject:n})=>{c(e,um),lm(e),sm="onShowLoading",t()}),0,Dd),fm=zu("hideLoading",((e,{resolve:t,reject:n})=>{pm("onHideLoading"),t()}));function pm(e){const{t:t}=fl();if(!sm)return;let n="";if("onHideToast"===e&&"onShowToast"!==sm?n=t("uni.showToast.unpaired"):"onHideLoading"===e&&"onShowLoading"!==sm&&(n=t("uni.showLoading.unpaired")),n)return console.warn(n);sm="",setTimeout((()=>{rm.visible=!1}),10)}function hm(e){function t(){var t;t=e.navigationBar.titleText,document.title=t,Cm.emit("onNavigationBarChange",{titleText:t})}Xn(t),To(t)}const mm=zc({name:"Layout",setup(e,{emit:t}){const n=nn(null);Zl({"--status-bar-height":"0px","--top-window-height":"0px","--window-left":"0px","--window-right":"0px","--window-margin":"0px","--tab-bar-height":"0px"});const o=function(){const e=el();return{routeKey:xi((()=>bp("/"+e.meta.route,ap()))),isTabBar:xi((()=>e.meta.isTabBar)),routeCache:xp}}(),{layoutState:r,windowState:i}=function(){sp();{const e=Ft({marginWidth:0,leftWindowWidth:0,rightWindowWidth:0});return Gn((()=>e.marginWidth),(e=>Zl({"--window-margin":e+"px"}))),Gn((()=>e.leftWindowWidth+e.marginWidth),(e=>{Zl({"--window-left":e+"px"})})),Gn((()=>e.rightWindowWidth+e.marginWidth),(e=>{Zl({"--window-right":e+"px"})})),{layoutState:e,windowState:xi((()=>({})))}}}();!function(e,t){const n=sp();function o(){const o=document.body.clientWidth,r=gp();let i={};if(r.length>0){i=r[r.length-1].$page.meta}else{const e=vc(n.path,!0);e&&(i=e.meta)}const s=parseInt(String((f(i,"maxWidth")?i.maxWidth:__uniConfig.globalStyle.maxWidth)||Number.MAX_SAFE_INTEGER));let a=!1;a=o>s,a&&s?(e.marginWidth=(o-s)/2,wn((()=>{const e=t.value;e&&e.setAttribute("style","max-width:"+s+"px;margin:0 auto;")}))):(e.marginWidth=0,wn((()=>{const e=t.value;e&&e.removeAttribute("style")})))}Gn([()=>n.path],o),Ro((()=>{o(),window.addEventListener("resize",o)}))}(r,n);const s=function(e){const t=nn(!1);return xi((()=>({"uni-app--showtabbar":e&&e.value,"uni-app--maxwidth":t.value})))}(!1);return()=>{const e=function(e,t,n,o,r,i){return function({routeKey:e,isTabBar:t,routeCache:n}){return Qr(Za,null,{default:Nn((({Component:o})=>[(Hr(),Yr(xo,{matchBy:"key",cache:n},[(Hr(),Yr(Wn(o),{type:t.value?"tabBar":"",key:e.value}))],1032,["cache"]))])),_:1})}(e)}(o);return Qr("uni-app",{ref:n,class:s.value},[e,!1],2)}}});function gm(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!qr(e)}function vm(e){if(e.mode===bm.TIME)return"00:00";if(e.mode===bm.DATE){const t=(new Date).getFullYear()-150;switch(e.fields){case wm.YEAR:return t.toString();case wm.MONTH:return t+"-01";default:return t+"-01-01"}}return""}function ym(e){if(e.mode===bm.TIME)return"23:59";if(e.mode===bm.DATE){const t=(new Date).getFullYear()+150;switch(e.fields){case wm.YEAR:return t.toString();case wm.MONTH:return t+"-12";default:return t+"-12-31"}}return""}function _m(e,t,n,o){const r=e.mode===bm.DATE?"-":":",i=e.mode===bm.DATE?t.dateArray:t.timeArray;let s;if(e.mode===bm.TIME)s=2;else switch(e.fields){case wm.YEAR:s=1;break;case wm.MONTH:s=2;break;default:s=3}const a=String(n).split(r);let l=[];for(let c=0;c=0&&(l=o?_m(e,t,o):l.map((()=>0))),l}const bm={SELECTOR:"selector",MULTISELECTOR:"multiSelector",TIME:"time",DATE:"date"},wm={YEAR:"year",MONTH:"month",DAY:"day"},xm={PICKER:"picker",SELECT:"select"},Sm=Wc({name:"Picker",compatConfig:{MODE:3},props:{name:{type:String,default:""},range:{type:Array,default:()=>[]},rangeKey:{type:String,default:""},value:{type:[Number,String,Array],default:0},mode:{type:String,default:bm.SELECTOR,validator:e=>Object.values(bm).includes(e)},fields:{type:String,default:""},start:{type:String,default:e=>vm(e)},end:{type:String,default:e=>ym(e)},disabled:{type:[Boolean,String],default:!1},selectorType:{type:String,default:""}},emits:["change","cancel","columnchange"],setup(e,{emit:t,slots:n}){bl();const{t:o}=fl(),r=nn(null),i=nn(null),s=nn(null),a=nn(null),l=nn(!1),{state:u,rangeArray:d}=function(e){const t=Ft({valueSync:void 0,visible:!1,contentVisible:!1,popover:null,valueChangeSource:"",timeArray:[],dateArray:[],valueArray:[],oldValueArray:[],isDesktop:!1,popupStyle:{content:{},triangle:{}}}),n=xi((()=>{let n=e.range;switch(e.mode){case bm.SELECTOR:return[n];case bm.MULTISELECTOR:return n;case bm.TIME:return t.timeArray;case bm.DATE:{const n=t.dateArray;switch(e.fields){case wm.YEAR:return[n[0]];case wm.MONTH:return[n[0],n[1]];default:return[n[0],n[1],n[2]]}}}return[]}));return{state:t,rangeArray:n}}(e),f=Yc(r,t),{system:h,selectorTypeComputed:m,_show:g,_l10nColumn:v,_l10nItem:y,_input:_,_fixInputPosition:b,_pickerViewChange:w,_cancel:x,_change:S,_resetFormData:T,_getFormData:E,_createTime:C,_createDate:k,_setValueSync:O}=function(e,t,n,o,r,i,s){const a=function(){const e=nn(!1);return e.value=(()=>0===String(navigator.vendor).indexOf("Apple")&&navigator.maxTouchPoints>0)(),e}(),l=function(){const e=nn("");return e.value=(()=>{if(/win|mac/i.test(navigator.platform)){if("Google Inc."===navigator.vendor)return"chrome";if(/Firefox/.test(navigator.userAgent))return"firefox"}return""})(),e}(),c=xi((()=>{const t=e.selectorType;return Object.values(xm).includes(t)?t:a.value?xm.PICKER:xm.SELECT})),u=xi((()=>e.mode===bm.DATE&&!Object.values(wm).includes(e.fields)&&t.isDesktop?l.value:"")),d=xi((()=>_m(e,t,e.start,vm(e)))),f=xi((()=>_m(e,t,e.end,ym(e))));function h(n){if(e.disabled)return;t.valueChangeSource="";let o=r.value,i=n.currentTarget;o.remove(),(document.querySelector("uni-app")||document.body).appendChild(o),o.style.display="block";const s=i.getBoundingClientRect();t.popover={top:s.top,left:s.left,width:s.width,height:s.height},setTimeout((()=>{t.visible=!0}),20)}function m(){return{value:t.valueSync,key:e.name}}function g(){switch(e.mode){case bm.SELECTOR:t.valueSync=0;break;case bm.MULTISELECTOR:t.valueSync=e.value.map((e=>0));break;case bm.DATE:case bm.TIME:t.valueSync=""}}function v(){let e=[],n=[];for(let t=0;t<24;t++)e.push((t<10?"0":"")+t);for(let t=0;t<60;t++)n.push((t<10?"0":"")+t);t.timeArray.push(e,n)}function y(){let t=(new Date).getFullYear(),n=t-150,o=t+150;if(e.start){const t=new Date(e.start).getFullYear();!isNaN(t)&&to&&(o=t)}return{start:n,end:o}}function _(){let e=[];const n=y();for(let t=n.start,i=n.end;t<=i;t++)e.push(String(t));let o=[];for(let t=1;t<=12;t++)o.push((t<10?"0":"")+t);let r=[];for(let t=1;t<=31;t++)r.push((t<10?"0":"")+t);t.dateArray.push(e,o,r)}function b(e){return 60*e[0]+e[1]}function w(e){const t=31;return e[0]*t*12+(e[1]||0)*t+(e[2]||0)}function x(e,t){for(let n=0;na?0:s)}}break;case bm.TIME:case bm.DATE:t.valueSync=String(n);break;default:{const e=Number(n);t.valueSync=e<0?0:e;break}}}function T(){let n,o=t.valueSync;switch(e.mode){case bm.MULTISELECTOR:n=[...o];break;case bm.TIME:n=_m(e,t,o,ue({mode:bm.TIME}));break;case bm.DATE:n=_m(e,t,o,ue({mode:bm.DATE}));break;default:n=[o]}t.oldValueArray=[...n],t.valueArray=[...n]}function E(){let n=t.valueArray;switch(e.mode){case bm.SELECTOR:return n[0];case bm.MULTISELECTOR:return n.map((e=>e));case bm.TIME:return t.valueArray.map(((e,n)=>t.timeArray[n][e])).join(":");case bm.DATE:return t.valueArray.map(((e,n)=>t.dateArray[n][e])).join("-")}}function C(){O(),t.valueChangeSource="click";const e=E();t.valueSync=p(e)?e.map((e=>e)):e,n("change",{},{value:e})}function k(e){if("firefox"===u.value&&e){const{top:n,left:o,width:r,height:i}=t.popover,{pageX:s,pageY:a}=e;if(s>o&&sn&&a{let e=r.value;e.remove(),o.value.prepend(e),e.style.display="none"}),260)}function L(){e.mode===bm.SELECTOR&&c.value===xm.SELECT&&(i.value.scrollTop=34*t.valueArray[0])}function A(e){const n=e.target;t.valueSync=n.value,wn((()=>{C()}))}function $(e){if("chrome"===u.value){const t=o.value.getBoundingClientRect(),n=32;s.value.style.left=e.clientX-t.left-1.5*n+"px",s.value.style.top=e.clientY-t.top-.5*n+"px"}}function M(e){t.valueArray=P(e.detail.value,!0)}function P(t,n){const{getLocale:o}=fl();if(e.mode===bm.DATE){const r=o();if(!r.startsWith("zh"))switch(e.fields){case wm.YEAR:return t;case wm.MONTH:return[t[1],t[0]];default:switch(r){case"es":case"fr":return[t[2],t[1],t[0]];default:return n?[t[2],t[0],t[1]]:[t[1],t[2],t[0]]}}}return t}function j(t,n){const{getLocale:o}=fl();if(e.mode===bm.DATE){const r=o();if(r.startsWith("zh")){return t+["年","月","日"][n]}if(e.fields!==wm.YEAR&&n===(e.fields===wm.MONTH||"es"!==r&&"fr"!==r?0:1)){let e;switch(r){case"es":e=["enero","febrero","marzo","abril","mayo","junio","​​julio","agosto","septiembre","octubre","noviembre","diciembre"];break;case"fr":e=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"];break;default:e=["January","February","March","April","May","June","July","August","September","October","November","December"]}return e[Number(t)-1]}}return t}return Gn((()=>t.visible),(e=>{e?(clearTimeout(Tm),t.contentVisible=e,L()):Tm=setTimeout((()=>{t.contentVisible=e}),300)})),Gn([()=>e.mode,()=>e.value,()=>e.range],S,{deep:!0}),Gn((()=>t.valueSync),T,{deep:!0}),Gn((()=>t.valueArray),(o=>{if(e.mode===bm.TIME||e.mode===bm.DATE){const n=e.mode===bm.TIME?b:w,o=t.valueArray,r=d.value,i=f.value;if(e.mode===bm.DATE){const e=t.dateArray,n=e[2].length,r=Number(e[2][o[2]])||1,i=new Date(`${e[0][o[0]]}/${e[1][o[1]]}/${r}`).getDate();in(i)&&x(o,i)}o.forEach(((o,r)=>{o!==t.oldValueArray[r]&&(t.oldValueArray[r]=o,e.mode===bm.MULTISELECTOR&&n("columnchange",{},{column:r,value:o}))}))})),{selectorTypeComputed:c,system:u,_show:h,_cancel:k,_change:C,_l10nColumn:P,_l10nItem:j,_input:A,_resetFormData:g,_getFormData:m,_createTime:v,_createDate:_,_setValueSync:S,_fixInputPosition:$,_pickerViewChange:M}}(e,u,f,r,i,s,a);!function(e,t,n){const{key:o,disable:r}=xh();Xn((()=>{r.value=!e.visible})),Gn(o,(e=>{"esc"===e?t():"enter"===e&&n()}))}(u,x,S),function(e,t){const n=mr(Gc,!1);if(n){const o={reset:e,submit:()=>{const e=["",null],{key:n,value:o}=t();return""!==n&&(e[0]=n,e[1]=o),e}};n.addField(o),Bo((()=>{n.removeField(o)}))}}(T,E),C(),k(),O();const L=function(e){const t=nn(0),n=nn(0),o=xi((()=>t.value>=500&&n.value>=500)),r=xi((()=>{const t={content:{transform:"",left:"",top:"",bottom:""},triangle:{left:"",top:"",bottom:"","border-width":"","border-color":""}},r=t.content,i=t.triangle,s=e.popover;function a(e){return Number(e)||0}if(o.value&&s){c(i,{position:"absolute",width:"0",height:"0","margin-left":"-6px","border-style":"solid"});const e=a(s.left),t=a(s.width),o=a(s.top),l=a(s.height),u=e+t/2;r.transform="none !important";const d=Math.max(0,u-150);r.left=`${d}px`;let f=Math.max(12,u-d);f=Math.min(288,f),i.left=`${f}px`;const p=n.value/2;o+l-p>p-o?(r.top="auto",r.bottom=n.value-o+6+"px",i.bottom="-6px",i["border-width"]="6px 6px 0 6px",i["border-color"]="#fcfcfd transparent transparent transparent"):(r.top=`${o+l+6}px`,i.top="-6px",i["border-width"]="0 6px 6px 6px",i["border-color"]="transparent transparent #fcfcfd transparent")}return t}));return Ro((()=>{const e=()=>{const{windowWidth:e,windowHeight:o,windowTop:r}=sh();t.value=e,n.value=o+(r||0)};window.addEventListener("resize",e),e(),Do((()=>{window.removeEventListener("resize",e)}))})),{isDesktop:o,popupStyle:r}}(u);return Xn((()=>{u.isDesktop=L.isDesktop.value,u.popupStyle=L.popupStyle.value})),Bo((()=>{i.value&&i.value.remove()})),Ro((()=>{l.value=!0})),()=>{let t;const{visible:c,contentVisible:f,valueArray:p,popupStyle:T,valueSync:E}=u,{rangeKey:C,mode:k,start:O,end:L}=e,A=Kc(e,"disabled");return Qr("uni-picker",si({ref:r},A,{onClick:Uc(g)}),[l.value?Qr("div",{ref:i,class:["uni-picker-container",`uni-${k}-${m.value}`],onWheel:Xl,onTouchmove:Xl},[Qr(Ai,{name:"uni-fade"},{default:()=>[to(Qr("div",{class:"uni-mask uni-picker-mask",onClick:Uc(x),onMousemove:b},null,40,["onClick","onMousemove"]),[[zi,c]])]}),h.value?null:Qr("div",{class:[{"uni-picker-toggle":c},"uni-picker-custom"],style:T.content},[Qr("div",{class:"uni-picker-header",onClick:Kl},[Qr("div",{class:"uni-picker-action uni-picker-action-cancel",onClick:Uc(x)},[o("uni.picker.cancel")],8,["onClick"]),Qr("div",{class:"uni-picker-action uni-picker-action-confirm",onClick:S},[o("uni.picker.done")],8,["onClick"])],8,["onClick"]),f?Qr(Af,{value:v(p),class:"uni-picker-content",onChange:w},gm(t=zo(v(d.value),((e,t)=>{let n;return Qr(If,{key:t},gm(n=zo(e,((e,n)=>Qr("div",{key:n,class:"uni-picker-item"},["object"==typeof e?e[C]||"":y(e,t)]))))?n:{default:()=>[n],_:1})})))?t:{default:()=>[t],_:1},8,["value","onChange"]):null,Qr("div",{ref:s,class:"uni-picker-select",onWheel:Kl,onTouchmove:Kl},[zo(d.value[0],((e,t)=>Qr("div",{key:t,class:["uni-picker-item",{selected:p[0]===t}],onClick:()=>{p[0]=t,S()}},["object"==typeof e?e[C]||"":e],10,["onClick"])))],40,["onWheel","onTouchmove"]),Qr("div",{style:T.triangle},null,4)],6)],40,["onWheel","onTouchmove"]):null,Qr("div",null,[n.default&&n.default()]),h.value?Qr("div",{class:"uni-picker-system",onMousemove:Uc(b)},[Qr("input",{class:["uni-picker-system_input",h.value],ref:a,value:E,type:k,tabindex:"-1",min:O,max:L,onChange:e=>{_(e),Kl(e)}},null,42,["value","type","min","max","onChange"])],40,["onMousemove"]):null],16,["onClick"])}}});let Tm;const Em=c(Cl,{publishHandler(e,t,n){Cm.subscribeHandler(e,t,n)}}),Cm=c(Ac,{publishHandler(e,t,n){Em.subscribeHandler(e,t,n)}}),km=zc({name:"PageBody",setup(e,t){const n=nn(null);return Gn((()=>false.enablePullDownRefresh),(()=>{n.value=null}),{immediate:!0}),()=>Qr(Rr,null,[!1,Qr("uni-page-wrapper",n.value,[Qr("uni-page-body",null,[Uo(t.slots,"default")])],16)])}}),Om=zc({name:"Page",setup(e,t){const n=ip(ap());n.navigationBar;const o={};return hm(n),()=>Qr("uni-page",{"data-page":n.route,style:o},[Lm(t)])}});function Lm(e){return Hr(),Yr(km,{key:0},{default:Nn((()=>[Uo(e.slots,"page")])),_:3})}const Am={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:6e4,suspensible:!0};window.uni={},window.wx={},window.rpx2px=Qu;const $m=Object.assign({}),Mm=Object.assign;window.__uniConfig=Mm({globalStyle:{backgroundColor:"#F8F8F8",navigationBar:{backgroundColor:"#F8F8F8",titleText:"uni-app",type:"default",titleColor:"#000000"},isNVue:!1},uniIdRouter:{},compilerVersion:"4.24"},{appId:"__UNI__F9A28FF",appName:"心悦搜剧-短剧搜索",appVersion:"1.0.0",appVersionCode:"100",async:Am,debug:!1,networkTimeout:{request:6e4,connectSocket:6e4,uploadFile:6e4,downloadFile:6e4},sdkConfigs:{},qqMapKey:void 0,bMapKey:void 0,googleMapKey:void 0,aMapKey:void 0,aMapSecurityJsCode:void 0,aMapServiceHost:void 0,nvue:{"flex-direction":"column"},locale:"",fallbackLocale:"",locales:Object.keys($m).reduce(((e,t)=>{const n=t.replace(/\.\/locale\/(uni-app.)?(.*).json/,"$2");return Mm(e[n]||(e[n]={}),$m[t].default),e}),{}),router:{mode:"hash",base:"/",assets:"assets",routerBase:"/"},darkmode:!1,themeConfig:{}}),window.__uniLayout=window.__uniLayout||{};const Pm={delay:Am.delay,timeout:Am.timeout,suspensible:Am.suspensible};Am.loading&&(Pm.loadingComponent={name:"SystemAsyncLoading",render:()=>Qr(Hn(Am.loading))}),Am.error&&(Pm.errorComponent={name:"SystemAsyncError",render:()=>Qr(Hn(Am.error))});const jm=()=>t((()=>import("./pages-index-index.ClyHdhya.js")),__vite__mapDeps([0,1,2,3])).then((e=>zp(e.default||e))),Rm=vo(Mm({loader:jm},Pm)),Nm=()=>t((()=>import("./pages-index-list.DyA6ZEg7.js")),__vite__mapDeps([4,1,2,5])).then((e=>zp(e.default||e))),Im=vo(Mm({loader:Nm},Pm)),Bm=()=>t((()=>import("./pages-index-detail.DNWQcveo.js")),__vite__mapDeps([6,1,2,7])).then((e=>zp(e.default||e))),Dm=vo(Mm({loader:Bm},Pm));function Fm(e,t){return Hr(),Yr(Om,null,{page:Nn((()=>[Qr(e,Mm({},t,{ref:"page"}),null,512)])),_:1})}window.__uniRoutes=[{path:"/",alias:"/pages/index/index",component:{setup(){const e=Fp(),t=e&&e.$route&&e.$route.query||{};return()=>Fm(Rm,t)}},loader:jm,meta:{isQuit:!0,isEntry:!0,navigationBar:{titleText:"首页",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/list",component:{setup(){const e=Fp(),t=e&&e.$route&&e.$route.query||{};return()=>Fm(Im,t)}},loader:Nm,meta:{navigationBar:{titleText:"搜索",style:"custom",type:"default"},isNVue:!1}},{path:"/pages/index/detail",component:{setup(){const e=Fp(),t=e&&e.$route&&e.$route.query||{};return()=>Fm(Dm,t)}},loader:Bm,meta:{navigationBar:{titleText:"资源详情",style:"custom",type:"default"},isNVue:!1}}].map((e=>(e.meta.route=(e.alias||e.path).slice(1),e)));const Hm={onLaunch:function(){try{uni.baseURL=baseURL}catch(e){uni.baseURL="https://pan.xinyuedh.com/"}Lh({url:uni.baseURL+"api/tool/getConfig",success:e=>{this.$store.commit("setConfig",e.data.data)}})},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}};function Vm(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}}Wp(Hm,{init:Hp,setup(e){const t=sp(),n=()=>{var n;n=e,Object.keys(ld).forEach((e=>{ld[e].forEach((t=>{Mo(e,t,n)}))}));const{onLaunch:o,onShow:r,onPageNotFound:i,onError:s}=e,a=function({path:e,query:t}){return c(Xd,{path:e,query:t}),c(Kd,Xd),c({},Xd)}({path:t.path.slice(1)||__uniRoutes[0].meta.route,query:_e(t.query)});if(o&&j(o,a),r&&j(r,a),!t.matched.length){const e={notFound:!0,openType:"appLaunch",path:t.path,query:{},scene:1001};i&&j(i,e)}s&&(e.appContext.config.errorHandler=e=>{j(s,e)})};return mr(Fa).isReady().then(n),Ro((()=>{window.addEventListener("resize",xe(Up,50,{setTimeout:setTimeout,clearTimeout:clearTimeout})),window.addEventListener("message",Yp),document.addEventListener("visibilitychange",qp),function(){let e=null;try{e=window.matchMedia("(prefers-color-scheme: dark)")}catch(t){}if(e){let t=e=>{Cm.emit("onThemeChange",{theme:e.matches?"dark":"light"})};e.addEventListener?e.addEventListener("change",t):e.addListener(t)}}()})),t.query},before(e){e.mpType="app";const{setup:t}=e,n=()=>(Hr(),Yr(mm));e.setup=(e,o)=>{const r=t&&t(e,o);return g(r)?n:r},e.render=n}});const Wm="function"==typeof Proxy;class zm{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const n={};if(e.settings)for(const s in e.settings){const t=e.settings[s];n[s]=t.defaultValue}const o=`__vue-devtools-plugin-settings__${e.id}`;let r={...n};try{const e=localStorage.getItem(o),t=JSON.parse(e);Object.assign(r,t)}catch(i){}this.fallbacks={getSettings:()=>r,setSettings(e){try{localStorage.setItem(o,JSON.stringify(e))}catch(i){}r=e}},t.on("plugin:settings:set",((e,t)=>{e===this.plugin.id&&this.fallbacks.setSettings(t)})),this.proxiedOn=new Proxy({},{get:(e,t)=>this.target?this.target.on[t]:(...e)=>{this.onQueue.push({method:t,args:e})}}),this.proxiedTarget=new Proxy({},{get:(e,t)=>this.target?this.target[t]:"on"===t?this.proxiedOn:Object.keys(this.fallbacks).includes(t)?(...e)=>(this.targetQueue.push({method:t,args:e,resolve:()=>{}}),this.fallbacks[t](...e)):(...e)=>new Promise((n=>{this.targetQueue.push({method:t,args:e,resolve:n})}))})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function Um(e,t){const n=Vm(),o=Vm().__VUE_DEVTOOLS_GLOBAL_HOOK__,r=Wm&&e.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&r){const i=r?new zm(e,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:e,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}else o.emit("devtools-plugin:setup",e,t)} -/*! - * vuex v4.1.0 - * (c) 2022 Evan You - * @license MIT - */function Ym(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function qm(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Xm(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Gm(e,n,[],e._modules.root,!0),Km(e,n,t)}function Km(e,t,n){var o=e._state,r=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,s={},a={},l=Ne(!0);l.run((function(){Ym(i,(function(t,n){s[n]=function(e,t){return function(){return e(t)}}(t,e),a[n]=xi((function(){return s[n]()})),Object.defineProperty(e.getters,n,{get:function(){return a[n].value},enumerable:!0})}))})),e._state=Ft({data:t}),e._scope=l,e.strict&&function(e){Gn((function(){return e._state.data}),(function(){}),{deep:!0,flush:"sync"})}(e),o&&n&&e._withCommit((function(){o.data=null})),r&&r.stop()}function Gm(e,t,n,o,r){var i=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!i&&!r){var a=Zm(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){a[l]=o.state}))}var c=o.context=function(e,t,n){var o=""===t,r={dispatch:o?e.dispatch:function(n,o,r){var i=Qm(n,o,r),s=i.payload,a=i.options,l=i.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:o?e.commit:function(n,o,r){var i=Qm(n,o,r),s=i.payload,a=i.options,l=i.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(r,{getters:{get:o?function(){return e.getters}:function(){return Jm(e,t)}},state:{get:function(){return Zm(e.state,n)}}}),r}(e,s,n);o.forEachMutation((function(t,n){!function(e,t,n,o){(e._mutations[t]||(e._mutations[t]=[])).push((function(t){n.call(e,o.state,t)}))}(e,s+n,t,c)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,r=t.handler||t;!function(e,t,n,o){(e._actions[t]||(e._actions[t]=[])).push((function(t){var r,i=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return(r=i)&&"function"==typeof r.then||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}(e,o,r,c)})),o.forEachGetter((function(t,n){!function(e,t,n,o){if(e._wrappedGetters[t])return;e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)}}(e,s+n,t,c)})),o.forEachChild((function(o,i){Gm(e,t,n.concat(i),o,r)}))}function Jm(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(r){if(r.slice(0,o)===t){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return e.getters[r]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Zm(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Qm(e,t,n){var o;return null!==(o=e)&&"object"==typeof o&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var eg=0;function tg(e,t){Um({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(n){n.addTimelineLayer({id:"vuex:mutations",label:"Vuex Mutations",color:ng}),n.addTimelineLayer({id:"vuex:actions",label:"Vuex Actions",color:ng}),n.addInspector({id:"vuex",label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&"vuex"===n.inspectorId)if(n.filter){var o=[];sg(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[ig(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&"vuex"===n.inspectorId){var o=n.nodeId;Jm(t,o),n.state=function(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),r={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var i=function(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var r=t,i=o.pop();o.forEach((function(e){r[e]||(r[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),r=r[e]._custom.value})),r[i]=ag((function(){return e[n]}))}else t[n]=ag((function(){return e[n]}))})),t}(t);r.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?rg(e):e,editable:!1,value:ag((function(){return i[e]}))}}))}return r}((r=t._modules,(s=(i=o).split("/").filter((function(e){return e}))).reduce((function(e,t,n){var o=e[t];if(!o)throw new Error('Missing module "'+t+'" for path "'+i+'".');return n===s.length-1?o:o._children}),"root"===i?r:r.root._children)),"root"===o?t.getters:t._makeLocalGettersCache,o)}var r,i,s})),n.on.editInspectorState((function(n){if(n.app===e&&"vuex"===n.inspectorId){var o=n.nodeId,r=n.path;"root"!==o&&(r=o.split("/").filter(Boolean).concat(r)),t._withCommit((function(){n.set(t._state.data,r,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree("vuex"),n.sendInspectorState("vuex"),n.addTimelineEvent({layerId:"vuex:mutations",event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=eg++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:"vuex:actions",event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},r=Date.now()-e._time;o.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:"vuex:actions",event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var ng=8702998,og={label:"namespaced",textColor:16777215,backgroundColor:6710886};function rg(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function ig(e,t){return{id:t||"root",label:rg(t),tags:e.namespaced?[og]:[],children:Object.keys(e._children).map((function(n){return ig(e._children[n],t+n+"/")}))}}function sg(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[og]:[]}),Object.keys(t._children).forEach((function(r){sg(e,t._children[r],n,o+r+"/")}))}function ag(e){try{return e()}catch(t){return t}}var lg=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"==typeof n?n():n)||{}},cg={namespaced:{configurable:!0}};cg.namespaced.get=function(){return!!this._rawModule.namespaced},lg.prototype.addChild=function(e,t){this._children[e]=t},lg.prototype.removeChild=function(e){delete this._children[e]},lg.prototype.getChild=function(e){return this._children[e]},lg.prototype.hasChild=function(e){return e in this._children},lg.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},lg.prototype.forEachChild=function(e){Ym(this._children,e)},lg.prototype.forEachGetter=function(e){this._rawModule.getters&&Ym(this._rawModule.getters,e)},lg.prototype.forEachAction=function(e){this._rawModule.actions&&Ym(this._rawModule.actions,e)},lg.prototype.forEachMutation=function(e){this._rawModule.mutations&&Ym(this._rawModule.mutations,e)},Object.defineProperties(lg.prototype,cg);var ug=function(e){this.register([],e,!1)};function dg(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return;dg(e.concat(o),t.getChild(o),n.modules[o])}}ug.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},ug.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return e+((t=t.getChild(n)).namespaced?n+"/":"")}),"")},ug.prototype.update=function(e){dg([],this.root,e)},ug.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var r=new lg(t,n);0===e.length?this.root=r:this.get(e.slice(0,-1)).addChild(e[e.length-1],r);t.modules&&Ym(t.modules,(function(t,r){o.register(e.concat(r),t,n)}))},ug.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},ug.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var fg=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var r=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new ug(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=r;var i=this,s=this.dispatch,a=this.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return a.call(i,e,t,n)},this.strict=o;var l=this._modules.root.state;Gm(this,l,[],this._modules.root),Km(this,l),n.forEach((function(e){return e(t)}))},pg={state:{configurable:!0}};fg.prototype.install=function(e,t){e.provide(t||"store",this),e.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&tg(e,this)},pg.state.get=function(){return this._state.data},pg.state.set=function(e){},fg.prototype.commit=function(e,t,n){var o=this,r=Qm(e,t,n),i=r.type,s=r.payload,a={type:i,payload:s},l=this._mutations[i];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},fg.prototype.dispatch=function(e,t){var n=this,o=Qm(e,t),r=o.type,i=o.payload,s={type:r,payload:i},a=this._actions[r];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(c){}var l=a.length>1?Promise.all(a.map((function(e){return e(i)}))):a[0](i);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(c){}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(c){}t(e)}))}))}},fg.prototype.subscribe=function(e,t){return qm(e,this._subscribers,t)},fg.prototype.subscribeAction=function(e,t){return qm("function"==typeof e?{before:e}:e,this._actionSubscribers,t)},fg.prototype.watch=function(e,t,n){var o=this;return Gn((function(){return e(o.state,o.getters)}),t,Object.assign({},n))},fg.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},fg.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"==typeof e&&(e=[e]),this._modules.register(e,t),Gm(this,this.state,e,this._modules.get(e),n.preserveState),Km(this,this.state)},fg.prototype.unregisterModule=function(e){var t=this;"string"==typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){delete Zm(t.state,e.slice(0,-1))[e[e.length-1]]})),Xm(this)},fg.prototype.hasModule=function(e){return"string"==typeof e&&(e=[e]),this._modules.isRegistered(e)},fg.prototype.hotUpdate=function(e){this._modules.update(e),Xm(this,!0)},fg.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(fg.prototype,pg);const hg=new fg({state:{config:{}},mutations:{setConfig(e,t){e.config=t}}});(function(){const e=ws(Hm);return e.use(hg),{app:e}})().app.use(Mp).mount("#app");export{gs as $,_h as A,Oh as B,gp as C,td as D,vh as E,Rr as F,dm as G,fm as H,Ef as I,Qh as J,md as K,gd as L,Ph as M,ch as N,dh as O,fh as P,ph as Q,Ih as R,sh as S,Hh as T,zh as U,ah as V,hd as W,ad as X,cd as Y,Uo as Z,re as _,Hn as a,Ff as a0,sd as a1,to as a2,zi as a3,qf as a4,Wn as b,Yr as c,Qr as d,ti as e,ie as f,Zr as g,ys as h,Xf as i,ni as j,Ur as k,zo as l,of as m,Fh as n,Hr as o,Wf as p,cl as q,Lh as r,eu as s,q as t,Sm as u,Vh as v,Nn as w,cm as x,lh as y,Bh as z}; diff --git a/public/assets/list-CbK_uKq5.css b/public/assets/list-CbK_uKq5.css deleted file mode 100644 index c7cfd73..0000000 --- a/public/assets/list-CbK_uKq5.css +++ /dev/null @@ -1 +0,0 @@ -.uni-pagination[data-v-bd0b20fd]{display:flex;position:relative;overflow:hidden;flex-direction:row;justify-content:center;align-items:center}.uni-pagination__total[data-v-bd0b20fd]{font-size:14px;color:#999;margin-right:15px}.uni-pagination__btn[data-v-bd0b20fd]{display:flex;cursor:pointer;padding:0 8px;line-height:30px;font-size:12px;position:relative;background-color:#f0f0f0;flex-direction:row;justify-content:center;align-items:center;text-align:center;border-radius:5px}.uni-pagination__child-btn[data-v-bd0b20fd]{display:flex;position:relative;flex-direction:row;justify-content:center;align-items:center;text-align:center;color:#666;font-size:12px}.uni-pagination__num[data-v-bd0b20fd]{display:flex;flex:1;flex-direction:row;justify-content:center;align-items:center;height:30px;line-height:30px;font-size:12px;color:#666;margin:0 5px}.uni-pagination__num-tag[data-v-bd0b20fd]{cursor:pointer;min-width:30px;margin:0 5px;height:30px;text-align:center;line-height:30px;color:#999;border-radius:4px}.uni-pagination__num-current[data-v-bd0b20fd]{display:flex;flex-direction:row}.uni-pagination__num-current-text[data-v-bd0b20fd]{font-size:15px}.current-index-text[data-v-bd0b20fd]{color:#2979ff}.uni-pagination--enabled[data-v-bd0b20fd]{color:#333;opacity:1}.uni-pagination--disabled[data-v-bd0b20fd]{opacity:.5;cursor:default}.uni-pagination--hover[data-v-bd0b20fd]{color:rgba(0,0,0,.6);background-color:#eee}.tag--active[data-v-bd0b20fd]:hover{color:#2979ff}.page--active[data-v-bd0b20fd]{color:#fff;background-color:#2979ff}.page--active[data-v-bd0b20fd]:hover{color:#fff}.is-pc-hide[data-v-bd0b20fd]{display:block}.is-phone-hide[data-v-bd0b20fd]{display:none}@media screen and (min-width: 450px){.is-pc-hide[data-v-bd0b20fd]{display:none}.is-phone-hide[data-v-bd0b20fd]{display:block}.uni-pagination__num-flex-none[data-v-bd0b20fd]{flex:none}}.homeBox[data-v-67b0fc48]{width:720px;margin:90px auto 15px;min-height:calc(100vh - 255px);text-align:center}.homeBox .logoBox[data-v-67b0fc48]{display:inline-flex;align-items:center}.homeBox .logoBox .logo[data-v-67b0fc48]{width:50px;height:50px}.homeBox .logoBox .title[data-v-67b0fc48]{margin-left:18px;font-size:24px;font-weight:700}.homeBox .subTitle[data-v-67b0fc48]{padding:15px 0;opacity:.6}.homeBox .search[data-v-67b0fc48]{position:relative;margin:30px auto auto;background-color:#fff;height:48px;border-radius:12px;box-shadow:0 1px 6px rgba(32,33,36,.145);max-width:540px}.homeBox .search .selectBox[data-v-67b0fc48]{position:absolute;top:0;bottom:0;width:90px}.homeBox .search uni-input[data-v-67b0fc48]{text-align:left;height:100%;padding:0 60px 0 100px}.homeBox .search .iconfont[data-v-67b0fc48]{position:absolute;top:10px;right:25px;font-size:18px}.homeBox .search.noSelect .selectBox[data-v-67b0fc48]{display:none}.homeBox .search.noSelect uni-input[data-v-67b0fc48]{padding:0 60px 0 24px}.homeBox .content[data-v-67b0fc48]{box-shadow:0 0 5px rgba(214,214,214,.5);background-color:#fff;border-radius:12px;padding:15px 15px 25px;margin-top:72px}.homeBox .content .p[data-v-67b0fc48]{padding:0 0 4px}.homeBox .content .p span[data-v-67b0fc48],.homeBox .content .p uni-label[data-v-67b0fc48]{color:#1e80ff;padding:0 4px;font-weight:700}.homeBox .content .list[data-v-67b0fc48]{text-align:left;margin-top:10px;padding-bottom:15px}.homeBox .content .list .item[data-v-67b0fc48]{border-top:1px solid #f2f2f2;padding:13px 0 11px;cursor:pointer;transition:transform .4s;opacity:.9}.homeBox .content .list .item .name[data-v-67b0fc48]{padding-bottom:10px;font-size:15px;font-weight:700}.homeBox .content .list .item .numbox[data-v-67b0fc48]{display:flex;align-items:center}.homeBox .content .list .item .numbox .ke[data-v-67b0fc48]{position:relative;color:#999;flex:none;padding-left:25px}.homeBox .content .list .item .numbox .ke[data-v-67b0fc48]:after{content:"";position:absolute;top:-3.2px;left:0;font-family:iconfont;font-size:18px;color:#3a25dd}.homeBox .content .list .item .numbox .num[data-v-67b0fc48]{position:relative;color:#999;flex:none;padding-left:25px;margin-left:60px}.homeBox .content .list .item .numbox .num[data-v-67b0fc48]:after{content:"";position:absolute;top:-5px;left:0;font-family:iconfont;font-size:20px}.homeBox .content .list .item .numbox .cate[data-v-67b0fc48]{position:relative;color:#999;flex:none;padding-left:25px;margin-left:60px}.homeBox .content .list .item .numbox .cate[data-v-67b0fc48]:after{content:"";position:absolute;top:-5px;left:0;font-family:iconfont;font-size:20px}.homeBox .content .list .item[data-v-67b0fc48]:hover{opacity:1;transform:translateY(-2px)}.homeBox .content .list .item:hover .name[data-v-67b0fc48]{color:#1e80ff}@media screen and (max-width: 768px){.homeBox[data-v-67b0fc48]{margin:5vw 4vw;width:auto;min-height:calc(100vh - 60vw)}.homeBox .logoBox[data-v-67b0fc48]{display:none}.homeBox .logoBox .logo[data-v-67b0fc48]{width:9vw;height:9vw}.homeBox .logoBox .title[data-v-67b0fc48]{margin-left:3.2vw;font-size:5.2vw}.homeBox .subTitle[data-v-67b0fc48]{padding:4vw 0}.homeBox .search[data-v-67b0fc48]{margin-top:4vw;height:13vw;border-radius:3vw}.homeBox .search .selectBox[data-v-67b0fc48]{width:20vw;font-size:30vw}.homeBox .search uni-input[data-v-67b0fc48]{padding:0 14vw 0 22vw}.homeBox .search .iconfont[data-v-67b0fc48]{top:2.5vw;right:5vw;font-size:5vw}.homeBox .search.noSelect uni-input[data-v-67b0fc48]{padding:0 14vw 0 6vw}.homeBox .content[data-v-67b0fc48]{border-radius:3vw;padding:4vw 4vw 6vw;margin-top:12vw}.homeBox .content .list[data-v-67b0fc48]{margin-top:2vw;padding-bottom:3vw}.homeBox .content .list .item[data-v-67b0fc48]{padding:4vw 0}.homeBox .content .list .item .name[data-v-67b0fc48]{padding-bottom:3vw;font-size:4.2vw}.homeBox .content .list .item .numbox .ke[data-v-67b0fc48]{padding-left:6vw}.homeBox .content .list .item .numbox .ke[data-v-67b0fc48]:after{top:-.7vw;font-size:4.8vw}.homeBox .content .list .item .numbox .num[data-v-67b0fc48]{padding-left:6vw;margin-left:8vw}.homeBox .content .list .item .numbox .num[data-v-67b0fc48]:after{top:-1.5vw;font-size:5.6vw}.homeBox .content .list .item .numbox .cate[data-v-67b0fc48]{padding-left:6vw;margin-left:8vw}.homeBox .content .list .item .numbox .cate[data-v-67b0fc48]:after{top:-1.5vw;font-size:5.6vw}} diff --git a/public/assets/logo-DQLPqAxx.png b/public/assets/logo-DQLPqAxx.png deleted file mode 100644 index 54411bd..0000000 Binary files a/public/assets/logo-DQLPqAxx.png and /dev/null differ diff --git a/public/assets/pages-index-detail.DNWQcveo.js b/public/assets/pages-index-detail.DNWQcveo.js deleted file mode 100644 index 7617269..0000000 --- a/public/assets/pages-index-detail.DNWQcveo.js +++ /dev/null @@ -1 +0,0 @@ -import{v as a,r as e,x as t,y as s,z as o,a as l,b as n,c,w as i,i as d,o as r,d as u,e as f,t as g,f as _,g as p,h as m,j as h,m as y,p as k,I as C}from"./index-bFszJRU6.js";import{_ as b,H as x,F as w,r as B,a as v}from"./footer.BS9rMale.js";const V=b({components:{Header:x,Footer:w},data:()=>({keyword:"",info:{},id:0,loading:!1,category_id:"",category:[{value:"",text:"全部"}]}),onLoad(a){this.getClass(),a.id&&(this.id=a.id,this.getData())},computed:{config(){return this.$store.state.config}},methods:{searchBtn(){a({url:"/pages/index/list?category_id="+this.category_id+"&keyword="+encodeURIComponent(this.keyword)})},getData(){this.loading=!0,e({url:uni.baseURL+"api/search/getDetail",data:{id:this.id},success:a=>{200==a.data.code?this.info=a.data.data:t({title:a.data.message,icon:"none"})},complete:()=>{this.loading=!1}})},setClipboard(a){s({data:a})},goLink(a){window.open(a,"_blank")},goShare(a){var e=window.location.href;let t="「"+a.title+"」由"+this.config.app_name+"提供网盘分享链接:"+e;this.setClipboard(t)},goBack(){o()},getClass(){let a=[{value:"",text:"全部"}];e({url:uni.baseURL+"api/search/getCategory",success:e=>{let t=e.data.data||[];for(let s of t)a.push({value:s.source_category_id,text:s.name});this.category=a}})}}},[["render",function(a,e,t,s,o,b){const x=l("Header"),w=y,V=k,L=d,U=B(n("uni-data-select"),v),F=C,j=l("Footer");return r(),c(L,{class:"view"},{default:i((()=>[u(x),u(L,{class:"homeBox"},{default:i((()=>[u(L,{class:"logoBox"},{default:i((()=>[u(w,{class:"logo",src:b.config.logo},null,8,["src"]),u(V,{class:"title"},{default:i((()=>[f(g(b.config.app_name),1)])),_:1})])),_:1}),u(L,{class:"subTitle"},{default:i((()=>[f(g(b.config.app_description),1)])),_:1}),u(L,{class:_(["search",o.category.length>2?"":"noSelect"])},{default:i((()=>[u(U,{class:"selectBox",modelValue:o.category_id,"onUpdate:modelValue":e[0]||(e[0]=a=>o.category_id=a),localdata:o.category,clear:!1},null,8,["modelValue","localdata"]),p("i",{class:"iconfont icon-sousuo",onClick:e[1]||(e[1]=(...a)=>b.searchBtn&&b.searchBtn(...a))}),u(F,{type:"text",modelValue:o.keyword,"onUpdate:modelValue":e[2]||(e[2]=a=>o.keyword=a),placeholder:"输入关键字进行搜索",onKeyup:m(b.searchBtn,["enter"]),"confirm-type":"search",onConfirm:b.searchBtn},null,8,["modelValue","onKeyup","onConfirm"])])),_:1},8,["class"]),u(L,{class:"content"},{default:i((()=>[u(L,{class:"p"},{default:i((()=>[p("span",{onClick:e[3]||(e[3]=(...a)=>b.goBack&&b.goBack(...a))},"返回搜索页")])),_:1}),u(L,{class:"list"},{default:i((()=>[o.loading?(r(),c(L,{key:0,class:"loading"},{default:i((()=>[f("正在努力加载中...")])),_:1})):h("",!0),o.info.id?(r(),c(L,{key:1,class:"item"},{default:i((()=>[u(L,{class:"name"},{default:i((()=>[f(g(o.info.title),1)])),_:1}),u(L,{class:"numbox"},{default:i((()=>[u(L,{class:"ke"},{default:i((()=>[f("夸克网盘")])),_:1}),u(L,{class:"num"},{default:i((()=>[f(g(o.info.times),1)])),_:1}),o.info.category&&o.info.category.name?(r(),c(L,{key:0,class:"cate"},{default:i((()=>[f(g(o.info.category.name),1)])),_:1})):h("",!0)])),_:1}),u(L,{class:"btns"},{default:i((()=>[u(L,{class:"btn",onClick:e[4]||(e[4]=a=>b.setClipboard(o.info.url))},{default:i((()=>[f("链接")])),_:1}),u(L,{class:"btn",onClick:e[5]||(e[5]=a=>b.goLink(o.info.url))},{default:i((()=>[f("跳转")])),_:1}),u(L,{class:"btn",onClick:e[6]||(e[6]=a=>b.goShare(o.info))},{default:i((()=>[f("分享")])),_:1})])),_:1})])),_:1})):h("",!0),o.loading||o.info.id?h("",!0):(r(),c(L,{key:2,class:"nodata"},{default:i((()=>[u(L,null,{default:i((()=>[f("未找到或不是短剧?请加入微信群获得更多资源")])),_:1}),u(w,{src:b.config.qcode,mode:"aspectFit"},null,8,["src"])])),_:1}))])),_:1})])),_:1})])),_:1}),u(j)])),_:1})}],["__scopeId","data-v-d622f63e"]]);export{V as default}; diff --git a/public/assets/pages-index-index.ClyHdhya.js b/public/assets/pages-index-index.ClyHdhya.js deleted file mode 100644 index 238e58b..0000000 --- a/public/assets/pages-index-index.ClyHdhya.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,r as a,a as t,b as s,c as l,w as o,i as c,o as i,d as n,e as d,t as r,f as u,g,h,j as f,k as m,l as p,F as _,m as y,p as k,I as w}from"./index-bFszJRU6.js";import{_ as C,H as b,F as x,r as B,a as v}from"./footer.BS9rMale.js";const H=C({components:{Header:b,Footer:x},data:()=>({keyword:"",tab:0,loading:!1,hot:[],loading2:!1,newList:[],category_id:"",category:[{value:"",text:"全部"}]}),onLoad(){this.getClass(),this.getHot(),this.getNew()},computed:{config(){return this.$store.state.config}},methods:{searchBtn(){e({url:"/pages/index/list?category_id="+this.category_id+"&keyword="+encodeURIComponent(this.keyword)}),this.keyword=""},goSearch(a){e({url:"/pages/index/list?keyword="+encodeURIComponent(a)})},getHot(){this.loading=!0,a({url:"https://pan.xinyuedh.com/api/search/getHot",success:e=>{let a=[],t=[];try{t=e.data.data}catch(s){}for(let l of t)a.push({title:l.title,hot:l.hots,ranking:l.ranking});this.hot=a},complete:()=>{this.loading=!1}})},getNew(){this.loading2=!0,a({url:uni.baseURL+"api/search/getNew",success:e=>{let a=[],t=[];try{t=e.data.data.items}catch(s){}for(let l of t)a.push({title:l.title,num:l.times});this.newList=a},complete:()=>{this.loading2=!1}})},getClass(){let e=[{value:"",text:"全部"}];a({url:uni.baseURL+"api/search/getCategory",success:a=>{let t=a.data.data||[];for(let s of t)e.push({value:s.source_category_id,text:s.name});this.category=e}})}}},[["render",function(e,a,C,b,x,H){const L=t("Header"),U=y,V=k,F=c,I=B(s("uni-data-select"),v),R=w,S=t("Footer");return i(),l(F,{class:"view"},{default:o((()=>[n(L),n(F,{class:"homeBox"},{default:o((()=>[n(F,{class:"logoBox"},{default:o((()=>[n(U,{class:"logo",src:H.config?H.config.logo:""},null,8,["src"]),n(V,{class:"title"},{default:o((()=>[d(r(H.config?H.config.app_name:""),1)])),_:1})])),_:1}),n(F,{class:"subTitle"},{default:o((()=>[d(r(H.config?H.config.app_description:""),1)])),_:1}),n(F,{class:u(["search",x.category.length>2?"":"noSelect"])},{default:o((()=>[n(I,{class:"selectBox",modelValue:x.category_id,"onUpdate:modelValue":a[0]||(a[0]=e=>x.category_id=e),localdata:x.category,clear:!1},null,8,["modelValue","localdata"]),g("i",{class:"iconfont icon-sousuo",onClick:a[1]||(a[1]=(...e)=>H.searchBtn&&H.searchBtn(...e))}),n(R,{type:"text",modelValue:x.keyword,"onUpdate:modelValue":a[2]||(a[2]=e=>x.keyword=e),placeholder:"输入关键字进行搜索",onKeyup:h(H.searchBtn,["enter"]),"confirm-type":"search",onConfirm:H.searchBtn},null,8,["modelValue","onKeyup","onConfirm"])])),_:1},8,["class"]),n(F,{class:"content"},{default:o((()=>[n(F,{class:"tabs"},{default:o((()=>[n(F,{class:u(["item",0===x.tab?"active":""]),onClick:a[3]||(a[3]=e=>x.tab=0)},{default:o((()=>[d("热门资源")])),_:1},8,["class"]),n(F,{class:u(["item",1===x.tab?"active":""]),onClick:a[4]||(a[4]=e=>x.tab=1)},{default:o((()=>[d("最新资源")])),_:1},8,["class"])])),_:1}),0===x.tab?(i(),l(F,{key:0,class:"list"},{default:o((()=>[x.loading?(i(),l(F,{key:0,class:"loading"},{default:o((()=>[d("正在努力加载中...")])),_:1})):f("",!0),(i(!0),m(_,null,p(x.hot,((e,a)=>(i(),l(F,{class:"item",key:a,onClick:a=>H.goSearch(e.title)},{default:o((()=>[n(F,{class:"name"},{default:o((()=>[d(r(e.ranking)+"、"+r(e.title),1)])),_:2},1024),n(F,{class:"num"},{default:o((()=>[d(r(e.hot),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):f("",!0),1===x.tab?(i(),l(F,{key:1,class:"list"},{default:o((()=>[x.loading2?(i(),l(F,{key:0,class:"loading"},{default:o((()=>[d("正在努力加载中...")])),_:1})):f("",!0),(i(!0),m(_,null,p(x.newList,((e,a)=>(i(),l(F,{class:"item",key:a,onClick:a=>H.goSearch(e.title)},{default:o((()=>[n(F,{class:"name"},{default:o((()=>[d(r(a+1)+"、"+r(e.title),1)])),_:2},1024),n(F,{class:"num"},{default:o((()=>[d(r(e.num),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})):f("",!0)])),_:1})])),_:1}),n(S)])),_:1})}],["__scopeId","data-v-e95cc1ce"]]);export{H as default}; diff --git a/public/assets/pages-index-list.DyA6ZEg7.js b/public/assets/pages-index-list.DyA6ZEg7.js deleted file mode 100644 index faa5ee9..0000000 --- a/public/assets/pages-index-list.DyA6ZEg7.js +++ /dev/null @@ -1 +0,0 @@ -import{q as e,b as t,o as a,c as n,w as i,d as s,e as r,t as l,j as o,f as c,k as u,F as g,l as p,p as d,s as h,u as x,i as f,n as m,r as _,a as y,g as k,h as v,m as I,I as S}from"./index-bFszJRU6.js";import{_ as P,r as C,b,H as z,F as w,a as T}from"./footer.BS9rMale.js";const N={en:{"uni-pagination.prevText":"prev","uni-pagination.nextText":"next","uni-pagination.piecePerPage":"piece/page"},es:{"uni-pagination.prevText":"anterior","uni-pagination.nextText":"prxima","uni-pagination.piecePerPage":"Art��culo/P��gina"},fr:{"uni-pagination.prevText":"précédente","uni-pagination.nextText":"suivante","uni-pagination.piecePerPage":"Articles/Pages"},"zh-Hans":{"uni-pagination.prevText":"上一页","uni-pagination.nextText":"下一页","uni-pagination.piecePerPage":"条/页"},"zh-Hant":{"uni-pagination.prevText":"上一頁","uni-pagination.nextText":"下一頁","uni-pagination.piecePerPage":"條/頁"}},{t:V}=e(N);const B=P({name:"UniPagination",emits:["update:modelValue","input","change","pageSizeChange"],props:{value:{type:[Number,String],default:1},modelValue:{type:[Number,String],default:1},prevText:{type:String},nextText:{type:String},piecePerPageText:{type:String},current:{type:[Number,String],default:1},total:{type:[Number,String],default:0},pageSize:{type:[Number,String],default:10},showIcon:{type:[Boolean,String],default:!1},showPageSize:{type:[Boolean,String],default:!1},pagerCount:{type:Number,default:7},pageSizeRange:{type:Array,default:()=>[20,50,100,500]}},data:()=>({pageSizeIndex:0,currentIndex:1,paperData:[],pickerShow:!1}),computed:{piecePerPage(){return this.piecePerPageText||V("uni-pagination.piecePerPage")},prevPageText(){return this.prevText||V("uni-pagination.prevText")},nextPageText(){return this.nextText||V("uni-pagination.nextText")},maxPage(){let e=1,t=Number(this.total),a=Number(this.pageSize);return t&&a&&(e=Math.ceil(t/a)),e},paper(){const e=this.currentIndex,t=this.pagerCount,a=this.total,n=this.pageSize;let i=[],s=[],r=Math.ceil(a/n);for(let o=0;o{(t+1)/2>=e?a1&&s.push(a):e+2<=l?a>e-(t+1)/2&&ae-(t+1)/2||r-tt?((t+1)/2>=e?s[s.length-1]="...":e+2<=l?(s[1]="...",s[s.length-1]="..."):s[1]="...",s.push(i[i.length-1])):(t+1)/2>=e||e+2<=l||(s.shift(),s.push(i[i.length-1])),s}},watch:{current:{immediate:!0,handler(e,t){this.currentIndex=e<1?1:e}},value:{immediate:!0,handler(e){1===Number(this.current)&&(this.currentIndex=e<1?1:e)}},pageSizeIndex(e){this.$emit("pageSizeChange",this.pageSizeRange[e])}},methods:{pickerChange(e){this.pageSizeIndex=e.detail.value,this.pickerClick()},pickerClick(){const e=document.querySelector("body");if(!e)return;const t="uni-pagination-picker-show";this.pickerShow=!this.pickerShow,this.pickerShow?e.classList.add(t):setTimeout((()=>e.classList.remove(t)),300)},selectPage(e,t){if(parseInt(e))this.currentIndex=e,this.change("current");else{let e=Math.ceil(this.total/this.pageSize);if(t<=1)return void(this.currentIndex-5>1?this.currentIndex-=5:this.currentIndex=1);if(t>=6)return void(this.currentIndex+5>e?this.currentIndex=e:this.currentIndex+=5)}},clickLeft(){1!==Number(this.currentIndex)&&(this.currentIndex-=1,this.change("prev"))},clickRight(){Number(this.currentIndex)>=this.maxPage||(this.currentIndex+=1,this.change("next"))},change(e){this.$emit("input",this.currentIndex),this.$emit("update:modelValue",this.currentIndex),this.$emit("change",{type:e,current:this.currentIndex})}}},[["render",function(e,m,_,y,k,v){const I=d,S=C(t("uni-icons"),b),P=h,z=x,w=f;return a(),n(w,{class:"uni-pagination"},{default:i((()=>[!0===_.showPageSize||"true"===_.showPageSize?(a(),n(z,{key:0,class:"select-picker",mode:"selector",value:k.pageSizeIndex,range:_.pageSizeRange,onChange:v.pickerChange,onCancel:v.pickerClick,onClick:v.pickerClick},{default:i((()=>[s(P,{type:"default",size:"mini",plain:!0},{default:i((()=>[s(I,null,{default:i((()=>[r(l(_.pageSizeRange[k.pageSizeIndex])+" "+l(v.piecePerPage),1)])),_:1}),s(S,{class:"select-picker-icon",type:"arrowdown",size:"12",color:"#999"})])),_:1})])),_:1},8,["value","range","onChange","onCancel","onClick"])):o("",!0),s(w,{class:"uni-pagination__total is-phone-hide"},{default:i((()=>[r("共 "+l(_.total)+" 条",1)])),_:1}),s(w,{class:c(["uni-pagination__btn",1===k.currentIndex?"uni-pagination--disabled":"uni-pagination--enabled"]),"hover-class":1===k.currentIndex?"":"uni-pagination--hover","hover-start-time":20,"hover-stay-time":70,onClick:v.clickLeft},{default:i((()=>[!0===_.showIcon||"true"===_.showIcon?(a(),n(S,{key:0,color:"#666",size:"16",type:"left"})):(a(),n(I,{key:1,class:"uni-pagination__child-btn"},{default:i((()=>[r(l(v.prevPageText),1)])),_:1}))])),_:1},8,["class","hover-class","onClick"]),s(w,{class:"uni-pagination__num uni-pagination__num-flex-none"},{default:i((()=>[s(w,{class:"uni-pagination__num-current"},{default:i((()=>[s(I,{class:"uni-pagination__num-current-text is-pc-hide current-index-text"},{default:i((()=>[r(l(k.currentIndex),1)])),_:1}),s(I,{class:"uni-pagination__num-current-text is-pc-hide"},{default:i((()=>[r("/"+l(v.maxPage||0),1)])),_:1}),(a(!0),u(g,null,p(v.paper,((e,t)=>(a(),n(w,{key:t,class:c([{"page--active":e===k.currentIndex},"uni-pagination__num-tag tag--active is-phone-hide"]),onClick:a=>v.selectPage(e,t)},{default:i((()=>[s(I,null,{default:i((()=>[r(l(e),1)])),_:2},1024)])),_:2},1032,["class","onClick"])))),128))])),_:1})])),_:1}),s(w,{class:c(["uni-pagination__btn",k.currentIndex>=v.maxPage?"uni-pagination--disabled":"uni-pagination--enabled"]),"hover-class":k.currentIndex===v.maxPage?"":"uni-pagination--hover","hover-start-time":20,"hover-stay-time":70,onClick:v.clickRight},{default:i((()=>[!0===_.showIcon||"true"===_.showIcon?(a(),n(S,{key:0,color:"#666",size:"16",type:"right"})):(a(),n(I,{key:1,class:"uni-pagination__child-btn"},{default:i((()=>[r(l(v.nextPageText),1)])),_:1}))])),_:1},8,["class","hover-class","onClick"])])),_:1})}],["__scopeId","data-v-bd0b20fd"]]);const L=P({components:{Header:z,Footer:w},data:()=>({keyword:"",title:"",list:[],page:1,page_size:20,total:0,loading:!1,category_id:"",category:[{value:"",text:"全部"}]}),onLoad(e){this.keyword=decodeURIComponent(e.keyword),this.title=JSON.parse(JSON.stringify(this.keyword)),this.category_id=parseInt(e.category_id)||"",this.getClass(),this.getList()},computed:{config(){return this.$store.state.config}},methods:{searchBtn(){this.page=1,this.getList()},gpDetail(e){m({url:"/pages/index/detail?id="+e})},getList(){this.loading=!0,_({url:uni.baseURL+"api/search",data:{page_no:this.page,page_size:this.page_size,title:this.keyword,category_id:this.category_id},success:e=>{this.total=e.data.data.total_result||0,this.list=e.data.data.items||[],this.title=JSON.parse(JSON.stringify(this.keyword))},complete:()=>{this.loading=!1}})},change(e){window.scrollTo({top:0,left:0,behavior:"smooth"}),this.page=e.current,this.getList()},getClass(){let e=[{value:"",text:"全部"}];_({url:uni.baseURL+"api/search/getCategory",success:t=>{let a=t.data.data||[];for(let n of a)e.push({value:n.source_category_id,text:n.name});this.category=e}})}}},[["render",function(e,h,x,m,_,P){const b=y("Header"),z=I,w=d,N=f,V=C(t("uni-data-select"),T),L=S,R=C(t("uni-pagination"),B),U=y("Footer");return a(),n(N,{class:"view"},{default:i((()=>[s(b),s(N,{class:"homeBox"},{default:i((()=>[s(N,{class:"logoBox"},{default:i((()=>[s(z,{class:"logo",src:P.config?P.config.logo:""},null,8,["src"]),s(w,{class:"title"},{default:i((()=>[r(l(P.config?P.config.app_name:""),1)])),_:1})])),_:1}),s(N,{class:"subTitle"},{default:i((()=>[r(l(P.config?P.config.app_description:""),1)])),_:1}),s(N,{class:c(["search",_.category.length>2?"":"noSelect"])},{default:i((()=>[s(V,{class:"selectBox",modelValue:_.category_id,"onUpdate:modelValue":h[0]||(h[0]=e=>_.category_id=e),localdata:_.category,clear:!1,onChange:P.searchBtn},null,8,["modelValue","localdata","onChange"]),k("i",{class:"iconfont icon-sousuo",onClick:h[1]||(h[1]=(...e)=>P.searchBtn&&P.searchBtn(...e))}),s(L,{type:"text",modelValue:_.keyword,"onUpdate:modelValue":h[2]||(h[2]=e=>_.keyword=e),placeholder:"输入关键字进行搜索",onKeyup:v(P.searchBtn,["enter"]),"confirm-type":"search",onConfirm:P.searchBtn},null,8,["modelValue","onKeyup","onConfirm"])])),_:1},8,["class"]),s(N,{class:"content"},{default:i((()=>[s(N,{class:"p"},{default:i((()=>[r("为您提供"),k("span",null,l(_.title),1),r("搜索结果"),k("span",null,l(_.total),1),r("条")])),_:1}),s(N,{class:"list"},{default:i((()=>[_.loading?(a(),n(N,{key:0,class:"loading"},{default:i((()=>[r("正在努力加载中...")])),_:1})):o("",!0),(a(!0),u(g,null,p(_.list,((e,t)=>(a(),n(N,{class:"item",key:t,onClick:t=>P.gpDetail(e.id)},{default:i((()=>[s(N,{class:"name"},{default:i((()=>[r(l(e.title),1)])),_:2},1024),s(N,{class:"numbox"},{default:i((()=>[s(N,{class:"ke"},{default:i((()=>[r("夸克网盘")])),_:1}),s(N,{class:"num"},{default:i((()=>[r(l(e.times),1)])),_:2},1024),e.category&&e.category.name?(a(),n(N,{key:0,class:"cate"},{default:i((()=>[r(l(e.category.name),1)])),_:2},1024)):o("",!0)])),_:2},1024)])),_:2},1032,["onClick"])))),128)),_.loading||0!=_.list.length?o("",!0):(a(),n(N,{key:1,class:"nodata"},{default:i((()=>[s(N,null,{default:i((()=>[r("未找到或不是短剧?请加入微信群获得更多资源")])),_:1}),s(z,{src:P.config.qcode,mode:"aspectFit"},null,8,["src"])])),_:1}))])),_:1}),s(R,{onChange:P.change,modelValue:_.page,"onUpdate:modelValue":h[3]||(h[3]=e=>_.page=e),total:_.total,pageSize:_.page_size},null,8,["onChange","modelValue","total","pageSize"])])),_:1})])),_:1}),s(U)])),_:1})}],["__scopeId","data-v-67b0fc48"]]);export{L as default}; diff --git a/public/assets/uni.4906e6f8.css b/public/assets/uni.4906e6f8.css deleted file mode 100644 index 4665767..0000000 --- a/public/assets/uni.4906e6f8.css +++ /dev/null @@ -1 +0,0 @@ -uni-button{position:relative;display:block;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;box-sizing:border-box;font-size:18px;text-align:center;text-decoration:none;line-height:2.55555556;border-radius:5px;-webkit-tap-highlight-color:transparent;overflow:hidden;color:#000;background-color:#f8f8f8;cursor:pointer}uni-button[hidden]{display:none!important}uni-button:after{content:" ";width:200%;height:200%;position:absolute;top:0;left:0;border:1px solid rgba(0,0,0,.2);transform:scale(.5);transform-origin:0 0;box-sizing:border-box;border-radius:10px}uni-button[native]{padding-left:0;padding-right:0}uni-button[native] .uni-button-cover-view-wrapper{border:inherit;border-color:inherit;border-radius:inherit;background-color:inherit}uni-button[native] .uni-button-cover-view-inner{padding-left:14px;padding-right:14px}uni-button uni-cover-view{line-height:inherit;white-space:inherit}uni-button[type=default]{color:#000;background-color:#f8f8f8}uni-button[type=primary]{color:#fff;background-color:#007aff}uni-button[type=warn]{color:#fff;background-color:#e64340}uni-button[disabled]{color:rgba(255,255,255,.6);cursor:not-allowed}uni-button[disabled][type=default],uni-button[disabled]:not([type]){color:rgba(0,0,0,.3);background-color:#f7f7f7}uni-button[disabled][type=primary]{background-color:rgba(0,122,255,.6)}uni-button[disabled][type=warn]{background-color:#ec8b89}uni-button[type=primary][plain]{color:#007aff;border:1px solid #007aff;background-color:transparent}uni-button[type=primary][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=primary][plain]:after{border-width:0}uni-button[type=default][plain]{color:#353535;border:1px solid #353535;background-color:transparent}uni-button[type=default][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=default][plain]:after{border-width:0}uni-button[plain]{color:#353535;border:1px solid #353535;background-color:transparent}uni-button[plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[plain]:after{border-width:0}uni-button[plain][native] .uni-button-cover-view-inner{padding:0}uni-button[type=warn][plain]{color:#e64340;border:1px solid #e64340;background-color:transparent}uni-button[type=warn][plain][disabled]{color:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2)}uni-button[type=warn][plain]:after{border-width:0}uni-button[size=mini]{display:inline-block;line-height:2.3;font-size:13px;padding:0 1.34em}uni-button[size=mini][native]{padding:0}uni-button[size=mini][native] .uni-button-cover-view-inner{padding:0 1.34em}uni-button[loading]:not([disabled]){cursor:progress}uni-button[loading]:before{content:" ";display:inline-block;width:18px;height:18px;vertical-align:middle;animation:uni-loading 1s steps(12,end) infinite;background-size:100%}uni-button[loading][type=primary]{color:rgba(255,255,255,.6);background-color:#0062cc}uni-button[loading][type=primary][plain]{color:#007aff;background-color:transparent}uni-button[loading][type=default]{color:rgba(0,0,0,.6);background-color:#dedede}uni-button[loading][type=default][plain]{color:#353535;background-color:transparent}uni-button[loading][type=warn]{color:rgba(255,255,255,.6);background-color:#ce3c39}uni-button[loading][type=warn][plain]{color:#e64340;background-color:transparent}uni-button[loading][native]:before{content:none}.button-hover{color:rgba(0,0,0,.6);background-color:#dedede}.button-hover[plain]{color:rgba(53,53,53,.6);border-color:rgba(53,53,53,.6);background-color:transparent}.button-hover[type=primary]{color:rgba(255,255,255,.6);background-color:#0062cc}.button-hover[type=primary][plain]{color:rgba(0,122,255,.6);border-color:rgba(0,122,255,.6);background-color:transparent}.button-hover[type=default]{color:rgba(0,0,0,.6);background-color:#dedede}.button-hover[type=default][plain]{color:rgba(53,53,53,.6);border-color:rgba(53,53,53,.6);background-color:transparent}.button-hover[type=warn]{color:rgba(255,255,255,.6);background-color:#ce3c39}.button-hover[type=warn][plain]{color:rgba(230,67,64,.6);border-color:rgba(230,67,64,.6);background-color:transparent}uni-image{width:320px;height:240px;display:inline-block;overflow:hidden;position:relative}uni-image[hidden]{display:none}uni-image>div{width:100%;height:100%;background-repeat:no-repeat}uni-image>img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;display:block;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}uni-image>.uni-image-will-change{will-change:transform}uni-input{display:block;font-size:16px;line-height:1.4em;height:1.4em;min-height:1.4em;overflow:hidden}uni-input[hidden]{display:none}.uni-input-wrapper,.uni-input-placeholder,.uni-input-form,.uni-input-input{outline:none;border:none;padding:0;margin:0;text-decoration:inherit}.uni-input-wrapper,.uni-input-form{display:flex;position:relative;width:100%;height:100%;flex-direction:column;justify-content:center}.uni-input-placeholder,.uni-input-input{width:100%}.uni-input-placeholder{position:absolute;top:auto!important;left:0;color:gray;overflow:hidden;text-overflow:clip;white-space:pre;word-break:keep-all;pointer-events:none;line-height:inherit}.uni-input-input{position:relative;display:block;height:100%;background:none;color:inherit;opacity:1;font:inherit;line-height:inherit;letter-spacing:inherit;text-align:inherit;text-indent:inherit;text-transform:inherit;text-shadow:inherit}.uni-input-input[type=search]::-webkit-search-cancel-button,.uni-input-input[type=search]::-webkit-search-decoration{display:none}.uni-input-input::-webkit-outer-spin-button,.uni-input-input::-webkit-inner-spin-button{-webkit-appearance:none;appearance:none;margin:0}.uni-input-input[type=number]{-moz-appearance:textfield}.uni-input-input:disabled{-webkit-text-fill-color:currentcolor}uni-picker-view-column{flex:1;position:relative;height:100%;overflow:hidden}uni-picker-view-column[hidden]{display:none}.uni-picker-view-group{height:100%;overflow:hidden}.uni-picker-view-mask{transform:translateZ(0)}.uni-picker-view-indicator,.uni-picker-view-mask{position:absolute;left:0;width:100%;z-index:3;pointer-events:none}.uni-picker-view-mask{top:0;height:100%;margin:0 auto;background-image:linear-gradient(180deg,rgba(255,255,255,.95),rgba(255,255,255,.6)),linear-gradient(0deg,rgba(255,255,255,.95),rgba(255,255,255,.6));background-position:top,bottom;background-size:100% 102px;background-repeat:no-repeat;transform:translateZ(0)}.uni-picker-view-indicator{height:34px;top:50%;transform:translateY(-50%)}.uni-picker-view-content{position:absolute;top:0;left:0;width:100%;will-change:transform;padding:102px 0;cursor:pointer}.uni-picker-view-content>*{height:var(--picker-view-column-indicator-height);overflow:hidden}.uni-picker-view-indicator:before{top:0;border-top:1px solid #e5e5e5;transform-origin:0 0;transform:scaleY(.5)}.uni-picker-view-indicator:after{bottom:0;border-bottom:1px solid #e5e5e5;transform-origin:0 100%;transform:scaleY(.5)}.uni-picker-view-indicator:after,.uni-picker-view-indicator:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}uni-picker-view{display:block}.uni-picker-view-wrapper{display:flex;position:relative;overflow:hidden;height:100%}uni-picker-view[hidden]{display:none}.uni-scroll-view-refresher{position:relative;overflow:hidden;flex-shrink:0}.uni-scroll-view-refresher-container{position:absolute;width:100%;bottom:0;display:flex;flex-direction:column-reverse}.uni-scroll-view-refresh{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:row;justify-content:center;align-items:center}.uni-scroll-view-refresh-inner{display:flex;align-items:center;justify-content:center;line-height:0;width:40px;height:40px;border-radius:50%;background-color:#fff;box-shadow:0 1px 6px rgba(0,0,0,.118),0 1px 4px rgba(0,0,0,.118)}.uni-scroll-view-refresh__spinner{transform-origin:center center;animation:uni-scroll-view-refresh-rotate 2s linear infinite}.uni-scroll-view-refresh__spinner>circle{stroke:currentColor;stroke-linecap:round;animation:uni-scroll-view-refresh-dash 2s linear infinite}@keyframes uni-scroll-view-refresh-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes uni-scroll-view-refresh-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes once-show{0%{top:0}}uni-resize-sensor,uni-resize-sensor>div{position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden}uni-resize-sensor{display:block;z-index:-1;visibility:hidden;animation:once-show 1ms}uni-resize-sensor>div>div{position:absolute;left:0;top:0}uni-resize-sensor>div:first-child>div{width:100000px;height:100000px}uni-resize-sensor>div:last-child>div{width:200%;height:200%}uni-scroll-view{display:block;width:100%}uni-scroll-view[hidden]{display:none}.uni-scroll-view{position:relative;-webkit-overflow-scrolling:touch;width:100%;height:100%;max-height:inherit}.uni-scroll-view-scrollbar-hidden::-webkit-scrollbar{display:none}.uni-scroll-view-scrollbar-hidden{-moz-scrollbars:none;scrollbar-width:none}.uni-scroll-view-content{width:100%;height:100%}uni-text[selectable]{cursor:auto;-webkit-user-select:text;user-select:text}uni-text{white-space:pre-line}uni-textarea{width:300px;height:150px;display:block;position:relative;font-size:16px;line-height:normal;white-space:pre-wrap;word-break:break-all}uni-textarea[hidden]{display:none}.uni-textarea-wrapper,.uni-textarea-placeholder,.uni-textarea-line,.uni-textarea-compute,.uni-textarea-textarea{outline:none;border:none;padding:0;margin:0;text-decoration:inherit}.uni-textarea-wrapper{display:block;position:relative;width:100%;height:100%;min-height:inherit;overflow-y:hidden}.uni-textarea-placeholder,.uni-textarea-line,.uni-textarea-compute,.uni-textarea-textarea{position:absolute;width:100%;height:100%;left:0;top:0;white-space:inherit;word-break:inherit}.uni-textarea-placeholder{color:gray;overflow:hidden}.uni-textarea-line,.uni-textarea-compute{visibility:hidden;height:auto}.uni-textarea-line{width:1em}.uni-textarea-textarea{resize:none;background:none;color:inherit;opacity:1;font:inherit;line-height:inherit;letter-spacing:inherit;text-align:inherit;text-indent:inherit;text-transform:inherit;text-shadow:inherit}.uni-textarea-textarea-fix-margin{width:auto;right:0;margin:0 -3px}.uni-textarea-textarea:disabled{-webkit-text-fill-color:currentcolor}uni-view{display:block}uni-view[hidden]{display:none}uni-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:999;display:block;box-sizing:border-box}.uni-modal{position:fixed;z-index:999;width:80%;max-width:300px;top:50%;left:50%;transform:translate(-50%,-50%);background-color:#fff;text-align:center;border-radius:3px;overflow:hidden}.uni-modal *{box-sizing:border-box}.uni-modal__hd{padding:1em 1.6em .3em}.uni-modal__title{font-weight:400;font-size:18px;word-wrap:break-word;word-break:break-all;white-space:pre-wrap;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.uni-modal__bd{padding:1.3em 1.6em;min-height:40px;font-size:15px;line-height:1.4;word-wrap:break-word;word-break:break-all;white-space:pre-wrap;color:#999;max-height:400px;overflow-x:hidden;overflow-y:auto}.uni-modal__textarea{resize:none;border:0;margin:0;width:90%;padding:10px;font-size:20px;outline:none;border:none;background-color:#eee;text-decoration:inherit}.uni-modal__ft{position:relative;line-height:48px;font-size:18px;display:flex}.uni-modal__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1px solid #d5d5d6;color:#d5d5d6;transform-origin:0 0;transform:scaleY(.5)}.uni-modal__btn{display:block;flex:1;color:#3cc51f;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative;cursor:pointer}.uni-modal__btn:active{background-color:#eee}.uni-modal__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1px solid #d5d5d6;color:#d5d5d6;transform-origin:0 0;transform:scaleX(.5)}.uni-modal__btn:first-child:after{display:none}.uni-modal__btn_default{color:#353535}.uni-modal__btn_primary{color:#007aff}uni-toast{position:fixed;top:0;right:0;bottom:0;left:0;z-index:999;display:block;box-sizing:border-box;pointer-events:none;font-size:16px}.uni-sample-toast{position:fixed;z-index:999;top:50%;left:50%;transform:translate(-50%,-50%);text-align:center;max-width:80%}.uni-simple-toast__text{display:inline-block;vertical-align:middle;color:#fff;background-color:rgba(17,17,17,.7);padding:10px 20px;border-radius:5px;font-size:13px;text-align:center;max-width:100%;word-break:break-all;white-space:normal}uni-toast .uni-mask{pointer-events:auto}.uni-toast{position:fixed;z-index:999;width:8em;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(17,17,17,.7);text-align:center;border-radius:5px;color:#fff}.uni-toast *{box-sizing:border-box}.uni-toast__icon{margin:20px 0 0;width:38px!important;height:38px!important;vertical-align:baseline!important}.uni-icon_toast{margin:15px 0 0}.uni-icon_toast.uni-icon-success-no-circle:before{color:#fff;font-size:55px}.uni-icon_toast.uni-loading{margin:20px 0 0;width:38px;height:38px;vertical-align:baseline}.uni-toast__content{margin:0 0 15px}uni-picker{position:relative;display:block;cursor:pointer}uni-picker[hidden]{display:none}uni-picker[disabled]{cursor:not-allowed}.uni-picker-container{display:none;position:fixed;left:0;right:0;top:0;bottom:0;box-sizing:border-box;z-index:999;font-size:16px}.uni-picker-container .uni-picker-custom *{box-sizing:border-box}.uni-picker-container .uni-picker-custom{position:fixed;left:0;bottom:0;transform:translateY(100%);backface-visibility:hidden;z-index:999;width:100%;background-color:#fff;visibility:hidden;transition:transform .3s,visibility .3s}.uni-picker-container .uni-picker-custom.uni-picker-toggle{visibility:visible;transform:translate(0)}.uni-picker-container .uni-picker-content{position:relative;display:block;width:100%;height:238px;background-color:#fff}.uni-picker-container .uni-picker-item{padding:0;height:34px;line-height:34px;text-align:center;color:#000;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;cursor:pointer}.uni-picker-container .uni-picker-header{display:block;position:relative;text-align:center;width:100%;height:45px}.uni-picker-container .uni-picker-header:after{content:"";position:absolute;left:0;bottom:0;right:0;height:1px;clear:both;border-bottom:1px solid #e5e5e5;color:#e5e5e5;transform-origin:0 100%;transform:scaleY(.5)}.uni-picker-container .uni-picker-action{display:block;max-width:50%;top:0;height:100%;box-sizing:border-box;padding:0 14px;font-size:17px;line-height:45px;overflow:hidden;cursor:pointer}.uni-picker-container .uni-picker-action.uni-picker-action-cancel{float:left;color:#888}.uni-picker-container .uni-picker-action.uni-picker-action-confirm{float:right;color:#007aff}.uni-picker-container .uni-picker-select{display:none}.uni-picker-system{position:absolute;display:none;display:block;top:0;left:0;width:100%;height:100%;overflow:hidden}.uni-picker-system>.uni-picker-system_input{position:absolute;border:none;height:100%;opacity:0;cursor:pointer}.uni-picker-system>.uni-picker-system_input.firefox{top:0;left:0;width:100%}.uni-picker-system>.uni-picker-system_input.chrome{top:0;left:0;width:2em;font-size:32px;height:32px}@media screen and (min-width: 500px) and (min-height: 500px){.uni-mask.uni-picker-mask{background:none}.uni-picker-container .uni-picker-custom{width:300px;left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);opacity:0;border-radius:5px;transition:opacity .3s,visibility .3s;box-shadow:0 0 20px 5px rgba(0,0,0,.3)}.uni-picker-container .uni-picker-header{border-radius:5px 5px 0 0}.uni-picker-container .uni-picker-content{transform:translate(0 0);overflow:hidden;border-radius:0 0 5px 5px}.uni-picker-container .uni-picker-custom.uni-picker-toggle{opacity:1;transform:translate(-50%,-50%)}.uni-selector-select .uni-picker-header,.uni-selector-select .uni-picker-content{display:none}.uni-selector-select .uni-picker-select{display:block;max-height:300px;overflow:auto;background-color:#fff;border-radius:5px;padding:6px 0}.uni-selector-select .uni-picker-item{padding:0 10px;color:#555}.uni-selector-select .uni-picker-item:hover{background-color:#f6f6f6}.uni-selector-select .uni-picker-item.selected{color:#007aff}} diff --git a/public/assets/uniicons-DN59BOw4.ttf b/public/assets/uniicons-DN59BOw4.ttf deleted file mode 100644 index 14696d0..0000000 Binary files a/public/assets/uniicons-DN59BOw4.ttf and /dev/null differ diff --git a/public/index.php b/public/index.php deleted file mode 100644 index e3c0fe9..0000000 --- a/public/index.php +++ /dev/null @@ -1,24 +0,0 @@ - -// +---------------------------------------------------------------------- - -// [ 应用入口文件 ] -namespace think; - -require __DIR__ . '/../vendor/autoload.php'; - -// 执行HTTP应用并响应 -$http = (new App())->http; - -$response = $http->run(); - -$response->send(); - -$http->end($response); diff --git a/public/nginx.htaccess b/public/nginx.htaccess deleted file mode 100644 index 89c0c28..0000000 --- a/public/nginx.htaccess +++ /dev/null @@ -1,8 +0,0 @@ -location ~* (runtime|application)/{ - return 403; -} -location / { - if (!-e $request_filename){ - rewrite ^(.*)$ /index.php?s=$1 last; break; - } -} \ No newline at end of file diff --git a/public/router.php b/public/router.php deleted file mode 100644 index 9b39a62..0000000 --- a/public/router.php +++ /dev/null @@ -1,19 +0,0 @@ - -// +---------------------------------------------------------------------- -// $Id$ - -if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) { - return false; -} else { - $_SERVER["SCRIPT_FILENAME"] = __DIR__ . '/index.php'; - - require __DIR__ . "/index.php"; -} diff --git a/public/static/admin/UEditor/config.json b/public/static/admin/UEditor/config.json deleted file mode 100644 index dd5bc17..0000000 --- a/public/static/admin/UEditor/config.json +++ /dev/null @@ -1,94 +0,0 @@ -/* 前后端通信相关的配置,注释只允许使用多行方式 */ -{ - /* 上传图片配置项 */ - "imageActionName": "uploadimage", /* 执行上传图片的action名称 */ - "imageFieldName": "upfile", /* 提交的图片表单名称 */ - "imageMaxSize": 2048000, /* 上传大小限制,单位B */ - "imageAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 上传图片格式显示 */ - "imageCompressEnable": true, /* 是否压缩图片,默认是true */ - "imageCompressBorder": 1600, /* 图片压缩最长边限制 */ - "imageInsertAlign": "none", /* 插入的图片浮动方式 */ - "imageUrlPrefix": "", /* 图片访问路径前缀 */ - "imagePathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ - /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */ - /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */ - /* {time} 会替换成时间戳 */ - /* {yyyy} 会替换成四位年份 */ - /* {yy} 会替换成两位年份 */ - /* {mm} 会替换成两位月份 */ - /* {dd} 会替换成两位日期 */ - /* {hh} 会替换成两位小时 */ - /* {ii} 会替换成两位分钟 */ - /* {ss} 会替换成两位秒 */ - /* 非法字符 \ : * ? " < > | */ - /* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */ - - /* 涂鸦图片上传配置项 */ - "scrawlActionName": "uploadscrawl", /* 执行上传涂鸦的action名称 */ - "scrawlFieldName": "upfile", /* 提交的图片表单名称 */ - "scrawlPathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ - "scrawlMaxSize": 2048000, /* 上传大小限制,单位B */ - "scrawlUrlPrefix": "", /* 图片访问路径前缀 */ - "scrawlInsertAlign": "none", - - /* 截图工具上传 */ - "snapscreenActionName": "uploadimage", /* 执行上传截图的action名称 */ - "snapscreenPathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ - "snapscreenUrlPrefix": "", /* 图片访问路径前缀 */ - "snapscreenInsertAlign": "none", /* 插入的图片浮动方式 */ - - /* 抓取远程图片配置 */ - "catcherLocalDomain": ["127.0.0.1", "localhost", "img.baidu.com"], - "catcherActionName": "catchimage", /* 执行抓取远程图片的action名称 */ - "catcherFieldName": "source", /* 提交的图片列表表单名称 */ - "catcherPathFormat": "/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ - "catcherUrlPrefix": "", /* 图片访问路径前缀 */ - "catcherMaxSize": 2048000, /* 上传大小限制,单位B */ - "catcherAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 抓取图片格式显示 */ - - /* 上传视频配置 */ - "videoActionName": "uploadvideo", /* 执行上传视频的action名称 */ - "videoFieldName": "upfile", /* 提交的视频表单名称 */ - "videoPathFormat": "/ueditor/php/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ - "videoUrlPrefix": "", /* 视频访问路径前缀 */ - "videoMaxSize": 102400000, /* 上传大小限制,单位B,默认100MB */ - "videoAllowFiles": [ - ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", - ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* 上传视频格式显示 */ - - /* 上传文件配置 */ - "fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */ - "fileFieldName": "upfile", /* 提交的文件表单名称 */ - "filePathFormat": "/ueditor/php/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */ - "fileUrlPrefix": "", /* 文件访问路径前缀 */ - "fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */ - "fileAllowFiles": [ - ".png", ".jpg", ".jpeg", ".gif", ".bmp", - ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", - ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", - ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", - ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" - ], /* 上传文件格式显示 */ - - /* 列出指定目录下的图片 */ - "imageManagerActionName": "listimage", /* 执行图片管理的action名称 */ - "imageManagerListPath": "/ueditor/php/upload/image/", /* 指定要列出图片的目录 */ - "imageManagerListSize": 20, /* 每次列出文件数量 */ - "imageManagerUrlPrefix": "", /* 图片访问路径前缀 */ - "imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */ - "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */ - - /* 列出指定目录下的文件 */ - "fileManagerActionName": "listfile", /* 执行文件管理的action名称 */ - "fileManagerListPath": "/ueditor/php/upload/file/", /* 指定要列出文件的目录 */ - "fileManagerUrlPrefix": "", /* 文件访问路径前缀 */ - "fileManagerListSize": 20, /* 每次列出文件数量 */ - "fileManagerAllowFiles": [ - ".png", ".jpg", ".jpeg", ".gif", ".bmp", - ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", - ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", - ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", - ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" - ] /* 列出的文件类型 */ - -} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/anchor/anchor.html b/public/static/admin/UEditor/dialogs/anchor/anchor.html deleted file mode 100644 index f277847..0000000 --- a/public/static/admin/UEditor/dialogs/anchor/anchor.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - -
- -
- - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/attachment/attachment.css b/public/static/admin/UEditor/dialogs/attachment/attachment.css deleted file mode 100644 index 548b428..0000000 --- a/public/static/admin/UEditor/dialogs/attachment/attachment.css +++ /dev/null @@ -1,681 +0,0 @@ -@charset "utf-8"; -/* dialog样式 */ -.wrapper { - zoom: 1; - width: 630px; - *width: 626px; - height: 380px; - margin: 0 auto; - padding: 10px; - position: relative; - font-family: sans-serif; -} - -/*tab样式框大小*/ -.tabhead { - float:left; -} -.tabbody { - width: 100%; - height: 346px; - position: relative; - clear: both; -} - -.tabbody .panel { - position: absolute; - width: 0; - height: 0; - background: #fff; - overflow: hidden; - display: none; -} - -.tabbody .panel.focus { - width: 100%; - height: 346px; - display: block; -} - -/* 上传附件 */ -.tabbody #upload.panel { - width: 0; - height: 0; - overflow: hidden; - position: absolute !important; - clip: rect(1px, 1px, 1px, 1px); - background: #fff; - display: block; -} - -.tabbody #upload.panel.focus { - width: 100%; - height: 346px; - display: block; - clip: auto; -} - -#upload .queueList { - margin: 0; - width: 100%; - height: 100%; - position: absolute; - overflow: hidden; -} - -#upload p { - margin: 0; -} - -.element-invisible { - width: 0 !important; - height: 0 !important; - border: 0; - padding: 0; - margin: 0; - overflow: hidden; - position: absolute !important; - clip: rect(1px, 1px, 1px, 1px); -} - -#upload .placeholder { - margin: 10px; - border: 2px dashed #e6e6e6; - *border: 0px dashed #e6e6e6; - height: 172px; - padding-top: 150px; - text-align: center; - background: url(./images/image.png) center 70px no-repeat; - color: #cccccc; - font-size: 18px; - position: relative; - top:0; - *top: 10px; -} - -#upload .placeholder .webuploader-pick { - font-size: 18px; - background: #00b7ee; - border-radius: 3px; - line-height: 44px; - padding: 0 30px; - *width: 120px; - color: #fff; - display: inline-block; - margin: 0 auto 20px auto; - cursor: pointer; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); -} - -#upload .placeholder .webuploader-pick-hover { - background: #00a2d4; -} - - -#filePickerContainer { - text-align: center; -} - -#upload .placeholder .flashTip { - color: #666666; - font-size: 12px; - position: absolute; - width: 100%; - text-align: center; - bottom: 20px; -} - -#upload .placeholder .flashTip a { - color: #0785d1; - text-decoration: none; -} - -#upload .placeholder .flashTip a:hover { - text-decoration: underline; -} - -#upload .placeholder.webuploader-dnd-over { - border-color: #999999; -} - -#upload .filelist { - list-style: none; - margin: 0; - padding: 0; - overflow-x: hidden; - overflow-y: auto; - position: relative; - height: 300px; -} - -#upload .filelist:after { - content: ''; - display: block; - width: 0; - height: 0; - overflow: hidden; - clear: both; -} - -#upload .filelist li { - width: 113px; - height: 113px; - background: url(./images/bg.png); - text-align: center; - margin: 9px 0 0 9px; - *margin: 6px 0 0 6px; - position: relative; - display: block; - float: left; - overflow: hidden; - font-size: 12px; -} - -#upload .filelist li p.log { - position: relative; - top: -45px; -} - -#upload .filelist li p.title { - position: absolute; - top: 0; - left: 0; - width: 100%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - top: 5px; - text-indent: 5px; - text-align: left; -} - -#upload .filelist li p.progress { - position: absolute; - width: 100%; - bottom: 0; - left: 0; - height: 8px; - overflow: hidden; - z-index: 50; - margin: 0; - border-radius: 0; - background: none; - -webkit-box-shadow: 0 0 0; -} - -#upload .filelist li p.progress span { - display: none; - overflow: hidden; - width: 0; - height: 100%; - background: #1483d8 url(./images/progress.png) repeat-x; - - -webit-transition: width 200ms linear; - -moz-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; - transition: width 200ms linear; - - -webkit-animation: progressmove 2s linear infinite; - -moz-animation: progressmove 2s linear infinite; - -o-animation: progressmove 2s linear infinite; - -ms-animation: progressmove 2s linear infinite; - animation: progressmove 2s linear infinite; - - -webkit-transform: translateZ(0); -} - -@-webkit-keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -@-moz-keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -@keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -#upload .filelist li p.imgWrap { - position: relative; - z-index: 2; - line-height: 113px; - vertical-align: middle; - overflow: hidden; - width: 113px; - height: 113px; - - -webkit-transform-origin: 50% 50%; - -moz-transform-origin: 50% 50%; - -o-transform-origin: 50% 50%; - -ms-transform-origin: 50% 50%; - transform-origin: 50% 50%; - - -webit-transition: 200ms ease-out; - -moz-transition: 200ms ease-out; - -o-transition: 200ms ease-out; - -ms-transition: 200ms ease-out; - transition: 200ms ease-out; -} -#upload .filelist li p.imgWrap.notimage { - margin-top: 0; - width: 111px; - height: 111px; - border: 1px #eeeeee solid; -} -#upload .filelist li p.imgWrap.notimage i.file-preview { - margin-top: 15px; -} - -#upload .filelist li img { - width: 100%; -} - -#upload .filelist li p.error { - background: #f43838; - color: #fff; - position: absolute; - bottom: 0; - left: 0; - height: 28px; - line-height: 28px; - width: 100%; - z-index: 100; - display:none; -} - -#upload .filelist li .success { - display: block; - position: absolute; - left: 0; - bottom: 0; - height: 40px; - width: 100%; - z-index: 200; - background: url(./images/success.png) no-repeat right bottom; - background-image: url(./images/success.gif) \9; -} - -#upload .filelist li.filePickerBlock { - width: 113px; - height: 113px; - background: url(./images/image.png) no-repeat center 12px; - border: 1px solid #eeeeee; - border-radius: 0; -} -#upload .filelist li.filePickerBlock div.webuploader-pick { - width: 100%; - height: 100%; - margin: 0; - padding: 0; - opacity: 0; - background: none; - font-size: 0; -} - -#upload .filelist div.file-panel { - position: absolute; - height: 0; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0; - background: rgba(0, 0, 0, 0.5); - width: 100%; - top: 0; - left: 0; - overflow: hidden; - z-index: 300; -} - -#upload .filelist div.file-panel span { - width: 24px; - height: 24px; - display: inline; - float: right; - text-indent: -9999px; - overflow: hidden; - background: url(./images/icons.png) no-repeat; - background: url(./images/icons.gif) no-repeat \9; - margin: 5px 1px 1px; - cursor: pointer; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -#upload .filelist div.file-panel span.rotateLeft { - display:none; - background-position: 0 -24px; -} - -#upload .filelist div.file-panel span.rotateLeft:hover { - background-position: 0 0; -} - -#upload .filelist div.file-panel span.rotateRight { - display:none; - background-position: -24px -24px; -} - -#upload .filelist div.file-panel span.rotateRight:hover { - background-position: -24px 0; -} - -#upload .filelist div.file-panel span.cancel { - background-position: -48px -24px; -} - -#upload .filelist div.file-panel span.cancel:hover { - background-position: -48px 0; -} - -#upload .statusBar { - height: 45px; - border-bottom: 1px solid #dadada; - margin: 0 10px; - padding: 0; - line-height: 45px; - vertical-align: middle; - position: relative; -} - -#upload .statusBar .progress { - border: 1px solid #1483d8; - width: 198px; - background: #fff; - height: 18px; - position: absolute; - top: 12px; - display: none; - text-align: center; - line-height: 18px; - color: #6dbfff; - margin: 0 10px 0 0; -} -#upload .statusBar .progress span.percentage { - width: 0; - height: 100%; - left: 0; - top: 0; - background: #1483d8; - position: absolute; -} -#upload .statusBar .progress span.text { - position: relative; - z-index: 10; -} - -#upload .statusBar .info { - display: inline-block; - font-size: 14px; - color: #666666; -} - -#upload .statusBar .btns { - position: absolute; - top: 7px; - right: 0; - line-height: 30px; -} - -#filePickerBtn { - display: inline-block; - float: left; -} -#upload .statusBar .btns .webuploader-pick, -#upload .statusBar .btns .uploadBtn, -#upload .statusBar .btns .uploadBtn.state-uploading, -#upload .statusBar .btns .uploadBtn.state-paused { - background: #ffffff; - border: 1px solid #cfcfcf; - color: #565656; - padding: 0 18px; - display: inline-block; - border-radius: 3px; - margin-left: 10px; - cursor: pointer; - font-size: 14px; - float: left; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -#upload .statusBar .btns .webuploader-pick-hover, -#upload .statusBar .btns .uploadBtn:hover, -#upload .statusBar .btns .uploadBtn.state-uploading:hover, -#upload .statusBar .btns .uploadBtn.state-paused:hover { - background: #f0f0f0; -} - -#upload .statusBar .btns .uploadBtn, -#upload .statusBar .btns .uploadBtn.state-paused{ - background: #00b7ee; - color: #fff; - border-color: transparent; -} -#upload .statusBar .btns .uploadBtn:hover, -#upload .statusBar .btns .uploadBtn.state-paused:hover{ - background: #00a2d4; -} - -#upload .statusBar .btns .uploadBtn.disabled { - pointer-events: none; - filter:alpha(opacity=60); - -moz-opacity:0.6; - -khtml-opacity: 0.6; - opacity: 0.6; -} - - - -/* 图片管理样式 */ -#online { - width: 100%; - height: 336px; - padding: 10px 0 0 0; -} -#online #fileList{ - width: 100%; - height: 100%; - overflow-x: hidden; - overflow-y: auto; - position: relative; -} -#online ul { - display: block; - list-style: none; - margin: 0; - padding: 0; -} -#online li { - float: left; - display: block; - list-style: none; - padding: 0; - width: 113px; - height: 113px; - margin: 0 0 9px 9px; - *margin: 0 0 6px 6px; - background-color: #eee; - overflow: hidden; - cursor: pointer; - position: relative; -} -#online li.clearFloat { - float: none; - clear: both; - display: block; - width:0; - height:0; - margin: 0; - padding: 0; -} -#online li img { - cursor: pointer; -} -#online li div.file-wrapper { - cursor: pointer; - position: absolute; - display: block; - width: 111px; - height: 111px; - border: 1px solid #eee; - background: url("./images/bg.png") repeat; -} -#online li div span.file-title{ - display: block; - padding: 0 3px; - margin: 3px 0 0 0; - font-size: 12px; - height: 13px; - color: #555555; - text-align: center; - width: 107px; - white-space: nowrap; - word-break: break-all; - overflow: hidden; - text-overflow: ellipsis; -} -#online li .icon { - cursor: pointer; - width: 113px; - height: 113px; - position: absolute; - top: 0; - left: 0; - z-index: 2; - border: 0; - background-repeat: no-repeat; -} -#online li .icon:hover { - width: 107px; - height: 107px; - border: 3px solid #1094fa; -} -#online li.selected .icon { - background-image: url(images/success.png); - background-image: url(images/success.gif) \9; - background-position: 75px 75px; -} -#online li.selected .icon:hover { - width: 107px; - height: 107px; - border: 3px solid #1094fa; - background-position: 72px 72px; -} - - -/* 在线文件的文件预览图标 */ -i.file-preview { - display: block; - margin: 10px auto; - width: 70px; - height: 70px; - background-image: url("./images/file-icons.png"); - background-image: url("./images/file-icons.gif") \9; - background-position: -140px center; - background-repeat: no-repeat; -} -i.file-preview.file-type-dir{ - background-position: 0 center; -} -i.file-preview.file-type-file{ - background-position: -140px center; -} -i.file-preview.file-type-filelist{ - background-position: -210px center; -} -i.file-preview.file-type-zip, -i.file-preview.file-type-rar, -i.file-preview.file-type-7z, -i.file-preview.file-type-tar, -i.file-preview.file-type-gz, -i.file-preview.file-type-bz2{ - background-position: -280px center; -} -i.file-preview.file-type-xls, -i.file-preview.file-type-xlsx{ - background-position: -350px center; -} -i.file-preview.file-type-doc, -i.file-preview.file-type-docx{ - background-position: -420px center; -} -i.file-preview.file-type-ppt, -i.file-preview.file-type-pptx{ - background-position: -490px center; -} -i.file-preview.file-type-vsd{ - background-position: -560px center; -} -i.file-preview.file-type-pdf{ - background-position: -630px center; -} -i.file-preview.file-type-txt, -i.file-preview.file-type-md, -i.file-preview.file-type-json, -i.file-preview.file-type-htm, -i.file-preview.file-type-xml, -i.file-preview.file-type-html, -i.file-preview.file-type-js, -i.file-preview.file-type-css, -i.file-preview.file-type-php, -i.file-preview.file-type-jsp, -i.file-preview.file-type-asp{ - background-position: -700px center; -} -i.file-preview.file-type-apk{ - background-position: -770px center; -} -i.file-preview.file-type-exe{ - background-position: -840px center; -} -i.file-preview.file-type-ipa{ - background-position: -910px center; -} -i.file-preview.file-type-mp4, -i.file-preview.file-type-swf, -i.file-preview.file-type-mkv, -i.file-preview.file-type-avi, -i.file-preview.file-type-flv, -i.file-preview.file-type-mov, -i.file-preview.file-type-mpg, -i.file-preview.file-type-mpeg, -i.file-preview.file-type-ogv, -i.file-preview.file-type-webm, -i.file-preview.file-type-rm, -i.file-preview.file-type-rmvb{ - background-position: -980px center; -} -i.file-preview.file-type-ogg, -i.file-preview.file-type-wav, -i.file-preview.file-type-wmv, -i.file-preview.file-type-mid, -i.file-preview.file-type-mp3{ - background-position: -1050px center; -} -i.file-preview.file-type-jpg, -i.file-preview.file-type-jpeg, -i.file-preview.file-type-gif, -i.file-preview.file-type-bmp, -i.file-preview.file-type-png, -i.file-preview.file-type-psd{ - background-position: -140px center; -} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/attachment/attachment.html b/public/static/admin/UEditor/dialogs/attachment/attachment.html deleted file mode 100644 index 2ae9282..0000000 --- a/public/static/admin/UEditor/dialogs/attachment/attachment.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - ueditor图片对话框 - - - - - - - - - - - - - - -
-
- - -
-
- -
-
-
-
- 0% - -
-
-
-
-
-
-
-
-
-
-
-
    -
  • -
-
-
- - -
-
-
- -
-
- - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/attachment/attachment.js b/public/static/admin/UEditor/dialogs/attachment/attachment.js deleted file mode 100644 index bb2557f..0000000 --- a/public/static/admin/UEditor/dialogs/attachment/attachment.js +++ /dev/null @@ -1,760 +0,0 @@ -/** - * User: Jinqn - * Date: 14-04-08 - * Time: 下午16:34 - * 上传图片对话框逻辑代码,包括tab: 远程图片/上传图片/在线图片/搜索图片 - */ - -(function () { - - var uploadFile, - onlineFile; - - window.onload = function () { - initTabs(); - initButtons(); - }; - - /* 初始化tab标签 */ - function initTabs() { - var tabs = $G('tabhead').children; - for (var i = 0; i < tabs.length; i++) { - domUtils.on(tabs[i], "click", function (e) { - var target = e.target || e.srcElement; - setTabFocus(target.getAttribute('data-content-id')); - }); - } - - setTabFocus('upload'); - } - - /* 初始化tabbody */ - function setTabFocus(id) { - if(!id) return; - var i, bodyId, tabs = $G('tabhead').children; - for (i = 0; i < tabs.length; i++) { - bodyId = tabs[i].getAttribute('data-content-id') - if (bodyId == id) { - domUtils.addClass(tabs[i], 'focus'); - domUtils.addClass($G(bodyId), 'focus'); - } else { - domUtils.removeClasses(tabs[i], 'focus'); - domUtils.removeClasses($G(bodyId), 'focus'); - } - } - switch (id) { - case 'upload': - uploadFile = uploadFile || new UploadFile('queueList'); - break; - case 'online': - onlineFile = onlineFile || new OnlineFile('fileList'); - break; - } - } - - /* 初始化onok事件 */ - function initButtons() { - - dialog.onok = function () { - var list = [], id, tabs = $G('tabhead').children; - for (var i = 0; i < tabs.length; i++) { - if (domUtils.hasClass(tabs[i], 'focus')) { - id = tabs[i].getAttribute('data-content-id'); - break; - } - } - - switch (id) { - case 'upload': - list = uploadFile.getInsertList(); - var count = uploadFile.getQueueCount(); - if (count) { - $('.info', '#queueList').html('' + '还有2个未上传文件'.replace(/[\d]/, count) + ''); - return false; - } - break; - case 'online': - list = onlineFile.getInsertList(); - break; - } - - editor.execCommand('insertfile', list); - }; - } - - - /* 上传附件 */ - function UploadFile(target) { - this.$wrap = target.constructor == String ? $('#' + target) : $(target); - this.init(); - } - UploadFile.prototype = { - init: function () { - this.fileList = []; - this.initContainer(); - this.initUploader(); - }, - initContainer: function () { - this.$queue = this.$wrap.find('.filelist'); - }, - /* 初始化容器 */ - initUploader: function () { - var _this = this, - $ = jQuery, // just in case. Make sure it's not an other libaray. - $wrap = _this.$wrap, - // 图片容器 - $queue = $wrap.find('.filelist'), - // 状态栏,包括进度和控制按钮 - $statusBar = $wrap.find('.statusBar'), - // 文件总体选择信息。 - $info = $statusBar.find('.info'), - // 上传按钮 - $upload = $wrap.find('.uploadBtn'), - // 上传按钮 - $filePickerBtn = $wrap.find('.filePickerBtn'), - // 上传按钮 - $filePickerBlock = $wrap.find('.filePickerBlock'), - // 没选择文件之前的内容。 - $placeHolder = $wrap.find('.placeholder'), - // 总体进度条 - $progress = $statusBar.find('.progress').hide(), - // 添加的文件数量 - fileCount = 0, - // 添加的文件总大小 - fileSize = 0, - // 优化retina, 在retina下这个值是2 - ratio = window.devicePixelRatio || 1, - // 缩略图大小 - thumbnailWidth = 113 * ratio, - thumbnailHeight = 113 * ratio, - // 可能有pedding, ready, uploading, confirm, done. - state = '', - // 所有文件的进度信息,key为file id - percentages = {}, - supportTransition = (function () { - var s = document.createElement('p').style, - r = 'transition' in s || - 'WebkitTransition' in s || - 'MozTransition' in s || - 'msTransition' in s || - 'OTransition' in s; - s = null; - return r; - })(), - // WebUploader实例 - uploader, - actionUrl = editor.getActionUrl(editor.getOpt('fileActionName')), - fileMaxSize = editor.getOpt('fileMaxSize'), - acceptExtensions = (editor.getOpt('fileAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');; - - if (!WebUploader.Uploader.support()) { - $('#filePickerReady').after($('
').html(lang.errorNotSupport)).hide(); - return; - } else if (!editor.getOpt('fileActionName')) { - $('#filePickerReady').after($('
').html(lang.errorLoadConfig)).hide(); - return; - } - - uploader = _this.uploader = WebUploader.create({ - pick: { - id: '#filePickerReady', - label: lang.uploadSelectFile - }, - swf: '../../third-party/webuploader/Uploader.swf', - server: actionUrl, - fileVal: editor.getOpt('fileFieldName'), - duplicate: true, - fileSingleSizeLimit: fileMaxSize, - compress: false - }); - uploader.addButton({ - id: '#filePickerBlock' - }); - uploader.addButton({ - id: '#filePickerBtn', - label: lang.uploadAddFile - }); - - setState('pedding'); - - // 当有文件添加进来时执行,负责view的创建 - function addFile(file) { - var $li = $('
  • ' + - '

    ' + file.name + '

    ' + - '

    ' + - '

    ' + - '
  • '), - - $btns = $('
    ' + - '' + lang.uploadDelete + '' + - '' + lang.uploadTurnRight + '' + - '' + lang.uploadTurnLeft + '
    ').appendTo($li), - $prgress = $li.find('p.progress span'), - $wrap = $li.find('p.imgWrap'), - $info = $('

    ').hide().appendTo($li), - - showError = function (code) { - switch (code) { - case 'exceed_size': - text = lang.errorExceedSize; - break; - case 'interrupt': - text = lang.errorInterrupt; - break; - case 'http': - text = lang.errorHttp; - break; - case 'not_allow_type': - text = lang.errorFileType; - break; - default: - text = lang.errorUploadRetry; - break; - } - $info.text(text).show(); - }; - - if (file.getStatus() === 'invalid') { - showError(file.statusText); - } else { - $wrap.text(lang.uploadPreview); - if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) { - $wrap.empty().addClass('notimage').append('' + - '' + file.name + ''); - } else { - if (browser.ie && browser.version <= 7) { - $wrap.text(lang.uploadNoPreview); - } else { - uploader.makeThumb(file, function (error, src) { - if (error || !src) { - $wrap.text(lang.uploadNoPreview); - } else { - var $img = $(''); - $wrap.empty().append($img); - $img.on('error', function () { - $wrap.text(lang.uploadNoPreview); - }); - } - }, thumbnailWidth, thumbnailHeight); - } - } - percentages[ file.id ] = [ file.size, 0 ]; - file.rotation = 0; - - /* 检查文件格式 */ - if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) { - showError('not_allow_type'); - uploader.removeFile(file); - } - } - - file.on('statuschange', function (cur, prev) { - if (prev === 'progress') { - $prgress.hide().width(0); - } else if (prev === 'queued') { - $li.off('mouseenter mouseleave'); - $btns.remove(); - } - // 成功 - if (cur === 'error' || cur === 'invalid') { - showError(file.statusText); - percentages[ file.id ][ 1 ] = 1; - } else if (cur === 'interrupt') { - showError('interrupt'); - } else if (cur === 'queued') { - percentages[ file.id ][ 1 ] = 0; - } else if (cur === 'progress') { - $info.hide(); - $prgress.css('display', 'block'); - } else if (cur === 'complete') { - } - - $li.removeClass('state-' + prev).addClass('state-' + cur); - }); - - $li.on('mouseenter', function () { - $btns.stop().animate({height: 30}); - }); - $li.on('mouseleave', function () { - $btns.stop().animate({height: 0}); - }); - - $btns.on('click', 'span', function () { - var index = $(this).index(), - deg; - - switch (index) { - case 0: - uploader.removeFile(file); - return; - case 1: - file.rotation += 90; - break; - case 2: - file.rotation -= 90; - break; - } - - if (supportTransition) { - deg = 'rotate(' + file.rotation + 'deg)'; - $wrap.css({ - '-webkit-transform': deg, - '-mos-transform': deg, - '-o-transform': deg, - 'transform': deg - }); - } else { - $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')'); - } - - }); - - $li.insertBefore($filePickerBlock); - } - - // 负责view的销毁 - function removeFile(file) { - var $li = $('#' + file.id); - delete percentages[ file.id ]; - updateTotalProgress(); - $li.off().find('.file-panel').off().end().remove(); - } - - function updateTotalProgress() { - var loaded = 0, - total = 0, - spans = $progress.children(), - percent; - - $.each(percentages, function (k, v) { - total += v[ 0 ]; - loaded += v[ 0 ] * v[ 1 ]; - }); - - percent = total ? loaded / total : 0; - - spans.eq(0).text(Math.round(percent * 100) + '%'); - spans.eq(1).css('width', Math.round(percent * 100) + '%'); - updateStatus(); - } - - function setState(val, files) { - - if (val != state) { - - var stats = uploader.getStats(); - - $upload.removeClass('state-' + state); - $upload.addClass('state-' + val); - - switch (val) { - - /* 未选择文件 */ - case 'pedding': - $queue.addClass('element-invisible'); - $statusBar.addClass('element-invisible'); - $placeHolder.removeClass('element-invisible'); - $progress.hide(); $info.hide(); - uploader.refresh(); - break; - - /* 可以开始上传 */ - case 'ready': - $placeHolder.addClass('element-invisible'); - $queue.removeClass('element-invisible'); - $statusBar.removeClass('element-invisible'); - $progress.hide(); $info.show(); - $upload.text(lang.uploadStart); - uploader.refresh(); - break; - - /* 上传中 */ - case 'uploading': - $progress.show(); $info.hide(); - $upload.text(lang.uploadPause); - break; - - /* 暂停上传 */ - case 'paused': - $progress.show(); $info.hide(); - $upload.text(lang.uploadContinue); - break; - - case 'confirm': - $progress.show(); $info.hide(); - $upload.text(lang.uploadStart); - - stats = uploader.getStats(); - if (stats.successNum && !stats.uploadFailNum) { - setState('finish'); - return; - } - break; - - case 'finish': - $progress.hide(); $info.show(); - if (stats.uploadFailNum) { - $upload.text(lang.uploadRetry); - } else { - $upload.text(lang.uploadStart); - } - break; - } - - state = val; - updateStatus(); - - } - - if (!_this.getQueueCount()) { - $upload.addClass('disabled') - } else { - $upload.removeClass('disabled') - } - - } - - function updateStatus() { - var text = '', stats; - - if (state === 'ready') { - text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)); - } else if (state === 'confirm') { - stats = uploader.getStats(); - if (stats.uploadFailNum) { - text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum); - } - } else { - stats = uploader.getStats(); - text = lang.updateStatusFinish.replace('_', fileCount). - replace('_KB', WebUploader.formatSize(fileSize)). - replace('_', stats.successNum); - - if (stats.uploadFailNum) { - text += lang.updateStatusError.replace('_', stats.uploadFailNum); - } - } - - $info.html(text); - } - - uploader.on('fileQueued', function (file) { - fileCount++; - fileSize += file.size; - - if (fileCount === 1) { - $placeHolder.addClass('element-invisible'); - $statusBar.show(); - } - - addFile(file); - }); - - uploader.on('fileDequeued', function (file) { - fileCount--; - fileSize -= file.size; - - removeFile(file); - updateTotalProgress(); - }); - - uploader.on('filesQueued', function (file) { - if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) { - setState('ready'); - } - updateTotalProgress(); - }); - - uploader.on('all', function (type, files) { - switch (type) { - case 'uploadFinished': - setState('confirm', files); - break; - case 'startUpload': - /* 添加额外的GET参数 */ - var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', - url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params); - uploader.option('server', url); - setState('uploading', files); - break; - case 'stopUpload': - setState('paused', files); - break; - } - }); - - uploader.on('uploadBeforeSend', function (file, data, header) { - //这里可以通过data对象添加POST参数 - header['X_Requested_With'] = 'XMLHttpRequest'; - // HaoChuan9421 - if(editor.options.headers && Object.prototype.toString.apply(editor.options.headers) === "[object Object]"){ - for(var key in editor.options.headers){ - header[key] = editor.options.headers[key] - } - } - }); - - uploader.on('uploadProgress', function (file, percentage) { - var $li = $('#' + file.id), - $percent = $li.find('.progress span'); - - $percent.css('width', percentage * 100 + '%'); - percentages[ file.id ][ 1 ] = percentage; - updateTotalProgress(); - }); - - uploader.on('uploadSuccess', function (file, ret) { - var $file = $('#' + file.id); - try { - var responseText = (ret._raw || ret), - json = utils.str2json(responseText); - if (json.state == 'SUCCESS') { - _this.fileList.push(json); - $file.append(''); - } else { - $file.find('.error').text(json.state).show(); - } - } catch (e) { - $file.find('.error').text(lang.errorServerUpload).show(); - } - }); - - uploader.on('uploadError', function (file, code) { - }); - uploader.on('error', function (code, file) { - if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') { - addFile(file); - } - }); - uploader.on('uploadComplete', function (file, ret) { - }); - - $upload.on('click', function () { - if ($(this).hasClass('disabled')) { - return false; - } - - if (state === 'ready') { - uploader.upload(); - } else if (state === 'paused') { - uploader.upload(); - } else if (state === 'uploading') { - uploader.stop(); - } - }); - - $upload.addClass('state-' + state); - updateTotalProgress(); - }, - getQueueCount: function () { - var file, i, status, readyFile = 0, files = this.uploader.getFiles(); - for (i = 0; file = files[i++]; ) { - status = file.getStatus(); - if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++; - } - return readyFile; - }, - getInsertList: function () { - var i, link, data, list = [], - prefix = editor.getOpt('fileUrlPrefix'); - for (i = 0; i < this.fileList.length; i++) { - data = this.fileList[i]; - link = data.url; - list.push({ - title: data.original || link.substr(link.lastIndexOf('/') + 1), - url: prefix + link - }); - } - return list; - } - }; - - - /* 在线附件 */ - function OnlineFile(target) { - this.container = utils.isString(target) ? document.getElementById(target) : target; - this.init(); - } - OnlineFile.prototype = { - init: function () { - this.initContainer(); - this.initEvents(); - this.initData(); - }, - /* 初始化容器 */ - initContainer: function () { - this.container.innerHTML = ''; - this.list = document.createElement('ul'); - this.clearFloat = document.createElement('li'); - - domUtils.addClass(this.list, 'list'); - domUtils.addClass(this.clearFloat, 'clearFloat'); - - this.list.appendChild(this.clearFloat); - this.container.appendChild(this.list); - }, - /* 初始化滚动事件,滚动到地步自动拉取数据 */ - initEvents: function () { - var _this = this; - - /* 滚动拉取图片 */ - domUtils.on($G('fileList'), 'scroll', function(e){ - var panel = this; - if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) { - _this.getFileData(); - } - }); - /* 选中图片 */ - domUtils.on(this.list, 'click', function (e) { - var target = e.target || e.srcElement, - li = target.parentNode; - - if (li.tagName.toLowerCase() == 'li') { - if (domUtils.hasClass(li, 'selected')) { - domUtils.removeClasses(li, 'selected'); - } else { - domUtils.addClass(li, 'selected'); - } - } - }); - }, - /* 初始化第一次的数据 */ - initData: function () { - - /* 拉取数据需要使用的值 */ - this.state = 0; - this.listSize = editor.getOpt('fileManagerListSize'); - this.listIndex = 0; - this.listEnd = false; - - /* 第一次拉取数据 */ - this.getFileData(); - }, - /* 向后台拉取图片列表数据 */ - getFileData: function () { - var _this = this; - - if(!_this.listEnd && !this.isLoadingData) { - this.isLoadingData = true; - ajax.request(editor.getActionUrl(editor.getOpt('fileManagerActionName')), { - timeout: 100000, - data: utils.extend({ - start: this.listIndex, - size: this.listSize - }, editor.queryCommandValue('serverparam')), - method: 'get', - onsuccess: function (r) { - try { - var json = eval('(' + r.responseText + ')'); - if (json.state == 'SUCCESS') { - _this.pushData(json.list); - _this.listIndex = parseInt(json.start) + parseInt(json.list.length); - if(_this.listIndex >= json.total) { - _this.listEnd = true; - } - _this.isLoadingData = false; - } - } catch (e) { - if(r.responseText.indexOf('ue_separate_ue') != -1) { - var list = r.responseText.split(r.responseText); - _this.pushData(list); - _this.listIndex = parseInt(list.length); - _this.listEnd = true; - _this.isLoadingData = false; - } - } - }, - onerror: function () { - _this.isLoadingData = false; - } - }); - } - }, - /* 添加图片到列表界面上 */ - pushData: function (list) { - var i, item, img, filetype, preview, icon, _this = this, - urlPrefix = editor.getOpt('fileManagerUrlPrefix'); - for (i = 0; i < list.length; i++) { - if(list[i] && list[i].url) { - item = document.createElement('li'); - icon = document.createElement('span'); - filetype = list[i].url.substr(list[i].url.lastIndexOf('.') + 1); - - if ( "png|jpg|jpeg|gif|bmp".indexOf(filetype) != -1 ) { - preview = document.createElement('img'); - domUtils.on(preview, 'load', (function(image){ - return function(){ - _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight); - }; - })(preview)); - preview.width = 113; - preview.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) ); - } else { - var ic = document.createElement('i'), - textSpan = document.createElement('span'); - textSpan.innerHTML = list[i].url.substr(list[i].url.lastIndexOf('/') + 1); - preview = document.createElement('div'); - preview.appendChild(ic); - preview.appendChild(textSpan); - domUtils.addClass(preview, 'file-wrapper'); - domUtils.addClass(textSpan, 'file-title'); - domUtils.addClass(ic, 'file-type-' + filetype); - domUtils.addClass(ic, 'file-preview'); - } - domUtils.addClass(icon, 'icon'); - item.setAttribute('data-url', urlPrefix + list[i].url); - if (list[i].original) { - item.setAttribute('data-title', list[i].original); - } - - item.appendChild(preview); - item.appendChild(icon); - this.list.insertBefore(item, this.clearFloat); - } - } - }, - /* 改变图片大小 */ - scale: function (img, w, h, type) { - var ow = img.width, - oh = img.height; - - if (type == 'justify') { - if (ow >= oh) { - img.width = w; - img.height = h * oh / ow; - img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; - } else { - img.width = w * ow / oh; - img.height = h; - img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; - } - } else { - if (ow >= oh) { - img.width = w * ow / oh; - img.height = h; - img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; - } else { - img.width = w; - img.height = h * oh / ow; - img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; - } - } - }, - getInsertList: function () { - var i, lis = this.list.children, list = []; - for (i = 0; i < lis.length; i++) { - if (domUtils.hasClass(lis[i], 'selected')) { - var url = lis[i].getAttribute('data-url'); - var title = lis[i].getAttribute('data-title') || url.substr(url.lastIndexOf('/') + 1); - list.push({ - title: title, - url: url - }); - } - } - return list; - } - }; - - -})(); \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_chm.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_chm.gif deleted file mode 100644 index 9ca4fb6..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_chm.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_default.png b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_default.png deleted file mode 100644 index 50ac1cb..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_default.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_doc.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_doc.gif deleted file mode 100644 index 206fede..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_doc.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_exe.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_exe.gif deleted file mode 100644 index 2e3b7a2..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_exe.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_jpg.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_jpg.gif deleted file mode 100644 index 5d5dec0..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_jpg.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_mp3.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_mp3.gif deleted file mode 100644 index b351a1f..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_mp3.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_mv.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_mv.gif deleted file mode 100644 index 26019b0..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_mv.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_pdf.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_pdf.gif deleted file mode 100644 index bbb65c8..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_pdf.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_ppt.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_ppt.gif deleted file mode 100644 index ccb26fb..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_ppt.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_psd.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_psd.gif deleted file mode 100644 index 2e8743a..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_psd.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_rar.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_rar.gif deleted file mode 100644 index 5359e46..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_rar.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_txt.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_txt.gif deleted file mode 100644 index e7b8dd2..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_txt.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_xls.gif b/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_xls.gif deleted file mode 100644 index e86c1c6..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/fileTypeImages/icon_xls.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/alignicon.gif b/public/static/admin/UEditor/dialogs/attachment/images/alignicon.gif deleted file mode 100644 index 005a5ac..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/alignicon.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/alignicon.png b/public/static/admin/UEditor/dialogs/attachment/images/alignicon.png deleted file mode 100644 index 4b6c444..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/alignicon.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/bg.png b/public/static/admin/UEditor/dialogs/attachment/images/bg.png deleted file mode 100644 index 580be0a..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/bg.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/file-icons.gif b/public/static/admin/UEditor/dialogs/attachment/images/file-icons.gif deleted file mode 100644 index d8c02c2..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/file-icons.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/file-icons.png b/public/static/admin/UEditor/dialogs/attachment/images/file-icons.png deleted file mode 100644 index 3ff82c8..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/file-icons.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/icons.gif b/public/static/admin/UEditor/dialogs/attachment/images/icons.gif deleted file mode 100644 index 78459de..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/icons.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/icons.png b/public/static/admin/UEditor/dialogs/attachment/images/icons.png deleted file mode 100644 index 12e4700..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/icons.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/image.png b/public/static/admin/UEditor/dialogs/attachment/images/image.png deleted file mode 100644 index 19699f6..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/image.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/progress.png b/public/static/admin/UEditor/dialogs/attachment/images/progress.png deleted file mode 100644 index 717c486..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/progress.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/success.gif b/public/static/admin/UEditor/dialogs/attachment/images/success.gif deleted file mode 100644 index 8d4f311..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/success.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/attachment/images/success.png b/public/static/admin/UEditor/dialogs/attachment/images/success.png deleted file mode 100644 index 94f968d..0000000 Binary files a/public/static/admin/UEditor/dialogs/attachment/images/success.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/background/background.css b/public/static/admin/UEditor/dialogs/background/background.css deleted file mode 100644 index 5c41fe9..0000000 --- a/public/static/admin/UEditor/dialogs/background/background.css +++ /dev/null @@ -1,94 +0,0 @@ -.wrapper{ width: 424px;margin: 10px auto; zoom:1;position: relative} -.tabbody{height:225px;} -.tabbody .panel { position: absolute;width:100%; height:100%;background: #fff; display: none;} -.tabbody .focus { display: block;} - -body{font-size: 12px;color: #888;overflow: hidden;} -input,label{vertical-align:middle} -.clear{clear: both;} -.pl{padding-left: 18px;padding-left: 23px\9;} - -#imageList {width: 420px;height: 215px;margin-top: 10px;overflow: hidden;overflow-y: auto;} -#imageList div {float: left;width: 100px;height: 95px;margin: 5px 10px;} -#imageList img {cursor: pointer;border: 2px solid white;} - -.bgarea{margin: 10px;padding: 5px;height: 84%;border: 1px solid #A8A297;} -.content div{margin: 10px 0 10px 5px;} -.content .iptradio{margin: 0px 5px 5px 0px;} -.txt{width:280px;} - -.wrapcolor{height: 19px;} -div.color{float: left;margin: 0;} -#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;margin: 0;float: left;} -div.alignment,#custom{margin-left: 23px;margin-left: 28px\9;} -#custom input{height: 15px;min-height: 15px;width:20px;} -#repeatType{width:100px;} - - -/* 图片管理样式 */ -#imgManager { - width: 100%; - height: 225px; -} -#imgManager #imageList{ - width: 100%; - overflow-x: hidden; - overflow-y: auto; -} -#imgManager ul { - display: block; - list-style: none; - margin: 0; - padding: 0; -} -#imgManager li { - float: left; - display: block; - list-style: none; - padding: 0; - width: 113px; - height: 113px; - margin: 9px 0 0 19px; - background-color: #eee; - overflow: hidden; - cursor: pointer; - position: relative; -} -#imgManager li.clearFloat { - float: none; - clear: both; - display: block; - width:0; - height:0; - margin: 0; - padding: 0; -} -#imgManager li img { - cursor: pointer; -} -#imgManager li .icon { - cursor: pointer; - width: 113px; - height: 113px; - position: absolute; - top: 0; - left: 0; - z-index: 2; - border: 0; - background-repeat: no-repeat; -} -#imgManager li .icon:hover { - width: 107px; - height: 107px; - border: 3px solid #1094fa; -} -#imgManager li.selected .icon { - background-image: url(images/success.png); - background-position: 75px 75px; -} -#imgManager li.selected .icon:hover { - width: 107px; - height: 107px; - border: 3px solid #1094fa; - background-position: 72px 72px; -} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/background/background.html b/public/static/admin/UEditor/dialogs/background/background.html deleted file mode 100644 index 3cc2ac1..0000000 --- a/public/static/admin/UEditor/dialogs/background/background.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - -
    -
    - - -
    -
    -
    -
    - -
    -
    - - -
    -
    -
    - : -
    -
    -
    -
    -
    - -
    -
    - : -
    -
    - :x:px  y:px -
    -
    -
    - -
    -
    -
    -
    -
    -
    - - - diff --git a/public/static/admin/UEditor/dialogs/background/background.js b/public/static/admin/UEditor/dialogs/background/background.js deleted file mode 100644 index 9a4a131..0000000 --- a/public/static/admin/UEditor/dialogs/background/background.js +++ /dev/null @@ -1,376 +0,0 @@ -(function () { - - var onlineImage, - backupStyle = editor.queryCommandValue('background'); - - window.onload = function () { - initTabs(); - initColorSelector(); - }; - - /* 初始化tab标签 */ - function initTabs(){ - var tabs = $G('tabHeads').children; - for (var i = 0; i < tabs.length; i++) { - domUtils.on(tabs[i], "click", function (e) { - var target = e.target || e.srcElement; - for (var j = 0; j < tabs.length; j++) { - if(tabs[j] == target){ - tabs[j].className = "focus"; - var contentId = tabs[j].getAttribute('data-content-id'); - $G(contentId).style.display = "block"; - if(contentId == 'imgManager') { - initImagePanel(); - } - }else { - tabs[j].className = ""; - $G(tabs[j].getAttribute('data-content-id')).style.display = "none"; - } - } - }); - } - } - - /* 初始化颜色设置 */ - function initColorSelector () { - var obj = editor.queryCommandValue('background'); - if (obj) { - var color = obj['background-color'], - repeat = obj['background-repeat'] || 'repeat', - image = obj['background-image'] || '', - position = obj['background-position'] || 'center center', - pos = position.split(' '), - x = parseInt(pos[0]) || 0, - y = parseInt(pos[1]) || 0; - - if(repeat == 'no-repeat' && (x || y)) repeat = 'self'; - - image = image.match(/url[\s]*\(([^\)]*)\)/); - image = image ? image[1]:''; - updateFormState('colored', color, image, repeat, x, y); - } else { - updateFormState(); - } - - var updateHandler = function () { - updateFormState(); - updateBackground(); - } - domUtils.on($G('nocolorRadio'), 'click', updateBackground); - domUtils.on($G('coloredRadio'), 'click', updateHandler); - domUtils.on($G('url'), 'keyup', function(){ - if($G('url').value && $G('alignment').style.display == "none") { - utils.each($G('repeatType').children, function(item){ - item.selected = ('repeat' == item.getAttribute('value') ? 'selected':false); - }); - } - updateHandler(); - }); - domUtils.on($G('repeatType'), 'change', updateHandler); - domUtils.on($G('x'), 'keyup', updateBackground); - domUtils.on($G('y'), 'keyup', updateBackground); - - initColorPicker(); - } - - /* 初始化颜色选择器 */ - function initColorPicker() { - var me = editor, - cp = $G("colorPicker"); - - /* 生成颜色选择器ui对象 */ - var popup = new UE.ui.Popup({ - content: new UE.ui.ColorPicker({ - noColorText: me.getLang("clearColor"), - editor: me, - onpickcolor: function (t, color) { - updateFormState('colored', color); - updateBackground(); - UE.ui.Popup.postHide(); - }, - onpicknocolor: function (t, color) { - updateFormState('colored', 'transparent'); - updateBackground(); - UE.ui.Popup.postHide(); - } - }), - editor: me, - onhide: function () { - } - }); - - /* 设置颜色选择器 */ - domUtils.on(cp, "click", function () { - popup.showAnchor(this); - }); - domUtils.on(document, 'mousedown', function (evt) { - var el = evt.target || evt.srcElement; - UE.ui.Popup.postHide(el); - }); - domUtils.on(window, 'scroll', function () { - UE.ui.Popup.postHide(); - }); - } - - /* 初始化在线图片列表 */ - function initImagePanel() { - onlineImage = onlineImage || new OnlineImage('imageList'); - } - - /* 更新背景色设置面板 */ - function updateFormState (radio, color, url, align, x, y) { - var nocolorRadio = $G('nocolorRadio'), - coloredRadio = $G('coloredRadio'); - - if(radio) { - nocolorRadio.checked = (radio == 'colored' ? false:'checked'); - coloredRadio.checked = (radio == 'colored' ? 'checked':false); - } - if(color) { - domUtils.setStyle($G("colorPicker"), "background-color", color); - } - - if(url && /^\//.test(url)) { - var a = document.createElement('a'); - a.href = url; - browser.ie && (a.href = a.href); - url = browser.ie ? a.href:(a.protocol + '//' + a.host + a.pathname + a.search + a.hash); - } - - if(url || url === '') { - $G('url').value = url; - } - if(align) { - utils.each($G('repeatType').children, function(item){ - item.selected = (align == item.getAttribute('value') ? 'selected':false); - }); - } - if(x || y) { - $G('x').value = parseInt(x) || 0; - $G('y').value = parseInt(y) || 0; - } - - $G('alignment').style.display = coloredRadio.checked && $G('url').value ? '':'none'; - $G('custom').style.display = coloredRadio.checked && $G('url').value && $G('repeatType').value == 'self' ? '':'none'; - } - - /* 更新背景颜色 */ - function updateBackground () { - if ($G('coloredRadio').checked) { - var color = domUtils.getStyle($G("colorPicker"), "background-color"), - bgimg = $G("url").value, - align = $G("repeatType").value, - backgroundObj = { - "background-repeat": "no-repeat", - "background-position": "center center" - }; - - if (color) backgroundObj["background-color"] = color; - if (bgimg) backgroundObj["background-image"] = 'url(' + bgimg + ')'; - if (align == 'self') { - backgroundObj["background-position"] = $G("x").value + "px " + $G("y").value + "px"; - } else if (align == 'repeat-x' || align == 'repeat-y' || align == 'repeat') { - backgroundObj["background-repeat"] = align; - } - - editor.execCommand('background', backgroundObj); - } else { - editor.execCommand('background', null); - } - } - - - /* 在线图片 */ - function OnlineImage(target) { - this.container = utils.isString(target) ? document.getElementById(target) : target; - this.init(); - } - OnlineImage.prototype = { - init: function () { - this.reset(); - this.initEvents(); - }, - /* 初始化容器 */ - initContainer: function () { - this.container.innerHTML = ''; - this.list = document.createElement('ul'); - this.clearFloat = document.createElement('li'); - - domUtils.addClass(this.list, 'list'); - domUtils.addClass(this.clearFloat, 'clearFloat'); - - this.list.id = 'imageListUl'; - this.list.appendChild(this.clearFloat); - this.container.appendChild(this.list); - }, - /* 初始化滚动事件,滚动到地步自动拉取数据 */ - initEvents: function () { - var _this = this; - - /* 滚动拉取图片 */ - domUtils.on($G('imageList'), 'scroll', function(e){ - var panel = this; - if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) { - _this.getImageData(); - } - }); - /* 选中图片 */ - domUtils.on(this.container, 'click', function (e) { - var target = e.target || e.srcElement, - li = target.parentNode, - nodes = $G('imageListUl').childNodes; - - if (li.tagName.toLowerCase() == 'li') { - updateFormState('nocolor', null, ''); - for (var i = 0, node; node = nodes[i++];) { - if (node == li && !domUtils.hasClass(node, 'selected')) { - domUtils.addClass(node, 'selected'); - updateFormState('colored', null, li.firstChild.getAttribute("_src"), 'repeat'); - } else { - domUtils.removeClasses(node, 'selected'); - } - } - updateBackground(); - } - }); - }, - /* 初始化第一次的数据 */ - initData: function () { - - /* 拉取数据需要使用的值 */ - this.state = 0; - this.listSize = editor.getOpt('imageManagerListSize'); - this.listIndex = 0; - this.listEnd = false; - - /* 第一次拉取数据 */ - this.getImageData(); - }, - /* 重置界面 */ - reset: function() { - this.initContainer(); - this.initData(); - }, - /* 向后台拉取图片列表数据 */ - getImageData: function () { - var _this = this; - - if(!_this.listEnd && !this.isLoadingData) { - this.isLoadingData = true; - var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')), - isJsonp = utils.isCrossDomainUrl(url); - ajax.request(url, { - 'timeout': 100000, - 'dataType': isJsonp ? 'jsonp':'', - 'data': utils.extend({ - start: this.listIndex, - size: this.listSize - }, editor.queryCommandValue('serverparam')), - 'method': 'get', - 'onsuccess': function (r) { - try { - var json = isJsonp ? r:eval('(' + r.responseText + ')'); - if (json.state == 'SUCCESS') { - _this.pushData(json.list); - _this.listIndex = parseInt(json.start) + parseInt(json.list.length); - if(_this.listIndex >= json.total) { - _this.listEnd = true; - } - _this.isLoadingData = false; - } - } catch (e) { - if(r.responseText.indexOf('ue_separate_ue') != -1) { - var list = r.responseText.split(r.responseText); - _this.pushData(list); - _this.listIndex = parseInt(list.length); - _this.listEnd = true; - _this.isLoadingData = false; - } - } - }, - 'onerror': function () { - _this.isLoadingData = false; - } - }); - } - }, - /* 添加图片到列表界面上 */ - pushData: function (list) { - var i, item, img, icon, _this = this, - urlPrefix = editor.getOpt('imageManagerUrlPrefix'); - for (i = 0; i < list.length; i++) { - if(list[i] && list[i].url) { - item = document.createElement('li'); - img = document.createElement('img'); - icon = document.createElement('span'); - - domUtils.on(img, 'load', (function(image){ - return function(){ - _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight); - } - })(img)); - img.width = 113; - img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) ); - img.setAttribute('_src', urlPrefix + list[i].url); - domUtils.addClass(icon, 'icon'); - - item.appendChild(img); - item.appendChild(icon); - this.list.insertBefore(item, this.clearFloat); - } - } - }, - /* 改变图片大小 */ - scale: function (img, w, h, type) { - var ow = img.width, - oh = img.height; - - if (type == 'justify') { - if (ow >= oh) { - img.width = w; - img.height = h * oh / ow; - img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; - } else { - img.width = w * ow / oh; - img.height = h; - img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; - } - } else { - if (ow >= oh) { - img.width = w * ow / oh; - img.height = h; - img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; - } else { - img.width = w; - img.height = h * oh / ow; - img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; - } - } - }, - getInsertList: function () { - var i, lis = this.list.children, list = [], align = getAlign(); - for (i = 0; i < lis.length; i++) { - if (domUtils.hasClass(lis[i], 'selected')) { - var img = lis[i].firstChild, - src = img.getAttribute('_src'); - list.push({ - src: src, - _src: src, - floatStyle: align - }); - } - - } - return list; - } - }; - - dialog.onok = function () { - updateBackground(); - editor.fireEvent('saveScene'); - }; - dialog.oncancel = function () { - editor.execCommand('background', backupStyle); - }; - -})(); \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/background/images/bg.png b/public/static/admin/UEditor/dialogs/background/images/bg.png deleted file mode 100644 index 580be0a..0000000 Binary files a/public/static/admin/UEditor/dialogs/background/images/bg.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/background/images/success.png b/public/static/admin/UEditor/dialogs/background/images/success.png deleted file mode 100644 index 94f968d..0000000 Binary files a/public/static/admin/UEditor/dialogs/background/images/success.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/charts/chart.config.js b/public/static/admin/UEditor/dialogs/charts/chart.config.js deleted file mode 100644 index 678b00d..0000000 --- a/public/static/admin/UEditor/dialogs/charts/chart.config.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 图表配置文件 - * */ - - -//不同类型的配置 -var typeConfig = [ - { - chart: { - type: 'line' - }, - plotOptions: { - line: { - dataLabels: { - enabled: false - }, - enableMouseTracking: true - } - } - }, { - chart: { - type: 'line' - }, - plotOptions: { - line: { - dataLabels: { - enabled: true - }, - enableMouseTracking: false - } - } - }, { - chart: { - type: 'area' - } - }, { - chart: { - type: 'bar' - } - }, { - chart: { - type: 'column' - } - }, { - chart: { - plotBackgroundColor: null, - plotBorderWidth: null, - plotShadow: false - }, - plotOptions: { - pie: { - allowPointSelect: true, - cursor: 'pointer', - dataLabels: { - enabled: true, - color: '#000000', - connectorColor: '#000000', - formatter: function() { - return ''+ this.point.name +': '+ ( Math.round( this.point.percentage*100 ) / 100 ) +' %'; - } - } - } - } - } -]; diff --git a/public/static/admin/UEditor/dialogs/charts/charts.css b/public/static/admin/UEditor/dialogs/charts/charts.css deleted file mode 100644 index ac3c764..0000000 --- a/public/static/admin/UEditor/dialogs/charts/charts.css +++ /dev/null @@ -1,165 +0,0 @@ -html, body { - width: 100%; - height: 100%; - margin: 0; - padding: 0; - overflow-x: hidden; -} - -.main { - width: 100%; - overflow: hidden; -} - -.table-view { - height: 100%; - float: left; - margin: 20px; - width: 40%; -} - -.table-view .table-container { - width: 100%; - margin-bottom: 50px; - overflow: scroll; -} - -.table-view th { - padding: 5px 10px; - background-color: #F7F7F7; -} - -.table-view td { - width: 50px; - text-align: center; - padding:0; -} - -.table-container input { - width: 40px; - padding: 5px; - border: none; - outline: none; -} - -.table-view caption { - font-size: 18px; - text-align: left; -} - -.charts-view { - /*margin-left: 49%!important;*/ - width: 50%; - margin-left: 49%; - height: 400px; -} - -.charts-container { - border-left: 1px solid #c3c3c3; -} - -.charts-format fieldset { - padding-left: 20px; - margin-bottom: 50px; -} - -.charts-format legend { - padding-left: 10px; - padding-right: 10px; -} - -.format-item-container { - padding: 20px; -} - -.format-item-container label { - display: block; - margin: 10px 0; -} - -.charts-format .data-item { - border: 1px solid black; - outline: none; - padding: 2px 3px; -} - -/* 图表类型 */ - -.charts-type { - margin-top: 50px; - height: 300px; -} - -.scroll-view { - border: 1px solid #c3c3c3; - border-left: none; - border-right: none; - overflow: hidden; -} - -.scroll-container { - margin: 20px; - width: 100%; - overflow: hidden; -} - -.scroll-bed { - width: 10000px; - _margin-top: 20px; - -webkit-transition: margin-left .5s ease; - -moz-transition: margin-left .5s ease; - transition: margin-left .5s ease; -} - -.view-box { - display: inline-block; - *display: inline; - *zoom: 1; - margin-right: 20px; - border: 2px solid white; - line-height: 0; - overflow: hidden; - cursor: pointer; -} - -.view-box img { - border: 1px solid #cecece; -} - -.view-box.selected { - border-color: #7274A7; -} - -.button-container { - margin-bottom: 20px; - text-align: center; -} - -.button-container a { - display: inline-block; - width: 100px; - height: 25px; - line-height: 25px; - border: 1px solid #c2ccd1; - margin-right: 30px; - text-decoration: none; - color: black; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} - -.button-container a:HOVER { - background: #fcfcfc; -} - -.button-container a:ACTIVE { - border-top-color: #c2ccd1; - box-shadow:inset 0 5px 4px -4px rgba(49, 49, 64, 0.1); -} - -.edui-charts-not-data { - height: 100px; - line-height: 100px; - text-align: center; -} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/charts/charts.html b/public/static/admin/UEditor/dialogs/charts/charts.html deleted file mode 100644 index 70e2314..0000000 --- a/public/static/admin/UEditor/dialogs/charts/charts.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - chart - - - - - -
    -
    -

    -
    -

    -
    -
    -
    - -
    - - -
    -
    -
    -
    - -
    - - - - -
    -
    -
    - -
    - -

    -
    -
    -
    - -
    - -

    -
    -
    -
    -
    -
    -
    -
    -
    -

    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    - - - - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/charts/charts.js b/public/static/admin/UEditor/dialogs/charts/charts.js deleted file mode 100644 index 37344fd..0000000 --- a/public/static/admin/UEditor/dialogs/charts/charts.js +++ /dev/null @@ -1,519 +0,0 @@ -/* - * 图片转换对话框脚本 - **/ - -var tableData = [], - //编辑器页面table - editorTable = null, - chartsConfig = window.typeConfig, - resizeTimer = null, - //初始默认图表类型 - currentChartType = 0; - -window.onload = function () { - - editorTable = domUtils.findParentByTagName( editor.selection.getRange().startContainer, 'table', true); - - //未找到表格, 显示错误页面 - if ( !editorTable ) { - document.body.innerHTML = "
    未找到数据
    "; - return; - } - - //初始化图表类型选择 - initChartsTypeView(); - renderTable( editorTable ); - initEvent(); - initUserConfig( editorTable.getAttribute( "data-chart" ) ); - $( "#scrollBed .view-box:eq("+ currentChartType +")" ).trigger( "click" ); - updateViewType( currentChartType ); - - dialog.addListener( "resize", function () { - - if ( resizeTimer != null ) { - window.clearTimeout( resizeTimer ); - } - - resizeTimer = window.setTimeout( function () { - - resizeTimer = null; - - renderCharts(); - - }, 500 ); - - } ); - -}; - -function initChartsTypeView () { - - var contents = []; - - for ( var i = 0, len = chartsConfig.length; i
    ' ); - - } - - $( "#scrollBed" ).html( contents.join( "" ) ); - -} - -//渲染table, 以便用户修改数据 -function renderTable ( table ) { - - var tableHtml = []; - - //构造数据 - for ( var i = 0, row; row = table.rows[ i ]; i++ ) { - - tableData[ i ] = []; - tableHtml[ i ] = []; - - for ( var j = 0, cell; cell = row.cells[ j ]; j++ ) { - - var value = getCellValue( cell ); - - if ( i > 0 && j > 0 ) { - value = +value; - } - - if ( i === 0 || j === 0 ) { - tableHtml[ i ].push( ''+ value +'' ); - } else { - tableHtml[ i ].push( '' ); - } - - tableData[ i ][ j ] = value; - - } - - tableHtml[ i ] = tableHtml[ i ].join( "" ); - - } - - //draw 表格 - $( "#tableContainer" ).html( ''+ tableHtml.join( "" ) +'
    ' ); - -} - -/* - * 根据表格已有的图表属性初始化当前图表属性 - */ -function initUserConfig ( config ) { - - var parsedConfig = {}; - - if ( !config ) { - return; - } - - config = config.split( ";" ); - - $.each( config, function ( index, item ) { - - item = item.split( ":" ); - parsedConfig[ item[ 0 ] ] = item[ 1 ]; - - } ); - - setUserConfig( parsedConfig ); - -} - -function initEvent () { - - var cacheValue = null, - //图表类型数 - typeViewCount = chartsConfig.length- 1, - $chartsTypeViewBox = $( '#scrollBed .view-box' ); - - $( ".charts-format" ).delegate( ".format-ctrl", "change", function () { - - renderCharts(); - - } ) - - $( ".table-view" ).delegate( ".data-item", "focus", function () { - - cacheValue = this.value; - - } ).delegate( ".data-item", "blur", function () { - - if ( this.value !== cacheValue ) { - renderCharts(); - } - - cacheValue = null; - - } ); - - $( "#buttonContainer" ).delegate( "a", "click", function (e) { - - e.preventDefault(); - - if ( this.getAttribute( "data-title" ) === 'prev' ) { - - if ( currentChartType > 0 ) { - currentChartType--; - updateViewType( currentChartType ); - } - - } else { - - if ( currentChartType < typeViewCount ) { - currentChartType++; - updateViewType( currentChartType ); - } - - } - - } ); - - //图表类型变化 - $( '#scrollBed' ).delegate( ".view-box", "click", function (e) { - - var index = $( this ).attr( "data-chart-type" ); - $chartsTypeViewBox.removeClass( "selected" ); - $( $chartsTypeViewBox[ index ] ).addClass( "selected" ); - - currentChartType = index | 0; - - //饼图, 禁用部分配置 - if ( currentChartType === chartsConfig.length - 1 ) { - - disableNotPieConfig(); - - //启用完整配置 - } else { - - enableNotPieConfig(); - - } - - renderCharts(); - - } ); - -} - -function renderCharts () { - - var data = collectData(); - - $('#chartsContainer').highcharts( $.extend( {}, chartsConfig[ currentChartType ], { - - credits: { - enabled: false - }, - exporting: { - enabled: false - }, - title: { - text: data.title, - x: -20 //center - }, - subtitle: { - text: data.subTitle, - x: -20 - }, - xAxis: { - title: { - text: data.xTitle - }, - categories: data.categories - }, - yAxis: { - title: { - text: data.yTitle - }, - plotLines: [{ - value: 0, - width: 1, - color: '#808080' - }] - }, - tooltip: { - enabled: true, - valueSuffix: data.suffix - }, - legend: { - layout: 'vertical', - align: 'right', - verticalAlign: 'middle', - borderWidth: 1 - }, - series: data.series - - } )); - -} - -function updateViewType ( index ) { - - $( "#scrollBed" ).css( 'marginLeft', -index*324+'px' ); - -} - -function collectData () { - - var form = document.forms[ 'data-form' ], - data = null; - - if ( currentChartType !== chartsConfig.length - 1 ) { - - data = getSeriesAndCategories(); - $.extend( data, getUserConfig() ); - - //饼图数据格式 - } else { - data = getSeriesForPieChart(); - data.title = form[ 'title' ].value; - data.suffix = form[ 'unit' ].value; - } - - return data; - -} - -/** - * 获取用户配置信息 - */ -function getUserConfig () { - - var form = document.forms[ 'data-form' ], - info = { - title: form[ 'title' ].value, - subTitle: form[ 'sub-title' ].value, - xTitle: form[ 'x-title' ].value, - yTitle: form[ 'y-title' ].value, - suffix: form[ 'unit' ].value, - //数据对齐方式 - tableDataFormat: getTableDataFormat (), - //饼图提示文字 - tip: $( "#tipInput" ).val() - }; - - return info; - -} - -function setUserConfig ( config ) { - - var form = document.forms[ 'data-form' ]; - - config.title && ( form[ 'title' ].value = config.title ); - config.subTitle && ( form[ 'sub-title' ].value = config.subTitle ); - config.xTitle && ( form[ 'x-title' ].value = config.xTitle ); - config.yTitle && ( form[ 'y-title' ].value = config.yTitle ); - config.suffix && ( form[ 'unit' ].value = config.suffix ); - config.dataFormat == "-1" && ( form[ 'charts-format' ][ 1 ].checked = true ); - config.tip && ( form[ 'tip' ].value = config.tip ); - currentChartType = config.chartType || 0; - -} - -function getSeriesAndCategories () { - - var form = document.forms[ 'data-form' ], - series = [], - categories = [], - tmp = [], - tableData = getTableData(); - - //反转数据 - if ( getTableDataFormat() === "-1" ) { - - for ( var i = 0, len = tableData.length; i < len; i++ ) { - - for ( var j = 0, jlen = tableData[ i ].length; j < jlen; j++ ) { - - if ( !tmp[ j ] ) { - tmp[ j ] = []; - } - - tmp[ j ][ i ] = tableData[ i ][ j ]; - - } - - } - - tableData = tmp; - - } - - categories = tableData[0].slice( 1 ); - - for ( var i = 1, data; data = tableData[ i ]; i++ ) { - - series.push( { - name: data[ 0 ], - data: data.slice( 1 ) - } ); - - } - - return { - series: series, - categories: categories - }; - -} - -/* - * 获取数据源数据对齐方式 - */ -function getTableDataFormat () { - - var form = document.forms[ 'data-form' ], - items = form['charts-format']; - - return items[ 0 ].checked ? items[ 0 ].value : items[ 1 ].value; - -} - -/* - * 禁用非饼图类型的配置项 - */ -function disableNotPieConfig() { - - updateConfigItem( 'disable' ); - -} - -/* - * 启用非饼图类型的配置项 - */ -function enableNotPieConfig() { - - updateConfigItem( 'enable' ); - -} - -function updateConfigItem ( value ) { - - var table = $( "#showTable" )[ 0 ], - isDisable = value === 'disable' ? true : false; - - //table中的input处理 - for ( var i = 2 , row; row = table.rows[ i ]; i++ ) { - - for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) { - - $( "input", cell ).attr( "disabled", isDisable ); - - } - - } - - //其他项处理 - $( "input.not-pie-item" ).attr( "disabled", isDisable ); - $( "#tipInput" ).attr( "disabled", !isDisable ) - -} - -/* - * 获取饼图数据 - * 饼图的数据只取第一行的 - **/ -function getSeriesForPieChart () { - - var series = { - type: 'pie', - name: $("#tipInput").val(), - data: [] - }, - tableData = getTableData(); - - - for ( var j = 1, jlen = tableData[ 0 ].length; j < jlen; j++ ) { - - var title = tableData[ 0 ][ j ], - val = tableData[ 1 ][ j ]; - - series.data.push( [ title, val ] ); - - } - - return { - series: [ series ] - }; - -} - -function getTableData () { - - var table = document.getElementById( "showTable" ), - xCount = table.rows[0].cells.length - 1, - values = getTableInputValue(); - - for ( var i = 0, value; value = values[ i ]; i++ ) { - - tableData[ Math.floor( i / xCount ) + 1 ][ i % xCount + 1 ] = values[ i ]; - - } - - return tableData; - -} - -function getTableInputValue () { - - var table = document.getElementById( "showTable" ), - inputs = table.getElementsByTagName( "input" ), - values = []; - - for ( var i = 0, input; input = inputs[ i ]; i++ ) { - values.push( input.value | 0 ); - } - - return values; - -} - -function getCellValue ( cell ) { - - var value = utils.trim( ( cell.innerText || cell.textContent || '' ) ); - - return value.replace( new RegExp( UE.dom.domUtils.fillChar, 'g' ), '' ).replace( /^\s+|\s+$/g, '' ); - -} - - -//dialog确认事件 -dialog.onok = function () { - - //收集信息 - var form = document.forms[ 'data-form' ], - info = getUserConfig(); - - //添加图表类型 - info.chartType = currentChartType; - - //同步表格数据到编辑器 - syncTableData(); - - //执行图表命令 - editor.execCommand( 'charts', info ); - -}; - -/* - * 同步图表编辑视图的表格数据到编辑器里的原始表格 - */ -function syncTableData () { - - var tableData = getTableData(); - - for ( var i = 1, row; row = editorTable.rows[ i ]; i++ ) { - - for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) { - - cell.innerHTML = tableData[ i ] [ j ]; - - } - - } - -} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/charts/images/charts0.png b/public/static/admin/UEditor/dialogs/charts/images/charts0.png deleted file mode 100644 index 9485e5e..0000000 Binary files a/public/static/admin/UEditor/dialogs/charts/images/charts0.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/charts/images/charts1.png b/public/static/admin/UEditor/dialogs/charts/images/charts1.png deleted file mode 100644 index b5a0039..0000000 Binary files a/public/static/admin/UEditor/dialogs/charts/images/charts1.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/charts/images/charts2.png b/public/static/admin/UEditor/dialogs/charts/images/charts2.png deleted file mode 100644 index 7c91a39..0000000 Binary files a/public/static/admin/UEditor/dialogs/charts/images/charts2.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/charts/images/charts3.png b/public/static/admin/UEditor/dialogs/charts/images/charts3.png deleted file mode 100644 index a6bc29b..0000000 Binary files a/public/static/admin/UEditor/dialogs/charts/images/charts3.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/charts/images/charts4.png b/public/static/admin/UEditor/dialogs/charts/images/charts4.png deleted file mode 100644 index 742006a..0000000 Binary files a/public/static/admin/UEditor/dialogs/charts/images/charts4.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/charts/images/charts5.png b/public/static/admin/UEditor/dialogs/charts/images/charts5.png deleted file mode 100644 index c49a296..0000000 Binary files a/public/static/admin/UEditor/dialogs/charts/images/charts5.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/emotion.css b/public/static/admin/UEditor/dialogs/emotion/emotion.css deleted file mode 100644 index f801105..0000000 --- a/public/static/admin/UEditor/dialogs/emotion/emotion.css +++ /dev/null @@ -1,43 +0,0 @@ -.jd img{ - background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top; - cursor:pointer;width:35px;height:35px;display:block; -} -.pp img{ - background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top; - cursor:pointer;width:25px;height:25px;display:block; -} -.ldw img{ - background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top; - cursor:pointer;width:35px;height:35px;display:block; -} -.tsj img{ - background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top; - cursor:pointer;width:35px;height:35px;display:block; -} -.cat img{ - background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top; - cursor:pointer;width:35px;height:35px;display:block; -} -.bb img{ - background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top; - cursor:pointer;width:35px;height:35px;display:block; -} -.youa img{ - background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top; - cursor:pointer;width:35px;height:35px;display:block; -} - -.smileytable td {height: 37px;} -#tabPanel{margin-left:5px;overflow: hidden;} -#tabContent {float:left;background:#FFFFFF;} -#tabContent div{display: none;width:480px;overflow:hidden;} -#tabIconReview.show{left:17px;display:block;} -.menuFocus{background:#ACCD3C;} -.menuDefault{background:#FFFFFF;} -#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;} -img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;} - -.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;} -.tabbody table{width: 100%;} -.tabbody td{border:1px solid #BAC498;} -.tabbody td span{display: block;zoom:1;padding:0 4px;} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/emotion/emotion.html b/public/static/admin/UEditor/dialogs/emotion/emotion.html deleted file mode 100644 index fca0850..0000000 --- a/public/static/admin/UEditor/dialogs/emotion/emotion.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - -
    -
    - - - - - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    - - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/emotion/emotion.js b/public/static/admin/UEditor/dialogs/emotion/emotion.js deleted file mode 100644 index 6e158a9..0000000 --- a/public/static/admin/UEditor/dialogs/emotion/emotion.js +++ /dev/null @@ -1,186 +0,0 @@ -window.onload = function () { - editor.setOpt({ - emotionLocalization:false - }); - - emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/"; - emotion.SmileyBox = createTabList( emotion.tabNum ); - emotion.tabExist = createArr( emotion.tabNum ); - - initImgName(); - initEvtHandler( "tabHeads" ); -}; - -function initImgName() { - for ( var pro in emotion.SmilmgName ) { - var tempName = emotion.SmilmgName[pro], - tempBox = emotion.SmileyBox[pro], - tempStr = ""; - - if ( tempBox.length ) return; - for ( var i = 1; i <= tempName[1]; i++ ) { - tempStr = tempName[0]; - if ( i < 10 ) tempStr = tempStr + '0'; - tempStr = tempStr + i + '.gif'; - tempBox.push( tempStr ); - } - } -} - -function initEvtHandler( conId ) { - var tabHeads = $G( conId ); - for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) { - var tabObj = tabHeads.childNodes[i]; - if ( tabObj.nodeType == 1 ) { - domUtils.on( tabObj, "click", (function ( index ) { - return function () { - switchTab( index ); - }; - })( j ) ); - j++; - } - } - switchTab( 0 ); - $G( "tabIconReview" ).style.display = 'none'; -} - -function InsertSmiley( url, evt ) { - var obj = { - src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url - }; - obj._src = obj.src; - editor.execCommand( 'insertimage', obj ); - if ( !evt.ctrlKey ) { - dialog.popup.hide(); - } -} - -function switchTab( index ) { - - autoHeight( index ); - if ( emotion.tabExist[index] == 0 ) { - emotion.tabExist[index] = 1; - createTab( 'tab' + index ); - } - //获取呈现元素句柄数组 - var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ), - tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ), - i = 0, L = tabHeads.length; - //隐藏所有呈现元素 - for ( ; i < L; i++ ) { - tabHeads[i].className = ""; - tabBodys[i].style.display = "none"; - } - //显示对应呈现元素 - tabHeads[index].className = "focus"; - tabBodys[index].style.display = "block"; -} - -function autoHeight( index ) { - var iframe = dialog.getDom( "iframe" ), - parent = iframe.parentNode.parentNode; - switch ( index ) { - case 0: - iframe.style.height = "380px"; - parent.style.height = "392px"; - break; - case 1: - iframe.style.height = "220px"; - parent.style.height = "232px"; - break; - case 2: - iframe.style.height = "260px"; - parent.style.height = "272px"; - break; - case 3: - iframe.style.height = "300px"; - parent.style.height = "312px"; - break; - case 4: - iframe.style.height = "140px"; - parent.style.height = "152px"; - break; - case 5: - iframe.style.height = "260px"; - parent.style.height = "272px"; - break; - case 6: - iframe.style.height = "230px"; - parent.style.height = "242px"; - break; - default: - - } -} - - -function createTab( tabName ) { - var faceVersion = "?v=1.1", //版本号 - tab = $G( tabName ), //获取将要生成的Div句柄 - imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径 - positionLine = 11 / 2, //中间数 - iWidth = iHeight = 35, //图片长宽 - iColWidth = 3, //表格剩余空间的显示比例 - tableCss = emotion.imageCss[tabName], - cssOffset = emotion.imageCssOffset[tabName], - textHTML = [''], - i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage, - sUrl, realUrl, posflag, offset, infor; - - for ( ; i < imgNum; ) { - textHTML.push( '' ); - for ( var j = 0; j < imgColNum; j++, i++ ) { - faceImage = emotion.SmileyBox[tabName][i]; - if ( faceImage ) { - sUrl = imagePath + faceImage + faceVersion; - realUrl = imagePath + faceImage; - posflag = j < positionLine ? 0 : 1; - offset = cssOffset * i * (-1) - 1; - infor = emotion.SmileyInfor[tabName][i]; - - textHTML.push( '' ); - } - textHTML.push( '' ); - } - textHTML.push( '
    ' ); - textHTML.push( '' ); - textHTML.push( '' ); - textHTML.push( '' ); - } else { - textHTML.push( '' ); - } - textHTML.push( '
    ' ); - textHTML = textHTML.join( "" ); - tab.innerHTML = textHTML; -} - -function over( td, srcPath, posFlag ) { - td.style.backgroundColor = "#ACCD3C"; - $G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")"; - if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show"; - $G( "tabIconReview" ).style.display = 'block'; -} - -function out( td ) { - td.style.backgroundColor = "transparent"; - var tabIconRevew = $G( "tabIconReview" ); - tabIconRevew.className = ""; - tabIconRevew.style.display = 'none'; -} - -function createTabList( tabNum ) { - var obj = {}; - for ( var i = 0; i < tabNum; i++ ) { - obj["tab" + i] = []; - } - return obj; -} - -function createArr( tabNum ) { - var arr = []; - for ( var i = 0; i < tabNum; i++ ) { - arr[i] = 0; - } - return arr; -} - diff --git a/public/static/admin/UEditor/dialogs/emotion/images/0.gif b/public/static/admin/UEditor/dialogs/emotion/images/0.gif deleted file mode 100644 index 6964168..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/0.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/images/bface.gif b/public/static/admin/UEditor/dialogs/emotion/images/bface.gif deleted file mode 100644 index 14fe618..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/bface.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/images/cface.gif b/public/static/admin/UEditor/dialogs/emotion/images/cface.gif deleted file mode 100644 index bff947f..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/cface.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/images/fface.gif b/public/static/admin/UEditor/dialogs/emotion/images/fface.gif deleted file mode 100644 index 0d8a6af..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/fface.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/images/jxface2.gif b/public/static/admin/UEditor/dialogs/emotion/images/jxface2.gif deleted file mode 100644 index a959c90..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/jxface2.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/images/neweditor-tab-bg.png b/public/static/admin/UEditor/dialogs/emotion/images/neweditor-tab-bg.png deleted file mode 100644 index 8f398b0..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/neweditor-tab-bg.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/images/tface.gif b/public/static/admin/UEditor/dialogs/emotion/images/tface.gif deleted file mode 100644 index 1354f54..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/tface.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/images/wface.gif b/public/static/admin/UEditor/dialogs/emotion/images/wface.gif deleted file mode 100644 index 5667160..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/wface.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/emotion/images/yface.gif b/public/static/admin/UEditor/dialogs/emotion/images/yface.gif deleted file mode 100644 index 51608be..0000000 Binary files a/public/static/admin/UEditor/dialogs/emotion/images/yface.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/gmap/gmap.html b/public/static/admin/UEditor/dialogs/gmap/gmap.html deleted file mode 100644 index c4cbfe6..0000000 --- a/public/static/admin/UEditor/dialogs/gmap/gmap.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - -
    - - - - - - -
    -
    -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/help/help.css b/public/static/admin/UEditor/dialogs/help/help.css deleted file mode 100644 index 4478475..0000000 --- a/public/static/admin/UEditor/dialogs/help/help.css +++ /dev/null @@ -1,7 +0,0 @@ -.wrapper{width: 370px;margin: 10px auto;zoom: 1;} -.tabbody{height: 360px;} -.tabbody .panel{width:100%;height: 360px;position: absolute;background: #fff;} -.tabbody .panel h1{font-size:26px;margin: 5px 0 0 5px;} -.tabbody .panel p{font-size:12px;margin: 5px 0 0 5px;} -.tabbody table{width:90%;line-height: 20px;margin: 5px 0 0 5px;;} -.tabbody table thead{font-weight: bold;line-height: 25px;} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/help/help.html b/public/static/admin/UEditor/dialogs/help/help.html deleted file mode 100644 index 9e50060..0000000 --- a/public/static/admin/UEditor/dialogs/help/help.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - 帮助 - - - - - -
    -
    - - -
    -
    -
    -

    UEditor

    -

    -

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ctrl+b
    ctrl+c
    ctrl+x
    ctrl+v
    ctrl+y
    ctrl+z
    ctrl+i
    ctrl+u
    ctrl+a
    shift+enter
    alt+z
    -
    -
    -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/help/help.js b/public/static/admin/UEditor/dialogs/help/help.js deleted file mode 100644 index 9a2272e..0000000 --- a/public/static/admin/UEditor/dialogs/help/help.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: xuheng - * Date: 12-9-26 - * Time: 下午1:06 - * To change this template use File | Settings | File Templates. - */ -/** - * tab点击处理事件 - * @param tabHeads - * @param tabBodys - * @param obj - */ -function clickHandler( tabHeads,tabBodys,obj ) { - //head样式更改 - for ( var k = 0, len = tabHeads.length; k < len; k++ ) { - tabHeads[k].className = ""; - } - obj.className = "focus"; - //body显隐 - var tabSrc = obj.getAttribute( "tabSrc" ); - for ( var j = 0, length = tabBodys.length; j < length; j++ ) { - var body = tabBodys[j], - id = body.getAttribute( "id" ); - body.onclick = function(){ - this.style.zoom = 1; - }; - if ( id != tabSrc ) { - body.style.zIndex = 1; - } else { - body.style.zIndex = 200; - } - } - -} - -/** - * TAB切换 - * @param tabParentId tab的父节点ID或者对象本身 - */ -function switchTab( tabParentId ) { - var tabElements = $G( tabParentId ).children, - tabHeads = tabElements[0].children, - tabBodys = tabElements[1].children; - - for ( var i = 0, length = tabHeads.length; i < length; i++ ) { - var head = tabHeads[i]; - if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head ); - head.onclick = function () { - clickHandler(tabHeads,tabBodys,this); - } - } -} -switchTab("helptab"); - -document.getElementById('version').innerHTML = parent.UE.version; \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/image/image.css b/public/static/admin/UEditor/dialogs/image/image.css deleted file mode 100644 index 52c2295..0000000 --- a/public/static/admin/UEditor/dialogs/image/image.css +++ /dev/null @@ -1,894 +0,0 @@ -@charset "utf-8"; -/* dialog样式 */ -.wrapper { - zoom: 1; - width: 630px; - *width: 626px; - height: 380px; - margin: 0 auto; - padding: 10px; - position: relative; - font-family: sans-serif; -} - -/*tab样式框大小*/ -.tabhead { - float:left; -} -.tabbody { - width: 100%; - height: 346px; - position: relative; - clear: both; -} - -.tabbody .panel { - position: absolute; - width: 0; - height: 0; - background: #fff; - overflow: hidden; - display: none; -} - -.tabbody .panel.focus { - width: 100%; - height: 346px; - display: block; -} - -/* 图片对齐方式 */ -.alignBar{ - float:right; - margin-top: 5px; - position: relative; -} - -.alignBar .algnLabel{ - float:left; - height: 20px; - line-height: 20px; -} - -.alignBar #alignIcon{ - zoom:1; - _display: inline; - display: inline-block; - position: relative; -} -.alignBar #alignIcon span{ - float: left; - cursor: pointer; - display: block; - width: 19px; - height: 17px; - margin-right: 3px; - margin-left: 3px; - background-image: url(./images/alignicon.jpg); -} -.alignBar #alignIcon .none-align{ - background-position: 0 -18px; -} -.alignBar #alignIcon .left-align{ - background-position: -20px -18px; -} -.alignBar #alignIcon .right-align{ - background-position: -40px -18px; -} -.alignBar #alignIcon .center-align{ - background-position: -60px -18px; -} -.alignBar #alignIcon .none-align.focus{ - background-position: 0 0; -} -.alignBar #alignIcon .left-align.focus{ - background-position: -20px 0; -} -.alignBar #alignIcon .right-align.focus{ - background-position: -40px 0; -} -.alignBar #alignIcon .center-align.focus{ - background-position: -60px 0; -} - - - - -/* 远程图片样式 */ -#remote { - z-index: 200; -} - -#remote .top{ - width: 100%; - margin-top: 25px; -} -#remote .left{ - display: block; - float: left; - width: 300px; - height:10px; -} -#remote .right{ - display: block; - float: right; - width: 300px; - height:10px; -} -#remote .row{ - margin-left: 20px; - clear: both; - height: 40px; -} - -#remote .row label{ - text-align: center; - width: 50px; - zoom:1; - _display: inline; - display:inline-block; - vertical-align: middle; -} -#remote .row label.algnLabel{ - float: left; - -} - -#remote input.text{ - width: 150px; - padding: 3px 6px; - font-size: 14px; - line-height: 1.42857143; - color: #555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -} -#remote input.text:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); -} -#remote #url{ - width: 500px; - margin-bottom: 2px; -} -#remote #width, -#remote #height{ - width: 20px; - margin-left: 2px; - margin-right: 2px; -} -#remote #border, -#remote #vhSpace, -#remote #title{ - width: 180px; - margin-right: 5px; -} -#remote #lock{ -} -#remote #lockicon{ - zoom: 1; - _display:inline; - display: inline-block; - width: 20px; - height: 20px; - background: url("../../themes/default/images/lock.gif") -13px -13px no-repeat; - vertical-align: middle; -} -#remote #preview{ - clear: both; - width: 260px; - height: 240px; - z-index: 9999; - margin-top: 10px; - background-color: #eee; - overflow: hidden; -} - -/* 上传图片 */ -.tabbody #upload.panel { - width: 0; - height: 0; - overflow: hidden; - position: absolute !important; - clip: rect(1px, 1px, 1px, 1px); - background: #fff; - display: block; -} - -.tabbody #upload.panel.focus { - width: 100%; - height: 346px; - display: block; - clip: auto; -} - -#upload .queueList { - margin: 0; - width: 100%; - height: 100%; - position: absolute; - overflow: hidden; -} - -#upload p { - margin: 0; -} - -.element-invisible { - width: 0 !important; - height: 0 !important; - border: 0; - padding: 0; - margin: 0; - overflow: hidden; - position: absolute !important; - clip: rect(1px, 1px, 1px, 1px); -} - -#upload .placeholder { - margin: 10px; - border: 2px dashed #e6e6e6; - *border: 0px dashed #e6e6e6; - height: 172px; - padding-top: 150px; - text-align: center; - background: url(./images/image.png) center 70px no-repeat; - color: #cccccc; - font-size: 18px; - position: relative; - top:0; - *top: 10px; -} - -#upload .placeholder .webuploader-pick { - font-size: 18px; - background: #00b7ee; - border-radius: 3px; - line-height: 44px; - padding: 0 30px; - *width: 120px; - color: #fff; - display: inline-block; - margin: 0 auto 20px auto; - cursor: pointer; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); -} - -#upload .placeholder .webuploader-pick-hover { - background: #00a2d4; -} - - -#filePickerContainer { - text-align: center; -} - -#upload .placeholder .flashTip { - color: #666666; - font-size: 12px; - position: absolute; - width: 100%; - text-align: center; - bottom: 20px; -} - -#upload .placeholder .flashTip a { - color: #0785d1; - text-decoration: none; -} - -#upload .placeholder .flashTip a:hover { - text-decoration: underline; -} - -#upload .placeholder.webuploader-dnd-over { - border-color: #999999; -} - -#upload .filelist { - list-style: none; - margin: 0; - padding: 0; - overflow-x: hidden; - overflow-y: auto; - position: relative; - height: 300px; -} - -#upload .filelist:after { - content: ''; - display: block; - width: 0; - height: 0; - overflow: hidden; - clear: both; - position: relative; -} - -#upload .filelist li { - width: 113px; - height: 113px; - background: url(./images/bg.png); - text-align: center; - margin: 9px 0 0 9px; - *margin: 6px 0 0 6px; - position: relative; - display: block; - float: left; - overflow: hidden; - font-size: 12px; -} - -#upload .filelist li p.log { - position: relative; - top: -45px; -} - -#upload .filelist li p.title { - position: absolute; - top: 0; - left: 0; - width: 100%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - top: 5px; - text-indent: 5px; - text-align: left; -} - -#upload .filelist li p.progress { - position: absolute; - width: 100%; - bottom: 0; - left: 0; - height: 8px; - overflow: hidden; - z-index: 50; - margin: 0; - border-radius: 0; - background: none; - -webkit-box-shadow: 0 0 0; -} - -#upload .filelist li p.progress span { - display: none; - overflow: hidden; - width: 0; - height: 100%; - background: #1483d8 url(./images/progress.png) repeat-x; - - -webit-transition: width 200ms linear; - -moz-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; - transition: width 200ms linear; - - -webkit-animation: progressmove 2s linear infinite; - -moz-animation: progressmove 2s linear infinite; - -o-animation: progressmove 2s linear infinite; - -ms-animation: progressmove 2s linear infinite; - animation: progressmove 2s linear infinite; - - -webkit-transform: translateZ(0); -} - -@-webkit-keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -@-moz-keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -@keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -#upload .filelist li p.imgWrap { - position: relative; - z-index: 2; - line-height: 113px; - vertical-align: middle; - overflow: hidden; - width: 113px; - height: 113px; - - -webkit-transform-origin: 50% 50%; - -moz-transform-origin: 50% 50%; - -o-transform-origin: 50% 50%; - -ms-transform-origin: 50% 50%; - transform-origin: 50% 50%; - - -webit-transition: 200ms ease-out; - -moz-transition: 200ms ease-out; - -o-transition: 200ms ease-out; - -ms-transition: 200ms ease-out; - transition: 200ms ease-out; -} - -#upload .filelist li img { - width: 100%; -} - -#upload .filelist li p.error { - background: #f43838; - color: #fff; - position: absolute; - bottom: 0; - left: 0; - height: 28px; - line-height: 28px; - width: 100%; - z-index: 100; - display:none; -} - -#upload .filelist li .success { - display: block; - position: absolute; - left: 0; - bottom: 0; - height: 40px; - width: 100%; - z-index: 200; - background: url(./images/success.png) no-repeat right bottom; - background: url(./images/success.gif) no-repeat right bottom \9; -} - -#upload .filelist li.filePickerBlock { - width: 113px; - height: 113px; - background: url(./images/image.png) no-repeat center 12px; - border: 1px solid #eeeeee; - border-radius: 0; -} -#upload .filelist li.filePickerBlock div.webuploader-pick { - width: 100%; - height: 100%; - margin: 0; - padding: 0; - opacity: 0; - background: none; - font-size: 0; -} - -#upload .filelist div.file-panel { - position: absolute; - height: 0; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0; - background: rgba(0, 0, 0, 0.5); - width: 100%; - top: 0; - left: 0; - overflow: hidden; - z-index: 300; -} - -#upload .filelist div.file-panel span { - width: 24px; - height: 24px; - display: inline; - float: right; - text-indent: -9999px; - overflow: hidden; - background: url(./images/icons.png) no-repeat; - background: url(./images/icons.gif) no-repeat \9; - margin: 5px 1px 1px; - cursor: pointer; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -#upload .filelist div.file-panel span.rotateLeft { - display:none; - background-position: 0 -24px; -} - -#upload .filelist div.file-panel span.rotateLeft:hover { - background-position: 0 0; -} - -#upload .filelist div.file-panel span.rotateRight { - display:none; - background-position: -24px -24px; -} - -#upload .filelist div.file-panel span.rotateRight:hover { - background-position: -24px 0; -} - -#upload .filelist div.file-panel span.cancel { - background-position: -48px -24px; -} - -#upload .filelist div.file-panel span.cancel:hover { - background-position: -48px 0; -} - -#upload .statusBar { - height: 45px; - border-bottom: 1px solid #dadada; - margin: 0 10px; - padding: 0; - line-height: 45px; - vertical-align: middle; - position: relative; -} - -#upload .statusBar .progress { - border: 1px solid #1483d8; - width: 198px; - background: #fff; - height: 18px; - position: absolute; - top: 12px; - display: none; - text-align: center; - line-height: 18px; - color: #6dbfff; - margin: 0 10px 0 0; -} -#upload .statusBar .progress span.percentage { - width: 0; - height: 100%; - left: 0; - top: 0; - background: #1483d8; - position: absolute; -} -#upload .statusBar .progress span.text { - position: relative; - z-index: 10; -} - -#upload .statusBar .info { - display: inline-block; - font-size: 14px; - color: #666666; -} - -#upload .statusBar .btns { - position: absolute; - top: 7px; - right: 0; - line-height: 30px; -} - -#filePickerBtn { - display: inline-block; - float: left; -} -#upload .statusBar .btns .webuploader-pick, -#upload .statusBar .btns .uploadBtn, -#upload .statusBar .btns .uploadBtn.state-uploading, -#upload .statusBar .btns .uploadBtn.state-paused { - background: #ffffff; - border: 1px solid #cfcfcf; - color: #565656; - padding: 0 18px; - display: inline-block; - border-radius: 3px; - margin-left: 10px; - cursor: pointer; - font-size: 14px; - float: left; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -#upload .statusBar .btns .webuploader-pick-hover, -#upload .statusBar .btns .uploadBtn:hover, -#upload .statusBar .btns .uploadBtn.state-uploading:hover, -#upload .statusBar .btns .uploadBtn.state-paused:hover { - background: #f0f0f0; -} - -#upload .statusBar .btns .uploadBtn, -#upload .statusBar .btns .uploadBtn.state-paused{ - background: #00b7ee; - color: #fff; - border-color: transparent; -} -#upload .statusBar .btns .uploadBtn:hover, -#upload .statusBar .btns .uploadBtn.state-paused:hover{ - background: #00a2d4; -} - -#upload .statusBar .btns .uploadBtn.disabled { - pointer-events: none; - filter:alpha(opacity=60); - -moz-opacity:0.6; - -khtml-opacity: 0.6; - opacity: 0.6; -} - - - -/* 图片管理样式 */ -#online { - width: 100%; - height: 336px; - padding: 10px 0 0 0; -} -#online #imageList{ - width: 100%; - height: 100%; - overflow-x: hidden; - overflow-y: auto; - position: relative; -} -#online ul { - display: block; - list-style: none; - margin: 0; - padding: 0; -} -#online li { - float: left; - display: block; - list-style: none; - padding: 0; - width: 113px; - height: 113px; - margin: 0 0 9px 9px; - *margin: 0 0 6px 6px; - background-color: #eee; - overflow: hidden; - cursor: pointer; - position: relative; -} -#online li.clearFloat { - float: none; - clear: both; - display: block; - width:0; - height:0; - margin: 0; - padding: 0; -} -#online li img { - cursor: pointer; -} -#online li .icon { - cursor: pointer; - width: 113px; - height: 113px; - position: absolute; - top: 0; - left: 0; - z-index: 2; - border: 0; - background-repeat: no-repeat; -} -#online li .icon:hover { - width: 107px; - height: 107px; - border: 3px solid #1094fa; -} -#online li.selected .icon { - background-image: url(images/success.png); - background-image: url(images/success.gif)\9; - background-position: 75px 75px; -} -#online li.selected .icon:hover { - width: 107px; - height: 107px; - border: 3px solid #1094fa; - background-position: 72px 72px; -} - - -/* 图片搜索样式 */ -#search .searchBar { - width: 100%; - height: 30px; - margin: 10px 0 5px 0; - padding: 0; -} - -#search input.text{ - width: 150px; - padding: 3px 6px; - font-size: 14px; - line-height: 1.42857143; - color: #555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -} -#search input.text:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); -} -#search input.searchTxt { - margin-left:5px; - padding-left: 5px; - background: #FFF; - width: 300px; - *width: 260px; - height: 21px; - line-height: 21px; - float: left; - dislay: block; -} - -#search .searchType { - width: 65px; - height: 28px; - padding:0; - line-height: 28px; - border: 1px solid #d7d7d7; - border-radius: 0; - vertical-align: top; - margin-left: 5px; - float: left; - dislay: block; -} - -#search #searchBtn, -#search #searchReset { - display: inline-block; - margin-bottom: 0; - margin-right: 5px; - padding: 4px 10px; - font-weight: 400; - text-align: center; - vertical-align: middle; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - white-space: nowrap; - font-size: 14px; - border-radius: 4px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - vertical-align: top; - float: right; -} - -#search #searchBtn { - color: white; - border-color: #285e8e; - background-color: #3b97d7; -} -#search #searchReset { - color: #333; - border-color: #ccc; - background-color: #fff; -} -#search #searchBtn:hover { - background-color: #3276b1; -} -#search #searchReset:hover { - background-color: #eee; -} - -#search .msg { - margin-left: 5px; -} - -#search .searchList{ - width: 100%; - height: 300px; - overflow: hidden; - clear: both; -} -#search .searchList ul{ - margin:0; - padding:0; - list-style:none; - clear: both; - width: 100%; - height: 100%; - overflow-x: hidden; - overflow-y: auto; - zoom: 1; - position: relative; -} - -#search .searchList li { - list-style:none; - float: left; - display: block; - width: 115px; - margin: 5px 10px 5px 20px; - *margin: 5px 10px 5px 15px; - padding:0; - font-size: 12px; - box-shadow: 0 1px 3px rgba(0, 0, 0, .3); - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, .3); - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, .3); - position: relative; - vertical-align: top; - text-align: center; - overflow: hidden; - cursor: pointer; - filter: alpha(Opacity=100); - -moz-opacity: 1; - opacity: 1; - border: 2px solid #eee; -} - -#search .searchList li.selected { - filter: alpha(Opacity=40); - -moz-opacity: 0.4; - opacity: 0.4; - border: 2px solid #00a0e9; -} - -#search .searchList li p { - background-color: #eee; - margin: 0; - padding: 0; - position: relative; - width:100%; - height:115px; - overflow: hidden; -} - -#search .searchList li p img { - cursor: pointer; - border: 0; -} - -#search .searchList li a { - color: #999; - border-top: 1px solid #F2F2F2; - background: #FAFAFA; - text-align: center; - display: block; - padding: 0 5px; - width: 105px; - height:32px; - line-height:32px; - white-space:nowrap; - text-overflow:ellipsis; - text-decoration: none; - overflow: hidden; - word-break: break-all; -} - -#search .searchList a:hover { - text-decoration: underline; - color: #333; -} -#search .searchList .clearFloat{ - clear: both; -} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/image/image.html b/public/static/admin/UEditor/dialogs/image/image.html deleted file mode 100644 index 08ca022..0000000 --- a/public/static/admin/UEditor/dialogs/image/image.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - ueditor图片对话框 - - - - - - - - - - - - - - -
    -
    - - - - -
    -
    - - - - - - - - -
    -
    - - -
    -
    -
    - - -
    -
    -
    -
    - -   px -   px - -
    -
    - - px -
    -
    - - px -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - 0% - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
      -
    • -
    -
    -
    - - -
    -
    -
    - - - - -
    -
    - - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/image/image.js b/public/static/admin/UEditor/dialogs/image/image.js deleted file mode 100644 index 0a59052..0000000 --- a/public/static/admin/UEditor/dialogs/image/image.js +++ /dev/null @@ -1,1148 +0,0 @@ -/** - * User: Jinqn - * Date: 14-04-08 - * Time: 下午16:34 - * 上传图片对话框逻辑代码,包括tab: 远程图片/上传图片/在线图片/搜索图片 - */ - -(function () { - - var remoteImage, - uploadImage, - onlineImage, - searchImage; - - window.onload = function () { - initTabs(); - initAlign(); - initButtons(); - }; - - /* 初始化tab标签 */ - function initTabs() { - var tabs = $G('tabhead').children; - for (var i = 0; i < tabs.length; i++) { - domUtils.on(tabs[i], "click", function (e) { - var target = e.target || e.srcElement; - setTabFocus(target.getAttribute('data-content-id')); - }); - } - - var img = editor.selection.getRange().getClosedNode(); - if (img && img.tagName && img.tagName.toLowerCase() == 'img') { - setTabFocus('remote'); - } else { - setTabFocus('upload'); - } - } - - /* 初始化tabbody */ - function setTabFocus(id) { - if(!id) return; - var i, bodyId, tabs = $G('tabhead').children; - for (i = 0; i < tabs.length; i++) { - bodyId = tabs[i].getAttribute('data-content-id'); - if (bodyId == id) { - domUtils.addClass(tabs[i], 'focus'); - domUtils.addClass($G(bodyId), 'focus'); - } else { - domUtils.removeClasses(tabs[i], 'focus'); - domUtils.removeClasses($G(bodyId), 'focus'); - } - } - switch (id) { - case 'remote': - remoteImage = remoteImage || new RemoteImage(); - break; - case 'upload': - setAlign(editor.getOpt('imageInsertAlign')); - uploadImage = uploadImage || new UploadImage('queueList'); - break; - case 'online': - setAlign(editor.getOpt('imageManagerInsertAlign')); - onlineImage = onlineImage || new OnlineImage('imageList'); - onlineImage.reset(); - break; - case 'search': - setAlign(editor.getOpt('imageManagerInsertAlign')); - searchImage = searchImage || new SearchImage(); - break; - } - } - - /* 初始化onok事件 */ - function initButtons() { - - dialog.onok = function () { - var remote = false, list = [], id, tabs = $G('tabhead').children; - for (var i = 0; i < tabs.length; i++) { - if (domUtils.hasClass(tabs[i], 'focus')) { - id = tabs[i].getAttribute('data-content-id'); - break; - } - } - - switch (id) { - case 'remote': - list = remoteImage.getInsertList(); - break; - case 'upload': - list = uploadImage.getInsertList(); - var count = uploadImage.getQueueCount(); - if (count) { - $('.info', '#queueList').html('' + '还有2个未上传文件'.replace(/[\d]/, count) + ''); - return false; - } - break; - case 'online': - list = onlineImage.getInsertList(); - break; - case 'search': - list = searchImage.getInsertList(); - remote = true; - break; - } - - if(list) { - editor.execCommand('insertimage', list); - remote && editor.fireEvent("catchRemoteImage"); - } - }; - } - - - /* 初始化对其方式的点击事件 */ - function initAlign(){ - /* 点击align图标 */ - domUtils.on($G("alignIcon"), 'click', function(e){ - var target = e.target || e.srcElement; - if(target.className && target.className.indexOf('-align') != -1) { - setAlign(target.getAttribute('data-align')); - } - }); - } - - /* 设置对齐方式 */ - function setAlign(align){ - align = align || 'none'; - var aligns = $G("alignIcon").children; - for(i = 0; i < aligns.length; i++){ - if(aligns[i].getAttribute('data-align') == align) { - domUtils.addClass(aligns[i], 'focus'); - $G("align").value = aligns[i].getAttribute('data-align'); - } else { - domUtils.removeClasses(aligns[i], 'focus'); - } - } - } - /* 获取对齐方式 */ - function getAlign(){ - var align = $G("align").value || 'none'; - return align == 'none' ? '':align; - } - - - /* 在线图片 */ - function RemoteImage(target) { - this.container = utils.isString(target) ? document.getElementById(target) : target; - this.init(); - } - RemoteImage.prototype = { - init: function () { - this.initContainer(); - this.initEvents(); - }, - initContainer: function () { - this.dom = { - 'url': $G('url'), - 'width': $G('width'), - 'height': $G('height'), - 'border': $G('border'), - 'vhSpace': $G('vhSpace'), - 'title': $G('title'), - 'align': $G('align') - }; - var img = editor.selection.getRange().getClosedNode(); - if (img) { - this.setImage(img); - } - }, - initEvents: function () { - var _this = this, - locker = $G('lock'); - - /* 改变url */ - domUtils.on($G("url"), 'keyup', updatePreview); - domUtils.on($G("border"), 'keyup', updatePreview); - domUtils.on($G("title"), 'keyup', updatePreview); - - domUtils.on($G("width"), 'keyup', function(){ - updatePreview(); - if(locker.checked) { - var proportion =locker.getAttribute('data-proportion'); - $G('height').value = Math.round(this.value / proportion); - } else { - _this.updateLocker(); - } - }); - domUtils.on($G("height"), 'keyup', function(){ - updatePreview(); - if(locker.checked) { - var proportion =locker.getAttribute('data-proportion'); - $G('width').value = Math.round(this.value * proportion); - } else { - _this.updateLocker(); - } - }); - domUtils.on($G("lock"), 'change', function(){ - var proportion = parseInt($G("width").value) /parseInt($G("height").value); - locker.setAttribute('data-proportion', proportion); - }); - - function updatePreview(){ - _this.setPreview(); - } - }, - updateLocker: function(){ - var width = $G('width').value, - height = $G('height').value, - locker = $G('lock'); - if(width && height && width == parseInt(width) && height == parseInt(height)) { - locker.disabled = false; - locker.title = ''; - } else { - locker.checked = false; - locker.disabled = 'disabled'; - locker.title = lang.remoteLockError; - } - }, - setImage: function(img){ - /* 不是正常的图片 */ - if (!img.tagName || img.tagName.toLowerCase() != 'img' && !img.getAttribute("src") || !img.src) return; - - var wordImgFlag = img.getAttribute("word_img"), - src = wordImgFlag ? wordImgFlag.replace("&", "&") : (img.getAttribute('_src') || img.getAttribute("src", 2).replace("&", "&")), - align = editor.queryCommandValue("imageFloat"); - - /* 防止onchange事件循环调用 */ - if (src !== $G("url").value) $G("url").value = src; - if(src) { - /* 设置表单内容 */ - $G("width").value = img.width || ''; - $G("height").value = img.height || ''; - $G("border").value = img.getAttribute("border") || '0'; - $G("vhSpace").value = img.getAttribute("vspace") || '0'; - $G("title").value = img.title || img.alt || ''; - setAlign(align); - this.setPreview(); - this.updateLocker(); - } - }, - getData: function(){ - var data = {}; - for(var k in this.dom){ - data[k] = this.dom[k].value; - } - return data; - }, - setPreview: function(){ - var url = $G('url').value, - ow = parseInt($G('width').value, 10) || 0, - oh = parseInt($G('height').value, 10) || 0, - border = parseInt($G('border').value, 10) || 0, - title = $G('title').value, - preview = $G('preview'), - width, - height; - - url = utils.unhtmlForUrl(url); - title = utils.unhtml(title); - - width = ((!ow || !oh) ? preview.offsetWidth:Math.min(ow, preview.offsetWidth)); - width = width+(border*2) > preview.offsetWidth ? width:(preview.offsetWidth - (border*2)); - height = (!ow || !oh) ? '':width*oh/ow; - - if(url) { - preview.innerHTML = ''; - } - }, - getInsertList: function () { - var data = this.getData(); - if(data['url']) { - return [{ - src: data['url'], - _src: data['url'], - width: data['width'] || '', - height: data['height'] || '', - border: data['border'] || '', - floatStyle: data['align'] || '', - vspace: data['vhSpace'] || '', - title: data['title'] || '', - alt: data['title'] || '', - style: "width:" + data['width'] + "px;height:" + data['height'] + "px;" - }]; - } else { - return []; - } - } - }; - - - - /* 上传图片 */ - function UploadImage(target) { - this.$wrap = target.constructor == String ? $('#' + target) : $(target); - this.init(); - } - UploadImage.prototype = { - init: function () { - this.imageList = []; - this.initContainer(); - this.initUploader(); - }, - initContainer: function () { - this.$queue = this.$wrap.find('.filelist'); - }, - /* 初始化容器 */ - initUploader: function () { - var _this = this, - $ = jQuery, // just in case. Make sure it's not an other libaray. - $wrap = _this.$wrap, - // 图片容器 - $queue = $wrap.find('.filelist'), - // 状态栏,包括进度和控制按钮 - $statusBar = $wrap.find('.statusBar'), - // 文件总体选择信息。 - $info = $statusBar.find('.info'), - // 上传按钮 - $upload = $wrap.find('.uploadBtn'), - // 上传按钮 - $filePickerBtn = $wrap.find('.filePickerBtn'), - // 上传按钮 - $filePickerBlock = $wrap.find('.filePickerBlock'), - // 没选择文件之前的内容。 - $placeHolder = $wrap.find('.placeholder'), - // 总体进度条 - $progress = $statusBar.find('.progress').hide(), - // 添加的文件数量 - fileCount = 0, - // 添加的文件总大小 - fileSize = 0, - // 优化retina, 在retina下这个值是2 - ratio = window.devicePixelRatio || 1, - // 缩略图大小 - thumbnailWidth = 113 * ratio, - thumbnailHeight = 113 * ratio, - // 可能有pedding, ready, uploading, confirm, done. - state = '', - // 所有文件的进度信息,key为file id - percentages = {}, - supportTransition = (function () { - var s = document.createElement('p').style, - r = 'transition' in s || - 'WebkitTransition' in s || - 'MozTransition' in s || - 'msTransition' in s || - 'OTransition' in s; - s = null; - return r; - })(), - // WebUploader实例 - uploader, - actionUrl = editor.getActionUrl(editor.getOpt('imageActionName')), - acceptExtensions = (editor.getOpt('imageAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, ''), - imageMaxSize = editor.getOpt('imageMaxSize'), - imageCompressBorder = editor.getOpt('imageCompressBorder'); - - if (!WebUploader.Uploader.support()) { - $('#filePickerReady').after($('
    ').html(lang.errorNotSupport)).hide(); - return; - } else if (!editor.getOpt('imageActionName')) { - $('#filePickerReady').after($('
    ').html(lang.errorLoadConfig)).hide(); - return; - } - - uploader = _this.uploader = WebUploader.create({ - pick: { - id: '#filePickerReady', - label: lang.uploadSelectFile - }, - accept: { - title: 'Images', - extensions: acceptExtensions, - mimeTypes: 'image/*' - }, - swf: '../../third-party/webuploader/Uploader.swf', - server: actionUrl, - fileVal: editor.getOpt('imageFieldName'), - duplicate: true, - fileSingleSizeLimit: imageMaxSize, // 默认 2 M - compress: editor.getOpt('imageCompressEnable') ? { - width: imageCompressBorder, - height: imageCompressBorder, - // 图片质量,只有type为`image/jpeg`的时候才有效。 - quality: 90, - // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false. - allowMagnify: false, - // 是否允许裁剪。 - crop: false, - // 是否保留头部meta信息。 - preserveHeaders: true - }:false - }); - uploader.addButton({ - id: '#filePickerBlock' - }); - uploader.addButton({ - id: '#filePickerBtn', - label: lang.uploadAddFile - }); - - setState('pedding'); - - // 当有文件添加进来时执行,负责view的创建 - function addFile(file) { - var $li = $('
  • ' + - '

    ' + file.name + '

    ' + - '

    ' + - '

    ' + - '
  • '), - - $btns = $('
    ' + - '' + lang.uploadDelete + '' + - '' + lang.uploadTurnRight + '' + - '' + lang.uploadTurnLeft + '
    ').appendTo($li), - $prgress = $li.find('p.progress span'), - $wrap = $li.find('p.imgWrap'), - $info = $('

    ').hide().appendTo($li), - - showError = function (code) { - switch (code) { - case 'exceed_size': - text = lang.errorExceedSize; - break; - case 'interrupt': - text = lang.errorInterrupt; - break; - case 'http': - text = lang.errorHttp; - break; - case 'not_allow_type': - text = lang.errorFileType; - break; - default: - text = lang.errorUploadRetry; - break; - } - $info.text(text).show(); - }; - - if (file.getStatus() === 'invalid') { - showError(file.statusText); - } else { - $wrap.text(lang.uploadPreview); - if (browser.ie && browser.version <= 7) { - $wrap.text(lang.uploadNoPreview); - } else { - uploader.makeThumb(file, function (error, src) { - if (error || !src) { - $wrap.text(lang.uploadNoPreview); - } else { - var $img = $(''); - $wrap.empty().append($img); - $img.on('error', function () { - $wrap.text(lang.uploadNoPreview); - }); - } - }, thumbnailWidth, thumbnailHeight); - } - percentages[ file.id ] = [ file.size, 0 ]; - file.rotation = 0; - - /* 检查文件格式 */ - if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) { - showError('not_allow_type'); - uploader.removeFile(file); - } - } - - file.on('statuschange', function (cur, prev) { - if (prev === 'progress') { - $prgress.hide().width(0); - } else if (prev === 'queued') { - $li.off('mouseenter mouseleave'); - $btns.remove(); - } - // 成功 - if (cur === 'error' || cur === 'invalid') { - showError(file.statusText); - percentages[ file.id ][ 1 ] = 1; - } else if (cur === 'interrupt') { - showError('interrupt'); - } else if (cur === 'queued') { - percentages[ file.id ][ 1 ] = 0; - } else if (cur === 'progress') { - $info.hide(); - $prgress.css('display', 'block'); - } else if (cur === 'complete') { - } - - $li.removeClass('state-' + prev).addClass('state-' + cur); - }); - - $li.on('mouseenter', function () { - $btns.stop().animate({height: 30}); - }); - $li.on('mouseleave', function () { - $btns.stop().animate({height: 0}); - }); - - $btns.on('click', 'span', function () { - var index = $(this).index(), - deg; - - switch (index) { - case 0: - uploader.removeFile(file); - return; - case 1: - file.rotation += 90; - break; - case 2: - file.rotation -= 90; - break; - } - - if (supportTransition) { - deg = 'rotate(' + file.rotation + 'deg)'; - $wrap.css({ - '-webkit-transform': deg, - '-mos-transform': deg, - '-o-transform': deg, - 'transform': deg - }); - } else { - $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')'); - } - - }); - - $li.insertBefore($filePickerBlock); - } - - // 负责view的销毁 - function removeFile(file) { - var $li = $('#' + file.id); - delete percentages[ file.id ]; - updateTotalProgress(); - $li.off().find('.file-panel').off().end().remove(); - } - - function updateTotalProgress() { - var loaded = 0, - total = 0, - spans = $progress.children(), - percent; - - $.each(percentages, function (k, v) { - total += v[ 0 ]; - loaded += v[ 0 ] * v[ 1 ]; - }); - - percent = total ? loaded / total : 0; - - spans.eq(0).text(Math.round(percent * 100) + '%'); - spans.eq(1).css('width', Math.round(percent * 100) + '%'); - updateStatus(); - } - - function setState(val, files) { - - if (val != state) { - - var stats = uploader.getStats(); - - $upload.removeClass('state-' + state); - $upload.addClass('state-' + val); - - switch (val) { - - /* 未选择文件 */ - case 'pedding': - $queue.addClass('element-invisible'); - $statusBar.addClass('element-invisible'); - $placeHolder.removeClass('element-invisible'); - $progress.hide(); $info.hide(); - uploader.refresh(); - break; - - /* 可以开始上传 */ - case 'ready': - $placeHolder.addClass('element-invisible'); - $queue.removeClass('element-invisible'); - $statusBar.removeClass('element-invisible'); - $progress.hide(); $info.show(); - $upload.text(lang.uploadStart); - uploader.refresh(); - break; - - /* 上传中 */ - case 'uploading': - $progress.show(); $info.hide(); - $upload.text(lang.uploadPause); - break; - - /* 暂停上传 */ - case 'paused': - $progress.show(); $info.hide(); - $upload.text(lang.uploadContinue); - break; - - case 'confirm': - $progress.show(); $info.hide(); - $upload.text(lang.uploadStart); - - stats = uploader.getStats(); - if (stats.successNum && !stats.uploadFailNum) { - setState('finish'); - return; - } - break; - - case 'finish': - $progress.hide(); $info.show(); - if (stats.uploadFailNum) { - $upload.text(lang.uploadRetry); - } else { - $upload.text(lang.uploadStart); - } - break; - } - - state = val; - updateStatus(); - - } - - if (!_this.getQueueCount()) { - $upload.addClass('disabled') - } else { - $upload.removeClass('disabled') - } - - } - - function updateStatus() { - var text = '', stats; - - if (state === 'ready') { - text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)); - } else if (state === 'confirm') { - stats = uploader.getStats(); - if (stats.uploadFailNum) { - text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum); - } - } else { - stats = uploader.getStats(); - text = lang.updateStatusFinish.replace('_', fileCount). - replace('_KB', WebUploader.formatSize(fileSize)). - replace('_', stats.successNum); - - if (stats.uploadFailNum) { - text += lang.updateStatusError.replace('_', stats.uploadFailNum); - } - } - - $info.html(text); - } - - uploader.on('fileQueued', function (file) { - fileCount++; - fileSize += file.size; - - if (fileCount === 1) { - $placeHolder.addClass('element-invisible'); - $statusBar.show(); - } - - addFile(file); - }); - - uploader.on('fileDequeued', function (file) { - fileCount--; - fileSize -= file.size; - - removeFile(file); - updateTotalProgress(); - }); - - uploader.on('filesQueued', function (file) { - if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) { - setState('ready'); - } - updateTotalProgress(); - }); - - uploader.on('all', function (type, files) { - switch (type) { - case 'uploadFinished': - setState('confirm', files); - break; - case 'startUpload': - /* 添加额外的GET参数 */ - var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', - url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params); - uploader.option('server', url); - setState('uploading', files); - break; - case 'stopUpload': - setState('paused', files); - break; - } - }); - - uploader.on('uploadBeforeSend', function (file, data, header) { - //这里可以通过data对象添加POST参数 - header['X_Requested_With'] = 'XMLHttpRequest'; - // HaoChuan9421 - if(editor.options.headers && Object.prototype.toString.apply(editor.options.headers) === "[object Object]"){ - for(var key in editor.options.headers){ - header[key] = editor.options.headers[key] - } - } - }); - - uploader.on('uploadProgress', function (file, percentage) { - var $li = $('#' + file.id), - $percent = $li.find('.progress span'); - - $percent.css('width', percentage * 100 + '%'); - percentages[ file.id ][ 1 ] = percentage; - updateTotalProgress(); - }); - - uploader.on('uploadSuccess', function (file, ret) { - var $file = $('#' + file.id); - try { - var responseText = (ret._raw || ret), - json = utils.str2json(responseText); - if (json.state == 'SUCCESS') { - _this.imageList.push(json); - $file.append(''); - } else { - $file.find('.error').text(json.state).show(); - } - } catch (e) { - $file.find('.error').text(lang.errorServerUpload).show(); - } - }); - - uploader.on('uploadError', function (file, code) { - }); - uploader.on('error', function (code, file) { - if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') { - addFile(file); - } - }); - uploader.on('uploadComplete', function (file, ret) { - }); - - $upload.on('click', function () { - if ($(this).hasClass('disabled')) { - return false; - } - - if (state === 'ready') { - uploader.upload(); - } else if (state === 'paused') { - uploader.upload(); - } else if (state === 'uploading') { - uploader.stop(); - } - }); - - $upload.addClass('state-' + state); - updateTotalProgress(); - }, - getQueueCount: function () { - var file, i, status, readyFile = 0, files = this.uploader.getFiles(); - for (i = 0; file = files[i++]; ) { - status = file.getStatus(); - if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++; - } - return readyFile; - }, - destroy: function () { - this.$wrap.remove(); - }, - getInsertList: function () { - var i, data, list = [], - align = getAlign(), - prefix = editor.getOpt('imageUrlPrefix'); - for (i = 0; i < this.imageList.length; i++) { - data = this.imageList[i]; - list.push({ - src: prefix + data.url, - _src: prefix + data.url, - title: data.title, - alt: data.original, - floatStyle: align - }); - } - return list; - } - }; - - - /* 在线图片 */ - function OnlineImage(target) { - this.container = utils.isString(target) ? document.getElementById(target) : target; - this.init(); - } - OnlineImage.prototype = { - init: function () { - this.reset(); - this.initEvents(); - }, - /* 初始化容器 */ - initContainer: function () { - this.container.innerHTML = ''; - this.list = document.createElement('ul'); - this.clearFloat = document.createElement('li'); - - domUtils.addClass(this.list, 'list'); - domUtils.addClass(this.clearFloat, 'clearFloat'); - - this.list.appendChild(this.clearFloat); - this.container.appendChild(this.list); - }, - /* 初始化滚动事件,滚动到地步自动拉取数据 */ - initEvents: function () { - var _this = this; - - /* 滚动拉取图片 */ - domUtils.on($G('imageList'), 'scroll', function(e){ - var panel = this; - if (panel.scrollHeight - (panel.offsetHeight + panel.scrollTop) < 10) { - _this.getImageData(); - } - }); - /* 选中图片 */ - domUtils.on(this.container, 'click', function (e) { - var target = e.target || e.srcElement, - li = target.parentNode; - - if (li.tagName.toLowerCase() == 'li') { - if (domUtils.hasClass(li, 'selected')) { - domUtils.removeClasses(li, 'selected'); - } else { - domUtils.addClass(li, 'selected'); - } - } - }); - }, - /* 初始化第一次的数据 */ - initData: function () { - - /* 拉取数据需要使用的值 */ - this.state = 0; - this.listSize = editor.getOpt('imageManagerListSize'); - this.listIndex = 0; - this.listEnd = false; - - /* 第一次拉取数据 */ - this.getImageData(); - }, - /* 重置界面 */ - reset: function() { - this.initContainer(); - this.initData(); - }, - /* 向后台拉取图片列表数据 */ - getImageData: function () { - var _this = this; - - if(!_this.listEnd && !this.isLoadingData) { - this.isLoadingData = true; - var url = editor.getActionUrl(editor.getOpt('imageManagerActionName')), - isJsonp = utils.isCrossDomainUrl(url); - ajax.request(url, { - 'timeout': 100000, - 'dataType': isJsonp ? 'jsonp':'', - 'data': utils.extend({ - start: this.listIndex, - size: this.listSize - }, editor.queryCommandValue('serverparam')), - 'method': 'get', - 'onsuccess': function (r) { - try { - var json = isJsonp ? r:eval('(' + r.responseText + ')'); - if (json.state == 'SUCCESS') { - _this.pushData(json.list); - _this.listIndex = parseInt(json.start) + parseInt(json.list.length); - if(_this.listIndex >= json.total) { - _this.listEnd = true; - } - _this.isLoadingData = false; - } - } catch (e) { - if(r.responseText.indexOf('ue_separate_ue') != -1) { - var list = r.responseText.split(r.responseText); - _this.pushData(list); - _this.listIndex = parseInt(list.length); - _this.listEnd = true; - _this.isLoadingData = false; - } - } - }, - 'onerror': function () { - _this.isLoadingData = false; - } - }); - } - }, - /* 添加图片到列表界面上 */ - pushData: function (list) { - var i, item, img, icon, _this = this, - urlPrefix = editor.getOpt('imageManagerUrlPrefix'); - for (i = 0; i < list.length; i++) { - if(list[i] && list[i].url) { - item = document.createElement('li'); - img = document.createElement('img'); - icon = document.createElement('span'); - - domUtils.on(img, 'load', (function(image){ - return function(){ - _this.scale(image, image.parentNode.offsetWidth, image.parentNode.offsetHeight); - } - })(img)); - img.width = 113; - img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) ); - img.setAttribute('_src', urlPrefix + list[i].url); - domUtils.addClass(icon, 'icon'); - - item.appendChild(img); - item.appendChild(icon); - this.list.insertBefore(item, this.clearFloat); - } - } - }, - /* 改变图片大小 */ - scale: function (img, w, h, type) { - var ow = img.width, - oh = img.height; - - if (type == 'justify') { - if (ow >= oh) { - img.width = w; - img.height = h * oh / ow; - img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; - } else { - img.width = w * ow / oh; - img.height = h; - img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; - } - } else { - if (ow >= oh) { - img.width = w * ow / oh; - img.height = h; - img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; - } else { - img.width = w; - img.height = h * oh / ow; - img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; - } - } - }, - getInsertList: function () { - var i, lis = this.list.children, list = [], align = getAlign(); - for (i = 0; i < lis.length; i++) { - if (domUtils.hasClass(lis[i], 'selected')) { - var img = lis[i].firstChild, - src = img.getAttribute('_src'); - list.push({ - src: src, - _src: src, - alt: src.substr(src.lastIndexOf('/') + 1), - floatStyle: align - }); - } - - } - return list; - } - }; - - /*搜索图片 */ - function SearchImage() { - this.init(); - } - SearchImage.prototype = { - init: function () { - this.initEvents(); - }, - initEvents: function(){ - var _this = this; - - /* 点击搜索按钮 */ - domUtils.on($G('searchBtn'), 'click', function(){ - var key = $G('searchTxt').value; - if(key && key != lang.searchRemind) { - _this.getImageData(); - } - }); - /* 点击清除妞 */ - domUtils.on($G('searchReset'), 'click', function(){ - $G('searchTxt').value = lang.searchRemind; - $G('searchListUl').innerHTML = ''; - $G('searchType').selectedIndex = 0; - }); - /* 搜索框聚焦 */ - domUtils.on($G('searchTxt'), 'focus', function(){ - var key = $G('searchTxt').value; - if(key && key == lang.searchRemind) { - $G('searchTxt').value = ''; - } - }); - /* 搜索框回车键搜索 */ - domUtils.on($G('searchTxt'), 'keydown', function(e){ - var keyCode = e.keyCode || e.which; - if (keyCode == 13) { - $G('searchBtn').click(); - } - }); - - /* 选中图片 */ - domUtils.on($G('searchList'), 'click', function(e){ - var target = e.target || e.srcElement, - li = target.parentNode.parentNode; - - if (li.tagName.toLowerCase() == 'li') { - if (domUtils.hasClass(li, 'selected')) { - domUtils.removeClasses(li, 'selected'); - } else { - domUtils.addClass(li, 'selected'); - } - } - }); - }, - encodeToGb2312:function (str){ - if(!str) return ''; - var strOut = "", - z = 'D2BBB6A18140C6DF814181428143CDF2D5C9C8FDC9CFCFC2D8A2B2BBD3EB8144D8A4B3F38145D7A8C7D2D8A7CAC08146C7F0B1FBD2B5B4D4B6ABCBBFD8A9814781488149B6AA814AC1BDD1CF814BC9A5D8AD814CB8F6D1BEE3DCD6D0814D814EB7E1814FB4AE8150C1D98151D8BC8152CDE8B5A4CEAAD6F78153C0F6BED9D8AF815481558156C4CB8157BEC38158D8B1C3B4D2E58159D6AECEDAD5A7BAF5B7A6C0D6815AC6B9C5D2C7C7815BB9D4815CB3CBD2D2815D815ED8BFBEC5C6F2D2B2CFB0CFE7815F816081618162CAE981638164D8C081658166816781688169816AC2F2C2D2816BC8E9816C816D816E816F817081718172817381748175C7AC8176817781788179817A817B817CC1CB817DD3E8D5F9817ECAC2B6FED8A1D3DABFF78180D4C6BBA5D8C1CEE5BEAE81818182D8A88183D1C7D0A9818481858186D8BDD9EFCDF6BFBA8187BDBBBAA5D2E0B2FABAE0C4B68188CFEDBEA9CDA4C1C18189818A818BC7D7D9F1818CD9F4818D818E818F8190C8CBD8E9819181928193D2DACAB2C8CAD8ECD8EAD8C6BDF6C6CDB3F08194D8EBBDF1BDE98195C8D4B4D381968197C2D88198B2D6D7D0CACBCBFBD5CCB8B6CFC98199819A819BD9DAD8F0C7AA819CD8EE819DB4FAC1EED2D4819E819FD8ED81A0D2C7D8EFC3C781A181A281A3D1F681A4D6D9D8F281A5D8F5BCFEBCDB81A681A781A8C8CE81A9B7DD81AAB7C281ABC6F381AC81AD81AE81AF81B081B181B2D8F8D2C181B381B4CEE9BCBFB7FCB7A5D0DD81B581B681B781B881B9D6DAD3C5BBEFBBE1D8F181BA81BBC9A1CEB0B4AB81BCD8F381BDC9CBD8F6C2D7D8F781BE81BFCEB1D8F981C081C181C2B2AEB9C081C3D9A381C4B0E981C5C1E681C6C9EC81C7CBC581C8CBC6D9A481C981CA81CB81CC81CDB5E881CE81CFB5AB81D081D181D281D381D481D5CEBBB5CDD7A1D7F4D3D381D6CCE581D7BACE81D8D9A2D9DCD3E0D8FDB7F0D7F7D8FED8FAD9A1C4E381D981DAD3B6D8F4D9DD81DBD8FB81DCC5E581DD81DEC0D081DF81E0D1F0B0DB81E181E2BCD1D9A681E3D9A581E481E581E681E7D9ACD9AE81E8D9ABCAB981E981EA81EBD9A9D6B681EC81ED81EEB3DED9A881EFC0FD81F0CACC81F1D9AA81F2D9A781F381F4D9B081F581F6B6B181F781F881F9B9A981FAD2C081FB81FCCFC081FD81FEC2C28240BDC4D5ECB2E0C7C8BFEBD9AD8241D9AF8242CEEABAEE82438244824582468247C7D682488249824A824B824C824D824E824F8250B1E3825182528253B4D9B6EDD9B48254825582568257BFA182588259825AD9DEC7CEC0FED9B8825B825C825D825E825FCBD7B7FD8260D9B58261D9B7B1A3D3E1D9B98262D0C58263D9B682648265D9B18266D9B2C1A9D9B382678268BCF3D0DEB8A98269BEE3826AD9BD826B826C826D826ED9BA826FB0B3827082718272D9C28273827482758276827782788279827A827B827C827D827E8280D9C4B1B68281D9BF82828283B5B98284BEF3828582868287CCC8BAF2D2D08288D9C38289828ABDE8828BB3AB828C828D828ED9C5BEEB828FD9C6D9BBC4DF8290D9BED9C1D9C0829182928293829482958296829782988299829A829BD5AE829CD6B5829DC7E3829E829F82A082A1D9C882A282A382A4BCD9D9CA82A582A682A7D9BC82A8D9CBC6AB82A982AA82AB82AC82ADD9C982AE82AF82B082B1D7F682B2CDA382B382B482B582B682B782B882B982BABDA182BB82BC82BD82BE82BF82C0D9CC82C182C282C382C482C582C682C782C882C9C5BCCDB582CA82CB82CCD9CD82CD82CED9C7B3A5BFFE82CF82D082D182D2B8B582D382D4C0FC82D582D682D782D8B0F882D982DA82DB82DC82DD82DE82DF82E082E182E282E382E482E582E682E782E882E982EA82EB82EC82EDB4F682EED9CE82EFD9CFB4A2D9D082F082F1B4DF82F282F382F482F582F6B0C182F782F882F982FA82FB82FC82FDD9D1C9B582FE8340834183428343834483458346834783488349834A834B834C834D834E834F83508351CFF1835283538354835583568357D9D283588359835AC1C5835B835C835D835E835F836083618362836383648365D9D6C9AE8366836783688369D9D5D9D4D9D7836A836B836C836DCBDB836EBDA9836F8370837183728373C6A7837483758376837783788379837A837B837C837DD9D3D9D8837E83808381D9D9838283838384838583868387C8E583888389838A838B838C838D838E838F839083918392839383948395C0DC8396839783988399839A839B839C839D839E839F83A083A183A283A383A483A583A683A783A883A983AA83AB83AC83AD83AE83AF83B083B183B2B6F9D8A3D4CA83B3D4AAD0D6B3E4D5D783B4CFC8B9E283B5BFCB83B6C3E283B783B883B9B6D283BA83BBCDC3D9EED9F083BC83BD83BEB5B383BFB6B583C083C183C283C383C4BEA483C583C6C8EB83C783C8C8AB83C983CAB0CBB9ABC1F9D9E283CBC0BCB9B283CCB9D8D0CBB1F8C6E4BEDFB5E4D7C883CDD1F8BCE6CADE83CE83CFBCBDD9E6D8E783D083D1C4DA83D283D3B8D4C8BD83D483D5B2E1D4D983D683D783D883D9C3B083DA83DBC3E1DAA2C8DF83DCD0B483DDBEFCC5A983DE83DF83E0B9DA83E1DAA383E2D4A9DAA483E383E483E583E683E7D9FBB6AC83E883E9B7EBB1F9D9FCB3E5BEF683EABFF6D2B1C0E483EB83EC83EDB6B3D9FED9FD83EE83EFBEBB83F083F183F2C6E083F3D7BCDAA183F4C1B983F5B5F2C1E883F683F7BCF583F8B4D583F983FA83FB83FC83FD83FE844084418442C1DD8443C4FD84448445BCB8B7B284468447B7EF84488449844A844B844C844DD9EC844EC6BE844FBFADBBCB84508451B5CA8452DBC9D0D78453CDB9B0BCB3F6BBF7DBCABAAF8454D4E4B5B6B5F3D8D6C8D084558456B7D6C7D0D8D78457BFAF84588459DBBBD8D8845A845BD0CCBBAE845C845D845EEBBEC1D0C1F5D4F2B8D5B4B4845FB3F584608461C9BE846284638464C5D0846584668467C5D9C0FB8468B1F08469D8D9B9CE846AB5BD846B846CD8DA846D846ED6C6CBA2C8AFC9B2B4CCBFCC846FB9F48470D8DBD8DCB6E7BCC1CCEA847184728473847484758476CFF78477D8DDC7B084788479B9D0BDA3847A847BCCDE847CC6CA847D847E848084818482D8E08483D8DE84848485D8DF848684878488B0FE8489BEE7848ACAA3BCF4848B848C848D848EB8B1848F8490B8EE849184928493849484958496849784988499849AD8E2849BBDCB849CD8E4D8E3849D849E849F84A084A1C5FC84A284A384A484A584A684A784A8D8E584A984AAD8E684AB84AC84AD84AE84AF84B084B1C1A684B2C8B0B0ECB9A6BCD3CEF1DBBDC1D384B384B484B584B6B6AFD6FAC5ACBDD9DBBEDBBF84B784B884B9C0F8BEA2C0CD84BA84BB84BC84BD84BE84BF84C084C184C284C3DBC0CAC684C484C584C6B2AA84C784C884C9D3C284CAC3E384CBD1AB84CC84CD84CE84CFDBC284D0C0D584D184D284D3DBC384D4BFB184D584D684D784D884D984DAC4BC84DB84DC84DD84DEC7DA84DF84E084E184E284E384E484E584E684E784E884E9DBC484EA84EB84EC84ED84EE84EF84F084F1D9E8C9D784F284F384F4B9B4CEF0D4C884F584F684F784F8B0FCB4D284F9D0D984FA84FB84FC84FDD9E984FEDECBD9EB8540854185428543D8B0BBAFB1B18544B3D7D8CE85458546D4D185478548BDB3BFEF8549CFBB854A854BD8D0854C854D854EB7CB854F85508551D8D185528553855485558556855785588559855A855BC6A5C7F8D2BD855C855DD8D2C4E4855ECAAE855FC7A78560D8A68561C9FDCEE7BBDCB0EB856285638564BBAAD0AD8565B1B0D7E4D7BF8566B5A5C2F4C4CF85678568B2A98569B2B7856AB1E5DFB2D5BCBFA8C2ACD8D5C2B1856BD8D4CED4856CDAE0856DCEC0856E856FD8B4C3AED3A1CEA38570BCB4C8B4C2D18571BEEDD0B68572DAE18573857485758576C7E485778578B3A78579B6F2CCFCC0FA857A857BC0F7857CD1B9D1E1D8C7857D857E85808581858285838584B2DE85858586C0E58587BAF185888589D8C8858AD4AD858B858CCFE1D8C9858DD8CACFC3858EB3F8BEC7858F859085918592D8CB8593859485958596859785988599DBCC859A859B859C859DC8A5859E859F85A0CFD885A1C8FEB2CE85A285A385A485A585A6D3D6B2E6BCB0D3D1CBABB7B485A785A885A9B7A285AA85ABCAE585ACC8A1CADCB1E4D0F085ADC5D185AE85AF85B0DBC5B5FE85B185B2BFDAB9C5BEE4C1ED85B3DFB6DFB5D6BBBDD0D5D9B0C8B6A3BFC9CCA8DFB3CAB7D3D285B4D8CFD2B6BAC5CBBECCBE85B5DFB7B5F0DFB485B685B785B8D3F585B9B3D4B8F785BADFBA85BBBACFBCAAB5F585BCCDACC3FBBAF3C0F4CDC2CFF2DFB8CFC585BDC2C0DFB9C2F085BE85BF85C0BEFD85C1C1DFCDCCD2F7B7CDDFC185C2DFC485C385C4B7F1B0C9B6D6B7D485C5BAACCCFDBFD4CBB1C6F485C6D6A8DFC585C7CEE2B3B385C885C9CEFCB4B585CACEC7BAF085CBCEE185CCD1BD85CD85CEDFC085CF85D0B4F485D1B3CA85D2B8E6DFBB85D385D485D585D6C4C585D7DFBCDFBDDFBEC5BBDFBFDFC2D4B1DFC385D8C7BACED885D985DA85DB85DC85DDC4D885DEDFCA85DFDFCF85E0D6DC85E185E285E385E485E585E685E785E8DFC9DFDACEB685E9BAC7DFCEDFC8C5DE85EA85EBC9EBBAF4C3FC85EC85EDBED785EEDFC685EFDFCD85F0C5D885F185F285F385F4D5A6BACD85F5BECCD3BDB8C085F6D6E485F7DFC7B9BEBFA785F885F9C1FCDFCBDFCC85FADFD085FB85FC85FD85FE8640DFDBDFE58641DFD7DFD6D7C9DFE3DFE4E5EBD2A7DFD28642BFA98643D4DB8644BFC8DFD4864586468647CFCC86488649DFDD864AD1CA864BDFDEB0A7C6B7DFD3864CBAE5864DB6DFCDDBB9FED4D5864E864FDFDFCFECB0A5DFE7DFD1D1C6DFD5DFD8DFD9DFDC8650BBA98651DFE0DFE18652DFE2DFE6DFE8D3B486538654865586568657B8E7C5B6DFEAC9DAC1A8C4C486588659BFDECFF8865A865B865CD5DCDFEE865D865E865F866086618662B2B88663BADFDFEC8664DBC18665D1E48666866786688669CBF4B4BD866AB0A6866B866C866D866E866FDFF1CCC6DFF286708671DFED867286738674867586768677DFE986788679867A867BDFEB867CDFEFDFF0BBBD867D867EDFF386808681DFF48682BBA38683CADBCEA8E0A7B3AA8684E0A6868586868687E0A186888689868A868BDFFE868CCDD9DFFC868DDFFA868EBFD0D7C4868FC9CC86908691DFF8B0A186928693869486958696DFFD869786988699869ADFFBE0A2869B869C869D869E869FE0A886A086A186A286A3B7C886A486A5C6A1C9B6C0B2DFF586A686A7C5BE86A8D8C4DFF9C4F686A986AA86AB86AC86AD86AEE0A3E0A4E0A5D0A586AF86B0E0B4CCE486B1E0B186B2BFA6E0AFCEB9E0ABC9C686B386B4C0AEE0AEBAEDBAB0E0A986B586B686B7DFF686B8E0B386B986BAE0B886BB86BC86BDB4ADE0B986BE86BFCFB2BAC886C0E0B086C186C286C386C486C586C686C7D0FA86C886C986CA86CB86CC86CD86CE86CF86D0E0AC86D1D4FB86D2DFF786D3C5E786D4E0AD86D5D3F786D6E0B6E0B786D786D886D986DA86DBE0C4D0E186DC86DD86DEE0BC86DF86E0E0C9E0CA86E186E286E3E0BEE0AAC9A4E0C186E4E0B286E586E686E786E886E9CAC8E0C386EAE0B586EBCECB86ECCBC3E0CDE0C6E0C286EDE0CB86EEE0BAE0BFE0C086EF86F0E0C586F186F2E0C7E0C886F3E0CC86F4E0BB86F586F686F786F886F9CBD4E0D586FAE0D6E0D286FB86FC86FD86FE87408741E0D0BCCE87428743E0D18744B8C2D8C587458746874787488749874A874B874CD0EA874D874EC2EF874F8750E0CFE0BD875187528753E0D4E0D387548755E0D78756875787588759E0DCE0D8875A875B875CD6F6B3B0875DD7EC875ECBBB875F8760E0DA8761CEFB876287638764BAD987658766876787688769876A876B876C876D876E876F8770E0E1E0DDD2AD87718772877387748775E0E287768777E0DBE0D9E0DF87788779E0E0877A877B877C877D877EE0DE8780E0E4878187828783C6F7D8ACD4EBE0E6CAC98784878587868787E0E587888789878A878BB8C1878C878D878E878FE0E7E0E887908791879287938794879587968797E0E9E0E387988799879A879B879C879D879EBABFCCE7879F87A087A1E0EA87A287A387A487A587A687A787A887A987AA87AB87AC87AD87AE87AF87B0CFF987B187B287B387B487B587B687B787B887B987BA87BBE0EB87BC87BD87BE87BF87C087C187C2C8C287C387C487C587C6BDC087C787C887C987CA87CB87CC87CD87CE87CF87D087D187D287D3C4D287D487D587D687D787D887D987DA87DB87DCE0EC87DD87DEE0ED87DF87E0C7F4CBC487E1E0EEBBD8D8B6D2F2E0EFCDC587E2B6DA87E387E487E587E687E787E8E0F187E9D4B087EA87EBC0A7B4D187EC87EDCEA7E0F087EE87EF87F0E0F2B9CC87F187F2B9FACDBCE0F387F387F487F5C6D4E0F487F6D4B287F7C8A6E0F6E0F587F887F987FA87FB87FC87FD87FE8840884188428843884488458846884788488849E0F7884A884BCDC1884C884D884ECAA5884F885088518852D4DADBD7DBD98853DBD8B9E7DBDCDBDDB5D888548855DBDA8856885788588859885ADBDBB3A1DBDF885B885CBBF8885DD6B7885EDBE0885F886088618862BEF988638864B7BB8865DBD0CCAEBFB2BBB5D7F8BFD38866886788688869886ABFE9886B886CBCE1CCB3DBDEB0D3CEEBB7D8D7B9C6C2886D886EC0A4886FCCB98870DBE7DBE1C6BADBE38871DBE88872C5F7887388748875DBEA88768877DBE9BFC088788879887ADBE6DBE5887B887C887D887E8880B4B9C0ACC2A2DBE2DBE48881888288838884D0CDDBED88858886888788888889C0DDDBF2888A888B888C888D888E888F8890B6E28891889288938894DBF3DBD2B9B8D4ABDBEC8895BFD1DBF08896DBD18897B5E68898DBEBBFE58899889A889BDBEE889CDBF1889D889E889FDBF988A088A188A288A388A488A588A688A788A8B9A1B0A388A988AA88AB88AC88AD88AE88AFC2F188B088B1B3C7DBEF88B288B3DBF888B4C6D2DBF488B588B6DBF5DBF7DBF688B788B8DBFE88B9D3F2B2BA88BA88BB88BCDBFD88BD88BE88BF88C088C188C288C388C4DCA488C5DBFB88C688C788C888C9DBFA88CA88CB88CCDBFCC5E0BBF988CD88CEDCA388CF88D0DCA588D1CCC388D288D388D4B6D1DDC088D588D688D7DCA188D8DCA288D988DA88DBC7B588DC88DD88DEB6E988DF88E088E1DCA788E288E388E488E5DCA688E6DCA9B1A488E788E8B5CC88E988EA88EB88EC88EDBFB088EE88EF88F088F188F2D1DF88F388F488F588F6B6C288F788F888F988FA88FB88FC88FD88FE894089418942894389448945DCA88946894789488949894A894B894CCBFAEBF3894D894E894FCBDC89508951CBFE895289538954CCC189558956895789588959C8FB895A895B895C895D895E895FDCAA89608961896289638964CCEEDCAB89658966896789688969896A896B896C896D896E896F897089718972897389748975DBD38976DCAFDCAC8977BEB38978CAFB8979897A897BDCAD897C897D897E89808981898289838984C9CAC4B989858986898789888989C7BDDCAE898A898B898CD4F6D0E6898D898E898F89908991899289938994C4ABB6D589958996899789988999899A899B899C899D899E899F89A089A189A289A389A489A589A6DBD489A789A889A989AAB1DA89AB89AC89ADDBD589AE89AF89B089B189B289B389B489B589B689B789B8DBD689B989BA89BBBABE89BC89BD89BE89BF89C089C189C289C389C489C589C689C789C889C9C8C089CA89CB89CC89CD89CE89CFCABFC8C989D0D7B389D1C9F989D289D3BFC789D489D5BAF889D689D7D2BC89D889D989DA89DB89DC89DD89DE89DFE2BA89E0B4A689E189E2B1B889E389E489E589E689E7B8B489E8CFC489E989EA89EB89ECD9E7CFA6CDE289ED89EED9EDB6E089EFD2B989F089F1B9BB89F289F389F489F5E2B9E2B789F6B4F389F7CCECCCABB7F289F8D8B2D1EBBABB89F9CAA789FA89FBCDB789FC89FDD2C4BFE4BCD0B6E189FEDEC58A408A418A428A43DEC6DBBC8A44D1D98A458A46C6E6C4CEB7EE8A47B7DC8A488A49BFFCD7E08A4AC6F58A4B8A4CB1BCDEC8BDB1CCD7DECA8A4DDEC98A4E8A4F8A508A518A52B5EC8A53C9DD8A548A55B0C28A568A578A588A598A5A8A5B8A5C8A5D8A5E8A5F8A608A618A62C5AEC5AB8A63C4CC8A64BCE9CBFD8A658A668A67BAC38A688A698A6AE5F9C8E7E5FACDFD8A6BD7B1B8BEC2E88A6CC8D18A6D8A6EE5FB8A6F8A708A718A72B6CABCCB8A738A74D1FDE6A18A75C3EE8A768A778A788A79E6A48A7A8A7B8A7C8A7DE5FEE6A5CDD78A7E8A80B7C1E5FCE5FDE6A38A818A82C4DDE6A88A838A84E6A78A858A868A878A888A898A8AC3C38A8BC6DE8A8C8A8DE6AA8A8E8A8F8A908A918A928A938A94C4B78A958A968A97E6A2CABC8A988A998A9A8A9BBDE3B9C3E6A6D0D5CEAF8A9C8A9DE6A9E6B08A9ED2A68A9FBDAAE6AD8AA08AA18AA28AA38AA4E6AF8AA5C0D18AA68AA7D2CC8AA88AA98AAABCA78AAB8AAC8AAD8AAE8AAF8AB08AB18AB28AB38AB48AB58AB6E6B18AB7D2F68AB88AB98ABAD7CB8ABBCDFE8ABCCDDEC2A6E6ABE6ACBDBFE6AEE6B38ABD8ABEE6B28ABF8AC08AC18AC2E6B68AC3E6B88AC48AC58AC68AC7C4EF8AC88AC98ACAC4C88ACB8ACCBEEAC9EF8ACD8ACEE6B78ACFB6F08AD08AD18AD2C3E48AD38AD48AD58AD68AD78AD88AD9D3E9E6B48ADAE6B58ADBC8A28ADC8ADD8ADE8ADF8AE0E6BD8AE18AE28AE3E6B98AE48AE58AE68AE78AE8C6C58AE98AEACDF1E6BB8AEB8AEC8AED8AEE8AEF8AF08AF18AF28AF38AF4E6BC8AF58AF68AF78AF8BBE98AF98AFA8AFB8AFC8AFD8AFE8B40E6BE8B418B428B438B44E6BA8B458B46C0B78B478B488B498B4A8B4B8B4C8B4D8B4E8B4FD3A4E6BFC9F4E6C38B508B51E6C48B528B538B548B55D0F68B568B578B588B598B5A8B5B8B5C8B5D8B5E8B5F8B608B618B628B638B648B658B668B67C3BD8B688B698B6A8B6B8B6C8B6D8B6EC3C4E6C28B6F8B708B718B728B738B748B758B768B778B788B798B7A8B7B8B7CE6C18B7D8B7E8B808B818B828B838B84E6C7CFB18B85EBF48B868B87E6CA8B888B898B8A8B8B8B8CE6C58B8D8B8EBCDEC9A98B8F8B908B918B928B938B94BCB58B958B96CFD38B978B988B998B9A8B9BE6C88B9CE6C98B9DE6CE8B9EE6D08B9F8BA08BA1E6D18BA28BA38BA4E6CBB5D58BA5E6CC8BA68BA7E6CF8BA88BA9C4DB8BAAE6C68BAB8BAC8BAD8BAE8BAFE6CD8BB08BB18BB28BB38BB48BB58BB68BB78BB88BB98BBA8BBB8BBC8BBD8BBE8BBF8BC08BC18BC28BC38BC48BC58BC6E6D28BC78BC88BC98BCA8BCB8BCC8BCD8BCE8BCF8BD08BD18BD2E6D4E6D38BD38BD48BD58BD68BD78BD88BD98BDA8BDB8BDC8BDD8BDE8BDF8BE08BE18BE28BE38BE48BE58BE68BE78BE88BE98BEA8BEB8BECE6D58BEDD9F88BEE8BEFE6D68BF08BF18BF28BF38BF48BF58BF68BF7E6D78BF88BF98BFA8BFB8BFC8BFD8BFE8C408C418C428C438C448C458C468C47D7D3E6DD8C48E6DEBFD7D4D08C49D7D6B4E6CBEFE6DAD8C3D7CED0A28C4AC3CF8C4B8C4CE6DFBCBEB9C2E6DBD1A78C4D8C4EBAA2C2CF8C4FD8AB8C508C518C52CAEBE5EE8C53E6DC8C54B7F58C558C568C578C58C8E68C598C5AC4F58C5B8C5CE5B2C4FE8C5DCBFCE5B3D5AC8C5ED3EECAD8B0B28C5FCBCECDEA8C608C61BAEA8C628C638C64E5B58C65E5B48C66D7DAB9D9D6E6B6A8CDF0D2CBB1A6CAB58C67B3E8C9F3BFCDD0FBCAD2E5B6BBC28C688C698C6ACFDCB9AC8C6B8C6C8C6D8C6ED4D78C6F8C70BAA6D1E7CFFCBCD28C71E5B7C8DD8C728C738C74BFEDB1F6CBDE8C758C76BCC58C77BCC4D2FAC3DCBFDC8C788C798C7A8C7BB8BB8C7C8C7D8C7EC3C28C80BAAED4A28C818C828C838C848C858C868C878C888C89C7DEC4AFB2EC8C8AB9D18C8B8C8CE5BBC1C88C8D8C8ED5AF8C8F8C908C918C928C93E5BC8C94E5BE8C958C968C978C988C998C9A8C9BB4E7B6D4CBC2D1B0B5BC8C9C8C9DCAD98C9EB7E28C9F8CA0C9E48CA1BDAB8CA28CA3CEBED7F08CA48CA58CA68CA7D0A18CA8C9D98CA98CAAB6FBE6D8BCE28CABB3BE8CACC9D08CADE6D9B3A28CAE8CAF8CB08CB1DECC8CB2D3C8DECD8CB3D2A28CB48CB58CB68CB7DECE8CB88CB98CBA8CBBBECD8CBC8CBDDECF8CBE8CBF8CC0CAACD2FCB3DFE5EAC4E1BEA1CEB2C4F2BED6C6A8B2E38CC18CC2BED38CC38CC4C7FCCCEBBDECCEDD8CC58CC6CABAC6C1E5ECD0BC8CC78CC88CC9D5B98CCA8CCB8CCCE5ED8CCD8CCE8CCF8CD0CAF48CD1CDC0C2C58CD2E5EF8CD3C2C4E5F08CD48CD58CD68CD78CD88CD98CDAE5F8CDCD8CDBC9BD8CDC8CDD8CDE8CDF8CE08CE18CE2D2D9E1A88CE38CE48CE58CE6D3EC8CE7CBEAC6F18CE88CE98CEA8CEB8CECE1AC8CED8CEE8CEFE1A7E1A98CF08CF1E1AAE1AF8CF28CF3B2ED8CF4E1ABB8DAE1ADE1AEE1B0B5BAE1B18CF58CF68CF78CF88CF9E1B3E1B88CFA8CFB8CFC8CFD8CFED1D28D40E1B6E1B5C1EB8D418D428D43E1B78D44D4C08D45E1B28D46E1BAB0B68D478D488D498D4AE1B48D4BBFF98D4CE1B98D4D8D4EE1BB8D4F8D508D518D528D538D54E1BE8D558D568D578D588D598D5AE1BC8D5B8D5C8D5D8D5E8D5F8D60D6C58D618D628D638D648D658D668D67CFBF8D688D69E1BDE1BFC2CD8D6AB6EB8D6BD3F88D6C8D6DC7CD8D6E8D6FB7E58D708D718D728D738D748D758D768D778D788D79BEFE8D7A8D7B8D7C8D7D8D7E8D80E1C0E1C18D818D82E1C7B3E78D838D848D858D868D878D88C6E98D898D8A8D8B8D8C8D8DB4DE8D8ED1C28D8F8D908D918D92E1C88D938D94E1C68D958D968D978D988D99E1C58D9AE1C3E1C28D9BB1C08D9C8D9D8D9ED5B8E1C48D9F8DA08DA18DA28DA3E1CB8DA48DA58DA68DA78DA88DA98DAA8DABE1CCE1CA8DAC8DAD8DAE8DAF8DB08DB18DB28DB3EFFA8DB48DB5E1D3E1D2C7B68DB68DB78DB88DB98DBA8DBB8DBC8DBD8DBE8DBF8DC0E1C98DC18DC2E1CE8DC3E1D08DC48DC58DC68DC78DC88DC98DCA8DCB8DCC8DCD8DCEE1D48DCFE1D1E1CD8DD08DD1E1CF8DD28DD38DD48DD5E1D58DD68DD78DD88DD98DDA8DDB8DDC8DDD8DDE8DDF8DE08DE18DE2E1D68DE38DE48DE58DE68DE78DE88DE98DEA8DEB8DEC8DED8DEE8DEF8DF08DF18DF28DF38DF48DF58DF68DF78DF8E1D78DF98DFA8DFBE1D88DFC8DFD8DFE8E408E418E428E438E448E458E468E478E488E498E4A8E4B8E4C8E4D8E4E8E4F8E508E518E528E538E548E55E1DA8E568E578E588E598E5A8E5B8E5C8E5D8E5E8E5F8E608E618E62E1DB8E638E648E658E668E678E688E69CEA18E6A8E6B8E6C8E6D8E6E8E6F8E708E718E728E738E748E758E76E7DD8E77B4A8D6DD8E788E79D1B2B3B28E7A8E7BB9A4D7F3C7C9BEDEB9AE8E7CCED78E7D8E7EB2EEDBCF8E80BCBAD2D1CBC8B0CD8E818E82CFEF8E838E848E858E868E87D9E3BDED8E888E89B1D2CAD0B2BC8E8ACBA7B7AB8E8BCAA68E8C8E8D8E8ECFA38E8F8E90E0F8D5CAE0FB8E918E92E0FAC5C1CCFB8E93C1B1E0F9D6E3B2AFD6C4B5DB8E948E958E968E978E988E998E9A8E9BB4F8D6A18E9C8E9D8E9E8E9F8EA0CFAFB0EF8EA18EA2E0FC8EA38EA48EA58EA68EA7E1A1B3A38EA88EA9E0FDE0FEC3B18EAA8EAB8EAC8EADC3DD8EAEE1A2B7F98EAF8EB08EB18EB28EB38EB4BBCF8EB58EB68EB78EB88EB98EBA8EBBE1A3C4BB8EBC8EBD8EBE8EBF8EC0E1A48EC18EC2E1A58EC38EC4E1A6B4B18EC58EC68EC78EC88EC98ECA8ECB8ECC8ECD8ECE8ECF8ED08ED18ED28ED3B8C9C6BDC4EA8ED4B2A28ED5D0D28ED6E7DBBBC3D3D7D3C48ED7B9E3E2CF8ED88ED98EDAD7AF8EDBC7ECB1D38EDC8EDDB4B2E2D18EDE8EDF8EE0D0F2C2AEE2D08EE1BFE2D3A6B5D7E2D2B5EA8EE2C3EDB8FD8EE3B8AE8EE4C5D3B7CFE2D48EE58EE68EE78EE8E2D3B6C8D7F98EE98EEA8EEB8EEC8EEDCDA58EEE8EEF8EF08EF18EF2E2D88EF3E2D6CAFCBFB5D3B9E2D58EF48EF58EF68EF7E2D78EF88EF98EFA8EFB8EFC8EFD8EFE8F408F418F42C1AEC0C88F438F448F458F468F478F48E2DBE2DAC0AA8F498F4AC1CE8F4B8F4C8F4D8F4EE2DC8F4F8F508F518F528F538F548F558F568F578F588F598F5AE2DD8F5BE2DE8F5C8F5D8F5E8F5F8F608F618F628F638F64DBC88F65D1D3CDA28F668F67BDA88F688F698F6ADEC3D8A5BFAADBCDD2ECC6FAC5AA8F6B8F6C8F6DDEC48F6EB1D7DFAE8F6F8F708F71CABD8F72DFB18F73B9AD8F74D2FD8F75B8A5BAEB8F768F77B3DA8F788F798F7AB5DCD5C58F7B8F7C8F7D8F7EC3D6CFD2BBA18F80E5F3E5F28F818F82E5F48F83CDE48F84C8F58F858F868F878F888F898F8A8F8BB5AFC7BF8F8CE5F68F8D8F8E8F8FECB08F908F918F928F938F948F958F968F978F988F998F9A8F9B8F9C8F9D8F9EE5E68F9FB9E9B5B18FA0C2BCE5E8E5E7E5E98FA18FA28FA38FA4D2CD8FA58FA68FA7E1EAD0CE8FA8CDAE8FA9D1E58FAA8FABB2CAB1EB8FACB1F2C5ED8FAD8FAED5C3D3B08FAFE1DC8FB08FB18FB2E1DD8FB3D2DB8FB4B3B9B1CB8FB58FB68FB7CDF9D5F7E1DE8FB8BEB6B4FD8FB9E1DFBADCE1E0BBB2C2C9E1E18FBA8FBB8FBCD0EC8FBDCDBD8FBE8FBFE1E28FC0B5C3C5C7E1E38FC18FC2E1E48FC38FC48FC58FC6D3F98FC78FC88FC98FCA8FCB8FCCE1E58FCDD1AD8FCE8FCFE1E6CEA28FD08FD18FD28FD38FD48FD5E1E78FD6B5C28FD78FD88FD98FDAE1E8BBD58FDB8FDC8FDD8FDE8FDFD0C4E2E0B1D8D2E48FE08FE1E2E18FE28FE3BCC9C8CC8FE4E2E3ECFEECFDDFAF8FE58FE68FE7E2E2D6BECDFCC3A68FE88FE98FEAE3C38FEB8FECD6D2E2E78FED8FEEE2E88FEF8FF0D3C78FF18FF2E2ECBFEC8FF3E2EDE2E58FF48FF5B3C08FF68FF78FF8C4EE8FF98FFAE2EE8FFB8FFCD0C38FFDBAF6E2E9B7DEBBB3CCACCBCBE2E4E2E6E2EAE2EB8FFE90409041E2F790429043E2F4D4F5E2F390449045C5AD9046D5FAC5C2B2C090479048E2EF9049E2F2C1AFCBBC904A904BB5A1E2F9904C904D904EBCB1E2F1D0D4D4B9E2F5B9D6E2F6904F90509051C7D390529053905490559056E2F0905790589059905A905BD7DCEDA1905C905DE2F8905EEDA5E2FECAD1905F906090619062906390649065C1B59066BBD090679068BFD69069BAE3906A906BCBA1906C906D906EEDA6EDA3906F9070EDA29071907290739074BBD6EDA7D0F490759076EDA4BADEB6F7E3A1B6B2CCF1B9A79077CFA2C7A190789079BFD2907A907BB6F1907CE2FAE2FBE2FDE2FCC4D5E3A2907DD3C1907E90809081E3A7C7C49082908390849085CFA490869087E3A9BAB790889089908A908BE3A8908CBBDA908DE3A3908E908F9090E3A4E3AA9091E3A69092CEF2D3C690939094BBBC90959096D4C39097C4FA90989099EDA8D0FCE3A5909AC3F5909BE3ADB1AF909CE3B2909D909E909FBCC290A090A1E3ACB5BF90A290A390A490A590A690A790A890A9C7E9E3B090AA90AB90ACBEAACDEF90AD90AE90AF90B090B1BBF390B290B390B4CCE890B590B6E3AF90B7E3B190B8CFA7E3AE90B9CEA9BBDD90BA90BB90BC90BD90BEB5EBBEE5B2D2B3CD90BFB1B9E3ABB2D1B5ACB9DFB6E890C090C1CFEBE3B790C2BBCC90C390C4C8C7D0CA90C590C690C790C890C9E3B8B3EE90CA90CB90CC90CDEDA990CED3FAD3E490CF90D090D1EDAAE3B9D2E290D290D390D490D590D6E3B590D790D890D990DAD3DE90DB90DC90DD90DEB8D0E3B390DF90E0E3B6B7DF90E1E3B4C0A290E290E390E4E3BA90E590E690E790E890E990EA90EB90EC90ED90EE90EF90F090F190F290F390F490F590F690F7D4B890F890F990FA90FB90FC90FD90FE9140B4C89141E3BB9142BBC59143C9F791449145C9E5914691479148C4BD9149914A914B914C914D914E914FEDAB9150915191529153C2FD9154915591569157BBDBBFAE91589159915A915B915C915D915ECEBF915F916091619162E3BC9163BFB6916491659166916791689169916A916B916C916D916E916F9170917191729173917491759176B1EF91779178D4F79179917A917B917C917DE3BE917E9180918191829183918491859186EDAD918791889189918A918B918C918D918E918FE3BFBAA9EDAC91909191E3BD91929193919491959196919791989199919A919BE3C0919C919D919E919F91A091A1BAB691A291A391A4B6AE91A591A691A791A891A9D0B891AAB0C3EDAE91AB91AC91AD91AE91AFEDAFC0C191B0E3C191B191B291B391B491B591B691B791B891B991BA91BB91BC91BD91BE91BF91C091C1C5B391C291C391C491C591C691C791C891C991CA91CB91CC91CD91CE91CFE3C291D091D191D291D391D491D591D691D791D8DCB291D991DA91DB91DC91DD91DEEDB091DFB8EA91E0CEECEAA7D0E7CAF9C8D6CFB7B3C9CED2BDE491E191E2E3DEBBF2EAA8D5BD91E3C6DDEAA991E491E591E6EAAA91E7EAACEAAB91E8EAAEEAAD91E991EA91EB91ECBDD891EDEAAF91EEC2BE91EF91F091F191F2B4C1B4F791F391F4BBA791F591F691F791F891F9ECE6ECE5B7BFCBF9B1E291FAECE791FB91FC91FDC9C8ECE8ECE991FECAD6DED0B2C5D4FA92409241C6CBB0C7B4F2C8D3924292439244CDD092459246BFB8924792489249924A924B924C924DBFDB924E924FC7A4D6B49250C0A9DED1C9A8D1EFC5A4B0E7B3B6C8C592519252B0E292539254B7F692559256C5FA92579258B6F39259D5D2B3D0BCBC925A925B925CB3AD925D925E925F9260BEF1B0D1926192629263926492659266D2D6CAE3D7A59267CDB6B6B6BFB9D5DB9268B8A7C5D79269926A926BDED2BFD9C2D5C7C0926CBBA4B1A8926D926EC5EA926F9270C5FBCCA79271927292739274B1A7927592769277B5D692789279927AC4A8927BDED3D1BAB3E9927CC3F2927D927EB7F79280D6F4B5A3B2F0C4B4C4E9C0ADDED49281B0E8C5C4C1E09282B9D59283BEDCCDD8B0CE9284CDCFDED6BED0D7BEDED5D5D0B0DD92859286C4E292879288C2A3BCF09289D3B5C0B9C5A1B2A6D4F1928A928BC0A8CAC3DED7D5FC928CB9B0928DC8ADCBA9928EDED9BFBD928F929092919292C6B4D7A7CAB0C4C39293B3D6B9D29294929592969297D6B8EAFCB0B492989299929A929BBFE6929C929DCCF4929E929F92A092A1CDDA92A292A392A4D6BFC2CE92A5CECECCA2D0AEC4D3B5B2DED8D5F5BCB7BBD392A692A7B0A492A8C5B2B4EC92A992AA92ABD5F192AC92ADEAFD92AE92AF92B092B192B292B3DEDACDA692B492B5CDEC92B692B792B892B9CEE6DEDC92BACDB1C0A692BB92BCD7BD92BDDEDBB0C6BAB4C9D3C4F3BEE892BE92BF92C092C1B2B692C292C392C492C592C692C792C892C9C0CCCBF092CABCF1BBBBB5B792CB92CC92CDC5F592CEDEE692CF92D092D1DEE3BEDD92D292D3DEDF92D492D592D692D7B4B7BDDD92D892D9DEE0C4ED92DA92DB92DC92DDCFC692DEB5E092DF92E092E192E2B6DECADAB5F4DEE592E3D5C692E4DEE1CCCDC6FE92E5C5C592E692E792E8D2B492E9BEF292EA92EB92EC92ED92EE92EF92F0C2D392F1CCBDB3B892F2BDD392F3BFD8CDC6D1DAB4EB92F4DEE4DEDDDEE792F5EAFE92F692F7C2B0DEE292F892F9D6C0B5A792FAB2F492FBDEE892FCDEF292FD92FE934093419342DEED9343DEF193449345C8E0934693479348D7E1DEEFC3E8CCE19349B2E5934A934B934CD2BE934D934E934F9350935193529353DEEE9354DEEBCED59355B4A79356935793589359935ABFABBEBE935B935CBDD2935D935E935F9360DEE99361D4AE9362DEDE9363DEEA9364936593669367C0BF9368DEECB2F3B8E9C2A79369936ABDC1936B936C936D936E936FDEF5DEF893709371B2ABB4A493729373B4EAC9A6937493759376937793789379DEF6CBD1937AB8E3937BDEF7DEFA937C937D937E9380DEF9938193829383CCC29384B0E1B4EE93859386938793889389938AE5BA938B938C938D938E938FD0AF93909391B2EB9392EBA19393DEF493949395C9E3DEF3B0DAD2A1B1F79396CCAF939793989399939A939B939C939DDEF0939ECBA4939F93A093A1D5AA93A293A393A493A593A6DEFB93A793A893A993AA93AB93AC93AD93AEB4DD93AFC4A693B093B193B2DEFD93B393B493B593B693B793B893B993BA93BB93BCC3FEC4A1DFA193BD93BE93BF93C093C193C293C3C1CC93C4DEFCBEEF93C5C6B293C693C793C893C993CA93CB93CC93CD93CEB3C5C8F693CF93D0CBBADEFE93D193D2DFA493D393D493D593D6D7B293D793D893D993DA93DBB3B793DC93DD93DE93DFC1C393E093E1C7CBB2A5B4E993E2D7AB93E393E493E593E6C4EC93E7DFA2DFA393E8DFA593E9BAB393EA93EB93ECDFA693EDC0DE93EE93EFC9C393F093F193F293F393F493F593F6B2D9C7E693F7DFA793F8C7DC93F993FA93FB93FCDFA8EBA293FD93FE944094419442CBD3944394449445DFAA9446DFA99447B2C194489449944A944B944C944D944E944F9450945194529453945494559456945794589459945A945B945C945D945E945F9460C5CA94619462946394649465946694679468DFAB9469946A946B946C946D946E946F9470D4DC94719472947394749475C8C19476947794789479947A947B947C947D947E948094819482DFAC94839484948594869487BEF094889489DFADD6A7948A948B948C948DEAB7EBB6CAD5948ED8FCB8C4948FB9A594909491B7C5D5FE94929493949494959496B9CA94979498D0A7F4CD9499949AB5D0949B949CC3F4949DBEC8949E949F94A0EBB7B0BD94A194A2BDCC94A3C1B294A4B1D6B3A894A594A694A7B8D2C9A294A894A9B6D894AA94AB94AC94ADEBB8BEB494AE94AF94B0CAFD94B1C7C394B2D5FB94B394B4B7F394B594B694B794B894B994BA94BB94BC94BD94BE94BF94C094C194C294C3CEC494C494C594C6D5ABB1F394C794C894C9ECB3B0DF94CAECB594CB94CC94CDB6B794CEC1CF94CFF5FAD0B194D094D1D5E594D2CED394D394D4BDEFB3E294D5B8AB94D6D5B694D7EDBD94D8B6CF94D9CBB9D0C294DA94DB94DC94DD94DE94DF94E094E1B7BD94E294E3ECB6CAA994E494E594E6C5D494E7ECB9ECB8C2C3ECB794E894E994EA94EBD0FDECBA94ECECBBD7E594ED94EEECBC94EF94F094F1ECBDC6EC94F294F394F494F594F694F794F894F9CEDE94FABCC894FB94FCC8D5B5A9BEC9D6BCD4E794FD94FED1AED0F1EAB8EAB9EABABAB59540954195429543CAB1BFF595449545CDFA9546954795489549954AEAC0954BB0BAEABE954C954DC0A5954E954F9550EABB9551B2FD9552C3F7BBE8955395549555D2D7CEF4EABF955695579558EABC9559955A955BEAC3955CD0C7D3B3955D955E955F9560B4BA9561C3C1D7F29562956395649565D5D19566CAC79567EAC595689569EAC4EAC7EAC6956A956B956C956D956ED6E7956FCFD495709571EACB9572BBCE9573957495759576957795789579BDFAC9CE957A957BEACC957C957DC9B9CFFEEACAD4CEEACDEACF957E9580CDED9581958295839584EAC99585EACE95869587CEEE9588BBDE9589B3BF958A958B958C958D958EC6D5BEB0CEFA958F95909591C7E79592BEA7EAD095939594D6C7959595969597C1C095989599959AD4DD959BEAD1959C959DCFBE959E959F95A095A1EAD295A295A395A495A5CAEE95A695A795A895A9C5AFB0B595AA95AB95AC95AD95AEEAD495AF95B095B195B295B395B495B595B695B7EAD3F4DF95B895B995BA95BB95BCC4BA95BD95BE95BF95C095C1B1A995C295C395C495C5E5DF95C695C795C895C9EAD595CA95CB95CC95CD95CE95CF95D095D195D295D395D495D595D695D795D895D995DA95DB95DC95DD95DE95DF95E095E195E295E3CAEF95E4EAD6EAD7C6D895E595E695E795E895E995EA95EB95ECEAD895ED95EEEAD995EF95F095F195F295F395F4D4BB95F5C7FAD2B7B8FC95F695F7EAC295F8B2DC95F995FAC2FC95FBD4F8CCE6D7EE95FC95FD95FE9640964196429643D4C2D3D0EBC3C5F39644B7FE96459646EBD4964796489649CBB7EBDE964AC0CA964B964C964DCDFB964EB3AF964FC6DA965096519652965396549655EBFC9656C4BE9657CEB4C4A9B1BED4FD9658CAF59659D6EC965A965BC6D3B6E4965C965D965E965FBBFA96609661D0E096629663C9B19664D4D3C8A896659666B8CB9667E8BEC9BC96689669E8BB966AC0EED0D3B2C4B4E5966BE8BC966C966DD5C8966E966F967096719672B6C59673E8BDCAF8B8DCCCF5967496759676C0B496779678D1EEE8BFE8C29679967ABABC967BB1ADBDDC967CEABDE8C3967DE8C6967EE8CB9680968196829683E8CC9684CBC9B0E59685BCAB96869687B9B996889689E8C1968ACDF7968BE8CA968C968D968E968FCEF69690969196929693D5ED9694C1D6E8C49695C3B69696B9FBD6A6E8C8969796989699CAE0D4E6969AE8C0969BE8C5E8C7969CC7B9B7E3969DE8C9969EBFDDE8D2969F96A0E8D796A1E8D5BCDCBCCFE8DB96A296A396A496A596A696A796A896A9E8DE96AAE8DAB1FA96AB96AC96AD96AE96AF96B096B196B296B396B4B0D8C4B3B8CCC6E2C8BEC8E196B596B696B7E8CFE8D4E8D696B8B9F1E8D8D7F596B9C4FB96BAE8DC96BB96BCB2E996BD96BE96BFE8D196C096C1BCED96C296C3BFC2E8CDD6F996C4C1F8B2F196C596C696C796C896C996CA96CB96CCE8DF96CDCAC1E8D996CE96CF96D096D1D5A496D2B1EAD5BBE8CEE8D0B6B0E8D396D3E8DDC0B896D4CAF796D5CBA896D696D7C6DCC0F596D896D996DA96DB96DCE8E996DD96DE96DFD0A396E096E196E296E396E496E596E6E8F2D6EA96E796E896E996EA96EB96EC96EDE8E0E8E196EE96EF96F0D1F9BACBB8F996F196F2B8F1D4D4E8EF96F3E8EEE8ECB9F0CCD2E8E6CEA6BFF296F4B0B8E8F1E8F096F5D7C096F6E8E496F7CDA9C9A396F8BBB8BDDBE8EA96F996FA96FB96FC96FD96FE9740974197429743E8E2E8E3E8E5B5B5E8E7C7C5E8EBE8EDBDB0D7AE9744E8F897459746974797489749974A974B974CE8F5974DCDB0E8F6974E974F9750975197529753975497559756C1BA9757E8E89758C3B7B0F09759975A975B975C975D975E975F9760E8F4976197629763E8F7976497659766B9A3976797689769976A976B976C976D976E976F9770C9D2977197729773C3CECEE0C0E69774977597769777CBF39778CCDDD0B59779977ACAE1977BE8F3977C977D977E9780978197829783978497859786BCEC9787E8F997889789978A978B978C978DC3DE978EC6E5978FB9F79790979197929793B0F497949795D7D897969797BCAC9798C5EF9799979A979B979C979DCCC4979E979FE9A697A097A197A297A397A497A597A697A797A897A9C9AD97AAE9A2C0E297AB97AC97ADBFC397AE97AF97B0E8FEB9D797B1E8FB97B297B397B497B5E9A497B697B797B8D2CE97B997BA97BB97BC97BDE9A397BED6B2D7B597BFE9A797C0BDB797C197C297C397C497C597C697C797C897C997CA97CB97CCE8FCE8FD97CD97CE97CFE9A197D097D197D297D397D497D597D697D7CDD697D897D9D2AC97DA97DB97DCE9B297DD97DE97DF97E0E9A997E197E297E3B4AA97E4B4BB97E597E6E9AB97E797E897E997EA97EB97EC97ED97EE97EF97F097F197F297F397F497F597F697F7D0A897F897F9E9A597FA97FBB3FE97FC97FDE9ACC0E397FEE9AA98409841E9B998429843E9B89844984598469847E9AE98489849E8FA984A984BE9A8984C984D984E984F9850BFACE9B1E9BA98519852C2A5985398549855E9AF9856B8C59857E9AD9858D3DCE9B4E9B5E9B79859985A985BE9C7985C985D985E985F98609861C0C6E9C598629863E9B098649865E9BBB0F19866986798689869986A986B986C986D986E986FE9BCD5A598709871E9BE9872E9BF987398749875E9C198769877C1F198789879C8B6987A987B987CE9BD987D987E988098819882E9C29883988498859886988798889889988AE9C3988BE9B3988CE9B6988DBBB1988E988F9890E9C0989198929893989498959896BCF7989798989899E9C4E9C6989A989B989C989D989E989F98A098A198A298A398A498A5E9CA98A698A798A898A9E9CE98AA98AB98AC98AD98AE98AF98B098B198B298B3B2DB98B4E9C898B598B698B798B898B998BA98BB98BC98BD98BEB7AE98BF98C098C198C298C398C498C598C698C798C898C998CAE9CBE9CC98CB98CC98CD98CE98CF98D0D5C198D1C4A398D298D398D498D598D698D7E9D898D8BAE198D998DA98DB98DCE9C998DDD3A398DE98DF98E0E9D498E198E298E398E498E598E698E7E9D7E9D098E898E998EA98EB98ECE9CF98ED98EEC7C198EF98F098F198F298F398F498F598F6E9D298F798F898F998FA98FB98FC98FDE9D9B3C898FEE9D399409941994299439944CFF0994599469947E9CD99489949994A994B994C994D994E994F995099519952B3F79953995499559956995799589959E9D6995A995BE9DA995C995D995ECCB4995F99609961CFAD99629963996499659966996799689969996AE9D5996BE9DCE9DB996C996D996E996F9970E9DE99719972997399749975997699779978E9D19979997A997B997C997D997E99809981E9DD9982E9DFC3CA9983998499859986998799889989998A998B998C998D998E998F9990999199929993999499959996999799989999999A999B999C999D999E999F99A099A199A299A399A499A599A699A799A899A999AA99AB99AC99AD99AE99AF99B099B199B299B399B499B599B699B799B899B999BA99BB99BC99BD99BE99BF99C099C199C299C399C499C599C699C799C899C999CA99CB99CC99CD99CE99CF99D099D199D299D399D499D599D699D799D899D999DA99DB99DC99DD99DE99DF99E099E199E299E399E499E599E699E799E899E999EA99EB99EC99ED99EE99EF99F099F199F299F399F499F5C7B7B4CEBBB6D0C0ECA399F699F7C5B799F899F999FA99FB99FC99FD99FE9A409A419A42D3FB9A439A449A459A46ECA49A47ECA5C6DB9A489A499A4ABFEE9A4B9A4C9A4D9A4EECA69A4F9A50ECA7D0AA9A51C7B89A529A53B8E89A549A559A569A579A589A599A5A9A5B9A5C9A5D9A5E9A5FECA89A609A619A629A639A649A659A669A67D6B9D5FDB4CBB2BDCEE4C6E79A689A69CDE19A6A9A6B9A6C9A6D9A6E9A6F9A709A719A729A739A749A759A769A77B4F59A78CBC0BCDF9A799A7A9A7B9A7CE9E2E9E3D1EAE9E59A7DB4F9E9E49A7ED1B3CAE2B2D09A80E9E89A819A829A839A84E9E6E9E79A859A86D6B39A879A889A89E9E9E9EA9A8A9A8B9A8C9A8D9A8EE9EB9A8F9A909A919A929A939A949A959A96E9EC9A979A989A999A9A9A9B9A9C9A9D9A9EECAFC5B9B6CE9A9FD2F39AA09AA19AA29AA39AA49AA59AA6B5EE9AA7BBD9ECB19AA89AA9D2E39AAA9AAB9AAC9AAD9AAECEE39AAFC4B89AB0C3BF9AB19AB2B6BED8B9B1C8B1CFB1D1C5FE9AB3B1D09AB4C3AB9AB59AB69AB79AB89AB9D5B19ABA9ABB9ABC9ABD9ABE9ABF9AC09AC1EBA4BAC19AC29AC39AC4CCBA9AC59AC69AC7EBA59AC8EBA79AC99ACA9ACBEBA89ACC9ACD9ACEEBA69ACF9AD09AD19AD29AD39AD49AD5EBA9EBABEBAA9AD69AD79AD89AD99ADAEBAC9ADBCACFD8B5C3F19ADCC3A5C6F8EBADC4CA9ADDEBAEEBAFEBB0B7D59ADE9ADF9AE0B7FA9AE1EBB1C7E29AE2EBB39AE3BAA4D1F5B0B1EBB2EBB49AE49AE59AE6B5AAC2C8C7E89AE7EBB59AE8CBAEE3DF9AE99AEAD3C09AEB9AEC9AED9AEED9DB9AEF9AF0CDA1D6ADC7F39AF19AF29AF3D9E0BBE39AF4BABAE3E29AF59AF69AF79AF89AF9CFAB9AFA9AFB9AFCE3E0C9C79AFDBAB99AFE9B409B41D1B4E3E1C8EAB9AFBDADB3D8CEDB9B429B43CCC09B449B459B46E3E8E3E9CDF49B479B489B499B4A9B4BCCAD9B4CBCB39B4DE3EA9B4EE3EB9B4F9B50D0DA9B519B529B53C6FBB7DA9B549B55C7DFD2CACED69B56E3E4E3EC9B57C9F2B3C19B589B59E3E79B5A9B5BC6E3E3E59B5C9B5DEDB3E3E69B5E9B5F9B609B61C9B39B62C5E69B639B649B65B9B59B66C3BB9B67E3E3C5BDC1A4C2D9B2D79B68E3EDBBA6C4AD9B69E3F0BEDA9B6A9B6BE3FBE3F5BAD39B6C9B6D9B6E9B6FB7D0D3CD9B70D6CED5D3B9C1D5B4D1D89B719B729B739B74D0B9C7F69B759B769B77C8AAB2B49B78C3DA9B799B7A9B7BE3EE9B7C9B7DE3FCE3EFB7A8E3F7E3F49B7E9B809B81B7BA9B829B83C5A29B84E3F6C5DDB2A8C6FC9B85C4E09B869B87D7A29B88C0E1E3F99B899B8AE3FAE3FDCCA9E3F39B8BD3BE9B8CB1C3EDB4E3F1E3F29B8DE3F8D0BAC6C3D4F3E3FE9B8E9B8FBDE09B909B91E4A79B929B93E4A69B949B959B96D1F3E4A39B97E4A99B989B999B9AC8F79B9B9B9C9B9D9B9ECFB49B9FE4A8E4AEC2E59BA09BA1B6B49BA29BA39BA49BA59BA69BA7BDF29BA8E4A29BA99BAABAE9E4AA9BAB9BACE4AC9BAD9BAEB6FDD6DEE4B29BAFE4AD9BB09BB19BB2E4A19BB3BBEECDDDC7A2C5C99BB49BB5C1F79BB6E4A49BB7C7B3BDACBDBDE4A59BB8D7C7B2E29BB9E4ABBCC3E4AF9BBABBEBE4B0C5A8E4B19BBB9BBC9BBD9BBED5E3BFA39BBFE4BA9BC0E4B79BC1E4BB9BC29BC3E4BD9BC49BC5C6D69BC69BC7BAC6C0CB9BC89BC99BCAB8A1E4B49BCB9BCC9BCD9BCED4A19BCF9BD0BAA3BDFE9BD19BD29BD3E4BC9BD49BD59BD69BD79BD8CDBF9BD99BDAC4F99BDB9BDCCFFBC9E69BDD9BDED3BF9BDFCFD19BE09BE1E4B39BE2E4B8E4B9CCE99BE39BE49BE59BE69BE7CCCE9BE8C0D4E4B5C1B0E4B6CED09BE9BBC1B5D39BEAC8F3BDA7D5C7C9ACB8A2E4CA9BEB9BECE4CCD1C49BED9BEED2BA9BEF9BF0BAAD9BF19BF2BAD49BF39BF49BF59BF69BF79BF8E4C3B5ED9BF99BFA9BFBD7CDE4C0CFFDE4BF9BFC9BFD9BFEC1DCCCCA9C409C419C429C43CAE79C449C459C469C47C4D79C48CCD4E4C89C499C4A9C4BE4C7E4C19C4CE4C4B5AD9C4D9C4ED3D99C4FE4C69C509C519C529C53D2F9B4E39C54BBB49C559C56C9EE9C57B4BE9C589C599C5ABBEC9C5BD1CD9C5CCCEDEDB59C5D9C5E9C5F9C609C619C629C639C64C7E59C659C669C679C68D4A89C69E4CBD7D5E4C29C6ABDA5E4C59C6B9C6CD3E69C6DE4C9C9F89C6E9C6FE4BE9C709C71D3E59C729C73C7FEB6C99C74D4FCB2B3E4D79C759C769C77CEC29C78E4CD9C79CEBC9C7AB8DB9C7B9C7CE4D69C7DBFCA9C7E9C809C81D3CE9C82C3EC9C839C849C859C869C879C889C899C8AC5C8E4D89C8B9C8C9C8D9C8E9C8F9C909C919C92CDC4E4CF9C939C949C959C96E4D4E4D59C97BAFE9C98CFE69C999C9AD5BF9C9B9C9C9C9DE4D29C9E9C9F9CA09CA19CA29CA39CA49CA59CA69CA79CA8E4D09CA99CAAE4CE9CAB9CAC9CAD9CAE9CAF9CB09CB19CB29CB39CB49CB59CB69CB79CB89CB9CDE5CAAA9CBA9CBB9CBCC0A39CBDBDA6E4D39CBE9CBFB8C89CC09CC19CC29CC39CC4E4E7D4B49CC59CC69CC79CC89CC99CCA9CCBE4DB9CCC9CCD9CCEC1EF9CCF9CD0E4E99CD19CD2D2E79CD39CD4E4DF9CD5E4E09CD69CD7CFAA9CD89CD99CDA9CDBCBDD9CDCE4DAE4D19CDDE4E59CDEC8DCE4E39CDF9CE0C4E7E4E29CE1E4E19CE29CE39CE4B3FCE4E89CE59CE69CE79CE8B5E19CE99CEA9CEBD7CC9CEC9CED9CEEE4E69CEFBBAC9CF0D7D2CCCFEBF89CF1E4E49CF29CF3B9F69CF49CF59CF6D6CDE4D9E4DCC2FAE4DE9CF7C2CBC0C4C2D09CF8B1F5CCB29CF99CFA9CFB9CFC9CFD9CFE9D409D419D429D43B5CE9D449D459D469D47E4EF9D489D499D4A9D4B9D4C9D4D9D4E9D4FC6AF9D509D519D52C6E19D539D54E4F59D559D569D579D589D59C2A99D5A9D5B9D5CC0ECD1DDE4EE9D5D9D5E9D5F9D609D619D629D639D649D659D66C4AE9D679D689D69E4ED9D6A9D6B9D6C9D6DE4F6E4F4C2FE9D6EE4DD9D6FE4F09D70CAFE9D71D5C49D729D73E4F19D749D759D769D779D789D799D7AD1FA9D7B9D7C9D7D9D7E9D809D819D82E4EBE4EC9D839D849D85E4F29D86CEAB9D879D889D899D8A9D8B9D8C9D8D9D8E9D8F9D90C5CB9D919D929D93C7B19D94C2BA9D959D969D97E4EA9D989D999D9AC1CA9D9B9D9C9D9D9D9E9D9F9DA0CCB6B3B19DA19DA29DA3E4FB9DA4E4F39DA59DA69DA7E4FA9DA8E4FD9DA9E4FC9DAA9DAB9DAC9DAD9DAE9DAF9DB0B3CE9DB19DB29DB3B3BAE4F79DB49DB5E4F9E4F8C5EC9DB69DB79DB89DB99DBA9DBB9DBC9DBD9DBE9DBF9DC09DC19DC2C0BD9DC39DC49DC59DC6D4E89DC79DC89DC99DCA9DCBE5A29DCC9DCD9DCE9DCF9DD09DD19DD29DD39DD49DD59DD6B0C49DD79DD8E5A49DD99DDAE5A39DDB9DDC9DDD9DDE9DDF9DE0BCA49DE1E5A59DE29DE39DE49DE59DE69DE7E5A19DE89DE99DEA9DEB9DEC9DED9DEEE4FEB1F49DEF9DF09DF19DF29DF39DF49DF59DF69DF79DF89DF9E5A89DFAE5A9E5A69DFB9DFC9DFD9DFE9E409E419E429E439E449E459E469E47E5A7E5AA9E489E499E4A9E4B9E4C9E4D9E4E9E4F9E509E519E529E539E549E559E569E579E589E599E5A9E5B9E5C9E5D9E5E9E5F9E609E619E629E639E649E659E669E679E68C6D99E699E6A9E6B9E6C9E6D9E6E9E6F9E70E5ABE5AD9E719E729E739E749E759E769E77E5AC9E789E799E7A9E7B9E7C9E7D9E7E9E809E819E829E839E849E859E869E879E889E89E5AF9E8A9E8B9E8CE5AE9E8D9E8E9E8F9E909E919E929E939E949E959E969E979E989E999E9A9E9B9E9C9E9D9E9EB9E09E9F9EA0E5B09EA19EA29EA39EA49EA59EA69EA79EA89EA99EAA9EAB9EAC9EAD9EAEE5B19EAF9EB09EB19EB29EB39EB49EB59EB69EB79EB89EB99EBABBF0ECE1C3F09EBBB5C6BBD29EBC9EBD9EBE9EBFC1E9D4EE9EC0BEC49EC19EC29EC3D7C69EC4D4D6B2D3ECBE9EC59EC69EC79EC8EAC19EC99ECA9ECBC2AFB4B69ECC9ECD9ECED1D79ECF9ED09ED1B3B49ED2C8B2BFBBECC09ED39ED4D6CB9ED59ED6ECBFECC19ED79ED89ED99EDA9EDB9EDC9EDD9EDE9EDF9EE09EE19EE29EE3ECC5BEE6CCBFC5DABEBC9EE4ECC69EE5B1FE9EE69EE79EE8ECC4D5A8B5E39EE9ECC2C1B6B3E39EEA9EEBECC3CBB8C0C3CCFE9EEC9EED9EEE9EEFC1D29EF0ECC89EF19EF29EF39EF49EF59EF69EF79EF89EF99EFA9EFB9EFC9EFDBAE6C0D39EFED6F29F409F419F42D1CC9F439F449F459F46BFBE9F47B7B3C9D5ECC7BBE29F48CCCCBDFDC8C89F49CFA99F4A9F4B9F4C9F4D9F4E9F4F9F50CDE99F51C5EB9F529F539F54B7E99F559F569F579F589F599F5A9F5B9F5C9F5D9F5E9F5FD1C9BAB89F609F619F629F639F64ECC99F659F66ECCA9F67BBC0ECCB9F68ECE2B1BAB7D99F699F6A9F6B9F6C9F6D9F6E9F6F9F709F719F729F73BDB99F749F759F769F779F789F799F7A9F7BECCCD1E6ECCD9F7C9F7D9F7E9F80C8BB9F819F829F839F849F859F869F879F889F899F8A9F8B9F8C9F8D9F8EECD19F8F9F909F919F92ECD39F93BBCD9F94BCE59F959F969F979F989F999F9A9F9B9F9C9F9D9F9E9F9F9FA09FA1ECCF9FA2C9B79FA39FA49FA59FA69FA7C3BA9FA8ECE3D5D5ECD09FA99FAA9FAB9FAC9FADD6F39FAE9FAF9FB0ECD2ECCE9FB19FB29FB39FB4ECD49FB5ECD59FB69FB7C9BF9FB89FB99FBA9FBB9FBC9FBDCFA89FBE9FBF9FC09FC19FC2D0DC9FC39FC49FC59FC6D1AC9FC79FC89FC99FCAC8DB9FCB9FCC9FCDECD6CEF59FCE9FCF9FD09FD19FD2CAECECDA9FD39FD49FD59FD69FD79FD89FD9ECD99FDA9FDB9FDCB0BE9FDD9FDE9FDF9FE09FE19FE2ECD79FE3ECD89FE49FE59FE6ECE49FE79FE89FE99FEA9FEB9FEC9FED9FEE9FEFC8BC9FF09FF19FF29FF39FF49FF59FF69FF79FF89FF9C1C79FFA9FFB9FFC9FFD9FFEECDCD1E0A040A041A042A043A044A045A046A047A048A049ECDBA04AA04BA04CA04DD4EFA04EECDDA04FA050A051A052A053A054DBC6A055A056A057A058A059A05AA05BA05CA05DA05EECDEA05FA060A061A062A063A064A065A066A067A068A069A06AB1ACA06BA06CA06DA06EA06FA070A071A072A073A074A075A076A077A078A079A07AA07BA07CA07DA07EA080A081ECDFA082A083A084A085A086A087A088A089A08AA08BECE0A08CD7A6A08DC5C0A08EA08FA090EBBCB0AEA091A092A093BEF4B8B8D2AFB0D6B5F9A094D8B3A095CBACA096E3DDA097A098A099A09AA09BA09CA09DC6ACB0E6A09EA09FA0A0C5C6EBB9A0A1A0A2A0A3A0A4EBBAA0A5A0A6A0A7EBBBA0A8A0A9D1C0A0AAC5A3A0ABEAF2A0ACC4B2A0ADC4B5C0CEA0AEA0AFA0B0EAF3C4C1A0B1CEEFA0B2A0B3A0B4A0B5EAF0EAF4A0B6A0B7C9FCA0B8A0B9C7A3A0BAA0BBA0BCCCD8CEFEA0BDA0BEA0BFEAF5EAF6CFACC0E7A0C0A0C1EAF7A0C2A0C3A0C4A0C5A0C6B6BFEAF8A0C7EAF9A0C8EAFAA0C9A0CAEAFBA0CBA0CCA0CDA0CEA0CFA0D0A0D1A0D2A0D3A0D4A0D5A0D6EAF1A0D7A0D8A0D9A0DAA0DBA0DCA0DDA0DEA0DFA0E0A0E1A0E2C8AEE1EBA0E3B7B8E1ECA0E4A0E5A0E6E1EDA0E7D7B4E1EEE1EFD3CCA0E8A0E9A0EAA0EBA0ECA0EDA0EEE1F1BFF1E1F0B5D2A0EFA0F0A0F1B1B7A0F2A0F3A0F4A0F5E1F3E1F2A0F6BAFCA0F7E1F4A0F8A0F9A0FAA0FBB9B7A0FCBED1A0FDA0FEAA40AA41C4FCAA42BADDBDC6AA43AA44AA45AA46AA47AA48E1F5E1F7AA49AA4AB6C0CFC1CAA8E1F6D5F8D3FCE1F8E1FCE1F9AA4BAA4CE1FAC0EAAA4DE1FEE2A1C0C7AA4EAA4FAA50AA51E1FBAA52E1FDAA53AA54AA55AA56AA57AA58E2A5AA59AA5AAA5BC1D4AA5CAA5DAA5EAA5FE2A3AA60E2A8B2FEE2A2AA61AA62AA63C3CDB2C2E2A7E2A6AA64AA65E2A4E2A9AA66AA67E2ABAA68AA69AA6AD0C9D6EDC3A8E2ACAA6BCFD7AA6CAA6DE2AEAA6EAA6FBAEFAA70AA71E9E0E2ADE2AAAA72AA73AA74AA75BBABD4B3AA76AA77AA78AA79AA7AAA7BAA7CAA7DAA7EAA80AA81AA82AA83E2B0AA84AA85E2AFAA86E9E1AA87AA88AA89AA8AE2B1AA8BAA8CAA8DAA8EAA8FAA90AA91AA92E2B2AA93AA94AA95AA96AA97AA98AA99AA9AAA9BAA9CAA9DE2B3CCA1AA9EE2B4AA9FAAA0AB40AB41AB42AB43AB44AB45AB46AB47AB48AB49AB4AAB4BE2B5AB4CAB4DAB4EAB4FAB50D0FEAB51AB52C2CAAB53D3F1AB54CDF5AB55AB56E7E0AB57AB58E7E1AB59AB5AAB5BAB5CBEC1AB5DAB5EAB5FAB60C2EAAB61AB62AB63E7E4AB64AB65E7E3AB66AB67AB68AB69AB6AAB6BCDE6AB6CC3B5AB6DAB6EE7E2BBB7CFD6AB6FC1E1E7E9AB70AB71AB72E7E8AB73AB74E7F4B2A3AB75AB76AB77AB78E7EAAB79E7E6AB7AAB7BAB7CAB7DAB7EE7ECE7EBC9BAAB80AB81D5E4AB82E7E5B7A9E7E7AB83AB84AB85AB86AB87AB88AB89E7EEAB8AAB8BAB8CAB8DE7F3AB8ED6E9AB8FAB90AB91AB92E7EDAB93E7F2AB94E7F1AB95AB96AB97B0E0AB98AB99AB9AAB9BE7F5AB9CAB9DAB9EAB9FABA0AC40AC41AC42AC43AC44AC45AC46AC47AC48AC49AC4AC7F2AC4BC0C5C0EDAC4CAC4DC1F0E7F0AC4EAC4FAC50AC51E7F6CBF6AC52AC53AC54AC55AC56AC57AC58AC59AC5AE8A2E8A1AC5BAC5CAC5DAC5EAC5FAC60D7C1AC61AC62E7FAE7F9AC63E7FBAC64E7F7AC65E7FEAC66E7FDAC67E7FCAC68AC69C1D5C7D9C5FDC5C3AC6AAC6BAC6CAC6DAC6EC7EDAC6FAC70AC71AC72E8A3AC73AC74AC75AC76AC77AC78AC79AC7AAC7BAC7CAC7DAC7EAC80AC81AC82AC83AC84AC85AC86E8A6AC87E8A5AC88E8A7BAF7E7F8E8A4AC89C8F0C9AAAC8AAC8BAC8CAC8DAC8EAC8FAC90AC91AC92AC93AC94AC95AC96E8A9AC97AC98B9E5AC99AC9AAC9BAC9CAC9DD1FEE8A8AC9EAC9FACA0AD40AD41AD42E8AAAD43E8ADE8AEAD44C1A7AD45AD46AD47E8AFAD48AD49AD4AE8B0AD4BAD4CE8ACAD4DE8B4AD4EAD4FAD50AD51AD52AD53AD54AD55AD56AD57AD58E8ABAD59E8B1AD5AAD5BAD5CAD5DAD5EAD5FAD60AD61E8B5E8B2E8B3AD62AD63AD64AD65AD66AD67AD68AD69AD6AAD6BAD6CAD6DAD6EAD6FAD70AD71E8B7AD72AD73AD74AD75AD76AD77AD78AD79AD7AAD7BAD7CAD7DAD7EAD80AD81AD82AD83AD84AD85AD86AD87AD88AD89E8B6AD8AAD8BAD8CAD8DAD8EAD8FAD90AD91AD92B9CFAD93F0ACAD94F0ADAD95C6B0B0EAC8BFAD96CDDFAD97AD98AD99AD9AAD9BAD9CAD9DCECDEAB1AD9EAD9FADA0AE40EAB2AE41C6BFB4C9AE42AE43AE44AE45AE46AE47AE48EAB3AE49AE4AAE4BAE4CD5E7AE4DAE4EAE4FAE50AE51AE52AE53AE54DDF9AE55EAB4AE56EAB5AE57EAB6AE58AE59AE5AAE5BB8CADFB0C9F5AE5CCCF0AE5DAE5EC9FAAE5FAE60AE61AE62AE63C9FBAE64AE65D3C3CBA6AE66B8A6F0AEB1C2AE67E5B8CCEFD3C9BCD7C9EAAE68B5E7AE69C4D0B5E9AE6AEEAEBBADAE6BAE6CE7DEAE6DEEAFAE6EAE6FAE70AE71B3A9AE72AE73EEB2AE74AE75EEB1BDE7AE76EEB0CEB7AE77AE78AE79AE7AC5CFAE7BAE7CAE7DAE7EC1F4DBCEEEB3D0F3AE80AE81AE82AE83AE84AE85AE86AE87C2D4C6E8AE88AE89AE8AB7ACAE8BAE8CAE8DAE8EAE8FAE90AE91EEB4AE92B3EBAE93AE94AE95BBFBEEB5AE96AE97AE98AE99AE9AE7DCAE9BAE9CAE9DEEB6AE9EAE9FBDAEAEA0AF40AF41AF42F1E2AF43AF44AF45CAE8AF46D2C9F0DAAF47F0DBAF48F0DCC1C6AF49B8EDBECEAF4AAF4BF0DEAF4CC5B1F0DDD1F1AF4DF0E0B0CCBDEAAF4EAF4FAF50AF51AF52D2DFF0DFAF53B4AFB7E8F0E6F0E5C6A3F0E1F0E2B4C3AF54AF55F0E3D5EEAF56AF57CCDBBED2BCB2AF58AF59AF5AF0E8F0E7F0E4B2A1AF5BD6A2D3B8BEB7C8ACAF5CAF5DF0EAAF5EAF5FAF60AF61D1F7AF62D6CCBADBF0E9AF63B6BBAF64AF65CDB4AF66AF67C6A6AF68AF69AF6AC1A1F0EBF0EEAF6BF0EDF0F0F0ECAF6CBBBEF0EFAF6DAF6EAF6FAF70CCB5F0F2AF71AF72B3D5AF73AF74AF75AF76B1D4AF77AF78F0F3AF79AF7AF0F4F0F6B4E1AF7BF0F1AF7CF0F7AF7DAF7EAF80AF81F0FAAF82F0F8AF83AF84AF85F0F5AF86AF87AF88AF89F0FDAF8AF0F9F0FCF0FEAF8BF1A1AF8CAF8DAF8ECEC1F1A4AF8FF1A3AF90C1F6F0FBCADDAF91AF92B4F1B1F1CCB1AF93F1A6AF94AF95F1A7AF96AF97F1ACD5CEF1A9AF98AF99C8B3AF9AAF9BAF9CF1A2AF9DF1ABF1A8F1A5AF9EAF9FF1AAAFA0B040B041B042B043B044B045B046B0A9F1ADB047B048B049B04AB04BB04CF1AFB04DF1B1B04EB04FB050B051B052F1B0B053F1AEB054B055B056B057D1A2B058B059B05AB05BB05CB05DB05EF1B2B05FB060B061F1B3B062B063B064B065B066B067B068B069B9EFB06AB06BB5C7B06CB0D7B0D9B06DB06EB06FD4EDB070B5C4B071BDD4BBCAF0A7B072B073B8DEB074B075F0A8B076B077B0A8B078F0A9B079B07ACDEEB07BB07CF0AAB07DB07EB080B081B082B083B084B085B086B087F0ABB088B089B08AB08BB08CB08DB08EB08FB090C6A4B091B092D6E5F1E4B093F1E5B094B095B096B097B098B099B09AB09BB09CB09DC3F3B09EB09FD3DBB0A0B140D6D1C5E8B141D3AFB142D2E6B143B144EEC1B0BBD5B5D1CEBCE0BAD0B145BFF8B146B8C7B5C1C5CCB147B148CAA2B149B14AB14BC3CBB14CB14DB14EB14FB150EEC2B151B152B153B154B155B156B157B158C4BFB6A2B159EDECC3A4B15AD6B1B15BB15CB15DCFE0EDEFB15EB15FC5CEB160B6DCB161B162CAA1B163B164EDEDB165B166EDF0EDF1C3BCB167BFB4B168EDEEB169B16AB16BB16CB16DB16EB16FB170B171B172B173EDF4EDF2B174B175B176B177D5E6C3DFB178EDF3B179B17AB17BEDF6B17CD5A3D1A3B17DB17EB180EDF5B181C3D0B182B183B184B185B186EDF7BFF4BEECEDF8B187CCF7B188D1DBB189B18AB18BD7C5D5F6B18CEDFCB18DB18EB18FEDFBB190B191B192B193B194B195B196B197EDF9EDFAB198B199B19AB19BB19CB19DB19EB19FEDFDBEA6B1A0B240B241B242B243CBAFEEA1B6BDB244EEA2C4C0B245EDFEB246B247BDDEB2C7B248B249B24AB24BB24CB24DB24EB24FB250B251B252B253B6C3B254B255B256EEA5D8BAEEA3EEA6B257B258B259C3E9B3F2B25AB25BB25CB25DB25EB25FEEA7EEA4CFB9B260B261EEA8C2F7B262B263B264B265B266B267B268B269B26AB26BB26CB26DEEA9EEAAB26EDEABB26FB270C6B3B271C7C6B272D6F5B5C9B273CBB2B274B275B276EEABB277B278CDABB279EEACB27AB27BB27CB27DB27ED5B0B280EEADB281F6C4B282B283B284B285B286B287B288B289B28AB28BB28CB28DB28EDBC7B28FB290B291B292B293B294B295B296B297B4A3B298B299B29AC3ACF1E6B29BB29CB29DB29EB29FCAB8D2D3B2A0D6AAB340EFF2B341BED8B342BDC3EFF3B6CCB0ABB343B344B345B346CAAFB347B348EDB6B349EDB7B34AB34BB34CB34DCEF9B7AFBFF3EDB8C2EBC9B0B34EB34FB350B351B352B353EDB9B354B355C6F6BFB3B356B357B358EDBCC5F8B359D1D0B35AD7A9EDBAEDBBB35BD1E2B35CEDBFEDC0B35DEDC4B35EB35FB360EDC8B361EDC6EDCED5E8B362EDC9B363B364EDC7EDBEB365B366C5E9B367B368B369C6C6B36AB36BC9E9D4D2EDC1EDC2EDC3EDC5B36CC0F9B36DB4A1B36EB36FB370B371B9E8B372EDD0B373B374B375B376EDD1B377EDCAB378EDCFB379CEF8B37AB37BCBB6EDCCEDCDB37CB37DB37EB380B381CFF5B382B383B384B385B386B387B388B389B38AB38BB38CB38DEDD2C1F2D3B2EDCBC8B7B38EB38FB390B391B392B393B394B395BCEFB396B397B398B399C5F0B39AB39BB39CB39DB39EB39FB3A0B440B441B442EDD6B443B5EFB444B445C2B5B0ADCBE9B446B447B1AEB448EDD4B449B44AB44BCDEBB5E2B44CEDD5EDD3EDD7B44DB44EB5FAB44FEDD8B450EDD9B451EDDCB452B1CCB453B454B455B456B457B458B459B45AC5F6BCEEEDDACCBCB2EAB45BB45CB45DB45EEDDBB45FB460B461B462C4EBB463B464B4C5B465B466B467B0F5B468B469B46AEDDFC0DAB4E8B46BB46CB46DB46EC5CDB46FB470B471EDDDBFC4B472B473B474EDDEB475B476B477B478B479B47AB47BB47CB47DB47EB480B481B482B483C4A5B484B485B486EDE0B487B488B489B48AB48BEDE1B48CEDE3B48DB48EC1D7B48FB490BBC7B491B492B493B494B495B496BDB8B497B498B499EDE2B49AB49BB49CB49DB49EB49FB4A0B540B541B542B543B544B545EDE4B546B547B548B549B54AB54BB54CB54DB54EB54FEDE6B550B551B552B553B554EDE5B555B556B557B558B559B55AB55BB55CB55DB55EB55FB560B561B562B563EDE7B564B565B566B567B568CABEECEAC0F1B569C9E7B56AECEBC6EEB56BB56CB56DB56EECECB56FC6EDECEDB570B571B572B573B574B575B576B577B578ECF0B579B57AD7E6ECF3B57BB57CECF1ECEEECEFD7A3C9F1CBEEECF4B57DECF2B57EB580CFE9B581ECF6C6B1B582B583B584B585BCC0B586ECF5B587B588B589B58AB58BB58CB58DB5BBBBF6B58EECF7B58FB590B591B592B593D9F7BDFBB594B595C2BBECF8B596B597B598B599ECF9B59AB59BB59CB59DB8A3B59EB59FB5A0B640B641B642B643B644B645B646ECFAB647B648B649B64AB64BB64CB64DB64EB64FB650B651B652ECFBB653B654B655B656B657B658B659B65AB65BB65CB65DECFCB65EB65FB660B661B662D3EDD8AEC0EBB663C7DDBACCB664D0E3CBBDB665CDBAB666B667B8D1B668B669B1FCB66AC7EFB66BD6D6B66CB66DB66EBFC6C3EBB66FB670EFF5B671B672C3D8B673B674B675B676B677B678D7E2B679B67AB67BEFF7B3D3B67CC7D8D1EDB67DD6C8B67EEFF8B680EFF6B681BBFDB3C6B682B683B684B685B686B687B688BDD5B689B68AD2C6B68BBBE0B68CB68DCFA1B68EEFFCEFFBB68FB690EFF9B691B692B693B694B3CCB695C9D4CBB0B696B697B698B699B69AEFFEB69BB69CB0DEB69DB69ED6C9B69FB6A0B740EFFDB741B3EDB742B743F6D5B744B745B746B747B748B749B74AB74BB74CB74DB74EB74FB750B751B752CEC8B753B754B755F0A2B756F0A1B757B5BEBCDABBFCB758B8E5B759B75AB75BB75CB75DB75EC4C2B75FB760B761B762B763B764B765B766B767B768F0A3B769B76AB76BB76CB76DCBEBB76EB76FB770B771B772B773B774B775B776B777B778B779B77AB77BB77CB77DB77EB780B781B782B783B784B785B786F0A6B787B788B789D1A8B78ABEBFC7EEF1B6F1B7BFD5B78BB78CB78DB78EB4A9F1B8CDBBB78FC7D4D5ADB790F1B9B791F1BAB792B793B794B795C7CFB796B797B798D2A4D6CFB799B79AF1BBBDD1B4B0BEBDB79BB79CB79DB4DCCED1B79EBFDFF1BDB79FB7A0B840B841BFFAF1BCB842F1BFB843B844B845F1BEF1C0B846B847B848B849B84AF1C1B84BB84CB84DB84EB84FB850B851B852B853B854B855C1FEB856B857B858B859B85AB85BB85CB85DB85EB85FB860C1A2B861B862B863B864B865B866B867B868B869B86ACAFAB86BB86CD5BEB86DB86EB86FB870BEBABEB9D5C2B871B872BFA2B873CDAFF1B5B874B875B876B877B878B879BDDFB87AB6CBB87BB87CB87DB87EB880B881B882B883B884D6F1F3C3B885B886F3C4B887B8CDB888B889B88AF3C6F3C7B88BB0CAB88CF3C5B88DF3C9CBF1B88EB88FB890F3CBB891D0A6B892B893B1CAF3C8B894B895B896F3CFB897B5D1B898B899F3D7B89AF3D2B89BB89CB89DF3D4F3D3B7FBB89EB1BFB89FF3CEF3CAB5DAB8A0F3D0B940B941F3D1B942F3D5B943B944B945B946F3CDB947BCE3B948C1FDB949F3D6B94AB94BB94CB94DB94EB94FF3DAB950F3CCB951B5C8B952BDEEF3DCB953B954B7A4BFF0D6FECDB2B955B4F0B956B2DFB957F3D8B958F3D9C9B8B959F3DDB95AB95BF3DEB95CF3E1B95DB95EB95FB960B961B962B963B964B965B966B967F3DFB968B969F3E3F3E2B96AB96BF3DBB96CBFEAB96DB3EFB96EF3E0B96FB970C7A9B971BCF2B972B973B974B975F3EBB976B977B978B979B97AB97BB97CB9BFB97DB97EF3E4B980B981B982B2ADBBFEB983CBE3B984B985B986B987F3EDF3E9B988B989B98AB9DCF3EEB98BB98CB98DF3E5F3E6F3EAC2E1F3ECF3EFF3E8BCFDB98EB98FB990CFE4B991B992F3F0B993B994B995F3E7B996B997B998B999B99AB99BB99CB99DF3F2B99EB99FB9A0BA40D7ADC6AABA41BA42BA43BA44F3F3BA45BA46BA47BA48F3F1BA49C2A8BA4ABA4BBA4CBA4DBA4EB8DDF3F5BA4FBA50F3F4BA51BA52BA53B4DBBA54BA55BA56F3F6F3F7BA57BA58BA59F3F8BA5ABA5BBA5CC0BABA5DBA5EC0E9BA5FBA60BA61BA62BA63C5F1BA64BA65BA66BA67F3FBBA68F3FABA69BA6ABA6BBA6CBA6DBA6EBA6FBA70B4D8BA71BA72BA73F3FEF3F9BA74BA75F3FCBA76BA77BA78BA79BA7ABA7BF3FDBA7CBA7DBA7EBA80BA81BA82BA83BA84F4A1BA85BA86BA87BA88BA89BA8AF4A3BBC9BA8BBA8CF4A2BA8DBA8EBA8FBA90BA91BA92BA93BA94BA95BA96BA97BA98BA99F4A4BA9ABA9BBA9CBA9DBA9EBA9FB2BEF4A6F4A5BAA0BB40BB41BB42BB43BB44BB45BB46BB47BB48BB49BCAEBB4ABB4BBB4CBB4DBB4EBB4FBB50BB51BB52BB53BB54BB55BB56BB57BB58BB59BB5ABB5BBB5CBB5DBB5EBB5FBB60BB61BB62BB63BB64BB65BB66BB67BB68BB69BB6ABB6BBB6CBB6DBB6EC3D7D9E1BB6FBB70BB71BB72BB73BB74C0E0F4CCD7D1BB75BB76BB77BB78BB79BB7ABB7BBB7CBB7DBB7EBB80B7DBBB81BB82BB83BB84BB85BB86BB87F4CEC1A3BB88BB89C6C9BB8AB4D6D5B3BB8BBB8CBB8DF4D0F4CFF4D1CBDABB8EBB8FF4D2BB90D4C1D6E0BB91BB92BB93BB94B7E0BB95BB96BB97C1B8BB98BB99C1BBF4D3BEACBB9ABB9BBB9CBB9DBB9EB4E2BB9FBBA0F4D4F4D5BEABBC40BC41F4D6BC42BC43BC44F4DBBC45F4D7F4DABC46BAFDBC47F4D8F4D9BC48BC49BC4ABC4BBC4CBC4DBC4EB8E2CCC7F4DCBC4FB2DABC50BC51C3D3BC52BC53D4E3BFB7BC54BC55BC56BC57BC58BC59BC5AF4DDBC5BBC5CBC5DBC5EBC5FBC60C5B4BC61BC62BC63BC64BC65BC66BC67BC68F4E9BC69BC6ACFB5BC6BBC6CBC6DBC6EBC6FBC70BC71BC72BC73BC74BC75BC76BC77BC78CEC9BC79BC7ABC7BBC7CBC7DBC7EBC80BC81BC82BC83BC84BC85BC86BC87BC88BC89BC8ABC8BBC8CBC8DBC8ECBD8BC8FCBF7BC90BC91BC92BC93BDF4BC94BC95BC96D7CFBC97BC98BC99C0DBBC9ABC9BBC9CBC9DBC9EBC9FBCA0BD40BD41BD42BD43BD44BD45BD46BD47BD48BD49BD4ABD4BBD4CBD4DBD4EBD4FBD50BD51BD52BD53BD54BD55BD56BD57BD58BD59BD5ABD5BBD5CBD5DBD5EBD5FBD60BD61BD62BD63BD64BD65BD66BD67BD68BD69BD6ABD6BBD6CBD6DBD6EBD6FBD70BD71BD72BD73BD74BD75BD76D0F5BD77BD78BD79BD7ABD7BBD7CBD7DBD7EF4EABD80BD81BD82BD83BD84BD85BD86BD87BD88BD89BD8ABD8BBD8CBD8DBD8EBD8FBD90BD91BD92BD93BD94BD95BD96BD97BD98BD99BD9ABD9BBD9CBD9DBD9EBD9FBDA0BE40BE41BE42BE43BE44BE45BE46BE47BE48BE49BE4ABE4BBE4CF4EBBE4DBE4EBE4FBE50BE51BE52BE53F4ECBE54BE55BE56BE57BE58BE59BE5ABE5BBE5CBE5DBE5EBE5FBE60BE61BE62BE63BE64BE65BE66BE67BE68BE69BE6ABE6BBE6CBE6DBE6EBE6FBE70BE71BE72BE73BE74BE75BE76BE77BE78BE79BE7ABE7BBE7CBE7DBE7EBE80BE81BE82BE83BE84BE85BE86BE87BE88BE89BE8ABE8BBE8CBE8DBE8EBE8FBE90BE91BE92BE93BE94BE95BE96BE97BE98BE99BE9ABE9BBE9CBE9DBE9EBE9FBEA0BF40BF41BF42BF43BF44BF45BF46BF47BF48BF49BF4ABF4BBF4CBF4DBF4EBF4FBF50BF51BF52BF53BF54BF55BF56BF57BF58BF59BF5ABF5BBF5CBF5DBF5EBF5FBF60BF61BF62BF63BF64BF65BF66BF67BF68BF69BF6ABF6BBF6CBF6DBF6EBF6FBF70BF71BF72BF73BF74BF75BF76BF77BF78BF79BF7ABF7BBF7CBF7DBF7EBF80F7E3BF81BF82BF83BF84BF85B7B1BF86BF87BF88BF89BF8AF4EDBF8BBF8CBF8DBF8EBF8FBF90BF91BF92BF93BF94BF95BF96BF97BF98BF99BF9ABF9BBF9CBF9DBF9EBF9FBFA0C040C041C042C043C044C045C046C047C048C049C04AC04BC04CC04DC04EC04FC050C051C052C053C054C055C056C057C058C059C05AC05BC05CC05DC05EC05FC060C061C062C063D7EBC064C065C066C067C068C069C06AC06BC06CC06DC06EC06FC070C071C072C073C074C075C076C077C078C079C07AC07BF4EEC07CC07DC07EE6F9BEC0E6FABAECE6FBCFCBE6FCD4BCBCB6E6FDE6FEBCCDC8D2CEB3E7A1C080B4BFE7A2C9B4B8D9C4C9C081D7DDC2DAB7D7D6BDCEC6B7C4C082C083C5A6E7A3CFDFE7A4E7A5E7A6C1B7D7E9C9F0CFB8D6AFD6D5E7A7B0EDE7A8E7A9C9DCD2EFBEADE7AAB0F3C8DEBDE1E7ABC8C6C084E7ACBBE6B8F8D1A4E7ADC2E7BEF8BDCACDB3E7AEE7AFBEEED0E5C085CBE7CCD0BCCCE7B0BCA8D0F7E7B1C086D0F8E7B2E7B3B4C2E7B4E7B5C9FECEACC3E0E7B7B1C1B3F1C087E7B8E7B9D7DBD5C0E7BAC2CCD7BAE7BBE7BCE7BDBCEAC3E5C0C2E7BEE7BFBCA9C088E7C0E7C1E7B6B6D0E7C2C089E7C3E7C4BBBAB5DEC2C6B1E0E7C5D4B5E7C6B8BFE7C8E7C7B7ECC08AE7C9B2F8E7CAE7CBE7CCE7CDE7CEE7CFE7D0D3A7CBF5E7D1E7D2E7D3E7D4C9C9E7D5E7D6E7D7E7D8E7D9BDC9E7DAF3BEC08BB8D7C08CC8B1C08DC08EC08FC090C091C092C093F3BFC094F3C0F3C1C095C096C097C098C099C09AC09BC09CC09DC09EB9DECDF8C09FC0A0D8E8BAB1C140C2DEEEB7C141B7A3C142C143C144C145EEB9C146EEB8B0D5C147C148C149C14AC14BEEBBD5D6D7EFC14CC14DC14ED6C3C14FC150EEBDCAF0C151EEBCC152C153C154C155EEBEC156C157C158C159EEC0C15AC15BEEBFC15CC15DC15EC15FC160C161C162C163D1F2C164C7BCC165C3C0C166C167C168C169C16AB8E1C16BC16CC16DC16EC16FC1E7C170C171F4C6D0DFF4C7C172CFDBC173C174C8BAC175C176F4C8C177C178C179C17AC17BC17CC17DF4C9F4CAC17EF4CBC180C181C182C183C184D9FAB8FEC185C186E5F1D3F0C187F4E0C188CECCC189C18AC18BB3E1C18CC18DC18EC18FF1B4C190D2EEC191F4E1C192C193C194C195C196CFE8F4E2C197C198C7CCC199C19AC19BC19CC19DC19EB5D4B4E4F4E4C19FC1A0C240F4E3F4E5C241C242F4E6C243C244C245C246F4E7C247BAB2B0BFC248F4E8C249C24AC24BC24CC24DC24EC24FB7ADD2EDC250C251C252D2ABC0CFC253BFBCEBA3D5DFEAC8C254C255C256C257F1F3B6F8CBA3C258C259C4CDC25AF1E7C25BF1E8B8FBF1E9BAC4D4C5B0D2C25CC25DF1EAC25EC25FC260F1EBC261F1ECC262C263F1EDF1EEF1EFF1F1F1F0C5D5C264C265C266C267C268C269F1F2C26AB6FAC26BF1F4D2AEDEC7CBCAC26CC26DB3DCC26EB5A2C26FB9A2C270C271C4F4F1F5C272C273F1F6C274C275C276C1C4C1FBD6B0F1F7C277C278C279C27AF1F8C27BC1AAC27CC27DC27EC6B8C280BEDBC281C282C283C284C285C286C287C288C289C28AC28BC28CC28DC28EF1F9B4CFC28FC290C291C292C293C294F1FAC295C296C297C298C299C29AC29BC29CC29DC29EC29FC2A0C340EDB2EDB1C341C342CBE0D2DEC343CBC1D5D8C344C8E2C345C0DFBCA1C346C347C348C349C34AC34BEBC1C34CC34DD0A4C34ED6E2C34FB6C7B8D8EBC0B8CEC350EBBFB3A6B9C9D6ABC351B7F4B7CAC352C353C354BCE7B7BEEBC6C355EBC7B0B9BFCFC356EBC5D3FDC357EBC8C358C359EBC9C35AC35BB7CEC35CEBC2EBC4C9F6D6D7D5CDD0B2EBCFCEB8EBD0C35DB5A8C35EC35FC360C361C362B1B3EBD2CCA5C363C364C365C366C367C368C369C5D6EBD3C36AEBD1C5DFEBCECAA4EBD5B0FBC36BC36CBAFAC36DC36ED8B7F1E3C36FEBCAEBCBEBCCEBCDEBD6E6C0EBD9C370BFE8D2C8EBD7EBDCB8ECEBD8C371BDBAC372D0D8C373B0B7C374EBDDC4DCC375C376C377C378D6ACC379C37AC37BB4E0C37CC37DC2F6BCB9C37EC380EBDAEBDBD4E0C6EAC4D4EBDFC5A7D9F5C381B2B1C382EBE4C383BDC5C384C385C386EBE2C387C388C389C38AC38BC38CC38DC38EC38FC390C391C392C393EBE3C394C395B8ACC396CDD1EBE5C397C398C399EBE1C39AC1B3C39BC39CC39DC39EC39FC6A2C3A0C440C441C442C443C444C445CCF3C446EBE6C447C0B0D2B8EBE7C448C449C44AB8AFB8ADC44BEBE8C7BBCDF3C44CC44DC44EEBEAEBEBC44FC450C451C452C453EBEDC454C455C456C457D0C8C458EBF2C459EBEEC45AC45BC45CEBF1C8F9C45DD1FCEBECC45EC45FEBE9C460C461C462C463B8B9CFD9C4E5EBEFEBF0CCDACDC8B0F2C464EBF6C465C466C467C468C469EBF5C46AB2B2C46BC46CC46DC46EB8E0C46FEBF7C470C471C472C473C474C475B1ECC476C477CCC5C4A4CFA5C478C479C47AC47BC47CEBF9C47DC47EECA2C480C5F2C481EBFAC482C483C484C485C486C487C488C489C9C5C48AC48BC48CC48DC48EC48FE2DFEBFEC490C491C492C493CDCEECA1B1DBD3B7C494C495D2DCC496C497C498EBFDC499EBFBC49AC49BC49CC49DC49EC49FC4A0C540C541C542C543C544C545C546C547C548C549C54AC54BC54CC54DC54EB3BCC54FC550C551EAB0C552C553D7D4C554F4ABB3F4C555C556C557C558C559D6C1D6C2C55AC55BC55CC55DC55EC55FD5E9BECAC560F4A7C561D2A8F4A8F4A9C562F4AABECBD3DFC563C564C565C566C567C9E0C9E1C568C569F3C2C56ACAE6C56BCCF2C56CC56DC56EC56FC570C571E2B6CBB4C572CEE8D6DBC573F4ADF4AEF4AFC574C575C576C577F4B2C578BABDF4B3B0E3F4B0C579F4B1BDA2B2D5C57AF4B6F4B7B6E6B2B0CFCFF4B4B4ACC57BF4B5C57CC57DF4B8C57EC580C581C582C583F4B9C584C585CDA7C586F4BAC587F4BBC588C589C58AF4BCC58BC58CC58DC58EC58FC590C591C592CBD2C593F4BDC594C595C596C597F4BEC598C599C59AC59BC59CC59DC59EC59FF4BFC5A0C640C641C642C643F4DEC1BCBCE8C644C9ABD1DEE5F5C645C646C647C648DCB3D2D5C649C64ADCB4B0ACDCB5C64BC64CBDDAC64DDCB9C64EC64FC650D8C2C651DCB7D3F3C652C9D6DCBADCB6C653DCBBC3A2C654C655C656C657DCBCDCC5DCBDC658C659CEDFD6A5C65ADCCFC65BDCCDC65CC65DDCD2BDE6C2ABC65EDCB8DCCBDCCEDCBEB7D2B0C5DCC7D0BEDCC1BBA8C65FB7BCDCCCC660C661DCC6DCBFC7DBC662C663C664D1BFDCC0C665C666DCCAC667C668DCD0C669C66ACEADDCC2C66BDCC3DCC8DCC9B2D4DCD1CBD5C66CD4B7DCDBDCDFCCA6DCE6C66DC3E7DCDCC66EC66FBFC1DCD9C670B0FAB9B6DCE5DCD3C671DCC4DCD6C8F4BFE0C672C673C674C675C9BBC676C677C678B1BDC679D3A2C67AC67BDCDAC67CC67DDCD5C67EC6BBC680DCDEC681C682C683C684C685D7C2C3AFB7B6C7D1C3A9DCE2DCD8DCEBDCD4C686C687DCDDC688BEA5DCD7C689DCE0C68AC68BDCE3DCE4C68CDCF8C68DC68EDCE1DDA2DCE7C68FC690C691C692C693C694C695C696C697C698BCEBB4C4C699C69AC3A3B2E7DCFAC69BDCF2C69CDCEFC69DDCFCDCEED2F0B2E8C69EC8D7C8E3DCFBC69FDCEDC6A0C740C741DCF7C742C743DCF5C744C745BEA3DCF4C746B2DDC747C748C749C74AC74BDCF3BCF6DCE8BBC4C74CC0F3C74DC74EC74FC750C751BCD4DCE9DCEAC752DCF1DCF6DCF9B5B4C753C8D9BBE7DCFEDCFDD3ABDDA1DDA3DDA5D2F1DDA4DDA6DDA7D2A9C754C755C756C757C758C759C75ABAC9DDA9C75BC75CDDB6DDB1DDB4C75DC75EC75FC760C761C762C763DDB0C6CEC764C765C0F2C766C767C768C769C9AFC76AC76BC76CDCECDDAEC76DC76EC76FC770DDB7C771C772DCF0DDAFC773DDB8C774DDACC775C776C777C778C779C77AC77BDDB9DDB3DDADC4AAC77CC77DC77EC780DDA8C0B3C1ABDDAADDABC781DDB2BBF1DDB5D3A8DDBAC782DDBBC3A7C783C784DDD2DDBCC785C786C787DDD1C788B9BDC789C78ABED5C78BBEFAC78CC78DBACAC78EC78FC790C791DDCAC792DDC5C793DDBFC794C795C796B2CBDDC3C797DDCBB2A4DDD5C798C799C79ADDBEC79BC79CC79DC6D0DDD0C79EC79FC7A0C840C841DDD4C1E2B7C6C842C843C844C845C846DDCEDDCFC847C848C849DDC4C84AC84BC84CDDBDC84DDDCDCCD1C84EDDC9C84FC850C851C852DDC2C3C8C6BCCEAEDDCCC853DDC8C854C855C856C857C858C859DDC1C85AC85BC85CDDC6C2DCC85DC85EC85FC860C861C862D3A9D3AADDD3CFF4C8F8C863C864C865C866C867C868C869C86ADDE6C86BC86CC86DC86EC86FC870DDC7C871C872C873DDE0C2E4C874C875C876C877C878C879C87AC87BDDE1C87CC87DC87EC880C881C882C883C884C885C886DDD7C887C888C889C88AC88BD6F8C88CDDD9DDD8B8F0DDD6C88DC88EC88FC890C6CFC891B6ADC892C893C894C895C896DDE2C897BAF9D4E1DDE7C898C899C89AB4D0C89BDDDAC89CBFFBDDE3C89DDDDFC89EDDDDC89FC8A0C940C941C942C943C944B5D9C945C946C947C948DDDBDDDCDDDEC949BDAFDDE4C94ADDE5C94BC94CC94DC94EC94FC950C951C952DDF5C953C3C9C954C955CBE2C956C957C958C959DDF2C95AC95BC95CC95DC95EC95FC960C961C962C963C964C965C966D8E1C967C968C6D1C969DDF4C96AC96BC96CD5F4DDF3DDF0C96DC96EDDECC96FDDEFC970DDE8C971C972D0EEC973C974C975C976C8D8DDEEC977C978DDE9C979C97ADDEACBF2C97BDDEDC97CC97DB1CDC97EC980C981C982C983C984C0B6C985BCBBDDF1C986C987DDF7C988DDF6DDEBC989C98AC98BC98CC98DC5EEC98EC98FC990DDFBC991C992C993C994C995C996C997C998C999C99AC99BDEA4C99CC99DDEA3C99EC99FC9A0CA40CA41CA42CA43CA44CA45CA46CA47CA48DDF8CA49CA4ACA4BCA4CC3EFCA4DC2FBCA4ECA4FCA50D5E1CA51CA52CEB5CA53CA54CA55CA56DDFDCA57B2CCCA58CA59CA5ACA5BCA5CCA5DCA5ECA5FCA60C4E8CADFCA61CA62CA63CA64CA65CA66CA67CA68CA69CA6AC7BEDDFADDFCDDFEDEA2B0AAB1CECA6BCA6CCA6DCA6ECA6FDEACCA70CA71CA72CA73DEA6BDB6C8EFCA74CA75CA76CA77CA78CA79CA7ACA7BCA7CCA7DCA7EDEA1CA80CA81DEA5CA82CA83CA84CA85DEA9CA86CA87CA88CA89CA8ADEA8CA8BCA8CCA8DDEA7CA8ECA8FCA90CA91CA92CA93CA94CA95CA96DEADCA97D4CCCA98CA99CA9ACA9BDEB3DEAADEAECA9CCA9DC0D9CA9ECA9FCAA0CB40CB41B1A1DEB6CB42DEB1CB43CB44CB45CB46CB47CB48CB49DEB2CB4ACB4BCB4CCB4DCB4ECB4FCB50CB51CB52CB53CB54D1A6DEB5CB55CB56CB57CB58CB59CB5ACB5BDEAFCB5CCB5DCB5EDEB0CB5FD0BDCB60CB61CB62DEB4CAEDDEB9CB63CB64CB65CB66CB67CB68DEB8CB69DEB7CB6ACB6BCB6CCB6DCB6ECB6FCB70DEBBCB71CB72CB73CB74CB75CB76CB77BDE5CB78CB79CB7ACB7BCB7CB2D8C3EACB7DCB7EDEBACB80C5BACB81CB82CB83CB84CB85CB86DEBCCB87CB88CB89CB8ACB8BCB8CCB8DCCD9CB8ECB8FCB90CB91B7AACB92CB93CB94CB95CB96CB97CB98CB99CB9ACB9BCB9CCB9DCB9ECB9FCBA0CC40CC41D4E5CC42CC43CC44DEBDCC45CC46CC47CC48CC49DEBFCC4ACC4BCC4CCC4DCC4ECC4FCC50CC51CC52CC53CC54C4A2CC55CC56CC57CC58DEC1CC59CC5ACC5BCC5CCC5DCC5ECC5FCC60CC61CC62CC63CC64CC65CC66CC67CC68DEBECC69DEC0CC6ACC6BCC6CCC6DCC6ECC6FCC70CC71CC72CC73CC74CC75CC76CC77D5BACC78CC79CC7ADEC2CC7BCC7CCC7DCC7ECC80CC81CC82CC83CC84CC85CC86CC87CC88CC89CC8ACC8BF2AEBBA2C2B2C5B0C2C7CC8CCC8DF2AFCC8ECC8FCC90CC91CC92D0E9CC93CC94CC95D3DDCC96CC97CC98EBBDCC99CC9ACC9BCC9CCC9DCC9ECC9FCCA0B3E6F2B0CD40F2B1CD41CD42CAADCD43CD44CD45CD46CD47CD48CD49BAE7F2B3F2B5F2B4CBE4CFBAF2B2CAB4D2CFC2ECCD4ACD4BCD4CCD4DCD4ECD4FCD50CEC3F2B8B0F6F2B7CD51CD52CD53CD54CD55F2BECD56B2CFCD57CD58CD59CD5ACD5BCD5CD1C1F2BACD5DCD5ECD5FCD60CD61F2BCD4E9CD62CD63F2BBF2B6F2BFF2BDCD64F2B9CD65CD66F2C7F2C4F2C6CD67CD68F2CAF2C2F2C0CD69CD6ACD6BF2C5CD6CCD6DCD6ECD6FCD70D6FBCD71CD72CD73F2C1CD74C7F9C9DFCD75F2C8B9C6B5B0CD76CD77F2C3F2C9F2D0F2D6CD78CD79BBD7CD7ACD7BCD7CF2D5CDDCCD7DD6EBCD7ECD80F2D2F2D4CD81CD82CD83CD84B8F2CD85CD86CD87CD88F2CBCD89CD8ACD8BF2CEC2F9CD8CD5DDF2CCF2CDF2CFF2D3CD8DCD8ECD8FF2D9D3BCCD90CD91CD92CD93B6EACD94CAF1CD95B7E4F2D7CD96CD97CD98F2D8F2DAF2DDF2DBCD99CD9AF2DCCD9BCD9CCD9DCD9ED1D1F2D1CD9FCDC9CDA0CECFD6A9CE40F2E3CE41C3DBCE42F2E0CE43CE44C0AFF2ECF2DECE45F2E1CE46CE47CE48F2E8CE49CE4ACE4BCE4CF2E2CE4DCE4EF2E7CE4FCE50F2E6CE51CE52F2E9CE53CE54CE55F2DFCE56CE57F2E4F2EACE58CE59CE5ACE5BCE5CCE5DCE5ED3ACF2E5B2F5CE5FCE60F2F2CE61D0ABCE62CE63CE64CE65F2F5CE66CE67CE68BBC8CE69F2F9CE6ACE6BCE6CCE6DCE6ECE6FF2F0CE70CE71F2F6F2F8F2FACE72CE73CE74CE75CE76CE77CE78CE79F2F3CE7AF2F1CE7BCE7CCE7DBAFBCE7EB5FBCE80CE81CE82CE83F2EFF2F7F2EDF2EECE84CE85CE86F2EBF3A6CE87F3A3CE88CE89F3A2CE8ACE8BF2F4CE8CC8DACE8DCE8ECE8FCE90CE91F2FBCE92CE93CE94F3A5CE95CE96CE97CE98CE99CE9ACE9BC3F8CE9CCE9DCE9ECE9FCEA0CF40CF41CF42F2FDCF43CF44F3A7F3A9F3A4CF45F2FCCF46CF47CF48F3ABCF49F3AACF4ACF4BCF4CCF4DC2DDCF4ECF4FF3AECF50CF51F3B0CF52CF53CF54CF55CF56F3A1CF57CF58CF59F3B1F3ACCF5ACF5BCF5CCF5DCF5EF3AFF2FEF3ADCF5FCF60CF61CF62CF63CF64CF65F3B2CF66CF67CF68CF69F3B4CF6ACF6BCF6CCF6DF3A8CF6ECF6FCF70CF71F3B3CF72CF73CF74F3B5CF75CF76CF77CF78CF79CF7ACF7BCF7CCF7DCF7ED0B7CF80CF81CF82CF83F3B8CF84CF85CF86CF87D9F9CF88CF89CF8ACF8BCF8CCF8DF3B9CF8ECF8FCF90CF91CF92CF93CF94CF95F3B7CF96C8E4F3B6CF97CF98CF99CF9AF3BACF9BCF9CCF9DCF9ECF9FF3BBB4C0CFA0D040D041D042D043D044D045D046D047D048D049D04AD04BD04CD04DEEC3D04ED04FD050D051D052D053F3BCD054D055F3BDD056D057D058D1AAD059D05AD05BF4ACD0C6D05CD05DD05ED05FD060D061D0D0D1DCD062D063D064D065D066D067CFCED068D069BDD6D06AD1C3D06BD06CD06DD06ED06FD070D071BAE2E1E9D2C2F1C2B2B9D072D073B1EDF1C3D074C9C0B3C4D075D9F2D076CBA5D077F1C4D078D079D07AD07BD6D4D07CD07DD07ED080D081F1C5F4C0F1C6D082D4ACF1C7D083B0C0F4C1D084D085F4C2D086D087B4FCD088C5DBD089D08AD08BD08CCCBBD08DD08ED08FD0E4D090D091D092D093D094CDE0D095D096D097D098D099F1C8D09AD9F3D09BD09CD09DD09ED09FD0A0B1BBD140CFAED141D142D143B8A4D144D145D146D147D148F1CAD149D14AD14BD14CF1CBD14DD14ED14FD150B2C3C1D1D151D152D7B0F1C9D153D154F1CCD155D156D157D158F1CED159D15AD15BD9F6D15CD2E1D4A3D15DD15EF4C3C8B9D15FD160D161D162D163F4C4D164D165F1CDF1CFBFE3F1D0D166D167F1D4D168D169D16AD16BD16CD16DD16EF1D6F1D1D16FC9D1C5E1D170D171D172C2E3B9FCD173D174F1D3D175F1D5D176D177D178B9D3D179D17AD17BD17CD17DD17ED180F1DBD181D182D183D184D185BAD6D186B0FDF1D9D187D188D189D18AD18BF1D8F1D2F1DAD18CD18DD18ED18FD190F1D7D191D192D193C8ECD194D195D196D197CDCAF1DDD198D199D19AD19BE5BDD19CD19DD19EF1DCD19FF1DED1A0D240D241D242D243D244D245D246D247D248F1DFD249D24ACFE5D24BD24CD24DD24ED24FD250D251D252D253D254D255D256D257D258D259D25AD25BD25CD25DD25ED25FD260D261D262D263F4C5BDF3D264D265D266D267D268D269F1E0D26AD26BD26CD26DD26ED26FD270D271D272D273D274D275D276D277D278D279D27AD27BD27CD27DF1E1D27ED280D281CEF7D282D2AAD283F1FBD284D285B8B2D286D287D288D289D28AD28BD28CD28DD28ED28FD290D291D292D293D294D295D296D297D298D299D29AD29BD29CD29DD29ED29FD2A0D340D341D342D343D344D345D346D347D348D349D34AD34BD34CD34DD34ED34FD350D351D352D353D354D355D356D357D358D359D35AD35BD35CD35DD35EBCFBB9DBD35FB9E6C3D9CAD3EAE8C0C0BEF5EAE9EAEAEAEBD360EAECEAEDEAEEEAEFBDC7D361D362D363F5FBD364D365D366F5FDD367F5FED368F5FCD369D36AD36BD36CBDE2D36DF6A1B4A5D36ED36FD370D371F6A2D372D373D374F6A3D375D376D377ECB2D378D379D37AD37BD37CD37DD37ED380D381D382D383D384D1D4D385D386D387D388D389D38AD9EAD38BD38CD38DD38ED38FD390D391D392D393D394D395D396D397D398D399D39AD39BD39CD39DD39ED39FD3A0D440D441D442D443D444D445D446D447D448D449D44AD44BD44CD44DD44ED44FD450D451D452D453D454D455D456D457D458D459D45AD45BD45CD45DD45ED45FF6A4D460D461D462D463D464D465D466D467D468EEBAD469D46AD46BD46CD46DD46ED46FD470D471D472D473D474D475D476D477D478D479D47AD47BD47CD47DD47ED480D481D482D483D484D485D486D487D488D489D48AD48BD48CD48DD48ED48FD490D491D492D493D494D495D496D497D498D499D5B2D49AD49BD49CD49DD49ED49FD4A0D540D541D542D543D544D545D546D547D3FECCDCD548D549D54AD54BD54CD54DD54ED54FCAC4D550D551D552D553D554D555D556D557D558D559D55AD55BD55CD55DD55ED55FD560D561D562D563D564D565D566D567D568D569D56AD56BD56CD56DD56ED56FD570D571D572D573D574D575D576D577D578D579D57AD57BD57CD57DD57ED580D581D582D583D584D585D586D587D588D589D58AD58BD58CD58DD58ED58FD590D591D592D593D594D595D596D597D598D599D59AD59BD59CD59DD59ED59FD5A0D640D641D642D643D644D645D646D647D648D649D64AD64BD64CD64DD64ED64FD650D651D652D653D654D655D656D657D658D659D65AD65BD65CD65DD65ED65FD660D661D662E5C0D663D664D665D666D667D668D669D66AD66BD66CD66DD66ED66FD670D671D672D673D674D675D676D677D678D679D67AD67BD67CD67DD67ED680D681F6A5D682D683D684D685D686D687D688D689D68AD68BD68CD68DD68ED68FD690D691D692D693D694D695D696D697D698D699D69AD69BD69CD69DD69ED69FD6A0D740D741D742D743D744D745D746D747D748D749D74AD74BD74CD74DD74ED74FD750D751D752D753D754D755D756D757D758D759D75AD75BD75CD75DD75ED75FBEAFD760D761D762D763D764C6A9D765D766D767D768D769D76AD76BD76CD76DD76ED76FD770D771D772D773D774D775D776D777D778D779D77AD77BD77CD77DD77ED780D781D782D783D784D785D786D787D788D789D78AD78BD78CD78DD78ED78FD790D791D792D793D794D795D796D797D798DAA5BCC6B6A9B8BCC8CFBCA5DAA6DAA7CCD6C8C3DAA8C6FDD799D1B5D2E9D1B6BCC7D79ABDB2BBE4DAA9DAAAD1C8DAABD0EDB6EFC2DBD79BCBCFB7EDC9E8B7C3BEF7D6A4DAACDAADC6C0D7E7CAB6D79CD5A9CBDFD5EFDAAED6DFB4CADAB0DAAFD79DD2EBDAB1DAB2DAB3CAD4DAB4CAABDAB5DAB6B3CFD6EFDAB7BBB0B5AEDAB8DAB9B9EED1AFD2E8DABAB8C3CFEAB2EFDABBDABCD79EBDEBCEDCD3EFDABDCEF3DABED3D5BBE5DABFCBB5CBD0DAC0C7EBD6EEDAC1C5B5B6C1DAC2B7CCBFCEDAC3DAC4CBADDAC5B5F7DAC6C1C2D7BBDAC7CCB8D79FD2EAC4B1DAC8B5FDBBD1DAC9D0B3DACADACBCEBDDACCDACDDACEB2F7DAD1DACFD1E8DAD0C3D5DAD2D7A0DAD3DAD4DAD5D0BBD2A5B0F9DAD6C7ABDAD7BDF7C3A1DAD8DAD9C3FDCCB7DADADADBC0BEC6D7DADCDADDC7B4DADEDADFB9C8D840D841D842D843D844D845D846D847D848BBEDD849D84AD84BD84CB6B9F4F8D84DF4F9D84ED84FCDE3D850D851D852D853D854D855D856D857F5B9D858D859D85AD85BEBE0D85CD85DD85ED85FD860D861CFF3BBBFD862D863D864D865D866D867D868BAC0D4A5D869D86AD86BD86CD86DD86ED86FE1D9D870D871D872D873F5F4B1AAB2F2D874D875D876D877D878D879D87AF5F5D87BD87CF5F7D87DD87ED880BAD1F5F6D881C3B2D882D883D884D885D886D887D888F5F9D889D88AD88BF5F8D88CD88DD88ED88FD890D891D892D893D894D895D896D897D898D899D89AD89BD89CD89DD89ED89FD8A0D940D941D942D943D944D945D946D947D948D949D94AD94BD94CD94DD94ED94FD950D951D952D953D954D955D956D957D958D959D95AD95BD95CD95DD95ED95FD960D961D962D963D964D965D966D967D968D969D96AD96BD96CD96DD96ED96FD970D971D972D973D974D975D976D977D978D979D97AD97BD97CD97DD97ED980D981D982D983D984D985D986D987D988D989D98AD98BD98CD98DD98ED98FD990D991D992D993D994D995D996D997D998D999D99AD99BD99CD99DD99ED99FD9A0DA40DA41DA42DA43DA44DA45DA46DA47DA48DA49DA4ADA4BDA4CDA4DDA4EB1B4D5EAB8BADA4FB9B1B2C6D4F0CFCDB0DCD5CBBBF5D6CAB7B7CCB0C6B6B1E1B9BAD6FCB9E1B7A1BCFAEADAEADBCCF9B9F3EADCB4FBC3B3B7D1BAD8EADDD4F4EADEBCD6BBDFEADFC1DEC2B8D4DFD7CAEAE0EAE1EAE4EAE2EAE3C9DEB8B3B6C4EAE5CAEAC9CDB4CDDA50DA51E2D9C5E2EAE6C0B5DA52D7B8EAE7D7ACC8FCD8D3D8CDD4DEDA53D4F9C9C4D3AEB8D3B3E0DA54C9E2F4F6DA55DA56DA57BAD5DA58F4F7DA59DA5AD7DFDA5BDA5CF4F1B8B0D5D4B8CFC6F0DA5DDA5EDA5FDA60DA61DA62DA63DA64DA65B3C3DA66DA67F4F2B3ACDA68DA69DA6ADA6BD4BDC7F7DA6CDA6DDA6EDA6FDA70F4F4DA71DA72F4F3DA73DA74DA75DA76DA77DA78DA79DA7ADA7BDA7CCCCBDA7DDA7EDA80C8A4DA81DA82DA83DA84DA85DA86DA87DA88DA89DA8ADA8BDA8CDA8DF4F5DA8ED7E3C5BFF5C0DA8FDA90F5BBDA91F5C3DA92F5C2DA93D6BAF5C1DA94DA95DA96D4BEF5C4DA97F5CCDA98DA99DA9ADA9BB0CFB5F8DA9CF5C9F5CADA9DC5DCDA9EDA9FDAA0DB40F5C5F5C6DB41DB42F5C7F5CBDB43BEE0F5C8B8FADB44DB45DB46F5D0F5D3DB47DB48DB49BFE7DB4AB9F2F5BCF5CDDB4BDB4CC2B7DB4DDB4EDB4FCCF8DB50BCF9DB51F5CEF5CFF5D1B6E5F5D2DB52F5D5DB53DB54DB55DB56DB57DB58DB59F5BDDB5ADB5BDB5CF5D4D3BBDB5DB3ECDB5EDB5FCCA4DB60DB61DB62DB63F5D6DB64DB65DB66DB67DB68DB69DB6ADB6BF5D7BEE1F5D8DB6CDB6DCCDFF5DBDB6EDB6FDB70DB71DB72B2C8D7D9DB73F5D9DB74F5DAF5DCDB75F5E2DB76DB77DB78F5E0DB79DB7ADB7BF5DFF5DDDB7CDB7DF5E1DB7EDB80F5DEF5E4F5E5DB81CCE3DB82DB83E5BFB5B8F5E3F5E8CCA3DB84DB85DB86DB87DB88F5E6F5E7DB89DB8ADB8BDB8CDB8DDB8EF5BEDB8FDB90DB91DB92DB93DB94DB95DB96DB97DB98DB99DB9AB1C4DB9BDB9CF5BFDB9DDB9EB5C5B2E4DB9FF5ECF5E9DBA0B6D7DC40F5EDDC41F5EADC42DC43DC44DC45DC46F5EBDC47DC48B4DADC49D4EADC4ADC4BDC4CF5EEDC4DB3F9DC4EDC4FDC50DC51DC52DC53DC54F5EFF5F1DC55DC56DC57F5F0DC58DC59DC5ADC5BDC5CDC5DDC5EF5F2DC5FF5F3DC60DC61DC62DC63DC64DC65DC66DC67DC68DC69DC6ADC6BC9EDB9AADC6CDC6DC7FBDC6EDC6FB6E3DC70DC71DC72DC73DC74DC75DC76CCC9DC77DC78DC79DC7ADC7BDC7CDC7DDC7EDC80DC81DC82DC83DC84DC85DC86DC87DC88DC89DC8AEAA6DC8BDC8CDC8DDC8EDC8FDC90DC91DC92DC93DC94DC95DC96DC97DC98DC99DC9ADC9BDC9CDC9DDC9EDC9FDCA0DD40DD41DD42DD43DD44DD45DD46DD47DD48DD49DD4ADD4BDD4CDD4DDD4EDD4FDD50DD51DD52DD53DD54DD55DD56DD57DD58DD59DD5ADD5BDD5CDD5DDD5EDD5FDD60DD61DD62DD63DD64DD65DD66DD67DD68DD69DD6ADD6BDD6CDD6DDD6EDD6FDD70DD71DD72DD73DD74DD75DD76DD77DD78DD79DD7ADD7BDD7CDD7DDD7EDD80DD81DD82DD83DD84DD85DD86DD87DD88DD89DD8ADD8BDD8CDD8DDD8EDD8FDD90DD91DD92DD93DD94DD95DD96DD97DD98DD99DD9ADD9BDD9CDD9DDD9EDD9FDDA0DE40DE41DE42DE43DE44DE45DE46DE47DE48DE49DE4ADE4BDE4CDE4DDE4EDE4FDE50DE51DE52DE53DE54DE55DE56DE57DE58DE59DE5ADE5BDE5CDE5DDE5EDE5FDE60B3B5D4FEB9ECD0F9DE61E9EDD7AAE9EEC2D6C8EDBAE4E9EFE9F0E9F1D6E1E9F2E9F3E9F5E9F4E9F6E9F7C7E1E9F8D4D8E9F9BDCEDE62E9FAE9FBBDCFE9FCB8A8C1BEE9FDB1B2BBD4B9F5E9FEDE63EAA1EAA2EAA3B7F8BCADDE64CAE4E0CED4AFCFBDD5B7EAA4D5DEEAA5D0C1B9BCDE65B4C7B1D9DE66DE67DE68C0B1DE69DE6ADE6BDE6CB1E6B1E7DE6DB1E8DE6EDE6FDE70DE71B3BDC8E8DE72DE73DE74DE75E5C1DE76DE77B1DFDE78DE79DE7AC1C9B4EFDE7BDE7CC7A8D3D8DE7DC6F9D1B8DE7EB9FDC2F5DE80DE81DE82DE83DE84D3ADDE85D4CBBDFCDE86E5C2B7B5E5C3DE87DE88BBB9D5E2DE89BDF8D4B6CEA5C1ACB3D9DE8ADE8BCCF6DE8CE5C6E5C4E5C8DE8DE5CAE5C7B5CFC6C8DE8EB5FCE5C5DE8FCAF6DE90DE91E5C9DE92DE93DE94C3D4B1C5BCA3DE95DE96DE97D7B7DE98DE99CDCBCBCDCACACCD3E5CCE5CBC4E6DE9ADE9BD1A1D1B7E5CDDE9CE5D0DE9DCDB8D6F0E5CFB5DDDE9ECDBEDE9FE5D1B6BADEA0DF40CDA8B9E4DF41CAC5B3D1CBD9D4ECE5D2B7EADF42DF43DF44E5CEDF45DF46DF47DF48DF49DF4AE5D5B4FEE5D6DF4BDF4CDF4DDF4EDF4FE5D3E5D4DF50D2DDDF51DF52C2DFB1C6DF53D3E2DF54DF55B6DDCBECDF56E5D7DF57DF58D3F6DF59DF5ADF5BDF5CDF5DB1E9DF5EB6F4E5DAE5D8E5D9B5C0DF5FDF60DF61D2C5E5DCDF62DF63E5DEDF64DF65DF66DF67DF68DF69E5DDC7B2DF6AD2A3DF6BDF6CE5DBDF6DDF6EDF6FDF70D4E2D5DADF71DF72DF73DF74DF75E5E0D7F1DF76DF77DF78DF79DF7ADF7BDF7CE5E1DF7DB1DCD1FBDF7EE5E2E5E4DF80DF81DF82DF83E5E3DF84DF85E5E5DF86DF87DF88DF89DF8AD2D8DF8BB5CBDF8CE7DFDF8DDAF5DF8EDAF8DF8FDAF6DF90DAF7DF91DF92DF93DAFAD0CFC4C7DF94DF95B0EEDF96DF97DF98D0B0DF99DAF9DF9AD3CABAAADBA2C7F1DF9BDAFCDAFBC9DBDAFDDF9CDBA1D7DEDAFEC1DADF9DDF9EDBA5DF9FDFA0D3F4E040E041DBA7DBA4E042DBA8E043E044BDBCE045E046E047C0C9DBA3DBA6D6A3E048DBA9E049E04AE04BDBADE04CE04DE04EDBAEDBACBAC2E04FE050E051BFA4DBABE052E053E054DBAAD4C7B2BFE055E056DBAFE057B9F9E058DBB0E059E05AE05BE05CB3BBE05DE05EE05FB5A6E060E061E062E063B6BCDBB1E064E065E066B6F5E067DBB2E068E069E06AE06BE06CE06DE06EE06FE070E071E072E073E074E075E076E077E078E079E07AE07BB1C9E07CE07DE07EE080DBB4E081E082E083DBB3DBB5E084E085E086E087E088E089E08AE08BE08CE08DE08EDBB7E08FDBB6E090E091E092E093E094E095E096DBB8E097E098E099E09AE09BE09CE09DE09EE09FDBB9E0A0E140DBBAE141E142D3CFF4FAC7F5D7C3C5E4F4FCF4FDF4FBE143BEC6E144E145E146E147D0EFE148E149B7D3E14AE14BD4CDCCAAE14CE14DF5A2F5A1BAA8F4FECBD6E14EE14FE150F5A4C0D2E151B3EAE152CDAAF5A5F5A3BDB4F5A8E153F5A9BDCDC3B8BFE1CBE1F5AAE154E155E156F5A6F5A7C4F0E157E158E159E15AE15BF5ACE15CB4BCE15DD7EDE15EB4D7F5ABF5AEE15FE160F5ADF5AFD0D1E161E162E163E164E165E166E167C3D1C8A9E168E169E16AE16BE16CE16DF5B0F5B1E16EE16FE170E171E172E173F5B2E174E175F5B3F5B4F5B5E176E177E178E179F5B7F5B6E17AE17BE17CE17DF5B8E17EE180E181E182E183E184E185E186E187E188E189E18AB2C9E18BD3D4CACDE18CC0EFD6D8D2B0C1BFE18DBDF0E18EE18FE190E191E192E193E194E195E196E197B8AAE198E199E19AE19BE19CE19DE19EE19FE1A0E240E241E242E243E244E245E246E247E248E249E24AE24BE24CE24DE24EE24FE250E251E252E253E254E255E256E257E258E259E25AE25BE25CE25DE25EE25FE260E261E262E263E264E265E266E267E268E269E26AE26BE26CE26DE26EE26FE270E271E272E273E274E275E276E277E278E279E27AE27BE27CE27DE27EE280E281E282E283E284E285E286E287E288E289E28AE28BE28CE28DE28EE28FE290E291E292E293E294E295E296E297E298E299E29AE29BE29CE29DE29EE29FE2A0E340E341E342E343E344E345E346E347E348E349E34AE34BE34CE34DE34EE34FE350E351E352E353E354E355E356E357E358E359E35AE35BE35CE35DE35EE35FE360E361E362E363E364E365E366E367E368E369E36AE36BE36CE36DBCF8E36EE36FE370E371E372E373E374E375E376E377E378E379E37AE37BE37CE37DE37EE380E381E382E383E384E385E386E387F6C6E388E389E38AE38BE38CE38DE38EE38FE390E391E392E393E394E395E396E397E398E399E39AE39BE39CE39DE39EE39FE3A0E440E441E442E443E444E445F6C7E446E447E448E449E44AE44BE44CE44DE44EE44FE450E451E452E453E454E455E456E457E458E459E45AE45BE45CE45DE45EF6C8E45FE460E461E462E463E464E465E466E467E468E469E46AE46BE46CE46DE46EE46FE470E471E472E473E474E475E476E477E478E479E47AE47BE47CE47DE47EE480E481E482E483E484E485E486E487E488E489E48AE48BE48CE48DE48EE48FE490E491E492E493E494E495E496E497E498E499E49AE49BE49CE49DE49EE49FE4A0E540E541E542E543E544E545E546E547E548E549E54AE54BE54CE54DE54EE54FE550E551E552E553E554E555E556E557E558E559E55AE55BE55CE55DE55EE55FE560E561E562E563E564E565E566E567E568E569E56AE56BE56CE56DE56EE56FE570E571E572E573F6C9E574E575E576E577E578E579E57AE57BE57CE57DE57EE580E581E582E583E584E585E586E587E588E589E58AE58BE58CE58DE58EE58FE590E591E592E593E594E595E596E597E598E599E59AE59BE59CE59DE59EE59FF6CAE5A0E640E641E642E643E644E645E646E647E648E649E64AE64BE64CE64DE64EE64FE650E651E652E653E654E655E656E657E658E659E65AE65BE65CE65DE65EE65FE660E661E662F6CCE663E664E665E666E667E668E669E66AE66BE66CE66DE66EE66FE670E671E672E673E674E675E676E677E678E679E67AE67BE67CE67DE67EE680E681E682E683E684E685E686E687E688E689E68AE68BE68CE68DE68EE68FE690E691E692E693E694E695E696E697E698E699E69AE69BE69CE69DF6CBE69EE69FE6A0E740E741E742E743E744E745E746E747F7E9E748E749E74AE74BE74CE74DE74EE74FE750E751E752E753E754E755E756E757E758E759E75AE75BE75CE75DE75EE75FE760E761E762E763E764E765E766E767E768E769E76AE76BE76CE76DE76EE76FE770E771E772E773E774E775E776E777E778E779E77AE77BE77CE77DE77EE780E781E782E783E784E785E786E787E788E789E78AE78BE78CE78DE78EE78FE790E791E792E793E794E795E796E797E798E799E79AE79BE79CE79DE79EE79FE7A0E840E841E842E843E844E845E846E847E848E849E84AE84BE84CE84DE84EF6CDE84FE850E851E852E853E854E855E856E857E858E859E85AE85BE85CE85DE85EE85FE860E861E862E863E864E865E866E867E868E869E86AE86BE86CE86DE86EE86FE870E871E872E873E874E875E876E877E878E879E87AF6CEE87BE87CE87DE87EE880E881E882E883E884E885E886E887E888E889E88AE88BE88CE88DE88EE88FE890E891E892E893E894EEC4EEC5EEC6D5EBB6A4EEC8EEC7EEC9EECAC7A5EECBEECCE895B7B0B5F6EECDEECFE896EECEE897B8C6EED0EED1EED2B6DBB3AED6D3C4C6B1B5B8D6EED3EED4D4BFC7D5BEFBCED9B9B3EED6EED5EED8EED7C5A5EED9EEDAC7AEEEDBC7AFEEDCB2A7EEDDEEDEEEDFEEE0EEE1D7EAEEE2EEE3BCD8EEE4D3CBCCFAB2ACC1E5EEE5C7A6C3ADE898EEE6EEE7EEE8EEE9EEEAEEEBEEECE899EEEDEEEEEEEFE89AE89BEEF0EEF1EEF2EEF4EEF3E89CEEF5CDADC2C1EEF6EEF7EEF8D5A1EEF9CFB3EEFAEEFBE89DEEFCEEFDEFA1EEFEEFA2B8F5C3FAEFA3EFA4BDC2D2BFB2F9EFA5EFA6EFA7D2F8EFA8D6FDEFA9C6CCE89EEFAAEFABC1B4EFACCFFACBF8EFAEEFADB3FAB9F8EFAFEFB0D0E2EFB1EFB2B7E6D0BFEFB3EFB4EFB5C8F1CCE0EFB6EFB7EFB8EFB9EFBAD5E0EFBBB4EDC3AAEFBCE89FEFBDEFBEEFBFE8A0CEFDEFC0C2E0B4B8D7B6BDF5E940CFC7EFC3EFC1EFC2EFC4B6A7BCFCBEE2C3CCEFC5EFC6E941EFC7EFCFEFC8EFC9EFCAC7C2EFF1B6CDEFCBE942EFCCEFCDB6C6C3BEEFCEE943EFD0EFD1EFD2D5F2E944EFD3C4F7E945EFD4C4F8EFD5EFD6B8E4B0F7EFD7EFD8EFD9E946EFDAEFDBEFDCEFDDE947EFDEBEB5EFE1EFDFEFE0E948EFE2EFE3C1CDEFE4EFE5EFE6EFE7EFE8EFE9EFEAEFEBEFECC0D8E949EFEDC1ADEFEEEFEFEFF0E94AE94BCFE2E94CE94DE94EE94FE950E951E952E953B3A4E954E955E956E957E958E959E95AE95BE95CE95DE95EE95FE960E961E962E963E964E965E966E967E968E969E96AE96BE96CE96DE96EE96FE970E971E972E973E974E975E976E977E978E979E97AE97BE97CE97DE97EE980E981E982E983E984E985E986E987E988E989E98AE98BE98CE98DE98EE98FE990E991E992E993E994E995E996E997E998E999E99AE99BE99CE99DE99EE99FE9A0EA40EA41EA42EA43EA44EA45EA46EA47EA48EA49EA4AEA4BEA4CEA4DEA4EEA4FEA50EA51EA52EA53EA54EA55EA56EA57EA58EA59EA5AEA5BC3C5E3C5C9C1E3C6EA5CB1D5CECAB4B3C8F2E3C7CFD0E3C8BCE4E3C9E3CAC3C6D5A2C4D6B9EBCEC5E3CBC3F6E3CCEA5DB7A7B8F3BAD2E3CDE3CED4C4E3CFEA5EE3D0D1CBE3D1E3D2E3D3E3D4D1D6E3D5B2FBC0BBE3D6EA5FC0ABE3D7E3D8E3D9EA60E3DAE3DBEA61B8B7DAE2EA62B6D3EA63DAE4DAE3EA64EA65EA66EA67EA68EA69EA6ADAE6EA6BEA6CEA6DC8EEEA6EEA6FDAE5B7C0D1F4D2F5D5F3BDD7EA70EA71EA72EA73D7E8DAE8DAE7EA74B0A2CDD3EA75DAE9EA76B8BDBCCAC2BDC2A4B3C2DAEAEA77C2AAC4B0BDB5EA78EA79CFDEEA7AEA7BEA7CDAEBC9C2EA7DEA7EEA80EA81EA82B1DDEA83EA84EA85DAECEA86B6B8D4BAEA87B3FDEA88EA89DAEDD4C9CFD5C5E3EA8ADAEEEA8BEA8CEA8DEA8EEA8FDAEFEA90DAF0C1EACCD5CFDDEA91EA92EA93EA94EA95EA96EA97EA98EA99EA9AEA9BEA9CEA9DD3E7C2A1EA9EDAF1EA9FEAA0CBE5EB40DAF2EB41CBE6D2FEEB42EB43EB44B8F4EB45EB46DAF3B0AFCFB6EB47EB48D5CFEB49EB4AEB4BEB4CEB4DEB4EEB4FEB50EB51EB52CBEDEB53EB54EB55EB56EB57EB58EB59EB5ADAF4EB5BEB5CE3C4EB5DEB5EC1A5EB5FEB60F6BFEB61EB62F6C0F6C1C4D1EB63C8B8D1E3EB64EB65D0DBD1C5BCAFB9CDEB66EFF4EB67EB68B4C6D3BAF6C2B3FBEB69EB6AF6C3EB6BEB6CB5F1EB6DEB6EEB6FEB70EB71EB72EB73EB74EB75EB76F6C5EB77EB78EB79EB7AEB7BEB7CEB7DD3EAF6A7D1A9EB7EEB80EB81EB82F6A9EB83EB84EB85F6A8EB86EB87C1E3C0D7EB88B1A2EB89EB8AEB8BEB8CCEEDEB8DD0E8F6ABEB8EEB8FCFF6EB90F6AAD5F0F6ACC3B9EB91EB92EB93BBF4F6AEF6ADEB94EB95EB96C4DEEB97EB98C1D8EB99EB9AEB9BEB9CEB9DCBAAEB9ECFBCEB9FEBA0EC40EC41EC42EC43EC44EC45EC46EC47EC48F6AFEC49EC4AF6B0EC4BEC4CF6B1EC4DC2B6EC4EEC4FEC50EC51EC52B0D4C5F9EC53EC54EC55EC56F6B2EC57EC58EC59EC5AEC5BEC5CEC5DEC5EEC5FEC60EC61EC62EC63EC64EC65EC66EC67EC68EC69C7E0F6A6EC6AEC6BBEB8EC6CEC6DBEB2EC6EB5E5EC6FEC70B7C7EC71BFBFC3D2C3E6EC72EC73D8CCEC74EC75EC76B8EFEC77EC78EC79EC7AEC7BEC7CEC7DEC7EEC80BDF9D1A5EC81B0D0EC82EC83EC84EC85EC86F7B0EC87EC88EC89EC8AEC8BEC8CEC8DEC8EF7B1EC8FEC90EC91EC92EC93D0ACEC94B0B0EC95EC96EC97F7B2F7B3EC98F7B4EC99EC9AEC9BC7CAEC9CEC9DEC9EEC9FECA0ED40ED41BECFED42ED43F7B7ED44ED45ED46ED47ED48ED49ED4AF7B6ED4BB1DEED4CF7B5ED4DED4EF7B8ED4FF7B9ED50ED51ED52ED53ED54ED55ED56ED57ED58ED59ED5AED5BED5CED5DED5EED5FED60ED61ED62ED63ED64ED65ED66ED67ED68ED69ED6AED6BED6CED6DED6EED6FED70ED71ED72ED73ED74ED75ED76ED77ED78ED79ED7AED7BED7CED7DED7EED80ED81CEA4C8CDED82BAABE8B8E8B9E8BABEC2ED83ED84ED85ED86ED87D2F4ED88D4CFC9D8ED89ED8AED8BED8CED8DED8EED8FED90ED91ED92ED93ED94ED95ED96ED97ED98ED99ED9AED9BED9CED9DED9EED9FEDA0EE40EE41EE42EE43EE44EE45EE46EE47EE48EE49EE4AEE4BEE4CEE4DEE4EEE4FEE50EE51EE52EE53EE54EE55EE56EE57EE58EE59EE5AEE5BEE5CEE5DEE5EEE5FEE60EE61EE62EE63EE64EE65EE66EE67EE68EE69EE6AEE6BEE6CEE6DEE6EEE6FEE70EE71EE72EE73EE74EE75EE76EE77EE78EE79EE7AEE7BEE7CEE7DEE7EEE80EE81EE82EE83EE84EE85EE86EE87EE88EE89EE8AEE8BEE8CEE8DEE8EEE8FEE90EE91EE92EE93EE94EE95EE96EE97EE98EE99EE9AEE9BEE9CEE9DEE9EEE9FEEA0EF40EF41EF42EF43EF44EF45D2B3B6A5C7EAF1FCCFEECBB3D0EBE7EFCDE7B9CBB6D9F1FDB0E4CBCCF1FED4A4C2ADC1ECC6C4BEB1F2A1BCD5EF46F2A2F2A3EF47F2A4D2C3C6B5EF48CDC7F2A5EF49D3B1BFC5CCE2EF4AF2A6F2A7D1D5B6EEF2A8F2A9B5DFF2AAF2ABEF4BB2FCF2ACF2ADC8A7EF4CEF4DEF4EEF4FEF50EF51EF52EF53EF54EF55EF56EF57EF58EF59EF5AEF5BEF5CEF5DEF5EEF5FEF60EF61EF62EF63EF64EF65EF66EF67EF68EF69EF6AEF6BEF6CEF6DEF6EEF6FEF70EF71B7E7EF72EF73ECA9ECAAECABEF74ECACEF75EF76C6AEECADECAEEF77EF78EF79B7C9CAB3EF7AEF7BEF7CEF7DEF7EEF80EF81E2B8F7CFEF82EF83EF84EF85EF86EF87EF88EF89EF8AEF8BEF8CEF8DEF8EEF8FEF90EF91EF92EF93EF94EF95EF96EF97EF98EF99EF9AEF9BEF9CEF9DEF9EEF9FEFA0F040F041F042F043F044F7D0F045F046B2CDF047F048F049F04AF04BF04CF04DF04EF04FF050F051F052F053F054F055F056F057F058F059F05AF05BF05CF05DF05EF05FF060F061F062F063F7D1F064F065F066F067F068F069F06AF06BF06CF06DF06EF06FF070F071F072F073F074F075F076F077F078F079F07AF07BF07CF07DF07EF080F081F082F083F084F085F086F087F088F089F7D3F7D2F08AF08BF08CF08DF08EF08FF090F091F092F093F094F095F096E2BBF097BCA2F098E2BCE2BDE2BEE2BFE2C0E2C1B7B9D2FBBDA4CACEB1A5CBC7F099E2C2B6FCC8C4E2C3F09AF09BBDC8F09CB1FDE2C4F09DB6F6E2C5C4D9F09EF09FE2C6CFDAB9DDE2C7C0A1F0A0E2C8B2F6F140E2C9F141C1F3E2CAE2CBC2F8E2CCE2CDE2CECAD7D8B8D9E5CFE3F142F143F144F145F146F147F148F149F14AF14BF14CF0A5F14DF14EDCB0F14FF150F151F152F153F154F155F156F157F158F159F15AF15BF15CF15DF15EF15FF160F161F162F163F164F165F166F167F168F169F16AF16BF16CF16DF16EF16FF170F171F172F173F174F175F176F177F178F179F17AF17BF17CF17DF17EF180F181F182F183F184F185F186F187F188F189F18AF18BF18CF18DF18EF18FF190F191F192F193F194F195F196F197F198F199F19AF19BF19CF19DF19EF19FF1A0F240F241F242F243F244F245F246F247F248F249F24AF24BF24CF24DF24EF24FF250F251F252F253F254F255F256F257F258F259F25AF25BF25CF25DF25EF25FF260F261F262F263F264F265F266F267F268F269F26AF26BF26CF26DF26EF26FF270F271F272F273F274F275F276F277F278F279F27AF27BF27CF27DF27EF280F281F282F283F284F285F286F287F288F289F28AF28BF28CF28DF28EF28FF290F291F292F293F294F295F296F297F298F299F29AF29BF29CF29DF29EF29FF2A0F340F341F342F343F344F345F346F347F348F349F34AF34BF34CF34DF34EF34FF350F351C2EDD4A6CDD4D1B1B3DBC7FDF352B2B5C2BFE6E0CABBE6E1E6E2BED4E6E3D7A4CDD5E6E5BCDDE6E4E6E6E6E7C2EEF353BDBEE6E8C2E6BAA7E6E9F354E6EAB3D2D1E9F355F356BFA5E6EBC6EFE6ECE6EDF357F358E6EEC6ADE6EFF359C9A7E6F0E6F1E6F2E5B9E6F3E6F4C2E2E6F5E6F6D6E8E6F7F35AE6F8B9C7F35BF35CF35DF35EF35FF360F361F7BBF7BAF362F363F364F365F7BEF7BCBAA1F366F7BFF367F7C0F368F369F36AF7C2F7C1F7C4F36BF36CF7C3F36DF36EF36FF370F371F7C5F7C6F372F373F374F375F7C7F376CBE8F377F378F379F37AB8DFF37BF37CF37DF37EF380F381F7D4F382F7D5F383F384F385F386F7D6F387F388F389F38AF7D8F38BF7DAF38CF7D7F38DF38EF38FF390F391F392F393F394F395F7DBF396F7D9F397F398F399F39AF39BF39CF39DD7D7F39EF39FF3A0F440F7DCF441F442F443F444F445F446F7DDF447F448F449F7DEF44AF44BF44CF44DF44EF44FF450F451F452F453F454F7DFF455F456F457F7E0F458F459F45AF45BF45CF45DF45EF45FF460F461F462DBCBF463F464D8AAF465F466F467F468F469F46AF46BF46CE5F7B9EDF46DF46EF46FF470BFFDBBEAF7C9C6C7F7C8F471F7CAF7CCF7CBF472F473F474F7CDF475CEBAF476F7CEF477F478C4A7F479F47AF47BF47CF47DF47EF480F481F482F483F484F485F486F487F488F489F48AF48BF48CF48DF48EF48FF490F491F492F493F494F495F496F497F498F499F49AF49BF49CF49DF49EF49FF4A0F540F541F542F543F544F545F546F547F548F549F54AF54BF54CF54DF54EF54FF550F551F552F553F554F555F556F557F558F559F55AF55BF55CF55DF55EF55FF560F561F562F563F564F565F566F567F568F569F56AF56BF56CF56DF56EF56FF570F571F572F573F574F575F576F577F578F579F57AF57BF57CF57DF57EF580F581F582F583F584F585F586F587F588F589F58AF58BF58CF58DF58EF58FF590F591F592F593F594F595F596F597F598F599F59AF59BF59CF59DF59EF59FF5A0F640F641F642F643F644F645F646F647F648F649F64AF64BF64CF64DF64EF64FF650F651F652F653F654F655F656F657F658F659F65AF65BF65CF65DF65EF65FF660F661F662F663F664F665F666F667F668F669F66AF66BF66CF66DF66EF66FF670F671F672F673F674F675F676F677F678F679F67AF67BF67CF67DF67EF680F681F682F683F684F685F686F687F688F689F68AF68BF68CF68DF68EF68FF690F691F692F693F694F695F696F697F698F699F69AF69BF69CF69DF69EF69FF6A0F740F741F742F743F744F745F746F747F748F749F74AF74BF74CF74DF74EF74FF750F751F752F753F754F755F756F757F758F759F75AF75BF75CF75DF75EF75FF760F761F762F763F764F765F766F767F768F769F76AF76BF76CF76DF76EF76FF770F771F772F773F774F775F776F777F778F779F77AF77BF77CF77DF77EF780D3E3F781F782F6CFF783C2B3F6D0F784F785F6D1F6D2F6D3F6D4F786F787F6D6F788B1ABF6D7F789F6D8F6D9F6DAF78AF6DBF6DCF78BF78CF78DF78EF6DDF6DECFCAF78FF6DFF6E0F6E1F6E2F6E3F6E4C0F0F6E5F6E6F6E7F6E8F6E9F790F6EAF791F6EBF6ECF792F6EDF6EEF6EFF6F0F6F1F6F2F6F3F6F4BEA8F793F6F5F6F6F6F7F6F8F794F795F796F797F798C8FAF6F9F6FAF6FBF6FCF799F79AF6FDF6FEF7A1F7A2F7A3F7A4F7A5F79BF79CF7A6F7A7F7A8B1EEF7A9F7AAF7ABF79DF79EF7ACF7ADC1DBF7AEF79FF7A0F7AFF840F841F842F843F844F845F846F847F848F849F84AF84BF84CF84DF84EF84FF850F851F852F853F854F855F856F857F858F859F85AF85BF85CF85DF85EF85FF860F861F862F863F864F865F866F867F868F869F86AF86BF86CF86DF86EF86FF870F871F872F873F874F875F876F877F878F879F87AF87BF87CF87DF87EF880F881F882F883F884F885F886F887F888F889F88AF88BF88CF88DF88EF88FF890F891F892F893F894F895F896F897F898F899F89AF89BF89CF89DF89EF89FF8A0F940F941F942F943F944F945F946F947F948F949F94AF94BF94CF94DF94EF94FF950F951F952F953F954F955F956F957F958F959F95AF95BF95CF95DF95EF95FF960F961F962F963F964F965F966F967F968F969F96AF96BF96CF96DF96EF96FF970F971F972F973F974F975F976F977F978F979F97AF97BF97CF97DF97EF980F981F982F983F984F985F986F987F988F989F98AF98BF98CF98DF98EF98FF990F991F992F993F994F995F996F997F998F999F99AF99BF99CF99DF99EF99FF9A0FA40FA41FA42FA43FA44FA45FA46FA47FA48FA49FA4AFA4BFA4CFA4DFA4EFA4FFA50FA51FA52FA53FA54FA55FA56FA57FA58FA59FA5AFA5BFA5CFA5DFA5EFA5FFA60FA61FA62FA63FA64FA65FA66FA67FA68FA69FA6AFA6BFA6CFA6DFA6EFA6FFA70FA71FA72FA73FA74FA75FA76FA77FA78FA79FA7AFA7BFA7CFA7DFA7EFA80FA81FA82FA83FA84FA85FA86FA87FA88FA89FA8AFA8BFA8CFA8DFA8EFA8FFA90FA91FA92FA93FA94FA95FA96FA97FA98FA99FA9AFA9BFA9CFA9DFA9EFA9FFAA0FB40FB41FB42FB43FB44FB45FB46FB47FB48FB49FB4AFB4BFB4CFB4DFB4EFB4FFB50FB51FB52FB53FB54FB55FB56FB57FB58FB59FB5AFB5BC4F1F0AFBCA6F0B0C3F9FB5CC5B8D1BBFB5DF0B1F0B2F0B3F0B4F0B5D1BCFB5ED1ECFB5FF0B7F0B6D4A7FB60CDD2F0B8F0BAF0B9F0BBF0BCFB61FB62B8EBF0BDBAE8FB63F0BEF0BFBEE9F0C0B6ECF0C1F0C2F0C3F0C4C8B5F0C5F0C6FB64F0C7C5F4FB65F0C8FB66FB67FB68F0C9FB69F0CAF7BDFB6AF0CBF0CCF0CDFB6BF0CEFB6CFB6DFB6EFB6FF0CFBAD7FB70F0D0F0D1F0D2F0D3F0D4F0D5F0D6F0D8FB71FB72D3A5F0D7FB73F0D9FB74FB75FB76FB77FB78FB79FB7AFB7BFB7CFB7DF5BAC2B9FB7EFB80F7E4FB81FB82FB83FB84F7E5F7E6FB85FB86F7E7FB87FB88FB89FB8AFB8BFB8CF7E8C2B4FB8DFB8EFB8FFB90FB91FB92FB93FB94FB95F7EAFB96F7EBFB97FB98FB99FB9AFB9BFB9CC2F3FB9DFB9EFB9FFBA0FC40FC41FC42FC43FC44FC45FC46FC47FC48F4F0FC49FC4AFC4BF4EFFC4CFC4DC2E9FC4EF7E1F7E2FC4FFC50FC51FC52FC53BBC6FC54FC55FC56FC57D9E4FC58FC59FC5ACAF2C0E8F0A4FC5BBADAFC5CFC5DC7ADFC5EFC5FFC60C4ACFC61FC62F7ECF7EDF7EEFC63F7F0F7EFFC64F7F1FC65FC66F7F4FC67F7F3FC68F7F2F7F5FC69FC6AFC6BFC6CF7F6FC6DFC6EFC6FFC70FC71FC72FC73FC74FC75EDE9FC76EDEAEDEBFC77F6BCFC78FC79FC7AFC7BFC7CFC7DFC7EFC80FC81FC82FC83FC84F6BDFC85F6BEB6A6FC86D8BEFC87FC88B9C4FC89FC8AFC8BD8BBFC8CDCB1FC8DFC8EFC8FFC90FC91FC92CAF3FC93F7F7FC94FC95FC96FC97FC98FC99FC9AFC9BFC9CF7F8FC9DFC9EF7F9FC9FFCA0FD40FD41FD42FD43FD44F7FBFD45F7FAFD46B1C7FD47F7FCF7FDFD48FD49FD4AFD4BFD4CF7FEFD4DFD4EFD4FFD50FD51FD52FD53FD54FD55FD56FD57C6EBECB4FD58FD59FD5AFD5BFD5CFD5DFD5EFD5FFD60FD61FD62FD63FD64FD65FD66FD67FD68FD69FD6AFD6BFD6CFD6DFD6EFD6FFD70FD71FD72FD73FD74FD75FD76FD77FD78FD79FD7AFD7BFD7CFD7DFD7EFD80FD81FD82FD83FD84FD85B3DDF6B3FD86FD87F6B4C1E4F6B5F6B6F6B7F6B8F6B9F6BAC8A3F6BBFD88FD89FD8AFD8BFD8CFD8DFD8EFD8FFD90FD91FD92FD93C1FAB9A8EDE8FD94FD95FD96B9EAD9DFFD97FD98FD99FD9AFD9'; - - for (var i = 0; i < str.length; i++) { - var c = str.charAt(i), - code = str.charCodeAt(i); - if (c == " ") strOut += "+"; - else if (code >= 19968 && code <= 40869) { - var index = code - 19968; - strOut += "%" + z.substr(index * 4, 2) + "%" + z.substr(index * 4 + 2, 2); - } else { - strOut += "%" + str.charCodeAt(i).toString(16); - } - } - return strOut; - }, - /* 改变图片大小 */ - scale: function (img, w, h) { - var ow = img.width, - oh = img.height; - - if (ow >= oh) { - img.width = w * ow / oh; - img.height = h; - img.style.marginLeft = '-' + parseInt((img.width - w) / 2) + 'px'; - } else { - img.width = w; - img.height = h * oh / ow; - img.style.marginTop = '-' + parseInt((img.height - h) / 2) + 'px'; - } - }, - getImageData: function(){ - var _this = this, - key = $G('searchTxt').value, - type = $G('searchType').value, - keepOriginName = editor.options.keepOriginName ? "1" : "0", - url = "http://image.baidu.com/i?ct=201326592&cl=2&lm=-1&st=-1&tn=baiduimagejson&istype=2&rn=32&fm=index&pv=&word=" + _this.encodeToGb2312(key) + type + "&keeporiginname=" + keepOriginName + "&" + +new Date; - - $G('searchListUl').innerHTML = lang.searchLoading; - ajax.request(url, { - 'dataType': 'jsonp', - 'charset': 'GB18030', - 'onsuccess':function(json){ - var list = []; - if(json && json.data) { - for(var i = 0; i < json.data.length; i++) { - if(json.data[i].objURL) { - list.push({ - title: json.data[i].fromPageTitleEnc, - src: json.data[i].objURL, - url: json.data[i].fromURL - }); - } - } - } - _this.setList(list); - }, - 'onerror':function(){ - $G('searchListUl').innerHTML = lang.searchRetry; - } - }); - }, - /* 添加图片到列表界面上 */ - setList: function (list) { - var i, item, p, img, link, _this = this, - listUl = $G('searchListUl'); - - listUl.innerHTML = ''; - if(list.length) { - for (i = 0; i < list.length; i++) { - item = document.createElement('li'); - p = document.createElement('p'); - img = document.createElement('img'); - link = document.createElement('a'); - - img.onload = function () { - _this.scale(this, 113, 113); - }; - img.width = 113; - img.setAttribute('src', list[i].src); - - link.href = list[i].url; - link.target = '_blank'; - link.title = list[i].title; - link.innerHTML = list[i].title; - - p.appendChild(img); - item.appendChild(p); - item.appendChild(link); - listUl.appendChild(item); - } - } else { - listUl.innerHTML = lang.searchRetry; - } - }, - getInsertList: function () { - var child, - src, - align = getAlign(), - list = [], - items = $G('searchListUl').children; - for(var i = 0; i < items.length; i++) { - child = items[i].firstChild && items[i].firstChild.firstChild; - if(child.tagName && child.tagName.toLowerCase() == 'img' && domUtils.hasClass(items[i], 'selected')) { - src = child.src; - list.push({ - src: src, - _src: src, - alt: src.substr(src.lastIndexOf('/') + 1), - floatStyle: align - }); - } - } - return list; - } - }; - -})(); diff --git a/public/static/admin/UEditor/dialogs/image/images/alignicon.jpg b/public/static/admin/UEditor/dialogs/image/images/alignicon.jpg deleted file mode 100644 index 754755b..0000000 Binary files a/public/static/admin/UEditor/dialogs/image/images/alignicon.jpg and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/image/images/bg.png b/public/static/admin/UEditor/dialogs/image/images/bg.png deleted file mode 100644 index 580be0a..0000000 Binary files a/public/static/admin/UEditor/dialogs/image/images/bg.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/image/images/icons.gif b/public/static/admin/UEditor/dialogs/image/images/icons.gif deleted file mode 100644 index 78459de..0000000 Binary files a/public/static/admin/UEditor/dialogs/image/images/icons.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/image/images/icons.png b/public/static/admin/UEditor/dialogs/image/images/icons.png deleted file mode 100644 index 12e4700..0000000 Binary files a/public/static/admin/UEditor/dialogs/image/images/icons.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/image/images/image.png b/public/static/admin/UEditor/dialogs/image/images/image.png deleted file mode 100644 index 19699f6..0000000 Binary files a/public/static/admin/UEditor/dialogs/image/images/image.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/image/images/progress.png b/public/static/admin/UEditor/dialogs/image/images/progress.png deleted file mode 100644 index 717c486..0000000 Binary files a/public/static/admin/UEditor/dialogs/image/images/progress.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/image/images/success.gif b/public/static/admin/UEditor/dialogs/image/images/success.gif deleted file mode 100644 index 8d4f311..0000000 Binary files a/public/static/admin/UEditor/dialogs/image/images/success.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/image/images/success.png b/public/static/admin/UEditor/dialogs/image/images/success.png deleted file mode 100644 index 94f968d..0000000 Binary files a/public/static/admin/UEditor/dialogs/image/images/success.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/insertframe/insertframe.html b/public/static/admin/UEditor/dialogs/insertframe/insertframe.html deleted file mode 100644 index 7f1f3e9..0000000 --- a/public/static/admin/UEditor/dialogs/insertframe/insertframe.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    - - -
    px
    px
    - -
    -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/internal.js b/public/static/admin/UEditor/dialogs/internal.js deleted file mode 100644 index 44dc17f..0000000 --- a/public/static/admin/UEditor/dialogs/internal.js +++ /dev/null @@ -1,81 +0,0 @@ -(function () { - var parent = window.parent; - //dialog对象 - dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )]; - //当前打开dialog的编辑器实例 - editor = dialog.editor; - - UE = parent.UE; - - domUtils = UE.dom.domUtils; - - utils = UE.utils; - - browser = UE.browser; - - ajax = UE.ajax; - - $G = function ( id ) { - return document.getElementById( id ) - }; - //focus元素 - $focus = function ( node ) { - setTimeout( function () { - if ( browser.ie ) { - var r = node.createTextRange(); - r.collapse( false ); - r.select(); - } else { - node.focus() - } - }, 0 ) - }; - utils.loadFile(document,{ - href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(), - tag:"link", - type:"text/css", - rel:"stylesheet" - }); - lang = editor.getLang(dialog.className.split( "-" )[2]); - if(lang){ - domUtils.on(window,'load',function () { - - var langImgPath = editor.options.langPath + editor.options.lang + "/images/"; - //针对静态资源 - for ( var i in lang["static"] ) { - var dom = $G( i ); - if(!dom) continue; - var tagName = dom.tagName, - content = lang["static"][i]; - if(content.src){ - //clone - content = utils.extend({},content,false); - content.src = langImgPath + content.src; - } - if(content.style){ - content = utils.extend({},content,false); - content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath) - } - switch ( tagName.toLowerCase() ) { - case "var": - dom.parentNode.replaceChild( document.createTextNode( content ), dom ); - break; - case "select": - var ops = dom.options; - for ( var j = 0, oj; oj = ops[j]; ) { - oj.innerHTML = content.options[j++]; - } - for ( var p in content ) { - p != "options" && dom.setAttribute( p, content[p] ); - } - break; - default : - domUtils.setAttributes( dom, content); - } - } - } ); - } - - -})(); - diff --git a/public/static/admin/UEditor/dialogs/link/link.html b/public/static/admin/UEditor/dialogs/link/link.html deleted file mode 100644 index 55ab4d1..0000000 --- a/public/static/admin/UEditor/dialogs/link/link.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - - diff --git a/public/static/admin/UEditor/dialogs/map/map.html b/public/static/admin/UEditor/dialogs/map/map.html deleted file mode 100644 index e763b8e..0000000 --- a/public/static/admin/UEditor/dialogs/map/map.html +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - -
    - - - - - - - - - -
    ::
    -
    - -
    - - - - - diff --git a/public/static/admin/UEditor/dialogs/map/show.html b/public/static/admin/UEditor/dialogs/map/show.html deleted file mode 100644 index 329cfeb..0000000 --- a/public/static/admin/UEditor/dialogs/map/show.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - 百度地图API自定义地图 - - - - - - - -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/music/music.css b/public/static/admin/UEditor/dialogs/music/music.css deleted file mode 100644 index 8fb7a94..0000000 --- a/public/static/admin/UEditor/dialogs/music/music.css +++ /dev/null @@ -1,30 +0,0 @@ -.wrapper{margin: 5px 10px;} - -.searchBar{height:30px;padding:7px 0 3px;text-align:center;} -.searchBtn{font-size:13px;height:24px;} - -.resultBar{width:460px;margin:5px auto;border: 1px solid #CCC;border-radius: 5px;box-shadow: 2px 2px 5px #D3D6DA;overflow: hidden;} - -.listPanel{overflow: hidden;} -.panelon{display:block;} -.paneloff{display:none} - -.page{width:220px;margin:20px auto;overflow: hidden;} -.pageon{float:right;width:24px;line-height:24px;height:24px;margin-right: 5px;background: none;border: none;color: #000;font-weight: bold;text-align:center} -.pageoff{float:right;width:24px;line-height:24px;height:24px;cursor:pointer;background-color: #fff; - border: 1px solid #E7ECF0;color: #2D64B3;margin-right: 5px;text-decoration: none;text-align:center;} - -.m-box{width:460px;} -.m-m{float: left;line-height: 20px;height: 20px;} -.m-h{height:24px;line-height:24px;padding-left: 46px;background-color:#FAFAFA;border-bottom: 1px solid #DAD8D8;font-weight: bold;font-size: 12px;color: #333;} -.m-l{float:left;width:40px; } -.m-t{float:left;width:140px;} -.m-s{float:left;width:110px;} -.m-z{float:left;width:100px;} -.m-try-t{float: left;width: 60px;;} - -.m-try{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/try_music.gif') no-repeat ;} -.m-trying{float:left;width:20px;height:20px;background:url('http://static.tieba.baidu.com/tb/editor/images/stop_music.gif') no-repeat ;} - -.loading{width:95px;height:7px;font-size:7px;margin:60px auto;background:url(http://static.tieba.baidu.com/tb/editor/images/loading.gif) no-repeat} -.empty{width:300px;height:40px;padding:2px;margin:50px auto;line-height:40px; color:#006699;text-align:center;} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/music/music.html b/public/static/admin/UEditor/dialogs/music/music.html deleted file mode 100644 index e7ef04f..0000000 --- a/public/static/admin/UEditor/dialogs/music/music.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 插入音乐 - - - - -
    - -
    - -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/music/music.js b/public/static/admin/UEditor/dialogs/music/music.js deleted file mode 100644 index 1c538bf..0000000 --- a/public/static/admin/UEditor/dialogs/music/music.js +++ /dev/null @@ -1,192 +0,0 @@ -function Music() { - this.init(); -} -(function () { - var pages = [], - panels = [], - selectedItem = null; - Music.prototype = { - total:70, - pageSize:10, - dataUrl:"http://tingapi.ting.baidu.com/v1/restserver/ting?method=baidu.ting.search.common", - playerUrl:"http://box.baidu.com/widget/flash/bdspacesong.swf", - - init:function () { - var me = this; - domUtils.on($G("J_searchName"), "keyup", function (event) { - var e = window.event || event; - if (e.keyCode == 13) { - me.dosearch(); - } - }); - domUtils.on($G("J_searchBtn"), "click", function () { - me.dosearch(); - }); - }, - callback:function (data) { - var me = this; - me.data = data.song_list; - setTimeout(function () { - $G('J_resultBar').innerHTML = me._renderTemplate(data.song_list); - }, 300); - }, - dosearch:function () { - var me = this; - selectedItem = null; - var key = $G('J_searchName').value; - if (utils.trim(key) == "")return false; - key = encodeURIComponent(key); - me._sent(key); - }, - doselect:function (i) { - var me = this; - if (typeof i == 'object') { - selectedItem = i; - } else if (typeof i == 'number') { - selectedItem = me.data[i]; - } - }, - onpageclick:function (id) { - var me = this; - for (var i = 0; i < pages.length; i++) { - $G(pages[i]).className = 'pageoff'; - $G(panels[i]).className = 'paneloff'; - } - $G('page' + id).className = 'pageon'; - $G('panel' + id).className = 'panelon'; - }, - listenTest:function (elem) { - var me = this, - view = $G('J_preview'), - is_play_action = (elem.className == 'm-try'), - old_trying = me._getTryingElem(); - - if (old_trying) { - old_trying.className = 'm-try'; - view.innerHTML = ''; - } - if (is_play_action) { - elem.className = 'm-trying'; - view.innerHTML = me._buildMusicHtml(me._getUrl(true)); - } - }, - _sent:function (param) { - var me = this; - $G('J_resultBar').innerHTML = '
    '; - - utils.loadFile(document, { - src:me.dataUrl + '&query=' + param + '&page_size=' + me.total + '&callback=music.callback&.r=' + Math.random(), - tag:"script", - type:"text/javascript", - defer:"defer" - }); - }, - _removeHtml:function (str) { - var reg = /<\s*\/?\s*[^>]*\s*>/gi; - return str.replace(reg, ""); - }, - _getUrl:function (isTryListen) { - var me = this; - var param = 'from=tiebasongwidget&url=&name=' + encodeURIComponent(me._removeHtml(selectedItem.title)) + '&artist=' - + encodeURIComponent(me._removeHtml(selectedItem.author)) + '&extra=' - + encodeURIComponent(me._removeHtml(selectedItem.album_title)) - + '&autoPlay='+isTryListen+'' + '&loop=true'; - return me.playerUrl + "?" + param; - }, - _getTryingElem:function () { - var s = $G('J_listPanel').getElementsByTagName('span'); - - for (var i = 0; i < s.length; i++) { - if (s[i].className == 'm-trying') - return s[i]; - } - return null; - }, - _buildMusicHtml:function (playerUrl) { - var html = ' 12) - return s.substring(0, 5) + '...'; - if (!s) s = " "; - return s; - }, - _rebuildData:function (data) { - var me = this, - newData = [], - d = me.pageSize, - itembox; - for (var i = 0; i < data.length; i++) { - if ((i + d) % d == 0) { - itembox = []; - newData.push(itembox) - } - itembox.push(data[i]); - } - return newData; - }, - _renderTemplate:function (data) { - var me = this; - if (data.length == 0)return '
    ' + lang.emptyTxt + '
    '; - data = me._rebuildData(data); - var s = [], p = [], t = []; - s.push('
    '); - p.push('
    '); - for (var i = 0, tmpList; tmpList = data[i++];) { - panels.push('panel' + i); - pages.push('page' + i); - if (i == 1) { - s.push('
    '); - if (data.length != 1) { - t.push('
    ' + (i ) + '
    '); - } - } else { - s.push('
    '); - t.push('
    ' + (i ) + '
    '); - } - s.push('
    '); - s.push('
    ' + lang.chapter + '' + lang.singer - + '' + lang.special + '' + lang.listenTest + '
    '); - for (var j = 0, tmpObj; tmpObj = tmpList[j++];) { - s.push(''); - } - s.push('
    '); - s.push('
    '); - } - t.reverse(); - p.push(t.join('')); - s.push('
    '); - p.push('
    '); - return s.join('') + p.join(''); - }, - exec:function () { - var me = this; - if (selectedItem == null) return; - $G('J_preview').innerHTML = ""; - editor.execCommand('music', { - url:me._getUrl(false), - width:400, - height:95 - }); - } - }; -})(); - - - diff --git a/public/static/admin/UEditor/dialogs/preview/preview.html b/public/static/admin/UEditor/dialogs/preview/preview.html deleted file mode 100644 index f6b433b..0000000 --- a/public/static/admin/UEditor/dialogs/preview/preview.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - -
    - -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/addimg.png b/public/static/admin/UEditor/dialogs/scrawl/images/addimg.png deleted file mode 100644 index 03a8713..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/addimg.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/brush.png b/public/static/admin/UEditor/dialogs/scrawl/images/brush.png deleted file mode 100644 index efa6fdb..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/brush.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/delimg.png b/public/static/admin/UEditor/dialogs/scrawl/images/delimg.png deleted file mode 100644 index 5a892e4..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/delimg.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/delimgH.png b/public/static/admin/UEditor/dialogs/scrawl/images/delimgH.png deleted file mode 100644 index 2f0c5c9..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/delimgH.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/empty.png b/public/static/admin/UEditor/dialogs/scrawl/images/empty.png deleted file mode 100644 index 0375196..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/empty.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/emptyH.png b/public/static/admin/UEditor/dialogs/scrawl/images/emptyH.png deleted file mode 100644 index 838ca72..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/emptyH.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/eraser.png b/public/static/admin/UEditor/dialogs/scrawl/images/eraser.png deleted file mode 100644 index 63e87ce..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/eraser.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/redo.png b/public/static/admin/UEditor/dialogs/scrawl/images/redo.png deleted file mode 100644 index 12cd9bb..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/redo.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/redoH.png b/public/static/admin/UEditor/dialogs/scrawl/images/redoH.png deleted file mode 100644 index d9f33d3..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/redoH.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/scale.png b/public/static/admin/UEditor/dialogs/scrawl/images/scale.png deleted file mode 100644 index 935a3f3..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/scale.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/scaleH.png b/public/static/admin/UEditor/dialogs/scrawl/images/scaleH.png deleted file mode 100644 index 72e64a9..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/scaleH.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/size.png b/public/static/admin/UEditor/dialogs/scrawl/images/size.png deleted file mode 100644 index 8366845..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/size.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/undo.png b/public/static/admin/UEditor/dialogs/scrawl/images/undo.png deleted file mode 100644 index 084c7cc..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/undo.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/images/undoH.png b/public/static/admin/UEditor/dialogs/scrawl/images/undoH.png deleted file mode 100644 index fde7eb3..0000000 Binary files a/public/static/admin/UEditor/dialogs/scrawl/images/undoH.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/scrawl/scrawl.css b/public/static/admin/UEditor/dialogs/scrawl/scrawl.css deleted file mode 100644 index b18430d..0000000 --- a/public/static/admin/UEditor/dialogs/scrawl/scrawl.css +++ /dev/null @@ -1,72 +0,0 @@ -/*common -*/ -body{margin: 0;} -table{width:100%;} -table td{padding:2px 4px;vertical-align: middle;} -a{text-decoration: none;} -em{font-style: normal;} -.border_style1{border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;} -/*module -*/ -.main{margin: 8px;overflow: hidden;} - -.hot{float:left;height:335px;} -.drawBoard{position: relative; cursor: crosshair;} -.brushBorad{position: absolute;left:0;top:0;z-index: 998;} -.picBoard{border: none;text-align: center;line-height: 300px;cursor: default;} -.operateBar{margin-top:10px;font-size:12px;text-align: center;} -.operateBar span{margin-left: 10px;} - -.drawToolbar{float:right;width:110px;height:300px;overflow: hidden;} -.colorBar{margin-top:10px;font-size: 12px;text-align: center;} -.colorBar a{display:block;width: 10px;height: 10px;border:1px solid #1006F1;border-radius: 3px; box-shadow:2px 2px 5px #d3d6da;opacity: 0.3} -.sectionBar{margin-top:15px;font-size: 12px;text-align: center;} -.sectionBar a{display:inline-block;width:10px;height:12px;color: #888;text-indent: -999px;opacity: 0.3} -.size1{background: url('images/size.png') 1px center no-repeat ;} -.size2{background: url('images/size.png') -10px center no-repeat;} -.size3{background: url('images/size.png') -22px center no-repeat;} -.size4{background: url('images/size.png') -35px center no-repeat;} - -.addImgH{position: relative;} -.addImgH_form{position: absolute;left: 18px;top: -1px;width: 75px;height: 21px;opacity: 0;cursor: pointer;} -.addImgH_form input{width: 100%;} -/*scrawl遮罩层 -*/ -.maskLayerNull{display: none;} -.maskLayer{position: absolute;top:0;left:0;width: 100%; height: 100%;opacity: 0.7; - background-color: #fff;text-align:center;font-weight:bold;line-height:300px;z-index: 1000;} -/*btn state -*/ -.previousStepH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/undoH.png');cursor: pointer;} -.previousStepH .text{color:#888;cursor:pointer;} -.previousStep .icon{display: inline-block;width:16px;height:16px;background-image: url('images/undo.png');cursor:default;} -.previousStep .text{color:#ccc;cursor:default;} - -.nextStepH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/redoH.png');cursor: pointer;} -.nextStepH .text{color:#888;cursor:pointer;} -.nextStep .icon{display: inline-block;width:16px;height:16px;background-image: url('images/redo.png');cursor:default;} -.nextStep .text{color:#ccc;cursor:default;} - -.clearBoardH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/emptyH.png');cursor: pointer;} -.clearBoardH .text{color:#888;cursor:pointer;} -.clearBoard .icon{display: inline-block;width:16px;height:16px;background-image: url('images/empty.png');cursor:default;} -.clearBoard .text{color:#ccc;cursor:default;} - -.scaleBoardH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/scaleH.png');cursor: pointer;} -.scaleBoardH .text{color:#888;cursor:pointer;} -.scaleBoard .icon{display: inline-block;width:16px;height:16px;background-image: url('images/scale.png');cursor:default;} -.scaleBoard .text{color:#ccc;cursor:default;} - -.removeImgH .icon{display: inline-block;width:16px;height:16px;background-image: url('images/delimgH.png');cursor: pointer;} -.removeImgH .text{color:#888;cursor:pointer;} -.removeImg .icon{display: inline-block;width:16px;height:16px;background-image: url('images/delimg.png');cursor:default;} -.removeImg .text{color:#ccc;cursor:default;} - -.addImgH .icon{vertical-align:top;display: inline-block;width:16px;height:16px;background-image: url('images/addimg.png')} -.addImgH .text{color:#888;cursor:pointer;} -/*icon -*/ -.brushIcon{display: inline-block;width:16px;height:16px;background-image: url('images/brush.png')} -.eraserIcon{display: inline-block;width:16px;height:16px;background-image: url('images/eraser.png')} - - diff --git a/public/static/admin/UEditor/dialogs/scrawl/scrawl.html b/public/static/admin/UEditor/dialogs/scrawl/scrawl.html deleted file mode 100644 index 9371abd..0000000 --- a/public/static/admin/UEditor/dialogs/scrawl/scrawl.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    - - 1 - 3 - 5 - 7 -
    -
    - - 1 - 3 - 5 - 7 -
    -
    -
    - - -
    - -
    - -
    -
    -
    - - - - -
    -
    -
    -
    - - - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/scrawl/scrawl.js b/public/static/admin/UEditor/dialogs/scrawl/scrawl.js deleted file mode 100644 index e0c005e..0000000 --- a/public/static/admin/UEditor/dialogs/scrawl/scrawl.js +++ /dev/null @@ -1,671 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: xuheng - * Date: 12-5-22 - * Time: 上午11:38 - * To change this template use File | Settings | File Templates. - */ -var scrawl = function (options) { - options && this.initOptions(options); -}; -(function () { - var canvas = $G("J_brushBoard"), - context = canvas.getContext('2d'), - drawStep = [], //undo redo存储 - drawStepIndex = 0; //undo redo指针 - - scrawl.prototype = { - isScrawl:false, //是否涂鸦 - brushWidth:-1, //画笔粗细 - brushColor:"", //画笔颜色 - - initOptions:function (options) { - var me = this; - me.originalState(options);//初始页面状态 - me._buildToolbarColor(options.colorList);//动态生成颜色选择集合 - - me._addBoardListener(options.saveNum);//添加画板处理 - me._addOPerateListener(options.saveNum);//添加undo redo clearBoard处理 - me._addColorBarListener();//添加颜色选择处理 - me._addBrushBarListener();//添加画笔大小处理 - me._addEraserBarListener();//添加橡皮大小处理 - me._addAddImgListener();//添加增添背景图片处理 - me._addRemoveImgListenter();//删除背景图片处理 - me._addScalePicListenter();//添加缩放处理 - me._addClearSelectionListenter();//添加清楚选中状态处理 - - me._originalColorSelect(options.drawBrushColor);//初始化颜色选中 - me._originalBrushSelect(options.drawBrushSize);//初始化画笔选中 - me._clearSelection();//清楚选中状态 - }, - - originalState:function (options) { - var me = this; - - me.brushWidth = options.drawBrushSize;//同步画笔粗细 - me.brushColor = options.drawBrushColor;//同步画笔颜色 - - context.lineWidth = me.brushWidth;//初始画笔大小 - context.strokeStyle = me.brushColor;//初始画笔颜色 - context.fillStyle = "transparent";//初始画布背景颜色 - context.lineCap = "round";//去除锯齿 - context.fill(); - }, - _buildToolbarColor:function (colorList) { - var tmp = null, arr = []; - arr.push(""); - for (var i = 0, color; color = colorList[i++];) { - if ((i - 1) % 5 == 0) { - if (i != 1) { - arr.push(""); - } - arr.push(""); - } - tmp = '#' + color; - arr.push(""); - } - arr.push("
    "); - $G("J_colorBar").innerHTML = arr.join(""); - }, - - _addBoardListener:function (saveNum) { - var me = this, - margin = 0, - startX = -1, - startY = -1, - isMouseDown = false, - isMouseMove = false, - isMouseUp = false, - buttonPress = 0, button, flag = ''; - - margin = parseInt(domUtils.getComputedStyle($G("J_wrap"), "margin-left")); - drawStep.push(context.getImageData(0, 0, context.canvas.width, context.canvas.height)); - drawStepIndex += 1; - - domUtils.on(canvas, ["mousedown", "mousemove", "mouseup", "mouseout"], function (e) { - button = browser.webkit ? e.which : buttonPress; - switch (e.type) { - case 'mousedown': - buttonPress = 1; - flag = 1; - isMouseDown = true; - isMouseUp = false; - isMouseMove = false; - me.isScrawl = true; - startX = e.clientX - margin;//10为外边距总和 - startY = e.clientY - margin; - context.beginPath(); - break; - case 'mousemove' : - if (!flag && button == 0) { - return; - } - if (!flag && button) { - startX = e.clientX - margin;//10为外边距总和 - startY = e.clientY - margin; - context.beginPath(); - flag = 1; - } - if (isMouseUp || !isMouseDown) { - return; - } - var endX = e.clientX - margin, - endY = e.clientY - margin; - - context.moveTo(startX, startY); - context.lineTo(endX, endY); - context.stroke(); - startX = endX; - startY = endY; - isMouseMove = true; - break; - case 'mouseup': - buttonPress = 0; - if (!isMouseDown)return; - if (!isMouseMove) { - context.arc(startX, startY, context.lineWidth, 0, Math.PI * 2, false); - context.fillStyle = context.strokeStyle; - context.fill(); - } - context.closePath(); - me._saveOPerate(saveNum); - isMouseDown = false; - isMouseMove = false; - isMouseUp = true; - startX = -1; - startY = -1; - break; - case 'mouseout': - flag = ''; - buttonPress = 0; - if (button == 1) return; - context.closePath(); - break; - } - }); - }, - _addOPerateListener:function (saveNum) { - var me = this; - domUtils.on($G("J_previousStep"), "click", function () { - if (drawStepIndex > 1) { - drawStepIndex -= 1; - context.clearRect(0, 0, context.canvas.width, context.canvas.height); - context.putImageData(drawStep[drawStepIndex - 1], 0, 0); - me.btn2Highlight("J_nextStep"); - drawStepIndex == 1 && me.btn2disable("J_previousStep"); - } - }); - domUtils.on($G("J_nextStep"), "click", function () { - if (drawStepIndex > 0 && drawStepIndex < drawStep.length) { - context.clearRect(0, 0, context.canvas.width, context.canvas.height); - context.putImageData(drawStep[drawStepIndex], 0, 0); - drawStepIndex += 1; - me.btn2Highlight("J_previousStep"); - drawStepIndex == drawStep.length && me.btn2disable("J_nextStep"); - } - }); - domUtils.on($G("J_clearBoard"), "click", function () { - context.clearRect(0, 0, context.canvas.width, context.canvas.height); - drawStep = []; - me._saveOPerate(saveNum); - drawStepIndex = 1; - me.isScrawl = false; - me.btn2disable("J_previousStep"); - me.btn2disable("J_nextStep"); - me.btn2disable("J_clearBoard"); - }); - }, - _addColorBarListener:function () { - var me = this; - domUtils.on($G("J_colorBar"), "click", function (e) { - var target = me.getTarget(e), - color = target.title; - if (!!color) { - me._addColorSelect(target); - - me.brushColor = color; - context.globalCompositeOperation = "source-over"; - context.lineWidth = me.brushWidth; - context.strokeStyle = color; - } - }); - }, - _addBrushBarListener:function () { - var me = this; - domUtils.on($G("J_brushBar"), "click", function (e) { - var target = me.getTarget(e), - size = browser.ie ? target.innerText : target.text; - if (!!size) { - me._addBESelect(target); - - context.globalCompositeOperation = "source-over"; - context.lineWidth = parseInt(size); - context.strokeStyle = me.brushColor; - me.brushWidth = context.lineWidth; - } - }); - }, - _addEraserBarListener:function () { - var me = this; - domUtils.on($G("J_eraserBar"), "click", function (e) { - var target = me.getTarget(e), - size = browser.ie ? target.innerText : target.text; - if (!!size) { - me._addBESelect(target); - - context.lineWidth = parseInt(size); - context.globalCompositeOperation = "destination-out"; - context.strokeStyle = "#FFF"; - } - }); - }, - _addAddImgListener:function () { - var file = $G("J_imgTxt"); - if (!window.FileReader) { - $G("J_addImg").style.display = 'none'; - $G("J_removeImg").style.display = 'none'; - $G("J_sacleBoard").style.display = 'none'; - } - domUtils.on(file, "change", function (e) { - var frm = file.parentNode; - addMaskLayer(lang.backgroundUploading); - - var target = e.target || e.srcElement, - reader = new FileReader(); - reader.onload = function(evt){ - var target = evt.target || evt.srcElement; - ue_callback(target.result, 'SUCCESS'); - }; - reader.readAsDataURL(target.files[0]); - frm.reset(); - }); - }, - _addRemoveImgListenter:function () { - var me = this; - domUtils.on($G("J_removeImg"), "click", function () { - $G("J_picBoard").innerHTML = ""; - me.btn2disable("J_removeImg"); - me.btn2disable("J_sacleBoard"); - }); - }, - _addScalePicListenter:function () { - domUtils.on($G("J_sacleBoard"), "click", function () { - var picBoard = $G("J_picBoard"), - scaleCon = $G("J_scaleCon"), - img = picBoard.children[0]; - - if (img) { - if (!scaleCon) { - picBoard.style.cssText = "position:relative;z-index:999;"+picBoard.style.cssText; - img.style.cssText = "position: absolute;top:" + (canvas.height - img.height) / 2 + "px;left:" + (canvas.width - img.width) / 2 + "px;"; - var scale = new ScaleBoy(); - picBoard.appendChild(scale.init()); - scale.startScale(img); - } else { - if (scaleCon.style.visibility == "visible") { - scaleCon.style.visibility = "hidden"; - picBoard.style.position = ""; - picBoard.style.zIndex = ""; - } else { - scaleCon.style.visibility = "visible"; - picBoard.style.cssText += "position:relative;z-index:999"; - } - } - } - }); - }, - _addClearSelectionListenter:function () { - var doc = document; - domUtils.on(doc, 'mousemove', function (e) { - if (browser.ie && browser.version < 11) - doc.selection.clear(); - else - window.getSelection().removeAllRanges(); - }); - }, - _clearSelection:function () { - var list = ["J_operateBar", "J_colorBar", "J_brushBar", "J_eraserBar", "J_picBoard"]; - for (var i = 0, group; group = list[i++];) { - domUtils.unSelectable($G(group)); - } - }, - - _saveOPerate:function (saveNum) { - var me = this; - if (drawStep.length <= saveNum) { - if(drawStepIndex"); - } - scale.innerHTML = arr.join(""); - return scale; - } - - var rect = [ - //[left, top, width, height] - [1, 1, -1, -1], - [0, 1, 0, -1], - [0, 1, 1, -1], - [1, 0, -1, 0], - [0, 0, 1, 0], - [1, 0, -1, 1], - [0, 0, 0, 1], - [0, 0, 1, 1] - ]; - ScaleBoy.prototype = { - init:function () { - _appendStyle(); - var me = this, - scale = me.dom = _getDom(); - - me.scaleMousemove.fp = me; - domUtils.on(scale, 'mousedown', function (e) { - var target = e.target || e.srcElement; - me.start = {x:e.clientX, y:e.clientY}; - if (target.className.indexOf('hand') != -1) { - me.dir = target.className.replace('hand', ''); - } - domUtils.on(document.body, 'mousemove', me.scaleMousemove); - e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true; - }); - domUtils.on(document.body, 'mouseup', function (e) { - if (me.start) { - domUtils.un(document.body, 'mousemove', me.scaleMousemove); - if (me.moved) { - me.updateScaledElement({position:{x:scale.style.left, y:scale.style.top}, size:{w:scale.style.width, h:scale.style.height}}); - } - delete me.start; - delete me.moved; - delete me.dir; - } - }); - return scale; - }, - startScale:function (objElement) { - var me = this, Idom = me.dom; - - Idom.style.cssText = 'visibility:visible;top:' + objElement.style.top + ';left:' + objElement.style.left + ';width:' + objElement.offsetWidth + 'px;height:' + objElement.offsetHeight + 'px;'; - me.scalingElement = objElement; - }, - updateScaledElement:function (objStyle) { - var cur = this.scalingElement, - pos = objStyle.position, - size = objStyle.size; - if (pos) { - typeof pos.x != 'undefined' && (cur.style.left = pos.x); - typeof pos.y != 'undefined' && (cur.style.top = pos.y); - } - if (size) { - size.w && (cur.style.width = size.w); - size.h && (cur.style.height = size.h); - } - }, - updateStyleByDir:function (dir, offset) { - var me = this, - dom = me.dom, tmp; - - rect['def'] = [1, 1, 0, 0]; - if (rect[dir][0] != 0) { - tmp = parseInt(dom.style.left) + offset.x; - dom.style.left = me._validScaledProp('left', tmp) + 'px'; - } - if (rect[dir][1] != 0) { - tmp = parseInt(dom.style.top) + offset.y; - dom.style.top = me._validScaledProp('top', tmp) + 'px'; - } - if (rect[dir][2] != 0) { - tmp = dom.clientWidth + rect[dir][2] * offset.x; - dom.style.width = me._validScaledProp('width', tmp) + 'px'; - } - if (rect[dir][3] != 0) { - tmp = dom.clientHeight + rect[dir][3] * offset.y; - dom.style.height = me._validScaledProp('height', tmp) + 'px'; - } - if (dir === 'def') { - me.updateScaledElement({position:{x:dom.style.left, y:dom.style.top}}); - } - }, - scaleMousemove:function (e) { - var me = arguments.callee.fp, - start = me.start, - dir = me.dir || 'def', - offset = {x:e.clientX - start.x, y:e.clientY - start.y}; - - me.updateStyleByDir(dir, offset); - arguments.callee.fp.start = {x:e.clientX, y:e.clientY}; - arguments.callee.fp.moved = 1; - }, - _validScaledProp:function (prop, value) { - var ele = this.dom, - wrap = $G("J_picBoard"); - - value = isNaN(value) ? 0 : value; - switch (prop) { - case 'left': - return value < 0 ? 0 : (value + ele.clientWidth) > wrap.clientWidth ? wrap.clientWidth - ele.clientWidth : value; - case 'top': - return value < 0 ? 0 : (value + ele.clientHeight) > wrap.clientHeight ? wrap.clientHeight - ele.clientHeight : value; - case 'width': - return value <= 0 ? 1 : (value + ele.offsetLeft) > wrap.clientWidth ? wrap.clientWidth - ele.offsetLeft : value; - case 'height': - return value <= 0 ? 1 : (value + ele.offsetTop) > wrap.clientHeight ? wrap.clientHeight - ele.offsetTop : value; - } - } - }; -})(); - -//后台回调 -function ue_callback(url, state) { - var doc = document, - picBorard = $G("J_picBoard"), - img = doc.createElement("img"); - - //图片缩放 - function scale(img, max, oWidth, oHeight) { - var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oHeight; - if (ow > max || oh > max) { - if (ow >= oh) { - if (width = ow - max) { - percent = (width / ow).toFixed(2); - img.height = oh - oh * percent; - img.width = max; - } - } else { - if (height = oh - max) { - percent = (height / oh).toFixed(2); - img.width = ow - ow * percent; - img.height = max; - } - } - } - } - - //移除遮罩层 - removeMaskLayer(); - //状态响应 - if (state == "SUCCESS") { - picBorard.innerHTML = ""; - img.onload = function () { - scale(this, 300); - picBorard.appendChild(img); - - var obj = new scrawl(); - obj.btn2Highlight("J_removeImg"); - //trace 2457 - obj.btn2Highlight("J_sacleBoard"); - }; - img.src = url; - } else { - alert(state); - } -} -//去掉遮罩层 -function removeMaskLayer() { - var maskLayer = $G("J_maskLayer"); - maskLayer.className = "maskLayerNull"; - maskLayer.innerHTML = ""; - dialog.buttons[0].setDisabled(false); -} -//添加遮罩层 -function addMaskLayer(html) { - var maskLayer = $G("J_maskLayer"); - dialog.buttons[0].setDisabled(true); - maskLayer.className = "maskLayer"; - maskLayer.innerHTML = html; -} -//执行确认按钮方法 -function exec(scrawlObj) { - if (scrawlObj.isScrawl) { - addMaskLayer(lang.scrawlUpLoading); - var base64 = scrawlObj.getCanvasData(); - if (!!base64) { - var options = { - timeout:100000, - onsuccess:function (xhr) { - if (!scrawlObj.isCancelScrawl) { - var responseObj; - responseObj = eval("(" + xhr.responseText + ")"); - if (responseObj.state == "SUCCESS") { - var imgObj = {}, - url = editor.options.scrawlUrlPrefix + responseObj.url; - imgObj.src = url; - imgObj._src = url; - imgObj.alt = responseObj.original || ''; - imgObj.title = responseObj.title || ''; - editor.execCommand("insertImage", imgObj); - dialog.close(); - } else { - alert(responseObj.state); - } - - } - }, - onerror:function () { - alert(lang.imageError); - dialog.close(); - } - }; - options[editor.getOpt('scrawlFieldName')] = base64; - - var actionUrl = editor.getActionUrl(editor.getOpt('scrawlActionName')), - params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', - url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + params); - ajax.request(url, options); - } - } else { - addMaskLayer(lang.noScarwl + "   "); - } -} - diff --git a/public/static/admin/UEditor/dialogs/searchreplace/searchreplace.html b/public/static/admin/UEditor/dialogs/searchreplace/searchreplace.html deleted file mode 100644 index b91f190..0000000 --- a/public/static/admin/UEditor/dialogs/searchreplace/searchreplace.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - -
    :
    - -
    - - -
    -   -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :
    :
    - -
    - - - - -
    -   -
    - -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/searchreplace/searchreplace.js b/public/static/admin/UEditor/dialogs/searchreplace/searchreplace.js deleted file mode 100644 index 1b52857..0000000 --- a/public/static/admin/UEditor/dialogs/searchreplace/searchreplace.js +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: xuheng - * Date: 12-9-26 - * Time: 下午12:29 - * To change this template use File | Settings | File Templates. - */ - -//清空上次查选的痕迹 -editor.firstForSR = 0; -editor.currentRangeForSR = null; -//给tab注册切换事件 -/** - * tab点击处理事件 - * @param tabHeads - * @param tabBodys - * @param obj - */ -function clickHandler( tabHeads,tabBodys,obj ) { - //head样式更改 - for ( var k = 0, len = tabHeads.length; k < len; k++ ) { - tabHeads[k].className = ""; - } - obj.className = "focus"; - //body显隐 - var tabSrc = obj.getAttribute( "tabSrc" ); - for ( var j = 0, length = tabBodys.length; j < length; j++ ) { - var body = tabBodys[j], - id = body.getAttribute( "id" ); - if ( id != tabSrc ) { - body.style.zIndex = 1; - } else { - body.style.zIndex = 200; - } - } - -} - -/** - * TAB切换 - * @param tabParentId tab的父节点ID或者对象本身 - */ -function switchTab( tabParentId ) { - var tabElements = $G( tabParentId ).children, - tabHeads = tabElements[0].children, - tabBodys = tabElements[1].children; - - for ( var i = 0, length = tabHeads.length; i < length; i++ ) { - var head = tabHeads[i]; - if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head ); - head.onclick = function () { - clickHandler(tabHeads,tabBodys,this); - } - } -} -$G('searchtab').onmousedown = function(){ - $G('search-msg').innerHTML = ''; - $G('replace-msg').innerHTML = '' -} -//是否区分大小写 -function getMatchCase(id) { - return $G(id).checked ? true : false; -} -//查找 -$G("nextFindBtn").onclick = function (txt, dir, mcase) { - var findtxt = $G("findtxt").value, obj; - if (!findtxt) { - return false; - } - obj = { - searchStr:findtxt, - dir:1, - casesensitive:getMatchCase("matchCase") - }; - if (!frCommond(obj)) { - var bk = editor.selection.getRange().createBookmark(); - $G('search-msg').innerHTML = lang.getEnd; - editor.selection.getRange().moveToBookmark(bk).select(); - - - } -}; -$G("nextReplaceBtn").onclick = function (txt, dir, mcase) { - var findtxt = $G("findtxt1").value, obj; - if (!findtxt) { - return false; - } - obj = { - searchStr:findtxt, - dir:1, - casesensitive:getMatchCase("matchCase1") - }; - frCommond(obj); -}; -$G("preFindBtn").onclick = function (txt, dir, mcase) { - var findtxt = $G("findtxt").value, obj; - if (!findtxt) { - return false; - } - obj = { - searchStr:findtxt, - dir:-1, - casesensitive:getMatchCase("matchCase") - }; - if (!frCommond(obj)) { - $G('search-msg').innerHTML = lang.getStart; - } -}; -$G("preReplaceBtn").onclick = function (txt, dir, mcase) { - var findtxt = $G("findtxt1").value, obj; - if (!findtxt) { - return false; - } - obj = { - searchStr:findtxt, - dir:-1, - casesensitive:getMatchCase("matchCase1") - }; - frCommond(obj); -}; -//替换 -$G("repalceBtn").onclick = function () { - var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj, - replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, ""); - if (!findtxt) { - return false; - } - if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) { - return false; - } - obj = { - searchStr:findtxt, - dir:1, - casesensitive:getMatchCase("matchCase1"), - replaceStr:replacetxt - }; - frCommond(obj); -}; -//全部替换 -$G("repalceAllBtn").onclick = function () { - var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj, - replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, ""); - if (!findtxt) { - return false; - } - if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) { - return false; - } - obj = { - searchStr:findtxt, - casesensitive:getMatchCase("matchCase1"), - replaceStr:replacetxt, - all:true - }; - var num = frCommond(obj); - if (num) { - $G('replace-msg').innerHTML = lang.countMsg.replace("{#count}", num); - } -}; -//执行 -var frCommond = function (obj) { - return editor.execCommand("searchreplace", obj); -}; -switchTab("searchtab"); \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/snapscreen/snapscreen.html b/public/static/admin/UEditor/dialogs/snapscreen/snapscreen.html deleted file mode 100644 index cf8209e..0000000 --- a/public/static/admin/UEditor/dialogs/snapscreen/snapscreen.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - -
    -

    -
    -
    -
    -
    -
    -
    - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/spechars/spechars.html b/public/static/admin/UEditor/dialogs/spechars/spechars.html deleted file mode 100644 index 0b5c416..0000000 --- a/public/static/admin/UEditor/dialogs/spechars/spechars.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - -
    -
    -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/spechars/spechars.js b/public/static/admin/UEditor/dialogs/spechars/spechars.js deleted file mode 100644 index f4c155e..0000000 --- a/public/static/admin/UEditor/dialogs/spechars/spechars.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: xuheng - * Date: 12-9-26 - * Time: 下午1:09 - * To change this template use File | Settings | File Templates. - */ -var charsContent = [ - { name:"tsfh", title:lang.tsfh, content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")}, - { name:"lmsz", title:lang.lmsz, content:toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")}, - { name:"szfh", title:lang.szfh, content:toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")}, - { name:"rwfh", title:lang.rwfh, content:toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")}, - { name:"xlzm", title:lang.xlzm, content:toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")}, - { name:"ewzm", title:lang.ewzm, content:toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")}, - { name:"pyzm", title:lang.pyzm, content:toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")}, - { name:"yyyb", title:lang.yyyb, content:toArray("i:,i,e,æ,ʌ,ə:,ə,u:,u,ɔ:,ɔ,a:,ei,ai,ɔi,əu,au,iə,εə,uə,p,t,k,b,d,g,f,s,ʃ,θ,h,v,z,ʒ,ð,tʃ,tr,ts,dʒ,dr,dz,m,n,ŋ,l,r,w,j,")}, - { name:"zyzf", title:lang.zyzf, content:toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")} -]; -(function createTab(content) { - for (var i = 0, ci; ci = content[i++];) { - var span = document.createElement("span"); - span.setAttribute("tabSrc", ci.name); - span.innerHTML = ci.title; - if (i == 1)span.className = "focus"; - domUtils.on(span, "click", function () { - var tmps = $G("tabHeads").children; - for (var k = 0, sk; sk = tmps[k++];) { - sk.className = ""; - } - tmps = $G("tabBodys").children; - for (var k = 0, sk; sk = tmps[k++];) { - sk.style.display = "none"; - } - this.className = "focus"; - $G(this.getAttribute("tabSrc")).style.display = ""; - }); - $G("tabHeads").appendChild(span); - domUtils.insertAfter(span, document.createTextNode("\n")); - var div = document.createElement("div"); - div.id = ci.name; - div.style.display = (i == 1) ? "" : "none"; - var cons = ci.content; - for (var j = 0, con; con = cons[j++];) { - var charSpan = document.createElement("span"); - charSpan.innerHTML = con; - domUtils.on(charSpan, "click", function () { - editor.execCommand("insertHTML", this.innerHTML); - dialog.close(); - }); - div.appendChild(charSpan); - } - $G("tabBodys").appendChild(div); - } -})(charsContent); -function toArray(str) { - return str.split(","); -} diff --git a/public/static/admin/UEditor/dialogs/table/dragicon.png b/public/static/admin/UEditor/dialogs/table/dragicon.png deleted file mode 100644 index f26203b..0000000 Binary files a/public/static/admin/UEditor/dialogs/table/dragicon.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/table/edittable.css b/public/static/admin/UEditor/dialogs/table/edittable.css deleted file mode 100644 index c6f9396..0000000 --- a/public/static/admin/UEditor/dialogs/table/edittable.css +++ /dev/null @@ -1,84 +0,0 @@ -body{ - overflow: hidden; - width: 540px; -} -.wrapper { - margin: 10px auto 0; - font-size: 12px; - overflow: hidden; - width: 520px; - height: 315px; -} - -.clear { - clear: both; -} - -.wrapper .left { - float: left; - margin-left: 10px;; -} - -.wrapper .right { - float: right; - border-left: 2px dotted #EDEDED; - padding-left: 15px; -} - -.section { - margin-bottom: 15px; - width: 240px; - overflow: hidden; -} - -.section h3 { - font-weight: bold; - padding: 5px 0; - margin-bottom: 10px; - border-bottom: 1px solid #EDEDED; - font-size: 12px; -} - -.section ul { - list-style: none; - overflow: hidden; - clear: both; - -} - -.section li { - float: left; - width: 120px;; -} - -.section .tone { - width: 80px;; -} - -.section .preview { - width: 220px; -} - -.section .preview table { - text-align: center; - vertical-align: middle; - color: #666; -} - -.section .preview caption { - font-weight: bold; -} - -.section .preview td { - border-width: 1px; - border-style: solid; - height: 22px; -} - -.section .preview th { - border-style: solid; - border-color: #DDD; - border-width: 2px 1px 1px 1px; - height: 22px; - background-color: #F7F7F7; -} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/table/edittable.html b/public/static/admin/UEditor/dialogs/table/edittable.html deleted file mode 100644 index 3c412fb..0000000 --- a/public/static/admin/UEditor/dialogs/table/edittable.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - -
    -
    -
    -

    -
      -
    • - -
    • -
    • - -
    • -
    -
      -
    • - -
    • -
    • - -
    • -
    -
    -
    -
    -

    -
      -
    • - -
    • -
    • - -
    • -
    -
    -
    -
    -

    -
      -
    • - - -
    • -
    -
    -
    -
    -
    -
    -

    -
    -
    -
    -
    -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/table/edittable.js b/public/static/admin/UEditor/dialogs/table/edittable.js deleted file mode 100644 index 11dbee7..0000000 --- a/public/static/admin/UEditor/dialogs/table/edittable.js +++ /dev/null @@ -1,237 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: xuheng - * Date: 12-12-19 - * Time: 下午4:55 - * To change this template use File | Settings | File Templates. - */ -(function () { - var title = $G("J_title"), - titleCol = $G("J_titleCol"), - caption = $G("J_caption"), - sorttable = $G("J_sorttable"), - autoSizeContent = $G("J_autoSizeContent"), - autoSizePage = $G("J_autoSizePage"), - tone = $G("J_tone"), - me, - preview = $G("J_preview"); - - var editTable = function () { - me = this; - me.init(); - }; - editTable.prototype = { - init:function () { - var colorPiker = new UE.ui.ColorPicker({ - editor:editor - }), - colorPop = new UE.ui.Popup({ - editor:editor, - content:colorPiker - }); - - title.checked = editor.queryCommandState("inserttitle") == -1; - titleCol.checked = editor.queryCommandState("inserttitlecol") == -1; - caption.checked = editor.queryCommandState("insertcaption") == -1; - sorttable.checked = editor.queryCommandState("enablesort") == 1; - - var enablesortState = editor.queryCommandState("enablesort"), - disablesortState = editor.queryCommandState("disablesort"); - - sorttable.checked = !!(enablesortState < 0 && disablesortState >=0); - sorttable.disabled = !!(enablesortState < 0 && disablesortState < 0); - sorttable.title = enablesortState < 0 && disablesortState < 0 ? lang.errorMsg:''; - - me.createTable(title.checked, titleCol.checked, caption.checked); - me.setAutoSize(); - me.setColor(me.getColor()); - - domUtils.on(title, "click", me.titleHanler); - domUtils.on(titleCol, "click", me.titleColHanler); - domUtils.on(caption, "click", me.captionHanler); - domUtils.on(sorttable, "click", me.sorttableHanler); - domUtils.on(autoSizeContent, "click", me.autoSizeContentHanler); - domUtils.on(autoSizePage, "click", me.autoSizePageHanler); - - domUtils.on(tone, "click", function () { - colorPop.showAnchor(tone); - }); - domUtils.on(document, 'mousedown', function () { - colorPop.hide(); - }); - colorPiker.addListener("pickcolor", function () { - me.setColor(arguments[1]); - colorPop.hide(); - }); - colorPiker.addListener("picknocolor", function () { - me.setColor(""); - colorPop.hide(); - }); - }, - - createTable:function (hasTitle, hasTitleCol, hasCaption) { - var arr = [], - sortSpan = '^'; - arr.push(""); - if (hasCaption) { - arr.push("") - } - if (hasTitle) { - arr.push(""); - if(hasTitleCol) { arr.push(""); } - for (var j = 0; j < 5; j++) { - arr.push(""); - } - arr.push(""); - } - for (var i = 0; i < 6; i++) { - arr.push(""); - if(hasTitleCol) { arr.push("") } - for (var k = 0; k < 5; k++) { - arr.push("") - } - arr.push(""); - } - arr.push("
    " + lang.captionName + "
    " + lang.titleName + "" + lang.titleName + "
    " + lang.titleName + "" + lang.cellsName + "
    "); - preview.innerHTML = arr.join(""); - this.updateSortSpan(); - }, - titleHanler:function () { - var example = $G("J_example"), - frg=document.createDocumentFragment(), - color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"), - colCount = example.rows[0].children.length; - - if (title.checked) { - example.insertRow(0); - for (var i = 0, node; i < colCount; i++) { - node = document.createElement("th"); - node.innerHTML = lang.titleName; - frg.appendChild(node); - } - example.rows[0].appendChild(frg); - - } else { - domUtils.remove(example.rows[0]); - } - me.setColor(color); - me.updateSortSpan(); - }, - titleColHanler:function () { - var example = $G("J_example"), - color = domUtils.getComputedStyle(domUtils.getElementsByTagName(example, "td")[0], "border-color"), - colArr = example.rows, - colCount = colArr.length; - - if (titleCol.checked) { - for (var i = 0, node; i < colCount; i++) { - node = document.createElement("th"); - node.innerHTML = lang.titleName; - colArr[i].insertBefore(node, colArr[i].children[0]); - } - } else { - for (var i = 0; i < colCount; i++) { - domUtils.remove(colArr[i].children[0]); - } - } - me.setColor(color); - me.updateSortSpan(); - }, - captionHanler:function () { - var example = $G("J_example"); - if (caption.checked) { - var row = document.createElement('caption'); - row.innerHTML = lang.captionName; - example.insertBefore(row, example.firstChild); - } else { - domUtils.remove(domUtils.getElementsByTagName(example, 'caption')[0]); - } - }, - sorttableHanler:function(){ - me.updateSortSpan(); - }, - autoSizeContentHanler:function () { - var example = $G("J_example"); - example.removeAttribute("width"); - }, - autoSizePageHanler:function () { - var example = $G("J_example"); - var tds = example.getElementsByTagName(example, "td"); - utils.each(tds, function (td) { - td.removeAttribute("width"); - }); - example.setAttribute('width', '100%'); - }, - updateSortSpan: function(){ - var example = $G("J_example"), - row = example.rows[0]; - - var spans = domUtils.getElementsByTagName(example,"span"); - utils.each(spans,function(span){ - span.parentNode.removeChild(span); - }); - if (sorttable.checked) { - utils.each(row.cells, function(cell, i){ - var span = document.createElement("span"); - span.innerHTML = "^"; - cell.appendChild(span); - }); - } - }, - getColor:function () { - var start = editor.selection.getStart(), color, - cell = domUtils.findParentByTagName(start, ["td", "th", "caption"], true); - color = cell && domUtils.getComputedStyle(cell, "border-color"); - if (!color) color = "#DDDDDD"; - return color; - }, - setColor:function (color) { - var example = $G("J_example"), - arr = domUtils.getElementsByTagName(example, "td").concat( - domUtils.getElementsByTagName(example, "th"), - domUtils.getElementsByTagName(example, "caption") - ); - - tone.value = color; - utils.each(arr, function (node) { - node.style.borderColor = color; - }); - - }, - setAutoSize:function () { - var me = this; - autoSizePage.checked = true; - me.autoSizePageHanler(); - } - }; - - new editTable; - - dialog.onok = function () { - editor.__hasEnterExecCommand = true; - - var checks = { - title:"inserttitle deletetitle", - titleCol:"inserttitlecol deletetitlecol", - caption:"insertcaption deletecaption", - sorttable:"enablesort disablesort" - }; - editor.fireEvent('saveScene'); - for(var i in checks){ - var cmds = checks[i].split(" "), - input = $G("J_" + i); - if(input["checked"]){ - editor.queryCommandState(cmds[0])!=-1 &&editor.execCommand(cmds[0]); - }else{ - editor.queryCommandState(cmds[1])!=-1 &&editor.execCommand(cmds[1]); - } - } - - editor.execCommand("edittable", tone.value); - autoSizeContent.checked ?editor.execCommand('adaptbytext') : ""; - autoSizePage.checked ? editor.execCommand("adaptbywindow") : ""; - editor.fireEvent('saveScene'); - - editor.__hasEnterExecCommand = false; - }; -})(); \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/table/edittd.html b/public/static/admin/UEditor/dialogs/table/edittd.html deleted file mode 100644 index 49a52f7..0000000 --- a/public/static/admin/UEditor/dialogs/table/edittd.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - -
    - - -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/table/edittip.html b/public/static/admin/UEditor/dialogs/table/edittip.html deleted file mode 100644 index 954f7bb..0000000 --- a/public/static/admin/UEditor/dialogs/table/edittip.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - 表格删除提示 - - - - -
    -
    - -
    -
    - -
    -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/template/config.js b/public/static/admin/UEditor/dialogs/template/config.js deleted file mode 100644 index 417b8f7..0000000 --- a/public/static/admin/UEditor/dialogs/template/config.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: xuheng - * Date: 12-8-8 - * Time: 下午2:00 - * To change this template use File | Settings | File Templates. - */ -var templates = [ - { - "pre":"pre0.png", - 'title':lang.blank, - 'preHtml':'

     欢迎使用UEditor!

    ', - "html":'

    欢迎使用UEditor!

    ' - - }, - { - "pre":"pre1.png", - 'title':lang.blog, - 'preHtml':'

    深入理解Range

    UEditor二次开发

    什么是Range

    对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。


    Range能干什么

    在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。

    ', - "html":'

    [键入文档标题]

    [键入文档副标题]

    [标题 1]

    对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。

    [标题 2]

    在“开始”选项卡上,通过从快速样式库中为所选文本选择一种外观,您可以方便地更改文档中所选文本的格式。 您还可以使用“开始”选项卡上的其他控件来直接设置文本格式。大多数控件都允许您选择是使用当前主题外观,还是使用某种直接指定的格式。

    [标题 3]

    对于“插入”选项卡上的库,在设计时都充分考虑了其中的项与文档整体外观的协调性。 您可以使用这些库来插入表格、页眉、页脚、列表、封面以及其他文档构建基块。 您创建的图片、图表或关系图也将与当前的文档外观协调一致。


    ' - - }, - { - "pre":"pre2.png", - 'title':lang.resume, - 'preHtml':'

    WEB前端开发简历


    联系电话:[键入您的电话]

    电子邮件:[键入您的电子邮件地址]

    家庭住址:[键入您的地址]

    目标职位

    WEB前端研发工程师

    学历

    1. [起止时间] [学校名称] [所学专业] [所获学位]

    工作经验


    ', - "html":'

    [此处键入简历标题]


    【此处插入照片】


    联系电话:[键入您的电话]


    电子邮件:[键入您的电子邮件地址]


    家庭住址:[键入您的地址]


    目标职位

    [此处键入您的期望职位]

    学历

    1. [键入起止时间] [键入学校名称] [键入所学专业] [键入所获学位]

    2. [键入起止时间] [键入学校名称] [键入所学专业] [键入所获学位]

    工作经验

    1. [键入起止时间] [键入公司名称] [键入职位名称]

      1. [键入负责项目] [键入项目简介]

      2. [键入负责项目] [键入项目简介]

    2. [键入起止时间] [键入公司名称] [键入职位名称]

      1. [键入负责项目] [键入项目简介]

    掌握技能

     [这里可以键入您所掌握的技能]

    ' - - }, - { - "pre":"pre3.png", - 'title':lang.richText, - 'preHtml':'

    [此处键入文章标题]

    图文混排方法

    图片居左,文字围绕图片排版

    方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文


    还有没有什么其他的环绕方式呢?这里是居右环绕


    欢迎大家多多尝试,为UEditor提供更多高质量模板!

    ', - "html":'


    [此处键入文章标题]

    图文混排方法

    1. 图片居左,文字围绕图片排版

    方法:在文字前面插入图片,设置居左对齐,然后即可在右边输入多行文本


    2. 图片居右,文字围绕图片排版

    方法:在文字前面插入图片,设置居右对齐,然后即可在左边输入多行文本


    3. 图片居中环绕排版

    方法:亲,这个真心没有办法。。。



    还有没有什么其他的环绕方式呢?这里是居右环绕


    欢迎大家多多尝试,为UEditor提供更多高质量模板!


    占位


    占位


    占位


    占位


    占位



    ' - }, - { - "pre":"pre4.png", - 'title':lang.sciPapers, - 'preHtml':'

    [键入文章标题]

    摘要:这里可以输入很长很长很长很长很长很长很长很长很差的摘要

    标题 1

    这里可以输入很多内容,可以图文混排,可以有列表等。

    标题 2

    1. 列表 1

    2. 列表 2

      1. 多级列表 1

      2. 多级列表 2

    3. 列表 3

    标题 3

    来个文字图文混排的


    ', - 'html':'

    [键入文章标题]

    摘要:这里可以输入很长很长很长很长很长很长很长很长很差的摘要

    标题 1

    这里可以输入很多内容,可以图文混排,可以有列表等。

    标题 2

    来个列表瞅瞅:

    1. 列表 1

    2. 列表 2

      1. 多级列表 1

      2. 多级列表 2

    3. 列表 3

    标题 3

    来个文字图文混排的

    这里可以多行

    右边是图片

    绝对没有问题的,不信你也可以试试看


    ' - } -]; \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/template/images/bg.gif b/public/static/admin/UEditor/dialogs/template/images/bg.gif deleted file mode 100644 index 8c1d10a..0000000 Binary files a/public/static/admin/UEditor/dialogs/template/images/bg.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/template/images/pre0.png b/public/static/admin/UEditor/dialogs/template/images/pre0.png deleted file mode 100644 index 8f3c16a..0000000 Binary files a/public/static/admin/UEditor/dialogs/template/images/pre0.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/template/images/pre1.png b/public/static/admin/UEditor/dialogs/template/images/pre1.png deleted file mode 100644 index 5a03f96..0000000 Binary files a/public/static/admin/UEditor/dialogs/template/images/pre1.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/template/images/pre2.png b/public/static/admin/UEditor/dialogs/template/images/pre2.png deleted file mode 100644 index 5a55672..0000000 Binary files a/public/static/admin/UEditor/dialogs/template/images/pre2.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/template/images/pre3.png b/public/static/admin/UEditor/dialogs/template/images/pre3.png deleted file mode 100644 index d852d29..0000000 Binary files a/public/static/admin/UEditor/dialogs/template/images/pre3.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/template/images/pre4.png b/public/static/admin/UEditor/dialogs/template/images/pre4.png deleted file mode 100644 index 0d7bc72..0000000 Binary files a/public/static/admin/UEditor/dialogs/template/images/pre4.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/template/template.css b/public/static/admin/UEditor/dialogs/template/template.css deleted file mode 100644 index 6c1608d..0000000 --- a/public/static/admin/UEditor/dialogs/template/template.css +++ /dev/null @@ -1,18 +0,0 @@ -.wrap{ padding: 5px;font-size: 14px;} -.left{width:425px;float: left;} -.right{width:160px;border: 1px solid #ccc;float: right;padding: 5px;margin-right: 5px;} -.right .pre{height: 332px;overflow-y: auto;} -.right .preitem{border: white 1px solid;margin: 5px 0;padding: 2px 0;} -.right .preitem:hover{background-color: lemonChiffon;cursor: pointer;border: #ccc 1px solid;} -.right .preitem img{display: block;margin: 0 auto;width:100px;} -.clear{clear: both;} -.top{height:26px;line-height: 26px;padding: 5px;} -.bottom{height:320px;width:100%;margin: 0 auto;} -.transparent{ background: url("images/bg.gif") repeat;} -.bottom table tr td{border:1px dashed #ccc;} -#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;} -.border_style1{padding:2px;border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;} -p{margin: 5px 0} -table{clear:both;margin-bottom:10px;border-collapse:collapse;word-break:break-all;} -li{clear:both} -ol{padding-left:40px; } \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/template/template.html b/public/static/admin/UEditor/dialogs/template/template.html deleted file mode 100644 index d9903a4..0000000 --- a/public/static/admin/UEditor/dialogs/template/template.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    - - - - diff --git a/public/static/admin/UEditor/dialogs/template/template.js b/public/static/admin/UEditor/dialogs/template/template.js deleted file mode 100644 index 80a334b..0000000 --- a/public/static/admin/UEditor/dialogs/template/template.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: xuheng - * Date: 12-8-8 - * Time: 下午2:09 - * To change this template use File | Settings | File Templates. - */ -(function () { - var me = editor, - preview = $G( "preview" ), - preitem = $G( "preitem" ), - tmps = templates, - currentTmp; - var initPre = function () { - var str = ""; - for ( var i = 0, tmp; tmp = tmps[i++]; ) { - str += '
    '; - } - preitem.innerHTML = str; - }; - var pre = function ( n ) { - var tmp = tmps[n - 1]; - currentTmp = tmp; - clearItem(); - domUtils.setStyles( preitem.childNodes[n - 1], { - "background-color":"lemonChiffon", - "border":"#ccc 1px solid" - } ); - preview.innerHTML = tmp.preHtml ? tmp.preHtml : ""; - }; - var clearItem = function () { - var items = preitem.children; - for ( var i = 0, item; item = items[i++]; ) { - domUtils.setStyles( item, { - "background-color":"", - "border":"white 1px solid" - } ); - } - }; - dialog.onok = function () { - if ( !$G( "issave" ).checked ){ - me.execCommand( "cleardoc" ); - } - var obj = { - html:currentTmp && currentTmp.html - }; - me.execCommand( "template", obj ); - }; - initPre(); - window.pre = pre; - pre(2) - -})(); \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/video/images/bg.png b/public/static/admin/UEditor/dialogs/video/images/bg.png deleted file mode 100644 index 580be0a..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/bg.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/center_focus.jpg b/public/static/admin/UEditor/dialogs/video/images/center_focus.jpg deleted file mode 100644 index 262b029..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/center_focus.jpg and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/file-icons.gif b/public/static/admin/UEditor/dialogs/video/images/file-icons.gif deleted file mode 100644 index d8c02c2..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/file-icons.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/file-icons.png b/public/static/admin/UEditor/dialogs/video/images/file-icons.png deleted file mode 100644 index 3ff82c8..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/file-icons.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/icons.gif b/public/static/admin/UEditor/dialogs/video/images/icons.gif deleted file mode 100644 index 78459de..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/icons.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/icons.png b/public/static/admin/UEditor/dialogs/video/images/icons.png deleted file mode 100644 index 12e4700..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/icons.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/image.png b/public/static/admin/UEditor/dialogs/video/images/image.png deleted file mode 100644 index 19699f6..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/image.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/left_focus.jpg b/public/static/admin/UEditor/dialogs/video/images/left_focus.jpg deleted file mode 100644 index 7886d27..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/left_focus.jpg and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/none_focus.jpg b/public/static/admin/UEditor/dialogs/video/images/none_focus.jpg deleted file mode 100644 index 7c768dc..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/none_focus.jpg and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/progress.png b/public/static/admin/UEditor/dialogs/video/images/progress.png deleted file mode 100644 index 717c486..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/progress.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/right_focus.jpg b/public/static/admin/UEditor/dialogs/video/images/right_focus.jpg deleted file mode 100644 index 173e10d..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/right_focus.jpg and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/success.gif b/public/static/admin/UEditor/dialogs/video/images/success.gif deleted file mode 100644 index 8d4f311..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/success.gif and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/images/success.png b/public/static/admin/UEditor/dialogs/video/images/success.png deleted file mode 100644 index 94f968d..0000000 Binary files a/public/static/admin/UEditor/dialogs/video/images/success.png and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/video/video.css b/public/static/admin/UEditor/dialogs/video/video.css deleted file mode 100644 index 5870e7a..0000000 --- a/public/static/admin/UEditor/dialogs/video/video.css +++ /dev/null @@ -1,635 +0,0 @@ -@charset "utf-8"; -.wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative} -.tabbody{height: 335px;} -.tabbody .panel { - position: absolute; - width: 0; - height: 0; - background: #fff; - overflow: hidden; - display: none; -} -.tabbody .panel.focus { - width: 100%; - height: 335px; - display: block; -} - -.tabbody .panel table td{vertical-align: middle;} -#videoUrl { - width: 490px; - height: 21px; - line-height: 21px; - margin: 8px 5px; - background: #FFF; - border: 1px solid #d7d7d7; -} -#videoSearchTxt{margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;} -#searchList{width: 570px;overflow: auto;zoom:1;height: 270px;} -#searchList div{float: left;width: 120px;height: 135px;margin: 5px 15px;} -#searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/ -#searchList p{margin-left: 10px;} -#videoType{ - width: 65px; - height: 23px; - line-height: 22px; - border: 1px solid #d7d7d7; -} -#videoSearchBtn,#videoSearchReset{ - /*width: 80px;*/ - height: 25px; - line-height: 25px; - background: #eee; - border: 1px solid #d7d7d7; - cursor: pointer; - padding: 0 5px; -} - - - -#preview{position: relative;width: 420px;padding:0;overflow: hidden; margin-left: 10px; _margin-left:5px; height: 280px;background-color: #ddd;float: left} -#preview .previewMsg {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;background-color: #666;} -#preview .previewMsg span{display:block;margin: 125px auto 0 auto;text-align:center;font-size:18px;color:#fff;} -#preview .previewVideo {position:absolute;top:0;margin:0;padding:0;height:280px;width:100%;} -.edui-video-wrapper fieldset{ - border: 1px solid #ddd; - padding-left: 5px; - margin-bottom: 20px; - padding-bottom: 5px; - width: 115px; -} - -#videoInfo {width: 120px;float: left;margin-left: 10px;_margin-left:7px;} -fieldset{ - border: 1px solid #ddd; - padding-left: 5px; - margin-bottom: 20px; - padding-bottom: 5px; - width: 115px; -} -fieldset legend{font-weight: bold;} -fieldset p{line-height: 30px;} -fieldset input.txt{ - width: 65px; - height: 21px; - line-height: 21px; - margin: 8px 5px; - background: #FFF; - border: 1px solid #d7d7d7; -} -label.url{font-weight: bold;margin-left: 5px;color: #06c;} -#videoFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;} -#videoFloat .focus{opacity: 1;filter: alpha(opacity = 100)} -span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue} - - - - -/* upload video */ -.tabbody #upload.panel { - width: 0; - height: 0; - overflow: hidden; - position: absolute !important; - clip: rect(1px, 1px, 1px, 1px); - background: #fff; - display: block; -} -.tabbody #upload.panel.focus { - width: 100%; - height: 335px; - display: block; - clip: auto; -} -#upload_alignment div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;} -#upload_alignment .focus{opacity: 1;filter: alpha(opacity = 100)} -#upload_left { width:427px; float:left; } -#upload_left .controller { height: 30px; clear: both; } -#uploadVideoInfo{margin-top:10px;float:right;padding-right:8px;} - -#upload .queueList { - margin: 0; -} - -#upload p { - margin: 0; -} - -.element-invisible { - width: 0 !important; - height: 0 !important; - border: 0; - padding: 0; - margin: 0; - overflow: hidden; - position: absolute !important; - clip: rect(1px, 1px, 1px, 1px); -} - -#upload .placeholder { - margin: 10px; - margin-right:0; - border: 2px dashed #e6e6e6; - *border: 0px dashed #e6e6e6; - height: 161px; - padding-top: 150px; - text-align: center; - width: 97%; - float: left; - background: url(./images/image.png) center 70px no-repeat; - color: #cccccc; - font-size: 18px; - position: relative; - top:0; - *margin-left: 0; - *left: 10px; -} - -#upload .placeholder .webuploader-pick { - font-size: 18px; - background: #00b7ee; - border-radius: 3px; - line-height: 44px; - padding: 0 30px; - *width: 120px; - color: #fff; - display: inline-block; - margin: 0 auto 20px auto; - cursor: pointer; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); -} - -#upload .placeholder .webuploader-pick-hover { - background: #00a2d4; -} - - -#filePickerContainer { - text-align: center; -} - -#upload .placeholder .flashTip { - color: #666666; - font-size: 12px; - position: absolute; - width: 100%; - text-align: center; - bottom: 20px; -} - -#upload .placeholder .flashTip a { - color: #0785d1; - text-decoration: none; -} - -#upload .placeholder .flashTip a:hover { - text-decoration: underline; -} - -#upload .placeholder.webuploader-dnd-over { - border-color: #999999; -} - -#upload .filelist { - list-style: none; - margin: 0; - padding: 0; - overflow-x: hidden; - overflow-y: auto; - position: relative; - height: 285px; -} - -#upload .filelist:after { - content: ''; - display: block; - width: 0; - height: 0; - overflow: hidden; - clear: both; -} - -#upload .filelist li { - width: 113px; - height: 113px; - background: url(./images/bg.png); - text-align: center; - margin: 15px 0 0 20px; - *margin: 15px 0 0 15px; - position: relative; - display: block; - float: left; - overflow: hidden; - font-size: 12px; -} - -#upload .filelist li p.log { - position: relative; - top: -45px; -} - -#upload .filelist li p.title { - position: absolute; - top: 0; - left: 0; - width: 100%; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - top: 5px; - text-indent: 5px; - text-align: left; -} - -#upload .filelist li p.progress { - position: absolute; - width: 100%; - bottom: 0; - left: 0; - height: 8px; - overflow: hidden; - z-index: 50; - margin: 0; - border-radius: 0; - background: none; - -webkit-box-shadow: 0 0 0; -} - -#upload .filelist li p.progress span { - display: none; - overflow: hidden; - width: 0; - height: 100%; - background: #1483d8 url(./images/progress.png) repeat-x; - - -webit-transition: width 200ms linear; - -moz-transition: width 200ms linear; - -o-transition: width 200ms linear; - -ms-transition: width 200ms linear; - transition: width 200ms linear; - - -webkit-animation: progressmove 2s linear infinite; - -moz-animation: progressmove 2s linear infinite; - -o-animation: progressmove 2s linear infinite; - -ms-animation: progressmove 2s linear infinite; - animation: progressmove 2s linear infinite; - - -webkit-transform: translateZ(0); -} - -@-webkit-keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -@-moz-keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -@keyframes progressmove { - 0% { - background-position: 0 0; - } - 100% { - background-position: 17px 0; - } -} - -#upload .filelist li p.imgWrap { - position: relative; - z-index: 2; - line-height: 113px; - vertical-align: middle; - overflow: hidden; - width: 113px; - height: 113px; - - -webkit-transform-origin: 50% 50%; - -moz-transform-origin: 50% 50%; - -o-transform-origin: 50% 50%; - -ms-transform-origin: 50% 50%; - transform-origin: 50% 50%; - - -webit-transition: 200ms ease-out; - -moz-transition: 200ms ease-out; - -o-transition: 200ms ease-out; - -ms-transition: 200ms ease-out; - transition: 200ms ease-out; -} -#upload .filelist li p.imgWrap.notimage { - margin-top: 0; - width: 111px; - height: 111px; - border: 1px #eeeeee solid; -} -#upload .filelist li p.imgWrap.notimage i.file-preview { - margin-top: 15px; -} - -#upload .filelist li img { - width: 100%; -} - -#upload .filelist li p.error { - background: #f43838; - color: #fff; - position: absolute; - bottom: 0; - left: 0; - height: 28px; - line-height: 28px; - width: 100%; - z-index: 100; - display:none; -} - -#upload .filelist li .success { - display: block; - position: absolute; - left: 0; - bottom: 0; - height: 40px; - width: 100%; - z-index: 200; - background: url(./images/success.png) no-repeat right bottom; - background-image: url(./images/success.gif) \9; -} - -#upload .filelist li.filePickerBlock { - width: 113px; - height: 113px; - background: url(./images/image.png) no-repeat center 12px; - border: 1px solid #eeeeee; - border-radius: 0; -} -#upload .filelist li.filePickerBlock div.webuploader-pick { - width: 100%; - height: 100%; - margin: 0; - padding: 0; - opacity: 0; - background: none; - font-size: 0; -} - -#upload .filelist div.file-panel { - position: absolute; - height: 0; - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#80000000', endColorstr='#80000000') \0; - background: rgba(0, 0, 0, 0.5); - width: 100%; - top: 0; - left: 0; - overflow: hidden; - z-index: 300; -} - -#upload .filelist div.file-panel span { - width: 24px; - height: 24px; - display: inline; - float: right; - text-indent: -9999px; - overflow: hidden; - background: url(./images/icons.png) no-repeat; - background: url(./images/icons.gif) no-repeat \9; - margin: 5px 1px 1px; - cursor: pointer; - -webkit-tap-highlight-color: rgba(0,0,0,0); - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -#upload .filelist div.file-panel span.rotateLeft { - display:none; - background-position: 0 -24px; -} - -#upload .filelist div.file-panel span.rotateLeft:hover { - background-position: 0 0; -} - -#upload .filelist div.file-panel span.rotateRight { - display:none; - background-position: -24px -24px; -} - -#upload .filelist div.file-panel span.rotateRight:hover { - background-position: -24px 0; -} - -#upload .filelist div.file-panel span.cancel { - background-position: -48px -24px; -} - -#upload .filelist div.file-panel span.cancel:hover { - background-position: -48px 0; -} - -#upload .statusBar { - height: 45px; - border-bottom: 1px solid #dadada; - margin: 0 10px; - padding: 0; - line-height: 45px; - vertical-align: middle; - position: relative; -} - -#upload .statusBar .progress { - border: 1px solid #1483d8; - width: 198px; - background: #fff; - height: 18px; - position: absolute; - top: 12px; - display: none; - text-align: center; - line-height: 18px; - color: #6dbfff; - margin: 0 10px 0 0; -} -#upload .statusBar .progress span.percentage { - width: 0; - height: 100%; - left: 0; - top: 0; - background: #1483d8; - position: absolute; -} -#upload .statusBar .progress span.text { - position: relative; - z-index: 10; -} - -#upload .statusBar .info { - display: inline-block; - font-size: 14px; - color: #666666; -} - -#upload .statusBar .btns { - position: absolute; - top: 7px; - right: 0; - line-height: 30px; -} - -#filePickerBtn { - display: inline-block; - float: left; -} -#upload .statusBar .btns .webuploader-pick, -#upload .statusBar .btns .uploadBtn, -#upload .statusBar .btns .uploadBtn.state-uploading, -#upload .statusBar .btns .uploadBtn.state-paused { - background: #ffffff; - border: 1px solid #cfcfcf; - color: #565656; - padding: 0 18px; - display: inline-block; - border-radius: 3px; - margin-left: 10px; - cursor: pointer; - font-size: 14px; - float: left; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -#upload .statusBar .btns .webuploader-pick-hover, -#upload .statusBar .btns .uploadBtn:hover, -#upload .statusBar .btns .uploadBtn.state-uploading:hover, -#upload .statusBar .btns .uploadBtn.state-paused:hover { - background: #f0f0f0; -} - -#upload .statusBar .btns .uploadBtn, -#upload .statusBar .btns .uploadBtn.state-paused{ - background: #00b7ee; - color: #fff; - border-color: transparent; -} -#upload .statusBar .btns .uploadBtn:hover, -#upload .statusBar .btns .uploadBtn.state-paused:hover{ - background: #00a2d4; -} - -#upload .statusBar .btns .uploadBtn.disabled { - pointer-events: none; - filter:alpha(opacity=60); - -moz-opacity:0.6; - -khtml-opacity: 0.6; - opacity: 0.6; -} - - -/* 在线文件的文件预览图标 */ -i.file-preview { - display: block; - margin: 10px auto; - width: 70px; - height: 70px; - background-image: url("./images/file-icons.png"); - background-image: url("./images/file-icons.gif") \9; - background-position: -140px center; - background-repeat: no-repeat; -} -i.file-preview.file-type-dir{ - background-position: 0 center; -} -i.file-preview.file-type-file{ - background-position: -140px center; -} -i.file-preview.file-type-filelist{ - background-position: -210px center; -} -i.file-preview.file-type-zip, -i.file-preview.file-type-rar, -i.file-preview.file-type-7z, -i.file-preview.file-type-tar, -i.file-preview.file-type-gz, -i.file-preview.file-type-bz2{ - background-position: -280px center; -} -i.file-preview.file-type-xls, -i.file-preview.file-type-xlsx{ - background-position: -350px center; -} -i.file-preview.file-type-doc, -i.file-preview.file-type-docx{ - background-position: -420px center; -} -i.file-preview.file-type-ppt, -i.file-preview.file-type-pptx{ - background-position: -490px center; -} -i.file-preview.file-type-vsd{ - background-position: -560px center; -} -i.file-preview.file-type-pdf{ - background-position: -630px center; -} -i.file-preview.file-type-txt, -i.file-preview.file-type-md, -i.file-preview.file-type-json, -i.file-preview.file-type-htm, -i.file-preview.file-type-xml, -i.file-preview.file-type-html, -i.file-preview.file-type-js, -i.file-preview.file-type-css, -i.file-preview.file-type-php, -i.file-preview.file-type-jsp, -i.file-preview.file-type-asp{ - background-position: -700px center; -} -i.file-preview.file-type-apk{ - background-position: -770px center; -} -i.file-preview.file-type-exe{ - background-position: -840px center; -} -i.file-preview.file-type-ipa{ - background-position: -910px center; -} -i.file-preview.file-type-mp4, -i.file-preview.file-type-swf, -i.file-preview.file-type-mkv, -i.file-preview.file-type-avi, -i.file-preview.file-type-flv, -i.file-preview.file-type-mov, -i.file-preview.file-type-mpg, -i.file-preview.file-type-mpeg, -i.file-preview.file-type-ogv, -i.file-preview.file-type-webm, -i.file-preview.file-type-rm, -i.file-preview.file-type-rmvb{ - background-position: -980px center; -} -i.file-preview.file-type-ogg, -i.file-preview.file-type-wav, -i.file-preview.file-type-wmv, -i.file-preview.file-type-mid, -i.file-preview.file-type-mp3{ - background-position: -1050px center; -} -i.file-preview.file-type-jpg, -i.file-preview.file-type-jpeg, -i.file-preview.file-type-gif, -i.file-preview.file-type-bmp, -i.file-preview.file-type-png, -i.file-preview.file-type-psd{ - background-position: -140px center; -} \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/video/video.html b/public/static/admin/UEditor/dialogs/video/video.html deleted file mode 100644 index 5007882..0000000 --- a/public/static/admin/UEditor/dialogs/video/video.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -
    - - - - -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    - 0% - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
      -
    • -
    -
    -
    -
    -
    - - - - -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/video/video.js b/public/static/admin/UEditor/dialogs/video/video.js deleted file mode 100644 index 61c4a7e..0000000 --- a/public/static/admin/UEditor/dialogs/video/video.js +++ /dev/null @@ -1,797 +0,0 @@ -/** - * Created by JetBrains PhpStorm. - * User: taoqili - * Date: 12-2-20 - * Time: 上午11:19 - * To change this template use File | Settings | File Templates. - */ - -(function(){ - - var video = {}, - uploadVideoList = [], - isModifyUploadVideo = false, - uploadFile; - - window.onload = function(){ - $focus($G("videoUrl")); - initTabs(); - initVideo(); - initUpload(); - }; - - /* 初始化tab标签 */ - function initTabs(){ - var tabs = $G('tabHeads').children; - for (var i = 0; i < tabs.length; i++) { - domUtils.on(tabs[i], "click", function (e) { - var j, bodyId, target = e.target || e.srcElement; - for (j = 0; j < tabs.length; j++) { - bodyId = tabs[j].getAttribute('data-content-id'); - if(tabs[j] == target){ - domUtils.addClass(tabs[j], 'focus'); - domUtils.addClass($G(bodyId), 'focus'); - }else { - domUtils.removeClasses(tabs[j], 'focus'); - domUtils.removeClasses($G(bodyId), 'focus'); - } - } - }); - } - } - - function initVideo(){ - createAlignButton( ["videoFloat", "upload_alignment"] ); - addUrlChangeListener($G("videoUrl")); - addOkListener(); - - //编辑视频时初始化相关信息 - (function(){ - var img = editor.selection.getRange().getClosedNode(),url; - if(img && img.className){ - var hasFakedClass = (img.className == "edui-faked-video"), - hasUploadClass = img.className.indexOf("edui-upload-video")!=-1; - if(hasFakedClass || hasUploadClass) { - $G("videoUrl").value = url = img.getAttribute("_url"); - $G("videoWidth").value = img.width; - $G("videoHeight").value = img.height; - var align = domUtils.getComputedStyle(img,"float"), - parentAlign = domUtils.getComputedStyle(img.parentNode,"text-align"); - updateAlignButton(parentAlign==="center"?"center":align); - } - if(hasUploadClass) { - isModifyUploadVideo = true; - } - } - createPreviewVideo(url); - })(); - } - - /** - * 监听确认和取消两个按钮事件,用户执行插入或者清空正在播放的视频实例操作 - */ - function addOkListener(){ - dialog.onok = function(){ - $G("preview").innerHTML = ""; - var currentTab = findFocus("tabHeads","tabSrc"); - switch(currentTab){ - case "video": - return insertSingle(); - break; - case "videoSearch": - return insertSearch("searchList"); - break; - case "upload": - return insertUpload(); - break; - } - }; - dialog.oncancel = function(){ - $G("preview").innerHTML = ""; - }; - } - - /** - * 依据传入的align值更新按钮信息 - * @param align - */ - function updateAlignButton( align ) { - var aligns = $G( "videoFloat" ).children; - for ( var i = 0, ci; ci = aligns[i++]; ) { - if ( ci.getAttribute( "name" ) == align ) { - if ( ci.className !="focus" ) { - ci.className = "focus"; - } - } else { - if ( ci.className =="focus" ) { - ci.className = ""; - } - } - } - } - - /** - * 将单个视频信息插入编辑器中 - */ - function insertSingle(){ - var width = $G("videoWidth"), - height = $G("videoHeight"), - url=$G('videoUrl').value, - align = findFocus("videoFloat","name"); - if(!url) return false; - if ( !checkNum( [width, height] ) ) return false; - editor.execCommand('insertvideo', { - url: convert_url(url), - width: width.value, - height: height.value, - align: align - }, isModifyUploadVideo ? 'upload':null); - } - - /** - * 将元素id下的所有代表视频的图片插入编辑器中 - * @param id - */ - function insertSearch(id){ - var imgs = domUtils.getElementsByTagName($G(id),"img"), - videoObjs=[]; - for(var i=0,img; img=imgs[i++];){ - if(img.getAttribute("selected")){ - videoObjs.push({ - url:img.getAttribute("ue_video_url"), - width:420, - height:280, - align:"none" - }); - } - } - editor.execCommand('insertvideo',videoObjs); - } - - /** - * 找到id下具有focus类的节点并返回该节点下的某个属性 - * @param id - * @param returnProperty - */ - function findFocus( id, returnProperty ) { - var tabs = $G( id ).children, - property; - for ( var i = 0, ci; ci = tabs[i++]; ) { - if ( ci.className=="focus" ) { - property = ci.getAttribute( returnProperty ); - break; - } - } - return property; - } - function convert_url(url){ - if ( !url ) return ''; - url = utils.trim(url) - .replace(/v\.youku\.com\/v_show\/id_([\w\-=]+)\.html/i, 'player.youku.com/player.php/sid/$1/v.swf') - .replace(/(www\.)?youtube\.com\/watch\?v=([\w\-]+)/i, "www.youtube.com/v/$2") - .replace(/youtu.be\/(\w+)$/i, "www.youtube.com/v/$1") - .replace(/v\.ku6\.com\/.+\/([\w\.]+)\.html.*$/i, "player.ku6.com/refer/$1/v.swf") - .replace(/www\.56\.com\/u\d+\/v_([\w\-]+)\.html/i, "player.56.com/v_$1.swf") - .replace(/www.56.com\/w\d+\/play_album\-aid\-\d+_vid\-([^.]+)\.html/i, "player.56.com/v_$1.swf") - .replace(/v\.pps\.tv\/play_([\w]+)\.html.*$/i, "player.pps.tv/player/sid/$1/v.swf") - .replace(/www\.letv\.com\/ptv\/vplay\/([\d]+)\.html.*$/i, "i7.imgs.letv.com/player/swfPlayer.swf?id=$1&autoplay=0") - .replace(/www\.tudou\.com\/programs\/view\/([\w\-]+)\/?/i, "www.tudou.com/v/$1") - .replace(/v\.qq\.com\/cover\/[\w]+\/[\w]+\/([\w]+)\.html/i, "static.video.qq.com/TPout.swf?vid=$1") - .replace(/v\.qq\.com\/.+[\?\&]vid=([^&]+).*$/i, "static.video.qq.com/TPout.swf?vid=$1") - .replace(/my\.tv\.sohu\.com\/[\w]+\/[\d]+\/([\d]+)\.shtml.*$/i, "share.vrs.sohu.com/my/v.swf&id=$1"); - - return url; - } - - /** - * 检测传入的所有input框中输入的长宽是否是正数 - * @param nodes input框集合, - */ - function checkNum( nodes ) { - for ( var i = 0, ci; ci = nodes[i++]; ) { - var value = ci.value; - if ( !isNumber( value ) && value) { - alert( lang.numError ); - ci.value = ""; - ci.focus(); - return false; - } - } - return true; - } - - /** - * 数字判断 - * @param value - */ - function isNumber( value ) { - return /(0|^[1-9]\d*$)/.test( value ); - } - - /** - * 创建图片浮动选择按钮 - * @param ids - */ - function createAlignButton( ids ) { - for ( var i = 0, ci; ci = ids[i++]; ) { - var floatContainer = $G( ci ), - nameMaps = {"none":lang['default'], "left":lang.floatLeft, "right":lang.floatRight, "center":lang.block}; - for ( var j in nameMaps ) { - var div = document.createElement( "div" ); - div.setAttribute( "name", j ); - if ( j == "none" ) div.className="focus"; - div.style.cssText = "background:url(images/" + j + "_focus.jpg);"; - div.setAttribute( "title", nameMaps[j] ); - floatContainer.appendChild( div ); - } - switchSelect( ci ); - } - } - - /** - * 选择切换 - * @param selectParentId - */ - function switchSelect( selectParentId ) { - var selects = $G( selectParentId ).children; - for ( var i = 0, ci; ci = selects[i++]; ) { - domUtils.on( ci, "click", function () { - for ( var j = 0, cj; cj = selects[j++]; ) { - cj.className = ""; - cj.removeAttribute && cj.removeAttribute( "class" ); - } - this.className = "focus"; - } ) - } - } - - /** - * 监听url改变事件 - * @param url - */ - function addUrlChangeListener(url){ - if (browser.ie) { - url.onpropertychange = function () { - createPreviewVideo( this.value ); - } - } else { - url.addEventListener( "input", function () { - createPreviewVideo( this.value ); - }, false ); - } - } - - /** - * 根据url生成视频预览 - * @param url - */ - function createPreviewVideo(url){ - if ( !url )return; - - var conUrl = convert_url(url); - - conUrl = utils.unhtmlForUrl(conUrl); - - $G("preview").innerHTML = '
    '+lang.urlError+'
    '+ - '' + - ''; - } - - - /* 插入上传视频 */ - function insertUpload(){ - var videoObjs=[], - uploadDir = editor.getOpt('videoUrlPrefix'), - width = parseInt($G('upload_width').value, 10) || 420, - height = parseInt($G('upload_height').value, 10) || 280, - align = findFocus("upload_alignment","name") || 'none'; - for(var key in uploadVideoList) { - var file = uploadVideoList[key]; - videoObjs.push({ - url: uploadDir + file.url, - width:width, - height:height, - align:align - }); - } - - var count = uploadFile.getQueueCount(); - if (count) { - $('.info', '#queueList').html('' + '还有2个未上传文件'.replace(/[\d]/, count) + ''); - return false; - } else { - editor.execCommand('insertvideo', videoObjs, 'upload'); - } - } - - /*初始化上传标签*/ - function initUpload(){ - uploadFile = new UploadFile('queueList'); - } - - - /* 上传附件 */ - function UploadFile(target) { - this.$wrap = target.constructor == String ? $('#' + target) : $(target); - this.init(); - } - UploadFile.prototype = { - init: function () { - this.fileList = []; - this.initContainer(); - this.initUploader(); - }, - initContainer: function () { - this.$queue = this.$wrap.find('.filelist'); - }, - /* 初始化容器 */ - initUploader: function () { - var _this = this, - $ = jQuery, // just in case. Make sure it's not an other libaray. - $wrap = _this.$wrap, - // 图片容器 - $queue = $wrap.find('.filelist'), - // 状态栏,包括进度和控制按钮 - $statusBar = $wrap.find('.statusBar'), - // 文件总体选择信息。 - $info = $statusBar.find('.info'), - // 上传按钮 - $upload = $wrap.find('.uploadBtn'), - // 上传按钮 - $filePickerBtn = $wrap.find('.filePickerBtn'), - // 上传按钮 - $filePickerBlock = $wrap.find('.filePickerBlock'), - // 没选择文件之前的内容。 - $placeHolder = $wrap.find('.placeholder'), - // 总体进度条 - $progress = $statusBar.find('.progress').hide(), - // 添加的文件数量 - fileCount = 0, - // 添加的文件总大小 - fileSize = 0, - // 优化retina, 在retina下这个值是2 - ratio = window.devicePixelRatio || 1, - // 缩略图大小 - thumbnailWidth = 113 * ratio, - thumbnailHeight = 113 * ratio, - // 可能有pedding, ready, uploading, confirm, done. - state = '', - // 所有文件的进度信息,key为file id - percentages = {}, - supportTransition = (function () { - var s = document.createElement('p').style, - r = 'transition' in s || - 'WebkitTransition' in s || - 'MozTransition' in s || - 'msTransition' in s || - 'OTransition' in s; - s = null; - return r; - })(), - // WebUploader实例 - uploader, - actionUrl = editor.getActionUrl(editor.getOpt('videoActionName')), - fileMaxSize = editor.getOpt('videoMaxSize'), - acceptExtensions = (editor.getOpt('videoAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, '');; - - if (!WebUploader.Uploader.support()) { - $('#filePickerReady').after($('
    ').html(lang.errorNotSupport)).hide(); - return; - } else if (!editor.getOpt('videoActionName')) { - $('#filePickerReady').after($('
    ').html(lang.errorLoadConfig)).hide(); - return; - } - - uploader = _this.uploader = WebUploader.create({ - pick: { - id: '#filePickerReady', - label: lang.uploadSelectFile - }, - swf: '../../third-party/webuploader/Uploader.swf', - server: actionUrl, - fileVal: editor.getOpt('videoFieldName'), - duplicate: true, - fileSingleSizeLimit: fileMaxSize, - compress: false - }); - uploader.addButton({ - id: '#filePickerBlock' - }); - uploader.addButton({ - id: '#filePickerBtn', - label: lang.uploadAddFile - }); - - setState('pedding'); - - // 当有文件添加进来时执行,负责view的创建 - function addFile(file) { - var $li = $('
  • ' + - '

    ' + file.name + '

    ' + - '

    ' + - '

    ' + - '
  • '), - - $btns = $('
    ' + - '' + lang.uploadDelete + '' + - '' + lang.uploadTurnRight + '' + - '' + lang.uploadTurnLeft + '
    ').appendTo($li), - $prgress = $li.find('p.progress span'), - $wrap = $li.find('p.imgWrap'), - $info = $('

    ').hide().appendTo($li), - - showError = function (code) { - switch (code) { - case 'exceed_size': - text = lang.errorExceedSize; - break; - case 'interrupt': - text = lang.errorInterrupt; - break; - case 'http': - text = lang.errorHttp; - break; - case 'not_allow_type': - text = lang.errorFileType; - break; - default: - text = lang.errorUploadRetry; - break; - } - $info.text(text).show(); - }; - - if (file.getStatus() === 'invalid') { - showError(file.statusText); - } else { - $wrap.text(lang.uploadPreview); - if ('|png|jpg|jpeg|bmp|gif|'.indexOf('|'+file.ext.toLowerCase()+'|') == -1) { - $wrap.empty().addClass('notimage').append('' + - '' + file.name + ''); - } else { - if (browser.ie && browser.version <= 7) { - $wrap.text(lang.uploadNoPreview); - } else { - uploader.makeThumb(file, function (error, src) { - if (error || !src || (/^data:/.test(src) && browser.ie && browser.version <= 7)) { - $wrap.text(lang.uploadNoPreview); - } else { - var $img = $(''); - $wrap.empty().append($img); - $img.on('error', function () { - $wrap.text(lang.uploadNoPreview); - }); - } - }, thumbnailWidth, thumbnailHeight); - } - } - percentages[ file.id ] = [ file.size, 0 ]; - file.rotation = 0; - - /* 检查文件格式 */ - if (!file.ext || acceptExtensions.indexOf(file.ext.toLowerCase()) == -1) { - showError('not_allow_type'); - uploader.removeFile(file); - } - } - - file.on('statuschange', function (cur, prev) { - if (prev === 'progress') { - $prgress.hide().width(0); - } else if (prev === 'queued') { - $li.off('mouseenter mouseleave'); - $btns.remove(); - } - // 成功 - if (cur === 'error' || cur === 'invalid') { - showError(file.statusText); - percentages[ file.id ][ 1 ] = 1; - } else if (cur === 'interrupt') { - showError('interrupt'); - } else if (cur === 'queued') { - percentages[ file.id ][ 1 ] = 0; - } else if (cur === 'progress') { - $info.hide(); - $prgress.css('display', 'block'); - } else if (cur === 'complete') { - } - - $li.removeClass('state-' + prev).addClass('state-' + cur); - }); - - $li.on('mouseenter', function () { - $btns.stop().animate({height: 30}); - }); - $li.on('mouseleave', function () { - $btns.stop().animate({height: 0}); - }); - - $btns.on('click', 'span', function () { - var index = $(this).index(), - deg; - - switch (index) { - case 0: - uploader.removeFile(file); - return; - case 1: - file.rotation += 90; - break; - case 2: - file.rotation -= 90; - break; - } - - if (supportTransition) { - deg = 'rotate(' + file.rotation + 'deg)'; - $wrap.css({ - '-webkit-transform': deg, - '-mos-transform': deg, - '-o-transform': deg, - 'transform': deg - }); - } else { - $wrap.css('filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' + (~~((file.rotation / 90) % 4 + 4) % 4) + ')'); - } - - }); - - $li.insertBefore($filePickerBlock); - } - - // 负责view的销毁 - function removeFile(file) { - var $li = $('#' + file.id); - delete percentages[ file.id ]; - updateTotalProgress(); - $li.off().find('.file-panel').off().end().remove(); - } - - function updateTotalProgress() { - var loaded = 0, - total = 0, - spans = $progress.children(), - percent; - - $.each(percentages, function (k, v) { - total += v[ 0 ]; - loaded += v[ 0 ] * v[ 1 ]; - }); - - percent = total ? loaded / total : 0; - - spans.eq(0).text(Math.round(percent * 100) + '%'); - spans.eq(1).css('width', Math.round(percent * 100) + '%'); - updateStatus(); - } - - function setState(val, files) { - - if (val != state) { - - var stats = uploader.getStats(); - - $upload.removeClass('state-' + state); - $upload.addClass('state-' + val); - - switch (val) { - - /* 未选择文件 */ - case 'pedding': - $queue.addClass('element-invisible'); - $statusBar.addClass('element-invisible'); - $placeHolder.removeClass('element-invisible'); - $progress.hide(); $info.hide(); - uploader.refresh(); - break; - - /* 可以开始上传 */ - case 'ready': - $placeHolder.addClass('element-invisible'); - $queue.removeClass('element-invisible'); - $statusBar.removeClass('element-invisible'); - $progress.hide(); $info.show(); - $upload.text(lang.uploadStart); - uploader.refresh(); - break; - - /* 上传中 */ - case 'uploading': - $progress.show(); $info.hide(); - $upload.text(lang.uploadPause); - break; - - /* 暂停上传 */ - case 'paused': - $progress.show(); $info.hide(); - $upload.text(lang.uploadContinue); - break; - - case 'confirm': - $progress.show(); $info.hide(); - $upload.text(lang.uploadStart); - - stats = uploader.getStats(); - if (stats.successNum && !stats.uploadFailNum) { - setState('finish'); - return; - } - break; - - case 'finish': - $progress.hide(); $info.show(); - if (stats.uploadFailNum) { - $upload.text(lang.uploadRetry); - } else { - $upload.text(lang.uploadStart); - } - break; - } - - state = val; - updateStatus(); - - } - - if (!_this.getQueueCount()) { - $upload.addClass('disabled') - } else { - $upload.removeClass('disabled') - } - - } - - function updateStatus() { - var text = '', stats; - - if (state === 'ready') { - text = lang.updateStatusReady.replace('_', fileCount).replace('_KB', WebUploader.formatSize(fileSize)); - } else if (state === 'confirm') { - stats = uploader.getStats(); - if (stats.uploadFailNum) { - text = lang.updateStatusConfirm.replace('_', stats.successNum).replace('_', stats.successNum); - } - } else { - stats = uploader.getStats(); - text = lang.updateStatusFinish.replace('_', fileCount). - replace('_KB', WebUploader.formatSize(fileSize)). - replace('_', stats.successNum); - - if (stats.uploadFailNum) { - text += lang.updateStatusError.replace('_', stats.uploadFailNum); - } - } - - $info.html(text); - } - - uploader.on('fileQueued', function (file) { - fileCount++; - fileSize += file.size; - - if (fileCount === 1) { - $placeHolder.addClass('element-invisible'); - $statusBar.show(); - } - - addFile(file); - }); - - uploader.on('fileDequeued', function (file) { - fileCount--; - fileSize -= file.size; - - removeFile(file); - updateTotalProgress(); - }); - - uploader.on('filesQueued', function (file) { - if (!uploader.isInProgress() && (state == 'pedding' || state == 'finish' || state == 'confirm' || state == 'ready')) { - setState('ready'); - } - updateTotalProgress(); - }); - - uploader.on('all', function (type, files) { - switch (type) { - case 'uploadFinished': - setState('confirm', files); - break; - case 'startUpload': - /* 添加额外的GET参数 */ - var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '', - url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + 'encode=utf-8&' + params); - uploader.option('server', url); - setState('uploading', files); - break; - case 'stopUpload': - setState('paused', files); - break; - } - }); - - uploader.on('uploadBeforeSend', function (file, data, header) { - //这里可以通过data对象添加POST参数 - header['X_Requested_With'] = 'XMLHttpRequest'; - // HaoChuan9421 - if(editor.options.headers && Object.prototype.toString.apply(editor.options.headers) === "[object Object]"){ - for(var key in editor.options.headers){ - header[key] = editor.options.headers[key] - } - } - }); - - uploader.on('uploadProgress', function (file, percentage) { - var $li = $('#' + file.id), - $percent = $li.find('.progress span'); - - $percent.css('width', percentage * 100 + '%'); - percentages[ file.id ][ 1 ] = percentage; - updateTotalProgress(); - }); - - uploader.on('uploadSuccess', function (file, ret) { - var $file = $('#' + file.id); - try { - var responseText = (ret._raw || ret), - json = utils.str2json(responseText); - if (json.state == 'SUCCESS') { - uploadVideoList.push({ - 'url': json.url, - 'type': json.type, - 'original':json.original - }); - $file.append(''); - } else { - $file.find('.error').text(json.state).show(); - } - } catch (e) { - $file.find('.error').text(lang.errorServerUpload).show(); - } - }); - - uploader.on('uploadError', function (file, code) { - }); - uploader.on('error', function (code, file) { - if (code == 'Q_TYPE_DENIED' || code == 'F_EXCEED_SIZE') { - addFile(file); - } - }); - uploader.on('uploadComplete', function (file, ret) { - }); - - $upload.on('click', function () { - if ($(this).hasClass('disabled')) { - return false; - } - - if (state === 'ready') { - uploader.upload(); - } else if (state === 'paused') { - uploader.upload(); - } else if (state === 'uploading') { - uploader.stop(); - } - }); - - $upload.addClass('state-' + state); - updateTotalProgress(); - }, - getQueueCount: function () { - var file, i, status, readyFile = 0, files = this.uploader.getFiles(); - for (i = 0; file = files[i++]; ) { - status = file.getStatus(); - if (status == 'queued' || status == 'uploading' || status == 'progress') readyFile++; - } - return readyFile; - }, - refresh: function(){ - this.uploader.refresh(); - } - }; - -})(); diff --git a/public/static/admin/UEditor/dialogs/webapp/webapp.html b/public/static/admin/UEditor/dialogs/webapp/webapp.html deleted file mode 100644 index 1614377..0000000 --- a/public/static/admin/UEditor/dialogs/webapp/webapp.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - -
    -
    -
    - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/wordimage/fClipboard_ueditor.swf b/public/static/admin/UEditor/dialogs/wordimage/fClipboard_ueditor.swf deleted file mode 100644 index ac5d27f..0000000 Binary files a/public/static/admin/UEditor/dialogs/wordimage/fClipboard_ueditor.swf and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/wordimage/imageUploader.swf b/public/static/admin/UEditor/dialogs/wordimage/imageUploader.swf deleted file mode 100644 index 2a554ca..0000000 Binary files a/public/static/admin/UEditor/dialogs/wordimage/imageUploader.swf and /dev/null differ diff --git a/public/static/admin/UEditor/dialogs/wordimage/tangram.js b/public/static/admin/UEditor/dialogs/wordimage/tangram.js deleted file mode 100644 index 2ebd8fd..0000000 --- a/public/static/admin/UEditor/dialogs/wordimage/tangram.js +++ /dev/null @@ -1,1495 +0,0 @@ -// Copyright (c) 2009, Baidu Inc. All rights reserved. -// -// Licensed under the BSD License -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http:// tangram.baidu.com/license.html -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - /** - * @namespace T Tangram七巧板 - * @name T - * @version 1.6.0 -*/ - -/** - * 声明baidu包 - * @author: allstar, erik, meizz, berg - */ -var T, - baidu = T = baidu || {version: "1.5.0"}; -baidu.guid = "$BAIDU$"; -baidu.$$ = window[baidu.guid] = window[baidu.guid] || {global:{}}; - -/** - * 使用flash资源封装的一些功能 - * @namespace baidu.flash - */ -baidu.flash = baidu.flash || {}; - -/** - * 操作dom的方法 - * @namespace baidu.dom - */ -baidu.dom = baidu.dom || {}; - - -/** - * 从文档中获取指定的DOM元素 - * @name baidu.dom.g - * @function - * @grammar baidu.dom.g(id) - * @param {string|HTMLElement} id 元素的id或DOM元素. - * @shortcut g,T.G - * @meta standard - * @see baidu.dom.q - * - * @return {HTMLElement|null} 获取的元素,查找不到时返回null,如果参数不合法,直接返回参数. - */ -baidu.dom.g = function(id) { - if (!id) return null; - if ('string' == typeof id || id instanceof String) { - return document.getElementById(id); - } else if (id.nodeName && (id.nodeType == 1 || id.nodeType == 9)) { - return id; - } - return null; -}; -baidu.g = baidu.G = baidu.dom.g; - - -/** - * 操作数组的方法 - * @namespace baidu.array - */ - -baidu.array = baidu.array || {}; - - -/** - * 遍历数组中所有元素 - * @name baidu.array.each - * @function - * @grammar baidu.array.each(source, iterator[, thisObject]) - * @param {Array} source 需要遍历的数组 - * @param {Function} iterator 对每个数组元素进行调用的函数,该函数有两个参数,第一个为数组元素,第二个为数组索引值,function (item, index)。 - * @param {Object} [thisObject] 函数调用时的this指针,如果没有此参数,默认是当前遍历的数组 - * @remark - * each方法不支持对Object的遍历,对Object的遍历使用baidu.object.each 。 - * @shortcut each - * @meta standard - * - * @returns {Array} 遍历的数组 - */ - -baidu.each = baidu.array.forEach = baidu.array.each = function (source, iterator, thisObject) { - var returnValue, item, i, len = source.length; - - if ('function' == typeof iterator) { - for (i = 0; i < len; i++) { - item = source[i]; - returnValue = iterator.call(thisObject || source, item, i); - - if (returnValue === false) { - break; - } - } - } - return source; -}; - -/** - * 对语言层面的封装,包括类型判断、模块扩展、继承基类以及对象自定义事件的支持。 - * @namespace baidu.lang - */ -baidu.lang = baidu.lang || {}; - - -/** - * 判断目标参数是否为function或Function实例 - * @name baidu.lang.isFunction - * @function - * @grammar baidu.lang.isFunction(source) - * @param {Any} source 目标参数 - * @version 1.2 - * @see baidu.lang.isString,baidu.lang.isObject,baidu.lang.isNumber,baidu.lang.isArray,baidu.lang.isElement,baidu.lang.isBoolean,baidu.lang.isDate - * @meta standard - * @returns {boolean} 类型判断结果 - */ -baidu.lang.isFunction = function (source) { - return '[object Function]' == Object.prototype.toString.call(source); -}; - -/** - * 判断目标参数是否string类型或String对象 - * @name baidu.lang.isString - * @function - * @grammar baidu.lang.isString(source) - * @param {Any} source 目标参数 - * @shortcut isString - * @meta standard - * @see baidu.lang.isObject,baidu.lang.isNumber,baidu.lang.isArray,baidu.lang.isElement,baidu.lang.isBoolean,baidu.lang.isDate - * - * @returns {boolean} 类型判断结果 - */ -baidu.lang.isString = function (source) { - return '[object String]' == Object.prototype.toString.call(source); -}; -baidu.isString = baidu.lang.isString; - - -/** - * 判断浏览器类型和特性的属性 - * @namespace baidu.browser - */ -baidu.browser = baidu.browser || {}; - - -/** - * 判断是否为opera浏览器 - * @property opera opera版本号 - * @grammar baidu.browser.opera - * @meta standard - * @see baidu.browser.ie,baidu.browser.firefox,baidu.browser.safari,baidu.browser.chrome - * @returns {Number} opera版本号 - */ - -/** - * opera 从10开始不是用opera后面的字符串进行版本的判断 - * 在Browser identification最后添加Version + 数字进行版本标识 - * opera后面的数字保持在9.80不变 - */ -baidu.browser.opera = /opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(navigator.userAgent) ? + ( RegExp["\x246"] || RegExp["\x242"] ) : undefined; - - -/** - * 在目标元素的指定位置插入HTML代码 - * @name baidu.dom.insertHTML - * @function - * @grammar baidu.dom.insertHTML(element, position, html) - * @param {HTMLElement|string} element 目标元素或目标元素的id - * @param {string} position 插入html的位置信息,取值为beforeBegin,afterBegin,beforeEnd,afterEnd - * @param {string} html 要插入的html - * @remark - * - * 对于position参数,大小写不敏感
    - * 参数的意思:beforeBegin<span>afterBegin this is span! beforeEnd</span> afterEnd
    - * 此外,如果使用本函数插入带有script标签的HTML字符串,script标签对应的脚本将不会被执行。 - * - * @shortcut insertHTML - * @meta standard - * - * @returns {HTMLElement} 目标元素 - */ -baidu.dom.insertHTML = function (element, position, html) { - element = baidu.dom.g(element); - var range,begin; - if (element.insertAdjacentHTML && !baidu.browser.opera) { - element.insertAdjacentHTML(position, html); - } else { - range = element.ownerDocument.createRange(); - position = position.toUpperCase(); - if (position == 'AFTERBEGIN' || position == 'BEFOREEND') { - range.selectNodeContents(element); - range.collapse(position == 'AFTERBEGIN'); - } else { - begin = position == 'BEFOREBEGIN'; - range[begin ? 'setStartBefore' : 'setEndAfter'](element); - range.collapse(begin); - } - range.insertNode(range.createContextualFragment(html)); - } - return element; -}; - -baidu.insertHTML = baidu.dom.insertHTML; - -/** - * 操作flash对象的方法,包括创建flash对象、获取flash对象以及判断flash插件的版本号 - * @namespace baidu.swf - */ -baidu.swf = baidu.swf || {}; - - -/** - * 浏览器支持的flash插件版本 - * @property version 浏览器支持的flash插件版本 - * @grammar baidu.swf.version - * @return {String} 版本号 - * @meta standard - */ -baidu.swf.version = (function () { - var n = navigator; - if (n.plugins && n.mimeTypes.length) { - var plugin = n.plugins["Shockwave Flash"]; - if (plugin && plugin.description) { - return plugin.description - .replace(/([a-zA-Z]|\s)+/, "") - .replace(/(\s)+r/, ".") + ".0"; - } - } else if (window.ActiveXObject && !window.opera) { - for (var i = 12; i >= 2; i--) { - try { - var c = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.' + i); - if (c) { - var version = c.GetVariable("$version"); - return version.replace(/WIN/g,'').replace(/,/g,'.'); - } - } catch(e) {} - } - } -})(); - -/** - * 操作字符串的方法 - * @namespace baidu.string - */ -baidu.string = baidu.string || {}; - - -/** - * 对目标字符串进行html编码 - * @name baidu.string.encodeHTML - * @function - * @grammar baidu.string.encodeHTML(source) - * @param {string} source 目标字符串 - * @remark - * 编码字符有5个:&<>"' - * @shortcut encodeHTML - * @meta standard - * @see baidu.string.decodeHTML - * - * @returns {string} html编码后的字符串 - */ -baidu.string.encodeHTML = function (source) { - return String(source) - .replace(/&/g,'&') - .replace(//g,'>') - .replace(/"/g, """) - .replace(/'/g, "'"); -}; - -baidu.encodeHTML = baidu.string.encodeHTML; - -/** - * 创建flash对象的html字符串 - * @name baidu.swf.createHTML - * @function - * @grammar baidu.swf.createHTML(options) - * - * @param {Object} options 创建flash的选项参数 - * @param {string} options.id 要创建的flash的标识 - * @param {string} options.url flash文件的url - * @param {String} options.errorMessage 未安装flash player或flash player版本号过低时的提示 - * @param {string} options.ver 最低需要的flash player版本号 - * @param {string} options.width flash的宽度 - * @param {string} options.height flash的高度 - * @param {string} options.align flash的对齐方式,允许值:middle/left/right/top/bottom - * @param {string} options.base 设置用于解析swf文件中的所有相对路径语句的基本目录或URL - * @param {string} options.bgcolor swf文件的背景色 - * @param {string} options.salign 设置缩放的swf文件在由width和height设置定义的区域内的位置。允许值:l/r/t/b/tl/tr/bl/br - * @param {boolean} options.menu 是否显示右键菜单,允许值:true/false - * @param {boolean} options.loop 播放到最后一帧时是否重新播放,允许值: true/false - * @param {boolean} options.play flash是否在浏览器加载时就开始播放。允许值:true/false - * @param {string} options.quality 设置flash播放的画质,允许值:low/medium/high/autolow/autohigh/best - * @param {string} options.scale 设置flash内容如何缩放来适应设置的宽高。允许值:showall/noborder/exactfit - * @param {string} options.wmode 设置flash的显示模式。允许值:window/opaque/transparent - * @param {string} options.allowscriptaccess 设置flash与页面的通信权限。允许值:always/never/sameDomain - * @param {string} options.allownetworking 设置swf文件中允许使用的网络API。允许值:all/internal/none - * @param {boolean} options.allowfullscreen 是否允许flash全屏。允许值:true/false - * @param {boolean} options.seamlesstabbing 允许设置执行无缝跳格,从而使用户能跳出flash应用程序。该参数只能在安装Flash7及更高版本的Windows中使用。允许值:true/false - * @param {boolean} options.devicefont 设置静态文本对象是否以设备字体呈现。允许值:true/false - * @param {boolean} options.swliveconnect 第一次加载flash时浏览器是否应启动Java。允许值:true/false - * @param {Object} options.vars 要传递给flash的参数,支持JSON或string类型。 - * - * @see baidu.swf.create - * @meta standard - * @returns {string} flash对象的html字符串 - */ -baidu.swf.createHTML = function (options) { - options = options || {}; - var version = baidu.swf.version, - needVersion = options['ver'] || '6.0.0', - vUnit1, vUnit2, i, k, len, item, tmpOpt = {}, - encodeHTML = baidu.string.encodeHTML; - for (k in options) { - tmpOpt[k] = options[k]; - } - options = tmpOpt; - if (version) { - version = version.split('.'); - needVersion = needVersion.split('.'); - for (i = 0; i < 3; i++) { - vUnit1 = parseInt(version[i], 10); - vUnit2 = parseInt(needVersion[i], 10); - if (vUnit2 < vUnit1) { - break; - } else if (vUnit2 > vUnit1) { - return ''; - } - } - } else { - return ''; - } - - var vars = options['vars'], - objProperties = ['classid', 'codebase', 'id', 'width', 'height', 'align']; - options['align'] = options['align'] || 'middle'; - options['classid'] = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'; - options['codebase'] = 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'; - options['movie'] = options['url'] || ''; - delete options['vars']; - delete options['url']; - if ('string' == typeof vars) { - options['flashvars'] = vars; - } else { - var fvars = []; - for (k in vars) { - item = vars[k]; - fvars.push(k + "=" + encodeURIComponent(item)); - } - options['flashvars'] = fvars.join('&'); - } - var str = [''); - var params = { - 'wmode' : 1, - 'scale' : 1, - 'quality' : 1, - 'play' : 1, - 'loop' : 1, - 'menu' : 1, - 'salign' : 1, - 'bgcolor' : 1, - 'base' : 1, - 'allowscriptaccess' : 1, - 'allownetworking' : 1, - 'allowfullscreen' : 1, - 'seamlesstabbing' : 1, - 'devicefont' : 1, - 'swliveconnect' : 1, - 'flashvars' : 1, - 'movie' : 1 - }; - - for (k in options) { - item = options[k]; - k = k.toLowerCase(); - if (params[k] && (item || item === false || item === 0)) { - str.push(''); - } - } - options['src'] = options['movie']; - options['name'] = options['id']; - delete options['id']; - delete options['movie']; - delete options['classid']; - delete options['codebase']; - options['type'] = 'application/x-shockwave-flash'; - options['pluginspage'] = 'http://www.macromedia.com/go/getflashplayer'; - str.push(''); - - return str.join(''); -}; - - -/** - * 在页面中创建一个flash对象 - * @name baidu.swf.create - * @function - * @grammar baidu.swf.create(options[, container]) - * - * @param {Object} options 创建flash的选项参数 - * @param {string} options.id 要创建的flash的标识 - * @param {string} options.url flash文件的url - * @param {String} options.errorMessage 未安装flash player或flash player版本号过低时的提示 - * @param {string} options.ver 最低需要的flash player版本号 - * @param {string} options.width flash的宽度 - * @param {string} options.height flash的高度 - * @param {string} options.align flash的对齐方式,允许值:middle/left/right/top/bottom - * @param {string} options.base 设置用于解析swf文件中的所有相对路径语句的基本目录或URL - * @param {string} options.bgcolor swf文件的背景色 - * @param {string} options.salign 设置缩放的swf文件在由width和height设置定义的区域内的位置。允许值:l/r/t/b/tl/tr/bl/br - * @param {boolean} options.menu 是否显示右键菜单,允许值:true/false - * @param {boolean} options.loop 播放到最后一帧时是否重新播放,允许值: true/false - * @param {boolean} options.play flash是否在浏览器加载时就开始播放。允许值:true/false - * @param {string} options.quality 设置flash播放的画质,允许值:low/medium/high/autolow/autohigh/best - * @param {string} options.scale 设置flash内容如何缩放来适应设置的宽高。允许值:showall/noborder/exactfit - * @param {string} options.wmode 设置flash的显示模式。允许值:window/opaque/transparent - * @param {string} options.allowscriptaccess 设置flash与页面的通信权限。允许值:always/never/sameDomain - * @param {string} options.allownetworking 设置swf文件中允许使用的网络API。允许值:all/internal/none - * @param {boolean} options.allowfullscreen 是否允许flash全屏。允许值:true/false - * @param {boolean} options.seamlesstabbing 允许设置执行无缝跳格,从而使用户能跳出flash应用程序。该参数只能在安装Flash7及更高版本的Windows中使用。允许值:true/false - * @param {boolean} options.devicefont 设置静态文本对象是否以设备字体呈现。允许值:true/false - * @param {boolean} options.swliveconnect 第一次加载flash时浏览器是否应启动Java。允许值:true/false - * @param {Object} options.vars 要传递给flash的参数,支持JSON或string类型。 - * - * @param {HTMLElement|string} [container] flash对象的父容器元素,不传递该参数时在当前代码位置创建flash对象。 - * @meta standard - * @see baidu.swf.createHTML,baidu.swf.getMovie - */ -baidu.swf.create = function (options, target) { - options = options || {}; - var html = baidu.swf.createHTML(options) - || options['errorMessage'] - || ''; - - if (target && 'string' == typeof target) { - target = document.getElementById(target); - } - baidu.dom.insertHTML( target || document.body ,'beforeEnd',html ); -}; -/** - * 判断是否为ie浏览器 - * @name baidu.browser.ie - * @field - * @grammar baidu.browser.ie - * @returns {Number} IE版本号 - */ -baidu.browser.ie = baidu.ie = /msie (\d+\.\d+)/i.test(navigator.userAgent) ? (document.documentMode || + RegExp['\x241']) : undefined; - -/** - * 移除数组中的项 - * @name baidu.array.remove - * @function - * @grammar baidu.array.remove(source, match) - * @param {Array} source 需要移除项的数组 - * @param {Any} match 要移除的项 - * @meta standard - * @see baidu.array.removeAt - * - * @returns {Array} 移除后的数组 - */ -baidu.array.remove = function (source, match) { - var len = source.length; - - while (len--) { - if (len in source && source[len] === match) { - source.splice(len, 1); - } - } - return source; -}; - -/** - * 判断目标参数是否Array对象 - * @name baidu.lang.isArray - * @function - * @grammar baidu.lang.isArray(source) - * @param {Any} source 目标参数 - * @meta standard - * @see baidu.lang.isString,baidu.lang.isObject,baidu.lang.isNumber,baidu.lang.isElement,baidu.lang.isBoolean,baidu.lang.isDate - * - * @returns {boolean} 类型判断结果 - */ -baidu.lang.isArray = function (source) { - return '[object Array]' == Object.prototype.toString.call(source); -}; - - - -/** - * 将一个变量转换成array - * @name baidu.lang.toArray - * @function - * @grammar baidu.lang.toArray(source) - * @param {mix} source 需要转换成array的变量 - * @version 1.3 - * @meta standard - * @returns {array} 转换后的array - */ -baidu.lang.toArray = function (source) { - if (source === null || source === undefined) - return []; - if (baidu.lang.isArray(source)) - return source; - if (typeof source.length !== 'number' || typeof source === 'string' || baidu.lang.isFunction(source)) { - return [source]; - } - if (source.item) { - var l = source.length, array = new Array(l); - while (l--) - array[l] = source[l]; - return array; - } - - return [].slice.call(source); -}; - -/** - * 获得flash对象的实例 - * @name baidu.swf.getMovie - * @function - * @grammar baidu.swf.getMovie(name) - * @param {string} name flash对象的名称 - * @see baidu.swf.create - * @meta standard - * @returns {HTMLElement} flash对象的实例 - */ -baidu.swf.getMovie = function (name) { - var movie = document[name], ret; - return baidu.browser.ie == 9 ? - movie && movie.length ? - (ret = baidu.array.remove(baidu.lang.toArray(movie),function(item){ - return item.tagName.toLowerCase() != "embed"; - })).length == 1 ? ret[0] : ret - : movie - : movie || window[name]; -}; - - -baidu.flash._Base = (function(){ - - var prefix = 'bd__flash__'; - - /** - * 创建一个随机的字符串 - * @private - * @return {String} - */ - function _createString(){ - return prefix + Math.floor(Math.random() * 2147483648).toString(36); - }; - - /** - * 检查flash状态 - * @private - * @param {Object} target flash对象 - * @return {Boolean} - */ - function _checkReady(target){ - if(typeof target !== 'undefined' && typeof target.flashInit !== 'undefined' && target.flashInit()){ - return true; - }else{ - return false; - } - }; - - /** - * 调用之前进行压栈的函数 - * @private - * @param {Array} callQueue 调用队列 - * @param {Object} target flash对象 - * @return {Null} - */ - function _callFn(callQueue, target){ - var result = null; - - callQueue = callQueue.reverse(); - baidu.each(callQueue, function(item){ - result = target.call(item.fnName, item.params); - item.callBack(result); - }); - }; - - /** - * 为传入的匿名函数创建函数名 - * @private - * @param {String|Function} fun 传入的匿名函数或者函数名 - * @return {String} - */ - function _createFunName(fun){ - var name = ''; - - if(baidu.lang.isFunction(fun)){ - name = _createString(); - window[name] = function(){ - fun.apply(window, arguments); - }; - - return name; - }else if(baidu.lang.isString){ - return fun; - } - }; - - /** - * 绘制flash - * @private - * @param {Object} options 创建参数 - * @return {Object} - */ - function _render(options){ - if(!options.id){ - options.id = _createString(); - } - - var container = options.container || ''; - delete(options.container); - - baidu.swf.create(options, container); - - return baidu.swf.getMovie(options.id); - }; - - return function(options, callBack){ - var me = this, - autoRender = (typeof options.autoRender !== 'undefined' ? options.autoRender : true), - createOptions = options.createOptions || {}, - target = null, - isReady = false, - callQueue = [], - timeHandle = null, - callBack = callBack || []; - - /** - * 将flash文件绘制到页面上 - * @public - * @return {Null} - */ - me.render = function(){ - target = _render(createOptions); - - if(callBack.length > 0){ - baidu.each(callBack, function(funName, index){ - callBack[index] = _createFunName(options[funName] || new Function()); - }); - } - me.call('setJSFuncName', [callBack]); - }; - - /** - * 返回flash状态 - * @return {Boolean} - */ - me.isReady = function(){ - return isReady; - }; - - /** - * 调用flash接口的统一入口 - * @param {String} fnName 调用的函数名 - * @param {Array} params 传入的参数组成的数组,若不许要参数,需传入空数组 - * @param {Function} [callBack] 异步调用后将返回值作为参数的调用回调函数,如无返回值,可以不传入此参数 - * @return {Null} - */ - me.call = function(fnName, params, callBack){ - if(!fnName) return null; - callBack = callBack || new Function(); - - var result = null; - - if(isReady){ - result = target.call(fnName, params); - callBack(result); - }else{ - callQueue.push({ - fnName: fnName, - params: params, - callBack: callBack - }); - - (!timeHandle) && (timeHandle = setInterval(_check, 200)); - } - }; - - /** - * 为传入的匿名函数创建函数名 - * @public - * @param {String|Function} fun 传入的匿名函数或者函数名 - * @return {String} - */ - me.createFunName = function(fun){ - return _createFunName(fun); - }; - - /** - * 检查flash是否ready, 并进行调用 - * @private - * @return {Null} - */ - function _check(){ - if(_checkReady(target)){ - clearInterval(timeHandle); - timeHandle = null; - _call(); - - isReady = true; - } - }; - - /** - * 调用之前进行压栈的函数 - * @private - * @return {Null} - */ - function _call(){ - _callFn(callQueue, target); - callQueue = []; - } - - autoRender && me.render(); - }; -})(); - - - -/** - * 创建flash based imageUploader - * @class - * @grammar baidu.flash.imageUploader(options) - * @param {Object} createOptions 创建flash时需要的参数,请参照baidu.swf.create文档 - * @config {Object} vars 创建imageUploader时所需要的参数 - * @config {Number} vars.gridWidth 每一个预览图片所占的宽度,应该为flash寛的整除 - * @config {Number} vars.gridHeight 每一个预览图片所占的高度,应该为flash高的整除 - * @config {Number} vars.picWidth 单张预览图片的宽度 - * @config {Number} vars.picHeight 单张预览图片的高度 - * @config {String} vars.uploadDataFieldName POST请求中图片数据的key,默认值'picdata' - * @config {String} vars.picDescFieldName POST请求中图片描述的key,默认值'picDesc' - * @config {Number} vars.maxSize 文件的最大体积,单位'MB' - * @config {Number} vars.compressSize 上传前如果图片体积超过该值,会先压缩 - * @config {Number} vars.maxNum:32 最大上传多少个文件 - * @config {Number} vars.compressLength 能接受的最大边长,超过该值会等比压缩 - * @config {String} vars.url 上传的url地址 - * @config {Number} vars.mode mode == 0时,是使用滚动条,mode == 1时,拉伸flash, 默认值为0 - * @see baidu.swf.createHTML - * @param {String} backgroundUrl 背景图片路径 - * @param {String} listBacgroundkUrl 布局控件背景 - * @param {String} buttonUrl 按钮图片不背景 - * @param {String|Function} selectFileCallback 选择文件的回调 - * @param {String|Function} exceedFileCallback文件超出限制的最大体积时的回调 - * @param {String|Function} deleteFileCallback 删除文件的回调 - * @param {String|Function} startUploadCallback 开始上传某个文件时的回调 - * @param {String|Function} uploadCompleteCallback 某个文件上传完成的回调 - * @param {String|Function} uploadErrorCallback 某个文件上传失败的回调 - * @param {String|Function} allCompleteCallback 全部上传完成时的回调 - * @param {String|Function} changeFlashHeight 改变Flash的高度,mode==1的时候才有用 - */ -baidu.flash.imageUploader = baidu.flash.imageUploader || function(options){ - - var me = this, - options = options || {}, - _flash = new baidu.flash._Base(options, [ - 'selectFileCallback', - 'exceedFileCallback', - 'deleteFileCallback', - 'startUploadCallback', - 'uploadCompleteCallback', - 'uploadErrorCallback', - 'allCompleteCallback', - 'changeFlashHeight' - ]); - /** - * 开始或回复上传图片 - * @public - * @return {Null} - */ - me.upload = function(){ - _flash.call('upload'); - }; - - /** - * 暂停上传图片 - * @public - * @return {Null} - */ - me.pause = function(){ - _flash.call('pause'); - }; - me.addCustomizedParams = function(index,obj){ - _flash.call('addCustomizedParams',[index,obj]); - } -}; - -/** - * 操作原生对象的方法 - * @namespace baidu.object - */ -baidu.object = baidu.object || {}; - - -/** - * 将源对象的所有属性拷贝到目标对象中 - * @author erik - * @name baidu.object.extend - * @function - * @grammar baidu.object.extend(target, source) - * @param {Object} target 目标对象 - * @param {Object} source 源对象 - * @see baidu.array.merge - * @remark - * -1.目标对象中,与源对象key相同的成员将会被覆盖。
    -2.源对象的prototype成员不会拷贝。 - - * @shortcut extend - * @meta standard - * - * @returns {Object} 目标对象 - */ -baidu.extend = -baidu.object.extend = function (target, source) { - for (var p in source) { - if (source.hasOwnProperty(p)) { - target[p] = source[p]; - } - } - - return target; -}; - - - - - -/** - * 创建flash based fileUploader - * @class - * @grammar baidu.flash.fileUploader(options) - * @param {Object} options - * @config {Object} createOptions 创建flash时需要的参数,请参照baidu.swf.create文档 - * @config {String} createOptions.width - * @config {String} createOptions.height - * @config {Number} maxNum 最大可选文件数 - * @config {Function|String} selectFile - * @config {Function|String} exceedMaxSize - * @config {Function|String} deleteFile - * @config {Function|String} uploadStart - * @config {Function|String} uploadComplete - * @config {Function|String} uploadError - * @config {Function|String} uploadProgress - */ -baidu.flash.fileUploader = baidu.flash.fileUploader || function(options){ - var me = this, - options = options || {}; - - options.createOptions = baidu.extend({ - wmod: 'transparent' - },options.createOptions || {}); - - var _flash = new baidu.flash._Base(options, [ - 'selectFile', - 'exceedMaxSize', - 'deleteFile', - 'uploadStart', - 'uploadComplete', - 'uploadError', - 'uploadProgress' - ]); - - _flash.call('setMaxNum', options.maxNum ? [options.maxNum] : [1]); - - /** - * 设置当鼠标移动到flash上时,是否变成手型 - * @public - * @param {Boolean} isCursor - * @return {Null} - */ - me.setHandCursor = function(isCursor){ - _flash.call('setHandCursor', [isCursor || false]); - }; - - /** - * 设置鼠标相应函数名 - * @param {String|Function} fun - */ - me.setMSFunName = function(fun){ - _flash.call('setMSFunName',[_flash.createFunName(fun)]); - }; - - /** - * 执行上传操作 - * @param {String} url 上传的url - * @param {String} fieldName 上传的表单字段名 - * @param {Object} postData 键值对,上传的POST数据 - * @param {Number|Array|null|-1} [index]上传的文件序列 - * Int值上传该文件 - * Array一次串行上传该序列文件 - * -1/null上传所有文件 - * @return {Null} - */ - me.upload = function(url, fieldName, postData, index){ - - if(typeof url !== 'string' || typeof fieldName !== 'string') return null; - if(typeof index === 'undefined') index = -1; - - _flash.call('upload', [url, fieldName, postData, index]); - }; - - /** - * 取消上传操作 - * @public - * @param {Number|-1} index - */ - me.cancel = function(index){ - if(typeof index === 'undefined') index = -1; - _flash.call('cancel', [index]); - }; - - /** - * 删除文件 - * @public - * @param {Number|Array} [index] 要删除的index,不传则全部删除 - * @param {Function} callBack - * */ - me.deleteFile = function(index, callBack){ - - var callBackAll = function(list){ - callBack && callBack(list); - }; - - if(typeof index === 'undefined'){ - _flash.call('deleteFilesAll', [], callBackAll); - return; - }; - - if(typeof index === 'Number') index = [index]; - index.sort(function(a,b){ - return b-a; - }); - baidu.each(index, function(item){ - _flash.call('deleteFileBy', item, callBackAll); - }); - }; - - /** - * 添加文件类型,支持macType - * @public - * @param {Object|Array[Object]} type {description:String, extention:String} - * @return {Null}; - */ - me.addFileType = function(type){ - var type = type || [[]]; - - if(type instanceof Array) type = [type]; - else type = [[type]]; - _flash.call('addFileTypes', type); - }; - - /** - * 设置文件类型,支持macType - * @public - * @param {Object|Array[Object]} type {description:String, extention:String} - * @return {Null}; - */ - me.setFileType = function(type){ - var type = type || [[]]; - - if(type instanceof Array) type = [type]; - else type = [[type]]; - _flash.call('setFileTypes', type); - }; - - /** - * 设置可选文件的数量限制 - * @public - * @param {Number} num - * @return {Null} - */ - me.setMaxNum = function(num){ - _flash.call('setMaxNum', [num]); - }; - - /** - * 设置可选文件大小限制,以兆M为单位 - * @public - * @param {Number} num,0为无限制 - * @return {Null} - */ - me.setMaxSize = function(num){ - _flash.call('setMaxSize', [num]); - }; - - /** - * @public - */ - me.getFileAll = function(callBack){ - _flash.call('getFileAll', [], callBack); - }; - - /** - * @public - * @param {Number} index - * @param {Function} [callBack] - */ - me.getFileByIndex = function(index, callBack){ - _flash.call('getFileByIndex', [], callBack); - }; - - /** - * @public - * @param {Number} index - * @param {function} [callBack] - */ - me.getStatusByIndex = function(index, callBack){ - _flash.call('getStatusByIndex', [], callBack); - }; -}; - -/** - * 使用动态script标签请求服务器资源,包括由服务器端的回调和浏览器端的回调 - * @namespace baidu.sio - */ -baidu.sio = baidu.sio || {}; - -/** - * - * @param {HTMLElement} src script节点 - * @param {String} url script节点的地址 - * @param {String} [charset] 编码 - */ -baidu.sio._createScriptTag = function(scr, url, charset){ - scr.setAttribute('type', 'text/javascript'); - charset && scr.setAttribute('charset', charset); - scr.setAttribute('src', url); - document.getElementsByTagName('head')[0].appendChild(scr); -}; - -/** - * 删除script的属性,再删除script标签,以解决修复内存泄漏的问题 - * - * @param {HTMLElement} src script节点 - */ -baidu.sio._removeScriptTag = function(scr){ - if (scr.clearAttributes) { - scr.clearAttributes(); - } else { - for (var attr in scr) { - if (scr.hasOwnProperty(attr)) { - delete scr[attr]; - } - } - } - if(scr && scr.parentNode){ - scr.parentNode.removeChild(scr); - } - scr = null; -}; - - -/** - * 通过script标签加载数据,加载完成由浏览器端触发回调 - * @name baidu.sio.callByBrowser - * @function - * @grammar baidu.sio.callByBrowser(url, opt_callback, opt_options) - * @param {string} url 加载数据的url - * @param {Function|string} opt_callback 数据加载结束时调用的函数或函数名 - * @param {Object} opt_options 其他可选项 - * @config {String} [charset] script的字符集 - * @config {Integer} [timeOut] 超时时间,超过这个时间将不再响应本请求,并触发onfailure函数 - * @config {Function} [onfailure] timeOut设定后才生效,到达超时时间时触发本函数 - * @remark - * 1、与callByServer不同,callback参数只支持Function类型,不支持string。 - * 2、如果请求了一个不存在的页面,callback函数在IE/opera下也会被调用,因此使用者需要在onsuccess函数中判断数据是否正确加载。 - * @meta standard - * @see baidu.sio.callByServer - */ -baidu.sio.callByBrowser = function (url, opt_callback, opt_options) { - var scr = document.createElement("SCRIPT"), - scriptLoaded = 0, - options = opt_options || {}, - charset = options['charset'], - callback = opt_callback || function(){}, - timeOut = options['timeOut'] || 0, - timer; - scr.onload = scr.onreadystatechange = function () { - if (scriptLoaded) { - return; - } - - var readyState = scr.readyState; - if ('undefined' == typeof readyState - || readyState == "loaded" - || readyState == "complete") { - scriptLoaded = 1; - try { - callback(); - clearTimeout(timer); - } finally { - scr.onload = scr.onreadystatechange = null; - baidu.sio._removeScriptTag(scr); - } - } - }; - - if( timeOut ){ - timer = setTimeout(function(){ - scr.onload = scr.onreadystatechange = null; - baidu.sio._removeScriptTag(scr); - options.onfailure && options.onfailure(); - }, timeOut); - } - - baidu.sio._createScriptTag(scr, url, charset); -}; - -/** - * 通过script标签加载数据,加载完成由服务器端触发回调 - * @name baidu.sio.callByServer - * @function - * @grammar baidu.sio.callByServer(url, callback[, opt_options]) - * @param {string} url 加载数据的url. - * @param {Function|string} callback 服务器端调用的函数或函数名。如果没有指定本参数,将在URL中寻找options['queryField']做为callback的方法名. - * @param {Object} opt_options 加载数据时的选项. - * @config {string} [charset] script的字符集 - * @config {string} [queryField] 服务器端callback请求字段名,默认为callback - * @config {Integer} [timeOut] 超时时间(单位:ms),超过这个时间将不再响应本请求,并触发onfailure函数 - * @config {Function} [onfailure] timeOut设定后才生效,到达超时时间时触发本函数 - * @remark - * 如果url中已经包含key为“options['queryField']”的query项,将会被替换成callback中参数传递或自动生成的函数名。 - * @meta standard - * @see baidu.sio.callByBrowser - */ -baidu.sio.callByServer = /**@function*/function(url, callback, opt_options) { - var scr = document.createElement('SCRIPT'), - prefix = 'bd__cbs__', - callbackName, - callbackImpl, - options = opt_options || {}, - charset = options['charset'], - queryField = options['queryField'] || 'callback', - timeOut = options['timeOut'] || 0, - timer, - reg = new RegExp('(\\?|&)' + queryField + '=([^&]*)'), - matches; - - if (baidu.lang.isFunction(callback)) { - callbackName = prefix + Math.floor(Math.random() * 2147483648).toString(36); - window[callbackName] = getCallBack(0); - } else if(baidu.lang.isString(callback)){ - callbackName = callback; - } else { - if (matches = reg.exec(url)) { - callbackName = matches[2]; - } - } - - if( timeOut ){ - timer = setTimeout(getCallBack(1), timeOut); - } - url = url.replace(reg, '\x241' + queryField + '=' + callbackName); - - if (url.search(reg) < 0) { - url += (url.indexOf('?') < 0 ? '?' : '&') + queryField + '=' + callbackName; - } - baidu.sio._createScriptTag(scr, url, charset); - - /* - * 返回一个函数,用于立即(挂在window上)或者超时(挂在setTimeout中)时执行 - */ - function getCallBack(onTimeOut){ - /*global callbackName, callback, scr, options;*/ - return function(){ - try { - if( onTimeOut ){ - options.onfailure && options.onfailure(); - }else{ - callback.apply(window, arguments); - clearTimeout(timer); - } - window[callbackName] = null; - delete window[callbackName]; - } catch (exception) { - } finally { - baidu.sio._removeScriptTag(scr); - } - } - } -}; - -/** - * 通过请求一个图片的方式令服务器存储一条日志 - * @function - * @grammar baidu.sio.log(url) - * @param {string} url 要发送的地址. - * @author: int08h,leeight - */ -baidu.sio.log = function(url) { - var img = new Image(), - key = 'tangram_sio_log_' + Math.floor(Math.random() * - 2147483648).toString(36); - window[key] = img; - - img.onload = img.onerror = img.onabort = function() { - img.onload = img.onerror = img.onabort = null; - - window[key] = null; - img = null; - }; - img.src = url; -}; - - - -/* - * Tangram - * Copyright 2009 Baidu Inc. All rights reserved. - * - * path: baidu/json.js - * author: erik - * version: 1.1.0 - * date: 2009/12/02 - */ - - -/** - * 操作json对象的方法 - * @namespace baidu.json - */ -baidu.json = baidu.json || {}; -/* - * Tangram - * Copyright 2009 Baidu Inc. All rights reserved. - * - * path: baidu/json/parse.js - * author: erik, berg - * version: 1.2 - * date: 2009/11/23 - */ - - - -/** - * 将字符串解析成json对象。注:不会自动祛除空格 - * @name baidu.json.parse - * @function - * @grammar baidu.json.parse(data) - * @param {string} source 需要解析的字符串 - * @remark - * 该方法的实现与ecma-262第五版中规定的JSON.parse不同,暂时只支持传入一个参数。后续会进行功能丰富。 - * @meta standard - * @see baidu.json.stringify,baidu.json.decode - * - * @returns {JSON} 解析结果json对象 - */ -baidu.json.parse = function (data) { - //2010/12/09:更新至不使用原生parse,不检测用户输入是否正确 - return (new Function("return (" + data + ")"))(); -}; -/* - * Tangram - * Copyright 2009 Baidu Inc. All rights reserved. - * - * path: baidu/json/decode.js - * author: erik, cat - * version: 1.3.4 - * date: 2010/12/23 - */ - - - -/** - * 将字符串解析成json对象,为过时接口,今后会被baidu.json.parse代替 - * @name baidu.json.decode - * @function - * @grammar baidu.json.decode(source) - * @param {string} source 需要解析的字符串 - * @meta out - * @see baidu.json.encode,baidu.json.parse - * - * @returns {JSON} 解析结果json对象 - */ -baidu.json.decode = baidu.json.parse; -/* - * Tangram - * Copyright 2009 Baidu Inc. All rights reserved. - * - * path: baidu/json/stringify.js - * author: erik - * version: 1.1.0 - * date: 2010/01/11 - */ - - - -/** - * 将json对象序列化 - * @name baidu.json.stringify - * @function - * @grammar baidu.json.stringify(value) - * @param {JSON} value 需要序列化的json对象 - * @remark - * 该方法的实现与ecma-262第五版中规定的JSON.stringify不同,暂时只支持传入一个参数。后续会进行功能丰富。 - * @meta standard - * @see baidu.json.parse,baidu.json.encode - * - * @returns {string} 序列化后的字符串 - */ -baidu.json.stringify = (function () { - /** - * 字符串处理时需要转义的字符表 - * @private - */ - var escapeMap = { - "\b": '\\b', - "\t": '\\t', - "\n": '\\n', - "\f": '\\f', - "\r": '\\r', - '"' : '\\"', - "\\": '\\\\' - }; - - /** - * 字符串序列化 - * @private - */ - function encodeString(source) { - if (/["\\\x00-\x1f]/.test(source)) { - source = source.replace( - /["\\\x00-\x1f]/g, - function (match) { - var c = escapeMap[match]; - if (c) { - return c; - } - c = match.charCodeAt(); - return "\\u00" - + Math.floor(c / 16).toString(16) - + (c % 16).toString(16); - }); - } - return '"' + source + '"'; - } - - /** - * 数组序列化 - * @private - */ - function encodeArray(source) { - var result = ["["], - l = source.length, - preComma, i, item; - - for (i = 0; i < l; i++) { - item = source[i]; - - switch (typeof item) { - case "undefined": - case "function": - case "unknown": - break; - default: - if(preComma) { - result.push(','); - } - result.push(baidu.json.stringify(item)); - preComma = 1; - } - } - result.push("]"); - return result.join(""); - } - - /** - * 处理日期序列化时的补零 - * @private - */ - function pad(source) { - return source < 10 ? '0' + source : source; - } - - /** - * 日期序列化 - * @private - */ - function encodeDate(source){ - return '"' + source.getFullYear() + "-" - + pad(source.getMonth() + 1) + "-" - + pad(source.getDate()) + "T" - + pad(source.getHours()) + ":" - + pad(source.getMinutes()) + ":" - + pad(source.getSeconds()) + '"'; - } - - return function (value) { - switch (typeof value) { - case 'undefined': - return 'undefined'; - - case 'number': - return isFinite(value) ? String(value) : "null"; - - case 'string': - return encodeString(value); - - case 'boolean': - return String(value); - - default: - if (value === null) { - return 'null'; - } else if (value instanceof Array) { - return encodeArray(value); - } else if (value instanceof Date) { - return encodeDate(value); - } else { - var result = ['{'], - encode = baidu.json.stringify, - preComma, - item; - - for (var key in value) { - if (Object.prototype.hasOwnProperty.call(value, key)) { - item = value[key]; - switch (typeof item) { - case 'undefined': - case 'unknown': - case 'function': - break; - default: - if (preComma) { - result.push(','); - } - preComma = 1; - result.push(encode(key) + ':' + encode(item)); - } - } - } - result.push('}'); - return result.join(''); - } - } - }; -})(); -/* - * Tangram - * Copyright 2009 Baidu Inc. All rights reserved. - * - * path: baidu/json/encode.js - * author: erik, cat - * version: 1.3.4 - * date: 2010/12/23 - */ - - - -/** - * 将json对象序列化,为过时接口,今后会被baidu.json.stringify代替 - * @name baidu.json.encode - * @function - * @grammar baidu.json.encode(value) - * @param {JSON} value 需要序列化的json对象 - * @meta out - * @see baidu.json.decode,baidu.json.stringify - * - * @returns {string} 序列化后的字符串 - */ -baidu.json.encode = baidu.json.stringify; diff --git a/public/static/admin/UEditor/dialogs/wordimage/wordimage.html b/public/static/admin/UEditor/dialogs/wordimage/wordimage.html deleted file mode 100644 index 6cf6067..0000000 --- a/public/static/admin/UEditor/dialogs/wordimage/wordimage.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - -
    -
    - -
    -
    -
    -
    -
    - -
    - : -
    -
    -
    - - - - - - \ No newline at end of file diff --git a/public/static/admin/UEditor/dialogs/wordimage/wordimage.js b/public/static/admin/UEditor/dialogs/wordimage/wordimage.js deleted file mode 100644 index 98f3a22..0000000 --- a/public/static/admin/UEditor/dialogs/wordimage/wordimage.js +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Created by JetBrains PhpStorm. - * User: taoqili - * Date: 12-1-30 - * Time: 下午12:50 - * To change this template use File | Settings | File Templates. - */ - - - -var wordImage = {}; -//(function(){ -var g = baidu.g, - flashObj,flashContainer; - -wordImage.init = function(opt, callbacks) { - showLocalPath("localPath"); - //createCopyButton("clipboard","localPath"); - createFlashUploader(opt, callbacks); - addUploadListener(); - addOkListener(); -}; - -function hideFlash(){ - flashObj = null; - flashContainer.innerHTML = ""; -} -function addOkListener() { - dialog.onok = function() { - if (!imageUrls.length) return; - var urlPrefix = editor.getOpt('imageUrlPrefix'), - images = domUtils.getElementsByTagName(editor.document,"img"); - editor.fireEvent('saveScene'); - for (var i = 0,img; img = images[i++];) { - var src = img.getAttribute("word_img"); - if (!src) continue; - for (var j = 0,url; url = imageUrls[j++];) { - if (src.indexOf(url.original.replace(" ","")) != -1) { - img.src = urlPrefix + url.url; - img.setAttribute("_src", urlPrefix + url.url); //同时修改"_src"属性 - img.setAttribute("title",url.title); - domUtils.removeAttributes(img, ["word_img","style","width","height"]); - editor.fireEvent("selectionchange"); - break; - } - } - } - editor.fireEvent('saveScene'); - hideFlash(); - }; - dialog.oncancel = function(){ - hideFlash(); - } -} - -/** - * 绑定开始上传事件 - */ -function addUploadListener() { - g("upload").onclick = function () { - flashObj.upload(); - this.style.display = "none"; - }; -} - -function showLocalPath(id) { - //单张编辑 - var img = editor.selection.getRange().getClosedNode(); - var images = editor.execCommand('wordimage'); - if(images.length==1 || img && img.tagName == 'IMG'){ - g(id).value = images[0]; - return; - } - var path = images[0]; - var leftSlashIndex = path.lastIndexOf("/")||0, //不同版本的doc和浏览器都可能影响到这个符号,故直接判断两种 - rightSlashIndex = path.lastIndexOf("\\")||0, - separater = leftSlashIndex > rightSlashIndex ? "/":"\\" ; - - path = path.substring(0, path.lastIndexOf(separater)+1); - g(id).value = path; -} - -function createFlashUploader(opt, callbacks) { - //由于lang.flashI18n是静态属性,不可以直接进行修改,否则会影响到后续内容 - var i18n = utils.extend({},lang.flashI18n); - //处理图片资源地址的编码,补全等问题 - for(var i in i18n){ - if(!(i in {"lang":1,"uploadingTF":1,"imageTF":1,"textEncoding":1}) && i18n[i]){ - i18n[i] = encodeURIComponent(editor.options.langPath + editor.options.lang + "/images/" + i18n[i]); - } - } - opt = utils.extend(opt,i18n,false); - var option = { - createOptions:{ - id:'flash', - url:opt.flashUrl, - width:opt.width, - height:opt.height, - errorMessage:lang.flashError, - wmode:browser.safari ? 'transparent' : 'window', - ver:'10.0.0', - vars:opt, - container:opt.container - } - }; - - option = extendProperty(callbacks, option); - flashObj = new baidu.flash.imageUploader(option); - flashContainer = $G(opt.container); -} - -function extendProperty(fromObj, toObj) { - for (var i in fromObj) { - if (!toObj[i]) { - toObj[i] = fromObj[i]; - } - } - return toObj; -} - -//})(); - -function getPasteData(id) { - baidu.g("msg").innerHTML = lang.copySuccess + "
    "; - setTimeout(function() { - baidu.g("msg").innerHTML = ""; - }, 5000); - return baidu.g(id).value; -} - -function createCopyButton(id, dataFrom) { - baidu.swf.create({ - id:"copyFlash", - url:"fClipboard_ueditor.swf", - width:"58", - height:"25", - errorMessage:"", - bgColor:"#CBCBCB", - wmode:"transparent", - ver:"10.0.0", - vars:{ - tid:dataFrom - } - }, id - ); - - var clipboard = baidu.swf.getMovie("copyFlash"); - var clipinterval = setInterval(function() { - if (clipboard && clipboard.flashInit) { - clearInterval(clipinterval); - clipboard.setHandCursor(true); - clipboard.setContentFuncName("getPasteData"); - //clipboard.setMEFuncName("mouseEventHandler"); - } - }, 500); -} -createCopyButton("clipboard", "localPath"); \ No newline at end of file diff --git a/public/static/admin/UEditor/lang/en/en.js b/public/static/admin/UEditor/lang/en/en.js deleted file mode 100644 index c7e22f5..0000000 --- a/public/static/admin/UEditor/lang/en/en.js +++ /dev/null @@ -1,684 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: taoqili - * Date: 12-6-12 - * Time: 下午6:57 - * To change this template use File | Settings | File Templates. - */ -UE.I18N['en'] = { - 'labelMap':{ - 'anchor':'Anchor', 'undo':'Undo', 'redo':'Redo', 'bold':'Bold', 'indent':'Indent', 'snapscreen':'SnapScreen', - 'italic':'Italic', 'underline':'Underline', 'strikethrough':'Strikethrough', 'subscript':'SubScript','fontborder':'text border', - 'superscript':'SuperScript', 'formatmatch':'Format Match', 'source':'Source', 'blockquote':'BlockQuote', - 'pasteplain':'PastePlain', 'selectall':'SelectAll', 'print':'Print', 'preview':'Preview', - 'horizontal':'Horizontal', 'removeformat':'RemoveFormat', 'time':'Time', 'date':'Date', - 'unlink':'Unlink', 'insertrow':'InsertRow', 'insertcol':'InsertCol', 'mergeright':'MergeRight', 'mergedown':'MergeDown', - 'deleterow':'DeleteRow', 'deletecol':'DeleteCol', 'splittorows':'SplitToRows','insertcode':'insert code', - 'splittocols':'SplitToCols', 'splittocells':'SplitToCells','deletecaption':'DeleteCaption','inserttitle':'InsertTitle', - 'mergecells':'MergeCells', 'deletetable':'DeleteTable', 'cleardoc':'Clear', 'insertparagraphbeforetable':"InsertParagraphBeforeTable", - 'fontfamily':'FontFamily', 'fontsize':'FontSize', 'paragraph':'Paragraph','simpleupload':'Single Image','insertimage':'Multi Image','edittable':'Edit Table', 'edittd':'Edit Td','link':'Link', - 'emotion':'Emotion', 'spechars':'Spechars', 'searchreplace':'SearchReplace', 'map':'BaiduMap', 'gmap':'GoogleMap', - 'insertvideo':'Video', 'help':'Help', 'justifyleft':'JustifyLeft', 'justifyright':'JustifyRight', 'justifycenter':'JustifyCenter', - 'justifyjustify':'Justify', 'forecolor':'FontColor', 'backcolor':'BackColor', 'insertorderedlist':'OL', - 'insertunorderedlist':'UL', 'fullscreen':'FullScreen', 'directionalityltr':'EnterFromLeft', 'directionalityrtl':'EnterFromRight', - 'rowspacingtop':'RowSpacingTop', 'rowspacingbottom':'RowSpacingBottom', 'pagebreak':'PageBreak', 'insertframe':'Iframe', 'imagenone':'Default', - 'imageleft':'ImageLeft', 'imageright':'ImageRight', 'attachment':'Attachment', 'imagecenter':'ImageCenter', 'wordimage':'WordImage', - 'lineheight':'LineHeight','edittip':'EditTip','customstyle':'CustomStyle', 'scrawl':'Scrawl', 'autotypeset':'AutoTypeset', - 'webapp':'WebAPP', 'touppercase':'UpperCase', 'tolowercase':'LowerCase','template':'Template','background':'Background','inserttable':'InsertTable', - 'music':'Music', 'charts': 'charts','drafts': 'Load from Drafts' - }, - 'insertorderedlist':{ - 'num':'1,2,3...', - 'num1':'1),2),3)...', - 'num2':'(1),(2),(3)...', - 'cn':'一,二,三....', - 'cn1':'一),二),三)....', - 'cn2':'(一),(二),(三)....', - 'decimal':'1,2,3...', - 'lower-alpha':'a,b,c...', - 'lower-roman':'i,ii,iii...', - 'upper-alpha':'A,B,C...', - 'upper-roman':'I,II,III...' - }, - 'insertunorderedlist':{ - 'circle':'○ Circle', - 'disc':'● Circle dot', - 'square':'■ Rectangle ', - 'dash' :'- Dash', - 'dot' : '。dot' - }, - 'paragraph':{'p':'Paragraph', 'h1':'Title 1', 'h2':'Title 2', 'h3':'Title 3', 'h4':'Title 4', 'h5':'Title 5', 'h6':'Title 6'}, - 'fontfamily':{ - 'songti':'Sim Sun', - 'kaiti':'Sim Kai', - 'heiti':'Sim Hei', - 'lishu':'Sim Li', - 'yahei': 'Microsoft YaHei', - 'andaleMono':'Andale Mono', - 'arial': 'Arial', - 'arialBlack':'Arial Black', - 'comicSansMs':'Comic Sans MS', - 'impact':'Impact', - 'timesNewRoman':'Times New Roman' - }, - 'customstyle':{ - 'tc':'Title center', - 'tl':'Title left', - 'im':'Important', - 'hi':'Highlight' - }, - 'autoupload': { - 'exceedSizeError': 'File Size Exceed', - 'exceedTypeError': 'File Type Not Allow', - 'jsonEncodeError': 'Server Return Format Error', - 'loading':"loading...", - 'loadError':"load error", - 'errorLoadConfig': 'Server config not loaded, upload can not work.', - }, - 'simpleupload':{ - 'exceedSizeError': 'File Size Exceed', - 'exceedTypeError': 'File Type Not Allow', - 'jsonEncodeError': 'Server Return Format Error', - 'loading':"loading...", - 'loadError':"load error", - 'errorLoadConfig': 'Server config not loaded, upload can not work.', - }, - 'elementPathTip':"Path", - 'wordCountTip':"Word Count", - 'wordCountMsg':'{#count} characters entered,{#leave} left. ', - 'wordOverFlowMsg':'The number of characters has exceeded allowable maximum values, the server may refuse to save!', - 'ok':"OK", - 'cancel':"Cancel", - 'closeDialog':"closeDialog", - 'tableDrag':"You must import the file uiUtils.js before drag! ", - 'autofloatMsg':"The plugin AutoFloat depends on EditorUI!", - 'loadconfigError': 'Get server config error.', - 'loadconfigFormatError': 'Server config format error.', - 'loadconfigHttpError': 'Get server config http error.', - 'snapScreen_plugin':{ - 'browserMsg':"Only IE supported!", - 'callBackErrorMsg':"The callback data is wrong,please check the config!", - 'uploadErrorMsg':"Upload error,please check your server environment! " - }, - 'insertcode':{ - 'as3':'ActionScript 3', - 'bash':'Bash/Shell', - 'cpp':'C/C++', - 'css':'CSS', - 'cf':'ColdFusion', - 'c#':'C#', - 'delphi':'Delphi', - 'diff':'Diff', - 'erlang':'Erlang', - 'groovy':'Groovy', - 'html':'HTML', - 'java':'Java', - 'jfx':'JavaFX', - 'js':'JavaScript', - 'pl':'Perl', - 'php':'PHP', - 'plain':'Plain Text', - 'ps':'PowerShell', - 'python':'Python', - 'ruby':'Ruby', - 'scala':'Scala', - 'sql':'SQL', - 'vb':'Visual Basic', - 'xml':'XML' - }, - 'confirmClear':"Do you confirm to clear the Document?", - 'contextMenu':{ - 'delete':"Delete", - 'selectall':"Select all", - 'deletecode':"Delete Code", - 'cleardoc':"Clear Document", - 'confirmclear':"Do you confirm to clear the Document?", - 'unlink':"Unlink", - 'paragraph':"Paragraph", - 'edittable':"Table property", - 'aligncell':'Align cell', - 'aligntable':'Table alignment', - 'tableleft':'Left float', - 'tablecenter':'Center', - 'tableright':'Right float', - 'aligntd':'Cell alignment', - 'edittd':"Cell property", - 'setbordervisible':'set table edge visible', - 'table':"Table", - 'justifyleft':'Justify Left', - 'justifyright':'Justify Right', - 'justifycenter':'Justify Center', - 'justifyjustify':'Default', - 'deletetable':"Delete table", - 'insertparagraphbefore':"InsertedBeforeLine", - 'insertparagraphafter':'InsertedAfterLine', - 'inserttable':'Insert table', - 'insertcaption':'Insert caption', - 'deletecaption':'Delete Caption', - 'inserttitle':'Insert Title', - 'deletetitle':'Delete Title', - 'inserttitlecol':'Insert Title Col', - 'deletetitlecol':'Delete Title Col', - 'averageDiseRow':'AverageDise Row', - 'averageDisCol':'AverageDis Col', - 'deleterow':"Delete row", - 'deletecol':"Delete col", - 'insertrow':"Insert row", - 'insertcol':"Insert col", - 'insertrownext':'Insert Row Next', - 'insertcolnext':'Insert Col Next', - 'mergeright':"Merge right", - 'mergeleft':"Merge left", - 'mergedown':"Merge down", - 'mergecells':"Merge cells", - 'splittocells':"Split to cells", - 'splittocols':"Split to Cols", - 'splittorows':"Split to Rows", - 'tablesort':'Table sorting', - 'enablesort':'Sorting Enable', - 'disablesort':'Sorting Disable', - 'reversecurrent':'Reverse current', - 'orderbyasc':'Order By ASCII', - 'reversebyasc':'Reverse By ASCII', - 'orderbynum':'Order By Num', - 'reversebynum':'Reverse By Num', - 'borderbk':'Border shading', - 'setcolor':'interlaced color', - 'unsetcolor':'Cancel interlacedcolor', - 'setbackground':'Background interlaced', - 'unsetbackground':'Cancel Bk interlaced', - 'redandblue':'Blue and red', - 'threecolorgradient':'Three-color gradient', - 'copy':"Copy(Ctrl + c)", - 'copymsg':"Browser does not support. Please use 'Ctrl + c' instead!", - 'paste':"Paste(Ctrl + v)", - 'pastemsg':"Browser does not support. Please use 'Ctrl + v' instead!" - }, - 'copymsg': "Browser does not support. Please use 'Ctrl + c' instead!", - 'pastemsg': "Browser does not support. Please use 'Ctrl + v' instead!", - 'anthorMsg':"Link", - 'clearColor':'Clear', - 'standardColor':'Standard color', - 'themeColor':'Theme color', - 'property':'Property', - 'default':'Default', - 'modify':'Modify', - 'justifyleft':'Justify Left', - 'justifyright':'Justify Right', - 'justifycenter':'Justify Center', - 'justify':'Default', - 'clear':'Clear', - 'anchorMsg':'Anchor', - 'delete':'Delete', - 'clickToUpload':"Click to upload", - 'unset':'Language hasn\'t been set!', - 't_row':'row', - 't_col':'col', - 'pasteOpt':'Paste Option', - 'pasteSourceFormat':"Keep Source Formatting", - 'tagFormat':'Keep tag', - 'pasteTextFormat':'Keep Text only', - 'more':'More', - 'autoTypeSet':{ - 'mergeLine':"Merge empty line", - 'delLine':"Del empty line", - 'removeFormat':"Remove format", - 'indent':"Indent", - 'alignment':"Alignment", - 'imageFloat':"Image float", - 'removeFontsize':"Remove font size", - 'removeFontFamily':"Remove fontFamily", - 'removeHtml':"Remove redundant HTML code", - 'pasteFilter':"Paste filter", - 'run':"Done", - 'symbol':'Symbol Conversion', - 'bdc2sb':'Full-width to Half-width', - 'tobdc':'Half-width to Full-width' - }, - - 'background':{ - 'static':{ - 'lang_background_normal':'Normal', - 'lang_background_local':'Online', - 'lang_background_set':'Background Set', - 'lang_background_none':'No Background', - 'lang_background_colored':'Colored Background', - 'lang_background_color':'Color Set', - 'lang_background_netimg':'Net-Image', - 'lang_background_align':'Align Type', - 'lang_background_position':'Position', - 'repeatType':{'options':["Center", "Repeat-x", "Repeat-y", "Tile","Custom"]} - }, - 'noUploadImage':"No pictures has been uploaded!", - 'toggleSelect':'Change the active state by click!\n Image Size: ' - }, - //===============dialog i18N======================= - 'insertimage':{ - 'static':{ - 'lang_tab_remote':"Insert", - 'lang_tab_upload':"Local", - 'lang_tab_online':"Manager", - 'lang_tab_search':"Search", - 'lang_input_url':"Address:", - 'lang_input_size':"Size:", - 'lang_input_width':"Width", - 'lang_input_height':"Height", - 'lang_input_border':"Border:", - 'lang_input_vhspace':"Margins:", - 'lang_input_title':"Title:", - 'lang_input_align':'Image Float Style:', - 'lang_imgLoading':"Loading...", - 'lang_start_upload':"Start Upload", - 'lock':{'title':"Lock rate"}, - 'searchType':{'title':"ImageType", 'options':["News", "Wallpaper", "emotions", "photo"]}, - 'searchTxt':{'value':"Enter the search keyword!"}, - 'searchBtn':{'value':"Search"}, - 'searchReset':{'value':"Clear"}, - 'noneAlign':{'title':'None Float'}, - 'leftAlign':{'title':'Left Float'}, - 'rightAlign':{'title':'Right Float'}, - 'centerAlign':{'title':'Center In A Line'} - }, - 'uploadSelectFile':'Select File', - 'uploadAddFile':'Add File', - 'uploadStart':'Start Upload', - 'uploadPause':'Pause Upload', - 'uploadContinue':'Continue Upload', - 'uploadRetry':'Retry Upload', - 'uploadDelete':'Delete', - 'uploadTurnLeft':'Turn Left', - 'uploadTurnRight':'Turn Right', - 'uploadPreview':'Doing Preview', - 'uploadNoPreview':'Can Not Preview', - 'updateStatusReady': 'Selected _ pictures, total _KB.', - 'updateStatusConfirm': '_ uploaded successfully and _ upload failed', - 'updateStatusFinish': 'Total _ pictures (_KB), _ uploaded successfully', - 'updateStatusError': ' and _ upload failed', - 'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', - 'errorLoadConfig': 'Server config not loaded, upload can not work.', - 'errorExceedSize':'File Size Exceed', - 'errorFileType':'File Type Not Allow', - 'errorInterrupt':'File Upload Interrupted', - 'errorUploadRetry':'Upload Error, Please Retry.', - 'errorHttp':'Http Error', - 'errorServerUpload':'Server Result Error.', - 'remoteLockError':"Cannot Lock the Proportion between width and height", - 'numError':"Please enter the correct Num. e.g 123,400", - 'imageUrlError':"The image format may be wrong!", - 'imageLoadError':"Error,please check the network or URL!", - 'searchRemind':"Enter the search keyword!", - 'searchLoading':"Image is loading,please wait...", - 'searchRetry':" Sorry,can't find the image,please try again!" - }, - 'attachment':{ - 'static':{ - 'lang_tab_upload': 'Upload', - 'lang_tab_online': 'Online', - 'lang_start_upload':"Start upload", - 'lang_drop_remind':"You can drop files here, a single maximum of 300 files" - }, - 'uploadSelectFile':'Select File', - 'uploadAddFile':'Add File', - 'uploadStart':'Start Upload', - 'uploadPause':'Pause Upload', - 'uploadContinue':'Continue Upload', - 'uploadRetry':'Retry Upload', - 'uploadDelete':'Delete', - 'uploadTurnLeft':'Turn Left', - 'uploadTurnRight':'Turn Right', - 'uploadPreview':'Doing Preview', - 'updateStatusReady': 'Selected _ files, total _KB.', - 'updateStatusConfirm': '_ uploaded successfully and _ upload failed', - 'updateStatusFinish': 'Total _ files (_KB), _ uploaded successfully', - 'updateStatusError': ' and _ upload failed', - 'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', - 'errorLoadConfig': 'Server config not loaded, upload can not work.', - 'errorExceedSize':'File Size Exceed', - 'errorFileType':'File Type Not Allow', - 'errorInterrupt':'File Upload Interrupted', - 'errorUploadRetry':'Upload Error, Please Retry.', - 'errorHttp':'Http Error', - 'errorServerUpload':'Server Result Error.' - }, - - 'insertvideo':{ - 'static':{ - 'lang_tab_insertV':"Video", - 'lang_tab_searchV':"Search", - 'lang_tab_uploadV':"Upload", - 'lang_video_url':" URL ", - 'lang_video_size':"Video Size", - 'lang_videoW':"Width", - 'lang_videoH':"Height", - 'lang_alignment':"Alignment", - 'videoSearchTxt':{'value':"Enter the search keyword!"}, - 'videoType':{'options':["All", "Hot", "Entertainment", "Funny", "Sports", "Science", "variety"]}, - 'videoSearchBtn':{'value':"Search in Baidu"}, - 'videoSearchReset':{'value':"Clear result"}, - - 'lang_input_fileStatus':' No file uploaded!', - 'startUpload':{'style':"background:url(upload.png) no-repeat;"}, - - 'lang_upload_size':"Video Size", - 'lang_upload_width':"Width", - 'lang_upload_height':"Height", - 'lang_upload_alignment':"Alignment", - 'lang_format_advice':"Recommends mp4 format." - }, - 'numError':"Please enter the correct Num. e.g 123,400", - 'floatLeft':"Float left", - 'floatRight':"Float right", - 'default':"Default", - 'block':"Display in block", - 'urlError':"The video url format may be wrong!", - 'loading':"  The video is loading, please wait…", - 'clickToSelect':"Click to select", - 'goToSource':'Visit source video ', - 'noVideo':"    Sorry,can't find the video,please try again!", - - 'browseFiles':'Open files', - 'uploadSuccess':'Upload Successful!', - 'delSuccessFile':'Remove from the success of the queue', - 'delFailSaveFile':'Remove the save failed file', - 'statusPrompt':' file(s) uploaded! ', - 'flashVersionError':'The current Flash version is too low, please update FlashPlayer,then try again!', - 'flashLoadingError':'The Flash failed loading! Please check the path or network state', - 'fileUploadReady':'Wait for uploading...', - 'delUploadQueue':'Remove from the uploading queue ', - 'limitPrompt1':'Can not choose more than single', - 'limitPrompt2':'file(s)!Please choose again!', - 'delFailFile':'Remove failure file', - 'fileSizeLimit':'File size exceeds the limit!', - 'emptyFile':'Can not upload an empty file!', - 'fileTypeError':'File type error!', - 'unknownError':'Unknown error!', - 'fileUploading':'Uploading,please wait...', - 'cancelUpload':'Cancel upload', - 'netError':'Network error', - 'failUpload':'Upload failed', - 'serverIOError':'Server IO error!', - 'noAuthority':'No Permission!', - 'fileNumLimit':'Upload limit to the number', - 'failCheck':'Authentication fails, the upload is skipped!', - 'fileCanceling':'Cancel, please wait...', - 'stopUploading':'Upload has stopped...', - - 'uploadSelectFile':'Select File', - 'uploadAddFile':'Add File', - 'uploadStart':'Start Upload', - 'uploadPause':'Pause Upload', - 'uploadContinue':'Continue Upload', - 'uploadRetry':'Retry Upload', - 'uploadDelete':'Delete', - 'uploadTurnLeft':'Turn Left', - 'uploadTurnRight':'Turn Right', - 'uploadPreview':'Doing Preview', - 'updateStatusReady': 'Selected _ files, total _KB.', - 'updateStatusConfirm': '_ uploaded successfully and _ upload failed', - 'updateStatusFinish': 'Total _ files (_KB), _ uploaded successfully', - 'updateStatusError': ' and _ upload failed', - 'errorNotSupport': 'WebUploader does not support the browser you are using. Please upgrade your browser or flash player', - 'errorLoadConfig': 'Server config not loaded, upload can not work.', - 'errorExceedSize':'File Size Exceed', - 'errorFileType':'File Type Not Allow', - 'errorInterrupt':'File Upload Interrupted', - 'errorUploadRetry':'Upload Error, Please Retry.', - 'errorHttp':'Http Error', - 'errorServerUpload':'Server Result Error.' - }, - 'webapp':{ - 'tip1':"This function provided by Baidu APP,please apply for baidu APPKey webmaster first!", - 'tip2':"And then open the file ueditor.config.js to set it! ", - 'applyFor':"APPLY FOR", - 'anthorApi':"Baidu API" - }, - 'template':{ - 'static':{ - 'lang_template_bkcolor':'Background Color', - 'lang_template_clear' : 'Keep Content', - 'lang_template_select':'Select Template' - }, - 'blank':"Blank", - 'blog':"Blog", - 'resume':"Resume", - 'richText':"Rich Text", - 'scrPapers':"Scientific Papers" - }, - scrawl:{ - 'static':{ - 'lang_input_previousStep':"Previous", - 'lang_input_nextsStep':"Next", - 'lang_input_clear':'Clear', - 'lang_input_addPic':'AddImage', - 'lang_input_ScalePic':'ScaleImage', - 'lang_input_removePic':'RemoveImage', - 'J_imgTxt':{title:'Add background image'} - }, - 'noScarwl':"No paint, a white paper...", - 'scrawlUpLoading':"Image is uploading, please wait...", - 'continueBtn':"Try again", - 'imageError':"Image failed to load!", - 'backgroundUploading':'Image is uploading,please wait...' - }, - 'music':{ - 'static':{ - 'lang_input_tips':"Input singer/song/album, search you interested in music!", - 'J_searchBtn':{value:'Search songs'} - }, - 'emptyTxt':'Not search to the relevant music results, please change a keyword try.', - 'chapter':'Songs', - 'singer':'Singer', - 'special':'Album', - 'listenTest':'Audition' - }, - anchor:{ - 'static':{ - 'lang_input_anchorName':'Anchor Name:' - } - }, - 'charts':{ - 'static':{ - 'lang_data_source':'Data source:', - 'lang_chart_format': 'Chart format:', - 'lang_data_align': 'Align', - 'lang_chart_align_same': 'Consistent with the X-axis Y-axis', - 'lang_chart_align_reverse': 'X-axis Y-axis opposite', - 'lang_chart_title': 'Title', - 'lang_chart_main_title': 'main title:', - 'lang_chart_sub_title': 'sub title:', - 'lang_chart_x_title': 'X-axis title:', - 'lang_chart_y_title': 'Y-axis title:', - 'lang_chart_tip': 'Prompt', - 'lang_cahrt_tip_prefix': 'prefix:', - 'lang_cahrt_tip_description': '仅饼图有效, 当鼠标移动到饼图中相应的块上时,提示框内的文字的前缀', - 'lang_chart_data_unit': 'Unit', - 'lang_chart_data_unit_title': 'unit:', - 'lang_chart_data_unit_description': '显示在每个数据点上的数据的单位, 比如: 温度的单位 ℃', - 'lang_chart_type': 'Chart type:', - 'lang_prev_btn': 'Previous', - 'lang_next_btn': 'Next' - } - }, - emotion:{ - 'static':{ - 'lang_input_choice':'Choice', - 'lang_input_Tuzki':'Tuzki', - 'lang_input_lvdouwa':'LvDouWa', - 'lang_input_BOBO':'BOBO', - 'lang_input_babyCat':'BabyCat', - 'lang_input_bubble':'Bubble', - 'lang_input_youa':'YouA' - } - }, - gmap:{ - 'static':{ - 'lang_input_address':'Address:', - 'lang_input_search':'Search', - 'address':{value:"Beijing"} - }, - searchError:'Unable to locate the address!' - }, - help:{ - 'static':{ - 'lang_input_about':'About', - 'lang_input_shortcuts':'Shortcuts', - 'lang_input_introduction':"UEditor is developed by Baidu Co.ltd. It is lightweight, customizable , focusing on user experience and etc. , UEditor is based on open source BSD license , allowing free use and redistribution.", - 'lang_Txt_shortcuts':'Shortcuts', - 'lang_Txt_func':'Function', - 'lang_Txt_bold':'Bold', - 'lang_Txt_copy':'Copy', - 'lang_Txt_cut':'Cut', - 'lang_Txt_Paste':'Paste', - 'lang_Txt_undo':'Undo', - 'lang_Txt_redo':'Redo', - 'lang_Txt_italic':'Italic', - 'lang_Txt_underline':'Underline', - 'lang_Txt_selectAll':'Select All', - 'lang_Txt_visualEnter':'Submit', - 'lang_Txt_fullscreen':'Fullscreen' - } - }, - insertframe:{ - 'static':{ - 'lang_input_address':'Address:', - 'lang_input_width':'Width:', - 'lang_input_height':'height:', - 'lang_input_isScroll':'Enable scrollbars:', - 'lang_input_frameborder':'Show frame border:', - 'lang_input_alignMode':'Alignment:', - 'align':{title:"Alignment", options:["Default", "Left", "Right", "Center"]} - }, - 'enterAddress':'Please enter an address!' - }, - link:{ - 'static':{ - 'lang_input_text':'Text:', - 'lang_input_url':'URL:', - 'lang_input_title':'Title:', - 'lang_input_target':'open in new window:' - }, - 'validLink':'Supports only effective when a link is selected', - 'httpPrompt':'The hyperlink you enter should start with "http|https|ftp://"!' - }, - map:{ - 'static':{ - lang_city:"City", - lang_address:"Address", - city:{value:"Beijing"}, - lang_search:"Search", - lang_dynamicmap:"Dynamic map" - }, - cityMsg:"Please enter the city name!", - errorMsg:"Can't find the place!" - }, - searchreplace:{ - 'static':{ - lang_tab_search:"Search", - lang_tab_replace:"Replace", - lang_search1:"Search", - lang_search2:"Search", - lang_replace:"Replace", - lang_searchReg:'Support regular expression ,which starts and ends with a slash ,for example "/expression/"', - lang_searchReg1:'Support regular expression ,which starts and ends with a slash ,for example "/expression/"', - lang_case_sensitive1:"Case sense", - lang_case_sensitive2:"Case sense", - nextFindBtn:{value:"Next"}, - preFindBtn:{value:"Preview"}, - nextReplaceBtn:{value:"Next"}, - preReplaceBtn:{value:"Preview"}, - repalceBtn:{value:"Replace"}, - repalceAllBtn:{value:"Replace all"} - }, - getEnd:"Has the search to the bottom!", - getStart:"Has the search to the top!", - countMsg:"Altogether replaced {#count} character(s)!" - }, - snapscreen:{ - 'static':{ - lang_showMsg:"You should install the UEditor screenshots program first!", - lang_download:"Download!", - lang_step1:"Step1:Download the program and then run it", - lang_step2:"Step2:After complete install,try to click the button again" - } - }, - spechars:{ - 'static':{}, - tsfh:"Special", - lmsz:"Roman", - szfh:"Numeral", - rwfh:"Japanese", - xlzm:"The Greek", - ewzm:"Russian", - pyzm:"Phonetic", - yyyb:"English", - zyzf:"Others" - }, - 'edittable':{ - 'static':{ - 'lang_tableStyle':'Table style', - 'lang_insertCaption':'Add table header row', - 'lang_insertTitle':'Add table title row', - 'lang_insertTitleCol':'Add table title col', - 'lang_tableSize':'Automatically adjust table size', - 'lang_autoSizeContent':'Adaptive by form text', - 'lang_orderbycontent':"Table of contents sortable", - 'lang_autoSizePage':'Page width adaptive', - 'lang_example':'Example', - 'lang_borderStyle':'Table Border', - 'lang_color':'Color:' - }, - captionName:'Caption', - titleName:'Title', - cellsName:'text', - errorMsg:'There are merged cells, can not sort.' - }, - 'edittip':{ - 'static':{ - lang_delRow:'Delete entire row', - lang_delCol:'Delete entire col' - } - }, - 'edittd':{ - 'static':{ - lang_tdBkColor:'Background Color:' - } - }, - 'formula':{ - 'static':{ - } - }, - wordimage:{ - 'static':{ - lang_resave:"The re-save step", - uploadBtn:{src:"upload.png", alt:"Upload"}, - clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"}, - lang_step:" 1. Click top button to copy the url and then open the dialog to paste it. 2. Open after choose photos uploaded process." - }, - fileType:"Image", - flashError:"Flash initialization failed!", - netError:"Network error! Please try again!", - copySuccess:"URL has been copied!", - - 'flashI18n':{ - lang:encodeURI( '{"UploadingState":"totalNum: ${a},uploadComplete: ${b}", "BeforeUpload":"waitingNum: ${a}", "ExceedSize":"Size exceed${a}", "ErrorInPreview":"Preview failed", "DefaultDescription":"Description", "LoadingImage":"Loading..."}' ), - uploadingTF:encodeURI( '{"font":"Arial", "size":12, "color":"0x000", "bold":"true", "italic":"false", "underline":"false"}' ), - imageTF:encodeURI( '{"font":"Arial", "size":11, "color":"red", "bold":"false", "italic":"false", "underline":"false"}' ), - textEncoding:"utf-8", - addImageSkinURL:"addImage.png", - allDeleteBtnUpSkinURL:"allDeleteBtnUpSkin.png", - allDeleteBtnHoverSkinURL:"allDeleteBtnHoverSkin.png", - rotateLeftBtnEnableSkinURL:"rotateLeftEnable.png", - rotateLeftBtnDisableSkinURL:"rotateLeftDisable.png", - rotateRightBtnEnableSkinURL:"rotateRightEnable.png", - rotateRightBtnDisableSkinURL:"rotateRightDisable.png", - deleteBtnEnableSkinURL:"deleteEnable.png", - deleteBtnDisableSkinURL:"deleteDisable.png", - backgroundURL:'', - listBackgroundURL:'', - buttonURL:'button.png' - } - }, - 'autosave': { - 'success':'Local conservation success' - } -}; diff --git a/public/static/admin/UEditor/lang/en/images/addimage.png b/public/static/admin/UEditor/lang/en/images/addimage.png deleted file mode 100644 index 3a2fd17..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/addimage.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/alldeletebtnhoverskin.png b/public/static/admin/UEditor/lang/en/images/alldeletebtnhoverskin.png deleted file mode 100644 index 355eeab..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/alldeletebtnhoverskin.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/alldeletebtnupskin.png b/public/static/admin/UEditor/lang/en/images/alldeletebtnupskin.png deleted file mode 100644 index 61658ce..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/alldeletebtnupskin.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/background.png b/public/static/admin/UEditor/lang/en/images/background.png deleted file mode 100644 index d5bf5fd..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/background.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/button.png b/public/static/admin/UEditor/lang/en/images/button.png deleted file mode 100644 index 098874c..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/button.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/copy.png b/public/static/admin/UEditor/lang/en/images/copy.png deleted file mode 100644 index f982e8b..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/copy.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/deletedisable.png b/public/static/admin/UEditor/lang/en/images/deletedisable.png deleted file mode 100644 index c8ee750..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/deletedisable.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/deleteenable.png b/public/static/admin/UEditor/lang/en/images/deleteenable.png deleted file mode 100644 index 26acc88..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/deleteenable.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/listbackground.png b/public/static/admin/UEditor/lang/en/images/listbackground.png deleted file mode 100644 index 4f82ccd..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/listbackground.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/localimage.png b/public/static/admin/UEditor/lang/en/images/localimage.png deleted file mode 100644 index 12c8e6a..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/localimage.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/music.png b/public/static/admin/UEditor/lang/en/images/music.png deleted file mode 100644 index 2f495fe..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/music.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/rotateleftdisable.png b/public/static/admin/UEditor/lang/en/images/rotateleftdisable.png deleted file mode 100644 index 741526e..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/rotateleftdisable.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/rotateleftenable.png b/public/static/admin/UEditor/lang/en/images/rotateleftenable.png deleted file mode 100644 index e164ddb..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/rotateleftenable.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/rotaterightdisable.png b/public/static/admin/UEditor/lang/en/images/rotaterightdisable.png deleted file mode 100644 index 5a78c26..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/rotaterightdisable.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/rotaterightenable.png b/public/static/admin/UEditor/lang/en/images/rotaterightenable.png deleted file mode 100644 index d768531..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/rotaterightenable.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/en/images/upload.png b/public/static/admin/UEditor/lang/en/images/upload.png deleted file mode 100644 index 7bb15b3..0000000 Binary files a/public/static/admin/UEditor/lang/en/images/upload.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/zh-cn/images/copy.png b/public/static/admin/UEditor/lang/zh-cn/images/copy.png deleted file mode 100644 index b2536aa..0000000 Binary files a/public/static/admin/UEditor/lang/zh-cn/images/copy.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/zh-cn/images/localimage.png b/public/static/admin/UEditor/lang/zh-cn/images/localimage.png deleted file mode 100644 index 7303c36..0000000 Binary files a/public/static/admin/UEditor/lang/zh-cn/images/localimage.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/zh-cn/images/music.png b/public/static/admin/UEditor/lang/zh-cn/images/music.png deleted file mode 100644 index 354edeb..0000000 Binary files a/public/static/admin/UEditor/lang/zh-cn/images/music.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/zh-cn/images/upload.png b/public/static/admin/UEditor/lang/zh-cn/images/upload.png deleted file mode 100644 index 08d4d92..0000000 Binary files a/public/static/admin/UEditor/lang/zh-cn/images/upload.png and /dev/null differ diff --git a/public/static/admin/UEditor/lang/zh-cn/zh-cn.js b/public/static/admin/UEditor/lang/zh-cn/zh-cn.js deleted file mode 100644 index 4d5178f..0000000 --- a/public/static/admin/UEditor/lang/zh-cn/zh-cn.js +++ /dev/null @@ -1,669 +0,0 @@ -/** - * Created with JetBrains PhpStorm. - * User: taoqili - * Date: 12-6-12 - * Time: 下午5:02 - * To change this template use File | Settings | File Templates. - */ -UE.I18N['zh-cn'] = { - 'labelMap':{ - 'anchor':'锚点', 'undo':'撤销', 'redo':'重做', 'bold':'加粗', 'indent':'首行缩进', 'snapscreen':'截图', - 'italic':'斜体', 'underline':'下划线', 'strikethrough':'删除线', 'subscript':'下标','fontborder':'字符边框', - 'superscript':'上标', 'formatmatch':'格式刷', 'source':'源代码', 'blockquote':'引用', - 'pasteplain':'纯文本粘贴模式', 'selectall':'全选', 'print':'打印', 'preview':'预览', - 'horizontal':'分隔线', 'removeformat':'清除格式', 'time':'时间', 'date':'日期', - 'unlink':'取消链接', 'insertrow':'前插入行', 'insertcol':'前插入列', 'mergeright':'右合并单元格', 'mergedown':'下合并单元格', - 'deleterow':'删除行', 'deletecol':'删除列', 'splittorows':'拆分成行', - 'splittocols':'拆分成列', 'splittocells':'完全拆分单元格','deletecaption':'删除表格标题','inserttitle':'插入标题', - 'mergecells':'合并多个单元格', 'deletetable':'删除表格', 'cleardoc':'清空文档','insertparagraphbeforetable':"表格前插入行",'insertcode':'代码语言', - 'fontfamily':'字体', 'fontsize':'字号', 'paragraph':'段落格式', 'simpleupload':'单图上传', 'insertimage':'多图上传','edittable':'表格属性','edittd':'单元格属性', 'link':'超链接', - 'emotion':'表情', 'spechars':'特殊字符', 'searchreplace':'查询替换', 'map':'Baidu地图', 'gmap':'Google地图', - 'insertvideo':'视频', 'help':'帮助', 'justifyleft':'居左对齐', 'justifyright':'居右对齐', 'justifycenter':'居中对齐', - 'justifyjustify':'两端对齐', 'forecolor':'字体颜色', 'backcolor':'背景色', 'insertorderedlist':'有序列表', - 'insertunorderedlist':'无序列表', 'fullscreen':'全屏', 'directionalityltr':'从左向右输入', 'directionalityrtl':'从右向左输入', - 'rowspacingtop':'段前距', 'rowspacingbottom':'段后距', 'pagebreak':'分页', 'insertframe':'插入Iframe', 'imagenone':'默认', - 'imageleft':'左浮动', 'imageright':'右浮动', 'attachment':'附件', 'imagecenter':'居中', 'wordimage':'图片转存', - 'lineheight':'行间距','edittip' :'编辑提示','customstyle':'自定义标题', 'autotypeset':'自动排版', - 'webapp':'百度应用','touppercase':'字母大写', 'tolowercase':'字母小写','background':'背景','template':'模板','scrawl':'涂鸦', - 'music':'音乐','inserttable':'插入表格','drafts': '从草稿箱加载', 'charts': '图表' - }, - 'insertorderedlist':{ - 'num':'1,2,3...', - 'num1':'1),2),3)...', - 'num2':'(1),(2),(3)...', - 'cn':'一,二,三....', - 'cn1':'一),二),三)....', - 'cn2':'(一),(二),(三)....', - 'decimal':'1,2,3...', - 'lower-alpha':'a,b,c...', - 'lower-roman':'i,ii,iii...', - 'upper-alpha':'A,B,C...', - 'upper-roman':'I,II,III...' - }, - 'insertunorderedlist':{ - 'circle':'○ 大圆圈', - 'disc':'● 小黑点', - 'square':'■ 小方块 ', - 'dash' :'— 破折号', - 'dot':' 。 小圆圈' - }, - 'paragraph':{'p':'段落', 'h1':'标题 1', 'h2':'标题 2', 'h3':'标题 3', 'h4':'标题 4', 'h5':'标题 5', 'h6':'标题 6'}, - 'fontfamily':{ - 'songti':'宋体', - 'kaiti':'楷体', - 'heiti':'黑体', - 'lishu':'隶书', - 'yahei':'微软雅黑', - 'andaleMono':'andale mono', - 'arial': 'arial', - 'arialBlack':'arial black', - 'comicSansMs':'comic sans ms', - 'impact':'impact', - 'timesNewRoman':'times new roman' - }, - 'customstyle':{ - 'tc':'标题居中', - 'tl':'标题居左', - 'im':'强调', - 'hi':'明显强调' - }, - 'autoupload': { - 'exceedSizeError': '文件大小超出限制', - 'exceedTypeError': '文件格式不允许', - 'jsonEncodeError': '服务器返回格式错误', - 'loading':"正在上传...", - 'loadError':"上传错误", - 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!' - }, - 'simpleupload':{ - 'exceedSizeError': '文件大小超出限制', - 'exceedTypeError': '文件格式不允许', - 'jsonEncodeError': '服务器返回格式错误', - 'loading':"正在上传...", - 'loadError':"上传错误", - 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!' - }, - 'elementPathTip':"元素路径", - 'wordCountTip':"字数统计", - 'wordCountMsg':'当前已输入{#count}个字符, 您还可以输入{#leave}个字符。 ', - 'wordOverFlowMsg':'字数超出最大允许值,服务器可能拒绝保存!', - 'ok':"确认", - 'cancel':"取消", - 'closeDialog':"关闭对话框", - 'tableDrag':"表格拖动必须引入uiUtils.js文件!", - 'autofloatMsg':"工具栏浮动依赖编辑器UI,您首先需要引入UI文件!", - 'loadconfigError': '获取后台配置项请求出错,上传功能将不能正常使用!', - 'loadconfigFormatError': '后台配置项返回格式出错,上传功能将不能正常使用!', - 'loadconfigHttpError': '请求后台配置项http错误,上传功能将不能正常使用!', - 'snapScreen_plugin':{ - 'browserMsg':"仅支持IE浏览器!", - 'callBackErrorMsg':"服务器返回数据有误,请检查配置项之后重试。", - 'uploadErrorMsg':"截图上传失败,请检查服务器端环境! " - }, - 'insertcode':{ - 'as3':'ActionScript 3', - 'bash':'Bash/Shell', - 'cpp':'C/C++', - 'css':'CSS', - 'cf':'ColdFusion', - 'c#':'C#', - 'delphi':'Delphi', - 'diff':'Diff', - 'erlang':'Erlang', - 'groovy':'Groovy', - 'html':'HTML', - 'java':'Java', - 'jfx':'JavaFX', - 'js':'JavaScript', - 'pl':'Perl', - 'php':'PHP', - 'plain':'Plain Text', - 'ps':'PowerShell', - 'python':'Python', - 'ruby':'Ruby', - 'scala':'Scala', - 'sql':'SQL', - 'vb':'Visual Basic', - 'xml':'XML' - }, - 'confirmClear':"确定清空当前文档么?", - 'contextMenu':{ - 'delete':"删除", - 'selectall':"全选", - 'deletecode':"删除代码", - 'cleardoc':"清空文档", - 'confirmclear':"确定清空当前文档么?", - 'unlink':"删除超链接", - 'paragraph':"段落格式", - 'edittable':"表格属性", - 'aligntd':"单元格对齐方式", - 'aligntable':'表格对齐方式', - 'tableleft':'左浮动', - 'tablecenter':'居中显示', - 'tableright':'右浮动', - 'edittd':"单元格属性", - 'setbordervisible':'设置表格边线可见', - 'justifyleft':'左对齐', - 'justifyright':'右对齐', - 'justifycenter':'居中对齐', - 'justifyjustify':'两端对齐', - 'table':"表格", - 'inserttable':'插入表格', - 'deletetable':"删除表格", - 'insertparagraphbefore':"前插入段落", - 'insertparagraphafter':'后插入段落', - 'deleterow':"删除当前行", - 'deletecol':"删除当前列", - 'insertrow':"前插入行", - 'insertcol':"左插入列", - 'insertrownext':'后插入行', - 'insertcolnext':'右插入列', - 'insertcaption':'插入表格名称', - 'deletecaption':'删除表格名称', - 'inserttitle':'插入表格标题行', - 'deletetitle':'删除表格标题行', - 'inserttitlecol':'插入表格标题列', - 'deletetitlecol':'删除表格标题列', - 'averageDiseRow':'平均分布各行', - 'averageDisCol':'平均分布各列', - 'mergeright':"向右合并", - 'mergeleft':"向左合并", - 'mergedown':"向下合并", - 'mergecells':"合并单元格", - 'splittocells':"完全拆分单元格", - 'splittocols':"拆分成列", - 'splittorows':"拆分成行", - 'tablesort':'表格排序', - 'enablesort':'设置表格可排序', - 'disablesort':'取消表格可排序', - 'reversecurrent':'逆序当前', - 'orderbyasc':'按ASCII字符升序', - 'reversebyasc':'按ASCII字符降序', - 'orderbynum':'按数值大小升序', - 'reversebynum':'按数值大小降序', - 'borderbk':'边框底纹', - 'setcolor':'表格隔行变色', - 'unsetcolor':'取消表格隔行变色', - 'setbackground':'选区背景隔行', - 'unsetbackground':'取消选区背景', - 'redandblue':'红蓝相间', - 'threecolorgradient':'三色渐变', - 'copy':"复制(Ctrl + c)", - 'copymsg': "浏览器不支持,请使用 'Ctrl + c'", - 'paste':"粘贴(Ctrl + v)", - 'pastemsg': "浏览器不支持,请使用 'Ctrl + v'" - }, - 'copymsg': "浏览器不支持,请使用 'Ctrl + c'", - 'pastemsg': "浏览器不支持,请使用 'Ctrl + v'", - 'anthorMsg':"链接", - 'clearColor':'清空颜色', - 'standardColor':'标准颜色', - 'themeColor':'主题颜色', - 'property':'属性', - 'default':'默认', - 'modify':'修改', - 'justifyleft':'左对齐', - 'justifyright':'右对齐', - 'justifycenter':'居中', - 'justify':'默认', - 'clear':'清除', - 'anchorMsg':'锚点', - 'delete':'删除', - 'clickToUpload':"点击上传", - 'unset':'尚未设置语言文件', - 't_row':'行', - 't_col':'列', - 'more':'更多', - 'pasteOpt':'粘贴选项', - 'pasteSourceFormat':"保留源格式", - 'tagFormat':'只保留标签', - 'pasteTextFormat':'只保留文本', - 'autoTypeSet':{ - 'mergeLine':"合并空行", - 'delLine':"清除空行", - 'removeFormat':"清除格式", - 'indent':"首行缩进", - 'alignment':"对齐方式", - 'imageFloat':"图片浮动", - 'removeFontsize':"清除字号", - 'removeFontFamily':"清除字体", - 'removeHtml':"清除冗余HTML代码", - 'pasteFilter':"粘贴过滤", - 'run':"执行", - 'symbol':'符号转换', - 'bdc2sb':'全角转半角', - 'tobdc':'半角转全角' - }, - - 'background':{ - 'static':{ - 'lang_background_normal':'背景设置', - 'lang_background_local':'在线图片', - 'lang_background_set':'选项', - 'lang_background_none':'无背景色', - 'lang_background_colored':'有背景色', - 'lang_background_color':'颜色设置', - 'lang_background_netimg':'网络图片', - 'lang_background_align':'对齐方式', - 'lang_background_position':'精确定位', - 'repeatType':{'options':["居中", "横向重复", "纵向重复", "平铺","自定义"]} - - }, - 'noUploadImage':"当前未上传过任何图片!", - 'toggleSelect':"单击可切换选中状态\n原图尺寸: " - }, - //===============dialog i18N======================= - 'insertimage':{ - 'static':{ - 'lang_tab_remote':"插入图片", //节点 - 'lang_tab_upload':"本地上传", - 'lang_tab_online':"在线管理", - 'lang_tab_search':"图片搜索", - 'lang_input_url':"地 址:", - 'lang_input_size':"大 小:", - 'lang_input_width':"宽度", - 'lang_input_height':"高度", - 'lang_input_border':"边 框:", - 'lang_input_vhspace':"边 距:", - 'lang_input_title':"描 述:", - 'lang_input_align':'图片浮动方式:', - 'lang_imgLoading':" 图片加载中……", - 'lang_start_upload':"开始上传", - 'lock':{'title':"锁定宽高比例"}, //属性 - 'searchType':{'title':"图片类型", 'options':["新闻", "壁纸", "表情", "头像"]}, //select的option - 'searchTxt':{'value':"请输入搜索关键词"}, - 'searchBtn':{'value':"百度一下"}, - 'searchReset':{'value':"清空搜索"}, - 'noneAlign':{'title':'无浮动'}, - 'leftAlign':{'title':'左浮动'}, - 'rightAlign':{'title':'右浮动'}, - 'centerAlign':{'title':'居中独占一行'} - }, - 'uploadSelectFile':'点击选择图片', - 'uploadAddFile':'继续添加', - 'uploadStart':'开始上传', - 'uploadPause':'暂停上传', - 'uploadContinue':'继续上传', - 'uploadRetry':'重试上传', - 'uploadDelete':'删除', - 'uploadTurnLeft':'向左旋转', - 'uploadTurnRight':'向右旋转', - 'uploadPreview':'预览中', - 'uploadNoPreview':'不能预览', - 'updateStatusReady': '选中_张图片,共_KB。', - 'updateStatusConfirm': '已成功上传_张照片,_张照片上传失败', - 'updateStatusFinish': '共_张(_KB),_张上传成功', - 'updateStatusError': ',_张上传失败。', - 'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', - 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', - 'errorExceedSize':'文件大小超出', - 'errorFileType':'文件格式不允许', - 'errorInterrupt':'文件传输中断', - 'errorUploadRetry':'上传失败,请重试', - 'errorHttp':'http请求错误', - 'errorServerUpload':'服务器返回出错', - 'remoteLockError':"宽高不正确,不能所定比例", - 'numError':"请输入正确的长度或者宽度值!例如:123,400", - 'imageUrlError':"不允许的图片格式或者图片域!", - 'imageLoadError':"图片加载失败!请检查链接地址或网络状态!", - 'searchRemind':"请输入搜索关键词", - 'searchLoading':"图片加载中,请稍后……", - 'searchRetry':" :( ,抱歉,没有找到图片!请重试一次!" - }, - 'attachment':{ - 'static':{ - 'lang_tab_upload': '上传附件', - 'lang_tab_online': '在线附件', - 'lang_start_upload':"开始上传", - 'lang_drop_remind':"可以将文件拖到这里,单次最多可选100个文件" - }, - 'uploadSelectFile':'点击选择文件', - 'uploadAddFile':'继续添加', - 'uploadStart':'开始上传', - 'uploadPause':'暂停上传', - 'uploadContinue':'继续上传', - 'uploadRetry':'重试上传', - 'uploadDelete':'删除', - 'uploadTurnLeft':'向左旋转', - 'uploadTurnRight':'向右旋转', - 'uploadPreview':'预览中', - 'updateStatusReady': '选中_个文件,共_KB。', - 'updateStatusConfirm': '已成功上传_个文件,_个文件上传失败', - 'updateStatusFinish': '共_个(_KB),_个上传成功', - 'updateStatusError': ',_张上传失败。', - 'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', - 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', - 'errorExceedSize':'文件大小超出', - 'errorFileType':'文件格式不允许', - 'errorInterrupt':'文件传输中断', - 'errorUploadRetry':'上传失败,请重试', - 'errorHttp':'http请求错误', - 'errorServerUpload':'服务器返回出错' - }, - 'insertvideo':{ - 'static':{ - 'lang_tab_insertV':"插入视频", - 'lang_tab_searchV':"搜索视频", - 'lang_tab_uploadV':"上传视频", - 'lang_video_url':"视频网址", - 'lang_video_size':"视频尺寸", - 'lang_videoW':"宽度", - 'lang_videoH':"高度", - 'lang_alignment':"对齐方式", - 'videoSearchTxt':{'value':"请输入搜索关键字!"}, - 'videoType':{'options':["全部", "热门", "娱乐", "搞笑", "体育", "科技", "综艺"]}, - 'videoSearchBtn':{'value':"百度一下"}, - 'videoSearchReset':{'value':"清空结果"}, - - 'lang_input_fileStatus':' 当前未上传文件', - 'startUpload':{'style':"background:url(upload.png) no-repeat;"}, - - 'lang_upload_size':"视频尺寸", - 'lang_upload_width':"宽度", - 'lang_upload_height':"高度", - 'lang_upload_alignment':"对齐方式", - 'lang_format_advice':"建议使用mp4格式." - - }, - 'numError':"请输入正确的数值,如123,400", - 'floatLeft':"左浮动", - 'floatRight':"右浮动", - '"default"':"默认", - 'block':"独占一行", - 'urlError':"输入的视频地址有误,请检查后再试!", - 'loading':"  视频加载中,请等待……", - 'clickToSelect':"点击选中", - 'goToSource':'访问源视频', - 'noVideo':"    抱歉,找不到对应的视频,请重试!", - - 'browseFiles':'浏览文件', - 'uploadSuccess':'上传成功!', - 'delSuccessFile':'从成功队列中移除', - 'delFailSaveFile':'移除保存失败文件', - 'statusPrompt':' 个文件已上传! ', - 'flashVersionError':'当前Flash版本过低,请更新FlashPlayer后重试!', - 'flashLoadingError':'Flash加载失败!请检查路径或网络状态', - 'fileUploadReady':'等待上传……', - 'delUploadQueue':'从上传队列中移除', - 'limitPrompt1':'单次不能选择超过', - 'limitPrompt2':'个文件!请重新选择!', - 'delFailFile':'移除失败文件', - 'fileSizeLimit':'文件大小超出限制!', - 'emptyFile':'空文件无法上传!', - 'fileTypeError':'文件类型不允许!', - 'unknownError':'未知错误!', - 'fileUploading':'上传中,请等待……', - 'cancelUpload':'取消上传', - 'netError':'网络错误', - 'failUpload':'上传失败!', - 'serverIOError':'服务器IO错误!', - 'noAuthority':'无权限!', - 'fileNumLimit':'上传个数限制', - 'failCheck':'验证失败,本次上传被跳过!', - 'fileCanceling':'取消中,请等待……', - 'stopUploading':'上传已停止……', - - 'uploadSelectFile':'点击选择文件', - 'uploadAddFile':'继续添加', - 'uploadStart':'开始上传', - 'uploadPause':'暂停上传', - 'uploadContinue':'继续上传', - 'uploadRetry':'重试上传', - 'uploadDelete':'删除', - 'uploadTurnLeft':'向左旋转', - 'uploadTurnRight':'向右旋转', - 'uploadPreview':'预览中', - 'updateStatusReady': '选中_个文件,共_KB。', - 'updateStatusConfirm': '成功上传_个,_个失败', - 'updateStatusFinish': '共_个(_KB),_个成功上传', - 'updateStatusError': ',_张上传失败。', - 'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。', - 'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!', - 'errorExceedSize':'文件大小超出', - 'errorFileType':'文件格式不允许', - 'errorInterrupt':'文件传输中断', - 'errorUploadRetry':'上传失败,请重试', - 'errorHttp':'http请求错误', - 'errorServerUpload':'服务器返回出错' - }, - 'webapp':{ - 'tip1':"本功能由百度APP提供,如看到此页面,请各位站长首先申请百度APPKey!", - 'tip2':"申请完成之后请至ueditor.config.js中配置获得的appkey! ", - 'applyFor':"点此申请", - 'anthorApi':"百度API" - }, - 'template':{ - 'static':{ - 'lang_template_bkcolor':'背景颜色', - 'lang_template_clear' : '保留原有内容', - 'lang_template_select' : '选择模板' - }, - 'blank':"空白文档", - 'blog':"博客文章", - 'resume':"个人简历", - 'richText':"图文混排", - 'sciPapers':"科技论文" - - - }, - 'scrawl':{ - 'static':{ - 'lang_input_previousStep':"上一步", - 'lang_input_nextsStep':"下一步", - 'lang_input_clear':'清空', - 'lang_input_addPic':'添加背景', - 'lang_input_ScalePic':'缩放背景', - 'lang_input_removePic':'删除背景', - 'J_imgTxt':{title:'添加背景图片'} - }, - 'noScarwl':"尚未作画,白纸一张~", - 'scrawlUpLoading':"涂鸦上传中,别急哦~", - 'continueBtn':"继续", - 'imageError':"糟糕,图片读取失败了!", - 'backgroundUploading':'背景图片上传中,别急哦~' - }, - 'music':{ - 'static':{ - 'lang_input_tips':"输入歌手/歌曲/专辑,搜索您感兴趣的音乐!", - 'J_searchBtn':{value:'搜索歌曲'} - }, - 'emptyTxt':'未搜索到相关音乐结果,请换一个关键词试试。', - 'chapter':'歌曲', - 'singer':'歌手', - 'special':'专辑', - 'listenTest':'试听' - }, - 'anchor':{ - 'static':{ - 'lang_input_anchorName':'锚点名字:' - } - }, - 'charts':{ - 'static':{ - 'lang_data_source':'数据源:', - 'lang_chart_format': '图表格式:', - 'lang_data_align': '数据对齐方式', - 'lang_chart_align_same': '数据源与图表X轴Y轴一致', - 'lang_chart_align_reverse': '数据源与图表X轴Y轴相反', - 'lang_chart_title': '图表标题', - 'lang_chart_main_title': '主标题:', - 'lang_chart_sub_title': '子标题:', - 'lang_chart_x_title': 'X轴标题:', - 'lang_chart_y_title': 'Y轴标题:', - 'lang_chart_tip': '提示文字', - 'lang_cahrt_tip_prefix': '提示文字前缀:', - 'lang_cahrt_tip_description': '仅饼图有效, 当鼠标移动到饼图中相应的块上时,提示框内的文字的前缀', - 'lang_chart_data_unit': '数据单位', - 'lang_chart_data_unit_title': '单位:', - 'lang_chart_data_unit_description': '显示在每个数据点上的数据的单位, 比如: 温度的单位 ℃', - 'lang_chart_type': '图表类型:', - 'lang_prev_btn': '上一个', - 'lang_next_btn': '下一个' - } - }, - 'emotion':{ - 'static':{ - 'lang_input_choice':'精选', - 'lang_input_Tuzki':'兔斯基', - 'lang_input_BOBO':'BOBO', - 'lang_input_lvdouwa':'绿豆蛙', - 'lang_input_babyCat':'baby猫', - 'lang_input_bubble':'泡泡', - 'lang_input_youa':'有啊' - } - }, - 'gmap':{ - 'static':{ - 'lang_input_address':'地址', - 'lang_input_search':'搜索', - 'address':{value:"北京"} - }, - searchError:'无法定位到该地址!' - }, - 'help':{ - 'static':{ - 'lang_input_about':'关于UEditor', - 'lang_input_shortcuts':'快捷键', - 'lang_input_introduction':'UEditor是由百度web前端研发部开发的所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点。开源基于BSD协议,允许自由使用和修改代码。', - 'lang_Txt_shortcuts':'快捷键', - 'lang_Txt_func':'功能', - 'lang_Txt_bold':'给选中字设置为加粗', - 'lang_Txt_copy':'复制选中内容', - 'lang_Txt_cut':'剪切选中内容', - 'lang_Txt_Paste':'粘贴', - 'lang_Txt_undo':'重新执行上次操作', - 'lang_Txt_redo':'撤销上一次操作', - 'lang_Txt_italic':'给选中字设置为斜体', - 'lang_Txt_underline':'给选中字加下划线', - 'lang_Txt_selectAll':'全部选中', - 'lang_Txt_visualEnter':'软回车', - 'lang_Txt_fullscreen':'全屏' - } - }, - 'insertframe':{ - 'static':{ - 'lang_input_address':'地址:', - 'lang_input_width':'宽度:', - 'lang_input_height':'高度:', - 'lang_input_isScroll':'允许滚动条:', - 'lang_input_frameborder':'显示框架边框:', - 'lang_input_alignMode':'对齐方式:', - 'align':{title:"对齐方式", options:["默认", "左对齐", "右对齐", "居中"]} - }, - 'enterAddress':'请输入地址!' - }, - 'link':{ - 'static':{ - 'lang_input_text':'文本内容:', - 'lang_input_url':'链接地址:', - 'lang_input_title':'标题:', - 'lang_input_target':'是否在新窗口打开:' - }, - 'validLink':'只支持选中一个链接时生效', - 'httpPrompt':'您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀' - }, - 'map':{ - 'static':{ - lang_city:"城市", - lang_address:"地址", - city:{value:"北京"}, - lang_search:"搜索", - lang_dynamicmap:"插入动态地图" - }, - cityMsg:"请选择城市", - errorMsg:"抱歉,找不到该位置!" - }, - 'searchreplace':{ - 'static':{ - lang_tab_search:"查找", - lang_tab_replace:"替换", - lang_search1:"查找", - lang_search2:"查找", - lang_replace:"替换", - lang_searchReg:'支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”', - lang_searchReg1:'支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”', - lang_case_sensitive1:"区分大小写", - lang_case_sensitive2:"区分大小写", - nextFindBtn:{value:"下一个"}, - preFindBtn:{value:"上一个"}, - nextReplaceBtn:{value:"下一个"}, - preReplaceBtn:{value:"上一个"}, - repalceBtn:{value:"替换"}, - repalceAllBtn:{value:"全部替换"} - }, - getEnd:"已经搜索到文章末尾!", - getStart:"已经搜索到文章头部", - countMsg:"总共替换了{#count}处!" - }, - 'snapscreen':{ - 'static':{ - lang_showMsg:"截图功能需要首先安装UEditor截图插件! ", - lang_download:"点此下载", - lang_step1:"第一步,下载UEditor截图插件并运行安装。", - lang_step2:"第二步,插件安装完成后即可使用,如不生效,请重启浏览器后再试!" - } - }, - 'spechars':{ - 'static':{}, - tsfh:"特殊字符", - lmsz:"罗马字符", - szfh:"数学字符", - rwfh:"日文字符", - xlzm:"希腊字母", - ewzm:"俄文字符", - pyzm:"拼音字母", - yyyb:"英语音标", - zyzf:"其他" - }, - 'edittable':{ - 'static':{ - 'lang_tableStyle':'表格样式', - 'lang_insertCaption':'添加表格名称行', - 'lang_insertTitle':'添加表格标题行', - 'lang_insertTitleCol':'添加表格标题列', - 'lang_orderbycontent':"使表格内容可排序", - 'lang_tableSize':'自动调整表格尺寸', - 'lang_autoSizeContent':'按表格文字自适应', - 'lang_autoSizePage':'按页面宽度自适应', - 'lang_example':'示例', - 'lang_borderStyle':'表格边框', - 'lang_color':'颜色:' - }, - captionName:'表格名称', - titleName:'标题', - cellsName:'内容', - errorMsg:'有合并单元格,不可排序' - }, - 'edittip':{ - 'static':{ - lang_delRow:'删除整行', - lang_delCol:'删除整列' - } - }, - 'edittd':{ - 'static':{ - lang_tdBkColor:'背景颜色:' - } - }, - 'formula':{ - 'static':{ - } - }, - 'wordimage':{ - 'static':{ - lang_resave:"转存步骤", - uploadBtn:{src:"upload.png",alt:"上传"}, - clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"}, - lang_step:"1、点击顶部复制按钮,将地址复制到剪贴板;2、点击添加照片按钮,在弹出的对话框中使用Ctrl+V粘贴地址;3、点击打开后选择图片上传流程。" - }, - 'fileType':"图片", - 'flashError':"FLASH初始化失败,请检查FLASH插件是否正确安装!", - 'netError':"网络连接错误,请重试!", - 'copySuccess':"图片地址已经复制!", - 'flashI18n':{} //留空默认中文 - }, - 'autosave': { - 'saving':'保存中...', - 'success':'本地保存成功' - } -}; diff --git a/public/static/admin/UEditor/themes/default/css/ueditor.css b/public/static/admin/UEditor/themes/default/css/ueditor.css deleted file mode 100644 index f0f2048..0000000 --- a/public/static/admin/UEditor/themes/default/css/ueditor.css +++ /dev/null @@ -1,1904 +0,0 @@ -/*基础UI构建 -*/ -/* common layer */ -.edui-default .edui-box { - border: none; - padding: 0; - margin: 0; - overflow: hidden; -} - -.edui-default a.edui-box { - display: block; - text-decoration: none; - color: black; -} - -.edui-default a.edui-box:hover { - text-decoration: none; -} - -.edui-default a.edui-box:active { - text-decoration: none; -} - -.edui-default table.edui-box { - border-collapse: collapse; -} - -.edui-default ul.edui-box { - list-style-type: none; -} - -div.edui-box { - position: relative; - display: -moz-inline-box !important; - display: inline-block !important; - vertical-align: top; -} - -.edui-default .edui-clearfix { - zoom: 1 -} - -.edui-default .edui-clearfix:after { - content: '\20'; - display: block; - clear: both; -} - - * html div.edui-box { - display: inline !important; -} - -*:first-child+html div.edui-box { - display: inline !important; -} - -/* control layout */ -.edui-default .edui-button-body, .edui-splitbutton-body, .edui-menubutton-body, .edui-combox-body { - position: relative; -} - -.edui-default .edui-popup { - position: absolute; - -webkit-user-select: none; - -moz-user-select: none; -} - -.edui-default .edui-popup .edui-shadow { - position: absolute; - z-index: -1; -} - -.edui-default .edui-popup .edui-bordereraser { - position: absolute; - overflow: hidden; -} - -.edui-default .edui-tablepicker .edui-canvas { - position: relative; -} - -.edui-default .edui-tablepicker .edui-canvas .edui-overlay { - position: absolute; -} - -.edui-default .edui-dialog-modalmask, .edui-dialog-dragmask { - position: absolute; - left: 0; - top: 0; - width: 100%; - height: 100%; -} - -.edui-default .edui-toolbar { - position: relative; -} - -/* - * default theme - */ -.edui-default .edui-label { - cursor: default; -} - -.edui-default span.edui-clickable { - color: blue; - cursor: pointer; - text-decoration: underline; -} - -.edui-default span.edui-unclickable { - color: gray; - cursor: default; -} -/* 工具栏 */ -.edui-default .edui-toolbar { - cursor: default; - -webkit-user-select: none; - -moz-user-select: none; - padding: 1px; - overflow: hidden; /*全屏下单独一行不占位*/ - zoom: 1; - width:auto; - height:auto; -} - -.edui-default .edui-toolbar .edui-button, -.edui-default .edui-toolbar .edui-splitbutton, -.edui-default .edui-toolbar .edui-menubutton, -.edui-default .edui-toolbar .edui-combox { - margin: 1px; -} -/*UI工具栏、编辑区域、底部*/ -.edui-default .edui-editor { - border: 1px solid #d4d4d4; - background-color: white; - position: relative; - overflow: visible; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.edui-editor div{ - width:auto; - height:auto; - line-height: initial; -} -.edui-default .edui-editor-toolbarbox { - position: relative; - zoom: 1; - -webkit-box-shadow:0 1px 4px rgba(204, 204, 204, 0.6); - -moz-box-shadow:0 1px 4px rgba(204, 204, 204, 0.6); - box-shadow:0 1px 4px rgba(204, 204, 204, 0.6); - border-top-left-radius:2px; - border-top-right-radius:2px; -} - -.edui-default .edui-editor-toolbarboxouter { - border-bottom: 1px solid #d4d4d4; - background-color: #fafafa; - background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); - background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); - background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); - background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); - background-repeat: repeat-x; - /*border: 1px solid #d4d4d4;*/ - -webkit-border-radius: 4px 4px 0 0; - -moz-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); - *zoom: 1; - -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); - box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); -} - -.edui-default .edui-editor-toolbarboxinner { - padding: 2px; -} - -.edui-default .edui-editor-iframeholder { - position: relative; - /*for fix ie6 toolbarmsg under iframe bug. relative -> static */ - /*_position: static !important;* -} - -.edui-default .edui-editor-iframeholder textarea { - font-family: consolas, "Courier New", "lucida console", monospace; - font-size: 12px; - line-height: 18px; -} - -.edui-default .edui-editor-bottombar { - /*border-top: 1px solid #ccc;*/ - /*height: 20px;*/ - /*width: 40%;*/ - /*float: left;*/ - /*overflow: hidden;*/ -} - -.edui-default .edui-editor-bottomContainer { - overflow: hidden; -} - -.edui-default .edui-editor-bottomContainer table { - width: 100%; - height: 0; - overflow: hidden; - border-spacing: 0; -} - -.edui-default .edui-editor-bottomContainer td { - white-space: nowrap; - border-top: 1px solid #ccc; - line-height: 20px; - font-size: 12px; - font-family: Arial, Helvetica, Tahoma, Verdana, Sans-Serif; -} - -.edui-default .edui-editor-wordcount { - text-align: right; - margin-right: 5px; - color: #aaa; -} -.edui-default .edui-editor-scale { - width: 12px; -} -.edui-default .edui-editor-scale .edui-editor-icon { - float: right; - width: 100%; - height: 12px; - margin-top: 10px; - background: url(../images/scale.png) no-repeat; - cursor: se-resize; -} -.edui-default .edui-editor-breadcrumb { - margin: 2px 0 0 3px; -} - -.edui-default .edui-editor-breadcrumb span { - cursor: pointer; - text-decoration: underline; - color: blue; -} - -.edui-default .edui-toolbar .edui-for-fullscreen { - float: right; -} - -.edui-default .edui-bubble .edui-popup-content { - border: 1px solid #DCAC6C; - background-color: #fff6d9; - padding: 5px; - font-size: 10pt; - font-family: "宋体"; -} - -.edui-default .edui-bubble .edui-shadow { - /*box-shadow: 1px 1px 3px #818181;*/ - /*-webkit-box-shadow: 2px 2px 3px #818181;*/ - /*-moz-box-shadow: 2px 2px 3px #818181;*/ - /*filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '2', MakeShadow = 'true', ShadowOpacity = '0.5');*/ -} - -.edui-default .edui-editor-toolbarmsg { - background-color: #FFF6D9; - border-bottom: 1px solid #ccc; - position: absolute; - bottom: -25px; - left: 0; - z-index: 1009; - width: 99.9%; -} - -.edui-default .edui-editor-toolbarmsg-upload { - font-size: 14px; - color: blue; - width: 100px; - height: 16px; - line-height: 16px; - cursor: pointer; - position: absolute; - top: 5px; - left: 350px; -} - -.edui-default .edui-editor-toolbarmsg-label { - font-size: 12px; - line-height: 16px; - padding: 4px; -} - -.edui-default .edui-editor-toolbarmsg-close { - float: right; - width: 20px; - height: 16px; - line-height: 16px; - cursor: pointer; - color: red; -} -/*可选中菜单按钮*/ -.edui-default .edui-list .edui-bordereraser { - display: none; -} - -.edui-default .edui-listitem { - padding: 1px; - white-space: nowrap; -} - -.edui-default .edui-list .edui-state-hover { - position: relative; - background-color: #fff5d4; - border: 1px solid #dcac6c; - padding: 0; -} - -.edui-default .edui-for-fontfamily .edui-listitem-label { - min-width: 130px; - _width: 120px; - font-size: 12px; - height: 22px; - line-height: 22px; - padding-left: 5px; -} -.edui-default .edui-for-insertcode .edui-listitem-label { - min-width: 120px; - _width: 120px; - font-size: 12px; - height: 22px; - line-height: 22px; - padding-left: 5px; -} -.edui-default .edui-for-underline .edui-listitem-label { - min-width: 120px; - _width: 120px; - padding: 3px 5px; - font-size: 12px; -} - -.edui-default .edui-for-fontsize .edui-listitem-label { - min-width: 120px; - _width: 120px; - padding: 3px 5px; - -} - -.edui-default .edui-for-paragraph .edui-listitem-label { - min-width: 200px; - _width: 200px; - padding: 2px 5px; -} - -.edui-default .edui-for-rowspacingtop .edui-listitem-label, -.edui-default .edui-for-rowspacingbottom .edui-listitem-label { - min-width: 53px; - _width: 53px; - padding: 2px 5px; -} - -.edui-default .edui-for-lineheight .edui-listitem-label { - min-width: 53px; - _width: 53px; - padding: 2px 5px; -} - -.edui-default .edui-for-customstyle .edui-listitem-label { - min-width: 200px; - _width: 200px; - width: 200px !important; - padding: 2px 5px; -} -/* 可选中按钮弹出菜单*/ -.edui-default .edui-menu { - z-index: 3000; -} - -.edui-default .edui-menu .edui-popup-content { - padding: 3px; -} - -.edui-default .edui-menu-body { - _width: 150px; - min-width: 170px; - background: url("../images/sparator_v.png") repeat-y 25px; -} - -.edui-default .edui-menuitem-body { -} - -.edui-default .edui-menuitem { - height: 20px; - cursor: default; - vertical-align: top; -} - -.edui-default .edui-menuitem .edui-icon { - width: 20px !important; - height: 20px !important; - background: url(../images/icons.png) 0 -4000px; - background: url(../images/icons.gif) 0 -4000px\9; -} - -.edui-default .edui-menuitem .edui-label { - font-size: 12px; - line-height: 20px; - height: 20px; - padding-left: 10px; -} - -.edui-default .edui-state-checked .edui-menuitem-body { - background: url("../images/icons-all.gif") no-repeat 6px -205px; -} - -.edui-default .edui-state-disabled .edui-menuitem-label { - color: gray; -} - - -/*不可选中菜单按钮 */ -.edui-default .edui-toolbar .edui-combox-body .edui-button-body { - width: 60px; - font-size: 12px; - height: 20px; - line-height: 20px; - padding-left: 5px; - white-space: nowrap; - margin: 0 3px 0 0; -} - -.edui-default .edui-toolbar .edui-combox-body .edui-arrow { - background: url(../images/icons.png) -741px 0; - _background: url(../images/icons.gif) -741px 0; - height: 20px; - width: 9px; -} - -.edui-default .edui-toolbar .edui-combox .edui-combox-body { - border: 1px solid #CCC; - background-color: white; - border-radius: 2px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; -} - -.edui-default .edui-toolbar .edui-combox-body .edui-splitborder { - display: none; -} - -.edui-default .edui-toolbar .edui-combox-body .edui-arrow { - border-left: 1px solid #CCC; -} - -.edui-default .edui-toolbar .edui-state-hover .edui-combox-body { - background-color: #fff5d4; - border: 1px solid #dcac6c; -} - -.edui-default .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow { - border-left: 1px solid #dcac6c; -} - -.edui-default .edui-toolbar .edui-state-checked .edui-combox-body { - background-color: #FFE69F; - border: 1px solid #DCAC6C; -} - -.edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow { - border-left: 1px solid #DCAC6C; -} - -.edui-toolbar .edui-state-disabled .edui-combox-body { - background-color: #F0F0EE; - opacity: 0.3; - filter: alpha(opacity = 30); -} - -.edui-toolbar .edui-state-opened .edui-combox-body { - background-color: white; - border: 1px solid gray; -} -/*普通按钮样式及状态*/ -.edui-default .edui-toolbar .edui-button .edui-icon, -.edui-default .edui-toolbar .edui-menubutton .edui-icon, -.edui-default .edui-toolbar .edui-splitbutton .edui-icon { - height: 20px !important; - width: 20px !important; - background-image: url(../images/icons.png); - background-image: url(../images/icons.gif) \9; -} - -.edui-default .edui-toolbar .edui-button .edui-button-wrap { - padding: 1px; - position: relative; -} - -.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap { - background-color: #fff5d4; - padding: 0; - border: 1px solid #dcac6c; -} - -.edui-default .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap { - background-color: #ffe69f; - padding: 0; - border: 1px solid #dcac6c; - border-radius: 2px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; -} - -.edui-default .edui-toolbar .edui-button .edui-state-active .edui-button-wrap { - background-color: #ffffff; - padding: 0; - border: 1px solid gray; -} -.edui-default .edui-toolbar .edui-state-disabled .edui-label { - color: #ccc; -} -.edui-default .edui-toolbar .edui-state-disabled .edui-icon { - opacity: 0.3; - filter: alpha(opacity = 30); -} - -/* toolbar icons */ -.edui-default .edui-for-undo .edui-icon { - background-position: -160px 0; -} - -.edui-default .edui-for-redo .edui-icon { - background-position: -100px 0; -} - -.edui-default .edui-for-bold .edui-icon { - background-position: 0 0; -} - -.edui-default .edui-for-italic .edui-icon { - background-position: -60px 0; -} - -.edui-default .edui-for-fontborder .edui-icon { - background-position:-160px -40px; -} -.edui-default .edui-for-underline .edui-icon { - background-position: -140px 0; -} - -.edui-default .edui-for-strikethrough .edui-icon { - background-position: -120px 0; -} - -.edui-default .edui-for-subscript .edui-icon { - background-position: -600px 0; -} - -.edui-default .edui-for-superscript .edui-icon { - background-position: -620px 0; -} - -.edui-default .edui-for-blockquote .edui-icon { - background-position: -220px 0; -} - -.edui-default .edui-for-forecolor .edui-icon { - background-position: -720px 0; -} - -.edui-default .edui-for-backcolor .edui-icon { - background-position: -760px 0; -} - -.edui-default .edui-for-inserttable .edui-icon { - background-position: -580px -20px; -} - -.edui-default .edui-for-autotypeset .edui-icon { - background-position: -640px -40px; -} - -.edui-default .edui-for-justifyleft .edui-icon { - background-position: -460px 0; -} - -.edui-default .edui-for-justifycenter .edui-icon { - background-position: -420px 0; -} - -.edui-default .edui-for-justifyright .edui-icon { - background-position: -480px 0; -} - -.edui-default .edui-for-justifyjustify .edui-icon { - background-position: -440px 0; -} - -.edui-default .edui-for-insertorderedlist .edui-icon { - background-position: -80px 0; -} - -.edui-default .edui-for-insertunorderedlist .edui-icon { - background-position: -20px 0; -} - -.edui-default .edui-for-lineheight .edui-icon { - background-position: -725px -40px; -} - -.edui-default .edui-for-rowspacingbottom .edui-icon { - background-position: -745px -40px; -} - -.edui-default .edui-for-rowspacingtop .edui-icon { - background-position: -765px -40px; -} - -.edui-default .edui-for-horizontal .edui-icon { - background-position: -360px 0; -} - -.edui-default .edui-for-link .edui-icon { - background-position: -500px 0; -} - -.edui-default .edui-for-code .edui-icon { - background-position: -440px -40px; -} - -.edui-default .edui-for-insertimage .edui-icon { - background-position: -726px -77px; -} - -.edui-default .edui-for-insertframe .edui-icon { - background-position: -240px -40px; -} - -.edui-default .edui-for-emoticon .edui-icon { - background-position: -60px -20px; -} - -.edui-default .edui-for-spechars .edui-icon { - background-position: -240px 0; -} - -.edui-default .edui-for-help .edui-icon { - background-position: -340px 0; -} - -.edui-default .edui-for-print .edui-icon { - background-position: -440px -20px; -} - -.edui-default .edui-for-preview .edui-icon { - background-position: -420px -20px; -} - -.edui-default .edui-for-selectall .edui-icon { - background-position: -400px -20px; -} - -.edui-default .edui-for-searchreplace .edui-icon { - background-position: -520px -20px; -} - -.edui-default .edui-for-map .edui-icon { - background-position: -40px -40px; -} - -.edui-default .edui-for-gmap .edui-icon { - background-position: -260px -40px; -} - -.edui-default .edui-for-insertvideo .edui-icon { - background-position: -320px -20px; -} - -.edui-default .edui-for-time .edui-icon { - background-position: -160px -20px; -} - -.edui-default .edui-for-date .edui-icon { - background-position: -140px -20px; -} - -.edui-default .edui-for-cut .edui-icon { - background-position: -680px 0; -} - -.edui-default .edui-for-copy .edui-icon { - background-position: -700px 0; -} - -.edui-default .edui-for-paste .edui-icon { - background-position: -560px 0; -} - -.edui-default .edui-for-formatmatch .edui-icon { - background-position: -40px 0; -} - -.edui-default .edui-for-pasteplain .edui-icon { - background-position: -360px -20px; -} - -.edui-default .edui-for-directionalityltr .edui-icon { - background-position: -20px -20px; -} - -.edui-default .edui-for-directionalityrtl .edui-icon { - background-position: -40px -20px; -} - -.edui-default .edui-for-source .edui-icon { - background-position: -261px -0px; -} - -.edui-default .edui-for-removeformat .edui-icon { - background-position: -580px 0; -} - -.edui-default .edui-for-unlink .edui-icon { - background-position: -640px 0; -} - -.edui-default .edui-for-touppercase .edui-icon { - background-position: -786px 0; -} - -.edui-default .edui-for-tolowercase .edui-icon { - background-position: -806px 0; -} - -.edui-default .edui-for-insertrow .edui-icon { - background-position: -478px -76px; -} - -.edui-default .edui-for-insertrownext .edui-icon { - background-position: -498px -76px; -} - -.edui-default .edui-for-insertcol .edui-icon { - background-position: -455px -76px; -} - -.edui-default .edui-for-insertcolnext .edui-icon { - background-position: -429px -76px; -} - -.edui-default .edui-for-mergeright .edui-icon { - background-position: -60px -40px; -} - -.edui-default .edui-for-mergedown .edui-icon { - background-position: -80px -40px; -} - -.edui-default .edui-for-splittorows .edui-icon { - background-position: -100px -40px; -} - -.edui-default .edui-for-splittocols .edui-icon { - background-position: -120px -40px; -} - -.edui-default .edui-for-insertparagraphbeforetable .edui-icon { - background-position: -140px -40px; -} - -.edui-default .edui-for-deleterow .edui-icon { - background-position: -660px -20px; -} - -.edui-default .edui-for-deletecol .edui-icon { - background-position: -640px -20px; -} - -.edui-default .edui-for-splittocells .edui-icon { - background-position: -800px -20px; -} - -.edui-default .edui-for-mergecells .edui-icon { - background-position: -760px -20px; -} - -.edui-default .edui-for-deletetable .edui-icon { - background-position: -620px -20px; -} - -.edui-default .edui-for-cleardoc .edui-icon { - background-position: -520px 0; -} - -.edui-default .edui-for-fullscreen .edui-icon { - background-position: -100px -20px; -} - -.edui-default .edui-for-anchor .edui-icon { - background-position: -200px 0; -} - -.edui-default .edui-for-pagebreak .edui-icon { - background-position: -460px -40px; -} - -.edui-default .edui-for-imagenone .edui-icon { - background-position: -480px -40px; -} - -.edui-default .edui-for-imageleft .edui-icon { - background-position: -500px -40px; -} - -.edui-default .edui-for-wordimage .edui-icon { - background-position: -660px -40px; -} - -.edui-default .edui-for-imageright .edui-icon { - background-position: -520px -40px; -} - -.edui-default .edui-for-imagecenter .edui-icon { - background-position: -540px -40px; -} - -.edui-default .edui-for-indent .edui-icon { - background-position: -400px 0; -} - -.edui-default .edui-for-outdent .edui-icon { - background-position: -540px 0; -} - -.edui-default .edui-for-webapp .edui-icon { - background-position: -601px -40px -} - -.edui-default .edui-for-table .edui-icon { - background-position: -580px -20px; -} - -.edui-default .edui-for-edittable .edui-icon { - background-position: -420px -40px; -} - -.edui-default .edui-for-template .edui-icon { - background-position: -339px -40px; -} - -.edui-default .edui-for-delete .edui-icon { - background-position: -360px -40px; -} - -.edui-default .edui-for-attachment .edui-icon { - background-position: -620px -40px; -} - -.edui-default .edui-for-edittd .edui-icon { - background-position: -700px -40px; -} - -.edui-default .edui-for-snapscreen .edui-icon { - background-position: -581px -40px -} - -.edui-default .edui-for-scrawl .edui-icon { - background-position: -801px -41px -} - -.edui-default .edui-for-background .edui-icon { - background-position: -680px -40px; -} - -.edui-default .edui-for-music .edui-icon { - background-position: -18px -40px -} - -.edui-default .edui-for-formula .edui-icon { - background-position: -200px -40px -} - -.edui-default .edui-for-aligntd .edui-icon { - background-position: -236px -76px; -} - -.edui-default .edui-for-insertparagraphtrue .edui-icon { - background-position: -625px -76px; -} - -.edui-default .edui-for-insertparagraph .edui-icon { - background-position: -602px -76px; -} - -.edui-default .edui-for-insertcaption .edui-icon { - background-position: -336px -76px; -} - -.edui-default .edui-for-deletecaption .edui-icon { - background-position: -362px -76px; -} - -.edui-default .edui-for-inserttitle .edui-icon { - background-position: -286px -76px; -} - -.edui-default .edui-for-deletetitle .edui-icon { - background-position: -311px -76px; -} - -.edui-default .edui-for-aligntable .edui-icon { - background-position: -440px 0; -} - -.edui-default .edui-for-tablealignment-left .edui-icon { - background-position: -460px 0; -} - -.edui-default .edui-for-tablealignment-center .edui-icon { - background-position: -420px 0; -} - -.edui-default .edui-for-tablealignment-right .edui-icon { - background-position: -480px 0; -} - -.edui-default .edui-for-drafts .edui-icon { - background-position: -560px 0; -} - -.edui-default .edui-for-charts .edui-icon { - background: url( ../images/charts.png ) no-repeat 2px 3px!important; -} - -.edui-default .edui-for-inserttitlecol .edui-icon { - background-position: -673px -76px; -} - -.edui-default .edui-for-deletetitlecol .edui-icon { - background-position: -698px -76px; -} - -.edui-default .edui-for-simpleupload .edui-icon { - background-position: -380px 0px; -} -/*splitbutton*/ -.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow, -.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow { - background: url(../images/icons.png) -741px 0; - _background: url(../images/icons.gif) -741px 0; - height: 20px; - width: 9px; -} - -.edui-default .edui-toolbar .edui-splitbutton .edui-splitbutton-body, -.edui-default .edui-toolbar .edui-menubutton .edui-menubutton-body { - padding: 1px; -} - -.edui-default .edui-toolbar .edui-splitborder { - width: 1px; - height: 20px; -} - -.edui-default .edui-toolbar .edui-state-hover .edui-splitborder { - width: 1px; - border-left: 0px solid #dcac6c; -} - -.edui-default .edui-toolbar .edui-state-active .edui-splitborder { - width: 0; - border-left: 1px solid gray; -} - -.edui-default .edui-toolbar .edui-state-opened .edui-splitborder { - width: 1px; - border: 0; -} - -.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body, -.edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body { - background-color: #fff5d4; - border: 1px solid #dcac6c; - padding: 0; -} - -.edui-default .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body, -.edui-default .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body { - background-color: #FFE69F; - border: 1px solid #DCAC6C; - padding: 0; -} - -.edui-default .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body, -.edui-default .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body { - background-color: #ffffff; - border: 1px solid gray; - padding: 0; -} - -.edui-default .edui-state-disabled .edui-arrow { - opacity: 0.3; - _filter: alpha(opacity = 30); -} - -.edui-default .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body, -.edui-default .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body { - background-color: white; - border: 1px solid gray; - padding: 0; -} - -.edui-default .edui-for-insertorderedlist .edui-bordereraser, -.edui-default .edui-for-lineheight .edui-bordereraser, -.edui-default .edui-for-rowspacingtop .edui-bordereraser, -.edui-default .edui-for-rowspacingbottom .edui-bordereraser, -.edui-default .edui-for-insertunorderedlist .edui-bordereraser { - background-color: white; -} - -/* 解决嵌套导致的图标问题 */ -.edui-default .edui-for-insertorderedlist .edui-popup-body .edui-icon, -.edui-default .edui-for-lineheight .edui-popup-body .edui-icon, -.edui-default .edui-for-rowspacingtop .edui-popup-body .edui-icon, -.edui-default .edui-for-rowspacingbottom .edui-popup-body .edui-icon, -.edui-default .edui-for-insertunorderedlist .edui-popup-body .edui-icon { - /*background-position: 0 -40px;*/ - background-image: none ; -} - -/* 弹出菜单 */ -.edui-default .edui-popup { - z-index: 3000; - background-color: #ffffff; - width:auto; - height:auto; - -} - -.edui-default .edui-popup .edui-shadow { - left: 0; - top: 0; - width: 100%; - height: 100%; -} - -.edui-default .edui-popup-content { - border:1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 3px 4px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 3px 4px rgba(0, 0, 0, 0.2); - box-shadow: 0 3px 4px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; - padding: 5px; - background:#ffffff; -} - -.edui-default .edui-popup .edui-bordereraser { - background-color: white; - height: 3px; -} - -.edui-default .edui-menu .edui-bordereraser { - height: 3px; -} - -.edui-default .edui-anchor-topleft .edui-bordereraser { - left: 1px; - top: -2px; -} - -.edui-default .edui-anchor-topright .edui-bordereraser { - right: 1px; - top: -2px; -} - -.edui-default .edui-anchor-bottomleft .edui-bordereraser { - left: 0; - bottom: -6px; - height: 7px; - border-left: 1px solid gray; - border-right: 1px solid gray; -} - -.edui-default .edui-anchor-bottomright .edui-bordereraser { - right: 0; - bottom: -6px; - height: 7px; - border-left: 1px solid gray; - border-right: 1px solid gray; -} - -.edui-popup div{ - width:auto; - height:auto; -} -.edui-default .edui-editor-messageholder { - display: block; - width: 150px; - height: auto; - border: 0; - margin: 0; - padding: 0; - position: absolute; - top: 28px; - right: 3px; -} - -.edui-default .edui-message{ - min-height: 10px; - text-shadow: 0 1px 0 rgba(255,255,255,0.5); - padding: 0; - margin-bottom: 3px; - position: relative; -} -.edui-default .edui-message-body{ - border-radius: 3px; - padding: 8px 15px 8px 8px; - color: #c09853; - background-color: #fcf8e3; - border: 1px solid #fbeed5; -} -.edui-default .edui-message-type-info{ - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1 -} -.edui-default .edui-message-type-success{ - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6 -} -.edui-default .edui-message-type-danger, -.edui-default .edui-message-type-error{ - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7 -} -.edui-default .edui-message .edui-message-closer { - display: block; - width: 16px; - height: 16px; - line-height: 16px; - position: absolute; - top: 0; - right: 0; - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - float: right; - font-size: 20px; - font-weight: bold; - color: #999; - text-shadow: 0 1px 0 #fff; - font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; -} -.edui-default .edui-message .edui-message-content { - font-size: 10pt; - word-wrap: break-word; - word-break: normal; -} -/* 弹出对话框按钮和对话框大小 */ -.edui-default .edui-dialog { - z-index: 9999 !important; - position: absolute; - -} - -.edui-dialog div{ - width:auto; -} - -.edui-default .edui-dialog-wrap { - margin-right: 6px; - margin-bottom: 6px; -} - -.edui-default .edui-dialog-fullscreen-flag { - margin-right: 0; - margin-bottom: 0; -} - -.edui-default .edui-dialog-body { - position: relative; - padding:2px 0 0 2px; - _zoom: 1; -} - -.edui-default .edui-dialog-fullscreen-flag .edui-dialog-body { - padding: 0; -} - -.edui-default .edui-dialog-shadow { - position: absolute; - z-index: -1; - left: 0; - top: 0; - width: 100%; - height: 100%; - background-color: #ffffff; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, 0.2); - *border-right-width: 2px; - *border-bottom-width: 2px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -webkit-background-clip: padding-box; - -moz-background-clip: padding; - background-clip: padding-box; -} - -.edui-default .edui-dialog-foot { - background-color: white; -} - -.edui-default .edui-dialog-titlebar { - height: 26px; - border-bottom: 1px solid #c6c6c6; - background: url(../images/dialog-title-bg.png) repeat-x bottom; - position: relative; - cursor: move; -} -.edui-default .edui-dialog-caption { - font-weight: bold; - font-size: 12px; - line-height: 26px; - padding-left: 5px; -} - -.edui-default .edui-dialog-draghandle { - height: 26px; -} - -.edui-default .edui-dialog-closebutton { - position: absolute !important; - right: 5px; - top: 3px; -} - -.edui-default .edui-dialog-closebutton .edui-button-body { - height: 20px; - width: 20px; - cursor: pointer; - background: url("../images/icons-all.gif") no-repeat 0 -59px; -} - -.edui-default .edui-dialog-closebutton .edui-state-hover .edui-button-body { - background: url("../images/icons-all.gif") no-repeat 0 -89px; -} - -.edui-default .edui-dialog-foot { - height: 40px; -} - -.edui-default .edui-dialog-buttons { - position: absolute; - right: 0; -} - -.edui-default .edui-dialog-buttons .edui-button { - margin-right: 10px; -} - -.edui-default .edui-dialog-buttons .edui-button .edui-button-body { - background: url("../images/icons-all.gif") no-repeat; - height: 24px; - width: 96px; - font-size: 12px; - line-height: 24px; - text-align: center; - cursor: default; -} - -.edui-default .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body { - background: url("../images/icons-all.gif") no-repeat 0 -30px; -} - -.edui-default .edui-dialog iframe { - border: 0; - padding: 0; - margin: 0; - vertical-align: top; -} - -.edui-default .edui-dialog-modalmask { - opacity: 0.3; - filter: alpha(opacity = 30); - background-color: #ccc; - position: absolute; - /*z-index: 1999;*/ -} - -.edui-default .edui-dialog-dragmask { - position: absolute; - /*z-index: 2001;*/ - background-color: transparent; - cursor: move; -} - -.edui-default .edui-dialog-content { - position: relative; -} - -.edui-default .dialogcontmask { - cursor: move; - visibility: hidden; - display: block; - position: absolute; - width: 100%; - height: 100%; - opacity: 0; - filter: alpha(opacity = 0); -} - -/*link-dialog*/ -.edui-default .edui-for-link .edui-dialog-content { - width: 420px; - height: 200px; - overflow: hidden; -} -/*background-dialog*/ -.edui-default .edui-for-background .edui-dialog-content { - width: 440px; - height: 280px; - overflow: hidden; -} - -/*template-dialog*/ -.edui-default .edui-for-template .edui-dialog-content { - width: 630px; - height: 390px; - overflow: hidden; -} - -/*scrawl-dialog*/ -.edui-default .edui-for-scrawl .edui-dialog-content { - width: 515px; - *width: 506px; - height: 360px; -} - -/*spechars-dialog*/ -.edui-default .edui-for-spechars .edui-dialog-content { - width: 620px; - height: 500px; - *width: 630px; - *height: 570px; -} - -/*image-dialog*/ -.edui-default .edui-for-insertimage .edui-dialog-content { - width: 650px; - height: 400px; - overflow: hidden; -} -/*webapp-dialog*/ -.edui-default .edui-for-webapp .edui-dialog-content { - width: 560px; - _width: 565px; - height: 450px; - overflow: hidden; -} - -/*image-insertframe*/ -.edui-default .edui-for-insertframe .edui-dialog-content { - width: 350px; - height: 200px; - overflow: hidden; -} - -/*wordImage-dialog*/ -.edui-default .edui-for-wordimage .edui-dialog-content { - width: 620px; - height: 380px; - overflow: hidden; -} - -/*attachment-dialog*/ -.edui-default .edui-for-attachment .edui-dialog-content { - width: 650px; - height: 400px; - overflow: hidden; -} - - -/*map-dialog*/ -.edui-default .edui-for-map .edui-dialog-content { - width: 550px; - height: 400px; -} - -/*gmap-dialog*/ -.edui-default .edui-for-gmap .edui-dialog-content { - width: 550px; - height: 400px; -} - -/*video-dialog*/ -.edui-default .edui-for-insertvideo .edui-dialog-content { - width: 590px; - height: 390px; -} - -/*anchor-dialog*/ -.edui-default .edui-for-anchor .edui-dialog-content { - width: 320px; - height: 60px; - overflow: hidden; -} - -/*searchreplace-dialog*/ -.edui-default .edui-for-searchreplace .edui-dialog-content { - width: 400px; - height: 220px; -} - -/*help-dialog*/ -.edui-default .edui-for-help .edui-dialog-content { - width: 400px; - height: 420px; -} - -/*edittable-dialog*/ -.edui-default .edui-for-edittable .edui-dialog-content { - width: 540px; - _width:590px; - height: 335px; -} - -/*edittip-dialog*/ -.edui-default .edui-for-edittip .edui-dialog-content { - width: 225px; - height: 60px; -} - -/*edittd-dialog*/ -.edui-default .edui-for-edittd .edui-dialog-content { - width: 240px; - height: 50px; -} -/*snapscreen-dialog*/ -.edui-default .edui-for-snapscreen .edui-dialog-content { - width: 400px; - height: 220px; -} - -/*music-dialog*/ -.edui-default .edui-for-music .edui-dialog-content { - width: 515px; - height: 360px; -} - -/*段落弹出菜单*/ -.edui-default .edui-for-paragraph .edui-listitem-label { - font-family: Tahoma, Verdana, Arial, Helvetica; -} - -.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-p { - font-size: 22px; - line-height: 27px; -} - -.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h1 { - font-weight: bolder; - font-size: 32px; - line-height: 36px; -} - -.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h2 { - font-weight: bolder; - font-size: 27px; - line-height: 29px; -} - -.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h3 { - font-weight: bolder; - font-size: 19px; - line-height: 23px; -} - -.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h4 { - font-weight: bolder; - font-size: 16px; - line-height: 19px -} - -.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h5 { - font-weight: bolder; - font-size: 13px; - line-height: 16px; -} - -.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h6 { - font-weight: bolder; - font-size: 12px; - line-height: 14px; -} -/* 表格弹出菜单 */ -.edui-default .edui-for-inserttable .edui-splitborder { - display: none -} -.edui-default .edui-for-inserttable .edui-splitbutton-body .edui-arrow { - width: 0 -} -.edui-default .edui-toolbar .edui-for-inserttable .edui-state-active .edui-splitborder{ - border-left: 1px solid transparent; -} -.edui-default .edui-tablepicker .edui-infoarea { - height: 14px; - line-height: 14px; - font-size: 12px; - width: 220px; - margin-bottom: 3px; - clear: both; -} - -.edui-default .edui-tablepicker .edui-infoarea .edui-label { - float: left; -} - -.edui-default .edui-dialog-buttons .edui-label { - line-height: 24px; -} - -.edui-default .edui-tablepicker .edui-infoarea .edui-clickable { - float: right; -} - -.edui-default .edui-tablepicker .edui-pickarea { - background: url("../images/unhighlighted.gif") repeat; - height: 220px; - width: 220px; -} - -.edui-default .edui-tablepicker .edui-pickarea .edui-overlay { - background: url("../images/highlighted.gif") repeat; -} - -/* 颜色弹出菜单 */ -.edui-default .edui-colorpicker-topbar { - height: 27px; - width: 200px; - /*border-bottom: 1px gray dashed;*/ -} - -.edui-default .edui-colorpicker-preview { - height: 20px; - border: 1px inset black; - margin-left: 1px; - width: 128px; - float: left; -} - -.edui-default .edui-colorpicker-nocolor { - float: right; - margin-right: 1px; - font-size: 12px; - line-height: 14px; - height: 14px; - border: 1px solid #333; - padding: 3px 5px; - cursor: pointer; -} - -.edui-default .edui-colorpicker-tablefirstrow { - height: 30px; -} - -.edui-default .edui-colorpicker-colorcell { - width: 14px; - height: 14px; - display: block; - margin: 0; - cursor: pointer; -} - -.edui-default .edui-colorpicker-colorcell:hover { - width: 14px; - height: 14px; - margin: 0; -} -.edui-default .edui-colorpicker-advbtn{ - display: block; - text-align: center; - cursor: pointer; - height:20px; -} -.arrow_down{ - background: white url('../images/arrow_down.png') no-repeat center; -} -.arrow_up{ - background: white url('../images/arrow_up.png') no-repeat center; -} -/*高级的样式*/ -.edui-colorpicker-adv{ - position: relative; - overflow: hidden; - height: 180px; - display: none; -} -.edui-colorpicker-plant, .edui-colorpicker-hue { - border: solid 1px #666; -} -.edui-colorpicker-pad { - width: 150px; - height: 150px; - left: 14px; - top: 13px; - position: absolute; - background: red; - overflow: hidden; - cursor: crosshair; -} -.edui-colorpicker-cover{ - position: absolute; - top: 0; - left: 0; - width: 150px; - height: 150px; - background: url("../images/tangram-colorpicker.png") -160px -200px; -} -.edui-colorpicker-padDot{ - position: absolute; - top: 0; - left: 0; - width: 11px; - height: 11px; - overflow: hidden; - background: url(../images/tangram-colorpicker.png) 0px -200px repeat-x; - z-index: 1000; - -} -.edui-colorpicker-sliderMain { - position: absolute; - left: 171px; - top: 13px; - width: 19px; - height: 152px; - background: url(../images/tangram-colorpicker.png) -179px -12px no-repeat; - -} -.edui-colorpicker-slider { - width: 100%; - height: 100%; - cursor: pointer; -} -.edui-colorpicker-thumb{ - position: absolute; - top: 0; - cursor: pointer; - height: 3px; - left: -1px; - right: -1px; - border: 1px solid black; - background: white; - opacity: .8; -} -/*自动排版弹出菜单*/ -.edui-default .edui-autotypesetpicker .edui-autotypesetpicker-body { - font-size: 12px; - margin-bottom: 3px; - clear: both; -} - -.edui-default .edui-autotypesetpicker-body table { - border-collapse: separate; - border-spacing: 2px; -} - -.edui-default .edui-autotypesetpicker-body td { - font-size: 12px; - word-wrap:break-word; -} - -.edui-default .edui-autotypesetpicker-body td input { - margin: 3px 3px 3px 4px; - *margin: 1px 0 0 0; -} -/*自动排版弹出菜单*/ -.edui-default .edui-cellalignpicker .edui-cellalignpicker-body { - width: 70px; - font-size: 12px; - cursor: default; -} - -.edui-default .edui-cellalignpicker-body table { - border-collapse: separate; - border-spacing: 0; -} -.edui-default .edui-cellalignpicker-body td{ - padding: 1px; -} -.edui-default .edui-cellalignpicker-body .edui-icon{ - height: 20px; - width: 20px; - padding: 1px; - background-image: url(../images/table-cell-align.png); -} - -.edui-default .edui-cellalignpicker-body .edui-left{ - background-position: 0 0; -} - -.edui-default .edui-cellalignpicker-body .edui-center{ - background-position: -25px 0; -} -.edui-default .edui-cellalignpicker-body .edui-right{ - background-position: -51px 0; -} - -.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-left{ - background-position: -73px 0; -} - -.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-center{ - background-position: -98px 0; -} - -.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-right{ - background-position: -124px 0; -} - -.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-left { - background-position: -146px 0; - background-color: #f1f4f5; -} - -.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-center { - background-position: -245px 0; -} - -.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-right { - background-position: -271px 0; -} -/*分隔线*/ -.edui-default .edui-toolbar .edui-separator { - width: 2px; - height: 20px; - margin: 2px 4px 2px 3px; - background: url(../images/icons.png) -181px 0; - background: url(../images/icons.gif) -181px 0 \9; -} - -/*颜色按钮 */ -.edui-default .edui-toolbar .edui-colorbutton .edui-colorlump { - position: absolute; - overflow: hidden; - bottom: 1px; - left: 1px; - width: 18px; - height: 4px; -} -/*表情按钮及弹出菜单*/ -/*去除了表情的下拉箭头*/ -.edui-default .edui-for-emotion .edui-icon { - background-position: -60px -20px; -} -.edui-default .edui-for-emotion .edui-popup-content iframe -{ - width: 514px; - height: 380px; - overflow: hidden; -} -.edui-default .edui-for-emotion .edui-popup-content -{ - position: relative; - z-index: 555 -} - -.edui-default .edui-for-emotion .edui-splitborder { - display: none -} - -.edui-default .edui-for-emotion .edui-splitbutton-body .edui-arrow -{ - width: 0 -} -.edui-default .edui-toolbar .edui-for-emotion .edui-state-active .edui-splitborder -{ - border-left: 1px solid transparent; -} -/*contextmenu*/ -.edui-default .edui-hassubmenu .edui-arrow { - height: 20px; - width: 20px; - float: right; - background: url("../images/icons-all.gif") no-repeat 10px -233px; -} - -.edui-default .edui-menu-body .edui-menuitem { - padding: 1px; -} - -.edui-default .edui-menuseparator { - margin: 2px 0; - height: 1px; - overflow: hidden; -} - -.edui-default .edui-menuseparator-inner { - border-bottom: 1px solid #e2e3e3; - margin-left: 29px; - margin-right: 1px; -} - -.edui-default .edui-menu-body .edui-state-hover { - padding: 0 !important; - background-color: #fff5d4; - border: 1px solid #dcac6c; -} -/*弹出菜单*/ -.edui-default .edui-shortcutmenu { - padding: 2px; - width: 190px; - height: 50px; - background-color: #fff; - border: 1px solid #ccc; - border-radius: 5px; -} - -/*粘贴弹出菜单*/ -.edui-default .edui-wordpastepop .edui-popup-content{ - border: none; - padding: 0; - width: 54px; - height: 21px; -} -.edui-default .edui-pasteicon { - width: 100%; - height: 100%; - background-image: url('../images/wordpaste.png'); - background-position: 0 0; -} - -.edui-default .edui-pasteicon.edui-state-opened { - background-position: 0 -34px; -} - -.edui-default .edui-pastecontainer { - position: relative; - visibility: hidden; - width: 97px; - background: #fff; - border: 1px solid #ccc; -} - -.edui-default .edui-pastecontainer .edui-title { - font-weight: bold; - background: #F8F8FF; - height: 25px; - line-height: 25px; - font-size: 12px; - padding-left: 5px; -} - -.edui-default .edui-pastecontainer .edui-button { - overflow: hidden; - margin: 3px 0; -} - -.edui-default .edui-pastecontainer .edui-button .edui-richtxticon, -.edui-default .edui-pastecontainer .edui-button .edui-tagicon, -.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{ - float: left; - cursor: pointer; - width: 29px; - height: 29px; - margin-left: 5px; - background-image: url('../images/wordpaste.png'); - background-repeat: no-repeat; -} -.edui-default .edui-pastecontainer .edui-button .edui-richtxticon { - margin-left: 0; - background-position: -109px 0; -} -.edui-default .edui-pastecontainer .edui-button .edui-tagicon { - background-position: -148px 1px; -} - -.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon { - background-position: -72px 0; -} - -.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-richtxticon { - background-position: -109px -34px; -} -.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-tagicon{ - background-position: -148px -34px; -} -.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-plaintxticon{ - background-position: -72px -34px; -} \ No newline at end of file diff --git a/public/static/admin/UEditor/themes/default/css/ueditor.min.css b/public/static/admin/UEditor/themes/default/css/ueditor.min.css deleted file mode 100644 index 8ca74eb..0000000 --- a/public/static/admin/UEditor/themes/default/css/ueditor.min.css +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * UEditor - * version: ueditor - * build: Wed Dec 26 2018 17:25:05 GMT+0800 (CST) - */ - - -.edui-default .edui-box{border:0;padding:0;margin:0;overflow:hidden}.edui-default a.edui-box{display:block;text-decoration:none;color:#000}.edui-default a.edui-box:hover{text-decoration:none}.edui-default a.edui-box:active{text-decoration:none}.edui-default table.edui-box{border-collapse:collapse}.edui-default ul.edui-box{list-style-type:none}div.edui-box{position:relative;display:-moz-inline-box!important;display:inline-block!important;vertical-align:top}.edui-default .edui-clearfix{zoom:1}.edui-default .edui-clearfix:after{content:'\20';display:block;clear:both}* html div.edui-box{display:inline!important}:first-child+html div.edui-box{display:inline!important}.edui-default .edui-button-body,.edui-splitbutton-body,.edui-menubutton-body,.edui-combox-body{position:relative}.edui-default .edui-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none}.edui-default .edui-popup .edui-shadow{position:absolute;z-index:-1}.edui-default .edui-popup .edui-bordereraser{position:absolute;overflow:hidden}.edui-default .edui-tablepicker .edui-canvas{position:relative}.edui-default .edui-tablepicker .edui-canvas .edui-overlay{position:absolute}.edui-default .edui-dialog-modalmask,.edui-dialog-dragmask{position:absolute;left:0;top:0;width:100%;height:100%}.edui-default .edui-toolbar{position:relative}.edui-default .edui-label{cursor:default}.edui-default span.edui-clickable{color:#00f;cursor:pointer;text-decoration:underline}.edui-default span.edui-unclickable{color:gray;cursor:default}.edui-default .edui-toolbar{cursor:default;-webkit-user-select:none;-moz-user-select:none;padding:1px;overflow:hidden;zoom:1;width:auto;height:auto}.edui-default .edui-toolbar .edui-button,.edui-default .edui-toolbar .edui-splitbutton,.edui-default .edui-toolbar .edui-menubutton,.edui-default .edui-toolbar .edui-combox{margin:1px}.edui-default .edui-editor{border:1px solid #d4d4d4;background-color:#fff;position:relative;overflow:visible;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.edui-editor div{width:auto;height:auto}.edui-default .edui-editor-toolbarbox{position:relative;zoom:1;-webkit-box-shadow:0 1px 4px rgba(204,204,204,.6);-moz-box-shadow:0 1px 4px rgba(204,204,204,.6);box-shadow:0 1px 4px rgba(204,204,204,.6);border-top-left-radius:2px;border-top-right-radius:2px}.edui-default .edui-editor-toolbarboxouter{border-bottom:1px solid #d4d4d4;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,.065);box-shadow:0 1px 4px rgba(0,0,0,.065)}.edui-default .edui-editor-toolbarboxinner{padding:2px}.edui-default .edui-editor-iframeholder{position:relative}.edui-default .edui-editor-bottomContainer{overflow:hidden}.edui-default .edui-editor-bottomContainer table{width:100%;height:0;overflow:hidden;border-spacing:0}.edui-default .edui-editor-bottomContainer td{white-space:nowrap;border-top:1px solid #ccc;line-height:20px;font-size:12px;font-family:Arial,Helvetica,Tahoma,Verdana,Sans-Serif}.edui-default .edui-editor-wordcount{text-align:right;margin-right:5px;color:#aaa}.edui-default .edui-editor-scale{width:12px}.edui-default .edui-editor-scale .edui-editor-icon{float:right;width:100%;height:12px;margin-top:10px;background:url(../images/scale.png) no-repeat;cursor:se-resize}.edui-default .edui-editor-breadcrumb{margin:2px 0 0 3px}.edui-default .edui-editor-breadcrumb span{cursor:pointer;text-decoration:underline;color:#00f}.edui-default .edui-toolbar .edui-for-fullscreen{float:right}.edui-default .edui-bubble .edui-popup-content{border:1px solid #DCAC6C;background-color:#fff6d9;padding:5px;font-size:10pt;font-family:"宋体"}.edui-default .edui-bubble .edui-shadow{}.edui-default .edui-editor-toolbarmsg{background-color:#FFF6D9;border-bottom:1px solid #ccc;position:absolute;bottom:-25px;left:0;z-index:1009;width:99.9%}.edui-default .edui-editor-toolbarmsg-upload{font-size:14px;color:#00f;width:100px;height:16px;line-height:16px;cursor:pointer;position:absolute;top:5px;left:350px}.edui-default .edui-editor-toolbarmsg-label{font-size:12px;line-height:16px;padding:4px}.edui-default .edui-editor-toolbarmsg-close{float:right;width:20px;height:16px;line-height:16px;cursor:pointer;color:red}.edui-default .edui-list .edui-bordereraser{display:none}.edui-default .edui-listitem{padding:1px;white-space:nowrap}.edui-default .edui-list .edui-state-hover{position:relative;background-color:#fff5d4;border:1px solid #dcac6c;padding:0}.edui-default .edui-for-fontfamily .edui-listitem-label{min-width:130px;_width:120px;font-size:12px;height:22px;line-height:22px;padding-left:5px}.edui-default .edui-for-insertcode .edui-listitem-label{min-width:120px;_width:120px;font-size:12px;height:22px;line-height:22px;padding-left:5px}.edui-default .edui-for-underline .edui-listitem-label{min-width:120px;_width:120px;padding:3px 5px;font-size:12px}.edui-default .edui-for-fontsize .edui-listitem-label{min-width:120px;_width:120px;padding:3px 5px}.edui-default .edui-for-paragraph .edui-listitem-label{min-width:200px;_width:200px;padding:2px 5px}.edui-default .edui-for-rowspacingtop .edui-listitem-label,.edui-default .edui-for-rowspacingbottom .edui-listitem-label{min-width:53px;_width:53px;padding:2px 5px}.edui-default .edui-for-lineheight .edui-listitem-label{min-width:53px;_width:53px;padding:2px 5px}.edui-default .edui-for-customstyle .edui-listitem-label{min-width:200px;_width:200px;width:200px!important;padding:2px 5px}.edui-default .edui-menu{z-index:3000}.edui-default .edui-menu .edui-popup-content{padding:3px}.edui-default .edui-menu-body{_width:150px;min-width:170px;background:url(../images/sparator_v.png) repeat-y 25px}.edui-default .edui-menuitem-body{}.edui-default .edui-menuitem{height:20px;cursor:default;vertical-align:top}.edui-default .edui-menuitem .edui-icon{width:20px!important;height:20px!important;background:url(../images/icons.png) 0 -4000px;background:url(../images/icons.gif) 0 -4000px\9}.edui-default .edui-menuitem .edui-label{font-size:12px;line-height:20px;height:20px;padding-left:10px}.edui-default .edui-state-checked .edui-menuitem-body{background:url(../images/icons-all.gif) no-repeat 6px -205px}.edui-default .edui-state-disabled .edui-menuitem-label{color:gray}.edui-default .edui-toolbar .edui-combox-body .edui-button-body{width:60px;font-size:12px;height:20px;line-height:20px;padding-left:5px;white-space:nowrap;margin:0 3px 0 0}.edui-default .edui-toolbar .edui-combox-body .edui-arrow{background:url(../images/icons.png) -741px 0;_background:url(../images/icons.gif) -741px 0;height:20px;width:9px}.edui-default .edui-toolbar .edui-combox .edui-combox-body{border:1px solid #CCC;background-color:#fff;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.edui-default .edui-toolbar .edui-combox-body .edui-splitborder{display:none}.edui-default .edui-toolbar .edui-combox-body .edui-arrow{border-left:1px solid #CCC}.edui-default .edui-toolbar .edui-state-hover .edui-combox-body{background-color:#fff5d4;border:1px solid #dcac6c}.edui-default .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow{border-left:1px solid #dcac6c}.edui-default .edui-toolbar .edui-state-checked .edui-combox-body{background-color:#FFE69F;border:1px solid #DCAC6C}.edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow{border-left:1px solid #DCAC6C}.edui-toolbar .edui-state-disabled .edui-combox-body{background-color:#F0F0EE;opacity:.3;filter:alpha(opacity=30)}.edui-toolbar .edui-state-opened .edui-combox-body{background-color:#fff;border:1px solid gray}.edui-default .edui-toolbar .edui-button .edui-icon,.edui-default .edui-toolbar .edui-menubutton .edui-icon,.edui-default .edui-toolbar .edui-splitbutton .edui-icon{height:20px!important;width:20px!important;background-image:url(../images/icons.png);background-image:url(../images/icons.gif) \9}.edui-default .edui-toolbar .edui-button .edui-button-wrap{padding:1px;position:relative}.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap{background-color:#fff5d4;padding:0;border:1px solid #dcac6c}.edui-default .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap{background-color:#ffe69f;padding:0;border:1px solid #dcac6c;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.edui-default .edui-toolbar .edui-button .edui-state-active .edui-button-wrap{background-color:#fff;padding:0;border:1px solid gray}.edui-default .edui-toolbar .edui-state-disabled .edui-label{color:#ccc}.edui-default .edui-toolbar .edui-state-disabled .edui-icon{opacity:.3;filter:alpha(opacity=30)}.edui-default .edui-for-undo .edui-icon{background-position:-160px 0}.edui-default .edui-for-redo .edui-icon{background-position:-100px 0}.edui-default .edui-for-bold .edui-icon{background-position:0 0}.edui-default .edui-for-italic .edui-icon{background-position:-60px 0}.edui-default .edui-for-fontborder .edui-icon{background-position:-160px -40px}.edui-default .edui-for-underline .edui-icon{background-position:-140px 0}.edui-default .edui-for-strikethrough .edui-icon{background-position:-120px 0}.edui-default .edui-for-subscript .edui-icon{background-position:-600px 0}.edui-default .edui-for-superscript .edui-icon{background-position:-620px 0}.edui-default .edui-for-blockquote .edui-icon{background-position:-220px 0}.edui-default .edui-for-forecolor .edui-icon{background-position:-720px 0}.edui-default .edui-for-backcolor .edui-icon{background-position:-760px 0}.edui-default .edui-for-inserttable .edui-icon{background-position:-580px -20px}.edui-default .edui-for-autotypeset .edui-icon{background-position:-640px -40px}.edui-default .edui-for-justifyleft .edui-icon{background-position:-460px 0}.edui-default .edui-for-justifycenter .edui-icon{background-position:-420px 0}.edui-default .edui-for-justifyright .edui-icon{background-position:-480px 0}.edui-default .edui-for-justifyjustify .edui-icon{background-position:-440px 0}.edui-default .edui-for-insertorderedlist .edui-icon{background-position:-80px 0}.edui-default .edui-for-insertunorderedlist .edui-icon{background-position:-20px 0}.edui-default .edui-for-lineheight .edui-icon{background-position:-725px -40px}.edui-default .edui-for-rowspacingbottom .edui-icon{background-position:-745px -40px}.edui-default .edui-for-rowspacingtop .edui-icon{background-position:-765px -40px}.edui-default .edui-for-horizontal .edui-icon{background-position:-360px 0}.edui-default .edui-for-link .edui-icon{background-position:-500px 0}.edui-default .edui-for-code .edui-icon{background-position:-440px -40px}.edui-default .edui-for-insertimage .edui-icon{background-position:-726px -77px}.edui-default .edui-for-insertframe .edui-icon{background-position:-240px -40px}.edui-default .edui-for-emoticon .edui-icon{background-position:-60px -20px}.edui-default .edui-for-spechars .edui-icon{background-position:-240px 0}.edui-default .edui-for-help .edui-icon{background-position:-340px 0}.edui-default .edui-for-print .edui-icon{background-position:-440px -20px}.edui-default .edui-for-preview .edui-icon{background-position:-420px -20px}.edui-default .edui-for-selectall .edui-icon{background-position:-400px -20px}.edui-default .edui-for-searchreplace .edui-icon{background-position:-520px -20px}.edui-default .edui-for-map .edui-icon{background-position:-40px -40px}.edui-default .edui-for-gmap .edui-icon{background-position:-260px -40px}.edui-default .edui-for-insertvideo .edui-icon{background-position:-320px -20px}.edui-default .edui-for-time .edui-icon{background-position:-160px -20px}.edui-default .edui-for-date .edui-icon{background-position:-140px -20px}.edui-default .edui-for-cut .edui-icon{background-position:-680px 0}.edui-default .edui-for-copy .edui-icon{background-position:-700px 0}.edui-default .edui-for-paste .edui-icon{background-position:-560px 0}.edui-default .edui-for-formatmatch .edui-icon{background-position:-40px 0}.edui-default .edui-for-pasteplain .edui-icon{background-position:-360px -20px}.edui-default .edui-for-directionalityltr .edui-icon{background-position:-20px -20px}.edui-default .edui-for-directionalityrtl .edui-icon{background-position:-40px -20px}.edui-default .edui-for-source .edui-icon{background-position:-261px -0px}.edui-default .edui-for-removeformat .edui-icon{background-position:-580px 0}.edui-default .edui-for-unlink .edui-icon{background-position:-640px 0}.edui-default .edui-for-touppercase .edui-icon{background-position:-786px 0}.edui-default .edui-for-tolowercase .edui-icon{background-position:-806px 0}.edui-default .edui-for-insertrow .edui-icon{background-position:-478px -76px}.edui-default .edui-for-insertrownext .edui-icon{background-position:-498px -76px}.edui-default .edui-for-insertcol .edui-icon{background-position:-455px -76px}.edui-default .edui-for-insertcolnext .edui-icon{background-position:-429px -76px}.edui-default .edui-for-mergeright .edui-icon{background-position:-60px -40px}.edui-default .edui-for-mergedown .edui-icon{background-position:-80px -40px}.edui-default .edui-for-splittorows .edui-icon{background-position:-100px -40px}.edui-default .edui-for-splittocols .edui-icon{background-position:-120px -40px}.edui-default .edui-for-insertparagraphbeforetable .edui-icon{background-position:-140px -40px}.edui-default .edui-for-deleterow .edui-icon{background-position:-660px -20px}.edui-default .edui-for-deletecol .edui-icon{background-position:-640px -20px}.edui-default .edui-for-splittocells .edui-icon{background-position:-800px -20px}.edui-default .edui-for-mergecells .edui-icon{background-position:-760px -20px}.edui-default .edui-for-deletetable .edui-icon{background-position:-620px -20px}.edui-default .edui-for-cleardoc .edui-icon{background-position:-520px 0}.edui-default .edui-for-fullscreen .edui-icon{background-position:-100px -20px}.edui-default .edui-for-anchor .edui-icon{background-position:-200px 0}.edui-default .edui-for-pagebreak .edui-icon{background-position:-460px -40px}.edui-default .edui-for-imagenone .edui-icon{background-position:-480px -40px}.edui-default .edui-for-imageleft .edui-icon{background-position:-500px -40px}.edui-default .edui-for-wordimage .edui-icon{background-position:-660px -40px}.edui-default .edui-for-imageright .edui-icon{background-position:-520px -40px}.edui-default .edui-for-imagecenter .edui-icon{background-position:-540px -40px}.edui-default .edui-for-indent .edui-icon{background-position:-400px 0}.edui-default .edui-for-outdent .edui-icon{background-position:-540px 0}.edui-default .edui-for-webapp .edui-icon{background-position:-601px -40px}.edui-default .edui-for-table .edui-icon{background-position:-580px -20px}.edui-default .edui-for-edittable .edui-icon{background-position:-420px -40px}.edui-default .edui-for-template .edui-icon{background-position:-339px -40px}.edui-default .edui-for-delete .edui-icon{background-position:-360px -40px}.edui-default .edui-for-attachment .edui-icon{background-position:-620px -40px}.edui-default .edui-for-edittd .edui-icon{background-position:-700px -40px}.edui-default .edui-for-snapscreen .edui-icon{background-position:-581px -40px}.edui-default .edui-for-scrawl .edui-icon{background-position:-801px -41px}.edui-default .edui-for-background .edui-icon{background-position:-680px -40px}.edui-default .edui-for-music .edui-icon{background-position:-18px -40px}.edui-default .edui-for-formula .edui-icon{background-position:-200px -40px}.edui-default .edui-for-aligntd .edui-icon{background-position:-236px -76px}.edui-default .edui-for-insertparagraphtrue .edui-icon{background-position:-625px -76px}.edui-default .edui-for-insertparagraph .edui-icon{background-position:-602px -76px}.edui-default .edui-for-insertcaption .edui-icon{background-position:-336px -76px}.edui-default .edui-for-deletecaption .edui-icon{background-position:-362px -76px}.edui-default .edui-for-inserttitle .edui-icon{background-position:-286px -76px}.edui-default .edui-for-deletetitle .edui-icon{background-position:-311px -76px}.edui-default .edui-for-aligntable .edui-icon{background-position:-440px 0}.edui-default .edui-for-tablealignment-left .edui-icon{background-position:-460px 0}.edui-default .edui-for-tablealignment-center .edui-icon{background-position:-420px 0}.edui-default .edui-for-tablealignment-right .edui-icon{background-position:-480px 0}.edui-default .edui-for-drafts .edui-icon{background-position:-560px 0}.edui-default .edui-for-charts .edui-icon{background:url( ../images/charts.png ) no-repeat 2px 3px!important}.edui-default .edui-for-inserttitlecol .edui-icon{background-position:-673px -76px}.edui-default .edui-for-deletetitlecol .edui-icon{background-position:-698px -76px}.edui-default .edui-for-simpleupload .edui-icon{background-position:-380px 0}.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow,.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow{background:url(../images/icons.png) -741px 0;_background:url(../images/icons.gif) -741px 0;height:20px;width:9px}.edui-default .edui-toolbar .edui-splitbutton .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-menubutton-body{padding:1px}.edui-default .edui-toolbar .edui-splitborder{width:1px;height:20px}.edui-default .edui-toolbar .edui-state-hover .edui-splitborder{width:1px;border-left:0 solid #dcac6c}.edui-default .edui-toolbar .edui-state-active .edui-splitborder{width:0;border-left:1px solid gray}.edui-default .edui-toolbar .edui-state-opened .edui-splitborder{width:1px;border:0}.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body{background-color:#fff5d4;border:1px solid #dcac6c;padding:0}.edui-default .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body{background-color:#FFE69F;border:1px solid #DCAC6C;padding:0}.edui-default .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body{background-color:#fff;border:1px solid gray;padding:0}.edui-default .edui-state-disabled .edui-arrow{opacity:.3;_filter:alpha(opacity=30)}.edui-default .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body{background-color:#fff;border:1px solid gray;padding:0}.edui-default .edui-for-insertorderedlist .edui-bordereraser,.edui-default .edui-for-lineheight .edui-bordereraser,.edui-default .edui-for-rowspacingtop .edui-bordereraser,.edui-default .edui-for-rowspacingbottom .edui-bordereraser,.edui-default .edui-for-insertunorderedlist .edui-bordereraser{background-color:#fff}.edui-default .edui-for-insertorderedlist .edui-popup-body .edui-icon,.edui-default .edui-for-lineheight .edui-popup-body .edui-icon,.edui-default .edui-for-rowspacingtop .edui-popup-body .edui-icon,.edui-default .edui-for-rowspacingbottom .edui-popup-body .edui-icon,.edui-default .edui-for-insertunorderedlist .edui-popup-body .edui-icon{background-image:none}.edui-default .edui-popup{z-index:3000;background-color:#fff;width:auto;height:auto}.edui-default .edui-popup .edui-shadow{left:0;top:0;width:100%;height:100%}.edui-default .edui-popup-content{border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 4px rgba(0,0,0,.2);-moz-box-shadow:0 3px 4px rgba(0,0,0,.2);box-shadow:0 3px 4px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;padding:5px;background:#fff}.edui-default .edui-popup .edui-bordereraser{background-color:#fff;height:3px}.edui-default .edui-menu .edui-bordereraser{height:3px}.edui-default .edui-anchor-topleft .edui-bordereraser{left:1px;top:-2px}.edui-default .edui-anchor-topright .edui-bordereraser{right:1px;top:-2px}.edui-default .edui-anchor-bottomleft .edui-bordereraser{left:0;bottom:-6px;height:7px;border-left:1px solid gray;border-right:1px solid gray}.edui-default .edui-anchor-bottomright .edui-bordereraser{right:0;bottom:-6px;height:7px;border-left:1px solid gray;border-right:1px solid gray}.edui-popup div{width:auto;height:auto}.edui-default .edui-editor-messageholder{display:block;width:150px;height:auto;border:0;margin:0;padding:0;position:absolute;top:28px;right:3px}.edui-default .edui-message{min-height:10px;text-shadow:0 1px 0 rgba(255,255,255,.5);padding:0;margin-bottom:3px;position:relative}.edui-default .edui-message-body{border-radius:3px;padding:8px 15px 8px 8px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5}.edui-default .edui-message-type-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.edui-default .edui-message-type-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.edui-default .edui-message-type-danger,.edui-default .edui-message-type-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.edui-default .edui-message .edui-message-closer{display:block;width:16px;height:16px;line-height:16px;position:absolute;top:0;right:0;padding:0;cursor:pointer;background:transparent;border:0;float:right;font-size:20px;font-weight:700;color:#999;text-shadow:0 1px 0 #fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.edui-default .edui-message .edui-message-content{font-size:10pt;word-wrap:break-word;word-break:normal}.edui-default .edui-dialog{z-index:2000;position:absolute}.edui-dialog div{width:auto}.edui-default .edui-dialog-wrap{margin-right:6px;margin-bottom:6px}.edui-default .edui-dialog-fullscreen-flag{margin-right:0;margin-bottom:0}.edui-default .edui-dialog-body{position:relative;padding:2px 0 0 2px;_zoom:1}.edui-default .edui-dialog-fullscreen-flag .edui-dialog-body{padding:0}.edui-default .edui-dialog-shadow{position:absolute;z-index:-1;left:0;top:0;width:100%;height:100%;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.edui-default .edui-dialog-foot{background-color:#fff}.edui-default .edui-dialog-titlebar{height:26px;border-bottom:1px solid #c6c6c6;background:url(../images/dialog-title-bg.png) repeat-x bottom;position:relative;cursor:move}.edui-default .edui-dialog-caption{font-weight:700;font-size:12px;line-height:26px;padding-left:5px}.edui-default .edui-dialog-draghandle{height:26px}.edui-default .edui-dialog-closebutton{position:absolute!important;right:5px;top:3px}.edui-default .edui-dialog-closebutton .edui-button-body{height:20px;width:20px;cursor:pointer;background:url(../images/icons-all.gif) no-repeat 0 -59px}.edui-default .edui-dialog-closebutton .edui-state-hover .edui-button-body{background:url(../images/icons-all.gif) no-repeat 0 -89px}.edui-default .edui-dialog-foot{height:40px}.edui-default .edui-dialog-buttons{position:absolute;right:0}.edui-default .edui-dialog-buttons .edui-button{margin-right:10px}.edui-default .edui-dialog-buttons .edui-button .edui-button-body{background:url(../images/icons-all.gif) no-repeat;height:24px;width:96px;font-size:12px;line-height:24px;text-align:center;cursor:default}.edui-default .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body{background:url(../images/icons-all.gif) no-repeat 0 -30px}.edui-default .edui-dialog iframe{border:0;padding:0;margin:0;vertical-align:top}.edui-default .edui-dialog-modalmask{opacity:.3;filter:alpha(opacity=30);background-color:#ccc;position:absolute}.edui-default .edui-dialog-dragmask{position:absolute;background-color:transparent;cursor:move}.edui-default .edui-dialog-content{position:relative}.edui-default .dialogcontmask{cursor:move;visibility:hidden;display:block;position:absolute;width:100%;height:100%;opacity:0;filter:alpha(opacity=0)}.edui-default .edui-for-link .edui-dialog-content{width:420px;height:200px;overflow:hidden}.edui-default .edui-for-background .edui-dialog-content{width:440px;height:280px;overflow:hidden}.edui-default .edui-for-template .edui-dialog-content{width:630px;height:390px;overflow:hidden}.edui-default .edui-for-scrawl .edui-dialog-content{width:515px;*width:506px;height:360px}.edui-default .edui-for-spechars .edui-dialog-content{width:620px;height:500px;*width:630px;*height:570px}.edui-default .edui-for-insertimage .edui-dialog-content{width:650px;height:400px;overflow:hidden}.edui-default .edui-for-webapp .edui-dialog-content{width:560px;_width:565px;height:450px;overflow:hidden}.edui-default .edui-for-insertframe .edui-dialog-content{width:350px;height:200px;overflow:hidden}.edui-default .edui-for-wordimage .edui-dialog-content{width:620px;height:380px;overflow:hidden}.edui-default .edui-for-attachment .edui-dialog-content{width:650px;height:400px;overflow:hidden}.edui-default .edui-for-map .edui-dialog-content{width:550px;height:400px}.edui-default .edui-for-gmap .edui-dialog-content{width:550px;height:400px}.edui-default .edui-for-insertvideo .edui-dialog-content{width:590px;height:390px}.edui-default .edui-for-anchor .edui-dialog-content{width:320px;height:60px;overflow:hidden}.edui-default .edui-for-searchreplace .edui-dialog-content{width:400px;height:220px}.edui-default .edui-for-help .edui-dialog-content{width:400px;height:420px}.edui-default .edui-for-edittable .edui-dialog-content{width:540px;_width:590px;height:335px}.edui-default .edui-for-edittip .edui-dialog-content{width:225px;height:60px}.edui-default .edui-for-edittd .edui-dialog-content{width:240px;height:50px}.edui-default .edui-for-snapscreen .edui-dialog-content{width:400px;height:220px}.edui-default .edui-for-music .edui-dialog-content{width:515px;height:360px}.edui-default .edui-for-paragraph .edui-listitem-label{font-family:Tahoma,Verdana,Arial,Helvetica}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-p{font-size:22px;line-height:27px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h1{font-weight:bolder;font-size:32px;line-height:36px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h2{font-weight:bolder;font-size:27px;line-height:29px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h3{font-weight:bolder;font-size:19px;line-height:23px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h4{font-weight:bolder;font-size:16px;line-height:19px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h5{font-weight:bolder;font-size:13px;line-height:16px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h6{font-weight:bolder;font-size:12px;line-height:14px}.edui-default .edui-for-inserttable .edui-splitborder{display:none}.edui-default .edui-for-inserttable .edui-splitbutton-body .edui-arrow{width:0}.edui-default .edui-toolbar .edui-for-inserttable .edui-state-active .edui-splitborder{border-left:1px solid transparent}.edui-default .edui-tablepicker .edui-infoarea{height:14px;line-height:14px;font-size:12px;width:220px;margin-bottom:3px;clear:both}.edui-default .edui-tablepicker .edui-infoarea .edui-label{float:left}.edui-default .edui-dialog-buttons .edui-label{line-height:24px}.edui-default .edui-tablepicker .edui-infoarea .edui-clickable{float:right}.edui-default .edui-tablepicker .edui-pickarea{background:url(../images/unhighlighted.gif) repeat;height:220px;width:220px}.edui-default .edui-tablepicker .edui-pickarea .edui-overlay{background:url(../images/highlighted.gif) repeat}.edui-default .edui-colorpicker-topbar{height:27px;width:200px}.edui-default .edui-colorpicker-preview{height:20px;border:1px inset #000;margin-left:1px;width:128px;float:left}.edui-default .edui-colorpicker-nocolor{float:right;margin-right:1px;font-size:12px;line-height:14px;height:14px;border:1px solid #333;padding:3px 5px;cursor:pointer}.edui-default .edui-colorpicker-tablefirstrow{height:30px}.edui-default .edui-colorpicker-colorcell{width:14px;height:14px;display:block;margin:0;cursor:pointer}.edui-default .edui-colorpicker-colorcell:hover{width:14px;height:14px;margin:0}.edui-default .edui-colorpicker-advbtn{display:block;text-align:center;cursor:pointer;height:20px}.arrow_down{background:#fff url(../images/arrow_down.png) no-repeat center}.arrow_up{background:#fff url(../images/arrow_up.png) no-repeat center}.edui-colorpicker-adv{position:relative;overflow:hidden;height:180px;display:none}.edui-colorpicker-plant,.edui-colorpicker-hue{border:solid 1px #666}.edui-colorpicker-pad{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}.edui-colorpicker-cover{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/tangram-colorpicker.png) -160px -200px}.edui-colorpicker-padDot{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/tangram-colorpicker.png) 0 -200px repeat-x;z-index:1000}.edui-colorpicker-sliderMain{position:absolute;left:171px;top:13px;width:19px;height:152px;background:url(../images/tangram-colorpicker.png) -179px -12px no-repeat}.edui-colorpicker-slider{width:100%;height:100%;cursor:pointer}.edui-colorpicker-thumb{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:#fff;opacity:.8}.edui-default .edui-autotypesetpicker .edui-autotypesetpicker-body{font-size:12px;margin-bottom:3px;clear:both}.edui-default .edui-autotypesetpicker-body table{border-collapse:separate;border-spacing:2px}.edui-default .edui-autotypesetpicker-body td{font-size:12px;word-wrap:break-word}.edui-default .edui-autotypesetpicker-body td input{margin:3px 3px 3px 4px;*margin:1px 0 0}.edui-default .edui-cellalignpicker .edui-cellalignpicker-body{width:70px;font-size:12px;cursor:default}.edui-default .edui-cellalignpicker-body table{border-collapse:separate;border-spacing:0}.edui-default .edui-cellalignpicker-body td{padding:1px}.edui-default .edui-cellalignpicker-body .edui-icon{height:20px;width:20px;padding:1px;background-image:url(../images/table-cell-align.png)}.edui-default .edui-cellalignpicker-body .edui-left{background-position:0 0}.edui-default .edui-cellalignpicker-body .edui-center{background-position:-25px 0}.edui-default .edui-cellalignpicker-body .edui-right{background-position:-51px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-left{background-position:-73px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-center{background-position:-98px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-right{background-position:-124px 0}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-left{background-position:-146px 0;background-color:#f1f4f5}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-center{background-position:-245px 0}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-right{background-position:-271px 0}.edui-default .edui-toolbar .edui-separator{width:2px;height:20px;margin:2px 4px 2px 3px;background:url(../images/icons.png) -181px 0;background:url(../images/icons.gif) -181px 0 \9}.edui-default .edui-toolbar .edui-colorbutton .edui-colorlump{position:absolute;overflow:hidden;bottom:1px;left:1px;width:18px;height:4px}.edui-default .edui-for-emotion .edui-icon{background-position:-60px -20px}.edui-default .edui-for-emotion .edui-popup-content iframe{width:514px;height:380px;overflow:hidden}.edui-default .edui-for-emotion .edui-popup-content{position:relative;z-index:555}.edui-default .edui-for-emotion .edui-splitborder{display:none}.edui-default .edui-for-emotion .edui-splitbutton-body .edui-arrow{width:0}.edui-default .edui-toolbar .edui-for-emotion .edui-state-active .edui-splitborder{border-left:1px solid transparent}.edui-default .edui-hassubmenu .edui-arrow{height:20px;width:20px;float:right;background:url(../images/icons-all.gif) no-repeat 10px -233px}.edui-default .edui-menu-body .edui-menuitem{padding:1px}.edui-default .edui-menuseparator{margin:2px 0;height:1px;overflow:hidden}.edui-default .edui-menuseparator-inner{border-bottom:1px solid #e2e3e3;margin-left:29px;margin-right:1px}.edui-default .edui-menu-body .edui-state-hover{padding:0!important;background-color:#fff5d4;border:1px solid #dcac6c}.edui-default .edui-shortcutmenu{padding:2px;width:190px;height:50px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.edui-default .edui-wordpastepop .edui-popup-content{border:0;padding:0;width:54px;height:21px}.edui-default .edui-pasteicon{width:100%;height:100%;background-image:url(../images/wordpaste.png);background-position:0 0}.edui-default .edui-pasteicon.edui-state-opened{background-position:0 -34px}.edui-default .edui-pastecontainer{position:relative;visibility:hidden;width:97px;background:#fff;border:1px solid #ccc}.edui-default .edui-pastecontainer .edui-title{font-weight:700;background:#F8F8FF;height:25px;line-height:25px;font-size:12px;padding-left:5px}.edui-default .edui-pastecontainer .edui-button{overflow:hidden;margin:3px 0}.edui-default .edui-pastecontainer .edui-button .edui-richtxticon,.edui-default .edui-pastecontainer .edui-button .edui-tagicon,.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{float:left;cursor:pointer;width:29px;height:29px;margin-left:5px;background-image:url(../images/wordpaste.png);background-repeat:no-repeat}.edui-default .edui-pastecontainer .edui-button .edui-richtxticon{margin-left:0;background-position:-109px 0}.edui-default .edui-pastecontainer .edui-button .edui-tagicon{background-position:-148px 1px}.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{background-position:-72px 0}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-richtxticon{background-position:-109px -34px}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-tagicon{background-position:-148px -34px}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-plaintxticon{background-position:-72px -34px} \ No newline at end of file diff --git a/public/static/admin/UEditor/themes/default/dialogbase.css b/public/static/admin/UEditor/themes/default/dialogbase.css deleted file mode 100644 index cd663d5..0000000 --- a/public/static/admin/UEditor/themes/default/dialogbase.css +++ /dev/null @@ -1,100 +0,0 @@ -/*弹出对话框页面样式组件 -*/ - -/*reset -*/ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; - padding: 0; - outline: 0; - font-size: 100%; -} - -body { - line-height: 1; -} - -ol, ul { - list-style: none; -} - -blockquote, q { - quotes: none; -} - -ins { - text-decoration: none; -} - -del { - text-decoration: line-through; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -/*module -*/ -body { - background-color: #fff; - font: 12px/1.5 sans-serif, "宋体", "Arial Narrow", HELVETICA; - color: #646464; -} - -/*tab*/ -.tabhead { - position: relative; - z-index: 10; -} - -.tabhead span { - display: inline-block; - padding: 0 5px; - height: 30px; - border: 1px solid #ccc; - background: url("images/dialog-title-bg.png") repeat-x; - text-align: center; - line-height: 30px; - cursor: pointer; - *margin-right: 5px; -} - -.tabhead span.focus { - height: 31px; - border-bottom: none; - background: #fff; -} - -.tabbody { - position: relative; - top: -1px; - margin: 0 auto; - border: 1px solid #ccc; -} - -/*button*/ -a.button { - display: block; - text-align: center; - line-height: 24px; - text-decoration: none; - height: 24px; - width: 95px; - border: 0; - color: #838383; - background: url(../../themes/default/images/icons-all.gif) no-repeat; -} - -a.button:hover { - background-position: 0 -30px; -} \ No newline at end of file diff --git a/public/static/admin/UEditor/themes/default/images/anchor.gif b/public/static/admin/UEditor/themes/default/images/anchor.gif deleted file mode 100644 index 5aa797b..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/anchor.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/arrow.png b/public/static/admin/UEditor/themes/default/images/arrow.png deleted file mode 100644 index d900886..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/arrow.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/arrow_down.png b/public/static/admin/UEditor/themes/default/images/arrow_down.png deleted file mode 100644 index e9257e8..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/arrow_down.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/arrow_up.png b/public/static/admin/UEditor/themes/default/images/arrow_up.png deleted file mode 100644 index 74277af..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/arrow_up.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/button-bg.gif b/public/static/admin/UEditor/themes/default/images/button-bg.gif deleted file mode 100644 index ec7fa2e..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/button-bg.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/cancelbutton.gif b/public/static/admin/UEditor/themes/default/images/cancelbutton.gif deleted file mode 100644 index df4bc2c..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/cancelbutton.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/charts.png b/public/static/admin/UEditor/themes/default/images/charts.png deleted file mode 100644 index 713965c..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/charts.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/cursor_h.gif b/public/static/admin/UEditor/themes/default/images/cursor_h.gif deleted file mode 100644 index d7c3e7e..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/cursor_h.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/cursor_h.png b/public/static/admin/UEditor/themes/default/images/cursor_h.png deleted file mode 100644 index 2088fc2..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/cursor_h.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/cursor_v.gif b/public/static/admin/UEditor/themes/default/images/cursor_v.gif deleted file mode 100644 index bb508db..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/cursor_v.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/cursor_v.png b/public/static/admin/UEditor/themes/default/images/cursor_v.png deleted file mode 100644 index 6f39ca3..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/cursor_v.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/dialog-title-bg.png b/public/static/admin/UEditor/themes/default/images/dialog-title-bg.png deleted file mode 100644 index f744f26..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/dialog-title-bg.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/filescan.png b/public/static/admin/UEditor/themes/default/images/filescan.png deleted file mode 100644 index 1d27158..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/filescan.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/highlighted.gif b/public/static/admin/UEditor/themes/default/images/highlighted.gif deleted file mode 100644 index 9272b49..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/highlighted.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/icons-all.gif b/public/static/admin/UEditor/themes/default/images/icons-all.gif deleted file mode 100644 index 21915e5..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/icons-all.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/icons.gif b/public/static/admin/UEditor/themes/default/images/icons.gif deleted file mode 100644 index 7abd30a..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/icons.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/icons.png b/public/static/admin/UEditor/themes/default/images/icons.png deleted file mode 100644 index c015e3a..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/icons.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/loaderror.png b/public/static/admin/UEditor/themes/default/images/loaderror.png deleted file mode 100644 index 35ff333..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/loaderror.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/loading.gif b/public/static/admin/UEditor/themes/default/images/loading.gif deleted file mode 100644 index b713e27..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/loading.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/lock.gif b/public/static/admin/UEditor/themes/default/images/lock.gif deleted file mode 100644 index b4e6d78..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/lock.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/neweditor-tab-bg.png b/public/static/admin/UEditor/themes/default/images/neweditor-tab-bg.png deleted file mode 100644 index 8f398b0..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/neweditor-tab-bg.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/pagebreak.gif b/public/static/admin/UEditor/themes/default/images/pagebreak.gif deleted file mode 100644 index 8d1cffd..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/pagebreak.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/scale.png b/public/static/admin/UEditor/themes/default/images/scale.png deleted file mode 100644 index f45adb5..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/scale.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/sortable.png b/public/static/admin/UEditor/themes/default/images/sortable.png deleted file mode 100644 index 1bca649..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/sortable.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/spacer.gif b/public/static/admin/UEditor/themes/default/images/spacer.gif deleted file mode 100644 index 5bfd67a..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/spacer.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/sparator_v.png b/public/static/admin/UEditor/themes/default/images/sparator_v.png deleted file mode 100644 index 8cf5662..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/sparator_v.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/table-cell-align.png b/public/static/admin/UEditor/themes/default/images/table-cell-align.png deleted file mode 100644 index ddf4285..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/table-cell-align.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/tangram-colorpicker.png b/public/static/admin/UEditor/themes/default/images/tangram-colorpicker.png deleted file mode 100644 index 738e500..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/tangram-colorpicker.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/toolbar_bg.png b/public/static/admin/UEditor/themes/default/images/toolbar_bg.png deleted file mode 100644 index 7ab685f..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/toolbar_bg.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/unhighlighted.gif b/public/static/admin/UEditor/themes/default/images/unhighlighted.gif deleted file mode 100644 index 7ad0b67..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/unhighlighted.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/upload.png b/public/static/admin/UEditor/themes/default/images/upload.png deleted file mode 100644 index 08d4d92..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/upload.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/videologo.gif b/public/static/admin/UEditor/themes/default/images/videologo.gif deleted file mode 100644 index 555af74..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/videologo.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/word.gif b/public/static/admin/UEditor/themes/default/images/word.gif deleted file mode 100644 index 9ef5d09..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/word.gif and /dev/null differ diff --git a/public/static/admin/UEditor/themes/default/images/wordpaste.png b/public/static/admin/UEditor/themes/default/images/wordpaste.png deleted file mode 100644 index 9367758..0000000 Binary files a/public/static/admin/UEditor/themes/default/images/wordpaste.png and /dev/null differ diff --git a/public/static/admin/UEditor/themes/iframe.css b/public/static/admin/UEditor/themes/iframe.css deleted file mode 100644 index 774013a..0000000 --- a/public/static/admin/UEditor/themes/iframe.css +++ /dev/null @@ -1 +0,0 @@ -/*可以在这里添加你自己的css*/ diff --git a/public/static/admin/UEditor/third-party/SyntaxHighlighter/shCore.js b/public/static/admin/UEditor/third-party/SyntaxHighlighter/shCore.js deleted file mode 100644 index 3249184..0000000 --- a/public/static/admin/UEditor/third-party/SyntaxHighlighter/shCore.js +++ /dev/null @@ -1,3655 +0,0 @@ -// XRegExp 1.5.1 -// (c) 2007-2012 Steven Levithan -// MIT License -// -// Provides an augmented, extensible, cross-browser implementation of regular expressions, -// including support for additional syntax, flags, and methods - -var XRegExp; - -if (XRegExp) { - // Avoid running twice, since that would break references to native globals - throw Error("can't load XRegExp twice in the same frame"); -} - -// Run within an anonymous function to protect variables and avoid new globals -(function (undefined) { - - //--------------------------------- - // Constructor - //--------------------------------- - - // Accepts a pattern and flags; returns a new, extended `RegExp` object. Differs from a native - // regular expression in that additional syntax and flags are supported and cross-browser - // syntax inconsistencies are ameliorated. `XRegExp(/regex/)` clones an existing regex and - // converts to type XRegExp - XRegExp = function (pattern, flags) { - var output = [], - currScope = XRegExp.OUTSIDE_CLASS, - pos = 0, - context, tokenResult, match, chr, regex; - - if (XRegExp.isRegExp(pattern)) { - if (flags !== undefined) - throw TypeError("can't supply flags when constructing one RegExp from another"); - return clone(pattern); - } - // Tokens become part of the regex construction process, so protect against infinite - // recursion when an XRegExp is constructed within a token handler or trigger - if (isInsideConstructor) - throw Error("can't call the XRegExp constructor within token definition functions"); - - flags = flags || ""; - context = { // `this` object for custom tokens - hasNamedCapture: false, - captureNames: [], - hasFlag: function (flag) {return flags.indexOf(flag) > -1;}, - setFlag: function (flag) {flags += flag;} - }; - - while (pos < pattern.length) { - // Check for custom tokens at the current position - tokenResult = runTokens(pattern, pos, currScope, context); - - if (tokenResult) { - output.push(tokenResult.output); - pos += (tokenResult.match[0].length || 1); - } else { - // Check for native multicharacter metasequences (excluding character classes) at - // the current position - if (match = nativ.exec.call(nativeTokens[currScope], pattern.slice(pos))) { - output.push(match[0]); - pos += match[0].length; - } else { - chr = pattern.charAt(pos); - if (chr === "[") - currScope = XRegExp.INSIDE_CLASS; - else if (chr === "]") - currScope = XRegExp.OUTSIDE_CLASS; - // Advance position one character - output.push(chr); - pos++; - } - } - } - - regex = RegExp(output.join(""), nativ.replace.call(flags, flagClip, "")); - regex._xregexp = { - source: pattern, - captureNames: context.hasNamedCapture ? context.captureNames : null - }; - return regex; - }; - - - //--------------------------------- - // Public properties - //--------------------------------- - - XRegExp.version = "1.5.1"; - - // Token scope bitflags - XRegExp.INSIDE_CLASS = 1; - XRegExp.OUTSIDE_CLASS = 2; - - - //--------------------------------- - // Private variables - //--------------------------------- - - var replacementToken = /\$(?:(\d\d?|[$&`'])|{([$\w]+)})/g, - flagClip = /[^gimy]+|([\s\S])(?=[\s\S]*\1)/g, // Nonnative and duplicate flags - quantifier = /^(?:[?*+]|{\d+(?:,\d*)?})\??/, - isInsideConstructor = false, - tokens = [], - // Copy native globals for reference ("native" is an ES3 reserved keyword) - nativ = { - exec: RegExp.prototype.exec, - test: RegExp.prototype.test, - match: String.prototype.match, - replace: String.prototype.replace, - split: String.prototype.split - }, - compliantExecNpcg = nativ.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups - compliantLastIndexIncrement = function () { - var x = /^/g; - nativ.test.call(x, ""); - return !x.lastIndex; - }(), - hasNativeY = RegExp.prototype.sticky !== undefined, - nativeTokens = {}; - - // `nativeTokens` match native multicharacter metasequences only (including deprecated octals, - // excluding character classes) - nativeTokens[XRegExp.INSIDE_CLASS] = /^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/; - nativeTokens[XRegExp.OUTSIDE_CLASS] = /^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/; - - - //--------------------------------- - // Public methods - //--------------------------------- - - // Lets you extend or change XRegExp syntax and create custom flags. This is used internally by - // the XRegExp library and can be used to create XRegExp plugins. This function is intended for - // users with advanced knowledge of JavaScript's regular expression syntax and behavior. It can - // be disabled by `XRegExp.freezeTokens` - XRegExp.addToken = function (regex, handler, scope, trigger) { - tokens.push({ - pattern: clone(regex, "g" + (hasNativeY ? "y" : "")), - handler: handler, - scope: scope || XRegExp.OUTSIDE_CLASS, - trigger: trigger || null - }); - }; - - // Accepts a pattern and flags; returns an extended `RegExp` object. If the pattern and flag - // combination has previously been cached, the cached copy is returned; otherwise the newly - // created regex is cached - XRegExp.cache = function (pattern, flags) { - var key = pattern + "/" + (flags || ""); - return XRegExp.cache[key] || (XRegExp.cache[key] = XRegExp(pattern, flags)); - }; - - // Accepts a `RegExp` instance; returns a copy with the `/g` flag set. The copy has a fresh - // `lastIndex` (set to zero). If you want to copy a regex without forcing the `global` - // property, use `XRegExp(regex)`. Do not use `RegExp(regex)` because it will not preserve - // special properties required for named capture - XRegExp.copyAsGlobal = function (regex) { - return clone(regex, "g"); - }; - - // Accepts a string; returns the string with regex metacharacters escaped. The returned string - // can safely be used at any point within a regex to match the provided literal string. Escaped - // characters are [ ] { } ( ) * + ? - . , \ ^ $ | # and whitespace - XRegExp.escape = function (str) { - return str.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - }; - - // Accepts a string to search, regex to search with, position to start the search within the - // string (default: 0), and an optional Boolean indicating whether matches must start at-or- - // after the position or at the specified position only. This function ignores the `lastIndex` - // of the provided regex in its own handling, but updates the property for compatibility - XRegExp.execAt = function (str, regex, pos, anchored) { - var r2 = clone(regex, "g" + ((anchored && hasNativeY) ? "y" : "")), - match; - r2.lastIndex = pos = pos || 0; - match = r2.exec(str); // Run the altered `exec` (required for `lastIndex` fix, etc.) - if (anchored && match && match.index !== pos) - match = null; - if (regex.global) - regex.lastIndex = match ? r2.lastIndex : 0; - return match; - }; - - // Breaks the unrestorable link to XRegExp's private list of tokens, thereby preventing - // syntax and flag changes. Should be run after XRegExp and any plugins are loaded - XRegExp.freezeTokens = function () { - XRegExp.addToken = function () { - throw Error("can't run addToken after freezeTokens"); - }; - }; - - // Accepts any value; returns a Boolean indicating whether the argument is a `RegExp` object. - // Note that this is also `true` for regex literals and regexes created by the `XRegExp` - // constructor. This works correctly for variables created in another frame, when `instanceof` - // and `constructor` checks would fail to work as intended - XRegExp.isRegExp = function (o) { - return Object.prototype.toString.call(o) === "[object RegExp]"; - }; - - // Executes `callback` once per match within `str`. Provides a simpler and cleaner way to - // iterate over regex matches compared to the traditional approaches of subverting - // `String.prototype.replace` or repeatedly calling `exec` within a `while` loop - XRegExp.iterate = function (str, regex, callback, context) { - var r2 = clone(regex, "g"), - i = -1, match; - while (match = r2.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) - if (regex.global) - regex.lastIndex = r2.lastIndex; // Doing this to follow expectations if `lastIndex` is checked within `callback` - callback.call(context, match, ++i, str, regex); - if (r2.lastIndex === match.index) - r2.lastIndex++; - } - if (regex.global) - regex.lastIndex = 0; - }; - - // Accepts a string and an array of regexes; returns the result of using each successive regex - // to search within the matches of the previous regex. The array of regexes can also contain - // objects with `regex` and `backref` properties, in which case the named or numbered back- - // references specified are passed forward to the next regex or returned. E.g.: - // var xregexpImgFileNames = XRegExp.matchChain(html, [ - // {regex: /]+)>/i, backref: 1}, // tag attributes - // {regex: XRegExp('(?ix) \\s src=" (? [^"]+ )'), backref: "src"}, // src attribute values - // {regex: XRegExp("^http://xregexp\\.com(/[^#?]+)", "i"), backref: 1}, // xregexp.com paths - // /[^\/]+$/ // filenames (strip directory paths) - // ]); - XRegExp.matchChain = function (str, chain) { - return function recurseChain (values, level) { - var item = chain[level].regex ? chain[level] : {regex: chain[level]}, - regex = clone(item.regex, "g"), - matches = [], i; - for (i = 0; i < values.length; i++) { - XRegExp.iterate(values[i], regex, function (match) { - matches.push(item.backref ? (match[item.backref] || "") : match[0]); - }); - } - return ((level === chain.length - 1) || !matches.length) ? - matches : recurseChain(matches, level + 1); - }([str], 0); - }; - - - //--------------------------------- - // New RegExp prototype methods - //--------------------------------- - - // Accepts a context object and arguments array; returns the result of calling `exec` with the - // first value in the arguments array. the context is ignored but is accepted for congruity - // with `Function.prototype.apply` - RegExp.prototype.apply = function (context, args) { - return this.exec(args[0]); - }; - - // Accepts a context object and string; returns the result of calling `exec` with the provided - // string. the context is ignored but is accepted for congruity with `Function.prototype.call` - RegExp.prototype.call = function (context, str) { - return this.exec(str); - }; - - - //--------------------------------- - // Overriden native methods - //--------------------------------- - - // Adds named capture support (with backreferences returned as `result.name`), and fixes two - // cross-browser issues per ES3: - // - Captured values for nonparticipating capturing groups should be returned as `undefined`, - // rather than the empty string. - // - `lastIndex` should not be incremented after zero-length matches. - RegExp.prototype.exec = function (str) { - var match, name, r2, origLastIndex; - if (!this.global) - origLastIndex = this.lastIndex; - match = nativ.exec.apply(this, arguments); - if (match) { - // Fix browsers whose `exec` methods don't consistently return `undefined` for - // nonparticipating capturing groups - if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { - r2 = RegExp(this.source, nativ.replace.call(getNativeFlags(this), "g", "")); - // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed - // matching due to characters outside the match - nativ.replace.call((str + "").slice(match.index), r2, function () { - for (var i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) - match[i] = undefined; - } - }); - } - // Attach named capture properties - if (this._xregexp && this._xregexp.captureNames) { - for (var i = 1; i < match.length; i++) { - name = this._xregexp.captureNames[i - 1]; - if (name) - match[name] = match[i]; - } - } - // Fix browsers that increment `lastIndex` after zero-length matches - if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) - this.lastIndex--; - } - if (!this.global) - this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) - return match; - }; - - // Fix browser bugs in native method - RegExp.prototype.test = function (str) { - // Use the native `exec` to skip some processing overhead, even though the altered - // `exec` would take care of the `lastIndex` fixes - var match, origLastIndex; - if (!this.global) - origLastIndex = this.lastIndex; - match = nativ.exec.call(this, str); - // Fix browsers that increment `lastIndex` after zero-length matches - if (match && !compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) - this.lastIndex--; - if (!this.global) - this.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) - return !!match; - }; - - // Adds named capture support and fixes browser bugs in native method - String.prototype.match = function (regex) { - if (!XRegExp.isRegExp(regex)) - regex = RegExp(regex); // Native `RegExp` - if (regex.global) { - var result = nativ.match.apply(this, arguments); - regex.lastIndex = 0; // Fix IE bug - return result; - } - return regex.exec(this); // Run the altered `exec` - }; - - // Adds support for `${n}` tokens for named and numbered backreferences in replacement text, - // and provides named backreferences to replacement functions as `arguments[0].name`. Also - // fixes cross-browser differences in replacement text syntax when performing a replacement - // using a nonregex search value, and the value of replacement regexes' `lastIndex` property - // during replacement iterations. Note that this doesn't support SpiderMonkey's proprietary - // third (`flags`) parameter - String.prototype.replace = function (search, replacement) { - var isRegex = XRegExp.isRegExp(search), - captureNames, result, str, origLastIndex; - - // There are too many combinations of search/replacement types/values and browser bugs that - // preclude passing to native `replace`, so don't try - //if (...) - // return nativ.replace.apply(this, arguments); - - if (isRegex) { - if (search._xregexp) - captureNames = search._xregexp.captureNames; // Array or `null` - if (!search.global) - origLastIndex = search.lastIndex; - } else { - search = search + ""; // Type conversion - } - - if (Object.prototype.toString.call(replacement) === "[object Function]") { - result = nativ.replace.call(this + "", search, function () { - if (captureNames) { - // Change the `arguments[0]` string primitive to a String object which can store properties - arguments[0] = new String(arguments[0]); - // Store named backreferences on `arguments[0]` - for (var i = 0; i < captureNames.length; i++) { - if (captureNames[i]) - arguments[0][captureNames[i]] = arguments[i + 1]; - } - } - // Update `lastIndex` before calling `replacement` (fix browsers) - if (isRegex && search.global) - search.lastIndex = arguments[arguments.length - 2] + arguments[0].length; - return replacement.apply(null, arguments); - }); - } else { - str = this + ""; // Type conversion, so `args[args.length - 1]` will be a string (given nonstring `this`) - result = nativ.replace.call(str, search, function () { - var args = arguments; // Keep this function's `arguments` available through closure - return nativ.replace.call(replacement + "", replacementToken, function ($0, $1, $2) { - // Numbered backreference (without delimiters) or special variable - if ($1) { - switch ($1) { - case "$": return "$"; - case "&": return args[0]; - case "`": return args[args.length - 1].slice(0, args[args.length - 2]); - case "'": return args[args.length - 1].slice(args[args.length - 2] + args[0].length); - // Numbered backreference - default: - // What does "$10" mean? - // - Backreference 10, if 10 or more capturing groups exist - // - Backreference 1 followed by "0", if 1-9 capturing groups exist - // - Otherwise, it's the string "$10" - // Also note: - // - Backreferences cannot be more than two digits (enforced by `replacementToken`) - // - "$01" is equivalent to "$1" if a capturing group exists, otherwise it's the string "$01" - // - There is no "$0" token ("$&" is the entire match) - var literalNumbers = ""; - $1 = +$1; // Type conversion; drop leading zero - if (!$1) // `$1` was "0" or "00" - return $0; - while ($1 > args.length - 3) { - literalNumbers = String.prototype.slice.call($1, -1) + literalNumbers; - $1 = Math.floor($1 / 10); // Drop the last digit - } - return ($1 ? args[$1] || "" : "$") + literalNumbers; - } - // Named backreference or delimited numbered backreference - } else { - // What does "${n}" mean? - // - Backreference to numbered capture n. Two differences from "$n": - // - n can be more than two digits - // - Backreference 0 is allowed, and is the entire match - // - Backreference to named capture n, if it exists and is not a number overridden by numbered capture - // - Otherwise, it's the string "${n}" - var n = +$2; // Type conversion; drop leading zeros - if (n <= args.length - 3) - return args[n]; - n = captureNames ? indexOf(captureNames, $2) : -1; - return n > -1 ? args[n + 1] : $0; - } - }); - }); - } - - if (isRegex) { - if (search.global) - search.lastIndex = 0; // Fix IE, Safari bug (last tested IE 9.0.5, Safari 5.1.2 on Windows) - else - search.lastIndex = origLastIndex; // Fix IE, Opera bug (last tested IE 9.0.5, Opera 11.61 on Windows) - } - - return result; - }; - - // A consistent cross-browser, ES3 compliant `split` - String.prototype.split = function (s /* separator */, limit) { - // If separator `s` is not a regex, use the native `split` - if (!XRegExp.isRegExp(s)) - return nativ.split.apply(this, arguments); - - var str = this + "", // Type conversion - output = [], - lastLastIndex = 0, - match, lastLength; - - // Behavior for `limit`: if it's... - // - `undefined`: No limit - // - `NaN` or zero: Return an empty array - // - A positive number: Use `Math.floor(limit)` - // - A negative number: No limit - // - Other: Type-convert, then use the above rules - if (limit === undefined || +limit < 0) { - limit = Infinity; - } else { - limit = Math.floor(+limit); - if (!limit) - return []; - } - - // This is required if not `s.global`, and it avoids needing to set `s.lastIndex` to zero - // and restore it to its original value when we're done using the regex - s = XRegExp.copyAsGlobal(s); - - while (match = s.exec(str)) { // Run the altered `exec` (required for `lastIndex` fix, etc.) - if (s.lastIndex > lastLastIndex) { - output.push(str.slice(lastLastIndex, match.index)); - - if (match.length > 1 && match.index < str.length) - Array.prototype.push.apply(output, match.slice(1)); - - lastLength = match[0].length; - lastLastIndex = s.lastIndex; - - if (output.length >= limit) - break; - } - - if (s.lastIndex === match.index) - s.lastIndex++; - } - - if (lastLastIndex === str.length) { - if (!nativ.test.call(s, "") || lastLength) - output.push(""); - } else { - output.push(str.slice(lastLastIndex)); - } - - return output.length > limit ? output.slice(0, limit) : output; - }; - - - //--------------------------------- - // Private helper functions - //--------------------------------- - - // Supporting function for `XRegExp`, `XRegExp.copyAsGlobal`, etc. Returns a copy of a `RegExp` - // instance with a fresh `lastIndex` (set to zero), preserving properties required for named - // capture. Also allows adding new flags in the process of copying the regex - function clone (regex, additionalFlags) { - if (!XRegExp.isRegExp(regex)) - throw TypeError("type RegExp expected"); - var x = regex._xregexp; - regex = XRegExp(regex.source, getNativeFlags(regex) + (additionalFlags || "")); - if (x) { - regex._xregexp = { - source: x.source, - captureNames: x.captureNames ? x.captureNames.slice(0) : null - }; - } - return regex; - } - - function getNativeFlags (regex) { - return (regex.global ? "g" : "") + - (regex.ignoreCase ? "i" : "") + - (regex.multiline ? "m" : "") + - (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 - (regex.sticky ? "y" : ""); - } - - function runTokens (pattern, index, scope, context) { - var i = tokens.length, - result, match, t; - // Protect against constructing XRegExps within token handler and trigger functions - isInsideConstructor = true; - // Must reset `isInsideConstructor`, even if a `trigger` or `handler` throws - try { - while (i--) { // Run in reverse order - t = tokens[i]; - if ((scope & t.scope) && (!t.trigger || t.trigger.call(context))) { - t.pattern.lastIndex = index; - match = t.pattern.exec(pattern); // Running the altered `exec` here allows use of named backreferences, etc. - if (match && match.index === index) { - result = { - output: t.handler.call(context, match, scope), - match: match - }; - break; - } - } - } - } catch (err) { - throw err; - } finally { - isInsideConstructor = false; - } - return result; - } - - function indexOf (array, item, from) { - if (Array.prototype.indexOf) // Use the native array method if available - return array.indexOf(item, from); - for (var i = from || 0; i < array.length; i++) { - if (array[i] === item) - return i; - } - return -1; - } - - - //--------------------------------- - // Built-in tokens - //--------------------------------- - - // Augment XRegExp's regular expression syntax and flags. Note that when adding tokens, the - // third (`scope`) argument defaults to `XRegExp.OUTSIDE_CLASS` - - // Comment pattern: (?# ) - XRegExp.addToken( - /\(\?#[^)]*\)/, - function (match) { - // Keep tokens separated unless the following token is a quantifier - return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; - } - ); - - // Capturing group (match the opening parenthesis only). - // Required for support of named capturing groups - XRegExp.addToken( - /\((?!\?)/, - function () { - this.captureNames.push(null); - return "("; - } - ); - - // Named capturing group (match the opening delimiter only): (? - XRegExp.addToken( - /\(\?<([$\w]+)>/, - function (match) { - this.captureNames.push(match[1]); - this.hasNamedCapture = true; - return "("; - } - ); - - // Named backreference: \k - XRegExp.addToken( - /\\k<([\w$]+)>/, - function (match) { - var index = indexOf(this.captureNames, match[1]); - // Keep backreferences separate from subsequent literal numbers. Preserve back- - // references to named groups that are undefined at this point as literal strings - return index > -1 ? - "\\" + (index + 1) + (isNaN(match.input.charAt(match.index + match[0].length)) ? "" : "(?:)") : - match[0]; - } - ); - - // Empty character class: [] or [^] - XRegExp.addToken( - /\[\^?]/, - function (match) { - // For cross-browser compatibility with ES3, convert [] to \b\B and [^] to [\s\S]. - // (?!) should work like \b\B, but is unreliable in Firefox - return match[0] === "[]" ? "\\b\\B" : "[\\s\\S]"; - } - ); - - // Mode modifier at the start of the pattern only, with any combination of flags imsx: (?imsx) - // Does not support x(?i), (?-i), (?i-m), (?i: ), (?i)(?m), etc. - XRegExp.addToken( - /^\(\?([imsx]+)\)/, - function (match) { - this.setFlag(match[1]); - return ""; - } - ); - - // Whitespace and comments, in free-spacing (aka extended) mode only - XRegExp.addToken( - /(?:\s+|#.*)+/, - function (match) { - // Keep tokens separated unless the following token is a quantifier - return nativ.test.call(quantifier, match.input.slice(match.index + match[0].length)) ? "" : "(?:)"; - }, - XRegExp.OUTSIDE_CLASS, - function () {return this.hasFlag("x");} - ); - - // Dot, in dotall (aka singleline) mode only - XRegExp.addToken( - /\./, - function () {return "[\\s\\S]";}, - XRegExp.OUTSIDE_CLASS, - function () {return this.hasFlag("s");} - ); - - - //--------------------------------- - // Backward compatibility - //--------------------------------- - - // Uncomment the following block for compatibility with XRegExp 1.0-1.2: - /* - XRegExp.matchWithinChain = XRegExp.matchChain; - RegExp.prototype.addFlags = function (s) {return clone(this, s);}; - RegExp.prototype.execAll = function (s) {var r = []; XRegExp.iterate(s, this, function (m) {r.push(m);}); return r;}; - RegExp.prototype.forEachExec = function (s, f, c) {return XRegExp.iterate(s, this, f, c);}; - RegExp.prototype.validate = function (s) {var r = RegExp("^(?:" + this.source + ")$(?!\\s)", getNativeFlags(this)); if (this.global) this.lastIndex = 0; return s.search(r) === 0;}; - */ - -})(); - -// -// Begin anonymous function. This is used to contain local scope variables without polutting global scope. -// -if (typeof(SyntaxHighlighter) == 'undefined') var SyntaxHighlighter = function() { - -// CommonJS - if (typeof(require) != 'undefined' && typeof(XRegExp) == 'undefined') - { - XRegExp = require('XRegExp').XRegExp; - } - -// Shortcut object which will be assigned to the SyntaxHighlighter variable. -// This is a shorthand for local reference in order to avoid long namespace -// references to SyntaxHighlighter.whatever... - var sh = { - defaults : { - /** Additional CSS class names to be added to highlighter elements. */ - 'class-name' : '', - - /** First line number. */ - 'first-line' : 1, - - /** - * Pads line numbers. Possible values are: - * - * false - don't pad line numbers. - * true - automaticaly pad numbers with minimum required number of leading zeroes. - * [int] - length up to which pad line numbers. - */ - 'pad-line-numbers' : false, - - /** Lines to highlight. */ - 'highlight' : false, - - /** Title to be displayed above the code block. */ - 'title' : null, - - /** Enables or disables smart tabs. */ - 'smart-tabs' : true, - - /** Gets or sets tab size. */ - 'tab-size' : 4, - - /** Enables or disables gutter. */ - 'gutter' : true, - - /** Enables or disables toolbar. */ - 'toolbar' : true, - - /** Enables quick code copy and paste from double click. */ - 'quick-code' : true, - - /** Forces code view to be collapsed. */ - 'collapse' : false, - - /** Enables or disables automatic links. */ - 'auto-links' : false, - - /** Gets or sets light mode. Equavalent to turning off gutter and toolbar. */ - 'light' : false, - - 'unindent' : true, - - 'html-script' : false - }, - - config : { - space : ' ', - - /** Enables use of - * - * ``` - */ - findParent:function (node, filterFn, includeSelf) { - if (node && !domUtils.isBody(node)) { - node = includeSelf ? node : node.parentNode; - while (node) { - if (!filterFn || filterFn(node) || domUtils.isBody(node)) { - return filterFn && !filterFn(node) && domUtils.isBody(node) ? null : node; - } - node = node.parentNode; - } - } - return null; - }, - /** - * 查找node的节点名为tagName的第一个祖先节点, 查找的起点是node节点的父节点。 - * @method findParentByTagName - * @param { Node } node 需要查找的节点对象 - * @param { Array } tagNames 需要查找的父节点的名称数组 - * @warning 查找的终点是到body节点为止 - * @return { Node | NULL } 如果找到符合条件的节点, 则返回该节点, 否则返回NULL - * @example - * ```javascript - * var node = UE.dom.domUtils.findParentByTagName( document.getElementsByTagName("div")[0], [ "BODY" ] ); - * //output: BODY - * console.log( node.tagName ); - * ``` - */ - - /** - * 查找node的节点名为tagName的祖先节点, 如果includeSelf的值为true,则查找的起点是给定的节点node, - * 否则, 起点是node的父节点。 - * @method findParentByTagName - * @param { Node } node 需要查找的节点对象 - * @param { Array } tagNames 需要查找的父节点的名称数组 - * @param { Boolean } includeSelf 查找过程是否包含node节点自身 - * @warning 查找的终点是到body节点为止 - * @return { Node | NULL } 如果找到符合条件的节点, 则返回该节点, 否则返回NULL - * @example - * ```javascript - * var queryTarget = document.getElementsByTagName("div")[0]; - * var node = UE.dom.domUtils.findParentByTagName( queryTarget, [ "DIV" ], true ); - * //output: true - * console.log( queryTarget === node ); - * ``` - */ - findParentByTagName:function (node, tagNames, includeSelf, excludeFn) { - tagNames = utils.listToMap(utils.isArray(tagNames) ? tagNames : [tagNames]); - return domUtils.findParent(node, function (node) { - return tagNames[node.tagName] && !(excludeFn && excludeFn(node)); - }, includeSelf); - }, - /** - * 查找节点node的祖先节点集合, 查找的起点是给定节点的父节点,结果集中不包含给定的节点。 - * @method findParents - * @param { Node } node 需要查找的节点对象 - * @return { Array } 给定节点的祖先节点数组 - * @grammar UE.dom.domUtils.findParents(node) => Array //返回一个祖先节点数组集合,不包含自身 - * @grammar UE.dom.domUtils.findParents(node,includeSelf) => Array //返回一个祖先节点数组集合,includeSelf指定是否包含自身 - * @grammar UE.dom.domUtils.findParents(node,includeSelf,filterFn) => Array //返回一个祖先节点数组集合,filterFn指定过滤条件,返回true的node将被选取 - * @grammar UE.dom.domUtils.findParents(node,includeSelf,filterFn,closerFirst) => Array //返回一个祖先节点数组集合,closerFirst为true的话,node的直接父亲节点是数组的第0个 - */ - - /** - * 查找节点node的祖先节点集合, 如果includeSelf的值为true, - * 则返回的结果集中允许出现当前给定的节点, 否则, 该节点不会出现在其结果集中。 - * @method findParents - * @param { Node } node 需要查找的节点对象 - * @param { Boolean } includeSelf 查找的结果中是否允许包含当前查找的节点对象 - * @return { Array } 给定节点的祖先节点数组 - */ - findParents:function (node, includeSelf, filterFn, closerFirst) { - var parents = includeSelf && ( filterFn && filterFn(node) || !filterFn ) ? [node] : []; - while (node = domUtils.findParent(node, filterFn)) { - parents.push(node); - } - return closerFirst ? parents : parents.reverse(); - }, - - /** - * 在节点node后面插入新节点newNode - * @method insertAfter - * @param { Node } node 目标节点 - * @param { Node } newNode 新插入的节点, 该节点将置于目标节点之后 - * @return { Node } 新插入的节点 - */ - insertAfter:function (node, newNode) { - return node.nextSibling ? node.parentNode.insertBefore(newNode, node.nextSibling): - node.parentNode.appendChild(newNode); - }, - - /** - * 删除节点node及其下属的所有节点 - * @method remove - * @param { Node } node 需要删除的节点对象 - * @return { Node } 返回刚删除的节点对象 - * @example - * ```html - *
    - *
    你好
    - *
    - * - * ``` - */ - - /** - * 删除节点node,并根据keepChildren的值决定是否保留子节点 - * @method remove - * @param { Node } node 需要删除的节点对象 - * @param { Boolean } keepChildren 是否需要保留子节点 - * @return { Node } 返回刚删除的节点对象 - * @example - * ```html - *
    - *
    你好
    - *
    - * - * ``` - */ - remove:function (node, keepChildren) { - var parent = node.parentNode, - child; - if (parent) { - if (keepChildren && node.hasChildNodes()) { - while (child = node.firstChild) { - parent.insertBefore(child, node); - } - } - parent.removeChild(node); - } - return node; - }, - - /** - * 取得node节点的下一个兄弟节点, 如果该节点其后没有兄弟节点, 则递归查找其父节点之后的第一个兄弟节点, - * 直到找到满足条件的节点或者递归到BODY节点之后才会结束。 - * @method getNextDomNode - * @param { Node } node 需要获取其后的兄弟节点的节点对象 - * @return { Node | NULL } 如果找满足条件的节点, 则返回该节点, 否则返回NULL - * @example - * ```html - * - *
    - * - *
    - * xxx - * - * - * ``` - * @example - * ```html - * - *
    - * - * xxx - *
    - * xxx - * - * - * ``` - */ - - /** - * 取得node节点的下一个兄弟节点, 如果startFromChild的值为ture,则先获取其子节点, - * 如果有子节点则直接返回第一个子节点;如果没有子节点或者startFromChild的值为false, - * 则执行getNextDomNode(Node node)的查找过程。 - * @method getNextDomNode - * @param { Node } node 需要获取其后的兄弟节点的节点对象 - * @param { Boolean } startFromChild 查找过程是否从其子节点开始 - * @return { Node | NULL } 如果找满足条件的节点, 则返回该节点, 否则返回NULL - * @see UE.dom.domUtils.getNextDomNode(Node) - */ - getNextDomNode:function (node, startFromChild, filterFn, guard) { - return getDomNode(node, 'firstChild', 'nextSibling', startFromChild, filterFn, guard); - }, - getPreDomNode:function (node, startFromChild, filterFn, guard) { - return getDomNode(node, 'lastChild', 'previousSibling', startFromChild, filterFn, guard); - }, - /** - * 检测节点node是否属是UEditor定义的bookmark节点 - * @method isBookmarkNode - * @private - * @param { Node } node 需要检测的节点对象 - * @return { Boolean } 是否是bookmark节点 - * @example - * ```html - * - * - * ``` - */ - isBookmarkNode:function (node) { - return node.nodeType == 1 && node.id && /^_baidu_bookmark_/i.test(node.id); - }, - /** - * 获取节点node所属的window对象 - * @method getWindow - * @param { Node } node 节点对象 - * @return { Window } 当前节点所属的window对象 - * @example - * ```javascript - * //output: true - * console.log( UE.dom.domUtils.getWindow( document.body ) === window ); - * ``` - */ - getWindow:function (node) { - var doc = node.ownerDocument || node; - return doc.defaultView || doc.parentWindow; - }, - /** - * 获取离nodeA与nodeB最近的公共的祖先节点 - * @method getCommonAncestor - * @param { Node } nodeA 第一个节点 - * @param { Node } nodeB 第二个节点 - * @remind 如果给定的两个节点是同一个节点, 将直接返回该节点。 - * @return { Node | NULL } 如果未找到公共节点, 返回NULL, 否则返回最近的公共祖先节点。 - * @example - * ```javascript - * var commonAncestor = UE.dom.domUtils.getCommonAncestor( document.body, document.body.firstChild ); - * //output: true - * console.log( commonAncestor.tagName.toLowerCase() === 'body' ); - * ``` - */ - getCommonAncestor:function (nodeA, nodeB) { - if (nodeA === nodeB) - return nodeA; - var parentsA = [nodeA] , parentsB = [nodeB], parent = nodeA, i = -1; - while (parent = parent.parentNode) { - if (parent === nodeB) { - return parent; - } - parentsA.push(parent); - } - parent = nodeB; - while (parent = parent.parentNode) { - if (parent === nodeA) - return parent; - parentsB.push(parent); - } - parentsA.reverse(); - parentsB.reverse(); - while (i++, parentsA[i] === parentsB[i]) { - } - return i == 0 ? null : parentsA[i - 1]; - - }, - /** - * 清除node节点左右连续为空的兄弟inline节点 - * @method clearEmptySibling - * @param { Node } node 执行的节点对象, 如果该节点的左右连续的兄弟节点是空的inline节点, - * 则这些兄弟节点将被删除 - * @grammar UE.dom.domUtils.clearEmptySibling(node,ignoreNext) //ignoreNext指定是否忽略右边空节点 - * @grammar UE.dom.domUtils.clearEmptySibling(node,ignoreNext,ignorePre) //ignorePre指定是否忽略左边空节点 - * @example - * ```html - * - *
    - * - * - * - * xxx - * - * - * - * ``` - */ - - /** - * 清除node节点左右连续为空的兄弟inline节点, 如果ignoreNext的值为true, - * 则忽略对右边兄弟节点的操作。 - * @method clearEmptySibling - * @param { Node } node 执行的节点对象, 如果该节点的左右连续的兄弟节点是空的inline节点, - * @param { Boolean } ignoreNext 是否忽略忽略对右边的兄弟节点的操作 - * 则这些兄弟节点将被删除 - * @see UE.dom.domUtils.clearEmptySibling(Node) - */ - - /** - * 清除node节点左右连续为空的兄弟inline节点, 如果ignoreNext的值为true, - * 则忽略对右边兄弟节点的操作, 如果ignorePre的值为true,则忽略对左边兄弟节点的操作。 - * @method clearEmptySibling - * @param { Node } node 执行的节点对象, 如果该节点的左右连续的兄弟节点是空的inline节点, - * @param { Boolean } ignoreNext 是否忽略忽略对右边的兄弟节点的操作 - * @param { Boolean } ignorePre 是否忽略忽略对左边的兄弟节点的操作 - * 则这些兄弟节点将被删除 - * @see UE.dom.domUtils.clearEmptySibling(Node) - */ - clearEmptySibling:function (node, ignoreNext, ignorePre) { - function clear(next, dir) { - var tmpNode; - while (next && !domUtils.isBookmarkNode(next) && (domUtils.isEmptyInlineElement(next) - //这里不能把空格算进来会吧空格干掉,出现文字间的空格丢掉了 - || !new RegExp('[^\t\n\r' + domUtils.fillChar + ']').test(next.nodeValue) )) { - tmpNode = next[dir]; - domUtils.remove(next); - next = tmpNode; - } - } - !ignoreNext && clear(node.nextSibling, 'nextSibling'); - !ignorePre && clear(node.previousSibling, 'previousSibling'); - }, - /** - * 将一个文本节点textNode拆分成两个文本节点,offset指定拆分位置 - * @method split - * @param { Node } textNode 需要拆分的文本节点对象 - * @param { int } offset 需要拆分的位置, 位置计算从0开始 - * @return { Node } 拆分后形成的新节点 - * @example - * ```html - *
    abcdef
    - * - * ``` - */ - split:function (node, offset) { - var doc = node.ownerDocument; - if (browser.ie && offset == node.nodeValue.length) { - var next = doc.createTextNode(''); - return domUtils.insertAfter(node, next); - } - var retval = node.splitText(offset); - //ie8下splitText不会跟新childNodes,我们手动触发他的更新 - if (browser.ie8) { - var tmpNode = doc.createTextNode(''); - domUtils.insertAfter(retval, tmpNode); - domUtils.remove(tmpNode); - } - return retval; - }, - - /** - * 检测文本节点textNode是否为空节点(包括空格、换行、占位符等字符) - * @method isWhitespace - * @param { Node } node 需要检测的节点对象 - * @return { Boolean } 检测的节点是否为空 - * @example - * ```html - *
    - * - *
    - * - * ``` - */ - isWhitespace:function (node) { - return !new RegExp('[^ \t\n\r' + domUtils.fillChar + ']').test(node.nodeValue); - }, - /** - * 获取元素element相对于viewport的位置坐标 - * @method getXY - * @param { Node } element 需要计算位置的节点对象 - * @return { Object } 返回形如{x:left,y:top}的一个key-value映射对象, 其中键x代表水平偏移距离, - * y代表垂直偏移距离。 - * - * @example - * ```javascript - * var location = UE.dom.domUtils.getXY( document.getElementById("test") ); - * //output: test的坐标为: 12, 24 - * console.log( 'test的坐标为: ', location.x, ',', location.y ); - * ``` - */ - getXY:function (element) { - var x = 0, y = 0; - while (element.offsetParent) { - y += element.offsetTop; - x += element.offsetLeft; - element = element.offsetParent; - } - return { 'x':x, 'y':y}; - }, - /** - * 为元素element绑定原生DOM事件,type为事件类型,handler为处理函数 - * @method on - * @param { Node } element 需要绑定事件的节点对象 - * @param { String } type 绑定的事件类型 - * @param { Function } handler 事件处理器 - * @example - * ```javascript - * UE.dom.domUtils.on(document.body,"click",function(e){ - * //e为事件对象,this为被点击元素对戏那个 - * }); - * ``` - */ - - /** - * 为元素element绑定原生DOM事件,type为事件类型,handler为处理函数 - * @method on - * @param { Node } element 需要绑定事件的节点对象 - * @param { Array } type 绑定的事件类型数组 - * @param { Function } handler 事件处理器 - * @example - * ```javascript - * UE.dom.domUtils.on(document.body,["click","mousedown"],function(evt){ - * //evt为事件对象,this为被点击元素对象 - * }); - * ``` - */ - on:function (element, type, handler) { - - var types = utils.isArray(type) ? type : utils.trim(type).split(/\s+/), - k = types.length; - if (k) while (k--) { - type = types[k]; - if (element.addEventListener) { - element.addEventListener(type, handler, false); - } else { - if (!handler._d) { - handler._d = { - els : [] - }; - } - var key = type + handler.toString(),index = utils.indexOf(handler._d.els,element); - if (!handler._d[key] || index == -1) { - if(index == -1){ - handler._d.els.push(element); - } - if(!handler._d[key]){ - handler._d[key] = function (evt) { - return handler.call(evt.srcElement, evt || window.event); - }; - } - - - element.attachEvent('on' + type, handler._d[key]); - } - } - } - element = null; - }, - /** - * 解除DOM事件绑定 - * @method un - * @param { Node } element 需要解除事件绑定的节点对象 - * @param { String } type 需要接触绑定的事件类型 - * @param { Function } handler 对应的事件处理器 - * @example - * ```javascript - * UE.dom.domUtils.un(document.body,"click",function(evt){ - * //evt为事件对象,this为被点击元素对象 - * }); - * ``` - */ - - /** - * 解除DOM事件绑定 - * @method un - * @param { Node } element 需要解除事件绑定的节点对象 - * @param { Array } type 需要接触绑定的事件类型数组 - * @param { Function } handler 对应的事件处理器 - * @example - * ```javascript - * UE.dom.domUtils.un(document.body, ["click","mousedown"],function(evt){ - * //evt为事件对象,this为被点击元素对象 - * }); - * ``` - */ - un:function (element, type, handler) { - var types = utils.isArray(type) ? type : utils.trim(type).split(/\s+/), - k = types.length; - if (k) while (k--) { - type = types[k]; - if (element.removeEventListener) { - element.removeEventListener(type, handler, false); - } else { - var key = type + handler.toString(); - try{ - element.detachEvent('on' + type, handler._d ? handler._d[key] : handler); - }catch(e){} - if (handler._d && handler._d[key]) { - var index = utils.indexOf(handler._d.els,element); - if(index!=-1){ - handler._d.els.splice(index,1); - } - handler._d.els.length == 0 && delete handler._d[key]; - } - } - } - }, - - /** - * 比较节点nodeA与节点nodeB是否具有相同的标签名、属性名以及属性值 - * @method isSameElement - * @param { Node } nodeA 需要比较的节点 - * @param { Node } nodeB 需要比较的节点 - * @return { Boolean } 两个节点是否具有相同的标签名、属性名以及属性值 - * @example - * ```html - * ssss - * bbbbb - * ssss - * bbbbb - * - * - * ``` - */ - isSameElement:function (nodeA, nodeB) { - if (nodeA.tagName != nodeB.tagName) { - return false; - } - var thisAttrs = nodeA.attributes, - otherAttrs = nodeB.attributes; - if (!ie && thisAttrs.length != otherAttrs.length) { - return false; - } - var attrA, attrB, al = 0, bl = 0; - for (var i = 0; attrA = thisAttrs[i++];) { - if (attrA.nodeName == 'style') { - if (attrA.specified) { - al++; - } - if (domUtils.isSameStyle(nodeA, nodeB)) { - continue; - } else { - return false; - } - } - if (ie) { - if (attrA.specified) { - al++; - attrB = otherAttrs.getNamedItem(attrA.nodeName); - } else { - continue; - } - } else { - attrB = nodeB.attributes[attrA.nodeName]; - } - if (!attrB.specified || attrA.nodeValue != attrB.nodeValue) { - return false; - } - } - // 有可能attrB的属性包含了attrA的属性之外还有自己的属性 - if (ie) { - for (i = 0; attrB = otherAttrs[i++];) { - if (attrB.specified) { - bl++; - } - } - if (al != bl) { - return false; - } - } - return true; - }, - - /** - * 判断节点nodeA与节点nodeB的元素的style属性是否一致 - * @method isSameStyle - * @param { Node } nodeA 需要比较的节点 - * @param { Node } nodeB 需要比较的节点 - * @return { Boolean } 两个节点是否具有相同的style属性值 - * @example - * ```html - * ssss - * bbbbb - * ssss - * bbbbb - * - * - * ``` - */ - isSameStyle:function (nodeA, nodeB) { - var styleA = nodeA.style.cssText.replace(/( ?; ?)/g, ';').replace(/( ?: ?)/g, ':'), - styleB = nodeB.style.cssText.replace(/( ?; ?)/g, ';').replace(/( ?: ?)/g, ':'); - if (browser.opera) { - styleA = nodeA.style; - styleB = nodeB.style; - if (styleA.length != styleB.length) - return false; - for (var p in styleA) { - if (/^(\d+|csstext)$/i.test(p)) { - continue; - } - if (styleA[p] != styleB[p]) { - return false; - } - } - return true; - } - if (!styleA || !styleB) { - return styleA == styleB; - } - styleA = styleA.split(';'); - styleB = styleB.split(';'); - if (styleA.length != styleB.length) { - return false; - } - for (var i = 0, ci; ci = styleA[i++];) { - if (utils.indexOf(styleB, ci) == -1) { - return false; - } - } - return true; - }, - /** - * 检查节点node是否为block元素 - * @method isBlockElm - * @param { Node } node 需要检测的节点对象 - * @return { Boolean } 是否是block元素节点 - * @warning 该方法的判断规则如下: 如果该元素原本是block元素, 则不论该元素当前的css样式是什么都会返回true; - * 否则,检测该元素的css样式, 如果该元素当前是block元素, 则返回true。 其余情况下都返回false。 - * @example - * ```html - * - * - *
    - * - * - * ``` - */ - isBlockElm:function (node) { - return node.nodeType == 1 && (dtd.$block[node.tagName] || styleBlock[domUtils.getComputedStyle(node, 'display')]) && !dtd.$nonChild[node.tagName]; - }, - /** - * 检测node节点是否为body节点 - * @method isBody - * @param { Element } node 需要检测的dom元素 - * @return { Boolean } 给定的元素是否是body元素 - * @example - * ```javascript - * //output: true - * console.log( UE.dom.domUtils.isBody( document.body ) ); - * ``` - */ - isBody:function (node) { - return node && node.nodeType == 1 && node.tagName.toLowerCase() == 'body'; - }, - /** - * 以node节点为分界,将该节点的指定祖先节点parent拆分成两个独立的节点, - * 拆分形成的两个节点之间是node节点 - * @method breakParent - * @param { Node } node 作为分界的节点对象 - * @param { Node } parent 该节点必须是node节点的祖先节点, 且是block节点。 - * @return { Node } 给定的node分界节点 - * @example - * ```javascript - * - * var node = document.createElement("span"), - * wrapNode = document.createElement( "div" ), - * parent = document.createElement("p"); - * - * parent.appendChild( node ); - * wrapNode.appendChild( parent ); - * - * //拆分前 - * //output:

    - * console.log( wrapNode.innerHTML ); - * - * - * UE.dom.domUtils.breakParent( node, parent ); - * //拆分后 - * //output:

    - * console.log( wrapNode.innerHTML ); - * - * ``` - */ - breakParent:function (node, parent) { - var tmpNode, - parentClone = node, - clone = node, - leftNodes, - rightNodes; - do { - parentClone = parentClone.parentNode; - if (leftNodes) { - tmpNode = parentClone.cloneNode(false); - tmpNode.appendChild(leftNodes); - leftNodes = tmpNode; - tmpNode = parentClone.cloneNode(false); - tmpNode.appendChild(rightNodes); - rightNodes = tmpNode; - } else { - leftNodes = parentClone.cloneNode(false); - rightNodes = leftNodes.cloneNode(false); - } - while (tmpNode = clone.previousSibling) { - leftNodes.insertBefore(tmpNode, leftNodes.firstChild); - } - while (tmpNode = clone.nextSibling) { - rightNodes.appendChild(tmpNode); - } - clone = parentClone; - } while (parent !== parentClone); - tmpNode = parent.parentNode; - tmpNode.insertBefore(leftNodes, parent); - tmpNode.insertBefore(rightNodes, parent); - tmpNode.insertBefore(node, rightNodes); - domUtils.remove(parent); - return node; - }, - /** - * 检查节点node是否是空inline节点 - * @method isEmptyInlineElement - * @param { Node } node 需要检测的节点对象 - * @return { Number } 如果给定的节点是空的inline节点, 则返回1, 否则返回0。 - * @example - * ```html - * => 1 - * => 1 - * => 1 - * xx => 0 - * ``` - */ - isEmptyInlineElement:function (node) { - if (node.nodeType != 1 || !dtd.$removeEmpty[ node.tagName ]) { - return 0; - } - node = node.firstChild; - while (node) { - //如果是创建的bookmark就跳过 - if (domUtils.isBookmarkNode(node)) { - return 0; - } - if (node.nodeType == 1 && !domUtils.isEmptyInlineElement(node) || - node.nodeType == 3 && !domUtils.isWhitespace(node) - ) { - return 0; - } - node = node.nextSibling; - } - return 1; - - }, - - /** - * 删除node节点下首尾两端的空白文本子节点 - * @method trimWhiteTextNode - * @param { Element } node 需要执行删除操作的元素对象 - * @example - * ```javascript - * var node = document.createElement("div"); - * - * node.appendChild( document.createTextNode( "" ) ); - * - * node.appendChild( document.createElement("div") ); - * - * node.appendChild( document.createTextNode( "" ) ); - * - * //3 - * console.log( node.childNodes.length ); - * - * UE.dom.domUtils.trimWhiteTextNode( node ); - * - * //1 - * console.log( node.childNodes.length ); - * ``` - */ - trimWhiteTextNode:function (node) { - function remove(dir) { - var child; - while ((child = node[dir]) && child.nodeType == 3 && domUtils.isWhitespace(child)) { - node.removeChild(child); - } - } - remove('firstChild'); - remove('lastChild'); - }, - - /** - * 合并node节点下相同的子节点 - * @name mergeChild - * @desc - * UE.dom.domUtils.mergeChild(node,tagName) //tagName要合并的子节点的标签 - * @example - *

    xxaaxx

    - * ==> UE.dom.domUtils.mergeChild(node,'span') - *

    xxaaxx

    - */ - mergeChild:function (node, tagName, attrs) { - var list = domUtils.getElementsByTagName(node, node.tagName.toLowerCase()); - for (var i = 0, ci; ci = list[i++];) { - if (!ci.parentNode || domUtils.isBookmarkNode(ci)) { - continue; - } - //span单独处理 - if (ci.tagName.toLowerCase() == 'span') { - if (node === ci.parentNode) { - domUtils.trimWhiteTextNode(node); - if (node.childNodes.length == 1) { - node.style.cssText = ci.style.cssText + ";" + node.style.cssText; - domUtils.remove(ci, true); - continue; - } - } - ci.style.cssText = node.style.cssText + ';' + ci.style.cssText; - if (attrs) { - var style = attrs.style; - if (style) { - style = style.split(';'); - for (var j = 0, s; s = style[j++];) { - ci.style[utils.cssStyleToDomStyle(s.split(':')[0])] = s.split(':')[1]; - } - } - } - if (domUtils.isSameStyle(ci, node)) { - domUtils.remove(ci, true); - } - continue; - } - if (domUtils.isSameElement(node, ci)) { - domUtils.remove(ci, true); - } - } - }, - - /** - * 原生方法getElementsByTagName的封装 - * @method getElementsByTagName - * @param { Node } node 目标节点对象 - * @param { String } tagName 需要查找的节点的tagName, 多个tagName以空格分割 - * @return { Array } 符合条件的节点集合 - */ - getElementsByTagName:function (node, name,filter) { - if(filter && utils.isString(filter)){ - var className = filter; - filter = function(node){return domUtils.hasClass(node,className)} - } - name = utils.trim(name).replace(/[ ]{2,}/g,' ').split(' '); - var arr = []; - for(var n = 0,ni;ni=name[n++];){ - var list = node.getElementsByTagName(ni); - for (var i = 0, ci; ci = list[i++];) { - if(!filter || filter(ci)) - arr.push(ci); - } - } - - return arr; - }, - /** - * 将节点node提取到父节点上 - * @method mergeToParent - * @param { Element } node 需要提取的元素对象 - * @example - * ```html - *
    - *
    - * - *
    - *
    - * - * - * ``` - */ - mergeToParent:function (node) { - var parent = node.parentNode; - while (parent && dtd.$removeEmpty[parent.tagName]) { - if (parent.tagName == node.tagName || parent.tagName == 'A') {//针对a标签单独处理 - domUtils.trimWhiteTextNode(parent); - //span需要特殊处理 不处理这样的情况 xxxxxxxxx - if (parent.tagName == 'SPAN' && !domUtils.isSameStyle(parent, node) - || (parent.tagName == 'A' && node.tagName == 'SPAN')) { - if (parent.childNodes.length > 1 || parent !== node.parentNode) { - node.style.cssText = parent.style.cssText + ";" + node.style.cssText; - parent = parent.parentNode; - continue; - } else { - parent.style.cssText += ";" + node.style.cssText; - //trace:952 a标签要保持下划线 - if (parent.tagName == 'A') { - parent.style.textDecoration = 'underline'; - } - } - } - if (parent.tagName != 'A') { - parent === node.parentNode && domUtils.remove(node, true); - break; - } - } - parent = parent.parentNode; - } - }, - /** - * 合并节点node的左右兄弟节点 - * @method mergeSibling - * @param { Element } node 需要合并的目标节点 - * @example - * ```html - * xxxxoooxxxx - * - * - * ``` - */ - - /** - * 合并节点node的左右兄弟节点, 可以根据给定的条件选择是否忽略合并左节点。 - * @method mergeSibling - * @param { Element } node 需要合并的目标节点 - * @param { Boolean } ignorePre 是否忽略合并左节点 - * @example - * ```html - * xxxxoooxxxx - * - * - * ``` - */ - - /** - * 合并节点node的左右兄弟节点,可以根据给定的条件选择是否忽略合并左右节点。 - * @method mergeSibling - * @param { Element } node 需要合并的目标节点 - * @param { Boolean } ignorePre 是否忽略合并左节点 - * @param { Boolean } ignoreNext 是否忽略合并右节点 - * @remind 如果同时忽略左右节点, 则该操作什么也不会做 - * @example - * ```html - * xxxxoooxxxx - * - * - * ``` - */ - mergeSibling:function (node, ignorePre, ignoreNext) { - function merge(rtl, start, node) { - var next; - if ((next = node[rtl]) && !domUtils.isBookmarkNode(next) && next.nodeType == 1 && domUtils.isSameElement(node, next)) { - while (next.firstChild) { - if (start == 'firstChild') { - node.insertBefore(next.lastChild, node.firstChild); - } else { - node.appendChild(next.firstChild); - } - } - domUtils.remove(next); - } - } - !ignorePre && merge('previousSibling', 'firstChild', node); - !ignoreNext && merge('nextSibling', 'lastChild', node); - }, - - /** - * 设置节点node及其子节点不会被选中 - * @method unSelectable - * @param { Element } node 需要执行操作的dom元素 - * @remind 执行该操作后的节点, 将不能被鼠标选中 - * @example - * ```javascript - * UE.dom.domUtils.unSelectable( document.body ); - * ``` - */ - unSelectable:ie && browser.ie9below || browser.opera ? function (node) { - //for ie9 - node.onselectstart = function () { - return false; - }; - node.onclick = node.onkeyup = node.onkeydown = function () { - return false; - }; - node.unselectable = 'on'; - node.setAttribute("unselectable", "on"); - for (var i = 0, ci; ci = node.all[i++];) { - switch (ci.tagName.toLowerCase()) { - case 'iframe' : - case 'textarea' : - case 'input' : - case 'select' : - break; - default : - ci.unselectable = 'on'; - node.setAttribute("unselectable", "on"); - } - } - } : function (node) { - node.style.MozUserSelect = - node.style.webkitUserSelect = - node.style.msUserSelect = - node.style.KhtmlUserSelect = 'none'; - }, - /** - * 删除节点node上的指定属性名称的属性 - * @method removeAttributes - * @param { Node } node 需要删除属性的节点对象 - * @param { String } attrNames 可以是空格隔开的多个属性名称,该操作将会依次删除相应的属性 - * @example - * ```html - *
    - * xxxxx - *
    - * - * - * ``` - */ - - /** - * 删除节点node上的指定属性名称的属性 - * @method removeAttributes - * @param { Node } node 需要删除属性的节点对象 - * @param { Array } attrNames 需要删除的属性名数组 - * @example - * ```html - *
    - * xxxxx - *
    - * - * - * ``` - */ - removeAttributes:function (node, attrNames) { - attrNames = utils.isArray(attrNames) ? attrNames : utils.trim(attrNames).replace(/[ ]{2,}/g,' ').split(' '); - for (var i = 0, ci; ci = attrNames[i++];) { - ci = attrFix[ci] || ci; - switch (ci) { - case 'className': - node[ci] = ''; - break; - case 'style': - node.style.cssText = ''; - var val = node.getAttributeNode('style'); - !browser.ie && val && node.removeAttributeNode(val); - } - node.removeAttribute(ci); - } - }, - /** - * 在doc下创建一个标签名为tag,属性为attrs的元素 - * @method createElement - * @param { DomDocument } doc 新创建的元素属于该document节点创建 - * @param { String } tagName 需要创建的元素的标签名 - * @param { Object } attrs 新创建的元素的属性key-value集合 - * @return { Element } 新创建的元素对象 - * @example - * ```javascript - * var ele = UE.dom.domUtils.createElement( document, 'div', { - * id: 'test' - * } ); - * - * //output: DIV - * console.log( ele.tagName ); - * - * //output: test - * console.log( ele.id ); - * - * ``` - */ - createElement:function (doc, tag, attrs) { - return domUtils.setAttributes(doc.createElement(tag), attrs) - }, - /** - * 为节点node添加属性attrs,attrs为属性键值对 - * @method setAttributes - * @param { Element } node 需要设置属性的元素对象 - * @param { Object } attrs 需要设置的属性名-值对 - * @return { Element } 设置属性的元素对象 - * @example - * ```html - * - * - * - * - */ - setAttributes:function (node, attrs) { - for (var attr in attrs) { - if(attrs.hasOwnProperty(attr)){ - var value = attrs[attr]; - switch (attr) { - case 'class': - //ie下要这样赋值,setAttribute不起作用 - node.className = value; - break; - case 'style' : - node.style.cssText = node.style.cssText + ";" + value; - break; - case 'innerHTML': - node[attr] = value; - break; - case 'value': - node.value = value; - break; - default: - node.setAttribute(attrFix[attr] || attr, value); - } - } - } - return node; - }, - - /** - * 获取元素element经过计算后的样式值 - * @method getComputedStyle - * @param { Element } element 需要获取样式的元素对象 - * @param { String } styleName 需要获取的样式名 - * @return { String } 获取到的样式值 - * @example - * ```html - * - * - * - * - * - * ``` - */ - getComputedStyle:function (element, styleName) { - //一下的属性单独处理 - var pros = 'width height top left'; - - if(pros.indexOf(styleName) > -1){ - return element['offset' + styleName.replace(/^\w/,function(s){return s.toUpperCase()})] + 'px'; - } - //忽略文本节点 - if (element.nodeType == 3) { - element = element.parentNode; - } - //ie下font-size若body下定义了font-size,则从currentStyle里会取到这个font-size. 取不到实际值,故此修改. - if (browser.ie && browser.version < 9 && styleName == 'font-size' && !element.style.fontSize && - !dtd.$empty[element.tagName] && !dtd.$nonChild[element.tagName]) { - var span = element.ownerDocument.createElement('span'); - span.style.cssText = 'padding:0;border:0;font-family:simsun;'; - span.innerHTML = '.'; - element.appendChild(span); - var result = span.offsetHeight; - element.removeChild(span); - span = null; - return result + 'px'; - } - try { - var value = domUtils.getStyle(element, styleName) || - (window.getComputedStyle ? domUtils.getWindow(element).getComputedStyle(element, '').getPropertyValue(styleName) : - ( element.currentStyle || element.style )[utils.cssStyleToDomStyle(styleName)]); - - } catch (e) { - return ""; - } - return utils.transUnitToPx(utils.fixColor(styleName, value)); - }, - /** - * 删除元素element指定的className - * @method removeClasses - * @param { Element } ele 需要删除class的元素节点 - * @param { String } classNames 需要删除的className, 多个className之间以空格分开 - * @example - * ```html - * xxx - * - * - * ``` - */ - - /** - * 删除元素element指定的className - * @method removeClasses - * @param { Element } ele 需要删除class的元素节点 - * @param { Array } classNames 需要删除的className数组 - * @example - * ```html - * xxx - * - * - * ``` - */ - removeClasses:function (elm, classNames) { - classNames = utils.isArray(classNames) ? classNames : - utils.trim(classNames).replace(/[ ]{2,}/g,' ').split(' '); - for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){ - cls = cls.replace(new RegExp('\\b' + ci + '\\b'),'') - } - cls = utils.trim(cls).replace(/[ ]{2,}/g,' '); - if(cls){ - elm.className = cls; - }else{ - domUtils.removeAttributes(elm,['class']); - } - }, - /** - * 给元素element添加className - * @method addClass - * @param { Node } ele 需要增加className的元素 - * @param { String } classNames 需要添加的className, 多个className之间以空格分割 - * @remind 相同的类名不会被重复添加 - * @example - * ```html - * - * - * - * ``` - */ - - /** - * 判断元素element是否包含给定的样式类名className - * @method hasClass - * @param { Node } ele 需要检测的元素 - * @param { Array } classNames 需要检测的className数组 - * @return { Boolean } 元素是否包含所有给定的className - * @example - * ```html - * - * - * - * ``` - */ - hasClass:function (element, className) { - if(utils.isRegExp(className)){ - return className.test(element.className) - } - className = utils.trim(className).replace(/[ ]{2,}/g,' ').split(' '); - for(var i = 0,ci,cls = element.className;ci=className[i++];){ - if(!new RegExp('\\b' + ci + '\\b','i').test(cls)){ - return false; - } - } - return i - 1 == className.length; - }, - - /** - * 阻止事件默认行为 - * @method preventDefault - * @param { Event } evt 需要阻止默认行为的事件对象 - * @example - * ```javascript - * UE.dom.domUtils.preventDefault( evt ); - * ``` - */ - preventDefault:function (evt) { - evt.preventDefault ? evt.preventDefault() : (evt.returnValue = false); - }, - /** - * 删除元素element指定的样式 - * @method removeStyle - * @param { Element } element 需要删除样式的元素 - * @param { String } styleName 需要删除的样式名 - * @example - * ```html - * - * - * - * ``` - */ - removeStyle:function (element, name) { - if(browser.ie ){ - //针对color先单独处理一下 - if(name == 'color'){ - name = '(^|;)' + name; - } - element.style.cssText = element.style.cssText.replace(new RegExp(name + '[^:]*:[^;]+;?','ig'),'') - }else{ - if (element.style.removeProperty) { - element.style.removeProperty (name); - }else { - element.style.removeAttribute (utils.cssStyleToDomStyle(name)); - } - } - - - if (!element.style.cssText) { - domUtils.removeAttributes(element, ['style']); - } - }, - /** - * 获取元素element的style属性的指定值 - * @method getStyle - * @param { Element } element 需要获取属性值的元素 - * @param { String } styleName 需要获取的style的名称 - * @warning 该方法仅获取元素style属性中所标明的值 - * @return { String } 该元素包含指定的style属性值 - * @example - * ```html - *
    - * - * - * ``` - */ - getStyle:function (element, name) { - var value = element.style[ utils.cssStyleToDomStyle(name) ]; - return utils.fixColor(name, value); - }, - /** - * 为元素element设置样式属性值 - * @method setStyle - * @param { Element } element 需要设置样式的元素 - * @param { String } styleName 样式名 - * @param { String } styleValue 样式值 - * @example - * ```html - *
    - * - * - * ``` - */ - setStyle:function (element, name, value) { - element.style[utils.cssStyleToDomStyle(name)] = value; - if(!utils.trim(element.style.cssText)){ - this.removeAttributes(element,'style') - } - }, - /** - * 为元素element设置多个样式属性值 - * @method setStyles - * @param { Element } element 需要设置样式的元素 - * @param { Object } styles 样式名值对 - * @example - * ```html - *
    - * - * - * ``` - */ - setStyles:function (element, styles) { - for (var name in styles) { - if (styles.hasOwnProperty(name)) { - domUtils.setStyle(element, name, styles[name]); - } - } - }, - /** - * 删除_moz_dirty属性 - * @private - * @method removeDirtyAttr - */ - removeDirtyAttr:function (node) { - for (var i = 0, ci, nodes = node.getElementsByTagName('*'); ci = nodes[i++];) { - ci.removeAttribute('_moz_dirty'); - } - node.removeAttribute('_moz_dirty'); - }, - /** - * 获取子节点的数量 - * @method getChildCount - * @param { Element } node 需要检测的元素 - * @return { Number } 给定的node元素的子节点数量 - * @example - * ```html - *
    - * - *
    - * - * - * ``` - */ - - /** - * 根据给定的过滤规则, 获取符合条件的子节点的数量 - * @method getChildCount - * @param { Element } node 需要检测的元素 - * @param { Function } fn 过滤器, 要求对符合条件的子节点返回true, 反之则要求返回false - * @return { Number } 符合过滤条件的node元素的子节点数量 - * @example - * ```html - *
    - * - *
    - * - * - * ``` - */ - getChildCount:function (node, fn) { - var count = 0, first = node.firstChild; - fn = fn || function () { - return 1; - }; - while (first) { - if (fn(first)) { - count++; - } - first = first.nextSibling; - } - return count; - }, - - /** - * 判断给定节点是否为空节点 - * @method isEmptyNode - * @param { Node } node 需要检测的节点对象 - * @return { Boolean } 节点是否为空 - * @example - * ```javascript - * UE.dom.domUtils.isEmptyNode( document.body ); - * ``` - */ - isEmptyNode:function (node) { - return !node.firstChild || domUtils.getChildCount(node, function (node) { - return !domUtils.isBr(node) && !domUtils.isBookmarkNode(node) && !domUtils.isWhitespace(node) - }) == 0 - }, - clearSelectedArr:function (nodes) { - var node; - while (node = nodes.pop()) { - domUtils.removeAttributes(node, ['class']); - } - }, - /** - * 将显示区域滚动到指定节点的位置 - * @method scrollToView - * @param {Node} node 节点 - * @param {window} win window对象 - * @param {Number} offsetTop 距离上方的偏移量 - */ - scrollToView:function (node, win, offsetTop) { - var getViewPaneSize = function () { - var doc = win.document, - mode = doc.compatMode == 'CSS1Compat'; - return { - width:( mode ? doc.documentElement.clientWidth : doc.body.clientWidth ) || 0, - height:( mode ? doc.documentElement.clientHeight : doc.body.clientHeight ) || 0 - }; - }, - getScrollPosition = function (win) { - if ('pageXOffset' in win) { - return { - x:win.pageXOffset || 0, - y:win.pageYOffset || 0 - }; - } - else { - var doc = win.document; - return { - x:doc.documentElement.scrollLeft || doc.body.scrollLeft || 0, - y:doc.documentElement.scrollTop || doc.body.scrollTop || 0 - }; - } - }; - var winHeight = getViewPaneSize().height, offset = winHeight * -1 + offsetTop; - offset += (node.offsetHeight || 0); - var elementPosition = domUtils.getXY(node); - offset += elementPosition.y; - var currentScroll = getScrollPosition(win).y; - // offset += 50; - if (offset > currentScroll || offset < currentScroll - winHeight) { - win.scrollTo(0, offset + (offset < 0 ? -20 : 20)); - } - }, - /** - * 判断给定节点是否为br - * @method isBr - * @param { Node } node 需要判断的节点对象 - * @return { Boolean } 给定的节点是否是br节点 - */ - isBr:function (node) { - return node.nodeType == 1 && node.tagName == 'BR'; - }, - /** - * 判断给定的节点是否是一个“填充”节点 - * @private - * @method isFillChar - * @param { Node } node 需要判断的节点 - * @param { Boolean } isInStart 是否从节点内容的开始位置匹配 - * @returns { Boolean } 节点是否是填充节点 - */ - isFillChar:function (node,isInStart) { - if(node.nodeType != 3) - return false; - var text = node.nodeValue; - if(isInStart){ - return new RegExp('^' + domUtils.fillChar).test(text) - } - return !text.replace(new RegExp(domUtils.fillChar,'g'), '').length - }, - isStartInblock:function (range) { - var tmpRange = range.cloneRange(), - flag = 0, - start = tmpRange.startContainer, - tmp; - if(start.nodeType == 1 && start.childNodes[tmpRange.startOffset]){ - start = start.childNodes[tmpRange.startOffset]; - var pre = start.previousSibling; - while(pre && domUtils.isFillChar(pre)){ - start = pre; - pre = pre.previousSibling; - } - } - if(this.isFillChar(start,true) && tmpRange.startOffset == 1){ - tmpRange.setStartBefore(start); - start = tmpRange.startContainer; - } - - while (start && domUtils.isFillChar(start)) { - tmp = start; - start = start.previousSibling - } - if (tmp) { - tmpRange.setStartBefore(tmp); - start = tmpRange.startContainer; - } - if (start.nodeType == 1 && domUtils.isEmptyNode(start) && tmpRange.startOffset == 1) { - tmpRange.setStart(start, 0).collapse(true); - } - while (!tmpRange.startOffset) { - start = tmpRange.startContainer; - if (domUtils.isBlockElm(start) || domUtils.isBody(start)) { - flag = 1; - break; - } - var pre = tmpRange.startContainer.previousSibling, - tmpNode; - if (!pre) { - tmpRange.setStartBefore(tmpRange.startContainer); - } else { - while (pre && domUtils.isFillChar(pre)) { - tmpNode = pre; - pre = pre.previousSibling; - } - if (tmpNode) { - tmpRange.setStartBefore(tmpNode); - } else { - tmpRange.setStartBefore(tmpRange.startContainer); - } - } - } - return flag && !domUtils.isBody(tmpRange.startContainer) ? 1 : 0; - }, - - /** - * 判断给定的元素是否是一个空元素 - * @method isEmptyBlock - * @param { Element } node 需要判断的元素 - * @return { Boolean } 是否是空元素 - * @example - * ```html - *
    - * - * - * ``` - */ - - /** - * 根据指定的判断规则判断给定的元素是否是一个空元素 - * @method isEmptyBlock - * @param { Element } node 需要判断的元素 - * @param { RegExp } reg 对内容执行判断的正则表达式对象 - * @return { Boolean } 是否是空元素 - */ - isEmptyBlock:function (node,reg) { - // HaoChuan9421 - if(!node){ - return; - } - if(node.nodeType != 1) - return 0; - reg = reg || new RegExp('[ \xa0\t\r\n' + domUtils.fillChar + ']', 'g'); - - if (node[browser.ie ? 'innerText' : 'textContent'].replace(reg, '').length > 0) { - return 0; - } - for (var n in dtd.$isNotEmpty) { - if (node.getElementsByTagName(n).length) { - return 0; - } - } - return 1; - }, - - /** - * 移动元素使得该元素的位置移动指定的偏移量的距离 - * @method setViewportOffset - * @param { Element } element 需要设置偏移量的元素 - * @param { Object } offset 偏移量, 形如{ left: 100, top: 50 }的一个键值对, 表示该元素将在 - * 现有的位置上向水平方向偏移offset.left的距离, 在竖直方向上偏移 - * offset.top的距离 - * @example - * ```html - *
    - * - * - * ``` - */ - setViewportOffset:function (element, offset) { - var left = parseInt(element.style.left) | 0; - var top = parseInt(element.style.top) | 0; - var rect = element.getBoundingClientRect(); - var offsetLeft = offset.left - rect.left; - var offsetTop = offset.top - rect.top; - if (offsetLeft) { - element.style.left = left + offsetLeft + 'px'; - } - if (offsetTop) { - element.style.top = top + offsetTop + 'px'; - } - }, - - /** - * 用“填充字符”填充节点 - * @method fillNode - * @private - * @param { DomDocument } doc 填充的节点所在的docment对象 - * @param { Node } node 需要填充的节点对象 - * @example - * ```html - *
    - * - * - * ``` - */ - fillNode:function (doc, node) { - var tmpNode = browser.ie ? doc.createTextNode(domUtils.fillChar) : doc.createElement('br'); - node.innerHTML = ''; - node.appendChild(tmpNode); - }, - - /** - * 把节点src的所有子节点追加到另一个节点tag上去 - * @method moveChild - * @param { Node } src 源节点, 该节点下的所有子节点将被移除 - * @param { Node } tag 目标节点, 从源节点移除的子节点将被追加到该节点下 - * @example - * ```html - *
    - * - *
    - *
    - *
    - *
    - * - * - * ``` - */ - - /** - * 把节点src的所有子节点移动到另一个节点tag上去, 可以通过dir参数控制附加的行为是“追加”还是“插入顶部” - * @method moveChild - * @param { Node } src 源节点, 该节点下的所有子节点将被移除 - * @param { Node } tag 目标节点, 从源节点移除的子节点将被附加到该节点下 - * @param { Boolean } dir 附加方式, 如果为true, 则附加进去的节点将被放到目标节点的顶部, 反之,则放到末尾 - * @example - * ```html - *
    - * - *
    - *
    - *
    - *
    - * - * - * ``` - */ - moveChild:function (src, tag, dir) { - while (src.firstChild) { - if (dir && tag.firstChild) { - tag.insertBefore(src.lastChild, tag.firstChild); - } else { - tag.appendChild(src.firstChild); - } - } - }, - - /** - * 判断节点的标签上是否不存在任何属性 - * @method hasNoAttributes - * @private - * @param { Node } node 需要检测的节点对象 - * @return { Boolean } 节点是否不包含任何属性 - * @example - * ```html - *
    xxxx
    - * - * - * ``` - */ - hasNoAttributes:function (node) { - return browser.ie ? /^<\w+\s*?>/.test(node.outerHTML) : node.attributes.length == 0; - }, - - /** - * 检测节点是否是UEditor所使用的辅助节点 - * @method isCustomeNode - * @private - * @param { Node } node 需要检测的节点 - * @remind 辅助节点是指编辑器要完成工作临时添加的节点, 在输出的时候将会从编辑器内移除, 不会影响最终的结果。 - * @return { Boolean } 给定的节点是否是一个辅助节点 - */ - isCustomeNode:function (node) { - return node.nodeType == 1 && node.getAttribute('_ue_custom_node_'); - }, - - /** - * 检测节点的标签是否是给定的标签 - * @method isTagNode - * @param { Node } node 需要检测的节点对象 - * @param { String } tagName 标签 - * @return { Boolean } 节点的标签是否是给定的标签 - * @example - * ```html - *
    - * - * - * ``` - */ - isTagNode:function (node, tagNames) { - return node.nodeType == 1 && new RegExp('\\b' + node.tagName + '\\b','i').test(tagNames) - }, - - /** - * 给定一个节点数组,在通过指定的过滤器过滤后, 获取其中满足过滤条件的第一个节点 - * @method filterNodeList - * @param { Array } nodeList 需要过滤的节点数组 - * @param { Function } fn 过滤器, 对符合条件的节点, 执行结果返回true, 反之则返回false - * @return { Node | NULL } 如果找到符合过滤条件的节点, 则返回该节点, 否则返回NULL - * @example - * ```javascript - * var divNodes = document.getElementsByTagName("div"); - * divNodes = [].slice.call( divNodes, 0 ); - * - * //output: null - * console.log( UE.dom.domUtils.filterNodeList( divNodes, function ( node ) { - * return node.tagName.toLowerCase() !== 'div'; - * } ) ); - * ``` - */ - - /** - * 给定一个节点数组nodeList和一组标签名tagNames, 获取其中能够匹配标签名的节点集合中的第一个节点 - * @method filterNodeList - * @param { Array } nodeList 需要过滤的节点数组 - * @param { String } tagNames 需要匹配的标签名, 多个标签名之间用空格分割 - * @return { Node | NULL } 如果找到标签名匹配的节点, 则返回该节点, 否则返回NULL - * @example - * ```javascript - * var divNodes = document.getElementsByTagName("div"); - * divNodes = [].slice.call( divNodes, 0 ); - * - * //output: null - * console.log( UE.dom.domUtils.filterNodeList( divNodes, 'a span' ) ); - * ``` - */ - - /** - * 给定一个节点数组,在通过指定的过滤器过滤后, 如果参数forAll为true, 则会返回所有满足过滤 - * 条件的节点集合, 否则, 返回满足条件的节点集合中的第一个节点 - * @method filterNodeList - * @param { Array } nodeList 需要过滤的节点数组 - * @param { Function } fn 过滤器, 对符合条件的节点, 执行结果返回true, 反之则返回false - * @param { Boolean } forAll 是否返回整个节点数组, 如果该参数为false, 则返回节点集合中的第一个节点 - * @return { Array | Node | NULL } 如果找到符合过滤条件的节点, 则根据参数forAll的值决定返回满足 - * 过滤条件的节点数组或第一个节点, 否则返回NULL - * @example - * ```javascript - * var divNodes = document.getElementsByTagName("div"); - * divNodes = [].slice.call( divNodes, 0 ); - * - * //output: 3(假定有3个div) - * console.log( divNodes.length ); - * - * var nodes = UE.dom.domUtils.filterNodeList( divNodes, function ( node ) { - * return node.tagName.toLowerCase() === 'div'; - * }, true ); - * - * //output: 3 - * console.log( nodes.length ); - * - * var node = UE.dom.domUtils.filterNodeList( divNodes, function ( node ) { - * return node.tagName.toLowerCase() === 'div'; - * }, false ); - * - * //output: div - * console.log( node.nodeName ); - * ``` - */ - filterNodeList : function(nodelist,filter,forAll){ - var results = []; - if(!utils .isFunction(filter)){ - var str = filter; - filter = function(n){ - return utils.indexOf(utils.isArray(str) ? str:str.split(' '), n.tagName.toLowerCase()) != -1 - }; - } - utils.each(nodelist,function(n){ - filter(n) && results.push(n) - }); - return results.length == 0 ? null : results.length == 1 || !forAll ? results[0] : results - }, - - /** - * 查询给定的range选区是否在给定的node节点内,且在该节点的最末尾 - * @method isInNodeEndBoundary - * @param { UE.dom.Range } rng 需要判断的range对象, 该对象的startContainer不能为NULL - * @param node 需要检测的节点对象 - * @return { Number } 如果给定的选取range对象是在node内部的最末端, 则返回1, 否则返回0 - */ - isInNodeEndBoundary : function (rng,node){ - var start = rng.startContainer; - if(start.nodeType == 3 && rng.startOffset != start.nodeValue.length){ - return 0; - } - if(start.nodeType == 1 && rng.startOffset != start.childNodes.length){ - return 0; - } - while(start !== node){ - if(start.nextSibling){ - return 0 - }; - start = start.parentNode; - } - return 1; - }, - isBoundaryNode : function (node,dir){ - var tmp; - while(!domUtils.isBody(node)){ - tmp = node; - node = node.parentNode; - if(tmp !== node[dir]){ - return false; - } - } - return true; - }, - fillHtml : browser.ie11below ? ' ' : '
    ' -}; -var fillCharReg = new RegExp(domUtils.fillChar, 'g'); - -// core/Range.js -/** - * Range封装 - * @file - * @module UE.dom - * @class Range - * @since 1.2.6.1 - */ - -/** - * dom操作封装 - * @unfile - * @module UE.dom - */ - -/** - * Range实现类,本类是UEditor底层核心类,封装不同浏览器之间的Range操作。 - * @unfile - * @module UE.dom - * @class Range - */ - - -(function () { - var guid = 0, - fillChar = domUtils.fillChar, - fillData; - - /** - * 更新range的collapse状态 - * @param {Range} range range对象 - */ - function updateCollapse(range) { - range.collapsed = - range.startContainer && range.endContainer && - range.startContainer === range.endContainer && - range.startOffset == range.endOffset; - } - - function selectOneNode(rng){ - return !rng.collapsed && rng.startContainer.nodeType == 1 && rng.startContainer === rng.endContainer && rng.endOffset - rng.startOffset == 1 - } - function setEndPoint(toStart, node, offset, range) { - //如果node是自闭合标签要处理 - if (node.nodeType == 1 && (dtd.$empty[node.tagName] || dtd.$nonChild[node.tagName])) { - offset = domUtils.getNodeIndex(node) + (toStart ? 0 : 1); - node = node.parentNode; - } - if (toStart) { - range.startContainer = node; - range.startOffset = offset; - if (!range.endContainer) { - range.collapse(true); - } - } else { - range.endContainer = node; - range.endOffset = offset; - if (!range.startContainer) { - range.collapse(false); - } - } - updateCollapse(range); - return range; - } - - function execContentsAction(range, action) { - //调整边界 - //range.includeBookmark(); - var start = range.startContainer, - end = range.endContainer, - startOffset = range.startOffset, - endOffset = range.endOffset, - doc = range.document, - frag = doc.createDocumentFragment(), - tmpStart, tmpEnd; - if (start.nodeType == 1) { - start = start.childNodes[startOffset] || (tmpStart = start.appendChild(doc.createTextNode(''))); - } - if (end.nodeType == 1) { - end = end.childNodes[endOffset] || (tmpEnd = end.appendChild(doc.createTextNode(''))); - } - if (start === end && start.nodeType == 3) { - frag.appendChild(doc.createTextNode(start.substringData(startOffset, endOffset - startOffset))); - //is not clone - if (action) { - start.deleteData(startOffset, endOffset - startOffset); - range.collapse(true); - } - return frag; - } - var current, currentLevel, clone = frag, - startParents = domUtils.findParents(start, true), endParents = domUtils.findParents(end, true); - for (var i = 0; startParents[i] == endParents[i];) { - i++; - } - for (var j = i, si; si = startParents[j]; j++) { - current = si.nextSibling; - if (si == start) { - if (!tmpStart) { - if (range.startContainer.nodeType == 3) { - clone.appendChild(doc.createTextNode(start.nodeValue.slice(startOffset))); - //is not clone - if (action) { - start.deleteData(startOffset, start.nodeValue.length - startOffset); - } - } else { - clone.appendChild(!action ? start.cloneNode(true) : start); - } - } - } else { - currentLevel = si.cloneNode(false); - clone.appendChild(currentLevel); - } - while (current) { - if (current === end || current === endParents[j]) { - break; - } - si = current.nextSibling; - clone.appendChild(!action ? current.cloneNode(true) : current); - current = si; - } - clone = currentLevel; - } - clone = frag; - if (!startParents[i]) { - clone.appendChild(startParents[i - 1].cloneNode(false)); - clone = clone.firstChild; - } - for (var j = i, ei; ei = endParents[j]; j++) { - current = ei.previousSibling; - if (ei == end) { - if (!tmpEnd && range.endContainer.nodeType == 3) { - clone.appendChild(doc.createTextNode(end.substringData(0, endOffset))); - //is not clone - if (action) { - end.deleteData(0, endOffset); - } - } - } else { - currentLevel = ei.cloneNode(false); - clone.appendChild(currentLevel); - } - //如果两端同级,右边第一次已经被开始做了 - if (j != i || !startParents[i]) { - while (current) { - if (current === start) { - break; - } - ei = current.previousSibling; - clone.insertBefore(!action ? current.cloneNode(true) : current, clone.firstChild); - current = ei; - } - } - clone = currentLevel; - } - if (action) { - range.setStartBefore(!endParents[i] ? endParents[i - 1] : !startParents[i] ? startParents[i - 1] : endParents[i]).collapse(true); - } - tmpStart && domUtils.remove(tmpStart); - tmpEnd && domUtils.remove(tmpEnd); - return frag; - } - - /** - * 创建一个跟document绑定的空的Range实例 - * @constructor - * @param { Document } document 新建的选区所属的文档对象 - */ - - /** - * @property { Node } startContainer 当前Range的开始边界的容器节点, 可以是一个元素节点或者是文本节点 - */ - - /** - * @property { Node } startOffset 当前Range的开始边界容器节点的偏移量, 如果是元素节点, - * 该值就是childNodes中的第几个节点, 如果是文本节点就是文本内容的第几个字符 - */ - - /** - * @property { Node } endContainer 当前Range的结束边界的容器节点, 可以是一个元素节点或者是文本节点 - */ - - /** - * @property { Node } endOffset 当前Range的结束边界容器节点的偏移量, 如果是元素节点, - * 该值就是childNodes中的第几个节点, 如果是文本节点就是文本内容的第几个字符 - */ - - /** - * @property { Boolean } collapsed 当前Range是否闭合 - * @default true - * @remind Range是闭合的时候, startContainer === endContainer && startOffset === endOffset - */ - - /** - * @property { Document } document 当前Range所属的Document对象 - * @remind 不同range的的document属性可以是不同的 - */ - var Range = dom.Range = function (document) { - var me = this; - me.startContainer = - me.startOffset = - me.endContainer = - me.endOffset = null; - me.document = document; - me.collapsed = true; - }; - - /** - * 删除fillData - * @param doc - * @param excludeNode - */ - function removeFillData(doc, excludeNode) { - try { - if (fillData && domUtils.inDoc(fillData, doc)) { - if (!fillData.nodeValue.replace(fillCharReg, '').length) { - var tmpNode = fillData.parentNode; - domUtils.remove(fillData); - while (tmpNode && domUtils.isEmptyInlineElement(tmpNode) && - //safari的contains有bug - (browser.safari ? !(domUtils.getPosition(tmpNode,excludeNode) & domUtils.POSITION_CONTAINS) : !tmpNode.contains(excludeNode)) - ) { - fillData = tmpNode.parentNode; - domUtils.remove(tmpNode); - tmpNode = fillData; - } - } else { - fillData.nodeValue = fillData.nodeValue.replace(fillCharReg, ''); - } - } - } catch (e) { - } - } - - /** - * @param node - * @param dir - */ - function mergeSibling(node, dir) { - var tmpNode; - node = node[dir]; - while (node && domUtils.isFillChar(node)) { - tmpNode = node[dir]; - domUtils.remove(node); - node = tmpNode; - } - } - - Range.prototype = { - - /** - * 克隆选区的内容到一个DocumentFragment里 - * @method cloneContents - * @return { DocumentFragment | NULL } 如果选区是闭合的将返回null, 否则, 返回包含所clone内容的DocumentFragment元素 - * @example - * ```html - * - * - * xx[xxx]x - * - * - * - * ``` - */ - cloneContents:function () { - return this.collapsed ? null : execContentsAction(this, 0); - }, - - /** - * 删除当前选区范围中的所有内容 - * @method deleteContents - * @remind 执行完该操作后, 当前Range对象变成了闭合状态 - * @return { UE.dom.Range } 当前操作的Range对象 - * @example - * ```html - * - * - * xx[xxx]x - * - * - * - * ``` - */ - deleteContents:function () { - var txt; - if (!this.collapsed) { - execContentsAction(this, 1); - } - if (browser.webkit) { - txt = this.startContainer; - if (txt.nodeType == 3 && !txt.nodeValue.length) { - this.setStartBefore(txt).collapse(true); - domUtils.remove(txt); - } - } - return this; - }, - - /** - * 将当前选区的内容提取到一个DocumentFragment里 - * @method extractContents - * @remind 执行该操作后, 选区将变成闭合状态 - * @warning 执行该操作后, 原来选区所选中的内容将从dom树上剥离出来 - * @return { DocumentFragment } 返回包含所提取内容的DocumentFragment对象 - * @example - * ```html - * - * - * xx[xxx]x - * - * - * - */ - extractContents:function () { - return this.collapsed ? null : execContentsAction(this, 2); - }, - - /** - * 设置Range的开始容器节点和偏移量 - * @method setStart - * @remind 如果给定的节点是元素节点,那么offset指的是其子元素中索引为offset的元素, - * 如果是文本节点,那么offset指的是其文本内容的第offset个字符 - * @remind 如果提供的容器节点是一个不能包含子元素的节点, 则该选区的开始容器将被设置 - * 为该节点的父节点, 此时, 其距离开始容器的偏移量也变成了该节点在其父节点 - * 中的索引 - * @param { Node } node 将被设为当前选区开始边界容器的节点对象 - * @param { int } offset 选区的开始位置偏移量 - * @return { UE.dom.Range } 当前range对象 - * @example - * ```html - * - * xxxxxxxxxxxxx[xxx] - * - * - * ``` - * @example - * ```html - * - * xxx[xx]x - * - * - * ``` - */ - setStart:function (node, offset) { - return setEndPoint(true, node, offset, this); - }, - - /** - * 设置Range的结束容器和偏移量 - * @method setEnd - * @param { Node } node 作为当前选区结束边界容器的节点对象 - * @param { int } offset 结束边界的偏移量 - * @see UE.dom.Range:setStart(Node,int) - * @return { UE.dom.Range } 当前range对象 - */ - setEnd:function (node, offset) { - return setEndPoint(false, node, offset, this); - }, - - /** - * 将Range开始位置设置到node节点之后 - * @method setStartAfter - * @remind 该操作将会把给定节点的父节点作为range的开始容器, 且偏移量是该节点在其父节点中的位置索引+1 - * @param { Node } node 选区的开始边界将紧接着该节点之后 - * @return { UE.dom.Range } 当前range对象 - * @example - * ```html - * - * xxxxxxx[xxxx] - * - * - * ``` - */ - setStartAfter:function (node) { - return this.setStart(node.parentNode, domUtils.getNodeIndex(node) + 1); - }, - - /** - * 将Range开始位置设置到node节点之前 - * @method setStartBefore - * @remind 该操作将会把给定节点的父节点作为range的开始容器, 且偏移量是该节点在其父节点中的位置索引 - * @param { Node } node 新的选区开始位置在该节点之前 - * @see UE.dom.Range:setStartAfter(Node) - * @return { UE.dom.Range } 当前range对象 - */ - setStartBefore:function (node) { - return this.setStart(node.parentNode, domUtils.getNodeIndex(node)); - }, - - /** - * 将Range结束位置设置到node节点之后 - * @method setEndAfter - * @remind 该操作将会把给定节点的父节点作为range的结束容器, 且偏移量是该节点在其父节点中的位置索引+1 - * @param { Node } node 目标节点 - * @see UE.dom.Range:setStartAfter(Node) - * @return { UE.dom.Range } 当前range对象 - * @example - * ```html - * - * [xxxxxxx]xxxx - * - * - * ``` - */ - setEndAfter:function (node) { - return this.setEnd(node.parentNode, domUtils.getNodeIndex(node) + 1); - }, - - /** - * 将Range结束位置设置到node节点之前 - * @method setEndBefore - * @remind 该操作将会把给定节点的父节点作为range的结束容器, 且偏移量是该节点在其父节点中的位置索引 - * @param { Node } node 目标节点 - * @see UE.dom.Range:setEndAfter(Node) - * @return { UE.dom.Range } 当前range对象 - */ - setEndBefore:function (node) { - return this.setEnd(node.parentNode, domUtils.getNodeIndex(node)); - }, - - /** - * 设置Range的开始位置到node节点内的第一个子节点之前 - * @method setStartAtFirst - * @remind 选区的开始容器将变成给定的节点, 且偏移量为0 - * @remind 如果给定的节点是元素节点, 则该节点必须是允许包含子节点的元素。 - * @param { Node } node 目标节点 - * @see UE.dom.Range:setStartBefore(Node) - * @return { UE.dom.Range } 当前range对象 - * @example - * ```html - * - * xxxxx[xx]xxxx - * - * - * ``` - */ - setStartAtFirst:function (node) { - return this.setStart(node, 0); - }, - - /** - * 设置Range的开始位置到node节点内的最后一个节点之后 - * @method setStartAtLast - * @remind 选区的开始容器将变成给定的节点, 且偏移量为该节点的子节点数 - * @remind 如果给定的节点是元素节点, 则该节点必须是允许包含子节点的元素。 - * @param { Node } node 目标节点 - * @see UE.dom.Range:setStartAtFirst(Node) - * @return { UE.dom.Range } 当前range对象 - */ - setStartAtLast:function (node) { - return this.setStart(node, node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length); - }, - - /** - * 设置Range的结束位置到node节点内的第一个节点之前 - * @method setEndAtFirst - * @param { Node } node 目标节点 - * @remind 选区的结束容器将变成给定的节点, 且偏移量为0 - * @remind node必须是一个元素节点, 且必须是允许包含子节点的元素。 - * @see UE.dom.Range:setStartAtFirst(Node) - * @return { UE.dom.Range } 当前range对象 - */ - setEndAtFirst:function (node) { - return this.setEnd(node, 0); - }, - - /** - * 设置Range的结束位置到node节点内的最后一个节点之后 - * @method setEndAtLast - * @param { Node } node 目标节点 - * @remind 选区的结束容器将变成给定的节点, 且偏移量为该节点的子节点数量 - * @remind node必须是一个元素节点, 且必须是允许包含子节点的元素。 - * @see UE.dom.Range:setStartAtFirst(Node) - * @return { UE.dom.Range } 当前range对象 - */ - setEndAtLast:function (node) { - return this.setEnd(node, node.nodeType == 3 ? node.nodeValue.length : node.childNodes.length); - }, - - /** - * 选中给定节点 - * @method selectNode - * @remind 此时, 选区的开始容器和结束容器都是该节点的父节点, 其startOffset是该节点在父节点中的位置索引, - * 而endOffset为startOffset+1 - * @param { Node } node 需要选中的节点 - * @return { UE.dom.Range } 当前range对象,此时的range仅包含当前给定的节点对象 - * @example - * ```html - * - * xxxxx[xx]xxxx - * - * - * ``` - */ - selectNode:function (node) { - return this.setStartBefore(node).setEndAfter(node); - }, - - /** - * 选中给定节点内部的所有节点 - * @method selectNodeContents - * @remind 此时, 选区的开始容器和结束容器都是该节点, 其startOffset为0, - * 而endOffset是该节点的子节点数。 - * @param { Node } node 目标节点, 当前range将包含该节点内的所有节点 - * @return { UE.dom.Range } 当前range对象, 此时range仅包含给定节点的所有子节点 - * @example - * ```html - * - * xxxxx[xx]xxxx - * - * - * ``` - */ - selectNodeContents:function (node) { - return this.setStart(node, 0).setEndAtLast(node); - }, - - /** - * clone当前Range对象 - * @method cloneRange - * @remind 返回的range是一个全新的range对象, 其内部所有属性与当前被clone的range相同。 - * @return { UE.dom.Range } 当前range对象的一个副本 - */ - cloneRange:function () { - var me = this; - return new Range(me.document).setStart(me.startContainer, me.startOffset).setEnd(me.endContainer, me.endOffset); - - }, - - /** - * 向当前选区的结束处闭合选区 - * @method collapse - * @return { UE.dom.Range } 当前range对象 - * @example - * ```html - * - * xxxxx[xx]xxxx - * - * - * ``` - */ - - /** - * 闭合当前选区,根据给定的toStart参数项决定是向当前选区开始处闭合还是向结束处闭合, - * 如果toStart的值为true,则向开始位置闭合, 反之,向结束位置闭合。 - * @method collapse - * @param { Boolean } toStart 是否向选区开始处闭合 - * @return { UE.dom.Range } 当前range对象,此时range对象处于闭合状态 - * @see UE.dom.Range:collapse() - * @example - * ```html - * - * xxxxx[xx]xxxx - * - * - * ``` - */ - collapse:function (toStart) { - var me = this; - if (toStart) { - me.endContainer = me.startContainer; - me.endOffset = me.startOffset; - } else { - me.startContainer = me.endContainer; - me.startOffset = me.endOffset; - } - me.collapsed = true; - return me; - }, - - /** - * 调整range的开始位置和结束位置,使其"收缩"到最小的位置 - * @method shrinkBoundary - * @return { UE.dom.Range } 当前range对象 - * @example - * ```html - * xxxx[xxxxx] => xxxx[xxxxx] - * ``` - * - * @example - * ```html - * - * x[xx]xxx - * - * - * ``` - * - * @example - * ```html - * [xxxxxxxxxxx] => [xxxxxxxxxxx] - * ``` - */ - - /** - * 调整range的开始位置和结束位置,使其"收缩"到最小的位置, - * 如果ignoreEnd的值为true,则忽略对结束位置的调整 - * @method shrinkBoundary - * @param { Boolean } ignoreEnd 是否忽略对结束位置的调整 - * @return { UE.dom.Range } 当前range对象 - * @see UE.dom.domUtils.Range:shrinkBoundary() - */ - shrinkBoundary:function (ignoreEnd) { - var me = this, child, - collapsed = me.collapsed; - function check(node){ - return node.nodeType == 1 && !domUtils.isBookmarkNode(node) && !dtd.$empty[node.tagName] && !dtd.$nonChild[node.tagName] - } - while (me.startContainer.nodeType == 1 //是element - && (child = me.startContainer.childNodes[me.startOffset]) //子节点也是element - && check(child)) { - me.setStart(child, 0); - } - if (collapsed) { - return me.collapse(true); - } - if (!ignoreEnd) { - while (me.endContainer.nodeType == 1//是element - && me.endOffset > 0 //如果是空元素就退出 endOffset=0那么endOffst-1为负值,childNodes[endOffset]报错 - && (child = me.endContainer.childNodes[me.endOffset - 1]) //子节点也是element - && check(child)) { - me.setEnd(child, child.childNodes.length); - } - } - return me; - }, - - /** - * 获取离当前选区内包含的所有节点最近的公共祖先节点, - * @method getCommonAncestor - * @remind 返回的公共祖先节点一定不是range自身的容器节点, 但有可能是一个文本节点 - * @return { Node } 当前range对象内所有节点的公共祖先节点 - * @example - * ```html - * //选区示例 - * xxxx[xxx]xxxxxx - * - * ``` - */ - - /** - * 获取当前选区所包含的所有节点的公共祖先节点, 可以根据给定的参数 includeSelf 决定获取到 - * 的公共祖先节点是否可以是当前选区的startContainer或endContainer节点, 如果 includeSelf - * 的取值为true, 则返回的节点可以是自身的容器节点, 否则, 则不能是容器节点 - * @method getCommonAncestor - * @param { Boolean } includeSelf 是否允许获取到的公共祖先节点是当前range对象的容器节点 - * @return { Node } 当前range对象内所有节点的公共祖先节点 - * @see UE.dom.Range:getCommonAncestor() - * @example - * ```html - * - * - * - * xxxxxxxxx[xxx]xxxxxxxx - * - * - * - * - * ``` - */ - - /** - * 获取当前选区所包含的所有节点的公共祖先节点, 可以根据给定的参数 includeSelf 决定获取到 - * 的公共祖先节点是否可以是当前选区的startContainer或endContainer节点, 如果 includeSelf - * 的取值为true, 则返回的节点可以是自身的容器节点, 否则, 则不能是容器节点; 同时可以根据 - * ignoreTextNode 参数的取值决定是否忽略类型为文本节点的祖先节点。 - * @method getCommonAncestor - * @param { Boolean } includeSelf 是否允许获取到的公共祖先节点是当前range对象的容器节点 - * @param { Boolean } ignoreTextNode 获取祖先节点的过程中是否忽略类型为文本节点的祖先节点 - * @return { Node } 当前range对象内所有节点的公共祖先节点 - * @see UE.dom.Range:getCommonAncestor() - * @see UE.dom.Range:getCommonAncestor(Boolean) - * @example - * ```html - * - * - * - * xxxxxxxx[x]xxxxxxxxxxx - * - * - * - * - * ``` - */ - getCommonAncestor:function (includeSelf, ignoreTextNode) { - var me = this, - start = me.startContainer, - end = me.endContainer; - if (start === end) { - if (includeSelf && selectOneNode(this)) { - start = start.childNodes[me.startOffset]; - if(start.nodeType == 1) - return start; - } - //只有在上来就相等的情况下才会出现是文本的情况 - return ignoreTextNode && start.nodeType == 3 ? start.parentNode : start; - } - return domUtils.getCommonAncestor(start, end); - }, - - /** - * 调整当前Range的开始和结束边界容器,如果是容器节点是文本节点,就调整到包含该文本节点的父节点上 - * @method trimBoundary - * @remind 该操作有可能会引起文本节点被切开 - * @return { UE.dom.Range } 当前range对象 - * @example - * ```html - * - * //选区示例 - * xxx[xxxxx]xxx - * - * - * ``` - */ - - /** - * 调整当前Range的开始和结束边界容器,如果是容器节点是文本节点,就调整到包含该文本节点的父节点上, - * 可以根据 ignoreEnd 参数的值决定是否调整对结束边界的调整 - * @method trimBoundary - * @param { Boolean } ignoreEnd 是否忽略对结束边界的调整 - * @return { UE.dom.Range } 当前range对象 - * @example - * ```html - * - * //选区示例 - * xxx[xxxxx]xxx - * - * - * ``` - */ - trimBoundary:function (ignoreEnd) { - this.txtToElmBoundary(); - var start = this.startContainer, - offset = this.startOffset, - collapsed = this.collapsed, - end = this.endContainer; - if (start.nodeType == 3) { - if (offset == 0) { - this.setStartBefore(start); - } else { - if (offset >= start.nodeValue.length) { - this.setStartAfter(start); - } else { - var textNode = domUtils.split(start, offset); - //跟新结束边界 - if (start === end) { - this.setEnd(textNode, this.endOffset - offset); - } else if (start.parentNode === end) { - this.endOffset += 1; - } - this.setStartBefore(textNode); - } - } - if (collapsed) { - return this.collapse(true); - } - } - if (!ignoreEnd) { - offset = this.endOffset; - end = this.endContainer; - if (end.nodeType == 3) { - if (offset == 0) { - this.setEndBefore(end); - } else { - offset < end.nodeValue.length && domUtils.split(end, offset); - this.setEndAfter(end); - } - } - } - return this; - }, - - /** - * 如果选区在文本的边界上,就扩展选区到文本的父节点上, 如果当前选区是闭合的, 则什么也不做 - * @method txtToElmBoundary - * @remind 该操作不会修改dom节点 - * @return { UE.dom.Range } 当前range对象 - */ - - /** - * 如果选区在文本的边界上,就扩展选区到文本的父节点上, 如果当前选区是闭合的, 则根据参数项 - * ignoreCollapsed 的值决定是否执行该调整 - * @method txtToElmBoundary - * @param { Boolean } ignoreCollapsed 是否忽略选区的闭合状态, 如果该参数取值为true, 则 - * 不论选区是否闭合, 都会执行该操作, 反之, 则不会对闭合的选区执行该操作 - * @return { UE.dom.Range } 当前range对象 - */ - txtToElmBoundary:function (ignoreCollapsed) { - function adjust(r, c) { - var container = r[c + 'Container'], - offset = r[c + 'Offset']; - if (container.nodeType == 3) { - if (!offset) { - r['set' + c.replace(/(\w)/, function (a) { - return a.toUpperCase(); - }) + 'Before'](container); - } else if (offset >= container.nodeValue.length) { - r['set' + c.replace(/(\w)/, function (a) { - return a.toUpperCase(); - }) + 'After' ](container); - } - } - } - - if (ignoreCollapsed || !this.collapsed) { - adjust(this, 'start'); - adjust(this, 'end'); - } - return this; - }, - - /** - * 在当前选区的开始位置前插入节点,新插入的节点会被该range包含 - * @method insertNode - * @param { Node } node 需要插入的节点 - * @remind 插入的节点可以是一个DocumentFragment依次插入多个节点 - * @return { UE.dom.Range } 当前range对象 - */ - insertNode:function (node) { - var first = node, length = 1; - if (node.nodeType == 11) { - first = node.firstChild; - length = node.childNodes.length; - } - this.trimBoundary(true); - var start = this.startContainer, - offset = this.startOffset; - var nextNode = start.childNodes[ offset ]; - if (nextNode) { - start.insertBefore(node, nextNode); - } else { - start.appendChild(node); - } - if (first.parentNode === this.endContainer) { - this.endOffset = this.endOffset + length; - } - return this.setStartBefore(first); - }, - - /** - * 闭合选区到当前选区的开始位置, 并且定位光标到闭合后的位置 - * @method setCursor - * @return { UE.dom.Range } 当前range对象 - * @see UE.dom.Range:collapse() - */ - - /** - * 闭合选区,可以根据参数toEnd的值控制选区是向前闭合还是向后闭合, 并且定位光标到闭合后的位置。 - * @method setCursor - * @param { Boolean } toEnd 是否向后闭合, 如果为true, 则闭合选区时, 将向结束容器方向闭合, - * 反之,则向开始容器方向闭合 - * @return { UE.dom.Range } 当前range对象 - * @see UE.dom.Range:collapse(Boolean) - */ - setCursor:function (toEnd, noFillData) { - return this.collapse(!toEnd).select(noFillData); - }, - - /** - * 创建当前range的一个书签,记录下当前range的位置,方便当dom树改变时,还能找回原来的选区位置 - * @method createBookmark - * @param { Boolean } serialize 控制返回的标记位置是对当前位置的引用还是ID,如果该值为true,则 - * 返回标记位置的ID, 反之则返回标记位置节点的引用 - * @return { Object } 返回一个书签记录键值对, 其包含的key有: start => 开始标记的ID或者引用, - * end => 结束标记的ID或引用, id => 当前标记的类型, 如果为true,则表示 - * 返回的记录的类型为ID, 反之则为引用 - */ - createBookmark:function (serialize, same) { - var endNode, - startNode = this.document.createElement('span'); - startNode.style.cssText = 'display:none;line-height:0px;'; - startNode.appendChild(this.document.createTextNode('\u200D')); - startNode.id = '_baidu_bookmark_start_' + (same ? '' : guid++); - - if (!this.collapsed) { - endNode = startNode.cloneNode(true); - endNode.id = '_baidu_bookmark_end_' + (same ? '' : guid++); - } - this.insertNode(startNode); - if (endNode) { - this.collapse().insertNode(endNode).setEndBefore(endNode); - } - this.setStartAfter(startNode); - return { - start:serialize ? startNode.id : startNode, - end:endNode ? serialize ? endNode.id : endNode : null, - id:serialize - } - }, - - /** - * 调整当前range的边界到书签位置,并删除该书签对象所标记的位置内的节点 - * @method moveToBookmark - * @param { BookMark } bookmark createBookmark所创建的标签对象 - * @return { UE.dom.Range } 当前range对象 - * @see UE.dom.Range:createBookmark(Boolean) - */ - moveToBookmark:function (bookmark) { - var start = bookmark.id ? this.document.getElementById(bookmark.start) : bookmark.start, - end = bookmark.end && bookmark.id ? this.document.getElementById(bookmark.end) : bookmark.end; - this.setStartBefore(start); - domUtils.remove(start); - if (end) { - this.setEndBefore(end); - domUtils.remove(end); - } else { - this.collapse(true); - } - return this; - }, - - /** - * 调整range的边界,使其"放大"到最近的父节点 - * @method enlarge - * @remind 会引起选区的变化 - * @return { UE.dom.Range } 当前range对象 - */ - - /** - * 调整range的边界,使其"放大"到最近的父节点,根据参数 toBlock 的取值, 可以 - * 要求扩大之后的父节点是block节点 - * @method enlarge - * @param { Boolean } toBlock 是否要求扩大之后的父节点必须是block节点 - * @return { UE.dom.Range } 当前range对象 - */ - enlarge:function (toBlock, stopFn) { - var isBody = domUtils.isBody, - pre, node, tmp = this.document.createTextNode(''); - if (toBlock) { - node = this.startContainer; - if (node.nodeType == 1) { - if (node.childNodes[this.startOffset]) { - pre = node = node.childNodes[this.startOffset] - } else { - node.appendChild(tmp); - pre = node = tmp; - } - } else { - pre = node; - } - while (1) { - if (domUtils.isBlockElm(node)) { - node = pre; - while ((pre = node.previousSibling) && !domUtils.isBlockElm(pre)) { - node = pre; - } - this.setStartBefore(node); - break; - } - pre = node; - node = node.parentNode; - } - node = this.endContainer; - if (node.nodeType == 1) { - if (pre = node.childNodes[this.endOffset]) { - node.insertBefore(tmp, pre); - } else { - node.appendChild(tmp); - } - pre = node = tmp; - } else { - pre = node; - } - while (1) { - if (domUtils.isBlockElm(node)) { - node = pre; - while ((pre = node.nextSibling) && !domUtils.isBlockElm(pre)) { - node = pre; - } - this.setEndAfter(node); - break; - } - pre = node; - node = node.parentNode; - } - if (tmp.parentNode === this.endContainer) { - this.endOffset--; - } - domUtils.remove(tmp); - } - - // 扩展边界到最大 - if (!this.collapsed) { - while (this.startOffset == 0) { - if (stopFn && stopFn(this.startContainer)) { - break; - } - if (isBody(this.startContainer)) { - break; - } - this.setStartBefore(this.startContainer); - } - while (this.endOffset == (this.endContainer.nodeType == 1 ? this.endContainer.childNodes.length : this.endContainer.nodeValue.length)) { - if (stopFn && stopFn(this.endContainer)) { - break; - } - if (isBody(this.endContainer)) { - break; - } - this.setEndAfter(this.endContainer); - } - } - return this; - }, - enlargeToBlockElm:function(ignoreEnd){ - while(!domUtils.isBlockElm(this.startContainer)){ - this.setStartBefore(this.startContainer); - } - if(!ignoreEnd){ - while(!domUtils.isBlockElm(this.endContainer)){ - this.setEndAfter(this.endContainer); - } - } - return this; - }, - /** - * 调整Range的边界,使其"缩小"到最合适的位置 - * @method adjustmentBoundary - * @return { UE.dom.Range } 当前range对象 - * @see UE.dom.Range:shrinkBoundary() - */ - adjustmentBoundary:function () { - if (!this.collapsed) { - while (!domUtils.isBody(this.startContainer) && - this.startOffset == this.startContainer[this.startContainer.nodeType == 3 ? 'nodeValue' : 'childNodes'].length && - this.startContainer[this.startContainer.nodeType == 3 ? 'nodeValue' : 'childNodes'].length - ) { - - this.setStartAfter(this.startContainer); - } - while (!domUtils.isBody(this.endContainer) && !this.endOffset && - this.endContainer[this.endContainer.nodeType == 3 ? 'nodeValue' : 'childNodes'].length - ) { - this.setEndBefore(this.endContainer); - } - } - return this; - }, - - /** - * 给range选区中的内容添加给定的inline标签 - * @method applyInlineStyle - * @param { String } tagName 需要添加的标签名 - * @example - * ```html - *

    xxxx[xxxx]x

    ==> range.applyInlineStyle("strong") ==>

    xxxx[xxxx]x

    - * ``` - */ - - /** - * 给range选区中的内容添加给定的inline标签, 并且为标签附加上一些初始化属性。 - * @method applyInlineStyle - * @param { String } tagName 需要添加的标签名 - * @param { Object } attrs 跟随新添加的标签的属性 - * @return { UE.dom.Range } 当前选区 - * @example - * ```html - *

    xxxx[xxxx]x

    - * - * ==> - * - * - * range.applyInlineStyle("strong",{"style":"font-size:12px"}) - * - * ==> - * - *

    xxxx[xxxx]x

    - * ``` - */ - applyInlineStyle:function (tagName, attrs, list) { - if (this.collapsed)return this; - this.trimBoundary().enlarge(false, - function (node) { - return node.nodeType == 1 && domUtils.isBlockElm(node) - }).adjustmentBoundary(); - var bookmark = this.createBookmark(), - end = bookmark.end, - filterFn = function (node) { - return node.nodeType == 1 ? node.tagName.toLowerCase() != 'br' : !domUtils.isWhitespace(node); - }, - current = domUtils.getNextDomNode(bookmark.start, false, filterFn), - node, - pre, - range = this.cloneRange(); - while (current && (domUtils.getPosition(current, end) & domUtils.POSITION_PRECEDING)) { - if (current.nodeType == 3 || dtd[tagName][current.tagName]) { - range.setStartBefore(current); - node = current; - while (node && (node.nodeType == 3 || dtd[tagName][node.tagName]) && node !== end) { - pre = node; - node = domUtils.getNextDomNode(node, node.nodeType == 1, null, function (parent) { - return dtd[tagName][parent.tagName]; - }); - } - var frag = range.setEndAfter(pre).extractContents(), elm; - if (list && list.length > 0) { - var level, top; - top = level = list[0].cloneNode(false); - for (var i = 1, ci; ci = list[i++];) { - level.appendChild(ci.cloneNode(false)); - level = level.firstChild; - } - elm = level; - } else { - elm = range.document.createElement(tagName); - } - if (attrs) { - domUtils.setAttributes(elm, attrs); - } - elm.appendChild(frag); - range.insertNode(list ? top : elm); - //处理下滑线在a上的情况 - var aNode; - if (tagName == 'span' && attrs.style && /text\-decoration/.test(attrs.style) && (aNode = domUtils.findParentByTagName(elm, 'a', true))) { - domUtils.setAttributes(aNode, attrs); - domUtils.remove(elm, true); - elm = aNode; - } else { - domUtils.mergeSibling(elm); - domUtils.clearEmptySibling(elm); - } - //去除子节点相同的 - domUtils.mergeChild(elm, attrs); - current = domUtils.getNextDomNode(elm, false, filterFn); - domUtils.mergeToParent(elm); - if (node === end) { - break; - } - } else { - current = domUtils.getNextDomNode(current, true, filterFn); - } - } - return this.moveToBookmark(bookmark); - }, - - /** - * 移除当前选区内指定的inline标签,但保留其中的内容 - * @method removeInlineStyle - * @param { String } tagName 需要移除的标签名 - * @return { UE.dom.Range } 当前的range对象 - * @example - * ```html - * xx[xxxxyyyzz]z => range.removeInlineStyle(["em"]) => xx[xxxxyyyzz]z - * ``` - */ - - /** - * 移除当前选区内指定的一组inline标签,但保留其中的内容 - * @method removeInlineStyle - * @param { Array } tagNameArr 需要移除的标签名的数组 - * @return { UE.dom.Range } 当前的range对象 - * @see UE.dom.Range:removeInlineStyle(String) - */ - removeInlineStyle:function (tagNames) { - if (this.collapsed)return this; - tagNames = utils.isArray(tagNames) ? tagNames : [tagNames]; - this.shrinkBoundary().adjustmentBoundary(); - var start = this.startContainer, end = this.endContainer; - while (1) { - if (start.nodeType == 1) { - if (utils.indexOf(tagNames, start.tagName.toLowerCase()) > -1) { - break; - } - if (start.tagName.toLowerCase() == 'body') { - start = null; - break; - } - } - start = start.parentNode; - } - while (1) { - if (end.nodeType == 1) { - if (utils.indexOf(tagNames, end.tagName.toLowerCase()) > -1) { - break; - } - if (end.tagName.toLowerCase() == 'body') { - end = null; - break; - } - } - end = end.parentNode; - } - var bookmark = this.createBookmark(), - frag, - tmpRange; - if (start) { - tmpRange = this.cloneRange().setEndBefore(bookmark.start).setStartBefore(start); - frag = tmpRange.extractContents(); - tmpRange.insertNode(frag); - domUtils.clearEmptySibling(start, true); - start.parentNode.insertBefore(bookmark.start, start); - } - if (end) { - tmpRange = this.cloneRange().setStartAfter(bookmark.end).setEndAfter(end); - frag = tmpRange.extractContents(); - tmpRange.insertNode(frag); - domUtils.clearEmptySibling(end, false, true); - end.parentNode.insertBefore(bookmark.end, end.nextSibling); - } - var current = domUtils.getNextDomNode(bookmark.start, false, function (node) { - return node.nodeType == 1; - }), next; - while (current && current !== bookmark.end) { - next = domUtils.getNextDomNode(current, true, function (node) { - return node.nodeType == 1; - }); - if (utils.indexOf(tagNames, current.tagName.toLowerCase()) > -1) { - domUtils.remove(current, true); - } - current = next; - } - return this.moveToBookmark(bookmark); - }, - - /** - * 获取当前选中的自闭合的节点 - * @method getClosedNode - * @return { Node | NULL } 如果当前选中的是自闭合节点, 则返回该节点, 否则返回NULL - */ - getClosedNode:function () { - var node; - if (!this.collapsed) { - var range = this.cloneRange().adjustmentBoundary().shrinkBoundary(); - if (selectOneNode(range)) { - var child = range.startContainer.childNodes[range.startOffset]; - if (child && child.nodeType == 1 && (dtd.$empty[child.tagName] || dtd.$nonChild[child.tagName])) { - node = child; - } - } - } - return node; - }, - - /** - * 在页面上高亮range所表示的选区 - * @method select - * @return { UE.dom.Range } 返回当前Range对象 - */ - //这里不区分ie9以上,trace:3824 - select:browser.ie ? function (noFillData, textRange) { - var nativeRange; - if (!this.collapsed) - this.shrinkBoundary(); - var node = this.getClosedNode(); - if (node && !textRange) { - try { - nativeRange = this.document.body.createControlRange(); - nativeRange.addElement(node); - nativeRange.select(); - } catch (e) {} - return this; - } - var bookmark = this.createBookmark(), - start = bookmark.start, - end; - nativeRange = this.document.body.createTextRange(); - nativeRange.moveToElementText(start); - nativeRange.moveStart('character', 1); - if (!this.collapsed) { - var nativeRangeEnd = this.document.body.createTextRange(); - end = bookmark.end; - nativeRangeEnd.moveToElementText(end); - nativeRange.setEndPoint('EndToEnd', nativeRangeEnd); - } else { - if (!noFillData && this.startContainer.nodeType != 3) { - //使用|x固定住光标 - var tmpText = this.document.createTextNode(fillChar), - tmp = this.document.createElement('span'); - tmp.appendChild(this.document.createTextNode(fillChar)); - start.parentNode.insertBefore(tmp, start); - start.parentNode.insertBefore(tmpText, start); - //当点b,i,u时,不能清除i上边的b - removeFillData(this.document, tmpText); - fillData = tmpText; - mergeSibling(tmp, 'previousSibling'); - mergeSibling(start, 'nextSibling'); - nativeRange.moveStart('character', -1); - nativeRange.collapse(true); - } - } - this.moveToBookmark(bookmark); - tmp && domUtils.remove(tmp); - //IE在隐藏状态下不支持range操作,catch一下 - try { - nativeRange.select(); - } catch (e) { - } - return this; - } : function (notInsertFillData) { - function checkOffset(rng){ - - function check(node,offset,dir){ - if(node.nodeType == 3 && node.nodeValue.length < offset){ - rng[dir + 'Offset'] = node.nodeValue.length - } - } - check(rng.startContainer,rng.startOffset,'start'); - check(rng.endContainer,rng.endOffset,'end'); - } - var win = domUtils.getWindow(this.document), - sel = win.getSelection(), - txtNode; - //FF下关闭自动长高时滚动条在关闭dialog时会跳 - //ff下如果不body.focus将不能定位闭合光标到编辑器内 - browser.gecko ? this.document.body.focus() : win.focus(); - if (sel) { - sel.removeAllRanges(); - // trace:870 chrome/safari后边是br对于闭合得range不能定位 所以去掉了判断 - // this.startContainer.nodeType != 3 &&! ((child = this.startContainer.childNodes[this.startOffset]) && child.nodeType == 1 && child.tagName == 'BR' - if (this.collapsed && !notInsertFillData) { -// //opear如果没有节点接着,原生的不能够定位,不能在body的第一级插入空白节点 -// if (notInsertFillData && browser.opera && !domUtils.isBody(this.startContainer) && this.startContainer.nodeType == 1) { -// var tmp = this.document.createTextNode(''); -// this.insertNode(tmp).setStart(tmp, 0).collapse(true); -// } -// - //处理光标落在文本节点的情况 - //处理以下的情况 - //|xxxx - //xxxx|xxxx - //xxxx| - var start = this.startContainer,child = start; - if(start.nodeType == 1){ - child = start.childNodes[this.startOffset]; - - } - if( !(start.nodeType == 3 && this.startOffset) && - (child ? - (!child.previousSibling || child.previousSibling.nodeType != 3) - : - (!start.lastChild || start.lastChild.nodeType != 3) - ) - ){ - txtNode = this.document.createTextNode(fillChar); - //跟着前边走 - this.insertNode(txtNode); - removeFillData(this.document, txtNode); - mergeSibling(txtNode, 'previousSibling'); - mergeSibling(txtNode, 'nextSibling'); - fillData = txtNode; - this.setStart(txtNode, browser.webkit ? 1 : 0).collapse(true); - } - } - var nativeRange = this.document.createRange(); - if(this.collapsed && browser.opera && this.startContainer.nodeType == 1){ - var child = this.startContainer.childNodes[this.startOffset]; - if(!child){ - //往前靠拢 - child = this.startContainer.lastChild; - if( child && domUtils.isBr(child)){ - this.setStartBefore(child).collapse(true); - } - }else{ - //向后靠拢 - while(child && domUtils.isBlockElm(child)){ - if(child.nodeType == 1 && child.childNodes[0]){ - child = child.childNodes[0] - }else{ - break; - } - } - child && this.setStartBefore(child).collapse(true) - } - - } - //是createAddress最后一位算的不准,现在这里进行微调 - checkOffset(this); - nativeRange.setStart(this.startContainer, this.startOffset); - nativeRange.setEnd(this.endContainer, this.endOffset); - sel.addRange(nativeRange); - } - return this; - }, - - /** - * 滚动到当前range开始的位置 - * @method scrollToView - * @param { Window } win 当前range对象所属的window对象 - * @return { UE.dom.Range } 当前Range对象 - */ - - /** - * 滚动到距离当前range开始位置 offset 的位置处 - * @method scrollToView - * @param { Window } win 当前range对象所属的window对象 - * @param { Number } offset 距离range开始位置处的偏移量, 如果为正数, 则向下偏移, 反之, 则向上偏移 - * @return { UE.dom.Range } 当前Range对象 - */ - scrollToView:function (win, offset) { - win = win ? window : domUtils.getWindow(this.document); - var me = this, - span = me.document.createElement('span'); - //trace:717 - span.innerHTML = ' '; - me.cloneRange().insertNode(span); - domUtils.scrollToView(span, win, offset); - domUtils.remove(span); - return me; - }, - - /** - * 判断当前选区内容是否占位符 - * @private - * @method inFillChar - * @return { Boolean } 如果是占位符返回true,否则返回false - */ - inFillChar : function(){ - var start = this.startContainer; - if(this.collapsed && start.nodeType == 3 - && start.nodeValue.replace(new RegExp('^' + domUtils.fillChar),'').length + 1 == start.nodeValue.length - ){ - return true; - } - return false; - }, - - /** - * 保存 - * @method createAddress - * @private - * @return { Boolean } 返回开始和结束的位置 - * @example - * ```html - * - *

    - * aaaa - * - * - * bbbb - * - * - *

    - * - * - * - * ``` - */ - createAddress : function(ignoreEnd,ignoreTxt){ - var addr = {},me = this; - - function getAddress(isStart){ - var node = isStart ? me.startContainer : me.endContainer; - var parents = domUtils.findParents(node,true,function(node){return !domUtils.isBody(node)}), - addrs = []; - for(var i = 0,ci;ci = parents[i++];){ - addrs.push(domUtils.getNodeIndex(ci,ignoreTxt)); - } - var firstIndex = 0; - - if(ignoreTxt){ - if(node.nodeType == 3){ - var tmpNode = node.previousSibling; - while(tmpNode && tmpNode.nodeType == 3){ - firstIndex += tmpNode.nodeValue.replace(fillCharReg,'').length; - tmpNode = tmpNode.previousSibling; - } - firstIndex += (isStart ? me.startOffset : me.endOffset)// - (fillCharReg.test(node.nodeValue) ? 1 : 0 ) - }else{ - node = node.childNodes[ isStart ? me.startOffset : me.endOffset]; - if(node){ - firstIndex = domUtils.getNodeIndex(node,ignoreTxt); - }else{ - node = isStart ? me.startContainer : me.endContainer; - var first = node.firstChild; - while(first){ - if(domUtils.isFillChar(first)){ - first = first.nextSibling; - continue; - } - firstIndex++; - if(first.nodeType == 3){ - while( first && first.nodeType == 3){ - first = first.nextSibling; - } - }else{ - first = first.nextSibling; - } - } - } - } - - }else{ - firstIndex = isStart ? domUtils.isFillChar(node) ? 0 : me.startOffset : me.endOffset - } - if(firstIndex < 0){ - firstIndex = 0; - } - addrs.push(firstIndex); - return addrs; - } - addr.startAddress = getAddress(true); - if(!ignoreEnd){ - addr.endAddress = me.collapsed ? [].concat(addr.startAddress) : getAddress(); - } - return addr; - }, - - /** - * 保存 - * @method createAddress - * @private - * @return { Boolean } 返回开始和结束的位置 - * @example - * ```html - * - *

    - * aaaa - * - * - * bbbb - * - * - *

    - * - * - * - * ``` - */ - moveToAddress : function(addr,ignoreEnd){ - var me = this; - function getNode(address,isStart){ - var tmpNode = me.document.body, - parentNode,offset; - for(var i= 0,ci,l=address.length;i - * - * - * - * - * - * - * - * - * ``` - */ - - /** - * 遍历range内的节点。 - * 每当遍历一个节点时, 都会执行参数项 doFn 指定的函数, 该函数的接受当前遍历的节点 - * 作为其参数。 - * 可以通过参数项 filterFn 来指定一个过滤器, 只有符合该过滤器过滤规则的节点才会触 - * 发doFn函数的执行 - * @method traversal - * @param { Function } doFn 对每个遍历的节点要执行的方法, 该方法接受当前遍历的节点作为其参数 - * @param { Function } filterFn 过滤器, 该函数接受当前遍历的节点作为参数, 如果该节点满足过滤 - * 规则, 请返回true, 该节点会触发doFn, 否则, 请返回false, 则该节点不 - * 会触发doFn。 - * @return { UE.dom.Range } 当前range对象 - * @see UE.dom.Range:traversal(Function) - * @example - * ```html - * - * - * - * - * - * - * - * - * - * - * ``` - */ - traversal:function(doFn,filterFn){ - if (this.collapsed) - return this; - var bookmark = this.createBookmark(), - end = bookmark.end, - current = domUtils.getNextDomNode(bookmark.start, false, filterFn); - while (current && current !== end && (domUtils.getPosition(current, end) & domUtils.POSITION_PRECEDING)) { - var tmpNode = domUtils.getNextDomNode(current,false,filterFn); - doFn(current); - current = tmpNode; - } - return this.moveToBookmark(bookmark); - } - }; -})(); - -// core/Selection.js -/** - * 选集 - * @file - * @module UE.dom - * @class Selection - * @since 1.2.6.1 - */ - -/** - * 选区集合 - * @unfile - * @module UE.dom - * @class Selection - */ -(function () { - - function getBoundaryInformation( range, start ) { - var getIndex = domUtils.getNodeIndex; - range = range.duplicate(); - range.collapse( start ); - var parent = range.parentElement(); - //如果节点里没有子节点,直接退出 - if ( !parent.hasChildNodes() ) { - return {container:parent, offset:0}; - } - var siblings = parent.children, - child, - testRange = range.duplicate(), - startIndex = 0, endIndex = siblings.length - 1, index = -1, - distance; - while ( startIndex <= endIndex ) { - index = Math.floor( (startIndex + endIndex) / 2 ); - child = siblings[index]; - testRange.moveToElementText( child ); - var position = testRange.compareEndPoints( 'StartToStart', range ); - if ( position > 0 ) { - endIndex = index - 1; - } else if ( position < 0 ) { - startIndex = index + 1; - } else { - //trace:1043 - return {container:parent, offset:getIndex( child )}; - } - } - if ( index == -1 ) { - testRange.moveToElementText( parent ); - testRange.setEndPoint( 'StartToStart', range ); - distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length; - siblings = parent.childNodes; - if ( !distance ) { - child = siblings[siblings.length - 1]; - return {container:child, offset:child.nodeValue.length}; - } - - var i = siblings.length; - while ( distance > 0 ){ - distance -= siblings[ --i ].nodeValue.length; - } - return {container:siblings[i], offset:-distance}; - } - testRange.collapse( position > 0 ); - testRange.setEndPoint( position > 0 ? 'StartToStart' : 'EndToStart', range ); - distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length; - if ( !distance ) { - return dtd.$empty[child.tagName] || dtd.$nonChild[child.tagName] ? - {container:parent, offset:getIndex( child ) + (position > 0 ? 0 : 1)} : - {container:child, offset:position > 0 ? 0 : child.childNodes.length} - } - while ( distance > 0 ) { - try { - var pre = child; - child = child[position > 0 ? 'previousSibling' : 'nextSibling']; - distance -= child.nodeValue.length; - } catch ( e ) { - return {container:parent, offset:getIndex( pre )}; - } - } - return {container:child, offset:position > 0 ? -distance : child.nodeValue.length + distance} - } - - /** - * 将ieRange转换为Range对象 - * @param {Range} ieRange ieRange对象 - * @param {Range} range Range对象 - * @return {Range} range 返回转换后的Range对象 - */ - function transformIERangeToRange( ieRange, range ) { - if ( ieRange.item ) { - range.selectNode( ieRange.item( 0 ) ); - } else { - var bi = getBoundaryInformation( ieRange, true ); - range.setStart( bi.container, bi.offset ); - if ( ieRange.compareEndPoints( 'StartToEnd', ieRange ) != 0 ) { - bi = getBoundaryInformation( ieRange, false ); - range.setEnd( bi.container, bi.offset ); - } - } - return range; - } - - /** - * 获得ieRange - * @param {Selection} sel Selection对象 - * @return {ieRange} 得到ieRange - */ - function _getIERange( sel ) { - var ieRange; - //ie下有可能报错 - try { - ieRange = sel.getNative().createRange(); - } catch ( e ) { - return null; - } - var el = ieRange.item ? ieRange.item( 0 ) : ieRange.parentElement(); - if ( ( el.ownerDocument || el ) === sel.document ) { - return ieRange; - } - return null; - } - - var Selection = dom.Selection = function ( doc ) { - var me = this, iframe; - me.document = doc; - if ( browser.ie9below ) { - iframe = domUtils.getWindow( doc ).frameElement; - domUtils.on( iframe, 'beforedeactivate', function () { - me._bakIERange = me.getIERange(); - } ); - domUtils.on( iframe, 'activate', function () { - try { - if ( !_getIERange( me ) && me._bakIERange ) { - me._bakIERange.select(); - } - } catch ( ex ) { - } - me._bakIERange = null; - } ); - } - iframe = doc = null; - }; - - Selection.prototype = { - - rangeInBody : function(rng,txtRange){ - var node = browser.ie9below || txtRange ? rng.item ? rng.item() : rng.parentElement() : rng.startContainer; - - return node === this.document.body || domUtils.inDoc(node,this.document); - }, - - /** - * 获取原生seleciton对象 - * @method getNative - * @return { Object } 获得selection对象 - * @example - * ```javascript - * editor.selection.getNative(); - * ``` - */ - getNative:function () { - var doc = this.document; - try { - return !doc ? null : browser.ie9below ? doc.selection : domUtils.getWindow( doc ).getSelection(); - } catch ( e ) { - return null; - } - }, - - /** - * 获得ieRange - * @method getIERange - * @return { Object } 返回ie原生的Range - * @example - * ```javascript - * editor.selection.getIERange(); - * ``` - */ - getIERange:function () { - var ieRange = _getIERange( this ); - if ( !ieRange ) { - if ( this._bakIERange ) { - return this._bakIERange; - } - } - return ieRange; - }, - - /** - * 缓存当前选区的range和选区的开始节点 - * @method cache - */ - cache:function () { - this.clear(); - this._cachedRange = this.getRange(); - this._cachedStartElement = this.getStart(); - this._cachedStartElementPath = this.getStartElementPath(); - }, - - /** - * 获取选区开始位置的父节点到body - * @method getStartElementPath - * @return { Array } 返回父节点集合 - * @example - * ```javascript - * editor.selection.getStartElementPath(); - * ``` - */ - getStartElementPath:function () { - if ( this._cachedStartElementPath ) { - return this._cachedStartElementPath; - } - var start = this.getStart(); - if ( start ) { - return domUtils.findParents( start, true, null, true ) - } - return []; - }, - - /** - * 清空缓存 - * @method clear - */ - clear:function () { - this._cachedStartElementPath = this._cachedRange = this._cachedStartElement = null; - }, - - /** - * 编辑器是否得到了选区 - * @method isFocus - */ - isFocus:function () { - try { - if(browser.ie9below){ - - var nativeRange = _getIERange(this); - return !!(nativeRange && this.rangeInBody(nativeRange)); - }else{ - return !!this.getNative().rangeCount; - } - } catch ( e ) { - return false; - } - - }, - - /** - * 获取选区对应的Range - * @method getRange - * @return { Object } 得到Range对象 - * @example - * ```javascript - * editor.selection.getRange(); - * ``` - */ - getRange:function () { - var me = this; - function optimze( range ) { - var child = me.document.body.firstChild, - collapsed = range.collapsed; - while ( child && child.firstChild ) { - range.setStart( child, 0 ); - child = child.firstChild; - } - if ( !range.startContainer ) { - range.setStart( me.document.body, 0 ) - } - if ( collapsed ) { - range.collapse( true ); - } - } - - if ( me._cachedRange != null ) { - return this._cachedRange; - } - var range = new baidu.editor.dom.Range( me.document ); - - if ( browser.ie9below ) { - var nativeRange = me.getIERange(); - if ( nativeRange ) { - //备份的_bakIERange可能已经实效了,dom树发生了变化比如从源码模式切回来,所以try一下,实效就放到body开始位置 - try{ - transformIERangeToRange( nativeRange, range ); - }catch(e){ - optimze( range ); - } - - } else { - optimze( range ); - } - } else { - var sel = me.getNative(); - if ( sel && sel.rangeCount ) { - var firstRange = sel.getRangeAt( 0 ); - var lastRange = sel.getRangeAt( sel.rangeCount - 1 ); - range.setStart( firstRange.startContainer, firstRange.startOffset ).setEnd( lastRange.endContainer, lastRange.endOffset ); - if ( range.collapsed && domUtils.isBody( range.startContainer ) && !range.startOffset ) { - optimze( range ); - } - } else { - //trace:1734 有可能已经不在dom树上了,标识的节点 - if ( this._bakRange && domUtils.inDoc( this._bakRange.startContainer, this.document ) ){ - return this._bakRange; - } - optimze( range ); - } - } - return this._bakRange = range; - }, - - /** - * 获取开始元素,用于状态反射 - * @method getStart - * @return { Element } 获得开始元素 - * @example - * ```javascript - * editor.selection.getStart(); - * ``` - */ - getStart:function () { - if ( this._cachedStartElement ) { - return this._cachedStartElement; - } - var range = browser.ie9below ? this.getIERange() : this.getRange(), - tmpRange, - start, tmp, parent; - if ( browser.ie9below ) { - if ( !range ) { - //todo 给第一个值可能会有问题 - return this.document.body.firstChild; - } - //control元素 - if ( range.item ){ - return range.item( 0 ); - } - tmpRange = range.duplicate(); - //修正ie下x[xx] 闭合后 x|xx - tmpRange.text.length > 0 && tmpRange.moveStart( 'character', 1 ); - tmpRange.collapse( 1 ); - start = tmpRange.parentElement(); - parent = tmp = range.parentElement(); - while ( tmp = tmp.parentNode ) { - if ( tmp == start ) { - start = parent; - break; - } - } - } else { - range.shrinkBoundary(); - start = range.startContainer; - if ( start.nodeType == 1 && start.hasChildNodes() ){ - start = start.childNodes[Math.min( start.childNodes.length - 1, range.startOffset )]; - } - if ( start.nodeType == 3 ){ - return start.parentNode; - } - } - return start; - }, - - /** - * 得到选区中的文本 - * @method getText - * @return { String } 选区中包含的文本 - * @example - * ```javascript - * editor.selection.getText(); - * ``` - */ - getText:function () { - var nativeSel, nativeRange; - if ( this.isFocus() && (nativeSel = this.getNative()) ) { - nativeRange = browser.ie9below ? nativeSel.createRange() : nativeSel.getRangeAt( 0 ); - return browser.ie9below ? nativeRange.text : nativeRange.toString(); - } - return ''; - }, - - /** - * 清除选区 - * @method clearRange - * @example - * ```javascript - * editor.selection.clearRange(); - * ``` - */ - clearRange : function(){ - this.getNative()[browser.ie9below ? 'empty' : 'removeAllRanges'](); - } - }; -})(); - -// core/Editor.js -/** - * 编辑器主类,包含编辑器提供的大部分公用接口 - * @file - * @module UE - * @class Editor - * @since 1.2.6.1 - */ - -/** - * UEditor公用空间,UEditor所有的功能都挂载在该空间下 - * @unfile - * @module UE - */ - -/** - * UEditor的核心类,为用户提供与编辑器交互的接口。 - * @unfile - * @module UE - * @class Editor - */ - -(function () { - var uid = 0, _selectionChangeTimer; - - /** - * 获取编辑器的html内容,赋值到编辑器所在表单的textarea文本域里面 - * @private - * @method setValue - * @param { UE.Editor } editor 编辑器事例 - */ - function setValue(form, editor) { - var textarea; - if (editor.textarea) { - if (utils.isString(editor.textarea)) { - for (var i = 0, ti, tis = domUtils.getElementsByTagName(form, 'textarea'); ti = tis[i++];) { - if (ti.id == 'ueditor_textarea_' + editor.options.textarea) { - textarea = ti; - break; - } - } - } else { - textarea = editor.textarea; - } - } - if (!textarea) { - form.appendChild(textarea = domUtils.createElement(document, 'textarea', { - 'name': editor.options.textarea, - 'id': 'ueditor_textarea_' + editor.options.textarea, - 'style': "display:none" - })); - //不要产生多个textarea - editor.textarea = textarea; - } - !textarea.getAttribute('name') && textarea.setAttribute('name', editor.options.textarea ); - textarea.value = editor.hasContents() ? - (editor.options.allHtmlEnabled ? editor.getAllHtml() : editor.getContent(null, null, true)) : - '' - } - function loadPlugins(me){ - //初始化插件 - for (var pi in UE.plugins) { - UE.plugins[pi].call(me); - } - - } - function checkCurLang(I18N){ - for(var lang in I18N){ - return lang - } - } - - function langReadied(me){ - me.langIsReady = true; - - me.fireEvent("langReady"); - } - - /** - * 编辑器准备就绪后会触发该事件 - * @module UE - * @class Editor - * @event ready - * @remind render方法执行完成之后,会触发该事件 - * @remind - * @example - * ```javascript - * editor.addListener( 'ready', function( editor ) { - * editor.execCommand( 'focus' ); //编辑器家在完成后,让编辑器拿到焦点 - * } ); - * ``` - */ - /** - * 执行destroy方法,会触发该事件 - * @module UE - * @class Editor - * @event destroy - * @see UE.Editor:destroy() - */ - /** - * 执行reset方法,会触发该事件 - * @module UE - * @class Editor - * @event reset - * @see UE.Editor:reset() - */ - /** - * 执行focus方法,会触发该事件 - * @module UE - * @class Editor - * @event focus - * @see UE.Editor:focus(Boolean) - */ - /** - * 语言加载完成会触发该事件 - * @module UE - * @class Editor - * @event langReady - */ - /** - * 运行命令之后会触发该命令 - * @module UE - * @class Editor - * @event beforeExecCommand - */ - /** - * 运行命令之后会触发该命令 - * @module UE - * @class Editor - * @event afterExecCommand - */ - /** - * 运行命令之前会触发该命令 - * @module UE - * @class Editor - * @event firstBeforeExecCommand - */ - /** - * 在getContent方法执行之前会触发该事件 - * @module UE - * @class Editor - * @event beforeGetContent - * @see UE.Editor:getContent() - */ - /** - * 在getContent方法执行之后会触发该事件 - * @module UE - * @class Editor - * @event afterGetContent - * @see UE.Editor:getContent() - */ - /** - * 在getAllHtml方法执行时会触发该事件 - * @module UE - * @class Editor - * @event getAllHtml - * @see UE.Editor:getAllHtml() - */ - /** - * 在setContent方法执行之前会触发该事件 - * @module UE - * @class Editor - * @event beforeSetContent - * @see UE.Editor:setContent(String) - */ - /** - * 在setContent方法执行之后会触发该事件 - * @module UE - * @class Editor - * @event afterSetContent - * @see UE.Editor:setContent(String) - */ - /** - * 每当编辑器内部选区发生改变时,将触发该事件 - * @event selectionchange - * @warning 该事件的触发非常频繁,不建议在该事件的处理过程中做重量级的处理 - * @example - * ```javascript - * editor.addListener( 'selectionchange', function( editor ) { - * console.log('选区发生改变'); - * } - */ - /** - * 在所有selectionchange的监听函数执行之前,会触发该事件 - * @module UE - * @class Editor - * @event beforeSelectionChange - * @see UE.Editor:selectionchange - */ - /** - * 在所有selectionchange的监听函数执行完之后,会触发该事件 - * @module UE - * @class Editor - * @event afterSelectionChange - * @see UE.Editor:selectionchange - */ - /** - * 编辑器内容发生改变时会触发该事件 - * @module UE - * @class Editor - * @event contentChange - */ - - - /** - * 以默认参数构建一个编辑器实例 - * @constructor - * @remind 通过 改构造方法实例化的编辑器,不带ui层.需要render到一个容器,编辑器实例才能正常渲染到页面 - * @example - * ```javascript - * var editor = new UE.Editor(); - * editor.execCommand('blod'); - * ``` - * @see UE.Config - */ - - /** - * 以给定的参数集合创建一个编辑器实例,对于未指定的参数,将应用默认参数。 - * @constructor - * @remind 通过 改构造方法实例化的编辑器,不带ui层.需要render到一个容器,编辑器实例才能正常渲染到页面 - * @param { Object } setting 创建编辑器的参数 - * @example - * ```javascript - * var editor = new UE.Editor(); - * editor.execCommand('blod'); - * ``` - * @see UE.Config - */ - var Editor = UE.Editor = function (options) { - var me = this; - me.uid = uid++; - EventBase.call(me); - me.commands = {}; - me.options = utils.extend(utils.clone(options || {}), UEDITOR_CONFIG, true); - me.shortcutkeys = {}; - me.inputRules = []; - me.outputRules = []; - //设置默认的常用属性 - me.setOpt(Editor.defaultOptions(me)); - - /* 尝试异步加载后台配置 */ - me.loadServerConfig(); - - if(!utils.isEmptyObject(UE.I18N)){ - //修改默认的语言类型 - me.options.lang = checkCurLang(UE.I18N); - UE.plugin.load(me); - langReadied(me); - - }else{ - utils.loadFile(document, { - src: me.options.langPath + me.options.lang + "/" + me.options.lang + ".js", - tag: "script", - type: "text/javascript", - defer: "defer" - }, function () { - UE.plugin.load(me); - langReadied(me); - }); - } - - UE.instants['ueditorInstant' + me.uid] = me; - }; - Editor.prototype = { - registerCommand : function(name,obj){ - this.commands[name] = obj; - }, - /** - * 编辑器对外提供的监听ready事件的接口, 通过调用该方法,达到的效果与监听ready事件是一致的 - * @method ready - * @param { Function } fn 编辑器ready之后所执行的回调, 如果在注册事件之前编辑器已经ready,将会 - * 立即触发该回调。 - * @remind 需要等待编辑器加载完成后才能执行的代码,可以使用该方法传入 - * @example - * ```javascript - * editor.ready( function( editor ) { - * editor.setContent('初始化完毕'); - * } ); - * ``` - * @see UE.Editor.event:ready - */ - ready: function (fn) { - var me = this; - if (fn) { - me.isReady ? fn.apply(me) : me.addListener('ready', fn); - } - }, - - /** - * 该方法是提供给插件里面使用,设置配置项默认值 - * @method setOpt - * @warning 三处设置配置项的优先级: 实例化时传入参数 > setOpt()设置 > config文件里设置 - * @warning 该方法仅供编辑器插件内部和编辑器初始化时调用,其他地方不能调用。 - * @param { String } key 编辑器的可接受的选项名称 - * @param { * } val 该选项可接受的值 - * @example - * ```javascript - * editor.setOpt( 'initContent', '欢迎使用编辑器' ); - * ``` - */ - - /** - * 该方法是提供给插件里面使用,以{key:value}集合的方式设置插件内用到的配置项默认值 - * @method setOpt - * @warning 三处设置配置项的优先级: 实例化时传入参数 > setOpt()设置 > config文件里设置 - * @warning 该方法仅供编辑器插件内部和编辑器初始化时调用,其他地方不能调用。 - * @param { Object } options 将要设置的选项的键值对对象 - * @example - * ```javascript - * editor.setOpt( { - * 'initContent': '欢迎使用编辑器' - * } ); - * ``` - */ - setOpt: function (key, val) { - var obj = {}; - if (utils.isString(key)) { - obj[key] = val - } else { - obj = key; - } - utils.extend(this.options, obj, true); - }, - getOpt:function(key){ - return this.options[key] - }, - /** - * 销毁编辑器实例,使用textarea代替 - * @method destroy - * @example - * ```javascript - * editor.destroy(); - * ``` - */ - destroy: function () { - - var me = this; - me.fireEvent('destroy'); - var container = me.container.parentNode; - var textarea = me.textarea; - if (!textarea) { - textarea = document.createElement('textarea'); - container.parentNode.insertBefore(textarea, container); - } else { - textarea.style.display = '' - } - - textarea.style.width = me.iframe.offsetWidth + 'px'; - textarea.style.height = me.iframe.offsetHeight + 'px'; - textarea.value = me.getContent(); - textarea.id = me.key; - container.innerHTML = ''; - domUtils.remove(container); - var key = me.key; - //trace:2004 - for (var p in me) { - if (me.hasOwnProperty(p)) { - delete this[p]; - } - } - UE.delEditor(key); - }, - - /** - * 渲染编辑器的DOM到指定容器 - * @method render - * @param { String } containerId 指定一个容器ID - * @remind 执行该方法,会触发ready事件 - * @warning 必须且只能调用一次 - */ - - /** - * 渲染编辑器的DOM到指定容器 - * @method render - * @param { Element } containerDom 直接指定容器对象 - * @remind 执行该方法,会触发ready事件 - * @warning 必须且只能调用一次 - */ - render: function (container) { - var me = this, - options = me.options, - getStyleValue=function(attr){ - return parseInt(domUtils.getComputedStyle(container,attr)); - }; - if (utils.isString(container)) { - container = document.getElementById(container); - } - if (container) { - if(options.initialFrameWidth){ - options.minFrameWidth = options.initialFrameWidth - }else{ - options.minFrameWidth = options.initialFrameWidth = container.offsetWidth; - } - if(options.initialFrameHeight){ - options.minFrameHeight = options.initialFrameHeight - }else{ - options.initialFrameHeight = options.minFrameHeight = container.offsetHeight; - } - - container.style.width = /%$/.test(options.initialFrameWidth) ? '100%' : options.initialFrameWidth- - getStyleValue("padding-left")- getStyleValue("padding-right") +'px'; - container.style.height = /%$/.test(options.initialFrameHeight) ? '100%' : options.initialFrameHeight - - getStyleValue("padding-top")- getStyleValue("padding-bottom") +'px'; - - container.style.zIndex = options.zIndex; - - var html = ( ie && browser.version < 9 ? '' : '') + - '' + - '' + - ( options.iframeCssUrl ? '' : '' ) + - (options.initialStyle ? '' : '') + - '' + - ''; - container.appendChild(domUtils.createElement(document, 'iframe', { - id: 'ueditor_' + me.uid, - width: "100%", - height: "100%", - frameborder: "0", - //先注释掉了,加的原因忘记了,但开启会直接导致全屏模式下内容多时不会出现滚动条 -// scrolling :'no', - src: 'javascript:void(function(){document.open();' + (options.customDomain && document.domain != location.hostname ? 'document.domain="' + document.domain + '";' : '') + - 'document.write("' + html + '");document.close();}())' - })); - container.style.overflow = 'hidden'; - //解决如果是给定的百分比,会导致高度算不对的问题 - setTimeout(function(){ - if( /%$/.test(options.initialFrameWidth)){ - options.minFrameWidth = options.initialFrameWidth = container.offsetWidth; - //如果这里给定宽度,会导致ie在拖动窗口大小时,编辑区域不随着变化 -// container.style.width = options.initialFrameWidth + 'px'; - } - if(/%$/.test(options.initialFrameHeight)){ - options.minFrameHeight = options.initialFrameHeight = container.offsetHeight; - container.style.height = options.initialFrameHeight + 'px'; - } - }) - } - }, - - /** - * 编辑器初始化 - * @method _setup - * @private - * @param { Element } doc 编辑器Iframe中的文档对象 - */ - _setup: function (doc) { - - var me = this, - options = me.options; - if (ie) { - doc.body.disabled = true; - doc.body.contentEditable = true; - doc.body.disabled = false; - } else { - doc.body.contentEditable = true; - } - doc.body.spellcheck = false; - me.document = doc; - me.window = doc.defaultView || doc.parentWindow; - me.iframe = me.window.frameElement; - me.body = doc.body; - me.selection = new dom.Selection(doc); - //gecko初始化就能得到range,无法判断isFocus了 - var geckoSel; - if (browser.gecko && (geckoSel = this.selection.getNative())) { - geckoSel.removeAllRanges(); - } - this._initEvents(); - //为form提交提供一个隐藏的textarea - for (var form = this.iframe.parentNode; !domUtils.isBody(form); form = form.parentNode) { - if (form.tagName == 'FORM') { - me.form = form; - if(me.options.autoSyncData){ - domUtils.on(me.window,'blur',function(){ - setValue(form,me); - }); - }else{ - domUtils.on(form, 'submit', function () { - setValue(this, me); - }); - } - break; - } - } - if (options.initialContent) { - if (options.autoClearinitialContent) { - var oldExecCommand = me.execCommand; - me.execCommand = function () { - me.fireEvent('firstBeforeExecCommand'); - return oldExecCommand.apply(me, arguments); - }; - this._setDefaultContent(options.initialContent); - } else - this.setContent(options.initialContent, false, true); - } - - //编辑器不能为空内容 - - if (domUtils.isEmptyNode(me.body)) { - me.body.innerHTML = '

    ' + (browser.ie ? '' : '
    ') + '

    '; - } - //如果要求focus, 就把光标定位到内容开始 - if (options.focus) { - setTimeout(function () { - me.focus(me.options.focusInEnd); - //如果自动清除开着,就不需要做selectionchange; - !me.options.autoClearinitialContent && me._selectionChange(); - }, 0); - } - if (!me.container) { - me.container = this.iframe.parentNode; - } - if (options.fullscreen && me.ui) { - me.ui.setFullScreen(true); - } - - try { - me.document.execCommand('2D-position', false, false); - } catch (e) { - } - try { - me.document.execCommand('enableInlineTableEditing', false, false); - } catch (e) { - } - try { - me.document.execCommand('enableObjectResizing', false, false); - } catch (e) { - } - - //挂接快捷键 - me._bindshortcutKeys(); - me.isReady = 1; - me.fireEvent('ready'); - options.onready && options.onready.call(me); - if (!browser.ie9below) { - domUtils.on(me.window, ['blur', 'focus'], function (e) { - //chrome下会出现alt+tab切换时,导致选区位置不对 - if (e.type == 'blur') { - me._bakRange = me.selection.getRange(); - try { - me._bakNativeRange = me.selection.getNative().getRangeAt(0); - me.selection.getNative().removeAllRanges(); - } catch (e) { - me._bakNativeRange = null; - } - - } else { - try { - me._bakRange && me._bakRange.select(); - } catch (e) { - } - } - }); - } - //trace:1518 ff3.6body不够寛,会导致点击空白处无法获得焦点 - if (browser.gecko && browser.version <= 10902) { - //修复ff3.6初始化进来,不能点击获得焦点 - me.body.contentEditable = false; - setTimeout(function () { - me.body.contentEditable = true; - }, 100); - setInterval(function () { - me.body.style.height = me.iframe.offsetHeight - 20 + 'px' - }, 100) - } - - !options.isShow && me.setHide(); - options.readonly && me.setDisabled(); - }, - - /** - * 同步数据到编辑器所在的form - * 从编辑器的容器节点向上查找form元素,若找到,就同步编辑内容到找到的form里,为提交数据做准备,主要用于是手动提交的情况 - * 后台取得数据的键值,使用你容器上的name属性,如果没有就使用参数里的textarea项 - * @method sync - * @example - * ```javascript - * editor.sync(); - * form.sumbit(); //form变量已经指向了form元素 - * ``` - */ - - /** - * 根据传入的formId,在页面上查找要同步数据的表单,若找到,就同步编辑内容到找到的form里,为提交数据做准备 - * 后台取得数据的键值,该键值默认使用给定的编辑器容器的name属性,如果没有name属性则使用参数项里给定的“textarea”项 - * @method sync - * @param { String } formID 指定一个要同步数据的form的id,编辑器的数据会同步到你指定form下 - */ - sync: function (formId) { - var me = this, - form = formId ? document.getElementById(formId) : - domUtils.findParent(me.iframe.parentNode, function (node) { - return node.tagName == 'FORM' - }, true); - form && setValue(form, me); - }, - - /** - * 设置编辑器高度 - * @method setHeight - * @remind 当配置项autoHeightEnabled为真时,该方法无效 - * @param { Number } number 设置的高度值,纯数值,不带单位 - * @example - * ```javascript - * editor.setHeight(number); - * ``` - */ - setHeight: function (height,notSetHeight) { - if (height !== parseInt(this.iframe.parentNode.style.height)) { - this.iframe.parentNode.style.height = height + 'px'; - } - !notSetHeight && (this.options.minFrameHeight = this.options.initialFrameHeight = height); - this.body.style.height = height + 'px'; - !notSetHeight && this.trigger('setHeight') - }, - - /** - * 为编辑器的编辑命令提供快捷键 - * 这个接口是为插件扩展提供的接口,主要是为新添加的插件,如果需要添加快捷键,所提供的接口 - * @method addshortcutkey - * @param { Object } keyset 命令名和快捷键键值对对象,多个按钮的快捷键用“+”分隔 - * @example - * ```javascript - * editor.addshortcutkey({ - * "Bold" : "ctrl+66",//^B - * "Italic" : "ctrl+73", //^I - * }); - * ``` - */ - /** - * 这个接口是为插件扩展提供的接口,主要是为新添加的插件,如果需要添加快捷键,所提供的接口 - * @method addshortcutkey - * @param { String } cmd 触发快捷键时,响应的命令 - * @param { String } keys 快捷键的字符串,多个按钮用“+”分隔 - * @example - * ```javascript - * editor.addshortcutkey("Underline", "ctrl+85"); //^U - * ``` - */ - addshortcutkey: function (cmd, keys) { - var obj = {}; - if (keys) { - obj[cmd] = keys - } else { - obj = cmd; - } - utils.extend(this.shortcutkeys, obj) - }, - - /** - * 对编辑器设置keydown事件监听,绑定快捷键和命令,当快捷键组合触发成功,会响应对应的命令 - * @method _bindshortcutKeys - * @private - */ - _bindshortcutKeys: function () { - var me = this, shortcutkeys = this.shortcutkeys; - me.addListener('keydown', function (type, e) { - var keyCode = e.keyCode || e.which; - for (var i in shortcutkeys) { - var tmp = shortcutkeys[i].split(','); - for (var t = 0, ti; ti = tmp[t++];) { - ti = ti.split(':'); - var key = ti[0], param = ti[1]; - if (/^(ctrl)(\+shift)?\+(\d+)$/.test(key.toLowerCase()) || /^(\d+)$/.test(key)) { - if (( (RegExp.$1 == 'ctrl' ? (e.ctrlKey || e.metaKey) : 0) - && (RegExp.$2 != "" ? e[RegExp.$2.slice(1) + "Key"] : 1) - && keyCode == RegExp.$3 - ) || - keyCode == RegExp.$1 - ) { - if (me.queryCommandState(i,param) != -1) - me.execCommand(i, param); - domUtils.preventDefault(e); - } - } - } - - } - }); - }, - - /** - * 获取编辑器的内容 - * @method getContent - * @warning 该方法获取到的是经过编辑器内置的过滤规则进行过滤后得到的内容 - * @return { String } 编辑器的内容字符串, 如果编辑器的内容为空,或者是空的标签内容(如:”<p><br/></p>“), 则返回空字符串 - * @example - * ```javascript - * //编辑器html内容:

    123456

    - * var content = editor.getContent(); //返回值:

    123456

    - * ``` - */ - - /** - * 获取编辑器的内容。 可以通过参数定义编辑器内置的判空规则 - * @method getContent - * @param { Function } fn 自定的判空规则, 要求该方法返回一个boolean类型的值, - * 代表当前编辑器的内容是否空, - * 如果返回true, 则该方法将直接返回空字符串;如果返回false,则编辑器将返回 - * 经过内置过滤规则处理后的内容。 - * @remind 该方法在处理包含有初始化内容的时候能起到很好的作用。 - * @warning 该方法获取到的是经过编辑器内置的过滤规则进行过滤后得到的内容 - * @return { String } 编辑器的内容字符串 - * @example - * ```javascript - * // editor 是一个编辑器的实例 - * var content = editor.getContent( function ( editor ) { - * return editor.body.innerHTML === '欢迎使用UEditor'; //返回空字符串 - * } ); - * ``` - */ - getContent: function (cmd, fn,notSetCursor,ignoreBlank,formatter) { - var me = this; - if (cmd && utils.isFunction(cmd)) { - fn = cmd; - cmd = ''; - } - if (fn ? !fn() : !this.hasContents()) { - return ''; - } - me.fireEvent('beforegetcontent'); - var root = UE.htmlparser(me.body.innerHTML,ignoreBlank); - me.filterOutputRule(root); - me.fireEvent('aftergetcontent', cmd,root); - return root.toHtml(formatter); - }, - - /** - * 取得完整的html代码,可以直接显示成完整的html文档 - * @method getAllHtml - * @return { String } 编辑器的内容html文档字符串 - * @eaxmple - * ```javascript - * editor.getAllHtml(); //返回格式大致是: ...... - * ``` - */ - getAllHtml: function () { - var me = this, - headHtml = [], - html = ''; - me.fireEvent('getAllHtml', headHtml); - if (browser.ie && browser.version > 8) { - var headHtmlForIE9 = ''; - utils.each(me.document.styleSheets, function (si) { - headHtmlForIE9 += ( si.href ? '' : ''); - }); - utils.each(me.document.getElementsByTagName('script'), function (si) { - headHtmlForIE9 += si.outerHTML; - }); - - } - return '' + (me.options.charset ? '' : '') - + (headHtmlForIE9 || me.document.getElementsByTagName('head')[0].innerHTML) + headHtml.join('\n') + '' - + '' + me.getContent(null, null, true) + ''; - }, - - /** - * 得到编辑器的纯文本内容,但会保留段落格式 - * @method getPlainTxt - * @return { String } 编辑器带段落格式的纯文本内容字符串 - * @example - * ```javascript - * //编辑器html内容:

    1

    2

    - * console.log(editor.getPlainTxt()); //输出:"1\n2\n - * ``` - */ - getPlainTxt: function () { - var reg = new RegExp(domUtils.fillChar, 'g'), - html = this.body.innerHTML.replace(/[\n\r]/g, '');//ie要先去了\n在处理 - html = html.replace(/<(p|div)[^>]*>(| )<\/\1>/gi, '\n') - .replace(//gi, '\n') - .replace(/<[^>/]+>/g, '') - .replace(/(\n)?<\/([^>]+)>/g, function (a, b, c) { - return dtd.$block[c] ? '\n' : b ? b : ''; - }); - //取出来的空格会有c2a0会变成乱码,处理这种情况\u00a0 - return html.replace(reg, '').replace(/\u00a0/g, ' ').replace(/ /g, ' '); - }, - - /** - * 获取编辑器中的纯文本内容,没有段落格式 - * @method getContentTxt - * @return { String } 编辑器不带段落格式的纯文本内容字符串 - * @example - * ```javascript - * //编辑器html内容:

    1

    2

    - * console.log(editor.getPlainTxt()); //输出:"12 - * ``` - */ - getContentTxt: function () { - var reg = new RegExp(domUtils.fillChar, 'g'); - //取出来的空格会有c2a0会变成乱码,处理这种情况\u00a0 - return this.body[browser.ie ? 'innerText' : 'textContent'].replace(reg, '').replace(/\u00a0/g, ' '); - }, - - /** - * 设置编辑器的内容,可修改编辑器当前的html内容 - * @method setContent - * @warning 通过该方法插入的内容,是经过编辑器内置的过滤规则进行过滤后得到的内容 - * @warning 该方法会触发selectionchange事件 - * @param { String } html 要插入的html内容 - * @example - * ```javascript - * editor.getContent('

    test

    '); - * ``` - */ - - /** - * 设置编辑器的内容,可修改编辑器当前的html内容 - * @method setContent - * @warning 通过该方法插入的内容,是经过编辑器内置的过滤规则进行过滤后得到的内容 - * @warning 该方法会触发selectionchange事件 - * @param { String } html 要插入的html内容 - * @param { Boolean } isAppendTo 若传入true,不清空原来的内容,在最后插入内容,否则,清空内容再插入 - * @example - * ```javascript - * //假设设置前的编辑器内容是

    old text

    - * editor.setContent('

    new text

    ', true); //插入的结果是

    old text

    new text

    - * ``` - */ - setContent: function (html, isAppendTo, notFireSelectionchange) { - var me = this; - - me.fireEvent('beforesetcontent', html); - var root = UE.htmlparser(html); - me.filterInputRule(root); - html = root.toHtml(); - - me.body.innerHTML = (isAppendTo ? me.body.innerHTML : '') + html; - - - function isCdataDiv(node){ - return node.tagName == 'DIV' && node.getAttribute('cdata_tag'); - } - //给文本或者inline节点套p标签 - if (me.options.enterTag == 'p') { - - var child = this.body.firstChild, tmpNode; - if (!child || child.nodeType == 1 && - (dtd.$cdata[child.tagName] || isCdataDiv(child) || - domUtils.isCustomeNode(child) - ) - && child === this.body.lastChild) { - this.body.innerHTML = '

    ' + (browser.ie ? ' ' : '
    ') + '

    ' + this.body.innerHTML; - - } else { - var p = me.document.createElement('p'); - while (child) { - while (child && (child.nodeType == 3 || child.nodeType == 1 && dtd.p[child.tagName] && !dtd.$cdata[child.tagName])) { - tmpNode = child.nextSibling; - p.appendChild(child); - child = tmpNode; - } - if (p.firstChild) { - if (!child) { - me.body.appendChild(p); - break; - } else { - child.parentNode.insertBefore(p, child); - p = me.document.createElement('p'); - } - } - child = child.nextSibling; - } - } - } - me.fireEvent('aftersetcontent'); - me.fireEvent('contentchange'); - - !notFireSelectionchange && me._selectionChange(); - //清除保存的选区 - me._bakRange = me._bakIERange = me._bakNativeRange = null; - //trace:1742 setContent后gecko能得到焦点问题 - var geckoSel; - if (browser.gecko && (geckoSel = this.selection.getNative())) { - geckoSel.removeAllRanges(); - } - if(me.options.autoSyncData){ - me.form && setValue(me.form,me); - } - }, - - /** - * 让编辑器获得焦点,默认focus到编辑器头部 - * @method focus - * @example - * ```javascript - * editor.focus() - * ``` - */ - - /** - * 让编辑器获得焦点,toEnd确定focus位置 - * @method focus - * @param { Boolean } toEnd 默认focus到编辑器头部,toEnd为true时focus到内容尾部 - * @example - * ```javascript - * editor.focus(true) - * ``` - */ - focus: function (toEnd) { - try { - var me = this, - rng = me.selection.getRange(); - if (toEnd) { - var node = me.body.lastChild; - if(node && node.nodeType == 1 && !dtd.$empty[node.tagName]){ - if(domUtils.isEmptyBlock(node)){ - rng.setStartAtFirst(node) - }else{ - rng.setStartAtLast(node) - } - rng.collapse(true); - } - rng.setCursor(true); - } else { - if(!rng.collapsed && domUtils.isBody(rng.startContainer) && rng.startOffset == 0){ - - var node = me.body.firstChild; - if(node && node.nodeType == 1 && !dtd.$empty[node.tagName]){ - rng.setStartAtFirst(node).collapse(true); - } - } - - rng.select(true); - - } - this.fireEvent('focus selectionchange'); - } catch (e) { - } - - }, - isFocus:function(){ - return this.selection.isFocus(); - }, - blur:function(){ - var sel = this.selection.getNative(); - if(sel.empty && browser.ie){ - var nativeRng = document.body.createTextRange(); - nativeRng.moveToElementText(document.body); - nativeRng.collapse(true); - nativeRng.select(); - sel.empty() - }else{ - sel.removeAllRanges() - } - - //this.fireEvent('blur selectionchange'); - }, - /** - * 初始化UE事件及部分事件代理 - * @method _initEvents - * @private - */ - _initEvents: function () { - var me = this, - doc = me.document, - win = me.window; - me._proxyDomEvent = utils.bind(me._proxyDomEvent, me); - domUtils.on(doc, ['click', 'contextmenu', 'mousedown', 'keydown', 'keyup', 'keypress', 'mouseup', 'mouseover', 'mouseout', 'selectstart'], me._proxyDomEvent); - domUtils.on(win, ['focus', 'blur'], me._proxyDomEvent); - domUtils.on(me.body,'drop',function(e){ - //阻止ff下默认的弹出新页面打开图片 - if(browser.gecko && e.stopPropagation) { e.stopPropagation(); } - me.fireEvent('contentchange') - }); - domUtils.on(doc, ['mouseup', 'keydown'], function (evt) { - //特殊键不触发selectionchange - if (evt.type == 'keydown' && (evt.ctrlKey || evt.metaKey || evt.shiftKey || evt.altKey)) { - return; - } - if (evt.button == 2)return; - me._selectionChange(250, evt); - }); - }, - /** - * 触发事件代理 - * @method _proxyDomEvent - * @private - * @return { * } fireEvent的返回值 - * @see UE.EventBase:fireEvent(String) - */ - _proxyDomEvent: function (evt) { - if(this.fireEvent('before' + evt.type.replace(/^on/, '').toLowerCase()) === false){ - return false; - } - if(this.fireEvent(evt.type.replace(/^on/, ''), evt) === false){ - return false; - } - return this.fireEvent('after' + evt.type.replace(/^on/, '').toLowerCase()) - }, - /** - * 变化选区 - * @method _selectionChange - * @private - */ - _selectionChange: function (delay, evt) { - var me = this; - //有光标才做selectionchange 为了解决未focus时点击source不能触发更改工具栏状态的问题(source命令notNeedUndo=1) -// if ( !me.selection.isFocus() ){ -// return; -// } - - - var hackForMouseUp = false; - var mouseX, mouseY; - if (browser.ie && browser.version < 9 && evt && evt.type == 'mouseup') { - var range = this.selection.getRange(); - if (!range.collapsed) { - hackForMouseUp = true; - mouseX = evt.clientX; - mouseY = evt.clientY; - } - } - clearTimeout(_selectionChangeTimer); - _selectionChangeTimer = setTimeout(function () { - if (!me.selection || !me.selection.getNative()) { - return; - } - //修复一个IE下的bug: 鼠标点击一段已选择的文本中间时,可能在mouseup后的一段时间内取到的range是在selection的type为None下的错误值. - //IE下如果用户是拖拽一段已选择文本,则不会触发mouseup事件,所以这里的特殊处理不会对其有影响 - var ieRange; - if (hackForMouseUp && me.selection.getNative().type == 'None') { - ieRange = me.document.body.createTextRange(); - try { - ieRange.moveToPoint(mouseX, mouseY); - } catch (ex) { - ieRange = null; - } - } - var bakGetIERange; - if (ieRange) { - bakGetIERange = me.selection.getIERange; - me.selection.getIERange = function () { - return ieRange; - }; - } - me.selection.cache(); - if (bakGetIERange) { - me.selection.getIERange = bakGetIERange; - } - if (me.selection._cachedRange && me.selection._cachedStartElement) { - me.fireEvent('beforeselectionchange'); - // 第二个参数causeByUi为true代表由用户交互造成的selectionchange. - me.fireEvent('selectionchange', !!evt); - me.fireEvent('afterselectionchange'); - me.selection.clear(); - } - }, delay || 50); - }, - - /** - * 执行编辑命令 - * @method _callCmdFn - * @private - * @param { String } fnName 函数名称 - * @param { * } args 传给命令函数的参数 - * @return { * } 返回命令函数运行的返回值 - */ - _callCmdFn: function (fnName, args) { - var cmdName = args[0].toLowerCase(), - cmd, cmdFn; - cmd = this.commands[cmdName] || UE.commands[cmdName]; - cmdFn = cmd && cmd[fnName]; - //没有querycommandstate或者没有command的都默认返回0 - if ((!cmd || !cmdFn) && fnName == 'queryCommandState') { - return 0; - } else if (cmdFn) { - return cmdFn.apply(this, args); - } - }, - - /** - * 执行编辑命令cmdName,完成富文本编辑效果 - * @method execCommand - * @param { String } cmdName 需要执行的命令 - * @remind 具体命令的使用请参考命令列表 - * @return { * } 返回命令函数运行的返回值 - * @example - * ```javascript - * editor.execCommand(cmdName); - * ``` - */ - execCommand: function (cmdName) { - cmdName = cmdName.toLowerCase(); - var me = this, - result, - cmd = me.commands[cmdName] || UE.commands[cmdName]; - if (!cmd || !cmd.execCommand) { - return null; - } - if (!cmd.notNeedUndo && !me.__hasEnterExecCommand) { - me.__hasEnterExecCommand = true; - if (me.queryCommandState.apply(me,arguments) != -1) { - me.fireEvent('saveScene'); - me.fireEvent.apply(me, ['beforeexeccommand', cmdName].concat(arguments)); - result = this._callCmdFn('execCommand', arguments); - //保存场景时,做了内容对比,再看是否进行contentchange触发,这里多触发了一次,去掉 -// (!cmd.ignoreContentChange && !me._ignoreContentChange) && me.fireEvent('contentchange'); - me.fireEvent.apply(me, ['afterexeccommand', cmdName].concat(arguments)); - me.fireEvent('saveScene'); - } - me.__hasEnterExecCommand = false; - } else { - result = this._callCmdFn('execCommand', arguments); - (!me.__hasEnterExecCommand && !cmd.ignoreContentChange && !me._ignoreContentChange) && me.fireEvent('contentchange') - } - (!me.__hasEnterExecCommand && !cmd.ignoreContentChange && !me._ignoreContentChange) && me._selectionChange(); - return result; - }, - - /** - * 根据传入的command命令,查选编辑器当前的选区,返回命令的状态 - * @method queryCommandState - * @param { String } cmdName 需要查询的命令名称 - * @remind 具体命令的使用请参考命令列表 - * @return { Number } number 返回放前命令的状态,返回值三种情况:(-1|0|1) - * @example - * ```javascript - * editor.queryCommandState(cmdName) => (-1|0|1) - * ``` - * @see COMMAND.LIST - */ - queryCommandState: function (cmdName) { - return this._callCmdFn('queryCommandState', arguments); - }, - - /** - * 根据传入的command命令,查选编辑器当前的选区,根据命令返回相关的值 - * @method queryCommandValue - * @param { String } cmdName 需要查询的命令名称 - * @remind 具体命令的使用请参考命令列表 - * @remind 只有部分插件有此方法 - * @return { * } 返回每个命令特定的当前状态值 - * @grammar editor.queryCommandValue(cmdName) => {*} - * @see COMMAND.LIST - */ - queryCommandValue: function (cmdName) { - return this._callCmdFn('queryCommandValue', arguments); - }, - - /** - * 检查编辑区域中是否有内容 - * @method hasContents - * @remind 默认有文本内容,或者有以下节点都不认为是空 - * table,ul,ol,dl,iframe,area,base,col,hr,img,embed,input,link,meta,param - * @return { Boolean } 检查有内容返回true,否则返回false - * @example - * ```javascript - * editor.hasContents() - * ``` - */ - - /** - * 检查编辑区域中是否有内容,若包含参数tags中的节点类型,直接返回true - * @method hasContents - * @param { Array } tags 传入数组判断时用到的节点类型 - * @return { Boolean } 若文档中包含tags数组里对应的tag,返回true,否则返回false - * @example - * ```javascript - * editor.hasContents(['span']); - * ``` - */ - hasContents: function (tags) { - if (tags) { - for (var i = 0, ci; ci = tags[i++];) { - if (this.document.getElementsByTagName(ci).length > 0) { - return true; - } - } - } - if (!domUtils.isEmptyBlock(this.body)) { - return true - } - //随时添加,定义的特殊标签如果存在,不能认为是空 - tags = ['div']; - for (i = 0; ci = tags[i++];) { - var nodes = domUtils.getElementsByTagName(this.document, ci); - for (var n = 0, cn; cn = nodes[n++];) { - if (domUtils.isCustomeNode(cn)) { - return true; - } - } - } - return false; - }, - - /** - * 重置编辑器,可用来做多个tab使用同一个编辑器实例 - * @method reset - * @remind 此方法会清空编辑器内容,清空回退列表,会触发reset事件 - * @example - * ```javascript - * editor.reset() - * ``` - */ - reset: function () { - this.fireEvent('reset'); - }, - - /** - * 设置当前编辑区域可以编辑 - * @method setEnabled - * @example - * ```javascript - * editor.setEnabled() - * ``` - */ - setEnabled: function () { - var me = this, range; - if (me.body.contentEditable == 'false') { - me.body.contentEditable = true; - range = me.selection.getRange(); - //有可能内容丢失了 - try { - range.moveToBookmark(me.lastBk); - delete me.lastBk - } catch (e) { - range.setStartAtFirst(me.body).collapse(true) - } - range.select(true); - if (me.bkqueryCommandState) { - me.queryCommandState = me.bkqueryCommandState; - delete me.bkqueryCommandState; - } - if (me.bkqueryCommandValue) { - me.queryCommandValue = me.bkqueryCommandValue; - delete me.bkqueryCommandValue; - } - me.fireEvent('selectionchange'); - } - }, - enable: function () { - return this.setEnabled(); - }, - - /** 设置当前编辑区域不可编辑 - * @method setDisabled - */ - - /** 设置当前编辑区域不可编辑,except中的命令除外 - * @method setDisabled - * @param { String } except 例外命令的字符串 - * @remind 即使设置了disable,此处配置的例外命令仍然可以执行 - * @example - * ```javascript - * editor.setDisabled('bold'); //禁用工具栏中除加粗之外的所有功能 - * ``` - */ - - /** 设置当前编辑区域不可编辑,except中的命令除外 - * @method setDisabled - * @param { Array } except 例外命令的字符串数组,数组中的命令仍然可以执行 - * @remind 即使设置了disable,此处配置的例外命令仍然可以执行 - * @example - * ```javascript - * editor.setDisabled(['bold','insertimage']); //禁用工具栏中除加粗和插入图片之外的所有功能 - * ``` - */ - setDisabled: function (except) { - var me = this; - except = except ? utils.isArray(except) ? except : [except] : []; - if (me.body.contentEditable == 'true') { - if (!me.lastBk) { - me.lastBk = me.selection.getRange().createBookmark(true); - } - me.body.contentEditable = false; - me.bkqueryCommandState = me.queryCommandState; - me.bkqueryCommandValue = me.queryCommandValue; - me.queryCommandState = function (type) { - if (utils.indexOf(except, type) != -1) { - return me.bkqueryCommandState.apply(me, arguments); - } - return -1; - }; - me.queryCommandValue = function (type) { - if (utils.indexOf(except, type) != -1) { - return me.bkqueryCommandValue.apply(me, arguments); - } - return null; - }; - me.fireEvent('selectionchange'); - } - }, - disable: function (except) { - return this.setDisabled(except); - }, - - /** - * 设置默认内容 - * @method _setDefaultContent - * @private - * @param { String } cont 要存入的内容 - */ - _setDefaultContent: function () { - function clear() { - var me = this; - if (me.document.getElementById('initContent')) { - me.body.innerHTML = '

    ' + (ie ? '' : '
    ') + '

    '; - me.removeListener('firstBeforeExecCommand focus', clear); - setTimeout(function () { - me.focus(); - me._selectionChange(); - }, 0) - } - } - - return function (cont) { - var me = this; - me.body.innerHTML = '

    ' + cont + '

    '; - - me.addListener('firstBeforeExecCommand focus', clear); - } - }(), - - /** - * 显示编辑器 - * @method setShow - * @example - * ```javascript - * editor.setShow() - * ``` - */ - setShow: function () { - var me = this, range = me.selection.getRange(); - if (me.container.style.display == 'none') { - //有可能内容丢失了 - try { - range.moveToBookmark(me.lastBk); - delete me.lastBk - } catch (e) { - range.setStartAtFirst(me.body).collapse(true) - } - //ie下focus实效,所以做了个延迟 - setTimeout(function () { - range.select(true); - }, 100); - me.container.style.display = ''; - } - - }, - show: function () { - return this.setShow(); - }, - /** - * 隐藏编辑器 - * @method setHide - * @example - * ```javascript - * editor.setHide() - * ``` - */ - setHide: function () { - var me = this; - if (!me.lastBk) { - me.lastBk = me.selection.getRange().createBookmark(true); - } - me.container.style.display = 'none' - }, - hide: function () { - return this.setHide(); - }, - - /** - * 根据指定的路径,获取对应的语言资源 - * @method getLang - * @param { String } path 路径根据的是lang目录下的语言文件的路径结构 - * @return { Object | String } 根据路径返回语言资源的Json格式对象或者语言字符串 - * @example - * ```javascript - * editor.getLang('contextMenu.delete'); //如果当前是中文,那返回是的是'删除' - * ``` - */ - getLang: function (path) { - // HaoChuan9421 - if(!this.options){ - return ''; - } - var lang = UE.I18N[this.options.lang]; - if (!lang) { - throw Error("not import language file"); - } - path = (path || "").split("."); - for (var i = 0, ci; ci = path[i++];) { - lang = lang[ci]; - if (!lang)break; - } - return lang; - }, - - /** - * 计算编辑器html内容字符串的长度 - * @method getContentLength - * @return { Number } 返回计算的长度 - * @example - * ```javascript - * //编辑器html内容

    132

    - * editor.getContentLength() //返回27 - * ``` - */ - /** - * 计算编辑器当前纯文本内容的长度 - * @method getContentLength - * @param { Boolean } ingoneHtml 传入true时,只按照纯文本来计算 - * @return { Number } 返回计算的长度,内容中有hr/img/iframe标签,长度加1 - * @example - * ```javascript - * //编辑器html内容

    132

    - * editor.getContentLength() //返回3 - * ``` - */ - getContentLength: function (ingoneHtml, tagNames) { - var count = this.getContent(false,false,true).length; - if (ingoneHtml) { - tagNames = (tagNames || []).concat([ 'hr', 'img', 'iframe']); - count = this.getContentTxt().replace(/[\t\r\n]+/g, '').length; - for (var i = 0, ci; ci = tagNames[i++];) { - count += this.document.getElementsByTagName(ci).length; - } - } - return count; - }, - - /** - * 注册输入过滤规则 - * @method addInputRule - * @param { Function } rule 要添加的过滤规则 - * @example - * ```javascript - * editor.addInputRule(function(root){ - * $.each(root.getNodesByTagName('div'),function(i,node){ - * node.tagName="p"; - * }); - * }); - * ``` - */ - addInputRule: function (rule) { - this.inputRules.push(rule); - }, - - /** - * 执行注册的过滤规则 - * @method filterInputRule - * @param { UE.uNode } root 要过滤的uNode节点 - * @remind 执行editor.setContent方法和执行'inserthtml'命令后,会运行该过滤函数 - * @example - * ```javascript - * editor.filterInputRule(editor.body); - * ``` - * @see UE.Editor:addInputRule - */ - filterInputRule: function (root) { - for (var i = 0, ci; ci = this.inputRules[i++];) { - ci.call(this, root) - } - }, - - /** - * 注册输出过滤规则 - * @method addOutputRule - * @param { Function } rule 要添加的过滤规则 - * @example - * ```javascript - * editor.addOutputRule(function(root){ - * $.each(root.getNodesByTagName('p'),function(i,node){ - * node.tagName="div"; - * }); - * }); - * ``` - */ - addOutputRule: function (rule) { - this.outputRules.push(rule) - }, - - /** - * 根据输出过滤规则,过滤编辑器内容 - * @method filterOutputRule - * @remind 执行editor.getContent方法的时候,会先运行该过滤函数 - * @param { UE.uNode } root 要过滤的uNode节点 - * @example - * ```javascript - * editor.filterOutputRule(editor.body); - * ``` - * @see UE.Editor:addOutputRule - */ - filterOutputRule: function (root) { - for (var i = 0, ci; ci = this.outputRules[i++];) { - ci.call(this, root) - } - }, - - /** - * 根据action名称获取请求的路径 - * @method getActionUrl - * @remind 假如没有设置serverUrl,会根据imageUrl设置默认的controller路径 - * @param { String } action action名称 - * @example - * ```javascript - * editor.getActionUrl('config'); //返回 "/ueditor/php/controller.php?action=config" - * editor.getActionUrl('image'); //返回 "/ueditor/php/controller.php?action=uplaodimage" - * editor.getActionUrl('scrawl'); //返回 "/ueditor/php/controller.php?action=uplaodscrawl" - * editor.getActionUrl('imageManager'); //返回 "/ueditor/php/controller.php?action=listimage" - * ``` - */ - getActionUrl: function(action){ - var actionName = this.getOpt(action) || action, - imageUrl = this.getOpt('imageUrl'), - serverUrl = this.getOpt('serverUrl'); - - if(!serverUrl && imageUrl) { - serverUrl = imageUrl.replace(/^(.*[\/]).+([\.].+)$/, '$1controller$2'); - } - - if(serverUrl) { - serverUrl = serverUrl + (serverUrl.indexOf('?') == -1 ? '?':'&') + 'action=' + (actionName || ''); - return utils.formatUrl(serverUrl); - } else { - return ''; - } - } - }; - utils.inherits(Editor, EventBase); -})(); - - -// core/Editor.defaultoptions.js -//维护编辑器一下默认的不在插件中的配置项 -UE.Editor.defaultOptions = function(editor){ - - var _url = editor.options.UEDITOR_HOME_URL; - return { - isShow: true, - initialContent: '', - initialStyle:'', - autoClearinitialContent: false, - iframeCssUrl: _url + 'themes/iframe.css', - textarea: 'editorValue', - focus: false, - focusInEnd: true, - autoClearEmptyNode: true, - fullscreen: false, - readonly: false, - zIndex: 999, - imagePopup: true, - enterTag: 'p', - customDomain: false, - lang: 'zh-cn', - langPath: _url + 'lang/', - theme: 'default', - themePath: _url + 'themes/', - allHtmlEnabled: false, - scaleEnabled: false, - tableNativeEditInFF: false, - autoSyncData : true, - fileNameFormat: '{time}{rand:6}' - } -}; - -// core/loadconfig.js -(function(){ - - UE.Editor.prototype.loadServerConfig = function(){ - var me = this; - setTimeout(function(){ - try{ - me.options.imageUrl && me.setOpt('serverUrl', me.options.imageUrl.replace(/^(.*[\/]).+([\.].+)$/, '$1controller$2')); - - var configUrl = me.getActionUrl('config'), - isJsonp = utils.isCrossDomainUrl(configUrl); - - /* 发出ajax请求 */ - me._serverConfigLoaded = false; - - configUrl && UE.ajax.request(configUrl,{ - 'method': 'GET', - 'dataType': isJsonp ? 'jsonp' : '', - 'data': PostBase, - 'onsuccess':function(r){ - try { - var config = isJsonp ? r:eval("("+r.responseText+")"); - utils.extend(me.options, config); - me.fireEvent('serverConfigLoaded'); - me._serverConfigLoaded = true; - } catch (e) { - showErrorMsg(me.getLang('loadconfigFormatError')); - } - }, - 'onerror':function(){ - showErrorMsg(me.getLang('loadconfigHttpError')); - } - }); - } catch(e){ - showErrorMsg(me.getLang('loadconfigError')); - } - }); - - function showErrorMsg(msg) { - console && console.error(msg); - //me.fireEvent('showMessage', { - // 'title': msg, - // 'type': 'error' - //}); - } - }; - - UE.Editor.prototype.isServerConfigLoaded = function(){ - var me = this; - return me._serverConfigLoaded || false; - }; - - UE.Editor.prototype.afterConfigReady = function(handler){ - if (!handler || !utils.isFunction(handler)) return; - var me = this; - var readyHandler = function(){ - handler.apply(me, arguments); - me.removeListener('serverConfigLoaded', readyHandler); - }; - - if (me.isServerConfigLoaded()) { - handler.call(me, 'serverConfigLoaded'); - } else { - me.addListener('serverConfigLoaded', readyHandler); - } - }; - -})(); - - -// core/ajax.js -/** - * @file - * @module UE.ajax - * @since 1.2.6.1 - */ - -/** - * 提供对ajax请求的支持 - * @module UE.ajax - */ -UE.ajax = function() { - - //创建一个ajaxRequest对象 - var fnStr = 'XMLHttpRequest()'; - try { - new ActiveXObject("Msxml2.XMLHTTP"); - fnStr = 'ActiveXObject(\'Msxml2.XMLHTTP\')'; - } catch (e) { - try { - new ActiveXObject("Microsoft.XMLHTTP"); - fnStr = 'ActiveXObject(\'Microsoft.XMLHTTP\')' - } catch (e) { - } - } - var creatAjaxRequest = new Function('return new ' + fnStr); - - - /** - * 将json参数转化成适合ajax提交的参数列表 - * @param json - */ - function json2str(json) { - var strArr = []; - for (var i in json) { - //忽略默认的几个参数 - if(i=="method" || i=="timeout" || i=="async" || i=="dataType" || i=="callback") continue; - //忽略控制 - if(json[i] == undefined || json[i] == null) continue; - //传递过来的对象和函数不在提交之列 - if (!((typeof json[i]).toLowerCase() == "function" || (typeof json[i]).toLowerCase() == "object")) { - strArr.push( encodeURIComponent(i) + "="+encodeURIComponent(json[i]) ); - } else if (utils.isArray(json[i])) { - //支持传数组内容 - for(var j = 0; j < json[i].length; j++) { - strArr.push( encodeURIComponent(i) + "[]="+encodeURIComponent(json[i][j]) ); - } - } - } - return strArr.join("&"); - } - - function doAjax(url, ajaxOptions) { - var xhr = creatAjaxRequest(), - //是否超时 - timeIsOut = false, - //默认参数 - defaultAjaxOptions = { - method:"POST", - timeout:5000, - async:true, - data:{},//需要传递对象的话只能覆盖 - onsuccess:function() { - }, - onerror:function() { - } - }; - - if (typeof url === "object") { - ajaxOptions = url; - url = ajaxOptions.url; - } - if (!xhr || !url) return; - var ajaxOpts = ajaxOptions ? utils.extend(defaultAjaxOptions,ajaxOptions) : defaultAjaxOptions; - - var submitStr = json2str(ajaxOpts); // { name:"Jim",city:"Beijing" } --> "name=Jim&city=Beijing" - //如果用户直接通过data参数传递json对象过来,则也要将此json对象转化为字符串 - if (!utils.isEmptyObject(ajaxOpts.data)){ - submitStr += (submitStr? "&":"") + json2str(ajaxOpts.data); - } - //超时检测 - var timerID = setTimeout(function() { - if (xhr.readyState != 4) { - timeIsOut = true; - xhr.abort(); - clearTimeout(timerID); - } - }, ajaxOpts.timeout); - - var method = ajaxOpts.method.toUpperCase(); - var str = url + (url.indexOf("?")==-1?"?":"&") + (method=="POST"?"":submitStr+ "&noCache=" + +new Date); - xhr.open(method, str, ajaxOpts.async); - xhr.onreadystatechange = function() { - if (xhr.readyState == 4) { - if (!timeIsOut && xhr.status == 200) { - ajaxOpts.onsuccess(xhr); - } else { - ajaxOpts.onerror(xhr); - } - } - }; - if (method == "POST") { - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.send(submitStr); - } else { - xhr.send(null); - } - } - - function doJsonp(url, opts) { - - var successhandler = opts.onsuccess || function(){}, - scr = document.createElement('SCRIPT'), - options = opts || {}, - charset = options['charset'], - callbackField = options['jsonp'] || 'callback', - callbackFnName, - timeOut = options['timeOut'] || 0, - timer, - reg = new RegExp('(\\?|&)' + callbackField + '=([^&]*)'), - matches; - - if (utils.isFunction(successhandler)) { - callbackFnName = 'bd__editor__' + Math.floor(Math.random() * 2147483648).toString(36); - window[callbackFnName] = getCallBack(0); - } else if(utils.isString(successhandler)){ - callbackFnName = successhandler; - } else { - if (matches = reg.exec(url)) { - callbackFnName = matches[2]; - } - } - - url = url.replace(reg, '\x241' + callbackField + '=' + callbackFnName); - - if (url.search(reg) < 0) { - url += (url.indexOf('?') < 0 ? '?' : '&') + callbackField + '=' + callbackFnName; - } - - var queryStr = json2str(opts); // { name:"Jim",city:"Beijing" } --> "name=Jim&city=Beijing" - //如果用户直接通过data参数传递json对象过来,则也要将此json对象转化为字符串 - if (!utils.isEmptyObject(opts.data)){ - queryStr += (queryStr? "&":"") + json2str(opts.data); - } - if (queryStr) { - url = url.replace(/\?/, '?' + queryStr + '&'); - } - - scr.onerror = getCallBack(1); - if( timeOut ){ - timer = setTimeout(getCallBack(1), timeOut); - } - createScriptTag(scr, url, charset); - - function createScriptTag(scr, url, charset) { - scr.setAttribute('type', 'text/javascript'); - scr.setAttribute('defer', 'defer'); - charset && scr.setAttribute('charset', charset); - scr.setAttribute('src', url); - document.getElementsByTagName('head')[0].appendChild(scr); - } - - function getCallBack(onTimeOut){ - return function(){ - try { - if(onTimeOut){ - options.onerror && options.onerror(); - }else{ - try{ - clearTimeout(timer); - successhandler.apply(window, arguments); - } catch (e){} - } - } catch (exception) { - options.onerror && options.onerror.call(window, exception); - } finally { - options.oncomplete && options.oncomplete.apply(window, arguments); - scr.parentNode && scr.parentNode.removeChild(scr); - window[callbackFnName] = null; - try { - delete window[callbackFnName]; - }catch(e){} - } - } - } - } - - return { - /** - * 根据给定的参数项,向指定的url发起一个ajax请求。 ajax请求完成后,会根据请求结果调用相应回调: 如果请求 - * 成功, 则调用onsuccess回调, 失败则调用 onerror 回调 - * @method request - * @param { URLString } url ajax请求的url地址 - * @param { Object } ajaxOptions ajax请求选项的键值对,支持的选项如下: - * @example - * ```javascript - * //向sayhello.php发起一个异步的Ajax GET请求, 请求超时时间为10s, 请求完成后执行相应的回调。 - * UE.ajax.requeset( 'sayhello.php', { - * - * //请求方法。可选值: 'GET', 'POST',默认值是'POST' - * method: 'GET', - * - * //超时时间。 默认为5000, 单位是ms - * timeout: 10000, - * - * //是否是异步请求。 true为异步请求, false为同步请求 - * async: true, - * - * //请求携带的数据。如果请求为GET请求, data会经过stringify后附加到请求url之后。 - * data: { - * name: 'ueditor' - * }, - * - * //请求成功后的回调, 该回调接受当前的XMLHttpRequest对象作为参数。 - * onsuccess: function ( xhr ) { - * console.log( xhr.responseText ); - * }, - * - * //请求失败或者超时后的回调。 - * onerror: function ( xhr ) { - * alert( 'Ajax请求失败' ); - * } - * - * } ); - * ``` - */ - - /** - * 根据给定的参数项发起一个ajax请求, 参数项里必须包含一个url地址。 ajax请求完成后,会根据请求结果调用相应回调: 如果请求 - * 成功, 则调用onsuccess回调, 失败则调用 onerror 回调。 - * @method request - * @warning 如果在参数项里未提供一个key为“url”的地址值,则该请求将直接退出。 - * @param { Object } ajaxOptions ajax请求选项的键值对,支持的选项如下: - * @example - * ```javascript - * - * //向sayhello.php发起一个异步的Ajax POST请求, 请求超时时间为5s, 请求完成后不执行任何回调。 - * UE.ajax.requeset( 'sayhello.php', { - * - * //请求的地址, 该项是必须的。 - * url: 'sayhello.php' - * - * } ); - * ``` - */ - request:function(url, opts) { - if (opts && opts.dataType == 'jsonp') { - doJsonp(url, opts); - } else { - doAjax(url, opts); - } - }, - getJSONP:function(url, data, fn) { - var opts = { - 'data': data, - 'oncomplete': fn - }; - doJsonp(url, opts); - } - }; - - -}(); - - -// core/filterword.js -/** - * UE过滤word的静态方法 - * @file - */ - -/** - * UEditor公用空间,UEditor所有的功能都挂载在该空间下 - * @module UE - */ - - -/** - * 根据传入html字符串过滤word - * @module UE - * @since 1.2.6.1 - * @method filterWord - * @param { String } html html字符串 - * @return { String } 已过滤后的结果字符串 - * @example - * ```javascript - * UE.filterWord(html); - * ``` - */ -var filterWord = UE.filterWord = function () { - - //是否是word过来的内容 - function isWordDocument( str ) { - return /(class="?Mso|style="[^"]*\bmso\-|w:WordDocument|<(v|o):|lang=)/ig.test( str ); - } - //去掉小数 - function transUnit( v ) { - v = v.replace( /[\d.]+\w+/g, function ( m ) { - return utils.transUnitToPx(m); - } ); - return v; - } - - function filterPasteWord( str ) { - return str.replace(/[\t\r\n]+/g,' ') - .replace( //ig, "" ) - //转换图片 - .replace(/]*>[\s\S]*?.<\/v:shape>/gi,function(str){ - //opera能自己解析出image所这里直接返回空 - if(browser.opera){ - return ''; - } - try{ - //有可能是bitmap占为图,无用,直接过滤掉,主要体现在粘贴excel表格中 - if(/Bitmap/i.test(str)){ - return ''; - } - var width = str.match(/width:([ \d.]*p[tx])/i)[1], - height = str.match(/height:([ \d.]*p[tx])/i)[1], - src = str.match(/src=\s*"([^"]*)"/i)[1]; - return ''; - } catch(e){ - return ''; - } - }) - //针对wps添加的多余标签处理 - .replace(/<\/?div[^>]*>/g,'') - //去掉多余的属性 - .replace( /v:\w+=(["']?)[^'"]+\1/g, '' ) - .replace( /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|xml|meta|link|style|\w+:\w+)(?=[\s\/>]))[^>]*>/gi, "" ) - .replace( /

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "

    $1

    " ) - //去掉多余的属性 - .replace( /\s+(class|lang|align)\s*=\s*(['"]?)([\w-]+)\2/ig, function(str,name,marks,val){ - //保留list的标示 - return name == 'class' && val == 'MsoListParagraph' ? str : '' - }) - //清除多余的font/span不能匹配 有可能是空格 - .replace( /<(font|span)[^>]*>(\s*)<\/\1>/gi, function(a,b,c){ - return c.replace(/[\t\r\n ]+/g,' ') - }) - //处理style的问题 - .replace( /(<[a-z][^>]*)\sstyle=(["'])([^\2]*?)\2/gi, function( str, tag, tmp, style ) { - var n = [], - s = style.replace( /^\s+|\s+$/, '' ) - .replace(/'/g,'\'') - .replace( /"/gi, "'" ) - .replace(/[\d.]+(cm|pt)/g,function(str){ - return utils.transUnitToPx(str) - }) - .split( /;\s*/g ); - - for ( var i = 0,v; v = s[i];i++ ) { - - var name, value, - parts = v.split( ":" ); - - if ( parts.length == 2 ) { - name = parts[0].toLowerCase(); - value = parts[1].toLowerCase(); - if(/^(background)\w*/.test(name) && value.replace(/(initial|\s)/g,'').length == 0 - || - /^(margin)\w*/.test(name) && /^0\w+$/.test(value) - ){ - continue; - } - - switch ( name ) { - case "mso-padding-alt": - case "mso-padding-top-alt": - case "mso-padding-right-alt": - case "mso-padding-bottom-alt": - case "mso-padding-left-alt": - case "mso-margin-alt": - case "mso-margin-top-alt": - case "mso-margin-right-alt": - case "mso-margin-bottom-alt": - case "mso-margin-left-alt": - //ie下会出现挤到一起的情况 - //case "mso-table-layout-alt": - case "mso-height": - case "mso-width": - case "mso-vertical-align-alt": - //trace:1819 ff下会解析出padding在table上 - if(!/]/.test(html)) { - return UE.htmlparser(html).children[0] - } else { - return new uNode({ - type:'element', - children:[], - tagName:html - }) - } - }; - uNode.createText = function (data,noTrans) { - return new UE.uNode({ - type:'text', - 'data':noTrans ? data : utils.unhtml(data || '') - }) - }; - function nodeToHtml(node, arr, formatter, current) { - switch (node.type) { - case 'root': - for (var i = 0, ci; ci = node.children[i++];) { - //插入新行 - if (formatter && ci.type == 'element' && !dtd.$inlineWithA[ci.tagName] && i > 1) { - insertLine(arr, current, true); - insertIndent(arr, current) - } - nodeToHtml(ci, arr, formatter, current) - } - break; - case 'text': - isText(node, arr); - break; - case 'element': - isElement(node, arr, formatter, current); - break; - case 'comment': - isComment(node, arr, formatter); - } - return arr; - } - - function isText(node, arr) { - if(node.parentNode.tagName == 'pre'){ - //源码模式下输入html标签,不能做转换处理,直接输出 - arr.push(node.data) - }else{ - arr.push(notTransTagName[node.parentNode.tagName] ? utils.html(node.data) : node.data.replace(/[ ]{2}/g,'  ')) - } - - } - - function isElement(node, arr, formatter, current) { - var attrhtml = ''; - if (node.attrs) { - attrhtml = []; - var attrs = node.attrs; - for (var a in attrs) { - //这里就针对 - //

    '

    - //这里边的\"做转换,要不用innerHTML直接被截断了,属性src - //有可能做的不够 - attrhtml.push(a + (attrs[a] !== undefined ? '="' + (notTransAttrs[a] ? utils.html(attrs[a]).replace(/["]/g, function (a) { - return '"' - }) : utils.unhtml(attrs[a])) + '"' : '')) - } - attrhtml = attrhtml.join(' '); - } - arr.push('<' + node.tagName + - (attrhtml ? ' ' + attrhtml : '') + - (dtd.$empty[node.tagName] ? '\/' : '' ) + '>' - ); - //插入新行 - if (formatter && !dtd.$inlineWithA[node.tagName] && node.tagName != 'pre') { - if(node.children && node.children.length){ - current = insertLine(arr, current, true); - insertIndent(arr, current) - } - - } - if (node.children && node.children.length) { - for (var i = 0, ci; ci = node.children[i++];) { - if (formatter && ci.type == 'element' && !dtd.$inlineWithA[ci.tagName] && i > 1) { - insertLine(arr, current); - insertIndent(arr, current) - } - nodeToHtml(ci, arr, formatter, current) - } - } - if (!dtd.$empty[node.tagName]) { - if (formatter && !dtd.$inlineWithA[node.tagName] && node.tagName != 'pre') { - - if(node.children && node.children.length){ - current = insertLine(arr, current); - insertIndent(arr, current) - } - } - arr.push('<\/' + node.tagName + '>'); - } - - } - - function isComment(node, arr) { - arr.push(''); - } - - function getNodeById(root, id) { - var node; - if (root.type == 'element' && root.getAttr('id') == id) { - return root; - } - if (root.children && root.children.length) { - for (var i = 0, ci; ci = root.children[i++];) { - if (node = getNodeById(ci, id)) { - return node; - } - } - } - } - - function getNodesByTagName(node, tagName, arr) { - if (node.type == 'element' && node.tagName == tagName) { - arr.push(node); - } - if (node.children && node.children.length) { - for (var i = 0, ci; ci = node.children[i++];) { - getNodesByTagName(ci, tagName, arr) - } - } - } - function nodeTraversal(root,fn){ - if(root.children && root.children.length){ - for(var i= 0,ci;ci=root.children[i];){ - nodeTraversal(ci,fn); - //ci被替换的情况,这里就不再走 fn了 - if(ci.parentNode ){ - if(ci.children && ci.children.length){ - fn(ci) - } - if(ci.parentNode) i++ - } - } - }else{ - fn(root) - } - - } - uNode.prototype = { - - /** - * 当前节点对象,转换成html文本 - * @method toHtml - * @return { String } 返回转换后的html字符串 - * @example - * ```javascript - * node.toHtml(); - * ``` - */ - - /** - * 当前节点对象,转换成html文本 - * @method toHtml - * @param { Boolean } formatter 是否格式化返回值 - * @return { String } 返回转换后的html字符串 - * @example - * ```javascript - * node.toHtml( true ); - * ``` - */ - toHtml:function (formatter) { - var arr = []; - nodeToHtml(this, arr, formatter, 0); - return arr.join('') - }, - - /** - * 获取节点的html内容 - * @method innerHTML - * @warning 假如节点的type不是'element',或节点的标签名称不在dtd列表里,直接返回当前节点 - * @return { String } 返回节点的html内容 - * @example - * ```javascript - * var htmlstr = node.innerHTML(); - * ``` - */ - - /** - * 设置节点的html内容 - * @method innerHTML - * @warning 假如节点的type不是'element',或节点的标签名称不在dtd列表里,直接返回当前节点 - * @param { String } htmlstr 传入要设置的html内容 - * @return { UE.uNode } 返回节点本身 - * @example - * ```javascript - * node.innerHTML('text'); - * ``` - */ - innerHTML:function (htmlstr) { - if (this.type != 'element' || dtd.$empty[this.tagName]) { - return this; - } - if (utils.isString(htmlstr)) { - if(this.children){ - for (var i = 0, ci; ci = this.children[i++];) { - ci.parentNode = null; - } - } - this.children = []; - var tmpRoot = UE.htmlparser(htmlstr); - for (var i = 0, ci; ci = tmpRoot.children[i++];) { - this.children.push(ci); - ci.parentNode = this; - } - return this; - } else { - var tmpRoot = new UE.uNode({ - type:'root', - children:this.children - }); - return tmpRoot.toHtml(); - } - }, - - /** - * 获取节点的纯文本内容 - * @method innerText - * @warning 假如节点的type不是'element',或节点的标签名称不在dtd列表里,直接返回当前节点 - * @return { String } 返回节点的存文本内容 - * @example - * ```javascript - * var textStr = node.innerText(); - * ``` - */ - - /** - * 设置节点的纯文本内容 - * @method innerText - * @warning 假如节点的type不是'element',或节点的标签名称不在dtd列表里,直接返回当前节点 - * @param { String } textStr 传入要设置的文本内容 - * @return { UE.uNode } 返回节点本身 - * @example - * ```javascript - * node.innerText('text'); - * ``` - */ - innerText:function (textStr,noTrans) { - if (this.type != 'element' || dtd.$empty[this.tagName]) { - return this; - } - if (textStr) { - if(this.children){ - for (var i = 0, ci; ci = this.children[i++];) { - ci.parentNode = null; - } - } - this.children = []; - this.appendChild(uNode.createText(textStr,noTrans)); - return this; - } else { - return this.toHtml().replace(/<[^>]+>/g, ''); - } - }, - - /** - * 获取当前对象的data属性 - * @method getData - * @return { Object } 若节点的type值是elemenet,返回空字符串,否则返回节点的data属性 - * @example - * ```javascript - * node.getData(); - * ``` - */ - getData:function () { - if (this.type == 'element') - return ''; - return this.data - }, - - /** - * 获取当前节点下的第一个子节点 - * @method firstChild - * @return { UE.uNode } 返回第一个子节点 - * @example - * ```javascript - * node.firstChild(); //返回第一个子节点 - * ``` - */ - firstChild:function () { -// if (this.type != 'element' || dtd.$empty[this.tagName]) { -// return this; -// } - return this.children ? this.children[0] : null; - }, - - /** - * 获取当前节点下的最后一个子节点 - * @method lastChild - * @return { UE.uNode } 返回最后一个子节点 - * @example - * ```javascript - * node.lastChild(); //返回最后一个子节点 - * ``` - */ - lastChild:function () { -// if (this.type != 'element' || dtd.$empty[this.tagName] ) { -// return this; -// } - return this.children ? this.children[this.children.length - 1] : null; - }, - - /** - * 获取和当前节点有相同父亲节点的前一个节点 - * @method previousSibling - * @return { UE.uNode } 返回前一个节点 - * @example - * ```javascript - * node.children[2].previousSibling(); //返回子节点node.children[1] - * ``` - */ - previousSibling : function(){ - var parent = this.parentNode; - for (var i = 0, ci; ci = parent.children[i]; i++) { - if (ci === this) { - return i == 0 ? null : parent.children[i-1]; - } - } - - }, - - /** - * 获取和当前节点有相同父亲节点的后一个节点 - * @method nextSibling - * @return { UE.uNode } 返回后一个节点,找不到返回null - * @example - * ```javascript - * node.children[2].nextSibling(); //如果有,返回子节点node.children[3] - * ``` - */ - nextSibling : function(){ - var parent = this.parentNode; - for (var i = 0, ci; ci = parent.children[i++];) { - if (ci === this) { - return parent.children[i]; - } - } - }, - - /** - * 用新的节点替换当前节点 - * @method replaceChild - * @param { UE.uNode } target 要替换成该节点参数 - * @param { UE.uNode } source 要被替换掉的节点 - * @return { UE.uNode } 返回替换之后的节点对象 - * @example - * ```javascript - * node.replaceChild(newNode, childNode); //用newNode替换childNode,childNode是node的子节点 - * ``` - */ - replaceChild:function (target, source) { - if (this.children) { - if(target.parentNode){ - target.parentNode.removeChild(target); - } - for (var i = 0, ci; ci = this.children[i]; i++) { - if (ci === source) { - this.children.splice(i, 1, target); - source.parentNode = null; - target.parentNode = this; - return target; - } - } - } - }, - - /** - * 在节点的子节点列表最后位置插入一个节点 - * @method appendChild - * @param { UE.uNode } node 要插入的节点 - * @return { UE.uNode } 返回刚插入的子节点 - * @example - * ```javascript - * node.appendChild( newNode ); //在node内插入子节点newNode - * ``` - */ - appendChild:function (node) { - if (this.type == 'root' || (this.type == 'element' && !dtd.$empty[this.tagName])) { - if (!this.children) { - this.children = [] - } - if(node.parentNode){ - node.parentNode.removeChild(node); - } - for (var i = 0, ci; ci = this.children[i]; i++) { - if (ci === node) { - this.children.splice(i, 1); - break; - } - } - this.children.push(node); - node.parentNode = this; - return node; - } - - - }, - - /** - * 在传入节点的前面插入一个节点 - * @method insertBefore - * @param { UE.uNode } target 要插入的节点 - * @param { UE.uNode } source 在该参数节点前面插入 - * @return { UE.uNode } 返回刚插入的子节点 - * @example - * ```javascript - * node.parentNode.insertBefore(newNode, node); //在node节点后面插入newNode - * ``` - */ - insertBefore:function (target, source) { - if (this.children) { - if(target.parentNode){ - target.parentNode.removeChild(target); - } - for (var i = 0, ci; ci = this.children[i]; i++) { - if (ci === source) { - this.children.splice(i, 0, target); - target.parentNode = this; - return target; - } - } - - } - }, - - /** - * 在传入节点的后面插入一个节点 - * @method insertAfter - * @param { UE.uNode } target 要插入的节点 - * @param { UE.uNode } source 在该参数节点后面插入 - * @return { UE.uNode } 返回刚插入的子节点 - * @example - * ```javascript - * node.parentNode.insertAfter(newNode, node); //在node节点后面插入newNode - * ``` - */ - insertAfter:function (target, source) { - if (this.children) { - if(target.parentNode){ - target.parentNode.removeChild(target); - } - for (var i = 0, ci; ci = this.children[i]; i++) { - if (ci === source) { - this.children.splice(i + 1, 0, target); - target.parentNode = this; - return target; - } - - } - } - }, - - /** - * 从当前节点的子节点列表中,移除节点 - * @method removeChild - * @param { UE.uNode } node 要移除的节点引用 - * @param { Boolean } keepChildren 是否保留移除节点的子节点,若传入true,自动把移除节点的子节点插入到移除的位置 - * @return { * } 返回刚移除的子节点 - * @example - * ```javascript - * node.removeChild(childNode,true); //在node的子节点列表中移除child节点,并且吧child的子节点插入到移除的位置 - * ``` - */ - removeChild:function (node,keepChildren) { - if (this.children) { - for (var i = 0, ci; ci = this.children[i]; i++) { - if (ci === node) { - this.children.splice(i, 1); - ci.parentNode = null; - if(keepChildren && ci.children && ci.children.length){ - for(var j= 0,cj;cj=ci.children[j];j++){ - this.children.splice(i+j,0,cj); - cj.parentNode = this; - - } - } - return ci; - } - } - } - }, - - /** - * 获取当前节点所代表的元素属性,即获取attrs对象下的属性值 - * @method getAttr - * @param { String } attrName 要获取的属性名称 - * @return { * } 返回attrs对象下的属性值 - * @example - * ```javascript - * node.getAttr('title'); - * ``` - */ - getAttr:function (attrName) { - return this.attrs && this.attrs[attrName.toLowerCase()] - }, - - /** - * 设置当前节点所代表的元素属性,即设置attrs对象下的属性值 - * @method setAttr - * @param { String } attrName 要设置的属性名称 - * @param { * } attrVal 要设置的属性值,类型视设置的属性而定 - * @return { * } 返回attrs对象下的属性值 - * @example - * ```javascript - * node.setAttr('title','标题'); - * ``` - */ - setAttr:function (attrName, attrVal) { - if (!attrName) { - delete this.attrs; - return; - } - if(!this.attrs){ - this.attrs = {}; - } - if (utils.isObject(attrName)) { - for (var a in attrName) { - if (!attrName[a]) { - delete this.attrs[a] - } else { - this.attrs[a.toLowerCase()] = attrName[a]; - } - } - } else { - if (!attrVal) { - delete this.attrs[attrName] - } else { - this.attrs[attrName.toLowerCase()] = attrVal; - } - - } - }, - - /** - * 获取当前节点在父节点下的位置索引 - * @method getIndex - * @return { Number } 返回索引数值,如果没有父节点,返回-1 - * @example - * ```javascript - * node.getIndex(); - * ``` - */ - getIndex:function(){ - var parent = this.parentNode; - for(var i= 0,ci;ci=parent.children[i];i++){ - if(ci === this){ - return i; - } - } - return -1; - }, - - /** - * 在当前节点下,根据id查找节点 - * @method getNodeById - * @param { String } id 要查找的id - * @return { UE.uNode } 返回找到的节点 - * @example - * ```javascript - * node.getNodeById('textId'); - * ``` - */ - getNodeById:function (id) { - var node; - if (this.children && this.children.length) { - for (var i = 0, ci; ci = this.children[i++];) { - if (node = getNodeById(ci, id)) { - return node; - } - } - } - }, - - /** - * 在当前节点下,根据元素名称查找节点列表 - * @method getNodesByTagName - * @param { String } tagNames 要查找的元素名称 - * @return { Array } 返回找到的节点列表 - * @example - * ```javascript - * node.getNodesByTagName('span'); - * ``` - */ - getNodesByTagName:function (tagNames) { - tagNames = utils.trim(tagNames).replace(/[ ]{2,}/g, ' ').split(' '); - var arr = [], me = this; - utils.each(tagNames, function (tagName) { - if (me.children && me.children.length) { - for (var i = 0, ci; ci = me.children[i++];) { - getNodesByTagName(ci, tagName, arr) - } - } - }); - return arr; - }, - - /** - * 根据样式名称,获取节点的样式值 - * @method getStyle - * @param { String } name 要获取的样式名称 - * @return { String } 返回样式值 - * @example - * ```javascript - * node.getStyle('font-size'); - * ``` - */ - getStyle:function (name) { - var cssStyle = this.getAttr('style'); - if (!cssStyle) { - return '' - } - var reg = new RegExp('(^|;)\\s*' + name + ':([^;]+)','i'); - var match = cssStyle.match(reg); - if (match && match[0]) { - return match[2] - } - return ''; - }, - - /** - * 给节点设置样式 - * @method setStyle - * @param { String } name 要设置的的样式名称 - * @param { String } val 要设置的的样值 - * @example - * ```javascript - * node.setStyle('font-size', '12px'); - * ``` - */ - setStyle:function (name, val) { - function exec(name, val) { - var reg = new RegExp('(^|;)\\s*' + name + ':([^;]+;?)', 'gi'); - cssStyle = cssStyle.replace(reg, '$1'); - if (val) { - cssStyle = name + ':' + utils.unhtml(val) + ';' + cssStyle - } - - } - - var cssStyle = this.getAttr('style'); - if (!cssStyle) { - cssStyle = ''; - } - if (utils.isObject(name)) { - for (var a in name) { - exec(a, name[a]) - } - } else { - exec(name, val) - } - this.setAttr('style', utils.trim(cssStyle)) - }, - - /** - * 传入一个函数,递归遍历当前节点下的所有节点 - * @method traversal - * @param { Function } fn 遍历到节点的时,传入节点作为参数,运行此函数 - * @example - * ```javascript - * traversal(node, function(){ - * console.log(node.type); - * }); - * ``` - */ - traversal:function(fn){ - if(this.children && this.children.length){ - nodeTraversal(this,fn); - } - return this; - } - } -})(); - - -// core/htmlparser.js -/** - * html字符串转换成uNode节点 - * @file - * @module UE - * @since 1.2.6.1 - */ - -/** - * UEditor公用空间,UEditor所有的功能都挂载在该空间下 - * @unfile - * @module UE - */ - -/** - * html字符串转换成uNode节点的静态方法 - * @method htmlparser - * @param { String } htmlstr 要转换的html代码 - * @param { Boolean } ignoreBlank 若设置为true,转换的时候忽略\n\r\t等空白字符 - * @return { uNode } 给定的html片段转换形成的uNode对象 - * @example - * ```javascript - * var root = UE.htmlparser('

    htmlparser

    ', true); - * ``` - */ - -var htmlparser = UE.htmlparser = function (htmlstr,ignoreBlank) { - //todo 原来的方式 [^"'<>\/] 有\/就不能配对上 ') - } - html.push('') - } - //禁止指定table-width - return '
    这样的标签了 - //先去掉了,加上的原因忘了,这里先记录 - var re_tag = /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\s\/<>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g, - re_attr = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g; - - //ie下取得的html可能会有\n存在,要去掉,在处理replace(/[\t\r\n]*/g,'');代码高量的\n不能去除 - var allowEmptyTags = { - b:1,code:1,i:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,span:1, - sub:1,img:1,sup:1,font:1,big:1,small:1,iframe:1,a:1,br:1,pre:1 - }; - try { - htmlstr = htmlstr.replace(new RegExp(domUtils.fillChar, 'g'), ''); - } catch (error) { - - } - if(!ignoreBlank){ - try { - htmlstr = htmlstr.replace(new RegExp('[\\r\\t\\n'+(ignoreBlank?'':' ')+']*<\/?(\\w+)\\s*(?:[^>]*)>[\\r\\t\\n'+(ignoreBlank?'':' ')+']*','g'), function(a,b){ - //br暂时单独处理 - if(b && allowEmptyTags[b.toLowerCase()]){ - return a.replace(/(^[\n\r]+)|([\n\r]+$)/g,''); - } - return a.replace(new RegExp('^[\\r\\n'+(ignoreBlank?'':' ')+']+'),'').replace(new RegExp('[\\r\\n'+(ignoreBlank?'':' ')+']+$'),''); - }); - } catch (error) { - - } - } - - var notTransAttrs = { - 'href':1, - 'src':1 - }; - - var uNode = UE.uNode, - needParentNode = { - 'td':'tr', - 'tr':['tbody','thead','tfoot'], - 'tbody':'table', - 'th':'tr', - 'thead':'table', - 'tfoot':'table', - 'caption':'table', - 'li':['ul', 'ol'], - 'dt':'dl', - 'dd':'dl', - 'option':'select' - }, - needChild = { - 'ol':'li', - 'ul':'li' - }; - - function text(parent, data) { - - if(needChild[parent.tagName]){ - var tmpNode = uNode.createElement(needChild[parent.tagName]); - parent.appendChild(tmpNode); - tmpNode.appendChild(uNode.createText(data)); - parent = tmpNode; - }else{ - - parent.appendChild(uNode.createText(data)); - } - } - - function element(parent, tagName, htmlattr) { - var needParentTag; - if (needParentTag = needParentNode[tagName]) { - var tmpParent = parent,hasParent; - while(tmpParent.type != 'root'){ - if(utils.isArray(needParentTag) ? utils.indexOf(needParentTag, tmpParent.tagName) != -1 : needParentTag == tmpParent.tagName){ - parent = tmpParent; - hasParent = true; - break; - } - tmpParent = tmpParent.parentNode; - } - if(!hasParent){ - parent = element(parent, utils.isArray(needParentTag) ? needParentTag[0] : needParentTag) - } - } - //按dtd处理嵌套 -// if(parent.type != 'root' && !dtd[parent.tagName][tagName]) -// parent = parent.parentNode; - var elm = new uNode({ - parentNode:parent, - type:'element', - tagName:tagName.toLowerCase(), - //是自闭合的处理一下 - children:dtd.$empty[tagName] ? null : [] - }); - //如果属性存在,处理属性 - if (htmlattr) { - var attrs = {}, match; - while (match = re_attr.exec(htmlattr)) { - attrs[match[1].toLowerCase()] = notTransAttrs[match[1].toLowerCase()] ? (match[2] || match[3] || match[4]) : utils.unhtml(match[2] || match[3] || match[4]) - } - elm.attrs = attrs; - } - //trace:3970 -// //如果parent下不能放elm -// if(dtd.$inline[parent.tagName] && dtd.$block[elm.tagName] && !dtd[parent.tagName][elm.tagName]){ -// parent = parent.parentNode; -// elm.parentNode = parent; -// } - parent.children.push(elm); - //如果是自闭合节点返回父亲节点 - return dtd.$empty[tagName] ? parent : elm - } - - function comment(parent, data) { - parent.children.push(new uNode({ - type:'comment', - data:data, - parentNode:parent - })); - } - - var match, currentIndex = 0, nextIndex = 0; - //设置根节点 - var root = new uNode({ - type:'root', - children:[] - }); - var currentParent = root; - - while (match = re_tag.exec(htmlstr)) { - currentIndex = match.index; - try{ - if (currentIndex > nextIndex) { - //text node - text(currentParent, htmlstr.slice(nextIndex, currentIndex)); - } - if (match[3]) { - - if(dtd.$cdata[currentParent.tagName]){ - text(currentParent, match[0]); - }else{ - //start tag - currentParent = element(currentParent, match[3].toLowerCase(), match[4]); - } - - - } else if (match[1]) { - if(currentParent.type != 'root'){ - if(dtd.$cdata[currentParent.tagName] && !dtd.$cdata[match[1]]){ - text(currentParent, match[0]); - }else{ - var tmpParent = currentParent; - while(currentParent.type == 'element' && currentParent.tagName != match[1].toLowerCase()){ - currentParent = currentParent.parentNode; - if(currentParent.type == 'root'){ - currentParent = tmpParent; - throw 'break' - } - } - //end tag - currentParent = currentParent.parentNode; - } - - } - - } else if (match[2]) { - //comment - comment(currentParent, match[2]) - } - }catch(e){} - - nextIndex = re_tag.lastIndex; - - } - //如果结束是文本,就有可能丢掉,所以这里手动判断一下 - //例如
  • sdfsdfsdf
  • sdfsdfsdfsdf - if (nextIndex < htmlstr.length) { - text(currentParent, htmlstr.slice(nextIndex)); - } - return root; -}; - - -// core/filternode.js -/** - * UE过滤节点的静态方法 - * @file - */ - -/** - * UEditor公用空间,UEditor所有的功能都挂载在该空间下 - * @module UE - */ - - -/** - * 根据传入节点和过滤规则过滤相应节点 - * @module UE - * @since 1.2.6.1 - * @method filterNode - * @param { Object } root 指定root节点 - * @param { Object } rules 过滤规则json对象 - * @example - * ```javascript - * UE.filterNode(root,editor.options.filterRules); - * ``` - */ -var filterNode = UE.filterNode = function () { - function filterNode(node,rules){ - switch (node.type) { - case 'text': - break; - case 'element': - var val; - if(val = rules[node.tagName]){ - if(val === '-'){ - node.parentNode.removeChild(node) - }else if(utils.isFunction(val)){ - var parentNode = node.parentNode, - index = node.getIndex(); - val(node); - if(node.parentNode){ - if(node.children){ - for(var i = 0,ci;ci=node.children[i];){ - filterNode(ci,rules); - if(ci.parentNode){ - i++; - } - } - } - }else{ - for(var i = index,ci;ci=parentNode.children[i];){ - filterNode(ci,rules); - if(ci.parentNode){ - i++; - } - } - } - - - }else{ - var attrs = val['$']; - if(attrs && node.attrs){ - var tmpAttrs = {},tmpVal; - for(var a in attrs){ - tmpVal = node.getAttr(a); - //todo 只先对style单独处理 - if(a == 'style' && utils.isArray(attrs[a])){ - var tmpCssStyle = []; - utils.each(attrs[a],function(v){ - var tmp; - if(tmp = node.getStyle(v)){ - tmpCssStyle.push(v + ':' + tmp); - } - }); - tmpVal = tmpCssStyle.join(';') - } - if(tmpVal){ - tmpAttrs[a] = tmpVal; - } - - } - node.attrs = tmpAttrs; - } - if(node.children){ - for(var i = 0,ci;ci=node.children[i];){ - filterNode(ci,rules); - if(ci.parentNode){ - i++; - } - } - } - } - }else{ - //如果不在名单里扣出子节点并删除该节点,cdata除外 - if(dtd.$cdata[node.tagName]){ - node.parentNode.removeChild(node) - }else{ - var parentNode = node.parentNode, - index = node.getIndex(); - node.parentNode.removeChild(node,true); - for(var i = index,ci;ci=parentNode.children[i];){ - filterNode(ci,rules); - if(ci.parentNode){ - i++; - } - } - } - } - break; - case 'comment': - node.parentNode.removeChild(node) - } - - } - return function(root,rules){ - if(utils.isEmptyObject(rules)){ - return root; - } - var val; - if(val = rules['-']){ - utils.each(val.split(' '),function(k){ - rules[k] = '-' - }) - } - for(var i= 0,ci;ci=root.children[i];){ - filterNode(ci,rules); - if(ci.parentNode){ - i++; - } - } - return root; - } -}(); - -// core/plugin.js -/** - * Created with JetBrains PhpStorm. - * User: campaign - * Date: 10/8/13 - * Time: 6:15 PM - * To change this template use File | Settings | File Templates. - */ -UE.plugin = function(){ - var _plugins = {}; - return { - register : function(pluginName,fn,oldOptionName,afterDisabled){ - if(oldOptionName && utils.isFunction(oldOptionName)){ - afterDisabled = oldOptionName; - oldOptionName = null - } - _plugins[pluginName] = { - optionName : oldOptionName || pluginName, - execFn : fn, - //当插件被禁用时执行 - afterDisabled : afterDisabled - } - }, - load : function(editor){ - utils.each(_plugins,function(plugin){ - var _export = plugin.execFn.call(editor); - if(editor.options[plugin.optionName] !== false){ - if(_export){ - //后边需要再做扩展 - utils.each(_export,function(v,k){ - switch(k.toLowerCase()){ - case 'shortcutkey': - editor.addshortcutkey(v); - break; - case 'bindevents': - utils.each(v,function(fn,eventName){ - editor.addListener(eventName,fn); - }); - break; - case 'bindmultievents': - utils.each(utils.isArray(v) ? v:[v],function(event){ - var types = utils.trim(event.type).split(/\s+/); - utils.each(types,function(eventName){ - editor.addListener(eventName, event.handler); - }); - }); - break; - case 'commands': - utils.each(v,function(execFn,execName){ - editor.commands[execName] = execFn - }); - break; - case 'outputrule': - editor.addOutputRule(v); - break; - case 'inputrule': - editor.addInputRule(v); - break; - case 'defaultoptions': - editor.setOpt(v) - } - }) - } - - }else if(plugin.afterDisabled){ - plugin.afterDisabled.call(editor) - } - - }); - //向下兼容 - utils.each(UE.plugins,function(plugin){ - plugin.call(editor); - }); - }, - run : function(pluginName,editor){ - var plugin = _plugins[pluginName]; - if(plugin){ - plugin.exeFn.call(editor) - } - } - } -}(); - -// core/keymap.js -var keymap = UE.keymap = { - 'Backspace' : 8, - 'Tab' : 9, - 'Enter' : 13, - - 'Shift':16, - 'Control':17, - 'Alt':18, - 'CapsLock':20, - - 'Esc':27, - - 'Spacebar':32, - - 'PageUp':33, - 'PageDown':34, - 'End':35, - 'Home':36, - - 'Left':37, - 'Up':38, - 'Right':39, - 'Down':40, - - 'Insert':45, - - 'Del':46, - - 'NumLock':144, - - 'Cmd':91, - - '=':187, - '-':189, - - "b":66, - 'i':73, - //回退 - 'z':90, - 'y':89, - //粘贴 - 'v' : 86, - 'x' : 88, - - 's' : 83, - - 'n' : 78 -}; - -// core/localstorage.js -//存储媒介封装 -var LocalStorage = UE.LocalStorage = (function () { - - var storage = window.localStorage || getUserData() || null, - LOCAL_FILE = 'localStorage'; - - return { - - saveLocalData: function (key, data) { - - if (storage && data) { - storage.setItem(key, data); - return true; - } - - return false; - - }, - - getLocalData: function (key) { - - if (storage) { - return storage.getItem(key); - } - - return null; - - }, - - removeItem: function (key) { - - storage && storage.removeItem(key); - - } - - }; - - function getUserData() { - - var container = document.createElement("div"); - container.style.display = "none"; - - if (!container.addBehavior) { - return null; - } - - container.addBehavior("#default#userdata"); - - return { - - getItem: function (key) { - - var result = null; - - try { - document.body.appendChild(container); - container.load(LOCAL_FILE); - result = container.getAttribute(key); - document.body.removeChild(container); - } catch (e) { - } - - return result; - - }, - - setItem: function (key, value) { - - document.body.appendChild(container); - container.setAttribute(key, value); - container.save(LOCAL_FILE); - document.body.removeChild(container); - - }, - - //// 暂时没有用到 - //clear: function () { - // - // var expiresTime = new Date(); - // expiresTime.setFullYear(expiresTime.getFullYear() - 1); - // document.body.appendChild(container); - // container.expires = expiresTime.toUTCString(); - // container.save(LOCAL_FILE); - // document.body.removeChild(container); - // - //}, - - removeItem: function (key) { - - document.body.appendChild(container); - container.removeAttribute(key); - container.save(LOCAL_FILE); - document.body.removeChild(container); - - } - - }; - - } - -})(); - -(function () { - - var ROOTKEY = 'ueditor_preference'; - - UE.Editor.prototype.setPreferences = function(key,value){ - var obj = {}; - if (utils.isString(key)) { - obj[ key ] = value; - } else { - obj = key; - } - var data = LocalStorage.getLocalData(ROOTKEY); - if (data && (data = utils.str2json(data))) { - utils.extend(data, obj); - } else { - data = obj; - } - data && LocalStorage.saveLocalData(ROOTKEY, utils.json2str(data)); - }; - - UE.Editor.prototype.getPreferences = function(key){ - var data = LocalStorage.getLocalData(ROOTKEY); - if (data && (data = utils.str2json(data))) { - return key ? data[key] : data - } - return null; - }; - - UE.Editor.prototype.removePreferences = function (key) { - var data = LocalStorage.getLocalData(ROOTKEY); - if (data && (data = utils.str2json(data))) { - data[key] = undefined; - delete data[key] - } - data && LocalStorage.saveLocalData(ROOTKEY, utils.json2str(data)); - }; - -})(); - - -// plugins/defaultfilter.js -///import core -///plugin 编辑器默认的过滤转换机制 - -UE.plugins['defaultfilter'] = function () { - var me = this; - me.setOpt({ - 'allowDivTransToP':true, - 'disabledTableInTable':true - }); - //默认的过滤处理 - //进入编辑器的内容处理 - me.addInputRule(function (root) { - var allowDivTransToP = this.options.allowDivTransToP; - var val; - function tdParent(node){ - while(node && node.type == 'element'){ - if(node.tagName == 'td'){ - return true; - } - node = node.parentNode; - } - return false; - } - //进行默认的处理 - root.traversal(function (node) { - if (node.type == 'element') { - if (!dtd.$cdata[node.tagName] && me.options.autoClearEmptyNode && dtd.$inline[node.tagName] && !dtd.$empty[node.tagName] && (!node.attrs || utils.isEmptyObject(node.attrs))) { - if (!node.firstChild()) node.parentNode.removeChild(node); - else if (node.tagName == 'span' && (!node.attrs || utils.isEmptyObject(node.attrs))) { - node.parentNode.removeChild(node, true) - } - return; - } - switch (node.tagName) { - case 'style': - case 'script': - node.setAttr({ - cdata_tag: node.tagName, - cdata_data: (node.innerHTML() || ''), - '_ue_custom_node_':'true' - }); - node.tagName = 'div'; - node.innerHTML(''); - break; - case 'a': - if (val = node.getAttr('href')) { - node.setAttr('_href', val) - } - break; - case 'img': - //todo base64暂时去掉,后边做远程图片上传后,干掉这个 - if (val = node.getAttr('src')) { - if (/^data:/.test(val)) { - node.parentNode.removeChild(node); - break; - } - } - node.setAttr('_src', node.getAttr('src')); - break; - case 'span': - if (browser.webkit && (val = node.getStyle('white-space'))) { - if (/nowrap|normal/.test(val)) { - node.setStyle('white-space', ''); - if (me.options.autoClearEmptyNode && utils.isEmptyObject(node.attrs)) { - node.parentNode.removeChild(node, true) - } - } - } - val = node.getAttr('id'); - if(val && /^_baidu_bookmark_/i.test(val)){ - node.parentNode.removeChild(node) - } - break; - case 'p': - if (val = node.getAttr('align')) { - node.setAttr('align'); - node.setStyle('text-align', val) - } - //trace:3431 -// var cssStyle = node.getAttr('style'); -// if (cssStyle) { -// cssStyle = cssStyle.replace(/(margin|padding)[^;]+/g, ''); -// node.setAttr('style', cssStyle) -// -// } - //p标签不允许嵌套 - utils.each(node.children,function(n){ - if(n.type == 'element' && n.tagName == 'p'){ - var next = n.nextSibling(); - node.parentNode.insertAfter(n,node); - var last = n; - while(next){ - var tmp = next.nextSibling(); - node.parentNode.insertAfter(next,last); - last = next; - next = tmp; - } - return false; - } - }); - if (!node.firstChild()) { - node.innerHTML(browser.ie ? ' ' : '
    ') - } - break; - case 'div': - if(node.getAttr('cdata_tag')){ - break; - } - //针对代码这里不处理插入代码的div - val = node.getAttr('class'); - if(val && /^line number\d+/.test(val)){ - break; - } - if(!allowDivTransToP){ - break; - } - var tmpNode, p = UE.uNode.createElement('p'); - while (tmpNode = node.firstChild()) { - if (tmpNode.type == 'text' || !UE.dom.dtd.$block[tmpNode.tagName]) { - p.appendChild(tmpNode); - } else { - if (p.firstChild()) { - node.parentNode.insertBefore(p, node); - p = UE.uNode.createElement('p'); - } else { - node.parentNode.insertBefore(tmpNode, node); - } - } - } - if (p.firstChild()) { - node.parentNode.insertBefore(p, node); - } - node.parentNode.removeChild(node); - break; - case 'dl': - node.tagName = 'ul'; - break; - case 'dt': - case 'dd': - node.tagName = 'li'; - break; - case 'li': - var className = node.getAttr('class'); - if (!className || !/list\-/.test(className)) { - node.setAttr() - } - var tmpNodes = node.getNodesByTagName('ol ul'); - UE.utils.each(tmpNodes, function (n) { - node.parentNode.insertAfter(n, node); - }); - break; - case 'td': - case 'th': - case 'caption': - if(!node.children || !node.children.length){ - node.appendChild(browser.ie11below ? UE.uNode.createText(' ') : UE.uNode.createElement('br')) - } - break; - case 'table': - if(me.options.disabledTableInTable && tdParent(node)){ - node.parentNode.insertBefore(UE.uNode.createText(node.innerText()),node); - node.parentNode.removeChild(node) - } - } - - } -// if(node.type == 'comment'){ -// node.parentNode.removeChild(node); -// } - }) - - }); - - //从编辑器出去的内容处理 - me.addOutputRule(function (root) { - - var val; - root.traversal(function (node) { - if (node.type == 'element') { - - if (me.options.autoClearEmptyNode && dtd.$inline[node.tagName] && !dtd.$empty[node.tagName] && (!node.attrs || utils.isEmptyObject(node.attrs))) { - - if (!node.firstChild()) node.parentNode.removeChild(node); - else if (node.tagName == 'span' && (!node.attrs || utils.isEmptyObject(node.attrs))) { - node.parentNode.removeChild(node, true) - } - return; - } - switch (node.tagName) { - case 'div': - if (val = node.getAttr('cdata_tag')) { - node.tagName = val; - node.appendChild(UE.uNode.createText(node.getAttr('cdata_data'))); - node.setAttr({cdata_tag: '', cdata_data: '','_ue_custom_node_':''}); - } - break; - case 'a': - if (val = node.getAttr('_href')) { - node.setAttr({ - 'href': utils.html(val), - '_href': '' - }) - } - break; - break; - case 'span': - val = node.getAttr('id'); - if(val && /^_baidu_bookmark_/i.test(val)){ - node.parentNode.removeChild(node) - } - break; - case 'img': - if (val = node.getAttr('_src')) { - node.setAttr({ - 'src': node.getAttr('_src'), - '_src': '' - }) - } - - - } - } - - }) - - - }); -}; - - -// plugins/inserthtml.js -/** - * 插入html字符串插件 - * @file - * @since 1.2.6.1 - */ - -/** - * 插入html代码 - * @command inserthtml - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } html 插入的html字符串 - * @remaind 插入的标签内容是在当前的选区位置上插入,如果当前是闭合状态,那直接插入内容, 如果当前是选中状态,将先清除当前选中内容后,再做插入 - * @warning 注意:该命令会对当前选区的位置,对插入的内容进行过滤转换处理。 过滤的规则遵循html语意化的原则。 - * @example - * ```javascript - * //xxx[BB]xxx 当前选区为非闭合选区,选中BB这两个文本 - * //执行命令,插入CC - * //插入后的效果 xxxCCxxx - * //

    xx|xxx

    当前选区为闭合状态 - * //插入

    CC

    - * //结果

    xx

    CC

    xxx

    - * //

    xxxx

    |

    xxx

    当前选区在两个p标签之间 - * //插入 xxxx - * //结果

    xxxx

    xxxx

    xxx

    - * ``` - */ - -UE.commands['inserthtml'] = { - execCommand: function (command,html,notNeedFilter){ - var me = this, - range, - div; - if(!html){ - return; - } - if(me.fireEvent('beforeinserthtml',html) === true){ - return; - } - range = me.selection.getRange(); - div = range.document.createElement( 'div' ); - div.style.display = 'inline'; - - if (!notNeedFilter) { - var root = UE.htmlparser(html); - //如果给了过滤规则就先进行过滤 - if(me.options.filterRules){ - UE.filterNode(root,me.options.filterRules); - } - //执行默认的处理 - me.filterInputRule(root); - html = root.toHtml() - } - div.innerHTML = utils.trim( html ); - - if ( !range.collapsed ) { - var tmpNode = range.startContainer; - if(domUtils.isFillChar(tmpNode)){ - range.setStartBefore(tmpNode) - } - tmpNode = range.endContainer; - if(domUtils.isFillChar(tmpNode)){ - range.setEndAfter(tmpNode) - } - range.txtToElmBoundary(); - //结束边界可能放到了br的前边,要把br包含进来 - // x[xxx]
    - if(range.endContainer && range.endContainer.nodeType == 1){ - tmpNode = range.endContainer.childNodes[range.endOffset]; - if(tmpNode && domUtils.isBr(tmpNode)){ - range.setEndAfter(tmpNode); - } - } - if(range.startOffset == 0){ - tmpNode = range.startContainer; - if(domUtils.isBoundaryNode(tmpNode,'firstChild') ){ - tmpNode = range.endContainer; - if(range.endOffset == (tmpNode.nodeType == 3 ? tmpNode.nodeValue.length : tmpNode.childNodes.length) && domUtils.isBoundaryNode(tmpNode,'lastChild')){ - me.body.innerHTML = '

    '+(browser.ie ? '' : '
    ')+'

    '; - range.setStart(me.body.firstChild,0).collapse(true) - - } - } - } - !range.collapsed && range.deleteContents(); - if(range.startContainer.nodeType == 1){ - var child = range.startContainer.childNodes[range.startOffset],pre; - if(child && domUtils.isBlockElm(child) && (pre = child.previousSibling) && domUtils.isBlockElm(pre)){ - range.setEnd(pre,pre.childNodes.length).collapse(); - while(child.firstChild){ - pre.appendChild(child.firstChild); - } - domUtils.remove(child); - } - } - - } - - - var child,parent,pre,tmp,hadBreak = 0, nextNode; - //如果当前位置选中了fillchar要干掉,要不会产生空行 - if(range.inFillChar()){ - child = range.startContainer; - if(domUtils.isFillChar(child)){ - range.setStartBefore(child).collapse(true); - domUtils.remove(child); - }else if(domUtils.isFillChar(child,true)){ - child.nodeValue = child.nodeValue.replace(fillCharReg,''); - range.startOffset--; - range.collapsed && range.collapse(true) - } - } - //列表单独处理 - var li = domUtils.findParentByTagName(range.startContainer,'li',true); - if(li){ - var next,last; - while(child = div.firstChild){ - //针对hr单独处理一下先 - while(child && (child.nodeType == 3 || !domUtils.isBlockElm(child) || child.tagName=='HR' )){ - next = child.nextSibling; - range.insertNode( child).collapse(); - last = child; - child = next; - - } - if(child){ - if(/^(ol|ul)$/i.test(child.tagName)){ - while(child.firstChild){ - last = child.firstChild; - domUtils.insertAfter(li,child.firstChild); - li = li.nextSibling; - } - domUtils.remove(child) - }else{ - var tmpLi; - next = child.nextSibling; - tmpLi = me.document.createElement('li'); - domUtils.insertAfter(li,tmpLi); - tmpLi.appendChild(child); - last = child; - child = next; - li = tmpLi; - } - } - } - li = domUtils.findParentByTagName(range.startContainer,'li',true); - if(domUtils.isEmptyBlock(li)){ - domUtils.remove(li) - } - if(last){ - - range.setStartAfter(last).collapse(true).select(true) - } - }else{ - while ( child = div.firstChild ) { - if(hadBreak){ - var p = me.document.createElement('p'); - while(child && (child.nodeType == 3 || !dtd.$block[child.tagName])){ - nextNode = child.nextSibling; - p.appendChild(child); - child = nextNode; - } - if(p.firstChild){ - - child = p - } - } - range.insertNode( child ); - nextNode = child.nextSibling; - if ( !hadBreak && child.nodeType == domUtils.NODE_ELEMENT && domUtils.isBlockElm( child ) ){ - - parent = domUtils.findParent( child,function ( node ){ return domUtils.isBlockElm( node ); } ); - if ( parent && parent.tagName.toLowerCase() != 'body' && !(dtd[parent.tagName][child.nodeName] && child.parentNode === parent)){ - if(!dtd[parent.tagName][child.nodeName]){ - pre = parent; - }else{ - tmp = child.parentNode; - while (tmp !== parent){ - pre = tmp; - tmp = tmp.parentNode; - - } - } - - - domUtils.breakParent( child, pre || tmp ); - //去掉break后前一个多余的节点

    |<[p> ==>

    |

    - var pre = child.previousSibling; - domUtils.trimWhiteTextNode(pre); - if(!pre.childNodes.length){ - domUtils.remove(pre); - } - //trace:2012,在非ie的情况,切开后剩下的节点有可能不能点入光标添加br占位 - - if(!browser.ie && - (next = child.nextSibling) && - domUtils.isBlockElm(next) && - next.lastChild && - !domUtils.isBr(next.lastChild)){ - next.appendChild(me.document.createElement('br')); - } - hadBreak = 1; - } - } - var next = child.nextSibling; - if(!div.firstChild && next && domUtils.isBlockElm(next)){ - - range.setStart(next,0).collapse(true); - break; - } - range.setEndAfter( child ).collapse(); - - } - - child = range.startContainer; - - if(nextNode && domUtils.isBr(nextNode)){ - domUtils.remove(nextNode) - } - //用chrome可能有空白展位符 - if(domUtils.isBlockElm(child) && domUtils.isEmptyNode(child)){ - if(nextNode = child.nextSibling){ - domUtils.remove(child); - if(nextNode.nodeType == 1 && dtd.$block[nextNode.tagName]){ - - range.setStart(nextNode,0).collapse(true).shrinkBoundary() - } - }else{ - - try{ - child.innerHTML = browser.ie ? domUtils.fillChar : '
    '; - }catch(e){ - range.setStartBefore(child); - domUtils.remove(child) - } - - } - - } - //加上true因为在删除表情等时会删两次,第一次是删的fillData - try{ - range.select(true); - }catch(e){} - - } - - - - setTimeout(function(){ - range = me.selection.getRange(); - range.scrollToView(me.autoHeightEnabled,me.autoHeightEnabled ? domUtils.getXY(me.iframe).y:0); - me.fireEvent('afterinserthtml', html); - },200); - } -}; - - -// plugins/autotypeset.js -/** - * 自动排版 - * @file - * @since 1.2.6.1 - */ - -/** - * 对当前编辑器的内容执行自动排版, 排版的行为根据config配置文件里的“autotypeset”选项进行控制。 - * @command autotypeset - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'autotypeset' ); - * ``` - */ - -UE.plugins['autotypeset'] = function(){ - - this.setOpt({'autotypeset': { - mergeEmptyline: true, //合并空行 - removeClass: true, //去掉冗余的class - removeEmptyline: false, //去掉空行 - textAlign:"left", //段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版 - imageBlockLine: 'center', //图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版 - pasteFilter: false, //根据规则过滤没事粘贴进来的内容 - clearFontSize: false, //去掉所有的内嵌字号,使用编辑器默认的字号 - clearFontFamily: false, //去掉所有的内嵌字体,使用编辑器默认的字体 - removeEmptyNode: false, // 去掉空节点 - //可以去掉的标签 - removeTagNames: utils.extend({div:1},dtd.$removeEmpty), - indent: false, // 行首缩进 - indentValue : '2em', //行首缩进的大小 - bdc2sb: false, - tobdc: false - }}); - - var me = this, - opt = me.options.autotypeset, - remainClass = { - 'selectTdClass':1, - 'pagebreak':1, - 'anchorclass':1 - }, - remainTag = { - 'li':1 - }, - tags = { - div:1, - p:1, - //trace:2183 这些也认为是行 - blockquote:1,center:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1, - span:1 - }, - highlightCont; - //升级了版本,但配置项目里没有autotypeset - if(!opt){ - return; - } - - readLocalOpts(); - - function isLine(node,notEmpty){ - if(!node || node.nodeType == 3) - return 0; - if(domUtils.isBr(node)) - return 1; - if(node && node.parentNode && tags[node.tagName.toLowerCase()]){ - if(highlightCont && highlightCont.contains(node) - || - node.getAttribute('pagebreak') - ){ - return 0; - } - - return notEmpty ? !domUtils.isEmptyBlock(node) : domUtils.isEmptyBlock(node,new RegExp('[\\s'+domUtils.fillChar - +']','g')); - } - } - - function removeNotAttributeSpan(node){ - if(!node.style.cssText){ - domUtils.removeAttributes(node,['style']); - if(node.tagName.toLowerCase() == 'span' && domUtils.hasNoAttributes(node)){ - domUtils.remove(node,true); - } - } - } - function autotype(type,html){ - - var me = this,cont; - if(html){ - if(!opt.pasteFilter){ - return; - } - cont = me.document.createElement('div'); - cont.innerHTML = html.html; - }else{ - cont = me.document.body; - } - var nodes = domUtils.getElementsByTagName(cont,'*'); - - // 行首缩进,段落方向,段间距,段内间距 - for(var i=0,ci;ci=nodes[i++];){ - - if(me.fireEvent('excludeNodeinautotype',ci) === true){ - continue; - } - //font-size - if(opt.clearFontSize && ci.style.fontSize){ - domUtils.removeStyle(ci,'font-size'); - - removeNotAttributeSpan(ci); - - } - //font-family - if(opt.clearFontFamily && ci.style.fontFamily){ - domUtils.removeStyle(ci,'font-family'); - removeNotAttributeSpan(ci); - } - - if(isLine(ci)){ - //合并空行 - if(opt.mergeEmptyline ){ - var next = ci.nextSibling,tmpNode,isBr = domUtils.isBr(ci); - while(isLine(next)){ - tmpNode = next; - next = tmpNode.nextSibling; - if(isBr && (!next || next && !domUtils.isBr(next))){ - break; - } - domUtils.remove(tmpNode); - } - - } - //去掉空行,保留占位的空行 - if(opt.removeEmptyline && domUtils.inDoc(ci,cont) && !remainTag[ci.parentNode.tagName.toLowerCase()] ){ - if(domUtils.isBr(ci)){ - next = ci.nextSibling; - if(next && !domUtils.isBr(next)){ - continue; - } - } - domUtils.remove(ci); - continue; - - } - - } - if(isLine(ci,true) && ci.tagName != 'SPAN'){ - if(opt.indent){ - ci.style.textIndent = opt.indentValue; - } - if(opt.textAlign){ - ci.style.textAlign = opt.textAlign; - } - // if(opt.lineHeight) - // ci.style.lineHeight = opt.lineHeight + 'cm'; - - } - - //去掉class,保留的class不去掉 - if(opt.removeClass && ci.className && !remainClass[ci.className.toLowerCase()]){ - - if(highlightCont && highlightCont.contains(ci)){ - continue; - } - domUtils.removeAttributes(ci,['class']); - } - - //表情不处理 - if(opt.imageBlockLine && ci.tagName.toLowerCase() == 'img' && !ci.getAttribute('emotion')){ - if(html){ - var img = ci; - switch (opt.imageBlockLine){ - case 'left': - case 'right': - case 'none': - var pN = img.parentNode,tmpNode,pre,next; - while(dtd.$inline[pN.tagName] || pN.tagName == 'A'){ - pN = pN.parentNode; - } - tmpNode = pN; - if(tmpNode.tagName == 'P' && domUtils.getStyle(tmpNode,'text-align') == 'center'){ - if(!domUtils.isBody(tmpNode) && domUtils.getChildCount(tmpNode,function(node){return !domUtils.isBr(node) && !domUtils.isWhitespace(node)}) == 1){ - pre = tmpNode.previousSibling; - next = tmpNode.nextSibling; - if(pre && next && pre.nodeType == 1 && next.nodeType == 1 && pre.tagName == next.tagName && domUtils.isBlockElm(pre)){ - pre.appendChild(tmpNode.firstChild); - while(next.firstChild){ - pre.appendChild(next.firstChild); - } - domUtils.remove(tmpNode); - domUtils.remove(next); - }else{ - domUtils.setStyle(tmpNode,'text-align',''); - } - - - } - - - } - domUtils.setStyle(img,'float', opt.imageBlockLine); - break; - case 'center': - if(me.queryCommandValue('imagefloat') != 'center'){ - pN = img.parentNode; - domUtils.setStyle(img,'float','none'); - tmpNode = img; - while(pN && domUtils.getChildCount(pN,function(node){return !domUtils.isBr(node) && !domUtils.isWhitespace(node)}) == 1 - && (dtd.$inline[pN.tagName] || pN.tagName == 'A')){ - tmpNode = pN; - pN = pN.parentNode; - } - var pNode = me.document.createElement('p'); - domUtils.setAttributes(pNode,{ - - style:'text-align:center' - }); - tmpNode.parentNode.insertBefore(pNode,tmpNode); - pNode.appendChild(tmpNode); - domUtils.setStyle(tmpNode,'float',''); - - } - - - } - } else { - var range = me.selection.getRange(); - range.selectNode(ci).select(); - me.execCommand('imagefloat', opt.imageBlockLine); - } - - } - - //去掉冗余的标签 - if(opt.removeEmptyNode){ - if(opt.removeTagNames[ci.tagName.toLowerCase()] && domUtils.hasNoAttributes(ci) && domUtils.isEmptyBlock(ci)){ - domUtils.remove(ci); - } - } - } - if(opt.tobdc){ - var root = UE.htmlparser(cont.innerHTML); - root.traversal(function(node){ - if(node.type == 'text'){ - node.data = ToDBC(node.data) - } - }); - cont.innerHTML = root.toHtml() - } - if(opt.bdc2sb){ - var root = UE.htmlparser(cont.innerHTML); - root.traversal(function(node){ - if(node.type == 'text'){ - node.data = DBC2SB(node.data) - } - }); - cont.innerHTML = root.toHtml() - } - if(html){ - html.html = cont.innerHTML; - } - } - if(opt.pasteFilter){ - me.addListener('beforepaste',autotype); - } - - function DBC2SB(str) { - var result = ''; - for (var i = 0; i < str.length; i++) { - var code = str.charCodeAt(i); //获取当前字符的unicode编码 - if (code >= 65281 && code <= 65373)//在这个unicode编码范围中的是所有的英文字母已经各种字符 - { - result += String.fromCharCode(str.charCodeAt(i) - 65248); //把全角字符的unicode编码转换为对应半角字符的unicode码 - } else if (code == 12288)//空格 - { - result += String.fromCharCode(str.charCodeAt(i) - 12288 + 32); - } else { - result += str.charAt(i); - } - } - return result; - } - function ToDBC(txtstring) { - txtstring = utils.html(txtstring); - var tmp = ""; - var mark = "";/*用于判断,如果是html尖括里的标记,则不进行全角的转换*/ - for (var i = 0; i < txtstring.length; i++) { - if (txtstring.charCodeAt(i) == 32) { - tmp = tmp + String.fromCharCode(12288); - } - else if (txtstring.charCodeAt(i) < 127) { - tmp = tmp + String.fromCharCode(txtstring.charCodeAt(i) + 65248); - } - else { - tmp += txtstring.charAt(i); - } - } - return tmp; - } - - function readLocalOpts() { - var cookieOpt = me.getPreferences('autotypeset'); - utils.extend(me.options.autotypeset, cookieOpt); - } - - me.commands['autotypeset'] = { - execCommand:function () { - me.removeListener('beforepaste',autotype); - if(opt.pasteFilter){ - me.addListener('beforepaste',autotype); - } - autotype.call(me) - } - - }; - -}; - - - -// plugins/autosubmit.js -/** - * 快捷键提交 - * @file - * @since 1.2.6.1 - */ - -/** - * 提交表单 - * @command autosubmit - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'autosubmit' ); - * ``` - */ - -UE.plugin.register('autosubmit',function(){ - return { - shortcutkey:{ - "autosubmit":"ctrl+13" //手动提交 - }, - commands:{ - 'autosubmit':{ - execCommand:function () { - var me=this, - form = domUtils.findParentByTagName(me.iframe,"form", false); - if (form){ - if(me.fireEvent("beforesubmit")===false){ - return; - } - me.sync(); - form.submit(); - } - } - } - } - } -}); - -// plugins/background.js -/** - * 背景插件,为UEditor提供设置背景功能 - * @file - * @since 1.2.6.1 - */ -UE.plugin.register('background', function () { - var me = this, - cssRuleId = 'editor_background', - isSetColored, - reg = new RegExp('body[\\s]*\\{(.+)\\}', 'i'); - - function stringToObj(str) { - var obj = {}, styles = str.split(';'); - utils.each(styles, function (v) { - var index = v.indexOf(':'), - key = utils.trim(v.substr(0, index)).toLowerCase(); - key && (obj[key] = utils.trim(v.substr(index + 1) || '')); - }); - return obj; - } - - function setBackground(obj) { - if (obj) { - var styles = []; - for (var name in obj) { - if (obj.hasOwnProperty(name)) { - styles.push(name + ":" + obj[name] + '; '); - } - } - utils.cssRule(cssRuleId, styles.length ? ('body{' + styles.join("") + '}') : '', me.document); - } else { - utils.cssRule(cssRuleId, '', me.document) - } - } - //重写editor.hasContent方法 - - var orgFn = me.hasContents; - me.hasContents = function(){ - if(me.queryCommandValue('background')){ - return true - } - return orgFn.apply(me,arguments); - }; - return { - bindEvents: { - 'getAllHtml': function (type, headHtml) { - var body = this.body, - su = domUtils.getComputedStyle(body, "background-image"), - url = ""; - if (su.indexOf(me.options.imagePath) > 0) { - url = su.substring(su.indexOf(me.options.imagePath), su.length - 1).replace(/"|\(|\)/ig, ""); - } else { - url = su != "none" ? su.replace(/url\("?|"?\)/ig, "") : ""; - } - var html = ' '; - headHtml.push(html); - }, - 'aftersetcontent': function () { - if(isSetColored == false) setBackground(); - } - }, - inputRule: function (root) { - isSetColored = false; - utils.each(root.getNodesByTagName('p'), function (p) { - var styles = p.getAttr('data-background'); - if (styles) { - isSetColored = true; - setBackground(stringToObj(styles)); - p.parentNode.removeChild(p); - } - }) - }, - outputRule: function (root) { - var me = this, - styles = (utils.cssRule(cssRuleId, me.document) || '').replace(/[\n\r]+/g, '').match(reg); - if (styles) { - root.appendChild(UE.uNode.createElement('


    ')); - } - }, - commands: { - 'background': { - execCommand: function (cmd, obj) { - setBackground(obj); - }, - queryCommandValue: function () { - var me = this, - styles = (utils.cssRule(cssRuleId, me.document) || '').replace(/[\n\r]+/g, '').match(reg); - return styles ? stringToObj(styles[1]) : null; - }, - notNeedUndo: true - } - } - } -}); - -// plugins/image.js -/** - * 图片插入、排版插件 - * @file - * @since 1.2.6.1 - */ - -/** - * 图片对齐方式 - * @command imagefloat - * @method execCommand - * @remind 值center为独占一行居中 - * @param { String } cmd 命令字符串 - * @param { String } align 对齐方式,可传left、right、none、center - * @remaind center表示图片独占一行 - * @example - * ```javascript - * editor.execCommand( 'imagefloat', 'center' ); - * ``` - */ - -/** - * 如果选区所在位置是图片区域 - * @command imagefloat - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回图片对齐方式 - * @example - * ```javascript - * editor.queryCommandValue( 'imagefloat' ); - * ``` - */ - -UE.commands['imagefloat'] = { - execCommand:function (cmd, align) { - var me = this, - range = me.selection.getRange(); - if (!range.collapsed) { - var img = range.getClosedNode(); - if (img && img.tagName == 'IMG') { - switch (align) { - case 'left': - case 'right': - case 'none': - var pN = img.parentNode, tmpNode, pre, next; - while (dtd.$inline[pN.tagName] || pN.tagName == 'A') { - pN = pN.parentNode; - } - tmpNode = pN; - if (tmpNode.tagName == 'P' && domUtils.getStyle(tmpNode, 'text-align') == 'center') { - if (!domUtils.isBody(tmpNode) && domUtils.getChildCount(tmpNode, function (node) { - return !domUtils.isBr(node) && !domUtils.isWhitespace(node); - }) == 1) { - pre = tmpNode.previousSibling; - next = tmpNode.nextSibling; - if (pre && next && pre.nodeType == 1 && next.nodeType == 1 && pre.tagName == next.tagName && domUtils.isBlockElm(pre)) { - pre.appendChild(tmpNode.firstChild); - while (next.firstChild) { - pre.appendChild(next.firstChild); - } - domUtils.remove(tmpNode); - domUtils.remove(next); - } else { - domUtils.setStyle(tmpNode, 'text-align', ''); - } - - - } - - range.selectNode(img).select(); - } - domUtils.setStyle(img, 'float', align == 'none' ? '' : align); - if(align == 'none'){ - domUtils.removeAttributes(img,'align'); - } - - break; - case 'center': - if (me.queryCommandValue('imagefloat') != 'center') { - pN = img.parentNode; - domUtils.setStyle(img, 'float', ''); - domUtils.removeAttributes(img,'align'); - tmpNode = img; - while (pN && domUtils.getChildCount(pN, function (node) { - return !domUtils.isBr(node) && !domUtils.isWhitespace(node); - }) == 1 - && (dtd.$inline[pN.tagName] || pN.tagName == 'A')) { - tmpNode = pN; - pN = pN.parentNode; - } - range.setStartBefore(tmpNode).setCursor(false); - pN = me.document.createElement('div'); - pN.appendChild(tmpNode); - domUtils.setStyle(tmpNode, 'float', ''); - - me.execCommand('insertHtml', '

    ' + pN.innerHTML + '

    '); - - tmpNode = me.document.getElementById('_img_parent_tmp'); - tmpNode.removeAttribute('id'); - tmpNode = tmpNode.firstChild; - range.selectNode(tmpNode).select(); - //去掉后边多余的元素 - next = tmpNode.parentNode.nextSibling; - if (next && domUtils.isEmptyNode(next)) { - domUtils.remove(next); - } - - } - - break; - } - - } - } - }, - queryCommandValue:function () { - var range = this.selection.getRange(), - startNode, floatStyle; - if (range.collapsed) { - return 'none'; - } - startNode = range.getClosedNode(); - if (startNode && startNode.nodeType == 1 && startNode.tagName == 'IMG') { - floatStyle = domUtils.getComputedStyle(startNode, 'float') || startNode.getAttribute('align'); - - if (floatStyle == 'none') { - floatStyle = domUtils.getComputedStyle(startNode.parentNode, 'text-align') == 'center' ? 'center' : floatStyle; - } - return { - left:1, - right:1, - center:1 - }[floatStyle] ? floatStyle : 'none'; - } - return 'none'; - - - }, - queryCommandState:function () { - var range = this.selection.getRange(), - startNode; - - if (range.collapsed) return -1; - - startNode = range.getClosedNode(); - if (startNode && startNode.nodeType == 1 && startNode.tagName == 'IMG') { - return 0; - } - return -1; - } -}; - - -/** - * 插入图片 - * @command insertimage - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { Object } opt 属性键值对,这些属性都将被复制到当前插入图片 - * @remind 该命令第二个参数可接受一个图片配置项对象的数组,可以插入多张图片, - * 此时数组的每一个元素都是一个Object类型的图片属性集合。 - * @example - * ```javascript - * editor.execCommand( 'insertimage', { - * src:'a/b/c.jpg', - * width:'100', - * height:'100' - * } ); - * ``` - * @example - * ```javascript - * editor.execCommand( 'insertimage', [{ - * src:'a/b/c.jpg', - * width:'100', - * height:'100' - * },{ - * src:'a/b/d.jpg', - * width:'100', - * height:'100' - * }] ); - * ``` - */ - -UE.commands['insertimage'] = { - execCommand:function (cmd, opt) { - - opt = utils.isArray(opt) ? opt : [opt]; - if (!opt.length) { - return; - } - var me = this, - range = me.selection.getRange(), - img = range.getClosedNode(); - - if(me.fireEvent('beforeinsertimage', opt) === true){ - return; - } - - function unhtmlData(imgCi) { - - utils.each('width,height,border,hspace,vspace'.split(','), function (item) { - - if (imgCi[item]) { - imgCi[item] = parseInt(imgCi[item], 10) || 0; - } - }); - - utils.each('src,_src'.split(','), function (item) { - - if (imgCi[item]) { - imgCi[item] = utils.unhtmlForUrl(imgCi[item]); - } - }); - utils.each('title,alt'.split(','), function (item) { - - if (imgCi[item]) { - imgCi[item] = utils.unhtml(imgCi[item]); - } - }); - } - - if (img && /img/i.test(img.tagName) && (img.className != "edui-faked-video" || img.className.indexOf("edui-upload-video")!=-1) && !img.getAttribute("word_img")) { - var first = opt.shift(); - var floatStyle = first['floatStyle']; - delete first['floatStyle']; -//// img.style.border = (first.border||0) +"px solid #000"; -//// img.style.margin = (first.margin||0) +"px"; -// img.style.cssText += ';margin:' + (first.margin||0) +"px;" + 'border:' + (first.border||0) +"px solid #000"; - domUtils.setAttributes(img, first); - me.execCommand('imagefloat', floatStyle); - if (opt.length > 0) { - range.setStartAfter(img).setCursor(false, true); - me.execCommand('insertimage', opt); - } - - } else { - var html = [], str = '', ci; - ci = opt[0]; - if (opt.length == 1) { - unhtmlData(ci); - - str = '' + ci.alt + ''; - if (ci['floatStyle'] == 'center') { - str = '

    ' + str + '

    '; - } - html.push(str); - - } else { - for (var i = 0; ci = opt[i++];) { - unhtmlData(ci); - str = '

    '; - html.push(str); - } - } - - me.execCommand('insertHtml', html.join('')); - } - - me.fireEvent('afterinsertimage', opt) - } -}; - - -// plugins/justify.js -/** - * 段落格式 - * @file - * @since 1.2.6.1 - */ - -/** - * 段落对齐方式 - * @command justify - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } align 对齐方式:left => 居左,right => 居右,center => 居中,justify => 两端对齐 - * @example - * ```javascript - * editor.execCommand( 'justify', 'center' ); - * ``` - */ -/** - * 如果选区所在位置是段落区域,返回当前段落对齐方式 - * @command justify - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回段落对齐方式 - * @example - * ```javascript - * editor.queryCommandValue( 'justify' ); - * ``` - */ - -UE.plugins['justify']=function(){ - var me=this, - block = domUtils.isBlockElm, - defaultValue = { - left:1, - right:1, - center:1, - justify:1 - }, - doJustify = function (range, style) { - var bookmark = range.createBookmark(), - filterFn = function (node) { - return node.nodeType == 1 ? node.tagName.toLowerCase() != 'br' && !domUtils.isBookmarkNode(node) : !domUtils.isWhitespace(node); - }; - - range.enlarge(true); - var bookmark2 = range.createBookmark(), - current = domUtils.getNextDomNode(bookmark2.start, false, filterFn), - tmpRange = range.cloneRange(), - tmpNode; - while (current && !(domUtils.getPosition(current, bookmark2.end) & domUtils.POSITION_FOLLOWING)) { - if (current.nodeType == 3 || !block(current)) { - tmpRange.setStartBefore(current); - while (current && current !== bookmark2.end && !block(current)) { - tmpNode = current; - current = domUtils.getNextDomNode(current, false, null, function (node) { - return !block(node); - }); - } - tmpRange.setEndAfter(tmpNode); - var common = tmpRange.getCommonAncestor(); - if (!domUtils.isBody(common) && block(common)) { - domUtils.setStyles(common, utils.isString(style) ? {'text-align':style} : style); - current = common; - } else { - var p = range.document.createElement('p'); - domUtils.setStyles(p, utils.isString(style) ? {'text-align':style} : style); - var frag = tmpRange.extractContents(); - p.appendChild(frag); - tmpRange.insertNode(p); - current = p; - } - current = domUtils.getNextDomNode(current, false, filterFn); - } else { - current = domUtils.getNextDomNode(current, true, filterFn); - } - } - return range.moveToBookmark(bookmark2).moveToBookmark(bookmark); - }; - - UE.commands['justify'] = { - execCommand:function (cmdName, align) { - var range = this.selection.getRange(), - txt; - - //闭合时单独处理 - if (range.collapsed) { - txt = this.document.createTextNode('p'); - range.insertNode(txt); - } - doJustify(range, align); - if (txt) { - range.setStartBefore(txt).collapse(true); - domUtils.remove(txt); - } - - range.select(); - - - return true; - }, - queryCommandValue:function () { - var startNode = this.selection.getStart(), - value = domUtils.getComputedStyle(startNode, 'text-align'); - return defaultValue[value] ? value : 'left'; - }, - queryCommandState:function () { - var start = this.selection.getStart(), - cell = start && domUtils.findParentByTagName(start, ["td", "th","caption"], true); - - return cell? -1:0; - } - - }; -}; - - -// plugins/font.js -/** - * 字体颜色,背景色,字号,字体,下划线,删除线 - * @file - * @since 1.2.6.1 - */ - -/** - * 字体颜色 - * @command forecolor - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } value 色值(必须十六进制) - * @example - * ```javascript - * editor.execCommand( 'forecolor', '#000' ); - * ``` - */ -/** - * 返回选区字体颜色 - * @command forecolor - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回字体颜色 - * @example - * ```javascript - * editor.queryCommandValue( 'forecolor' ); - * ``` - */ - -/** - * 字体背景颜色 - * @command backcolor - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } value 色值(必须十六进制) - * @example - * ```javascript - * editor.execCommand( 'backcolor', '#000' ); - * ``` - */ -/** - * 返回选区字体颜色 - * @command backcolor - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回字体背景颜色 - * @example - * ```javascript - * editor.queryCommandValue( 'backcolor' ); - * ``` - */ - -/** - * 字体大小 - * @command fontsize - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } value 字体大小 - * @example - * ```javascript - * editor.execCommand( 'fontsize', '14px' ); - * ``` - */ -/** - * 返回选区字体大小 - * @command fontsize - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回字体大小 - * @example - * ```javascript - * editor.queryCommandValue( 'fontsize' ); - * ``` - */ - -/** - * 字体样式 - * @command fontfamily - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } value 字体样式 - * @example - * ```javascript - * editor.execCommand( 'fontfamily', '微软雅黑' ); - * ``` - */ -/** - * 返回选区字体样式 - * @command fontfamily - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回字体样式 - * @example - * ```javascript - * editor.queryCommandValue( 'fontfamily' ); - * ``` - */ - -/** - * 字体下划线,与删除线互斥 - * @command underline - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'underline' ); - * ``` - */ - -/** - * 字体删除线,与下划线互斥 - * @command strikethrough - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'strikethrough' ); - * ``` - */ - -/** - * 字体边框 - * @command fontborder - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'fontborder' ); - * ``` - */ - -UE.plugins['font'] = function () { - var me = this, - fonts = { - 'forecolor': 'color', - 'backcolor': 'background-color', - 'fontsize': 'font-size', - 'fontfamily': 'font-family', - 'underline': 'text-decoration', - 'strikethrough': 'text-decoration', - 'fontborder': 'border' - }, - needCmd = {'underline': 1, 'strikethrough': 1, 'fontborder': 1}, - needSetChild = { - 'forecolor': 'color', - 'backcolor': 'background-color', - 'fontsize': 'font-size', - 'fontfamily': 'font-family' - - }; - me.setOpt({ - 'fontfamily': [ - { name: 'songti', val: '宋体,SimSun'}, - { name: 'yahei', val: '微软雅黑,Microsoft YaHei'}, - { name: 'kaiti', val: '楷体,楷体_GB2312, SimKai'}, - { name: 'heiti', val: '黑体, SimHei'}, - { name: 'lishu', val: '隶书, SimLi'}, - { name: 'andaleMono', val: 'andale mono'}, - { name: 'arial', val: 'arial, helvetica,sans-serif'}, - { name: 'arialBlack', val: 'arial black,avant garde'}, - { name: 'comicSansMs', val: 'comic sans ms'}, - { name: 'impact', val: 'impact,chicago'}, - { name: 'timesNewRoman', val: 'times new roman'} - ], - 'fontsize': [10, 11, 12, 14, 16, 18, 20, 24, 36] - }); - - function mergeWithParent(node){ - var parent; - while(parent = node.parentNode){ - if(parent.tagName == 'SPAN' && domUtils.getChildCount(parent,function(child){ - return !domUtils.isBookmarkNode(child) && !domUtils.isBr(child) - }) == 1) { - parent.style.cssText += node.style.cssText; - domUtils.remove(node,true); - node = parent; - - }else{ - break; - } - } - - } - function mergeChild(rng,cmdName,value){ - if(needSetChild[cmdName]){ - rng.adjustmentBoundary(); - if(!rng.collapsed && rng.startContainer.nodeType == 1){ - var start = rng.startContainer.childNodes[rng.startOffset]; - if(start && domUtils.isTagNode(start,'span')){ - var bk = rng.createBookmark(); - utils.each(domUtils.getElementsByTagName(start, 'span'), function (span) { - if (!span.parentNode || domUtils.isBookmarkNode(span))return; - if(cmdName == 'backcolor' && domUtils.getComputedStyle(span,'background-color').toLowerCase() === value){ - return; - } - domUtils.removeStyle(span,needSetChild[cmdName]); - if(span.style.cssText.replace(/^\s+$/,'').length == 0){ - domUtils.remove(span,true) - } - }); - rng.moveToBookmark(bk) - } - } - } - - } - function mergesibling(rng,cmdName,value) { - var collapsed = rng.collapsed, - bk = rng.createBookmark(), common; - if (collapsed) { - common = bk.start.parentNode; - while (dtd.$inline[common.tagName]) { - common = common.parentNode; - } - } else { - common = domUtils.getCommonAncestor(bk.start, bk.end); - } - utils.each(domUtils.getElementsByTagName(common, 'span'), function (span) { - if (!span.parentNode || domUtils.isBookmarkNode(span))return; - if (/\s*border\s*:\s*none;?\s*/i.test(span.style.cssText)) { - if(/^\s*border\s*:\s*none;?\s*$/.test(span.style.cssText)){ - domUtils.remove(span, true); - }else{ - domUtils.removeStyle(span,'border'); - } - return - } - if (/border/i.test(span.style.cssText) && span.parentNode.tagName == 'SPAN' && /border/i.test(span.parentNode.style.cssText)) { - span.style.cssText = span.style.cssText.replace(/border[^:]*:[^;]+;?/gi, ''); - } - if(!(cmdName=='fontborder' && value=='none')){ - var next = span.nextSibling; - while (next && next.nodeType == 1 && next.tagName == 'SPAN' ) { - if(domUtils.isBookmarkNode(next) && cmdName == 'fontborder') { - span.appendChild(next); - next = span.nextSibling; - continue; - } - if (next.style.cssText == span.style.cssText) { - domUtils.moveChild(next, span); - domUtils.remove(next); - } - if (span.nextSibling === next) - break; - next = span.nextSibling; - } - } - - - mergeWithParent(span); - if(browser.ie && browser.version > 8 ){ - //拷贝父亲们的特别的属性,这里只做背景颜色的处理 - var parent = domUtils.findParent(span,function(n){return n.tagName == 'SPAN' && /background-color/.test(n.style.cssText)}); - if(parent && !/background-color/.test(span.style.cssText)){ - span.style.backgroundColor = parent.style.backgroundColor; - } - } - - }); - rng.moveToBookmark(bk); - mergeChild(rng,cmdName,value) - } - - me.addInputRule(function (root) { - utils.each(root.getNodesByTagName('u s del font strike'), function (node) { - if (node.tagName == 'font') { - var cssStyle = []; - for (var p in node.attrs) { - switch (p) { - case 'size': - cssStyle.push('font-size:' + - ({ - '1':'10', - '2':'12', - '3':'16', - '4':'18', - '5':'24', - '6':'32', - '7':'48' - }[node.attrs[p]] || node.attrs[p]) + 'px'); - break; - case 'color': - cssStyle.push('color:' + node.attrs[p]); - break; - case 'face': - cssStyle.push('font-family:' + node.attrs[p]); - break; - case 'style': - cssStyle.push(node.attrs[p]); - } - } - node.attrs = { - 'style': cssStyle.join(';') - }; - } else { - var val = node.tagName == 'u' ? 'underline' : 'line-through'; - node.attrs = { - 'style': (node.getAttr('style') || '') + 'text-decoration:' + val + ';' - } - } - node.tagName = 'span'; - }); -// utils.each(root.getNodesByTagName('span'), function (node) { -// var val; -// if(val = node.getAttr('class')){ -// if(/fontstrikethrough/.test(val)){ -// node.setStyle('text-decoration','line-through'); -// if(node.attrs['class']){ -// node.attrs['class'] = node.attrs['class'].replace(/fontstrikethrough/,''); -// }else{ -// node.setAttr('class') -// } -// } -// if(/fontborder/.test(val)){ -// node.setStyle('border','1px solid #000'); -// if(node.attrs['class']){ -// node.attrs['class'] = node.attrs['class'].replace(/fontborder/,''); -// }else{ -// node.setAttr('class') -// } -// } -// } -// }); - }); -// me.addOutputRule(function(root){ -// utils.each(root.getNodesByTagName('span'), function (node) { -// var val; -// if(val = node.getStyle('text-decoration')){ -// if(/line-through/.test(val)){ -// if(node.attrs['class']){ -// node.attrs['class'] += ' fontstrikethrough'; -// }else{ -// node.setAttr('class','fontstrikethrough') -// } -// } -// -// node.setStyle('text-decoration') -// } -// if(val = node.getStyle('border')){ -// if(/1px/.test(val) && /solid/.test(val)){ -// if(node.attrs['class']){ -// node.attrs['class'] += ' fontborder'; -// -// }else{ -// node.setAttr('class','fontborder') -// } -// } -// node.setStyle('border') -// -// } -// }); -// }); - for (var p in fonts) { - (function (cmd, style) { - UE.commands[cmd] = { - execCommand: function (cmdName, value) { - value = value || (this.queryCommandState(cmdName) ? 'none' : cmdName == 'underline' ? 'underline' : - cmdName == 'fontborder' ? '1px solid #000' : - 'line-through'); - var me = this, - range = this.selection.getRange(), - text; - - if (value == 'default') { - - if (range.collapsed) { - text = me.document.createTextNode('font'); - range.insertNode(text).select(); - - } - me.execCommand('removeFormat', 'span,a', style); - if (text) { - range.setStartBefore(text).collapse(true); - domUtils.remove(text); - } - mergesibling(range,cmdName,value); - range.select() - } else { - if (!range.collapsed) { - if (needCmd[cmd] && me.queryCommandValue(cmd)) { - me.execCommand('removeFormat', 'span,a', style); - } - range = me.selection.getRange(); - - range.applyInlineStyle('span', {'style': style + ':' + value}); - mergesibling(range, cmdName,value); - range.select(); - } else { - - var span = domUtils.findParentByTagName(range.startContainer, 'span', true); - text = me.document.createTextNode('font'); - if (span && !span.children.length && !span[browser.ie ? 'innerText' : 'textContent'].replace(fillCharReg, '').length) { - //for ie hack when enter - range.insertNode(text); - if (needCmd[cmd]) { - range.selectNode(text).select(); - me.execCommand('removeFormat', 'span,a', style, null); - - span = domUtils.findParentByTagName(text, 'span', true); - range.setStartBefore(text); - - } - span && (span.style.cssText += ';' + style + ':' + value); - range.collapse(true).select(); - - - } else { - range.insertNode(text); - range.selectNode(text).select(); - span = range.document.createElement('span'); - - if (needCmd[cmd]) { - //a标签内的不处理跳过 - if (domUtils.findParentByTagName(text, 'a', true)) { - range.setStartBefore(text).setCursor(); - domUtils.remove(text); - return; - } - me.execCommand('removeFormat', 'span,a', style); - } - - span.style.cssText = style + ':' + value; - - - text.parentNode.insertBefore(span, text); - //修复,span套span 但样式不继承的问题 - if (!browser.ie || browser.ie && browser.version == 9) { - var spanParent = span.parentNode; - while (!domUtils.isBlockElm(spanParent)) { - if (spanParent.tagName == 'SPAN') { - //opera合并style不会加入";" - span.style.cssText = spanParent.style.cssText + ";" + span.style.cssText; - } - spanParent = spanParent.parentNode; - } - } - - - if (opera) { - setTimeout(function () { - range.setStart(span, 0).collapse(true); - mergesibling(range, cmdName,value); - range.select(); - }); - } else { - range.setStart(span, 0).collapse(true); - mergesibling(range,cmdName,value); - range.select(); - } - - //trace:981 - //domUtils.mergeToParent(span) - } - domUtils.remove(text); - } - - - } - return true; - }, - queryCommandValue: function (cmdName) { - var startNode = this.selection.getStart(); - - //trace:946 - if (cmdName == 'underline' || cmdName == 'strikethrough') { - var tmpNode = startNode, value; - while (tmpNode && !domUtils.isBlockElm(tmpNode) && !domUtils.isBody(tmpNode)) { - if (tmpNode.nodeType == 1) { - value = domUtils.getComputedStyle(tmpNode, style); - if (value != 'none') { - return value; - } - } - - tmpNode = tmpNode.parentNode; - } - return 'none'; - } - if (cmdName == 'fontborder') { - var tmp = startNode, val; - while (tmp && dtd.$inline[tmp.tagName]) { - if (val = domUtils.getComputedStyle(tmp, 'border')) { - - if (/1px/.test(val) && /solid/.test(val)) { - return val; - } - } - tmp = tmp.parentNode; - } - return '' - } - - if( cmdName == 'FontSize' ) { - var styleVal = domUtils.getComputedStyle(startNode, style), - tmp = /^([\d\.]+)(\w+)$/.exec( styleVal ); - - if( tmp ) { - - return Math.floor( tmp[1] ) + tmp[2]; - - } - - return styleVal; - - } - - return domUtils.getComputedStyle(startNode, style); - }, - queryCommandState: function (cmdName) { - if (!needCmd[cmdName]) - return 0; - var val = this.queryCommandValue(cmdName); - if (cmdName == 'fontborder') { - return /1px/.test(val) && /solid/.test(val) - } else { - return cmdName == 'underline' ? /underline/.test(val) : /line\-through/.test(val); - - } - - } - }; - })(p, fonts[p]); - } -}; - -// plugins/link.js -/** - * 超链接 - * @file - * @since 1.2.6.1 - */ - -/** - * 插入超链接 - * @command link - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { Object } options 设置自定义属性,例如:url、title、target - * @example - * ```javascript - * editor.execCommand( 'link', '{ - * url:'ueditor.baidu.com', - * title:'ueditor', - * target:'_blank' - * }' ); - * ``` - */ -/** - * 返回当前选中的第一个超链接节点 - * @command link - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { Element } 超链接节点 - * @example - * ```javascript - * editor.queryCommandValue( 'link' ); - * ``` - */ - -/** - * 取消超链接 - * @command unlink - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'unlink'); - * ``` - */ - -UE.plugins['link'] = function(){ - function optimize( range ) { - var start = range.startContainer,end = range.endContainer; - - if ( start = domUtils.findParentByTagName( start, 'a', true ) ) { - range.setStartBefore( start ); - } - if ( end = domUtils.findParentByTagName( end, 'a', true ) ) { - range.setEndAfter( end ); - } - } - - - UE.commands['unlink'] = { - execCommand : function() { - var range = this.selection.getRange(), - bookmark; - if(range.collapsed && !domUtils.findParentByTagName( range.startContainer, 'a', true )){ - return; - } - bookmark = range.createBookmark(); - optimize( range ); - range.removeInlineStyle( 'a' ).moveToBookmark( bookmark ).select(); - }, - queryCommandState : function(){ - return !this.highlight && this.queryCommandValue('link') ? 0 : -1; - } - - }; - function doLink(range,opt,me){ - var rngClone = range.cloneRange(), - link = me.queryCommandValue('link'); - optimize( range = range.adjustmentBoundary() ); - var start = range.startContainer; - if(start.nodeType == 1 && link){ - start = start.childNodes[range.startOffset]; - if(start && start.nodeType == 1 && start.tagName == 'A' && /^(?:https?|ftp|file)\s*:\s*\/\//.test(start[browser.ie?'innerText':'textContent'])){ - start[browser.ie ? 'innerText' : 'textContent'] = utils.html(opt.textValue||opt.href); - - } - } - if( !rngClone.collapsed || link){ - range.removeInlineStyle( 'a' ); - rngClone = range.cloneRange(); - } - - if ( rngClone.collapsed ) { - var a = range.document.createElement( 'a'), - text = ''; - if(opt.textValue){ - - text = utils.html(opt.textValue); - delete opt.textValue; - }else{ - text = utils.html(opt.href); - - } - domUtils.setAttributes( a, opt ); - start = domUtils.findParentByTagName( rngClone.startContainer, 'a', true ); - if(start && domUtils.isInNodeEndBoundary(rngClone,start)){ - range.setStartAfter(start).collapse(true); - - } - a[browser.ie ? 'innerText' : 'textContent'] = text; - range.insertNode(a).selectNode( a ); - } else { - range.applyInlineStyle( 'a', opt ); - - } - } - UE.commands['link'] = { - execCommand : function( cmdName, opt ) { - var range; - opt._href && (opt._href = utils.unhtml(opt._href,/[<">]/g)); - opt.href && (opt.href = utils.unhtml(opt.href,/[<">]/g)); - opt.textValue && (opt.textValue = utils.unhtml(opt.textValue,/[<">]/g)); - doLink(range=this.selection.getRange(),opt,this); - //闭合都不加占位符,如果加了会在a后边多个占位符节点,导致a是图片背景组成的列表,出现空白问题 - range.collapse().select(true); - - }, - queryCommandValue : function() { - var range = this.selection.getRange(), - node; - if ( range.collapsed ) { -// node = this.selection.getStart(); - //在ie下getstart()取值偏上了 - node = range.startContainer; - node = node.nodeType == 1 ? node : node.parentNode; - - if ( node && (node = domUtils.findParentByTagName( node, 'a', true )) && ! domUtils.isInNodeEndBoundary(range,node)) { - - return node; - } - } else { - //trace:1111 如果是

    xx

    startContainer是p就会找不到a - range.shrinkBoundary(); - var start = range.startContainer.nodeType == 3 || !range.startContainer.childNodes[range.startOffset] ? range.startContainer : range.startContainer.childNodes[range.startOffset], - end = range.endContainer.nodeType == 3 || range.endOffset == 0 ? range.endContainer : range.endContainer.childNodes[range.endOffset-1], - common = range.getCommonAncestor(); - node = domUtils.findParentByTagName( common, 'a', true ); - if ( !node && common.nodeType == 1){ - - var as = common.getElementsByTagName( 'a' ), - ps,pe; - - for ( var i = 0,ci; ci = as[i++]; ) { - ps = domUtils.getPosition( ci, start ),pe = domUtils.getPosition( ci,end); - if ( (ps & domUtils.POSITION_FOLLOWING || ps & domUtils.POSITION_CONTAINS) - && - (pe & domUtils.POSITION_PRECEDING || pe & domUtils.POSITION_CONTAINS) - ) { - node = ci; - break; - } - } - } - return node; - } - - }, - queryCommandState : function() { - //判断如果是视频的话连接不可用 - //fix 853 - var img = this.selection.getRange().getClosedNode(), - flag = img && (img.className == "edui-faked-video" || img.className.indexOf("edui-upload-video")!=-1); - return flag ? -1 : 0; - } - }; -}; - -// plugins/iframe.js -///import core -///import plugins\inserthtml.js -///commands 插入框架 -///commandsName InsertFrame -///commandsTitle 插入Iframe -///commandsDialog dialogs\insertframe - -UE.plugins['insertframe'] = function() { - var me =this; - function deleteIframe(){ - me._iframe && delete me._iframe; - } - - me.addListener("selectionchange",function(){ - deleteIframe(); - }); - -}; - - - -// plugins/scrawl.js -///import core -///commands 涂鸦 -///commandsName Scrawl -///commandsTitle 涂鸦 -///commandsDialog dialogs\scrawl -UE.commands['scrawl'] = { - queryCommandState : function(){ - return ( browser.ie && browser.version <= 8 ) ? -1 :0; - } -}; - - -// plugins/removeformat.js -/** - * 清除格式 - * @file - * @since 1.2.6.1 - */ - -/** - * 清除文字样式 - * @command removeformat - * @method execCommand - * @param { String } cmd 命令字符串 - * @param {String} tags 以逗号隔开的标签。如:strong - * @param {String} style 样式如:color - * @param {String} attrs 属性如:width - * @example - * ```javascript - * editor.execCommand( 'removeformat', 'strong','color','width' ); - * ``` - */ - -UE.plugins['removeformat'] = function(){ - var me = this; - me.setOpt({ - 'removeFormatTags': 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var', - 'removeFormatAttributes':'class,style,lang,width,height,align,hspace,valign' - }); - me.commands['removeformat'] = { - execCommand : function( cmdName, tags, style, attrs,notIncludeA ) { - - var tagReg = new RegExp( '^(?:' + (tags || this.options.removeFormatTags).replace( /,/g, '|' ) + ')$', 'i' ) , - removeFormatAttributes = style ? [] : (attrs || this.options.removeFormatAttributes).split( ',' ), - range = new dom.Range( this.document ), - bookmark,node,parent, - filter = function( node ) { - return node.nodeType == 1; - }; - - function isRedundantSpan (node) { - if (node.nodeType == 3 || node.tagName.toLowerCase() != 'span'){ - return 0; - } - if (browser.ie) { - //ie 下判断实效,所以只能简单用style来判断 - //return node.style.cssText == '' ? 1 : 0; - var attrs = node.attributes; - if ( attrs.length ) { - for ( var i = 0,l = attrs.length; i - var node = range.startContainer, - tmp, - collapsed = range.collapsed; - while(node.nodeType == 1 && domUtils.isEmptyNode(node) && dtd.$removeEmpty[node.tagName]){ - tmp = node.parentNode; - range.setStartBefore(node); - //trace:937 - //更新结束边界 - if(range.startContainer === range.endContainer){ - range.endOffset--; - } - domUtils.remove(node); - node = tmp; - } - - if(!collapsed){ - node = range.endContainer; - while(node.nodeType == 1 && domUtils.isEmptyNode(node) && dtd.$removeEmpty[node.tagName]){ - tmp = node.parentNode; - range.setEndBefore(node); - domUtils.remove(node); - - node = tmp; - } - - - } - } - - - - range = this.selection.getRange(); - doRemove( range ); - range.select(); - - } - - }; - -}; - - -// plugins/blockquote.js -/** - * 添加引用 - * @file - * @since 1.2.6.1 - */ - -/** - * 添加引用 - * @command blockquote - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'blockquote' ); - * ``` - */ - -/** - * 添加引用 - * @command blockquote - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { Object } attrs 节点属性 - * @example - * ```javascript - * editor.execCommand( 'blockquote',{ - * style: "color: red;" - * } ); - * ``` - */ - - -UE.plugins['blockquote'] = function(){ - var me = this; - function getObj(editor){ - return domUtils.filterNodeList(editor.selection.getStartElementPath(),'blockquote'); - } - me.commands['blockquote'] = { - execCommand : function( cmdName, attrs ) { - var range = this.selection.getRange(), - obj = getObj(this), - blockquote = dtd.blockquote, - bookmark = range.createBookmark(); - - if ( obj ) { - - var start = range.startContainer, - startBlock = domUtils.isBlockElm(start) ? start : domUtils.findParent(start,function(node){return domUtils.isBlockElm(node)}), - - end = range.endContainer, - endBlock = domUtils.isBlockElm(end) ? end : domUtils.findParent(end,function(node){return domUtils.isBlockElm(node)}); - - //处理一下li - startBlock = domUtils.findParentByTagName(startBlock,'li',true) || startBlock; - endBlock = domUtils.findParentByTagName(endBlock,'li',true) || endBlock; - - - if(startBlock.tagName == 'LI' || startBlock.tagName == 'TD' || startBlock === obj || domUtils.isBody(startBlock)){ - domUtils.remove(obj,true); - }else{ - domUtils.breakParent(startBlock,obj); - } - - if(startBlock !== endBlock){ - obj = domUtils.findParentByTagName(endBlock,'blockquote'); - if(obj){ - if(endBlock.tagName == 'LI' || endBlock.tagName == 'TD'|| domUtils.isBody(endBlock)){ - obj.parentNode && domUtils.remove(obj,true); - }else{ - domUtils.breakParent(endBlock,obj); - } - - } - } - - var blockquotes = domUtils.getElementsByTagName(this.document,'blockquote'); - for(var i=0,bi;bi=blockquotes[i++];){ - if(!bi.childNodes.length){ - domUtils.remove(bi); - }else if(domUtils.getPosition(bi,startBlock)&domUtils.POSITION_FOLLOWING && domUtils.getPosition(bi,endBlock)&domUtils.POSITION_PRECEDING){ - domUtils.remove(bi,true); - } - } - - - - - } else { - - var tmpRange = range.cloneRange(), - node = tmpRange.startContainer.nodeType == 1 ? tmpRange.startContainer : tmpRange.startContainer.parentNode, - preNode = node, - doEnd = 1; - - //调整开始 - while ( 1 ) { - if ( domUtils.isBody(node) ) { - if ( preNode !== node ) { - if ( range.collapsed ) { - tmpRange.selectNode( preNode ); - doEnd = 0; - } else { - tmpRange.setStartBefore( preNode ); - } - }else{ - tmpRange.setStart(node,0); - } - - break; - } - if ( !blockquote[node.tagName] ) { - if ( range.collapsed ) { - tmpRange.selectNode( preNode ); - } else{ - tmpRange.setStartBefore( preNode); - } - break; - } - - preNode = node; - node = node.parentNode; - } - - //调整结束 - if ( doEnd ) { - preNode = node = node = tmpRange.endContainer.nodeType == 1 ? tmpRange.endContainer : tmpRange.endContainer.parentNode; - while ( 1 ) { - - if ( domUtils.isBody( node ) ) { - if ( preNode !== node ) { - - tmpRange.setEndAfter( preNode ); - - } else { - tmpRange.setEnd( node, node.childNodes.length ); - } - - break; - } - if ( !blockquote[node.tagName] ) { - tmpRange.setEndAfter( preNode ); - break; - } - - preNode = node; - node = node.parentNode; - } - - } - - - node = range.document.createElement( 'blockquote' ); - domUtils.setAttributes( node, attrs ); - node.appendChild( tmpRange.extractContents() ); - tmpRange.insertNode( node ); - //去除重复的 - var childs = domUtils.getElementsByTagName(node,'blockquote'); - for(var i=0,ci;ci=childs[i++];){ - if(ci.parentNode){ - domUtils.remove(ci,true); - } - } - - } - range.moveToBookmark( bookmark ).select(); - }, - queryCommandState : function() { - return getObj(this) ? 1 : 0; - } - }; -}; - - - -// plugins/convertcase.js -/** - * 大小写转换 - * @file - * @since 1.2.6.1 - */ - -/** - * 把选区内文本变大写,与“tolowercase”命令互斥 - * @command touppercase - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'touppercase' ); - * ``` - */ - -/** - * 把选区内文本变小写,与“touppercase”命令互斥 - * @command tolowercase - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'tolowercase' ); - * ``` - */ -UE.commands['touppercase'] = -UE.commands['tolowercase'] = { - execCommand:function (cmd) { - var me = this; - var rng = me.selection.getRange(); - if(rng.collapsed){ - return rng; - } - var bk = rng.createBookmark(), - bkEnd = bk.end, - filterFn = function( node ) { - return !domUtils.isBr(node) && !domUtils.isWhitespace( node ); - }, - curNode = domUtils.getNextDomNode( bk.start, false, filterFn ); - while ( curNode && (domUtils.getPosition( curNode, bkEnd ) & domUtils.POSITION_PRECEDING) ) { - - if ( curNode.nodeType == 3 ) { - curNode.nodeValue = curNode.nodeValue[cmd == 'touppercase' ? 'toUpperCase' : 'toLowerCase'](); - } - curNode = domUtils.getNextDomNode( curNode, true, filterFn ); - if(curNode === bkEnd){ - break; - } - - } - rng.moveToBookmark(bk).select(); - } -}; - - - -// plugins/indent.js -/** - * 首行缩进 - * @file - * @since 1.2.6.1 - */ - -/** - * 缩进 - * @command indent - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'indent' ); - * ``` - */ -UE.commands['indent'] = { - execCommand : function() { - var me = this,value = me.queryCommandState("indent") ? "0em" : (me.options.indentValue || '2em'); - me.execCommand('Paragraph','p',{style:'text-indent:'+ value}); - }, - queryCommandState : function() { - var pN = domUtils.filterNodeList(this.selection.getStartElementPath(),'p h1 h2 h3 h4 h5 h6'); - return pN && pN.style.textIndent && parseInt(pN.style.textIndent) ? 1 : 0; - } - -}; - - -// plugins/print.js -/** - * 打印 - * @file - * @since 1.2.6.1 - */ - -/** - * 打印 - * @command print - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'print' ); - * ``` - */ -UE.commands['print'] = { - execCommand : function(){ - this.window.print(); - }, - notNeedUndo : 1 -}; - - - -// plugins/preview.js -/** - * 预览 - * @file - * @since 1.2.6.1 - */ - -/** - * 预览 - * @command preview - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'preview' ); - * ``` - */ -UE.commands['preview'] = { - execCommand : function(){ - var w = window.open('', '_blank', ''), - d = w.document; - d.open(); - d.write('
    '+this.getContent(null,null,true)+'
    '); - d.close(); - }, - notNeedUndo : 1 -}; - - -// plugins/selectall.js -/** - * 全选 - * @file - * @since 1.2.6.1 - */ - -/** - * 选中所有内容 - * @command selectall - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'selectall' ); - * ``` - */ -UE.plugins['selectall'] = function(){ - var me = this; - me.commands['selectall'] = { - execCommand : function(){ - //去掉了原生的selectAll,因为会出现报错和当内容为空时,不能出现闭合状态的光标 - var me = this,body = me.body, - range = me.selection.getRange(); - range.selectNodeContents(body); - if(domUtils.isEmptyBlock(body)){ - //opera不能自动合并到元素的里边,要手动处理一下 - if(browser.opera && body.firstChild && body.firstChild.nodeType == 1){ - range.setStartAtFirst(body.firstChild); - } - range.collapse(true); - } - range.select(true); - }, - notNeedUndo : 1 - }; - - - //快捷键 - me.addshortcutkey({ - "selectAll" : "ctrl+65" - }); -}; - - -// plugins/paragraph.js -/** - * 段落样式 - * @file - * @since 1.2.6.1 - */ - -/** - * 段落格式 - * @command paragraph - * @method execCommand - * @param { String } cmd 命令字符串 - * @param {String} style 标签值为:'p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' - * @param {Object} attrs 标签的属性 - * @example - * ```javascript - * editor.execCommand( 'Paragraph','h1','{ - * class:'test' - * }' ); - * ``` - */ - -/** - * 返回选区内节点标签名 - * @command paragraph - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 节点标签名 - * @example - * ```javascript - * editor.queryCommandValue( 'Paragraph' ); - * ``` - */ - -UE.plugins['paragraph'] = function() { - var me = this, - block = domUtils.isBlockElm, - notExchange = ['TD','LI','PRE'], - - doParagraph = function(range,style,attrs,sourceCmdName){ - var bookmark = range.createBookmark(), - filterFn = function( node ) { - return node.nodeType == 1 ? node.tagName.toLowerCase() != 'br' && !domUtils.isBookmarkNode(node) : !domUtils.isWhitespace( node ); - }, - para; - - range.enlarge( true ); - var bookmark2 = range.createBookmark(), - current = domUtils.getNextDomNode( bookmark2.start, false, filterFn ), - tmpRange = range.cloneRange(), - tmpNode; - while ( current && !(domUtils.getPosition( current, bookmark2.end ) & domUtils.POSITION_FOLLOWING) ) { - if ( current.nodeType == 3 || !block( current ) ) { - tmpRange.setStartBefore( current ); - while ( current && current !== bookmark2.end && !block( current ) ) { - tmpNode = current; - current = domUtils.getNextDomNode( current, false, null, function( node ) { - return !block( node ); - } ); - } - tmpRange.setEndAfter( tmpNode ); - - para = range.document.createElement( style ); - if(attrs){ - domUtils.setAttributes(para,attrs); - if(sourceCmdName && sourceCmdName == 'customstyle' && attrs.style){ - para.style.cssText = attrs.style; - } - } - para.appendChild( tmpRange.extractContents() ); - //需要内容占位 - if(domUtils.isEmptyNode(para)){ - domUtils.fillChar(range.document,para); - - } - - tmpRange.insertNode( para ); - - var parent = para.parentNode; - //如果para上一级是一个block元素且不是body,td就删除它 - if ( block( parent ) && !domUtils.isBody( para.parentNode ) && utils.indexOf(notExchange,parent.tagName)==-1) { - //存储dir,style - if(!(sourceCmdName && sourceCmdName == 'customstyle')){ - parent.getAttribute('dir') && para.setAttribute('dir',parent.getAttribute('dir')); - //trace:1070 - parent.style.cssText && (para.style.cssText = parent.style.cssText + ';' + para.style.cssText); - //trace:1030 - parent.style.textAlign && !para.style.textAlign && (para.style.textAlign = parent.style.textAlign); - parent.style.textIndent && !para.style.textIndent && (para.style.textIndent = parent.style.textIndent); - parent.style.padding && !para.style.padding && (para.style.padding = parent.style.padding); - } - - //trace:1706 选择的就是h1-6要删除 - if(attrs && /h\d/i.test(parent.tagName) && !/h\d/i.test(para.tagName) ){ - domUtils.setAttributes(parent,attrs); - if(sourceCmdName && sourceCmdName == 'customstyle' && attrs.style){ - parent.style.cssText = attrs.style; - } - domUtils.remove(para,true); - para = parent; - }else{ - domUtils.remove( para.parentNode, true ); - } - - } - if( utils.indexOf(notExchange,parent.tagName)!=-1){ - current = parent; - }else{ - current = para; - } - - - current = domUtils.getNextDomNode( current, false, filterFn ); - } else { - current = domUtils.getNextDomNode( current, true, filterFn ); - } - } - return range.moveToBookmark( bookmark2 ).moveToBookmark( bookmark ); - }; - me.setOpt('paragraph',{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}); - me.commands['paragraph'] = { - execCommand : function( cmdName, style,attrs,sourceCmdName ) { - var range = this.selection.getRange(); - //闭合时单独处理 - if(range.collapsed){ - var txt = this.document.createTextNode('p'); - range.insertNode(txt); - //去掉冗余的fillchar - if(browser.ie){ - var node = txt.previousSibling; - if(node && domUtils.isWhitespace(node)){ - domUtils.remove(node); - } - node = txt.nextSibling; - if(node && domUtils.isWhitespace(node)){ - domUtils.remove(node); - } - } - - } - range = doParagraph(range,style,attrs,sourceCmdName); - if(txt){ - range.setStartBefore(txt).collapse(true); - pN = txt.parentNode; - - domUtils.remove(txt); - - if(domUtils.isBlockElm(pN)&&domUtils.isEmptyNode(pN)){ - domUtils.fillNode(this.document,pN); - } - - } - - if(browser.gecko && range.collapsed && range.startContainer.nodeType == 1){ - var child = range.startContainer.childNodes[range.startOffset]; - if(child && child.nodeType == 1 && child.tagName.toLowerCase() == style){ - range.setStart(child,0).collapse(true); - } - } - //trace:1097 原来有true,原因忘了,但去了就不能清除多余的占位符了 - range.select(); - - - return true; - }, - queryCommandValue : function() { - var node = domUtils.filterNodeList(this.selection.getStartElementPath(),'p h1 h2 h3 h4 h5 h6'); - return node ? node.tagName.toLowerCase() : ''; - } - }; -}; - - -// plugins/directionality.js -/** - * 设置文字输入的方向的插件 - * @file - * @since 1.2.6.1 - */ -(function() { - var block = domUtils.isBlockElm , - getObj = function(editor){ -// var startNode = editor.selection.getStart(), -// parents; -// if ( startNode ) { -// //查找所有的是block的父亲节点 -// parents = domUtils.findParents( startNode, true, block, true ); -// for ( var i = 0,ci; ci = parents[i++]; ) { -// if ( ci.getAttribute( 'dir' ) ) { -// return ci; -// } -// } -// } - return domUtils.filterNodeList(editor.selection.getStartElementPath(),function(n){return n && n.nodeType == 1 && n.getAttribute('dir')}); - - }, - doDirectionality = function(range,editor,forward){ - - var bookmark, - filterFn = function( node ) { - return node.nodeType == 1 ? !domUtils.isBookmarkNode(node) : !domUtils.isWhitespace(node); - }, - - obj = getObj( editor ); - - if ( obj && range.collapsed ) { - obj.setAttribute( 'dir', forward ); - return range; - } - bookmark = range.createBookmark(); - range.enlarge( true ); - var bookmark2 = range.createBookmark(), - current = domUtils.getNextDomNode( bookmark2.start, false, filterFn ), - tmpRange = range.cloneRange(), - tmpNode; - while ( current && !(domUtils.getPosition( current, bookmark2.end ) & domUtils.POSITION_FOLLOWING) ) { - if ( current.nodeType == 3 || !block( current ) ) { - tmpRange.setStartBefore( current ); - while ( current && current !== bookmark2.end && !block( current ) ) { - tmpNode = current; - current = domUtils.getNextDomNode( current, false, null, function( node ) { - return !block( node ); - } ); - } - tmpRange.setEndAfter( tmpNode ); - var common = tmpRange.getCommonAncestor(); - if ( !domUtils.isBody( common ) && block( common ) ) { - //遍历到了block节点 - common.setAttribute( 'dir', forward ); - current = common; - } else { - //没有遍历到,添加一个block节点 - var p = range.document.createElement( 'p' ); - p.setAttribute( 'dir', forward ); - var frag = tmpRange.extractContents(); - p.appendChild( frag ); - tmpRange.insertNode( p ); - current = p; - } - - current = domUtils.getNextDomNode( current, false, filterFn ); - } else { - current = domUtils.getNextDomNode( current, true, filterFn ); - } - } - return range.moveToBookmark( bookmark2 ).moveToBookmark( bookmark ); - }; - - /** - * 文字输入方向 - * @command directionality - * @method execCommand - * @param { String } cmdName 命令字符串 - * @param { String } forward 传入'ltr'表示从左向右输入,传入'rtl'表示从右向左输入 - * @example - * ```javascript - * editor.execCommand( 'directionality', 'ltr'); - * ``` - */ - - /** - * 查询当前选区的文字输入方向 - * @command directionality - * @method queryCommandValue - * @param { String } cmdName 命令字符串 - * @return { String } 返回'ltr'表示从左向右输入,返回'rtl'表示从右向左输入 - * @example - * ```javascript - * editor.queryCommandValue( 'directionality'); - * ``` - */ - UE.commands['directionality'] = { - execCommand : function( cmdName,forward ) { - var range = this.selection.getRange(); - //闭合时单独处理 - if(range.collapsed){ - var txt = this.document.createTextNode('d'); - range.insertNode(txt); - } - doDirectionality(range,this,forward); - if(txt){ - range.setStartBefore(txt).collapse(true); - domUtils.remove(txt); - } - - range.select(); - return true; - }, - queryCommandValue : function() { - var node = getObj(this); - return node ? node.getAttribute('dir') : 'ltr'; - } - }; -})(); - - - -// plugins/horizontal.js -/** - * 插入分割线插件 - * @file - * @since 1.2.6.1 - */ - -/** - * 插入分割线 - * @command horizontal - * @method execCommand - * @param { String } cmdName 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'horizontal' ); - * ``` - */ -UE.plugins['horizontal'] = function(){ - var me = this; - me.commands['horizontal'] = { - execCommand : function( cmdName ) { - var me = this; - if(me.queryCommandState(cmdName)!==-1){ - me.execCommand('insertHtml','
    '); - var range = me.selection.getRange(), - start = range.startContainer; - if(start.nodeType == 1 && !start.childNodes[range.startOffset] ){ - - var tmp; - if(tmp = start.childNodes[range.startOffset - 1]){ - if(tmp.nodeType == 1 && tmp.tagName == 'HR'){ - if(me.options.enterTag == 'p'){ - tmp = me.document.createElement('p'); - range.insertNode(tmp); - range.setStart(tmp,0).setCursor(); - - }else{ - tmp = me.document.createElement('br'); - range.insertNode(tmp); - range.setStartBefore(tmp).setCursor(); - } - } - } - - } - return true; - } - - }, - //边界在table里不能加分隔线 - queryCommandState : function() { - return domUtils.filterNodeList(this.selection.getStartElementPath(),'table') ? -1 : 0; - } - }; -// me.addListener('delkeyup',function(){ -// var rng = this.selection.getRange(); -// if(browser.ie && browser.version > 8){ -// rng.txtToElmBoundary(true); -// if(domUtils.isStartInblock(rng)){ -// var tmpNode = rng.startContainer; -// var pre = tmpNode.previousSibling; -// if(pre && domUtils.isTagNode(pre,'hr')){ -// domUtils.remove(pre); -// rng.select(); -// return; -// } -// } -// } -// if(domUtils.isBody(rng.startContainer)){ -// var hr = rng.startContainer.childNodes[rng.startOffset -1]; -// if(hr && hr.nodeName == 'HR'){ -// var next = hr.nextSibling; -// if(next){ -// rng.setStart(next,0) -// }else if(hr.previousSibling){ -// rng.setStartAtLast(hr.previousSibling) -// }else{ -// var p = this.document.createElement('p'); -// hr.parentNode.insertBefore(p,hr); -// domUtils.fillNode(this.document,p); -// rng.setStart(p,0); -// } -// domUtils.remove(hr); -// rng.setCursor(false,true); -// } -// } -// }) - me.addListener('delkeydown',function(name,evt){ - var rng = this.selection.getRange(); - rng.txtToElmBoundary(true); - if(domUtils.isStartInblock(rng)){ - var tmpNode = rng.startContainer; - var pre = tmpNode.previousSibling; - if(pre && domUtils.isTagNode(pre,'hr')){ - domUtils.remove(pre); - rng.select(); - domUtils.preventDefault(evt); - return true; - - } - } - - }) -}; - - - -// plugins/time.js -/** - * 插入时间和日期 - * @file - * @since 1.2.6.1 - */ - -/** - * 插入时间,默认格式:12:59:59 - * @command time - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'time'); - * ``` - */ - -/** - * 插入日期,默认格式:2013-08-30 - * @command date - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'date'); - * ``` - */ -UE.commands['time'] = UE.commands["date"] = { - execCommand : function(cmd, format){ - var date = new Date; - - function formatTime(date, format) { - var hh = ('0' + date.getHours()).slice(-2), - ii = ('0' + date.getMinutes()).slice(-2), - ss = ('0' + date.getSeconds()).slice(-2); - format = format || 'hh:ii:ss'; - return format.replace(/hh/ig, hh).replace(/ii/ig, ii).replace(/ss/ig, ss); - } - function formatDate(date, format) { - var yyyy = ('000' + date.getFullYear()).slice(-4), - yy = yyyy.slice(-2), - mm = ('0' + (date.getMonth()+1)).slice(-2), - dd = ('0' + date.getDate()).slice(-2); - format = format || 'yyyy-mm-dd'; - return format.replace(/yyyy/ig, yyyy).replace(/yy/ig, yy).replace(/mm/ig, mm).replace(/dd/ig, dd); - } - - this.execCommand('insertHtml',cmd == "time" ? formatTime(date, format):formatDate(date, format) ); - } -}; - - -// plugins/rowspacing.js -/** - * 段前段后间距插件 - * @file - * @since 1.2.6.1 - */ - -/** - * 设置段间距 - * @command rowspacing - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } value 段间距的值,以px为单位 - * @param { String } dir 间距位置,top或bottom,分别表示段前和段后 - * @example - * ```javascript - * editor.execCommand( 'rowspacing', '10', 'top' ); - * ``` - */ - -UE.plugins['rowspacing'] = function(){ - var me = this; - me.setOpt({ - 'rowspacingtop':['5', '10', '15', '20', '25'], - 'rowspacingbottom':['5', '10', '15', '20', '25'] - - }); - me.commands['rowspacing'] = { - execCommand : function( cmdName,value,dir ) { - this.execCommand('paragraph','p',{style:'margin-'+dir+':'+value + 'px'}); - return true; - }, - queryCommandValue : function(cmdName,dir) { - var pN = domUtils.filterNodeList(this.selection.getStartElementPath(),function(node){return domUtils.isBlockElm(node) }), - value; - //trace:1026 - if(pN){ - value = domUtils.getComputedStyle(pN,'margin-'+dir).replace(/[^\d]/g,''); - return !value ? 0 : value; - } - return 0; - - } - }; -}; - - - - -// plugins/lineheight.js -/** - * 设置行内间距 - * @file - * @since 1.2.6.1 - */ -UE.plugins['lineheight'] = function(){ - var me = this; - me.setOpt({'lineheight':['1', '1.5','1.75','2', '3', '4', '5']}); - - /** - * 行距 - * @command lineheight - * @method execCommand - * @param { String } cmdName 命令字符串 - * @param { String } value 传入的行高值, 该值是当前字体的倍数, 例如: 1.5, 1.75 - * @example - * ```javascript - * editor.execCommand( 'lineheight', 1.5); - * ``` - */ - /** - * 查询当前选区内容的行高大小 - * @command lineheight - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回当前行高大小 - * @example - * ```javascript - * editor.queryCommandValue( 'lineheight' ); - * ``` - */ - - me.commands['lineheight'] = { - execCommand : function( cmdName,value ) { - this.execCommand('paragraph','p',{style:'line-height:'+ (value == "1" ? "normal" : value + 'em') }); - return true; - }, - queryCommandValue : function() { - var pN = domUtils.filterNodeList(this.selection.getStartElementPath(),function(node){return domUtils.isBlockElm(node)}); - if(pN){ - var value = domUtils.getComputedStyle(pN,'line-height'); - return value == 'normal' ? 1 : value.replace(/[^\d.]*/ig,""); - } - } - }; -}; - - - - -// plugins/insertcode.js -/** - * 插入代码插件 - * @file - * @since 1.2.6.1 - */ - -UE.plugins['insertcode'] = function() { - var me = this; - me.ready(function(){ - utils.cssRule('pre','pre{margin:.5em 0;padding:.4em .6em;border-radius:8px;background:#f8f8f8;}', - me.document) - }); - me.setOpt('insertcode',{ - 'as3':'ActionScript3', - 'bash':'Bash/Shell', - 'cpp':'C/C++', - 'css':'Css', - 'cf':'CodeFunction', - 'c#':'C#', - 'delphi':'Delphi', - 'diff':'Diff', - 'erlang':'Erlang', - 'groovy':'Groovy', - 'html':'Html', - 'java':'Java', - 'jfx':'JavaFx', - 'js':'Javascript', - 'pl':'Perl', - 'php':'Php', - 'plain':'Plain Text', - 'ps':'PowerShell', - 'python':'Python', - 'ruby':'Ruby', - 'scala':'Scala', - 'sql':'Sql', - 'vb':'Vb', - 'xml':'Xml' - }); - - /** - * 插入代码 - * @command insertcode - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } lang 插入代码的语言 - * @example - * ```javascript - * editor.execCommand( 'insertcode', 'javascript' ); - * ``` - */ - - /** - * 如果选区所在位置是插入插入代码区域,返回代码的语言 - * @command insertcode - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回代码的语言 - * @example - * ```javascript - * editor.queryCommandValue( 'insertcode' ); - * ``` - */ - - me.commands['insertcode'] = { - execCommand : function(cmd,lang){ - var me = this, - rng = me.selection.getRange(), - pre = domUtils.findParentByTagName(rng.startContainer,'pre',true); - if(pre){ - pre.className = 'brush:'+lang+';toolbar:false;'; - }else{ - var code = ''; - if(rng.collapsed){ - code = browser.ie && browser.ie11below ? (browser.version <= 8 ? ' ':''):'
    '; - }else{ - var frag = rng.extractContents(); - var div = me.document.createElement('div'); - div.appendChild(frag); - - utils.each(UE.filterNode(UE.htmlparser(div.innerHTML.replace(/[\r\t]/g,'')),me.options.filterTxtRules).children,function(node){ - if(browser.ie && browser.ie11below && browser.version > 8){ - - if(node.type =='element'){ - if(node.tagName == 'br'){ - code += '\n' - }else if(!dtd.$empty[node.tagName]){ - utils.each(node.children,function(cn){ - if(cn.type =='element'){ - if(cn.tagName == 'br'){ - code += '\n' - }else if(!dtd.$empty[node.tagName]){ - code += cn.innerText(); - } - }else{ - code += cn.data - } - }) - if(!/\n$/.test(code)){ - code += '\n'; - } - } - }else{ - code += node.data + '\n' - } - if(!node.nextSibling() && /\n$/.test(code)){ - code = code.replace(/\n$/,''); - } - }else{ - if(browser.ie && browser.ie11below){ - - if(node.type =='element'){ - if(node.tagName == 'br'){ - code += '
    ' - }else if(!dtd.$empty[node.tagName]){ - utils.each(node.children,function(cn){ - if(cn.type =='element'){ - if(cn.tagName == 'br'){ - code += '
    ' - }else if(!dtd.$empty[node.tagName]){ - code += cn.innerText(); - } - }else{ - code += cn.data - } - }); - if(!/br>$/.test(code)){ - code += '
    '; - } - } - }else{ - code += node.data + '
    ' - } - if(!node.nextSibling() && /
    $/.test(code)){ - code = code.replace(/
    $/,''); - } - - }else{ - code += (node.type == 'element' ? (dtd.$empty[node.tagName] ? '' : node.innerText()) : node.data); - if(!/br\/?\s*>$/.test(code)){ - if(!node.nextSibling()) - return; - code += '
    ' - } - } - - } - - }); - } - me.execCommand('inserthtml','
    '+code+'
    ',true); - - pre = me.document.getElementById('coder'); - domUtils.removeAttributes(pre,'id'); - var tmpNode = pre.previousSibling; - - if(tmpNode && (tmpNode.nodeType == 3 && tmpNode.nodeValue.length == 1 && browser.ie && browser.version == 6 || domUtils.isEmptyBlock(tmpNode))){ - - domUtils.remove(tmpNode) - } - var rng = me.selection.getRange(); - if(domUtils.isEmptyBlock(pre)){ - rng.setStart(pre,0).setCursor(false,true) - }else{ - rng.selectNodeContents(pre).select() - } - } - - - - }, - queryCommandValue : function(){ - var path = this.selection.getStartElementPath(); - var lang = ''; - utils.each(path,function(node){ - if(node.nodeName =='PRE'){ - var match = node.className.match(/brush:([^;]+)/); - lang = match && match[1] ? match[1] : ''; - return false; - } - }); - return lang; - } - }; - - me.addInputRule(function(root){ - utils.each(root.getNodesByTagName('pre'),function(pre){ - var brs = pre.getNodesByTagName('br'); - if(brs.length){ - browser.ie && browser.ie11below && browser.version > 8 && utils.each(brs,function(br){ - var txt = UE.uNode.createText('\n'); - br.parentNode.insertBefore(txt,br); - br.parentNode.removeChild(br); - }); - return; - } - if(browser.ie && browser.ie11below && browser.version > 8) - return; - var code = pre.innerText().split(/\n/); - pre.innerHTML(''); - utils.each(code,function(c){ - if(c.length){ - pre.appendChild(UE.uNode.createText(c)); - } - pre.appendChild(UE.uNode.createElement('br')) - }) - }) - }); - me.addOutputRule(function(root){ - utils.each(root.getNodesByTagName('pre'),function(pre){ - var code = ''; - utils.each(pre.children,function(n){ - if(n.type == 'text'){ - //在ie下文本内容有可能末尾带有\n要去掉 - //trace:3396 - code += n.data.replace(/[ ]/g,' ').replace(/\n$/,''); - }else{ - if(n.tagName == 'br'){ - code += '\n' - }else{ - code += (!dtd.$empty[n.tagName] ? '' : n.innerText()); - } - - } - - }); - - pre.innerText(code.replace(/( |\n)+$/,'')) - }) - }); - //不需要判断highlight的command列表 - me.notNeedCodeQuery ={ - help:1, - undo:1, - redo:1, - source:1, - print:1, - searchreplace:1, - fullscreen:1, - preview:1, - insertparagraph:1, - elementpath:1, - insertcode:1, - inserthtml:1, - selectall:1 - }; - //将queyCommamndState重置 - var orgQuery = me.queryCommandState; - me.queryCommandState = function(cmd){ - var me = this; - - if(!me.notNeedCodeQuery[cmd.toLowerCase()] && me.selection && me.queryCommandValue('insertcode')){ - return -1; - } - return UE.Editor.prototype.queryCommandState.apply(this,arguments) - }; - me.addListener('beforeenterkeydown',function(){ - var rng = me.selection.getRange(); - var pre = domUtils.findParentByTagName(rng.startContainer,'pre',true); - if(pre){ - me.fireEvent('saveScene'); - if(!rng.collapsed){ - rng.deleteContents(); - } - if(!browser.ie || browser.ie9above){ - var tmpNode = me.document.createElement('br'),pre; - rng.insertNode(tmpNode).setStartAfter(tmpNode).collapse(true); - var next = tmpNode.nextSibling; - if(!next && (!browser.ie || browser.version > 10)){ - rng.insertNode(tmpNode.cloneNode(false)); - }else{ - rng.setStartAfter(tmpNode); - } - pre = tmpNode.previousSibling; - var tmp; - while(pre ){ - tmp = pre; - pre = pre.previousSibling; - if(!pre || pre.nodeName == 'BR'){ - pre = tmp; - break; - } - } - if(pre){ - var str = ''; - while(pre && pre.nodeName != 'BR' && new RegExp('^[\\s'+domUtils.fillChar+']*$').test(pre.nodeValue)){ - str += pre.nodeValue; - pre = pre.nextSibling; - } - if(pre.nodeName != 'BR'){ - var match = pre.nodeValue.match(new RegExp('^([\\s'+domUtils.fillChar+']+)')); - if(match && match[1]){ - str += match[1] - } - - } - if(str){ - str = me.document.createTextNode(str); - rng.insertNode(str).setStartAfter(str); - } - } - rng.collapse(true).select(true); - }else{ - if(browser.version > 8){ - - var txt = me.document.createTextNode('\n'); - var start = rng.startContainer; - if(rng.startOffset == 0){ - var preNode = start.previousSibling; - if(preNode){ - rng.insertNode(txt); - var fillchar = me.document.createTextNode(' '); - rng.setStartAfter(txt).insertNode(fillchar).setStart(fillchar,0).collapse(true).select(true) - } - }else{ - rng.insertNode(txt).setStartAfter(txt); - var fillchar = me.document.createTextNode(' '); - start = rng.startContainer.childNodes[rng.startOffset]; - if(start && !/^\n/.test(start.nodeValue)){ - rng.setStartBefore(txt) - } - rng.insertNode(fillchar).setStart(fillchar,0).collapse(true).select(true) - } - - }else{ - var tmpNode = me.document.createElement('br'); - rng.insertNode(tmpNode); - rng.insertNode(me.document.createTextNode(domUtils.fillChar)); - rng.setStartAfter(tmpNode); - pre = tmpNode.previousSibling; - var tmp; - while(pre ){ - tmp = pre; - pre = pre.previousSibling; - if(!pre || pre.nodeName == 'BR'){ - pre = tmp; - break; - } - } - if(pre){ - var str = ''; - while(pre && pre.nodeName != 'BR' && new RegExp('^[ '+domUtils.fillChar+']*$').test(pre.nodeValue)){ - str += pre.nodeValue; - pre = pre.nextSibling; - } - if(pre.nodeName != 'BR'){ - var match = pre.nodeValue.match(new RegExp('^([ '+domUtils.fillChar+']+)')); - if(match && match[1]){ - str += match[1] - } - - } - - str = me.document.createTextNode(str); - rng.insertNode(str).setStartAfter(str); - } - rng.collapse(true).select(); - } - - - } - me.fireEvent('saveScene'); - return true; - } - - - }); - - me.addListener('tabkeydown',function(cmd,evt){ - var rng = me.selection.getRange(); - var pre = domUtils.findParentByTagName(rng.startContainer,'pre',true); - if(pre){ - me.fireEvent('saveScene'); - if(evt.shiftKey){ - - }else{ - if(!rng.collapsed){ - var bk = rng.createBookmark(); - var start = bk.start.previousSibling; - - while(start){ - if(pre.firstChild === start && !domUtils.isBr(start)){ - pre.insertBefore(me.document.createTextNode(' '),start); - - break; - } - if(domUtils.isBr(start)){ - pre.insertBefore(me.document.createTextNode(' '),start.nextSibling); - - break; - } - start = start.previousSibling; - } - var end = bk.end; - start = bk.start.nextSibling; - if(pre.firstChild === bk.start){ - pre.insertBefore(me.document.createTextNode(' '),start.nextSibling) - - } - while(start && start !== end){ - if(domUtils.isBr(start) && start.nextSibling){ - if(start.nextSibling === end){ - break; - } - pre.insertBefore(me.document.createTextNode(' '),start.nextSibling) - } - - start = start.nextSibling; - } - rng.moveToBookmark(bk).select(); - }else{ - var tmpNode = me.document.createTextNode(' '); - rng.insertNode(tmpNode).setStartAfter(tmpNode).collapse(true).select(true); - } - } - - - me.fireEvent('saveScene'); - return true; - } - - - }); - - - me.addListener('beforeinserthtml',function(evtName,html){ - var me = this, - rng = me.selection.getRange(), - pre = domUtils.findParentByTagName(rng.startContainer,'pre',true); - if(pre){ - if(!rng.collapsed){ - rng.deleteContents() - } - var htmlstr = ''; - if(browser.ie && browser.version > 8){ - - utils.each(UE.filterNode(UE.htmlparser(html),me.options.filterTxtRules).children,function(node){ - if(node.type =='element'){ - if(node.tagName == 'br'){ - htmlstr += '\n' - }else if(!dtd.$empty[node.tagName]){ - utils.each(node.children,function(cn){ - if(cn.type =='element'){ - if(cn.tagName == 'br'){ - htmlstr += '\n' - }else if(!dtd.$empty[node.tagName]){ - htmlstr += cn.innerText(); - } - }else{ - htmlstr += cn.data - } - }) - if(!/\n$/.test(htmlstr)){ - htmlstr += '\n'; - } - } - }else{ - htmlstr += node.data + '\n' - } - if(!node.nextSibling() && /\n$/.test(htmlstr)){ - htmlstr = htmlstr.replace(/\n$/,''); - } - }); - var tmpNode = me.document.createTextNode(utils.html(htmlstr.replace(/ /g,' '))); - rng.insertNode(tmpNode).selectNode(tmpNode).select(); - }else{ - var frag = me.document.createDocumentFragment(); - - utils.each(UE.filterNode(UE.htmlparser(html),me.options.filterTxtRules).children,function(node){ - if(node.type =='element'){ - if(node.tagName == 'br'){ - frag.appendChild(me.document.createElement('br')) - }else if(!dtd.$empty[node.tagName]){ - utils.each(node.children,function(cn){ - if(cn.type =='element'){ - if(cn.tagName == 'br'){ - - frag.appendChild(me.document.createElement('br')) - }else if(!dtd.$empty[node.tagName]){ - frag.appendChild(me.document.createTextNode(utils.html(cn.innerText().replace(/ /g,' ')))); - - } - }else{ - frag.appendChild(me.document.createTextNode(utils.html( cn.data.replace(/ /g,' ')))); - - } - }) - if(frag.lastChild.nodeName != 'BR'){ - frag.appendChild(me.document.createElement('br')) - } - } - }else{ - frag.appendChild(me.document.createTextNode(utils.html( node.data.replace(/ /g,' ')))); - } - if(!node.nextSibling() && frag.lastChild.nodeName == 'BR'){ - frag.removeChild(frag.lastChild) - } - - - }); - rng.insertNode(frag).select(); - - } - - return true; - } - }); - //方向键的处理 - me.addListener('keydown',function(cmd,evt){ - var me = this,keyCode = evt.keyCode || evt.which; - if(keyCode == 40){ - var rng = me.selection.getRange(),pre,start = rng.startContainer; - if(rng.collapsed && (pre = domUtils.findParentByTagName(rng.startContainer,'pre',true)) && !pre.nextSibling){ - var last = pre.lastChild - while(last && last.nodeName == 'BR'){ - last = last.previousSibling; - } - if(last === start || rng.startContainer === pre && rng.startOffset == pre.childNodes.length){ - me.execCommand('insertparagraph'); - domUtils.preventDefault(evt) - } - - } - } - }); - //trace:3395 - me.addListener('delkeydown',function(type,evt){ - var rng = this.selection.getRange(); - rng.txtToElmBoundary(true); - var start = rng.startContainer; - if(domUtils.isTagNode(start,'pre') && rng.collapsed && domUtils.isStartInblock(rng)){ - var p = me.document.createElement('p'); - domUtils.fillNode(me.document,p); - start.parentNode.insertBefore(p,start); - domUtils.remove(start); - rng.setStart(p,0).setCursor(false,true); - domUtils.preventDefault(evt); - return true; - } - }) -}; - - -// plugins/cleardoc.js -/** - * 清空文档插件 - * @file - * @since 1.2.6.1 - */ - -/** - * 清空文档 - * @command cleardoc - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * //editor 是编辑器实例 - * editor.execCommand('cleardoc'); - * ``` - */ - -UE.commands['cleardoc'] = { - execCommand : function( cmdName) { - var me = this, - enterTag = me.options.enterTag, - range = me.selection.getRange(); - if(enterTag == "br"){ - me.body.innerHTML = "
    "; - range.setStart(me.body,0).setCursor(); - }else{ - me.body.innerHTML = "

    "+(ie ? "" : "
    ")+"

    "; - range.setStart(me.body.firstChild,0).setCursor(false,true); - } - setTimeout(function(){ - me.fireEvent("clearDoc"); - },0); - - } -}; - - - -// plugins/anchor.js -/** - * 锚点插件,为UEditor提供插入锚点支持 - * @file - * @since 1.2.6.1 - */ -UE.plugin.register('anchor', function (){ - - return { - bindEvents:{ - 'ready':function(){ - utils.cssRule('anchor', - '.anchorclass{background: url(\'' - + this.options.themePath - + this.options.theme +'/images/anchor.gif\') no-repeat scroll left center transparent;cursor: auto;display: inline-block;height: 16px;width: 15px;}', - this.document); - } - }, - outputRule: function(root){ - utils.each(root.getNodesByTagName('img'),function(a){ - var val; - if(val = a.getAttr('anchorname')){ - a.tagName = 'a'; - a.setAttr({ - anchorname : '', - name : val, - 'class' : '' - }) - } - }) - }, - inputRule:function(root){ - utils.each(root.getNodesByTagName('a'),function(a){ - var val; - if((val = a.getAttr('name')) && !a.getAttr('href')){ - a.tagName = 'img'; - a.setAttr({ - anchorname :a.getAttr('name'), - 'class' : 'anchorclass' - }); - a.setAttr('name') - - } - }) - - }, - commands:{ - /** - * 插入锚点 - * @command anchor - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } name 锚点名称字符串 - * @example - * ```javascript - * //editor 是编辑器实例 - * editor.execCommand('anchor', 'anchor1'); - * ``` - */ - 'anchor':{ - execCommand:function (cmd, name) { - var range = this.selection.getRange(),img = range.getClosedNode(); - if (img && img.getAttribute('anchorname')) { - if (name) { - img.setAttribute('anchorname', name); - } else { - range.setStartBefore(img).setCursor(); - domUtils.remove(img); - } - } else { - if (name) { - //只在选区的开始插入 - var anchor = this.document.createElement('img'); - range.collapse(true); - domUtils.setAttributes(anchor,{ - 'anchorname':name, - 'class':'anchorclass' - }); - range.insertNode(anchor).setStartAfter(anchor).setCursor(false,true); - } - } - } - } - } - } -}); - - -// plugins/wordcount.js -///import core -///commands 字数统计 -///commandsName WordCount,wordCount -///commandsTitle 字数统计 -/* - * Created by JetBrains WebStorm. - * User: taoqili - * Date: 11-9-7 - * Time: 下午8:18 - * To change this template use File | Settings | File Templates. - */ - -UE.plugins['wordcount'] = function(){ - var me = this; - me.setOpt('wordCount',true); - me.addListener('contentchange',function(){ - me.fireEvent('wordcount'); - }); - var timer; - me.addListener('ready',function(){ - var me = this; - domUtils.on(me.body,"keyup",function(evt){ - var code = evt.keyCode||evt.which, - //忽略的按键,ctr,alt,shift,方向键 - ignores = {"16":1,"18":1,"20":1,"37":1,"38":1,"39":1,"40":1}; - if(code in ignores) return; - clearTimeout(timer); - timer = setTimeout(function(){ - me.fireEvent('wordcount'); - },200) - }) - }); -}; - - -// plugins/pagebreak.js -/** - * 分页功能插件 - * @file - * @since 1.2.6.1 - */ -UE.plugins['pagebreak'] = function () { - var me = this, - notBreakTags = ['td']; - me.setOpt('pageBreakTag','_ueditor_page_break_tag_'); - - function fillNode(node){ - if(domUtils.isEmptyBlock(node)){ - var firstChild = node.firstChild,tmpNode; - - while(firstChild && firstChild.nodeType == 1 && domUtils.isEmptyBlock(firstChild)){ - tmpNode = firstChild; - firstChild = firstChild.firstChild; - } - !tmpNode && (tmpNode = node); - domUtils.fillNode(me.document,tmpNode); - } - } - //分页符样式添加 - - me.ready(function(){ - utils.cssRule('pagebreak','.pagebreak{display:block;clear:both !important;cursor:default !important;width: 100% !important;margin:0;}',me.document); - }); - function isHr(node){ - return node && node.nodeType == 1 && node.tagName == 'HR' && node.className == 'pagebreak'; - } - me.addInputRule(function(root){ - root.traversal(function(node){ - if(node.type == 'text' && node.data == me.options.pageBreakTag){ - var hr = UE.uNode.createElement('
    '); - node.parentNode.insertBefore(hr,node); - node.parentNode.removeChild(node) - } - }) - }); - me.addOutputRule(function(node){ - utils.each(node.getNodesByTagName('hr'),function(n){ - if(n.getAttr('class') == 'pagebreak'){ - var txt = UE.uNode.createText(me.options.pageBreakTag); - n.parentNode.insertBefore(txt,n); - n.parentNode.removeChild(n); - } - }) - - }); - - /** - * 插入分页符 - * @command pagebreak - * @method execCommand - * @param { String } cmd 命令字符串 - * @remind 在表格中插入分页符会把表格切分成两部分 - * @remind 获取编辑器内的数据时, 编辑器会把分页符转换成“_ueditor_page_break_tag_”字符串, - * 以便于提交数据到服务器端后处理分页。 - * @example - * ```javascript - * editor.execCommand( 'pagebreak'); //插入一个hr标签,带有样式类名pagebreak - * ``` - */ - - me.commands['pagebreak'] = { - execCommand:function () { - var range = me.selection.getRange(),hr = me.document.createElement('hr'); - domUtils.setAttributes(hr,{ - 'class' : 'pagebreak', - noshade:"noshade", - size:"5" - }); - domUtils.unSelectable(hr); - //table单独处理 - var node = domUtils.findParentByTagName(range.startContainer, notBreakTags, true), - - parents = [], pN; - if (node) { - switch (node.tagName) { - case 'TD': - pN = node.parentNode; - if (!pN.previousSibling) { - var table = domUtils.findParentByTagName(pN, 'table'); -// var tableWrapDiv = table.parentNode; -// if(tableWrapDiv && tableWrapDiv.nodeType == 1 -// && tableWrapDiv.tagName == 'DIV' -// && tableWrapDiv.getAttribute('dropdrag') -// ){ -// domUtils.remove(tableWrapDiv,true); -// } - table.parentNode.insertBefore(hr, table); - parents = domUtils.findParents(hr, true); - - } else { - pN.parentNode.insertBefore(hr, pN); - parents = domUtils.findParents(hr); - - } - pN = parents[1]; - if (hr !== pN) { - domUtils.breakParent(hr, pN); - - } - //table要重写绑定一下拖拽 - me.fireEvent('afteradjusttable',me.document); - } - - } else { - - if (!range.collapsed) { - range.deleteContents(); - var start = range.startContainer; - while ( !domUtils.isBody(start) && domUtils.isBlockElm(start) && domUtils.isEmptyNode(start)) { - range.setStartBefore(start).collapse(true); - domUtils.remove(start); - start = range.startContainer; - } - - } - range.insertNode(hr); - - var pN = hr.parentNode, nextNode; - while (!domUtils.isBody(pN)) { - domUtils.breakParent(hr, pN); - nextNode = hr.nextSibling; - if (nextNode && domUtils.isEmptyBlock(nextNode)) { - domUtils.remove(nextNode); - } - pN = hr.parentNode; - } - nextNode = hr.nextSibling; - var pre = hr.previousSibling; - if(isHr(pre)){ - domUtils.remove(pre); - }else{ - pre && fillNode(pre); - } - - if(!nextNode){ - var p = me.document.createElement('p'); - - hr.parentNode.appendChild(p); - domUtils.fillNode(me.document,p); - range.setStart(p,0).collapse(true); - }else{ - if(isHr(nextNode)){ - domUtils.remove(nextNode); - }else{ - fillNode(nextNode); - } - range.setEndAfter(hr).collapse(false); - } - - range.select(true); - - } - - } - }; -}; - -// plugins/wordimage.js -///import core -///commands 本地图片引导上传 -///commandsName WordImage -///commandsTitle 本地图片引导上传 -///commandsDialog dialogs\wordimage - -UE.plugin.register('wordimage',function(){ - var me = this, - images = []; - return { - commands : { - 'wordimage':{ - execCommand:function () { - var images = domUtils.getElementsByTagName(me.body, "img"); - var urlList = []; - for (var i = 0, ci; ci = images[i++];) { - var url = ci.getAttribute("word_img"); - url && urlList.push(url); - } - return urlList; - }, - queryCommandState:function () { - images = domUtils.getElementsByTagName(me.body, "img"); - for (var i = 0, ci; ci = images[i++];) { - if (ci.getAttribute("word_img")) { - return 1; - } - } - return -1; - }, - notNeedUndo:true - } - }, - inputRule : function (root) { - utils.each(root.getNodesByTagName('img'), function (img) { - var attrs = img.attrs, - flag = parseInt(attrs.width) < 128 || parseInt(attrs.height) < 43, - opt = me.options, - src = opt.UEDITOR_HOME_URL + 'themes/default/images/spacer.gif'; - if (attrs['src'] && /^(?:(file:\/+))/.test(attrs['src'])) { - img.setAttr({ - width:attrs.width, - height:attrs.height, - alt:attrs.alt, - word_img: attrs.src, - src:src, - 'style':'background:url(' + ( flag ? opt.themePath + opt.theme + '/images/word.gif' : opt.langPath + opt.lang + '/images/localimage.png') + ') no-repeat center center;border:1px solid #ddd' - }) - } - }) - } - } -}); - -// plugins/dragdrop.js -UE.plugins['dragdrop'] = function (){ - - var me = this; - me.ready(function(){ - domUtils.on(this.body,'dragend',function(){ - var rng = me.selection.getRange(); - var node = rng.getClosedNode()||me.selection.getStart(); - - if(node && node.tagName == 'IMG'){ - - var pre = node.previousSibling,next; - while(next = node.nextSibling){ - if(next.nodeType == 1 && next.tagName == 'SPAN' && !next.firstChild){ - domUtils.remove(next) - }else{ - break; - } - } - - - if((pre && pre.nodeType == 1 && !domUtils.isEmptyBlock(pre) || !pre) && (!next || next && !domUtils.isEmptyBlock(next))){ - if(pre && pre.tagName == 'P' && !domUtils.isEmptyBlock(pre)){ - pre.appendChild(node); - domUtils.moveChild(next,pre); - domUtils.remove(next); - }else if(next && next.tagName == 'P' && !domUtils.isEmptyBlock(next)){ - next.insertBefore(node,next.firstChild); - } - - if(pre && pre.tagName == 'P' && domUtils.isEmptyBlock(pre)){ - domUtils.remove(pre) - } - if(next && next.tagName == 'P' && domUtils.isEmptyBlock(next)){ - domUtils.remove(next) - } - rng.selectNode(node).select(); - me.fireEvent('saveScene'); - - } - - } - - }) - }); - me.addListener('keyup', function(type, evt) { - var keyCode = evt.keyCode || evt.which; - if (keyCode == 13) { - var rng = me.selection.getRange(),node; - if(node = domUtils.findParentByTagName(rng.startContainer,'p',true)){ - if(domUtils.getComputedStyle(node,'text-align') == 'center'){ - domUtils.removeStyle(node,'text-align') - } - } - } - }) -}; - - -// plugins/undo.js -/** - * undo redo - * @file - * @since 1.2.6.1 - */ - -/** - * 撤销上一次执行的命令 - * @command undo - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'undo' ); - * ``` - */ - -/** - * 重做上一次执行的命令 - * @command redo - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'redo' ); - * ``` - */ - -UE.plugins['undo'] = function () { - var saveSceneTimer; - var me = this, - maxUndoCount = me.options.maxUndoCount || 20, - maxInputCount = me.options.maxInputCount || 20, - fillchar = new RegExp(domUtils.fillChar + '|<\/hr>', 'gi');// ie会产生多余的 - var noNeedFillCharTags = { - ol:1,ul:1,table:1,tbody:1,tr:1,body:1 - }; - var orgState = me.options.autoClearEmptyNode; - function compareAddr(indexA, indexB) { - if (indexA.length != indexB.length) - return 0; - for (var i = 0, l = indexA.length; i < l; i++) { - if (indexA[i] != indexB[i]) - return 0 - } - return 1; - } - - function compareRangeAddress(rngAddrA, rngAddrB) { - if (rngAddrA.collapsed != rngAddrB.collapsed) { - return 0; - } - if (!compareAddr(rngAddrA.startAddress, rngAddrB.startAddress) || !compareAddr(rngAddrA.endAddress, rngAddrB.endAddress)) { - return 0; - } - return 1; - } - - function UndoManager() { - this.list = []; - this.index = 0; - this.hasUndo = false; - this.hasRedo = false; - this.undo = function () { - if (this.hasUndo) { - if (!this.list[this.index - 1] && this.list.length == 1) { - this.reset(); - return; - } - while (this.list[this.index].content == this.list[this.index - 1].content) { - this.index--; - if (this.index == 0) { - return this.restore(0); - } - } - this.restore(--this.index); - } - }; - this.redo = function () { - if (this.hasRedo) { - while (this.list[this.index].content == this.list[this.index + 1].content) { - this.index++; - if (this.index == this.list.length - 1) { - return this.restore(this.index); - } - } - this.restore(++this.index); - } - }; - - this.restore = function () { - var me = this.editor; - var scene = this.list[this.index]; - var root = UE.htmlparser(scene.content.replace(fillchar, '')); - me.options.autoClearEmptyNode = false; - me.filterInputRule(root); - me.options.autoClearEmptyNode = orgState; - //trace:873 - //去掉展位符 - me.document.body.innerHTML = root.toHtml(); - me.fireEvent('afterscencerestore'); - //处理undo后空格不展位的问题 - if (browser.ie) { - utils.each(domUtils.getElementsByTagName(me.document,'td th caption p'),function(node){ - if(domUtils.isEmptyNode(node)){ - domUtils.fillNode(me.document, node); - } - }) - } - - try{ - var rng = new dom.Range(me.document).moveToAddress(scene.address); - rng.select(noNeedFillCharTags[rng.startContainer.nodeName.toLowerCase()]); - }catch(e){} - - this.update(); - this.clearKey(); - //不能把自己reset了 - me.fireEvent('reset', true); - }; - - this.getScene = function () { - var me = this.editor; - var rng = me.selection.getRange(), - rngAddress = rng.createAddress(false,true); - me.fireEvent('beforegetscene'); - var root = UE.htmlparser(me.body.innerHTML); - me.options.autoClearEmptyNode = false; - me.filterOutputRule(root); - me.options.autoClearEmptyNode = orgState; - var cont = root.toHtml(); - //trace:3461 - //这个会引起回退时导致空格丢失的情况 -// browser.ie && (cont = cont.replace(/> <').replace(/\s*\s*/g, '>')); - me.fireEvent('aftergetscene'); - - return { - address:rngAddress, - content:cont - } - }; - this.save = function (notCompareRange,notSetCursor) { - clearTimeout(saveSceneTimer); - var currentScene = this.getScene(notSetCursor), - lastScene = this.list[this.index]; - - if(lastScene && lastScene.content != currentScene.content){ - me.trigger('contentchange') - } - //内容相同位置相同不存 - if (lastScene && lastScene.content == currentScene.content && - ( notCompareRange ? 1 : compareRangeAddress(lastScene.address, currentScene.address) ) - ) { - return; - } - this.list = this.list.slice(0, this.index + 1); - this.list.push(currentScene); - //如果大于最大数量了,就把最前的剔除 - if (this.list.length > maxUndoCount) { - this.list.shift(); - } - this.index = this.list.length - 1; - this.clearKey(); - //跟新undo/redo状态 - this.update(); - - }; - this.update = function () { - this.hasRedo = !!this.list[this.index + 1]; - this.hasUndo = !!this.list[this.index - 1]; - }; - this.reset = function () { - this.list = []; - this.index = 0; - this.hasUndo = false; - this.hasRedo = false; - this.clearKey(); - }; - this.clearKey = function () { - keycont = 0; - lastKeyCode = null; - }; - } - - me.undoManger = new UndoManager(); - me.undoManger.editor = me; - function saveScene() { - this.undoManger.save(); - } - - me.addListener('saveScene', function () { - var args = Array.prototype.splice.call(arguments,1); - this.undoManger.save.apply(this.undoManger,args); - }); - -// me.addListener('beforeexeccommand', saveScene); -// me.addListener('afterexeccommand', saveScene); - - me.addListener('reset', function (type, exclude) { - if (!exclude) { - this.undoManger.reset(); - } - }); - me.commands['redo'] = me.commands['undo'] = { - execCommand:function (cmdName) { - this.undoManger[cmdName](); - }, - queryCommandState:function (cmdName) { - return this.undoManger['has' + (cmdName.toLowerCase() == 'undo' ? 'Undo' : 'Redo')] ? 0 : -1; - }, - notNeedUndo:1 - }; - - var keys = { - // /*Backspace*/ 8:1, /*Delete*/ 46:1, - /*Shift*/ 16:1, /*Ctrl*/ 17:1, /*Alt*/ 18:1, - 37:1, 38:1, 39:1, 40:1 - - }, - keycont = 0, - lastKeyCode; - //输入法状态下不计算字符数 - var inputType = false; - me.addListener('ready', function () { - domUtils.on(this.body, 'compositionstart', function () { - inputType = true; - }); - domUtils.on(this.body, 'compositionend', function () { - inputType = false; - }) - }); - //快捷键 - me.addshortcutkey({ - "Undo":"ctrl+90", //undo - "Redo":"ctrl+89" //redo - - }); - var isCollapsed = true; - me.addListener('keydown', function (type, evt) { - - var me = this; - var keyCode = evt.keyCode || evt.which; - if (!keys[keyCode] && !evt.ctrlKey && !evt.metaKey && !evt.shiftKey && !evt.altKey) { - if (inputType) - return; - - if(!me.selection.getRange().collapsed){ - me.undoManger.save(false,true); - isCollapsed = false; - return; - } - if (me.undoManger.list.length == 0) { - me.undoManger.save(true); - } - clearTimeout(saveSceneTimer); - function save(cont){ - cont.undoManger.save(false,true); - cont.fireEvent('selectionchange'); - } - saveSceneTimer = setTimeout(function(){ - if(inputType){ - var interalTimer = setInterval(function(){ - if(!inputType){ - save(me); - clearInterval(interalTimer) - } - },300) - return; - } - save(me); - },200); - - lastKeyCode = keyCode; - keycont++; - if (keycont >= maxInputCount ) { - save(me) - } - } - }); - me.addListener('keyup', function (type, evt) { - var keyCode = evt.keyCode || evt.which; - if (!keys[keyCode] && !evt.ctrlKey && !evt.metaKey && !evt.shiftKey && !evt.altKey) { - if (inputType) - return; - if(!isCollapsed){ - this.undoManger.save(false,true); - isCollapsed = true; - } - } - }); - //扩展实例,添加关闭和开启命令undo - me.stopCmdUndo = function(){ - me.__hasEnterExecCommand = true; - }; - me.startCmdUndo = function(){ - me.__hasEnterExecCommand = false; - } -}; - - -// plugins/copy.js -UE.plugin.register('copy', function () { - - var me = this; - - function initZeroClipboard() { - - ZeroClipboard.config({ - debug: false, - swfPath: me.options.UEDITOR_HOME_URL + 'third-party/zeroclipboard/ZeroClipboard.swf' - }); - - var client = me.zeroclipboard = new ZeroClipboard(); - - // 复制内容 - client.on('copy', function (e) { - var client = e.client, - rng = me.selection.getRange(), - div = document.createElement('div'); - - div.appendChild(rng.cloneContents()); - client.setText(div.innerText || div.textContent); - client.setHtml(div.innerHTML); - rng.select(); - }); - // hover事件传递到target - client.on('mouseover mouseout', function (e) { - var target = e.target; - if (e.type == 'mouseover') { - domUtils.addClass(target, 'edui-state-hover'); - } else if (e.type == 'mouseout') { - domUtils.removeClasses(target, 'edui-state-hover'); - } - }); - // flash加载不成功 - client.on('wrongflash noflash', function () { - ZeroClipboard.destroy(); - }); - } - - return { - bindEvents: { - 'ready': function () { - if (!browser.ie) { - if (window.ZeroClipboard) { - initZeroClipboard(); - } else { - utils.loadFile(document, { - src: me.options.UEDITOR_HOME_URL + "third-party/zeroclipboard/ZeroClipboard.js", - tag: "script", - type: "text/javascript", - defer: "defer" - }, function () { - initZeroClipboard(); - }); - } - } - } - }, - commands: { - 'copy': { - execCommand: function (cmd) { - if (!me.document.execCommand('copy')) { - alert(me.getLang('copymsg')); - } - } - } - } - } -}); - - -// plugins/paste.js -///import core -///import plugins/inserthtml.js -///import plugins/undo.js -///import plugins/serialize.js -///commands 粘贴 -///commandsName PastePlain -///commandsTitle 纯文本粘贴模式 -/** - * @description 粘贴 - * @author zhanyi - */ -UE.plugins['paste'] = function () { - function getClipboardData(callback) { - var doc = this.document; - if (doc.getElementById('baidu_pastebin')) { - return; - } - var range = this.selection.getRange(), - bk = range.createBookmark(), - //创建剪贴的容器div - pastebin = doc.createElement('div'); - pastebin.id = 'baidu_pastebin'; - // Safari 要求div必须有内容,才能粘贴内容进来 - browser.webkit && pastebin.appendChild(doc.createTextNode(domUtils.fillChar + domUtils.fillChar)); - doc.body.appendChild(pastebin); - //trace:717 隐藏的span不能得到top - //bk.start.innerHTML = ' '; - bk.start.style.display = ''; - pastebin.style.cssText = "position:absolute;width:1px;height:1px;overflow:hidden;left:-1000px;white-space:nowrap;top:" + - //要在现在光标平行的位置加入,否则会出现跳动的问题 - domUtils.getXY(bk.start).y + 'px'; - - range.selectNodeContents(pastebin).select(true); - - setTimeout(function () { - if (browser.webkit) { - for (var i = 0, pastebins = doc.querySelectorAll('#baidu_pastebin'), pi; pi = pastebins[i++];) { - if (domUtils.isEmptyNode(pi)) { - domUtils.remove(pi); - } else { - pastebin = pi; - break; - } - } - } - try { - pastebin.parentNode.removeChild(pastebin); - } catch (e) { - } - range.moveToBookmark(bk).select(true); - callback(pastebin); - }, 0); - } - - var me = this; - - me.setOpt({ - retainOnlyLabelPasted : false - }); - - var txtContent, htmlContent, address; - - function getPureHtml(html){ - return html.replace(/<(\/?)([\w\-]+)([^>]*)>/gi, function (a, b, tagName, attrs) { - tagName = tagName.toLowerCase(); - if ({img: 1}[tagName]) { - return a; - } - attrs = attrs.replace(/([\w\-]*?)\s*=\s*(("([^"]*)")|('([^']*)')|([^\s>]+))/gi, function (str, atr, val) { - if ({ - 'src': 1, - 'href': 1, - 'name': 1 - }[atr.toLowerCase()]) { - return atr + '=' + val + ' ' - } - return '' - }); - if ({ - 'span': 1, - 'div': 1 - }[tagName]) { - return '' - } else { - - return '<' + b + tagName + ' ' + utils.trim(attrs) + '>' - } - - }); - } - function filter(div) { - var html; - if (div.firstChild) { - //去掉cut中添加的边界值 - var nodes = domUtils.getElementsByTagName(div, 'span'); - for (var i = 0, ni; ni = nodes[i++];) { - if (ni.id == '_baidu_cut_start' || ni.id == '_baidu_cut_end') { - domUtils.remove(ni); - } - } - - if (browser.webkit) { - - var brs = div.querySelectorAll('div br'); - for (var i = 0, bi; bi = brs[i++];) { - var pN = bi.parentNode; - if (pN.tagName == 'DIV' && pN.childNodes.length == 1) { - pN.innerHTML = '


    '; - domUtils.remove(pN); - } - } - var divs = div.querySelectorAll('#baidu_pastebin'); - for (var i = 0, di; di = divs[i++];) { - var tmpP = me.document.createElement('p'); - di.parentNode.insertBefore(tmpP, di); - while (di.firstChild) { - tmpP.appendChild(di.firstChild); - } - domUtils.remove(di); - } - - var metas = div.querySelectorAll('meta'); - for (var i = 0, ci; ci = metas[i++];) { - domUtils.remove(ci); - } - - var brs = div.querySelectorAll('br'); - for (i = 0; ci = brs[i++];) { - if (/^apple-/i.test(ci.className)) { - domUtils.remove(ci); - } - } - } - if (browser.gecko) { - var dirtyNodes = div.querySelectorAll('[_moz_dirty]'); - for (i = 0; ci = dirtyNodes[i++];) { - ci.removeAttribute('_moz_dirty'); - } - } - if (!browser.ie) { - var spans = div.querySelectorAll('span.Apple-style-span'); - for (var i = 0, ci; ci = spans[i++];) { - domUtils.remove(ci, true); - } - } - - //ie下使用innerHTML会产生多余的\r\n字符,也会产生 这里过滤掉 - html = div.innerHTML;//.replace(/>(?:(\s| )*?)<'); - - //过滤word粘贴过来的冗余属性 - html = UE.filterWord(html); - //取消了忽略空白的第二个参数,粘贴过来的有些是有空白的,会被套上相关的标签 - var root = UE.htmlparser(html); - //如果给了过滤规则就先进行过滤 - if (me.options.filterRules) { - UE.filterNode(root, me.options.filterRules); - } - //执行默认的处理 - me.filterInputRule(root); - //针对chrome的处理 - if (browser.webkit) { - var br = root.lastChild(); - if (br && br.type == 'element' && br.tagName == 'br') { - root.removeChild(br) - } - utils.each(me.body.querySelectorAll('div'), function (node) { - if (domUtils.isEmptyBlock(node)) { - domUtils.remove(node,true) - } - }) - } - html = {'html': root.toHtml()}; - me.fireEvent('beforepaste', html, root); - //抢了默认的粘贴,那后边的内容就不执行了,比如表格粘贴 - if(!html.html){ - return; - } - root = UE.htmlparser(html.html,true); - //如果开启了纯文本模式 - if (me.queryCommandState('pasteplain') === 1) { - me.execCommand('insertHtml', UE.filterNode(root, me.options.filterTxtRules).toHtml(), true); - } else { - //文本模式 - UE.filterNode(root, me.options.filterTxtRules); - txtContent = root.toHtml(); - //完全模式 - htmlContent = html.html; - - address = me.selection.getRange().createAddress(true); - me.execCommand('insertHtml', me.getOpt('retainOnlyLabelPasted') === true ? getPureHtml(htmlContent) : htmlContent, true); - } - me.fireEvent("afterpaste", html); - } - } - - me.addListener('pasteTransfer', function (cmd, plainType) { - - if (address && txtContent && htmlContent && txtContent != htmlContent) { - var range = me.selection.getRange(); - range.moveToAddress(address, true); - - if (!range.collapsed) { - - while (!domUtils.isBody(range.startContainer) - ) { - var start = range.startContainer; - if(start.nodeType == 1){ - start = start.childNodes[range.startOffset]; - if(!start){ - range.setStartBefore(range.startContainer); - continue; - } - var pre = start.previousSibling; - - if(pre && pre.nodeType == 3 && new RegExp('^[\n\r\t '+domUtils.fillChar+']*$').test(pre.nodeValue)){ - range.setStartBefore(pre) - } - } - if(range.startOffset == 0){ - range.setStartBefore(range.startContainer); - }else{ - break; - } - - } - while (!domUtils.isBody(range.endContainer) - ) { - var end = range.endContainer; - if(end.nodeType == 1){ - end = end.childNodes[range.endOffset]; - if(!end){ - range.setEndAfter(range.endContainer); - continue; - } - var next = end.nextSibling; - if(next && next.nodeType == 3 && new RegExp('^[\n\r\t'+domUtils.fillChar+']*$').test(next.nodeValue)){ - range.setEndAfter(next) - } - } - if(range.endOffset == range.endContainer[range.endContainer.nodeType == 3 ? 'nodeValue' : 'childNodes'].length){ - range.setEndAfter(range.endContainer); - }else{ - break; - } - - } - - } - - range.deleteContents(); - range.select(true); - me.__hasEnterExecCommand = true; - var html = htmlContent; - if (plainType === 2 ) { - html = getPureHtml(html); - } else if (plainType) { - html = txtContent; - } - me.execCommand('inserthtml', html, true); - me.__hasEnterExecCommand = false; - var rng = me.selection.getRange(); - while (!domUtils.isBody(rng.startContainer) && !rng.startOffset && - rng.startContainer[rng.startContainer.nodeType == 3 ? 'nodeValue' : 'childNodes'].length - ) { - rng.setStartBefore(rng.startContainer); - } - var tmpAddress = rng.createAddress(true); - address.endAddress = tmpAddress.startAddress; - } - }); - - me.addListener('ready', function () { - domUtils.on(me.body, 'cut', function () { - var range = me.selection.getRange(); - if (!range.collapsed && me.undoManger) { - me.undoManger.save(); - } - }); - - //ie下beforepaste在点击右键时也会触发,所以用监控键盘才处理 - domUtils.on(me.body, browser.ie || browser.opera ? 'keydown' : 'paste', function (e) { - if ((browser.ie || browser.opera) && ((!e.ctrlKey && !e.metaKey) || e.keyCode != '86')) { - return; - } - getClipboardData.call(me, function (div) { - filter(div); - }); - }); - - }); - - me.commands['paste'] = { - execCommand: function (cmd) { - if (browser.ie) { - getClipboardData.call(me, function (div) { - filter(div); - }); - me.document.execCommand('paste'); - } else { - alert(me.getLang('pastemsg')); - } - } - } -}; - - - -// plugins/puretxtpaste.js -/** - * 纯文本粘贴插件 - * @file - * @since 1.2.6.1 - */ - -UE.plugins['pasteplain'] = function(){ - var me = this; - me.setOpt({ - 'pasteplain':false, - 'filterTxtRules' : function(){ - function transP(node){ - node.tagName = 'p'; - node.setStyle(); - } - function removeNode(node){ - node.parentNode.removeChild(node,true) - } - return { - //直接删除及其字节点内容 - '-' : 'script style object iframe embed input select', - 'p': {$:{}}, - 'br':{$:{}}, - div: function (node) { - var tmpNode, p = UE.uNode.createElement('p'); - while (tmpNode = node.firstChild()) { - if (tmpNode.type == 'text' || !UE.dom.dtd.$block[tmpNode.tagName]) { - p.appendChild(tmpNode); - } else { - if (p.firstChild()) { - node.parentNode.insertBefore(p, node); - p = UE.uNode.createElement('p'); - } else { - node.parentNode.insertBefore(tmpNode, node); - } - } - } - if (p.firstChild()) { - node.parentNode.insertBefore(p, node); - } - node.parentNode.removeChild(node); - }, - ol: removeNode, - ul: removeNode, - dl:removeNode, - dt:removeNode, - dd:removeNode, - 'li':removeNode, - 'caption':transP, - 'th':transP, - 'tr':transP, - 'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP, - 'td':function(node){ - //没有内容的td直接删掉 - var txt = !!node.innerText(); - if(txt){ - node.parentNode.insertAfter(UE.uNode.createText('    '),node); - } - node.parentNode.removeChild(node,node.innerText()) - } - } - }() - }); - //暂时这里支持一下老版本的属性 - var pasteplain = me.options.pasteplain; - - /** - * 启用或取消纯文本粘贴模式 - * @command pasteplain - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.queryCommandState( 'pasteplain' ); - * ``` - */ - - /** - * 查询当前是否处于纯文本粘贴模式 - * @command pasteplain - * @method queryCommandState - * @param { String } cmd 命令字符串 - * @return { int } 如果处于纯文本模式,返回1,否则,返回0 - * @example - * ```javascript - * editor.queryCommandState( 'pasteplain' ); - * ``` - */ - me.commands['pasteplain'] = { - queryCommandState: function (){ - return pasteplain ? 1 : 0; - }, - execCommand: function (){ - pasteplain = !pasteplain|0; - }, - notNeedUndo : 1 - }; -}; - -// plugins/list.js -/** - * 有序列表,无序列表插件 - * @file - * @since 1.2.6.1 - */ - -UE.plugins['list'] = function () { - var me = this, - notExchange = { - 'TD':1, - 'PRE':1, - 'BLOCKQUOTE':1 - }; - var customStyle = { - 'cn' : 'cn-1-', - 'cn1' : 'cn-2-', - 'cn2' : 'cn-3-', - 'num': 'num-1-', - 'num1' : 'num-2-', - 'num2' : 'num-3-', - 'dash' : 'dash', - 'dot':'dot' - }; - - me.setOpt( { - 'autoTransWordToList':false, - 'insertorderedlist':{ - 'num':'', - 'num1':'', - 'num2':'', - 'cn':'', - 'cn1':'', - 'cn2':'', - 'decimal':'', - 'lower-alpha':'', - 'lower-roman':'', - 'upper-alpha':'', - 'upper-roman':'' - }, - 'insertunorderedlist':{ - 'circle':'', - 'disc':'', - 'square':'', - 'dash' : '', - 'dot':'' - }, - listDefaultPaddingLeft : '30', - listiconpath : 'http://bs.baidu.com/listicon/', - maxListLevel : -1,//-1不限制 - disablePInList:false - } ); - function listToArray(list){ - var arr = []; - for(var p in list){ - arr.push(p) - } - return arr; - } - var listStyle = { - 'OL':listToArray(me.options.insertorderedlist), - 'UL':listToArray(me.options.insertunorderedlist) - }; - var liiconpath = me.options.listiconpath; - - //根据用户配置,调整customStyle - for(var s in customStyle){ - if(!me.options.insertorderedlist.hasOwnProperty(s) && !me.options.insertunorderedlist.hasOwnProperty(s)){ - delete customStyle[s]; - } - } - - me.ready(function () { - var customCss = []; - for(var p in customStyle){ - if(p == 'dash' || p == 'dot'){ - customCss.push('li.list-' + customStyle[p] + '{background-image:url(' + liiconpath +customStyle[p]+'.gif)}'); - customCss.push('ul.custom_'+p+'{list-style:none;}ul.custom_'+p+' li{background-position:0 3px;background-repeat:no-repeat}'); - }else{ - for(var i= 0;i<99;i++){ - customCss.push('li.list-' + customStyle[p] + i + '{background-image:url(' + liiconpath + 'list-'+customStyle[p] + i + '.gif)}') - } - customCss.push('ol.custom_'+p+'{list-style:none;}ol.custom_'+p+' li{background-position:0 3px;background-repeat:no-repeat}'); - } - switch(p){ - case 'cn': - customCss.push('li.list-'+p+'-paddingleft-1{padding-left:25px}'); - customCss.push('li.list-'+p+'-paddingleft-2{padding-left:40px}'); - customCss.push('li.list-'+p+'-paddingleft-3{padding-left:55px}'); - break; - case 'cn1': - customCss.push('li.list-'+p+'-paddingleft-1{padding-left:30px}'); - customCss.push('li.list-'+p+'-paddingleft-2{padding-left:40px}'); - customCss.push('li.list-'+p+'-paddingleft-3{padding-left:55px}'); - break; - case 'cn2': - customCss.push('li.list-'+p+'-paddingleft-1{padding-left:40px}'); - customCss.push('li.list-'+p+'-paddingleft-2{padding-left:55px}'); - customCss.push('li.list-'+p+'-paddingleft-3{padding-left:68px}'); - break; - case 'num': - case 'num1': - customCss.push('li.list-'+p+'-paddingleft-1{padding-left:25px}'); - break; - case 'num2': - customCss.push('li.list-'+p+'-paddingleft-1{padding-left:35px}'); - customCss.push('li.list-'+p+'-paddingleft-2{padding-left:40px}'); - break; - case 'dash': - customCss.push('li.list-'+p+'-paddingleft{padding-left:35px}'); - break; - case 'dot': - customCss.push('li.list-'+p+'-paddingleft{padding-left:20px}'); - } - } - customCss.push('.list-paddingleft-1{padding-left:0}'); - customCss.push('.list-paddingleft-2{padding-left:'+me.options.listDefaultPaddingLeft+'px}'); - customCss.push('.list-paddingleft-3{padding-left:'+me.options.listDefaultPaddingLeft*2+'px}'); - //如果不给宽度会在自定应样式里出现滚动条 - utils.cssRule('list', 'ol,ul{margin:0;pading:0;'+(browser.ie ? '' : 'width:95%')+'}li{clear:both;}'+customCss.join('\n'), me.document); - }); - //单独处理剪切的问题 - me.ready(function(){ - domUtils.on(me.body,'cut',function(){ - setTimeout(function(){ - var rng = me.selection.getRange(),li; - //trace:3416 - if(!rng.collapsed){ - if(li = domUtils.findParentByTagName(rng.startContainer,'li',true)){ - if(!li.nextSibling && domUtils.isEmptyBlock(li)){ - var pn = li.parentNode,node; - if(node = pn.previousSibling){ - domUtils.remove(pn); - rng.setStartAtLast(node).collapse(true); - rng.select(true); - }else if(node = pn.nextSibling){ - domUtils.remove(pn); - rng.setStartAtFirst(node).collapse(true); - rng.select(true); - }else{ - var tmpNode = me.document.createElement('p'); - domUtils.fillNode(me.document,tmpNode); - pn.parentNode.insertBefore(tmpNode,pn); - domUtils.remove(pn); - rng.setStart(tmpNode,0).collapse(true); - rng.select(true); - } - } - } - } - - }) - }) - }); - - function getStyle(node){ - var cls = node.className; - if(domUtils.hasClass(node,/custom_/)){ - return cls.match(/custom_(\w+)/)[1] - } - return domUtils.getStyle(node, 'list-style-type') - - } - - me.addListener('beforepaste',function(type,html){ - var me = this, - rng = me.selection.getRange(),li; - var root = UE.htmlparser(html.html,true); - if(li = domUtils.findParentByTagName(rng.startContainer,'li',true)){ - var list = li.parentNode,tagName = list.tagName == 'OL' ? 'ul':'ol'; - utils.each(root.getNodesByTagName(tagName),function(n){ - n.tagName = list.tagName; - n.setAttr(); - if(n.parentNode === root){ - type = getStyle(list) || (list.tagName == 'OL' ? 'decimal' : 'disc') - }else{ - var className = n.parentNode.getAttr('class'); - if(className && /custom_/.test(className)){ - type = className.match(/custom_(\w+)/)[1] - }else{ - type = n.parentNode.getStyle('list-style-type'); - } - if(!type){ - type = list.tagName == 'OL' ? 'decimal' : 'disc'; - } - } - var index = utils.indexOf(listStyle[list.tagName], type); - if(n.parentNode !== root) - index = index + 1 == listStyle[list.tagName].length ? 0 : index + 1; - var currentStyle = listStyle[list.tagName][index]; - if(customStyle[currentStyle]){ - n.setAttr('class', 'custom_' + currentStyle) - - }else{ - n.setStyle('list-style-type',currentStyle) - } - }) - - } - - html.html = root.toHtml(); - }); - //导出时,去掉p标签 - me.getOpt('disablePInList') === true && me.addOutputRule(function(root){ - utils.each(root.getNodesByTagName('li'),function(li){ - var newChildrens = [],index=0; - utils.each(li.children,function(n){ - if(n.tagName == 'p'){ - var tmpNode; - while(tmpNode = n.children.pop()) { - newChildrens.splice(index,0,tmpNode); - tmpNode.parentNode = li; - lastNode = tmpNode; - } - tmpNode = newChildrens[newChildrens.length-1]; - if(!tmpNode || tmpNode.type != 'element' || tmpNode.tagName != 'br'){ - var br = UE.uNode.createElement('br'); - br.parentNode = li; - newChildrens.push(br); - } - - index = newChildrens.length; - } - }); - if(newChildrens.length){ - li.children = newChildrens; - } - }); - }); - //进入编辑器的li要套p标签 - me.addInputRule(function(root){ - utils.each(root.getNodesByTagName('li'),function(li){ - var tmpP = UE.uNode.createElement('p'); - for(var i= 0,ci;ci=li.children[i];){ - if(ci.type == 'text' || dtd.p[ci.tagName]){ - tmpP.appendChild(ci); - }else{ - if(tmpP.firstChild()){ - li.insertBefore(tmpP,ci); - tmpP = UE.uNode.createElement('p'); - i = i + 2; - }else{ - i++; - } - - } - } - if(tmpP.firstChild() && !tmpP.parentNode || !li.firstChild()){ - li.appendChild(tmpP); - } - //trace:3357 - //p不能为空 - if (!tmpP.firstChild()) { - tmpP.innerHTML(browser.ie ? ' ' : '
    ') - } - //去掉末尾的空白 - var p = li.firstChild(); - var lastChild = p.lastChild(); - if(lastChild && lastChild.type == 'text' && /^\s*$/.test(lastChild.data)){ - p.removeChild(lastChild) - } - }); - if(me.options.autoTransWordToList){ - var orderlisttype = { - 'num1':/^\d+\)/, - 'decimal':/^\d+\./, - 'lower-alpha':/^[a-z]+\)/, - 'upper-alpha':/^[A-Z]+\./, - 'cn':/^[\u4E00\u4E8C\u4E09\u56DB\u516d\u4e94\u4e03\u516b\u4e5d]+[\u3001]/, - 'cn2':/^\([\u4E00\u4E8C\u4E09\u56DB\u516d\u4e94\u4e03\u516b\u4e5d]+\)/ - }, - unorderlisttype = { - 'square':'n' - }; - function checkListType(content,container){ - var span = container.firstChild(); - if(span && span.type == 'element' && span.tagName == 'span' && /Wingdings|Symbol/.test(span.getStyle('font-family'))){ - for(var p in unorderlisttype){ - if(unorderlisttype[p] == span.data){ - return p - } - } - return 'disc' - } - for(var p in orderlisttype){ - if(orderlisttype[p].test(content)){ - return p; - } - } - - } - utils.each(root.getNodesByTagName('p'),function(node){ - if(node.getAttr('class') != 'MsoListParagraph'){ - return - } - - //word粘贴过来的会带有margin要去掉,但这样也可能会误命中一些央视 - node.setStyle('margin',''); - node.setStyle('margin-left',''); - node.setAttr('class',''); - - function appendLi(list,p,type){ - if(list.tagName == 'ol'){ - if(browser.ie){ - var first = p.firstChild(); - if(first.type =='element' && first.tagName == 'span' && orderlisttype[type].test(first.innerText())){ - p.removeChild(first); - } - }else{ - p.innerHTML(p.innerHTML().replace(orderlisttype[type],'')); - } - }else{ - p.removeChild(p.firstChild()) - } - - var li = UE.uNode.createElement('li'); - li.appendChild(p); - list.appendChild(li); - } - var tmp = node,type,cacheNode = node; - - if(node.parentNode.tagName != 'li' && (type = checkListType(node.innerText(),node))){ - - var list = UE.uNode.createElement(me.options.insertorderedlist.hasOwnProperty(type) ? 'ol' : 'ul'); - if(customStyle[type]){ - list.setAttr('class','custom_'+type) - }else{ - list.setStyle('list-style-type',type) - } - while(node && node.parentNode.tagName != 'li' && checkListType(node.innerText(),node)){ - tmp = node.nextSibling(); - if(!tmp){ - node.parentNode.insertBefore(list,node) - } - appendLi(list,node,type); - node = tmp; - } - if(!list.parentNode && node && node.parentNode){ - node.parentNode.insertBefore(list,node) - } - } - var span = cacheNode.firstChild(); - if(span && span.type == 'element' && span.tagName == 'span' && /^\s*( )+\s*$/.test(span.innerText())){ - span.parentNode.removeChild(span) - } - }) - } - - }); - - //调整索引标签 - me.addListener('contentchange',function(){ - adjustListStyle(me.document) - }); - - function adjustListStyle(doc,ignore){ - utils.each(domUtils.getElementsByTagName(doc,'ol ul'),function(node){ - - if(!domUtils.inDoc(node,doc)) - return; - - var parent = node.parentNode; - if(parent.tagName == node.tagName){ - var nodeStyleType = getStyle(node) || (node.tagName == 'OL' ? 'decimal' : 'disc'), - parentStyleType = getStyle(parent) || (parent.tagName == 'OL' ? 'decimal' : 'disc'); - if(nodeStyleType == parentStyleType){ - var styleIndex = utils.indexOf(listStyle[node.tagName], nodeStyleType); - styleIndex = styleIndex + 1 == listStyle[node.tagName].length ? 0 : styleIndex + 1; - setListStyle(node,listStyle[node.tagName][styleIndex]) - } - - } - var index = 0,type = 2; - if( domUtils.hasClass(node,/custom_/)){ - if(!(/[ou]l/i.test(parent.tagName) && domUtils.hasClass(parent,/custom_/))){ - type = 1; - } - }else{ - if(/[ou]l/i.test(parent.tagName) && domUtils.hasClass(parent,/custom_/)){ - type = 3; - } - } - - var style = domUtils.getStyle(node, 'list-style-type'); - style && (node.style.cssText = 'list-style-type:' + style); - node.className = utils.trim(node.className.replace(/list-paddingleft-\w+/,'')) + ' list-paddingleft-' + type; - utils.each(domUtils.getElementsByTagName(node,'li'),function(li){ - li.style.cssText && (li.style.cssText = ''); - if(!li.firstChild){ - domUtils.remove(li); - return; - } - if(li.parentNode !== node){ - return; - } - index++; - if(domUtils.hasClass(node,/custom_/) ){ - var paddingLeft = 1,currentStyle = getStyle(node); - if(node.tagName == 'OL'){ - if(currentStyle){ - switch(currentStyle){ - case 'cn' : - case 'cn1': - case 'cn2': - if(index > 10 && (index % 10 == 0 || index > 10 && index < 20)){ - paddingLeft = 2 - }else if(index > 20){ - paddingLeft = 3 - } - break; - case 'num2' : - if(index > 9){ - paddingLeft = 2 - } - } - } - li.className = 'list-'+customStyle[currentStyle]+ index + ' ' + 'list-'+currentStyle+'-paddingleft-' + paddingLeft; - }else{ - li.className = 'list-'+customStyle[currentStyle] + ' ' + 'list-'+currentStyle+'-paddingleft'; - } - }else{ - li.className = li.className.replace(/list-[\w\-]+/gi,''); - } - var className = li.getAttribute('class'); - if(className !== null && !className.replace(/\s/g,'')){ - domUtils.removeAttributes(li,'class') - } - }); - !ignore && adjustList(node,node.tagName.toLowerCase(),getStyle(node)||domUtils.getStyle(node, 'list-style-type'),true); - }) - } - function adjustList(list, tag, style,ignoreEmpty) { - var nextList = list.nextSibling; - if (nextList && nextList.nodeType == 1 && nextList.tagName.toLowerCase() == tag && (getStyle(nextList) || domUtils.getStyle(nextList, 'list-style-type') || (tag == 'ol' ? 'decimal' : 'disc')) == style) { - domUtils.moveChild(nextList, list); - if (nextList.childNodes.length == 0) { - domUtils.remove(nextList); - } - } - if(nextList && domUtils.isFillChar(nextList)){ - domUtils.remove(nextList); - } - var preList = list.previousSibling; - if (preList && preList.nodeType == 1 && preList.tagName.toLowerCase() == tag && (getStyle(preList) || domUtils.getStyle(preList, 'list-style-type') || (tag == 'ol' ? 'decimal' : 'disc')) == style) { - domUtils.moveChild(list, preList); - } - if(preList && domUtils.isFillChar(preList)){ - domUtils.remove(preList); - } - !ignoreEmpty && domUtils.isEmptyBlock(list) && domUtils.remove(list); - if(getStyle(list)){ - adjustListStyle(list.ownerDocument,true) - } - } - - function setListStyle(list,style){ - if(customStyle[style]){ - list.className = 'custom_' + style; - } - try{ - domUtils.setStyle(list, 'list-style-type', style); - }catch(e){} - } - function clearEmptySibling(node) { - var tmpNode = node.previousSibling; - if (tmpNode && domUtils.isEmptyBlock(tmpNode)) { - domUtils.remove(tmpNode); - } - tmpNode = node.nextSibling; - if (tmpNode && domUtils.isEmptyBlock(tmpNode)) { - domUtils.remove(tmpNode); - } - } - - me.addListener('keydown', function (type, evt) { - function preventAndSave() { - evt.preventDefault ? evt.preventDefault() : (evt.returnValue = false); - me.fireEvent('contentchange'); - me.undoManger && me.undoManger.save(); - } - function findList(node,filterFn){ - while(node && !domUtils.isBody(node)){ - if(filterFn(node)){ - return null - } - if(node.nodeType == 1 && /[ou]l/i.test(node.tagName)){ - return node; - } - node = node.parentNode; - } - return null; - } - var keyCode = evt.keyCode || evt.which; - if (keyCode == 13 && !evt.shiftKey) {//回车 - var rng = me.selection.getRange(), - parent = domUtils.findParent(rng.startContainer,function(node){return domUtils.isBlockElm(node)},true), - li = domUtils.findParentByTagName(rng.startContainer,'li',true); - if(parent && parent.tagName != 'PRE' && !li){ - var html = parent.innerHTML.replace(new RegExp(domUtils.fillChar, 'g'),''); - if(/^\s*1\s*\.[^\d]/.test(html)){ - parent.innerHTML = html.replace(/^\s*1\s*\./,''); - rng.setStartAtLast(parent).collapse(true).select(); - me.__hasEnterExecCommand = true; - me.execCommand('insertorderedlist'); - me.__hasEnterExecCommand = false; - } - } - var range = me.selection.getRange(), - start = findList(range.startContainer,function (node) { - return node.tagName == 'TABLE'; - }), - end = range.collapsed ? start : findList(range.endContainer,function (node) { - return node.tagName == 'TABLE'; - }); - - if (start && end && start === end) { - - if (!range.collapsed) { - start = domUtils.findParentByTagName(range.startContainer, 'li', true); - end = domUtils.findParentByTagName(range.endContainer, 'li', true); - if (start && end && start === end) { - range.deleteContents(); - li = domUtils.findParentByTagName(range.startContainer, 'li', true); - if (li && domUtils.isEmptyBlock(li)) { - - pre = li.previousSibling; - next = li.nextSibling; - p = me.document.createElement('p'); - - domUtils.fillNode(me.document, p); - parentList = li.parentNode; - if (pre && next) { - range.setStart(next, 0).collapse(true).select(true); - domUtils.remove(li); - - } else { - if (!pre && !next || !pre) { - - parentList.parentNode.insertBefore(p, parentList); - - - } else { - li.parentNode.parentNode.insertBefore(p, parentList.nextSibling); - } - domUtils.remove(li); - if (!parentList.firstChild) { - domUtils.remove(parentList); - } - range.setStart(p, 0).setCursor(); - - - } - preventAndSave(); - return; - - } - } else { - var tmpRange = range.cloneRange(), - bk = tmpRange.collapse(false).createBookmark(); - - range.deleteContents(); - tmpRange.moveToBookmark(bk); - var li = domUtils.findParentByTagName(tmpRange.startContainer, 'li', true); - - clearEmptySibling(li); - tmpRange.select(); - preventAndSave(); - return; - } - } - - - li = domUtils.findParentByTagName(range.startContainer, 'li', true); - - if (li) { - if (domUtils.isEmptyBlock(li)) { - bk = range.createBookmark(); - var parentList = li.parentNode; - if (li !== parentList.lastChild) { - domUtils.breakParent(li, parentList); - clearEmptySibling(li); - } else { - - parentList.parentNode.insertBefore(li, parentList.nextSibling); - if (domUtils.isEmptyNode(parentList)) { - domUtils.remove(parentList); - } - } - //嵌套不处理 - if (!dtd.$list[li.parentNode.tagName]) { - - if (!domUtils.isBlockElm(li.firstChild)) { - p = me.document.createElement('p'); - li.parentNode.insertBefore(p, li); - while (li.firstChild) { - p.appendChild(li.firstChild); - } - domUtils.remove(li); - } else { - domUtils.remove(li, true); - } - } - range.moveToBookmark(bk).select(); - - - } else { - var first = li.firstChild; - if (!first || !domUtils.isBlockElm(first)) { - var p = me.document.createElement('p'); - - !li.firstChild && domUtils.fillNode(me.document, p); - while (li.firstChild) { - - p.appendChild(li.firstChild); - } - li.appendChild(p); - first = p; - } - - var span = me.document.createElement('span'); - - range.insertNode(span); - domUtils.breakParent(span, li); - - var nextLi = span.nextSibling; - first = nextLi.firstChild; - - if (!first) { - p = me.document.createElement('p'); - - domUtils.fillNode(me.document, p); - nextLi.appendChild(p); - first = p; - } - if (domUtils.isEmptyNode(first)) { - first.innerHTML = ''; - domUtils.fillNode(me.document, first); - } - - range.setStart(first, 0).collapse(true).shrinkBoundary().select(); - domUtils.remove(span); - var pre = nextLi.previousSibling; - if (pre && domUtils.isEmptyBlock(pre)) { - pre.innerHTML = '

    '; - domUtils.fillNode(me.document, pre.firstChild); - } - - } -// } - preventAndSave(); - } - - - } - - - } - if (keyCode == 8) { - //修中ie中li下的问题 - range = me.selection.getRange(); - if (range.collapsed && domUtils.isStartInblock(range)) { - tmpRange = range.cloneRange().trimBoundary(); - li = domUtils.findParentByTagName(range.startContainer, 'li', true); - //要在li的最左边,才能处理 - if (li && domUtils.isStartInblock(tmpRange)) { - start = domUtils.findParentByTagName(range.startContainer, 'p', true); - if (start && start !== li.firstChild) { - var parentList = domUtils.findParentByTagName(start,['ol','ul']); - domUtils.breakParent(start,parentList); - clearEmptySibling(start); - me.fireEvent('contentchange'); - range.setStart(start,0).setCursor(false,true); - me.fireEvent('saveScene'); - domUtils.preventDefault(evt); - return; - } - - if (li && (pre = li.previousSibling)) { - if (keyCode == 46 && li.childNodes.length) { - return; - } - //有可能上边的兄弟节点是个2级菜单,要追加到2级菜单的最后的li - if (dtd.$list[pre.tagName]) { - pre = pre.lastChild; - } - me.undoManger && me.undoManger.save(); - first = li.firstChild; - if (domUtils.isBlockElm(first)) { - if (domUtils.isEmptyNode(first)) { -// range.setEnd(pre, pre.childNodes.length).shrinkBoundary().collapse().select(true); - pre.appendChild(first); - range.setStart(first, 0).setCursor(false, true); - //first不是唯一的节点 - while (li.firstChild) { - pre.appendChild(li.firstChild); - } - } else { - - span = me.document.createElement('span'); - range.insertNode(span); - //判断pre是否是空的节点,如果是


    类型的空节点,干掉p标签防止它占位 - if (domUtils.isEmptyBlock(pre)) { - pre.innerHTML = ''; - } - domUtils.moveChild(li, pre); - range.setStartBefore(span).collapse(true).select(true); - - domUtils.remove(span); - - } - } else { - if (domUtils.isEmptyNode(li)) { - var p = me.document.createElement('p'); - pre.appendChild(p); - range.setStart(p, 0).setCursor(); -// range.setEnd(pre, pre.childNodes.length).shrinkBoundary().collapse().select(true); - } else { - range.setEnd(pre, pre.childNodes.length).collapse().select(true); - while (li.firstChild) { - pre.appendChild(li.firstChild); - } - } - } - domUtils.remove(li); - me.fireEvent('contentchange'); - me.fireEvent('saveScene'); - domUtils.preventDefault(evt); - return; - - } - //trace:980 - - if (li && !li.previousSibling) { - var parentList = li.parentNode; - var bk = range.createBookmark(); - if(domUtils.isTagNode(parentList.parentNode,'ol ul')){ - parentList.parentNode.insertBefore(li,parentList); - if(domUtils.isEmptyNode(parentList)){ - domUtils.remove(parentList) - } - }else{ - - while(li.firstChild){ - parentList.parentNode.insertBefore(li.firstChild,parentList); - } - - domUtils.remove(li); - if(domUtils.isEmptyNode(parentList)){ - domUtils.remove(parentList) - } - - } - range.moveToBookmark(bk).setCursor(false,true); - me.fireEvent('contentchange'); - me.fireEvent('saveScene'); - domUtils.preventDefault(evt); - return; - - } - - - } - - - } - - } - }); - - me.addListener('keyup',function(type, evt){ - var keyCode = evt.keyCode || evt.which; - if (keyCode == 8) { - var rng = me.selection.getRange(),list; - if(list = domUtils.findParentByTagName(rng.startContainer,['ol', 'ul'],true)){ - adjustList(list,list.tagName.toLowerCase(),getStyle(list)||domUtils.getComputedStyle(list,'list-style-type'),true) - } - } - }); - //处理tab键 - me.addListener('tabkeydown',function(){ - - var range = me.selection.getRange(); - - //控制级数 - function checkLevel(li){ - if(me.options.maxListLevel != -1){ - var level = li.parentNode,levelNum = 0; - while(/[ou]l/i.test(level.tagName)){ - levelNum++; - level = level.parentNode; - } - if(levelNum >= me.options.maxListLevel){ - return true; - } - } - } - //只以开始为准 - //todo 后续改进 - var li = domUtils.findParentByTagName(range.startContainer, 'li', true); - if(li){ - - var bk; - if(range.collapsed){ - if(checkLevel(li)) - return true; - var parentLi = li.parentNode, - list = me.document.createElement(parentLi.tagName), - index = utils.indexOf(listStyle[list.tagName], getStyle(parentLi)||domUtils.getComputedStyle(parentLi, 'list-style-type')); - index = index + 1 == listStyle[list.tagName].length ? 0 : index + 1; - var currentStyle = listStyle[list.tagName][index]; - setListStyle(list,currentStyle); - if(domUtils.isStartInblock(range)){ - me.fireEvent('saveScene'); - bk = range.createBookmark(); - parentLi.insertBefore(list, li); - list.appendChild(li); - adjustList(list,list.tagName.toLowerCase(),currentStyle); - me.fireEvent('contentchange'); - range.moveToBookmark(bk).select(true); - return true; - } - }else{ - me.fireEvent('saveScene'); - bk = range.createBookmark(); - for(var i= 0,closeList,parents = domUtils.findParents(li),ci;ci=parents[i++];){ - if(domUtils.isTagNode(ci,'ol ul')){ - closeList = ci; - break; - } - } - var current = li; - if(bk.end){ - while(current && !(domUtils.getPosition(current, bk.end) & domUtils.POSITION_FOLLOWING)){ - if(checkLevel(current)){ - current = domUtils.getNextDomNode(current,false,null,function(node){return node !== closeList}); - continue; - } - var parentLi = current.parentNode, - list = me.document.createElement(parentLi.tagName), - index = utils.indexOf(listStyle[list.tagName], getStyle(parentLi)||domUtils.getComputedStyle(parentLi, 'list-style-type')); - var currentIndex = index + 1 == listStyle[list.tagName].length ? 0 : index + 1; - var currentStyle = listStyle[list.tagName][currentIndex]; - setListStyle(list,currentStyle); - parentLi.insertBefore(list, current); - while(current && !(domUtils.getPosition(current, bk.end) & domUtils.POSITION_FOLLOWING)){ - li = current.nextSibling; - list.appendChild(current); - if(!li || domUtils.isTagNode(li,'ol ul')){ - if(li){ - while(li = li.firstChild){ - if(li.tagName == 'LI'){ - break; - } - } - }else{ - li = domUtils.getNextDomNode(current,false,null,function(node){return node !== closeList}); - } - break; - } - current = li; - } - adjustList(list,list.tagName.toLowerCase(),currentStyle); - current = li; - } - } - me.fireEvent('contentchange'); - range.moveToBookmark(bk).select(); - return true; - } - } - - }); - function getLi(start){ - while(start && !domUtils.isBody(start)){ - if(start.nodeName == 'TABLE'){ - return null; - } - if(start.nodeName == 'LI'){ - return start - } - start = start.parentNode; - } - } - - /** - * 有序列表,与“insertunorderedlist”命令互斥 - * @command insertorderedlist - * @method execCommand - * @param { String } command 命令字符串 - * @param { String } style 插入的有序列表类型,值为:decimal,lower-alpha,lower-roman,upper-alpha,upper-roman,cn,cn1,cn2,num,num1,num2 - * @example - * ```javascript - * editor.execCommand( 'insertorderedlist','decimal'); - * ``` - */ - /** - * 查询当前选区内容是否有序列表 - * @command insertorderedlist - * @method queryCommandState - * @param { String } cmd 命令字符串 - * @return { int } 如果当前选区是有序列表返回1,否则返回0 - * @example - * ```javascript - * editor.queryCommandState( 'insertorderedlist' ); - * ``` - */ - /** - * 查询当前选区内容是否有序列表 - * @command insertorderedlist - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @return { String } 返回当前有序列表的类型,值为null或decimal,lower-alpha,lower-roman,upper-alpha,upper-roman,cn,cn1,cn2,num,num1,num2 - * @example - * ```javascript - * editor.queryCommandValue( 'insertorderedlist' ); - * ``` - */ - - /** - * 无序列表,与“insertorderedlist”命令互斥 - * @command insertunorderedlist - * @method execCommand - * @param { String } command 命令字符串 - * @param { String } style 插入的无序列表类型,值为:circle,disc,square,dash,dot - * @example - * ```javascript - * editor.execCommand( 'insertunorderedlist','circle'); - * ``` - */ - /** - * 查询当前是否有word文档粘贴进来的图片 - * @command insertunorderedlist - * @method insertunorderedlist - * @param { String } command 命令字符串 - * @return { int } 如果当前选区是无序列表返回1,否则返回0 - * @example - * ```javascript - * editor.queryCommandState( 'insertunorderedlist' ); - * ``` - */ - /** - * 查询当前选区内容是否有序列表 - * @command insertunorderedlist - * @method queryCommandValue - * @param { String } command 命令字符串 - * @return { String } 返回当前无序列表的类型,值为null或circle,disc,square,dash,dot - * @example - * ```javascript - * editor.queryCommandValue( 'insertunorderedlist' ); - * ``` - */ - - me.commands['insertorderedlist'] = - me.commands['insertunorderedlist'] = { - execCommand:function (command, style) { - - if (!style) { - style = command.toLowerCase() == 'insertorderedlist' ? 'decimal' : 'disc'; - } - var me = this, - range = this.selection.getRange(), - filterFn = function (node) { - return node.nodeType == 1 ? node.tagName.toLowerCase() != 'br' : !domUtils.isWhitespace(node); - }, - tag = command.toLowerCase() == 'insertorderedlist' ? 'ol' : 'ul', - frag = me.document.createDocumentFragment(); - //去掉是因为会出现选到末尾,导致adjustmentBoundary缩到ol/ul的位置 - //range.shrinkBoundary();//.adjustmentBoundary(); - range.adjustmentBoundary().shrinkBoundary(); - var bko = range.createBookmark(true), - start = getLi(me.document.getElementById(bko.start)), - modifyStart = 0, - end = getLi(me.document.getElementById(bko.end)), - modifyEnd = 0, - startParent, endParent, - list, tmp; - - if (start || end) { - start && (startParent = start.parentNode); - if (!bko.end) { - end = start; - } - end && (endParent = end.parentNode); - - if (startParent === endParent) { - while (start !== end) { - tmp = start; - start = start.nextSibling; - if (!domUtils.isBlockElm(tmp.firstChild)) { - var p = me.document.createElement('p'); - while (tmp.firstChild) { - p.appendChild(tmp.firstChild); - } - tmp.appendChild(p); - } - frag.appendChild(tmp); - } - tmp = me.document.createElement('span'); - startParent.insertBefore(tmp, end); - if (!domUtils.isBlockElm(end.firstChild)) { - p = me.document.createElement('p'); - while (end.firstChild) { - p.appendChild(end.firstChild); - } - end.appendChild(p); - } - frag.appendChild(end); - domUtils.breakParent(tmp, startParent); - if (domUtils.isEmptyNode(tmp.previousSibling)) { - domUtils.remove(tmp.previousSibling); - } - if (domUtils.isEmptyNode(tmp.nextSibling)) { - domUtils.remove(tmp.nextSibling) - } - var nodeStyle = getStyle(startParent) || domUtils.getComputedStyle(startParent, 'list-style-type') || (command.toLowerCase() == 'insertorderedlist' ? 'decimal' : 'disc'); - if (startParent.tagName.toLowerCase() == tag && nodeStyle == style) { - for (var i = 0, ci, tmpFrag = me.document.createDocumentFragment(); ci = frag.firstChild;) { - if(domUtils.isTagNode(ci,'ol ul')){ -// 删除时,子列表不处理 -// utils.each(domUtils.getElementsByTagName(ci,'li'),function(li){ -// while(li.firstChild){ -// tmpFrag.appendChild(li.firstChild); -// } -// -// }); - tmpFrag.appendChild(ci); - }else{ - while (ci.firstChild) { - - tmpFrag.appendChild(ci.firstChild); - domUtils.remove(ci); - } - } - - } - tmp.parentNode.insertBefore(tmpFrag, tmp); - } else { - list = me.document.createElement(tag); - setListStyle(list,style); - list.appendChild(frag); - tmp.parentNode.insertBefore(list, tmp); - } - - domUtils.remove(tmp); - list && adjustList(list, tag, style); - range.moveToBookmark(bko).select(); - return; - } - //开始 - if (start) { - while (start) { - tmp = start.nextSibling; - if (domUtils.isTagNode(start, 'ol ul')) { - frag.appendChild(start); - } else { - var tmpfrag = me.document.createDocumentFragment(), - hasBlock = 0; - while (start.firstChild) { - if (domUtils.isBlockElm(start.firstChild)) { - hasBlock = 1; - } - tmpfrag.appendChild(start.firstChild); - } - if (!hasBlock) { - var tmpP = me.document.createElement('p'); - tmpP.appendChild(tmpfrag); - frag.appendChild(tmpP); - } else { - frag.appendChild(tmpfrag); - } - domUtils.remove(start); - } - - start = tmp; - } - startParent.parentNode.insertBefore(frag, startParent.nextSibling); - if (domUtils.isEmptyNode(startParent)) { - range.setStartBefore(startParent); - domUtils.remove(startParent); - } else { - range.setStartAfter(startParent); - } - modifyStart = 1; - } - - if (end && domUtils.inDoc(endParent, me.document)) { - //结束 - start = endParent.firstChild; - while (start && start !== end) { - tmp = start.nextSibling; - if (domUtils.isTagNode(start, 'ol ul')) { - frag.appendChild(start); - } else { - tmpfrag = me.document.createDocumentFragment(); - hasBlock = 0; - while (start.firstChild) { - if (domUtils.isBlockElm(start.firstChild)) { - hasBlock = 1; - } - tmpfrag.appendChild(start.firstChild); - } - if (!hasBlock) { - tmpP = me.document.createElement('p'); - tmpP.appendChild(tmpfrag); - frag.appendChild(tmpP); - } else { - frag.appendChild(tmpfrag); - } - domUtils.remove(start); - } - start = tmp; - } - var tmpDiv = domUtils.createElement(me.document, 'div', { - 'tmpDiv':1 - }); - domUtils.moveChild(end, tmpDiv); - - frag.appendChild(tmpDiv); - domUtils.remove(end); - endParent.parentNode.insertBefore(frag, endParent); - range.setEndBefore(endParent); - if (domUtils.isEmptyNode(endParent)) { - domUtils.remove(endParent); - } - - modifyEnd = 1; - } - - - } - - if (!modifyStart) { - range.setStartBefore(me.document.getElementById(bko.start)); - } - if (bko.end && !modifyEnd) { - range.setEndAfter(me.document.getElementById(bko.end)); - } - range.enlarge(true, function (node) { - return notExchange[node.tagName]; - }); - - frag = me.document.createDocumentFragment(); - - var bk = range.createBookmark(), - current = domUtils.getNextDomNode(bk.start, false, filterFn), - tmpRange = range.cloneRange(), - tmpNode, - block = domUtils.isBlockElm; - - while (current && current !== bk.end && (domUtils.getPosition(current, bk.end) & domUtils.POSITION_PRECEDING)) { - - if (current.nodeType == 3 || dtd.li[current.tagName]) { - if (current.nodeType == 1 && dtd.$list[current.tagName]) { - while (current.firstChild) { - frag.appendChild(current.firstChild); - } - tmpNode = domUtils.getNextDomNode(current, false, filterFn); - domUtils.remove(current); - current = tmpNode; - continue; - - } - tmpNode = current; - tmpRange.setStartBefore(current); - - while (current && current !== bk.end && (!block(current) || domUtils.isBookmarkNode(current) )) { - tmpNode = current; - current = domUtils.getNextDomNode(current, false, null, function (node) { - return !notExchange[node.tagName]; - }); - } - - if (current && block(current)) { - tmp = domUtils.getNextDomNode(tmpNode, false, filterFn); - if (tmp && domUtils.isBookmarkNode(tmp)) { - current = domUtils.getNextDomNode(tmp, false, filterFn); - tmpNode = tmp; - } - } - tmpRange.setEndAfter(tmpNode); - - current = domUtils.getNextDomNode(tmpNode, false, filterFn); - - var li = range.document.createElement('li'); - - li.appendChild(tmpRange.extractContents()); - if(domUtils.isEmptyNode(li)){ - var tmpNode = range.document.createElement('p'); - while(li.firstChild){ - tmpNode.appendChild(li.firstChild) - } - li.appendChild(tmpNode); - } - frag.appendChild(li); - } else { - current = domUtils.getNextDomNode(current, true, filterFn); - } - } - range.moveToBookmark(bk).collapse(true); - list = me.document.createElement(tag); - setListStyle(list,style); - list.appendChild(frag); - range.insertNode(list); - //当前list上下看能否合并 - adjustList(list, tag, style); - //去掉冗余的tmpDiv - for (var i = 0, ci, tmpDivs = domUtils.getElementsByTagName(list, 'div'); ci = tmpDivs[i++];) { - if (ci.getAttribute('tmpDiv')) { - domUtils.remove(ci, true) - } - } - range.moveToBookmark(bko).select(); - - }, - queryCommandState:function (command) { - var tag = command.toLowerCase() == 'insertorderedlist' ? 'ol' : 'ul'; - var path = this.selection.getStartElementPath(); - for(var i= 0,ci;ci = path[i++];){ - if(ci.nodeName == 'TABLE'){ - return 0 - } - if(tag == ci.nodeName.toLowerCase()){ - return 1 - }; - } - return 0; - - }, - queryCommandValue:function (command) { - var tag = command.toLowerCase() == 'insertorderedlist' ? 'ol' : 'ul'; - var path = this.selection.getStartElementPath(), - node; - for(var i= 0,ci;ci = path[i++];){ - if(ci.nodeName == 'TABLE'){ - node = null; - break; - } - if(tag == ci.nodeName.toLowerCase()){ - node = ci; - break; - }; - } - return node ? getStyle(node) || domUtils.getComputedStyle(node, 'list-style-type') : null; - } - }; -}; - - - -// plugins/source.js -/** - * 源码编辑插件 - * @file - * @since 1.2.6.1 - */ - -(function (){ - var sourceEditors = { - textarea: function (editor, holder){ - var textarea = holder.ownerDocument.createElement('textarea'); - textarea.style.cssText = 'position:absolute;resize:none;width:100%;height:100%;border:0;padding:0;margin:0;overflow-y:auto;'; - // todo: IE下只有onresize属性可用... 很纠结 - if (browser.ie && browser.version < 8) { - textarea.style.width = holder.offsetWidth + 'px'; - textarea.style.height = holder.offsetHeight + 'px'; - holder.onresize = function (){ - textarea.style.width = holder.offsetWidth + 'px'; - textarea.style.height = holder.offsetHeight + 'px'; - }; - } - holder.appendChild(textarea); - return { - setContent: function (content){ - textarea.value = content; - }, - getContent: function (){ - return textarea.value; - }, - select: function (){ - var range; - if (browser.ie) { - range = textarea.createTextRange(); - range.collapse(true); - range.select(); - } else { - //todo: chrome下无法设置焦点 - textarea.setSelectionRange(0, 0); - textarea.focus(); - } - }, - dispose: function (){ - holder.removeChild(textarea); - // todo - holder.onresize = null; - textarea = null; - holder = null; - } - }; - }, - codemirror: function (editor, holder){ - - var codeEditor = window.CodeMirror(holder, { - mode: "text/html", - tabMode: "indent", - lineNumbers: true, - lineWrapping:true - }); - var dom = codeEditor.getWrapperElement(); - dom.style.cssText = 'position:absolute;left:0;top:0;width:100%;height:100%;font-family:consolas,"Courier new",monospace;font-size:13px;'; - codeEditor.getScrollerElement().style.cssText = 'position:absolute;left:0;top:0;width:100%;height:100%;'; - codeEditor.refresh(); - return { - getCodeMirror:function(){ - return codeEditor; - }, - setContent: function (content){ - codeEditor.setValue(content); - }, - getContent: function (){ - return codeEditor.getValue(); - }, - select: function (){ - codeEditor.focus(); - }, - dispose: function (){ - holder.removeChild(dom); - dom = null; - codeEditor = null; - } - }; - } - }; - - UE.plugins['source'] = function (){ - var me = this; - var opt = this.options; - var sourceMode = false; - var sourceEditor; - var orgSetContent; - opt.sourceEditor = browser.ie ? 'textarea' : (opt.sourceEditor || 'codemirror'); - - me.setOpt({ - sourceEditorFirst:false - }); - function createSourceEditor(holder){ - return sourceEditors[opt.sourceEditor == 'codemirror' && window.CodeMirror ? 'codemirror' : 'textarea'](me, holder); - } - - var bakCssText; - //解决在源码模式下getContent不能得到最新的内容问题 - var oldGetContent, - bakAddress; - - /** - * 切换源码模式和编辑模式 - * @command source - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'source'); - * ``` - */ - - /** - * 查询当前编辑区域的状态是源码模式还是可视化模式 - * @command source - * @method queryCommandState - * @param { String } cmd 命令字符串 - * @return { int } 如果当前是源码编辑模式,返回1,否则返回0 - * @example - * ```javascript - * editor.queryCommandState( 'source' ); - * ``` - */ - - me.commands['source'] = { - execCommand: function (){ - - sourceMode = !sourceMode; - if (sourceMode) { - bakAddress = me.selection.getRange().createAddress(false,true); - me.undoManger && me.undoManger.save(true); - if(browser.gecko){ - me.body.contentEditable = false; - } - - bakCssText = me.iframe.style.cssText; - me.iframe.style.cssText += 'position:absolute;left:-32768px;top:-32768px;'; - - - me.fireEvent('beforegetcontent'); - var root = UE.htmlparser(me.body.innerHTML); - me.filterOutputRule(root); - root.traversal(function (node) { - if (node.type == 'element') { - switch (node.tagName) { - case 'td': - case 'th': - case 'caption': - if(node.children && node.children.length == 1){ - if(node.firstChild().tagName == 'br' ){ - node.removeChild(node.firstChild()) - } - }; - break; - case 'pre': - node.innerText(node.innerText().replace(/ /g,' ')) - - } - } - }); - - me.fireEvent('aftergetcontent'); - - var content = root.toHtml(true); - - sourceEditor = createSourceEditor(me.iframe.parentNode); - - sourceEditor.setContent(content); - - orgSetContent = me.setContent; - - me.setContent = function(html){ - //这里暂时不触发事件,防止报错 - var root = UE.htmlparser(html); - me.filterInputRule(root); - html = root.toHtml(); - sourceEditor.setContent(html); - }; - - setTimeout(function (){ - sourceEditor.select(); - me.addListener('fullscreenchanged', function(){ - try{ - sourceEditor.getCodeMirror().refresh() - }catch(e){} - }); - }); - - //重置getContent,源码模式下取值也能是最新的数据 - oldGetContent = me.getContent; - me.getContent = function (){ - return sourceEditor.getContent() || '

    ' + (browser.ie ? '' : '
    ')+'

    '; - }; - } else { - me.iframe.style.cssText = bakCssText; - var cont = sourceEditor.getContent() || '

    ' + (browser.ie ? '' : '
    ')+'

    '; - //处理掉block节点前后的空格,有可能会误命中,暂时不考虑 - cont = cont.replace(new RegExp('[\\r\\t\\n ]*<\/?(\\w+)\\s*(?:[^>]*)>','g'), function(a,b){ - if(b && !dtd.$inlineWithA[b.toLowerCase()]){ - return a.replace(/(^[\n\r\t ]*)|([\n\r\t ]*$)/g,''); - } - return a.replace(/(^[\n\r\t]*)|([\n\r\t]*$)/g,'') - }); - - me.setContent = orgSetContent; - - me.setContent(cont); - sourceEditor.dispose(); - sourceEditor = null; - //还原getContent方法 - me.getContent = oldGetContent; - var first = me.body.firstChild; - //trace:1106 都删除空了,下边会报错,所以补充一个p占位 - if(!first){ - me.body.innerHTML = '

    '+(browser.ie?'':'
    ')+'

    '; - first = me.body.firstChild; - } - - - //要在ifm为显示时ff才能取到selection,否则报错 - //这里不能比较位置了 - me.undoManger && me.undoManger.save(true); - - if(browser.gecko){ - - var input = document.createElement('input'); - input.style.cssText = 'position:absolute;left:0;top:-32768px'; - - document.body.appendChild(input); - - me.body.contentEditable = false; - setTimeout(function(){ - domUtils.setViewportOffset(input, { left: -32768, top: 0 }); - input.focus(); - setTimeout(function(){ - me.body.contentEditable = true; - me.selection.getRange().moveToAddress(bakAddress).select(true); - domUtils.remove(input); - }); - - }); - }else{ - //ie下有可能报错,比如在代码顶头的情况 - try{ - me.selection.getRange().moveToAddress(bakAddress).select(true); - }catch(e){} - - } - } - this.fireEvent('sourcemodechanged', sourceMode); - }, - queryCommandState: function (){ - return sourceMode|0; - }, - notNeedUndo : 1 - }; - var oldQueryCommandState = me.queryCommandState; - - me.queryCommandState = function (cmdName){ - cmdName = cmdName.toLowerCase(); - if (sourceMode) { - //源码模式下可以开启的命令 - return cmdName in { - 'source' : 1, - 'fullscreen' : 1 - } ? 1 : -1 - } - return oldQueryCommandState.apply(this, arguments); - }; - - if(opt.sourceEditor == "codemirror"){ - - me.addListener("ready",function(){ - utils.loadFile(document,{ - src : opt.codeMirrorJsUrl || opt.UEDITOR_HOME_URL + "third-party/codemirror/codemirror.js", - tag : "script", - type : "text/javascript", - defer : "defer" - },function(){ - if(opt.sourceEditorFirst){ - setTimeout(function(){ - me.execCommand("source"); - },0); - } - }); - utils.loadFile(document,{ - tag : "link", - rel : "stylesheet", - type : "text/css", - href : opt.codeMirrorCssUrl || opt.UEDITOR_HOME_URL + "third-party/codemirror/codemirror.css" - }); - - }); - } - - }; - -})(); - -// plugins/enterkey.js -///import core -///import plugins/undo.js -///commands 设置回车标签p或br -///commandsName EnterKey -///commandsTitle 设置回车标签p或br -/** - * @description 处理回车 - * @author zhanyi - */ -UE.plugins['enterkey'] = function() { - var hTag, - me = this, - tag = me.options.enterTag; - me.addListener('keyup', function(type, evt) { - - var keyCode = evt.keyCode || evt.which; - if (keyCode == 13) { - var range = me.selection.getRange(), - start = range.startContainer, - doSave; - - //修正在h1-h6里边回车后不能嵌套p的问题 - if (!browser.ie) { - - if (/h\d/i.test(hTag)) { - if (browser.gecko) { - var h = domUtils.findParentByTagName(start, [ 'h1', 'h2', 'h3', 'h4', 'h5', 'h6','blockquote','caption','table'], true); - if (!h) { - me.document.execCommand('formatBlock', false, '

    '); - doSave = 1; - } - } else { - //chrome remove div - if (start.nodeType == 1) { - var tmp = me.document.createTextNode(''),div; - range.insertNode(tmp); - div = domUtils.findParentByTagName(tmp, 'div', true); - if (div) { - var p = me.document.createElement('p'); - while (div.firstChild) { - p.appendChild(div.firstChild); - } - div.parentNode.insertBefore(p, div); - domUtils.remove(div); - range.setStartBefore(tmp).setCursor(); - doSave = 1; - } - domUtils.remove(tmp); - - } - } - - if (me.undoManger && doSave) { - me.undoManger.save(); - } - } - //没有站位符,会出现多行的问题 - browser.opera && range.select(); - }else{ - me.fireEvent('saveScene',true,true) - } - } - }); - - me.addListener('keydown', function(type, evt) { - var keyCode = evt.keyCode || evt.which; - if (keyCode == 13) {//回车 - if(me.fireEvent('beforeenterkeydown')){ - domUtils.preventDefault(evt); - return; - } - me.fireEvent('saveScene',true,true); - hTag = ''; - - - var range = me.selection.getRange(); - - if (!range.collapsed) { - //跨td不能删 - var start = range.startContainer, - end = range.endContainer, - startTd = domUtils.findParentByTagName(start, 'td', true), - endTd = domUtils.findParentByTagName(end, 'td', true); - if (startTd && endTd && startTd !== endTd || !startTd && endTd || startTd && !endTd) { - evt.preventDefault ? evt.preventDefault() : ( evt.returnValue = false); - return; - } - } - if (tag == 'p') { - - - if (!browser.ie) { - - start = domUtils.findParentByTagName(range.startContainer, ['ol','ul','p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6','blockquote','caption'], true); - - //opera下执行formatblock会在table的场景下有问题,回车在opera原生支持很好,所以暂时在opera去掉调用这个原生的command - //trace:2431 - if (!start && !browser.opera) { - - me.document.execCommand('formatBlock', false, '

    '); - - if (browser.gecko) { - range = me.selection.getRange(); - start = domUtils.findParentByTagName(range.startContainer, 'p', true); - start && domUtils.removeDirtyAttr(start); - } - - - } else { - hTag = start.tagName; - start.tagName.toLowerCase() == 'p' && browser.gecko && domUtils.removeDirtyAttr(start); - } - - } - - } else { - evt.preventDefault ? evt.preventDefault() : ( evt.returnValue = false); - - if (!range.collapsed) { - range.deleteContents(); - start = range.startContainer; - if (start.nodeType == 1 && (start = start.childNodes[range.startOffset])) { - while (start.nodeType == 1) { - if (dtd.$empty[start.tagName]) { - range.setStartBefore(start).setCursor(); - if (me.undoManger) { - me.undoManger.save(); - } - return false; - } - if (!start.firstChild) { - var br = range.document.createElement('br'); - start.appendChild(br); - range.setStart(start, 0).setCursor(); - if (me.undoManger) { - me.undoManger.save(); - } - return false; - } - start = start.firstChild; - } - if (start === range.startContainer.childNodes[range.startOffset]) { - br = range.document.createElement('br'); - range.insertNode(br).setCursor(); - - } else { - range.setStart(start, 0).setCursor(); - } - - - } else { - br = range.document.createElement('br'); - range.insertNode(br).setStartAfter(br).setCursor(); - } - - - } else { - br = range.document.createElement('br'); - range.insertNode(br); - var parent = br.parentNode; - if (parent.lastChild === br) { - br.parentNode.insertBefore(br.cloneNode(true), br); - range.setStartBefore(br); - } else { - range.setStartAfter(br); - } - range.setCursor(); - - } - - } - - } - }); -}; - - -// plugins/keystrokes.js -/* 处理特殊键的兼容性问题 */ -UE.plugins['keystrokes'] = function() { - var me = this; - var collapsed = true; - me.addListener('keydown', function(type, evt) { - var keyCode = evt.keyCode || evt.which, - rng = me.selection.getRange(); - - //处理全选的情况 - if(!rng.collapsed && !(evt.ctrlKey || evt.shiftKey || evt.altKey || evt.metaKey) && (keyCode >= 65 && keyCode <=90 - || keyCode >= 48 && keyCode <= 57 || - keyCode >= 96 && keyCode <= 111 || { - 13:1, - 8:1, - 46:1 - }[keyCode]) - ){ - - var tmpNode = rng.startContainer; - if(domUtils.isFillChar(tmpNode)){ - rng.setStartBefore(tmpNode) - } - tmpNode = rng.endContainer; - if(domUtils.isFillChar(tmpNode)){ - rng.setEndAfter(tmpNode) - } - rng.txtToElmBoundary(); - //结束边界可能放到了br的前边,要把br包含进来 - // x[xxx]
    - if(rng.endContainer && rng.endContainer.nodeType == 1){ - tmpNode = rng.endContainer.childNodes[rng.endOffset]; - if(tmpNode && domUtils.isBr(tmpNode)){ - rng.setEndAfter(tmpNode); - } - } - if(rng.startOffset == 0){ - tmpNode = rng.startContainer; - if(domUtils.isBoundaryNode(tmpNode,'firstChild') ){ - tmpNode = rng.endContainer; - if(rng.endOffset == (tmpNode.nodeType == 3 ? tmpNode.nodeValue.length : tmpNode.childNodes.length) && domUtils.isBoundaryNode(tmpNode,'lastChild')){ - me.fireEvent('saveScene'); - me.body.innerHTML = '

    '+(browser.ie ? '' : '
    ')+'

    '; - rng.setStart(me.body.firstChild,0).setCursor(false,true); - me._selectionChange(); - return; - } - } - } - } - - //处理backspace - if (keyCode == keymap.Backspace) { - rng = me.selection.getRange(); - collapsed = rng.collapsed; - if(me.fireEvent('delkeydown',evt)){ - return; - } - var start,end; - //避免按两次删除才能生效的问题 - if(rng.collapsed && rng.inFillChar()){ - start = rng.startContainer; - - if(domUtils.isFillChar(start)){ - rng.setStartBefore(start).shrinkBoundary(true).collapse(true); - domUtils.remove(start) - }else{ - start.nodeValue = start.nodeValue.replace(new RegExp('^' + domUtils.fillChar ),''); - rng.startOffset--; - rng.collapse(true).select(true) - } - } - - //解决选中control元素不能删除的问题 - if (start = rng.getClosedNode()) { - me.fireEvent('saveScene'); - rng.setStartBefore(start); - domUtils.remove(start); - rng.setCursor(); - me.fireEvent('saveScene'); - domUtils.preventDefault(evt); - return; - } - //阻止在table上的删除 - if (!browser.ie) { - start = domUtils.findParentByTagName(rng.startContainer, 'table', true); - end = domUtils.findParentByTagName(rng.endContainer, 'table', true); - if (start && !end || !start && end || start !== end) { - evt.preventDefault(); - return; - } - } - - } - //处理tab键的逻辑 - if (keyCode == keymap.Tab) { - //不处理以下标签 - var excludeTagNameForTabKey = { - 'ol' : 1, - 'ul' : 1, - 'table':1 - }; - //处理组件里的tab按下事件 - if(me.fireEvent('tabkeydown',evt)){ - domUtils.preventDefault(evt); - return; - } - var range = me.selection.getRange(); - me.fireEvent('saveScene'); - for (var i = 0,txt = '',tabSize = me.options.tabSize|| 4,tabNode = me.options.tabNode || ' '; i < tabSize; i++) { - txt += tabNode; - } - var span = me.document.createElement('span'); - span.innerHTML = txt + domUtils.fillChar; - if (range.collapsed) { - range.insertNode(span.cloneNode(true).firstChild).setCursor(true); - } else { - var filterFn = function(node) { - return domUtils.isBlockElm(node) && !excludeTagNameForTabKey[node.tagName.toLowerCase()] - - }; - //普通的情况 - start = domUtils.findParent(range.startContainer, filterFn,true); - end = domUtils.findParent(range.endContainer, filterFn,true); - if (start && end && start === end) { - range.deleteContents(); - range.insertNode(span.cloneNode(true).firstChild).setCursor(true); - } else { - var bookmark = range.createBookmark(); - range.enlarge(true); - var bookmark2 = range.createBookmark(), - current = domUtils.getNextDomNode(bookmark2.start, false, filterFn); - while (current && !(domUtils.getPosition(current, bookmark2.end) & domUtils.POSITION_FOLLOWING)) { - current.insertBefore(span.cloneNode(true).firstChild, current.firstChild); - current = domUtils.getNextDomNode(current, false, filterFn); - } - range.moveToBookmark(bookmark2).moveToBookmark(bookmark).select(); - } - } - domUtils.preventDefault(evt) - } - //trace:1634 - //ff的del键在容器空的时候,也会删除 - if(browser.gecko && keyCode == 46){ - range = me.selection.getRange(); - if(range.collapsed){ - start = range.startContainer; - if(domUtils.isEmptyBlock(start)){ - var parent = start.parentNode; - while(domUtils.getChildCount(parent) == 1 && !domUtils.isBody(parent)){ - start = parent; - parent = parent.parentNode; - } - if(start === parent.lastChild) - evt.preventDefault(); - return; - } - } - } - }); - me.addListener('keyup', function(type, evt) { - var keyCode = evt.keyCode || evt.which, - rng,me = this; - if(keyCode == keymap.Backspace){ - if(me.fireEvent('delkeyup')){ - return; - } - rng = me.selection.getRange(); - if(rng.collapsed){ - var tmpNode, - autoClearTagName = ['h1','h2','h3','h4','h5','h6']; - if(tmpNode = domUtils.findParentByTagName(rng.startContainer,autoClearTagName,true)){ - if(domUtils.isEmptyBlock(tmpNode)){ - var pre = tmpNode.previousSibling; - if(pre && pre.nodeName != 'TABLE'){ - domUtils.remove(tmpNode); - rng.setStartAtLast(pre).setCursor(false,true); - return; - }else{ - var next = tmpNode.nextSibling; - if(next && next.nodeName != 'TABLE'){ - domUtils.remove(tmpNode); - rng.setStartAtFirst(next).setCursor(false,true); - return; - } - } - } - } - //处理当删除到body时,要重新给p标签展位 - if(domUtils.isBody(rng.startContainer)){ - var tmpNode = domUtils.createElement(me.document,'p',{ - 'innerHTML' : browser.ie ? domUtils.fillChar : '
    ' - }); - rng.insertNode(tmpNode).setStart(tmpNode,0).setCursor(false,true); - } - } - - - //chrome下如果删除了inline标签,浏览器会有记忆,在输入文字还是会套上刚才删除的标签,所以这里再选一次就不会了 - if( !collapsed && (rng.startContainer.nodeType == 3 || rng.startContainer.nodeType == 1 && domUtils.isEmptyBlock(rng.startContainer))){ - if(browser.ie){ - var span = rng.document.createElement('span'); - rng.insertNode(span).setStartBefore(span).collapse(true); - rng.select(); - domUtils.remove(span) - }else{ - rng.select() - } - - } - } - - - }) -}; - -// plugins/fiximgclick.js -///import core -///commands 修复chrome下图片不能点击的问题,出现八个角可改变大小 -///commandsName FixImgClick -///commandsTitle 修复chrome下图片不能点击的问题,出现八个角可改变大小 -//修复chrome下图片不能点击的问题,出现八个角可改变大小 - -UE.plugins['fiximgclick'] = (function () { - - var elementUpdated = false; - function Scale() { - this.editor = null; - this.resizer = null; - this.cover = null; - this.doc = document; - this.prePos = {x: 0, y: 0}; - this.startPos = {x: 0, y: 0}; - } - - (function () { - var rect = [ - //[left, top, width, height] - [0, 0, -1, -1], - [0, 0, 0, -1], - [0, 0, 1, -1], - [0, 0, -1, 0], - [0, 0, 1, 0], - [0, 0, -1, 1], - [0, 0, 0, 1], - [0, 0, 1, 1] - ]; - - Scale.prototype = { - init: function (editor) { - var me = this; - me.editor = editor; - me.startPos = this.prePos = {x: 0, y: 0}; - me.dragId = -1; - - var hands = [], - cover = me.cover = document.createElement('div'), - resizer = me.resizer = document.createElement('div'); - - cover.id = me.editor.ui.id + '_imagescale_cover'; - cover.style.cssText = 'position:absolute;display:none;z-index:' + (me.editor.options.zIndex) + ';filter:alpha(opacity=0); opacity:0;background:#CCC;'; - domUtils.on(cover, 'mousedown click', function () { - me.hide(); - }); - - for (i = 0; i < 8; i++) { - hands.push(''); - } - resizer.id = me.editor.ui.id + '_imagescale'; - resizer.className = 'edui-editor-imagescale'; - resizer.innerHTML = hands.join(''); - resizer.style.cssText += ';display:none;border:1px solid #3b77ff;z-index:' + (me.editor.options.zIndex) + ';'; - - me.editor.ui.getDom().appendChild(cover); - me.editor.ui.getDom().appendChild(resizer); - - me.initStyle(); - me.initEvents(); - }, - initStyle: function () { - utils.cssRule('imagescale', '.edui-editor-imagescale{display:none;position:absolute;border:1px solid #38B2CE;cursor:hand;-webkit-box-sizing: content-box;-moz-box-sizing: content-box;box-sizing: content-box;}' + - '.edui-editor-imagescale span{position:absolute;width:6px;height:6px;overflow:hidden;font-size:0px;display:block;background-color:#3C9DD0;}' - + '.edui-editor-imagescale .edui-editor-imagescale-hand0{cursor:nw-resize;top:0;margin-top:-4px;left:0;margin-left:-4px;}' - + '.edui-editor-imagescale .edui-editor-imagescale-hand1{cursor:n-resize;top:0;margin-top:-4px;left:50%;margin-left:-4px;}' - + '.edui-editor-imagescale .edui-editor-imagescale-hand2{cursor:ne-resize;top:0;margin-top:-4px;left:100%;margin-left:-3px;}' - + '.edui-editor-imagescale .edui-editor-imagescale-hand3{cursor:w-resize;top:50%;margin-top:-4px;left:0;margin-left:-4px;}' - + '.edui-editor-imagescale .edui-editor-imagescale-hand4{cursor:e-resize;top:50%;margin-top:-4px;left:100%;margin-left:-3px;}' - + '.edui-editor-imagescale .edui-editor-imagescale-hand5{cursor:sw-resize;top:100%;margin-top:-3px;left:0;margin-left:-4px;}' - + '.edui-editor-imagescale .edui-editor-imagescale-hand6{cursor:s-resize;top:100%;margin-top:-3px;left:50%;margin-left:-4px;}' - + '.edui-editor-imagescale .edui-editor-imagescale-hand7{cursor:se-resize;top:100%;margin-top:-3px;left:100%;margin-left:-3px;}'); - }, - initEvents: function () { - var me = this; - - me.startPos.x = me.startPos.y = 0; - me.isDraging = false; - }, - _eventHandler: function (e) { - var me = this; - switch (e.type) { - case 'mousedown': - var hand = e.target || e.srcElement, hand; - if (hand.className.indexOf('edui-editor-imagescale-hand') != -1 && me.dragId == -1) { - me.dragId = hand.className.slice(-1); - me.startPos.x = me.prePos.x = e.clientX; - me.startPos.y = me.prePos.y = e.clientY; - domUtils.on(me.doc,'mousemove', me.proxy(me._eventHandler, me)); - } - break; - case 'mousemove': - if (me.dragId != -1) { - me.updateContainerStyle(me.dragId, {x: e.clientX - me.prePos.x, y: e.clientY - me.prePos.y}); - me.prePos.x = e.clientX; - me.prePos.y = e.clientY; - elementUpdated = true; - me.updateTargetElement(); - - } - break; - case 'mouseup': - if (me.dragId != -1) { - me.updateContainerStyle(me.dragId, {x: e.clientX - me.prePos.x, y: e.clientY - me.prePos.y}); - me.updateTargetElement(); - if (me.target.parentNode) me.attachTo(me.target); - me.dragId = -1; - } - domUtils.un(me.doc,'mousemove', me.proxy(me._eventHandler, me)); - //修复只是点击挪动点,但没有改变大小,不应该触发contentchange - if(elementUpdated){ - elementUpdated = false; - me.editor.fireEvent('contentchange'); - } - - break; - default: - break; - } - }, - updateTargetElement: function () { - var me = this; - domUtils.setStyles(me.target, { - 'width': me.resizer.style.width, - 'height': me.resizer.style.height - }); - me.target.width = parseInt(me.resizer.style.width); - me.target.height = parseInt(me.resizer.style.height); - me.attachTo(me.target); - }, - updateContainerStyle: function (dir, offset) { - var me = this, - dom = me.resizer, tmp; - - if (rect[dir][0] != 0) { - tmp = parseInt(dom.style.left) + offset.x; - dom.style.left = me._validScaledProp('left', tmp) + 'px'; - } - if (rect[dir][1] != 0) { - tmp = parseInt(dom.style.top) + offset.y; - dom.style.top = me._validScaledProp('top', tmp) + 'px'; - } - if (rect[dir][2] != 0) { - tmp = dom.clientWidth + rect[dir][2] * offset.x; - dom.style.width = me._validScaledProp('width', tmp) + 'px'; - } - if (rect[dir][3] != 0) { - tmp = dom.clientHeight + rect[dir][3] * offset.y; - dom.style.height = me._validScaledProp('height', tmp) + 'px'; - } - }, - _validScaledProp: function (prop, value) { - var ele = this.resizer, - wrap = document; - - value = isNaN(value) ? 0 : value; - switch (prop) { - case 'left': - return value < 0 ? 0 : (value + ele.clientWidth) > wrap.clientWidth ? wrap.clientWidth - ele.clientWidth : value; - case 'top': - return value < 0 ? 0 : (value + ele.clientHeight) > wrap.clientHeight ? wrap.clientHeight - ele.clientHeight : value; - case 'width': - return value <= 0 ? 1 : (value + ele.offsetLeft) > wrap.clientWidth ? wrap.clientWidth - ele.offsetLeft : value; - case 'height': - return value <= 0 ? 1 : (value + ele.offsetTop) > wrap.clientHeight ? wrap.clientHeight - ele.offsetTop : value; - } - }, - hideCover: function () { - this.cover.style.display = 'none'; - }, - showCover: function () { - var me = this, - editorPos = domUtils.getXY(me.editor.ui.getDom()), - iframePos = domUtils.getXY(me.editor.iframe); - - domUtils.setStyles(me.cover, { - 'width': me.editor.iframe.offsetWidth + 'px', - 'height': me.editor.iframe.offsetHeight + 'px', - 'top': iframePos.y - editorPos.y + 'px', - 'left': iframePos.x - editorPos.x + 'px', - 'position': 'absolute', - 'display': '' - }) - }, - show: function (targetObj) { - var me = this; - me.resizer.style.display = 'block'; - if(targetObj) me.attachTo(targetObj); - - domUtils.on(this.resizer, 'mousedown', me.proxy(me._eventHandler, me)); - domUtils.on(me.doc, 'mouseup', me.proxy(me._eventHandler, me)); - - me.showCover(); - me.editor.fireEvent('afterscaleshow', me); - me.editor.fireEvent('saveScene'); - }, - hide: function () { - var me = this; - me.hideCover(); - me.resizer.style.display = 'none'; - - domUtils.un(me.resizer, 'mousedown', me.proxy(me._eventHandler, me)); - domUtils.un(me.doc, 'mouseup', me.proxy(me._eventHandler, me)); - me.editor.fireEvent('afterscalehide', me); - }, - proxy: function( fn, context ) { - return function(e) { - return fn.apply( context || this, arguments); - }; - }, - attachTo: function (targetObj) { - var me = this, - target = me.target = targetObj, - resizer = this.resizer, - imgPos = domUtils.getXY(target), - iframePos = domUtils.getXY(me.editor.iframe), - editorPos = domUtils.getXY(resizer.parentNode); - - domUtils.setStyles(resizer, { - 'width': target.width + 'px', - 'height': target.height + 'px', - 'left': iframePos.x + imgPos.x - me.editor.document.body.scrollLeft - editorPos.x - parseInt(resizer.style.borderLeftWidth) + 'px', - 'top': iframePos.y + imgPos.y - me.editor.document.body.scrollTop - editorPos.y - parseInt(resizer.style.borderTopWidth) + 'px' - }); - } - } - })(); - - return function () { - var me = this, - imageScale; - - me.setOpt('imageScaleEnabled', true); - - if ( !browser.ie && me.options.imageScaleEnabled) { - me.addListener('click', function (type, e) { - - var range = me.selection.getRange(), - img = range.getClosedNode(); - - if (img && img.tagName == 'IMG' && me.body.contentEditable!="false") { - - if (img.className.indexOf("edui-faked-music") != -1 || - img.getAttribute("anchorname") || - domUtils.hasClass(img, 'loadingclass') || - domUtils.hasClass(img, 'loaderrorclass')) { return } - - if (!imageScale) { - imageScale = new Scale(); - imageScale.init(me); - me.ui.getDom().appendChild(imageScale.resizer); - - var _keyDownHandler = function (e) { - imageScale.hide(); - if(imageScale.target) me.selection.getRange().selectNode(imageScale.target).select(); - }, _mouseDownHandler = function (e) { - var ele = e.target || e.srcElement; - if (ele && (ele.className===undefined || ele.className.indexOf('edui-editor-imagescale') == -1)) { - _keyDownHandler(e); - } - }, timer; - - me.addListener('afterscaleshow', function (e) { - me.addListener('beforekeydown', _keyDownHandler); - me.addListener('beforemousedown', _mouseDownHandler); - domUtils.on(document, 'keydown', _keyDownHandler); - domUtils.on(document,'mousedown', _mouseDownHandler); - me.selection.getNative().removeAllRanges(); - }); - me.addListener('afterscalehide', function (e) { - me.removeListener('beforekeydown', _keyDownHandler); - me.removeListener('beforemousedown', _mouseDownHandler); - domUtils.un(document, 'keydown', _keyDownHandler); - domUtils.un(document,'mousedown', _mouseDownHandler); - var target = imageScale.target; - if (target.parentNode) { - me.selection.getRange().selectNode(target).select(); - } - }); - //TODO 有iframe的情况,mousedown不能往下传。。 - domUtils.on(imageScale.resizer, 'mousedown', function (e) { - me.selection.getNative().removeAllRanges(); - var ele = e.target || e.srcElement; - if (ele && ele.className.indexOf('edui-editor-imagescale-hand') == -1) { - timer = setTimeout(function () { - imageScale.hide(); - if(imageScale.target) me.selection.getRange().selectNode(ele).select(); - }, 200); - } - }); - domUtils.on(imageScale.resizer, 'mouseup', function (e) { - var ele = e.target || e.srcElement; - if (ele && ele.className.indexOf('edui-editor-imagescale-hand') == -1) { - clearTimeout(timer); - } - }); - } - imageScale.show(img); - } else { - if (imageScale && imageScale.resizer.style.display != 'none') imageScale.hide(); - } - }); - } - - if (browser.webkit) { - me.addListener('click', function (type, e) { - if (e.target.tagName == 'IMG' && me.body.contentEditable!="false") { - var range = new dom.Range(me.document); - range.selectNode(e.target).select(); - } - }); - } - } -})(); - -// plugins/autolink.js -///import core -///commands 为非ie浏览器自动添加a标签 -///commandsName AutoLink -///commandsTitle 自动增加链接 -/** - * @description 为非ie浏览器自动添加a标签 - * @author zhanyi - */ - -UE.plugin.register('autolink',function(){ - var cont = 0; - - return !browser.ie ? { - - bindEvents:{ - 'reset' : function(){ - cont = 0; - }, - 'keydown':function(type, evt) { - var me = this; - var keyCode = evt.keyCode || evt.which; - - if (keyCode == 32 || keyCode == 13) { - - var sel = me.selection.getNative(), - range = sel.getRangeAt(0).cloneRange(), - offset, - charCode; - - var start = range.startContainer; - while (start.nodeType == 1 && range.startOffset > 0) { - start = range.startContainer.childNodes[range.startOffset - 1]; - if (!start){ - break; - } - range.setStart(start, start.nodeType == 1 ? start.childNodes.length : start.nodeValue.length); - range.collapse(true); - start = range.startContainer; - } - - do{ - if (range.startOffset == 0) { - start = range.startContainer.previousSibling; - - while (start && start.nodeType == 1) { - start = start.lastChild; - } - if (!start || domUtils.isFillChar(start)){ - break; - } - offset = start.nodeValue.length; - } else { - start = range.startContainer; - offset = range.startOffset; - } - range.setStart(start, offset - 1); - charCode = range.toString().charCodeAt(0); - } while (charCode != 160 && charCode != 32); - - if (range.toString().replace(new RegExp(domUtils.fillChar, 'g'), '').match(/(?:https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)/i)) { - while(range.toString().length){ - if(/^(?:https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)/i.test(range.toString())){ - break; - } - try{ - range.setStart(range.startContainer,range.startOffset+1); - }catch(e){ - //trace:2121 - var start = range.startContainer; - while(!(next = start.nextSibling)){ - if(domUtils.isBody(start)){ - return; - } - start = start.parentNode; - - } - range.setStart(next,0); - - } - - } - //range的开始边界已经在a标签里的不再处理 - if(domUtils.findParentByTagName(range.startContainer,'a',true)){ - return; - } - var a = me.document.createElement('a'),text = me.document.createTextNode(' '),href; - - me.undoManger && me.undoManger.save(); - a.appendChild(range.extractContents()); - a.href = a.innerHTML = a.innerHTML.replace(/<[^>]+>/g,''); - href = a.getAttribute("href").replace(new RegExp(domUtils.fillChar,'g'),''); - href = /^(?:https?:\/\/)/ig.test(href) ? href : "http://"+ href; - a.setAttribute('_src',utils.html(href)); - a.href = utils.html(href); - - range.insertNode(a); - a.parentNode.insertBefore(text, a.nextSibling); - range.setStart(text, 0); - range.collapse(true); - sel.removeAllRanges(); - sel.addRange(range); - me.undoManger && me.undoManger.save(); - } - } - } - } - }:{} - },function(){ - var keyCodes = { - 37:1, 38:1, 39:1, 40:1, - 13:1,32:1 - }; - function checkIsCludeLink(node){ - if(node.nodeType == 3){ - return null - } - if(node.nodeName == 'A'){ - return node; - } - var lastChild = node.lastChild; - - while(lastChild){ - if(lastChild.nodeName == 'A'){ - return lastChild; - } - if(lastChild.nodeType == 3){ - if(domUtils.isWhitespace(lastChild)){ - lastChild = lastChild.previousSibling; - continue; - } - return null - } - lastChild = lastChild.lastChild; - } - } - browser.ie && this.addListener('keyup',function(cmd,evt){ - var me = this,keyCode = evt.keyCode; - if(keyCodes[keyCode]){ - var rng = me.selection.getRange(); - var start = rng.startContainer; - - if(keyCode == 13){ - while(start && !domUtils.isBody(start) && !domUtils.isBlockElm(start)){ - start = start.parentNode; - } - if(start && !domUtils.isBody(start) && start.nodeName == 'P'){ - var pre = start.previousSibling; - if(pre && pre.nodeType == 1){ - var pre = checkIsCludeLink(pre); - if(pre && !pre.getAttribute('_href')){ - domUtils.remove(pre,true); - } - } - } - }else if(keyCode == 32 ){ - if(start.nodeType == 3 && /^\s$/.test(start.nodeValue)){ - start = start.previousSibling; - if(start && start.nodeName == 'A' && !start.getAttribute('_href')){ - domUtils.remove(start,true); - } - } - }else { - start = domUtils.findParentByTagName(start,'a',true); - if(start && !start.getAttribute('_href')){ - var bk = rng.createBookmark(); - - domUtils.remove(start,true); - rng.moveToBookmark(bk).select(true) - } - } - - } - - - }); - } -); - -// plugins/autoheight.js -///import core -///commands 当输入内容超过编辑器高度时,编辑器自动增高 -///commandsName AutoHeight,autoHeightEnabled -///commandsTitle 自动增高 -/** - * @description 自动伸展 - * @author zhanyi - */ -UE.plugins['autoheight'] = function () { - var me = this; - //提供开关,就算加载也可以关闭 - me.autoHeightEnabled = me.options.autoHeightEnabled !== false; - if (!me.autoHeightEnabled) { - return; - } - - var bakOverflow, - lastHeight = 0, - options = me.options, - currentHeight, - timer; - - function adjustHeight() { - var me = this; - clearTimeout(timer); - if(isFullscreen)return; - if (!me.queryCommandState || me.queryCommandState && me.queryCommandState('source') != 1) { - timer = setTimeout(function(){ - - var node = me.body.lastChild; - while(node && node.nodeType != 1){ - node = node.previousSibling; - } - if(node && node.nodeType == 1){ - node.style.clear = 'both'; - currentHeight = Math.max(domUtils.getXY(node).y + node.offsetHeight + 25 ,Math.max(options.minFrameHeight, options.initialFrameHeight)) ; - if (currentHeight != lastHeight) { - if (currentHeight !== parseInt(me.iframe.parentNode.style.height)) { - me.iframe.parentNode.style.height = currentHeight + 'px'; - } - me.body.style.height = currentHeight + 'px'; - lastHeight = currentHeight; - } - domUtils.removeStyle(node,'clear'); - } - - - },50) - } - } - var isFullscreen; - me.addListener('fullscreenchanged',function(cmd,f){ - isFullscreen = f - }); - me.addListener('destroy', function () { - me.removeListener('contentchange afterinserthtml keyup mouseup',adjustHeight) - }); - me.enableAutoHeight = function () { - var me = this; - if (!me.autoHeightEnabled) { - return; - } - var doc = me.document; - me.autoHeightEnabled = true; - bakOverflow = doc.body.style.overflowY; - doc.body.style.overflowY = 'hidden'; - me.addListener('contentchange afterinserthtml keyup mouseup',adjustHeight); - //ff不给事件算得不对 - - setTimeout(function () { - adjustHeight.call(me); - }, browser.gecko ? 100 : 0); - me.fireEvent('autoheightchanged', me.autoHeightEnabled); - }; - me.disableAutoHeight = function () { - - me.body.style.overflowY = bakOverflow || ''; - - me.removeListener('contentchange', adjustHeight); - me.removeListener('keyup', adjustHeight); - me.removeListener('mouseup', adjustHeight); - me.autoHeightEnabled = false; - me.fireEvent('autoheightchanged', me.autoHeightEnabled); - }; - - me.on('setHeight',function(){ - me.disableAutoHeight() - }); - me.addListener('ready', function () { - me.enableAutoHeight(); - //trace:1764 - var timer; - domUtils.on(browser.ie ? me.body : me.document, browser.webkit ? 'dragover' : 'drop', function () { - clearTimeout(timer); - timer = setTimeout(function () { - //trace:3681 - adjustHeight.call(me); - }, 100); - - }); - //修复内容过多时,回到顶部,顶部内容被工具栏遮挡问题 - var lastScrollY; - window.onscroll = function(){ - if(lastScrollY === null){ - lastScrollY = this.scrollY - }else if(this.scrollY == 0 && lastScrollY != 0){ - me.window.scrollTo(0,0); - lastScrollY = null; - } - } - }); - - -}; - - - -// plugins/autofloat.js -///import core -///commands 悬浮工具栏 -///commandsName AutoFloat,autoFloatEnabled -///commandsTitle 悬浮工具栏 -/** - * modified by chengchao01 - * 注意: 引入此功能后,在IE6下会将body的背景图片覆盖掉! - */ -UE.plugins['autofloat'] = function() { - var me = this, - lang = me.getLang(); - me.setOpt({ - topOffset:0 - }); - var optsAutoFloatEnabled = me.options.autoFloatEnabled !== false, - topOffset = me.options.topOffset; - - - //如果不固定toolbar的位置,则直接退出 - if(!optsAutoFloatEnabled){ - return; - } - var uiUtils = UE.ui.uiUtils, - LteIE6 = browser.ie && browser.version <= 6, - quirks = browser.quirks; - - function checkHasUI(){ - if(!UE.ui){ - alert(lang.autofloatMsg); - return 0; - } - return 1; - } - function fixIE6FixedPos(){ - var docStyle = document.body.style; - docStyle.backgroundImage = 'url("about:blank")'; - docStyle.backgroundAttachment = 'fixed'; - } - var bakCssText, - placeHolder = document.createElement('div'), - toolbarBox,orgTop, - getPosition, - flag =true; //ie7模式下需要偏移 - function setFloating(){ - var toobarBoxPos = domUtils.getXY(toolbarBox), - origalFloat = domUtils.getComputedStyle(toolbarBox,'position'), - origalLeft = domUtils.getComputedStyle(toolbarBox,'left'); - toolbarBox.style.width = toolbarBox.offsetWidth + 'px'; - toolbarBox.style.zIndex = me.options.zIndex * 1 + 1; - toolbarBox.parentNode.insertBefore(placeHolder, toolbarBox); - if (LteIE6 || (quirks && browser.ie)) { - if(toolbarBox.style.position != 'absolute'){ - toolbarBox.style.position = 'absolute'; - } - toolbarBox.style.top = (document.body.scrollTop||document.documentElement.scrollTop) - orgTop + topOffset + 'px'; - } else { - if (browser.ie7Compat && flag) { - flag = false; - toolbarBox.style.left = domUtils.getXY(toolbarBox).x - document.documentElement.getBoundingClientRect().left+2 + 'px'; - } - if(toolbarBox.style.position != 'fixed'){ - toolbarBox.style.position = 'fixed'; - toolbarBox.style.top = topOffset +"px"; - ((origalFloat == 'absolute' || origalFloat == 'relative') && parseFloat(origalLeft)) && (toolbarBox.style.left = toobarBoxPos.x + 'px'); - } - } - } - function unsetFloating(){ - flag = true; - if(placeHolder.parentNode){ - placeHolder.parentNode.removeChild(placeHolder); - } - - toolbarBox.style.cssText = bakCssText; - } - - function updateFloating(){ - var rect3 = getPosition(me.container); - var offset=me.options.toolbarTopOffset||0; - if (rect3.top < 0 && rect3.bottom - toolbarBox.offsetHeight > offset) { - setFloating(); - }else{ - unsetFloating(); - } - } - var defer_updateFloating = utils.defer(function(){ - updateFloating(); - },browser.ie ? 200 : 100,true); - - me.addListener('destroy',function(){ - domUtils.un(window, ['scroll','resize'], updateFloating); - me.removeListener('keydown', defer_updateFloating); - }); - - me.addListener('ready', function(){ - if(checkHasUI(me)){ - //加载了ui组件,但在new时,没有加载ui,导致编辑器实例上没有ui类,所以这里做判断 - if(!me.ui){ - return; - } - getPosition = uiUtils.getClientRect; - toolbarBox = me.ui.getDom('toolbarbox'); - orgTop = getPosition(toolbarBox).top; - bakCssText = toolbarBox.style.cssText; - placeHolder.style.height = toolbarBox.offsetHeight + 'px'; - if(LteIE6){ - fixIE6FixedPos(); - } - domUtils.on(window, ['scroll','resize'], updateFloating); - me.addListener('keydown', defer_updateFloating); - - me.addListener('beforefullscreenchange', function (t, enabled){ - if (enabled) { - unsetFloating(); - } - }); - me.addListener('fullscreenchanged', function (t, enabled){ - if (!enabled) { - updateFloating(); - } - }); - me.addListener('sourcemodechanged', function (t, enabled){ - setTimeout(function (){ - updateFloating(); - },0); - }); - me.addListener("clearDoc",function(){ - setTimeout(function(){ - updateFloating(); - },0); - - }) - } - }); -}; - - -// plugins/video.js -/** - * video插件, 为UEditor提供视频插入支持 - * @file - * @since 1.2.6.1 - */ - -UE.plugins['video'] = function (){ - var me =this; - - /** - * 创建插入视频字符窜 - * @param url 视频地址 - * @param width 视频宽度 - * @param height 视频高度 - * @param align 视频对齐 - * @param toEmbed 是否以flash代替显示 - * @param addParagraph 是否需要添加P 标签 - */ - function creatInsertStr(url,width,height,id,align,classname,type){ - - url = utils.unhtmlForUrl(url); - align = utils.unhtml(align); - classname = utils.unhtml(classname).trim(); - - width = parseInt(width, 10) || 0; - height = parseInt(height, 10) || 0; - - var str; - switch (type){ - case 'image': - str = '' - break; - case 'embed': - str = ''; - break; - case 'video': - var ext = url.substr(url.lastIndexOf('.') + 1); - if(ext == 'ogv') ext = 'ogg'; - str = '' + - ''; - break; - } - return str; - } - - function switchImgAndVideo(root,img2video){ - utils.each(root.getNodesByTagName(img2video ? 'img' : 'embed video'),function(node){ - var className = node.getAttr('class'); - if(className && className.indexOf('edui-faked-video') != -1){ - var html = creatInsertStr( img2video ? node.getAttr('_url') : node.getAttr('src'),node.getAttr('width'),node.getAttr('height'),null,node.getStyle('float') || '',className,img2video ? 'embed':'image'); - node.parentNode.replaceChild(UE.uNode.createElement(html),node); - } - if(className && className.indexOf('edui-upload-video') != -1){ - var html = creatInsertStr( img2video ? node.getAttr('_url') : node.getAttr('src'),node.getAttr('width'),node.getAttr('height'),null,node.getStyle('float') || '',className,img2video ? 'video':'image'); - node.parentNode.replaceChild(UE.uNode.createElement(html),node); - } - }) - } - - me.addOutputRule(function(root){ - switchImgAndVideo(root,true) - }); - me.addInputRule(function(root){ - switchImgAndVideo(root) - }); - - /** - * 插入视频 - * @command insertvideo - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { Object } videoAttr 键值对对象, 描述一个视频的所有属性 - * @example - * ```javascript - * - * var videoAttr = { - * //视频地址 - * url: 'http://www.youku.com/xxx', - * //视频宽高值, 单位px - * width: 200, - * height: 100 - * }; - * - * //editor 是编辑器实例 - * //向编辑器插入单个视频 - * editor.execCommand( 'insertvideo', videoAttr ); - * ``` - */ - - /** - * 插入视频 - * @command insertvideo - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { Array } videoArr 需要插入的视频的数组, 其中的每一个元素都是一个键值对对象, 描述了一个视频的所有属性 - * @example - * ```javascript - * - * var videoAttr1 = { - * //视频地址 - * url: 'http://www.youku.com/xxx', - * //视频宽高值, 单位px - * width: 200, - * height: 100 - * }, - * videoAttr2 = { - * //视频地址 - * url: 'http://www.youku.com/xxx', - * //视频宽高值, 单位px - * width: 200, - * height: 100 - * } - * - * //editor 是编辑器实例 - * //该方法将会向编辑器内插入两个视频 - * editor.execCommand( 'insertvideo', [ videoAttr1, videoAttr2 ] ); - * ``` - */ - - /** - * 查询当前光标所在处是否是一个视频 - * @command insertvideo - * @method queryCommandState - * @param { String } cmd 需要查询的命令字符串 - * @return { int } 如果当前光标所在处的元素是一个视频对象, 则返回1,否则返回0 - * @example - * ```javascript - * - * //editor 是编辑器实例 - * editor.queryCommandState( 'insertvideo' ); - * ``` - */ - me.commands["insertvideo"] = { - execCommand: function (cmd, videoObjs, type){ - videoObjs = utils.isArray(videoObjs)?videoObjs:[videoObjs]; - var html = [],id = 'tmpVedio', cl; - for(var i=0,vi,len = videoObjs.length;i 0) { - return 0; - } - for (var i in dtd.$isNotEmpty) if (dtd.$isNotEmpty.hasOwnProperty(i)) { - if (node.getElementsByTagName(i).length) { - return 0; - } - } - return 1; - }; - UETable.getWidth = function (cell) { - if (!cell)return 0; - return parseInt(domUtils.getComputedStyle(cell, "width"), 10); - }; - - /** - * 获取单元格或者单元格组的“对齐”状态。 如果当前的检测对象是一个单元格组, 只有在满足所有单元格的 水平和竖直 对齐属性都相同的 - * 条件时才会返回其状态值,否则将返回null; 如果当前只检测了一个单元格, 则直接返回当前单元格的对齐状态; - * @param table cell or table cells , 支持单个单元格dom对象 或者 单元格dom对象数组 - * @return { align: 'left' || 'right' || 'center', valign: 'top' || 'middle' || 'bottom' } 或者 null - */ - UETable.getTableCellAlignState = function ( cells ) { - - !utils.isArray( cells ) && ( cells = [cells] ); - - var result = {}, - status = ['align', 'valign'], - tempStatus = null, - isSame = true;//状态是否相同 - - utils.each( cells, function( cellNode ){ - - utils.each( status, function( currentState ){ - - tempStatus = cellNode.getAttribute( currentState ); - - if( !result[ currentState ] && tempStatus ) { - result[ currentState ] = tempStatus; - } else if( !result[ currentState ] || ( tempStatus !== result[ currentState ] ) ) { - isSame = false; - return false; - } - - } ); - - return isSame; - - }); - - return isSame ? result : null; - - }; - - /** - * 根据当前选区获取相关的table信息 - * @return {Object} - */ - UETable.getTableItemsByRange = function (editor) { - var start = editor.selection.getStart(); - - //ff下会选中bookmark - if( start && start.id && start.id.indexOf('_baidu_bookmark_start_') === 0 && start.nextSibling) { - start = start.nextSibling; - } - - //在table或者td边缘有可能存在选中tr的情况 - var cell = start && domUtils.findParentByTagName(start, ["td", "th"], true), - tr = cell && cell.parentNode, - caption = start && domUtils.findParentByTagName(start, 'caption', true), - table = caption ? caption.parentNode : tr && tr.parentNode.parentNode; - - return { - cell:cell, - tr:tr, - table:table, - caption:caption - } - }; - UETable.getUETableBySelected = function (editor) { - var table = UETable.getTableItemsByRange(editor).table; - if (table && table.ueTable && table.ueTable.selectedTds.length) { - return table.ueTable; - } - return null; - }; - - UETable.getDefaultValue = function (editor, table) { - var borderMap = { - thin:'0px', - medium:'1px', - thick:'2px' - }, - tableBorder, tdPadding, tdBorder, tmpValue; - if (!table) { - table = editor.document.createElement('table'); - table.insertRow(0).insertCell(0).innerHTML = 'xxx'; - editor.body.appendChild(table); - var td = table.getElementsByTagName('td')[0]; - tmpValue = domUtils.getComputedStyle(table, 'border-left-width'); - tableBorder = parseInt(borderMap[tmpValue] || tmpValue, 10); - tmpValue = domUtils.getComputedStyle(td, 'padding-left'); - tdPadding = parseInt(borderMap[tmpValue] || tmpValue, 10); - tmpValue = domUtils.getComputedStyle(td, 'border-left-width'); - tdBorder = parseInt(borderMap[tmpValue] || tmpValue, 10); - domUtils.remove(table); - return { - tableBorder:tableBorder, - tdPadding:tdPadding, - tdBorder:tdBorder - }; - } else { - td = table.getElementsByTagName('td')[0]; - tmpValue = domUtils.getComputedStyle(table, 'border-left-width'); - tableBorder = parseInt(borderMap[tmpValue] || tmpValue, 10); - tmpValue = domUtils.getComputedStyle(td, 'padding-left'); - tdPadding = parseInt(borderMap[tmpValue] || tmpValue, 10); - tmpValue = domUtils.getComputedStyle(td, 'border-left-width'); - tdBorder = parseInt(borderMap[tmpValue] || tmpValue, 10); - return { - tableBorder:tableBorder, - tdPadding:tdPadding, - tdBorder:tdBorder - }; - } - }; - /** - * 根据当前点击的td或者table获取索引对象 - * @param tdOrTable - */ - UETable.getUETable = function (tdOrTable) { - var tag = tdOrTable.tagName.toLowerCase(); - tdOrTable = (tag == "td" || tag == "th" || tag == 'caption') ? domUtils.findParentByTagName(tdOrTable, "table", true) : tdOrTable; - if (!tdOrTable.ueTable) { - tdOrTable.ueTable = new UETable(tdOrTable); - } - return tdOrTable.ueTable; - }; - - UETable.cloneCell = function(cell,ignoreMerge,keepPro){ - if (!cell || utils.isString(cell)) { - return this.table.ownerDocument.createElement(cell || 'td'); - } - var flag = domUtils.hasClass(cell, "selectTdClass"); - flag && domUtils.removeClasses(cell, "selectTdClass"); - var tmpCell = cell.cloneNode(true); - if (ignoreMerge) { - tmpCell.rowSpan = tmpCell.colSpan = 1; - } - //去掉宽高 - !keepPro && domUtils.removeAttributes(tmpCell,'width height'); - !keepPro && domUtils.removeAttributes(tmpCell,'style'); - - tmpCell.style.borderLeftStyle = ""; - tmpCell.style.borderTopStyle = ""; - tmpCell.style.borderLeftColor = cell.style.borderRightColor; - tmpCell.style.borderLeftWidth = cell.style.borderRightWidth; - tmpCell.style.borderTopColor = cell.style.borderBottomColor; - tmpCell.style.borderTopWidth = cell.style.borderBottomWidth; - flag && domUtils.addClass(cell, "selectTdClass"); - return tmpCell; - } - - UETable.prototype = { - getMaxRows:function () { - var rows = this.table.rows, maxLen = 1; - for (var i = 0, row; row = rows[i]; i++) { - var currentMax = 1; - for (var j = 0, cj; cj = row.cells[j++];) { - currentMax = Math.max(cj.rowSpan || 1, currentMax); - } - maxLen = Math.max(currentMax + i, maxLen); - } - return maxLen; - }, - /** - * 获取当前表格的最大列数 - */ - getMaxCols:function () { - var rows = this.table.rows, maxLen = 0, cellRows = {}; - for (var i = 0, row; row = rows[i]; i++) { - var cellsNum = 0; - for (var j = 0, cj; cj = row.cells[j++];) { - cellsNum += (cj.colSpan || 1); - if (cj.rowSpan && cj.rowSpan > 1) { - for (var k = 1; k < cj.rowSpan; k++) { - if (!cellRows['row_' + (i + k)]) { - cellRows['row_' + (i + k)] = (cj.colSpan || 1); - } else { - cellRows['row_' + (i + k)]++ - } - } - - } - } - cellsNum += cellRows['row_' + i] || 0; - maxLen = Math.max(cellsNum, maxLen); - } - return maxLen; - }, - getCellColIndex:function (cell) { - - }, - /** - * 获取当前cell旁边的单元格, - * @param cell - * @param right - */ - getHSideCell:function (cell, right) { - try { - var cellInfo = this.getCellInfo(cell), - previewRowIndex, previewColIndex; - var len = this.selectedTds.length, - range = this.cellsRange; - //首行或者首列没有前置单元格 - if ((!right && (!len ? !cellInfo.colIndex : !range.beginColIndex)) || (right && (!len ? (cellInfo.colIndex == (this.colsNum - 1)) : (range.endColIndex == this.colsNum - 1)))) return null; - - previewRowIndex = !len ? cellInfo.rowIndex : range.beginRowIndex; - previewColIndex = !right ? ( !len ? (cellInfo.colIndex < 1 ? 0 : (cellInfo.colIndex - 1)) : range.beginColIndex - 1) - : ( !len ? cellInfo.colIndex + 1 : range.endColIndex + 1); - return this.getCell(this.indexTable[previewRowIndex][previewColIndex].rowIndex, this.indexTable[previewRowIndex][previewColIndex].cellIndex); - } catch (e) { - showError(e); - } - }, - getTabNextCell:function (cell, preRowIndex) { - var cellInfo = this.getCellInfo(cell), - rowIndex = preRowIndex || cellInfo.rowIndex, - colIndex = cellInfo.colIndex + 1 + (cellInfo.colSpan - 1), - nextCell; - try { - nextCell = this.getCell(this.indexTable[rowIndex][colIndex].rowIndex, this.indexTable[rowIndex][colIndex].cellIndex); - } catch (e) { - try { - rowIndex = rowIndex * 1 + 1; - colIndex = 0; - nextCell = this.getCell(this.indexTable[rowIndex][colIndex].rowIndex, this.indexTable[rowIndex][colIndex].cellIndex); - } catch (e) { - } - } - return nextCell; - - }, - /** - * 获取视觉上的后置单元格 - * @param cell - * @param bottom - */ - getVSideCell:function (cell, bottom, ignoreRange) { - try { - var cellInfo = this.getCellInfo(cell), - nextRowIndex, nextColIndex; - var len = this.selectedTds.length && !ignoreRange, - range = this.cellsRange; - //末行或者末列没有后置单元格 - if ((!bottom && (cellInfo.rowIndex == 0)) || (bottom && (!len ? (cellInfo.rowIndex + cellInfo.rowSpan > this.rowsNum - 1) : (range.endRowIndex == this.rowsNum - 1)))) return null; - - nextRowIndex = !bottom ? ( !len ? cellInfo.rowIndex - 1 : range.beginRowIndex - 1) - : ( !len ? (cellInfo.rowIndex + cellInfo.rowSpan) : range.endRowIndex + 1); - nextColIndex = !len ? cellInfo.colIndex : range.beginColIndex; - return this.getCell(this.indexTable[nextRowIndex][nextColIndex].rowIndex, this.indexTable[nextRowIndex][nextColIndex].cellIndex); - } catch (e) { - showError(e); - } - }, - /** - * 获取相同结束位置的单元格,xOrY指代了是获取x轴相同还是y轴相同 - */ - getSameEndPosCells:function (cell, xOrY) { - try { - var flag = (xOrY.toLowerCase() === "x"), - end = domUtils.getXY(cell)[flag ? 'x' : 'y'] + cell["offset" + (flag ? 'Width' : 'Height')], - rows = this.table.rows, - cells = null, returns = []; - for (var i = 0; i < this.rowsNum; i++) { - cells = rows[i].cells; - for (var j = 0, tmpCell; tmpCell = cells[j++];) { - var tmpEnd = domUtils.getXY(tmpCell)[flag ? 'x' : 'y'] + tmpCell["offset" + (flag ? 'Width' : 'Height')]; - //对应行的td已经被上面行rowSpan了 - if (tmpEnd > end && flag) break; - if (cell == tmpCell || end == tmpEnd) { - //只获取单一的单元格 - //todo 仅获取单一单元格在特定情况下会造成returns为空,从而影响后续的拖拽实现,修正这个。需考虑性能 - if (tmpCell[flag ? "colSpan" : "rowSpan"] == 1) { - returns.push(tmpCell); - } - if (flag) break; - } - } - } - return returns; - } catch (e) { - showError(e); - } - }, - setCellContent:function (cell, content) { - cell.innerHTML = content || (browser.ie ? domUtils.fillChar : "
    "); - }, - cloneCell:UETable.cloneCell, - /** - * 获取跟当前单元格的右边竖线为左边的所有未合并单元格 - */ - getSameStartPosXCells:function (cell) { - try { - var start = domUtils.getXY(cell).x + cell.offsetWidth, - rows = this.table.rows, cells , returns = []; - for (var i = 0; i < this.rowsNum; i++) { - cells = rows[i].cells; - for (var j = 0, tmpCell; tmpCell = cells[j++];) { - var tmpStart = domUtils.getXY(tmpCell).x; - if (tmpStart > start) break; - if (tmpStart == start && tmpCell.colSpan == 1) { - returns.push(tmpCell); - break; - } - } - } - return returns; - } catch (e) { - showError(e); - } - }, - /** - * 更新table对应的索引表 - */ - update:function (table) { - this.table = table || this.table; - this.selectedTds = []; - this.cellsRange = {}; - this.indexTable = []; - var rows = this.table.rows, - rowsNum = this.getMaxRows(), - dNum = rowsNum - rows.length, - colsNum = this.getMaxCols(); - while (dNum--) { - this.table.insertRow(rows.length); - } - this.rowsNum = rowsNum; - this.colsNum = colsNum; - for (var i = 0, len = rows.length; i < len; i++) { - this.indexTable[i] = new Array(colsNum); - } - //填充索引表 - for (var rowIndex = 0, row; row = rows[rowIndex]; rowIndex++) { - for (var cellIndex = 0, cell, cells = row.cells; cell = cells[cellIndex]; cellIndex++) { - //修正整行被rowSpan时导致的行数计算错误 - if (cell.rowSpan > rowsNum) { - cell.rowSpan = rowsNum; - } - var colIndex = cellIndex, - rowSpan = cell.rowSpan || 1, - colSpan = cell.colSpan || 1; - //当已经被上一行rowSpan或者被前一列colSpan了,则跳到下一个单元格进行 - while (this.indexTable[rowIndex][colIndex]) colIndex++; - for (var j = 0; j < rowSpan; j++) { - for (var k = 0; k < colSpan; k++) { - this.indexTable[rowIndex + j][colIndex + k] = { - rowIndex:rowIndex, - cellIndex:cellIndex, - colIndex:colIndex, - rowSpan:rowSpan, - colSpan:colSpan - } - } - } - } - } - //修复残缺td - for (j = 0; j < rowsNum; j++) { - for (k = 0; k < colsNum; k++) { - if (this.indexTable[j][k] === undefined) { - row = rows[j]; - cell = row.cells[row.cells.length - 1]; - cell = cell ? cell.cloneNode(true) : this.table.ownerDocument.createElement("td"); - this.setCellContent(cell); - if (cell.colSpan !== 1)cell.colSpan = 1; - if (cell.rowSpan !== 1)cell.rowSpan = 1; - row.appendChild(cell); - this.indexTable[j][k] = { - rowIndex:j, - cellIndex:cell.cellIndex, - colIndex:k, - rowSpan:1, - colSpan:1 - } - } - } - } - //当框选后删除行或者列后撤销,需要重建选区。 - var tds = domUtils.getElementsByTagName(this.table, "td"), - selectTds = []; - utils.each(tds, function (td) { - if (domUtils.hasClass(td, "selectTdClass")) { - selectTds.push(td); - } - }); - if (selectTds.length) { - var start = selectTds[0], - end = selectTds[selectTds.length - 1], - startInfo = this.getCellInfo(start), - endInfo = this.getCellInfo(end); - this.selectedTds = selectTds; - this.cellsRange = { - beginRowIndex:startInfo.rowIndex, - beginColIndex:startInfo.colIndex, - endRowIndex:endInfo.rowIndex + endInfo.rowSpan - 1, - endColIndex:endInfo.colIndex + endInfo.colSpan - 1 - }; - } - //给第一行设置firstRow的样式名称,在排序图标的样式上使用到 - if(!domUtils.hasClass(this.table.rows[0], "firstRow")) { - domUtils.addClass(this.table.rows[0], "firstRow"); - for(var i = 1; i< this.table.rows.length; i++) { - domUtils.removeClasses(this.table.rows[i], "firstRow"); - } - } - }, - /** - * 获取单元格的索引信息 - */ - getCellInfo:function (cell) { - if (!cell) return; - var cellIndex = cell.cellIndex, - rowIndex = cell.parentNode.rowIndex, - rowInfo = this.indexTable[rowIndex], - numCols = this.colsNum; - for (var colIndex = cellIndex; colIndex < numCols; colIndex++) { - var cellInfo = rowInfo[colIndex]; - if (cellInfo.rowIndex === rowIndex && cellInfo.cellIndex === cellIndex) { - return cellInfo; - } - } - }, - /** - * 根据行列号获取单元格 - */ - getCell:function (rowIndex, cellIndex) { - return rowIndex < this.rowsNum && this.table.rows[rowIndex].cells[cellIndex] || null; - }, - /** - * 删除单元格 - */ - deleteCell:function (cell, rowIndex) { - rowIndex = typeof rowIndex == 'number' ? rowIndex : cell.parentNode.rowIndex; - var row = this.table.rows[rowIndex]; - row.deleteCell(cell.cellIndex); - }, - /** - * 根据始末两个单元格获取被框选的所有单元格范围 - */ - getCellsRange:function (cellA, cellB) { - function checkRange(beginRowIndex, beginColIndex, endRowIndex, endColIndex) { - var tmpBeginRowIndex = beginRowIndex, - tmpBeginColIndex = beginColIndex, - tmpEndRowIndex = endRowIndex, - tmpEndColIndex = endColIndex, - cellInfo, colIndex, rowIndex; - // 通过indexTable检查是否存在超出TableRange上边界的情况 - if (beginRowIndex > 0) { - for (colIndex = beginColIndex; colIndex < endColIndex; colIndex++) { - cellInfo = me.indexTable[beginRowIndex][colIndex]; - rowIndex = cellInfo.rowIndex; - if (rowIndex < beginRowIndex) { - tmpBeginRowIndex = Math.min(rowIndex, tmpBeginRowIndex); - } - } - } - // 通过indexTable检查是否存在超出TableRange右边界的情况 - if (endColIndex < me.colsNum) { - for (rowIndex = beginRowIndex; rowIndex < endRowIndex; rowIndex++) { - cellInfo = me.indexTable[rowIndex][endColIndex]; - colIndex = cellInfo.colIndex + cellInfo.colSpan - 1; - if (colIndex > endColIndex) { - tmpEndColIndex = Math.max(colIndex, tmpEndColIndex); - } - } - } - // 检查是否有超出TableRange下边界的情况 - if (endRowIndex < me.rowsNum) { - for (colIndex = beginColIndex; colIndex < endColIndex; colIndex++) { - cellInfo = me.indexTable[endRowIndex][colIndex]; - rowIndex = cellInfo.rowIndex + cellInfo.rowSpan - 1; - if (rowIndex > endRowIndex) { - tmpEndRowIndex = Math.max(rowIndex, tmpEndRowIndex); - } - } - } - // 检查是否有超出TableRange左边界的情况 - if (beginColIndex > 0) { - for (rowIndex = beginRowIndex; rowIndex < endRowIndex; rowIndex++) { - cellInfo = me.indexTable[rowIndex][beginColIndex]; - colIndex = cellInfo.colIndex; - if (colIndex < beginColIndex) { - tmpBeginColIndex = Math.min(cellInfo.colIndex, tmpBeginColIndex); - } - } - } - //递归调用直至所有完成所有框选单元格的扩展 - if (tmpBeginRowIndex != beginRowIndex || tmpBeginColIndex != beginColIndex || tmpEndRowIndex != endRowIndex || tmpEndColIndex != endColIndex) { - return checkRange(tmpBeginRowIndex, tmpBeginColIndex, tmpEndRowIndex, tmpEndColIndex); - } else { - // 不需要扩展TableRange的情况 - return { - beginRowIndex:beginRowIndex, - beginColIndex:beginColIndex, - endRowIndex:endRowIndex, - endColIndex:endColIndex - }; - } - } - - try { - var me = this, - cellAInfo = me.getCellInfo(cellA); - if (cellA === cellB) { - return { - beginRowIndex:cellAInfo.rowIndex, - beginColIndex:cellAInfo.colIndex, - endRowIndex:cellAInfo.rowIndex + cellAInfo.rowSpan - 1, - endColIndex:cellAInfo.colIndex + cellAInfo.colSpan - 1 - }; - } - var cellBInfo = me.getCellInfo(cellB); - // 计算TableRange的四个边 - var beginRowIndex = Math.min(cellAInfo.rowIndex, cellBInfo.rowIndex), - beginColIndex = Math.min(cellAInfo.colIndex, cellBInfo.colIndex), - endRowIndex = Math.max(cellAInfo.rowIndex + cellAInfo.rowSpan - 1, cellBInfo.rowIndex + cellBInfo.rowSpan - 1), - endColIndex = Math.max(cellAInfo.colIndex + cellAInfo.colSpan - 1, cellBInfo.colIndex + cellBInfo.colSpan - 1); - - return checkRange(beginRowIndex, beginColIndex, endRowIndex, endColIndex); - } catch (e) { - //throw e; - } - }, - /** - * 依据cellsRange获取对应的单元格集合 - */ - getCells:function (range) { - //每次获取cells之前必须先清除上次的选择,否则会对后续获取操作造成影响 - this.clearSelected(); - var beginRowIndex = range.beginRowIndex, - beginColIndex = range.beginColIndex, - endRowIndex = range.endRowIndex, - endColIndex = range.endColIndex, - cellInfo, rowIndex, colIndex, tdHash = {}, returnTds = []; - for (var i = beginRowIndex; i <= endRowIndex; i++) { - for (var j = beginColIndex; j <= endColIndex; j++) { - cellInfo = this.indexTable[i][j]; - rowIndex = cellInfo.rowIndex; - colIndex = cellInfo.colIndex; - // 如果Cells里已经包含了此Cell则跳过 - var key = rowIndex + '|' + colIndex; - if (tdHash[key]) continue; - tdHash[key] = 1; - if (rowIndex < i || colIndex < j || rowIndex + cellInfo.rowSpan - 1 > endRowIndex || colIndex + cellInfo.colSpan - 1 > endColIndex) { - return null; - } - returnTds.push(this.getCell(rowIndex, cellInfo.cellIndex)); - } - } - return returnTds; - }, - /** - * 清理已经选中的单元格 - */ - clearSelected:function () { - UETable.removeSelectedClass(this.selectedTds); - this.selectedTds = []; - this.cellsRange = {}; - }, - /** - * 根据range设置已经选中的单元格 - */ - setSelected:function (range) { - var cells = this.getCells(range); - UETable.addSelectedClass(cells); - this.selectedTds = cells; - this.cellsRange = range; - }, - isFullRow:function () { - var range = this.cellsRange; - return (range.endColIndex - range.beginColIndex + 1) == this.colsNum; - }, - isFullCol:function () { - var range = this.cellsRange, - table = this.table, - ths = table.getElementsByTagName("th"), - rows = range.endRowIndex - range.beginRowIndex + 1; - return !ths.length ? rows == this.rowsNum : rows == this.rowsNum || (rows == this.rowsNum - 1); - - }, - /** - * 获取视觉上的前置单元格,默认是左边,top传入时 - * @param cell - * @param top - */ - getNextCell:function (cell, bottom, ignoreRange) { - try { - var cellInfo = this.getCellInfo(cell), - nextRowIndex, nextColIndex; - var len = this.selectedTds.length && !ignoreRange, - range = this.cellsRange; - //末行或者末列没有后置单元格 - if ((!bottom && (cellInfo.rowIndex == 0)) || (bottom && (!len ? (cellInfo.rowIndex + cellInfo.rowSpan > this.rowsNum - 1) : (range.endRowIndex == this.rowsNum - 1)))) return null; - - nextRowIndex = !bottom ? ( !len ? cellInfo.rowIndex - 1 : range.beginRowIndex - 1) - : ( !len ? (cellInfo.rowIndex + cellInfo.rowSpan) : range.endRowIndex + 1); - nextColIndex = !len ? cellInfo.colIndex : range.beginColIndex; - return this.getCell(this.indexTable[nextRowIndex][nextColIndex].rowIndex, this.indexTable[nextRowIndex][nextColIndex].cellIndex); - } catch (e) { - showError(e); - } - }, - getPreviewCell:function (cell, top) { - try { - var cellInfo = this.getCellInfo(cell), - previewRowIndex, previewColIndex; - var len = this.selectedTds.length, - range = this.cellsRange; - //首行或者首列没有前置单元格 - if ((!top && (!len ? !cellInfo.colIndex : !range.beginColIndex)) || (top && (!len ? (cellInfo.rowIndex > (this.colsNum - 1)) : (range.endColIndex == this.colsNum - 1)))) return null; - - previewRowIndex = !top ? ( !len ? cellInfo.rowIndex : range.beginRowIndex ) - : ( !len ? (cellInfo.rowIndex < 1 ? 0 : (cellInfo.rowIndex - 1)) : range.beginRowIndex); - previewColIndex = !top ? ( !len ? (cellInfo.colIndex < 1 ? 0 : (cellInfo.colIndex - 1)) : range.beginColIndex - 1) - : ( !len ? cellInfo.colIndex : range.endColIndex + 1); - return this.getCell(this.indexTable[previewRowIndex][previewColIndex].rowIndex, this.indexTable[previewRowIndex][previewColIndex].cellIndex); - } catch (e) { - showError(e); - } - }, - /** - * 移动单元格中的内容 - */ - moveContent:function (cellTo, cellFrom) { - if (UETable.isEmptyBlock(cellFrom)) return; - if (UETable.isEmptyBlock(cellTo)) { - cellTo.innerHTML = cellFrom.innerHTML; - return; - } - var child = cellTo.lastChild; - if (child.nodeType == 3 || !dtd.$block[child.tagName]) { - cellTo.appendChild(cellTo.ownerDocument.createElement('br')) - } - while (child = cellFrom.firstChild) { - cellTo.appendChild(child); - } - }, - /** - * 向右合并单元格 - */ - mergeRight:function (cell) { - var cellInfo = this.getCellInfo(cell), - rightColIndex = cellInfo.colIndex + cellInfo.colSpan, - rightCellInfo = this.indexTable[cellInfo.rowIndex][rightColIndex], - rightCell = this.getCell(rightCellInfo.rowIndex, rightCellInfo.cellIndex); - //合并 - cell.colSpan = cellInfo.colSpan + rightCellInfo.colSpan; - //被合并的单元格不应存在宽度属性 - cell.removeAttribute("width"); - //移动内容 - this.moveContent(cell, rightCell); - //删掉被合并的Cell - this.deleteCell(rightCell, rightCellInfo.rowIndex); - this.update(); - }, - /** - * 向下合并单元格 - */ - mergeDown:function (cell) { - var cellInfo = this.getCellInfo(cell), - downRowIndex = cellInfo.rowIndex + cellInfo.rowSpan, - downCellInfo = this.indexTable[downRowIndex][cellInfo.colIndex], - downCell = this.getCell(downCellInfo.rowIndex, downCellInfo.cellIndex); - cell.rowSpan = cellInfo.rowSpan + downCellInfo.rowSpan; - cell.removeAttribute("height"); - this.moveContent(cell, downCell); - this.deleteCell(downCell, downCellInfo.rowIndex); - this.update(); - }, - /** - * 合并整个range中的内容 - */ - mergeRange:function () { - //由于合并操作可以在任意时刻进行,所以无法通过鼠标位置等信息实时生成range,只能通过缓存实例中的cellsRange对象来访问 - var range = this.cellsRange, - leftTopCell = this.getCell(range.beginRowIndex, this.indexTable[range.beginRowIndex][range.beginColIndex].cellIndex); - - if (leftTopCell.tagName == "TH" && range.endRowIndex !== range.beginRowIndex) { - var index = this.indexTable, - info = this.getCellInfo(leftTopCell); - leftTopCell = this.getCell(1, index[1][info.colIndex].cellIndex); - range = this.getCellsRange(leftTopCell, this.getCell(index[this.rowsNum - 1][info.colIndex].rowIndex, index[this.rowsNum - 1][info.colIndex].cellIndex)); - } - - // 删除剩余的Cells - var cells = this.getCells(range); - for(var i= 0,ci;ci=cells[i++];){ - if (ci !== leftTopCell) { - this.moveContent(leftTopCell, ci); - this.deleteCell(ci); - } - } - // 修改左上角Cell的rowSpan和colSpan,并调整宽度属性设置 - leftTopCell.rowSpan = range.endRowIndex - range.beginRowIndex + 1; - leftTopCell.rowSpan > 1 && leftTopCell.removeAttribute("height"); - leftTopCell.colSpan = range.endColIndex - range.beginColIndex + 1; - leftTopCell.colSpan > 1 && leftTopCell.removeAttribute("width"); - if (leftTopCell.rowSpan == this.rowsNum && leftTopCell.colSpan != 1) { - leftTopCell.colSpan = 1; - } - - if (leftTopCell.colSpan == this.colsNum && leftTopCell.rowSpan != 1) { - var rowIndex = leftTopCell.parentNode.rowIndex; - //解决IE下的表格操作问题 - if( this.table.deleteRow ) { - for (var i = rowIndex+ 1, curIndex=rowIndex+ 1, len=leftTopCell.rowSpan; i < len; i++) { - this.table.deleteRow(curIndex); - } - } else { - for (var i = 0, len=leftTopCell.rowSpan - 1; i < len; i++) { - var row = this.table.rows[rowIndex + 1]; - row.parentNode.removeChild(row); - } - } - leftTopCell.rowSpan = 1; - } - this.update(); - }, - /** - * 插入一行单元格 - */ - insertRow:function (rowIndex, sourceCell) { - var numCols = this.colsNum, - table = this.table, - row = table.insertRow(rowIndex), cell, - isInsertTitle = typeof sourceCell == 'string' && sourceCell.toUpperCase() == 'TH'; - - function replaceTdToTh(colIndex, cell, tableRow) { - if (colIndex == 0) { - var tr = tableRow.nextSibling || tableRow.previousSibling, - th = tr.cells[colIndex]; - if (th.tagName == 'TH') { - th = cell.ownerDocument.createElement("th"); - th.appendChild(cell.firstChild); - tableRow.insertBefore(th, cell); - domUtils.remove(cell) - } - }else{ - if (cell.tagName == 'TH') { - var td = cell.ownerDocument.createElement("td"); - td.appendChild(cell.firstChild); - tableRow.insertBefore(td, cell); - domUtils.remove(cell) - } - } - } - - //首行直接插入,无需考虑部分单元格被rowspan的情况 - if (rowIndex == 0 || rowIndex == this.rowsNum) { - for (var colIndex = 0; colIndex < numCols; colIndex++) { - cell = this.cloneCell(sourceCell, true); - this.setCellContent(cell); - cell.getAttribute('vAlign') && cell.setAttribute('vAlign', cell.getAttribute('vAlign')); - row.appendChild(cell); - if(!isInsertTitle) replaceTdToTh(colIndex, cell, row); - } - } else { - var infoRow = this.indexTable[rowIndex], - cellIndex = 0; - for (colIndex = 0; colIndex < numCols; colIndex++) { - var cellInfo = infoRow[colIndex]; - //如果存在某个单元格的rowspan穿过待插入行的位置,则修改该单元格的rowspan即可,无需插入单元格 - if (cellInfo.rowIndex < rowIndex) { - cell = this.getCell(cellInfo.rowIndex, cellInfo.cellIndex); - cell.rowSpan = cellInfo.rowSpan + 1; - } else { - cell = this.cloneCell(sourceCell, true); - this.setCellContent(cell); - row.appendChild(cell); - } - if(!isInsertTitle) replaceTdToTh(colIndex, cell, row); - } - } - //框选时插入不触发contentchange,需要手动更新索引。 - this.update(); - return row; - }, - /** - * 删除一行单元格 - * @param rowIndex - */ - deleteRow:function (rowIndex) { - var row = this.table.rows[rowIndex], - infoRow = this.indexTable[rowIndex], - colsNum = this.colsNum, - count = 0; //处理计数 - for (var colIndex = 0; colIndex < colsNum;) { - var cellInfo = infoRow[colIndex], - cell = this.getCell(cellInfo.rowIndex, cellInfo.cellIndex); - if (cell.rowSpan > 1) { - if (cellInfo.rowIndex == rowIndex) { - var clone = cell.cloneNode(true); - clone.rowSpan = cell.rowSpan - 1; - clone.innerHTML = ""; - cell.rowSpan = 1; - var nextRowIndex = rowIndex + 1, - nextRow = this.table.rows[nextRowIndex], - insertCellIndex, - preMerged = this.getPreviewMergedCellsNum(nextRowIndex, colIndex) - count; - if (preMerged < colIndex) { - insertCellIndex = colIndex - preMerged - 1; - //nextRow.insertCell(insertCellIndex); - domUtils.insertAfter(nextRow.cells[insertCellIndex], clone); - } else { - if (nextRow.cells.length) nextRow.insertBefore(clone, nextRow.cells[0]) - } - count += 1; - //cell.parentNode.removeChild(cell); - } - } - colIndex += cell.colSpan || 1; - } - var deleteTds = [], cacheMap = {}; - for (colIndex = 0; colIndex < colsNum; colIndex++) { - var tmpRowIndex = infoRow[colIndex].rowIndex, - tmpCellIndex = infoRow[colIndex].cellIndex, - key = tmpRowIndex + "_" + tmpCellIndex; - if (cacheMap[key])continue; - cacheMap[key] = 1; - cell = this.getCell(tmpRowIndex, tmpCellIndex); - deleteTds.push(cell); - } - var mergeTds = []; - utils.each(deleteTds, function (td) { - if (td.rowSpan == 1) { - td.parentNode.removeChild(td); - } else { - mergeTds.push(td); - } - }); - utils.each(mergeTds, function (td) { - td.rowSpan--; - }); - row.parentNode.removeChild(row); - //浏览器方法本身存在bug,采用自定义方法删除 - //this.table.deleteRow(rowIndex); - this.update(); - }, - insertCol:function (colIndex, sourceCell, defaultValue) { - var rowsNum = this.rowsNum, - rowIndex = 0, - tableRow, cell, - backWidth = parseInt((this.table.offsetWidth - (this.colsNum + 1) * 20 - (this.colsNum + 1)) / (this.colsNum + 1), 10), - isInsertTitleCol = typeof sourceCell == 'string' && sourceCell.toUpperCase() == 'TH'; - - function replaceTdToTh(rowIndex, cell, tableRow) { - if (rowIndex == 0) { - var th = cell.nextSibling || cell.previousSibling; - if (th.tagName == 'TH') { - th = cell.ownerDocument.createElement("th"); - th.appendChild(cell.firstChild); - tableRow.insertBefore(th, cell); - domUtils.remove(cell) - } - }else{ - if (cell.tagName == 'TH') { - var td = cell.ownerDocument.createElement("td"); - td.appendChild(cell.firstChild); - tableRow.insertBefore(td, cell); - domUtils.remove(cell) - } - } - } - - var preCell; - if (colIndex == 0 || colIndex == this.colsNum) { - for (; rowIndex < rowsNum; rowIndex++) { - tableRow = this.table.rows[rowIndex]; - preCell = tableRow.cells[colIndex == 0 ? colIndex : tableRow.cells.length]; - cell = this.cloneCell(sourceCell, true); //tableRow.insertCell(colIndex == 0 ? colIndex : tableRow.cells.length); - this.setCellContent(cell); - cell.setAttribute('vAlign', cell.getAttribute('vAlign')); - preCell && cell.setAttribute('width', preCell.getAttribute('width')); - if (!colIndex) { - tableRow.insertBefore(cell, tableRow.cells[0]); - } else { - domUtils.insertAfter(tableRow.cells[tableRow.cells.length - 1], cell); - } - if(!isInsertTitleCol) replaceTdToTh(rowIndex, cell, tableRow) - } - } else { - for (; rowIndex < rowsNum; rowIndex++) { - var cellInfo = this.indexTable[rowIndex][colIndex]; - if (cellInfo.colIndex < colIndex) { - cell = this.getCell(cellInfo.rowIndex, cellInfo.cellIndex); - cell.colSpan = cellInfo.colSpan + 1; - } else { - tableRow = this.table.rows[rowIndex]; - preCell = tableRow.cells[cellInfo.cellIndex]; - - cell = this.cloneCell(sourceCell, true);//tableRow.insertCell(cellInfo.cellIndex); - this.setCellContent(cell); - cell.setAttribute('vAlign', cell.getAttribute('vAlign')); - preCell && cell.setAttribute('width', preCell.getAttribute('width')); - //防止IE下报错 - preCell ? tableRow.insertBefore(cell, preCell) : tableRow.appendChild(cell); - } - if(!isInsertTitleCol) replaceTdToTh(rowIndex, cell, tableRow); - } - } - //框选时插入不触发contentchange,需要手动更新索引 - this.update(); - this.updateWidth(backWidth, defaultValue || {tdPadding:10, tdBorder:1}); - }, - updateWidth:function (width, defaultValue) { - var table = this.table, - tmpWidth = UETable.getWidth(table) - defaultValue.tdPadding * 2 - defaultValue.tdBorder + width; - if (tmpWidth < table.ownerDocument.body.offsetWidth) { - table.setAttribute("width", tmpWidth); - return; - } - var tds = domUtils.getElementsByTagName(this.table, "td th"); - utils.each(tds, function (td) { - td.setAttribute("width", width); - }) - }, - deleteCol:function (colIndex) { - var indexTable = this.indexTable, - tableRows = this.table.rows, - backTableWidth = this.table.getAttribute("width"), - backTdWidth = 0, - rowsNum = this.rowsNum, - cacheMap = {}; - for (var rowIndex = 0; rowIndex < rowsNum;) { - var infoRow = indexTable[rowIndex], - cellInfo = infoRow[colIndex], - key = cellInfo.rowIndex + '_' + cellInfo.colIndex; - // 跳过已经处理过的Cell - if (cacheMap[key])continue; - cacheMap[key] = 1; - var cell = this.getCell(cellInfo.rowIndex, cellInfo.cellIndex); - if (!backTdWidth) backTdWidth = cell && parseInt(cell.offsetWidth / cell.colSpan, 10).toFixed(0); - // 如果Cell的colSpan大于1, 就修改colSpan, 否则就删掉这个Cell - if (cell.colSpan > 1) { - cell.colSpan--; - } else { - tableRows[rowIndex].deleteCell(cellInfo.cellIndex); - } - rowIndex += cellInfo.rowSpan || 1; - } - this.table.setAttribute("width", backTableWidth - backTdWidth); - this.update(); - }, - splitToCells:function (cell) { - var me = this, - cells = this.splitToRows(cell); - utils.each(cells, function (cell) { - me.splitToCols(cell); - }) - }, - splitToRows:function (cell) { - var cellInfo = this.getCellInfo(cell), - rowIndex = cellInfo.rowIndex, - colIndex = cellInfo.colIndex, - results = []; - // 修改Cell的rowSpan - cell.rowSpan = 1; - results.push(cell); - // 补齐单元格 - for (var i = rowIndex, endRow = rowIndex + cellInfo.rowSpan; i < endRow; i++) { - if (i == rowIndex)continue; - var tableRow = this.table.rows[i], - tmpCell = tableRow.insertCell(colIndex - this.getPreviewMergedCellsNum(i, colIndex)); - tmpCell.colSpan = cellInfo.colSpan; - this.setCellContent(tmpCell); - tmpCell.setAttribute('vAlign', cell.getAttribute('vAlign')); - tmpCell.setAttribute('align', cell.getAttribute('align')); - if (cell.style.cssText) { - tmpCell.style.cssText = cell.style.cssText; - } - results.push(tmpCell); - } - this.update(); - return results; - }, - getPreviewMergedCellsNum:function (rowIndex, colIndex) { - var indexRow = this.indexTable[rowIndex], - num = 0; - for (var i = 0; i < colIndex;) { - var colSpan = indexRow[i].colSpan, - tmpRowIndex = indexRow[i].rowIndex; - num += (colSpan - (tmpRowIndex == rowIndex ? 1 : 0)); - i += colSpan; - } - return num; - }, - splitToCols:function (cell) { - var backWidth = (cell.offsetWidth / cell.colSpan - 22).toFixed(0), - - cellInfo = this.getCellInfo(cell), - rowIndex = cellInfo.rowIndex, - colIndex = cellInfo.colIndex, - results = []; - // 修改Cell的rowSpan - cell.colSpan = 1; - cell.setAttribute("width", backWidth); - results.push(cell); - // 补齐单元格 - for (var j = colIndex, endCol = colIndex + cellInfo.colSpan; j < endCol; j++) { - if (j == colIndex)continue; - var tableRow = this.table.rows[rowIndex], - tmpCell = tableRow.insertCell(this.indexTable[rowIndex][j].cellIndex + 1); - tmpCell.rowSpan = cellInfo.rowSpan; - this.setCellContent(tmpCell); - tmpCell.setAttribute('vAlign', cell.getAttribute('vAlign')); - tmpCell.setAttribute('align', cell.getAttribute('align')); - tmpCell.setAttribute('width', backWidth); - if (cell.style.cssText) { - tmpCell.style.cssText = cell.style.cssText; - } - //处理th的情况 - if (cell.tagName == 'TH') { - var th = cell.ownerDocument.createElement('th'); - th.appendChild(tmpCell.firstChild); - th.setAttribute('vAlign', cell.getAttribute('vAlign')); - th.rowSpan = tmpCell.rowSpan; - tableRow.insertBefore(th, tmpCell); - domUtils.remove(tmpCell); - } - results.push(tmpCell); - } - this.update(); - return results; - }, - isLastCell:function (cell, rowsNum, colsNum) { - rowsNum = rowsNum || this.rowsNum; - colsNum = colsNum || this.colsNum; - var cellInfo = this.getCellInfo(cell); - return ((cellInfo.rowIndex + cellInfo.rowSpan) == rowsNum) && - ((cellInfo.colIndex + cellInfo.colSpan) == colsNum); - }, - getLastCell:function (cells) { - cells = cells || this.table.getElementsByTagName("td"); - var firstInfo = this.getCellInfo(cells[0]); - var me = this, last = cells[0], - tr = last.parentNode, - cellsNum = 0, cols = 0, rows; - utils.each(cells, function (cell) { - if (cell.parentNode == tr)cols += cell.colSpan || 1; - cellsNum += cell.rowSpan * cell.colSpan || 1; - }); - rows = cellsNum / cols; - utils.each(cells, function (cell) { - if (me.isLastCell(cell, rows, cols)) { - last = cell; - return false; - } - }); - return last; - - }, - selectRow:function (rowIndex) { - var indexRow = this.indexTable[rowIndex], - start = this.getCell(indexRow[0].rowIndex, indexRow[0].cellIndex), - end = this.getCell(indexRow[this.colsNum - 1].rowIndex, indexRow[this.colsNum - 1].cellIndex), - range = this.getCellsRange(start, end); - this.setSelected(range); - }, - selectTable:function () { - var tds = this.table.getElementsByTagName("td"), - range = this.getCellsRange(tds[0], tds[tds.length - 1]); - this.setSelected(range); - }, - setBackground:function (cells, value) { - if (typeof value === "string") { - utils.each(cells, function (cell) { - cell.style.backgroundColor = value; - }) - } else if (typeof value === "object") { - value = utils.extend({ - repeat:true, - colorList:["#ddd", "#fff"] - }, value); - var rowIndex = this.getCellInfo(cells[0]).rowIndex, - count = 0, - colors = value.colorList, - getColor = function (list, index, repeat) { - return list[index] ? list[index] : repeat ? list[index % list.length] : ""; - }; - for (var i = 0, cell; cell = cells[i++];) { - var cellInfo = this.getCellInfo(cell); - cell.style.backgroundColor = getColor(colors, ((rowIndex + count) == cellInfo.rowIndex) ? count : ++count, value.repeat); - } - } - }, - removeBackground:function (cells) { - utils.each(cells, function (cell) { - cell.style.backgroundColor = ""; - }) - } - - - }; - function showError(e) { - } -})(); - -// plugins/table.cmds.js -/** - * Created with JetBrains PhpStorm. - * User: taoqili - * Date: 13-2-20 - * Time: 下午6:25 - * To change this template use File | Settings | File Templates. - */ -; -(function () { - var UT = UE.UETable, - getTableItemsByRange = function (editor) { - return UT.getTableItemsByRange(editor); - }, - getUETableBySelected = function (editor) { - return UT.getUETableBySelected(editor) - }, - getDefaultValue = function (editor, table) { - return UT.getDefaultValue(editor, table); - }, - getUETable = function (tdOrTable) { - return UT.getUETable(tdOrTable); - }; - - - UE.commands['inserttable'] = { - queryCommandState: function () { - return getTableItemsByRange(this).table ? -1 : 0; - }, - execCommand: function (cmd, opt) { - function createTable(opt, tdWidth) { - var html = [], - rowsNum = opt.numRows, - colsNum = opt.numCols; - for (var r = 0; r < rowsNum; r++) { - html.push(''); - for (var c = 0; c < colsNum; c++) { - html.push('
  • ' + (browser.ie && browser.version < 11 ? domUtils.fillChar : '
    ') + '
    ' + html.join('') + '
    ' - } - - if (!opt) { - opt = utils.extend({}, { - numCols: this.options.defaultCols, - numRows: this.options.defaultRows, - tdvalign: this.options.tdvalign - }) - } - var me = this; - var range = this.selection.getRange(), - start = range.startContainer, - firstParentBlock = domUtils.findParent(start, function (node) { - return domUtils.isBlockElm(node); - }, true) || me.body; - - var defaultValue = getDefaultValue(me), - tableWidth = firstParentBlock.offsetWidth, - tdWidth = Math.floor(tableWidth / opt.numCols - defaultValue.tdPadding * 2 - defaultValue.tdBorder); - - //todo其他属性 - !opt.tdvalign && (opt.tdvalign = me.options.tdvalign); - me.execCommand("inserthtml", createTable(opt, tdWidth)); - } - }; - - UE.commands['insertparagraphbeforetable'] = { - queryCommandState: function () { - return getTableItemsByRange(this).cell ? 0 : -1; - }, - execCommand: function () { - var table = getTableItemsByRange(this).table; - if (table) { - var p = this.document.createElement("p"); - p.innerHTML = browser.ie ? ' ' : '
    '; - table.parentNode.insertBefore(p, table); - this.selection.getRange().setStart(p, 0).setCursor(); - } - } - }; - - UE.commands['deletetable'] = { - queryCommandState: function () { - var rng = this.selection.getRange(); - return domUtils.findParentByTagName(rng.startContainer, 'table', true) ? 0 : -1; - }, - execCommand: function (cmd, table) { - var rng = this.selection.getRange(); - table = table || domUtils.findParentByTagName(rng.startContainer, 'table', true); - if (table) { - var next = table.nextSibling; - if (!next) { - next = domUtils.createElement(this.document, 'p', { - 'innerHTML': browser.ie ? domUtils.fillChar : '
    ' - }); - table.parentNode.insertBefore(next, table); - } - domUtils.remove(table); - rng = this.selection.getRange(); - if (next.nodeType == 3) { - rng.setStartBefore(next) - } else { - rng.setStart(next, 0) - } - rng.setCursor(false, true) - this.fireEvent("tablehasdeleted") - - } - - } - }; - UE.commands['cellalign'] = { - queryCommandState: function () { - return getSelectedArr(this).length ? 0 : -1 - }, - execCommand: function (cmd, align) { - var selectedTds = getSelectedArr(this); - if (selectedTds.length) { - for (var i = 0, ci; ci = selectedTds[i++];) { - ci.setAttribute('align', align); - } - } - } - }; - UE.commands['cellvalign'] = { - queryCommandState: function () { - return getSelectedArr(this).length ? 0 : -1; - }, - execCommand: function (cmd, valign) { - var selectedTds = getSelectedArr(this); - if (selectedTds.length) { - for (var i = 0, ci; ci = selectedTds[i++];) { - ci.setAttribute('vAlign', valign); - } - } - } - }; - UE.commands['insertcaption'] = { - queryCommandState: function () { - var table = getTableItemsByRange(this).table; - if (table) { - return table.getElementsByTagName('caption').length == 0 ? 1 : -1; - } - return -1; - }, - execCommand: function () { - var table = getTableItemsByRange(this).table; - if (table) { - var caption = this.document.createElement('caption'); - caption.innerHTML = browser.ie ? domUtils.fillChar : '
    '; - table.insertBefore(caption, table.firstChild); - var range = this.selection.getRange(); - range.setStart(caption, 0).setCursor(); - } - - } - }; - UE.commands['deletecaption'] = { - queryCommandState: function () { - var rng = this.selection.getRange(), - table = domUtils.findParentByTagName(rng.startContainer, 'table'); - if (table) { - return table.getElementsByTagName('caption').length == 0 ? -1 : 1; - } - return -1; - }, - execCommand: function () { - var rng = this.selection.getRange(), - table = domUtils.findParentByTagName(rng.startContainer, 'table'); - if (table) { - domUtils.remove(table.getElementsByTagName('caption')[0]); - var range = this.selection.getRange(); - range.setStart(table.rows[0].cells[0], 0).setCursor(); - } - - } - }; - UE.commands['inserttitle'] = { - queryCommandState: function () { - var table = getTableItemsByRange(this).table; - if (table) { - var firstRow = table.rows[0]; - return firstRow.cells[firstRow.cells.length-1].tagName.toLowerCase() != 'th' ? 0 : -1 - } - return -1; - }, - execCommand: function () { - var table = getTableItemsByRange(this).table; - if (table) { - getUETable(table).insertRow(0, 'th'); - } - var th = table.getElementsByTagName('th')[0]; - this.selection.getRange().setStart(th, 0).setCursor(false, true); - } - }; - UE.commands['deletetitle'] = { - queryCommandState: function () { - var table = getTableItemsByRange(this).table; - if (table) { - var firstRow = table.rows[0]; - return firstRow.cells[firstRow.cells.length-1].tagName.toLowerCase() == 'th' ? 0 : -1 - } - return -1; - }, - execCommand: function () { - var table = getTableItemsByRange(this).table; - if (table) { - domUtils.remove(table.rows[0]) - } - var td = table.getElementsByTagName('td')[0]; - this.selection.getRange().setStart(td, 0).setCursor(false, true); - } - }; - UE.commands['inserttitlecol'] = { - queryCommandState: function () { - var table = getTableItemsByRange(this).table; - if (table) { - var lastRow = table.rows[table.rows.length-1]; - return lastRow.getElementsByTagName('th').length ? -1 : 0; - } - return -1; - }, - execCommand: function (cmd) { - var table = getTableItemsByRange(this).table; - if (table) { - getUETable(table).insertCol(0, 'th'); - } - resetTdWidth(table, this); - var th = table.getElementsByTagName('th')[0]; - this.selection.getRange().setStart(th, 0).setCursor(false, true); - } - }; - UE.commands['deletetitlecol'] = { - queryCommandState: function () { - var table = getTableItemsByRange(this).table; - if (table) { - var lastRow = table.rows[table.rows.length-1]; - return lastRow.getElementsByTagName('th').length ? 0 : -1; - } - return -1; - }, - execCommand: function () { - var table = getTableItemsByRange(this).table; - if (table) { - for(var i = 0; i< table.rows.length; i++ ){ - domUtils.remove(table.rows[i].children[0]) - } - } - resetTdWidth(table, this); - var td = table.getElementsByTagName('td')[0]; - this.selection.getRange().setStart(td, 0).setCursor(false, true); - } - }; - - UE.commands["mergeright"] = { - queryCommandState: function (cmd) { - var tableItems = getTableItemsByRange(this), - table = tableItems.table, - cell = tableItems.cell; - - if (!table || !cell) return -1; - var ut = getUETable(table); - if (ut.selectedTds.length) return -1; - - var cellInfo = ut.getCellInfo(cell), - rightColIndex = cellInfo.colIndex + cellInfo.colSpan; - if (rightColIndex >= ut.colsNum) return -1; // 如果处于最右边则不能向右合并 - - var rightCellInfo = ut.indexTable[cellInfo.rowIndex][rightColIndex], - rightCell = table.rows[rightCellInfo.rowIndex].cells[rightCellInfo.cellIndex]; - if (!rightCell || cell.tagName != rightCell.tagName) return -1; // TH和TD不能相互合并 - - // 当且仅当两个Cell的开始列号和结束列号一致时能进行合并 - return (rightCellInfo.rowIndex == cellInfo.rowIndex && rightCellInfo.rowSpan == cellInfo.rowSpan) ? 0 : -1; - }, - execCommand: function (cmd) { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell); - ut.mergeRight(cell); - rng.moveToBookmark(bk).select(); - } - }; - UE.commands["mergedown"] = { - queryCommandState: function (cmd) { - var tableItems = getTableItemsByRange(this), - table = tableItems.table, - cell = tableItems.cell; - - if (!table || !cell) return -1; - var ut = getUETable(table); - if (ut.selectedTds.length)return -1; - - var cellInfo = ut.getCellInfo(cell), - downRowIndex = cellInfo.rowIndex + cellInfo.rowSpan; - if (downRowIndex >= ut.rowsNum) return -1; // 如果处于最下边则不能向下合并 - - var downCellInfo = ut.indexTable[downRowIndex][cellInfo.colIndex], - downCell = table.rows[downCellInfo.rowIndex].cells[downCellInfo.cellIndex]; - if (!downCell || cell.tagName != downCell.tagName) return -1; // TH和TD不能相互合并 - - // 当且仅当两个Cell的开始列号和结束列号一致时能进行合并 - return (downCellInfo.colIndex == cellInfo.colIndex && downCellInfo.colSpan == cellInfo.colSpan) ? 0 : -1; - }, - execCommand: function () { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell); - ut.mergeDown(cell); - rng.moveToBookmark(bk).select(); - } - }; - UE.commands["mergecells"] = { - queryCommandState: function () { - return getUETableBySelected(this) ? 0 : -1; - }, - execCommand: function () { - var ut = getUETableBySelected(this); - if (ut && ut.selectedTds.length) { - var cell = ut.selectedTds[0]; - ut.mergeRange(); - var rng = this.selection.getRange(); - if (domUtils.isEmptyBlock(cell)) { - rng.setStart(cell, 0).collapse(true) - } else { - rng.selectNodeContents(cell) - } - rng.select(); - } - - - } - }; - UE.commands["insertrow"] = { - queryCommandState: function () { - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell; - return cell && (cell.tagName == "TD" || (cell.tagName == 'TH' && tableItems.tr !== tableItems.table.rows[0])) && - getUETable(tableItems.table).rowsNum < this.options.maxRowNum ? 0 : -1; - }, - execCommand: function () { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell, - table = tableItems.table, - ut = getUETable(table), - cellInfo = ut.getCellInfo(cell); - //ut.insertRow(!ut.selectedTds.length ? cellInfo.rowIndex:ut.cellsRange.beginRowIndex,''); - if (!ut.selectedTds.length) { - ut.insertRow(cellInfo.rowIndex, cell); - } else { - var range = ut.cellsRange; - for (var i = 0, len = range.endRowIndex - range.beginRowIndex + 1; i < len; i++) { - ut.insertRow(range.beginRowIndex, cell); - } - } - rng.moveToBookmark(bk).select(); - if (table.getAttribute("interlaced") === "enabled")this.fireEvent("interlacetable", table); - } - }; - //后插入行 - UE.commands["insertrownext"] = { - queryCommandState: function () { - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell; - return cell && (cell.tagName == "TD") && getUETable(tableItems.table).rowsNum < this.options.maxRowNum ? 0 : -1; - }, - execCommand: function () { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell, - table = tableItems.table, - ut = getUETable(table), - cellInfo = ut.getCellInfo(cell); - //ut.insertRow(!ut.selectedTds.length? cellInfo.rowIndex + cellInfo.rowSpan : ut.cellsRange.endRowIndex + 1,''); - if (!ut.selectedTds.length) { - ut.insertRow(cellInfo.rowIndex + cellInfo.rowSpan, cell); - } else { - var range = ut.cellsRange; - for (var i = 0, len = range.endRowIndex - range.beginRowIndex + 1; i < len; i++) { - ut.insertRow(range.endRowIndex + 1, cell); - } - } - rng.moveToBookmark(bk).select(); - if (table.getAttribute("interlaced") === "enabled")this.fireEvent("interlacetable", table); - } - }; - UE.commands["deleterow"] = { - queryCommandState: function () { - var tableItems = getTableItemsByRange(this); - return tableItems.cell ? 0 : -1; - }, - execCommand: function () { - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell), - cellsRange = ut.cellsRange, - cellInfo = ut.getCellInfo(cell), - preCell = ut.getVSideCell(cell), - nextCell = ut.getVSideCell(cell, true), - rng = this.selection.getRange(); - if (utils.isEmptyObject(cellsRange)) { - ut.deleteRow(cellInfo.rowIndex); - } else { - for (var i = cellsRange.beginRowIndex; i < cellsRange.endRowIndex + 1; i++) { - ut.deleteRow(cellsRange.beginRowIndex); - } - } - var table = ut.table; - if (!table.getElementsByTagName('td').length) { - var nextSibling = table.nextSibling; - domUtils.remove(table); - if (nextSibling) { - rng.setStart(nextSibling, 0).setCursor(false, true); - } - } else { - if (cellInfo.rowSpan == 1 || cellInfo.rowSpan == cellsRange.endRowIndex - cellsRange.beginRowIndex + 1) { - if (nextCell || preCell) rng.selectNodeContents(nextCell || preCell).setCursor(false, true); - } else { - var newCell = ut.getCell(cellInfo.rowIndex, ut.indexTable[cellInfo.rowIndex][cellInfo.colIndex].cellIndex); - if (newCell) rng.selectNodeContents(newCell).setCursor(false, true); - } - } - if (table.getAttribute("interlaced") === "enabled")this.fireEvent("interlacetable", table); - } - }; - UE.commands["insertcol"] = { - queryCommandState: function (cmd) { - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell; - return cell && (cell.tagName == "TD" || (cell.tagName == 'TH' && cell !== tableItems.tr.cells[0])) && - getUETable(tableItems.table).colsNum < this.options.maxColNum ? 0 : -1; - }, - execCommand: function (cmd) { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - if (this.queryCommandState(cmd) == -1)return; - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell), - cellInfo = ut.getCellInfo(cell); - - //ut.insertCol(!ut.selectedTds.length ? cellInfo.colIndex:ut.cellsRange.beginColIndex); - if (!ut.selectedTds.length) { - ut.insertCol(cellInfo.colIndex, cell); - } else { - var range = ut.cellsRange; - for (var i = 0, len = range.endColIndex - range.beginColIndex + 1; i < len; i++) { - ut.insertCol(range.beginColIndex, cell); - } - } - rng.moveToBookmark(bk).select(true); - } - }; - UE.commands["insertcolnext"] = { - queryCommandState: function () { - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell; - return cell && getUETable(tableItems.table).colsNum < this.options.maxColNum ? 0 : -1; - }, - execCommand: function () { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell), - cellInfo = ut.getCellInfo(cell); - //ut.insertCol(!ut.selectedTds.length ? cellInfo.colIndex + cellInfo.colSpan:ut.cellsRange.endColIndex +1); - if (!ut.selectedTds.length) { - ut.insertCol(cellInfo.colIndex + cellInfo.colSpan, cell); - } else { - var range = ut.cellsRange; - for (var i = 0, len = range.endColIndex - range.beginColIndex + 1; i < len; i++) { - ut.insertCol(range.endColIndex + 1, cell); - } - } - rng.moveToBookmark(bk).select(); - } - }; - - UE.commands["deletecol"] = { - queryCommandState: function () { - var tableItems = getTableItemsByRange(this); - return tableItems.cell ? 0 : -1; - }, - execCommand: function () { - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell), - range = ut.cellsRange, - cellInfo = ut.getCellInfo(cell), - preCell = ut.getHSideCell(cell), - nextCell = ut.getHSideCell(cell, true); - if (utils.isEmptyObject(range)) { - ut.deleteCol(cellInfo.colIndex); - } else { - for (var i = range.beginColIndex; i < range.endColIndex + 1; i++) { - ut.deleteCol(range.beginColIndex); - } - } - var table = ut.table, - rng = this.selection.getRange(); - - if (!table.getElementsByTagName('td').length) { - var nextSibling = table.nextSibling; - domUtils.remove(table); - if (nextSibling) { - rng.setStart(nextSibling, 0).setCursor(false, true); - } - } else { - if (domUtils.inDoc(cell, this.document)) { - rng.setStart(cell, 0).setCursor(false, true); - } else { - if (nextCell && domUtils.inDoc(nextCell, this.document)) { - rng.selectNodeContents(nextCell).setCursor(false, true); - } else { - if (preCell && domUtils.inDoc(preCell, this.document)) { - rng.selectNodeContents(preCell).setCursor(true, true); - } - } - } - } - } - }; - UE.commands["splittocells"] = { - queryCommandState: function () { - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell; - if (!cell) return -1; - var ut = getUETable(tableItems.table); - if (ut.selectedTds.length > 0) return -1; - return cell && (cell.colSpan > 1 || cell.rowSpan > 1) ? 0 : -1; - }, - execCommand: function () { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell); - ut.splitToCells(cell); - rng.moveToBookmark(bk).select(); - } - }; - UE.commands["splittorows"] = { - queryCommandState: function () { - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell; - if (!cell) return -1; - var ut = getUETable(tableItems.table); - if (ut.selectedTds.length > 0) return -1; - return cell && cell.rowSpan > 1 ? 0 : -1; - }, - execCommand: function () { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell); - ut.splitToRows(cell); - rng.moveToBookmark(bk).select(); - } - }; - UE.commands["splittocols"] = { - queryCommandState: function () { - var tableItems = getTableItemsByRange(this), - cell = tableItems.cell; - if (!cell) return -1; - var ut = getUETable(tableItems.table); - if (ut.selectedTds.length > 0) return -1; - return cell && cell.colSpan > 1 ? 0 : -1; - }, - execCommand: function () { - var rng = this.selection.getRange(), - bk = rng.createBookmark(true); - var cell = getTableItemsByRange(this).cell, - ut = getUETable(cell); - ut.splitToCols(cell); - rng.moveToBookmark(bk).select(); - - } - }; - - UE.commands["adaptbytext"] = - UE.commands["adaptbywindow"] = { - queryCommandState: function () { - return getTableItemsByRange(this).table ? 0 : -1 - }, - execCommand: function (cmd) { - var tableItems = getTableItemsByRange(this), - table = tableItems.table; - if (table) { - if (cmd == 'adaptbywindow') { - resetTdWidth(table, this); - } else { - var cells = domUtils.getElementsByTagName(table, "td th"); - utils.each(cells, function (cell) { - cell.removeAttribute("width"); - }); - table.removeAttribute("width"); - } - } - } - }; - - //平均分配各列 - UE.commands['averagedistributecol'] = { - queryCommandState: function () { - var ut = getUETableBySelected(this); - if (!ut) return -1; - return ut.isFullRow() || ut.isFullCol() ? 0 : -1; - }, - execCommand: function (cmd) { - var me = this, - ut = getUETableBySelected(me); - - function getAverageWidth() { - var tb = ut.table, - averageWidth, sumWidth = 0, colsNum = 0, - tbAttr = getDefaultValue(me, tb); - - if (ut.isFullRow()) { - sumWidth = tb.offsetWidth; - colsNum = ut.colsNum; - } else { - var begin = ut.cellsRange.beginColIndex, - end = ut.cellsRange.endColIndex, - node; - for (var i = begin; i <= end;) { - node = ut.selectedTds[i]; - sumWidth += node.offsetWidth; - i += node.colSpan; - colsNum += 1; - } - } - averageWidth = Math.ceil(sumWidth / colsNum) - tbAttr.tdBorder * 2 - tbAttr.tdPadding * 2; - return averageWidth; - } - - function setAverageWidth(averageWidth) { - utils.each(domUtils.getElementsByTagName(ut.table, "th"), function (node) { - node.setAttribute("width", ""); - }); - var cells = ut.isFullRow() ? domUtils.getElementsByTagName(ut.table, "td") : ut.selectedTds; - - utils.each(cells, function (node) { - if (node.colSpan == 1) { - node.setAttribute("width", averageWidth); - } - }); - } - - if (ut && ut.selectedTds.length) { - setAverageWidth(getAverageWidth()); - } - } - }; - //平均分配各行 - UE.commands['averagedistributerow'] = { - queryCommandState: function () { - var ut = getUETableBySelected(this); - if (!ut) return -1; - if (ut.selectedTds && /th/ig.test(ut.selectedTds[0].tagName)) return -1; - return ut.isFullRow() || ut.isFullCol() ? 0 : -1; - }, - execCommand: function (cmd) { - var me = this, - ut = getUETableBySelected(me); - - function getAverageHeight() { - var averageHeight, rowNum, sumHeight = 0, - tb = ut.table, - tbAttr = getDefaultValue(me, tb), - tdpadding = parseInt(domUtils.getComputedStyle(tb.getElementsByTagName('td')[0], "padding-top")); - - if (ut.isFullCol()) { - var captionArr = domUtils.getElementsByTagName(tb, "caption"), - thArr = domUtils.getElementsByTagName(tb, "th"), - captionHeight, thHeight; - - if (captionArr.length > 0) { - captionHeight = captionArr[0].offsetHeight; - } - if (thArr.length > 0) { - thHeight = thArr[0].offsetHeight; - } - - sumHeight = tb.offsetHeight - (captionHeight || 0) - (thHeight || 0); - rowNum = thArr.length == 0 ? ut.rowsNum : (ut.rowsNum - 1); - } else { - var begin = ut.cellsRange.beginRowIndex, - end = ut.cellsRange.endRowIndex, - count = 0, - trs = domUtils.getElementsByTagName(tb, "tr"); - for (var i = begin; i <= end; i++) { - sumHeight += trs[i].offsetHeight; - count += 1; - } - rowNum = count; - } - //ie8下是混杂模式 - if (browser.ie && browser.version < 9) { - averageHeight = Math.ceil(sumHeight / rowNum); - } else { - averageHeight = Math.ceil(sumHeight / rowNum) - tbAttr.tdBorder * 2 - tdpadding * 2; - } - return averageHeight; - } - - function setAverageHeight(averageHeight) { - var cells = ut.isFullCol() ? domUtils.getElementsByTagName(ut.table, "td") : ut.selectedTds; - utils.each(cells, function (node) { - if (node.rowSpan == 1) { - node.setAttribute("height", averageHeight); - } - }); - } - - if (ut && ut.selectedTds.length) { - setAverageHeight(getAverageHeight()); - } - } - }; - - //单元格对齐方式 - UE.commands['cellalignment'] = { - queryCommandState: function () { - return getTableItemsByRange(this).table ? 0 : -1 - }, - execCommand: function (cmd, data) { - var me = this, - ut = getUETableBySelected(me); - - if (!ut) { - var start = me.selection.getStart(), - cell = start && domUtils.findParentByTagName(start, ["td", "th", "caption"], true); - if (!/caption/ig.test(cell.tagName)) { - domUtils.setAttributes(cell, data); - } else { - cell.style.textAlign = data.align; - cell.style.verticalAlign = data.vAlign; - } - me.selection.getRange().setCursor(true); - } else { - utils.each(ut.selectedTds, function (cell) { - domUtils.setAttributes(cell, data); - }); - } - }, - /** - * 查询当前点击的单元格的对齐状态, 如果当前已经选择了多个单元格, 则会返回所有单元格经过统一协调过后的状态 - * @see UE.UETable.getTableCellAlignState - */ - queryCommandValue: function (cmd) { - - var activeMenuCell = getTableItemsByRange( this).cell; - - if( !activeMenuCell ) { - activeMenuCell = getSelectedArr(this)[0]; - } - - if (!activeMenuCell) { - - return null; - - } else { - - //获取同时选中的其他单元格 - var cells = UE.UETable.getUETable(activeMenuCell).selectedTds; - - !cells.length && ( cells = activeMenuCell ); - - return UE.UETable.getTableCellAlignState(cells); - - } - - } - }; - //表格对齐方式 - UE.commands['tablealignment'] = { - queryCommandState: function () { - if (browser.ie && browser.version < 8) { - return -1; - } - return getTableItemsByRange(this).table ? 0 : -1 - }, - execCommand: function (cmd, value) { - var me = this, - start = me.selection.getStart(), - table = start && domUtils.findParentByTagName(start, ["table"], true); - - if (table) { - table.setAttribute("align",value); - } - } - }; - - //表格属性 - UE.commands['edittable'] = { - queryCommandState: function () { - return getTableItemsByRange(this).table ? 0 : -1 - }, - execCommand: function (cmd, color) { - var rng = this.selection.getRange(), - table = domUtils.findParentByTagName(rng.startContainer, 'table'); - if (table) { - var arr = domUtils.getElementsByTagName(table, "td").concat( - domUtils.getElementsByTagName(table, "th"), - domUtils.getElementsByTagName(table, "caption") - ); - utils.each(arr, function (node) { - node.style.borderColor = color; - }); - } - } - }; - //单元格属性 - UE.commands['edittd'] = { - queryCommandState: function () { - return getTableItemsByRange(this).table ? 0 : -1 - }, - execCommand: function (cmd, bkColor) { - var me = this, - ut = getUETableBySelected(me); - - if (!ut) { - var start = me.selection.getStart(), - cell = start && domUtils.findParentByTagName(start, ["td", "th", "caption"], true); - if (cell) { - cell.style.backgroundColor = bkColor; - } - } else { - utils.each(ut.selectedTds, function (cell) { - cell.style.backgroundColor = bkColor; - }); - } - } - }; - - UE.commands["settablebackground"] = { - queryCommandState: function () { - return getSelectedArr(this).length > 1 ? 0 : -1; - }, - execCommand: function (cmd, value) { - var cells, ut; - cells = getSelectedArr(this); - ut = getUETable(cells[0]); - ut.setBackground(cells, value); - } - }; - - UE.commands["cleartablebackground"] = { - queryCommandState: function () { - var cells = getSelectedArr(this); - if (!cells.length)return -1; - for (var i = 0, cell; cell = cells[i++];) { - if (cell.style.backgroundColor !== "") return 0; - } - return -1; - }, - execCommand: function () { - var cells = getSelectedArr(this), - ut = getUETable(cells[0]); - ut.removeBackground(cells); - } - }; - - UE.commands["interlacetable"] = UE.commands["uninterlacetable"] = { - queryCommandState: function (cmd) { - var table = getTableItemsByRange(this).table; - if (!table) return -1; - var interlaced = table.getAttribute("interlaced"); - if (cmd == "interlacetable") { - //TODO 待定 - //是否需要待定,如果设置,则命令只能单次执行成功,但反射具备toggle效果;否则可以覆盖前次命令,但反射将不存在toggle效果 - return (interlaced === "enabled") ? -1 : 0; - } else { - return (!interlaced || interlaced === "disabled") ? -1 : 0; - } - }, - execCommand: function (cmd, classList) { - var table = getTableItemsByRange(this).table; - if (cmd == "interlacetable") { - table.setAttribute("interlaced", "enabled"); - this.fireEvent("interlacetable", table, classList); - } else { - table.setAttribute("interlaced", "disabled"); - this.fireEvent("uninterlacetable", table); - } - } - }; - UE.commands["setbordervisible"] = { - queryCommandState: function (cmd) { - var table = getTableItemsByRange(this).table; - if (!table) return -1; - return 0; - }, - execCommand: function () { - var table = getTableItemsByRange(this).table; - utils.each(domUtils.getElementsByTagName(table,'td'),function(td){ - td.style.borderWidth = '1px'; - td.style.borderStyle = 'solid'; - }) - } - }; - function resetTdWidth(table, editor) { - var tds = domUtils.getElementsByTagName(table,'td th'); - utils.each(tds, function (td) { - td.removeAttribute("width"); - }); - table.setAttribute('width', getTableWidth(editor, true, getDefaultValue(editor, table))); - var tdsWidths = []; - setTimeout(function () { - utils.each(tds, function (td) { - (td.colSpan == 1) && tdsWidths.push(td.offsetWidth) - }) - utils.each(tds, function (td,i) { - (td.colSpan == 1) && td.setAttribute("width", tdsWidths[i] + ""); - }) - }, 0); - } - - function getTableWidth(editor, needIEHack, defaultValue) { - var body = editor.body; - return body.offsetWidth - (needIEHack ? parseInt(domUtils.getComputedStyle(body, 'margin-left'), 10) * 2 : 0) - defaultValue.tableBorder * 2 - (editor.options.offsetWidth || 0); - } - - function getSelectedArr(editor) { - var cell = getTableItemsByRange(editor).cell; - if (cell) { - var ut = getUETable(cell); - return ut.selectedTds.length ? ut.selectedTds : [cell]; - } else { - return []; - } - } -})(); - - -// plugins/table.action.js -/** - * Created with JetBrains PhpStorm. - * User: taoqili - * Date: 12-10-12 - * Time: 上午10:05 - * To change this template use File | Settings | File Templates. - */ -UE.plugins['table'] = function () { - var me = this, - tabTimer = null, - //拖动计时器 - tableDragTimer = null, - //双击计时器 - tableResizeTimer = null, - //单元格最小宽度 - cellMinWidth = 5, - isInResizeBuffer = false, - //单元格边框大小 - cellBorderWidth = 5, - //鼠标偏移距离 - offsetOfTableCell = 10, - //记录在有限时间内的点击状态, 共有3个取值, 0, 1, 2。 0代表未初始化, 1代表单击了1次,2代表2次 - singleClickState = 0, - userActionStatus = null, - //双击允许的时间范围 - dblclickTime = 360, - UT = UE.UETable, - getUETable = function (tdOrTable) { - return UT.getUETable(tdOrTable); - }, - getUETableBySelected = function (editor) { - return UT.getUETableBySelected(editor); - }, - getDefaultValue = function (editor, table) { - return UT.getDefaultValue(editor, table); - }, - removeSelectedClass = function (cells) { - return UT.removeSelectedClass(cells); - }; - - function showError(e) { -// throw e; - } - me.ready(function(){ - var me = this; - var orgGetText = me.selection.getText; - me.selection.getText = function(){ - var table = getUETableBySelected(me); - if(table){ - var str = ''; - utils.each(table.selectedTds,function(td){ - str += td[browser.ie?'innerText':'textContent']; - }) - return str; - }else{ - return orgGetText.call(me.selection) - } - - } - }) - - //处理拖动及框选相关方法 - var startTd = null, //鼠标按下时的锚点td - currentTd = null, //当前鼠标经过时的td - onDrag = "", //指示当前拖动状态,其值可为"","h","v" ,分别表示未拖动状态,横向拖动状态,纵向拖动状态,用于鼠标移动过程中的判断 - onBorder = false, //检测鼠标按下时是否处在单元格边缘位置 - dragButton = null, - dragOver = false, - dragLine = null, //模拟的拖动线 - dragTd = null; //发生拖动的目标td - - var mousedown = false, - //todo 判断混乱模式 - needIEHack = true; - - me.setOpt({ - 'maxColNum':20, - 'maxRowNum':100, - 'defaultCols':5, - 'defaultRows':5, - 'tdvalign':'top', - 'cursorpath':me.options.UEDITOR_HOME_URL + "themes/default/images/cursor_", - 'tableDragable':false, - 'classList':["ue-table-interlace-color-single","ue-table-interlace-color-double"] - }); - me.getUETable = getUETable; - var commands = { - 'deletetable':1, - 'inserttable':1, - 'cellvalign':1, - 'insertcaption':1, - 'deletecaption':1, - 'inserttitle':1, - 'deletetitle':1, - "mergeright":1, - "mergedown":1, - "mergecells":1, - "insertrow":1, - "insertrownext":1, - "deleterow":1, - "insertcol":1, - "insertcolnext":1, - "deletecol":1, - "splittocells":1, - "splittorows":1, - "splittocols":1, - "adaptbytext":1, - "adaptbywindow":1, - "adaptbycustomer":1, - "insertparagraph":1, - "insertparagraphbeforetable":1, - "averagedistributecol":1, - "averagedistributerow":1 - }; - me.ready(function () { - utils.cssRule('table', - //选中的td上的样式 - '.selectTdClass{background-color:#edf5fa !important}' + - 'table.noBorderTable td,table.noBorderTable th,table.noBorderTable caption{border:1px dashed #ddd !important}' + - //插入的表格的默认样式 - 'table{margin-bottom:10px;border-collapse:collapse;display:table;}' + - 'td,th{padding: 5px 10px;border: 1px solid #DDD;}' + - 'caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}' + - 'th{border-top:1px solid #BBB;background-color:#F7F7F7;}' + - 'table tr.firstRow th{border-top-width:2px;}' + - '.ue-table-interlace-color-single{ background-color: #fcfcfc; } .ue-table-interlace-color-double{ background-color: #f7faff; }' + - 'td p{margin:0;padding:0;}', me.document); - - var tableCopyList, isFullCol, isFullRow; - //注册del/backspace事件 - me.addListener('keydown', function (cmd, evt) { - var me = this; - var keyCode = evt.keyCode || evt.which; - - if (keyCode == 8) { - - var ut = getUETableBySelected(me); - if (ut && ut.selectedTds.length) { - - if (ut.isFullCol()) { - me.execCommand('deletecol') - } else if (ut.isFullRow()) { - me.execCommand('deleterow') - } else { - me.fireEvent('delcells'); - } - domUtils.preventDefault(evt); - } - - var caption = domUtils.findParentByTagName(me.selection.getStart(), 'caption', true), - range = me.selection.getRange(); - if (range.collapsed && caption && isEmptyBlock(caption)) { - me.fireEvent('saveScene'); - var table = caption.parentNode; - domUtils.remove(caption); - if (table) { - range.setStart(table.rows[0].cells[0], 0).setCursor(false, true); - } - me.fireEvent('saveScene'); - } - - } - - if (keyCode == 46) { - - ut = getUETableBySelected(me); - if (ut) { - me.fireEvent('saveScene'); - for (var i = 0, ci; ci = ut.selectedTds[i++];) { - domUtils.fillNode(me.document, ci) - } - me.fireEvent('saveScene'); - domUtils.preventDefault(evt); - - } - - } - if (keyCode == 13) { - - var rng = me.selection.getRange(), - caption = domUtils.findParentByTagName(rng.startContainer, 'caption', true); - if (caption) { - var table = domUtils.findParentByTagName(caption, 'table'); - if (!rng.collapsed) { - - rng.deleteContents(); - me.fireEvent('saveScene'); - } else { - if (caption) { - rng.setStart(table.rows[0].cells[0], 0).setCursor(false, true); - } - } - domUtils.preventDefault(evt); - return; - } - if (rng.collapsed) { - var table = domUtils.findParentByTagName(rng.startContainer, 'table'); - if (table) { - var cell = table.rows[0].cells[0], - start = domUtils.findParentByTagName(me.selection.getStart(), ['td', 'th'], true), - preNode = table.previousSibling; - if (cell === start && (!preNode || preNode.nodeType == 1 && preNode.tagName == 'TABLE' ) && domUtils.isStartInblock(rng)) { - var first = domUtils.findParent(me.selection.getStart(), function(n){return domUtils.isBlockElm(n)}, true); - if(first && ( /t(h|d)/i.test(first.tagName) || first === start.firstChild )){ - me.execCommand('insertparagraphbeforetable'); - domUtils.preventDefault(evt); - } - - } - } - } - } - - if ((evt.ctrlKey || evt.metaKey) && evt.keyCode == '67') { - tableCopyList = null; - var ut = getUETableBySelected(me); - if (ut) { - var tds = ut.selectedTds; - isFullCol = ut.isFullCol(); - isFullRow = ut.isFullRow(); - tableCopyList = [ - [ut.cloneCell(tds[0],null,true)] - ]; - for (var i = 1, ci; ci = tds[i]; i++) { - if (ci.parentNode !== tds[i - 1].parentNode) { - tableCopyList.push([ut.cloneCell(ci,null,true)]); - } else { - tableCopyList[tableCopyList.length - 1].push(ut.cloneCell(ci,null,true)); - } - - } - } - } - }); - me.addListener("tablehasdeleted",function(){ - toggleDraggableState(this, false, "", null); - if (dragButton)domUtils.remove(dragButton); - }); - - me.addListener('beforepaste', function (cmd, html) { - var me = this; - var rng = me.selection.getRange(); - if (domUtils.findParentByTagName(rng.startContainer, 'caption', true)) { - var div = me.document.createElement("div"); - div.innerHTML = html.html; - //trace:3729 - html.html = div[browser.ie9below ? 'innerText' : 'textContent']; - return; - } - var table = getUETableBySelected(me); - if (tableCopyList) { - me.fireEvent('saveScene'); - var rng = me.selection.getRange(); - var td = domUtils.findParentByTagName(rng.startContainer, ['td', 'th'], true), tmpNode, preNode; - if (td) { - var ut = getUETable(td); - if (isFullRow) { - var rowIndex = ut.getCellInfo(td).rowIndex; - if (td.tagName == 'TH') { - rowIndex++; - } - for (var i = 0, ci; ci = tableCopyList[i++];) { - var tr = ut.insertRow(rowIndex++, "td"); - for (var j = 0, cj; cj = ci[j]; j++) { - var cell = tr.cells[j]; - if (!cell) { - cell = tr.insertCell(j) - } - cell.innerHTML = cj.innerHTML; - cj.getAttribute('width') && cell.setAttribute('width', cj.getAttribute('width')); - cj.getAttribute('vAlign') && cell.setAttribute('vAlign', cj.getAttribute('vAlign')); - cj.getAttribute('align') && cell.setAttribute('align', cj.getAttribute('align')); - cj.style.cssText && (cell.style.cssText = cj.style.cssText) - } - for (var j = 0, cj; cj = tr.cells[j]; j++) { - if (!ci[j]) - break; - cj.innerHTML = ci[j].innerHTML; - ci[j].getAttribute('width') && cj.setAttribute('width', ci[j].getAttribute('width')); - ci[j].getAttribute('vAlign') && cj.setAttribute('vAlign', ci[j].getAttribute('vAlign')); - ci[j].getAttribute('align') && cj.setAttribute('align', ci[j].getAttribute('align')); - ci[j].style.cssText && (cj.style.cssText = ci[j].style.cssText) - } - } - } else { - if (isFullCol) { - cellInfo = ut.getCellInfo(td); - var maxColNum = 0; - for (var j = 0, ci = tableCopyList[0], cj; cj = ci[j++];) { - maxColNum += cj.colSpan || 1; - } - me.__hasEnterExecCommand = true; - for (i = 0; i < maxColNum; i++) { - me.execCommand('insertcol'); - } - me.__hasEnterExecCommand = false; - td = ut.table.rows[0].cells[cellInfo.cellIndex]; - if (td.tagName == 'TH') { - td = ut.table.rows[1].cells[cellInfo.cellIndex]; - } - } - for (var i = 0, ci; ci = tableCopyList[i++];) { - tmpNode = td; - for (var j = 0, cj; cj = ci[j++];) { - if (td) { - td.innerHTML = cj.innerHTML; - //todo 定制处理 - cj.getAttribute('width') && td.setAttribute('width', cj.getAttribute('width')); - cj.getAttribute('vAlign') && td.setAttribute('vAlign', cj.getAttribute('vAlign')); - cj.getAttribute('align') && td.setAttribute('align', cj.getAttribute('align')); - cj.style.cssText && (td.style.cssText = cj.style.cssText); - preNode = td; - td = td.nextSibling; - } else { - var cloneTd = cj.cloneNode(true); - domUtils.removeAttributes(cloneTd, ['class', 'rowSpan', 'colSpan']); - - preNode.parentNode.appendChild(cloneTd) - } - } - td = ut.getNextCell(tmpNode, true, true); - if (!tableCopyList[i]) - break; - if (!td) { - var cellInfo = ut.getCellInfo(tmpNode); - ut.table.insertRow(ut.table.rows.length); - ut.update(); - td = ut.getVSideCell(tmpNode, true); - } - } - } - ut.update(); - } else { - table = me.document.createElement('table'); - for (var i = 0, ci; ci = tableCopyList[i++];) { - var tr = table.insertRow(table.rows.length); - for (var j = 0, cj; cj = ci[j++];) { - cloneTd = UT.cloneCell(cj,null,true); - domUtils.removeAttributes(cloneTd, ['class']); - tr.appendChild(cloneTd) - } - if (j == 2 && cloneTd.rowSpan > 1) { - cloneTd.rowSpan = 1; - } - } - - var defaultValue = getDefaultValue(me), - width = me.body.offsetWidth - - (needIEHack ? parseInt(domUtils.getComputedStyle(me.body, 'margin-left'), 10) * 2 : 0) - defaultValue.tableBorder * 2 - (me.options.offsetWidth || 0); - me.execCommand('insertHTML', '' + table.innerHTML.replace(/>\s*<').replace(/\bth\b/gi, "td") + '
    ') - } - me.fireEvent('contentchange'); - me.fireEvent('saveScene'); - html.html = ''; - return true; - } else { - var div = me.document.createElement("div"), tables; - div.innerHTML = html.html; - tables = div.getElementsByTagName("table"); - if (domUtils.findParentByTagName(me.selection.getStart(), 'table')) { - utils.each(tables, function (t) { - domUtils.remove(t) - }); - if (domUtils.findParentByTagName(me.selection.getStart(), 'caption', true)) { - div.innerHTML = div[browser.ie ? 'innerText' : 'textContent']; - } - } else { - utils.each(tables, function (table) { - removeStyleSize(table, true); - domUtils.removeAttributes(table, ['style', 'border']); - utils.each(domUtils.getElementsByTagName(table, "td"), function (td) { - if (isEmptyBlock(td)) { - domUtils.fillNode(me.document, td); - } - removeStyleSize(td, true); -// domUtils.removeAttributes(td, ['style']) - }); - }); - } - html.html = div.innerHTML; - } - }); - - me.addListener('afterpaste', function () { - utils.each(domUtils.getElementsByTagName(me.body, "table"), function (table) { - if (table.offsetWidth > me.body.offsetWidth) { - var defaultValue = getDefaultValue(me, table); - table.style.width = me.body.offsetWidth - (needIEHack ? parseInt(domUtils.getComputedStyle(me.body, 'margin-left'), 10) * 2 : 0) - defaultValue.tableBorder * 2 - (me.options.offsetWidth || 0) + 'px' - } - }) - }); - me.addListener('blur', function () { - tableCopyList = null; - }); - var timer; - me.addListener('keydown', function () { - clearTimeout(timer); - timer = setTimeout(function () { - var rng = me.selection.getRange(), - cell = domUtils.findParentByTagName(rng.startContainer, ['th', 'td'], true); - if (cell) { - var table = cell.parentNode.parentNode.parentNode; - if (table.offsetWidth > table.getAttribute("width")) { - cell.style.wordBreak = "break-all"; - } - } - - }, 100); - }); - me.addListener("selectionchange", function () { - toggleDraggableState(me, false, "", null); - }); - - - //内容变化时触发索引更新 - //todo 可否考虑标记检测,如果不涉及表格的变化就不进行索引重建和更新 - me.addListener("contentchange", function () { - var me = this; - //尽可能排除一些不需要更新的状况 - hideDragLine(me); - if (getUETableBySelected(me))return; - var rng = me.selection.getRange(); - var start = rng.startContainer; - start = domUtils.findParentByTagName(start, ['td', 'th'], true); - utils.each(domUtils.getElementsByTagName(me.document, 'table'), function (table) { - if (me.fireEvent("excludetable", table) === true) return; - table.ueTable = new UT(table); - //trace:3742 -// utils.each(domUtils.getElementsByTagName(me.document, 'td'), function (td) { -// -// if (domUtils.isEmptyBlock(td) && td !== start) { -// domUtils.fillNode(me.document, td); -// if (browser.ie && browser.version == 6) { -// td.innerHTML = ' ' -// } -// } -// }); -// utils.each(domUtils.getElementsByTagName(me.document, 'th'), function (th) { -// if (domUtils.isEmptyBlock(th) && th !== start) { -// domUtils.fillNode(me.document, th); -// if (browser.ie && browser.version == 6) { -// th.innerHTML = ' ' -// } -// } -// }); - table.onmouseover = function () { - me.fireEvent('tablemouseover', table); - }; - table.onmousemove = function () { - me.fireEvent('tablemousemove', table); - me.options.tableDragable && toggleDragButton(true, this, me); - utils.defer(function(){ - me.fireEvent('contentchange',50) - },true) - }; - table.onmouseout = function () { - me.fireEvent('tablemouseout', table); - toggleDraggableState(me, false, "", null); - hideDragLine(me); - }; - table.onclick = function (evt) { - evt = me.window.event || evt; - var target = getParentTdOrTh(evt.target || evt.srcElement); - if (!target)return; - var ut = getUETable(target), - table = ut.table, - cellInfo = ut.getCellInfo(target), - cellsRange, - rng = me.selection.getRange(); -// if ("topLeft" == inPosition(table, mouseCoords(evt))) { -// cellsRange = ut.getCellsRange(ut.table.rows[0].cells[0], ut.getLastCell()); -// ut.setSelected(cellsRange); -// return; -// } -// if ("bottomRight" == inPosition(table, mouseCoords(evt))) { -// -// return; -// } - if (inTableSide(table, target, evt, true)) { - var endTdCol = ut.getCell(ut.indexTable[ut.rowsNum - 1][cellInfo.colIndex].rowIndex, ut.indexTable[ut.rowsNum - 1][cellInfo.colIndex].cellIndex); - if (evt.shiftKey && ut.selectedTds.length) { - if (ut.selectedTds[0] !== endTdCol) { - cellsRange = ut.getCellsRange(ut.selectedTds[0], endTdCol); - ut.setSelected(cellsRange); - } else { - rng && rng.selectNodeContents(endTdCol).select(); - } - } else { - if (target !== endTdCol) { - cellsRange = ut.getCellsRange(target, endTdCol); - ut.setSelected(cellsRange); - } else { - rng && rng.selectNodeContents(endTdCol).select(); - } - } - return; - } - if (inTableSide(table, target, evt)) { - var endTdRow = ut.getCell(ut.indexTable[cellInfo.rowIndex][ut.colsNum - 1].rowIndex, ut.indexTable[cellInfo.rowIndex][ut.colsNum - 1].cellIndex); - if (evt.shiftKey && ut.selectedTds.length) { - if (ut.selectedTds[0] !== endTdRow) { - cellsRange = ut.getCellsRange(ut.selectedTds[0], endTdRow); - ut.setSelected(cellsRange); - } else { - rng && rng.selectNodeContents(endTdRow).select(); - } - } else { - if (target !== endTdRow) { - cellsRange = ut.getCellsRange(target, endTdRow); - ut.setSelected(cellsRange); - } else { - rng && rng.selectNodeContents(endTdRow).select(); - } - } - } - }; - }); - - switchBorderColor(me, true); - }); - - domUtils.on(me.document, "mousemove", mouseMoveEvent); - - domUtils.on(me.document, "mouseout", function (evt) { - var target = evt.target || evt.srcElement; - if (target.tagName == "TABLE") { - toggleDraggableState(me, false, "", null); - } - }); - /** - * 表格隔行变色 - */ - me.addListener("interlacetable",function(type,table,classList){ - if(!table) return; - var me = this, - rows = table.rows, - len = rows.length, - getClass = function(list,index,repeat){ - return list[index] ? list[index] : repeat ? list[index % list.length]: ""; - }; - for(var i = 0;i 1 ? currentRowIndex : ua.getCellInfo(cell).rowIndex; - var nextCell = ua.getTabNextCell(cell, currentRowIndex); - if (nextCell) { - if (isEmptyBlock(nextCell)) { - range.setStart(nextCell, 0).setCursor(false, true) - } else { - range.selectNodeContents(nextCell).select() - } - } else { - me.fireEvent('saveScene'); - me.__hasEnterExecCommand = true; - this.execCommand('insertrownext'); - me.__hasEnterExecCommand = false; - range = this.selection.getRange(); - range.setStart(table.rows[table.rows.length - 1].cells[0], 0).setCursor(); - me.fireEvent('saveScene'); - } - } - return true; - } - - }); - browser.ie && me.addListener('selectionchange', function () { - toggleDraggableState(this, false, "", null); - }); - me.addListener("keydown", function (type, evt) { - var me = this; - //处理在表格的最后一个输入tab产生新的表格 - var keyCode = evt.keyCode || evt.which; - if (keyCode == 8 || keyCode == 46) { - return; - } - var notCtrlKey = !evt.ctrlKey && !evt.metaKey && !evt.shiftKey && !evt.altKey; - notCtrlKey && removeSelectedClass(domUtils.getElementsByTagName(me.body, "td")); - var ut = getUETableBySelected(me); - if (!ut) return; - notCtrlKey && ut.clearSelected(); - }); - - me.addListener("beforegetcontent", function () { - switchBorderColor(this, false); - browser.ie && utils.each(this.document.getElementsByTagName('caption'), function (ci) { - if (domUtils.isEmptyNode(ci)) { - ci.innerHTML = ' ' - } - }); - }); - me.addListener("aftergetcontent", function () { - switchBorderColor(this, true); - }); - me.addListener("getAllHtml", function () { - removeSelectedClass(me.document.getElementsByTagName("td")); - }); - //修正全屏状态下插入的表格宽度在非全屏状态下撑开编辑器的情况 - me.addListener("fullscreenchanged", function (type, fullscreen) { - if (!fullscreen) { - var ratio = this.body.offsetWidth / document.body.offsetWidth, - tables = domUtils.getElementsByTagName(this.body, "table"); - utils.each(tables, function (table) { - if (table.offsetWidth < me.body.offsetWidth) return false; - var tds = domUtils.getElementsByTagName(table, "td"), - backWidths = []; - utils.each(tds, function (td) { - backWidths.push(td.offsetWidth); - }); - for (var i = 0, td; td = tds[i]; i++) { - td.setAttribute("width", Math.floor(backWidths[i] * ratio)); - } - table.setAttribute("width", Math.floor(getTableWidth(me, needIEHack, getDefaultValue(me)))) - }); - } - }); - - //重写execCommand命令,用于处理框选时的处理 - var oldExecCommand = me.execCommand; - me.execCommand = function (cmd, datatat) { - - var me = this, - args = arguments; - - cmd = cmd.toLowerCase(); - var ut = getUETableBySelected(me), tds, - range = new dom.Range(me.document), - cmdFun = me.commands[cmd] || UE.commands[cmd], - result; - if (!cmdFun) return; - if (ut && !commands[cmd] && !cmdFun.notNeedUndo && !me.__hasEnterExecCommand) { - me.__hasEnterExecCommand = true; - me.fireEvent("beforeexeccommand", cmd); - tds = ut.selectedTds; - var lastState = -2, lastValue = -2, value, state; - for (var i = 0, td; td = tds[i]; i++) { - if (isEmptyBlock(td)) { - range.setStart(td, 0).setCursor(false, true) - } else { - range.selectNode(td).select(true); - } - state = me.queryCommandState(cmd); - value = me.queryCommandValue(cmd); - if (state != -1) { - if (lastState !== state || lastValue !== value) { - me._ignoreContentChange = true; - result = oldExecCommand.apply(me, arguments); - me._ignoreContentChange = false; - - } - lastState = me.queryCommandState(cmd); - lastValue = me.queryCommandValue(cmd); - if (domUtils.isEmptyBlock(td)) { - domUtils.fillNode(me.document, td) - } - } - } - range.setStart(tds[0], 0).shrinkBoundary(true).setCursor(false, true); - me.fireEvent('contentchange'); - me.fireEvent("afterexeccommand", cmd); - me.__hasEnterExecCommand = false; - me._selectionChange(); - } else { - result = oldExecCommand.apply(me, arguments); - } - return result; - }; - - - }); - /** - * 删除obj的宽高style,改成属性宽高 - * @param obj - * @param replaceToProperty - */ - function removeStyleSize(obj, replaceToProperty) { - removeStyle(obj, "width", true); - removeStyle(obj, "height", true); - } - - function removeStyle(obj, styleName, replaceToProperty) { - if (obj.style[styleName]) { - replaceToProperty && obj.setAttribute(styleName, parseInt(obj.style[styleName], 10)); - obj.style[styleName] = ""; - } - } - - function getParentTdOrTh(ele) { - if (ele.tagName == "TD" || ele.tagName == "TH") return ele; - var td; - if (td = domUtils.findParentByTagName(ele, "td", true) || domUtils.findParentByTagName(ele, "th", true)) return td; - return null; - } - - function isEmptyBlock(node) { - var reg = new RegExp(domUtils.fillChar, 'g'); - if (node[browser.ie ? 'innerText' : 'textContent'].replace(/^\s*$/, '').replace(reg, '').length > 0) { - return 0; - } - for (var n in dtd.$isNotEmpty) { - if (node.getElementsByTagName(n).length) { - return 0; - } - } - return 1; - } - - - function mouseCoords(evt) { - if (evt.pageX || evt.pageY) { - return { x:evt.pageX, y:evt.pageY }; - } - return { - x:evt.clientX + me.document.body.scrollLeft - me.document.body.clientLeft, - y:evt.clientY + me.document.body.scrollTop - me.document.body.clientTop - }; - } - - function mouseMoveEvent(evt) { - - if( isEditorDisabled() ) { - return; - } - - try { - - //普通状态下鼠标移动 - var target = getParentTdOrTh(evt.target || evt.srcElement), - pos; - - //区分用户的行为是拖动还是双击 - if( isInResizeBuffer ) { - - me.body.style.webkitUserSelect = 'none'; - - if( Math.abs( userActionStatus.x - evt.clientX ) > offsetOfTableCell || Math.abs( userActionStatus.y - evt.clientY ) > offsetOfTableCell ) { - clearTableDragTimer(); - isInResizeBuffer = false; - singleClickState = 0; - //drag action - tableBorderDrag(evt); - } - } - - //修改单元格大小时的鼠标移动 - if (onDrag && dragTd) { - singleClickState = 0; - me.body.style.webkitUserSelect = 'none'; - me.selection.getNative()[browser.ie9below ? 'empty' : 'removeAllRanges'](); - pos = mouseCoords(evt); - toggleDraggableState(me, true, onDrag, pos, target); - if (onDrag == "h") { - dragLine.style.left = getPermissionX(dragTd, evt) + "px"; - } else if (onDrag == "v") { - dragLine.style.top = getPermissionY(dragTd, evt) + "px"; - } - return; - } - //当鼠标处于table上时,修改移动过程中的光标状态 - if (target) { - //针对使用table作为容器的组件不触发拖拽效果 - if (me.fireEvent('excludetable', target) === true) - return; - pos = mouseCoords(evt); - var state = getRelation(target, pos), - table = domUtils.findParentByTagName(target, "table", true); - - if (inTableSide(table, target, evt, true)) { - if (me.fireEvent("excludetable", table) === true) return; - me.body.style.cursor = "url(" + me.options.cursorpath + "h.png),pointer"; - } else if (inTableSide(table, target, evt)) { - if (me.fireEvent("excludetable", table) === true) return; - me.body.style.cursor = "url(" + me.options.cursorpath + "v.png),pointer"; - } else { - me.body.style.cursor = "text"; - var curCell = target; - if (/\d/.test(state)) { - state = state.replace(/\d/, ''); - target = getUETable(target).getPreviewCell(target, state == "v"); - } - //位于第一行的顶部或者第一列的左边时不可拖动 - toggleDraggableState(me, target ? !!state : false, target ? state : '', pos, target); - - } - } else { - toggleDragButton(false, table, me); - } - - } catch (e) { - showError(e); - } - } - - var dragButtonTimer; - - function toggleDragButton(show, table, editor) { - if (!show) { - if (dragOver)return; - dragButtonTimer = setTimeout(function () { - !dragOver && dragButton && dragButton.parentNode && dragButton.parentNode.removeChild(dragButton); - }, 2000); - } else { - createDragButton(table, editor); - } - } - - function createDragButton(table, editor) { - var pos = domUtils.getXY(table), - doc = table.ownerDocument; - if (dragButton && dragButton.parentNode)return dragButton; - dragButton = doc.createElement("div"); - dragButton.contentEditable = false; - dragButton.innerHTML = ""; - dragButton.style.cssText = "width:15px;height:15px;background-image:url(" + editor.options.UEDITOR_HOME_URL + "dialogs/table/dragicon.png);position: absolute;cursor:move;top:" + (pos.y - 15) + "px;left:" + (pos.x) + "px;"; - domUtils.unSelectable(dragButton); - dragButton.onmouseover = function (evt) { - dragOver = true; - }; - dragButton.onmouseout = function (evt) { - dragOver = false; - }; - domUtils.on(dragButton, 'click', function (type, evt) { - doClick(evt, this); - }); - domUtils.on(dragButton, 'dblclick', function (type, evt) { - doDblClick(evt); - }); - domUtils.on(dragButton, 'dragstart', function (type, evt) { - domUtils.preventDefault(evt); - }); - var timer; - - function doClick(evt, button) { - // 部分浏览器下需要清理 - clearTimeout(timer); - timer = setTimeout(function () { - editor.fireEvent("tableClicked", table, button); - }, 300); - } - - function doDblClick(evt) { - clearTimeout(timer); - var ut = getUETable(table), - start = table.rows[0].cells[0], - end = ut.getLastCell(), - range = ut.getCellsRange(start, end); - editor.selection.getRange().setStart(start, 0).setCursor(false, true); - ut.setSelected(range); - } - - doc.body.appendChild(dragButton); - } - - -// function inPosition(table, pos) { -// var tablePos = domUtils.getXY(table), -// width = table.offsetWidth, -// height = table.offsetHeight; -// if (pos.x - tablePos.x < 5 && pos.y - tablePos.y < 5) { -// return "topLeft"; -// } else if (tablePos.x + width - pos.x < 5 && tablePos.y + height - pos.y < 5) { -// return "bottomRight"; -// } -// } - - function inTableSide(table, cell, evt, top) { - var pos = mouseCoords(evt), - state = getRelation(cell, pos); - - if (top) { - var caption = table.getElementsByTagName("caption")[0], - capHeight = caption ? caption.offsetHeight : 0; - return (state == "v1") && ((pos.y - domUtils.getXY(table).y - capHeight) < 8); - } else { - return (state == "h1") && ((pos.x - domUtils.getXY(table).x) < 8); - } - } - - /** - * 获取拖动时允许的X轴坐标 - * @param dragTd - * @param evt - */ - function getPermissionX(dragTd, evt) { - var ut = getUETable(dragTd); - if (ut) { - var preTd = ut.getSameEndPosCells(dragTd, "x")[0], - nextTd = ut.getSameStartPosXCells(dragTd)[0], - mouseX = mouseCoords(evt).x, - left = (preTd ? domUtils.getXY(preTd).x : domUtils.getXY(ut.table).x) + 20 , - right = nextTd ? domUtils.getXY(nextTd).x + nextTd.offsetWidth - 20 : (me.body.offsetWidth + 5 || parseInt(domUtils.getComputedStyle(me.body, "width"), 10)); - - left += cellMinWidth; - right -= cellMinWidth; - - return mouseX < left ? left : mouseX > right ? right : mouseX; - } - } - - /** - * 获取拖动时允许的Y轴坐标 - */ - function getPermissionY(dragTd, evt) { - try { - var top = domUtils.getXY(dragTd).y, - mousePosY = mouseCoords(evt).y; - return mousePosY < top ? top : mousePosY; - } catch (e) { - showError(e); - } - } - - /** - * 移动状态切换 - */ - function toggleDraggableState(editor, draggable, dir, mousePos, cell) { - try { - editor.body.style.cursor = dir == "h" ? "col-resize" : dir == "v" ? "row-resize" : "text"; - if (browser.ie) { - if (dir && !mousedown && !getUETableBySelected(editor)) { - getDragLine(editor, editor.document); - showDragLineAt(dir, cell); - } else { - hideDragLine(editor) - } - } - onBorder = draggable; - } catch (e) { - showError(e); - } - } - - /** - * 获取与UETable相关的resize line - * @param uetable UETable对象 - */ - function getResizeLineByUETable() { - - var lineId = '_UETableResizeLine', - line = this.document.getElementById( lineId ); - - if( !line ) { - line = this.document.createElement("div"); - line.id = lineId; - line.contnetEditable = false; - line.setAttribute("unselectable", "on"); - - var styles = { - width: 2*cellBorderWidth + 1 + 'px', - position: 'absolute', - 'z-index': 100000, - cursor: 'col-resize', - background: 'red', - display: 'none' - }; - - //切换状态 - line.onmouseout = function(){ - this.style.display = 'none'; - }; - - utils.extend( line.style, styles ); - - this.document.body.appendChild( line ); - - } - - return line; - - } - - /** - * 更新resize-line - */ - function updateResizeLine( cell, uetable ) { - - var line = getResizeLineByUETable.call( this ), - table = uetable.table, - styles = { - top: domUtils.getXY( table ).y + 'px', - left: domUtils.getXY( cell).x + cell.offsetWidth - cellBorderWidth + 'px', - display: 'block', - height: table.offsetHeight + 'px' - }; - - utils.extend( line.style, styles ); - - } - - /** - * 显示resize-line - */ - function showResizeLine( cell ) { - - var uetable = getUETable( cell ); - - updateResizeLine.call( this, cell, uetable ); - - } - - /** - * 获取鼠标与当前单元格的相对位置 - * @param ele - * @param mousePos - */ - function getRelation(ele, mousePos) { - var elePos = domUtils.getXY(ele); - - if( !elePos ) { - return ''; - } - - if (elePos.x + ele.offsetWidth - mousePos.x < cellBorderWidth) { - return "h"; - } - if (mousePos.x - elePos.x < cellBorderWidth) { - return 'h1' - } - if (elePos.y + ele.offsetHeight - mousePos.y < cellBorderWidth) { - return "v"; - } - if (mousePos.y - elePos.y < cellBorderWidth) { - return 'v1' - } - return ''; - } - - function mouseDownEvent(type, evt) { - - if( isEditorDisabled() ) { - return ; - } - - userActionStatus = { - x: evt.clientX, - y: evt.clientY - }; - - //右键菜单单独处理 - if (evt.button == 2) { - var ut = getUETableBySelected(me), - flag = false; - - if (ut) { - var td = getTargetTd(me, evt); - utils.each(ut.selectedTds, function (ti) { - if (ti === td) { - flag = true; - } - }); - if (!flag) { - removeSelectedClass(domUtils.getElementsByTagName(me.body, "th td")); - ut.clearSelected() - } else { - td = ut.selectedTds[0]; - setTimeout(function () { - me.selection.getRange().setStart(td, 0).setCursor(false, true); - }, 0); - - } - } - } else { - tableClickHander( evt ); - } - - } - - //清除表格的计时器 - function clearTableTimer() { - tabTimer && clearTimeout( tabTimer ); - tabTimer = null; - } - - //双击收缩 - function tableDbclickHandler(evt) { - singleClickState = 0; - evt = evt || me.window.event; - var target = getParentTdOrTh(evt.target || evt.srcElement); - if (target) { - var h; - if (h = getRelation(target, mouseCoords(evt))) { - - hideDragLine( me ); - - if (h == 'h1') { - h = 'h'; - if (inTableSide(domUtils.findParentByTagName(target, "table"), target, evt)) { - me.execCommand('adaptbywindow'); - } else { - target = getUETable(target).getPreviewCell(target); - if (target) { - var rng = me.selection.getRange(); - rng.selectNodeContents(target).setCursor(true, true) - } - } - } - if (h == 'h') { - var ut = getUETable(target), - table = ut.table, - cells = getCellsByMoveBorder( target, table, true ); - - cells = extractArray( cells, 'left' ); - - ut.width = ut.offsetWidth; - - var oldWidth = [], - newWidth = []; - - utils.each( cells, function( cell ){ - - oldWidth.push( cell.offsetWidth ); - - } ); - - utils.each( cells, function( cell ){ - - cell.removeAttribute("width"); - - } ); - - window.setTimeout( function(){ - - //是否允许改变 - var changeable = true; - - utils.each( cells, function( cell, index ){ - - var width = cell.offsetWidth; - - if( width > oldWidth[index] ) { - changeable = false; - return false; - } - - newWidth.push( width ); - - } ); - - var change = changeable ? newWidth : oldWidth; - - utils.each( cells, function( cell, index ){ - - cell.width = change[index] - getTabcellSpace(); - - } ); - - - }, 0 ); - -// minWidth -= cellMinWidth; -// -// table.removeAttribute("width"); -// utils.each(cells, function (cell) { -// cell.style.width = ""; -// cell.width -= minWidth; -// }); - - } - } - } - } - - function tableClickHander( evt ) { - - removeSelectedClass(domUtils.getElementsByTagName(me.body, "td th")); - //trace:3113 - //选中单元格,点击table外部,不会清掉table上挂的ueTable,会引起getUETableBySelected方法返回值 - utils.each(me.document.getElementsByTagName('table'), function (t) { - t.ueTable = null; - }); - startTd = getTargetTd(me, evt); - if( !startTd ) return; - var table = domUtils.findParentByTagName(startTd, "table", true); - ut = getUETable(table); - ut && ut.clearSelected(); - - //判断当前鼠标状态 - if (!onBorder) { - me.document.body.style.webkitUserSelect = ''; - mousedown = true; - me.addListener('mouseover', mouseOverEvent); - } else { - //边框上的动作处理 - borderActionHandler( evt ); - } - - - } - - //处理表格边框上的动作, 这里做延时处理,避免两种动作互相影响 - function borderActionHandler( evt ) { - - if ( browser.ie ) { - evt = reconstruct(evt ); - } - - clearTableDragTimer(); - - //是否正在等待resize的缓冲中 - isInResizeBuffer = true; - - tableDragTimer = setTimeout(function(){ - tableBorderDrag( evt ); - }, dblclickTime); - - } - - function extractArray( originArr, key ) { - - var result = [], - tmp = null; - - for( var i = 0, len = originArr.length; i 0 && singleClickState--; - }, dblclickTime ); - - if( singleClickState === 2 ) { - - singleClickState = 0; - tableDbclickHandler(evt); - return; - - } - - } - - if (evt.button == 2)return; - var me = this; - //清除表格上原生跨选问题 - var range = me.selection.getRange(), - start = domUtils.findParentByTagName(range.startContainer, 'table', true), - end = domUtils.findParentByTagName(range.endContainer, 'table', true); - - if (start || end) { - if (start === end) { - start = domUtils.findParentByTagName(range.startContainer, ['td', 'th', 'caption'], true); - end = domUtils.findParentByTagName(range.endContainer, ['td', 'th', 'caption'], true); - if (start !== end) { - me.selection.clearRange() - } - } else { - me.selection.clearRange() - } - } - mousedown = false; - me.document.body.style.webkitUserSelect = ''; - //拖拽状态下的mouseUP - if ( onDrag && dragTd ) { - - me.selection.getNative()[browser.ie9below ? 'empty' : 'removeAllRanges'](); - - singleClickState = 0; - dragLine = me.document.getElementById('ue_tableDragLine'); - - // trace 3973 - if (dragLine) { - var dragTdPos = domUtils.getXY(dragTd), - dragLinePos = domUtils.getXY(dragLine); - - switch (onDrag) { - case "h": - changeColWidth(dragTd, dragLinePos.x - dragTdPos.x); - break; - case "v": - changeRowHeight(dragTd, dragLinePos.y - dragTdPos.y - dragTd.offsetHeight); - break; - default: - } - onDrag = ""; - dragTd = null; - - hideDragLine(me); - me.fireEvent('saveScene'); - return; - } - } - //正常状态下的mouseup - if (!startTd) { - var target = domUtils.findParentByTagName(evt.target || evt.srcElement, "td", true); - if (!target) target = domUtils.findParentByTagName(evt.target || evt.srcElement, "th", true); - if (target && (target.tagName == "TD" || target.tagName == "TH")) { - if (me.fireEvent("excludetable", target) === true) return; - range = new dom.Range(me.document); - range.setStart(target, 0).setCursor(false, true); - } - } else { - var ut = getUETable(startTd), - cell = ut ? ut.selectedTds[0] : null; - if (cell) { - range = new dom.Range(me.document); - if (domUtils.isEmptyBlock(cell)) { - range.setStart(cell, 0).setCursor(false, true); - } else { - range.selectNodeContents(cell).shrinkBoundary().setCursor(false, true); - } - } else { - range = me.selection.getRange().shrinkBoundary(); - if (!range.collapsed) { - var start = domUtils.findParentByTagName(range.startContainer, ['td', 'th'], true), - end = domUtils.findParentByTagName(range.endContainer, ['td', 'th'], true); - //在table里边的不能清除 - if (start && !end || !start && end || start && end && start !== end) { - range.setCursor(false, true); - } - } - } - startTd = null; - me.removeListener('mouseover', mouseOverEvent); - } - me._selectionChange(250, evt); - } - - function mouseOverEvent(type, evt) { - - if( isEditorDisabled() ) { - return; - } - - var me = this, - tar = evt.target || evt.srcElement; - currentTd = domUtils.findParentByTagName(tar, "td", true) || domUtils.findParentByTagName(tar, "th", true); - //需要判断两个TD是否位于同一个表格内 - if (startTd && currentTd && - ((startTd.tagName == "TD" && currentTd.tagName == "TD") || (startTd.tagName == "TH" && currentTd.tagName == "TH")) && - domUtils.findParentByTagName(startTd, 'table') == domUtils.findParentByTagName(currentTd, 'table')) { - var ut = getUETable(currentTd); - if (startTd != currentTd) { - me.document.body.style.webkitUserSelect = 'none'; - me.selection.getNative()[browser.ie9below ? 'empty' : 'removeAllRanges'](); - var range = ut.getCellsRange(startTd, currentTd); - ut.setSelected(range); - } else { - me.document.body.style.webkitUserSelect = ''; - ut.clearSelected(); - } - - } - evt.preventDefault ? evt.preventDefault() : (evt.returnValue = false); - } - - function setCellHeight(cell, height, backHeight) { - var lineHight = parseInt(domUtils.getComputedStyle(cell, "line-height"), 10), - tmpHeight = backHeight + height; - height = tmpHeight < lineHight ? lineHight : tmpHeight; - if (cell.style.height) cell.style.height = ""; - cell.rowSpan == 1 ? cell.setAttribute("height", height) : (cell.removeAttribute && cell.removeAttribute("height")); - } - - function getWidth(cell) { - if (!cell)return 0; - return parseInt(domUtils.getComputedStyle(cell, "width"), 10); - } - - function changeColWidth(cell, changeValue) { - - var ut = getUETable(cell); - if (ut) { - - //根据当前移动的边框获取相关的单元格 - var table = ut.table, - cells = getCellsByMoveBorder( cell, table ); - - table.style.width = ""; - table.removeAttribute("width"); - - //修正改变量 - changeValue = correctChangeValue( changeValue, cell, cells ); - - if (cell.nextSibling) { - - var i=0; - - utils.each( cells, function( cellGroup ){ - - cellGroup.left.width = (+cellGroup.left.width)+changeValue; - cellGroup.right && ( cellGroup.right.width = (+cellGroup.right.width)-changeValue ); - - } ); - - } else { - - utils.each( cells, function( cellGroup ){ - cellGroup.left.width -= -changeValue; - } ); - - } - } - - } - - function isEditorDisabled() { - return me.body.contentEditable === "false"; - } - - function changeRowHeight(td, changeValue) { - if (Math.abs(changeValue) < 10) return; - var ut = getUETable(td); - if (ut) { - var cells = ut.getSameEndPosCells(td, "y"), - //备份需要连带变化的td的原始高度,否则后期无法获取正确的值 - backHeight = cells[0] ? cells[0].offsetHeight : 0; - for (var i = 0, cell; cell = cells[i++];) { - setCellHeight(cell, changeValue, backHeight); - } - } - - } - - /** - * 获取调整单元格大小的相关单元格 - * @isContainMergeCell 返回的结果中是否包含发生合并后的单元格 - */ - function getCellsByMoveBorder( cell, table, isContainMergeCell ) { - - if( !table ) { - table = domUtils.findParentByTagName( cell, 'table' ); - } - - if( !table ) { - return null; - } - - //获取到该单元格所在行的序列号 - var index = domUtils.getNodeIndex( cell ), - temp = cell, - rows = table.rows, - colIndex = 0; - - while( temp ) { - //获取到当前单元格在未发生单元格合并时的序列 - if( temp.nodeType === 1 ) { - colIndex += (temp.colSpan || 1); - } - temp = temp.previousSibling; - } - - temp = null; - - //记录想关的单元格 - var borderCells = []; - - utils.each(rows, function( tabRow ){ - - var cells = tabRow.cells, - currIndex = 0; - - utils.each( cells, function( tabCell ){ - - currIndex += (tabCell.colSpan || 1); - - if( currIndex === colIndex ) { - - borderCells.push({ - left: tabCell, - right: tabCell.nextSibling || null - }); - - return false; - - } else if( currIndex > colIndex ) { - - if( isContainMergeCell ) { - borderCells.push({ - left: tabCell - }); - } - - return false; - } - - - } ); - - }); - - return borderCells; - - } - - - /** - * 通过给定的单元格集合获取最小的单元格width - */ - function getMinWidthByTableCells( cells ) { - - var minWidth = Number.MAX_VALUE; - - for( var i = 0, curCell; curCell = cells[ i ] ; i++ ) { - - minWidth = Math.min( minWidth, curCell.width || getTableCellWidth( curCell ) ); - - } - - return minWidth; - - } - - function correctChangeValue( changeValue, relatedCell, cells ) { - - //为单元格的paading预留空间 - changeValue -= getTabcellSpace(); - - if( changeValue < 0 ) { - return 0; - } - - changeValue -= getTableCellWidth( relatedCell ); - - //确定方向 - var direction = changeValue < 0 ? 'left':'right'; - - changeValue = Math.abs(changeValue); - - //只关心非最后一个单元格就可以 - utils.each( cells, function( cellGroup ){ - - var curCell = cellGroup[direction]; - - //为单元格保留最小空间 - if( curCell ) { - changeValue = Math.min( changeValue, getTableCellWidth( curCell )-cellMinWidth ); - } - - - } ); - - - //修正越界 - changeValue = changeValue < 0 ? 0 : changeValue; - - return direction === 'left' ? -changeValue : changeValue; - - } - - function getTableCellWidth( cell ) { - - var width = 0, - //偏移纠正量 - offset = 0, - width = cell.offsetWidth - getTabcellSpace(); - - //最后一个节点纠正一下 - if( !cell.nextSibling ) { - - width -= getTableCellOffset( cell ); - - } - - width = width < 0 ? 0 : width; - - try { - cell.width = width; - } catch(e) { - } - - return width; - - } - - /** - * 获取单元格所在表格的最末单元格的偏移量 - */ - function getTableCellOffset( cell ) { - - tab = domUtils.findParentByTagName( cell, "table", false); - - if( tab.offsetVal === undefined ) { - - var prev = cell.previousSibling; - - if( prev ) { - - //最后一个单元格和前一个单元格的width diff结果 如果恰好为一个border width, 则条件成立 - tab.offsetVal = cell.offsetWidth - prev.offsetWidth === UT.borderWidth ? UT.borderWidth : 0; - - } else { - tab.offsetVal = 0; - } - - } - - return tab.offsetVal; - - } - - function getTabcellSpace() { - - if( UT.tabcellSpace === undefined ) { - - var cell = null, - tab = me.document.createElement("table"), - tbody = me.document.createElement("tbody"), - trow = me.document.createElement("tr"), - tabcell = me.document.createElement("td"), - mirror = null; - - tabcell.style.cssText = 'border: 0;'; - tabcell.width = 1; - - trow.appendChild( tabcell ); - trow.appendChild( mirror = tabcell.cloneNode( false ) ); - - tbody.appendChild( trow ); - - tab.appendChild( tbody ); - - tab.style.cssText = "visibility: hidden;"; - - me.body.appendChild( tab ); - - UT.paddingSpace = tabcell.offsetWidth - 1; - - var tmpTabWidth = tab.offsetWidth; - - tabcell.style.cssText = ''; - mirror.style.cssText = ''; - - UT.borderWidth = ( tab.offsetWidth - tmpTabWidth ) / 3; - - UT.tabcellSpace = UT.paddingSpace + UT.borderWidth; - - me.body.removeChild( tab ); - - } - - getTabcellSpace = function(){ return UT.tabcellSpace; }; - - return UT.tabcellSpace; - - } - - function getDragLine(editor, doc) { - if (mousedown)return; - dragLine = editor.document.createElement("div"); - domUtils.setAttributes(dragLine, { - id:"ue_tableDragLine", - unselectable:'on', - contenteditable:false, - 'onresizestart':'return false', - 'ondragstart':'return false', - 'onselectstart':'return false', - style:"background-color:blue;position:absolute;padding:0;margin:0;background-image:none;border:0px none;opacity:0;filter:alpha(opacity=0)" - }); - editor.body.appendChild(dragLine); - } - - function hideDragLine(editor) { - if (mousedown)return; - var line; - while (line = editor.document.getElementById('ue_tableDragLine')) { - domUtils.remove(line) - } - } - - /** - * 依据state(v|h)在cell位置显示横线 - * @param state - * @param cell - */ - function showDragLineAt(state, cell) { - if (!cell) return; - var table = domUtils.findParentByTagName(cell, "table"), - caption = table.getElementsByTagName('caption'), - width = table.offsetWidth, - height = table.offsetHeight - (caption.length > 0 ? caption[0].offsetHeight : 0), - tablePos = domUtils.getXY(table), - cellPos = domUtils.getXY(cell), css; - switch (state) { - case "h": - css = 'height:' + height + 'px;top:' + (tablePos.y + (caption.length > 0 ? caption[0].offsetHeight : 0)) + 'px;left:' + (cellPos.x + cell.offsetWidth); - dragLine.style.cssText = css + 'px;position: absolute;display:block;background-color:blue;width:1px;border:0; color:blue;opacity:.3;filter:alpha(opacity=30)'; - break; - case "v": - css = 'width:' + width + 'px;left:' + tablePos.x + 'px;top:' + (cellPos.y + cell.offsetHeight ); - //必须加上border:0和color:blue,否则低版ie不支持背景色显示 - dragLine.style.cssText = css + 'px;overflow:hidden;position: absolute;display:block;background-color:blue;height:1px;border:0;color:blue;opacity:.2;filter:alpha(opacity=20)'; - break; - default: - } - } - - /** - * 当表格边框颜色为白色时设置为虚线,true为添加虚线 - * @param editor - * @param flag - */ - function switchBorderColor(editor, flag) { - var tableArr = domUtils.getElementsByTagName(editor.body, "table"), color; - for (var i = 0, node; node = tableArr[i++];) { - var td = domUtils.getElementsByTagName(node, "td"); - if (td[0]) { - if (flag) { - color = (td[0].style.borderColor).replace(/\s/g, ""); - if (/(#ffffff)|(rgb\(255,255,255\))/ig.test(color)) - domUtils.addClass(node, "noBorderTable") - } else { - domUtils.removeClasses(node, "noBorderTable") - } - } - - } - } - - function getTableWidth(editor, needIEHack, defaultValue) { - var body = editor.body; - return body.offsetWidth - (needIEHack ? parseInt(domUtils.getComputedStyle(body, 'margin-left'), 10) * 2 : 0) - defaultValue.tableBorder * 2 - (editor.options.offsetWidth || 0); - } - - /** - * 获取当前拖动的单元格 - */ - function getTargetTd(editor, evt) { - - var target = domUtils.findParentByTagName(evt.target || evt.srcElement, ["td", "th"], true), - dir = null; - - if( !target ) { - return null; - } - - dir = getRelation( target, mouseCoords( evt ) ); - - //如果有前一个节点, 需要做一个修正, 否则可能会得到一个错误的td - - if( !target ) { - return null; - } - - if( dir === 'h1' && target.previousSibling ) { - - var position = domUtils.getXY( target), - cellWidth = target.offsetWidth; - - if( Math.abs( position.x + cellWidth - evt.clientX ) > cellWidth / 3 ) { - target = target.previousSibling; - } - - } else if( dir === 'v1' && target.parentNode.previousSibling ) { - - var position = domUtils.getXY( target), - cellHeight = target.offsetHeight; - - if( Math.abs( position.y + cellHeight - evt.clientY ) > cellHeight / 3 ) { - target = target.parentNode.previousSibling.firstChild; - } - - } - - - //排除了非td内部以及用于代码高亮部分的td - return target && !(editor.fireEvent("excludetable", target) === true) ? target : null; - } - -}; - - -// plugins/table.sort.js -/** - * Created with JetBrains PhpStorm. - * User: Jinqn - * Date: 13-10-12 - * Time: 上午10:20 - * To change this template use File | Settings | File Templates. - */ - -UE.UETable.prototype.sortTable = function (sortByCellIndex, compareFn) { - var table = this.table, - rows = table.rows, - trArray = [], - flag = rows[0].cells[0].tagName === "TH", - lastRowIndex = 0; - if(this.selectedTds.length){ - var range = this.cellsRange, - len = range.endRowIndex + 1; - for (var i = range.beginRowIndex; i < len; i++) { - trArray[i] = rows[i]; - } - trArray.splice(0,range.beginRowIndex); - lastRowIndex = (range.endRowIndex +1) === this.rowsNum ? 0 : range.endRowIndex +1; - }else{ - for (var i = 0,len = rows.length; i < len; i++) { - trArray[i] = rows[i]; - } - } - - var Fn = { - 'reversecurrent': function(td1,td2){ - return 1; - }, - 'orderbyasc': function(td1,td2){ - var value1 = td1.innerText||td1.textContent, - value2 = td2.innerText||td2.textContent; - return value1.localeCompare(value2); - }, - 'reversebyasc': function(td1,td2){ - var value1 = td1.innerHTML, - value2 = td2.innerHTML; - return value2.localeCompare(value1); - }, - 'orderbynum': function(td1,td2){ - var value1 = td1[browser.ie ? 'innerText':'textContent'].match(/\d+/), - value2 = td2[browser.ie ? 'innerText':'textContent'].match(/\d+/); - if(value1) value1 = +value1[0]; - if(value2) value2 = +value2[0]; - return (value1||0) - (value2||0); - }, - 'reversebynum': function(td1,td2){ - var value1 = td1[browser.ie ? 'innerText':'textContent'].match(/\d+/), - value2 = td2[browser.ie ? 'innerText':'textContent'].match(/\d+/); - if(value1) value1 = +value1[0]; - if(value2) value2 = +value2[0]; - return (value2||0) - (value1||0); - } - }; - - //对表格设置排序的标记data-sort-type - table.setAttribute('data-sort-type', compareFn && typeof compareFn === "string" && Fn[compareFn] ? compareFn:''); - - //th不参与排序 - flag && trArray.splice(0, 1); - trArray = utils.sort(trArray,function (tr1, tr2) { - var result; - if (compareFn && typeof compareFn === "function") { - result = compareFn.call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); - } else if (compareFn && typeof compareFn === "number") { - result = 1; - } else if (compareFn && typeof compareFn === "string" && Fn[compareFn]) { - result = Fn[compareFn].call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); - } else { - result = Fn['orderbyasc'].call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); - } - return result; - }); - var fragment = table.ownerDocument.createDocumentFragment(); - for (var j = 0, len = trArray.length; j < len; j++) { - fragment.appendChild(trArray[j]); - } - var tbody = table.getElementsByTagName("tbody")[0]; - if(!lastRowIndex){ - tbody.appendChild(fragment); - }else{ - tbody.insertBefore(fragment,rows[lastRowIndex- range.endRowIndex + range.beginRowIndex - 1]) - } -}; - -UE.plugins['tablesort'] = function () { - var me = this, - UT = UE.UETable, - getUETable = function (tdOrTable) { - return UT.getUETable(tdOrTable); - }, - getTableItemsByRange = function (editor) { - return UT.getTableItemsByRange(editor); - }; - - - me.ready(function () { - //添加表格可排序的样式 - utils.cssRule('tablesort', - 'table.sortEnabled tr.firstRow th,table.sortEnabled tr.firstRow td{padding-right:20px;background-repeat: no-repeat;background-position: center right;' + - ' background-image:url(' + me.options.themePath + me.options.theme + '/images/sortable.png);}', - me.document); - - //做单元格合并操作时,清除可排序标识 - me.addListener("afterexeccommand", function (type, cmd) { - if( cmd == 'mergeright' || cmd == 'mergedown' || cmd == 'mergecells') { - this.execCommand('disablesort'); - } - }); - }); - - - - //表格排序 - UE.commands['sorttable'] = { - queryCommandState: function () { - var me = this, - tableItems = getTableItemsByRange(me); - if (!tableItems.cell) return -1; - var table = tableItems.table, - cells = table.getElementsByTagName("td"); - for (var i = 0, cell; cell = cells[i++];) { - if (cell.rowSpan != 1 || cell.colSpan != 1) return -1; - } - return 0; - }, - execCommand: function (cmd, fn) { - var me = this, - range = me.selection.getRange(), - bk = range.createBookmark(true), - tableItems = getTableItemsByRange(me), - cell = tableItems.cell, - ut = getUETable(tableItems.table), - cellInfo = ut.getCellInfo(cell); - ut.sortTable(cellInfo.cellIndex, fn); - range.moveToBookmark(bk); - try{ - range.select(); - }catch(e){} - } - }; - - //设置表格可排序,清除表格可排序 - UE.commands["enablesort"] = UE.commands["disablesort"] = { - queryCommandState: function (cmd) { - var table = getTableItemsByRange(this).table; - if(table && cmd=='enablesort') { - var cells = domUtils.getElementsByTagName(table, 'th td'); - for(var i = 0; i1 || cells[i].getAttribute('rowspan')>1) return -1; - } - } - - return !table ? -1: cmd=='enablesort' ^ table.getAttribute('data-sort')!='sortEnabled' ? -1:0; - }, - execCommand: function (cmd) { - var table = getTableItemsByRange(this).table; - table.setAttribute("data-sort", cmd == "enablesort" ? "sortEnabled" : "sortDisabled"); - cmd == "enablesort" ? domUtils.addClass(table,"sortEnabled"):domUtils.removeClasses(table,"sortEnabled"); - } - }; -}; - - -// plugins/contextmenu.js -///import core -///commands 右键菜单 -///commandsName ContextMenu -///commandsTitle 右键菜单 -/** - * 右键菜单 - * @function - * @name baidu.editor.plugins.contextmenu - * @author zhanyi - */ - -UE.plugins['contextmenu'] = function () { - var me = this; - me.setOpt('enableContextMenu',true); - if(me.getOpt('enableContextMenu') === false){ - return; - } - var lang = me.getLang( "contextMenu" ), - menu, - items = me.options.contextMenu || [ - {label:lang['selectall'], cmdName:'selectall'}, - { - label:lang.cleardoc, - cmdName:'cleardoc', - exec:function () { - if ( confirm( lang.confirmclear ) ) { - this.execCommand( 'cleardoc' ); - } - } - }, - '-', - { - label:lang.unlink, - cmdName:'unlink' - }, - '-', - { - group:lang.paragraph, - icon:'justifyjustify', - subMenu:[ - { - label:lang.justifyleft, - cmdName:'justify', - value:'left' - }, - { - label:lang.justifyright, - cmdName:'justify', - value:'right' - }, - { - label:lang.justifycenter, - cmdName:'justify', - value:'center' - }, - { - label:lang.justifyjustify, - cmdName:'justify', - value:'justify' - } - ] - }, - '-', - { - group:lang.table, - icon:'table', - subMenu:[ - { - label:lang.inserttable, - cmdName:'inserttable' - }, - { - label:lang.deletetable, - cmdName:'deletetable' - }, - '-', - { - label:lang.deleterow, - cmdName:'deleterow' - }, - { - label:lang.deletecol, - cmdName:'deletecol' - }, - { - label:lang.insertcol, - cmdName:'insertcol' - }, - { - label:lang.insertcolnext, - cmdName:'insertcolnext' - }, - { - label:lang.insertrow, - cmdName:'insertrow' - }, - { - label:lang.insertrownext, - cmdName:'insertrownext' - }, - '-', - { - label:lang.insertcaption, - cmdName:'insertcaption' - }, - { - label:lang.deletecaption, - cmdName:'deletecaption' - }, - { - label:lang.inserttitle, - cmdName:'inserttitle' - }, - { - label:lang.deletetitle, - cmdName:'deletetitle' - }, - { - label:lang.inserttitlecol, - cmdName:'inserttitlecol' - }, - { - label:lang.deletetitlecol, - cmdName:'deletetitlecol' - }, - '-', - { - label:lang.mergecells, - cmdName:'mergecells' - }, - { - label:lang.mergeright, - cmdName:'mergeright' - }, - { - label:lang.mergedown, - cmdName:'mergedown' - }, - '-', - { - label:lang.splittorows, - cmdName:'splittorows' - }, - { - label:lang.splittocols, - cmdName:'splittocols' - }, - { - label:lang.splittocells, - cmdName:'splittocells' - }, - '-', - { - label:lang.averageDiseRow, - cmdName:'averagedistributerow' - }, - { - label:lang.averageDisCol, - cmdName:'averagedistributecol' - }, - '-', - { - label:lang.edittd, - cmdName:'edittd', - exec:function () { - if ( UE.ui['edittd'] ) { - new UE.ui['edittd']( this ); - } - this.getDialog('edittd').open(); - } - }, - { - label:lang.edittable, - cmdName:'edittable', - exec:function () { - if ( UE.ui['edittable'] ) { - new UE.ui['edittable']( this ); - } - this.getDialog('edittable').open(); - } - }, - { - label:lang.setbordervisible, - cmdName:'setbordervisible' - } - ] - }, - { - group:lang.tablesort, - icon:'tablesort', - subMenu:[ - { - label:lang.enablesort, - cmdName:'enablesort' - }, - { - label:lang.disablesort, - cmdName:'disablesort' - }, - '-', - { - label:lang.reversecurrent, - cmdName:'sorttable', - value:'reversecurrent' - }, - { - label:lang.orderbyasc, - cmdName:'sorttable', - value:'orderbyasc' - }, - { - label:lang.reversebyasc, - cmdName:'sorttable', - value:'reversebyasc' - }, - { - label:lang.orderbynum, - cmdName:'sorttable', - value:'orderbynum' - }, - { - label:lang.reversebynum, - cmdName:'sorttable', - value:'reversebynum' - } - ] - }, - { - group:lang.borderbk, - icon:'borderBack', - subMenu:[ - { - label:lang.setcolor, - cmdName:"interlacetable", - exec:function(){ - this.execCommand("interlacetable"); - } - }, - { - label:lang.unsetcolor, - cmdName:"uninterlacetable", - exec:function(){ - this.execCommand("uninterlacetable"); - } - }, - { - label:lang.setbackground, - cmdName:"settablebackground", - exec:function(){ - this.execCommand("settablebackground",{repeat:true,colorList:["#bbb","#ccc"]}); - } - }, - { - label:lang.unsetbackground, - cmdName:"cleartablebackground", - exec:function(){ - this.execCommand("cleartablebackground"); - } - }, - { - label:lang.redandblue, - cmdName:"settablebackground", - exec:function(){ - this.execCommand("settablebackground",{repeat:true,colorList:["red","blue"]}); - } - }, - { - label:lang.threecolorgradient, - cmdName:"settablebackground", - exec:function(){ - this.execCommand("settablebackground",{repeat:true,colorList:["#aaa","#bbb","#ccc"]}); - } - } - ] - }, - { - group:lang.aligntd, - icon:'aligntd', - subMenu:[ - { - cmdName:'cellalignment', - value:{align:'left',vAlign:'top'} - }, - { - cmdName:'cellalignment', - value:{align:'center',vAlign:'top'} - }, - { - cmdName:'cellalignment', - value:{align:'right',vAlign:'top'} - }, - { - cmdName:'cellalignment', - value:{align:'left',vAlign:'middle'} - }, - { - cmdName:'cellalignment', - value:{align:'center',vAlign:'middle'} - }, - { - cmdName:'cellalignment', - value:{align:'right',vAlign:'middle'} - }, - { - cmdName:'cellalignment', - value:{align:'left',vAlign:'bottom'} - }, - { - cmdName:'cellalignment', - value:{align:'center',vAlign:'bottom'} - }, - { - cmdName:'cellalignment', - value:{align:'right',vAlign:'bottom'} - } - ] - }, - { - group:lang.aligntable, - icon:'aligntable', - subMenu:[ - { - cmdName:'tablealignment', - className: 'left', - label:lang.tableleft, - value:"left" - }, - { - cmdName:'tablealignment', - className: 'center', - label:lang.tablecenter, - value:"center" - }, - { - cmdName:'tablealignment', - className: 'right', - label:lang.tableright, - value:"right" - } - ] - }, - '-', - { - label:lang.insertparagraphbefore, - cmdName:'insertparagraph', - value:true - }, - { - label:lang.insertparagraphafter, - cmdName:'insertparagraph' - }, - { - label:lang['copy'], - cmdName:'copy' - }, - { - label:lang['paste'], - cmdName:'paste' - } - ]; - if ( !items.length ) { - return; - } - var uiUtils = UE.ui.uiUtils; - - me.addListener( 'contextmenu', function ( type, evt ) { - - var offset = uiUtils.getViewportOffsetByEvent( evt ); - me.fireEvent( 'beforeselectionchange' ); - if ( menu ) { - menu.destroy(); - } - for ( var i = 0, ti, contextItems = []; ti = items[i]; i++ ) { - var last; - (function ( item ) { - if ( item == '-' ) { - if ( (last = contextItems[contextItems.length - 1 ] ) && last !== '-' ) { - contextItems.push( '-' ); - } - } else if ( item.hasOwnProperty( "group" ) ) { - for ( var j = 0, cj, subMenu = []; cj = item.subMenu[j]; j++ ) { - (function ( subItem ) { - if ( subItem == '-' ) { - if ( (last = subMenu[subMenu.length - 1 ] ) && last !== '-' ) { - subMenu.push( '-' ); - }else{ - subMenu.splice(subMenu.length-1); - } - } else { - if ( (me.commands[subItem.cmdName] || UE.commands[subItem.cmdName] || subItem.query) && - (subItem.query ? subItem.query() : me.queryCommandState( subItem.cmdName )) > -1 ) { - subMenu.push( { - 'label':subItem.label || me.getLang( "contextMenu." + subItem.cmdName + (subItem.value || '') )||"", - 'className':'edui-for-' +subItem.cmdName + ( subItem.className ? ( ' edui-for-' + subItem.cmdName + '-' + subItem.className ) : '' ), - onclick:subItem.exec ? function () { - subItem.exec.call( me ); - } : function () { - me.execCommand( subItem.cmdName, subItem.value ); - } - } ); - } - } - })( cj ); - } - if ( subMenu.length ) { - function getLabel(){ - switch (item.icon){ - case "table": - return me.getLang( "contextMenu.table" ); - case "justifyjustify": - return me.getLang( "contextMenu.paragraph" ); - case "aligntd": - return me.getLang("contextMenu.aligntd"); - case "aligntable": - return me.getLang("contextMenu.aligntable"); - case "tablesort": - return lang.tablesort; - case "borderBack": - return lang.borderbk; - default : - return ''; - } - } - contextItems.push( { - //todo 修正成自动获取方式 - 'label':getLabel(), - className:'edui-for-' + item.icon, - 'subMenu':{ - items:subMenu, - editor:me - } - } ); - } - - } else { - //有可能commmand没有加载右键不能出来,或者没有command也想能展示出来添加query方法 - if ( (me.commands[item.cmdName] || UE.commands[item.cmdName] || item.query) && - (item.query ? item.query.call(me) : me.queryCommandState( item.cmdName )) > -1 ) { - - contextItems.push( { - 'label':item.label || me.getLang( "contextMenu." + item.cmdName ), - className:'edui-for-' + (item.icon ? item.icon : item.cmdName + (item.value || '')), - onclick:item.exec ? function () { - item.exec.call( me ); - } : function () { - me.execCommand( item.cmdName, item.value ); - } - } ); - } - - } - - })( ti ); - } - if ( contextItems[contextItems.length - 1] == '-' ) { - contextItems.pop(); - } - - menu = new UE.ui.Menu( { - items:contextItems, - className:"edui-contextmenu", - editor:me - } ); - menu.render(); - menu.showAt( offset ); - - me.fireEvent("aftershowcontextmenu",menu); - - domUtils.preventDefault( evt ); - if ( browser.ie ) { - var ieRange; - try { - ieRange = me.selection.getNative().createRange(); - } catch ( e ) { - return; - } - if ( ieRange.item ) { - var range = new dom.Range( me.document ); - range.selectNode( ieRange.item( 0 ) ).select( true, true ); - } - } - }); - - // 添加复制的flash按钮 - me.addListener('aftershowcontextmenu', function(type, menu) { - if (me.zeroclipboard) { - var items = menu.items; - for (var key in items) { - if (items[key].className == 'edui-for-copy') { - me.zeroclipboard.clip(items[key].getDom()); - } - } - } - }); - -}; - - -// plugins/shortcutmenu.js -///import core -///commands 弹出菜单 -// commandsName popupmenu -///commandsTitle 弹出菜单 -/** - * 弹出菜单 - * @function - * @name baidu.editor.plugins.popupmenu - * @author xuheng - */ - -UE.plugins['shortcutmenu'] = function () { - var me = this, - menu, - items = me.options.shortcutMenu || []; - - if (!items.length) { - return; - } - - me.addListener ('contextmenu mouseup' , function (type , e) { - var me = this, - customEvt = { - type : type , - target : e.target || e.srcElement , - screenX : e.screenX , - screenY : e.screenY , - clientX : e.clientX , - clientY : e.clientY - }; - - setTimeout (function () { - var rng = me.selection.getRange (); - if (rng.collapsed === false || type == "contextmenu") { - - if (!menu) { - menu = new baidu.editor.ui.ShortCutMenu ({ - editor : me , - items : items , - theme : me.options.theme , - className : 'edui-shortcutmenu' - }); - - menu.render (); - me.fireEvent ("afterrendershortcutmenu" , menu); - } - - menu.show (customEvt , !!UE.plugins['contextmenu']); - } - }); - - if (type == 'contextmenu') { - domUtils.preventDefault (e); - if (browser.ie9below) { - var ieRange; - try { - ieRange = me.selection.getNative().createRange(); - } catch (e) { - return; - } - if (ieRange.item) { - var range = new dom.Range (me.document); - range.selectNode (ieRange.item (0)).select (true , true); - - } - } - } - }); - - me.addListener ('keydown' , function (type) { - if (type == "keydown") { - menu && !menu.isHidden && menu.hide (); - } - - }); - -}; - - - - -// plugins/basestyle.js -/** - * B、I、sub、super命令支持 - * @file - * @since 1.2.6.1 - */ - -UE.plugins['basestyle'] = function(){ - - /** - * 字体加粗 - * @command bold - * @param { String } cmd 命令字符串 - * @remind 对已加粗的文本内容执行该命令, 将取消加粗 - * @method execCommand - * @example - * ```javascript - * //editor是编辑器实例 - * //对当前选中的文本内容执行加粗操作 - * //第一次执行, 文本内容加粗 - * editor.execCommand( 'bold' ); - * - * //第二次执行, 文本内容取消加粗 - * editor.execCommand( 'bold' ); - * ``` - */ - - - /** - * 字体倾斜 - * @command italic - * @method execCommand - * @param { String } cmd 命令字符串 - * @remind 对已倾斜的文本内容执行该命令, 将取消倾斜 - * @example - * ```javascript - * //editor是编辑器实例 - * //对当前选中的文本内容执行斜体操作 - * //第一次操作, 文本内容将变成斜体 - * editor.execCommand( 'italic' ); - * - * //再次对同一文本内容执行, 则文本内容将恢复正常 - * editor.execCommand( 'italic' ); - * ``` - */ - - /** - * 下标文本,与“superscript”命令互斥 - * @command subscript - * @method execCommand - * @remind 把选中的文本内容切换成下标文本, 如果当前选中的文本已经是下标, 则该操作会把文本内容还原成正常文本 - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * //editor是编辑器实例 - * //对当前选中的文本内容执行下标操作 - * //第一次操作, 文本内容将变成下标文本 - * editor.execCommand( 'subscript' ); - * - * //再次对同一文本内容执行, 则文本内容将恢复正常 - * editor.execCommand( 'subscript' ); - * ``` - */ - - /** - * 上标文本,与“subscript”命令互斥 - * @command superscript - * @method execCommand - * @remind 把选中的文本内容切换成上标文本, 如果当前选中的文本已经是上标, 则该操作会把文本内容还原成正常文本 - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * //editor是编辑器实例 - * //对当前选中的文本内容执行上标操作 - * //第一次操作, 文本内容将变成上标文本 - * editor.execCommand( 'superscript' ); - * - * //再次对同一文本内容执行, 则文本内容将恢复正常 - * editor.execCommand( 'superscript' ); - * ``` - */ - var basestyles = { - 'bold':['strong','b'], - 'italic':['em','i'], - 'subscript':['sub'], - 'superscript':['sup'] - }, - getObj = function(editor,tagNames){ - return domUtils.filterNodeList(editor.selection.getStartElementPath(),tagNames); - }, - me = this; - //添加快捷键 - me.addshortcutkey({ - "Bold" : "ctrl+66",//^B - "Italic" : "ctrl+73", //^I - "Underline" : "ctrl+85"//^U - }); - me.addInputRule(function(root){ - utils.each(root.getNodesByTagName('b i'),function(node){ - switch (node.tagName){ - case 'b': - node.tagName = 'strong'; - break; - case 'i': - node.tagName = 'em'; - } - }); - }); - for ( var style in basestyles ) { - (function( cmd, tagNames ) { - me.commands[cmd] = { - execCommand : function( cmdName ) { - var range = me.selection.getRange(),obj = getObj(this,tagNames); - if ( range.collapsed ) { - if ( obj ) { - var tmpText = me.document.createTextNode(''); - range.insertNode( tmpText ).removeInlineStyle( tagNames ); - range.setStartBefore(tmpText); - domUtils.remove(tmpText); - } else { - var tmpNode = range.document.createElement( tagNames[0] ); - if(cmdName == 'superscript' || cmdName == 'subscript'){ - tmpText = me.document.createTextNode(''); - range.insertNode(tmpText) - .removeInlineStyle(['sub','sup']) - .setStartBefore(tmpText) - .collapse(true); - } - range.insertNode( tmpNode ).setStart( tmpNode, 0 ); - } - range.collapse( true ); - } else { - if(cmdName == 'superscript' || cmdName == 'subscript'){ - if(!obj || obj.tagName.toLowerCase() != cmdName){ - range.removeInlineStyle(['sub','sup']); - } - } - obj ? range.removeInlineStyle( tagNames ) : range.applyInlineStyle( tagNames[0] ); - } - range.select(); - }, - queryCommandState : function() { - return getObj(this,tagNames) ? 1 : 0; - } - }; - })( style, basestyles[style] ); - } -}; - - - -// plugins/elementpath.js -/** - * 选取路径命令 - * @file - */ -UE.plugins['elementpath'] = function(){ - var currentLevel, - tagNames, - me = this; - me.setOpt('elementPathEnabled',true); - if(!me.options.elementPathEnabled){ - return; - } - me.commands['elementpath'] = { - execCommand : function( cmdName, level ) { - var start = tagNames[level], - range = me.selection.getRange(); - currentLevel = level*1; - range.selectNode(start).select(); - }, - queryCommandValue : function() { - //产生一个副本,不能修改原来的startElementPath; - var parents = [].concat(this.selection.getStartElementPath()).reverse(), - names = []; - tagNames = parents; - for(var i=0,ci;ci=parents[i];i++){ - if(ci.nodeType == 3) { - continue; - } - var name = ci.tagName.toLowerCase(); - if(name == 'img' && ci.getAttribute('anchorname')){ - name = 'anchor'; - } - names[i] = name; - if(currentLevel == i){ - currentLevel = -1; - break; - } - } - return names; - } - }; -}; - - - -// plugins/formatmatch.js -/** - * 格式刷,只格式inline的 - * @file - * @since 1.2.6.1 - */ - -/** - * 格式刷 - * @command formatmatch - * @method execCommand - * @remind 该操作不能复制段落格式 - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * //editor是编辑器实例 - * //获取格式刷 - * editor.execCommand( 'formatmatch' ); - * ``` - */ -UE.plugins['formatmatch'] = function(){ - - var me = this, - list = [],img, - flag = 0; - - me.addListener('reset',function(){ - list = []; - flag = 0; - }); - - function addList(type,evt){ - - if(browser.webkit){ - var target = evt.target.tagName == 'IMG' ? evt.target : null; - } - - function addFormat(range){ - - if(text){ - range.selectNode(text); - } - return range.applyInlineStyle(list[list.length-1].tagName,null,list); - - } - - me.undoManger && me.undoManger.save(); - - var range = me.selection.getRange(), - imgT = target || range.getClosedNode(); - if(img && imgT && imgT.tagName == 'IMG'){ - //trace:964 - - imgT.style.cssText += ';float:' + (img.style.cssFloat || img.style.styleFloat ||'none') + ';display:' + (img.style.display||'inline'); - - img = null; - }else{ - if(!img){ - var collapsed = range.collapsed; - if(collapsed){ - var text = me.document.createTextNode('match'); - range.insertNode(text).select(); - - - } - me.__hasEnterExecCommand = true; - //不能把block上的属性干掉 - //trace:1553 - var removeFormatAttributes = me.options.removeFormatAttributes; - me.options.removeFormatAttributes = ''; - me.execCommand('removeformat'); - me.options.removeFormatAttributes = removeFormatAttributes; - me.__hasEnterExecCommand = false; - //trace:969 - range = me.selection.getRange(); - if(list.length){ - addFormat(range); - } - if(text){ - range.setStartBefore(text).collapse(true); - - } - range.select(); - text && domUtils.remove(text); - } - - } - - - - - me.undoManger && me.undoManger.save(); - me.removeListener('mouseup',addList); - flag = 0; - } - - me.commands['formatmatch'] = { - execCommand : function( cmdName ) { - - if(flag){ - flag = 0; - list = []; - me.removeListener('mouseup',addList); - return; - } - - - - var range = me.selection.getRange(); - img = range.getClosedNode(); - if(!img || img.tagName != 'IMG'){ - range.collapse(true).shrinkBoundary(); - var start = range.startContainer; - list = domUtils.findParents(start,true,function(node){ - return !domUtils.isBlockElm(node) && node.nodeType == 1; - }); - //a不能加入格式刷, 并且克隆节点 - for(var i=0,ci;ci=list[i];i++){ - if(ci.tagName == 'A'){ - list.splice(i,1); - break; - } - } - - } - - me.addListener('mouseup',addList); - flag = 1; - - - }, - queryCommandState : function() { - return flag; - }, - notNeedUndo : 1 - }; -}; - - - -// plugins/searchreplace.js -///import core -///commands 查找替换 -///commandsName SearchReplace -///commandsTitle 查询替换 -///commandsDialog dialogs\searchreplace -/** - * @description 查找替换 - * @author zhanyi - */ - -UE.plugin.register('searchreplace',function(){ - var me = this; - - var _blockElm = {'table':1,'tbody':1,'tr':1,'ol':1,'ul':1}; - - function findTextInString(textContent,opt,currentIndex){ - var str = opt.searchStr; - if(opt.dir == -1){ - textContent = textContent.split('').reverse().join(''); - str = str.split('').reverse().join(''); - currentIndex = textContent.length - currentIndex; - - } - var reg = new RegExp(str,'g' + (opt.casesensitive ? '' : 'i')),match; - - while(match = reg.exec(textContent)){ - if(match.index >= currentIndex){ - return opt.dir == -1 ? textContent.length - match.index - opt.searchStr.length : match.index; - } - } - return -1 - } - function findTextBlockElm(node,currentIndex,opt){ - var textContent,index,methodName = opt.all || opt.dir == 1 ? 'getNextDomNode' : 'getPreDomNode'; - if(domUtils.isBody(node)){ - node = node.firstChild; - } - var first = 1; - while(node){ - textContent = node.nodeType == 3 ? node.nodeValue : node[browser.ie ? 'innerText' : 'textContent']; - index = findTextInString(textContent,opt,currentIndex ); - first = 0; - if(index!=-1){ - return { - 'node':node, - 'index':index - } - } - node = domUtils[methodName](node); - while(node && _blockElm[node.nodeName.toLowerCase()]){ - node = domUtils[methodName](node,true); - } - if(node){ - currentIndex = opt.dir == -1 ? (node.nodeType == 3 ? node.nodeValue : node[browser.ie ? 'innerText' : 'textContent']).length : 0; - } - - } - } - function findNTextInBlockElm(node,index,str){ - var currentIndex = 0, - currentNode = node.firstChild, - currentNodeLength = 0, - result; - while(currentNode){ - if(currentNode.nodeType == 3){ - currentNodeLength = currentNode.nodeValue.replace(/(^[\t\r\n]+)|([\t\r\n]+$)/,'').length; - currentIndex += currentNodeLength; - if(currentIndex >= index){ - return { - 'node':currentNode, - 'index': currentNodeLength - (currentIndex - index) - } - } - }else if(!dtd.$empty[currentNode.tagName]){ - currentNodeLength = currentNode[browser.ie ? 'innerText' : 'textContent'].replace(/(^[\t\r\n]+)|([\t\r\n]+$)/,'').length - currentIndex += currentNodeLength; - if(currentIndex >= index){ - result = findNTextInBlockElm(currentNode,currentNodeLength - (currentIndex - index),str); - if(result){ - return result; - } - } - } - currentNode = domUtils.getNextDomNode(currentNode); - - } - } - - function searchReplace(me,opt){ - - var rng = me.selection.getRange(), - startBlockNode, - searchStr = opt.searchStr, - span = me.document.createElement('span'); - span.innerHTML = '$$ueditor_searchreplace_key$$'; - - rng.shrinkBoundary(true); - - //判断是不是第一次选中 - if(!rng.collapsed){ - rng.select(); - var rngText = me.selection.getText(); - if(new RegExp('^' + opt.searchStr + '$',(opt.casesensitive ? '' : 'i')).test(rngText)){ - if(opt.replaceStr != undefined){ - replaceText(rng,opt.replaceStr); - rng.select(); - return true; - }else{ - rng.collapse(opt.dir == -1) - } - - } - } - - - rng.insertNode(span); - rng.enlargeToBlockElm(true); - startBlockNode = rng.startContainer; - var currentIndex = startBlockNode[browser.ie ? 'innerText' : 'textContent'].indexOf('$$ueditor_searchreplace_key$$'); - rng.setStartBefore(span); - domUtils.remove(span); - var result = findTextBlockElm(startBlockNode,currentIndex,opt); - if(result){ - var rngStart = findNTextInBlockElm(result.node,result.index,searchStr); - var rngEnd = findNTextInBlockElm(result.node,result.index + searchStr.length,searchStr); - rng.setStart(rngStart.node,rngStart.index).setEnd(rngEnd.node,rngEnd.index); - - if(opt.replaceStr !== undefined){ - replaceText(rng,opt.replaceStr) - } - rng.select(); - return true; - }else{ - rng.setCursor() - } - - } - function replaceText(rng,str){ - - str = me.document.createTextNode(str); - rng.deleteContents().insertNode(str); - - } - return { - commands:{ - 'searchreplace':{ - execCommand:function(cmdName,opt){ - utils.extend(opt,{ - all : false, - casesensitive : false, - dir : 1 - },true); - var num = 0; - if(opt.all){ - - var rng = me.selection.getRange(), - first = me.body.firstChild; - if(first && first.nodeType == 1){ - rng.setStart(first,0); - rng.shrinkBoundary(true); - }else if(first.nodeType == 3){ - rng.setStartBefore(first) - } - rng.collapse(true).select(true); - if(opt.replaceStr !== undefined){ - me.fireEvent('saveScene'); - } - while(searchReplace(this,opt)){ - num++; - } - if(num){ - me.fireEvent('saveScene'); - } - }else{ - if(opt.replaceStr !== undefined){ - me.fireEvent('saveScene'); - } - if(searchReplace(this,opt)){ - num++ - } - if(num){ - me.fireEvent('saveScene'); - } - - } - - return num; - }, - notNeedUndo:1 - } - } - } -}); - -// plugins/customstyle.js -/** - * 自定义样式 - * @file - * @since 1.2.6.1 - */ - -/** - * 根据config配置文件里“customstyle”选项的值对匹配的标签执行样式替换。 - * @command customstyle - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand( 'customstyle' ); - * ``` - */ -UE.plugins['customstyle'] = function() { - var me = this; - me.setOpt({ 'customstyle':[ - {tag:'h1',name:'tc', style:'font-size:32px;font-weight:bold;border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'}, - {tag:'h1',name:'tl', style:'font-size:32px;font-weight:bold;border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:left;margin:0 0 10px 0;'}, - {tag:'span',name:'im', style:'font-size:16px;font-style:italic;font-weight:bold;line-height:18px;'}, - {tag:'span',name:'hi', style:'font-size:16px;font-style:italic;font-weight:bold;color:rgb(51, 153, 204);line-height:18px;'} - ]}); - me.commands['customstyle'] = { - execCommand : function(cmdName, obj) { - var me = this, - tagName = obj.tag, - node = domUtils.findParent(me.selection.getStart(), function(node) { - return node.getAttribute('label'); - }, true), - range,bk,tmpObj = {}; - for (var p in obj) { - if(obj[p]!==undefined) - tmpObj[p] = obj[p]; - } - delete tmpObj.tag; - if (node && node.getAttribute('label') == obj.label) { - range = this.selection.getRange(); - bk = range.createBookmark(); - if (range.collapsed) { - //trace:1732 删掉自定义标签,要有p来回填站位 - if(dtd.$block[node.tagName]){ - var fillNode = me.document.createElement('p'); - domUtils.moveChild(node, fillNode); - node.parentNode.insertBefore(fillNode, node); - domUtils.remove(node); - }else{ - domUtils.remove(node,true); - } - - } else { - - var common = domUtils.getCommonAncestor(bk.start, bk.end), - nodes = domUtils.getElementsByTagName(common, tagName); - if(new RegExp(tagName,'i').test(common.tagName)){ - nodes.push(common); - } - for (var i = 0,ni; ni = nodes[i++];) { - if (ni.getAttribute('label') == obj.label) { - var ps = domUtils.getPosition(ni, bk.start),pe = domUtils.getPosition(ni, bk.end); - if ((ps & domUtils.POSITION_FOLLOWING || ps & domUtils.POSITION_CONTAINS) - && - (pe & domUtils.POSITION_PRECEDING || pe & domUtils.POSITION_CONTAINS) - ) - if (dtd.$block[tagName]) { - var fillNode = me.document.createElement('p'); - domUtils.moveChild(ni, fillNode); - ni.parentNode.insertBefore(fillNode, ni); - } - domUtils.remove(ni, true); - } - } - node = domUtils.findParent(common, function(node) { - return node.getAttribute('label') == obj.label; - }, true); - if (node) { - - domUtils.remove(node, true); - - } - - } - range.moveToBookmark(bk).select(); - } else { - if (dtd.$block[tagName]) { - this.execCommand('paragraph', tagName, tmpObj,'customstyle'); - range = me.selection.getRange(); - if (!range.collapsed) { - range.collapse(); - node = domUtils.findParent(me.selection.getStart(), function(node) { - return node.getAttribute('label') == obj.label; - }, true); - var pNode = me.document.createElement('p'); - domUtils.insertAfter(node, pNode); - domUtils.fillNode(me.document, pNode); - range.setStart(pNode, 0).setCursor(); - } - } else { - - range = me.selection.getRange(); - if (range.collapsed) { - node = me.document.createElement(tagName); - domUtils.setAttributes(node, tmpObj); - range.insertNode(node).setStart(node, 0).setCursor(); - - return; - } - - bk = range.createBookmark(); - range.applyInlineStyle(tagName, tmpObj).moveToBookmark(bk).select(); - } - } - - }, - queryCommandValue : function() { - var parent = domUtils.filterNodeList( - this.selection.getStartElementPath(), - function(node){return node.getAttribute('label')} - ); - return parent ? parent.getAttribute('label') : ''; - } - }; - //当去掉customstyle是,如果是块元素,用p代替 - me.addListener('keyup', function(type, evt) { - var keyCode = evt.keyCode || evt.which; - - if (keyCode == 32 || keyCode == 13) { - var range = me.selection.getRange(); - if (range.collapsed) { - var node = domUtils.findParent(me.selection.getStart(), function(node) { - return node.getAttribute('label'); - }, true); - if (node && dtd.$block[node.tagName] && domUtils.isEmptyNode(node)) { - var p = me.document.createElement('p'); - domUtils.insertAfter(node, p); - domUtils.fillNode(me.document, p); - domUtils.remove(node); - range.setStart(p, 0).setCursor(); - - - } - } - } - }); -}; - -// plugins/catchremoteimage.js -///import core -///commands 远程图片抓取 -///commandsName catchRemoteImage,catchremoteimageenable -///commandsTitle 远程图片抓取 -/** - * 远程图片抓取,当开启本插件时所有不符合本地域名的图片都将被抓取成为本地服务器上的图片 - */ -UE.plugins['catchremoteimage'] = function () { - var me = this, - ajax = UE.ajax; - - /* 设置默认值 */ - if (me.options.catchRemoteImageEnable === false) return; - me.setOpt({ - catchRemoteImageEnable: false - }); - - me.addListener("afterpaste", function () { - me.fireEvent("catchRemoteImage"); - }); - - me.addListener("catchRemoteImage", function () { - - var catcherLocalDomain = me.getOpt('catcherLocalDomain'), - catcherActionUrl = me.getActionUrl(me.getOpt('catcherActionName')), - catcherUrlPrefix = me.getOpt('catcherUrlPrefix'), - catcherFieldName = me.getOpt('catcherFieldName'); - - var remoteImages = [], - imgs = domUtils.getElementsByTagName(me.document, "img"), - test = function (src, urls) { - if (src.indexOf(location.host) != -1 || /(^\.)|(^\/)/.test(src)) { - return true; - } - if (urls) { - for (var j = 0, url; url = urls[j++];) { - if (src.indexOf(url) !== -1) { - return true; - } - } - } - return false; - }; - - for (var i = 0, ci; ci = imgs[i++];) { - if (ci.getAttribute("word_img")) { - continue; - } - var src = ci.getAttribute("_src") || ci.src || ""; - if (/^(https?|ftp):/i.test(src) && !test(src, catcherLocalDomain)) { - remoteImages.push(src); - } - } - - if (remoteImages.length) { - catchremoteimage(remoteImages, { - //成功抓取 - success: function (r) { - try { - var info = r.state !== undefined ? r:eval("(" + r.responseText + ")"); - } catch (e) { - return; - } - - /* 获取源路径和新路径 */ - var i, j, ci, cj, oldSrc, newSrc, list = info.list; - - for (i = 0; ci = imgs[i++];) { - oldSrc = ci.getAttribute("_src") || ci.src || ""; - for (j = 0; cj = list[j++];) { - if (oldSrc == cj.source && cj.state == "SUCCESS") { //抓取失败时不做替换处理 - newSrc = catcherUrlPrefix + cj.url; - domUtils.setAttributes(ci, { - "src": newSrc, - "_src": newSrc - }); - break; - } - } - } - me.fireEvent('catchremotesuccess') - }, - //回调失败,本次请求超时 - error: function () { - me.fireEvent("catchremoteerror"); - } - }); - } - - function catchremoteimage(imgs, callbacks) { - var params = utils.serializeParam(me.queryCommandValue('serverparam')) || '', - url = utils.formatUrl(catcherActionUrl + (catcherActionUrl.indexOf('?') == -1 ? '?':'&') + params), - isJsonp = utils.isCrossDomainUrl(url), - opt = { - 'method': 'POST', - 'dataType': isJsonp ? 'jsonp':'', - 'timeout': 60000, //单位:毫秒,回调请求超时设置。目标用户如果网速不是很快的话此处建议设置一个较大的数值 - 'onsuccess': callbacks["success"], - 'onerror': callbacks["error"] - }; - opt[catcherFieldName] = imgs; - ajax.request(url, opt); - } - - }); -}; - -// plugins/snapscreen.js -/** - * 截屏插件,为UEditor提供插入支持 - * @file - * @since 1.4.2 - */ -UE.plugin.register('snapscreen', function (){ - - var me = this; - var snapplugin; - - function getLocation(url){ - var search, - a = document.createElement('a'), - params = utils.serializeParam(me.queryCommandValue('serverparam')) || ''; - - a.href = url; - if (browser.ie) { - a.href = a.href; - } - - - search = a.search; - if (params) { - search = search + (search.indexOf('?') == -1 ? '?':'&')+ params; - search = search.replace(/[&]+/ig, '&'); - } - return { - 'port': a.port, - 'hostname': a.hostname, - 'path': a.pathname + search || + a.hash - } - } - - return { - commands:{ - /** - * 字体背景颜色 - * @command snapscreen - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand('snapscreen'); - * ``` - */ - 'snapscreen':{ - execCommand:function (cmd) { - var url, local, res; - var lang = me.getLang("snapScreen_plugin"); - - if(!snapplugin){ - var container = me.container; - var doc = me.container.ownerDocument || me.container.document; - snapplugin = doc.createElement("object"); - try{snapplugin.type = "application/x-pluginbaidusnap";}catch(e){ - return; - } - snapplugin.style.cssText = "position:absolute;left:-9999px;width:0;height:0;"; - snapplugin.setAttribute("width","0"); - snapplugin.setAttribute("height","0"); - container.appendChild(snapplugin); - } - - function onSuccess(rs){ - try{ - rs = eval("("+ rs +")"); - if(rs.state == 'SUCCESS'){ - var opt = me.options; - me.execCommand('insertimage', { - src: opt.snapscreenUrlPrefix + rs.url, - _src: opt.snapscreenUrlPrefix + rs.url, - alt: rs.title || '', - floatStyle: opt.snapscreenImgAlign - }); - } else { - alert(rs.state); - } - }catch(e){ - alert(lang.callBackErrorMsg); - } - } - url = me.getActionUrl(me.getOpt('snapscreenActionName')); - local = getLocation(url); - setTimeout(function () { - try{ - res =snapplugin.saveSnapshot(local.hostname, local.path, local.port); - }catch(e){ - me.ui._dialogs['snapscreenDialog'].open(); - return; - } - - onSuccess(res); - }, 50); - }, - queryCommandState: function(){ - return (navigator.userAgent.indexOf("Windows",0) != -1) ? 0:-1; - } - } - } - } -}); - - -// plugins/insertparagraph.js -/** - * 插入段落 - * @file - * @since 1.2.6.1 - */ - - -/** - * 插入段落 - * @command insertparagraph - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * //editor是编辑器实例 - * editor.execCommand( 'insertparagraph' ); - * ``` - */ - -UE.commands['insertparagraph'] = { - execCommand : function( cmdName,front) { - var me = this, - range = me.selection.getRange(), - start = range.startContainer,tmpNode; - while(start ){ - if(domUtils.isBody(start)){ - break; - } - tmpNode = start; - start = start.parentNode; - } - if(tmpNode){ - var p = me.document.createElement('p'); - if(front){ - tmpNode.parentNode.insertBefore(p,tmpNode) - }else{ - tmpNode.parentNode.insertBefore(p,tmpNode.nextSibling) - } - domUtils.fillNode(me.document,p); - range.setStart(p,0).setCursor(false,true); - } - } -}; - - - -// plugins/webapp.js -/** - * 百度应用 - * @file - * @since 1.2.6.1 - */ - - -/** - * 插入百度应用 - * @command webapp - * @method execCommand - * @remind 需要百度APPKey - * @remind 百度应用主页: http://app.baidu.com/ - * @param { Object } appOptions 应用所需的参数项, 支持的key有: title=>应用标题, width=>应用容器宽度, - * height=>应用容器高度,logo=>应用logo,url=>应用地址 - * @example - * ```javascript - * //editor是编辑器实例 - * //在编辑器里插入一个“植物大战僵尸”的APP - * editor.execCommand( 'webapp' , { - * title: '植物大战僵尸', - * width: 560, - * height: 465, - * logo: '应用展示的图片', - * url: '百度应用的地址' - * } ); - * ``` - */ - -//UE.plugins['webapp'] = function () { -// var me = this; -// function createInsertStr( obj, toIframe, addParagraph ) { -// return !toIframe ? -// (addParagraph ? '

    ' : '') + '' + -// (addParagraph ? '

    ' : '') -// : -// ''; -// } -// -// function switchImgAndIframe( img2frame ) { -// var tmpdiv, -// nodes = domUtils.getElementsByTagName( me.document, !img2frame ? "iframe" : "img" ); -// for ( var i = 0, node; node = nodes[i++]; ) { -// if ( node.className != "edui-faked-webapp" ){ -// continue; -// } -// tmpdiv = me.document.createElement( "div" ); -// tmpdiv.innerHTML = createInsertStr( img2frame ? {url:node.getAttribute( "_url" ), width:node.width, height:node.height,title:node.title,logo:node.style.backgroundImage.replace("url(","").replace(")","")} : {url:node.getAttribute( "src", 2 ),title:node.title, width:node.width, height:node.height,logo:node.getAttribute("logo_url")}, img2frame ? true : false,false ); -// node.parentNode.replaceChild( tmpdiv.firstChild, node ); -// } -// } -// -// me.addListener( "beforegetcontent", function () { -// switchImgAndIframe( true ); -// } ); -// me.addListener( 'aftersetcontent', function () { -// switchImgAndIframe( false ); -// } ); -// me.addListener( 'aftergetcontent', function ( cmdName ) { -// if ( cmdName == 'aftergetcontent' && me.queryCommandState( 'source' ) ){ -// return; -// } -// switchImgAndIframe( false ); -// } ); -// -// me.commands['webapp'] = { -// execCommand:function ( cmd, obj ) { -// me.execCommand( "inserthtml", createInsertStr( obj, false,true ) ); -// } -// }; -//}; - -UE.plugin.register('webapp', function (){ - var me = this; - function createInsertStr(obj,toEmbed){ - return !toEmbed ? - '' - : - '' - - } - return { - outputRule: function(root){ - utils.each(root.getNodesByTagName('img'),function(node){ - var html; - if(node.getAttr('class') == 'edui-faked-webapp'){ - html = createInsertStr({ - title:node.getAttr('title'), - 'width':node.getAttr('width'), - 'height':node.getAttr('height'), - 'align':node.getAttr('align'), - 'cssfloat':node.getStyle('float'), - 'url':node.getAttr("_url"), - 'logo':node.getAttr('_logo_url') - },true); - var embed = UE.uNode.createElement(html); - node.parentNode.replaceChild(embed,node); - } - }) - }, - inputRule:function(root){ - utils.each(root.getNodesByTagName('iframe'),function(node){ - if(node.getAttr('class') == 'edui-faked-webapp'){ - var img = UE.uNode.createElement(createInsertStr({ - title:node.getAttr('title'), - 'width':node.getAttr('width'), - 'height':node.getAttr('height'), - 'align':node.getAttr('align'), - 'cssfloat':node.getStyle('float'), - 'url':node.getAttr("src"), - 'logo':node.getAttr('logo_url') - })); - node.parentNode.replaceChild(img,node); - } - }) - - }, - commands:{ - /** - * 插入百度应用 - * @command webapp - * @method execCommand - * @remind 需要百度APPKey - * @remind 百度应用主页: http://app.baidu.com/ - * @param { Object } appOptions 应用所需的参数项, 支持的key有: title=>应用标题, width=>应用容器宽度, - * height=>应用容器高度,logo=>应用logo,url=>应用地址 - * @example - * ```javascript - * //editor是编辑器实例 - * //在编辑器里插入一个“植物大战僵尸”的APP - * editor.execCommand( 'webapp' , { - * title: '植物大战僵尸', - * width: 560, - * height: 465, - * logo: '应用展示的图片', - * url: '百度应用的地址' - * } ); - * ``` - */ - 'webapp':{ - execCommand:function (cmd, obj) { - - var me = this, - str = createInsertStr(utils.extend(obj,{ - align:'none' - }), false); - me.execCommand("inserthtml",str); - }, - queryCommandState:function () { - var me = this, - img = me.selection.getRange().getClosedNode(), - flag = img && (img.className == "edui-faked-webapp"); - return flag ? 1 : 0; - } - } - } - } -}); - -// plugins/template.js -///import core -///import plugins\inserthtml.js -///import plugins\cleardoc.js -///commands 模板 -///commandsName template -///commandsTitle 模板 -///commandsDialog dialogs\template -UE.plugins['template'] = function () { - UE.commands['template'] = { - execCommand:function (cmd, obj) { - obj.html && this.execCommand("inserthtml", obj.html); - } - }; - this.addListener("click", function (type, evt) { - var el = evt.target || evt.srcElement, - range = this.selection.getRange(); - var tnode = domUtils.findParent(el, function (node) { - if (node.className && domUtils.hasClass(node, "ue_t")) { - return node; - } - }, true); - tnode && range.selectNode(tnode).shrinkBoundary().select(); - }); - this.addListener("keydown", function (type, evt) { - var range = this.selection.getRange(); - if (!range.collapsed) { - if (!evt.ctrlKey && !evt.metaKey && !evt.shiftKey && !evt.altKey) { - var tnode = domUtils.findParent(range.startContainer, function (node) { - if (node.className && domUtils.hasClass(node, "ue_t")) { - return node; - } - }, true); - if (tnode) { - domUtils.removeClasses(tnode, ["ue_t"]); - } - } - } - }); -}; - - -// plugins/music.js -/** - * 插入音乐命令 - * @file - */ -UE.plugin.register('music', function (){ - var me = this; - function creatInsertStr(url,width,height,align,cssfloat,toEmbed){ - return !toEmbed ? - '' - : - ''; - } - return { - outputRule: function(root){ - utils.each(root.getNodesByTagName('img'),function(node){ - var html; - if(node.getAttr('class') == 'edui-faked-music'){ - var cssfloat = node.getStyle('float'); - var align = node.getAttr('align'); - html = creatInsertStr(node.getAttr("_url"), node.getAttr('width'), node.getAttr('height'), align, cssfloat, true); - var embed = UE.uNode.createElement(html); - node.parentNode.replaceChild(embed,node); - } - }) - }, - inputRule:function(root){ - utils.each(root.getNodesByTagName('embed'),function(node){ - if(node.getAttr('class') == 'edui-faked-music'){ - var cssfloat = node.getStyle('float'); - var align = node.getAttr('align'); - html = creatInsertStr(node.getAttr("src"), node.getAttr('width'), node.getAttr('height'), align, cssfloat,false); - var img = UE.uNode.createElement(html); - node.parentNode.replaceChild(img,node); - } - }) - - }, - commands:{ - /** - * 插入音乐 - * @command music - * @method execCommand - * @param { Object } musicOptions 插入音乐的参数项, 支持的key有: url=>音乐地址; - * width=>音乐容器宽度;height=>音乐容器高度;align=>音乐文件的对齐方式, 可选值有: left, center, right, none - * @example - * ```javascript - * //editor是编辑器实例 - * //在编辑器里插入一个“植物大战僵尸”的APP - * editor.execCommand( 'music' , { - * width: 400, - * height: 95, - * align: "center", - * url: "音乐地址" - * } ); - * ``` - */ - 'music':{ - execCommand:function (cmd, musicObj) { - var me = this, - str = creatInsertStr(musicObj.url, musicObj.width || 400, musicObj.height || 95, "none", false); - me.execCommand("inserthtml",str); - }, - queryCommandState:function () { - var me = this, - img = me.selection.getRange().getClosedNode(), - flag = img && (img.className == "edui-faked-music"); - return flag ? 1 : 0; - } - } - } - } -}); - -// plugins/autoupload.js -/** - * @description - * 1.拖放文件到编辑区域,自动上传并插入到选区 - * 2.插入粘贴板的图片,自动上传并插入到选区 - * @author Jinqn - * @date 2013-10-14 - */ -UE.plugin.register('autoupload', function (){ - - function sendAndInsertFile(file, editor) { - var me = editor; - //模拟数据 - var fieldName, urlPrefix, maxSize, allowFiles, actionUrl, - loadingHtml, errorHandler, successHandler, - filetype = /image\/\w+/i.test(file.type) ? 'image':'file', - loadingId = 'loading_' + (+new Date()).toString(36); - - fieldName = me.getOpt(filetype + 'FieldName'); - urlPrefix = me.getOpt(filetype + 'UrlPrefix'); - maxSize = me.getOpt(filetype + 'MaxSize'); - allowFiles = me.getOpt(filetype + 'AllowFiles'); - actionUrl = me.getActionUrl(me.getOpt(filetype + 'ActionName')); - errorHandler = function(title) { - var loader = me.document.getElementById(loadingId); - loader && domUtils.remove(loader); - me.fireEvent('showmessage', { - 'id': loadingId, - 'content': title, - 'type': 'error', - 'timeout': 4000 - }); - }; - - if (filetype == 'image') { - loadingHtml = ''; - successHandler = function(data) { - var link = urlPrefix + data.url, - loader = me.document.getElementById(loadingId); - if (loader) { - loader.setAttribute('src', link); - loader.setAttribute('_src', link); - loader.setAttribute('title', data.title || ''); - loader.setAttribute('alt', data.original || ''); - loader.removeAttribute('id'); - domUtils.removeClasses(loader, 'loadingclass'); - } - }; - } else { - loadingHtml = '

    ' + - '' + - '

    '; - successHandler = function(data) { - var link = urlPrefix + data.url, - loader = me.document.getElementById(loadingId); - - var rng = me.selection.getRange(), - bk = rng.createBookmark(); - rng.selectNode(loader).select(); - me.execCommand('insertfile', {'url': link}); - rng.moveToBookmark(bk).select(); - }; - } - - /* 插入loading的占位符 */ - me.execCommand('inserthtml', loadingHtml); - - /* 判断后端配置是否没有加载成功 */ - if (!me.getOpt(filetype + 'ActionName')) { - errorHandler(me.getLang('autoupload.errorLoadConfig')); - return; - } - /* 判断文件大小是否超出限制 */ - if(file.size > maxSize) { - errorHandler(me.getLang('autoupload.exceedSizeError')); - return; - } - /* 判断文件格式是否超出允许 */ - var fileext = file.name ? file.name.substr(file.name.lastIndexOf('.')):''; - if ((fileext && filetype != 'image') || (allowFiles && (allowFiles.join('') + '.').indexOf(fileext.toLowerCase() + '.') == -1)) { - errorHandler(me.getLang('autoupload.exceedTypeError')); - return; - } - - /* 创建Ajax并提交 */ - var xhr = new XMLHttpRequest(), - fd = new FormData(), - params = utils.serializeParam(me.queryCommandValue('serverparam')) || '', - url = utils.formatUrl(actionUrl + (actionUrl.indexOf('?') == -1 ? '?':'&') + params); - - fd.append(fieldName, file, file.name || ('blob.' + file.type.substr('image/'.length))); - fd.append('type', 'ajax'); - xhr.open("post", url, true); - xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); - xhr.addEventListener('load', function (e) { - try{ - var json = (new Function("return " + utils.trim(e.target.response)))(); - if (json.state == 'SUCCESS' && json.url) { - successHandler(json); - } else { - errorHandler(json.state); - } - }catch(er){ - errorHandler(me.getLang('autoupload.loadError')); - } - }); - xhr.send(fd); - } - - function getPasteImage(e){ - return e.clipboardData && e.clipboardData.items && e.clipboardData.items.length == 1 && /^image\//.test(e.clipboardData.items[0].type) ? e.clipboardData.items:null; - } - function getDropImage(e){ - return e.dataTransfer && e.dataTransfer.files ? e.dataTransfer.files:null; - } - - return { - outputRule: function(root){ - utils.each(root.getNodesByTagName('img'),function(n){ - if (/\b(loaderrorclass)|(bloaderrorclass)\b/.test(n.getAttr('class'))) { - n.parentNode.removeChild(n); - } - }); - utils.each(root.getNodesByTagName('p'),function(n){ - if (/\bloadpara\b/.test(n.getAttr('class'))) { - n.parentNode.removeChild(n); - } - }); - }, - bindEvents:{ - //插入粘贴板的图片,拖放插入图片 - 'ready':function(e){ - var me = this; - if(window.FormData && window.FileReader) { - domUtils.on(me.body, 'paste drop', function(e){ - var hasImg = false, - items; - //获取粘贴板文件列表或者拖放文件列表 - items = e.type == 'paste' ? getPasteImage(e):getDropImage(e); - if(items){ - var len = items.length, - file; - while (len--){ - file = items[len]; - if(file.getAsFile) file = file.getAsFile(); - if(file && file.size > 0) { - sendAndInsertFile(file, me); - hasImg = true; - } - } - hasImg && e.preventDefault(); - } - - }); - //取消拖放图片时出现的文字光标位置提示 - domUtils.on(me.body, 'dragover', function (e) { - if(e.dataTransfer.types[0] == 'Files') { - e.preventDefault(); - } - }); - - //设置loading的样式 - utils.cssRule('loading', - '.loadingclass{display:inline-block;cursor:default;background: url(\'' - + this.options.themePath - + this.options.theme +'/images/loading.gif\') no-repeat center center transparent;border:1px solid #cccccc;margin-left:1px;height: 22px;width: 22px;}\n' + - '.loaderrorclass{display:inline-block;cursor:default;background: url(\'' - + this.options.themePath - + this.options.theme +'/images/loaderror.png\') no-repeat center center transparent;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;' + - '}', - this.document); - } - } - } - } -}); - -// plugins/autosave.js -UE.plugin.register('autosave', function (){ - - var me = this, - //无限循环保护 - lastSaveTime = new Date(), - //最小保存间隔时间 - MIN_TIME = 20, - //auto save key - saveKey = null; - - function save ( editor ) { - - var saveData; - - if ( new Date() - lastSaveTime < MIN_TIME ) { - return; - } - - if ( !editor.hasContents() ) { - //这里不能调用命令来删除, 会造成事件死循环 - saveKey && me.removePreferences( saveKey ); - return; - } - - lastSaveTime = new Date(); - - editor._saveFlag = null; - - saveData = me.body.innerHTML; - - if ( editor.fireEvent( "beforeautosave", { - content: saveData - } ) === false ) { - return; - } - - me.setPreferences( saveKey, saveData ); - - editor.fireEvent( "afterautosave", { - content: saveData - } ); - - } - - return { - defaultOptions: { - //默认间隔时间 - saveInterval: 500, - enableAutoSave: true // HaoChuan9421 - }, - bindEvents:{ - 'ready':function(){ - - var _suffix = "-drafts-data", - key = null; - - if ( me.key ) { - key = me.key + _suffix; - } else { - key = ( me.container.parentNode.id || 'ue-common' ) + _suffix; - } - - //页面地址+编辑器ID 保持唯一 - saveKey = ( location.protocol + location.host + location.pathname ).replace( /[.:\/]/g, '_' ) + key; - - }, - - 'contentchange': function () { - // HaoChuan9421 - if (!me.getOpt('enableAutoSave')) { - return; - } - - if ( !saveKey ) { - return; - } - - if ( me._saveFlag ) { - window.clearTimeout( me._saveFlag ); - } - - if ( me.options.saveInterval > 0 ) { - - me._saveFlag = window.setTimeout( function () { - - save( me ); - - }, me.options.saveInterval ); - - } else { - - save(me); - - } - - - } - }, - commands:{ - 'clearlocaldata':{ - execCommand:function (cmd, name) { - if ( saveKey && me.getPreferences( saveKey ) ) { - me.removePreferences( saveKey ) - } - }, - notNeedUndo: true, - ignoreContentChange:true - }, - - 'getlocaldata':{ - execCommand:function (cmd, name) { - return saveKey ? me.getPreferences( saveKey ) || '' : ''; - }, - notNeedUndo: true, - ignoreContentChange:true - }, - - 'drafts':{ - execCommand:function (cmd, name) { - if ( saveKey ) { - me.body.innerHTML = me.getPreferences( saveKey ) || '

    '+domUtils.fillHtml+'

    '; - me.focus(true); - } - }, - queryCommandState: function () { - return saveKey ? ( me.getPreferences( saveKey ) === null ? -1 : 0 ) : -1; - }, - notNeedUndo: true, - ignoreContentChange:true - } - } - } - -}); - -// plugins/charts.js -UE.plugin.register('charts', function (){ - - var me = this; - - return { - bindEvents: { - 'chartserror': function () { - } - }, - commands:{ - 'charts': { - execCommand: function ( cmd, data ) { - - var tableNode = domUtils.findParentByTagName(this.selection.getRange().startContainer, 'table', true), - flagText = [], - config = {}; - - if ( !tableNode ) { - return false; - } - - if ( !validData( tableNode ) ) { - me.fireEvent( "chartserror" ); - return false; - } - - config.title = data.title || ''; - config.subTitle = data.subTitle || ''; - config.xTitle = data.xTitle || ''; - config.yTitle = data.yTitle || ''; - config.suffix = data.suffix || ''; - config.tip = data.tip || ''; - //数据对齐方式 - config.dataFormat = data.tableDataFormat || ''; - //图表类型 - config.chartType = data.chartType || 0; - - for ( var key in config ) { - - if ( !config.hasOwnProperty( key ) ) { - continue; - } - - flagText.push( key+":"+config[ key ] ); - - } - - tableNode.setAttribute( "data-chart", flagText.join( ";" ) ); - domUtils.addClass( tableNode, "edui-charts-table" ); - - - - }, - queryCommandState: function ( cmd, name ) { - - var tableNode = domUtils.findParentByTagName(this.selection.getRange().startContainer, 'table', true); - return tableNode && validData( tableNode ) ? 0 : -1; - - } - } - }, - inputRule:function(root){ - utils.each(root.getNodesByTagName('table'),function( tableNode ){ - - if ( tableNode.getAttr("data-chart") !== undefined ) { - tableNode.setAttr("style"); - } - - }) - - }, - outputRule:function(root){ - utils.each(root.getNodesByTagName('table'),function( tableNode ){ - - if ( tableNode.getAttr("data-chart") !== undefined ) { - tableNode.setAttr("style", "display: none;"); - } - - }) - - } - } - - function validData ( table ) { - - var firstRows = null, - cellCount = 0; - - //行数不够 - if ( table.rows.length < 2 ) { - return false; - } - - //列数不够 - if ( table.rows[0].cells.length < 2 ) { - return false; - } - - //第一行所有cell必须是th - firstRows = table.rows[ 0 ].cells; - cellCount = firstRows.length; - - for ( var i = 0, cell; cell = firstRows[ i ]; i++ ) { - - if ( cell.tagName.toLowerCase() !== 'th' ) { - return false; - } - - } - - for ( var i = 1, row; row = table.rows[ i ]; i++ ) { - - //每行单元格数不匹配, 返回false - if ( row.cells.length != cellCount ) { - return false; - } - - //第一列不是th也返回false - if ( row.cells[0].tagName.toLowerCase() !== 'th' ) { - return false; - } - - for ( var j = 1, cell; cell = row.cells[ j ]; j++ ) { - - var value = utils.trim( ( cell.innerText || cell.textContent || '' ) ); - - value = value.replace( new RegExp( UE.dom.domUtils.fillChar, 'g' ), '' ).replace( /^\s+|\s+$/g, '' ); - - //必须是数字 - if ( !/^\d*\.?\d+$/.test( value ) ) { - return false; - } - - } - - } - - return true; - - } - -}); - -// plugins/section.js -/** - * 目录大纲支持插件 - * @file - * @since 1.3.0 - */ -UE.plugin.register('section', function (){ - /* 目录节点对象 */ - function Section(option){ - this.tag = ''; - this.level = -1, - this.dom = null; - this.nextSection = null; - this.previousSection = null; - this.parentSection = null; - this.startAddress = []; - this.endAddress = []; - this.children = []; - } - function getSection(option) { - var section = new Section(); - return utils.extend(section, option); - } - function getNodeFromAddress(startAddress, root) { - var current = root; - for(var i = 0;i < startAddress.length; i++) { - if(!current.childNodes) return null; - current = current.childNodes[startAddress[i]]; - } - return current; - } - - var me = this; - - return { - bindMultiEvents:{ - type: 'aftersetcontent afterscencerestore', - handler: function(){ - me.fireEvent('updateSections'); - } - }, - bindEvents:{ - /* 初始化、拖拽、粘贴、执行setcontent之后 */ - 'ready': function (){ - me.fireEvent('updateSections'); - domUtils.on(me.body, 'drop paste', function(){ - me.fireEvent('updateSections'); - }); - }, - /* 执行paragraph命令之后 */ - 'afterexeccommand': function (type, cmd) { - if(cmd == 'paragraph') { - me.fireEvent('updateSections'); - } - }, - /* 部分键盘操作,触发updateSections事件 */ - 'keyup': function (type, e) { - var me = this, - range = me.selection.getRange(); - if(range.collapsed != true) { - me.fireEvent('updateSections'); - } else { - var keyCode = e.keyCode || e.which; - if(keyCode == 13 || keyCode == 8 || keyCode == 46) { - me.fireEvent('updateSections'); - } - } - } - }, - commands:{ - 'getsections': { - execCommand: function (cmd, levels) { - var levelFn = levels || ['h1', 'h2', 'h3', 'h4', 'h5', 'h6']; - - for (var i = 0; i < levelFn.length; i++) { - if (typeof levelFn[i] == 'string') { - levelFn[i] = function(fn){ - return function(node){ - return node.tagName == fn.toUpperCase() - }; - }(levelFn[i]); - } else if (typeof levelFn[i] != 'function') { - levelFn[i] = function (node) { - return null; - } - } - } - function getSectionLevel(node) { - for (var i = 0; i < levelFn.length; i++) { - if (levelFn[i](node)) return i; - } - return -1; - } - - var me = this, - Directory = getSection({'level':-1, 'title':'root'}), - previous = Directory; - - function traversal(node, Directory) { - var level, - tmpSection = null, - parent, - child, - children = node.childNodes; - for (var i = 0, len = children.length; i < len; i++) { - child = children[i]; - level = getSectionLevel(child); - if (level >= 0) { - var address = me.selection.getRange().selectNode(child).createAddress(true).startAddress, - current = getSection({ - 'tag': child.tagName, - 'title': child.innerText || child.textContent || '', - 'level': level, - 'dom': child, - 'startAddress': utils.clone(address, []), - 'endAddress': utils.clone(address, []), - 'children': [] - }); - previous.nextSection = current; - current.previousSection = previous; - parent = previous; - while(level <= parent.level){ - parent = parent.parentSection; - } - current.parentSection = parent; - parent.children.push(current); - tmpSection = previous = current; - } else { - child.nodeType === 1 && traversal(child, Directory); - tmpSection && tmpSection.endAddress[tmpSection.endAddress.length - 1] ++; - } - } - } - traversal(me.body, Directory); - return Directory; - }, - notNeedUndo: true - }, - 'movesection': { - execCommand: function (cmd, sourceSection, targetSection, isAfter) { - - var me = this, - targetAddress, - target; - - if(!sourceSection || !targetSection || targetSection.level == -1) return; - - targetAddress = isAfter ? targetSection.endAddress:targetSection.startAddress; - target = getNodeFromAddress(targetAddress, me.body); - - /* 判断目标地址是否被源章节包含 */ - if(!targetAddress || !target || isContainsAddress(sourceSection.startAddress, sourceSection.endAddress, targetAddress)) return; - - var startNode = getNodeFromAddress(sourceSection.startAddress, me.body), - endNode = getNodeFromAddress(sourceSection.endAddress, me.body), - current, - nextNode; - - if(isAfter) { - current = endNode; - while ( current && !(domUtils.getPosition( startNode, current ) & domUtils.POSITION_FOLLOWING) ) { - nextNode = current.previousSibling; - domUtils.insertAfter(target, current); - if(current == startNode) break; - current = nextNode; - } - } else { - current = startNode; - while ( current && !(domUtils.getPosition( current, endNode ) & domUtils.POSITION_FOLLOWING) ) { - nextNode = current.nextSibling; - target.parentNode.insertBefore(current, target); - if(current == endNode) break; - current = nextNode; - } - } - - me.fireEvent('updateSections'); - - /* 获取地址的包含关系 */ - function isContainsAddress(startAddress, endAddress, addressTarget){ - var isAfterStartAddress = false, - isBeforeEndAddress = false; - for(var i = 0; i< startAddress.length; i++){ - if(i >= addressTarget.length) break; - if(addressTarget[i] > startAddress[i]) { - isAfterStartAddress = true; - break; - } else if(addressTarget[i] < startAddress[i]) { - break; - } - } - for(var i = 0; i< endAddress.length; i++){ - if(i >= addressTarget.length) break; - if(addressTarget[i] < startAddress[i]) { - isBeforeEndAddress = true; - break; - } else if(addressTarget[i] > startAddress[i]) { - break; - } - } - return isAfterStartAddress && isBeforeEndAddress; - } - } - }, - 'deletesection': { - execCommand: function (cmd, section, keepChildren) { - var me = this; - - if(!section) return; - - function getNodeFromAddress(startAddress) { - var current = me.body; - for(var i = 0;i < startAddress.length; i++) { - if(!current.childNodes) return null; - current = current.childNodes[startAddress[i]]; - } - return current; - } - - var startNode = getNodeFromAddress(section.startAddress), - endNode = getNodeFromAddress(section.endAddress), - current = startNode, - nextNode; - - if(!keepChildren) { - while ( current && domUtils.inDoc(endNode, me.document) && !(domUtils.getPosition( current, endNode ) & domUtils.POSITION_FOLLOWING) ) { - nextNode = current.nextSibling; - domUtils.remove(current); - current = nextNode; - } - } else { - domUtils.remove(current); - } - - me.fireEvent('updateSections'); - } - }, - 'selectsection': { - execCommand: function (cmd, section) { - if(!section && !section.dom) return false; - var me = this, - range = me.selection.getRange(), - address = { - 'startAddress':utils.clone(section.startAddress, []), - 'endAddress':utils.clone(section.endAddress, []) - }; - address.endAddress[address.endAddress.length - 1]++; - range.moveToAddress(address).select().scrollToView(); - return true; - }, - notNeedUndo: true - }, - 'scrolltosection': { - execCommand: function (cmd, section) { - if(!section && !section.dom) return false; - var me = this, - range = me.selection.getRange(), - address = { - 'startAddress':section.startAddress, - 'endAddress':section.endAddress - }; - address.endAddress[address.endAddress.length - 1]++; - range.moveToAddress(address).scrollToView(); - return true; - }, - notNeedUndo: true - } - } - } -}); - -// plugins/simpleupload.js -/** - * @description - * 简单上传:点击按钮,直接选择文件上传。 - * 原 UEditor 作者使用了 form 表单 + iframe 的方式上传 - * 但由于同源策略的限制,父页面无法访问跨域的 iframe 内容 - * 导致无法获取接口返回的数据,使得单图上传无法在跨域的情况下使用 - * 这里改为普通的XHR上传,兼容到IE10+ - * @author HaoChuan9421 - * @date 2018-12-20 - */ -UE.plugin.register('simpleupload', function() { - var me = this, - containerBtn, - timestrap = (+new Date()).toString(36); - - function initUploadBtn() { - var w = containerBtn.offsetWidth || 20, - h = containerBtn.offsetHeight || 20, - btnStyle = 'display:block;width:' + w + 'px;height:' + h + 'px;overflow:hidden;border:0;margin:0;padding:0;position:absolute;top:0;left:0;filter:alpha(opacity=0);-moz-opacity:0;-khtml-opacity: 0;opacity: 0;cursor:pointer;'; - - var form = document.createElement('form'); - var input = document.createElement('input'); - form.id = 'edui_form_' + timestrap; - form.enctype = 'multipart/form-data'; - form.style = btnStyle; - input.id = 'edui_input_' + timestrap; - input.type = 'file' - input.accept = 'image/*'; - input.name = me.options.imageFieldName; - input.style = btnStyle; - form.appendChild(input); - containerBtn.appendChild(form); - - input.addEventListener('change', function(event) { - if (!input.value) return; - var loadingId = 'loading_' + (+new Date()).toString(36); - var imageActionUrl = me.getActionUrl(me.getOpt('imageActionName')); - var params = utils.serializeParam(me.queryCommandValue('serverparam')) || ''; - var action = utils.formatUrl(imageActionUrl + (imageActionUrl.indexOf('?') == -1 ? '?' : '&') + params); - var allowFiles = me.getOpt('imageAllowFiles'); - me.focus(); - me.execCommand('inserthtml', ''); - - function showErrorLoader(title) { - if (loadingId) { - var loader = me.document.getElementById(loadingId); - loader && domUtils.remove(loader); - me.fireEvent('showmessage', { - 'id': loadingId, - 'content': title, - 'type': 'error', - 'timeout': 4000 - }); - } - } - /* 判断后端配置是否没有加载成功 */ - if (!me.getOpt('imageActionName')) { - showErrorLoader(me.getLang('autoupload.errorLoadConfig')); - return; - } - // 判断文件格式是否错误 - var filename = input.value, - fileext = filename ? filename.substr(filename.lastIndexOf('.')) : ''; - if (!fileext || (allowFiles && (allowFiles.join('') + '.').indexOf(fileext.toLowerCase() + '.') == -1)) { - showErrorLoader(me.getLang('simpleupload.exceedTypeError')); - return; - } - - var xhr = new XMLHttpRequest() - xhr.open('post', action, true) - if (me.options.headers && Object.prototype.toString.apply(me.options.headers) === "[object Object]") { - for (var key in me.options.headers) { - xhr.setRequestHeader(key, me.options.headers[key]) - } - } - xhr.onload = function() { - if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) { - var res = JSON.parse(xhr.responseText) - var link = me.options.imageUrlPrefix + res.url; - - if (res.state == 'SUCCESS' && res.url) { - loader = me.document.getElementById(loadingId); - loader.setAttribute('src', link); - loader.setAttribute('_src', link); - loader.setAttribute('title', res.title || ''); - loader.setAttribute('alt', res.original || ''); - loader.removeAttribute('id'); - domUtils.removeClasses(loader, 'loadingclass'); - me.fireEvent("contentchange"); - } else { - showErrorLoader(res.state); - } - } else { - showErrorLoader(me.getLang('simpleupload.loadError')); - } - }; - xhr.onerror = function() { - showErrorLoader(me.getLang('simpleupload.loadError')); - }; - xhr.send(new FormData(form)); - form.reset(); - }) - } - - return { - bindEvents: { - 'ready': function() { - //设置loading的样式 - utils.cssRule('loading', - '.loadingclass{display:inline-block;cursor:default;background: url(\'' + - this.options.themePath + - this.options.theme + '/images/loading.gif\') no-repeat center center transparent;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;}\n' + - '.loaderrorclass{display:inline-block;cursor:default;background: url(\'' + - this.options.themePath + - this.options.theme + '/images/loaderror.png\') no-repeat center center transparent;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;' + - '}', - this.document); - }, - /* 初始化简单上传按钮 */ - 'simpleuploadbtnready': function(type, container) { - containerBtn = container; - me.afterConfigReady(initUploadBtn); - } - }, - outputRule: function(root) { - utils.each(root.getNodesByTagName('img'), function(n) { - if (/\b(loaderrorclass)|(bloaderrorclass)\b/.test(n.getAttr('class'))) { - n.parentNode.removeChild(n); - } - }); - } - } -}); - -// plugins/serverparam.js -/** - * 服务器提交的额外参数列表设置插件 - * @file - * @since 1.2.6.1 - */ -UE.plugin.register('serverparam', function (){ - - var me = this, - serverParam = PostBase; - - return { - commands:{ - /** - * 修改服务器提交的额外参数列表,清除所有项 - * @command serverparam - * @method execCommand - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.execCommand('serverparam'); - * editor.queryCommandValue('serverparam'); //返回空 - * ``` - */ - /** - * 修改服务器提交的额外参数列表,删除指定项 - * @command serverparam - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } key 要清除的属性 - * @example - * ```javascript - * editor.execCommand('serverparam', 'name'); //删除属性name - * ``` - */ - /** - * 修改服务器提交的额外参数列表,使用键值添加项 - * @command serverparam - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { String } key 要添加的属性 - * @param { String } value 要添加属性的值 - * @example - * ```javascript - * editor.execCommand('serverparam', 'name', 'hello'); - * editor.queryCommandValue('serverparam'); //返回对象 {'name': 'hello'} - * ``` - */ - /** - * 修改服务器提交的额外参数列表,传入键值对对象添加多项 - * @command serverparam - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { Object } key 传入的键值对对象 - * @example - * ```javascript - * editor.execCommand('serverparam', {'name': 'hello'}); - * editor.queryCommandValue('serverparam'); //返回对象 {'name': 'hello'} - * ``` - */ - /** - * 修改服务器提交的额外参数列表,使用自定义函数添加多项 - * @command serverparam - * @method execCommand - * @param { String } cmd 命令字符串 - * @param { Function } key 自定义获取参数的函数 - * @example - * ```javascript - * editor.execCommand('serverparam', function(editor){ - * return {'key': 'value'}; - * }); - * editor.queryCommandValue('serverparam'); //返回对象 {'key': 'value'} - * ``` - */ - - /** - * 获取服务器提交的额外参数列表 - * @command serverparam - * @method queryCommandValue - * @param { String } cmd 命令字符串 - * @example - * ```javascript - * editor.queryCommandValue( 'serverparam' ); //返回对象 {'key': 'value'} - * ``` - */ - 'serverparam':{ - execCommand:function (cmd, key, value) { - if (key === undefined || key === null) { //不传参数,清空列表 - serverParam = {}; - } else if (utils.isString(key)) { //传入键值 - if(value === undefined || value === null) { - delete serverParam[key]; - } else { - serverParam[key] = value; - } - } else if (utils.isObject(key)) { //传入对象,覆盖列表项 - utils.extend(serverParam, key, true); - } else if (utils.isFunction(key)){ //传入函数,添加列表项 - utils.extend(serverParam, key(), true); - } - }, - queryCommandValue: function(){ - return serverParam || {}; - } - } - } - } -}); - - -// plugins/insertfile.js -/** - * 插入附件 - */ -UE.plugin.register('insertfile', function (){ - - var me = this; - - function getFileIcon(url){ - var ext = url.substr(url.lastIndexOf('.') + 1).toLowerCase(), - maps = { - "rar":"icon_rar.gif", - "zip":"icon_rar.gif", - "tar":"icon_rar.gif", - "gz":"icon_rar.gif", - "bz2":"icon_rar.gif", - "doc":"icon_doc.gif", - "docx":"icon_doc.gif", - "pdf":"icon_pdf.gif", - "mp3":"icon_mp3.gif", - "xls":"icon_xls.gif", - "chm":"icon_chm.gif", - "ppt":"icon_ppt.gif", - "pptx":"icon_ppt.gif", - "avi":"icon_mv.gif", - "rmvb":"icon_mv.gif", - "wmv":"icon_mv.gif", - "flv":"icon_mv.gif", - "swf":"icon_mv.gif", - "rm":"icon_mv.gif", - "exe":"icon_exe.gif", - "psd":"icon_psd.gif", - "txt":"icon_txt.gif", - "jpg":"icon_jpg.gif", - "png":"icon_jpg.gif", - "jpeg":"icon_jpg.gif", - "gif":"icon_jpg.gif", - "ico":"icon_jpg.gif", - "bmp":"icon_jpg.gif" - }; - return maps[ext] ? maps[ext]:maps['txt']; - } - - return { - commands:{ - 'insertfile': { - execCommand: function (command, filelist){ - filelist = utils.isArray(filelist) ? filelist : [filelist]; - - var i, item, icon, title, - html = '', - URL = me.getOpt('UEDITOR_HOME_URL'), - iconDir = URL + (URL.substr(URL.length - 1) == '/' ? '':'/') + 'dialogs/attachment/fileTypeImages/'; - for (i = 0; i < filelist.length; i++) { - item = filelist[i]; - icon = iconDir + getFileIcon(item.url); - title = item.title || item.url.substr(item.url.lastIndexOf('/') + 1); - html += '

    ' + - '' + - '' + title + '' + - '

    '; - } - me.execCommand('insertHtml', html); - } - } - } - } -}); - - - - -// plugins/xssFilter.js -/** - * @file xssFilter.js - * @desc xss过滤器 - * @author robbenmu - */ - -UE.plugins.xssFilter = function() { - - var config = UEDITOR_CONFIG; - var whitList = config.whitList; - - function filter(node) { - - var tagName = node.tagName; - var attrs = node.attrs; - - if (!whitList.hasOwnProperty(tagName)) { - node.parentNode.removeChild(node); - return false; - } - - UE.utils.each(attrs, function (val, key) { - - if (whitList[tagName].indexOf(key) === -1) { - node.setAttr(key); - } - }); - } - - // 添加inserthtml\paste等操作用的过滤规则 - if (whitList && config.xssFilterRules) { - this.options.filterRules = function () { - - var result = {}; - - UE.utils.each(whitList, function(val, key) { - result[key] = function (node) { - return filter(node); - }; - }); - - return result; - }(); - } - - var tagList = []; - - UE.utils.each(whitList, function (val, key) { - tagList.push(key); - }); - - // 添加input过滤规则 - // - if (whitList && config.inputXssFilter) { - this.addInputRule(function (root) { - - root.traversal(function(node) { - if (node.type !== 'element') { - return false; - } - filter(node); - }); - }); - } - // 添加output过滤规则 - // - if (whitList && config.outputXssFilter) { - this.addOutputRule(function (root) { - - root.traversal(function(node) { - if (node.type !== 'element') { - return false; - } - filter(node); - }); - }); - } - -}; - - -// ui/ui.js -var baidu = baidu || {}; -baidu.editor = baidu.editor || {}; -UE.ui = baidu.editor.ui = {}; - -// ui/uiutils.js -(function (){ - var browser = baidu.editor.browser, - domUtils = baidu.editor.dom.domUtils; - - var magic = '$EDITORUI'; - var root = window[magic] = {}; - var uidMagic = 'ID' + magic; - var uidCount = 0; - - var uiUtils = baidu.editor.ui.uiUtils = { - uid: function (obj){ - return (obj ? obj[uidMagic] || (obj[uidMagic] = ++ uidCount) : ++ uidCount); - }, - hook: function ( fn, callback ) { - var dg; - if (fn && fn._callbacks) { - dg = fn; - } else { - dg = function (){ - var q; - if (fn) { - q = fn.apply(this, arguments); - } - var callbacks = dg._callbacks; - var k = callbacks.length; - while (k --) { - var r = callbacks[k].apply(this, arguments); - if (q === undefined) { - q = r; - } - } - return q; - }; - dg._callbacks = []; - } - dg._callbacks.push(callback); - return dg; - }, - createElementByHtml: function (html){ - var el = document.createElement('div'); - el.innerHTML = html; - el = el.firstChild; - el.parentNode.removeChild(el); - return el; - }, - getViewportElement: function (){ - return (browser.ie && browser.quirks) ? - document.body : document.documentElement; - }, - getClientRect: function (element){ - var bcr; - //trace IE6下在控制编辑器显隐时可能会报错,catch一下 - try{ - bcr = element.getBoundingClientRect(); - }catch(e){ - bcr={left:0,top:0,height:0,width:0} - } - var rect = { - left: Math.round(bcr.left), - top: Math.round(bcr.top), - height: Math.round(bcr.bottom - bcr.top), - width: Math.round(bcr.right - bcr.left) - }; - var doc; - while ((doc = element.ownerDocument) !== document && - (element = domUtils.getWindow(doc).frameElement)) { - bcr = element.getBoundingClientRect(); - rect.left += bcr.left; - rect.top += bcr.top; - } - rect.bottom = rect.top + rect.height; - rect.right = rect.left + rect.width; - return rect; - }, - getViewportRect: function (){ - var viewportEl = uiUtils.getViewportElement(); - var width = (window.innerWidth || viewportEl.clientWidth) | 0; - var height = (window.innerHeight ||viewportEl.clientHeight) | 0; - return { - left: 0, - top: 0, - height: height, - width: width, - bottom: height, - right: width - }; - }, - setViewportOffset: function (element, offset){ - var rect; - var fixedLayer = uiUtils.getFixedLayer(); - if (element.parentNode === fixedLayer) { - element.style.left = offset.left + 'px'; - element.style.top = offset.top + 'px'; - } else { - domUtils.setViewportOffset(element, offset); - } - }, - getEventOffset: function (evt){ - var el = evt.target || evt.srcElement; - var rect = uiUtils.getClientRect(el); - var offset = uiUtils.getViewportOffsetByEvent(evt); - return { - left: offset.left - rect.left, - top: offset.top - rect.top - }; - }, - getViewportOffsetByEvent: function (evt){ - var el = evt.target || evt.srcElement; - var frameEl = domUtils.getWindow(el).frameElement; - var offset = { - left: evt.clientX, - top: evt.clientY - }; - if (frameEl && el.ownerDocument !== document) { - var rect = uiUtils.getClientRect(frameEl); - offset.left += rect.left; - offset.top += rect.top; - } - return offset; - }, - setGlobal: function (id, obj){ - root[id] = obj; - return magic + '["' + id + '"]'; - }, - unsetGlobal: function (id){ - delete root[id]; - }, - copyAttributes: function (tgt, src){ - var attributes = src.attributes; - var k = attributes.length; - while (k --) { - var attrNode = attributes[k]; - if ( attrNode.nodeName != 'style' && attrNode.nodeName != 'class' && (!browser.ie || attrNode.specified) ) { - tgt.setAttribute(attrNode.nodeName, attrNode.nodeValue); - } - } - if (src.className) { - domUtils.addClass(tgt,src.className); - } - if (src.style.cssText) { - tgt.style.cssText += ';' + src.style.cssText; - } - }, - removeStyle: function (el, styleName){ - if (el.style.removeProperty) { - el.style.removeProperty(styleName); - } else if (el.style.removeAttribute) { - el.style.removeAttribute(styleName); - } else throw ''; - }, - contains: function (elA, elB){ - return elA && elB && (elA === elB ? false : ( - elA.contains ? elA.contains(elB) : - elA.compareDocumentPosition(elB) & 16 - )); - }, - startDrag: function (evt, callbacks,doc){ - var doc = doc || document; - var startX = evt.clientX; - var startY = evt.clientY; - function handleMouseMove(evt){ - var x = evt.clientX - startX; - var y = evt.clientY - startY; - callbacks.ondragmove(x, y,evt); - if (evt.stopPropagation) { - evt.stopPropagation(); - } else { - evt.cancelBubble = true; - } - } - if (doc.addEventListener) { - function handleMouseUp(evt){ - doc.removeEventListener('mousemove', handleMouseMove, true); - doc.removeEventListener('mouseup', handleMouseUp, true); - window.removeEventListener('mouseup', handleMouseUp, true); - callbacks.ondragstop(); - } - doc.addEventListener('mousemove', handleMouseMove, true); - doc.addEventListener('mouseup', handleMouseUp, true); - window.addEventListener('mouseup', handleMouseUp, true); - - evt.preventDefault(); - } else { - var elm = evt.srcElement; - elm.setCapture(); - function releaseCaptrue(){ - elm.releaseCapture(); - elm.detachEvent('onmousemove', handleMouseMove); - elm.detachEvent('onmouseup', releaseCaptrue); - elm.detachEvent('onlosecaptrue', releaseCaptrue); - callbacks.ondragstop(); - } - elm.attachEvent('onmousemove', handleMouseMove); - elm.attachEvent('onmouseup', releaseCaptrue); - elm.attachEvent('onlosecaptrue', releaseCaptrue); - evt.returnValue = false; - } - callbacks.ondragstart(); - }, - getFixedLayer: function (){ - var layer = document.getElementById('edui_fixedlayer'); - if (layer == null) { - layer = document.createElement('div'); - layer.id = 'edui_fixedlayer'; - document.body.appendChild(layer); - if (browser.ie && browser.version <= 8) { - layer.style.position = 'absolute'; - bindFixedLayer(); - setTimeout(updateFixedOffset); - } else { - layer.style.position = 'fixed'; - } - layer.style.left = '0'; - layer.style.top = '0'; - layer.style.width = '0'; - layer.style.height = '0'; - } - return layer; - }, - makeUnselectable: function (element){ - if (browser.opera || (browser.ie && browser.version < 9)) { - element.unselectable = 'on'; - if (element.hasChildNodes()) { - for (var i=0; i
    '; - } - }; - utils.inherits(Separator, UIBase); - -})(); - - -// ui/mask.js -///import core -///import uicore -(function (){ - var utils = baidu.editor.utils, - domUtils = baidu.editor.dom.domUtils, - UIBase = baidu.editor.ui.UIBase, - uiUtils = baidu.editor.ui.uiUtils; - - var Mask = baidu.editor.ui.Mask = function (options){ - this.initOptions(options); - this.initUIBase(); - }; - Mask.prototype = { - getHtmlTpl: function (){ - return '
    '; - }, - postRender: function (){ - var me = this; - domUtils.on(window, 'resize', function (){ - setTimeout(function (){ - if (!me.isHidden()) { - me._fill(); - } - }); - }); - }, - show: function (zIndex){ - this._fill(); - this.getDom().style.display = ''; - this.getDom().style.zIndex = zIndex; - }, - hide: function (){ - this.getDom().style.display = 'none'; - this.getDom().style.zIndex = ''; - }, - isHidden: function (){ - return this.getDom().style.display == 'none'; - }, - _onMouseDown: function (){ - return false; - }, - _onClick: function (e, target){ - this.fireEvent('click', e, target); - }, - _fill: function (){ - var el = this.getDom(); - var vpRect = uiUtils.getViewportRect(); - el.style.width = vpRect.width + 'px'; - el.style.height = vpRect.height + 'px'; - } - }; - utils.inherits(Mask, UIBase); -})(); - - -// ui/popup.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - domUtils = baidu.editor.dom.domUtils, - UIBase = baidu.editor.ui.UIBase, - Popup = baidu.editor.ui.Popup = function (options){ - this.initOptions(options); - this.initPopup(); - }; - - var allPopups = []; - function closeAllPopup( evt,el ){ - for ( var i = 0; i < allPopups.length; i++ ) { - var pop = allPopups[i]; - if (!pop.isHidden()) { - if (pop.queryAutoHide(el) !== false) { - if(evt&&/scroll/ig.test(evt.type)&&pop.className=="edui-wordpastepop") return; - pop.hide(); - } - } - } - - if(allPopups.length) - pop.editor.fireEvent("afterhidepop"); - } - - Popup.postHide = closeAllPopup; - - var ANCHOR_CLASSES = ['edui-anchor-topleft','edui-anchor-topright', - 'edui-anchor-bottomleft','edui-anchor-bottomright']; - Popup.prototype = { - SHADOW_RADIUS: 5, - content: null, - _hidden: false, - autoRender: true, - canSideLeft: true, - canSideUp: true, - initPopup: function (){ - this.initUIBase(); - allPopups.push( this ); - }, - getHtmlTpl: function (){ - return '
    ' + - '
    ' + - ' ' + - '
    ' + - '
    ' + - this.getContentHtmlTpl() + - '
    ' + - '
    ' + - '
    '; - }, - getContentHtmlTpl: function (){ - if(this.content){ - if (typeof this.content == 'string') { - return this.content; - } - return this.content.renderHtml(); - }else{ - return '' - } - - }, - _UIBase_postRender: UIBase.prototype.postRender, - postRender: function (){ - - - if (this.content instanceof UIBase) { - this.content.postRender(); - } - - //捕获鼠标滚轮 - if( this.captureWheel && !this.captured ) { - - this.captured = true; - - var winHeight = ( document.documentElement.clientHeight || document.body.clientHeight ) - 80, - _height = this.getDom().offsetHeight, - _top = uiUtils.getClientRect( this.combox.getDom() ).top, - content = this.getDom('content'), - ifr = this.getDom('body').getElementsByTagName('iframe'), - me = this; - - ifr.length && ( ifr = ifr[0] ); - - while( _top + _height > winHeight ) { - _height -= 30; - } - content.style.height = _height + 'px'; - //同步更改iframe高度 - ifr && ( ifr.style.height = _height + 'px' ); - - //阻止在combox上的鼠标滚轮事件, 防止用户的正常操作被误解 - if( window.XMLHttpRequest ) { - - domUtils.on( content, ( 'onmousewheel' in document.body ) ? 'mousewheel' :'DOMMouseScroll' , function(e){ - - if(e.preventDefault) { - e.preventDefault(); - } else { - e.returnValue = false; - } - - if( e.wheelDelta ) { - - content.scrollTop -= ( e.wheelDelta / 120 )*60; - - } else { - - content.scrollTop -= ( e.detail / -3 )*60; - - } - - }); - - } else { - - //ie6 - domUtils.on( this.getDom(), 'mousewheel' , function(e){ - - e.returnValue = false; - - me.getDom('content').scrollTop -= ( e.wheelDelta / 120 )*60; - - }); - - } - - } - this.fireEvent('postRenderAfter'); - this.hide(true); - this._UIBase_postRender(); - }, - _doAutoRender: function (){ - if (!this.getDom() && this.autoRender) { - this.render(); - } - }, - mesureSize: function (){ - var box = this.getDom('content'); - return uiUtils.getClientRect(box); - }, - fitSize: function (){ - if( this.captureWheel && this.sized ) { - return this.__size; - } - this.sized = true; - var popBodyEl = this.getDom('body'); - popBodyEl.style.width = ''; - popBodyEl.style.height = ''; - var size = this.mesureSize(); - if( this.captureWheel ) { - popBodyEl.style.width = -(-20 -size.width) + 'px'; - var height = parseInt( this.getDom('content').style.height, 10 ); - !window.isNaN( height ) && ( size.height = height ); - } else { - popBodyEl.style.width = size.width + 'px'; - } - popBodyEl.style.height = size.height + 'px'; - this.__size = size; - this.captureWheel && (this.getDom('content').style.overflow = 'auto'); - return size; - }, - showAnchor: function ( element, hoz ){ - this.showAnchorRect( uiUtils.getClientRect( element ), hoz ); - }, - showAnchorRect: function ( rect, hoz, adj ){ - this._doAutoRender(); - var vpRect = uiUtils.getViewportRect(); - this.getDom().style.visibility = 'hidden'; - this._show(); - var popSize = this.fitSize(); - - var sideLeft, sideUp, left, top; - if (hoz) { - sideLeft = this.canSideLeft && (rect.right + popSize.width > vpRect.right && rect.left > popSize.width); - sideUp = this.canSideUp && (rect.top + popSize.height > vpRect.bottom && rect.bottom > popSize.height); - left = (sideLeft ? rect.left - popSize.width : rect.right); - top = (sideUp ? rect.bottom - popSize.height : rect.top); - } else { - sideLeft = this.canSideLeft && (rect.right + popSize.width > vpRect.right && rect.left > popSize.width); - sideUp = this.canSideUp && (rect.top + popSize.height > vpRect.bottom && rect.bottom > popSize.height); - left = (sideLeft ? rect.right - popSize.width : rect.left); - top = (sideUp ? rect.top - popSize.height : rect.bottom); - } - - var popEl = this.getDom(); - uiUtils.setViewportOffset(popEl, { - left: left, - top: top - }); - domUtils.removeClasses(popEl, ANCHOR_CLASSES); - popEl.className += ' ' + ANCHOR_CLASSES[(sideUp ? 1 : 0) * 2 + (sideLeft ? 1 : 0)]; - if(this.editor){ - popEl.style.zIndex = this.editor.container.style.zIndex * 1 + 10; - baidu.editor.ui.uiUtils.getFixedLayer().style.zIndex = popEl.style.zIndex - 1; - } - this.getDom().style.visibility = 'visible'; - - }, - showAt: function (offset) { - var left = offset.left; - var top = offset.top; - var rect = { - left: left, - top: top, - right: left, - bottom: top, - height: 0, - width: 0 - }; - this.showAnchorRect(rect, false, true); - }, - _show: function (){ - if (this._hidden) { - var box = this.getDom(); - box.style.display = ''; - this._hidden = false; -// if (box.setActive) { -// box.setActive(); -// } - this.fireEvent('show'); - } - }, - isHidden: function (){ - return this._hidden; - }, - show: function (){ - this._doAutoRender(); - this._show(); - }, - hide: function (notNofity){ - if (!this._hidden && this.getDom()) { - this.getDom().style.display = 'none'; - this._hidden = true; - if (!notNofity) { - this.fireEvent('hide'); - } - } - }, - queryAutoHide: function (el){ - return !el || !uiUtils.contains(this.getDom(), el); - } - }; - utils.inherits(Popup, UIBase); - - domUtils.on( document, 'mousedown', function ( evt ) { - var el = evt.target || evt.srcElement; - closeAllPopup( evt,el ); - } ); - domUtils.on( window, 'scroll', function (evt,el) { - closeAllPopup( evt,el ); - } ); - -})(); - - -// ui/colorpicker.js -///import core -///import uicore -(function (){ - var utils = baidu.editor.utils, - UIBase = baidu.editor.ui.UIBase, - ColorPicker = baidu.editor.ui.ColorPicker = function (options){ - this.initOptions(options); - this.noColorText = this.noColorText || this.editor.getLang("clearColor"); - this.initUIBase(); - }; - - ColorPicker.prototype = { - getHtmlTpl: function (){ - return genColorPicker(this.noColorText,this.editor); - }, - _onTableClick: function (evt){ - var tgt = evt.target || evt.srcElement; - var color = tgt.getAttribute('data-color'); - if (color) { - this.fireEvent('pickcolor', color); - } - }, - _onTableOver: function (evt){ - var tgt = evt.target || evt.srcElement; - var color = tgt.getAttribute('data-color'); - if (color) { - this.getDom('preview').style.backgroundColor = color; - } - }, - _onTableOut: function (){ - this.getDom('preview').style.backgroundColor = ''; - }, - _onPickNoColor: function (){ - this.fireEvent('picknocolor'); - } - }; - utils.inherits(ColorPicker, UIBase); - - var COLORS = ( - 'ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646,' + - 'f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada,' + - 'd8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5,' + - 'bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f,' + - 'a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09,' + - '7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806,' + - 'c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0,').split(','); - - function genColorPicker(noColorText,editor){ - var html = '
    ' + - '
    ' + - '
    ' + - '
    '+ noColorText +'
    ' + - '
    ' + - '' + - ''+ - ''; - for (var i=0; i':'')+''; - } - html += i<70 ? '':''; - } - html += '
    '+editor.getLang("themeColor")+'
    '+editor.getLang("standardColor")+'
    '; - return html; - } -})(); - - -// ui/tablepicker.js -///import core -///import uicore -(function (){ - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - UIBase = baidu.editor.ui.UIBase; - - var TablePicker = baidu.editor.ui.TablePicker = function (options){ - this.initOptions(options); - this.initTablePicker(); - }; - TablePicker.prototype = { - defaultNumRows: 10, - defaultNumCols: 10, - maxNumRows: 20, - maxNumCols: 20, - numRows: 10, - numCols: 10, - lengthOfCellSide: 22, - initTablePicker: function (){ - this.initUIBase(); - }, - getHtmlTpl: function (){ - var me = this; - return '
    ' + - '
    ' + - '
    ' + - '' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    '; - }, - _UIBase_render: UIBase.prototype.render, - render: function (holder){ - this._UIBase_render(holder); - this.getDom('label').innerHTML = '0'+this.editor.getLang("t_row")+' x 0'+this.editor.getLang("t_col"); - }, - _track: function (numCols, numRows){ - var style = this.getDom('overlay').style; - var sideLen = this.lengthOfCellSide; - style.width = numCols * sideLen + 'px'; - style.height = numRows * sideLen + 'px'; - var label = this.getDom('label'); - label.innerHTML = numCols +this.editor.getLang("t_col")+' x ' + numRows + this.editor.getLang("t_row"); - this.numCols = numCols; - this.numRows = numRows; - }, - _onMouseOver: function (evt, el){ - var rel = evt.relatedTarget || evt.fromElement; - if (!uiUtils.contains(el, rel) && el !== rel) { - this.getDom('label').innerHTML = '0'+this.editor.getLang("t_col")+' x 0'+this.editor.getLang("t_row"); - this.getDom('overlay').style.visibility = ''; - } - }, - _onMouseOut: function (evt, el){ - var rel = evt.relatedTarget || evt.toElement; - if (!uiUtils.contains(el, rel) && el !== rel) { - this.getDom('label').innerHTML = '0'+this.editor.getLang("t_col")+' x 0'+this.editor.getLang("t_row"); - this.getDom('overlay').style.visibility = 'hidden'; - } - }, - _onMouseMove: function (evt, el){ - var style = this.getDom('overlay').style; - var offset = uiUtils.getEventOffset(evt); - var sideLen = this.lengthOfCellSide; - var numCols = Math.ceil(offset.left / sideLen); - var numRows = Math.ceil(offset.top / sideLen); - this._track(numCols, numRows); - }, - _onClick: function (){ - this.fireEvent('picktable', this.numCols, this.numRows); - } - }; - utils.inherits(TablePicker, UIBase); -})(); - - -// ui/stateful.js -(function (){ - var browser = baidu.editor.browser, - domUtils = baidu.editor.dom.domUtils, - uiUtils = baidu.editor.ui.uiUtils; - - var TPL_STATEFUL = 'onmousedown="$$.Stateful_onMouseDown(event, this);"' + - ' onmouseup="$$.Stateful_onMouseUp(event, this);"' + - ( browser.ie ? ( - ' onmouseenter="$$.Stateful_onMouseEnter(event, this);"' + - ' onmouseleave="$$.Stateful_onMouseLeave(event, this);"' ) - : ( - ' onmouseover="$$.Stateful_onMouseOver(event, this);"' + - ' onmouseout="$$.Stateful_onMouseOut(event, this);"' )); - - baidu.editor.ui.Stateful = { - alwalysHoverable: false, - target:null,//目标元素和this指向dom不一样 - Stateful_init: function (){ - this._Stateful_dGetHtmlTpl = this.getHtmlTpl; - this.getHtmlTpl = this.Stateful_getHtmlTpl; - }, - Stateful_getHtmlTpl: function (){ - var tpl = this._Stateful_dGetHtmlTpl(); - // 使用function避免$转义 - return tpl.replace(/stateful/g, function (){ return TPL_STATEFUL; }); - }, - Stateful_onMouseEnter: function (evt, el){ - this.target=el; - if (!this.isDisabled() || this.alwalysHoverable) { - this.addState('hover'); - this.fireEvent('over'); - } - }, - Stateful_onMouseLeave: function (evt, el){ - if (!this.isDisabled() || this.alwalysHoverable) { - this.removeState('hover'); - this.removeState('active'); - this.fireEvent('out'); - } - }, - Stateful_onMouseOver: function (evt, el){ - var rel = evt.relatedTarget; - if (!uiUtils.contains(el, rel) && el !== rel) { - this.Stateful_onMouseEnter(evt, el); - } - }, - Stateful_onMouseOut: function (evt, el){ - var rel = evt.relatedTarget; - if (!uiUtils.contains(el, rel) && el !== rel) { - this.Stateful_onMouseLeave(evt, el); - } - }, - Stateful_onMouseDown: function (evt, el){ - if (!this.isDisabled()) { - this.addState('active'); - } - }, - Stateful_onMouseUp: function (evt, el){ - if (!this.isDisabled()) { - this.removeState('active'); - } - }, - Stateful_postRender: function (){ - if (this.disabled && !this.hasState('disabled')) { - this.addState('disabled'); - } - }, - hasState: function (state){ - return domUtils.hasClass(this.getStateDom(), 'edui-state-' + state); - }, - addState: function (state){ - if (!this.hasState(state)) { - this.getStateDom().className += ' edui-state-' + state; - } - }, - removeState: function (state){ - if (this.hasState(state)) { - domUtils.removeClasses(this.getStateDom(), ['edui-state-' + state]); - } - }, - getStateDom: function (){ - return this.getDom('state'); - }, - isChecked: function (){ - return this.hasState('checked'); - }, - setChecked: function (checked){ - if (!this.isDisabled() && checked) { - this.addState('checked'); - } else { - this.removeState('checked'); - } - }, - isDisabled: function (){ - return this.hasState('disabled'); - }, - setDisabled: function (disabled){ - if (disabled) { - this.removeState('hover'); - this.removeState('checked'); - this.removeState('active'); - this.addState('disabled'); - } else { - this.removeState('disabled'); - } - } - }; -})(); - - -// ui/button.js -///import core -///import uicore -///import ui/stateful.js -(function (){ - var utils = baidu.editor.utils, - UIBase = baidu.editor.ui.UIBase, - Stateful = baidu.editor.ui.Stateful, - Button = baidu.editor.ui.Button = function (options){ - if(options.name){ - var btnName = options.name; - var cssRules = options.cssRules; - if(!options.className){ - options.className = 'edui-for-' + btnName; - } - options.cssRules = '.edui-default .edui-for-'+ btnName +' .edui-icon {'+ cssRules +'}' - } - this.initOptions(options); - this.initButton(); - }; - Button.prototype = { - uiName: 'button', - label: '', - title: '', - showIcon: true, - showText: true, - cssRules:'', - initButton: function (){ - this.initUIBase(); - this.Stateful_init(); - if(this.cssRules){ - utils.cssRule('edui-customize-'+this.name+'-style',this.cssRules); - } - }, - getHtmlTpl: function (){ - return '
    ' + - '
    ' + - '
    ' + - (this.showIcon ? '
    ' : '') + - (this.showText ? '
    ' + this.label + '
    ' : '') + - '
    ' + - '
    ' + - '
    '; - }, - postRender: function (){ - this.Stateful_postRender(); - this.setDisabled(this.disabled) - }, - _onMouseDown: function (e){ - var target = e.target || e.srcElement, - tagName = target && target.tagName && target.tagName.toLowerCase(); - if (tagName == 'input' || tagName == 'object' || tagName == 'object') { - return false; - } - }, - _onClick: function (){ - if (!this.isDisabled()) { - this.fireEvent('click'); - } - }, - setTitle: function(text){ - var label = this.getDom('label'); - label.innerHTML = text; - } - }; - utils.inherits(Button, UIBase); - utils.extend(Button.prototype, Stateful); - -})(); - - -// ui/splitbutton.js -///import core -///import uicore -///import ui/stateful.js -(function (){ - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - domUtils = baidu.editor.dom.domUtils, - UIBase = baidu.editor.ui.UIBase, - Stateful = baidu.editor.ui.Stateful, - SplitButton = baidu.editor.ui.SplitButton = function (options){ - this.initOptions(options); - this.initSplitButton(); - }; - SplitButton.prototype = { - popup: null, - uiName: 'splitbutton', - title: '', - initSplitButton: function (){ - this.initUIBase(); - this.Stateful_init(); - var me = this; - if (this.popup != null) { - var popup = this.popup; - this.popup = null; - this.setPopup(popup); - } - }, - _UIBase_postRender: UIBase.prototype.postRender, - postRender: function (){ - this.Stateful_postRender(); - this._UIBase_postRender(); - }, - setPopup: function (popup){ - if (this.popup === popup) return; - if (this.popup != null) { - this.popup.dispose(); - } - popup.addListener('show', utils.bind(this._onPopupShow, this)); - popup.addListener('hide', utils.bind(this._onPopupHide, this)); - popup.addListener('postrender', utils.bind(function (){ - popup.getDom('body').appendChild( - uiUtils.createElementByHtml('
    ') - ); - popup.getDom().className += ' ' + this.className; - }, this)); - this.popup = popup; - }, - _onPopupShow: function (){ - this.addState('opened'); - }, - _onPopupHide: function (){ - this.removeState('opened'); - }, - getHtmlTpl: function (){ - return '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    '; - }, - showPopup: function (){ - // 当popup往上弹出的时候,做特殊处理 - var rect = uiUtils.getClientRect(this.getDom()); - rect.top -= this.popup.SHADOW_RADIUS; - rect.height += this.popup.SHADOW_RADIUS; - this.popup.showAnchorRect(rect); - }, - _onArrowClick: function (event, el){ - if (!this.isDisabled()) { - this.showPopup(); - } - }, - _onButtonClick: function (){ - if (!this.isDisabled()) { - this.fireEvent('buttonclick'); - } - } - }; - utils.inherits(SplitButton, UIBase); - utils.extend(SplitButton.prototype, Stateful, true); - -})(); - - -// ui/colorbutton.js -///import core -///import uicore -///import ui/colorpicker.js -///import ui/popup.js -///import ui/splitbutton.js -(function (){ - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - ColorPicker = baidu.editor.ui.ColorPicker, - Popup = baidu.editor.ui.Popup, - SplitButton = baidu.editor.ui.SplitButton, - ColorButton = baidu.editor.ui.ColorButton = function (options){ - this.initOptions(options); - this.initColorButton(); - }; - ColorButton.prototype = { - initColorButton: function (){ - var me = this; - this.popup = new Popup({ - content: new ColorPicker({ - noColorText: me.editor.getLang("clearColor"), - editor:me.editor, - onpickcolor: function (t, color){ - me._onPickColor(color); - }, - onpicknocolor: function (t, color){ - me._onPickNoColor(color); - } - }), - editor:me.editor - }); - this.initSplitButton(); - }, - _SplitButton_postRender: SplitButton.prototype.postRender, - postRender: function (){ - this._SplitButton_postRender(); - this.getDom('button_body').appendChild( - uiUtils.createElementByHtml('
    ') - ); - this.getDom().className += ' edui-colorbutton'; - }, - setColor: function (color){ - this.getDom('colorlump').style.backgroundColor = color; - this.color = color; - }, - _onPickColor: function (color){ - if (this.fireEvent('pickcolor', color) !== false) { - this.setColor(color); - this.popup.hide(); - } - }, - _onPickNoColor: function (color){ - if (this.fireEvent('picknocolor') !== false) { - this.popup.hide(); - } - } - }; - utils.inherits(ColorButton, SplitButton); - -})(); - - -// ui/tablebutton.js -///import core -///import uicore -///import ui/popup.js -///import ui/tablepicker.js -///import ui/splitbutton.js -(function (){ - var utils = baidu.editor.utils, - Popup = baidu.editor.ui.Popup, - TablePicker = baidu.editor.ui.TablePicker, - SplitButton = baidu.editor.ui.SplitButton, - TableButton = baidu.editor.ui.TableButton = function (options){ - this.initOptions(options); - this.initTableButton(); - }; - TableButton.prototype = { - initTableButton: function (){ - var me = this; - this.popup = new Popup({ - content: new TablePicker({ - editor:me.editor, - onpicktable: function (t, numCols, numRows){ - me._onPickTable(numCols, numRows); - } - }), - 'editor':me.editor - }); - this.initSplitButton(); - }, - _onPickTable: function (numCols, numRows){ - if (this.fireEvent('picktable', numCols, numRows) !== false) { - this.popup.hide(); - } - } - }; - utils.inherits(TableButton, SplitButton); - -})(); - - -// ui/autotypesetpicker.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - UIBase = baidu.editor.ui.UIBase; - - var AutoTypeSetPicker = baidu.editor.ui.AutoTypeSetPicker = function (options) { - this.initOptions(options); - this.initAutoTypeSetPicker(); - }; - AutoTypeSetPicker.prototype = { - initAutoTypeSetPicker:function () { - this.initUIBase(); - }, - getHtmlTpl:function () { - var me = this.editor, - opt = me.options.autotypeset, - lang = me.getLang("autoTypeSet"); - - var textAlignInputName = 'textAlignValue' + me.uid, - imageBlockInputName = 'imageBlockLineValue' + me.uid, - symbolConverInputName = 'symbolConverValue' + me.uid; - - return '
    ' + - '
    ' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '
    ' + lang.mergeLine + '' + lang.delLine + '
    ' + lang.removeFormat + '' + lang.indent + '
    ' + lang.alignment + '' + - '' + me.getLang("justifyleft") + - '' + me.getLang("justifycenter") + - '' + me.getLang("justifyright") + - '
    ' + lang.imageFloat + '' + - '' + me.getLang("default") + - '' + me.getLang("justifyleft") + - '' + me.getLang("justifycenter") + - '' + me.getLang("justifyright") + - '
    ' + lang.removeFontsize + '' + lang.removeFontFamily + '
    ' + lang.removeHtml + '
    ' + lang.pasteFilter + '
    ' + lang.symbol + '' + - '' + lang.bdc2sb + - '' + lang.tobdc + '' + - '
    ' + - '
    ' + - '
    '; - - - }, - _UIBase_render:UIBase.prototype.render - }; - utils.inherits(AutoTypeSetPicker, UIBase); -})(); - - -// ui/autotypesetbutton.js -///import core -///import uicore -///import ui/popup.js -///import ui/autotypesetpicker.js -///import ui/splitbutton.js -(function (){ - var utils = baidu.editor.utils, - Popup = baidu.editor.ui.Popup, - AutoTypeSetPicker = baidu.editor.ui.AutoTypeSetPicker, - SplitButton = baidu.editor.ui.SplitButton, - AutoTypeSetButton = baidu.editor.ui.AutoTypeSetButton = function (options){ - this.initOptions(options); - this.initAutoTypeSetButton(); - }; - function getPara(me){ - - var opt = {}, - cont = me.getDom(), - editorId = me.editor.uid, - inputType = null, - attrName = null, - ipts = domUtils.getElementsByTagName(cont,"input"); - for(var i=ipts.length-1,ipt;ipt=ipts[i--];){ - inputType = ipt.getAttribute("type"); - if(inputType=="checkbox"){ - attrName = ipt.getAttribute("name"); - opt[attrName] && delete opt[attrName]; - if(ipt.checked){ - var attrValue = document.getElementById( attrName + "Value" + editorId ); - if(attrValue){ - if(/input/ig.test(attrValue.tagName)){ - opt[attrName] = attrValue.value; - } else { - var iptChilds = attrValue.getElementsByTagName("input"); - for(var j=iptChilds.length-1,iptchild;iptchild=iptChilds[j--];){ - if(iptchild.checked){ - opt[attrName] = iptchild.value; - break; - } - } - } - } else { - opt[attrName] = true; - } - } else { - opt[attrName] = false; - } - } else { - opt[ipt.getAttribute("value")] = ipt.checked; - } - - } - - var selects = domUtils.getElementsByTagName(cont,"select"); - for(var i=0,si;si=selects[i++];){ - var attr = si.getAttribute('name'); - opt[attr] = opt[attr] ? si.value : ''; - } - - utils.extend(me.editor.options.autotypeset,opt); - - me.editor.setPreferences('autotypeset', opt); - } - - AutoTypeSetButton.prototype = { - initAutoTypeSetButton: function (){ - - var me = this; - this.popup = new Popup({ - //传入配置参数 - content: new AutoTypeSetPicker({editor:me.editor}), - 'editor':me.editor, - hide : function(){ - if (!this._hidden && this.getDom()) { - getPara(this); - this.getDom().style.display = 'none'; - this._hidden = true; - this.fireEvent('hide'); - } - } - }); - var flag = 0; - this.popup.addListener('postRenderAfter',function(){ - var popupUI = this; - if(flag)return; - var cont = this.getDom(), - btn = cont.getElementsByTagName('button')[0]; - - btn.onclick = function(){ - getPara(popupUI); - me.editor.execCommand('autotypeset'); - popupUI.hide() - }; - - domUtils.on(cont, 'click', function(e) { - var target = e.target || e.srcElement, - editorId = me.editor.uid; - if (target && target.tagName == 'INPUT') { - - // 点击图片浮动的checkbox,去除对应的radio - if (target.name == 'imageBlockLine' || target.name == 'textAlign' || target.name == 'symbolConver') { - var checked = target.checked, - radioTd = document.getElementById( target.name + 'Value' + editorId), - radios = radioTd.getElementsByTagName('input'), - defalutSelect = { - 'imageBlockLine': 'none', - 'textAlign': 'left', - 'symbolConver': 'tobdc' - }; - - for (var i = 0; i < radios.length; i++) { - if (checked) { - if (radios[i].value == defalutSelect[target.name]) { - radios[i].checked = 'checked'; - } - } else { - radios[i].checked = false; - } - } - } - // 点击radio,选中对应的checkbox - if (target.name == ('imageBlockLineValue' + editorId) || target.name == ('textAlignValue' + editorId) || target.name == 'bdc') { - var checkboxs = target.parentNode.previousSibling.getElementsByTagName('input'); - checkboxs && (checkboxs[0].checked = true); - } - - getPara(popupUI); - } - }); - - flag = 1; - }); - this.initSplitButton(); - } - }; - utils.inherits(AutoTypeSetButton, SplitButton); - -})(); - - -// ui/cellalignpicker.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - Popup = baidu.editor.ui.Popup, - Stateful = baidu.editor.ui.Stateful, - UIBase = baidu.editor.ui.UIBase; - - /** - * 该参数将新增一个参数: selected, 参数类型为一个Object, 形如{ 'align': 'center', 'valign': 'top' }, 表示单元格的初始 - * 对齐状态为: 竖直居上,水平居中; 其中 align的取值为:'center', 'left', 'right'; valign的取值为: 'top', 'middle', 'bottom' - * @update 2013/4/2 hancong03@baidu.com - */ - var CellAlignPicker = baidu.editor.ui.CellAlignPicker = function (options) { - this.initOptions(options); - this.initSelected(); - this.initCellAlignPicker(); - }; - CellAlignPicker.prototype = { - //初始化选中状态, 该方法将根据传递进来的参数获取到应该选中的对齐方式图标的索引 - initSelected: function(){ - - var status = { - - valign: { - top: 0, - middle: 1, - bottom: 2 - }, - align: { - left: 0, - center: 1, - right: 2 - }, - count: 3 - - }, - result = -1; - - if( this.selected ) { - this.selectedIndex = status.valign[ this.selected.valign ] * status.count + status.align[ this.selected.align ]; - } - - }, - initCellAlignPicker:function () { - this.initUIBase(); - this.Stateful_init(); - }, - getHtmlTpl:function () { - - var alignType = [ 'left', 'center', 'right' ], - COUNT = 9, - tempClassName = null, - tempIndex = -1, - tmpl = []; - - - for( var i= 0; i'); - - tmpl.push( '
    ' ); - - tempIndex === 2 && tmpl.push(''); - - } - - return '
    ' + - '
    ' + - '' + - tmpl.join('') + - '
    ' + - '
    ' + - '
    '; - }, - getStateDom: function (){ - return this.target; - }, - _onClick: function (evt){ - var target= evt.target || evt.srcElement; - if(/icon/.test(target.className)){ - this.items[target.parentNode.getAttribute("index")].onclick(); - Popup.postHide(evt); - } - }, - _UIBase_render:UIBase.prototype.render - }; - utils.inherits(CellAlignPicker, UIBase); - utils.extend(CellAlignPicker.prototype, Stateful,true); -})(); - - - - - -// ui/pastepicker.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - Stateful = baidu.editor.ui.Stateful, - uiUtils = baidu.editor.ui.uiUtils, - UIBase = baidu.editor.ui.UIBase; - - var PastePicker = baidu.editor.ui.PastePicker = function (options) { - this.initOptions(options); - this.initPastePicker(); - }; - PastePicker.prototype = { - initPastePicker:function () { - this.initUIBase(); - this.Stateful_init(); - }, - getHtmlTpl:function () { - return '
    ' + - '
    ' + - '
    ' + this.editor.getLang("pasteOpt") + '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' - }, - getStateDom:function () { - return this.target; - }, - format:function (param) { - this.editor.ui._isTransfer = true; - this.editor.fireEvent('pasteTransfer', param); - }, - _onClick:function (cur) { - var node = domUtils.getNextDomNode(cur), - screenHt = uiUtils.getViewportRect().height, - subPop = uiUtils.getClientRect(node); - - if ((subPop.top + subPop.height) > screenHt) - node.style.top = (-subPop.height - cur.offsetHeight) + "px"; - else - node.style.top = ""; - - if (/hidden/ig.test(domUtils.getComputedStyle(node, "visibility"))) { - node.style.visibility = "visible"; - domUtils.addClass(cur, "edui-state-opened"); - } else { - node.style.visibility = "hidden"; - domUtils.removeClasses(cur, "edui-state-opened") - } - }, - _UIBase_render:UIBase.prototype.render - }; - utils.inherits(PastePicker, UIBase); - utils.extend(PastePicker.prototype, Stateful, true); -})(); - - - - - - -// ui/toolbar.js -(function (){ - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - UIBase = baidu.editor.ui.UIBase, - Toolbar = baidu.editor.ui.Toolbar = function (options){ - this.initOptions(options); - this.initToolbar(); - }; - Toolbar.prototype = { - items: null, - initToolbar: function (){ - this.items = this.items || []; - this.initUIBase(); - }, - add: function (item,index){ - if(index === undefined){ - this.items.push(item); - }else{ - this.items.splice(index,0,item) - } - - }, - getHtmlTpl: function (){ - var buff = []; - for (var i=0; i' + - buff.join('') + - '
    ' - }, - postRender: function (){ - var box = this.getDom(); - for (var i=0; i
    '; - }, - postRender:function () { - }, - queryAutoHide:function () { - return true; - } - }; - Menu.prototype = { - items:null, - uiName:'menu', - initMenu:function () { - this.items = this.items || []; - this.initPopup(); - this.initItems(); - }, - initItems:function () { - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - if (item == '-') { - this.items[i] = this.getSeparator(); - } else if (!(item instanceof MenuItem)) { - item.editor = this.editor; - item.theme = this.editor.options.theme; - this.items[i] = this.createItem(item); - } - } - }, - getSeparator:function () { - return menuSeparator; - }, - createItem:function (item) { - //新增一个参数menu, 该参数存储了menuItem所对应的menu引用 - item.menu = this; - return new MenuItem(item); - }, - _Popup_getContentHtmlTpl:Popup.prototype.getContentHtmlTpl, - getContentHtmlTpl:function () { - if (this.items.length == 0) { - return this._Popup_getContentHtmlTpl(); - } - var buff = []; - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - buff[i] = item.renderHtml(); - } - return ('
    ' + buff.join('') + '
    '); - }, - _Popup_postRender:Popup.prototype.postRender, - postRender:function () { - var me = this; - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - item.ownerMenu = this; - item.postRender(); - } - domUtils.on(this.getDom(), 'mouseover', function (evt) { - evt = evt || event; - var rel = evt.relatedTarget || evt.fromElement; - var el = me.getDom(); - if (!uiUtils.contains(el, rel) && el !== rel) { - me.fireEvent('over'); - } - }); - this._Popup_postRender(); - }, - queryAutoHide:function (el) { - if (el) { - if (uiUtils.contains(this.getDom(), el)) { - return false; - } - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - if (item.queryAutoHide(el) === false) { - return false; - } - } - } - }, - clearItems:function () { - for (var i = 0; i < this.items.length; i++) { - var item = this.items[i]; - clearTimeout(item._showingTimer); - clearTimeout(item._closingTimer); - if (item.subMenu) { - item.subMenu.destroy(); - } - } - this.items = []; - }, - destroy:function () { - if (this.getDom()) { - domUtils.remove(this.getDom()); - } - this.clearItems(); - }, - dispose:function () { - this.destroy(); - } - }; - utils.inherits(Menu, Popup); - - /** - * @update 2013/04/03 hancong03 新增一个参数menu, 该参数存储了menuItem所对应的menu引用 - * @type {Function} - */ - var MenuItem = baidu.editor.ui.MenuItem = function (options) { - this.initOptions(options); - this.initUIBase(); - this.Stateful_init(); - if (this.subMenu && !(this.subMenu instanceof Menu)) { - if (options.className && options.className.indexOf("aligntd") != -1) { - var me = this; - - //获取单元格对齐初始状态 - this.subMenu.selected = this.editor.queryCommandValue( 'cellalignment' ); - - this.subMenu = new Popup({ - content:new CellAlignPicker(this.subMenu), - parentMenu:me, - editor:me.editor, - destroy:function () { - if (this.getDom()) { - domUtils.remove(this.getDom()); - } - } - }); - this.subMenu.addListener("postRenderAfter", function () { - domUtils.on(this.getDom(), "mouseover", function () { - me.addState('opened'); - }); - }); - } else { - this.subMenu = new Menu(this.subMenu); - } - } - }; - MenuItem.prototype = { - label:'', - subMenu:null, - ownerMenu:null, - uiName:'menuitem', - alwalysHoverable:true, - getHtmlTpl:function () { - return '
    ' + - '
    ' + - this.renderLabelHtml() + - '
    ' + - '
    '; - }, - postRender:function () { - var me = this; - this.addListener('over', function () { - me.ownerMenu.fireEvent('submenuover', me); - if (me.subMenu) { - me.delayShowSubMenu(); - } - }); - if (this.subMenu) { - this.getDom().className += ' edui-hassubmenu'; - this.subMenu.render(); - this.addListener('out', function () { - me.delayHideSubMenu(); - }); - this.subMenu.addListener('over', function () { - clearTimeout(me._closingTimer); - me._closingTimer = null; - me.addState('opened'); - }); - this.ownerMenu.addListener('hide', function () { - me.hideSubMenu(); - }); - this.ownerMenu.addListener('submenuover', function (t, subMenu) { - if (subMenu !== me) { - me.delayHideSubMenu(); - } - }); - this.subMenu._bakQueryAutoHide = this.subMenu.queryAutoHide; - this.subMenu.queryAutoHide = function (el) { - if (el && uiUtils.contains(me.getDom(), el)) { - return false; - } - return this._bakQueryAutoHide(el); - }; - } - this.getDom().style.tabIndex = '-1'; - uiUtils.makeUnselectable(this.getDom()); - this.Stateful_postRender(); - }, - delayShowSubMenu:function () { - var me = this; - if (!me.isDisabled()) { - me.addState('opened'); - clearTimeout(me._showingTimer); - clearTimeout(me._closingTimer); - me._closingTimer = null; - me._showingTimer = setTimeout(function () { - me.showSubMenu(); - }, 250); - } - }, - delayHideSubMenu:function () { - var me = this; - if (!me.isDisabled()) { - me.removeState('opened'); - clearTimeout(me._showingTimer); - if (!me._closingTimer) { - me._closingTimer = setTimeout(function () { - if (!me.hasState('opened')) { - me.hideSubMenu(); - } - me._closingTimer = null; - }, 400); - } - } - }, - renderLabelHtml:function () { - return '
    ' + - '
    ' + - '
    ' + (this.label || '') + '
    '; - }, - getStateDom:function () { - return this.getDom(); - }, - queryAutoHide:function (el) { - if (this.subMenu && this.hasState('opened')) { - return this.subMenu.queryAutoHide(el); - } - }, - _onClick:function (event, this_) { - if (this.hasState('disabled')) return; - if (this.fireEvent('click', event, this_) !== false) { - if (this.subMenu) { - this.showSubMenu(); - } else { - Popup.postHide(event); - } - } - }, - showSubMenu:function () { - var rect = uiUtils.getClientRect(this.getDom()); - rect.right -= 5; - rect.left += 2; - rect.width -= 7; - rect.top -= 4; - rect.bottom += 4; - rect.height += 8; - this.subMenu.showAnchorRect(rect, true, true); - }, - hideSubMenu:function () { - this.subMenu.hide(); - } - }; - utils.inherits(MenuItem, UIBase); - utils.extend(MenuItem.prototype, Stateful, true); -})(); - - -// ui/combox.js -///import core -///import uicore -///import ui/menu.js -///import ui/splitbutton.js -(function (){ - // todo: menu和item提成通用list - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - Menu = baidu.editor.ui.Menu, - SplitButton = baidu.editor.ui.SplitButton, - Combox = baidu.editor.ui.Combox = function (options){ - this.initOptions(options); - this.initCombox(); - }; - Combox.prototype = { - uiName: 'combox', - onbuttonclick:function () { - this.showPopup(); - }, - initCombox: function (){ - var me = this; - this.items = this.items || []; - for (var i=0; i vpRect.right) { - left = vpRect.right - rect.width; - } - var top = offset.top; - if (top + rect.height > vpRect.bottom) { - top = vpRect.bottom - rect.height; - } - el.style.left = Math.max(left, 0) + 'px'; - el.style.top = Math.max(top, 0) + 'px'; - }, - showAtCenter: function (){ - - var vpRect = uiUtils.getViewportRect(); - - if ( !this.fullscreen ) { - this.getDom().style.display = ''; - var popSize = this.fitSize(); - var titleHeight = this.getDom('titlebar').offsetHeight | 0; - var left = vpRect.width / 2 - popSize.width / 2; - var top = vpRect.height / 2 - (popSize.height - titleHeight) / 2 - titleHeight; - var popEl = this.getDom(); - this.safeSetOffset({ - left: Math.max(left | 0, 0), - top: Math.max(top | 0, 0) - }); - if (!domUtils.hasClass(popEl, 'edui-state-centered')) { - popEl.className += ' edui-state-centered'; - } - } else { - var dialogWrapNode = this.getDom(), - contentNode = this.getDom('content'); - - dialogWrapNode.style.display = "block"; - - var wrapRect = UE.ui.uiUtils.getClientRect( dialogWrapNode ), - contentRect = UE.ui.uiUtils.getClientRect( contentNode ); - dialogWrapNode.style.left = "-100000px"; - - contentNode.style.width = ( vpRect.width - wrapRect.width + contentRect.width ) + "px"; - contentNode.style.height = ( vpRect.height - wrapRect.height + contentRect.height ) + "px"; - - dialogWrapNode.style.width = vpRect.width + "px"; - dialogWrapNode.style.height = vpRect.height + "px"; - dialogWrapNode.style.left = 0; - - //保存环境的overflow值 - this._originalContext = { - html: { - overflowX: document.documentElement.style.overflowX, - overflowY: document.documentElement.style.overflowY - }, - body: { - overflowX: document.body.style.overflowX, - overflowY: document.body.style.overflowY - } - }; - - document.documentElement.style.overflowX = 'hidden'; - document.documentElement.style.overflowY = 'hidden'; - document.body.style.overflowX = 'hidden'; - document.body.style.overflowY = 'hidden'; - - } - - this._show(); - }, - getContentHtml: function (){ - var contentHtml = ''; - if (typeof this.content == 'string') { - contentHtml = this.content; - } else if (this.iframeUrl) { - contentHtml = ''; - } - return contentHtml; - }, - getHtmlTpl: function (){ - var footHtml = ''; - - if (this.buttons) { - var buff = []; - for (var i=0; i' + buff.join('') + '
    ' + - '
    '; - } - - return '
    ' + - '
    ' + - '
    ' + - '
    ' + - '' + (this.title || '') + '' + - '
    ' + - this.closeButton.renderHtml() + - '
    ' + - '
    '+ ( this.autoReset ? '' : this.getContentHtml()) +'
    ' + - footHtml + - '
    '; - }, - postRender: function (){ - // todo: 保持居中/记住上次关闭位置选项 - if (!this.modalMask.getDom()) { - this.modalMask.render(); - this.modalMask.hide(); - } - if (!this.dragMask.getDom()) { - this.dragMask.render(); - this.dragMask.hide(); - } - var me = this; - this.addListener('show', function (){ - me.modalMask.show(this.getDom().style.zIndex - 2); - }); - this.addListener('hide', function (){ - me.modalMask.hide(); - }); - if (this.buttons) { - for (var i=0; i'; - me.editor.container.style.zIndex && (this.getDom().style.zIndex = me.editor.container.style.zIndex * 1 + 1); - } - } - // canSideUp:false, - // canSideLeft:false - }); - this.onbuttonclick = function(){ - this.showPopup(); - }; - this.initSplitButton(); - } - - }; - - utils.inherits(MultiMenuPop, SplitButton); -})(); - - -// ui/shortcutmenu.js -(function () { - var UI = baidu.editor.ui, - UIBase = UI.UIBase, - uiUtils = UI.uiUtils, - utils = baidu.editor.utils, - domUtils = baidu.editor.dom.domUtils; - - var allMenus = [],//存储所有快捷菜单 - timeID, - isSubMenuShow = false;//是否有子pop显示 - - var ShortCutMenu = UI.ShortCutMenu = function (options) { - this.initOptions (options); - this.initShortCutMenu (); - }; - - ShortCutMenu.postHide = hideAllMenu; - - ShortCutMenu.prototype = { - isHidden : true , - SPACE : 5 , - initShortCutMenu : function () { - this.items = this.items || []; - this.initUIBase (); - this.initItems (); - this.initEvent (); - allMenus.push (this); - } , - initEvent : function () { - var me = this, - doc = me.editor.document; - - domUtils.on (doc , "mousemove" , function (e) { - if (me.isHidden === false) { - //有pop显示就不隐藏快捷菜单 - if (me.getSubMenuMark () || me.eventType == "contextmenu") return; - - - var flag = true, - el = me.getDom (), - wt = el.offsetWidth, - ht = el.offsetHeight, - distanceX = wt / 2 + me.SPACE,//距离中心X标准 - distanceY = ht / 2,//距离中心Y标准 - x = Math.abs (e.screenX - me.left),//离中心距离横坐标 - y = Math.abs (e.screenY - me.top);//离中心距离纵坐标 - - clearTimeout (timeID); - timeID = setTimeout (function () { - if (y > 0 && y < distanceY) { - me.setOpacity (el , "1"); - } else if (y > distanceY && y < distanceY + 70) { - me.setOpacity (el , "0.5"); - flag = false; - } else if (y > distanceY + 70 && y < distanceY + 140) { - me.hide (); - } - - if (flag && x > 0 && x < distanceX) { - me.setOpacity (el , "1") - } else if (x > distanceX && x < distanceX + 70) { - me.setOpacity (el , "0.5") - } else if (x > distanceX + 70 && x < distanceX + 140) { - me.hide (); - } - }); - } - }); - - //ie\ff下 mouseout不准 - if (browser.chrome) { - domUtils.on (doc , "mouseout" , function (e) { - var relatedTgt = e.relatedTarget || e.toElement; - - if (relatedTgt == null || relatedTgt.tagName == "HTML") { - me.hide (); - } - }); - } - - me.editor.addListener ("afterhidepop" , function () { - if (!me.isHidden) { - isSubMenuShow = true; - } - }); - - } , - initItems : function () { - if (utils.isArray (this.items)) { - for (var i = 0, len = this.items.length ; i < len ; i++) { - var item = this.items[i].toLowerCase (); - - if (UI[item]) { - this.items[i] = new UI[item] (this.editor); - this.items[i].className += " edui-shortcutsubmenu "; - } - } - } - } , - setOpacity : function (el , value) { - if (browser.ie && browser.version < 9) { - el.style.filter = "alpha(opacity = " + parseFloat (value) * 100 + ");" - } else { - el.style.opacity = value; - } - } , - getSubMenuMark : function () { - isSubMenuShow = false; - var layerEle = uiUtils.getFixedLayer (); - var list = domUtils.getElementsByTagName (layerEle , "div" , function (node) { - return domUtils.hasClass (node , "edui-shortcutsubmenu edui-popup") - }); - - for (var i = 0, node ; node = list[i++] ;) { - if (node.style.display != "none") { - isSubMenuShow = true; - } - } - return isSubMenuShow; - } , - show : function (e , hasContextmenu) { - var me = this, - offset = {}, - el = this.getDom (), - fixedlayer = uiUtils.getFixedLayer (); - - function setPos (offset) { - if (offset.left < 0) { - offset.left = 0; - } - if (offset.top < 0) { - offset.top = 0; - } - el.style.cssText = "position:absolute;left:" + offset.left + "px;top:" + offset.top + "px;"; - } - - function setPosByCxtMenu (menu) { - if (!menu.tagName) { - menu = menu.getDom (); - } - offset.left = parseInt (menu.style.left); - offset.top = parseInt (menu.style.top); - offset.top -= el.offsetHeight + 15; - setPos (offset); - } - - - me.eventType = e.type; - el.style.cssText = "display:block;left:-9999px"; - - if (e.type == "contextmenu" && hasContextmenu) { - var menu = domUtils.getElementsByTagName (fixedlayer , "div" , "edui-contextmenu")[0]; - if (menu) { - setPosByCxtMenu (menu) - } else { - me.editor.addListener ("aftershowcontextmenu" , function (type , menu) { - setPosByCxtMenu (menu); - }); - } - } else { - offset = uiUtils.getViewportOffsetByEvent (e); - offset.top -= el.offsetHeight + me.SPACE; - offset.left += me.SPACE + 20; - setPos (offset); - me.setOpacity (el , 0.2); - } - - - me.isHidden = false; - me.left = e.screenX + el.offsetWidth / 2 - me.SPACE; - me.top = e.screenY - (el.offsetHeight / 2) - me.SPACE; - - if (me.editor) { - el.style.zIndex = me.editor.container.style.zIndex * 1 + 10; - fixedlayer.style.zIndex = el.style.zIndex - 1; - } - } , - hide : function () { - if (this.getDom ()) { - this.getDom ().style.display = "none"; - } - this.isHidden = true; - } , - postRender : function () { - if (utils.isArray (this.items)) { - for (var i = 0, item ; item = this.items[i++] ;) { - item.postRender (); - } - } - } , - getHtmlTpl : function () { - var buff; - if (utils.isArray (this.items)) { - buff = []; - for (var i = 0 ; i < this.items.length ; i++) { - buff[i] = this.items[i].renderHtml (); - } - buff = buff.join (""); - } else { - buff = this.items; - } - - return '
    ' + - buff + - '
    '; - } - }; - - utils.inherits (ShortCutMenu , UIBase); - - function hideAllMenu (e) { - var tgt = e.target || e.srcElement, - cur = domUtils.findParent (tgt , function (node) { - return domUtils.hasClass (node , "edui-shortcutmenu") || domUtils.hasClass (node , "edui-popup"); - } , true); - - if (!cur) { - for (var i = 0, menu ; menu = allMenus[i++] ;) { - menu.hide () - } - } - } - - domUtils.on (document , 'mousedown' , function (e) { - hideAllMenu (e); - }); - - domUtils.on (window , 'scroll' , function (e) { - hideAllMenu (e); - }); - -}) (); - - -// ui/breakline.js -(function (){ - var utils = baidu.editor.utils, - UIBase = baidu.editor.ui.UIBase, - Breakline = baidu.editor.ui.Breakline = function (options){ - this.initOptions(options); - this.initSeparator(); - }; - Breakline.prototype = { - uiName: 'Breakline', - initSeparator: function (){ - this.initUIBase(); - }, - getHtmlTpl: function (){ - return '
    '; - } - }; - utils.inherits(Breakline, UIBase); - -})(); - - -// ui/message.js -///import core -///import uicore -(function () { - var utils = baidu.editor.utils, - domUtils = baidu.editor.dom.domUtils, - UIBase = baidu.editor.ui.UIBase, - Message = baidu.editor.ui.Message = function (options){ - this.initOptions(options); - this.initMessage(); - }; - - Message.prototype = { - initMessage: function (){ - this.initUIBase(); - }, - getHtmlTpl: function (){ - return '
    ' + - '
    ×
    ' + - '
    ' + - ' ' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - '
    '; - }, - reset: function(opt){ - var me = this; - if (!opt.keepshow) { - clearTimeout(this.timer); - me.timer = setTimeout(function(){ - me.hide(); - }, opt.timeout || 4000); - } - - opt.content !== undefined && me.setContent(opt.content); - opt.type !== undefined && me.setType(opt.type); - - me.show(); - }, - postRender: function(){ - var me = this, - closer = this.getDom('closer'); - closer && domUtils.on(closer, 'click', function(){ - me.hide(); - }); - }, - setContent: function(content){ - this.getDom('content').innerHTML = content; - }, - setType: function(type){ - type = type || 'info'; - var body = this.getDom('body'); - body.className = body.className.replace(/edui-message-type-[\w-]+/, 'edui-message-type-' + type); - }, - getContent: function(){ - return this.getDom('content').innerHTML; - }, - getType: function(){ - var arr = this.getDom('body').match(/edui-message-type-([\w-]+)/); - return arr ? arr[1]:''; - }, - show: function (){ - this.getDom().style.display = 'block'; - }, - hide: function (){ - var dom = this.getDom(); - if (dom) { - dom.style.display = 'none'; - dom.parentNode && dom.parentNode.removeChild(dom); - } - } - }; - - utils.inherits(Message, UIBase); - -})(); - - -// adapter/editorui.js -//ui跟编辑器的适配層 -//那个按钮弹出是dialog,是下拉筐等都是在这个js中配置 -//自己写的ui也要在这里配置,放到baidu.editor.ui下边,当编辑器实例化的时候会根据ueditor.config中的toolbars找到相应的进行实例化 -(function () { - var utils = baidu.editor.utils; - var editorui = baidu.editor.ui; - var _Dialog = editorui.Dialog; - editorui.buttons = {}; - - editorui.Dialog = function (options) { - var dialog = new _Dialog(options); - dialog.addListener('hide', function () { - - if (dialog.editor) { - var editor = dialog.editor; - try { - if (browser.gecko) { - var y = editor.window.scrollY, - x = editor.window.scrollX; - editor.body.focus(); - editor.window.scrollTo(x, y); - } else { - editor.focus(); - } - - - } catch (ex) { - } - } - }); - return dialog; - }; - - var iframeUrlMap = { - 'anchor':'~/dialogs/anchor/anchor.html', - 'insertimage':'~/dialogs/image/image.html', - 'link':'~/dialogs/link/link.html', - 'spechars':'~/dialogs/spechars/spechars.html', - 'searchreplace':'~/dialogs/searchreplace/searchreplace.html', - 'map':'~/dialogs/map/map.html', - 'gmap':'~/dialogs/gmap/gmap.html', - 'insertvideo':'~/dialogs/video/video.html', - 'help':'~/dialogs/help/help.html', - 'preview':'~/dialogs/preview/preview.html', - 'emotion':'~/dialogs/emotion/emotion.html', - 'wordimage':'~/dialogs/wordimage/wordimage.html', - 'attachment':'~/dialogs/attachment/attachment.html', - 'insertframe':'~/dialogs/insertframe/insertframe.html', - 'edittip':'~/dialogs/table/edittip.html', - 'edittable':'~/dialogs/table/edittable.html', - 'edittd':'~/dialogs/table/edittd.html', - 'webapp':'~/dialogs/webapp/webapp.html', - 'snapscreen':'~/dialogs/snapscreen/snapscreen.html', - 'scrawl':'~/dialogs/scrawl/scrawl.html', - 'music':'~/dialogs/music/music.html', - 'template':'~/dialogs/template/template.html', - 'background':'~/dialogs/background/background.html', - 'charts': '~/dialogs/charts/charts.html' - }; - //为工具栏添加按钮,以下都是统一的按钮触发命令,所以写在一起 - var btnCmds = ['undo', 'redo', 'formatmatch', - 'bold', 'italic', 'underline', 'fontborder', 'touppercase', 'tolowercase', - 'strikethrough', 'subscript', 'superscript', 'source', 'indent', 'outdent', - 'blockquote', 'pasteplain', 'pagebreak', - 'selectall', 'print','horizontal', 'removeformat', 'time', 'date', 'unlink', - 'insertparagraphbeforetable', 'insertrow', 'insertcol', 'mergeright', 'mergedown', 'deleterow', - 'deletecol', 'splittorows', 'splittocols', 'splittocells', 'mergecells', 'deletetable', 'drafts']; - - for (var i = 0, ci; ci = btnCmds[i++];) { - ci = ci.toLowerCase(); - editorui[ci] = function (cmd) { - return function (editor) { - var ui = new editorui.Button({ - className:'edui-for-' + cmd, - title:editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd) || '', - onclick:function () { - editor.execCommand(cmd); - }, - theme:editor.options.theme, - showText:false - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - var state = editor.queryCommandState(cmd); - if (state == -1) { - ui.setDisabled(true); - ui.setChecked(false); - } else { - if (!uiReady) { - ui.setDisabled(false); - ui.setChecked(state); - } - } - }); - return ui; - }; - }(ci); - } - - //清除文档 - editorui.cleardoc = function (editor) { - var ui = new editorui.Button({ - className:'edui-for-cleardoc', - title:editor.options.labelMap.cleardoc || editor.getLang("labelMap.cleardoc") || '', - theme:editor.options.theme, - onclick:function () { - if (confirm(editor.getLang("confirmClear"))) { - editor.execCommand('cleardoc'); - } - } - }); - editorui.buttons["cleardoc"] = ui; - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState('cleardoc') == -1); - }); - return ui; - }; - - //排版,图片排版,文字方向 - var typeset = { - 'justify':['left', 'right', 'center', 'justify'], - 'imagefloat':['none', 'left', 'center', 'right'], - 'directionality':['ltr', 'rtl'] - }; - - for (var p in typeset) { - - (function (cmd, val) { - for (var i = 0, ci; ci = val[i++];) { - (function (cmd2) { - editorui[cmd.replace('float', '') + cmd2] = function (editor) { - var ui = new editorui.Button({ - className:'edui-for-' + cmd.replace('float', '') + cmd2, - title:editor.options.labelMap[cmd.replace('float', '') + cmd2] || editor.getLang("labelMap." + cmd.replace('float', '') + cmd2) || '', - theme:editor.options.theme, - onclick:function () { - editor.execCommand(cmd, cmd2); - } - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - ui.setDisabled(editor.queryCommandState(cmd) == -1); - ui.setChecked(editor.queryCommandValue(cmd) == cmd2 && !uiReady); - }); - return ui; - }; - })(ci) - } - })(p, typeset[p]) - } - - //字体颜色和背景颜色 - for (var i = 0, ci; ci = ['backcolor', 'forecolor'][i++];) { - editorui[ci] = function (cmd) { - return function (editor) { - var ui = new editorui.ColorButton({ - className:'edui-for-' + cmd, - color:'default', - title:editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd) || '', - editor:editor, - onpickcolor:function (t, color) { - editor.execCommand(cmd, color); - }, - onpicknocolor:function () { - editor.execCommand(cmd, 'default'); - this.setColor('transparent'); - this.color = 'default'; - }, - onbuttonclick:function () { - editor.execCommand(cmd, this.color); - } - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState(cmd) == -1); - }); - return ui; - }; - }(ci); - } - - - var dialogBtns = { - noOk:['searchreplace', 'help', 'spechars', 'webapp','preview'], - ok:['attachment', 'anchor', 'link', 'insertimage', 'map', 'gmap', 'insertframe', 'wordimage', - 'insertvideo', 'insertframe', 'edittip', 'edittable', 'edittd', 'scrawl', 'template', 'music', 'background', 'charts'] - }; - - for (var p in dialogBtns) { - (function (type, vals) { - for (var i = 0, ci; ci = vals[i++];) { - //todo opera下存在问题 - if (browser.opera && ci === "searchreplace") { - continue; - } - (function (cmd) { - editorui[cmd] = function (editor, iframeUrl, title) { - iframeUrl = iframeUrl || (editor.options.iframeUrlMap || {})[cmd] || iframeUrlMap[cmd]; - title = editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd) || ''; - - var dialog; - //没有iframeUrl不创建dialog - if (iframeUrl) { - dialog = new editorui.Dialog(utils.extend({ - iframeUrl:editor.ui.mapUrl(iframeUrl), - editor:editor, - className:'edui-for-' + cmd, - title:title, - holdScroll: cmd === 'insertimage', - fullscreen: /charts|preview/.test(cmd), - closeDialog:editor.getLang("closeDialog") - }, type == 'ok' ? { - buttons:[ - { - className:'edui-okbutton', - label:editor.getLang("ok"), - editor:editor, - onclick:function () { - dialog.close(true); - } - }, - { - className:'edui-cancelbutton', - label:editor.getLang("cancel"), - editor:editor, - onclick:function () { - dialog.close(false); - } - } - ] - } : {})); - - editor.ui._dialogs[cmd + "Dialog"] = dialog; - } - - var ui = new editorui.Button({ - className:'edui-for-' + cmd, - title:title, - onclick:function () { - if (dialog) { - switch (cmd) { - case "wordimage": - var images = editor.execCommand("wordimage"); - if (images && images.length) { - dialog.render(); - dialog.open(); - } - break; - case "scrawl": - if (editor.queryCommandState("scrawl") != -1) { - dialog.render(); - dialog.open(); - } - - break; - default: - dialog.render(); - dialog.open(); - } - } - }, - theme:editor.options.theme, - disabled:(cmd == 'scrawl' && editor.queryCommandState("scrawl") == -1) || ( cmd == 'charts' ) - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function () { - //只存在于右键菜单而无工具栏按钮的ui不需要检测状态 - var unNeedCheckState = {'edittable':1}; - if (cmd in unNeedCheckState)return; - - var state = editor.queryCommandState(cmd); - if (ui.getDom()) { - ui.setDisabled(state == -1); - ui.setChecked(state); - } - - }); - - return ui; - }; - })(ci.toLowerCase()) - } - })(p, dialogBtns[p]); - } - - editorui.snapscreen = function (editor, iframeUrl, title) { - title = editor.options.labelMap['snapscreen'] || editor.getLang("labelMap.snapscreen") || ''; - var ui = new editorui.Button({ - className:'edui-for-snapscreen', - title:title, - onclick:function () { - editor.execCommand("snapscreen"); - }, - theme:editor.options.theme - - }); - editorui.buttons['snapscreen'] = ui; - iframeUrl = iframeUrl || (editor.options.iframeUrlMap || {})["snapscreen"] || iframeUrlMap["snapscreen"]; - if (iframeUrl) { - var dialog = new editorui.Dialog({ - iframeUrl:editor.ui.mapUrl(iframeUrl), - editor:editor, - className:'edui-for-snapscreen', - title:title, - buttons:[ - { - className:'edui-okbutton', - label:editor.getLang("ok"), - editor:editor, - onclick:function () { - dialog.close(true); - } - }, - { - className:'edui-cancelbutton', - label:editor.getLang("cancel"), - editor:editor, - onclick:function () { - dialog.close(false); - } - } - ] - - }); - dialog.render(); - editor.ui._dialogs["snapscreenDialog"] = dialog; - } - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState('snapscreen') == -1); - }); - return ui; - }; - - editorui.insertcode = function (editor, list, title) { - list = editor.options['insertcode'] || []; - title = editor.options.labelMap['insertcode'] || editor.getLang("labelMap.insertcode") || ''; - // if (!list.length) return; - var items = []; - utils.each(list,function(key,val){ - items.push({ - label:key, - value:val, - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + (this.label || '') + '
    '; - } - }); - }); - - var ui = new editorui.Combox({ - editor:editor, - items:items, - onselect:function (t, index) { - editor.execCommand('insertcode', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - }, - title:title, - initValue:title, - className:'edui-for-insertcode', - indexByValue:function (value) { - if (value) { - for (var i = 0, ci; ci = this.items[i]; i++) { - if (ci.value.indexOf(value) != -1) - return i; - } - } - - return -1; - } - }); - editorui.buttons['insertcode'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('insertcode'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('insertcode'); - if(!value){ - ui.setValue(title); - return; - } - //trace:1871 ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 - value && (value = value.replace(/['"]/g, '').split(',')[0]); - ui.setValue(value); - - } - } - - }); - return ui; - }; - editorui.fontfamily = function (editor, list, title) { - - list = editor.options['fontfamily'] || []; - title = editor.options.labelMap['fontfamily'] || editor.getLang("labelMap.fontfamily") || ''; - if (!list.length) return; - for (var i = 0, ci, items = []; ci = list[i]; i++) { - var langLabel = editor.getLang('fontfamily')[ci.name] || ""; - (function (key, val) { - items.push({ - label:key, - value:val, - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + (this.label || '') + '
    '; - } - }); - })(ci.label || langLabel, ci.val) - } - var ui = new editorui.Combox({ - editor:editor, - items:items, - onselect:function (t, index) { - editor.execCommand('FontFamily', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - }, - title:title, - initValue:title, - className:'edui-for-fontfamily', - indexByValue:function (value) { - if (value) { - for (var i = 0, ci; ci = this.items[i]; i++) { - if (ci.value.indexOf(value) != -1) - return i; - } - } - - return -1; - } - }); - editorui.buttons['fontfamily'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('FontFamily'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('FontFamily'); - //trace:1871 ie下从源码模式切换回来时,字体会带单引号,而且会有逗号 - value && (value = value.replace(/['"]/g, '').split(',')[0]); - ui.setValue(value); - - } - } - - }); - return ui; - }; - - editorui.fontsize = function (editor, list, title) { - title = editor.options.labelMap['fontsize'] || editor.getLang("labelMap.fontsize") || ''; - list = list || editor.options['fontsize'] || []; - if (!list.length) return; - var items = []; - for (var i = 0; i < list.length; i++) { - var size = list[i] + 'px'; - items.push({ - label:size, - value:size, - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + (this.label || '') + '
    '; - } - }); - } - var ui = new editorui.Combox({ - editor:editor, - items:items, - title:title, - initValue:title, - onselect:function (t, index) { - editor.execCommand('FontSize', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - }, - className:'edui-for-fontsize' - }); - editorui.buttons['fontsize'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('FontSize'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - ui.setValue(editor.queryCommandValue('FontSize')); - } - } - - }); - return ui; - }; - - editorui.paragraph = function (editor, list, title) { - title = editor.options.labelMap['paragraph'] || editor.getLang("labelMap.paragraph") || ''; - list = editor.options['paragraph'] || []; - if (utils.isEmptyObject(list)) return; - var items = []; - for (var i in list) { - items.push({ - value:i, - label:list[i] || editor.getLang("paragraph")[i], - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + (this.label || '') + '
    '; - } - }) - } - var ui = new editorui.Combox({ - editor:editor, - items:items, - title:title, - initValue:title, - className:'edui-for-paragraph', - onselect:function (t, index) { - editor.execCommand('Paragraph', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - } - }); - editorui.buttons['paragraph'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('Paragraph'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('Paragraph'); - var index = ui.indexByValue(value); - if (index != -1) { - ui.setValue(value); - } else { - ui.setValue(ui.initValue); - } - } - } - - }); - return ui; - }; - - - //自定义标题 - editorui.customstyle = function (editor) { - var list = editor.options['customstyle'] || [], - title = editor.options.labelMap['customstyle'] || editor.getLang("labelMap.customstyle") || ''; - if (!list.length)return; - var langCs = editor.getLang('customstyle'); - for (var i = 0, items = [], t; t = list[i++];) { - (function (t) { - var ck = {}; - ck.label = t.label ? t.label : langCs[t.name]; - ck.style = t.style; - ck.className = t.className; - ck.tag = t.tag; - items.push({ - label:ck.label, - value:ck, - theme:editor.options.theme, - renderLabelHtml:function () { - return '
    ' + '<' + ck.tag + ' ' + (ck.className ? ' class="' + ck.className + '"' : "") - + (ck.style ? ' style="' + ck.style + '"' : "") + '>' + ck.label + "<\/" + ck.tag + ">" - + '
    '; - } - }); - })(t); - } - - var ui = new editorui.Combox({ - editor:editor, - items:items, - title:title, - initValue:title, - className:'edui-for-customstyle', - onselect:function (t, index) { - editor.execCommand('customstyle', this.items[index].value); - }, - onbuttonclick:function () { - this.showPopup(); - }, - indexByValue:function (value) { - for (var i = 0, ti; ti = this.items[i++];) { - if (ti.label == value) { - return i - 1 - } - } - return -1; - } - }); - editorui.buttons['customstyle'] = ui; - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - if (!uiReady) { - var state = editor.queryCommandState('customstyle'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('customstyle'); - var index = ui.indexByValue(value); - if (index != -1) { - ui.setValue(value); - } else { - ui.setValue(ui.initValue); - } - } - } - - }); - return ui; - }; - editorui.inserttable = function (editor, iframeUrl, title) { - title = editor.options.labelMap['inserttable'] || editor.getLang("labelMap.inserttable") || ''; - var ui = new editorui.TableButton({ - editor:editor, - title:title, - className:'edui-for-inserttable', - onpicktable:function (t, numCols, numRows) { - editor.execCommand('InsertTable', {numRows:numRows, numCols:numCols, border:1}); - }, - onbuttonclick:function () { - this.showPopup(); - } - }); - editorui.buttons['inserttable'] = ui; - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState('inserttable') == -1); - }); - return ui; - }; - - editorui.lineheight = function (editor) { - var val = editor.options.lineheight || []; - if (!val.length)return; - for (var i = 0, ci, items = []; ci = val[i++];) { - items.push({ - //todo:写死了 - label:ci, - value:ci, - theme:editor.options.theme, - onclick:function () { - editor.execCommand("lineheight", this.value); - } - }) - } - var ui = new editorui.MenuButton({ - editor:editor, - className:'edui-for-lineheight', - title:editor.options.labelMap['lineheight'] || editor.getLang("labelMap.lineheight") || '', - items:items, - onbuttonclick:function () { - var value = editor.queryCommandValue('LineHeight') || this.value; - editor.execCommand("LineHeight", value); - } - }); - editorui.buttons['lineheight'] = ui; - editor.addListener('selectionchange', function () { - var state = editor.queryCommandState('LineHeight'); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('LineHeight'); - value && ui.setValue((value + '').replace(/cm/, '')); - ui.setChecked(state) - } - }); - return ui; - }; - - var rowspacings = ['top', 'bottom']; - for (var r = 0, ri; ri = rowspacings[r++];) { - (function (cmd) { - editorui['rowspacing' + cmd] = function (editor) { - var val = editor.options['rowspacing' + cmd] || []; - if (!val.length) return null; - for (var i = 0, ci, items = []; ci = val[i++];) { - items.push({ - label:ci, - value:ci, - theme:editor.options.theme, - onclick:function () { - editor.execCommand("rowspacing", this.value, cmd); - } - }) - } - var ui = new editorui.MenuButton({ - editor:editor, - className:'edui-for-rowspacing' + cmd, - title:editor.options.labelMap['rowspacing' + cmd] || editor.getLang("labelMap.rowspacing" + cmd) || '', - items:items, - onbuttonclick:function () { - var value = editor.queryCommandValue('rowspacing', cmd) || this.value; - editor.execCommand("rowspacing", value, cmd); - } - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function () { - var state = editor.queryCommandState('rowspacing', cmd); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue('rowspacing', cmd); - value && ui.setValue((value + '').replace(/%/, '')); - ui.setChecked(state) - } - }); - return ui; - } - })(ri) - } - //有序,无序列表 - var lists = ['insertorderedlist', 'insertunorderedlist']; - for (var l = 0, cl; cl = lists[l++];) { - (function (cmd) { - editorui[cmd] = function (editor) { - var vals = editor.options[cmd], - _onMenuClick = function () { - editor.execCommand(cmd, this.value); - }, items = []; - for (var i in vals) { - items.push({ - label:vals[i] || editor.getLang()[cmd][i] || "", - value:i, - theme:editor.options.theme, - onclick:_onMenuClick - }) - } - var ui = new editorui.MenuButton({ - editor:editor, - className:'edui-for-' + cmd, - title:editor.getLang("labelMap." + cmd) || '', - 'items':items, - onbuttonclick:function () { - var value = editor.queryCommandValue(cmd) || this.value; - editor.execCommand(cmd, value); - } - }); - editorui.buttons[cmd] = ui; - editor.addListener('selectionchange', function () { - var state = editor.queryCommandState(cmd); - if (state == -1) { - ui.setDisabled(true); - } else { - ui.setDisabled(false); - var value = editor.queryCommandValue(cmd); - ui.setValue(value); - ui.setChecked(state) - } - }); - return ui; - }; - })(cl) - } - - editorui.fullscreen = function (editor, title) { - title = editor.options.labelMap['fullscreen'] || editor.getLang("labelMap.fullscreen") || ''; - var ui = new editorui.Button({ - className:'edui-for-fullscreen', - title:title, - theme:editor.options.theme, - onclick:function () { - if (editor.ui) { - editor.ui.setFullScreen(!editor.ui.isFullScreen()); - } - this.setChecked(editor.ui.isFullScreen()); - } - }); - editorui.buttons['fullscreen'] = ui; - editor.addListener('selectionchange', function () { - var state = editor.queryCommandState('fullscreen'); - ui.setDisabled(state == -1); - ui.setChecked(editor.ui.isFullScreen()); - }); - return ui; - }; - - // 表情 - editorui["emotion"] = function (editor, iframeUrl) { - var cmd = "emotion"; - var ui = new editorui.MultiMenuPop({ - title:editor.options.labelMap[cmd] || editor.getLang("labelMap." + cmd + "") || '', - editor:editor, - className:'edui-for-' + cmd, - iframeUrl:editor.ui.mapUrl(iframeUrl || (editor.options.iframeUrlMap || {})[cmd] || iframeUrlMap[cmd]) - }); - editorui.buttons[cmd] = ui; - - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState(cmd) == -1) - }); - return ui; - }; - - editorui.autotypeset = function (editor) { - var ui = new editorui.AutoTypeSetButton({ - editor:editor, - title:editor.options.labelMap['autotypeset'] || editor.getLang("labelMap.autotypeset") || '', - className:'edui-for-autotypeset', - onbuttonclick:function () { - editor.execCommand('autotypeset') - } - }); - editorui.buttons['autotypeset'] = ui; - editor.addListener('selectionchange', function () { - ui.setDisabled(editor.queryCommandState('autotypeset') == -1); - }); - return ui; - }; - - /* 简单上传插件 */ - editorui["simpleupload"] = function (editor) { - var name = 'simpleupload', - ui = new editorui.Button({ - className:'edui-for-' + name, - title:editor.options.labelMap[name] || editor.getLang("labelMap." + name) || '', - onclick:function () {}, - theme:editor.options.theme, - showText:false - }); - editorui.buttons[name] = ui; - editor.addListener('ready', function() { - var b = ui.getDom('body'), - iconSpan = b.children[0]; - editor.fireEvent('simpleuploadbtnready', iconSpan); - }); - editor.addListener('selectionchange', function (type, causeByUi, uiReady) { - var state = editor.queryCommandState(name); - if (state == -1) { - ui.setDisabled(true); - ui.setChecked(false); - } else { - if (!uiReady) { - ui.setDisabled(false); - ui.setChecked(state); - } - } - }); - return ui; - }; - -})(); - - -// adapter/editor.js -///import core -///commands 全屏 -///commandsName FullScreen -///commandsTitle 全屏 -(function () { - var utils = baidu.editor.utils, - uiUtils = baidu.editor.ui.uiUtils, - UIBase = baidu.editor.ui.UIBase, - domUtils = baidu.editor.dom.domUtils; - var nodeStack = []; - - function EditorUI(options) { - this.initOptions(options); - this.initEditorUI(); - } - - EditorUI.prototype = { - uiName:'editor', - initEditorUI:function () { - this.editor.ui = this; - this._dialogs = {}; - this.initUIBase(); - this._initToolbars(); - var editor = this.editor, - me = this; - - editor.addListener('ready', function () { - //提供getDialog方法 - editor.getDialog = function (name) { - return editor.ui._dialogs[name + "Dialog"]; - }; - domUtils.on(editor.window, 'scroll', function (evt) { - baidu.editor.ui.Popup.postHide(evt); - }); - //提供编辑器实时宽高(全屏时宽高不变化) - editor.ui._actualFrameWidth = editor.options.initialFrameWidth; - - UE.browser.ie && UE.browser.version === 6 && editor.container.ownerDocument.execCommand("BackgroundImageCache", false, true); - - //display bottom-bar label based on config - if (editor.options.elementPathEnabled) { - editor.ui.getDom('elementpath').innerHTML = '
    ' + editor.getLang("elementPathTip") + ':
    '; - } - if (editor.options.wordCount) { - function countFn() { - setCount(editor,me); - domUtils.un(editor.document, "click", arguments.callee); - } - domUtils.on(editor.document, "click", countFn); - editor.ui.getDom('wordcount').innerHTML = editor.getLang("wordCountTip"); - } - editor.ui._scale(); - if (editor.options.scaleEnabled) { - if (editor.autoHeightEnabled) { - editor.disableAutoHeight(); - } - me.enableScale(); - } else { - me.disableScale(); - } - if (!editor.options.elementPathEnabled && !editor.options.wordCount && !editor.options.scaleEnabled) { - editor.ui.getDom('elementpath').style.display = "none"; - editor.ui.getDom('wordcount').style.display = "none"; - editor.ui.getDom('scale').style.display = "none"; - } - - if (!editor.selection.isFocus())return; - editor.fireEvent('selectionchange', false, true); - - - }); - - editor.addListener('mousedown', function (t, evt) { - var el = evt.target || evt.srcElement; - baidu.editor.ui.Popup.postHide(evt, el); - baidu.editor.ui.ShortCutMenu.postHide(evt); - - }); - editor.addListener("delcells", function () { - if (UE.ui['edittip']) { - new UE.ui['edittip'](editor); - } - editor.getDialog('edittip').open(); - }); - - var pastePop, isPaste = false, timer; - editor.addListener("afterpaste", function () { - if(editor.queryCommandState('pasteplain')) - return; - if(baidu.editor.ui.PastePicker){ - pastePop = new baidu.editor.ui.Popup({ - content:new baidu.editor.ui.PastePicker({editor:editor}), - editor:editor, - className:'edui-wordpastepop' - }); - pastePop.render(); - } - isPaste = true; - }); - - editor.addListener("afterinserthtml", function () { - clearTimeout(timer); - timer = setTimeout(function () { - if (pastePop && (isPaste || editor.ui._isTransfer)) { - if(pastePop.isHidden()){ - var span = domUtils.createElement(editor.document, 'span', { - 'style':"line-height:0px;", - 'innerHTML':'\ufeff' - }), - range = editor.selection.getRange(); - range.insertNode(span); - var tmp= getDomNode(span, 'firstChild', 'previousSibling'); - tmp && pastePop.showAnchor(tmp.nodeType == 3 ? tmp.parentNode : tmp); - domUtils.remove(span); - }else{ - pastePop.show(); - } - delete editor.ui._isTransfer; - isPaste = false; - } - }, 200) - }); - editor.addListener('contextmenu', function (t, evt) { - baidu.editor.ui.Popup.postHide(evt); - }); - editor.addListener('keydown', function (t, evt) { - if (pastePop) pastePop.dispose(evt); - var keyCode = evt.keyCode || evt.which; - if(evt.altKey&&keyCode==90){ - UE.ui.buttons['fullscreen'].onclick(); - } - }); - editor.addListener('wordcount', function (type) { - setCount(this,me); - }); - function setCount(editor,ui) { - editor.setOpt({ - wordCount:true, - maximumWords:10000, - wordCountMsg:editor.options.wordCountMsg || editor.getLang("wordCountMsg"), - wordOverFlowMsg:editor.options.wordOverFlowMsg || editor.getLang("wordOverFlowMsg") - }); - var opt = editor.options, - max = opt.maximumWords, - msg = opt.wordCountMsg , - errMsg = opt.wordOverFlowMsg, - countDom = ui.getDom('wordcount'); - if (!opt.wordCount) { - return; - } - var count = editor.getContentLength(true); - if (count > max) { - countDom.innerHTML = errMsg; - editor.fireEvent("wordcountoverflow"); - } else { - countDom.innerHTML = msg.replace("{#leave}", max - count).replace("{#count}", count); - } - } - - editor.addListener('selectionchange', function () { - if (editor.options.elementPathEnabled) { - me[(editor.queryCommandState('elementpath') == -1 ? 'dis' : 'en') + 'ableElementPath']() - } - if (editor.options.scaleEnabled) { - me[(editor.queryCommandState('scale') == -1 ? 'dis' : 'en') + 'ableScale'](); - - } - }); - var popup = new baidu.editor.ui.Popup({ - editor:editor, - content:'', - className:'edui-bubble', - _onEditButtonClick:function () { - this.hide(); - editor.ui._dialogs.linkDialog.open(); - }, - _onImgEditButtonClick:function (name) { - this.hide(); - editor.ui._dialogs[name] && editor.ui._dialogs[name].open(); - - }, - _onImgSetFloat:function (value) { - this.hide(); - editor.execCommand("imagefloat", value); - - }, - _setIframeAlign:function (value) { - var frame = popup.anchorEl; - var newFrame = frame.cloneNode(true); - switch (value) { - case -2: - newFrame.setAttribute("align", ""); - break; - case -1: - newFrame.setAttribute("align", "left"); - break; - case 1: - newFrame.setAttribute("align", "right"); - break; - } - frame.parentNode.insertBefore(newFrame, frame); - domUtils.remove(frame); - popup.anchorEl = newFrame; - popup.showAnchor(popup.anchorEl); - }, - _updateIframe:function () { - var frame = editor._iframe = popup.anchorEl; - if(domUtils.hasClass(frame, 'ueditor_baidumap')) { - editor.selection.getRange().selectNode(frame).select(); - editor.ui._dialogs.mapDialog.open(); - popup.hide(); - } else { - editor.ui._dialogs.insertframeDialog.open(); - popup.hide(); - } - }, - _onRemoveButtonClick:function (cmdName) { - editor.execCommand(cmdName); - this.hide(); - }, - queryAutoHide:function (el) { - if (el && el.ownerDocument == editor.document) { - if (el.tagName.toLowerCase() == 'img' || domUtils.findParentByTagName(el, 'a', true)) { - return el !== popup.anchorEl; - } - } - return baidu.editor.ui.Popup.prototype.queryAutoHide.call(this, el); - } - }); - popup.render(); - if (editor.options.imagePopup) { - editor.addListener('mouseover', function (t, evt) { - evt = evt || window.event; - var el = evt.target || evt.srcElement; - if (editor.ui._dialogs.insertframeDialog && /iframe/ig.test(el.tagName)) { - var html = popup.formatHtml( - '' + editor.getLang("property") + ': ' + editor.getLang("default") + '  ' + editor.getLang("justifyleft") + '  ' + editor.getLang("justifyright") + '  ' + - ' ' + editor.getLang("modify") + ''); - if (html) { - popup.getDom('content').innerHTML = html; - popup.anchorEl = el; - popup.showAnchor(popup.anchorEl); - } else { - popup.hide(); - } - } - }); - editor.addListener('selectionchange', function (t, causeByUi) { - if (!causeByUi) return; - var html = '', str = "", - img = editor.selection.getRange().getClosedNode(), - dialogs = editor.ui._dialogs; - if (img && img.tagName == 'IMG') { - var dialogName = 'insertimageDialog'; - if (img.className.indexOf("edui-faked-video") != -1 || img.className.indexOf("edui-upload-video") != -1) { - dialogName = "insertvideoDialog" - } - if (img.className.indexOf("edui-faked-webapp") != -1) { - dialogName = "webappDialog" - } - if (img.src.indexOf("http://api.map.baidu.com") != -1) { - dialogName = "mapDialog" - } - if (img.className.indexOf("edui-faked-music") != -1) { - dialogName = "musicDialog" - } - if (img.src.indexOf("http://maps.google.com/maps/api/staticmap") != -1) { - dialogName = "gmapDialog" - } - if (img.getAttribute("anchorname")) { - dialogName = "anchorDialog"; - html = popup.formatHtml( - '' + editor.getLang("property") + ': ' + editor.getLang("modify") + '  ' + - '' + editor.getLang("delete") + ''); - } - if (img.getAttribute("word_img")) { - //todo 放到dialog去做查询 - editor.word_img = [img.getAttribute("word_img")]; - dialogName = "wordimageDialog" - } - if(domUtils.hasClass(img, 'loadingclass') || domUtils.hasClass(img, 'loaderrorclass')) { - dialogName = ""; - } - if (!dialogs[dialogName]) { - return; - } - str = '' + editor.getLang("property") + ': '+ - '' + editor.getLang("default") + '  ' + - '' + editor.getLang("justifyleft") + '  ' + - '' + editor.getLang("justifyright") + '  ' + - '' + editor.getLang("justifycenter") + '  '+ - '' + editor.getLang("modify") + ''; - - !html && (html = popup.formatHtml(str)) - - } - if (editor.ui._dialogs.linkDialog) { - var link = editor.queryCommandValue('link'); - var url; - if (link && (url = (link.getAttribute('_href') || link.getAttribute('href', 2)))) { - var txt = url; - if (url.length > 30) { - txt = url.substring(0, 20) + "..."; - } - if (html) { - html += '
    ' - } - html += popup.formatHtml( - '' + editor.getLang("anthorMsg") + ': ' + txt + '' + - ' ' + editor.getLang("modify") + '' + - ' ' + editor.getLang("clear") + ''); - popup.showAnchor(link); - } - } - - if (html) { - popup.getDom('content').innerHTML = html; - popup.anchorEl = img || link; - popup.showAnchor(popup.anchorEl); - } else { - popup.hide(); - } - }); - } - - }, - _initToolbars:function () { - var editor = this.editor; - var toolbars = this.toolbars || []; - var toolbarUis = []; - for (var i = 0; i < toolbars.length; i++) { - var toolbar = toolbars[i]; - var toolbarUi = new baidu.editor.ui.Toolbar({theme:editor.options.theme}); - for (var j = 0; j < toolbar.length; j++) { - var toolbarItem = toolbar[j]; - var toolbarItemUi = null; - if (typeof toolbarItem == 'string') { - toolbarItem = toolbarItem.toLowerCase(); - if (toolbarItem == '|') { - toolbarItem = 'Separator'; - } - if(toolbarItem == '||'){ - toolbarItem = 'Breakline'; - } - if (baidu.editor.ui[toolbarItem]) { - toolbarItemUi = new baidu.editor.ui[toolbarItem](editor); - } - - //fullscreen这里单独处理一下,放到首行去 - if (toolbarItem == 'fullscreen') { - if (toolbarUis && toolbarUis[0]) { - toolbarUis[0].items.splice(0, 0, toolbarItemUi); - } else { - toolbarItemUi && toolbarUi.items.splice(0, 0, toolbarItemUi); - } - - continue; - - - } - } else { - toolbarItemUi = toolbarItem; - } - if (toolbarItemUi && toolbarItemUi.id) { - - toolbarUi.add(toolbarItemUi); - } - } - toolbarUis[i] = toolbarUi; - } - - //接受外部定制的UI(修复因 utils.each 无法准确的循环出对象的全部元素而导致的自定义 UI 不符合预期的 BUG by HaoChuan9421) - - // utils.each(UE._customizeUI,function(obj,key){ - // var itemUI,index; - // if(obj.id && obj.id != editor.key){ - // return false; - // } - // itemUI = obj.execFn.call(editor,editor,key); - // if(itemUI){ - // index = obj.index; - // if(index === undefined){ - // index = toolbarUi.items.length; - // } - // toolbarUi.add(itemUI,index) - // } - // }); - - - for(var key in UE._customizeUI){ - var obj = UE._customizeUI[key] - var itemUI,index; - if(!obj.id || obj.id == editor.key){ - itemUI = obj.execFn.call(editor,editor,key); - if(itemUI){ - index = obj.index; - if(index === undefined){ - index = toolbarUi.items.length; - } - toolbarUi.add(itemUI,index) - } - } - } - - this.toolbars = toolbarUis; - }, - getHtmlTpl:function () { - return '
    ' + - '
    ' + - (this.toolbars.length ? - '
    ' + - this.renderToolbarBoxHtml() + - '
    ' : '') + - '' + - '
    ' + - '
    ' + - '
    ' + - '
    ' + - //modify wdcount by matao - '
    ' + - '' + - '' + - '' + - '
    ' + - '
    ' + - '
    '; - }, - showWordImageDialog:function () { - this._dialogs['wordimageDialog'].open(); - }, - renderToolbarBoxHtml:function () { - var buff = []; - for (var i = 0; i < this.toolbars.length; i++) { - buff.push(this.toolbars[i].renderHtml()); - } - return buff.join(''); - }, - setFullScreen:function (fullscreen) { - - var editor = this.editor, - container = editor.container.parentNode.parentNode; - if (this._fullscreen != fullscreen) { - this._fullscreen = fullscreen; - this.editor.fireEvent('beforefullscreenchange', fullscreen); - if (baidu.editor.browser.gecko) { - var bk = editor.selection.getRange().createBookmark(); - } - if (fullscreen) { - while (container.tagName != "BODY") { - var position = baidu.editor.dom.domUtils.getComputedStyle(container, "position"); - nodeStack.push(position); - container.style.position = "static"; - container = container.parentNode; - } - this._bakHtmlOverflow = document.documentElement.style.overflow; - this._bakBodyOverflow = document.body.style.overflow; - this._bakAutoHeight = this.editor.autoHeightEnabled; - this._bakScrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop); - - this._bakEditorContaninerWidth = editor.iframe.parentNode.offsetWidth; - if (this._bakAutoHeight) { - //当全屏时不能执行自动长高 - editor.autoHeightEnabled = false; - this.editor.disableAutoHeight(); - } - - document.documentElement.style.overflow = 'hidden'; - //修复,滚动条不收起的问题 - - window.scrollTo(0,window.scrollY); - this._bakCssText = this.getDom().style.cssText; - this._bakCssText1 = this.getDom('iframeholder').style.cssText; - editor.iframe.parentNode.style.width = ''; - this._updateFullScreen(); - } else { - while (container.tagName != "BODY") { - container.style.position = nodeStack.shift(); - container = container.parentNode; - } - this.getDom().style.cssText = this._bakCssText; - this.getDom('iframeholder').style.cssText = this._bakCssText1; - if (this._bakAutoHeight) { - editor.autoHeightEnabled = true; - this.editor.enableAutoHeight(); - } - - document.documentElement.style.overflow = this._bakHtmlOverflow; - document.body.style.overflow = this._bakBodyOverflow; - editor.iframe.parentNode.style.width = this._bakEditorContaninerWidth + 'px'; - window.scrollTo(0, this._bakScrollTop); - } - if (browser.gecko && editor.body.contentEditable === 'true') { - var input = document.createElement('input'); - document.body.appendChild(input); - editor.body.contentEditable = false; - setTimeout(function () { - input.focus(); - setTimeout(function () { - editor.body.contentEditable = true; - editor.fireEvent('fullscreenchanged', fullscreen); - editor.selection.getRange().moveToBookmark(bk).select(true); - baidu.editor.dom.domUtils.remove(input); - fullscreen && window.scroll(0, 0); - }, 0) - }, 0) - } - - if(editor.body.contentEditable === 'true'){ - this.editor.fireEvent('fullscreenchanged', fullscreen); - this.triggerLayout(); - } - - } - }, - _updateFullScreen:function () { - if (this._fullscreen) { - var vpRect = uiUtils.getViewportRect(); - this.getDom().style.cssText = 'border:0;position:absolute;left:0;top:' + (this.editor.options.topOffset || 0) + 'px;width:' + vpRect.width + 'px;height:' + vpRect.height + 'px;z-index:' + (this.getDom().style.zIndex * 1 + 100); - uiUtils.setViewportOffset(this.getDom(), { left:0, top:this.editor.options.topOffset || 0 }); - this.editor.setHeight(vpRect.height - this.getDom('toolbarbox').offsetHeight - this.getDom('bottombar').offsetHeight - (this.editor.options.topOffset || 0),true); - //不手动调一下,会导致全屏失效 - if(browser.gecko){ - try{ - window.onresize(); - }catch(e){ - - } - - } - } - }, - _updateElementPath:function () { - var bottom = this.getDom('elementpath'), list; - if (this.elementPathEnabled && (list = this.editor.queryCommandValue('elementpath'))) { - - var buff = []; - for (var i = 0, ci; ci = list[i]; i++) { - buff[i] = this.formatHtml('' + ci + ''); - } - bottom.innerHTML = '
    ' + this.editor.getLang("elementPathTip") + ': ' + buff.join(' > ') + '
    '; - - } else { - bottom.style.display = 'none' - } - }, - disableElementPath:function () { - var bottom = this.getDom('elementpath'); - bottom.innerHTML = ''; - bottom.style.display = 'none'; - this.elementPathEnabled = false; - - }, - enableElementPath:function () { - var bottom = this.getDom('elementpath'); - bottom.style.display = ''; - this.elementPathEnabled = true; - this._updateElementPath(); - }, - _scale:function () { - var doc = document, - editor = this.editor, - editorHolder = editor.container, - editorDocument = editor.document, - toolbarBox = this.getDom("toolbarbox"), - bottombar = this.getDom("bottombar"), - scale = this.getDom("scale"), - scalelayer = this.getDom("scalelayer"); - - var isMouseMove = false, - position = null, - minEditorHeight = 0, - minEditorWidth = editor.options.minFrameWidth, - pageX = 0, - pageY = 0, - scaleWidth = 0, - scaleHeight = 0; - - function down() { - position = domUtils.getXY(editorHolder); - - if (!minEditorHeight) { - minEditorHeight = editor.options.minFrameHeight + toolbarBox.offsetHeight + bottombar.offsetHeight; - } - - scalelayer.style.cssText = "position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:" + editorHolder.offsetWidth + "px;height:" - + editorHolder.offsetHeight + "px;z-index:" + (editor.options.zIndex + 1); - - domUtils.on(doc, "mousemove", move); - domUtils.on(editorDocument, "mouseup", up); - domUtils.on(doc, "mouseup", up); - } - - var me = this; - //by xuheng 全屏时关掉缩放 - this.editor.addListener('fullscreenchanged', function (e, fullScreen) { - if (fullScreen) { - me.disableScale(); - - } else { - if (me.editor.options.scaleEnabled) { - me.enableScale(); - var tmpNode = me.editor.document.createElement('span'); - me.editor.body.appendChild(tmpNode); - me.editor.body.style.height = Math.max(domUtils.getXY(tmpNode).y, me.editor.iframe.offsetHeight - 20) + 'px'; - domUtils.remove(tmpNode) - } - } - }); - function move(event) { - clearSelection(); - var e = event || window.event; - pageX = e.pageX || (doc.documentElement.scrollLeft + e.clientX); - pageY = e.pageY || (doc.documentElement.scrollTop + e.clientY); - scaleWidth = pageX - position.x; - scaleHeight = pageY - position.y; - - if (scaleWidth >= minEditorWidth) { - isMouseMove = true; - scalelayer.style.width = scaleWidth + 'px'; - } - if (scaleHeight >= minEditorHeight) { - isMouseMove = true; - scalelayer.style.height = scaleHeight + "px"; - } - } - - function up() { - if (isMouseMove) { - isMouseMove = false; - editor.ui._actualFrameWidth = scalelayer.offsetWidth - 2; - editorHolder.style.width = editor.ui._actualFrameWidth + 'px'; - - editor.setHeight(scalelayer.offsetHeight - bottombar.offsetHeight - toolbarBox.offsetHeight - 2,true); - } - if (scalelayer) { - scalelayer.style.display = "none"; - } - clearSelection(); - domUtils.un(doc, "mousemove", move); - domUtils.un(editorDocument, "mouseup", up); - domUtils.un(doc, "mouseup", up); - } - - function clearSelection() { - if (browser.ie) - doc.selection.clear(); - else - window.getSelection().removeAllRanges(); - } - - this.enableScale = function () { - //trace:2868 - if (editor.queryCommandState("source") == 1) return; - scale.style.display = ""; - this.scaleEnabled = true; - domUtils.on(scale, "mousedown", down); - }; - this.disableScale = function () { - scale.style.display = "none"; - this.scaleEnabled = false; - domUtils.un(scale, "mousedown", down); - }; - }, - isFullScreen:function () { - return this._fullscreen; - }, - postRender:function () { - UIBase.prototype.postRender.call(this); - for (var i = 0; i < this.toolbars.length; i++) { - this.toolbars[i].postRender(); - } - var me = this; - var timerId, - domUtils = baidu.editor.dom.domUtils, - updateFullScreenTime = function () { - clearTimeout(timerId); - timerId = setTimeout(function () { - me._updateFullScreen(); - }); - }; - domUtils.on(window, 'resize', updateFullScreenTime); - - me.addListener('destroy', function () { - domUtils.un(window, 'resize', updateFullScreenTime); - clearTimeout(timerId); - }) - }, - showToolbarMsg:function (msg, flag) { - this.getDom('toolbarmsg_label').innerHTML = msg; - this.getDom('toolbarmsg').style.display = ''; - // - if (!flag) { - var w = this.getDom('upload_dialog'); - w.style.display = 'none'; - } - }, - hideToolbarMsg:function () { - this.getDom('toolbarmsg').style.display = 'none'; - }, - mapUrl:function (url) { - return url ? url.replace('~/', this.editor.options.UEDITOR_HOME_URL || '') : '' - }, - triggerLayout:function () { - var dom = this.getDom(); - if (dom.style.zoom == '1') { - dom.style.zoom = '100%'; - } else { - dom.style.zoom = '1'; - } - } - }; - utils.inherits(EditorUI, baidu.editor.ui.UIBase); - - - var instances = {}; - - - UE.ui.Editor = function (options) { - var editor = new UE.Editor(options); - editor.options.editor = editor; - utils.loadFile(document, { - href:editor.options.themePath + editor.options.theme + "/css/ueditor.css", - tag:"link", - type:"text/css", - rel:"stylesheet" - }); - - var oldRender = editor.render; - editor.render = function (holder) { - if (holder.constructor === String) { - editor.key = holder; - instances[holder] = editor; - } - utils.domReady(function () { - editor.langIsReady ? renderUI() : editor.addListener("langReady", renderUI); - function renderUI() { - editor.setOpt({ - labelMap:editor.options.labelMap || editor.getLang('labelMap') - }); - new EditorUI(editor.options); - if (holder) { - if (holder.constructor === String) { - holder = document.getElementById(holder); - } - holder && holder.getAttribute('name') && ( editor.options.textarea = holder.getAttribute('name')); - if (holder && /script|textarea/ig.test(holder.tagName)) { - var newDiv = document.createElement('div'); - holder.parentNode.insertBefore(newDiv, holder); - var cont = holder.value || holder.innerHTML; - editor.options.initialContent = /^[\t\r\n ]*$/.test(cont) ? editor.options.initialContent : - cont.replace(/>[\n\r\t]+([ ]{4})+/g, '>') - .replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<'); - holder.className && (newDiv.className = holder.className); - holder.style.cssText && (newDiv.style.cssText = holder.style.cssText); - if (/textarea/i.test(holder.tagName)) { - editor.textarea = holder; - editor.textarea.style.display = 'none'; - - - } else { - holder.parentNode.removeChild(holder); - - - } - if(holder.id){ - newDiv.id = holder.id; - domUtils.removeAttributes(holder,'id'); - } - holder = newDiv; - holder.innerHTML = ''; - } - - } - domUtils.addClass(holder, "edui-" + editor.options.theme); - editor.ui.render(holder); - var opt = editor.options; - //给实例添加一个编辑器的容器引用 - editor.container = editor.ui.getDom(); - var parents = domUtils.findParents(holder,true); - var displays = []; - for(var i = 0 ,ci;ci=parents[i];i++){ - displays[i] = ci.style.display; - ci.style.display = 'block' - } - if (opt.initialFrameWidth) { - opt.minFrameWidth = opt.initialFrameWidth; - } else { - opt.minFrameWidth = opt.initialFrameWidth = holder.offsetWidth; - var styleWidth = holder.style.width; - if(/%$/.test(styleWidth)) { - opt.initialFrameWidth = styleWidth; - } - } - if (opt.initialFrameHeight) { - opt.minFrameHeight = opt.initialFrameHeight; - } else { - opt.initialFrameHeight = opt.minFrameHeight = holder.offsetHeight; - } - for(var i = 0 ,ci;ci=parents[i];i++){ - ci.style.display = displays[i] - } - //编辑器最外容器设置了高度,会导致,编辑器不占位 - //todo 先去掉,没有找到原因 - if(holder.style.height){ - holder.style.height = '' - } - editor.container.style.width = opt.initialFrameWidth + (/%$/.test(opt.initialFrameWidth) ? '' : 'px'); - editor.container.style.zIndex = opt.zIndex; - oldRender.call(editor, editor.ui.getDom('iframeholder')); - editor.fireEvent("afteruiready"); - } - }) - }; - return editor; - }; - - - /** - * @file - * @name UE - * @short UE - * @desc UEditor的顶部命名空间 - */ - /** - * @name getEditor - * @since 1.2.4+ - * @grammar UE.getEditor(id,[opt]) => Editor实例 - * @desc 提供一个全局的方法得到编辑器实例 - * - * * ''id'' 放置编辑器的容器id, 如果容器下的编辑器已经存在,就直接返回 - * * ''opt'' 编辑器的可选参数 - * @example - * UE.getEditor('containerId',{onready:function(){//创建一个编辑器实例 - * this.setContent('hello') - * }}); - * UE.getEditor('containerId'); //返回刚创建的实例 - * - */ - UE.getEditor = function (id, opt) { - var editor = instances[id]; - if (!editor) { - editor = instances[id] = new UE.ui.Editor(opt); - editor.render(id); - } - return editor; - }; - - - UE.delEditor = function (id) { - var editor; - if (editor = instances[id]) { - editor.key && editor.destroy(); - delete instances[id] - } - }; - - UE.registerUI = function(uiName,fn,index,editorId){ - utils.each(uiName.split(/\s+/), function (name) { - UE._customizeUI[name] = { - id : editorId, - execFn:fn, - index:index - }; - }) - - } - -})(); - -// adapter/message.js -UE.registerUI('message', function(editor) { - - var editorui = baidu.editor.ui; - var Message = editorui.Message; - var holder; - var _messageItems = []; - var me = editor; - - me.addListener('ready', function(){ - holder = document.getElementById(me.ui.id + '_message_holder'); - updateHolderPos(); - // HaoChuan9421 - // setTimeout(function(){ - // updateHolderPos(); - // }, 500); - }); - - me.addListener('showmessage', function(type, opt){ - opt = utils.isString(opt) ? { - 'content': opt - } : opt; - var message = new Message({ - 'timeout': opt.timeout, - 'type': opt.type, - 'content': opt.content, - 'keepshow': opt.keepshow, - 'editor': me - }), - mid = opt.id || ('msg_' + (+new Date()).toString(36)); - message.render(holder); - _messageItems[mid] = message; - message.reset(opt); - updateHolderPos(); - return mid; - }); - - me.addListener('updatemessage',function(type, id, opt){ - opt = utils.isString(opt) ? { - 'content': opt - } : opt; - var message = _messageItems[id]; - message.render(holder); - message && message.reset(opt); - }); - - me.addListener('hidemessage',function(type, id){ - var message = _messageItems[id]; - message && message.hide(); - }); - - function updateHolderPos(){ - var toolbarbox = me.ui.getDom('toolbarbox'); - if (toolbarbox) { - holder.style.top = toolbarbox.offsetHeight + 3 + 'px'; - } - holder.style.zIndex = Math.max(me.options.zIndex, me.iframe.style.zIndex) + 1; - } - -}); - - -// adapter/autosave.js -UE.registerUI('autosave', function(editor) { - var timer = null,uid = null; - editor.on('afterautosave',function(){ - clearTimeout(timer); - - timer = setTimeout(function(){ - if(uid){ - editor.trigger('hidemessage',uid); - } - uid = editor.trigger('showmessage',{ - content : editor.getLang('autosave.success'), - timeout : 2000 - }); - - },2000) - }) - -}); - - - -})(); diff --git a/public/static/admin/UEditor/ueditor.all.min.js b/public/static/admin/UEditor/ueditor.all.min.js deleted file mode 100644 index 1f48238..0000000 --- a/public/static/admin/UEditor/ueditor.all.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! - * UEditor - * version: ueditor - * build: Wed Dec 26 2018 17:25:05 GMT+0800 (CST) - */ - -!function(){function getListener(a,b,c){var d;return b=b.toLowerCase(),(d=a.__allListeners||c&&(a.__allListeners={}))&&(d[b]||c&&(d[b]=[]))}function getDomNode(a,b,c,d,e,f){var g,h=d&&a[b];for(!h&&(h=a[c]);!h&&(g=(g||a).parentNode);){if("BODY"==g.tagName||f&&!f(g))return null;h=g[c]}return h&&e&&!e(h)?getDomNode(h,b,c,!1,e):h}UEDITOR_CONFIG=window.UEDITOR_CONFIG||{};var baidu=window.baidu||{};window.baidu=baidu,window.UE=baidu.editor=window.UE||{},UE.plugins={},UE.commands={},UE.instants={},UE.I18N={},UE._customizeUI={},UE.version="1.4.3";var dom=UE.dom={},browser=UE.browser=function(){var a=navigator.userAgent.toLowerCase(),b=window.opera,c={ie:/(msie\s|trident.*rv:)([\w.]+)/.test(a),opera:!!b&&b.version,webkit:a.indexOf(" applewebkit/")>-1,mac:a.indexOf("macintosh")>-1,quirks:"BackCompat"==document.compatMode};c.gecko="Gecko"==navigator.product&&!c.webkit&&!c.opera&&!c.ie;var d=0;if(c.ie){var e=a.match(/(?:msie\s([\w.]+))/),f=a.match(/(?:trident.*rv:([\w.]+))/);d=e&&f&&e[1]&&f[1]?Math.max(1*e[1],1*f[1]):e&&e[1]?1*e[1]:f&&f[1]?1*f[1]:0,c.ie11Compat=11==document.documentMode,c.ie9Compat=9==document.documentMode,c.ie8=!!document.documentMode,c.ie8Compat=8==document.documentMode,c.ie7Compat=7==d&&!document.documentMode||7==document.documentMode,c.ie6Compat=d<7||c.quirks,c.ie9above=d>8,c.ie9below=d<9,c.ie11above=d>10,c.ie11below=d<11}if(c.gecko){var g=a.match(/rv:([\d\.]+)/);g&&(g=g[1].split("."),d=1e4*g[0]+100*(g[1]||0)+1*(g[2]||0))}return/chrome\/(\d+\.\d)/i.test(a)&&(c.chrome=+RegExp.$1),/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(a)&&!/chrome/i.test(a)&&(c.safari=+(RegExp.$1||RegExp.$2)),c.opera&&(d=parseFloat(b.version())),c.webkit&&(d=parseFloat(a.match(/ applewebkit\/(\d+)/)[1])),c.version=d,c.isCompatible=!c.mobile&&(c.ie&&d>=6||c.gecko&&d>=10801||c.opera&&d>=9.5||c.air&&d>=1||c.webkit&&d>=522||!1),c}(),ie=browser.ie,webkit=browser.webkit,gecko=browser.gecko,opera=browser.opera,utils=UE.utils={each:function(a,b,c){if(null!=a)if(a.length===+a.length){for(var d=0,e=a.length;d=c&&a===b)return d=e,!1}),d},removeItem:function(a,b){for(var c=0,d=a.length;c'](?:(amp|lt|quot|gt|#39|nbsp|#\d+);)?/g,function(a,b){return b?a:{"<":"<","&":"&",'"':""",">":">","'":"'"}[a]}):""},unhtmlForUrl:function(a,b){return a?a.replace(b||/[<">']/g,function(a){return{"<":"<","&":"&",'"':""",">":">","'":"'"}[a]}):""},html:function(a){return a?a.replace(/&((g|l|quo)t|amp|#39|nbsp);/g,function(a){return{"<":"<","&":"&",""":'"',">":">","'":"'"," ":" "}[a]}):""},cssStyleToDomStyle:function(){var a=document.createElement("div").style,b={"float":void 0!=a.cssFloat?"cssFloat":void 0!=a.styleFloat?"styleFloat":"float"};return function(a){return b[a]||(b[a]=a.toLowerCase().replace(/-./g,function(a){return a.charAt(1).toUpperCase()}))}}(),loadFile:function(){function a(a,c){try{for(var d,e=0;d=b[e++];)if(d.doc===a&&d.url==(c.src||c.href))return d}catch(f){return null}}var b=[];return function(c,d,e){var f=a(c,d);if(f)return void(f.ready?e&&e():f.funs.push(e));if(b.push({doc:c,url:d.src||d.href,funs:[e]}),!c.body){var g=[];for(var h in d)"tag"!=h&&g.push(h+'="'+d[h]+'"');return void c.write("<"+d.tag+" "+g.join(" ")+" >")}if(!d.id||!c.getElementById(d.id)){var i=c.createElement(d.tag);delete d.tag;for(var h in d)i.setAttribute(h,d[h]);i.onload=i.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){if(f=a(c,d),f.funs.length>0){f.ready=1;for(var b;b=f.funs.pop();)b()}i.onload=i.onreadystatechange=null}},i.onerror=function(){throw Error("The load "+(d.href||d.src)+" fails,check the url settings of file ueditor.config.js ")},c.getElementsByTagName("head")[0].appendChild(i)}}}(),isEmptyObject:function(a){if(null==a)return!0;if(this.isArray(a)||this.isString(a))return 0===a.length;for(var b in a)if(a.hasOwnProperty(b))return!1;return!0},fixColor:function(a,b){if(/color/i.test(a)&&/rgba?/.test(b)){var c=b.split(",");if(c.length>3)return"";b="#";for(var d,e=0;d=c[e++];)d=parseInt(d.replace(/[^\d]/gi,""),10).toString(16),b+=1==d.length?"0"+d:d;b=b.toUpperCase()}return b},optCss:function(a){function b(a,b){if(!a)return"";var c=a.top,d=a.bottom,e=a.left,f=a.right,g="";if(c&&e&&d&&f)g+=";"+b+":"+(c==d&&d==e&&e==f?c:c==d&&e==f?c+" "+e:e==f?c+" "+e+" "+d:c+" "+f+" "+d+" "+e)+";";else for(var h in a)g+=";"+b+"-"+h+":"+a[h]+";";return g}var c,d;return a=a.replace(/(padding|margin|border)\-([^:]+):([^;]+);?/gi,function(a,b,e,f){if(1==f.split(" ").length)switch(b){case"padding":return!c&&(c={}),c[e]=f,"";case"margin":return!d&&(d={}),d[e]=f,"";case"border":return"initial"==f?"":a}return a}),a+=b(c,"padding")+b(d,"margin"),a.replace(/^[ \n\r\t;]*|[ \n\r\t]*$/,"").replace(/;([ \n\r\t]+)|\1;/g,";").replace(/(&((l|g)t|quot|#39))?;{2,}/g,function(a,b){return b?b+";;":";"})},clone:function(a,b){var c;b=b||{};for(var d in a)a.hasOwnProperty(d)&&(c=a[d],"object"==typeof c?(b[d]=utils.isArray(c)?[]:{},utils.clone(a[d],b[d])):b[d]=c);return b},transUnitToPx:function(a){if(!/(pt|cm)/.test(a))return a;var b;switch(a.replace(/([\d.]+)(\w+)/,function(c,d,e){a=d,b=e}),b){case"cm":a=25*parseFloat(a);break;case"pt":a=Math.round(96*parseFloat(a)/72)}return a+(a?"px":"")},domReady:function(){function a(a){a.isReady=!0;for(var c;c=b.pop();c());}var b=[];return function(c,d){d=d||window;var e=d.document;c&&b.push(c),"complete"===e.readyState?a(e):(e.isReady&&a(e),browser.ie&&11!=browser.version?(!function(){if(!e.isReady){try{e.documentElement.doScroll("left")}catch(b){return void setTimeout(arguments.callee,0)}a(e)}}(),d.attachEvent("onload",function(){a(e)})):(e.addEventListener("DOMContentLoaded",function(){e.removeEventListener("DOMContentLoaded",arguments.callee,!1),a(e)},!1),d.addEventListener("load",function(){a(e)},!1)))}}(),cssRule:browser.ie&&11!=browser.version?function(a,b,c){var d,e;if(void 0===b||b&&b.nodeType&&9==b.nodeType){if(c=b&&b.nodeType&&9==b.nodeType?b:c||document,d=c.indexList||(c.indexList={}),e=d[a],void 0!==e)return c.styleSheets[e].cssText}else{if(c=c||document,d=c.indexList||(c.indexList={}),e=d[a],""===b)return void 0!==e&&(c.styleSheets[e].cssText="",delete d[a],!0);void 0!==e?sheetStyle=c.styleSheets[e]:(sheetStyle=c.createStyleSheet("",e=c.styleSheets.length),d[a]=e),sheetStyle.cssText=b}}:function(a,b,c){var d;return void 0===b||b&&b.nodeType&&9==b.nodeType?(c=b&&b.nodeType&&9==b.nodeType?b:c||document,d=c.getElementById(a),d?d.innerHTML:void 0):(c=c||document,d=c.getElementById(a),""===b?!!d&&(d.parentNode.removeChild(d),!0):void(d?d.innerHTML=b:(d=c.createElement("style"),d.id=a,d.innerHTML=b,c.getElementsByTagName("head")[0].appendChild(d))))},sort:function(a,b){b=b||function(a,b){return a.localeCompare(b)};for(var c=0,d=a.length;c0){var g=a[c];a[c]=a[e],a[e]=g}return a},serializeParam:function(a){var b=[];for(var c in a)if("method"!=c&&"timeout"!=c&&"async"!=c)if("function"!=(typeof a[c]).toLowerCase()&&"object"!=(typeof a[c]).toLowerCase())b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));else if(utils.isArray(a[c]))for(var d=0;d1||b!==a.parentNode){a.style.cssText=b.style.cssText+";"+a.style.cssText,b=b.parentNode;continue}b.style.cssText+=";"+a.style.cssText,"A"==b.tagName&&(b.style.textDecoration="underline")}if("A"!=b.tagName){b===a.parentNode&&domUtils.remove(a,!0);break}}b=b.parentNode}},mergeSibling:function(a,b,c){function d(a,b,c){var d;if((d=c[a])&&!domUtils.isBookmarkNode(d)&&1==d.nodeType&&domUtils.isSameElement(c,d)){for(;d.firstChild;)"firstChild"==b?c.insertBefore(d.lastChild,c.firstChild):c.appendChild(d.firstChild);domUtils.remove(d)}}!b&&d("previousSibling","firstChild",a),!c&&d("nextSibling","lastChild",a)},unSelectable:ie&&browser.ie9below||browser.opera?function(a){a.onselectstart=function(){return!1},a.onclick=a.onkeyup=a.onkeydown=function(){return!1},a.unselectable="on",a.setAttribute("unselectable","on");for(var b,c=0;b=a.all[c++];)switch(b.tagName.toLowerCase()){case"iframe":case"textarea":case"input":case"select":break;default:b.unselectable="on",a.setAttribute("unselectable","on")}}:function(a){a.style.MozUserSelect=a.style.webkitUserSelect=a.style.msUserSelect=a.style.KhtmlUserSelect="none"},removeAttributes:function(a,b){b=utils.isArray(b)?b:utils.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c,d=0;c=b[d++];){switch(c=attrFix[c]||c){case"className":a[c]="";break;case"style":a.style.cssText="";var e=a.getAttributeNode("style");!browser.ie&&e&&a.removeAttributeNode(e)}a.removeAttribute(c)}},createElement:function(a,b,c){return domUtils.setAttributes(a.createElement(b),c)},setAttributes:function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];switch(c){case"class":a.className=d;break;case"style":a.style.cssText=a.style.cssText+";"+d;break;case"innerHTML":a[c]=d;break;case"value":a.value=d;break;default:a.setAttribute(attrFix[c]||c,d)}}return a},getComputedStyle:function(a,b){var c="width height top left";if(c.indexOf(b)>-1)return a["offset"+b.replace(/^\w/,function(a){return a.toUpperCase()})]+"px";if(3==a.nodeType&&(a=a.parentNode),browser.ie&&browser.version<9&&"font-size"==b&&!a.style.fontSize&&!dtd.$empty[a.tagName]&&!dtd.$nonChild[a.tagName]){var d=a.ownerDocument.createElement("span");d.style.cssText="padding:0;border:0;font-family:simsun;",d.innerHTML=".",a.appendChild(d);var e=d.offsetHeight;return a.removeChild(d),d=null,e+"px"}try{var f=domUtils.getStyle(a,b)||(window.getComputedStyle?domUtils.getWindow(a).getComputedStyle(a,"").getPropertyValue(b):(a.currentStyle||a.style)[utils.cssStyleToDomStyle(b)])}catch(g){return""}return utils.transUnitToPx(utils.fixColor(b,f))},removeClasses:function(a,b){b=utils.isArray(b)?b:utils.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c,d=0,e=a.className;c=b[d++];)e=e.replace(new RegExp("\\b"+c+"\\b"),"");e=utils.trim(e).replace(/[ ]{2,}/g," "),e?a.className=e:domUtils.removeAttributes(a,["class"])},addClass:function(a,b){if(a){b=utils.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c,d=0,e=a.className;c=b[d++];)new RegExp("\\b"+c+"\\b").test(e)||(e+=" "+c);a.className=utils.trim(e)}},hasClass:function(a,b){if(utils.isRegExp(b))return b.test(a.className);b=utils.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c,d=0,e=a.className;c=b[d++];)if(!new RegExp("\\b"+c+"\\b","i").test(e))return!1;return d-1==b.length},preventDefault:function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},removeStyle:function(a,b){browser.ie?("color"==b&&(b="(^|;)"+b),a.style.cssText=a.style.cssText.replace(new RegExp(b+"[^:]*:[^;]+;?","ig"),"")):a.style.removeProperty?a.style.removeProperty(b):a.style.removeAttribute(utils.cssStyleToDomStyle(b)),a.style.cssText||domUtils.removeAttributes(a,["style"])},getStyle:function(a,b){var c=a.style[utils.cssStyleToDomStyle(b)];return utils.fixColor(b,c)},setStyle:function(a,b,c){a.style[utils.cssStyleToDomStyle(b)]=c,utils.trim(a.style.cssText)||this.removeAttributes(a,"style")},setStyles:function(a,b){for(var c in b)b.hasOwnProperty(c)&&domUtils.setStyle(a,c,b[c])},removeDirtyAttr:function(a){for(var b,c=0,d=a.getElementsByTagName("*");b=d[c++];)b.removeAttribute("_moz_dirty");a.removeAttribute("_moz_dirty")},getChildCount:function(a,b){var c=0,d=a.firstChild;for(b=b||function(){return 1};d;)b(d)&&c++,d=d.nextSibling;return c},isEmptyNode:function(a){return!a.firstChild||0==domUtils.getChildCount(a,function(a){return!domUtils.isBr(a)&&!domUtils.isBookmarkNode(a)&&!domUtils.isWhitespace(a)})},clearSelectedArr:function(a){for(var b;b=a.pop();)domUtils.removeAttributes(b,["class"])},scrollToView:function(a,b,c){var d=function(){var a=b.document,c="CSS1Compat"==a.compatMode;return{width:(c?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(c?a.documentElement.clientHeight:a.body.clientHeight)||0}},e=function(a){if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};var b=a.document;return{x:b.documentElement.scrollLeft||b.body.scrollLeft||0,y:b.documentElement.scrollTop||b.body.scrollTop||0}},f=d().height,g=f*-1+c;g+=a.offsetHeight||0;var h=domUtils.getXY(a);g+=h.y;var i=e(b).y;(g>i||g0)return 0;for(var c in dtd.$isNotEmpty)if(a.getElementsByTagName(c).length)return 0;return 1}},setViewportOffset:function(a,b){var c=0|parseInt(a.style.left),d=0|parseInt(a.style.top),e=a.getBoundingClientRect(),f=b.left-e.left,g=b.top-e.top;f&&(a.style.left=c+f+"px"),g&&(a.style.top=d+g+"px")},fillNode:function(a,b){var c=browser.ie?a.createTextNode(domUtils.fillChar):a.createElement("br");b.innerHTML="",b.appendChild(c)},moveChild:function(a,b,c){for(;a.firstChild;)c&&b.firstChild?b.insertBefore(a.lastChild,b.firstChild):b.appendChild(a.firstChild)},hasNoAttributes:function(a){return browser.ie?/^<\w+\s*?>/.test(a.outerHTML):0==a.attributes.length},isCustomeNode:function(a){return 1==a.nodeType&&a.getAttribute("_ue_custom_node_")},isTagNode:function(a,b){return 1==a.nodeType&&new RegExp("\\b"+a.tagName+"\\b","i").test(b)},filterNodeList:function(a,b,c){var d=[];if(!utils.isFunction(b)){var e=b;b=function(a){return utils.indexOf(utils.isArray(e)?e:e.split(" "),a.tagName.toLowerCase())!=-1}}return utils.each(a,function(a){b(a)&&d.push(a)}),0==d.length?null:1!=d.length&&c?d:d[0]},isInNodeEndBoundary:function(a,b){var c=a.startContainer;if(3==c.nodeType&&a.startOffset!=c.nodeValue.length)return 0;if(1==c.nodeType&&a.startOffset!=c.childNodes.length)return 0;for(;c!==b;){if(c.nextSibling)return 0;c=c.parentNode}return 1},isBoundaryNode:function(a,b){for(var c;!domUtils.isBody(a);)if(c=a,a=a.parentNode,c!==a[b])return!1;return!0},fillHtml:browser.ie11below?" ":"
    "},fillCharReg=new RegExp(domUtils.fillChar,"g");!function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer===a.endContainer&&a.startOffset==a.endOffset}function b(a){return!a.collapsed&&1==a.startContainer.nodeType&&a.startContainer===a.endContainer&&a.endOffset-a.startOffset==1}function c(b,c,d,e){return 1==c.nodeType&&(dtd.$empty[c.tagName]||dtd.$nonChild[c.tagName])&&(d=domUtils.getNodeIndex(c)+(b?0:1),c=c.parentNode),b?(e.startContainer=c,e.startOffset=d,e.endContainer||e.collapse(!0)):(e.endContainer=c,e.endOffset=d,e.startContainer||e.collapse(!1)),a(e),e}function d(a,b){var c,d,e=a.startContainer,f=a.endContainer,g=a.startOffset,h=a.endOffset,i=a.document,j=i.createDocumentFragment();if(1==e.nodeType&&(e=e.childNodes[g]||(c=e.appendChild(i.createTextNode("")))),1==f.nodeType&&(f=f.childNodes[h]||(d=f.appendChild(i.createTextNode("")))),e===f&&3==e.nodeType)return j.appendChild(i.createTextNode(e.substringData(g,h-g))),b&&(e.deleteData(g,h-g),a.collapse(!0)),j;for(var k,l,m=j,n=domUtils.findParents(e,!0),o=domUtils.findParents(f,!0),p=0;n[p]==o[p];)p++;for(var q,r=p;q=n[r];r++){for(k=q.nextSibling,q==e?c||(3==a.startContainer.nodeType?(m.appendChild(i.createTextNode(e.nodeValue.slice(g))),b&&e.deleteData(g,e.nodeValue.length-g)):m.appendChild(b?e:e.cloneNode(!0))):(l=q.cloneNode(!1),m.appendChild(l));k&&k!==f&&k!==o[r];)q=k.nextSibling,m.appendChild(b?k:k.cloneNode(!0)),k=q;m=l}m=j,n[p]||(m.appendChild(n[p-1].cloneNode(!1)),m=m.firstChild);for(var s,r=p;s=o[r];r++){if(k=s.previousSibling,s==f?d||3!=a.endContainer.nodeType||(m.appendChild(i.createTextNode(f.substringData(0,h))),b&&f.deleteData(0,h)):(l=s.cloneNode(!1),m.appendChild(l)),r!=p||!n[p])for(;k&&k!==e;)s=k.previousSibling,m.insertBefore(b?k:k.cloneNode(!0),m.firstChild),k=s;m=l}return b&&a.setStartBefore(o[p]?n[p]?o[p]:n[p-1]:o[p-1]).collapse(!0),c&&domUtils.remove(c),d&&domUtils.remove(d),j}function e(a,b){try{if(g&&domUtils.inDoc(g,a))if(g.nodeValue.replace(fillCharReg,"").length)g.nodeValue=g.nodeValue.replace(fillCharReg,"");else{var c=g.parentNode;for(domUtils.remove(g);c&&domUtils.isEmptyInlineElement(c)&&(browser.safari?!(domUtils.getPosition(c,b)&domUtils.POSITION_CONTAINS):!c.contains(b));)g=c.parentNode,domUtils.remove(c),c=g; -}}catch(d){}}function f(a,b){var c;for(a=a[b];a&&domUtils.isFillChar(a);)c=a[b],domUtils.remove(a),a=c}var g,h=0,i=domUtils.fillChar,j=dom.Range=function(a){var b=this;b.startContainer=b.startOffset=b.endContainer=b.endOffset=null,b.document=a,b.collapsed=!0};j.prototype={cloneContents:function(){return this.collapsed?null:d(this,0)},deleteContents:function(){var a;return this.collapsed||d(this,1),browser.webkit&&(a=this.startContainer,3!=a.nodeType||a.nodeValue.length||(this.setStartBefore(a).collapse(!0),domUtils.remove(a))),this},extractContents:function(){return this.collapsed?null:d(this,2)},setStart:function(a,b){return c(!0,a,b,this)},setEnd:function(a,b){return c(!1,a,b,this)},setStartAfter:function(a){return this.setStart(a.parentNode,domUtils.getNodeIndex(a)+1)},setStartBefore:function(a){return this.setStart(a.parentNode,domUtils.getNodeIndex(a))},setEndAfter:function(a){return this.setEnd(a.parentNode,domUtils.getNodeIndex(a)+1)},setEndBefore:function(a){return this.setEnd(a.parentNode,domUtils.getNodeIndex(a))},setStartAtFirst:function(a){return this.setStart(a,0)},setStartAtLast:function(a){return this.setStart(a,3==a.nodeType?a.nodeValue.length:a.childNodes.length)},setEndAtFirst:function(a){return this.setEnd(a,0)},setEndAtLast:function(a){return this.setEnd(a,3==a.nodeType?a.nodeValue.length:a.childNodes.length)},selectNode:function(a){return this.setStartBefore(a).setEndAfter(a)},selectNodeContents:function(a){return this.setStart(a,0).setEndAtLast(a)},cloneRange:function(){var a=this;return new j(a.document).setStart(a.startContainer,a.startOffset).setEnd(a.endContainer,a.endOffset)},collapse:function(a){var b=this;return a?(b.endContainer=b.startContainer,b.endOffset=b.startOffset):(b.startContainer=b.endContainer,b.startOffset=b.endOffset),b.collapsed=!0,b},shrinkBoundary:function(a){function b(a){return 1==a.nodeType&&!domUtils.isBookmarkNode(a)&&!dtd.$empty[a.tagName]&&!dtd.$nonChild[a.tagName]}for(var c,d=this,e=d.collapsed;1==d.startContainer.nodeType&&(c=d.startContainer.childNodes[d.startOffset])&&b(c);)d.setStart(c,0);if(e)return d.collapse(!0);if(!a)for(;1==d.endContainer.nodeType&&d.endOffset>0&&(c=d.endContainer.childNodes[d.endOffset-1])&&b(c);)d.setEnd(c,c.childNodes.length);return d},getCommonAncestor:function(a,c){var d=this,e=d.startContainer,f=d.endContainer;return e===f?a&&b(this)&&(e=e.childNodes[d.startOffset],1==e.nodeType)?e:c&&3==e.nodeType?e.parentNode:e:domUtils.getCommonAncestor(e,f)},trimBoundary:function(a){this.txtToElmBoundary();var b=this.startContainer,c=this.startOffset,d=this.collapsed,e=this.endContainer;if(3==b.nodeType){if(0==c)this.setStartBefore(b);else if(c>=b.nodeValue.length)this.setStartAfter(b);else{var f=domUtils.split(b,c);b===e?this.setEnd(f,this.endOffset-c):b.parentNode===e&&(this.endOffset+=1),this.setStartBefore(f)}if(d)return this.collapse(!0)}return a||(c=this.endOffset,e=this.endContainer,3==e.nodeType&&(0==c?this.setEndBefore(e):(c=c.nodeValue.length&&a["set"+b.replace(/(\w)/,function(a){return a.toUpperCase()})+"After"](c):a["set"+b.replace(/(\w)/,function(a){return a.toUpperCase()})+"Before"](c))}return!a&&this.collapsed||(b(this,"start"),b(this,"end")),this},insertNode:function(a){var b=a,c=1;11==a.nodeType&&(b=a.firstChild,c=a.childNodes.length),this.trimBoundary(!0);var d=this.startContainer,e=this.startOffset,f=d.childNodes[e];return f?d.insertBefore(a,f):d.appendChild(a),b.parentNode===this.endContainer&&(this.endOffset=this.endOffset+c),this.setStartBefore(b)},setCursor:function(a,b){return this.collapse(!a).select(b)},createBookmark:function(a,b){var c,d=this.document.createElement("span");return d.style.cssText="display:none;line-height:0px;",d.appendChild(this.document.createTextNode("‍")),d.id="_baidu_bookmark_start_"+(b?"":h++),this.collapsed||(c=d.cloneNode(!0),c.id="_baidu_bookmark_end_"+(b?"":h++)),this.insertNode(d),c&&this.collapse().insertNode(c).setEndBefore(c),this.setStartAfter(d),{start:a?d.id:d,end:c?a?c.id:c:null,id:a}},moveToBookmark:function(a){var b=a.id?this.document.getElementById(a.start):a.start,c=a.end&&a.id?this.document.getElementById(a.end):a.end;return this.setStartBefore(b),domUtils.remove(b),c?(this.setEndBefore(c),domUtils.remove(c)):this.collapse(!0),this},enlarge:function(a,b){var c,d,e=domUtils.isBody,f=this.document.createTextNode("");if(a){for(d=this.startContainer,1==d.nodeType?d.childNodes[this.startOffset]?c=d=d.childNodes[this.startOffset]:(d.appendChild(f),c=d=f):c=d;;){if(domUtils.isBlockElm(d)){for(d=c;(c=d.previousSibling)&&!domUtils.isBlockElm(c);)d=c;this.setStartBefore(d);break}c=d,d=d.parentNode}for(d=this.endContainer,1==d.nodeType?((c=d.childNodes[this.endOffset])?d.insertBefore(f,c):d.appendChild(f),c=d=f):c=d;;){if(domUtils.isBlockElm(d)){for(d=c;(c=d.nextSibling)&&!domUtils.isBlockElm(c);)d=c;this.setEndAfter(d);break}c=d,d=d.parentNode}f.parentNode===this.endContainer&&this.endOffset--,domUtils.remove(f)}if(!this.collapsed){for(;!(0!=this.startOffset||b&&b(this.startContainer)||e(this.startContainer));)this.setStartBefore(this.startContainer);for(;!(this.endOffset!=(1==this.endContainer.nodeType?this.endContainer.childNodes.length:this.endContainer.nodeValue.length)||b&&b(this.endContainer)||e(this.endContainer));)this.setEndAfter(this.endContainer)}return this},enlargeToBlockElm:function(a){for(;!domUtils.isBlockElm(this.startContainer);)this.setStartBefore(this.startContainer);if(!a)for(;!domUtils.isBlockElm(this.endContainer);)this.setEndAfter(this.endContainer);return this},adjustmentBoundary:function(){if(!this.collapsed){for(;!domUtils.isBody(this.startContainer)&&this.startOffset==this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length&&this.startContainer[3==this.startContainer.nodeType?"nodeValue":"childNodes"].length;)this.setStartAfter(this.startContainer);for(;!domUtils.isBody(this.endContainer)&&!this.endOffset&&this.endContainer[3==this.endContainer.nodeType?"nodeValue":"childNodes"].length;)this.setEndBefore(this.endContainer)}return this},applyInlineStyle:function(a,b,c){if(this.collapsed)return this;this.trimBoundary().enlarge(!1,function(a){return 1==a.nodeType&&domUtils.isBlockElm(a)}).adjustmentBoundary();for(var d,e,f=this.createBookmark(),g=f.end,h=function(a){return 1==a.nodeType?"br"!=a.tagName.toLowerCase():!domUtils.isWhitespace(a)},i=domUtils.getNextDomNode(f.start,!1,h),j=this.cloneRange();i&&domUtils.getPosition(i,g)&domUtils.POSITION_PRECEDING;)if(3==i.nodeType||dtd[a][i.tagName]){for(j.setStartBefore(i),d=i;d&&(3==d.nodeType||dtd[a][d.tagName])&&d!==g;)e=d,d=domUtils.getNextDomNode(d,1==d.nodeType,null,function(b){return dtd[a][b.tagName]});var k,l=j.setEndAfter(e).extractContents();if(c&&c.length>0){var m,n;n=m=c[0].cloneNode(!1);for(var o,p=1;o=c[p++];)m.appendChild(o.cloneNode(!1)),m=m.firstChild;k=m}else k=j.document.createElement(a);b&&domUtils.setAttributes(k,b),k.appendChild(l),j.insertNode(c?n:k);var q;if("span"==a&&b.style&&/text\-decoration/.test(b.style)&&(q=domUtils.findParentByTagName(k,"a",!0))?(domUtils.setAttributes(q,b),domUtils.remove(k,!0),k=q):(domUtils.mergeSibling(k),domUtils.clearEmptySibling(k)),domUtils.mergeChild(k,b),i=domUtils.getNextDomNode(k,!1,h),domUtils.mergeToParent(k),d===g)break}else i=domUtils.getNextDomNode(i,!0,h);return this.moveToBookmark(f)},removeInlineStyle:function(a){if(this.collapsed)return this;a=utils.isArray(a)?a:[a],this.shrinkBoundary().adjustmentBoundary();for(var b=this.startContainer,c=this.endContainer;;){if(1==b.nodeType){if(utils.indexOf(a,b.tagName.toLowerCase())>-1)break;if("body"==b.tagName.toLowerCase()){b=null;break}}b=b.parentNode}for(;;){if(1==c.nodeType){if(utils.indexOf(a,c.tagName.toLowerCase())>-1)break;if("body"==c.tagName.toLowerCase()){c=null;break}}c=c.parentNode}var d,e,f=this.createBookmark();b&&(e=this.cloneRange().setEndBefore(f.start).setStartBefore(b),d=e.extractContents(),e.insertNode(d),domUtils.clearEmptySibling(b,!0),b.parentNode.insertBefore(f.start,b)),c&&(e=this.cloneRange().setStartAfter(f.end).setEndAfter(c),d=e.extractContents(),e.insertNode(d),domUtils.clearEmptySibling(c,!1,!0),c.parentNode.insertBefore(f.end,c.nextSibling));for(var g,h=domUtils.getNextDomNode(f.start,!1,function(a){return 1==a.nodeType});h&&h!==f.end;)g=domUtils.getNextDomNode(h,!0,function(a){return 1==a.nodeType}),utils.indexOf(a,h.tagName.toLowerCase())>-1&&domUtils.remove(h,!0),h=g;return this.moveToBookmark(f)},getClosedNode:function(){var a;if(!this.collapsed){var c=this.cloneRange().adjustmentBoundary().shrinkBoundary();if(b(c)){var d=c.startContainer.childNodes[c.startOffset];d&&1==d.nodeType&&(dtd.$empty[d.tagName]||dtd.$nonChild[d.tagName])&&(a=d)}}return a},select:browser.ie?function(a,b){var c;this.collapsed||this.shrinkBoundary();var d=this.getClosedNode();if(d&&!b){try{c=this.document.body.createControlRange(),c.addElement(d),c.select()}catch(h){}return this}var j,k=this.createBookmark(),l=k.start;if(c=this.document.body.createTextRange(),c.moveToElementText(l),c.moveStart("character",1),this.collapsed){if(!a&&3!=this.startContainer.nodeType){var m=this.document.createTextNode(i),n=this.document.createElement("span");n.appendChild(this.document.createTextNode(i)),l.parentNode.insertBefore(n,l),l.parentNode.insertBefore(m,l),e(this.document,m),g=m,f(n,"previousSibling"),f(l,"nextSibling"),c.moveStart("character",-1),c.collapse(!0)}}else{var o=this.document.body.createTextRange();j=k.end,o.moveToElementText(j),c.setEndPoint("EndToEnd",o)}this.moveToBookmark(k),n&&domUtils.remove(n);try{c.select()}catch(h){}return this}:function(a){function b(a){function b(b,c,d){3==b.nodeType&&b.nodeValue.length0)j=k-1;else{if(!(l<0))return{container:d,offset:c(e)};i=k+1}}if(k==-1){if(h.moveToElementText(d),h.setEndPoint("StartToStart",a),f=h.text.replace(/(\r\n|\r)/g,"\n").length,g=d.childNodes,!f)return e=g[g.length-1],{container:e,offset:e.nodeValue.length};for(var m=g.length;f>0;)f-=g[--m].nodeValue.length;return{container:g[m],offset:-f}}if(h.collapse(l>0),h.setEndPoint(l>0?"StartToStart":"EndToStart",a),f=h.text.replace(/(\r\n|\r)/g,"\n").length,!f)return dtd.$empty[e.tagName]||dtd.$nonChild[e.tagName]?{container:d,offset:c(e)+(l>0?0:1)}:{container:e,offset:l>0?0:e.childNodes.length};for(;f>0;)try{var n=e;e=e[l>0?"previousSibling":"nextSibling"],f-=e.nodeValue.length}catch(o){return{container:d,offset:c(n)}}return{container:e,offset:l>0?-f:e.nodeValue.length+f}}function b(b,c){if(b.item)c.selectNode(b.item(0));else{var d=a(b,!0);c.setStart(d.container,d.offset),0!=b.compareEndPoints("StartToEnd",b)&&(d=a(b,!1),c.setEnd(d.container,d.offset))}return c}function c(a){var b;try{b=a.getNative().createRange()}catch(c){return null}var d=b.item?b.item(0):b.parentElement();return(d.ownerDocument||d)===a.document?b:null}var d=dom.Selection=function(a){var b,d=this;d.document=a,browser.ie9below&&(b=domUtils.getWindow(a).frameElement,domUtils.on(b,"beforedeactivate",function(){d._bakIERange=d.getIERange()}),domUtils.on(b,"activate",function(){try{!c(d)&&d._bakIERange&&d._bakIERange.select()}catch(a){}d._bakIERange=null})),b=a=null};d.prototype={rangeInBody:function(a,b){var c=browser.ie9below||b?a.item?a.item():a.parentElement():a.startContainer;return c===this.document.body||domUtils.inDoc(c,this.document)},getNative:function(){var a=this.document;try{return a?browser.ie9below?a.selection:domUtils.getWindow(a).getSelection():null}catch(b){return null}},getIERange:function(){var a=c(this);return!a&&this._bakIERange?this._bakIERange:a},cache:function(){this.clear(),this._cachedRange=this.getRange(),this._cachedStartElement=this.getStart(),this._cachedStartElementPath=this.getStartElementPath()},getStartElementPath:function(){if(this._cachedStartElementPath)return this._cachedStartElementPath;var a=this.getStart();return a?domUtils.findParents(a,!0,null,!0):[]},clear:function(){this._cachedStartElementPath=this._cachedRange=this._cachedStartElement=null},isFocus:function(){try{if(browser.ie9below){var a=c(this);return!(!a||!this.rangeInBody(a))}return!!this.getNative().rangeCount}catch(b){return!1}},getRange:function(){function a(a){for(var b=c.document.body.firstChild,d=a.collapsed;b&&b.firstChild;)a.setStart(b,0),b=b.firstChild;a.startContainer||a.setStart(c.document.body,0),d&&a.collapse(!0)}var c=this;if(null!=c._cachedRange)return this._cachedRange;var d=new baidu.editor.dom.Range(c.document);if(browser.ie9below){var e=c.getIERange();if(e)try{b(e,d)}catch(f){a(d)}else a(d)}else{var g=c.getNative();if(g&&g.rangeCount){var h=g.getRangeAt(0),i=g.getRangeAt(g.rangeCount-1);d.setStart(h.startContainer,h.startOffset).setEnd(i.endContainer,i.endOffset),d.collapsed&&domUtils.isBody(d.startContainer)&&!d.startOffset&&a(d)}else{if(this._bakRange&&domUtils.inDoc(this._bakRange.startContainer,this.document))return this._bakRange;a(d)}}return this._bakRange=d},getStart:function(){if(this._cachedStartElement)return this._cachedStartElement;var a,b,c,d,e=browser.ie9below?this.getIERange():this.getRange();if(browser.ie9below){if(!e)return this.document.body.firstChild;if(e.item)return e.item(0);for(a=e.duplicate(),a.text.length>0&&a.moveStart("character",1),a.collapse(1),b=a.parentElement(),d=c=e.parentElement();c=c.parentNode;)if(c==b){b=d;break}}else if(e.shrinkBoundary(),b=e.startContainer,1==b.nodeType&&b.hasChildNodes()&&(b=b.childNodes[Math.min(b.childNodes.length-1,e.startOffset)]),3==b.nodeType)return b.parentNode;return b},getText:function(){var a,b;return this.isFocus()&&(a=this.getNative())?(b=browser.ie9below?a.createRange():a.getRangeAt(0),browser.ie9below?b.text:b.toString()):""},clearRange:function(){this.getNative()[browser.ie9below?"empty":"removeAllRanges"]()}}}(),function(){function a(a,b){var c;if(b.textarea)if(utils.isString(b.textarea)){for(var d,e=0,f=domUtils.getElementsByTagName(a,"textarea");d=f[e++];)if(d.id=="ueditor_textarea_"+b.options.textarea){c=d;break}}else c=b.textarea;c||(a.appendChild(c=domUtils.createElement(document,"textarea",{name:b.options.textarea,id:"ueditor_textarea_"+b.options.textarea,style:"display:none"})),b.textarea=c),!c.getAttribute("name")&&c.setAttribute("name",b.options.textarea),c.value=b.hasContents()?b.options.allHtmlEnabled?b.getAllHtml():b.getContent(null,null,!0):""}function b(a){for(var b in a)return b}function c(a){a.langIsReady=!0,a.fireEvent("langReady")}var d,e=0,f=UE.Editor=function(a){var d=this;d.uid=e++,EventBase.call(d),d.commands={},d.options=utils.extend(utils.clone(a||{}),UEDITOR_CONFIG,!0),d.shortcutkeys={},d.inputRules=[],d.outputRules=[],d.setOpt(f.defaultOptions(d)),d.loadServerConfig(),utils.isEmptyObject(UE.I18N)?utils.loadFile(document,{src:d.options.langPath+d.options.lang+"/"+d.options.lang+".js",tag:"script",type:"text/javascript",defer:"defer"},function(){UE.plugin.load(d),c(d)}):(d.options.lang=b(UE.I18N),UE.plugin.load(d),c(d)),UE.instants["ueditorInstant"+d.uid]=d};f.prototype={registerCommand:function(a,b){this.commands[a]=b},ready:function(a){var b=this;a&&(b.isReady?a.apply(b):b.addListener("ready",a))},setOpt:function(a,b){var c={};utils.isString(a)?c[a]=b:c=a,utils.extend(this.options,c,!0)},getOpt:function(a){return this.options[a]},destroy:function(){var a=this;a.fireEvent("destroy");var b=a.container.parentNode,c=a.textarea;c?c.style.display="":(c=document.createElement("textarea"),b.parentNode.insertBefore(c,b)),c.style.width=a.iframe.offsetWidth+"px",c.style.height=a.iframe.offsetHeight+"px",c.value=a.getContent(),c.id=a.key,b.innerHTML="",domUtils.remove(b);var d=a.key;for(var e in a)a.hasOwnProperty(e)&&delete this[e];UE.delEditor(d)},render:function(a){var b=this,c=b.options,d=function(b){return parseInt(domUtils.getComputedStyle(a,b))};if(utils.isString(a)&&(a=document.getElementById(a)),a){c.initialFrameWidth?c.minFrameWidth=c.initialFrameWidth:c.minFrameWidth=c.initialFrameWidth=a.offsetWidth,c.initialFrameHeight?c.minFrameHeight=c.initialFrameHeight:c.initialFrameHeight=c.minFrameHeight=a.offsetHeight,a.style.width=/%$/.test(c.initialFrameWidth)?"100%":c.initialFrameWidth-d("padding-left")-d("padding-right")+"px",a.style.height=/%$/.test(c.initialFrameHeight)?"100%":c.initialFrameHeight-d("padding-top")-d("padding-bottom")+"px",a.style.zIndex=c.zIndex;var e=(ie&&browser.version<9?"":"")+""+(c.iframeCssUrl?"":"")+(c.initialStyle?"":"")+"";a.appendChild(domUtils.createElement(document,"iframe",{id:"ueditor_"+b.uid,width:"100%",height:"100%",frameborder:"0",src:"javascript:void(function(){document.open();"+(c.customDomain&&document.domain!=location.hostname?'document.domain="'+document.domain+'";':"")+'document.write("'+e+'");document.close();}())'})),a.style.overflow="hidden",setTimeout(function(){/%$/.test(c.initialFrameWidth)&&(c.minFrameWidth=c.initialFrameWidth=a.offsetWidth),/%$/.test(c.initialFrameHeight)&&(c.minFrameHeight=c.initialFrameHeight=a.offsetHeight,a.style.height=c.initialFrameHeight+"px")})}},_setup:function(b){var c=this,d=c.options;ie?(b.body.disabled=!0,b.body.contentEditable=!0,b.body.disabled=!1):b.body.contentEditable=!0,b.body.spellcheck=!1,c.document=b,c.window=b.defaultView||b.parentWindow,c.iframe=c.window.frameElement,c.body=b.body,c.selection=new dom.Selection(b);var e;browser.gecko&&(e=this.selection.getNative())&&e.removeAllRanges(),this._initEvents();for(var f=this.iframe.parentNode;!domUtils.isBody(f);f=f.parentNode)if("FORM"==f.tagName){c.form=f,c.options.autoSyncData?domUtils.on(c.window,"blur",function(){a(f,c)}):domUtils.on(f,"submit",function(){a(this,c)});break}if(d.initialContent)if(d.autoClearinitialContent){var g=c.execCommand;c.execCommand=function(){return c.fireEvent("firstBeforeExecCommand"),g.apply(c,arguments)},this._setDefaultContent(d.initialContent)}else this.setContent(d.initialContent,!1,!0);domUtils.isEmptyNode(c.body)&&(c.body.innerHTML="

    "+(browser.ie?"":"
    ")+"

    "),d.focus&&setTimeout(function(){c.focus(c.options.focusInEnd),!c.options.autoClearinitialContent&&c._selectionChange()},0),c.container||(c.container=this.iframe.parentNode),d.fullscreen&&c.ui&&c.ui.setFullScreen(!0);try{c.document.execCommand("2D-position",!1,!1)}catch(h){}try{c.document.execCommand("enableInlineTableEditing",!1,!1)}catch(h){}try{c.document.execCommand("enableObjectResizing",!1,!1)}catch(h){}c._bindshortcutKeys(),c.isReady=1,c.fireEvent("ready"),d.onready&&d.onready.call(c),browser.ie9below||domUtils.on(c.window,["blur","focus"],function(a){if("blur"==a.type){c._bakRange=c.selection.getRange();try{c._bakNativeRange=c.selection.getNative().getRangeAt(0),c.selection.getNative().removeAllRanges()}catch(a){c._bakNativeRange=null}}else try{c._bakRange&&c._bakRange.select()}catch(a){}}),browser.gecko&&browser.version<=10902&&(c.body.contentEditable=!1,setTimeout(function(){c.body.contentEditable=!0},100),setInterval(function(){c.body.style.height=c.iframe.offsetHeight-20+"px"},100)),!d.isShow&&c.setHide(),d.readonly&&c.setDisabled()},sync:function(b){var c=this,d=b?document.getElementById(b):domUtils.findParent(c.iframe.parentNode,function(a){return"FORM"==a.tagName},!0);d&&a(d,c)},setHeight:function(a,b){a!==parseInt(this.iframe.parentNode.style.height)&&(this.iframe.parentNode.style.height=a+"px"),!b&&(this.options.minFrameHeight=this.options.initialFrameHeight=a),this.body.style.height=a+"px",!b&&this.trigger("setHeight")},addshortcutkey:function(a,b){var c={};b?c[a]=b:c=a,utils.extend(this.shortcutkeys,c)},_bindshortcutKeys:function(){var a=this,b=this.shortcutkeys;a.addListener("keydown",function(c,d){var e=d.keyCode||d.which;for(var f in b)for(var g,h=b[f].split(","),i=0;g=h[i++];){g=g.split(":");var j=g[0],k=g[1];(/^(ctrl)(\+shift)?\+(\d+)$/.test(j.toLowerCase())||/^(\d+)$/.test(j))&&(("ctrl"==RegExp.$1?d.ctrlKey||d.metaKey:0)&&(""!=RegExp.$2?d[RegExp.$2.slice(1)+"Key"]:1)&&e==RegExp.$3||e==RegExp.$1)&&(a.queryCommandState(f,k)!=-1&&a.execCommand(f,k),domUtils.preventDefault(d))}})},getContent:function(a,b,c,d,e){var f=this;if(a&&utils.isFunction(a)&&(b=a,a=""),b?!b():!this.hasContents())return"";f.fireEvent("beforegetcontent");var g=UE.htmlparser(f.body.innerHTML,d);return f.filterOutputRule(g),f.fireEvent("aftergetcontent",a,g),g.toHtml(e)},getAllHtml:function(){var a=this,b=[];if(a.fireEvent("getAllHtml",b),browser.ie&&browser.version>8){var c="";utils.each(a.document.styleSheets,function(a){c+=a.href?'':""}),utils.each(a.document.getElementsByTagName("script"),function(a){c+=a.outerHTML})}return""+(a.options.charset?'':"")+(c||a.document.getElementsByTagName("head")[0].innerHTML)+b.join("\n")+""+a.getContent(null,null,!0)+""},getPlainTxt:function(){var a=new RegExp(domUtils.fillChar,"g"),b=this.body.innerHTML.replace(/[\n\r]/g,"");return b=b.replace(/<(p|div)[^>]*>(| )<\/\1>/gi,"\n").replace(//gi,"\n").replace(/<[^>\/]+>/g,"").replace(/(\n)?<\/([^>]+)>/g,function(a,b,c){return dtd.$block[c]?"\n":b?b:""}),b.replace(a,"").replace(/\u00a0/g," ").replace(/ /g," ")},getContentTxt:function(){var a=new RegExp(domUtils.fillChar,"g");return this.body[browser.ie?"innerText":"textContent"].replace(a,"").replace(/\u00a0/g," ")},setContent:function(b,c,d){function e(a){return"DIV"==a.tagName&&a.getAttribute("cdata_tag")}var f=this;f.fireEvent("beforesetcontent",b);var g=UE.htmlparser(b);if(f.filterInputRule(g),b=g.toHtml(),f.body.innerHTML=(c?f.body.innerHTML:"")+b,"p"==f.options.enterTag){var h,i=this.body.firstChild;if(!i||1==i.nodeType&&(dtd.$cdata[i.tagName]||e(i)||domUtils.isCustomeNode(i))&&i===this.body.lastChild)this.body.innerHTML="

    "+(browser.ie?" ":"
    ")+"

    "+this.body.innerHTML;else for(var j=f.document.createElement("p");i;){for(;i&&(3==i.nodeType||1==i.nodeType&&dtd.p[i.tagName]&&!dtd.$cdata[i.tagName]);)h=i.nextSibling,j.appendChild(i),i=h;if(j.firstChild){if(!i){f.body.appendChild(j);break}i.parentNode.insertBefore(j,i),j=f.document.createElement("p")}i=i.nextSibling}}f.fireEvent("aftersetcontent"),f.fireEvent("contentchange"),!d&&f._selectionChange(),f._bakRange=f._bakIERange=f._bakNativeRange=null;var k;browser.gecko&&(k=this.selection.getNative())&&k.removeAllRanges(),f.options.autoSyncData&&f.form&&a(f.form,f)},focus:function(a){try{var b=this,c=b.selection.getRange();if(a){var d=b.body.lastChild;d&&1==d.nodeType&&!dtd.$empty[d.tagName]&&(domUtils.isEmptyBlock(d)?c.setStartAtFirst(d):c.setStartAtLast(d),c.collapse(!0)),c.setCursor(!0)}else{if(!c.collapsed&&domUtils.isBody(c.startContainer)&&0==c.startOffset){var d=b.body.firstChild;d&&1==d.nodeType&&!dtd.$empty[d.tagName]&&c.setStartAtFirst(d).collapse(!0)}c.select(!0)}this.fireEvent("focus selectionchange")}catch(e){}},isFocus:function(){return this.selection.isFocus()},blur:function(){var a=this.selection.getNative();if(a.empty&&browser.ie){var b=document.body.createTextRange();b.moveToElementText(document.body),b.collapse(!0),b.select(),a.empty()}else a.removeAllRanges()},_initEvents:function(){var a=this,b=a.document,c=a.window;a._proxyDomEvent=utils.bind(a._proxyDomEvent,a),domUtils.on(b,["click","contextmenu","mousedown","keydown","keyup","keypress","mouseup","mouseover","mouseout","selectstart"],a._proxyDomEvent),domUtils.on(c,["focus","blur"],a._proxyDomEvent),domUtils.on(a.body,"drop",function(b){browser.gecko&&b.stopPropagation&&b.stopPropagation(),a.fireEvent("contentchange")}),domUtils.on(b,["mouseup","keydown"],function(b){"keydown"==b.type&&(b.ctrlKey||b.metaKey||b.shiftKey||b.altKey)||2!=b.button&&a._selectionChange(250,b)})},_proxyDomEvent:function(a){return this.fireEvent("before"+a.type.replace(/^on/,"").toLowerCase())!==!1&&(this.fireEvent(a.type.replace(/^on/,""),a)!==!1&&this.fireEvent("after"+a.type.replace(/^on/,"").toLowerCase()))},_selectionChange:function(a,b){var c,e,f=this,g=!1;if(browser.ie&&browser.version<9&&b&&"mouseup"==b.type){var h=this.selection.getRange();h.collapsed||(g=!0,c=b.clientX,e=b.clientY)}clearTimeout(d),d=setTimeout(function(){if(f.selection&&f.selection.getNative()){var a;if(g&&"None"==f.selection.getNative().type){a=f.document.body.createTextRange();try{a.moveToPoint(c,e)}catch(d){a=null}}var h;a&&(h=f.selection.getIERange,f.selection.getIERange=function(){return a}),f.selection.cache(),h&&(f.selection.getIERange=h),f.selection._cachedRange&&f.selection._cachedStartElement&&(f.fireEvent("beforeselectionchange"),f.fireEvent("selectionchange",!!b),f.fireEvent("afterselectionchange"),f.selection.clear())}},a||50)},_callCmdFn:function(a,b){var c,d,e=b[0].toLowerCase();return c=this.commands[e]||UE.commands[e],d=c&&c[a],c&&d||"queryCommandState"!=a?d?d.apply(this,b):void 0:0},execCommand:function(a){a=a.toLowerCase();var b,c=this,d=c.commands[a]||UE.commands[a];return d&&d.execCommand?(d.notNeedUndo||c.__hasEnterExecCommand?(b=this._callCmdFn("execCommand",arguments),!c.__hasEnterExecCommand&&!d.ignoreContentChange&&!c._ignoreContentChange&&c.fireEvent("contentchange")):(c.__hasEnterExecCommand=!0,c.queryCommandState.apply(c,arguments)!=-1&&(c.fireEvent("saveScene"),c.fireEvent.apply(c,["beforeexeccommand",a].concat(arguments)),b=this._callCmdFn("execCommand",arguments),c.fireEvent.apply(c,["afterexeccommand",a].concat(arguments)),c.fireEvent("saveScene")),c.__hasEnterExecCommand=!1),!c.__hasEnterExecCommand&&!d.ignoreContentChange&&!c._ignoreContentChange&&c._selectionChange(),b):null},queryCommandState:function(a){return this._callCmdFn("queryCommandState",arguments)},queryCommandValue:function(a){return this._callCmdFn("queryCommandValue",arguments)},hasContents:function(a){if(a)for(var b,c=0;b=a[c++];)if(this.document.getElementsByTagName(b).length>0)return!0;if(!domUtils.isEmptyBlock(this.body))return!0;for(a=["div"],c=0;b=a[c++];)for(var d,e=domUtils.getElementsByTagName(this.document,b),f=0;d=e[f++];)if(domUtils.isCustomeNode(d))return!0;return!1},reset:function(){this.fireEvent("reset")},setEnabled:function(){var a,b=this;if("false"==b.body.contentEditable){b.body.contentEditable=!0,a=b.selection.getRange();try{a.moveToBookmark(b.lastBk),delete b.lastBk}catch(c){a.setStartAtFirst(b.body).collapse(!0)}a.select(!0),b.bkqueryCommandState&&(b.queryCommandState=b.bkqueryCommandState,delete b.bkqueryCommandState),b.bkqueryCommandValue&&(b.queryCommandValue=b.bkqueryCommandValue,delete b.bkqueryCommandValue),b.fireEvent("selectionchange")}},enable:function(){return this.setEnabled()},setDisabled:function(a){var b=this;a=a?utils.isArray(a)?a:[a]:[],"true"==b.body.contentEditable&&(b.lastBk||(b.lastBk=b.selection.getRange().createBookmark(!0)),b.body.contentEditable=!1,b.bkqueryCommandState=b.queryCommandState,b.bkqueryCommandValue=b.queryCommandValue,b.queryCommandState=function(c){return utils.indexOf(a,c)!=-1?b.bkqueryCommandState.apply(b,arguments):-1},b.queryCommandValue=function(c){return utils.indexOf(a,c)!=-1?b.bkqueryCommandValue.apply(b,arguments):null},b.fireEvent("selectionchange"))},disable:function(a){return this.setDisabled(a)},_setDefaultContent:function(){function a(){var b=this;b.document.getElementById("initContent")&&(b.body.innerHTML="

    "+(ie?"":"
    ")+"

    ",b.removeListener("firstBeforeExecCommand focus",a),setTimeout(function(){b.focus(),b._selectionChange()},0))}return function(b){var c=this;c.body.innerHTML='

    '+b+"

    ",c.addListener("firstBeforeExecCommand focus",a)}}(),setShow:function(){var a=this,b=a.selection.getRange();if("none"==a.container.style.display){try{b.moveToBookmark(a.lastBk),delete a.lastBk}catch(c){b.setStartAtFirst(a.body).collapse(!0)}setTimeout(function(){b.select(!0)},100),a.container.style.display=""}},show:function(){return this.setShow(); -},setHide:function(){var a=this;a.lastBk||(a.lastBk=a.selection.getRange().createBookmark(!0)),a.container.style.display="none"},hide:function(){return this.setHide()},getLang:function(a){if(!this.options)return"";var b=UE.I18N[this.options.lang];if(!b)throw Error("not import language file");a=(a||"").split(".");for(var c,d=0;(c=a[d++])&&(b=b[c],b););return b},getContentLength:function(a,b){var c=this.getContent(!1,!1,!0).length;if(a){b=(b||[]).concat(["hr","img","iframe"]),c=this.getContentTxt().replace(/[\t\r\n]+/g,"").length;for(var d,e=0;d=b[e++];)c+=this.document.getElementsByTagName(d).length}return c},addInputRule:function(a){this.inputRules.push(a)},filterInputRule:function(a){for(var b,c=0;b=this.inputRules[c++];)b.call(this,a)},addOutputRule:function(a){this.outputRules.push(a)},filterOutputRule:function(a){for(var b,c=0;b=this.outputRules[c++];)b.call(this,a)},getActionUrl:function(a){var b=this.getOpt(a)||a,c=this.getOpt("imageUrl"),d=this.getOpt("serverUrl");return!d&&c&&(d=c.replace(/^(.*[\/]).+([\.].+)$/,"$1controller$2")),d?(d=d+(d.indexOf("?")==-1?"?":"&")+"action="+(b||""),utils.formatUrl(d)):""}},utils.inherits(f,EventBase)}(),UE.Editor.defaultOptions=function(a){var b=a.options.UEDITOR_HOME_URL;return{isShow:!0,initialContent:"",initialStyle:"",autoClearinitialContent:!1,iframeCssUrl:b+"themes/iframe.css",textarea:"editorValue",focus:!1,focusInEnd:!0,autoClearEmptyNode:!0,fullscreen:!1,readonly:!1,zIndex:999,imagePopup:!0,enterTag:"p",customDomain:!1,lang:"zh-cn",langPath:b+"lang/",theme:"default",themePath:b+"themes/",allHtmlEnabled:!1,scaleEnabled:!1,tableNativeEditInFF:!1,autoSyncData:!0,fileNameFormat:"{time}{rand:6}"}},function(){UE.Editor.prototype.loadServerConfig=function(){function showErrorMsg(a){console&&console.error(a)}var me=this;setTimeout(function(){try{me.options.imageUrl&&me.setOpt("serverUrl",me.options.imageUrl.replace(/^(.*[\/]).+([\.].+)$/,"$1controller$2"));var configUrl=me.getActionUrl("config"),isJsonp=utils.isCrossDomainUrl(configUrl);me._serverConfigLoaded=!1,configUrl&&UE.ajax.request(configUrl,{method:"GET",dataType:isJsonp?"jsonp":"",onsuccess:function(r){try{var config=isJsonp?r:eval("("+r.responseText+")");utils.extend(me.options,config),me.fireEvent("serverConfigLoaded"),me._serverConfigLoaded=!0}catch(e){showErrorMsg(me.getLang("loadconfigFormatError"))}},onerror:function(){showErrorMsg(me.getLang("loadconfigHttpError"))}})}catch(e){showErrorMsg(me.getLang("loadconfigError"))}})},UE.Editor.prototype.isServerConfigLoaded=function(){var a=this;return a._serverConfigLoaded||!1},UE.Editor.prototype.afterConfigReady=function(a){if(a&&utils.isFunction(a)){var b=this,c=function(){a.apply(b,arguments),b.removeListener("serverConfigLoaded",c)};b.isServerConfigLoaded()?a.call(b,"serverConfigLoaded"):b.addListener("serverConfigLoaded",c)}}}(),UE.ajax=function(){function a(a){var b=[];for(var c in a)if("method"!=c&&"timeout"!=c&&"async"!=c&&"dataType"!=c&&"callback"!=c&&void 0!=a[c]&&null!=a[c])if("function"!=(typeof a[c]).toLowerCase()&&"object"!=(typeof a[c]).toLowerCase())b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));else if(utils.isArray(a[c]))for(var d=0;d/gi,"").replace(/]*>[\s\S]*?.<\/v:shape>/gi,function(a){if(browser.opera)return"";try{if(/Bitmap/i.test(a))return"";var c=a.match(/width:([ \d.]*p[tx])/i)[1],d=a.match(/height:([ \d.]*p[tx])/i)[1],e=a.match(/src=\s*"([^"]*)"/i)[1];return''}catch(f){return""}}).replace(/<\/?div[^>]*>/g,"").replace(/v:\w+=(["']?)[^'"]+\1/g,"").replace(/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|xml|meta|link|style|\w+:\w+)(?=[\s\/>]))[^>]*>/gi,"").replace(/

    ]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"

    $1

    ").replace(/\s+(class|lang|align)\s*=\s*(['"]?)([\w-]+)\2/gi,function(a,b,c,d){return"class"==b&&"MsoListParagraph"==d?a:""}).replace(/<(font|span)[^>]*>(\s*)<\/\1>/gi,function(a,b,c){return c.replace(/[\t\r\n ]+/g," ")}).replace(/(<[a-z][^>]*)\sstyle=(["'])([^\2]*?)\2/gi,function(a,c,d,e){for(var f,g=[],h=e.replace(/^\s+|\s+$/,"").replace(/'/g,"'").replace(/"/gi,"'").replace(/[\d.]+(cm|pt)/g,function(a){return utils.transUnitToPx(a)}).split(/;\s*/g),i=0;f=h[i];i++){var j,k,l=f.split(":");if(2==l.length){if(j=l[0].toLowerCase(),k=l[1].toLowerCase(),/^(background)\w*/.test(j)&&0==k.replace(/(initial|\s)/g,"").length||/^(margin)\w*/.test(j)&&/^0\w+$/.test(k))continue;switch(j){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":/1&&(a(h,j,!0),b(h,j)),c(k,h,i,j);break;case"text":d(g,h);break;case"element":e(g,h,i,j);break;case"comment":f(g,h,i)}return h}function d(a,b){"pre"==a.parentNode.tagName?b.push(a.data):b.push(l[a.parentNode.tagName]?utils.html(a.data):a.data.replace(/[ ]{2}/g,"  "))}function e(d,e,f,g){var h="";if(d.attrs){h=[];var i=d.attrs;for(var j in i)h.push(j+(void 0!==i[j]?'="'+(k[j]?utils.html(i[j]).replace(/["]/g,function(a){return"""}):utils.unhtml(i[j]))+'"':""));h=h.join(" ")}if(e.push("<"+d.tagName+(h?" "+h:"")+(dtd.$empty[d.tagName]?"/":"")+">"),f&&!dtd.$inlineWithA[d.tagName]&&"pre"!=d.tagName&&d.children&&d.children.length&&(g=a(e,g,!0),b(e,g)),d.children&&d.children.length)for(var l,m=0;l=d.children[m++];)f&&"element"==l.type&&!dtd.$inlineWithA[l.tagName]&&m>1&&(a(e,g),b(e,g)),c(l,e,f,g);dtd.$empty[d.tagName]||(f&&!dtd.$inlineWithA[d.tagName]&&"pre"!=d.tagName&&d.children&&d.children.length&&(g=a(e,g),b(e,g)),e.push(""))}function f(a,b){b.push("")}function g(a,b){var c;if("element"==a.type&&a.getAttr("id")==b)return a;if(a.children&&a.children.length)for(var d,e=0;d=a.children[e++];)if(c=g(d,b))return c}function h(a,b,c){if("element"==a.type&&a.tagName==b&&c.push(a),a.children&&a.children.length)for(var d,e=0;d=a.children[e++];)h(d,b,c)}function i(a,b){if(a.children&&a.children.length)for(var c,d=0;c=a.children[d];)i(c,b),c.parentNode&&(c.children&&c.children.length&&b(c),c.parentNode&&d++);else b(a)}var j=UE.uNode=function(a){this.type=a.type,this.data=a.data,this.tagName=a.tagName,this.parentNode=a.parentNode,this.attrs=a.attrs||{},this.children=a.children},k={href:1,src:1,_src:1,_href:1,cdata_data:1},l={style:1,script:1},m=" ",n="\n";j.createElement=function(a){return/[<>]/.test(a)?UE.htmlparser(a).children[0]:new j({type:"element",children:[],tagName:a})},j.createText=function(a,b){return new UE.uNode({type:"text",data:b?a:utils.unhtml(a||"")})},j.prototype={toHtml:function(a){var b=[];return c(this,b,a,0),b.join("")},innerHTML:function(a){if("element"!=this.type||dtd.$empty[this.tagName])return this;if(utils.isString(a)){if(this.children)for(var b,c=0;b=this.children[c++];)b.parentNode=null;this.children=[];for(var b,d=UE.htmlparser(a),c=0;b=d.children[c++];)this.children.push(b),b.parentNode=this;return this}var d=new UE.uNode({type:"root",children:this.children});return d.toHtml()},innerText:function(a,b){if("element"!=this.type||dtd.$empty[this.tagName])return this;if(a){if(this.children)for(var c,d=0;c=this.children[d++];)c.parentNode=null;return this.children=[],this.appendChild(j.createText(a,b)),this}return this.toHtml().replace(/<[^>]+>/g,"")},getData:function(){return"element"==this.type?"":this.data},firstChild:function(){return this.children?this.children[0]:null},lastChild:function(){return this.children?this.children[this.children.length-1]:null},previousSibling:function(){for(var a,b=this.parentNode,c=0;a=b.children[c];c++)if(a===this)return 0==c?null:b.children[c-1]},nextSibling:function(){for(var a,b=this.parentNode,c=0;a=b.children[c++];)if(a===this)return b.children[c]},replaceChild:function(a,b){if(this.children){a.parentNode&&a.parentNode.removeChild(a);for(var c,d=0;c=this.children[d];d++)if(c===b)return this.children.splice(d,1,a),b.parentNode=null,a.parentNode=this,a}},appendChild:function(a){if("root"==this.type||"element"==this.type&&!dtd.$empty[this.tagName]){this.children||(this.children=[]),a.parentNode&&a.parentNode.removeChild(a);for(var b,c=0;b=this.children[c];c++)if(b===a){this.children.splice(c,1);break}return this.children.push(a),a.parentNode=this,a}},insertBefore:function(a,b){if(this.children){a.parentNode&&a.parentNode.removeChild(a);for(var c,d=0;c=this.children[d];d++)if(c===b)return this.children.splice(d,0,a),a.parentNode=this,a}},insertAfter:function(a,b){if(this.children){a.parentNode&&a.parentNode.removeChild(a);for(var c,d=0;c=this.children[d];d++)if(c===b)return this.children.splice(d+1,0,a),a.parentNode=this,a}},removeChild:function(a,b){if(this.children)for(var c,d=0;c=this.children[d];d++)if(c===a){if(this.children.splice(d,1),c.parentNode=null,b&&c.children&&c.children.length)for(var e,f=0;e=c.children[f];f++)this.children.splice(d+f,0,e),e.parentNode=this;return c}},getAttr:function(a){return this.attrs&&this.attrs[a.toLowerCase()]},setAttr:function(a,b){if(!a)return void delete this.attrs;if(this.attrs||(this.attrs={}),utils.isObject(a))for(var c in a)a[c]?this.attrs[c.toLowerCase()]=a[c]:delete this.attrs[c];else b?this.attrs[a.toLowerCase()]=b:delete this.attrs[a]},getIndex:function(){for(var a,b=this.parentNode,c=0;a=b.children[c];c++)if(a===this)return c;return-1},getNodeById:function(a){var b;if(this.children&&this.children.length)for(var c,d=0;c=this.children[d++];)if(b=g(c,a))return b},getNodesByTagName:function(a){a=utils.trim(a).replace(/[ ]{2,}/g," ").split(" ");var b=[],c=this;return utils.each(a,function(a){if(c.children&&c.children.length)for(var d,e=0;d=c.children[e++];)h(d,a,b)}),b},getStyle:function(a){var b=this.getAttr("style");if(!b)return"";var c=new RegExp("(^|;)\\s*"+a+":([^;]+)","i"),d=b.match(c);return d&&d[0]?d[2]:""},setStyle:function(a,b){function c(a,b){var c=new RegExp("(^|;)\\s*"+a+":([^;]+;?)","gi");d=d.replace(c,"$1"),b&&(d=a+":"+utils.unhtml(b)+";"+d)}var d=this.getAttr("style");if(d||(d=""),utils.isObject(a))for(var e in a)c(e,a[e]);else c(a,b);this.setAttr("style",utils.trim(d))},traversal:function(a){return this.children&&this.children.length&&i(this,a),this}}}();var htmlparser=UE.htmlparser=function(a,b){function c(a,b){if(m[a.tagName]){var c=k.createElement(m[a.tagName]);a.appendChild(c),c.appendChild(k.createText(b)),a=c}else a.appendChild(k.createText(b))}function d(a,b,c){var e;if(e=l[b]){for(var f,h=a;"root"!=h.type;){if(utils.isArray(e)?utils.indexOf(e,h.tagName)!=-1:e==h.tagName){a=h,f=!0;break}h=h.parentNode}f||(a=d(a,utils.isArray(e)?e[0]:e))}var i=new k({parentNode:a,type:"element",tagName:b.toLowerCase(),children:dtd.$empty[b]?null:[]});if(c){for(var m,n={};m=g.exec(c);)n[m[1].toLowerCase()]=j[m[1].toLowerCase()]?m[2]||m[3]||m[4]:utils.unhtml(m[2]||m[3]||m[4]);i.attrs=n}return a.children.push(i),dtd.$empty[b]?a:i}function e(a,b){a.children.push(new k({type:"comment",data:b,parentNode:a}))}var f=/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\s\/<>]+)\s*((?:(?:"[^"]*")|(?:'[^']*')|[^"'<>])*)\/?>))/g,g=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,h={b:1,code:1,i:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,span:1,sub:1,img:1,sup:1,font:1,big:1,small:1,iframe:1,a:1,br:1,pre:1};a=a.replace(new RegExp(domUtils.fillChar,"g"),""),b||(a=a.replace(new RegExp("[\\r\\t\\n"+(b?"":" ")+"]*]*)>[\\r\\t\\n"+(b?"":" ")+"]*","g"),function(a,c){return c&&h[c.toLowerCase()]?a.replace(/(^[\n\r]+)|([\n\r]+$)/g,""):a.replace(new RegExp("^[\\r\\n"+(b?"":" ")+"]+"),"").replace(new RegExp("[\\r\\n"+(b?"":" ")+"]+$"),"")}));for(var i,j={href:1,src:1},k=UE.uNode,l={td:"tr",tr:["tbody","thead","tfoot"],tbody:"table",th:"tr",thead:"table",tfoot:"table",caption:"table",li:["ul","ol"],dt:"dl",dd:"dl",option:"select"},m={ol:"li",ul:"li"},n=0,o=0,p=new k({type:"root",children:[]}),q=p;i=f.exec(a);){n=i.index;try{if(n>o&&c(q,a.slice(o,n)),i[3])dtd.$cdata[q.tagName]?c(q,i[0]):q=d(q,i[3].toLowerCase(),i[4]);else if(i[1]){if("root"!=q.type)if(dtd.$cdata[q.tagName]&&!dtd.$cdata[i[1]])c(q,i[0]);else{for(var r=q;"element"==q.type&&q.tagName!=i[1].toLowerCase();)if(q=q.parentNode,"root"==q.type)throw q=r,"break";q=q.parentNode}}else i[2]&&e(q,i[2])}catch(s){}o=f.lastIndex}return o");break;case"div":if(b.getAttr("cdata_tag"))break;if(d=b.getAttr("class"),d&&/^line number\d+/.test(d))break;if(!e)break;for(var f,g=UE.uNode.createElement("p");f=b.firstChild();)"text"!=f.type&&UE.dom.dtd.$block[f.tagName]?g.firstChild()?(b.parentNode.insertBefore(g,b),g=UE.uNode.createElement("p")):b.parentNode.insertBefore(f,b):g.appendChild(f);g.firstChild()&&b.parentNode.insertBefore(g,b),b.parentNode.removeChild(b);break;case"dl":b.tagName="ul";break;case"dt":case"dd":b.tagName="li";break;case"li":var h=b.getAttr("class");h&&/list\-/.test(h)||b.setAttr();var i=b.getNodesByTagName("ol ul");UE.utils.each(i,function(a){b.parentNode.insertAfter(a,b)});break;case"td":case"th":case"caption":b.children&&b.children.length||b.appendChild(browser.ie11below?UE.uNode.createText(" "):UE.uNode.createElement("br"));break;case"table":a.options.disabledTableInTable&&c(b)&&(b.parentNode.insertBefore(UE.uNode.createText(b.innerText()),b),b.parentNode.removeChild(b))}}})}),a.addOutputRule(function(b){var c;b.traversal(function(b){if("element"==b.type){if(a.options.autoClearEmptyNode&&dtd.$inline[b.tagName]&&!dtd.$empty[b.tagName]&&(!b.attrs||utils.isEmptyObject(b.attrs)))return void(b.firstChild()?"span"!=b.tagName||b.attrs&&!utils.isEmptyObject(b.attrs)||b.parentNode.removeChild(b,!0):b.parentNode.removeChild(b));switch(b.tagName){case"div":(c=b.getAttr("cdata_tag"))&&(b.tagName=c,b.appendChild(UE.uNode.createText(b.getAttr("cdata_data"))),b.setAttr({cdata_tag:"",cdata_data:"",_ue_custom_node_:""}));break;case"a":(c=b.getAttr("_href"))&&b.setAttr({href:utils.html(c),_href:""});break;case"span":c=b.getAttr("id"),c&&/^_baidu_bookmark_/i.test(c)&&b.parentNode.removeChild(b);break;case"img":(c=b.getAttr("_src"))&&b.setAttr({src:b.getAttr("_src"),_src:""})}}})})},UE.commands.inserthtml={execCommand:function(a,b,c){var d,e,f=this;if(b&&f.fireEvent("beforeinserthtml",b)!==!0){if(d=f.selection.getRange(),e=d.document.createElement("div"),e.style.display="inline",!c){var g=UE.htmlparser(b);f.options.filterRules&&UE.filterNode(g,f.options.filterRules),f.filterInputRule(g),b=g.toHtml()}if(e.innerHTML=utils.trim(b),!d.collapsed){var h=d.startContainer;if(domUtils.isFillChar(h)&&d.setStartBefore(h),h=d.endContainer,domUtils.isFillChar(h)&&d.setEndAfter(h),d.txtToElmBoundary(),d.endContainer&&1==d.endContainer.nodeType&&(h=d.endContainer.childNodes[d.endOffset],h&&domUtils.isBr(h)&&d.setEndAfter(h)),0==d.startOffset&&(h=d.startContainer,domUtils.isBoundaryNode(h,"firstChild")&&(h=d.endContainer,d.endOffset==(3==h.nodeType?h.nodeValue.length:h.childNodes.length)&&domUtils.isBoundaryNode(h,"lastChild")&&(f.body.innerHTML="

    "+(browser.ie?"":"
    ")+"

    ",d.setStart(f.body.firstChild,0).collapse(!0)))),!d.collapsed&&d.deleteContents(),1==d.startContainer.nodeType){var i,j=d.startContainer.childNodes[d.startOffset];if(j&&domUtils.isBlockElm(j)&&(i=j.previousSibling)&&domUtils.isBlockElm(i)){for(d.setEnd(i,i.childNodes.length).collapse();j.firstChild;)i.appendChild(j.firstChild);domUtils.remove(j)}}}var j,k,i,l,m,n=0;d.inFillChar()&&(j=d.startContainer,domUtils.isFillChar(j)?(d.setStartBefore(j).collapse(!0),domUtils.remove(j)):domUtils.isFillChar(j,!0)&&(j.nodeValue=j.nodeValue.replace(fillCharReg,""),d.startOffset--,d.collapsed&&d.collapse(!0)));var o=domUtils.findParentByTagName(d.startContainer,"li",!0);if(o){for(var p,q;j=e.firstChild;){for(;j&&(3==j.nodeType||!domUtils.isBlockElm(j)||"HR"==j.tagName);)p=j.nextSibling,d.insertNode(j).collapse(),q=j,j=p;if(j)if(/^(ol|ul)$/i.test(j.tagName)){for(;j.firstChild;)q=j.firstChild,domUtils.insertAfter(o,j.firstChild),o=o.nextSibling;domUtils.remove(j)}else{var r;p=j.nextSibling,r=f.document.createElement("li"),domUtils.insertAfter(o,r),r.appendChild(j),q=j,j=p,o=r}}o=domUtils.findParentByTagName(d.startContainer,"li",!0),domUtils.isEmptyBlock(o)&&domUtils.remove(o),q&&d.setStartAfter(q).collapse(!0).select(!0)}else{for(;j=e.firstChild;){if(n){for(var s=f.document.createElement("p");j&&(3==j.nodeType||!dtd.$block[j.tagName]);)m=j.nextSibling,s.appendChild(j),j=m;s.firstChild&&(j=s)}if(d.insertNode(j),m=j.nextSibling,!n&&j.nodeType==domUtils.NODE_ELEMENT&&domUtils.isBlockElm(j)&&(k=domUtils.findParent(j,function(a){return domUtils.isBlockElm(a)}),k&&"body"!=k.tagName.toLowerCase()&&(!dtd[k.tagName][j.nodeName]||j.parentNode!==k))){if(dtd[k.tagName][j.nodeName])for(l=j.parentNode;l!==k;)i=l,l=l.parentNode;else i=k;domUtils.breakParent(j,i||l);var i=j.previousSibling;domUtils.trimWhiteTextNode(i),i.childNodes.length||domUtils.remove(i),!browser.ie&&(p=j.nextSibling)&&domUtils.isBlockElm(p)&&p.lastChild&&!domUtils.isBr(p.lastChild)&&p.appendChild(f.document.createElement("br")),n=1}var p=j.nextSibling;if(!e.firstChild&&p&&domUtils.isBlockElm(p)){d.setStart(p,0).collapse(!0);break}d.setEndAfter(j).collapse()}if(j=d.startContainer,m&&domUtils.isBr(m)&&domUtils.remove(m),domUtils.isBlockElm(j)&&domUtils.isEmptyNode(j))if(m=j.nextSibling)domUtils.remove(j),1==m.nodeType&&dtd.$block[m.tagName]&&d.setStart(m,0).collapse(!0).shrinkBoundary();else try{j.innerHTML=browser.ie?domUtils.fillChar:"
    "}catch(t){d.setStartBefore(j),domUtils.remove(j)}try{d.select(!0)}catch(t){}}setTimeout(function(){d=f.selection.getRange(),d.scrollToView(f.autoHeightEnabled,f.autoHeightEnabled?domUtils.getXY(f.iframe).y:0),f.fireEvent("afterinserthtml",b)},200)}}},UE.plugins.autotypeset=function(){function a(a,b){return a&&3!=a.nodeType?domUtils.isBr(a)?1:a&&a.parentNode&&l[a.tagName.toLowerCase()]?g&&g.contains(a)||a.getAttribute("pagebreak")?0:b?!domUtils.isEmptyBlock(a):domUtils.isEmptyBlock(a,new RegExp("[\\s"+domUtils.fillChar+"]","g")):void 0:0}function b(a){a.style.cssText||(domUtils.removeAttributes(a,["style"]),"span"==a.tagName.toLowerCase()&&domUtils.hasNoAttributes(a)&&domUtils.remove(a,!0))}function c(c,f){var h,l=this;if(f){if(!i.pasteFilter)return;h=l.document.createElement("div"),h.innerHTML=f.html}else h=l.document.body;for(var m,n=domUtils.getElementsByTagName(h,"*"),o=0;m=n[o++];)if(l.fireEvent("excludeNodeinautotype",m)!==!0){if(i.clearFontSize&&m.style.fontSize&&(domUtils.removeStyle(m,"font-size"),b(m)),i.clearFontFamily&&m.style.fontFamily&&(domUtils.removeStyle(m,"font-family"),b(m)),a(m)){if(i.mergeEmptyline)for(var p,q=m.nextSibling,r=domUtils.isBr(m);a(q)&&(p=q,q=p.nextSibling,!r||q&&(!q||domUtils.isBr(q)));)domUtils.remove(p);if(i.removeEmptyline&&domUtils.inDoc(m,h)&&!k[m.parentNode.tagName.toLowerCase()]){if(domUtils.isBr(m)&&(q=m.nextSibling,q&&!domUtils.isBr(q)))continue;domUtils.remove(m);continue}}if(a(m,!0)&&"SPAN"!=m.tagName&&(i.indent&&(m.style.textIndent=i.indentValue),i.textAlign&&(m.style.textAlign=i.textAlign)),i.removeClass&&m.className&&!j[m.className.toLowerCase()]){if(g&&g.contains(m))continue;domUtils.removeAttributes(m,["class"])}if(i.imageBlockLine&&"img"==m.tagName.toLowerCase()&&!m.getAttribute("emotion"))if(f){var s=m;switch(i.imageBlockLine){case"left":case"right":case"none":for(var p,t,q,u=s.parentNode;dtd.$inline[u.tagName]||"A"==u.tagName;)u=u.parentNode;if(p=u,"P"==p.tagName&&"center"==domUtils.getStyle(p,"text-align")&&!domUtils.isBody(p)&&1==domUtils.getChildCount(p,function(a){return!domUtils.isBr(a)&&!domUtils.isWhitespace(a)}))if(t=p.previousSibling,q=p.nextSibling,t&&q&&1==t.nodeType&&1==q.nodeType&&t.tagName==q.tagName&&domUtils.isBlockElm(t)){for(t.appendChild(p.firstChild);q.firstChild;)t.appendChild(q.firstChild);domUtils.remove(p),domUtils.remove(q)}else domUtils.setStyle(p,"text-align","");domUtils.setStyle(s,"float",i.imageBlockLine);break;case"center":if("center"!=l.queryCommandValue("imagefloat")){for(u=s.parentNode,domUtils.setStyle(s,"float","none"),p=s;u&&1==domUtils.getChildCount(u,function(a){return!domUtils.isBr(a)&&!domUtils.isWhitespace(a)})&&(dtd.$inline[u.tagName]||"A"==u.tagName);)p=u,u=u.parentNode;var v=l.document.createElement("p");domUtils.setAttributes(v,{style:"text-align:center"}),p.parentNode.insertBefore(v,p),v.appendChild(p),domUtils.setStyle(p,"float","")}}}else{var w=l.selection.getRange();w.selectNode(m).select(),l.execCommand("imagefloat",i.imageBlockLine)}i.removeEmptyNode&&i.removeTagNames[m.tagName.toLowerCase()]&&domUtils.hasNoAttributes(m)&&domUtils.isEmptyBlock(m)&&domUtils.remove(m)}if(i.tobdc){var x=UE.htmlparser(h.innerHTML);x.traversal(function(a){"text"==a.type&&(a.data=e(a.data))}),h.innerHTML=x.toHtml()}if(i.bdc2sb){var x=UE.htmlparser(h.innerHTML);x.traversal(function(a){"text"==a.type&&(a.data=d(a.data))}),h.innerHTML=x.toHtml()}f&&(f.html=h.innerHTML)}function d(a){for(var b="",c=0;c=65281&&d<=65373?String.fromCharCode(a.charCodeAt(c)-65248):12288==d?String.fromCharCode(a.charCodeAt(c)-12288+32):a.charAt(c)}return b}function e(a){a=utils.html(a);for(var b="",c=0;c0?e.substring(e.indexOf(d.options.imagePath),e.length-1).replace(/"|\(|\)/gi,""):"none"!=e?e.replace(/url\("?|"?\)/gi,""):"";var g=' ",b.push(g)},aftersetcontent:function(){0==c&&b()}},inputRule:function(d){c=!1,utils.each(d.getNodesByTagName("p"),function(d){var e=d.getAttr("data-background");e&&(c=!0,b(a(e)),d.parentNode.removeChild(d))})},outputRule:function(a){var b=this,c=(utils.cssRule(e,b.document)||"").replace(/[\n\r]+/g,"").match(f);c&&a.appendChild(UE.uNode.createElement('


    '))},commands:{background:{execCommand:function(a,c){b(c)},queryCommandValue:function(){var b=this,c=(utils.cssRule(e,b.document)||"").replace(/[\n\r]+/g,"").match(f);return c?a(c[1]):null},notNeedUndo:!0}}}}),UE.commands.imagefloat={execCommand:function(a,b){var c=this,d=c.selection.getRange();if(!d.collapsed){var e=d.getClosedNode();if(e&&"IMG"==e.tagName)switch(b){case"left":case"right":case"none":for(var f,g,h,i=e.parentNode;dtd.$inline[i.tagName]||"A"==i.tagName;)i=i.parentNode;if(f=i,"P"==f.tagName&&"center"==domUtils.getStyle(f,"text-align")){if(!domUtils.isBody(f)&&1==domUtils.getChildCount(f,function(a){return!domUtils.isBr(a)&&!domUtils.isWhitespace(a)}))if(g=f.previousSibling,h=f.nextSibling,g&&h&&1==g.nodeType&&1==h.nodeType&&g.tagName==h.tagName&&domUtils.isBlockElm(g)){for(g.appendChild(f.firstChild);h.firstChild;)g.appendChild(h.firstChild);domUtils.remove(f),domUtils.remove(h)}else domUtils.setStyle(f,"text-align","");d.selectNode(e).select()}domUtils.setStyle(e,"float","none"==b?"":b),"none"==b&&domUtils.removeAttributes(e,"align");break;case"center":if("center"!=c.queryCommandValue("imagefloat")){for(i=e.parentNode,domUtils.setStyle(e,"float",""),domUtils.removeAttributes(e,"align"),f=e;i&&1==domUtils.getChildCount(i,function(a){return!domUtils.isBr(a)&&!domUtils.isWhitespace(a)})&&(dtd.$inline[i.tagName]||"A"==i.tagName);)f=i,i=i.parentNode;d.setStartBefore(f).setCursor(!1),i=c.document.createElement("div"),i.appendChild(f),domUtils.setStyle(f,"float",""),c.execCommand("insertHtml",'

    '+i.innerHTML+"

    "),f=c.document.getElementById("_img_parent_tmp"),f.removeAttribute("id"),f=f.firstChild,d.selectNode(f).select(),h=f.parentNode.nextSibling,h&&domUtils.isEmptyNode(h)&&domUtils.remove(h)}}}},queryCommandValue:function(){var a,b,c=this.selection.getRange();return c.collapsed?"none":(a=c.getClosedNode(),a&&1==a.nodeType&&"IMG"==a.tagName?(b=domUtils.getComputedStyle(a,"float")||a.getAttribute("align"),"none"==b&&(b="center"==domUtils.getComputedStyle(a.parentNode,"text-align")?"center":b),{left:1,right:1,center:1}[b]?b:"none"):"none")},queryCommandState:function(){var a,b=this.selection.getRange();return b.collapsed?-1:(a=b.getClosedNode(),a&&1==a.nodeType&&"IMG"==a.tagName?0:-1)}},UE.commands.insertimage={execCommand:function(a,b){function c(a){utils.each("width,height,border,hspace,vspace".split(","),function(b){a[b]&&(a[b]=parseInt(a[b],10)||0)}),utils.each("src,_src".split(","),function(b){a[b]&&(a[b]=utils.unhtmlForUrl(a[b]))}),utils.each("title,alt".split(","),function(b){a[b]&&(a[b]=utils.unhtml(a[b]))})}if(b=utils.isArray(b)?b:[b],b.length){var d=this,e=d.selection.getRange(),f=e.getClosedNode();if(d.fireEvent("beforeinsertimage",b)!==!0){if(!f||!/img/i.test(f.tagName)||"edui-faked-video"==f.className&&f.className.indexOf("edui-upload-video")==-1||f.getAttribute("word_img")){var g,h=[],i="";if(g=b[0],1==b.length)c(g),i=''+g.alt+'","center"==g.floatStyle&&(i='

    '+i+"

    "),h.push(i);else for(var j=0;g=b[j++];)c(g),i="

    ",h.push(i);d.execCommand("insertHtml",h.join(""))}else{var k=b.shift(),l=k.floatStyle;delete k.floatStyle,domUtils.setAttributes(f,k),d.execCommand("imagefloat",l),b.length>0&&(e.setStartAfter(f).setCursor(!1,!0),d.execCommand("insertimage",b))}d.fireEvent("afterinsertimage",b)}}}},UE.plugins.justify=function(){var a=domUtils.isBlockElm,b={left:1,right:1,center:1,justify:1},c=function(b,c){var d=b.createBookmark(),e=function(a){return 1==a.nodeType?"br"!=a.tagName.toLowerCase()&&!domUtils.isBookmarkNode(a):!domUtils.isWhitespace(a)};b.enlarge(!0);for(var f,g=b.createBookmark(),h=domUtils.getNextDomNode(g.start,!1,e),i=b.cloneRange();h&&!(domUtils.getPosition(h,g.end)&domUtils.POSITION_FOLLOWING);)if(3!=h.nodeType&&a(h))h=domUtils.getNextDomNode(h,!0,e);else{for(i.setStartBefore(h);h&&h!==g.end&&!a(h);)f=h,h=domUtils.getNextDomNode(h,!1,null,function(b){return!a(b)});i.setEndAfter(f);var j=i.getCommonAncestor();if(!domUtils.isBody(j)&&a(j))domUtils.setStyles(j,utils.isString(c)?{"text-align":c}:c),h=j;else{var k=b.document.createElement("p");domUtils.setStyles(k,utils.isString(c)?{"text-align":c}:c);var l=i.extractContents();k.appendChild(l),i.insertNode(k),h=k}h=domUtils.getNextDomNode(h,!1,e)}return b.moveToBookmark(g).moveToBookmark(d)};UE.commands.justify={execCommand:function(a,b){var d,e=this.selection.getRange();return e.collapsed&&(d=this.document.createTextNode("p"),e.insertNode(d)),c(e,b),d&&(e.setStartBefore(d).collapse(!0),domUtils.remove(d)),e.select(),!0},queryCommandValue:function(){var a=this.selection.getStart(),c=domUtils.getComputedStyle(a,"text-align");return b[c]?c:"left"},queryCommandState:function(){var a=this.selection.getStart(),b=a&&domUtils.findParentByTagName(a,["td","th","caption"],!0);return b?-1:0}}},UE.plugins.font=function(){function a(a){for(var b;(b=a.parentNode)&&"SPAN"==b.tagName&&1==domUtils.getChildCount(b,function(a){return!domUtils.isBookmarkNode(a)&&!domUtils.isBr(a)});)b.style.cssText+=a.style.cssText,domUtils.remove(a,!0),a=b}function b(a,b,c){if(g[b]&&(a.adjustmentBoundary(),!a.collapsed&&1==a.startContainer.nodeType)){var d=a.startContainer.childNodes[a.startOffset];if(d&&domUtils.isTagNode(d,"span")){var e=a.createBookmark();utils.each(domUtils.getElementsByTagName(d,"span"),function(a){a.parentNode&&!domUtils.isBookmarkNode(a)&&("backcolor"==b&&domUtils.getComputedStyle(a,"background-color").toLowerCase()===c||(domUtils.removeStyle(a,g[b]),0==a.style.cssText.replace(/^\s+$/,"").length&&domUtils.remove(a,!0)))}),a.moveToBookmark(e)}}}function c(c,d,e){var f,g=c.collapsed,h=c.createBookmark();if(g)for(f=h.start.parentNode;dtd.$inline[f.tagName];)f=f.parentNode;else f=domUtils.getCommonAncestor(h.start,h.end);utils.each(domUtils.getElementsByTagName(f,"span"),function(b){if(b.parentNode&&!domUtils.isBookmarkNode(b)){if(/\s*border\s*:\s*none;?\s*/i.test(b.style.cssText))return void(/^\s*border\s*:\s*none;?\s*$/.test(b.style.cssText)?domUtils.remove(b,!0):domUtils.removeStyle(b,"border"));if(/border/i.test(b.style.cssText)&&"SPAN"==b.parentNode.tagName&&/border/i.test(b.parentNode.style.cssText)&&(b.style.cssText=b.style.cssText.replace(/border[^:]*:[^;]+;?/gi,"")),"fontborder"!=d||"none"!=e)for(var c=b.nextSibling;c&&1==c.nodeType&&"SPAN"==c.tagName;)if(domUtils.isBookmarkNode(c)&&"fontborder"==d)b.appendChild(c),c=b.nextSibling;else{if(c.style.cssText==b.style.cssText&&(domUtils.moveChild(c,b),domUtils.remove(c)),b.nextSibling===c)break;c=b.nextSibling}if(a(b),browser.ie&&browser.version>8){var f=domUtils.findParent(b,function(a){return"SPAN"==a.tagName&&/background-color/.test(a.style.cssText)});f&&!/background-color/.test(b.style.cssText)&&(b.style.backgroundColor=f.style.backgroundColor)}}}),c.moveToBookmark(h),b(c,d,e)}var d=this,e={forecolor:"color",backcolor:"background-color",fontsize:"font-size",fontfamily:"font-family",underline:"text-decoration",strikethrough:"text-decoration",fontborder:"border"},f={underline:1,strikethrough:1,fontborder:1},g={forecolor:"color",backcolor:"background-color",fontsize:"font-size",fontfamily:"font-family"};d.setOpt({fontfamily:[{name:"songti",val:"宋体,SimSun"},{name:"yahei",val:"微软雅黑,Microsoft YaHei"},{name:"kaiti",val:"楷体,楷体_GB2312, SimKai"},{name:"heiti",val:"黑体, SimHei"},{name:"lishu",val:"隶书, SimLi"},{name:"andaleMono",val:"andale mono"},{name:"arial",val:"arial, helvetica,sans-serif"},{name:"arialBlack",val:"arial black,avant garde"},{name:"comicSansMs",val:"comic sans ms"},{name:"impact",val:"impact,chicago"},{name:"timesNewRoman",val:"times new roman"}],fontsize:[10,11,12,14,16,18,20,24,36]}),d.addInputRule(function(a){utils.each(a.getNodesByTagName("u s del font strike"),function(a){if("font"==a.tagName){var b=[];for(var c in a.attrs)switch(c){case"size":b.push("font-size:"+({1:"10",2:"12",3:"16",4:"18",5:"24",6:"32",7:"48"}[a.attrs[c]]||a.attrs[c])+"px");break;case"color":b.push("color:"+a.attrs[c]);break;case"face":b.push("font-family:"+a.attrs[c]);break;case"style":b.push(a.attrs[c])}a.attrs={style:b.join(";")}}else{var d="u"==a.tagName?"underline":"line-through";a.attrs={style:(a.getAttr("style")||"")+"text-decoration:"+d+";"}}a.tagName="span"})});for(var h in e)!function(a,b){UE.commands[a]={execCommand:function(d,e){e=e||(this.queryCommandState(d)?"none":"underline"==d?"underline":"fontborder"==d?"1px solid #000":"line-through");var g,h=this,i=this.selection.getRange();if("default"==e)i.collapsed&&(g=h.document.createTextNode("font"),i.insertNode(g).select()),h.execCommand("removeFormat","span,a",b),g&&(i.setStartBefore(g).collapse(!0),domUtils.remove(g)),c(i,d,e),i.select();else if(i.collapsed){var j=domUtils.findParentByTagName(i.startContainer,"span",!0);if(g=h.document.createTextNode("font"),!j||j.children.length||j[browser.ie?"innerText":"textContent"].replace(fillCharReg,"").length){if(i.insertNode(g),i.selectNode(g).select(),j=i.document.createElement("span"),f[a]){if(domUtils.findParentByTagName(g,"a",!0))return i.setStartBefore(g).setCursor(),void domUtils.remove(g);h.execCommand("removeFormat","span,a",b)}if(j.style.cssText=b+":"+e,g.parentNode.insertBefore(j,g),!browser.ie||browser.ie&&9==browser.version)for(var k=j.parentNode;!domUtils.isBlockElm(k);)"SPAN"==k.tagName&&(j.style.cssText=k.style.cssText+";"+j.style.cssText),k=k.parentNode;opera?setTimeout(function(){i.setStart(j,0).collapse(!0),c(i,d,e),i.select()}):(i.setStart(j,0).collapse(!0),c(i,d,e),i.select())}else i.insertNode(g),f[a]&&(i.selectNode(g).select(),h.execCommand("removeFormat","span,a",b,null),j=domUtils.findParentByTagName(g,"span",!0),i.setStartBefore(g)),j&&(j.style.cssText+=";"+b+":"+e),i.collapse(!0).select();domUtils.remove(g)}else f[a]&&h.queryCommandValue(a)&&h.execCommand("removeFormat","span,a",b),i=h.selection.getRange(),i.applyInlineStyle("span",{style:b+":"+e}),c(i,d,e),i.select();return!0},queryCommandValue:function(a){var c=this.selection.getStart();if("underline"==a||"strikethrough"==a){for(var d,e=c;e&&!domUtils.isBlockElm(e)&&!domUtils.isBody(e);){if(1==e.nodeType&&(d=domUtils.getComputedStyle(e,b),"none"!=d))return d;e=e.parentNode}return"none"}if("fontborder"==a){for(var f,g=c;g&&dtd.$inline[g.tagName];){if((f=domUtils.getComputedStyle(g,"border"))&&/1px/.test(f)&&/solid/.test(f))return f;g=g.parentNode}return""}if("FontSize"==a){var h=domUtils.getComputedStyle(c,b),g=/^([\d\.]+)(\w+)$/.exec(h);return g?Math.floor(g[1])+g[2]:h}return domUtils.getComputedStyle(c,b)},queryCommandState:function(a){if(!f[a])return 0;var b=this.queryCommandValue(a);return"fontborder"==a?/1px/.test(b)&&/solid/.test(b):"underline"==a?/underline/.test(b):/line\-through/.test(b)}}}(h,e[h])},UE.plugins.link=function(){function a(a){var b=a.startContainer,c=a.endContainer;(b=domUtils.findParentByTagName(b,"a",!0))&&a.setStartBefore(b),(c=domUtils.findParentByTagName(c,"a",!0))&&a.setEndAfter(c)}function b(b,c,d){var e=b.cloneRange(),f=d.queryCommandValue("link");a(b=b.adjustmentBoundary());var g=b.startContainer;if(1==g.nodeType&&f&&(g=g.childNodes[b.startOffset],g&&1==g.nodeType&&"A"==g.tagName&&/^(?:https?|ftp|file)\s*:\s*\/\//.test(g[browser.ie?"innerText":"textContent"])&&(g[browser.ie?"innerText":"textContent"]=utils.html(c.textValue||c.href))),e.collapsed&&!f||(b.removeInlineStyle("a"),e=b.cloneRange()),e.collapsed){var h=b.document.createElement("a"),i="";c.textValue?(i=utils.html(c.textValue),delete c.textValue):i=utils.html(c.href),domUtils.setAttributes(h,c),g=domUtils.findParentByTagName(e.startContainer,"a",!0),g&&domUtils.isInNodeEndBoundary(e,g)&&b.setStartAfter(g).collapse(!0),h[browser.ie?"innerText":"textContent"]=i,b.insertNode(h).selectNode(h)}else b.applyInlineStyle("a",c)}UE.commands.unlink={execCommand:function(){var b,c=this.selection.getRange();c.collapsed&&!domUtils.findParentByTagName(c.startContainer,"a",!0)||(b=c.createBookmark(),a(c),c.removeInlineStyle("a").moveToBookmark(b).select())},queryCommandState:function(){return!this.highlight&&this.queryCommandValue("link")?0:-1}},UE.commands.link={execCommand:function(a,c){var d;c._href&&(c._href=utils.unhtml(c._href,/[<">]/g)),c.href&&(c.href=utils.unhtml(c.href,/[<">]/g)),c.textValue&&(c.textValue=utils.unhtml(c.textValue,/[<">]/g)),b(d=this.selection.getRange(),c,this),d.collapse().select(!0)},queryCommandValue:function(){var a,b=this.selection.getRange();if(!b.collapsed){b.shrinkBoundary();var c=3!=b.startContainer.nodeType&&b.startContainer.childNodes[b.startOffset]?b.startContainer.childNodes[b.startOffset]:b.startContainer,d=3==b.endContainer.nodeType||0==b.endOffset?b.endContainer:b.endContainer.childNodes[b.endOffset-1],e=b.getCommonAncestor();if(a=domUtils.findParentByTagName(e,"a",!0),!a&&1==e.nodeType)for(var f,g,h,i=e.getElementsByTagName("a"),j=0;h=i[j++];)if(f=domUtils.getPosition(h,c),g=domUtils.getPosition(h,d),(f&domUtils.POSITION_FOLLOWING||f&domUtils.POSITION_CONTAINS)&&(g&domUtils.POSITION_PRECEDING||g&domUtils.POSITION_CONTAINS)){a=h;break}return a}if(a=b.startContainer,a=1==a.nodeType?a:a.parentNode,a&&(a=domUtils.findParentByTagName(a,"a",!0))&&!domUtils.isInNodeEndBoundary(b,a))return a},queryCommandState:function(){var a=this.selection.getRange().getClosedNode(),b=a&&("edui-faked-video"==a.className||a.className.indexOf("edui-upload-video")!=-1);return b?-1:0}}},UE.plugins.insertframe=function(){function a(){b._iframe&&delete b._iframe}var b=this;b.addListener("selectionchange",function(){a()})},UE.commands.scrawl={queryCommandState:function(){return browser.ie&&browser.version<=8?-1:0}},UE.plugins.removeformat=function(){var a=this;a.setOpt({removeFormatTags:"b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var",removeFormatAttributes:"class,style,lang,width,height,align,hspace,valign"}),a.commands.removeformat={execCommand:function(a,b,c,d,e){function f(a){if(3==a.nodeType||"span"!=a.tagName.toLowerCase())return 0;if(browser.ie){var b=a.attributes;if(b.length){for(var c=0,d=b.length;c
    "+this.getContent(null,null,!0)+"
    "),b.close()},notNeedUndo:1},UE.plugins.selectall=function(){var a=this;a.commands.selectall={execCommand:function(){var a=this,b=a.body,c=a.selection.getRange();c.selectNodeContents(b),domUtils.isEmptyBlock(b)&&(browser.opera&&b.firstChild&&1==b.firstChild.nodeType&&c.setStartAtFirst(b.firstChild),c.collapse(!0)),c.select(!0)},notNeedUndo:1},a.addshortcutkey({selectAll:"ctrl+65"})},UE.plugins.paragraph=function(){var a=this,b=domUtils.isBlockElm,c=["TD","LI","PRE"],d=function(a,d,e,f){var g,h=a.createBookmark(),i=function(a){return 1==a.nodeType?"br"!=a.tagName.toLowerCase()&&!domUtils.isBookmarkNode(a):!domUtils.isWhitespace(a)};a.enlarge(!0);for(var j,k=a.createBookmark(),l=domUtils.getNextDomNode(k.start,!1,i),m=a.cloneRange();l&&!(domUtils.getPosition(l,k.end)&domUtils.POSITION_FOLLOWING);)if(3!=l.nodeType&&b(l))l=domUtils.getNextDomNode(l,!0,i);else{for(m.setStartBefore(l);l&&l!==k.end&&!b(l);)j=l,l=domUtils.getNextDomNode(l,!1,null,function(a){return!b(a)});m.setEndAfter(j),g=a.document.createElement(d),e&&(domUtils.setAttributes(g,e),f&&"customstyle"==f&&e.style&&(g.style.cssText=e.style)),g.appendChild(m.extractContents()),domUtils.isEmptyNode(g)&&domUtils.fillChar(a.document,g),m.insertNode(g);var n=g.parentNode;b(n)&&!domUtils.isBody(g.parentNode)&&utils.indexOf(c,n.tagName)==-1&&(f&&"customstyle"==f||(n.getAttribute("dir")&&g.setAttribute("dir",n.getAttribute("dir")),n.style.cssText&&(g.style.cssText=n.style.cssText+";"+g.style.cssText),n.style.textAlign&&!g.style.textAlign&&(g.style.textAlign=n.style.textAlign),n.style.textIndent&&!g.style.textIndent&&(g.style.textIndent=n.style.textIndent),n.style.padding&&!g.style.padding&&(g.style.padding=n.style.padding)),e&&/h\d/i.test(n.tagName)&&!/h\d/i.test(g.tagName)?(domUtils.setAttributes(n,e),f&&"customstyle"==f&&e.style&&(n.style.cssText=e.style),domUtils.remove(g,!0),g=n):domUtils.remove(g.parentNode,!0)),l=utils.indexOf(c,n.tagName)!=-1?n:g,l=domUtils.getNextDomNode(l,!1,i)}return a.moveToBookmark(k).moveToBookmark(h)};a.setOpt("paragraph",{p:"",h1:"",h2:"",h3:"",h4:"",h5:"",h6:""}),a.commands.paragraph={execCommand:function(a,b,c,e){var f=this.selection.getRange();if(f.collapsed){var g=this.document.createTextNode("p");if(f.insertNode(g),browser.ie){var h=g.previousSibling;h&&domUtils.isWhitespace(h)&&domUtils.remove(h),h=g.nextSibling,h&&domUtils.isWhitespace(h)&&domUtils.remove(h)}}if(f=d(f,b,c,e),g&&(f.setStartBefore(g).collapse(!0),pN=g.parentNode,domUtils.remove(g),domUtils.isBlockElm(pN)&&domUtils.isEmptyNode(pN)&&domUtils.fillNode(this.document,pN)),browser.gecko&&f.collapsed&&1==f.startContainer.nodeType){var i=f.startContainer.childNodes[f.startOffset];i&&1==i.nodeType&&i.tagName.toLowerCase()==b&&f.setStart(i,0).collapse(!0)}return f.select(),!0},queryCommandValue:function(){var a=domUtils.filterNodeList(this.selection.getStartElementPath(),"p h1 h2 h3 h4 h5 h6");return a?a.tagName.toLowerCase():""}}},function(){var a=domUtils.isBlockElm,b=function(a){return domUtils.filterNodeList(a.selection.getStartElementPath(),function(a){return a&&1==a.nodeType&&a.getAttribute("dir")})},c=function(c,d,e){var f,g=function(a){return 1==a.nodeType?!domUtils.isBookmarkNode(a):!domUtils.isWhitespace(a)},h=b(d);if(h&&c.collapsed)return h.setAttribute("dir",e),c;f=c.createBookmark(),c.enlarge(!0);for(var i,j=c.createBookmark(),k=domUtils.getNextDomNode(j.start,!1,g),l=c.cloneRange();k&&!(domUtils.getPosition(k,j.end)&domUtils.POSITION_FOLLOWING);)if(3!=k.nodeType&&a(k))k=domUtils.getNextDomNode(k,!0,g);else{for(l.setStartBefore(k);k&&k!==j.end&&!a(k);)i=k,k=domUtils.getNextDomNode(k,!1,null,function(b){return!a(b)});l.setEndAfter(i);var m=l.getCommonAncestor();if(!domUtils.isBody(m)&&a(m))m.setAttribute("dir",e),k=m;else{var n=c.document.createElement("p");n.setAttribute("dir",e);var o=l.extractContents();n.appendChild(o),l.insertNode(n),k=n}k=domUtils.getNextDomNode(k,!1,g)}return c.moveToBookmark(j).moveToBookmark(f)};UE.commands.directionality={execCommand:function(a,b){var d=this.selection.getRange();if(d.collapsed){var e=this.document.createTextNode("d");d.insertNode(e)}return c(d,this,b),e&&(d.setStartBefore(e).collapse(!0),domUtils.remove(e)),d.select(),!0},queryCommandValue:function(){var a=b(this);return a?a.getAttribute("dir"):"ltr"}}}(),UE.plugins.horizontal=function(){var a=this;a.commands.horizontal={execCommand:function(a){var b=this;if(b.queryCommandState(a)!==-1){b.execCommand("insertHtml","
    ");var c=b.selection.getRange(),d=c.startContainer;if(1==d.nodeType&&!d.childNodes[c.startOffset]){var e;(e=d.childNodes[c.startOffset-1])&&1==e.nodeType&&"HR"==e.tagName&&("p"==b.options.enterTag?(e=b.document.createElement("p"),c.insertNode(e),c.setStart(e,0).setCursor()):(e=b.document.createElement("br"),c.insertNode(e),c.setStartBefore(e).setCursor()))}return!0}},queryCommandState:function(){return domUtils.filterNodeList(this.selection.getStartElementPath(),"table")?-1:0}},a.addListener("delkeydown",function(a,b){var c=this.selection.getRange();if(c.txtToElmBoundary(!0),domUtils.isStartInblock(c)){var d=c.startContainer,e=d.previousSibling;if(e&&domUtils.isTagNode(e,"hr"))return domUtils.remove(e),c.select(),domUtils.preventDefault(b),!0}})},UE.commands.time=UE.commands.date={execCommand:function(a,b){function c(a,b){var c=("0"+a.getHours()).slice(-2),d=("0"+a.getMinutes()).slice(-2),e=("0"+a.getSeconds()).slice(-2);return b=b||"hh:ii:ss",b.replace(/hh/gi,c).replace(/ii/gi,d).replace(/ss/gi,e)}function d(a,b){var c=("000"+a.getFullYear()).slice(-4),d=c.slice(-2),e=("0"+(a.getMonth()+1)).slice(-2),f=("0"+a.getDate()).slice(-2);return b=b||"yyyy-mm-dd",b.replace(/yyyy/gi,c).replace(/yy/gi,d).replace(/mm/gi,e).replace(/dd/gi,f)}var e=new Date;this.execCommand("insertHtml","time"==a?c(e,b):d(e,b))}},UE.plugins.rowspacing=function(){var a=this;a.setOpt({rowspacingtop:["5","10","15","20","25"],rowspacingbottom:["5","10","15","20","25"]}),a.commands.rowspacing={execCommand:function(a,b,c){return this.execCommand("paragraph","p",{style:"margin-"+c+":"+b+"px"}),!0},queryCommandValue:function(a,b){var c,d=domUtils.filterNodeList(this.selection.getStartElementPath(),function(a){return domUtils.isBlockElm(a)});return d?(c=domUtils.getComputedStyle(d,"margin-"+b).replace(/[^\d]/g,""),c?c:0):0}}},UE.plugins.lineheight=function(){var a=this;a.setOpt({lineheight:["1","1.5","1.75","2","3","4","5"]}),a.commands.lineheight={execCommand:function(a,b){return this.execCommand("paragraph","p",{style:"line-height:"+("1"==b?"normal":b+"em")}),!0},queryCommandValue:function(){var a=domUtils.filterNodeList(this.selection.getStartElementPath(),function(a){return domUtils.isBlockElm(a)});if(a){var b=domUtils.getComputedStyle(a,"line-height");return"normal"==b?1:b.replace(/[^\d.]*/gi,"")}}}},UE.plugins.insertcode=function(){var a=this;a.ready(function(){utils.cssRule("pre","pre{margin:.5em 0;padding:.4em .6em;border-radius:8px;background:#f8f8f8;}",a.document)}),a.setOpt("insertcode",{as3:"ActionScript3",bash:"Bash/Shell",cpp:"C/C++",css:"Css",cf:"CodeFunction","c#":"C#",delphi:"Delphi",diff:"Diff",erlang:"Erlang",groovy:"Groovy",html:"Html",java:"Java",jfx:"JavaFx",js:"Javascript",pl:"Perl",php:"Php",plain:"Plain Text",ps:"PowerShell",python:"Python",ruby:"Ruby",scala:"Scala",sql:"Sql",vb:"Vb",xml:"Xml"}),a.commands.insertcode={execCommand:function(a,b){var c=this,d=c.selection.getRange(),e=domUtils.findParentByTagName(d.startContainer,"pre",!0);if(e)e.className="brush:"+b+";toolbar:false;";else{var f="";if(d.collapsed)f=browser.ie&&browser.ie11below?browser.version<=8?" ":"":"
    ";else{var g=d.extractContents(),h=c.document.createElement("div");h.appendChild(g),utils.each(UE.filterNode(UE.htmlparser(h.innerHTML.replace(/[\r\t]/g,"")),c.options.filterTxtRules).children,function(a){if(browser.ie&&browser.ie11below&&browser.version>8)"element"==a.type?"br"==a.tagName?f+="\n":dtd.$empty[a.tagName]||(utils.each(a.children,function(b){"element"==b.type?"br"==b.tagName?f+="\n":dtd.$empty[a.tagName]||(f+=b.innerText()):f+=b.data}),/\n$/.test(f)||(f+="\n")):f+=a.data+"\n",!a.nextSibling()&&/\n$/.test(f)&&(f=f.replace(/\n$/,""));else if(browser.ie&&browser.ie11below)"element"==a.type?"br"==a.tagName?f+="
    ":dtd.$empty[a.tagName]||(utils.each(a.children,function(b){"element"==b.type?"br"==b.tagName?f+="
    ":dtd.$empty[a.tagName]||(f+=b.innerText()):f+=b.data}),/br>$/.test(f)||(f+="
    ")):f+=a.data+"
    ",!a.nextSibling()&&/
    $/.test(f)&&(f=f.replace(/
    $/,""));else if(f+="element"==a.type?dtd.$empty[a.tagName]?"":a.innerText():a.data,!/br\/?\s*>$/.test(f)){if(!a.nextSibling())return;f+="
    "}})}c.execCommand("inserthtml",'
    '+f+"
    ",!0),e=c.document.getElementById("coder"),domUtils.removeAttributes(e,"id");var i=e.previousSibling;i&&(3==i.nodeType&&1==i.nodeValue.length&&browser.ie&&6==browser.version||domUtils.isEmptyBlock(i))&&domUtils.remove(i);var d=c.selection.getRange();domUtils.isEmptyBlock(e)?d.setStart(e,0).setCursor(!1,!0):d.selectNodeContents(e).select()}},queryCommandValue:function(){var a=this.selection.getStartElementPath(),b="";return utils.each(a,function(a){if("PRE"==a.nodeName){var c=a.className.match(/brush:([^;]+)/);return b=c&&c[1]?c[1]:"",!1}}),b}},a.addInputRule(function(a){utils.each(a.getNodesByTagName("pre"),function(a){var b=a.getNodesByTagName("br");if(b.length)return void(browser.ie&&browser.ie11below&&browser.version>8&&utils.each(b,function(a){var b=UE.uNode.createText("\n");a.parentNode.insertBefore(b,a),a.parentNode.removeChild(a)}));if(!(browser.ie&&browser.ie11below&&browser.version>8)){var c=a.innerText().split(/\n/);a.innerHTML(""),utils.each(c,function(b){b.length&&a.appendChild(UE.uNode.createText(b)),a.appendChild(UE.uNode.createElement("br"))})}})}),a.addOutputRule(function(a){utils.each(a.getNodesByTagName("pre"),function(a){var b="";utils.each(a.children,function(a){b+="text"==a.type?a.data.replace(/[ ]/g," ").replace(/\n$/,""):"br"==a.tagName?"\n":dtd.$empty[a.tagName]?a.innerText():""}),a.innerText(b.replace(/( |\n)+$/,""))})}),a.notNeedCodeQuery={help:1,undo:1,redo:1,source:1,print:1,searchreplace:1,fullscreen:1,preview:1,insertparagraph:1,elementpath:1,insertcode:1,inserthtml:1,selectall:1};a.queryCommandState;a.queryCommandState=function(a){var b=this;return!b.notNeedCodeQuery[a.toLowerCase()]&&b.selection&&b.queryCommandValue("insertcode")?-1:UE.Editor.prototype.queryCommandState.apply(this,arguments)},a.addListener("beforeenterkeydown",function(){var b=a.selection.getRange(),c=domUtils.findParentByTagName(b.startContainer,"pre",!0);if(c){if(a.fireEvent("saveScene"),b.collapsed||b.deleteContents(),!browser.ie||browser.ie9above){var c,d=a.document.createElement("br");b.insertNode(d).setStartAfter(d).collapse(!0); -var e=d.nextSibling;e||browser.ie&&!(browser.version>10)?b.setStartAfter(d):b.insertNode(d.cloneNode(!1)),c=d.previousSibling;for(var f;c;)if(f=c,c=c.previousSibling,!c||"BR"==c.nodeName){c=f;break}if(c){for(var g="";c&&"BR"!=c.nodeName&&new RegExp("^[\\s"+domUtils.fillChar+"]*$").test(c.nodeValue);)g+=c.nodeValue,c=c.nextSibling;if("BR"!=c.nodeName){var h=c.nodeValue.match(new RegExp("^([\\s"+domUtils.fillChar+"]+)"));h&&h[1]&&(g+=h[1])}g&&(g=a.document.createTextNode(g),b.insertNode(g).setStartAfter(g))}b.collapse(!0).select(!0)}else if(browser.version>8){var i=a.document.createTextNode("\n"),j=b.startContainer;if(0==b.startOffset){var k=j.previousSibling;if(k){b.insertNode(i);var l=a.document.createTextNode(" ");b.setStartAfter(i).insertNode(l).setStart(l,0).collapse(!0).select(!0)}}else{b.insertNode(i).setStartAfter(i);var l=a.document.createTextNode(" ");j=b.startContainer.childNodes[b.startOffset],j&&!/^\n/.test(j.nodeValue)&&b.setStartBefore(i),b.insertNode(l).setStart(l,0).collapse(!0).select(!0)}}else{var d=a.document.createElement("br");b.insertNode(d),b.insertNode(a.document.createTextNode(domUtils.fillChar)),b.setStartAfter(d),c=d.previousSibling;for(var f;c;)if(f=c,c=c.previousSibling,!c||"BR"==c.nodeName){c=f;break}if(c){for(var g="";c&&"BR"!=c.nodeName&&new RegExp("^[ "+domUtils.fillChar+"]*$").test(c.nodeValue);)g+=c.nodeValue,c=c.nextSibling;if("BR"!=c.nodeName){var h=c.nodeValue.match(new RegExp("^([ "+domUtils.fillChar+"]+)"));h&&h[1]&&(g+=h[1])}g=a.document.createTextNode(g),b.insertNode(g).setStartAfter(g)}b.collapse(!0).select()}return a.fireEvent("saveScene"),!0}}),a.addListener("tabkeydown",function(b,c){var d=a.selection.getRange(),e=domUtils.findParentByTagName(d.startContainer,"pre",!0);if(e){if(a.fireEvent("saveScene"),c.shiftKey);else if(d.collapsed){var f=a.document.createTextNode(" ");d.insertNode(f).setStartAfter(f).collapse(!0).select(!0)}else{for(var g=d.createBookmark(),h=g.start.previousSibling;h;){if(e.firstChild===h&&!domUtils.isBr(h)){e.insertBefore(a.document.createTextNode(" "),h);break}if(domUtils.isBr(h)){e.insertBefore(a.document.createTextNode(" "),h.nextSibling);break}h=h.previousSibling}var i=g.end;for(h=g.start.nextSibling,e.firstChild===g.start&&e.insertBefore(a.document.createTextNode(" "),h.nextSibling);h&&h!==i;){if(domUtils.isBr(h)&&h.nextSibling){if(h.nextSibling===i)break;e.insertBefore(a.document.createTextNode(" "),h.nextSibling)}h=h.nextSibling}d.moveToBookmark(g).select()}return a.fireEvent("saveScene"),!0}}),a.addListener("beforeinserthtml",function(a,b){var c=this,d=c.selection.getRange(),e=domUtils.findParentByTagName(d.startContainer,"pre",!0);if(e){d.collapsed||d.deleteContents();var f="";if(browser.ie&&browser.version>8){utils.each(UE.filterNode(UE.htmlparser(b),c.options.filterTxtRules).children,function(a){"element"==a.type?"br"==a.tagName?f+="\n":dtd.$empty[a.tagName]||(utils.each(a.children,function(b){"element"==b.type?"br"==b.tagName?f+="\n":dtd.$empty[a.tagName]||(f+=b.innerText()):f+=b.data}),/\n$/.test(f)||(f+="\n")):f+=a.data+"\n",!a.nextSibling()&&/\n$/.test(f)&&(f=f.replace(/\n$/,""))});var g=c.document.createTextNode(utils.html(f.replace(/ /g," ")));d.insertNode(g).selectNode(g).select()}else{var h=c.document.createDocumentFragment();utils.each(UE.filterNode(UE.htmlparser(b),c.options.filterTxtRules).children,function(a){"element"==a.type?"br"==a.tagName?h.appendChild(c.document.createElement("br")):dtd.$empty[a.tagName]||(utils.each(a.children,function(b){"element"==b.type?"br"==b.tagName?h.appendChild(c.document.createElement("br")):dtd.$empty[a.tagName]||h.appendChild(c.document.createTextNode(utils.html(b.innerText().replace(/ /g," ")))):h.appendChild(c.document.createTextNode(utils.html(b.data.replace(/ /g," "))))}),"BR"!=h.lastChild.nodeName&&h.appendChild(c.document.createElement("br"))):h.appendChild(c.document.createTextNode(utils.html(a.data.replace(/ /g," ")))),a.nextSibling()||"BR"!=h.lastChild.nodeName||h.removeChild(h.lastChild)}),d.insertNode(h).select()}return!0}}),a.addListener("keydown",function(a,b){var c=this,d=b.keyCode||b.which;if(40==d){var e,f=c.selection.getRange(),g=f.startContainer;if(f.collapsed&&(e=domUtils.findParentByTagName(f.startContainer,"pre",!0))&&!e.nextSibling){for(var h=e.lastChild;h&&"BR"==h.nodeName;)h=h.previousSibling;(h===g||f.startContainer===e&&f.startOffset==e.childNodes.length)&&(c.execCommand("insertparagraph"),domUtils.preventDefault(b))}}}),a.addListener("delkeydown",function(b,c){var d=this.selection.getRange();d.txtToElmBoundary(!0);var e=d.startContainer;if(domUtils.isTagNode(e,"pre")&&d.collapsed&&domUtils.isStartInblock(d)){var f=a.document.createElement("p");return domUtils.fillNode(a.document,f),e.parentNode.insertBefore(f,e),domUtils.remove(e),d.setStart(f,0).setCursor(!1,!0),domUtils.preventDefault(c),!0}})},UE.commands.cleardoc={execCommand:function(a){var b=this,c=b.options.enterTag,d=b.selection.getRange();"br"==c?(b.body.innerHTML="
    ",d.setStart(b.body,0).setCursor()):(b.body.innerHTML="

    "+(ie?"":"
    ")+"

    ",d.setStart(b.body.firstChild,0).setCursor(!1,!0)),setTimeout(function(){b.fireEvent("clearDoc")},0)}},UE.plugin.register("anchor",function(){return{bindEvents:{ready:function(){utils.cssRule("anchor",".anchorclass{background: url('"+this.options.themePath+this.options.theme+"/images/anchor.gif') no-repeat scroll left center transparent;cursor: auto;display: inline-block;height: 16px;width: 15px;}",this.document)}},outputRule:function(a){utils.each(a.getNodesByTagName("img"),function(a){var b;(b=a.getAttr("anchorname"))&&(a.tagName="a",a.setAttr({anchorname:"",name:b,"class":""}))})},inputRule:function(a){utils.each(a.getNodesByTagName("a"),function(a){var b;(b=a.getAttr("name"))&&!a.getAttr("href")&&(a.tagName="img",a.setAttr({anchorname:a.getAttr("name"),"class":"anchorclass"}),a.setAttr("name"))})},commands:{anchor:{execCommand:function(a,b){var c=this.selection.getRange(),d=c.getClosedNode();if(d&&d.getAttribute("anchorname"))b?d.setAttribute("anchorname",b):(c.setStartBefore(d).setCursor(),domUtils.remove(d));else if(b){var e=this.document.createElement("img");c.collapse(!0),domUtils.setAttributes(e,{anchorname:b,"class":"anchorclass"}),c.insertNode(e).setStartAfter(e).setCursor(!1,!0)}}}}}}),UE.plugins.wordcount=function(){var a=this;a.setOpt("wordCount",!0),a.addListener("contentchange",function(){a.fireEvent("wordcount")});var b;a.addListener("ready",function(){var a=this;domUtils.on(a.body,"keyup",function(c){var d=c.keyCode||c.which,e={16:1,18:1,20:1,37:1,38:1,39:1,40:1};d in e||(clearTimeout(b),b=setTimeout(function(){a.fireEvent("wordcount")},200))})})},UE.plugins.pagebreak=function(){function a(a){if(domUtils.isEmptyBlock(a)){for(var b,d=a.firstChild;d&&1==d.nodeType&&domUtils.isEmptyBlock(d);)b=d,d=d.firstChild;!b&&(b=a),domUtils.fillNode(c.document,b)}}function b(a){return a&&1==a.nodeType&&"HR"==a.tagName&&"pagebreak"==a.className}var c=this,d=["td"];c.setOpt("pageBreakTag","_ueditor_page_break_tag_"),c.ready(function(){utils.cssRule("pagebreak",".pagebreak{display:block;clear:both !important;cursor:default !important;width: 100% !important;margin:0;}",c.document)}),c.addInputRule(function(a){a.traversal(function(a){if("text"==a.type&&a.data==c.options.pageBreakTag){var b=UE.uNode.createElement('
    ');a.parentNode.insertBefore(b,a),a.parentNode.removeChild(a)}})}),c.addOutputRule(function(a){utils.each(a.getNodesByTagName("hr"),function(a){if("pagebreak"==a.getAttr("class")){var b=UE.uNode.createText(c.options.pageBreakTag);a.parentNode.insertBefore(b,a),a.parentNode.removeChild(a)}})}),c.commands.pagebreak={execCommand:function(){var e=c.selection.getRange(),f=c.document.createElement("hr");domUtils.setAttributes(f,{"class":"pagebreak",noshade:"noshade",size:"5"}),domUtils.unSelectable(f);var g,h=domUtils.findParentByTagName(e.startContainer,d,!0),i=[];if(h)switch(h.tagName){case"TD":if(g=h.parentNode,g.previousSibling)g.parentNode.insertBefore(f,g),i=domUtils.findParents(f);else{var j=domUtils.findParentByTagName(g,"table");j.parentNode.insertBefore(f,j),i=domUtils.findParents(f,!0)}g=i[1],f!==g&&domUtils.breakParent(f,g),c.fireEvent("afteradjusttable",c.document)}else{if(!e.collapsed){e.deleteContents();for(var k=e.startContainer;!domUtils.isBody(k)&&domUtils.isBlockElm(k)&&domUtils.isEmptyNode(k);)e.setStartBefore(k).collapse(!0),domUtils.remove(k),k=e.startContainer}e.insertNode(f);for(var l,g=f.parentNode;!domUtils.isBody(g);)domUtils.breakParent(f,g),l=f.nextSibling,l&&domUtils.isEmptyBlock(l)&&domUtils.remove(l),g=f.parentNode;l=f.nextSibling;var m=f.previousSibling;if(b(m)?domUtils.remove(m):m&&a(m),l)b(l)?domUtils.remove(l):a(l),e.setEndAfter(f).collapse(!1);else{var n=c.document.createElement("p");f.parentNode.appendChild(n),domUtils.fillNode(c.document,n),e.setStart(n,0).collapse(!0)}e.select(!0)}}}},UE.plugin.register("wordimage",function(){var a=this,b=[];return{commands:{wordimage:{execCommand:function(){for(var b,c=domUtils.getElementsByTagName(a.body,"img"),d=[],e=0;b=c[e++];){var f=b.getAttribute("word_img");f&&d.push(f)}return d},queryCommandState:function(){b=domUtils.getElementsByTagName(a.body,"img");for(var c,d=0;c=b[d++];)if(c.getAttribute("word_img"))return 1;return-1},notNeedUndo:!0}},inputRule:function(b){utils.each(b.getNodesByTagName("img"),function(b){var c=b.attrs,d=parseInt(c.width)<128||parseInt(c.height)<43,e=a.options,f=e.UEDITOR_HOME_URL+"themes/default/images/spacer.gif";c.src&&/^(?:(file:\/+))/.test(c.src)&&b.setAttr({width:c.width,height:c.height,alt:c.alt,word_img:c.src,src:f,style:"background:url("+(d?e.themePath+e.theme+"/images/word.gif":e.langPath+e.lang+"/images/localimage.png")+") no-repeat center center;border:1px solid #ddd"})})}}}),UE.plugins.dragdrop=function(){var a=this;a.ready(function(){domUtils.on(this.body,"dragend",function(){var b=a.selection.getRange(),c=b.getClosedNode()||a.selection.getStart();if(c&&"IMG"==c.tagName){for(var d,e=c.previousSibling;(d=c.nextSibling)&&1==d.nodeType&&"SPAN"==d.tagName&&!d.firstChild;)domUtils.remove(d);(!e||1!=e.nodeType||domUtils.isEmptyBlock(e))&&e||d&&(!d||domUtils.isEmptyBlock(d))||(e&&"P"==e.tagName&&!domUtils.isEmptyBlock(e)?(e.appendChild(c),domUtils.moveChild(d,e),domUtils.remove(d)):d&&"P"==d.tagName&&!domUtils.isEmptyBlock(d)&&d.insertBefore(c,d.firstChild),e&&"P"==e.tagName&&domUtils.isEmptyBlock(e)&&domUtils.remove(e),d&&"P"==d.tagName&&domUtils.isEmptyBlock(d)&&domUtils.remove(d),b.selectNode(c).select(),a.fireEvent("saveScene"))}})}),a.addListener("keyup",function(b,c){var d=c.keyCode||c.which;if(13==d){var e,f=a.selection.getRange();(e=domUtils.findParentByTagName(f.startContainer,"p",!0))&&"center"==domUtils.getComputedStyle(e,"text-align")&&domUtils.removeStyle(e,"text-align")}})},UE.plugins.undo=function(){function a(a,b){if(a.length!=b.length)return 0;for(var c=0,d=a.length;cf&&this.list.shift(),this.index=this.list.length-1,this.clearKey(),this.update())},this.update=function(){this.hasRedo=!!this.list[this.index+1],this.hasUndo=!!this.list[this.index-1]},this.reset=function(){this.list=[],this.index=0,this.hasUndo=!1,this.hasRedo=!1,this.clearKey()},this.clearKey=function(){m=0,k=null}}var d,e=this,f=e.options.maxUndoCount||20,g=e.options.maxInputCount||20,h=new RegExp(domUtils.fillChar+"|","gi"),i={ol:1,ul:1,table:1,tbody:1,tr:1,body:1},j=e.options.autoClearEmptyNode;e.undoManger=new c,e.undoManger.editor=e,e.addListener("saveScene",function(){var a=Array.prototype.splice.call(arguments,1);this.undoManger.save.apply(this.undoManger,a)}),e.addListener("reset",function(a,b){b||this.undoManger.reset()}),e.commands.redo=e.commands.undo={execCommand:function(a){this.undoManger[a]()},queryCommandState:function(a){return this.undoManger["has"+("undo"==a.toLowerCase()?"Undo":"Redo")]?0:-1},notNeedUndo:1};var k,l={16:1,17:1,18:1,37:1,38:1,39:1,40:1},m=0,n=!1;e.addListener("ready",function(){domUtils.on(this.body,"compositionstart",function(){n=!0}),domUtils.on(this.body,"compositionend",function(){n=!1})}),e.addshortcutkey({Undo:"ctrl+90",Redo:"ctrl+89"});var o=!0;e.addListener("keydown",function(a,b){function c(a){a.undoManger.save(!1,!0),a.fireEvent("selectionchange")}var e=this,f=b.keyCode||b.which;if(!(l[f]||b.ctrlKey||b.metaKey||b.shiftKey||b.altKey)){if(n)return;if(!e.selection.getRange().collapsed)return e.undoManger.save(!1,!0),void(o=!1);0==e.undoManger.list.length&&e.undoManger.save(!0),clearTimeout(d),d=setTimeout(function(){if(n)var a=setInterval(function(){n||(c(e),clearInterval(a))},300);else c(e)},200),k=f,m++,m>=g&&c(e)}}),e.addListener("keyup",function(a,b){var c=b.keyCode||b.which;if(!(l[c]||b.ctrlKey||b.metaKey||b.shiftKey||b.altKey)){if(n)return;o||(this.undoManger.save(!1,!0),o=!0)}}),e.stopCmdUndo=function(){e.__hasEnterExecCommand=!0},e.startCmdUndo=function(){e.__hasEnterExecCommand=!1}},UE.plugin.register("copy",function(){function a(){ZeroClipboard.config({debug:!1,swfPath:b.options.UEDITOR_HOME_URL+"third-party/zeroclipboard/ZeroClipboard.swf"});var a=b.zeroclipboard=new ZeroClipboard;a.on("copy",function(a){var c=a.client,d=b.selection.getRange(),e=document.createElement("div");e.appendChild(d.cloneContents()),c.setText(e.innerText||e.textContent),c.setHtml(e.innerHTML),d.select()}),a.on("mouseover mouseout",function(a){var b=a.target;"mouseover"==a.type?domUtils.addClass(b,"edui-state-hover"):"mouseout"==a.type&&domUtils.removeClasses(b,"edui-state-hover")}),a.on("wrongflash noflash",function(){ZeroClipboard.destroy()})}var b=this;return{bindEvents:{ready:function(){browser.ie||(window.ZeroClipboard?a():utils.loadFile(document,{src:b.options.UEDITOR_HOME_URL+"third-party/zeroclipboard/ZeroClipboard.js",tag:"script",type:"text/javascript",defer:"defer"},function(){a()}))}},commands:{copy:{execCommand:function(a){b.document.execCommand("copy")||alert(b.getLang("copymsg"))}}}}}),UE.plugins.paste=function(){function a(a){var b=this.document;if(!b.getElementById("baidu_pastebin")){var c=this.selection.getRange(),d=c.createBookmark(),e=b.createElement("div");e.id="baidu_pastebin",browser.webkit&&e.appendChild(b.createTextNode(domUtils.fillChar+domUtils.fillChar)),b.body.appendChild(e),d.start.style.display="",e.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;left:-1000px;white-space:nowrap;top:"+domUtils.getXY(d.start).y+"px",c.selectNodeContents(e).select(!0),setTimeout(function(){if(browser.webkit)for(var f,g=0,h=b.querySelectorAll("#baidu_pastebin");f=h[g++];){if(!domUtils.isEmptyNode(f)){e=f;break}domUtils.remove(f)}try{e.parentNode.removeChild(e)}catch(i){}c.moveToBookmark(d).select(!0),a(e)},0)}}function b(a){return a.replace(/<(\/?)([\w\-]+)([^>]*)>/gi,function(a,b,c,d){return c=c.toLowerCase(),{img:1}[c]?a:(d=d.replace(/([\w\-]*?)\s*=\s*(("([^"]*)")|('([^']*)')|([^\s>]+))/gi,function(a,b,c){return{src:1,href:1,name:1}[b.toLowerCase()]?b+"="+c+" ":""}),{span:1,div:1}[c]?"":"<"+b+c+" "+utils.trim(d)+">")})}function c(a){var c;if(a.firstChild){for(var h,i=domUtils.getElementsByTagName(a,"span"),j=0;h=i[j++];)"_baidu_cut_start"!=h.id&&"_baidu_cut_end"!=h.id||domUtils.remove(h);if(browser.webkit){for(var k,l=a.querySelectorAll("div br"),j=0;k=l[j++];){var m=k.parentNode;"DIV"==m.tagName&&1==m.childNodes.length&&(m.innerHTML="


    ",domUtils.remove(m))}for(var n,o=a.querySelectorAll("#baidu_pastebin"),j=0;n=o[j++];){var p=d.document.createElement("p");for(n.parentNode.insertBefore(p,n);n.firstChild;)p.appendChild(n.firstChild);domUtils.remove(n)}for(var q,r=a.querySelectorAll("meta"),j=0;q=r[j++];)domUtils.remove(q);var l=a.querySelectorAll("br");for(j=0;q=l[j++];)/^apple-/i.test(q.className)&&domUtils.remove(q)}if(browser.gecko){var s=a.querySelectorAll("[_moz_dirty]");for(j=0;q=s[j++];)q.removeAttribute("_moz_dirty")}if(!browser.ie)for(var q,t=a.querySelectorAll("span.Apple-style-span"),j=0;q=t[j++];)domUtils.remove(q,!0);c=a.innerHTML,c=UE.filterWord(c);var u=UE.htmlparser(c);if(d.options.filterRules&&UE.filterNode(u,d.options.filterRules),d.filterInputRule(u),browser.webkit){var v=u.lastChild();v&&"element"==v.type&&"br"==v.tagName&&u.removeChild(v),utils.each(d.body.querySelectorAll("div"),function(a){domUtils.isEmptyBlock(a)&&domUtils.remove(a,!0)})}if(c={html:u.toHtml()},d.fireEvent("beforepaste",c,u),!c.html)return;u=UE.htmlparser(c.html,!0),1===d.queryCommandState("pasteplain")?d.execCommand("insertHtml",UE.filterNode(u,d.options.filterTxtRules).toHtml(),!0):(UE.filterNode(u,d.options.filterTxtRules),e=u.toHtml(),f=c.html,g=d.selection.getRange().createAddress(!0),d.execCommand("insertHtml",d.getOpt("retainOnlyLabelPasted")===!0?b(f):f,!0)),d.fireEvent("afterpaste",c)}}var d=this;d.setOpt({retainOnlyLabelPasted:!1});var e,f,g;d.addListener("pasteTransfer",function(a,c){if(g&&e&&f&&e!=f){var h=d.selection.getRange();if(h.moveToAddress(g,!0),!h.collapsed){for(;!domUtils.isBody(h.startContainer);){var i=h.startContainer;if(1==i.nodeType){if(i=i.childNodes[h.startOffset],!i){h.setStartBefore(h.startContainer);continue}var j=i.previousSibling;j&&3==j.nodeType&&new RegExp("^[\n\r\t "+domUtils.fillChar+"]*$").test(j.nodeValue)&&h.setStartBefore(j)}if(0!=h.startOffset)break;h.setStartBefore(h.startContainer)}for(;!domUtils.isBody(h.endContainer);){var k=h.endContainer;if(1==k.nodeType){if(k=k.childNodes[h.endOffset],!k){h.setEndAfter(h.endContainer);continue}var l=k.nextSibling;l&&3==l.nodeType&&new RegExp("^[\n\r\t"+domUtils.fillChar+"]*$").test(l.nodeValue)&&h.setEndAfter(l)}if(h.endOffset!=h.endContainer[3==h.endContainer.nodeType?"nodeValue":"childNodes"].length)break;h.setEndAfter(h.endContainer)}}h.deleteContents(),h.select(!0),d.__hasEnterExecCommand=!0;var m=f;2===c?m=b(m):c&&(m=e),d.execCommand("inserthtml",m,!0),d.__hasEnterExecCommand=!1;for(var n=d.selection.getRange();!domUtils.isBody(n.startContainer)&&!n.startOffset&&n.startContainer[3==n.startContainer.nodeType?"nodeValue":"childNodes"].length;)n.setStartBefore(n.startContainer);var o=n.createAddress(!0);g.endAddress=o.startAddress}}),d.addListener("ready",function(){domUtils.on(d.body,"cut",function(){var a=d.selection.getRange();!a.collapsed&&d.undoManger&&d.undoManger.save()}),domUtils.on(d.body,browser.ie||browser.opera?"keydown":"paste",function(b){(!browser.ie&&!browser.opera||(b.ctrlKey||b.metaKey)&&"86"==b.keyCode)&&a.call(d,function(a){c(a)})})}),d.commands.paste={execCommand:function(b){browser.ie?(a.call(d,function(a){c(a)}),d.document.execCommand("paste")):alert(d.getLang("pastemsg"))}}},UE.plugins.pasteplain=function(){var a=this;a.setOpt({pasteplain:!1,filterTxtRules:function(){function a(a){a.tagName="p",a.setStyle()}function b(a){a.parentNode.removeChild(a,!0)}return{"-":"script style object iframe embed input select",p:{$:{}},br:{$:{}},div:function(a){for(var b,c=UE.uNode.createElement("p");b=a.firstChild();)"text"!=b.type&&UE.dom.dtd.$block[b.tagName]?c.firstChild()?(a.parentNode.insertBefore(c,a),c=UE.uNode.createElement("p")):a.parentNode.insertBefore(b,a):c.appendChild(b);c.firstChild()&&a.parentNode.insertBefore(c,a),a.parentNode.removeChild(a)},ol:b,ul:b,dl:b,dt:b,dd:b,li:b,caption:a,th:a,tr:a,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,td:function(a){var b=!!a.innerText();b&&a.parentNode.insertAfter(UE.uNode.createText("    "),a),a.parentNode.removeChild(a,a.innerText())}}}()});var b=a.options.pasteplain;a.commands.pasteplain={queryCommandState:function(){return b?1:0},execCommand:function(){b=0|!b},notNeedUndo:1}},UE.plugins.list=function(){function a(a){var b=[];for(var c in a)b.push(c);return b}function b(a){var b=a.className;return domUtils.hasClass(a,/custom_/)?b.match(/custom_(\w+)/)[1]:domUtils.getStyle(a,"list-style-type")}function c(a,c){utils.each(domUtils.getElementsByTagName(a,"ol ul"),function(f){if(domUtils.inDoc(f,a)){var g=f.parentNode;if(g.tagName==f.tagName){var h=b(f)||("OL"==f.tagName?"decimal":"disc"),i=b(g)||("OL"==g.tagName?"decimal":"disc");if(h==i){var l=utils.indexOf(k[f.tagName],h);l=l+1==k[f.tagName].length?0:l+1,e(f,k[f.tagName][l])}}var m=0,n=2;domUtils.hasClass(f,/custom_/)?/[ou]l/i.test(g.tagName)&&domUtils.hasClass(g,/custom_/)||(n=1):/[ou]l/i.test(g.tagName)&&domUtils.hasClass(g,/custom_/)&&(n=3);var o=domUtils.getStyle(f,"list-style-type");o&&(f.style.cssText="list-style-type:"+o),f.className=utils.trim(f.className.replace(/list-paddingleft-\w+/,""))+" list-paddingleft-"+n,utils.each(domUtils.getElementsByTagName(f,"li"),function(a){if(a.style.cssText&&(a.style.cssText=""),!a.firstChild)return void domUtils.remove(a);if(a.parentNode===f){if(m++,domUtils.hasClass(f,/custom_/)){var c=1,d=b(f);if("OL"==f.tagName){if(d)switch(d){case"cn":case"cn1":case"cn2":m>10&&(m%10==0||m>10&&m<20)?c=2:m>20&&(c=3);break;case"num2":m>9&&(c=2)}a.className="list-"+j[d]+m+" list-"+d+"-paddingleft-"+c}else a.className="list-"+j[d]+" list-"+d+"-paddingleft"}else a.className=a.className.replace(/list-[\w\-]+/gi,"");var e=a.getAttribute("class");null===e||e.replace(/\s/g,"")||domUtils.removeAttributes(a,"class")}}),!c&&d(f,f.tagName.toLowerCase(),b(f)||domUtils.getStyle(f,"list-style-type"),!0)}})}function d(a,d,e,f){var g=a.nextSibling;g&&1==g.nodeType&&g.tagName.toLowerCase()==d&&(b(g)||domUtils.getStyle(g,"list-style-type")||("ol"==d?"decimal":"disc"))==e&&(domUtils.moveChild(g,a),0==g.childNodes.length&&domUtils.remove(g)),g&&domUtils.isFillChar(g)&&domUtils.remove(g);var h=a.previousSibling;h&&1==h.nodeType&&h.tagName.toLowerCase()==d&&(b(h)||domUtils.getStyle(h,"list-style-type")||("ol"==d?"decimal":"disc"))==e&&domUtils.moveChild(a,h),h&&domUtils.isFillChar(h)&&domUtils.remove(h),!f&&domUtils.isEmptyBlock(a)&&domUtils.remove(a),b(a)&&c(a.ownerDocument,!0)}function e(a,b){j[b]&&(a.className="custom_"+b);try{domUtils.setStyle(a,"list-style-type",b)}catch(c){}}function f(a){var b=a.previousSibling;b&&domUtils.isEmptyBlock(b)&&domUtils.remove(b),b=a.nextSibling,b&&domUtils.isEmptyBlock(b)&&domUtils.remove(b)}function g(a){for(;a&&!domUtils.isBody(a);){if("TABLE"==a.nodeName)return null;if("LI"==a.nodeName)return a;a=a.parentNode}}var h=this,i={TD:1,PRE:1,BLOCKQUOTE:1},j={cn:"cn-1-",cn1:"cn-2-",cn2:"cn-3-",num:"num-1-",num1:"num-2-",num2:"num-3-",dash:"dash",dot:"dot"};h.setOpt({autoTransWordToList:!1,insertorderedlist:{num:"",num1:"",num2:"",cn:"",cn1:"",cn2:"",decimal:"","lower-alpha":"","lower-roman":"","upper-alpha":"","upper-roman":""},insertunorderedlist:{circle:"",disc:"",square:"",dash:"",dot:""},listDefaultPaddingLeft:"30",listiconpath:"http://bs.baidu.com/listicon/",maxListLevel:-1,disablePInList:!1});var k={OL:a(h.options.insertorderedlist),UL:a(h.options.insertunorderedlist)},l=h.options.listiconpath;for(var m in j)h.options.insertorderedlist.hasOwnProperty(m)||h.options.insertunorderedlist.hasOwnProperty(m)||delete j[m];h.ready(function(){var a=[];for(var b in j){if("dash"==b||"dot"==b)a.push("li.list-"+j[b]+"{background-image:url("+l+j[b]+".gif)}"),a.push("ul.custom_"+b+"{list-style:none;}ul.custom_"+b+" li{background-position:0 3px;background-repeat:no-repeat}");else{for(var c=0;c<99;c++)a.push("li.list-"+j[b]+c+"{background-image:url("+l+"list-"+j[b]+c+".gif)}");a.push("ol.custom_"+b+"{list-style:none;}ol.custom_"+b+" li{background-position:0 3px;background-repeat:no-repeat}")}switch(b){case"cn":a.push("li.list-"+b+"-paddingleft-1{padding-left:25px}"),a.push("li.list-"+b+"-paddingleft-2{padding-left:40px}"),a.push("li.list-"+b+"-paddingleft-3{padding-left:55px}");break;case"cn1":a.push("li.list-"+b+"-paddingleft-1{padding-left:30px}"),a.push("li.list-"+b+"-paddingleft-2{padding-left:40px}"),a.push("li.list-"+b+"-paddingleft-3{padding-left:55px}");break;case"cn2":a.push("li.list-"+b+"-paddingleft-1{padding-left:40px}"),a.push("li.list-"+b+"-paddingleft-2{padding-left:55px}"),a.push("li.list-"+b+"-paddingleft-3{padding-left:68px}");break;case"num":case"num1":a.push("li.list-"+b+"-paddingleft-1{padding-left:25px}");break;case"num2":a.push("li.list-"+b+"-paddingleft-1{padding-left:35px}"),a.push("li.list-"+b+"-paddingleft-2{padding-left:40px}");break;case"dash":a.push("li.list-"+b+"-paddingleft{padding-left:35px}");break;case"dot":a.push("li.list-"+b+"-paddingleft{padding-left:20px}")}}a.push(".list-paddingleft-1{padding-left:0}"),a.push(".list-paddingleft-2{padding-left:"+h.options.listDefaultPaddingLeft+"px}"),a.push(".list-paddingleft-3{padding-left:"+2*h.options.listDefaultPaddingLeft+"px}"),utils.cssRule("list","ol,ul{margin:0;pading:0;"+(browser.ie?"":"width:95%")+"}li{clear:both;}"+a.join("\n"),h.document)}),h.ready(function(){domUtils.on(h.body,"cut",function(){setTimeout(function(){var a,b=h.selection.getRange();if(!b.collapsed&&(a=domUtils.findParentByTagName(b.startContainer,"li",!0))&&!a.nextSibling&&domUtils.isEmptyBlock(a)){var c,d=a.parentNode;if(c=d.previousSibling)domUtils.remove(d),b.setStartAtLast(c).collapse(!0),b.select(!0);else if(c=d.nextSibling)domUtils.remove(d),b.setStartAtFirst(c).collapse(!0),b.select(!0);else{var e=h.document.createElement("p");domUtils.fillNode(h.document,e),d.parentNode.insertBefore(e,d),domUtils.remove(d),b.setStart(e,0).collapse(!0),b.select(!0)}}})})}),h.addListener("beforepaste",function(a,c){var d,e=this,f=e.selection.getRange(),g=UE.htmlparser(c.html,!0);if(d=domUtils.findParentByTagName(f.startContainer,"li",!0)){var h=d.parentNode,i="OL"==h.tagName?"ul":"ol";utils.each(g.getNodesByTagName(i),function(c){if(c.tagName=h.tagName,c.setAttr(),c.parentNode===g)a=b(h)||("OL"==h.tagName?"decimal":"disc");else{var d=c.parentNode.getAttr("class");a=d&&/custom_/.test(d)?d.match(/custom_(\w+)/)[1]:c.parentNode.getStyle("list-style-type"),a||(a="OL"==h.tagName?"decimal":"disc")}var e=utils.indexOf(k[h.tagName],a);c.parentNode!==g&&(e=e+1==k[h.tagName].length?0:e+1);var f=k[h.tagName][e];j[f]?c.setAttr("class","custom_"+f):c.setStyle("list-style-type",f)})}c.html=g.toHtml()}),h.getOpt("disablePInList")===!0&&h.addOutputRule(function(a){utils.each(a.getNodesByTagName("li"),function(a){var b=[],c=0;utils.each(a.children,function(d){if("p"==d.tagName){for(var e;e=d.children.pop();)b.splice(c,0,e),e.parentNode=a,lastNode=e;if(e=b[b.length-1],!e||"element"!=e.type||"br"!=e.tagName){var f=UE.uNode.createElement("br");f.parentNode=a,b.push(f)}c=b.length}}),b.length&&(a.children=b)})}),h.addInputRule(function(a){function b(a,b){var e=b.firstChild();if(e&&"element"==e.type&&"span"==e.tagName&&/Wingdings|Symbol/.test(e.getStyle("font-family"))){for(var f in d)if(d[f]==e.data)return f;return"disc"}for(var f in c)if(c[f].test(a))return f}if(utils.each(a.getNodesByTagName("li"),function(a){for(var b,c=UE.uNode.createElement("p"),d=0;b=a.children[d];)"text"==b.type||dtd.p[b.tagName]?c.appendChild(b):c.firstChild()?(a.insertBefore(c,b),c=UE.uNode.createElement("p"),d+=2):d++;(c.firstChild()&&!c.parentNode||!a.firstChild())&&a.appendChild(c),c.firstChild()||c.innerHTML(browser.ie?" ":"
    ");var e=a.firstChild(),f=e.lastChild();f&&"text"==f.type&&/^\s*$/.test(f.data)&&e.removeChild(f)}),h.options.autoTransWordToList){var c={num1:/^\d+\)/,decimal:/^\d+\./,"lower-alpha":/^[a-z]+\)/,"upper-alpha":/^[A-Z]+\./,cn:/^[\u4E00\u4E8C\u4E09\u56DB\u516d\u4e94\u4e03\u516b\u4e5d]+[\u3001]/,cn2:/^\([\u4E00\u4E8C\u4E09\u56DB\u516d\u4e94\u4e03\u516b\u4e5d]+\)/},d={square:"n"};utils.each(a.getNodesByTagName("p"),function(a){function d(a,b,d){if("ol"==a.tagName)if(browser.ie){var e=b.firstChild();"element"==e.type&&"span"==e.tagName&&c[d].test(e.innerText())&&b.removeChild(e)}else b.innerHTML(b.innerHTML().replace(c[d],""));else b.removeChild(b.firstChild());var f=UE.uNode.createElement("li");f.appendChild(b),a.appendChild(f)}if("MsoListParagraph"==a.getAttr("class")){a.setStyle("margin",""),a.setStyle("margin-left",""),a.setAttr("class","");var e,f=a,g=a;if("li"!=a.parentNode.tagName&&(e=b(a.innerText(),a))){var i=UE.uNode.createElement(h.options.insertorderedlist.hasOwnProperty(e)?"ol":"ul");for(j[e]?i.setAttr("class","custom_"+e):i.setStyle("list-style-type",e);a&&"li"!=a.parentNode.tagName&&b(a.innerText(),a);)f=a.nextSibling(),f||a.parentNode.insertBefore(i,a),d(i,a,e),a=f;!i.parentNode&&a&&a.parentNode&&a.parentNode.insertBefore(i,a)}var k=g.firstChild();k&&"element"==k.type&&"span"==k.tagName&&/^\s*( )+\s*$/.test(k.innerText())&&k.parentNode.removeChild(k)}})}}),h.addListener("contentchange",function(){c(h.document)}),h.addListener("keydown",function(a,b){function c(){b.preventDefault?b.preventDefault():b.returnValue=!1,h.fireEvent("contentchange"),h.undoManger&&h.undoManger.save()}function d(a,b){for(;a&&!domUtils.isBody(a);){if(b(a))return null;if(1==a.nodeType&&/[ou]l/i.test(a.tagName))return a;a=a.parentNode}return null}var e=b.keyCode||b.which;if(13==e&&!b.shiftKey){var g=h.selection.getRange(),i=domUtils.findParent(g.startContainer,function(a){return domUtils.isBlockElm(a)},!0),j=domUtils.findParentByTagName(g.startContainer,"li",!0);if(i&&"PRE"!=i.tagName&&!j){var k=i.innerHTML.replace(new RegExp(domUtils.fillChar,"g"),"");/^\s*1\s*\.[^\d]/.test(k)&&(i.innerHTML=k.replace(/^\s*1\s*\./,""),g.setStartAtLast(i).collapse(!0).select(),h.__hasEnterExecCommand=!0,h.execCommand("insertorderedlist"),h.__hasEnterExecCommand=!1)}var l=h.selection.getRange(),m=d(l.startContainer,function(a){return"TABLE"==a.tagName}),n=l.collapsed?m:d(l.endContainer,function(a){return"TABLE"==a.tagName});if(m&&n&&m===n){if(!l.collapsed){if(m=domUtils.findParentByTagName(l.startContainer,"li",!0),n=domUtils.findParentByTagName(l.endContainer,"li",!0),!m||!n||m!==n){var o=l.cloneRange(),p=o.collapse(!1).createBookmark();l.deleteContents(),o.moveToBookmark(p);var j=domUtils.findParentByTagName(o.startContainer,"li",!0);return f(j),o.select(),void c()}if(l.deleteContents(),j=domUtils.findParentByTagName(l.startContainer,"li",!0),j&&domUtils.isEmptyBlock(j))return v=j.previousSibling,next=j.nextSibling,s=h.document.createElement("p"),domUtils.fillNode(h.document,s),q=j.parentNode,v&&next?(l.setStart(next,0).collapse(!0).select(!0),domUtils.remove(j)):((v||next)&&v?j.parentNode.parentNode.insertBefore(s,q.nextSibling):q.parentNode.insertBefore(s,q),domUtils.remove(j),q.firstChild||domUtils.remove(q), -l.setStart(s,0).setCursor()),void c()}if(j=domUtils.findParentByTagName(l.startContainer,"li",!0)){if(domUtils.isEmptyBlock(j)){p=l.createBookmark();var q=j.parentNode;if(j!==q.lastChild?(domUtils.breakParent(j,q),f(j)):(q.parentNode.insertBefore(j,q.nextSibling),domUtils.isEmptyNode(q)&&domUtils.remove(q)),!dtd.$list[j.parentNode.tagName])if(domUtils.isBlockElm(j.firstChild))domUtils.remove(j,!0);else{for(s=h.document.createElement("p"),j.parentNode.insertBefore(s,j);j.firstChild;)s.appendChild(j.firstChild);domUtils.remove(j)}l.moveToBookmark(p).select()}else{var r=j.firstChild;if(!r||!domUtils.isBlockElm(r)){var s=h.document.createElement("p");for(!j.firstChild&&domUtils.fillNode(h.document,s);j.firstChild;)s.appendChild(j.firstChild);j.appendChild(s),r=s}var t=h.document.createElement("span");l.insertNode(t),domUtils.breakParent(t,j);var u=t.nextSibling;r=u.firstChild,r||(s=h.document.createElement("p"),domUtils.fillNode(h.document,s),u.appendChild(s),r=s),domUtils.isEmptyNode(r)&&(r.innerHTML="",domUtils.fillNode(h.document,r)),l.setStart(r,0).collapse(!0).shrinkBoundary().select(),domUtils.remove(t);var v=u.previousSibling;v&&domUtils.isEmptyBlock(v)&&(v.innerHTML="

    ",domUtils.fillNode(h.document,v.firstChild))}c()}}}if(8==e&&(l=h.selection.getRange(),l.collapsed&&domUtils.isStartInblock(l)&&(o=l.cloneRange().trimBoundary(),j=domUtils.findParentByTagName(l.startContainer,"li",!0),j&&domUtils.isStartInblock(o)))){if(m=domUtils.findParentByTagName(l.startContainer,"p",!0),m&&m!==j.firstChild){var q=domUtils.findParentByTagName(m,["ol","ul"]);return domUtils.breakParent(m,q),f(m),h.fireEvent("contentchange"),l.setStart(m,0).setCursor(!1,!0),h.fireEvent("saveScene"),void domUtils.preventDefault(b)}if(j&&(v=j.previousSibling)){if(46==e&&j.childNodes.length)return;if(dtd.$list[v.tagName]&&(v=v.lastChild),h.undoManger&&h.undoManger.save(),r=j.firstChild,domUtils.isBlockElm(r))if(domUtils.isEmptyNode(r))for(v.appendChild(r),l.setStart(r,0).setCursor(!1,!0);j.firstChild;)v.appendChild(j.firstChild);else t=h.document.createElement("span"),l.insertNode(t),domUtils.isEmptyBlock(v)&&(v.innerHTML=""),domUtils.moveChild(j,v),l.setStartBefore(t).collapse(!0).select(!0),domUtils.remove(t);else if(domUtils.isEmptyNode(j)){var s=h.document.createElement("p");v.appendChild(s),l.setStart(s,0).setCursor()}else for(l.setEnd(v,v.childNodes.length).collapse().select(!0);j.firstChild;)v.appendChild(j.firstChild);return domUtils.remove(j),h.fireEvent("contentchange"),h.fireEvent("saveScene"),void domUtils.preventDefault(b)}if(j&&!j.previousSibling){var q=j.parentNode,p=l.createBookmark();if(domUtils.isTagNode(q.parentNode,"ol ul"))q.parentNode.insertBefore(j,q),domUtils.isEmptyNode(q)&&domUtils.remove(q);else{for(;j.firstChild;)q.parentNode.insertBefore(j.firstChild,q);domUtils.remove(j),domUtils.isEmptyNode(q)&&domUtils.remove(q)}return l.moveToBookmark(p).setCursor(!1,!0),h.fireEvent("contentchange"),h.fireEvent("saveScene"),void domUtils.preventDefault(b)}}}),h.addListener("keyup",function(a,c){var e=c.keyCode||c.which;if(8==e){var f,g=h.selection.getRange();(f=domUtils.findParentByTagName(g.startContainer,["ol","ul"],!0))&&d(f,f.tagName.toLowerCase(),b(f)||domUtils.getComputedStyle(f,"list-style-type"),!0)}}),h.addListener("tabkeydown",function(){function a(a){if(h.options.maxListLevel!=-1){for(var b=a.parentNode,c=0;/[ou]l/i.test(b.tagName);)c++,b=b.parentNode;if(c>=h.options.maxListLevel)return!0}}var c=h.selection.getRange(),f=domUtils.findParentByTagName(c.startContainer,"li",!0);if(f){var g;if(!c.collapsed){h.fireEvent("saveScene"),g=c.createBookmark();for(var i,j,l=0,m=domUtils.findParents(f);j=m[l++];)if(domUtils.isTagNode(j,"ol ul")){i=j;break}var n=f;if(g.end)for(;n&&!(domUtils.getPosition(n,g.end)&domUtils.POSITION_FOLLOWING);)if(a(n))n=domUtils.getNextDomNode(n,!1,null,function(a){return a!==i});else{var o=n.parentNode,p=h.document.createElement(o.tagName),q=utils.indexOf(k[p.tagName],b(o)||domUtils.getComputedStyle(o,"list-style-type")),r=q+1==k[p.tagName].length?0:q+1,s=k[p.tagName][r];for(e(p,s),o.insertBefore(p,n);n&&!(domUtils.getPosition(n,g.end)&domUtils.POSITION_FOLLOWING);){if(f=n.nextSibling,p.appendChild(n),!f||domUtils.isTagNode(f,"ol ul")){if(f)for(;(f=f.firstChild)&&"LI"!=f.tagName;);else f=domUtils.getNextDomNode(n,!1,null,function(a){return a!==i});break}n=f}d(p,p.tagName.toLowerCase(),s),n=f}return h.fireEvent("contentchange"),c.moveToBookmark(g).select(),!0}if(a(f))return!0;var o=f.parentNode,p=h.document.createElement(o.tagName),q=utils.indexOf(k[p.tagName],b(o)||domUtils.getComputedStyle(o,"list-style-type"));q=q+1==k[p.tagName].length?0:q+1;var s=k[p.tagName][q];if(e(p,s),domUtils.isStartInblock(c))return h.fireEvent("saveScene"),g=c.createBookmark(),o.insertBefore(p,f),p.appendChild(f),d(p,p.tagName.toLowerCase(),s),h.fireEvent("contentchange"),c.moveToBookmark(g).select(!0),!0}}),h.commands.insertorderedlist=h.commands.insertunorderedlist={execCommand:function(a,c){c||(c="insertorderedlist"==a.toLowerCase()?"decimal":"disc");var f=this,h=this.selection.getRange(),j=function(a){return 1==a.nodeType?"br"!=a.tagName.toLowerCase():!domUtils.isWhitespace(a)},k="insertorderedlist"==a.toLowerCase()?"ol":"ul",l=f.document.createDocumentFragment();h.adjustmentBoundary().shrinkBoundary();var m,n,o,p,q=h.createBookmark(!0),r=g(f.document.getElementById(q.start)),s=0,t=g(f.document.getElementById(q.end)),u=0;if(r||t){if(r&&(m=r.parentNode),q.end||(t=r),t&&(n=t.parentNode),m===n){for(;r!==t;){if(p=r,r=r.nextSibling,!domUtils.isBlockElm(p.firstChild)){for(var v=f.document.createElement("p");p.firstChild;)v.appendChild(p.firstChild);p.appendChild(v)}l.appendChild(p)}if(p=f.document.createElement("span"),m.insertBefore(p,t),!domUtils.isBlockElm(t.firstChild)){for(v=f.document.createElement("p");t.firstChild;)v.appendChild(t.firstChild);t.appendChild(v)}l.appendChild(t),domUtils.breakParent(p,m),domUtils.isEmptyNode(p.previousSibling)&&domUtils.remove(p.previousSibling),domUtils.isEmptyNode(p.nextSibling)&&domUtils.remove(p.nextSibling);var w=b(m)||domUtils.getComputedStyle(m,"list-style-type")||("insertorderedlist"==a.toLowerCase()?"decimal":"disc");if(m.tagName.toLowerCase()==k&&w==c){for(var x,y=0,z=f.document.createDocumentFragment();x=l.firstChild;)if(domUtils.isTagNode(x,"ol ul"))z.appendChild(x);else for(;x.firstChild;)z.appendChild(x.firstChild),domUtils.remove(x);p.parentNode.insertBefore(z,p)}else o=f.document.createElement(k),e(o,c),o.appendChild(l),p.parentNode.insertBefore(o,p);return domUtils.remove(p),o&&d(o,k,c),void h.moveToBookmark(q).select()}if(r){for(;r;){if(p=r.nextSibling,domUtils.isTagNode(r,"ol ul"))l.appendChild(r);else{for(var A=f.document.createDocumentFragment(),B=0;r.firstChild;)domUtils.isBlockElm(r.firstChild)&&(B=1),A.appendChild(r.firstChild);if(B)l.appendChild(A);else{var C=f.document.createElement("p");C.appendChild(A),l.appendChild(C)}domUtils.remove(r)}r=p}m.parentNode.insertBefore(l,m.nextSibling),domUtils.isEmptyNode(m)?(h.setStartBefore(m),domUtils.remove(m)):h.setStartAfter(m),s=1}if(t&&domUtils.inDoc(n,f.document)){for(r=n.firstChild;r&&r!==t;){if(p=r.nextSibling,domUtils.isTagNode(r,"ol ul"))l.appendChild(r);else{for(A=f.document.createDocumentFragment(),B=0;r.firstChild;)domUtils.isBlockElm(r.firstChild)&&(B=1),A.appendChild(r.firstChild);B?l.appendChild(A):(C=f.document.createElement("p"),C.appendChild(A),l.appendChild(C)),domUtils.remove(r)}r=p}var D=domUtils.createElement(f.document,"div",{tmpDiv:1});domUtils.moveChild(t,D),l.appendChild(D),domUtils.remove(t),n.parentNode.insertBefore(l,n),h.setEndBefore(n),domUtils.isEmptyNode(n)&&domUtils.remove(n),u=1}}s||h.setStartBefore(f.document.getElementById(q.start)),q.end&&!u&&h.setEndAfter(f.document.getElementById(q.end)),h.enlarge(!0,function(a){return i[a.tagName]}),l=f.document.createDocumentFragment();for(var E,F=h.createBookmark(),G=domUtils.getNextDomNode(F.start,!1,j),H=h.cloneRange(),I=domUtils.isBlockElm;G&&G!==F.end&&domUtils.getPosition(G,F.end)&domUtils.POSITION_PRECEDING;)if(3==G.nodeType||dtd.li[G.tagName]){if(1==G.nodeType&&dtd.$list[G.tagName]){for(;G.firstChild;)l.appendChild(G.firstChild);E=domUtils.getNextDomNode(G,!1,j),domUtils.remove(G),G=E;continue}for(E=G,H.setStartBefore(G);G&&G!==F.end&&(!I(G)||domUtils.isBookmarkNode(G));)E=G,G=domUtils.getNextDomNode(G,!1,null,function(a){return!i[a.tagName]});G&&I(G)&&(p=domUtils.getNextDomNode(E,!1,j),p&&domUtils.isBookmarkNode(p)&&(G=domUtils.getNextDomNode(p,!1,j),E=p)),H.setEndAfter(E),G=domUtils.getNextDomNode(E,!1,j);var J=h.document.createElement("li");if(J.appendChild(H.extractContents()),domUtils.isEmptyNode(J)){for(var E=h.document.createElement("p");J.firstChild;)E.appendChild(J.firstChild);J.appendChild(E)}l.appendChild(J)}else G=domUtils.getNextDomNode(G,!0,j);h.moveToBookmark(F).collapse(!0),o=f.document.createElement(k),e(o,c),o.appendChild(l),h.insertNode(o),d(o,k,c);for(var x,y=0,K=domUtils.getElementsByTagName(o,"div");x=K[y++];)x.getAttribute("tmpDiv")&&domUtils.remove(x,!0);h.moveToBookmark(q).select()},queryCommandState:function(a){for(var b,c="insertorderedlist"==a.toLowerCase()?"ol":"ul",d=this.selection.getStartElementPath(),e=0;b=d[e++];){if("TABLE"==b.nodeName)return 0;if(c==b.nodeName.toLowerCase())return 1}return 0},queryCommandValue:function(a){for(var c,d,e="insertorderedlist"==a.toLowerCase()?"ol":"ul",f=this.selection.getStartElementPath(),g=0;d=f[g++];){if("TABLE"==d.nodeName){c=null;break}if(e==d.nodeName.toLowerCase()){c=d;break}}return c?b(c)||domUtils.getComputedStyle(c,"list-style-type"):null}}},function(){var a={textarea:function(a,b){var c=b.ownerDocument.createElement("textarea");return c.style.cssText="position:absolute;resize:none;width:100%;height:100%;border:0;padding:0;margin:0;overflow-y:auto;",browser.ie&&browser.version<8&&(c.style.width=b.offsetWidth+"px",c.style.height=b.offsetHeight+"px",b.onresize=function(){c.style.width=b.offsetWidth+"px",c.style.height=b.offsetHeight+"px"}),b.appendChild(c),{setContent:function(a){c.value=a},getContent:function(){return c.value},select:function(){var a;browser.ie?(a=c.createTextRange(),a.collapse(!0),a.select()):(c.setSelectionRange(0,0),c.focus())},dispose:function(){b.removeChild(c),b.onresize=null,c=null,b=null}}},codemirror:function(a,b){var c=window.CodeMirror(b,{mode:"text/html",tabMode:"indent",lineNumbers:!0,lineWrapping:!0}),d=c.getWrapperElement();return d.style.cssText='position:absolute;left:0;top:0;width:100%;height:100%;font-family:consolas,"Courier new",monospace;font-size:13px;',c.getScrollerElement().style.cssText="position:absolute;left:0;top:0;width:100%;height:100%;",c.refresh(),{getCodeMirror:function(){return c},setContent:function(a){c.setValue(a)},getContent:function(){return c.getValue()},select:function(){c.focus()},dispose:function(){b.removeChild(d),d=null,c=null}}}};UE.plugins.source=function(){function b(b){return a["codemirror"==f.sourceEditor&&window.CodeMirror?"codemirror":"textarea"](e,b)}var c,d,e=this,f=this.options,g=!1;f.sourceEditor=browser.ie?"textarea":f.sourceEditor||"codemirror",e.setOpt({sourceEditorFirst:!1});var h,i,j;e.commands.source={execCommand:function(){if(g=!g){j=e.selection.getRange().createAddress(!1,!0),e.undoManger&&e.undoManger.save(!0),browser.gecko&&(e.body.contentEditable=!1),h=e.iframe.style.cssText,e.iframe.style.cssText+="position:absolute;left:-32768px;top:-32768px;",e.fireEvent("beforegetcontent");var a=UE.htmlparser(e.body.innerHTML);e.filterOutputRule(a),a.traversal(function(a){if("element"==a.type)switch(a.tagName){case"td":case"th":case"caption":a.children&&1==a.children.length&&"br"==a.firstChild().tagName&&a.removeChild(a.firstChild());break;case"pre":a.innerText(a.innerText().replace(/ /g," "))}}),e.fireEvent("aftergetcontent");var f=a.toHtml(!0);c=b(e.iframe.parentNode),c.setContent(f),d=e.setContent,e.setContent=function(a){var b=UE.htmlparser(a);e.filterInputRule(b),a=b.toHtml(),c.setContent(a)},setTimeout(function(){c.select(),e.addListener("fullscreenchanged",function(){try{c.getCodeMirror().refresh()}catch(a){}})}),i=e.getContent,e.getContent=function(){return c.getContent()||"

    "+(browser.ie?"":"
    ")+"

    "}}else{e.iframe.style.cssText=h;var k=c.getContent()||"

    "+(browser.ie?"":"
    ")+"

    ";k=k.replace(new RegExp("[\\r\\t\\n ]*]*)>","g"),function(a,b){return b&&!dtd.$inlineWithA[b.toLowerCase()]?a.replace(/(^[\n\r\t ]*)|([\n\r\t ]*$)/g,""):a.replace(/(^[\n\r\t]*)|([\n\r\t]*$)/g,"")}),e.setContent=d,e.setContent(k),c.dispose(),c=null,e.getContent=i;var l=e.body.firstChild;if(l||(e.body.innerHTML="

    "+(browser.ie?"":"
    ")+"

    ",l=e.body.firstChild),e.undoManger&&e.undoManger.save(!0),browser.gecko){var m=document.createElement("input");m.style.cssText="position:absolute;left:0;top:-32768px",document.body.appendChild(m),e.body.contentEditable=!1,setTimeout(function(){domUtils.setViewportOffset(m,{left:-32768,top:0}),m.focus(),setTimeout(function(){e.body.contentEditable=!0,e.selection.getRange().moveToAddress(j).select(!0),domUtils.remove(m)})})}else try{e.selection.getRange().moveToAddress(j).select(!0)}catch(n){}}this.fireEvent("sourcemodechanged",g)},queryCommandState:function(){return 0|g},notNeedUndo:1};var k=e.queryCommandState;e.queryCommandState=function(a){return a=a.toLowerCase(),g?a in{source:1,fullscreen:1}?1:-1:k.apply(this,arguments)},"codemirror"==f.sourceEditor&&e.addListener("ready",function(){utils.loadFile(document,{src:f.codeMirrorJsUrl||f.UEDITOR_HOME_URL+"third-party/codemirror/codemirror.js",tag:"script",type:"text/javascript",defer:"defer"},function(){f.sourceEditorFirst&&setTimeout(function(){e.execCommand("source")},0)}),utils.loadFile(document,{tag:"link",rel:"stylesheet",type:"text/css",href:f.codeMirrorCssUrl||f.UEDITOR_HOME_URL+"third-party/codemirror/codemirror.css"})})}}(),UE.plugins.enterkey=function(){var a,b=this,c=b.options.enterTag;b.addListener("keyup",function(c,d){var e=d.keyCode||d.which;if(13==e){var f,g=b.selection.getRange(),h=g.startContainer;if(browser.ie)b.fireEvent("saveScene",!0,!0);else{if(/h\d/i.test(a)){if(browser.gecko){var i=domUtils.findParentByTagName(h,["h1","h2","h3","h4","h5","h6","blockquote","caption","table"],!0);i||(b.document.execCommand("formatBlock",!1,"

    "),f=1)}else if(1==h.nodeType){var j,k=b.document.createTextNode("");if(g.insertNode(k),j=domUtils.findParentByTagName(k,"div",!0)){for(var l=b.document.createElement("p");j.firstChild;)l.appendChild(j.firstChild);j.parentNode.insertBefore(l,j),domUtils.remove(j),g.setStartBefore(k).setCursor(),f=1}domUtils.remove(k)}b.undoManger&&f&&b.undoManger.save()}browser.opera&&g.select()}}}),b.addListener("keydown",function(d,e){var f=e.keyCode||e.which;if(13==f){if(b.fireEvent("beforeenterkeydown"))return void domUtils.preventDefault(e);b.fireEvent("saveScene",!0,!0),a="";var g=b.selection.getRange();if(!g.collapsed){var h=g.startContainer,i=g.endContainer,j=domUtils.findParentByTagName(h,"td",!0),k=domUtils.findParentByTagName(i,"td",!0);if(j&&k&&j!==k||!j&&k||j&&!k)return void(e.preventDefault?e.preventDefault():e.returnValue=!1)}if("p"==c)browser.ie||(h=domUtils.findParentByTagName(g.startContainer,["ol","ul","p","h1","h2","h3","h4","h5","h6","blockquote","caption"],!0),h||browser.opera?(a=h.tagName,"p"==h.tagName.toLowerCase()&&browser.gecko&&domUtils.removeDirtyAttr(h)):(b.document.execCommand("formatBlock",!1,"

    "),browser.gecko&&(g=b.selection.getRange(),h=domUtils.findParentByTagName(g.startContainer,"p",!0),h&&domUtils.removeDirtyAttr(h))));else if(e.preventDefault?e.preventDefault():e.returnValue=!1,g.collapsed){m=g.document.createElement("br"),g.insertNode(m);var l=m.parentNode;l.lastChild===m?(m.parentNode.insertBefore(m.cloneNode(!0),m),g.setStartBefore(m)):g.setStartAfter(m),g.setCursor()}else if(g.deleteContents(),h=g.startContainer,1==h.nodeType&&(h=h.childNodes[g.startOffset])){for(;1==h.nodeType;){if(dtd.$empty[h.tagName])return g.setStartBefore(h).setCursor(),b.undoManger&&b.undoManger.save(),!1;if(!h.firstChild){var m=g.document.createElement("br");return h.appendChild(m),g.setStart(h,0).setCursor(),b.undoManger&&b.undoManger.save(),!1}h=h.firstChild}h===g.startContainer.childNodes[g.startOffset]?(m=g.document.createElement("br"),g.insertNode(m).setCursor()):g.setStart(h,0).setCursor()}else m=g.document.createElement("br"),g.insertNode(m).setStartAfter(m).setCursor()}})},UE.plugins.keystrokes=function(){var a=this,b=!0;a.addListener("keydown",function(c,d){var e=d.keyCode||d.which,f=a.selection.getRange();if(!f.collapsed&&!(d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)&&(e>=65&&e<=90||e>=48&&e<=57||e>=96&&e<=111||{13:1,8:1,46:1}[e])){var g=f.startContainer;if(domUtils.isFillChar(g)&&f.setStartBefore(g),g=f.endContainer,domUtils.isFillChar(g)&&f.setEndAfter(g),f.txtToElmBoundary(),f.endContainer&&1==f.endContainer.nodeType&&(g=f.endContainer.childNodes[f.endOffset],g&&domUtils.isBr(g)&&f.setEndAfter(g)),0==f.startOffset&&(g=f.startContainer,domUtils.isBoundaryNode(g,"firstChild")&&(g=f.endContainer,f.endOffset==(3==g.nodeType?g.nodeValue.length:g.childNodes.length)&&domUtils.isBoundaryNode(g,"lastChild"))))return a.fireEvent("saveScene"),a.body.innerHTML="

    "+(browser.ie?"":"
    ")+"

    ",f.setStart(a.body.firstChild,0).setCursor(!1,!0),void a._selectionChange()}if(e==keymap.Backspace){if(f=a.selection.getRange(),b=f.collapsed,a.fireEvent("delkeydown",d))return;var h,i;if(f.collapsed&&f.inFillChar()&&(h=f.startContainer,domUtils.isFillChar(h)?(f.setStartBefore(h).shrinkBoundary(!0).collapse(!0),domUtils.remove(h)):(h.nodeValue=h.nodeValue.replace(new RegExp("^"+domUtils.fillChar),""),f.startOffset--,f.collapse(!0).select(!0))),h=f.getClosedNode())return a.fireEvent("saveScene"),f.setStartBefore(h),domUtils.remove(h),f.setCursor(),a.fireEvent("saveScene"),void domUtils.preventDefault(d);if(!browser.ie&&(h=domUtils.findParentByTagName(f.startContainer,"table",!0),i=domUtils.findParentByTagName(f.endContainer,"table",!0),h&&!i||!h&&i||h!==i))return void d.preventDefault()}if(e==keymap.Tab){var j={ol:1,ul:1,table:1};if(a.fireEvent("tabkeydown",d))return void domUtils.preventDefault(d);var k=a.selection.getRange();a.fireEvent("saveScene");for(var l=0,m="",n=a.options.tabSize||4,o=a.options.tabNode||" ";l"});d.insertNode(g).setStart(g,0).setCursor(!1,!0)}}if(!b&&(3==d.startContainer.nodeType||1==d.startContainer.nodeType&&domUtils.isEmptyBlock(d.startContainer)))if(browser.ie){var k=d.document.createElement("span");d.insertNode(k).setStartBefore(k).collapse(!0),d.select(),domUtils.remove(k)}else d.select()}})},UE.plugins.fiximgclick=function(){function a(){this.editor=null,this.resizer=null,this.cover=null,this.doc=document,this.prePos={x:0,y:0},this.startPos={x:0,y:0}}var b=!1;return function(){var c=[[0,0,-1,-1],[0,0,0,-1],[0,0,1,-1],[0,0,-1,0],[0,0,1,0],[0,0,-1,1],[0,0,0,1],[0,0,1,1]];a.prototype={init:function(a){var b=this;b.editor=a,b.startPos=this.prePos={x:0,y:0},b.dragId=-1;var c=[],d=b.cover=document.createElement("div"),e=b.resizer=document.createElement("div");for(d.id=b.editor.ui.id+"_imagescale_cover",d.style.cssText="position:absolute;display:none;z-index:"+b.editor.options.zIndex+";filter:alpha(opacity=0); opacity:0;background:#CCC;",domUtils.on(d,"mousedown click",function(){b.hide()}),i=0;i<8;i++)c.push('');e.id=b.editor.ui.id+"_imagescale",e.className="edui-editor-imagescale",e.innerHTML=c.join(""),e.style.cssText+=";display:none;border:1px solid #3b77ff;z-index:"+b.editor.options.zIndex+";",b.editor.ui.getDom().appendChild(d),b.editor.ui.getDom().appendChild(e),b.initStyle(),b.initEvents()},initStyle:function(){utils.cssRule("imagescale",".edui-editor-imagescale{display:none;position:absolute;border:1px solid #38B2CE;cursor:hand;-webkit-box-sizing: content-box;-moz-box-sizing: content-box;box-sizing: content-box;}.edui-editor-imagescale span{position:absolute;width:6px;height:6px;overflow:hidden;font-size:0px;display:block;background-color:#3C9DD0;}.edui-editor-imagescale .edui-editor-imagescale-hand0{cursor:nw-resize;top:0;margin-top:-4px;left:0;margin-left:-4px;}.edui-editor-imagescale .edui-editor-imagescale-hand1{cursor:n-resize;top:0;margin-top:-4px;left:50%;margin-left:-4px;}.edui-editor-imagescale .edui-editor-imagescale-hand2{cursor:ne-resize;top:0;margin-top:-4px;left:100%;margin-left:-3px;}.edui-editor-imagescale .edui-editor-imagescale-hand3{cursor:w-resize;top:50%;margin-top:-4px;left:0;margin-left:-4px;}.edui-editor-imagescale .edui-editor-imagescale-hand4{cursor:e-resize;top:50%;margin-top:-4px;left:100%;margin-left:-3px;}.edui-editor-imagescale .edui-editor-imagescale-hand5{cursor:sw-resize;top:100%;margin-top:-3px;left:0;margin-left:-4px;}.edui-editor-imagescale .edui-editor-imagescale-hand6{cursor:s-resize;top:100%;margin-top:-3px;left:50%;margin-left:-4px;}.edui-editor-imagescale .edui-editor-imagescale-hand7{cursor:se-resize;top:100%;margin-top:-3px;left:100%;margin-left:-3px;}")},initEvents:function(){var a=this;a.startPos.x=a.startPos.y=0,a.isDraging=!1},_eventHandler:function(a){var c=this;switch(a.type){case"mousedown":var d,d=a.target||a.srcElement;d.className.indexOf("edui-editor-imagescale-hand")!=-1&&c.dragId==-1&&(c.dragId=d.className.slice(-1),c.startPos.x=c.prePos.x=a.clientX,c.startPos.y=c.prePos.y=a.clientY,domUtils.on(c.doc,"mousemove",c.proxy(c._eventHandler,c)));break;case"mousemove":c.dragId!=-1&&(c.updateContainerStyle(c.dragId,{x:a.clientX-c.prePos.x,y:a.clientY-c.prePos.y}),c.prePos.x=a.clientX,c.prePos.y=a.clientY,b=!0,c.updateTargetElement());break;case"mouseup":c.dragId!=-1&&(c.updateContainerStyle(c.dragId,{x:a.clientX-c.prePos.x,y:a.clientY-c.prePos.y}),c.updateTargetElement(),c.target.parentNode&&c.attachTo(c.target),c.dragId=-1),domUtils.un(c.doc,"mousemove",c.proxy(c._eventHandler,c)),b&&(b=!1,c.editor.fireEvent("contentchange"))}},updateTargetElement:function(){var a=this;domUtils.setStyles(a.target,{width:a.resizer.style.width,height:a.resizer.style.height}),a.target.width=parseInt(a.resizer.style.width),a.target.height=parseInt(a.resizer.style.height),a.attachTo(a.target)},updateContainerStyle:function(a,b){var d,e=this,f=e.resizer;0!=c[a][0]&&(d=parseInt(f.style.left)+b.x,f.style.left=e._validScaledProp("left",d)+"px"),0!=c[a][1]&&(d=parseInt(f.style.top)+b.y,f.style.top=e._validScaledProp("top",d)+"px"),0!=c[a][2]&&(d=f.clientWidth+c[a][2]*b.x,f.style.width=e._validScaledProp("width",d)+"px"),0!=c[a][3]&&(d=f.clientHeight+c[a][3]*b.y,f.style.height=e._validScaledProp("height",d)+"px")},_validScaledProp:function(a,b){var c=this.resizer,d=document;switch(b=isNaN(b)?0:b,a){case"left":return b<0?0:b+c.clientWidth>d.clientWidth?d.clientWidth-c.clientWidth:b;case"top":return b<0?0:b+c.clientHeight>d.clientHeight?d.clientHeight-c.clientHeight:b;case"width":return b<=0?1:b+c.offsetLeft>d.clientWidth?d.clientWidth-c.offsetLeft:b;case"height":return b<=0?1:b+c.offsetTop>d.clientHeight?d.clientHeight-c.offsetTop:b}},hideCover:function(){this.cover.style.display="none"},showCover:function(){var a=this,b=domUtils.getXY(a.editor.ui.getDom()),c=domUtils.getXY(a.editor.iframe);domUtils.setStyles(a.cover,{width:a.editor.iframe.offsetWidth+"px",height:a.editor.iframe.offsetHeight+"px",top:c.y-b.y+"px",left:c.x-b.x+"px",position:"absolute",display:""})},show:function(a){var b=this;b.resizer.style.display="block",a&&b.attachTo(a),domUtils.on(this.resizer,"mousedown",b.proxy(b._eventHandler,b)),domUtils.on(b.doc,"mouseup",b.proxy(b._eventHandler,b)),b.showCover(),b.editor.fireEvent("afterscaleshow",b),b.editor.fireEvent("saveScene")},hide:function(){var a=this;a.hideCover(),a.resizer.style.display="none",domUtils.un(a.resizer,"mousedown",a.proxy(a._eventHandler,a)),domUtils.un(a.doc,"mouseup",a.proxy(a._eventHandler,a)),a.editor.fireEvent("afterscalehide",a)},proxy:function(a,b){return function(c){return a.apply(b||this,arguments)}},attachTo:function(a){var b=this,c=b.target=a,d=this.resizer,e=domUtils.getXY(c),f=domUtils.getXY(b.editor.iframe),g=domUtils.getXY(d.parentNode);domUtils.setStyles(d,{width:c.width+"px",height:c.height+"px",left:f.x+e.x-b.editor.document.body.scrollLeft-g.x-parseInt(d.style.borderLeftWidth)+"px",top:f.y+e.y-b.editor.document.body.scrollTop-g.y-parseInt(d.style.borderTopWidth)+"px"})}}}(),function(){var b,c=this;c.setOpt("imageScaleEnabled",!0),!browser.ie&&c.options.imageScaleEnabled&&c.addListener("click",function(d,e){var f=c.selection.getRange(),g=f.getClosedNode();if(g&&"IMG"==g.tagName&&"false"!=c.body.contentEditable){if(g.className.indexOf("edui-faked-music")!=-1||g.getAttribute("anchorname")||domUtils.hasClass(g,"loadingclass")||domUtils.hasClass(g,"loaderrorclass"))return;if(!b){b=new a,b.init(c),c.ui.getDom().appendChild(b.resizer);var h,i=function(a){b.hide(),b.target&&c.selection.getRange().selectNode(b.target).select()},j=function(a){var b=a.target||a.srcElement;!b||void 0!==b.className&&b.className.indexOf("edui-editor-imagescale")!=-1||i(a)};c.addListener("afterscaleshow",function(a){c.addListener("beforekeydown",i),c.addListener("beforemousedown",j),domUtils.on(document,"keydown",i),domUtils.on(document,"mousedown",j),c.selection.getNative().removeAllRanges()}),c.addListener("afterscalehide",function(a){c.removeListener("beforekeydown",i),c.removeListener("beforemousedown",j),domUtils.un(document,"keydown",i),domUtils.un(document,"mousedown",j);var d=b.target;d.parentNode&&c.selection.getRange().selectNode(d).select()}),domUtils.on(b.resizer,"mousedown",function(a){c.selection.getNative().removeAllRanges();var d=a.target||a.srcElement;d&&d.className.indexOf("edui-editor-imagescale-hand")==-1&&(h=setTimeout(function(){b.hide(),b.target&&c.selection.getRange().selectNode(d).select()},200))}),domUtils.on(b.resizer,"mouseup",function(a){var b=a.target||a.srcElement;b&&b.className.indexOf("edui-editor-imagescale-hand")==-1&&clearTimeout(h)})}b.show(g)}else b&&"none"!=b.resizer.style.display&&b.hide()}),browser.webkit&&c.addListener("click",function(a,b){if("IMG"==b.target.tagName&&"false"!=c.body.contentEditable){var d=new dom.Range(c.document);d.selectNode(b.target).select()}})}}(),UE.plugin.register("autolink",function(){var a=0;return browser.ie?{}:{bindEvents:{reset:function(){a=0},keydown:function(a,b){var c=this,d=b.keyCode||b.which;if(32==d||13==d){for(var e,f,g=c.selection.getNative(),h=g.getRangeAt(0).cloneRange(),i=h.startContainer;1==i.nodeType&&h.startOffset>0&&(i=h.startContainer.childNodes[h.startOffset-1]);)h.setStart(i,1==i.nodeType?i.childNodes.length:i.nodeValue.length),h.collapse(!0),i=h.startContainer;do{if(0==h.startOffset){for(i=h.startContainer.previousSibling;i&&1==i.nodeType;)i=i.lastChild;if(!i||domUtils.isFillChar(i))break;e=i.nodeValue.length}else i=h.startContainer,e=h.startOffset;h.setStart(i,e-1),f=h.toString().charCodeAt(0)}while(160!=f&&32!=f);if(h.toString().replace(new RegExp(domUtils.fillChar,"g"),"").match(/(?:https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)/i)){for(;h.toString().length&&!/^(?:https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.)/i.test(h.toString());)try{h.setStart(h.startContainer,h.startOffset+1)}catch(j){for(var i=h.startContainer;!(next=i.nextSibling);){if(domUtils.isBody(i))return;i=i.parentNode}h.setStart(next,0)}if(domUtils.findParentByTagName(h.startContainer,"a",!0))return;var k,l=c.document.createElement("a"),m=c.document.createTextNode(" ");c.undoManger&&c.undoManger.save(),l.appendChild(h.extractContents()),l.href=l.innerHTML=l.innerHTML.replace(/<[^>]+>/g,""),k=l.getAttribute("href").replace(new RegExp(domUtils.fillChar,"g"),""),k=/^(?:https?:\/\/)/gi.test(k)?k:"http://"+k,l.setAttribute("_src",utils.html(k)),l.href=utils.html(k),h.insertNode(l),l.parentNode.insertBefore(m,l.nextSibling),h.setStart(m,0),h.collapse(!0),g.removeAllRanges(),g.addRange(h),c.undoManger&&c.undoManger.save()}}}}}},function(){function a(a){if(3==a.nodeType)return null;if("A"==a.nodeName)return a;for(var b=a.lastChild;b;){if("A"==b.nodeName)return b;if(3==b.nodeType){if(domUtils.isWhitespace(b)){b=b.previousSibling;continue}return null}b=b.lastChild}}var b={37:1,38:1,39:1,40:1,13:1,32:1};browser.ie&&this.addListener("keyup",function(c,d){var e=this,f=d.keyCode;if(b[f]){var g=e.selection.getRange(),h=g.startContainer;if(13==f){for(;h&&!domUtils.isBody(h)&&!domUtils.isBlockElm(h);)h=h.parentNode;if(h&&!domUtils.isBody(h)&&"P"==h.nodeName){var i=h.previousSibling;if(i&&1==i.nodeType){var i=a(i);i&&!i.getAttribute("_href")&&domUtils.remove(i,!0)}}}else if(32==f)3==h.nodeType&&/^\s$/.test(h.nodeValue)&&(h=h.previousSibling,h&&"A"==h.nodeName&&!h.getAttribute("_href")&&domUtils.remove(h,!0));else if(h=domUtils.findParentByTagName(h,"a",!0),h&&!h.getAttribute("_href")){var j=g.createBookmark();domUtils.remove(h,!0),g.moveToBookmark(j).select(!0)}}})}),UE.plugins.autoheight=function(){function a(){var a=this;clearTimeout(e),f||(!a.queryCommandState||a.queryCommandState&&1!=a.queryCommandState("source"))&&(e=setTimeout(function(){for(var b=a.body.lastChild;b&&1!=b.nodeType;)b=b.previousSibling;b&&1==b.nodeType&&(b.style.clear="both",d=Math.max(domUtils.getXY(b).y+b.offsetHeight+25,Math.max(h.minFrameHeight,h.initialFrameHeight)),d!=g&&(d!==parseInt(a.iframe.parentNode.style.height)&&(a.iframe.parentNode.style.height=d+"px"),a.body.style.height=d+"px",g=d),domUtils.removeStyle(b,"clear"))},50))}var b=this;if(b.autoHeightEnabled=b.options.autoHeightEnabled!==!1,b.autoHeightEnabled){var c,d,e,f,g=0,h=b.options;b.addListener("fullscreenchanged",function(a,b){f=b}),b.addListener("destroy",function(){b.removeListener("contentchange afterinserthtml keyup mouseup",a)}),b.enableAutoHeight=function(){var b=this;if(b.autoHeightEnabled){var d=b.document;b.autoHeightEnabled=!0,c=d.body.style.overflowY,d.body.style.overflowY="hidden",b.addListener("contentchange afterinserthtml keyup mouseup",a),setTimeout(function(){a.call(b)},browser.gecko?100:0),b.fireEvent("autoheightchanged",b.autoHeightEnabled)}},b.disableAutoHeight=function(){b.body.style.overflowY=c||"",b.removeListener("contentchange",a),b.removeListener("keyup",a),b.removeListener("mouseup",a),b.autoHeightEnabled=!1,b.fireEvent("autoheightchanged",b.autoHeightEnabled)},b.on("setHeight",function(){b.disableAutoHeight()}),b.addListener("ready",function(){b.enableAutoHeight();var c;domUtils.on(browser.ie?b.body:b.document,browser.webkit?"dragover":"drop",function(){ -clearTimeout(c),c=setTimeout(function(){a.call(b)},100)});var d;window.onscroll=function(){null===d?d=this.scrollY:0==this.scrollY&&0!=d&&(b.window.scrollTo(0,0),d=null)}})}},UE.plugins.autofloat=function(){function a(){return UE.ui?1:(alert(g.autofloatMsg),0)}function b(){var a=document.body.style;a.backgroundImage='url("about:blank")',a.backgroundAttachment="fixed"}function c(){var a=domUtils.getXY(k),b=domUtils.getComputedStyle(k,"position"),c=domUtils.getComputedStyle(k,"left");k.style.width=k.offsetWidth+"px",k.style.zIndex=1*f.options.zIndex+1,k.parentNode.insertBefore(q,k),o||p&&browser.ie?("absolute"!=k.style.position&&(k.style.position="absolute"),k.style.top=(document.body.scrollTop||document.documentElement.scrollTop)-l+i+"px"):(browser.ie7Compat&&r&&(r=!1,k.style.left=domUtils.getXY(k).x-document.documentElement.getBoundingClientRect().left+2+"px"),"fixed"!=k.style.position&&(k.style.position="fixed",k.style.top=i+"px",("absolute"==b||"relative"==b)&&parseFloat(c)&&(k.style.left=a.x+"px")))}function d(){r=!0,q.parentNode&&q.parentNode.removeChild(q),k.style.cssText=j}function e(){var a=m(f.container),b=f.options.toolbarTopOffset||0;a.top<0&&a.bottom-k.offsetHeight>b?c():d()}var f=this,g=f.getLang();f.setOpt({topOffset:0});var h=f.options.autoFloatEnabled!==!1,i=f.options.topOffset;if(h){var j,k,l,m,n=UE.ui.uiUtils,o=browser.ie&&browser.version<=6,p=browser.quirks,q=document.createElement("div"),r=!0,s=utils.defer(function(){e()},browser.ie?200:100,!0);f.addListener("destroy",function(){domUtils.un(window,["scroll","resize"],e),f.removeListener("keydown",s)}),f.addListener("ready",function(){if(a(f)){if(!f.ui)return;m=n.getClientRect,k=f.ui.getDom("toolbarbox"),l=m(k).top,j=k.style.cssText,q.style.height=k.offsetHeight+"px",o&&b(),domUtils.on(window,["scroll","resize"],e),f.addListener("keydown",s),f.addListener("beforefullscreenchange",function(a,b){b&&d()}),f.addListener("fullscreenchanged",function(a,b){b||e()}),f.addListener("sourcemodechanged",function(a,b){setTimeout(function(){e()},0)}),f.addListener("clearDoc",function(){setTimeout(function(){e()},0)})}})}},UE.plugins.video=function(){function a(a,b,d,e,f,g,h){a=utils.unhtmlForUrl(a),f=utils.unhtml(f),g=utils.unhtml(g).trim(),b=parseInt(b,10)||0,d=parseInt(d,10)||0;var i;switch(h){case"image":i="';break;case"embed":i='';break;case"video":var j=a.substr(a.lastIndexOf(".")+1);"ogv"==j&&(j="ogg"),i="'}return i}function b(b,c){utils.each(b.getNodesByTagName(c?"img":"embed video"),function(b){var d=b.getAttr("class");if(d&&d.indexOf("edui-faked-video")!=-1){var e=a(c?b.getAttr("_url"):b.getAttr("src"),b.getAttr("width"),b.getAttr("height"),null,b.getStyle("float")||"",d,c?"embed":"image");b.parentNode.replaceChild(UE.uNode.createElement(e),b)}if(d&&d.indexOf("edui-upload-video")!=-1){var e=a(c?b.getAttr("_url"):b.getAttr("src"),b.getAttr("width"),b.getAttr("height"),null,b.getStyle("float")||"",d,c?"video":"image");b.parentNode.replaceChild(UE.uNode.createElement(e),b)}})}var c=this;c.addOutputRule(function(a){b(a,!0)}),c.addInputRule(function(a){b(a)}),c.commands.insertvideo={execCommand:function(b,d,e){d=utils.isArray(d)?d:[d];for(var f,g,h=[],i="tmpVedio",j=0,k=d.length;j0)return 0;for(var c in dtd.$isNotEmpty)if(dtd.$isNotEmpty.hasOwnProperty(c)&&a.getElementsByTagName(c).length)return 0;return 1},b.getWidth=function(a){return a?parseInt(domUtils.getComputedStyle(a,"width"),10):0},b.getTableCellAlignState=function(a){!utils.isArray(a)&&(a=[a]);var b={},c=["align","valign"],d=null,e=!0;return utils.each(a,function(a){return utils.each(c,function(c){if(d=a.getAttribute(c),!b[c]&&d)b[c]=d;else if(!b[c]||d!==b[c])return e=!1,!1}),e}),e?b:null},b.getTableItemsByRange=function(a){var b=a.selection.getStart();b&&b.id&&0===b.id.indexOf("_baidu_bookmark_start_")&&b.nextSibling&&(b=b.nextSibling);var c=b&&domUtils.findParentByTagName(b,["td","th"],!0),d=c&&c.parentNode,e=b&&domUtils.findParentByTagName(b,"caption",!0),f=e?e.parentNode:d&&d.parentNode.parentNode;return{cell:c,tr:d,table:f,caption:e}},b.getUETableBySelected=function(a){var c=b.getTableItemsByRange(a).table;return c&&c.ueTable&&c.ueTable.selectedTds.length?c.ueTable:null},b.getDefaultValue=function(a,b){var c,d,e,f,g={thin:"0px",medium:"1px",thick:"2px"};if(b)return h=b.getElementsByTagName("td")[0],f=domUtils.getComputedStyle(b,"border-left-width"),c=parseInt(g[f]||f,10),f=domUtils.getComputedStyle(h,"padding-left"),d=parseInt(g[f]||f,10),f=domUtils.getComputedStyle(h,"border-left-width"),e=parseInt(g[f]||f,10),{tableBorder:c,tdPadding:d,tdBorder:e};b=a.document.createElement("table"),b.insertRow(0).insertCell(0).innerHTML="xxx",a.body.appendChild(b);var h=b.getElementsByTagName("td")[0];return f=domUtils.getComputedStyle(b,"border-left-width"),c=parseInt(g[f]||f,10),f=domUtils.getComputedStyle(h,"padding-left"),d=parseInt(g[f]||f,10),f=domUtils.getComputedStyle(h,"border-left-width"),e=parseInt(g[f]||f,10),domUtils.remove(b),{tableBorder:c,tdPadding:d,tdBorder:e}},b.getUETable=function(a){var c=a.tagName.toLowerCase();return a="td"==c||"th"==c||"caption"==c?domUtils.findParentByTagName(a,"table",!0):a,a.ueTable||(a.ueTable=new b(a)),a.ueTable},b.cloneCell=function(a,b,c){if(!a||utils.isString(a))return this.table.ownerDocument.createElement(a||"td");var d=domUtils.hasClass(a,"selectTdClass");d&&domUtils.removeClasses(a,"selectTdClass");var e=a.cloneNode(!0);return b&&(e.rowSpan=e.colSpan=1),!c&&domUtils.removeAttributes(e,"width height"),!c&&domUtils.removeAttributes(e,"style"),e.style.borderLeftStyle="",e.style.borderTopStyle="",e.style.borderLeftColor=a.style.borderRightColor,e.style.borderLeftWidth=a.style.borderRightWidth,e.style.borderTopColor=a.style.borderBottomColor,e.style.borderTopWidth=a.style.borderBottomWidth,d&&domUtils.addClass(a,"selectTdClass"),e},b.prototype={getMaxRows:function(){for(var a,b=this.table.rows,c=1,d=0;a=b[d];d++){for(var e,f=1,g=0;e=a.cells[g++];)f=Math.max(e.rowSpan||1,f);c=Math.max(f+d,c)}return c},getMaxCols:function(){for(var a,b=this.table.rows,c=0,d={},e=0;a=b[e];e++){for(var f,g=0,h=0;f=a.cells[h++];)if(g+=f.colSpan||1,f.rowSpan&&f.rowSpan>1)for(var i=1;ithis.rowsNum-1)?null:(e=c?h?i.endRowIndex+1:g.rowIndex+g.rowSpan:h?i.beginRowIndex-1:g.rowIndex-1,f=h?i.beginColIndex:g.colIndex,this.getCell(this.indexTable[e][f].rowIndex,this.indexTable[e][f].cellIndex))}catch(j){a(j)}},getSameEndPosCells:function(b,c){try{for(var d="x"===c.toLowerCase(),e=domUtils.getXY(b)[d?"x":"y"]+b["offset"+(d?"Width":"Height")],f=this.table.rows,g=null,h=[],i=0;ie&&d)break;if((b==j||e==l)&&(1==j[d?"colSpan":"rowSpan"]&&h.push(j),d))break}}return h}catch(m){a(m)}},setCellContent:function(a,b){a.innerHTML=b||(browser.ie?domUtils.fillChar:"
    ")},cloneCell:b.cloneCell,getSameStartPosXCells:function(b){try{for(var c,d=domUtils.getXY(b).x+b.offsetWidth,e=this.table.rows,f=[],g=0;gd)break;if(j==d&&1==h.colSpan){f.push(h);break}}}return f}catch(k){a(k)}},update:function(a){this.table=a||this.table,this.selectedTds=[],this.cellsRange={},this.indexTable=[];for(var b=this.table.rows,c=this.getMaxRows(),d=c-b.length,e=this.getMaxCols();d--;)this.table.insertRow(b.length);this.rowsNum=c,this.colsNum=e;for(var f=0,g=b.length;fc&&(j.rowSpan=c);for(var m=k,n=j.rowSpan||1,o=j.colSpan||1;this.indexTable[i][m];)m++;for(var p=0;p0)for(h=b;hf&&(m=Math.max(h,m));if(ee&&(l=Math.max(i,l));if(b>0)for(i=a;ig||d+b.colSpan-1>h)return null;j.push(this.getCell(c,b.cellIndex))}}return j},clearSelected:function(){b.removeSelectedClass(this.selectedTds),this.selectedTds=[],this.cellsRange={}},setSelected:function(a){var c=this.getCells(a);b.addSelectedClass(c),this.selectedTds=c,this.cellsRange=a},isFullRow:function(){var a=this.cellsRange;return a.endColIndex-a.beginColIndex+1==this.colsNum},isFullCol:function(){var a=this.cellsRange,b=this.table,c=b.getElementsByTagName("th"),d=a.endRowIndex-a.beginRowIndex+1;return c.length?d==this.rowsNum||d==this.rowsNum-1:d==this.rowsNum},getNextCell:function(b,c,d){try{var e,f,g=this.getCellInfo(b),h=this.selectedTds.length&&!d,i=this.cellsRange;return!c&&0==g.rowIndex||c&&(h?i.endRowIndex==this.rowsNum-1:g.rowIndex+g.rowSpan>this.rowsNum-1)?null:(e=c?h?i.endRowIndex+1:g.rowIndex+g.rowSpan:h?i.beginRowIndex-1:g.rowIndex-1,f=h?i.beginColIndex:g.colIndex,this.getCell(this.indexTable[e][f].rowIndex,this.indexTable[e][f].cellIndex))}catch(j){a(j)}},getPreviewCell:function(b,c){try{var d,e,f=this.getCellInfo(b),g=this.selectedTds.length,h=this.cellsRange;return!c&&(g?!h.beginColIndex:!f.colIndex)||c&&(g?h.endColIndex==this.colsNum-1:f.rowIndex>this.colsNum-1)?null:(d=c?g?h.beginRowIndex:f.rowIndex<1?0:f.rowIndex-1:g?h.beginRowIndex:f.rowIndex,e=c?g?h.endColIndex+1:f.colIndex:g?h.beginColIndex-1:f.colIndex<1?0:f.colIndex-1,this.getCell(this.indexTable[d][e].rowIndex,this.indexTable[d][e].cellIndex))}catch(i){a(i)}},moveContent:function(a,c){if(!b.isEmptyBlock(c)){if(b.isEmptyBlock(a))return void(a.innerHTML=c.innerHTML);var d=a.lastChild;for(3!=d.nodeType&&dtd.$block[d.tagName]||a.appendChild(a.ownerDocument.createElement("br"));d=c.firstChild;)a.appendChild(d)}},mergeRight:function(a){var b=this.getCellInfo(a),c=b.colIndex+b.colSpan,d=this.indexTable[b.rowIndex][c],e=this.getCell(d.rowIndex,d.cellIndex);a.colSpan=b.colSpan+d.colSpan,a.removeAttribute("width"),this.moveContent(a,e),this.deleteCell(e,d.rowIndex),this.update()},mergeDown:function(a){var b=this.getCellInfo(a),c=b.rowIndex+b.rowSpan,d=this.indexTable[c][b.colIndex],e=this.getCell(d.rowIndex,d.cellIndex);a.rowSpan=b.rowSpan+d.rowSpan,a.removeAttribute("height"),this.moveContent(a,e),this.deleteCell(e,d.rowIndex),this.update()},mergeRange:function(){var a=this.cellsRange,b=this.getCell(a.beginRowIndex,this.indexTable[a.beginRowIndex][a.beginColIndex].cellIndex);if("TH"==b.tagName&&a.endRowIndex!==a.beginRowIndex){var c=this.indexTable,d=this.getCellInfo(b);b=this.getCell(1,c[1][d.colIndex].cellIndex),a=this.getCellsRange(b,this.getCell(c[this.rowsNum-1][d.colIndex].rowIndex,c[this.rowsNum-1][d.colIndex].cellIndex))}for(var e,f=this.getCells(a),g=0;e=f[g++];)e!==b&&(this.moveContent(b,e),this.deleteCell(e));if(b.rowSpan=a.endRowIndex-a.beginRowIndex+1,b.rowSpan>1&&b.removeAttribute("height"),b.colSpan=a.endColIndex-a.beginColIndex+1,b.colSpan>1&&b.removeAttribute("width"),b.rowSpan==this.rowsNum&&1!=b.colSpan&&(b.colSpan=1),b.colSpan==this.colsNum&&1!=b.rowSpan){var h=b.parentNode.rowIndex;if(this.table.deleteRow)for(var g=h+1,i=h+1,j=b.rowSpan;g1&&g.rowIndex==a){var i=h.cloneNode(!0);i.rowSpan=h.rowSpan-1,i.innerHTML="",h.rowSpan=1;var j,k=a+1,l=this.table.rows[k],m=this.getPreviewMergedCellsNum(k,f)-e;m1?l.colSpan--:c[h].deleteCell(j.cellIndex),h+=j.rowSpan||1}}this.table.setAttribute("width",d-e),this.update()},splitToCells:function(a){var b=this,c=this.splitToRows(a);utils.each(c,function(a){b.splitToCols(a)})},splitToRows:function(a){var b=this.getCellInfo(a),c=b.rowIndex,d=b.colIndex,e=[];a.rowSpan=1,e.push(a);for(var f=c,g=c+b.rowSpan;f");for(var g=0;g'+(browser.ie&&browser.version<11?domUtils.fillChar:"
    ")+"");c.push("")}return"
    "+c.join("")+"
    "}b||(b=utils.extend({},{numCols:this.options.defaultCols,numRows:this.options.defaultRows,tdvalign:this.options.tdvalign}));var d=this,e=this.selection.getRange(),f=e.startContainer,h=domUtils.findParent(f,function(a){return domUtils.isBlockElm(a)},!0)||d.body,i=g(d),j=h.offsetWidth,k=Math.floor(j/b.numCols-2*i.tdPadding-i.tdBorder);!b.tdvalign&&(b.tdvalign=d.options.tdvalign),d.execCommand("inserthtml",c(b,k))}},UE.commands.insertparagraphbeforetable={queryCommandState:function(){return e(this).cell?0:-1},execCommand:function(){var a=e(this).table;if(a){var b=this.document.createElement("p");b.innerHTML=browser.ie?" ":"
    ",a.parentNode.insertBefore(b,a),this.selection.getRange().setStart(b,0).setCursor()}}},UE.commands.deletetable={queryCommandState:function(){var a=this.selection.getRange();return domUtils.findParentByTagName(a.startContainer,"table",!0)?0:-1},execCommand:function(a,b){var c=this.selection.getRange();if(b=b||domUtils.findParentByTagName(c.startContainer,"table",!0)){var d=b.nextSibling;d||(d=domUtils.createElement(this.document,"p",{innerHTML:browser.ie?domUtils.fillChar:"
    "}),b.parentNode.insertBefore(d,b)),domUtils.remove(b),c=this.selection.getRange(),3==d.nodeType?c.setStartBefore(d):c.setStart(d,0),c.setCursor(!1,!0),this.fireEvent("tablehasdeleted")}}},UE.commands.cellalign={queryCommandState:function(){return c(this).length?0:-1},execCommand:function(a,b){var d=c(this);if(d.length)for(var e,f=0;e=d[f++];)e.setAttribute("align",b)}},UE.commands.cellvalign={queryCommandState:function(){return c(this).length?0:-1},execCommand:function(a,b){var d=c(this);if(d.length)for(var e,f=0;e=d[f++];)e.setAttribute("vAlign",b)}},UE.commands.insertcaption={queryCommandState:function(){var a=e(this).table;return a&&0==a.getElementsByTagName("caption").length?1:-1},execCommand:function(){var a=e(this).table;if(a){var b=this.document.createElement("caption");b.innerHTML=browser.ie?domUtils.fillChar:"
    ",a.insertBefore(b,a.firstChild);var c=this.selection.getRange();c.setStart(b,0).setCursor()}}},UE.commands.deletecaption={queryCommandState:function(){var a=this.selection.getRange(),b=domUtils.findParentByTagName(a.startContainer,"table");return b?0==b.getElementsByTagName("caption").length?-1:1:-1},execCommand:function(){var a=this.selection.getRange(),b=domUtils.findParentByTagName(a.startContainer,"table");if(b){domUtils.remove(b.getElementsByTagName("caption")[0]);var c=this.selection.getRange();c.setStart(b.rows[0].cells[0],0).setCursor()}}},UE.commands.inserttitle={queryCommandState:function(){var a=e(this).table;if(a){var b=a.rows[0];return"th"!=b.cells[b.cells.length-1].tagName.toLowerCase()?0:-1}return-1},execCommand:function(){var a=e(this).table;a&&h(a).insertRow(0,"th");var b=a.getElementsByTagName("th")[0];this.selection.getRange().setStart(b,0).setCursor(!1,!0)}},UE.commands.deletetitle={queryCommandState:function(){var a=e(this).table;if(a){var b=a.rows[0];return"th"==b.cells[b.cells.length-1].tagName.toLowerCase()?0:-1}return-1},execCommand:function(){var a=e(this).table;a&&domUtils.remove(a.rows[0]);var b=a.getElementsByTagName("td")[0];this.selection.getRange().setStart(b,0).setCursor(!1,!0)}},UE.commands.inserttitlecol={queryCommandState:function(){var a=e(this).table;if(a){var b=a.rows[a.rows.length-1];return b.getElementsByTagName("th").length?-1:0}return-1},execCommand:function(b){var c=e(this).table;c&&h(c).insertCol(0,"th"),a(c,this);var d=c.getElementsByTagName("th")[0];this.selection.getRange().setStart(d,0).setCursor(!1,!0)}},UE.commands.deletetitlecol={queryCommandState:function(){var a=e(this).table;if(a){var b=a.rows[a.rows.length-1];return b.getElementsByTagName("th").length?0:-1}return-1},execCommand:function(){var b=e(this).table;if(b)for(var c=0;c=f.colsNum)return-1;var j=f.indexTable[g.rowIndex][i],k=c.rows[j.rowIndex].cells[j.cellIndex];return k&&d.tagName==k.tagName&&j.rowIndex==g.rowIndex&&j.rowSpan==g.rowSpan?0:-1},execCommand:function(a){var b=this.selection.getRange(),c=b.createBookmark(!0),d=e(this).cell,f=h(d);f.mergeRight(d),b.moveToBookmark(c).select()}},UE.commands.mergedown={queryCommandState:function(a){var b=e(this),c=b.table,d=b.cell;if(!c||!d)return-1;var f=h(c);if(f.selectedTds.length)return-1;var g=f.getCellInfo(d),i=g.rowIndex+g.rowSpan;if(i>=f.rowsNum)return-1;var j=f.indexTable[i][g.colIndex],k=c.rows[j.rowIndex].cells[j.cellIndex];return k&&d.tagName==k.tagName&&j.colIndex==g.colIndex&&j.colSpan==g.colSpan?0:-1},execCommand:function(){var a=this.selection.getRange(),b=a.createBookmark(!0),c=e(this).cell,d=h(c);d.mergeDown(c),a.moveToBookmark(b).select()}},UE.commands.mergecells={queryCommandState:function(){return f(this)?0:-1},execCommand:function(){var a=f(this);if(a&&a.selectedTds.length){var b=a.selectedTds[0];a.mergeRange();var c=this.selection.getRange();domUtils.isEmptyBlock(b)?c.setStart(b,0).collapse(!0):c.selectNodeContents(b),c.select()}}},UE.commands.insertrow={queryCommandState:function(){var a=e(this),b=a.cell;return b&&("TD"==b.tagName||"TH"==b.tagName&&a.tr!==a.table.rows[0])&&h(a.table).rowsNum0?-1:b&&(b.colSpan>1||b.rowSpan>1)?0:-1},execCommand:function(){var a=this.selection.getRange(),b=a.createBookmark(!0),c=e(this).cell,d=h(c);d.splitToCells(c),a.moveToBookmark(b).select()}},UE.commands.splittorows={queryCommandState:function(){var a=e(this),b=a.cell;if(!b)return-1;var c=h(a.table);return c.selectedTds.length>0?-1:b&&b.rowSpan>1?0:-1},execCommand:function(){var a=this.selection.getRange(),b=a.createBookmark(!0),c=e(this).cell,d=h(c);d.splitToRows(c),a.moveToBookmark(b).select()}},UE.commands.splittocols={queryCommandState:function(){var a=e(this),b=a.cell;if(!b)return-1;var c=h(a.table);return c.selectedTds.length>0?-1:b&&b.colSpan>1?0:-1},execCommand:function(){var a=this.selection.getRange(),b=a.createBookmark(!0),c=e(this).cell,d=h(c);d.splitToCols(c),a.moveToBookmark(b).select()}},UE.commands.adaptbytext=UE.commands.adaptbywindow={queryCommandState:function(){return e(this).table?0:-1},execCommand:function(b){var c=e(this),d=c.table;if(d)if("adaptbywindow"==b)a(d,this);else{var f=domUtils.getElementsByTagName(d,"td th");utils.each(f,function(a){a.removeAttribute("width")}),d.removeAttribute("width")}}},UE.commands.averagedistributecol={queryCommandState:function(){var a=f(this);return a&&(a.isFullRow()||a.isFullCol())?0:-1},execCommand:function(a){function b(){var a,b=e.table,c=0,f=0,h=g(d,b);if(e.isFullRow())c=b.offsetWidth,f=e.colsNum;else for(var i,j=e.cellsRange.beginColIndex,k=e.cellsRange.endColIndex,l=j;l<=k;)i=e.selectedTds[l],c+=i.offsetWidth,l+=i.colSpan,f+=1;return a=Math.ceil(c/f)-2*h.tdBorder-2*h.tdPadding}function c(a){utils.each(domUtils.getElementsByTagName(e.table,"th"),function(a){a.setAttribute("width","")});var b=e.isFullRow()?domUtils.getElementsByTagName(e.table,"td"):e.selectedTds;utils.each(b,function(b){1==b.colSpan&&b.setAttribute("width",a)})}var d=this,e=f(d);e&&e.selectedTds.length&&c(b())}},UE.commands.averagedistributerow={queryCommandState:function(){var a=f(this);return a?a.selectedTds&&/th/gi.test(a.selectedTds[0].tagName)?-1:a.isFullRow()||a.isFullCol()?0:-1:-1},execCommand:function(a){function b(){var a,b,c=0,f=e.table,h=g(d,f),i=parseInt(domUtils.getComputedStyle(f.getElementsByTagName("td")[0],"padding-top"));if(e.isFullCol()){var j,k,l=domUtils.getElementsByTagName(f,"caption"),m=domUtils.getElementsByTagName(f,"th");l.length>0&&(j=l[0].offsetHeight),m.length>0&&(k=m[0].offsetHeight),c=f.offsetHeight-(j||0)-(k||0),b=0==m.length?e.rowsNum:e.rowsNum-1}else{for(var n=e.cellsRange.beginRowIndex,o=e.cellsRange.endRowIndex,p=0,q=domUtils.getElementsByTagName(f,"tr"),r=n;r<=o;r++)c+=q[r].offsetHeight,p+=1;b=p}return a=browser.ie&&browser.version<9?Math.ceil(c/b):Math.ceil(c/b)-2*h.tdBorder-2*i}function c(a){var b=e.isFullCol()?domUtils.getElementsByTagName(e.table,"td"):e.selectedTds;utils.each(b,function(b){1==b.rowSpan&&b.setAttribute("height",a)})}var d=this,e=f(d);e&&e.selectedTds.length&&c(b())}},UE.commands.cellalignment={queryCommandState:function(){return e(this).table?0:-1},execCommand:function(a,b){var c=this,d=f(c);if(d)utils.each(d.selectedTds,function(a){domUtils.setAttributes(a,b)});else{var e=c.selection.getStart(),g=e&&domUtils.findParentByTagName(e,["td","th","caption"],!0);/caption/gi.test(g.tagName)?(g.style.textAlign=b.align,g.style.verticalAlign=b.vAlign):domUtils.setAttributes(g,b),c.selection.getRange().setCursor(!0)}},queryCommandValue:function(a){var b=e(this).cell;if(b||(b=c(this)[0]),b){var d=UE.UETable.getUETable(b).selectedTds;return!d.length&&(d=b),UE.UETable.getTableCellAlignState(d)}return null}},UE.commands.tablealignment={queryCommandState:function(){return browser.ie&&browser.version<8?-1:e(this).table?0:-1},execCommand:function(a,b){var c=this,d=c.selection.getStart(),e=d&&domUtils.findParentByTagName(d,["table"],!0);e&&e.setAttribute("align",b)}},UE.commands.edittable={queryCommandState:function(){return e(this).table?0:-1},execCommand:function(a,b){var c=this.selection.getRange(),d=domUtils.findParentByTagName(c.startContainer,"table");if(d){var e=domUtils.getElementsByTagName(d,"td").concat(domUtils.getElementsByTagName(d,"th"),domUtils.getElementsByTagName(d,"caption"));utils.each(e,function(a){a.style.borderColor=b})}}},UE.commands.edittd={queryCommandState:function(){return e(this).table?0:-1},execCommand:function(a,b){var c=this,d=f(c);if(d)utils.each(d.selectedTds,function(a){a.style.backgroundColor=b});else{var e=c.selection.getStart(),g=e&&domUtils.findParentByTagName(e,["td","th","caption"],!0);g&&(g.style.backgroundColor=b)}}},UE.commands.settablebackground={queryCommandState:function(){return c(this).length>1?0:-1},execCommand:function(a,b){var d,e;d=c(this),e=h(d[0]),e.setBackground(d,b)}},UE.commands.cleartablebackground={queryCommandState:function(){var a=c(this);if(!a.length)return-1;for(var b,d=0;b=a[d++];)if(""!==b.style.backgroundColor)return 0;return-1},execCommand:function(){var a=c(this),b=h(a[0]);b.removeBackground(a)}},UE.commands.interlacetable=UE.commands.uninterlacetable={queryCommandState:function(a){var b=e(this).table;if(!b)return-1;var c=b.getAttribute("interlaced");return"interlacetable"==a?"enabled"===c?-1:0:c&&"disabled"!==c?0:-1},execCommand:function(a,b){var c=e(this).table;"interlacetable"==a?(c.setAttribute("interlaced","enabled"),this.fireEvent("interlacetable",c,b)):(c.setAttribute("interlaced","disabled"),this.fireEvent("uninterlacetable",c))}},UE.commands.setbordervisible={queryCommandState:function(a){var b=e(this).table;return b?0:-1},execCommand:function(){var a=e(this).table;utils.each(domUtils.getElementsByTagName(a,"td"),function(a){a.style.borderWidth="1px",a.style.borderStyle="solid"})}}}(),UE.plugins.table=function(){function a(a){}function b(a,b){c(a,"width",!0),c(a,"height",!0)}function c(a,b,c){a.style[b]&&(c&&a.setAttribute(b,parseInt(a.style[b],10)),a.style[b]="")}function d(a){if("TD"==a.tagName||"TH"==a.tagName)return a;var b;return(b=domUtils.findParentByTagName(a,"td",!0)||domUtils.findParentByTagName(a,"th",!0))?b:null}function e(a){var b=new RegExp(domUtils.fillChar,"g");if(a[browser.ie?"innerText":"textContent"].replace(/^\s*$/,"").replace(b,"").length>0)return 0;for(var c in dtd.$isNotEmpty)if(a.getElementsByTagName(c).length)return 0;return 1}function f(a){return a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:{x:a.clientX+N.document.body.scrollLeft-N.document.body.clientLeft,y:a.clientY+N.document.body.scrollTop-N.document.body.clientTop}}function g(b){if(!A())try{var c,e=d(b.target||b.srcElement);if(R&&(N.body.style.webkitUserSelect="none",(Math.abs(V.x-b.clientX)>T||Math.abs(V.y-b.clientY)>T)&&(t(),R=!1,U=0,v(b))),ca&&ha)return U=0,N.body.style.webkitUserSelect="none",N.selection.getNative()[browser.ie9below?"empty":"removeAllRanges"](),c=f(b),m(N,!0,ca,c,e),void("h"==ca?ga.style.left=k(ha,b)+"px":"v"==ca&&(ga.style.top=l(ha,b)+"px"));if(e){if(N.fireEvent("excludetable",e)===!0)return;c=f(b);var g=n(e,c),i=domUtils.findParentByTagName(e,"table",!0);if(j(i,e,b,!0)){if(N.fireEvent("excludetable",i)===!0)return;N.body.style.cursor="url("+N.options.cursorpath+"h.png),pointer"}else if(j(i,e,b)){if(N.fireEvent("excludetable",i)===!0)return;N.body.style.cursor="url("+N.options.cursorpath+"v.png),pointer"}else{N.body.style.cursor="text";/\d/.test(g)&&(g=g.replace(/\d/,""),e=Y(e).getPreviewCell(e,"v"==g)),m(N,!!e&&!!g,e?g:"",c,e)}}else h(!1,i,N)}catch(o){a(o)}}function h(a,b,c){if(a)i(b,c);else{if(fa)return;la=setTimeout(function(){!fa&&ea&&ea.parentNode&&ea.parentNode.removeChild(ea)},2e3)}}function i(a,b){function c(c,d){clearTimeout(g),g=setTimeout(function(){b.fireEvent("tableClicked",a,d)},300)}function d(c){clearTimeout(g);var d=Y(a),e=a.rows[0].cells[0],f=d.getLastCell(),h=d.getCellsRange(e,f);b.selection.getRange().setStart(e,0).setCursor(!1,!0),d.setSelected(h)}var e=domUtils.getXY(a),f=a.ownerDocument;if(ea&&ea.parentNode)return ea;ea=f.createElement("div"),ea.contentEditable=!1,ea.innerHTML="",ea.style.cssText="width:15px;height:15px;background-image:url("+b.options.UEDITOR_HOME_URL+"dialogs/table/dragicon.png);position: absolute;cursor:move;top:"+(e.y-15)+"px;left:"+e.x+"px;",domUtils.unSelectable(ea),ea.onmouseover=function(a){fa=!0},ea.onmouseout=function(a){fa=!1},domUtils.on(ea,"click",function(a,b){c(b,this)}),domUtils.on(ea,"dblclick",function(a,b){d(b)}),domUtils.on(ea,"dragstart",function(a,b){domUtils.preventDefault(b)});var g;f.body.appendChild(ea)}function j(a,b,c,d){var e=f(c),g=n(b,e);if(d){var h=a.getElementsByTagName("caption")[0],i=h?h.offsetHeight:0;return"v1"==g&&e.y-domUtils.getXY(a).y-i<8}return"h1"==g&&e.x-domUtils.getXY(a).x<8}function k(a,b){var c=Y(a);if(c){var d=c.getSameEndPosCells(a,"x")[0],e=c.getSameStartPosXCells(a)[0],g=f(b).x,h=(d?domUtils.getXY(d).x:domUtils.getXY(c.table).x)+20,i=e?domUtils.getXY(e).x+e.offsetWidth-20:N.body.offsetWidth+5||parseInt(domUtils.getComputedStyle(N.body,"width"),10);return h+=Q,i-=Q,gi?i:g}}function l(b,c){try{var d=domUtils.getXY(b).y,e=f(c).y;return ek[c]?(a=!1,!1):void l.push(d)});var b=a?l:k;utils.each(i,function(a,c){a.width=b[c]-G()})},0)}}}}function q(a){if(_(domUtils.getElementsByTagName(N.body,"td th")),utils.each(N.document.getElementsByTagName("table"),function(a){a.ueTable=null}),aa=M(N,a)){var b=domUtils.findParentByTagName(aa,"table",!0);ut=Y(b),ut&&ut.clearSelected(),da?r(a):(N.document.body.style.webkitUserSelect="",ia=!0,N.addListener("mouseover",x))}}function r(a){browser.ie&&(a=u(a)),t(),R=!0,O=setTimeout(function(){v(a)},W)}function s(a,b){for(var c=[],d=null,e=0,f=a.length;e0&&U--},W),2===U))return U=0,void p(b);if(2!=b.button){var c=this,d=c.selection.getRange(),e=domUtils.findParentByTagName(d.startContainer,"table",!0),f=domUtils.findParentByTagName(d.endContainer,"table",!0);if((e||f)&&(e===f?(e=domUtils.findParentByTagName(d.startContainer,["td","th","caption"],!0),f=domUtils.findParentByTagName(d.endContainer,["td","th","caption"],!0),e!==f&&c.selection.clearRange()):c.selection.clearRange()),ia=!1,c.document.body.style.webkitUserSelect="",ca&&ha&&(c.selection.getNative()[browser.ie9below?"empty":"removeAllRanges"](),U=0,ga=c.document.getElementById("ue_tableDragLine"))){var g=domUtils.getXY(ha),h=domUtils.getXY(ga);switch(ca){case"h":z(ha,h.x-g.x);break;case"v":B(ha,h.y-g.y-ha.offsetHeight)}return ca="",ha=null,I(c),void c.fireEvent("saveScene")}if(aa){var i=Y(aa),j=i?i.selectedTds[0]:null;if(j)d=new dom.Range(c.document),domUtils.isEmptyBlock(j)?d.setStart(j,0).setCursor(!1,!0):d.selectNodeContents(j).shrinkBoundary().setCursor(!1,!0);else if(d=c.selection.getRange().shrinkBoundary(),!d.collapsed){var e=domUtils.findParentByTagName(d.startContainer,["td","th"],!0),f=domUtils.findParentByTagName(d.endContainer,["td","th"],!0);(e&&!f||!e&&f||e&&f&&e!==f)&&d.setCursor(!1,!0)}aa=null,c.removeListener("mouseover",x)}else{var k=domUtils.findParentByTagName(b.target||b.srcElement,"td",!0);if(k||(k=domUtils.findParentByTagName(b.target||b.srcElement,"th",!0)),k&&("TD"==k.tagName||"TH"==k.tagName)){if(c.fireEvent("excludetable",k)===!0)return;d=new dom.Range(c.document),d.setStart(k,0).setCursor(!1,!0)}}c._selectionChange(250,b)}}}function x(a,b){if(!A()){var c=this,d=b.target||b.srcElement;if(ba=domUtils.findParentByTagName(d,"td",!0)||domUtils.findParentByTagName(d,"th",!0),aa&&ba&&("TD"==aa.tagName&&"TD"==ba.tagName||"TH"==aa.tagName&&"TH"==ba.tagName)&&domUtils.findParentByTagName(aa,"table")==domUtils.findParentByTagName(ba,"table")){var e=Y(ba);if(aa!=ba){c.document.body.style.webkitUserSelect="none",c.selection.getNative()[browser.ie9below?"empty":"removeAllRanges"]();var f=e.getCellsRange(aa,ba);e.setSelected(f)}else c.document.body.style.webkitUserSelect="",e.clearSelected()}b.preventDefault?b.preventDefault():b.returnValue=!1}}function y(a,b,c){var d=parseInt(domUtils.getComputedStyle(a,"line-height"),10),e=c+b;b=ef?(c&&g.push({left:a}),!1):void 0})}),g}function D(a,b,c){if(a-=G(),a<0)return 0;a-=E(b);var d=a<0?"left":"right";return a=Math.abs(a),utils.each(c,function(b){var c=b[d];c&&(a=Math.min(a,E(c)-Q))}),a=a<0?0:a,"left"===d?-a:a}function E(a){var b=0,b=a.offsetWidth-G();a.nextSibling||(b-=F(a)),b=b<0?0:b;try{a.width=b}catch(c){}return b}function F(a){if(tab=domUtils.findParentByTagName(a,"table",!1),void 0===tab.offsetVal){var b=a.previousSibling;b?tab.offsetVal=a.offsetWidth-b.offsetWidth===X.borderWidth?X.borderWidth:0:tab.offsetVal=0}return tab.offsetVal}function G(){if(void 0===X.tabcellSpace){var a=N.document.createElement("table"),b=N.document.createElement("tbody"),c=N.document.createElement("tr"),d=N.document.createElement("td"),e=null;d.style.cssText="border: 0;",d.width=1,c.appendChild(d),c.appendChild(e=d.cloneNode(!1)),b.appendChild(c),a.appendChild(b),a.style.cssText="visibility: hidden;",N.body.appendChild(a),X.paddingSpace=d.offsetWidth-1;var f=a.offsetWidth;d.style.cssText="",e.style.cssText="",X.borderWidth=(a.offsetWidth-f)/3,X.tabcellSpace=X.paddingSpace+X.borderWidth,N.body.removeChild(a)}return G=function(){return X.tabcellSpace},X.tabcellSpace}function H(a,b){ia||(ga=a.document.createElement("div"),domUtils.setAttributes(ga,{id:"ue_tableDragLine",unselectable:"on",contenteditable:!1,onresizestart:"return false",ondragstart:"return false",onselectstart:"return false",style:"background-color:blue;position:absolute;padding:0;margin:0;background-image:none;border:0px none;opacity:0;filter:alpha(opacity=0)"}),a.body.appendChild(ga))}function I(a){if(!ia)for(var b;b=a.document.getElementById("ue_tableDragLine");)domUtils.remove(b)}function J(a,b){if(b){var c,d=domUtils.findParentByTagName(b,"table"),e=d.getElementsByTagName("caption"),f=d.offsetWidth,g=d.offsetHeight-(e.length>0?e[0].offsetHeight:0),h=domUtils.getXY(d),i=domUtils.getXY(b);switch(a){case"h":c="height:"+g+"px;top:"+(h.y+(e.length>0?e[0].offsetHeight:0))+"px;left:"+(i.x+b.offsetWidth),ga.style.cssText=c+"px;position: absolute;display:block;background-color:blue;width:1px;border:0; color:blue;opacity:.3;filter:alpha(opacity=30)";break;case"v":c="width:"+f+"px;left:"+h.x+"px;top:"+(i.y+b.offsetHeight),ga.style.cssText=c+"px;overflow:hidden;position: absolute;display:block;background-color:blue;height:1px;border:0;color:blue;opacity:.2;filter:alpha(opacity=20)"}}}function K(a,b){for(var c,d,e=domUtils.getElementsByTagName(a.body,"table"),f=0;d=e[f++];){var g=domUtils.getElementsByTagName(d,"td");g[0]&&(b?(c=g[0].style.borderColor.replace(/\s/g,""),/(#ffffff)|(rgb\(255,255,255\))/gi.test(c)&&domUtils.addClass(d,"noBorderTable")):domUtils.removeClasses(d,"noBorderTable"))}}function L(a,b,c){var d=a.body;return d.offsetWidth-(b?2*parseInt(domUtils.getComputedStyle(d,"margin-left"),10):0)-2*c.tableBorder-(a.options.offsetWidth||0)}function M(a,b){var c=domUtils.findParentByTagName(b.target||b.srcElement,["td","th"],!0),d=null;if(!c)return null;if(d=n(c,f(b)),!c)return null;if("h1"===d&&c.previousSibling){var e=domUtils.getXY(c),g=c.offsetWidth;Math.abs(e.x+g-b.clientX)>g/3&&(c=c.previousSibling)}else if("v1"===d&&c.parentNode.previousSibling){var e=domUtils.getXY(c),h=c.offsetHeight;Math.abs(e.y+h-b.clientY)>h/3&&(c=c.parentNode.previousSibling.firstChild)}return c&&a.fireEvent("excludetable",c)!==!0?c:null}var N=this,O=null,P=null,Q=5,R=!1,S=5,T=10,U=0,V=null,W=360,X=UE.UETable,Y=function(a){return X.getUETable(a)},Z=function(a){return X.getUETableBySelected(a)},$=function(a,b){return X.getDefaultValue(a,b)},_=function(a){return X.removeSelectedClass(a)};N.ready(function(){var a=this,b=a.selection.getText;a.selection.getText=function(){var c=Z(a);if(c){var d="";return utils.each(c.selectedTds,function(a){d+=a[browser.ie?"innerText":"textContent"]}),d}return b.call(a.selection)}});var aa=null,ba=null,ca="",da=!1,ea=null,fa=!1,ga=null,ha=null,ia=!1,ja=!0;N.setOpt({maxColNum:20,maxRowNum:100,defaultCols:5,defaultRows:5,tdvalign:"top",cursorpath:N.options.UEDITOR_HOME_URL+"themes/default/images/cursor_",tableDragable:!1,classList:["ue-table-interlace-color-single","ue-table-interlace-color-double"]}),N.getUETable=Y;var ka={deletetable:1,inserttable:1,cellvalign:1,insertcaption:1,deletecaption:1,inserttitle:1,deletetitle:1,mergeright:1,mergedown:1,mergecells:1,insertrow:1,insertrownext:1,deleterow:1,insertcol:1,insertcolnext:1,deletecol:1,splittocells:1,splittorows:1,splittocols:1,adaptbytext:1,adaptbywindow:1,adaptbycustomer:1,insertparagraph:1,insertparagraphbeforetable:1,averagedistributecol:1,averagedistributerow:1};N.ready(function(){utils.cssRule("table",".selectTdClass{background-color:#edf5fa !important}table.noBorderTable td,table.noBorderTable th,table.noBorderTable caption{border:1px dashed #ddd !important}table{margin-bottom:10px;border-collapse:collapse;display:table;}td,th{padding: 5px 10px;border: 1px solid #DDD;}caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}th{border-top:1px solid #BBB;background-color:#F7F7F7;}table tr.firstRow th{border-top-width:2px;}.ue-table-interlace-color-single{ background-color: #fcfcfc; } .ue-table-interlace-color-double{ background-color: #f7faff; }td p{margin:0;padding:0;}",N.document);var a,c,f;N.addListener("keydown",function(b,d){var g=this,h=d.keyCode||d.which;if(8==h){var i=Z(g);i&&i.selectedTds.length&&(i.isFullCol()?g.execCommand("deletecol"):i.isFullRow()?g.execCommand("deleterow"):g.fireEvent("delcells"),domUtils.preventDefault(d));var j=domUtils.findParentByTagName(g.selection.getStart(),"caption",!0),k=g.selection.getRange();if(k.collapsed&&j&&e(j)){g.fireEvent("saveScene");var l=j.parentNode;domUtils.remove(j),l&&k.setStart(l.rows[0].cells[0],0).setCursor(!1,!0),g.fireEvent("saveScene")}}if(46==h&&(i=Z(g))){g.fireEvent("saveScene");for(var m,n=0;m=i.selectedTds[n++];)domUtils.fillNode(g.document,m);g.fireEvent("saveScene"),domUtils.preventDefault(d)}if(13==h){var o=g.selection.getRange(),j=domUtils.findParentByTagName(o.startContainer,"caption",!0);if(j){var l=domUtils.findParentByTagName(j,"table");return o.collapsed?j&&o.setStart(l.rows[0].cells[0],0).setCursor(!1,!0):(o.deleteContents(),g.fireEvent("saveScene")),void domUtils.preventDefault(d)}if(o.collapsed){var l=domUtils.findParentByTagName(o.startContainer,"table");if(l){var p=l.rows[0].cells[0],q=domUtils.findParentByTagName(g.selection.getStart(),["td","th"],!0),r=l.previousSibling;if(p===q&&(!r||1==r.nodeType&&"TABLE"==r.tagName)&&domUtils.isStartInblock(o)){var s=domUtils.findParent(g.selection.getStart(),function(a){return domUtils.isBlockElm(a)},!0);s&&(/t(h|d)/i.test(s.tagName)||s===q.firstChild)&&(g.execCommand("insertparagraphbeforetable"),domUtils.preventDefault(d))}}}}if((d.ctrlKey||d.metaKey)&&"67"==d.keyCode){a=null;var i=Z(g);if(i){var t=i.selectedTds;c=i.isFullCol(),f=i.isFullRow(),a=[[i.cloneCell(t[0],null,!0)]];for(var m,n=1;m=t[n];n++)m.parentNode!==t[n-1].parentNode?a.push([i.cloneCell(m,null,!0)]):a[a.length-1].push(i.cloneCell(m,null,!0))}}}),N.addListener("tablehasdeleted",function(){m(this,!1,"",null),ea&&domUtils.remove(ea)}),N.addListener("beforepaste",function(d,g){var h=this,i=h.selection.getRange();if(domUtils.findParentByTagName(i.startContainer,"caption",!0)){var j=h.document.createElement("div");return j.innerHTML=g.html,void(g.html=j[browser.ie9below?"innerText":"textContent"])}var k=Z(h);if(a){h.fireEvent("saveScene");var l,m,i=h.selection.getRange(),n=domUtils.findParentByTagName(i.startContainer,["td","th"],!0);if(n){var o=Y(n);if(f){var p=o.getCellInfo(n).rowIndex;"TH"==n.tagName&&p++;for(var q,r=0;q=a[r++];){for(var s,t=o.insertRow(p++,"td"),u=0;s=q[u];u++){var v=t.cells[u];v||(v=t.insertCell(u)),v.innerHTML=s.innerHTML,s.getAttribute("width")&&v.setAttribute("width",s.getAttribute("width")),s.getAttribute("vAlign")&&v.setAttribute("vAlign",s.getAttribute("vAlign")),s.getAttribute("align")&&v.setAttribute("align",s.getAttribute("align")),s.style.cssText&&(v.style.cssText=s.style.cssText)}for(var s,u=0;(s=t.cells[u])&&q[u];u++)s.innerHTML=q[u].innerHTML,q[u].getAttribute("width")&&s.setAttribute("width",q[u].getAttribute("width")),q[u].getAttribute("vAlign")&&s.setAttribute("vAlign",q[u].getAttribute("vAlign")),q[u].getAttribute("align")&&s.setAttribute("align",q[u].getAttribute("align")),q[u].style.cssText&&(s.style.cssText=q[u].style.cssText)}}else{if(c){y=o.getCellInfo(n);for(var s,w=0,u=0,q=a[0];s=q[u++];)w+=s.colSpan||1;for(h.__hasEnterExecCommand=!0,r=0;r1&&(x.rowSpan=1)}var z=$(h),A=h.body.offsetWidth-(ja?2*parseInt(domUtils.getComputedStyle(h.body,"margin-left"),10):0)-2*z.tableBorder-(h.options.offsetWidth||0);h.execCommand("insertHTML",""+k.innerHTML.replace(/>\s*<").replace(/\bth\b/gi,"td")+"
    ")}return h.fireEvent("contentchange"),h.fireEvent("saveScene"),g.html="",!0}var B,j=h.document.createElement("div");j.innerHTML=g.html,B=j.getElementsByTagName("table"),domUtils.findParentByTagName(h.selection.getStart(),"table")?(utils.each(B,function(a){domUtils.remove(a)}),domUtils.findParentByTagName(h.selection.getStart(),"caption",!0)&&(j.innerHTML=j[browser.ie?"innerText":"textContent"])):utils.each(B,function(a){b(a,!0),domUtils.removeAttributes(a,["style","border"]),utils.each(domUtils.getElementsByTagName(a,"td"),function(a){e(a)&&domUtils.fillNode(h.document,a),b(a,!0)})}),g.html=j.innerHTML}),N.addListener("afterpaste",function(){utils.each(domUtils.getElementsByTagName(N.body,"table"),function(a){if(a.offsetWidth>N.body.offsetWidth){var b=$(N,a);a.style.width=N.body.offsetWidth-(ja?2*parseInt(domUtils.getComputedStyle(N.body,"margin-left"),10):0)-2*b.tableBorder-(N.options.offsetWidth||0)+"px"}})}),N.addListener("blur",function(){a=null});var i;N.addListener("keydown",function(){clearTimeout(i),i=setTimeout(function(){var a=N.selection.getRange(),b=domUtils.findParentByTagName(a.startContainer,["th","td"],!0);if(b){var c=b.parentNode.parentNode.parentNode;c.offsetWidth>c.getAttribute("width")&&(b.style.wordBreak="break-all")}},100)}),N.addListener("selectionchange",function(){m(N,!1,"",null)}),N.addListener("contentchange",function(){var a=this;if(I(a),!Z(a)){var b=a.selection.getRange(),c=b.startContainer;c=domUtils.findParentByTagName(c,["td","th"],!0),utils.each(domUtils.getElementsByTagName(a.document,"table"),function(b){a.fireEvent("excludetable",b)!==!0&&(b.ueTable=new X(b),b.onmouseover=function(){a.fireEvent("tablemouseover",b)},b.onmousemove=function(){a.fireEvent("tablemousemove",b),a.options.tableDragable&&h(!0,this,a),utils.defer(function(){a.fireEvent("contentchange",50)},!0)},b.onmouseout=function(){a.fireEvent("tablemouseout",b),m(a,!1,"",null),I(a)},b.onclick=function(b){b=a.window.event||b;var c=d(b.target||b.srcElement);if(c){var e,f=Y(c),g=f.table,h=f.getCellInfo(c),i=a.selection.getRange();if(j(g,c,b,!0)){var k=f.getCell(f.indexTable[f.rowsNum-1][h.colIndex].rowIndex,f.indexTable[f.rowsNum-1][h.colIndex].cellIndex);return void(b.shiftKey&&f.selectedTds.length?f.selectedTds[0]!==k?(e=f.getCellsRange(f.selectedTds[0],k),f.setSelected(e)):i&&i.selectNodeContents(k).select():c!==k?(e=f.getCellsRange(c,k),f.setSelected(e)):i&&i.selectNodeContents(k).select())}if(j(g,c,b)){var l=f.getCell(f.indexTable[h.rowIndex][f.colsNum-1].rowIndex,f.indexTable[h.rowIndex][f.colsNum-1].cellIndex);b.shiftKey&&f.selectedTds.length?f.selectedTds[0]!==l?(e=f.getCellsRange(f.selectedTds[0],l),f.setSelected(e)):i&&i.selectNodeContents(l).select():c!==l?(e=f.getCellsRange(c,l),f.setSelected(e)):i&&i.selectNodeContents(l).select()}}})}),K(a,!0)}}),domUtils.on(N.document,"mousemove",g),domUtils.on(N.document,"mouseout",function(a){var b=a.target||a.srcElement;"TABLE"==b.tagName&&m(N,!1,"",null)}),N.addListener("interlacetable",function(a,b,c){if(b)for(var d=this,e=b.rows,f=e.length,g=function(a,b,c){return a[b]?a[b]:c?a[b%a.length]:""},h=0;h1?k:f.getCellInfo(d).rowIndex;var g=f.getTabNextCell(d,k);g?e(g)?a.setStart(g,0).setCursor(!1,!0):a.selectNodeContents(g).select():(N.fireEvent("saveScene"),N.__hasEnterExecCommand=!0,this.execCommand("insertrownext"),N.__hasEnterExecCommand=!1,a=this.selection.getRange(),a.setStart(c.rows[c.rows.length-1].cells[0],0).setCursor(),N.fireEvent("saveScene"))}return!0}}),browser.ie&&N.addListener("selectionchange",function(){m(this,!1,"",null)}),N.addListener("keydown",function(a,b){var c=this,d=b.keyCode||b.which;if(8!=d&&46!=d){var e=!(b.ctrlKey||b.metaKey||b.shiftKey||b.altKey);e&&_(domUtils.getElementsByTagName(c.body,"td"));var f=Z(c);f&&e&&f.clearSelected()}}),N.addListener("beforegetcontent",function(){K(this,!1),browser.ie&&utils.each(this.document.getElementsByTagName("caption"),function(a){domUtils.isEmptyNode(a)&&(a.innerHTML=" ")})}),N.addListener("aftergetcontent",function(){K(this,!0)}),N.addListener("getAllHtml",function(){_(N.document.getElementsByTagName("td"))}),N.addListener("fullscreenchanged",function(a,b){if(!b){var c=this.body.offsetWidth/document.body.offsetWidth,d=domUtils.getElementsByTagName(this.body,"table");utils.each(d,function(a){if(a.offsetWidth1||c[e].getAttribute("rowspan")>1)return-1;return b?"enablesort"==a^"sortEnabled"!=b.getAttribute("data-sort")?-1:0:-1},execCommand:function(a){var b=d(this).table;b.setAttribute("data-sort","enablesort"==a?"sortEnabled":"sortDisabled"),"enablesort"==a?domUtils.addClass(b,"sortEnabled"):domUtils.removeClasses(b,"sortEnabled")}}},UE.plugins.contextmenu=function(){var a=this;if(a.setOpt("enableContextMenu",!0),a.getOpt("enableContextMenu")!==!1){var b,c=a.getLang("contextMenu"),d=a.options.contextMenu||[{label:c.selectall,cmdName:"selectall"},{label:c.cleardoc,cmdName:"cleardoc",exec:function(){confirm(c.confirmclear)&&this.execCommand("cleardoc")}},"-",{label:c.unlink,cmdName:"unlink"},"-",{group:c.paragraph,icon:"justifyjustify",subMenu:[{label:c.justifyleft,cmdName:"justify",value:"left"},{label:c.justifyright,cmdName:"justify",value:"right"},{label:c.justifycenter,cmdName:"justify",value:"center"},{label:c.justifyjustify,cmdName:"justify",value:"justify"}]},"-",{group:c.table,icon:"table",subMenu:[{label:c.inserttable,cmdName:"inserttable"},{label:c.deletetable,cmdName:"deletetable"},"-",{label:c.deleterow,cmdName:"deleterow"},{label:c.deletecol,cmdName:"deletecol"},{label:c.insertcol,cmdName:"insertcol"},{label:c.insertcolnext,cmdName:"insertcolnext"},{label:c.insertrow,cmdName:"insertrow"},{label:c.insertrownext,cmdName:"insertrownext"},"-",{label:c.insertcaption,cmdName:"insertcaption"},{label:c.deletecaption,cmdName:"deletecaption"},{label:c.inserttitle,cmdName:"inserttitle"},{label:c.deletetitle,cmdName:"deletetitle"},{label:c.inserttitlecol,cmdName:"inserttitlecol"},{label:c.deletetitlecol,cmdName:"deletetitlecol"},"-",{label:c.mergecells,cmdName:"mergecells"},{label:c.mergeright,cmdName:"mergeright"},{label:c.mergedown,cmdName:"mergedown"},"-",{label:c.splittorows,cmdName:"splittorows"},{label:c.splittocols,cmdName:"splittocols"},{label:c.splittocells,cmdName:"splittocells"},"-",{label:c.averageDiseRow,cmdName:"averagedistributerow"},{label:c.averageDisCol,cmdName:"averagedistributecol"},"-",{label:c.edittd,cmdName:"edittd",exec:function(){UE.ui.edittd&&new UE.ui.edittd(this),this.getDialog("edittd").open()}},{label:c.edittable,cmdName:"edittable",exec:function(){UE.ui.edittable&&new UE.ui.edittable(this),this.getDialog("edittable").open()}},{label:c.setbordervisible,cmdName:"setbordervisible"}]},{group:c.tablesort,icon:"tablesort",subMenu:[{label:c.enablesort,cmdName:"enablesort"},{label:c.disablesort,cmdName:"disablesort"},"-",{label:c.reversecurrent,cmdName:"sorttable",value:"reversecurrent"},{label:c.orderbyasc,cmdName:"sorttable",value:"orderbyasc"},{label:c.reversebyasc,cmdName:"sorttable",value:"reversebyasc"},{label:c.orderbynum,cmdName:"sorttable",value:"orderbynum"},{label:c.reversebynum,cmdName:"sorttable",value:"reversebynum"}]},{group:c.borderbk,icon:"borderBack",subMenu:[{label:c.setcolor,cmdName:"interlacetable",exec:function(){this.execCommand("interlacetable")}},{label:c.unsetcolor,cmdName:"uninterlacetable",exec:function(){this.execCommand("uninterlacetable")}},{label:c.setbackground,cmdName:"settablebackground",exec:function(){this.execCommand("settablebackground",{repeat:!0,colorList:["#bbb","#ccc"]})}},{label:c.unsetbackground,cmdName:"cleartablebackground",exec:function(){this.execCommand("cleartablebackground")}},{label:c.redandblue,cmdName:"settablebackground",exec:function(){this.execCommand("settablebackground",{repeat:!0,colorList:["red","blue"]})}},{label:c.threecolorgradient,cmdName:"settablebackground",exec:function(){this.execCommand("settablebackground",{repeat:!0,colorList:["#aaa","#bbb","#ccc"]})}}]},{group:c.aligntd,icon:"aligntd",subMenu:[{cmdName:"cellalignment",value:{align:"left",vAlign:"top"}},{cmdName:"cellalignment",value:{align:"center",vAlign:"top"}},{cmdName:"cellalignment",value:{align:"right",vAlign:"top"}},{cmdName:"cellalignment",value:{align:"left",vAlign:"middle"}},{cmdName:"cellalignment",value:{align:"center",vAlign:"middle"}},{cmdName:"cellalignment",value:{align:"right",vAlign:"middle"}},{cmdName:"cellalignment",value:{align:"left",vAlign:"bottom"}},{cmdName:"cellalignment",value:{align:"center",vAlign:"bottom"}},{cmdName:"cellalignment",value:{align:"right",vAlign:"bottom"}}]},{group:c.aligntable,icon:"aligntable",subMenu:[{cmdName:"tablealignment",className:"left",label:c.tableleft,value:"left"},{cmdName:"tablealignment",className:"center",label:c.tablecenter,value:"center"},{cmdName:"tablealignment",className:"right",label:c.tableright,value:"right"}]},"-",{label:c.insertparagraphbefore,cmdName:"insertparagraph",value:!0},{label:c.insertparagraphafter,cmdName:"insertparagraph"},{label:c.copy,cmdName:"copy"},{label:c.paste,cmdName:"paste"}];if(d.length){var e=UE.ui.uiUtils;a.addListener("contextmenu",function(f,g){var h=e.getViewportOffsetByEvent(g);a.fireEvent("beforeselectionchange"),b&&b.destroy();for(var i,j=0,k=[];i=d[j];j++){var l;!function(b){function d(){switch(b.icon){case"table":return a.getLang("contextMenu.table");case"justifyjustify":return a.getLang("contextMenu.paragraph");case"aligntd":return a.getLang("contextMenu.aligntd");case"aligntable":return a.getLang("contextMenu.aligntable");case"tablesort":return c.tablesort;case"borderBack":return c.borderbk;default:return""}}if("-"==b)(l=k[k.length-1])&&"-"!==l&&k.push("-");else if(b.hasOwnProperty("group")){for(var e,f=0,g=[];e=b.subMenu[f];f++)!function(b){"-"==b?(l=g[g.length-1])&&"-"!==l?g.push("-"):g.splice(g.length-1):(a.commands[b.cmdName]||UE.commands[b.cmdName]||b.query)&&(b.query?b.query():a.queryCommandState(b.cmdName))>-1&&g.push({label:b.label||a.getLang("contextMenu."+b.cmdName+(b.value||""))||"",className:"edui-for-"+b.cmdName+(b.className?" edui-for-"+b.cmdName+"-"+b.className:""),onclick:b.exec?function(){b.exec.call(a)}:function(){a.execCommand(b.cmdName,b.value)}})}(e);g.length&&k.push({label:d(),className:"edui-for-"+b.icon,subMenu:{items:g,editor:a}})}else(a.commands[b.cmdName]||UE.commands[b.cmdName]||b.query)&&(b.query?b.query.call(a):a.queryCommandState(b.cmdName))>-1&&k.push({label:b.label||a.getLang("contextMenu."+b.cmdName),className:"edui-for-"+(b.icon?b.icon:b.cmdName+(b.value||"")),onclick:b.exec?function(){b.exec.call(a)}:function(){a.execCommand(b.cmdName,b.value)}})}(i)}if("-"==k[k.length-1]&&k.pop(),b=new UE.ui.Menu({items:k,className:"edui-contextmenu",editor:a}),b.render(),b.showAt(h),a.fireEvent("aftershowcontextmenu",b),domUtils.preventDefault(g),browser.ie){var m;try{m=a.selection.getNative().createRange()}catch(n){return}if(m.item){var o=new dom.Range(a.document);o.selectNode(m.item(0)).select(!0,!0)}}}),a.addListener("aftershowcontextmenu",function(b,c){if(a.zeroclipboard){var d=c.items;for(var e in d)"edui-for-copy"==d[e].className&&a.zeroclipboard.clip(d[e].getDom())}})}}},UE.plugins.shortcutmenu=function(){var a,b=this,c=b.options.shortcutMenu||[];c.length&&(b.addListener("contextmenu mouseup",function(b,d){var e=this,f={type:b,target:d.target||d.srcElement,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY};if(setTimeout(function(){var d=e.selection.getRange();d.collapsed!==!1&&"contextmenu"!=b||(a||(a=new baidu.editor.ui.ShortCutMenu({editor:e,items:c,theme:e.options.theme,className:"edui-shortcutmenu"}),a.render(),e.fireEvent("afterrendershortcutmenu",a)),a.show(f,!!UE.plugins.contextmenu))}),"contextmenu"==b&&(domUtils.preventDefault(d),browser.ie9below)){var g;try{g=e.selection.getNative().createRange()}catch(d){return}if(g.item){var h=new dom.Range(e.document);h.selectNode(g.item(0)).select(!0,!0)}}}),b.addListener("keydown",function(b){"keydown"==b&&a&&!a.isHidden&&a.hide()}))},UE.plugins.basestyle=function(){var a={bold:["strong","b"],italic:["em","i"],subscript:["sub"],superscript:["sup"]},b=function(a,b){return domUtils.filterNodeList(a.selection.getStartElementPath(),b)},c=this;c.addshortcutkey({Bold:"ctrl+66",Italic:"ctrl+73",Underline:"ctrl+85"}),c.addInputRule(function(a){utils.each(a.getNodesByTagName("b i"),function(a){switch(a.tagName){case"b":a.tagName="strong";break;case"i":a.tagName="em"}})});for(var d in a)!function(a,d){c.commands[a]={execCommand:function(a){var e=c.selection.getRange(),f=b(this,d);if(e.collapsed){if(f){var g=c.document.createTextNode("");e.insertNode(g).removeInlineStyle(d),e.setStartBefore(g),domUtils.remove(g)}else{var h=e.document.createElement(d[0]);"superscript"!=a&&"subscript"!=a||(g=c.document.createTextNode(""),e.insertNode(g).removeInlineStyle(["sub","sup"]).setStartBefore(g).collapse(!0)),e.insertNode(h).setStart(h,0)}e.collapse(!0)}else"superscript"!=a&&"subscript"!=a||f&&f.tagName.toLowerCase()==a||e.removeInlineStyle(["sub","sup"]),f?e.removeInlineStyle(d):e.applyInlineStyle(d[0]);e.select()},queryCommandState:function(){return b(this,d)?1:0}}}(d,a[d])},UE.plugins.elementpath=function(){var a,b,c=this;c.setOpt("elementPathEnabled",!0),c.options.elementPathEnabled&&(c.commands.elementpath={execCommand:function(d,e){var f=b[e],g=c.selection.getRange();a=1*e,g.selectNode(f).select()},queryCommandValue:function(){var c=[].concat(this.selection.getStartElementPath()).reverse(),d=[];b=c;for(var e,f=0;e=c[f];f++)if(3!=e.nodeType){var g=e.tagName.toLowerCase();if("img"==g&&e.getAttribute("anchorname")&&(g="anchor"),d[f]=g,a==f){a=-1;break}}return d}})},UE.plugins.formatmatch=function(){function a(f,g){function h(a){return m&&a.selectNode(m),a.applyInlineStyle(d[d.length-1].tagName,null,d)}if(browser.webkit)var i="IMG"==g.target.tagName?g.target:null;c.undoManger&&c.undoManger.save();var j=c.selection.getRange(),k=i||j.getClosedNode();if(b&&k&&"IMG"==k.tagName)k.style.cssText+=";float:"+(b.style.cssFloat||b.style.styleFloat||"none")+";display:"+(b.style.display||"inline"),b=null;else if(!b){var l=j.collapsed;if(l){var m=c.document.createTextNode("match");j.insertNode(m).select()}c.__hasEnterExecCommand=!0;var n=c.options.removeFormatAttributes;c.options.removeFormatAttributes="",c.execCommand("removeformat"),c.options.removeFormatAttributes=n,c.__hasEnterExecCommand=!1,j=c.selection.getRange(),d.length&&h(j),m&&j.setStartBefore(m).collapse(!0),j.select(),m&&domUtils.remove(m)}c.undoManger&&c.undoManger.save(),c.removeListener("mouseup",a),e=0}var b,c=this,d=[],e=0;c.addListener("reset",function(){d=[],e=0}),c.commands.formatmatch={execCommand:function(f){if(e)return e=0,d=[],void c.removeListener("mouseup",a);var g=c.selection.getRange();if(b=g.getClosedNode(),!b||"IMG"!=b.tagName){g.collapse(!0).shrinkBoundary();var h=g.startContainer;d=domUtils.findParents(h,!0,function(a){return!domUtils.isBlockElm(a)&&1==a.nodeType});for(var i,j=0;i=d[j];j++)if("A"==i.tagName){d.splice(j,1);break}}c.addListener("mouseup",a),e=1},queryCommandState:function(){return e},notNeedUndo:1}},UE.plugin.register("searchreplace",function(){function a(a,b,c){var d=b.searchStr;b.dir==-1&&(a=a.split("").reverse().join(""),d=d.split("").reverse().join(""),c=a.length-c);for(var e,f=new RegExp(d,"g"+(b.casesensitive?"":"i"));e=f.exec(a);)if(e.index>=c)return b.dir==-1?a.length-e.index-b.searchStr.length:e.index;return-1}function b(b,c,d){var e,f,h=d.all||1==d.dir?"getNextDomNode":"getPreDomNode";domUtils.isBody(b)&&(b=b.firstChild);for(var i=1;b;){if(e=3==b.nodeType?b.nodeValue:b[browser.ie?"innerText":"textContent"],f=a(e,d,c),i=0,f!=-1)return{node:b,index:f};for(b=domUtils[h](b);b&&g[b.nodeName.toLowerCase()];)b=domUtils[h](b,!0);b&&(c=d.dir==-1?(3==b.nodeType?b.nodeValue:b[browser.ie?"innerText":"textContent"]).length:0)}}function c(a,b,d){for(var e,f=0,g=a.firstChild,h=0;g;){if(3==g.nodeType){if(h=g.nodeValue.replace(/(^[\t\r\n]+)|([\t\r\n]+$)/,"").length,f+=h,f>=b)return{node:g,index:h-(f-b)}}else if(!dtd.$empty[g.tagName]&&(h=g[browser.ie?"innerText":"textContent"].replace(/(^[\t\r\n]+)|([\t\r\n]+$)/,"").length,f+=h,f>=b&&(e=c(g,h-(f-b),d))))return e;g=domUtils.getNextDomNode(g)}}function d(a,d){var f,g=a.selection.getRange(),h=d.searchStr,i=a.document.createElement("span");if(i.innerHTML="$$ueditor_searchreplace_key$$",g.shrinkBoundary(!0),!g.collapsed){g.select();var j=a.selection.getText();if(new RegExp("^"+d.searchStr+"$",d.casesensitive?"":"i").test(j)){if(void 0!=d.replaceStr)return e(g,d.replaceStr),g.select(),!0;g.collapse(d.dir==-1)}}g.insertNode(i),g.enlargeToBlockElm(!0),f=g.startContainer;var k=f[browser.ie?"innerText":"textContent"].indexOf("$$ueditor_searchreplace_key$$");g.setStartBefore(i),domUtils.remove(i);var l=b(f,k,d);if(l){var m=c(l.node,l.index,h),n=c(l.node,l.index+h.length,h);return g.setStart(m.node,m.index).setEnd(n.node,n.index),void 0!==d.replaceStr&&e(g,d.replaceStr),g.select(),!0}g.setCursor()}function e(a,b){b=f.document.createTextNode(b),a.deleteContents().insertNode(b)}var f=this,g={table:1,tbody:1,tr:1,ol:1,ul:1};return{commands:{searchreplace:{execCommand:function(a,b){utils.extend(b,{all:!1,casesensitive:!1,dir:1},!0);var c=0;if(b.all){var e=f.selection.getRange(),g=f.body.firstChild;for(g&&1==g.nodeType?(e.setStart(g,0),e.shrinkBoundary(!0)):3==g.nodeType&&e.setStartBefore(g),e.collapse(!0).select(!0),void 0!==b.replaceStr&&f.fireEvent("saveScene");d(this,b);)c++;c&&f.fireEvent("saveScene")}else void 0!==b.replaceStr&&f.fireEvent("saveScene"),d(this,b)&&c++,c&&f.fireEvent("saveScene");return c},notNeedUndo:1}}}}),UE.plugins.customstyle=function(){var a=this;a.setOpt({customstyle:[{tag:"h1",name:"tc",style:"font-size:32px;font-weight:bold;border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;"},{tag:"h1",name:"tl",style:"font-size:32px;font-weight:bold;border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:left;margin:0 0 10px 0;"},{tag:"span",name:"im",style:"font-size:16px;font-style:italic;font-weight:bold;line-height:18px;"},{tag:"span",name:"hi",style:"font-size:16px;font-style:italic;font-weight:bold;color:rgb(51, 153, 204);line-height:18px;"}]}),a.commands.customstyle={execCommand:function(a,b){var c,d,e=this,f=b.tag,g=domUtils.findParent(e.selection.getStart(),function(a){return a.getAttribute("label")},!0),h={};for(var i in b)void 0!==b[i]&&(h[i]=b[i]);if(delete h.tag,g&&g.getAttribute("label")==b.label){if(c=this.selection.getRange(),d=c.createBookmark(),c.collapsed)if(dtd.$block[g.tagName]){var j=e.document.createElement("p");domUtils.moveChild(g,j),g.parentNode.insertBefore(j,g),domUtils.remove(g)}else domUtils.remove(g,!0);else{var k=domUtils.getCommonAncestor(d.start,d.end),l=domUtils.getElementsByTagName(k,f);new RegExp(f,"i").test(k.tagName)&&l.push(k);for(var m,n=0;m=l[n++];)if(m.getAttribute("label")==b.label){var o=domUtils.getPosition(m,d.start),p=domUtils.getPosition(m,d.end);if((o&domUtils.POSITION_FOLLOWING||o&domUtils.POSITION_CONTAINS)&&(p&domUtils.POSITION_PRECEDING||p&domUtils.POSITION_CONTAINS)&&dtd.$block[f]){var j=e.document.createElement("p");domUtils.moveChild(m,j),m.parentNode.insertBefore(j,m)}domUtils.remove(m,!0)}g=domUtils.findParent(k,function(a){return a.getAttribute("label")==b.label},!0),g&&domUtils.remove(g,!0)}c.moveToBookmark(d).select()}else if(dtd.$block[f]){if(this.execCommand("paragraph",f,h,"customstyle"),c=e.selection.getRange(),!c.collapsed){c.collapse(),g=domUtils.findParent(e.selection.getStart(),function(a){return a.getAttribute("label")==b.label},!0);var q=e.document.createElement("p");domUtils.insertAfter(g,q),domUtils.fillNode(e.document,q),c.setStart(q,0).setCursor()}}else{if(c=e.selection.getRange(),c.collapsed)return g=e.document.createElement(f),domUtils.setAttributes(g,h),void c.insertNode(g).setStart(g,0).setCursor();d=c.createBookmark(),c.applyInlineStyle(f,h).moveToBookmark(d).select()}},queryCommandValue:function(){var a=domUtils.filterNodeList(this.selection.getStartElementPath(),function(a){return a.getAttribute("label")});return a?a.getAttribute("label"):""}},a.addListener("keyup",function(b,c){var d=c.keyCode||c.which;if(32==d||13==d){var e=a.selection.getRange();if(e.collapsed){var f=domUtils.findParent(a.selection.getStart(),function(a){return a.getAttribute("label")},!0);if(f&&dtd.$block[f.tagName]&&domUtils.isEmptyNode(f)){var g=a.document.createElement("p");domUtils.insertAfter(f,g),domUtils.fillNode(a.document,g),domUtils.remove(f),e.setStart(g,0).setCursor()}}}})},UE.plugins.catchremoteimage=function(){var me=this,ajax=UE.ajax;me.options.catchRemoteImageEnable!==!1&&(me.setOpt({catchRemoteImageEnable:!1}),me.addListener("afterpaste",function(){me.fireEvent("catchRemoteImage")}),me.addListener("catchRemoteImage",function(){function catchremoteimage(a,b){var c=utils.serializeParam(me.queryCommandValue("serverparam"))||"",d=utils.formatUrl(catcherActionUrl+(catcherActionUrl.indexOf("?")==-1?"?":"&")+c),e=utils.isCrossDomainUrl(d),f={method:"POST",dataType:e?"jsonp":"",timeout:6e4,onsuccess:b.success,onerror:b.error};f[catcherFieldName]=a,ajax.request(d,f)}for(var catcherLocalDomain=me.getOpt("catcherLocalDomain"),catcherActionUrl=me.getActionUrl(me.getOpt("catcherActionName")),catcherUrlPrefix=me.getOpt("catcherUrlPrefix"),catcherFieldName=me.getOpt("catcherFieldName"),remoteImages=[],imgs=domUtils.getElementsByTagName(me.document,"img"),test=function(a,b){if(a.indexOf(location.host)!=-1||/(^\.)|(^\/)/.test(a))return!0;if(b)for(var c,d=0;c=b[d++];)if(a.indexOf(c)!==-1)return!0;return!1},i=0,ci;ci=imgs[i++];)if(!ci.getAttribute("word_img")){var src=ci.getAttribute("_src")||ci.src||"";/^(https?|ftp):/i.test(src)&&!test(src,catcherLocalDomain)&&remoteImages.push(src)}remoteImages.length&&catchremoteimage(remoteImages,{success:function(r){try{var info=void 0!==r.state?r:eval("("+r.responseText+")")}catch(e){return}var i,j,ci,cj,oldSrc,newSrc,list=info.list;for(i=0;ci=imgs[i++];)for(oldSrc=ci.getAttribute("_src")||ci.src||"",j=0;cj=list[j++];)if(oldSrc==cj.source&&"SUCCESS"==cj.state){newSrc=catcherUrlPrefix+cj.url,domUtils.setAttributes(ci,{src:newSrc,_src:newSrc});break}me.fireEvent("catchremotesuccess")},error:function(){me.fireEvent("catchremoteerror")}})}))},UE.plugin.register("snapscreen",function(){function getLocation(a){var b,c=document.createElement("a"),d=utils.serializeParam(me.queryCommandValue("serverparam"))||"";return c.href=a,browser.ie&&(c.href=c.href),b=c.search,d&&(b=b+(b.indexOf("?")==-1?"?":"&")+d,b=b.replace(/[&]+/gi,"&")),{port:c.port,hostname:c.hostname,path:c.pathname+b||+c.hash}}var me=this,snapplugin;return{commands:{snapscreen:{execCommand:function(cmd){function onSuccess(rs){try{if(rs=eval("("+rs+")"),"SUCCESS"==rs.state){var opt=me.options;me.execCommand("insertimage",{src:opt.snapscreenUrlPrefix+rs.url,_src:opt.snapscreenUrlPrefix+rs.url,alt:rs.title||"",floatStyle:opt.snapscreenImgAlign})}else alert(rs.state)}catch(e){alert(lang.callBackErrorMsg)}}var url,local,res,lang=me.getLang("snapScreen_plugin");if(!snapplugin){var container=me.container,doc=me.container.ownerDocument||me.container.document;snapplugin=doc.createElement("object");try{snapplugin.type="application/x-pluginbaidusnap"}catch(e){return}snapplugin.style.cssText="position:absolute;left:-9999px;width:0;height:0;",snapplugin.setAttribute("width","0"),snapplugin.setAttribute("height","0"),container.appendChild(snapplugin)}url=me.getActionUrl(me.getOpt("snapscreenActionName")),local=getLocation(url),setTimeout(function(){try{res=snapplugin.saveSnapshot(local.hostname,local.path,local.port)}catch(a){return void me.ui._dialogs.snapscreenDialog.open()}onSuccess(res)},50)},queryCommandState:function(){return navigator.userAgent.indexOf("Windows",0)!=-1?0:-1}}}}}),UE.commands.insertparagraph={execCommand:function(a,b){for(var c,d=this,e=d.selection.getRange(),f=e.startContainer;f&&!domUtils.isBody(f);)c=f,f=f.parentNode;if(c){var g=d.document.createElement("p");b?c.parentNode.insertBefore(g,c):c.parentNode.insertBefore(g,c.nextSibling),domUtils.fillNode(d.document,g),e.setStart(g,0).setCursor(!1,!0)}}},UE.plugin.register("webapp",function(){function a(a,c){return c?'':'"}var b=this;return{outputRule:function(b){utils.each(b.getNodesByTagName("img"),function(b){var c;if("edui-faked-webapp"==b.getAttr("class")){c=a({title:b.getAttr("title"),width:b.getAttr("width"),height:b.getAttr("height"),align:b.getAttr("align"),cssfloat:b.getStyle("float"),url:b.getAttr("_url"),logo:b.getAttr("_logo_url")},!0);var d=UE.uNode.createElement(c);b.parentNode.replaceChild(d,b)}})},inputRule:function(b){utils.each(b.getNodesByTagName("iframe"),function(b){if("edui-faked-webapp"==b.getAttr("class")){var c=UE.uNode.createElement(a({title:b.getAttr("title"),width:b.getAttr("width"),height:b.getAttr("height"),align:b.getAttr("align"),cssfloat:b.getStyle("float"),url:b.getAttr("src"),logo:b.getAttr("logo_url")}));b.parentNode.replaceChild(c,b)}})},commands:{webapp:{execCommand:function(b,c){var d=this,e=a(utils.extend(c,{align:"none"}),!1);d.execCommand("inserthtml",e)},queryCommandState:function(){var a=this,b=a.selection.getRange().getClosedNode(),c=b&&"edui-faked-webapp"==b.className;return c?1:0}}}}}),UE.plugins.template=function(){UE.commands.template={execCommand:function(a,b){b.html&&this.execCommand("inserthtml",b.html)}},this.addListener("click",function(a,b){var c=b.target||b.srcElement,d=this.selection.getRange(),e=domUtils.findParent(c,function(a){if(a.className&&domUtils.hasClass(a,"ue_t"))return a},!0);e&&d.selectNode(e).shrinkBoundary().select()}),this.addListener("keydown",function(a,b){var c=this.selection.getRange();if(!c.collapsed&&!(b.ctrlKey||b.metaKey||b.shiftKey||b.altKey)){var d=domUtils.findParent(c.startContainer,function(a){if(a.className&&domUtils.hasClass(a,"ue_t"))return a},!0);d&&domUtils.removeClasses(d,["ue_t"])}})},UE.plugin.register("music",function(){function a(a,c,d,e,f,g){return g?'':"'}var b=this;return{outputRule:function(b){utils.each(b.getNodesByTagName("img"),function(b){var c;if("edui-faked-music"==b.getAttr("class")){var d=b.getStyle("float"),e=b.getAttr("align");c=a(b.getAttr("_url"),b.getAttr("width"),b.getAttr("height"),e,d,!0);var f=UE.uNode.createElement(c);b.parentNode.replaceChild(f,b)}})},inputRule:function(b){utils.each(b.getNodesByTagName("embed"),function(b){if("edui-faked-music"==b.getAttr("class")){var c=b.getStyle("float"),d=b.getAttr("align");html=a(b.getAttr("src"),b.getAttr("width"),b.getAttr("height"),d,c,!1);var e=UE.uNode.createElement(html);b.parentNode.replaceChild(e,b)}})},commands:{music:{execCommand:function(b,c){var d=this,e=a(c.url,c.width||400,c.height||95,"none",!1);d.execCommand("inserthtml",e)},queryCommandState:function(){var a=this,b=a.selection.getRange().getClosedNode(),c=b&&"edui-faked-music"==b.className;return c?1:0}}}}}),UE.plugin.register("autoupload",function(){function a(a,b){var c,d,e,f,g,h,i,j,k=b,l=/image\/\w+/i.test(a.type)?"image":"file",m="loading_"+(+new Date).toString(36);if(c=k.getOpt(l+"FieldName"),d=k.getOpt(l+"UrlPrefix"),e=k.getOpt(l+"MaxSize"),f=k.getOpt(l+"AllowFiles"),g=k.getActionUrl(k.getOpt(l+"ActionName")),i=function(a){var b=k.document.getElementById(m);b&&domUtils.remove(b),k.fireEvent("showmessage",{id:m,content:a,type:"error",timeout:4e3})},"image"==l?(h='',j=function(a){var b=d+a.url,c=k.document.getElementById(m);c&&(c.setAttribute("src",b),c.setAttribute("_src",b),c.setAttribute("title",a.title||""),c.setAttribute("alt",a.original||""),c.removeAttribute("id"),domUtils.removeClasses(c,"loadingclass"))}):(h='

    ',j=function(a){var b=d+a.url,c=k.document.getElementById(m),e=k.selection.getRange(),f=e.createBookmark();e.selectNode(c).select(),k.execCommand("insertfile",{url:b}),e.moveToBookmark(f).select()}),k.execCommand("inserthtml",h),!k.getOpt(l+"ActionName"))return void i(k.getLang("autoupload.errorLoadConfig"));if(a.size>e)return void i(k.getLang("autoupload.exceedSizeError"));var n=a.name?a.name.substr(a.name.lastIndexOf(".")):"";if(n&&"image"!=l||f&&(f.join("")+".").indexOf(n.toLowerCase()+".")==-1)return void i(k.getLang("autoupload.exceedTypeError"));var o=new XMLHttpRequest,p=new FormData,q=utils.serializeParam(k.queryCommandValue("serverparam"))||"",r=utils.formatUrl(g+(g.indexOf("?")==-1?"?":"&")+q);p.append(c,a,a.name||"blob."+a.type.substr("image/".length)),p.append("type","ajax"),o.open("post",r,!0),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.addEventListener("load",function(a){try{var b=new Function("return "+utils.trim(a.target.response))();"SUCCESS"==b.state&&b.url?j(b):i(b.state)}catch(c){i(k.getLang("autoupload.loadError"))}}),o.send(p)}function b(a){return a.clipboardData&&a.clipboardData.items&&1==a.clipboardData.items.length&&/^image\//.test(a.clipboardData.items[0].type)?a.clipboardData.items:null}function c(a){return a.dataTransfer&&a.dataTransfer.files?a.dataTransfer.files:null}return{outputRule:function(a){utils.each(a.getNodesByTagName("img"),function(a){/\b(loaderrorclass)|(bloaderrorclass)\b/.test(a.getAttr("class"))&&a.parentNode.removeChild(a)}),utils.each(a.getNodesByTagName("p"),function(a){/\bloadpara\b/.test(a.getAttr("class"))&&a.parentNode.removeChild(a)})},bindEvents:{ready:function(d){var e=this;window.FormData&&window.FileReader&&(domUtils.on(e.body,"paste drop",function(d){var f,g=!1;if(f="paste"==d.type?b(d):c(d)){for(var h,i=f.length;i--;)h=f[i],h.getAsFile&&(h=h.getAsFile()),h&&h.size>0&&(a(h,e),g=!0);g&&d.preventDefault()}}),domUtils.on(e.body,"dragover",function(a){"Files"==a.dataTransfer.types[0]&&a.preventDefault()}),utils.cssRule("loading",".loadingclass{display:inline-block;cursor:default;background: url('"+this.options.themePath+this.options.theme+"/images/loading.gif') no-repeat center center transparent;border:1px solid #cccccc;margin-left:1px;height: 22px;width: 22px;}\n.loaderrorclass{display:inline-block;cursor:default;background: url('"+this.options.themePath+this.options.theme+"/images/loaderror.png') no-repeat center center transparent;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;}",this.document))}}}}),UE.plugin.register("autosave",function(){function a(a){var f;if(!(new Date-c0?b._saveFlag=window.setTimeout(function(){a(b)},b.options.saveInterval):a(b))}},commands:{clearlocaldata:{execCommand:function(a,c){e&&b.getPreferences(e)&&b.removePreferences(e)},notNeedUndo:!0,ignoreContentChange:!0},getlocaldata:{execCommand:function(a,c){return e?b.getPreferences(e)||"":""},notNeedUndo:!0,ignoreContentChange:!0},drafts:{execCommand:function(a,c){e&&(b.body.innerHTML=b.getPreferences(e)||"

    "+domUtils.fillHtml+"

    ",b.focus(!0))},queryCommandState:function(){return e?null===b.getPreferences(e)?-1:0:-1},notNeedUndo:!0,ignoreContentChange:!0}}}}),UE.plugin.register("charts",function(){function a(a){var b=null,c=0;if(a.rows.length<2)return!1;if(a.rows[0].cells.length<2)return!1;b=a.rows[0].cells,c=b.length;for(var d,e=0;d=b[e];e++)if("th"!==d.tagName.toLowerCase())return!1;for(var f,e=1;f=a.rows[e];e++){if(f.cells.length!=c)return!1;if("th"!==f.cells[0].tagName.toLowerCase())return!1;for(var d,g=1;d=f.cells[g];g++){var h=utils.trim(d.innerText||d.textContent||"");if(h=h.replace(new RegExp(UE.dom.domUtils.fillChar,"g"),"").replace(/^\s+|\s+$/g,""),!/^\d*\.?\d+$/.test(h))return!1}}return!0}var b=this;return{bindEvents:{chartserror:function(){}},commands:{charts:{execCommand:function(c,d){var e=domUtils.findParentByTagName(this.selection.getRange().startContainer,"table",!0),f=[],g={};if(!e)return!1;if(!a(e))return b.fireEvent("chartserror"),!1;g.title=d.title||"",g.subTitle=d.subTitle||"",g.xTitle=d.xTitle||"",g.yTitle=d.yTitle||"",g.suffix=d.suffix||"",g.tip=d.tip||"",g.dataFormat=d.tableDataFormat||"",g.chartType=d.chartType||0;for(var h in g)g.hasOwnProperty(h)&&f.push(h+":"+g[h]); -e.setAttribute("data-chart",f.join(";")),domUtils.addClass(e,"edui-charts-table")},queryCommandState:function(b,c){var d=domUtils.findParentByTagName(this.selection.getRange().startContainer,"table",!0);return d&&a(d)?0:-1}}},inputRule:function(a){utils.each(a.getNodesByTagName("table"),function(a){void 0!==a.getAttr("data-chart")&&a.setAttr("style")})},outputRule:function(a){utils.each(a.getNodesByTagName("table"),function(a){void 0!==a.getAttr("data-chart")&&a.setAttr("style","display: none;")})}}}),UE.plugin.register("section",function(){function a(a){this.tag="",this.level=-1,this.dom=null,this.nextSection=null,this.previousSection=null,this.parentSection=null,this.startAddress=[],this.endAddress=[],this.children=[]}function b(b){var c=new a;return utils.extend(c,b)}function c(a,b){for(var c=b,d=0;d=0){var o=h.selection.getRange().selectNode(i).createAddress(!0).startAddress,p=b({tag:i.tagName,title:i.innerText||i.textContent||"",level:f,dom:i,startAddress:utils.clone(o,[]),endAddress:utils.clone(o,[]),children:[]});for(j.nextSection=p,p.previousSection=j,g=j;f<=g.level;)g=g.parentSection;p.parentSection=g,g.children.push(p),k=j=p}else 1===i.nodeType&&e(i,c),k&&k.endAddress[k.endAddress.length-1]++}for(var f=c||["h1","h2","h3","h4","h5","h6"],g=0;g=c.length);f++){if(c[f]>a[f]){d=!0;break}if(c[f]=c.length);f++){if(c[f]a[f])break}return d&&e}var g,h,i=this;if(b&&d&&d.level!=-1&&(g=e?d.endAddress:d.startAddress,h=c(g,i.body),g&&h&&!f(b.startAddress,b.endAddress,g))){var j,k,l=c(b.startAddress,i.body),m=c(b.endAddress,i.body);if(e)for(j=m;j&&!(domUtils.getPosition(l,j)&domUtils.POSITION_FOLLOWING)&&(k=j.previousSibling,domUtils.insertAfter(h,j),j!=l);)j=k;else for(j=l;j&&!(domUtils.getPosition(j,m)&domUtils.POSITION_FOLLOWING)&&(k=j.nextSibling,h.parentNode.insertBefore(j,h),j!=m);)j=k;i.fireEvent("updateSections")}}},deletesection:{execCommand:function(a,b,c){function d(a){for(var b=e.body,c=0;c'),!c.getOpt("imageActionName"))return void b(c.getLang("autoupload.errorLoadConfig"));var k=h.value,l=k?k.substr(k.lastIndexOf(".")):"";if(!l||j&&(j.join("")+".").indexOf(l.toLowerCase()+".")==-1)return void b(c.getLang("simpleupload.exceedTypeError"));var m=new XMLHttpRequest;if(m.open("post",i,!0),c.options.headers&&"[object Object]"===Object.prototype.toString.apply(c.options.headers))for(var n in c.options.headers)m.setRequestHeader(n,c.options.headers[n]);m.onload=function(){if(m.status>=200&&m.status<300||304==m.status){var a=JSON.parse(m.responseText),e=c.options.imageUrlPrefix+a.url;"SUCCESS"==a.state&&a.url?(loader=c.document.getElementById(d),loader.setAttribute("src",e),loader.setAttribute("_src",e),loader.setAttribute("title",a.title||""),loader.setAttribute("alt",a.original||""),loader.removeAttribute("id"),domUtils.removeClasses(loader,"loadingclass"),c.fireEvent("contentchange")):b(a.state)}else b(c.getLang("simpleupload.loadError"))},m.onerror=function(){b(c.getLang("simpleupload.loadError"))},m.send(new FormData(g)),g.reset()}})}var b,c=this,d=(+new Date).toString(36);return{bindEvents:{ready:function(){utils.cssRule("loading",".loadingclass{display:inline-block;cursor:default;background: url('"+this.options.themePath+this.options.theme+"/images/loading.gif') no-repeat center center transparent;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;}\n.loaderrorclass{display:inline-block;cursor:default;background: url('"+this.options.themePath+this.options.theme+"/images/loaderror.png') no-repeat center center transparent;border:1px solid #cccccc;margin-right:1px;height: 22px;width: 22px;}",this.document)},simpleuploadbtnready:function(d,e){b=e,c.afterConfigReady(a)}},outputRule:function(a){utils.each(a.getNodesByTagName("img"),function(a){/\b(loaderrorclass)|(bloaderrorclass)\b/.test(a.getAttr("class"))&&a.parentNode.removeChild(a)})}}}),UE.plugin.register("serverparam",function(){var a={};return{commands:{serverparam:{execCommand:function(b,c,d){void 0===c||null===c?a={}:utils.isString(c)?void 0===d||null===d?delete a[c]:a[c]=d:utils.isObject(c)?utils.extend(a,c,!0):utils.isFunction(c)&&utils.extend(a,c(),!0)},queryCommandValue:function(){return a||{}}}}}}),UE.plugin.register("insertfile",function(){function a(a){var b=a.substr(a.lastIndexOf(".")+1).toLowerCase(),c={rar:"icon_rar.gif",zip:"icon_rar.gif",tar:"icon_rar.gif",gz:"icon_rar.gif",bz2:"icon_rar.gif",doc:"icon_doc.gif",docx:"icon_doc.gif",pdf:"icon_pdf.gif",mp3:"icon_mp3.gif",xls:"icon_xls.gif",chm:"icon_chm.gif",ppt:"icon_ppt.gif",pptx:"icon_ppt.gif",avi:"icon_mv.gif",rmvb:"icon_mv.gif",wmv:"icon_mv.gif",flv:"icon_mv.gif",swf:"icon_mv.gif",rm:"icon_mv.gif",exe:"icon_exe.gif",psd:"icon_psd.gif",txt:"icon_txt.gif",jpg:"icon_jpg.gif",png:"icon_jpg.gif",jpeg:"icon_jpg.gif",gif:"icon_jpg.gif",ico:"icon_jpg.gif",bmp:"icon_jpg.gif"};return c[b]?c[b]:c.txt}var b=this;return{commands:{insertfile:{execCommand:function(c,d){d=utils.isArray(d)?d:[d];var e,f,g,h,i="",j=b.getOpt("UEDITOR_HOME_URL"),k=j+("/"==j.substr(j.length-1)?"":"/")+"dialogs/attachment/fileTypeImages/";for(e=0;e'+h+"

    ";b.execCommand("insertHtml",i)}}}}}),UE.plugins.xssFilter=function(){function a(a){var b=a.tagName,d=a.attrs;return c.hasOwnProperty(b)?void UE.utils.each(d,function(d,e){c[b].indexOf(e)===-1&&a.setAttr(e)}):(a.parentNode.removeChild(a),!1)}var b=UEDITOR_CONFIG,c=b.whitList;c&&b.xssFilterRules&&(this.options.filterRules=function(){var b={};return UE.utils.each(c,function(c,d){b[d]=function(b){return a(b)}}),b}());var d=[];UE.utils.each(c,function(a,b){d.push(b)}),c&&b.inputXssFilter&&this.addInputRule(function(b){b.traversal(function(b){return"element"===b.type&&void a(b)})}),c&&b.outputXssFilter&&this.addOutputRule(function(b){b.traversal(function(b){return"element"===b.type&&void a(b)})})};var baidu=baidu||{};baidu.editor=baidu.editor||{},UE.ui=baidu.editor.ui={},function(){function a(){var a=document.getElementById("edui_fixedlayer");i.setViewportOffset(a,{left:0,top:0})}function b(b){d.on(window,"scroll",a),d.on(window,"resize",baidu.editor.utils.defer(a,0,!0))}var c=baidu.editor.browser,d=baidu.editor.dom.domUtils,e="$EDITORUI",f=window[e]={},g="ID"+e,h=0,i=baidu.editor.ui.uiUtils={uid:function(a){return a?a[g]||(a[g]=++h):++h},hook:function(a,b){var c;return a&&a._callbacks?c=a:(c=function(){var b;a&&(b=a.apply(this,arguments));for(var d=c._callbacks,e=d.length;e--;){var f=d[e].apply(this,arguments);void 0===b&&(b=f)}return b},c._callbacks=[]),c._callbacks.push(b),c},createElementByHtml:function(a){var b=document.createElement("div");return b.innerHTML=a,b=b.firstChild,b.parentNode.removeChild(b),b},getViewportElement:function(){return c.ie&&c.quirks?document.body:document.documentElement},getClientRect:function(a){var b;try{b=a.getBoundingClientRect()}catch(c){b={left:0,top:0,height:0,width:0}}for(var e,f={left:Math.round(b.left),top:Math.round(b.top),height:Math.round(b.bottom-b.top),width:Math.round(b.right-b.left)};(e=a.ownerDocument)!==document&&(a=d.getWindow(e).frameElement);)b=a.getBoundingClientRect(),f.left+=b.left,f.top+=b.top;return f.bottom=f.top+f.height,f.right=f.left+f.width,f},getViewportRect:function(){var a=i.getViewportElement(),b=0|(window.innerWidth||a.clientWidth),c=0|(window.innerHeight||a.clientHeight);return{left:0,top:0,height:c,width:b,bottom:c,right:b}},setViewportOffset:function(a,b){var c=i.getFixedLayer();a.parentNode===c?(a.style.left=b.left+"px",a.style.top=b.top+"px"):d.setViewportOffset(a,b)},getEventOffset:function(a){var b=a.target||a.srcElement,c=i.getClientRect(b),d=i.getViewportOffsetByEvent(a);return{left:d.left-c.left,top:d.top-c.top}},getViewportOffsetByEvent:function(a){var b=a.target||a.srcElement,c=d.getWindow(b).frameElement,e={left:a.clientX,top:a.clientY};if(c&&b.ownerDocument!==document){var f=i.getClientRect(c);e.left+=f.left,e.top+=f.top}return e},setGlobal:function(a,b){return f[a]=b,e+'["'+a+'"]'},unsetGlobal:function(a){delete f[a]},copyAttributes:function(a,b){for(var e=b.attributes,f=e.length;f--;){var g=e[f];"style"==g.nodeName||"class"==g.nodeName||c.ie&&!g.specified||a.setAttribute(g.nodeName,g.nodeValue)}b.className&&d.addClass(a,b.className),b.style.cssText&&(a.style.cssText+=";"+b.style.cssText)},removeStyle:function(a,b){if(a.style.removeProperty)a.style.removeProperty(b);else{if(!a.style.removeAttribute)throw"";a.style.removeAttribute(b)}},contains:function(a,b){return a&&b&&a!==b&&(a.contains?a.contains(b):16&a.compareDocumentPosition(b))},startDrag:function(a,b,c){function d(a){var c=a.clientX-g,d=a.clientY-h;b.ondragmove(c,d,a),a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function e(a){c.removeEventListener("mousemove",d,!0),c.removeEventListener("mouseup",e,!0),window.removeEventListener("mouseup",e,!0),b.ondragstop()}function f(){i.releaseCapture(),i.detachEvent("onmousemove",d),i.detachEvent("onmouseup",f),i.detachEvent("onlosecaptrue",f),b.ondragstop()}var c=c||document,g=a.clientX,h=a.clientY;if(c.addEventListener)c.addEventListener("mousemove",d,!0),c.addEventListener("mouseup",e,!0),window.addEventListener("mouseup",e,!0),a.preventDefault();else{var i=a.srcElement;i.setCapture(),i.attachEvent("onmousemove",d),i.attachEvent("onmouseup",f),i.attachEvent("onlosecaptrue",f),a.returnValue=!1}b.ondragstart()},getFixedLayer:function(){var d=document.getElementById("edui_fixedlayer");return null==d&&(d=document.createElement("div"),d.id="edui_fixedlayer",document.body.appendChild(d),c.ie&&c.version<=8?(d.style.position="absolute",b(),setTimeout(a)):d.style.position="fixed",d.style.left="0",d.style.top="0",d.style.width="0",d.style.height="0"),d},makeUnselectable:function(a){if(c.opera||c.ie&&c.version<9){if(a.unselectable="on",a.hasChildNodes())for(var b=0;b
    '}},a.inherits(c,b)}(),function(){var a=baidu.editor.utils,b=baidu.editor.dom.domUtils,c=baidu.editor.ui.UIBase,d=baidu.editor.ui.uiUtils,e=baidu.editor.ui.Mask=function(a){this.initOptions(a),this.initUIBase()};e.prototype={getHtmlTpl:function(){return'
    '},postRender:function(){var a=this;b.on(window,"resize",function(){setTimeout(function(){a.isHidden()||a._fill()})})},show:function(a){this._fill(),this.getDom().style.display="",this.getDom().style.zIndex=a},hide:function(){this.getDom().style.display="none",this.getDom().style.zIndex=""},isHidden:function(){return"none"==this.getDom().style.display},_onMouseDown:function(){return!1},_onClick:function(a,b){this.fireEvent("click",a,b)},_fill:function(){var a=this.getDom(),b=d.getViewportRect();a.style.width=b.width+"px",a.style.height=b.height+"px"}},a.inherits(e,c)}(),function(){function a(a,b){for(var c=0;c
    '+this.getContentHtmlTpl()+"
    "},getContentHtmlTpl:function(){return this.content?"string"==typeof this.content?this.content:this.content.renderHtml():""},_UIBase_postRender:e.prototype.postRender,postRender:function(){if(this.content instanceof e&&this.content.postRender(),this.captureWheel&&!this.captured){this.captured=!0;var a=(document.documentElement.clientHeight||document.body.clientHeight)-80,b=this.getDom().offsetHeight,f=c.getClientRect(this.combox.getDom()).top,g=this.getDom("content"),h=this.getDom("body").getElementsByTagName("iframe"),i=this;for(h.length&&(h=h[0]);f+b>a;)b-=30;g.style.height=b+"px",h&&(h.style.height=b+"px"),window.XMLHttpRequest?d.on(g,"onmousewheel"in document.body?"mousewheel":"DOMMouseScroll",function(a){a.preventDefault?a.preventDefault():a.returnValue=!1,a.wheelDelta?g.scrollTop-=a.wheelDelta/120*60:g.scrollTop-=a.detail/-3*60}):d.on(this.getDom(),"mousewheel",function(a){a.returnValue=!1,i.getDom("content").scrollTop-=a.wheelDelta/120*60})}this.fireEvent("postRenderAfter"),this.hide(!0),this._UIBase_postRender()},_doAutoRender:function(){!this.getDom()&&this.autoRender&&this.render()},mesureSize:function(){var a=this.getDom("content");return c.getClientRect(a)},fitSize:function(){if(this.captureWheel&&this.sized)return this.__size;this.sized=!0;var a=this.getDom("body");a.style.width="",a.style.height="";var b=this.mesureSize();if(this.captureWheel){a.style.width=-(-20-b.width)+"px";var c=parseInt(this.getDom("content").style.height,10);!window.isNaN(c)&&(b.height=c)}else a.style.width=b.width+"px";return a.style.height=b.height+"px",this.__size=b,this.captureWheel&&(this.getDom("content").style.overflow="auto"),b},showAnchor:function(a,b){this.showAnchorRect(c.getClientRect(a),b)},showAnchorRect:function(a,b,e){this._doAutoRender();var f=c.getViewportRect();this.getDom().style.visibility="hidden",this._show();var g,i,j,k,l=this.fitSize();b?(g=this.canSideLeft&&a.right+l.width>f.right&&a.left>l.width,i=this.canSideUp&&a.top+l.height>f.bottom&&a.bottom>l.height,j=g?a.left-l.width:a.right,k=i?a.bottom-l.height:a.top):(g=this.canSideLeft&&a.right+l.width>f.right&&a.left>l.width,i=this.canSideUp&&a.top+l.height>f.bottom&&a.bottom>l.height,j=g?a.right-l.width:a.left,k=i?a.top-l.height:a.bottom);var m=this.getDom();c.setViewportOffset(m,{left:j,top:k}),d.removeClasses(m,h),m.className+=" "+h[2*(i?1:0)+(g?1:0)],this.editor&&(m.style.zIndex=1*this.editor.container.style.zIndex+10,baidu.editor.ui.uiUtils.getFixedLayer().style.zIndex=m.style.zIndex-1),this.getDom().style.visibility="visible"},showAt:function(a){var b=a.left,c=a.top,d={left:b,top:c,right:b,bottom:c,height:0,width:0};this.showAnchorRect(d,!1,!0)},_show:function(){if(this._hidden){var a=this.getDom();a.style.display="",this._hidden=!1,this.fireEvent("show")}},isHidden:function(){return this._hidden},show:function(){this._doAutoRender(),this._show()},hide:function(a){!this._hidden&&this.getDom()&&(this.getDom().style.display="none",this._hidden=!0,a||this.fireEvent("hide"))},queryAutoHide:function(a){return!a||!c.contains(this.getDom(),a)}},b.inherits(f,e),d.on(document,"mousedown",function(b){var c=b.target||b.srcElement;a(b,c)}),d.on(window,"scroll",function(b,c){a(b,c)})}(),function(){function a(a,b){for(var c='
    '+a+'
    ',d=0;d"+(60==d?'":"")+""),c+=d<70?'':"";return c+="
    '+b.getLang("themeColor")+'
    '+b.getLang("standardColor")+"
    =60?"border-width:1px;":d>=10&&d<20?"border-width:1px 1px 0 1px;":"border-width:0 1px 0 1px;")+'">
    "}var b=baidu.editor.utils,c=baidu.editor.ui.UIBase,d=baidu.editor.ui.ColorPicker=function(a){this.initOptions(a),this.noColorText=this.noColorText||this.editor.getLang("clearColor"),this.initUIBase()};d.prototype={getHtmlTpl:function(){return a(this.noColorText,this.editor)},_onTableClick:function(a){var b=a.target||a.srcElement,c=b.getAttribute("data-color");c&&this.fireEvent("pickcolor",c)},_onTableOver:function(a){var b=a.target||a.srcElement,c=b.getAttribute("data-color");c&&(this.getDom("preview").style.backgroundColor=c)},_onTableOut:function(){this.getDom("preview").style.backgroundColor=""},_onPickNoColor:function(){this.fireEvent("picknocolor")}},b.inherits(d,c);var e="ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646,f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada,d8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5,bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f,a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09,7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806,c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0,".split(",")}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.uiUtils,c=baidu.editor.ui.UIBase,d=baidu.editor.ui.TablePicker=function(a){this.initOptions(a),this.initTablePicker()};d.prototype={defaultNumRows:10,defaultNumCols:10,maxNumRows:20,maxNumCols:20,numRows:10,numCols:10,lengthOfCellSide:22,initTablePicker:function(){this.initUIBase()},getHtmlTpl:function(){return'
    '},_UIBase_render:c.prototype.render,render:function(a){this._UIBase_render(a),this.getDom("label").innerHTML="0"+this.editor.getLang("t_row")+" x 0"+this.editor.getLang("t_col")},_track:function(a,b){var c=this.getDom("overlay").style,d=this.lengthOfCellSide;c.width=a*d+"px",c.height=b*d+"px";var e=this.getDom("label");e.innerHTML=a+this.editor.getLang("t_col")+" x "+b+this.editor.getLang("t_row"),this.numCols=a,this.numRows=b},_onMouseOver:function(a,c){var d=a.relatedTarget||a.fromElement;b.contains(c,d)||c===d||(this.getDom("label").innerHTML="0"+this.editor.getLang("t_col")+" x 0"+this.editor.getLang("t_row"),this.getDom("overlay").style.visibility="")},_onMouseOut:function(a,c){var d=a.relatedTarget||a.toElement;b.contains(c,d)||c===d||(this.getDom("label").innerHTML="0"+this.editor.getLang("t_col")+" x 0"+this.editor.getLang("t_row"),this.getDom("overlay").style.visibility="hidden")},_onMouseMove:function(a,c){var d=(this.getDom("overlay").style,b.getEventOffset(a)),e=this.lengthOfCellSide,f=Math.ceil(d.left/e),g=Math.ceil(d.top/e);this._track(f,g)},_onClick:function(){this.fireEvent("picktable",this.numCols,this.numRows)}},a.inherits(d,c)}(),function(){var a=baidu.editor.browser,b=baidu.editor.dom.domUtils,c=baidu.editor.ui.uiUtils,d='onmousedown="$$.Stateful_onMouseDown(event, this);" onmouseup="$$.Stateful_onMouseUp(event, this);"'+(a.ie?' onmouseenter="$$.Stateful_onMouseEnter(event, this);" onmouseleave="$$.Stateful_onMouseLeave(event, this);"':' onmouseover="$$.Stateful_onMouseOver(event, this);" onmouseout="$$.Stateful_onMouseOut(event, this);"');baidu.editor.ui.Stateful={alwalysHoverable:!1,target:null,Stateful_init:function(){this._Stateful_dGetHtmlTpl=this.getHtmlTpl,this.getHtmlTpl=this.Stateful_getHtmlTpl},Stateful_getHtmlTpl:function(){var a=this._Stateful_dGetHtmlTpl();return a.replace(/stateful/g,function(){return d})},Stateful_onMouseEnter:function(a,b){this.target=b,this.isDisabled()&&!this.alwalysHoverable||(this.addState("hover"),this.fireEvent("over"))},Stateful_onMouseLeave:function(a,b){this.isDisabled()&&!this.alwalysHoverable||(this.removeState("hover"),this.removeState("active"),this.fireEvent("out"))},Stateful_onMouseOver:function(a,b){var d=a.relatedTarget;c.contains(b,d)||b===d||this.Stateful_onMouseEnter(a,b)},Stateful_onMouseOut:function(a,b){var d=a.relatedTarget;c.contains(b,d)||b===d||this.Stateful_onMouseLeave(a,b)},Stateful_onMouseDown:function(a,b){this.isDisabled()||this.addState("active")},Stateful_onMouseUp:function(a,b){this.isDisabled()||this.removeState("active")},Stateful_postRender:function(){this.disabled&&!this.hasState("disabled")&&this.addState("disabled")},hasState:function(a){return b.hasClass(this.getStateDom(),"edui-state-"+a)},addState:function(a){this.hasState(a)||(this.getStateDom().className+=" edui-state-"+a)},removeState:function(a){this.hasState(a)&&b.removeClasses(this.getStateDom(),["edui-state-"+a])},getStateDom:function(){return this.getDom("state")},isChecked:function(){return this.hasState("checked")},setChecked:function(a){!this.isDisabled()&&a?this.addState("checked"):this.removeState("checked")},isDisabled:function(){return this.hasState("disabled")},setDisabled:function(a){a?(this.removeState("hover"),this.removeState("checked"),this.removeState("active"),this.addState("disabled")):this.removeState("disabled")}}}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.UIBase,c=baidu.editor.ui.Stateful,d=baidu.editor.ui.Button=function(a){if(a.name){var b=a.name,c=a.cssRules;a.className||(a.className="edui-for-"+b),a.cssRules=".edui-default .edui-for-"+b+" .edui-icon {"+c+"}"}this.initOptions(a),this.initButton()};d.prototype={uiName:"button",label:"",title:"",showIcon:!0,showText:!0,cssRules:"",initButton:function(){this.initUIBase(),this.Stateful_init(),this.cssRules&&a.cssRule("edui-customize-"+this.name+"-style",this.cssRules)},getHtmlTpl:function(){return'
    '+(this.showIcon?'
    ':"")+(this.showText?'
    '+this.label+"
    ":"")+"
    "},postRender:function(){this.Stateful_postRender(),this.setDisabled(this.disabled)},_onMouseDown:function(a){var b=a.target||a.srcElement,c=b&&b.tagName&&b.tagName.toLowerCase();if("input"==c||"object"==c||"object"==c)return!1},_onClick:function(){this.isDisabled()||this.fireEvent("click")},setTitle:function(a){var b=this.getDom("label");b.innerHTML=a}},a.inherits(d,b),a.extend(d.prototype,c)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.uiUtils,c=(baidu.editor.dom.domUtils,baidu.editor.ui.UIBase),d=baidu.editor.ui.Stateful,e=baidu.editor.ui.SplitButton=function(a){this.initOptions(a),this.initSplitButton()};e.prototype={popup:null,uiName:"splitbutton",title:"",initSplitButton:function(){this.initUIBase(),this.Stateful_init();if(null!=this.popup){var a=this.popup;this.popup=null,this.setPopup(a)}},_UIBase_postRender:c.prototype.postRender,postRender:function(){this.Stateful_postRender(),this._UIBase_postRender()},setPopup:function(c){this.popup!==c&&(null!=this.popup&&this.popup.dispose(),c.addListener("show",a.bind(this._onPopupShow,this)),c.addListener("hide",a.bind(this._onPopupHide,this)),c.addListener("postrender",a.bind(function(){c.getDom("body").appendChild(b.createElementByHtml('
    ')),c.getDom().className+=" "+this.className},this)),this.popup=c)},_onPopupShow:function(){this.addState("opened")},_onPopupHide:function(){this.removeState("opened")},getHtmlTpl:function(){return'
    '},showPopup:function(){var a=b.getClientRect(this.getDom());a.top-=this.popup.SHADOW_RADIUS,a.height+=this.popup.SHADOW_RADIUS,this.popup.showAnchorRect(a)},_onArrowClick:function(a,b){this.isDisabled()||this.showPopup()},_onButtonClick:function(){this.isDisabled()||this.fireEvent("buttonclick")}},a.inherits(e,c),a.extend(e.prototype,d,!0)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.uiUtils,c=baidu.editor.ui.ColorPicker,d=baidu.editor.ui.Popup,e=baidu.editor.ui.SplitButton,f=baidu.editor.ui.ColorButton=function(a){this.initOptions(a),this.initColorButton()};f.prototype={initColorButton:function(){var a=this;this.popup=new d({content:new c({noColorText:a.editor.getLang("clearColor"),editor:a.editor,onpickcolor:function(b,c){a._onPickColor(c)},onpicknocolor:function(b,c){a._onPickNoColor(c)}}),editor:a.editor}),this.initSplitButton()},_SplitButton_postRender:e.prototype.postRender,postRender:function(){this._SplitButton_postRender(),this.getDom("button_body").appendChild(b.createElementByHtml('
    ')),this.getDom().className+=" edui-colorbutton"},setColor:function(a){this.getDom("colorlump").style.backgroundColor=a,this.color=a},_onPickColor:function(a){this.fireEvent("pickcolor",a)!==!1&&(this.setColor(a),this.popup.hide())},_onPickNoColor:function(a){this.fireEvent("picknocolor")!==!1&&this.popup.hide()}},a.inherits(f,e)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.Popup,c=baidu.editor.ui.TablePicker,d=baidu.editor.ui.SplitButton,e=baidu.editor.ui.TableButton=function(a){this.initOptions(a),this.initTableButton()};e.prototype={initTableButton:function(){var a=this;this.popup=new b({content:new c({editor:a.editor,onpicktable:function(b,c,d){ -a._onPickTable(c,d)}}),editor:a.editor}),this.initSplitButton()},_onPickTable:function(a,b){this.fireEvent("picktable",a,b)!==!1&&this.popup.hide()}},a.inherits(e,d)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.UIBase,c=baidu.editor.ui.AutoTypeSetPicker=function(a){this.initOptions(a),this.initAutoTypeSetPicker()};c.prototype={initAutoTypeSetPicker:function(){this.initUIBase()},getHtmlTpl:function(){var a=this.editor,b=a.options.autotypeset,c=a.getLang("autoTypeSet"),d="textAlignValue"+a.uid,e="imageBlockLineValue"+a.uid,f="symbolConverValue"+a.uid;return'
    "+c.mergeLine+'"+c.delLine+'
    "+c.removeFormat+'"+c.indent+'
    "+c.alignment+'"+a.getLang("justifyleft")+'"+a.getLang("justifycenter")+'"+a.getLang("justifyright")+'
    "+c.imageFloat+'"+a.getLang("default")+'"+a.getLang("justifyleft")+'"+a.getLang("justifycenter")+'"+a.getLang("justifyright")+'
    "+c.removeFontsize+'"+c.removeFontFamily+'
    "+c.removeHtml+'
    "+c.pasteFilter+'
    "+c.symbol+'"+c.bdc2sb+'"+c.tobdc+'
    "},_UIBase_render:b.prototype.render},a.inherits(c,b)}(),function(){function a(a){for(var c,d={},e=a.getDom(),f=a.editor.uid,g=null,h=null,i=domUtils.getElementsByTagName(e,"input"),j=i.length-1;c=i[j--];)if(g=c.getAttribute("type"),"checkbox"==g)if(h=c.getAttribute("name"),d[h]&&delete d[h],c.checked){var k=document.getElementById(h+"Value"+f);if(k){if(/input/gi.test(k.tagName))d[h]=k.value;else for(var l,m=k.getElementsByTagName("input"),n=m.length-1;l=m[n--];)if(l.checked){d[h]=l.value;break}}else d[h]=!0}else d[h]=!1;else d[c.getAttribute("value")]=c.checked;for(var o,p=domUtils.getElementsByTagName(e,"select"),j=0;o=p[j++];){var q=o.getAttribute("name");d[q]=d[q]?o.value:""}b.extend(a.editor.options.autotypeset,d),a.editor.setPreferences("autotypeset",d)}var b=baidu.editor.utils,c=baidu.editor.ui.Popup,d=baidu.editor.ui.AutoTypeSetPicker,e=baidu.editor.ui.SplitButton,f=baidu.editor.ui.AutoTypeSetButton=function(a){this.initOptions(a),this.initAutoTypeSetButton()};f.prototype={initAutoTypeSetButton:function(){var b=this;this.popup=new c({content:new d({editor:b.editor}),editor:b.editor,hide:function(){!this._hidden&&this.getDom()&&(a(this),this.getDom().style.display="none",this._hidden=!0,this.fireEvent("hide"))}});var e=0;this.popup.addListener("postRenderAfter",function(){var c=this;if(!e){var d=this.getDom(),f=d.getElementsByTagName("button")[0];f.onclick=function(){a(c),b.editor.execCommand("autotypeset"),c.hide()},domUtils.on(d,"click",function(d){var e=d.target||d.srcElement,f=b.editor.uid;if(e&&"INPUT"==e.tagName){if("imageBlockLine"==e.name||"textAlign"==e.name||"symbolConver"==e.name)for(var g=e.checked,h=document.getElementById(e.name+"Value"+f),i=h.getElementsByTagName("input"),j={imageBlockLine:"none",textAlign:"left",symbolConver:"tobdc"},k=0;k"),e.push('
    '),2===d&&e.push("");return'
    '+e.join("")+"
    "},getStateDom:function(){return this.target},_onClick:function(a){var c=a.target||a.srcElement;/icon/.test(c.className)&&(this.items[c.parentNode.getAttribute("index")].onclick(),b.postHide(a))},_UIBase_render:d.prototype.render},a.inherits(e,d),a.extend(e.prototype,c,!0)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.Stateful,c=baidu.editor.ui.uiUtils,d=baidu.editor.ui.UIBase,e=baidu.editor.ui.PastePicker=function(a){this.initOptions(a),this.initPastePicker()};e.prototype={initPastePicker:function(){this.initUIBase(),this.Stateful_init()},getHtmlTpl:function(){return'
    '+this.editor.getLang("pasteOpt")+'
    '},getStateDom:function(){return this.target},format:function(a){this.editor.ui._isTransfer=!0,this.editor.fireEvent("pasteTransfer",a)},_onClick:function(a){var b=domUtils.getNextDomNode(a),d=c.getViewportRect().height,e=c.getClientRect(b);e.top+e.height>d?b.style.top=-e.height-a.offsetHeight+"px":b.style.top="",/hidden/gi.test(domUtils.getComputedStyle(b,"visibility"))?(b.style.visibility="visible",domUtils.addClass(a,"edui-state-opened")):(b.style.visibility="hidden",domUtils.removeClasses(a,"edui-state-opened"))},_UIBase_render:d.prototype.render},a.inherits(e,d),a.extend(e.prototype,b,!0)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.uiUtils,c=baidu.editor.ui.UIBase,d=baidu.editor.ui.Toolbar=function(a){this.initOptions(a),this.initToolbar()};d.prototype={items:null,initToolbar:function(){this.items=this.items||[],this.initUIBase()},add:function(a,b){void 0===b?this.items.push(a):this.items.splice(b,0,a)},getHtmlTpl:function(){for(var a=[],b=0;b'+a.join("")+""},postRender:function(){for(var a=this.getDom(),c=0;c
    '},postRender:function(){},queryAutoHide:function(){return!0}};h.prototype={items:null,uiName:"menu",initMenu:function(){this.items=this.items||[],this.initPopup(),this.initItems()},initItems:function(){for(var a=0;a'+a.join("")+""},_Popup_postRender:e.prototype.postRender,postRender:function(){for(var a=this,d=0;d
    '+this.renderLabelHtml()+"
    "},postRender:function(){var a=this;this.addListener("over",function(){a.ownerMenu.fireEvent("submenuover",a),a.subMenu&&a.delayShowSubMenu()}),this.subMenu&&(this.getDom().className+=" edui-hassubmenu",this.subMenu.render(),this.addListener("out",function(){a.delayHideSubMenu()}),this.subMenu.addListener("over",function(){clearTimeout(a._closingTimer),a._closingTimer=null,a.addState("opened")}),this.ownerMenu.addListener("hide",function(){a.hideSubMenu()}),this.ownerMenu.addListener("submenuover",function(b,c){c!==a&&a.delayHideSubMenu()}),this.subMenu._bakQueryAutoHide=this.subMenu.queryAutoHide,this.subMenu.queryAutoHide=function(b){return(!b||!c.contains(a.getDom(),b))&&this._bakQueryAutoHide(b)}),this.getDom().style.tabIndex="-1",c.makeUnselectable(this.getDom()),this.Stateful_postRender()},delayShowSubMenu:function(){var a=this;a.isDisabled()||(a.addState("opened"),clearTimeout(a._showingTimer),clearTimeout(a._closingTimer),a._closingTimer=null,a._showingTimer=setTimeout(function(){a.showSubMenu()},250))},delayHideSubMenu:function(){var a=this;a.isDisabled()||(a.removeState("opened"),clearTimeout(a._showingTimer),a._closingTimer||(a._closingTimer=setTimeout(function(){a.hasState("opened")||a.hideSubMenu(),a._closingTimer=null},400)))},renderLabelHtml:function(){return'
    '+(this.label||"")+"
    "},getStateDom:function(){return this.getDom()},queryAutoHide:function(a){if(this.subMenu&&this.hasState("opened"))return this.subMenu.queryAutoHide(a)},_onClick:function(a,b){this.hasState("disabled")||this.fireEvent("click",a,b)!==!1&&(this.subMenu?this.showSubMenu():e.postHide(a))},showSubMenu:function(){var a=c.getClientRect(this.getDom());a.right-=5,a.left+=2,a.width-=7,a.top-=4,a.bottom+=4,a.height+=8,this.subMenu.showAnchorRect(a,!0,!0)},hideSubMenu:function(){this.subMenu.hide()}},a.inherits(j,d),a.extend(j.prototype,f,!0)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.uiUtils,c=baidu.editor.ui.Menu,d=baidu.editor.ui.SplitButton,e=baidu.editor.ui.Combox=function(a){this.initOptions(a),this.initCombox()};e.prototype={uiName:"combox",onbuttonclick:function(){this.showPopup()},initCombox:function(){var a=this;this.items=this.items||[];for(var b=0;bd.right&&(g=d.right-e.width);var h=a.top;h+e.height>d.bottom&&(h=d.bottom-e.height),c.style.left=Math.max(g,0)+"px",c.style.top=Math.max(h,0)+"px"},showAtCenter:function(){var a=f.getViewportRect();if(this.fullscreen){var b=this.getDom(),c=this.getDom("content");b.style.display="block";var d=UE.ui.uiUtils.getClientRect(b),g=UE.ui.uiUtils.getClientRect(c);b.style.left="-100000px",c.style.width=a.width-d.width+g.width+"px",c.style.height=a.height-d.height+g.height+"px",b.style.width=a.width+"px",b.style.height=a.height+"px",b.style.left=0,this._originalContext={html:{overflowX:document.documentElement.style.overflowX,overflowY:document.documentElement.style.overflowY},body:{overflowX:document.body.style.overflowX,overflowY:document.body.style.overflowY}},document.documentElement.style.overflowX="hidden",document.documentElement.style.overflowY="hidden",document.body.style.overflowX="hidden",document.body.style.overflowY="hidden"}else{this.getDom().style.display="";var h=this.fitSize(),i=0|this.getDom("titlebar").offsetHeight,j=a.width/2-h.width/2,k=a.height/2-(h.height-i)/2-i,l=this.getDom();this.safeSetOffset({left:Math.max(0|j,0),top:Math.max(0|k,0)}),e.hasClass(l,"edui-state-centered")||(l.className+=" edui-state-centered")}this._show()},getContentHtml:function(){var a="";return"string"==typeof this.content?a=this.content:this.iframeUrl&&(a=''),a},getHtmlTpl:function(){var a="";if(this.buttons){for(var b=[],c=0;c
    '+b.join("")+"
    "}return'
    '+(this.title||"")+"
    "+this.closeButton.renderHtml()+'
    '+(this.autoReset?"":this.getContentHtml())+"
    "+a+"
    "},postRender:function(){this.modalMask.getDom()||(this.modalMask.render(),this.modalMask.hide()),this.dragMask.getDom()||(this.dragMask.render(),this.dragMask.hide());var a=this;if(this.addListener("show",function(){a.modalMask.show(this.getDom().style.zIndex-2)}),this.addListener("hide",function(){a.modalMask.hide()}),this.buttons)for(var b=0;b',a.editor.container.style.zIndex&&(this.getDom().style.zIndex=1*a.editor.container.style.zIndex+1))}}),this.onbuttonclick=function(){this.showPopup()},this.initSplitButton()}},a.inherits(d,c)}(),function(){function a(a){var b=a.target||a.srcElement,c=g.findParent(b,function(a){return g.hasClass(a,"edui-shortcutmenu")||g.hasClass(a,"edui-popup")},!0);if(!c)for(var d,e=0;d=h[e++];)d.hide()}var b,c=baidu.editor.ui,d=c.UIBase,e=c.uiUtils,f=baidu.editor.utils,g=baidu.editor.dom.domUtils,h=[],i=!1,j=c.ShortCutMenu=function(a){this.initOptions(a),this.initShortCutMenu()};j.postHide=a,j.prototype={isHidden:!0,SPACE:5,initShortCutMenu:function(){this.items=this.items||[],this.initUIBase(),this.initItems(),this.initEvent(),h.push(this)},initEvent:function(){var a=this,c=a.editor.document;g.on(c,"mousemove",function(c){if(a.isHidden===!1){if(a.getSubMenuMark()||"contextmenu"==a.eventType)return;var d=!0,e=a.getDom(),f=e.offsetWidth,g=e.offsetHeight,h=f/2+a.SPACE,i=g/2,j=Math.abs(c.screenX-a.left),k=Math.abs(c.screenY-a.top);clearTimeout(b),b=setTimeout(function(){k>0&&ki&&ki+70&&k0&&jh&&jh+70&&j'+a+""}},f.inherits(j,d),g.on(document,"mousedown",function(b){a(b)}),g.on(window,"scroll",function(b){a(b)})}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.UIBase,c=baidu.editor.ui.Breakline=function(a){this.initOptions(a),this.initSeparator()};c.prototype={uiName:"Breakline",initSeparator:function(){this.initUIBase()},getHtmlTpl:function(){return"
    "}},a.inherits(c,b)}(),function(){var a=baidu.editor.utils,b=baidu.editor.dom.domUtils,c=baidu.editor.ui.UIBase,d=baidu.editor.ui.Message=function(a){this.initOptions(a),this.initMessage()};d.prototype={initMessage:function(){this.initUIBase()},getHtmlTpl:function(){return'
    ×
    '},reset:function(a){var b=this;a.keepshow||(clearTimeout(this.timer),b.timer=setTimeout(function(){b.hide()},a.timeout||4e3)),void 0!==a.content&&b.setContent(a.content),void 0!==a.type&&b.setType(a.type),b.show()},postRender:function(){var a=this,c=this.getDom("closer");c&&b.on(c,"click",function(){a.hide()})},setContent:function(a){this.getDom("content").innerHTML=a},setType:function(a){a=a||"info";var b=this.getDom("body");b.className=b.className.replace(/edui-message-type-[\w-]+/,"edui-message-type-"+a)},getContent:function(){return this.getDom("content").innerHTML},getType:function(){var a=this.getDom("body").match(/edui-message-type-([\w-]+)/);return a?a[1]:""},show:function(){this.getDom().style.display="block"},hide:function(){var a=this.getDom();a&&(a.style.display="none",a.parentNode&&a.parentNode.removeChild(a))}},a.inherits(d,c)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui,c=b.Dialog;b.buttons={},b.Dialog=function(a){var b=new c(a);return b.addListener("hide",function(){if(b.editor){var a=b.editor;try{if(browser.gecko){var c=a.window.scrollY,d=a.window.scrollX;a.body.focus(),a.window.scrollTo(d,c)}else a.focus()}catch(e){}}}),b};for(var d,e={anchor:"~/dialogs/anchor/anchor.html",insertimage:"~/dialogs/image/image.html",link:"~/dialogs/link/link.html",spechars:"~/dialogs/spechars/spechars.html",searchreplace:"~/dialogs/searchreplace/searchreplace.html",map:"~/dialogs/map/map.html",gmap:"~/dialogs/gmap/gmap.html",insertvideo:"~/dialogs/video/video.html",help:"~/dialogs/help/help.html",preview:"~/dialogs/preview/preview.html",emotion:"~/dialogs/emotion/emotion.html",wordimage:"~/dialogs/wordimage/wordimage.html",attachment:"~/dialogs/attachment/attachment.html",insertframe:"~/dialogs/insertframe/insertframe.html",edittip:"~/dialogs/table/edittip.html",edittable:"~/dialogs/table/edittable.html",edittd:"~/dialogs/table/edittd.html",webapp:"~/dialogs/webapp/webapp.html",snapscreen:"~/dialogs/snapscreen/snapscreen.html",scrawl:"~/dialogs/scrawl/scrawl.html",music:"~/dialogs/music/music.html",template:"~/dialogs/template/template.html",background:"~/dialogs/background/background.html",charts:"~/dialogs/charts/charts.html"},f=["undo","redo","formatmatch","bold","italic","underline","fontborder","touppercase","tolowercase","strikethrough","subscript","superscript","source","indent","outdent","blockquote","pasteplain","pagebreak","selectall","print","horizontal","removeformat","time","date","unlink","insertparagraphbeforetable","insertrow","insertcol","mergeright","mergedown","deleterow","deletecol","splittorows","splittocols","splittocells","mergecells","deletetable","drafts"],g=0;d=f[g++];)d=d.toLowerCase(),b[d]=function(a){return function(c){var d=new b.Button({className:"edui-for-"+a,title:c.options.labelMap[a]||c.getLang("labelMap."+a)||"",onclick:function(){c.execCommand(a)},theme:c.options.theme,showText:!1});return b.buttons[a]=d,c.addListener("selectionchange",function(b,e,f){var g=c.queryCommandState(a);g==-1?(d.setDisabled(!0),d.setChecked(!1)):f||(d.setDisabled(!1),d.setChecked(g))}),d}}(d);b.cleardoc=function(a){var c=new b.Button({className:"edui-for-cleardoc",title:a.options.labelMap.cleardoc||a.getLang("labelMap.cleardoc")||"",theme:a.options.theme,onclick:function(){confirm(a.getLang("confirmClear"))&&a.execCommand("cleardoc")}});return b.buttons.cleardoc=c,a.addListener("selectionchange",function(){c.setDisabled(a.queryCommandState("cleardoc")==-1)}),c};var h={justify:["left","right","center","justify"],imagefloat:["none","left","center","right"],directionality:["ltr","rtl"]};for(var i in h)!function(a,c){for(var d,e=0;d=c[e++];)!function(c){b[a.replace("float","")+c]=function(d){var e=new b.Button({className:"edui-for-"+a.replace("float","")+c,title:d.options.labelMap[a.replace("float","")+c]||d.getLang("labelMap."+a.replace("float","")+c)||"",theme:d.options.theme,onclick:function(){d.execCommand(a,c)}});return b.buttons[a]=e,d.addListener("selectionchange",function(b,f,g){e.setDisabled(d.queryCommandState(a)==-1),e.setChecked(d.queryCommandValue(a)==c&&!g)}),e}}(d)}(i,h[i]);for(var d,g=0;d=["backcolor","forecolor"][g++];)b[d]=function(a){return function(c){var d=new b.ColorButton({className:"edui-for-"+a,color:"default",title:c.options.labelMap[a]||c.getLang("labelMap."+a)||"",editor:c,onpickcolor:function(b,d){ -c.execCommand(a,d)},onpicknocolor:function(){c.execCommand(a,"default"),this.setColor("transparent"),this.color="default"},onbuttonclick:function(){c.execCommand(a,this.color)}});return b.buttons[a]=d,c.addListener("selectionchange",function(){d.setDisabled(c.queryCommandState(a)==-1)}),d}}(d);var j={noOk:["searchreplace","help","spechars","webapp","preview"],ok:["attachment","anchor","link","insertimage","map","gmap","insertframe","wordimage","insertvideo","insertframe","edittip","edittable","edittd","scrawl","template","music","background","charts"]};for(var i in j)!function(c,d){for(var f,g=0;f=d[g++];)browser.opera&&"searchreplace"===f||!function(d){b[d]=function(f,g,h){g=g||(f.options.iframeUrlMap||{})[d]||e[d],h=f.options.labelMap[d]||f.getLang("labelMap."+d)||"";var i;g&&(i=new b.Dialog(a.extend({iframeUrl:f.ui.mapUrl(g),editor:f,className:"edui-for-"+d,title:h,holdScroll:"insertimage"===d,fullscreen:/charts|preview/.test(d),closeDialog:f.getLang("closeDialog")},"ok"==c?{buttons:[{className:"edui-okbutton",label:f.getLang("ok"),editor:f,onclick:function(){i.close(!0)}},{className:"edui-cancelbutton",label:f.getLang("cancel"),editor:f,onclick:function(){i.close(!1)}}]}:{})),f.ui._dialogs[d+"Dialog"]=i);var j=new b.Button({className:"edui-for-"+d,title:h,onclick:function(){if(i)switch(d){case"wordimage":var a=f.execCommand("wordimage");a&&a.length&&(i.render(),i.open());break;case"scrawl":f.queryCommandState("scrawl")!=-1&&(i.render(),i.open());break;default:i.render(),i.open()}},theme:f.options.theme,disabled:"scrawl"==d&&f.queryCommandState("scrawl")==-1||"charts"==d});return b.buttons[d]=j,f.addListener("selectionchange",function(){var a={edittable:1};if(!(d in a)){var b=f.queryCommandState(d);j.getDom()&&(j.setDisabled(b==-1),j.setChecked(b))}}),j}}(f.toLowerCase())}(i,j[i]);b.snapscreen=function(a,c,d){d=a.options.labelMap.snapscreen||a.getLang("labelMap.snapscreen")||"";var f=new b.Button({className:"edui-for-snapscreen",title:d,onclick:function(){a.execCommand("snapscreen")},theme:a.options.theme});if(b.buttons.snapscreen=f,c=c||(a.options.iframeUrlMap||{}).snapscreen||e.snapscreen){var g=new b.Dialog({iframeUrl:a.ui.mapUrl(c),editor:a,className:"edui-for-snapscreen",title:d,buttons:[{className:"edui-okbutton",label:a.getLang("ok"),editor:a,onclick:function(){g.close(!0)}},{className:"edui-cancelbutton",label:a.getLang("cancel"),editor:a,onclick:function(){g.close(!1)}}]});g.render(),a.ui._dialogs.snapscreenDialog=g}return a.addListener("selectionchange",function(){f.setDisabled(a.queryCommandState("snapscreen")==-1)}),f},b.insertcode=function(c,d,e){d=c.options.insertcode||[],e=c.options.labelMap.insertcode||c.getLang("labelMap.insertcode")||"";var f=[];a.each(d,function(a,b){f.push({label:a,value:b,theme:c.options.theme,renderLabelHtml:function(){return'
    '+(this.label||"")+"
    "}})});var g=new b.Combox({editor:c,items:f,onselect:function(a,b){c.execCommand("insertcode",this.items[b].value)},onbuttonclick:function(){this.showPopup()},title:e,initValue:e,className:"edui-for-insertcode",indexByValue:function(a){if(a)for(var b,c=0;b=this.items[c];c++)if(b.value.indexOf(a)!=-1)return c;return-1}});return b.buttons.insertcode=g,c.addListener("selectionchange",function(a,b,d){if(!d){var f=c.queryCommandState("insertcode");if(f==-1)g.setDisabled(!0);else{g.setDisabled(!1);var h=c.queryCommandValue("insertcode");if(!h)return void g.setValue(e);h&&(h=h.replace(/['"]/g,"").split(",")[0]),g.setValue(h)}}}),g},b.fontfamily=function(c,d,e){if(d=c.options.fontfamily||[],e=c.options.labelMap.fontfamily||c.getLang("labelMap.fontfamily")||"",d.length){for(var f,g=0,h=[];f=d[g];g++){var i=c.getLang("fontfamily")[f.name]||"";!function(b,d){h.push({label:b,value:d,theme:c.options.theme,renderLabelHtml:function(){return'
    '+(this.label||"")+"
    "}})}(f.label||i,f.val)}var j=new b.Combox({editor:c,items:h,onselect:function(a,b){c.execCommand("FontFamily",this.items[b].value)},onbuttonclick:function(){this.showPopup()},title:e,initValue:e,className:"edui-for-fontfamily",indexByValue:function(a){if(a)for(var b,c=0;b=this.items[c];c++)if(b.value.indexOf(a)!=-1)return c;return-1}});return b.buttons.fontfamily=j,c.addListener("selectionchange",function(a,b,d){if(!d){var e=c.queryCommandState("FontFamily");if(e==-1)j.setDisabled(!0);else{j.setDisabled(!1);var f=c.queryCommandValue("FontFamily");f&&(f=f.replace(/['"]/g,"").split(",")[0]),j.setValue(f)}}}),j}},b.fontsize=function(a,c,d){if(d=a.options.labelMap.fontsize||a.getLang("labelMap.fontsize")||"",c=c||a.options.fontsize||[],c.length){for(var e=[],f=0;f'+(this.label||"")+""}})}var h=new b.Combox({editor:a,items:e,title:d,initValue:d,onselect:function(b,c){a.execCommand("FontSize",this.items[c].value)},onbuttonclick:function(){this.showPopup()},className:"edui-for-fontsize"});return b.buttons.fontsize=h,a.addListener("selectionchange",function(b,c,d){if(!d){var e=a.queryCommandState("FontSize");e==-1?h.setDisabled(!0):(h.setDisabled(!1),h.setValue(a.queryCommandValue("FontSize")))}}),h}},b.paragraph=function(c,d,e){if(e=c.options.labelMap.paragraph||c.getLang("labelMap.paragraph")||"",d=c.options.paragraph||[],!a.isEmptyObject(d)){var f=[];for(var g in d)f.push({value:g,label:d[g]||c.getLang("paragraph")[g],theme:c.options.theme,renderLabelHtml:function(){return'
    '+(this.label||"")+"
    "}});var h=new b.Combox({editor:c,items:f,title:e,initValue:e,className:"edui-for-paragraph",onselect:function(a,b){c.execCommand("Paragraph",this.items[b].value)},onbuttonclick:function(){this.showPopup()}});return b.buttons.paragraph=h,c.addListener("selectionchange",function(a,b,d){if(!d){var e=c.queryCommandState("Paragraph");if(e==-1)h.setDisabled(!0);else{h.setDisabled(!1);var f=c.queryCommandValue("Paragraph"),g=h.indexByValue(f);g!=-1?h.setValue(f):h.setValue(h.initValue)}}}),h}},b.customstyle=function(a){var c=a.options.customstyle||[],d=a.options.labelMap.customstyle||a.getLang("labelMap.customstyle")||"";if(c.length){for(var e,f=a.getLang("customstyle"),g=0,h=[];e=c[g++];)!function(b){var c={};c.label=b.label?b.label:f[b.name],c.style=b.style,c.className=b.className,c.tag=b.tag,h.push({label:c.label,value:c,theme:a.options.theme,renderLabelHtml:function(){return'
    <'+c.tag+" "+(c.className?' class="'+c.className+'"':"")+(c.style?' style="'+c.style+'"':"")+">"+c.label+"
    "}})}(e);var i=new b.Combox({editor:a,items:h,title:d,initValue:d,className:"edui-for-customstyle",onselect:function(b,c){a.execCommand("customstyle",this.items[c].value)},onbuttonclick:function(){this.showPopup()},indexByValue:function(a){for(var b,c=0;b=this.items[c++];)if(b.label==a)return c-1;return-1}});return b.buttons.customstyle=i,a.addListener("selectionchange",function(b,c,d){if(!d){var e=a.queryCommandState("customstyle");if(e==-1)i.setDisabled(!0);else{i.setDisabled(!1);var f=a.queryCommandValue("customstyle"),g=i.indexByValue(f);g!=-1?i.setValue(f):i.setValue(i.initValue)}}}),i}},b.inserttable=function(a,c,d){d=a.options.labelMap.inserttable||a.getLang("labelMap.inserttable")||"";var e=new b.TableButton({editor:a,title:d,className:"edui-for-inserttable",onpicktable:function(b,c,d){a.execCommand("InsertTable",{numRows:d,numCols:c,border:1})},onbuttonclick:function(){this.showPopup()}});return b.buttons.inserttable=e,a.addListener("selectionchange",function(){e.setDisabled(a.queryCommandState("inserttable")==-1)}),e},b.lineheight=function(a){var c=a.options.lineheight||[];if(c.length){for(var d,e=0,f=[];d=c[e++];)f.push({label:d,value:d,theme:a.options.theme,onclick:function(){a.execCommand("lineheight",this.value)}});var g=new b.MenuButton({editor:a,className:"edui-for-lineheight",title:a.options.labelMap.lineheight||a.getLang("labelMap.lineheight")||"",items:f,onbuttonclick:function(){var b=a.queryCommandValue("LineHeight")||this.value;a.execCommand("LineHeight",b)}});return b.buttons.lineheight=g,a.addListener("selectionchange",function(){var b=a.queryCommandState("LineHeight");if(b==-1)g.setDisabled(!0);else{g.setDisabled(!1);var c=a.queryCommandValue("LineHeight");c&&g.setValue((c+"").replace(/cm/,"")),g.setChecked(b)}}),g}};for(var k,l=["top","bottom"],m=0;k=l[m++];)!function(a){b["rowspacing"+a]=function(c){var d=c.options["rowspacing"+a]||[];if(!d.length)return null;for(var e,f=0,g=[];e=d[f++];)g.push({label:e,value:e,theme:c.options.theme,onclick:function(){c.execCommand("rowspacing",this.value,a)}});var h=new b.MenuButton({editor:c,className:"edui-for-rowspacing"+a,title:c.options.labelMap["rowspacing"+a]||c.getLang("labelMap.rowspacing"+a)||"",items:g,onbuttonclick:function(){var b=c.queryCommandValue("rowspacing",a)||this.value;c.execCommand("rowspacing",b,a)}});return b.buttons[a]=h,c.addListener("selectionchange",function(){var b=c.queryCommandState("rowspacing",a);if(b==-1)h.setDisabled(!0);else{h.setDisabled(!1);var d=c.queryCommandValue("rowspacing",a);d&&h.setValue((d+"").replace(/%/,"")),h.setChecked(b)}}),h}}(k);for(var n,o=["insertorderedlist","insertunorderedlist"],p=0;n=o[p++];)!function(a){b[a]=function(c){var d=c.options[a],e=function(){c.execCommand(a,this.value)},f=[];for(var g in d)f.push({label:d[g]||c.getLang()[a][g]||"",value:g,theme:c.options.theme,onclick:e});var h=new b.MenuButton({editor:c,className:"edui-for-"+a,title:c.getLang("labelMap."+a)||"",items:f,onbuttonclick:function(){var b=c.queryCommandValue(a)||this.value;c.execCommand(a,b)}});return b.buttons[a]=h,c.addListener("selectionchange",function(){var b=c.queryCommandState(a);if(b==-1)h.setDisabled(!0);else{h.setDisabled(!1);var d=c.queryCommandValue(a);h.setValue(d),h.setChecked(b)}}),h}}(n);b.fullscreen=function(a,c){c=a.options.labelMap.fullscreen||a.getLang("labelMap.fullscreen")||"";var d=new b.Button({className:"edui-for-fullscreen",title:c,theme:a.options.theme,onclick:function(){a.ui&&a.ui.setFullScreen(!a.ui.isFullScreen()),this.setChecked(a.ui.isFullScreen())}});return b.buttons.fullscreen=d,a.addListener("selectionchange",function(){var b=a.queryCommandState("fullscreen");d.setDisabled(b==-1),d.setChecked(a.ui.isFullScreen())}),d},b.emotion=function(a,c){var d="emotion",f=new b.MultiMenuPop({title:a.options.labelMap[d]||a.getLang("labelMap."+d)||"",editor:a,className:"edui-for-"+d,iframeUrl:a.ui.mapUrl(c||(a.options.iframeUrlMap||{})[d]||e[d])});return b.buttons[d]=f,a.addListener("selectionchange",function(){f.setDisabled(a.queryCommandState(d)==-1)}),f},b.autotypeset=function(a){var c=new b.AutoTypeSetButton({editor:a,title:a.options.labelMap.autotypeset||a.getLang("labelMap.autotypeset")||"",className:"edui-for-autotypeset",onbuttonclick:function(){a.execCommand("autotypeset")}});return b.buttons.autotypeset=c,a.addListener("selectionchange",function(){c.setDisabled(a.queryCommandState("autotypeset")==-1)}),c},b.simpleupload=function(a){var c="simpleupload",d=new b.Button({className:"edui-for-"+c,title:a.options.labelMap[c]||a.getLang("labelMap."+c)||"",onclick:function(){},theme:a.options.theme,showText:!1});return b.buttons[c]=d,a.addListener("ready",function(){var b=d.getDom("body"),c=b.children[0];a.fireEvent("simpleuploadbtnready",c)}),a.addListener("selectionchange",function(b,e,f){var g=a.queryCommandState(c);g==-1?(d.setDisabled(!0),d.setChecked(!1)):f||(d.setDisabled(!1),d.setChecked(g))}),d}}(),function(){function a(a){this.initOptions(a),this.initEditorUI()}var b=baidu.editor.utils,c=baidu.editor.ui.uiUtils,d=baidu.editor.ui.UIBase,e=baidu.editor.dom.domUtils,f=[];a.prototype={uiName:"editor",initEditorUI:function(){function a(a,b){a.setOpt({wordCount:!0,maximumWords:1e4,wordCountMsg:a.options.wordCountMsg||a.getLang("wordCountMsg"),wordOverFlowMsg:a.options.wordOverFlowMsg||a.getLang("wordOverFlowMsg")});var c=a.options,d=c.maximumWords,e=c.wordCountMsg,f=c.wordOverFlowMsg,g=b.getDom("wordcount");if(c.wordCount){var h=a.getContentLength(!0);h>d?(g.innerHTML=f,a.fireEvent("wordcountoverflow")):g.innerHTML=e.replace("{#leave}",d-h).replace("{#count}",h)}}this.editor.ui=this,this._dialogs={},this.initUIBase(),this._initToolbars();var b=this.editor,c=this;b.addListener("ready",function(){function d(){a(b,c),e.un(b.document,"click",arguments.callee)}b.getDialog=function(a){return b.ui._dialogs[a+"Dialog"]},e.on(b.window,"scroll",function(a){baidu.editor.ui.Popup.postHide(a)}),b.ui._actualFrameWidth=b.options.initialFrameWidth,UE.browser.ie&&6===UE.browser.version&&b.container.ownerDocument.execCommand("BackgroundImageCache",!1,!0),b.options.elementPathEnabled&&(b.ui.getDom("elementpath").innerHTML='
    '+b.getLang("elementPathTip")+":
    "),b.options.wordCount&&(e.on(b.document,"click",d),b.ui.getDom("wordcount").innerHTML=b.getLang("wordCountTip")),b.ui._scale(),b.options.scaleEnabled?(b.autoHeightEnabled&&b.disableAutoHeight(),c.enableScale()):c.disableScale(),b.options.elementPathEnabled||b.options.wordCount||b.options.scaleEnabled||(b.ui.getDom("elementpath").style.display="none",b.ui.getDom("wordcount").style.display="none",b.ui.getDom("scale").style.display="none"),b.selection.isFocus()&&b.fireEvent("selectionchange",!1,!0)}),b.addListener("mousedown",function(a,b){var c=b.target||b.srcElement;baidu.editor.ui.Popup.postHide(b,c),baidu.editor.ui.ShortCutMenu.postHide(b)}),b.addListener("delcells",function(){UE.ui.edittip&&new UE.ui.edittip(b),b.getDialog("edittip").open()});var d,f,g=!1;b.addListener("afterpaste",function(){b.queryCommandState("pasteplain")||(baidu.editor.ui.PastePicker&&(d=new baidu.editor.ui.Popup({content:new baidu.editor.ui.PastePicker({editor:b}),editor:b,className:"edui-wordpastepop"}),d.render()),g=!0)}),b.addListener("afterinserthtml",function(){clearTimeout(f),f=setTimeout(function(){if(d&&(g||b.ui._isTransfer)){if(d.isHidden()){var a=e.createElement(b.document,"span",{style:"line-height:0px;",innerHTML:"\ufeff"}),c=b.selection.getRange();c.insertNode(a);var f=getDomNode(a,"firstChild","previousSibling");f&&d.showAnchor(3==f.nodeType?f.parentNode:f),e.remove(a)}else d.show();delete b.ui._isTransfer,g=!1}},200)}),b.addListener("contextmenu",function(a,b){baidu.editor.ui.Popup.postHide(b)}),b.addListener("keydown",function(a,b){d&&d.dispose(b);var c=b.keyCode||b.which;b.altKey&&90==c&&UE.ui.buttons.fullscreen.onclick()}),b.addListener("wordcount",function(b){a(this,c)}),b.addListener("selectionchange",function(){b.options.elementPathEnabled&&c[(b.queryCommandState("elementpath")==-1?"dis":"en")+"ableElementPath"](),b.options.scaleEnabled&&c[(b.queryCommandState("scale")==-1?"dis":"en")+"ableScale"]()});var h=new baidu.editor.ui.Popup({editor:b,content:"",className:"edui-bubble",_onEditButtonClick:function(){this.hide(),b.ui._dialogs.linkDialog.open()},_onImgEditButtonClick:function(a){this.hide(),b.ui._dialogs[a]&&b.ui._dialogs[a].open()},_onImgSetFloat:function(a){this.hide(),b.execCommand("imagefloat",a)},_setIframeAlign:function(a){var b=h.anchorEl,c=b.cloneNode(!0);switch(a){case-2:c.setAttribute("align","");break;case-1:c.setAttribute("align","left");break;case 1:c.setAttribute("align","right")}b.parentNode.insertBefore(c,b),e.remove(b),h.anchorEl=c,h.showAnchor(h.anchorEl)},_updateIframe:function(){var a=b._iframe=h.anchorEl;e.hasClass(a,"ueditor_baidumap")?(b.selection.getRange().selectNode(a).select(),b.ui._dialogs.mapDialog.open(),h.hide()):(b.ui._dialogs.insertframeDialog.open(),h.hide())},_onRemoveButtonClick:function(a){b.execCommand(a),this.hide()},queryAutoHide:function(a){return a&&a.ownerDocument==b.document&&("img"==a.tagName.toLowerCase()||e.findParentByTagName(a,"a",!0))?a!==h.anchorEl:baidu.editor.ui.Popup.prototype.queryAutoHide.call(this,a)}});h.render(),b.options.imagePopup&&(b.addListener("mouseover",function(a,c){c=c||window.event;var d=c.target||c.srcElement;if(b.ui._dialogs.insertframeDialog&&/iframe/gi.test(d.tagName)){var e=h.formatHtml(""+b.getLang("property")+': '+b.getLang("default")+'  '+b.getLang("justifyleft")+'  '+b.getLang("justifyright")+'   '+b.getLang("modify")+"");e?(h.getDom("content").innerHTML=e,h.anchorEl=d,h.showAnchor(h.anchorEl)):h.hide()}}),b.addListener("selectionchange",function(a,c){if(c){var d="",f="",g=b.selection.getRange().getClosedNode(),i=b.ui._dialogs;if(g&&"IMG"==g.tagName){var j="insertimageDialog";if(g.className.indexOf("edui-faked-video")==-1&&g.className.indexOf("edui-upload-video")==-1||(j="insertvideoDialog"),g.className.indexOf("edui-faked-webapp")!=-1&&(j="webappDialog"),g.src.indexOf("http://api.map.baidu.com")!=-1&&(j="mapDialog"),g.className.indexOf("edui-faked-music")!=-1&&(j="musicDialog"),g.src.indexOf("http://maps.google.com/maps/api/staticmap")!=-1&&(j="gmapDialog"),g.getAttribute("anchorname")&&(j="anchorDialog",d=h.formatHtml(""+b.getLang("property")+': '+b.getLang("modify")+"  "+b.getLang("delete")+"")),g.getAttribute("word_img")&&(b.word_img=[g.getAttribute("word_img")],j="wordimageDialog"),(e.hasClass(g,"loadingclass")||e.hasClass(g,"loaderrorclass"))&&(j=""),!i[j])return;f=""+b.getLang("property")+': '+b.getLang("default")+'  '+b.getLang("justifyleft")+'  '+b.getLang("justifyright")+'  '+b.getLang("justifycenter")+"  '+b.getLang("modify")+"",!d&&(d=h.formatHtml(f))}if(b.ui._dialogs.linkDialog){var k,l=b.queryCommandValue("link");if(l&&(k=l.getAttribute("_href")||l.getAttribute("href",2))){var m=k;k.length>30&&(m=k.substring(0,20)+"..."),d&&(d+='
    '),d+=h.formatHtml(""+b.getLang("anthorMsg")+': '+m+' '+b.getLang("modify")+' '+b.getLang("clear")+""),h.showAnchor(l)}}d?(h.getDom("content").innerHTML=d,h.anchorEl=g||l,h.showAnchor(h.anchorEl)):h.hide()}}))},_initToolbars:function(){for(var a=this.editor,b=this.toolbars||[],c=[],d=0;d
    '+(this.toolbars.length?'
    '+this.renderToolbarBoxHtml()+"
    ":"")+'
    '},showWordImageDialog:function(){this._dialogs.wordimageDialog.open()},renderToolbarBoxHtml:function(){for(var a=[],b=0;b'+c+"");b.innerHTML='
    '+this.editor.getLang("elementPathTip")+": "+d.join(" > ")+"
    "}else b.style.display="none"},disableElementPath:function(){var a=this.getDom("elementpath");a.innerHTML="",a.style.display="none",this.elementPathEnabled=!1},enableElementPath:function(){var a=this.getDom("elementpath");a.style.display="",this.elementPathEnabled=!0,this._updateElementPath()},_scale:function(){function a(){o=e.getXY(h),p||(p=g.options.minFrameHeight+j.offsetHeight+k.offsetHeight),m.style.cssText="position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:"+h.offsetWidth+"px;height:"+h.offsetHeight+"px;z-index:"+(g.options.zIndex+1),e.on(f,"mousemove",b),e.on(i,"mouseup",c),e.on(f,"mouseup",c)}function b(a){d();var b=a||window.event;r=b.pageX||f.documentElement.scrollLeft+b.clientX,s=b.pageY||f.documentElement.scrollTop+b.clientY,t=r-o.x,u=s-o.y,t>=q&&(n=!0,m.style.width=t+"px"),u>=p&&(n=!0,m.style.height=u+"px")}function c(){n&&(n=!1,g.ui._actualFrameWidth=m.offsetWidth-2,h.style.width=g.ui._actualFrameWidth+"px",g.setHeight(m.offsetHeight-k.offsetHeight-j.offsetHeight-2,!0)),m&&(m.style.display="none"),d(),e.un(f,"mousemove",b),e.un(i,"mouseup",c),e.un(f,"mouseup",c)}function d(){browser.ie?f.selection.clear():window.getSelection().removeAllRanges()}var f=document,g=this.editor,h=g.container,i=g.document,j=this.getDom("toolbarbox"),k=this.getDom("bottombar"),l=this.getDom("scale"),m=this.getDom("scalelayer"),n=!1,o=null,p=0,q=g.options.minFrameWidth,r=0,s=0,t=0,u=0,v=this;this.editor.addListener("fullscreenchanged",function(a,b){if(b)v.disableScale();else if(v.editor.options.scaleEnabled){v.enableScale();var c=v.editor.document.createElement("span");v.editor.body.appendChild(c),v.editor.body.style.height=Math.max(e.getXY(c).y,v.editor.iframe.offsetHeight-20)+"px",e.remove(c)}}),this.enableScale=function(){1!=g.queryCommandState("source")&&(l.style.display="",this.scaleEnabled=!0,e.on(l,"mousedown",a))},this.disableScale=function(){l.style.display="none",this.scaleEnabled=!1,e.un(l,"mousedown",a)}},isFullScreen:function(){return this._fullscreen},postRender:function(){d.prototype.postRender.call(this);for(var a=0;a[\n\r\t]+([ ]{4})+/g,">").replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<"),c.className&&(b.className=c.className),c.style.cssText&&(b.style.cssText=c.style.cssText),/textarea/i.test(c.tagName)?(d.textarea=c,d.textarea.style.display="none"):c.parentNode.removeChild(c),c.id&&(b.id=c.id,e.removeAttributes(c,"id")),c=b,c.innerHTML=""}e.addClass(c,"edui-"+d.options.theme),d.ui.render(c);var h=d.options;d.container=d.ui.getDom();for(var i,j=e.findParents(c,!0),k=[],l=0;i=j[l];l++)k[l]=i.style.display,i.style.display="block";if(h.initialFrameWidth)h.minFrameWidth=h.initialFrameWidth;else{h.minFrameWidth=h.initialFrameWidth=c.offsetWidth;var m=c.style.width;/%$/.test(m)&&(h.initialFrameWidth=m)}h.initialFrameHeight?h.minFrameHeight=h.initialFrameHeight:h.initialFrameHeight=h.minFrameHeight=c.offsetHeight;for(var i,l=0;i=j[l];l++)i.style.display=k[l];c.style.height&&(c.style.height=""),d.container.style.width=h.initialFrameWidth+(/%$/.test(h.initialFrameWidth)?"":"px"),d.container.style.zIndex=h.zIndex,f.call(d,d.ui.getDom("iframeholder")),d.fireEvent("afteruiready")}d.langIsReady?b():d.addListener("langReady",b)})},d},UE.getEditor=function(a,b){var c=g[a];return c||(c=g[a]=new UE.ui.Editor(b),c.render(a)),c},UE.delEditor=function(a){var b;(b=g[a])&&(b.key&&b.destroy(),delete g[a])},UE.registerUI=function(a,c,d,e){b.each(a.split(/\s+/),function(a){UE._customizeUI[a]={id:e,execFn:c,index:d}})}}(),UE.registerUI("message",function(a){function b(){var a=g.ui.getDom("toolbarbox");a&&(c.style.top=a.offsetHeight+3+"px"),c.style.zIndex=Math.max(g.options.zIndex,g.iframe.style.zIndex)+1}var c,d=baidu.editor.ui,e=d.Message,f=[],g=a;g.addListener("ready",function(){c=document.getElementById(g.ui.id+"_message_holder"),b()}),g.addListener("showmessage",function(a,d){d=utils.isString(d)?{content:d}:d;var h=new e({timeout:d.timeout,type:d.type,content:d.content,keepshow:d.keepshow,editor:g}),i=d.id||"msg_"+(+new Date).toString(36);return h.render(c),f[i]=h,h.reset(d),b(),i}),g.addListener("updatemessage",function(a,b,d){d=utils.isString(d)?{content:d}:d;var e=f[b];e.render(c),e&&e.reset(d)}),g.addListener("hidemessage",function(a,b){var c=f[b];c&&c.hide()})}),UE.registerUI("autosave",function(a){var b=null,c=null;a.on("afterautosave",function(){clearTimeout(b),b=setTimeout(function(){c&&a.trigger("hidemessage",c),c=a.trigger("showmessage",{content:a.getLang("autosave.success"),timeout:2e3})},2e3)})})}(); \ No newline at end of file diff --git a/public/static/admin/UEditor/ueditor.config.js b/public/static/admin/UEditor/ueditor.config.js deleted file mode 100644 index c4afb7e..0000000 --- a/public/static/admin/UEditor/ueditor.config.js +++ /dev/null @@ -1,496 +0,0 @@ -/** - * ueditor完整配置项 - * 可以在这里配置整个编辑器的特性 - */ -/**************************提示******************************** - * 所有被注释的配置项均为UEditor默认值。 - * 修改默认配置请首先确保已经完全明确该参数的真实用途。 - * 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。 - * 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。 - **************************提示********************************/ - -(function () { - - /** - * 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。 - * 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。 - * "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/ueditor/"这样的路径。 - * 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。 - * 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。 - * window.UEDITOR_HOME_URL = "/xxxx/xxxx/"; - */ - var URL = window.UEDITOR_HOME_URL || getUEBasePath(); - - /** - * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。 - */ - window.UEDITOR_CONFIG = { - //为编辑器实例添加一个路径,这个不能被注释 - UEDITOR_HOME_URL: URL - - // 服务器统一请求接口路径 - // , serverUrl: URL + "php/controller.php" - - //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 - , toolbars: [[ - 'fullscreen', 'source', '|', 'undo', 'redo', '|', - 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|', - 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|', - 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|', - 'directionalityltr', 'directionalityrtl', 'indent', '|', - 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', - 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', - 'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|', - 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|', - 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|', - 'print', 'preview', 'searchreplace', 'drafts', 'help' - ]] - //当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准 - //,labelMap:{ - // 'anchor':'', 'undo':'' - //} - - //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件: - //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase() - //,lang:"zh-cn" - //,langPath:URL +"lang/" - - //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件: - //现有如下皮肤:default - //,theme:'default' - //,themePath:URL +"themes/" - - //,zIndex : 900 //编辑器层级的基数,默认是900 - - //针对getAllHtml方法,会在对应的head标签中增加该编码设置。 - //,charset:"utf-8" - - //若实例化编辑器的页面手动修改的domain,此处需要设置为true - //,customDomain:false - - //常用配置项目 - //,isShow : true //默认显示编辑器 - - //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值 - - //,initialContent:'欢迎使用ueditor!' //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子 - - //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了 - - //,focus:false //初始化时,是否让编辑器获得焦点true或false - - //如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感 - //,initialStyle:'p{line-height:1em}'//编辑器层级的基数,可以用来改变字体等 - - //,iframeCssUrl: URL + '/themes/iframe.css' //给编辑区域的iframe引入一个css文件 - - //indentValue - //首行缩进距离,默认是2em - //,indentValue:'2em' - - //,initialFrameWidth:1000 //初始化编辑器宽度,默认1000 - //,initialFrameHeight:320 //初始化编辑器高度,默认320 - - //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false - - //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况) - - //启用自动保存 - ,enableAutoSave: false - //自动保存间隔时间, 单位ms - //,saveInterval: 500 - - //,fullscreen : false //是否开启初始化时即全屏,默认关闭 - - //,imagePopup:true //图片操作的浮层开关,默认打开 - - //,autoSyncData:true //自动同步编辑器要提交的数据 - //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹 - - //粘贴只保留标签,去除标签所有属性 - //,retainOnlyLabelPasted: false - - //,pasteplain:false //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴 - //纯文本粘贴模式下的过滤规则 - //'filterTxtRules' : function(){ - // function transP(node){ - // node.tagName = 'p'; - // node.setStyle(); - // } - // return { - // //直接删除及其字节点内容 - // '-' : 'script style object iframe embed input select', - // 'p': {$:{}}, - // 'br':{$:{}}, - // 'div':{'$':{}}, - // 'li':{'$':{}}, - // 'caption':transP, - // 'th':transP, - // 'tr':transP, - // 'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP, - // 'td':function(node){ - // //没有内容的td直接删掉 - // var txt = !!node.innerText(); - // if(txt){ - // node.parentNode.insertAfter(UE.uNode.createText('    '),node); - // } - // node.parentNode.removeChild(node,node.innerText()) - // } - // } - //}() - - //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串 - - //insertorderedlist - //有序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准 - //,'insertorderedlist':{ - // //自定的样式 - // 'num':'1,2,3...', - // 'num1':'1),2),3)...', - // 'num2':'(1),(2),(3)...', - // 'cn':'一,二,三....', - // 'cn1':'一),二),三)....', - // 'cn2':'(一),(二),(三)....', - // //系统自带 - // 'decimal' : '' , //'1,2,3...' - // 'lower-alpha' : '' , // 'a,b,c...' - // 'lower-roman' : '' , //'i,ii,iii...' - // 'upper-alpha' : '' , lang //'A,B,C' - // 'upper-roman' : '' //'I,II,III...' - //} - - //insertunorderedlist - //无序列表的下拉配置,值留空时支持多语言自动识别,若配置值,则以此值为准 - //,insertunorderedlist : { //自定的样式 - // 'dash' :'— 破折号', //-破折号 - // 'dot':' 。 小圆圈', //系统自带 - // 'circle' : '', // '○ 小圆圈' - // 'disc' : '', // '● 小圆点' - // 'square' : '' //'■ 小方块' - //} - //,listDefaultPaddingLeft : '30'//默认的左边缩进的基数倍 - //,listiconpath : 'http://bs.baidu.com/listicon/'//自定义标号的路径 - //,maxListLevel : 3 //限制可以tab的级数, 设置-1为不限制 - - //,autoTransWordToList:false //禁止word中粘贴进来的列表自动变成列表标签 - - //fontfamily - //字体设置 label留空支持多语言自动切换,若配置,则以配置值为准 - //,'fontfamily':[ - // { label:'',name:'songti',val:'宋体,SimSun'}, - // { label:'',name:'kaiti',val:'楷体,楷体_GB2312, SimKai'}, - // { label:'',name:'yahei',val:'微软雅黑,Microsoft YaHei'}, - // { label:'',name:'heiti',val:'黑体, SimHei'}, - // { label:'',name:'lishu',val:'隶书, SimLi'}, - // { label:'',name:'andaleMono',val:'andale mono'}, - // { label:'',name:'arial',val:'arial, helvetica,sans-serif'}, - // { label:'',name:'arialBlack',val:'arial black,avant garde'}, - // { label:'',name:'comicSansMs',val:'comic sans ms'}, - // { label:'',name:'impact',val:'impact,chicago'}, - // { label:'',name:'timesNewRoman',val:'times new roman'} - //] - - //fontsize - //字号 - //,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36] - - //paragraph - //段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准 - //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''} - - //rowspacingtop - //段间距 值和显示的名字相同 - //,'rowspacingtop':['5', '10', '15', '20', '25'] - - //rowspacingBottom - //段间距 值和显示的名字相同 - //,'rowspacingbottom':['5', '10', '15', '20', '25'] - - //lineheight - //行内间距 值和显示的名字相同 - //,'lineheight':['1', '1.5','1.75','2', '3', '4', '5'] - - //customstyle - //自定义样式,不支持国际化,此处配置值即可最后显示值 - //block的元素是依据设置段落的逻辑设置的,inline的元素依据BIU的逻辑设置 - //尽量使用一些常用的标签 - //参数说明 - //tag 使用的标签名字 - //label 显示的名字也是用来标识不同类型的标识符,注意这个值每个要不同, - //style 添加的样式 - //每一个对象就是一个自定义的样式 - //,'customstyle':[ - // {tag:'h1', name:'tc', label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'}, - // {tag:'h1', name:'tl',label:'', style:'border-bottom:#ccc 2px solid;padding:0 4px 0 0;margin:0 0 10px 0;'}, - // {tag:'span',name:'im', label:'', style:'font-style:italic;font-weight:bold'}, - // {tag:'span',name:'hi', label:'', style:'font-style:italic;font-weight:bold;color:rgb(51, 153, 204)'} - //] - - //打开右键菜单功能 - //,enableContextMenu: true - //右键菜单的内容,可以参考plugins/contextmenu.js里边的默认菜单的例子,label留空支持国际化,否则以此配置为准 - //,contextMenu:[ - // { - // label:'', //显示的名称 - // cmdName:'selectall',//执行的command命令,当点击这个右键菜单时 - // //exec可选,有了exec就会在点击时执行这个function,优先级高于cmdName - // exec:function () { - // //this是当前编辑器的实例 - // //this.ui._dialogs['inserttableDialog'].open(); - // } - // } - //] - - //快捷菜单 - //,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"] - - //elementPathEnabled - //是否启用元素路径,默认是显示 - //,elementPathEnabled : true - - //wordCount - //,wordCount:true //是否开启字数统计 - //,maximumWords:10000 //允许的最大字符数 - //字数统计提示,{#count}代表当前字数,{#leave}代表还可以输入多少字符数,留空支持多语言自动切换,否则按此配置显示 - //,wordCountMsg:'' //当前已输入 {#count} 个字符,您还可以输入{#leave} 个字符 - //超出字数限制提示 留空支持多语言自动切换,否则按此配置显示 - //,wordOverFlowMsg:'' //你输入的字符个数已经超出最大允许值,服务器可能会拒绝保存! - - //tab - //点击tab键时移动的距离,tabSize倍数,tabNode什么字符做为单位 - //,tabSize:4 - //,tabNode:' ' - - //removeFormat - //清除格式时可以删除的标签和属性 - //removeForamtTags标签 - //,removeFormatTags:'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var' - //removeFormatAttributes属性 - //,removeFormatAttributes:'class,style,lang,width,height,align,hspace,valign' - - //undo - //可以最多回退的次数,默认20 - //,maxUndoCount:20 - //当输入的字符数超过该值时,保存一次现场 - //,maxInputCount:1 - - //autoHeightEnabled - // 是否自动长高,默认true - //,autoHeightEnabled:true - - //scaleEnabled - //是否可以拉伸长高,默认true(当开启时,自动长高失效) - //,scaleEnabled:false - //,minFrameWidth:800 //编辑器拖动时最小宽度,默认800 - //,minFrameHeight:220 //编辑器拖动时最小高度,默认220 - - //autoFloatEnabled - //是否保持toolbar的位置不动,默认true - //,autoFloatEnabled:true - //浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面 - //,topOffset:30 - //编辑器底部距离工具栏高度(如果参数大于等于编辑器高度,则设置无效) - //,toolbarTopOffset:400 - - //设置远程图片是否抓取到本地保存 - //,catchRemoteImageEnable: true //设置是否抓取远程图片 - - //pageBreakTag - //分页标识符,默认是_ueditor_page_break_tag_ - //,pageBreakTag:'_ueditor_page_break_tag_' - - //autotypeset - //自动排版参数 - //,autotypeset: { - // mergeEmptyline: true, //合并空行 - // removeClass: true, //去掉冗余的class - // removeEmptyline: false, //去掉空行 - // textAlign:"left", //段落的排版方式,可以是 left,right,center,justify 去掉这个属性表示不执行排版 - // imageBlockLine: 'center', //图片的浮动方式,独占一行剧中,左右浮动,默认: center,left,right,none 去掉这个属性表示不执行排版 - // pasteFilter: false, //根据规则过滤没事粘贴进来的内容 - // clearFontSize: false, //去掉所有的内嵌字号,使用编辑器默认的字号 - // clearFontFamily: false, //去掉所有的内嵌字体,使用编辑器默认的字体 - // removeEmptyNode: false, // 去掉空节点 - // //可以去掉的标签 - // removeTagNames: {标签名字:1}, - // indent: false, // 行首缩进 - // indentValue : '2em', //行首缩进的大小 - // bdc2sb: false, - // tobdc: false - //} - - //tableDragable - //表格是否可以拖拽 - //,tableDragable: true - - - - //sourceEditor - //源码的查看方式,codemirror 是代码高亮,textarea是文本框,默认是codemirror - //注意默认codemirror只能在ie8+和非ie中使用 - //,sourceEditor:"codemirror" - //如果sourceEditor是codemirror,还用配置一下两个参数 - //codeMirrorJsUrl js加载的路径,默认是 URL + "third-party/codemirror/codemirror.js" - //,codeMirrorJsUrl:URL + "third-party/codemirror/codemirror.js" - //codeMirrorCssUrl css加载的路径,默认是 URL + "third-party/codemirror/codemirror.css" - //,codeMirrorCssUrl:URL + "third-party/codemirror/codemirror.css" - //编辑器初始化完成后是否进入源码模式,默认为否。 - //,sourceEditorFirst:false - - //iframeUrlMap - //dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径 - //,iframeUrlMap:{ - // 'anchor':'~/dialogs/anchor/anchor.html', - //} - - //allowLinkProtocol 允许的链接地址,有这些前缀的链接地址不会自动添加http - //, allowLinkProtocols: ['http:', 'https:', '#', '/', 'ftp:', 'mailto:', 'tel:', 'git:', 'svn:'] - - //webAppKey 百度应用的APIkey,每个站长必须首先去百度官网注册一个key后方能正常使用app功能,注册介绍,http://app.baidu.com/static/cms/getapikey.html - //, webAppKey: "" - - //默认过滤规则相关配置项目 - //,disabledTableInTable:true //禁止表格嵌套 - //,allowDivTransToP:true //允许进入编辑器的div标签自动变成p标签 - //,rgb2Hex:true //默认产出的数据中的color自动从rgb格式变成16进制格式 - - // xss 过滤是否开启,inserthtml等操作 - ,xssFilterRules: true - //input xss过滤 - ,inputXssFilter: true - //output xss过滤 - ,outputXssFilter: true - // xss过滤白名单 名单来源: https://raw.githubusercontent.com/leizongmin/js-xss/master/lib/default.js - ,whiteList: { - a: ['target', 'href', 'title', 'class', 'style'], - abbr: ['title', 'class', 'style'], - address: ['class', 'style'], - area: ['shape', 'coords', 'href', 'alt'], - article: [], - aside: [], - audio: ['autoplay', 'controls', 'loop', 'preload', 'src', 'class', 'style'], - b: ['class', 'style'], - bdi: ['dir'], - bdo: ['dir'], - big: [], - blockquote: ['cite', 'class', 'style'], - br: [], - caption: ['class', 'style'], - center: [], - cite: [], - code: ['class', 'style'], - col: ['align', 'valign', 'span', 'width', 'class', 'style'], - colgroup: ['align', 'valign', 'span', 'width', 'class', 'style'], - dd: ['class', 'style'], - del: ['datetime'], - details: ['open'], - div: ['class', 'style'], - dl: ['class', 'style'], - dt: ['class', 'style'], - em: ['class', 'style'], - font: ['color', 'size', 'face'], - footer: [], - h1: ['class', 'style'], - h2: ['class', 'style'], - h3: ['class', 'style'], - h4: ['class', 'style'], - h5: ['class', 'style'], - h6: ['class', 'style'], - header: [], - hr: [], - i: ['class', 'style'], - img: ['src', 'alt', 'title', 'width', 'height', 'id', '_src', 'loadingclass', 'class', 'data-latex'], - ins: ['datetime'], - li: ['class', 'style'], - mark: [], - nav: [], - ol: ['class', 'style'], - p: ['class', 'style'], - pre: ['class', 'style'], - s: [], - section:[], - small: [], - span: ['class', 'style'], - sub: ['class', 'style'], - sup: ['class', 'style'], - strong: ['class', 'style'], - table: ['width', 'border', 'align', 'valign', 'class', 'style'], - tbody: ['align', 'valign', 'class', 'style'], - td: ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'], - tfoot: ['align', 'valign', 'class', 'style'], - th: ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'], - thead: ['align', 'valign', 'class', 'style'], - tr: ['rowspan', 'align', 'valign', 'class', 'style'], - tt: [], - u: [], - ul: ['class', 'style'], - video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style'] - } - }; - - function getUEBasePath(docUrl, confUrl) { - - return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath()); - - } - - function getConfigFilePath() { - - var configPath = document.getElementsByTagName('script'); - - return configPath[ configPath.length - 1 ].src; - - } - - function getBasePath(docUrl, confUrl) { - - var basePath = confUrl; - - - if (/^(\/|\\\\)/.test(confUrl)) { - - basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, ''); - - } else if (!/^[a-z]+:/i.test(confUrl)) { - - docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, ''); - - basePath = docUrl + "" + confUrl; - - } - - return optimizationPath(basePath); - - } - - function optimizationPath(path) { - - var protocol = /^[a-z]+:\/\//.exec(path)[ 0 ], - tmp = null, - res = []; - - path = path.replace(protocol, "").split("?")[0].split("#")[0]; - - path = path.replace(/\\/g, '/').split(/\//); - - path[ path.length - 1 ] = ""; - - while (path.length) { - - if (( tmp = path.shift() ) === "..") { - res.pop(); - } else if (tmp !== ".") { - res.push(tmp); - } - - } - - return protocol + res.join("/"); - - } - - window.UE = { - getUEBasePath: getUEBasePath - }; - -})(); diff --git a/public/static/admin/UEditor/ueditor.parse.js b/public/static/admin/UEditor/ueditor.parse.js deleted file mode 100644 index 5e77074..0000000 --- a/public/static/admin/UEditor/ueditor.parse.js +++ /dev/null @@ -1,1022 +0,0 @@ -/*! - * UEditor - * version: ueditor - * build: Wed Dec 26 2018 17:25:05 GMT+0800 (CST) - */ - -(function(){ - -(function(){ - UE = window.UE || {}; - var isIE = !!window.ActiveXObject; - //定义utils工具 - var utils = { - removeLastbs : function(url){ - return url.replace(/\/$/,'') - }, - extend : function(t,s){ - var a = arguments, - notCover = this.isBoolean(a[a.length - 1]) ? a[a.length - 1] : false, - len = this.isBoolean(a[a.length - 1]) ? a.length - 1 : a.length; - for (var i = 1; i < len; i++) { - var x = a[i]; - for (var k in x) { - if (!notCover || !t.hasOwnProperty(k)) { - t[k] = x[k]; - } - } - } - return t; - }, - isIE : isIE, - cssRule : isIE ? function(key,style,doc){ - var indexList,index; - doc = doc || document; - if(doc.indexList){ - indexList = doc.indexList; - }else{ - indexList = doc.indexList = {}; - } - var sheetStyle; - if(!indexList[key]){ - if(style === undefined){ - return '' - } - sheetStyle = doc.createStyleSheet('',index = doc.styleSheets.length); - indexList[key] = index; - }else{ - sheetStyle = doc.styleSheets[indexList[key]]; - } - if(style === undefined){ - return sheetStyle.cssText - } - sheetStyle.cssText = sheetStyle.cssText + '\n' + (style || '') - } : function(key,style,doc){ - doc = doc || document; - var head = doc.getElementsByTagName('head')[0],node; - if(!(node = doc.getElementById(key))){ - if(style === undefined){ - return '' - } - node = doc.createElement('style'); - node.id = key; - head.appendChild(node) - } - if(style === undefined){ - return node.innerHTML - } - if(style !== ''){ - node.innerHTML = node.innerHTML + '\n' + style; - }else{ - head.removeChild(node) - } - }, - domReady : function (onready) { - var doc = window.document; - if (doc.readyState === "complete") { - onready(); - }else{ - if (isIE) { - (function () { - if (doc.isReady) return; - try { - doc.documentElement.doScroll("left"); - } catch (error) { - setTimeout(arguments.callee, 0); - return; - } - onready(); - })(); - window.attachEvent('onload', function(){ - onready() - }); - } else { - doc.addEventListener("DOMContentLoaded", function () { - doc.removeEventListener("DOMContentLoaded", arguments.callee, false); - onready(); - }, false); - window.addEventListener('load', function(){onready()}, false); - } - } - - }, - each : function(obj, iterator, context) { - if (obj == null) return; - if (obj.length === +obj.length) { - for (var i = 0, l = obj.length; i < l; i++) { - if(iterator.call(context, obj[i], i, obj) === false) - return false; - } - } else { - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - if(iterator.call(context, obj[key], key, obj) === false) - return false; - } - } - } - }, - inArray : function(arr,item){ - var index = -1; - this.each(arr,function(v,i){ - if(v === item){ - index = i; - return false; - } - }); - return index; - }, - pushItem : function(arr,item){ - if(this.inArray(arr,item)==-1){ - arr.push(item) - } - }, - trim: function (str) { - return str.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g, ''); - }, - indexOf: function (array, item, start) { - var index = -1; - start = this.isNumber(start) ? start : 0; - this.each(array, function (v, i) { - if (i >= start && v === item) { - index = i; - return false; - } - }); - return index; - }, - hasClass: function (element, className) { - className = className.replace(/(^[ ]+)|([ ]+$)/g, '').replace(/[ ]{2,}/g, ' ').split(' '); - for (var i = 0, ci, cls = element.className; ci = className[i++];) { - if (!new RegExp('\\b' + ci + '\\b', 'i').test(cls)) { - return false; - } - } - return i - 1 == className.length; - }, - addClass:function (elm, classNames) { - if(!elm)return; - classNames = this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' '); - for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){ - if(!new RegExp('\\b' + ci + '\\b').test(cls)){ - cls += ' ' + ci; - } - } - elm.className = utils.trim(cls); - }, - removeClass:function (elm, classNames) { - classNames = this.isArray(classNames) ? classNames : - this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' '); - for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){ - cls = cls.replace(new RegExp('\\b' + ci + '\\b'),'') - } - cls = this.trim(cls).replace(/[ ]{2,}/g,' '); - elm.className = cls; - !cls && elm.removeAttribute('className'); - }, - on: function (element, type, handler) { - var types = this.isArray(type) ? type : type.split(/\s+/), - k = types.length; - if (k) while (k--) { - type = types[k]; - if (element.addEventListener) { - element.addEventListener(type, handler, false); - } else { - if (!handler._d) { - handler._d = { - els : [] - }; - } - var key = type + handler.toString(),index = utils.indexOf(handler._d.els,element); - if (!handler._d[key] || index == -1) { - if(index == -1){ - handler._d.els.push(element); - } - if(!handler._d[key]){ - handler._d[key] = function (evt) { - return handler.call(evt.srcElement, evt || window.event); - }; - } - - - element.attachEvent('on' + type, handler._d[key]); - } - } - } - element = null; - }, - off: function (element, type, handler) { - var types = this.isArray(type) ? type : type.split(/\s+/), - k = types.length; - if (k) while (k--) { - type = types[k]; - if (element.removeEventListener) { - element.removeEventListener(type, handler, false); - } else { - var key = type + handler.toString(); - try{ - element.detachEvent('on' + type, handler._d ? handler._d[key] : handler); - }catch(e){} - if (handler._d && handler._d[key]) { - var index = utils.indexOf(handler._d.els,element); - if(index!=-1){ - handler._d.els.splice(index,1); - } - handler._d.els.length == 0 && delete handler._d[key]; - } - } - } - }, - loadFile : function () { - var tmpList = []; - function getItem(doc,obj){ - try{ - for(var i= 0,ci;ci=tmpList[i++];){ - if(ci.doc === doc && ci.url == (obj.src || obj.href)){ - return ci; - } - } - }catch(e){ - return null; - } - - } - return function (doc, obj, fn) { - var item = getItem(doc,obj); - if (item) { - if(item.ready){ - fn && fn(); - }else{ - item.funs.push(fn) - } - return; - } - tmpList.push({ - doc:doc, - url:obj.src||obj.href, - funs:[fn] - }); - if (!doc.body) { - var html = []; - for(var p in obj){ - if(p == 'tag')continue; - html.push(p + '="' + obj[p] + '"') - } - doc.write('<' + obj.tag + ' ' + html.join(' ') + ' >'); - return; - } - if (obj.id && doc.getElementById(obj.id)) { - return; - } - var element = doc.createElement(obj.tag); - delete obj.tag; - for (var p in obj) { - element.setAttribute(p, obj[p]); - } - element.onload = element.onreadystatechange = function () { - if (!this.readyState || /loaded|complete/.test(this.readyState)) { - item = getItem(doc,obj); - if (item.funs.length > 0) { - item.ready = 1; - for (var fi; fi = item.funs.pop();) { - fi(); - } - } - element.onload = element.onreadystatechange = null; - } - }; - element.onerror = function(){ - throw Error('The load '+(obj.href||obj.src)+' fails,check the url') - }; - doc.getElementsByTagName("head")[0].appendChild(element); - } - }() - }; - utils.each(['String', 'Function', 'Array', 'Number', 'RegExp', 'Object','Boolean'], function (v) { - utils['is' + v] = function (obj) { - return Object.prototype.toString.apply(obj) == '[object ' + v + ']'; - } - }); - var parselist = {}; - UE.parse = { - register : function(parseName,fn){ - parselist[parseName] = fn; - }, - load : function(opt){ - utils.each(parselist,function(v){ - v.call(opt,utils); - }) - } - }; - uParse = function(selector,opt){ - utils.domReady(function(){ - var contents; - if(document.querySelectorAll){ - contents = document.querySelectorAll(selector) - }else{ - if(/^#/.test(selector)){ - contents = [document.getElementById(selector.replace(/^#/,''))] - }else if(/^\./.test(selector)){ - var contents = []; - utils.each(document.getElementsByTagName('*'),function(node){ - if(node.className && new RegExp('\\b' + selector.replace(/^\./,'') + '\\b','i').test(node.className)){ - contents.push(node) - } - }) - }else{ - contents = document.getElementsByTagName(selector) - } - } - utils.each(contents,function(v){ - UE.parse.load(utils.extend({root:v,selector:selector},opt)) - }) - }) - } -})(); - -UE.parse.register('insertcode',function(utils){ - var pres = this.root.getElementsByTagName('pre'); - if(pres.length){ - if(typeof XRegExp == "undefined"){ - var jsurl,cssurl; - if(this.rootPath !== undefined){ - jsurl = utils.removeLastbs(this.rootPath) + '/third-party/SyntaxHighlighter/shCore.js'; - cssurl = utils.removeLastbs(this.rootPath) + '/third-party/SyntaxHighlighter/shCoreDefault.css'; - }else{ - jsurl = this.highlightJsUrl; - cssurl = this.highlightCssUrl; - } - utils.loadFile(document,{ - id : "syntaxhighlighter_css", - tag : "link", - rel : "stylesheet", - type : "text/css", - href : cssurl - }); - utils.loadFile(document,{ - id : "syntaxhighlighter_js", - src : jsurl, - tag : "script", - type : "text/javascript", - defer : "defer" - },function(){ - utils.each(pres,function(pi){ - if(pi && /brush/i.test(pi.className)){ - SyntaxHighlighter.highlight(pi); - } - }); - }); - }else{ - utils.each(pres,function(pi){ - if(pi && /brush/i.test(pi.className)){ - SyntaxHighlighter.highlight(pi); - } - }); - } - } - -}); -UE.parse.register('table', function (utils) { - var me = this, - root = this.root, - tables = root.getElementsByTagName('table'); - if (tables.length) { - var selector = this.selector; - //追加默认的表格样式 - utils.cssRule('table', - selector + ' table.noBorderTable td,' + - selector + ' table.noBorderTable th,' + - selector + ' table.noBorderTable caption{border:1px dashed #ddd !important}' + - selector + ' table.sortEnabled tr.firstRow th,' + selector + ' table.sortEnabled tr.firstRow td{padding-right:20px; background-repeat: no-repeat;' + - 'background-position: center right; background-image:url(' + this.rootPath + 'themes/default/images/sortable.png);}' + - selector + ' table.sortEnabled tr.firstRow th:hover,' + selector + ' table.sortEnabled tr.firstRow td:hover{background-color: #EEE;}' + - selector + ' table{margin-bottom:10px;border-collapse:collapse;display:table;}' + - selector + ' td,' + selector + ' th{ background:white; padding: 5px 10px;border: 1px solid #DDD;}' + - selector + ' caption{border:1px dashed #DDD;border-bottom:0;padding:3px;text-align:center;}' + - selector + ' th{border-top:1px solid #BBB;background:#F7F7F7;}' + - selector + ' table tr.firstRow th{border-top:2px solid #BBB;background:#F7F7F7;}' + - selector + ' tr.ue-table-interlace-color-single td{ background: #fcfcfc; }' + - selector + ' tr.ue-table-interlace-color-double td{ background: #f7faff; }' + - selector + ' td p{margin:0;padding:0;}', - document); - //填充空的单元格 - - utils.each('td th caption'.split(' '), function (tag) { - var cells = root.getElementsByTagName(tag); - cells.length && utils.each(cells, function (node) { - if (!node.firstChild) { - node.innerHTML = ' '; - - } - }) - }); - - //表格可排序 - var tables = root.getElementsByTagName('table'); - utils.each(tables, function (table) { - if (/\bsortEnabled\b/.test(table.className)) { - utils.on(table, 'click', function(e){ - var target = e.target || e.srcElement, - cell = findParentByTagName(target, ['td', 'th']); - var table = findParentByTagName(target, 'table'), - colIndex = utils.indexOf(table.rows[0].cells, cell), - sortType = table.getAttribute('data-sort-type'); - if(colIndex != -1) { - sortTable(table, colIndex, me.tableSortCompareFn || sortType); - updateTable(table); - } - }); - } - }); - - //按照标签名查找父节点 - function findParentByTagName(target, tagNames) { - var i, current = target; - tagNames = utils.isArray(tagNames) ? tagNames:[tagNames]; - while(current){ - for(i = 0;i < tagNames.length; i++) { - if(current.tagName == tagNames[i].toUpperCase()) return current; - } - current = current.parentNode; - } - return null; - } - //表格排序 - function sortTable(table, sortByCellIndex, compareFn) { - var rows = table.rows, - trArray = [], - flag = rows[0].cells[0].tagName === "TH", - lastRowIndex = 0; - - for (var i = 0,len = rows.length; i < len; i++) { - trArray[i] = rows[i]; - } - - var Fn = { - 'reversecurrent': function(td1,td2){ - return 1; - }, - 'orderbyasc': function(td1,td2){ - var value1 = td1.innerText||td1.textContent, - value2 = td2.innerText||td2.textContent; - return value1.localeCompare(value2); - }, - 'reversebyasc': function(td1,td2){ - var value1 = td1.innerHTML, - value2 = td2.innerHTML; - return value2.localeCompare(value1); - }, - 'orderbynum': function(td1,td2){ - var value1 = td1[utils.isIE ? 'innerText':'textContent'].match(/\d+/), - value2 = td2[utils.isIE ? 'innerText':'textContent'].match(/\d+/); - if(value1) value1 = +value1[0]; - if(value2) value2 = +value2[0]; - return (value1||0) - (value2||0); - }, - 'reversebynum': function(td1,td2){ - var value1 = td1[utils.isIE ? 'innerText':'textContent'].match(/\d+/), - value2 = td2[utils.isIE ? 'innerText':'textContent'].match(/\d+/); - if(value1) value1 = +value1[0]; - if(value2) value2 = +value2[0]; - return (value2||0) - (value1||0); - } - }; - - //对表格设置排序的标记data-sort-type - table.setAttribute('data-sort-type', compareFn && typeof compareFn === "string" && Fn[compareFn] ? compareFn:''); - - //th不参与排序 - flag && trArray.splice(0, 1); - trArray = sort(trArray,function (tr1, tr2) { - var result; - if (compareFn && typeof compareFn === "function") { - result = compareFn.call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); - } else if (compareFn && typeof compareFn === "number") { - result = 1; - } else if (compareFn && typeof compareFn === "string" && Fn[compareFn]) { - result = Fn[compareFn].call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); - } else { - result = Fn['orderbyasc'].call(this, tr1.cells[sortByCellIndex], tr2.cells[sortByCellIndex]); - } - return result; - }); - var fragment = table.ownerDocument.createDocumentFragment(); - for (var j = 0, len = trArray.length; j < len; j++) { - fragment.appendChild(trArray[j]); - } - var tbody = table.getElementsByTagName("tbody")[0]; - if(!lastRowIndex){ - tbody.appendChild(fragment); - }else{ - tbody.insertBefore(fragment,rows[lastRowIndex- range.endRowIndex + range.beginRowIndex - 1]) - } - } - //冒泡排序 - function sort(array, compareFn){ - compareFn = compareFn || function(item1, item2){ return item1.localeCompare(item2);}; - for(var i= 0,len = array.length; i 0){ - var t = array[i]; - array[i] = array[j]; - array[j] = t; - } - } - } - return array; - } - //更新表格 - function updateTable(table) { - //给第一行设置firstRow的样式名称,在排序图标的样式上使用到 - if(!utils.hasClass(table.rows[0], "firstRow")) { - for(var i = 1; i< table.rows.length; i++) { - utils.removeClass(table.rows[i], "firstRow"); - } - utils.addClass(table.rows[0], "firstRow"); - } - } - } -}); -UE.parse.register('charts',function( utils ){ - - utils.cssRule('chartsContainerHeight','.edui-chart-container { height:'+(this.chartContainerHeight||300)+'px}'); - var resourceRoot = this.rootPath, - containers = this.root, - sources = null; - - //不存在指定的根路径, 则直接退出 - if ( !resourceRoot ) { - return; - } - - if ( sources = parseSources() ) { - - loadResources(); - - } - - - function parseSources () { - - if ( !containers ) { - return null; - } - - return extractChartData( containers ); - - } - - /** - * 提取数据 - */ - function extractChartData ( rootNode ) { - - var data = [], - tables = rootNode.getElementsByTagName( "table" ); - - for ( var i = 0, tableNode; tableNode = tables[ i ]; i++ ) { - - if ( tableNode.getAttribute( "data-chart" ) !== null ) { - - data.push( formatData( tableNode ) ); - - } - - } - - return data.length ? data : null; - - } - - function formatData ( tableNode ) { - - var meta = tableNode.getAttribute( "data-chart" ), - metaConfig = {}, - data = []; - - //提取table数据 - for ( var i = 0, row; row = tableNode.rows[ i ]; i++ ) { - - var rowData = []; - - for ( var j = 0, cell; cell = row.cells[ j ]; j++ ) { - - var value = ( cell.innerText || cell.textContent || '' ); - rowData.push( cell.tagName == 'TH' ? value:(value | 0) ); - - } - - data.push( rowData ); - - } - - //解析元信息 - meta = meta.split( ";" ); - for ( var i = 0, metaData; metaData = meta[ i ]; i++ ) { - - metaData = metaData.split( ":" ); - metaConfig[ metaData[ 0 ] ] = metaData[ 1 ]; - - } - - - return { - table: tableNode, - meta: metaConfig, - data: data - }; - - } - - //加载资源 - function loadResources () { - - loadJQuery(); - - } - - function loadJQuery () { - - //不存在jquery, 则加载jquery - if ( !window.jQuery ) { - - utils.loadFile(document,{ - src : resourceRoot + "/third-party/jquery-1.10.2.min.js", - tag : "script", - type : "text/javascript", - defer : "defer" - },function(){ - - loadHighcharts(); - - }); - - } else { - - loadHighcharts(); - - } - - } - - function loadHighcharts () { - - //不存在Highcharts, 则加载Highcharts - if ( !window.Highcharts ) { - - utils.loadFile(document,{ - src : resourceRoot + "/third-party/highcharts/highcharts.js", - tag : "script", - type : "text/javascript", - defer : "defer" - },function(){ - - loadTypeConfig(); - - }); - - } else { - - loadTypeConfig(); - - } - - } - - //加载图表差异化配置文件 - function loadTypeConfig () { - - utils.loadFile(document,{ - src : resourceRoot + "/dialogs/charts/chart.config.js", - tag : "script", - type : "text/javascript", - defer : "defer" - },function(){ - - render(); - - }); - - } - - //渲染图表 - function render () { - - var config = null, - chartConfig = null, - container = null; - - for ( var i = 0, len = sources.length; i < len; i++ ) { - - config = sources[ i ]; - - chartConfig = analysisConfig( config ); - - container = createContainer( config.table ); - - renderChart( container, typeConfig[ config.meta.chartType ], chartConfig ); - - } - - - } - - /** - * 渲染图表 - * @param container 图表容器节点对象 - * @param typeConfig 图表类型配置 - * @param config 图表通用配置 - * */ - function renderChart ( container, typeConfig, config ) { - - - $( container ).highcharts( $.extend( {}, typeConfig, { - - credits: { - enabled: false - }, - exporting: { - enabled: false - }, - title: { - text: config.title, - x: -20 //center - }, - subtitle: { - text: config.subTitle, - x: -20 - }, - xAxis: { - title: { - text: config.xTitle - }, - categories: config.categories - }, - yAxis: { - title: { - text: config.yTitle - }, - plotLines: [{ - value: 0, - width: 1, - color: '#808080' - }] - }, - tooltip: { - enabled: true, - valueSuffix: config.suffix - }, - legend: { - layout: 'vertical', - align: 'right', - verticalAlign: 'middle', - borderWidth: 1 - }, - series: config.series - - } )); - - } - - /** - * 创建图表的容器 - * 新创建的容器会替换掉对应的table对象 - * */ - function createContainer ( tableNode ) { - - var container = document.createElement( "div" ); - container.className = "edui-chart-container"; - - tableNode.parentNode.replaceChild( container, tableNode ); - - return container; - - } - - //根据config解析出正确的类别和图表数据信息 - function analysisConfig ( config ) { - - var series = [], - //数据类别 - categories = [], - result = [], - data = config.data, - meta = config.meta; - - //数据对齐方式为相反的方式, 需要反转数据 - if ( meta.dataFormat != "1" ) { - - for ( var i = 0, len = data.length; i < len ; i++ ) { - - for ( var j = 0, jlen = data[ i ].length; j < jlen; j++ ) { - - if ( !result[ j ] ) { - result[ j ] = []; - } - - result[ j ][ i ] = data[ i ][ j ]; - - } - - } - - data = result; - - } - - result = {}; - - //普通图表 - if ( meta.chartType != typeConfig.length - 1 ) { - - categories = data[ 0 ].slice( 1 ); - - for ( var i = 1, curData; curData = data[ i ]; i++ ) { - series.push( { - name: curData[ 0 ], - data: curData.slice( 1 ) - } ); - } - - result.series = series; - result.categories = categories; - result.title = meta.title; - result.subTitle = meta.subTitle; - result.xTitle = meta.xTitle; - result.yTitle = meta.yTitle; - result.suffix = meta.suffix; - - } else { - - var curData = []; - - for ( var i = 1, len = data[ 0 ].length; i < len; i++ ) { - - curData.push( [ data[ 0 ][ i ], data[ 1 ][ i ] | 0 ] ); - - } - - //饼图 - series[ 0 ] = { - type: 'pie', - name: meta.tip, - data: curData - }; - - result.series = series; - result.title = meta.title; - result.suffix = meta.suffix; - - } - - return result; - - } - -}); -UE.parse.register('background', function (utils) { - var me = this, - root = me.root, - p = root.getElementsByTagName('p'), - styles; - - for (var i = 0,ci; ci = p[i++];) { - styles = ci.getAttribute('data-background'); - if (styles){ - ci.parentNode.removeChild(ci); - } - } - - //追加默认的表格样式 - styles && utils.cssRule('ueditor_background', me.selector + '{' + styles + '}', document); -}); -UE.parse.register('list',function(utils){ - var customCss = [], - customStyle = { - 'cn' : 'cn-1-', - 'cn1' : 'cn-2-', - 'cn2' : 'cn-3-', - 'num' : 'num-1-', - 'num1' : 'num-2-', - 'num2' : 'num-3-', - 'dash' : 'dash', - 'dot' : 'dot' - }; - - - utils.extend(this,{ - liiconpath : 'http://bs.baidu.com/listicon/', - listDefaultPaddingLeft : '20' - }); - - var root = this.root, - ols = root.getElementsByTagName('ol'), - uls = root.getElementsByTagName('ul'), - selector = this.selector; - - if(ols.length){ - applyStyle.call(this,ols); - } - - if(uls.length){ - applyStyle.call(this,uls); - } - - if(ols.length || uls.length){ - customCss.push(selector +' .list-paddingleft-1{padding-left:0}'); - customCss.push(selector +' .list-paddingleft-2{padding-left:'+ this.listDefaultPaddingLeft+'px}'); - customCss.push(selector +' .list-paddingleft-3{padding-left:'+ this.listDefaultPaddingLeft*2+'px}'); - - utils.cssRule('list', selector +' ol,'+selector +' ul{margin:0;padding:0;}li{clear:both;}'+customCss.join('\n'), document); - } - function applyStyle(nodes){ - var T = this; - utils.each(nodes,function(list){ - if(list.className && /custom_/i.test(list.className)){ - var listStyle = list.className.match(/custom_(\w+)/)[1]; - if(listStyle == 'dash' || listStyle == 'dot'){ - utils.pushItem(customCss,selector +' li.list-' + customStyle[listStyle] + '{background-image:url(' + T.liiconpath +customStyle[listStyle]+'.gif)}'); - utils.pushItem(customCss,selector +' ul.custom_'+listStyle+'{list-style:none;} '+ selector +' ul.custom_'+listStyle+' li{background-position:0 3px;background-repeat:no-repeat}'); - - }else{ - var index = 1; - utils.each(list.childNodes,function(li){ - if(li.tagName == 'LI'){ - utils.pushItem(customCss,selector + ' li.list-' + customStyle[listStyle] + index + '{background-image:url(' + T.liiconpath + 'list-'+customStyle[listStyle] +index + '.gif)}'); - index++; - } - }); - utils.pushItem(customCss,selector + ' ol.custom_'+listStyle+'{list-style:none;}'+selector+' ol.custom_'+listStyle+' li{background-position:0 3px;background-repeat:no-repeat}'); - } - switch(listStyle){ - case 'cn': - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:25px}'); - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}'); - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:55px}'); - break; - case 'cn1': - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:30px}'); - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}'); - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:55px}'); - break; - case 'cn2': - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:40px}'); - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:55px}'); - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-3{padding-left:68px}'); - break; - case 'num': - case 'num1': - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:25px}'); - break; - case 'num2': - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-1{padding-left:35px}'); - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft-2{padding-left:40px}'); - break; - case 'dash': - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft{padding-left:35px}'); - break; - case 'dot': - utils.pushItem(customCss,selector + ' li.list-'+listStyle+'-paddingleft{padding-left:20px}'); - } - } - }); - } - - -}); -UE.parse.register('vedio',function(utils){ - var video = this.root.getElementsByTagName('video'), - audio = this.root.getElementsByTagName('audio'); - - document.createElement('video');document.createElement('audio'); - if(video.length || audio.length){ - var sourcePath = utils.removeLastbs(this.rootPath), - jsurl = sourcePath + '/third-party/video-js/video.js', - cssurl = sourcePath + '/third-party/video-js/video-js.min.css', - swfUrl = sourcePath + '/third-party/video-js/video-js.swf'; - - if(window.videojs) { - videojs.autoSetup(); - } else { - utils.loadFile(document,{ - id : "video_css", - tag : "link", - rel : "stylesheet", - type : "text/css", - href : cssurl - }); - utils.loadFile(document,{ - id : "video_js", - src : jsurl, - tag : "script", - type : "text/javascript" - },function(){ - videojs.options.flash.swf = swfUrl; - videojs.autoSetup(); - }); - } - - } -}); - -})(); diff --git a/public/static/admin/UEditor/ueditor.parse.min.js b/public/static/admin/UEditor/ueditor.parse.min.js deleted file mode 100644 index d996fd0..0000000 --- a/public/static/admin/UEditor/ueditor.parse.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * UEditor - * version: ueditor - * build: Wed Dec 26 2018 17:25:07 GMT+0800 (CST) - */ - -!function(){!function(){UE=window.UE||{};var a=!!window.ActiveXObject,b={removeLastbs:function(a){return a.replace(/\/$/,"")},extend:function(a,b){for(var c=arguments,d=!!this.isBoolean(c[c.length-1])&&c[c.length-1],e=this.isBoolean(c[c.length-1])?c.length-1:c.length,f=1;f=c&&a===b)return d=e,!1}),d},hasClass:function(a,b){b=b.replace(/(^[ ]+)|([ ]+$)/g,"").replace(/[ ]{2,}/g," ").split(" ");for(var c,d=0,e=a.className;c=b[d++];)if(!new RegExp("\\b"+c+"\\b","i").test(e))return!1;return d-1==b.length},addClass:function(a,c){if(a){c=this.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var d,e=0,f=a.className;d=c[e++];)new RegExp("\\b"+d+"\\b").test(f)||(f+=" "+d);a.className=b.trim(f)}},removeClass:function(a,b){b=this.isArray(b)?b:this.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c,d=0,e=a.className;c=b[d++];)e=e.replace(new RegExp("\\b"+c+"\\b"),"");e=this.trim(e).replace(/[ ]{2,}/g," "),a.className=e,!e&&a.removeAttribute("className")},on:function(a,c,d){var e=this.isArray(c)?c:c.split(/\s+/),f=e.length;if(f)for(;f--;)if(c=e[f],a.addEventListener)a.addEventListener(c,d,!1);else{d._d||(d._d={els:[]});var g=c+d.toString(),h=b.indexOf(d._d.els,a);d._d[g]&&h!=-1||(h==-1&&d._d.els.push(a),d._d[g]||(d._d[g]=function(a){return d.call(a.srcElement,a||window.event)}),a.attachEvent("on"+c,d._d[g]))}a=null},off:function(a,c,d){var e=this.isArray(c)?c:c.split(/\s+/),f=e.length;if(f)for(;f--;)if(c=e[f],a.removeEventListener)a.removeEventListener(c,d,!1);else{var g=c+d.toString();try{a.detachEvent("on"+c,d._d?d._d[g]:d)}catch(h){}if(d._d&&d._d[g]){var i=b.indexOf(d._d.els,a);i!=-1&&d._d.els.splice(i,1),0==d._d.els.length&&delete d._d[g]}}},loadFile:function(){function a(a,c){try{for(var d,e=0;d=b[e++];)if(d.doc===a&&d.url==(c.src||c.href))return d}catch(f){return null}}var b=[];return function(c,d,e){var f=a(c,d);if(f)return void(f.ready?e&&e():f.funs.push(e));if(b.push({doc:c,url:d.src||d.href,funs:[e]}),!c.body){var g=[];for(var h in d)"tag"!=h&&g.push(h+'="'+d[h]+'"');return void c.write("<"+d.tag+" "+g.join(" ")+" >")}if(!d.id||!c.getElementById(d.id)){var i=c.createElement(d.tag);delete d.tag;for(var h in d)i.setAttribute(h,d[h]);i.onload=i.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){if(f=a(c,d),f.funs.length>0){f.ready=1;for(var b;b=f.funs.pop();)b()}i.onload=i.onreadystatechange=null}},i.onerror=function(){throw Error("The load "+(d.href||d.src)+" fails,check the url")},c.getElementsByTagName("head")[0].appendChild(i)}}}()};b.each(["String","Function","Array","Number","RegExp","Object","Boolean"],function(a){b["is"+a]=function(b){return Object.prototype.toString.apply(b)=="[object "+a+"]"}});var c={};UE.parse={register:function(a,b){c[a]=b},load:function(a){b.each(c,function(c){c.call(a,b)})}},uParse=function(a,c){b.domReady(function(){var d;if(document.querySelectorAll)d=document.querySelectorAll(a);else if(/^#/.test(a))d=[document.getElementById(a.replace(/^#/,""))];else if(/^\./.test(a)){var d=[];b.each(document.getElementsByTagName("*"),function(b){b.className&&new RegExp("\\b"+a.replace(/^\./,"")+"\\b","i").test(b.className)&&d.push(b)})}else d=document.getElementsByTagName(a);b.each(d,function(d){UE.parse.load(b.extend({root:d,selector:a},c))})})}}(),UE.parse.register("insertcode",function(a){var b=this.root.getElementsByTagName("pre");if(b.length)if("undefined"==typeof XRegExp){var c,d;void 0!==this.rootPath?(c=a.removeLastbs(this.rootPath)+"/third-party/SyntaxHighlighter/shCore.js",d=a.removeLastbs(this.rootPath)+"/third-party/SyntaxHighlighter/shCoreDefault.css"):(c=this.highlightJsUrl,d=this.highlightCssUrl),a.loadFile(document,{id:"syntaxhighlighter_css",tag:"link",rel:"stylesheet",type:"text/css",href:d}),a.loadFile(document,{id:"syntaxhighlighter_js",src:c,tag:"script",type:"text/javascript",defer:"defer"},function(){a.each(b,function(a){a&&/brush/i.test(a.className)&&SyntaxHighlighter.highlight(a)})})}else a.each(b,function(a){a&&/brush/i.test(a.className)&&SyntaxHighlighter.highlight(a)})}),UE.parse.register("table",function(a){function b(b,c){var d,e=b;for(c=a.isArray(c)?c:[c];e;){for(d=0;d0){var g=a[c];a[c]=a[e],a[e]=g}return a}function e(b){if(!a.hasClass(b.rows[0],"firstRow")){for(var c=1;c0?r:n)(t)}},function(t,e,n){var r=n(28)("keys"),o=n(29);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports=!0},function(t,e,n){var r=n(7),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(13).f,o=n(9),i=n(1)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){"use strict";var r=n(12);t.exports.f=function(t){return new function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}(t)}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(43)),o=f(n(32)),i=f(n(79)),u=f(n(86)),c=f(n(87)),s=f(n(88)),a=f(n(89));function f(t){return t&&t.__esModule?t:{default:t}}e.default={name:"VueUeditorWrap",data:function(){return{isEditorReady:!1,defaultConfig:{UEDITOR_HOME_URL:void 0!==t&&t.env.BASE_URL?t.env.BASE_URL+"UEditor/":"/static/admin/UEditor/"}}},props:{mode:{type:String,default:"observer",validator:function(t){return-1!==["observer","listener"].indexOf(t)}},value:{type:String,default:""},config:{type:Object,default:function(){return{}}},init:{type:Function,default:function(){}},destroy:{type:Boolean,default:!0},name:{type:String,default:""},observerDebounceTime:{type:Number,default:50,validator:function(t){return t>=20}},observerOptions:{type:Object,default:function(){return{attributes:!0,attributeFilter:["src","style","type","name"],characterData:!0,childList:!0,subtree:!0}}},forceInit:{type:Boolean,default:!1},editorId:{type:String},editorDependencies:Array,editorDependenciesChecker:Function},computed:{mixedConfig:function(){return(0,i.default)({},this.defaultConfig,this.config)}},methods:{registerButton:function(t){var e=t.name,n=t.icon,r=t.tip,o=t.handler,i=t.index,u=t.UE,c=void 0===u?window.UE:u;c.registerUI(e,function(t,e){t.registerCommand(e,{execCommand:function(){o(t,e)}});var i=new c.ui.Button({name:e,title:r,cssRules:"background-image: url("+n+") !important;background-size: cover;",onclick:function(){t.execCommand(e)}});return t.addListener("selectionchange",function(){var n=t.queryCommandState(e);-1===n?(i.setDisabled(!0),i.setChecked(!1)):(i.setDisabled(!1),i.setChecked(n))}),i},i,this.id)},_initEditor:function(){var t=this;this.$refs.container.id=this.id=this.editorId||"editor_"+(0,a.default)(8),this.init(),this.$emit("before-init",this.id,this.mixedConfig),this.$emit("beforeInit",this.id,this.mixedConfig),this.editor=window.UE.getEditor(this.id,this.mixedConfig),this.editor.addListener("ready",function(){t.isEditorReady?t.editor.setContent(t.value):(t.isEditorReady=!0,t.$emit("ready",t.editor),t.value&&t.editor.setContent(t.value)),"observer"===t.mode&&window.MutationObserver?t._observerChangeListener():t._normalChangeListener()})},_loadScript:function(t){return new o.default(function(e,n){if(window.$loadEventBus.on(t,e),!1===window.$loadEventBus.listeners[t].requested){window.$loadEventBus.listeners[t].requested=!0;var r=document.createElement("script");r.src=t,r.onload=function(){window.$loadEventBus.emit(t)},r.onerror=n,document.getElementsByTagName("head")[0].appendChild(r)}})},_loadCss:function(t){return new o.default(function(e,n){if(window.$loadEventBus.on(t,e),!1===window.$loadEventBus.listeners[t].requested){window.$loadEventBus.listeners[t].requested=!0;var r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=t,r.onload=function(){window.$loadEventBus.emit(t)},r.onerror=n,document.getElementsByTagName("head")[0].appendChild(r)}})},_loadEditorDependencies:function(){var t=this;window.$loadEventBus||(window.$loadEventBus=new u.default);var e=["ueditor.config.js","ueditor.all.min.js"];return new o.default(function(n,i){if(t.editorDependencies&&t.editorDependenciesChecker&&t.editorDependenciesChecker())n();else if(!t.editorDependencies&&window.UE&&window.UE.getEditor&&window.UEDITOR_CONFIG&&0!==(0,r.default)(window.UEDITOR_CONFIG).length)n();else{var u=(t.editorDependencies||e).reduce(function(e,n){/^((https?:)?\/\/)?[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)+\//.test(n)||(n=(t.mixedConfig.UEDITOR_HOME_URL||"")+n);var r=n.split("."),o=r[r.length-1];return"js"===o?e.jsLinks.push(n):"css"===o&&e.cssLinks.push(n),e},{jsLinks:[],cssLinks:[]}),c=u.jsLinks,a=u.cssLinks;o.default.all([o.default.all(a.map(function(e){return t._loadCss(e)})),(0,s.default)(c.map(function(e){return function(){return t._loadScript(e)}}))]).then(function(){return n()}).catch(i)}})},_contentChangeHandler:function(){this.innerValue=this.editor.getContent(),this.$emit("input",this.innerValue)},_normalChangeListener:function(){this.editor.addListener("contentChange",this._contentChangeHandler)},_observerChangeListener:function(){var t=this;this.observer=new MutationObserver((0,c.default)(function(){t.editor.document.getElementById("baidu_pastebin")||(t.innerValue=t.editor.getContent(),t.$emit("input",t.innerValue))},this.observerDebounceTime)),this.observer.observe(this.editor.body,this.observerOptions)}},deactivated:function(){this.editor&&this.editor.removeListener("contentChange",this._contentChangeHandler),this.observer&&this.observer.disconnect()},beforeDestroy:function(){this.destroy&&this.editor&&this.editor.destroy&&this.editor.destroy(),this.observer&&this.observer.disconnect&&this.observer.disconnect()},watch:{value:{handler:function(t){var e=this;this.isEditorReady?t===this.innerValue||this.editor.setContent(t||""):(this.forceInit||"undefined"!=typeof window)&&this._loadEditorDependencies().then(function(){e.$refs.container?e._initEditor():e.$nextTick(function(){return e._initEditor()})}).catch(function(){throw new Error("[vue-ueditor-wrap] UEditor 资源加载失败!请检查资源是否存在,UEDITOR_HOME_URL 是否配置正确!")})},immediate:!0}}}}).call(e,n(42))},function(t,e,n){var r=n(10);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(19),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(2),o=n(0),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(21)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports={default:n(52),__esModule:!0}},function(t,e,n){"use strict";var r=n(21),o=n(4),i=n(56),u=n(5),c=n(8),s=n(57),a=n(23),f=n(60),l=n(1)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,e,n,h,v,y,m){s(n,e,h);var _,g,b,x=function(t){if(!d&&t in j)return j[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",E="values"==v,O=!1,j=t.prototype,T=j[l]||j["@@iterator"]||v&&j[v],S=T||x(v),C=v?E?x("entries"):S:void 0,L="Array"==e&&j.entries||T;if(L&&(b=f(L.call(new t)))!==Object.prototype&&b.next&&(a(b,w,!0),r||"function"==typeof b[l]||u(b,l,p)),E&&T&&"values"!==T.name&&(O=!0,S=function(){return T.call(this)}),r&&!m||!d&&!O&&j[l]||u(j,l,S),c[e]=S,c[w]=p,v)if(_={values:E?S:x("values"),keys:y?S:x("keys"),entries:C},m)for(g in _)g in j||i(j,g,_[g]);else o(o.P+o.F*(d||O),e,_);return _}},function(t,e,n){var r=n(0).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(10),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(u=r(e))&&"function"==typeof e.callee?"Arguments":u}},function(t,e,n){var r=n(3),o=n(12),i=n(1)("species");t.exports=function(t,e){var n,u=r(t).constructor;return void 0===u||void 0==(n=r(u)[i])?e:o(n)}},function(t,e,n){var r,o,i,u=n(11),c=n(71),s=n(34),a=n(22),f=n(0),l=f.process,d=f.setImmediate,p=f.clearImmediate,h=f.MessageChannel,v=f.Dispatch,y=0,m={},_=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},g=function(t){_.call(t.data)};d&&p||(d=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++y]=function(){c("function"==typeof t?t:Function(t),e)},r(y),y},p=function(t){delete m[t]},"process"==n(10)(l)?r=function(t){l.nextTick(u(_,t,1))}:v&&v.now?r=function(t){v.now(u(_,t,1))}:h?(i=(o=new h).port2,o.port1.onmessage=g,r=u(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",g,!1)):r="onreadystatechange"in a("script")?function(t){s.appendChild(a("script")).onreadystatechange=function(){s.removeChild(this),_.call(t)}}:function(t){setTimeout(u(_,t,1),0)}),t.exports={set:d,clear:p}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(3),o=n(7),i=n(24);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(25),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,function(){return r[t]})}(i);var u=n(90),c=n(41)(o.a,u.a,!1,null,null,null);c.options.__file="src/components/vue-ueditor-wrap.vue",e.default=c.exports},function(t,e){t.exports=function(t,e,n,r,o,i){var u,c=t=t||{},s=typeof t.default;"object"!==s&&"function"!==s||(u=t,c=t.default);var a,f="function"==typeof c?c.options:c;if(e&&(f.render=e.render,f.staticRenderFns=e.staticRenderFns,f._compiled=!0),n&&(f.functional=!0),o&&(f._scopeId=o),i?(a=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},f._ssrRegister=a):r&&(a=r),a){var l=f.functional,d=l?f.render:f.beforeCreate;l?(f._injectStyles=a,f.render=function(t,e){return a.call(e),d(t,e)}):f.beforeCreate=d?[].concat(d,a):[a]}return{esModule:u,exports:c,options:f}}},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var s,a=[],f=!1,l=-1;function d(){f&&s&&(f=!1,s.length?a=s.concat(a):l=-1,a.length&&p())}function p(){if(!f){var t=c(d);f=!0;for(var e=a.length;e;){for(s=a,a=[];++l1)for(var n=1;ns;)r(c,n=e[s++])&&(~i(a,n)||a.push(n));return a}},function(t,e,n){var r=n(18),o=n(27),i=n(48);t.exports=function(t){return function(e,n,u){var c,s=r(e),a=o(s.length),f=i(u,a);if(t&&n!=n){for(;a>f;)if((c=s[f++])!=c)return!0}else for(;a>f;f++)if((t||f in s)&&s[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(19),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(4),o=n(2),i=n(14);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],u={};u[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",u)}},function(t,e,n){t.exports=!n(6)&&!n(14)(function(){return 7!=Object.defineProperty(n(22)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(7);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){n(53),n(54),n(61),n(65),n(77),n(78),t.exports=n(2).Promise},function(t,e){},function(t,e,n){"use strict";var r=n(55)(!0);n(33)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(19),o=n(16);t.exports=function(t){return function(e,n){var i,u,c=String(o(e)),s=r(n),a=c.length;return s<0||s>=a?t?"":void 0:(i=c.charCodeAt(s))<55296||i>56319||s+1===a||(u=c.charCodeAt(s+1))<56320||u>57343?t?c.charAt(s):i:t?c.slice(s,s+2):u-56320+(i-55296<<10)+65536}}},function(t,e,n){t.exports=n(5)},function(t,e,n){"use strict";var r=n(58),o=n(31),i=n(23),u={};n(5)(u,n(1)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(u,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(3),o=n(59),i=n(30),u=n(20)("IE_PROTO"),c=function(){},s=function(){var t,e=n(22)("iframe"),r=i.length;for(e.style.display="none",n(34).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("'); - } elseif ($format === self::FORMAT_JS) { - static::writeOutput(static::generateScript()); - } - static::resetStatic(); - } - } - - public function close(): void - { - self::resetStatic(); - } - - public function reset() - { - parent::reset(); - - self::resetStatic(); - } - - /** - * Forget all logged records - */ - public static function resetStatic(): void - { - static::$records = []; - } - - /** - * Wrapper for register_shutdown_function to allow overriding - */ - protected function registerShutdownFunction(): void - { - if (PHP_SAPI !== 'cli') { - register_shutdown_function(['Monolog\Handler\BrowserConsoleHandler', 'send']); - } - } - - /** - * Wrapper for echo to allow overriding - */ - protected static function writeOutput(string $str): void - { - echo $str; - } - - /** - * Checks the format of the response - * - * If Content-Type is set to application/javascript or text/javascript -> js - * If Content-Type is set to text/html, or is unset -> html - * If Content-Type is anything else -> unknown - * - * @return string One of 'js', 'html' or 'unknown' - * @phpstan-return self::FORMAT_* - */ - protected static function getResponseFormat(): string - { - // Check content type - foreach (headers_list() as $header) { - if (stripos($header, 'content-type:') === 0) { - return static::getResponseFormatFromContentType($header); - } - } - - return self::FORMAT_HTML; - } - - /** - * @return string One of 'js', 'html' or 'unknown' - * @phpstan-return self::FORMAT_* - */ - protected static function getResponseFormatFromContentType(string $contentType): string - { - // This handler only works with HTML and javascript outputs - // text/javascript is obsolete in favour of application/javascript, but still used - if (stripos($contentType, 'application/javascript') !== false || stripos($contentType, 'text/javascript') !== false) { - return self::FORMAT_JS; - } - - if (stripos($contentType, 'text/html') !== false) { - return self::FORMAT_HTML; - } - - return self::FORMAT_UNKNOWN; - } - - private static function generateScript(): string - { - $script = []; - foreach (static::$records as $record) { - $context = static::dump('Context', $record['context']); - $extra = static::dump('Extra', $record['extra']); - - if (empty($context) && empty($extra)) { - $script[] = static::call_array(static::getConsoleMethodForLevel($record['level']), static::handleStyles($record['formatted'])); - } else { - $script = array_merge( - $script, - [static::call_array('groupCollapsed', static::handleStyles($record['formatted']))], - $context, - $extra, - [static::call('groupEnd')] - ); - } - } - - return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; - } - - private static function getConsoleMethodForLevel(int $level): string - { - return [ - Logger::DEBUG => 'debug', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warn', - Logger::ERROR => 'error', - Logger::CRITICAL => 'error', - Logger::ALERT => 'error', - Logger::EMERGENCY => 'error', - ][$level] ?? 'log'; - } - - /** - * @return string[] - */ - private static function handleStyles(string $formatted): array - { - $args = []; - $format = '%c' . $formatted; - preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); - - foreach (array_reverse($matches) as $match) { - $args[] = '"font-weight: normal"'; - $args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0])); - - $pos = $match[0][1]; - $format = Utils::substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . Utils::substr($format, $pos + strlen($match[0][0])); - } - - $args[] = static::quote('font-weight: normal'); - $args[] = static::quote($format); - - return array_reverse($args); - } - - private static function handleCustomStyles(string $style, string $string): string - { - static $colors = ['blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey']; - static $labels = []; - - $style = preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function (array $m) use ($string, &$colors, &$labels) { - if (trim($m[1]) === 'autolabel') { - // Format the string as a label with consistent auto assigned background color - if (!isset($labels[$string])) { - $labels[$string] = $colors[count($labels) % count($colors)]; - } - $color = $labels[$string]; - - return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; - } - - return $m[1]; - }, $style); - - if (null === $style) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Failed to run preg_replace_callback: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - - return $style; - } - - /** - * @param mixed[] $dict - * @return mixed[] - */ - private static function dump(string $title, array $dict): array - { - $script = []; - $dict = array_filter($dict); - if (empty($dict)) { - return $script; - } - $script[] = static::call('log', static::quote('%c%s'), static::quote('font-weight: bold'), static::quote($title)); - foreach ($dict as $key => $value) { - $value = json_encode($value); - if (empty($value)) { - $value = static::quote(''); - } - $script[] = static::call('log', static::quote('%s: %o'), static::quote((string) $key), $value); - } - - return $script; - } - - private static function quote(string $arg): string - { - return '"' . addcslashes($arg, "\"\n\\") . '"'; - } - - /** - * @param mixed $args - */ - private static function call(...$args): string - { - $method = array_shift($args); - if (!is_string($method)) { - throw new \UnexpectedValueException('Expected the first arg to be a string, got: '.var_export($method, true)); - } - - return static::call_array($method, $args); - } - - /** - * @param mixed[] $args - */ - private static function call_array(string $method, array $args): string - { - return 'c.' . $method . '(' . implode(', ', $args) . ');'; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php deleted file mode 100644 index fcce5d6..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * Buffers all records until closing the handler and then pass them as batch. - * - * This is useful for a MailHandler to send only one mail per request instead of - * sending one per log message. - * - * @author Christophe Coevoet - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class BufferHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** @var HandlerInterface */ - protected $handler; - /** @var int */ - protected $bufferSize = 0; - /** @var int */ - protected $bufferLimit; - /** @var bool */ - protected $flushOnOverflow; - /** @var Record[] */ - protected $buffer = []; - /** @var bool */ - protected $initialized = false; - - /** - * @param HandlerInterface $handler Handler. - * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded - */ - public function __construct(HandlerInterface $handler, int $bufferLimit = 0, $level = Logger::DEBUG, bool $bubble = true, bool $flushOnOverflow = false) - { - parent::__construct($level, $bubble); - $this->handler = $handler; - $this->bufferLimit = $bufferLimit; - $this->flushOnOverflow = $flushOnOverflow; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($record['level'] < $this->level) { - return false; - } - - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function([$this, 'close']); - $this->initialized = true; - } - - if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { - if ($this->flushOnOverflow) { - $this->flush(); - } else { - array_shift($this->buffer); - $this->bufferSize--; - } - } - - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $this->buffer[] = $record; - $this->bufferSize++; - - return false === $this->bubble; - } - - public function flush(): void - { - if ($this->bufferSize === 0) { - return; - } - - $this->handler->handleBatch($this->buffer); - $this->clear(); - } - - public function __destruct() - { - // suppress the parent behavior since we already have register_shutdown_function() - // to call close(), and the reference contained there will prevent this from being - // GC'd until the end of the request - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - $this->flush(); - - $this->handler->close(); - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - */ - public function clear(): void - { - $this->bufferSize = 0; - $this->buffer = []; - } - - public function reset() - { - $this->flush(); - - parent::reset(); - - $this->resetProcessors(); - - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php deleted file mode 100644 index 234ecf6..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\ChromePHPFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) - * - * This also works out of the box with Firefox 43+ - * - * @author Christophe Coevoet - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class ChromePHPHandler extends AbstractProcessingHandler -{ - use WebRequestRecognizerTrait; - - /** - * Version of the extension - */ - protected const VERSION = '4.0'; - - /** - * Header name - */ - protected const HEADER_NAME = 'X-ChromeLogger-Data'; - - /** - * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) - */ - protected const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; - - /** @var bool */ - protected static $initialized = false; - - /** - * Tracks whether we sent too much data - * - * Chrome limits the headers to 4KB, so when we sent 3KB we stop sending - * - * @var bool - */ - protected static $overflowed = false; - - /** @var mixed[] */ - protected static $json = [ - 'version' => self::VERSION, - 'columns' => ['label', 'log', 'backtrace', 'type'], - 'rows' => [], - ]; - - /** @var bool */ - protected static $sendHeaders = true; - - public function __construct($level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); - } - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if (!$this->isWebRequest()) { - return; - } - - $messages = []; - - foreach ($records as $record) { - if ($record['level'] < $this->level) { - continue; - } - /** @var Record $message */ - $message = $this->processRecord($record); - $messages[] = $message; - } - - if (!empty($messages)) { - $messages = $this->getFormatter()->formatBatch($messages); - self::$json['rows'] = array_merge(self::$json['rows'], $messages); - $this->send(); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ChromePHPFormatter(); - } - - /** - * Creates & sends header for a record - * - * @see sendHeader() - * @see send() - */ - protected function write(array $record): void - { - if (!$this->isWebRequest()) { - return; - } - - self::$json['rows'][] = $record['formatted']; - - $this->send(); - } - - /** - * Sends the log header - * - * @see sendHeader() - */ - protected function send(): void - { - if (self::$overflowed || !self::$sendHeaders) { - return; - } - - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? ''; - } - - $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode($json); - if (strlen($data) > 3 * 1024) { - self::$overflowed = true; - - $record = [ - 'message' => 'Incomplete logs, chrome header size limit reached', - 'context' => [], - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'monolog', - 'datetime' => new \DateTimeImmutable(), - 'extra' => [], - ]; - self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode($json); - } - - if (trim($data) !== '') { - $this->sendHeader(static::HEADER_NAME, $data); - } - } - - /** - * Send header string to the client - */ - protected function sendHeader(string $header, string $content): void - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - */ - protected function headersAccepted(): bool - { - if (empty($_SERVER['HTTP_USER_AGENT'])) { - return false; - } - - return preg_match(static::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']) === 1; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php deleted file mode 100644 index 5265761..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\JsonFormatter; -use Monolog\Logger; - -/** - * CouchDB handler - * - * @author Markus Bachmann - */ -class CouchDBHandler extends AbstractProcessingHandler -{ - /** @var mixed[] */ - private $options; - - /** - * @param mixed[] $options - */ - public function __construct(array $options = [], $level = Logger::DEBUG, bool $bubble = true) - { - $this->options = array_merge([ - 'host' => 'localhost', - 'port' => 5984, - 'dbname' => 'logger', - 'username' => null, - 'password' => null, - ], $options); - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $basicAuth = null; - if ($this->options['username']) { - $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); - } - - $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; - $context = stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'content' => $record['formatted'], - 'ignore_errors' => true, - 'max_redirects' => 0, - 'header' => 'Content-type: application/json', - ], - ]); - - if (false === @file_get_contents($url, false, $context)) { - throw new \RuntimeException(sprintf('Could not connect to %s', $url)); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php deleted file mode 100644 index 3535a4f..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Logs to Cube. - * - * @link https://github.com/square/cube/wiki - * @author Wan Chen - * @deprecated Since 2.8.0 and 3.2.0, Cube appears abandoned and thus we will drop this handler in Monolog 4 - */ -class CubeHandler extends AbstractProcessingHandler -{ - /** @var resource|\Socket|null */ - private $udpConnection = null; - /** @var resource|\CurlHandle|null */ - private $httpConnection = null; - /** @var string */ - private $scheme; - /** @var string */ - private $host; - /** @var int */ - private $port; - /** @var string[] */ - private $acceptedSchemes = ['http', 'udp']; - - /** - * Create a Cube handler - * - * @throws \UnexpectedValueException when given url is not a valid url. - * A valid url must consist of three parts : protocol://host:port - * Only valid protocols used by Cube are http and udp - */ - public function __construct(string $url, $level = Logger::DEBUG, bool $bubble = true) - { - $urlInfo = parse_url($url); - - if ($urlInfo === false || !isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { - throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); - } - - if (!in_array($urlInfo['scheme'], $this->acceptedSchemes)) { - throw new \UnexpectedValueException( - 'Invalid protocol (' . $urlInfo['scheme'] . ').' - . ' Valid options are ' . implode(', ', $this->acceptedSchemes) - ); - } - - $this->scheme = $urlInfo['scheme']; - $this->host = $urlInfo['host']; - $this->port = (int) $urlInfo['port']; - - parent::__construct($level, $bubble); - } - - /** - * Establish a connection to an UDP socket - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when there is no socket extension - */ - protected function connectUdp(): void - { - if (!extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); - } - - $udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); - if (false === $udpConnection) { - throw new \LogicException('Unable to create a socket'); - } - - $this->udpConnection = $udpConnection; - if (!socket_connect($this->udpConnection, $this->host, $this->port)) { - throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); - } - } - - /** - * Establish a connection to an http server - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when no curl extension - */ - protected function connectHttp(): void - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler'); - } - - $httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); - if (false === $httpConnection) { - throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); - } - - $this->httpConnection = $httpConnection; - curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $date = $record['datetime']; - - $data = ['time' => $date->format('Y-m-d\TH:i:s.uO')]; - unset($record['datetime']); - - if (isset($record['context']['type'])) { - $data['type'] = $record['context']['type']; - unset($record['context']['type']); - } else { - $data['type'] = $record['channel']; - } - - $data['data'] = $record['context']; - $data['data']['level'] = $record['level']; - - if ($this->scheme === 'http') { - $this->writeHttp(Utils::jsonEncode($data)); - } else { - $this->writeUdp(Utils::jsonEncode($data)); - } - } - - private function writeUdp(string $data): void - { - if (!$this->udpConnection) { - $this->connectUdp(); - } - - socket_send($this->udpConnection, $data, strlen($data), 0); - } - - private function writeHttp(string $data): void - { - if (!$this->httpConnection) { - $this->connectHttp(); - } - - if (null === $this->httpConnection) { - throw new \LogicException('No connection could be established'); - } - - curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); - curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, [ - 'Content-Type: application/json', - 'Content-Length: ' . strlen('['.$data.']'), - ]); - - Curl\Util::execute($this->httpConnection, 5, false); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php deleted file mode 100644 index 7213e8e..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Curl; - -use CurlHandle; - -/** - * This class is marked as internal and it is not under the BC promise of the package. - * - * @internal - */ -final class Util -{ - /** @var array */ - private static $retriableErrorCodes = [ - CURLE_COULDNT_RESOLVE_HOST, - CURLE_COULDNT_CONNECT, - CURLE_HTTP_NOT_FOUND, - CURLE_READ_ERROR, - CURLE_OPERATION_TIMEOUTED, - CURLE_HTTP_POST_ERROR, - CURLE_SSL_CONNECT_ERROR, - ]; - - /** - * Executes a CURL request with optional retries and exception on failure - * - * @param resource|CurlHandle $ch curl handler - * @param int $retries - * @param bool $closeAfterDone - * @return bool|string @see curl_exec - */ - public static function execute($ch, int $retries = 5, bool $closeAfterDone = true) - { - while ($retries--) { - $curlResponse = curl_exec($ch); - if ($curlResponse === false) { - $curlErrno = curl_errno($ch); - - if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || !$retries) { - $curlError = curl_error($ch); - - if ($closeAfterDone) { - curl_close($ch); - } - - throw new \RuntimeException(sprintf('Curl error (code %d): %s', $curlErrno, $curlError)); - } - - continue; - } - - if ($closeAfterDone) { - curl_close($ch); - } - - return $curlResponse; - } - - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php deleted file mode 100644 index 9b85ae7..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Simple handler wrapper that deduplicates log records across multiple requests - * - * It also includes the BufferHandler functionality and will buffer - * all messages until the end of the request or flush() is called. - * - * This works by storing all log records' messages above $deduplicationLevel - * to the file specified by $deduplicationStore. When further logs come in at the end of the - * request (or when flush() is called), all those above $deduplicationLevel are checked - * against the existing stored logs. If they match and the timestamps in the stored log is - * not older than $time seconds, the new log record is discarded. If no log record is new, the - * whole data set is discarded. - * - * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers - * that send messages to people, to avoid spamming with the same message over and over in case of - * a major component failure like a database server being down which makes all requests fail in the - * same way. - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - */ -class DeduplicationHandler extends BufferHandler -{ - /** - * @var string - */ - protected $deduplicationStore; - - /** - * @var Level - */ - protected $deduplicationLevel; - - /** - * @var int - */ - protected $time; - - /** - * @var bool - */ - private $gc = false; - - /** - * @param HandlerInterface $handler Handler. - * @param string $deduplicationStore The file/path where the deduplication log should be kept - * @param string|int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes - * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param Level|LevelName|LogLevel::* $deduplicationLevel - */ - public function __construct(HandlerInterface $handler, ?string $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, int $time = 60, bool $bubble = true) - { - parent::__construct($handler, 0, Logger::DEBUG, $bubble, false); - - $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; - $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); - $this->time = $time; - } - - public function flush(): void - { - if ($this->bufferSize === 0) { - return; - } - - $passthru = null; - - foreach ($this->buffer as $record) { - if ($record['level'] >= $this->deduplicationLevel) { - $passthru = $passthru || !$this->isDuplicate($record); - if ($passthru) { - $this->appendRecord($record); - } - } - } - - // default of null is valid as well as if no record matches duplicationLevel we just pass through - if ($passthru === true || $passthru === null) { - $this->handler->handleBatch($this->buffer); - } - - $this->clear(); - - if ($this->gc) { - $this->collectLogs(); - } - } - - /** - * @phpstan-param Record $record - */ - private function isDuplicate(array $record): bool - { - if (!file_exists($this->deduplicationStore)) { - return false; - } - - $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - if (!is_array($store)) { - return false; - } - - $yesterday = time() - 86400; - $timestampValidity = $record['datetime']->getTimestamp() - $this->time; - $expectedMessage = preg_replace('{[\r\n].*}', '', $record['message']); - - for ($i = count($store) - 1; $i >= 0; $i--) { - list($timestamp, $level, $message) = explode(':', $store[$i], 3); - - if ($level === $record['level_name'] && $message === $expectedMessage && $timestamp > $timestampValidity) { - return true; - } - - if ($timestamp < $yesterday) { - $this->gc = true; - } - } - - return false; - } - - private function collectLogs(): void - { - if (!file_exists($this->deduplicationStore)) { - return; - } - - $handle = fopen($this->deduplicationStore, 'rw+'); - - if (!$handle) { - throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore); - } - - flock($handle, LOCK_EX); - $validLogs = []; - - $timestampValidity = time() - $this->time; - - while (!feof($handle)) { - $log = fgets($handle); - if ($log && substr($log, 0, 10) >= $timestampValidity) { - $validLogs[] = $log; - } - } - - ftruncate($handle, 0); - rewind($handle); - foreach ($validLogs as $log) { - fwrite($handle, $log); - } - - flock($handle, LOCK_UN); - fclose($handle); - - $this->gc = false; - } - - /** - * @phpstan-param Record $record - */ - private function appendRecord(array $record): void - { - file_put_contents($this->deduplicationStore, $record['datetime']->getTimestamp() . ':' . $record['level_name'] . ':' . preg_replace('{[\r\n].*}', '', $record['message']) . "\n", FILE_APPEND); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php deleted file mode 100644 index ebd52c3..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; -use Doctrine\CouchDB\CouchDBClient; - -/** - * CouchDB handler for Doctrine CouchDB ODM - * - * @author Markus Bachmann - */ -class DoctrineCouchDBHandler extends AbstractProcessingHandler -{ - /** @var CouchDBClient */ - private $client; - - public function __construct(CouchDBClient $client, $level = Logger::DEBUG, bool $bubble = true) - { - $this->client = $client; - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->client->postDocument($record['formatted']); - } - - protected function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php deleted file mode 100644 index 21840bf..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sdk; -use Aws\DynamoDb\DynamoDbClient; -use Monolog\Formatter\FormatterInterface; -use Aws\DynamoDb\Marshaler; -use Monolog\Formatter\ScalarFormatter; -use Monolog\Logger; - -/** - * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) - * - * @link https://github.com/aws/aws-sdk-php/ - * @author Andrew Lawson - */ -class DynamoDbHandler extends AbstractProcessingHandler -{ - public const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; - - /** - * @var DynamoDbClient - */ - protected $client; - - /** - * @var string - */ - protected $table; - - /** - * @var int - */ - protected $version; - - /** - * @var Marshaler - */ - protected $marshaler; - - public function __construct(DynamoDbClient $client, string $table, $level = Logger::DEBUG, bool $bubble = true) - { - /** @phpstan-ignore-next-line */ - if (defined('Aws\Sdk::VERSION') && version_compare(Sdk::VERSION, '3.0', '>=')) { - $this->version = 3; - $this->marshaler = new Marshaler; - } else { - $this->version = 2; - } - - $this->client = $client; - $this->table = $table; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $filtered = $this->filterEmptyFields($record['formatted']); - if ($this->version === 3) { - $formatted = $this->marshaler->marshalItem($filtered); - } else { - /** @phpstan-ignore-next-line */ - $formatted = $this->client->formatAttributes($filtered); - } - - $this->client->putItem([ - 'TableName' => $this->table, - 'Item' => $formatted, - ]); - } - - /** - * @param mixed[] $record - * @return mixed[] - */ - protected function filterEmptyFields(array $record): array - { - return array_filter($record, function ($value) { - return !empty($value) || false === $value || 0 === $value; - }); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ScalarFormatter(self::DATE_FORMAT); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php deleted file mode 100644 index fc92ca4..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Elastica\Document; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticaFormatter; -use Monolog\Logger; -use Elastica\Client; -use Elastica\Exception\ExceptionInterface; - -/** - * Elastic Search handler - * - * Usage example: - * - * $client = new \Elastica\Client(); - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', Types have been removed in Elastica 7 - * ); - * $handler = new ElasticaHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Jelle Vink - */ -class ElasticaHandler extends AbstractProcessingHandler -{ - /** - * @var Client - */ - protected $client; - - /** - * @var mixed[] Handler config options - */ - protected $options = []; - - /** - * @param Client $client Elastica Client object - * @param mixed[] $options Handler configuration - */ - public function __construct(Client $client, array $options = [], $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - [ - 'index' => 'monolog', // Elastic index name - 'type' => 'record', // Elastic document type - 'ignore_error' => false, // Suppress Elastica exceptions - ], - $options - ); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->bulkSend([$record['formatted']]); - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($formatter instanceof ElasticaFormatter) { - return parent::setFormatter($formatter); - } - - throw new \InvalidArgumentException('ElasticaHandler is only compatible with ElasticaFormatter'); - } - - /** - * @return mixed[] - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ElasticaFormatter($this->options['index'], $this->options['type']); - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * - * @param Document[] $documents - * - * @throws \RuntimeException - */ - protected function bulkSend(array $documents): void - { - try { - $this->client->addDocuments($documents); - } catch (ExceptionInterface $e) { - if (!$this->options['ignore_error']) { - throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php deleted file mode 100644 index e88375c..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php +++ /dev/null @@ -1,218 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Elastic\Elasticsearch\Response\Elasticsearch; -use Throwable; -use RuntimeException; -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticsearchFormatter; -use InvalidArgumentException; -use Elasticsearch\Common\Exceptions\RuntimeException as ElasticsearchRuntimeException; -use Elasticsearch\Client; -use Elastic\Elasticsearch\Exception\InvalidArgumentException as ElasticInvalidArgumentException; -use Elastic\Elasticsearch\Client as Client8; - -/** - * Elasticsearch handler - * - * @link https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html - * - * Simple usage example: - * - * $client = \Elasticsearch\ClientBuilder::create() - * ->setHosts($hosts) - * ->build(); - * - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', - * ); - * $handler = new ElasticsearchHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Avtandil Kikabidze - */ -class ElasticsearchHandler extends AbstractProcessingHandler -{ - /** - * @var Client|Client8 - */ - protected $client; - - /** - * @var mixed[] Handler config options - */ - protected $options = []; - - /** - * @var bool - */ - private $needsType; - - /** - * @param Client|Client8 $client Elasticsearch Client object - * @param mixed[] $options Handler configuration - */ - public function __construct($client, array $options = [], $level = Logger::DEBUG, bool $bubble = true) - { - if (!$client instanceof Client && !$client instanceof Client8) { - throw new \TypeError('Elasticsearch\Client or Elastic\Elasticsearch\Client instance required'); - } - - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - [ - 'index' => 'monolog', // Elastic index name - 'type' => '_doc', // Elastic document type - 'ignore_error' => false, // Suppress Elasticsearch exceptions - ], - $options - ); - - if ($client instanceof Client8 || $client::VERSION[0] === '7') { - $this->needsType = false; - // force the type to _doc for ES8/ES7 - $this->options['type'] = '_doc'; - } else { - $this->needsType = true; - } - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->bulkSend([$record['formatted']]); - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($formatter instanceof ElasticsearchFormatter) { - return parent::setFormatter($formatter); - } - - throw new InvalidArgumentException('ElasticsearchHandler is only compatible with ElasticsearchFormatter'); - } - - /** - * Getter options - * - * @return mixed[] - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ElasticsearchFormatter($this->options['index'], $this->options['type']); - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * - * @param array[] $records Records + _index/_type keys - * @throws \RuntimeException - */ - protected function bulkSend(array $records): void - { - try { - $params = [ - 'body' => [], - ]; - - foreach ($records as $record) { - $params['body'][] = [ - 'index' => $this->needsType ? [ - '_index' => $record['_index'], - '_type' => $record['_type'], - ] : [ - '_index' => $record['_index'], - ], - ]; - unset($record['_index'], $record['_type']); - - $params['body'][] = $record; - } - - /** @var Elasticsearch */ - $responses = $this->client->bulk($params); - - if ($responses['errors'] === true) { - throw $this->createExceptionFromResponses($responses); - } - } catch (Throwable $e) { - if (! $this->options['ignore_error']) { - throw new RuntimeException('Error sending messages to Elasticsearch', 0, $e); - } - } - } - - /** - * Creates elasticsearch exception from responses array - * - * Only the first error is converted into an exception. - * - * @param mixed[]|Elasticsearch $responses returned by $this->client->bulk() - */ - protected function createExceptionFromResponses($responses): Throwable - { - foreach ($responses['items'] ?? [] as $item) { - if (isset($item['index']['error'])) { - return $this->createExceptionFromError($item['index']['error']); - } - } - - if (class_exists(ElasticInvalidArgumentException::class)) { - return new ElasticInvalidArgumentException('Elasticsearch failed to index one or more records.'); - } - - return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.'); - } - - /** - * Creates elasticsearch exception from error array - * - * @param mixed[] $error - */ - protected function createExceptionFromError(array $error): Throwable - { - $previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null; - - if (class_exists(ElasticInvalidArgumentException::class)) { - return new ElasticInvalidArgumentException($error['type'] . ': ' . $error['reason'], 0, $previous); - } - - return new ElasticsearchRuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php deleted file mode 100644 index f2e2203..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Stores to PHP error_log() handler. - * - * @author Elan Ruusamäe - */ -class ErrorLogHandler extends AbstractProcessingHandler -{ - public const OPERATING_SYSTEM = 0; - public const SAPI = 4; - - /** @var int */ - protected $messageType; - /** @var bool */ - protected $expandNewlines; - - /** - * @param int $messageType Says where the error should go. - * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries - */ - public function __construct(int $messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, bool $bubble = true, bool $expandNewlines = false) - { - parent::__construct($level, $bubble); - - if (false === in_array($messageType, self::getAvailableTypes(), true)) { - $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); - - throw new \InvalidArgumentException($message); - } - - $this->messageType = $messageType; - $this->expandNewlines = $expandNewlines; - } - - /** - * @return int[] With all available types - */ - public static function getAvailableTypes(): array - { - return [ - self::OPERATING_SYSTEM, - self::SAPI, - ]; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!$this->expandNewlines) { - error_log((string) $record['formatted'], $this->messageType); - - return; - } - - $lines = preg_split('{[\r\n]+}', (string) $record['formatted']); - if ($lines === false) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Failed to preg_split formatted string: ' . $pcreErrorCode . ' / '. Utils::pcreLastErrorMessage($pcreErrorCode)); - } - foreach ($lines as $line) { - error_log($line, $this->messageType); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php deleted file mode 100644 index d4e234c..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Throwable; - -/** - * Forwards records to at most one handler - * - * If a handler fails, the exception is suppressed and the record is forwarded to the next handler. - * - * As soon as one handler handles a record successfully, the handling stops there. - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class FallbackGroupHandler extends GroupHandler -{ - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - foreach ($this->handlers as $handler) { - try { - $handler->handle($record); - break; - } catch (Throwable $e) { - // What throwable? - } - } - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if ($this->processors) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - /** @var Record[] $records */ - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch($records); - break; - } catch (Throwable $e) { - // What throwable? - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php deleted file mode 100644 index 718f17e..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; - -/** - * Simple handler wrapper that filters records based on a list of levels - * - * It can be configured with an exact list of levels to allow, or a min/max level. - * - * @author Hennadiy Verkh - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class FilterHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * Handler or factory callable($record, $this) - * - * @var callable|HandlerInterface - * @phpstan-var callable(?Record, HandlerInterface): HandlerInterface|HandlerInterface - */ - protected $handler; - - /** - * Minimum level for logs that are passed to handler - * - * @var int[] - * @phpstan-var array - */ - protected $acceptedLevels; - - /** - * Whether the messages that are handled can bubble up the stack or not - * - * @var bool - */ - protected $bubble; - - /** - * @psalm-param HandlerInterface|callable(?Record, HandlerInterface): HandlerInterface $handler - * - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $filterHandler). - * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided - * @param int|string $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param Level|LevelName|LogLevel::*|array $minLevelOrList - * @phpstan-param Level|LevelName|LogLevel::* $maxLevel - */ - public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, bool $bubble = true) - { - $this->handler = $handler; - $this->bubble = $bubble; - $this->setAcceptedLevels($minLevelOrList, $maxLevel); - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - /** - * @phpstan-return array - */ - public function getAcceptedLevels(): array - { - return array_flip($this->acceptedLevels); - } - - /** - * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided - * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array - * - * @phpstan-param Level|LevelName|LogLevel::*|array $minLevelOrList - * @phpstan-param Level|LevelName|LogLevel::* $maxLevel - */ - public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY): self - { - if (is_array($minLevelOrList)) { - $acceptedLevels = array_map('Monolog\Logger::toMonologLevel', $minLevelOrList); - } else { - $minLevelOrList = Logger::toMonologLevel($minLevelOrList); - $maxLevel = Logger::toMonologLevel($maxLevel); - $acceptedLevels = array_values(array_filter(Logger::getLevels(), function ($level) use ($minLevelOrList, $maxLevel) { - return $level >= $minLevelOrList && $level <= $maxLevel; - })); - } - $this->acceptedLevels = array_flip($acceptedLevels); - - return $this; - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return isset($this->acceptedLevels[$record['level']]); - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $this->getHandler($record)->handle($record); - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $filtered = []; - foreach ($records as $record) { - if ($this->isHandling($record)) { - $filtered[] = $record; - } - } - - if (count($filtered) > 0) { - $this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered); - } - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @return HandlerInterface - * - * @phpstan-param Record $record - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = ($this->handler)($record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - public function reset() - { - $this->resetProcessors(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php deleted file mode 100644 index 0aa5607..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -/** - * Interface for activation strategies for the FingersCrossedHandler. - * - * @author Johannes M. Schmitt - * - * @phpstan-import-type Record from \Monolog\Logger - */ -interface ActivationStrategyInterface -{ - /** - * Returns whether the given record activates the handler. - * - * @phpstan-param Record $record - */ - public function isHandlerActivated(array $record): bool; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php deleted file mode 100644 index 7b9abb5..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Channel and Error level based monolog activation strategy. Allows to trigger activation - * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except - * for records of the 'sql' channel; those should trigger activation on level 'WARN'. - * - * Example: - * - * - * $activationStrategy = new ChannelLevelActivationStrategy( - * Logger::CRITICAL, - * array( - * 'request' => Logger::ALERT, - * 'sensitive' => Logger::ERROR, - * ) - * ); - * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); - * - * - * @author Mike Meessen - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class ChannelLevelActivationStrategy implements ActivationStrategyInterface -{ - /** - * @var Level - */ - private $defaultActionLevel; - - /** - * @var array - */ - private $channelToActionLevel; - - /** - * @param int|string $defaultActionLevel The default action level to be used if the record's category doesn't match any - * @param array $channelToActionLevel An array that maps channel names to action levels. - * - * @phpstan-param array $channelToActionLevel - * @phpstan-param Level|LevelName|LogLevel::* $defaultActionLevel - */ - public function __construct($defaultActionLevel, array $channelToActionLevel = []) - { - $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); - $this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel); - } - - /** - * @phpstan-param Record $record - */ - public function isHandlerActivated(array $record): bool - { - if (isset($this->channelToActionLevel[$record['channel']])) { - return $record['level'] >= $this->channelToActionLevel[$record['channel']]; - } - - return $record['level'] >= $this->defaultActionLevel; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php deleted file mode 100644 index 5ec88ea..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Error level based activation strategy. - * - * @author Johannes M. Schmitt - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class ErrorLevelActivationStrategy implements ActivationStrategyInterface -{ - /** - * @var Level - */ - private $actionLevel; - - /** - * @param int|string $actionLevel Level or name or value - * - * @phpstan-param Level|LevelName|LogLevel::* $actionLevel - */ - public function __construct($actionLevel) - { - $this->actionLevel = Logger::toMonologLevel($actionLevel); - } - - public function isHandlerActivated(array $record): bool - { - return $record['level'] >= $this->actionLevel; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php deleted file mode 100644 index 0627b44..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ /dev/null @@ -1,252 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; -use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; - -/** - * Buffers all records until a certain level is reached - * - * The advantage of this approach is that you don't get any clutter in your log files. - * Only requests which actually trigger an error (or whatever your actionLevel is) will be - * in the logs, but they will contain all records, not only those above the level threshold. - * - * You can then have a passthruLevel as well which means that at the end of the request, - * even if it did not get activated, it will still send through log records of e.g. at least a - * warning level. - * - * You can find the various activation strategies in the - * Monolog\Handler\FingersCrossed\ namespace. - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class FingersCrossedHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * @var callable|HandlerInterface - * @phpstan-var callable(?Record, HandlerInterface): HandlerInterface|HandlerInterface - */ - protected $handler; - /** @var ActivationStrategyInterface */ - protected $activationStrategy; - /** @var bool */ - protected $buffering = true; - /** @var int */ - protected $bufferSize; - /** @var Record[] */ - protected $buffer = []; - /** @var bool */ - protected $stopBuffering; - /** - * @var ?int - * @phpstan-var ?Level - */ - protected $passthruLevel; - /** @var bool */ - protected $bubble; - - /** - * @psalm-param HandlerInterface|callable(?Record, HandlerInterface): HandlerInterface $handler - * - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $fingersCrossedHandler). - * @param int|string|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated - * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) - * @param int|string $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered - * - * @phpstan-param Level|LevelName|LogLevel::* $passthruLevel - * @phpstan-param Level|LevelName|LogLevel::*|ActivationStrategyInterface $activationStrategy - */ - public function __construct($handler, $activationStrategy = null, int $bufferSize = 0, bool $bubble = true, bool $stopBuffering = true, $passthruLevel = null) - { - if (null === $activationStrategy) { - $activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING); - } - - // convert simple int activationStrategy to an object - if (!$activationStrategy instanceof ActivationStrategyInterface) { - $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); - } - - $this->handler = $handler; - $this->activationStrategy = $activationStrategy; - $this->bufferSize = $bufferSize; - $this->bubble = $bubble; - $this->stopBuffering = $stopBuffering; - - if ($passthruLevel !== null) { - $this->passthruLevel = Logger::toMonologLevel($passthruLevel); - } - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return true; - } - - /** - * Manually activate this logger regardless of the activation strategy - */ - public function activate(): void - { - if ($this->stopBuffering) { - $this->buffering = false; - } - - $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); - $this->buffer = []; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - if ($this->buffering) { - $this->buffer[] = $record; - if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { - array_shift($this->buffer); - } - if ($this->activationStrategy->isHandlerActivated($record)) { - $this->activate(); - } - } else { - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - $this->flushBuffer(); - - $this->getHandler()->close(); - } - - public function reset() - { - $this->flushBuffer(); - - $this->resetProcessors(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - * - * It also resets the handler to its initial buffering state. - */ - public function clear(): void - { - $this->buffer = []; - $this->reset(); - } - - /** - * Resets the state of the handler. Stops forwarding records to the wrapped handler. - */ - private function flushBuffer(): void - { - if (null !== $this->passthruLevel) { - $level = $this->passthruLevel; - $this->buffer = array_filter($this->buffer, function ($record) use ($level) { - return $record['level'] >= $level; - }); - if (count($this->buffer) > 0) { - $this->getHandler(end($this->buffer))->handleBatch($this->buffer); - } - } - - $this->buffer = []; - $this->buffering = true; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @return HandlerInterface - * - * @phpstan-param Record $record - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = ($this->handler)($record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php deleted file mode 100644 index 72718de..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\WildfireFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. - * - * @author Eric Clemmons (@ericclemmons) - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class FirePHPHandler extends AbstractProcessingHandler -{ - use WebRequestRecognizerTrait; - - /** - * WildFire JSON header message format - */ - protected const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; - - /** - * FirePHP structure for parsing messages & their presentation - */ - protected const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; - - /** - * Must reference a "known" plugin, otherwise headers won't display in FirePHP - */ - protected const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; - - /** - * Header prefix for Wildfire to recognize & parse headers - */ - protected const HEADER_PREFIX = 'X-Wf'; - - /** - * Whether or not Wildfire vendor-specific headers have been generated & sent yet - * @var bool - */ - protected static $initialized = false; - - /** - * Shared static message index between potentially multiple handlers - * @var int - */ - protected static $messageIndex = 1; - - /** @var bool */ - protected static $sendHeaders = true; - - /** - * Base header creation function used by init headers & record headers - * - * @param array $meta Wildfire Plugin, Protocol & Structure Indexes - * @param string $message Log message - * - * @return array Complete header string ready for the client as key and message as value - * - * @phpstan-return non-empty-array - */ - protected function createHeader(array $meta, string $message): array - { - $header = sprintf('%s-%s', static::HEADER_PREFIX, join('-', $meta)); - - return [$header => $message]; - } - - /** - * Creates message header from record - * - * @return array - * - * @phpstan-return non-empty-array - * - * @see createHeader() - * - * @phpstan-param FormattedRecord $record - */ - protected function createRecordHeader(array $record): array - { - // Wildfire is extensible to support multiple protocols & plugins in a single request, - // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. - return $this->createHeader( - [1, 1, 1, self::$messageIndex++], - $record['formatted'] - ); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new WildfireFormatter(); - } - - /** - * Wildfire initialization headers to enable message parsing - * - * @see createHeader() - * @see sendHeader() - * - * @return array - */ - protected function getInitHeaders(): array - { - // Initial payload consists of required headers for Wildfire - return array_merge( - $this->createHeader(['Protocol', 1], static::PROTOCOL_URI), - $this->createHeader([1, 'Structure', 1], static::STRUCTURE_URI), - $this->createHeader([1, 'Plugin', 1], static::PLUGIN_URI) - ); - } - - /** - * Send header string to the client - */ - protected function sendHeader(string $header, string $content): void - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Creates & sends header for a record, ensuring init headers have been sent prior - * - * @see sendHeader() - * @see sendInitHeaders() - */ - protected function write(array $record): void - { - if (!self::$sendHeaders || !$this->isWebRequest()) { - return; - } - - // WildFire-specific headers must be sent prior to any messages - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - foreach ($this->getInitHeaders() as $header => $content) { - $this->sendHeader($header, $content); - } - } - - $header = $this->createRecordHeader($record); - if (trim(current($header)) !== '') { - $this->sendHeader(key($header), current($header)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - */ - protected function headersAccepted(): bool - { - if (!empty($_SERVER['HTTP_USER_AGENT']) && preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { - return true; - } - - return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php deleted file mode 100644 index 85c95b9..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; - -/** - * Sends logs to Fleep.io using Webhook integrations - * - * You'll need a Fleep.io account to use this handler. - * - * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation - * @author Ando Roots - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class FleepHookHandler extends SocketHandler -{ - protected const FLEEP_HOST = 'fleep.io'; - - protected const FLEEP_HOOK_URI = '/hook/'; - - /** - * @var string Webhook token (specifies the conversation where logs are sent) - */ - protected $token; - - /** - * Construct a new Fleep.io Handler. - * - * For instructions on how to create a new web hook in your conversations - * see https://fleep.io/integrations/webhooks/ - * - * @param string $token Webhook token - * @throws MissingExtensionException - */ - public function __construct( - string $token, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); - } - - $this->token = $token; - - $connectionString = 'ssl://' . static::FLEEP_HOST . ':443'; - parent::__construct( - $connectionString, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - } - - /** - * Returns the default formatter to use with this handler - * - * Overloaded to remove empty context and extra arrays from the end of the log message. - * - * @return LineFormatter - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(null, null, true, true); - } - - /** - * Handles a log record - */ - public function write(array $record): void - { - parent::write($record); - $this->closeSocket(); - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST " . static::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; - $header .= "Host: " . static::FLEEP_HOST . "\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * Builds the body of API call - * - * @phpstan-param FormattedRecord $record - */ - private function buildContent(array $record): string - { - $dataArray = [ - 'message' => $record['formatted'], - ]; - - return http_build_query($dataArray); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php deleted file mode 100644 index 5715d58..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\FlowdockFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Sends notifications through the Flowdock push API - * - * This must be configured with a FlowdockFormatter instance via setFormatter() - * - * Notes: - * API token - Flowdock API token - * - * @author Dominik Liebler - * @see https://www.flowdock.com/api/push - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 - */ -class FlowdockHandler extends SocketHandler -{ - /** - * @var string - */ - protected $apiToken; - - /** - * @throws MissingExtensionException if OpenSSL is missing - */ - public function __construct( - string $apiToken, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); - } - - parent::__construct( - 'ssl://api.flowdock.com:443', - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->apiToken = $apiToken; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if (!$formatter instanceof FlowdockFormatter) { - throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - return parent::setFormatter($formatter); - } - - /** - * Gets the default formatter. - */ - protected function getDefaultFormatter(): FormatterInterface - { - throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - parent::write($record); - - $this->closeSocket(); - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - * - * @phpstan-param FormattedRecord $record - */ - private function buildContent(array $record): string - { - return Utils::jsonEncode($record['formatted']['flowdock']); - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; - $header .= "Host: api.flowdock.com\r\n"; - $header .= "Content-Type: application/json\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php deleted file mode 100644 index fc1693c..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Interface to describe loggers that have a formatter - * - * @author Jordi Boggiano - */ -interface FormattableHandlerInterface -{ - /** - * Sets the formatter. - * - * @param FormatterInterface $formatter - * @return HandlerInterface self - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface; - - /** - * Gets the formatter. - * - * @return FormatterInterface - */ - public function getFormatter(): FormatterInterface; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php deleted file mode 100644 index b60bdce..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Helper trait for implementing FormattableInterface - * - * @author Jordi Boggiano - */ -trait FormattableHandlerTrait -{ - /** - * @var ?FormatterInterface - */ - protected $formatter; - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - if (!$this->formatter) { - $this->formatter = $this->getDefaultFormatter(); - } - - return $this->formatter; - } - - /** - * Gets the default formatter. - * - * Overwrite this if the LineFormatter is not a good default for your handler. - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php deleted file mode 100644 index 4ff26c4..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\PublisherInterface; -use Monolog\Logger; -use Monolog\Formatter\GelfMessageFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Handler to send messages to a Graylog2 (http://www.graylog2.org) server - * - * @author Matt Lehner - * @author Benjamin Zikarsky - */ -class GelfHandler extends AbstractProcessingHandler -{ - /** - * @var PublisherInterface the publisher object that sends the message to the server - */ - protected $publisher; - - /** - * @param PublisherInterface $publisher a gelf publisher object - */ - public function __construct(PublisherInterface $publisher, $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->publisher = $publisher; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->publisher->publish($record['formatted']); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new GelfMessageFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php deleted file mode 100644 index 3c9dc4b..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\ResettableInterface; - -/** - * Forwards records to multiple handlers - * - * @author Lenar Lõhmus - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class GroupHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface -{ - use ProcessableHandlerTrait; - - /** @var HandlerInterface[] */ - protected $handlers; - /** @var bool */ - protected $bubble; - - /** - * @param HandlerInterface[] $handlers Array of Handlers. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(array $handlers, bool $bubble = true) - { - foreach ($handlers as $handler) { - if (!$handler instanceof HandlerInterface) { - throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); - } - } - - $this->handlers = $handlers; - $this->bubble = $bubble; - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - foreach ($this->handlers as $handler) { - $handler->handle($record); - } - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if ($this->processors) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - /** @var Record[] $records */ - $records = $processed; - } - - foreach ($this->handlers as $handler) { - $handler->handleBatch($records); - } - } - - public function reset() - { - $this->resetProcessors(); - - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - } - - public function close(): void - { - parent::close(); - - foreach ($this->handlers as $handler) { - $handler->close(); - } - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - foreach ($this->handlers as $handler) { - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - } - } - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Handler.php b/vendor/monolog/monolog/src/Monolog/Handler/Handler.php deleted file mode 100644 index 34b4935..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Handler.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Base Handler class providing basic close() support as well as handleBatch - * - * @author Jordi Boggiano - */ -abstract class Handler implements HandlerInterface -{ - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - foreach ($records as $record) { - $this->handle($record); - } - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - } - - public function __destruct() - { - try { - $this->close(); - } catch (\Throwable $e) { - // do nothing - } - } - - public function __sleep() - { - $this->close(); - - $reflClass = new \ReflectionClass($this); - - $keys = []; - foreach ($reflClass->getProperties() as $reflProp) { - if (!$reflProp->isStatic()) { - $keys[] = $reflProp->getName(); - } - } - - return $keys; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php deleted file mode 100644 index affcc51..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Interface that all Monolog Handlers must implement - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - */ -interface HandlerInterface -{ - /** - * Checks whether the given record will be handled by this handler. - * - * This is mostly done for performance reasons, to avoid calling processors for nothing. - * - * Handlers should still check the record levels within handle(), returning false in isHandling() - * is no guarantee that handle() will not be called, and isHandling() might not be called - * for a given record. - * - * @param array $record Partial log record containing only a level key - * - * @return bool - * - * @phpstan-param array{level: Level} $record - */ - public function isHandling(array $record): bool; - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * @param array $record The record to handle - * @return bool true means that this handler handled the record, and that bubbling is not permitted. - * false means the record was either not processed or that this handler allows bubbling. - * - * @phpstan-param Record $record - */ - public function handle(array $record): bool; - - /** - * Handles a set of records at once. - * - * @param array $records The records to handle (an array of record arrays) - * - * @phpstan-param Record[] $records - */ - public function handleBatch(array $records): void; - - /** - * Closes the handler. - * - * Ends a log cycle and frees all resources used by the handler. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * - * Implementations have to be idempotent (i.e. it should be possible to call close several times without breakage) - * and ideally handlers should be able to reopen themselves on handle() after they have been closed. - * - * This is useful at the end of a request and will be called automatically when the object - * is destroyed if you extend Monolog\Handler\Handler. - * - * If you are thinking of calling this method yourself, most likely you should be - * calling ResettableInterface::reset instead. Have a look. - */ - public function close(): void; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php deleted file mode 100644 index d4351b9..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * This simple wrapper class can be used to extend handlers functionality. - * - * Example: A custom filtering that can be applied to any handler. - * - * Inherit from this class and override handle() like this: - * - * public function handle(array $record) - * { - * if ($record meets certain conditions) { - * return false; - * } - * return $this->handler->handle($record); - * } - * - * @author Alexey Karapetov - */ -class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, FormattableHandlerInterface, ResettableInterface -{ - /** - * @var HandlerInterface - */ - protected $handler; - - public function __construct(HandlerInterface $handler) - { - $this->handler = $handler; - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return $this->handler->isHandling($record); - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - return $this->handler->handle($record); - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $this->handler->handleBatch($records); - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - $this->handler->close(); - } - - /** - * {@inheritDoc} - */ - public function pushProcessor(callable $callback): HandlerInterface - { - if ($this->handler instanceof ProcessableHandlerInterface) { - $this->handler->pushProcessor($callback); - - return $this; - } - - throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); - } - - /** - * {@inheritDoc} - */ - public function popProcessor(): callable - { - if ($this->handler instanceof ProcessableHandlerInterface) { - return $this->handler->popProcessor(); - } - - throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); - } - - public function reset() - { - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php deleted file mode 100644 index 000ccea..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * IFTTTHandler uses cURL to trigger IFTTT Maker actions - * - * Register a secret key and trigger/event name at https://ifttt.com/maker - * - * value1 will be the channel from monolog's Logger constructor, - * value2 will be the level name (ERROR, WARNING, ..) - * value3 will be the log record's message - * - * @author Nehal Patel - */ -class IFTTTHandler extends AbstractProcessingHandler -{ - /** @var string */ - private $eventName; - /** @var string */ - private $secretKey; - - /** - * @param string $eventName The name of the IFTTT Maker event that should be triggered - * @param string $secretKey A valid IFTTT secret key - */ - public function __construct(string $eventName, string $secretKey, $level = Logger::ERROR, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the IFTTTHandler'); - } - - $this->eventName = $eventName; - $this->secretKey = $secretKey; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - public function write(array $record): void - { - $postData = [ - "value1" => $record["channel"], - "value2" => $record["level_name"], - "value3" => $record["message"], - ]; - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); - curl_setopt($ch, CURLOPT_HTTPHEADER, [ - "Content-Type: application/json", - ]); - - Curl\Util::execute($ch); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php deleted file mode 100644 index 71f64a2..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Inspired on LogEntriesHandler. - * - * @author Robert Kaufmann III - * @author Gabriel Machado - */ -class InsightOpsHandler extends SocketHandler -{ - /** - * @var string - */ - protected $logToken; - - /** - * @param string $token Log token supplied by InsightOps - * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'. - * @param bool $useSSL Whether or not SSL encryption should be used - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - string $region = 'us', - bool $useSSL = true, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for InsightOpsHandler'); - } - - $endpoint = $useSSL - ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443' - : $region . '.data.logs.insight.rapid7.com:80'; - - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->logToken = $token; - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - return $this->logToken . ' ' . $record['formatted']; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php deleted file mode 100644 index 25fcd15..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * @author Robert Kaufmann III - */ -class LogEntriesHandler extends SocketHandler -{ - /** - * @var string - */ - protected $logToken; - - /** - * @param string $token Log token supplied by LogEntries - * @param bool $useSSL Whether or not SSL encryption should be used. - * @param string $host Custom hostname to send the data to if needed - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - bool $useSSL = true, - $level = Logger::DEBUG, - bool $bubble = true, - string $host = 'data.logentries.com', - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); - } - - $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->logToken = $token; - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - return $this->logToken . ' ' . $record['formatted']; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php deleted file mode 100644 index 6d13db3..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LogglyFormatter; -use function array_key_exists; -use CurlHandle; - -/** - * Sends errors to Loggly. - * - * @author Przemek Sobstel - * @author Adam Pancutt - * @author Gregory Barchard - */ -class LogglyHandler extends AbstractProcessingHandler -{ - protected const HOST = 'logs-01.loggly.com'; - protected const ENDPOINT_SINGLE = 'inputs'; - protected const ENDPOINT_BATCH = 'bulk'; - - /** - * Caches the curl handlers for every given endpoint. - * - * @var resource[]|CurlHandle[] - */ - protected $curlHandlers = []; - - /** @var string */ - protected $token; - - /** @var string[] */ - protected $tag = []; - - /** - * @param string $token API token supplied by Loggly - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct(string $token, $level = Logger::DEBUG, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the LogglyHandler'); - } - - $this->token = $token; - - parent::__construct($level, $bubble); - } - - /** - * Loads and returns the shared curl handler for the given endpoint. - * - * @param string $endpoint - * - * @return resource|CurlHandle - */ - protected function getCurlHandler(string $endpoint) - { - if (!array_key_exists($endpoint, $this->curlHandlers)) { - $this->curlHandlers[$endpoint] = $this->loadCurlHandle($endpoint); - } - - return $this->curlHandlers[$endpoint]; - } - - /** - * Starts a fresh curl session for the given endpoint and returns its handler. - * - * @param string $endpoint - * - * @return resource|CurlHandle - */ - private function loadCurlHandle(string $endpoint) - { - $url = sprintf("https://%s/%s/%s/", static::HOST, $endpoint, $this->token); - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - return $ch; - } - - /** - * @param string[]|string $tag - */ - public function setTag($tag): self - { - $tag = !empty($tag) ? $tag : []; - $this->tag = is_array($tag) ? $tag : [$tag]; - - return $this; - } - - /** - * @param string[]|string $tag - */ - public function addTag($tag): self - { - if (!empty($tag)) { - $tag = is_array($tag) ? $tag : [$tag]; - $this->tag = array_unique(array_merge($this->tag, $tag)); - } - - return $this; - } - - protected function write(array $record): void - { - $this->send($record["formatted"], static::ENDPOINT_SINGLE); - } - - public function handleBatch(array $records): void - { - $level = $this->level; - - $records = array_filter($records, function ($record) use ($level) { - return ($record['level'] >= $level); - }); - - if ($records) { - $this->send($this->getFormatter()->formatBatch($records), static::ENDPOINT_BATCH); - } - } - - protected function send(string $data, string $endpoint): void - { - $ch = $this->getCurlHandler($endpoint); - - $headers = ['Content-Type: application/json']; - - if (!empty($this->tag)) { - $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); - } - - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - - Curl\Util::execute($ch, 5, false); - } - - protected function getDefaultFormatter(): FormatterInterface - { - return new LogglyFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php deleted file mode 100644 index 859a469..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LogmaticFormatter; - -/** - * @author Julien Breux - */ -class LogmaticHandler extends SocketHandler -{ - /** - * @var string - */ - private $logToken; - - /** - * @var string - */ - private $hostname; - - /** - * @var string - */ - private $appname; - - /** - * @param string $token Log token supplied by Logmatic. - * @param string $hostname Host name supplied by Logmatic. - * @param string $appname Application name supplied by Logmatic. - * @param bool $useSSL Whether or not SSL encryption should be used. - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - string $hostname = '', - string $appname = '', - bool $useSSL = true, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use SSL encrypted connection for LogmaticHandler'); - } - - $endpoint = $useSSL ? 'ssl://api.logmatic.io:10515' : 'api.logmatic.io:10514'; - $endpoint .= '/v1/'; - - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->logToken = $token; - $this->hostname = $hostname; - $this->appname = $appname; - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - return $this->logToken . ' ' . $record['formatted']; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - $formatter = new LogmaticFormatter(); - - if (!empty($this->hostname)) { - $formatter->setHostname($this->hostname); - } - if (!empty($this->appname)) { - $formatter->setAppname($this->appname); - } - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php deleted file mode 100644 index 97f3432..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\HtmlFormatter; - -/** - * Base class for all mail handlers - * - * @author Gyula Sallai - * - * @phpstan-import-type Record from \Monolog\Logger - */ -abstract class MailHandler extends AbstractProcessingHandler -{ - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $messages = []; - - foreach ($records as $record) { - if ($record['level'] < $this->level) { - continue; - } - /** @var Record $message */ - $message = $this->processRecord($record); - $messages[] = $message; - } - - if (!empty($messages)) { - $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); - } - } - - /** - * Send a mail with the given content - * - * @param string $content formatted email body to be sent - * @param array $records the array of log records that formed this content - * - * @phpstan-param Record[] $records - */ - abstract protected function send(string $content, array $records): void; - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->send((string) $record['formatted'], [$record]); - } - - /** - * @phpstan-param non-empty-array $records - * @phpstan-return Record - */ - protected function getHighestRecord(array $records): array - { - $highestRecord = null; - foreach ($records as $record) { - if ($highestRecord === null || $highestRecord['level'] < $record['level']) { - $highestRecord = $record; - } - } - - return $highestRecord; - } - - protected function isHtmlBody(string $body): bool - { - return ($body[0] ?? null) === '<'; - } - - /** - * Gets the default formatter. - * - * @return FormatterInterface - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new HtmlFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php deleted file mode 100644 index 3003500..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Swift; -use Swift_Message; - -/** - * MandrillHandler uses cURL to send the emails to the Mandrill API - * - * @author Adam Nicholson - */ -class MandrillHandler extends MailHandler -{ - /** @var Swift_Message */ - protected $message; - /** @var string */ - protected $apiKey; - - /** - * @psalm-param Swift_Message|callable(): Swift_Message $message - * - * @param string $apiKey A valid Mandrill API key - * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced - */ - public function __construct(string $apiKey, $message, $level = Logger::ERROR, bool $bubble = true) - { - parent::__construct($level, $bubble); - - if (!$message instanceof Swift_Message && is_callable($message)) { - $message = $message(); - } - if (!$message instanceof Swift_Message) { - throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); - } - $this->message = $message; - $this->apiKey = $apiKey; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $mime = 'text/plain'; - if ($this->isHtmlBody($content)) { - $mime = 'text/html'; - } - - $message = clone $this->message; - $message->setBody($content, $mime); - /** @phpstan-ignore-next-line */ - if (version_compare(Swift::VERSION, '6.0.0', '>=')) { - $message->setDate(new \DateTimeImmutable()); - } else { - /** @phpstan-ignore-next-line */ - $message->setDate(time()); - } - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ - 'key' => $this->apiKey, - 'raw_message' => (string) $message, - 'async' => false, - ])); - - Curl\Util::execute($ch); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php deleted file mode 100644 index 3965aee..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Exception can be thrown if an extension for a handler is missing - * - * @author Christian Bergau - */ -class MissingExtensionException extends \Exception -{ -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php deleted file mode 100644 index 3063091..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use MongoDB\Driver\BulkWrite; -use MongoDB\Driver\Manager; -use MongoDB\Client; -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\MongoDBFormatter; - -/** - * Logs to a MongoDB database. - * - * Usage example: - * - * $log = new \Monolog\Logger('application'); - * $client = new \MongoDB\Client('mongodb://localhost:27017'); - * $mongodb = new \Monolog\Handler\MongoDBHandler($client, 'logs', 'prod'); - * $log->pushHandler($mongodb); - * - * The above examples uses the MongoDB PHP library's client class; however, the - * MongoDB\Driver\Manager class from ext-mongodb is also supported. - */ -class MongoDBHandler extends AbstractProcessingHandler -{ - /** @var \MongoDB\Collection */ - private $collection; - /** @var Client|Manager */ - private $manager; - /** @var string */ - private $namespace; - - /** - * Constructor. - * - * @param Client|Manager $mongodb MongoDB library or driver client - * @param string $database Database name - * @param string $collection Collection name - */ - public function __construct($mongodb, string $database, string $collection, $level = Logger::DEBUG, bool $bubble = true) - { - if (!($mongodb instanceof Client || $mongodb instanceof Manager)) { - throw new \InvalidArgumentException('MongoDB\Client or MongoDB\Driver\Manager instance required'); - } - - if ($mongodb instanceof Client) { - $this->collection = $mongodb->selectCollection($database, $collection); - } else { - $this->manager = $mongodb; - $this->namespace = $database . '.' . $collection; - } - - parent::__construct($level, $bubble); - } - - protected function write(array $record): void - { - if (isset($this->collection)) { - $this->collection->insertOne($record['formatted']); - } - - if (isset($this->manager, $this->namespace)) { - $bulk = new BulkWrite; - $bulk->insert($record["formatted"]); - $this->manager->executeBulkWrite($this->namespace, $bulk); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new MongoDBFormatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php deleted file mode 100644 index 0c0a3bd..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -/** - * NativeMailerHandler uses the mail() function to send the emails - * - * @author Christophe Coevoet - * @author Mark Garrett - */ -class NativeMailerHandler extends MailHandler -{ - /** - * The email addresses to which the message will be sent - * @var string[] - */ - protected $to; - - /** - * The subject of the email - * @var string - */ - protected $subject; - - /** - * Optional headers for the message - * @var string[] - */ - protected $headers = []; - - /** - * Optional parameters for the message - * @var string[] - */ - protected $parameters = []; - - /** - * The wordwrap length for the message - * @var int - */ - protected $maxColumnWidth; - - /** - * The Content-type for the message - * @var string|null - */ - protected $contentType; - - /** - * The encoding for the message - * @var string - */ - protected $encoding = 'utf-8'; - - /** - * @param string|string[] $to The receiver of the mail - * @param string $subject The subject of the mail - * @param string $from The sender of the mail - * @param int $maxColumnWidth The maximum column width that the message lines will have - */ - public function __construct($to, string $subject, string $from, $level = Logger::ERROR, bool $bubble = true, int $maxColumnWidth = 70) - { - parent::__construct($level, $bubble); - $this->to = (array) $to; - $this->subject = $subject; - $this->addHeader(sprintf('From: %s', $from)); - $this->maxColumnWidth = $maxColumnWidth; - } - - /** - * Add headers to the message - * - * @param string|string[] $headers Custom added headers - */ - public function addHeader($headers): self - { - foreach ((array) $headers as $header) { - if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { - throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); - } - $this->headers[] = $header; - } - - return $this; - } - - /** - * Add parameters to the message - * - * @param string|string[] $parameters Custom added parameters - */ - public function addParameter($parameters): self - { - $this->parameters = array_merge($this->parameters, (array) $parameters); - - return $this; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $contentType = $this->getContentType() ?: ($this->isHtmlBody($content) ? 'text/html' : 'text/plain'); - - if ($contentType !== 'text/html') { - $content = wordwrap($content, $this->maxColumnWidth); - } - - $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); - $headers .= 'Content-type: ' . $contentType . '; charset=' . $this->getEncoding() . "\r\n"; - if ($contentType === 'text/html' && false === strpos($headers, 'MIME-Version:')) { - $headers .= 'MIME-Version: 1.0' . "\r\n"; - } - - $subject = $this->subject; - if ($records) { - $subjectFormatter = new LineFormatter($this->subject); - $subject = $subjectFormatter->format($this->getHighestRecord($records)); - } - - $parameters = implode(' ', $this->parameters); - foreach ($this->to as $to) { - mail($to, $subject, $content, $headers, $parameters); - } - } - - public function getContentType(): ?string - { - return $this->contentType; - } - - public function getEncoding(): string - { - return $this->encoding; - } - - /** - * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML messages. - */ - public function setContentType(string $contentType): self - { - if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { - throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); - } - - $this->contentType = $contentType; - - return $this; - } - - public function setEncoding(string $encoding): self - { - if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { - throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); - } - - $this->encoding = $encoding; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php deleted file mode 100644 index 114d749..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +++ /dev/null @@ -1,199 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Class to record a log on a NewRelic application. - * Enabling New Relic High Security mode may prevent capture of useful information. - * - * This handler requires a NormalizerFormatter to function and expects an array in $record['formatted'] - * - * @see https://docs.newrelic.com/docs/agents/php-agent - * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security - */ -class NewRelicHandler extends AbstractProcessingHandler -{ - /** - * Name of the New Relic application that will receive logs from this handler. - * - * @var ?string - */ - protected $appName; - - /** - * Name of the current transaction - * - * @var ?string - */ - protected $transactionName; - - /** - * Some context and extra data is passed into the handler as arrays of values. Do we send them as is - * (useful if we are using the API), or explode them for display on the NewRelic RPM website? - * - * @var bool - */ - protected $explodeArrays; - - /** - * {@inheritDoc} - * - * @param string|null $appName - * @param bool $explodeArrays - * @param string|null $transactionName - */ - public function __construct( - $level = Logger::ERROR, - bool $bubble = true, - ?string $appName = null, - bool $explodeArrays = false, - ?string $transactionName = null - ) { - parent::__construct($level, $bubble); - - $this->appName = $appName; - $this->explodeArrays = $explodeArrays; - $this->transactionName = $transactionName; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!$this->isNewRelicEnabled()) { - throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); - } - - if ($appName = $this->getAppName($record['context'])) { - $this->setNewRelicAppName($appName); - } - - if ($transactionName = $this->getTransactionName($record['context'])) { - $this->setNewRelicTransactionName($transactionName); - unset($record['formatted']['context']['transaction_name']); - } - - if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) { - newrelic_notice_error($record['message'], $record['context']['exception']); - unset($record['formatted']['context']['exception']); - } else { - newrelic_notice_error($record['message']); - } - - if (isset($record['formatted']['context']) && is_array($record['formatted']['context'])) { - foreach ($record['formatted']['context'] as $key => $parameter) { - if (is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('context_' . $key, $parameter); - } - } - } - - if (isset($record['formatted']['extra']) && is_array($record['formatted']['extra'])) { - foreach ($record['formatted']['extra'] as $key => $parameter) { - if (is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('extra_' . $key, $parameter); - } - } - } - } - - /** - * Checks whether the NewRelic extension is enabled in the system. - * - * @return bool - */ - protected function isNewRelicEnabled(): bool - { - return extension_loaded('newrelic'); - } - - /** - * Returns the appname where this log should be sent. Each log can override the default appname, set in this - * handler's constructor, by providing the appname in it's context. - * - * @param mixed[] $context - */ - protected function getAppName(array $context): ?string - { - if (isset($context['appname'])) { - return $context['appname']; - } - - return $this->appName; - } - - /** - * Returns the name of the current transaction. Each log can override the default transaction name, set in this - * handler's constructor, by providing the transaction_name in it's context - * - * @param mixed[] $context - */ - protected function getTransactionName(array $context): ?string - { - if (isset($context['transaction_name'])) { - return $context['transaction_name']; - } - - return $this->transactionName; - } - - /** - * Sets the NewRelic application that should receive this log. - */ - protected function setNewRelicAppName(string $appName): void - { - newrelic_set_appname($appName); - } - - /** - * Overwrites the name of the current transaction - */ - protected function setNewRelicTransactionName(string $transactionName): void - { - newrelic_name_transaction($transactionName); - } - - /** - * @param string $key - * @param mixed $value - */ - protected function setNewRelicParameter(string $key, $value): void - { - if (null === $value || is_scalar($value)) { - newrelic_add_custom_parameter($key, $value); - } else { - newrelic_add_custom_parameter($key, Utils::jsonEncode($value, null, true)); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php deleted file mode 100644 index 1ddf0be..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * No-op - * - * This handler handles anything, but does nothing, and does not stop bubbling to the rest of the stack. - * This can be used for testing, or to disable a handler when overriding a configuration without - * influencing the rest of the stack. - * - * @author Roel Harbers - */ -class NoopHandler extends Handler -{ - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return true; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php deleted file mode 100644 index e75ee0c..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Blackhole - * - * Any record it can handle will be thrown away. This can be used - * to put on top of an existing stack to override it temporarily. - * - * @author Jordi Boggiano - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class NullHandler extends Handler -{ - /** - * @var int - */ - private $level; - - /** - * @param string|int $level The minimum logging level at which this handler will be triggered - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return $record['level'] >= $this->level; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - return $record['level'] >= $this->level; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php deleted file mode 100644 index 22068c9..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; - -/** - * Handler to only pass log messages when a certain threshold of number of messages is reached. - * - * This can be useful in cases of processing a batch of data, but you're for example only interested - * in case it fails catastrophically instead of a warning for 1 or 2 events. Worse things can happen, right? - * - * Usage example: - * - * ``` - * $log = new Logger('application'); - * $handler = new SomeHandler(...) - * - * // Pass all warnings to the handler when more than 10 & all error messages when more then 5 - * $overflow = new OverflowHandler($handler, [Logger::WARNING => 10, Logger::ERROR => 5]); - * - * $log->pushHandler($overflow); - *``` - * - * @author Kris Buist - */ -class OverflowHandler extends AbstractHandler implements FormattableHandlerInterface -{ - /** @var HandlerInterface */ - private $handler; - - /** @var int[] */ - private $thresholdMap = [ - Logger::DEBUG => 0, - Logger::INFO => 0, - Logger::NOTICE => 0, - Logger::WARNING => 0, - Logger::ERROR => 0, - Logger::CRITICAL => 0, - Logger::ALERT => 0, - Logger::EMERGENCY => 0, - ]; - - /** - * Buffer of all messages passed to the handler before the threshold was reached - * - * @var mixed[][] - */ - private $buffer = []; - - /** - * @param HandlerInterface $handler - * @param int[] $thresholdMap Dictionary of logger level => threshold - */ - public function __construct( - HandlerInterface $handler, - array $thresholdMap = [], - $level = Logger::DEBUG, - bool $bubble = true - ) { - $this->handler = $handler; - foreach ($thresholdMap as $thresholdLevel => $threshold) { - $this->thresholdMap[$thresholdLevel] = $threshold; - } - parent::__construct($level, $bubble); - } - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($record['level'] < $this->level) { - return false; - } - - $level = $record['level']; - - if (!isset($this->thresholdMap[$level])) { - $this->thresholdMap[$level] = 0; - } - - if ($this->thresholdMap[$level] > 0) { - // The overflow threshold is not yet reached, so we're buffering the record and lowering the threshold by 1 - $this->thresholdMap[$level]--; - $this->buffer[$level][] = $record; - - return false === $this->bubble; - } - - if ($this->thresholdMap[$level] == 0) { - // This current message is breaking the threshold. Flush the buffer and continue handling the current record - foreach ($this->buffer[$level] ?? [] as $buffered) { - $this->handler->handle($buffered); - } - $this->thresholdMap[$level]--; - unset($this->buffer[$level]); - } - - $this->handler->handle($record); - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php deleted file mode 100644 index 23a1d11..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +++ /dev/null @@ -1,263 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; -use PhpConsole\Connector; -use PhpConsole\Handler as VendorPhpConsoleHandler; -use PhpConsole\Helper; - -/** - * Monolog handler for Google Chrome extension "PHP Console" - * - * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely - * - * Usage: - * 1. Install Google Chrome extension [now dead and removed from the chrome store] - * 2. See overview https://github.com/barbushin/php-console#overview - * 3. Install PHP Console library https://github.com/barbushin/php-console#installation - * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) - * - * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); - * \Monolog\ErrorHandler::register($logger); - * echo $undefinedVar; - * $logger->debug('SELECT * FROM users', array('db', 'time' => 0.012)); - * PC::debug($_SERVER); // PHP Console debugger for any type of vars - * - * @author Sergey Barbushin https://www.linkedin.com/in/barbushin - * - * @phpstan-import-type Record from \Monolog\Logger - * @deprecated Since 2.8.0 and 3.2.0, PHPConsole is abandoned and thus we will drop this handler in Monolog 4 - */ -class PHPConsoleHandler extends AbstractProcessingHandler -{ - /** @var array */ - private $options = [ - 'enabled' => true, // bool Is PHP Console server enabled - 'classesPartialsTraceIgnore' => ['Monolog\\'], // array Hide calls of classes started with... - 'debugTagsKeysInContext' => [0, 'tag'], // bool Is PHP Console server enabled - 'useOwnErrorsHandler' => false, // bool Enable errors handling - 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling - 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths - 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') - 'serverEncoding' => null, // string|null Server internal encoding - 'headersLimit' => null, // int|null Set headers size limit for your web-server - 'password' => null, // string|null Protect PHP Console connection by password - 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed - 'ipMasks' => [], // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') - 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) - 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings - 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level - 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number - 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item - 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON - 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug - 'dataStorage' => null, // \PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) - ]; - - /** @var Connector */ - private $connector; - - /** - * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details - * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) - * @throws \RuntimeException - */ - public function __construct(array $options = [], ?Connector $connector = null, $level = Logger::DEBUG, bool $bubble = true) - { - if (!class_exists('PhpConsole\Connector')) { - throw new \RuntimeException('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); - } - parent::__construct($level, $bubble); - $this->options = $this->initOptions($options); - $this->connector = $this->initConnector($connector); - } - - /** - * @param array $options - * - * @return array - */ - private function initOptions(array $options): array - { - $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); - if ($wrongOptions) { - throw new \RuntimeException('Unknown options: ' . implode(', ', $wrongOptions)); - } - - return array_replace($this->options, $options); - } - - private function initConnector(?Connector $connector = null): Connector - { - if (!$connector) { - if ($this->options['dataStorage']) { - Connector::setPostponeStorage($this->options['dataStorage']); - } - $connector = Connector::getInstance(); - } - - if ($this->options['registerHelper'] && !Helper::isRegistered()) { - Helper::register(); - } - - if ($this->options['enabled'] && $connector->isActiveClient()) { - if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { - $handler = VendorPhpConsoleHandler::getInstance(); - $handler->setHandleErrors($this->options['useOwnErrorsHandler']); - $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); - $handler->start(); - } - if ($this->options['sourcesBasePath']) { - $connector->setSourcesBasePath($this->options['sourcesBasePath']); - } - if ($this->options['serverEncoding']) { - $connector->setServerEncoding($this->options['serverEncoding']); - } - if ($this->options['password']) { - $connector->setPassword($this->options['password']); - } - if ($this->options['enableSslOnlyMode']) { - $connector->enableSslOnlyMode(); - } - if ($this->options['ipMasks']) { - $connector->setAllowedIpMasks($this->options['ipMasks']); - } - if ($this->options['headersLimit']) { - $connector->setHeadersLimit($this->options['headersLimit']); - } - if ($this->options['detectDumpTraceAndSource']) { - $connector->getDebugDispatcher()->detectTraceAndSource = true; - } - $dumper = $connector->getDumper(); - $dumper->levelLimit = $this->options['dumperLevelLimit']; - $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; - $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; - $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; - $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; - if ($this->options['enableEvalListener']) { - $connector->startEvalRequestsListener(); - } - } - - return $connector; - } - - public function getConnector(): Connector - { - return $this->connector; - } - - /** - * @return array - */ - public function getOptions(): array - { - return $this->options; - } - - public function handle(array $record): bool - { - if ($this->options['enabled'] && $this->connector->isActiveClient()) { - return parent::handle($record); - } - - return !$this->bubble; - } - - /** - * Writes the record down to the log of the implementing handler - */ - protected function write(array $record): void - { - if ($record['level'] < Logger::NOTICE) { - $this->handleDebugRecord($record); - } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) { - $this->handleExceptionRecord($record); - } else { - $this->handleErrorRecord($record); - } - } - - /** - * @phpstan-param Record $record - */ - private function handleDebugRecord(array $record): void - { - $tags = $this->getRecordTags($record); - $message = $record['message']; - if ($record['context']) { - $message .= ' ' . Utils::jsonEncode($this->connector->getDumper()->dump(array_filter($record['context'])), null, true); - } - $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); - } - - /** - * @phpstan-param Record $record - */ - private function handleExceptionRecord(array $record): void - { - $this->connector->getErrorsDispatcher()->dispatchException($record['context']['exception']); - } - - /** - * @phpstan-param Record $record - */ - private function handleErrorRecord(array $record): void - { - $context = $record['context']; - - $this->connector->getErrorsDispatcher()->dispatchError( - $context['code'] ?? null, - $context['message'] ?? $record['message'], - $context['file'] ?? null, - $context['line'] ?? null, - $this->options['classesPartialsTraceIgnore'] - ); - } - - /** - * @phpstan-param Record $record - * @return string - */ - private function getRecordTags(array &$record) - { - $tags = null; - if (!empty($record['context'])) { - $context = & $record['context']; - foreach ($this->options['debugTagsKeysInContext'] as $key) { - if (!empty($context[$key])) { - $tags = $context[$key]; - if ($key === 0) { - array_shift($context); - } else { - unset($context[$key]); - } - break; - } - } - } - - return $tags ?: strtolower($record['level_name']); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('%message%'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php deleted file mode 100644 index 8a8cf1b..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Stores to STDIN of any process, specified by a command. - * - * Usage example: - *
    - * $log = new Logger('myLogger');
    - * $log->pushHandler(new ProcessHandler('/usr/bin/php /var/www/monolog/someScript.php'));
    - * 
    - * - * @author Kolja Zuelsdorf - */ -class ProcessHandler extends AbstractProcessingHandler -{ - /** - * Holds the process to receive data on its STDIN. - * - * @var resource|bool|null - */ - private $process; - - /** - * @var string - */ - private $command; - - /** - * @var string|null - */ - private $cwd; - - /** - * @var resource[] - */ - private $pipes = []; - - /** - * @var array - */ - protected const DESCRIPTOR_SPEC = [ - 0 => ['pipe', 'r'], // STDIN is a pipe that the child will read from - 1 => ['pipe', 'w'], // STDOUT is a pipe that the child will write to - 2 => ['pipe', 'w'], // STDERR is a pipe to catch the any errors - ]; - - /** - * @param string $command Command for the process to start. Absolute paths are recommended, - * especially if you do not use the $cwd parameter. - * @param string|null $cwd "Current working directory" (CWD) for the process to be executed in. - * @throws \InvalidArgumentException - */ - public function __construct(string $command, $level = Logger::DEBUG, bool $bubble = true, ?string $cwd = null) - { - if ($command === '') { - throw new \InvalidArgumentException('The command argument must be a non-empty string.'); - } - if ($cwd === '') { - throw new \InvalidArgumentException('The optional CWD argument must be a non-empty string or null.'); - } - - parent::__construct($level, $bubble); - - $this->command = $command; - $this->cwd = $cwd; - } - - /** - * Writes the record down to the log of the implementing handler - * - * @throws \UnexpectedValueException - */ - protected function write(array $record): void - { - $this->ensureProcessIsStarted(); - - $this->writeProcessInput($record['formatted']); - - $errors = $this->readProcessErrors(); - if (empty($errors) === false) { - throw new \UnexpectedValueException(sprintf('Errors while writing to process: %s', $errors)); - } - } - - /** - * Makes sure that the process is actually started, and if not, starts it, - * assigns the stream pipes, and handles startup errors, if any. - */ - private function ensureProcessIsStarted(): void - { - if (is_resource($this->process) === false) { - $this->startProcess(); - - $this->handleStartupErrors(); - } - } - - /** - * Starts the actual process and sets all streams to non-blocking. - */ - private function startProcess(): void - { - $this->process = proc_open($this->command, static::DESCRIPTOR_SPEC, $this->pipes, $this->cwd); - - foreach ($this->pipes as $pipe) { - stream_set_blocking($pipe, false); - } - } - - /** - * Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any. - * - * @throws \UnexpectedValueException - */ - private function handleStartupErrors(): void - { - $selected = $this->selectErrorStream(); - if (false === $selected) { - throw new \UnexpectedValueException('Something went wrong while selecting a stream.'); - } - - $errors = $this->readProcessErrors(); - - if (is_resource($this->process) === false || empty($errors) === false) { - throw new \UnexpectedValueException( - sprintf('The process "%s" could not be opened: ' . $errors, $this->command) - ); - } - } - - /** - * Selects the STDERR stream. - * - * @return int|bool - */ - protected function selectErrorStream() - { - $empty = []; - $errorPipes = [$this->pipes[2]]; - - return stream_select($errorPipes, $empty, $empty, 1); - } - - /** - * Reads the errors of the process, if there are any. - * - * @codeCoverageIgnore - * @return string Empty string if there are no errors. - */ - protected function readProcessErrors(): string - { - return (string) stream_get_contents($this->pipes[2]); - } - - /** - * Writes to the input stream of the opened process. - * - * @codeCoverageIgnore - */ - protected function writeProcessInput(string $string): void - { - fwrite($this->pipes[0], $string); - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - if (is_resource($this->process)) { - foreach ($this->pipes as $pipe) { - fclose($pipe); - } - proc_close($this->process); - $this->process = null; - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php deleted file mode 100644 index 3adec7a..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Processor\ProcessorInterface; - -/** - * Interface to describe loggers that have processors - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - */ -interface ProcessableHandlerInterface -{ - /** - * Adds a processor in the stack. - * - * @psalm-param ProcessorInterface|callable(Record): Record $callback - * - * @param ProcessorInterface|callable $callback - * @return HandlerInterface self - */ - public function pushProcessor(callable $callback): HandlerInterface; - - /** - * Removes the processor on top of the stack and returns it. - * - * @psalm-return ProcessorInterface|callable(Record): Record $callback - * - * @throws \LogicException In case the processor stack is empty - * @return callable|ProcessorInterface - */ - public function popProcessor(): callable; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php deleted file mode 100644 index 9ef6e30..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Processor\ProcessorInterface; - -/** - * Helper trait for implementing ProcessableInterface - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - */ -trait ProcessableHandlerTrait -{ - /** - * @var callable[] - * @phpstan-var array - */ - protected $processors = []; - - /** - * {@inheritDoc} - */ - public function pushProcessor(callable $callback): HandlerInterface - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * {@inheritDoc} - */ - public function popProcessor(): callable - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * Processes a record. - * - * @phpstan-param Record $record - * @phpstan-return Record - */ - protected function processRecord(array $record): array - { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - - return $record; - } - - protected function resetProcessors(): void - { - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php deleted file mode 100644 index 36e19cc..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LoggerInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * Proxies log messages to an existing PSR-3 compliant logger. - * - * If a formatter is configured, the formatter's output MUST be a string and the - * formatted message will be fed to the wrapped PSR logger instead of the original - * log record's message. - * - * @author Michael Moussa - */ -class PsrHandler extends AbstractHandler implements FormattableHandlerInterface -{ - /** - * PSR-3 compliant logger - * - * @var LoggerInterface - */ - protected $logger; - - /** - * @var FormatterInterface|null - */ - protected $formatter; - - /** - * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied - */ - public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->logger = $logger; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if ($this->formatter) { - $formatted = $this->formatter->format($record); - $this->logger->log(strtolower($record['level_name']), (string) $formatted, $record['context']); - } else { - $this->logger->log(strtolower($record['level_name']), $record['message'], $record['context']); - } - - return false === $this->bubble; - } - - /** - * Sets the formatter. - * - * @param FormatterInterface $formatter - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * Gets the formatter. - * - * @return FormatterInterface - */ - public function getFormatter(): FormatterInterface - { - if (!$this->formatter) { - throw new \LogicException('No formatter has been set and this handler does not have a default formatter'); - } - - return $this->formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php deleted file mode 100644 index fed2303..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Psr\Log\LogLevel; - -/** - * Sends notifications through the pushover api to mobile phones - * - * @author Sebastian Göttschkes - * @see https://www.pushover.net/api - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class PushoverHandler extends SocketHandler -{ - /** @var string */ - private $token; - /** @var array */ - private $users; - /** @var string */ - private $title; - /** @var string|int|null */ - private $user = null; - /** @var int */ - private $retry; - /** @var int */ - private $expire; - - /** @var int */ - private $highPriorityLevel; - /** @var int */ - private $emergencyLevel; - /** @var bool */ - private $useFormattedMessage = false; - - /** - * All parameters that can be sent to Pushover - * @see https://pushover.net/api - * @var array - */ - private $parameterNames = [ - 'token' => true, - 'user' => true, - 'message' => true, - 'device' => true, - 'title' => true, - 'url' => true, - 'url_title' => true, - 'priority' => true, - 'timestamp' => true, - 'sound' => true, - 'retry' => true, - 'expire' => true, - 'callback' => true, - ]; - - /** - * Sounds the api supports by default - * @see https://pushover.net/api#sounds - * @var string[] - */ - private $sounds = [ - 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', - 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', - 'persistent', 'echo', 'updown', 'none', - ]; - - /** - * @param string $token Pushover api token - * @param string|array $users Pushover user id or array of ids the message will be sent to - * @param string|null $title Title sent to the Pushover API - * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not - * the pushover.net app owner. OpenSSL is required for this option. - * @param string|int $highPriorityLevel The minimum logging level at which this handler will start - * sending "high priority" requests to the Pushover API - * @param string|int $emergencyLevel The minimum logging level at which this handler will start - * sending "emergency" requests to the Pushover API - * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will - * send the same notification to the user. - * @param int $expire The expire parameter specifies how many seconds your notification will continue - * to be retried for (every retry seconds). - * - * @phpstan-param string|array $users - * @phpstan-param Level|LevelName|LogLevel::* $highPriorityLevel - * @phpstan-param Level|LevelName|LogLevel::* $emergencyLevel - */ - public function __construct( - string $token, - $users, - ?string $title = null, - $level = Logger::CRITICAL, - bool $bubble = true, - bool $useSSL = true, - $highPriorityLevel = Logger::CRITICAL, - $emergencyLevel = Logger::EMERGENCY, - int $retry = 30, - int $expire = 25200, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; - parent::__construct( - $connectionString, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->token = $token; - $this->users = (array) $users; - $this->title = $title ?: (string) gethostname(); - $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); - $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); - $this->retry = $retry; - $this->expire = $expire; - } - - protected function generateDataStream(array $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * @phpstan-param FormattedRecord $record - */ - private function buildContent(array $record): string - { - // Pushover has a limit of 512 characters on title and message combined. - $maxMessageLength = 512 - strlen($this->title); - - $message = ($this->useFormattedMessage) ? $record['formatted'] : $record['message']; - $message = Utils::substr($message, 0, $maxMessageLength); - - $timestamp = $record['datetime']->getTimestamp(); - - $dataArray = [ - 'token' => $this->token, - 'user' => $this->user, - 'message' => $message, - 'title' => $this->title, - 'timestamp' => $timestamp, - ]; - - if (isset($record['level']) && $record['level'] >= $this->emergencyLevel) { - $dataArray['priority'] = 2; - $dataArray['retry'] = $this->retry; - $dataArray['expire'] = $this->expire; - } elseif (isset($record['level']) && $record['level'] >= $this->highPriorityLevel) { - $dataArray['priority'] = 1; - } - - // First determine the available parameters - $context = array_intersect_key($record['context'], $this->parameterNames); - $extra = array_intersect_key($record['extra'], $this->parameterNames); - - // Least important info should be merged with subsequent info - $dataArray = array_merge($extra, $context, $dataArray); - - // Only pass sounds that are supported by the API - if (isset($dataArray['sound']) && !in_array($dataArray['sound'], $this->sounds)) { - unset($dataArray['sound']); - } - - return http_build_query($dataArray); - } - - private function buildHeader(string $content): string - { - $header = "POST /1/messages.json HTTP/1.1\r\n"; - $header .= "Host: api.pushover.net\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - protected function write(array $record): void - { - foreach ($this->users as $user) { - $this->user = $user; - - parent::write($record); - $this->closeSocket(); - } - - $this->user = null; - } - - /** - * @param int|string $value - * - * @phpstan-param Level|LevelName|LogLevel::* $value - */ - public function setHighPriorityLevel($value): self - { - $this->highPriorityLevel = Logger::toMonologLevel($value); - - return $this; - } - - /** - * @param int|string $value - * - * @phpstan-param Level|LevelName|LogLevel::* $value - */ - public function setEmergencyLevel($value): self - { - $this->emergencyLevel = Logger::toMonologLevel($value); - - return $this; - } - - /** - * Use the formatted message? - */ - public function useFormattedMessage(bool $value): self - { - $this->useFormattedMessage = $value; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php deleted file mode 100644 index 91d16ea..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; - -/** - * Logs to a Redis key using rpush - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs", "prod"); - * $log->pushHandler($redis); - * - * @author Thomas Tourlourat - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class RedisHandler extends AbstractProcessingHandler -{ - /** @var \Predis\Client<\Predis\Client>|\Redis */ - private $redisClient; - /** @var string */ - private $redisKey; - /** @var int */ - protected $capSize; - - /** - * @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance - * @param string $key The key name to push records to - * @param int $capSize Number of entries to limit list size to, 0 = unlimited - */ - public function __construct($redis, string $key, $level = Logger::DEBUG, bool $bubble = true, int $capSize = 0) - { - if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { - throw new \InvalidArgumentException('Predis\Client or Redis instance required'); - } - - $this->redisClient = $redis; - $this->redisKey = $key; - $this->capSize = $capSize; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if ($this->capSize) { - $this->writeCapped($record); - } else { - $this->redisClient->rpush($this->redisKey, $record["formatted"]); - } - } - - /** - * Write and cap the collection - * Writes the record to the redis list and caps its - * - * @phpstan-param FormattedRecord $record - */ - protected function writeCapped(array $record): void - { - if ($this->redisClient instanceof \Redis) { - $mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1; - $this->redisClient->multi($mode) - ->rpush($this->redisKey, $record["formatted"]) - ->ltrim($this->redisKey, -$this->capSize, -1) - ->exec(); - } else { - $redisKey = $this->redisKey; - $capSize = $this->capSize; - $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { - $tx->rpush($redisKey, $record["formatted"]); - $tx->ltrim($redisKey, -$capSize, -1); - }); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php deleted file mode 100644 index 7789309..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; - -/** - * Sends the message to a Redis Pub/Sub channel using PUBLISH - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisPubSubHandler(new Predis\Client("tcp://localhost:6379"), "logs", Logger::WARNING); - * $log->pushHandler($redis); - * - * @author Gaëtan Faugère - */ -class RedisPubSubHandler extends AbstractProcessingHandler -{ - /** @var \Predis\Client<\Predis\Client>|\Redis */ - private $redisClient; - /** @var string */ - private $channelKey; - - /** - * @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance - * @param string $key The channel key to publish records to - */ - public function __construct($redis, string $key, $level = Logger::DEBUG, bool $bubble = true) - { - if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { - throw new \InvalidArgumentException('Predis\Client or Redis instance required'); - } - - $this->redisClient = $redis; - $this->channelKey = $key; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->redisClient->publish($this->channelKey, $record["formatted"]); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php deleted file mode 100644 index adcc939..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Rollbar\RollbarLogger; -use Throwable; -use Monolog\Logger; - -/** - * Sends errors to Rollbar - * - * If the context data contains a `payload` key, that is used as an array - * of payload options to RollbarLogger's log method. - * - * Rollbar's context info will contain the context + extra keys from the log record - * merged, and then on top of that a few keys: - * - * - level (rollbar level name) - * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) - * - channel - * - datetime (unix timestamp) - * - * @author Paul Statezny - */ -class RollbarHandler extends AbstractProcessingHandler -{ - /** - * @var RollbarLogger - */ - protected $rollbarLogger; - - /** @var string[] */ - protected $levelMap = [ - Logger::DEBUG => 'debug', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warning', - Logger::ERROR => 'error', - Logger::CRITICAL => 'critical', - Logger::ALERT => 'critical', - Logger::EMERGENCY => 'critical', - ]; - - /** - * Records whether any log records have been added since the last flush of the rollbar notifier - * - * @var bool - */ - private $hasRecords = false; - - /** @var bool */ - protected $initialized = false; - - /** - * @param RollbarLogger $rollbarLogger RollbarLogger object constructed with valid token - */ - public function __construct(RollbarLogger $rollbarLogger, $level = Logger::ERROR, bool $bubble = true) - { - $this->rollbarLogger = $rollbarLogger; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function(array($this, 'close')); - $this->initialized = true; - } - - $context = $record['context']; - $context = array_merge($context, $record['extra'], [ - 'level' => $this->levelMap[$record['level']], - 'monolog_level' => $record['level_name'], - 'channel' => $record['channel'], - 'datetime' => $record['datetime']->format('U'), - ]); - - if (isset($context['exception']) && $context['exception'] instanceof Throwable) { - $exception = $context['exception']; - unset($context['exception']); - $toLog = $exception; - } else { - $toLog = $record['message']; - } - - // @phpstan-ignore-next-line - $this->rollbarLogger->log($context['level'], $toLog, $context); - - $this->hasRecords = true; - } - - public function flush(): void - { - if ($this->hasRecords) { - $this->rollbarLogger->flush(); - $this->hasRecords = false; - } - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - $this->flush(); - } - - /** - * {@inheritDoc} - */ - public function reset() - { - $this->flush(); - - parent::reset(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php deleted file mode 100644 index 17745d2..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ /dev/null @@ -1,207 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use InvalidArgumentException; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Stores logs to files that are rotated every day and a limited number of files are kept. - * - * This rotation is only intended to be used as a workaround. Using logrotate to - * handle the rotation is strongly encouraged when you can use it. - * - * @author Christophe Coevoet - * @author Jordi Boggiano - */ -class RotatingFileHandler extends StreamHandler -{ - public const FILE_PER_DAY = 'Y-m-d'; - public const FILE_PER_MONTH = 'Y-m'; - public const FILE_PER_YEAR = 'Y'; - - /** @var string */ - protected $filename; - /** @var int */ - protected $maxFiles; - /** @var bool */ - protected $mustRotate; - /** @var \DateTimeImmutable */ - protected $nextRotation; - /** @var string */ - protected $filenameFormat; - /** @var string */ - protected $dateFormat; - - /** - * @param string $filename - * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - */ - public function __construct(string $filename, int $maxFiles = 0, $level = Logger::DEBUG, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false) - { - $this->filename = Utils::canonicalizePath($filename); - $this->maxFiles = $maxFiles; - $this->nextRotation = new \DateTimeImmutable('tomorrow'); - $this->filenameFormat = '{filename}-{date}'; - $this->dateFormat = static::FILE_PER_DAY; - - parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - parent::close(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - /** - * {@inheritDoc} - */ - public function reset() - { - parent::reset(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - public function setFilenameFormat(string $filenameFormat, string $dateFormat): self - { - if (!preg_match('{^[Yy](([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { - throw new InvalidArgumentException( - 'Invalid date format - format must be one of '. - 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") '. - 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the '. - 'date formats using slashes, underscores and/or dots instead of dashes.' - ); - } - if (substr_count($filenameFormat, '{date}') === 0) { - throw new InvalidArgumentException( - 'Invalid filename format - format must contain at least `{date}`, because otherwise rotating is impossible.' - ); - } - $this->filenameFormat = $filenameFormat; - $this->dateFormat = $dateFormat; - $this->url = $this->getTimedFilename(); - $this->close(); - - return $this; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - // on the first record written, if the log is new, we should rotate (once per day) - if (null === $this->mustRotate) { - $this->mustRotate = null === $this->url || !file_exists($this->url); - } - - if ($this->nextRotation <= $record['datetime']) { - $this->mustRotate = true; - $this->close(); - } - - parent::write($record); - } - - /** - * Rotates the files. - */ - protected function rotate(): void - { - // update filename - $this->url = $this->getTimedFilename(); - $this->nextRotation = new \DateTimeImmutable('tomorrow'); - - // skip GC of old logs if files are unlimited - if (0 === $this->maxFiles) { - return; - } - - $logFiles = glob($this->getGlobPattern()); - if (false === $logFiles) { - // failed to glob - return; - } - - if ($this->maxFiles >= count($logFiles)) { - // no files to remove - return; - } - - // Sorting the files by name to remove the older ones - usort($logFiles, function ($a, $b) { - return strcmp($b, $a); - }); - - foreach (array_slice($logFiles, $this->maxFiles) as $file) { - if (is_writable($file)) { - // suppress errors here as unlink() might fail if two processes - // are cleaning up/rotating at the same time - set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline): bool { - return false; - }); - unlink($file); - restore_error_handler(); - } - } - - $this->mustRotate = false; - } - - protected function getTimedFilename(): string - { - $fileInfo = pathinfo($this->filename); - $timedFilename = str_replace( - ['{filename}', '{date}'], - [$fileInfo['filename'], date($this->dateFormat)], - $fileInfo['dirname'] . '/' . $this->filenameFormat - ); - - if (isset($fileInfo['extension'])) { - $timedFilename .= '.'.$fileInfo['extension']; - } - - return $timedFilename; - } - - protected function getGlobPattern(): string - { - $fileInfo = pathinfo($this->filename); - $glob = str_replace( - ['{filename}', '{date}'], - [$fileInfo['filename'], str_replace( - ['Y', 'y', 'm', 'd'], - ['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'], - $this->dateFormat) - ], - $fileInfo['dirname'] . '/' . $this->filenameFormat - ); - if (isset($fileInfo['extension'])) { - $glob .= '.'.$fileInfo['extension']; - } - - return $glob; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php deleted file mode 100644 index c128a32..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Sampling handler - * - * A sampled event stream can be useful for logging high frequency events in - * a production environment where you only need an idea of what is happening - * and are not concerned with capturing every occurrence. Since the decision to - * handle or not handle a particular event is determined randomly, the - * resulting sampled log is not guaranteed to contain 1/N of the events that - * occurred in the application, but based on the Law of large numbers, it will - * tend to be close to this ratio with a large number of attempts. - * - * @author Bryan Davis - * @author Kunal Mehta - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - */ -class SamplingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * @var HandlerInterface|callable - * @phpstan-var HandlerInterface|callable(Record|array{level: Level}|null, HandlerInterface): HandlerInterface - */ - protected $handler; - - /** - * @var int $factor - */ - protected $factor; - - /** - * @psalm-param HandlerInterface|callable(Record|array{level: Level}|null, HandlerInterface): HandlerInterface $handler - * - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $samplingHandler). - * @param int $factor Sample factor (e.g. 10 means every ~10th record is sampled) - */ - public function __construct($handler, int $factor) - { - parent::__construct(); - $this->handler = $handler; - $this->factor = $factor; - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - public function isHandling(array $record): bool - { - return $this->getHandler($record)->isHandling($record); - } - - public function handle(array $record): bool - { - if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @phpstan-param Record|array{level: Level}|null $record - * - * @return HandlerInterface - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = ($this->handler)($record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php deleted file mode 100644 index 1280ee7..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * SendGridrHandler uses the SendGrid API v2 function to send Log emails, more information in https://sendgrid.com/docs/API_Reference/Web_API/mail.html - * - * @author Ricardo Fontanelli - */ -class SendGridHandler extends MailHandler -{ - /** - * The SendGrid API User - * @var string - */ - protected $apiUser; - - /** - * The SendGrid API Key - * @var string - */ - protected $apiKey; - - /** - * The email addresses to which the message will be sent - * @var string - */ - protected $from; - - /** - * The email addresses to which the message will be sent - * @var string[] - */ - protected $to; - - /** - * The subject of the email - * @var string - */ - protected $subject; - - /** - * @param string $apiUser The SendGrid API User - * @param string $apiKey The SendGrid API Key - * @param string $from The sender of the email - * @param string|string[] $to The recipients of the email - * @param string $subject The subject of the mail - */ - public function __construct(string $apiUser, string $apiKey, string $from, $to, string $subject, $level = Logger::ERROR, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the SendGridHandler'); - } - - parent::__construct($level, $bubble); - $this->apiUser = $apiUser; - $this->apiKey = $apiKey; - $this->from = $from; - $this->to = (array) $to; - $this->subject = $subject; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $message = []; - $message['api_user'] = $this->apiUser; - $message['api_key'] = $this->apiKey; - $message['from'] = $this->from; - foreach ($this->to as $recipient) { - $message['to[]'] = $recipient; - } - $message['subject'] = $this->subject; - $message['date'] = date('r'); - - if ($this->isHtmlBody($content)) { - $message['html'] = $content; - } else { - $message['text'] = $content; - } - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($message)); - Curl\Util::execute($ch, 2); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php deleted file mode 100644 index 71a4109..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +++ /dev/null @@ -1,387 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Slack; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Slack record utility helping to log to Slack webhooks or API. - * - * @author Greg Kedzierski - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - * @see https://api.slack.com/docs/message-attachments - * - * @phpstan-import-type FormattedRecord from \Monolog\Handler\AbstractProcessingHandler - * @phpstan-import-type Record from \Monolog\Logger - */ -class SlackRecord -{ - public const COLOR_DANGER = 'danger'; - - public const COLOR_WARNING = 'warning'; - - public const COLOR_GOOD = 'good'; - - public const COLOR_DEFAULT = '#e3e4e6'; - - /** - * Slack channel (encoded ID or name) - * @var string|null - */ - private $channel; - - /** - * Name of a bot - * @var string|null - */ - private $username; - - /** - * User icon e.g. 'ghost', 'http://example.com/user.png' - * @var string|null - */ - private $userIcon; - - /** - * Whether the message should be added to Slack as attachment (plain text otherwise) - * @var bool - */ - private $useAttachment; - - /** - * Whether the the context/extra messages added to Slack as attachments are in a short style - * @var bool - */ - private $useShortAttachment; - - /** - * Whether the attachment should include context and extra data - * @var bool - */ - private $includeContextAndExtra; - - /** - * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @var string[] - */ - private $excludeFields; - - /** - * @var ?FormatterInterface - */ - private $formatter; - - /** - * @var NormalizerFormatter - */ - private $normalizerFormatter; - - /** - * @param string[] $excludeFields - */ - public function __construct( - ?string $channel = null, - ?string $username = null, - bool $useAttachment = true, - ?string $userIcon = null, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - array $excludeFields = array(), - FormatterInterface $formatter = null - ) { - $this - ->setChannel($channel) - ->setUsername($username) - ->useAttachment($useAttachment) - ->setUserIcon($userIcon) - ->useShortAttachment($useShortAttachment) - ->includeContextAndExtra($includeContextAndExtra) - ->excludeFields($excludeFields) - ->setFormatter($formatter); - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - } - - /** - * Returns required data in format that Slack - * is expecting. - * - * @phpstan-param FormattedRecord $record - * @phpstan-return mixed[] - */ - public function getSlackData(array $record): array - { - $dataArray = array(); - $record = $this->removeExcludedFields($record); - - if ($this->username) { - $dataArray['username'] = $this->username; - } - - if ($this->channel) { - $dataArray['channel'] = $this->channel; - } - - if ($this->formatter && !$this->useAttachment) { - /** @phpstan-ignore-next-line */ - $message = $this->formatter->format($record); - } else { - $message = $record['message']; - } - - if ($this->useAttachment) { - $attachment = array( - 'fallback' => $message, - 'text' => $message, - 'color' => $this->getAttachmentColor($record['level']), - 'fields' => array(), - 'mrkdwn_in' => array('fields'), - 'ts' => $record['datetime']->getTimestamp(), - 'footer' => $this->username, - 'footer_icon' => $this->userIcon, - ); - - if ($this->useShortAttachment) { - $attachment['title'] = $record['level_name']; - } else { - $attachment['title'] = 'Message'; - $attachment['fields'][] = $this->generateAttachmentField('Level', $record['level_name']); - } - - if ($this->includeContextAndExtra) { - foreach (array('extra', 'context') as $key) { - if (empty($record[$key])) { - continue; - } - - if ($this->useShortAttachment) { - $attachment['fields'][] = $this->generateAttachmentField( - (string) $key, - $record[$key] - ); - } else { - // Add all extra fields as individual fields in attachment - $attachment['fields'] = array_merge( - $attachment['fields'], - $this->generateAttachmentFields($record[$key]) - ); - } - } - } - - $dataArray['attachments'] = array($attachment); - } else { - $dataArray['text'] = $message; - } - - if ($this->userIcon) { - if (filter_var($this->userIcon, FILTER_VALIDATE_URL)) { - $dataArray['icon_url'] = $this->userIcon; - } else { - $dataArray['icon_emoji'] = ":{$this->userIcon}:"; - } - } - - return $dataArray; - } - - /** - * Returns a Slack message attachment color associated with - * provided level. - */ - public function getAttachmentColor(int $level): string - { - switch (true) { - case $level >= Logger::ERROR: - return static::COLOR_DANGER; - case $level >= Logger::WARNING: - return static::COLOR_WARNING; - case $level >= Logger::INFO: - return static::COLOR_GOOD; - default: - return static::COLOR_DEFAULT; - } - } - - /** - * Stringifies an array of key/value pairs to be used in attachment fields - * - * @param mixed[] $fields - */ - public function stringify(array $fields): string - { - /** @var Record $fields */ - $normalized = $this->normalizerFormatter->format($fields); - - $hasSecondDimension = count(array_filter($normalized, 'is_array')); - $hasNonNumericKeys = !count(array_filter(array_keys($normalized), 'is_numeric')); - - return $hasSecondDimension || $hasNonNumericKeys - ? Utils::jsonEncode($normalized, JSON_PRETTY_PRINT|Utils::DEFAULT_JSON_FLAGS) - : Utils::jsonEncode($normalized, Utils::DEFAULT_JSON_FLAGS); - } - - /** - * Channel used by the bot when posting - * - * @param ?string $channel - * - * @return static - */ - public function setChannel(?string $channel = null): self - { - $this->channel = $channel; - - return $this; - } - - /** - * Username used by the bot when posting - * - * @param ?string $username - * - * @return static - */ - public function setUsername(?string $username = null): self - { - $this->username = $username; - - return $this; - } - - public function useAttachment(bool $useAttachment = true): self - { - $this->useAttachment = $useAttachment; - - return $this; - } - - public function setUserIcon(?string $userIcon = null): self - { - $this->userIcon = $userIcon; - - if (\is_string($userIcon)) { - $this->userIcon = trim($userIcon, ':'); - } - - return $this; - } - - public function useShortAttachment(bool $useShortAttachment = false): self - { - $this->useShortAttachment = $useShortAttachment; - - return $this; - } - - public function includeContextAndExtra(bool $includeContextAndExtra = false): self - { - $this->includeContextAndExtra = $includeContextAndExtra; - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - - return $this; - } - - /** - * @param string[] $excludeFields - */ - public function excludeFields(array $excludeFields = []): self - { - $this->excludeFields = $excludeFields; - - return $this; - } - - public function setFormatter(?FormatterInterface $formatter = null): self - { - $this->formatter = $formatter; - - return $this; - } - - /** - * Generates attachment field - * - * @param string|mixed[] $value - * - * @return array{title: string, value: string, short: false} - */ - private function generateAttachmentField(string $title, $value): array - { - $value = is_array($value) - ? sprintf('```%s```', substr($this->stringify($value), 0, 1990)) - : $value; - - return array( - 'title' => ucfirst($title), - 'value' => $value, - 'short' => false, - ); - } - - /** - * Generates a collection of attachment fields from array - * - * @param mixed[] $data - * - * @return array - */ - private function generateAttachmentFields(array $data): array - { - /** @var Record $data */ - $normalized = $this->normalizerFormatter->format($data); - - $fields = array(); - foreach ($normalized as $key => $value) { - $fields[] = $this->generateAttachmentField((string) $key, $value); - } - - return $fields; - } - - /** - * Get a copy of record with fields excluded according to $this->excludeFields - * - * @phpstan-param FormattedRecord $record - * - * @return mixed[] - */ - private function removeExcludedFields(array $record): array - { - foreach ($this->excludeFields as $field) { - $keys = explode('.', $field); - $node = &$record; - $lastKey = end($keys); - foreach ($keys as $key) { - if (!isset($node[$key])) { - break; - } - if ($lastKey === $key) { - unset($node[$key]); - break; - } - $node = &$node[$key]; - } - } - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php deleted file mode 100644 index a648513..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +++ /dev/null @@ -1,256 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; - -/** - * Sends notifications through Slack API - * - * @author Greg Kedzierski - * @see https://api.slack.com/ - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class SlackHandler extends SocketHandler -{ - /** - * Slack API token - * @var string - */ - private $token; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - * @var SlackRecord - */ - private $slackRecord; - - /** - * @param string $token Slack API token - * @param string $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @throws MissingExtensionException If no OpenSSL PHP extension configured - */ - public function __construct( - string $token, - string $channel, - ?string $username = null, - bool $useAttachment = true, - ?string $iconEmoji = null, - $level = Logger::CRITICAL, - bool $bubble = true, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - array $excludeFields = array(), - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); - } - - parent::__construct( - 'ssl://slack.com:443', - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields - ); - - $this->token = $token; - } - - public function getSlackRecord(): SlackRecord - { - return $this->slackRecord; - } - - public function getToken(): string - { - return $this->token; - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - * - * @phpstan-param FormattedRecord $record - */ - private function buildContent(array $record): string - { - $dataArray = $this->prepareContentData($record); - - return http_build_query($dataArray); - } - - /** - * @phpstan-param FormattedRecord $record - * @return string[] - */ - protected function prepareContentData(array $record): array - { - $dataArray = $this->slackRecord->getSlackData($record); - $dataArray['token'] = $this->token; - - if (!empty($dataArray['attachments'])) { - $dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']); - } - - return $dataArray; - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; - $header .= "Host: slack.com\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - parent::write($record); - $this->finalizeWrite(); - } - - /** - * Finalizes the request by reading some bytes and then closing the socket - * - * If we do not read some but close the socket too early, slack sometimes - * drops the request entirely. - */ - protected function finalizeWrite(): void - { - $res = $this->getResource(); - if (is_resource($res)) { - @fread($res, 2048); - } - $this->closeSocket(); - } - - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter(): FormatterInterface - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } - - /** - * Channel used by the bot when posting - */ - public function setChannel(string $channel): self - { - $this->slackRecord->setChannel($channel); - - return $this; - } - - /** - * Username used by the bot when posting - */ - public function setUsername(string $username): self - { - $this->slackRecord->setUsername($username); - - return $this; - } - - public function useAttachment(bool $useAttachment): self - { - $this->slackRecord->useAttachment($useAttachment); - - return $this; - } - - public function setIconEmoji(string $iconEmoji): self - { - $this->slackRecord->setUserIcon($iconEmoji); - - return $this; - } - - public function useShortAttachment(bool $useShortAttachment): self - { - $this->slackRecord->useShortAttachment($useShortAttachment); - - return $this; - } - - public function includeContextAndExtra(bool $includeContextAndExtra): self - { - $this->slackRecord->includeContextAndExtra($includeContextAndExtra); - - return $this; - } - - /** - * @param string[] $excludeFields - */ - public function excludeFields(array $excludeFields): self - { - $this->slackRecord->excludeFields($excludeFields); - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php deleted file mode 100644 index 8ae3c78..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; - -/** - * Sends notifications through Slack Webhooks - * - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - */ -class SlackWebhookHandler extends AbstractProcessingHandler -{ - /** - * Slack Webhook token - * @var string - */ - private $webhookUrl; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - * @var SlackRecord - */ - private $slackRecord; - - /** - * @param string $webhookUrl Slack Webhook URL - * @param string|null $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - */ - public function __construct( - string $webhookUrl, - ?string $channel = null, - ?string $username = null, - bool $useAttachment = true, - ?string $iconEmoji = null, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - $level = Logger::CRITICAL, - bool $bubble = true, - array $excludeFields = array() - ) { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the SlackWebhookHandler'); - } - - parent::__construct($level, $bubble); - - $this->webhookUrl = $webhookUrl; - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields - ); - } - - public function getSlackRecord(): SlackRecord - { - return $this->slackRecord; - } - - public function getWebhookUrl(): string - { - return $this->webhookUrl; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $postData = $this->slackRecord->getSlackData($record); - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - $options = array( - CURLOPT_URL => $this->webhookUrl, - CURLOPT_POST => true, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HTTPHEADER => array('Content-type: application/json'), - CURLOPT_POSTFIELDS => $postString, - ); - if (defined('CURLOPT_SAFE_UPLOAD')) { - $options[CURLOPT_SAFE_UPLOAD] = true; - } - - curl_setopt_array($ch, $options); - - Curl\Util::execute($ch); - } - - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter(): FormatterInterface - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php deleted file mode 100644 index 21701af..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +++ /dev/null @@ -1,448 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Stores to any socket - uses fsockopen() or pfsockopen(). - * - * @author Pablo de Leon Belloc - * @see http://php.net/manual/en/function.fsockopen.php - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class SocketHandler extends AbstractProcessingHandler -{ - /** @var string */ - private $connectionString; - /** @var float */ - private $connectionTimeout; - /** @var resource|null */ - private $resource; - /** @var float */ - private $timeout; - /** @var float */ - private $writingTimeout; - /** @var ?int */ - private $lastSentBytes = null; - /** @var ?int */ - private $chunkSize; - /** @var bool */ - private $persistent; - /** @var ?int */ - private $errno = null; - /** @var ?string */ - private $errstr = null; - /** @var ?float */ - private $lastWritingAt = null; - - /** - * @param string $connectionString Socket connection string - * @param bool $persistent Flag to enable/disable persistent connections - * @param float $timeout Socket timeout to wait until the request is being aborted - * @param float $writingTimeout Socket timeout to wait until the request should've been sent/written - * @param float|null $connectionTimeout Socket connect timeout to wait until the connection should've been - * established - * @param int|null $chunkSize Sets the chunk size. Only has effect during connection in the writing cycle - * - * @throws \InvalidArgumentException If an invalid timeout value (less than 0) is passed. - */ - public function __construct( - string $connectionString, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - parent::__construct($level, $bubble); - $this->connectionString = $connectionString; - - if ($connectionTimeout !== null) { - $this->validateTimeout($connectionTimeout); - } - - $this->connectionTimeout = $connectionTimeout ?? (float) ini_get('default_socket_timeout'); - $this->persistent = $persistent; - $this->validateTimeout($timeout); - $this->timeout = $timeout; - $this->validateTimeout($writingTimeout); - $this->writingTimeout = $writingTimeout; - $this->chunkSize = $chunkSize; - } - - /** - * Connect (if necessary) and write to the socket - * - * {@inheritDoc} - * - * @throws \UnexpectedValueException - * @throws \RuntimeException - */ - protected function write(array $record): void - { - $this->connectIfNotConnected(); - $data = $this->generateDataStream($record); - $this->writeToSocket($data); - } - - /** - * We will not close a PersistentSocket instance so it can be reused in other requests. - */ - public function close(): void - { - if (!$this->isPersistent()) { - $this->closeSocket(); - } - } - - /** - * Close socket, if open - */ - public function closeSocket(): void - { - if (is_resource($this->resource)) { - fclose($this->resource); - $this->resource = null; - } - } - - /** - * Set socket connection to be persistent. It only has effect before the connection is initiated. - */ - public function setPersistent(bool $persistent): self - { - $this->persistent = $persistent; - - return $this; - } - - /** - * Set connection timeout. Only has effect before we connect. - * - * @see http://php.net/manual/en/function.fsockopen.php - */ - public function setConnectionTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->connectionTimeout = $seconds; - - return $this; - } - - /** - * Set write timeout. Only has effect before we connect. - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - */ - public function setTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->timeout = $seconds; - - return $this; - } - - /** - * Set writing timeout. Only has effect during connection in the writing cycle. - * - * @param float $seconds 0 for no timeout - */ - public function setWritingTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->writingTimeout = $seconds; - - return $this; - } - - /** - * Set chunk size. Only has effect during connection in the writing cycle. - */ - public function setChunkSize(int $bytes): self - { - $this->chunkSize = $bytes; - - return $this; - } - - /** - * Get current connection string - */ - public function getConnectionString(): string - { - return $this->connectionString; - } - - /** - * Get persistent setting - */ - public function isPersistent(): bool - { - return $this->persistent; - } - - /** - * Get current connection timeout setting - */ - public function getConnectionTimeout(): float - { - return $this->connectionTimeout; - } - - /** - * Get current in-transfer timeout - */ - public function getTimeout(): float - { - return $this->timeout; - } - - /** - * Get current local writing timeout - * - * @return float - */ - public function getWritingTimeout(): float - { - return $this->writingTimeout; - } - - /** - * Get current chunk size - */ - public function getChunkSize(): ?int - { - return $this->chunkSize; - } - - /** - * Check to see if the socket is currently available. - * - * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. - */ - public function isConnected(): bool - { - return is_resource($this->resource) - && !feof($this->resource); // on TCP - other party can close connection. - } - - /** - * Wrapper to allow mocking - * - * @return resource|false - */ - protected function pfsockopen() - { - return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @return resource|false - */ - protected function fsockopen() - { - return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - * - * @return bool - */ - protected function streamSetTimeout() - { - $seconds = floor($this->timeout); - $microseconds = round(($this->timeout - $seconds) * 1e6); - - if (!is_resource($this->resource)) { - throw new \LogicException('streamSetTimeout called but $this->resource is not a resource'); - } - - return stream_set_timeout($this->resource, (int) $seconds, (int) $microseconds); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-chunk-size.php - * - * @return int|bool - */ - protected function streamSetChunkSize() - { - if (!is_resource($this->resource)) { - throw new \LogicException('streamSetChunkSize called but $this->resource is not a resource'); - } - - if (null === $this->chunkSize) { - throw new \LogicException('streamSetChunkSize called but $this->chunkSize is not set'); - } - - return stream_set_chunk_size($this->resource, $this->chunkSize); - } - - /** - * Wrapper to allow mocking - * - * @return int|bool - */ - protected function fwrite(string $data) - { - if (!is_resource($this->resource)) { - throw new \LogicException('fwrite called but $this->resource is not a resource'); - } - - return @fwrite($this->resource, $data); - } - - /** - * Wrapper to allow mocking - * - * @return mixed[]|bool - */ - protected function streamGetMetadata() - { - if (!is_resource($this->resource)) { - throw new \LogicException('streamGetMetadata called but $this->resource is not a resource'); - } - - return stream_get_meta_data($this->resource); - } - - private function validateTimeout(float $value): void - { - if ($value < 0) { - throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); - } - } - - private function connectIfNotConnected(): void - { - if ($this->isConnected()) { - return; - } - $this->connect(); - } - - /** - * @phpstan-param FormattedRecord $record - */ - protected function generateDataStream(array $record): string - { - return (string) $record['formatted']; - } - - /** - * @return resource|null - */ - protected function getResource() - { - return $this->resource; - } - - private function connect(): void - { - $this->createSocketResource(); - $this->setSocketTimeout(); - $this->setStreamChunkSize(); - } - - private function createSocketResource(): void - { - if ($this->isPersistent()) { - $resource = $this->pfsockopen(); - } else { - $resource = $this->fsockopen(); - } - if (is_bool($resource)) { - throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); - } - $this->resource = $resource; - } - - private function setSocketTimeout(): void - { - if (!$this->streamSetTimeout()) { - throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); - } - } - - private function setStreamChunkSize(): void - { - if ($this->chunkSize && !$this->streamSetChunkSize()) { - throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); - } - } - - private function writeToSocket(string $data): void - { - $length = strlen($data); - $sent = 0; - $this->lastSentBytes = $sent; - while ($this->isConnected() && $sent < $length) { - if (0 == $sent) { - $chunk = $this->fwrite($data); - } else { - $chunk = $this->fwrite(substr($data, $sent)); - } - if ($chunk === false) { - throw new \RuntimeException("Could not write to socket"); - } - $sent += $chunk; - $socketInfo = $this->streamGetMetadata(); - if (is_array($socketInfo) && $socketInfo['timed_out']) { - throw new \RuntimeException("Write timed-out"); - } - - if ($this->writingIsTimedOut($sent)) { - throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); - } - } - if (!$this->isConnected() && $sent < $length) { - throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); - } - } - - private function writingIsTimedOut(int $sent): bool - { - // convert to ms - if (0.0 == $this->writingTimeout) { - return false; - } - - if ($sent !== $this->lastSentBytes) { - $this->lastWritingAt = microtime(true); - $this->lastSentBytes = $sent; - - return false; - } else { - usleep(100); - } - - if ((microtime(true) - $this->lastWritingAt) >= $this->writingTimeout) { - $this->closeSocket(); - - return true; - } - - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php deleted file mode 100644 index dcf282b..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sqs\SqsClient; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Writes to any sqs queue. - * - * @author Martijn van Calker - */ -class SqsHandler extends AbstractProcessingHandler -{ - /** 256 KB in bytes - maximum message size in SQS */ - protected const MAX_MESSAGE_SIZE = 262144; - /** 100 KB in bytes - head message size for new error log */ - protected const HEAD_MESSAGE_SIZE = 102400; - - /** @var SqsClient */ - private $client; - /** @var string */ - private $queueUrl; - - public function __construct(SqsClient $sqsClient, string $queueUrl, $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->client = $sqsClient; - $this->queueUrl = $queueUrl; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!isset($record['formatted']) || 'string' !== gettype($record['formatted'])) { - throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string' . Utils::getRecordMessageForException($record)); - } - - $messageBody = $record['formatted']; - if (strlen($messageBody) >= static::MAX_MESSAGE_SIZE) { - $messageBody = Utils::substr($messageBody, 0, static::HEAD_MESSAGE_SIZE); - } - - $this->client->sendMessage([ - 'QueueUrl' => $this->queueUrl, - 'MessageBody' => $messageBody, - ]); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php deleted file mode 100644 index 82c048e..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ /dev/null @@ -1,224 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Stores to any stream resource - * - * Can be used to store into php://stderr, remote and local files, etc. - * - * @author Jordi Boggiano - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class StreamHandler extends AbstractProcessingHandler -{ - /** @const int */ - protected const MAX_CHUNK_SIZE = 2147483647; - /** @const int 10MB */ - protected const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024; - /** @var int */ - protected $streamChunkSize; - /** @var resource|null */ - protected $stream; - /** @var ?string */ - protected $url = null; - /** @var ?string */ - private $errorMessage = null; - /** @var ?int */ - protected $filePermission; - /** @var bool */ - protected $useLocking; - /** @var true|null */ - private $dirCreated = null; - - /** - * @param resource|string $stream If a missing path can't be created, an UnexpectedValueException will be thrown on first write - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - * - * @throws \InvalidArgumentException If stream is not a resource or string - */ - public function __construct($stream, $level = Logger::DEBUG, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false) - { - parent::__construct($level, $bubble); - - if (($phpMemoryLimit = Utils::expandIniShorthandBytes(ini_get('memory_limit'))) !== false) { - if ($phpMemoryLimit > 0) { - // use max 10% of allowed memory for the chunk size, and at least 100KB - $this->streamChunkSize = min(static::MAX_CHUNK_SIZE, max((int) ($phpMemoryLimit / 10), 100 * 1024)); - } else { - // memory is unlimited, set to the default 10MB - $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; - } - } else { - // no memory limit information, set to the default 10MB - $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; - } - - if (is_resource($stream)) { - $this->stream = $stream; - - stream_set_chunk_size($this->stream, $this->streamChunkSize); - } elseif (is_string($stream)) { - $this->url = Utils::canonicalizePath($stream); - } else { - throw new \InvalidArgumentException('A stream must either be a resource or a string.'); - } - - $this->filePermission = $filePermission; - $this->useLocking = $useLocking; - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - if ($this->url && is_resource($this->stream)) { - fclose($this->stream); - } - $this->stream = null; - $this->dirCreated = null; - } - - /** - * Return the currently active stream if it is open - * - * @return resource|null - */ - public function getStream() - { - return $this->stream; - } - - /** - * Return the stream URL if it was configured with a URL and not an active resource - * - * @return string|null - */ - public function getUrl(): ?string - { - return $this->url; - } - - /** - * @return int - */ - public function getStreamChunkSize(): int - { - return $this->streamChunkSize; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!is_resource($this->stream)) { - $url = $this->url; - if (null === $url || '' === $url) { - throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().' . Utils::getRecordMessageForException($record)); - } - $this->createDir($url); - $this->errorMessage = null; - set_error_handler([$this, 'customErrorHandler']); - try { - $stream = fopen($url, 'a'); - if ($this->filePermission !== null) { - @chmod($url, $this->filePermission); - } - } finally { - restore_error_handler(); - } - if (!is_resource($stream)) { - $this->stream = null; - - throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $url) . Utils::getRecordMessageForException($record)); - } - stream_set_chunk_size($stream, $this->streamChunkSize); - $this->stream = $stream; - } - - $stream = $this->stream; - if (!is_resource($stream)) { - throw new \LogicException('No stream was opened yet' . Utils::getRecordMessageForException($record)); - } - - if ($this->useLocking) { - // ignoring errors here, there's not much we can do about them - flock($stream, LOCK_EX); - } - - $this->streamWrite($stream, $record); - - if ($this->useLocking) { - flock($stream, LOCK_UN); - } - } - - /** - * Write to stream - * @param resource $stream - * @param array $record - * - * @phpstan-param FormattedRecord $record - */ - protected function streamWrite($stream, array $record): void - { - fwrite($stream, (string) $record['formatted']); - } - - private function customErrorHandler(int $code, string $msg): bool - { - $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); - - return true; - } - - private function getDirFromStream(string $stream): ?string - { - $pos = strpos($stream, '://'); - if ($pos === false) { - return dirname($stream); - } - - if ('file://' === substr($stream, 0, 7)) { - return dirname(substr($stream, 7)); - } - - return null; - } - - private function createDir(string $url): void - { - // Do not try to create dir if it has already been tried. - if ($this->dirCreated) { - return; - } - - $dir = $this->getDirFromStream($url); - if (null !== $dir && !is_dir($dir)) { - $this->errorMessage = null; - set_error_handler([$this, 'customErrorHandler']); - $status = mkdir($dir, 0777, true); - restore_error_handler(); - if (false === $status && !is_dir($dir) && strpos((string) $this->errorMessage, 'File exists') === false) { - throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and it could not be created: '.$this->errorMessage, $dir)); - } - } - $this->dirCreated = true; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php deleted file mode 100644 index fae9251..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Swift_Message; -use Swift; - -/** - * SwiftMailerHandler uses Swift_Mailer to send the emails - * - * @author Gyula Sallai - * - * @phpstan-import-type Record from \Monolog\Logger - * @deprecated Since Monolog 2.6. Use SymfonyMailerHandler instead. - */ -class SwiftMailerHandler extends MailHandler -{ - /** @var \Swift_Mailer */ - protected $mailer; - /** @var Swift_Message|callable(string, Record[]): Swift_Message */ - private $messageTemplate; - - /** - * @psalm-param Swift_Message|callable(string, Record[]): Swift_Message $message - * - * @param \Swift_Mailer $mailer The mailer to use - * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced - */ - public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, bool $bubble = true) - { - parent::__construct($level, $bubble); - - @trigger_error('The SwiftMailerHandler is deprecated since Monolog 2.6. Use SymfonyMailerHandler instead.', E_USER_DEPRECATED); - - $this->mailer = $mailer; - $this->messageTemplate = $message; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $this->mailer->send($this->buildMessage($content, $records)); - } - - /** - * Gets the formatter for the Swift_Message subject. - * - * @param string|null $format The format of the subject - */ - protected function getSubjectFormatter(?string $format): FormatterInterface - { - return new LineFormatter($format); - } - - /** - * Creates instance of Swift_Message to be sent - * - * @param string $content formatted email body to be sent - * @param array $records Log records that formed the content - * @return Swift_Message - * - * @phpstan-param Record[] $records - */ - protected function buildMessage(string $content, array $records): Swift_Message - { - $message = null; - if ($this->messageTemplate instanceof Swift_Message) { - $message = clone $this->messageTemplate; - $message->generateId(); - } elseif (is_callable($this->messageTemplate)) { - $message = ($this->messageTemplate)($content, $records); - } - - if (!$message instanceof Swift_Message) { - $record = reset($records); - throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it' . ($record ? Utils::getRecordMessageForException($record) : '')); - } - - if ($records) { - $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); - $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); - } - - $mime = 'text/plain'; - if ($this->isHtmlBody($content)) { - $mime = 'text/html'; - } - - $message->setBody($content, $mime); - /** @phpstan-ignore-next-line */ - if (version_compare(Swift::VERSION, '6.0.0', '>=')) { - $message->setDate(new \DateTimeImmutable()); - } else { - /** @phpstan-ignore-next-line */ - $message->setDate(time()); - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php deleted file mode 100644 index 130e6f1..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Symfony\Component\Mailer\MailerInterface; -use Symfony\Component\Mailer\Transport\TransportInterface; -use Symfony\Component\Mime\Email; - -/** - * SymfonyMailerHandler uses Symfony's Mailer component to send the emails - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class SymfonyMailerHandler extends MailHandler -{ - /** @var MailerInterface|TransportInterface */ - protected $mailer; - /** @var Email|callable(string, Record[]): Email */ - private $emailTemplate; - - /** - * @psalm-param Email|callable(string, Record[]): Email $email - * - * @param MailerInterface|TransportInterface $mailer The mailer to use - * @param callable|Email $email An email template, the subject/body will be replaced - */ - public function __construct($mailer, $email, $level = Logger::ERROR, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->mailer = $mailer; - $this->emailTemplate = $email; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $this->mailer->send($this->buildMessage($content, $records)); - } - - /** - * Gets the formatter for the Swift_Message subject. - * - * @param string|null $format The format of the subject - */ - protected function getSubjectFormatter(?string $format): FormatterInterface - { - return new LineFormatter($format); - } - - /** - * Creates instance of Email to be sent - * - * @param string $content formatted email body to be sent - * @param array $records Log records that formed the content - * - * @phpstan-param Record[] $records - */ - protected function buildMessage(string $content, array $records): Email - { - $message = null; - if ($this->emailTemplate instanceof Email) { - $message = clone $this->emailTemplate; - } elseif (is_callable($this->emailTemplate)) { - $message = ($this->emailTemplate)($content, $records); - } - - if (!$message instanceof Email) { - $record = reset($records); - throw new \InvalidArgumentException('Could not resolve message as instance of Email or a callable returning it' . ($record ? Utils::getRecordMessageForException($record) : '')); - } - - if ($records) { - $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); - $message->subject($subjectFormatter->format($this->getHighestRecord($records))); - } - - if ($this->isHtmlBody($content)) { - if (null !== ($charset = $message->getHtmlCharset())) { - $message->html($content, $charset); - } else { - $message->html($content); - } - } else { - if (null !== ($charset = $message->getTextCharset())) { - $message->text($content, $charset); - } else { - $message->text($content); - } - } - - return $message->date(new \DateTimeImmutable()); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php deleted file mode 100644 index 1d543b7..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Logs to syslog service. - * - * usage example: - * - * $log = new Logger('application'); - * $syslog = new SyslogHandler('myfacility', 'local6'); - * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); - * $syslog->setFormatter($formatter); - * $log->pushHandler($syslog); - * - * @author Sven Paulus - */ -class SyslogHandler extends AbstractSyslogHandler -{ - /** @var string */ - protected $ident; - /** @var int */ - protected $logopts; - - /** - * @param string $ident - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID - */ - public function __construct(string $ident, $facility = LOG_USER, $level = Logger::DEBUG, bool $bubble = true, int $logopts = LOG_PID) - { - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->logopts = $logopts; - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - closelog(); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!openlog($this->ident, $this->logopts, $this->facility)) { - throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"' . Utils::getRecordMessageForException($record)); - } - syslog($this->logLevels[$record['level']], (string) $record['formatted']); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php deleted file mode 100644 index dbd8ef6..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\SyslogUdp; - -use Monolog\Utils; -use Socket; - -class UdpSocket -{ - protected const DATAGRAM_MAX_LENGTH = 65023; - - /** @var string */ - protected $ip; - /** @var int */ - protected $port; - /** @var resource|Socket|null */ - protected $socket = null; - - public function __construct(string $ip, int $port = 514) - { - $this->ip = $ip; - $this->port = $port; - } - - /** - * @param string $line - * @param string $header - * @return void - */ - public function write($line, $header = "") - { - $this->send($this->assembleMessage($line, $header)); - } - - public function close(): void - { - if (is_resource($this->socket) || $this->socket instanceof Socket) { - socket_close($this->socket); - $this->socket = null; - } - } - - /** - * @return resource|Socket - */ - protected function getSocket() - { - if (null !== $this->socket) { - return $this->socket; - } - - $domain = AF_INET; - $protocol = SOL_UDP; - // Check if we are using unix sockets. - if ($this->port === 0) { - $domain = AF_UNIX; - $protocol = IPPROTO_IP; - } - - $this->socket = socket_create($domain, SOCK_DGRAM, $protocol) ?: null; - if (null === $this->socket) { - throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' could not be opened via socket_create'); - } - - return $this->socket; - } - - protected function send(string $chunk): void - { - socket_sendto($this->getSocket(), $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); - } - - protected function assembleMessage(string $line, string $header): string - { - $chunkSize = static::DATAGRAM_MAX_LENGTH - strlen($header); - - return $header . Utils::substr($line, 0, $chunkSize); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php deleted file mode 100644 index deaa19f..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use DateTimeInterface; -use Monolog\Logger; -use Monolog\Handler\SyslogUdp\UdpSocket; -use Monolog\Utils; - -/** - * A Handler for logging to a remote syslogd server. - * - * @author Jesper Skovgaard Nielsen - * @author Dominik Kukacka - */ -class SyslogUdpHandler extends AbstractSyslogHandler -{ - const RFC3164 = 0; - const RFC5424 = 1; - const RFC5424e = 2; - - /** @var array */ - private $dateFormats = array( - self::RFC3164 => 'M d H:i:s', - self::RFC5424 => \DateTime::RFC3339, - self::RFC5424e => \DateTime::RFC3339_EXTENDED, - ); - - /** @var UdpSocket */ - protected $socket; - /** @var string */ - protected $ident; - /** @var self::RFC* */ - protected $rfc; - - /** - * @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then) - * @param int $port Port number, or 0 if $host is a unix socket - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param string $ident Program name or tag for each log message. - * @param int $rfc RFC to format the message for. - * @throws MissingExtensionException - * - * @phpstan-param self::RFC* $rfc - */ - public function __construct(string $host, int $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, bool $bubble = true, string $ident = 'php', int $rfc = self::RFC5424) - { - if (!extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use the SyslogUdpHandler'); - } - - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->rfc = $rfc; - - $this->socket = new UdpSocket($host, $port); - } - - protected function write(array $record): void - { - $lines = $this->splitMessageIntoLines($record['formatted']); - - $header = $this->makeCommonSyslogHeader($this->logLevels[$record['level']], $record['datetime']); - - foreach ($lines as $line) { - $this->socket->write($line, $header); - } - } - - public function close(): void - { - $this->socket->close(); - } - - /** - * @param string|string[] $message - * @return string[] - */ - private function splitMessageIntoLines($message): array - { - if (is_array($message)) { - $message = implode("\n", $message); - } - - $lines = preg_split('/$\R?^/m', (string) $message, -1, PREG_SPLIT_NO_EMPTY); - if (false === $lines) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Could not preg_split: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - - return $lines; - } - - /** - * Make common syslog header (see rfc5424 or rfc3164) - */ - protected function makeCommonSyslogHeader(int $severity, DateTimeInterface $datetime): string - { - $priority = $severity + $this->facility; - - if (!$pid = getmypid()) { - $pid = '-'; - } - - if (!$hostname = gethostname()) { - $hostname = '-'; - } - - if ($this->rfc === self::RFC3164) { - // see https://github.com/phpstan/phpstan/issues/5348 - // @phpstan-ignore-next-line - $dateNew = $datetime->setTimezone(new \DateTimeZone('UTC')); - $date = $dateNew->format($this->dateFormats[$this->rfc]); - - return "<$priority>" . - $date . " " . - $hostname . " " . - $this->ident . "[" . $pid . "]: "; - } - - $date = $datetime->format($this->dateFormats[$this->rfc]); - - return "<$priority>1 " . - $date . " " . - $hostname . " " . - $this->ident . " " . - $pid . " - - "; - } - - /** - * Inject your own socket, mainly used for testing - */ - public function setSocket(UdpSocket $socket): self - { - $this->socket = $socket; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php deleted file mode 100644 index 8912eba..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use RuntimeException; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Handler send logs to Telegram using Telegram Bot API. - * - * How to use: - * 1) Create telegram bot with https://telegram.me/BotFather - * 2) Create a telegram channel where logs will be recorded. - * 3) Add created bot from step 1 to the created channel from step 2. - * - * Use telegram bot API key from step 1 and channel name with '@' prefix from step 2 to create instance of TelegramBotHandler - * - * @link https://core.telegram.org/bots/api - * - * @author Mazur Alexandr - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class TelegramBotHandler extends AbstractProcessingHandler -{ - private const BOT_API = 'https://api.telegram.org/bot'; - - /** - * The available values of parseMode according to the Telegram api documentation - */ - private const AVAILABLE_PARSE_MODES = [ - 'HTML', - 'MarkdownV2', - 'Markdown', // legacy mode without underline and strikethrough, use MarkdownV2 instead - ]; - - /** - * The maximum number of characters allowed in a message according to the Telegram api documentation - */ - private const MAX_MESSAGE_LENGTH = 4096; - - /** - * Telegram bot access token provided by BotFather. - * Create telegram bot with https://telegram.me/BotFather and use access token from it. - * @var string - */ - private $apiKey; - - /** - * Telegram channel name. - * Since to start with '@' symbol as prefix. - * @var string - */ - private $channel; - - /** - * The kind of formatting that is used for the message. - * See available options at https://core.telegram.org/bots/api#formatting-options - * or in AVAILABLE_PARSE_MODES - * @var ?string - */ - private $parseMode; - - /** - * Disables link previews for links in the message. - * @var ?bool - */ - private $disableWebPagePreview; - - /** - * Sends the message silently. Users will receive a notification with no sound. - * @var ?bool - */ - private $disableNotification; - - /** - * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. - * False - truncates a message that is too long. - * @var bool - */ - private $splitLongMessages; - - /** - * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). - * @var bool - */ - private $delayBetweenMessages; - - /** - * @param string $apiKey Telegram bot access token provided by BotFather - * @param string $channel Telegram channel name - * @param bool $splitLongMessages Split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages - * @param bool $delayBetweenMessages Adds delay between sending a split message according to Telegram API - * @throws MissingExtensionException - */ - public function __construct( - string $apiKey, - string $channel, - $level = Logger::DEBUG, - bool $bubble = true, - string $parseMode = null, - bool $disableWebPagePreview = null, - bool $disableNotification = null, - bool $splitLongMessages = false, - bool $delayBetweenMessages = false - ) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the TelegramBotHandler'); - } - - parent::__construct($level, $bubble); - - $this->apiKey = $apiKey; - $this->channel = $channel; - $this->setParseMode($parseMode); - $this->disableWebPagePreview($disableWebPagePreview); - $this->disableNotification($disableNotification); - $this->splitLongMessages($splitLongMessages); - $this->delayBetweenMessages($delayBetweenMessages); - } - - public function setParseMode(string $parseMode = null): self - { - if ($parseMode !== null && !in_array($parseMode, self::AVAILABLE_PARSE_MODES)) { - throw new \InvalidArgumentException('Unknown parseMode, use one of these: ' . implode(', ', self::AVAILABLE_PARSE_MODES) . '.'); - } - - $this->parseMode = $parseMode; - - return $this; - } - - public function disableWebPagePreview(bool $disableWebPagePreview = null): self - { - $this->disableWebPagePreview = $disableWebPagePreview; - - return $this; - } - - public function disableNotification(bool $disableNotification = null): self - { - $this->disableNotification = $disableNotification; - - return $this; - } - - /** - * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. - * False - truncates a message that is too long. - * @param bool $splitLongMessages - * @return $this - */ - public function splitLongMessages(bool $splitLongMessages = false): self - { - $this->splitLongMessages = $splitLongMessages; - - return $this; - } - - /** - * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). - * @param bool $delayBetweenMessages - * @return $this - */ - public function delayBetweenMessages(bool $delayBetweenMessages = false): self - { - $this->delayBetweenMessages = $delayBetweenMessages; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - /** @var Record[] $messages */ - $messages = []; - - foreach ($records as $record) { - if (!$this->isHandling($record)) { - continue; - } - - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $messages[] = $record; - } - - if (!empty($messages)) { - $this->send((string)$this->getFormatter()->formatBatch($messages)); - } - } - - /** - * @inheritDoc - */ - protected function write(array $record): void - { - $this->send($record['formatted']); - } - - /** - * Send request to @link https://api.telegram.org/bot on SendMessage action. - * @param string $message - */ - protected function send(string $message): void - { - $messages = $this->handleMessageLength($message); - - foreach ($messages as $key => $msg) { - if ($this->delayBetweenMessages && $key > 0) { - sleep(1); - } - - $this->sendCurl($msg); - } - } - - protected function sendCurl(string $message): void - { - $ch = curl_init(); - $url = self::BOT_API . $this->apiKey . '/SendMessage'; - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ - 'text' => $message, - 'chat_id' => $this->channel, - 'parse_mode' => $this->parseMode, - 'disable_web_page_preview' => $this->disableWebPagePreview, - 'disable_notification' => $this->disableNotification, - ])); - - $result = Curl\Util::execute($ch); - if (!is_string($result)) { - throw new RuntimeException('Telegram API error. Description: No response'); - } - $result = json_decode($result, true); - - if ($result['ok'] === false) { - throw new RuntimeException('Telegram API error. Description: ' . $result['description']); - } - } - - /** - * Handle a message that is too long: truncates or splits into several - * @param string $message - * @return string[] - */ - private function handleMessageLength(string $message): array - { - $truncatedMarker = ' (...truncated)'; - if (!$this->splitLongMessages && strlen($message) > self::MAX_MESSAGE_LENGTH) { - return [Utils::substr($message, 0, self::MAX_MESSAGE_LENGTH - strlen($truncatedMarker)) . $truncatedMarker]; - } - - return str_split($message, self::MAX_MESSAGE_LENGTH); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php deleted file mode 100644 index 0986da2..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Used for testing purposes. - * - * It records all records and gives you access to them for verification. - * - * @author Jordi Boggiano - * - * @method bool hasEmergency($record) - * @method bool hasAlert($record) - * @method bool hasCritical($record) - * @method bool hasError($record) - * @method bool hasWarning($record) - * @method bool hasNotice($record) - * @method bool hasInfo($record) - * @method bool hasDebug($record) - * - * @method bool hasEmergencyRecords() - * @method bool hasAlertRecords() - * @method bool hasCriticalRecords() - * @method bool hasErrorRecords() - * @method bool hasWarningRecords() - * @method bool hasNoticeRecords() - * @method bool hasInfoRecords() - * @method bool hasDebugRecords() - * - * @method bool hasEmergencyThatContains($message) - * @method bool hasAlertThatContains($message) - * @method bool hasCriticalThatContains($message) - * @method bool hasErrorThatContains($message) - * @method bool hasWarningThatContains($message) - * @method bool hasNoticeThatContains($message) - * @method bool hasInfoThatContains($message) - * @method bool hasDebugThatContains($message) - * - * @method bool hasEmergencyThatMatches($message) - * @method bool hasAlertThatMatches($message) - * @method bool hasCriticalThatMatches($message) - * @method bool hasErrorThatMatches($message) - * @method bool hasWarningThatMatches($message) - * @method bool hasNoticeThatMatches($message) - * @method bool hasInfoThatMatches($message) - * @method bool hasDebugThatMatches($message) - * - * @method bool hasEmergencyThatPasses($message) - * @method bool hasAlertThatPasses($message) - * @method bool hasCriticalThatPasses($message) - * @method bool hasErrorThatPasses($message) - * @method bool hasWarningThatPasses($message) - * @method bool hasNoticeThatPasses($message) - * @method bool hasInfoThatPasses($message) - * @method bool hasDebugThatPasses($message) - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class TestHandler extends AbstractProcessingHandler -{ - /** @var Record[] */ - protected $records = []; - /** @var array */ - protected $recordsByLevel = []; - /** @var bool */ - private $skipReset = false; - - /** - * @return array - * - * @phpstan-return Record[] - */ - public function getRecords() - { - return $this->records; - } - - /** - * @return void - */ - public function clear() - { - $this->records = []; - $this->recordsByLevel = []; - } - - /** - * @return void - */ - public function reset() - { - if (!$this->skipReset) { - $this->clear(); - } - } - - /** - * @return void - */ - public function setSkipReset(bool $skipReset) - { - $this->skipReset = $skipReset; - } - - /** - * @param string|int $level Logging level value or name - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecords($level): bool - { - return isset($this->recordsByLevel[Logger::toMonologLevel($level)]); - } - - /** - * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records - * @param string|int $level Logging level value or name - * - * @phpstan-param array{message: string, context?: mixed[]}|string $record - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecord($record, $level): bool - { - if (is_string($record)) { - $record = array('message' => $record); - } - - return $this->hasRecordThatPasses(function ($rec) use ($record) { - if ($rec['message'] !== $record['message']) { - return false; - } - if (isset($record['context']) && $rec['context'] !== $record['context']) { - return false; - } - - return true; - }, $level); - } - - /** - * @param string|int $level Logging level value or name - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecordThatContains(string $message, $level): bool - { - return $this->hasRecordThatPasses(function ($rec) use ($message) { - return strpos($rec['message'], $message) !== false; - }, $level); - } - - /** - * @param string|int $level Logging level value or name - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecordThatMatches(string $regex, $level): bool - { - return $this->hasRecordThatPasses(function (array $rec) use ($regex): bool { - return preg_match($regex, $rec['message']) > 0; - }, $level); - } - - /** - * @param string|int $level Logging level value or name - * @return bool - * - * @psalm-param callable(Record, int): mixed $predicate - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecordThatPasses(callable $predicate, $level) - { - $level = Logger::toMonologLevel($level); - - if (!isset($this->recordsByLevel[$level])) { - return false; - } - - foreach ($this->recordsByLevel[$level] as $i => $rec) { - if ($predicate($rec, $i)) { - return true; - } - } - - return false; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->recordsByLevel[$record['level']][] = $record; - $this->records[] = $record; - } - - /** - * @param string $method - * @param mixed[] $args - * @return bool - */ - public function __call($method, $args) - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = constant('Monolog\Logger::' . strtoupper($matches[2])); - $callback = [$this, $genericMethod]; - if (is_callable($callback)) { - $args[] = $level; - - return call_user_func_array($callback, $args); - } - } - - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php deleted file mode 100644 index c818352..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -trait WebRequestRecognizerTrait -{ - /** - * Checks if PHP's serving a web request - * @return bool - */ - protected function isWebRequest(): bool - { - return 'cli' !== \PHP_SAPI && 'phpdbg' !== \PHP_SAPI; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php deleted file mode 100644 index b6d3d3b..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Forwards records to multiple handlers suppressing failures of each handler - * and continuing through to give every handler a chance to succeed. - * - * @author Craig D'Amelio - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class WhatFailureGroupHandler extends GroupHandler -{ - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - foreach ($this->handlers as $handler) { - try { - $handler->handle($record); - } catch (\Throwable $e) { - // What failure? - } - } - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if ($this->processors) { - $processed = array(); - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - /** @var Record[] $records */ - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch($records); - } catch (\Throwable $e) { - // What failure? - } - } - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - try { - $handler->close(); - } catch (\Throwable $e) { - // What failure? - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php deleted file mode 100644 index ddd46d8..0000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Logger; - -/** - * Handler sending logs to Zend Monitor - * - * @author Christian Bergau - * @author Jason Davis - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class ZendMonitorHandler extends AbstractProcessingHandler -{ - /** - * Monolog level / ZendMonitor Custom Event priority map - * - * @var array - */ - protected $levelMap = []; - - /** - * @throws MissingExtensionException - */ - public function __construct($level = Logger::DEBUG, bool $bubble = true) - { - if (!function_exists('zend_monitor_custom_event')) { - throw new MissingExtensionException( - 'You must have Zend Server installed with Zend Monitor enabled in order to use this handler' - ); - } - //zend monitor constants are not defined if zend monitor is not enabled. - $this->levelMap = [ - Logger::DEBUG => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::INFO => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::NOTICE => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::WARNING => \ZEND_MONITOR_EVENT_SEVERITY_WARNING, - Logger::ERROR => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::CRITICAL => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::ALERT => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::EMERGENCY => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - ]; - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->writeZendMonitorCustomEvent( - Logger::getLevelName($record['level']), - $record['message'], - $record['formatted'], - $this->levelMap[$record['level']] - ); - } - - /** - * Write to Zend Monitor Events - * @param string $type Text displayed in "Class Name (custom)" field - * @param string $message Text displayed in "Error String" - * @param array $formatted Displayed in Custom Variables tab - * @param int $severity Set the event severity level (-1,0,1) - * - * @phpstan-param FormattedRecord $formatted - */ - protected function writeZendMonitorCustomEvent(string $type, string $message, array $formatted, int $severity): void - { - zend_monitor_custom_event($type, $message, $formatted, $severity); - } - - /** - * {@inheritDoc} - */ - public function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter(); - } - - /** - * @return array - */ - public function getLevelMap(): array - { - return $this->levelMap; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/LogRecord.php b/vendor/monolog/monolog/src/Monolog/LogRecord.php deleted file mode 100644 index 702807d..0000000 --- a/vendor/monolog/monolog/src/Monolog/LogRecord.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use ArrayAccess; - -/** - * Monolog log record interface for forward compatibility with Monolog 3.0 - * - * This is just present in Monolog 2.4+ to allow interoperable code to be written against - * both versions by type-hinting arguments as `array|\Monolog\LogRecord $record` - * - * Do not rely on this interface for other purposes, and do not implement it. - * - * @author Jordi Boggiano - * @template-extends \ArrayAccess<'message'|'level'|'context'|'level_name'|'channel'|'datetime'|'extra'|'formatted', mixed> - * @phpstan-import-type Record from Logger - */ -interface LogRecord extends \ArrayAccess -{ - /** - * @phpstan-return Record - */ - public function toArray(): array; -} diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php deleted file mode 100644 index 84a2f55..0000000 --- a/vendor/monolog/monolog/src/Monolog/Logger.php +++ /dev/null @@ -1,761 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use DateTimeZone; -use Monolog\Handler\HandlerInterface; -use Psr\Log\LoggerInterface; -use Psr\Log\InvalidArgumentException; -use Psr\Log\LogLevel; -use Throwable; -use Stringable; - -/** - * Monolog log channel - * - * It contains a stack of Handlers and a stack of Processors, - * and uses them to store records that are added to it. - * - * @author Jordi Boggiano - * - * @phpstan-type Level Logger::DEBUG|Logger::INFO|Logger::NOTICE|Logger::WARNING|Logger::ERROR|Logger::CRITICAL|Logger::ALERT|Logger::EMERGENCY - * @phpstan-type LevelName 'DEBUG'|'INFO'|'NOTICE'|'WARNING'|'ERROR'|'CRITICAL'|'ALERT'|'EMERGENCY' - * @phpstan-type Record array{message: string, context: mixed[], level: Level, level_name: LevelName, channel: string, datetime: \DateTimeImmutable, extra: mixed[]} - */ -class Logger implements LoggerInterface, ResettableInterface -{ - /** - * Detailed debug information - */ - public const DEBUG = 100; - - /** - * Interesting events - * - * Examples: User logs in, SQL logs. - */ - public const INFO = 200; - - /** - * Uncommon events - */ - public const NOTICE = 250; - - /** - * Exceptional occurrences that are not errors - * - * Examples: Use of deprecated APIs, poor use of an API, - * undesirable things that are not necessarily wrong. - */ - public const WARNING = 300; - - /** - * Runtime errors - */ - public const ERROR = 400; - - /** - * Critical conditions - * - * Example: Application component unavailable, unexpected exception. - */ - public const CRITICAL = 500; - - /** - * Action must be taken immediately - * - * Example: Entire website down, database unavailable, etc. - * This should trigger the SMS alerts and wake you up. - */ - public const ALERT = 550; - - /** - * Urgent alert. - */ - public const EMERGENCY = 600; - - /** - * Monolog API version - * - * This is only bumped when API breaks are done and should - * follow the major version of the library - * - * @var int - */ - public const API = 2; - - /** - * This is a static variable and not a constant to serve as an extension point for custom levels - * - * @var array $levels Logging levels with the levels as key - * - * @phpstan-var array $levels Logging levels with the levels as key - */ - protected static $levels = [ - self::DEBUG => 'DEBUG', - self::INFO => 'INFO', - self::NOTICE => 'NOTICE', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - self::CRITICAL => 'CRITICAL', - self::ALERT => 'ALERT', - self::EMERGENCY => 'EMERGENCY', - ]; - - /** - * Mapping between levels numbers defined in RFC 5424 and Monolog ones - * - * @phpstan-var array $rfc_5424_levels - */ - private const RFC_5424_LEVELS = [ - 7 => self::DEBUG, - 6 => self::INFO, - 5 => self::NOTICE, - 4 => self::WARNING, - 3 => self::ERROR, - 2 => self::CRITICAL, - 1 => self::ALERT, - 0 => self::EMERGENCY, - ]; - - /** - * @var string - */ - protected $name; - - /** - * The handler stack - * - * @var HandlerInterface[] - */ - protected $handlers; - - /** - * Processors that will process all log records - * - * To process records of a single handler instead, add the processor on that specific handler - * - * @var callable[] - */ - protected $processors; - - /** - * @var bool - */ - protected $microsecondTimestamps = true; - - /** - * @var DateTimeZone - */ - protected $timezone; - - /** - * @var callable|null - */ - protected $exceptionHandler; - - /** - * @var int Keeps track of depth to prevent infinite logging loops - */ - private $logDepth = 0; - - /** - * @var \WeakMap<\Fiber, int>|null Keeps track of depth inside fibers to prevent infinite logging loops - */ - private $fiberLogDepth; - - /** - * @var bool Whether to detect infinite logging loops - * - * This can be disabled via {@see useLoggingLoopDetection} if you have async handlers that do not play well with this - */ - private $detectCycles = true; - - /** - * @psalm-param array $processors - * - * @param string $name The logging channel, a simple descriptive name that is attached to all log records - * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. - * @param callable[] $processors Optional array of processors - * @param DateTimeZone|null $timezone Optional timezone, if not provided date_default_timezone_get() will be used - */ - public function __construct(string $name, array $handlers = [], array $processors = [], ?DateTimeZone $timezone = null) - { - $this->name = $name; - $this->setHandlers($handlers); - $this->processors = $processors; - $this->timezone = $timezone ?: new DateTimeZone(date_default_timezone_get() ?: 'UTC'); - - if (\PHP_VERSION_ID >= 80100) { - // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 - /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ - $fiberLogDepth = new \WeakMap(); - $this->fiberLogDepth = $fiberLogDepth; - } - } - - public function getName(): string - { - return $this->name; - } - - /** - * Return a new cloned instance with the name changed - */ - public function withName(string $name): self - { - $new = clone $this; - $new->name = $name; - - return $new; - } - - /** - * Pushes a handler on to the stack. - */ - public function pushHandler(HandlerInterface $handler): self - { - array_unshift($this->handlers, $handler); - - return $this; - } - - /** - * Pops a handler from the stack - * - * @throws \LogicException If empty handler stack - */ - public function popHandler(): HandlerInterface - { - if (!$this->handlers) { - throw new \LogicException('You tried to pop from an empty handler stack.'); - } - - return array_shift($this->handlers); - } - - /** - * Set handlers, replacing all existing ones. - * - * If a map is passed, keys will be ignored. - * - * @param HandlerInterface[] $handlers - */ - public function setHandlers(array $handlers): self - { - $this->handlers = []; - foreach (array_reverse($handlers) as $handler) { - $this->pushHandler($handler); - } - - return $this; - } - - /** - * @return HandlerInterface[] - */ - public function getHandlers(): array - { - return $this->handlers; - } - - /** - * Adds a processor on to the stack. - */ - public function pushProcessor(callable $callback): self - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * Removes the processor on top of the stack and returns it. - * - * @throws \LogicException If empty processor stack - * @return callable - */ - public function popProcessor(): callable - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * @return callable[] - */ - public function getProcessors(): array - { - return $this->processors; - } - - /** - * Control the use of microsecond resolution timestamps in the 'datetime' - * member of new records. - * - * As of PHP7.1 microseconds are always included by the engine, so - * there is no performance penalty and Monolog 2 enabled microseconds - * by default. This function lets you disable them though in case you want - * to suppress microseconds from the output. - * - * @param bool $micro True to use microtime() to create timestamps - */ - public function useMicrosecondTimestamps(bool $micro): self - { - $this->microsecondTimestamps = $micro; - - return $this; - } - - public function useLoggingLoopDetection(bool $detectCycles): self - { - $this->detectCycles = $detectCycles; - - return $this; - } - - /** - * Adds a log record. - * - * @param int $level The logging level (a Monolog or RFC 5424 level) - * @param string $message The log message - * @param mixed[] $context The log context - * @param DateTimeImmutable $datetime Optional log date to log into the past or future - * @return bool Whether the record has been processed - * - * @phpstan-param Level $level - */ - public function addRecord(int $level, string $message, array $context = [], DateTimeImmutable $datetime = null): bool - { - if (isset(self::RFC_5424_LEVELS[$level])) { - $level = self::RFC_5424_LEVELS[$level]; - } - - if ($this->detectCycles) { - if (\PHP_VERSION_ID >= 80100 && $fiber = \Fiber::getCurrent()) { - $this->fiberLogDepth[$fiber] = $this->fiberLogDepth[$fiber] ?? 0; - $logDepth = ++$this->fiberLogDepth[$fiber]; - } else { - $logDepth = ++$this->logDepth; - } - } else { - $logDepth = 0; - } - - if ($logDepth === 3) { - $this->warning('A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.'); - return false; - } elseif ($logDepth >= 5) { // log depth 4 is let through, so we can log the warning above - return false; - } - - try { - $record = null; - - foreach ($this->handlers as $handler) { - if (null === $record) { - // skip creating the record as long as no handler is going to handle it - if (!$handler->isHandling(['level' => $level])) { - continue; - } - - $levelName = static::getLevelName($level); - - $record = [ - 'message' => $message, - 'context' => $context, - 'level' => $level, - 'level_name' => $levelName, - 'channel' => $this->name, - 'datetime' => $datetime ?? new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), - 'extra' => [], - ]; - - try { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; - } - } - - // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted - try { - if (true === $handler->handle($record)) { - break; - } - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; - } - } - } finally { - if ($this->detectCycles) { - if (isset($fiber)) { - $this->fiberLogDepth[$fiber]--; - } else { - $this->logDepth--; - } - } - } - - return null !== $record; - } - - /** - * Ends a log cycle and frees all resources used by handlers. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * Handlers that have been closed should be able to accept log records again and re-open - * themselves on demand, but this may not always be possible depending on implementation. - * - * This is useful at the end of a request and will be called automatically on every handler - * when they get destructed. - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - $handler->close(); - } - } - - /** - * Ends a log cycle and resets all handlers and processors to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - */ - public function reset(): void - { - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } - - /** - * Gets all supported logging levels. - * - * @return array Assoc array with human-readable level names => level codes. - * @phpstan-return array - */ - public static function getLevels(): array - { - return array_flip(static::$levels); - } - - /** - * Gets the name of the logging level. - * - * @throws \Psr\Log\InvalidArgumentException If level is not defined - * - * @phpstan-param Level $level - * @phpstan-return LevelName - */ - public static function getLevelName(int $level): string - { - if (!isset(static::$levels[$level])) { - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels))); - } - - return static::$levels[$level]; - } - - /** - * Converts PSR-3 levels to Monolog ones if necessary - * - * @param string|int $level Level number (monolog) or name (PSR-3) - * @throws \Psr\Log\InvalidArgumentException If level is not defined - * - * @phpstan-param Level|LevelName|LogLevel::* $level - * @phpstan-return Level - */ - public static function toMonologLevel($level): int - { - if (is_string($level)) { - if (is_numeric($level)) { - /** @phpstan-ignore-next-line */ - return intval($level); - } - - // Contains chars of all log levels and avoids using strtoupper() which may have - // strange results depending on locale (for example, "i" will become "İ" in Turkish locale) - $upper = strtr($level, 'abcdefgilmnortuwy', 'ABCDEFGILMNORTUWY'); - if (defined(__CLASS__.'::'.$upper)) { - return constant(__CLASS__ . '::' . $upper); - } - - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels) + static::$levels)); - } - - if (!is_int($level)) { - throw new InvalidArgumentException('Level "'.var_export($level, true).'" is not defined, use one of: '.implode(', ', array_keys(static::$levels) + static::$levels)); - } - - return $level; - } - - /** - * Checks whether the Logger has a handler that listens on the given level - * - * @phpstan-param Level $level - */ - public function isHandling(int $level): bool - { - $record = [ - 'level' => $level, - ]; - - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * Set a custom exception handler that will be called if adding a new record fails - * - * The callable will receive an exception object and the record that failed to be logged - */ - public function setExceptionHandler(?callable $callback): self - { - $this->exceptionHandler = $callback; - - return $this; - } - - public function getExceptionHandler(): ?callable - { - return $this->exceptionHandler; - } - - /** - * Adds a log record at an arbitrary level. - * - * This method allows for compatibility with common interfaces. - * - * @param mixed $level The log level (a Monolog, PSR-3 or RFC 5424 level) - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function log($level, $message, array $context = []): void - { - if (!is_int($level) && !is_string($level)) { - throw new \InvalidArgumentException('$level is expected to be a string or int'); - } - - if (isset(self::RFC_5424_LEVELS[$level])) { - $level = self::RFC_5424_LEVELS[$level]; - } - - $level = static::toMonologLevel($level); - - $this->addRecord($level, (string) $message, $context); - } - - /** - * Adds a log record at the DEBUG level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function debug($message, array $context = []): void - { - $this->addRecord(static::DEBUG, (string) $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function info($message, array $context = []): void - { - $this->addRecord(static::INFO, (string) $message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function notice($message, array $context = []): void - { - $this->addRecord(static::NOTICE, (string) $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function warning($message, array $context = []): void - { - $this->addRecord(static::WARNING, (string) $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function error($message, array $context = []): void - { - $this->addRecord(static::ERROR, (string) $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function critical($message, array $context = []): void - { - $this->addRecord(static::CRITICAL, (string) $message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function alert($message, array $context = []): void - { - $this->addRecord(static::ALERT, (string) $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function emergency($message, array $context = []): void - { - $this->addRecord(static::EMERGENCY, (string) $message, $context); - } - - /** - * Sets the timezone to be used for the timestamp of log records. - */ - public function setTimezone(DateTimeZone $tz): self - { - $this->timezone = $tz; - - return $this; - } - - /** - * Returns the timezone to be used for the timestamp of log records. - */ - public function getTimezone(): DateTimeZone - { - return $this->timezone; - } - - /** - * Delegates exception management to the custom exception handler, - * or throws the exception if no custom handler is set. - * - * @param array $record - * @phpstan-param Record $record - */ - protected function handleException(Throwable $e, array $record): void - { - if (!$this->exceptionHandler) { - throw $e; - } - - ($this->exceptionHandler)($e, $record); - } - - /** - * @return array - */ - public function __serialize(): array - { - return [ - 'name' => $this->name, - 'handlers' => $this->handlers, - 'processors' => $this->processors, - 'microsecondTimestamps' => $this->microsecondTimestamps, - 'timezone' => $this->timezone, - 'exceptionHandler' => $this->exceptionHandler, - 'logDepth' => $this->logDepth, - 'detectCycles' => $this->detectCycles, - ]; - } - - /** - * @param array $data - */ - public function __unserialize(array $data): void - { - foreach (['name', 'handlers', 'processors', 'microsecondTimestamps', 'timezone', 'exceptionHandler', 'logDepth', 'detectCycles'] as $property) { - if (isset($data[$property])) { - $this->$property = $data[$property]; - } - } - - if (\PHP_VERSION_ID >= 80100) { - // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 - /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ - $fiberLogDepth = new \WeakMap(); - $this->fiberLogDepth = $fiberLogDepth; - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php deleted file mode 100644 index 8166bdc..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Injects Git branch and Git commit SHA in all records - * - * @author Nick Otter - * @author Jordi Boggiano - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class GitProcessor implements ProcessorInterface -{ - /** @var int */ - private $level; - /** @var array{branch: string, commit: string}|array|null */ - private static $cache = null; - - /** - * @param string|int $level The minimum logging level at which this Processor will be triggered - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - $record['extra']['git'] = self::getGitInfo(); - - return $record; - } - - /** - * @return array{branch: string, commit: string}|array - */ - private static function getGitInfo(): array - { - if (self::$cache) { - return self::$cache; - } - - $branches = `git branch -v --no-abbrev`; - if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { - return self::$cache = [ - 'branch' => $matches[1], - 'commit' => $matches[2], - ]; - } - - return self::$cache = []; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php deleted file mode 100644 index 91fda7d..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects value of gethostname in all records - */ -class HostnameProcessor implements ProcessorInterface -{ - /** @var string */ - private static $host; - - public function __construct() - { - self::$host = (string) gethostname(); - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $record['extra']['hostname'] = self::$host; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php deleted file mode 100644 index a32e76b..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Injects line/file:class/function where the log message came from - * - * Warning: This only works if the handler processes the logs directly. - * If you put the processor on a handler that is behind a FingersCrossedHandler - * for example, the processor will only be called once the trigger level is reached, - * and all the log records will have the same file/line/.. data from the call that - * triggered the FingersCrossedHandler. - * - * @author Jordi Boggiano - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class IntrospectionProcessor implements ProcessorInterface -{ - /** @var int */ - private $level; - /** @var string[] */ - private $skipClassesPartials; - /** @var int */ - private $skipStackFramesCount; - /** @var string[] */ - private $skipFunctions = [ - 'call_user_func', - 'call_user_func_array', - ]; - - /** - * @param string|int $level The minimum logging level at which this Processor will be triggered - * @param string[] $skipClassesPartials - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG, array $skipClassesPartials = [], int $skipStackFramesCount = 0) - { - $this->level = Logger::toMonologLevel($level); - $this->skipClassesPartials = array_merge(['Monolog\\'], $skipClassesPartials); - $this->skipStackFramesCount = $skipStackFramesCount; - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - - // skip first since it's always the current method - array_shift($trace); - // the call_user_func call is also skipped - array_shift($trace); - - $i = 0; - - while ($this->isTraceClassOrSkippedFunction($trace, $i)) { - if (isset($trace[$i]['class'])) { - foreach ($this->skipClassesPartials as $part) { - if (strpos($trace[$i]['class'], $part) !== false) { - $i++; - - continue 2; - } - } - } elseif (in_array($trace[$i]['function'], $this->skipFunctions)) { - $i++; - - continue; - } - - break; - } - - $i += $this->skipStackFramesCount; - - // we should have the call source now - $record['extra'] = array_merge( - $record['extra'], - [ - 'file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null, - 'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null, - 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, - 'callType' => isset($trace[$i]['type']) ? $trace[$i]['type'] : null, - 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null, - ] - ); - - return $record; - } - - /** - * @param array[] $trace - */ - private function isTraceClassOrSkippedFunction(array $trace, int $index): bool - { - if (!isset($trace[$index])) { - return false; - } - - return isset($trace[$index]['class']) || in_array($trace[$index]['function'], $this->skipFunctions); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php deleted file mode 100644 index 37c756f..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects memory_get_peak_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryPeakUsageProcessor extends MemoryProcessor -{ - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $usage = memory_get_peak_usage($this->realUsage); - - if ($this->useFormatting) { - $usage = $this->formatBytes($usage); - } - - $record['extra']['memory_peak_usage'] = $usage; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php deleted file mode 100644 index 227deb7..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Some methods that are common for all memory processors - * - * @author Rob Jensen - */ -abstract class MemoryProcessor implements ProcessorInterface -{ - /** - * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. - */ - protected $realUsage; - - /** - * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - protected $useFormatting; - - /** - * @param bool $realUsage Set this to true to get the real size of memory allocated from system. - * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - public function __construct(bool $realUsage = true, bool $useFormatting = true) - { - $this->realUsage = $realUsage; - $this->useFormatting = $useFormatting; - } - - /** - * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is - * - * @param int $bytes - * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as int - */ - protected function formatBytes(int $bytes) - { - if (!$this->useFormatting) { - return $bytes; - } - - if ($bytes > 1024 * 1024) { - return round($bytes / 1024 / 1024, 2).' MB'; - } elseif ($bytes > 1024) { - return round($bytes / 1024, 2).' KB'; - } - - return $bytes . ' B'; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php deleted file mode 100644 index e141921..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects memory_get_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryUsageProcessor extends MemoryProcessor -{ - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $usage = memory_get_usage($this->realUsage); - - if ($this->useFormatting) { - $usage = $this->formatBytes($usage); - } - - $record['extra']['memory_usage'] = $usage; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php deleted file mode 100644 index d4a628f..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Injects Hg branch and Hg revision number in all records - * - * @author Jonathan A. Schweder - * - * @phpstan-import-type LevelName from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - */ -class MercurialProcessor implements ProcessorInterface -{ - /** @var Level */ - private $level; - /** @var array{branch: string, revision: string}|array|null */ - private static $cache = null; - - /** - * @param int|string $level The minimum logging level at which this Processor will be triggered - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - $record['extra']['hg'] = self::getMercurialInfo(); - - return $record; - } - - /** - * @return array{branch: string, revision: string}|array - */ - private static function getMercurialInfo(): array - { - if (self::$cache) { - return self::$cache; - } - - $result = explode(' ', trim(`hg id -nb`)); - - if (count($result) >= 3) { - return self::$cache = [ - 'branch' => $result[1], - 'revision' => $result[2], - ]; - } - - return self::$cache = []; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php deleted file mode 100644 index 3b939a9..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Adds value of getmypid into records - * - * @author Andreas Hörnicke - */ -class ProcessIdProcessor implements ProcessorInterface -{ - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $record['extra']['process_id'] = getmypid(); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php deleted file mode 100644 index 5defb7e..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * An optional interface to allow labelling Monolog processors. - * - * @author Nicolas Grekas - * - * @phpstan-import-type Record from \Monolog\Logger - */ -interface ProcessorInterface -{ - /** - * @return array The processed record - * - * @phpstan-param Record $record - * @phpstan-return Record - */ - public function __invoke(array $record); -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php deleted file mode 100644 index e7c1217..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Utils; - -/** - * Processes a record's message according to PSR-3 rules - * - * It replaces {foo} with the value from $context['foo'] - * - * @author Jordi Boggiano - */ -class PsrLogMessageProcessor implements ProcessorInterface -{ - public const SIMPLE_DATE = "Y-m-d\TH:i:s.uP"; - - /** @var string|null */ - private $dateFormat; - - /** @var bool */ - private $removeUsedContextFields; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset - */ - public function __construct(?string $dateFormat = null, bool $removeUsedContextFields = false) - { - $this->dateFormat = $dateFormat; - $this->removeUsedContextFields = $removeUsedContextFields; - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - if (false === strpos($record['message'], '{')) { - return $record; - } - - $replacements = []; - foreach ($record['context'] as $key => $val) { - $placeholder = '{' . $key . '}'; - if (strpos($record['message'], $placeholder) === false) { - continue; - } - - if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { - $replacements[$placeholder] = $val; - } elseif ($val instanceof \DateTimeInterface) { - if (!$this->dateFormat && $val instanceof \Monolog\DateTimeImmutable) { - // handle monolog dates using __toString if no specific dateFormat was asked for - // so that it follows the useMicroseconds flag - $replacements[$placeholder] = (string) $val; - } else { - $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE); - } - } elseif ($val instanceof \UnitEnum) { - $replacements[$placeholder] = $val instanceof \BackedEnum ? $val->value : $val->name; - } elseif (is_object($val)) { - $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; - } elseif (is_array($val)) { - $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true); - } else { - $replacements[$placeholder] = '['.gettype($val).']'; - } - - if ($this->removeUsedContextFields) { - unset($record['context'][$key]); - } - } - - $record['message'] = strtr($record['message'], $replacements); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php deleted file mode 100644 index 80f1874..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Adds a tags array into record - * - * @author Martijn Riemers - */ -class TagProcessor implements ProcessorInterface -{ - /** @var string[] */ - private $tags; - - /** - * @param string[] $tags - */ - public function __construct(array $tags = []) - { - $this->setTags($tags); - } - - /** - * @param string[] $tags - */ - public function addTags(array $tags = []): self - { - $this->tags = array_merge($this->tags, $tags); - - return $this; - } - - /** - * @param string[] $tags - */ - public function setTags(array $tags = []): self - { - $this->tags = $tags; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $record['extra']['tags'] = $this->tags; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php deleted file mode 100644 index a27b74d..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\ResettableInterface; - -/** - * Adds a unique identifier into records - * - * @author Simon Mönch - */ -class UidProcessor implements ProcessorInterface, ResettableInterface -{ - /** @var string */ - private $uid; - - public function __construct(int $length = 7) - { - if ($length > 32 || $length < 1) { - throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); - } - - $this->uid = $this->generateUid($length); - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $record['extra']['uid'] = $this->uid; - - return $record; - } - - public function getUid(): string - { - return $this->uid; - } - - public function reset() - { - $this->uid = $this->generateUid(strlen($this->uid)); - } - - private function generateUid(int $length): string - { - return substr(bin2hex(random_bytes((int) ceil($length / 2))), 0, $length); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php deleted file mode 100644 index 51850e1..0000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects url/method and remote IP of the current web request in all records - * - * @author Jordi Boggiano - */ -class WebProcessor implements ProcessorInterface -{ - /** - * @var array|\ArrayAccess - */ - protected $serverData; - - /** - * Default fields - * - * Array is structured as [key in record.extra => key in $serverData] - * - * @var array - */ - protected $extraFields = [ - 'url' => 'REQUEST_URI', - 'ip' => 'REMOTE_ADDR', - 'http_method' => 'REQUEST_METHOD', - 'server' => 'SERVER_NAME', - 'referrer' => 'HTTP_REFERER', - 'user_agent' => 'HTTP_USER_AGENT', - ]; - - /** - * @param array|\ArrayAccess|null $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data - * @param array|array|null $extraFields Field names and the related key inside $serverData to be added (or just a list of field names to use the default configured $serverData mapping). If not provided it defaults to: [url, ip, http_method, server, referrer] + unique_id if present in server data - */ - public function __construct($serverData = null, array $extraFields = null) - { - if (null === $serverData) { - $this->serverData = &$_SERVER; - } elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) { - $this->serverData = $serverData; - } else { - throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); - } - - $defaultEnabled = ['url', 'ip', 'http_method', 'server', 'referrer']; - if (isset($this->serverData['UNIQUE_ID'])) { - $this->extraFields['unique_id'] = 'UNIQUE_ID'; - $defaultEnabled[] = 'unique_id'; - } - - if (null === $extraFields) { - $extraFields = $defaultEnabled; - } - if (isset($extraFields[0])) { - foreach (array_keys($this->extraFields) as $fieldName) { - if (!in_array($fieldName, $extraFields)) { - unset($this->extraFields[$fieldName]); - } - } - } else { - $this->extraFields = $extraFields; - } - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - // skip processing if for some reason request data - // is not present (CLI or wonky SAPIs) - if (!isset($this->serverData['REQUEST_URI'])) { - return $record; - } - - $record['extra'] = $this->appendExtraFields($record['extra']); - - return $record; - } - - public function addExtraField(string $extraName, string $serverName): self - { - $this->extraFields[$extraName] = $serverName; - - return $this; - } - - /** - * @param mixed[] $extra - * @return mixed[] - */ - private function appendExtraFields(array $extra): array - { - foreach ($this->extraFields as $extraName => $serverName) { - $extra[$extraName] = $this->serverData[$serverName] ?? null; - } - - return $extra; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Registry.php b/vendor/monolog/monolog/src/Monolog/Registry.php deleted file mode 100644 index ae94ae6..0000000 --- a/vendor/monolog/monolog/src/Monolog/Registry.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use InvalidArgumentException; - -/** - * Monolog log registry - * - * Allows to get `Logger` instances in the global scope - * via static method calls on this class. - * - * - * $application = new Monolog\Logger('application'); - * $api = new Monolog\Logger('api'); - * - * Monolog\Registry::addLogger($application); - * Monolog\Registry::addLogger($api); - * - * function testLogger() - * { - * Monolog\Registry::api()->error('Sent to $api Logger instance'); - * Monolog\Registry::application()->error('Sent to $application Logger instance'); - * } - * - * - * @author Tomas Tatarko - */ -class Registry -{ - /** - * List of all loggers in the registry (by named indexes) - * - * @var Logger[] - */ - private static $loggers = []; - - /** - * Adds new logging channel to the registry - * - * @param Logger $logger Instance of the logging channel - * @param string|null $name Name of the logging channel ($logger->getName() by default) - * @param bool $overwrite Overwrite instance in the registry if the given name already exists? - * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists - * @return void - */ - public static function addLogger(Logger $logger, ?string $name = null, bool $overwrite = false) - { - $name = $name ?: $logger->getName(); - - if (isset(self::$loggers[$name]) && !$overwrite) { - throw new InvalidArgumentException('Logger with the given name already exists'); - } - - self::$loggers[$name] = $logger; - } - - /** - * Checks if such logging channel exists by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function hasLogger($logger): bool - { - if ($logger instanceof Logger) { - $index = array_search($logger, self::$loggers, true); - - return false !== $index; - } - - return isset(self::$loggers[$logger]); - } - - /** - * Removes instance from registry by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function removeLogger($logger): void - { - if ($logger instanceof Logger) { - if (false !== ($idx = array_search($logger, self::$loggers, true))) { - unset(self::$loggers[$idx]); - } - } else { - unset(self::$loggers[$logger]); - } - } - - /** - * Clears the registry - */ - public static function clear(): void - { - self::$loggers = []; - } - - /** - * Gets Logger instance from the registry - * - * @param string $name Name of the requested Logger instance - * @throws \InvalidArgumentException If named Logger instance is not in the registry - */ - public static function getInstance($name): Logger - { - if (!isset(self::$loggers[$name])) { - throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); - } - - return self::$loggers[$name]; - } - - /** - * Gets Logger instance from the registry via static method call - * - * @param string $name Name of the requested Logger instance - * @param mixed[] $arguments Arguments passed to static method call - * @throws \InvalidArgumentException If named Logger instance is not in the registry - * @return Logger Requested instance of Logger - */ - public static function __callStatic($name, $arguments) - { - return self::getInstance($name); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/ResettableInterface.php b/vendor/monolog/monolog/src/Monolog/ResettableInterface.php deleted file mode 100644 index 2c5fd78..0000000 --- a/vendor/monolog/monolog/src/Monolog/ResettableInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -/** - * Handler or Processor implementing this interface will be reset when Logger::reset() is called. - * - * Resetting ends a log cycle gets them back to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - * - * @author Grégoire Pineau - */ -interface ResettableInterface -{ - /** - * @return void - */ - public function reset(); -} diff --git a/vendor/monolog/monolog/src/Monolog/SignalHandler.php b/vendor/monolog/monolog/src/Monolog/SignalHandler.php deleted file mode 100644 index d730eea..0000000 --- a/vendor/monolog/monolog/src/Monolog/SignalHandler.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use ReflectionExtension; - -/** - * Monolog POSIX signal handler - * - * @author Robert Gust-Bardon - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class SignalHandler -{ - /** @var LoggerInterface */ - private $logger; - - /** @var array SIG_DFL, SIG_IGN or previous callable */ - private $previousSignalHandler = []; - /** @var array */ - private $signalLevelMap = []; - /** @var array */ - private $signalRestartSyscalls = []; - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * @param int|string $level Level or level name - * @param bool $callPrevious - * @param bool $restartSyscalls - * @param bool|null $async - * @return $this - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function registerSignalHandler(int $signo, $level = LogLevel::CRITICAL, bool $callPrevious = true, bool $restartSyscalls = true, ?bool $async = true): self - { - if (!extension_loaded('pcntl') || !function_exists('pcntl_signal')) { - return $this; - } - - $level = Logger::toMonologLevel($level); - - if ($callPrevious) { - $handler = pcntl_signal_get_handler($signo); - $this->previousSignalHandler[$signo] = $handler; - } else { - unset($this->previousSignalHandler[$signo]); - } - $this->signalLevelMap[$signo] = $level; - $this->signalRestartSyscalls[$signo] = $restartSyscalls; - - if ($async !== null) { - pcntl_async_signals($async); - } - - pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); - - return $this; - } - - /** - * @param mixed $siginfo - */ - public function handleSignal(int $signo, $siginfo = null): void - { - static $signals = []; - - if (!$signals && extension_loaded('pcntl')) { - $pcntl = new ReflectionExtension('pcntl'); - // HHVM 3.24.2 returns an empty array. - foreach ($pcntl->getConstants() ?: get_defined_constants(true)['Core'] as $name => $value) { - if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && is_int($value)) { - $signals[$value] = $name; - } - } - } - - $level = $this->signalLevelMap[$signo] ?? LogLevel::CRITICAL; - $signal = $signals[$signo] ?? $signo; - $context = $siginfo ?? []; - $this->logger->log($level, sprintf('Program received signal %s', $signal), $context); - - if (!isset($this->previousSignalHandler[$signo])) { - return; - } - - if ($this->previousSignalHandler[$signo] === SIG_DFL) { - if (extension_loaded('pcntl') && function_exists('pcntl_signal') && function_exists('pcntl_sigprocmask') && function_exists('pcntl_signal_dispatch') - && extension_loaded('posix') && function_exists('posix_getpid') && function_exists('posix_kill') - ) { - $restartSyscalls = $this->signalRestartSyscalls[$signo] ?? true; - pcntl_signal($signo, SIG_DFL, $restartSyscalls); - pcntl_sigprocmask(SIG_UNBLOCK, [$signo], $oldset); - posix_kill(posix_getpid(), $signo); - pcntl_signal_dispatch(); - pcntl_sigprocmask(SIG_SETMASK, $oldset); - pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); - } - } elseif (is_callable($this->previousSignalHandler[$signo])) { - $this->previousSignalHandler[$signo]($signo, $siginfo); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Test/TestCase.php b/vendor/monolog/monolog/src/Monolog/Test/TestCase.php deleted file mode 100644 index bc0b425..0000000 --- a/vendor/monolog/monolog/src/Monolog/Test/TestCase.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Test; - -use Monolog\Logger; -use Monolog\DateTimeImmutable; -use Monolog\Formatter\FormatterInterface; - -/** - * Lets you easily generate log records and a dummy formatter for testing purposes - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * - * @internal feel free to reuse this to test your own handlers, this is marked internal to avoid issues with PHPStorm https://github.com/Seldaek/monolog/issues/1677 - */ -class TestCase extends \PHPUnit\Framework\TestCase -{ - public function tearDown(): void - { - parent::tearDown(); - - if (isset($this->handler)) { - unset($this->handler); - } - } - - /** - * @param mixed[] $context - * - * @return array Record - * - * @phpstan-param Level $level - * @phpstan-return Record - */ - protected function getRecord(int $level = Logger::WARNING, string $message = 'test', array $context = []): array - { - return [ - 'message' => (string) $message, - 'context' => $context, - 'level' => $level, - 'level_name' => Logger::getLevelName($level), - 'channel' => 'test', - 'datetime' => new DateTimeImmutable(true), - 'extra' => [], - ]; - } - - /** - * @phpstan-return Record[] - */ - protected function getMultipleRecords(): array - { - return [ - $this->getRecord(Logger::DEBUG, 'debug message 1'), - $this->getRecord(Logger::DEBUG, 'debug message 2'), - $this->getRecord(Logger::INFO, 'information'), - $this->getRecord(Logger::WARNING, 'warning'), - $this->getRecord(Logger::ERROR, 'error'), - ]; - } - - protected function getIdentityFormatter(): FormatterInterface - { - $formatter = $this->createMock(FormatterInterface::class); - $formatter->expects($this->any()) - ->method('format') - ->will($this->returnCallback(function ($record) { - return $record['message']; - })); - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Utils.php b/vendor/monolog/monolog/src/Monolog/Utils.php deleted file mode 100644 index 360c421..0000000 --- a/vendor/monolog/monolog/src/Monolog/Utils.php +++ /dev/null @@ -1,284 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -final class Utils -{ - const DEFAULT_JSON_FLAGS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PARTIAL_OUTPUT_ON_ERROR; - - public static function getClass(object $object): string - { - $class = \get_class($object); - - if (false === ($pos = \strpos($class, "@anonymous\0"))) { - return $class; - } - - if (false === ($parent = \get_parent_class($class))) { - return \substr($class, 0, $pos + 10); - } - - return $parent . '@anonymous'; - } - - public static function substr(string $string, int $start, ?int $length = null): string - { - if (extension_loaded('mbstring')) { - return mb_strcut($string, $start, $length); - } - - return substr($string, $start, (null === $length) ? strlen($string) : $length); - } - - /** - * Makes sure if a relative path is passed in it is turned into an absolute path - * - * @param string $streamUrl stream URL or path without protocol - */ - public static function canonicalizePath(string $streamUrl): string - { - $prefix = ''; - if ('file://' === substr($streamUrl, 0, 7)) { - $streamUrl = substr($streamUrl, 7); - $prefix = 'file://'; - } - - // other type of stream, not supported - if (false !== strpos($streamUrl, '://')) { - return $streamUrl; - } - - // already absolute - if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') { - return $prefix.$streamUrl; - } - - $streamUrl = getcwd() . '/' . $streamUrl; - - return $prefix.$streamUrl; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @param int $encodeFlags flags to pass to json encode, defaults to DEFAULT_JSON_FLAGS - * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string when errors are ignored and the encoding fails, "null" is returned which is valid json for null - */ - public static function jsonEncode($data, ?int $encodeFlags = null, bool $ignoreErrors = false): string - { - if (null === $encodeFlags) { - $encodeFlags = self::DEFAULT_JSON_FLAGS; - } - - if ($ignoreErrors) { - $json = @json_encode($data, $encodeFlags); - if (false === $json) { - return 'null'; - } - - return $json; - } - - $json = json_encode($data, $encodeFlags); - if (false === $json) { - $json = self::handleJsonError(json_last_error(), $data); - } - - return $json; - } - - /** - * Handle a json_encode failure. - * - * If the failure is due to invalid string encoding, try to clean the - * input and encode again. If the second encoding attempt fails, the - * initial error is not encoding related or the input can't be cleaned then - * raise a descriptive exception. - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION - * @throws \RuntimeException if failure can't be corrected - * @return string JSON encoded data after error correction - */ - public static function handleJsonError(int $code, $data, ?int $encodeFlags = null): string - { - if ($code !== JSON_ERROR_UTF8) { - self::throwEncodeError($code, $data); - } - - if (is_string($data)) { - self::detectAndCleanUtf8($data); - } elseif (is_array($data)) { - array_walk_recursive($data, array('Monolog\Utils', 'detectAndCleanUtf8')); - } else { - self::throwEncodeError($code, $data); - } - - if (null === $encodeFlags) { - $encodeFlags = self::DEFAULT_JSON_FLAGS; - } - - $json = json_encode($data, $encodeFlags); - - if ($json === false) { - self::throwEncodeError(json_last_error(), $data); - } - - return $json; - } - - /** - * @internal - */ - public static function pcreLastErrorMessage(int $code): string - { - if (PHP_VERSION_ID >= 80000) { - return preg_last_error_msg(); - } - - $constants = (get_defined_constants(true))['pcre']; - $constants = array_filter($constants, function ($key) { - return substr($key, -6) == '_ERROR'; - }, ARRAY_FILTER_USE_KEY); - - $constants = array_flip($constants); - - return $constants[$code] ?? 'UNDEFINED_ERROR'; - } - - /** - * Throws an exception according to a given code with a customized message - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @throws \RuntimeException - * - * @return never - */ - private static function throwEncodeError(int $code, $data): void - { - switch ($code) { - case JSON_ERROR_DEPTH: - $msg = 'Maximum stack depth exceeded'; - break; - case JSON_ERROR_STATE_MISMATCH: - $msg = 'Underflow or the modes mismatch'; - break; - case JSON_ERROR_CTRL_CHAR: - $msg = 'Unexpected control character found'; - break; - case JSON_ERROR_UTF8: - $msg = 'Malformed UTF-8 characters, possibly incorrectly encoded'; - break; - default: - $msg = 'Unknown error'; - } - - throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); - } - - /** - * Detect invalid UTF-8 string characters and convert to valid UTF-8. - * - * Valid UTF-8 input will be left unmodified, but strings containing - * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed - * original encoding of ISO-8859-15. This conversion may result in - * incorrect output if the actual encoding was not ISO-8859-15, but it - * will be clean UTF-8 output and will not rely on expensive and fragile - * detection algorithms. - * - * Function converts the input in place in the passed variable so that it - * can be used as a callback for array_walk_recursive. - * - * @param mixed $data Input to check and convert if needed, passed by ref - */ - private static function detectAndCleanUtf8(&$data): void - { - if (is_string($data) && !preg_match('//u', $data)) { - $data = preg_replace_callback( - '/[\x80-\xFF]+/', - function ($m) { - return function_exists('mb_convert_encoding') ? mb_convert_encoding($m[0], 'UTF-8', 'ISO-8859-1') : utf8_encode($m[0]); - }, - $data - ); - if (!is_string($data)) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Failed to preg_replace_callback: ' . $pcreErrorCode . ' / ' . self::pcreLastErrorMessage($pcreErrorCode)); - } - $data = str_replace( - ['¤', '¦', '¨', '´', '¸', '¼', '½', '¾'], - ['€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'], - $data - ); - } - } - - /** - * Converts a string with a valid 'memory_limit' format, to bytes. - * - * @param string|false $val - * @return int|false Returns an integer representing bytes. Returns FALSE in case of error. - */ - public static function expandIniShorthandBytes($val) - { - if (!is_string($val)) { - return false; - } - - // support -1 - if ((int) $val < 0) { - return (int) $val; - } - - if (!preg_match('/^\s*(?\d+)(?:\.\d+)?\s*(?[gmk]?)\s*$/i', $val, $match)) { - return false; - } - - $val = (int) $match['val']; - switch (strtolower($match['unit'] ?? '')) { - case 'g': - $val *= 1024; - case 'm': - $val *= 1024; - case 'k': - $val *= 1024; - } - - return $val; - } - - /** - * @param array $record - */ - public static function getRecordMessageForException(array $record): string - { - $context = ''; - $extra = ''; - try { - if ($record['context']) { - $context = "\nContext: " . json_encode($record['context']); - } - if ($record['extra']) { - $extra = "\nExtra: " . json_encode($record['extra']); - } - } catch (\Throwable $e) { - // noop - } - - return "\nThe exception occurred while attempting to log: " . $record['message'] . $context . $extra; - } -} diff --git a/vendor/mtdowling/jmespath.php/CHANGELOG.md b/vendor/mtdowling/jmespath.php/CHANGELOG.md deleted file mode 100644 index f1dd6d5..0000000 --- a/vendor/mtdowling/jmespath.php/CHANGELOG.md +++ /dev/null @@ -1,68 +0,0 @@ -# CHANGELOG - -## 2.7.0 - UPCOMING - -* Fixed flattening in arrays starting with null -* Drop support for HHVM and PHP earlier than 7.2.5. -* Add support for PHP 8.1, 8.2, and 8.3. - -## 2.6.0 - 2020-07-31 - -* Support for PHP 8.0. - -## 2.5.0 - 2019-12-30 - -* Full support for PHP 7.0-7.4. -* Fixed autoloading when run from within vendor folder. -* Full multibyte (UTF-8) string support. - -## 2.4.0 - 2016-12-03 - -* Added support for floats when interpreting data. -* Added a function_exists check to work around redeclaration issues. - -## 2.3.0 - 2016-01-05 - -* Added support for [JEP-9](https://github.com/jmespath/jmespath.site/blob/master/docs/proposals/improved-filters.rst), - including unary filter expressions, and `&&` filter expressions. -* Fixed various parsing issues, including not removing escaped single quotes - from raw string literals. -* Added support for the `map` function. -* Fixed several issues with code generation. - -## 2.2.0 - 2015-05-27 - -* Added support for [JEP-12](https://github.com/jmespath/jmespath.site/blob/master/docs/proposals/raw-string-literals.rst) - and raw string literals (e.g., `'foo'`). - -## 2.1.0 - 2014-01-13 - -* Added `JmesPath\Env::cleanCompileDir()` to delete any previously compiled - JMESPath expressions. - -## 2.0.0 - 2014-01-11 - -* Moving to a flattened namespace structure. -* Runtimes are now only PHP callables. -* Fixed an error in the way empty JSON literals are parsed so that they now - return an empty string to match the Python and JavaScript implementations. -* Removed functions from runtimes. Instead there is now a function dispatcher - class, FnDispatcher, that provides function implementations behind a single - dispatch function. -* Removed ExprNode in lieu of just using a PHP callable with bound variables. -* Removed debug methods from runtimes and instead into a new Debugger class. -* Heavily cleaned up function argument validation. -* Slice syntax is now properly validated (i.e., colons are followed by the - appropriate value). -* Lots of code cleanup and performance improvements. -* Added a convenient `JmesPath\search()` function. -* **IMPORTANT**: Relocating the project to https://github.com/jmespath/jmespath.php - -## 1.1.1 - 2014-10-08 - -* Added support for using ArrayAccess and Countable as arrays and objects. - -## 1.1.0 - 2014-08-06 - -* Added the ability to search data returned from json_decode() where JSON - objects are returned as stdClass objects. diff --git a/vendor/mtdowling/jmespath.php/LICENSE b/vendor/mtdowling/jmespath.php/LICENSE deleted file mode 100644 index 5c970a4..0000000 --- a/vendor/mtdowling/jmespath.php/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Michael Dowling, https://github.com/mtdowling - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/mtdowling/jmespath.php/README.rst b/vendor/mtdowling/jmespath.php/README.rst deleted file mode 100644 index bef8db4..0000000 --- a/vendor/mtdowling/jmespath.php/README.rst +++ /dev/null @@ -1,123 +0,0 @@ -============ -jmespath.php -============ - -JMESPath (pronounced "jaymz path") allows you to declaratively specify how to -extract elements from a JSON document. *jmespath.php* allows you to use -JMESPath in PHP applications with PHP data structures. It requires PHP 7.2.5 or -greater and can be installed through `Composer `_ -using the ``mtdowling/jmespath.php`` package. - -.. code-block:: php - - require 'vendor/autoload.php'; - - $expression = 'foo.*.baz'; - - $data = [ - 'foo' => [ - 'bar' => ['baz' => 1], - 'bam' => ['baz' => 2], - 'boo' => ['baz' => 3] - ] - ]; - - JmesPath\search($expression, $data); - // Returns: [1, 2, 3] - -- `JMESPath Tutorial `_ -- `JMESPath Grammar `_ -- `JMESPath Python library `_ - -PHP Usage -========= - -The ``JmesPath\search`` function can be used in most cases when using the -library. This function utilizes a JMESPath runtime based on your environment. -The runtime utilized can be configured using environment variables and may at -some point in the future automatically utilize a C extension if available. - -.. code-block:: php - - $result = JmesPath\search($expression, $data); - - // or, if you require PSR-4 compliance. - $result = JmesPath\Env::search($expression, $data); - -Runtimes --------- - -jmespath.php utilizes *runtimes*. There are currently two runtimes: -AstRuntime and CompilerRuntime. - -AstRuntime is utilized by ``JmesPath\search()`` and ``JmesPath\Env::search()`` -by default. - -AstRuntime -~~~~~~~~~~ - -The AstRuntime will parse an expression, cache the resulting AST in memory, -and interpret the AST using an external tree visitor. AstRuntime provides a -good general approach for interpreting JMESPath expressions that have a low to -moderate level of reuse. - -.. code-block:: php - - $runtime = new JmesPath\AstRuntime(); - $runtime('foo.bar', ['foo' => ['bar' => 'baz']]); - // > 'baz' - -CompilerRuntime -~~~~~~~~~~~~~~~ - -``JmesPath\CompilerRuntime`` provides the most performance for -applications that have a moderate to high level of reuse of JMESPath -expressions. The CompilerRuntime will walk a JMESPath AST and emit PHP source -code, resulting in anywhere from 7x to 60x speed improvements. - -Compiling JMESPath expressions to source code is a slower process than just -walking and interpreting a JMESPath AST (via the AstRuntime). However, -running the compiled JMESPath code results in much better performance than -walking an AST. This essentially means that there is a warm-up period when -using the ``CompilerRuntime``, but after the warm-up period, it will provide -much better performance. - -Use the CompilerRuntime if you know that you will be executing JMESPath -expressions more than once or if you can pre-compile JMESPath expressions -before executing them (for example, server-side applications). - -.. code-block:: php - - // Note: The cache directory argument is optional. - $runtime = new JmesPath\CompilerRuntime('/path/to/compile/folder'); - $runtime('foo.bar', ['foo' => ['bar' => 'baz']]); - // > 'baz' - -Environment Variables -^^^^^^^^^^^^^^^^^^^^^ - -You can utilize the CompilerRuntime in ``JmesPath\search()`` by setting -the ``JP_PHP_COMPILE`` environment variable to "on" or to a directory -on disk used to store cached expressions. - -Testing -======= - -A comprehensive list of test cases can be found at -https://github.com/jmespath/jmespath.php/tree/master/tests/compliance. -These compliance tests are utilized by jmespath.php to ensure consistency with -other implementations, and can serve as examples of the language. - -jmespath.php is tested using PHPUnit. In order to run the tests, you need to -first install the dependencies using Composer as described in the *Installation* -section. Next you just need to run the tests via make: - -.. code-block:: bash - - make test - -You can run a suite of performance tests as well: - -.. code-block:: bash - - make perf diff --git a/vendor/mtdowling/jmespath.php/bin/jp.php b/vendor/mtdowling/jmespath.php/bin/jp.php deleted file mode 100644 index c8433b5..0000000 --- a/vendor/mtdowling/jmespath.php/bin/jp.php +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env php -check(); -unset($xdebug); - -$dir = isset($argv[1]) ? $argv[1] : __DIR__ . '/../tests/compliance/perf'; -is_dir($dir) or die('Dir not found: ' . $dir); -// Warm up the runner -\JmesPath\Env::search('foo', []); - -$total = 0; -foreach (glob($dir . '/*.json') as $file) { - $total += runSuite($file); -} -echo "\nTotal time: {$total}\n"; - -function runSuite($file) -{ - $contents = file_get_contents($file); - $json = json_decode($contents, true); - $total = 0; - foreach ($json as $suite) { - foreach ($suite['cases'] as $case) { - $total += runCase( - $suite['given'], - $case['expression'], - $case['name'] - ); - } - } - return $total; -} - -function runCase($given, $expression, $name) -{ - $best = 99999; - $runtime = \JmesPath\Env::createRuntime(); - - for ($i = 0; $i < 100; $i++) { - $t = microtime(true); - $runtime($expression, $given); - $tryTime = (microtime(true) - $t) * 1000; - if ($tryTime < $best) { - $best = $tryTime; - } - if (!getenv('CACHE')) { - $runtime = \JmesPath\Env::createRuntime(); - // Delete compiled scripts if not caching. - if ($runtime instanceof \JmesPath\CompilerRuntime) { - array_map('unlink', glob(sys_get_temp_dir() . '/jmespath_*.php')); - } - } - } - - printf("time: %07.4fms name: %s\n", $best, $name); - - return $best; -} diff --git a/vendor/mtdowling/jmespath.php/composer.json b/vendor/mtdowling/jmespath.php/composer.json deleted file mode 100644 index b4c37c1..0000000 --- a/vendor/mtdowling/jmespath.php/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "mtdowling/jmespath.php", - "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": ["json", "jsonpath"], - "license": "MIT", - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "require": { - "php": "^7.2.5 || ^8.0", - "symfony/polyfill-mbstring": "^1.17" - }, - "require-dev": { - "composer/xdebug-handler": "^3.0.3", - "phpunit/phpunit": "^8.5.33" - }, - "autoload": { - "psr-4": { - "JmesPath\\": "src/" - }, - "files": ["src/JmesPath.php"] - }, - "bin": ["bin/jp.php"], - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - } -} diff --git a/vendor/mtdowling/jmespath.php/src/AstRuntime.php b/vendor/mtdowling/jmespath.php/src/AstRuntime.php deleted file mode 100644 index 03f5f1a..0000000 --- a/vendor/mtdowling/jmespath.php/src/AstRuntime.php +++ /dev/null @@ -1,47 +0,0 @@ -interpreter = new TreeInterpreter($fnDispatcher); - $this->parser = $parser ?: new Parser(); - } - - /** - * Returns data from the provided input that matches a given JMESPath - * expression. - * - * @param string $expression JMESPath expression to evaluate - * @param mixed $data Data to search. This data should be data that - * is similar to data returned from json_decode - * using associative arrays rather than objects. - * - * @return mixed Returns the matching data or null - */ - public function __invoke($expression, $data) - { - if (!isset($this->cache[$expression])) { - // Clear the AST cache when it hits 1024 entries - if (++$this->cachedCount > 1024) { - $this->cache = []; - $this->cachedCount = 0; - } - $this->cache[$expression] = $this->parser->parse($expression); - } - - return $this->interpreter->visit($this->cache[$expression], $data); - } -} diff --git a/vendor/mtdowling/jmespath.php/src/CompilerRuntime.php b/vendor/mtdowling/jmespath.php/src/CompilerRuntime.php deleted file mode 100644 index c26b09c..0000000 --- a/vendor/mtdowling/jmespath.php/src/CompilerRuntime.php +++ /dev/null @@ -1,83 +0,0 @@ -parser = $parser ?: new Parser(); - $this->compiler = new TreeCompiler(); - $dir = $dir ?: sys_get_temp_dir(); - - if (!is_dir($dir) && !mkdir($dir, 0755, true)) { - throw new \RuntimeException("Unable to create cache directory: $dir"); - } - - $this->cacheDir = realpath($dir); - $this->interpreter = new TreeInterpreter(); - } - - /** - * Returns data from the provided input that matches a given JMESPath - * expression. - * - * @param string $expression JMESPath expression to evaluate - * @param mixed $data Data to search. This data should be data that - * is similar to data returned from json_decode - * using associative arrays rather than objects. - * - * @return mixed Returns the matching data or null - * @throws \RuntimeException - */ - public function __invoke($expression, $data) - { - $functionName = 'jmespath_' . md5($expression); - - if (!function_exists($functionName)) { - $filename = "{$this->cacheDir}/{$functionName}.php"; - if (!file_exists($filename)) { - $this->compile($filename, $expression, $functionName); - } - require $filename; - } - - return $functionName($this->interpreter, $data); - } - - private function compile($filename, $expression, $functionName) - { - $code = $this->compiler->visit( - $this->parser->parse($expression), - $functionName, - $expression - ); - - if (!file_put_contents($filename, $code)) { - throw new \RuntimeException(sprintf( - 'Unable to write the compiled PHP code to: %s (%s)', - $filename, - var_export(error_get_last(), true) - )); - } - } -} diff --git a/vendor/mtdowling/jmespath.php/src/DebugRuntime.php b/vendor/mtdowling/jmespath.php/src/DebugRuntime.php deleted file mode 100644 index 4052561..0000000 --- a/vendor/mtdowling/jmespath.php/src/DebugRuntime.php +++ /dev/null @@ -1,109 +0,0 @@ -runtime = $runtime; - $this->out = $output ?: STDOUT; - $this->lexer = new Lexer(); - $this->parser = new Parser($this->lexer); - } - - public function __invoke($expression, $data) - { - if ($this->runtime instanceof CompilerRuntime) { - return $this->debugCompiled($expression, $data); - } - - return $this->debugInterpreted($expression, $data); - } - - private function debugInterpreted($expression, $data) - { - return $this->debugCallback( - function () use ($expression, $data) { - $runtime = $this->runtime; - return $runtime($expression, $data); - }, - $expression, - $data - ); - } - - private function debugCompiled($expression, $data) - { - $result = $this->debugCallback( - function () use ($expression, $data) { - $runtime = $this->runtime; - return $runtime($expression, $data); - }, - $expression, - $data - ); - $this->dumpCompiledCode($expression); - - return $result; - } - - private function dumpTokens($expression) - { - $lexer = new Lexer(); - fwrite($this->out, "Tokens\n======\n\n"); - $tokens = $lexer->tokenize($expression); - - foreach ($tokens as $t) { - fprintf( - $this->out, - "%3d %-13s %s\n", $t['pos'], $t['type'], - json_encode($t['value']) - ); - } - - fwrite($this->out, "\n"); - } - - private function dumpAst($expression) - { - $parser = new Parser(); - $ast = $parser->parse($expression); - fwrite($this->out, "AST\n========\n\n"); - fwrite($this->out, json_encode($ast, JSON_PRETTY_PRINT) . "\n"); - } - - private function dumpCompiledCode($expression) - { - fwrite($this->out, "Code\n========\n\n"); - $dir = sys_get_temp_dir(); - $hash = md5($expression); - $functionName = "jmespath_{$hash}"; - $filename = "{$dir}/{$functionName}.php"; - fwrite($this->out, "File: {$filename}\n\n"); - fprintf($this->out, file_get_contents($filename)); - } - - private function debugCallback(callable $debugFn, $expression, $data) - { - fprintf($this->out, "Expression\n==========\n\n%s\n\n", $expression); - $this->dumpTokens($expression); - $this->dumpAst($expression); - fprintf($this->out, "\nData\n====\n\n%s\n\n", json_encode($data, JSON_PRETTY_PRINT)); - $startTime = microtime(true); - $result = $debugFn(); - $total = microtime(true) - $startTime; - fprintf($this->out, "\nResult\n======\n\n%s\n\n", json_encode($result, JSON_PRETTY_PRINT)); - fwrite($this->out, "Time\n====\n\n"); - fprintf($this->out, "Total time: %f ms\n\n", $total); - - return $result; - } -} diff --git a/vendor/mtdowling/jmespath.php/src/Env.php b/vendor/mtdowling/jmespath.php/src/Env.php deleted file mode 100644 index b22cf25..0000000 --- a/vendor/mtdowling/jmespath.php/src/Env.php +++ /dev/null @@ -1,91 +0,0 @@ -{'fn_' . $fn}($args); - } - - private function fn_abs(array $args) - { - $this->validate('abs', $args, [['number']]); - return abs($args[0]); - } - - private function fn_avg(array $args) - { - $this->validate('avg', $args, [['array']]); - $sum = $this->reduce('avg:0', $args[0], ['number'], function ($a, $b) { - return Utils::add($a, $b); - }); - return $args[0] ? ($sum / count($args[0])) : null; - } - - private function fn_ceil(array $args) - { - $this->validate('ceil', $args, [['number']]); - return ceil($args[0]); - } - - private function fn_contains(array $args) - { - $this->validate('contains', $args, [['string', 'array'], ['any']]); - if (is_array($args[0])) { - return in_array($args[1], $args[0]); - } elseif (is_string($args[1])) { - return mb_strpos($args[0], $args[1], 0, 'UTF-8') !== false; - } else { - return null; - } - } - - private function fn_ends_with(array $args) - { - $this->validate('ends_with', $args, [['string'], ['string']]); - list($search, $suffix) = $args; - return $suffix === '' || mb_substr($search, -mb_strlen($suffix, 'UTF-8'), null, 'UTF-8') === $suffix; - } - - private function fn_floor(array $args) - { - $this->validate('floor', $args, [['number']]); - return floor($args[0]); - } - - private function fn_not_null(array $args) - { - if (!$args) { - throw new \RuntimeException( - "not_null() expects 1 or more arguments, 0 were provided" - ); - } - - return array_reduce($args, function ($carry, $item) { - return $carry !== null ? $carry : $item; - }); - } - - private function fn_join(array $args) - { - $this->validate('join', $args, [['string'], ['array']]); - $fn = function ($a, $b, $i) use ($args) { - return $i ? ($a . $args[0] . $b) : $b; - }; - return $this->reduce('join:0', $args[1], ['string'], $fn); - } - - private function fn_keys(array $args) - { - $this->validate('keys', $args, [['object']]); - return array_keys((array) $args[0]); - } - - private function fn_length(array $args) - { - $this->validate('length', $args, [['string', 'array', 'object']]); - return is_string($args[0]) ? mb_strlen($args[0], 'UTF-8') : count((array) $args[0]); - } - - private function fn_max(array $args) - { - $this->validate('max', $args, [['array']]); - $fn = function ($a, $b) { - return $a >= $b ? $a : $b; - }; - return $this->reduce('max:0', $args[0], ['number', 'string'], $fn); - } - - private function fn_max_by(array $args) - { - $this->validate('max_by', $args, [['array'], ['expression']]); - $expr = $this->wrapExpression('max_by:1', $args[1], ['number', 'string']); - $fn = function ($carry, $item, $index) use ($expr) { - return $index - ? ($expr($carry) >= $expr($item) ? $carry : $item) - : $item; - }; - return $this->reduce('max_by:1', $args[0], ['any'], $fn); - } - - private function fn_min(array $args) - { - $this->validate('min', $args, [['array']]); - $fn = function ($a, $b, $i) { - return $i && $a <= $b ? $a : $b; - }; - return $this->reduce('min:0', $args[0], ['number', 'string'], $fn); - } - - private function fn_min_by(array $args) - { - $this->validate('min_by', $args, [['array'], ['expression']]); - $expr = $this->wrapExpression('min_by:1', $args[1], ['number', 'string']); - $i = -1; - $fn = function ($a, $b) use ($expr, &$i) { - return ++$i ? ($expr($a) <= $expr($b) ? $a : $b) : $b; - }; - return $this->reduce('min_by:1', $args[0], ['any'], $fn); - } - - private function fn_reverse(array $args) - { - $this->validate('reverse', $args, [['array', 'string']]); - if (is_array($args[0])) { - return array_reverse($args[0]); - } elseif (is_string($args[0])) { - return strrev($args[0]); - } else { - throw new \RuntimeException('Cannot reverse provided argument'); - } - } - - private function fn_sum(array $args) - { - $this->validate('sum', $args, [['array']]); - $fn = function ($a, $b) { - return Utils::add($a, $b); - }; - return $this->reduce('sum:0', $args[0], ['number'], $fn); - } - - private function fn_sort(array $args) - { - $this->validate('sort', $args, [['array']]); - $valid = ['string', 'number']; - return Utils::stableSort($args[0], function ($a, $b) use ($valid) { - $this->validateSeq('sort:0', $valid, $a, $b); - return strnatcmp($a, $b); - }); - } - - private function fn_sort_by(array $args) - { - $this->validate('sort_by', $args, [['array'], ['expression']]); - $expr = $args[1]; - $valid = ['string', 'number']; - return Utils::stableSort( - $args[0], - function ($a, $b) use ($expr, $valid) { - $va = $expr($a); - $vb = $expr($b); - $this->validateSeq('sort_by:0', $valid, $va, $vb); - return strnatcmp($va, $vb); - } - ); - } - - private function fn_starts_with(array $args) - { - $this->validate('starts_with', $args, [['string'], ['string']]); - list($search, $prefix) = $args; - return $prefix === '' || mb_strpos($search, $prefix, 0, 'UTF-8') === 0; - } - - private function fn_type(array $args) - { - $this->validateArity('type', count($args), 1); - return Utils::type($args[0]); - } - - private function fn_to_string(array $args) - { - $this->validateArity('to_string', count($args), 1); - $v = $args[0]; - if (is_string($v)) { - return $v; - } elseif (is_object($v) - && !($v instanceof \JsonSerializable) - && method_exists($v, '__toString') - ) { - return (string) $v; - } - - return json_encode($v); - } - - private function fn_to_number(array $args) - { - $this->validateArity('to_number', count($args), 1); - $value = $args[0]; - $type = Utils::type($value); - if ($type == 'number') { - return $value; - } elseif ($type == 'string' && is_numeric($value)) { - return mb_strpos($value, '.', 0, 'UTF-8') ? (float) $value : (int) $value; - } else { - return null; - } - } - - private function fn_values(array $args) - { - $this->validate('values', $args, [['array', 'object']]); - return array_values((array) $args[0]); - } - - private function fn_merge(array $args) - { - if (!$args) { - throw new \RuntimeException( - "merge() expects 1 or more arguments, 0 were provided" - ); - } - - return call_user_func_array('array_replace', $args); - } - - private function fn_to_array(array $args) - { - $this->validate('to_array', $args, [['any']]); - - return Utils::isArray($args[0]) ? $args[0] : [$args[0]]; - } - - private function fn_map(array $args) - { - $this->validate('map', $args, [['expression'], ['any']]); - $result = []; - foreach ($args[1] as $a) { - $result[] = $args[0]($a); - } - return $result; - } - - private function typeError($from, $msg) - { - if (mb_strpos($from, ':', 0, 'UTF-8')) { - list($fn, $pos) = explode(':', $from); - throw new \RuntimeException( - sprintf('Argument %d of %s %s', $pos, $fn, $msg) - ); - } else { - throw new \RuntimeException( - sprintf('Type error: %s %s', $from, $msg) - ); - } - } - - private function validateArity($from, $given, $expected) - { - if ($given != $expected) { - $err = "%s() expects {$expected} arguments, {$given} were provided"; - throw new \RuntimeException(sprintf($err, $from)); - } - } - - private function validate($from, $args, $types = []) - { - $this->validateArity($from, count($args), count($types)); - foreach ($args as $index => $value) { - if (!isset($types[$index]) || !$types[$index]) { - continue; - } - $this->validateType("{$from}:{$index}", $value, $types[$index]); - } - } - - private function validateType($from, $value, array $types) - { - if ($types[0] == 'any' - || in_array(Utils::type($value), $types) - || ($value === [] && in_array('object', $types)) - ) { - return; - } - $msg = 'must be one of the following types: ' . implode(', ', $types) - . '. ' . Utils::type($value) . ' found'; - $this->typeError($from, $msg); - } - - /** - * Validates value A and B, ensures they both are correctly typed, and of - * the same type. - * - * @param string $from String of function:argument_position - * @param array $types Array of valid value types. - * @param mixed $a Value A - * @param mixed $b Value B - */ - private function validateSeq($from, array $types, $a, $b) - { - $ta = Utils::type($a); - $tb = Utils::type($b); - - if ($ta !== $tb) { - $msg = "encountered a type mismatch in sequence: {$ta}, {$tb}"; - $this->typeError($from, $msg); - } - - $typeMatch = ($types && $types[0] == 'any') || in_array($ta, $types); - if (!$typeMatch) { - $msg = 'encountered a type error in sequence. The argument must be ' - . 'an array of ' . implode('|', $types) . ' types. ' - . "Found {$ta}, {$tb}."; - $this->typeError($from, $msg); - } - } - - /** - * Reduces and validates an array of values to a single value using a fn. - * - * @param string $from String of function:argument_position - * @param array $values Values to reduce. - * @param array $types Array of valid value types. - * @param callable $reduce Reduce function that accepts ($carry, $item). - * - * @return mixed - */ - private function reduce($from, array $values, array $types, callable $reduce) - { - $i = -1; - return array_reduce( - $values, - function ($carry, $item) use ($from, $types, $reduce, &$i) { - if (++$i > 0) { - $this->validateSeq($from, $types, $carry, $item); - } - return $reduce($carry, $item, $i); - } - ); - } - - /** - * Validates the return values of expressions as they are applied. - * - * @param string $from Function name : position - * @param callable $expr Expression function to validate. - * @param array $types Array of acceptable return type values. - * - * @return callable Returns a wrapped function - */ - private function wrapExpression($from, callable $expr, array $types) - { - list($fn, $pos) = explode(':', $from); - $from = "The expression return value of argument {$pos} of {$fn}"; - return function ($value) use ($from, $expr, $types) { - $value = $expr($value); - $this->validateType($from, $value, $types); - return $value; - }; - } - - /** @internal Pass function name validation off to runtime */ - public function __call($name, $args) - { - $name = str_replace('fn_', '', $name); - throw new \RuntimeException("Call to undefined function {$name}"); - } -} diff --git a/vendor/mtdowling/jmespath.php/src/JmesPath.php b/vendor/mtdowling/jmespath.php/src/JmesPath.php deleted file mode 100644 index d24e516..0000000 --- a/vendor/mtdowling/jmespath.php/src/JmesPath.php +++ /dev/null @@ -1,17 +0,0 @@ - self::STATE_LT, - '>' => self::STATE_GT, - '=' => self::STATE_EQ, - '!' => self::STATE_NOT, - '[' => self::STATE_LBRACKET, - '|' => self::STATE_PIPE, - '&' => self::STATE_AND, - '`' => self::STATE_JSON_LITERAL, - '"' => self::STATE_QUOTED_STRING, - "'" => self::STATE_STRING_LITERAL, - '-' => self::STATE_NUMBER, - '0' => self::STATE_NUMBER, - '1' => self::STATE_NUMBER, - '2' => self::STATE_NUMBER, - '3' => self::STATE_NUMBER, - '4' => self::STATE_NUMBER, - '5' => self::STATE_NUMBER, - '6' => self::STATE_NUMBER, - '7' => self::STATE_NUMBER, - '8' => self::STATE_NUMBER, - '9' => self::STATE_NUMBER, - ' ' => self::STATE_WHITESPACE, - "\t" => self::STATE_WHITESPACE, - "\n" => self::STATE_WHITESPACE, - "\r" => self::STATE_WHITESPACE, - '.' => self::STATE_SINGLE_CHAR, - '*' => self::STATE_SINGLE_CHAR, - ']' => self::STATE_SINGLE_CHAR, - ',' => self::STATE_SINGLE_CHAR, - ':' => self::STATE_SINGLE_CHAR, - '@' => self::STATE_SINGLE_CHAR, - '(' => self::STATE_SINGLE_CHAR, - ')' => self::STATE_SINGLE_CHAR, - '{' => self::STATE_SINGLE_CHAR, - '}' => self::STATE_SINGLE_CHAR, - '_' => self::STATE_IDENTIFIER, - 'A' => self::STATE_IDENTIFIER, - 'B' => self::STATE_IDENTIFIER, - 'C' => self::STATE_IDENTIFIER, - 'D' => self::STATE_IDENTIFIER, - 'E' => self::STATE_IDENTIFIER, - 'F' => self::STATE_IDENTIFIER, - 'G' => self::STATE_IDENTIFIER, - 'H' => self::STATE_IDENTIFIER, - 'I' => self::STATE_IDENTIFIER, - 'J' => self::STATE_IDENTIFIER, - 'K' => self::STATE_IDENTIFIER, - 'L' => self::STATE_IDENTIFIER, - 'M' => self::STATE_IDENTIFIER, - 'N' => self::STATE_IDENTIFIER, - 'O' => self::STATE_IDENTIFIER, - 'P' => self::STATE_IDENTIFIER, - 'Q' => self::STATE_IDENTIFIER, - 'R' => self::STATE_IDENTIFIER, - 'S' => self::STATE_IDENTIFIER, - 'T' => self::STATE_IDENTIFIER, - 'U' => self::STATE_IDENTIFIER, - 'V' => self::STATE_IDENTIFIER, - 'W' => self::STATE_IDENTIFIER, - 'X' => self::STATE_IDENTIFIER, - 'Y' => self::STATE_IDENTIFIER, - 'Z' => self::STATE_IDENTIFIER, - 'a' => self::STATE_IDENTIFIER, - 'b' => self::STATE_IDENTIFIER, - 'c' => self::STATE_IDENTIFIER, - 'd' => self::STATE_IDENTIFIER, - 'e' => self::STATE_IDENTIFIER, - 'f' => self::STATE_IDENTIFIER, - 'g' => self::STATE_IDENTIFIER, - 'h' => self::STATE_IDENTIFIER, - 'i' => self::STATE_IDENTIFIER, - 'j' => self::STATE_IDENTIFIER, - 'k' => self::STATE_IDENTIFIER, - 'l' => self::STATE_IDENTIFIER, - 'm' => self::STATE_IDENTIFIER, - 'n' => self::STATE_IDENTIFIER, - 'o' => self::STATE_IDENTIFIER, - 'p' => self::STATE_IDENTIFIER, - 'q' => self::STATE_IDENTIFIER, - 'r' => self::STATE_IDENTIFIER, - 's' => self::STATE_IDENTIFIER, - 't' => self::STATE_IDENTIFIER, - 'u' => self::STATE_IDENTIFIER, - 'v' => self::STATE_IDENTIFIER, - 'w' => self::STATE_IDENTIFIER, - 'x' => self::STATE_IDENTIFIER, - 'y' => self::STATE_IDENTIFIER, - 'z' => self::STATE_IDENTIFIER, - ]; - - /** @var array Valid identifier characters after first character */ - private $validIdentifier = [ - 'A' => true, 'B' => true, 'C' => true, 'D' => true, 'E' => true, - 'F' => true, 'G' => true, 'H' => true, 'I' => true, 'J' => true, - 'K' => true, 'L' => true, 'M' => true, 'N' => true, 'O' => true, - 'P' => true, 'Q' => true, 'R' => true, 'S' => true, 'T' => true, - 'U' => true, 'V' => true, 'W' => true, 'X' => true, 'Y' => true, - 'Z' => true, 'a' => true, 'b' => true, 'c' => true, 'd' => true, - 'e' => true, 'f' => true, 'g' => true, 'h' => true, 'i' => true, - 'j' => true, 'k' => true, 'l' => true, 'm' => true, 'n' => true, - 'o' => true, 'p' => true, 'q' => true, 'r' => true, 's' => true, - 't' => true, 'u' => true, 'v' => true, 'w' => true, 'x' => true, - 'y' => true, 'z' => true, '_' => true, '0' => true, '1' => true, - '2' => true, '3' => true, '4' => true, '5' => true, '6' => true, - '7' => true, '8' => true, '9' => true, - ]; - - /** @var array Valid number characters after the first character */ - private $numbers = [ - '0' => true, '1' => true, '2' => true, '3' => true, '4' => true, - '5' => true, '6' => true, '7' => true, '8' => true, '9' => true - ]; - - /** @var array Map of simple single character tokens */ - private $simpleTokens = [ - '.' => self::T_DOT, - '*' => self::T_STAR, - ']' => self::T_RBRACKET, - ',' => self::T_COMMA, - ':' => self::T_COLON, - '@' => self::T_CURRENT, - '(' => self::T_LPAREN, - ')' => self::T_RPAREN, - '{' => self::T_LBRACE, - '}' => self::T_RBRACE, - ]; - - /** - * Tokenize the JMESPath expression into an array of tokens hashes that - * contain a 'type', 'value', and 'key'. - * - * @param string $input JMESPath input - * - * @return array - * @throws SyntaxErrorException - */ - public function tokenize($input) - { - $tokens = []; - - if ($input === '') { - goto eof; - } - - $chars = str_split($input); - - while (false !== ($current = current($chars))) { - - // Every character must be in the transition character table. - if (!isset(self::$transitionTable[$current])) { - $tokens[] = [ - 'type' => self::T_UNKNOWN, - 'pos' => key($chars), - 'value' => $current - ]; - next($chars); - continue; - } - - $state = self::$transitionTable[$current]; - - if ($state === self::STATE_SINGLE_CHAR) { - - // Consume simple tokens like ".", ",", "@", etc. - $tokens[] = [ - 'type' => $this->simpleTokens[$current], - 'pos' => key($chars), - 'value' => $current - ]; - next($chars); - - } elseif ($state === self::STATE_IDENTIFIER) { - - // Consume identifiers - $start = key($chars); - $buffer = ''; - do { - $buffer .= $current; - $current = next($chars); - } while ($current !== false && isset($this->validIdentifier[$current])); - $tokens[] = [ - 'type' => self::T_IDENTIFIER, - 'value' => $buffer, - 'pos' => $start - ]; - - } elseif ($state === self::STATE_WHITESPACE) { - - // Skip whitespace - next($chars); - - } elseif ($state === self::STATE_LBRACKET) { - - // Consume "[", "[?", and "[]" - $position = key($chars); - $actual = next($chars); - if ($actual === ']') { - next($chars); - $tokens[] = [ - 'type' => self::T_FLATTEN, - 'pos' => $position, - 'value' => '[]' - ]; - } elseif ($actual === '?') { - next($chars); - $tokens[] = [ - 'type' => self::T_FILTER, - 'pos' => $position, - 'value' => '[?' - ]; - } else { - $tokens[] = [ - 'type' => self::T_LBRACKET, - 'pos' => $position, - 'value' => '[' - ]; - } - - } elseif ($state === self::STATE_STRING_LITERAL) { - - // Consume raw string literals - $t = $this->inside($chars, "'", self::T_LITERAL); - $t['value'] = str_replace("\\'", "'", $t['value']); - $tokens[] = $t; - - } elseif ($state === self::STATE_PIPE) { - - // Consume pipe and OR - $tokens[] = $this->matchOr($chars, '|', '|', self::T_OR, self::T_PIPE); - - } elseif ($state == self::STATE_JSON_LITERAL) { - - // Consume JSON literals - $token = $this->inside($chars, '`', self::T_LITERAL); - if ($token['type'] === self::T_LITERAL) { - $token['value'] = str_replace('\\`', '`', $token['value']); - $token = $this->parseJson($token); - } - $tokens[] = $token; - - } elseif ($state == self::STATE_NUMBER) { - - // Consume numbers - $start = key($chars); - $buffer = ''; - do { - $buffer .= $current; - $current = next($chars); - } while ($current !== false && isset($this->numbers[$current])); - $tokens[] = [ - 'type' => self::T_NUMBER, - 'value' => (int)$buffer, - 'pos' => $start - ]; - - } elseif ($state === self::STATE_QUOTED_STRING) { - - // Consume quoted identifiers - $token = $this->inside($chars, '"', self::T_QUOTED_IDENTIFIER); - if ($token['type'] === self::T_QUOTED_IDENTIFIER) { - $token['value'] = '"' . $token['value'] . '"'; - $token = $this->parseJson($token); - } - $tokens[] = $token; - - } elseif ($state === self::STATE_EQ) { - - // Consume equals - $tokens[] = $this->matchOr($chars, '=', '=', self::T_COMPARATOR, self::T_UNKNOWN); - - } elseif ($state == self::STATE_AND) { - - $tokens[] = $this->matchOr($chars, '&', '&', self::T_AND, self::T_EXPREF); - - } elseif ($state === self::STATE_NOT) { - - // Consume not equal - $tokens[] = $this->matchOr($chars, '!', '=', self::T_COMPARATOR, self::T_NOT); - - } else { - - // either '<' or '>' - // Consume less than and greater than - $tokens[] = $this->matchOr($chars, $current, '=', self::T_COMPARATOR, self::T_COMPARATOR); - - } - } - - eof: - $tokens[] = [ - 'type' => self::T_EOF, - 'pos' => mb_strlen($input, 'UTF-8'), - 'value' => null - ]; - - return $tokens; - } - - /** - * Returns a token based on whether or not the next token matches the - * expected value. If it does, a token of "$type" is returned. Otherwise, - * a token of "$orElse" type is returned. - * - * @param array $chars Array of characters by reference. - * @param string $current The current character. - * @param string $expected Expected character. - * @param string $type Expected result type. - * @param string $orElse Otherwise return a token of this type. - * - * @return array Returns a conditional token. - */ - private function matchOr(array &$chars, $current, $expected, $type, $orElse) - { - if (next($chars) === $expected) { - next($chars); - return [ - 'type' => $type, - 'pos' => key($chars) - 1, - 'value' => $current . $expected - ]; - } - - return [ - 'type' => $orElse, - 'pos' => key($chars) - 1, - 'value' => $current - ]; - } - - /** - * Returns a token the is the result of consuming inside of delimiter - * characters. Escaped delimiters will be adjusted before returning a - * value. If the token is not closed, "unknown" is returned. - * - * @param array $chars Array of characters by reference. - * @param string $delim The delimiter character. - * @param string $type Token type. - * - * @return array Returns the consumed token. - */ - private function inside(array &$chars, $delim, $type) - { - $position = key($chars); - $current = next($chars); - $buffer = ''; - - while ($current !== $delim) { - if ($current === '\\') { - $buffer .= '\\'; - $current = next($chars); - } - if ($current === false) { - // Unclosed delimiter - return [ - 'type' => self::T_UNKNOWN, - 'value' => $buffer, - 'pos' => $position - ]; - } - $buffer .= $current; - $current = next($chars); - } - - next($chars); - - return ['type' => $type, 'value' => $buffer, 'pos' => $position]; - } - - /** - * Parses a JSON token or sets the token type to "unknown" on error. - * - * @param array $token Token that needs parsing. - * - * @return array Returns a token with a parsed value. - */ - private function parseJson(array $token) - { - $value = json_decode($token['value'], true); - - if ($error = json_last_error()) { - // Legacy support for elided quotes. Try to parse again by adding - // quotes around the bad input value. - $value = json_decode('"' . $token['value'] . '"', true); - if ($error = json_last_error()) { - $token['type'] = self::T_UNKNOWN; - return $token; - } - } - - $token['value'] = $value; - return $token; - } -} diff --git a/vendor/mtdowling/jmespath.php/src/Parser.php b/vendor/mtdowling/jmespath.php/src/Parser.php deleted file mode 100644 index 0733f20..0000000 --- a/vendor/mtdowling/jmespath.php/src/Parser.php +++ /dev/null @@ -1,519 +0,0 @@ - T::T_EOF]; - private static $currentNode = ['type' => T::T_CURRENT]; - - private static $bp = [ - T::T_EOF => 0, - T::T_QUOTED_IDENTIFIER => 0, - T::T_IDENTIFIER => 0, - T::T_RBRACKET => 0, - T::T_RPAREN => 0, - T::T_COMMA => 0, - T::T_RBRACE => 0, - T::T_NUMBER => 0, - T::T_CURRENT => 0, - T::T_EXPREF => 0, - T::T_COLON => 0, - T::T_PIPE => 1, - T::T_OR => 2, - T::T_AND => 3, - T::T_COMPARATOR => 5, - T::T_FLATTEN => 9, - T::T_STAR => 20, - T::T_FILTER => 21, - T::T_DOT => 40, - T::T_NOT => 45, - T::T_LBRACE => 50, - T::T_LBRACKET => 55, - T::T_LPAREN => 60, - ]; - - /** @var array Acceptable tokens after a dot token */ - private static $afterDot = [ - T::T_IDENTIFIER => true, // foo.bar - T::T_QUOTED_IDENTIFIER => true, // foo."bar" - T::T_STAR => true, // foo.* - T::T_LBRACE => true, // foo[1] - T::T_LBRACKET => true, // foo{a: 0} - T::T_FILTER => true, // foo.[?bar==10] - ]; - - /** - * @param Lexer|null $lexer Lexer used to tokenize expressions - */ - public function __construct(Lexer $lexer = null) - { - $this->lexer = $lexer ?: new Lexer(); - } - - /** - * Parses a JMESPath expression into an AST - * - * @param string $expression JMESPath expression to compile - * - * @return array Returns an array based AST - * @throws SyntaxErrorException - */ - public function parse($expression) - { - $this->expression = $expression; - $this->tokens = $this->lexer->tokenize($expression); - $this->tpos = -1; - $this->next(); - $result = $this->expr(); - - if ($this->token['type'] === T::T_EOF) { - return $result; - } - - throw $this->syntax('Did not reach the end of the token stream'); - } - - /** - * Parses an expression while rbp < lbp. - * - * @param int $rbp Right bound precedence - * - * @return array - */ - private function expr($rbp = 0) - { - $left = $this->{"nud_{$this->token['type']}"}(); - while ($rbp < self::$bp[$this->token['type']]) { - $left = $this->{"led_{$this->token['type']}"}($left); - } - - return $left; - } - - private function nud_identifier() - { - $token = $this->token; - $this->next(); - return ['type' => 'field', 'value' => $token['value']]; - } - - private function nud_quoted_identifier() - { - $token = $this->token; - $this->next(); - $this->assertNotToken(T::T_LPAREN); - return ['type' => 'field', 'value' => $token['value']]; - } - - private function nud_current() - { - $this->next(); - return self::$currentNode; - } - - private function nud_literal() - { - $token = $this->token; - $this->next(); - return ['type' => 'literal', 'value' => $token['value']]; - } - - private function nud_expref() - { - $this->next(); - return ['type' => T::T_EXPREF, 'children' => [$this->expr(self::$bp[T::T_EXPREF])]]; - } - - private function nud_not() - { - $this->next(); - return ['type' => T::T_NOT, 'children' => [$this->expr(self::$bp[T::T_NOT])]]; - } - - private function nud_lparen() - { - $this->next(); - $result = $this->expr(0); - if ($this->token['type'] !== T::T_RPAREN) { - throw $this->syntax('Unclosed `(`'); - } - $this->next(); - return $result; - } - - private function nud_lbrace() - { - static $validKeys = [T::T_QUOTED_IDENTIFIER => true, T::T_IDENTIFIER => true]; - $this->next($validKeys); - $pairs = []; - - do { - $pairs[] = $this->parseKeyValuePair(); - if ($this->token['type'] == T::T_COMMA) { - $this->next($validKeys); - } - } while ($this->token['type'] !== T::T_RBRACE); - - $this->next(); - - return['type' => 'multi_select_hash', 'children' => $pairs]; - } - - private function nud_flatten() - { - return $this->led_flatten(self::$currentNode); - } - - private function nud_filter() - { - return $this->led_filter(self::$currentNode); - } - - private function nud_star() - { - return $this->parseWildcardObject(self::$currentNode); - } - - private function nud_lbracket() - { - $this->next(); - $type = $this->token['type']; - if ($type == T::T_NUMBER || $type == T::T_COLON) { - return $this->parseArrayIndexExpression(); - } elseif ($type == T::T_STAR && $this->lookahead() == T::T_RBRACKET) { - return $this->parseWildcardArray(); - } else { - return $this->parseMultiSelectList(); - } - } - - private function led_lbracket(array $left) - { - static $nextTypes = [T::T_NUMBER => true, T::T_COLON => true, T::T_STAR => true]; - $this->next($nextTypes); - switch ($this->token['type']) { - case T::T_NUMBER: - case T::T_COLON: - return [ - 'type' => 'subexpression', - 'children' => [$left, $this->parseArrayIndexExpression()] - ]; - default: - return $this->parseWildcardArray($left); - } - } - - private function led_flatten(array $left) - { - $this->next(); - - return [ - 'type' => 'projection', - 'from' => 'array', - 'children' => [ - ['type' => T::T_FLATTEN, 'children' => [$left]], - $this->parseProjection(self::$bp[T::T_FLATTEN]) - ] - ]; - } - - private function led_dot(array $left) - { - $this->next(self::$afterDot); - - if ($this->token['type'] == T::T_STAR) { - return $this->parseWildcardObject($left); - } - - return [ - 'type' => 'subexpression', - 'children' => [$left, $this->parseDot(self::$bp[T::T_DOT])] - ]; - } - - private function led_or(array $left) - { - $this->next(); - return [ - 'type' => T::T_OR, - 'children' => [$left, $this->expr(self::$bp[T::T_OR])] - ]; - } - - private function led_and(array $left) - { - $this->next(); - return [ - 'type' => T::T_AND, - 'children' => [$left, $this->expr(self::$bp[T::T_AND])] - ]; - } - - private function led_pipe(array $left) - { - $this->next(); - return [ - 'type' => T::T_PIPE, - 'children' => [$left, $this->expr(self::$bp[T::T_PIPE])] - ]; - } - - private function led_lparen(array $left) - { - $args = []; - $this->next(); - - while ($this->token['type'] != T::T_RPAREN) { - $args[] = $this->expr(0); - if ($this->token['type'] == T::T_COMMA) { - $this->next(); - } - } - - $this->next(); - - return [ - 'type' => 'function', - 'value' => $left['value'], - 'children' => $args - ]; - } - - private function led_filter(array $left) - { - $this->next(); - $expression = $this->expr(); - if ($this->token['type'] != T::T_RBRACKET) { - throw $this->syntax('Expected a closing rbracket for the filter'); - } - - $this->next(); - $rhs = $this->parseProjection(self::$bp[T::T_FILTER]); - - return [ - 'type' => 'projection', - 'from' => 'array', - 'children' => [ - $left ?: self::$currentNode, - [ - 'type' => 'condition', - 'children' => [$expression, $rhs] - ] - ] - ]; - } - - private function led_comparator(array $left) - { - $token = $this->token; - $this->next(); - - return [ - 'type' => T::T_COMPARATOR, - 'value' => $token['value'], - 'children' => [$left, $this->expr(self::$bp[T::T_COMPARATOR])] - ]; - } - - private function parseProjection($bp) - { - $type = $this->token['type']; - if (self::$bp[$type] < 10) { - return self::$currentNode; - } elseif ($type == T::T_DOT) { - $this->next(self::$afterDot); - return $this->parseDot($bp); - } elseif ($type == T::T_LBRACKET || $type == T::T_FILTER) { - return $this->expr($bp); - } - - throw $this->syntax('Syntax error after projection'); - } - - private function parseDot($bp) - { - if ($this->token['type'] == T::T_LBRACKET) { - $this->next(); - return $this->parseMultiSelectList(); - } - - return $this->expr($bp); - } - - private function parseKeyValuePair() - { - static $validColon = [T::T_COLON => true]; - $key = $this->token['value']; - $this->next($validColon); - $this->next(); - - return [ - 'type' => 'key_val_pair', - 'value' => $key, - 'children' => [$this->expr()] - ]; - } - - private function parseWildcardObject(array $left = null) - { - $this->next(); - - return [ - 'type' => 'projection', - 'from' => 'object', - 'children' => [ - $left ?: self::$currentNode, - $this->parseProjection(self::$bp[T::T_STAR]) - ] - ]; - } - - private function parseWildcardArray(array $left = null) - { - static $getRbracket = [T::T_RBRACKET => true]; - $this->next($getRbracket); - $this->next(); - - return [ - 'type' => 'projection', - 'from' => 'array', - 'children' => [ - $left ?: self::$currentNode, - $this->parseProjection(self::$bp[T::T_STAR]) - ] - ]; - } - - /** - * Parses an array index expression (e.g., [0], [1:2:3] - */ - private function parseArrayIndexExpression() - { - static $matchNext = [ - T::T_NUMBER => true, - T::T_COLON => true, - T::T_RBRACKET => true - ]; - - $pos = 0; - $parts = [null, null, null]; - $expected = $matchNext; - - do { - if ($this->token['type'] == T::T_COLON) { - $pos++; - $expected = $matchNext; - } elseif ($this->token['type'] == T::T_NUMBER) { - $parts[$pos] = $this->token['value']; - $expected = [T::T_COLON => true, T::T_RBRACKET => true]; - } - $this->next($expected); - } while ($this->token['type'] != T::T_RBRACKET); - - // Consume the closing bracket - $this->next(); - - if ($pos === 0) { - // No colons were found so this is a simple index extraction - return ['type' => 'index', 'value' => $parts[0]]; - } - - if ($pos > 2) { - throw $this->syntax('Invalid array slice syntax: too many colons'); - } - - // Sliced array from start (e.g., [2:]) - return [ - 'type' => 'projection', - 'from' => 'array', - 'children' => [ - ['type' => 'slice', 'value' => $parts], - $this->parseProjection(self::$bp[T::T_STAR]) - ] - ]; - } - - private function parseMultiSelectList() - { - $nodes = []; - - do { - $nodes[] = $this->expr(); - if ($this->token['type'] == T::T_COMMA) { - $this->next(); - $this->assertNotToken(T::T_RBRACKET); - } - } while ($this->token['type'] !== T::T_RBRACKET); - $this->next(); - - return ['type' => 'multi_select_list', 'children' => $nodes]; - } - - private function syntax($msg) - { - return new SyntaxErrorException($msg, $this->token, $this->expression); - } - - private function lookahead() - { - return (!isset($this->tokens[$this->tpos + 1])) - ? T::T_EOF - : $this->tokens[$this->tpos + 1]['type']; - } - - private function next(array $match = null) - { - if (!isset($this->tokens[$this->tpos + 1])) { - $this->token = self::$nullToken; - } else { - $this->token = $this->tokens[++$this->tpos]; - } - - if ($match && !isset($match[$this->token['type']])) { - throw $this->syntax($match); - } - } - - private function assertNotToken($type) - { - if ($this->token['type'] == $type) { - throw $this->syntax("Token {$this->tpos} not allowed to be $type"); - } - } - - /** - * @internal Handles undefined tokens without paying the cost of validation - */ - public function __call($method, $args) - { - $prefix = substr($method, 0, 4); - if ($prefix == 'nud_' || $prefix == 'led_') { - $token = substr($method, 4); - $message = "Unexpected \"$token\" token ($method). Expected one of" - . " the following tokens: " - . implode(', ', array_map(function ($i) { - return '"' . substr($i, 4) . '"'; - }, array_filter( - get_class_methods($this), - function ($i) use ($prefix) { - return strpos($i, $prefix) === 0; - } - ))); - throw $this->syntax($message); - } - - throw new \BadMethodCallException("Call to undefined method $method"); - } -} diff --git a/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php b/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php deleted file mode 100644 index b9e376e..0000000 --- a/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php +++ /dev/null @@ -1,36 +0,0 @@ -createTokenMessage($token, $expectedTypesOrMessage); - parent::__construct($message); - } - - private function createTokenMessage(array $token, array $valid) - { - return sprintf( - 'Expected one of the following: %s; found %s "%s"', - implode(', ', array_keys($valid)), - $token['type'], - $token['value'] - ); - } -} diff --git a/vendor/mtdowling/jmespath.php/src/TreeCompiler.php b/vendor/mtdowling/jmespath.php/src/TreeCompiler.php deleted file mode 100644 index b5f0658..0000000 --- a/vendor/mtdowling/jmespath.php/src/TreeCompiler.php +++ /dev/null @@ -1,419 +0,0 @@ -vars = []; - $this->source = $this->indentation = ''; - $this->write("write('use JmesPath\\TreeInterpreter as Ti;') - ->write('use JmesPath\\FnDispatcher as Fd;') - ->write('use JmesPath\\Utils;') - ->write('') - ->write('function %s(Ti $interpreter, $value) {', $fnName) - ->indent() - ->dispatch($ast) - ->write('') - ->write('return $value;') - ->outdent() - ->write('}'); - - return $this->source; - } - - /** - * @param array $node - * @return mixed - */ - private function dispatch(array $node) - { - return $this->{"visit_{$node['type']}"}($node); - } - - /** - * Creates a monotonically incrementing unique variable name by prefix. - * - * @param string $prefix Variable name prefix - * - * @return string - */ - private function makeVar($prefix) - { - if (!isset($this->vars[$prefix])) { - $this->vars[$prefix] = 0; - return '$' . $prefix; - } - - return '$' . $prefix . ++$this->vars[$prefix]; - } - - /** - * Writes the given line of source code. Pass positional arguments to write - * that match the format of sprintf. - * - * @param string $str String to write - * @return $this - */ - private function write($str) - { - $this->source .= $this->indentation; - if (func_num_args() == 1) { - $this->source .= $str . "\n"; - return $this; - } - $this->source .= vsprintf($str, array_slice(func_get_args(), 1)) . "\n"; - return $this; - } - - /** - * Decreases the indentation level of code being written - * @return $this - */ - private function outdent() - { - $this->indentation = substr($this->indentation, 0, -4); - return $this; - } - - /** - * Increases the indentation level of code being written - * @return $this - */ - private function indent() - { - $this->indentation .= ' '; - return $this; - } - - private function visit_or(array $node) - { - $a = $this->makeVar('beforeOr'); - return $this - ->write('%s = $value;', $a) - ->dispatch($node['children'][0]) - ->write('if (!$value && $value !== "0" && $value !== 0) {') - ->indent() - ->write('$value = %s;', $a) - ->dispatch($node['children'][1]) - ->outdent() - ->write('}'); - } - - private function visit_and(array $node) - { - $a = $this->makeVar('beforeAnd'); - return $this - ->write('%s = $value;', $a) - ->dispatch($node['children'][0]) - ->write('if ($value || $value === "0" || $value === 0) {') - ->indent() - ->write('$value = %s;', $a) - ->dispatch($node['children'][1]) - ->outdent() - ->write('}'); - } - - private function visit_not(array $node) - { - return $this - ->write('// Visiting not node') - ->dispatch($node['children'][0]) - ->write('// Applying boolean not to result of not node') - ->write('$value = !Utils::isTruthy($value);'); - } - - private function visit_subexpression(array $node) - { - return $this - ->dispatch($node['children'][0]) - ->write('if ($value !== null) {') - ->indent() - ->dispatch($node['children'][1]) - ->outdent() - ->write('}'); - } - - private function visit_field(array $node) - { - $arr = '$value[' . var_export($node['value'], true) . ']'; - $obj = '$value->{' . var_export($node['value'], true) . '}'; - $this->write('if (is_array($value) || $value instanceof \\ArrayAccess) {') - ->indent() - ->write('$value = isset(%s) ? %s : null;', $arr, $arr) - ->outdent() - ->write('} elseif ($value instanceof \\stdClass) {') - ->indent() - ->write('$value = isset(%s) ? %s : null;', $obj, $obj) - ->outdent() - ->write("} else {") - ->indent() - ->write('$value = null;') - ->outdent() - ->write("}"); - - return $this; - } - - private function visit_index(array $node) - { - if ($node['value'] >= 0) { - $check = '$value[' . $node['value'] . ']'; - return $this->write( - '$value = (is_array($value) || $value instanceof \\ArrayAccess)' - . ' && isset(%s) ? %s : null;', - $check, $check - ); - } - - $a = $this->makeVar('count'); - return $this - ->write('if (is_array($value) || ($value instanceof \\ArrayAccess && $value instanceof \\Countable)) {') - ->indent() - ->write('%s = count($value) + %s;', $a, $node['value']) - ->write('$value = isset($value[%s]) ? $value[%s] : null;', $a, $a) - ->outdent() - ->write('} else {') - ->indent() - ->write('$value = null;') - ->outdent() - ->write('}'); - } - - private function visit_literal(array $node) - { - return $this->write('$value = %s;', var_export($node['value'], true)); - } - - private function visit_pipe(array $node) - { - return $this - ->dispatch($node['children'][0]) - ->dispatch($node['children'][1]); - } - - private function visit_multi_select_list(array $node) - { - return $this->visit_multi_select_hash($node); - } - - private function visit_multi_select_hash(array $node) - { - $listVal = $this->makeVar('list'); - $value = $this->makeVar('prev'); - $this->write('if ($value !== null) {') - ->indent() - ->write('%s = [];', $listVal) - ->write('%s = $value;', $value); - - $first = true; - foreach ($node['children'] as $child) { - if (!$first) { - $this->write('$value = %s;', $value); - } - $first = false; - if ($node['type'] == 'multi_select_hash') { - $this->dispatch($child['children'][0]); - $key = var_export($child['value'], true); - $this->write('%s[%s] = $value;', $listVal, $key); - } else { - $this->dispatch($child); - $this->write('%s[] = $value;', $listVal); - } - } - - return $this - ->write('$value = %s;', $listVal) - ->outdent() - ->write('}'); - } - - private function visit_function(array $node) - { - $value = $this->makeVar('val'); - $args = $this->makeVar('args'); - $this->write('%s = $value;', $value) - ->write('%s = [];', $args); - - foreach ($node['children'] as $arg) { - $this->dispatch($arg); - $this->write('%s[] = $value;', $args) - ->write('$value = %s;', $value); - } - - return $this->write( - '$value = Fd::getInstance()->__invoke("%s", %s);', - $node['value'], $args - ); - } - - private function visit_slice(array $node) - { - return $this - ->write('$value = !is_string($value) && !Utils::isArray($value)') - ->write(' ? null : Utils::slice($value, %s, %s, %s);', - var_export($node['value'][0], true), - var_export($node['value'][1], true), - var_export($node['value'][2], true) - ); - } - - private function visit_current(array $node) - { - return $this->write('// Visiting current node (no-op)'); - } - - private function visit_expref(array $node) - { - $child = var_export($node['children'][0], true); - return $this->write('$value = function ($value) use ($interpreter) {') - ->indent() - ->write('return $interpreter->visit(%s, $value);', $child) - ->outdent() - ->write('};'); - } - - private function visit_flatten(array $node) - { - $this->dispatch($node['children'][0]); - $merged = $this->makeVar('merged'); - $val = $this->makeVar('val'); - - $this - ->write('// Visiting merge node') - ->write('if (!Utils::isArray($value)) {') - ->indent() - ->write('$value = null;') - ->outdent() - ->write('} else {') - ->indent() - ->write('%s = [];', $merged) - ->write('foreach ($value as %s) {', $val) - ->indent() - ->write('if (is_array(%s) && array_key_exists(0, %s)) {', $val, $val) - ->indent() - ->write('%s = array_merge(%s, %s);', $merged, $merged, $val) - ->outdent() - ->write('} elseif (%s !== []) {', $val) - ->indent() - ->write('%s[] = %s;', $merged, $val) - ->outdent() - ->write('}') - ->outdent() - ->write('}') - ->write('$value = %s;', $merged) - ->outdent() - ->write('}'); - - return $this; - } - - private function visit_projection(array $node) - { - $val = $this->makeVar('val'); - $collected = $this->makeVar('collected'); - $this->write('// Visiting projection node') - ->dispatch($node['children'][0]) - ->write(''); - - if (!isset($node['from'])) { - $this->write('if (!is_array($value) || !($value instanceof \stdClass)) { $value = null; }'); - } elseif ($node['from'] == 'object') { - $this->write('if (!Utils::isObject($value)) { $value = null; }'); - } elseif ($node['from'] == 'array') { - $this->write('if (!Utils::isArray($value)) { $value = null; }'); - } - - $this->write('if ($value !== null) {') - ->indent() - ->write('%s = [];', $collected) - ->write('foreach ((array) $value as %s) {', $val) - ->indent() - ->write('$value = %s;', $val) - ->dispatch($node['children'][1]) - ->write('if ($value !== null) {') - ->indent() - ->write('%s[] = $value;', $collected) - ->outdent() - ->write('}') - ->outdent() - ->write('}') - ->write('$value = %s;', $collected) - ->outdent() - ->write('}'); - - return $this; - } - - private function visit_condition(array $node) - { - $value = $this->makeVar('beforeCondition'); - return $this - ->write('%s = $value;', $value) - ->write('// Visiting condition node') - ->dispatch($node['children'][0]) - ->write('// Checking result of condition node') - ->write('if (Utils::isTruthy($value)) {') - ->indent() - ->write('$value = %s;', $value) - ->dispatch($node['children'][1]) - ->outdent() - ->write('} else {') - ->indent() - ->write('$value = null;') - ->outdent() - ->write('}'); - } - - private function visit_comparator(array $node) - { - $value = $this->makeVar('val'); - $a = $this->makeVar('left'); - $b = $this->makeVar('right'); - - $this - ->write('// Visiting comparator node') - ->write('%s = $value;', $value) - ->dispatch($node['children'][0]) - ->write('%s = $value;', $a) - ->write('$value = %s;', $value) - ->dispatch($node['children'][1]) - ->write('%s = $value;', $b); - - if ($node['value'] == '==') { - $this->write('$value = Utils::isEqual(%s, %s);', $a, $b); - } elseif ($node['value'] == '!=') { - $this->write('$value = !Utils::isEqual(%s, %s);', $a, $b); - } else { - $this->write( - '$value = (is_int(%s) || is_float(%s)) && (is_int(%s) || is_float(%s)) && %s %s %s;', - $a, $a, $b, $b, $a, $node['value'], $b - ); - } - - return $this; - } - - /** @internal */ - public function __call($method, $args) - { - throw new \RuntimeException( - sprintf('Invalid node encountered: %s', json_encode($args[0])) - ); - } -} diff --git a/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php b/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php deleted file mode 100644 index f7eea86..0000000 --- a/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php +++ /dev/null @@ -1,235 +0,0 @@ -fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance(); - } - - /** - * Visits each node in a JMESPath AST and returns the evaluated result. - * - * @param array $node JMESPath AST node - * @param mixed $data Data to evaluate - * - * @return mixed - */ - public function visit(array $node, $data) - { - return $this->dispatch($node, $data); - } - - /** - * Recursively traverses an AST using depth-first, pre-order traversal. - * The evaluation logic for each node type is embedded into a large switch - * statement to avoid the cost of "double dispatch". - * @return mixed - */ - private function dispatch(array $node, $value) - { - $dispatcher = $this->fnDispatcher; - - switch ($node['type']) { - - case 'field': - if (is_array($value) || $value instanceof \ArrayAccess) { - return isset($value[$node['value']]) ? $value[$node['value']] : null; - } elseif ($value instanceof \stdClass) { - return isset($value->{$node['value']}) ? $value->{$node['value']} : null; - } - return null; - - case 'subexpression': - return $this->dispatch( - $node['children'][1], - $this->dispatch($node['children'][0], $value) - ); - - case 'index': - if (!Utils::isArray($value)) { - return null; - } - $idx = $node['value'] >= 0 - ? $node['value'] - : $node['value'] + count($value); - return isset($value[$idx]) ? $value[$idx] : null; - - case 'projection': - $left = $this->dispatch($node['children'][0], $value); - switch ($node['from']) { - case 'object': - if (!Utils::isObject($left)) { - return null; - } - break; - case 'array': - if (!Utils::isArray($left)) { - return null; - } - break; - default: - if (!is_array($left) || !($left instanceof \stdClass)) { - return null; - } - } - - $collected = []; - foreach ((array) $left as $val) { - $result = $this->dispatch($node['children'][1], $val); - if ($result !== null) { - $collected[] = $result; - } - } - - return $collected; - - case 'flatten': - static $skipElement = []; - $value = $this->dispatch($node['children'][0], $value); - - if (!Utils::isArray($value)) { - return null; - } - - $merged = []; - foreach ($value as $values) { - // Only merge up arrays lists and not hashes - if (is_array($values) && array_key_exists(0, $values)) { - $merged = array_merge($merged, $values); - } elseif ($values !== $skipElement) { - $merged[] = $values; - } - } - - return $merged; - - case 'literal': - return $node['value']; - - case 'current': - return $value; - - case 'or': - $result = $this->dispatch($node['children'][0], $value); - return Utils::isTruthy($result) - ? $result - : $this->dispatch($node['children'][1], $value); - - case 'and': - $result = $this->dispatch($node['children'][0], $value); - return Utils::isTruthy($result) - ? $this->dispatch($node['children'][1], $value) - : $result; - - case 'not': - return !Utils::isTruthy( - $this->dispatch($node['children'][0], $value) - ); - - case 'pipe': - return $this->dispatch( - $node['children'][1], - $this->dispatch($node['children'][0], $value) - ); - - case 'multi_select_list': - if ($value === null) { - return null; - } - - $collected = []; - foreach ($node['children'] as $node) { - $collected[] = $this->dispatch($node, $value); - } - - return $collected; - - case 'multi_select_hash': - if ($value === null) { - return null; - } - - $collected = []; - foreach ($node['children'] as $node) { - $collected[$node['value']] = $this->dispatch( - $node['children'][0], - $value - ); - } - - return $collected; - - case 'comparator': - $left = $this->dispatch($node['children'][0], $value); - $right = $this->dispatch($node['children'][1], $value); - if ($node['value'] == '==') { - return Utils::isEqual($left, $right); - } elseif ($node['value'] == '!=') { - return !Utils::isEqual($left, $right); - } else { - return self::relativeCmp($left, $right, $node['value']); - } - - case 'condition': - return Utils::isTruthy($this->dispatch($node['children'][0], $value)) - ? $this->dispatch($node['children'][1], $value) - : null; - - case 'function': - $args = []; - foreach ($node['children'] as $arg) { - $args[] = $this->dispatch($arg, $value); - } - return $dispatcher($node['value'], $args); - - case 'slice': - return is_string($value) || Utils::isArray($value) - ? Utils::slice( - $value, - $node['value'][0], - $node['value'][1], - $node['value'][2] - ) : null; - - case 'expref': - $apply = $node['children'][0]; - return function ($value) use ($apply) { - return $this->visit($apply, $value); - }; - - default: - throw new \RuntimeException("Unknown node type: {$node['type']}"); - } - } - - /** - * @return bool - */ - private static function relativeCmp($left, $right, $cmp) - { - if (!(is_int($left) || is_float($left)) || !(is_int($right) || is_float($right))) { - return false; - } - - switch ($cmp) { - case '>': return $left > $right; - case '>=': return $left >= $right; - case '<': return $left < $right; - case '<=': return $left <= $right; - default: throw new \RuntimeException("Invalid comparison: $cmp"); - } - } -} diff --git a/vendor/mtdowling/jmespath.php/src/Utils.php b/vendor/mtdowling/jmespath.php/src/Utils.php deleted file mode 100644 index 9e69fef..0000000 --- a/vendor/mtdowling/jmespath.php/src/Utils.php +++ /dev/null @@ -1,258 +0,0 @@ - 'boolean', - 'string' => 'string', - 'NULL' => 'null', - 'double' => 'number', - 'float' => 'number', - 'integer' => 'number' - ]; - - /** - * Returns true if the value is truthy - * - * @param mixed $value Value to check - * - * @return bool - */ - public static function isTruthy($value) - { - if (!$value) { - return $value === 0 || $value === '0'; - } elseif ($value instanceof \stdClass) { - return (bool) get_object_vars($value); - } else { - return true; - } - } - - /** - * Gets the JMESPath type equivalent of a PHP variable. - * - * @param mixed $arg PHP variable - * @return string Returns the JSON data type - * @throws \InvalidArgumentException when an unknown type is given. - */ - public static function type($arg) - { - $type = gettype($arg); - if (isset(self::$typeMap[$type])) { - return self::$typeMap[$type]; - } elseif ($type === 'array') { - if (empty($arg)) { - return 'array'; - } - reset($arg); - return key($arg) === 0 ? 'array' : 'object'; - } elseif ($arg instanceof \stdClass) { - return 'object'; - } elseif ($arg instanceof \Closure) { - return 'expression'; - } elseif ($arg instanceof \ArrayAccess - && $arg instanceof \Countable - ) { - return count($arg) == 0 || $arg->offsetExists(0) - ? 'array' - : 'object'; - } elseif (method_exists($arg, '__toString')) { - return 'string'; - } - - throw new \InvalidArgumentException( - 'Unable to determine JMESPath type from ' . get_class($arg) - ); - } - - /** - * Determine if the provided value is a JMESPath compatible object. - * - * @param mixed $value - * - * @return bool - */ - public static function isObject($value) - { - if (is_array($value)) { - return !$value || array_keys($value)[0] !== 0; - } - - // Handle array-like values. Must be empty or offset 0 does not exist - return $value instanceof \Countable && $value instanceof \ArrayAccess - ? count($value) == 0 || !$value->offsetExists(0) - : $value instanceof \stdClass; - } - - /** - * Determine if the provided value is a JMESPath compatible array. - * - * @param mixed $value - * - * @return bool - */ - public static function isArray($value) - { - if (is_array($value)) { - return !$value || array_keys($value)[0] === 0; - } - - // Handle array-like values. Must be empty or offset 0 exists. - return $value instanceof \Countable && $value instanceof \ArrayAccess - ? count($value) == 0 || $value->offsetExists(0) - : false; - } - - /** - * JSON aware value comparison function. - * - * @param mixed $a First value to compare - * @param mixed $b Second value to compare - * - * @return bool - */ - public static function isEqual($a, $b) - { - if ($a === $b) { - return true; - } elseif ($a instanceof \stdClass) { - return self::isEqual((array) $a, $b); - } elseif ($b instanceof \stdClass) { - return self::isEqual($a, (array) $b); - } else { - return false; - } - } - - /** - * Safely add together two values. - * - * @param mixed $a First value to add - * @param mixed $b Second value to add - * - * @return int|float - */ - public static function add($a, $b) - { - if (is_numeric($a)) { - if (is_numeric($b)) { - return $a + $b; - } else { - return $a; - } - } else { - if (is_numeric($b)) { - return $b; - } else { - return 0; - } - } - } - - /** - * JMESPath requires a stable sorting algorithm, so here we'll implement - * a simple Schwartzian transform that uses array index positions as tie - * breakers. - * - * @param array $data List or map of data to sort - * @param callable $sortFn Callable used to sort values - * - * @return array Returns the sorted array - * @link http://en.wikipedia.org/wiki/Schwartzian_transform - */ - public static function stableSort(array $data, callable $sortFn) - { - // Decorate each item by creating an array of [value, index] - array_walk($data, function (&$v, $k) { - $v = [$v, $k]; - }); - // Sort by the sort function and use the index as a tie-breaker - uasort($data, function ($a, $b) use ($sortFn) { - return $sortFn($a[0], $b[0]) ?: ($a[1] < $b[1] ? -1 : 1); - }); - - // Undecorate each item and return the resulting sorted array - return array_map(function ($v) { - return $v[0]; - }, array_values($data)); - } - - /** - * Creates a Python-style slice of a string or array. - * - * @param array|string $value Value to slice - * @param int|null $start Starting position - * @param int|null $stop Stop position - * @param int $step Step (1, 2, -1, -2, etc.) - * - * @return array|string - * @throws \InvalidArgumentException - */ - public static function slice($value, $start = null, $stop = null, $step = 1) - { - if (!is_array($value) && !is_string($value)) { - throw new \InvalidArgumentException('Expects string or array'); - } - - return self::sliceIndices($value, $start, $stop, $step); - } - - private static function adjustEndpoint($length, $endpoint, $step) - { - if ($endpoint < 0) { - $endpoint += $length; - if ($endpoint < 0) { - $endpoint = $step < 0 ? -1 : 0; - } - } elseif ($endpoint >= $length) { - $endpoint = $step < 0 ? $length - 1 : $length; - } - - return $endpoint; - } - - private static function adjustSlice($length, $start, $stop, $step) - { - if ($step === null) { - $step = 1; - } elseif ($step === 0) { - throw new \RuntimeException('step cannot be 0'); - } - - if ($start === null) { - $start = $step < 0 ? $length - 1 : 0; - } else { - $start = self::adjustEndpoint($length, $start, $step); - } - - if ($stop === null) { - $stop = $step < 0 ? -1 : $length; - } else { - $stop = self::adjustEndpoint($length, $stop, $step); - } - - return [$start, $stop, $step]; - } - - private static function sliceIndices($subject, $start, $stop, $step) - { - $type = gettype($subject); - $len = $type == 'string' ? mb_strlen($subject, 'UTF-8') : count($subject); - list($start, $stop, $step) = self::adjustSlice($len, $start, $stop, $step); - - $result = []; - if ($step > 0) { - for ($i = $start; $i < $stop; $i += $step) { - $result[] = $subject[$i]; - } - } else { - for ($i = $start; $i > $stop; $i += $step) { - $result[] = $subject[$i]; - } - } - - return $type == 'string' ? implode('', $result) : $result; - } -} diff --git a/vendor/nesbot/carbon/.phpstorm.meta.php b/vendor/nesbot/carbon/.phpstorm.meta.php deleted file mode 100644 index bd7c7e0..0000000 --- a/vendor/nesbot/carbon/.phpstorm.meta.php +++ /dev/null @@ -1,10 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\MessageFormatter; - -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; - -if (!class_exists(LazyMessageFormatter::class, false)) { - abstract class LazyMessageFormatter implements MessageFormatterInterface - { - public function format(string $message, string $locale, array $parameters = []): string - { - return $this->formatter->format( - $message, - $this->transformLocale($locale), - $parameters - ); - } - } -} diff --git a/vendor/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php b/vendor/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php deleted file mode 100644 index cbd890d..0000000 --- a/vendor/nesbot/carbon/lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\MessageFormatter; - -use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; - -if (!class_exists(LazyMessageFormatter::class, false)) { - abstract class LazyMessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface - { - abstract protected function transformLocale(?string $locale): ?string; - - public function format($message, $locale, array $parameters = []) - { - return $this->formatter->format( - $message, - $this->transformLocale($locale), - $parameters - ); - } - - public function choiceFormat($message, $number, $locale, array $parameters = []) - { - return $this->formatter->choiceFormat($message, $number, $locale, $parameters); - } - } -} diff --git a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php b/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php deleted file mode 100644 index ba7cf63..0000000 --- a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroBuiltin.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\PHPStan; - -use PHPStan\BetterReflection\Reflection; -use ReflectionMethod; - -if (!class_exists(AbstractReflectionMacro::class, false)) { - abstract class AbstractReflectionMacro extends AbstractMacro - { - /** - * {@inheritdoc} - */ - public function getReflection(): ?ReflectionMethod - { - if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) { - return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction); - } - - return $this->reflectionFunction instanceof ReflectionMethod - ? $this->reflectionFunction - : null; - } - } -} diff --git a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php b/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php deleted file mode 100644 index bd4c8e8..0000000 --- a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/AbstractMacroStatic.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\PHPStan; - -use PHPStan\BetterReflection\Reflection; -use ReflectionMethod; - -if (!class_exists(AbstractReflectionMacro::class, false)) { - abstract class AbstractReflectionMacro extends AbstractMacro - { - /** - * {@inheritdoc} - */ - public function getReflection(): ?Reflection\Adapter\ReflectionMethod - { - if ($this->reflectionFunction instanceof Reflection\Adapter\ReflectionMethod) { - return $this->reflectionFunction; - } - - if ($this->reflectionFunction instanceof Reflection\ReflectionMethod) { - return new Reflection\Adapter\ReflectionMethod($this->reflectionFunction); - } - - return $this->reflectionFunction instanceof ReflectionMethod - ? new Reflection\Adapter\ReflectionMethod( - Reflection\ReflectionMethod::createFromName( - $this->reflectionFunction->getDeclaringClass()->getName(), - $this->reflectionFunction->getName() - ) - ) - : null; - } - } -} diff --git a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php b/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php deleted file mode 100644 index f615b3a..0000000 --- a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroStrongType.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\PHPStan; - -if (!class_exists(LazyMacro::class, false)) { - abstract class LazyMacro extends AbstractReflectionMacro - { - /** - * {@inheritdoc} - */ - public function getFileName(): ?string - { - $file = $this->reflectionFunction->getFileName(); - - return (($file ? realpath($file) : null) ?: $file) ?: null; - } - - /** - * {@inheritdoc} - */ - public function getStartLine(): ?int - { - return $this->reflectionFunction->getStartLine(); - } - - /** - * {@inheritdoc} - */ - public function getEndLine(): ?int - { - return $this->reflectionFunction->getEndLine(); - } - } -} diff --git a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php b/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php deleted file mode 100644 index bf64c1d..0000000 --- a/vendor/nesbot/carbon/lazy/Carbon/PHPStan/MacroWeakType.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\PHPStan; - -if (!class_exists(LazyMacro::class, false)) { - abstract class LazyMacro extends AbstractReflectionMacro - { - /** - * {@inheritdoc} - * - * @return string|false - */ - public function getFileName() - { - $file = $this->reflectionFunction->getFileName(); - - return (($file ? realpath($file) : null) ?: $file) ?: null; - } - - /** - * {@inheritdoc} - * - * @return int|false - */ - public function getStartLine() - { - return $this->reflectionFunction->getStartLine(); - } - - /** - * {@inheritdoc} - * - * @return int|false - */ - public function getEndLine() - { - return $this->reflectionFunction->getEndLine(); - } - } -} diff --git a/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php b/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php deleted file mode 100644 index d35308a..0000000 --- a/vendor/nesbot/carbon/lazy/Carbon/TranslatorStrongType.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Symfony\Component\Translation\MessageCatalogueInterface; - -if (!class_exists(LazyTranslator::class, false)) { - class LazyTranslator extends AbstractTranslator implements TranslatorStrongTypeInterface - { - public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string - { - return $this->translate($id, $parameters, $domain, $locale); - } - - public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages') - { - $messages = $this->getPrivateProperty($catalogue, 'messages'); - - if (isset($messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id])) { - return $messages[$domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX][$id]; - } - - if (isset($messages[$domain][$id])) { - return $messages[$domain][$id]; - } - - $fallbackCatalogue = $this->getPrivateProperty($catalogue, 'fallbackCatalogue'); - - if ($fallbackCatalogue !== null) { - return $this->getFromCatalogue($fallbackCatalogue, $id, $domain); - } - - return $id; - } - - private function getPrivateProperty($instance, string $field) - { - return (function (string $field) { - return $this->$field; - })->call($instance, $field); - } - } -} diff --git a/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php b/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php deleted file mode 100644 index 94dbdc3..0000000 --- a/vendor/nesbot/carbon/lazy/Carbon/TranslatorWeakType.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -if (!class_exists(LazyTranslator::class, false)) { - class LazyTranslator extends AbstractTranslator - { - /** - * Returns the translation. - * - * @param string|null $id - * @param array $parameters - * @param string|null $domain - * @param string|null $locale - * - * @return string - */ - public function trans($id, array $parameters = [], $domain = null, $locale = null) - { - return $this->translate($id, $parameters, $domain, $locale); - } - } -} diff --git a/vendor/nesbot/carbon/readme.md b/vendor/nesbot/carbon/readme.md deleted file mode 100644 index 3f41177..0000000 --- a/vendor/nesbot/carbon/readme.md +++ /dev/null @@ -1,175 +0,0 @@ -# Carbon - -[![Latest Stable Version](https://img.shields.io/packagist/v/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) -[![Total Downloads](https://img.shields.io/packagist/dt/nesbot/carbon.svg?style=flat-square)](https://packagist.org/packages/nesbot/carbon) -[![GitHub Actions](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fbriannesbitt%2FCarbon%2Fbadge&style=flat-square&label=Build&logo=none)](https://github.com/briannesbitt/Carbon/actions) -[![codecov.io](https://img.shields.io/codecov/c/github/briannesbitt/Carbon.svg?style=flat-square)](https://codecov.io/github/briannesbitt/Carbon?branch=master) -[![Tidelift](https://tidelift.com/badges/github/briannesbitt/Carbon)](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme) - -An international PHP extension for DateTime. [https://carbon.nesbot.com](https://carbon.nesbot.com) - -```php -toDateTimeString()); -printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString() -$tomorrow = Carbon::now()->addDay(); -$lastWeek = Carbon::now()->subWeek(); -$nextSummerOlympics = Carbon::createFromDate(2016)->addYears(4); - -$officialDate = Carbon::now()->toRfc2822String(); - -$howOldAmI = Carbon::createFromDate(1975, 5, 21)->age; - -$noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London'); - -$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT'); - -// Don't really want this to happen so mock now -Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1)); - -// comparisons are always done in UTC -if (Carbon::now()->gte($internetWillBlowUpOn)) { - die(); -} - -// Phew! Return to normal behaviour -Carbon::setTestNow(); - -if (Carbon::now()->isWeekend()) { - echo 'Party!'; -} -// Over 200 languages (and over 500 regional variants) supported: -echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago' -echo Carbon::now()->subMinutes(2)->locale('zh_CN')->diffForHumans(); // '2分钟前' -echo Carbon::parse('2019-07-23 14:51')->isoFormat('LLLL'); // 'Tuesday, July 23, 2019 2:51 PM' -echo Carbon::parse('2019-07-23 14:51')->locale('fr_FR')->isoFormat('LLLL'); // 'mardi 23 juillet 2019 14:51' - -// ... but also does 'from now', 'after' and 'before' -// rolling up to seconds, minutes, hours, days, months, years - -$daysSinceEpoch = Carbon::createFromTimestamp(0)->diffInDays(); -``` - -[Get supported nesbot/carbon with the Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme) - -## Installation - -### With Composer - -``` -$ composer require nesbot/carbon -``` - -```json -{ - "require": { - "nesbot/carbon": "^2.16" - } -} -``` - -```php - - -### Translators - -[Thanks to people helping us to translate Carbon in so many languages](https://carbon.nesbot.com/contribute/translators/) - -### Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. - - -Онлайн казино -CasinoHex Canada -Probukmacher -Игровые автоматы -Casino-portugal.pt -Slots City -inkedin -Онлайн казино України -OnlineCasinosSpelen -Best non Gamstop sites in the UK -Real Money Pokies -Non GamStop Bookies UK -Онлайн Казино Украины -SSSTwitter -Non-GamStop Bets UK -Chudovo -UK Casino Gap -NZ Casino Deps -NonStopCasino.org -Migliori Siti Non AAMS -UK NonGamStopCasinos -SnapTik -IG Downloader -Proxidize -Blastup -AzuraCast -Triplebyte -GitHub Sponsors -Salesforce - - -[[Become a sponsor via OpenCollective](https://opencollective.com/Carbon#sponsor)] - - - - - - -[[Become a sponsor via GitHub](https://github.com/sponsors/kylekatarnls)] - -### Backers - -Thank you to all our backers! 🙏 - - - -[[Become a backer](https://opencollective.com/Carbon#backer)] - -## Carbon for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of ``Carbon`` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/vendor/nesbot/carbon/sponsors.php b/vendor/nesbot/carbon/sponsors.php deleted file mode 100644 index 67b2171..0000000 --- a/vendor/nesbot/carbon/sponsors.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Carbon\CarbonImmutable; - -require_once __DIR__.'/vendor/autoload.php'; - -function getMaxHistoryMonthsByAmount($amount): int -{ - if ($amount >= 50) { - return 6; - } - - if ($amount >= 20) { - return 4; - } - - return 2; -} - -function getHtmlAttribute($rawValue): string -{ - return str_replace( - ['​', "\r"], - '', - trim(htmlspecialchars((string) $rawValue), "  \n\r\t\v\0"), - ); -} - -function getOpenCollectiveSponsors(): string -{ - $customSponsorImages = [ - // For consistency and equity among sponsors, as of now, we kindly ask our sponsors - // to provide an image having a width/height ratio between 1/1 and 2/1. - // By default, we'll show the member picture from OpenCollective, and will resize it if bigger - // int(OpenCollective.MemberId) => ImageURL - ]; - - $members = json_decode(file_get_contents('https://opencollective.com/carbon/members/all.json'), true); - - $list = array_filter($members, static function ($member): bool { - return ($member['lastTransactionAmount'] > 3 || $member['isActive']) && - $member['role'] === 'BACKER' && - $member['type'] !== 'USER' && - ( - $member['totalAmountDonated'] > 100 || - $member['lastTransactionAt'] > CarbonImmutable::now() - ->subMonthsNoOverflow(getMaxHistoryMonthsByAmount($member['lastTransactionAmount'])) - ->format('Y-m-d h:i') || - $member['isActive'] && $member['lastTransactionAmount'] >= 30 - ); - }); - - $list = array_map(static function (array $member): array { - $createdAt = CarbonImmutable::parse($member['createdAt']); - $lastTransactionAt = CarbonImmutable::parse($member['lastTransactionAt']); - - if ($createdAt->format('d H:i:s.u') > $lastTransactionAt->format('d H:i:s.u')) { - $createdAt = $createdAt - ->setDay($lastTransactionAt->day) - ->modify($lastTransactionAt->format('H:i:s.u')); - } - - $monthlyContribution = (float) ($member['totalAmountDonated'] / ceil($createdAt->floatDiffInMonths())); - - if ( - $lastTransactionAt->isAfter('last month') && - $member['lastTransactionAmount'] > $monthlyContribution - ) { - $monthlyContribution = (float) $member['lastTransactionAmount']; - } - - $yearlyContribution = (float) ($member['totalAmountDonated'] / max(1, $createdAt->floatDiffInYears())); - $status = null; - - if ($monthlyContribution > 29) { - $status = 'sponsor'; - } elseif ($monthlyContribution > 4.5 || $yearlyContribution > 29) { - $status = 'backer'; - } elseif ($member['totalAmountDonated'] > 0) { - $status = 'helper'; - } - - return array_merge($member, [ - 'star' => ($monthlyContribution > 98 || $yearlyContribution > 500), - 'status' => $status, - 'monthlyContribution' => $monthlyContribution, - 'yearlyContribution' => $yearlyContribution, - ]); - }, $list); - - usort($list, static function (array $a, array $b): int { - return ($b['monthlyContribution'] <=> $a['monthlyContribution']) - ?: ($b['totalAmountDonated'] <=> $a['totalAmountDonated']); - }); - - return implode('', array_map(static function (array $member) use ($customSponsorImages): string { - $href = htmlspecialchars($member['website'] ?? $member['profile']); - $src = $customSponsorImages[$member['MemberId'] ?? ''] ?? $member['image'] ?? (strtr($member['profile'], ['https://opencollective.com/' => 'https://images.opencollective.com/']).'/avatar/256.png'); - [$x, $y] = @getimagesize($src) ?: [0, 0]; - $validImage = ($x && $y); - $src = $validImage ? htmlspecialchars($src) : 'https://opencollective.com/static/images/default-guest-logo.svg'; - $height = $member['status'] === 'sponsor' ? 64 : 42; - $width = min($height * 2, $validImage ? round($x * $height / $y) : $height); - $href .= (strpos($href, '?') === false ? '?' : '&').'utm_source=opencollective&utm_medium=github&utm_campaign=Carbon'; - $title = getHtmlAttribute(($member['description'] ?? null) ?: $member['name']); - $alt = getHtmlAttribute($member['name']); - - return "\n".''. - ''.$alt.''. - ''; - }, $list))."\n"; -} - -file_put_contents('readme.md', preg_replace_callback( - '/()[\s\S]+()/', - static function (array $match): string { - return $match[1].getOpenCollectiveSponsors().$match[2]; - }, - file_get_contents('readme.md') -)); diff --git a/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php b/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php deleted file mode 100644 index 8b8fe08..0000000 --- a/vendor/nesbot/carbon/src/Carbon/AbstractTranslator.php +++ /dev/null @@ -1,398 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Carbon\MessageFormatter\MessageFormatterMapper; -use Closure; -use ReflectionException; -use ReflectionFunction; -use Symfony\Component\Translation; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; -use Symfony\Component\Translation\Loader\ArrayLoader; - -abstract class AbstractTranslator extends Translation\Translator -{ - /** - * Translator singletons for each language. - * - * @var array - */ - protected static $singletons = []; - - /** - * List of custom localized messages. - * - * @var array - */ - protected $messages = []; - - /** - * List of custom directories that contain translation files. - * - * @var string[] - */ - protected $directories = []; - - /** - * Set to true while constructing. - * - * @var bool - */ - protected $initializing = false; - - /** - * List of locales aliases. - * - * @var array - */ - protected $aliases = [ - 'me' => 'sr_Latn_ME', - 'scr' => 'sh', - ]; - - /** - * Return a singleton instance of Translator. - * - * @param string|null $locale optional initial locale ("en" - english by default) - * - * @return static - */ - public static function get($locale = null) - { - $locale = $locale ?: 'en'; - $key = static::class === Translator::class ? $locale : static::class.'|'.$locale; - - if (!isset(static::$singletons[$key])) { - static::$singletons[$key] = new static($locale); - } - - return static::$singletons[$key]; - } - - public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) - { - parent::setLocale($locale); - $this->initializing = true; - $this->directories = [__DIR__.'/Lang']; - $this->addLoader('array', new ArrayLoader()); - parent::__construct($locale, new MessageFormatterMapper($formatter), $cacheDir, $debug); - $this->initializing = false; - } - - /** - * Returns the list of directories translation files are searched in. - * - * @return array - */ - public function getDirectories(): array - { - return $this->directories; - } - - /** - * Set list of directories translation files are searched in. - * - * @param array $directories new directories list - * - * @return $this - */ - public function setDirectories(array $directories) - { - $this->directories = $directories; - - return $this; - } - - /** - * Add a directory to the list translation files are searched in. - * - * @param string $directory new directory - * - * @return $this - */ - public function addDirectory(string $directory) - { - $this->directories[] = $directory; - - return $this; - } - - /** - * Remove a directory from the list translation files are searched in. - * - * @param string $directory directory path - * - * @return $this - */ - public function removeDirectory(string $directory) - { - $search = rtrim(strtr($directory, '\\', '/'), '/'); - - return $this->setDirectories(array_filter($this->getDirectories(), function ($item) use ($search) { - return rtrim(strtr($item, '\\', '/'), '/') !== $search; - })); - } - - /** - * Reset messages of a locale (all locale if no locale passed). - * Remove custom messages and reload initial messages from matching - * file in Lang directory. - * - * @param string|null $locale - * - * @return bool - */ - public function resetMessages($locale = null) - { - if ($locale === null) { - $this->messages = []; - - return true; - } - - foreach ($this->getDirectories() as $directory) { - $data = @include sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale); - - if ($data !== false) { - $this->messages[$locale] = $data; - $this->addResource('array', $this->messages[$locale], $locale); - - return true; - } - } - - return false; - } - - /** - * Returns the list of files matching a given locale prefix (or all if empty). - * - * @param string $prefix prefix required to filter result - * - * @return array - */ - public function getLocalesFiles($prefix = '') - { - $files = []; - - foreach ($this->getDirectories() as $directory) { - $directory = rtrim($directory, '\\/'); - - foreach (glob("$directory/$prefix*.php") as $file) { - $files[] = $file; - } - } - - return array_unique($files); - } - - /** - * Returns the list of internally available locales and already loaded custom locales. - * (It will ignore custom translator dynamic loading.) - * - * @param string $prefix prefix required to filter result - * - * @return array - */ - public function getAvailableLocales($prefix = '') - { - $locales = []; - foreach ($this->getLocalesFiles($prefix) as $file) { - $locales[] = substr($file, strrpos($file, '/') + 1, -4); - } - - return array_unique(array_merge($locales, array_keys($this->messages))); - } - - protected function translate(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string - { - if ($domain === null) { - $domain = 'messages'; - } - - $catalogue = $this->getCatalogue($locale); - $format = $this instanceof TranslatorStrongTypeInterface - ? $this->getFromCatalogue($catalogue, (string) $id, $domain) - : $this->getCatalogue($locale)->get((string) $id, $domain); // @codeCoverageIgnore - - if ($format instanceof Closure) { - // @codeCoverageIgnoreStart - try { - $count = (new ReflectionFunction($format))->getNumberOfRequiredParameters(); - } catch (ReflectionException $exception) { - $count = 0; - } - // @codeCoverageIgnoreEnd - - return $format( - ...array_values($parameters), - ...array_fill(0, max(0, $count - \count($parameters)), null) - ); - } - - return parent::trans($id, $parameters, $domain, $locale); - } - - /** - * Init messages language from matching file in Lang directory. - * - * @param string $locale - * - * @return bool - */ - protected function loadMessagesFromFile($locale) - { - return isset($this->messages[$locale]) || $this->resetMessages($locale); - } - - /** - * Set messages of a locale and take file first if present. - * - * @param string $locale - * @param array $messages - * - * @return $this - */ - public function setMessages($locale, $messages) - { - $this->loadMessagesFromFile($locale); - $this->addResource('array', $messages, $locale); - $this->messages[$locale] = array_merge( - $this->messages[$locale] ?? [], - $messages - ); - - return $this; - } - - /** - * Set messages of the current locale and take file first if present. - * - * @param array $messages - * - * @return $this - */ - public function setTranslations($messages) - { - return $this->setMessages($this->getLocale(), $messages); - } - - /** - * Get messages of a locale, if none given, return all the - * languages. - * - * @param string|null $locale - * - * @return array - */ - public function getMessages($locale = null) - { - return $locale === null ? $this->messages : $this->messages[$locale]; - } - - /** - * Set the current translator locale and indicate if the source locale file exists - * - * @param string $locale locale ex. en - * - * @return bool - */ - public function setLocale($locale) - { - $locale = preg_replace_callback('/[-_]([a-z]{2,}|\d{2,})/', function ($matches) { - // _2-letters or YUE is a region, _3+-letters is a variant - $upper = strtoupper($matches[1]); - - if ($upper === 'YUE' || $upper === 'ISO' || \strlen($upper) < 3) { - return "_$upper"; - } - - return '_'.ucfirst($matches[1]); - }, strtolower($locale)); - - $previousLocale = $this->getLocale(); - - if ($previousLocale === $locale && isset($this->messages[$locale])) { - return true; - } - - unset(static::$singletons[$previousLocale]); - - if ($locale === 'auto') { - $completeLocale = setlocale(LC_TIME, '0'); - $locale = preg_replace('/^([^_.-]+).*$/', '$1', $completeLocale); - $locales = $this->getAvailableLocales($locale); - - $completeLocaleChunks = preg_split('/[_.-]+/', $completeLocale); - - $getScore = function ($language) use ($completeLocaleChunks) { - return self::compareChunkLists($completeLocaleChunks, preg_split('/[_.-]+/', $language)); - }; - - usort($locales, function ($first, $second) use ($getScore) { - return $getScore($second) <=> $getScore($first); - }); - - $locale = $locales[0]; - } - - if (isset($this->aliases[$locale])) { - $locale = $this->aliases[$locale]; - } - - // If subtag (ex: en_CA) first load the macro (ex: en) to have a fallback - if (str_contains($locale, '_') && - $this->loadMessagesFromFile($macroLocale = preg_replace('/^([^_]+).*$/', '$1', $locale)) - ) { - parent::setLocale($macroLocale); - } - - if (!$this->loadMessagesFromFile($locale) && !$this->initializing) { - return false; - } - - parent::setLocale($locale); - - return true; - } - - /** - * Show locale on var_dump(). - * - * @return array - */ - public function __debugInfo() - { - return [ - 'locale' => $this->getLocale(), - ]; - } - - private static function compareChunkLists($referenceChunks, $chunks) - { - $score = 0; - - foreach ($referenceChunks as $index => $chunk) { - if (!isset($chunks[$index])) { - $score++; - - continue; - } - - if (strtolower($chunks[$index]) === strtolower($chunk)) { - $score += 10; - } - } - - return $score; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Carbon.php b/vendor/nesbot/carbon/src/Carbon/Carbon.php deleted file mode 100644 index e32569a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Carbon.php +++ /dev/null @@ -1,523 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Carbon\Traits\Date; -use Carbon\Traits\DeprecatedProperties; -use DateTime; -use DateTimeInterface; -use DateTimeZone; - -/** - * A simple API extension for DateTime. - * - * @mixin DeprecatedProperties - * - * - * - * @property int $year - * @property int $yearIso - * @property int $month - * @property int $day - * @property int $hour - * @property int $minute - * @property int $second - * @property int $micro - * @property int $microsecond - * @property int|float|string $timestamp seconds since the Unix Epoch - * @property string $englishDayOfWeek the day of week in English - * @property string $shortEnglishDayOfWeek the abbreviated day of week in English - * @property string $englishMonth the month in English - * @property string $shortEnglishMonth the abbreviated month in English - * @property int $milliseconds - * @property int $millisecond - * @property int $milli - * @property int $week 1 through 53 - * @property int $isoWeek 1 through 53 - * @property int $weekYear year according to week format - * @property int $isoWeekYear year according to ISO week format - * @property int $dayOfYear 1 through 366 - * @property int $age does a diffInYears() with default parameters - * @property int $offset the timezone offset in seconds from UTC - * @property int $offsetMinutes the timezone offset in minutes from UTC - * @property int $offsetHours the timezone offset in hours from UTC - * @property CarbonTimeZone $timezone the current timezone - * @property CarbonTimeZone $tz alias of $timezone - * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) - * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) - * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday - * @property-read int $daysInMonth number of days in the given month - * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) - * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) - * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name - * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName - * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read int $noZeroHour current hour from 1 to 24 - * @property-read int $weeksInYear 51 through 53 - * @property-read int $isoWeeksInYear 51 through 53 - * @property-read int $weekOfMonth 1 through 5 - * @property-read int $weekNumberInMonth 1 through 5 - * @property-read int $firstWeekDay 0 through 6 - * @property-read int $lastWeekDay 0 through 6 - * @property-read int $daysInYear 365 or 366 - * @property-read int $quarter the quarter of this instance, 1 - 4 - * @property-read int $decade the decade of this instance - * @property-read int $century the century of this instance - * @property-read int $millennium the millennium of this instance - * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise - * @property-read bool $local checks if the timezone is local, true if local, false otherwise - * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise - * @property-read string $timezoneName the current timezone name - * @property-read string $tzName alias of $timezoneName - * @property-read string $locale locale of the current instance - * - * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) - * @method bool isLocal() Check if the current instance has non-UTC timezone. - * @method bool isValid() Check if the current instance is a valid date. - * @method bool isDST() Check if the current instance is in a daylight saving time. - * @method bool isSunday() Checks if the instance day is sunday. - * @method bool isMonday() Checks if the instance day is monday. - * @method bool isTuesday() Checks if the instance day is tuesday. - * @method bool isWednesday() Checks if the instance day is wednesday. - * @method bool isThursday() Checks if the instance day is thursday. - * @method bool isFriday() Checks if the instance day is friday. - * @method bool isSaturday() Checks if the instance day is saturday. - * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. - * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. - * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. - * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. - * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. - * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. - * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. - * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. - * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. - * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. - * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. - * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. - * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. - * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. - * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. - * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. - * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. - * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. - * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. - * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. - * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. - * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. - * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. - * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. - * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. - * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. - * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. - * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. - * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. - * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. - * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. - * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. - * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. - * @method $this years(int $value) Set current instance year to the given value. - * @method $this year(int $value) Set current instance year to the given value. - * @method $this setYears(int $value) Set current instance year to the given value. - * @method $this setYear(int $value) Set current instance year to the given value. - * @method $this months(int $value) Set current instance month to the given value. - * @method $this month(int $value) Set current instance month to the given value. - * @method $this setMonths(int $value) Set current instance month to the given value. - * @method $this setMonth(int $value) Set current instance month to the given value. - * @method $this days(int $value) Set current instance day to the given value. - * @method $this day(int $value) Set current instance day to the given value. - * @method $this setDays(int $value) Set current instance day to the given value. - * @method $this setDay(int $value) Set current instance day to the given value. - * @method $this hours(int $value) Set current instance hour to the given value. - * @method $this hour(int $value) Set current instance hour to the given value. - * @method $this setHours(int $value) Set current instance hour to the given value. - * @method $this setHour(int $value) Set current instance hour to the given value. - * @method $this minutes(int $value) Set current instance minute to the given value. - * @method $this minute(int $value) Set current instance minute to the given value. - * @method $this setMinutes(int $value) Set current instance minute to the given value. - * @method $this setMinute(int $value) Set current instance minute to the given value. - * @method $this seconds(int $value) Set current instance second to the given value. - * @method $this second(int $value) Set current instance second to the given value. - * @method $this setSeconds(int $value) Set current instance second to the given value. - * @method $this setSecond(int $value) Set current instance second to the given value. - * @method $this millis(int $value) Set current instance millisecond to the given value. - * @method $this milli(int $value) Set current instance millisecond to the given value. - * @method $this setMillis(int $value) Set current instance millisecond to the given value. - * @method $this setMilli(int $value) Set current instance millisecond to the given value. - * @method $this milliseconds(int $value) Set current instance millisecond to the given value. - * @method $this millisecond(int $value) Set current instance millisecond to the given value. - * @method $this setMilliseconds(int $value) Set current instance millisecond to the given value. - * @method $this setMillisecond(int $value) Set current instance millisecond to the given value. - * @method $this micros(int $value) Set current instance microsecond to the given value. - * @method $this micro(int $value) Set current instance microsecond to the given value. - * @method $this setMicros(int $value) Set current instance microsecond to the given value. - * @method $this setMicro(int $value) Set current instance microsecond to the given value. - * @method $this microseconds(int $value) Set current instance microsecond to the given value. - * @method $this microsecond(int $value) Set current instance microsecond to the given value. - * @method $this setMicroseconds(int $value) Set current instance microsecond to the given value. - * @method $this setMicrosecond(int $value) Set current instance microsecond to the given value. - * @method $this addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). - * @method $this addYear() Add one year to the instance (using date interval). - * @method $this subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). - * @method $this subYear() Sub one year to the instance (using date interval). - * @method $this addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. - * @method $this subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. - * @method $this addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). - * @method $this addMonth() Add one month to the instance (using date interval). - * @method $this subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). - * @method $this subMonth() Sub one month to the instance (using date interval). - * @method $this addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. - * @method $this subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. - * @method $this addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). - * @method $this addDay() Add one day to the instance (using date interval). - * @method $this subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). - * @method $this subDay() Sub one day to the instance (using date interval). - * @method $this addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). - * @method $this addHour() Add one hour to the instance (using date interval). - * @method $this subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). - * @method $this subHour() Sub one hour to the instance (using date interval). - * @method $this addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). - * @method $this addMinute() Add one minute to the instance (using date interval). - * @method $this subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). - * @method $this subMinute() Sub one minute to the instance (using date interval). - * @method $this addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). - * @method $this addSecond() Add one second to the instance (using date interval). - * @method $this subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). - * @method $this subSecond() Sub one second to the instance (using date interval). - * @method $this addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method $this addMilli() Add one millisecond to the instance (using date interval). - * @method $this subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method $this subMilli() Sub one millisecond to the instance (using date interval). - * @method $this addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method $this addMillisecond() Add one millisecond to the instance (using date interval). - * @method $this subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method $this subMillisecond() Sub one millisecond to the instance (using date interval). - * @method $this addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method $this addMicro() Add one microsecond to the instance (using date interval). - * @method $this subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method $this subMicro() Sub one microsecond to the instance (using date interval). - * @method $this addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method $this addMicrosecond() Add one microsecond to the instance (using date interval). - * @method $this subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method $this subMicrosecond() Sub one microsecond to the instance (using date interval). - * @method $this addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). - * @method $this addMillennium() Add one millennium to the instance (using date interval). - * @method $this subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). - * @method $this subMillennium() Sub one millennium to the instance (using date interval). - * @method $this addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method $this subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method $this addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). - * @method $this addCentury() Add one century to the instance (using date interval). - * @method $this subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). - * @method $this subCentury() Sub one century to the instance (using date interval). - * @method $this addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. - * @method $this subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. - * @method $this addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). - * @method $this addDecade() Add one decade to the instance (using date interval). - * @method $this subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). - * @method $this subDecade() Sub one decade to the instance (using date interval). - * @method $this addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. - * @method $this subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. - * @method $this addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). - * @method $this addQuarter() Add one quarter to the instance (using date interval). - * @method $this subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). - * @method $this subQuarter() Sub one quarter to the instance (using date interval). - * @method $this addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method $this subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method $this subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method $this addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method $this subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method $this addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). - * @method $this addWeek() Add one week to the instance (using date interval). - * @method $this subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). - * @method $this subWeek() Sub one week to the instance (using date interval). - * @method $this addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). - * @method $this addWeekday() Add one weekday to the instance (using date interval). - * @method $this subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). - * @method $this subWeekday() Sub one weekday to the instance (using date interval). - * @method $this addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMicro() Add one microsecond to the instance (using timestamp). - * @method $this subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMicro() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method $this addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMicrosecond() Add one microsecond to the instance (using timestamp). - * @method $this subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMicrosecond() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method $this addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMilli() Add one millisecond to the instance (using timestamp). - * @method $this subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMilli() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method $this addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMillisecond() Add one millisecond to the instance (using timestamp). - * @method $this subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMillisecond() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method $this addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). - * @method $this addRealSecond() Add one second to the instance (using timestamp). - * @method $this subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). - * @method $this subRealSecond() Sub one second to the instance (using timestamp). - * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. - * @method $this addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMinute() Add one minute to the instance (using timestamp). - * @method $this subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMinute() Sub one minute to the instance (using timestamp). - * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. - * @method $this addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). - * @method $this addRealHour() Add one hour to the instance (using timestamp). - * @method $this subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). - * @method $this subRealHour() Sub one hour to the instance (using timestamp). - * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. - * @method $this addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). - * @method $this addRealDay() Add one day to the instance (using timestamp). - * @method $this subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). - * @method $this subRealDay() Sub one day to the instance (using timestamp). - * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. - * @method $this addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). - * @method $this addRealWeek() Add one week to the instance (using timestamp). - * @method $this subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). - * @method $this subRealWeek() Sub one week to the instance (using timestamp). - * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. - * @method $this addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMonth() Add one month to the instance (using timestamp). - * @method $this subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMonth() Sub one month to the instance (using timestamp). - * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. - * @method $this addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). - * @method $this addRealQuarter() Add one quarter to the instance (using timestamp). - * @method $this subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). - * @method $this subRealQuarter() Sub one quarter to the instance (using timestamp). - * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. - * @method $this addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). - * @method $this addRealYear() Add one year to the instance (using timestamp). - * @method $this subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). - * @method $this subRealYear() Sub one year to the instance (using timestamp). - * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. - * @method $this addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). - * @method $this addRealDecade() Add one decade to the instance (using timestamp). - * @method $this subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). - * @method $this subRealDecade() Sub one decade to the instance (using timestamp). - * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. - * @method $this addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). - * @method $this addRealCentury() Add one century to the instance (using timestamp). - * @method $this subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). - * @method $this subRealCentury() Sub one century to the instance (using timestamp). - * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. - * @method $this addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). - * @method $this addRealMillennium() Add one millennium to the instance (using timestamp). - * @method $this subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). - * @method $this subRealMillennium() Sub one millennium to the instance (using timestamp). - * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. - * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. - * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. - * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. - * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. - * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. - * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. - * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. - * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. - * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. - * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. - * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. - * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. - * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. - * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. - * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. - * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. - * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. - * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. - * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. - * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. - * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. - * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. - * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. - * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. - * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. - * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. - * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. - * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. - * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. - * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. - * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. - * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. - * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. - * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. - * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. - * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. - * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. - * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. - * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. - * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. - * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new Carbon object according to the specified format. - * @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php - * - * - */ -class Carbon extends DateTime implements CarbonInterface -{ - use Date; - - /** - * Returns true if the current class/instance is mutable. - * - * @return bool - */ - public static function isMutable() - { - return true; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php b/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php deleted file mode 100644 index 1ce967b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/CarbonConverterInterface.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use DateTimeInterface; - -interface CarbonConverterInterface -{ - public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface; -} diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php b/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php deleted file mode 100644 index 4c9c1cf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/CarbonImmutable.php +++ /dev/null @@ -1,582 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Carbon\Traits\Date; -use Carbon\Traits\DeprecatedProperties; -use DateTimeImmutable; -use DateTimeInterface; -use DateTimeZone; - -/** - * A simple API extension for DateTimeImmutable. - * - * @mixin DeprecatedProperties - * - * - * - * @property int $year - * @property int $yearIso - * @property int $month - * @property int $day - * @property int $hour - * @property int $minute - * @property int $second - * @property int $micro - * @property int $microsecond - * @property int|float|string $timestamp seconds since the Unix Epoch - * @property string $englishDayOfWeek the day of week in English - * @property string $shortEnglishDayOfWeek the abbreviated day of week in English - * @property string $englishMonth the month in English - * @property string $shortEnglishMonth the abbreviated month in English - * @property int $milliseconds - * @property int $millisecond - * @property int $milli - * @property int $week 1 through 53 - * @property int $isoWeek 1 through 53 - * @property int $weekYear year according to week format - * @property int $isoWeekYear year according to ISO week format - * @property int $dayOfYear 1 through 366 - * @property int $age does a diffInYears() with default parameters - * @property int $offset the timezone offset in seconds from UTC - * @property int $offsetMinutes the timezone offset in minutes from UTC - * @property int $offsetHours the timezone offset in hours from UTC - * @property CarbonTimeZone $timezone the current timezone - * @property CarbonTimeZone $tz alias of $timezone - * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) - * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) - * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday - * @property-read int $daysInMonth number of days in the given month - * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) - * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) - * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name - * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName - * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read int $noZeroHour current hour from 1 to 24 - * @property-read int $weeksInYear 51 through 53 - * @property-read int $isoWeeksInYear 51 through 53 - * @property-read int $weekOfMonth 1 through 5 - * @property-read int $weekNumberInMonth 1 through 5 - * @property-read int $firstWeekDay 0 through 6 - * @property-read int $lastWeekDay 0 through 6 - * @property-read int $daysInYear 365 or 366 - * @property-read int $quarter the quarter of this instance, 1 - 4 - * @property-read int $decade the decade of this instance - * @property-read int $century the century of this instance - * @property-read int $millennium the millennium of this instance - * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise - * @property-read bool $local checks if the timezone is local, true if local, false otherwise - * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise - * @property-read string $timezoneName the current timezone name - * @property-read string $tzName alias of $timezoneName - * @property-read string $locale locale of the current instance - * - * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) - * @method bool isLocal() Check if the current instance has non-UTC timezone. - * @method bool isValid() Check if the current instance is a valid date. - * @method bool isDST() Check if the current instance is in a daylight saving time. - * @method bool isSunday() Checks if the instance day is sunday. - * @method bool isMonday() Checks if the instance day is monday. - * @method bool isTuesday() Checks if the instance day is tuesday. - * @method bool isWednesday() Checks if the instance day is wednesday. - * @method bool isThursday() Checks if the instance day is thursday. - * @method bool isFriday() Checks if the instance day is friday. - * @method bool isSaturday() Checks if the instance day is saturday. - * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. - * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. - * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. - * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. - * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. - * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. - * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. - * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. - * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. - * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. - * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. - * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. - * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. - * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. - * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. - * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. - * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. - * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. - * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. - * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. - * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. - * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. - * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. - * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. - * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. - * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. - * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. - * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. - * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. - * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. - * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. - * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. - * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. - * @method CarbonImmutable years(int $value) Set current instance year to the given value. - * @method CarbonImmutable year(int $value) Set current instance year to the given value. - * @method CarbonImmutable setYears(int $value) Set current instance year to the given value. - * @method CarbonImmutable setYear(int $value) Set current instance year to the given value. - * @method CarbonImmutable months(int $value) Set current instance month to the given value. - * @method CarbonImmutable month(int $value) Set current instance month to the given value. - * @method CarbonImmutable setMonths(int $value) Set current instance month to the given value. - * @method CarbonImmutable setMonth(int $value) Set current instance month to the given value. - * @method CarbonImmutable days(int $value) Set current instance day to the given value. - * @method CarbonImmutable day(int $value) Set current instance day to the given value. - * @method CarbonImmutable setDays(int $value) Set current instance day to the given value. - * @method CarbonImmutable setDay(int $value) Set current instance day to the given value. - * @method CarbonImmutable hours(int $value) Set current instance hour to the given value. - * @method CarbonImmutable hour(int $value) Set current instance hour to the given value. - * @method CarbonImmutable setHours(int $value) Set current instance hour to the given value. - * @method CarbonImmutable setHour(int $value) Set current instance hour to the given value. - * @method CarbonImmutable minutes(int $value) Set current instance minute to the given value. - * @method CarbonImmutable minute(int $value) Set current instance minute to the given value. - * @method CarbonImmutable setMinutes(int $value) Set current instance minute to the given value. - * @method CarbonImmutable setMinute(int $value) Set current instance minute to the given value. - * @method CarbonImmutable seconds(int $value) Set current instance second to the given value. - * @method CarbonImmutable second(int $value) Set current instance second to the given value. - * @method CarbonImmutable setSeconds(int $value) Set current instance second to the given value. - * @method CarbonImmutable setSecond(int $value) Set current instance second to the given value. - * @method CarbonImmutable millis(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable milli(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable setMillis(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable setMilli(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable milliseconds(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable millisecond(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable setMilliseconds(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable setMillisecond(int $value) Set current instance millisecond to the given value. - * @method CarbonImmutable micros(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable micro(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable setMicros(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable setMicro(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable microseconds(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable microsecond(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable setMicroseconds(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable setMicrosecond(int $value) Set current instance microsecond to the given value. - * @method CarbonImmutable addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addYear() Add one year to the instance (using date interval). - * @method CarbonImmutable subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subYear() Sub one year to the instance (using date interval). - * @method CarbonImmutable addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMonth() Add one month to the instance (using date interval). - * @method CarbonImmutable subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMonth() Sub one month to the instance (using date interval). - * @method CarbonImmutable addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addDay() Add one day to the instance (using date interval). - * @method CarbonImmutable subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subDay() Sub one day to the instance (using date interval). - * @method CarbonImmutable addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addHour() Add one hour to the instance (using date interval). - * @method CarbonImmutable subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subHour() Sub one hour to the instance (using date interval). - * @method CarbonImmutable addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMinute() Add one minute to the instance (using date interval). - * @method CarbonImmutable subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMinute() Sub one minute to the instance (using date interval). - * @method CarbonImmutable addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addSecond() Add one second to the instance (using date interval). - * @method CarbonImmutable subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subSecond() Sub one second to the instance (using date interval). - * @method CarbonImmutable addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMilli() Add one millisecond to the instance (using date interval). - * @method CarbonImmutable subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMilli() Sub one millisecond to the instance (using date interval). - * @method CarbonImmutable addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMillisecond() Add one millisecond to the instance (using date interval). - * @method CarbonImmutable subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMillisecond() Sub one millisecond to the instance (using date interval). - * @method CarbonImmutable addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMicro() Add one microsecond to the instance (using date interval). - * @method CarbonImmutable subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMicro() Sub one microsecond to the instance (using date interval). - * @method CarbonImmutable addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMicrosecond() Add one microsecond to the instance (using date interval). - * @method CarbonImmutable subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMicrosecond() Sub one microsecond to the instance (using date interval). - * @method CarbonImmutable addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addMillennium() Add one millennium to the instance (using date interval). - * @method CarbonImmutable subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subMillennium() Sub one millennium to the instance (using date interval). - * @method CarbonImmutable addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addCentury() Add one century to the instance (using date interval). - * @method CarbonImmutable subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subCentury() Sub one century to the instance (using date interval). - * @method CarbonImmutable addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addDecade() Add one decade to the instance (using date interval). - * @method CarbonImmutable subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subDecade() Sub one decade to the instance (using date interval). - * @method CarbonImmutable addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addQuarter() Add one quarter to the instance (using date interval). - * @method CarbonImmutable subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subQuarter() Sub one quarter to the instance (using date interval). - * @method CarbonImmutable addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonImmutable addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonImmutable addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addWeek() Add one week to the instance (using date interval). - * @method CarbonImmutable subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subWeek() Sub one week to the instance (using date interval). - * @method CarbonImmutable addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable addWeekday() Add one weekday to the instance (using date interval). - * @method CarbonImmutable subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). - * @method CarbonImmutable subWeekday() Sub one weekday to the instance (using date interval). - * @method CarbonImmutable addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMicro() Add one microsecond to the instance (using timestamp). - * @method CarbonImmutable subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMicro() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method CarbonImmutable addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMicrosecond() Add one microsecond to the instance (using timestamp). - * @method CarbonImmutable subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMicrosecond() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method CarbonImmutable addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMilli() Add one millisecond to the instance (using timestamp). - * @method CarbonImmutable subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMilli() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method CarbonImmutable addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMillisecond() Add one millisecond to the instance (using timestamp). - * @method CarbonImmutable subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMillisecond() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method CarbonImmutable addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealSecond() Add one second to the instance (using timestamp). - * @method CarbonImmutable subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealSecond() Sub one second to the instance (using timestamp). - * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. - * @method CarbonImmutable addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMinute() Add one minute to the instance (using timestamp). - * @method CarbonImmutable subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMinute() Sub one minute to the instance (using timestamp). - * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. - * @method CarbonImmutable addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealHour() Add one hour to the instance (using timestamp). - * @method CarbonImmutable subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealHour() Sub one hour to the instance (using timestamp). - * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. - * @method CarbonImmutable addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealDay() Add one day to the instance (using timestamp). - * @method CarbonImmutable subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealDay() Sub one day to the instance (using timestamp). - * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. - * @method CarbonImmutable addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealWeek() Add one week to the instance (using timestamp). - * @method CarbonImmutable subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealWeek() Sub one week to the instance (using timestamp). - * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. - * @method CarbonImmutable addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMonth() Add one month to the instance (using timestamp). - * @method CarbonImmutable subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMonth() Sub one month to the instance (using timestamp). - * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. - * @method CarbonImmutable addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealQuarter() Add one quarter to the instance (using timestamp). - * @method CarbonImmutable subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealQuarter() Sub one quarter to the instance (using timestamp). - * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. - * @method CarbonImmutable addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealYear() Add one year to the instance (using timestamp). - * @method CarbonImmutable subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealYear() Sub one year to the instance (using timestamp). - * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. - * @method CarbonImmutable addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealDecade() Add one decade to the instance (using timestamp). - * @method CarbonImmutable subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealDecade() Sub one decade to the instance (using timestamp). - * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. - * @method CarbonImmutable addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealCentury() Add one century to the instance (using timestamp). - * @method CarbonImmutable subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealCentury() Sub one century to the instance (using timestamp). - * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. - * @method CarbonImmutable addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable addRealMillennium() Add one millennium to the instance (using timestamp). - * @method CarbonImmutable subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). - * @method CarbonImmutable subRealMillennium() Sub one millennium to the instance (using timestamp). - * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. - * @method CarbonImmutable roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method CarbonImmutable roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method CarbonImmutable floorYear(float $precision = 1) Truncate the current instance year with given precision. - * @method CarbonImmutable floorYears(float $precision = 1) Truncate the current instance year with given precision. - * @method CarbonImmutable ceilYear(float $precision = 1) Ceil the current instance year with given precision. - * @method CarbonImmutable ceilYears(float $precision = 1) Ceil the current instance year with given precision. - * @method CarbonImmutable roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method CarbonImmutable roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method CarbonImmutable floorMonth(float $precision = 1) Truncate the current instance month with given precision. - * @method CarbonImmutable floorMonths(float $precision = 1) Truncate the current instance month with given precision. - * @method CarbonImmutable ceilMonth(float $precision = 1) Ceil the current instance month with given precision. - * @method CarbonImmutable ceilMonths(float $precision = 1) Ceil the current instance month with given precision. - * @method CarbonImmutable roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method CarbonImmutable roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method CarbonImmutable floorDay(float $precision = 1) Truncate the current instance day with given precision. - * @method CarbonImmutable floorDays(float $precision = 1) Truncate the current instance day with given precision. - * @method CarbonImmutable ceilDay(float $precision = 1) Ceil the current instance day with given precision. - * @method CarbonImmutable ceilDays(float $precision = 1) Ceil the current instance day with given precision. - * @method CarbonImmutable roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method CarbonImmutable roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method CarbonImmutable floorHour(float $precision = 1) Truncate the current instance hour with given precision. - * @method CarbonImmutable floorHours(float $precision = 1) Truncate the current instance hour with given precision. - * @method CarbonImmutable ceilHour(float $precision = 1) Ceil the current instance hour with given precision. - * @method CarbonImmutable ceilHours(float $precision = 1) Ceil the current instance hour with given precision. - * @method CarbonImmutable roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method CarbonImmutable roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method CarbonImmutable floorMinute(float $precision = 1) Truncate the current instance minute with given precision. - * @method CarbonImmutable floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. - * @method CarbonImmutable ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. - * @method CarbonImmutable ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. - * @method CarbonImmutable roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method CarbonImmutable roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method CarbonImmutable floorSecond(float $precision = 1) Truncate the current instance second with given precision. - * @method CarbonImmutable floorSeconds(float $precision = 1) Truncate the current instance second with given precision. - * @method CarbonImmutable ceilSecond(float $precision = 1) Ceil the current instance second with given precision. - * @method CarbonImmutable ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. - * @method CarbonImmutable roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method CarbonImmutable roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method CarbonImmutable floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. - * @method CarbonImmutable floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. - * @method CarbonImmutable ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. - * @method CarbonImmutable ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. - * @method CarbonImmutable roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method CarbonImmutable roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method CarbonImmutable floorCentury(float $precision = 1) Truncate the current instance century with given precision. - * @method CarbonImmutable floorCenturies(float $precision = 1) Truncate the current instance century with given precision. - * @method CarbonImmutable ceilCentury(float $precision = 1) Ceil the current instance century with given precision. - * @method CarbonImmutable ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. - * @method CarbonImmutable roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method CarbonImmutable roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method CarbonImmutable floorDecade(float $precision = 1) Truncate the current instance decade with given precision. - * @method CarbonImmutable floorDecades(float $precision = 1) Truncate the current instance decade with given precision. - * @method CarbonImmutable ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. - * @method CarbonImmutable ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. - * @method CarbonImmutable roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method CarbonImmutable roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method CarbonImmutable floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. - * @method CarbonImmutable floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. - * @method CarbonImmutable ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. - * @method CarbonImmutable ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. - * @method CarbonImmutable roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method CarbonImmutable roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method CarbonImmutable floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method CarbonImmutable floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method CarbonImmutable ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method CarbonImmutable ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method CarbonImmutable roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method CarbonImmutable roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method CarbonImmutable floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method CarbonImmutable floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method CarbonImmutable ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method CarbonImmutable ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method static static|false createFromFormat(string $format, string $time, DateTimeZone|string|false|null $timezone = null) Parse a string into a new CarbonImmutable object according to the specified format. - * @method static static __set_state(array $array) https://php.net/manual/en/datetime.set-state.php - * - * - */ -class CarbonImmutable extends DateTimeImmutable implements CarbonInterface -{ - use Date { - __clone as dateTraitClone; - } - - public function __clone() - { - $this->dateTraitClone(); - $this->endOfTime = false; - $this->startOfTime = false; - } - - /** - * Create a very old date representing start of time. - * - * @return static - */ - public static function startOfTime(): self - { - $date = static::parse('0001-01-01')->years(self::getStartOfTimeYear()); - $date->startOfTime = true; - - return $date; - } - - /** - * Create a very far date representing end of time. - * - * @return static - */ - public static function endOfTime(): self - { - $date = static::parse('9999-12-31 23:59:59.999999')->years(self::getEndOfTimeYear()); - $date->endOfTime = true; - - return $date; - } - - /** - * @codeCoverageIgnore - */ - private static function getEndOfTimeYear(): int - { - if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { - return 145261681241552; - } - - // Remove if https://bugs.php.net/bug.php?id=81107 is fixed - if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) { - return 1118290769066902787; - } - - return PHP_INT_MAX; - } - - /** - * @codeCoverageIgnore - */ - private static function getStartOfTimeYear(): int - { - if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { - return -135908816449551; - } - - // Remove if https://bugs.php.net/bug.php?id=81107 is fixed - if (version_compare(PHP_VERSION, '8.1.0-dev', '>=')) { - return -1118290769066898816; - } - - return max(PHP_INT_MIN, -9223372036854773760); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php b/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php deleted file mode 100644 index b90e298..0000000 --- a/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php +++ /dev/null @@ -1,5142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use BadMethodCallException; -use Carbon\Exceptions\BadComparisonUnitException; -use Carbon\Exceptions\ImmutableException; -use Carbon\Exceptions\InvalidDateException; -use Carbon\Exceptions\InvalidFormatException; -use Carbon\Exceptions\UnknownGetterException; -use Carbon\Exceptions\UnknownMethodException; -use Carbon\Exceptions\UnknownSetterException; -use Closure; -use DateInterval; -use DateTime; -use DateTimeImmutable; -use DateTimeInterface; -use DateTimeZone; -use JsonSerializable; -use ReflectionException; -use ReturnTypeWillChange; -use Symfony\Component\Translation\TranslatorInterface; -use Throwable; - -/** - * Common interface for Carbon and CarbonImmutable. - * - * - * - * @property int $year - * @property int $yearIso - * @property int $month - * @property int $day - * @property int $hour - * @property int $minute - * @property int $second - * @property int $micro - * @property int $microsecond - * @property int|float|string $timestamp seconds since the Unix Epoch - * @property string $englishDayOfWeek the day of week in English - * @property string $shortEnglishDayOfWeek the abbreviated day of week in English - * @property string $englishMonth the month in English - * @property string $shortEnglishMonth the abbreviated month in English - * @property int $milliseconds - * @property int $millisecond - * @property int $milli - * @property int $week 1 through 53 - * @property int $isoWeek 1 through 53 - * @property int $weekYear year according to week format - * @property int $isoWeekYear year according to ISO week format - * @property int $dayOfYear 1 through 366 - * @property int $age does a diffInYears() with default parameters - * @property int $offset the timezone offset in seconds from UTC - * @property int $offsetMinutes the timezone offset in minutes from UTC - * @property int $offsetHours the timezone offset in hours from UTC - * @property CarbonTimeZone $timezone the current timezone - * @property CarbonTimeZone $tz alias of $timezone - * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) - * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) - * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday - * @property-read int $daysInMonth number of days in the given month - * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) - * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) - * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name - * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName - * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read int $noZeroHour current hour from 1 to 24 - * @property-read int $weeksInYear 51 through 53 - * @property-read int $isoWeeksInYear 51 through 53 - * @property-read int $weekOfMonth 1 through 5 - * @property-read int $weekNumberInMonth 1 through 5 - * @property-read int $firstWeekDay 0 through 6 - * @property-read int $lastWeekDay 0 through 6 - * @property-read int $daysInYear 365 or 366 - * @property-read int $quarter the quarter of this instance, 1 - 4 - * @property-read int $decade the decade of this instance - * @property-read int $century the century of this instance - * @property-read int $millennium the millennium of this instance - * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise - * @property-read bool $local checks if the timezone is local, true if local, false otherwise - * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise - * @property-read string $timezoneName the current timezone name - * @property-read string $tzName alias of $timezoneName - * @property-read string $locale locale of the current instance - * - * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) - * @method bool isLocal() Check if the current instance has non-UTC timezone. - * @method bool isValid() Check if the current instance is a valid date. - * @method bool isDST() Check if the current instance is in a daylight saving time. - * @method bool isSunday() Checks if the instance day is sunday. - * @method bool isMonday() Checks if the instance day is monday. - * @method bool isTuesday() Checks if the instance day is tuesday. - * @method bool isWednesday() Checks if the instance day is wednesday. - * @method bool isThursday() Checks if the instance day is thursday. - * @method bool isFriday() Checks if the instance day is friday. - * @method bool isSaturday() Checks if the instance day is saturday. - * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. - * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. - * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. - * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. - * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. - * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. - * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. - * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. - * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. - * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. - * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. - * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. - * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. - * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. - * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. - * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. - * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. - * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. - * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. - * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. - * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. - * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. - * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. - * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. - * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. - * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. - * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. - * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. - * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. - * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. - * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. - * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. - * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. - * @method CarbonInterface years(int $value) Set current instance year to the given value. - * @method CarbonInterface year(int $value) Set current instance year to the given value. - * @method CarbonInterface setYears(int $value) Set current instance year to the given value. - * @method CarbonInterface setYear(int $value) Set current instance year to the given value. - * @method CarbonInterface months(int $value) Set current instance month to the given value. - * @method CarbonInterface month(int $value) Set current instance month to the given value. - * @method CarbonInterface setMonths(int $value) Set current instance month to the given value. - * @method CarbonInterface setMonth(int $value) Set current instance month to the given value. - * @method CarbonInterface days(int $value) Set current instance day to the given value. - * @method CarbonInterface day(int $value) Set current instance day to the given value. - * @method CarbonInterface setDays(int $value) Set current instance day to the given value. - * @method CarbonInterface setDay(int $value) Set current instance day to the given value. - * @method CarbonInterface hours(int $value) Set current instance hour to the given value. - * @method CarbonInterface hour(int $value) Set current instance hour to the given value. - * @method CarbonInterface setHours(int $value) Set current instance hour to the given value. - * @method CarbonInterface setHour(int $value) Set current instance hour to the given value. - * @method CarbonInterface minutes(int $value) Set current instance minute to the given value. - * @method CarbonInterface minute(int $value) Set current instance minute to the given value. - * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value. - * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value. - * @method CarbonInterface seconds(int $value) Set current instance second to the given value. - * @method CarbonInterface second(int $value) Set current instance second to the given value. - * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value. - * @method CarbonInterface setSecond(int $value) Set current instance second to the given value. - * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addYear() Add one year to the instance (using date interval). - * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subYear() Sub one year to the instance (using date interval). - * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMonth() Add one month to the instance (using date interval). - * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMonth() Sub one month to the instance (using date interval). - * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addDay() Add one day to the instance (using date interval). - * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subDay() Sub one day to the instance (using date interval). - * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addHour() Add one hour to the instance (using date interval). - * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subHour() Sub one hour to the instance (using date interval). - * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMinute() Add one minute to the instance (using date interval). - * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval). - * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addSecond() Add one second to the instance (using date interval). - * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subSecond() Sub one second to the instance (using date interval). - * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval). - * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval). - * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval). - * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval). - * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval). - * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval). - * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval). - * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval). - * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval). - * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval). - * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addCentury() Add one century to the instance (using date interval). - * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). - * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). - * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). - * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). - * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). - * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addWeek() Add one week to the instance (using date interval). - * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). - * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). - * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). - * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp). - * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp). - * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp). - * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp). - * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp). - * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp). - * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. - * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp). - * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp). - * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. - * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp). - * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp). - * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. - * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp). - * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp). - * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. - * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp). - * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp). - * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. - * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp). - * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp). - * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. - * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp). - * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp). - * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. - * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp). - * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp). - * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. - * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp). - * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp). - * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. - * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp). - * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp). - * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. - * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp). - * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp). - * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. - * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. - * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. - * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. - * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. - * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. - * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. - * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. - * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. - * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. - * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. - * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. - * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. - * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. - * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. - * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. - * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. - * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. - * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. - * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. - * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. - * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. - * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. - * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. - * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. - * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. - * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. - * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. - * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. - * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. - * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. - * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. - * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. - * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. - * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. - * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. - * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. - * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. - * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. - * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. - * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. - * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * - * - */ -interface CarbonInterface extends DateTimeInterface, JsonSerializable -{ - /** - * Diff wording options(expressed in octal). - */ - public const NO_ZERO_DIFF = 01; - public const JUST_NOW = 02; - public const ONE_DAY_WORDS = 04; - public const TWO_DAY_WORDS = 010; - public const SEQUENTIAL_PARTS_ONLY = 020; - public const ROUND = 040; - public const FLOOR = 0100; - public const CEIL = 0200; - - /** - * Diff syntax options. - */ - public const DIFF_ABSOLUTE = 1; // backward compatibility with true - public const DIFF_RELATIVE_AUTO = 0; // backward compatibility with false - public const DIFF_RELATIVE_TO_NOW = 2; - public const DIFF_RELATIVE_TO_OTHER = 3; - - /** - * Translate string options. - */ - public const TRANSLATE_MONTHS = 1; - public const TRANSLATE_DAYS = 2; - public const TRANSLATE_UNITS = 4; - public const TRANSLATE_MERIDIEM = 8; - public const TRANSLATE_DIFF = 0x10; - public const TRANSLATE_ALL = self::TRANSLATE_MONTHS | self::TRANSLATE_DAYS | self::TRANSLATE_UNITS | self::TRANSLATE_MERIDIEM | self::TRANSLATE_DIFF; - - /** - * The day constants. - */ - public const SUNDAY = 0; - public const MONDAY = 1; - public const TUESDAY = 2; - public const WEDNESDAY = 3; - public const THURSDAY = 4; - public const FRIDAY = 5; - public const SATURDAY = 6; - - /** - * The month constants. - * These aren't used by Carbon itself but exist for - * convenience sake alone. - */ - public const JANUARY = 1; - public const FEBRUARY = 2; - public const MARCH = 3; - public const APRIL = 4; - public const MAY = 5; - public const JUNE = 6; - public const JULY = 7; - public const AUGUST = 8; - public const SEPTEMBER = 9; - public const OCTOBER = 10; - public const NOVEMBER = 11; - public const DECEMBER = 12; - - /** - * Number of X in Y. - */ - public const YEARS_PER_MILLENNIUM = 1000; - public const YEARS_PER_CENTURY = 100; - public const YEARS_PER_DECADE = 10; - public const MONTHS_PER_YEAR = 12; - public const MONTHS_PER_QUARTER = 3; - public const QUARTERS_PER_YEAR = 4; - public const WEEKS_PER_YEAR = 52; - public const WEEKS_PER_MONTH = 4; - public const DAYS_PER_YEAR = 365; - public const DAYS_PER_WEEK = 7; - public const HOURS_PER_DAY = 24; - public const MINUTES_PER_HOUR = 60; - public const SECONDS_PER_MINUTE = 60; - public const MILLISECONDS_PER_SECOND = 1000; - public const MICROSECONDS_PER_MILLISECOND = 1000; - public const MICROSECONDS_PER_SECOND = 1000000; - - /** - * Special settings to get the start of week from current locale culture. - */ - public const WEEK_DAY_AUTO = 'auto'; - - /** - * RFC7231 DateTime format. - * - * @var string - */ - public const RFC7231_FORMAT = 'D, d M Y H:i:s \G\M\T'; - - /** - * Default format to use for __toString method when type juggling occurs. - * - * @var string - */ - public const DEFAULT_TO_STRING_FORMAT = 'Y-m-d H:i:s'; - - /** - * Format for converting mocked time, includes microseconds. - * - * @var string - */ - public const MOCK_DATETIME_FORMAT = 'Y-m-d H:i:s.u'; - - /** - * Pattern detection for ->isoFormat and ::createFromIsoFormat. - * - * @var string - */ - public const ISO_FORMAT_REGEXP = '(O[YMDHhms]|[Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY?|g{1,5}|G{1,5}|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?)'; - - // - - /** - * Dynamically handle calls to the class. - * - * @param string $method magic method name called - * @param array $parameters parameters list - * - * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable - * - * @return mixed - */ - public function __call($method, $parameters); - - /** - * Dynamically handle calls to the class. - * - * @param string $method magic method name called - * @param array $parameters parameters list - * - * @throws BadMethodCallException - * - * @return mixed - */ - public static function __callStatic($method, $parameters); - - /** - * Update constructedObjectId on cloned. - */ - public function __clone(); - - /** - * Create a new Carbon instance. - * - * Please see the testing aids section (specifically static::setTestNow()) - * for more on the possibility of this constructor returning a test instance. - * - * @param DateTimeInterface|string|null $time - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - */ - public function __construct($time = null, $tz = null); - - /** - * Show truthy properties on var_dump(). - * - * @return array - */ - public function __debugInfo(); - - /** - * Get a part of the Carbon object - * - * @param string $name - * - * @throws UnknownGetterException - * - * @return string|int|bool|DateTimeZone|null - */ - public function __get($name); - - /** - * Check if an attribute exists on the object - * - * @param string $name - * - * @return bool - */ - public function __isset($name); - - /** - * Set a part of the Carbon object - * - * @param string $name - * @param string|int|DateTimeZone $value - * - * @throws UnknownSetterException|ReflectionException - * - * @return void - */ - public function __set($name, $value); - - /** - * The __set_state handler. - * - * @param string|array $dump - * - * @return static - */ - #[ReturnTypeWillChange] - public static function __set_state($dump); - - /** - * Returns the list of properties to dump on serialize() called on. - * - * Only used by PHP < 7.4. - * - * @return array - */ - public function __sleep(); - - /** - * Format the instance as a string using the set format - * - * @example - * ``` - * echo Carbon::now(); // Carbon instances can be cast to string - * ``` - * - * @return string - */ - public function __toString(); - - /** - * Add given units or interval to the current instance. - * - * @example $date->add('hour', 3) - * @example $date->add(15, 'days') - * @example $date->add(CarbonInterval::days(4)) - * - * @param string|DateInterval|Closure|CarbonConverterInterface $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - #[ReturnTypeWillChange] - public function add($unit, $value = 1, $overflow = null); - - /** - * Add seconds to the instance using timestamp. Positive $value travels - * forward while negative $value travels into the past. - * - * @param string $unit - * @param int $value - * - * @return static - */ - public function addRealUnit($unit, $value = 1); - - /** - * Add given units to the current instance. - * - * @param string $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - public function addUnit($unit, $value = 1, $overflow = null); - - /** - * Add any unit to a new value without overflowing current other unit given. - * - * @param string $valueUnit unit name to modify - * @param int $value amount to add to the input unit - * @param string $overflowUnit unit name to not overflow - * - * @return static - */ - public function addUnitNoOverflow($valueUnit, $value, $overflowUnit); - - /** - * Get the difference in a human readable format in the current locale from an other - * instance given to now - * - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single part) - * @param int $options human diff options - * - * @return string - */ - public function ago($syntax = null, $short = false, $parts = 1, $options = null); - - /** - * Modify the current instance to the average of a given instance (default now) and the current instance - * (second-precision). - * - * @param \Carbon\Carbon|\DateTimeInterface|null $date - * - * @return static - */ - public function average($date = null); - - /** - * Clone the current instance if it's mutable. - * - * This method is convenient to ensure you don't mutate the initial object - * but avoid to make a useless copy of it if it's already immutable. - * - * @return static - */ - public function avoidMutation(); - - /** - * Determines if the instance is between two others. - * - * The third argument allow you to specify if bounds are included or not (true by default) - * but for when you including/excluding bounds may produce different results in your application, - * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. - * - * @example - * ``` - * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false - * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * @param bool $equal Indicates if an equal to comparison should be done - * - * @return bool - */ - public function between($date1, $date2, $equal = true): bool; - - /** - * Determines if the instance is between two others, bounds excluded. - * - * @example - * ``` - * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false - * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * - * @return bool - */ - public function betweenExcluded($date1, $date2): bool; - - /** - * Determines if the instance is between two others, bounds included. - * - * @example - * ``` - * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false - * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * - * @return bool - */ - public function betweenIncluded($date1, $date2): bool; - - /** - * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, - * or a calendar date (e.g. "10/29/2017") otherwise. - * - * Language, date and time formats will change according to the current locale. - * - * @param Carbon|\DateTimeInterface|string|null $referenceTime - * @param array $formats - * - * @return string - */ - public function calendar($referenceTime = null, array $formats = []); - - /** - * Checks if the (date)time string is in a given format and valid to create a - * new instance. - * - * @example - * ``` - * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true - * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false - * ``` - * - * @param string $date - * @param string $format - * - * @return bool - */ - public static function canBeCreatedFromFormat($date, $format); - - /** - * Return the Carbon instance passed through, a now instance in the same timezone - * if null given or parse the input if string given. - * - * @param Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date - * - * @return static - */ - public function carbonize($date = null); - - /** - * Cast the current instance into the given class. - * - * @param string $className The $className::instance() method will be called to cast the current object. - * - * @return DateTimeInterface - */ - public function cast(string $className); - - /** - * Ceil the current instance second with given precision if specified. - * - * @param float|int|string|\DateInterval|null $precision - * - * @return CarbonInterface - */ - public function ceil($precision = 1); - - /** - * Ceil the current instance at the given unit with given precision if specified. - * - * @param string $unit - * @param float|int $precision - * - * @return CarbonInterface - */ - public function ceilUnit($unit, $precision = 1); - - /** - * Ceil the current instance week. - * - * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week - * - * @return CarbonInterface - */ - public function ceilWeek($weekStartsAt = null); - - /** - * Similar to native modify() method of DateTime but can handle more grammars. - * - * @example - * ``` - * echo Carbon::now()->change('next 2pm'); - * ``` - * - * @link https://php.net/manual/en/datetime.modify.php - * - * @param string $modifier - * - * @return static|false - */ - public function change($modifier); - - /** - * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. - * foreach ($date as $_) {} - * serializer($date) - * var_export($date) - * get_object_vars($date) - */ - public function cleanupDumpProperties(); - - /** - * @alias copy - * - * Get a copy of the instance. - * - * @return static - */ - public function clone(); - - /** - * Get the closest date from the instance (second-precision). - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * - * @return static - */ - public function closest($date1, $date2); - - /** - * Get a copy of the instance. - * - * @return static - */ - public function copy(); - - /** - * Create a new Carbon instance from a specific date and time. - * - * If any of $year, $month or $day are set to null their now() values will - * be used. - * - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * - * If $hour is not null then the default values for $minute and $second - * will be 0. - * - * @param DateTimeInterface|int|null $year - * @param int|null $month - * @param int|null $day - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null); - - /** - * Create a Carbon instance from just a date. The time portion is set to now. - * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createFromDate($year = null, $month = null, $day = null, $tz = null); - - /** - * Create a Carbon instance from a specific format. - * - * @param string $format Datetime format - * @param string $time - * @param DateTimeZone|string|false|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - #[ReturnTypeWillChange] - public static function createFromFormat($format, $time, $tz = null); - - /** - * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). - * - * @param string $format Datetime format - * @param string $time - * @param DateTimeZone|string|false|null $tz optional timezone - * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) - * @param \Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null); - - /** - * Create a Carbon instance from a specific format and a string in a given language. - * - * @param string $format Datetime format - * @param string $locale - * @param string $time - * @param DateTimeZone|string|false|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function createFromLocaleFormat($format, $locale, $time, $tz = null); - - /** - * Create a Carbon instance from a specific ISO format and a string in a given language. - * - * @param string $format Datetime ISO format - * @param string $locale - * @param string $time - * @param DateTimeZone|string|false|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null); - - /** - * Create a Carbon instance from just a time. The date portion is set to today. - * - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null); - - /** - * Create a Carbon instance from a time string. The date portion is set to today. - * - * @param string $time - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createFromTimeString($time, $tz = null); - - /** - * Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $timestamp - * @param \DateTimeZone|string|null $tz - * - * @return static - */ - public static function createFromTimestamp($timestamp, $tz = null); - - /** - * Create a Carbon instance from a timestamp in milliseconds. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $timestamp - * @param \DateTimeZone|string|null $tz - * - * @return static - */ - public static function createFromTimestampMs($timestamp, $tz = null); - - /** - * Create a Carbon instance from a timestamp in milliseconds. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $timestamp - * - * @return static - */ - public static function createFromTimestampMsUTC($timestamp); - - /** - * Create a Carbon instance from an timestamp keeping the timezone to UTC. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $timestamp - * - * @return static - */ - public static function createFromTimestampUTC($timestamp); - - /** - * Create a Carbon instance from just a date. The time portion is set to midnight. - * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null); - - /** - * Create a new safe Carbon instance from a specific date and time. - * - * If any of $year, $month or $day are set to null their now() values will - * be used. - * - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * - * If $hour is not null then the default values for $minute and $second - * will be 0. - * - * If one of the set values is not valid, an InvalidDateException - * will be thrown. - * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz - * - * @throws InvalidDateException - * - * @return static|false - */ - public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null); - - /** - * Create a new Carbon instance from a specific date and time using strict validation. - * - * @see create() - * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null); - - /** - * Get/set the day of year. - * - * @param int|null $value new value for day of year if using as setter. - * - * @return static|int - */ - public function dayOfYear($value = null); - - /** - * Get the difference as a CarbonInterval instance. - * Return relative interval (negative if $absolute flag is not set to true and the given date is before - * current one). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return CarbonInterval - */ - public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []); - - /** - * Get the difference by the given interval using a filter closure. - * - * @param CarbonInterval $ci An interval to traverse by - * @param Closure $callback - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true); - - /** - * Get the difference in a human readable format in the current locale from current instance to an other - * instance given (or now if null given). - * - * @example - * ``` - * echo Carbon::tomorrow()->diffForHumans() . "\n"; - * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; - * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; - * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; - * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; - * ``` - * - * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; - * if null passed, now will be used as comparison reference; - * if any other type, it will be converted to date and used as reference. - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'skip' entry, list of units to skip (array of strings or a single string, - * ` it can be the unit name (singular or plural) or its shortcut - * ` (y, m, w, d, h, min, s, ms, µs). - * - 'aUnit' entry, prefer "an hour" over "1 hour" if true - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'other' entry (see above) - * - 'minimumUnit' entry determines the smallest unit of time to display can be long or - * ` short form of the units, e.g. 'hour' or 'h' (default value: s) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null); - - /** - * Get the difference in days rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInDays($date = null, $absolute = true); - - /** - * Get the difference in days using a filter closure rounded down. - * - * @param Closure $callback - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true); - - /** - * Get the difference in hours rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInHours($date = null, $absolute = true); - - /** - * Get the difference in hours using a filter closure rounded down. - * - * @param Closure $callback - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true); - - /** - * Get the difference in microseconds. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInMicroseconds($date = null, $absolute = true); - - /** - * Get the difference in milliseconds rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInMilliseconds($date = null, $absolute = true); - - /** - * Get the difference in minutes rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInMinutes($date = null, $absolute = true); - - /** - * Get the difference in months rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInMonths($date = null, $absolute = true); - - /** - * Get the difference in quarters rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInQuarters($date = null, $absolute = true); - - /** - * Get the difference in hours rounded down using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealHours($date = null, $absolute = true); - - /** - * Get the difference in microseconds using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealMicroseconds($date = null, $absolute = true); - - /** - * Get the difference in milliseconds rounded down using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealMilliseconds($date = null, $absolute = true); - - /** - * Get the difference in minutes rounded down using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealMinutes($date = null, $absolute = true); - - /** - * Get the difference in seconds using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealSeconds($date = null, $absolute = true); - - /** - * Get the difference in seconds rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInSeconds($date = null, $absolute = true); - - /** - * Get the difference in weekdays rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInWeekdays($date = null, $absolute = true); - - /** - * Get the difference in weekend days using a filter rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInWeekendDays($date = null, $absolute = true); - - /** - * Get the difference in weeks rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInWeeks($date = null, $absolute = true); - - /** - * Get the difference in years - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInYears($date = null, $absolute = true); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @see settings - * - * @param int $humanDiffOption - */ - public static function disableHumanDiffOption($humanDiffOption); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @see settings - * - * @param int $humanDiffOption - */ - public static function enableHumanDiffOption($humanDiffOption); - - /** - * Modify to end of current given unit. - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16.334455') - * ->startOf('month') - * ->endOf('week', Carbon::FRIDAY); - * ``` - * - * @param string $unit - * @param array $params - * - * @return static - */ - public function endOf($unit, ...$params); - - /** - * Resets the date to end of the century and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfCentury(); - * ``` - * - * @return static - */ - public function endOfCentury(); - - /** - * Resets the time to 23:59:59.999999 end of day - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfDay(); - * ``` - * - * @return static - */ - public function endOfDay(); - - /** - * Resets the date to end of the decade and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfDecade(); - * ``` - * - * @return static - */ - public function endOfDecade(); - - /** - * Modify to end of current hour, minutes and seconds become 59 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfHour(); - * ``` - * - * @return static - */ - public function endOfHour(); - - /** - * Resets the date to end of the millennium and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfMillennium(); - * ``` - * - * @return static - */ - public function endOfMillennium(); - - /** - * Modify to end of current minute, seconds become 59 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfMinute(); - * ``` - * - * @return static - */ - public function endOfMinute(); - - /** - * Resets the date to end of the month and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfMonth(); - * ``` - * - * @return static - */ - public function endOfMonth(); - - /** - * Resets the date to end of the quarter and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfQuarter(); - * ``` - * - * @return static - */ - public function endOfQuarter(); - - /** - * Modify to end of current second, microseconds become 999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16.334455') - * ->endOfSecond() - * ->format('H:i:s.u'); - * ``` - * - * @return static - */ - public function endOfSecond(); - - /** - * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek() . "\n"; - * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->endOfWeek() . "\n"; - * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek(Carbon::SATURDAY) . "\n"; - * ``` - * - * @param int $weekEndsAt optional start allow you to specify the day of week to use to end the week - * - * @return static - */ - public function endOfWeek($weekEndsAt = null); - - /** - * Resets the date to end of the year and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfYear(); - * ``` - * - * @return static - */ - public function endOfYear(); - - /** - * Determines if the instance is equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true - * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see equalTo() - * - * @return bool - */ - public function eq($date): bool; - - /** - * Determines if the instance is equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true - * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function equalTo($date): bool; - - /** - * Set the current locale to the given, execute the passed function, reset the locale to previous one, - * then return the result of the closure (or null if the closure was void). - * - * @param string $locale locale ex. en - * @param callable $func - * - * @return mixed - */ - public static function executeWithLocale($locale, $func); - - /** - * Get the farthest date from the instance (second-precision). - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * - * @return static - */ - public function farthest($date1, $date2); - - /** - * Modify to the first occurrence of a given day of the week - * in the current month. If no dayOfWeek is provided, modify to the - * first day of the current month. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek - * - * @return static - */ - public function firstOfMonth($dayOfWeek = null); - - /** - * Modify to the first occurrence of a given day of the week - * in the current quarter. If no dayOfWeek is provided, modify to the - * first day of the current quarter. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek day of the week default null - * - * @return static - */ - public function firstOfQuarter($dayOfWeek = null); - - /** - * Modify to the first occurrence of a given day of the week - * in the current year. If no dayOfWeek is provided, modify to the - * first day of the current year. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek day of the week default null - * - * @return static - */ - public function firstOfYear($dayOfWeek = null); - - /** - * Get the difference in days as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInDays($date = null, $absolute = true); - - /** - * Get the difference in hours as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInHours($date = null, $absolute = true); - - /** - * Get the difference in minutes as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInMinutes($date = null, $absolute = true); - - /** - * Get the difference in months as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInMonths($date = null, $absolute = true); - - /** - * Get the difference in days as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealDays($date = null, $absolute = true); - - /** - * Get the difference in hours as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealHours($date = null, $absolute = true); - - /** - * Get the difference in minutes as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealMinutes($date = null, $absolute = true); - - /** - * Get the difference in months as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealMonths($date = null, $absolute = true); - - /** - * Get the difference in seconds as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealSeconds($date = null, $absolute = true); - - /** - * Get the difference in weeks as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealWeeks($date = null, $absolute = true); - - /** - * Get the difference in year as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealYears($date = null, $absolute = true); - - /** - * Get the difference in seconds as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInSeconds($date = null, $absolute = true); - - /** - * Get the difference in weeks as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInWeeks($date = null, $absolute = true); - - /** - * Get the difference in year as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInYears($date = null, $absolute = true); - - /** - * Round the current instance second with given precision if specified. - * - * @param float|int|string|\DateInterval|null $precision - * - * @return CarbonInterface - */ - public function floor($precision = 1); - - /** - * Truncate the current instance at the given unit with given precision if specified. - * - * @param string $unit - * @param float|int $precision - * - * @return CarbonInterface - */ - public function floorUnit($unit, $precision = 1); - - /** - * Truncate the current instance week. - * - * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week - * - * @return CarbonInterface - */ - public function floorWeek($weekStartsAt = null); - - /** - * Format the instance with the current locale. You can set the current - * locale using setlocale() https://php.net/setlocale. - * - * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. - * Use ->isoFormat() instead. - * Deprecated since 2.55.0 - * - * @param string $format - * - * @return string - */ - public function formatLocalized($format); - - /** - * @alias diffForHumans - * - * Get the difference in a human readable format in the current locale from current instance to an other - * instance given (or now if null given). - * - * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; - * if null passed, now will be used as comparison reference; - * if any other type, it will be converted to date and used as reference. - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'other' entry (see above) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function from($other = null, $syntax = null, $short = false, $parts = 1, $options = null); - - /** - * Get the difference in a human readable format in the current locale from current - * instance to now. - * - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function fromNow($syntax = null, $short = false, $parts = 1, $options = null); - - /** - * Create an instance from a serialized string. - * - * @param string $value - * - * @throws InvalidFormatException - * - * @return static - */ - public static function fromSerialized($value); - - /** - * Register a custom macro. - * - * @param object|callable $macro - * @param int $priority marco with higher priority is tried first - * - * @return void - */ - public static function genericMacro($macro, $priority = 0); - - /** - * Get a part of the Carbon object - * - * @param string $name - * - * @throws UnknownGetterException - * - * @return string|int|bool|DateTimeZone|null - */ - public function get($name); - - /** - * Returns the alternative number for a given date property if available in the current locale. - * - * @param string $key date property - * - * @return string - */ - public function getAltNumber(string $key): string; - - /** - * Returns the list of internally available locales and already loaded custom locales. - * (It will ignore custom translator dynamic loading.) - * - * @return array - */ - public static function getAvailableLocales(); - - /** - * Returns list of Language object for each available locale. This object allow you to get the ISO name, native - * name, region and variant of the locale. - * - * @return Language[] - */ - public static function getAvailableLocalesInfo(); - - /** - * Returns list of calendar formats for ISO formatting. - * - * @param string|null $locale current locale used if null - * - * @return array - */ - public function getCalendarFormats($locale = null); - - /** - * Get the days of the week - * - * @return array - */ - public static function getDays(); - - /** - * Return the number of days since the start of the week (using the current locale or the first parameter - * if explicitly given). - * - * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, - * if not provided, start of week is inferred from the locale - * (Sunday for en_US, Monday for de_DE, etc.) - * - * @return int - */ - public function getDaysFromStartOfWeek(?int $weekStartsAt = null): int; - - /** - * Get the fallback locale. - * - * @see https://symfony.com/doc/current/components/translation.html#fallback-locales - * - * @return string|null - */ - public static function getFallbackLocale(); - - /** - * List of replacements from date() format to isoFormat(). - * - * @return array - */ - public static function getFormatsToIsoReplacements(); - - /** - * Return default humanDiff() options (merged flags as integer). - * - * @return int - */ - public static function getHumanDiffOptions(); - - /** - * Returns list of locale formats for ISO formatting. - * - * @param string|null $locale current locale used if null - * - * @return array - */ - public function getIsoFormats($locale = null); - - /** - * Returns list of locale units for ISO formatting. - * - * @return array - */ - public static function getIsoUnits(); - - /** - * {@inheritdoc} - * - * @return array - */ - #[ReturnTypeWillChange] - public static function getLastErrors(); - - /** - * Get the raw callable macro registered globally or locally for a given name. - * - * @param string $name - * - * @return callable|null - */ - public function getLocalMacro($name); - - /** - * Get the translator of the current instance or the default if none set. - * - * @return \Symfony\Component\Translation\TranslatorInterface - */ - public function getLocalTranslator(); - - /** - * Get the current translator locale. - * - * @return string - */ - public static function getLocale(); - - /** - * Get the raw callable macro registered globally for a given name. - * - * @param string $name - * - * @return callable|null - */ - public static function getMacro($name); - - /** - * get midday/noon hour - * - * @return int - */ - public static function getMidDayAt(); - - /** - * Returns the offset hour and minute formatted with +/- and a given separator (":" by default). - * For example, if the time zone is 9 hours 30 minutes, you'll get "+09:30", with "@@" as first - * argument, "+09@@30", with "" as first argument, "+0930". Negative offset will return something - * like "-12:00". - * - * @param string $separator string to place between hours and minutes (":" by default) - * - * @return string - */ - public function getOffsetString($separator = ':'); - - /** - * Returns a unit of the instance padded with 0 by default or any other string if specified. - * - * @param string $unit Carbon unit name - * @param int $length Length of the output (2 by default) - * @param string $padString String to use for padding ("0" by default) - * @param int $padType Side(s) to pad (STR_PAD_LEFT by default) - * - * @return string - */ - public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = 0); - - /** - * Returns a timestamp rounded with the given precision (6 by default). - * - * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) - * @example getPreciseTimestamp(6) 1532087464437474 - * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) - * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) - * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) - * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) - * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) - * @example getPreciseTimestamp(0) 1532087464 (second precision) - * @example getPreciseTimestamp(-1) 153208746 (10 second precision) - * @example getPreciseTimestamp(-2) 15320875 (100 second precision) - * - * @param int $precision - * - * @return float - */ - public function getPreciseTimestamp($precision = 6); - - /** - * Returns current local settings. - * - * @return array - */ - public function getSettings(); - - /** - * Get the Carbon instance (real or mock) to be returned when a "now" - * instance is created. - * - * @return Closure|static the current instance used for testing - */ - public static function getTestNow(); - - /** - * Return a format from H:i to H:i:s.u according to given unit precision. - * - * @param string $unitPrecision "minute", "second", "millisecond" or "microsecond" - * - * @return string - */ - public static function getTimeFormatByPrecision($unitPrecision); - - /** - * Returns the timestamp with millisecond precision. - * - * @return int - */ - public function getTimestampMs(); - - /** - * Get the translation of the current week day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * @param string $keySuffix "", "_short" or "_min" - * @param string|null $defaultValue default value if translation missing - * - * @return string - */ - public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null); - - /** - * Get the translation of the current abbreviated week day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * - * @return string - */ - public function getTranslatedMinDayName($context = null); - - /** - * Get the translation of the current month day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * @param string $keySuffix "" or "_short" - * @param string|null $defaultValue default value if translation missing - * - * @return string - */ - public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null); - - /** - * Get the translation of the current short week day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * - * @return string - */ - public function getTranslatedShortDayName($context = null); - - /** - * Get the translation of the current short month day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * - * @return string - */ - public function getTranslatedShortMonthName($context = null); - - /** - * Returns raw translation message for a given key. - * - * @param string $key key to find - * @param string|null $locale current locale used if null - * @param string|null $default default value if translation returns the key - * @param \Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use - * - * @return string - */ - public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null); - - /** - * Returns raw translation message for a given key. - * - * @param \Symfony\Component\Translation\TranslatorInterface $translator the translator to use - * @param string $key key to find - * @param string|null $locale current locale used if null - * @param string|null $default default value if translation returns the key - * - * @return string - */ - public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null); - - /** - * Get the default translator instance in use. - * - * @return \Symfony\Component\Translation\TranslatorInterface - */ - public static function getTranslator(); - - /** - * Get the last day of week - * - * @return int - */ - public static function getWeekEndsAt(); - - /** - * Get the first day of week - * - * @return int - */ - public static function getWeekStartsAt(); - - /** - * Get weekend days - * - * @return array - */ - public static function getWeekendDays(); - - /** - * Determines if the instance is greater (after) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function greaterThan($date): bool; - - /** - * Determines if the instance is greater (after) than or equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function greaterThanOrEqualTo($date): bool; - - /** - * Determines if the instance is greater (after) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see greaterThan() - * - * @return bool - */ - public function gt($date): bool; - - /** - * Determines if the instance is greater (after) than or equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see greaterThanOrEqualTo() - * - * @return bool - */ - public function gte($date): bool; - - /** - * Checks if the (date)time string is in a given format. - * - * @example - * ``` - * Carbon::hasFormat('11:12:45', 'h:i:s'); // true - * Carbon::hasFormat('13:12:45', 'h:i:s'); // false - * ``` - * - * @param string $date - * @param string $format - * - * @return bool - */ - public static function hasFormat($date, $format); - - /** - * Checks if the (date)time string is in a given format. - * - * @example - * ``` - * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true - * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false - * ``` - * - * @param string $date - * @param string $format - * - * @return bool - */ - public static function hasFormatWithModifiers($date, $format): bool; - - /** - * Checks if macro is registered globally or locally. - * - * @param string $name - * - * @return bool - */ - public function hasLocalMacro($name); - - /** - * Return true if the current instance has its own translator. - * - * @return bool - */ - public function hasLocalTranslator(); - - /** - * Checks if macro is registered globally. - * - * @param string $name - * - * @return bool - */ - public static function hasMacro($name); - - /** - * Determine if a time string will produce a relative date. - * - * @param string $time - * - * @return bool true if time match a relative date, false if absolute or invalid time string - */ - public static function hasRelativeKeywords($time); - - /** - * Determine if there is a valid test instance set. A valid test instance - * is anything that is not null. - * - * @return bool true if there is a test instance, otherwise false - */ - public static function hasTestNow(); - - /** - * Create a Carbon instance from a DateTime one. - * - * @param DateTimeInterface $date - * - * @return static - */ - public static function instance($date); - - /** - * Returns true if the current date matches the given string. - * - * @example - * ``` - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true - * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true - * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false - * ``` - * - * @param string $tester day name, month name, hour, date, etc. as string - * - * @return bool - */ - public function is(string $tester); - - /** - * Determines if the instance is greater (after) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see greaterThan() - * - * @return bool - */ - public function isAfter($date): bool; - - /** - * Determines if the instance is less (before) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see lessThan() - * - * @return bool - */ - public function isBefore($date): bool; - - /** - * Determines if the instance is between two others - * - * @example - * ``` - * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false - * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * @param bool $equal Indicates if an equal to comparison should be done - * - * @return bool - */ - public function isBetween($date1, $date2, $equal = true): bool; - - /** - * Check if its the birthday. Compares the date/month values of the two dates. - * - * @example - * ``` - * Carbon::now()->subYears(5)->isBirthday(); // true - * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false - * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true - * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. - * - * @return bool - */ - public function isBirthday($date = null); - - /** - * Determines if the instance is in the current unit given. - * - * @example - * ``` - * Carbon::now()->isCurrentUnit('hour'); // true - * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false - * ``` - * - * @param string $unit The unit to test. - * - * @throws BadMethodCallException - * - * @return bool - */ - public function isCurrentUnit($unit); - - /** - * Checks if this day is a specific day of the week. - * - * @example - * ``` - * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true - * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false - * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true - * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false - * ``` - * - * @param int $dayOfWeek - * - * @return bool - */ - public function isDayOfWeek($dayOfWeek); - - /** - * Check if the instance is end of day. - * - * @example - * ``` - * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true - * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true - * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true - * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false - * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true - * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false - * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false - * ``` - * - * @param bool $checkMicroseconds check time at microseconds precision - * - * @return bool - */ - public function isEndOfDay($checkMicroseconds = false); - - /** - * Returns true if the date was created using CarbonImmutable::endOfTime() - * - * @return bool - */ - public function isEndOfTime(): bool; - - /** - * Determines if the instance is in the future, ie. greater (after) than now. - * - * @example - * ``` - * Carbon::now()->addHours(5)->isFuture(); // true - * Carbon::now()->subHours(5)->isFuture(); // false - * ``` - * - * @return bool - */ - public function isFuture(); - - /** - * Returns true if the current class/instance is immutable. - * - * @return bool - */ - public static function isImmutable(); - - /** - * Check if today is the last day of the Month - * - * @example - * ``` - * Carbon::parse('2019-02-28')->isLastOfMonth(); // true - * Carbon::parse('2019-03-28')->isLastOfMonth(); // false - * Carbon::parse('2019-03-30')->isLastOfMonth(); // false - * Carbon::parse('2019-03-31')->isLastOfMonth(); // true - * Carbon::parse('2019-04-30')->isLastOfMonth(); // true - * ``` - * - * @return bool - */ - public function isLastOfMonth(); - - /** - * Determines if the instance is a leap year. - * - * @example - * ``` - * Carbon::parse('2020-01-01')->isLeapYear(); // true - * Carbon::parse('2019-01-01')->isLeapYear(); // false - * ``` - * - * @return bool - */ - public function isLeapYear(); - - /** - * Determines if the instance is a long year (using ISO 8601 year). - * - * @example - * ``` - * Carbon::parse('2015-01-01')->isLongIsoYear(); // true - * Carbon::parse('2016-01-01')->isLongIsoYear(); // true - * Carbon::parse('2016-01-03')->isLongIsoYear(); // false - * Carbon::parse('2019-12-29')->isLongIsoYear(); // false - * Carbon::parse('2019-12-30')->isLongIsoYear(); // true - * ``` - * - * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates - * - * @return bool - */ - public function isLongIsoYear(); - - /** - * Determines if the instance is a long year (using calendar year). - * - * ⚠️ This method completely ignores month and day to use the numeric year number, - * it's not correct if the exact date matters. For instance as `2019-12-30` is already - * in the first week of the 2020 year, if you want to know from this date if ISO week - * year 2020 is a long year, use `isLongIsoYear` instead. - * - * @example - * ``` - * Carbon::create(2015)->isLongYear(); // true - * Carbon::create(2016)->isLongYear(); // false - * ``` - * - * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates - * - * @return bool - */ - public function isLongYear(); - - /** - * Check if the instance is midday. - * - * @example - * ``` - * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false - * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true - * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true - * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false - * ``` - * - * @return bool - */ - public function isMidday(); - - /** - * Check if the instance is start of day / midnight. - * - * @example - * ``` - * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true - * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true - * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false - * ``` - * - * @return bool - */ - public function isMidnight(); - - /** - * Returns true if a property can be changed via setter. - * - * @param string $unit - * - * @return bool - */ - public static function isModifiableUnit($unit); - - /** - * Returns true if the current class/instance is mutable. - * - * @return bool - */ - public static function isMutable(); - - /** - * Determines if the instance is in the past, ie. less (before) than now. - * - * @example - * ``` - * Carbon::now()->subHours(5)->isPast(); // true - * Carbon::now()->addHours(5)->isPast(); // false - * ``` - * - * @return bool - */ - public function isPast(); - - /** - * Compares the formatted values of the two dates. - * - * @example - * ``` - * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true - * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false - * ``` - * - * @param string $format date formats to compare. - * @param \Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. - * - * @return bool - */ - public function isSameAs($format, $date = null); - - /** - * Checks if the passed in date is in the same month as the instance´s month. - * - * @example - * ``` - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. - * @param bool $ofSameYear Check if it is the same month in the same year. - * - * @return bool - */ - public function isSameMonth($date = null, $ofSameYear = true); - - /** - * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). - * - * @example - * ``` - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. - * @param bool $ofSameYear Check if it is the same month in the same year. - * - * @return bool - */ - public function isSameQuarter($date = null, $ofSameYear = true); - - /** - * Determines if the instance is in the current unit given. - * - * @example - * ``` - * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true - * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false - * ``` - * - * @param string $unit singular unit string - * @param \Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. - * - * @throws BadComparisonUnitException - * - * @return bool - */ - public function isSameUnit($unit, $date = null); - - /** - * Check if the instance is start of day / midnight. - * - * @example - * ``` - * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true - * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true - * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false - * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true - * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false - * ``` - * - * @param bool $checkMicroseconds check time at microseconds precision - * - * @return bool - */ - public function isStartOfDay($checkMicroseconds = false); - - /** - * Returns true if the date was created using CarbonImmutable::startOfTime() - * - * @return bool - */ - public function isStartOfTime(): bool; - - /** - * Returns true if the strict mode is globally in use, false else. - * (It can be overridden in specific instances.) - * - * @return bool - */ - public static function isStrictModeEnabled(); - - /** - * Determines if the instance is today. - * - * @example - * ``` - * Carbon::today()->isToday(); // true - * Carbon::tomorrow()->isToday(); // false - * ``` - * - * @return bool - */ - public function isToday(); - - /** - * Determines if the instance is tomorrow. - * - * @example - * ``` - * Carbon::tomorrow()->isTomorrow(); // true - * Carbon::yesterday()->isTomorrow(); // false - * ``` - * - * @return bool - */ - public function isTomorrow(); - - /** - * Determines if the instance is a weekday. - * - * @example - * ``` - * Carbon::parse('2019-07-14')->isWeekday(); // false - * Carbon::parse('2019-07-15')->isWeekday(); // true - * ``` - * - * @return bool - */ - public function isWeekday(); - - /** - * Determines if the instance is a weekend day. - * - * @example - * ``` - * Carbon::parse('2019-07-14')->isWeekend(); // true - * Carbon::parse('2019-07-15')->isWeekend(); // false - * ``` - * - * @return bool - */ - public function isWeekend(); - - /** - * Determines if the instance is yesterday. - * - * @example - * ``` - * Carbon::yesterday()->isYesterday(); // true - * Carbon::tomorrow()->isYesterday(); // false - * ``` - * - * @return bool - */ - public function isYesterday(); - - /** - * Format in the current language using ISO replacement patterns. - * - * @param string $format - * @param string|null $originalFormat provide context if a chunk has been passed alone - * - * @return string - */ - public function isoFormat(string $format, ?string $originalFormat = null): string; - - /** - * Get/set the week number using given first day of week and first - * day of year included in the first week. Or use ISO format if no settings - * given. - * - * @param int|null $week - * @param int|null $dayOfWeek - * @param int|null $dayOfYear - * - * @return int|static - */ - public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null); - - /** - * Set/get the week number of year using given first day of week and first - * day of year included in the first week. Or use ISO format if no settings - * given. - * - * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. - * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) - * @param int|null $dayOfYear first day of year included in the week #1 - * - * @return int|static - */ - public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYear = null); - - /** - * Get/set the ISO weekday from 1 (Monday) to 7 (Sunday). - * - * @param int|null $value new value for weekday if using as setter. - * - * @return static|int - */ - public function isoWeekday($value = null); - - /** - * Get the number of weeks of the current week-year using given first day of week and first - * day of year included in the first week. Or use ISO format if no settings - * given. - * - * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) - * @param int|null $dayOfYear first day of year included in the week #1 - * - * @return int - */ - public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null); - - /** - * Prepare the object for JSON serialization. - * - * @return array|string - */ - #[ReturnTypeWillChange] - public function jsonSerialize(); - - /** - * Modify to the last occurrence of a given day of the week - * in the current month. If no dayOfWeek is provided, modify to the - * last day of the current month. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek - * - * @return static - */ - public function lastOfMonth($dayOfWeek = null); - - /** - * Modify to the last occurrence of a given day of the week - * in the current quarter. If no dayOfWeek is provided, modify to the - * last day of the current quarter. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek day of the week default null - * - * @return static - */ - public function lastOfQuarter($dayOfWeek = null); - - /** - * Modify to the last occurrence of a given day of the week - * in the current year. If no dayOfWeek is provided, modify to the - * last day of the current year. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek day of the week default null - * - * @return static - */ - public function lastOfYear($dayOfWeek = null); - - /** - * Determines if the instance is less (before) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function lessThan($date): bool; - - /** - * Determines if the instance is less (before) or equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function lessThanOrEqualTo($date): bool; - - /** - * Get/set the locale for the current instance. - * - * @param string|null $locale - * @param string ...$fallbackLocales - * - * @return $this|string - */ - public function locale(?string $locale = null, ...$fallbackLocales); - - /** - * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). - * Support is considered enabled if the 3 words are translated in the given locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasDiffOneDayWords($locale); - - /** - * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasDiffSyntax($locale); - - /** - * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). - * Support is considered enabled if the 2 words are translated in the given locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasDiffTwoDayWords($locale); - - /** - * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasPeriodSyntax($locale); - - /** - * Returns true if the given locale is internally supported and has short-units support. - * Support is considered enabled if either year, day or hour has a short variant translated. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasShortUnits($locale); - - /** - * Determines if the instance is less (before) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see lessThan() - * - * @return bool - */ - public function lt($date): bool; - - /** - * Determines if the instance is less (before) or equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see lessThanOrEqualTo() - * - * @return bool - */ - public function lte($date): bool; - - /** - * Register a custom macro. - * - * @example - * ``` - * $userSettings = [ - * 'locale' => 'pt', - * 'timezone' => 'America/Sao_Paulo', - * ]; - * Carbon::macro('userFormat', function () use ($userSettings) { - * return $this->copy()->locale($userSettings['locale'])->tz($userSettings['timezone'])->calendar(); - * }); - * echo Carbon::yesterday()->hours(11)->userFormat(); - * ``` - * - * @param string $name - * @param object|callable $macro - * - * @return void - */ - public static function macro($name, $macro); - - /** - * Make a Carbon instance from given variable if possible. - * - * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals - * and recurrences). Throw an exception for invalid format, but otherwise return null. - * - * @param mixed $var - * - * @throws InvalidFormatException - * - * @return static|null - */ - public static function make($var); - - /** - * Get the maximum instance between a given instance (default now) and the current instance. - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return static - */ - public function max($date = null); - - /** - * Create a Carbon instance for the greatest supported date. - * - * @return static - */ - public static function maxValue(); - - /** - * Get the maximum instance between a given instance (default now) and the current instance. - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see max() - * - * @return static - */ - public function maximum($date = null); - - /** - * Return the meridiem of the current time in the current locale. - * - * @param bool $isLower if true, returns lowercase variant if available in the current locale. - * - * @return string - */ - public function meridiem(bool $isLower = false): string; - - /** - * Modify to midday, default to self::$midDayAt - * - * @return static - */ - public function midDay(); - - /** - * Get the minimum instance between a given instance (default now) and the current instance. - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return static - */ - public function min($date = null); - - /** - * Create a Carbon instance for the lowest supported date. - * - * @return static - */ - public static function minValue(); - - /** - * Get the minimum instance between a given instance (default now) and the current instance. - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see min() - * - * @return static - */ - public function minimum($date = null); - - /** - * Mix another object into the class. - * - * @example - * ``` - * Carbon::mixin(new class { - * public function addMoon() { - * return function () { - * return $this->addDays(30); - * }; - * } - * public function subMoon() { - * return function () { - * return $this->subDays(30); - * }; - * } - * }); - * $fullMoon = Carbon::create('2018-12-22'); - * $nextFullMoon = $fullMoon->addMoon(); - * $blackMoon = Carbon::create('2019-01-06'); - * $previousBlackMoon = $blackMoon->subMoon(); - * echo "$nextFullMoon\n"; - * echo "$previousBlackMoon\n"; - * ``` - * - * @param object|string $mixin - * - * @throws ReflectionException - * - * @return void - */ - public static function mixin($mixin); - - /** - * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. - * - * @see https://php.net/manual/en/datetime.modify.php - * - * @return static|false - */ - #[ReturnTypeWillChange] - public function modify($modify); - - /** - * Determines if the instance is not equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false - * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see notEqualTo() - * - * @return bool - */ - public function ne($date): bool; - - /** - * Modify to the next occurrence of a given modifier such as a day of - * the week. If no modifier is provided, modify to the next occurrence - * of the current day of the week. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param string|int|null $modifier - * - * @return static|false - */ - public function next($modifier = null); - - /** - * Go forward to the next weekday. - * - * @return static - */ - public function nextWeekday(); - - /** - * Go forward to the next weekend day. - * - * @return static - */ - public function nextWeekendDay(); - - /** - * Determines if the instance is not equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function notEqualTo($date): bool; - - /** - * Get a Carbon instance for the current date and time. - * - * @param DateTimeZone|string|null $tz - * - * @return static - */ - public static function now($tz = null); - - /** - * Returns a present instance in the same timezone. - * - * @return static - */ - public function nowWithSameTz(); - - /** - * Modify to the given occurrence of a given day of the week - * in the current month. If the calculated occurrence is outside the scope - * of the current month, then return false and no modifications are made. - * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int $nth - * @param int $dayOfWeek - * - * @return mixed - */ - public function nthOfMonth($nth, $dayOfWeek); - - /** - * Modify to the given occurrence of a given day of the week - * in the current quarter. If the calculated occurrence is outside the scope - * of the current quarter, then return false and no modifications are made. - * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int $nth - * @param int $dayOfWeek - * - * @return mixed - */ - public function nthOfQuarter($nth, $dayOfWeek); - - /** - * Modify to the given occurrence of a given day of the week - * in the current year. If the calculated occurrence is outside the scope - * of the current year, then return false and no modifications are made. - * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int $nth - * @param int $dayOfWeek - * - * @return mixed - */ - public function nthOfYear($nth, $dayOfWeek); - - /** - * Return a property with its ordinal. - * - * @param string $key - * @param string|null $period - * - * @return string - */ - public function ordinal(string $key, ?string $period = null): string; - - /** - * Create a carbon instance from a string. - * - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * - * @param string|DateTimeInterface|null $time - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function parse($time = null, $tz = null); - - /** - * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). - * - * @param string $time date/time string in the given language (may also contain English). - * @param string|null $locale if locale is null or not specified, current global locale will be - * used instead. - * @param DateTimeZone|string|null $tz optional timezone for the new instance. - * - * @throws InvalidFormatException - * - * @return static - */ - public static function parseFromLocale($time, $locale = null, $tz = null); - - /** - * Returns standardized plural of a given singular/plural unit name (in English). - * - * @param string $unit - * - * @return string - */ - public static function pluralUnit(string $unit): string; - - /** - * Modify to the previous occurrence of a given modifier such as a day of - * the week. If no dayOfWeek is provided, modify to the previous occurrence - * of the current day of the week. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param string|int|null $modifier - * - * @return static|false - */ - public function previous($modifier = null); - - /** - * Go backward to the previous weekday. - * - * @return static - */ - public function previousWeekday(); - - /** - * Go backward to the previous weekend day. - * - * @return static - */ - public function previousWeekendDay(); - - /** - * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). - * - * @param \DateTimeInterface|Carbon|CarbonImmutable|null $end period end date - * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit - * @param string|null $unit if specified, $interval must be an integer - * - * @return CarbonPeriod - */ - public function range($end = null, $interval = null, $unit = null); - - /** - * Call native PHP DateTime/DateTimeImmutable add() method. - * - * @param DateInterval $interval - * - * @return static - */ - public function rawAdd(DateInterval $interval); - - /** - * Create a Carbon instance from a specific format. - * - * @param string $format Datetime format - * @param string $time - * @param DateTimeZone|string|false|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function rawCreateFromFormat($format, $time, $tz = null); - - /** - * @see https://php.net/manual/en/datetime.format.php - * - * @param string $format - * - * @return string - */ - public function rawFormat($format); - - /** - * Create a carbon instance from a string. - * - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * - * @param string|DateTimeInterface|null $time - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function rawParse($time = null, $tz = null); - - /** - * Call native PHP DateTime/DateTimeImmutable sub() method. - * - * @param DateInterval $interval - * - * @return static - */ - public function rawSub(DateInterval $interval); - - /** - * Remove all macros and generic macros. - */ - public static function resetMacros(); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @see settings - * - * Reset the month overflow behavior. - * - * @return void - */ - public static function resetMonthsOverflow(); - - /** - * Reset the format used to the default when type juggling a Carbon instance to a string - * - * @return void - */ - public static function resetToStringFormat(); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @see settings - * - * Reset the month overflow behavior. - * - * @return void - */ - public static function resetYearsOverflow(); - - /** - * Round the current instance second with given precision if specified. - * - * @param float|int|string|\DateInterval|null $precision - * @param string $function - * - * @return CarbonInterface - */ - public function round($precision = 1, $function = 'round'); - - /** - * Round the current instance at the given unit with given precision if specified and the given function. - * - * @param string $unit - * @param float|int $precision - * @param string $function - * - * @return CarbonInterface - */ - public function roundUnit($unit, $precision = 1, $function = 'round'); - - /** - * Round the current instance week. - * - * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week - * - * @return CarbonInterface - */ - public function roundWeek($weekStartsAt = null); - - /** - * The number of seconds since midnight. - * - * @return int - */ - public function secondsSinceMidnight(); - - /** - * The number of seconds until 23:59:59. - * - * @return int - */ - public function secondsUntilEndOfDay(); - - /** - * Return a serialized string of the instance. - * - * @return string - */ - public function serialize(); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather transform Carbon object before the serialization. - * - * JSON serialize all Carbon instances using the given callback. - * - * @param callable $callback - * - * @return void - */ - public static function serializeUsing($callback); - - /** - * Set a part of the Carbon object - * - * @param string|array $name - * @param string|int|DateTimeZone $value - * - * @throws ImmutableException|UnknownSetterException - * - * @return $this - */ - public function set($name, $value = null); - - /** - * Set the date with gregorian year, month and day numbers. - * - * @see https://php.net/manual/en/datetime.setdate.php - * - * @param int $year - * @param int $month - * @param int $day - * - * @return static - */ - #[ReturnTypeWillChange] - public function setDate($year, $month, $day); - - /** - * Set the year, month, and date for this instance to that of the passed instance. - * - * @param Carbon|DateTimeInterface $date now if null - * - * @return static - */ - public function setDateFrom($date = null); - - /** - * Set the date and time all together. - * - * @param int $year - * @param int $month - * @param int $day - * @param int $hour - * @param int $minute - * @param int $second - * @param int $microseconds - * - * @return static - */ - public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0); - - /** - * Set the date and time for this instance to that of the passed instance. - * - * @param Carbon|DateTimeInterface $date - * - * @return static - */ - public function setDateTimeFrom($date = null); - - /** - * Set the day (keeping the current time) to the start of the week + the number of days passed as the first - * parameter. First day of week is driven by the locale unless explicitly set with the second parameter. - * - * @param int $numberOfDays number of days to add after the start of the current week - * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, - * if not provided, start of week is inferred from the locale - * (Sunday for en_US, Monday for de_DE, etc.) - * - * @return static - */ - public function setDaysFromStartOfWeek(int $numberOfDays, ?int $weekStartsAt = null); - - /** - * Set the fallback locale. - * - * @see https://symfony.com/doc/current/components/translation.html#fallback-locales - * - * @param string $locale - */ - public static function setFallbackLocale($locale); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @see settings - * - * @param int $humanDiffOptions - */ - public static function setHumanDiffOptions($humanDiffOptions); - - /** - * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. - * - * @see https://php.net/manual/en/datetime.setisodate.php - * - * @param int $year - * @param int $week - * @param int $day - * - * @return static - */ - #[ReturnTypeWillChange] - public function setISODate($year, $week, $day = 1); - - /** - * Set the translator for the current instance. - * - * @param \Symfony\Component\Translation\TranslatorInterface $translator - * - * @return $this - */ - public function setLocalTranslator(TranslatorInterface $translator); - - /** - * Set the current translator locale and indicate if the source locale file exists. - * Pass 'auto' as locale to use closest language from the current LC_TIME locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function setLocale($locale); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider mid-day is always 12pm, then if you need to test if it's an other - * hour, test it explicitly: - * $date->format('G') == 13 - * or to set explicitly to a given hour: - * $date->setTime(13, 0, 0, 0) - * - * Set midday/noon hour - * - * @param int $hour midday hour - * - * @return void - */ - public static function setMidDayAt($hour); - - /** - * Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * - * Note the timezone parameter was left out of the examples above and - * has no affect as the mock value will be returned regardless of its value. - * - * Only the moment is mocked with setTestNow(), the timezone will still be the one passed - * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). - * - * To clear the test instance call this method using the default - * parameter of null. - * - * /!\ Use this method for unit tests only. - * - * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance - */ - public static function setTestNow($testNow = null); - - /** - * Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * - * It will also align default timezone (e.g. call date_default_timezone_set()) with - * the second argument or if null, with the timezone of the given date object. - * - * To clear the test instance call this method using the default - * parameter of null. - * - * /!\ Use this method for unit tests only. - * - * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance - */ - public static function setTestNowAndTimezone($testNow = null, $tz = null); - - /** - * Resets the current time of the DateTime object to a different time. - * - * @see https://php.net/manual/en/datetime.settime.php - * - * @param int $hour - * @param int $minute - * @param int $second - * @param int $microseconds - * - * @return static - */ - #[ReturnTypeWillChange] - public function setTime($hour, $minute, $second = 0, $microseconds = 0); - - /** - * Set the hour, minute, second and microseconds for this instance to that of the passed instance. - * - * @param Carbon|DateTimeInterface $date now if null - * - * @return static - */ - public function setTimeFrom($date = null); - - /** - * Set the time by time string. - * - * @param string $time - * - * @return static - */ - public function setTimeFromTimeString($time); - - /** - * Set the instance's timestamp. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $unixTimestamp - * - * @return static - */ - #[ReturnTypeWillChange] - public function setTimestamp($unixTimestamp); - - /** - * Set the instance's timezone from a string or object. - * - * @param DateTimeZone|string $value - * - * @return static - */ - #[ReturnTypeWillChange] - public function setTimezone($value); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump another string - * format. - * - * Set the default format used when type juggling a Carbon instance to a string. - * - * @param string|Closure|null $format - * - * @return void - */ - public static function setToStringFormat($format); - - /** - * Set the default translator instance to use. - * - * @param \Symfony\Component\Translation\TranslatorInterface $translator - * - * @return void - */ - public static function setTranslator(TranslatorInterface $translator); - - /** - * Set specified unit to new given value. - * - * @param string $unit year, month, day, hour, minute, second or microsecond - * @param int $value new value for given unit - * - * @return static - */ - public function setUnit($unit, $value = null); - - /** - * Set any unit to a new value without overflowing current other unit given. - * - * @param string $valueUnit unit name to modify - * @param int $value new value for the input unit - * @param string $overflowUnit unit name to not overflow - * - * @return static - */ - public function setUnitNoOverflow($valueUnit, $value, $overflowUnit); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use UTF-8 language packages on every machine. - * - * Set if UTF8 will be used for localized date/time. - * - * @param bool $utf8 - */ - public static function setUtf8($utf8); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek - * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the - * start of week according to current locale selected and implicitly the end of week. - * - * Set the last day of week - * - * @param int|string $day week end day (or 'auto' to get the day before the first day of week - * from Carbon::getLocale() culture). - * - * @return void - */ - public static function setWeekEndsAt($day); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the - * 'first_day_of_week' locale setting to change the start of week according to current locale - * selected and implicitly the end of week. - * - * Set the first day of week - * - * @param int|string $day week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). - * - * @return void - */ - public static function setWeekStartsAt($day); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider week-end is always saturday and sunday, and if you have some custom - * week-end days to handle, give to those days an other name and create a macro for them: - * - * ``` - * Carbon::macro('isDayOff', function ($date) { - * return $date->isSunday() || $date->isMonday(); - * }); - * Carbon::macro('isNotDayOff', function ($date) { - * return !$date->isDayOff(); - * }); - * if ($someDate->isDayOff()) ... - * if ($someDate->isNotDayOff()) ... - * // Add 5 not-off days - * $count = 5; - * while ($someDate->isDayOff() || ($count-- > 0)) { - * $someDate->addDay(); - * } - * ``` - * - * Set weekend days - * - * @param array $days - * - * @return void - */ - public static function setWeekendDays($days); - - /** - * Set specific options. - * - strictMode: true|false|null - * - monthOverflow: true|false|null - * - yearOverflow: true|false|null - * - humanDiffOptions: int|null - * - toStringFormat: string|Closure|null - * - toJsonFormat: string|Closure|null - * - locale: string|null - * - timezone: \DateTimeZone|string|int|null - * - macros: array|null - * - genericMacros: array|null - * - * @param array $settings - * - * @return $this|static - */ - public function settings(array $settings); - - /** - * Set the instance's timezone from a string or object and add/subtract the offset difference. - * - * @param DateTimeZone|string $value - * - * @return static - */ - public function shiftTimezone($value); - - /** - * Get the month overflow global behavior (can be overridden in specific instances). - * - * @return bool - */ - public static function shouldOverflowMonths(); - - /** - * Get the month overflow global behavior (can be overridden in specific instances). - * - * @return bool - */ - public static function shouldOverflowYears(); - - /** - * @alias diffForHumans - * - * Get the difference in a human readable format in the current locale from current instance to an other - * instance given (or now if null given). - */ - public function since($other = null, $syntax = null, $short = false, $parts = 1, $options = null); - - /** - * Returns standardized singular of a given singular/plural unit name (in English). - * - * @param string $unit - * - * @return string - */ - public static function singularUnit(string $unit): string; - - /** - * Modify to start of current given unit. - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16.334455') - * ->startOf('month') - * ->endOf('week', Carbon::FRIDAY); - * ``` - * - * @param string $unit - * @param array $params - * - * @return static - */ - public function startOf($unit, ...$params); - - /** - * Resets the date to the first day of the century and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfCentury(); - * ``` - * - * @return static - */ - public function startOfCentury(); - - /** - * Resets the time to 00:00:00 start of day - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfDay(); - * ``` - * - * @return static - */ - public function startOfDay(); - - /** - * Resets the date to the first day of the decade and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfDecade(); - * ``` - * - * @return static - */ - public function startOfDecade(); - - /** - * Modify to start of current hour, minutes and seconds become 0 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfHour(); - * ``` - * - * @return static - */ - public function startOfHour(); - - /** - * Resets the date to the first day of the millennium and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfMillennium(); - * ``` - * - * @return static - */ - public function startOfMillennium(); - - /** - * Modify to start of current minute, seconds become 0 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfMinute(); - * ``` - * - * @return static - */ - public function startOfMinute(); - - /** - * Resets the date to the first day of the month and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfMonth(); - * ``` - * - * @return static - */ - public function startOfMonth(); - - /** - * Resets the date to the first day of the quarter and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfQuarter(); - * ``` - * - * @return static - */ - public function startOfQuarter(); - - /** - * Modify to start of current second, microseconds become 0 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16.334455') - * ->startOfSecond() - * ->format('H:i:s.u'); - * ``` - * - * @return static - */ - public function startOfSecond(); - - /** - * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek() . "\n"; - * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->startOfWeek() . "\n"; - * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek(Carbon::SUNDAY) . "\n"; - * ``` - * - * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week - * - * @return static - */ - public function startOfWeek($weekStartsAt = null); - - /** - * Resets the date to the first day of the year and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfYear(); - * ``` - * - * @return static - */ - public function startOfYear(); - - /** - * Subtract given units or interval to the current instance. - * - * @example $date->sub('hour', 3) - * @example $date->sub(15, 'days') - * @example $date->sub(CarbonInterval::days(4)) - * - * @param string|DateInterval|Closure|CarbonConverterInterface $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - #[ReturnTypeWillChange] - public function sub($unit, $value = 1, $overflow = null); - - public function subRealUnit($unit, $value = 1); - - /** - * Subtract given units to the current instance. - * - * @param string $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - public function subUnit($unit, $value = 1, $overflow = null); - - /** - * Subtract any unit to a new value without overflowing current other unit given. - * - * @param string $valueUnit unit name to modify - * @param int $value amount to subtract to the input unit - * @param string $overflowUnit unit name to not overflow - * - * @return static - */ - public function subUnitNoOverflow($valueUnit, $value, $overflowUnit); - - /** - * Subtract given units or interval to the current instance. - * - * @see sub() - * - * @param string|DateInterval $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - public function subtract($unit, $value = 1, $overflow = null); - - /** - * Get the difference in a human readable format in the current locale from current instance to an other - * instance given (or now if null given). - * - * @return string - */ - public function timespan($other = null, $timezone = null); - - /** - * Set the instance's timestamp. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $unixTimestamp - * - * @return static - */ - public function timestamp($unixTimestamp); - - /** - * @alias setTimezone - * - * @param DateTimeZone|string $value - * - * @return static - */ - public function timezone($value); - - /** - * Get the difference in a human readable format in the current locale from an other - * instance given (or now if null given) to current instance. - * - * When comparing a value in the past to default now: - * 1 hour from now - * 5 months from now - * - * When comparing a value in the future to default now: - * 1 hour ago - * 5 months ago - * - * When comparing a value in the past to another value: - * 1 hour after - * 5 months after - * - * When comparing a value in the future to another value: - * 1 hour before - * 5 months before - * - * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; - * if null passed, now will be used as comparison reference; - * if any other type, it will be converted to date and used as reference. - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'other' entry (see above) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function to($other = null, $syntax = null, $short = false, $parts = 1, $options = null); - - /** - * Get default array representation. - * - * @example - * ``` - * var_dump(Carbon::now()->toArray()); - * ``` - * - * @return array - */ - public function toArray(); - - /** - * Format the instance as ATOM - * - * @example - * ``` - * echo Carbon::now()->toAtomString(); - * ``` - * - * @return string - */ - public function toAtomString(); - - /** - * Format the instance as COOKIE - * - * @example - * ``` - * echo Carbon::now()->toCookieString(); - * ``` - * - * @return string - */ - public function toCookieString(); - - /** - * @alias toDateTime - * - * Return native DateTime PHP object matching the current instance. - * - * @example - * ``` - * var_dump(Carbon::now()->toDate()); - * ``` - * - * @return DateTime - */ - public function toDate(); - - /** - * Format the instance as date - * - * @example - * ``` - * echo Carbon::now()->toDateString(); - * ``` - * - * @return string - */ - public function toDateString(); - - /** - * Return native DateTime PHP object matching the current instance. - * - * @example - * ``` - * var_dump(Carbon::now()->toDateTime()); - * ``` - * - * @return DateTime - */ - public function toDateTime(); - - /** - * Return native toDateTimeImmutable PHP object matching the current instance. - * - * @example - * ``` - * var_dump(Carbon::now()->toDateTimeImmutable()); - * ``` - * - * @return DateTimeImmutable - */ - public function toDateTimeImmutable(); - - /** - * Format the instance as date and time T-separated with no timezone - * - * @example - * ``` - * echo Carbon::now()->toDateTimeLocalString(); - * echo "\n"; - * echo Carbon::now()->toDateTimeLocalString('minute'); // You can specify precision among: minute, second, millisecond and microsecond - * ``` - * - * @param string $unitPrecision - * - * @return string - */ - public function toDateTimeLocalString($unitPrecision = 'second'); - - /** - * Format the instance as date and time - * - * @example - * ``` - * echo Carbon::now()->toDateTimeString(); - * ``` - * - * @param string $unitPrecision - * - * @return string - */ - public function toDateTimeString($unitPrecision = 'second'); - - /** - * Format the instance with day, date and time - * - * @example - * ``` - * echo Carbon::now()->toDayDateTimeString(); - * ``` - * - * @return string - */ - public function toDayDateTimeString(); - - /** - * Format the instance as a readable date - * - * @example - * ``` - * echo Carbon::now()->toFormattedDateString(); - * ``` - * - * @return string - */ - public function toFormattedDateString(); - - /** - * Format the instance with the day, and a readable date - * - * @example - * ``` - * echo Carbon::now()->toFormattedDayDateString(); - * ``` - * - * @return string - */ - public function toFormattedDayDateString(): string; - - /** - * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: - * 1977-04-22T01:00:00-05:00). - * - * @example - * ``` - * echo Carbon::now('America/Toronto')->toISOString() . "\n"; - * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; - * ``` - * - * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. - * - * @return null|string - */ - public function toISOString($keepOffset = false); - - /** - * Return a immutable copy of the instance. - * - * @return CarbonImmutable - */ - public function toImmutable(); - - /** - * Format the instance as ISO8601 - * - * @example - * ``` - * echo Carbon::now()->toIso8601String(); - * ``` - * - * @return string - */ - public function toIso8601String(); - - /** - * Convert the instance to UTC and return as Zulu ISO8601 - * - * @example - * ``` - * echo Carbon::now()->toIso8601ZuluString(); - * ``` - * - * @param string $unitPrecision - * - * @return string - */ - public function toIso8601ZuluString($unitPrecision = 'second'); - - /** - * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. - * - * @example - * ``` - * echo Carbon::now('America/Toronto')->toJSON(); - * ``` - * - * @return null|string - */ - public function toJSON(); - - /** - * Return a mutable copy of the instance. - * - * @return Carbon - */ - public function toMutable(); - - /** - * Get the difference in a human readable format in the current locale from an other - * instance given to now - * - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single part) - * @param int $options human diff options - * - * @return string - */ - public function toNow($syntax = null, $short = false, $parts = 1, $options = null); - - /** - * Get default object representation. - * - * @example - * ``` - * var_dump(Carbon::now()->toObject()); - * ``` - * - * @return object - */ - public function toObject(); - - /** - * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). - * - * @param \DateTimeInterface|Carbon|CarbonImmutable|int|null $end period end date or recurrences count if int - * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit - * @param string|null $unit if specified, $interval must be an integer - * - * @return CarbonPeriod - */ - public function toPeriod($end = null, $interval = null, $unit = null); - - /** - * Format the instance as RFC1036 - * - * @example - * ``` - * echo Carbon::now()->toRfc1036String(); - * ``` - * - * @return string - */ - public function toRfc1036String(); - - /** - * Format the instance as RFC1123 - * - * @example - * ``` - * echo Carbon::now()->toRfc1123String(); - * ``` - * - * @return string - */ - public function toRfc1123String(); - - /** - * Format the instance as RFC2822 - * - * @example - * ``` - * echo Carbon::now()->toRfc2822String(); - * ``` - * - * @return string - */ - public function toRfc2822String(); - - /** - * Format the instance as RFC3339 - * - * @param bool $extended - * - * @example - * ``` - * echo Carbon::now()->toRfc3339String() . "\n"; - * echo Carbon::now()->toRfc3339String(true) . "\n"; - * ``` - * - * @return string - */ - public function toRfc3339String($extended = false); - - /** - * Format the instance as RFC7231 - * - * @example - * ``` - * echo Carbon::now()->toRfc7231String(); - * ``` - * - * @return string - */ - public function toRfc7231String(); - - /** - * Format the instance as RFC822 - * - * @example - * ``` - * echo Carbon::now()->toRfc822String(); - * ``` - * - * @return string - */ - public function toRfc822String(); - - /** - * Format the instance as RFC850 - * - * @example - * ``` - * echo Carbon::now()->toRfc850String(); - * ``` - * - * @return string - */ - public function toRfc850String(); - - /** - * Format the instance as RSS - * - * @example - * ``` - * echo Carbon::now()->toRssString(); - * ``` - * - * @return string - */ - public function toRssString(); - - /** - * Returns english human readable complete date string. - * - * @example - * ``` - * echo Carbon::now()->toString(); - * ``` - * - * @return string - */ - public function toString(); - - /** - * Format the instance as time - * - * @example - * ``` - * echo Carbon::now()->toTimeString(); - * ``` - * - * @param string $unitPrecision - * - * @return string - */ - public function toTimeString($unitPrecision = 'second'); - - /** - * Format the instance as W3C - * - * @example - * ``` - * echo Carbon::now()->toW3cString(); - * ``` - * - * @return string - */ - public function toW3cString(); - - /** - * Create a Carbon instance for today. - * - * @param DateTimeZone|string|null $tz - * - * @return static - */ - public static function today($tz = null); - - /** - * Create a Carbon instance for tomorrow. - * - * @param DateTimeZone|string|null $tz - * - * @return static - */ - public static function tomorrow($tz = null); - - /** - * Translate using translation string or callback available. - * - * @param string $key - * @param array $parameters - * @param string|int|float|null $number - * @param \Symfony\Component\Translation\TranslatorInterface|null $translator - * @param bool $altNumbers - * - * @return string - */ - public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string; - - /** - * Returns the alternative number for a given integer if available in the current locale. - * - * @param int $number - * - * @return string - */ - public function translateNumber(int $number): string; - - /** - * Translate a time string from a locale to an other. - * - * @param string $timeString date/time/duration string to translate (may also contain English) - * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) - * @param string|null $to output locale of the result returned (`"en"` by default) - * @param int $mode specify what to translate with options: - * - self::TRANSLATE_ALL (default) - * - CarbonInterface::TRANSLATE_MONTHS - * - CarbonInterface::TRANSLATE_DAYS - * - CarbonInterface::TRANSLATE_UNITS - * - CarbonInterface::TRANSLATE_MERIDIEM - * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS - * - * @return string - */ - public static function translateTimeString($timeString, $from = null, $to = null, $mode = self::TRANSLATE_ALL); - - /** - * Translate a time string from the current locale (`$date->locale()`) to an other. - * - * @param string $timeString time string to translate - * @param string|null $to output locale of the result returned ("en" by default) - * - * @return string - */ - public function translateTimeStringTo($timeString, $to = null); - - /** - * Translate using translation string or callback available. - * - * @param \Symfony\Component\Translation\TranslatorInterface $translator - * @param string $key - * @param array $parameters - * @param null $number - * - * @return string - */ - public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string; - - /** - * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) - * but translate words whenever possible (months, day names, etc.) using the current locale. - * - * @param string $format - * - * @return string - */ - public function translatedFormat(string $format): string; - - /** - * Set the timezone or returns the timezone name if no arguments passed. - * - * @param DateTimeZone|string $value - * - * @return static|string - */ - public function tz($value = null); - - /** - * @alias getTimestamp - * - * Returns the UNIX timestamp for the current date. - * - * @return int - */ - public function unix(); - - /** - * @alias to - * - * Get the difference in a human readable format in the current locale from an other - * instance given (or now if null given) to current instance. - * - * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; - * if null passed, now will be used as comparison reference; - * if any other type, it will be converted to date and used as reference. - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'other' entry (see above) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function until($other = null, $syntax = null, $short = false, $parts = 1, $options = null); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @see settings - * - * Indicates if months should be calculated with overflow. - * - * @param bool $monthsOverflow - * - * @return void - */ - public static function useMonthsOverflow($monthsOverflow = true); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @see settings - * - * Enable the strict mode (or disable with passing false). - * - * @param bool $strictModeEnabled - */ - public static function useStrictMode($strictModeEnabled = true); - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @see settings - * - * Indicates if years should be calculated with overflow. - * - * @param bool $yearsOverflow - * - * @return void - */ - public static function useYearsOverflow($yearsOverflow = true); - - /** - * Set the instance's timezone to UTC. - * - * @return static - */ - public function utc(); - - /** - * Returns the minutes offset to UTC if no arguments passed, else set the timezone with given minutes shift passed. - * - * @param int|null $minuteOffset - * - * @return int|static - */ - public function utcOffset(?int $minuteOffset = null); - - /** - * Returns the milliseconds timestamps used amongst other by Date javascript objects. - * - * @return float - */ - public function valueOf(); - - /** - * Get/set the week number using given first day of week and first - * day of year included in the first week. Or use US format if no settings - * given (Sunday / Jan 6). - * - * @param int|null $week - * @param int|null $dayOfWeek - * @param int|null $dayOfYear - * - * @return int|static - */ - public function week($week = null, $dayOfWeek = null, $dayOfYear = null); - - /** - * Set/get the week number of year using given first day of week and first - * day of year included in the first week. Or use US format if no settings - * given (Sunday / Jan 6). - * - * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. - * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) - * @param int|null $dayOfYear first day of year included in the week #1 - * - * @return int|static - */ - public function weekYear($year = null, $dayOfWeek = null, $dayOfYear = null); - - /** - * Get/set the weekday from 0 (Sunday) to 6 (Saturday). - * - * @param int|null $value new value for weekday if using as setter. - * - * @return static|int - */ - public function weekday($value = null); - - /** - * Get the number of weeks of the current week-year using given first day of week and first - * day of year included in the first week. Or use US format if no settings - * given (Sunday / Jan 6). - * - * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) - * @param int|null $dayOfYear first day of year included in the week #1 - * - * @return int - */ - public function weeksInYear($dayOfWeek = null, $dayOfYear = null); - - /** - * Temporarily sets a static date to be used within the callback. - * Using setTestNow to set the date, executing the callback, then - * clearing the test instance. - * - * /!\ Use this method for unit tests only. - * - * @template T - * - * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance - * @param Closure(): T $callback - * - * @return T - */ - public static function withTestNow($testNow, $callback); - - /** - * Create a Carbon instance for yesterday. - * - * @param DateTimeZone|string|null $tz - * - * @return static - */ - public static function yesterday($tz = null); - - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php deleted file mode 100644 index 8437c54..0000000 --- a/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php +++ /dev/null @@ -1,3054 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Carbon\Exceptions\BadFluentConstructorException; -use Carbon\Exceptions\BadFluentSetterException; -use Carbon\Exceptions\InvalidCastException; -use Carbon\Exceptions\InvalidIntervalException; -use Carbon\Exceptions\OutOfRangeException; -use Carbon\Exceptions\ParseErrorException; -use Carbon\Exceptions\UnitNotConfiguredException; -use Carbon\Exceptions\UnknownGetterException; -use Carbon\Exceptions\UnknownSetterException; -use Carbon\Exceptions\UnknownUnitException; -use Carbon\Traits\IntervalRounding; -use Carbon\Traits\IntervalStep; -use Carbon\Traits\MagicParameter; -use Carbon\Traits\Mixin; -use Carbon\Traits\Options; -use Carbon\Traits\ToStringFormat; -use Closure; -use DateInterval; -use DateMalformedIntervalStringException; -use DateTimeInterface; -use DateTimeZone; -use Exception; -use InvalidArgumentException; -use ReflectionException; -use ReturnTypeWillChange; -use RuntimeException; -use Throwable; - -/** - * A simple API extension for DateInterval. - * The implementation provides helpers to handle weeks but only days are saved. - * Weeks are calculated based on the total days of the current instance. - * - * @property int $years Total years of the current interval. - * @property int $months Total months of the current interval. - * @property int $weeks Total weeks of the current interval calculated from the days. - * @property int $dayz Total days of the current interval (weeks * 7 + days). - * @property int $hours Total hours of the current interval. - * @property int $minutes Total minutes of the current interval. - * @property int $seconds Total seconds of the current interval. - * @property int $microseconds Total microseconds of the current interval. - * @property int $milliseconds Total milliseconds of the current interval. - * @property int $microExcludeMilli Remaining microseconds without the milliseconds. - * @property int $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7). - * @property int $daysExcludeWeeks alias of dayzExcludeWeeks - * @property-read float $totalYears Number of years equivalent to the interval. - * @property-read float $totalMonths Number of months equivalent to the interval. - * @property-read float $totalWeeks Number of weeks equivalent to the interval. - * @property-read float $totalDays Number of days equivalent to the interval. - * @property-read float $totalDayz Alias for totalDays. - * @property-read float $totalHours Number of hours equivalent to the interval. - * @property-read float $totalMinutes Number of minutes equivalent to the interval. - * @property-read float $totalSeconds Number of seconds equivalent to the interval. - * @property-read float $totalMilliseconds Number of milliseconds equivalent to the interval. - * @property-read float $totalMicroseconds Number of microseconds equivalent to the interval. - * @property-read string $locale locale of the current instance - * - * @method static CarbonInterval years($years = 1) Create instance specifying a number of years or modify the number of years if called on an instance. - * @method static CarbonInterval year($years = 1) Alias for years() - * @method static CarbonInterval months($months = 1) Create instance specifying a number of months or modify the number of months if called on an instance. - * @method static CarbonInterval month($months = 1) Alias for months() - * @method static CarbonInterval weeks($weeks = 1) Create instance specifying a number of weeks or modify the number of weeks if called on an instance. - * @method static CarbonInterval week($weeks = 1) Alias for weeks() - * @method static CarbonInterval days($days = 1) Create instance specifying a number of days or modify the number of days if called on an instance. - * @method static CarbonInterval dayz($days = 1) Alias for days() - * @method static CarbonInterval daysExcludeWeeks($days = 1) Create instance specifying a number of days or modify the number of days (keeping the current number of weeks) if called on an instance. - * @method static CarbonInterval dayzExcludeWeeks($days = 1) Alias for daysExcludeWeeks() - * @method static CarbonInterval day($days = 1) Alias for days() - * @method static CarbonInterval hours($hours = 1) Create instance specifying a number of hours or modify the number of hours if called on an instance. - * @method static CarbonInterval hour($hours = 1) Alias for hours() - * @method static CarbonInterval minutes($minutes = 1) Create instance specifying a number of minutes or modify the number of minutes if called on an instance. - * @method static CarbonInterval minute($minutes = 1) Alias for minutes() - * @method static CarbonInterval seconds($seconds = 1) Create instance specifying a number of seconds or modify the number of seconds if called on an instance. - * @method static CarbonInterval second($seconds = 1) Alias for seconds() - * @method static CarbonInterval milliseconds($milliseconds = 1) Create instance specifying a number of milliseconds or modify the number of milliseconds if called on an instance. - * @method static CarbonInterval millisecond($milliseconds = 1) Alias for milliseconds() - * @method static CarbonInterval microseconds($microseconds = 1) Create instance specifying a number of microseconds or modify the number of microseconds if called on an instance. - * @method static CarbonInterval microsecond($microseconds = 1) Alias for microseconds() - * @method $this addYears(int $years) Add given number of years to the current interval - * @method $this subYears(int $years) Subtract given number of years to the current interval - * @method $this addMonths(int $months) Add given number of months to the current interval - * @method $this subMonths(int $months) Subtract given number of months to the current interval - * @method $this addWeeks(int|float $weeks) Add given number of weeks to the current interval - * @method $this subWeeks(int|float $weeks) Subtract given number of weeks to the current interval - * @method $this addDays(int|float $days) Add given number of days to the current interval - * @method $this subDays(int|float $days) Subtract given number of days to the current interval - * @method $this addHours(int|float $hours) Add given number of hours to the current interval - * @method $this subHours(int|float $hours) Subtract given number of hours to the current interval - * @method $this addMinutes(int|float $minutes) Add given number of minutes to the current interval - * @method $this subMinutes(int|float $minutes) Subtract given number of minutes to the current interval - * @method $this addSeconds(int|float $seconds) Add given number of seconds to the current interval - * @method $this subSeconds(int|float $seconds) Subtract given number of seconds to the current interval - * @method $this addMilliseconds(int|float $milliseconds) Add given number of milliseconds to the current interval - * @method $this subMilliseconds(int|float $milliseconds) Subtract given number of milliseconds to the current interval - * @method $this addMicroseconds(int|float $microseconds) Add given number of microseconds to the current interval - * @method $this subMicroseconds(int|float $microseconds) Subtract given number of microseconds to the current interval - * @method $this roundYear(int|float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method $this roundYears(int|float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method $this floorYear(int|float $precision = 1) Truncate the current instance year with given precision. - * @method $this floorYears(int|float $precision = 1) Truncate the current instance year with given precision. - * @method $this ceilYear(int|float $precision = 1) Ceil the current instance year with given precision. - * @method $this ceilYears(int|float $precision = 1) Ceil the current instance year with given precision. - * @method $this roundMonth(int|float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method $this roundMonths(int|float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method $this floorMonth(int|float $precision = 1) Truncate the current instance month with given precision. - * @method $this floorMonths(int|float $precision = 1) Truncate the current instance month with given precision. - * @method $this ceilMonth(int|float $precision = 1) Ceil the current instance month with given precision. - * @method $this ceilMonths(int|float $precision = 1) Ceil the current instance month with given precision. - * @method $this roundWeek(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this roundWeeks(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this floorWeek(int|float $precision = 1) Truncate the current instance day with given precision. - * @method $this floorWeeks(int|float $precision = 1) Truncate the current instance day with given precision. - * @method $this ceilWeek(int|float $precision = 1) Ceil the current instance day with given precision. - * @method $this ceilWeeks(int|float $precision = 1) Ceil the current instance day with given precision. - * @method $this roundDay(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this roundDays(int|float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this floorDay(int|float $precision = 1) Truncate the current instance day with given precision. - * @method $this floorDays(int|float $precision = 1) Truncate the current instance day with given precision. - * @method $this ceilDay(int|float $precision = 1) Ceil the current instance day with given precision. - * @method $this ceilDays(int|float $precision = 1) Ceil the current instance day with given precision. - * @method $this roundHour(int|float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method $this roundHours(int|float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method $this floorHour(int|float $precision = 1) Truncate the current instance hour with given precision. - * @method $this floorHours(int|float $precision = 1) Truncate the current instance hour with given precision. - * @method $this ceilHour(int|float $precision = 1) Ceil the current instance hour with given precision. - * @method $this ceilHours(int|float $precision = 1) Ceil the current instance hour with given precision. - * @method $this roundMinute(int|float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method $this roundMinutes(int|float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method $this floorMinute(int|float $precision = 1) Truncate the current instance minute with given precision. - * @method $this floorMinutes(int|float $precision = 1) Truncate the current instance minute with given precision. - * @method $this ceilMinute(int|float $precision = 1) Ceil the current instance minute with given precision. - * @method $this ceilMinutes(int|float $precision = 1) Ceil the current instance minute with given precision. - * @method $this roundSecond(int|float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method $this roundSeconds(int|float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method $this floorSecond(int|float $precision = 1) Truncate the current instance second with given precision. - * @method $this floorSeconds(int|float $precision = 1) Truncate the current instance second with given precision. - * @method $this ceilSecond(int|float $precision = 1) Ceil the current instance second with given precision. - * @method $this ceilSeconds(int|float $precision = 1) Ceil the current instance second with given precision. - * @method $this roundMillennium(int|float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method $this roundMillennia(int|float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method $this floorMillennium(int|float $precision = 1) Truncate the current instance millennium with given precision. - * @method $this floorMillennia(int|float $precision = 1) Truncate the current instance millennium with given precision. - * @method $this ceilMillennium(int|float $precision = 1) Ceil the current instance millennium with given precision. - * @method $this ceilMillennia(int|float $precision = 1) Ceil the current instance millennium with given precision. - * @method $this roundCentury(int|float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method $this roundCenturies(int|float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method $this floorCentury(int|float $precision = 1) Truncate the current instance century with given precision. - * @method $this floorCenturies(int|float $precision = 1) Truncate the current instance century with given precision. - * @method $this ceilCentury(int|float $precision = 1) Ceil the current instance century with given precision. - * @method $this ceilCenturies(int|float $precision = 1) Ceil the current instance century with given precision. - * @method $this roundDecade(int|float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method $this roundDecades(int|float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method $this floorDecade(int|float $precision = 1) Truncate the current instance decade with given precision. - * @method $this floorDecades(int|float $precision = 1) Truncate the current instance decade with given precision. - * @method $this ceilDecade(int|float $precision = 1) Ceil the current instance decade with given precision. - * @method $this ceilDecades(int|float $precision = 1) Ceil the current instance decade with given precision. - * @method $this roundQuarter(int|float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method $this roundQuarters(int|float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method $this floorQuarter(int|float $precision = 1) Truncate the current instance quarter with given precision. - * @method $this floorQuarters(int|float $precision = 1) Truncate the current instance quarter with given precision. - * @method $this ceilQuarter(int|float $precision = 1) Ceil the current instance quarter with given precision. - * @method $this ceilQuarters(int|float $precision = 1) Ceil the current instance quarter with given precision. - * @method $this roundMillisecond(int|float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method $this roundMilliseconds(int|float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method $this floorMillisecond(int|float $precision = 1) Truncate the current instance millisecond with given precision. - * @method $this floorMilliseconds(int|float $precision = 1) Truncate the current instance millisecond with given precision. - * @method $this ceilMillisecond(int|float $precision = 1) Ceil the current instance millisecond with given precision. - * @method $this ceilMilliseconds(int|float $precision = 1) Ceil the current instance millisecond with given precision. - * @method $this roundMicrosecond(int|float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method $this roundMicroseconds(int|float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method $this floorMicrosecond(int|float $precision = 1) Truncate the current instance microsecond with given precision. - * @method $this floorMicroseconds(int|float $precision = 1) Truncate the current instance microsecond with given precision. - * @method $this ceilMicrosecond(int|float $precision = 1) Ceil the current instance microsecond with given precision. - * @method $this ceilMicroseconds(int|float $precision = 1) Ceil the current instance microsecond with given precision. - */ -class CarbonInterval extends DateInterval implements CarbonConverterInterface -{ - use IntervalRounding; - use IntervalStep; - use MagicParameter; - use Mixin { - Mixin::mixin as baseMixin; - } - use Options; - use ToStringFormat; - - /** - * Interval spec period designators - */ - public const PERIOD_PREFIX = 'P'; - public const PERIOD_YEARS = 'Y'; - public const PERIOD_MONTHS = 'M'; - public const PERIOD_DAYS = 'D'; - public const PERIOD_TIME_PREFIX = 'T'; - public const PERIOD_HOURS = 'H'; - public const PERIOD_MINUTES = 'M'; - public const PERIOD_SECONDS = 'S'; - - /** - * A translator to ... er ... translate stuff - * - * @var \Symfony\Component\Translation\TranslatorInterface - */ - protected static $translator; - - /** - * @var array|null - */ - protected static $cascadeFactors; - - /** - * @var array - */ - protected static $formats = [ - 'y' => 'y', - 'Y' => 'y', - 'o' => 'y', - 'm' => 'm', - 'n' => 'm', - 'W' => 'weeks', - 'd' => 'd', - 'j' => 'd', - 'z' => 'd', - 'h' => 'h', - 'g' => 'h', - 'H' => 'h', - 'G' => 'h', - 'i' => 'i', - 's' => 's', - 'u' => 'micro', - 'v' => 'milli', - ]; - - /** - * @var array|null - */ - private static $flipCascadeFactors; - - /** - * @var bool - */ - private static $floatSettersEnabled = false; - - /** - * The registered macros. - * - * @var array - */ - protected static $macros = []; - - /** - * Timezone handler for settings() method. - * - * @var mixed - */ - protected $tzName; - - /** - * Set the instance's timezone from a string or object. - * - * @param \DateTimeZone|string $tzName - * - * @return static - */ - public function setTimezone($tzName) - { - $this->tzName = $tzName; - - return $this; - } - - /** - * @internal - * - * Set the instance's timezone from a string or object and add/subtract the offset difference. - * - * @param \DateTimeZone|string $tzName - * - * @return static - */ - public function shiftTimezone($tzName) - { - $this->tzName = $tzName; - - return $this; - } - - /** - * Mapping of units and factors for cascading. - * - * Should only be modified by changing the factors or referenced constants. - * - * @return array - */ - public static function getCascadeFactors() - { - return static::$cascadeFactors ?: static::getDefaultCascadeFactors(); - } - - protected static function getDefaultCascadeFactors(): array - { - return [ - 'milliseconds' => [Carbon::MICROSECONDS_PER_MILLISECOND, 'microseconds'], - 'seconds' => [Carbon::MILLISECONDS_PER_SECOND, 'milliseconds'], - 'minutes' => [Carbon::SECONDS_PER_MINUTE, 'seconds'], - 'hours' => [Carbon::MINUTES_PER_HOUR, 'minutes'], - 'dayz' => [Carbon::HOURS_PER_DAY, 'hours'], - 'weeks' => [Carbon::DAYS_PER_WEEK, 'dayz'], - 'months' => [Carbon::WEEKS_PER_MONTH, 'weeks'], - 'years' => [Carbon::MONTHS_PER_YEAR, 'months'], - ]; - } - - private static function standardizeUnit($unit) - { - $unit = rtrim($unit, 'sz').'s'; - - return $unit === 'days' ? 'dayz' : $unit; - } - - private static function getFlipCascadeFactors() - { - if (!self::$flipCascadeFactors) { - self::$flipCascadeFactors = []; - - foreach (static::getCascadeFactors() as $to => [$factor, $from]) { - self::$flipCascadeFactors[self::standardizeUnit($from)] = [self::standardizeUnit($to), $factor]; - } - } - - return self::$flipCascadeFactors; - } - - /** - * Set default cascading factors for ->cascade() method. - * - * @param array $cascadeFactors - */ - public static function setCascadeFactors(array $cascadeFactors) - { - self::$flipCascadeFactors = null; - static::$cascadeFactors = $cascadeFactors; - } - - /** - * This option allow you to opt-in for the Carbon 3 behavior where float - * values will no longer be cast to integer (so truncated). - * - * ⚠️ This settings will be applied globally, which mean your whole application - * code including the third-party dependencies that also may use Carbon will - * adopt the new behavior. - */ - public static function enableFloatSetters(bool $floatSettersEnabled = true): void - { - self::$floatSettersEnabled = $floatSettersEnabled; - } - - /////////////////////////////////////////////////////////////////// - //////////////////////////// CONSTRUCTORS ///////////////////////// - /////////////////////////////////////////////////////////////////// - - /** - * Create a new CarbonInterval instance. - * - * @param Closure|DateInterval|string|int|null $years - * @param int|float|null $months - * @param int|float|null $weeks - * @param int|float|null $days - * @param int|float|null $hours - * @param int|float|null $minutes - * @param int|float|null $seconds - * @param int|float|null $microseconds - * - * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. - */ - public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null, $microseconds = null) - { - if ($years instanceof Closure) { - $this->step = $years; - $years = null; - } - - if ($years instanceof DateInterval) { - parent::__construct(static::getDateIntervalSpec($years)); - $this->f = $years->f; - self::copyNegativeUnits($years, $this); - - return; - } - - $spec = $years; - $isStringSpec = (\is_string($spec) && !preg_match('/^[\d.]/', $spec)); - - if (!$isStringSpec || (float) $years) { - $spec = static::PERIOD_PREFIX; - - $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; - $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; - - $specDays = 0; - $specDays += $weeks > 0 ? $weeks * static::getDaysPerWeek() : 0; - $specDays += $days > 0 ? $days : 0; - - $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; - - if ($hours > 0 || $minutes > 0 || $seconds > 0) { - $spec .= static::PERIOD_TIME_PREFIX; - $spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : ''; - $spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : ''; - $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; - } - - if ($spec === static::PERIOD_PREFIX) { - // Allow the zero interval. - $spec .= '0'.static::PERIOD_YEARS; - } - } - - try { - parent::__construct($spec); - } catch (Throwable $exception) { - try { - parent::__construct('PT0S'); - - if ($isStringSpec) { - if (!preg_match('/^P - (?:(?[+-]?\d*(?:\.\d+)?)Y)? - (?:(?[+-]?\d*(?:\.\d+)?)M)? - (?:(?[+-]?\d*(?:\.\d+)?)W)? - (?:(?[+-]?\d*(?:\.\d+)?)D)? - (?:T - (?:(?[+-]?\d*(?:\.\d+)?)H)? - (?:(?[+-]?\d*(?:\.\d+)?)M)? - (?:(?[+-]?\d*(?:\.\d+)?)S)? - )? - $/x', $spec, $match)) { - throw new InvalidArgumentException("Invalid duration: $spec"); - } - - $years = (float) ($match['year'] ?? 0); - $this->assertSafeForInteger('year', $years); - $months = (float) ($match['month'] ?? 0); - $this->assertSafeForInteger('month', $months); - $weeks = (float) ($match['week'] ?? 0); - $this->assertSafeForInteger('week', $weeks); - $days = (float) ($match['day'] ?? 0); - $this->assertSafeForInteger('day', $days); - $hours = (float) ($match['hour'] ?? 0); - $this->assertSafeForInteger('hour', $hours); - $minutes = (float) ($match['minute'] ?? 0); - $this->assertSafeForInteger('minute', $minutes); - $seconds = (float) ($match['second'] ?? 0); - $this->assertSafeForInteger('second', $seconds); - } - - $totalDays = (($weeks * static::getDaysPerWeek()) + $days); - $this->assertSafeForInteger('days total (including weeks)', $totalDays); - - $this->y = (int) $years; - $this->m = (int) $months; - $this->d = (int) $totalDays; - $this->h = (int) $hours; - $this->i = (int) $minutes; - $this->s = (int) $seconds; - - if ( - ((float) $this->y) !== $years || - ((float) $this->m) !== $months || - ((float) $this->d) !== $totalDays || - ((float) $this->h) !== $hours || - ((float) $this->i) !== $minutes || - ((float) $this->s) !== $seconds - ) { - $this->add(static::fromString( - ($years - $this->y).' years '. - ($months - $this->m).' months '. - ($totalDays - $this->d).' days '. - ($hours - $this->h).' hours '. - ($minutes - $this->i).' minutes '. - ($seconds - $this->s).' seconds ' - )); - } - } catch (Throwable $secondException) { - throw $secondException instanceof OutOfRangeException ? $secondException : $exception; - } - } - - if ($microseconds !== null) { - $this->f = $microseconds / Carbon::MICROSECONDS_PER_SECOND; - } - } - - /** - * Returns the factor for a given source-to-target couple. - * - * @param string $source - * @param string $target - * - * @return int|float|null - */ - public static function getFactor($source, $target) - { - $source = self::standardizeUnit($source); - $target = self::standardizeUnit($target); - $factors = self::getFlipCascadeFactors(); - - if (isset($factors[$source])) { - [$to, $factor] = $factors[$source]; - - if ($to === $target) { - return $factor; - } - - return $factor * static::getFactor($to, $target); - } - - return null; - } - - /** - * Returns the factor for a given source-to-target couple if set, - * else try to find the appropriate constant as the factor, such as Carbon::DAYS_PER_WEEK. - * - * @param string $source - * @param string $target - * - * @return int|float|null - */ - public static function getFactorWithDefault($source, $target) - { - $factor = self::getFactor($source, $target); - - if ($factor) { - return $factor; - } - - static $defaults = [ - 'month' => ['year' => Carbon::MONTHS_PER_YEAR], - 'week' => ['month' => Carbon::WEEKS_PER_MONTH], - 'day' => ['week' => Carbon::DAYS_PER_WEEK], - 'hour' => ['day' => Carbon::HOURS_PER_DAY], - 'minute' => ['hour' => Carbon::MINUTES_PER_HOUR], - 'second' => ['minute' => Carbon::SECONDS_PER_MINUTE], - 'millisecond' => ['second' => Carbon::MILLISECONDS_PER_SECOND], - 'microsecond' => ['millisecond' => Carbon::MICROSECONDS_PER_MILLISECOND], - ]; - - return $defaults[$source][$target] ?? null; - } - - /** - * Returns current config for days per week. - * - * @return int|float - */ - public static function getDaysPerWeek() - { - return static::getFactor('dayz', 'weeks') ?: Carbon::DAYS_PER_WEEK; - } - - /** - * Returns current config for hours per day. - * - * @return int|float - */ - public static function getHoursPerDay() - { - return static::getFactor('hours', 'dayz') ?: Carbon::HOURS_PER_DAY; - } - - /** - * Returns current config for minutes per hour. - * - * @return int|float - */ - public static function getMinutesPerHour() - { - return static::getFactor('minutes', 'hours') ?: Carbon::MINUTES_PER_HOUR; - } - - /** - * Returns current config for seconds per minute. - * - * @return int|float - */ - public static function getSecondsPerMinute() - { - return static::getFactor('seconds', 'minutes') ?: Carbon::SECONDS_PER_MINUTE; - } - - /** - * Returns current config for microseconds per second. - * - * @return int|float - */ - public static function getMillisecondsPerSecond() - { - return static::getFactor('milliseconds', 'seconds') ?: Carbon::MILLISECONDS_PER_SECOND; - } - - /** - * Returns current config for microseconds per second. - * - * @return int|float - */ - public static function getMicrosecondsPerMillisecond() - { - return static::getFactor('microseconds', 'milliseconds') ?: Carbon::MICROSECONDS_PER_MILLISECOND; - } - - /** - * Create a new CarbonInterval instance from specific values. - * This is an alias for the constructor that allows better fluent - * syntax as it allows you to do CarbonInterval::create(1)->fn() rather than - * (new CarbonInterval(1))->fn(). - * - * @param int $years - * @param int $months - * @param int $weeks - * @param int $days - * @param int $hours - * @param int $minutes - * @param int $seconds - * @param int $microseconds - * - * @throws Exception when the interval_spec (passed as $years) cannot be parsed as an interval. - * - * @return static - */ - public static function create($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null, $microseconds = null) - { - return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds, $microseconds); - } - - /** - * Parse a string into a new CarbonInterval object according to the specified format. - * - * @example - * ``` - * echo Carboninterval::createFromFormat('H:i', '1:30'); - * ``` - * - * @param string $format Format of the $interval input string - * @param string|null $interval Input string to convert into an interval - * - * @throws \Carbon\Exceptions\ParseErrorException when the $interval cannot be parsed as an interval. - * - * @return static - */ - public static function createFromFormat(string $format, ?string $interval) - { - $instance = new static(0); - $length = mb_strlen($format); - - if (preg_match('/s([,.])([uv])$/', $format, $match)) { - $interval = explode($match[1], $interval); - $index = \count($interval) - 1; - $interval[$index] = str_pad($interval[$index], $match[2] === 'v' ? 3 : 6, '0'); - $interval = implode($match[1], $interval); - } - - $interval = $interval ?? ''; - - for ($index = 0; $index < $length; $index++) { - $expected = mb_substr($format, $index, 1); - $nextCharacter = mb_substr($interval, 0, 1); - $unit = static::$formats[$expected] ?? null; - - if ($unit) { - if (!preg_match('/^-?\d+/', $interval, $match)) { - throw new ParseErrorException('number', $nextCharacter); - } - - $interval = mb_substr($interval, mb_strlen($match[0])); - $instance->$unit += (int) ($match[0]); - - continue; - } - - if ($nextCharacter !== $expected) { - throw new ParseErrorException( - "'$expected'", - $nextCharacter, - 'Allowed substitutes for interval formats are '.implode(', ', array_keys(static::$formats))."\n". - 'See https://php.net/manual/en/function.date.php for their meaning' - ); - } - - $interval = mb_substr($interval, 1); - } - - if ($interval !== '') { - throw new ParseErrorException( - 'end of string', - $interval - ); - } - - return $instance; - } - - /** - * Get a copy of the instance. - * - * @return static - */ - public function copy() - { - $date = new static(0); - $date->copyProperties($this); - $date->step = $this->step; - - return $date; - } - - /** - * Get a copy of the instance. - * - * @return static - */ - public function clone() - { - return $this->copy(); - } - - /** - * Provide static helpers to create instances. Allows CarbonInterval::years(3). - * - * Note: This is done using the magic method to allow static and instance methods to - * have the same names. - * - * @param string $method magic method name called - * @param array $parameters parameters list - * - * @return static|null - */ - public static function __callStatic($method, $parameters) - { - try { - $interval = new static(0); - $localStrictModeEnabled = $interval->localStrictModeEnabled; - $interval->localStrictModeEnabled = true; - - $result = static::hasMacro($method) - ? static::bindMacroContext(null, function () use (&$method, &$parameters, &$interval) { - return $interval->callMacro($method, $parameters); - }) - : $interval->$method(...$parameters); - - $interval->localStrictModeEnabled = $localStrictModeEnabled; - - return $result; - } catch (BadFluentSetterException $exception) { - if (Carbon::isStrictModeEnabled()) { - throw new BadFluentConstructorException($method, 0, $exception); - } - - return null; - } - } - - /** - * Evaluate the PHP generated by var_export() and recreate the exported CarbonInterval instance. - * - * @param array $dump data as exported by var_export() - * - * @return static - */ - #[ReturnTypeWillChange] - public static function __set_state($dump) - { - /** @noinspection PhpVoidFunctionResultUsedInspection */ - /** @var DateInterval $dateInterval */ - $dateInterval = parent::__set_state($dump); - - return static::instance($dateInterval); - } - - /** - * Return the current context from inside a macro callee or a new one if static. - * - * @return static - */ - protected static function this() - { - return end(static::$macroContextStack) ?: new static(0); - } - - /** - * Creates a CarbonInterval from string. - * - * Format: - * - * Suffix | Unit | Example | DateInterval expression - * -------|---------|---------|------------------------ - * y | years | 1y | P1Y - * mo | months | 3mo | P3M - * w | weeks | 2w | P2W - * d | days | 28d | P28D - * h | hours | 4h | PT4H - * m | minutes | 12m | PT12M - * s | seconds | 59s | PT59S - * - * e. g. `1w 3d 4h 32m 23s` is converted to 10 days 4 hours 32 minutes and 23 seconds. - * - * Special cases: - * - An empty string will return a zero interval - * - Fractions are allowed for weeks, days, hours and minutes and will be converted - * and rounded to the next smaller value (caution: 0.5w = 4d) - * - * @param string $intervalDefinition - * - * @return static - */ - public static function fromString($intervalDefinition) - { - if (empty($intervalDefinition)) { - return new static(0); - } - - $years = 0; - $months = 0; - $weeks = 0; - $days = 0; - $hours = 0; - $minutes = 0; - $seconds = 0; - $milliseconds = 0; - $microseconds = 0; - - $pattern = '/(\d+(?:\.\d+)?)\h*([^\d\h]*)/i'; - preg_match_all($pattern, $intervalDefinition, $parts, PREG_SET_ORDER); - - while ([$part, $value, $unit] = array_shift($parts)) { - $intValue = (int) $value; - $fraction = (float) $value - $intValue; - - // Fix calculation precision - switch (round($fraction, 6)) { - case 1: - $fraction = 0; - $intValue++; - - break; - case 0: - $fraction = 0; - - break; - } - - switch ($unit === 'µs' ? 'µs' : strtolower($unit)) { - case 'millennia': - case 'millennium': - $years += $intValue * CarbonInterface::YEARS_PER_MILLENNIUM; - - break; - - case 'century': - case 'centuries': - $years += $intValue * CarbonInterface::YEARS_PER_CENTURY; - - break; - - case 'decade': - case 'decades': - $years += $intValue * CarbonInterface::YEARS_PER_DECADE; - - break; - - case 'year': - case 'years': - case 'y': - case 'yr': - case 'yrs': - $years += $intValue; - - break; - - case 'quarter': - case 'quarters': - $months += $intValue * CarbonInterface::MONTHS_PER_QUARTER; - - break; - - case 'month': - case 'months': - case 'mo': - case 'mos': - $months += $intValue; - - break; - - case 'week': - case 'weeks': - case 'w': - $weeks += $intValue; - - if ($fraction) { - $parts[] = [null, $fraction * static::getDaysPerWeek(), 'd']; - } - - break; - - case 'day': - case 'days': - case 'd': - $days += $intValue; - - if ($fraction) { - $parts[] = [null, $fraction * static::getHoursPerDay(), 'h']; - } - - break; - - case 'hour': - case 'hours': - case 'h': - $hours += $intValue; - - if ($fraction) { - $parts[] = [null, $fraction * static::getMinutesPerHour(), 'm']; - } - - break; - - case 'minute': - case 'minutes': - case 'm': - $minutes += $intValue; - - if ($fraction) { - $parts[] = [null, $fraction * static::getSecondsPerMinute(), 's']; - } - - break; - - case 'second': - case 'seconds': - case 's': - $seconds += $intValue; - - if ($fraction) { - $parts[] = [null, $fraction * static::getMillisecondsPerSecond(), 'ms']; - } - - break; - - case 'millisecond': - case 'milliseconds': - case 'milli': - case 'ms': - $milliseconds += $intValue; - - if ($fraction) { - $microseconds += round($fraction * static::getMicrosecondsPerMillisecond()); - } - - break; - - case 'microsecond': - case 'microseconds': - case 'micro': - case 'µs': - $microseconds += $intValue; - - break; - - default: - throw new InvalidIntervalException( - sprintf('Invalid part %s in definition %s', $part, $intervalDefinition) - ); - } - } - - return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds, $milliseconds * Carbon::MICROSECONDS_PER_MILLISECOND + $microseconds); - } - - /** - * Creates a CarbonInterval from string using a different locale. - * - * @param string $interval interval string in the given language (may also contain English). - * @param string|null $locale if locale is null or not specified, current global locale will be used instead. - * - * @return static - */ - public static function parseFromLocale($interval, $locale = null) - { - return static::fromString(Carbon::translateTimeString($interval, $locale ?: static::getLocale(), 'en')); - } - - private static function castIntervalToClass(DateInterval $interval, string $className, array $skip = []) - { - $mainClass = DateInterval::class; - - if (!is_a($className, $mainClass, true)) { - throw new InvalidCastException("$className is not a sub-class of $mainClass."); - } - - $microseconds = $interval->f; - $instance = new $className(static::getDateIntervalSpec($interval, false, $skip)); - - if ($microseconds) { - $instance->f = $microseconds; - } - - if ($interval instanceof self && is_a($className, self::class, true)) { - self::copyStep($interval, $instance); - } - - self::copyNegativeUnits($interval, $instance); - - return $instance; - } - - private static function copyNegativeUnits(DateInterval $from, DateInterval $to): void - { - $to->invert = $from->invert; - - foreach (['y', 'm', 'd', 'h', 'i', 's'] as $unit) { - if ($from->$unit < 0) { - $to->$unit *= -1; - } - } - } - - private static function copyStep(self $from, self $to): void - { - $to->setStep($from->getStep()); - } - - /** - * Cast the current instance into the given class. - * - * @param string $className The $className::instance() method will be called to cast the current object. - * - * @return DateInterval - */ - public function cast(string $className) - { - return self::castIntervalToClass($this, $className); - } - - /** - * Create a CarbonInterval instance from a DateInterval one. Can not instance - * DateInterval objects created from DateTime::diff() as you can't externally - * set the $days field. - * - * @param DateInterval $interval - * @param bool $skipCopy set to true to return the passed object - * (without copying it) if it's already of the - * current class - * - * @return static - */ - public static function instance(DateInterval $interval, array $skip = [], bool $skipCopy = false) - { - if ($skipCopy && $interval instanceof static) { - return $interval; - } - - return self::castIntervalToClass($interval, static::class, $skip); - } - - /** - * Make a CarbonInterval instance from given variable if possible. - * - * Always return a new instance. Parse only strings and only these likely to be intervals (skip dates - * and recurrences). Throw an exception for invalid format, but otherwise return null. - * - * @param mixed|int|DateInterval|string|Closure|null $interval interval or number of the given $unit - * @param string|null $unit if specified, $interval must be an integer - * @param bool $skipCopy set to true to return the passed object - * (without copying it) if it's already of the - * current class - * - * @return static|null - */ - public static function make($interval, $unit = null, bool $skipCopy = false) - { - if ($unit) { - $interval = "$interval ".Carbon::pluralUnit($unit); - } - - if ($interval instanceof DateInterval) { - return static::instance($interval, [], $skipCopy); - } - - if ($interval instanceof Closure) { - return new static($interval); - } - - if (!\is_string($interval)) { - return null; - } - - return static::makeFromString($interval); - } - - protected static function makeFromString(string $interval) - { - $interval = preg_replace('/\s+/', ' ', trim($interval)); - - if (preg_match('/^P[T\d]/', $interval)) { - return new static($interval); - } - - if (preg_match('/^(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+$/i', $interval)) { - return static::fromString($interval); - } - - // @codeCoverageIgnoreStart - try { - /** @var static $interval */ - $interval = static::createFromDateString($interval); - } catch (DateMalformedIntervalStringException $e) { - return null; - } - // @codeCoverageIgnoreEnd - - return !$interval || $interval->isEmpty() ? null : $interval; - } - - protected function resolveInterval($interval) - { - if (!($interval instanceof self)) { - return self::make($interval); - } - - return $interval; - } - - /** - * Sets up a DateInterval from the relative parts of the string. - * - * @param string $time - * - * @return static - * - * @link https://php.net/manual/en/dateinterval.createfromdatestring.php - */ - #[ReturnTypeWillChange] - public static function createFromDateString($time) - { - $interval = @parent::createFromDateString(strtr($time, [ - ',' => ' ', - ' and ' => ' ', - ])); - - if ($interval instanceof DateInterval) { - $interval = static::instance($interval); - } - - return $interval; - } - - /////////////////////////////////////////////////////////////////// - ///////////////////////// GETTERS AND SETTERS ///////////////////// - /////////////////////////////////////////////////////////////////// - - /** - * Get a part of the CarbonInterval object. - * - * @param string $name - * - * @throws UnknownGetterException - * - * @return int|float|string - */ - public function get($name) - { - if (str_starts_with($name, 'total')) { - return $this->total(substr($name, 5)); - } - - switch ($name) { - case 'years': - return $this->y; - - case 'months': - return $this->m; - - case 'dayz': - return $this->d; - - case 'hours': - return $this->h; - - case 'minutes': - return $this->i; - - case 'seconds': - return $this->s; - - case 'milli': - case 'milliseconds': - return (int) (round($this->f * Carbon::MICROSECONDS_PER_SECOND) / Carbon::MICROSECONDS_PER_MILLISECOND); - - case 'micro': - case 'microseconds': - return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND); - - case 'microExcludeMilli': - return (int) round($this->f * Carbon::MICROSECONDS_PER_SECOND) % Carbon::MICROSECONDS_PER_MILLISECOND; - - case 'weeks': - return (int) ($this->d / (int) static::getDaysPerWeek()); - - case 'daysExcludeWeeks': - case 'dayzExcludeWeeks': - return $this->d % (int) static::getDaysPerWeek(); - - case 'locale': - return $this->getTranslatorLocale(); - - default: - throw new UnknownGetterException($name); - } - } - - /** - * Get a part of the CarbonInterval object. - * - * @param string $name - * - * @throws UnknownGetterException - * - * @return int|float|string - */ - public function __get($name) - { - return $this->get($name); - } - - /** - * Set a part of the CarbonInterval object. - * - * @param string|array $name - * @param int $value - * - * @throws UnknownSetterException - * - * @return $this - */ - public function set($name, $value = null) - { - $properties = \is_array($name) ? $name : [$name => $value]; - - foreach ($properties as $key => $value) { - switch (Carbon::singularUnit(rtrim($key, 'z'))) { - case 'year': - $this->checkIntegerValue($key, $value); - $this->y = $value; - $this->handleDecimalPart('year', $value, $this->y); - - break; - - case 'month': - $this->checkIntegerValue($key, $value); - $this->m = $value; - $this->handleDecimalPart('month', $value, $this->m); - - break; - - case 'week': - $this->checkIntegerValue($key, $value); - $days = $value * (int) static::getDaysPerWeek(); - $this->assertSafeForInteger('days total (including weeks)', $days); - $this->d = $days; - $this->handleDecimalPart('day', $days, $this->d); - - break; - - case 'day': - $this->checkIntegerValue($key, $value); - $this->d = $value; - $this->handleDecimalPart('day', $value, $this->d); - - break; - - case 'daysexcludeweek': - case 'dayzexcludeweek': - $this->checkIntegerValue($key, $value); - $days = $this->weeks * (int) static::getDaysPerWeek() + $value; - $this->assertSafeForInteger('days total (including weeks)', $days); - $this->d = $days; - $this->handleDecimalPart('day', $days, $this->d); - - break; - - case 'hour': - $this->checkIntegerValue($key, $value); - $this->h = $value; - $this->handleDecimalPart('hour', $value, $this->h); - - break; - - case 'minute': - $this->checkIntegerValue($key, $value); - $this->i = $value; - $this->handleDecimalPart('minute', $value, $this->i); - - break; - - case 'second': - $this->checkIntegerValue($key, $value); - $this->s = $value; - $this->handleDecimalPart('second', $value, $this->s); - - break; - - case 'milli': - case 'millisecond': - $this->microseconds = $value * Carbon::MICROSECONDS_PER_MILLISECOND + $this->microseconds % Carbon::MICROSECONDS_PER_MILLISECOND; - - break; - - case 'micro': - case 'microsecond': - $this->f = $value / Carbon::MICROSECONDS_PER_SECOND; - - break; - - default: - if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { - throw new UnknownSetterException($key); - } - - $this->$key = $value; - } - } - - return $this; - } - - /** - * Set a part of the CarbonInterval object. - * - * @param string $name - * @param int $value - * - * @throws UnknownSetterException - */ - public function __set($name, $value) - { - $this->set($name, $value); - } - - /** - * Allow setting of weeks and days to be cumulative. - * - * @param int $weeks Number of weeks to set - * @param int $days Number of days to set - * - * @return static - */ - public function weeksAndDays($weeks, $days) - { - $this->dayz = ($weeks * static::getDaysPerWeek()) + $days; - - return $this; - } - - /** - * Returns true if the interval is empty for each unit. - * - * @return bool - */ - public function isEmpty() - { - return $this->years === 0 && - $this->months === 0 && - $this->dayz === 0 && - !$this->days && - $this->hours === 0 && - $this->minutes === 0 && - $this->seconds === 0 && - $this->microseconds === 0; - } - - /** - * Register a custom macro. - * - * @example - * ``` - * CarbonInterval::macro('twice', function () { - * return $this->times(2); - * }); - * echo CarbonInterval::hours(2)->twice(); - * ``` - * - * @param string $name - * @param object|callable $macro - * - * @return void - */ - public static function macro($name, $macro) - { - static::$macros[$name] = $macro; - } - - /** - * Register macros from a mixin object. - * - * @example - * ``` - * CarbonInterval::mixin(new class { - * public function daysToHours() { - * return function () { - * $this->hours += $this->days; - * $this->days = 0; - * - * return $this; - * }; - * } - * public function hoursToDays() { - * return function () { - * $this->days += $this->hours; - * $this->hours = 0; - * - * return $this; - * }; - * } - * }); - * echo CarbonInterval::hours(5)->hoursToDays() . "\n"; - * echo CarbonInterval::days(5)->daysToHours() . "\n"; - * ``` - * - * @param object|string $mixin - * - * @throws ReflectionException - * - * @return void - */ - public static function mixin($mixin) - { - static::baseMixin($mixin); - } - - /** - * Check if macro is registered. - * - * @param string $name - * - * @return bool - */ - public static function hasMacro($name) - { - return isset(static::$macros[$name]); - } - - /** - * Call given macro. - * - * @param string $name - * @param array $parameters - * - * @return mixed - */ - protected function callMacro($name, $parameters) - { - $macro = static::$macros[$name]; - - if ($macro instanceof Closure) { - $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); - - return ($boundMacro ?: $macro)(...$parameters); - } - - return $macro(...$parameters); - } - - /** - * Allow fluent calls on the setters... CarbonInterval::years(3)->months(5)->day(). - * - * Note: This is done using the magic method to allow static and instance methods to - * have the same names. - * - * @param string $method magic method name called - * @param array $parameters parameters list - * - * @throws BadFluentSetterException|Throwable - * - * @return static - */ - public function __call($method, $parameters) - { - if (static::hasMacro($method)) { - return static::bindMacroContext($this, function () use (&$method, &$parameters) { - return $this->callMacro($method, $parameters); - }); - } - - $roundedValue = $this->callRoundMethod($method, $parameters); - - if ($roundedValue !== null) { - return $roundedValue; - } - - if (preg_match('/^(?add|sub)(?[A-Z].*)$/', $method, $match)) { - $value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($match['unit']), 0); - - return $this->{$match['method']}($value, $match['unit']); - } - - $value = $this->getMagicParameter($parameters, 0, Carbon::pluralUnit($method), 1); - - try { - $this->set($method, $value); - } catch (UnknownSetterException $exception) { - if ($this->localStrictModeEnabled ?? Carbon::isStrictModeEnabled()) { - throw new BadFluentSetterException($method, 0, $exception); - } - } - - return $this; - } - - protected function getForHumansInitialVariables($syntax, $short) - { - if (\is_array($syntax)) { - return $syntax; - } - - if (\is_int($short)) { - return [ - 'parts' => $short, - 'short' => false, - ]; - } - - if (\is_bool($syntax)) { - return [ - 'short' => $syntax, - 'syntax' => CarbonInterface::DIFF_ABSOLUTE, - ]; - } - - return []; - } - - /** - * @param mixed $syntax - * @param mixed $short - * @param mixed $parts - * @param mixed $options - * - * @return array - */ - protected function getForHumansParameters($syntax = null, $short = false, $parts = -1, $options = null) - { - $optionalSpace = ' '; - $default = $this->getTranslationMessage('list.0') ?? $this->getTranslationMessage('list') ?? ' '; - $join = $default === '' ? '' : ' '; - $altNumbers = false; - $aUnit = false; - $minimumUnit = 's'; - $skip = []; - extract($this->getForHumansInitialVariables($syntax, $short)); - $skip = array_map('strtolower', array_filter((array) $skip, static function ($value) { - return \is_string($value) && $value !== ''; - })); - - if ($syntax === null) { - $syntax = CarbonInterface::DIFF_ABSOLUTE; - } - - if ($parts === -1) { - $parts = INF; - } - - if ($options === null) { - $options = static::getHumanDiffOptions(); - } - - if ($join === false) { - $join = ' '; - } elseif ($join === true) { - $join = [ - $default, - $this->getTranslationMessage('list.1') ?? $default, - ]; - } - - if ($altNumbers && $altNumbers !== true) { - $language = new Language($this->locale); - $altNumbers = \in_array($language->getCode(), (array) $altNumbers, true); - } - - if (\is_array($join)) { - [$default, $last] = $join; - - if ($default !== ' ') { - $optionalSpace = ''; - } - - $join = function ($list) use ($default, $last) { - if (\count($list) < 2) { - return implode('', $list); - } - - $end = array_pop($list); - - return implode($default, $list).$last.$end; - }; - } - - if (\is_string($join)) { - if ($join !== ' ') { - $optionalSpace = ''; - } - - $glue = $join; - $join = function ($list) use ($glue) { - return implode($glue, $list); - }; - } - - $interpolations = [ - ':optional-space' => $optionalSpace, - ]; - - return [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip]; - } - - protected static function getRoundingMethodFromOptions(int $options): ?string - { - if ($options & CarbonInterface::ROUND) { - return 'round'; - } - - if ($options & CarbonInterface::CEIL) { - return 'ceil'; - } - - if ($options & CarbonInterface::FLOOR) { - return 'floor'; - } - - return null; - } - - /** - * Returns interval values as an array where key are the unit names and values the counts. - * - * @return int[] - */ - public function toArray() - { - return [ - 'years' => $this->years, - 'months' => $this->months, - 'weeks' => $this->weeks, - 'days' => $this->daysExcludeWeeks, - 'hours' => $this->hours, - 'minutes' => $this->minutes, - 'seconds' => $this->seconds, - 'microseconds' => $this->microseconds, - ]; - } - - /** - * Returns interval non-zero values as an array where key are the unit names and values the counts. - * - * @return int[] - */ - public function getNonZeroValues() - { - return array_filter($this->toArray(), 'intval'); - } - - /** - * Returns interval values as an array where key are the unit names and values the counts - * from the biggest non-zero one the the smallest non-zero one. - * - * @return int[] - */ - public function getValuesSequence() - { - $nonZeroValues = $this->getNonZeroValues(); - - if ($nonZeroValues === []) { - return []; - } - - $keys = array_keys($nonZeroValues); - $firstKey = $keys[0]; - $lastKey = $keys[\count($keys) - 1]; - $values = []; - $record = false; - - foreach ($this->toArray() as $unit => $count) { - if ($unit === $firstKey) { - $record = true; - } - - if ($record) { - $values[$unit] = $count; - } - - if ($unit === $lastKey) { - $record = false; - } - } - - return $values; - } - - /** - * Get the current interval in a human readable format in the current locale. - * - * @example - * ``` - * echo CarbonInterval::fromString('4d 3h 40m')->forHumans() . "\n"; - * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['parts' => 2]) . "\n"; - * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['parts' => 3, 'join' => true]) . "\n"; - * echo CarbonInterval::fromString('4d 3h 40m')->forHumans(['short' => true]) . "\n"; - * echo CarbonInterval::fromString('1d 24h')->forHumans(['join' => ' or ']) . "\n"; - * echo CarbonInterval::fromString('1d 24h')->forHumans(['minimumUnit' => 'hour']) . "\n"; - * ``` - * - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'skip' entry, list of units to skip (array of strings or a single string, - * ` it can be the unit name (singular or plural) or its shortcut - * ` (y, m, w, d, h, min, s, ms, µs). - * - 'aUnit' entry, prefer "an hour" over "1 hour" if true - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'minimumUnit' entry determines the smallest unit of time to display can be long or - * ` short form of the units, e.g. 'hour' or 'h' (default value: s) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: -1: no limits) - * @param int $options human diff options - * - * @throws Exception - * - * @return string - */ - public function forHumans($syntax = null, $short = false, $parts = -1, $options = null) - { - [$syntax, $short, $parts, $options, $join, $aUnit, $altNumbers, $interpolations, $minimumUnit, $skip] = $this - ->getForHumansParameters($syntax, $short, $parts, $options); - - $interval = []; - - $syntax = (int) ($syntax ?? CarbonInterface::DIFF_ABSOLUTE); - $absolute = $syntax === CarbonInterface::DIFF_ABSOLUTE; - $relativeToNow = $syntax === CarbonInterface::DIFF_RELATIVE_TO_NOW; - $count = 1; - $unit = $short ? 's' : 'second'; - $isFuture = $this->invert === 1; - $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); - $declensionMode = null; - - /** @var \Symfony\Component\Translation\Translator $translator */ - $translator = $this->getLocalTranslator(); - - $handleDeclensions = function ($unit, $count, $index = 0, $parts = 1) use ($interpolations, $transId, $translator, $altNumbers, $absolute, &$declensionMode) { - if (!$absolute) { - $declensionMode = $declensionMode ?? $this->translate($transId.'_mode'); - - if ($this->needsDeclension($declensionMode, $index, $parts)) { - // Some languages have special pluralization for past and future tense. - $key = $unit.'_'.$transId; - $result = $this->translate($key, $interpolations, $count, $translator, $altNumbers); - - if ($result !== $key) { - return $result; - } - } - } - - $result = $this->translate($unit, $interpolations, $count, $translator, $altNumbers); - - if ($result !== $unit) { - return $result; - } - - return null; - }; - - $intervalValues = $this; - $method = static::getRoundingMethodFromOptions($options); - - if ($method) { - $previousCount = INF; - - while ( - \count($intervalValues->getNonZeroValues()) > $parts && - ($count = \count($keys = array_keys($intervalValues->getValuesSequence()))) > 1 - ) { - $index = min($count, $previousCount - 1) - 2; - - if ($index < 0) { - break; - } - - $intervalValues = $this->copy()->roundUnit( - $keys[$index], - 1, - $method - ); - $previousCount = $count; - } - } - - $diffIntervalArray = [ - ['value' => $intervalValues->years, 'unit' => 'year', 'unitShort' => 'y'], - ['value' => $intervalValues->months, 'unit' => 'month', 'unitShort' => 'm'], - ['value' => $intervalValues->weeks, 'unit' => 'week', 'unitShort' => 'w'], - ['value' => $intervalValues->daysExcludeWeeks, 'unit' => 'day', 'unitShort' => 'd'], - ['value' => $intervalValues->hours, 'unit' => 'hour', 'unitShort' => 'h'], - ['value' => $intervalValues->minutes, 'unit' => 'minute', 'unitShort' => 'min'], - ['value' => $intervalValues->seconds, 'unit' => 'second', 'unitShort' => 's'], - ['value' => $intervalValues->milliseconds, 'unit' => 'millisecond', 'unitShort' => 'ms'], - ['value' => $intervalValues->microExcludeMilli, 'unit' => 'microsecond', 'unitShort' => 'µs'], - ]; - - if (!empty($skip)) { - foreach ($diffIntervalArray as $index => &$unitData) { - $nextIndex = $index + 1; - - if ($unitData['value'] && - isset($diffIntervalArray[$nextIndex]) && - \count(array_intersect([$unitData['unit'], $unitData['unit'].'s', $unitData['unitShort']], $skip)) - ) { - $diffIntervalArray[$nextIndex]['value'] += $unitData['value'] * - self::getFactorWithDefault($diffIntervalArray[$nextIndex]['unit'], $unitData['unit']); - $unitData['value'] = 0; - } - } - } - - $transChoice = function ($short, $unitData, $index, $parts) use ($absolute, $handleDeclensions, $translator, $aUnit, $altNumbers, $interpolations) { - $count = $unitData['value']; - - if ($short) { - $result = $handleDeclensions($unitData['unitShort'], $count, $index, $parts); - - if ($result !== null) { - return $result; - } - } elseif ($aUnit) { - $result = $handleDeclensions('a_'.$unitData['unit'], $count, $index, $parts); - - if ($result !== null) { - return $result; - } - } - - if (!$absolute) { - return $handleDeclensions($unitData['unit'], $count, $index, $parts); - } - - return $this->translate($unitData['unit'], $interpolations, $count, $translator, $altNumbers); - }; - - $fallbackUnit = ['second', 's']; - - foreach ($diffIntervalArray as $diffIntervalData) { - if ($diffIntervalData['value'] > 0) { - $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; - $count = $diffIntervalData['value']; - $interval[] = [$short, $diffIntervalData]; - } elseif ($options & CarbonInterface::SEQUENTIAL_PARTS_ONLY && \count($interval) > 0) { - break; - } - - // break the loop after we get the required number of parts in array - if (\count($interval) >= $parts) { - break; - } - - // break the loop after we have reached the minimum unit - if (\in_array($minimumUnit, [$diffIntervalData['unit'], $diffIntervalData['unitShort']], true)) { - $fallbackUnit = [$diffIntervalData['unit'], $diffIntervalData['unitShort']]; - - break; - } - } - - $actualParts = \count($interval); - - foreach ($interval as $index => &$item) { - $item = $transChoice($item[0], $item[1], $index, $actualParts); - } - - if (\count($interval) === 0) { - if ($relativeToNow && $options & CarbonInterface::JUST_NOW) { - $key = 'diff_now'; - $translation = $this->translate($key, $interpolations, null, $translator); - - if ($translation !== $key) { - return $translation; - } - } - - $count = $options & CarbonInterface::NO_ZERO_DIFF ? 1 : 0; - $unit = $fallbackUnit[$short ? 1 : 0]; - $interval[] = $this->translate($unit, $interpolations, $count, $translator, $altNumbers); - } - - // join the interval parts by a space - $time = $join($interval); - - unset($diffIntervalArray, $interval); - - if ($absolute) { - return $time; - } - - $isFuture = $this->invert === 1; - - $transId = $relativeToNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); - - if ($parts === 1) { - if ($relativeToNow && $unit === 'day') { - if ($count === 1 && $options & CarbonInterface::ONE_DAY_WORDS) { - $key = $isFuture ? 'diff_tomorrow' : 'diff_yesterday'; - $translation = $this->translate($key, $interpolations, null, $translator); - - if ($translation !== $key) { - return $translation; - } - } - - if ($count === 2 && $options & CarbonInterface::TWO_DAY_WORDS) { - $key = $isFuture ? 'diff_after_tomorrow' : 'diff_before_yesterday'; - $translation = $this->translate($key, $interpolations, null, $translator); - - if ($translation !== $key) { - return $translation; - } - } - } - - $aTime = $aUnit ? $handleDeclensions('a_'.$unit, $count) : null; - - $time = $aTime ?: $handleDeclensions($unit, $count) ?: $time; - } - - $time = [':time' => $time]; - - return $this->translate($transId, array_merge($time, $interpolations, $time), null, $translator); - } - - /** - * Format the instance as a string using the forHumans() function. - * - * @throws Exception - * - * @return string - */ - public function __toString() - { - $format = $this->localToStringFormat ?? static::$toStringFormat; - - if (!$format) { - return $this->forHumans(); - } - - if ($format instanceof Closure) { - return $format($this); - } - - return $this->format($format); - } - - /** - * Return native DateInterval PHP object matching the current instance. - * - * @example - * ``` - * var_dump(CarbonInterval::hours(2)->toDateInterval()); - * ``` - * - * @return DateInterval - */ - public function toDateInterval() - { - return self::castIntervalToClass($this, DateInterval::class); - } - - /** - * Convert the interval to a CarbonPeriod. - * - * @param DateTimeInterface|string|int ...$params Start date, [end date or recurrences] and optional settings. - * - * @return CarbonPeriod - */ - public function toPeriod(...$params) - { - if ($this->tzName) { - $tz = \is_string($this->tzName) ? new DateTimeZone($this->tzName) : $this->tzName; - - if ($tz instanceof DateTimeZone) { - array_unshift($params, $tz); - } - } - - return CarbonPeriod::create($this, ...$params); - } - - /** - * Invert the interval. - * - * @param bool|int $inverted if a parameter is passed, the passed value cast as 1 or 0 is used - * as the new value of the ->invert property. - * - * @return $this - */ - public function invert($inverted = null) - { - $this->invert = (\func_num_args() === 0 ? !$this->invert : $inverted) ? 1 : 0; - - return $this; - } - - protected function solveNegativeInterval() - { - if (!$this->isEmpty() && $this->years <= 0 && $this->months <= 0 && $this->dayz <= 0 && $this->hours <= 0 && $this->minutes <= 0 && $this->seconds <= 0 && $this->microseconds <= 0) { - $this->years *= -1; - $this->months *= -1; - $this->dayz *= -1; - $this->hours *= -1; - $this->minutes *= -1; - $this->seconds *= -1; - $this->microseconds *= -1; - $this->invert(); - } - - return $this; - } - - /** - * Add the passed interval to the current instance. - * - * @param string|DateInterval $unit - * @param int|float $value - * - * @return $this - */ - public function add($unit, $value = 1) - { - if (is_numeric($unit)) { - [$value, $unit] = [$unit, $value]; - } - - if (\is_string($unit) && !preg_match('/^\s*\d/', $unit)) { - $unit = "$value $unit"; - $value = 1; - } - - $interval = static::make($unit); - - if (!$interval) { - throw new InvalidIntervalException('This type of data cannot be added/subtracted.'); - } - - if ($value !== 1) { - $interval->times($value); - } - - $sign = ($this->invert === 1) !== ($interval->invert === 1) ? -1 : 1; - $this->years += $interval->y * $sign; - $this->months += $interval->m * $sign; - $this->dayz += ($interval->days === false ? $interval->d : $interval->days) * $sign; - $this->hours += $interval->h * $sign; - $this->minutes += $interval->i * $sign; - $this->seconds += $interval->s * $sign; - $this->microseconds += $interval->microseconds * $sign; - - $this->solveNegativeInterval(); - - return $this; - } - - /** - * Subtract the passed interval to the current instance. - * - * @param string|DateInterval $unit - * @param int|float $value - * - * @return $this - */ - public function sub($unit, $value = 1) - { - if (is_numeric($unit)) { - [$value, $unit] = [$unit, $value]; - } - - return $this->add($unit, -(float) $value); - } - - /** - * Subtract the passed interval to the current instance. - * - * @param string|DateInterval $unit - * @param int|float $value - * - * @return $this - */ - public function subtract($unit, $value = 1) - { - return $this->sub($unit, $value); - } - - /** - * Add given parameters to the current interval. - * - * @param int $years - * @param int $months - * @param int|float $weeks - * @param int|float $days - * @param int|float $hours - * @param int|float $minutes - * @param int|float $seconds - * @param int|float $microseconds - * - * @return $this - */ - public function plus( - $years = 0, - $months = 0, - $weeks = 0, - $days = 0, - $hours = 0, - $minutes = 0, - $seconds = 0, - $microseconds = 0 - ): self { - return $this->add(" - $years years $months months $weeks weeks $days days - $hours hours $minutes minutes $seconds seconds $microseconds microseconds - "); - } - - /** - * Add given parameters to the current interval. - * - * @param int $years - * @param int $months - * @param int|float $weeks - * @param int|float $days - * @param int|float $hours - * @param int|float $minutes - * @param int|float $seconds - * @param int|float $microseconds - * - * @return $this - */ - public function minus( - $years = 0, - $months = 0, - $weeks = 0, - $days = 0, - $hours = 0, - $minutes = 0, - $seconds = 0, - $microseconds = 0 - ): self { - return $this->sub(" - $years years $months months $weeks weeks $days days - $hours hours $minutes minutes $seconds seconds $microseconds microseconds - "); - } - - /** - * Multiply current instance given number of times. times() is naive, it multiplies each unit - * (so day can be greater than 31, hour can be greater than 23, etc.) and the result is rounded - * separately for each unit. - * - * Use times() when you want a fast and approximated calculation that does not cascade units. - * - * For a precise and cascaded calculation, - * - * @see multiply() - * - * @param float|int $factor - * - * @return $this - */ - public function times($factor) - { - if ($factor < 0) { - $this->invert = $this->invert ? 0 : 1; - $factor = -$factor; - } - - $this->years = (int) round($this->years * $factor); - $this->months = (int) round($this->months * $factor); - $this->dayz = (int) round($this->dayz * $factor); - $this->hours = (int) round($this->hours * $factor); - $this->minutes = (int) round($this->minutes * $factor); - $this->seconds = (int) round($this->seconds * $factor); - $this->microseconds = (int) round($this->microseconds * $factor); - - return $this; - } - - /** - * Divide current instance by a given divider. shares() is naive, it divides each unit separately - * and the result is rounded for each unit. So 5 hours and 20 minutes shared by 3 becomes 2 hours - * and 7 minutes. - * - * Use shares() when you want a fast and approximated calculation that does not cascade units. - * - * For a precise and cascaded calculation, - * - * @see divide() - * - * @param float|int $divider - * - * @return $this - */ - public function shares($divider) - { - return $this->times(1 / $divider); - } - - protected function copyProperties(self $interval, $ignoreSign = false) - { - $this->years = $interval->years; - $this->months = $interval->months; - $this->dayz = $interval->dayz; - $this->hours = $interval->hours; - $this->minutes = $interval->minutes; - $this->seconds = $interval->seconds; - $this->microseconds = $interval->microseconds; - - if (!$ignoreSign) { - $this->invert = $interval->invert; - } - - return $this; - } - - /** - * Multiply and cascade current instance by a given factor. - * - * @param float|int $factor - * - * @return $this - */ - public function multiply($factor) - { - if ($factor < 0) { - $this->invert = $this->invert ? 0 : 1; - $factor = -$factor; - } - - $yearPart = (int) floor($this->years * $factor); // Split calculation to prevent imprecision - - if ($yearPart) { - $this->years -= $yearPart / $factor; - } - - return $this->copyProperties( - static::create($yearPart) - ->microseconds(abs($this->totalMicroseconds) * $factor) - ->cascade(), - true - ); - } - - /** - * Divide and cascade current instance by a given divider. - * - * @param float|int $divider - * - * @return $this - */ - public function divide($divider) - { - return $this->multiply(1 / $divider); - } - - /** - * Get the interval_spec string of a date interval. - * - * @param DateInterval $interval - * - * @return string - */ - public static function getDateIntervalSpec(DateInterval $interval, bool $microseconds = false, array $skip = []) - { - $date = array_filter([ - static::PERIOD_YEARS => abs($interval->y), - static::PERIOD_MONTHS => abs($interval->m), - static::PERIOD_DAYS => abs($interval->d), - ]); - - if ( - $interval->days >= CarbonInterface::DAYS_PER_WEEK * CarbonInterface::WEEKS_PER_MONTH && - (!isset($date[static::PERIOD_YEARS]) || \count(array_intersect(['y', 'year', 'years'], $skip))) && - (!isset($date[static::PERIOD_MONTHS]) || \count(array_intersect(['m', 'month', 'months'], $skip))) - ) { - $date = [ - static::PERIOD_DAYS => abs($interval->days), - ]; - } - - $seconds = abs($interval->s); - if ($microseconds && $interval->f > 0) { - $seconds = sprintf('%d.%06d', $seconds, abs($interval->f) * 1000000); - } - - $time = array_filter([ - static::PERIOD_HOURS => abs($interval->h), - static::PERIOD_MINUTES => abs($interval->i), - static::PERIOD_SECONDS => $seconds, - ]); - - $specString = static::PERIOD_PREFIX; - - foreach ($date as $key => $value) { - $specString .= $value.$key; - } - - if (\count($time) > 0) { - $specString .= static::PERIOD_TIME_PREFIX; - foreach ($time as $key => $value) { - $specString .= $value.$key; - } - } - - return $specString === static::PERIOD_PREFIX ? 'PT0S' : $specString; - } - - /** - * Get the interval_spec string. - * - * @return string - */ - public function spec(bool $microseconds = false) - { - return static::getDateIntervalSpec($this, $microseconds); - } - - /** - * Comparing 2 date intervals. - * - * @param DateInterval $first - * @param DateInterval $second - * - * @return int - */ - public static function compareDateIntervals(DateInterval $first, DateInterval $second) - { - $current = Carbon::now(); - $passed = $current->avoidMutation()->add($second); - $current->add($first); - - if ($current < $passed) { - return -1; - } - if ($current > $passed) { - return 1; - } - - return 0; - } - - /** - * Comparing with passed interval. - * - * @param DateInterval $interval - * - * @return int - */ - public function compare(DateInterval $interval) - { - return static::compareDateIntervals($this, $interval); - } - - private function invertCascade(array $values) - { - return $this->set(array_map(function ($value) { - return -$value; - }, $values))->doCascade(true)->invert(); - } - - private function doCascade(bool $deep) - { - $originalData = $this->toArray(); - $originalData['milliseconds'] = (int) ($originalData['microseconds'] / static::getMicrosecondsPerMillisecond()); - $originalData['microseconds'] = $originalData['microseconds'] % static::getMicrosecondsPerMillisecond(); - $originalData['weeks'] = (int) ($this->d / static::getDaysPerWeek()); - $originalData['daysExcludeWeeks'] = fmod($this->d, static::getDaysPerWeek()); - unset($originalData['days']); - $newData = $originalData; - $previous = []; - - foreach (self::getFlipCascadeFactors() as $source => [$target, $factor]) { - foreach (['source', 'target'] as $key) { - if ($$key === 'dayz') { - $$key = 'daysExcludeWeeks'; - } - } - - $value = $newData[$source]; - $modulo = fmod($factor + fmod($value, $factor), $factor); - $newData[$source] = $modulo; - $newData[$target] += ($value - $modulo) / $factor; - - $decimalPart = fmod($newData[$source], 1); - - if ($decimalPart !== 0.0) { - $unit = $source; - - foreach ($previous as [$subUnit, $subFactor]) { - $newData[$unit] -= $decimalPart; - $newData[$subUnit] += $decimalPart * $subFactor; - $decimalPart = fmod($newData[$subUnit], 1); - - if ($decimalPart === 0.0) { - break; - } - - $unit = $subUnit; - } - } - - array_unshift($previous, [$source, $factor]); - } - - $positive = null; - - if (!$deep) { - foreach ($newData as $value) { - if ($value) { - if ($positive === null) { - $positive = ($value > 0); - - continue; - } - - if (($value > 0) !== $positive) { - return $this->invertCascade($originalData) - ->solveNegativeInterval(); - } - } - } - } - - return $this->set($newData) - ->solveNegativeInterval(); - } - - /** - * Convert overflowed values into bigger units. - * - * @return $this - */ - public function cascade() - { - return $this->doCascade(false); - } - - public function hasNegativeValues(): bool - { - foreach ($this->toArray() as $value) { - if ($value < 0) { - return true; - } - } - - return false; - } - - public function hasPositiveValues(): bool - { - foreach ($this->toArray() as $value) { - if ($value > 0) { - return true; - } - } - - return false; - } - - /** - * Get amount of given unit equivalent to the interval. - * - * @param string $unit - * - * @throws UnknownUnitException|UnitNotConfiguredException - * - * @return float - */ - public function total($unit) - { - $realUnit = $unit = strtolower($unit); - - if (\in_array($unit, ['days', 'weeks'])) { - $realUnit = 'dayz'; - } elseif (!\in_array($unit, ['microseconds', 'milliseconds', 'seconds', 'minutes', 'hours', 'dayz', 'months', 'years'])) { - throw new UnknownUnitException($unit); - } - - $result = 0; - $cumulativeFactor = 0; - $unitFound = false; - $factors = self::getFlipCascadeFactors(); - $daysPerWeek = (int) static::getDaysPerWeek(); - - $values = [ - 'years' => $this->years, - 'months' => $this->months, - 'weeks' => (int) ($this->d / $daysPerWeek), - 'dayz' => fmod($this->d, $daysPerWeek), - 'hours' => $this->hours, - 'minutes' => $this->minutes, - 'seconds' => $this->seconds, - 'milliseconds' => (int) ($this->microseconds / Carbon::MICROSECONDS_PER_MILLISECOND), - 'microseconds' => $this->microseconds % Carbon::MICROSECONDS_PER_MILLISECOND, - ]; - - if (isset($factors['dayz']) && $factors['dayz'][0] !== 'weeks') { - $values['dayz'] += $values['weeks'] * $daysPerWeek; - $values['weeks'] = 0; - } - - foreach ($factors as $source => [$target, $factor]) { - if ($source === $realUnit) { - $unitFound = true; - $value = $values[$source]; - $result += $value; - $cumulativeFactor = 1; - } - - if ($factor === false) { - if ($unitFound) { - break; - } - - $result = 0; - $cumulativeFactor = 0; - - continue; - } - - if ($target === $realUnit) { - $unitFound = true; - } - - if ($cumulativeFactor) { - $cumulativeFactor *= $factor; - $result += $values[$target] * $cumulativeFactor; - - continue; - } - - $value = $values[$source]; - - $result = ($result + $value) / $factor; - } - - if (isset($target) && !$cumulativeFactor) { - $result += $values[$target]; - } - - if (!$unitFound) { - throw new UnitNotConfiguredException($unit); - } - - if ($this->invert) { - $result *= -1; - } - - if ($unit === 'weeks') { - $result /= $daysPerWeek; - } - - // Cast as int numbers with no decimal part - return fmod($result, 1) === 0.0 ? (int) $result : $result; - } - - /** - * Determines if the instance is equal to another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @see equalTo() - * - * @return bool - */ - public function eq($interval): bool - { - return $this->equalTo($interval); - } - - /** - * Determines if the instance is equal to another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @return bool - */ - public function equalTo($interval): bool - { - $interval = $this->resolveInterval($interval); - - return $interval !== null && $this->totalMicroseconds === $interval->totalMicroseconds; - } - - /** - * Determines if the instance is not equal to another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @see notEqualTo() - * - * @return bool - */ - public function ne($interval): bool - { - return $this->notEqualTo($interval); - } - - /** - * Determines if the instance is not equal to another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @return bool - */ - public function notEqualTo($interval): bool - { - return !$this->eq($interval); - } - - /** - * Determines if the instance is greater (longer) than another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @see greaterThan() - * - * @return bool - */ - public function gt($interval): bool - { - return $this->greaterThan($interval); - } - - /** - * Determines if the instance is greater (longer) than another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @return bool - */ - public function greaterThan($interval): bool - { - $interval = $this->resolveInterval($interval); - - return $interval === null || $this->totalMicroseconds > $interval->totalMicroseconds; - } - - /** - * Determines if the instance is greater (longer) than or equal to another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @see greaterThanOrEqualTo() - * - * @return bool - */ - public function gte($interval): bool - { - return $this->greaterThanOrEqualTo($interval); - } - - /** - * Determines if the instance is greater (longer) than or equal to another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @return bool - */ - public function greaterThanOrEqualTo($interval): bool - { - return $this->greaterThan($interval) || $this->equalTo($interval); - } - - /** - * Determines if the instance is less (shorter) than another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @see lessThan() - * - * @return bool - */ - public function lt($interval): bool - { - return $this->lessThan($interval); - } - - /** - * Determines if the instance is less (shorter) than another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @return bool - */ - public function lessThan($interval): bool - { - $interval = $this->resolveInterval($interval); - - return $interval !== null && $this->totalMicroseconds < $interval->totalMicroseconds; - } - - /** - * Determines if the instance is less (shorter) than or equal to another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @see lessThanOrEqualTo() - * - * @return bool - */ - public function lte($interval): bool - { - return $this->lessThanOrEqualTo($interval); - } - - /** - * Determines if the instance is less (shorter) than or equal to another - * - * @param CarbonInterval|DateInterval|mixed $interval - * - * @return bool - */ - public function lessThanOrEqualTo($interval): bool - { - return $this->lessThan($interval) || $this->equalTo($interval); - } - - /** - * Determines if the instance is between two others. - * - * The third argument allow you to specify if bounds are included or not (true by default) - * but for when you including/excluding bounds may produce different results in your application, - * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. - * - * @example - * ``` - * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(3)); // true - * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::hours(36)); // false - * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(2)); // true - * CarbonInterval::hours(48)->between(CarbonInterval::day(), CarbonInterval::days(2), false); // false - * ``` - * - * @param CarbonInterval|DateInterval|mixed $interval1 - * @param CarbonInterval|DateInterval|mixed $interval2 - * @param bool $equal Indicates if an equal to comparison should be done - * - * @return bool - */ - public function between($interval1, $interval2, $equal = true): bool - { - return $equal - ? $this->greaterThanOrEqualTo($interval1) && $this->lessThanOrEqualTo($interval2) - : $this->greaterThan($interval1) && $this->lessThan($interval2); - } - - /** - * Determines if the instance is between two others, bounds excluded. - * - * @example - * ``` - * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(3)); // true - * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::hours(36)); // false - * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(2)); // true - * ``` - * - * @param CarbonInterval|DateInterval|mixed $interval1 - * @param CarbonInterval|DateInterval|mixed $interval2 - * - * @return bool - */ - public function betweenIncluded($interval1, $interval2): bool - { - return $this->between($interval1, $interval2, true); - } - - /** - * Determines if the instance is between two others, bounds excluded. - * - * @example - * ``` - * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(3)); // true - * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::hours(36)); // false - * CarbonInterval::hours(48)->betweenExcluded(CarbonInterval::day(), CarbonInterval::days(2)); // false - * ``` - * - * @param CarbonInterval|DateInterval|mixed $interval1 - * @param CarbonInterval|DateInterval|mixed $interval2 - * - * @return bool - */ - public function betweenExcluded($interval1, $interval2): bool - { - return $this->between($interval1, $interval2, false); - } - - /** - * Determines if the instance is between two others - * - * @example - * ``` - * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(3)); // true - * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::hours(36)); // false - * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(2)); // true - * CarbonInterval::hours(48)->isBetween(CarbonInterval::day(), CarbonInterval::days(2), false); // false - * ``` - * - * @param CarbonInterval|DateInterval|mixed $interval1 - * @param CarbonInterval|DateInterval|mixed $interval2 - * @param bool $equal Indicates if an equal to comparison should be done - * - * @return bool - */ - public function isBetween($interval1, $interval2, $equal = true): bool - { - return $this->between($interval1, $interval2, $equal); - } - - /** - * Round the current instance at the given unit with given precision if specified and the given function. - * - * @param string $unit - * @param float|int|string|DateInterval|null $precision - * @param string $function - * - * @throws Exception - * - * @return $this - */ - public function roundUnit($unit, $precision = 1, $function = 'round') - { - if (static::getCascadeFactors() !== static::getDefaultCascadeFactors()) { - $value = $function($this->total($unit) / $precision) * $precision; - $inverted = $value < 0; - - return $this->copyProperties(self::fromString( - number_format(abs($value), 12, '.', '').' '.$unit - )->invert($inverted)->cascade()); - } - - $base = CarbonImmutable::parse('2000-01-01 00:00:00', 'UTC') - ->roundUnit($unit, $precision, $function); - $next = $base->add($this); - $inverted = $next < $base; - - if ($inverted) { - $next = $base->sub($this); - } - - $this->copyProperties( - $next - ->roundUnit($unit, $precision, $function) - ->diffAsCarbonInterval($base) - ); - - return $this->invert($inverted); - } - - /** - * Truncate the current instance at the given unit with given precision if specified. - * - * @param string $unit - * @param float|int|string|DateInterval|null $precision - * - * @throws Exception - * - * @return $this - */ - public function floorUnit($unit, $precision = 1) - { - return $this->roundUnit($unit, $precision, 'floor'); - } - - /** - * Ceil the current instance at the given unit with given precision if specified. - * - * @param string $unit - * @param float|int|string|DateInterval|null $precision - * - * @throws Exception - * - * @return $this - */ - public function ceilUnit($unit, $precision = 1) - { - return $this->roundUnit($unit, $precision, 'ceil'); - } - - /** - * Round the current instance second with given precision if specified. - * - * @param float|int|string|DateInterval|null $precision - * @param string $function - * - * @throws Exception - * - * @return $this - */ - public function round($precision = 1, $function = 'round') - { - return $this->roundWith($precision, $function); - } - - /** - * Round the current instance second with given precision if specified. - * - * @param float|int|string|DateInterval|null $precision - * - * @throws Exception - * - * @return $this - */ - public function floor($precision = 1) - { - return $this->round($precision, 'floor'); - } - - /** - * Ceil the current instance second with given precision if specified. - * - * @param float|int|string|DateInterval|null $precision - * - * @throws Exception - * - * @return $this - */ - public function ceil($precision = 1) - { - return $this->round($precision, 'ceil'); - } - - private function needsDeclension(string $mode, int $index, int $parts): bool - { - switch ($mode) { - case 'last': - return $index === $parts - 1; - default: - return true; - } - } - - private function checkIntegerValue(string $name, $value) - { - if (\is_int($value)) { - return; - } - - $this->assertSafeForInteger($name, $value); - - if (\is_float($value) && (((float) (int) $value) === $value)) { - return; - } - - if (!self::$floatSettersEnabled) { - $type = \gettype($value); - @trigger_error( - "Since 2.70.0, it's deprecated to pass $type value for $name.\n". - "It's truncated when stored as an integer interval unit.\n". - "From 3.0.0, decimal part will no longer be truncated and will be cascaded to smaller units.\n". - "- To maintain the current behavior, use explicit cast: $name((int) \$value)\n". - "- To adopt the new behavior globally, call CarbonInterval::enableFloatSetters()\n", - \E_USER_DEPRECATED - ); - } - } - - /** - * Throw an exception if precision loss when storing the given value as an integer would be >= 1.0. - */ - private function assertSafeForInteger(string $name, $value) - { - if ($value && !\is_int($value) && ($value >= 0x7fffffffffffffff || $value <= -0x7fffffffffffffff)) { - throw new OutOfRangeException($name, -0x7fffffffffffffff, 0x7fffffffffffffff, $value); - } - } - - private function handleDecimalPart(string $unit, $value, $integerValue) - { - if (self::$floatSettersEnabled) { - $floatValue = (float) $value; - $base = (float) $integerValue; - - if ($floatValue === $base) { - return; - } - - $units = [ - 'y' => 'year', - 'm' => 'month', - 'd' => 'day', - 'h' => 'hour', - 'i' => 'minute', - 's' => 'second', - ]; - $upper = true; - - foreach ($units as $property => $name) { - if ($name === $unit) { - $upper = false; - - continue; - } - - if (!$upper && $this->$property !== 0) { - throw new RuntimeException( - "You cannot set $unit to a float value as $name would be overridden, ". - 'set it first to 0 explicitly if you really want to erase its value' - ); - } - } - - $this->add($unit, $floatValue - $base); - } - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php b/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php deleted file mode 100644 index d12a986..0000000 --- a/vendor/nesbot/carbon/src/Carbon/CarbonPeriod.php +++ /dev/null @@ -1,2742 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Carbon\Exceptions\EndLessPeriodException; -use Carbon\Exceptions\InvalidCastException; -use Carbon\Exceptions\InvalidIntervalException; -use Carbon\Exceptions\InvalidPeriodDateException; -use Carbon\Exceptions\InvalidPeriodParameterException; -use Carbon\Exceptions\NotACarbonClassException; -use Carbon\Exceptions\NotAPeriodException; -use Carbon\Exceptions\UnknownGetterException; -use Carbon\Exceptions\UnknownMethodException; -use Carbon\Exceptions\UnreachableException; -use Carbon\Traits\IntervalRounding; -use Carbon\Traits\Mixin; -use Carbon\Traits\Options; -use Carbon\Traits\ToStringFormat; -use Closure; -use Countable; -use DateInterval; -use DatePeriod; -use DateTime; -use DateTimeImmutable; -use DateTimeInterface; -use DateTimeZone; -use InvalidArgumentException; -use Iterator; -use JsonSerializable; -use ReflectionException; -use ReturnTypeWillChange; -use RuntimeException; - -/** - * Substitution of DatePeriod with some modifications and many more features. - * - * @property-read int|float $recurrences number of recurrences (if end not set). - * @property-read bool $include_start_date rather the start date is included in the iteration. - * @property-read bool $include_end_date rather the end date is included in the iteration (if recurrences not set). - * @property-read CarbonInterface $start Period start date. - * @property-read CarbonInterface $current Current date from the iteration. - * @property-read CarbonInterface $end Period end date. - * @property-read CarbonInterval $interval Underlying date interval instance. Always present, one day by default. - * - * @method static static start($date, $inclusive = null) Create instance specifying start date or modify the start date if called on an instance. - * @method static static since($date, $inclusive = null) Alias for start(). - * @method static static sinceNow($inclusive = null) Create instance with start date set to now or set the start date to now if called on an instance. - * @method static static end($date = null, $inclusive = null) Create instance specifying end date or modify the end date if called on an instance. - * @method static static until($date = null, $inclusive = null) Alias for end(). - * @method static static untilNow($inclusive = null) Create instance with end date set to now or set the end date to now if called on an instance. - * @method static static dates($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. - * @method static static between($start, $end = null) Create instance with start and end dates or modify the start and end dates if called on an instance. - * @method static static recurrences($recurrences = null) Create instance with maximum number of recurrences or modify the number of recurrences if called on an instance. - * @method static static times($recurrences = null) Alias for recurrences(). - * @method static static options($options = null) Create instance with options or modify the options if called on an instance. - * @method static static toggle($options, $state = null) Create instance with options toggled on or off, or toggle options if called on an instance. - * @method static static filter($callback, $name = null) Create instance with filter added to the stack or append a filter if called on an instance. - * @method static static push($callback, $name = null) Alias for filter(). - * @method static static prepend($callback, $name = null) Create instance with filter prepended to the stack or prepend a filter if called on an instance. - * @method static static filters(array $filters = []) Create instance with filters stack or replace the whole filters stack if called on an instance. - * @method static static interval($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static static each($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static static every($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static static step($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static static stepBy($interval) Create instance with given date interval or modify the interval if called on an instance. - * @method static static invert() Create instance with inverted date interval or invert the interval if called on an instance. - * @method static static years($years = 1) Create instance specifying a number of years for date interval or replace the interval by the given a number of years if called on an instance. - * @method static static year($years = 1) Alias for years(). - * @method static static months($months = 1) Create instance specifying a number of months for date interval or replace the interval by the given a number of months if called on an instance. - * @method static static month($months = 1) Alias for months(). - * @method static static weeks($weeks = 1) Create instance specifying a number of weeks for date interval or replace the interval by the given a number of weeks if called on an instance. - * @method static static week($weeks = 1) Alias for weeks(). - * @method static static days($days = 1) Create instance specifying a number of days for date interval or replace the interval by the given a number of days if called on an instance. - * @method static static dayz($days = 1) Alias for days(). - * @method static static day($days = 1) Alias for days(). - * @method static static hours($hours = 1) Create instance specifying a number of hours for date interval or replace the interval by the given a number of hours if called on an instance. - * @method static static hour($hours = 1) Alias for hours(). - * @method static static minutes($minutes = 1) Create instance specifying a number of minutes for date interval or replace the interval by the given a number of minutes if called on an instance. - * @method static static minute($minutes = 1) Alias for minutes(). - * @method static static seconds($seconds = 1) Create instance specifying a number of seconds for date interval or replace the interval by the given a number of seconds if called on an instance. - * @method static static second($seconds = 1) Alias for seconds(). - * @method static static milliseconds($milliseconds = 1) Create instance specifying a number of milliseconds for date interval or replace the interval by the given a number of milliseconds if called on an instance. - * @method static static millisecond($milliseconds = 1) Alias for milliseconds(). - * @method static static microseconds($microseconds = 1) Create instance specifying a number of microseconds for date interval or replace the interval by the given a number of microseconds if called on an instance. - * @method static static microsecond($microseconds = 1) Alias for microseconds(). - * @method $this roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method $this roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method $this floorYear(float $precision = 1) Truncate the current instance year with given precision. - * @method $this floorYears(float $precision = 1) Truncate the current instance year with given precision. - * @method $this ceilYear(float $precision = 1) Ceil the current instance year with given precision. - * @method $this ceilYears(float $precision = 1) Ceil the current instance year with given precision. - * @method $this roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method $this roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method $this floorMonth(float $precision = 1) Truncate the current instance month with given precision. - * @method $this floorMonths(float $precision = 1) Truncate the current instance month with given precision. - * @method $this ceilMonth(float $precision = 1) Ceil the current instance month with given precision. - * @method $this ceilMonths(float $precision = 1) Ceil the current instance month with given precision. - * @method $this roundWeek(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this roundWeeks(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this floorWeek(float $precision = 1) Truncate the current instance day with given precision. - * @method $this floorWeeks(float $precision = 1) Truncate the current instance day with given precision. - * @method $this ceilWeek(float $precision = 1) Ceil the current instance day with given precision. - * @method $this ceilWeeks(float $precision = 1) Ceil the current instance day with given precision. - * @method $this roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method $this floorDay(float $precision = 1) Truncate the current instance day with given precision. - * @method $this floorDays(float $precision = 1) Truncate the current instance day with given precision. - * @method $this ceilDay(float $precision = 1) Ceil the current instance day with given precision. - * @method $this ceilDays(float $precision = 1) Ceil the current instance day with given precision. - * @method $this roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method $this roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method $this floorHour(float $precision = 1) Truncate the current instance hour with given precision. - * @method $this floorHours(float $precision = 1) Truncate the current instance hour with given precision. - * @method $this ceilHour(float $precision = 1) Ceil the current instance hour with given precision. - * @method $this ceilHours(float $precision = 1) Ceil the current instance hour with given precision. - * @method $this roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method $this roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method $this floorMinute(float $precision = 1) Truncate the current instance minute with given precision. - * @method $this floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. - * @method $this ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. - * @method $this ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. - * @method $this roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method $this roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method $this floorSecond(float $precision = 1) Truncate the current instance second with given precision. - * @method $this floorSeconds(float $precision = 1) Truncate the current instance second with given precision. - * @method $this ceilSecond(float $precision = 1) Ceil the current instance second with given precision. - * @method $this ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. - * @method $this roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method $this roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method $this floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. - * @method $this floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. - * @method $this ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. - * @method $this ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. - * @method $this roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method $this roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method $this floorCentury(float $precision = 1) Truncate the current instance century with given precision. - * @method $this floorCenturies(float $precision = 1) Truncate the current instance century with given precision. - * @method $this ceilCentury(float $precision = 1) Ceil the current instance century with given precision. - * @method $this ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. - * @method $this roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method $this roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method $this floorDecade(float $precision = 1) Truncate the current instance decade with given precision. - * @method $this floorDecades(float $precision = 1) Truncate the current instance decade with given precision. - * @method $this ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. - * @method $this ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. - * @method $this roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method $this roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method $this floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. - * @method $this floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. - * @method $this ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. - * @method $this ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. - * @method $this roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method $this roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method $this floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method $this floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method $this ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method $this ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method $this roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method $this roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method $this floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method $this floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method $this ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method $this ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. - * - * @SuppressWarnings(PHPMD.CouplingBetweenObjects) - */ -class CarbonPeriod implements Iterator, Countable, JsonSerializable -{ - use IntervalRounding; - use Mixin { - Mixin::mixin as baseMixin; - } - use Options; - use ToStringFormat; - - /** - * Built-in filter for limit by recurrences. - * - * @var callable - */ - public const RECURRENCES_FILTER = [self::class, 'filterRecurrences']; - - /** - * Built-in filter for limit to an end. - * - * @var callable - */ - public const END_DATE_FILTER = [self::class, 'filterEndDate']; - - /** - * Special value which can be returned by filters to end iteration. Also a filter. - * - * @var callable - */ - public const END_ITERATION = [self::class, 'endIteration']; - - /** - * Exclude start date from iteration. - * - * @var int - */ - public const EXCLUDE_START_DATE = 1; - - /** - * Exclude end date from iteration. - * - * @var int - */ - public const EXCLUDE_END_DATE = 2; - - /** - * Yield CarbonImmutable instances. - * - * @var int - */ - public const IMMUTABLE = 4; - - /** - * Number of maximum attempts before giving up on finding next valid date. - * - * @var int - */ - public const NEXT_MAX_ATTEMPTS = 1000; - - /** - * Number of maximum attempts before giving up on finding end date. - * - * @var int - */ - public const END_MAX_ATTEMPTS = 10000; - - /** - * Default date class of iteration items. - * - * @var string - */ - protected const DEFAULT_DATE_CLASS = Carbon::class; - - /** - * The registered macros. - * - * @var array - */ - protected static $macros = []; - - /** - * Date class of iteration items. - * - * @var string - */ - protected $dateClass = Carbon::class; - - /** - * Underlying date interval instance. Always present, one day by default. - * - * @var CarbonInterval - */ - protected $dateInterval; - - /** - * True once __construct is finished. - * - * @var bool - */ - protected $constructed = false; - - /** - * Whether current date interval was set by default. - * - * @var bool - */ - protected $isDefaultInterval; - - /** - * The filters stack. - * - * @var array - */ - protected $filters = []; - - /** - * Period start date. Applied on rewind. Always present, now by default. - * - * @var CarbonInterface - */ - protected $startDate; - - /** - * Period end date. For inverted interval should be before the start date. Applied via a filter. - * - * @var CarbonInterface|null - */ - protected $endDate; - - /** - * Limit for number of recurrences. Applied via a filter. - * - * @var int|null - */ - protected $recurrences; - - /** - * Iteration options. - * - * @var int - */ - protected $options; - - /** - * Index of current date. Always sequential, even if some dates are skipped by filters. - * Equal to null only before the first iteration. - * - * @var int - */ - protected $key; - - /** - * Current date. May temporarily hold unaccepted value when looking for a next valid date. - * Equal to null only before the first iteration. - * - * @var CarbonInterface - */ - protected $current; - - /** - * Timezone of current date. Taken from the start date. - * - * @var \DateTimeZone|null - */ - protected $timezone; - - /** - * The cached validation result for current date. - * - * @var bool|string|null - */ - protected $validationResult; - - /** - * Timezone handler for settings() method. - * - * @var mixed - */ - protected $tzName; - - /** - * Make a CarbonPeriod instance from given variable if possible. - * - * @param mixed $var - * - * @return static|null - */ - public static function make($var) - { - try { - return static::instance($var); - } catch (NotAPeriodException $e) { - return static::create($var); - } - } - - /** - * Create a new instance from a DatePeriod or CarbonPeriod object. - * - * @param CarbonPeriod|DatePeriod $period - * - * @return static - */ - public static function instance($period) - { - if ($period instanceof static) { - return $period->copy(); - } - - if ($period instanceof self) { - return new static( - $period->getStartDate(), - $period->getEndDate() ?: $period->getRecurrences(), - $period->getDateInterval(), - $period->getOptions() - ); - } - - if ($period instanceof DatePeriod) { - return new static( - $period->start, - $period->end ?: ($period->recurrences - 1), - $period->interval, - $period->include_start_date ? 0 : static::EXCLUDE_START_DATE - ); - } - - $class = static::class; - $type = \gettype($period); - - throw new NotAPeriodException( - 'Argument 1 passed to '.$class.'::'.__METHOD__.'() '. - 'must be an instance of DatePeriod or '.$class.', '. - ($type === 'object' ? 'instance of '.\get_class($period) : $type).' given.' - ); - } - - /** - * Create a new instance. - * - * @return static - */ - public static function create(...$params) - { - return static::createFromArray($params); - } - - /** - * Create a new instance from an array of parameters. - * - * @param array $params - * - * @return static - */ - public static function createFromArray(array $params) - { - return new static(...$params); - } - - /** - * Create CarbonPeriod from ISO 8601 string. - * - * @param string $iso - * @param int|null $options - * - * @return static - */ - public static function createFromIso($iso, $options = null) - { - $params = static::parseIso8601($iso); - - $instance = static::createFromArray($params); - - if ($options !== null) { - $instance->setOptions($options); - } - - return $instance; - } - - /** - * Return whether given interval contains non zero value of any time unit. - * - * @param \DateInterval $interval - * - * @return bool - */ - protected static function intervalHasTime(DateInterval $interval) - { - return $interval->h || $interval->i || $interval->s || $interval->f; - } - - /** - * Return whether given variable is an ISO 8601 specification. - * - * Note: Check is very basic, as actual validation will be done later when parsing. - * We just want to ensure that variable is not any other type of a valid parameter. - * - * @param mixed $var - * - * @return bool - */ - protected static function isIso8601($var) - { - if (!\is_string($var)) { - return false; - } - - // Match slash but not within a timezone name. - $part = '[a-z]+(?:[_-][a-z]+)*'; - - preg_match("#\b$part/$part\b|(/)#i", $var, $match); - - return isset($match[1]); - } - - /** - * Parse given ISO 8601 string into an array of arguments. - * - * @SuppressWarnings(PHPMD.ElseExpression) - * - * @param string $iso - * - * @return array - */ - protected static function parseIso8601($iso) - { - $result = []; - - $interval = null; - $start = null; - $end = null; - $dateClass = static::DEFAULT_DATE_CLASS; - - foreach (explode('/', $iso) as $key => $part) { - if ($key === 0 && preg_match('/^R(\d*|INF)$/', $part, $match)) { - $parsed = \strlen($match[1]) ? (($match[1] !== 'INF') ? (int) $match[1] : INF) : null; - } elseif ($interval === null && $parsed = CarbonInterval::make($part)) { - $interval = $part; - } elseif ($start === null && $parsed = $dateClass::make($part)) { - $start = $part; - } elseif ($end === null && $parsed = $dateClass::make(static::addMissingParts($start ?? '', $part))) { - $end = $part; - } else { - throw new InvalidPeriodParameterException("Invalid ISO 8601 specification: $iso."); - } - - $result[] = $parsed; - } - - return $result; - } - - /** - * Add missing parts of the target date from the source date. - * - * @param string $source - * @param string $target - * - * @return string - */ - protected static function addMissingParts($source, $target) - { - $pattern = '/'.preg_replace('/\d+/', '[0-9]+', preg_quote($target, '/')).'$/'; - - $result = preg_replace($pattern, $target, $source, 1, $count); - - return $count ? $result : $target; - } - - /** - * Register a custom macro. - * - * @example - * ``` - * CarbonPeriod::macro('middle', function () { - * return $this->getStartDate()->average($this->getEndDate()); - * }); - * echo CarbonPeriod::since('2011-05-12')->until('2011-06-03')->middle(); - * ``` - * - * @param string $name - * @param object|callable $macro - * - * @return void - */ - public static function macro($name, $macro) - { - static::$macros[$name] = $macro; - } - - /** - * Register macros from a mixin object. - * - * @example - * ``` - * CarbonPeriod::mixin(new class { - * public function addDays() { - * return function ($count = 1) { - * return $this->setStartDate( - * $this->getStartDate()->addDays($count) - * )->setEndDate( - * $this->getEndDate()->addDays($count) - * ); - * }; - * } - * public function subDays() { - * return function ($count = 1) { - * return $this->setStartDate( - * $this->getStartDate()->subDays($count) - * )->setEndDate( - * $this->getEndDate()->subDays($count) - * ); - * }; - * } - * }); - * echo CarbonPeriod::create('2000-01-01', '2000-02-01')->addDays(5)->subDays(3); - * ``` - * - * @param object|string $mixin - * - * @throws ReflectionException - * - * @return void - */ - public static function mixin($mixin) - { - static::baseMixin($mixin); - } - - /** - * Check if macro is registered. - * - * @param string $name - * - * @return bool - */ - public static function hasMacro($name) - { - return isset(static::$macros[$name]); - } - - /** - * Provide static proxy for instance aliases. - * - * @param string $method - * @param array $parameters - * - * @return mixed - */ - public static function __callStatic($method, $parameters) - { - $date = new static(); - - if (static::hasMacro($method)) { - return static::bindMacroContext(null, function () use (&$method, &$parameters, &$date) { - return $date->callMacro($method, $parameters); - }); - } - - return $date->$method(...$parameters); - } - - /** - * CarbonPeriod constructor. - * - * @SuppressWarnings(PHPMD.ElseExpression) - * - * @throws InvalidArgumentException - */ - public function __construct(...$arguments) - { - if (is_a($this->dateClass, DateTimeImmutable::class, true)) { - $this->options = static::IMMUTABLE; - } - - // Parse and assign arguments one by one. First argument may be an ISO 8601 spec, - // which will be first parsed into parts and then processed the same way. - - $argumentsCount = \count($arguments); - - if ($argumentsCount && static::isIso8601($iso = $arguments[0])) { - array_splice($arguments, 0, 1, static::parseIso8601($iso)); - } - - if ($argumentsCount === 1) { - if ($arguments[0] instanceof DatePeriod) { - $arguments = [ - $arguments[0]->start, - $arguments[0]->end ?: ($arguments[0]->recurrences - 1), - $arguments[0]->interval, - $arguments[0]->include_start_date ? 0 : static::EXCLUDE_START_DATE, - ]; - } elseif ($arguments[0] instanceof self) { - $arguments = [ - $arguments[0]->getStartDate(), - $arguments[0]->getEndDate() ?: $arguments[0]->getRecurrences(), - $arguments[0]->getDateInterval(), - $arguments[0]->getOptions(), - ]; - } - } - - $optionsSet = false; - - foreach ($arguments as $argument) { - $parsedDate = null; - - if ($argument instanceof DateTimeZone) { - $this->setTimezone($argument); - } elseif ($this->dateInterval === null && - ( - (\is_string($argument) && preg_match( - '/^(-?\d(\d(?![\/-])|[^\d\/-]([\/-])?)*|P[T\d].*|(?:\h*\d+(?:\.\d+)?\h*[a-z]+)+)$/i', - $argument - )) || - $argument instanceof DateInterval || - $argument instanceof Closure - ) && - $parsedInterval = @CarbonInterval::make($argument) - ) { - $this->setDateInterval($parsedInterval); - } elseif ($this->startDate === null && $parsedDate = $this->makeDateTime($argument)) { - $this->setStartDate($parsedDate); - } elseif ($this->endDate === null && ($parsedDate = $parsedDate ?? $this->makeDateTime($argument))) { - $this->setEndDate($parsedDate); - } elseif ($this->recurrences === null && $this->endDate === null && is_numeric($argument)) { - $this->setRecurrences($argument); - } elseif (!$optionsSet && (\is_int($argument) || $argument === null)) { - $optionsSet = true; - $this->setOptions(((int) $this->options) | ((int) $argument)); - } else { - throw new InvalidPeriodParameterException('Invalid constructor parameters.'); - } - } - - if ($this->startDate === null) { - $dateClass = $this->dateClass; - $this->setStartDate($dateClass::now()); - } - - if ($this->dateInterval === null) { - $this->setDateInterval(CarbonInterval::day()); - - $this->isDefaultInterval = true; - } - - if ($this->options === null) { - $this->setOptions(0); - } - - $this->constructed = true; - } - - /** - * Get a copy of the instance. - * - * @return static - */ - public function copy() - { - return clone $this; - } - - /** - * Prepare the instance to be set (self if mutable to be mutated, - * copy if immutable to generate a new instance). - * - * @return static - */ - protected function copyIfImmutable() - { - return $this; - } - - /** - * Get the getter for a property allowing both `DatePeriod` snakeCase and camelCase names. - * - * @param string $name - * - * @return callable|null - */ - protected function getGetter(string $name) - { - switch (strtolower(preg_replace('/[A-Z]/', '_$0', $name))) { - case 'start': - case 'start_date': - return [$this, 'getStartDate']; - case 'end': - case 'end_date': - return [$this, 'getEndDate']; - case 'interval': - case 'date_interval': - return [$this, 'getDateInterval']; - case 'recurrences': - return [$this, 'getRecurrences']; - case 'include_start_date': - return [$this, 'isStartIncluded']; - case 'include_end_date': - return [$this, 'isEndIncluded']; - case 'current': - return [$this, 'current']; - default: - return null; - } - } - - /** - * Get a property allowing both `DatePeriod` snakeCase and camelCase names. - * - * @param string $name - * - * @return bool|CarbonInterface|CarbonInterval|int|null - */ - public function get(string $name) - { - $getter = $this->getGetter($name); - - if ($getter) { - return $getter(); - } - - throw new UnknownGetterException($name); - } - - /** - * Get a property allowing both `DatePeriod` snakeCase and camelCase names. - * - * @param string $name - * - * @return bool|CarbonInterface|CarbonInterval|int|null - */ - public function __get(string $name) - { - return $this->get($name); - } - - /** - * Check if an attribute exists on the object - * - * @param string $name - * - * @return bool - */ - public function __isset(string $name): bool - { - return $this->getGetter($name) !== null; - } - - /** - * @alias copy - * - * Get a copy of the instance. - * - * @return static - */ - public function clone() - { - return clone $this; - } - - /** - * Set the iteration item class. - * - * @param string $dateClass - * - * @return static - */ - public function setDateClass(string $dateClass) - { - if (!is_a($dateClass, CarbonInterface::class, true)) { - throw new NotACarbonClassException($dateClass); - } - - $self = $this->copyIfImmutable(); - $self->dateClass = $dateClass; - - if (is_a($dateClass, Carbon::class, true)) { - $self->options = $self->options & ~static::IMMUTABLE; - } elseif (is_a($dateClass, CarbonImmutable::class, true)) { - $self->options = $self->options | static::IMMUTABLE; - } - - return $self; - } - - /** - * Returns iteration item date class. - * - * @return string - */ - public function getDateClass(): string - { - return $this->dateClass; - } - - /** - * Change the period date interval. - * - * @param DateInterval|string $interval - * - * @throws InvalidIntervalException - * - * @return static - */ - public function setDateInterval($interval) - { - if (!$interval = CarbonInterval::make($interval)) { - throw new InvalidIntervalException('Invalid interval.'); - } - - if ($interval->spec() === 'PT0S' && !$interval->f && !$interval->getStep()) { - throw new InvalidIntervalException('Empty interval is not accepted.'); - } - - $self = $this->copyIfImmutable(); - $self->dateInterval = $interval; - - $self->isDefaultInterval = false; - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Invert the period date interval. - * - * @return static - */ - public function invertDateInterval() - { - return $this->setDateInterval($this->dateInterval->invert()); - } - - /** - * Set start and end date. - * - * @param DateTime|DateTimeInterface|string $start - * @param DateTime|DateTimeInterface|string|null $end - * - * @return static - */ - public function setDates($start, $end) - { - return $this->setStartDate($start)->setEndDate($end); - } - - /** - * Change the period options. - * - * @param int|null $options - * - * @throws InvalidArgumentException - * - * @return static - */ - public function setOptions($options) - { - if (!\is_int($options) && $options !== null) { - throw new InvalidPeriodParameterException('Invalid options.'); - } - - $self = $this->copyIfImmutable(); - $self->options = $options ?: 0; - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Get the period options. - * - * @return int - */ - public function getOptions() - { - return $this->options; - } - - /** - * Toggle given options on or off. - * - * @param int $options - * @param bool|null $state - * - * @throws \InvalidArgumentException - * - * @return static - */ - public function toggleOptions($options, $state = null) - { - if ($state === null) { - $state = ($this->options & $options) !== $options; - } - - return $this->setOptions( - $state ? - $this->options | $options : - $this->options & ~$options - ); - } - - /** - * Toggle EXCLUDE_START_DATE option. - * - * @param bool $state - * - * @return static - */ - public function excludeStartDate($state = true) - { - return $this->toggleOptions(static::EXCLUDE_START_DATE, $state); - } - - /** - * Toggle EXCLUDE_END_DATE option. - * - * @param bool $state - * - * @return static - */ - public function excludeEndDate($state = true) - { - return $this->toggleOptions(static::EXCLUDE_END_DATE, $state); - } - - /** - * Get the underlying date interval. - * - * @return CarbonInterval - */ - public function getDateInterval() - { - return $this->dateInterval->copy(); - } - - /** - * Get start date of the period. - * - * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. - * - * @return CarbonInterface - */ - public function getStartDate(string $rounding = null) - { - $date = $this->startDate->avoidMutation(); - - return $rounding ? $date->round($this->getDateInterval(), $rounding) : $date; - } - - /** - * Get end date of the period. - * - * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. - * - * @return CarbonInterface|null - */ - public function getEndDate(string $rounding = null) - { - if (!$this->endDate) { - return null; - } - - $date = $this->endDate->avoidMutation(); - - return $rounding ? $date->round($this->getDateInterval(), $rounding) : $date; - } - - /** - * Get number of recurrences. - * - * @return int|float|null - */ - public function getRecurrences() - { - return $this->recurrences; - } - - /** - * Returns true if the start date should be excluded. - * - * @return bool - */ - public function isStartExcluded() - { - return ($this->options & static::EXCLUDE_START_DATE) !== 0; - } - - /** - * Returns true if the end date should be excluded. - * - * @return bool - */ - public function isEndExcluded() - { - return ($this->options & static::EXCLUDE_END_DATE) !== 0; - } - - /** - * Returns true if the start date should be included. - * - * @return bool - */ - public function isStartIncluded() - { - return !$this->isStartExcluded(); - } - - /** - * Returns true if the end date should be included. - * - * @return bool - */ - public function isEndIncluded() - { - return !$this->isEndExcluded(); - } - - /** - * Return the start if it's included by option, else return the start + 1 period interval. - * - * @return CarbonInterface - */ - public function getIncludedStartDate() - { - $start = $this->getStartDate(); - - if ($this->isStartExcluded()) { - return $start->add($this->getDateInterval()); - } - - return $start; - } - - /** - * Return the end if it's included by option, else return the end - 1 period interval. - * Warning: if the period has no fixed end, this method will iterate the period to calculate it. - * - * @return CarbonInterface - */ - public function getIncludedEndDate() - { - $end = $this->getEndDate(); - - if (!$end) { - return $this->calculateEnd(); - } - - if ($this->isEndExcluded()) { - return $end->sub($this->getDateInterval()); - } - - return $end; - } - - /** - * Add a filter to the stack. - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * - * @param callable $callback - * @param string $name - * - * @return static - */ - public function addFilter($callback, $name = null) - { - $self = $this->copyIfImmutable(); - $tuple = $self->createFilterTuple(\func_get_args()); - - $self->filters[] = $tuple; - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Prepend a filter to the stack. - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * - * @param callable $callback - * @param string $name - * - * @return static - */ - public function prependFilter($callback, $name = null) - { - $self = $this->copyIfImmutable(); - $tuple = $self->createFilterTuple(\func_get_args()); - - array_unshift($self->filters, $tuple); - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Remove a filter by instance or name. - * - * @param callable|string $filter - * - * @return static - */ - public function removeFilter($filter) - { - $self = $this->copyIfImmutable(); - $key = \is_callable($filter) ? 0 : 1; - - $self->filters = array_values(array_filter( - $this->filters, - function ($tuple) use ($key, $filter) { - return $tuple[$key] !== $filter; - } - )); - - $self->updateInternalState(); - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Return whether given instance or name is in the filter stack. - * - * @param callable|string $filter - * - * @return bool - */ - public function hasFilter($filter) - { - $key = \is_callable($filter) ? 0 : 1; - - foreach ($this->filters as $tuple) { - if ($tuple[$key] === $filter) { - return true; - } - } - - return false; - } - - /** - * Get filters stack. - * - * @return array - */ - public function getFilters() - { - return $this->filters; - } - - /** - * Set filters stack. - * - * @param array $filters - * - * @return static - */ - public function setFilters(array $filters) - { - $self = $this->copyIfImmutable(); - $self->filters = $filters; - - $self->updateInternalState(); - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Reset filters stack. - * - * @return static - */ - public function resetFilters() - { - $self = $this->copyIfImmutable(); - $self->filters = []; - - if ($self->endDate !== null) { - $self->filters[] = [static::END_DATE_FILTER, null]; - } - - if ($self->recurrences !== null) { - $self->filters[] = [static::RECURRENCES_FILTER, null]; - } - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Add a recurrences filter (set maximum number of recurrences). - * - * @param int|float|null $recurrences - * - * @throws InvalidArgumentException - * - * @return static - */ - public function setRecurrences($recurrences) - { - if ((!is_numeric($recurrences) && $recurrences !== null) || $recurrences < 0) { - throw new InvalidPeriodParameterException('Invalid number of recurrences.'); - } - - if ($recurrences === null) { - return $this->removeFilter(static::RECURRENCES_FILTER); - } - - /** @var self $self */ - $self = $this->copyIfImmutable(); - $self->recurrences = $recurrences === INF ? INF : (int) $recurrences; - - if (!$self->hasFilter(static::RECURRENCES_FILTER)) { - return $self->addFilter(static::RECURRENCES_FILTER); - } - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Change the period start date. - * - * @param DateTime|DateTimeInterface|string $date - * @param bool|null $inclusive - * - * @throws InvalidPeriodDateException - * - * @return static - */ - public function setStartDate($date, $inclusive = null) - { - if (!$this->isInfiniteDate($date) && !($date = ([$this->dateClass, 'make'])($date))) { - throw new InvalidPeriodDateException('Invalid start date.'); - } - - $self = $this->copyIfImmutable(); - $self->startDate = $date; - - if ($inclusive !== null) { - $self = $self->toggleOptions(static::EXCLUDE_START_DATE, !$inclusive); - } - - return $self; - } - - /** - * Change the period end date. - * - * @param DateTime|DateTimeInterface|string|null $date - * @param bool|null $inclusive - * - * @throws \InvalidArgumentException - * - * @return static - */ - public function setEndDate($date, $inclusive = null) - { - if ($date !== null && !$this->isInfiniteDate($date) && !$date = ([$this->dateClass, 'make'])($date)) { - throw new InvalidPeriodDateException('Invalid end date.'); - } - - if (!$date) { - return $this->removeFilter(static::END_DATE_FILTER); - } - - $self = $this->copyIfImmutable(); - $self->endDate = $date; - - if ($inclusive !== null) { - $self = $self->toggleOptions(static::EXCLUDE_END_DATE, !$inclusive); - } - - if (!$self->hasFilter(static::END_DATE_FILTER)) { - return $self->addFilter(static::END_DATE_FILTER); - } - - $self->handleChangedParameters(); - - return $self; - } - - /** - * Check if the current position is valid. - * - * @return bool - */ - #[ReturnTypeWillChange] - public function valid() - { - return $this->validateCurrentDate() === true; - } - - /** - * Return the current key. - * - * @return int|null - */ - #[ReturnTypeWillChange] - public function key() - { - return $this->valid() - ? $this->key - : null; - } - - /** - * Return the current date. - * - * @return CarbonInterface|null - */ - #[ReturnTypeWillChange] - public function current() - { - return $this->valid() - ? $this->prepareForReturn($this->current) - : null; - } - - /** - * Move forward to the next date. - * - * @throws RuntimeException - * - * @return void - */ - #[ReturnTypeWillChange] - public function next() - { - if ($this->current === null) { - $this->rewind(); - } - - if ($this->validationResult !== static::END_ITERATION) { - $this->key++; - - $this->incrementCurrentDateUntilValid(); - } - } - - /** - * Rewind to the start date. - * - * Iterating over a date in the UTC timezone avoids bug during backward DST change. - * - * @see https://bugs.php.net/bug.php?id=72255 - * @see https://bugs.php.net/bug.php?id=74274 - * @see https://wiki.php.net/rfc/datetime_and_daylight_saving_time - * - * @throws RuntimeException - * - * @return void - */ - #[ReturnTypeWillChange] - public function rewind() - { - $this->key = 0; - $this->current = ([$this->dateClass, 'make'])($this->startDate); - $settings = $this->getSettings(); - - if ($this->hasLocalTranslator()) { - $settings['locale'] = $this->getTranslatorLocale(); - } - - $this->current->settings($settings); - $this->timezone = static::intervalHasTime($this->dateInterval) ? $this->current->getTimezone() : null; - - if ($this->timezone) { - $this->current = $this->current->utc(); - } - - $this->validationResult = null; - - if ($this->isStartExcluded() || $this->validateCurrentDate() === false) { - $this->incrementCurrentDateUntilValid(); - } - } - - /** - * Skip iterations and returns iteration state (false if ended, true if still valid). - * - * @param int $count steps number to skip (1 by default) - * - * @return bool - */ - public function skip($count = 1) - { - for ($i = $count; $this->valid() && $i > 0; $i--) { - $this->next(); - } - - return $this->valid(); - } - - /** - * Format the date period as ISO 8601. - * - * @return string - */ - public function toIso8601String() - { - $parts = []; - - if ($this->recurrences !== null) { - $parts[] = 'R'.$this->recurrences; - } - - $parts[] = $this->startDate->toIso8601String(); - - $parts[] = $this->dateInterval->spec(); - - if ($this->endDate !== null) { - $parts[] = $this->endDate->toIso8601String(); - } - - return implode('/', $parts); - } - - /** - * Convert the date period into a string. - * - * @return string - */ - public function toString() - { - $format = $this->localToStringFormat ?? static::$toStringFormat; - - if ($format instanceof Closure) { - return $format($this); - } - - $translator = ([$this->dateClass, 'getTranslator'])(); - - $parts = []; - - $format = $format ?? ( - !$this->startDate->isStartOfDay() || ($this->endDate && !$this->endDate->isStartOfDay()) - ? 'Y-m-d H:i:s' - : 'Y-m-d' - ); - - if ($this->recurrences !== null) { - $parts[] = $this->translate('period_recurrences', [], $this->recurrences, $translator); - } - - $parts[] = $this->translate('period_interval', [':interval' => $this->dateInterval->forHumans([ - 'join' => true, - ])], null, $translator); - - $parts[] = $this->translate('period_start_date', [':date' => $this->startDate->rawFormat($format)], null, $translator); - - if ($this->endDate !== null) { - $parts[] = $this->translate('period_end_date', [':date' => $this->endDate->rawFormat($format)], null, $translator); - } - - $result = implode(' ', $parts); - - return mb_strtoupper(mb_substr($result, 0, 1)).mb_substr($result, 1); - } - - /** - * Format the date period as ISO 8601. - * - * @return string - */ - public function spec() - { - return $this->toIso8601String(); - } - - /** - * Cast the current instance into the given class. - * - * @param string $className The $className::instance() method will be called to cast the current object. - * - * @return DatePeriod - */ - public function cast(string $className) - { - if (!method_exists($className, 'instance')) { - if (is_a($className, DatePeriod::class, true)) { - return new $className( - $this->rawDate($this->getStartDate()), - $this->getDateInterval(), - $this->getEndDate() ? $this->rawDate($this->getIncludedEndDate()) : $this->getRecurrences(), - $this->isStartExcluded() ? DatePeriod::EXCLUDE_START_DATE : 0 - ); - } - - throw new InvalidCastException("$className has not the instance() method needed to cast the date."); - } - - return $className::instance($this); - } - - /** - * Return native DatePeriod PHP object matching the current instance. - * - * @example - * ``` - * var_dump(CarbonPeriod::create('2021-01-05', '2021-02-15')->toDatePeriod()); - * ``` - * - * @return DatePeriod - */ - public function toDatePeriod() - { - return $this->cast(DatePeriod::class); - } - - /** - * Return `true` if the period has no custom filter and is guaranteed to be endless. - * - * Note that we can't check if a period is endless as soon as it has custom filters - * because filters can emit `CarbonPeriod::END_ITERATION` to stop the iteration in - * a way we can't predict without actually iterating the period. - */ - public function isUnfilteredAndEndLess(): bool - { - foreach ($this->filters as $filter) { - switch ($filter) { - case [static::RECURRENCES_FILTER, null]: - if ($this->recurrences !== null && is_finite($this->recurrences)) { - return false; - } - - break; - - case [static::END_DATE_FILTER, null]: - if ($this->endDate !== null && !$this->endDate->isEndOfTime()) { - return false; - } - - break; - - default: - return false; - } - } - - return true; - } - - /** - * Convert the date period into an array without changing current iteration state. - * - * @return CarbonInterface[] - */ - public function toArray() - { - if ($this->isUnfilteredAndEndLess()) { - throw new EndLessPeriodException("Endless period can't be converted to array nor counted."); - } - - $state = [ - $this->key, - $this->current ? $this->current->avoidMutation() : null, - $this->validationResult, - ]; - - $result = iterator_to_array($this); - - [$this->key, $this->current, $this->validationResult] = $state; - - return $result; - } - - /** - * Count dates in the date period. - * - * @return int - */ - #[ReturnTypeWillChange] - public function count() - { - return \count($this->toArray()); - } - - /** - * Return the first date in the date period. - * - * @return CarbonInterface|null - */ - public function first() - { - if ($this->isUnfilteredAndEndLess()) { - foreach ($this as $date) { - $this->rewind(); - - return $date; - } - - return null; - } - - return ($this->toArray() ?: [])[0] ?? null; - } - - /** - * Return the last date in the date period. - * - * @return CarbonInterface|null - */ - public function last() - { - $array = $this->toArray(); - - return $array ? $array[\count($array) - 1] : null; - } - - /** - * Convert the date period into a string. - * - * @return string - */ - public function __toString() - { - return $this->toString(); - } - - /** - * Add aliases for setters. - * - * CarbonPeriod::days(3)->hours(5)->invert() - * ->sinceNow()->until('2010-01-10') - * ->filter(...) - * ->count() - * - * Note: We use magic method to let static and instance aliases with the same names. - * - * @param string $method - * @param array $parameters - * - * @return mixed - */ - public function __call($method, $parameters) - { - if (static::hasMacro($method)) { - return static::bindMacroContext($this, function () use (&$method, &$parameters) { - return $this->callMacro($method, $parameters); - }); - } - - $roundedValue = $this->callRoundMethod($method, $parameters); - - if ($roundedValue !== null) { - return $roundedValue; - } - - switch ($method) { - case 'start': - case 'since': - self::setDefaultParameters($parameters, [ - [0, 'date', null], - ]); - - return $this->setStartDate(...$parameters); - - case 'sinceNow': - return $this->setStartDate(new Carbon(), ...$parameters); - - case 'end': - case 'until': - self::setDefaultParameters($parameters, [ - [0, 'date', null], - ]); - - return $this->setEndDate(...$parameters); - - case 'untilNow': - return $this->setEndDate(new Carbon(), ...$parameters); - - case 'dates': - case 'between': - self::setDefaultParameters($parameters, [ - [0, 'start', null], - [1, 'end', null], - ]); - - return $this->setDates(...$parameters); - - case 'recurrences': - case 'times': - self::setDefaultParameters($parameters, [ - [0, 'recurrences', null], - ]); - - return $this->setRecurrences(...$parameters); - - case 'options': - self::setDefaultParameters($parameters, [ - [0, 'options', null], - ]); - - return $this->setOptions(...$parameters); - - case 'toggle': - self::setDefaultParameters($parameters, [ - [0, 'options', null], - ]); - - return $this->toggleOptions(...$parameters); - - case 'filter': - case 'push': - return $this->addFilter(...$parameters); - - case 'prepend': - return $this->prependFilter(...$parameters); - - case 'filters': - self::setDefaultParameters($parameters, [ - [0, 'filters', []], - ]); - - return $this->setFilters(...$parameters); - - case 'interval': - case 'each': - case 'every': - case 'step': - case 'stepBy': - return $this->setDateInterval(...$parameters); - - case 'invert': - return $this->invertDateInterval(); - - case 'years': - case 'year': - case 'months': - case 'month': - case 'weeks': - case 'week': - case 'days': - case 'dayz': - case 'day': - case 'hours': - case 'hour': - case 'minutes': - case 'minute': - case 'seconds': - case 'second': - case 'milliseconds': - case 'millisecond': - case 'microseconds': - case 'microsecond': - return $this->setDateInterval(( - // Override default P1D when instantiating via fluent setters. - [$this->isDefaultInterval ? new CarbonInterval('PT0S') : $this->dateInterval, $method] - )(...$parameters)); - } - - $dateClass = $this->dateClass; - - if ($this->localStrictModeEnabled ?? $dateClass::isStrictModeEnabled()) { - throw new UnknownMethodException($method); - } - - return $this; - } - - /** - * Set the instance's timezone from a string or object and apply it to start/end. - * - * @param \DateTimeZone|string $timezone - * - * @return static - */ - public function setTimezone($timezone) - { - $self = $this->copyIfImmutable(); - $self->tzName = $timezone; - $self->timezone = $timezone; - - if ($self->startDate) { - $self = $self->setStartDate($self->startDate->setTimezone($timezone)); - } - - if ($self->endDate) { - $self = $self->setEndDate($self->endDate->setTimezone($timezone)); - } - - return $self; - } - - /** - * Set the instance's timezone from a string or object and add/subtract the offset difference to start/end. - * - * @param \DateTimeZone|string $timezone - * - * @return static - */ - public function shiftTimezone($timezone) - { - $self = $this->copyIfImmutable(); - $self->tzName = $timezone; - $self->timezone = $timezone; - - if ($self->startDate) { - $self = $self->setStartDate($self->startDate->shiftTimezone($timezone)); - } - - if ($self->endDate) { - $self = $self->setEndDate($self->endDate->shiftTimezone($timezone)); - } - - return $self; - } - - /** - * Returns the end is set, else calculated from start an recurrences. - * - * @param string|null $rounding Optional rounding 'floor', 'ceil', 'round' using the period interval. - * - * @return CarbonInterface - */ - public function calculateEnd(string $rounding = null) - { - if ($end = $this->getEndDate($rounding)) { - return $end; - } - - if ($this->dateInterval->isEmpty()) { - return $this->getStartDate($rounding); - } - - $date = $this->getEndFromRecurrences() ?? $this->iterateUntilEnd(); - - if ($date && $rounding) { - $date = $date->avoidMutation()->round($this->getDateInterval(), $rounding); - } - - return $date; - } - - /** - * @return CarbonInterface|null - */ - private function getEndFromRecurrences() - { - if ($this->recurrences === null) { - throw new UnreachableException( - "Could not calculate period end without either explicit end or recurrences.\n". - "If you're looking for a forever-period, use ->setRecurrences(INF)." - ); - } - - if ($this->recurrences === INF) { - $start = $this->getStartDate(); - - return $start < $start->avoidMutation()->add($this->getDateInterval()) - ? CarbonImmutable::endOfTime() - : CarbonImmutable::startOfTime(); - } - - if ($this->filters === [[static::RECURRENCES_FILTER, null]]) { - return $this->getStartDate()->avoidMutation()->add( - $this->getDateInterval()->times( - $this->recurrences - ($this->isStartExcluded() ? 0 : 1) - ) - ); - } - - return null; - } - - /** - * @return CarbonInterface|null - */ - private function iterateUntilEnd() - { - $attempts = 0; - $date = null; - - foreach ($this as $date) { - if (++$attempts > static::END_MAX_ATTEMPTS) { - throw new UnreachableException( - 'Could not calculate period end after iterating '.static::END_MAX_ATTEMPTS.' times.' - ); - } - } - - return $date; - } - - /** - * Returns true if the current period overlaps the given one (if 1 parameter passed) - * or the period between 2 dates (if 2 parameters passed). - * - * @param CarbonPeriod|\DateTimeInterface|Carbon|CarbonImmutable|string $rangeOrRangeStart - * @param \DateTimeInterface|Carbon|CarbonImmutable|string|null $rangeEnd - * - * @return bool - */ - public function overlaps($rangeOrRangeStart, $rangeEnd = null) - { - $range = $rangeEnd ? static::create($rangeOrRangeStart, $rangeEnd) : $rangeOrRangeStart; - - if (!($range instanceof self)) { - $range = static::create($range); - } - - [$start, $end] = $this->orderCouple($this->getStartDate(), $this->calculateEnd()); - [$rangeStart, $rangeEnd] = $this->orderCouple($range->getStartDate(), $range->calculateEnd()); - - return $end > $rangeStart && $rangeEnd > $start; - } - - /** - * Execute a given function on each date of the period. - * - * @example - * ``` - * Carbon::create('2020-11-29')->daysUntil('2020-12-24')->forEach(function (Carbon $date) { - * echo $date->diffInDays('2020-12-25')." days before Christmas!\n"; - * }); - * ``` - * - * @param callable $callback - */ - public function forEach(callable $callback) - { - foreach ($this as $date) { - $callback($date); - } - } - - /** - * Execute a given function on each date of the period and yield the result of this function. - * - * @example - * ``` - * $period = Carbon::create('2020-11-29')->daysUntil('2020-12-24'); - * echo implode("\n", iterator_to_array($period->map(function (Carbon $date) { - * return $date->diffInDays('2020-12-25').' days before Christmas!'; - * }))); - * ``` - * - * @param callable $callback - * - * @return \Generator - */ - public function map(callable $callback) - { - foreach ($this as $date) { - yield $callback($date); - } - } - - /** - * Determines if the instance is equal to another. - * Warning: if options differ, instances will never be equal. - * - * @param mixed $period - * - * @see equalTo() - * - * @return bool - */ - public function eq($period): bool - { - return $this->equalTo($period); - } - - /** - * Determines if the instance is equal to another. - * Warning: if options differ, instances will never be equal. - * - * @param mixed $period - * - * @return bool - */ - public function equalTo($period): bool - { - if (!($period instanceof self)) { - $period = self::make($period); - } - - $end = $this->getEndDate(); - - return $period !== null - && $this->getDateInterval()->eq($period->getDateInterval()) - && $this->getStartDate()->eq($period->getStartDate()) - && ($end ? $end->eq($period->getEndDate()) : $this->getRecurrences() === $period->getRecurrences()) - && ($this->getOptions() & (~static::IMMUTABLE)) === ($period->getOptions() & (~static::IMMUTABLE)); - } - - /** - * Determines if the instance is not equal to another. - * Warning: if options differ, instances will never be equal. - * - * @param mixed $period - * - * @see notEqualTo() - * - * @return bool - */ - public function ne($period): bool - { - return $this->notEqualTo($period); - } - - /** - * Determines if the instance is not equal to another. - * Warning: if options differ, instances will never be equal. - * - * @param mixed $period - * - * @return bool - */ - public function notEqualTo($period): bool - { - return !$this->eq($period); - } - - /** - * Determines if the start date is before an other given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function startsBefore($date = null): bool - { - return $this->getStartDate()->lessThan($this->resolveCarbon($date)); - } - - /** - * Determines if the start date is before or the same as a given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function startsBeforeOrAt($date = null): bool - { - return $this->getStartDate()->lessThanOrEqualTo($this->resolveCarbon($date)); - } - - /** - * Determines if the start date is after an other given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function startsAfter($date = null): bool - { - return $this->getStartDate()->greaterThan($this->resolveCarbon($date)); - } - - /** - * Determines if the start date is after or the same as a given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function startsAfterOrAt($date = null): bool - { - return $this->getStartDate()->greaterThanOrEqualTo($this->resolveCarbon($date)); - } - - /** - * Determines if the start date is the same as a given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function startsAt($date = null): bool - { - return $this->getStartDate()->equalTo($this->resolveCarbon($date)); - } - - /** - * Determines if the end date is before an other given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function endsBefore($date = null): bool - { - return $this->calculateEnd()->lessThan($this->resolveCarbon($date)); - } - - /** - * Determines if the end date is before or the same as a given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function endsBeforeOrAt($date = null): bool - { - return $this->calculateEnd()->lessThanOrEqualTo($this->resolveCarbon($date)); - } - - /** - * Determines if the end date is after an other given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function endsAfter($date = null): bool - { - return $this->calculateEnd()->greaterThan($this->resolveCarbon($date)); - } - - /** - * Determines if the end date is after or the same as a given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function endsAfterOrAt($date = null): bool - { - return $this->calculateEnd()->greaterThanOrEqualTo($this->resolveCarbon($date)); - } - - /** - * Determines if the end date is the same as a given date. - * (Rather start/end are included by options is ignored.) - * - * @param mixed $date - * - * @return bool - */ - public function endsAt($date = null): bool - { - return $this->calculateEnd()->equalTo($this->resolveCarbon($date)); - } - - /** - * Return true if start date is now or later. - * (Rather start/end are included by options is ignored.) - * - * @return bool - */ - public function isStarted(): bool - { - return $this->startsBeforeOrAt(); - } - - /** - * Return true if end date is now or later. - * (Rather start/end are included by options is ignored.) - * - * @return bool - */ - public function isEnded(): bool - { - return $this->endsBeforeOrAt(); - } - - /** - * Return true if now is between start date (included) and end date (excluded). - * (Rather start/end are included by options is ignored.) - * - * @return bool - */ - public function isInProgress(): bool - { - return $this->isStarted() && !$this->isEnded(); - } - - /** - * Round the current instance at the given unit with given precision if specified and the given function. - * - * @param string $unit - * @param float|int|string|\DateInterval|null $precision - * @param string $function - * - * @return static - */ - public function roundUnit($unit, $precision = 1, $function = 'round') - { - $self = $this->copyIfImmutable(); - $self = $self->setStartDate($self->getStartDate()->roundUnit($unit, $precision, $function)); - - if ($self->endDate) { - $self = $self->setEndDate($self->getEndDate()->roundUnit($unit, $precision, $function)); - } - - return $self->setDateInterval($self->getDateInterval()->roundUnit($unit, $precision, $function)); - } - - /** - * Truncate the current instance at the given unit with given precision if specified. - * - * @param string $unit - * @param float|int|string|\DateInterval|null $precision - * - * @return static - */ - public function floorUnit($unit, $precision = 1) - { - return $this->roundUnit($unit, $precision, 'floor'); - } - - /** - * Ceil the current instance at the given unit with given precision if specified. - * - * @param string $unit - * @param float|int|string|\DateInterval|null $precision - * - * @return static - */ - public function ceilUnit($unit, $precision = 1) - { - return $this->roundUnit($unit, $precision, 'ceil'); - } - - /** - * Round the current instance second with given precision if specified (else period interval is used). - * - * @param float|int|string|\DateInterval|null $precision - * @param string $function - * - * @return static - */ - public function round($precision = null, $function = 'round') - { - return $this->roundWith( - $precision ?? $this->getDateInterval()->setLocalTranslator(TranslatorImmutable::get('en'))->forHumans(), - $function - ); - } - - /** - * Round the current instance second with given precision if specified (else period interval is used). - * - * @param float|int|string|\DateInterval|null $precision - * - * @return static - */ - public function floor($precision = null) - { - return $this->round($precision, 'floor'); - } - - /** - * Ceil the current instance second with given precision if specified (else period interval is used). - * - * @param float|int|string|\DateInterval|null $precision - * - * @return static - */ - public function ceil($precision = null) - { - return $this->round($precision, 'ceil'); - } - - /** - * Specify data which should be serialized to JSON. - * - * @link https://php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return CarbonInterface[] - */ - #[ReturnTypeWillChange] - public function jsonSerialize() - { - return $this->toArray(); - } - - /** - * Return true if the given date is between start and end. - * - * @param \Carbon\Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|\DateTimeInterface|string|null $date - * - * @return bool - */ - public function contains($date = null): bool - { - $startMethod = 'startsBefore'.($this->isStartIncluded() ? 'OrAt' : ''); - $endMethod = 'endsAfter'.($this->isEndIncluded() ? 'OrAt' : ''); - - return $this->$startMethod($date) && $this->$endMethod($date); - } - - /** - * Return true if the current period follows a given other period (with no overlap). - * For instance, [2019-08-01 -> 2019-08-12] follows [2019-07-29 -> 2019-07-31] - * Note than in this example, follows() would be false if 2019-08-01 or 2019-07-31 was excluded by options. - * - * @param \Carbon\CarbonPeriod|\DatePeriod|string $period - * - * @return bool - */ - public function follows($period, ...$arguments): bool - { - $period = $this->resolveCarbonPeriod($period, ...$arguments); - - return $this->getIncludedStartDate()->equalTo($period->getIncludedEndDate()->add($period->getDateInterval())); - } - - /** - * Return true if the given other period follows the current one (with no overlap). - * For instance, [2019-07-29 -> 2019-07-31] is followed by [2019-08-01 -> 2019-08-12] - * Note than in this example, isFollowedBy() would be false if 2019-08-01 or 2019-07-31 was excluded by options. - * - * @param \Carbon\CarbonPeriod|\DatePeriod|string $period - * - * @return bool - */ - public function isFollowedBy($period, ...$arguments): bool - { - $period = $this->resolveCarbonPeriod($period, ...$arguments); - - return $period->follows($this); - } - - /** - * Return true if the given period either follows or is followed by the current one. - * - * @see follows() - * @see isFollowedBy() - * - * @param \Carbon\CarbonPeriod|\DatePeriod|string $period - * - * @return bool - */ - public function isConsecutiveWith($period, ...$arguments): bool - { - return $this->follows($period, ...$arguments) || $this->isFollowedBy($period, ...$arguments); - } - - /** - * Update properties after removing built-in filters. - * - * @return void - */ - protected function updateInternalState() - { - if (!$this->hasFilter(static::END_DATE_FILTER)) { - $this->endDate = null; - } - - if (!$this->hasFilter(static::RECURRENCES_FILTER)) { - $this->recurrences = null; - } - } - - /** - * Create a filter tuple from raw parameters. - * - * Will create an automatic filter callback for one of Carbon's is* methods. - * - * @param array $parameters - * - * @return array - */ - protected function createFilterTuple(array $parameters) - { - $method = array_shift($parameters); - - if (!$this->isCarbonPredicateMethod($method)) { - return [$method, array_shift($parameters)]; - } - - return [function ($date) use ($method, $parameters) { - return ([$date, $method])(...$parameters); - }, $method]; - } - - /** - * Return whether given callable is a string pointing to one of Carbon's is* methods - * and should be automatically converted to a filter callback. - * - * @param callable $callable - * - * @return bool - */ - protected function isCarbonPredicateMethod($callable) - { - return \is_string($callable) && str_starts_with($callable, 'is') && - (method_exists($this->dateClass, $callable) || ([$this->dateClass, 'hasMacro'])($callable)); - } - - /** - * Recurrences filter callback (limits number of recurrences). - * - * @SuppressWarnings(PHPMD.UnusedFormalParameter) - * - * @param \Carbon\Carbon $current - * @param int $key - * - * @return bool|string - */ - protected function filterRecurrences($current, $key) - { - if ($key < $this->recurrences) { - return true; - } - - return static::END_ITERATION; - } - - /** - * End date filter callback. - * - * @param \Carbon\Carbon $current - * - * @return bool|string - */ - protected function filterEndDate($current) - { - if (!$this->isEndExcluded() && $current == $this->endDate) { - return true; - } - - if ($this->dateInterval->invert ? $current > $this->endDate : $current < $this->endDate) { - return true; - } - - return static::END_ITERATION; - } - - /** - * End iteration filter callback. - * - * @return string - */ - protected function endIteration() - { - return static::END_ITERATION; - } - - /** - * Handle change of the parameters. - */ - protected function handleChangedParameters() - { - if (($this->getOptions() & static::IMMUTABLE) && $this->dateClass === Carbon::class) { - $this->dateClass = CarbonImmutable::class; - } elseif (!($this->getOptions() & static::IMMUTABLE) && $this->dateClass === CarbonImmutable::class) { - $this->dateClass = Carbon::class; - } - - $this->validationResult = null; - } - - /** - * Validate current date and stop iteration when necessary. - * - * Returns true when current date is valid, false if it is not, or static::END_ITERATION - * when iteration should be stopped. - * - * @return bool|string - */ - protected function validateCurrentDate() - { - if ($this->current === null) { - $this->rewind(); - } - - // Check after the first rewind to avoid repeating the initial validation. - return $this->validationResult ?? ($this->validationResult = $this->checkFilters()); - } - - /** - * Check whether current value and key pass all the filters. - * - * @return bool|string - */ - protected function checkFilters() - { - $current = $this->prepareForReturn($this->current); - - foreach ($this->filters as $tuple) { - $result = \call_user_func( - $tuple[0], - $current->avoidMutation(), - $this->key, - $this - ); - - if ($result === static::END_ITERATION) { - return static::END_ITERATION; - } - - if (!$result) { - return false; - } - } - - return true; - } - - /** - * Prepare given date to be returned to the external logic. - * - * @param CarbonInterface $date - * - * @return CarbonInterface - */ - protected function prepareForReturn(CarbonInterface $date) - { - $date = ([$this->dateClass, 'make'])($date); - - if ($this->timezone) { - $date = $date->setTimezone($this->timezone); - } - - return $date; - } - - /** - * Keep incrementing the current date until a valid date is found or the iteration is ended. - * - * @throws RuntimeException - * - * @return void - */ - protected function incrementCurrentDateUntilValid() - { - $attempts = 0; - - do { - $this->current = $this->current->add($this->dateInterval); - - $this->validationResult = null; - - if (++$attempts > static::NEXT_MAX_ATTEMPTS) { - throw new UnreachableException('Could not find next valid date.'); - } - } while ($this->validateCurrentDate() === false); - } - - /** - * Call given macro. - * - * @param string $name - * @param array $parameters - * - * @return mixed - */ - protected function callMacro($name, $parameters) - { - $macro = static::$macros[$name]; - - if ($macro instanceof Closure) { - $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); - - return ($boundMacro ?: $macro)(...$parameters); - } - - return $macro(...$parameters); - } - - /** - * Return the Carbon instance passed through, a now instance in the same timezone - * if null given or parse the input if string given. - * - * @param \Carbon\Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|\DateTimeInterface|string|null $date - * - * @return \Carbon\CarbonInterface - */ - protected function resolveCarbon($date = null) - { - return $this->getStartDate()->nowWithSameTz()->carbonize($date); - } - - /** - * Resolve passed arguments or DatePeriod to a CarbonPeriod object. - * - * @param mixed $period - * @param mixed ...$arguments - * - * @return static - */ - protected function resolveCarbonPeriod($period, ...$arguments) - { - if ($period instanceof self) { - return $period; - } - - return $period instanceof DatePeriod - ? static::instance($period) - : static::create($period, ...$arguments); - } - - private function orderCouple($first, $second): array - { - return $first > $second ? [$second, $first] : [$first, $second]; - } - - private function makeDateTime($value): ?DateTimeInterface - { - if ($value instanceof DateTimeInterface) { - return $value; - } - - if (\is_string($value)) { - $value = trim($value); - - if (!preg_match('/^P[\dT]/', $value) && - !preg_match('/^R\d/', $value) && - preg_match('/[a-z\d]/i', $value) - ) { - $dateClass = $this->dateClass; - - return $dateClass::parse($value, $this->tzName); - } - } - - return null; - } - - private function isInfiniteDate($date): bool - { - return $date instanceof CarbonInterface && ($date->isEndOfTime() || $date->isStartOfTime()); - } - - private function rawDate($date): ?DateTimeInterface - { - if ($date === false || $date === null) { - return null; - } - - if ($date instanceof CarbonInterface) { - return $date->isMutable() - ? $date->toDateTime() - : $date->toDateTimeImmutable(); - } - - if (\in_array(\get_class($date), [DateTime::class, DateTimeImmutable::class], true)) { - return $date; - } - - $class = $date instanceof DateTime ? DateTime::class : DateTimeImmutable::class; - - return new $class($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); - } - - private static function setDefaultParameters(array &$parameters, array $defaults): void - { - foreach ($defaults as [$index, $name, $value]) { - if (!\array_key_exists($index, $parameters) && !\array_key_exists($name, $parameters)) { - $parameters[$index] = $value; - } - } - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php b/vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php deleted file mode 100644 index f0d0ee2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/CarbonPeriodImmutable.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -class CarbonPeriodImmutable extends CarbonPeriod -{ - /** - * Default date class of iteration items. - * - * @var string - */ - protected const DEFAULT_DATE_CLASS = CarbonImmutable::class; - - /** - * Date class of iteration items. - * - * @var string - */ - protected $dateClass = CarbonImmutable::class; - - /** - * Prepare the instance to be set (self if mutable to be mutated, - * copy if immutable to generate a new instance). - * - * @return static - */ - protected function copyIfImmutable() - { - return $this->constructed ? clone $this : $this; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php b/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php deleted file mode 100644 index c81899f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/CarbonTimeZone.php +++ /dev/null @@ -1,320 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Carbon\Exceptions\InvalidCastException; -use Carbon\Exceptions\InvalidTimeZoneException; -use DateTimeInterface; -use DateTimeZone; -use Throwable; - -class CarbonTimeZone extends DateTimeZone -{ - public function __construct($timezone = null) - { - parent::__construct(static::getDateTimeZoneNameFromMixed($timezone)); - } - - protected static function parseNumericTimezone($timezone) - { - if ($timezone <= -100 || $timezone >= 100) { - throw new InvalidTimeZoneException('Absolute timezone offset cannot be greater than 100.'); - } - - return ($timezone >= 0 ? '+' : '').ltrim($timezone, '+').':00'; - } - - protected static function getDateTimeZoneNameFromMixed($timezone) - { - if ($timezone === null) { - return date_default_timezone_get(); - } - - if (\is_string($timezone)) { - $timezone = preg_replace('/^\s*([+-]\d+)(\d{2})\s*$/', '$1:$2', $timezone); - } - - if (is_numeric($timezone)) { - return static::parseNumericTimezone($timezone); - } - - return $timezone; - } - - protected static function getDateTimeZoneFromName(&$name) - { - return @timezone_open($name = (string) static::getDateTimeZoneNameFromMixed($name)); - } - - /** - * Cast the current instance into the given class. - * - * @param string $className The $className::instance() method will be called to cast the current object. - * - * @return DateTimeZone - */ - public function cast(string $className) - { - if (!method_exists($className, 'instance')) { - if (is_a($className, DateTimeZone::class, true)) { - return new $className($this->getName()); - } - - throw new InvalidCastException("$className has not the instance() method needed to cast the date."); - } - - return $className::instance($this); - } - - /** - * Create a CarbonTimeZone from mixed input. - * - * @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it. - * @param DateTimeZone|string|int|null $objectDump dump of the object for error messages. - * - * @throws InvalidTimeZoneException - * - * @return false|static - */ - public static function instance($object = null, $objectDump = null) - { - $tz = $object; - - if ($tz instanceof static) { - return $tz; - } - - if ($tz === null) { - return new static(); - } - - if (!$tz instanceof DateTimeZone) { - $tz = static::getDateTimeZoneFromName($object); - } - - if ($tz !== false) { - return new static($tz->getName()); - } - - if (Carbon::isStrictModeEnabled()) { - throw new InvalidTimeZoneException('Unknown or bad timezone ('.($objectDump ?: $object).')'); - } - - return false; - } - - /** - * Returns abbreviated name of the current timezone according to DST setting. - * - * @param bool $dst - * - * @return string - */ - public function getAbbreviatedName($dst = false) - { - $name = $this->getName(); - - foreach ($this->listAbbreviations() as $abbreviation => $zones) { - foreach ($zones as $zone) { - if ($zone['timezone_id'] === $name && $zone['dst'] == $dst) { - return $abbreviation; - } - } - } - - return 'unknown'; - } - - /** - * @alias getAbbreviatedName - * - * Returns abbreviated name of the current timezone according to DST setting. - * - * @param bool $dst - * - * @return string - */ - public function getAbbr($dst = false) - { - return $this->getAbbreviatedName($dst); - } - - /** - * Get the offset as string "sHH:MM" (such as "+00:00" or "-12:30"). - * - * @param DateTimeInterface|null $date - * - * @return string - */ - public function toOffsetName(DateTimeInterface $date = null) - { - return static::getOffsetNameFromMinuteOffset( - $this->getOffset($date ?: Carbon::now($this)) / 60 - ); - } - - /** - * Returns a new CarbonTimeZone object using the offset string instead of region string. - * - * @param DateTimeInterface|null $date - * - * @return CarbonTimeZone - */ - public function toOffsetTimeZone(DateTimeInterface $date = null) - { - return new static($this->toOffsetName($date)); - } - - /** - * Returns the first region string (such as "America/Toronto") that matches the current timezone or - * false if no match is found. - * - * @see timezone_name_from_abbr native PHP function. - * - * @param DateTimeInterface|null $date - * @param int $isDst - * - * @return string|false - */ - public function toRegionName(DateTimeInterface $date = null, $isDst = 1) - { - $name = $this->getName(); - $firstChar = substr($name, 0, 1); - - if ($firstChar !== '+' && $firstChar !== '-') { - return $name; - } - - $date = $date ?: Carbon::now($this); - - // Integer construction no longer supported since PHP 8 - // @codeCoverageIgnoreStart - try { - $offset = @$this->getOffset($date) ?: 0; - } catch (Throwable $e) { - $offset = 0; - } - // @codeCoverageIgnoreEnd - - $name = @timezone_name_from_abbr('', $offset, $isDst); - - if ($name) { - return $name; - } - - foreach (timezone_identifiers_list() as $timezone) { - if (Carbon::instance($date)->tz($timezone)->getOffset() === $offset) { - return $timezone; - } - } - - return false; - } - - /** - * Returns a new CarbonTimeZone object using the region string instead of offset string. - * - * @param DateTimeInterface|null $date - * - * @return CarbonTimeZone|false - */ - public function toRegionTimeZone(DateTimeInterface $date = null) - { - $tz = $this->toRegionName($date); - - if ($tz !== false) { - return new static($tz); - } - - if (Carbon::isStrictModeEnabled()) { - throw new InvalidTimeZoneException('Unknown timezone for offset '.$this->getOffset($date ?: Carbon::now($this)).' seconds.'); - } - - return false; - } - - /** - * Cast to string (get timezone name). - * - * @return string - */ - public function __toString() - { - return $this->getName(); - } - - /** - * Return the type number: - * - * Type 1; A UTC offset, such as -0300 - * Type 2; A timezone abbreviation, such as GMT - * Type 3: A timezone identifier, such as Europe/London - */ - public function getType(): int - { - return preg_match('/"timezone_type";i:(\d)/', serialize($this), $match) ? (int) $match[1] : 3; - } - - /** - * Create a CarbonTimeZone from mixed input. - * - * @param DateTimeZone|string|int|null $object - * - * @return false|static - */ - public static function create($object = null) - { - return static::instance($object); - } - - /** - * Create a CarbonTimeZone from int/float hour offset. - * - * @param float $hourOffset number of hour of the timezone shift (can be decimal). - * - * @return false|static - */ - public static function createFromHourOffset(float $hourOffset) - { - return static::createFromMinuteOffset($hourOffset * Carbon::MINUTES_PER_HOUR); - } - - /** - * Create a CarbonTimeZone from int/float minute offset. - * - * @param float $minuteOffset number of total minutes of the timezone shift. - * - * @return false|static - */ - public static function createFromMinuteOffset(float $minuteOffset) - { - return static::instance(static::getOffsetNameFromMinuteOffset($minuteOffset)); - } - - /** - * Convert a total minutes offset into a standardized timezone offset string. - * - * @param float $minutes number of total minutes of the timezone shift. - * - * @return string - */ - public static function getOffsetNameFromMinuteOffset(float $minutes): string - { - $minutes = round($minutes); - $unsignedMinutes = abs($minutes); - - return ($minutes < 0 ? '-' : '+'). - str_pad((string) floor($unsignedMinutes / 60), 2, '0', STR_PAD_LEFT). - ':'. - str_pad((string) ($unsignedMinutes % 60), 2, '0', STR_PAD_LEFT); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php b/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php deleted file mode 100644 index 4f35d6c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Cli/Invoker.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Cli; - -class Invoker -{ - public const CLI_CLASS_NAME = 'Carbon\\Cli'; - - protected function runWithCli(string $className, array $parameters): bool - { - $cli = new $className(); - - return $cli(...$parameters); - } - - public function __invoke(...$parameters): bool - { - if (class_exists(self::CLI_CLASS_NAME)) { - return $this->runWithCli(self::CLI_CLASS_NAME, $parameters); - } - - $function = (($parameters[1] ?? '') === 'install' ? ($parameters[2] ?? null) : null) ?: 'shell_exec'; - $function('composer require carbon-cli/carbon-cli --no-interaction'); - - echo 'Installation succeeded.'; - - return true; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php deleted file mode 100644 index 3ca8837..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use Throwable; - -class BadComparisonUnitException extends UnitException -{ - /** - * The unit. - * - * @var string - */ - protected $unit; - - /** - * Constructor. - * - * @param string $unit - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($unit, $code = 0, Throwable $previous = null) - { - $this->unit = $unit; - - parent::__construct("Bad comparison unit: '$unit'", $code, $previous); - } - - /** - * Get the unit. - * - * @return string - */ - public function getUnit(): string - { - return $this->unit; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php deleted file mode 100644 index 2e222e5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use BadMethodCallException as BaseBadMethodCallException; -use Throwable; - -class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException -{ - /** - * The method. - * - * @var string - */ - protected $method; - - /** - * Constructor. - * - * @param string $method - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($method, $code = 0, Throwable $previous = null) - { - $this->method = $method; - - parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous); - } - - /** - * Get the method. - * - * @return string - */ - public function getMethod(): string - { - return $this->method; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php deleted file mode 100644 index 4ceaa2e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use BadMethodCallException as BaseBadMethodCallException; -use Throwable; - -class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException -{ - /** - * The setter. - * - * @var string - */ - protected $setter; - - /** - * Constructor. - * - * @param string $setter - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($setter, $code = 0, Throwable $previous = null) - { - $this->setter = $setter; - - parent::__construct(sprintf("Unknown fluent setter '%s'", $setter), $code, $previous); - } - - /** - * Get the setter. - * - * @return string - */ - public function getSetter(): string - { - return $this->setter; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php deleted file mode 100644 index 108206d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -interface BadMethodCallException extends Exception -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php deleted file mode 100644 index e104926..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use RuntimeException as BaseRuntimeException; - -final class EndLessPeriodException extends BaseRuntimeException implements RuntimeException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php deleted file mode 100644 index 8ad747e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/Exception.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -interface Exception -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php deleted file mode 100644 index db334c6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use RuntimeException as BaseRuntimeException; -use Throwable; - -class ImmutableException extends BaseRuntimeException implements RuntimeException -{ - /** - * The value. - * - * @var string - */ - protected $value; - - /** - * Constructor. - * - * @param string $value the immutable type/value - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($value, $code = 0, Throwable $previous = null) - { - $this->value = $value; - parent::__construct("$value is immutable.", $code, $previous); - } - - /** - * Get the value. - * - * @return string - */ - public function getValue(): string - { - return $this->value; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php deleted file mode 100644 index 5b013cd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -interface InvalidArgumentException extends Exception -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php deleted file mode 100644 index a421401..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php deleted file mode 100644 index c9ecb6b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; -use Throwable; - -class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - /** - * The invalid field. - * - * @var string - */ - private $field; - - /** - * The invalid value. - * - * @var mixed - */ - private $value; - - /** - * Constructor. - * - * @param string $field - * @param mixed $value - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($field, $value, $code = 0, Throwable $previous = null) - { - $this->field = $field; - $this->value = $value; - parent::__construct($field.' : '.$value.' is not a valid value.', $code, $previous); - } - - /** - * Get the invalid field. - * - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * Get the invalid value. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php deleted file mode 100644 index 92d55fe..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php deleted file mode 100644 index 69cf412..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php deleted file mode 100644 index 9bd84a9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php deleted file mode 100644 index cf2c902..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php deleted file mode 100644 index f725955..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php deleted file mode 100644 index 2c8ec9b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php deleted file mode 100644 index 7a87632..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use Carbon\CarbonInterface; -use InvalidArgumentException as BaseInvalidArgumentException; -use Throwable; - -class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - /** - * The className. - * - * @var string - */ - protected $className; - - /** - * Constructor. - * - * @param string $className - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($className, $code = 0, Throwable $previous = null) - { - $this->className = $className; - - parent::__construct(sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous); - } - - /** - * Get the className. - * - * @return string - */ - public function getClassName(): string - { - return $this->className; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php deleted file mode 100644 index 4edd7a4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php deleted file mode 100644 index f2c5468..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; -use Throwable; - -class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - /** - * Constructor. - * - * @param mixed $object - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($object, $code = 0, Throwable $previous = null) - { - $dump = \is_object($object) ? \get_class($object) : \gettype($object); - - parent::__construct("$dump does neither implements Symfony\Contracts\Translation\LocaleAwareInterface nor getLocale() method.", $code, $previous); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php deleted file mode 100644 index 2c586d0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; -use Throwable; - -// This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0 -// use OutOfRangeException as BaseOutOfRangeException; - -class OutOfRangeException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - /** - * The unit or name of the value. - * - * @var string - */ - private $unit; - - /** - * The range minimum. - * - * @var mixed - */ - private $min; - - /** - * The range maximum. - * - * @var mixed - */ - private $max; - - /** - * The invalid value. - * - * @var mixed - */ - private $value; - - /** - * Constructor. - * - * @param string $unit - * @param mixed $min - * @param mixed $max - * @param mixed $value - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null) - { - $this->unit = $unit; - $this->min = $min; - $this->max = $max; - $this->value = $value; - - parent::__construct("$unit must be between $min and $max, $value given", $code, $previous); - } - - /** - * @return mixed - */ - public function getMax() - { - return $this->max; - } - - /** - * @return mixed - */ - public function getMin() - { - return $this->min; - } - - /** - * @return mixed - */ - public function getUnit() - { - return $this->unit; - } - - /** - * @return mixed - */ - public function getValue() - { - return $this->value; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php deleted file mode 100644 index 5416fd1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; -use Throwable; - -class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - /** - * The expected. - * - * @var string - */ - protected $expected; - - /** - * The actual. - * - * @var string - */ - protected $actual; - - /** - * The help message. - * - * @var string - */ - protected $help; - - /** - * Constructor. - * - * @param string $expected - * @param string $actual - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null) - { - $this->expected = $expected; - $this->actual = $actual; - $this->help = $help; - - $actual = $actual === '' ? 'data is missing' : "get '$actual'"; - - parent::__construct(trim("Format expected $expected but $actual\n$help"), $code, $previous); - } - - /** - * Get the expected. - * - * @return string - */ - public function getExpected(): string - { - return $this->expected; - } - - /** - * Get the actual. - * - * @return string - */ - public function getActual(): string - { - return $this->actual; - } - - /** - * Get the help message. - * - * @return string - */ - public function getHelp(): string - { - return $this->help; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php deleted file mode 100644 index ad196f7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -interface RuntimeException extends Exception -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php deleted file mode 100644 index ee99953..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; - -class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php deleted file mode 100644 index 0e72305..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use Throwable; - -class UnitNotConfiguredException extends UnitException -{ - /** - * The unit. - * - * @var string - */ - protected $unit; - - /** - * Constructor. - * - * @param string $unit - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($unit, $code = 0, Throwable $previous = null) - { - $this->unit = $unit; - - parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous); - } - - /** - * Get the unit. - * - * @return string - */ - public function getUnit(): string - { - return $this->unit; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php deleted file mode 100644 index 5c50497..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; -use Throwable; - -class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException -{ - /** - * The getter. - * - * @var string - */ - protected $getter; - - /** - * Constructor. - * - * @param string $getter getter name - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($getter, $code = 0, Throwable $previous = null) - { - $this->getter = $getter; - - parent::__construct("Unknown getter '$getter'", $code, $previous); - } - - /** - * Get the getter. - * - * @return string - */ - public function getGetter(): string - { - return $this->getter; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php deleted file mode 100644 index 75273a7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use BadMethodCallException as BaseBadMethodCallException; -use Throwable; - -class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException -{ - /** - * The method. - * - * @var string - */ - protected $method; - - /** - * Constructor. - * - * @param string $method - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($method, $code = 0, Throwable $previous = null) - { - $this->method = $method; - - parent::__construct("Method $method does not exist.", $code, $previous); - } - - /** - * Get the method. - * - * @return string - */ - public function getMethod(): string - { - return $this->method; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php deleted file mode 100644 index a795f5d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use InvalidArgumentException as BaseInvalidArgumentException; -use Throwable; - -class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException -{ - /** - * The setter. - * - * @var string - */ - protected $setter; - - /** - * Constructor. - * - * @param string $setter setter name - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($setter, $code = 0, Throwable $previous = null) - { - $this->setter = $setter; - - parent::__construct("Unknown setter '$setter'", $code, $previous); - } - - /** - * Get the setter. - * - * @return string - */ - public function getSetter(): string - { - return $this->setter; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php deleted file mode 100644 index ecd7f7a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use Throwable; - -class UnknownUnitException extends UnitException -{ - /** - * The unit. - * - * @var string - */ - protected $unit; - - /** - * Constructor. - * - * @param string $unit - * @param int $code - * @param Throwable|null $previous - */ - public function __construct($unit, $code = 0, Throwable $previous = null) - { - $this->unit = $unit; - - parent::__construct("Unknown unit '$unit'.", $code, $previous); - } - - /** - * Get the unit. - * - * @return string - */ - public function getUnit(): string - { - return $this->unit; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php b/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php deleted file mode 100644 index 1654ab1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Exceptions; - -use RuntimeException as BaseRuntimeException; - -class UnreachableException extends BaseRuntimeException implements RuntimeException -{ - // -} diff --git a/vendor/nesbot/carbon/src/Carbon/Factory.php b/vendor/nesbot/carbon/src/Carbon/Factory.php deleted file mode 100644 index d497535..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Factory.php +++ /dev/null @@ -1,326 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Closure; -use DateTimeInterface; -use ReflectionMethod; - -/** - * A factory to generate Carbon instances with common settings. - * - * - * - * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a - * new instance. - * @method Carbon|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. - * If any of $year, $month or $day are set to null their now() values will - * be used. - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * If $hour is not null then the default values for $minute and $second - * will be 0. - * @method Carbon createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. - * @method Carbon|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. - * @method Carbon|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). - * @method Carbon|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. - * @method Carbon|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. - * @method Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. - * @method Carbon createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. - * @method Carbon createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method Carbon createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method Carbon createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method Carbon createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. - * @method Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. - * If any of $year, $month or $day are set to null their now() values will - * be used. - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * If $hour is not null then the default values for $minute and $second - * will be 0. - * If one of the set values is not valid, an InvalidDateException - * will be thrown. - * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. - * @method Carbon disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method Carbon enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, - * then return the result of the closure (or null if the closure was void). - * @method Carbon fromSerialized($value) Create an instance from a serialized string. - * @method void genericMacro($macro, $priority = 0) Register a custom macro. - * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. - * (It will ignore custom translator dynamic loading.) - * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native - * name, region and variant of the locale. - * @method array getDays() Get the days of the week - * @method string|null getFallbackLocale() Get the fallback locale. - * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). - * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). - * @method array getIsoUnits() Returns list of locale units for ISO formatting. - * @method array getLastErrors() {@inheritdoc} - * @method string getLocale() Get the current translator locale. - * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. - * @method int getMidDayAt() get midday/noon hour - * @method Closure|Carbon getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" - * instance is created. - * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. - * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. - * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. - * @method int getWeekEndsAt() Get the last day of week - * @method int getWeekStartsAt() Get the first day of week - * @method array getWeekendDays() Get weekend days - * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. - * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. - * @method bool hasMacro($name) Checks if macro is registered globally. - * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. - * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance - * is anything that is not null. - * @method Carbon instance($date) Create a Carbon instance from a DateTime one. - * @method bool isImmutable() Returns true if the current class/instance is immutable. - * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. - * @method bool isMutable() Returns true if the current class/instance is mutable. - * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. - * (It can be overridden in specific instances.) - * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). - * Support is considered enabled if the 3 words are translated in the given locale. - * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). - * Support is considered enabled if the 2 words are translated in the given locale. - * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. - * Support is considered enabled if either year, day or hour has a short variant translated. - * @method void macro($name, $macro) Register a custom macro. - * @method Carbon|null make($var) Make a Carbon instance from given variable if possible. - * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals - * and recurrences). Throw an exception for invalid format, but otherwise return null. - * @method Carbon maxValue() Create a Carbon instance for the greatest supported date. - * @method Carbon minValue() Create a Carbon instance for the lowest supported date. - * @method void mixin($mixin) Mix another object into the class. - * @method Carbon now($tz = null) Get a Carbon instance for the current date and time. - * @method Carbon parse($time = null, $tz = null) Create a carbon instance from a string. - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * @method Carbon parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). - * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). - * @method Carbon|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. - * @method Carbon rawParse($time = null, $tz = null) Create a carbon instance from a string. - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * @method Carbon resetMacros() Remove all macros and generic macros. - * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string - * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather transform Carbon object before the serialization. - * JSON serialize all Carbon instances using the given callback. - * @method Carbon setFallbackLocale($locale) Set the fallback locale. - * @method Carbon setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. - * Pass 'auto' as locale to use closest language from the current LC_TIME locale. - * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider mid-day is always 12pm, then if you need to test if it's an other - * hour, test it explicitly: - * $date->format('G') == 13 - * or to set explicitly to a given hour: - * $date->setTime(13, 0, 0, 0) - * Set midday/noon hour - * @method Carbon setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * Note the timezone parameter was left out of the examples above and - * has no affect as the mock value will be returned regardless of its value. - * Only the moment is mocked with setTestNow(), the timezone will still be the one passed - * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). - * To clear the test instance call this method using the default - * parameter of null. - * /!\ Use this method for unit tests only. - * @method Carbon setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * It will also align default timezone (e.g. call date_default_timezone_set()) with - * the second argument or if null, with the timezone of the given date object. - * To clear the test instance call this method using the default - * parameter of null. - * /!\ Use this method for unit tests only. - * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump another string - * format. - * Set the default format used when type juggling a Carbon instance to a string. - * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. - * @method Carbon setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use UTF-8 language packages on every machine. - * Set if UTF8 will be used for localized date/time. - * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek - * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the - * start of week according to current locale selected and implicitly the end of week. - * Set the last day of week - * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the - * 'first_day_of_week' locale setting to change the start of week according to current locale - * selected and implicitly the end of week. - * Set the first day of week - * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider week-end is always saturday and sunday, and if you have some custom - * week-end days to handle, give to those days an other name and create a macro for them: - * ``` - * Carbon::macro('isDayOff', function ($date) { - * return $date->isSunday() || $date->isMonday(); - * }); - * Carbon::macro('isNotDayOff', function ($date) { - * return !$date->isDayOff(); - * }); - * if ($someDate->isDayOff()) ... - * if ($someDate->isNotDayOff()) ... - * // Add 5 not-off days - * $count = 5; - * while ($someDate->isDayOff() || ($count-- > 0)) { - * $someDate->addDay(); - * } - * ``` - * Set weekend days - * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). - * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). - * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). - * @method Carbon today($tz = null) Create a Carbon instance for today. - * @method Carbon tomorrow($tz = null) Create a Carbon instance for tomorrow. - * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. - * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. - * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method Carbon useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback. - * Using setTestNow to set the date, executing the callback, then - * clearing the test instance. - * /!\ Use this method for unit tests only. - * @method Carbon yesterday($tz = null) Create a Carbon instance for yesterday. - * - * - */ -class Factory -{ - protected $className = Carbon::class; - - protected $settings = []; - - public function __construct(array $settings = [], ?string $className = null) - { - if ($className) { - $this->className = $className; - } - - $this->settings = $settings; - } - - public function getClassName() - { - return $this->className; - } - - public function setClassName(string $className) - { - $this->className = $className; - - return $this; - } - - public function className(string $className = null) - { - return $className === null ? $this->getClassName() : $this->setClassName($className); - } - - public function getSettings() - { - return $this->settings; - } - - public function setSettings(array $settings) - { - $this->settings = $settings; - - return $this; - } - - public function settings(array $settings = null) - { - return $settings === null ? $this->getSettings() : $this->setSettings($settings); - } - - public function mergeSettings(array $settings) - { - $this->settings = array_merge($this->settings, $settings); - - return $this; - } - - public function __call($name, $arguments) - { - $method = new ReflectionMethod($this->className, $name); - $settings = $this->settings; - - if ($settings && isset($settings['timezone'])) { - $tzParameters = array_filter($method->getParameters(), function ($parameter) { - return \in_array($parameter->getName(), ['tz', 'timezone'], true); - }); - - if (isset($arguments[0]) && \in_array($name, ['instance', 'make', 'create', 'parse'], true)) { - if ($arguments[0] instanceof DateTimeInterface) { - $settings['innerTimezone'] = $settings['timezone']; - } elseif (\is_string($arguments[0]) && date_parse($arguments[0])['is_localtime']) { - unset($settings['timezone'], $settings['innerTimezone']); - } - } elseif (\count($tzParameters)) { - array_splice($arguments, key($tzParameters), 0, [$settings['timezone']]); - unset($settings['timezone']); - } - } - - $result = $this->className::$name(...$arguments); - - return $result instanceof CarbonInterface && !empty($settings) - ? $result->settings($settings) - : $result; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php b/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php deleted file mode 100644 index d88a1cf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php +++ /dev/null @@ -1,259 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Closure; -use DateTimeImmutable; -use DateTimeZone; -use Psr\Clock\ClockInterface; - -/** - * A factory to generate CarbonImmutable instances with common settings. - * - * - * - * @method bool canBeCreatedFromFormat($date, $format) Checks if the (date)time string is in a given format and valid to create a - * new instance. - * @method CarbonImmutable|false create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) Create a new Carbon instance from a specific date and time. - * If any of $year, $month or $day are set to null their now() values will - * be used. - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * If $hour is not null then the default values for $minute and $second - * will be 0. - * @method CarbonImmutable createFromDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to now. - * @method CarbonImmutable|false createFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. - * @method CarbonImmutable|false createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). - * @method CarbonImmutable|false createFromLocaleFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific format and a string in a given language. - * @method CarbonImmutable|false createFromLocaleIsoFormat($format, $locale, $time, $tz = null) Create a Carbon instance from a specific ISO format and a string in a given language. - * @method CarbonImmutable createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) Create a Carbon instance from just a time. The date portion is set to today. - * @method CarbonImmutable createFromTimeString($time, $tz = null) Create a Carbon instance from a time string. The date portion is set to today. - * @method CarbonImmutable createFromTimestamp($timestamp, $tz = null) Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method CarbonImmutable createFromTimestampMs($timestamp, $tz = null) Create a Carbon instance from a timestamp in milliseconds. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method CarbonImmutable createFromTimestampMsUTC($timestamp) Create a Carbon instance from a timestamp in milliseconds. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method CarbonImmutable createFromTimestampUTC($timestamp) Create a Carbon instance from an timestamp keeping the timezone to UTC. - * Timestamp input can be given as int, float or a string containing one or more numbers. - * @method CarbonImmutable createMidnightDate($year = null, $month = null, $day = null, $tz = null) Create a Carbon instance from just a date. The time portion is set to midnight. - * @method CarbonImmutable|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) Create a new safe Carbon instance from a specific date and time. - * If any of $year, $month or $day are set to null their now() values will - * be used. - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * If $hour is not null then the default values for $minute and $second - * will be 0. - * If one of the set values is not valid, an InvalidDateException - * will be thrown. - * @method CarbonInterface createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null) Create a new Carbon instance from a specific date and time using strict validation. - * @method CarbonImmutable disableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method CarbonImmutable enableHumanDiffOption($humanDiffOption) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method mixed executeWithLocale($locale, $func) Set the current locale to the given, execute the passed function, reset the locale to previous one, - * then return the result of the closure (or null if the closure was void). - * @method CarbonImmutable fromSerialized($value) Create an instance from a serialized string. - * @method void genericMacro($macro, $priority = 0) Register a custom macro. - * @method array getAvailableLocales() Returns the list of internally available locales and already loaded custom locales. - * (It will ignore custom translator dynamic loading.) - * @method Language[] getAvailableLocalesInfo() Returns list of Language object for each available locale. This object allow you to get the ISO name, native - * name, region and variant of the locale. - * @method array getDays() Get the days of the week - * @method string|null getFallbackLocale() Get the fallback locale. - * @method array getFormatsToIsoReplacements() List of replacements from date() format to isoFormat(). - * @method int getHumanDiffOptions() Return default humanDiff() options (merged flags as integer). - * @method array getIsoUnits() Returns list of locale units for ISO formatting. - * @method array getLastErrors() {@inheritdoc} - * @method string getLocale() Get the current translator locale. - * @method callable|null getMacro($name) Get the raw callable macro registered globally for a given name. - * @method int getMidDayAt() get midday/noon hour - * @method Closure|CarbonImmutable getTestNow() Get the Carbon instance (real or mock) to be returned when a "now" - * instance is created. - * @method string getTimeFormatByPrecision($unitPrecision) Return a format from H:i to H:i:s.u according to given unit precision. - * @method string getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) Returns raw translation message for a given key. - * @method \Symfony\Component\Translation\TranslatorInterface getTranslator() Get the default translator instance in use. - * @method int getWeekEndsAt() Get the last day of week - * @method int getWeekStartsAt() Get the first day of week - * @method array getWeekendDays() Get weekend days - * @method bool hasFormat($date, $format) Checks if the (date)time string is in a given format. - * @method bool hasFormatWithModifiers($date, $format) Checks if the (date)time string is in a given format. - * @method bool hasMacro($name) Checks if macro is registered globally. - * @method bool hasRelativeKeywords($time) Determine if a time string will produce a relative date. - * @method bool hasTestNow() Determine if there is a valid test instance set. A valid test instance - * is anything that is not null. - * @method CarbonImmutable instance($date) Create a Carbon instance from a DateTime one. - * @method bool isImmutable() Returns true if the current class/instance is immutable. - * @method bool isModifiableUnit($unit) Returns true if a property can be changed via setter. - * @method bool isMutable() Returns true if the current class/instance is mutable. - * @method bool isStrictModeEnabled() Returns true if the strict mode is globally in use, false else. - * (It can be overridden in specific instances.) - * @method bool localeHasDiffOneDayWords($locale) Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). - * Support is considered enabled if the 3 words are translated in the given locale. - * @method bool localeHasDiffSyntax($locale) Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * @method bool localeHasDiffTwoDayWords($locale) Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). - * Support is considered enabled if the 2 words are translated in the given locale. - * @method bool localeHasPeriodSyntax($locale) Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * @method bool localeHasShortUnits($locale) Returns true if the given locale is internally supported and has short-units support. - * Support is considered enabled if either year, day or hour has a short variant translated. - * @method void macro($name, $macro) Register a custom macro. - * @method CarbonImmutable|null make($var) Make a Carbon instance from given variable if possible. - * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals - * and recurrences). Throw an exception for invalid format, but otherwise return null. - * @method CarbonImmutable maxValue() Create a Carbon instance for the greatest supported date. - * @method CarbonImmutable minValue() Create a Carbon instance for the lowest supported date. - * @method void mixin($mixin) Mix another object into the class. - * @method CarbonImmutable parse($time = null, $tz = null) Create a carbon instance from a string. - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * @method CarbonImmutable parseFromLocale($time, $locale = null, $tz = null) Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). - * @method string pluralUnit(string $unit) Returns standardized plural of a given singular/plural unit name (in English). - * @method CarbonImmutable|false rawCreateFromFormat($format, $time, $tz = null) Create a Carbon instance from a specific format. - * @method CarbonImmutable rawParse($time = null, $tz = null) Create a carbon instance from a string. - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * @method CarbonImmutable resetMacros() Remove all macros and generic macros. - * @method void resetMonthsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method void resetToStringFormat() Reset the format used to the default when type juggling a Carbon instance to a string - * @method void resetYearsOverflow() @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method void serializeUsing($callback) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather transform Carbon object before the serialization. - * JSON serialize all Carbon instances using the given callback. - * @method CarbonImmutable setFallbackLocale($locale) Set the fallback locale. - * @method CarbonImmutable setHumanDiffOptions($humanDiffOptions) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method bool setLocale($locale) Set the current translator locale and indicate if the source locale file exists. - * Pass 'auto' as locale to use closest language from the current LC_TIME locale. - * @method void setMidDayAt($hour) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider mid-day is always 12pm, then if you need to test if it's an other - * hour, test it explicitly: - * $date->format('G') == 13 - * or to set explicitly to a given hour: - * $date->setTime(13, 0, 0, 0) - * Set midday/noon hour - * @method CarbonImmutable setTestNow($testNow = null) Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * Note the timezone parameter was left out of the examples above and - * has no affect as the mock value will be returned regardless of its value. - * Only the moment is mocked with setTestNow(), the timezone will still be the one passed - * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). - * To clear the test instance call this method using the default - * parameter of null. - * /!\ Use this method for unit tests only. - * @method CarbonImmutable setTestNowAndTimezone($testNow = null, $tz = null) Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * It will also align default timezone (e.g. call date_default_timezone_set()) with - * the second argument or if null, with the timezone of the given date object. - * To clear the test instance call this method using the default - * parameter of null. - * /!\ Use this method for unit tests only. - * @method void setToStringFormat($format) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump another string - * format. - * Set the default format used when type juggling a Carbon instance to a string. - * @method void setTranslator(TranslatorInterface $translator) Set the default translator instance to use. - * @method CarbonImmutable setUtf8($utf8) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use UTF-8 language packages on every machine. - * Set if UTF8 will be used for localized date/time. - * @method void setWeekEndsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek - * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the - * start of week according to current locale selected and implicitly the end of week. - * Set the last day of week - * @method void setWeekStartsAt($day) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the - * 'first_day_of_week' locale setting to change the start of week according to current locale - * selected and implicitly the end of week. - * Set the first day of week - * @method void setWeekendDays($days) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider week-end is always saturday and sunday, and if you have some custom - * week-end days to handle, give to those days an other name and create a macro for them: - * ``` - * Carbon::macro('isDayOff', function ($date) { - * return $date->isSunday() || $date->isMonday(); - * }); - * Carbon::macro('isNotDayOff', function ($date) { - * return !$date->isDayOff(); - * }); - * if ($someDate->isDayOff()) ... - * if ($someDate->isNotDayOff()) ... - * // Add 5 not-off days - * $count = 5; - * while ($someDate->isDayOff() || ($count-- > 0)) { - * $someDate->addDay(); - * } - * ``` - * Set weekend days - * @method bool shouldOverflowMonths() Get the month overflow global behavior (can be overridden in specific instances). - * @method bool shouldOverflowYears() Get the month overflow global behavior (can be overridden in specific instances). - * @method string singularUnit(string $unit) Returns standardized singular of a given singular/plural unit name (in English). - * @method CarbonImmutable today($tz = null) Create a Carbon instance for today. - * @method CarbonImmutable tomorrow($tz = null) Create a Carbon instance for tomorrow. - * @method string translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) Translate a time string from a locale to an other. - * @method string translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null) Translate using translation string or callback available. - * @method void useMonthsOverflow($monthsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method CarbonImmutable useStrictMode($strictModeEnabled = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @method void useYearsOverflow($yearsOverflow = true) @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @method mixed withTestNow($testNow, $callback) Temporarily sets a static date to be used within the callback. - * Using setTestNow to set the date, executing the callback, then - * clearing the test instance. - * /!\ Use this method for unit tests only. - * @method CarbonImmutable yesterday($tz = null) Create a Carbon instance for yesterday. - * - * - */ -class FactoryImmutable extends Factory implements ClockInterface -{ - protected $className = CarbonImmutable::class; - - /** - * Get a Carbon instance for the current date and time. - * - * @param DateTimeZone|string|int|null $tz - * - * @return CarbonImmutable - */ - public function now($tz = null): DateTimeImmutable - { - $className = $this->className; - - return new $className(null, $tz); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/aa.php b/vendor/nesbot/carbon/src/Carbon/Lang/aa.php deleted file mode 100644 index f3431e4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/aa.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/aa_DJ.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/aa_DJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/aa_DJ.php deleted file mode 100644 index c6e23c0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/aa_DJ.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Qunxa Garablu', 'Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Liiqen', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], - 'months_short' => ['qun', 'nah', 'cig', 'agd', 'cax', 'qas', 'qad', 'leq', 'way', 'dit', 'xim', 'kax'], - 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], - 'weekdays_short' => ['aca', 'etl', 'tal', 'arb', 'kam', 'gum', 'sab'], - 'weekdays_min' => ['aca', 'etl', 'tal', 'arb', 'kam', 'gum', 'sab'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['saaku', 'carra'], - - 'year' => ':count gaqambo', // less reliable - 'y' => ':count gaqambo', // less reliable - 'a_year' => ':count gaqambo', // less reliable - - 'month' => ':count àlsa', - 'm' => ':count àlsa', - 'a_month' => ':count àlsa', - - 'day' => ':count saaku', // less reliable - 'd' => ':count saaku', // less reliable - 'a_day' => ':count saaku', // less reliable - - 'hour' => ':count ayti', // less reliable - 'h' => ':count ayti', // less reliable - 'a_hour' => ':count ayti', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/aa_ER.php b/vendor/nesbot/carbon/src/Carbon/Lang/aa_ER.php deleted file mode 100644 index f8f395b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/aa_ER.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Qunxa Garablu', 'Naharsi Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Leqeeni', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], - 'months_short' => ['Qun', 'Nah', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], - 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], - 'weekdays_short' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], - 'weekdays_min' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['saaku', 'carra'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/aa_ER@saaho.php b/vendor/nesbot/carbon/src/Carbon/Lang/aa_ER@saaho.php deleted file mode 100644 index 6461225..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/aa_ER@saaho.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Qunxa Garablu', 'Naharsi Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Leqeeni', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], - 'months_short' => ['Qun', 'Nah', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], - 'weekdays' => ['Naba Sambat', 'Sani', 'Salus', 'Rabuq', 'Camus', 'Jumqata', 'Qunxa Sambat'], - 'weekdays_short' => ['Nab', 'San', 'Sal', 'Rab', 'Cam', 'Jum', 'Qun'], - 'weekdays_min' => ['Nab', 'San', 'Sal', 'Rab', 'Cam', 'Jum', 'Qun'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['saaku', 'carra'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/aa_ET.php b/vendor/nesbot/carbon/src/Carbon/Lang/aa_ET.php deleted file mode 100644 index e55e591..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/aa_ET.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Qunxa Garablu', 'Kudo', 'Ciggilta Kudo', 'Agda Baxisso', 'Caxah Alsa', 'Qasa Dirri', 'Qado Dirri', 'Liiqen', 'Waysu', 'Diteli', 'Ximoli', 'Kaxxa Garablu'], - 'months_short' => ['Qun', 'Kud', 'Cig', 'Agd', 'Cax', 'Qas', 'Qad', 'Leq', 'Way', 'Dit', 'Xim', 'Kax'], - 'weekdays' => ['Acaada', 'Etleeni', 'Talaata', 'Arbaqa', 'Kamiisi', 'Gumqata', 'Sabti'], - 'weekdays_short' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], - 'weekdays_min' => ['Aca', 'Etl', 'Tal', 'Arb', 'Kam', 'Gum', 'Sab'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['saaku', 'carra'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/af.php b/vendor/nesbot/carbon/src/Carbon/Lang/af.php deleted file mode 100644 index 27771d7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/af.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - JD Isaacks - * - Pierre du Plessis - */ -return [ - 'year' => ':count jaar', - 'a_year' => '\'n jaar|:count jaar', - 'y' => ':count j.', - 'month' => ':count maand|:count maande', - 'a_month' => '\'n maand|:count maande', - 'm' => ':count maa.', - 'week' => ':count week|:count weke', - 'a_week' => '\'n week|:count weke', - 'w' => ':count w.', - 'day' => ':count dag|:count dae', - 'a_day' => '\'n dag|:count dae', - 'd' => ':count d.', - 'hour' => ':count uur', - 'a_hour' => '\'n uur|:count uur', - 'h' => ':count u.', - 'minute' => ':count minuut|:count minute', - 'a_minute' => '\'n minuut|:count minute', - 'min' => ':count min.', - 'second' => ':count sekond|:count sekondes', - 'a_second' => '\'n paar sekondes|:count sekondes', - 's' => ':count s.', - 'ago' => ':time gelede', - 'from_now' => 'oor :time', - 'after' => ':time na', - 'before' => ':time voor', - 'diff_now' => 'Nou', - 'diff_today' => 'Vandag', - 'diff_today_regexp' => 'Vandag(?:\\s+om)?', - 'diff_yesterday' => 'Gister', - 'diff_yesterday_regexp' => 'Gister(?:\\s+om)?', - 'diff_tomorrow' => 'Môre', - 'diff_tomorrow_regexp' => 'Môre(?:\\s+om)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Vandag om] LT', - 'nextDay' => '[Môre om] LT', - 'nextWeek' => 'dddd [om] LT', - 'lastDay' => '[Gister om] LT', - 'lastWeek' => '[Laas] dddd [om] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); - }, - 'meridiem' => ['VM', 'NM'], - 'months' => ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember'], - 'months_short' => ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], - 'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], - 'weekdays_short' => ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'], - 'weekdays_min' => ['So', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' en '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/af_NA.php b/vendor/nesbot/carbon/src/Carbon/Lang/af_NA.php deleted file mode 100644 index f2fcf05..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/af_NA.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/af.php', [ - 'meridiem' => ['v', 'n'], - 'weekdays' => ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'], - 'weekdays_short' => ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'], - 'weekdays_min' => ['So.', 'Ma.', 'Di.', 'Wo.', 'Do.', 'Vr.', 'Sa.'], - 'months' => ['Januarie', 'Februarie', 'Maart', 'April', 'Mei', 'Junie', 'Julie', 'Augustus', 'September', 'Oktober', 'November', 'Desember'], - 'months_short' => ['Jan.', 'Feb.', 'Mrt.', 'Apr.', 'Mei', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Okt.', 'Nov.', 'Des.'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'DD MMM YYYY', - 'LLL' => 'DD MMMM YYYY HH:mm', - 'LLLL' => 'dddd, DD MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/af_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/af_ZA.php deleted file mode 100644 index 27896bd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/af_ZA.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/af.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/agq.php b/vendor/nesbot/carbon/src/Carbon/Lang/agq.php deleted file mode 100644 index 7011464..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/agq.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['a.g', 'a.k'], - 'weekdays' => ['tsuʔntsɨ', 'tsuʔukpà', 'tsuʔughɔe', 'tsuʔutɔ̀mlò', 'tsuʔumè', 'tsuʔughɨ̂m', 'tsuʔndzɨkɔʔɔ'], - 'weekdays_short' => ['nts', 'kpa', 'ghɔ', 'tɔm', 'ume', 'ghɨ', 'dzk'], - 'weekdays_min' => ['nts', 'kpa', 'ghɔ', 'tɔm', 'ume', 'ghɨ', 'dzk'], - 'months' => ['ndzɔ̀ŋɔ̀nùm', 'ndzɔ̀ŋɔ̀kƗ̀zùʔ', 'ndzɔ̀ŋɔ̀tƗ̀dʉ̀ghà', 'ndzɔ̀ŋɔ̀tǎafʉ̄ghā', 'ndzɔ̀ŋèsèe', 'ndzɔ̀ŋɔ̀nzùghò', 'ndzɔ̀ŋɔ̀dùmlo', 'ndzɔ̀ŋɔ̀kwîfɔ̀e', 'ndzɔ̀ŋɔ̀tƗ̀fʉ̀ghàdzughù', 'ndzɔ̀ŋɔ̀ghǔuwelɔ̀m', 'ndzɔ̀ŋɔ̀chwaʔàkaa wo', 'ndzɔ̀ŋèfwòo'], - 'months_short' => ['nùm', 'kɨz', 'tɨd', 'taa', 'see', 'nzu', 'dum', 'fɔe', 'dzu', 'lɔm', 'kaa', 'fwo'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/agr.php b/vendor/nesbot/carbon/src/Carbon/Lang/agr.php deleted file mode 100644 index 8f036ae..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/agr.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/agr_PE.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/agr_PE.php b/vendor/nesbot/carbon/src/Carbon/Lang/agr_PE.php deleted file mode 100644 index 54a326a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/agr_PE.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - somosazucar.org libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Petsatin', 'Kupitin', 'Uyaitin', 'Tayutin', 'Kegketin', 'Tegmatin', 'Kuntutin', 'Yagkujutin', 'Daiktatin', 'Ipamtatin', 'Shinutin', 'Sakamtin'], - 'months_short' => ['Pet', 'Kup', 'Uya', 'Tay', 'Keg', 'Teg', 'Kun', 'Yag', 'Dait', 'Ipam', 'Shin', 'Sak'], - 'weekdays' => ['Tuntuamtin', 'Achutin', 'Kugkuktin', 'Saketin', 'Shimpitin', 'Imaptin', 'Bataetin'], - 'weekdays_short' => ['Tun', 'Ach', 'Kug', 'Sak', 'Shim', 'Im', 'Bat'], - 'weekdays_min' => ['Tun', 'Ach', 'Kug', 'Sak', 'Shim', 'Im', 'Bat'], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 7, - 'meridiem' => ['VM', 'NM'], - - 'year' => ':count yaya', // less reliable - 'y' => ':count yaya', // less reliable - 'a_year' => ':count yaya', // less reliable - - 'month' => ':count nantu', // less reliable - 'm' => ':count nantu', // less reliable - 'a_month' => ':count nantu', // less reliable - - 'day' => ':count nayaim', // less reliable - 'd' => ':count nayaim', // less reliable - 'a_day' => ':count nayaim', // less reliable - - 'hour' => ':count kuwiš', // less reliable - 'h' => ':count kuwiš', // less reliable - 'a_hour' => ':count kuwiš', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ak.php b/vendor/nesbot/carbon/src/Carbon/Lang/ak.php deleted file mode 100644 index 5a64be3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ak.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ak_GH.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ak_GH.php b/vendor/nesbot/carbon/src/Carbon/Lang/ak_GH.php deleted file mode 100644 index 1381946..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ak_GH.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY/MM/DD', - ], - 'months' => ['Sanda-Ɔpɛpɔn', 'Kwakwar-Ɔgyefuo', 'Ebɔw-Ɔbenem', 'Ebɔbira-Oforisuo', 'Esusow Aketseaba-Kɔtɔnimba', 'Obirade-Ayɛwohomumu', 'Ayɛwoho-Kitawonsa', 'Difuu-Ɔsandaa', 'Fankwa-Ɛbɔ', 'Ɔbɛsɛ-Ahinime', 'Ɔberɛfɛw-Obubuo', 'Mumu-Ɔpɛnimba'], - 'months_short' => ['S-Ɔ', 'K-Ɔ', 'E-Ɔ', 'E-O', 'E-K', 'O-A', 'A-K', 'D-Ɔ', 'F-Ɛ', 'Ɔ-A', 'Ɔ-O', 'M-Ɔ'], - 'weekdays' => ['Kwesida', 'Dwowda', 'Benada', 'Wukuda', 'Yawda', 'Fida', 'Memeneda'], - 'weekdays_short' => ['Kwe', 'Dwo', 'Ben', 'Wuk', 'Yaw', 'Fia', 'Mem'], - 'weekdays_min' => ['Kwe', 'Dwo', 'Ben', 'Wuk', 'Yaw', 'Fia', 'Mem'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['AN', 'EW'], - - 'year' => ':count afe', - 'y' => ':count afe', - 'a_year' => ':count afe', - - 'month' => ':count bosume', - 'm' => ':count bosume', - 'a_month' => ':count bosume', - - 'day' => ':count ɛda', - 'd' => ':count ɛda', - 'a_day' => ':count ɛda', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/am.php b/vendor/nesbot/carbon/src/Carbon/Lang/am.php deleted file mode 100644 index 63bf72d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/am.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/am_ET.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/am_ET.php b/vendor/nesbot/carbon/src/Carbon/Lang/am_ET.php deleted file mode 100644 index ece8062..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/am_ET.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕሪል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክቶበር', 'ኖቬምበር', 'ዲሴምበር'], - 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], - 'weekdays' => ['እሑድ', 'ሰኞ', 'ማክሰኞ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], - 'weekdays_short' => ['እሑድ', 'ሰኞ ', 'ማክሰ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], - 'weekdays_min' => ['እሑድ', 'ሰኞ ', 'ማክሰ', 'ረቡዕ', 'ሐሙስ', 'ዓርብ', 'ቅዳሜ'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ጡዋት', 'ከሰዓት'], - - 'year' => ':count አመት', - 'y' => ':count አመት', - 'a_year' => ':count አመት', - - 'month' => ':count ወር', - 'm' => ':count ወር', - 'a_month' => ':count ወር', - - 'week' => ':count ሳምንት', - 'w' => ':count ሳምንት', - 'a_week' => ':count ሳምንት', - - 'day' => ':count ቀን', - 'd' => ':count ቀን', - 'a_day' => ':count ቀን', - - 'hour' => ':count ሰዓት', - 'h' => ':count ሰዓት', - 'a_hour' => ':count ሰዓት', - - 'minute' => ':count ደቂቃ', - 'min' => ':count ደቂቃ', - 'a_minute' => ':count ደቂቃ', - - 'second' => ':count ሴኮንድ', - 's' => ':count ሴኮንድ', - 'a_second' => ':count ሴኮንድ', - - 'ago' => 'ከ:time በፊት', - 'from_now' => 'በ:time ውስጥ', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/an.php b/vendor/nesbot/carbon/src/Carbon/Lang/an.php deleted file mode 100644 index 565abf2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/an.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/an_ES.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/an_ES.php b/vendor/nesbot/carbon/src/Carbon/Lang/an_ES.php deleted file mode 100644 index faf8ae0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/an_ES.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Softaragones Jordi Mallach Pérez, Juan Pablo Martínez bug-glibc-locales@gnu.org, softaragones@softaragones.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['chinero', 'febrero', 'marzo', 'abril', 'mayo', 'chunyo', 'chuliol', 'agosto', 'setiembre', 'octubre', 'noviembre', 'aviento'], - 'months_short' => ['chi', 'feb', 'mar', 'abr', 'may', 'chn', 'chl', 'ago', 'set', 'oct', 'nov', 'avi'], - 'weekdays' => ['domingo', 'luns', 'martes', 'mierques', 'chueves', 'viernes', 'sabado'], - 'weekdays_short' => ['dom', 'lun', 'mar', 'mie', 'chu', 'vie', 'sab'], - 'weekdays_min' => ['dom', 'lun', 'mar', 'mie', 'chu', 'vie', 'sab'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count año', - 'y' => ':count año', - 'a_year' => ':count año', - - 'month' => ':count mes', - 'm' => ':count mes', - 'a_month' => ':count mes', - - 'week' => ':count semana', - 'w' => ':count semana', - 'a_week' => ':count semana', - - 'day' => ':count día', - 'd' => ':count día', - 'a_day' => ':count día', - - 'hour' => ':count reloch', // less reliable - 'h' => ':count reloch', // less reliable - 'a_hour' => ':count reloch', // less reliable - - 'minute' => ':count minuto', - 'min' => ':count minuto', - 'a_minute' => ':count minuto', - - 'second' => ':count segundo', - 's' => ':count segundo', - 'a_second' => ':count segundo', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/anp.php b/vendor/nesbot/carbon/src/Carbon/Lang/anp.php deleted file mode 100644 index b56c67b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/anp.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/anp_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/anp_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/anp_IN.php deleted file mode 100644 index 11069be..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/anp_IN.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bhashaghar@googlegroups.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर"'], - 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर'], - 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'बृहस्पतिवार', 'शुक्रवार', 'शनिवार'], - 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], - 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar.php deleted file mode 100644 index 5f73f63..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Atef Ben Ali (atefBB) - * - Ibrahim AshShohail - * - MLTDev - * - Mohamed Sabil (mohamedsabil83) - * - Yazan Alnugnugh (yazan-alnugnugh) - */ -$months = [ - 'يناير', - 'فبراير', - 'مارس', - 'أبريل', - 'مايو', - 'يونيو', - 'يوليو', - 'أغسطس', - 'سبتمبر', - 'أكتوبر', - 'نوفمبر', - 'ديسمبر', -]; - -return [ - 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'ago' => 'منذ :time', - 'from_now' => ':time من الآن', - 'after' => 'بعد :time', - 'before' => 'قبل :time', - 'diff_now' => 'الآن', - 'diff_today' => 'اليوم', - 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_yesterday' => 'أمس', - 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_tomorrow' => 'غداً', - 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_before_yesterday' => 'قبل الأمس', - 'diff_after_tomorrow' => 'بعد غد', - 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), - 'period_interval' => 'كل :interval', - 'period_start_date' => 'من :date', - 'period_end_date' => 'إلى :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], - 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اليوم عند الساعة] LT', - 'nextDay' => '[غدًا عند الساعة] LT', - 'nextWeek' => 'dddd [عند الساعة] LT', - 'lastDay' => '[أمس عند الساعة] LT', - 'lastWeek' => 'dddd [عند الساعة] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ص', 'م'], - 'weekend' => [5, 6], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_AE.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_AE.php deleted file mode 100644 index 35a22b1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_AE.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت '], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_BH.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_BH.php deleted file mode 100644 index 3518096..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_BH.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_DJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_DJ.php deleted file mode 100644 index e790b99..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_DJ.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ar.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_DZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_DZ.php deleted file mode 100644 index aea4eee..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_DZ.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Authors: - * - Josh Soref - * - Noureddine LOUAHEDJ - * - JD Isaacks - * - Atef Ben Ali (atefBB) - * - Mohamed Sabil (mohamedsabil83) - */ -$months = [ - 'جانفي', - 'فيفري', - 'مارس', - 'أفريل', - 'ماي', - 'جوان', - 'جويلية', - 'أوت', - 'سبتمبر', - 'أكتوبر', - 'نوفمبر', - 'ديسمبر', -]; - -return [ - 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'ago' => 'منذ :time', - 'from_now' => 'في :time', - 'after' => 'بعد :time', - 'before' => 'قبل :time', - 'diff_now' => 'الآن', - 'diff_today' => 'اليوم', - 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_yesterday' => 'أمس', - 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_tomorrow' => 'غداً', - 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_before_yesterday' => 'قبل الأمس', - 'diff_after_tomorrow' => 'بعد غد', - 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), - 'period_interval' => 'كل :interval', - 'period_start_date' => 'من :date', - 'period_end_date' => 'إلى :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], - 'weekdays_min' => ['أح', 'إث', 'ثلا', 'أر', 'خم', 'جم', 'سب'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 4, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اليوم على الساعة] LT', - 'nextDay' => '[غدا على الساعة] LT', - 'nextWeek' => 'dddd [على الساعة] LT', - 'lastDay' => '[أمس على الساعة] LT', - 'lastWeek' => 'dddd [على الساعة] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ص', 'م'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_EG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_EG.php deleted file mode 100644 index 3518096..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_EG.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_EH.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_EH.php deleted file mode 100644 index e790b99..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_EH.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ar.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_ER.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_ER.php deleted file mode 100644 index e790b99..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_ER.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ar.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_IL.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_IL.php deleted file mode 100644 index e790b99..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_IL.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ar.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_IN.php deleted file mode 100644 index 5fecf70..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_IN.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_IQ.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_IQ.php deleted file mode 100644 index 2d42008..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_IQ.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_JO.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_JO.php deleted file mode 100644 index 2d42008..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_JO.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_KM.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_KM.php deleted file mode 100644 index e790b99..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_KM.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ar.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_KW.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_KW.php deleted file mode 100644 index b3fb1cf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_KW.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Authors: - * - Josh Soref - * - Nusret Parlak - * - JD Isaacks - * - Atef Ben Ali (atefBB) - * - Mohamed Sabil (mohamedsabil83) - * - Abdullah-Alhariri - */ -$months = [ - 'يناير', - 'فبراير', - 'مارس', - 'أبريل', - 'ماي', - 'يونيو', - 'يوليوز', - 'غشت', - 'شتنبر', - 'أكتوبر', - 'نونبر', - 'دجنبر', -]; - -return [ - 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'ago' => 'منذ :time', - 'from_now' => 'في :time', - 'after' => 'بعد :time', - 'before' => 'قبل :time', - 'diff_now' => 'الآن', - 'diff_today' => 'اليوم', - 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_yesterday' => 'أمس', - 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_tomorrow' => 'غداً', - 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_before_yesterday' => 'قبل الأمس', - 'diff_after_tomorrow' => 'بعد غد', - 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), - 'period_interval' => 'كل :interval', - 'period_start_date' => 'من :date', - 'period_end_date' => 'إلى :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اليوم على الساعة] LT', - 'nextDay' => '[غدا على الساعة] LT', - 'nextWeek' => 'dddd [على الساعة] LT', - 'lastDay' => '[أمس على الساعة] LT', - 'lastWeek' => 'dddd [على الساعة] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ص', 'م'], - 'weekend' => [5, 6], - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_LB.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_LB.php deleted file mode 100644 index 2792745..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_LB.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_LY.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_LY.php deleted file mode 100644 index 1f0af49..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_LY.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Atef Ben Ali (atefBB) - * - Ibrahim AshShohail - * - MLTDev - */ - -$months = [ - 'يناير', - 'فبراير', - 'مارس', - 'أبريل', - 'مايو', - 'يونيو', - 'يوليو', - 'أغسطس', - 'سبتمبر', - 'أكتوبر', - 'نوفمبر', - 'ديسمبر', -]; - -return [ - 'year' => implode('|', [':count سنة', 'سنة', 'سنتين', ':count سنوات', ':count سنة']), - 'a_year' => implode('|', [':count سنة', 'سنة', 'سنتين', ':count سنوات', ':count سنة']), - 'month' => implode('|', [':count شهر', 'شهر', 'شهرين', ':count أشهر', ':count شهر']), - 'a_month' => implode('|', [':count شهر', 'شهر', 'شهرين', ':count أشهر', ':count شهر']), - 'week' => implode('|', [':count أسبوع', 'أسبوع', 'أسبوعين', ':count أسابيع', ':count أسبوع']), - 'a_week' => implode('|', [':count أسبوع', 'أسبوع', 'أسبوعين', ':count أسابيع', ':count أسبوع']), - 'day' => implode('|', [':count يوم', 'يوم', 'يومين', ':count أيام', ':count يوم']), - 'a_day' => implode('|', [':count يوم', 'يوم', 'يومين', ':count أيام', ':count يوم']), - 'hour' => implode('|', [':count ساعة', 'ساعة', 'ساعتين', ':count ساعات', ':count ساعة']), - 'a_hour' => implode('|', [':count ساعة', 'ساعة', 'ساعتين', ':count ساعات', ':count ساعة']), - 'minute' => implode('|', [':count دقيقة', 'دقيقة', 'دقيقتين', ':count دقائق', ':count دقيقة']), - 'a_minute' => implode('|', [':count دقيقة', 'دقيقة', 'دقيقتين', ':count دقائق', ':count دقيقة']), - 'second' => implode('|', [':count ثانية', 'ثانية', 'ثانيتين', ':count ثواني', ':count ثانية']), - 'a_second' => implode('|', [':count ثانية', 'ثانية', 'ثانيتين', ':count ثواني', ':count ثانية']), - 'ago' => 'منذ :time', - 'from_now' => ':time من الآن', - 'after' => 'بعد :time', - 'before' => 'قبل :time', - 'diff_now' => 'الآن', - 'diff_today' => 'اليوم', - 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_yesterday' => 'أمس', - 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_tomorrow' => 'غداً', - 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_before_yesterday' => 'قبل الأمس', - 'diff_after_tomorrow' => 'بعد غد', - 'period_recurrences' => implode('|', ['مرة', 'مرة', ':count مرتين', ':count مرات', ':count مرة']), - 'period_interval' => 'كل :interval', - 'period_start_date' => 'من :date', - 'period_end_date' => 'إلى :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], - 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اليوم عند الساعة] LT', - 'nextDay' => '[غدًا عند الساعة] LT', - 'nextWeek' => 'dddd [عند الساعة] LT', - 'lastDay' => '[أمس عند الساعة] LT', - 'lastWeek' => 'dddd [عند الساعة] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ص', 'م'], - 'weekend' => [5, 6], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_MA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_MA.php deleted file mode 100644 index 047ae05..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_MA.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Authors: - * - Josh Soref - * - JD Isaacks - * - Atef Ben Ali (atefBB) - * - Mohamed Sabil (mohamedsabil83) - */ -$months = [ - 'يناير', - 'فبراير', - 'مارس', - 'أبريل', - 'ماي', - 'يونيو', - 'يوليوز', - 'غشت', - 'شتنبر', - 'أكتوبر', - 'نونبر', - 'دجنبر', -]; - -return [ - 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'ago' => 'منذ :time', - 'from_now' => 'في :time', - 'after' => 'بعد :time', - 'before' => 'قبل :time', - 'diff_now' => 'الآن', - 'diff_today' => 'اليوم', - 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_yesterday' => 'أمس', - 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_tomorrow' => 'غداً', - 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_before_yesterday' => 'قبل الأمس', - 'diff_after_tomorrow' => 'بعد غد', - 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), - 'period_interval' => 'كل :interval', - 'period_start_date' => 'من :date', - 'period_end_date' => 'إلى :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اليوم على الساعة] LT', - 'nextDay' => '[غدا على الساعة] LT', - 'nextWeek' => 'dddd [على الساعة] LT', - 'lastDay' => '[أمس على الساعة] LT', - 'lastWeek' => 'dddd [على الساعة] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ص', 'م'], - 'weekend' => [5, 6], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_MR.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_MR.php deleted file mode 100644 index e790b99..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_MR.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ar.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_OM.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_OM.php deleted file mode 100644 index 3518096..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_OM.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php deleted file mode 100644 index 503c60d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_PS.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_QA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_QA.php deleted file mode 100644 index 3518096..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_QA.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SA.php deleted file mode 100644 index 550b0c7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SA.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Authors: - * - Josh Soref - * - JD Isaacks - * - Atef Ben Ali (atefBB) - * - Mohamed Sabil (mohamedsabil83) - * - Abdullah-Alhariri - */ -$months = [ - 'يناير', - 'فبراير', - 'مارس', - 'أبريل', - 'مايو', - 'يونيو', - 'يوليو', - 'أغسطس', - 'سبتمبر', - 'أكتوبر', - 'نوفمبر', - 'ديسمبر', -]; - -return [ - 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'ago' => 'منذ :time', - 'from_now' => 'في :time', - 'after' => 'بعد :time', - 'before' => 'قبل :time', - 'diff_now' => 'الآن', - 'diff_today' => 'اليوم', - 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_yesterday' => 'أمس', - 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_tomorrow' => 'غداً', - 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_before_yesterday' => 'قبل الأمس', - 'diff_after_tomorrow' => 'بعد غد', - 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), - 'period_interval' => 'كل :interval', - 'period_start_date' => 'من :date', - 'period_end_date' => 'إلى :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اليوم على الساعة] LT', - 'nextDay' => '[غدا على الساعة] LT', - 'nextWeek' => 'dddd [على الساعة] LT', - 'lastDay' => '[أمس على الساعة] LT', - 'lastWeek' => 'dddd [على الساعة] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ص', 'م'], - 'weekend' => [5, 6], - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SD.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SD.php deleted file mode 100644 index 3518096..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SD.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SO.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SO.php deleted file mode 100644 index e790b99..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SO.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ar.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SS.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SS.php deleted file mode 100644 index 32f3282..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SS.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SY.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_SY.php deleted file mode 100644 index 2d42008..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_SY.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - 'months_short' => ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php deleted file mode 100644 index c2d4b43..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Abdellah Chadidi - * - Atef Ben Ali (atefBB) - * - Mohamed Sabil (mohamedsabil83) - */ -// Same for long and short -$months = [ - // @TODO add shakl to months - 'يناير', - 'فبراير', - 'مارس', - 'أبريل', - 'مايو', - 'يونيو', - 'يوليو', - 'أغسطس', - 'سبتمبر', - 'أكتوبر', - 'نوفمبر', - 'ديسمبر', -]; - -return [ - 'year' => implode('|', ['{0}:count سَنَة', '{1}سَنَة', '{2}سَنَتَيْن', ']2,11[:count سَنَوَات', ']10,Inf[:count سَنَة']), - 'a_year' => implode('|', ['{0}:count سَنَة', '{1}سَنَة', '{2}سَنَتَيْن', ']2,11[:count سَنَوَات', ']10,Inf[:count سَنَة']), - 'month' => implode('|', ['{0}:count شَهْرَ', '{1}شَهْرَ', '{2}شَهْرَيْن', ']2,11[:count أَشْهُر', ']10,Inf[:count شَهْرَ']), - 'a_month' => implode('|', ['{0}:count شَهْرَ', '{1}شَهْرَ', '{2}شَهْرَيْن', ']2,11[:count أَشْهُر', ']10,Inf[:count شَهْرَ']), - 'week' => implode('|', ['{0}:count أُسْبُوع', '{1}أُسْبُوع', '{2}أُسْبُوعَيْن', ']2,11[:count أَسَابِيع', ']10,Inf[:count أُسْبُوع']), - 'a_week' => implode('|', ['{0}:count أُسْبُوع', '{1}أُسْبُوع', '{2}أُسْبُوعَيْن', ']2,11[:count أَسَابِيع', ']10,Inf[:count أُسْبُوع']), - 'day' => implode('|', ['{0}:count يَوْم', '{1}يَوْم', '{2}يَوْمَيْن', ']2,11[:count أَيَّام', ']10,Inf[:count يَوْم']), - 'a_day' => implode('|', ['{0}:count يَوْم', '{1}يَوْم', '{2}يَوْمَيْن', ']2,11[:count أَيَّام', ']10,Inf[:count يَوْم']), - 'hour' => implode('|', ['{0}:count سَاعَة', '{1}سَاعَة', '{2}سَاعَتَيْن', ']2,11[:count سَاعَات', ']10,Inf[:count سَاعَة']), - 'a_hour' => implode('|', ['{0}:count سَاعَة', '{1}سَاعَة', '{2}سَاعَتَيْن', ']2,11[:count سَاعَات', ']10,Inf[:count سَاعَة']), - 'minute' => implode('|', ['{0}:count دَقِيقَة', '{1}دَقِيقَة', '{2}دَقِيقَتَيْن', ']2,11[:count دَقَائِق', ']10,Inf[:count دَقِيقَة']), - 'a_minute' => implode('|', ['{0}:count دَقِيقَة', '{1}دَقِيقَة', '{2}دَقِيقَتَيْن', ']2,11[:count دَقَائِق', ']10,Inf[:count دَقِيقَة']), - 'second' => implode('|', ['{0}:count ثَانِيَة', '{1}ثَانِيَة', '{2}ثَانِيَتَيْن', ']2,11[:count ثَوَان', ']10,Inf[:count ثَانِيَة']), - 'a_second' => implode('|', ['{0}:count ثَانِيَة', '{1}ثَانِيَة', '{2}ثَانِيَتَيْن', ']2,11[:count ثَوَان', ']10,Inf[:count ثَانِيَة']), - 'ago' => 'مُنْذُ :time', - 'from_now' => 'مِنَ الْآن :time', - 'after' => 'بَعْدَ :time', - 'before' => 'قَبْلَ :time', - - // @TODO add shakl to translations below - 'diff_now' => 'الآن', - 'diff_today' => 'اليوم', - 'diff_today_regexp' => 'اليوم(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_yesterday' => 'أمس', - 'diff_yesterday_regexp' => 'أمس(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_tomorrow' => 'غداً', - 'diff_tomorrow_regexp' => 'غدًا(?:\\s+عند)?(?:\\s+الساعة)?', - 'diff_before_yesterday' => 'قبل الأمس', - 'diff_after_tomorrow' => 'بعد غد', - 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), - 'period_interval' => 'كل :interval', - 'period_start_date' => 'من :date', - 'period_end_date' => 'إلى :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], - 'weekdays_min' => ['ح', 'اث', 'ثل', 'أر', 'خم', 'ج', 'س'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اليوم عند الساعة] LT', - 'nextDay' => '[غدًا عند الساعة] LT', - 'nextWeek' => 'dddd [عند الساعة] LT', - 'lastDay' => '[أمس عند الساعة] LT', - 'lastWeek' => 'dddd [عند الساعة] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ص', 'م'], - 'weekend' => [5, 6], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_TD.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_TD.php deleted file mode 100644 index e790b99..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_TD.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ar.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_TN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_TN.php deleted file mode 100644 index f096678..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_TN.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Authors: - * - JD Isaacks - * - Atef Ben Ali (atefBB) - * - Mohamed Sabil (mohamedsabil83) - */ -$months = [ - 'جانفي', - 'فيفري', - 'مارس', - 'أفريل', - 'ماي', - 'جوان', - 'جويلية', - 'أوت', - 'سبتمبر', - 'أكتوبر', - 'نوفمبر', - 'ديسمبر', -]; - -return [ - 'year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'a_year' => implode('|', ['{0}:count سنة', '{1}سنة', '{2}سنتين', ']2,11[:count سنوات', ']10,Inf[:count سنة']), - 'month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'a_month' => implode('|', ['{0}:count شهر', '{1}شهر', '{2}شهرين', ']2,11[:count أشهر', ']10,Inf[:count شهر']), - 'week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'a_week' => implode('|', ['{0}:count أسبوع', '{1}أسبوع', '{2}أسبوعين', ']2,11[:count أسابيع', ']10,Inf[:count أسبوع']), - 'day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'a_day' => implode('|', ['{0}:count يوم', '{1}يوم', '{2}يومين', ']2,11[:count أيام', ']10,Inf[:count يوم']), - 'hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'a_hour' => implode('|', ['{0}:count ساعة', '{1}ساعة', '{2}ساعتين', ']2,11[:count ساعات', ']10,Inf[:count ساعة']), - 'minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'a_minute' => implode('|', ['{0}:count دقيقة', '{1}دقيقة', '{2}دقيقتين', ']2,11[:count دقائق', ']10,Inf[:count دقيقة']), - 'second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'a_second' => implode('|', ['{0}:count ثانية', '{1}ثانية', '{2}ثانيتين', ']2,11[:count ثواني', ']10,Inf[:count ثانية']), - 'ago' => 'منذ :time', - 'from_now' => 'في :time', - 'after' => 'بعد :time', - 'before' => 'قبل :time', - 'diff_now' => 'الآن', - 'diff_today' => 'اليوم', - 'diff_today_regexp' => 'اليوم(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_yesterday' => 'أمس', - 'diff_yesterday_regexp' => 'أمس(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_tomorrow' => 'غداً', - 'diff_tomorrow_regexp' => 'غدا(?:\\s+على)?(?:\\s+الساعة)?', - 'diff_before_yesterday' => 'قبل الأمس', - 'diff_after_tomorrow' => 'بعد غد', - 'period_recurrences' => implode('|', ['{0}مرة', '{1}مرة', '{2}:count مرتين', ']2,11[:count مرات', ']10,Inf[:count مرة']), - 'period_interval' => 'كل :interval', - 'period_start_date' => 'من :date', - 'period_end_date' => 'إلى :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اليوم على الساعة] LT', - 'nextDay' => '[غدا على الساعة] LT', - 'nextWeek' => 'dddd [على الساعة] LT', - 'lastDay' => '[أمس على الساعة] LT', - 'lastWeek' => 'dddd [على الساعة] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ص', 'م'], - 'weekend' => [5, 6], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar_YE.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar_YE.php deleted file mode 100644 index 169fe88..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar_YE.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - * - Abdullah-Alhariri - */ -return array_replace_recursive(require __DIR__.'/ar.php', [ - 'formats' => [ - 'L' => 'DD MMM, YYYY', - ], - 'months' => ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'], - 'months_short' => ['ينا', 'فبر', 'مار', 'أبر', 'ماي', 'يون', 'يول', 'أغس', 'سبت', 'أكت', 'نوف', 'ديس'], - 'weekdays' => ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], - 'weekdays_short' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'weekdays_min' => ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'], - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰٤', '۰٥', '۰٦', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱٤', '۱٥', '۱٦', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲٤', '۲٥', '۲٦', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳٤', '۳٥', '۳٦', '۳۷', '۳۸', '۳۹', '٤۰', '٤۱', '٤۲', '٤۳', '٤٤', '٤٥', '٤٦', '٤۷', '٤۸', '٤۹', '٥۰', '٥۱', '٥۲', '٥۳', '٥٤', '٥٥', '٥٦', '٥۷', '٥۸', '٥۹', '٦۰', '٦۱', '٦۲', '٦۳', '٦٤', '٦٥', '٦٦', '٦۷', '٦۸', '٦۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷٤', '۷٥', '۷٦', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸٤', '۸٥', '۸٦', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹٤', '۹٥', '۹٦', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/as.php b/vendor/nesbot/carbon/src/Carbon/Lang/as.php deleted file mode 100644 index 04bc3df..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/as.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/as_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/as_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/as_IN.php deleted file mode 100644 index 5fbc3db..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/as_IN.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Amitakhya Phukan, Red Hat bug-glibc@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D-MM-YYYY', - ], - 'months' => ['জানুৱাৰী', 'ফেব্ৰুৱাৰী', 'মাৰ্চ', 'এপ্ৰিল', 'মে', 'জুন', 'জুলাই', 'আগষ্ট', 'ছেপ্তেম্বৰ', 'অক্টোবৰ', 'নৱেম্বৰ', 'ডিচেম্বৰ'], - 'months_short' => ['জানু', 'ফেব্ৰু', 'মাৰ্চ', 'এপ্ৰিল', 'মে', 'জুন', 'জুলাই', 'আগ', 'সেপ্ট', 'অক্টো', 'নভে', 'ডিসে'], - 'weekdays' => ['দেওবাৰ', 'সোমবাৰ', 'মঙ্গলবাৰ', 'বুধবাৰ', 'বৃহষ্পতিবাৰ', 'শুক্ৰবাৰ', 'শনিবাৰ'], - 'weekdays_short' => ['দেও', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহষ্পতি', 'শুক্ৰ', 'শনি'], - 'weekdays_min' => ['দেও', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহষ্পতি', 'শুক্ৰ', 'শনি'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['পূৰ্ব্বাহ্ন', 'অপৰাহ্ন'], - - 'year' => ':count বছৰ', - 'y' => ':count বছৰ', - 'a_year' => ':count বছৰ', - - 'month' => ':count মাহ', - 'm' => ':count মাহ', - 'a_month' => ':count মাহ', - - 'week' => ':count সপ্তাহ', - 'w' => ':count সপ্তাহ', - 'a_week' => ':count সপ্তাহ', - - 'day' => ':count বাৰ', - 'd' => ':count বাৰ', - 'a_day' => ':count বাৰ', - - 'hour' => ':count ঘণ্টা', - 'h' => ':count ঘণ্টা', - 'a_hour' => ':count ঘণ্টা', - - 'minute' => ':count মিনিট', - 'min' => ':count মিনিট', - 'a_minute' => ':count মিনিট', - - 'second' => ':count দ্বিতীয়', - 's' => ':count দ্বিতীয়', - 'a_second' => ':count দ্বিতীয়', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/asa.php b/vendor/nesbot/carbon/src/Carbon/Lang/asa.php deleted file mode 100644 index 03bb483..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/asa.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['icheheavo', 'ichamthi'], - 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Ijm', 'Jmo'], - 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Ijm', 'Jmo'], - 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Dec'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ast.php b/vendor/nesbot/carbon/src/Carbon/Lang/ast.php deleted file mode 100644 index d9bdebe..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ast.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Jordi Mallach jordi@gnu.org - * - Adolfo Jayme-Barrientos (fitojb) - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['de xineru', 'de febreru', 'de marzu', 'd’abril', 'de mayu', 'de xunu', 'de xunetu', 'd’agostu', 'de setiembre', 'd’ochobre', 'de payares', 'd’avientu'], - 'months_short' => ['xin', 'feb', 'mar', 'abr', 'may', 'xun', 'xnt', 'ago', 'set', 'och', 'pay', 'avi'], - 'weekdays' => ['domingu', 'llunes', 'martes', 'miércoles', 'xueves', 'vienres', 'sábadu'], - 'weekdays_short' => ['dom', 'llu', 'mar', 'mié', 'xue', 'vie', 'sáb'], - 'weekdays_min' => ['dom', 'llu', 'mar', 'mié', 'xue', 'vie', 'sáb'], - - 'year' => ':count añu|:count años', - 'y' => ':count añu|:count años', - 'a_year' => 'un añu|:count años', - - 'month' => ':count mes', - 'm' => ':count mes', - 'a_month' => 'un mes|:count mes', - - 'week' => ':count selmana|:count selmanes', - 'w' => ':count selmana|:count selmanes', - 'a_week' => 'una selmana|:count selmanes', - - 'day' => ':count día|:count díes', - 'd' => ':count día|:count díes', - 'a_day' => 'un día|:count díes', - - 'hour' => ':count hora|:count hores', - 'h' => ':count hora|:count hores', - 'a_hour' => 'una hora|:count hores', - - 'minute' => ':count minutu|:count minutos', - 'min' => ':count minutu|:count minutos', - 'a_minute' => 'un minutu|:count minutos', - - 'second' => ':count segundu|:count segundos', - 's' => ':count segundu|:count segundos', - 'a_second' => 'un segundu|:count segundos', - - 'ago' => 'hai :time', - 'from_now' => 'en :time', - 'after' => ':time dempués', - 'before' => ':time enantes', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ast_ES.php b/vendor/nesbot/carbon/src/Carbon/Lang/ast_ES.php deleted file mode 100644 index 04d7562..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ast_ES.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ast.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ayc.php b/vendor/nesbot/carbon/src/Carbon/Lang/ayc.php deleted file mode 100644 index d6a6f63..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ayc.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ayc_PE.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ayc_PE.php b/vendor/nesbot/carbon/src/Carbon/Lang/ayc_PE.php deleted file mode 100644 index ff18504..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ayc_PE.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - runasimipi.org libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['inïru', 'phiwriru', 'marsu', 'awrila', 'mayu', 'junyu', 'julyu', 'awustu', 'sitimri', 'uktuwri', 'nuwimri', 'risimri'], - 'months_short' => ['ini', 'phi', 'mar', 'awr', 'may', 'jun', 'jul', 'awu', 'sit', 'ukt', 'nuw', 'ris'], - 'weekdays' => ['tuminku', 'lunisa', 'martisa', 'mirkulisa', 'juywisa', 'wirnisa', 'sawäru'], - 'weekdays_short' => ['tum', 'lun', 'mar', 'mir', 'juy', 'wir', 'saw'], - 'weekdays_min' => ['tum', 'lun', 'mar', 'mir', 'juy', 'wir', 'saw'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['VM', 'NM'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/az.php b/vendor/nesbot/carbon/src/Carbon/Lang/az.php deleted file mode 100644 index 1e92106..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/az.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - Kunal Marwaha - * - François B - * - JD Isaacks - * - Orxan - * - Şəhriyar İmanov - * - Baran Şengül - */ -return [ - 'year' => ':count il', - 'a_year' => '{1}bir il|]1,Inf[:count il', - 'y' => ':count il', - 'month' => ':count ay', - 'a_month' => '{1}bir ay|]1,Inf[:count ay', - 'm' => ':count ay', - 'week' => ':count həftə', - 'a_week' => '{1}bir həftə|]1,Inf[:count həftə', - 'w' => ':count h.', - 'day' => ':count gün', - 'a_day' => '{1}bir gün|]1,Inf[:count gün', - 'd' => ':count g.', - 'hour' => ':count saat', - 'a_hour' => '{1}bir saat|]1,Inf[:count saat', - 'h' => ':count saat', - 'minute' => ':count d.', - 'a_minute' => '{1}bir dəqiqə|]1,Inf[:count dəqiqə', - 'min' => ':count dəqiqə', - 'second' => ':count san.', - 'a_second' => '{1}birneçə saniyə|]1,Inf[:count saniyə', - 's' => ':count saniyə', - 'ago' => ':time əvvəl', - 'from_now' => ':time sonra', - 'after' => ':time sonra', - 'before' => ':time əvvəl', - 'diff_now' => 'indi', - 'diff_today' => 'bugün', - 'diff_today_regexp' => 'bugün(?:\\s+saat)?', - 'diff_yesterday' => 'dünən', - 'diff_tomorrow' => 'sabah', - 'diff_tomorrow_regexp' => 'sabah(?:\\s+saat)?', - 'diff_before_yesterday' => 'srağagün', - 'diff_after_tomorrow' => 'birisi gün', - 'period_recurrences' => ':count dəfədən bir', - 'period_interval' => 'hər :interval', - 'period_start_date' => ':date tarixindən başlayaraq', - 'period_end_date' => ':date tarixinədək', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[bugün saat] LT', - 'nextDay' => '[sabah saat] LT', - 'nextWeek' => '[gələn həftə] dddd [saat] LT', - 'lastDay' => '[dünən] LT', - 'lastWeek' => '[keçən həftə] dddd [saat] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - if ($number === 0) { // special case for zero - return "$number-ıncı"; - } - - static $suffixes = [ - 1 => '-inci', - 5 => '-inci', - 8 => '-inci', - 70 => '-inci', - 80 => '-inci', - 2 => '-nci', - 7 => '-nci', - 20 => '-nci', - 50 => '-nci', - 3 => '-üncü', - 4 => '-üncü', - 100 => '-üncü', - 6 => '-ncı', - 9 => '-uncu', - 10 => '-uncu', - 30 => '-uncu', - 60 => '-ıncı', - 90 => '-ıncı', - ]; - - $lastDigit = $number % 10; - - return $number.($suffixes[$lastDigit] ?? $suffixes[$number % 100 - $lastDigit] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); - }, - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'gecə'; - } - if ($hour < 12) { - return 'səhər'; - } - if ($hour < 17) { - return 'gündüz'; - } - - return 'axşam'; - }, - 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], - 'months_short' => ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'], - 'months_standalone' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'İyun', 'İyul', 'Avqust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr'], - 'weekdays' => ['bazar', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], - 'weekdays_short' => ['baz', 'bze', 'çax', 'çər', 'cax', 'cüm', 'şən'], - 'weekdays_min' => ['bz', 'be', 'ça', 'çə', 'ca', 'cü', 'şə'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' və '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/az_AZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/az_AZ.php deleted file mode 100644 index 2acf881..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/az_AZ.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Pablo Saratxaga pablo@mandrakesoft.com - */ -return array_replace_recursive(require __DIR__.'/az.php', [ - 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], - 'weekdays' => ['bazar günü', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], - 'weekdays_short' => ['baz', 'ber', 'çax', 'çər', 'cax', 'cüm', 'şnb'], - 'weekdays_min' => ['baz', 'ber', 'çax', 'çər', 'cax', 'cüm', 'şnb'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/az_Cyrl.php b/vendor/nesbot/carbon/src/Carbon/Lang/az_Cyrl.php deleted file mode 100644 index 28fc62f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/az_Cyrl.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/az.php', [ - 'weekdays' => ['базар', 'базар ертәси', 'чәршәнбә ахшамы', 'чәршәнбә', 'ҹүмә ахшамы', 'ҹүмә', 'шәнбә'], - 'weekdays_short' => ['Б.', 'Б.Е.', 'Ч.А.', 'Ч.', 'Ҹ.А.', 'Ҹ.', 'Ш.'], - 'weekdays_min' => ['Б.', 'Б.Е.', 'Ч.А.', 'Ч.', 'Ҹ.А.', 'Ҹ.', 'Ш.'], - 'months' => ['јанвар', 'феврал', 'март', 'апрел', 'май', 'ијун', 'ијул', 'август', 'сентјабр', 'октјабр', 'нојабр', 'декабр'], - 'months_short' => ['јан', 'фев', 'мар', 'апр', 'май', 'ијн', 'ијл', 'авг', 'сен', 'окт', 'ној', 'дек'], - 'months_standalone' => ['Јанвар', 'Феврал', 'Март', 'Апрел', 'Май', 'Ијун', 'Ијул', 'Август', 'Сентјабр', 'Октјабр', 'Нојабр', 'Декабр'], - 'meridiem' => ['а', 'п'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/az_IR.php b/vendor/nesbot/carbon/src/Carbon/Lang/az_IR.php deleted file mode 100644 index 991a0ef..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/az_IR.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Mousa Moradi mousamk@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'OY/OM/OD', - ], - 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مئی', 'ژوئن', 'جولای', 'آقۇست', 'سپتامبر', 'اوْکتوْبر', 'نوْوامبر', 'دسامبر'], - 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مئی', 'ژوئن', 'جولای', 'آقۇست', 'سپتامبر', 'اوْکتوْبر', 'نوْوامبر', 'دسامبر'], - 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], - 'weekdays_short' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], - 'weekdays_min' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چارشنبه', 'جۆمعه آخشامی', 'جۆمعه', 'شنبه'], - 'first_day_of_week' => 6, - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰۴', '۰۵', '۰۶', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱۴', '۱۵', '۱۶', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲۴', '۲۵', '۲۶', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳۴', '۳۵', '۳۶', '۳۷', '۳۸', '۳۹', '۴۰', '۴۱', '۴۲', '۴۳', '۴۴', '۴۵', '۴۶', '۴۷', '۴۸', '۴۹', '۵۰', '۵۱', '۵۲', '۵۳', '۵۴', '۵۵', '۵۶', '۵۷', '۵۸', '۵۹', '۶۰', '۶۱', '۶۲', '۶۳', '۶۴', '۶۵', '۶۶', '۶۷', '۶۸', '۶۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷۴', '۷۵', '۷۶', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸۴', '۸۵', '۸۶', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹۴', '۹۵', '۹۶', '۹۷', '۹۸', '۹۹'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/az_Latn.php b/vendor/nesbot/carbon/src/Carbon/Lang/az_Latn.php deleted file mode 100644 index 0be3391..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/az_Latn.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/az.php', [ - 'meridiem' => ['a', 'p'], - 'weekdays' => ['bazar', 'bazar ertəsi', 'çərşənbə axşamı', 'çərşənbə', 'cümə axşamı', 'cümə', 'şənbə'], - 'weekdays_short' => ['B.', 'B.E.', 'Ç.A.', 'Ç.', 'C.A.', 'C.', 'Ş.'], - 'weekdays_min' => ['B.', 'B.E.', 'Ç.A.', 'Ç.', 'C.A.', 'C.', 'Ş.'], - 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], - 'months_short' => ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'], - 'months_standalone' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'İyun', 'İyul', 'Avqust', 'Sentyabr', 'Oktyabr', 'Noyabr', 'Dekabr'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'D MMMM YYYY, dddd HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bas.php b/vendor/nesbot/carbon/src/Carbon/Lang/bas.php deleted file mode 100644 index 41bfa1d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bas.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['I bikɛ̂glà', 'I ɓugajɔp'], - 'weekdays' => ['ŋgwà nɔ̂y', 'ŋgwà njaŋgumba', 'ŋgwà ûm', 'ŋgwà ŋgê', 'ŋgwà mbɔk', 'ŋgwà kɔɔ', 'ŋgwà jôn'], - 'weekdays_short' => ['nɔy', 'nja', 'uum', 'ŋge', 'mbɔ', 'kɔɔ', 'jon'], - 'weekdays_min' => ['nɔy', 'nja', 'uum', 'ŋge', 'mbɔ', 'kɔɔ', 'jon'], - 'months' => ['Kɔndɔŋ', 'Màcɛ̂l', 'Màtùmb', 'Màtop', 'M̀puyɛ', 'Hìlòndɛ̀', 'Njèbà', 'Hìkaŋ', 'Dìpɔ̀s', 'Bìòôm', 'Màyɛsèp', 'Lìbuy li ńyèe'], - 'months_short' => ['kɔn', 'mac', 'mat', 'mto', 'mpu', 'hil', 'nje', 'hik', 'dip', 'bio', 'may', 'liɓ'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - 'second' => ':count móndî', // less reliable - 's' => ':count móndî', // less reliable - 'a_second' => ':count móndî', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/be.php b/vendor/nesbot/carbon/src/Carbon/Lang/be.php deleted file mode 100644 index ee73636..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/be.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Carbon\CarbonInterface; -use Symfony\Component\Translation\PluralizationRules; - -// @codeCoverageIgnoreStart -if (class_exists(PluralizationRules::class)) { - PluralizationRules::set(static function ($number) { - return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - }, 'be'); -} -// @codeCoverageIgnoreEnd - -/* - * Authors: - * - Josh Soref - * - SobakaSlava - * - François B - * - Serhan Apaydın - * - JD Isaacks - * - AbadonnaAbbys - * - Siomkin Alexander - */ -return [ - 'year' => ':count год|:count гады|:count гадоў', - 'a_year' => '{1}год|:count год|:count гады|:count гадоў', - 'y' => ':count год|:count гады|:count гадоў', - 'month' => ':count месяц|:count месяцы|:count месяцаў', - 'a_month' => '{1}месяц|:count месяц|:count месяцы|:count месяцаў', - 'm' => ':count месяц|:count месяцы|:count месяцаў', - 'week' => ':count тыдзень|:count тыдні|:count тыдняў', - 'a_week' => '{1}тыдзень|:count тыдзень|:count тыдні|:count тыдняў', - 'w' => ':count тыдзень|:count тыдні|:count тыдняў', - 'day' => ':count дзень|:count дні|:count дзён', - 'a_day' => '{1}дзень|:count дзень|:count дні|:count дзён', - 'd' => ':count дн', - 'hour' => ':count гадзіну|:count гадзіны|:count гадзін', - 'a_hour' => '{1}гадзіна|:count гадзіна|:count гадзіны|:count гадзін', - 'h' => ':count гадзіна|:count гадзіны|:count гадзін', - 'minute' => ':count хвіліна|:count хвіліны|:count хвілін', - 'a_minute' => '{1}хвіліна|:count хвіліна|:count хвіліны|:count хвілін', - 'min' => ':count хв', - 'second' => ':count секунда|:count секунды|:count секунд', - 'a_second' => '{1}некалькі секунд|:count секунда|:count секунды|:count секунд', - 's' => ':count сек', - - 'hour_ago' => ':count гадзіну|:count гадзіны|:count гадзін', - 'a_hour_ago' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', - 'h_ago' => ':count гадзіну|:count гадзіны|:count гадзін', - 'minute_ago' => ':count хвіліну|:count хвіліны|:count хвілін', - 'a_minute_ago' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', - 'min_ago' => ':count хвіліну|:count хвіліны|:count хвілін', - 'second_ago' => ':count секунду|:count секунды|:count секунд', - 'a_second_ago' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', - 's_ago' => ':count секунду|:count секунды|:count секунд', - - 'hour_from_now' => ':count гадзіну|:count гадзіны|:count гадзін', - 'a_hour_from_now' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', - 'h_from_now' => ':count гадзіну|:count гадзіны|:count гадзін', - 'minute_from_now' => ':count хвіліну|:count хвіліны|:count хвілін', - 'a_minute_from_now' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', - 'min_from_now' => ':count хвіліну|:count хвіліны|:count хвілін', - 'second_from_now' => ':count секунду|:count секунды|:count секунд', - 'a_second_from_now' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', - 's_from_now' => ':count секунду|:count секунды|:count секунд', - - 'hour_after' => ':count гадзіну|:count гадзіны|:count гадзін', - 'a_hour_after' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', - 'h_after' => ':count гадзіну|:count гадзіны|:count гадзін', - 'minute_after' => ':count хвіліну|:count хвіліны|:count хвілін', - 'a_minute_after' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', - 'min_after' => ':count хвіліну|:count хвіліны|:count хвілін', - 'second_after' => ':count секунду|:count секунды|:count секунд', - 'a_second_after' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', - 's_after' => ':count секунду|:count секунды|:count секунд', - - 'hour_before' => ':count гадзіну|:count гадзіны|:count гадзін', - 'a_hour_before' => '{1}гадзіну|:count гадзіну|:count гадзіны|:count гадзін', - 'h_before' => ':count гадзіну|:count гадзіны|:count гадзін', - 'minute_before' => ':count хвіліну|:count хвіліны|:count хвілін', - 'a_minute_before' => '{1}хвіліну|:count хвіліну|:count хвіліны|:count хвілін', - 'min_before' => ':count хвіліну|:count хвіліны|:count хвілін', - 'second_before' => ':count секунду|:count секунды|:count секунд', - 'a_second_before' => '{1}некалькі секунд|:count секунду|:count секунды|:count секунд', - 's_before' => ':count секунду|:count секунды|:count секунд', - - 'ago' => ':time таму', - 'from_now' => 'праз :time', - 'after' => ':time пасля', - 'before' => ':time да', - 'diff_now' => 'цяпер', - 'diff_today' => 'Сёння', - 'diff_today_regexp' => 'Сёння(?:\\s+ў)?', - 'diff_yesterday' => 'учора', - 'diff_yesterday_regexp' => 'Учора(?:\\s+ў)?', - 'diff_tomorrow' => 'заўтра', - 'diff_tomorrow_regexp' => 'Заўтра(?:\\s+ў)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY г.', - 'LLL' => 'D MMMM YYYY г., HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY г., HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Сёння ў] LT', - 'nextDay' => '[Заўтра ў] LT', - 'nextWeek' => '[У] dddd [ў] LT', - 'lastDay' => '[Учора ў] LT', - 'lastWeek' => function (CarbonInterface $current) { - switch ($current->dayOfWeek) { - case 1: - case 2: - case 4: - return '[У мінулы] dddd [ў] LT'; - default: - return '[У мінулую] dddd [ў] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'M': - case 'd': - case 'DDD': - case 'w': - case 'W': - return ($number % 10 === 2 || $number % 10 === 3) && ($number % 100 !== 12 && $number % 100 !== 13) ? $number.'-і' : $number.'-ы'; - case 'D': - return $number.'-га'; - default: - return $number; - } - }, - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'ночы'; - } - if ($hour < 12) { - return 'раніцы'; - } - if ($hour < 17) { - return 'дня'; - } - - return 'вечара'; - }, - 'months' => ['студзеня', 'лютага', 'сакавіка', 'красавіка', 'траўня', 'чэрвеня', 'ліпеня', 'жніўня', 'верасня', 'кастрычніка', 'лістапада', 'снежня'], - 'months_standalone' => ['студзень', 'люты', 'сакавік', 'красавік', 'травень', 'чэрвень', 'ліпень', 'жнівень', 'верасень', 'кастрычнік', 'лістапад', 'снежань'], - 'months_short' => ['студ', 'лют', 'сак', 'крас', 'трав', 'чэрв', 'ліп', 'жнів', 'вер', 'каст', 'ліст', 'снеж'], - 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => ['нядзелю', 'панядзелак', 'аўторак', 'сераду', 'чацвер', 'пятніцу', 'суботу'], - 'weekdays_standalone' => ['нядзеля', 'панядзелак', 'аўторак', 'серада', 'чацвер', 'пятніца', 'субота'], - 'weekdays_short' => ['нд', 'пн', 'ат', 'ср', 'чц', 'пт', 'сб'], - 'weekdays_min' => ['нд', 'пн', 'ат', 'ср', 'чц', 'пт', 'сб'], - 'weekdays_regexp' => '/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' і '], - 'months_short_standalone' => ['сту', 'лют', 'сак', 'кра', 'май', 'чэр', 'ліп', 'жні', 'вер', 'кас', 'ліс', 'сне'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/be_BY.php b/vendor/nesbot/carbon/src/Carbon/Lang/be_BY.php deleted file mode 100644 index 26684b4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/be_BY.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/be.php', [ - 'months' => ['студзеня', 'лютага', 'сакавіка', 'красавіка', 'мая', 'чэрвеня', 'ліпеня', 'жніўня', 'верасня', 'кастрычніка', 'лістапада', 'снежня'], - 'months_short' => ['сту', 'лют', 'сак', 'кра', 'мая', 'чэр', 'ліп', 'жні', 'вер', 'кас', 'ліс', 'сне'], - 'weekdays' => ['Нядзеля', 'Панядзелак', 'Аўторак', 'Серада', 'Чацвер', 'Пятніца', 'Субота'], - 'weekdays_short' => ['Няд', 'Пан', 'Аўт', 'Срд', 'Чцв', 'Пят', 'Суб'], - 'weekdays_min' => ['Няд', 'Пан', 'Аўт', 'Срд', 'Чцв', 'Пят', 'Суб'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/be_BY@latin.php b/vendor/nesbot/carbon/src/Carbon/Lang/be_BY@latin.php deleted file mode 100644 index 517ce83..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/be_BY@latin.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['studzienia', 'lutaha', 'sakavika', 'krasavika', 'maja', 'červienia', 'lipienia', 'žniŭnia', 'vieraśnia', 'kastryčnika', 'listapada', 'śniežnia'], - 'months_short' => ['Stu', 'Lut', 'Sak', 'Kra', 'Maj', 'Čer', 'Lip', 'Žni', 'Vie', 'Kas', 'Lis', 'Śni'], - 'weekdays' => ['Niadziela', 'Paniadziełak', 'Aŭtorak', 'Sierada', 'Čaćvier', 'Piatnica', 'Subota'], - 'weekdays_short' => ['Nia', 'Pan', 'Aŭt', 'Sie', 'Čać', 'Pia', 'Sub'], - 'weekdays_min' => ['Nia', 'Pan', 'Aŭt', 'Sie', 'Čać', 'Pia', 'Sub'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bem.php b/vendor/nesbot/carbon/src/Carbon/Lang/bem.php deleted file mode 100644 index 1c3ef03..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bem.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/bem_ZM.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bem_ZM.php b/vendor/nesbot/carbon/src/Carbon/Lang/bem_ZM.php deleted file mode 100644 index 620b579..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bem_ZM.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - ANLoc Martin Benjamin locales@africanlocalization.net - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'MM/DD/YYYY', - ], - 'months' => ['Januari', 'Februari', 'Machi', 'Epreo', 'Mei', 'Juni', 'Julai', 'Ogasti', 'Septemba', 'Oktoba', 'Novemba', 'Disemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Epr', 'Mei', 'Jun', 'Jul', 'Oga', 'Sep', 'Okt', 'Nov', 'Dis'], - 'weekdays' => ['Pa Mulungu', 'Palichimo', 'Palichibuli', 'Palichitatu', 'Palichine', 'Palichisano', 'Pachibelushi'], - 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - 'weekdays_min' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['uluchelo', 'akasuba'], - - 'year' => 'myaka :count', - 'y' => 'myaka :count', - 'a_year' => 'myaka :count', - - 'month' => 'myeshi :count', - 'm' => 'myeshi :count', - 'a_month' => 'myeshi :count', - - 'week' => 'umulungu :count', - 'w' => 'umulungu :count', - 'a_week' => 'umulungu :count', - - 'day' => 'inshiku :count', - 'd' => 'inshiku :count', - 'a_day' => 'inshiku :count', - - 'hour' => 'awala :count', - 'h' => 'awala :count', - 'a_hour' => 'awala :count', - - 'minute' => 'miniti :count', - 'min' => 'miniti :count', - 'a_minute' => 'miniti :count', - - 'second' => 'sekondi :count', - 's' => 'sekondi :count', - 'a_second' => 'sekondi :count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ber.php b/vendor/nesbot/carbon/src/Carbon/Lang/ber.php deleted file mode 100644 index 685603c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ber.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ber_DZ.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ber_DZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/ber_DZ.php deleted file mode 100644 index 38de10a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ber_DZ.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Pablo Saratxaga pablo@mandrakesoft.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], - 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], - 'weekdays' => ['bazar günü', 'birinci gün', 'ikinci gün', 'üçüncü gün', 'dördüncü gün', 'beşinci gün', 'altıncı gün'], - 'weekdays_short' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], - 'weekdays_min' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ber_MA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ber_MA.php deleted file mode 100644 index 38de10a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ber_MA.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Pablo Saratxaga pablo@mandrakesoft.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'], - 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avq', 'Sen', 'Okt', 'Noy', 'Dek'], - 'weekdays' => ['bazar günü', 'birinci gün', 'ikinci gün', 'üçüncü gün', 'dördüncü gün', 'beşinci gün', 'altıncı gün'], - 'weekdays_short' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], - 'weekdays_min' => ['baz', 'bir', 'iki', 'üçü', 'dör', 'beş', 'alt'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bez.php b/vendor/nesbot/carbon/src/Carbon/Lang/bez.php deleted file mode 100644 index d59c5ef..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bez.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['pamilau', 'pamunyi'], - 'weekdays' => ['pa mulungu', 'pa shahuviluha', 'pa hivili', 'pa hidatu', 'pa hitayi', 'pa hihanu', 'pa shahulembela'], - 'weekdays_short' => ['Mul', 'Vil', 'Hiv', 'Hid', 'Hit', 'Hih', 'Lem'], - 'weekdays_min' => ['Mul', 'Vil', 'Hiv', 'Hid', 'Hit', 'Hih', 'Lem'], - 'months' => ['pa mwedzi gwa hutala', 'pa mwedzi gwa wuvili', 'pa mwedzi gwa wudatu', 'pa mwedzi gwa wutai', 'pa mwedzi gwa wuhanu', 'pa mwedzi gwa sita', 'pa mwedzi gwa saba', 'pa mwedzi gwa nane', 'pa mwedzi gwa tisa', 'pa mwedzi gwa kumi', 'pa mwedzi gwa kumi na moja', 'pa mwedzi gwa kumi na mbili'], - 'months_short' => ['Hut', 'Vil', 'Dat', 'Tai', 'Han', 'Sit', 'Sab', 'Nan', 'Tis', 'Kum', 'Kmj', 'Kmb'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bg.php b/vendor/nesbot/carbon/src/Carbon/Lang/bg.php deleted file mode 100644 index f768074..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bg.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - Serhan Apaydın - * - JD Isaacks - * - Glavić - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count година|:count години', - 'a_year' => 'година|:count години', - 'y' => ':count година|:count години', - 'month' => ':count месец|:count месеца', - 'a_month' => 'месец|:count месеца', - 'm' => ':count месец|:count месеца', - 'week' => ':count седмица|:count седмици', - 'a_week' => 'седмица|:count седмици', - 'w' => ':count седмица|:count седмици', - 'day' => ':count ден|:count дни', - 'a_day' => 'ден|:count дни', - 'd' => ':count ден|:count дни', - 'hour' => ':count час|:count часа', - 'a_hour' => 'час|:count часа', - 'h' => ':count час|:count часа', - 'minute' => ':count минута|:count минути', - 'a_minute' => 'минута|:count минути', - 'min' => ':count минута|:count минути', - 'second' => ':count секунда|:count секунди', - 'a_second' => 'няколко секунди|:count секунди', - 's' => ':count секунда|:count секунди', - 'ago' => 'преди :time', - 'from_now' => 'след :time', - 'after' => 'след :time', - 'before' => 'преди :time', - 'diff_now' => 'сега', - 'diff_today' => 'Днес', - 'diff_today_regexp' => 'Днес(?:\\s+в)?', - 'diff_yesterday' => 'вчера', - 'diff_yesterday_regexp' => 'Вчера(?:\\s+в)?', - 'diff_tomorrow' => 'утре', - 'diff_tomorrow_regexp' => 'Утре(?:\\s+в)?', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'D.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY H:mm', - 'LLLL' => 'dddd, D MMMM YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => '[Днес в] LT', - 'nextDay' => '[Утре в] LT', - 'nextWeek' => 'dddd [в] LT', - 'lastDay' => '[Вчера в] LT', - 'lastWeek' => function (CarbonInterface $current) { - switch ($current->dayOfWeek) { - case 0: - case 3: - case 6: - return '[В изминалата] dddd [в] LT'; - default: - return '[В изминалия] dddd [в] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - $lastDigit = $number % 10; - $last2Digits = $number % 100; - if ($number === 0) { - return "$number-ев"; - } - if ($last2Digits === 0) { - return "$number-ен"; - } - if ($last2Digits > 10 && $last2Digits < 20) { - return "$number-ти"; - } - if ($lastDigit === 1) { - return "$number-ви"; - } - if ($lastDigit === 2) { - return "$number-ри"; - } - if ($lastDigit === 7 || $lastDigit === 8) { - return "$number-ми"; - } - - return "$number-ти"; - }, - 'months' => ['януари', 'февруари', 'март', 'април', 'май', 'юни', 'юли', 'август', 'септември', 'октомври', 'ноември', 'декември'], - 'months_short' => ['яну', 'фев', 'мар', 'апр', 'май', 'юни', 'юли', 'авг', 'сеп', 'окт', 'ное', 'дек'], - 'weekdays' => ['неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота'], - 'weekdays_short' => ['нед', 'пон', 'вто', 'сря', 'чет', 'пет', 'съб'], - 'weekdays_min' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' и '], - 'meridiem' => ['преди обяд', 'следобед'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bg_BG.php b/vendor/nesbot/carbon/src/Carbon/Lang/bg_BG.php deleted file mode 100644 index b53874d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bg_BG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/bg.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bhb.php b/vendor/nesbot/carbon/src/Carbon/Lang/bhb.php deleted file mode 100644 index 49f0803..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bhb.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/bhb_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bhb_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/bhb_IN.php deleted file mode 100644 index ab557cb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bhb_IN.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Samsung Electronics Co., Ltd. alexey.merzlyakov@samsung.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - 'weekdays' => ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - 'weekdays_min' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bho.php b/vendor/nesbot/carbon/src/Carbon/Lang/bho.php deleted file mode 100644 index e9ed0b6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bho.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/bho_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bho_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/bho_IN.php deleted file mode 100644 index bc54f36..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bho_IN.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bhashaghar@googlegroups.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर"'], - 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर"'], - 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'], - 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'], - 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], - - 'hour' => ':count मौसम', - 'h' => ':count मौसम', - 'a_hour' => ':count मौसम', - - 'minute' => ':count कला', - 'min' => ':count कला', - 'a_minute' => ':count कला', - - 'second' => ':count सोमार', - 's' => ':count सोमार', - 'a_second' => ':count सोमार', - - 'year' => ':count साल', - 'y' => ':count साल', - 'a_year' => ':count साल', - - 'month' => ':count महिना', - 'm' => ':count महिना', - 'a_month' => ':count महिना', - - 'week' => ':count सप्ताह', - 'w' => ':count सप्ताह', - 'a_week' => ':count सप्ताह', - - 'day' => ':count दिन', - 'd' => ':count दिन', - 'a_day' => ':count दिन', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bi.php b/vendor/nesbot/carbon/src/Carbon/Lang/bi.php deleted file mode 100644 index dd08128..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bi.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/bi_VU.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bi_VU.php b/vendor/nesbot/carbon/src/Carbon/Lang/bi_VU.php deleted file mode 100644 index 1fe7770..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bi_VU.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com & maninder1.s@samsung.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'dddd DD MMM YYYY', - ], - 'months' => ['jenuware', 'febwari', 'maj', 'epril', 'mei', 'jun', 'julae', 'ogis', 'septemba', 'oktoba', 'novemba', 'disemba'], - 'months_short' => ['jen', 'feb', 'maj', 'epr', 'mei', 'jun', 'jul', 'ogi', 'sep', 'okt', 'nov', 'dis'], - 'weekdays' => ['sande', 'mande', 'maj', 'wota', 'fraede', 'sarede'], - 'weekdays_short' => ['san', 'man', 'maj', 'wot', 'fra', 'sar'], - 'weekdays_min' => ['san', 'man', 'maj', 'wot', 'fra', 'sar'], - - 'year' => ':count seven', // less reliable - 'y' => ':count seven', // less reliable - 'a_year' => ':count seven', // less reliable - - 'month' => ':count mi', // less reliable - 'm' => ':count mi', // less reliable - 'a_month' => ':count mi', // less reliable - - 'week' => ':count sarede', // less reliable - 'w' => ':count sarede', // less reliable - 'a_week' => ':count sarede', // less reliable - - 'day' => ':count betde', // less reliable - 'd' => ':count betde', // less reliable - 'a_day' => ':count betde', // less reliable - - 'hour' => ':count klok', // less reliable - 'h' => ':count klok', // less reliable - 'a_hour' => ':count klok', // less reliable - - 'minute' => ':count smol', // less reliable - 'min' => ':count smol', // less reliable - 'a_minute' => ':count smol', // less reliable - - 'second' => ':count tu', // less reliable - 's' => ':count tu', // less reliable - 'a_second' => ':count tu', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bm.php b/vendor/nesbot/carbon/src/Carbon/Lang/bm.php deleted file mode 100644 index 92822d2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bm.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Estelle Comment - */ -return [ - 'year' => 'san :count', - 'a_year' => '{1}san kelen|san :count', - 'y' => 'san :count', - 'month' => 'kalo :count', - 'a_month' => '{1}kalo kelen|kalo :count', - 'm' => 'k. :count', - 'week' => 'dɔgɔkun :count', - 'a_week' => 'dɔgɔkun kelen', - 'w' => 'd. :count', - 'day' => 'tile :count', - 'd' => 't. :count', - 'a_day' => '{1}tile kelen|tile :count', - 'hour' => 'lɛrɛ :count', - 'a_hour' => '{1}lɛrɛ kelen|lɛrɛ :count', - 'h' => 'l. :count', - 'minute' => 'miniti :count', - 'a_minute' => '{1}miniti kelen|miniti :count', - 'min' => 'm. :count', - 'second' => 'sekondi :count', - 'a_second' => '{1}sanga dama dama|sekondi :count', - 's' => 'sek. :count', - 'ago' => 'a bɛ :time bɔ', - 'from_now' => ':time kɔnɔ', - 'diff_today' => 'Bi', - 'diff_yesterday' => 'Kunu', - 'diff_yesterday_regexp' => 'Kunu(?:\\s+lɛrɛ)?', - 'diff_tomorrow' => 'Sini', - 'diff_tomorrow_regexp' => 'Sini(?:\\s+lɛrɛ)?', - 'diff_today_regexp' => 'Bi(?:\\s+lɛrɛ)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'MMMM [tile] D [san] YYYY', - 'LLL' => 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', - 'LLLL' => 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Bi lɛrɛ] LT', - 'nextDay' => '[Sini lɛrɛ] LT', - 'nextWeek' => 'dddd [don lɛrɛ] LT', - 'lastDay' => '[Kunu lɛrɛ] LT', - 'lastWeek' => 'dddd [tɛmɛnen lɛrɛ] LT', - 'sameElse' => 'L', - ], - 'months' => ['Zanwuyekalo', 'Fewuruyekalo', 'Marisikalo', 'Awirilikalo', 'Mɛkalo', 'Zuwɛnkalo', 'Zuluyekalo', 'Utikalo', 'Sɛtanburukalo', 'ɔkutɔburukalo', 'Nowanburukalo', 'Desanburukalo'], - 'months_short' => ['Zan', 'Few', 'Mar', 'Awi', 'Mɛ', 'Zuw', 'Zul', 'Uti', 'Sɛt', 'ɔku', 'Now', 'Des'], - 'weekdays' => ['Kari', 'Ntɛnɛn', 'Tarata', 'Araba', 'Alamisa', 'Juma', 'Sibiri'], - 'weekdays_short' => ['Kar', 'Ntɛ', 'Tar', 'Ara', 'Ala', 'Jum', 'Sib'], - 'weekdays_min' => ['Ka', 'Nt', 'Ta', 'Ar', 'Al', 'Ju', 'Si'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' ni '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bn.php b/vendor/nesbot/carbon/src/Carbon/Lang/bn.php deleted file mode 100644 index 8e14789..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bn.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - Shakib Hossain - * - Raju - * - Aniruddha Adhikary - * - JD Isaacks - * - Saiful Islam - * - Faisal Islam - */ -return [ - 'year' => ':count বছর', - 'a_year' => 'এক বছর|:count বছর', - 'y' => '১ বছর|:count বছর', - 'month' => ':count মাস', - 'a_month' => 'এক মাস|:count মাস', - 'm' => '১ মাস|:count মাস', - 'week' => ':count সপ্তাহ', - 'a_week' => '১ সপ্তাহ|:count সপ্তাহ', - 'w' => '১ সপ্তাহ|:count সপ্তাহ', - 'day' => ':count দিন', - 'a_day' => 'এক দিন|:count দিন', - 'd' => '১ দিন|:count দিন', - 'hour' => ':count ঘন্টা', - 'a_hour' => 'এক ঘন্টা|:count ঘন্টা', - 'h' => '১ ঘন্টা|:count ঘন্টা', - 'minute' => ':count মিনিট', - 'a_minute' => 'এক মিনিট|:count মিনিট', - 'min' => '১ মিনিট|:count মিনিট', - 'second' => ':count সেকেন্ড', - 'a_second' => 'কয়েক সেকেন্ড|:count সেকেন্ড', - 's' => '১ সেকেন্ড|:count সেকেন্ড', - 'ago' => ':time আগে', - 'from_now' => ':time পরে', - 'after' => ':time পরে', - 'before' => ':time আগে', - 'diff_now' => 'এখন', - 'diff_today' => 'আজ', - 'diff_yesterday' => 'গতকাল', - 'diff_tomorrow' => 'আগামীকাল', - 'period_recurrences' => ':count বার|:count বার', - 'period_interval' => 'প্রতি :interval', - 'period_start_date' => ':date থেকে', - 'period_end_date' => ':date পর্যন্ত', - 'formats' => [ - 'LT' => 'A Oh:Om সময়', - 'LTS' => 'A Oh:Om:Os সময়', - 'L' => 'OD/OM/OY', - 'LL' => 'OD MMMM OY', - 'LLL' => 'OD MMMM OY, A Oh:Om সময়', - 'LLLL' => 'dddd, OD MMMM OY, A Oh:Om সময়', - ], - 'calendar' => [ - 'sameDay' => '[আজ] LT', - 'nextDay' => '[আগামীকাল] LT', - 'nextWeek' => 'dddd, LT', - 'lastDay' => '[গতকাল] LT', - 'lastWeek' => '[গত] dddd, LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'রাত'; - } - if ($hour < 10) { - return 'সকাল'; - } - if ($hour < 17) { - return 'দুপুর'; - } - if ($hour < 20) { - return 'বিকাল'; - } - - return 'রাত'; - }, - 'months' => ['জানুয়ারী', 'ফেব্রুয়ারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], - 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্র', 'মে', 'জুন', 'জুল', 'আগ', 'সেপ্ট', 'অক্টো', 'নভে', 'ডিসে'], - 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], - 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], - 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গ', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], - 'list' => [', ', ' এবং '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'weekdays_standalone' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহষ্পতিবার', 'শুক্রবার', 'শনিবার'], - 'weekdays_min_standalone' => ['রঃ', 'সোঃ', 'মঃ', 'বুঃ', 'বৃঃ', 'শুঃ', 'শনি'], - 'months_short_standalone' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], - 'alt_numbers' => ['০', '১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bn_BD.php b/vendor/nesbot/carbon/src/Carbon/Lang/bn_BD.php deleted file mode 100644 index b5b28dd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bn_BD.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ankur Group, Taneem Ahmed, Jamil Ahmed - */ -return array_replace_recursive(require __DIR__.'/bn.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], - 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], - 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], - 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], - 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহঃ', 'শুক্র', 'শনি'], - 'first_day_of_week' => 5, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bn_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/bn_IN.php deleted file mode 100644 index 8b3a50e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bn_IN.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/bn.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['জানুয়ারী', 'ফেব্রুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], - 'months_short' => ['জানু', 'ফেব', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'], - 'weekdays' => ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পতিবার', 'শুক্রবার', 'শনিবার'], - 'weekdays_short' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], - 'weekdays_min' => ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পতি', 'শুক্র', 'শনি'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bo.php b/vendor/nesbot/carbon/src/Carbon/Lang/bo.php deleted file mode 100644 index 99e1bf4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bo.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - JD Isaacks - */ -return [ - 'year' => '{1}ལོ་གཅིག|]1,Inf[:count ལོ', - 'month' => '{1}ཟླ་བ་གཅིག|]1,Inf[:count ཟླ་བ', - 'week' => ':count བདུན་ཕྲག', - 'day' => '{1}ཉིན་གཅིག|]1,Inf[:count ཉིན་', - 'hour' => '{1}ཆུ་ཚོད་གཅིག|]1,Inf[:count ཆུ་ཚོད', - 'minute' => '{1}སྐར་མ་གཅིག|]1,Inf[:count སྐར་མ', - 'second' => '{1}ལམ་སང|]1,Inf[:count སྐར་ཆ།', - 'ago' => ':time སྔན་ལ', - 'from_now' => ':time ལ་', - 'diff_yesterday' => 'ཁ་སང', - 'diff_today' => 'དི་རིང', - 'diff_tomorrow' => 'སང་ཉིན', - 'formats' => [ - 'LT' => 'A h:mm', - 'LTS' => 'A h:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, A h:mm', - 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', - ], - 'calendar' => [ - 'sameDay' => '[དི་རིང] LT', - 'nextDay' => '[སང་ཉིན] LT', - 'nextWeek' => '[བདུན་ཕྲག་རྗེས་མ], LT', - 'lastDay' => '[ཁ་སང] LT', - 'lastWeek' => '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'མཚན་མོ'; - } - if ($hour < 10) { - return 'ཞོགས་ཀས'; - } - if ($hour < 17) { - return 'ཉིན་གུང'; - } - if ($hour < 20) { - return 'དགོང་དག'; - } - - return 'མཚན་མོ'; - }, - 'months' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], - 'months_short' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], - 'weekdays' => ['གཟའ་ཉི་མ་', 'གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་པ་', 'གཟའ་ཕུར་བུ', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་པ་'], - 'weekdays_short' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ', 'པ་སངས་', 'སྤེན་པ་'], - 'weekdays_min' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ', 'པ་སངས་', 'སྤེན་པ་'], - 'list' => [', ', ' ཨནད་ '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'months_standalone' => ['ཟླ་བ་དང་པོ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་པ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུན་པ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bo_CN.php b/vendor/nesbot/carbon/src/Carbon/Lang/bo_CN.php deleted file mode 100644 index 380abb1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bo_CN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/bo.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bo_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/bo_IN.php deleted file mode 100644 index ca50d04..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bo_IN.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/bo.php', [ - 'meridiem' => ['སྔ་དྲོ་', 'ཕྱི་དྲོ་'], - 'weekdays' => ['གཟའ་ཉི་མ་', 'གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་པ་', 'གཟའ་ཕུར་བུ་', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་པ་'], - 'weekdays_short' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ་', 'པ་སངས་', 'སྤེན་པ་'], - 'weekdays_min' => ['ཉི་མ་', 'ཟླ་བ་', 'མིག་དམར་', 'ལྷག་པ་', 'ཕུར་བུ་', 'པ་སངས་', 'སྤེན་པ་'], - 'months' => ['ཟླ་བ་དང་པོ', 'ཟླ་བ་གཉིས་པ', 'ཟླ་བ་གསུམ་པ', 'ཟླ་བ་བཞི་པ', 'ཟླ་བ་ལྔ་པ', 'ཟླ་བ་དྲུག་པ', 'ཟླ་བ་བདུན་པ', 'ཟླ་བ་བརྒྱད་པ', 'ཟླ་བ་དགུ་པ', 'ཟླ་བ་བཅུ་པ', 'ཟླ་བ་བཅུ་གཅིག་པ', 'ཟླ་བ་བཅུ་གཉིས་པ'], - 'months_short' => ['ཟླ་༡', 'ཟླ་༢', 'ཟླ་༣', 'ཟླ་༤', 'ཟླ་༥', 'ཟླ་༦', 'ཟླ་༧', 'ཟླ་༨', 'ཟླ་༩', 'ཟླ་༡༠', 'ཟླ་༡༡', 'ཟླ་༡༢'], - 'months_standalone' => ['ཟླ་བ་དང་པོ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་པ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུན་པ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], - 'weekend' => [0, 0], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'YYYY-MM-DD', - 'LL' => 'YYYY ལོའི་MMMཚེས་D', - 'LLL' => 'སྤྱི་ལོ་YYYY MMMMའི་ཚེས་D h:mm a', - 'LLLL' => 'YYYY MMMMའི་ཚེས་D, dddd h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/br.php b/vendor/nesbot/carbon/src/Carbon/Lang/br.php deleted file mode 100644 index 583472f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/br.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Serhan Apaydın - * - JD Isaacks - */ -return [ - 'year' => '{1}:count bloaz|{3,4,5,9}:count bloaz|[0,Inf[:count vloaz', - 'a_year' => '{1}ur bloaz|{3,4,5,9}:count bloaz|[0,Inf[:count vloaz', - 'month' => '{1}:count miz|{2}:count viz|[0,Inf[:count miz', - 'a_month' => '{1}ur miz|{2}:count viz|[0,Inf[:count miz', - 'week' => ':count sizhun', - 'a_week' => '{1}ur sizhun|:count sizhun', - 'day' => '{1}:count devezh|{2}:count zevezh|[0,Inf[:count devezh', - 'a_day' => '{1}un devezh|{2}:count zevezh|[0,Inf[:count devezh', - 'hour' => ':count eur', - 'a_hour' => '{1}un eur|:count eur', - 'minute' => '{1}:count vunutenn|{2}:count vunutenn|[0,Inf[:count munutenn', - 'a_minute' => '{1}ur vunutenn|{2}:count vunutenn|[0,Inf[:count munutenn', - 'second' => ':count eilenn', - 'a_second' => '{1}un nebeud segondennoù|[0,Inf[:count eilenn', - 'ago' => ':time \'zo', - 'from_now' => 'a-benn :time', - 'diff_now' => 'bremañ', - 'diff_today' => 'Hiziv', - 'diff_today_regexp' => 'Hiziv(?:\\s+da)?', - 'diff_yesterday' => 'decʼh', - 'diff_yesterday_regexp' => 'Dec\'h(?:\\s+da)?', - 'diff_tomorrow' => 'warcʼhoazh', - 'diff_tomorrow_regexp' => 'Warc\'hoazh(?:\\s+da)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D [a viz] MMMM YYYY', - 'LLL' => 'D [a viz] MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D [a viz] MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Hiziv da] LT', - 'nextDay' => '[Warc\'hoazh da] LT', - 'nextWeek' => 'dddd [da] LT', - 'lastDay' => '[Dec\'h da] LT', - 'lastWeek' => 'dddd [paset da] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - return $number.($number === 1 ? 'añ' : 'vet'); - }, - 'months' => ['Genver', 'C\'hwevrer', 'Meurzh', 'Ebrel', 'Mae', 'Mezheven', 'Gouere', 'Eost', 'Gwengolo', 'Here', 'Du', 'Kerzu'], - 'months_short' => ['Gen', 'C\'hwe', 'Meu', 'Ebr', 'Mae', 'Eve', 'Gou', 'Eos', 'Gwe', 'Her', 'Du', 'Ker'], - 'weekdays' => ['Sul', 'Lun', 'Meurzh', 'Merc\'her', 'Yaou', 'Gwener', 'Sadorn'], - 'weekdays_short' => ['Sul', 'Lun', 'Meu', 'Mer', 'Yao', 'Gwe', 'Sad'], - 'weekdays_min' => ['Su', 'Lu', 'Me', 'Mer', 'Ya', 'Gw', 'Sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' hag '], - 'meridiem' => ['A.M.', 'G.M.'], - - 'y' => ':count bl.', - 'd' => ':count d', - 'h' => ':count e', - 'min' => ':count min', - 's' => ':count s', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/br_FR.php b/vendor/nesbot/carbon/src/Carbon/Lang/br_FR.php deleted file mode 100644 index 7f54185..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/br_FR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/br.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/brx.php b/vendor/nesbot/carbon/src/Carbon/Lang/brx.php deleted file mode 100644 index a0a7bf9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/brx.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/brx_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/brx_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/brx_IN.php deleted file mode 100644 index 2d80ced..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/brx_IN.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat Pune bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'M/D/YY', - ], - 'months' => ['जानुवारी', 'फेब्रुवारी', 'मार्स', 'एफ्रिल', 'मे', 'जुन', 'जुलाइ', 'आगस्थ', 'सेबथेज्ब़र', 'अखथबर', 'नबेज्ब़र', 'दिसेज्ब़र'], - 'months_short' => ['जानुवारी', 'फेब्रुवारी', 'मार्स', 'एप्रिल', 'मे', 'जुन', 'जुलाइ', 'आगस्थ', 'सेबथेज्ब़र', 'अखथबर', 'नबेज्ब़र', 'दिसेज्ब़र'], - 'weekdays' => ['रबिबार', 'सोबार', 'मंगलबार', 'बुदबार', 'बिसथिबार', 'सुखुरबार', 'सुनिबार'], - 'weekdays_short' => ['रबि', 'सम', 'मंगल', 'बुद', 'बिसथि', 'सुखुर', 'सुनि'], - 'weekdays_min' => ['रबि', 'सम', 'मंगल', 'बुद', 'बिसथि', 'सुखुर', 'सुनि'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['फुं.', 'बेलासे.'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bs.php b/vendor/nesbot/carbon/src/Carbon/Lang/bs.php deleted file mode 100644 index e5d6808..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bs.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bokideckonja - * - Josh Soref - * - François B - * - shaishavgandhi05 - * - Serhan Apaydın - * - JD Isaacks - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count godina|:count godine|:count godina', - 'y' => ':count godina|:count godine|:count godina', - 'month' => ':count mjesec|:count mjeseca|:count mjeseci', - 'm' => ':count mjesec|:count mjeseca|:count mjeseci', - 'week' => ':count sedmice|:count sedmicu|:count sedmica', - 'w' => ':count sedmice|:count sedmicu|:count sedmica', - 'day' => ':count dan|:count dana|:count dana', - 'd' => ':count dan|:count dana|:count dana', - 'hour' => ':count sat|:count sata|:count sati', - 'h' => ':count sat|:count sata|:count sati', - 'minute' => ':count minut|:count minuta|:count minuta', - 'min' => ':count minut|:count minuta|:count minuta', - 'second' => ':count sekund|:count sekunda|:count sekundi', - 's' => ':count sekund|:count sekunda|:count sekundi', - 'ago' => 'prije :time', - 'from_now' => 'za :time', - 'after' => 'nakon :time', - 'before' => ':time ranije', - 'diff_now' => 'sada', - 'diff_today' => 'danas', - 'diff_today_regexp' => 'danas(?:\\s+u)?', - 'diff_yesterday' => 'jučer', - 'diff_yesterday_regexp' => 'jučer(?:\\s+u)?', - 'diff_tomorrow' => 'sutra', - 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY H:mm', - 'LLLL' => 'dddd, D. MMMM YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => '[danas u] LT', - 'nextDay' => '[sutra u] LT', - 'nextWeek' => function (CarbonInterface $current) { - switch ($current->dayOfWeek) { - case 0: - return '[u] [nedjelju] [u] LT'; - case 3: - return '[u] [srijedu] [u] LT'; - case 6: - return '[u] [subotu] [u] LT'; - default: - return '[u] dddd [u] LT'; - } - }, - 'lastDay' => '[jučer u] LT', - 'lastWeek' => function (CarbonInterface $current) { - switch ($current->dayOfWeek) { - case 0: - case 3: - return '[prošlu] dddd [u] LT'; - case 6: - return '[prošle] [subote] [u] LT'; - default: - return '[prošli] dddd [u] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['januar', 'februar', 'mart', 'april', 'maj', 'juni', 'juli', 'august', 'septembar', 'oktobar', 'novembar', 'decembar'], - 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'], - 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], - 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], - 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' i '], - 'meridiem' => ['prijepodne', 'popodne'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php b/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php deleted file mode 100644 index 0a59117..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bs_BA.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/bs.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bs_Cyrl.php b/vendor/nesbot/carbon/src/Carbon/Lang/bs_Cyrl.php deleted file mode 100644 index e1a1744..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bs_Cyrl.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/bs.php', [ - 'meridiem' => ['пре подне', 'поподне'], - 'weekdays' => ['недјеља', 'понедјељак', 'уторак', 'сриједа', 'четвртак', 'петак', 'субота'], - 'weekdays_short' => ['нед', 'пон', 'уто', 'сри', 'чет', 'пет', 'суб'], - 'weekdays_min' => ['нед', 'пон', 'уто', 'сри', 'чет', 'пет', 'суб'], - 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јуни', 'јули', 'аугуст', 'септембар', 'октобар', 'новембар', 'децембар'], - 'months_short' => ['јан', 'феб', 'мар', 'апр', 'мај', 'јун', 'јул', 'ауг', 'сеп', 'окт', 'нов', 'дец'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D.M.YYYY.', - 'LL' => 'DD.MM.YYYY.', - 'LLL' => 'DD. MMMM YYYY. HH:mm', - 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bs_Latn.php b/vendor/nesbot/carbon/src/Carbon/Lang/bs_Latn.php deleted file mode 100644 index b4e363e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bs_Latn.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/bs.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/byn.php b/vendor/nesbot/carbon/src/Carbon/Lang/byn.php deleted file mode 100644 index 7125f3d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/byn.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/byn_ER.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/byn_ER.php b/vendor/nesbot/carbon/src/Carbon/Lang/byn_ER.php deleted file mode 100644 index ad67533..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/byn_ER.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['ልደትሪ', 'ካብኽብቲ', 'ክብላ', 'ፋጅኺሪ', 'ክቢቅሪ', 'ምኪኤል ትጓ̅ኒሪ', 'ኰርኩ', 'ማርያም ትሪ', 'ያኸኒ መሳቅለሪ', 'መተሉ', 'ምኪኤል መሽወሪ', 'ተሕሳስሪ'], - 'months_short' => ['ልደት', 'ካብኽ', 'ክብላ', 'ፋጅኺ', 'ክቢቅ', 'ም/ት', 'ኰር', 'ማርያ', 'ያኸኒ', 'መተሉ', 'ም/ም', 'ተሕሳ'], - 'weekdays' => ['ሰንበር ቅዳዅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ ወሪ ለብዋ', 'ኣምድ', 'ኣርብ', 'ሰንበር ሽጓዅ'], - 'weekdays_short' => ['ሰ/ቅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ', 'ኣምድ', 'ኣርብ', 'ሰ/ሽ'], - 'weekdays_min' => ['ሰ/ቅ', 'ሰኑ', 'ሰሊጝ', 'ለጓ', 'ኣምድ', 'ኣርብ', 'ሰ/ሽ'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ፋዱስ ጃብ', 'ፋዱስ ደምቢ'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ca.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca.php deleted file mode 100644 index b8b1994..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ca.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - mestremuten - * - François B - * - Marc Ordinas i Llopis - * - Pere Orga - * - JD Isaacks - * - Quentí - * - Víctor Díaz - * - Xavi - * - qcardona - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count any|:count anys', - 'a_year' => 'un any|:count anys', - 'y' => ':count any|:count anys', - 'month' => ':count mes|:count mesos', - 'a_month' => 'un mes|:count mesos', - 'm' => ':count mes|:count mesos', - 'week' => ':count setmana|:count setmanes', - 'a_week' => 'una setmana|:count setmanes', - 'w' => ':count setmana|:count setmanes', - 'day' => ':count dia|:count dies', - 'a_day' => 'un dia|:count dies', - 'd' => ':count d', - 'hour' => ':count hora|:count hores', - 'a_hour' => 'una hora|:count hores', - 'h' => ':count h', - 'minute' => ':count minut|:count minuts', - 'a_minute' => 'un minut|:count minuts', - 'min' => ':count min', - 'second' => ':count segon|:count segons', - 'a_second' => 'uns segons|:count segons', - 's' => ':count s', - 'ago' => 'fa :time', - 'from_now' => 'd\'aquí a :time', - 'after' => ':time després', - 'before' => ':time abans', - 'diff_now' => 'ara mateix', - 'diff_today' => 'avui', - 'diff_today_regexp' => 'avui(?:\\s+a)?(?:\\s+les)?', - 'diff_yesterday' => 'ahir', - 'diff_yesterday_regexp' => 'ahir(?:\\s+a)?(?:\\s+les)?', - 'diff_tomorrow' => 'demà', - 'diff_tomorrow_regexp' => 'demà(?:\\s+a)?(?:\\s+les)?', - 'diff_before_yesterday' => 'abans d\'ahir', - 'diff_after_tomorrow' => 'demà passat', - 'period_recurrences' => ':count cop|:count cops', - 'period_interval' => 'cada :interval', - 'period_start_date' => 'de :date', - 'period_end_date' => 'fins a :date', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM [de] YYYY', - 'LLL' => 'D MMMM [de] YYYY [a les] H:mm', - 'LLLL' => 'dddd D MMMM [de] YYYY [a les] H:mm', - ], - 'calendar' => [ - 'sameDay' => function (CarbonInterface $current) { - return '[avui a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; - }, - 'nextDay' => function (CarbonInterface $current) { - return '[demà a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; - }, - 'nextWeek' => function (CarbonInterface $current) { - return 'dddd [a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; - }, - 'lastDay' => function (CarbonInterface $current) { - return '[ahir a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; - }, - 'lastWeek' => function (CarbonInterface $current) { - return '[el] dddd [passat a '.($current->hour !== 1 ? 'les' : 'la').'] LT'; - }, - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - return $number.( - ($period === 'w' || $period === 'W') ? 'a' : ( - ($number === 1) ? 'r' : ( - ($number === 2) ? 'n' : ( - ($number === 3) ? 'r' : ( - ($number === 4) ? 't' : 'è' - ) - ) - ) - ) - ); - }, - 'months' => ['de gener', 'de febrer', 'de març', 'd\'abril', 'de maig', 'de juny', 'de juliol', 'd\'agost', 'de setembre', 'd\'octubre', 'de novembre', 'de desembre'], - 'months_standalone' => ['gener', 'febrer', 'març', 'abril', 'maig', 'juny', 'juliol', 'agost', 'setembre', 'octubre', 'novembre', 'desembre'], - 'months_short' => ['de gen.', 'de febr.', 'de març', 'd\'abr.', 'de maig', 'de juny', 'de jul.', 'd\'ag.', 'de set.', 'd\'oct.', 'de nov.', 'de des.'], - 'months_short_standalone' => ['gen.', 'febr.', 'març', 'abr.', 'maig', 'juny', 'jul.', 'ag.', 'set.', 'oct.', 'nov.', 'des.'], - 'months_regexp' => '/(D[oD]?[\s,]+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => ['diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte'], - 'weekdays_short' => ['dg.', 'dl.', 'dt.', 'dc.', 'dj.', 'dv.', 'ds.'], - 'weekdays_min' => ['dg', 'dl', 'dt', 'dc', 'dj', 'dv', 'ds'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' i '], - 'meridiem' => ['a. m.', 'p. m.'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ca_AD.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca_AD.php deleted file mode 100644 index 861acd2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ca_AD.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ca.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES.php deleted file mode 100644 index 5004978..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ca.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php deleted file mode 100644 index 1c16421..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ca_ES_Valencia.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\Translation\PluralizationRules; - -// @codeCoverageIgnoreStart -if (class_exists(PluralizationRules::class)) { - PluralizationRules::set(static function ($number) { - return PluralizationRules::get($number, 'ca'); - }, 'ca_ES_Valencia'); -} -// @codeCoverageIgnoreEnd - -return array_replace_recursive(require __DIR__.'/ca.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ca_FR.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca_FR.php deleted file mode 100644 index 861acd2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ca_FR.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ca.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ca_IT.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca_IT.php deleted file mode 100644 index 861acd2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ca_IT.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ca.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ccp.php b/vendor/nesbot/carbon/src/Carbon/Lang/ccp.php deleted file mode 100644 index 99c1dca..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ccp.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['𑄢𑄧𑄝𑄨𑄝𑄢𑄴', '𑄥𑄧𑄟𑄴𑄝𑄢𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴𑄝𑄢𑄴', '𑄝𑄪𑄖𑄴𑄝𑄢𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴𑄝𑄢𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴𑄝𑄢𑄴', '𑄥𑄧𑄚𑄨𑄝𑄢𑄴'], - 'weekdays_short' => ['𑄢𑄧𑄝𑄨', '𑄥𑄧𑄟𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴', '𑄝𑄪𑄖𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴', '𑄥𑄧𑄚𑄨'], - 'weekdays_min' => ['𑄢𑄧𑄝𑄨', '𑄥𑄧𑄟𑄴', '𑄟𑄧𑄁𑄉𑄧𑄣𑄴', '𑄝𑄪𑄖𑄴', '𑄝𑄳𑄢𑄨𑄥𑄪𑄛𑄴', '𑄥𑄪𑄇𑄴𑄇𑄮𑄢𑄴', '𑄥𑄧𑄚𑄨'], - 'months' => ['𑄎𑄚𑄪𑄠𑄢𑄨', '𑄜𑄬𑄛𑄴𑄝𑄳𑄢𑄪𑄠𑄢𑄨', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄬𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄧𑄢𑄴'], - 'months_short' => ['𑄎𑄚𑄪', '𑄜𑄬𑄛𑄴', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄮𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄢𑄴'], - 'months_short_standalone' => ['𑄎𑄚𑄪𑄠𑄢𑄨', '𑄜𑄬𑄛𑄴𑄝𑄳𑄢𑄪𑄠𑄢𑄨', '𑄟𑄢𑄴𑄌𑄧', '𑄃𑄬𑄛𑄳𑄢𑄨𑄣𑄴', '𑄟𑄬', '𑄎𑄪𑄚𑄴', '𑄎𑄪𑄣𑄭', '𑄃𑄉𑄧𑄌𑄴𑄑𑄴', '𑄥𑄬𑄛𑄴𑄑𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄃𑄧𑄇𑄴𑄑𑄮𑄝𑄧𑄢𑄴', '𑄚𑄧𑄞𑄬𑄟𑄴𑄝𑄧𑄢𑄴', '𑄓𑄨𑄥𑄬𑄟𑄴𑄝𑄧𑄢𑄴'], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM, YYYY h:mm a', - 'LLLL' => 'dddd, D MMMM, YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ccp_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ccp_IN.php deleted file mode 100644 index c1fa8af..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ccp_IN.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ccp.php', [ - 'weekend' => [0, 0], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ce.php b/vendor/nesbot/carbon/src/Carbon/Lang/ce.php deleted file mode 100644 index f99f6ff..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ce.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ce_RU.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ce_RU.php b/vendor/nesbot/carbon/src/Carbon/Lang/ce_RU.php deleted file mode 100644 index f769856..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ce_RU.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - ANCHR - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY.DD.MM', - ], - 'months' => ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'], - 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], - 'weekdays' => ['КӀиранан де', 'Оршотан де', 'Шинарин де', 'Кхаарин де', 'Еарин де', 'ПӀераскан де', 'Шот де'], - 'weekdays_short' => ['КӀ', 'Ор', 'Ши', 'Кх', 'Еа', 'ПӀ', 'Шо'], - 'weekdays_min' => ['КӀ', 'Ор', 'Ши', 'Кх', 'Еа', 'ПӀ', 'Шо'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => ':count шо', - 'y' => ':count шо', - 'a_year' => ':count шо', - - 'month' => ':count бутт', - 'm' => ':count бутт', - 'a_month' => ':count бутт', - - 'week' => ':count кӏира', - 'w' => ':count кӏира', - 'a_week' => ':count кӏира', - - 'day' => ':count де', - 'd' => ':count де', - 'a_day' => ':count де', - - 'hour' => ':count сахьт', - 'h' => ':count сахьт', - 'a_hour' => ':count сахьт', - - 'minute' => ':count минот', - 'min' => ':count минот', - 'a_minute' => ':count минот', - - 'second' => ':count секунд', - 's' => ':count секунд', - 'a_second' => ':count секунд', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cgg.php b/vendor/nesbot/carbon/src/Carbon/Lang/cgg.php deleted file mode 100644 index 09bcc1c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cgg.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['Sande', 'Orwokubanza', 'Orwakabiri', 'Orwakashatu', 'Orwakana', 'Orwakataano', 'Orwamukaaga'], - 'weekdays_short' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], - 'weekdays_min' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], - 'months' => ['Okwokubanza', 'Okwakabiri', 'Okwakashatu', 'Okwakana', 'Okwakataana', 'Okwamukaaga', 'Okwamushanju', 'Okwamunaana', 'Okwamwenda', 'Okwaikumi', 'Okwaikumi na kumwe', 'Okwaikumi na ibiri'], - 'months_short' => ['KBZ', 'KBR', 'KST', 'KKN', 'KTN', 'KMK', 'KMS', 'KMN', 'KMW', 'KKM', 'KNK', 'KNB'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - 'day' => ':count ruhanga', // less reliable - 'd' => ':count ruhanga', // less reliable - 'a_day' => ':count ruhanga', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/chr.php b/vendor/nesbot/carbon/src/Carbon/Lang/chr.php deleted file mode 100644 index e26190f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/chr.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/chr_US.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/chr_US.php b/vendor/nesbot/carbon/src/Carbon/Lang/chr_US.php deleted file mode 100644 index 371353e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/chr_US.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Cherokee Nation Joseph Erb josepherb7@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'MM/DD/YYYY', - ], - 'months' => ['ᎤᏃᎸᏔᏅ', 'ᎧᎦᎵ', 'ᎠᏅᏱ', 'ᎧᏬᏂ', 'ᎠᏂᏍᎬᏘ', 'ᏕᎭᎷᏱ', 'ᎫᏰᏉᏂ', 'ᎦᎶᏂ', 'ᏚᎵᏍᏗ', 'ᏚᏂᏅᏗ', 'ᏅᏓᏕᏆ', 'ᎥᏍᎩᏱ'], - 'months_short' => ['ᎤᏃ', 'ᎧᎦ', 'ᎠᏅ', 'ᎧᏬ', 'ᎠᏂ', 'ᏕᎭ', 'ᎫᏰ', 'ᎦᎶ', 'ᏚᎵ', 'ᏚᏂ', 'ᏅᏓ', 'ᎥᏍ'], - 'weekdays' => ['ᎤᎾᏙᏓᏆᏍᎬ', 'ᎤᎾᏙᏓᏉᏅᎯ', 'ᏔᎵᏁᎢᎦ', 'ᏦᎢᏁᎢᎦ', 'ᏅᎩᏁᎢᎦ', 'ᏧᎾᎩᎶᏍᏗ', 'ᎤᎾᏙᏓᏈᏕᎾ'], - 'weekdays_short' => ['ᏆᏍᎬ', 'ᏉᏅᎯ', 'ᏔᎵᏁ', 'ᏦᎢᏁ', 'ᏅᎩᏁ', 'ᏧᎾᎩ', 'ᏈᏕᎾ'], - 'weekdays_min' => ['ᏆᏍᎬ', 'ᏉᏅᎯ', 'ᏔᎵᏁ', 'ᏦᎢᏁ', 'ᏅᎩᏁ', 'ᏧᎾᎩ', 'ᏈᏕᎾ'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ᏌᎾᎴ', 'ᏒᎯᏱᎢᏗᏢ', 'ꮜꮎꮄ', 'ꮢꭿᏹꭲꮧꮲ'], - - 'second' => ':count ᏐᎢ', // less reliable - 's' => ':count ᏐᎢ', // less reliable - 'a_second' => ':count ᏐᎢ', // less reliable - - 'year' => ':count ᏑᏕᏘᏴᏓ', - 'y' => ':count ᏑᏕᏘᏴᏓ', - 'a_year' => ':count ᏑᏕᏘᏴᏓ', - - 'month' => ':count ᏏᏅᏙ', - 'm' => ':count ᏏᏅᏙ', - 'a_month' => ':count ᏏᏅᏙ', - - 'week' => ':count ᏑᎾᏙᏓᏆᏍᏗ', - 'w' => ':count ᏑᎾᏙᏓᏆᏍᏗ', - 'a_week' => ':count ᏑᎾᏙᏓᏆᏍᏗ', - - 'day' => ':count ᎢᎦ', - 'd' => ':count ᎢᎦ', - 'a_day' => ':count ᎢᎦ', - - 'hour' => ':count ᏑᏟᎶᏛ', - 'h' => ':count ᏑᏟᎶᏛ', - 'a_hour' => ':count ᏑᏟᎶᏛ', - - 'minute' => ':count ᎢᏯᏔᏬᏍᏔᏅ', - 'min' => ':count ᎢᏯᏔᏬᏍᏔᏅ', - 'a_minute' => ':count ᎢᏯᏔᏬᏍᏔᏅ', - - 'ago' => ':time ᏥᎨᏒ', - 'from_now' => 'ᎾᎿ :time', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ckb.php b/vendor/nesbot/carbon/src/Carbon/Lang/ckb.php deleted file mode 100644 index acf4dc2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ckb.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Swara Mohammed - */ -$months = [ - 'ڕێبەندان', - 'ڕەشەمە', - 'نەورۆز', - 'گوڵان', - 'جۆزەردان', - 'پوشپەڕ', - 'گەلاوێژ', - 'خەرمانان', - 'ڕەزبەر', - 'گەڵاڕێزان', - 'سەرماوەرز', - 'بەفرانبار', -]; - -return [ - 'year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵێک', '{2}دوو ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']), - 'a_year' => implode('|', ['{0}:count ساڵێک', '{1}ساڵێک', '{2}دوو ساڵ', ']2,11[:count ساڵ', ']10,Inf[:count ساڵ']), - 'month' => implode('|', ['{0}:count مانگێک', '{1}مانگێک', '{2}دوو مانگ', ']2,11[:count مانگ', ']10,Inf[:count مانگ']), - 'a_month' => implode('|', ['{0}:count مانگێک', '{1}مانگێک', '{2}دوو مانگ', ']2,11[:count مانگ', ']10,Inf[:count مانگ']), - 'week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتەیەک', '{2}دوو هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']), - 'a_week' => implode('|', ['{0}:count هەفتەیەک', '{1}هەفتەیەک', '{2}دوو هەفتە', ']2,11[:count هەفتە', ']10,Inf[:count هەفتە']), - 'day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژێک', '{2}دوو ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']), - 'a_day' => implode('|', ['{0}:count ڕۆژێک', '{1}ڕۆژێک', '{2}دوو ڕۆژ', ']2,11[:count ڕۆژ', ']10,Inf[:count ڕۆژ']), - 'hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێرێک', '{2}دوو کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']), - 'a_hour' => implode('|', ['{0}:count کاتژمێرێک', '{1}کاتژمێرێک', '{2}دوو کاتژمێر', ']2,11[:count کاتژمێر', ']10,Inf[:count کاتژمێر']), - 'minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەکێک', '{2}دوو خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']), - 'a_minute' => implode('|', ['{0}:count خولەکێک', '{1}خولەکێک', '{2}دوو خولەک', ']2,11[:count خولەک', ']10,Inf[:count خولەک']), - 'second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکەیەک', '{2}دوو چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']), - 'a_second' => implode('|', ['{0}:count چرکەیەک', '{1}چرکەیەک', '{2}دوو چرکە', ']2,11[:count چرکە', ']10,Inf[:count چرکە']), - 'ago' => 'پێش :time', - 'from_now' => ':time لە ئێستاوە', - 'after' => 'دوای :time', - 'before' => 'پێش :time', - 'diff_now' => 'ئێستا', - 'diff_today' => 'ئەمڕۆ', - 'diff_today_regexp' => 'ڕۆژ(?:\\s+لە)?(?:\\s+کاتژمێر)?', - 'diff_yesterday' => 'دوێنێ', - 'diff_yesterday_regexp' => 'دوێنێ(?:\\s+لە)?(?:\\s+کاتژمێر)?', - 'diff_tomorrow' => 'سبەینێ', - 'diff_tomorrow_regexp' => 'سبەینێ(?:\\s+لە)?(?:\\s+کاتژمێر)?', - 'diff_before_yesterday' => 'پێش دوێنێ', - 'diff_after_tomorrow' => 'دوای سبەینێ', - 'period_recurrences' => implode('|', ['{0}جار', '{1}جار', '{2}:count دووجار', ']2,11[:count جار', ']10,Inf[:count جار']), - 'period_interval' => 'هەموو :interval', - 'period_start_date' => 'لە :date', - 'period_end_date' => 'بۆ :date', - 'months' => $months, - 'months_short' => $months, - 'weekdays' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], - 'weekdays_short' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], - 'weekdays_min' => ['یەکشەممە', 'دووشەممە', 'سێشەممە', 'چوارشەممە', 'پێنجشەممە', 'هەینی', 'شەممە'], - 'list' => ['، ', ' و '], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[ئەمڕۆ لە کاتژمێر] LT', - 'nextDay' => '[سبەینێ لە کاتژمێر] LT', - 'nextWeek' => 'dddd [لە کاتژمێر] LT', - 'lastDay' => '[دوێنێ لە کاتژمێر] LT', - 'lastWeek' => 'dddd [لە کاتژمێر] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['پ.ن', 'د.ن'], - 'weekend' => [5, 6], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cmn.php b/vendor/nesbot/carbon/src/Carbon/Lang/cmn.php deleted file mode 100644 index 80b1d69..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cmn.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/cmn_TW.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cmn_TW.php b/vendor/nesbot/carbon/src/Carbon/Lang/cmn_TW.php deleted file mode 100644 index 7e43f9d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cmn_TW.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY年MM月DD號', - ], - 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], - 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], - 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], - 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], - 'meridiem' => ['上午', '下午'], - - 'year' => ':count 年', - 'y' => ':count 年', - 'a_year' => ':count 年', - - 'month' => ':count 月', - 'm' => ':count 月', - 'a_month' => ':count 月', - - 'week' => ':count 周', - 'w' => ':count 周', - 'a_week' => ':count 周', - - 'day' => ':count 白天', - 'd' => ':count 白天', - 'a_day' => ':count 白天', - - 'hour' => ':count 小时', - 'h' => ':count 小时', - 'a_hour' => ':count 小时', - - 'minute' => ':count 分钟', - 'min' => ':count 分钟', - 'a_minute' => ':count 分钟', - - 'second' => ':count 秒', - 's' => ':count 秒', - 'a_second' => ':count 秒', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/crh.php b/vendor/nesbot/carbon/src/Carbon/Lang/crh.php deleted file mode 100644 index a1d7ce6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/crh.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/crh_UA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/crh_UA.php b/vendor/nesbot/carbon/src/Carbon/Lang/crh_UA.php deleted file mode 100644 index 0513933..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/crh_UA.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Reşat SABIQ tilde.birlik@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'Mayıs', 'İyun', 'İyul', 'Avgust', 'Sentâbr', 'Oktâbr', 'Noyabr', 'Dekabr'], - 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'İyn', 'İyl', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], - 'weekdays' => ['Bazar', 'Bazarertesi', 'Salı', 'Çarşembe', 'Cumaaqşamı', 'Cuma', 'Cumaertesi'], - 'weekdays_short' => ['Baz', 'Ber', 'Sal', 'Çar', 'Caq', 'Cum', 'Cer'], - 'weekdays_min' => ['Baz', 'Ber', 'Sal', 'Çar', 'Caq', 'Cum', 'Cer'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ÜE', 'ÜS'], - - 'year' => ':count yıl', - 'y' => ':count yıl', - 'a_year' => ':count yıl', - - 'month' => ':count ay', - 'm' => ':count ay', - 'a_month' => ':count ay', - - 'week' => ':count afta', - 'w' => ':count afta', - 'a_week' => ':count afta', - - 'day' => ':count kün', - 'd' => ':count kün', - 'a_day' => ':count kün', - - 'hour' => ':count saat', - 'h' => ':count saat', - 'a_hour' => ':count saat', - - 'minute' => ':count daqqa', - 'min' => ':count daqqa', - 'a_minute' => ':count daqqa', - - 'second' => ':count ekinci', - 's' => ':count ekinci', - 'a_second' => ':count ekinci', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cs.php b/vendor/nesbot/carbon/src/Carbon/Lang/cs.php deleted file mode 100644 index c01e3cc..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cs.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Jakub Tesinsky - * - Martin Suja - * - Nikos Timiopulos - * - Bohuslav Blín - * - Tsutomu Kuroda - * - tjku - * - Lukas Svoboda - * - Max Melentiev - * - Juanito Fatas - * - Akira Matsuda - * - Christopher Dell - * - Václav Pávek - * - CodeSkills - * - Tlapi - * - newman101 - * - Petr Kadlec - * - tommaskraus - * - Karel Sommer (calvera) - */ -$za = function ($time) { - return 'za '.strtr($time, [ - 'hodina' => 'hodinu', - 'minuta' => 'minutu', - 'sekunda' => 'sekundu', - ]); -}; - -$pred = function ($time) { - $time = strtr($time, [ - 'hodina' => 'hodinou', - 'minuta' => 'minutou', - 'sekunda' => 'sekundou', - ]); - $time = preg_replace('/hodiny?(?!\w)/', 'hodinami', $time); - $time = preg_replace('/minuty?(?!\w)/', 'minutami', $time); - $time = preg_replace('/sekundy?(?!\w)/', 'sekundami', $time); - - return "před $time"; -}; - -return [ - 'year' => ':count rok|:count roky|:count let', - 'y' => ':count rok|:count roky|:count let', - 'a_year' => 'rok|:count roky|:count let', - 'month' => ':count měsíc|:count měsíce|:count měsíců', - 'm' => ':count měs.', - 'a_month' => 'měsíc|:count měsíce|:count měsíců', - 'week' => ':count týden|:count týdny|:count týdnů', - 'w' => ':count týd.', - 'a_week' => 'týden|:count týdny|:count týdnů', - 'day' => ':count den|:count dny|:count dní', - 'd' => ':count den|:count dny|:count dní', - 'a_day' => 'den|:count dny|:count dní', - 'hour' => ':count hodina|:count hodiny|:count hodin', - 'h' => ':count hod.', - 'a_hour' => 'hodina|:count hodiny|:count hodin', - 'minute' => ':count minuta|:count minuty|:count minut', - 'min' => ':count min.', - 'a_minute' => 'minuta|:count minuty|:count minut', - 'second' => ':count sekunda|:count sekundy|:count sekund', - 's' => ':count sek.', - 'a_second' => 'pár sekund|:count sekundy|:count sekund', - - 'month_ago' => ':count měsícem|:count měsíci|:count měsíci', - 'a_month_ago' => 'měsícem|:count měsíci|:count měsíci', - 'day_ago' => ':count dnem|:count dny|:count dny', - 'a_day_ago' => 'dnem|:count dny|:count dny', - 'week_ago' => ':count týdnem|:count týdny|:count týdny', - 'a_week_ago' => 'týdnem|:count týdny|:count týdny', - 'year_ago' => ':count rokem|:count roky|:count lety', - 'y_ago' => ':count rok.|:count rok.|:count let.', - 'a_year_ago' => 'rokem|:count roky|:count lety', - - 'month_before' => ':count měsícem|:count měsíci|:count měsíci', - 'a_month_before' => 'měsícem|:count měsíci|:count měsíci', - 'day_before' => ':count dnem|:count dny|:count dny', - 'a_day_before' => 'dnem|:count dny|:count dny', - 'week_before' => ':count týdnem|:count týdny|:count týdny', - 'a_week_before' => 'týdnem|:count týdny|:count týdny', - 'year_before' => ':count rokem|:count roky|:count lety', - 'y_before' => ':count rok.|:count rok.|:count let.', - 'a_year_before' => 'rokem|:count roky|:count lety', - - 'ago' => $pred, - 'from_now' => $za, - 'before' => $pred, - 'after' => $za, - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'months' => ['ledna', 'února', 'března', 'dubna', 'května', 'června', 'července', 'srpna', 'září', 'října', 'listopadu', 'prosince'], - 'months_standalone' => ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'], - 'months_short' => ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'], - 'weekdays' => ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], - 'weekdays_short' => ['ned', 'pon', 'úte', 'stř', 'čtv', 'pát', 'sob'], - 'weekdays_min' => ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], - 'list' => [', ', ' a '], - 'diff_now' => 'nyní', - 'diff_yesterday' => 'včera', - 'diff_tomorrow' => 'zítra', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD. MM. YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY HH:mm', - 'LLLL' => 'dddd D. MMMM YYYY HH:mm', - ], - 'meridiem' => ['dopoledne', 'odpoledne'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cs_CZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/cs_CZ.php deleted file mode 100644 index ea2517e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cs_CZ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/cs.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/csb.php b/vendor/nesbot/carbon/src/Carbon/Lang/csb.php deleted file mode 100644 index a35d281..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/csb.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/csb_PL.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/csb_PL.php b/vendor/nesbot/carbon/src/Carbon/Lang/csb_PL.php deleted file mode 100644 index 25e0ca8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/csb_PL.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - csb_PL locale Michal Ostrowski bug-glibc-locales@gnu.org - */ -return [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'MMMM DD, YYYY', - 'LLL' => 'DD MMM HH:mm', - 'LLLL' => 'MMMM DD, YYYY HH:mm', - ], - 'months' => ['stëcznika', 'gromicznika', 'strëmiannika', 'łżëkwiata', 'maja', 'czerwińca', 'lëpińca', 'zélnika', 'séwnika', 'rujana', 'lëstopadnika', 'gòdnika'], - 'months_short' => ['stë', 'gro', 'str', 'łżë', 'maj', 'cze', 'lëp', 'zél', 'séw', 'ruj', 'lës', 'gòd'], - 'weekdays' => ['niedzela', 'pòniedzôłk', 'wtórk', 'strzoda', 'czwiôrtk', 'piątk', 'sobòta'], - 'weekdays_short' => ['nie', 'pòn', 'wtó', 'str', 'czw', 'pią', 'sob'], - 'weekdays_min' => ['nie', 'pòn', 'wtó', 'str', 'czw', 'pią', 'sob'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' a téż '], - 'two_words_connector' => ' a téż ', - 'year' => ':count rok', - 'month' => ':count miesiąc', - 'week' => ':count tidzéń', - 'day' => ':count dzéń', - 'hour' => ':count gòdzëna', - 'minute' => ':count minuta', - 'second' => ':count sekunda', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cu.php b/vendor/nesbot/carbon/src/Carbon/Lang/cu.php deleted file mode 100644 index d6d1312..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cu.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], - 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D HH:mm', - 'LLLL' => 'YYYY MMMM D, dddd HH:mm', - ], - - 'year' => ':count лѣто', - 'y' => ':count лѣто', - 'a_year' => ':count лѣто', - - 'month' => ':count мѣсѧць', - 'm' => ':count мѣсѧць', - 'a_month' => ':count мѣсѧць', - - 'week' => ':count сєдмица', - 'w' => ':count сєдмица', - 'a_week' => ':count сєдмица', - - 'day' => ':count дьнь', - 'd' => ':count дьнь', - 'a_day' => ':count дьнь', - - 'hour' => ':count година', - 'h' => ':count година', - 'a_hour' => ':count година', - - 'minute' => ':count малъ', // less reliable - 'min' => ':count малъ', // less reliable - 'a_minute' => ':count малъ', // less reliable - - 'second' => ':count въторъ', - 's' => ':count въторъ', - 'a_second' => ':count въторъ', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cv.php b/vendor/nesbot/carbon/src/Carbon/Lang/cv.php deleted file mode 100644 index 8aeb73a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cv.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - JD Isaacks - */ -return [ - 'year' => ':count ҫул', - 'a_year' => '{1}пӗр ҫул|:count ҫул', - 'month' => ':count уйӑх', - 'a_month' => '{1}пӗр уйӑх|:count уйӑх', - 'week' => ':count эрне', - 'a_week' => '{1}пӗр эрне|:count эрне', - 'day' => ':count кун', - 'a_day' => '{1}пӗр кун|:count кун', - 'hour' => ':count сехет', - 'a_hour' => '{1}пӗр сехет|:count сехет', - 'minute' => ':count минут', - 'a_minute' => '{1}пӗр минут|:count минут', - 'second' => ':count ҫеккунт', - 'a_second' => '{1}пӗр-ик ҫеккунт|:count ҫеккунт', - 'ago' => ':time каялла', - 'from_now' => function ($time) { - return $time.(preg_match('/сехет$/u', $time) ? 'рен' : (preg_match('/ҫул/u', $time) ? 'тан' : 'ран')); - }, - 'diff_yesterday' => 'Ӗнер', - 'diff_today' => 'Паян', - 'diff_tomorrow' => 'Ыран', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD-MM-YYYY', - 'LL' => 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', - 'LLL' => 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', - 'LLLL' => 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Паян] LT [сехетре]', - 'nextDay' => '[Ыран] LT [сехетре]', - 'nextWeek' => '[Ҫитес] dddd LT [сехетре]', - 'lastDay' => '[Ӗнер] LT [сехетре]', - 'lastWeek' => '[Иртнӗ] dddd LT [сехетре]', - 'sameElse' => 'L', - ], - 'ordinal' => ':number-мӗш', - 'months' => ['кӑрлач', 'нарӑс', 'пуш', 'ака', 'май', 'ҫӗртме', 'утӑ', 'ҫурла', 'авӑн', 'юпа', 'чӳк', 'раштав'], - 'months_short' => ['кӑр', 'нар', 'пуш', 'ака', 'май', 'ҫӗр', 'утӑ', 'ҫур', 'авн', 'юпа', 'чӳк', 'раш'], - 'weekdays' => ['вырсарникун', 'тунтикун', 'ытларикун', 'юнкун', 'кӗҫнерникун', 'эрнекун', 'шӑматкун'], - 'weekdays_short' => ['выр', 'тун', 'ытл', 'юн', 'кӗҫ', 'эрн', 'шӑм'], - 'weekdays_min' => ['вр', 'тн', 'ыт', 'юн', 'кҫ', 'эр', 'шм'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' тата '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cv_RU.php b/vendor/nesbot/carbon/src/Carbon/Lang/cv_RU.php deleted file mode 100644 index 197bd8d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cv_RU.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/cv.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cy.php b/vendor/nesbot/carbon/src/Carbon/Lang/cy.php deleted file mode 100644 index 119274f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cy.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - JD Isaacks - * - Daniel Monaghan - */ -return [ - 'year' => '{1}blwyddyn|]1,Inf[:count flynedd', - 'y' => ':countbl', - 'month' => '{1}mis|]1,Inf[:count mis', - 'm' => ':countmi', - 'week' => ':count wythnos', - 'w' => ':countw', - 'day' => '{1}diwrnod|]1,Inf[:count diwrnod', - 'd' => ':countd', - 'hour' => '{1}awr|]1,Inf[:count awr', - 'h' => ':counth', - 'minute' => '{1}munud|]1,Inf[:count munud', - 'min' => ':countm', - 'second' => '{1}ychydig eiliadau|]1,Inf[:count eiliad', - 's' => ':counts', - 'ago' => ':time yn ôl', - 'from_now' => 'mewn :time', - 'after' => ':time ar ôl', - 'before' => ':time o\'r blaen', - 'diff_now' => 'nawr', - 'diff_today' => 'Heddiw', - 'diff_today_regexp' => 'Heddiw(?:\\s+am)?', - 'diff_yesterday' => 'ddoe', - 'diff_yesterday_regexp' => 'Ddoe(?:\\s+am)?', - 'diff_tomorrow' => 'yfory', - 'diff_tomorrow_regexp' => 'Yfory(?:\\s+am)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Heddiw am] LT', - 'nextDay' => '[Yfory am] LT', - 'nextWeek' => 'dddd [am] LT', - 'lastDay' => '[Ddoe am] LT', - 'lastWeek' => 'dddd [diwethaf am] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - return $number.( - $number > 20 - ? (\in_array((int) $number, [40, 50, 60, 80, 100], true) ? 'fed' : 'ain') - : ([ - '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed - 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed', // 11eg to 20fed - ])[$number] ?? '' - ); - }, - 'months' => ['Ionawr', 'Chwefror', 'Mawrth', 'Ebrill', 'Mai', 'Mehefin', 'Gorffennaf', 'Awst', 'Medi', 'Hydref', 'Tachwedd', 'Rhagfyr'], - 'months_short' => ['Ion', 'Chwe', 'Maw', 'Ebr', 'Mai', 'Meh', 'Gor', 'Aws', 'Med', 'Hyd', 'Tach', 'Rhag'], - 'weekdays' => ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'], - 'weekdays_short' => ['Sul', 'Llun', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'], - 'weekdays_min' => ['Su', 'Ll', 'Ma', 'Me', 'Ia', 'Gw', 'Sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' a '], - 'meridiem' => ['yb', 'yh'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cy_GB.php b/vendor/nesbot/carbon/src/Carbon/Lang/cy_GB.php deleted file mode 100644 index 2c8148d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cy_GB.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/cy.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/da.php b/vendor/nesbot/carbon/src/Carbon/Lang/da.php deleted file mode 100644 index 322f91d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/da.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Rune Mønnike - * - François B - * - codenhagen - * - JD Isaacks - * - Jens Herlevsen - * - Ulrik McArdle (mcardle) - * - Frederik Sauer (FrittenKeeZ) - * - Janus Bahs Jacquet (kokoshneta) - */ -return [ - 'year' => ':count år|:count år', - 'a_year' => 'et år|:count år', - 'y' => ':count år|:count år', - 'month' => ':count måned|:count måneder', - 'a_month' => 'en måned|:count måneder', - 'm' => ':count mdr.', - 'week' => ':count uge|:count uger', - 'a_week' => 'en uge|:count uger', - 'w' => ':count u.', - 'day' => ':count dag|:count dage', - 'a_day' => ':count dag|:count dage', - 'd' => ':count d.', - 'hour' => ':count time|:count timer', - 'a_hour' => 'en time|:count timer', - 'h' => ':count t.', - 'minute' => ':count minut|:count minutter', - 'a_minute' => 'et minut|:count minutter', - 'min' => ':count min.', - 'second' => ':count sekund|:count sekunder', - 'a_second' => 'få sekunder|:count sekunder', - 's' => ':count s.', - 'ago' => 'for :time siden', - 'from_now' => 'om :time', - 'after' => ':time efter', - 'before' => ':time før', - 'diff_now' => 'nu', - 'diff_today' => 'i dag', - 'diff_today_regexp' => 'i dag(?:\\s+kl.)?', - 'diff_yesterday' => 'i går', - 'diff_yesterday_regexp' => 'i går(?:\\s+kl.)?', - 'diff_tomorrow' => 'i morgen', - 'diff_tomorrow_regexp' => 'i morgen(?:\\s+kl.)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY HH:mm', - 'LLLL' => 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[i dag kl.] LT', - 'nextDay' => '[i morgen kl.] LT', - 'nextWeek' => 'på dddd [kl.] LT', - 'lastDay' => '[i går kl.] LT', - 'lastWeek' => '[i] dddd[s kl.] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'], - 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj.', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'], - 'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], - 'weekdays_short' => ['søn.', 'man.', 'tir.', 'ons.', 'tor.', 'fre.', 'lør.'], - 'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' og '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/da_DK.php b/vendor/nesbot/carbon/src/Carbon/Lang/da_DK.php deleted file mode 100644 index 392c484..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/da_DK.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/da.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/da_GL.php b/vendor/nesbot/carbon/src/Carbon/Lang/da_GL.php deleted file mode 100644 index ea5698b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/da_GL.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/da.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - 'LL' => 'D. MMM YYYY', - 'LLL' => 'D. MMMM YYYY HH.mm', - 'LLLL' => 'dddd [den] D. MMMM YYYY HH.mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dav.php b/vendor/nesbot/carbon/src/Carbon/Lang/dav.php deleted file mode 100644 index e95ec4b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dav.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Luma lwa K', 'luma lwa p'], - 'weekdays' => ['Ituku ja jumwa', 'Kuramuka jimweri', 'Kuramuka kawi', 'Kuramuka kadadu', 'Kuramuka kana', 'Kuramuka kasanu', 'Kifula nguwo'], - 'weekdays_short' => ['Jum', 'Jim', 'Kaw', 'Kad', 'Kan', 'Kas', 'Ngu'], - 'weekdays_min' => ['Jum', 'Jim', 'Kaw', 'Kad', 'Kan', 'Kas', 'Ngu'], - 'months' => ['Mori ghwa imbiri', 'Mori ghwa kawi', 'Mori ghwa kadadu', 'Mori ghwa kana', 'Mori ghwa kasanu', 'Mori ghwa karandadu', 'Mori ghwa mfungade', 'Mori ghwa wunyanya', 'Mori ghwa ikenda', 'Mori ghwa ikumi', 'Mori ghwa ikumi na imweri', 'Mori ghwa ikumi na iwi'], - 'months_short' => ['Imb', 'Kaw', 'Kad', 'Kan', 'Kas', 'Kar', 'Mfu', 'Wun', 'Ike', 'Iku', 'Imw', 'Iwi'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de.php b/vendor/nesbot/carbon/src/Carbon/Lang/de.php deleted file mode 100644 index 3b70750..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Michael Hohl - * - sheriffmarley - * - dennisoderwald - * - Timo - * - Karag2006 - * - Pete Scopes (pdscopes) - */ -return [ - 'year' => ':count Jahr|:count Jahre', - 'a_year' => 'ein Jahr|:count Jahre', - 'y' => ':count J.', - 'month' => ':count Monat|:count Monate', - 'a_month' => 'ein Monat|:count Monate', - 'm' => ':count Mon.', - 'week' => ':count Woche|:count Wochen', - 'a_week' => 'eine Woche|:count Wochen', - 'w' => ':count Wo.', - 'day' => ':count Tag|:count Tage', - 'a_day' => 'ein Tag|:count Tage', - 'd' => ':count Tg.', - 'hour' => ':count Stunde|:count Stunden', - 'a_hour' => 'eine Stunde|:count Stunden', - 'h' => ':count Std.', - 'minute' => ':count Minute|:count Minuten', - 'a_minute' => 'eine Minute|:count Minuten', - 'min' => ':count Min.', - 'second' => ':count Sekunde|:count Sekunden', - 'a_second' => 'ein paar Sekunden|:count Sekunden', - 's' => ':count Sek.', - 'millisecond' => ':count Millisekunde|:count Millisekunden', - 'a_millisecond' => 'eine Millisekunde|:count Millisekunden', - 'ms' => ':countms', - 'microsecond' => ':count Mikrosekunde|:count Mikrosekunden', - 'a_microsecond' => 'eine Mikrosekunde|:count Mikrosekunden', - 'µs' => ':countµs', - 'ago' => 'vor :time', - 'from_now' => 'in :time', - 'after' => ':time später', - 'before' => ':time zuvor', - - 'year_from_now' => ':count Jahr|:count Jahren', - 'month_from_now' => ':count Monat|:count Monaten', - 'week_from_now' => ':count Woche|:count Wochen', - 'day_from_now' => ':count Tag|:count Tagen', - 'year_ago' => ':count Jahr|:count Jahren', - 'month_ago' => ':count Monat|:count Monaten', - 'week_ago' => ':count Woche|:count Wochen', - 'day_ago' => ':count Tag|:count Tagen', - 'a_year_from_now' => 'ein Jahr|:count Jahren', - 'a_month_from_now' => 'ein Monat|:count Monaten', - 'a_week_from_now' => 'eine Woche|:count Wochen', - 'a_day_from_now' => 'ein Tag|:count Tagen', - 'a_year_ago' => 'ein Jahr|:count Jahren', - 'a_month_ago' => 'ein Monat|:count Monaten', - 'a_week_ago' => 'eine Woche|:count Wochen', - 'a_day_ago' => 'ein Tag|:count Tagen', - - 'diff_now' => 'Gerade eben', - 'diff_today' => 'heute', - 'diff_today_regexp' => 'heute(?:\\s+um)?', - 'diff_yesterday' => 'Gestern', - 'diff_yesterday_regexp' => 'gestern(?:\\s+um)?', - 'diff_tomorrow' => 'Morgen', - 'diff_tomorrow_regexp' => 'morgen(?:\\s+um)?', - 'diff_before_yesterday' => 'Vorgestern', - 'diff_after_tomorrow' => 'Übermorgen', - - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D. MMMM YYYY HH:mm', - ], - - 'calendar' => [ - 'sameDay' => '[heute um] LT [Uhr]', - 'nextDay' => '[morgen um] LT [Uhr]', - 'nextWeek' => 'dddd [um] LT [Uhr]', - 'lastDay' => '[gestern um] LT [Uhr]', - 'lastWeek' => '[letzten] dddd [um] LT [Uhr]', - 'sameElse' => 'L', - ], - - 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], - 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], - 'weekdays' => ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'], - 'weekdays_short' => ['So.', 'Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.'], - 'weekdays_min' => ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], - 'ordinal' => ':number.', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' und '], - 'ordinal_words' => [ - 'of' => 'im', - 'first' => 'erster', - 'second' => 'zweiter', - 'third' => 'dritter', - 'fourth' => 'vierten', - 'fifth' => 'fünfter', - 'last' => 'letzten', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de_AT.php b/vendor/nesbot/carbon/src/Carbon/Lang/de_AT.php deleted file mode 100644 index a2ea4c0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de_AT.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - sheriffmarley - * - Timo - * - Michael Hohl - * - Namoshek - * - Bernhard Baumrock (BernhardBaumrock) - */ -return array_replace_recursive(require __DIR__.'/de.php', [ - 'months' => [ - 0 => 'Jänner', - ], - 'months_short' => [ - 0 => 'Jän', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de_BE.php b/vendor/nesbot/carbon/src/Carbon/Lang/de_BE.php deleted file mode 100644 index 8ed8dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de_BE.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/de.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-DD', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de_CH.php b/vendor/nesbot/carbon/src/Carbon/Lang/de_CH.php deleted file mode 100644 index a869ab4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de_CH.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - sheriffmarley - * - Timo - * - Michael Hohl - */ -return array_replace_recursive(require __DIR__.'/de.php', [ - 'weekdays_short' => ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de_DE.php b/vendor/nesbot/carbon/src/Carbon/Lang/de_DE.php deleted file mode 100644 index fb1209d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de_DE.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org - */ -return require __DIR__.'/de.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de_IT.php b/vendor/nesbot/carbon/src/Carbon/Lang/de_IT.php deleted file mode 100644 index 604a856..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de_IT.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Matthias Dieter Wallno:fer libc-locales@sourceware.org - */ -return require __DIR__.'/de.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de_LI.php b/vendor/nesbot/carbon/src/Carbon/Lang/de_LI.php deleted file mode 100644 index 03e606a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de_LI.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/de.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de_LU.php b/vendor/nesbot/carbon/src/Carbon/Lang/de_LU.php deleted file mode 100644 index 8ed8dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de_LU.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/de.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-DD', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dje.php b/vendor/nesbot/carbon/src/Carbon/Lang/dje.php deleted file mode 100644 index 74b7ac1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dje.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Subbaahi', 'Zaarikay b'], - 'weekdays' => ['Alhadi', 'Atinni', 'Atalaata', 'Alarba', 'Alhamisi', 'Alzuma', 'Asibti'], - 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], - 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], - 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], - 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - 'year' => ':count hari', // less reliable - 'y' => ':count hari', // less reliable - 'a_year' => ':count hari', // less reliable - - 'week' => ':count alzuma', // less reliable - 'w' => ':count alzuma', // less reliable - 'a_week' => ':count alzuma', // less reliable - - 'second' => ':count atinni', // less reliable - 's' => ':count atinni', // less reliable - 'a_second' => ':count atinni', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/doi.php b/vendor/nesbot/carbon/src/Carbon/Lang/doi.php deleted file mode 100644 index cb679c5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/doi.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/doi_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/doi_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/doi_IN.php deleted file mode 100644 index d359721..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/doi_IN.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat Pune libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'एप्रैल', 'मेई', 'जून', 'जूलै', 'अगस्त', 'सितंबर', 'अक्तूबर', 'नवंबर', 'दिसंबर'], - 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'एप्रैल', 'मेई', 'जून', 'जूलै', 'अगस्त', 'सितंबर', 'अक्तूबर', 'नवंबर', 'दिसंबर'], - 'weekdays' => ['ऐतबार', 'सोमबार', 'मंगलबर', 'बुधबार', 'बीरबार', 'शुक्करबार', 'श्नीचरबार'], - 'weekdays_short' => ['ऐत', 'सोम', 'मंगल', 'बुध', 'बीर', 'शुक्कर', 'श्नीचर'], - 'weekdays_min' => ['ऐत', 'सोम', 'मंगल', 'बुध', 'बीर', 'शुक्कर', 'श्नीचर'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['सञं', 'सबेर'], - - 'second' => ':count सङार', // less reliable - 's' => ':count सङार', // less reliable - 'a_second' => ':count सङार', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dsb.php b/vendor/nesbot/carbon/src/Carbon/Lang/dsb.php deleted file mode 100644 index 1d214d5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dsb.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/dsb_DE.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dsb_DE.php b/vendor/nesbot/carbon/src/Carbon/Lang/dsb_DE.php deleted file mode 100644 index 1b94187..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dsb_DE.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Information from Michael Wolf bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'DD. MMMM YYYY', - 'LLL' => 'DD. MMMM, HH:mm [góź.]', - 'LLLL' => 'dddd, DD. MMMM YYYY, HH:mm [góź.]', - ], - 'months' => ['januara', 'februara', 'měrca', 'apryla', 'maja', 'junija', 'julija', 'awgusta', 'septembra', 'oktobra', 'nowembra', 'decembra'], - 'months_short' => ['Jan', 'Feb', 'Měr', 'Apr', 'Maj', 'Jun', 'Jul', 'Awg', 'Sep', 'Okt', 'Now', 'Dec'], - 'weekdays' => ['Njeźela', 'Pónjeźele', 'Wałtora', 'Srjoda', 'Stwórtk', 'Pětk', 'Sobota'], - 'weekdays_short' => ['Nj', 'Pó', 'Wa', 'Sr', 'St', 'Pě', 'So'], - 'weekdays_min' => ['Nj', 'Pó', 'Wa', 'Sr', 'St', 'Pě', 'So'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count lěto', - 'y' => ':count lěto', - 'a_year' => ':count lěto', - - 'month' => ':count mjasec', - 'm' => ':count mjasec', - 'a_month' => ':count mjasec', - - 'week' => ':count tyźeń', - 'w' => ':count tyźeń', - 'a_week' => ':count tyźeń', - - 'day' => ':count źeń', - 'd' => ':count źeń', - 'a_day' => ':count źeń', - - 'hour' => ':count góźina', - 'h' => ':count góźina', - 'a_hour' => ':count góźina', - - 'minute' => ':count minuta', - 'min' => ':count minuta', - 'a_minute' => ':count minuta', - - 'second' => ':count drugi', - 's' => ':count drugi', - 'a_second' => ':count drugi', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dua.php b/vendor/nesbot/carbon/src/Carbon/Lang/dua.php deleted file mode 100644 index 55e5c7c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dua.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['idiɓa', 'ebyámu'], - 'weekdays' => ['éti', 'mɔ́sú', 'kwasú', 'mukɔ́sú', 'ŋgisú', 'ɗónɛsú', 'esaɓasú'], - 'weekdays_short' => ['ét', 'mɔ́s', 'kwa', 'muk', 'ŋgi', 'ɗón', 'esa'], - 'weekdays_min' => ['ét', 'mɔ́s', 'kwa', 'muk', 'ŋgi', 'ɗón', 'esa'], - 'months' => ['dimɔ́di', 'ŋgɔndɛ', 'sɔŋɛ', 'diɓáɓá', 'emiasele', 'esɔpɛsɔpɛ', 'madiɓɛ́díɓɛ́', 'diŋgindi', 'nyɛtɛki', 'mayésɛ́', 'tiníní', 'eláŋgɛ́'], - 'months_short' => ['di', 'ŋgɔn', 'sɔŋ', 'diɓ', 'emi', 'esɔ', 'mad', 'diŋ', 'nyɛt', 'may', 'tin', 'elá'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - 'year' => ':count ma mbu', // less reliable - 'y' => ':count ma mbu', // less reliable - 'a_year' => ':count ma mbu', // less reliable - - 'month' => ':count myo̱di', // less reliable - 'm' => ':count myo̱di', // less reliable - 'a_month' => ':count myo̱di', // less reliable - - 'week' => ':count woki', // less reliable - 'w' => ':count woki', // less reliable - 'a_week' => ':count woki', // less reliable - - 'day' => ':count buńa', // less reliable - 'd' => ':count buńa', // less reliable - 'a_day' => ':count buńa', // less reliable - - 'hour' => ':count ma awa', // less reliable - 'h' => ':count ma awa', // less reliable - 'a_hour' => ':count ma awa', // less reliable - - 'minute' => ':count minuti', // less reliable - 'min' => ':count minuti', // less reliable - 'a_minute' => ':count minuti', // less reliable - - 'second' => ':count maba', // less reliable - 's' => ':count maba', // less reliable - 'a_second' => ':count maba', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dv.php b/vendor/nesbot/carbon/src/Carbon/Lang/dv.php deleted file mode 100644 index 4b8d7e1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dv.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -$months = [ - 'ޖެނުއަރީ', - 'ފެބްރުއަރީ', - 'މާރިޗު', - 'އޭޕްރީލު', - 'މޭ', - 'ޖޫން', - 'ޖުލައި', - 'އޯގަސްޓު', - 'ސެޕްޓެމްބަރު', - 'އޮކްޓޯބަރު', - 'ނޮވެމްބަރު', - 'ޑިސެމްބަރު', -]; - -$weekdays = [ - 'އާދިއްތަ', - 'ހޯމަ', - 'އަންގާރަ', - 'ބުދަ', - 'ބުރާސްފަތި', - 'ހުކުރު', - 'ހޮނިހިރު', -]; - -/* - * Authors: - * - Josh Soref - * - Jawish Hameed - */ -return [ - 'year' => ':count '.'އަހަރު', - 'a_year' => '{1}'.'އަހަރެއް'.'|:count '.'އަހަރު', - 'month' => ':count '.'މަސް', - 'a_month' => '{1}'.'މަހެއް'.'|:count '.'މަސް', - 'week' => ':count '.'ހަފްތާ', - 'a_week' => '{1}'.'ސިކުންތުކޮޅެއް'.'|:count '.'ހަފްތާ', - 'day' => ':count '.'ދުވަސް', - 'a_day' => '{1}'.'ދުވަހެއް'.'|:count '.'ދުވަސް', - 'hour' => ':count '.'ގަޑިއިރު', - 'a_hour' => '{1}'.'ގަޑިއިރެއް'.'|:count '.'ގަޑިއިރު', - 'minute' => ':count '.'މިނިޓު', - 'a_minute' => '{1}'.'މިނިޓެއް'.'|:count '.'މިނިޓު', - 'second' => ':count '.'ސިކުންތު', - 'a_second' => '{1}'.'ސިކުންތުކޮޅެއް'.'|:count '.'ސިކުންތު', - 'ago' => 'ކުރިން :time', - 'from_now' => 'ތެރޭގައި :time', - 'after' => ':time ފަހުން', - 'before' => ':time ކުރި', - 'diff_yesterday' => 'އިއްޔެ', - 'diff_today' => 'މިއަދު', - 'diff_tomorrow' => 'މާދަމާ', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[މިއަދު] LT', - 'nextDay' => '[މާދަމާ] LT', - 'nextWeek' => 'dddd LT', - 'lastDay' => '[އިއްޔެ] LT', - 'lastWeek' => '[ފާއިތުވި] dddd LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['މކ', 'މފ'], - 'months' => $months, - 'months_short' => $months, - 'weekdays' => $weekdays, - 'weekdays_short' => $weekdays, - 'weekdays_min' => ['އާދި', 'ހޯމަ', 'އަން', 'ބުދަ', 'ބުރާ', 'ހުކު', 'ހޮނި'], - 'list' => [', ', ' އަދި '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php b/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php deleted file mode 100644 index 2668d5b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ahmed Ali - */ - -$months = [ - 'ޖެނުއަރީ', - 'ފެބްރުއަރީ', - 'މާރިޗު', - 'އޭޕްރީލު', - 'މޭ', - 'ޖޫން', - 'ޖުލައި', - 'އޯގަސްޓު', - 'ސެޕްޓެމްބަރު', - 'އޮކްޓޯބަރު', - 'ނޮވެމްބަރު', - 'ޑިސެމްބަރު', -]; - -$weekdays = [ - 'އާދިއްތަ', - 'ހޯމަ', - 'އަންގާރަ', - 'ބުދަ', - 'ބުރާސްފަތި', - 'ހުކުރު', - 'ހޮނިހިރު', -]; - -return [ - 'year' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', - 'y' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', - 'month' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', - 'm' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', - 'week' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', - 'w' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', - 'day' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', - 'd' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', - 'hour' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', - 'h' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', - 'minute' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', - 'min' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', - 'second' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', - 's' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', - 'ago' => ':time ކުރިން', - 'from_now' => ':time ފަހުން', - 'after' => ':time ފަހުން', - 'before' => ':time ކުރި', - 'diff_yesterday' => 'އިއްޔެ', - 'diff_today' => 'މިއަދު', - 'diff_tomorrow' => 'މާދަމާ', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[މިއަދު] LT', - 'nextDay' => '[މާދަމާ] LT', - 'nextWeek' => 'dddd LT', - 'lastDay' => '[އިއްޔެ] LT', - 'lastWeek' => '[ފާއިތުވި] dddd LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['މކ', 'މފ'], - 'months' => $months, - 'months_short' => $months, - 'weekdays' => $weekdays, - 'weekdays_short' => $weekdays, - 'weekdays_min' => ['އާދި', 'ހޯމަ', 'އަން', 'ބުދަ', 'ބުރާ', 'ހުކު', 'ހޮނި'], - 'list' => [', ', ' އަދި '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dyo.php b/vendor/nesbot/carbon/src/Carbon/Lang/dyo.php deleted file mode 100644 index 33082e6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dyo.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['Dimas', 'Teneŋ', 'Talata', 'Alarbay', 'Aramisay', 'Arjuma', 'Sibiti'], - 'weekdays_short' => ['Dim', 'Ten', 'Tal', 'Ala', 'Ara', 'Arj', 'Sib'], - 'weekdays_min' => ['Dim', 'Ten', 'Tal', 'Ala', 'Ara', 'Arj', 'Sib'], - 'months' => ['Sanvie', 'Fébirie', 'Mars', 'Aburil', 'Mee', 'Sueŋ', 'Súuyee', 'Ut', 'Settembar', 'Oktobar', 'Novembar', 'Disambar'], - 'months_short' => ['Sa', 'Fe', 'Ma', 'Ab', 'Me', 'Su', 'Sú', 'Ut', 'Se', 'Ok', 'No', 'De'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dz.php b/vendor/nesbot/carbon/src/Carbon/Lang/dz.php deleted file mode 100644 index cc17e69..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dz.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/dz_BT.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/dz_BT.php b/vendor/nesbot/carbon/src/Carbon/Lang/dz_BT.php deleted file mode 100644 index bfbcaf4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/dz_BT.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Sherubtse College bug-glibc@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'པསྱི་ལོYYཟལMMཚེསDD', - ], - 'months' => ['ཟླ་བ་དང་པ་', 'ཟླ་བ་གཉིས་པ་', 'ཟླ་བ་གསུམ་པ་', 'ཟླ་བ་བཞི་པ་', 'ཟླ་བ་ལྔ་ཕ་', 'ཟླ་བ་དྲུག་པ་', 'ཟླ་བ་བདུནཔ་', 'ཟླ་བ་བརྒྱད་པ་', 'ཟླ་བ་དགུ་པ་', 'ཟླ་བ་བཅུ་པ་', 'ཟླ་བ་བཅུ་གཅིག་པ་', 'ཟླ་བ་བཅུ་གཉིས་པ་'], - 'months_short' => ['ཟླ་༡', 'ཟླ་༢', 'ཟླ་༣', 'ཟླ་༤', 'ཟླ་༥', 'ཟླ་༦', 'ཟླ་༧', 'ཟླ་༨', 'ཟླ་༩', 'ཟླ་༡༠', 'ཟླ་༡༡', 'ཟླ་༡༢'], - 'weekdays' => ['གཟའ་ཟླ་བ་', 'གཟའ་མིག་དམར་', 'གཟའ་ལྷག་ཕ་', 'གཟའ་པུར་བུ་', 'གཟའ་པ་སངས་', 'གཟའ་སྤེན་ཕ་', 'གཟའ་ཉི་མ་'], - 'weekdays_short' => ['ཟླ་', 'མིར་', 'ལྷག་', 'པུར་', 'སངས་', 'སྤེན་', 'ཉི་'], - 'weekdays_min' => ['ཟླ་', 'མིར་', 'ལྷག་', 'པུར་', 'སངས་', 'སྤེན་', 'ཉི་'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ངས་ཆ', 'ཕྱི་ཆ'], - - 'year' => ':count ཆརཔ', // less reliable - 'y' => ':count ཆརཔ', // less reliable - 'a_year' => ':count ཆརཔ', // less reliable - - 'month' => ':count ཟླ་བ', // less reliable - 'm' => ':count ཟླ་བ', // less reliable - 'a_month' => ':count ཟླ་བ', // less reliable - - 'day' => ':count ཉི', // less reliable - 'd' => ':count ཉི', // less reliable - 'a_day' => ':count ཉི', // less reliable - - 'second' => ':count ཆ', // less reliable - 's' => ':count ཆ', // less reliable - 'a_second' => ':count ཆ', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ebu.php b/vendor/nesbot/carbon/src/Carbon/Lang/ebu.php deleted file mode 100644 index f60bc6f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ebu.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['KI', 'UT'], - 'weekdays' => ['Kiumia', 'Njumatatu', 'Njumaine', 'Njumatano', 'Aramithi', 'Njumaa', 'NJumamothii'], - 'weekdays_short' => ['Kma', 'Tat', 'Ine', 'Tan', 'Arm', 'Maa', 'NMM'], - 'weekdays_min' => ['Kma', 'Tat', 'Ine', 'Tan', 'Arm', 'Maa', 'NMM'], - 'months' => ['Mweri wa mbere', 'Mweri wa kaĩri', 'Mweri wa kathatũ', 'Mweri wa kana', 'Mweri wa gatano', 'Mweri wa gatantatũ', 'Mweri wa mũgwanja', 'Mweri wa kanana', 'Mweri wa kenda', 'Mweri wa ikũmi', 'Mweri wa ikũmi na ũmwe', 'Mweri wa ikũmi na Kaĩrĩ'], - 'months_short' => ['Mbe', 'Kai', 'Kat', 'Kan', 'Gat', 'Gan', 'Mug', 'Knn', 'Ken', 'Iku', 'Imw', 'Igi'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ee.php b/vendor/nesbot/carbon/src/Carbon/Lang/ee.php deleted file mode 100644 index f96c5c9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ee.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['ŋ', 'ɣ'], - 'weekdays' => ['kɔsiɖa', 'dzoɖa', 'blaɖa', 'kuɖa', 'yawoɖa', 'fiɖa', 'memleɖa'], - 'weekdays_short' => ['kɔs', 'dzo', 'bla', 'kuɖ', 'yaw', 'fiɖ', 'mem'], - 'weekdays_min' => ['kɔs', 'dzo', 'bla', 'kuɖ', 'yaw', 'fiɖ', 'mem'], - 'months' => ['dzove', 'dzodze', 'tedoxe', 'afɔfĩe', 'dama', 'masa', 'siamlɔm', 'deasiamime', 'anyɔnyɔ', 'kele', 'adeɛmekpɔxe', 'dzome'], - 'months_short' => ['dzv', 'dzd', 'ted', 'afɔ', 'dam', 'mas', 'sia', 'dea', 'any', 'kel', 'ade', 'dzm'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'a [ga] h:mm', - 'LTS' => 'a [ga] h:mm:ss', - 'L' => 'M/D/YYYY', - 'LL' => 'MMM D [lia], YYYY', - 'LLL' => 'a [ga] h:mm MMMM D [lia] YYYY', - 'LLLL' => 'a [ga] h:mm dddd, MMMM D [lia] YYYY', - ], - - 'year' => 'ƒe :count', - 'y' => 'ƒe :count', - 'a_year' => 'ƒe :count', - - 'month' => 'ɣleti :count', - 'm' => 'ɣleti :count', - 'a_month' => 'ɣleti :count', - - 'week' => 'kwasiɖa :count', - 'w' => 'kwasiɖa :count', - 'a_week' => 'kwasiɖa :count', - - 'day' => 'ŋkeke :count', - 'd' => 'ŋkeke :count', - 'a_day' => 'ŋkeke :count', - - 'hour' => 'gaƒoƒo :count', - 'h' => 'gaƒoƒo :count', - 'a_hour' => 'gaƒoƒo :count', - - 'minute' => 'miniti :count', // less reliable - 'min' => 'miniti :count', // less reliable - 'a_minute' => 'miniti :count', // less reliable - - 'second' => 'sɛkɛnd :count', // less reliable - 's' => 'sɛkɛnd :count', // less reliable - 'a_second' => 'sɛkɛnd :count', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ee_TG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ee_TG.php deleted file mode 100644 index 7a8b36c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ee_TG.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ee.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'LLL' => 'HH:mm MMMM D [lia] YYYY', - 'LLLL' => 'HH:mm dddd, MMMM D [lia] YYYY', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/el.php b/vendor/nesbot/carbon/src/Carbon/Lang/el.php deleted file mode 100644 index 7c40f9c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/el.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Alessandro Di Felice - * - François B - * - Tim Fish - * - Gabriel Monteagudo - * - JD Isaacks - * - yiannisdesp - * - Ilias Kasmeridis (iliaskasm) - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count χρόνος|:count χρόνια', - 'a_year' => 'ένας χρόνος|:count χρόνια', - 'y' => ':count χρ.', - 'month' => ':count μήνας|:count μήνες', - 'a_month' => 'ένας μήνας|:count μήνες', - 'm' => ':count μήν.', - 'week' => ':count εβδομάδα|:count εβδομάδες', - 'a_week' => 'μια εβδομάδα|:count εβδομάδες', - 'w' => ':count εβδ.', - 'day' => ':count μέρα|:count μέρες', - 'a_day' => 'μία μέρα|:count μέρες', - 'd' => ':count μέρ.', - 'hour' => ':count ώρα|:count ώρες', - 'a_hour' => 'μία ώρα|:count ώρες', - 'h' => ':count ώρα|:count ώρες', - 'minute' => ':count λεπτό|:count λεπτά', - 'a_minute' => 'ένα λεπτό|:count λεπτά', - 'min' => ':count λεπ.', - 'second' => ':count δευτερόλεπτο|:count δευτερόλεπτα', - 'a_second' => 'λίγα δευτερόλεπτα|:count δευτερόλεπτα', - 's' => ':count δευ.', - 'ago' => 'πριν :time', - 'from_now' => 'σε :time', - 'after' => ':time μετά', - 'before' => ':time πριν', - 'diff_now' => 'τώρα', - 'diff_today' => 'Σήμερα', - 'diff_today_regexp' => 'Σήμερα(?:\\s+{})?', - 'diff_yesterday' => 'χθες', - 'diff_yesterday_regexp' => 'Χθες(?:\\s+{})?', - 'diff_tomorrow' => 'αύριο', - 'diff_tomorrow_regexp' => 'Αύριο(?:\\s+{})?', - 'formats' => [ - 'LT' => 'h:mm A', - 'LTS' => 'h:mm:ss A', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm A', - 'LLLL' => 'dddd, D MMMM YYYY h:mm A', - ], - 'calendar' => [ - 'sameDay' => '[Σήμερα {}] LT', - 'nextDay' => '[Αύριο {}] LT', - 'nextWeek' => 'dddd [{}] LT', - 'lastDay' => '[Χθες {}] LT', - 'lastWeek' => function (CarbonInterface $current) { - switch ($current->dayOfWeek) { - case 6: - return '[το προηγούμενο] dddd [{}] LT'; - default: - return '[την προηγούμενη] dddd [{}] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':numberη', - 'meridiem' => ['ΠΜ', 'ΜΜ', 'πμ', 'μμ'], - 'months' => ['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου'], - 'months_standalone' => ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'], - 'months_regexp' => '/(D[oD]?[\s,]+MMMM|L{2,4}|l{2,4})/', - 'months_short' => ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'], - 'weekdays' => ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'], - 'weekdays_short' => ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'], - 'weekdays_min' => ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σα'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' και '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/el_CY.php b/vendor/nesbot/carbon/src/Carbon/Lang/el_CY.php deleted file mode 100644 index 8a693c1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/el_CY.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Greek Debian Translation Team bug-glibc@gnu.org - */ -return array_replace_recursive(require __DIR__.'/el.php', [ - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/el_GR.php b/vendor/nesbot/carbon/src/Carbon/Lang/el_GR.php deleted file mode 100644 index df196af..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/el_GR.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/el.php', [ - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en.php b/vendor/nesbot/carbon/src/Carbon/Lang/en.php deleted file mode 100644 index f81f617..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Milos Sakovic - * - Paul - * - Pete Scopes (pdscopes) - */ -return [ - /* - * {1}, {0} and ]1,Inf[ are not needed as it's the default for English pluralization. - * But as some languages are using en.php as a fallback, it's better to specify it - * explicitly so those languages also fallback to English pluralization when a unit - * is missing. - */ - 'year' => '{1}:count year|{0}:count years|]1,Inf[:count years', - 'a_year' => '{1}a year|{0}:count years|]1,Inf[:count years', - 'y' => '{1}:countyr|{0}:countyrs|]1,Inf[:countyrs', - 'month' => '{1}:count month|{0}:count months|]1,Inf[:count months', - 'a_month' => '{1}a month|{0}:count months|]1,Inf[:count months', - 'm' => '{1}:countmo|{0}:countmos|]1,Inf[:countmos', - 'week' => '{1}:count week|{0}:count weeks|]1,Inf[:count weeks', - 'a_week' => '{1}a week|{0}:count weeks|]1,Inf[:count weeks', - 'w' => ':countw', - 'day' => '{1}:count day|{0}:count days|]1,Inf[:count days', - 'a_day' => '{1}a day|{0}:count days|]1,Inf[:count days', - 'd' => ':countd', - 'hour' => '{1}:count hour|{0}:count hours|]1,Inf[:count hours', - 'a_hour' => '{1}an hour|{0}:count hours|]1,Inf[:count hours', - 'h' => ':counth', - 'minute' => '{1}:count minute|{0}:count minutes|]1,Inf[:count minutes', - 'a_minute' => '{1}a minute|{0}:count minutes|]1,Inf[:count minutes', - 'min' => ':countm', - 'second' => '{1}:count second|{0}:count seconds|]1,Inf[:count seconds', - 'a_second' => '{1}a few seconds|{0}:count seconds|]1,Inf[:count seconds', - 's' => ':counts', - 'millisecond' => '{1}:count millisecond|{0}:count milliseconds|]1,Inf[:count milliseconds', - 'a_millisecond' => '{1}a millisecond|{0}:count milliseconds|]1,Inf[:count milliseconds', - 'ms' => ':countms', - 'microsecond' => '{1}:count microsecond|{0}:count microseconds|]1,Inf[:count microseconds', - 'a_microsecond' => '{1}a microsecond|{0}:count microseconds|]1,Inf[:count microseconds', - 'µs' => ':countµs', - 'ago' => ':time ago', - 'from_now' => ':time from now', - 'after' => ':time after', - 'before' => ':time before', - 'diff_now' => 'just now', - 'diff_today' => 'today', - 'diff_yesterday' => 'yesterday', - 'diff_tomorrow' => 'tomorrow', - 'diff_before_yesterday' => 'before yesterday', - 'diff_after_tomorrow' => 'after tomorrow', - 'period_recurrences' => '{1}once|{0}:count times|]1,Inf[:count times', - 'period_interval' => 'every :interval', - 'period_start_date' => 'from :date', - 'period_end_date' => 'to :date', - 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - 'weekdays' => ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], - 'weekdays_short' => ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - 'weekdays_min' => ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], - 'ordinal' => function ($number) { - $lastDigit = $number % 10; - - return $number.( - ((int) ($number % 100 / 10) === 1) ? 'th' : ( - ($lastDigit === 1) ? 'st' : ( - ($lastDigit === 2) ? 'nd' : ( - ($lastDigit === 3) ? 'rd' : 'th' - ) - ) - ) - ); - }, - 'list' => [', ', ' and '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_001.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_001.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_001.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_150.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_150.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_150.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_AG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_AG.php deleted file mode 100644 index 2c1c64f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_AG.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_AI.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_AI.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_AI.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_AS.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_AS.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_AS.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_AT.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_AT.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_AT.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_AU.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_AU.php deleted file mode 100644 index f16bd4f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_AU.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kunal Marwaha - * - François B - * - Mayank Badola - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'from_now' => 'in :time', - 'formats' => [ - 'LT' => 'h:mm A', - 'LTS' => 'h:mm:ss A', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm A', - 'LLLL' => 'dddd, D MMMM YYYY h:mm A', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_BB.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_BB.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_BB.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_BE.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_BE.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_BE.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_BI.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_BI.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_BI.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_BM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_BM.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_BM.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_BS.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_BS.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_BS.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_BW.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_BW.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_BW.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_BZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_BZ.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_BZ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_CA.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_CA.php deleted file mode 100644 index e656086..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_CA.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Zhan Tong Zhang - * - Mayank Badola - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'from_now' => 'in :time', - 'formats' => [ - 'LT' => 'h:mm A', - 'LTS' => 'h:mm:ss A', - 'L' => 'YYYY-MM-DD', - 'LL' => 'MMMM D, YYYY', - 'LLL' => 'MMMM D, YYYY h:mm A', - 'LLLL' => 'dddd, MMMM D, YYYY h:mm A', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_CC.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_CC.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_CC.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php deleted file mode 100644 index 10d9cd8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_CH.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_CK.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_CK.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_CK.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_CM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_CM.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_CM.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_CX.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_CX.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_CX.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_CY.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_CY.php deleted file mode 100644 index a44c350..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_CY.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - NehaGautam - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'from_now' => 'in :time', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD-MM-YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_DE.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_DE.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_DE.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_DG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_DG.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_DG.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_DK.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_DK.php deleted file mode 100644 index 9e8a8c6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_DK.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Danish Standards Association bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-DD', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_DM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_DM.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_DM.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_ER.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_ER.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_ER.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_FI.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_FI.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_FI.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_FJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_FJ.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_FJ.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_FK.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_FK.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_FK.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_FM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_FM.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_FM.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_GB.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_GB.php deleted file mode 100644 index 67d9fd6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_GB.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Mayank Badola - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'from_now' => 'in :time', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_GD.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_GD.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_GD.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_GG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_GG.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_GG.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_GH.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_GH.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_GH.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_GI.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_GI.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_GI.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_GM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_GM.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_GM.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_GU.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_GU.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_GU.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_GY.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_GY.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_GY.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_HK.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_HK.php deleted file mode 100644 index 34aae98..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_HK.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_IE.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_IE.php deleted file mode 100644 index c8d3c2f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_IE.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Martin McWhorter - * - François B - * - Chris Cartlidge - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'from_now' => 'in :time', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD-MM-YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_IL.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_IL.php deleted file mode 100644 index e607924..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_IL.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Yoav Amit - * - François B - * - Mayank Badola - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'from_now' => 'in :time', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_IM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_IM.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_IM.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_IN.php deleted file mode 100644 index 00414e9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_IN.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YY', - 'LL' => 'MMMM DD, YYYY', - 'LLL' => 'DD MMM HH:mm', - 'LLLL' => 'MMMM DD, YYYY HH:mm', - ], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_IO.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_IO.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_IO.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_ISO.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_ISO.php deleted file mode 100644 index 11457b0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_ISO.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-dd', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D HH:mm', - 'LLLL' => 'dddd, YYYY MMMM DD HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_JE.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_JE.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_JE.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_JM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_JM.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_JM.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_KE.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_KE.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_KE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_KI.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_KI.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_KI.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_KN.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_KN.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_KN.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_KY.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_KY.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_KY.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_LC.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_LC.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_LC.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_LR.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_LR.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_LR.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_LS.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_LS.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_LS.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MG.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MG.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MH.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MH.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MH.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MO.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MO.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MP.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MP.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MP.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MS.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MS.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MS.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MT.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MT.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MT.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MU.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MU.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MU.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MW.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MW.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MW.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_MY.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_MY.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_MY.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_NA.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_NA.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_NA.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_NF.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_NF.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_NF.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_NG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_NG.php deleted file mode 100644 index 67bceaa..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_NG.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_NL.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_NL.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_NL.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_NR.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_NR.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_NR.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_NU.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_NU.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_NU.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_NZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_NZ.php deleted file mode 100644 index 6a206a0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_NZ.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Mayank Badola - * - Luke McGregor - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'from_now' => 'in :time', - 'formats' => [ - 'LT' => 'h:mm A', - 'LTS' => 'h:mm:ss A', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm A', - 'LLLL' => 'dddd, D MMMM YYYY h:mm A', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_PG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_PG.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_PG.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_PH.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_PH.php deleted file mode 100644 index 34aae98..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_PH.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_PK.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_PK.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_PK.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_PN.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_PN.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_PN.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_PR.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_PR.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_PR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_PW.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_PW.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_PW.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_RW.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_RW.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_RW.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SB.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SB.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SB.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SC.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SC.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SC.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SD.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SD.php deleted file mode 100644 index c4e2557..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SD.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 6, - 'weekend' => [5, 6], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SE.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SE.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SE.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SG.php deleted file mode 100644 index 5ee9524..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SG.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'from_now' => 'in :time', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SH.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SH.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SH.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SI.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SI.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SI.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SL.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SL.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SL.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SS.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SS.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SS.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SX.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SX.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SX.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_SZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_SZ.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_SZ.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_TC.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_TC.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_TC.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_TK.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_TK.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_TK.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_TO.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_TO.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_TO.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_TT.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_TT.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_TT.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_TV.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_TV.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_TV.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_TZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_TZ.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_TZ.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_UG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_UG.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_UG.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_UM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_UM.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_UM.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_US.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_US.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_US.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_US_Posix.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_US_Posix.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_US_Posix.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_VC.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_VC.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_VC.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_VG.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_VG.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_VG.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_VI.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_VI.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_VI.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_VU.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_VU.php deleted file mode 100644 index e2dd81d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_VU.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_WS.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_WS.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_WS.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_ZA.php deleted file mode 100644 index 48ea947..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_ZA.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YY', - 'LL' => 'MMMM DD, YYYY', - 'LLL' => 'DD MMM HH:mm', - 'LLLL' => 'MMMM DD, YYYY HH:mm', - ], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_ZM.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_ZM.php deleted file mode 100644 index d8a8cb5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_ZM.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - ANLoc Martin Benjamin locales@africanlocalization.net - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en_ZW.php b/vendor/nesbot/carbon/src/Carbon/Lang/en_ZW.php deleted file mode 100644 index f086dc6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en_ZW.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/en.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/eo.php b/vendor/nesbot/carbon/src/Carbon/Lang/eo.php deleted file mode 100644 index 7c2efba..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/eo.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - Mia Nordentoft - * - JD Isaacks - */ -return [ - 'year' => ':count jaro|:count jaroj', - 'a_year' => 'jaro|:count jaroj', - 'y' => ':count j.', - 'month' => ':count monato|:count monatoj', - 'a_month' => 'monato|:count monatoj', - 'm' => ':count mo.', - 'week' => ':count semajno|:count semajnoj', - 'a_week' => 'semajno|:count semajnoj', - 'w' => ':count sem.', - 'day' => ':count tago|:count tagoj', - 'a_day' => 'tago|:count tagoj', - 'd' => ':count t.', - 'hour' => ':count horo|:count horoj', - 'a_hour' => 'horo|:count horoj', - 'h' => ':count h.', - 'minute' => ':count minuto|:count minutoj', - 'a_minute' => 'minuto|:count minutoj', - 'min' => ':count min.', - 'second' => ':count sekundo|:count sekundoj', - 'a_second' => 'sekundoj|:count sekundoj', - 's' => ':count sek.', - 'ago' => 'antaŭ :time', - 'from_now' => 'post :time', - 'after' => ':time poste', - 'before' => ':time antaŭe', - 'diff_yesterday' => 'Hieraŭ', - 'diff_yesterday_regexp' => 'Hieraŭ(?:\\s+je)?', - 'diff_today' => 'Hodiaŭ', - 'diff_today_regexp' => 'Hodiaŭ(?:\\s+je)?', - 'diff_tomorrow' => 'Morgaŭ', - 'diff_tomorrow_regexp' => 'Morgaŭ(?:\\s+je)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'D[-a de] MMMM, YYYY', - 'LLL' => 'D[-a de] MMMM, YYYY HH:mm', - 'LLLL' => 'dddd, [la] D[-a de] MMMM, YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Hodiaŭ je] LT', - 'nextDay' => '[Morgaŭ je] LT', - 'nextWeek' => 'dddd [je] LT', - 'lastDay' => '[Hieraŭ je] LT', - 'lastWeek' => '[pasinta] dddd [je] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':numbera', - 'meridiem' => ['a.t.m.', 'p.t.m.'], - 'months' => ['januaro', 'februaro', 'marto', 'aprilo', 'majo', 'junio', 'julio', 'aŭgusto', 'septembro', 'oktobro', 'novembro', 'decembro'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aŭg', 'sep', 'okt', 'nov', 'dec'], - 'weekdays' => ['dimanĉo', 'lundo', 'mardo', 'merkredo', 'ĵaŭdo', 'vendredo', 'sabato'], - 'weekdays_short' => ['dim', 'lun', 'mard', 'merk', 'ĵaŭ', 'ven', 'sab'], - 'weekdays_min' => ['di', 'lu', 'ma', 'me', 'ĵa', 've', 'sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' kaj '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es.php b/vendor/nesbot/carbon/src/Carbon/Lang/es.php deleted file mode 100644 index 1c4fcfd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kunal Marwaha - * - kostas - * - François B - * - Tim Fish - * - Claire Coloma - * - Steven Heinrich - * - JD Isaacks - * - Raphael Amorim - * - Jorge Y. Castillo - * - Víctor Díaz - * - Diego - * - Sebastian Thierer - * - quinterocesar - * - Daniel Commesse Liévanos (danielcommesse) - * - Pete Scopes (pdscopes) - * - gam04 - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count año|:count años', - 'a_year' => 'un año|:count años', - 'y' => ':count año|:count años', - 'month' => ':count mes|:count meses', - 'a_month' => 'un mes|:count meses', - 'm' => ':count mes|:count meses', - 'week' => ':count semana|:count semanas', - 'a_week' => 'una semana|:count semanas', - 'w' => ':countsem', - 'day' => ':count día|:count días', - 'a_day' => 'un día|:count días', - 'd' => ':countd', - 'hour' => ':count hora|:count horas', - 'a_hour' => 'una hora|:count horas', - 'h' => ':counth', - 'minute' => ':count minuto|:count minutos', - 'a_minute' => 'un minuto|:count minutos', - 'min' => ':countm', - 'second' => ':count segundo|:count segundos', - 'a_second' => 'unos segundos|:count segundos', - 's' => ':counts', - 'millisecond' => ':count milisegundo|:count milisegundos', - 'a_millisecond' => 'un milisegundo|:count milisegundos', - 'ms' => ':countms', - 'microsecond' => ':count microsegundo|:count microsegundos', - 'a_microsecond' => 'un microsegundo|:count microsegundos', - 'µs' => ':countµs', - 'ago' => 'hace :time', - 'from_now' => 'en :time', - 'after' => ':time después', - 'before' => ':time antes', - 'diff_now' => 'ahora mismo', - 'diff_today' => 'hoy', - 'diff_today_regexp' => 'hoy(?:\\s+a)?(?:\\s+las)?', - 'diff_yesterday' => 'ayer', - 'diff_yesterday_regexp' => 'ayer(?:\\s+a)?(?:\\s+las)?', - 'diff_tomorrow' => 'mañana', - 'diff_tomorrow_regexp' => 'mañana(?:\\s+a)?(?:\\s+las)?', - 'diff_before_yesterday' => 'anteayer', - 'diff_after_tomorrow' => 'pasado mañana', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D [de] MMMM [de] YYYY', - 'LLL' => 'D [de] MMMM [de] YYYY H:mm', - 'LLLL' => 'dddd, D [de] MMMM [de] YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => function (CarbonInterface $current) { - return '[hoy a la'.($current->hour !== 1 ? 's' : '').'] LT'; - }, - 'nextDay' => function (CarbonInterface $current) { - return '[mañana a la'.($current->hour !== 1 ? 's' : '').'] LT'; - }, - 'nextWeek' => function (CarbonInterface $current) { - return 'dddd [a la'.($current->hour !== 1 ? 's' : '').'] LT'; - }, - 'lastDay' => function (CarbonInterface $current) { - return '[ayer a la'.($current->hour !== 1 ? 's' : '').'] LT'; - }, - 'lastWeek' => function (CarbonInterface $current) { - return '[el] dddd [pasado a la'.($current->hour !== 1 ? 's' : '').'] LT'; - }, - 'sameElse' => 'L', - ], - 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], - 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], - 'mmm_suffix' => '.', - 'ordinal' => ':numberº', - 'weekdays' => ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'], - 'weekdays_short' => ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'], - 'weekdays_min' => ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sá'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' y '], - 'meridiem' => ['a. m.', 'p. m.'], - 'ordinal_words' => [ - 'of' => 'de', - 'first' => 'primer', - 'second' => 'segundo', - 'third' => 'tercer', - 'fourth' => 'cuarto', - 'fifth' => 'quinto', - 'last' => 'último', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_419.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_419.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_419.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_AR.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_AR.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_AR.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_BO.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_BO.php deleted file mode 100644 index c9b8432..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_BO.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_BR.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_BR.php deleted file mode 100644 index 378d054..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_BR.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_BZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_BZ.php deleted file mode 100644 index 378d054..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_BZ.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_CL.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_CL.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_CL.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_CO.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_CO.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_CO.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_CR.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_CR.php deleted file mode 100644 index 553fc09..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_CR.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_CU.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_CU.php deleted file mode 100644 index f02e1a6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_CU.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_DO.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_DO.php deleted file mode 100644 index 0f855ba..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_DO.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - kostas - * - François B - * - Tim Fish - * - Chiel Robben - * - Claire Coloma - * - Steven Heinrich - * - JD Isaacks - * - Raphael Amorim - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'diff_before_yesterday' => 'anteayer', - 'formats' => [ - 'LT' => 'h:mm A', - 'LTS' => 'h:mm:ss A', - 'LLL' => 'D [de] MMMM [de] YYYY h:mm A', - 'LLLL' => 'dddd, D [de] MMMM [de] YYYY h:mm A', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_EA.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_EA.php deleted file mode 100644 index f02e1a6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_EA.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_EC.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_EC.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_EC.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_ES.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_ES.php deleted file mode 100644 index 19217c2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_ES.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return require __DIR__.'/es.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_GQ.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_GQ.php deleted file mode 100644 index f02e1a6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_GQ.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_GT.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_GT.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_GT.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_HN.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_HN.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_HN.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_IC.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_IC.php deleted file mode 100644 index f02e1a6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_IC.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_MX.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_MX.php deleted file mode 100644 index 61e14cf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_MX.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'diff_before_yesterday' => 'antier', - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_NI.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_NI.php deleted file mode 100644 index 6b964c1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_NI.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_PA.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_PA.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_PA.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_PE.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_PE.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_PE.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_PH.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_PH.php deleted file mode 100644 index deae06a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_PH.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D/M/yy', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D [de] MMMM [de] YYYY h:mm a', - 'LLLL' => 'dddd, D [de] MMMM [de] YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_PR.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_PR.php deleted file mode 100644 index 6b964c1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_PR.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_PY.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_PY.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_PY.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_SV.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_SV.php deleted file mode 100644 index 00db08e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_SV.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], - 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_US.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_US.php deleted file mode 100644 index f333136..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_US.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kunal Marwaha - * - Josh Soref - * - Jørn Ølmheim - * - Craig Patik - * - bustta - * - François B - * - Tim Fish - * - Claire Coloma - * - Steven Heinrich - * - JD Isaacks - * - Raphael Amorim - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'diff_before_yesterday' => 'anteayer', - 'formats' => [ - 'LT' => 'h:mm A', - 'LTS' => 'h:mm:ss A', - 'L' => 'MM/DD/YYYY', - 'LL' => 'MMMM [de] D [de] YYYY', - 'LLL' => 'MMMM [de] D [de] YYYY h:mm A', - 'LLLL' => 'dddd, MMMM [de] D [de] YYYY h:mm A', - ], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_UY.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_UY.php deleted file mode 100644 index 39baff8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_UY.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'setiembre', 'octubre', 'noviembre', 'diciembre'], - 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'set', 'oct', 'nov', 'dic'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es_VE.php b/vendor/nesbot/carbon/src/Carbon/Lang/es_VE.php deleted file mode 100644 index a74806e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es_VE.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/es.php', [ - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/et.php b/vendor/nesbot/carbon/src/Carbon/Lang/et.php deleted file mode 100644 index f49c880..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/et.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Andres Ivanov - * - Tsutomu Kuroda - * - tjku - * - Max Melentiev - * - Juanito Fatas - * - RM87 - * - Akira Matsuda - * - Christopher Dell - * - Enrique Vidal - * - Simone Carletti - * - Aaron Patterson - * - Esko Lehtme - * - Mart Karu - * - Nicolás Hock Isaza - * - Kevin Valdek - * - Zahhar Kirillov - * - João Magalhães - * - Ingmar - * - Illimar Tambek - * - Mihkel - */ -return [ - 'year' => ':count aasta|:count aastat', - 'y' => ':count a', - 'month' => ':count kuu|:count kuud', - 'm' => ':count k', - 'week' => ':count nädal|:count nädalat', - 'w' => ':count näd', - 'day' => ':count päev|:count päeva', - 'd' => ':count p', - 'hour' => ':count tund|:count tundi', - 'h' => ':count t', - 'minute' => ':count minut|:count minutit', - 'min' => ':count min', - 'second' => ':count sekund|:count sekundit', - 's' => ':count s', - 'ago' => ':time tagasi', - 'from_now' => ':time pärast', - 'after' => ':time pärast', - 'before' => ':time enne', - 'year_from_now' => ':count aasta', - 'month_from_now' => ':count kuu', - 'week_from_now' => ':count nädala', - 'day_from_now' => ':count päeva', - 'hour_from_now' => ':count tunni', - 'minute_from_now' => ':count minuti', - 'second_from_now' => ':count sekundi', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'diff_now' => 'nüüd', - 'diff_today' => 'täna', - 'diff_yesterday' => 'eile', - 'diff_tomorrow' => 'homme', - 'diff_before_yesterday' => 'üleeile', - 'diff_after_tomorrow' => 'ülehomme', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D. MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[täna] LT', - 'nextDay' => '[homme] LT', - 'lastDay' => '[eile] LT', - 'nextWeek' => 'dddd LT', - 'lastWeek' => '[eelmine] dddd LT', - 'sameElse' => 'L', - ], - 'months' => ['jaanuar', 'veebruar', 'märts', 'aprill', 'mai', 'juuni', 'juuli', 'august', 'september', 'oktoober', 'november', 'detsember'], - 'months_short' => ['jaan', 'veebr', 'märts', 'apr', 'mai', 'juuni', 'juuli', 'aug', 'sept', 'okt', 'nov', 'dets'], - 'weekdays' => ['pühapäev', 'esmaspäev', 'teisipäev', 'kolmapäev', 'neljapäev', 'reede', 'laupäev'], - 'weekdays_short' => ['P', 'E', 'T', 'K', 'N', 'R', 'L'], - 'weekdays_min' => ['P', 'E', 'T', 'K', 'N', 'R', 'L'], - 'list' => [', ', ' ja '], - 'meridiem' => ['enne lõunat', 'pärast lõunat'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/et_EE.php b/vendor/nesbot/carbon/src/Carbon/Lang/et_EE.php deleted file mode 100644 index 0f112b3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/et_EE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/et.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/eu.php b/vendor/nesbot/carbon/src/Carbon/Lang/eu.php deleted file mode 100644 index a543f1a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/eu.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - JD Isaacks - */ -return [ - 'year' => 'urte bat|:count urte', - 'y' => 'Urte 1|:count urte', - 'month' => 'hilabete bat|:count hilabete', - 'm' => 'Hile 1|:count hile', - 'week' => 'Aste 1|:count aste', - 'w' => 'Aste 1|:count aste', - 'day' => 'egun bat|:count egun', - 'd' => 'Egun 1|:count egun', - 'hour' => 'ordu bat|:count ordu', - 'h' => 'Ordu 1|:count ordu', - 'minute' => 'minutu bat|:count minutu', - 'min' => 'Minutu 1|:count minutu', - 'second' => 'segundo batzuk|:count segundo', - 's' => 'Segundu 1|:count segundu', - 'ago' => 'duela :time', - 'from_now' => ':time barru', - 'after' => ':time geroago', - 'before' => ':time lehenago', - 'diff_now' => 'orain', - 'diff_today' => 'gaur', - 'diff_yesterday' => 'atzo', - 'diff_tomorrow' => 'bihar', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'YYYY[ko] MMMM[ren] D[a]', - 'LLL' => 'YYYY[ko] MMMM[ren] D[a] HH:mm', - 'LLLL' => 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[gaur] LT[etan]', - 'nextDay' => '[bihar] LT[etan]', - 'nextWeek' => 'dddd LT[etan]', - 'lastDay' => '[atzo] LT[etan]', - 'lastWeek' => '[aurreko] dddd LT[etan]', - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['urtarrila', 'otsaila', 'martxoa', 'apirila', 'maiatza', 'ekaina', 'uztaila', 'abuztua', 'iraila', 'urria', 'azaroa', 'abendua'], - 'months_short' => ['urt.', 'ots.', 'mar.', 'api.', 'mai.', 'eka.', 'uzt.', 'abu.', 'ira.', 'urr.', 'aza.', 'abe.'], - 'weekdays' => ['igandea', 'astelehena', 'asteartea', 'asteazkena', 'osteguna', 'ostirala', 'larunbata'], - 'weekdays_short' => ['ig.', 'al.', 'ar.', 'az.', 'og.', 'ol.', 'lr.'], - 'weekdays_min' => ['ig', 'al', 'ar', 'az', 'og', 'ol', 'lr'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' eta '], - 'meridiem' => ['g', 'a'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/eu_ES.php b/vendor/nesbot/carbon/src/Carbon/Lang/eu_ES.php deleted file mode 100644 index 0d1e82a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/eu_ES.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/eu.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ewo.php b/vendor/nesbot/carbon/src/Carbon/Lang/ewo.php deleted file mode 100644 index 7808ab5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ewo.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['kíkíríg', 'ngəgógəle'], - 'weekdays' => ['sɔ́ndɔ', 'mɔ́ndi', 'sɔ́ndɔ məlú mə́bɛ̌', 'sɔ́ndɔ məlú mə́lɛ́', 'sɔ́ndɔ məlú mə́nyi', 'fúladé', 'séradé'], - 'weekdays_short' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'fúl', 'sér'], - 'weekdays_min' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'fúl', 'sér'], - 'months' => ['ngɔn osú', 'ngɔn bɛ̌', 'ngɔn lála', 'ngɔn nyina', 'ngɔn tána', 'ngɔn saməna', 'ngɔn zamgbála', 'ngɔn mwom', 'ngɔn ebulú', 'ngɔn awóm', 'ngɔn awóm ai dziá', 'ngɔn awóm ai bɛ̌'], - 'months_short' => ['ngo', 'ngb', 'ngl', 'ngn', 'ngt', 'ngs', 'ngz', 'ngm', 'nge', 'nga', 'ngad', 'ngab'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - // Too unreliable - /* - 'year' => ':count mbu', // less reliable - 'y' => ':count mbu', // less reliable - 'a_year' => ':count mbu', // less reliable - - 'month' => ':count ngòn', // less reliable - 'm' => ':count ngòn', // less reliable - 'a_month' => ':count ngòn', // less reliable - - 'week' => ':count mësë', // less reliable - 'w' => ':count mësë', // less reliable - 'a_week' => ':count mësë', // less reliable - - 'day' => ':count mësë', // less reliable - 'd' => ':count mësë', // less reliable - 'a_day' => ':count mësë', // less reliable - - 'hour' => ':count awola', // less reliable - 'h' => ':count awola', // less reliable - 'a_hour' => ':count awola', // less reliable - - 'minute' => ':count awola', // less reliable - 'min' => ':count awola', // less reliable - 'a_minute' => ':count awola', // less reliable - */ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fa.php b/vendor/nesbot/carbon/src/Carbon/Lang/fa.php deleted file mode 100644 index 72e0308..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fa.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - Nasser Ghiasi - * - JD Isaacks - * - Hossein Jabbari - * - nimamo - * - hafezdivandari - * - Hassan Pezeshk (hpez) - */ -return [ - 'year' => ':count سال', - 'a_year' => 'یک سال'.'|:count '.'سال', - 'y' => ':count سال', - 'month' => ':count ماه', - 'a_month' => 'یک ماه'.'|:count '.'ماه', - 'm' => ':count ماه', - 'week' => ':count هفته', - 'a_week' => 'یک هفته'.'|:count '.'هفته', - 'w' => ':count هفته', - 'day' => ':count روز', - 'a_day' => 'یک روز'.'|:count '.'روز', - 'd' => ':count روز', - 'hour' => ':count ساعت', - 'a_hour' => 'یک ساعت'.'|:count '.'ساعت', - 'h' => ':count ساعت', - 'minute' => ':count دقیقه', - 'a_minute' => 'یک دقیقه'.'|:count '.'دقیقه', - 'min' => ':count دقیقه', - 'second' => ':count ثانیه', - 's' => ':count ثانیه', - 'ago' => ':time پیش', - 'from_now' => ':time دیگر', - 'after' => ':time پس از', - 'before' => ':time پیش از', - 'diff_now' => 'اکنون', - 'diff_today' => 'امروز', - 'diff_today_regexp' => 'امروز(?:\\s+ساعت)?', - 'diff_yesterday' => 'دیروز', - 'diff_yesterday_regexp' => 'دیروز(?:\\s+ساعت)?', - 'diff_tomorrow' => 'فردا', - 'diff_tomorrow_regexp' => 'فردا(?:\\s+ساعت)?', - 'formats' => [ - 'LT' => 'OH:Om', - 'LTS' => 'OH:Om:Os', - 'L' => 'OD/OM/OY', - 'LL' => 'OD MMMM OY', - 'LLL' => 'OD MMMM OY OH:Om', - 'LLLL' => 'dddd, OD MMMM OY OH:Om', - ], - 'calendar' => [ - 'sameDay' => '[امروز ساعت] LT', - 'nextDay' => '[فردا ساعت] LT', - 'nextWeek' => 'dddd [ساعت] LT', - 'lastDay' => '[دیروز ساعت] LT', - 'lastWeek' => 'dddd [پیش] [ساعت] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':timeم', - 'meridiem' => ['قبل از ظهر', 'بعد از ظهر'], - 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], - 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], - 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], - 'weekdays_short' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], - 'weekdays_min' => ['ی', 'د', 'س', 'چ', 'پ', 'ج', 'ش'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'list' => ['، ', ' و '], - 'alt_numbers' => ['۰۰', '۰۱', '۰۲', '۰۳', '۰۴', '۰۵', '۰۶', '۰۷', '۰۸', '۰۹', '۱۰', '۱۱', '۱۲', '۱۳', '۱۴', '۱۵', '۱۶', '۱۷', '۱۸', '۱۹', '۲۰', '۲۱', '۲۲', '۲۳', '۲۴', '۲۵', '۲۶', '۲۷', '۲۸', '۲۹', '۳۰', '۳۱', '۳۲', '۳۳', '۳۴', '۳۵', '۳۶', '۳۷', '۳۸', '۳۹', '۴۰', '۴۱', '۴۲', '۴۳', '۴۴', '۴۵', '۴۶', '۴۷', '۴۸', '۴۹', '۵۰', '۵۱', '۵۲', '۵۳', '۵۴', '۵۵', '۵۶', '۵۷', '۵۸', '۵۹', '۶۰', '۶۱', '۶۲', '۶۳', '۶۴', '۶۵', '۶۶', '۶۷', '۶۸', '۶۹', '۷۰', '۷۱', '۷۲', '۷۳', '۷۴', '۷۵', '۷۶', '۷۷', '۷۸', '۷۹', '۸۰', '۸۱', '۸۲', '۸۳', '۸۴', '۸۵', '۸۶', '۸۷', '۸۸', '۸۹', '۹۰', '۹۱', '۹۲', '۹۳', '۹۴', '۹۵', '۹۶', '۹۷', '۹۸', '۹۹'], - 'months_short_standalone' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], - 'weekend' => [5, 5], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fa_AF.php b/vendor/nesbot/carbon/src/Carbon/Lang/fa_AF.php deleted file mode 100644 index 6947100..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fa_AF.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fa.php', [ - 'meridiem' => ['ق', 'ب'], - 'weekend' => [4, 5], - 'formats' => [ - 'L' => 'OY/OM/OD', - 'LL' => 'OD MMM OY', - 'LLL' => 'OD MMMM OY،‏ H:mm', - 'LLLL' => 'dddd OD MMMM OY،‏ H:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fa_IR.php b/vendor/nesbot/carbon/src/Carbon/Lang/fa_IR.php deleted file mode 100644 index 08d0182..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fa_IR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fa.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ff.php b/vendor/nesbot/carbon/src/Carbon/Lang/ff.php deleted file mode 100644 index 9525c95..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ff.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'months' => ['siilo', 'colte', 'mbooy', 'seeɗto', 'duujal', 'korse', 'morso', 'juko', 'siilto', 'yarkomaa', 'jolal', 'bowte'], - 'months_short' => ['sii', 'col', 'mbo', 'see', 'duu', 'kor', 'mor', 'juk', 'slt', 'yar', 'jol', 'bow'], - 'weekdays' => ['dewo', 'aaɓnde', 'mawbaare', 'njeslaare', 'naasaande', 'mawnde', 'hoore-biir'], - 'weekdays_short' => ['dew', 'aaɓ', 'maw', 'nje', 'naa', 'mwd', 'hbi'], - 'weekdays_min' => ['dew', 'aaɓ', 'maw', 'nje', 'naa', 'mwd', 'hbi'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['subaka', 'kikiiɗe'], - - 'year' => ':count baret', // less reliable - 'y' => ':count baret', // less reliable - 'a_year' => ':count baret', // less reliable - - 'month' => ':count lewru', // less reliable - 'm' => ':count lewru', // less reliable - 'a_month' => ':count lewru', // less reliable - - 'week' => ':count naange', // less reliable - 'w' => ':count naange', // less reliable - 'a_week' => ':count naange', // less reliable - - 'day' => ':count dian', // less reliable - 'd' => ':count dian', // less reliable - 'a_day' => ':count dian', // less reliable - - 'hour' => ':count montor', // less reliable - 'h' => ':count montor', // less reliable - 'a_hour' => ':count montor', // less reliable - - 'minute' => ':count tokossuoum', // less reliable - 'min' => ':count tokossuoum', // less reliable - 'a_minute' => ':count tokossuoum', // less reliable - - 'second' => ':count tenen', // less reliable - 's' => ':count tenen', // less reliable - 'a_second' => ':count tenen', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ff_CM.php b/vendor/nesbot/carbon/src/Carbon/Lang/ff_CM.php deleted file mode 100644 index b797ac0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ff_CM.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ff.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ff_GN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ff_GN.php deleted file mode 100644 index b797ac0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ff_GN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ff.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ff_MR.php b/vendor/nesbot/carbon/src/Carbon/Lang/ff_MR.php deleted file mode 100644 index 2f4c29f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ff_MR.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ff.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ff_SN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ff_SN.php deleted file mode 100644 index 1e4c8b6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ff_SN.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Pular-Fulfulde.org Ibrahima Sarr admin@pulaar-fulfulde.org - */ -return require __DIR__.'/ff.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fi.php b/vendor/nesbot/carbon/src/Carbon/Lang/fi.php deleted file mode 100644 index edf2d6d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fi.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Janne Warén - * - digitalfrost - * - Tsutomu Kuroda - * - Roope Salmi - * - tjku - * - Max Melentiev - * - Sami Haahtinen - * - Teemu Leisti - * - Artem Ignatyev - * - Akira Matsuda - * - Christopher Dell - * - Enrique Vidal - * - Simone Carletti - * - Robert Bjarnason - * - Aaron Patterson - * - Nicolás Hock Isaza - * - Tom Hughes - * - Sven Fuchs - * - Petri Kivikangas - * - Nizar Jouini - * - Marko Seppae - * - Tomi Mynttinen (Pikseli) - * - Petteri (powergrip) - */ -return [ - 'year' => ':count vuosi|:count vuotta', - 'y' => ':count v', - 'month' => ':count kuukausi|:count kuukautta', - 'm' => ':count kk', - 'week' => ':count viikko|:count viikkoa', - 'w' => ':count vk', - 'day' => ':count päivä|:count päivää', - 'd' => ':count pv', - 'hour' => ':count tunti|:count tuntia', - 'h' => ':count t', - 'minute' => ':count minuutti|:count minuuttia', - 'min' => ':count min', - 'second' => ':count sekunti|:count sekuntia', - 'a_second' => 'muutama sekunti|:count sekuntia', - 's' => ':count s', - 'ago' => ':time sitten', - 'from_now' => ':time päästä', - 'year_from_now' => ':count vuoden', - 'month_from_now' => ':count kuukauden', - 'week_from_now' => ':count viikon', - 'day_from_now' => ':count päivän', - 'hour_from_now' => ':count tunnin', - 'minute_from_now' => ':count minuutin', - 'second_from_now' => ':count sekunnin', - 'after' => ':time sen jälkeen', - 'before' => ':time ennen', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' ja '], - 'diff_now' => 'nyt', - 'diff_yesterday' => 'eilen', - 'diff_tomorrow' => 'huomenna', - 'formats' => [ - 'LT' => 'HH.mm', - 'LTS' => 'HH.mm:ss', - 'L' => 'D.M.YYYY', - 'LL' => 'dddd D. MMMM[ta] YYYY', - 'll' => 'ddd D. MMM YYYY', - 'LLL' => 'D.MM. HH.mm', - 'LLLL' => 'D. MMMM[ta] YYYY HH.mm', - 'llll' => 'D. MMM YY HH.mm', - ], - 'weekdays' => ['sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai'], - 'weekdays_short' => ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'], - 'weekdays_min' => ['su', 'ma', 'ti', 'ke', 'to', 'pe', 'la'], - 'months' => ['tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu'], - 'months_short' => ['tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu'], - 'meridiem' => ['aamupäivä', 'iltapäivä'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fi_FI.php b/vendor/nesbot/carbon/src/Carbon/Lang/fi_FI.php deleted file mode 100644 index 920f1ca..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fi_FI.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fi.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fil.php b/vendor/nesbot/carbon/src/Carbon/Lang/fil.php deleted file mode 100644 index 61114e3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fil.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/fil_PH.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fil_PH.php b/vendor/nesbot/carbon/src/Carbon/Lang/fil_PH.php deleted file mode 100644 index bcf1580..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fil_PH.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Rene Torres Rene Torres, Pablo Saratxaga rgtorre@rocketmail.com, pablo@mandrakesoft.com - * - Jaycee Mariano (alohajaycee) - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'MM/DD/YY', - ], - 'months' => ['Enero', 'Pebrero', 'Marso', 'Abril', 'Mayo', 'Hunyo', 'Hulyo', 'Agosto', 'Setyembre', 'Oktubre', 'Nobyembre', 'Disyembre'], - 'months_short' => ['Ene', 'Peb', 'Mar', 'Abr', 'May', 'Hun', 'Hul', 'Ago', 'Set', 'Okt', 'Nob', 'Dis'], - 'weekdays' => ['Linggo', 'Lunes', 'Martes', 'Miyerkoles', 'Huwebes', 'Biyernes', 'Sabado'], - 'weekdays_short' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], - 'weekdays_min' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['N.U.', 'N.H.'], - - 'before' => ':time bago', - 'after' => ':time pagkatapos', - - 'year' => ':count taon', - 'y' => ':count taon', - 'a_year' => ':count taon', - - 'month' => ':count buwan', - 'm' => ':count buwan', - 'a_month' => ':count buwan', - - 'week' => ':count linggo', - 'w' => ':count linggo', - 'a_week' => ':count linggo', - - 'day' => ':count araw', - 'd' => ':count araw', - 'a_day' => ':count araw', - - 'hour' => ':count oras', - 'h' => ':count oras', - 'a_hour' => ':count oras', - - 'minute' => ':count minuto', - 'min' => ':count minuto', - 'a_minute' => ':count minuto', - - 'second' => ':count segundo', - 's' => ':count segundo', - 'a_second' => ':count segundo', - - 'ago' => ':time ang nakalipas', - 'from_now' => 'sa :time', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fo.php b/vendor/nesbot/carbon/src/Carbon/Lang/fo.php deleted file mode 100644 index 6a14a6f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fo.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kristian Sakarisson - * - François B - * - JD Isaacks - * - Sverri Mohr Olsen - */ -return [ - 'year' => 'eitt ár|:count ár', - 'y' => ':count ár|:count ár', - 'month' => 'ein mánaði|:count mánaðir', - 'm' => ':count mánaður|:count mánaðir', - 'week' => ':count vika|:count vikur', - 'w' => ':count vika|:count vikur', - 'day' => 'ein dagur|:count dagar', - 'd' => ':count dag|:count dagar', - 'hour' => 'ein tími|:count tímar', - 'h' => ':count tími|:count tímar', - 'minute' => 'ein minutt|:count minuttir', - 'min' => ':count minutt|:count minuttir', - 'second' => 'fá sekund|:count sekundir', - 's' => ':count sekund|:count sekundir', - 'ago' => ':time síðani', - 'from_now' => 'um :time', - 'after' => ':time aftaná', - 'before' => ':time áðrenn', - 'diff_today' => 'Í', - 'diff_yesterday' => 'Í', - 'diff_yesterday_regexp' => 'Í(?:\\s+gjár)?(?:\\s+kl.)?', - 'diff_tomorrow' => 'Í', - 'diff_tomorrow_regexp' => 'Í(?:\\s+morgin)?(?:\\s+kl.)?', - 'diff_today_regexp' => 'Í(?:\\s+dag)?(?:\\s+kl.)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D. MMMM, YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Í dag kl.] LT', - 'nextDay' => '[Í morgin kl.] LT', - 'nextWeek' => 'dddd [kl.] LT', - 'lastDay' => '[Í gjár kl.] LT', - 'lastWeek' => '[síðstu] dddd [kl] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['januar', 'februar', 'mars', 'apríl', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], - 'weekdays' => ['sunnudagur', 'mánadagur', 'týsdagur', 'mikudagur', 'hósdagur', 'fríggjadagur', 'leygardagur'], - 'weekdays_short' => ['sun', 'mán', 'týs', 'mik', 'hós', 'frí', 'ley'], - 'weekdays_min' => ['su', 'má', 'tý', 'mi', 'hó', 'fr', 'le'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' og '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fo_DK.php b/vendor/nesbot/carbon/src/Carbon/Lang/fo_DK.php deleted file mode 100644 index 657f2c5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fo_DK.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fo.php', [ - 'formats' => [ - 'L' => 'DD.MM.yy', - 'LL' => 'DD.MM.YYYY', - 'LLL' => 'D. MMMM YYYY, HH:mm', - 'LLLL' => 'dddd, D. MMMM YYYY, HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fo_FO.php b/vendor/nesbot/carbon/src/Carbon/Lang/fo_FO.php deleted file mode 100644 index 6d73616..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fo_FO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fo.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr.php deleted file mode 100644 index f4c7247..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Dieter Sting - * - François B - * - Maxime VALY - * - JD Isaacks - * - Dieter Sting - * - François B - * - JD Isaacks - * - Sebastian Thierer - * - Fastfuel - * - Pete Scopes (pdscopes) - */ -return [ - 'year' => ':count an|:count ans', - 'a_year' => 'un an|:count ans', - 'y' => ':count an|:count ans', - 'month' => ':count mois|:count mois', - 'a_month' => 'un mois|:count mois', - 'm' => ':count mois', - 'week' => ':count semaine|:count semaines', - 'a_week' => 'une semaine|:count semaines', - 'w' => ':count sem.', - 'day' => ':count jour|:count jours', - 'a_day' => 'un jour|:count jours', - 'd' => ':count j', - 'hour' => ':count heure|:count heures', - 'a_hour' => 'une heure|:count heures', - 'h' => ':count h', - 'minute' => ':count minute|:count minutes', - 'a_minute' => 'une minute|:count minutes', - 'min' => ':count min', - 'second' => ':count seconde|:count secondes', - 'a_second' => 'quelques secondes|:count secondes', - 's' => ':count s', - 'millisecond' => ':count milliseconde|:count millisecondes', - 'a_millisecond' => 'une milliseconde|:count millisecondes', - 'ms' => ':countms', - 'microsecond' => ':count microseconde|:count microsecondes', - 'a_microsecond' => 'une microseconde|:count microsecondes', - 'µs' => ':countµs', - 'ago' => 'il y a :time', - 'from_now' => 'dans :time', - 'after' => ':time après', - 'before' => ':time avant', - 'diff_now' => "à l'instant", - 'diff_today' => "aujourd'hui", - 'diff_today_regexp' => "aujourd'hui(?:\s+à)?", - 'diff_yesterday' => 'hier', - 'diff_yesterday_regexp' => 'hier(?:\s+à)?', - 'diff_tomorrow' => 'demain', - 'diff_tomorrow_regexp' => 'demain(?:\s+à)?', - 'diff_before_yesterday' => 'avant-hier', - 'diff_after_tomorrow' => 'après-demain', - 'period_recurrences' => ':count fois', - 'period_interval' => 'tous les :interval', - 'period_start_date' => 'de :date', - 'period_end_date' => 'à :date', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Aujourd’hui à] LT', - 'nextDay' => '[Demain à] LT', - 'nextWeek' => 'dddd [à] LT', - 'lastDay' => '[Hier à] LT', - 'lastWeek' => 'dddd [dernier à] LT', - 'sameElse' => 'L', - ], - 'months' => ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'], - 'months_short' => ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'], - 'weekdays' => ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'], - 'weekdays_short' => ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'], - 'weekdays_min' => ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'], - 'ordinal' => function ($number, $period) { - switch ($period) { - // In French, only the first has to be ordinal, other number remains cardinal - // @link https://fr.wikihow.com/%C3%A9crire-la-date-en-fran%C3%A7ais - case 'D': - return $number.($number === 1 ? 'er' : ''); - - default: - case 'M': - case 'Q': - case 'DDD': - case 'd': - return $number.($number === 1 ? 'er' : 'e'); - - // Words with feminine grammatical gender: semaine - case 'w': - case 'W': - return $number.($number === 1 ? 're' : 'e'); - } - }, - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' et '], - 'ordinal_words' => [ - 'of' => 'de', - 'first' => 'premier', - 'second' => 'deuxième', - 'third' => 'troisième', - 'fourth' => 'quatrième', - 'fifth' => 'cinquième', - 'last' => 'dernier', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BE.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_BE.php deleted file mode 100644 index f6cafe8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BE.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'months_short' => ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jui', 'aoû', 'sep', 'oct', 'nov', 'déc'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BF.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_BF.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BF.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BI.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_BI.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BI.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_BJ.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BJ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BL.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_BL.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_BL.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CA.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_CA.php deleted file mode 100644 index c9f6346..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CA.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Dieter Sting - * - François B - * - Maxime VALY - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-DD', - ], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CD.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_CD.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CD.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CF.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_CF.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CF.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CG.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_CG.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CH.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_CH.php deleted file mode 100644 index 8674c27..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CH.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Dieter Sting - * - François B - * - Gaspard Bucher - * - Maxime VALY - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CI.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_CI.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CI.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CM.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_CM.php deleted file mode 100644 index 67d3787..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_CM.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'meridiem' => ['mat.', 'soir'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_DJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_DJ.php deleted file mode 100644 index 2f06086..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_DJ.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'first_day_of_week' => 6, - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_DZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_DZ.php deleted file mode 100644 index ae8db5f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_DZ.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'first_day_of_week' => 6, - 'weekend' => [5, 6], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_FR.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_FR.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_FR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GA.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_GA.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GA.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GF.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_GF.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GF.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GN.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_GN.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GP.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_GP.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GP.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GQ.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_GQ.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_GQ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_HT.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_HT.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_HT.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_KM.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_KM.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_KM.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_LU.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_LU.php deleted file mode 100644 index 8e37d85..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_LU.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months_short' => ['jan', 'fév', 'mar', 'avr', 'mai', 'jun', 'jui', 'aoû', 'sep', 'oct', 'nov', 'déc'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MA.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_MA.php deleted file mode 100644 index 1bf034d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MA.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'first_day_of_week' => 6, - 'weekend' => [5, 6], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MC.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_MC.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MC.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MF.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_MF.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MF.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MG.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_MG.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_ML.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_ML.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_ML.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MQ.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_MQ.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MQ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MR.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_MR.php deleted file mode 100644 index 37cf83f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MR.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MU.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_MU.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_MU.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_NC.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_NC.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_NC.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_NE.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_NE.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_NE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_PF.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_PF.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_PF.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_PM.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_PM.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_PM.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_RE.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_RE.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_RE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_RW.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_RW.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_RW.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_SC.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_SC.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_SC.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_SN.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_SN.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_SN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_SY.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_SY.php deleted file mode 100644 index ae8db5f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_SY.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'first_day_of_week' => 6, - 'weekend' => [5, 6], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_TD.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_TD.php deleted file mode 100644 index 37cf83f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_TD.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_TG.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_TG.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_TG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_TN.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_TN.php deleted file mode 100644 index 6905e7a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_TN.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'weekend' => [5, 6], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_VU.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_VU.php deleted file mode 100644 index 37cf83f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_VU.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fr.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_WF.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_WF.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_WF.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr_YT.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr_YT.php deleted file mode 100644 index ec3ee35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr_YT.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/fr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fur.php b/vendor/nesbot/carbon/src/Carbon/Lang/fur.php deleted file mode 100644 index 36c2564..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fur.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/fur_IT.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fur_IT.php b/vendor/nesbot/carbon/src/Carbon/Lang/fur_IT.php deleted file mode 100644 index 0147a59..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fur_IT.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Pablo Saratxaga pablo@mandrakesoft.com - */ -return [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD. MM. YY', - 'LL' => 'DD di MMMM dal YYYY', - 'LLL' => 'DD di MMM HH:mm', - 'LLLL' => 'DD di MMMM dal YYYY HH:mm', - ], - 'months' => ['zenâr', 'fevrâr', 'març', 'avrîl', 'mai', 'jugn', 'lui', 'avost', 'setembar', 'otubar', 'novembar', 'dicembar'], - 'months_short' => ['zen', 'fev', 'mar', 'avr', 'mai', 'jug', 'lui', 'avo', 'set', 'otu', 'nov', 'dic'], - 'weekdays' => ['domenie', 'lunis', 'martars', 'miercus', 'joibe', 'vinars', 'sabide'], - 'weekdays_short' => ['dom', 'lun', 'mar', 'mie', 'joi', 'vin', 'sab'], - 'weekdays_min' => ['dom', 'lun', 'mar', 'mie', 'joi', 'vin', 'sab'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'year' => ':count an', - 'month' => ':count mês', - 'week' => ':count setemane', - 'day' => ':count zornade', - 'hour' => ':count ore', - 'minute' => ':count minût', - 'second' => ':count secont', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fy.php b/vendor/nesbot/carbon/src/Carbon/Lang/fy.php deleted file mode 100644 index c1b5439..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fy.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Tim Fish - * - JD Isaacks - */ -return [ - 'year' => ':count jier|:count jierren', - 'a_year' => 'ien jier|:count jierren', - 'y' => ':count j', - 'month' => ':count moanne|:count moannen', - 'a_month' => 'ien moanne|:count moannen', - 'm' => ':count moa.', - 'week' => ':count wike|:count wiken', - 'a_week' => 'in wike|:count wiken', - 'a' => ':count w.', - 'day' => ':count dei|:count dagen', - 'a_day' => 'ien dei|:count dagen', - 'd' => ':count d.', - 'hour' => ':count oere|:count oeren', - 'a_hour' => 'ien oere|:count oeren', - 'h' => ':count o.', - 'minute' => ':count minút|:count minuten', - 'a_minute' => 'ien minút|:count minuten', - 'min' => ':count min.', - 'second' => ':count sekonde|:count sekonden', - 'a_second' => 'in pear sekonden|:count sekonden', - 's' => ':count s.', - 'ago' => ':time lyn', - 'from_now' => 'oer :time', - 'diff_yesterday' => 'juster', - 'diff_yesterday_regexp' => 'juster(?:\\s+om)?', - 'diff_today' => 'hjoed', - 'diff_today_regexp' => 'hjoed(?:\\s+om)?', - 'diff_tomorrow' => 'moarn', - 'diff_tomorrow_regexp' => 'moarn(?:\\s+om)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD-MM-YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[hjoed om] LT', - 'nextDay' => '[moarn om] LT', - 'nextWeek' => 'dddd [om] LT', - 'lastDay' => '[juster om] LT', - 'lastWeek' => '[ôfrûne] dddd [om] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); - }, - 'months' => ['jannewaris', 'febrewaris', 'maart', 'april', 'maaie', 'juny', 'july', 'augustus', 'septimber', 'oktober', 'novimber', 'desimber'], - 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], - 'mmm_suffix' => '.', - 'weekdays' => ['snein', 'moandei', 'tiisdei', 'woansdei', 'tongersdei', 'freed', 'sneon'], - 'weekdays_short' => ['si.', 'mo.', 'ti.', 'wo.', 'to.', 'fr.', 'so.'], - 'weekdays_min' => ['Si', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'So'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' en '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fy_DE.php b/vendor/nesbot/carbon/src/Carbon/Lang/fy_DE.php deleted file mode 100644 index 8559d5c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fy_DE.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandriva.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Jaunuwoa', 'Februwoa', 'Moaz', 'Aprell', 'Mai', 'Juni', 'Juli', 'August', 'Septamba', 'Oktoba', 'Nowamba', 'Dezamba'], - 'months_short' => ['Jan', 'Feb', 'Moz', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Now', 'Dez'], - 'weekdays' => ['Sinndag', 'Mondag', 'Dingsdag', 'Meddwäakj', 'Donnadag', 'Friedag', 'Sinnowend'], - 'weekdays_short' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], - 'weekdays_min' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fy_NL.php b/vendor/nesbot/carbon/src/Carbon/Lang/fy_NL.php deleted file mode 100644 index 01cc96c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fy_NL.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/fy.php', [ - 'formats' => [ - 'L' => 'DD-MM-YY', - ], - 'months' => ['Jannewaris', 'Febrewaris', 'Maart', 'April', 'Maaie', 'Juny', 'July', 'Augustus', 'Septimber', 'Oktober', 'Novimber', 'Desimber'], - 'months_short' => ['Jan', 'Feb', 'Mrt', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'], - 'weekdays' => ['Snein', 'Moandei', 'Tiisdei', 'Woansdei', 'Tongersdei', 'Freed', 'Sneon'], - 'weekdays_short' => ['Sn', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'Sn'], - 'weekdays_min' => ['Sn', 'Mo', 'Ti', 'Wo', 'To', 'Fr', 'Sn'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ga.php b/vendor/nesbot/carbon/src/Carbon/Lang/ga.php deleted file mode 100644 index 9f07a26..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ga.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Thanks to André Silva : https://github.com/askpt - */ - -return [ - 'year' => ':count bliain', - 'a_year' => '{1}bliain|:count bliain', - 'y' => ':countb', - 'month' => ':count mí', - 'a_month' => '{1}mí|:count mí', - 'm' => ':countm', - 'week' => ':count sheachtain', - 'a_week' => '{1}sheachtain|:count sheachtain', - 'w' => ':countsh', - 'day' => ':count lá', - 'a_day' => '{1}lá|:count lá', - 'd' => ':countl', - 'hour' => ':count uair an chloig', - 'a_hour' => '{1}uair an chloig|:count uair an chloig', - 'h' => ':countu', - 'minute' => ':count nóiméad', - 'a_minute' => '{1}nóiméad|:count nóiméad', - 'min' => ':countn', - 'second' => ':count soicind', - 'a_second' => '{1}cúpla soicind|:count soicind', - 's' => ':countso', - 'ago' => ':time ó shin', - 'from_now' => 'i :time', - 'after' => ':time tar éis', - 'before' => ':time roimh', - 'diff_now' => 'anois', - 'diff_today' => 'Inniu', - 'diff_today_regexp' => 'Inniu(?:\\s+ag)?', - 'diff_yesterday' => 'inné', - 'diff_yesterday_regexp' => 'Inné(?:\\s+aig)?', - 'diff_tomorrow' => 'amárach', - 'diff_tomorrow_regexp' => 'Amárach(?:\\s+ag)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Inniu ag] LT', - 'nextDay' => '[Amárach ag] LT', - 'nextWeek' => 'dddd [ag] LT', - 'lastDay' => '[Inné aig] LT', - 'lastWeek' => 'dddd [seo caite] [ag] LT', - 'sameElse' => 'L', - ], - 'months' => ['Eanáir', 'Feabhra', 'Márta', 'Aibreán', 'Bealtaine', 'Méitheamh', 'Iúil', 'Lúnasa', 'Meán Fómhair', 'Deaireadh Fómhair', 'Samhain', 'Nollaig'], - 'months_short' => ['Eaná', 'Feab', 'Márt', 'Aibr', 'Beal', 'Méit', 'Iúil', 'Lúna', 'Meán', 'Deai', 'Samh', 'Noll'], - 'weekdays' => ['Dé Domhnaigh', 'Dé Luain', 'Dé Máirt', 'Dé Céadaoin', 'Déardaoin', 'Dé hAoine', 'Dé Satharn'], - 'weekdays_short' => ['Dom', 'Lua', 'Mái', 'Céa', 'Déa', 'hAo', 'Sat'], - 'weekdays_min' => ['Do', 'Lu', 'Má', 'Ce', 'Dé', 'hA', 'Sa'], - 'ordinal' => function ($number) { - return $number.($number === 1 ? 'd' : ($number % 10 === 2 ? 'na' : 'mh')); - }, - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' agus '], - 'meridiem' => ['r.n.', 'i.n.'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ga_IE.php b/vendor/nesbot/carbon/src/Carbon/Lang/ga_IE.php deleted file mode 100644 index 57b0c4f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ga_IE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ga.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gd.php b/vendor/nesbot/carbon/src/Carbon/Lang/gd.php deleted file mode 100644 index 63d064d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gd.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Jon Ashdown - */ -return [ - 'year' => ':count bliadhna', - 'a_year' => '{1}bliadhna|:count bliadhna', - 'y' => ':count b.', - 'month' => ':count mìosan', - 'a_month' => '{1}mìos|:count mìosan', - 'm' => ':count ms.', - 'week' => ':count seachdainean', - 'a_week' => '{1}seachdain|:count seachdainean', - 'w' => ':count s.', - 'day' => ':count latha', - 'a_day' => '{1}latha|:count latha', - 'd' => ':count l.', - 'hour' => ':count uairean', - 'a_hour' => '{1}uair|:count uairean', - 'h' => ':count u.', - 'minute' => ':count mionaidean', - 'a_minute' => '{1}mionaid|:count mionaidean', - 'min' => ':count md.', - 'second' => ':count diogan', - 'a_second' => '{1}beagan diogan|:count diogan', - 's' => ':count d.', - 'ago' => 'bho chionn :time', - 'from_now' => 'ann an :time', - 'diff_yesterday' => 'An-dè', - 'diff_yesterday_regexp' => 'An-dè(?:\\s+aig)?', - 'diff_today' => 'An-diugh', - 'diff_today_regexp' => 'An-diugh(?:\\s+aig)?', - 'diff_tomorrow' => 'A-màireach', - 'diff_tomorrow_regexp' => 'A-màireach(?:\\s+aig)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[An-diugh aig] LT', - 'nextDay' => '[A-màireach aig] LT', - 'nextWeek' => 'dddd [aig] LT', - 'lastDay' => '[An-dè aig] LT', - 'lastWeek' => 'dddd [seo chaidh] [aig] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - return $number.($number === 1 ? 'd' : ($number % 10 === 2 ? 'na' : 'mh')); - }, - 'months' => ['Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'], - 'months_short' => ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'], - 'weekdays' => ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'], - 'weekdays_short' => ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], - 'weekdays_min' => ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' agus '], - 'meridiem' => ['m', 'f'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gd_GB.php b/vendor/nesbot/carbon/src/Carbon/Lang/gd_GB.php deleted file mode 100644 index 4fc26b3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gd_GB.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/gd.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gez.php b/vendor/nesbot/carbon/src/Carbon/Lang/gez.php deleted file mode 100644 index b8a2f0e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gez.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/gez_ER.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gez_ER.php b/vendor/nesbot/carbon/src/Carbon/Lang/gez_ER.php deleted file mode 100644 index f19d1df..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gez_ER.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['ጠሐረ', 'ከተተ', 'መገበ', 'አኀዘ', 'ግንባት', 'ሠንየ', 'ሐመለ', 'ነሐሰ', 'ከረመ', 'ጠቀመ', 'ኀደረ', 'ኀሠሠ'], - 'months_short' => ['ጠሐረ', 'ከተተ', 'መገበ', 'አኀዘ', 'ግንባ', 'ሠንየ', 'ሐመለ', 'ነሐሰ', 'ከረመ', 'ጠቀመ', 'ኀደረ', 'ኀሠሠ'], - 'weekdays' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚት'], - 'weekdays_short' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], - 'weekdays_min' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ጽባሕ', 'ምሴት'], - - 'month' => ':count ወርሕ', // less reliable - 'm' => ':count ወርሕ', // less reliable - 'a_month' => ':count ወርሕ', // less reliable - - 'week' => ':count ሰብዑ', // less reliable - 'w' => ':count ሰብዑ', // less reliable - 'a_week' => ':count ሰብዑ', // less reliable - - 'hour' => ':count አንትሙ', // less reliable - 'h' => ':count አንትሙ', // less reliable - 'a_hour' => ':count አንትሙ', // less reliable - - 'minute' => ':count ንኡስ', // less reliable - 'min' => ':count ንኡስ', // less reliable - 'a_minute' => ':count ንኡስ', // less reliable - - 'year' => ':count ዓመት', - 'y' => ':count ዓመት', - 'a_year' => ':count ዓመት', - - 'day' => ':count ዕለት', - 'd' => ':count ዕለት', - 'a_day' => ':count ዕለት', - - 'second' => ':count ካልእ', - 's' => ':count ካልእ', - 'a_second' => ':count ካልእ', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gez_ET.php b/vendor/nesbot/carbon/src/Carbon/Lang/gez_ET.php deleted file mode 100644 index 3933009..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gez_ET.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], - 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], - 'weekdays' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚት'], - 'weekdays_short' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], - 'weekdays_min' => ['እኁድ', 'ሰኑይ', 'ሠሉስ', 'ራብዕ', 'ሐሙስ', 'ዓርበ', 'ቀዳሚ'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ጽባሕ', 'ምሴት'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gl.php b/vendor/nesbot/carbon/src/Carbon/Lang/gl.php deleted file mode 100644 index 088b0f2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gl.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Fidel Pita - * - JD Isaacks - * - Diego Vilariño - * - Sebastian Thierer - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count ano|:count anos', - 'a_year' => 'un ano|:count anos', - 'y' => ':count a.', - 'month' => ':count mes|:count meses', - 'a_month' => 'un mes|:count meses', - 'm' => ':count mes.', - 'week' => ':count semana|:count semanas', - 'a_week' => 'unha semana|:count semanas', - 'w' => ':count sem.', - 'day' => ':count día|:count días', - 'a_day' => 'un día|:count días', - 'd' => ':count d.', - 'hour' => ':count hora|:count horas', - 'a_hour' => 'unha hora|:count horas', - 'h' => ':count h.', - 'minute' => ':count minuto|:count minutos', - 'a_minute' => 'un minuto|:count minutos', - 'min' => ':count min.', - 'second' => ':count segundo|:count segundos', - 'a_second' => 'uns segundos|:count segundos', - 's' => ':count seg.', - 'ago' => 'hai :time', - 'from_now' => function ($time) { - if (str_starts_with($time, 'un')) { - return "n$time"; - } - - return "en $time"; - }, - 'diff_now' => 'agora', - 'diff_today' => 'hoxe', - 'diff_today_regexp' => 'hoxe(?:\\s+ás)?', - 'diff_yesterday' => 'onte', - 'diff_yesterday_regexp' => 'onte(?:\\s+á)?', - 'diff_tomorrow' => 'mañá', - 'diff_tomorrow_regexp' => 'mañá(?:\\s+ás)?', - 'after' => ':time despois', - 'before' => ':time antes', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D [de] MMMM [de] YYYY', - 'LLL' => 'D [de] MMMM [de] YYYY H:mm', - 'LLLL' => 'dddd, D [de] MMMM [de] YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => function (CarbonInterface $current) { - return '[hoxe '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; - }, - 'nextDay' => function (CarbonInterface $current) { - return '[mañá '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; - }, - 'nextWeek' => function (CarbonInterface $current) { - return 'dddd ['.($current->hour !== 1 ? 'ás' : 'á').'] LT'; - }, - 'lastDay' => function (CarbonInterface $current) { - return '[onte '.($current->hour !== 1 ? 'á' : 'a').'] LT'; - }, - 'lastWeek' => function (CarbonInterface $current) { - return '[o] dddd [pasado '.($current->hour !== 1 ? 'ás' : 'á').'] LT'; - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':numberº', - 'months' => ['xaneiro', 'febreiro', 'marzo', 'abril', 'maio', 'xuño', 'xullo', 'agosto', 'setembro', 'outubro', 'novembro', 'decembro'], - 'months_short' => ['xan.', 'feb.', 'mar.', 'abr.', 'mai.', 'xuñ.', 'xul.', 'ago.', 'set.', 'out.', 'nov.', 'dec.'], - 'weekdays' => ['domingo', 'luns', 'martes', 'mércores', 'xoves', 'venres', 'sábado'], - 'weekdays_short' => ['dom.', 'lun.', 'mar.', 'mér.', 'xov.', 'ven.', 'sáb.'], - 'weekdays_min' => ['do', 'lu', 'ma', 'mé', 'xo', 've', 'sá'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' e '], - 'meridiem' => ['a.m.', 'p.m.'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gl_ES.php b/vendor/nesbot/carbon/src/Carbon/Lang/gl_ES.php deleted file mode 100644 index 9d6c1d9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gl_ES.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/gl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gom.php b/vendor/nesbot/carbon/src/Carbon/Lang/gom.php deleted file mode 100644 index 2a0584f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gom.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/gom_Latn.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gom_Latn.php b/vendor/nesbot/carbon/src/Carbon/Lang/gom_Latn.php deleted file mode 100644 index 612bb88..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gom_Latn.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return [ - 'year' => ':count voros|:count vorsam', - 'y' => ':countv', - 'month' => ':count mhoino|:count mhoine', - 'm' => ':countmh', - 'week' => ':count satolleacho|:count satolleache', - 'w' => ':countsa|:countsa', - 'day' => ':count dis', - 'd' => ':countd', - 'hour' => ':count hor|:count horam', - 'h' => ':counth', - 'minute' => ':count minute|:count mintam', - 'min' => ':countm', - 'second' => ':count second', - 's' => ':counts', - - 'diff_today' => 'Aiz', - 'diff_yesterday' => 'Kal', - 'diff_tomorrow' => 'Faleam', - 'formats' => [ - 'LT' => 'A h:mm [vazta]', - 'LTS' => 'A h:mm:ss [vazta]', - 'L' => 'DD-MM-YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY A h:mm [vazta]', - 'LLLL' => 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', - 'llll' => 'ddd, D MMM YYYY, A h:mm [vazta]', - ], - - 'calendar' => [ - 'sameDay' => '[Aiz] LT', - 'nextDay' => '[Faleam] LT', - 'nextWeek' => '[Ieta to] dddd[,] LT', - 'lastDay' => '[Kal] LT', - 'lastWeek' => '[Fatlo] dddd[,] LT', - 'sameElse' => 'L', - ], - - 'months' => ['Janer', 'Febrer', 'Mars', 'Abril', 'Mai', 'Jun', 'Julai', 'Agost', 'Setembr', 'Otubr', 'Novembr', 'Dezembr'], - 'months_short' => ['Jan.', 'Feb.', 'Mars', 'Abr.', 'Mai', 'Jun', 'Jul.', 'Ago.', 'Set.', 'Otu.', 'Nov.', 'Dez.'], - 'weekdays' => ['Aitar', 'Somar', 'Mongllar', 'Budvar', 'Brestar', 'Sukrar', 'Son\'var'], - 'weekdays_short' => ['Ait.', 'Som.', 'Mon.', 'Bud.', 'Bre.', 'Suk.', 'Son.'], - 'weekdays_min' => ['Ai', 'Sm', 'Mo', 'Bu', 'Br', 'Su', 'Sn'], - - 'ordinal' => function ($number, $period) { - return $number.($period === 'D' ? 'er' : ''); - }, - - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'rati'; - } - if ($hour < 12) { - return 'sokalli'; - } - if ($hour < 16) { - return 'donparam'; - } - if ($hour < 20) { - return 'sanje'; - } - - return 'rati'; - }, - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' ani '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gsw.php b/vendor/nesbot/carbon/src/Carbon/Lang/gsw.php deleted file mode 100644 index c5c850e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gsw.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Christopher Dell - * - Akira Matsuda - * - Enrique Vidal - * - Simone Carletti - * - Henning Kiel - * - Aaron Patterson - * - Florian Hanke - */ -return [ - 'year' => ':count Johr', - 'month' => ':count Monet', - 'week' => ':count Woche', - 'day' => ':count Tag', - 'hour' => ':count Schtund', - 'minute' => ':count Minute', - 'second' => ':count Sekunde', - 'weekdays' => ['Sunntig', 'Mäntig', 'Ziischtig', 'Mittwuch', 'Dunschtig', 'Friitig', 'Samschtig'], - 'weekdays_short' => ['Su', 'Mä', 'Zi', 'Mi', 'Du', 'Fr', 'Sa'], - 'weekdays_min' => ['Su', 'Mä', 'Zi', 'Mi', 'Du', 'Fr', 'Sa'], - 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'September', 'Oktober', 'November', 'Dezember'], - 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], - 'meridiem' => ['am Vormittag', 'am Namittag'], - 'ordinal' => ':number.', - 'list' => [', ', ' und '], - 'diff_now' => 'now', - 'diff_yesterday' => 'geschter', - 'diff_tomorrow' => 'moorn', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'Do MMMM YYYY', - 'LLL' => 'Do MMMM, HH:mm [Uhr]', - 'LLLL' => 'dddd, Do MMMM YYYY, HH:mm [Uhr]', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gsw_CH.php b/vendor/nesbot/carbon/src/Carbon/Lang/gsw_CH.php deleted file mode 100644 index 594eb25..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gsw_CH.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/gsw.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gsw_FR.php b/vendor/nesbot/carbon/src/Carbon/Lang/gsw_FR.php deleted file mode 100644 index 3581dcf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gsw_FR.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/gsw.php', [ - 'meridiem' => ['vorm.', 'nam.'], - 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'Septämber', 'Oktoober', 'Novämber', 'Dezämber'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LLL' => 'Do MMMM YYYY HH:mm', - 'LLLL' => 'dddd, Do MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gsw_LI.php b/vendor/nesbot/carbon/src/Carbon/Lang/gsw_LI.php deleted file mode 100644 index 3581dcf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gsw_LI.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/gsw.php', [ - 'meridiem' => ['vorm.', 'nam.'], - 'months' => ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Auguscht', 'Septämber', 'Oktoober', 'Novämber', 'Dezämber'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LLL' => 'Do MMMM YYYY HH:mm', - 'LLLL' => 'dddd, Do MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gu.php b/vendor/nesbot/carbon/src/Carbon/Lang/gu.php deleted file mode 100644 index 8bc4311..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gu.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - Kaushik Thanki - * - Josh Soref - */ -return [ - 'year' => 'એક વર્ષ|:count વર્ષ', - 'y' => ':countવર્ષ|:countવર્ષો', - 'month' => 'એક મહિનો|:count મહિના', - 'm' => ':countમહિનો|:countમહિના', - 'week' => ':count અઠવાડિયું|:count અઠવાડિયા', - 'w' => ':countઅઠ.|:countઅઠ.', - 'day' => 'એક દિવસ|:count દિવસ', - 'd' => ':countદિ.|:countદિ.', - 'hour' => 'એક કલાક|:count કલાક', - 'h' => ':countક.|:countક.', - 'minute' => 'એક મિનિટ|:count મિનિટ', - 'min' => ':countમિ.|:countમિ.', - 'second' => 'અમુક પળો|:count સેકંડ', - 's' => ':countસે.|:countસે.', - 'ago' => ':time પેહલા', - 'from_now' => ':time મા', - 'after' => ':time પછી', - 'before' => ':time પહેલા', - 'diff_now' => 'હમણાં', - 'diff_today' => 'આજ', - 'diff_yesterday' => 'ગઇકાલે', - 'diff_tomorrow' => 'કાલે', - 'formats' => [ - 'LT' => 'A h:mm વાગ્યે', - 'LTS' => 'A h:mm:ss વાગ્યે', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, A h:mm વાગ્યે', - 'LLLL' => 'dddd, D MMMM YYYY, A h:mm વાગ્યે', - ], - 'calendar' => [ - 'sameDay' => '[આજ] LT', - 'nextDay' => '[કાલે] LT', - 'nextWeek' => 'dddd, LT', - 'lastDay' => '[ગઇકાલે] LT', - 'lastWeek' => '[પાછલા] dddd, LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'રાત'; - } - if ($hour < 10) { - return 'સવાર'; - } - if ($hour < 17) { - return 'બપોર'; - } - if ($hour < 20) { - return 'સાંજ'; - } - - return 'રાત'; - }, - 'months' => ['જાન્યુઆરી', 'ફેબ્રુઆરી', 'માર્ચ', 'એપ્રિલ', 'મે', 'જૂન', 'જુલાઈ', 'ઑગસ્ટ', 'સપ્ટેમ્બર', 'ઑક્ટ્બર', 'નવેમ્બર', 'ડિસેમ્બર'], - 'months_short' => ['જાન્યુ.', 'ફેબ્રુ.', 'માર્ચ', 'એપ્રિ.', 'મે', 'જૂન', 'જુલા.', 'ઑગ.', 'સપ્ટે.', 'ઑક્ટ્.', 'નવે.', 'ડિસે.'], - 'weekdays' => ['રવિવાર', 'સોમવાર', 'મંગળવાર', 'બુધ્વાર', 'ગુરુવાર', 'શુક્રવાર', 'શનિવાર'], - 'weekdays_short' => ['રવિ', 'સોમ', 'મંગળ', 'બુધ્', 'ગુરુ', 'શુક્ર', 'શનિ'], - 'weekdays_min' => ['ર', 'સો', 'મં', 'બુ', 'ગુ', 'શુ', 'શ'], - 'list' => [', ', ' અને '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'weekend' => [0, 0], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gu_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/gu_IN.php deleted file mode 100644 index 02654b1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gu_IN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/gu.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/guz.php b/vendor/nesbot/carbon/src/Carbon/Lang/guz.php deleted file mode 100644 index 6230165..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/guz.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Ma', 'Mo'], - 'weekdays' => ['Chumapiri', 'Chumatato', 'Chumaine', 'Chumatano', 'Aramisi', 'Ichuma', 'Esabato'], - 'weekdays_short' => ['Cpr', 'Ctt', 'Cmn', 'Cmt', 'Ars', 'Icm', 'Est'], - 'weekdays_min' => ['Cpr', 'Ctt', 'Cmn', 'Cmt', 'Ars', 'Icm', 'Est'], - 'months' => ['Chanuari', 'Feburari', 'Machi', 'Apiriri', 'Mei', 'Juni', 'Chulai', 'Agosti', 'Septemba', 'Okitoba', 'Nobemba', 'Disemba'], - 'months_short' => ['Can', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Cul', 'Agt', 'Sep', 'Okt', 'Nob', 'Dis'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - 'month' => ':count omotunyi', // less reliable - 'm' => ':count omotunyi', // less reliable - 'a_month' => ':count omotunyi', // less reliable - - 'week' => ':count isano naibere', // less reliable - 'w' => ':count isano naibere', // less reliable - 'a_week' => ':count isano naibere', // less reliable - - 'second' => ':count ibere', // less reliable - 's' => ':count ibere', // less reliable - 'a_second' => ':count ibere', // less reliable - - 'year' => ':count omwaka', - 'y' => ':count omwaka', - 'a_year' => ':count omwaka', - - 'day' => ':count rituko', - 'd' => ':count rituko', - 'a_day' => ':count rituko', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gv.php b/vendor/nesbot/carbon/src/Carbon/Lang/gv.php deleted file mode 100644 index 7c52b94..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gv.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/gv_GB.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/gv_GB.php b/vendor/nesbot/carbon/src/Carbon/Lang/gv_GB.php deleted file mode 100644 index 6b1168f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/gv_GB.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Alastair McKinstry bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Jerrey-geuree', 'Toshiaght-arree', 'Mayrnt', 'Averil', 'Boaldyn', 'Mean-souree', 'Jerrey-souree', 'Luanistyn', 'Mean-fouyir', 'Jerrey-fouyir', 'Mee Houney', 'Mee ny Nollick'], - 'months_short' => ['J-guer', 'T-arree', 'Mayrnt', 'Avrril', 'Boaldyn', 'M-souree', 'J-souree', 'Luanistyn', 'M-fouyir', 'J-fouyir', 'M.Houney', 'M.Nollick'], - 'weekdays' => ['Jedoonee', 'Jelhein', 'Jemayrt', 'Jercean', 'Jerdein', 'Jeheiney', 'Jesarn'], - 'weekdays_short' => ['Jed', 'Jel', 'Jem', 'Jerc', 'Jerd', 'Jeh', 'Jes'], - 'weekdays_min' => ['Jed', 'Jel', 'Jem', 'Jerc', 'Jerd', 'Jeh', 'Jes'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count blein', - 'y' => ':count blein', - 'a_year' => ':count blein', - - 'month' => ':count mee', - 'm' => ':count mee', - 'a_month' => ':count mee', - - 'week' => ':count shiaghtin', - 'w' => ':count shiaghtin', - 'a_week' => ':count shiaghtin', - - 'day' => ':count laa', - 'd' => ':count laa', - 'a_day' => ':count laa', - - 'hour' => ':count oor', - 'h' => ':count oor', - 'a_hour' => ':count oor', - - 'minute' => ':count feer veg', - 'min' => ':count feer veg', - 'a_minute' => ':count feer veg', - - 'second' => ':count derrey', - 's' => ':count derrey', - 'a_second' => ':count derrey', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ha.php b/vendor/nesbot/carbon/src/Carbon/Lang/ha.php deleted file mode 100644 index cd8e34d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ha.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - pablo@mandriva.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM, YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM, YYYY HH:mm', - ], - 'months' => ['Janairu', 'Faburairu', 'Maris', 'Afirilu', 'Mayu', 'Yuni', 'Yuli', 'Agusta', 'Satumba', 'Oktoba', 'Nuwamba', 'Disamba'], - 'months_short' => ['Jan', 'Fab', 'Mar', 'Afi', 'May', 'Yun', 'Yul', 'Agu', 'Sat', 'Okt', 'Nuw', 'Dis'], - 'weekdays' => ['Lahadi', 'Litini', 'Talata', 'Laraba', 'Alhamis', 'Jumaʼa', 'Asabar'], - 'weekdays_short' => ['Lah', 'Lit', 'Tal', 'Lar', 'Alh', 'Jum', 'Asa'], - 'weekdays_min' => ['Lh', 'Li', 'Ta', 'Lr', 'Al', 'Ju', 'As'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => 'shekara :count', - 'y' => 'shekara :count', - 'a_year' => 'shekara :count', - - 'month' => ':count wátàa', - 'm' => ':count wátàa', - 'a_month' => ':count wátàa', - - 'week' => ':count mako', - 'w' => ':count mako', - 'a_week' => ':count mako', - - 'day' => ':count rana', - 'd' => ':count rana', - 'a_day' => ':count rana', - - 'hour' => ':count áwàa', - 'h' => ':count áwàa', - 'a_hour' => ':count áwàa', - - 'minute' => 'minti :count', - 'min' => 'minti :count', - 'a_minute' => 'minti :count', - - 'second' => ':count ná bíyú', - 's' => ':count ná bíyú', - 'a_second' => ':count ná bíyú', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ha_GH.php b/vendor/nesbot/carbon/src/Carbon/Lang/ha_GH.php deleted file mode 100644 index f9f99a7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ha_GH.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ha.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ha_NE.php b/vendor/nesbot/carbon/src/Carbon/Lang/ha_NE.php deleted file mode 100644 index f9f99a7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ha_NE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ha.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ha_NG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ha_NG.php deleted file mode 100644 index f9f99a7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ha_NG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ha.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hak.php b/vendor/nesbot/carbon/src/Carbon/Lang/hak.php deleted file mode 100644 index 6c3260e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hak.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/hak_TW.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hak_TW.php b/vendor/nesbot/carbon/src/Carbon/Lang/hak_TW.php deleted file mode 100644 index fe23986..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hak_TW.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY年MM月DD日', - ], - 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], - 'weekdays' => ['禮拜日', '禮拜一', '禮拜二', '禮拜三', '禮拜四', '禮拜五', '禮拜六'], - 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], - 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['上晝', '下晝'], - - 'year' => ':count ngien11', - 'y' => ':count ngien11', - 'a_year' => ':count ngien11', - - 'month' => ':count ngie̍t', - 'm' => ':count ngie̍t', - 'a_month' => ':count ngie̍t', - - 'week' => ':count lî-pai', - 'w' => ':count lî-pai', - 'a_week' => ':count lî-pai', - - 'day' => ':count ngit', - 'd' => ':count ngit', - 'a_day' => ':count ngit', - - 'hour' => ':count sṳ̀', - 'h' => ':count sṳ̀', - 'a_hour' => ':count sṳ̀', - - 'minute' => ':count fûn', - 'min' => ':count fûn', - 'a_minute' => ':count fûn', - - 'second' => ':count miéu', - 's' => ':count miéu', - 'a_second' => ':count miéu', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/haw.php b/vendor/nesbot/carbon/src/Carbon/Lang/haw.php deleted file mode 100644 index cdd3686..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/haw.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'months' => ['Ianuali', 'Pepeluali', 'Malaki', 'ʻApelila', 'Mei', 'Iune', 'Iulai', 'ʻAukake', 'Kepakemapa', 'ʻOkakopa', 'Nowemapa', 'Kekemapa'], - 'months_short' => ['Ian.', 'Pep.', 'Mal.', 'ʻAp.', 'Mei', 'Iun.', 'Iul.', 'ʻAu.', 'Kep.', 'ʻOk.', 'Now.', 'Kek.'], - 'weekdays' => ['Lāpule', 'Poʻakahi', 'Poʻalua', 'Poʻakolu', 'Poʻahā', 'Poʻalima', 'Poʻaono'], - 'weekdays_short' => ['LP', 'P1', 'P2', 'P3', 'P4', 'P5', 'P6'], - 'weekdays_min' => ['S', 'M', 'T', 'W', 'T', 'F', 'S'], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd, D MMMM YYYY h:mm a', - ], - - 'year' => ':count makahiki', - 'y' => ':count makahiki', - 'a_year' => ':count makahiki', - - 'month' => ':count mahina', - 'm' => ':count mahina', - 'a_month' => ':count mahina', - - 'week' => ':count pule', - 'w' => ':count pule', - 'a_week' => ':count pule', - - 'day' => ':count lā', - 'd' => ':count lā', - 'a_day' => ':count lā', - - 'hour' => ':count hola', - 'h' => ':count hola', - 'a_hour' => ':count hola', - - 'minute' => ':count minuke', - 'min' => ':count minuke', - 'a_minute' => ':count minuke', - - 'second' => ':count lua', - 's' => ':count lua', - 'a_second' => ':count lua', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/he.php b/vendor/nesbot/carbon/src/Carbon/Lang/he.php deleted file mode 100644 index c3fb3e9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/he.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Daniel Cohen Gindi - * - JD Isaacks - * - Itai Nathaniel - * - GabMic - * - Yaakov Dahan (yakidahan) - */ -return [ - 'year' => 'שנה|{2}שנתיים|:count שנים', - 'y' => 'שנה|:count שנ׳', - 'month' => 'חודש|{2}חודשיים|:count חודשים', - 'm' => 'חודש|:count חו׳', - 'week' => 'שבוע|{2}שבועיים|:count שבועות', - 'w' => 'שבוע|:count שב׳', - 'day' => 'יום|{2}יומיים|:count ימים', - 'd' => 'יום|:count ימ׳', - 'hour' => 'שעה|{2}שעתיים|:count שעות', - 'h' => 'שעה|:count שע׳', - 'minute' => 'דקה|{2}שתי דקות|:count דקות', - 'min' => 'דקה|:count דק׳', - 'second' => 'שנייה|:count שניות', - 'a_second' => 'כמה שניות|:count שניות', - 's' => 'שניה|:count שנ׳', - 'ago' => 'לפני :time', - 'from_now' => 'בעוד :time מעכשיו', - 'after' => 'אחרי :time', - 'before' => 'לפני :time', - 'diff_now' => 'עכשיו', - 'diff_today' => 'היום', - 'diff_today_regexp' => 'היום(?:\\s+ב־)?', - 'diff_yesterday' => 'אתמול', - 'diff_yesterday_regexp' => 'אתמול(?:\\s+ב־)?', - 'diff_tomorrow' => 'מחר', - 'diff_tomorrow_regexp' => 'מחר(?:\\s+ב־)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D [ב]MMMM YYYY', - 'LLL' => 'D [ב]MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D [ב]MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[היום ב־]LT', - 'nextDay' => '[מחר ב־]LT', - 'nextWeek' => 'dddd [בשעה] LT', - 'lastDay' => '[אתמול ב־]LT', - 'lastWeek' => '[ביום] dddd [האחרון בשעה] LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour, $minute, $isLower) { - if ($hour < 5) { - return 'לפנות בוקר'; - } - if ($hour < 10) { - return 'בבוקר'; - } - if ($hour < 12) { - return $isLower ? 'לפנה"צ' : 'לפני הצהריים'; - } - if ($hour < 18) { - return $isLower ? 'אחה"צ' : 'אחרי הצהריים'; - } - - return 'בערב'; - }, - 'months' => ['ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'], - 'months_short' => ['ינו׳', 'פבר׳', 'מרץ', 'אפר׳', 'מאי', 'יוני', 'יולי', 'אוג׳', 'ספט׳', 'אוק׳', 'נוב׳', 'דצמ׳'], - 'weekdays' => ['ראשון', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת'], - 'weekdays_short' => ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'], - 'weekdays_min' => ['א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ש'], - 'list' => [', ', ' ו -'], - 'weekend' => [5, 6], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/he_IL.php b/vendor/nesbot/carbon/src/Carbon/Lang/he_IL.php deleted file mode 100644 index 14fab3e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/he_IL.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/he.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hi.php b/vendor/nesbot/carbon/src/Carbon/Lang/hi.php deleted file mode 100644 index 70c57a2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hi.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - abhimanyu003 - * - Josh Soref - * - JD Isaacks - */ -return [ - 'year' => 'एक वर्ष|:count वर्ष', - 'y' => '1 वर्ष|:count वर्षों', - 'month' => 'एक महीने|:count महीने', - 'm' => '1 माह|:count महीने', - 'week' => '1 सप्ताह|:count सप्ताह', - 'w' => '1 सप्ताह|:count सप्ताह', - 'day' => 'एक दिन|:count दिन', - 'd' => '1 दिन|:count दिनों', - 'hour' => 'एक घंटा|:count घंटे', - 'h' => '1 घंटा|:count घंटे', - 'minute' => 'एक मिनट|:count मिनट', - 'min' => '1 मिनट|:count मिनटों', - 'second' => 'कुछ ही क्षण|:count सेकंड', - 's' => '1 सेकंड|:count सेकंड', - 'ago' => ':time पहले', - 'from_now' => ':time में', - 'after' => ':time के बाद', - 'before' => ':time के पहले', - 'diff_now' => 'अब', - 'diff_today' => 'आज', - 'diff_yesterday' => 'कल', - 'diff_tomorrow' => 'कल', - 'formats' => [ - 'LT' => 'A h:mm बजे', - 'LTS' => 'A h:mm:ss बजे', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, A h:mm बजे', - 'LLLL' => 'dddd, D MMMM YYYY, A h:mm बजे', - ], - 'calendar' => [ - 'sameDay' => '[आज] LT', - 'nextDay' => '[कल] LT', - 'nextWeek' => 'dddd, LT', - 'lastDay' => '[कल] LT', - 'lastWeek' => '[पिछले] dddd, LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'रात'; - } - if ($hour < 10) { - return 'सुबह'; - } - if ($hour < 17) { - return 'दोपहर'; - } - if ($hour < 20) { - return 'शाम'; - } - - return 'रात'; - }, - 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'months_short' => ['जन.', 'फ़र.', 'मार्च', 'अप्रै.', 'मई', 'जून', 'जुल.', 'अग.', 'सित.', 'अक्टू.', 'नव.', 'दिस.'], - 'weekdays' => ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरूवार', 'शुक्रवार', 'शनिवार'], - 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरू', 'शुक्र', 'शनि'], - 'weekdays_min' => ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'], - 'list' => [', ', ' और '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'weekend' => [0, 0], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hi_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/hi_IN.php deleted file mode 100644 index 749dd97..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hi_IN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/hi.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hif.php b/vendor/nesbot/carbon/src/Carbon/Lang/hif.php deleted file mode 100644 index 65791dd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hif.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/hif_FJ.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hif_FJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/hif_FJ.php deleted file mode 100644 index 30ad5e7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hif_FJ.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'dddd DD MMM YYYY', - ], - 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - 'weekdays' => ['Ravivar', 'Somvar', 'Mangalvar', 'Budhvar', 'Guruvar', 'Shukravar', 'Shanivar'], - 'weekdays_short' => ['Ravi', 'Som', 'Mangal', 'Budh', 'Guru', 'Shukra', 'Shani'], - 'weekdays_min' => ['Ravi', 'Som', 'Mangal', 'Budh', 'Guru', 'Shukra', 'Shani'], - 'meridiem' => ['Purvahan', 'Aparaahna'], - - 'hour' => ':count minit', // less reliable - 'h' => ':count minit', // less reliable - 'a_hour' => ':count minit', // less reliable - - 'year' => ':count saal', - 'y' => ':count saal', - 'a_year' => ':count saal', - - 'month' => ':count Mahina', - 'm' => ':count Mahina', - 'a_month' => ':count Mahina', - - 'week' => ':count Hafta', - 'w' => ':count Hafta', - 'a_week' => ':count Hafta', - - 'day' => ':count Din', - 'd' => ':count Din', - 'a_day' => ':count Din', - - 'minute' => ':count Minit', - 'min' => ':count Minit', - 'a_minute' => ':count Minit', - - 'second' => ':count Second', - 's' => ':count Second', - 'a_second' => ':count Second', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hne.php b/vendor/nesbot/carbon/src/Carbon/Lang/hne.php deleted file mode 100644 index 4bcb05c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hne.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/hne_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hne_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/hne_IN.php deleted file mode 100644 index a5ca758..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hne_IN.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat, Pune bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अपरेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितमबर', 'अकटूबर', 'नवमबर', 'दिसमबर'], - 'months_short' => ['जन', 'फर', 'मार्च', 'अप', 'मई', 'जून', 'जुला', 'अग', 'सित', 'अकटू', 'नव', 'दिस'], - 'weekdays' => ['इतवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'बिरसपत', 'सुकरवार', 'सनिवार'], - 'weekdays_short' => ['इत', 'सोम', 'मंग', 'बुध', 'बिर', 'सुक', 'सनि'], - 'weekdays_min' => ['इत', 'सोम', 'मंग', 'बुध', 'बिर', 'सुक', 'सनि'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['बिहिनियाँ', 'मंझनियाँ'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hr.php b/vendor/nesbot/carbon/src/Carbon/Lang/hr.php deleted file mode 100644 index cfd85fd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hr.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - Tim Fish - * - shaishavgandhi05 - * - Serhan Apaydın - * - JD Isaacks - * - tomhorvat - * - Josh Soref - * - François B - * - shaishavgandhi05 - * - Serhan Apaydın - * - JD Isaacks - * - tomhorvat - * - Stjepan Majdak - * - Vanja Retkovac (vr00) - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count godinu|:count godine|:count godina', - 'y' => ':count god.|:count god.|:count god.', - 'month' => ':count mjesec|:count mjeseca|:count mjeseci', - 'm' => ':count mj.|:count mj.|:count mj.', - 'week' => ':count tjedan|:count tjedna|:count tjedana', - 'w' => ':count tj.|:count tj.|:count tj.', - 'day' => ':count dan|:count dana|:count dana', - 'd' => ':count d.|:count d.|:count d.', - 'hour' => ':count sat|:count sata|:count sati', - 'h' => ':count sat|:count sata|:count sati', - 'minute' => ':count minutu|:count minute|:count minuta', - 'min' => ':count min.|:count min.|:count min.', - 'second' => ':count sekundu|:count sekunde|:count sekundi', - 'a_second' => 'nekoliko sekundi|:count sekunde|:count sekundi', - 's' => ':count sek.|:count sek.|:count sek.', - 'ago' => 'prije :time', - 'from_now' => 'za :time', - 'after' => ':time poslije', - 'before' => ':time prije', - 'diff_now' => 'sad', - 'diff_today' => 'danas', - 'diff_today_regexp' => 'danas(?:\\s+u)?', - 'diff_yesterday' => 'jučer', - 'diff_yesterday_regexp' => 'jučer(?:\\s+u)?', - 'diff_tomorrow' => 'sutra', - 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', - 'diff_before_yesterday' => 'prekjučer', - 'diff_after_tomorrow' => 'prekosutra', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'D. M. YYYY.', - 'LL' => 'D. MMMM YYYY.', - 'LLL' => 'D. MMMM YYYY. H:mm', - 'LLLL' => 'dddd, D. MMMM YYYY. H:mm', - ], - 'calendar' => [ - 'sameDay' => '[danas u] LT', - 'nextDay' => '[sutra u] LT', - 'nextWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[u] [nedjelju] [u] LT'; - case 3: - return '[u] [srijedu] [u] LT'; - case 6: - return '[u] [subotu] [u] LT'; - default: - return '[u] dddd [u] LT'; - } - }, - 'lastDay' => '[jučer u] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - case 3: - return '[prošlu] dddd [u] LT'; - case 6: - return '[prošle] [subote] [u] LT'; - default: - return '[prošli] dddd [u] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['siječnja', 'veljače', 'ožujka', 'travnja', 'svibnja', 'lipnja', 'srpnja', 'kolovoza', 'rujna', 'listopada', 'studenoga', 'prosinca'], - 'months_standalone' => ['siječanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac'], - 'months_short' => ['sij.', 'velj.', 'ožu.', 'tra.', 'svi.', 'lip.', 'srp.', 'kol.', 'ruj.', 'lis.', 'stu.', 'pro.'], - 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => ['nedjelju', 'ponedjeljak', 'utorak', 'srijedu', 'četvrtak', 'petak', 'subotu'], - 'weekdays_standalone' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], - 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], - 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' i '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hr_BA.php b/vendor/nesbot/carbon/src/Carbon/Lang/hr_BA.php deleted file mode 100644 index 7763a45..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hr_BA.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - DarkoDevelop - */ -return array_replace_recursive(require __DIR__.'/hr.php', [ - 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], - 'weekdays_short' => ['ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub'], - 'weekdays_min' => ['ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub'], - 'months' => ['siječnja', 'veljače', 'ožujka', 'travnja', 'svibnja', 'lipnja', 'srpnja', 'kolovoza', 'rujna', 'listopada', 'studenoga', 'prosinca'], - 'months_short' => ['sij', 'velj', 'ožu', 'tra', 'svi', 'lip', 'srp', 'kol', 'ruj', 'lis', 'stu', 'pro'], - 'months_standalone' => ['siječanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D. M. yy.', - 'LL' => 'D. MMM YYYY.', - 'LLL' => 'D. MMMM YYYY. HH:mm', - 'LLLL' => 'dddd, D. MMMM YYYY. HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hr_HR.php b/vendor/nesbot/carbon/src/Carbon/Lang/hr_HR.php deleted file mode 100644 index db74d8c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hr_HR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/hr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hsb.php b/vendor/nesbot/carbon/src/Carbon/Lang/hsb.php deleted file mode 100644 index 3537b8b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hsb.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/hsb_DE.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hsb_DE.php b/vendor/nesbot/carbon/src/Carbon/Lang/hsb_DE.php deleted file mode 100644 index 6ba2271..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hsb_DE.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Information from Michael Wolf Andrzej Krzysztofowicz ankry@mif.pg.gda.pl - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'DD. MMMM YYYY', - 'LLL' => 'DD. MMMM, HH:mm [hodź.]', - 'LLLL' => 'dddd, DD. MMMM YYYY, HH:mm [hodź.]', - ], - 'months' => ['januara', 'februara', 'měrca', 'apryla', 'meje', 'junija', 'julija', 'awgusta', 'septembra', 'oktobra', 'nowembra', 'decembra'], - 'months_short' => ['Jan', 'Feb', 'Měr', 'Apr', 'Mej', 'Jun', 'Jul', 'Awg', 'Sep', 'Okt', 'Now', 'Dec'], - 'weekdays' => ['Njedźela', 'Póndźela', 'Wutora', 'Srjeda', 'Štvórtk', 'Pjatk', 'Sobota'], - 'weekdays_short' => ['Nj', 'Pó', 'Wu', 'Sr', 'Št', 'Pj', 'So'], - 'weekdays_min' => ['Nj', 'Pó', 'Wu', 'Sr', 'Št', 'Pj', 'So'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count lěto', - 'y' => ':count lěto', - 'a_year' => ':count lěto', - - 'month' => ':count měsac', - 'm' => ':count měsac', - 'a_month' => ':count měsac', - - 'week' => ':count tydźeń', - 'w' => ':count tydźeń', - 'a_week' => ':count tydźeń', - - 'day' => ':count dźeń', - 'd' => ':count dźeń', - 'a_day' => ':count dźeń', - - 'hour' => ':count hodźina', - 'h' => ':count hodźina', - 'a_hour' => ':count hodźina', - - 'minute' => ':count chwila', - 'min' => ':count chwila', - 'a_minute' => ':count chwila', - - 'second' => ':count druhi', - 's' => ':count druhi', - 'a_second' => ':count druhi', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ht.php b/vendor/nesbot/carbon/src/Carbon/Lang/ht.php deleted file mode 100644 index ebd12ad..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ht.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ht_HT.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ht_HT.php b/vendor/nesbot/carbon/src/Carbon/Lang/ht_HT.php deleted file mode 100644 index 139b813..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ht_HT.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['janvye', 'fevriye', 'mas', 'avril', 'me', 'jen', 'jiyè', 'out', 'septanm', 'oktòb', 'novanm', 'desanm'], - 'months_short' => ['jan', 'fev', 'mas', 'avr', 'me', 'jen', 'jiy', 'out', 'sep', 'okt', 'nov', 'des'], - 'weekdays' => ['dimanch', 'lendi', 'madi', 'mèkredi', 'jedi', 'vandredi', 'samdi'], - 'weekdays_short' => ['dim', 'len', 'mad', 'mèk', 'jed', 'van', 'sam'], - 'weekdays_min' => ['dim', 'len', 'mad', 'mèk', 'jed', 'van', 'sam'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => ':count lane', - 'y' => ':count lane', - 'a_year' => ':count lane', - - 'month' => 'mwa :count', - 'm' => 'mwa :count', - 'a_month' => 'mwa :count', - - 'week' => 'semèn :count', - 'w' => 'semèn :count', - 'a_week' => 'semèn :count', - - 'day' => ':count jou', - 'd' => ':count jou', - 'a_day' => ':count jou', - - 'hour' => ':count lè', - 'h' => ':count lè', - 'a_hour' => ':count lè', - - 'minute' => ':count minit', - 'min' => ':count minit', - 'a_minute' => ':count minit', - - 'second' => ':count segonn', - 's' => ':count segonn', - 'a_second' => ':count segonn', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hu.php b/vendor/nesbot/carbon/src/Carbon/Lang/hu.php deleted file mode 100644 index b7583ee..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hu.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Adam Brunner - * - Brett Johnson - * - balping - */ - -use Carbon\CarbonInterface; - -$huWeekEndings = ['vasárnap', 'hétfőn', 'kedden', 'szerdán', 'csütörtökön', 'pénteken', 'szombaton']; - -return [ - 'year' => ':count év', - 'y' => ':count év', - 'month' => ':count hónap', - 'm' => ':count hónap', - 'week' => ':count hét', - 'w' => ':count hét', - 'day' => ':count nap', - 'd' => ':count nap', - 'hour' => ':count óra', - 'h' => ':count óra', - 'minute' => ':count perc', - 'min' => ':count perc', - 'second' => ':count másodperc', - 's' => ':count másodperc', - 'ago' => ':time', - 'from_now' => ':time múlva', - 'after' => ':time később', - 'before' => ':time korábban', - 'year_ago' => ':count éve', - 'y_ago' => ':count éve', - 'month_ago' => ':count hónapja', - 'm_ago' => ':count hónapja', - 'week_ago' => ':count hete', - 'w_ago' => ':count hete', - 'day_ago' => ':count napja', - 'd_ago' => ':count napja', - 'hour_ago' => ':count órája', - 'h_ago' => ':count órája', - 'minute_ago' => ':count perce', - 'min_ago' => ':count perce', - 'second_ago' => ':count másodperce', - 's_ago' => ':count másodperce', - 'year_after' => ':count évvel', - 'y_after' => ':count évvel', - 'month_after' => ':count hónappal', - 'm_after' => ':count hónappal', - 'week_after' => ':count héttel', - 'w_after' => ':count héttel', - 'day_after' => ':count nappal', - 'd_after' => ':count nappal', - 'hour_after' => ':count órával', - 'h_after' => ':count órával', - 'minute_after' => ':count perccel', - 'min_after' => ':count perccel', - 'second_after' => ':count másodperccel', - 's_after' => ':count másodperccel', - 'year_before' => ':count évvel', - 'y_before' => ':count évvel', - 'month_before' => ':count hónappal', - 'm_before' => ':count hónappal', - 'week_before' => ':count héttel', - 'w_before' => ':count héttel', - 'day_before' => ':count nappal', - 'd_before' => ':count nappal', - 'hour_before' => ':count órával', - 'h_before' => ':count órával', - 'minute_before' => ':count perccel', - 'min_before' => ':count perccel', - 'second_before' => ':count másodperccel', - 's_before' => ':count másodperccel', - 'months' => ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'], - 'months_short' => ['jan.', 'febr.', 'márc.', 'ápr.', 'máj.', 'jún.', 'júl.', 'aug.', 'szept.', 'okt.', 'nov.', 'dec.'], - 'weekdays' => ['vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat'], - 'weekdays_short' => ['vas', 'hét', 'kedd', 'sze', 'csüt', 'pén', 'szo'], - 'weekdays_min' => ['v', 'h', 'k', 'sze', 'cs', 'p', 'sz'], - 'ordinal' => ':number.', - 'diff_now' => 'most', - 'diff_today' => 'ma', - 'diff_yesterday' => 'tegnap', - 'diff_tomorrow' => 'holnap', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'YYYY.MM.DD.', - 'LL' => 'YYYY. MMMM D.', - 'LLL' => 'YYYY. MMMM D. H:mm', - 'LLLL' => 'YYYY. MMMM D., dddd H:mm', - ], - 'calendar' => [ - 'sameDay' => '[ma] LT[-kor]', - 'nextDay' => '[holnap] LT[-kor]', - 'nextWeek' => function (CarbonInterface $date) use ($huWeekEndings) { - return '['.$huWeekEndings[$date->dayOfWeek].'] LT[-kor]'; - }, - 'lastDay' => '[tegnap] LT[-kor]', - 'lastWeek' => function (CarbonInterface $date) use ($huWeekEndings) { - return '[múlt '.$huWeekEndings[$date->dayOfWeek].'] LT[-kor]'; - }, - 'sameElse' => 'L', - ], - 'meridiem' => ['DE', 'DU'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' és '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hu_HU.php b/vendor/nesbot/carbon/src/Carbon/Lang/hu_HU.php deleted file mode 100644 index b1c4854..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hu_HU.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/hu.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hy.php b/vendor/nesbot/carbon/src/Carbon/Lang/hy.php deleted file mode 100644 index 8b12994..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hy.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - mhamlet - */ -return [ - 'year' => ':count տարի', - 'a_year' => 'տարի|:count տարի', - 'y' => ':countտ', - 'month' => ':count ամիս', - 'a_month' => 'ամիս|:count ամիս', - 'm' => ':countամ', - 'week' => ':count շաբաթ', - 'a_week' => 'շաբաթ|:count շաբաթ', - 'w' => ':countշ', - 'day' => ':count օր', - 'a_day' => 'օր|:count օր', - 'd' => ':countօր', - 'hour' => ':count ժամ', - 'a_hour' => 'ժամ|:count ժամ', - 'h' => ':countժ', - 'minute' => ':count րոպե', - 'a_minute' => 'րոպե|:count րոպե', - 'min' => ':countր', - 'second' => ':count վայրկյան', - 'a_second' => 'մի քանի վայրկյան|:count վայրկյան', - 's' => ':countվրկ', - 'ago' => ':time առաջ', - 'from_now' => ':timeից', - 'after' => ':time հետո', - 'before' => ':time առաջ', - 'diff_now' => 'հիմա', - 'diff_today' => 'այսօր', - 'diff_yesterday' => 'երեկ', - 'diff_tomorrow' => 'վաղը', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY թ.', - 'LLL' => 'D MMMM YYYY թ., HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY թ., HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[այսօր] LT', - 'nextDay' => '[վաղը] LT', - 'nextWeek' => 'dddd [օրը ժամը] LT', - 'lastDay' => '[երեկ] LT', - 'lastWeek' => '[անցած] dddd [օրը ժամը] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'DDD': - case 'w': - case 'W': - case 'DDDo': - return $number.($number === 1 ? '-ին' : '-րդ'); - default: - return $number; - } - }, - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'գիշերվա'; - } - if ($hour < 12) { - return 'առավոտվա'; - } - if ($hour < 17) { - return 'ցերեկվա'; - } - - return 'երեկոյան'; - }, - 'months' => ['հունվարի', 'փետրվարի', 'մարտի', 'ապրիլի', 'մայիսի', 'հունիսի', 'հուլիսի', 'օգոստոսի', 'սեպտեմբերի', 'հոկտեմբերի', 'նոյեմբերի', 'դեկտեմբերի'], - 'months_standalone' => ['հունվար', 'փետրվար', 'մարտ', 'ապրիլ', 'մայիս', 'հունիս', 'հուլիս', 'օգոստոս', 'սեպտեմբեր', 'հոկտեմբեր', 'նոյեմբեր', 'դեկտեմբեր'], - 'months_short' => ['հնվ', 'փտր', 'մրտ', 'ապր', 'մյս', 'հնս', 'հլս', 'օգս', 'սպտ', 'հկտ', 'նմբ', 'դկտ'], - 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => ['կիրակի', 'երկուշաբթի', 'երեքշաբթի', 'չորեքշաբթի', 'հինգշաբթի', 'ուրբաթ', 'շաբաթ'], - 'weekdays_short' => ['կրկ', 'երկ', 'երք', 'չրք', 'հնգ', 'ուրբ', 'շբթ'], - 'weekdays_min' => ['կրկ', 'երկ', 'երք', 'չրք', 'հնգ', 'ուրբ', 'շբթ'], - 'list' => [', ', ' եւ '], - 'first_day_of_week' => 1, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hy_AM.php b/vendor/nesbot/carbon/src/Carbon/Lang/hy_AM.php deleted file mode 100644 index 4587df5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hy_AM.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - Tim Fish - * - Serhan Apaydın - * - JD Isaacks - */ -return array_replace_recursive(require __DIR__.'/hy.php', [ - 'from_now' => ':time հետո', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/i18n.php b/vendor/nesbot/carbon/src/Carbon/Lang/i18n.php deleted file mode 100644 index e65449b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/i18n.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-DD', - ], - 'months' => ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'], - 'months_short' => ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'], - 'weekdays' => ['1', '2', '3', '4', '5', '6', '7'], - 'weekdays_short' => ['1', '2', '3', '4', '5', '6', '7'], - 'weekdays_min' => ['1', '2', '3', '4', '5', '6', '7'], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ia.php b/vendor/nesbot/carbon/src/Carbon/Lang/ia.php deleted file mode 100644 index 0a0d5e6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ia.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ia_FR.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ia_FR.php b/vendor/nesbot/carbon/src/Carbon/Lang/ia_FR.php deleted file mode 100644 index de4b2fa..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ia_FR.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Fedora Project Nik Kalach nikka@fedoraproject.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['januario', 'februario', 'martio', 'april', 'maio', 'junio', 'julio', 'augusto', 'septembre', 'octobre', 'novembre', 'decembre'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'], - 'weekdays' => ['dominica', 'lunedi', 'martedi', 'mercuridi', 'jovedi', 'venerdi', 'sabbato'], - 'weekdays_short' => ['dom', 'lun', 'mar', 'mer', 'jov', 'ven', 'sab'], - 'weekdays_min' => ['dom', 'lun', 'mar', 'mer', 'jov', 'ven', 'sab'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => 'anno :count', - 'y' => 'anno :count', - 'a_year' => 'anno :count', - - 'month' => ':count mense', - 'm' => ':count mense', - 'a_month' => ':count mense', - - 'week' => ':count septimana', - 'w' => ':count septimana', - 'a_week' => ':count septimana', - - 'day' => ':count die', - 'd' => ':count die', - 'a_day' => ':count die', - - 'hour' => ':count hora', - 'h' => ':count hora', - 'a_hour' => ':count hora', - - 'minute' => ':count minuscule', - 'min' => ':count minuscule', - 'a_minute' => ':count minuscule', - - 'second' => ':count secunda', - 's' => ':count secunda', - 'a_second' => ':count secunda', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/id.php b/vendor/nesbot/carbon/src/Carbon/Lang/id.php deleted file mode 100644 index afaf78f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/id.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - du - * - JD Isaacks - * - Nafies Luthfi - * - Raymundus Jati Primanda (mundusjp) - * - diankur313 - * - a-wip0 - */ -return [ - 'year' => ':count tahun', - 'a_year' => '{1}setahun|]1,Inf[:count tahun', - 'y' => ':countthn', - 'month' => ':count bulan', - 'a_month' => '{1}sebulan|]1,Inf[:count bulan', - 'm' => ':countbln', - 'week' => ':count minggu', - 'a_week' => '{1}seminggu|]1,Inf[:count minggu', - 'w' => ':countmgg', - 'day' => ':count hari', - 'a_day' => '{1}sehari|]1,Inf[:count hari', - 'd' => ':counthr', - 'hour' => ':count jam', - 'a_hour' => '{1}sejam|]1,Inf[:count jam', - 'h' => ':countj', - 'minute' => ':count menit', - 'a_minute' => '{1}semenit|]1,Inf[:count menit', - 'min' => ':countmnt', - 'second' => ':count detik', - 'a_second' => '{1}beberapa detik|]1,Inf[:count detik', - 's' => ':countdt', - 'ago' => ':time yang lalu', - 'from_now' => ':time dari sekarang', - 'after' => ':time setelahnya', - 'before' => ':time sebelumnya', - 'diff_now' => 'sekarang', - 'diff_today' => 'Hari', - 'diff_today_regexp' => 'Hari(?:\\s+ini)?(?:\\s+pukul)?', - 'diff_yesterday' => 'kemarin', - 'diff_yesterday_regexp' => 'Kemarin(?:\\s+pukul)?', - 'diff_tomorrow' => 'besok', - 'diff_tomorrow_regexp' => 'Besok(?:\\s+pukul)?', - 'formats' => [ - 'LT' => 'HH.mm', - 'LTS' => 'HH.mm.ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY [pukul] HH.mm', - 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', - ], - 'calendar' => [ - 'sameDay' => '[Hari ini pukul] LT', - 'nextDay' => '[Besok pukul] LT', - 'nextWeek' => 'dddd [pukul] LT', - 'lastDay' => '[Kemarin pukul] LT', - 'lastWeek' => 'dddd [lalu pukul] LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 11) { - return 'pagi'; - } - if ($hour < 15) { - return 'siang'; - } - if ($hour < 19) { - return 'sore'; - } - - return 'malam'; - }, - 'months' => ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agt', 'Sep', 'Okt', 'Nov', 'Des'], - 'weekdays' => ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'], - 'weekdays_short' => ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'], - 'weekdays_min' => ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sb'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' dan '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/id_ID.php b/vendor/nesbot/carbon/src/Carbon/Lang/id_ID.php deleted file mode 100644 index d5953a1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/id_ID.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/id.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ig.php b/vendor/nesbot/carbon/src/Carbon/Lang/ig.php deleted file mode 100644 index de51e9c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ig.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ig_NG.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ig_NG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ig_NG.php deleted file mode 100644 index 0034e35..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ig_NG.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - pablo@mandriva.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Jenụwarị', 'Febrụwarị', 'Maachị', 'Eprel', 'Mee', 'Juun', 'Julaị', 'Ọgọọst', 'Septemba', 'Ọktoba', 'Novemba', 'Disemba'], - 'months_short' => ['Jen', 'Feb', 'Maa', 'Epr', 'Mee', 'Juu', 'Jul', 'Ọgọ', 'Sep', 'Ọkt', 'Nov', 'Dis'], - 'weekdays' => ['sọnde', 'mọnde', 'tuzde', 'wenzde', 'tọsde', 'fraịde', 'satọde'], - 'weekdays_short' => ['sọn', 'mọn', 'tuz', 'wen', 'tọs', 'fra', 'sat'], - 'weekdays_min' => ['sọn', 'mọn', 'tuz', 'wen', 'tọs', 'fra', 'sat'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => 'afo :count', - 'y' => 'afo :count', - 'a_year' => 'afo :count', - - 'month' => 'önwa :count', - 'm' => 'önwa :count', - 'a_month' => 'önwa :count', - - 'week' => 'izu :count', - 'w' => 'izu :count', - 'a_week' => 'izu :count', - - 'day' => 'ụbọchị :count', - 'd' => 'ụbọchị :count', - 'a_day' => 'ụbọchị :count', - - 'hour' => 'awa :count', - 'h' => 'awa :count', - 'a_hour' => 'awa :count', - - 'minute' => 'minit :count', - 'min' => 'minit :count', - 'a_minute' => 'minit :count', - - 'second' => 'sekọnd :count', - 's' => 'sekọnd :count', - 'a_second' => 'sekọnd :count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ii.php b/vendor/nesbot/carbon/src/Carbon/Lang/ii.php deleted file mode 100644 index a4246c2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ii.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['ꎸꄑ', 'ꁯꋒ'], - 'weekdays' => ['ꑭꆏꑍ', 'ꆏꊂꋍ', 'ꆏꊂꑍ', 'ꆏꊂꌕ', 'ꆏꊂꇖ', 'ꆏꊂꉬ', 'ꆏꊂꃘ'], - 'weekdays_short' => ['ꑭꆏ', 'ꆏꋍ', 'ꆏꑍ', 'ꆏꌕ', 'ꆏꇖ', 'ꆏꉬ', 'ꆏꃘ'], - 'weekdays_min' => ['ꑭꆏ', 'ꆏꋍ', 'ꆏꑍ', 'ꆏꌕ', 'ꆏꇖ', 'ꆏꉬ', 'ꆏꃘ'], - 'months' => null, - 'months_short' => ['ꋍꆪ', 'ꑍꆪ', 'ꌕꆪ', 'ꇖꆪ', 'ꉬꆪ', 'ꃘꆪ', 'ꏃꆪ', 'ꉆꆪ', 'ꈬꆪ', 'ꊰꆪ', 'ꊰꊪꆪ', 'ꊰꑋꆪ'], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'YYYY-MM-dd', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D h:mm a', - 'LLLL' => 'YYYY MMMM D, dddd h:mm a', - ], - - 'year' => ':count ꒉ', // less reliable - 'y' => ':count ꒉ', // less reliable - 'a_year' => ':count ꒉ', // less reliable - - 'month' => ':count ꆪ', - 'm' => ':count ꆪ', - 'a_month' => ':count ꆪ', - - 'week' => ':count ꏃ', // less reliable - 'w' => ':count ꏃ', // less reliable - 'a_week' => ':count ꏃ', // less reliable - - 'day' => ':count ꏜ', // less reliable - 'd' => ':count ꏜ', // less reliable - 'a_day' => ':count ꏜ', // less reliable - - 'hour' => ':count ꄮꈉ', - 'h' => ':count ꄮꈉ', - 'a_hour' => ':count ꄮꈉ', - - 'minute' => ':count ꀄꊭ', // less reliable - 'min' => ':count ꀄꊭ', // less reliable - 'a_minute' => ':count ꀄꊭ', // less reliable - - 'second' => ':count ꇅ', // less reliable - 's' => ':count ꇅ', // less reliable - 'a_second' => ':count ꇅ', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ik.php b/vendor/nesbot/carbon/src/Carbon/Lang/ik.php deleted file mode 100644 index 7a13aa2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ik.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ik_CA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ik_CA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ik_CA.php deleted file mode 100644 index bb2a109..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ik_CA.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - pablo@mandriva.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Siqiññaatchiaq', 'Siqiññaasrugruk', 'Paniqsiqsiivik', 'Qilġich Tatqiat', 'Suppivik', 'Iġñivik', 'Itchavik', 'Tiññivik', 'Amiġaiqsivik', 'Sikkuvik', 'Nippivik', 'Siqiñġiḷaq'], - 'months_short' => ['Sñt', 'Sñs', 'Pan', 'Qil', 'Sup', 'Iġñ', 'Itc', 'Tiñ', 'Ami', 'Sik', 'Nip', 'Siq'], - 'weekdays' => ['Minġuiqsioiq', 'Savałłiq', 'Ilaqtchiioiq', 'Qitchiioiq', 'Sisamiioiq', 'Tallimmiioiq', 'Maqinġuoiq'], - 'weekdays_short' => ['Min', 'Sav', 'Ila', 'Qit', 'Sis', 'Tal', 'Maq'], - 'weekdays_min' => ['Min', 'Sav', 'Ila', 'Qit', 'Sis', 'Tal', 'Maq'], - 'day_of_first_week_of_year' => 1, - - 'year' => ':count ukiuq', - 'y' => ':count ukiuq', - 'a_year' => ':count ukiuq', - - 'month' => ':count Tatqiat', - 'm' => ':count Tatqiat', - 'a_month' => ':count Tatqiat', - - 'week' => ':count tatqiat', // less reliable - 'w' => ':count tatqiat', // less reliable - 'a_week' => ':count tatqiat', // less reliable - - 'day' => ':count siqiñiq', // less reliable - 'd' => ':count siqiñiq', // less reliable - 'a_day' => ':count siqiñiq', // less reliable - - 'hour' => ':count Siḷa', // less reliable - 'h' => ':count Siḷa', // less reliable - 'a_hour' => ':count Siḷa', // less reliable - - 'second' => ':count iġñiq', // less reliable - 's' => ':count iġñiq', // less reliable - 'a_second' => ':count iġñiq', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/in.php b/vendor/nesbot/carbon/src/Carbon/Lang/in.php deleted file mode 100644 index d5953a1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/in.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/id.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/is.php b/vendor/nesbot/carbon/src/Carbon/Lang/is.php deleted file mode 100644 index 9990168..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/is.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kristján Ingi Geirsson - */ -return [ - 'year' => '1 ár|:count ár', - 'y' => '1 ár|:count ár', - 'month' => '1 mánuður|:count mánuðir', - 'm' => '1 mánuður|:count mánuðir', - 'week' => '1 vika|:count vikur', - 'w' => '1 vika|:count vikur', - 'day' => '1 dagur|:count dagar', - 'd' => '1 dagur|:count dagar', - 'hour' => '1 klukkutími|:count klukkutímar', - 'h' => '1 klukkutími|:count klukkutímar', - 'minute' => '1 mínúta|:count mínútur', - 'min' => '1 mínúta|:count mínútur', - 'second' => '1 sekúnda|:count sekúndur', - 's' => '1 sekúnda|:count sekúndur', - 'ago' => ':time síðan', - 'from_now' => ':time síðan', - 'after' => ':time eftir', - 'before' => ':time fyrir', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' og '], - 'meridiem' => ['fh', 'eh'], - 'diff_now' => 'núna', - 'diff_yesterday' => 'í gær', - 'diff_tomorrow' => 'á morgun', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM [kl.] HH:mm', - 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', - ], - 'weekdays' => ['sunnudaginn', 'mánudaginn', 'þriðjudaginn', 'miðvikudaginn', 'fimmtudaginn', 'föstudaginn', 'laugardaginn'], - 'weekdays_short' => ['sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau'], - 'weekdays_min' => ['sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau'], - 'months' => ['janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní', 'júlí', 'ágúst', 'september', 'október', 'nóvember', 'desember'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maí', 'jún', 'júl', 'ágú', 'sep', 'okt', 'nóv', 'des'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/is_IS.php b/vendor/nesbot/carbon/src/Carbon/Lang/is_IS.php deleted file mode 100644 index 4d35c44..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/is_IS.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/is.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/it.php b/vendor/nesbot/carbon/src/Carbon/Lang/it.php deleted file mode 100644 index 49875d7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/it.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ash - * - François B - * - Marco Perrando - * - Massimiliano Caniparoli - * - JD Isaacks - * - Andrea Martini - * - Francesco Marasco - * - Tizianoz93 - * - Davide Casiraghi (davide-casiraghi) - * - Pete Scopes (pdscopes) - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count anno|:count anni', - 'a_year' => 'un anno|:count anni', - 'y' => ':count anno|:count anni', - 'month' => ':count mese|:count mesi', - 'a_month' => 'un mese|:count mesi', - 'm' => ':count mese|:count mesi', - 'week' => ':count settimana|:count settimane', - 'a_week' => 'una settimana|:count settimane', - 'w' => ':count set.', - 'day' => ':count giorno|:count giorni', - 'a_day' => 'un giorno|:count giorni', - 'd' => ':count g|:count gg', - 'hour' => ':count ora|:count ore', - 'a_hour' => 'un\'ora|:count ore', - 'h' => ':count h', - 'minute' => ':count minuto|:count minuti', - 'a_minute' => 'un minuto|:count minuti', - 'min' => ':count min.', - 'second' => ':count secondo|:count secondi', - 'a_second' => 'alcuni secondi|:count secondi', - 's' => ':count sec.', - 'millisecond' => ':count millisecondo|:count millisecondi', - 'a_millisecond' => 'un millisecondo|:count millisecondi', - 'ms' => ':countms', - 'microsecond' => ':count microsecondo|:count microsecondi', - 'a_microsecond' => 'un microsecondo|:count microsecondi', - 'µs' => ':countµs', - 'ago' => ':time fa', - 'from_now' => function ($time) { - return (preg_match('/^\d.+$/', $time) ? 'tra' : 'in')." $time"; - }, - 'after' => ':time dopo', - 'before' => ':time prima', - 'diff_now' => 'proprio ora', - 'diff_today' => 'Oggi', - 'diff_today_regexp' => 'Oggi(?:\\s+alle)?', - 'diff_yesterday' => 'ieri', - 'diff_yesterday_regexp' => 'Ieri(?:\\s+alle)?', - 'diff_tomorrow' => 'domani', - 'diff_tomorrow_regexp' => 'Domani(?:\\s+alle)?', - 'diff_before_yesterday' => 'l\'altro ieri', - 'diff_after_tomorrow' => 'dopodomani', - 'period_interval' => 'ogni :interval', - 'period_start_date' => 'dal :date', - 'period_end_date' => 'al :date', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Oggi alle] LT', - 'nextDay' => '[Domani alle] LT', - 'nextWeek' => 'dddd [alle] LT', - 'lastDay' => '[Ieri alle] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[la scorsa] dddd [alle] LT'; - default: - return '[lo scorso] dddd [alle] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':numberº', - 'months' => ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'], - 'months_short' => ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'], - 'weekdays' => ['domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato'], - 'weekdays_short' => ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'], - 'weekdays_min' => ['do', 'lu', 'ma', 'me', 'gi', 've', 'sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' e '], - 'ordinal_words' => [ - 'of' => 'di', - 'first' => 'primo', - 'second' => 'secondo', - 'third' => 'terzo', - 'fourth' => 'quarto', - 'fifth' => 'quinto', - 'last' => 'ultimo', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/it_CH.php b/vendor/nesbot/carbon/src/Carbon/Lang/it_CH.php deleted file mode 100644 index c23cc50..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/it_CH.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Propaganistas - */ -return array_replace_recursive(require __DIR__.'/it.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/it_IT.php b/vendor/nesbot/carbon/src/Carbon/Lang/it_IT.php deleted file mode 100644 index a5d1981..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/it_IT.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return require __DIR__.'/it.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/it_SM.php b/vendor/nesbot/carbon/src/Carbon/Lang/it_SM.php deleted file mode 100644 index 5e8fc92..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/it_SM.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/it.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/it_VA.php b/vendor/nesbot/carbon/src/Carbon/Lang/it_VA.php deleted file mode 100644 index 5e8fc92..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/it_VA.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/it.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/iu.php b/vendor/nesbot/carbon/src/Carbon/Lang/iu.php deleted file mode 100644 index 4fa9742..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/iu.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/iu_CA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/iu_CA.php b/vendor/nesbot/carbon/src/Carbon/Lang/iu_CA.php deleted file mode 100644 index 6ab7e14..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/iu_CA.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Pablo Saratxaga pablo@mandriva.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'MM/DD/YY', - ], - 'months' => ['ᔮᓄᐊᓕ', 'ᕕᕗᐊᓕ', 'ᒪᔅᓯ', 'ᐃᐳᓗ', 'ᒪᐃ', 'ᔪᓂ', 'ᔪᓚᐃ', 'ᐊᒋᓯ', 'ᓯᑎᕙ', 'ᐊᑦᑐᕙ', 'ᓄᕕᕙ', 'ᑎᓯᕝᕙ'], - 'months_short' => ['ᔮᓄ', 'ᕕᕗ', 'ᒪᔅ', 'ᐃᐳ', 'ᒪᐃ', 'ᔪᓂ', 'ᔪᓚ', 'ᐊᒋ', 'ᓯᑎ', 'ᐊᑦ', 'ᓄᕕ', 'ᑎᓯ'], - 'weekdays' => ['ᓈᑦᑎᖑᔭᕐᕕᒃ', 'ᓇᒡᒐᔾᔭᐅ', 'ᓇᒡᒐᔾᔭᐅᓕᖅᑭᑦ', 'ᐱᖓᓲᓕᖅᓯᐅᑦ', 'ᕿᑎᖅᑰᑦ', 'ᐅᓪᓗᕈᓘᑐᐃᓇᖅ', 'ᓯᕙᑖᕕᒃ'], - 'weekdays_short' => ['ᓈ', 'ᓇ', 'ᓕ', 'ᐱ', 'ᕿ', 'ᐅ', 'ᓯ'], - 'weekdays_min' => ['ᓈ', 'ᓇ', 'ᓕ', 'ᐱ', 'ᕿ', 'ᐅ', 'ᓯ'], - 'day_of_first_week_of_year' => 1, - - 'year' => ':count ᐅᑭᐅᖅ', - 'y' => ':count ᐅᑭᐅᖅ', - 'a_year' => ':count ᐅᑭᐅᖅ', - - 'month' => ':count qaammat', - 'm' => ':count qaammat', - 'a_month' => ':count qaammat', - - 'week' => ':count sapaatip akunnera', - 'w' => ':count sapaatip akunnera', - 'a_week' => ':count sapaatip akunnera', - - 'day' => ':count ulloq', - 'd' => ':count ulloq', - 'a_day' => ':count ulloq', - - 'hour' => ':count ikarraq', - 'h' => ':count ikarraq', - 'a_hour' => ':count ikarraq', - - 'minute' => ':count titiqqaralaaq', // less reliable - 'min' => ':count titiqqaralaaq', // less reliable - 'a_minute' => ':count titiqqaralaaq', // less reliable - - 'second' => ':count marluk', // less reliable - 's' => ':count marluk', // less reliable - 'a_second' => ':count marluk', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/iw.php b/vendor/nesbot/carbon/src/Carbon/Lang/iw.php deleted file mode 100644 index a26e350..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/iw.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'months' => ['ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'], - 'months_short' => ['ינו׳', 'פבר׳', 'מרץ', 'אפר׳', 'מאי', 'יוני', 'יולי', 'אוג׳', 'ספט׳', 'אוק׳', 'נוב׳', 'דצמ׳'], - 'weekdays' => ['יום ראשון', 'יום שני', 'יום שלישי', 'יום רביעי', 'יום חמישי', 'יום שישי', 'יום שבת'], - 'weekdays_short' => ['יום א׳', 'יום ב׳', 'יום ג׳', 'יום ד׳', 'יום ה׳', 'יום ו׳', 'שבת'], - 'weekdays_min' => ['א׳', 'ב׳', 'ג׳', 'ד׳', 'ה׳', 'ו׳', 'ש׳'], - 'meridiem' => ['לפנה״צ', 'אחה״צ'], - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'D.M.YYYY', - 'LL' => 'D בMMM YYYY', - 'LLL' => 'D בMMMM YYYY H:mm', - 'LLLL' => 'dddd, D בMMMM YYYY H:mm', - ], - - 'year' => ':count שנה', - 'y' => ':count שנה', - 'a_year' => ':count שנה', - - 'month' => ':count חודש', - 'm' => ':count חודש', - 'a_month' => ':count חודש', - - 'week' => ':count שבוע', - 'w' => ':count שבוע', - 'a_week' => ':count שבוע', - - 'day' => ':count יום', - 'd' => ':count יום', - 'a_day' => ':count יום', - - 'hour' => ':count שעה', - 'h' => ':count שעה', - 'a_hour' => ':count שעה', - - 'minute' => ':count דקה', - 'min' => ':count דקה', - 'a_minute' => ':count דקה', - - 'second' => ':count שניה', - 's' => ':count שניה', - 'a_second' => ':count שניה', - - 'ago' => 'לפני :time', - 'from_now' => 'בעוד :time', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ja.php b/vendor/nesbot/carbon/src/Carbon/Lang/ja.php deleted file mode 100644 index 1ca6751..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ja.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Takuya Sawada - * - Atsushi Tanaka - * - François B - * - Jason Katz-Brown - * - Serhan Apaydın - * - XueWei - * - JD Isaacks - * - toyama satoshi - * - atakigawa - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count年', - 'y' => ':count年', - 'month' => ':countヶ月', - 'm' => ':countヶ月', - 'week' => ':count週間', - 'w' => ':count週間', - 'day' => ':count日', - 'd' => ':count日', - 'hour' => ':count時間', - 'h' => ':count時間', - 'minute' => ':count分', - 'min' => ':count分', - 'second' => ':count秒', - 'a_second' => '{1}数秒|]1,Inf[:count秒', - 's' => ':count秒', - 'ago' => ':time前', - 'from_now' => ':time後', - 'after' => ':time後', - 'before' => ':time前', - 'diff_now' => '今', - 'diff_today' => '今日', - 'diff_yesterday' => '昨日', - 'diff_tomorrow' => '明日', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY/MM/DD', - 'LL' => 'YYYY年M月D日', - 'LLL' => 'YYYY年M月D日 HH:mm', - 'LLLL' => 'YYYY年M月D日 dddd HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[今日] LT', - 'nextDay' => '[明日] LT', - 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { - if ($other->week !== $current->week) { - return '[来週]dddd LT'; - } - - return 'dddd LT'; - }, - 'lastDay' => '[昨日] LT', - 'lastWeek' => function (CarbonInterface $current, CarbonInterface $other) { - if ($other->week !== $current->week) { - return '[先週]dddd LT'; - } - - return 'dddd LT'; - }, - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'd': - case 'D': - case 'DDD': - return $number.'日'; - default: - return $number; - } - }, - 'meridiem' => ['午前', '午後'], - 'months' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], - 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], - 'weekdays' => ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'], - 'weekdays_short' => ['日', '月', '火', '水', '木', '金', '土'], - 'weekdays_min' => ['日', '月', '火', '水', '木', '金', '土'], - 'list' => '、', - 'alt_numbers' => ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五', '十六', '十七', '十八', '十九', '二十', '二十一', '二十二', '二十三', '二十四', '二十五', '二十六', '二十七', '二十八', '二十九', '三十', '三十一', '三十二', '三十三', '三十四', '三十五', '三十六', '三十七', '三十八', '三十九', '四十', '四十一', '四十二', '四十三', '四十四', '四十五', '四十六', '四十七', '四十八', '四十九', '五十', '五十一', '五十二', '五十三', '五十四', '五十五', '五十六', '五十七', '五十八', '五十九', '六十', '六十一', '六十二', '六十三', '六十四', '六十五', '六十六', '六十七', '六十八', '六十九', '七十', '七十一', '七十二', '七十三', '七十四', '七十五', '七十六', '七十七', '七十八', '七十九', '八十', '八十一', '八十二', '八十三', '八十四', '八十五', '八十六', '八十七', '八十八', '八十九', '九十', '九十一', '九十二', '九十三', '九十四', '九十五', '九十六', '九十七', '九十八', '九十九'], - 'alt_numbers_pow' => [ - 10000 => '万', - 1000 => '千', - 100 => '百', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ja_JP.php b/vendor/nesbot/carbon/src/Carbon/Lang/ja_JP.php deleted file mode 100644 index c283625..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ja_JP.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ja.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/jgo.php b/vendor/nesbot/carbon/src/Carbon/Lang/jgo.php deleted file mode 100644 index 6a1e77a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/jgo.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/jmc.php b/vendor/nesbot/carbon/src/Carbon/Lang/jmc.php deleted file mode 100644 index ed92e8e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/jmc.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['utuko', 'kyiukonyi'], - 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/jv.php b/vendor/nesbot/carbon/src/Carbon/Lang/jv.php deleted file mode 100644 index bcbe044..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/jv.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - tgfjt - * - JD Isaacks - */ -return [ - 'year' => '{1}setaun|]1,Inf[:count taun', - 'month' => '{1}sewulan|]1,Inf[:count wulan', - 'week' => '{1}sakminggu|]1,Inf[:count minggu', - 'day' => '{1}sedinten|]1,Inf[:count dinten', - 'hour' => '{1}setunggal jam|]1,Inf[:count jam', - 'minute' => '{1}setunggal menit|]1,Inf[:count menit', - 'second' => '{1}sawetawis detik|]1,Inf[:count detik', - 'ago' => ':time ingkang kepengker', - 'from_now' => 'wonten ing :time', - 'diff_today' => 'Dinten', - 'diff_yesterday' => 'Kala', - 'diff_yesterday_regexp' => 'Kala(?:\\s+wingi)?(?:\\s+pukul)?', - 'diff_tomorrow' => 'Mbenjang', - 'diff_tomorrow_regexp' => 'Mbenjang(?:\\s+pukul)?', - 'diff_today_regexp' => 'Dinten(?:\\s+puniko)?(?:\\s+pukul)?', - 'formats' => [ - 'LT' => 'HH.mm', - 'LTS' => 'HH.mm.ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY [pukul] HH.mm', - 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', - ], - 'calendar' => [ - 'sameDay' => '[Dinten puniko pukul] LT', - 'nextDay' => '[Mbenjang pukul] LT', - 'nextWeek' => 'dddd [pukul] LT', - 'lastDay' => '[Kala wingi pukul] LT', - 'lastWeek' => 'dddd [kepengker pukul] LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 11) { - return 'enjing'; - } - if ($hour < 15) { - return 'siyang'; - } - if ($hour < 19) { - return 'sonten'; - } - - return 'ndalu'; - }, - 'months' => ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'Nopember', 'Desember'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ags', 'Sep', 'Okt', 'Nop', 'Des'], - 'weekdays' => ['Minggu', 'Senen', 'Seloso', 'Rebu', 'Kemis', 'Jemuwah', 'Septu'], - 'weekdays_short' => ['Min', 'Sen', 'Sel', 'Reb', 'Kem', 'Jem', 'Sep'], - 'weekdays_min' => ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sp'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' lan '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ka.php b/vendor/nesbot/carbon/src/Carbon/Lang/ka.php deleted file mode 100644 index a5d563d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ka.php +++ /dev/null @@ -1,204 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Tornike Razmadze - * - François B - * - Lasha Dolidze - * - Tim Fish - * - JD Isaacks - * - Tornike Razmadze - * - François B - * - Lasha Dolidze - * - JD Isaacks - * - LONGMAN - * - Avtandil Kikabidze (akalongman) - * - Levan Velijanashvili (Stichoza) - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count წელი', - 'y' => ':count წელი', - 'a_year' => '{1}წელი|]1,Inf[:count წელი', - 'month' => ':count თვე', - 'm' => ':count თვე', - 'a_month' => '{1}თვე|]1,Inf[:count თვე', - 'week' => ':count კვირა', - 'w' => ':count კვირა', - 'a_week' => '{1}კვირა|]1,Inf[:count კვირა', - 'day' => ':count დღე', - 'd' => ':count დღე', - 'a_day' => '{1}დღე|]1,Inf[:count დღე', - 'hour' => ':count საათი', - 'h' => ':count საათი', - 'a_hour' => '{1}საათი|]1,Inf[:count საათი', - 'minute' => ':count წუთი', - 'min' => ':count წუთი', - 'a_minute' => '{1}წუთი|]1,Inf[:count წუთი', - 'second' => ':count წამი', - 's' => ':count წამი', - 'a_second' => '{1}რამდენიმე წამი|]1,Inf[:count წამი', - 'ago' => function ($time) { - $replacements = [ - // year - 'წელი' => 'წლის', - // month - 'თვე' => 'თვის', - // week - 'კვირა' => 'კვირის', - // day - 'დღე' => 'დღის', - // hour - 'საათი' => 'საათის', - // minute - 'წუთი' => 'წუთის', - // second - 'წამი' => 'წამის', - ]; - $time = strtr($time, array_flip($replacements)); - $time = strtr($time, $replacements); - - return "$time წინ"; - }, - 'from_now' => function ($time) { - $replacements = [ - // year - 'წელი' => 'წელიწადში', - // week - 'კვირა' => 'კვირაში', - // day - 'დღე' => 'დღეში', - // month - 'თვე' => 'თვეში', - // hour - 'საათი' => 'საათში', - // minute - 'წუთი' => 'წუთში', - // second - 'წამი' => 'წამში', - ]; - $time = strtr($time, array_flip($replacements)); - $time = strtr($time, $replacements); - - return $time; - }, - 'after' => function ($time) { - $replacements = [ - // year - 'წელი' => 'წლის', - // month - 'თვე' => 'თვის', - // week - 'კვირა' => 'კვირის', - // day - 'დღე' => 'დღის', - // hour - 'საათი' => 'საათის', - // minute - 'წუთი' => 'წუთის', - // second - 'წამი' => 'წამის', - ]; - $time = strtr($time, array_flip($replacements)); - $time = strtr($time, $replacements); - - return "$time შემდეგ"; - }, - 'before' => function ($time) { - $replacements = [ - // year - 'წელი' => 'წლით', - // month - 'თვე' => 'თვით', - // week - 'კვირა' => 'კვირით', - // day - 'დღე' => 'დღით', - // hour - 'საათი' => 'საათით', - // minute - 'წუთი' => 'წუთით', - // second - 'წამი' => 'წამით', - ]; - $time = strtr($time, array_flip($replacements)); - $time = strtr($time, $replacements); - - return "$time ადრე"; - }, - 'diff_now' => 'ახლა', - 'diff_today' => 'დღეს', - 'diff_yesterday' => 'გუშინ', - 'diff_tomorrow' => 'ხვალ', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[დღეს], LT[-ზე]', - 'nextDay' => '[ხვალ], LT[-ზე]', - 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { - return ($current->isSameWeek($other) ? '' : '[შემდეგ] ').'dddd, LT[-ზე]'; - }, - 'lastDay' => '[გუშინ], LT[-ზე]', - 'lastWeek' => '[წინა] dddd, LT-ზე', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - if ($number === 0) { - return $number; - } - if ($number === 1) { - return $number.'-ლი'; - } - if (($number < 20) || ($number <= 100 && ($number % 20 === 0)) || ($number % 100 === 0)) { - return 'მე-'.$number; - } - - return $number.'-ე'; - }, - 'months' => ['იანვარი', 'თებერვალი', 'მარტი', 'აპრილი', 'მაისი', 'ივნისი', 'ივლისი', 'აგვისტო', 'სექტემბერი', 'ოქტომბერი', 'ნოემბერი', 'დეკემბერი'], - 'months_standalone' => ['იანვარს', 'თებერვალს', 'მარტს', 'აპრილს', 'მაისს', 'ივნისს', 'ივლისს', 'აგვისტოს', 'სექტემბერს', 'ოქტომბერს', 'ნოემბერს', 'დეკემბერს'], - 'months_short' => ['იან', 'თებ', 'მარ', 'აპრ', 'მაი', 'ივნ', 'ივლ', 'აგვ', 'სექ', 'ოქტ', 'ნოე', 'დეკ'], - 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => ['კვირას', 'ორშაბათს', 'სამშაბათს', 'ოთხშაბათს', 'ხუთშაბათს', 'პარასკევს', 'შაბათს'], - 'weekdays_standalone' => ['კვირა', 'ორშაბათი', 'სამშაბათი', 'ოთხშაბათი', 'ხუთშაბათი', 'პარასკევი', 'შაბათი'], - 'weekdays_short' => ['კვი', 'ორშ', 'სამ', 'ოთხ', 'ხუთ', 'პარ', 'შაბ'], - 'weekdays_min' => ['კვ', 'ორ', 'სა', 'ოთ', 'ხუ', 'პა', 'შა'], - 'weekdays_regexp' => '/^([^d].*|.*[^d])$/', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' და '], - 'meridiem' => function ($hour) { - if ($hour >= 4) { - if ($hour < 11) { - return 'დილის'; - } - - if ($hour < 16) { - return 'შუადღის'; - } - - if ($hour < 22) { - return 'საღამოს'; - } - } - - return 'ღამის'; - }, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ka_GE.php b/vendor/nesbot/carbon/src/Carbon/Lang/ka_GE.php deleted file mode 100644 index a26d930..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ka_GE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ka.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kab.php b/vendor/nesbot/carbon/src/Carbon/Lang/kab.php deleted file mode 100644 index 94d6473..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kab.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/kab_DZ.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kab_DZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/kab_DZ.php deleted file mode 100644 index 796660b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kab_DZ.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - belkacem77@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Yennayer', 'Fuṛar', 'Meɣres', 'Yebrir', 'Mayyu', 'Yunyu', 'Yulyu', 'ɣuct', 'Ctembeṛ', 'Tubeṛ', 'Wambeṛ', 'Dujembeṛ'], - 'months_short' => ['Yen', 'Fur', 'Meɣ', 'Yeb', 'May', 'Yun', 'Yul', 'ɣuc', 'Cte', 'Tub', 'Wam', 'Duj'], - 'weekdays' => ['Acer', 'Arim', 'Aram', 'Ahad', 'Amhad', 'Sem', 'Sed'], - 'weekdays_short' => ['Ace', 'Ari', 'Ara', 'Aha', 'Amh', 'Sem', 'Sed'], - 'weekdays_min' => ['Ace', 'Ari', 'Ara', 'Aha', 'Amh', 'Sem', 'Sed'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['FT', 'MD'], - - 'year' => ':count n yiseggasen', - 'y' => ':count n yiseggasen', - 'a_year' => ':count n yiseggasen', - - 'month' => ':count n wayyuren', - 'm' => ':count n wayyuren', - 'a_month' => ':count n wayyuren', - - 'week' => ':count n ledwaṛ', // less reliable - 'w' => ':count n ledwaṛ', // less reliable - 'a_week' => ':count n ledwaṛ', // less reliable - - 'day' => ':count n wussan', - 'd' => ':count n wussan', - 'a_day' => ':count n wussan', - - 'hour' => ':count n tsaɛtin', - 'h' => ':count n tsaɛtin', - 'a_hour' => ':count n tsaɛtin', - - 'minute' => ':count n tedqiqin', - 'min' => ':count n tedqiqin', - 'a_minute' => ':count n tedqiqin', - - 'second' => ':count tasdidt', // less reliable - 's' => ':count tasdidt', // less reliable - 'a_second' => ':count tasdidt', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kam.php b/vendor/nesbot/carbon/src/Carbon/Lang/kam.php deleted file mode 100644 index 0fc70d7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kam.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Ĩyakwakya', 'Ĩyawĩoo'], - 'weekdays' => ['Wa kyumwa', 'Wa kwambĩlĩlya', 'Wa kelĩ', 'Wa katatũ', 'Wa kana', 'Wa katano', 'Wa thanthatũ'], - 'weekdays_short' => ['Wky', 'Wkw', 'Wkl', 'Wtũ', 'Wkn', 'Wtn', 'Wth'], - 'weekdays_min' => ['Wky', 'Wkw', 'Wkl', 'Wtũ', 'Wkn', 'Wtn', 'Wth'], - 'months' => ['Mwai wa mbee', 'Mwai wa kelĩ', 'Mwai wa katatũ', 'Mwai wa kana', 'Mwai wa katano', 'Mwai wa thanthatũ', 'Mwai wa muonza', 'Mwai wa nyaanya', 'Mwai wa kenda', 'Mwai wa ĩkumi', 'Mwai wa ĩkumi na ĩmwe', 'Mwai wa ĩkumi na ilĩ'], - 'months_short' => ['Mbe', 'Kel', 'Ktũ', 'Kan', 'Ktn', 'Tha', 'Moo', 'Nya', 'Knd', 'Ĩku', 'Ĩkm', 'Ĩkl'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - // Too unreliable - /* - 'year' => ':count mbua', // less reliable - 'y' => ':count mbua', // less reliable - 'a_year' => ':count mbua', // less reliable - - 'month' => ':count ndakitali', // less reliable - 'm' => ':count ndakitali', // less reliable - 'a_month' => ':count ndakitali', // less reliable - - 'day' => ':count wia', // less reliable - 'd' => ':count wia', // less reliable - 'a_day' => ':count wia', // less reliable - - 'hour' => ':count orasan', // less reliable - 'h' => ':count orasan', // less reliable - 'a_hour' => ':count orasan', // less reliable - - 'minute' => ':count orasan', // less reliable - 'min' => ':count orasan', // less reliable - 'a_minute' => ':count orasan', // less reliable - */ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kde.php b/vendor/nesbot/carbon/src/Carbon/Lang/kde.php deleted file mode 100644 index fbcc9f3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kde.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Muhi', 'Chilo'], - 'weekdays' => ['Liduva lyapili', 'Liduva lyatatu', 'Liduva lyanchechi', 'Liduva lyannyano', 'Liduva lyannyano na linji', 'Liduva lyannyano na mavili', 'Liduva litandi'], - 'weekdays_short' => ['Ll2', 'Ll3', 'Ll4', 'Ll5', 'Ll6', 'Ll7', 'Ll1'], - 'weekdays_min' => ['Ll2', 'Ll3', 'Ll4', 'Ll5', 'Ll6', 'Ll7', 'Ll1'], - 'months' => ['Mwedi Ntandi', 'Mwedi wa Pili', 'Mwedi wa Tatu', 'Mwedi wa Nchechi', 'Mwedi wa Nnyano', 'Mwedi wa Nnyano na Umo', 'Mwedi wa Nnyano na Mivili', 'Mwedi wa Nnyano na Mitatu', 'Mwedi wa Nnyano na Nchechi', 'Mwedi wa Nnyano na Nnyano', 'Mwedi wa Nnyano na Nnyano na U', 'Mwedi wa Nnyano na Nnyano na M'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kea.php b/vendor/nesbot/carbon/src/Carbon/Lang/kea.php deleted file mode 100644 index 8b6c21b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kea.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['a', 'p'], - 'weekdays' => ['dumingu', 'sigunda-fera', 'tersa-fera', 'kuarta-fera', 'kinta-fera', 'sesta-fera', 'sabadu'], - 'weekdays_short' => ['dum', 'sig', 'ter', 'kua', 'kin', 'ses', 'sab'], - 'weekdays_min' => ['du', 'si', 'te', 'ku', 'ki', 'se', 'sa'], - 'weekdays_standalone' => ['dumingu', 'sigunda-fera', 'tersa-fera', 'kuarta-fera', 'kinta-fera', 'sesta-fera', 'sábadu'], - 'months' => ['Janeru', 'Febreru', 'Marsu', 'Abril', 'Maiu', 'Junhu', 'Julhu', 'Agostu', 'Setenbru', 'Otubru', 'Nuvenbru', 'Dizenbru'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Otu', 'Nuv', 'Diz'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D [di] MMMM [di] YYYY HH:mm', - 'LLLL' => 'dddd, D [di] MMMM [di] YYYY HH:mm', - ], - - 'year' => ':count otunu', // less reliable - 'y' => ':count otunu', // less reliable - 'a_year' => ':count otunu', // less reliable - - 'week' => ':count día dumingu', // less reliable - 'w' => ':count día dumingu', // less reliable - 'a_week' => ':count día dumingu', // less reliable - - 'day' => ':count diâ', // less reliable - 'd' => ':count diâ', // less reliable - 'a_day' => ':count diâ', // less reliable - - 'minute' => ':count sugundu', // less reliable - 'min' => ':count sugundu', // less reliable - 'a_minute' => ':count sugundu', // less reliable - - 'second' => ':count dós', // less reliable - 's' => ':count dós', // less reliable - 'a_second' => ':count dós', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/khq.php b/vendor/nesbot/carbon/src/Carbon/Lang/khq.php deleted file mode 100644 index 7a834cf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/khq.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Adduha', 'Aluula'], - 'weekdays' => ['Alhadi', 'Atini', 'Atalata', 'Alarba', 'Alhamiisa', 'Aljuma', 'Assabdu'], - 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alj', 'Ass'], - 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alj', 'Ass'], - 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], - 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ki.php b/vendor/nesbot/carbon/src/Carbon/Lang/ki.php deleted file mode 100644 index d86afc5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ki.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Kiroko', 'Hwaĩ-inĩ'], - 'weekdays' => ['Kiumia', 'Njumatatũ', 'Njumaine', 'Njumatana', 'Aramithi', 'Njumaa', 'Njumamothi'], - 'weekdays_short' => ['KMA', 'NTT', 'NMN', 'NMT', 'ART', 'NMA', 'NMM'], - 'weekdays_min' => ['KMA', 'NTT', 'NMN', 'NMT', 'ART', 'NMA', 'NMM'], - 'months' => ['Njenuarĩ', 'Mwere wa kerĩ', 'Mwere wa gatatũ', 'Mwere wa kana', 'Mwere wa gatano', 'Mwere wa gatandatũ', 'Mwere wa mũgwanja', 'Mwere wa kanana', 'Mwere wa kenda', 'Mwere wa ikũmi', 'Mwere wa ikũmi na ũmwe', 'Ndithemba'], - 'months_short' => ['JEN', 'WKR', 'WGT', 'WKN', 'WTN', 'WTD', 'WMJ', 'WNN', 'WKD', 'WIK', 'WMW', 'DIT'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - 'year' => ':count mĩaka', // less reliable - 'y' => ':count mĩaka', // less reliable - 'a_year' => ':count mĩaka', // less reliable - - 'month' => ':count mweri', // less reliable - 'm' => ':count mweri', // less reliable - 'a_month' => ':count mweri', // less reliable - - 'week' => ':count kiumia', // less reliable - 'w' => ':count kiumia', // less reliable - 'a_week' => ':count kiumia', // less reliable - - 'day' => ':count mũthenya', // less reliable - 'd' => ':count mũthenya', // less reliable - 'a_day' => ':count mũthenya', // less reliable - - 'hour' => ':count thaa', // less reliable - 'h' => ':count thaa', // less reliable - 'a_hour' => ':count thaa', // less reliable - - 'minute' => ':count mundu', // less reliable - 'min' => ':count mundu', // less reliable - 'a_minute' => ':count mundu', // less reliable - - 'second' => ':count igego', // less reliable - 's' => ':count igego', // less reliable - 'a_second' => ':count igego', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kk.php b/vendor/nesbot/carbon/src/Carbon/Lang/kk.php deleted file mode 100644 index 59fa9af..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kk.php +++ /dev/null @@ -1,103 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - Talat Uspanov - * - Нурлан Рахимжанов - * - Toleugazy Kali - */ -return [ - 'year' => ':count жыл', - 'a_year' => '{1}бір жыл|:count жыл', - 'y' => ':count ж.', - 'month' => ':count ай', - 'a_month' => '{1}бір ай|:count ай', - 'm' => ':count ай', - 'week' => ':count апта', - 'a_week' => '{1}бір апта', - 'w' => ':count ап.', - 'day' => ':count күн', - 'a_day' => '{1}бір күн|:count күн', - 'd' => ':count к.', - 'hour' => ':count сағат', - 'a_hour' => '{1}бір сағат|:count сағат', - 'h' => ':count са.', - 'minute' => ':count минут', - 'a_minute' => '{1}бір минут|:count минут', - 'min' => ':count м.', - 'second' => ':count секунд', - 'a_second' => '{1}бірнеше секунд|:count секунд', - 's' => ':count се.', - 'ago' => ':time бұрын', - 'from_now' => ':time ішінде', - 'after' => ':time кейін', - 'before' => ':time бұрын', - 'diff_now' => 'қазір', - 'diff_today' => 'Бүгін', - 'diff_today_regexp' => 'Бүгін(?:\\s+сағат)?', - 'diff_yesterday' => 'кеше', - 'diff_yesterday_regexp' => 'Кеше(?:\\s+сағат)?', - 'diff_tomorrow' => 'ертең', - 'diff_tomorrow_regexp' => 'Ертең(?:\\s+сағат)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Бүгін сағат] LT', - 'nextDay' => '[Ертең сағат] LT', - 'nextWeek' => 'dddd [сағат] LT', - 'lastDay' => '[Кеше сағат] LT', - 'lastWeek' => '[Өткен аптаның] dddd [сағат] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - static $suffixes = [ - 0 => '-ші', - 1 => '-ші', - 2 => '-ші', - 3 => '-ші', - 4 => '-ші', - 5 => '-ші', - 6 => '-шы', - 7 => '-ші', - 8 => '-ші', - 9 => '-шы', - 10 => '-шы', - 20 => '-шы', - 30 => '-шы', - 40 => '-шы', - 50 => '-ші', - 60 => '-шы', - 70 => '-ші', - 80 => '-ші', - 90 => '-шы', - 100 => '-ші', - ]; - - return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); - }, - 'months' => ['қаңтар', 'ақпан', 'наурыз', 'сәуір', 'мамыр', 'маусым', 'шілде', 'тамыз', 'қыркүйек', 'қазан', 'қараша', 'желтоқсан'], - 'months_short' => ['қаң', 'ақп', 'нау', 'сәу', 'мам', 'мау', 'шіл', 'там', 'қыр', 'қаз', 'қар', 'жел'], - 'weekdays' => ['жексенбі', 'дүйсенбі', 'сейсенбі', 'сәрсенбі', 'бейсенбі', 'жұма', 'сенбі'], - 'weekdays_short' => ['жек', 'дүй', 'сей', 'сәр', 'бей', 'жұм', 'сен'], - 'weekdays_min' => ['жк', 'дй', 'сй', 'ср', 'бй', 'жм', 'сн'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' және '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kk_KZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/kk_KZ.php deleted file mode 100644 index 7dc5ebc..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kk_KZ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/kk.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kkj.php b/vendor/nesbot/carbon/src/Carbon/Lang/kkj.php deleted file mode 100644 index 6a1e77a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kkj.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kl.php b/vendor/nesbot/carbon/src/Carbon/Lang/kl.php deleted file mode 100644 index 7329a07..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kl.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/kl_GL.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kl_GL.php b/vendor/nesbot/carbon/src/Carbon/Lang/kl_GL.php deleted file mode 100644 index 4fed720..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kl_GL.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Danish Standards Association bug-glibc-locales@gnu.org - * - John Eyðstein Johannesen (mashema) - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY HH:mm', - 'LLLL' => 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', - ], - 'months' => ['januaarip', 'februaarip', 'marsip', 'apriilip', 'maajip', 'juunip', 'juulip', 'aggustip', 'septembarip', 'oktobarip', 'novembarip', 'decembarip'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - 'weekdays' => ['sapaat', 'ataasinngorneq', 'marlunngorneq', 'pingasunngorneq', 'sisamanngorneq', 'tallimanngorneq', 'arfininngorneq'], - 'weekdays_short' => ['sap', 'ata', 'mar', 'pin', 'sis', 'tal', 'arf'], - 'weekdays_min' => ['sap', 'ata', 'mar', 'pin', 'sis', 'tal', 'arf'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => '{1}ukioq :count|{0}:count ukiut|]1,Inf[ukiut :count', - 'a_year' => '{1}ukioq|{0}:count ukiut|]1,Inf[ukiut :count', - 'y' => '{1}:countyr|{0}:countyrs|]1,Inf[:countyrs', - - 'month' => '{1}qaammat :count|{0}:count qaammatit|]1,Inf[qaammatit :count', - 'a_month' => '{1}qaammat|{0}:count qaammatit|]1,Inf[qaammatit :count', - 'm' => '{1}:countmo|{0}:countmos|]1,Inf[:countmos', - - 'week' => '{1}:count sap. ak.|{0}:count sap. ak.|]1,Inf[:count sap. ak.', - 'a_week' => '{1}a sap. ak.|{0}:count sap. ak.|]1,Inf[:count sap. ak.', - 'w' => ':countw', - - 'day' => '{1}:count ulloq|{0}:count ullut|]1,Inf[:count ullut', - 'a_day' => '{1}a ulloq|{0}:count ullut|]1,Inf[:count ullut', - 'd' => ':countd', - - 'hour' => '{1}:count tiimi|{0}:count tiimit|]1,Inf[:count tiimit', - 'a_hour' => '{1}tiimi|{0}:count tiimit|]1,Inf[:count tiimit', - 'h' => ':counth', - - 'minute' => '{1}:count minutsi|{0}:count minutsit|]1,Inf[:count minutsit', - 'a_minute' => '{1}a minutsi|{0}:count minutsit|]1,Inf[:count minutsit', - 'min' => ':countm', - - 'second' => '{1}:count sikunti|{0}:count sikuntit|]1,Inf[:count sikuntit', - 'a_second' => '{1}sikunti|{0}:count sikuntit|]1,Inf[:count sikuntit', - 's' => ':counts', - - 'ago' => ':time matuma siorna', - -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kln.php b/vendor/nesbot/carbon/src/Carbon/Lang/kln.php deleted file mode 100644 index b9c3996..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kln.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['krn', 'koosk'], - 'weekdays' => ['Kotisap', 'Kotaai', 'Koaeng’', 'Kosomok', 'Koang’wan', 'Komuut', 'Kolo'], - 'weekdays_short' => ['Kts', 'Kot', 'Koo', 'Kos', 'Koa', 'Kom', 'Kol'], - 'weekdays_min' => ['Kts', 'Kot', 'Koo', 'Kos', 'Koa', 'Kom', 'Kol'], - 'months' => ['Mulgul', 'Ng’atyaato', 'Kiptaamo', 'Iwootkuut', 'Mamuut', 'Paagi', 'Ng’eiyeet', 'Rooptui', 'Bureet', 'Epeeso', 'Kipsuunde ne taai', 'Kipsuunde nebo aeng’'], - 'months_short' => ['Mul', 'Ngat', 'Taa', 'Iwo', 'Mam', 'Paa', 'Nge', 'Roo', 'Bur', 'Epe', 'Kpt', 'Kpa'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - 'year' => ':count maghatiat', // less reliable - 'y' => ':count maghatiat', // less reliable - 'a_year' => ':count maghatiat', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/km.php b/vendor/nesbot/carbon/src/Carbon/Lang/km.php deleted file mode 100644 index da790ac..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/km.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kruy Vanna - * - Sereysethy Touch - * - JD Isaacks - * - Sovichet Tep - */ -return [ - 'year' => '{1}មួយឆ្នាំ|]1,Inf[:count ឆ្នាំ', - 'y' => ':count ឆ្នាំ', - 'month' => '{1}មួយខែ|]1,Inf[:count ខែ', - 'm' => ':count ខែ', - 'week' => ':count សប្ដាហ៍', - 'w' => ':count សប្ដាហ៍', - 'day' => '{1}មួយថ្ងៃ|]1,Inf[:count ថ្ងៃ', - 'd' => ':count ថ្ងៃ', - 'hour' => '{1}មួយម៉ោង|]1,Inf[:count ម៉ោង', - 'h' => ':count ម៉ោង', - 'minute' => '{1}មួយនាទី|]1,Inf[:count នាទី', - 'min' => ':count នាទី', - 'second' => '{1}ប៉ុន្មានវិនាទី|]1,Inf[:count វិនាទី', - 's' => ':count វិនាទី', - 'ago' => ':timeមុន', - 'from_now' => ':timeទៀត', - 'after' => 'នៅ​ក្រោយ :time', - 'before' => 'នៅ​មុន :time', - 'diff_now' => 'ឥឡូវ', - 'diff_today' => 'ថ្ងៃនេះ', - 'diff_today_regexp' => 'ថ្ងៃនេះ(?:\\s+ម៉ោង)?', - 'diff_yesterday' => 'ម្សិលមិញ', - 'diff_yesterday_regexp' => 'ម្សិលមិញ(?:\\s+ម៉ោង)?', - 'diff_tomorrow' => 'ថ្ងៃ​ស្អែក', - 'diff_tomorrow_regexp' => 'ស្អែក(?:\\s+ម៉ោង)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[ថ្ងៃនេះ ម៉ោង] LT', - 'nextDay' => '[ស្អែក ម៉ោង] LT', - 'nextWeek' => 'dddd [ម៉ោង] LT', - 'lastDay' => '[ម្សិលមិញ ម៉ោង] LT', - 'lastWeek' => 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', - 'sameElse' => 'L', - ], - 'ordinal' => 'ទី:number', - 'meridiem' => ['ព្រឹក', 'ល្ងាច'], - 'months' => ['មករា', 'កុម្ភៈ', 'មីនា', 'មេសា', 'ឧសភា', 'មិថុនា', 'កក្កដា', 'សីហា', 'កញ្ញា', 'តុលា', 'វិច្ឆិកា', 'ធ្នូ'], - 'months_short' => ['មករា', 'កុម្ភៈ', 'មីនា', 'មេសា', 'ឧសភា', 'មិថុនា', 'កក្កដា', 'សីហា', 'កញ្ញា', 'តុលា', 'វិច្ឆិកា', 'ធ្នូ'], - 'weekdays' => ['អាទិត្យ', 'ច័ន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'], - 'weekdays_short' => ['អា', 'ច', 'អ', 'ព', 'ព្រ', 'សុ', 'ស'], - 'weekdays_min' => ['អា', 'ច', 'អ', 'ព', 'ព្រ', 'សុ', 'ស'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', 'និង '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/km_KH.php b/vendor/nesbot/carbon/src/Carbon/Lang/km_KH.php deleted file mode 100644 index 92e5fdb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/km_KH.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/km.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kn.php b/vendor/nesbot/carbon/src/Carbon/Lang/kn.php deleted file mode 100644 index 0d2ad08..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kn.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - MOHAN M U - * - François B - * - rajeevnaikte - */ -return [ - 'year' => '{1}ಒಂದು ವರ್ಷ|]1,Inf[:count ವರ್ಷ', - 'month' => '{1}ಒಂದು ತಿಂಗಳು|]1,Inf[:count ತಿಂಗಳು', - 'week' => '{1}ಒಂದು ವಾರ|]1,Inf[:count ವಾರಗಳು', - 'day' => '{1}ಒಂದು ದಿನ|]1,Inf[:count ದಿನ', - 'hour' => '{1}ಒಂದು ಗಂಟೆ|]1,Inf[:count ಗಂಟೆ', - 'minute' => '{1}ಒಂದು ನಿಮಿಷ|]1,Inf[:count ನಿಮಿಷ', - 'second' => '{1}ಕೆಲವು ಕ್ಷಣಗಳು|]1,Inf[:count ಸೆಕೆಂಡುಗಳು', - 'ago' => ':time ಹಿಂದೆ', - 'from_now' => ':time ನಂತರ', - 'diff_now' => 'ಈಗ', - 'diff_today' => 'ಇಂದು', - 'diff_yesterday' => 'ನಿನ್ನೆ', - 'diff_tomorrow' => 'ನಾಳೆ', - 'formats' => [ - 'LT' => 'A h:mm', - 'LTS' => 'A h:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, A h:mm', - 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', - ], - 'calendar' => [ - 'sameDay' => '[ಇಂದು] LT', - 'nextDay' => '[ನಾಳೆ] LT', - 'nextWeek' => 'dddd, LT', - 'lastDay' => '[ನಿನ್ನೆ] LT', - 'lastWeek' => '[ಕೊನೆಯ] dddd, LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':numberನೇ', - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'ರಾತ್ರಿ'; - } - if ($hour < 10) { - return 'ಬೆಳಿಗ್ಗೆ'; - } - if ($hour < 17) { - return 'ಮಧ್ಯಾಹ್ನ'; - } - if ($hour < 20) { - return 'ಸಂಜೆ'; - } - - return 'ರಾತ್ರಿ'; - }, - 'months' => ['ಜನವರಿ', 'ಫೆಬ್ರವರಿ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂಬರ್', 'ಅಕ್ಟೋಬರ್', 'ನವೆಂಬರ್', 'ಡಿಸೆಂಬರ್'], - 'months_short' => ['ಜನ', 'ಫೆಬ್ರ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂ', 'ಅಕ್ಟೋ', 'ನವೆಂ', 'ಡಿಸೆಂ'], - 'weekdays' => ['ಭಾನುವಾರ', 'ಸೋಮವಾರ', 'ಮಂಗಳವಾರ', 'ಬುಧವಾರ', 'ಗುರುವಾರ', 'ಶುಕ್ರವಾರ', 'ಶನಿವಾರ'], - 'weekdays_short' => ['ಭಾನು', 'ಸೋಮ', 'ಮಂಗಳ', 'ಬುಧ', 'ಗುರು', 'ಶುಕ್ರ', 'ಶನಿ'], - 'weekdays_min' => ['ಭಾ', 'ಸೋ', 'ಮಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], - 'list' => ', ', - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'weekend' => [0, 0], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kn_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/kn_IN.php deleted file mode 100644 index 30e3d88..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kn_IN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/kn.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ko.php b/vendor/nesbot/carbon/src/Carbon/Lang/ko.php deleted file mode 100644 index 4fa6237..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ko.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kunal Marwaha - * - FourwingsY - * - François B - * - Jason Katz-Brown - * - Seokjun Kim - * - Junho Kim - * - JD Isaacks - * - Juwon Kim - */ -return [ - 'year' => ':count년', - 'a_year' => '{1}일년|]1,Inf[:count년', - 'y' => ':count년', - 'month' => ':count개월', - 'a_month' => '{1}한달|]1,Inf[:count개월', - 'm' => ':count개월', - 'week' => ':count주', - 'a_week' => '{1}일주일|]1,Inf[:count 주', - 'w' => ':count주일', - 'day' => ':count일', - 'a_day' => '{1}하루|]1,Inf[:count일', - 'd' => ':count일', - 'hour' => ':count시간', - 'a_hour' => '{1}한시간|]1,Inf[:count시간', - 'h' => ':count시간', - 'minute' => ':count분', - 'a_minute' => '{1}일분|]1,Inf[:count분', - 'min' => ':count분', - 'second' => ':count초', - 'a_second' => '{1}몇초|]1,Inf[:count초', - 's' => ':count초', - 'ago' => ':time 전', - 'from_now' => ':time 후', - 'after' => ':time 후', - 'before' => ':time 전', - 'diff_now' => '지금', - 'diff_today' => '오늘', - 'diff_yesterday' => '어제', - 'diff_tomorrow' => '내일', - 'formats' => [ - 'LT' => 'A h:mm', - 'LTS' => 'A h:mm:ss', - 'L' => 'YYYY.MM.DD.', - 'LL' => 'YYYY년 MMMM D일', - 'LLL' => 'YYYY년 MMMM D일 A h:mm', - 'LLLL' => 'YYYY년 MMMM D일 dddd A h:mm', - ], - 'calendar' => [ - 'sameDay' => '오늘 LT', - 'nextDay' => '내일 LT', - 'nextWeek' => 'dddd LT', - 'lastDay' => '어제 LT', - 'lastWeek' => '지난주 dddd LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'd': - case 'D': - case 'DDD': - return $number.'일'; - case 'M': - return $number.'월'; - case 'w': - case 'W': - return $number.'주'; - default: - return $number; - } - }, - 'meridiem' => ['오전', '오후'], - 'months' => ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], - 'months_short' => ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'], - 'weekdays' => ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'], - 'weekdays_short' => ['일', '월', '화', '수', '목', '금', '토'], - 'weekdays_min' => ['일', '월', '화', '수', '목', '금', '토'], - 'list' => ' ', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ko_KP.php b/vendor/nesbot/carbon/src/Carbon/Lang/ko_KP.php deleted file mode 100644 index 4ba802b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ko_KP.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ko.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ko_KR.php b/vendor/nesbot/carbon/src/Carbon/Lang/ko_KR.php deleted file mode 100644 index 9d873a2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ko_KR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ko.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kok.php b/vendor/nesbot/carbon/src/Carbon/Lang/kok.php deleted file mode 100644 index 4adcddc..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kok.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/kok_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kok_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/kok_IN.php deleted file mode 100644 index 92ba844..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kok_IN.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat, Pune bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D-M-YY', - ], - 'months' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ओगस्ट', 'सेप्टेंबर', 'ओक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], - 'months_short' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ओगस्ट', 'सेप्टेंबर', 'ओक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], - 'weekdays' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], - 'weekdays_short' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], - 'weekdays_min' => ['आयतार', 'सोमार', 'मंगळवार', 'बुधवार', 'बेरेसतार', 'शुकरार', 'शेनवार'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['म.पू.', 'म.नं.'], - - 'year' => ':count वैशाकु', // less reliable - 'y' => ':count वैशाकु', // less reliable - 'a_year' => ':count वैशाकु', // less reliable - - 'week' => ':count आदित्यवार', // less reliable - 'w' => ':count आदित्यवार', // less reliable - 'a_week' => ':count आदित्यवार', // less reliable - - 'minute' => ':count नोंद', // less reliable - 'min' => ':count नोंद', // less reliable - 'a_minute' => ':count नोंद', // less reliable - - 'second' => ':count तेंको', // less reliable - 's' => ':count तेंको', // less reliable - 'a_second' => ':count तेंको', // less reliable - - 'month' => ':count मैनो', - 'm' => ':count मैनो', - 'a_month' => ':count मैनो', - - 'day' => ':count दिवसु', - 'd' => ':count दिवसु', - 'a_day' => ':count दिवसु', - - 'hour' => ':count घंते', - 'h' => ':count घंते', - 'a_hour' => ':count घंते', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ks.php b/vendor/nesbot/carbon/src/Carbon/Lang/ks.php deleted file mode 100644 index 9876079..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ks.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ks_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ks_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ks_IN.php deleted file mode 100644 index ce9d5d4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ks_IN.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat, Pune bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'M/D/YY', - ], - 'months' => ['جنؤری', 'فرؤری', 'مارٕچ', 'اپریل', 'میٔ', 'جوٗن', 'جوٗلایی', 'اگست', 'ستمبر', 'اکتوٗبر', 'نومبر', 'دسمبر'], - 'months_short' => ['جنؤری', 'فرؤری', 'مارٕچ', 'اپریل', 'میٔ', 'جوٗن', 'جوٗلایی', 'اگست', 'ستمبر', 'اکتوٗبر', 'نومبر', 'دسمبر'], - 'weekdays' => ['آتهوار', 'ژءندروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], - 'weekdays_short' => ['آتهوار', 'ژءنتروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], - 'weekdays_min' => ['آتهوار', 'ژءنتروار', 'بوءںوار', 'بودهوار', 'برىسوار', 'جمع', 'بٹوار'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['دوپھربرونھ', 'دوپھرپتھ'], - - 'year' => ':count آب', // less reliable - 'y' => ':count آب', // less reliable - 'a_year' => ':count آب', // less reliable - - 'month' => ':count रान्', // less reliable - 'm' => ':count रान्', // less reliable - 'a_month' => ':count रान्', // less reliable - - 'week' => ':count آتھٕوار', // less reliable - 'w' => ':count آتھٕوار', // less reliable - 'a_week' => ':count آتھٕوار', // less reliable - - 'hour' => ':count سۄن', // less reliable - 'h' => ':count سۄن', // less reliable - 'a_hour' => ':count سۄن', // less reliable - - 'minute' => ':count فَن', // less reliable - 'min' => ':count فَن', // less reliable - 'a_minute' => ':count فَن', // less reliable - - 'second' => ':count दोʼयुम', // less reliable - 's' => ':count दोʼयुम', // less reliable - 'a_second' => ':count दोʼयुम', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ks_IN@devanagari.php b/vendor/nesbot/carbon/src/Carbon/Lang/ks_IN@devanagari.php deleted file mode 100644 index a2ae8b6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ks_IN@devanagari.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - ks-gnome-trans-commits@lists.code.indlinux.net - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'M/D/YY', - ], - 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'weekdays' => ['आथवार', 'चॅ़दुरवार', 'बोमवार', 'ब्वदवार', 'ब्रसवार', 'शोकुरवार', 'बटुवार'], - 'weekdays_short' => ['आथ ', 'चॅ़दुर', 'बोम', 'ब्वद', 'ब्रस', 'शोकुर', 'बटु'], - 'weekdays_min' => ['आथ ', 'चॅ़दुर', 'बोम', 'ब्वद', 'ब्रस', 'शोकुर', 'बटु'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ksb.php b/vendor/nesbot/carbon/src/Carbon/Lang/ksb.php deleted file mode 100644 index aaa0061..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ksb.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['makeo', 'nyiaghuo'], - 'weekdays' => ['Jumaapii', 'Jumaatatu', 'Jumaane', 'Jumaatano', 'Alhamisi', 'Ijumaa', 'Jumaamosi'], - 'weekdays_short' => ['Jpi', 'Jtt', 'Jmn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'weekdays_min' => ['Jpi', 'Jtt', 'Jmn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'months' => ['Januali', 'Febluali', 'Machi', 'Aplili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ksf.php b/vendor/nesbot/carbon/src/Carbon/Lang/ksf.php deleted file mode 100644 index 84a5967..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ksf.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['sárúwá', 'cɛɛ́nko'], - 'weekdays' => ['sɔ́ndǝ', 'lǝndí', 'maadí', 'mɛkrɛdí', 'jǝǝdí', 'júmbá', 'samdí'], - 'weekdays_short' => ['sɔ́n', 'lǝn', 'maa', 'mɛk', 'jǝǝ', 'júm', 'sam'], - 'weekdays_min' => ['sɔ́n', 'lǝn', 'maa', 'mɛk', 'jǝǝ', 'júm', 'sam'], - 'months' => ['ŋwíí a ntɔ́ntɔ', 'ŋwíí akǝ bɛ́ɛ', 'ŋwíí akǝ ráá', 'ŋwíí akǝ nin', 'ŋwíí akǝ táan', 'ŋwíí akǝ táafɔk', 'ŋwíí akǝ táabɛɛ', 'ŋwíí akǝ táaraa', 'ŋwíí akǝ táanin', 'ŋwíí akǝ ntɛk', 'ŋwíí akǝ ntɛk di bɔ́k', 'ŋwíí akǝ ntɛk di bɛ́ɛ'], - 'months_short' => ['ŋ1', 'ŋ2', 'ŋ3', 'ŋ4', 'ŋ5', 'ŋ6', 'ŋ7', 'ŋ8', 'ŋ9', 'ŋ10', 'ŋ11', 'ŋ12'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ksh.php b/vendor/nesbot/carbon/src/Carbon/Lang/ksh.php deleted file mode 100644 index 95457e2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ksh.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['v.M.', 'n.M.'], - 'weekdays' => ['Sunndaach', 'Mohndaach', 'Dinnsdaach', 'Metwoch', 'Dunnersdaach', 'Friidaach', 'Samsdaach'], - 'weekdays_short' => ['Su.', 'Mo.', 'Di.', 'Me.', 'Du.', 'Fr.', 'Sa.'], - 'weekdays_min' => ['Su', 'Mo', 'Di', 'Me', 'Du', 'Fr', 'Sa'], - 'months' => ['Jannewa', 'Fäbrowa', 'Määz', 'Aprell', 'Mai', 'Juuni', 'Juuli', 'Oujoß', 'Septämber', 'Oktohber', 'Novämber', 'Dezämber'], - 'months_short' => ['Jan', 'Fäb', 'Mäz', 'Apr', 'Mai', 'Jun', 'Jul', 'Ouj', 'Säp', 'Okt', 'Nov', 'Dez'], - 'months_short_standalone' => ['Jan.', 'Fäb.', 'Mäz.', 'Apr.', 'Mai', 'Jun.', 'Jul.', 'Ouj.', 'Säp.', 'Okt.', 'Nov.', 'Dez.'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D. M. YYYY', - 'LL' => 'D. MMM. YYYY', - 'LLL' => 'D. MMMM YYYY HH:mm', - 'LLLL' => 'dddd, [dä] D. MMMM YYYY HH:mm', - ], - - 'year' => ':count Johr', - 'y' => ':count Johr', - 'a_year' => ':count Johr', - - 'month' => ':count Moohnd', - 'm' => ':count Moohnd', - 'a_month' => ':count Moohnd', - - 'week' => ':count woch', - 'w' => ':count woch', - 'a_week' => ':count woch', - - 'day' => ':count Daach', - 'd' => ':count Daach', - 'a_day' => ':count Daach', - - 'hour' => ':count Uhr', - 'h' => ':count Uhr', - 'a_hour' => ':count Uhr', - - 'minute' => ':count Menutt', - 'min' => ':count Menutt', - 'a_minute' => ':count Menutt', - - 'second' => ':count Sekůndt', - 's' => ':count Sekůndt', - 'a_second' => ':count Sekůndt', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ku.php b/vendor/nesbot/carbon/src/Carbon/Lang/ku.php deleted file mode 100644 index 189960c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ku.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Unicode, Inc. - */ - -return [ - 'ago' => 'berî :time', - 'from_now' => 'di :time de', - 'after' => ':time piştî', - 'before' => ':time berê', - 'year' => ':count sal', - 'year_ago' => ':count salê|:count salan', - 'year_from_now' => 'salekê|:count salan', - 'month' => ':count meh', - 'week' => ':count hefte', - 'day' => ':count roj', - 'hour' => ':count saet', - 'minute' => ':count deqîqe', - 'second' => ':count saniye', - 'months' => ['rêbendanê', 'reşemiyê', 'adarê', 'avrêlê', 'gulanê', 'pûşperê', 'tîrmehê', 'gelawêjê', 'rezberê', 'kewçêrê', 'sermawezê', 'berfanbarê'], - 'months_standalone' => ['rêbendan', 'reşemî', 'adar', 'avrêl', 'gulan', 'pûşper', 'tîrmeh', 'gelawêj', 'rezber', 'kewçêr', 'sermawez', 'berfanbar'], - 'months_short' => ['rêb', 'reş', 'ada', 'avr', 'gul', 'pûş', 'tîr', 'gel', 'rez', 'kew', 'ser', 'ber'], - 'weekdays' => ['yekşem', 'duşem', 'sêşem', 'çarşem', 'pêncşem', 'în', 'şemî'], - 'weekdays_short' => ['yş', 'dş', 'sş', 'çş', 'pş', 'în', 'ş'], - 'weekdays_min' => ['Y', 'D', 'S', 'Ç', 'P', 'Î', 'Ş'], - 'list' => [', ', ' û '], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ku_TR.php b/vendor/nesbot/carbon/src/Carbon/Lang/ku_TR.php deleted file mode 100644 index 4243a82..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ku_TR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ku.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kw.php b/vendor/nesbot/carbon/src/Carbon/Lang/kw.php deleted file mode 100644 index 26e242e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kw.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/kw_GB.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/kw_GB.php b/vendor/nesbot/carbon/src/Carbon/Lang/kw_GB.php deleted file mode 100644 index 00bf52b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/kw_GB.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Alastair McKinstry bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['mis Genver', 'mis Hwevrer', 'mis Meurth', 'mis Ebrel', 'mis Me', 'mis Metheven', 'mis Gortheren', 'mis Est', 'mis Gwynngala', 'mis Hedra', 'mis Du', 'mis Kevardhu'], - 'months_short' => ['Gen', 'Hwe', 'Meu', 'Ebr', 'Me', 'Met', 'Gor', 'Est', 'Gwn', 'Hed', 'Du', 'Kev'], - 'weekdays' => ['De Sul', 'De Lun', 'De Merth', 'De Merher', 'De Yow', 'De Gwener', 'De Sadorn'], - 'weekdays_short' => ['Sul', 'Lun', 'Mth', 'Mhr', 'Yow', 'Gwe', 'Sad'], - 'weekdays_min' => ['Sul', 'Lun', 'Mth', 'Mhr', 'Yow', 'Gwe', 'Sad'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count bledhen', - 'y' => ':count bledhen', - 'a_year' => ':count bledhen', - - 'month' => ':count mis', - 'm' => ':count mis', - 'a_month' => ':count mis', - - 'week' => ':count seythen', - 'w' => ':count seythen', - 'a_week' => ':count seythen', - - 'day' => ':count dydh', - 'd' => ':count dydh', - 'a_day' => ':count dydh', - - 'hour' => ':count eur', - 'h' => ':count eur', - 'a_hour' => ':count eur', - - 'minute' => ':count mynysen', - 'min' => ':count mynysen', - 'a_minute' => ':count mynysen', - - 'second' => ':count pryjwyth', - 's' => ':count pryjwyth', - 'a_second' => ':count pryjwyth', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ky.php b/vendor/nesbot/carbon/src/Carbon/Lang/ky.php deleted file mode 100644 index e0d1af1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ky.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - acutexyz - * - Josh Soref - * - François B - * - Chyngyz Arystan uulu - * - Chyngyz - * - acutexyz - * - Josh Soref - * - François B - * - Chyngyz Arystan uulu - */ -return [ - 'year' => ':count жыл', - 'a_year' => '{1}бир жыл|:count жыл', - 'y' => ':count жыл', - 'month' => ':count ай', - 'a_month' => '{1}бир ай|:count ай', - 'm' => ':count ай', - 'week' => ':count апта', - 'a_week' => '{1}бир апта|:count апта', - 'w' => ':count апт.', - 'day' => ':count күн', - 'a_day' => '{1}бир күн|:count күн', - 'd' => ':count күн', - 'hour' => ':count саат', - 'a_hour' => '{1}бир саат|:count саат', - 'h' => ':count саат.', - 'minute' => ':count мүнөт', - 'a_minute' => '{1}бир мүнөт|:count мүнөт', - 'min' => ':count мүн.', - 'second' => ':count секунд', - 'a_second' => '{1}бирнече секунд|:count секунд', - 's' => ':count сек.', - 'ago' => ':time мурун', - 'from_now' => ':time ичинде', - 'diff_now' => 'азыр', - 'diff_today' => 'Бүгүн', - 'diff_today_regexp' => 'Бүгүн(?:\\s+саат)?', - 'diff_yesterday' => 'кечээ', - 'diff_yesterday_regexp' => 'Кече(?:\\s+саат)?', - 'diff_tomorrow' => 'эртең', - 'diff_tomorrow_regexp' => 'Эртең(?:\\s+саат)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Бүгүн саат] LT', - 'nextDay' => '[Эртең саат] LT', - 'nextWeek' => 'dddd [саат] LT', - 'lastDay' => '[Кече саат] LT', - 'lastWeek' => '[Өткен аптанын] dddd [күнү] [саат] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - static $suffixes = [ - 0 => '-чү', - 1 => '-чи', - 2 => '-чи', - 3 => '-чү', - 4 => '-чү', - 5 => '-чи', - 6 => '-чы', - 7 => '-чи', - 8 => '-чи', - 9 => '-чу', - 10 => '-чу', - 20 => '-чы', - 30 => '-чу', - 40 => '-чы', - 50 => '-чү', - 60 => '-чы', - 70 => '-чи', - 80 => '-чи', - 90 => '-чу', - 100 => '-чү', - ]; - - return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); - }, - 'months' => ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], - 'months_short' => ['янв', 'фев', 'март', 'апр', 'май', 'июнь', 'июль', 'авг', 'сен', 'окт', 'ноя', 'дек'], - 'weekdays' => ['Жекшемби', 'Дүйшөмбү', 'Шейшемби', 'Шаршемби', 'Бейшемби', 'Жума', 'Ишемби'], - 'weekdays_short' => ['Жек', 'Дүй', 'Шей', 'Шар', 'Бей', 'Жум', 'Ише'], - 'weekdays_min' => ['Жк', 'Дй', 'Шй', 'Шр', 'Бй', 'Жм', 'Иш'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => ' ', - 'meridiem' => ['таңкы', 'түштөн кийинки'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ky_KG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ky_KG.php deleted file mode 100644 index 9923a31..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ky_KG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ky.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lag.php b/vendor/nesbot/carbon/src/Carbon/Lang/lag.php deleted file mode 100644 index f3f57f6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lag.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['TOO', 'MUU'], - 'weekdays' => ['Jumapíiri', 'Jumatátu', 'Jumaíne', 'Jumatáano', 'Alamíisi', 'Ijumáa', 'Jumamóosi'], - 'weekdays_short' => ['Píili', 'Táatu', 'Íne', 'Táano', 'Alh', 'Ijm', 'Móosi'], - 'weekdays_min' => ['Píili', 'Táatu', 'Íne', 'Táano', 'Alh', 'Ijm', 'Móosi'], - 'months' => ['Kʉfúngatɨ', 'Kʉnaanɨ', 'Kʉkeenda', 'Kwiikumi', 'Kwiinyambála', 'Kwiidwaata', 'Kʉmʉʉnchɨ', 'Kʉvɨɨrɨ', 'Kʉsaatʉ', 'Kwiinyi', 'Kʉsaano', 'Kʉsasatʉ'], - 'months_short' => ['Fúngatɨ', 'Naanɨ', 'Keenda', 'Ikúmi', 'Inyambala', 'Idwaata', 'Mʉʉnchɨ', 'Vɨɨrɨ', 'Saatʉ', 'Inyi', 'Saano', 'Sasatʉ'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lb.php b/vendor/nesbot/carbon/src/Carbon/Lang/lb.php deleted file mode 100644 index 7636655..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lb.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Tsutomu Kuroda - * - dan-nl - * - Simon Lelorrain (slelorrain) - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count Joer', - 'y' => ':countJ', - 'month' => ':count Mount|:count Méint', - 'm' => ':countMo', - 'week' => ':count Woch|:count Wochen', - 'w' => ':countWo|:countWo', - 'day' => ':count Dag|:count Deeg', - 'd' => ':countD', - 'hour' => ':count Stonn|:count Stonnen', - 'h' => ':countSto', - 'minute' => ':count Minutt|:count Minutten', - 'min' => ':countM', - 'second' => ':count Sekonn|:count Sekonnen', - 's' => ':countSek', - - 'ago' => 'virun :time', - 'from_now' => 'an :time', - 'before' => ':time virdrun', - 'after' => ':time duerno', - - 'diff_today' => 'Haut', - 'diff_yesterday' => 'Gëschter', - 'diff_yesterday_regexp' => 'Gëschter(?:\\s+um)?', - 'diff_tomorrow' => 'Muer', - 'diff_tomorrow_regexp' => 'Muer(?:\\s+um)?', - 'diff_today_regexp' => 'Haut(?:\\s+um)?', - 'formats' => [ - 'LT' => 'H:mm [Auer]', - 'LTS' => 'H:mm:ss [Auer]', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY H:mm [Auer]', - 'LLLL' => 'dddd, D. MMMM YYYY H:mm [Auer]', - ], - - 'calendar' => [ - 'sameDay' => '[Haut um] LT', - 'nextDay' => '[Muer um] LT', - 'nextWeek' => 'dddd [um] LT', - 'lastDay' => '[Gëschter um] LT', - 'lastWeek' => function (CarbonInterface $date) { - // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule - switch ($date->dayOfWeek) { - case 2: - case 4: - return '[Leschten] dddd [um] LT'; - default: - return '[Leschte] dddd [um] LT'; - } - }, - 'sameElse' => 'L', - ], - - 'months' => ['Januar', 'Februar', 'Mäerz', 'Abrëll', 'Mee', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], - 'months_short' => ['Jan.', 'Febr.', 'Mrz.', 'Abr.', 'Mee', 'Jun.', 'Jul.', 'Aug.', 'Sept.', 'Okt.', 'Nov.', 'Dez.'], - 'weekdays' => ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'], - 'weekdays_short' => ['So.', 'Mé.', 'Dë.', 'Më.', 'Do.', 'Fr.', 'Sa.'], - 'weekdays_min' => ['So', 'Mé', 'Dë', 'Më', 'Do', 'Fr', 'Sa'], - 'ordinal' => ':number.', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' an '], - 'meridiem' => ['moies', 'mëttes'], - 'weekdays_short_standalone' => ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'], - 'months_short_standalone' => ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lb_LU.php b/vendor/nesbot/carbon/src/Carbon/Lang/lb_LU.php deleted file mode 100644 index 414bd4d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lb_LU.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/lb.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lg.php b/vendor/nesbot/carbon/src/Carbon/Lang/lg.php deleted file mode 100644 index 48bc68b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lg.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/lg_UG.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lg_UG.php b/vendor/nesbot/carbon/src/Carbon/Lang/lg_UG.php deleted file mode 100644 index aa02214..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lg_UG.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Akademe ya Luganda Kizito Birabwa kompyuta@kizito.uklinux.net - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Janwaliyo', 'Febwaliyo', 'Marisi', 'Apuli', 'Maayi', 'Juuni', 'Julaayi', 'Agusito', 'Sebuttemba', 'Okitobba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apu', 'Maa', 'Juu', 'Jul', 'Agu', 'Seb', 'Oki', 'Nov', 'Des'], - 'weekdays' => ['Sabiiti', 'Balaza', 'Lwakubiri', 'Lwakusatu', 'Lwakuna', 'Lwakutaano', 'Lwamukaaga'], - 'weekdays_short' => ['Sab', 'Bal', 'Lw2', 'Lw3', 'Lw4', 'Lw5', 'Lw6'], - 'weekdays_min' => ['Sab', 'Bal', 'Lw2', 'Lw3', 'Lw4', 'Lw5', 'Lw6'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'month' => ':count njuba', // less reliable - 'm' => ':count njuba', // less reliable - 'a_month' => ':count njuba', // less reliable - - 'year' => ':count mwaaka', - 'y' => ':count mwaaka', - 'a_year' => ':count mwaaka', - - 'week' => ':count sabbiiti', - 'w' => ':count sabbiiti', - 'a_week' => ':count sabbiiti', - - 'day' => ':count lunaku', - 'd' => ':count lunaku', - 'a_day' => ':count lunaku', - - 'hour' => 'saawa :count', - 'h' => 'saawa :count', - 'a_hour' => 'saawa :count', - - 'minute' => 'ddakiika :count', - 'min' => 'ddakiika :count', - 'a_minute' => 'ddakiika :count', - - 'second' => ':count kyʼokubiri', - 's' => ':count kyʼokubiri', - 'a_second' => ':count kyʼokubiri', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/li.php b/vendor/nesbot/carbon/src/Carbon/Lang/li.php deleted file mode 100644 index 86c3009..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/li.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/li_NL.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/li_NL.php b/vendor/nesbot/carbon/src/Carbon/Lang/li_NL.php deleted file mode 100644 index 6c5feb7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/li_NL.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandriva.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['jannewarie', 'fibberwarie', 'miert', 'eprèl', 'meij', 'junie', 'julie', 'augustus', 'september', 'oktober', 'november', 'desember'], - 'months_short' => ['jan', 'fib', 'mie', 'epr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], - 'weekdays' => ['zóndig', 'maondig', 'daensdig', 'goonsdig', 'dónderdig', 'vriedig', 'zaoterdig'], - 'weekdays_short' => ['zón', 'mao', 'dae', 'goo', 'dón', 'vri', 'zao'], - 'weekdays_min' => ['zón', 'mao', 'dae', 'goo', 'dón', 'vri', 'zao'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'minute' => ':count momênt', // less reliable - 'min' => ':count momênt', // less reliable - 'a_minute' => ':count momênt', // less reliable - - 'year' => ':count jaor', - 'y' => ':count jaor', - 'a_year' => ':count jaor', - - 'month' => ':count maond', - 'm' => ':count maond', - 'a_month' => ':count maond', - - 'week' => ':count waek', - 'w' => ':count waek', - 'a_week' => ':count waek', - - 'day' => ':count daag', - 'd' => ':count daag', - 'a_day' => ':count daag', - - 'hour' => ':count oer', - 'h' => ':count oer', - 'a_hour' => ':count oer', - - 'second' => ':count Secónd', - 's' => ':count Secónd', - 'a_second' => ':count Secónd', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lij.php b/vendor/nesbot/carbon/src/Carbon/Lang/lij.php deleted file mode 100644 index 45732b5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lij.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/lij_IT.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lij_IT.php b/vendor/nesbot/carbon/src/Carbon/Lang/lij_IT.php deleted file mode 100644 index f8726fd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lij_IT.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Gastaldi alessio.gastaldi@libero.it - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['zenâ', 'fevrâ', 'marzo', 'avrî', 'mazzo', 'zûgno', 'lûggio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dixembre'], - 'months_short' => ['zen', 'fev', 'mar', 'arv', 'maz', 'zûg', 'lûg', 'ago', 'set', 'ött', 'nov', 'dix'], - 'weekdays' => ['domenega', 'lûnedì', 'martedì', 'mercUrdì', 'zêggia', 'venardì', 'sabbo'], - 'weekdays_short' => ['dom', 'lûn', 'mar', 'mer', 'zêu', 'ven', 'sab'], - 'weekdays_min' => ['dom', 'lûn', 'mar', 'mer', 'zêu', 'ven', 'sab'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count etæ', // less reliable - 'y' => ':count etæ', // less reliable - 'a_year' => ':count etæ', // less reliable - - 'month' => ':count meize', - 'm' => ':count meize', - 'a_month' => ':count meize', - - 'week' => ':count settemannha', - 'w' => ':count settemannha', - 'a_week' => ':count settemannha', - - 'day' => ':count giorno', - 'd' => ':count giorno', - 'a_day' => ':count giorno', - - 'hour' => ':count reléuio', // less reliable - 'h' => ':count reléuio', // less reliable - 'a_hour' => ':count reléuio', // less reliable - - 'minute' => ':count menûo', - 'min' => ':count menûo', - 'a_minute' => ':count menûo', - - 'second' => ':count segondo', - 's' => ':count segondo', - 'a_second' => ':count segondo', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lkt.php b/vendor/nesbot/carbon/src/Carbon/Lang/lkt.php deleted file mode 100644 index ae73a97..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lkt.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - - 'month' => ':count haŋwí', // less reliable - 'm' => ':count haŋwí', // less reliable - 'a_month' => ':count haŋwí', // less reliable - - 'week' => ':count šakówiŋ', // less reliable - 'w' => ':count šakówiŋ', // less reliable - 'a_week' => ':count šakówiŋ', // less reliable - - 'hour' => ':count maza škaŋškaŋ', // less reliable - 'h' => ':count maza škaŋškaŋ', // less reliable - 'a_hour' => ':count maza škaŋškaŋ', // less reliable - - 'minute' => ':count číkʼala', // less reliable - 'min' => ':count číkʼala', // less reliable - 'a_minute' => ':count číkʼala', // less reliable - - 'year' => ':count waníyetu', - 'y' => ':count waníyetu', - 'a_year' => ':count waníyetu', - - 'day' => ':count aŋpétu', - 'd' => ':count aŋpétu', - 'a_day' => ':count aŋpétu', - - 'second' => ':count icinuŋpa', - 's' => ':count icinuŋpa', - 'a_second' => ':count icinuŋpa', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ln.php b/vendor/nesbot/carbon/src/Carbon/Lang/ln.php deleted file mode 100644 index 9d5c35d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ln.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ubuntu René Manassé GALEKWA renemanasse@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'months' => ['sánzá ya yambo', 'sánzá ya míbalé', 'sánzá ya mísáto', 'sánzá ya mínei', 'sánzá ya mítáno', 'sánzá ya motóbá', 'sánzá ya nsambo', 'sánzá ya mwambe', 'sánzá ya libwa', 'sánzá ya zómi', 'sánzá ya zómi na mɔ̌kɔ́', 'sánzá ya zómi na míbalé'], - 'months_short' => ['yan', 'fbl', 'msi', 'apl', 'mai', 'yun', 'yul', 'agt', 'stb', 'ɔtb', 'nvb', 'dsb'], - 'weekdays' => ['Lomíngo', 'Mosálá mɔ̌kɔ́', 'Misálá míbalé', 'Misálá mísáto', 'Misálá mínei', 'Misálá mítáno', 'Mpɔ́sɔ'], - 'weekdays_short' => ['m1.', 'm2.', 'm3.', 'm4.', 'm5.', 'm6.', 'm7.'], - 'weekdays_min' => ['m1.', 'm2.', 'm3.', 'm4.', 'm5.', 'm6.', 'm7.'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => 'mbula :count', - 'y' => 'mbula :count', - 'a_year' => 'mbula :count', - - 'month' => 'sánzá :count', - 'm' => 'sánzá :count', - 'a_month' => 'sánzá :count', - - 'week' => 'mpɔ́sɔ :count', - 'w' => 'mpɔ́sɔ :count', - 'a_week' => 'mpɔ́sɔ :count', - - 'day' => 'mokɔlɔ :count', - 'd' => 'mokɔlɔ :count', - 'a_day' => 'mokɔlɔ :count', - - 'hour' => 'ngonga :count', - 'h' => 'ngonga :count', - 'a_hour' => 'ngonga :count', - - 'minute' => 'miniti :count', - 'min' => 'miniti :count', - 'a_minute' => 'miniti :count', - - 'second' => 'segɔnde :count', - 's' => 'segɔnde :count', - 'a_second' => 'segɔnde :count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ln_AO.php b/vendor/nesbot/carbon/src/Carbon/Lang/ln_AO.php deleted file mode 100644 index 7fdb7f1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ln_AO.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ln.php', [ - 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], - 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], - 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], - 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ln_CD.php b/vendor/nesbot/carbon/src/Carbon/Lang/ln_CD.php deleted file mode 100644 index 13635fc..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ln_CD.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ubuntu René Manassé GALEKWA renemanasse@gmail.com - */ -return require __DIR__.'/ln.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ln_CF.php b/vendor/nesbot/carbon/src/Carbon/Lang/ln_CF.php deleted file mode 100644 index 7fdb7f1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ln_CF.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ln.php', [ - 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], - 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], - 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], - 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ln_CG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ln_CG.php deleted file mode 100644 index 7fdb7f1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ln_CG.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ln.php', [ - 'weekdays' => ['eyenga', 'mokɔlɔ mwa yambo', 'mokɔlɔ mwa míbalé', 'mokɔlɔ mwa mísáto', 'mokɔlɔ ya mínéi', 'mokɔlɔ ya mítáno', 'mpɔ́sɔ'], - 'weekdays_short' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], - 'weekdays_min' => ['eye', 'ybo', 'mbl', 'mst', 'min', 'mtn', 'mps'], - 'meridiem' => ['ntɔ́ngɔ́', 'mpókwa'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lo.php b/vendor/nesbot/carbon/src/Carbon/Lang/lo.php deleted file mode 100644 index 48715f5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lo.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - ryanhart2 - */ -return [ - 'year' => ':count ປີ', - 'y' => ':count ປີ', - 'month' => ':count ເດືອນ', - 'm' => ':count ດ. ', - 'week' => ':count ອາທິດ', - 'w' => ':count ອທ. ', - 'day' => ':count ມື້', - 'd' => ':count ມື້', - 'hour' => ':count ຊົ່ວໂມງ', - 'h' => ':count ຊມ. ', - 'minute' => ':count ນາທີ', - 'min' => ':count ນທ. ', - 'second' => '{1}ບໍ່ເທົ່າໃດວິນາທີ|]1,Inf[:count ວິນາທີ', - 's' => ':count ວິ. ', - 'ago' => ':timeຜ່ານມາ', - 'from_now' => 'ອີກ :time', - 'diff_now' => 'ຕອນນີ້', - 'diff_today' => 'ມື້ນີ້ເວລາ', - 'diff_yesterday' => 'ມື້ວານນີ້ເວລາ', - 'diff_tomorrow' => 'ມື້ອື່ນເວລາ', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'ວັນdddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[ມື້ນີ້ເວລາ] LT', - 'nextDay' => '[ມື້ອື່ນເວລາ] LT', - 'nextWeek' => '[ວັນ]dddd[ໜ້າເວລາ] LT', - 'lastDay' => '[ມື້ວານນີ້ເວລາ] LT', - 'lastWeek' => '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', - 'sameElse' => 'L', - ], - 'ordinal' => 'ທີ່:number', - 'meridiem' => ['ຕອນເຊົ້າ', 'ຕອນແລງ'], - 'months' => ['ມັງກອນ', 'ກຸມພາ', 'ມີນາ', 'ເມສາ', 'ພຶດສະພາ', 'ມິຖຸນາ', 'ກໍລະກົດ', 'ສິງຫາ', 'ກັນຍາ', 'ຕຸລາ', 'ພະຈິກ', 'ທັນວາ'], - 'months_short' => ['ມັງກອນ', 'ກຸມພາ', 'ມີນາ', 'ເມສາ', 'ພຶດສະພາ', 'ມິຖຸນາ', 'ກໍລະກົດ', 'ສິງຫາ', 'ກັນຍາ', 'ຕຸລາ', 'ພະຈິກ', 'ທັນວາ'], - 'weekdays' => ['ອາທິດ', 'ຈັນ', 'ອັງຄານ', 'ພຸດ', 'ພະຫັດ', 'ສຸກ', 'ເສົາ'], - 'weekdays_short' => ['ທິດ', 'ຈັນ', 'ອັງຄານ', 'ພຸດ', 'ພະຫັດ', 'ສຸກ', 'ເສົາ'], - 'weekdays_min' => ['ທ', 'ຈ', 'ອຄ', 'ພ', 'ພຫ', 'ສກ', 'ສ'], - 'list' => [', ', 'ແລະ '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lo_LA.php b/vendor/nesbot/carbon/src/Carbon/Lang/lo_LA.php deleted file mode 100644 index 9b7fd9b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lo_LA.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/lo.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lrc.php b/vendor/nesbot/carbon/src/Carbon/Lang/lrc.php deleted file mode 100644 index 546e679..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lrc.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - - 'minute' => ':count هنر', // less reliable - 'min' => ':count هنر', // less reliable - 'a_minute' => ':count هنر', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lrc_IQ.php b/vendor/nesbot/carbon/src/Carbon/Lang/lrc_IQ.php deleted file mode 100644 index d42f5e9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lrc_IQ.php +++ /dev/null @@ -1,13 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/lrc.php', [ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lt.php b/vendor/nesbot/carbon/src/Carbon/Lang/lt.php deleted file mode 100644 index 7d1b6f7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lt.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Tsutomu Kuroda - * - tjku - * - valdas406 - * - Justas Palumickas - * - Max Melentiev - * - Andrius Janauskas - * - Juanito Fatas - * - Akira Matsuda - * - Christopher Dell - * - Enrique Vidal - * - Simone Carletti - * - Aaron Patterson - * - Nicolás Hock Isaza - * - Laurynas Butkus - * - Sven Fuchs - * - Dominykas Tijūnaitis - * - Justinas Bolys - * - Ričardas - * - Kirill Chalkin - * - Rolandas - * - Justinas (Gamesh) - */ -return [ - 'year' => ':count metai|:count metai|:count metų', - 'y' => ':count m.', - 'month' => ':count mėnuo|:count mėnesiai|:count mėnesį', - 'm' => ':count mėn.', - 'week' => ':count savaitė|:count savaitės|:count savaitę', - 'w' => ':count sav.', - 'day' => ':count diena|:count dienos|:count dienų', - 'd' => ':count d.', - 'hour' => ':count valanda|:count valandos|:count valandų', - 'h' => ':count val.', - 'minute' => ':count minutė|:count minutės|:count minutę', - 'min' => ':count min.', - 'second' => ':count sekundė|:count sekundės|:count sekundžių', - 's' => ':count sek.', - - 'year_ago' => ':count metus|:count metus|:count metų', - 'month_ago' => ':count mėnesį|:count mėnesius|:count mėnesių', - 'week_ago' => ':count savaitę|:count savaites|:count savaičių', - 'day_ago' => ':count dieną|:count dienas|:count dienų', - 'hour_ago' => ':count valandą|:count valandas|:count valandų', - 'minute_ago' => ':count minutę|:count minutes|:count minučių', - 'second_ago' => ':count sekundę|:count sekundes|:count sekundžių', - - 'year_from_now' => ':count metų', - 'month_from_now' => ':count mėnesio|:count mėnesių|:count mėnesių', - 'week_from_now' => ':count savaitės|:count savaičių|:count savaičių', - 'day_from_now' => ':count dienos|:count dienų|:count dienų', - 'hour_from_now' => ':count valandos|:count valandų|:count valandų', - 'minute_from_now' => ':count minutės|:count minučių|:count minučių', - 'second_from_now' => ':count sekundės|:count sekundžių|:count sekundžių', - - 'year_after' => ':count metų', - 'month_after' => ':count mėnesio|:count mėnesių|:count mėnesių', - 'week_after' => ':count savaitės|:count savaičių|:count savaičių', - 'day_after' => ':count dienos|:count dienų|:count dienų', - 'hour_after' => ':count valandos|:count valandų|:count valandų', - 'minute_after' => ':count minutės|:count minučių|:count minučių', - 'second_after' => ':count sekundės|:count sekundžių|:count sekundžių', - - 'ago' => 'prieš :time', - 'from_now' => ':time nuo dabar', - 'after' => 'po :time', - 'before' => 'už :time', - - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'diff_now' => 'ką tik', - 'diff_today' => 'Šiandien', - 'diff_yesterday' => 'vakar', - 'diff_yesterday_regexp' => 'Vakar', - 'diff_tomorrow' => 'rytoj', - 'diff_tomorrow_regexp' => 'Rytoj', - 'diff_before_yesterday' => 'užvakar', - 'diff_after_tomorrow' => 'poryt', - - 'period_recurrences' => 'kartą|:count kartų', - 'period_interval' => 'kiekvieną :interval', - 'period_start_date' => 'nuo :date', - 'period_end_date' => 'iki :date', - - 'months' => ['sausio', 'vasario', 'kovo', 'balandžio', 'gegužės', 'birželio', 'liepos', 'rugpjūčio', 'rugsėjo', 'spalio', 'lapkričio', 'gruodžio'], - 'months_standalone' => ['sausis', 'vasaris', 'kovas', 'balandis', 'gegužė', 'birželis', 'liepa', 'rugpjūtis', 'rugsėjis', 'spalis', 'lapkritis', 'gruodis'], - 'months_regexp' => '/(L{2,4}|D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?)/', - 'months_short' => ['sau', 'vas', 'kov', 'bal', 'geg', 'bir', 'lie', 'rgp', 'rgs', 'spa', 'lap', 'gru'], - 'weekdays' => ['sekmadienį', 'pirmadienį', 'antradienį', 'trečiadienį', 'ketvirtadienį', 'penktadienį', 'šeštadienį'], - 'weekdays_standalone' => ['sekmadienis', 'pirmadienis', 'antradienis', 'trečiadienis', 'ketvirtadienis', 'penktadienis', 'šeštadienis'], - 'weekdays_short' => ['sek', 'pir', 'ant', 'tre', 'ket', 'pen', 'šeš'], - 'weekdays_min' => ['se', 'pi', 'an', 'tr', 'ke', 'pe', 'še'], - 'list' => [', ', ' ir '], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'MMMM DD, YYYY', - 'LLL' => 'DD MMM HH:mm', - 'LLLL' => 'MMMM DD, YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Šiandien] LT', - 'nextDay' => '[Rytoj] LT', - 'nextWeek' => 'dddd LT', - 'lastDay' => '[Vakar] LT', - 'lastWeek' => '[Paskutinį] dddd LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - switch ($number) { - case 0: - return '0-is'; - case 3: - return '3-ias'; - default: - return "$number-as"; - } - }, - 'meridiem' => ['priešpiet', 'popiet'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lt_LT.php b/vendor/nesbot/carbon/src/Carbon/Lang/lt_LT.php deleted file mode 100644 index f772d38..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lt_LT.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/lt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lu.php b/vendor/nesbot/carbon/src/Carbon/Lang/lu.php deleted file mode 100644 index c8cd83a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lu.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Dinda', 'Dilolo'], - 'weekdays' => ['Lumingu', 'Nkodya', 'Ndàayà', 'Ndangù', 'Njòwa', 'Ngòvya', 'Lubingu'], - 'weekdays_short' => ['Lum', 'Nko', 'Ndy', 'Ndg', 'Njw', 'Ngv', 'Lub'], - 'weekdays_min' => ['Lum', 'Nko', 'Ndy', 'Ndg', 'Njw', 'Ngv', 'Lub'], - 'months' => ['Ciongo', 'Lùishi', 'Lusòlo', 'Mùuyà', 'Lumùngùlù', 'Lufuimi', 'Kabàlàshìpù', 'Lùshìkà', 'Lutongolo', 'Lungùdi', 'Kaswèkèsè', 'Ciswà'], - 'months_short' => ['Cio', 'Lui', 'Lus', 'Muu', 'Lum', 'Luf', 'Kab', 'Lush', 'Lut', 'Lun', 'Kas', 'Cis'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/luo.php b/vendor/nesbot/carbon/src/Carbon/Lang/luo.php deleted file mode 100644 index b55af73..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/luo.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['OD', 'OT'], - 'weekdays' => ['Jumapil', 'Wuok Tich', 'Tich Ariyo', 'Tich Adek', 'Tich Ang’wen', 'Tich Abich', 'Ngeso'], - 'weekdays_short' => ['JMP', 'WUT', 'TAR', 'TAD', 'TAN', 'TAB', 'NGS'], - 'weekdays_min' => ['JMP', 'WUT', 'TAR', 'TAD', 'TAN', 'TAB', 'NGS'], - 'months' => ['Dwe mar Achiel', 'Dwe mar Ariyo', 'Dwe mar Adek', 'Dwe mar Ang’wen', 'Dwe mar Abich', 'Dwe mar Auchiel', 'Dwe mar Abiriyo', 'Dwe mar Aboro', 'Dwe mar Ochiko', 'Dwe mar Apar', 'Dwe mar gi achiel', 'Dwe mar Apar gi ariyo'], - 'months_short' => ['DAC', 'DAR', 'DAD', 'DAN', 'DAH', 'DAU', 'DAO', 'DAB', 'DOC', 'DAP', 'DGI', 'DAG'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - 'year' => 'higni :count', - 'y' => 'higni :count', - 'a_year' => ':higni :count', - - 'month' => 'dweche :count', - 'm' => 'dweche :count', - 'a_month' => 'dweche :count', - - 'week' => 'jumbe :count', - 'w' => 'jumbe :count', - 'a_week' => 'jumbe :count', - - 'day' => 'ndalo :count', - 'd' => 'ndalo :count', - 'a_day' => 'ndalo :count', - - 'hour' => 'seche :count', - 'h' => 'seche :count', - 'a_hour' => 'seche :count', - - 'minute' => 'dakika :count', - 'min' => 'dakika :count', - 'a_minute' => 'dakika :count', - - 'second' => 'nus dakika :count', - 's' => 'nus dakika :count', - 'a_second' => 'nus dakika :count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/luy.php b/vendor/nesbot/carbon/src/Carbon/Lang/luy.php deleted file mode 100644 index 2b37e3e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/luy.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['Jumapiri', 'Jumatatu', 'Jumanne', 'Jumatano', 'Murwa wa Kanne', 'Murwa wa Katano', 'Jumamosi'], - 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], - 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], - 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - // Too unreliable - /* - 'year' => ':count liliino', // less reliable - 'y' => ':count liliino', // less reliable - 'a_year' => ':count liliino', // less reliable - - 'month' => ':count kumwesi', // less reliable - 'm' => ':count kumwesi', // less reliable - 'a_month' => ':count kumwesi', // less reliable - - 'week' => ':count olutambi', // less reliable - 'w' => ':count olutambi', // less reliable - 'a_week' => ':count olutambi', // less reliable - - 'day' => ':count luno', // less reliable - 'd' => ':count luno', // less reliable - 'a_day' => ':count luno', // less reliable - - 'hour' => ':count ekengele', // less reliable - 'h' => ':count ekengele', // less reliable - 'a_hour' => ':count ekengele', // less reliable - - 'minute' => ':count omundu', // less reliable - 'min' => ':count omundu', // less reliable - 'a_minute' => ':count omundu', // less reliable - - 'second' => ':count liliino', // less reliable - 's' => ':count liliino', // less reliable - 'a_second' => ':count liliino', // less reliable - */ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lv.php b/vendor/nesbot/carbon/src/Carbon/Lang/lv.php deleted file mode 100644 index d5cba7c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lv.php +++ /dev/null @@ -1,183 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Carbon\CarbonInterface; - -/** - * This file is part of the Carbon package. - * - * (c) Brian Nesbitt - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - pirminis - * - Tsutomu Kuroda - * - tjku - * - Andris Zāģeris - * - Max Melentiev - * - Edgars Beigarts - * - Juanito Fatas - * - Vitauts Stočka - * - Akira Matsuda - * - Christopher Dell - * - Enrique Vidal - * - Simone Carletti - * - Aaron Patterson - * - Kaspars Bankovskis - * - Nicolás Hock Isaza - * - Viesturs Kavacs (Kavacky) - * - zakse - * - Janis Eglitis (janiseglitis) - * - Guntars - * - Juris Sudmalis - */ -$daysOfWeek = ['svētdiena', 'pirmdiena', 'otrdiena', 'trešdiena', 'ceturtdiena', 'piektdiena', 'sestdiena']; -$daysOfWeekLocativum = ['svētdien', 'pirmdien', 'otrdien', 'trešdien', 'ceturtdien', 'piektdien', 'sestdien']; - -$transformDiff = function ($input) { - return strtr($input, [ - // Nominative => "pirms/pēc" Dative - 'gads' => 'gada', - 'gadi' => 'gadiem', - 'gadu' => 'gadiem', - 'mēnesis' => 'mēneša', - 'mēneši' => 'mēnešiem', - 'mēnešu' => 'mēnešiem', - 'nedēļa' => 'nedēļas', - 'nedēļas' => 'nedēļām', - 'nedēļu' => 'nedēļām', - 'diena' => 'dienas', - 'dienas' => 'dienām', - 'dienu' => 'dienām', - 'stunda' => 'stundas', - 'stundas' => 'stundām', - 'stundu' => 'stundām', - 'minūte' => 'minūtes', - 'minūtes' => 'minūtēm', - 'minūšu' => 'minūtēm', - 'sekunde' => 'sekundes', - 'sekundes' => 'sekundēm', - 'sekunžu' => 'sekundēm', - ]); -}; - -return [ - 'ago' => function ($time) use ($transformDiff) { - return 'pirms '.$transformDiff($time); - }, - 'from_now' => function ($time) use ($transformDiff) { - return 'pēc '.$transformDiff($time); - }, - - 'year' => '0 gadu|:count gads|:count gadi', - 'y' => ':count g.', - 'a_year' => '{1}gads|0 gadu|:count gads|:count gadi', - 'month' => '0 mēnešu|:count mēnesis|:count mēneši', - 'm' => ':count mēn.', - 'a_month' => '{1}mēnesis|0 mēnešu|:count mēnesis|:count mēneši', - 'week' => '0 nedēļu|:count nedēļa|:count nedēļas', - 'w' => ':count ned.', - 'a_week' => '{1}nedēļa|0 nedēļu|:count nedēļa|:count nedēļas', - 'day' => '0 dienu|:count diena|:count dienas', - 'd' => ':count d.', - 'a_day' => '{1}diena|0 dienu|:count diena|:count dienas', - 'hour' => '0 stundu|:count stunda|:count stundas', - 'h' => ':count st.', - 'a_hour' => '{1}stunda|0 stundu|:count stunda|:count stundas', - 'minute' => '0 minūšu|:count minūte|:count minūtes', - 'min' => ':count min.', - 'a_minute' => '{1}minūte|0 minūšu|:count minūte|:count minūtes', - 'second' => '0 sekunžu|:count sekunde|:count sekundes', - 's' => ':count sek.', - 'a_second' => '{1}sekunde|0 sekunžu|:count sekunde|:count sekundes', - - 'after' => ':time vēlāk', - 'year_after' => '0 gadus|:count gadu|:count gadus', - 'a_year_after' => '{1}gadu|0 gadus|:count gadu|:count gadus', - 'month_after' => '0 mēnešus|:count mēnesi|:count mēnešus', - 'a_month_after' => '{1}mēnesi|0 mēnešus|:count mēnesi|:count mēnešus', - 'week_after' => '0 nedēļas|:count nedēļu|:count nedēļas', - 'a_week_after' => '{1}nedēļu|0 nedēļas|:count nedēļu|:count nedēļas', - 'day_after' => '0 dienas|:count dienu|:count dienas', - 'a_day_after' => '{1}dienu|0 dienas|:count dienu|:count dienas', - 'hour_after' => '0 stundas|:count stundu|:count stundas', - 'a_hour_after' => '{1}stundu|0 stundas|:count stundu|:count stundas', - 'minute_after' => '0 minūtes|:count minūti|:count minūtes', - 'a_minute_after' => '{1}minūti|0 minūtes|:count minūti|:count minūtes', - 'second_after' => '0 sekundes|:count sekundi|:count sekundes', - 'a_second_after' => '{1}sekundi|0 sekundes|:count sekundi|:count sekundes', - - 'before' => ':time agrāk', - 'year_before' => '0 gadus|:count gadu|:count gadus', - 'a_year_before' => '{1}gadu|0 gadus|:count gadu|:count gadus', - 'month_before' => '0 mēnešus|:count mēnesi|:count mēnešus', - 'a_month_before' => '{1}mēnesi|0 mēnešus|:count mēnesi|:count mēnešus', - 'week_before' => '0 nedēļas|:count nedēļu|:count nedēļas', - 'a_week_before' => '{1}nedēļu|0 nedēļas|:count nedēļu|:count nedēļas', - 'day_before' => '0 dienas|:count dienu|:count dienas', - 'a_day_before' => '{1}dienu|0 dienas|:count dienu|:count dienas', - 'hour_before' => '0 stundas|:count stundu|:count stundas', - 'a_hour_before' => '{1}stundu|0 stundas|:count stundu|:count stundas', - 'minute_before' => '0 minūtes|:count minūti|:count minūtes', - 'a_minute_before' => '{1}minūti|0 minūtes|:count minūti|:count minūtes', - 'second_before' => '0 sekundes|:count sekundi|:count sekundes', - 'a_second_before' => '{1}sekundi|0 sekundes|:count sekundi|:count sekundes', - - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' un '], - - 'diff_now' => 'tagad', - 'diff_today' => 'šodien', - 'diff_yesterday' => 'vakar', - 'diff_before_yesterday' => 'aizvakar', - 'diff_tomorrow' => 'rīt', - 'diff_after_tomorrow' => 'parīt', - - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY.', - 'LL' => 'YYYY. [gada] D. MMMM', - 'LLL' => 'DD.MM.YYYY., HH:mm', - 'LLLL' => 'YYYY. [gada] D. MMMM, HH:mm', - ], - - 'calendar' => [ - 'sameDay' => '[šodien] [plkst.] LT', - 'nextDay' => '[rīt] [plkst.] LT', - 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) use ($daysOfWeekLocativum) { - if ($current->week !== $other->week) { - return '[nākošo] ['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; - } - - return '['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; - }, - 'lastDay' => '[vakar] [plkst.] LT', - 'lastWeek' => function (CarbonInterface $current) use ($daysOfWeekLocativum) { - return '[pagājušo] ['.$daysOfWeekLocativum[$current->dayOfWeek].'] [plkst.] LT'; - }, - 'sameElse' => 'L', - ], - - 'weekdays' => $daysOfWeek, - 'weekdays_short' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], - 'weekdays_min' => ['Sv.', 'P.', 'O.', 'T.', 'C.', 'Pk.', 'S.'], - 'months' => ['janvāris', 'februāris', 'marts', 'aprīlis', 'maijs', 'jūnijs', 'jūlijs', 'augusts', 'septembris', 'oktobris', 'novembris', 'decembris'], - 'months_standalone' => ['janvārī', 'februārī', 'martā', 'aprīlī', 'maijā', 'jūnijā', 'jūlijā', 'augustā', 'septembrī', 'oktobrī', 'novembrī', 'decembrī'], - 'months_short' => ['janv.', 'febr.', 'martā', 'apr.', 'maijā', 'jūn.', 'jūl.', 'aug.', 'sept.', 'okt.', 'nov.', 'dec.'], - 'meridiem' => ['priekšpusdiena', 'pēcpusdiena'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lv_LV.php b/vendor/nesbot/carbon/src/Carbon/Lang/lv_LV.php deleted file mode 100644 index ee91c36..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lv_LV.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/lv.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lzh.php b/vendor/nesbot/carbon/src/Carbon/Lang/lzh.php deleted file mode 100644 index 1180c6b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lzh.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/lzh_TW.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lzh_TW.php b/vendor/nesbot/carbon/src/Carbon/Lang/lzh_TW.php deleted file mode 100644 index 3b1493e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lzh_TW.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'OY[年]MMMMOD[日]', - ], - 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - 'months_short' => [' 一 ', ' 二 ', ' 三 ', ' 四 ', ' 五 ', ' 六 ', ' 七 ', ' 八 ', ' 九 ', ' 十 ', '十一', '十二'], - 'weekdays' => ['週日', '週一', '週二', '週三', '週四', '週五', '週六'], - 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], - 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['〇', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二', '十三', '十四', '十五', '十六', '十七', '十八', '十九', '廿', '廿一', '廿二', '廿三', '廿四', '廿五', '廿六', '廿七', '廿八', '廿九', '卅', '卅一'], - 'meridiem' => ['朝', '暮'], - - 'year' => ':count 夏', // less reliable - 'y' => ':count 夏', // less reliable - 'a_year' => ':count 夏', // less reliable - - 'month' => ':count 月', // less reliable - 'm' => ':count 月', // less reliable - 'a_month' => ':count 月', // less reliable - - 'hour' => ':count 氧', // less reliable - 'h' => ':count 氧', // less reliable - 'a_hour' => ':count 氧', // less reliable - - 'minute' => ':count 點', // less reliable - 'min' => ':count 點', // less reliable - 'a_minute' => ':count 點', // less reliable - - 'second' => ':count 楚', // less reliable - 's' => ':count 楚', // less reliable - 'a_second' => ':count 楚', // less reliable - - 'week' => ':count 星期', - 'w' => ':count 星期', - 'a_week' => ':count 星期', - - 'day' => ':count 日(曆法)', - 'd' => ':count 日(曆法)', - 'a_day' => ':count 日(曆法)', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mag.php b/vendor/nesbot/carbon/src/Carbon/Lang/mag.php deleted file mode 100644 index 7532436..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mag.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/mag_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mag_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/mag_IN.php deleted file mode 100644 index 193f67a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mag_IN.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bhashaghar@googlegroups.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'weekdays' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], - 'weekdays_short' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], - 'weekdays_min' => ['एतवार', 'सोमार', 'मंगर', 'बुध', 'बिफे', 'सूक', 'सनिचर'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mai.php b/vendor/nesbot/carbon/src/Carbon/Lang/mai.php deleted file mode 100644 index 792b973..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mai.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/mai_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mai_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/mai_IN.php deleted file mode 100644 index 03049d4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mai_IN.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Maithili Computing Research Center, Pune, India rajeshkajha@yahoo.com,akhilesh.k@samusng.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['बैसाख', 'जेठ', 'अषाढ़', 'सावोन', 'भादो', 'आसिन', 'कातिक', 'अगहन', 'पूस', 'माघ', 'फागुन', 'चैति'], - 'months_short' => ['बैसाख', 'जेठ', 'अषाढ़', 'सावोन', 'भादो', 'आसिन', 'कातिक', 'अगहन', 'पूस', 'माघ', 'फागुन', 'चैति'], - 'weekdays' => ['रविदिन', 'सोमदिन', 'मंगलदिन', 'बुधदिन', 'बृहस्पतीदिन', 'शुक्रदिन', 'शनीदिन'], - 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पती', 'शुक्र', 'शनी'], - 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पती', 'शुक्र', 'शनी'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], - - 'year' => ':count ऋतु', // less reliable - 'y' => ':count ऋतु', // less reliable - 'a_year' => ':count ऋतु', // less reliable - - 'month' => ':count महिना', - 'm' => ':count महिना', - 'a_month' => ':count महिना', - - 'week' => ':count श्रेणी:क्यालेन्डर', // less reliable - 'w' => ':count श्रेणी:क्यालेन्डर', // less reliable - 'a_week' => ':count श्रेणी:क्यालेन्डर', // less reliable - - 'day' => ':count दिन', - 'd' => ':count दिन', - 'a_day' => ':count दिन', - - 'hour' => ':count घण्टा', - 'h' => ':count घण्टा', - 'a_hour' => ':count घण्टा', - - 'minute' => ':count समय', // less reliable - 'min' => ':count समय', // less reliable - 'a_minute' => ':count समय', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mas.php b/vendor/nesbot/carbon/src/Carbon/Lang/mas.php deleted file mode 100644 index cbd610c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mas.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Ɛnkakɛnyá', 'Ɛndámâ'], - 'weekdays' => ['Jumapílí', 'Jumatátu', 'Jumane', 'Jumatánɔ', 'Alaámisi', 'Jumáa', 'Jumamósi'], - 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'months' => ['Oladalʉ́', 'Arát', 'Ɔɛnɨ́ɔɨŋɔk', 'Olodoyíóríê inkókúâ', 'Oloilépūnyīē inkókúâ', 'Kújúɔrɔk', 'Mórusásin', 'Ɔlɔ́ɨ́bɔ́rárɛ', 'Kúshîn', 'Olgísan', 'Pʉshʉ́ka', 'Ntʉ́ŋʉ́s'], - 'months_short' => ['Dal', 'Ará', 'Ɔɛn', 'Doy', 'Lép', 'Rok', 'Sás', 'Bɔ́r', 'Kús', 'Gís', 'Shʉ́', 'Ntʉ́'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - 'year' => ':count olameyu', // less reliable - 'y' => ':count olameyu', // less reliable - 'a_year' => ':count olameyu', // less reliable - - 'week' => ':count engolongeare orwiki', // less reliable - 'w' => ':count engolongeare orwiki', // less reliable - 'a_week' => ':count engolongeare orwiki', // less reliable - - 'hour' => ':count esahabu', // less reliable - 'h' => ':count esahabu', // less reliable - 'a_hour' => ':count esahabu', // less reliable - - 'second' => ':count are', // less reliable - 's' => ':count are', // less reliable - 'a_second' => ':count are', // less reliable - - 'month' => ':count olapa', - 'm' => ':count olapa', - 'a_month' => ':count olapa', - - 'day' => ':count enkolongʼ', - 'd' => ':count enkolongʼ', - 'a_day' => ':count enkolongʼ', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mas_TZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/mas_TZ.php deleted file mode 100644 index 56e2905..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mas_TZ.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/mas.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mer.php b/vendor/nesbot/carbon/src/Carbon/Lang/mer.php deleted file mode 100644 index 2e14597..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mer.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['RŨ', 'ŨG'], - 'weekdays' => ['Kiumia', 'Muramuko', 'Wairi', 'Wethatu', 'Wena', 'Wetano', 'Jumamosi'], - 'weekdays_short' => ['KIU', 'MRA', 'WAI', 'WET', 'WEN', 'WTN', 'JUM'], - 'weekdays_min' => ['KIU', 'MRA', 'WAI', 'WET', 'WEN', 'WTN', 'JUM'], - 'months' => ['Januarĩ', 'Feburuarĩ', 'Machi', 'Ĩpurũ', 'Mĩĩ', 'Njuni', 'Njuraĩ', 'Agasti', 'Septemba', 'Oktũba', 'Novemba', 'Dicemba'], - 'months_short' => ['JAN', 'FEB', 'MAC', 'ĨPU', 'MĨĨ', 'NJU', 'NJR', 'AGA', 'SPT', 'OKT', 'NOV', 'DEC'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - 'year' => ':count murume', // less reliable - 'y' => ':count murume', // less reliable - 'a_year' => ':count murume', // less reliable - - 'month' => ':count muchaara', // less reliable - 'm' => ':count muchaara', // less reliable - 'a_month' => ':count muchaara', // less reliable - - 'minute' => ':count monto', // less reliable - 'min' => ':count monto', // less reliable - 'a_minute' => ':count monto', // less reliable - - 'second' => ':count gikeno', // less reliable - 's' => ':count gikeno', // less reliable - 'a_second' => ':count gikeno', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mfe.php b/vendor/nesbot/carbon/src/Carbon/Lang/mfe.php deleted file mode 100644 index 4d6e6b6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mfe.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/mfe_MU.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mfe_MU.php b/vendor/nesbot/carbon/src/Carbon/Lang/mfe_MU.php deleted file mode 100644 index 2d27b45..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mfe_MU.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['zanvie', 'fevriye', 'mars', 'avril', 'me', 'zin', 'zilye', 'out', 'septam', 'oktob', 'novam', 'desam'], - 'months_short' => ['zan', 'fev', 'mar', 'avr', 'me', 'zin', 'zil', 'out', 'sep', 'okt', 'nov', 'des'], - 'weekdays' => ['dimans', 'lindi', 'mardi', 'merkredi', 'zedi', 'vandredi', 'samdi'], - 'weekdays_short' => ['dim', 'lin', 'mar', 'mer', 'ze', 'van', 'sam'], - 'weekdays_min' => ['dim', 'lin', 'mar', 'mer', 'ze', 'van', 'sam'], - - 'year' => ':count banané', - 'y' => ':count banané', - 'a_year' => ':count banané', - - 'month' => ':count mwa', - 'm' => ':count mwa', - 'a_month' => ':count mwa', - - 'week' => ':count sémenn', - 'w' => ':count sémenn', - 'a_week' => ':count sémenn', - - 'day' => ':count zour', - 'd' => ':count zour', - 'a_day' => ':count zour', - - 'hour' => ':count -er-tan', - 'h' => ':count -er-tan', - 'a_hour' => ':count -er-tan', - - 'minute' => ':count minitt', - 'min' => ':count minitt', - 'a_minute' => ':count minitt', - - 'second' => ':count déziém', - 's' => ':count déziém', - 'a_second' => ':count déziém', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mg.php b/vendor/nesbot/carbon/src/Carbon/Lang/mg.php deleted file mode 100644 index 40bc2a8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mg.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/mg_MG.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mg_MG.php b/vendor/nesbot/carbon/src/Carbon/Lang/mg_MG.php deleted file mode 100644 index 6a14535..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mg_MG.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - The Debian Project modified by GNU//Linux Malagasy Rado Ramarotafika,Do-Risika RAFIEFERANTSIARONJY rado@linuxmg.org,dourix@free.fr - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Janoary', 'Febroary', 'Martsa', 'Aprily', 'Mey', 'Jona', 'Jolay', 'Aogositra', 'Septambra', 'Oktobra', 'Novambra', 'Desambra'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Mey', 'Jon', 'Jol', 'Aog', 'Sep', 'Okt', 'Nov', 'Des'], - 'weekdays' => ['alahady', 'alatsinainy', 'talata', 'alarobia', 'alakamisy', 'zoma', 'sabotsy'], - 'weekdays_short' => ['lhd', 'lts', 'tlt', 'lrb', 'lkm', 'zom', 'sab'], - 'weekdays_min' => ['lhd', 'lts', 'tlt', 'lrb', 'lkm', 'zom', 'sab'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'minute' => ':count minitra', // less reliable - 'min' => ':count minitra', // less reliable - 'a_minute' => ':count minitra', // less reliable - - 'year' => ':count taona', - 'y' => ':count taona', - 'a_year' => ':count taona', - - 'month' => ':count volana', - 'm' => ':count volana', - 'a_month' => ':count volana', - - 'week' => ':count herinandro', - 'w' => ':count herinandro', - 'a_week' => ':count herinandro', - - 'day' => ':count andro', - 'd' => ':count andro', - 'a_day' => ':count andro', - - 'hour' => ':count ora', - 'h' => ':count ora', - 'a_hour' => ':count ora', - - 'second' => ':count segondra', - 's' => ':count segondra', - 'a_second' => ':count segondra', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mgh.php b/vendor/nesbot/carbon/src/Carbon/Lang/mgh.php deleted file mode 100644 index 2a80960..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mgh.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['wichishu', 'mchochil’l'], - 'weekdays' => ['Sabato', 'Jumatatu', 'Jumanne', 'Jumatano', 'Arahamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['Sab', 'Jtt', 'Jnn', 'Jtn', 'Ara', 'Iju', 'Jmo'], - 'weekdays_min' => ['Sab', 'Jtt', 'Jnn', 'Jtn', 'Ara', 'Iju', 'Jmo'], - 'months' => ['Mweri wo kwanza', 'Mweri wo unayeli', 'Mweri wo uneraru', 'Mweri wo unecheshe', 'Mweri wo unethanu', 'Mweri wo thanu na mocha', 'Mweri wo saba', 'Mweri wo nane', 'Mweri wo tisa', 'Mweri wo kumi', 'Mweri wo kumi na moja', 'Mweri wo kumi na yel’li'], - 'months_short' => ['Kwa', 'Una', 'Rar', 'Che', 'Tha', 'Moc', 'Sab', 'Nan', 'Tis', 'Kum', 'Moj', 'Yel'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mgo.php b/vendor/nesbot/carbon/src/Carbon/Lang/mgo.php deleted file mode 100644 index a126c9f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mgo.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['Aneg 1', 'Aneg 2', 'Aneg 3', 'Aneg 4', 'Aneg 5', 'Aneg 6', 'Aneg 7'], - 'weekdays_short' => ['Aneg 1', 'Aneg 2', 'Aneg 3', 'Aneg 4', 'Aneg 5', 'Aneg 6', 'Aneg 7'], - 'weekdays_min' => ['1', '2', '3', '4', '5', '6', '7'], - 'months' => ['iməg mbegtug', 'imeg àbùbì', 'imeg mbəŋchubi', 'iməg ngwə̀t', 'iməg fog', 'iməg ichiibɔd', 'iməg àdùmbə̀ŋ', 'iməg ichika', 'iməg kud', 'iməg tèsiʼe', 'iməg zò', 'iməg krizmed'], - 'months_short' => ['mbegtug', 'imeg àbùbì', 'imeg mbəŋchubi', 'iməg ngwə̀t', 'iməg fog', 'iməg ichiibɔd', 'iməg àdùmbə̀ŋ', 'iməg ichika', 'iməg kud', 'iməg tèsiʼe', 'iməg zò', 'iməg krizmed'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-dd', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D HH:mm', - 'LLLL' => 'dddd, YYYY MMMM DD HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mhr.php b/vendor/nesbot/carbon/src/Carbon/Lang/mhr.php deleted file mode 100644 index 6bbc9f6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mhr.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/mhr_RU.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mhr_RU.php b/vendor/nesbot/carbon/src/Carbon/Lang/mhr_RU.php deleted file mode 100644 index 309ead9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mhr_RU.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - PeshSajSoft Ltd. Vyacheslav Kileev slavakileev@yandex.ru - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY.MM.DD', - ], - 'months' => ['Шорыкйол', 'Пургыж', 'Ӱярня', 'Вӱдшор', 'Ага', 'Пеледыш', 'Сӱрем', 'Сорла', 'Идым', 'Шыжа', 'Кылме', 'Теле'], - 'months_short' => ['Шрк', 'Пгж', 'Ӱрн', 'Вшр', 'Ага', 'Пдш', 'Срм', 'Срл', 'Идм', 'Шыж', 'Клм', 'Тел'], - 'weekdays' => ['Рушарня', 'Шочмо', 'Кушкыжмо', 'Вӱргече', 'Изарня', 'Кугарня', 'Шуматкече'], - 'weekdays_short' => ['Ршр', 'Шчм', 'Кжм', 'Вгч', 'Изр', 'Кгр', 'Шмт'], - 'weekdays_min' => ['Ршр', 'Шчм', 'Кжм', 'Вгч', 'Изр', 'Кгр', 'Шмт'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => ':count идалык', - 'y' => ':count идалык', - 'a_year' => ':count идалык', - - 'month' => ':count Тылзе', - 'm' => ':count Тылзе', - 'a_month' => ':count Тылзе', - - 'week' => ':count арня', - 'w' => ':count арня', - 'a_week' => ':count арня', - - 'day' => ':count кече', - 'd' => ':count кече', - 'a_day' => ':count кече', - - 'hour' => ':count час', - 'h' => ':count час', - 'a_hour' => ':count час', - - 'minute' => ':count минут', - 'min' => ':count минут', - 'a_minute' => ':count минут', - - 'second' => ':count кокымшан', - 's' => ':count кокымшан', - 'a_second' => ':count кокымшан', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mi.php b/vendor/nesbot/carbon/src/Carbon/Lang/mi.php deleted file mode 100644 index b7f51ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mi.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - John Corrigan - * - François B - */ -return [ - 'year' => ':count tau', - 'a_year' => '{1}he tau|:count tau', - 'month' => ':count marama', - 'a_month' => '{1}he marama|:count marama', - 'week' => ':count wiki', - 'a_week' => '{1}he wiki|:count wiki', - 'day' => ':count ra', - 'a_day' => '{1}he ra|:count ra', - 'hour' => ':count haora', - 'a_hour' => '{1}te haora|:count haora', - 'minute' => ':count meneti', - 'a_minute' => '{1}he meneti|:count meneti', - 'second' => ':count hēkona', - 'a_second' => '{1}te hēkona ruarua|:count hēkona', - 'ago' => ':time i mua', - 'from_now' => 'i roto i :time', - 'diff_yesterday' => 'inanahi', - 'diff_yesterday_regexp' => 'inanahi(?:\\s+i)?', - 'diff_today' => 'i teie', - 'diff_today_regexp' => 'i teie(?:\\s+mahana,)?(?:\\s+i)?', - 'diff_tomorrow' => 'apopo', - 'diff_tomorrow_regexp' => 'apopo(?:\\s+i)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY [i] HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY [i] HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[i teie mahana, i] LT', - 'nextDay' => '[apopo i] LT', - 'nextWeek' => 'dddd [i] LT', - 'lastDay' => '[inanahi i] LT', - 'lastWeek' => 'dddd [whakamutunga i] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':numberº', - 'months' => ['Kohi-tāte', 'Hui-tanguru', 'Poutū-te-rangi', 'Paenga-whāwhā', 'Haratua', 'Pipiri', 'Hōngoingoi', 'Here-turi-kōkā', 'Mahuru', 'Whiringa-ā-nuku', 'Whiringa-ā-rangi', 'Hakihea'], - 'months_short' => ['Kohi', 'Hui', 'Pou', 'Pae', 'Hara', 'Pipi', 'Hōngoi', 'Here', 'Mahu', 'Whi-nu', 'Whi-ra', 'Haki'], - 'weekdays' => ['Rātapu', 'Mane', 'Tūrei', 'Wenerei', 'Tāite', 'Paraire', 'Hātarei'], - 'weekdays_short' => ['Ta', 'Ma', 'Tū', 'We', 'Tāi', 'Pa', 'Hā'], - 'weekdays_min' => ['Ta', 'Ma', 'Tū', 'We', 'Tāi', 'Pa', 'Hā'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' me te '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mi_NZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/mi_NZ.php deleted file mode 100644 index 6b964e3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mi_NZ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/mi.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/miq.php b/vendor/nesbot/carbon/src/Carbon/Lang/miq.php deleted file mode 100644 index 51e5a98..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/miq.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/miq_NI.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/miq_NI.php b/vendor/nesbot/carbon/src/Carbon/Lang/miq_NI.php deleted file mode 100644 index 57faa31..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/miq_NI.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['siakwa kati', 'kuswa kati', 'kakamuk kati', 'lî wainhka kati', 'lih mairin kati', 'lî kati', 'pastara kati', 'sikla kati', 'wîs kati', 'waupasa kati', 'yahbra kati', 'trisu kati'], - 'months_short' => ['siakwa kati', 'kuswa kati', 'kakamuk kati', 'lî wainhka kati', 'lih mairin kati', 'lî kati', 'pastara kati', 'sikla kati', 'wîs kati', 'waupasa kati', 'yahbra kati', 'trisu kati'], - 'weekdays' => ['sandi', 'mundi', 'tiusdi', 'wensde', 'tausde', 'praidi', 'satadi'], - 'weekdays_short' => ['san', 'mun', 'tius', 'wens', 'taus', 'prai', 'sat'], - 'weekdays_min' => ['san', 'mun', 'tius', 'wens', 'taus', 'prai', 'sat'], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 7, - 'meridiem' => ['VM', 'NM'], - - 'month' => ':count kati', // less reliable - 'm' => ':count kati', // less reliable - 'a_month' => ':count kati', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mjw.php b/vendor/nesbot/carbon/src/Carbon/Lang/mjw.php deleted file mode 100644 index 617154c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mjw.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/mjw_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mjw_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/mjw_IN.php deleted file mode 100644 index 58ed0d1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mjw_IN.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Jor Teron bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['Arkoi', 'Thangthang', 'There', 'Jangmi', 'Aru', 'Vosik', 'Jakhong', 'Paipai', 'Chiti', 'Phere', 'Phaikuni', 'Matijong'], - 'months_short' => ['Ark', 'Thang', 'The', 'Jang', 'Aru', 'Vos', 'Jak', 'Pai', 'Chi', 'Phe', 'Phai', 'Mati'], - 'weekdays' => ['Bhomkuru', 'Urmi', 'Durmi', 'Thelang', 'Theman', 'Bhomta', 'Bhomti'], - 'weekdays_short' => ['Bhom', 'Ur', 'Dur', 'Tkel', 'Tkem', 'Bhta', 'Bhti'], - 'weekdays_min' => ['Bhom', 'Ur', 'Dur', 'Tkel', 'Tkem', 'Bhta', 'Bhti'], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mk.php b/vendor/nesbot/carbon/src/Carbon/Lang/mk.php deleted file mode 100644 index d822de0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mk.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Sashko Todorov - * - Josh Soref - * - François B - * - Serhan Apaydın - * - Borislav Mickov - * - JD Isaacks - * - Tomi Atanasoski - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count година|:count години', - 'a_year' => 'година|:count години', - 'y' => ':count год.', - 'month' => ':count месец|:count месеци', - 'a_month' => 'месец|:count месеци', - 'm' => ':count месец|:count месеци', - 'week' => ':count седмица|:count седмици', - 'a_week' => 'седмица|:count седмици', - 'w' => ':count седмица|:count седмици', - 'day' => ':count ден|:count дена', - 'a_day' => 'ден|:count дена', - 'd' => ':count ден|:count дена', - 'hour' => ':count час|:count часа', - 'a_hour' => 'час|:count часа', - 'h' => ':count час|:count часа', - 'minute' => ':count минута|:count минути', - 'a_minute' => 'минута|:count минути', - 'min' => ':count мин.', - 'second' => ':count секунда|:count секунди', - 'a_second' => 'неколку секунди|:count секунди', - 's' => ':count сек.', - 'ago' => 'пред :time', - 'from_now' => 'после :time', - 'after' => 'по :time', - 'before' => 'пред :time', - 'diff_now' => 'сега', - 'diff_today' => 'Денес', - 'diff_today_regexp' => 'Денес(?:\\s+во)?', - 'diff_yesterday' => 'вчера', - 'diff_yesterday_regexp' => 'Вчера(?:\\s+во)?', - 'diff_tomorrow' => 'утре', - 'diff_tomorrow_regexp' => 'Утре(?:\\s+во)?', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'D.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY H:mm', - 'LLLL' => 'dddd, D MMMM YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => '[Денес во] LT', - 'nextDay' => '[Утре во] LT', - 'nextWeek' => '[Во] dddd [во] LT', - 'lastDay' => '[Вчера во] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - case 3: - case 6: - return '[Изминатата] dddd [во] LT'; - default: - return '[Изминатиот] dddd [во] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - $lastDigit = $number % 10; - $last2Digits = $number % 100; - if ($number === 0) { - return $number.'-ев'; - } - if ($last2Digits === 0) { - return $number.'-ен'; - } - if ($last2Digits > 10 && $last2Digits < 20) { - return $number.'-ти'; - } - if ($lastDigit === 1) { - return $number.'-ви'; - } - if ($lastDigit === 2) { - return $number.'-ри'; - } - if ($lastDigit === 7 || $lastDigit === 8) { - return $number.'-ми'; - } - - return $number.'-ти'; - }, - 'months' => ['јануари', 'февруари', 'март', 'април', 'мај', 'јуни', 'јули', 'август', 'септември', 'октомври', 'ноември', 'декември'], - 'months_short' => ['јан', 'фев', 'мар', 'апр', 'мај', 'јун', 'јул', 'авг', 'сеп', 'окт', 'ное', 'дек'], - 'weekdays' => ['недела', 'понеделник', 'вторник', 'среда', 'четврток', 'петок', 'сабота'], - 'weekdays_short' => ['нед', 'пон', 'вто', 'сре', 'чет', 'пет', 'саб'], - 'weekdays_min' => ['нe', 'пo', 'вт', 'ср', 'че', 'пе', 'сa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' и '], - 'meridiem' => ['АМ', 'ПМ'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mk_MK.php b/vendor/nesbot/carbon/src/Carbon/Lang/mk_MK.php deleted file mode 100644 index 95e2ff9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mk_MK.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/mk.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ml.php b/vendor/nesbot/carbon/src/Carbon/Lang/ml.php deleted file mode 100644 index 1abd6c4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ml.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - JD Isaacks - */ -return [ - 'year' => ':count വർഷം', - 'a_year' => 'ഒരു വർഷം|:count വർഷം', - 'month' => ':count മാസം', - 'a_month' => 'ഒരു മാസം|:count മാസം', - 'week' => ':count ആഴ്ച', - 'a_week' => 'ഒരാഴ്ച|:count ആഴ്ച', - 'day' => ':count ദിവസം', - 'a_day' => 'ഒരു ദിവസം|:count ദിവസം', - 'hour' => ':count മണിക്കൂർ', - 'a_hour' => 'ഒരു മണിക്കൂർ|:count മണിക്കൂർ', - 'minute' => ':count മിനിറ്റ്', - 'a_minute' => 'ഒരു മിനിറ്റ്|:count മിനിറ്റ്', - 'second' => ':count സെക്കൻഡ്', - 'a_second' => 'അൽപ നിമിഷങ്ങൾ|:count സെക്കൻഡ്', - 'ago' => ':time മുൻപ്', - 'from_now' => ':time കഴിഞ്ഞ്', - 'diff_now' => 'ഇപ്പോൾ', - 'diff_today' => 'ഇന്ന്', - 'diff_yesterday' => 'ഇന്നലെ', - 'diff_tomorrow' => 'നാളെ', - 'formats' => [ - 'LT' => 'A h:mm -നു', - 'LTS' => 'A h:mm:ss -നു', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, A h:mm -നു', - 'LLLL' => 'dddd, D MMMM YYYY, A h:mm -നു', - ], - 'calendar' => [ - 'sameDay' => '[ഇന്ന്] LT', - 'nextDay' => '[നാളെ] LT', - 'nextWeek' => 'dddd, LT', - 'lastDay' => '[ഇന്നലെ] LT', - 'lastWeek' => '[കഴിഞ്ഞ] dddd, LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'രാത്രി'; - } - if ($hour < 12) { - return 'രാവിലെ'; - } - if ($hour < 17) { - return 'ഉച്ച കഴിഞ്ഞ്'; - } - if ($hour < 20) { - return 'വൈകുന്നേരം'; - } - - return 'രാത്രി'; - }, - 'months' => ['ജനുവരി', 'ഫെബ്രുവരി', 'മാർച്ച്', 'ഏപ്രിൽ', 'മേയ്', 'ജൂൺ', 'ജൂലൈ', 'ഓഗസ്റ്റ്', 'സെപ്റ്റംബർ', 'ഒക്ടോബർ', 'നവംബർ', 'ഡിസംബർ'], - 'months_short' => ['ജനു.', 'ഫെബ്രു.', 'മാർ.', 'ഏപ്രി.', 'മേയ്', 'ജൂൺ', 'ജൂലൈ.', 'ഓഗ.', 'സെപ്റ്റ.', 'ഒക്ടോ.', 'നവം.', 'ഡിസം.'], - 'weekdays' => ['ഞായറാഴ്ച', 'തിങ്കളാഴ്ച', 'ചൊവ്വാഴ്ച', 'ബുധനാഴ്ച', 'വ്യാഴാഴ്ച', 'വെള്ളിയാഴ്ച', 'ശനിയാഴ്ച'], - 'weekdays_short' => ['ഞായർ', 'തിങ്കൾ', 'ചൊവ്വ', 'ബുധൻ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'], - 'weekdays_min' => ['ഞാ', 'തി', 'ചൊ', 'ബു', 'വ്യാ', 'വെ', 'ശ'], - 'list' => ', ', - 'weekend' => [0, 0], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ml_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ml_IN.php deleted file mode 100644 index 000e795..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ml_IN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ml.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mn.php b/vendor/nesbot/carbon/src/Carbon/Lang/mn.php deleted file mode 100644 index 38c6434..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mn.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Tsutomu Kuroda - * - tjku - * - Max Melentiev - * - Zolzaya Erdenebaatar - * - Tom Hughes - * - Akira Matsuda - * - Christopher Dell - * - Michael Kessler - * - Enrique Vidal - * - Simone Carletti - * - Aaron Patterson - * - Nicolás Hock Isaza - * - Ochirkhuyag - * - Batmandakh - * - lucifer-crybaby - */ -return [ - 'year' => ':count жил', - 'y' => ':count жил', - 'month' => ':count сар', - 'm' => ':count сар', - 'week' => ':count долоо хоног', - 'w' => ':count долоо хоног', - 'day' => ':count өдөр', - 'd' => ':count өдөр', - 'hour' => ':count цаг', - 'h' => ':countц', - 'minute' => ':count минут', - 'min' => ':countм', - 'second' => ':count секунд', - 's' => ':countс', - - 'ago_mode' => 'last', - 'ago' => ':time өмнө', - 'year_ago' => ':count жилийн', - 'y_ago' => ':count жилийн', - 'month_ago' => ':count сарын', - 'm_ago' => ':count сарын', - 'day_ago' => ':count хоногийн', - 'd_ago' => ':count хоногийн', - 'week_ago' => ':count долоо хоногийн', - 'w_ago' => ':count долоо хоногийн', - 'hour_ago' => ':count цагийн', - 'minute_ago' => ':count минутын', - 'second_ago' => ':count секундын', - - 'from_now_mode' => 'last', - 'from_now' => 'одоогоос :time', - 'year_from_now' => ':count жилийн дараа', - 'y_from_now' => ':count жилийн дараа', - 'month_from_now' => ':count сарын дараа', - 'm_from_now' => ':count сарын дараа', - 'day_from_now' => ':count хоногийн дараа', - 'd_from_now' => ':count хоногийн дараа', - 'hour_from_now' => ':count цагийн дараа', - 'minute_from_now' => ':count минутын дараа', - 'second_from_now' => ':count секундын дараа', - - 'after_mode' => 'last', - 'after' => ':time дараа', - 'year_after' => ':count жилийн', - 'y_after' => ':count жилийн', - 'month_after' => ':count сарын', - 'm_after' => ':count сарын', - 'day_after' => ':count хоногийн', - 'd_after' => ':count хоногийн', - 'hour_after' => ':count цагийн', - 'minute_after' => ':count минутын', - 'second_after' => ':count секундын', - - 'before_mode' => 'last', - 'before' => ':time өмнө', - 'year_before' => ':count жилийн', - 'y_before' => ':count жилийн', - 'month_before' => ':count сарын', - 'm_before' => ':count сарын', - 'day_before' => ':count хоногийн', - 'd_before' => ':count хоногийн', - 'hour_before' => ':count цагийн', - 'minute_before' => ':count минутын', - 'second_before' => ':count секундын', - - 'list' => ', ', - 'diff_now' => 'одоо', - 'diff_yesterday' => 'өчигдөр', - 'diff_tomorrow' => 'маргааш', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'YYYY MMMM DD', - 'LLL' => 'YY-MM-DD, HH:mm', - 'LLLL' => 'YYYY MMMM DD, HH:mm', - ], - 'weekdays' => ['Ням', 'Даваа', 'Мягмар', 'Лхагва', 'Пүрэв', 'Баасан', 'Бямба'], - 'weekdays_short' => ['Ня', 'Да', 'Мя', 'Лх', 'Пү', 'Ба', 'Бя'], - 'weekdays_min' => ['Ня', 'Да', 'Мя', 'Лх', 'Пү', 'Ба', 'Бя'], - 'months' => ['1 сар', '2 сар', '3 сар', '4 сар', '5 сар', '6 сар', '7 сар', '8 сар', '9 сар', '10 сар', '11 сар', '12 сар'], - 'months_short' => ['1 сар', '2 сар', '3 сар', '4 сар', '5 сар', '6 сар', '7 сар', '8 сар', '9 сар', '10 сар', '11 сар', '12 сар'], - 'meridiem' => ['өглөө', 'орой'], - 'first_day_of_week' => 1, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mn_MN.php b/vendor/nesbot/carbon/src/Carbon/Lang/mn_MN.php deleted file mode 100644 index e5ce426..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mn_MN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/mn.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mni.php b/vendor/nesbot/carbon/src/Carbon/Lang/mni.php deleted file mode 100644 index cafa2f8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mni.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/mni_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mni_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/mni_IN.php deleted file mode 100644 index 45d430e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mni_IN.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat Pune libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['জানুৱারি', 'ফেব্রুৱারি', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'আগষ্ট', 'সেপ্তেম্বর', 'ওক্তোবর', 'নবেম্বর', 'ডিসেম্বর'], - 'months_short' => ['জান', 'ফেব', 'মার', 'এপ্রি', 'মে', 'জুন', 'জুল', 'আগ', 'সেপ', 'ওক্ত', 'নবে', 'ডিস'], - 'weekdays' => ['নোংমাইজিং', 'নিংথৌকাবা', 'লৈবাকপোকপা', 'য়ুমশকৈশা', 'শগোলশেন', 'ইরাই', 'থাংজ'], - 'weekdays_short' => ['নোং', 'নিং', 'লৈবাক', 'য়ুম', 'শগোল', 'ইরা', 'থাং'], - 'weekdays_min' => ['নোং', 'নিং', 'লৈবাক', 'য়ুম', 'শগোল', 'ইরা', 'থাং'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['এ.ম.', 'প.ম.'], - - 'year' => ':count ইসিং', // less reliable - 'y' => ':count ইসিং', // less reliable - 'a_year' => ':count ইসিং', // less reliable - - 'second' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable - 's' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable - 'a_second' => ':count ꯅꯤꯡꯊꯧꯀꯥꯕ', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mo.php b/vendor/nesbot/carbon/src/Carbon/Lang/mo.php deleted file mode 100644 index 102afcd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mo.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ro.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mr.php b/vendor/nesbot/carbon/src/Carbon/Lang/mr.php deleted file mode 100644 index 4aaeafd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mr.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Vikram-enyota - */ -return [ - 'year' => ':count वर्ष', - 'y' => ':count वर्ष', - 'month' => ':count महिना|:count महिने', - 'm' => ':count महिना|:count महिने', - 'week' => ':count आठवडा|:count आठवडे', - 'w' => ':count आठवडा|:count आठवडे', - 'day' => ':count दिवस', - 'd' => ':count दिवस', - 'hour' => ':count तास', - 'h' => ':count तास', - 'minute' => ':count मिनिटे', - 'min' => ':count मिनिटे', - 'second' => ':count सेकंद', - 's' => ':count सेकंद', - - 'ago' => ':timeपूर्वी', - 'from_now' => ':timeमध्ये', - 'before' => ':timeपूर्वी', - 'after' => ':timeनंतर', - - 'diff_now' => 'आत्ता', - 'diff_today' => 'आज', - 'diff_yesterday' => 'काल', - 'diff_tomorrow' => 'उद्या', - - 'formats' => [ - 'LT' => 'A h:mm वाजता', - 'LTS' => 'A h:mm:ss वाजता', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, A h:mm वाजता', - 'LLLL' => 'dddd, D MMMM YYYY, A h:mm वाजता', - ], - - 'calendar' => [ - 'sameDay' => '[आज] LT', - 'nextDay' => '[उद्या] LT', - 'nextWeek' => 'dddd, LT', - 'lastDay' => '[काल] LT', - 'lastWeek' => '[मागील] dddd, LT', - 'sameElse' => 'L', - ], - - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'रात्री'; - } - if ($hour < 10) { - return 'सकाळी'; - } - if ($hour < 17) { - return 'दुपारी'; - } - if ($hour < 20) { - return 'सायंकाळी'; - } - - return 'रात्री'; - }, - - 'months' => ['जानेवारी', 'फेब्रुवारी', 'मार्च', 'एप्रिल', 'मे', 'जून', 'जुलै', 'ऑगस्ट', 'सप्टेंबर', 'ऑक्टोबर', 'नोव्हेंबर', 'डिसेंबर'], - 'months_short' => ['जाने.', 'फेब्रु.', 'मार्च.', 'एप्रि.', 'मे.', 'जून.', 'जुलै.', 'ऑग.', 'सप्टें.', 'ऑक्टो.', 'नोव्हें.', 'डिसें.'], - 'weekdays' => ['रविवार', 'सोमवार', 'मंगळवार', 'बुधवार', 'गुरूवार', 'शुक्रवार', 'शनिवार'], - 'weekdays_short' => ['रवि', 'सोम', 'मंगळ', 'बुध', 'गुरू', 'शुक्र', 'शनि'], - 'weekdays_min' => ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'], - 'list' => [', ', ' आणि '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'weekend' => [0, 0], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mr_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/mr_IN.php deleted file mode 100644 index 7bca919..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mr_IN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/mr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ms.php b/vendor/nesbot/carbon/src/Carbon/Lang/ms.php deleted file mode 100644 index c9e8085..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ms.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - Azri Jamil - * - JD Isaacks - * - Josh Soref - * - Azri Jamil - * - Hariadi Hinta - * - Ashraf Kamarudin - */ -return [ - 'year' => ':count tahun', - 'a_year' => '{1}setahun|]1,Inf[:count tahun', - 'y' => ':count tahun', - 'month' => ':count bulan', - 'a_month' => '{1}sebulan|]1,Inf[:count bulan', - 'm' => ':count bulan', - 'week' => ':count minggu', - 'a_week' => '{1}seminggu|]1,Inf[:count minggu', - 'w' => ':count minggu', - 'day' => ':count hari', - 'a_day' => '{1}sehari|]1,Inf[:count hari', - 'd' => ':count hari', - 'hour' => ':count jam', - 'a_hour' => '{1}sejam|]1,Inf[:count jam', - 'h' => ':count jam', - 'minute' => ':count minit', - 'a_minute' => '{1}seminit|]1,Inf[:count minit', - 'min' => ':count minit', - 'second' => ':count saat', - 'a_second' => '{1}beberapa saat|]1,Inf[:count saat', - 'millisecond' => ':count milisaat', - 'a_millisecond' => '{1}semilisaat|]1,Inf[:count milliseconds', - 'microsecond' => ':count mikrodetik', - 'a_microsecond' => '{1}semikrodetik|]1,Inf[:count mikrodetik', - 's' => ':count saat', - 'ago' => ':time yang lepas', - 'from_now' => ':time dari sekarang', - 'after' => ':time kemudian', - 'before' => ':time sebelum', - 'diff_now' => 'sekarang', - 'diff_today' => 'Hari', - 'diff_today_regexp' => 'Hari(?:\\s+ini)?(?:\\s+pukul)?', - 'diff_yesterday' => 'semalam', - 'diff_yesterday_regexp' => 'Semalam(?:\\s+pukul)?', - 'diff_tomorrow' => 'esok', - 'diff_tomorrow_regexp' => 'Esok(?:\\s+pukul)?', - 'diff_before_yesterday' => 'kelmarin', - 'diff_after_tomorrow' => 'lusa', - 'formats' => [ - 'LT' => 'HH.mm', - 'LTS' => 'HH.mm.ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY [pukul] HH.mm', - 'LLLL' => 'dddd, D MMMM YYYY [pukul] HH.mm', - ], - 'calendar' => [ - 'sameDay' => '[Hari ini pukul] LT', - 'nextDay' => '[Esok pukul] LT', - 'nextWeek' => 'dddd [pukul] LT', - 'lastDay' => '[Kelmarin pukul] LT', - 'lastWeek' => 'dddd [lepas pukul] LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 1) { - return 'tengah malam'; - } - - if ($hour < 12) { - return 'pagi'; - } - - if ($hour < 13) { - return 'tengah hari'; - } - - if ($hour < 19) { - return 'petang'; - } - - return 'malam'; - }, - 'months' => ['Januari', 'Februari', 'Mac', 'April', 'Mei', 'Jun', 'Julai', 'Ogos', 'September', 'Oktober', 'November', 'Disember'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ogs', 'Sep', 'Okt', 'Nov', 'Dis'], - 'weekdays' => ['Ahad', 'Isnin', 'Selasa', 'Rabu', 'Khamis', 'Jumaat', 'Sabtu'], - 'weekdays_short' => ['Ahd', 'Isn', 'Sel', 'Rab', 'Kha', 'Jum', 'Sab'], - 'weekdays_min' => ['Ah', 'Is', 'Sl', 'Rb', 'Km', 'Jm', 'Sb'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' dan '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ms_BN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ms_BN.php deleted file mode 100644 index ef837a2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ms_BN.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ms.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D/MM/yy', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY, h:mm a', - 'LLLL' => 'dd MMMM YYYY, h:mm a', - ], - 'meridiem' => ['a', 'p'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ms_MY.php b/vendor/nesbot/carbon/src/Carbon/Lang/ms_MY.php deleted file mode 100644 index 970d604..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ms_MY.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - Azri Jamil - * - JD Isaacks - */ -return require __DIR__.'/ms.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ms_SG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ms_SG.php deleted file mode 100644 index 77cb83d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ms_SG.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ms.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D/MM/yy', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY, h:mm a', - 'LLLL' => 'dddd, D MMMM YYYY, h:mm a', - ], - 'meridiem' => ['a', 'p'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mt.php b/vendor/nesbot/carbon/src/Carbon/Lang/mt.php deleted file mode 100644 index e8aadcc..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mt.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Alessandro Maruccia - */ -return [ - 'year' => 'sena|:count sni|:count sni|:count sni', - 'y' => 'sa sena|:count snin|:count snin|:count snin', - 'month' => 'xahar|:count xhur|:count xhur|:count xhur', - 'm' => ':count xahar|:count xhur|:count xhur|:count xhur', - 'week' => 'gimgħa|:count ġimgħat|:count ġimgħat|:count ġimgħat', - 'w' => 'ġimgħa|:count ġimgħat|:count ġimgħat|:count ġimgħat', - 'day' => 'ġurnata|:count ġranet|:count ġranet|:count ġranet', - 'd' => 'ġurnata|:count ġranet|:count ġranet|:count ġranet', - 'hour' => 'siegħa|:count siegħat|:count siegħat|:count siegħat', - 'h' => 'siegħa|:count sigħat|:count sigħat|:count sigħat', - 'minute' => 'minuta|:count minuti|:count minuti|:count minuti', - 'min' => 'min.|:count min.|:count min.|:count min.', - 'second' => 'ftit sekondi|:count sekondi|:count sekondi|:count sekondi', - 's' => 'sek.|:count sek.|:count sek.|:count sek.', - 'ago' => ':time ilu', - 'from_now' => 'f’ :time', - 'diff_now' => 'issa', - 'diff_today' => 'Illum', - 'diff_today_regexp' => 'Illum(?:\\s+fil-)?', - 'diff_yesterday' => 'lbieraħ', - 'diff_yesterday_regexp' => 'Il-bieraħ(?:\\s+fil-)?', - 'diff_tomorrow' => 'għada', - 'diff_tomorrow_regexp' => 'Għada(?:\\s+fil-)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Illum fil-]LT', - 'nextDay' => '[Għada fil-]LT', - 'nextWeek' => 'dddd [fil-]LT', - 'lastDay' => '[Il-bieraħ fil-]LT', - 'lastWeek' => 'dddd [li għadda] [fil-]LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':numberº', - 'months' => ['Jannar', 'Frar', 'Marzu', 'April', 'Mejju', 'Ġunju', 'Lulju', 'Awwissu', 'Settembru', 'Ottubru', 'Novembru', 'Diċembru'], - 'months_short' => ['Jan', 'Fra', 'Mar', 'Apr', 'Mej', 'Ġun', 'Lul', 'Aww', 'Set', 'Ott', 'Nov', 'Diċ'], - 'weekdays' => ['Il-Ħadd', 'It-Tnejn', 'It-Tlieta', 'L-Erbgħa', 'Il-Ħamis', 'Il-Ġimgħa', 'Is-Sibt'], - 'weekdays_short' => ['Ħad', 'Tne', 'Tli', 'Erb', 'Ħam', 'Ġim', 'Sib'], - 'weekdays_min' => ['Ħa', 'Tn', 'Tl', 'Er', 'Ħa', 'Ġi', 'Si'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' u '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mt_MT.php b/vendor/nesbot/carbon/src/Carbon/Lang/mt_MT.php deleted file mode 100644 index 9534f68..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mt_MT.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/mt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mua.php b/vendor/nesbot/carbon/src/Carbon/Lang/mua.php deleted file mode 100644 index a3a3c6f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mua.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['comme', 'lilli'], - 'weekdays' => ['Com’yakke', 'Comlaaɗii', 'Comzyiiɗii', 'Comkolle', 'Comkaldǝɓlii', 'Comgaisuu', 'Comzyeɓsuu'], - 'weekdays_short' => ['Cya', 'Cla', 'Czi', 'Cko', 'Cka', 'Cga', 'Cze'], - 'weekdays_min' => ['Cya', 'Cla', 'Czi', 'Cko', 'Cka', 'Cga', 'Cze'], - 'months' => ['Fĩi Loo', 'Cokcwaklaŋne', 'Cokcwaklii', 'Fĩi Marfoo', 'Madǝǝuutǝbijaŋ', 'Mamǝŋgwãafahbii', 'Mamǝŋgwãalii', 'Madǝmbii', 'Fĩi Dǝɓlii', 'Fĩi Mundaŋ', 'Fĩi Gwahlle', 'Fĩi Yuru'], - 'months_short' => ['FLO', 'CLA', 'CKI', 'FMF', 'MAD', 'MBI', 'MLI', 'MAM', 'FDE', 'FMU', 'FGW', 'FYU'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/my.php b/vendor/nesbot/carbon/src/Carbon/Lang/my.php deleted file mode 100644 index bbdfba4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/my.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - JD Isaacks - * - Nay Lin Aung - */ -return [ - 'year' => '{1}တစ်နှစ်|]1,Inf[:count နှစ်', - 'y' => ':count နှစ်', - 'month' => '{1}တစ်လ|]1,Inf[:count လ', - 'm' => ':count လ', - 'week' => ':count ပတ်', - 'w' => ':count ပတ်', - 'day' => '{1}တစ်ရက်|]1,Inf[:count ရက်', - 'd' => ':count ရက်', - 'hour' => '{1}တစ်နာရီ|]1,Inf[:count နာရီ', - 'h' => ':count နာရီ', - 'minute' => '{1}တစ်မိနစ်|]1,Inf[:count မိနစ်', - 'min' => ':count မိနစ်', - 'second' => '{1}စက္ကန်.အနည်းငယ်|]1,Inf[:count စက္ကန့်', - 's' => ':count စက္ကန့်', - 'ago' => 'လွန်ခဲ့သော :time က', - 'from_now' => 'လာမည့် :time မှာ', - 'after' => ':time ကြာပြီးနောက်', - 'before' => ':time မတိုင်ခင်', - 'diff_now' => 'အခုလေးတင်', - 'diff_today' => 'ယနေ.', - 'diff_yesterday' => 'မနေ့က', - 'diff_yesterday_regexp' => 'မနေ.က', - 'diff_tomorrow' => 'မနက်ဖြန်', - 'diff_before_yesterday' => 'တမြန်နေ့က', - 'diff_after_tomorrow' => 'တဘက်ခါ', - 'period_recurrences' => ':count ကြိမ်', - 'formats' => [ - 'LT' => 'Oh:Om A', - 'LTS' => 'Oh:Om:Os A', - 'L' => 'OD/OM/OY', - 'LL' => 'OD MMMM OY', - 'LLL' => 'OD MMMM OY Oh:Om A', - 'LLLL' => 'dddd OD MMMM OY Oh:Om A', - ], - 'calendar' => [ - 'sameDay' => '[ယနေ.] LT [မှာ]', - 'nextDay' => '[မနက်ဖြန်] LT [မှာ]', - 'nextWeek' => 'dddd LT [မှာ]', - 'lastDay' => '[မနေ.က] LT [မှာ]', - 'lastWeek' => '[ပြီးခဲ့သော] dddd LT [မှာ]', - 'sameElse' => 'L', - ], - 'months' => ['ဇန်နဝါရီ', 'ဖေဖော်ဝါရီ', 'မတ်', 'ဧပြီ', 'မေ', 'ဇွန်', 'ဇူလိုင်', 'သြဂုတ်', 'စက်တင်ဘာ', 'အောက်တိုဘာ', 'နိုဝင်ဘာ', 'ဒီဇင်ဘာ'], - 'months_short' => ['ဇန်', 'ဖေ', 'မတ်', 'ပြီ', 'မေ', 'ဇွန်', 'လိုင်', 'သြ', 'စက်', 'အောက်', 'နို', 'ဒီ'], - 'weekdays' => ['တနင်္ဂနွေ', 'တနင်္လာ', 'အင်္ဂါ', 'ဗုဒ္ဓဟူး', 'ကြာသပတေး', 'သောကြာ', 'စနေ'], - 'weekdays_short' => ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ'], - 'weekdays_min' => ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'alt_numbers' => ['၀၀', '၀၁', '၀၂', '၀၃', '၀၄', '၀၅', '၀၆', '၀၇', '၀၈', '၀၉', '၁၀', '၁၁', '၁၂', '၁၃', '၁၄', '၁၅', '၁၆', '၁၇', '၁၈', '၁၉', '၂၀', '၂၁', '၂၂', '၂၃', '၂၄', '၂၅', '၂၆', '၂၇', '၂၈', '၂၉', '၃၀', '၃၁', '၃၂', '၃၃', '၃၄', '၃၅', '၃၆', '၃၇', '၃၈', '၃၉', '၄၀', '၄၁', '၄၂', '၄၃', '၄၄', '၄၅', '၄၆', '၄၇', '၄၈', '၄၉', '၅၀', '၅၁', '၅၂', '၅၃', '၅၄', '၅၅', '၅၆', '၅၇', '၅၈', '၅၉', '၆၀', '၆၁', '၆၂', '၆၃', '၆၄', '၆၅', '၆၆', '၆၇', '၆၈', '၆၉', '၇၀', '၇၁', '၇၂', '၇၃', '၇၄', '၇၅', '၇၆', '၇၇', '၇၈', '၇၉', '၈၀', '၈၁', '၈၂', '၈၃', '၈၄', '၈၅', '၈၆', '၈၇', '၈၈', '၈၉', '၉၀', '၉၁', '၉၂', '၉၃', '၉၄', '၉၅', '၉၆', '၉၇', '၉၈', '၉၉'], - 'meridiem' => ['နံနက်', 'ညနေ'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/my_MM.php b/vendor/nesbot/carbon/src/Carbon/Lang/my_MM.php deleted file mode 100644 index a0108dd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/my_MM.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/my.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/mzn.php b/vendor/nesbot/carbon/src/Carbon/Lang/mzn.php deleted file mode 100644 index 70f5f23..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/mzn.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fa.php', [ - 'months' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], - 'months_short' => ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'], - 'first_day_of_week' => 6, - 'weekend' => [5, 5], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-dd', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D HH:mm', - 'LLLL' => 'YYYY MMMM D, dddd HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nan.php b/vendor/nesbot/carbon/src/Carbon/Lang/nan.php deleted file mode 100644 index 0affece..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nan.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/nan_TW.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nan_TW.php b/vendor/nesbot/carbon/src/Carbon/Lang/nan_TW.php deleted file mode 100644 index 5c50aa4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nan_TW.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY年MM月DD日', - ], - 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - 'months_short' => [' 1月', ' 2月', ' 3月', ' 4月', ' 5月', ' 6月', ' 7月', ' 8月', ' 9月', '10月', '11月', '12月'], - 'weekdays' => ['禮拜日', '禮拜一', '禮拜二', '禮拜三', '禮拜四', '禮拜五', '禮拜六'], - 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], - 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['頂晡', '下晡'], - - 'year' => ':count 年', - 'y' => ':count 年', - 'a_year' => ':count 年', - - 'month' => ':count goe̍h', - 'm' => ':count goe̍h', - 'a_month' => ':count goe̍h', - - 'week' => ':count lé-pài', - 'w' => ':count lé-pài', - 'a_week' => ':count lé-pài', - - 'day' => ':count 日', - 'd' => ':count 日', - 'a_day' => ':count 日', - - 'hour' => ':count tiám-cheng', - 'h' => ':count tiám-cheng', - 'a_hour' => ':count tiám-cheng', - - 'minute' => ':count Hun-cheng', - 'min' => ':count Hun-cheng', - 'a_minute' => ':count Hun-cheng', - - 'second' => ':count Bió', - 's' => ':count Bió', - 'a_second' => ':count Bió', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nan_TW@latin.php b/vendor/nesbot/carbon/src/Carbon/Lang/nan_TW@latin.php deleted file mode 100644 index 99ca2a4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nan_TW@latin.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Arne Goetje arne@canonical.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-DD', - ], - 'months' => ['1goe̍h', '2goe̍h', '3goe̍h', '4goe̍h', '5goe̍h', '6goe̍h', '7goe̍h', '8goe̍h', '9goe̍h', '10goe̍h', '11goe̍h', '12goe̍h'], - 'months_short' => ['1g', '2g', '3g', '4g', '5g', '6g', '7g', '8g', '9g', '10g', '11g', '12g'], - 'weekdays' => ['lé-pài-ji̍t', 'pài-it', 'pài-jī', 'pài-saⁿ', 'pài-sì', 'pài-gō͘', 'pài-la̍k'], - 'weekdays_short' => ['lp', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6'], - 'weekdays_min' => ['lp', 'p1', 'p2', 'p3', 'p4', 'p5', 'p6'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['téng-po͘', 'ē-po͘'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/naq.php b/vendor/nesbot/carbon/src/Carbon/Lang/naq.php deleted file mode 100644 index fbd9be9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/naq.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['ǁgoagas', 'ǃuias'], - 'weekdays' => ['Sontaxtsees', 'Mantaxtsees', 'Denstaxtsees', 'Wunstaxtsees', 'Dondertaxtsees', 'Fraitaxtsees', 'Satertaxtsees'], - 'weekdays_short' => ['Son', 'Ma', 'De', 'Wu', 'Do', 'Fr', 'Sat'], - 'weekdays_min' => ['Son', 'Ma', 'De', 'Wu', 'Do', 'Fr', 'Sat'], - 'months' => ['ǃKhanni', 'ǃKhanǀgôab', 'ǀKhuuǁkhâb', 'ǃHôaǂkhaib', 'ǃKhaitsâb', 'Gamaǀaeb', 'ǂKhoesaob', 'Aoǁkhuumûǁkhâb', 'Taraǀkhuumûǁkhâb', 'ǂNûǁnâiseb', 'ǀHooǂgaeb', 'Hôasoreǁkhâb'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd, D MMMM YYYY h:mm a', - ], - - 'year' => ':count kurigu', - 'y' => ':count kurigu', - 'a_year' => ':count kurigu', - - 'month' => ':count ǁaub', // less reliable - 'm' => ':count ǁaub', // less reliable - 'a_month' => ':count ǁaub', // less reliable - - 'week' => ':count hû', // less reliable - 'w' => ':count hû', // less reliable - 'a_week' => ':count hû', // less reliable - - 'day' => ':count ǀhobas', // less reliable - 'd' => ':count ǀhobas', // less reliable - 'a_day' => ':count ǀhobas', // less reliable - - 'hour' => ':count ǂgaes', // less reliable - 'h' => ':count ǂgaes', // less reliable - 'a_hour' => ':count ǂgaes', // less reliable - - 'minute' => ':count minutga', // less reliable - 'min' => ':count minutga', // less reliable - 'a_minute' => ':count minutga', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nb.php b/vendor/nesbot/carbon/src/Carbon/Lang/nb.php deleted file mode 100644 index 371ee84..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nb.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Alexander Tømmerås - * - Sigurd Gartmann - * - JD Isaacks - */ -return [ - 'year' => ':count år|:count år', - 'a_year' => 'ett år|:count år', - 'y' => ':count år|:count år', - 'month' => ':count måned|:count måneder', - 'a_month' => 'en måned|:count måneder', - 'm' => ':count md.', - 'week' => ':count uke|:count uker', - 'a_week' => 'en uke|:count uker', - 'w' => ':count u.', - 'day' => ':count dag|:count dager', - 'a_day' => 'en dag|:count dager', - 'd' => ':count d.', - 'hour' => ':count time|:count timer', - 'a_hour' => 'en time|:count timer', - 'h' => ':count t', - 'minute' => ':count minutt|:count minutter', - 'a_minute' => 'ett minutt|:count minutter', - 'min' => ':count min', - 'second' => ':count sekund|:count sekunder', - 'a_second' => 'noen sekunder|:count sekunder', - 's' => ':count sek', - 'ago' => ':time siden', - 'from_now' => 'om :time', - 'after' => ':time etter', - 'before' => ':time før', - 'diff_now' => 'akkurat nå', - 'diff_today' => 'i dag', - 'diff_today_regexp' => 'i dag(?:\\s+kl.)?', - 'diff_yesterday' => 'i går', - 'diff_yesterday_regexp' => 'i går(?:\\s+kl.)?', - 'diff_tomorrow' => 'i morgen', - 'diff_tomorrow_regexp' => 'i morgen(?:\\s+kl.)?', - 'diff_before_yesterday' => 'i forgårs', - 'diff_after_tomorrow' => 'i overmorgen', - 'period_recurrences' => 'en gang|:count ganger', - 'period_interval' => 'hver :interval', - 'period_start_date' => 'fra :date', - 'period_end_date' => 'til :date', - 'months' => ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], - 'weekdays' => ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'], - 'weekdays_short' => ['søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør'], - 'weekdays_min' => ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø'], - 'ordinal' => ':number.', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY [kl.] HH:mm', - 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[i dag kl.] LT', - 'nextDay' => '[i morgen kl.] LT', - 'nextWeek' => 'dddd [kl.] LT', - 'lastDay' => '[i går kl.] LT', - 'lastWeek' => '[forrige] dddd [kl.] LT', - 'sameElse' => 'L', - ], - 'list' => [', ', ' og '], - 'meridiem' => ['a.m.', 'p.m.'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nb_NO.php b/vendor/nesbot/carbon/src/Carbon/Lang/nb_NO.php deleted file mode 100644 index 31678c5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nb_NO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/nb.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nb_SJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/nb_SJ.php deleted file mode 100644 index ce0210b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nb_SJ.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/nb.php', [ - 'formats' => [ - 'LL' => 'D. MMM YYYY', - 'LLL' => 'D. MMMM YYYY, HH:mm', - 'LLLL' => 'dddd D. MMMM YYYY, HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nd.php b/vendor/nesbot/carbon/src/Carbon/Lang/nd.php deleted file mode 100644 index f75d9a7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nd.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['Sonto', 'Mvulo', 'Sibili', 'Sithathu', 'Sine', 'Sihlanu', 'Mgqibelo'], - 'weekdays_short' => ['Son', 'Mvu', 'Sib', 'Sit', 'Sin', 'Sih', 'Mgq'], - 'weekdays_min' => ['Son', 'Mvu', 'Sib', 'Sit', 'Sin', 'Sih', 'Mgq'], - 'months' => ['Zibandlela', 'Nhlolanja', 'Mbimbitho', 'Mabasa', 'Nkwenkwezi', 'Nhlangula', 'Ntulikazi', 'Ncwabakazi', 'Mpandula', 'Mfumfu', 'Lwezi', 'Mpalakazi'], - 'months_short' => ['Zib', 'Nhlo', 'Mbi', 'Mab', 'Nkw', 'Nhla', 'Ntu', 'Ncw', 'Mpan', 'Mfu', 'Lwe', 'Mpal'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - - 'year' => 'okweminyaka engu-:count', // less reliable - 'y' => 'okweminyaka engu-:count', // less reliable - 'a_year' => 'okweminyaka engu-:count', // less reliable - - 'month' => 'inyanga ezingu-:count', - 'm' => 'inyanga ezingu-:count', - 'a_month' => 'inyanga ezingu-:count', - - 'week' => 'amaviki angu-:count', - 'w' => 'amaviki angu-:count', - 'a_week' => 'amaviki angu-:count', - - 'day' => 'kwamalanga angu-:count', - 'd' => 'kwamalanga angu-:count', - 'a_day' => 'kwamalanga angu-:count', - - 'hour' => 'amahola angu-:count', - 'h' => 'amahola angu-:count', - 'a_hour' => 'amahola angu-:count', - - 'minute' => 'imizuzu engu-:count', - 'min' => 'imizuzu engu-:count', - 'a_minute' => 'imizuzu engu-:count', - - 'second' => 'imizuzwana engu-:count', - 's' => 'imizuzwana engu-:count', - 'a_second' => 'imizuzwana engu-:count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nds.php b/vendor/nesbot/carbon/src/Carbon/Lang/nds.php deleted file mode 100644 index c0b3775..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nds.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/nds_DE.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nds_DE.php b/vendor/nesbot/carbon/src/Carbon/Lang/nds_DE.php deleted file mode 100644 index a6c57a9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nds_DE.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandrakesoft.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Jannuaar', 'Feberwaar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'], - 'months_short' => ['Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'], - 'weekdays' => ['Sünndag', 'Maandag', 'Dingsdag', 'Middeweek', 'Dunnersdag', 'Freedag', 'Sünnavend'], - 'weekdays_short' => ['Sdag', 'Maan', 'Ding', 'Midd', 'Dunn', 'Free', 'Svd.'], - 'weekdays_min' => ['Sd', 'Ma', 'Di', 'Mi', 'Du', 'Fr', 'Sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count Johr', - 'y' => ':countJ', - 'a_year' => '{1}een Johr|:count Johr', - - 'month' => ':count Maand', - 'm' => ':countM', - 'a_month' => '{1}een Maand|:count Maand', - - 'week' => ':count Week|:count Weken', - 'w' => ':countW', - 'a_week' => '{1}een Week|:count Week|:count Weken', - - 'day' => ':count Dag|:count Daag', - 'd' => ':countD', - 'a_day' => '{1}een Dag|:count Dag|:count Daag', - - 'hour' => ':count Stünn|:count Stünnen', - 'h' => ':countSt', - 'a_hour' => '{1}een Stünn|:count Stünn|:count Stünnen', - - 'minute' => ':count Minuut|:count Minuten', - 'min' => ':countm', - 'a_minute' => '{1}een Minuut|:count Minuut|:count Minuten', - - 'second' => ':count Sekunn|:count Sekunnen', - 's' => ':counts', - 'a_second' => 'en poor Sekunnen|:count Sekunn|:count Sekunnen', - - 'ago' => 'vör :time', - 'from_now' => 'in :time', - 'before' => ':time vörher', - 'after' => ':time later', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nds_NL.php b/vendor/nesbot/carbon/src/Carbon/Lang/nds_NL.php deleted file mode 100644 index de2c57b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nds_NL.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - information from Kenneth Christiansen Kenneth Christiansen, Pablo Saratxaga kenneth@gnu.org, pablo@mandrakesoft.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Jaunuwoa', 'Februwoa', 'Moaz', 'Aprell', 'Mai', 'Juni', 'Juli', 'August', 'Septamba', 'Oktoba', 'Nowamba', 'Dezamba'], - 'months_short' => ['Jan', 'Feb', 'Moz', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Now', 'Dez'], - 'weekdays' => ['Sinndag', 'Mondag', 'Dingsdag', 'Meddwäakj', 'Donnadag', 'Friedag', 'Sinnowend'], - 'weekdays_short' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], - 'weekdays_min' => ['Sdg', 'Mdg', 'Dsg', 'Mwk', 'Ddg', 'Fdg', 'Swd'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ne.php b/vendor/nesbot/carbon/src/Carbon/Lang/ne.php deleted file mode 100644 index d4caf0e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ne.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - nootanghimire - * - Josh Soref - * - Nj Subedi - * - JD Isaacks - */ -return [ - 'year' => 'एक बर्ष|:count बर्ष', - 'y' => ':count वर्ष', - 'month' => 'एक महिना|:count महिना', - 'm' => ':count महिना', - 'week' => ':count हप्ता', - 'w' => ':count हप्ता', - 'day' => 'एक दिन|:count दिन', - 'd' => ':count दिन', - 'hour' => 'एक घण्टा|:count घण्टा', - 'h' => ':count घण्टा', - 'minute' => 'एक मिनेट|:count मिनेट', - 'min' => ':count मिनेट', - 'second' => 'केही क्षण|:count सेकेण्ड', - 's' => ':count सेकेण्ड', - 'ago' => ':time अगाडि', - 'from_now' => ':timeमा', - 'after' => ':time पछि', - 'before' => ':time अघि', - 'diff_now' => 'अहिले', - 'diff_today' => 'आज', - 'diff_yesterday' => 'हिजो', - 'diff_tomorrow' => 'भोलि', - 'formats' => [ - 'LT' => 'Aको h:mm बजे', - 'LTS' => 'Aको h:mm:ss बजे', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, Aको h:mm बजे', - 'LLLL' => 'dddd, D MMMM YYYY, Aको h:mm बजे', - ], - 'calendar' => [ - 'sameDay' => '[आज] LT', - 'nextDay' => '[भोलि] LT', - 'nextWeek' => '[आउँदो] dddd[,] LT', - 'lastDay' => '[हिजो] LT', - 'lastWeek' => '[गएको] dddd[,] LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 3) { - return 'राति'; - } - if ($hour < 12) { - return 'बिहान'; - } - if ($hour < 16) { - return 'दिउँसो'; - } - if ($hour < 20) { - return 'साँझ'; - } - - return 'राति'; - }, - 'months' => ['जनवरी', 'फेब्रुवरी', 'मार्च', 'अप्रिल', 'मई', 'जुन', 'जुलाई', 'अगष्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], - 'months_short' => ['जन.', 'फेब्रु.', 'मार्च', 'अप्रि.', 'मई', 'जुन', 'जुलाई.', 'अग.', 'सेप्ट.', 'अक्टो.', 'नोभे.', 'डिसे.'], - 'weekdays' => ['आइतबार', 'सोमबार', 'मङ्गलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिबार'], - 'weekdays_short' => ['आइत.', 'सोम.', 'मङ्गल.', 'बुध.', 'बिहि.', 'शुक्र.', 'शनि.'], - 'weekdays_min' => ['आ.', 'सो.', 'मं.', 'बु.', 'बि.', 'शु.', 'श.'], - 'list' => [', ', ' र '], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ne_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ne_IN.php deleted file mode 100644 index f68d00e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ne_IN.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ne.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'yy/M/d', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D, h:mm a', - 'LLLL' => 'YYYY MMMM D, dddd, h:mm a', - ], - 'months' => ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], - 'months_short' => ['जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्ट', 'सेप्टेम्बर', 'अक्टोबर', 'नोभेम्बर', 'डिसेम्बर'], - 'weekend' => [0, 0], - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ne_NP.php b/vendor/nesbot/carbon/src/Carbon/Lang/ne_NP.php deleted file mode 100644 index 27840c0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ne_NP.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ne.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nhn.php b/vendor/nesbot/carbon/src/Carbon/Lang/nhn.php deleted file mode 100644 index 5a85831..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nhn.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/nhn_MX.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nhn_MX.php b/vendor/nesbot/carbon/src/Carbon/Lang/nhn_MX.php deleted file mode 100644 index 9db88a1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nhn_MX.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], - 'months_short' => ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], - 'weekdays' => ['teoilhuitl', 'ceilhuitl', 'omeilhuitl', 'yeilhuitl', 'nahuilhuitl', 'macuililhuitl', 'chicuaceilhuitl'], - 'weekdays_short' => ['teo', 'cei', 'ome', 'yei', 'nau', 'mac', 'chi'], - 'weekdays_min' => ['teo', 'cei', 'ome', 'yei', 'nau', 'mac', 'chi'], - 'day_of_first_week_of_year' => 1, - - 'month' => ':count metztli', // less reliable - 'm' => ':count metztli', // less reliable - 'a_month' => ':count metztli', // less reliable - - 'week' => ':count tonalli', // less reliable - 'w' => ':count tonalli', // less reliable - 'a_week' => ':count tonalli', // less reliable - - 'day' => ':count tonatih', // less reliable - 'd' => ':count tonatih', // less reliable - 'a_day' => ':count tonatih', // less reliable - - 'minute' => ':count toltecayotl', // less reliable - 'min' => ':count toltecayotl', // less reliable - 'a_minute' => ':count toltecayotl', // less reliable - - 'second' => ':count ome', // less reliable - 's' => ':count ome', // less reliable - 'a_second' => ':count ome', // less reliable - - 'year' => ':count xihuitl', - 'y' => ':count xihuitl', - 'a_year' => ':count xihuitl', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/niu.php b/vendor/nesbot/carbon/src/Carbon/Lang/niu.php deleted file mode 100644 index bd9be8a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/niu.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/niu_NU.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/niu_NU.php b/vendor/nesbot/carbon/src/Carbon/Lang/niu_NU.php deleted file mode 100644 index 6e7a697..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/niu_NU.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RockET Systems Emani Fakaotimanava-Lui emani@niue.nu - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Ianuali', 'Fepuali', 'Masi', 'Apelila', 'Me', 'Iuni', 'Iulai', 'Aokuso', 'Sepetema', 'Oketopa', 'Novema', 'Tesemo'], - 'months_short' => ['Ian', 'Fep', 'Mas', 'Ape', 'Me', 'Iun', 'Iul', 'Aok', 'Sep', 'Oke', 'Nov', 'Tes'], - 'weekdays' => ['Aho Tapu', 'Aho Gofua', 'Aho Ua', 'Aho Lotu', 'Aho Tuloto', 'Aho Falaile', 'Aho Faiumu'], - 'weekdays_short' => ['Tapu', 'Gofua', 'Ua', 'Lotu', 'Tuloto', 'Falaile', 'Faiumu'], - 'weekdays_min' => ['Tapu', 'Gofua', 'Ua', 'Lotu', 'Tuloto', 'Falaile', 'Faiumu'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => ':count tau', - 'y' => ':count tau', - 'a_year' => ':count tau', - - 'month' => ':count mahina', - 'm' => ':count mahina', - 'a_month' => ':count mahina', - - 'week' => ':count faahi tapu', - 'w' => ':count faahi tapu', - 'a_week' => ':count faahi tapu', - - 'day' => ':count aho', - 'd' => ':count aho', - 'a_day' => ':count aho', - - 'hour' => ':count e tulā', - 'h' => ':count e tulā', - 'a_hour' => ':count e tulā', - - 'minute' => ':count minuti', - 'min' => ':count minuti', - 'a_minute' => ':count minuti', - - 'second' => ':count sekone', - 's' => ':count sekone', - 'a_second' => ':count sekone', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl.php deleted file mode 100644 index 2d73770..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Roy - * - Stephan - * - François B - * - Tim Fish - * - Kevin Huang - * - Jacob Middag - * - JD Isaacks - * - Roy - * - Stephan - * - François B - * - Tim Fish - * - Jacob Middag - * - JD Isaacks - * - Propaganistas - * - MegaXLR - * - adriaanzon - * - MonkeyPhysics - * - JeroenG - * - RikSomers - * - proclame - * - Rik de Groot (hwdegroot) - */ -return [ - 'year' => ':count jaar|:count jaar', - 'a_year' => 'een jaar|:count jaar', - 'y' => ':countj', - 'month' => ':count maand|:count maanden', - 'a_month' => 'een maand|:count maanden', - 'm' => ':countmnd', - 'week' => ':count week|:count weken', - 'a_week' => 'een week|:count weken', - 'w' => ':countw', - 'day' => ':count dag|:count dagen', - 'a_day' => 'een dag|:count dagen', - 'd' => ':countd', - 'hour' => ':count uur|:count uur', - 'a_hour' => 'een uur|:count uur', - 'h' => ':countu', - 'minute' => ':count minuut|:count minuten', - 'a_minute' => 'een minuut|:count minuten', - 'min' => ':countmin', - 'second' => ':count seconde|:count seconden', - 'a_second' => 'een paar seconden|:count seconden', - 's' => ':counts', - 'ago' => ':time geleden', - 'from_now' => 'over :time', - 'after' => ':time later', - 'before' => ':time eerder', - 'diff_now' => 'nu', - 'diff_today' => 'vandaag', - 'diff_today_regexp' => 'vandaag(?:\\s+om)?', - 'diff_yesterday' => 'gisteren', - 'diff_yesterday_regexp' => 'gisteren(?:\\s+om)?', - 'diff_tomorrow' => 'morgen', - 'diff_tomorrow_regexp' => 'morgen(?:\\s+om)?', - 'diff_after_tomorrow' => 'overmorgen', - 'diff_before_yesterday' => 'eergisteren', - 'period_recurrences' => ':count keer', - 'period_interval' => function (string $interval = '') { - /** @var string $output */ - $output = preg_replace('/^(een|één|1)\s+/u', '', $interval); - - if (preg_match('/^(een|één|1)( jaar|j| uur|u)/u', $interval)) { - return "elk $output"; - } - - return "elke $output"; - }, - 'period_start_date' => 'van :date', - 'period_end_date' => 'tot :date', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD-MM-YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[vandaag om] LT', - 'nextDay' => '[morgen om] LT', - 'nextWeek' => 'dddd [om] LT', - 'lastDay' => '[gisteren om] LT', - 'lastWeek' => '[afgelopen] dddd [om] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - return $number.(($number === 1 || $number === 8 || $number >= 20) ? 'ste' : 'de'); - }, - 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], - 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - 'mmm_suffix' => '.', - 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], - 'weekdays_short' => ['zo.', 'ma.', 'di.', 'wo.', 'do.', 'vr.', 'za.'], - 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' en '], - 'meridiem' => ['\'s ochtends', '\'s middags'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl_AW.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl_AW.php deleted file mode 100644 index 5ec136d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl_AW.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Free Software Foundation, Inc. bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/nl.php', [ - 'formats' => [ - 'L' => 'DD-MM-YY', - ], - 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], - 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], - 'weekdays_short' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl_BE.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl_BE.php deleted file mode 100644 index 037f5b4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl_BE.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Roy - * - Stephan - * - François B - * - Tim Fish - * - Kevin Huang - * - Jacob Middag - * - JD Isaacks - * - Propaganistas - */ -return array_replace_recursive(require __DIR__.'/nl.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl_BQ.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl_BQ.php deleted file mode 100644 index c269197..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl_BQ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/nl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl_CW.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl_CW.php deleted file mode 100644 index c269197..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl_CW.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/nl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl_NL.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl_NL.php deleted file mode 100644 index 14e4853..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl_NL.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/nl.php', [ - 'months' => ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], - 'months_short' => ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - 'weekdays' => ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], - 'weekdays_short' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - 'weekdays_min' => ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl_SR.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl_SR.php deleted file mode 100644 index c269197..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl_SR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/nl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl_SX.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl_SX.php deleted file mode 100644 index c269197..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl_SX.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/nl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nmg.php b/vendor/nesbot/carbon/src/Carbon/Lang/nmg.php deleted file mode 100644 index 4d1df6e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nmg.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['maná', 'kugú'], - 'weekdays' => ['sɔ́ndɔ', 'mɔ́ndɔ', 'sɔ́ndɔ mafú mába', 'sɔ́ndɔ mafú málal', 'sɔ́ndɔ mafú mána', 'mabágá má sukul', 'sásadi'], - 'weekdays_short' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'mbs', 'sas'], - 'weekdays_min' => ['sɔ́n', 'mɔ́n', 'smb', 'sml', 'smn', 'mbs', 'sas'], - 'months' => ['ngwɛn matáhra', 'ngwɛn ńmba', 'ngwɛn ńlal', 'ngwɛn ńna', 'ngwɛn ńtan', 'ngwɛn ńtuó', 'ngwɛn hɛmbuɛrí', 'ngwɛn lɔmbi', 'ngwɛn rɛbvuâ', 'ngwɛn wum', 'ngwɛn wum navǔr', 'krísimin'], - 'months_short' => ['ng1', 'ng2', 'ng3', 'ng4', 'ng5', 'ng6', 'ng7', 'ng8', 'ng9', 'ng10', 'ng11', 'kris'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nn.php b/vendor/nesbot/carbon/src/Carbon/Lang/nn.php deleted file mode 100644 index 041f7b2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nn.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Alexander Tømmerås - * - Øystein - * - JD Isaacks - * - Gaute Hvoslef Kvalnes (gaute) - */ -return [ - 'year' => ':count år', - 'a_year' => 'eit år|:count år', - 'y' => ':count år', - 'month' => ':count månad|:count månader', - 'a_month' => 'ein månad|:count månader', - 'm' => ':count md', - 'week' => ':count veke|:count veker', - 'a_week' => 'ei veke|:count veker', - 'w' => ':countv', - 'day' => ':count dag|:count dagar', - 'a_day' => 'ein dag|:count dagar', - 'd' => ':countd', - 'hour' => ':count time|:count timar', - 'a_hour' => 'ein time|:count timar', - 'h' => ':countt', - 'minute' => ':count minutt', - 'a_minute' => 'eit minutt|:count minutt', - 'min' => ':countm', - 'second' => ':count sekund', - 'a_second' => 'nokre sekund|:count sekund', - 's' => ':counts', - 'ago' => ':time sidan', - 'from_now' => 'om :time', - 'after' => ':time etter', - 'before' => ':time før', - 'diff_today' => 'I dag', - 'diff_yesterday' => 'I går', - 'diff_yesterday_regexp' => 'I går(?:\\s+klokka)?', - 'diff_tomorrow' => 'I morgon', - 'diff_tomorrow_regexp' => 'I morgon(?:\\s+klokka)?', - 'diff_today_regexp' => 'I dag(?:\\s+klokka)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY [kl.] H:mm', - 'LLLL' => 'dddd D. MMMM YYYY [kl.] HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[I dag klokka] LT', - 'nextDay' => '[I morgon klokka] LT', - 'nextWeek' => 'dddd [klokka] LT', - 'lastDay' => '[I går klokka] LT', - 'lastWeek' => '[Føregåande] dddd [klokka] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des'], - 'weekdays' => ['sundag', 'måndag', 'tysdag', 'onsdag', 'torsdag', 'fredag', 'laurdag'], - 'weekdays_short' => ['sun', 'mån', 'tys', 'ons', 'tor', 'fre', 'lau'], - 'weekdays_min' => ['su', 'må', 'ty', 'on', 'to', 'fr', 'la'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' og '], - 'meridiem' => ['f.m.', 'e.m.'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nn_NO.php b/vendor/nesbot/carbon/src/Carbon/Lang/nn_NO.php deleted file mode 100644 index 8e16871..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nn_NO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/nn.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nnh.php b/vendor/nesbot/carbon/src/Carbon/Lang/nnh.php deleted file mode 100644 index 007d239..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nnh.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['mbaʼámbaʼ', 'ncwònzém'], - 'weekdays' => null, - 'weekdays_short' => ['lyɛʼɛ́ sẅíŋtè', 'mvfò lyɛ̌ʼ', 'mbɔ́ɔntè mvfò lyɛ̌ʼ', 'tsètsɛ̀ɛ lyɛ̌ʼ', 'mbɔ́ɔntè tsetsɛ̀ɛ lyɛ̌ʼ', 'mvfò màga lyɛ̌ʼ', 'màga lyɛ̌ʼ'], - 'weekdays_min' => null, - 'months' => null, - 'months_short' => ['saŋ tsetsɛ̀ɛ lùm', 'saŋ kàg ngwóŋ', 'saŋ lepyè shúm', 'saŋ cÿó', 'saŋ tsɛ̀ɛ cÿó', 'saŋ njÿoláʼ', 'saŋ tyɛ̀b tyɛ̀b mbʉ̀ŋ', 'saŋ mbʉ̀ŋ', 'saŋ ngwɔ̀ʼ mbÿɛ', 'saŋ tàŋa tsetsáʼ', 'saŋ mejwoŋó', 'saŋ lùm'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/yy', - 'LL' => 'D MMM, YYYY', - 'LLL' => '[lyɛ]̌ʼ d [na] MMMM, YYYY HH:mm', - 'LLLL' => 'dddd , [lyɛ]̌ʼ d [na] MMMM, YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/no.php b/vendor/nesbot/carbon/src/Carbon/Lang/no.php deleted file mode 100644 index f4497c7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/no.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Daniel S. Billing - * - Paul - * - Jimmie Johansson - * - Jens Herlevsen - */ -return array_replace_recursive(require __DIR__.'/nb.php', [ - 'formats' => [ - 'LLL' => 'D. MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D. MMMM YYYY [kl.] HH:mm', - ], - 'calendar' => [ - 'nextWeek' => 'på dddd [kl.] LT', - 'lastWeek' => '[i] dddd[s kl.] LT', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nr.php b/vendor/nesbot/carbon/src/Carbon/Lang/nr.php deleted file mode 100644 index 1bc999f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nr.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/nr_ZA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nr_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/nr_ZA.php deleted file mode 100644 index f9a7be8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nr_ZA.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Janabari', 'uFeberbari', 'uMatjhi', 'u-Apreli', 'Meyi', 'Juni', 'Julayi', 'Arhostosi', 'Septemba', 'Oktoba', 'Usinyikhaba', 'Disemba'], - 'months_short' => ['Jan', 'Feb', 'Mat', 'Apr', 'Mey', 'Jun', 'Jul', 'Arh', 'Sep', 'Okt', 'Usi', 'Dis'], - 'weekdays' => ['uSonto', 'uMvulo', 'uLesibili', 'lesithathu', 'uLesine', 'ngoLesihlanu', 'umGqibelo'], - 'weekdays_short' => ['Son', 'Mvu', 'Bil', 'Tha', 'Ne', 'Hla', 'Gqi'], - 'weekdays_min' => ['Son', 'Mvu', 'Bil', 'Tha', 'Ne', 'Hla', 'Gqi'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nso.php b/vendor/nesbot/carbon/src/Carbon/Lang/nso.php deleted file mode 100644 index 2a6cabb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nso.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/nso_ZA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nso_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/nso_ZA.php deleted file mode 100644 index b08fe6d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nso_ZA.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Janaware', 'Febereware', 'Matšhe', 'Aprele', 'Mei', 'June', 'Julae', 'Agostose', 'Setemere', 'Oktobere', 'Nofemere', 'Disemere'], - 'months_short' => ['Jan', 'Feb', 'Mat', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Set', 'Okt', 'Nof', 'Dis'], - 'weekdays' => ['LaMorena', 'Mošupologo', 'Labobedi', 'Laboraro', 'Labone', 'Labohlano', 'Mokibelo'], - 'weekdays_short' => ['Son', 'Moš', 'Bed', 'Rar', 'Ne', 'Hla', 'Mok'], - 'weekdays_min' => ['Son', 'Moš', 'Bed', 'Rar', 'Ne', 'Hla', 'Mok'], - 'day_of_first_week_of_year' => 1, - - 'year' => ':count ngwaga', - 'y' => ':count ngwaga', - 'a_year' => ':count ngwaga', - - 'month' => ':count Kgwedi', - 'm' => ':count Kgwedi', - 'a_month' => ':count Kgwedi', - - 'week' => ':count Beke', - 'w' => ':count Beke', - 'a_week' => ':count Beke', - - 'day' => ':count Letšatši', - 'd' => ':count Letšatši', - 'a_day' => ':count Letšatši', - - 'hour' => ':count Iri', - 'h' => ':count Iri', - 'a_hour' => ':count Iri', - - 'minute' => ':count Motsotso', - 'min' => ':count Motsotso', - 'a_minute' => ':count Motsotso', - - 'second' => ':count motsotswana', - 's' => ':count motsotswana', - 'a_second' => ':count motsotswana', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nus.php b/vendor/nesbot/carbon/src/Carbon/Lang/nus.php deleted file mode 100644 index 789bc39..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nus.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['RW', 'TŊ'], - 'weekdays' => ['Cäŋ kuɔth', 'Jiec la̱t', 'Rɛw lätni', 'Diɔ̱k lätni', 'Ŋuaan lätni', 'Dhieec lätni', 'Bäkɛl lätni'], - 'weekdays_short' => ['Cäŋ', 'Jiec', 'Rɛw', 'Diɔ̱k', 'Ŋuaan', 'Dhieec', 'Bäkɛl'], - 'weekdays_min' => ['Cäŋ', 'Jiec', 'Rɛw', 'Diɔ̱k', 'Ŋuaan', 'Dhieec', 'Bäkɛl'], - 'months' => ['Tiop thar pɛt', 'Pɛt', 'Duɔ̱ɔ̱ŋ', 'Guak', 'Duät', 'Kornyoot', 'Pay yie̱tni', 'Tho̱o̱r', 'Tɛɛr', 'Laath', 'Kur', 'Tio̱p in di̱i̱t'], - 'months_short' => ['Tiop', 'Pɛt', 'Duɔ̱ɔ̱', 'Guak', 'Duä', 'Kor', 'Pay', 'Thoo', 'Tɛɛ', 'Laa', 'Kur', 'Tid'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd D MMMM YYYY h:mm a', - ], - - 'year' => ':count jiök', // less reliable - 'y' => ':count jiök', // less reliable - 'a_year' => ':count jiök', // less reliable - - 'month' => ':count pay', // less reliable - 'm' => ':count pay', // less reliable - 'a_month' => ':count pay', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nyn.php b/vendor/nesbot/carbon/src/Carbon/Lang/nyn.php deleted file mode 100644 index 8660ea4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nyn.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['Sande', 'Orwokubanza', 'Orwakabiri', 'Orwakashatu', 'Orwakana', 'Orwakataano', 'Orwamukaaga'], - 'weekdays_short' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], - 'weekdays_min' => ['SAN', 'ORK', 'OKB', 'OKS', 'OKN', 'OKT', 'OMK'], - 'months' => ['Okwokubanza', 'Okwakabiri', 'Okwakashatu', 'Okwakana', 'Okwakataana', 'Okwamukaaga', 'Okwamushanju', 'Okwamunaana', 'Okwamwenda', 'Okwaikumi', 'Okwaikumi na kumwe', 'Okwaikumi na ibiri'], - 'months_short' => ['KBZ', 'KBR', 'KST', 'KKN', 'KTN', 'KMK', 'KMS', 'KMN', 'KMW', 'KKM', 'KNK', 'KNB'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/oc.php b/vendor/nesbot/carbon/src/Carbon/Lang/oc.php deleted file mode 100644 index c9411d6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/oc.php +++ /dev/null @@ -1,100 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Quentí - */ -// @codeCoverageIgnoreStart -use Symfony\Component\Translation\PluralizationRules; - -if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { - PluralizationRules::set(static function ($number) { - return $number == 1 ? 0 : 1; - }, 'oc'); -} -// @codeCoverageIgnoreEnd - -return [ - 'year' => ':count an|:count ans', - 'a_year' => 'un an|:count ans', - 'y' => ':count an|:count ans', - 'month' => ':count mes|:count meses', - 'a_month' => 'un mes|:count meses', - 'm' => ':count mes|:count meses', - 'week' => ':count setmana|:count setmanas', - 'a_week' => 'una setmana|:count setmanas', - 'w' => ':count setmana|:count setmanas', - 'day' => ':count jorn|:count jorns', - 'a_day' => 'un jorn|:count jorns', - 'd' => ':count jorn|:count jorns', - 'hour' => ':count ora|:count oras', - 'a_hour' => 'una ora|:count oras', - 'h' => ':count ora|:count oras', - 'minute' => ':count minuta|:count minutas', - 'a_minute' => 'una minuta|:count minutas', - 'min' => ':count minuta|:count minutas', - 'second' => ':count segonda|:count segondas', - 'a_second' => 'una segonda|:count segondas', - 's' => ':count segonda|:count segondas', - 'ago' => 'fa :time', - 'from_now' => 'd\'aquí :time', - 'after' => ':time aprèp', - 'before' => ':time abans', - 'diff_now' => 'ara meteis', - 'diff_today' => 'Uèi', - 'diff_today_regexp' => 'Uèi(?:\\s+a)?', - 'diff_yesterday' => 'ièr', - 'diff_yesterday_regexp' => 'Ièr(?:\\s+a)?', - 'diff_tomorrow' => 'deman', - 'diff_tomorrow_regexp' => 'Deman(?:\\s+a)?', - 'diff_before_yesterday' => 'ièr delà', - 'diff_after_tomorrow' => 'deman passat', - 'period_recurrences' => ':count còp|:count còps', - 'period_interval' => 'cada :interval', - 'period_start_date' => 'de :date', - 'period_end_date' => 'fins a :date', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM [de] YYYY', - 'LLL' => 'D MMMM [de] YYYY [a] H:mm', - 'LLLL' => 'dddd D MMMM [de] YYYY [a] H:mm', - ], - 'calendar' => [ - 'sameDay' => '[Uèi a] LT', - 'nextDay' => '[Deman a] LT', - 'nextWeek' => 'dddd [a] LT', - 'lastDay' => '[Ièr a] LT', - 'lastWeek' => 'dddd [passat a] LT', - 'sameElse' => 'L', - ], - 'months' => ['de genièr', 'de febrièr', 'de març', 'd\'abrial', 'de mai', 'de junh', 'de julhet', 'd\'agost', 'de setembre', 'd’octòbre', 'de novembre', 'de decembre'], - 'months_standalone' => ['genièr', 'febrièr', 'març', 'abrial', 'mai', 'junh', 'julh', 'agost', 'setembre', 'octòbre', 'novembre', 'decembre'], - 'months_short' => ['gen.', 'feb.', 'març', 'abr.', 'mai', 'junh', 'julh', 'ago.', 'sep.', 'oct.', 'nov.', 'dec.'], - 'weekdays' => ['dimenge', 'diluns', 'dimars', 'dimècres', 'dijòus', 'divendres', 'dissabte'], - 'weekdays_short' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'], - 'weekdays_min' => ['dg', 'dl', 'dm', 'dc', 'dj', 'dv', 'ds'], - 'ordinal' => function ($number, string $period = '') { - $ordinal = [1 => 'èr', 2 => 'nd'][(int) $number] ?? 'en'; - - // feminine for year, week, hour, minute, second - if (preg_match('/^[yYwWhHgGis]$/', $period)) { - $ordinal .= 'a'; - } - - return $number.$ordinal; - }, - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' e '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/oc_FR.php b/vendor/nesbot/carbon/src/Carbon/Lang/oc_FR.php deleted file mode 100644 index 01eb5c1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/oc_FR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/oc.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/om.php b/vendor/nesbot/carbon/src/Carbon/Lang/om.php deleted file mode 100644 index b8d5a0b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/om.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation & Sagalee Oromoo Publishing Co. Inc. locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'dd-MMM-YYYY', - 'LLL' => 'dd MMMM YYYY HH:mm', - 'LLLL' => 'dddd, MMMM D, YYYY HH:mm', - ], - 'months' => ['Amajjii', 'Guraandhala', 'Bitooteessa', 'Elba', 'Caamsa', 'Waxabajjii', 'Adooleessa', 'Hagayya', 'Fuulbana', 'Onkololeessa', 'Sadaasa', 'Muddee'], - 'months_short' => ['Ama', 'Gur', 'Bit', 'Elb', 'Cam', 'Wax', 'Ado', 'Hag', 'Ful', 'Onk', 'Sad', 'Mud'], - 'weekdays' => ['Dilbata', 'Wiixata', 'Qibxata', 'Roobii', 'Kamiisa', 'Jimaata', 'Sanbata'], - 'weekdays_short' => ['Dil', 'Wix', 'Qib', 'Rob', 'Kam', 'Jim', 'San'], - 'weekdays_min' => ['Dil', 'Wix', 'Qib', 'Rob', 'Kam', 'Jim', 'San'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['WD', 'WB'], - - 'year' => 'wggoota :count', - 'y' => 'wggoota :count', - 'a_year' => 'wggoota :count', - - 'month' => 'ji’a :count', - 'm' => 'ji’a :count', - 'a_month' => 'ji’a :count', - - 'week' => 'torban :count', - 'w' => 'torban :count', - 'a_week' => 'torban :count', - - 'day' => 'guyyaa :count', - 'd' => 'guyyaa :count', - 'a_day' => 'guyyaa :count', - - 'hour' => 'saʼaatii :count', - 'h' => 'saʼaatii :count', - 'a_hour' => 'saʼaatii :count', - - 'minute' => 'daqiiqaa :count', - 'min' => 'daqiiqaa :count', - 'a_minute' => 'daqiiqaa :count', - - 'second' => 'sekoondii :count', - 's' => 'sekoondii :count', - 'a_second' => 'sekoondii :count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/om_ET.php b/vendor/nesbot/carbon/src/Carbon/Lang/om_ET.php deleted file mode 100644 index 044760e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/om_ET.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/om.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/om_KE.php b/vendor/nesbot/carbon/src/Carbon/Lang/om_KE.php deleted file mode 100644 index f5a4d1c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/om_KE.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/om.php', [ - 'day_of_first_week_of_year' => 0, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/or.php b/vendor/nesbot/carbon/src/Carbon/Lang/or.php deleted file mode 100644 index 3aa7173..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/or.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/or_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/or_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/or_IN.php deleted file mode 100644 index 57a89f5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/or_IN.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM AP Linux Technology Center, Yamato Software Laboratory bug-glibc@gnu.org - */ -return [ - 'diff_now' => 'ବର୍ତ୍ତମାନ', - 'diff_yesterday' => 'ଗତକାଲି', - 'diff_tomorrow' => 'ଆସନ୍ତାକାଲି', - 'formats' => [ - 'LT' => 'Oh:Om A', - 'LTS' => 'Oh:Om:Os A', - 'L' => 'OD-OM-OY', - 'LL' => 'OD MMMM OY', - 'LLL' => 'OD MMMM OY Oh:Om A', - 'LLLL' => 'dddd OD MMMM OY Oh:Om A', - ], - 'months' => ['ଜାନୁଆରୀ', 'ଫେବୃଆରୀ', 'ମାର୍ଚ୍ଚ', 'ଅପ୍ରେଲ', 'ମଇ', 'ଜୁନ', 'ଜୁଲାଇ', 'ଅଗଷ୍ଟ', 'ସେପ୍ଟେମ୍ବର', 'ଅକ୍ଟୋବର', 'ନଭେମ୍ବର', 'ଡିସେମ୍ବର'], - 'months_short' => ['ଜାନୁଆରୀ', 'ଫେବୃଆରୀ', 'ମାର୍ଚ୍ଚ', 'ଅପ୍ରେଲ', 'ମଇ', 'ଜୁନ', 'ଜୁଲାଇ', 'ଅଗଷ୍ଟ', 'ସେପ୍ଟେମ୍ବର', 'ଅକ୍ଟୋବର', 'ନଭେମ୍ବର', 'ଡିସେମ୍ବର'], - 'weekdays' => ['ରବିବାର', 'ସୋମବାର', 'ମଙ୍ଗଳବାର', 'ବୁଧବାର', 'ଗୁରୁବାର', 'ଶୁକ୍ରବାର', 'ଶନିବାର'], - 'weekdays_short' => ['ରବି', 'ସୋମ', 'ମଙ୍ଗଳ', 'ବୁଧ', 'ଗୁରୁ', 'ଶୁକ୍ର', 'ଶନି'], - 'weekdays_min' => ['ରବି', 'ସୋମ', 'ମଙ୍ଗଳ', 'ବୁଧ', 'ଗୁରୁ', 'ଶୁକ୍ର', 'ଶନି'], - 'day_of_first_week_of_year' => 1, - 'alt_numbers' => ['୦', '୧', '୨', '୩', '୪', '୫', '୬', '୭', '୮', '୯', '୧୦', '୧୧', '୧୨', '୧୩', '୧୪', '୧୫', '୧୬', '୧୭', '୧୮', '୧୯', '୨୦', '୨୧', '୨୨', '୨୩', '୨୪', '୨୫', '୨୬', '୨୭', '୨୮', '୨୯', '୩୦', '୩୧', '୩୨', '୩୩', '୩୪', '୩୫', '୩୬', '୩୭', '୩୮', '୩୯', '୪୦', '୪୧', '୪୨', '୪୩', '୪୪', '୪୫', '୪୬', '୪୭', '୪୮', '୪୯', '୫୦', '୫୧', '୫୨', '୫୩', '୫୪', '୫୫', '୫୬', '୫୭', '୫୮', '୫୯', '୬୦', '୬୧', '୬୨', '୬୩', '୬୪', '୬୫', '୬୬', '୬୭', '୬୮', '୬୯', '୭୦', '୭୧', '୭୨', '୭୩', '୭୪', '୭୫', '୭୬', '୭୭', '୭୮', '୭୯', '୮୦', '୮୧', '୮୨', '୮୩', '୮୪', '୮୫', '୮୬', '୮୭', '୮୮', '୮୯', '୯୦', '୯୧', '୯୨', '୯୩', '୯୪', '୯୫', '୯୬', '୯୭', '୯୮', '୯୯'], - 'year' => ':count ବର୍ଷ', - 'y' => ':count ବ.', - 'month' => ':count ମାସ', - 'm' => ':count ମା.', - 'week' => ':count ସପ୍ତାହ', - 'w' => ':count ସପ୍ତା.', - 'day' => ':count ଦିନ', - 'd' => ':count ଦିନ', - 'hour' => ':count ଘଣ୍ତ', - 'h' => ':count ଘ.', - 'minute' => ':count ମିନଟ', - 'min' => ':count ମି.', - 'second' => ':count ସେକଣ୍ଢ', - 's' => ':count ସେ.', - 'ago' => ':time ପୂର୍ବେ', - 'from_now' => ':timeରେ', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/os.php b/vendor/nesbot/carbon/src/Carbon/Lang/os.php deleted file mode 100644 index 5f55e8a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/os.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/os_RU.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/os_RU.php b/vendor/nesbot/carbon/src/Carbon/Lang/os_RU.php deleted file mode 100644 index 9592d15..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/os_RU.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['январы', 'февралы', 'мартъийы', 'апрелы', 'майы', 'июны', 'июлы', 'августы', 'сентябры', 'октябры', 'ноябры', 'декабры'], - 'months_short' => ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], - 'weekdays' => ['Хуыцаубон', 'Къуырисæр', 'Дыццæг', 'Æртыццæг', 'Цыппæрæм', 'Майрæмбон', 'Сабат'], - 'weekdays_short' => ['Хцб', 'Крс', 'Дцг', 'Æрт', 'Цпр', 'Мрб', 'Сбт'], - 'weekdays_min' => ['Хцб', 'Крс', 'Дцг', 'Æрт', 'Цпр', 'Мрб', 'Сбт'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'minute' => ':count гыццыл', // less reliable - 'min' => ':count гыццыл', // less reliable - 'a_minute' => ':count гыццыл', // less reliable - - 'second' => ':count æндæр', // less reliable - 's' => ':count æндæр', // less reliable - 'a_second' => ':count æндæр', // less reliable - - 'year' => ':count аз', - 'y' => ':count аз', - 'a_year' => ':count аз', - - 'month' => ':count мӕй', - 'm' => ':count мӕй', - 'a_month' => ':count мӕй', - - 'week' => ':count къуыри', - 'w' => ':count къуыри', - 'a_week' => ':count къуыри', - - 'day' => ':count бон', - 'd' => ':count бон', - 'a_day' => ':count бон', - - 'hour' => ':count сахат', - 'h' => ':count сахат', - 'a_hour' => ':count сахат', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pa.php b/vendor/nesbot/carbon/src/Carbon/Lang/pa.php deleted file mode 100644 index 48b2033..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pa.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Tsutomu Kuroda - * - Punjab - */ -return [ - 'year' => 'ਇੱਕ ਸਾਲ|:count ਸਾਲ', - 'month' => 'ਇੱਕ ਮਹੀਨਾ|:count ਮਹੀਨੇ', - 'week' => 'ਹਫਤਾ|:count ਹਫ਼ਤੇ', - 'day' => 'ਇੱਕ ਦਿਨ|:count ਦਿਨ', - 'hour' => 'ਇੱਕ ਘੰਟਾ|:count ਘੰਟੇ', - 'minute' => 'ਇਕ ਮਿੰਟ|:count ਮਿੰਟ', - 'second' => 'ਕੁਝ ਸਕਿੰਟ|:count ਸਕਿੰਟ', - 'ago' => ':time ਪਹਿਲਾਂ', - 'from_now' => ':time ਵਿੱਚ', - 'before' => ':time ਤੋਂ ਪਹਿਲਾਂ', - 'after' => ':time ਤੋਂ ਬਾਅਦ', - 'diff_now' => 'ਹੁਣ', - 'diff_today' => 'ਅਜ', - 'diff_yesterday' => 'ਕਲ', - 'diff_tomorrow' => 'ਕਲ', - 'formats' => [ - 'LT' => 'A h:mm ਵਜੇ', - 'LTS' => 'A h:mm:ss ਵਜੇ', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, A h:mm ਵਜੇ', - 'LLLL' => 'dddd, D MMMM YYYY, A h:mm ਵਜੇ', - ], - 'calendar' => [ - 'sameDay' => '[ਅਜ] LT', - 'nextDay' => '[ਕਲ] LT', - 'nextWeek' => '[ਅਗਲਾ] dddd, LT', - 'lastDay' => '[ਕਲ] LT', - 'lastWeek' => '[ਪਿਛਲੇ] dddd, LT', - 'sameElse' => 'L', - ], - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'ਰਾਤ'; - } - if ($hour < 10) { - return 'ਸਵੇਰ'; - } - if ($hour < 17) { - return 'ਦੁਪਹਿਰ'; - } - if ($hour < 20) { - return 'ਸ਼ਾਮ'; - } - - return 'ਰਾਤ'; - }, - 'months' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], - 'months_short' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], - 'weekdays' => ['ਐਤਵਾਰ', 'ਸੋਮਵਾਰ', 'ਮੰਗਲਵਾਰ', 'ਬੁਧਵਾਰ', 'ਵੀਰਵਾਰ', 'ਸ਼ੁੱਕਰਵਾਰ', 'ਸ਼ਨੀਚਰਵਾਰ'], - 'weekdays_short' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'], - 'weekdays_min' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' ਅਤੇ '], - 'weekend' => [0, 0], - 'alt_numbers' => ['੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pa_Arab.php b/vendor/nesbot/carbon/src/Carbon/Lang/pa_Arab.php deleted file mode 100644 index 39b0653..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pa_Arab.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ur.php', [ - 'weekdays' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], - 'weekdays_short' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], - 'weekdays_min' => ['اتوار', 'پیر', 'منگل', 'بُدھ', 'جمعرات', 'جمعہ', 'ہفتہ'], - 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئ', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئ', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd, DD MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pa_Guru.php b/vendor/nesbot/carbon/src/Carbon/Lang/pa_Guru.php deleted file mode 100644 index 7adff5c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pa_Guru.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/pa.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D/M/yy', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY, h:mm a', - 'LLLL' => 'dddd, D MMMM YYYY, h:mm a', - ], - 'months' => ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'], - 'months_short' => ['ਜਨ', 'ਫ਼ਰ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾ', 'ਅਗ', 'ਸਤੰ', 'ਅਕਤੂ', 'ਨਵੰ', 'ਦਸੰ'], - 'weekdays' => ['ਐਤਵਾਰ', 'ਸੋਮਵਾਰ', 'ਮੰਗਲਵਾਰ', 'ਬੁੱਧਵਾਰ', 'ਵੀਰਵਾਰ', 'ਸ਼ੁੱਕਰਵਾਰ', 'ਸ਼ਨਿੱਚਰਵਾਰ'], - 'weekdays_short' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁੱਧ', 'ਵੀਰ', 'ਸ਼ੁੱਕਰ', 'ਸ਼ਨਿੱਚਰ'], - 'weekdays_min' => ['ਐਤ', 'ਸੋਮ', 'ਮੰਗ', 'ਬੁੱਧ', 'ਵੀਰ', 'ਸ਼ੁੱਕ', 'ਸ਼ਨਿੱ'], - 'weekend' => [0, 0], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pa_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/pa_IN.php deleted file mode 100644 index ca67642..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pa_IN.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Guo Xiang Tan - * - Josh Soref - * - Ash - * - harpreetkhalsagtbit - */ -return require __DIR__.'/pa.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pa_PK.php b/vendor/nesbot/carbon/src/Carbon/Lang/pa_PK.php deleted file mode 100644 index f9af11c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pa_PK.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['جنوري', 'فروري', 'مارچ', 'اپريل', 'مٓی', 'جون', 'جولاي', 'اگست', 'ستمبر', 'اكتوبر', 'نومبر', 'دسمبر'], - 'months_short' => ['جنوري', 'فروري', 'مارچ', 'اپريل', 'مٓی', 'جون', 'جولاي', 'اگست', 'ستمبر', 'اكتوبر', 'نومبر', 'دسمبر'], - 'weekdays' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], - 'weekdays_short' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], - 'weekdays_min' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ص', 'ش'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pap.php b/vendor/nesbot/carbon/src/Carbon/Lang/pap.php deleted file mode 100644 index b4c1706..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pap.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return [ - 'formats' => [ - 'LT' => 'HH.mm', - 'LTS' => 'HH.mm:ss', - 'L' => 'DD-MM-YY', - 'LL' => 'MMMM [di] DD, YYYY', - 'LLL' => 'DD MMM HH.mm', - 'LLLL' => 'MMMM DD, YYYY HH.mm', - ], - 'months' => ['yanüari', 'febrüari', 'mart', 'aprel', 'mei', 'yüni', 'yüli', 'ougùstùs', 'sèptèmber', 'oktober', 'novèmber', 'desèmber'], - 'months_short' => ['yan', 'feb', 'mar', 'apr', 'mei', 'yün', 'yül', 'oug', 'sèp', 'okt', 'nov', 'des'], - 'weekdays' => ['djadomingo', 'djaluna', 'djamars', 'djawebs', 'djarason', 'djabierne', 'djasabra'], - 'weekdays_short' => ['do', 'lu', 'ma', 'we', 'ra', 'bi', 'sa'], - 'weekdays_min' => ['do', 'lu', 'ma', 'we', 'ra', 'bi', 'sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'year' => ':count aña', - 'month' => ':count luna', - 'week' => ':count siman', - 'day' => ':count dia', - 'hour' => ':count ora', - 'minute' => ':count minüt', - 'second' => ':count sekònde', - 'list' => [', ', ' i '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pap_AW.php b/vendor/nesbot/carbon/src/Carbon/Lang/pap_AW.php deleted file mode 100644 index e9a48ff..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pap_AW.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - information from native speaker Pablo Saratxaga pablo@mandrakesoft.com - */ -return require __DIR__.'/pap.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pap_CW.php b/vendor/nesbot/carbon/src/Carbon/Lang/pap_CW.php deleted file mode 100644 index e9a48ff..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pap_CW.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - information from native speaker Pablo Saratxaga pablo@mandrakesoft.com - */ -return require __DIR__.'/pap.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pl.php b/vendor/nesbot/carbon/src/Carbon/Lang/pl.php deleted file mode 100644 index b720535..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pl.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Wacław Jacek - * - François B - * - Tim Fish - * - Serhan Apaydın - * - Massimiliano Caniparoli - * - JD Isaacks - * - Jakub Szwacz - * - Jan - * - Paul - * - damlys - * - Marek (marast78) - * - Peter (UnrulyNatives) - * - Qrzysio - * - Jan (aso824) - * - diverpl - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count rok|:count lata|:count lat', - 'a_year' => 'rok|:count lata|:count lat', - 'y' => ':count r|:count l|:count l', - 'month' => ':count miesiąc|:count miesiące|:count miesięcy', - 'a_month' => 'miesiąc|:count miesiące|:count miesięcy', - 'm' => ':count mies.', - 'week' => ':count tydzień|:count tygodnie|:count tygodni', - 'a_week' => 'tydzień|:count tygodnie|:count tygodni', - 'w' => ':count tyg.', - 'day' => ':count dzień|:count dni|:count dni', - 'a_day' => 'dzień|:count dni|:count dni', - 'd' => ':count d', - 'hour' => ':count godzina|:count godziny|:count godzin', - 'a_hour' => 'godzina|:count godziny|:count godzin', - 'h' => ':count godz.', - 'minute' => ':count minuta|:count minuty|:count minut', - 'a_minute' => 'minuta|:count minuty|:count minut', - 'min' => ':count min', - 'second' => ':count sekunda|:count sekundy|:count sekund', - 'a_second' => '{1}kilka sekund|:count sekunda|:count sekundy|:count sekund', - 's' => ':count sek.', - 'ago' => ':time temu', - 'from_now' => static function ($time) { - return 'za '.strtr($time, [ - 'godzina' => 'godzinę', - 'minuta' => 'minutę', - 'sekunda' => 'sekundę', - ]); - }, - 'after' => ':time po', - 'before' => ':time przed', - 'diff_now' => 'teraz', - 'diff_today' => 'Dziś', - 'diff_today_regexp' => 'Dziś(?:\\s+o)?', - 'diff_yesterday' => 'wczoraj', - 'diff_yesterday_regexp' => 'Wczoraj(?:\\s+o)?', - 'diff_tomorrow' => 'jutro', - 'diff_tomorrow_regexp' => 'Jutro(?:\\s+o)?', - 'diff_before_yesterday' => 'przedwczoraj', - 'diff_after_tomorrow' => 'pojutrze', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Dziś o] LT', - 'nextDay' => '[Jutro o] LT', - 'nextWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[W niedzielę o] LT'; - case 2: - return '[We wtorek o] LT'; - case 3: - return '[W środę o] LT'; - case 6: - return '[W sobotę o] LT'; - default: - return '[W] dddd [o] LT'; - } - }, - 'lastDay' => '[Wczoraj o] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[W zeszłą niedzielę o] LT'; - case 3: - return '[W zeszłą środę o] LT'; - case 6: - return '[W zeszłą sobotę o] LT'; - default: - return '[W zeszły] dddd [o] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia'], - 'months_standalone' => ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'], - 'months_short' => ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'], - 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'], - 'weekdays_short' => ['ndz', 'pon', 'wt', 'śr', 'czw', 'pt', 'sob'], - 'weekdays_min' => ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' i '], - 'meridiem' => ['przed południem', 'po południu'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pl_PL.php b/vendor/nesbot/carbon/src/Carbon/Lang/pl_PL.php deleted file mode 100644 index 222bcdb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pl_PL.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/prg.php b/vendor/nesbot/carbon/src/Carbon/Lang/prg.php deleted file mode 100644 index 6e63f4a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/prg.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], - 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-dd', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D HH:mm', - 'LLLL' => 'YYYY MMMM D, dddd HH:mm', - ], - - 'year' => ':count meta', - 'y' => ':count meta', - 'a_year' => ':count meta', - - 'month' => ':count mēniks', // less reliable - 'm' => ':count mēniks', // less reliable - 'a_month' => ':count mēniks', // less reliable - - 'week' => ':count sawaītin', // less reliable - 'w' => ':count sawaītin', // less reliable - 'a_week' => ':count sawaītin', // less reliable - - 'day' => ':count di', - 'd' => ':count di', - 'a_day' => ':count di', - - 'hour' => ':count bruktēt', // less reliable - 'h' => ':count bruktēt', // less reliable - 'a_hour' => ':count bruktēt', // less reliable - - 'minute' => ':count līkuts', // less reliable - 'min' => ':count līkuts', // less reliable - 'a_minute' => ':count līkuts', // less reliable - - 'second' => ':count kitan', // less reliable - 's' => ':count kitan', // less reliable - 'a_second' => ':count kitan', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ps.php b/vendor/nesbot/carbon/src/Carbon/Lang/ps.php deleted file mode 100644 index a928b28..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ps.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Muhammad Nasir Rahimi - * - Nassim Nasibullah (spinzar) - */ -return [ - 'year' => ':count کال|:count کاله', - 'y' => ':countکال|:countکاله', - 'month' => ':count مياشت|:count مياشتي', - 'm' => ':countمياشت|:countمياشتي', - 'week' => ':count اونۍ|:count اونۍ', - 'w' => ':countاونۍ|:countاونۍ', - 'day' => ':count ورځ|:count ورځي', - 'd' => ':countورځ|:countورځي', - 'hour' => ':count ساعت|:count ساعته', - 'h' => ':countساعت|:countساعته', - 'minute' => ':count دقيقه|:count دقيقې', - 'min' => ':countدقيقه|:countدقيقې', - 'second' => ':count ثانيه|:count ثانيې', - 's' => ':countثانيه|:countثانيې', - 'ago' => ':time دمخه', - 'from_now' => ':time له اوس څخه', - 'after' => ':time وروسته', - 'before' => ':time دمخه', - 'list' => ['، ', ' او '], - 'meridiem' => ['غ.م.', 'غ.و.'], - 'weekdays' => ['اتوار', 'ګل', 'نهه', 'شورو', 'زيارت', 'جمعه', 'خالي'], - 'weekdays_short' => ['ا', 'ګ', 'ن', 'ش', 'ز', 'ج', 'خ'], - 'weekdays_min' => ['ا', 'ګ', 'ن', 'ش', 'ز', 'ج', 'خ'], - 'months' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سېپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'months_short' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سېپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'months_standalone' => ['جنوري', 'فېبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'months_short_standalone' => ['جنوري', 'فبروري', 'مارچ', 'اپریل', 'مۍ', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'first_day_of_week' => 6, - 'weekend' => [4, 5], - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'YYYY/M/d', - 'LL' => 'YYYY MMM D', - 'LLL' => 'د YYYY د MMMM D H:mm', - 'LLLL' => 'dddd د YYYY د MMMM D H:mm', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ps_AF.php b/vendor/nesbot/carbon/src/Carbon/Lang/ps_AF.php deleted file mode 100644 index 6ec5180..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ps_AF.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ps.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt.php deleted file mode 100644 index bb6359b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Cassiano Montanari - * - Matt Pope - * - François B - * - Prodis - * - JD Isaacks - * - Raphael Amorim - * - João Magalhães - * - victortobias - * - Paulo Freitas - * - Sebastian Thierer - * - Claudson Martins (claudsonm) - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count ano|:count anos', - 'a_year' => 'um ano|:count anos', - 'y' => ':counta', - 'month' => ':count mês|:count meses', - 'a_month' => 'um mês|:count meses', - 'm' => ':countm', - 'week' => ':count semana|:count semanas', - 'a_week' => 'uma semana|:count semanas', - 'w' => ':countsem', - 'day' => ':count dia|:count dias', - 'a_day' => 'um dia|:count dias', - 'd' => ':countd', - 'hour' => ':count hora|:count horas', - 'a_hour' => 'uma hora|:count horas', - 'h' => ':counth', - 'minute' => ':count minuto|:count minutos', - 'a_minute' => 'um minuto|:count minutos', - 'min' => ':countmin', - 'second' => ':count segundo|:count segundos', - 'a_second' => 'alguns segundos|:count segundos', - 's' => ':counts', - 'millisecond' => ':count milissegundo|:count milissegundos', - 'a_millisecond' => 'um milissegundo|:count milissegundos', - 'ms' => ':countms', - 'microsecond' => ':count microssegundo|:count microssegundos', - 'a_microsecond' => 'um microssegundo|:count microssegundos', - 'µs' => ':countµs', - 'ago' => 'há :time', - 'from_now' => 'em :time', - 'after' => ':time depois', - 'before' => ':time antes', - 'diff_now' => 'agora', - 'diff_today' => 'Hoje', - 'diff_today_regexp' => 'Hoje(?:\\s+às)?', - 'diff_yesterday' => 'ontem', - 'diff_yesterday_regexp' => 'Ontem(?:\\s+às)?', - 'diff_tomorrow' => 'amanhã', - 'diff_tomorrow_regexp' => 'Amanhã(?:\\s+às)?', - 'diff_before_yesterday' => 'anteontem', - 'diff_after_tomorrow' => 'depois de amanhã', - 'period_recurrences' => 'uma vez|:count vezes', - 'period_interval' => 'cada :interval', - 'period_start_date' => 'de :date', - 'period_end_date' => 'até :date', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D [de] MMMM [de] YYYY', - 'LLL' => 'D [de] MMMM [de] YYYY HH:mm', - 'LLLL' => 'dddd, D [de] MMMM [de] YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Hoje às] LT', - 'nextDay' => '[Amanhã às] LT', - 'nextWeek' => 'dddd [às] LT', - 'lastDay' => '[Ontem às] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - case 6: - return '[Último] dddd [às] LT'; - default: - return '[Última] dddd [às] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':numberº', - 'months' => ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'], - 'months_short' => ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'], - 'weekdays' => ['domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado'], - 'weekdays_short' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], - 'weekdays_min' => ['Do', '2ª', '3ª', '4ª', '5ª', '6ª', 'Sá'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' e '], - 'ordinal_words' => [ - 'of' => 'de', - 'first' => 'primeira', - 'second' => 'segunda', - 'third' => 'terceira', - 'fourth' => 'quarta', - 'fifth' => 'quinta', - 'last' => 'última', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_AO.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_AO.php deleted file mode 100644 index 22c01ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_AO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php deleted file mode 100644 index e917c5c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Cassiano Montanari - * - Eduardo Dalla Vecchia - * - David Rodrigues - * - Matt Pope - * - François B - * - Prodis - * - Marlon Maxwel - * - JD Isaacks - * - Raphael Amorim - * - Rafael Raupp - * - felipeleite1 - * - swalker - * - Lucas Macedo - * - Paulo Freitas - * - Sebastian Thierer - */ -return array_replace_recursive(require __DIR__.'/pt.php', [ - 'period_recurrences' => 'uma|:count vez', - 'period_interval' => 'toda :interval', - 'formats' => [ - 'LLL' => 'D [de] MMMM [de] YYYY [às] HH:mm', - 'LLLL' => 'dddd, D [de] MMMM [de] YYYY [às] HH:mm', - ], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_CH.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_CH.php deleted file mode 100644 index 22c01ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_CH.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_CV.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_CV.php deleted file mode 100644 index 22c01ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_CV.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_GQ.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_GQ.php deleted file mode 100644 index 22c01ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_GQ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_GW.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_GW.php deleted file mode 100644 index 22c01ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_GW.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_LU.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_LU.php deleted file mode 100644 index 22c01ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_LU.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_MO.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_MO.php deleted file mode 100644 index f2b5eab..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_MO.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/pt.php', [ - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'LLL' => 'D [de] MMMM [de] YYYY, h:mm a', - 'LLLL' => 'dddd, D [de] MMMM [de] YYYY, h:mm a', - ], - 'first_day_of_week' => 0, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_MZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_MZ.php deleted file mode 100644 index fbc0c97..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_MZ.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/pt.php', [ - 'first_day_of_week' => 0, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_PT.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_PT.php deleted file mode 100644 index 2a76fc1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_PT.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RAP bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/pt.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'], - 'months_short' => ['jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez'], - 'weekdays' => ['domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado'], - 'weekdays_short' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], - 'weekdays_min' => ['dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sáb'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_ST.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_ST.php deleted file mode 100644 index 22c01ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_ST.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_TL.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_TL.php deleted file mode 100644 index 22c01ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_TL.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/pt.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/qu.php b/vendor/nesbot/carbon/src/Carbon/Lang/qu.php deleted file mode 100644 index 65278cd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/qu.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/es_UY.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM, YYYY HH:mm', - ], - 'first_day_of_week' => 0, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/qu_BO.php b/vendor/nesbot/carbon/src/Carbon/Lang/qu_BO.php deleted file mode 100644 index d5db6bf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/qu_BO.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/qu.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/qu_EC.php b/vendor/nesbot/carbon/src/Carbon/Lang/qu_EC.php deleted file mode 100644 index d5db6bf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/qu_EC.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/qu.php', [ - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/quz.php b/vendor/nesbot/carbon/src/Carbon/Lang/quz.php deleted file mode 100644 index 1640c02..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/quz.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/quz_PE.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/quz_PE.php b/vendor/nesbot/carbon/src/Carbon/Lang/quz_PE.php deleted file mode 100644 index d322918..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/quz_PE.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Sugar Labs // OLPC sugarlabs.org libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['iniru', 'phiwriru', 'marsu', 'awril', 'mayu', 'huniyu', 'huliyu', 'agustu', 'siptiyimri', 'uktuwri', 'nuwiyimri', 'tisiyimri'], - 'months_short' => ['ini', 'phi', 'mar', 'awr', 'may', 'hun', 'hul', 'agu', 'sip', 'ukt', 'nuw', 'tis'], - 'weekdays' => ['tuminku', 'lunis', 'martis', 'miyirkulis', 'juywis', 'wiyirnis', 'sawatu'], - 'weekdays_short' => ['tum', 'lun', 'mar', 'miy', 'juy', 'wiy', 'saw'], - 'weekdays_min' => ['tum', 'lun', 'mar', 'miy', 'juy', 'wiy', 'saw'], - 'day_of_first_week_of_year' => 1, - - 'minute' => ':count uchuy', // less reliable - 'min' => ':count uchuy', // less reliable - 'a_minute' => ':count uchuy', // less reliable - - 'year' => ':count wata', - 'y' => ':count wata', - 'a_year' => ':count wata', - - 'month' => ':count killa', - 'm' => ':count killa', - 'a_month' => ':count killa', - - 'week' => ':count simana', - 'w' => ':count simana', - 'a_week' => ':count simana', - - 'day' => ':count pʼunchaw', - 'd' => ':count pʼunchaw', - 'a_day' => ':count pʼunchaw', - - 'hour' => ':count ura', - 'h' => ':count ura', - 'a_hour' => ':count ura', - - 'second' => ':count iskay ñiqin', - 's' => ':count iskay ñiqin', - 'a_second' => ':count iskay ñiqin', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/raj.php b/vendor/nesbot/carbon/src/Carbon/Lang/raj.php deleted file mode 100644 index 26138c9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/raj.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/raj_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/raj_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/raj_IN.php deleted file mode 100644 index 7b4589c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/raj_IN.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - meghrajsuthar03@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितंबर', 'अक्टूबर', 'नवंबर', 'दिसंबर'], - 'months_short' => ['जन', 'फर', 'मार्च', 'अप्रै', 'मई', 'जून', 'जुल', 'अग', 'सित', 'अक्टू', 'नव', 'दिस'], - 'weekdays' => ['रविवार', 'सोमवार', 'मंगल्लवार', 'बुधवार', 'बृहस्पतिवार', 'शुक्रवार', 'शनिवार'], - 'weekdays_short' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], - 'weekdays_min' => ['रवि', 'सोम', 'मंगल', 'बुध', 'बृहस्पति', 'शुक्र', 'शनि'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], - - 'year' => ':count आंहू', // less reliable - 'y' => ':count आंहू', // less reliable - 'a_year' => ':count आंहू', // less reliable - - 'month' => ':count सूरज', // less reliable - 'm' => ':count सूरज', // less reliable - 'a_month' => ':count सूरज', // less reliable - - 'week' => ':count निवाज', // less reliable - 'w' => ':count निवाज', // less reliable - 'a_week' => ':count निवाज', // less reliable - - 'day' => ':count अेक', // less reliable - 'd' => ':count अेक', // less reliable - 'a_day' => ':count अेक', // less reliable - - 'hour' => ':count दुनियांण', // less reliable - 'h' => ':count दुनियांण', // less reliable - 'a_hour' => ':count दुनियांण', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/rm.php b/vendor/nesbot/carbon/src/Carbon/Lang/rm.php deleted file mode 100644 index 1843f45..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/rm.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - tjku - * - Max Melentiev - * - Juanito Fatas - * - Tsutomu Kuroda - * - Akira Matsuda - * - Christopher Dell - * - Enrique Vidal - * - Simone Carletti - * - Aaron Patterson - * - Nicolás Hock Isaza - * - sebastian de castelberg - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'Do MMMM YYYY', - 'LLL' => 'Do MMMM, HH:mm [Uhr]', - 'LLLL' => 'dddd, Do MMMM YYYY, HH:mm [Uhr]', - ], - 'year' => ':count onn|:count onns', - 'month' => ':count mais', - 'week' => ':count emna|:count emnas', - 'day' => ':count di|:count dis', - 'hour' => ':count oura|:count ouras', - 'minute' => ':count minuta|:count minutas', - 'second' => ':count secunda|:count secundas', - 'weekdays' => ['dumengia', 'glindesdi', 'mardi', 'mesemna', 'gievgia', 'venderdi', 'sonda'], - 'weekdays_short' => ['du', 'gli', 'ma', 'me', 'gie', 've', 'so'], - 'weekdays_min' => ['du', 'gli', 'ma', 'me', 'gie', 've', 'so'], - 'months' => ['schaner', 'favrer', 'mars', 'avrigl', 'matg', 'zercladur', 'fanadur', 'avust', 'settember', 'october', 'november', 'december'], - 'months_short' => ['schan', 'favr', 'mars', 'avr', 'matg', 'zercl', 'fan', 'avust', 'sett', 'oct', 'nov', 'dec'], - 'meridiem' => ['avantmezdi', 'suentermezdi'], - 'list' => [', ', ' e '], - 'first_day_of_week' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/rn.php b/vendor/nesbot/carbon/src/Carbon/Lang/rn.php deleted file mode 100644 index 8ab958e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/rn.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Z.MU.', 'Z.MW.'], - 'weekdays' => ['Ku w’indwi', 'Ku wa mbere', 'Ku wa kabiri', 'Ku wa gatatu', 'Ku wa kane', 'Ku wa gatanu', 'Ku wa gatandatu'], - 'weekdays_short' => ['cu.', 'mbe.', 'kab.', 'gtu.', 'kan.', 'gnu.', 'gnd.'], - 'weekdays_min' => ['cu.', 'mbe.', 'kab.', 'gtu.', 'kan.', 'gnu.', 'gnd.'], - 'months' => ['Nzero', 'Ruhuhuma', 'Ntwarante', 'Ndamukiza', 'Rusama', 'Ruheshi', 'Mukakaro', 'Nyandagaro', 'Nyakanga', 'Gitugutu', 'Munyonyo', 'Kigarama'], - 'months_short' => ['Mut.', 'Gas.', 'Wer.', 'Mat.', 'Gic.', 'Kam.', 'Nya.', 'Kan.', 'Nze.', 'Ukw.', 'Ugu.', 'Uku.'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - 'year' => 'imyaka :count', - 'y' => 'imyaka :count', - 'a_year' => 'imyaka :count', - - 'month' => 'amezi :count', - 'm' => 'amezi :count', - 'a_month' => 'amezi :count', - - 'week' => 'indwi :count', - 'w' => 'indwi :count', - 'a_week' => 'indwi :count', - - 'day' => 'imisi :count', - 'd' => 'imisi :count', - 'a_day' => 'imisi :count', - - 'hour' => 'amasaha :count', - 'h' => 'amasaha :count', - 'a_hour' => 'amasaha :count', - - 'minute' => 'iminuta :count', - 'min' => 'iminuta :count', - 'a_minute' => 'iminuta :count', - - 'second' => 'inguvu :count', // less reliable - 's' => 'inguvu :count', // less reliable - 'a_second' => 'inguvu :count', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ro.php b/vendor/nesbot/carbon/src/Carbon/Lang/ro.php deleted file mode 100644 index 868a327..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ro.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - JD Isaacks - * - Cătălin Georgescu - * - Valentin Ivaşcu (oriceon) - */ -return [ - 'year' => ':count an|:count ani|:count ani', - 'a_year' => 'un an|:count ani|:count ani', - 'y' => ':count a.', - 'month' => ':count lună|:count luni|:count luni', - 'a_month' => 'o lună|:count luni|:count luni', - 'm' => ':count l.', - 'week' => ':count săptămână|:count săptămâni|:count săptămâni', - 'a_week' => 'o săptămână|:count săptămâni|:count săptămâni', - 'w' => ':count săp.', - 'day' => ':count zi|:count zile|:count zile', - 'a_day' => 'o zi|:count zile|:count zile', - 'd' => ':count z.', - 'hour' => ':count oră|:count ore|:count ore', - 'a_hour' => 'o oră|:count ore|:count ore', - 'h' => ':count o.', - 'minute' => ':count minut|:count minute|:count minute', - 'a_minute' => 'un minut|:count minute|:count minute', - 'min' => ':count m.', - 'second' => ':count secundă|:count secunde|:count secunde', - 'a_second' => 'câteva secunde|:count secunde|:count secunde', - 's' => ':count sec.', - 'ago' => ':time în urmă', - 'from_now' => 'peste :time', - 'after' => 'peste :time', - 'before' => 'acum :time', - 'diff_now' => 'acum', - 'diff_today' => 'azi', - 'diff_today_regexp' => 'azi(?:\\s+la)?', - 'diff_yesterday' => 'ieri', - 'diff_yesterday_regexp' => 'ieri(?:\\s+la)?', - 'diff_tomorrow' => 'mâine', - 'diff_tomorrow_regexp' => 'mâine(?:\\s+la)?', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY H:mm', - 'LLLL' => 'dddd, D MMMM YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => '[azi la] LT', - 'nextDay' => '[mâine la] LT', - 'nextWeek' => 'dddd [la] LT', - 'lastDay' => '[ieri la] LT', - 'lastWeek' => '[fosta] dddd [la] LT', - 'sameElse' => 'L', - ], - 'months' => ['ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie'], - 'months_short' => ['ian.', 'feb.', 'mar.', 'apr.', 'mai', 'iun.', 'iul.', 'aug.', 'sept.', 'oct.', 'nov.', 'dec.'], - 'weekdays' => ['duminică', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbătă'], - 'weekdays_short' => ['dum', 'lun', 'mar', 'mie', 'joi', 'vin', 'sâm'], - 'weekdays_min' => ['du', 'lu', 'ma', 'mi', 'jo', 'vi', 'sâ'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' și '], - 'meridiem' => ['a.m.', 'p.m.'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ro_MD.php b/vendor/nesbot/carbon/src/Carbon/Lang/ro_MD.php deleted file mode 100644 index ad1d2fa..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ro_MD.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ro.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY, HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ro_RO.php b/vendor/nesbot/carbon/src/Carbon/Lang/ro_RO.php deleted file mode 100644 index 102afcd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ro_RO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ro.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/rof.php b/vendor/nesbot/carbon/src/Carbon/Lang/rof.php deleted file mode 100644 index 205fc26..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/rof.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['kang’ama', 'kingoto'], - 'weekdays' => ['Ijumapili', 'Ijumatatu', 'Ijumanne', 'Ijumatano', 'Alhamisi', 'Ijumaa', 'Ijumamosi'], - 'weekdays_short' => ['Ijp', 'Ijt', 'Ijn', 'Ijtn', 'Alh', 'Iju', 'Ijm'], - 'weekdays_min' => ['Ijp', 'Ijt', 'Ijn', 'Ijtn', 'Alh', 'Iju', 'Ijm'], - 'months' => ['Mweri wa kwanza', 'Mweri wa kaili', 'Mweri wa katatu', 'Mweri wa kaana', 'Mweri wa tanu', 'Mweri wa sita', 'Mweri wa saba', 'Mweri wa nane', 'Mweri wa tisa', 'Mweri wa ikumi', 'Mweri wa ikumi na moja', 'Mweri wa ikumi na mbili'], - 'months_short' => ['M1', 'M2', 'M3', 'M4', 'M5', 'M6', 'M7', 'M8', 'M9', 'M10', 'M11', 'M12'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru.php deleted file mode 100644 index 673b043..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ru.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Bari Badamshin - * - Jørn Ølmheim - * - François B - * - Tim Fish - * - Коренберг Марк (imac) - * - Serhan Apaydın - * - RomeroMsk - * - vsn4ik - * - JD Isaacks - * - Bari Badamshin - * - Jørn Ølmheim - * - François B - * - Коренберг Марк (imac) - * - Serhan Apaydın - * - RomeroMsk - * - vsn4ik - * - JD Isaacks - * - Fellzo - * - andrey-helldar - * - Pavel Skripkin (psxx) - * - AlexWalkerson - * - Vladislav UnsealedOne - * - dima-bzz - */ - -use Carbon\CarbonInterface; - -$transformDiff = function ($input) { - return strtr($input, [ - 'неделя' => 'неделю', - 'секунда' => 'секунду', - 'минута' => 'минуту', - ]); -}; - -return [ - 'year' => ':count год|:count года|:count лет', - 'y' => ':count г.|:count г.|:count л.', - 'a_year' => '{1}год|:count год|:count года|:count лет', - 'month' => ':count месяц|:count месяца|:count месяцев', - 'm' => ':count мес.', - 'a_month' => '{1}месяц|:count месяц|:count месяца|:count месяцев', - 'week' => ':count неделя|:count недели|:count недель', - 'w' => ':count нед.', - 'a_week' => '{1}неделя|:count неделю|:count недели|:count недель', - 'day' => ':count день|:count дня|:count дней', - 'd' => ':count д.', - 'a_day' => '{1}день|:count день|:count дня|:count дней', - 'hour' => ':count час|:count часа|:count часов', - 'h' => ':count ч.', - 'a_hour' => '{1}час|:count час|:count часа|:count часов', - 'minute' => ':count минута|:count минуты|:count минут', - 'min' => ':count мин.', - 'a_minute' => '{1}минута|:count минута|:count минуты|:count минут', - 'second' => ':count секунда|:count секунды|:count секунд', - 's' => ':count сек.', - 'a_second' => '{1}несколько секунд|:count секунду|:count секунды|:count секунд', - 'ago' => function ($time) use ($transformDiff) { - return $transformDiff($time).' назад'; - }, - 'from_now' => function ($time) use ($transformDiff) { - return 'через '.$transformDiff($time); - }, - 'after' => function ($time) use ($transformDiff) { - return $transformDiff($time).' после'; - }, - 'before' => function ($time) use ($transformDiff) { - return $transformDiff($time).' до'; - }, - 'diff_now' => 'только что', - 'diff_today' => 'Сегодня,', - 'diff_today_regexp' => 'Сегодня,?(?:\\s+в)?', - 'diff_yesterday' => 'вчера', - 'diff_yesterday_regexp' => 'Вчера,?(?:\\s+в)?', - 'diff_tomorrow' => 'завтра', - 'diff_tomorrow_regexp' => 'Завтра,?(?:\\s+в)?', - 'diff_before_yesterday' => 'позавчера', - 'diff_after_tomorrow' => 'послезавтра', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY г.', - 'LLL' => 'D MMMM YYYY г., H:mm', - 'LLLL' => 'dddd, D MMMM YYYY г., H:mm', - ], - 'calendar' => [ - 'sameDay' => '[Сегодня, в] LT', - 'nextDay' => '[Завтра, в] LT', - 'nextWeek' => function (CarbonInterface $current, CarbonInterface $other) { - if ($current->week !== $other->week) { - switch ($current->dayOfWeek) { - case 0: - return '[В следующее] dddd, [в] LT'; - case 1: - case 2: - case 4: - return '[В следующий] dddd, [в] LT'; - case 3: - case 5: - case 6: - return '[В следующую] dddd, [в] LT'; - } - } - - if ($current->dayOfWeek === 2) { - return '[Во] dddd, [в] LT'; - } - - return '[В] dddd, [в] LT'; - }, - 'lastDay' => '[Вчера, в] LT', - 'lastWeek' => function (CarbonInterface $current, CarbonInterface $other) { - if ($current->week !== $other->week) { - switch ($current->dayOfWeek) { - case 0: - return '[В прошлое] dddd, [в] LT'; - case 1: - case 2: - case 4: - return '[В прошлый] dddd, [в] LT'; - case 3: - case 5: - case 6: - return '[В прошлую] dddd, [в] LT'; - } - } - - if ($current->dayOfWeek === 2) { - return '[Во] dddd, [в] LT'; - } - - return '[В] dddd, [в] LT'; - }, - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'M': - case 'd': - case 'DDD': - return $number.'-й'; - case 'D': - return $number.'-го'; - case 'w': - case 'W': - return $number.'-я'; - default: - return $number; - } - }, - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'ночи'; - } - if ($hour < 12) { - return 'утра'; - } - if ($hour < 17) { - return 'дня'; - } - - return 'вечера'; - }, - 'months' => ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'], - 'months_standalone' => ['январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь'], - 'months_short' => ['янв', 'фев', 'мар', 'апр', 'мая', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], - 'months_short_standalone' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], - 'months_regexp' => '/(DD?o?\.?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => ['воскресенье', 'понедельник', 'вторник', 'среду', 'четверг', 'пятницу', 'субботу'], - 'weekdays_standalone' => ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'], - 'weekdays_short' => ['вск', 'пнд', 'втр', 'срд', 'чтв', 'птн', 'сбт'], - 'weekdays_min' => ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], - 'weekdays_regexp' => '/\[\s*(В|в)\s*((?:прошлую|следующую|эту)\s*)?\]\s*dddd/', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' и '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru_BY.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru_BY.php deleted file mode 100644 index 8ca7df3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ru_BY.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ru.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru_KG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru_KG.php deleted file mode 100644 index 8ca7df3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ru_KG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ru.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru_KZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru_KZ.php deleted file mode 100644 index 8ca7df3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ru_KZ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ru.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru_MD.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru_MD.php deleted file mode 100644 index 8ca7df3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ru_MD.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ru.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru_RU.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru_RU.php deleted file mode 100644 index 8ca7df3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ru_RU.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ru.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru_UA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru_UA.php deleted file mode 100644 index db958d6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ru_UA.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - RFC 2319 bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/ru.php', [ - 'weekdays' => ['воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота'], - 'weekdays_short' => ['вск', 'пнд', 'вто', 'срд', 'чтв', 'птн', 'суб'], - 'weekdays_min' => ['вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'су'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/rw.php b/vendor/nesbot/carbon/src/Carbon/Lang/rw.php deleted file mode 100644 index bc4a347..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/rw.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/rw_RW.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/rw_RW.php b/vendor/nesbot/carbon/src/Carbon/Lang/rw_RW.php deleted file mode 100644 index 9b3e068..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/rw_RW.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Rwanda Steve Murphy murf@e-tools.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Mutarama', 'Gashyantare', 'Werurwe', 'Mata', 'Gicuransi', 'Kamena', 'Nyakanga', 'Kanama', 'Nzeli', 'Ukwakira', 'Ugushyingo', 'Ukuboza'], - 'months_short' => ['Mut', 'Gas', 'Wer', 'Mat', 'Gic', 'Kam', 'Nya', 'Kan', 'Nze', 'Ukw', 'Ugu', 'Uku'], - 'weekdays' => ['Ku cyumweru', 'Kuwa mbere', 'Kuwa kabiri', 'Kuwa gatatu', 'Kuwa kane', 'Kuwa gatanu', 'Kuwa gatandatu'], - 'weekdays_short' => ['Mwe', 'Mbe', 'Kab', 'Gtu', 'Kan', 'Gnu', 'Gnd'], - 'weekdays_min' => ['Mwe', 'Mbe', 'Kab', 'Gtu', 'Kan', 'Gnu', 'Gnd'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'second' => ':count vuna', // less reliable - 's' => ':count vuna', // less reliable - 'a_second' => ':count vuna', // less reliable - - 'year' => 'aka :count', - 'y' => 'aka :count', - 'a_year' => 'aka :count', - - 'month' => 'ezi :count', - 'm' => 'ezi :count', - 'a_month' => 'ezi :count', - - 'week' => ':count icyumweru', - 'w' => ':count icyumweru', - 'a_week' => ':count icyumweru', - - 'day' => ':count nsi', - 'd' => ':count nsi', - 'a_day' => ':count nsi', - - 'hour' => 'saha :count', - 'h' => 'saha :count', - 'a_hour' => 'saha :count', - - 'minute' => ':count -nzinya', - 'min' => ':count -nzinya', - 'a_minute' => ':count -nzinya', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/rwk.php b/vendor/nesbot/carbon/src/Carbon/Lang/rwk.php deleted file mode 100644 index ed92e8e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/rwk.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['utuko', 'kyiukonyi'], - 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sa.php b/vendor/nesbot/carbon/src/Carbon/Lang/sa.php deleted file mode 100644 index 1357c03..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sa.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/sa_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sa_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/sa_IN.php deleted file mode 100644 index cfda9a6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sa_IN.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - The Debian project Christian Perrier bubulle@debian.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D-MM-YY', - ], - 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'weekdays' => ['रविवासर:', 'सोमवासर:', 'मंगलवासर:', 'बुधवासर:', 'बृहस्पतिवासरः', 'शुक्रवासर', 'शनिवासर:'], - 'weekdays_short' => ['रविः', 'सोम:', 'मंगल:', 'बुध:', 'बृहस्पतिः', 'शुक्र', 'शनि:'], - 'weekdays_min' => ['रविः', 'सोम:', 'मंगल:', 'बुध:', 'बृहस्पतिः', 'शुक्र', 'शनि:'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], - - 'minute' => ':count होरा', // less reliable - 'min' => ':count होरा', // less reliable - 'a_minute' => ':count होरा', // less reliable - - 'year' => ':count वर्ष', - 'y' => ':count वर्ष', - 'a_year' => ':count वर्ष', - - 'month' => ':count मास', - 'm' => ':count मास', - 'a_month' => ':count मास', - - 'week' => ':count सप्ताहः saptahaĥ', - 'w' => ':count सप्ताहः saptahaĥ', - 'a_week' => ':count सप्ताहः saptahaĥ', - - 'day' => ':count दिन', - 'd' => ':count दिन', - 'a_day' => ':count दिन', - - 'hour' => ':count घण्टा', - 'h' => ':count घण्टा', - 'a_hour' => ':count घण्टा', - - 'second' => ':count द्वितीयः', - 's' => ':count द्वितीयः', - 'a_second' => ':count द्वितीयः', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sah.php b/vendor/nesbot/carbon/src/Carbon/Lang/sah.php deleted file mode 100644 index b828824..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sah.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/sah_RU.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sah_RU.php b/vendor/nesbot/carbon/src/Carbon/Lang/sah_RU.php deleted file mode 100644 index 94cc0cb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sah_RU.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Valery Timiriliyev Valery Timiriliyev timiriliyev@gmail.com - */ -return array_replace_recursive(require __DIR__.'/ru.php', [ - 'formats' => [ - 'L' => 'YYYY.MM.DD', - ], - 'months' => ['тохсунньу', 'олунньу', 'кулун тутар', 'муус устар', 'ыам ыйын', 'бэс ыйын', 'от ыйын', 'атырдьах ыйын', 'балаҕан ыйын', 'алтынньы', 'сэтинньи', 'ахсынньы'], - 'months_short' => ['тохс', 'олун', 'кул', 'муус', 'ыам', 'бэс', 'от', 'атыр', 'бал', 'алт', 'сэт', 'ахс'], - 'weekdays' => ['баскыһыанньа', 'бэнидиэнньик', 'оптуорунньук', 'сэрэдэ', 'чэппиэр', 'бээтинсэ', 'субуота'], - 'weekdays_short' => ['бс', 'бн', 'оп', 'ср', 'чп', 'бт', 'сб'], - 'weekdays_min' => ['бс', 'бн', 'оп', 'ср', 'чп', 'бт', 'сб'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/saq.php b/vendor/nesbot/carbon/src/Carbon/Lang/saq.php deleted file mode 100644 index ff8bf60..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/saq.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Tesiran', 'Teipa'], - 'weekdays' => ['Mderot ee are', 'Mderot ee kuni', 'Mderot ee ong’wan', 'Mderot ee inet', 'Mderot ee ile', 'Mderot ee sapa', 'Mderot ee kwe'], - 'weekdays_short' => ['Are', 'Kun', 'Ong', 'Ine', 'Ile', 'Sap', 'Kwe'], - 'weekdays_min' => ['Are', 'Kun', 'Ong', 'Ine', 'Ile', 'Sap', 'Kwe'], - 'months' => ['Lapa le obo', 'Lapa le waare', 'Lapa le okuni', 'Lapa le ong’wan', 'Lapa le imet', 'Lapa le ile', 'Lapa le sapa', 'Lapa le isiet', 'Lapa le saal', 'Lapa le tomon', 'Lapa le tomon obo', 'Lapa le tomon waare'], - 'months_short' => ['Obo', 'Waa', 'Oku', 'Ong', 'Ime', 'Ile', 'Sap', 'Isi', 'Saa', 'Tom', 'Tob', 'Tow'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sat.php b/vendor/nesbot/carbon/src/Carbon/Lang/sat.php deleted file mode 100644 index c9914c6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sat.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/sat_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sat_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/sat_IN.php deleted file mode 100644 index 632b1af..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sat_IN.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat Pune libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रेल', 'मई', 'जुन', 'जुलाई', 'अगस्त', 'सितम्बर', 'अखथबर', 'नवम्बर', 'दिसम्बर'], - 'months_short' => ['जनवरी', 'फरवरी', 'मार्च', 'अप्रेल', 'मई', 'जुन', 'जुलाई', 'अगस्त', 'सितम्बर', 'अखथबर', 'नवम्बर', 'दिसम्बर'], - 'weekdays' => ['सिंगेमाँहाँ', 'ओतेमाँहाँ', 'बालेमाँहाँ', 'सागुनमाँहाँ', 'सारदीमाँहाँ', 'जारुममाँहाँ', 'ञुहुममाँहाँ'], - 'weekdays_short' => ['सिंगे', 'ओते', 'बाले', 'सागुन', 'सारदी', 'जारुम', 'ञुहुम'], - 'weekdays_min' => ['सिंगे', 'ओते', 'बाले', 'सागुन', 'सारदी', 'जारुम', 'ञुहुम'], - 'day_of_first_week_of_year' => 1, - - 'month' => ':count ńindạ cando', // less reliable - 'm' => ':count ńindạ cando', // less reliable - 'a_month' => ':count ńindạ cando', // less reliable - - 'week' => ':count mãhã', // less reliable - 'w' => ':count mãhã', // less reliable - 'a_week' => ':count mãhã', // less reliable - - 'hour' => ':count ᱥᱳᱱᱚ', // less reliable - 'h' => ':count ᱥᱳᱱᱚ', // less reliable - 'a_hour' => ':count ᱥᱳᱱᱚ', // less reliable - - 'minute' => ':count ᱯᱤᱞᱪᱩ', // less reliable - 'min' => ':count ᱯᱤᱞᱪᱩ', // less reliable - 'a_minute' => ':count ᱯᱤᱞᱪᱩ', // less reliable - - 'second' => ':count ar', // less reliable - 's' => ':count ar', // less reliable - 'a_second' => ':count ar', // less reliable - - 'year' => ':count ne̲s', - 'y' => ':count ne̲s', - 'a_year' => ':count ne̲s', - - 'day' => ':count ᱫᱤᱱ', - 'd' => ':count ᱫᱤᱱ', - 'a_day' => ':count ᱫᱤᱱ', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sbp.php b/vendor/nesbot/carbon/src/Carbon/Lang/sbp.php deleted file mode 100644 index e29ca37..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sbp.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Lwamilawu', 'Pashamihe'], - 'weekdays' => ['Mulungu', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alahamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['Mul', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'weekdays_min' => ['Mul', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'months' => ['Mupalangulwa', 'Mwitope', 'Mushende', 'Munyi', 'Mushende Magali', 'Mujimbi', 'Mushipepo', 'Mupuguto', 'Munyense', 'Mokhu', 'Musongandembwe', 'Muhaano'], - 'months_short' => ['Mup', 'Mwi', 'Msh', 'Mun', 'Mag', 'Muj', 'Msp', 'Mpg', 'Mye', 'Mok', 'Mus', 'Muh'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sc.php b/vendor/nesbot/carbon/src/Carbon/Lang/sc.php deleted file mode 100644 index 7178cf4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sc.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/sc_IT.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sc_IT.php b/vendor/nesbot/carbon/src/Carbon/Lang/sc_IT.php deleted file mode 100644 index 5d1e4ce..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sc_IT.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Sardinian Translators Team Massimeddu Cireddu massimeddu@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD. MM. YY', - ], - 'months' => ['Ghennàrgiu', 'Freàrgiu', 'Martzu', 'Abrile', 'Maju', 'Làmpadas', 'Argiolas//Trìulas', 'Austu', 'Cabudanni', 'Santugaine//Ladàmine', 'Onniasantu//Santandria', 'Nadale//Idas'], - 'months_short' => ['Ghe', 'Fre', 'Mar', 'Abr', 'Maj', 'Làm', 'Arg', 'Aus', 'Cab', 'Lad', 'Onn', 'Nad'], - 'weekdays' => ['Domìnigu', 'Lunis', 'Martis', 'Mèrcuris', 'Giòbia', 'Chenàbura', 'Sàbadu'], - 'weekdays_short' => ['Dom', 'Lun', 'Mar', 'Mèr', 'Giò', 'Che', 'Sàb'], - 'weekdays_min' => ['Dom', 'Lun', 'Mar', 'Mèr', 'Giò', 'Che', 'Sàb'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'minute' => ':count mementu', // less reliable - 'min' => ':count mementu', // less reliable - 'a_minute' => ':count mementu', // less reliable - - 'year' => ':count annu', - 'y' => ':count annu', - 'a_year' => ':count annu', - - 'month' => ':count mese', - 'm' => ':count mese', - 'a_month' => ':count mese', - - 'week' => ':count chida', - 'w' => ':count chida', - 'a_week' => ':count chida', - - 'day' => ':count dí', - 'd' => ':count dí', - 'a_day' => ':count dí', - - 'hour' => ':count ora', - 'h' => ':count ora', - 'a_hour' => ':count ora', - - 'second' => ':count secundu', - 's' => ':count secundu', - 'a_second' => ':count secundu', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sd.php b/vendor/nesbot/carbon/src/Carbon/Lang/sd.php deleted file mode 100644 index 0022c5a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sd.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -$months = [ - 'جنوري', - 'فيبروري', - 'مارچ', - 'اپريل', - 'مئي', - 'جون', - 'جولاءِ', - 'آگسٽ', - 'سيپٽمبر', - 'آڪٽوبر', - 'نومبر', - 'ڊسمبر', -]; - -$weekdays = [ - 'آچر', - 'سومر', - 'اڱارو', - 'اربع', - 'خميس', - 'جمع', - 'ڇنڇر', -]; - -/* - * Authors: - * - Narain Sagar - * - Sawood Alam - * - Narain Sagar - */ -return [ - 'year' => '{1}'.'هڪ سال'.'|:count '.'سال', - 'month' => '{1}'.'هڪ مهينو'.'|:count '.'مهينا', - 'week' => '{1}'.'ھڪ ھفتو'.'|:count '.'هفتا', - 'day' => '{1}'.'هڪ ڏينهن'.'|:count '.'ڏينهن', - 'hour' => '{1}'.'هڪ ڪلاڪ'.'|:count '.'ڪلاڪ', - 'minute' => '{1}'.'هڪ منٽ'.'|:count '.'منٽ', - 'second' => '{1}'.'چند سيڪنڊ'.'|:count '.'سيڪنڊ', - 'ago' => ':time اڳ', - 'from_now' => ':time پوء', - 'diff_yesterday' => 'ڪالهه', - 'diff_today' => 'اڄ', - 'diff_tomorrow' => 'سڀاڻي', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd، D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[اڄ] LT', - 'nextDay' => '[سڀاڻي] LT', - 'nextWeek' => 'dddd [اڳين هفتي تي] LT', - 'lastDay' => '[ڪالهه] LT', - 'lastWeek' => '[گزريل هفتي] dddd [تي] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['صبح', 'شام'], - 'months' => $months, - 'months_short' => $months, - 'weekdays' => $weekdays, - 'weekdays_short' => $weekdays, - 'weekdays_min' => $weekdays, - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => ['، ', ' ۽ '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sd_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/sd_IN.php deleted file mode 100644 index de1dad0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sd_IN.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat, Pune bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/sd.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['جنوري', 'فبروري', 'مارچ', 'اپريل', 'مي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽيمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'], - 'months_short' => ['جنوري', 'فبروري', 'مارچ', 'اپريل', 'مي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽيمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر'], - 'weekdays' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], - 'weekdays_short' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], - 'weekdays_min' => ['آرتوارُ', 'سومرُ', 'منگلُ', 'ٻُڌرُ', 'وسپت', 'جُمو', 'ڇنڇر'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sd_IN@devanagari.php b/vendor/nesbot/carbon/src/Carbon/Lang/sd_IN@devanagari.php deleted file mode 100644 index 061fcc1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sd_IN@devanagari.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat, Pune bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/sd.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['जनवरी', 'फबरवरी', 'मार्चि', 'अप्रेल', 'मे', 'जूनि', 'जूलाइ', 'आगस्टु', 'सेप्टेंबरू', 'आक्टूबरू', 'नवंबरू', 'ॾिसंबरू'], - 'months_short' => ['जनवरी', 'फबरवरी', 'मार्चि', 'अप्रेल', 'मे', 'जूनि', 'जूलाइ', 'आगस्टु', 'सेप्टेंबरू', 'आक्टूबरू', 'नवंबरू', 'ॾिसंबरू'], - 'weekdays' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], - 'weekdays_short' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], - 'weekdays_min' => ['आर्तवारू', 'सूमरू', 'मंगलू', 'ॿुधरू', 'विस्पति', 'जुमो', 'छंछस'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['म.पू.', 'म.नं.'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/se.php b/vendor/nesbot/carbon/src/Carbon/Lang/se.php deleted file mode 100644 index 7c4b92a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/se.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Karamell - */ -return [ - 'year' => '{1}:count jahki|:count jagit', - 'a_year' => '{1}okta jahki|:count jagit', - 'y' => ':count j.', - 'month' => '{1}:count mánnu|:count mánut', - 'a_month' => '{1}okta mánnu|:count mánut', - 'm' => ':count mán.', - 'week' => '{1}:count vahkku|:count vahkku', - 'a_week' => '{1}okta vahkku|:count vahkku', - 'w' => ':count v.', - 'day' => '{1}:count beaivi|:count beaivvit', - 'a_day' => '{1}okta beaivi|:count beaivvit', - 'd' => ':count b.', - 'hour' => '{1}:count diimmu|:count diimmut', - 'a_hour' => '{1}okta diimmu|:count diimmut', - 'h' => ':count d.', - 'minute' => '{1}:count minuhta|:count minuhtat', - 'a_minute' => '{1}okta minuhta|:count minuhtat', - 'min' => ':count min.', - 'second' => '{1}:count sekunddat|:count sekunddat', - 'a_second' => '{1}moadde sekunddat|:count sekunddat', - 's' => ':count s.', - 'ago' => 'maŋit :time', - 'from_now' => ':time geažes', - 'diff_yesterday' => 'ikte', - 'diff_yesterday_regexp' => 'ikte(?:\\s+ti)?', - 'diff_today' => 'otne', - 'diff_today_regexp' => 'otne(?:\\s+ti)?', - 'diff_tomorrow' => 'ihttin', - 'diff_tomorrow_regexp' => 'ihttin(?:\\s+ti)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'MMMM D. [b.] YYYY', - 'LLL' => 'MMMM D. [b.] YYYY [ti.] HH:mm', - 'LLLL' => 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[otne ti] LT', - 'nextDay' => '[ihttin ti] LT', - 'nextWeek' => 'dddd [ti] LT', - 'lastDay' => '[ikte ti] LT', - 'lastWeek' => '[ovddit] dddd [ti] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['ođđajagemánnu', 'guovvamánnu', 'njukčamánnu', 'cuoŋománnu', 'miessemánnu', 'geassemánnu', 'suoidnemánnu', 'borgemánnu', 'čakčamánnu', 'golggotmánnu', 'skábmamánnu', 'juovlamánnu'], - 'months_short' => ['ođđj', 'guov', 'njuk', 'cuo', 'mies', 'geas', 'suoi', 'borg', 'čakč', 'golg', 'skáb', 'juov'], - 'weekdays' => ['sotnabeaivi', 'vuossárga', 'maŋŋebárga', 'gaskavahkku', 'duorastat', 'bearjadat', 'lávvardat'], - 'weekdays_short' => ['sotn', 'vuos', 'maŋ', 'gask', 'duor', 'bear', 'láv'], - 'weekdays_min' => ['s', 'v', 'm', 'g', 'd', 'b', 'L'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' ja '], - 'meridiem' => ['i.b.', 'e.b.'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/se_FI.php b/vendor/nesbot/carbon/src/Carbon/Lang/se_FI.php deleted file mode 100644 index cf01805..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/se_FI.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/se.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'months' => ['ođđajagemánnu', 'guovvamánnu', 'njukčamánnu', 'cuoŋománnu', 'miessemánnu', 'geassemánnu', 'suoidnemánnu', 'borgemánnu', 'čakčamánnu', 'golggotmánnu', 'skábmamánnu', 'juovlamánnu'], - 'months_short' => ['ođđj', 'guov', 'njuk', 'cuoŋ', 'mies', 'geas', 'suoi', 'borg', 'čakč', 'golg', 'skáb', 'juov'], - 'weekdays' => ['sotnabeaivi', 'mánnodat', 'disdat', 'gaskavahkku', 'duorastat', 'bearjadat', 'lávvordat'], - 'weekdays_short' => ['so', 'má', 'di', 'ga', 'du', 'be', 'lá'], - 'weekdays_min' => ['so', 'má', 'di', 'ga', 'du', 'be', 'lá'], - 'meridiem' => ['i', 'e'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/se_NO.php b/vendor/nesbot/carbon/src/Carbon/Lang/se_NO.php deleted file mode 100644 index 177c7e9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/se_NO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/se.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/se_SE.php b/vendor/nesbot/carbon/src/Carbon/Lang/se_SE.php deleted file mode 100644 index 177c7e9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/se_SE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/se.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/seh.php b/vendor/nesbot/carbon/src/Carbon/Lang/seh.php deleted file mode 100644 index babf9af..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/seh.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['Dimingu', 'Chiposi', 'Chipiri', 'Chitatu', 'Chinai', 'Chishanu', 'Sabudu'], - 'weekdays_short' => ['Dim', 'Pos', 'Pir', 'Tat', 'Nai', 'Sha', 'Sab'], - 'weekdays_min' => ['Dim', 'Pos', 'Pir', 'Tat', 'Nai', 'Sha', 'Sab'], - 'months' => ['Janeiro', 'Fevreiro', 'Marco', 'Abril', 'Maio', 'Junho', 'Julho', 'Augusto', 'Setembro', 'Otubro', 'Novembro', 'Decembro'], - 'months_short' => ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Aug', 'Set', 'Otu', 'Nov', 'Dec'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'd [de] MMM [de] YYYY', - 'LLL' => 'd [de] MMMM [de] YYYY HH:mm', - 'LLLL' => 'dddd, d [de] MMMM [de] YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ses.php b/vendor/nesbot/carbon/src/Carbon/Lang/ses.php deleted file mode 100644 index e1099e6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ses.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Adduha', 'Aluula'], - 'weekdays' => ['Alhadi', 'Atinni', 'Atalaata', 'Alarba', 'Alhamiisa', 'Alzuma', 'Asibti'], - 'weekdays_short' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], - 'weekdays_min' => ['Alh', 'Ati', 'Ata', 'Ala', 'Alm', 'Alz', 'Asi'], - 'months' => ['Žanwiye', 'Feewiriye', 'Marsi', 'Awiril', 'Me', 'Žuweŋ', 'Žuyye', 'Ut', 'Sektanbur', 'Oktoobur', 'Noowanbur', 'Deesanbur'], - 'months_short' => ['Žan', 'Fee', 'Mar', 'Awi', 'Me', 'Žuw', 'Žuy', 'Ut', 'Sek', 'Okt', 'Noo', 'Dee'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - 'month' => ':count alaada', // less reliable - 'm' => ':count alaada', // less reliable - 'a_month' => ':count alaada', // less reliable - - 'hour' => ':count ɲaajin', // less reliable - 'h' => ':count ɲaajin', // less reliable - 'a_hour' => ':count ɲaajin', // less reliable - - 'minute' => ':count zarbu', // less reliable - 'min' => ':count zarbu', // less reliable - 'a_minute' => ':count zarbu', // less reliable - - 'year' => ':count jiiri', - 'y' => ':count jiiri', - 'a_year' => ':count jiiri', - - 'week' => ':count jirbiiyye', - 'w' => ':count jirbiiyye', - 'a_week' => ':count jirbiiyye', - - 'day' => ':count zaari', - 'd' => ':count zaari', - 'a_day' => ':count zaari', - - 'second' => ':count ihinkante', - 's' => ':count ihinkante', - 'a_second' => ':count ihinkante', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sg.php b/vendor/nesbot/carbon/src/Carbon/Lang/sg.php deleted file mode 100644 index 9264e89..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sg.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['ND', 'LK'], - 'weekdays' => ['Bikua-ôko', 'Bïkua-ûse', 'Bïkua-ptâ', 'Bïkua-usïö', 'Bïkua-okü', 'Lâpôsö', 'Lâyenga'], - 'weekdays_short' => ['Bk1', 'Bk2', 'Bk3', 'Bk4', 'Bk5', 'Lâp', 'Lây'], - 'weekdays_min' => ['Bk1', 'Bk2', 'Bk3', 'Bk4', 'Bk5', 'Lâp', 'Lây'], - 'months' => ['Nyenye', 'Fulundïgi', 'Mbängü', 'Ngubùe', 'Bêläwü', 'Föndo', 'Lengua', 'Kükürü', 'Mvuka', 'Ngberere', 'Nabändüru', 'Kakauka'], - 'months_short' => ['Nye', 'Ful', 'Mbä', 'Ngu', 'Bêl', 'Fön', 'Len', 'Kük', 'Mvu', 'Ngb', 'Nab', 'Kak'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - 'year' => ':count dā', // less reliable - 'y' => ':count dā', // less reliable - 'a_year' => ':count dā', // less reliable - - 'week' => ':count bïkua-okü', // less reliable - 'w' => ':count bïkua-okü', // less reliable - 'a_week' => ':count bïkua-okü', // less reliable - - 'day' => ':count ziggawâ', // less reliable - 'd' => ':count ziggawâ', // less reliable - 'a_day' => ':count ziggawâ', // less reliable - - 'hour' => ':count yângâködörö', // less reliable - 'h' => ':count yângâködörö', // less reliable - 'a_hour' => ':count yângâködörö', // less reliable - - 'second' => ':count bïkua-ôko', // less reliable - 's' => ':count bïkua-ôko', // less reliable - 'a_second' => ':count bïkua-ôko', // less reliable - - 'month' => ':count Nze tî ngu', - 'm' => ':count Nze tî ngu', - 'a_month' => ':count Nze tî ngu', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sgs.php b/vendor/nesbot/carbon/src/Carbon/Lang/sgs.php deleted file mode 100644 index 864b989..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sgs.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/sgs_LT.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sgs_LT.php b/vendor/nesbot/carbon/src/Carbon/Lang/sgs_LT.php deleted file mode 100644 index aa9e942..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sgs_LT.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Arnas Udovičius bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY.MM.DD', - ], - 'months' => ['sausė', 'vasarė', 'kuova', 'balondė', 'gegožės', 'bėrželė', 'lëpas', 'rogpjūtė', 'siejės', 'spalė', 'lapkrėstė', 'grůdė'], - 'months_short' => ['Sau', 'Vas', 'Kuo', 'Bal', 'Geg', 'Bėr', 'Lëp', 'Rgp', 'Sie', 'Spa', 'Lap', 'Grd'], - 'weekdays' => ['nedielės dëna', 'panedielis', 'oterninks', 'sereda', 'četvergs', 'petnīčė', 'sobata'], - 'weekdays_short' => ['Nd', 'Pn', 'Ot', 'Sr', 'Čt', 'Pt', 'Sb'], - 'weekdays_min' => ['Nd', 'Pn', 'Ot', 'Sr', 'Čt', 'Pt', 'Sb'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'minute' => ':count mažos', // less reliable - 'min' => ':count mažos', // less reliable - 'a_minute' => ':count mažos', // less reliable - - 'year' => ':count metā', - 'y' => ':count metā', - 'a_year' => ':count metā', - - 'month' => ':count mienou', - 'm' => ':count mienou', - 'a_month' => ':count mienou', - - 'week' => ':count nedielė', - 'w' => ':count nedielė', - 'a_week' => ':count nedielė', - - 'day' => ':count dīna', - 'd' => ':count dīna', - 'a_day' => ':count dīna', - - 'hour' => ':count adīna', - 'h' => ':count adīna', - 'a_hour' => ':count adīna', - - 'second' => ':count Sekondė', - 's' => ':count Sekondė', - 'a_second' => ':count Sekondė', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sh.php b/vendor/nesbot/carbon/src/Carbon/Lang/sh.php deleted file mode 100644 index e03b506..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sh.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -// @codeCoverageIgnoreStart -use Symfony\Component\Translation\PluralizationRules; - -if (class_exists('Symfony\\Component\\Translation\\PluralizationRules')) { - PluralizationRules::set(static function ($number) { - return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - }, 'sh'); -} -// @codeCoverageIgnoreEnd - -/* - * Authors: - * - Томица Кораћ - * - Enrique Vidal - * - Christopher Dell - * - dmilisic - * - danijel - * - Miroslav Matkovic (mikki021) - */ -return [ - 'diff_now' => 'sada', - 'diff_yesterday' => 'juče', - 'diff_tomorrow' => 'sutra', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'MMMM D, YYYY', - 'LLL' => 'DD MMM HH:mm', - 'LLLL' => 'MMMM DD, YYYY HH:mm', - ], - 'year' => ':count godina|:count godine|:count godina', - 'y' => ':count g.', - 'month' => ':count mesec|:count meseca|:count meseci', - 'm' => ':count m.', - 'week' => ':count nedelja|:count nedelje|:count nedelja', - 'w' => ':count n.', - 'day' => ':count dan|:count dana|:count dana', - 'd' => ':count d.', - 'hour' => ':count sat|:count sata|:count sati', - 'h' => ':count č.', - 'minute' => ':count minut|:count minuta|:count minuta', - 'min' => ':count min.', - 'second' => ':count sekund|:count sekunde|:count sekundi', - 's' => ':count s.', - 'ago' => 'pre :time', - 'from_now' => 'za :time', - 'after' => 'nakon :time', - 'before' => ':time raniјe', - 'weekdays' => ['Nedelja', 'Ponedeljak', 'Utorak', 'Sreda', 'Četvrtak', 'Petak', 'Subota'], - 'weekdays_short' => ['Ned', 'Pon', 'Uto', 'Sre', 'Čet', 'Pet', 'Sub'], - 'weekdays_min' => ['Ned', 'Pon', 'Uto', 'Sre', 'Čet', 'Pet', 'Sub'], - 'months' => ['Januar', 'Februar', 'Mart', 'April', 'Maj', 'Jun', 'Jul', 'Avgust', 'Septembar', 'Oktobar', 'Novembar', 'Decembar'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'], - 'list' => [', ', ' i '], - 'meridiem' => ['pre podne', 'po podne'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/shi.php b/vendor/nesbot/carbon/src/Carbon/Lang/shi.php deleted file mode 100644 index 7815186..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/shi.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['ⵜⵉⴼⴰⵡⵜ', 'ⵜⴰⴷⴳⴳⵯⴰⵜ'], - 'weekdays' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵕⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], - 'weekdays_short' => ['ⴰⵙⴰ', 'ⴰⵢⵏ', 'ⴰⵙⵉ', 'ⴰⴽⵕ', 'ⴰⴽⵡ', 'ⴰⵙⵉⵎ', 'ⴰⵙⵉⴹ'], - 'weekdays_min' => ['ⴰⵙⴰ', 'ⴰⵢⵏ', 'ⴰⵙⵉ', 'ⴰⴽⵕ', 'ⴰⴽⵡ', 'ⴰⵙⵉⵎ', 'ⴰⵙⵉⴹ'], - 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵜⵓⴱⵔ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⴰⵏⴱⵉⵔ'], - 'months_short' => ['ⵉⵏⵏ', 'ⴱⵕⴰ', 'ⵎⴰⵕ', 'ⵉⴱⵔ', 'ⵎⴰⵢ', 'ⵢⵓⵏ', 'ⵢⵓⵍ', 'ⵖⵓⵛ', 'ⵛⵓⵜ', 'ⴽⵜⵓ', 'ⵏⵓⵡ', 'ⴷⵓⵊ'], - 'first_day_of_week' => 6, - 'weekend' => [5, 6], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - 'year' => ':count aseggwas', - 'y' => ':count aseggwas', - 'a_year' => ':count aseggwas', - - 'month' => ':count ayyur', - 'm' => ':count ayyur', - 'a_month' => ':count ayyur', - - 'week' => ':count imalass', - 'w' => ':count imalass', - 'a_week' => ':count imalass', - - 'day' => ':count ass', - 'd' => ':count ass', - 'a_day' => ':count ass', - - 'hour' => ':count urɣ', // less reliable - 'h' => ':count urɣ', // less reliable - 'a_hour' => ':count urɣ', // less reliable - - 'minute' => ':count ⴰⵎⵥⵉ', // less reliable - 'min' => ':count ⴰⵎⵥⵉ', // less reliable - 'a_minute' => ':count ⴰⵎⵥⵉ', // less reliable - - 'second' => ':count sin', // less reliable - 's' => ':count sin', // less reliable - 'a_second' => ':count sin', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/shi_Latn.php b/vendor/nesbot/carbon/src/Carbon/Lang/shi_Latn.php deleted file mode 100644 index cddfb24..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/shi_Latn.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/shi.php', [ - 'meridiem' => ['tifawt', 'tadggʷat'], - 'weekdays' => ['asamas', 'aynas', 'asinas', 'akṛas', 'akwas', 'asimwas', 'asiḍyas'], - 'weekdays_short' => ['asa', 'ayn', 'asi', 'akṛ', 'akw', 'asim', 'asiḍ'], - 'weekdays_min' => ['asa', 'ayn', 'asi', 'akṛ', 'akw', 'asim', 'asiḍ'], - 'months' => ['innayr', 'bṛayṛ', 'maṛṣ', 'ibrir', 'mayyu', 'yunyu', 'yulyuz', 'ɣuct', 'cutanbir', 'ktubr', 'nuwanbir', 'dujanbir'], - 'months_short' => ['inn', 'bṛa', 'maṛ', 'ibr', 'may', 'yun', 'yul', 'ɣuc', 'cut', 'ktu', 'nuw', 'duj'], - 'first_day_of_week' => 6, - 'weekend' => [5, 6], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - - 'minute' => ':count agur', // less reliable - 'min' => ':count agur', // less reliable - 'a_minute' => ':count agur', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/shi_Tfng.php b/vendor/nesbot/carbon/src/Carbon/Lang/shi_Tfng.php deleted file mode 100644 index f3df1f2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/shi_Tfng.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/shi.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/shn.php b/vendor/nesbot/carbon/src/Carbon/Lang/shn.php deleted file mode 100644 index fe7b1ea..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/shn.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/shn_MM.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/shn_MM.php b/vendor/nesbot/carbon/src/Carbon/Lang/shn_MM.php deleted file mode 100644 index f399acf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/shn_MM.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - ubuntu Myanmar LoCo Team https://ubuntu-mm.net Bone Pyae Sone bone.burma@mail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'OY MMM OD dddd', - ], - 'months' => ['လိူၼ်ၵမ်', 'လိူၼ်သၢမ်', 'လိူၼ်သီ', 'လိူၼ်ႁႃႈ', 'လိူၼ်ႁူၵ်း', 'လိူၼ်ၸဵတ်း', 'လိူၼ်ပႅတ်ႇ', 'လိူၼ်ၵဝ်ႈ', 'လိူၼ်သိပ်း', 'လိူၼ်သိပ်းဢိတ်း', 'လိူၼ်သိပ်းဢိတ်းသွင်', 'လိူၼ်ၸဵင်'], - 'months_short' => ['လိူၼ်ၵမ်', 'လိူၼ်သၢမ်', 'လိူၼ်သီ', 'လိူၼ်ႁႃႈ', 'လိူၼ်ႁူၵ်း', 'လိူၼ်ၸဵတ်း', 'လိူၼ်ပႅတ်ႇ', 'လိူၼ်ၵဝ်ႈ', 'လိူၼ်သိပ်း', 'လိူၼ်သိပ်းဢိတ်း', 'လိူၼ်သိပ်းဢိတ်းသွင်', 'လိူၼ်ၸဵင်'], - 'weekdays' => ['ဝၼ်းဢႃးတိတ်ႉ', 'ဝၼ်းၸၼ်', 'ဝၼ်း​ဢၢင်း​ၵၢၼ်း', 'ဝၼ်းပူတ်ႉ', 'ဝၼ်းၽတ်း', 'ဝၼ်းသုၵ်း', 'ဝၼ်းသဝ်'], - 'weekdays_short' => ['တိတ့်', 'ၸၼ်', 'ၵၢၼ်း', 'ပုတ့်', 'ၽတ်း', 'သုၵ်း', 'သဝ်'], - 'weekdays_min' => ['တိတ့်', 'ၸၼ်', 'ၵၢၼ်း', 'ပုတ့်', 'ၽတ်း', 'သုၵ်း', 'သဝ်'], - 'alt_numbers' => ['႐႐', '႐႑', '႐႒', '႐႓', '႐႔', '႐႕', '႐႖', '႐႗', '႐႘', '႐႙', '႑႐', '႑႑', '႑႒', '႑႓', '႑႔', '႑႕', '႑႖', '႑႗', '႑႘', '႑႙', '႒႐', '႒႑', '႒႒', '႒႓', '႒႔', '႒႕', '႒႖', '႒႗', '႒႘', '႒႙', '႓႐', '႓႑', '႓႒', '႓႓', '႓႔', '႓႕', '႓႖', '႓႗', '႓႘', '႓႙', '႔႐', '႔႑', '႔႒', '႔႓', '႔႔', '႔႕', '႔႖', '႔႗', '႔႘', '႔႙', '႕႐', '႕႑', '႕႒', '႕႓', '႕႔', '႕႕', '႕႖', '႕႗', '႕႘', '႕႙', '႖႐', '႖႑', '႖႒', '႖႓', '႖႔', '႖႕', '႖႖', '႖႗', '႖႘', '႖႙', '႗႐', '႗႑', '႗႒', '႗႓', '႗႔', '႗႕', '႗႖', '႗႗', '႗႘', '႗႙', '႘႐', '႘႑', '႘႒', '႘႓', '႘႔', '႘႕', '႘႖', '႘႗', '႘႘', '႘႙', '႙႐', '႙႑', '႙႒', '႙႓', '႙႔', '႙႕', '႙႖', '႙႗', '႙႘', '႙႙'], - 'meridiem' => ['ၵၢင်ၼႂ်', 'တၢမ်းၶမ်ႈ'], - - 'month' => ':count လိူၼ်', // less reliable - 'm' => ':count လိူၼ်', // less reliable - 'a_month' => ':count လိူၼ်', // less reliable - - 'week' => ':count ဝၼ်း', // less reliable - 'w' => ':count ဝၼ်း', // less reliable - 'a_week' => ':count ဝၼ်း', // less reliable - - 'hour' => ':count ຕີ', // less reliable - 'h' => ':count ຕີ', // less reliable - 'a_hour' => ':count ຕີ', // less reliable - - 'minute' => ':count ເດັກ', // less reliable - 'min' => ':count ເດັກ', // less reliable - 'a_minute' => ':count ເດັກ', // less reliable - - 'second' => ':count ဢိုၼ်ႇ', // less reliable - 's' => ':count ဢိုၼ်ႇ', // less reliable - 'a_second' => ':count ဢိုၼ်ႇ', // less reliable - - 'year' => ':count ပီ', - 'y' => ':count ပီ', - 'a_year' => ':count ပီ', - - 'day' => ':count ກາງວັນ', - 'd' => ':count ກາງວັນ', - 'a_day' => ':count ກາງວັນ', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/shs.php b/vendor/nesbot/carbon/src/Carbon/Lang/shs.php deleted file mode 100644 index 8d2e1d7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/shs.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/shs_CA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/shs_CA.php b/vendor/nesbot/carbon/src/Carbon/Lang/shs_CA.php deleted file mode 100644 index 08d385e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/shs_CA.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Neskie Manuel bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Pellkwet̓min', 'Pelctsipwen̓ten', 'Pellsqépts', 'Peslléwten', 'Pell7ell7é7llqten', 'Pelltspéntsk', 'Pelltqwelq̓wél̓t', 'Pellct̓éxel̓cten', 'Pesqelqlélten', 'Pesllwélsten', 'Pellc7ell7é7llcwten̓', 'Pelltetétq̓em'], - 'months_short' => ['Kwe', 'Tsi', 'Sqe', 'Éwt', 'Ell', 'Tsp', 'Tqw', 'Ct̓é', 'Qel', 'Wél', 'U7l', 'Tet'], - 'weekdays' => ['Sxetspesq̓t', 'Spetkesq̓t', 'Selesq̓t', 'Skellesq̓t', 'Smesesq̓t', 'Stselkstesq̓t', 'Stqmekstesq̓t'], - 'weekdays_short' => ['Sxe', 'Spe', 'Sel', 'Ske', 'Sme', 'Sts', 'Stq'], - 'weekdays_min' => ['Sxe', 'Spe', 'Sel', 'Ske', 'Sme', 'Sts', 'Stq'], - 'day_of_first_week_of_year' => 1, - - 'year' => ':count sqlélten', // less reliable - 'y' => ':count sqlélten', // less reliable - 'a_year' => ':count sqlélten', // less reliable - - 'month' => ':count swewll', // less reliable - 'm' => ':count swewll', // less reliable - 'a_month' => ':count swewll', // less reliable - - 'hour' => ':count seqwlút', // less reliable - 'h' => ':count seqwlút', // less reliable - 'a_hour' => ':count seqwlút', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/si.php b/vendor/nesbot/carbon/src/Carbon/Lang/si.php deleted file mode 100644 index 636bf69..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/si.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Serhan Apaydın - * - JD Isaacks - * - Malinda Weerasinghe (MalindaWMD) - */ -return [ - 'year' => '{1}වසර 1|වසර :count', - 'a_year' => '{1}වසරක්|වසර :count', - 'month' => '{1}මාස 1|මාස :count', - 'a_month' => '{1}මාසය|මාස :count', - 'week' => '{1}සති 1|සති :count', - 'a_week' => '{1}සතියක්|සති :count', - 'day' => '{1}දින 1|දින :count', - 'a_day' => '{1}දිනක්|දින :count', - 'hour' => '{1}පැය 1|පැය :count', - 'a_hour' => '{1}පැයක්|පැය :count', - 'minute' => '{1}මිනිත්තු 1|මිනිත්තු :count', - 'a_minute' => '{1}මිනිත්තුවක්|මිනිත්තු :count', - 'second' => '{1}තත්පර 1|තත්පර :count', - 'a_second' => '{1}තත්පර කිහිපයකට|තත්පර :count', - 'ago' => ':time කට පෙර', - 'from_now' => function ($time) { - if (preg_match('/දින \d/u', $time)) { - return $time.' න්'; - } - - return $time.' කින්'; - }, - 'before' => ':time කට පෙර', - 'after' => function ($time) { - if (preg_match('/දින \d/u', $time)) { - return $time.' න්'; - } - - return $time.' කින්'; - }, - 'diff_now' => 'දැන්', - 'diff_today' => 'අද', - 'diff_yesterday' => 'ඊයේ', - 'diff_tomorrow' => 'හෙට', - 'formats' => [ - 'LT' => 'a h:mm', - 'LTS' => 'a h:mm:ss', - 'L' => 'YYYY/MM/DD', - 'LL' => 'YYYY MMMM D', - 'LLL' => 'YYYY MMMM D, a h:mm', - 'LLLL' => 'YYYY MMMM D [වැනි] dddd, a h:mm:ss', - ], - 'calendar' => [ - 'sameDay' => '[අද] LT[ට]', - 'nextDay' => '[හෙට] LT[ට]', - 'nextWeek' => 'dddd LT[ට]', - 'lastDay' => '[ඊයේ] LT[ට]', - 'lastWeek' => '[පසුගිය] dddd LT[ට]', - 'sameElse' => 'L', - ], - 'ordinal' => ':number වැනි', - 'meridiem' => ['පෙර වරු', 'පස් වරු', 'පෙ.ව.', 'ප.ව.'], - 'months' => ['ජනවාරි', 'පෙබරවාරි', 'මාර්තු', 'අප්‍රේල්', 'මැයි', 'ජූනි', 'ජූලි', 'අගෝස්තු', 'සැප්තැම්බර්', 'ඔක්තෝබර්', 'නොවැම්බර්', 'දෙසැම්බර්'], - 'months_short' => ['ජන', 'පෙබ', 'මාර්', 'අප්', 'මැයි', 'ජූනි', 'ජූලි', 'අගෝ', 'සැප්', 'ඔක්', 'නොවැ', 'දෙසැ'], - 'weekdays' => ['ඉරිදා', 'සඳුදා', 'අඟහරුවාදා', 'බදාදා', 'බ්‍රහස්පතින්දා', 'සිකුරාදා', 'සෙනසුරාදා'], - 'weekdays_short' => ['ඉරි', 'සඳු', 'අඟ', 'බදා', 'බ්‍රහ', 'සිකු', 'සෙන'], - 'weekdays_min' => ['ඉ', 'ස', 'අ', 'බ', 'බ්‍ර', 'සි', 'සෙ'], - 'first_day_of_week' => 1, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/si_LK.php b/vendor/nesbot/carbon/src/Carbon/Lang/si_LK.php deleted file mode 100644 index 81c44e0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/si_LK.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/si.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sid.php b/vendor/nesbot/carbon/src/Carbon/Lang/sid.php deleted file mode 100644 index b1c6521..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sid.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/sid_ET.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sid_ET.php b/vendor/nesbot/carbon/src/Carbon/Lang/sid_ET.php deleted file mode 100644 index 1296f9b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sid_ET.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - 'weekdays' => ['Sambata', 'Sanyo', 'Maakisanyo', 'Roowe', 'Hamuse', 'Arbe', 'Qidaame'], - 'weekdays_short' => ['Sam', 'San', 'Mak', 'Row', 'Ham', 'Arb', 'Qid'], - 'weekdays_min' => ['Sam', 'San', 'Mak', 'Row', 'Ham', 'Arb', 'Qid'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['soodo', 'hawwaro'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sk.php b/vendor/nesbot/carbon/src/Carbon/Lang/sk.php deleted file mode 100644 index f9702e9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sk.php +++ /dev/null @@ -1,155 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Martin Suja - * - Tsutomu Kuroda - * - tjku - * - Max Melentiev - * - Juanito Fatas - * - Ivan Stana - * - Akira Matsuda - * - Christopher Dell - * - James McKinney - * - Enrique Vidal - * - Simone Carletti - * - Aaron Patterson - * - Jozef Fulop - * - Nicolás Hock Isaza - * - Tom Hughes - * - Simon Hürlimann (CyT) - * - jofi - * - Jakub ADAMEC - * - Marek Adamický - * - AlterwebStudio - */ - -use Carbon\CarbonInterface; - -$fromNow = function ($time) { - return 'o '.strtr($time, [ - 'hodina' => 'hodinu', - 'minúta' => 'minútu', - 'sekunda' => 'sekundu', - ]); -}; - -$ago = function ($time) { - $replacements = [ - '/\bhodina\b/' => 'hodinou', - '/\bminúta\b/' => 'minútou', - '/\bsekunda\b/' => 'sekundou', - '/\bdeň\b/u' => 'dňom', - '/\btýždeň\b/u' => 'týždňom', - '/\bmesiac\b/' => 'mesiacom', - '/\brok\b/' => 'rokom', - ]; - - $replacementsPlural = [ - '/\bhodiny\b/' => 'hodinami', - '/\bminúty\b/' => 'minútami', - '/\bsekundy\b/' => 'sekundami', - '/\bdni\b/' => 'dňami', - '/\btýždne\b/' => 'týždňami', - '/\bmesiace\b/' => 'mesiacmi', - '/\broky\b/' => 'rokmi', - ]; - - foreach ($replacements + $replacementsPlural as $pattern => $replacement) { - $time = preg_replace($pattern, $replacement, $time); - } - - return "pred $time"; -}; - -return [ - 'year' => ':count rok|:count roky|:count rokov', - 'a_year' => 'rok|:count roky|:count rokov', - 'y' => ':count r', - 'month' => ':count mesiac|:count mesiace|:count mesiacov', - 'a_month' => 'mesiac|:count mesiace|:count mesiacov', - 'm' => ':count m', - 'week' => ':count týždeň|:count týždne|:count týždňov', - 'a_week' => 'týždeň|:count týždne|:count týždňov', - 'w' => ':count t', - 'day' => ':count deň|:count dni|:count dní', - 'a_day' => 'deň|:count dni|:count dní', - 'd' => ':count d', - 'hour' => ':count hodina|:count hodiny|:count hodín', - 'a_hour' => 'hodina|:count hodiny|:count hodín', - 'h' => ':count h', - 'minute' => ':count minúta|:count minúty|:count minút', - 'a_minute' => 'minúta|:count minúty|:count minút', - 'min' => ':count min', - 'second' => ':count sekunda|:count sekundy|:count sekúnd', - 'a_second' => 'sekunda|:count sekundy|:count sekúnd', - 's' => ':count s', - 'millisecond' => ':count milisekunda|:count milisekundy|:count milisekúnd', - 'a_millisecond' => 'milisekunda|:count milisekundy|:count milisekúnd', - 'ms' => ':count ms', - 'microsecond' => ':count mikrosekunda|:count mikrosekundy|:count mikrosekúnd', - 'a_microsecond' => 'mikrosekunda|:count mikrosekundy|:count mikrosekúnd', - 'µs' => ':count µs', - - 'ago' => $ago, - 'from_now' => $fromNow, - 'before' => ':time pred', - 'after' => ':time po', - - 'hour_after' => ':count hodinu|:count hodiny|:count hodín', - 'minute_after' => ':count minútu|:count minúty|:count minút', - 'second_after' => ':count sekundu|:count sekundy|:count sekúnd', - - 'hour_before' => ':count hodinu|:count hodiny|:count hodín', - 'minute_before' => ':count minútu|:count minúty|:count minút', - 'second_before' => ':count sekundu|:count sekundy|:count sekúnd', - - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' a '], - 'diff_now' => 'teraz', - 'diff_yesterday' => 'včera', - 'diff_tomorrow' => 'zajtra', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'DD. MMMM YYYY', - 'LLL' => 'D. M. HH:mm', - 'LLLL' => 'dddd D. MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[dnes o] LT', - 'nextDay' => '[zajtra o] LT', - 'lastDay' => '[včera o] LT', - 'nextWeek' => 'dddd [o] LT', - 'lastWeek' => static function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 1: - case 2: - case 4: - case 5: - return '[minulý] dddd [o] LT'; //pondelok/utorok/štvrtok/piatok - default: - return '[minulá] dddd [o] LT'; - } - }, - 'sameElse' => 'L', - ], - 'weekdays' => ['nedeľa', 'pondelok', 'utorok', 'streda', 'štvrtok', 'piatok', 'sobota'], - 'weekdays_short' => ['ned', 'pon', 'uto', 'str', 'štv', 'pia', 'sob'], - 'weekdays_min' => ['ne', 'po', 'ut', 'st', 'št', 'pi', 'so'], - 'months' => ['január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'máj', 'jún', 'júl', 'aug', 'sep', 'okt', 'nov', 'dec'], - 'meridiem' => ['dopoludnia', 'popoludní'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sk_SK.php b/vendor/nesbot/carbon/src/Carbon/Lang/sk_SK.php deleted file mode 100644 index 0515601..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sk_SK.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/sk.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sl.php b/vendor/nesbot/carbon/src/Carbon/Lang/sl.php deleted file mode 100644 index 1f1d1b3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sl.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Tsutomu Kuroda - * - tjku - * - Max Melentiev - * - Juanito Fatas - * - Akira Matsuda - * - Christopher Dell - * - Enrique Vidal - * - Simone Carletti - * - Aaron Patterson - * - Nicolás Hock Isaza - * - Miha Rebernik - * - Gal Jakič (morpheus7CS) - * - Glavić - * - Anže Časar - * - Lovro Tramšek (Lovro1107) - * - burut13 - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count leto|:count leti|:count leta|:count let', - 'y' => ':count leto|:count leti|:count leta|:count let', - 'month' => ':count mesec|:count meseca|:count mesece|:count mesecev', - 'm' => ':count mes.', - 'week' => ':count teden|:count tedna|:count tedne|:count tednov', - 'w' => ':count ted.', - 'day' => ':count dan|:count dni|:count dni|:count dni', - 'd' => ':count dan|:count dni|:count dni|:count dni', - 'hour' => ':count ura|:count uri|:count ure|:count ur', - 'h' => ':count h', - 'minute' => ':count minuta|:count minuti|:count minute|:count minut', - 'min' => ':count min.', - 'second' => ':count sekunda|:count sekundi|:count sekunde|:count sekund', - 'a_second' => '{1}nekaj sekund|:count sekunda|:count sekundi|:count sekunde|:count sekund', - 's' => ':count s', - - 'year_ago' => ':count letom|:count letoma|:count leti|:count leti', - 'y_ago' => ':count letom|:count letoma|:count leti|:count leti', - 'month_ago' => ':count mesecem|:count mesecema|:count meseci|:count meseci', - 'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni', - 'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', - 'd_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', - 'hour_ago' => ':count uro|:count urama|:count urami|:count urami', - 'minute_ago' => ':count minuto|:count minutama|:count minutami|:count minutami', - 'second_ago' => ':count sekundo|:count sekundama|:count sekundami|:count sekundami', - - 'day_from_now' => ':count dan|:count dneva|:count dni|:count dni', - 'd_from_now' => ':count dan|:count dneva|:count dni|:count dni', - 'hour_from_now' => ':count uro|:count uri|:count ure|:count ur', - 'minute_from_now' => ':count minuto|:count minuti|:count minute|:count minut', - 'second_from_now' => ':count sekundo|:count sekundi|:count sekunde|:count sekund', - - 'ago' => 'pred :time', - 'from_now' => 'čez :time', - 'after' => ':time kasneje', - 'before' => ':time prej', - - 'diff_now' => 'ravnokar', - 'diff_today' => 'danes', - 'diff_today_regexp' => 'danes(?:\\s+ob)?', - 'diff_yesterday' => 'včeraj', - 'diff_yesterday_regexp' => 'včeraj(?:\\s+ob)?', - 'diff_tomorrow' => 'jutri', - 'diff_tomorrow_regexp' => 'jutri(?:\\s+ob)?', - 'diff_before_yesterday' => 'predvčerajšnjim', - 'diff_after_tomorrow' => 'pojutrišnjem', - - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'period_start_date' => 'od :date', - 'period_end_date' => 'do :date', - - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY H:mm', - 'LLLL' => 'dddd, D. MMMM YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => '[danes ob] LT', - 'nextDay' => '[jutri ob] LT', - 'nextWeek' => 'dddd [ob] LT', - 'lastDay' => '[včeraj ob] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[preteklo] [nedeljo] [ob] LT'; - case 1: - return '[pretekli] [ponedeljek] [ob] LT'; - case 2: - return '[pretekli] [torek] [ob] LT'; - case 3: - return '[preteklo] [sredo] [ob] LT'; - case 4: - return '[pretekli] [četrtek] [ob] LT'; - case 5: - return '[pretekli] [petek] [ob] LT'; - case 6: - return '[preteklo] [soboto] [ob] LT'; - } - }, - 'sameElse' => 'L', - ], - 'months' => ['januar', 'februar', 'marec', 'april', 'maj', 'junij', 'julij', 'avgust', 'september', 'oktober', 'november', 'december'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'avg', 'sep', 'okt', 'nov', 'dec'], - 'weekdays' => ['nedelja', 'ponedeljek', 'torek', 'sreda', 'četrtek', 'petek', 'sobota'], - 'weekdays_short' => ['ned', 'pon', 'tor', 'sre', 'čet', 'pet', 'sob'], - 'weekdays_min' => ['ne', 'po', 'to', 'sr', 'če', 'pe', 'so'], - 'list' => [', ', ' in '], - 'meridiem' => ['dopoldan', 'popoldan'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sl_SI.php b/vendor/nesbot/carbon/src/Carbon/Lang/sl_SI.php deleted file mode 100644 index 5dad8c8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sl_SI.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/sl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sm.php b/vendor/nesbot/carbon/src/Carbon/Lang/sm.php deleted file mode 100644 index e8c118a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sm.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/sm_WS.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sm_WS.php b/vendor/nesbot/carbon/src/Carbon/Lang/sm_WS.php deleted file mode 100644 index f066068..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sm_WS.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Ianuari', 'Fepuari', 'Mati', 'Aperila', 'Me', 'Iuni', 'Iulai', 'Auguso', 'Setema', 'Oketopa', 'Novema', 'Tesema'], - 'months_short' => ['Ian', 'Fep', 'Mat', 'Ape', 'Me', 'Iun', 'Iul', 'Aug', 'Set', 'Oke', 'Nov', 'Tes'], - 'weekdays' => ['Aso Sa', 'Aso Gafua', 'Aso Lua', 'Aso Lulu', 'Aso Tofi', 'Aso Farail', 'Aso To\'ana\'i'], - 'weekdays_short' => ['Aso Sa', 'Aso Gaf', 'Aso Lua', 'Aso Lul', 'Aso Tof', 'Aso Far', 'Aso To\''], - 'weekdays_min' => ['Aso Sa', 'Aso Gaf', 'Aso Lua', 'Aso Lul', 'Aso Tof', 'Aso Far', 'Aso To\''], - - 'hour' => ':count uati', // less reliable - 'h' => ':count uati', // less reliable - 'a_hour' => ':count uati', // less reliable - - 'minute' => ':count itiiti', // less reliable - 'min' => ':count itiiti', // less reliable - 'a_minute' => ':count itiiti', // less reliable - - 'second' => ':count lua', // less reliable - 's' => ':count lua', // less reliable - 'a_second' => ':count lua', // less reliable - - 'year' => ':count tausaga', - 'y' => ':count tausaga', - 'a_year' => ':count tausaga', - - 'month' => ':count māsina', - 'm' => ':count māsina', - 'a_month' => ':count māsina', - - 'week' => ':count vaiaso', - 'w' => ':count vaiaso', - 'a_week' => ':count vaiaso', - - 'day' => ':count aso', - 'd' => ':count aso', - 'a_day' => ':count aso', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/smn.php b/vendor/nesbot/carbon/src/Carbon/Lang/smn.php deleted file mode 100644 index 20add02..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/smn.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['ip.', 'ep.'], - 'weekdays' => ['pasepeeivi', 'vuossaargâ', 'majebaargâ', 'koskoho', 'tuorâstuv', 'vástuppeeivi', 'lávurduv'], - 'weekdays_short' => ['pas', 'vuo', 'maj', 'kos', 'tuo', 'vás', 'láv'], - 'weekdays_min' => ['pa', 'vu', 'ma', 'ko', 'tu', 'vá', 'lá'], - 'weekdays_standalone' => ['pasepeivi', 'vuossargâ', 'majebargâ', 'koskokko', 'tuorâstâh', 'vástuppeivi', 'lávurdâh'], - 'months' => ['uđđâivemáánu', 'kuovâmáánu', 'njuhčâmáánu', 'cuáŋuimáánu', 'vyesimáánu', 'kesimáánu', 'syeinimáánu', 'porgemáánu', 'čohčâmáánu', 'roovvâdmáánu', 'skammâmáánu', 'juovlâmáánu'], - 'months_short' => ['uđiv', 'kuovâ', 'njuhčâ', 'cuáŋui', 'vyesi', 'kesi', 'syeini', 'porge', 'čohčâ', 'roovvâd', 'skammâ', 'juovlâ'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'H.mm', - 'LTS' => 'H.mm.ss', - 'L' => 'D.M.YYYY', - 'LL' => 'MMM D. YYYY', - 'LLL' => 'MMMM D. YYYY H.mm', - 'LLLL' => 'dddd, MMMM D. YYYY H.mm', - ], - - 'hour' => ':count äigi', // less reliable - 'h' => ':count äigi', // less reliable - 'a_hour' => ':count äigi', // less reliable - - 'year' => ':count ihe', - 'y' => ':count ihe', - 'a_year' => ':count ihe', - - 'month' => ':count mánuppaje', - 'm' => ':count mánuppaje', - 'a_month' => ':count mánuppaje', - - 'week' => ':count okko', - 'w' => ':count okko', - 'a_week' => ':count okko', - - 'day' => ':count peivi', - 'd' => ':count peivi', - 'a_day' => ':count peivi', - - 'minute' => ':count miinut', - 'min' => ':count miinut', - 'a_minute' => ':count miinut', - - 'second' => ':count nubbe', - 's' => ':count nubbe', - 'a_second' => ':count nubbe', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sn.php b/vendor/nesbot/carbon/src/Carbon/Lang/sn.php deleted file mode 100644 index 4f25028..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sn.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['a', 'p'], - 'weekdays' => ['Svondo', 'Muvhuro', 'Chipiri', 'Chitatu', 'China', 'Chishanu', 'Mugovera'], - 'weekdays_short' => ['Svo', 'Muv', 'Chp', 'Cht', 'Chn', 'Chs', 'Mug'], - 'weekdays_min' => ['Sv', 'Mu', 'Cp', 'Ct', 'Cn', 'Cs', 'Mg'], - 'months' => ['Ndira', 'Kukadzi', 'Kurume', 'Kubvumbi', 'Chivabvu', 'Chikumi', 'Chikunguru', 'Nyamavhuvhu', 'Gunyana', 'Gumiguru', 'Mbudzi', 'Zvita'], - 'months_short' => ['Ndi', 'Kuk', 'Kur', 'Kub', 'Chv', 'Chk', 'Chg', 'Nya', 'Gun', 'Gum', 'Mbu', 'Zvi'], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-dd', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D HH:mm', - 'LLLL' => 'YYYY MMMM D, dddd HH:mm', - ], - - 'year' => 'makore :count', - 'y' => 'makore :count', - 'a_year' => 'makore :count', - - 'month' => 'mwedzi :count', - 'm' => 'mwedzi :count', - 'a_month' => 'mwedzi :count', - - 'week' => 'vhiki :count', - 'w' => 'vhiki :count', - 'a_week' => 'vhiki :count', - - 'day' => 'mazuva :count', - 'd' => 'mazuva :count', - 'a_day' => 'mazuva :count', - - 'hour' => 'maawa :count', - 'h' => 'maawa :count', - 'a_hour' => 'maawa :count', - - 'minute' => 'minitsi :count', - 'min' => 'minitsi :count', - 'a_minute' => 'minitsi :count', - - 'second' => 'sekonzi :count', - 's' => 'sekonzi :count', - 'a_second' => 'sekonzi :count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/so.php b/vendor/nesbot/carbon/src/Carbon/Lang/so.php deleted file mode 100644 index 5785271..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/so.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Author: - * - Abdifatah Abdilahi(@abdifatahz) - */ -return [ - 'year' => ':count sanad|:count sanadood', - 'a_year' => 'sanad|:count sanadood', - 'y' => '{1}:countsn|{0}:countsns|]1,Inf[:countsn', - 'month' => ':count bil|:count bilood', - 'a_month' => 'bil|:count bilood', - 'm' => ':countbil', - 'week' => ':count isbuuc', - 'a_week' => 'isbuuc|:count isbuuc', - 'w' => ':countis', - 'day' => ':count maalin|:count maalmood', - 'a_day' => 'maalin|:count maalmood', - 'd' => ':countml', - 'hour' => ':count saac', - 'a_hour' => 'saacad|:count saac', - 'h' => ':countsc', - 'minute' => ':count daqiiqo', - 'a_minute' => 'daqiiqo|:count daqiiqo', - 'min' => ':countdq', - 'second' => ':count ilbidhiqsi', - 'a_second' => 'xooga ilbidhiqsiyo|:count ilbidhiqsi', - 's' => ':countil', - 'ago' => ':time kahor', - 'from_now' => ':time gudahood', - 'after' => ':time kedib', - 'before' => ':time kahor', - 'diff_now' => 'hada', - 'diff_today' => 'maanta', - 'diff_today_regexp' => 'maanta(?:\s+markay\s+(?:tahay|ahayd))?', - 'diff_yesterday' => 'shalayto', - 'diff_yesterday_regexp' => 'shalayto(?:\s+markay\s+ahayd)?', - 'diff_tomorrow' => 'beri', - 'diff_tomorrow_regexp' => 'beri(?:\s+markay\s+tahay)?', - 'diff_before_yesterday' => 'doraato', - 'diff_after_tomorrow' => 'saadanbe', - 'period_recurrences' => 'mar|:count jeer', - 'period_interval' => ':interval kasta', - 'period_start_date' => 'laga bilaabo :date', - 'period_end_date' => 'ilaa :date', - 'months' => ['Janaayo', 'Febraayo', 'Abriil', 'Maajo', 'Juun', 'Luuliyo', 'Agoosto', 'Sebteembar', 'Oktoobar', 'Nofeembar', 'Diseembar'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Abr', 'Mjo', 'Jun', 'Lyo', 'Agt', 'Seb', 'Okt', 'Nof', 'Dis'], - 'weekdays' => ['Axad', 'Isniin', 'Talaada', 'Arbaca', 'Khamiis', 'Jimce', 'Sabti'], - 'weekdays_short' => ['Axd', 'Isn', 'Tal', 'Arb', 'Kha', 'Jim', 'Sbt'], - 'weekdays_min' => ['Ax', 'Is', 'Ta', 'Ar', 'Kh', 'Ji', 'Sa'], - 'list' => [', ', ' and '], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'calendar' => [ - 'sameDay' => '[Maanta markay tahay] LT', - 'nextDay' => '[Beri markay tahay] LT', - 'nextWeek' => 'dddd [markay tahay] LT', - 'lastDay' => '[Shalay markay ahayd] LT', - 'lastWeek' => '[Hore] dddd [Markay ahayd] LT', - 'sameElse' => 'L', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/so_DJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/so_DJ.php deleted file mode 100644 index 273dda8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/so_DJ.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/so.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/so_ET.php b/vendor/nesbot/carbon/src/Carbon/Lang/so_ET.php deleted file mode 100644 index 7b69971..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/so_ET.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return require __DIR__.'/so.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/so_KE.php b/vendor/nesbot/carbon/src/Carbon/Lang/so_KE.php deleted file mode 100644 index 7b69971..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/so_KE.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return require __DIR__.'/so.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/so_SO.php b/vendor/nesbot/carbon/src/Carbon/Lang/so_SO.php deleted file mode 100644 index 7b69971..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/so_SO.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return require __DIR__.'/so.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sq.php b/vendor/nesbot/carbon/src/Carbon/Lang/sq.php deleted file mode 100644 index ffa592e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sq.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - JD Isaacks - * - Fadion Dashi - */ -return [ - 'year' => ':count vit|:count vjet', - 'a_year' => 'një vit|:count vite', - 'y' => ':count v.', - 'month' => ':count muaj', - 'a_month' => 'një muaj|:count muaj', - 'm' => ':count muaj', - 'week' => ':count javë', - 'a_week' => ':count javë|:count javë', - 'w' => ':count j.', - 'day' => ':count ditë', - 'a_day' => 'një ditë|:count ditë', - 'd' => ':count d.', - 'hour' => ':count orë', - 'a_hour' => 'një orë|:count orë', - 'h' => ':count o.', - 'minute' => ':count minutë|:count minuta', - 'a_minute' => 'një minutë|:count minuta', - 'min' => ':count min.', - 'second' => ':count sekondë|:count sekonda', - 'a_second' => 'disa sekonda|:count sekonda', - 's' => ':count s.', - 'ago' => ':time më parë', - 'from_now' => 'në :time', - 'after' => ':time pas', - 'before' => ':time para', - 'diff_now' => 'tani', - 'diff_today' => 'Sot', - 'diff_today_regexp' => 'Sot(?:\\s+në)?', - 'diff_yesterday' => 'dje', - 'diff_yesterday_regexp' => 'Dje(?:\\s+në)?', - 'diff_tomorrow' => 'nesër', - 'diff_tomorrow_regexp' => 'Nesër(?:\\s+në)?', - 'diff_before_yesterday' => 'pardje', - 'diff_after_tomorrow' => 'pasnesër', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Sot në] LT', - 'nextDay' => '[Nesër në] LT', - 'nextWeek' => 'dddd [në] LT', - 'lastDay' => '[Dje në] LT', - 'lastWeek' => 'dddd [e kaluar në] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'meridiem' => ['PD', 'MD'], - 'months' => ['janar', 'shkurt', 'mars', 'prill', 'maj', 'qershor', 'korrik', 'gusht', 'shtator', 'tetor', 'nëntor', 'dhjetor'], - 'months_short' => ['jan', 'shk', 'mar', 'pri', 'maj', 'qer', 'kor', 'gus', 'sht', 'tet', 'nën', 'dhj'], - 'weekdays' => ['e diel', 'e hënë', 'e martë', 'e mërkurë', 'e enjte', 'e premte', 'e shtunë'], - 'weekdays_short' => ['die', 'hën', 'mar', 'mër', 'enj', 'pre', 'sht'], - 'weekdays_min' => ['d', 'h', 'ma', 'më', 'e', 'p', 'sh'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' dhe '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sq_AL.php b/vendor/nesbot/carbon/src/Carbon/Lang/sq_AL.php deleted file mode 100644 index ea5df3f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sq_AL.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/sq.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sq_MK.php b/vendor/nesbot/carbon/src/Carbon/Lang/sq_MK.php deleted file mode 100644 index 62f752c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sq_MK.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/sq.php', [ - 'formats' => [ - 'L' => 'D.M.YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY, HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sq_XK.php b/vendor/nesbot/carbon/src/Carbon/Lang/sq_XK.php deleted file mode 100644 index 62f752c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sq_XK.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/sq.php', [ - 'formats' => [ - 'L' => 'D.M.YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY, HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr.php deleted file mode 100644 index 68ba663..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - shaishavgandhi05 - * - Serhan Apaydın - * - JD Isaacks - * - Glavić - * - Milos Sakovic - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count godina|:count godine|:count godina', - 'y' => ':count g.', - 'month' => ':count mesec|:count meseca|:count meseci', - 'm' => ':count mj.', - 'week' => ':count nedelja|:count nedelje|:count nedelja', - 'w' => ':count ned.', - 'day' => ':count dan|:count dana|:count dana', - 'd' => ':count d.', - 'hour' => ':count sat|:count sata|:count sati', - 'h' => ':count č.', - 'minute' => ':count minut|:count minuta|:count minuta', - 'min' => ':count min.', - 'second' => ':count sekundu|:count sekunde|:count sekundi', - 's' => ':count sek.', - 'ago' => 'pre :time', - 'from_now' => 'za :time', - 'after' => 'nakon :time', - 'before' => 'pre :time', - - 'year_from_now' => ':count godinu|:count godine|:count godina', - 'year_ago' => ':count godinu|:count godine|:count godina', - 'week_from_now' => ':count nedelju|:count nedelje|:count nedelja', - 'week_ago' => ':count nedelju|:count nedelje|:count nedelja', - - 'diff_now' => 'upravo sada', - 'diff_today' => 'danas', - 'diff_today_regexp' => 'danas(?:\\s+u)?', - 'diff_yesterday' => 'juče', - 'diff_yesterday_regexp' => 'juče(?:\\s+u)?', - 'diff_tomorrow' => 'sutra', - 'diff_tomorrow_regexp' => 'sutra(?:\\s+u)?', - 'diff_before_yesterday' => 'prekjuče', - 'diff_after_tomorrow' => 'preksutra', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY H:mm', - 'LLLL' => 'dddd, D. MMMM YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => '[danas u] LT', - 'nextDay' => '[sutra u] LT', - 'nextWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[u nedelju u] LT'; - case 3: - return '[u sredu u] LT'; - case 6: - return '[u subotu u] LT'; - default: - return '[u] dddd [u] LT'; - } - }, - 'lastDay' => '[juče u] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[prošle nedelje u] LT'; - case 1: - return '[prošlog ponedeljka u] LT'; - case 2: - return '[prošlog utorka u] LT'; - case 3: - return '[prošle srede u] LT'; - case 4: - return '[prošlog četvrtka u] LT'; - case 5: - return '[prošlog petka u] LT'; - default: - return '[prošle subote u] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'], - 'months_short' => ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'], - 'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'], - 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sre.', 'čet.', 'pet.', 'sub.'], - 'weekdays_min' => ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' i '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php deleted file mode 100644 index 8becbc5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - shaishavgandhi05 - * - Serhan Apaydın - * - JD Isaacks - * - Glavić - * - Nikola Zeravcic - * - Milos Sakovic - */ - -use Carbon\CarbonInterface; - -return [ - 'year' => ':count година|:count године|:count година', - 'y' => ':count г.', - 'month' => ':count месец|:count месеца|:count месеци', - 'm' => ':count м.', - 'week' => ':count недеља|:count недеље|:count недеља', - 'w' => ':count нед.', - 'day' => ':count дан|:count дана|:count дана', - 'd' => ':count д.', - 'hour' => ':count сат|:count сата|:count сати', - 'h' => ':count ч.', - 'minute' => ':count минут|:count минута|:count минута', - 'min' => ':count мин.', - 'second' => ':count секунд|:count секунде|:count секунди', - 's' => ':count сек.', - 'ago' => 'пре :time', - 'from_now' => 'за :time', - 'after' => ':time након', - 'before' => ':time пре', - 'year_from_now' => ':count годину|:count године|:count година', - 'year_ago' => ':count годину|:count године|:count година', - 'week_from_now' => ':count недељу|:count недеље|:count недеља', - 'week_ago' => ':count недељу|:count недеље|:count недеља', - 'diff_now' => 'управо сада', - 'diff_today' => 'данас', - 'diff_today_regexp' => 'данас(?:\\s+у)?', - 'diff_yesterday' => 'јуче', - 'diff_yesterday_regexp' => 'јуче(?:\\s+у)?', - 'diff_tomorrow' => 'сутра', - 'diff_tomorrow_regexp' => 'сутра(?:\\s+у)?', - 'diff_before_yesterday' => 'прекјуче', - 'diff_after_tomorrow' => 'прекосутра', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY H:mm', - 'LLLL' => 'dddd, D. MMMM YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => '[данас у] LT', - 'nextDay' => '[сутра у] LT', - 'nextWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[у недељу у] LT'; - case 3: - return '[у среду у] LT'; - case 6: - return '[у суботу у] LT'; - default: - return '[у] dddd [у] LT'; - } - }, - 'lastDay' => '[јуче у] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[прошле недеље у] LT'; - case 1: - return '[прошлог понедељка у] LT'; - case 2: - return '[прошлог уторка у] LT'; - case 3: - return '[прошле среде у] LT'; - case 4: - return '[прошлог четвртка у] LT'; - case 5: - return '[прошлог петка у] LT'; - default: - return '[прошле суботе у] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'], - 'months_short' => ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'], - 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], - 'weekdays_short' => ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'], - 'weekdays_min' => ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' и '], - 'meridiem' => ['АМ', 'ПМ'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php deleted file mode 100644 index 4b29a45..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_BA.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\Translation\PluralizationRules; - -// @codeCoverageIgnoreStart -if (class_exists(PluralizationRules::class)) { - PluralizationRules::set(static function ($number) { - return PluralizationRules::get($number, 'sr'); - }, 'sr_Cyrl_BA'); -} -// @codeCoverageIgnoreEnd - -return array_replace_recursive(require __DIR__.'/sr_Cyrl.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D.M.yy.', - 'LL' => 'DD.MM.YYYY.', - 'LLL' => 'DD. MMMM YYYY. HH:mm', - 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', - ], - 'weekdays' => ['недјеља', 'понедељак', 'уторак', 'сриједа', 'четвртак', 'петак', 'субота'], - 'weekdays_short' => ['нед.', 'пон.', 'ут.', 'ср.', 'чет.', 'пет.', 'суб.'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php deleted file mode 100644 index 28d22fd..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_ME.php +++ /dev/null @@ -1,118 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Glavić - * - Milos Sakovic - */ - -use Carbon\CarbonInterface; -use Symfony\Component\Translation\PluralizationRules; - -// @codeCoverageIgnoreStart -if (class_exists(PluralizationRules::class)) { - PluralizationRules::set(static function ($number) { - return PluralizationRules::get($number, 'sr'); - }, 'sr_Cyrl_ME'); -} -// @codeCoverageIgnoreEnd - -return [ - 'year' => ':count година|:count године|:count година', - 'y' => ':count г.', - 'month' => ':count мјесец|:count мјесеца|:count мјесеци', - 'm' => ':count мј.', - 'week' => ':count недјеља|:count недјеље|:count недјеља', - 'w' => ':count нед.', - 'day' => ':count дан|:count дана|:count дана', - 'd' => ':count д.', - 'hour' => ':count сат|:count сата|:count сати', - 'h' => ':count ч.', - 'minute' => ':count минут|:count минута|:count минута', - 'min' => ':count мин.', - 'second' => ':count секунд|:count секунде|:count секунди', - 's' => ':count сек.', - 'ago' => 'прије :time', - 'from_now' => 'за :time', - 'after' => ':time након', - 'before' => ':time прије', - - 'year_from_now' => ':count годину|:count године|:count година', - 'year_ago' => ':count годину|:count године|:count година', - - 'week_from_now' => ':count недјељу|:count недјеље|:count недјеља', - 'week_ago' => ':count недјељу|:count недјеље|:count недјеља', - - 'diff_now' => 'управо сада', - 'diff_today' => 'данас', - 'diff_today_regexp' => 'данас(?:\\s+у)?', - 'diff_yesterday' => 'јуче', - 'diff_yesterday_regexp' => 'јуче(?:\\s+у)?', - 'diff_tomorrow' => 'сутра', - 'diff_tomorrow_regexp' => 'сутра(?:\\s+у)?', - 'diff_before_yesterday' => 'прекјуче', - 'diff_after_tomorrow' => 'прекосјутра', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM YYYY', - 'LLL' => 'D. MMMM YYYY H:mm', - 'LLLL' => 'dddd, D. MMMM YYYY H:mm', - ], - 'calendar' => [ - 'sameDay' => '[данас у] LT', - 'nextDay' => '[сутра у] LT', - 'nextWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[у недељу у] LT'; - case 3: - return '[у среду у] LT'; - case 6: - return '[у суботу у] LT'; - default: - return '[у] dddd [у] LT'; - } - }, - 'lastDay' => '[јуче у] LT', - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[прошле недеље у] LT'; - case 1: - return '[прошлог понедељка у] LT'; - case 2: - return '[прошлог уторка у] LT'; - case 3: - return '[прошле среде у] LT'; - case 4: - return '[прошлог четвртка у] LT'; - case 5: - return '[прошлог петка у] LT'; - default: - return '[прошле суботе у] LT'; - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['јануар', 'фебруар', 'март', 'април', 'мај', 'јун', 'јул', 'август', 'септембар', 'октобар', 'новембар', 'децембар'], - 'months_short' => ['јан.', 'феб.', 'мар.', 'апр.', 'мај', 'јун', 'јул', 'авг.', 'сеп.', 'окт.', 'нов.', 'дец.'], - 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], - 'weekdays_short' => ['нед.', 'пон.', 'уто.', 'сре.', 'чет.', 'пет.', 'суб.'], - 'weekdays_min' => ['не', 'по', 'ут', 'ср', 'че', 'пе', 'су'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' и '], - 'meridiem' => ['АМ', 'ПМ'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php deleted file mode 100644 index d6e29b8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl_XK.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\Translation\PluralizationRules; - -// @codeCoverageIgnoreStart -if (class_exists(PluralizationRules::class)) { - PluralizationRules::set(static function ($number) { - return PluralizationRules::get($number, 'sr'); - }, 'sr_Cyrl_XK'); -} -// @codeCoverageIgnoreEnd - -return array_replace_recursive(require __DIR__.'/sr_Cyrl_BA.php', [ - 'weekdays' => ['недеља', 'понедељак', 'уторак', 'среда', 'четвртак', 'петак', 'субота'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn.php deleted file mode 100644 index 9971674..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/sr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php deleted file mode 100644 index 95b2770..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_BA.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\Translation\PluralizationRules; - -// @codeCoverageIgnoreStart -if (class_exists(PluralizationRules::class)) { - PluralizationRules::set(static function ($number) { - return PluralizationRules::get($number, 'sr'); - }, 'sr_Latn_BA'); -} -// @codeCoverageIgnoreEnd - -return array_replace_recursive(require __DIR__.'/sr_Latn.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D.M.yy.', - 'LL' => 'DD.MM.YYYY.', - 'LLL' => 'DD. MMMM YYYY. HH:mm', - 'LLLL' => 'dddd, DD. MMMM YYYY. HH:mm', - ], - 'weekdays' => ['nedjelja', 'ponedeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], - 'weekdays_short' => ['ned.', 'pon.', 'ut.', 'sr.', 'čet.', 'pet.', 'sub.'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php deleted file mode 100644 index 5b8f2d0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_ME.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Glavić - * - Milos Sakovic - */ - -use Carbon\CarbonInterface; -use Symfony\Component\Translation\PluralizationRules; - -// @codeCoverageIgnoreStart -if (class_exists(PluralizationRules::class)) { - PluralizationRules::set(static function ($number) { - return PluralizationRules::get($number, 'sr'); - }, 'sr_Latn_ME'); -} -// @codeCoverageIgnoreEnd - -return array_replace_recursive(require __DIR__.'/sr.php', [ - 'month' => ':count mjesec|:count mjeseca|:count mjeseci', - 'week' => ':count nedjelja|:count nedjelje|:count nedjelja', - 'second' => ':count sekund|:count sekunde|:count sekundi', - 'ago' => 'prije :time', - 'from_now' => 'za :time', - 'after' => ':time nakon', - 'before' => ':time prije', - 'week_from_now' => ':count nedjelju|:count nedjelje|:count nedjelja', - 'week_ago' => ':count nedjelju|:count nedjelje|:count nedjelja', - 'second_ago' => ':count sekund|:count sekunde|:count sekundi', - 'diff_tomorrow' => 'sjutra', - 'calendar' => [ - 'nextDay' => '[sjutra u] LT', - 'nextWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[u nedjelju u] LT'; - case 3: - return '[u srijedu u] LT'; - case 6: - return '[u subotu u] LT'; - default: - return '[u] dddd [u] LT'; - } - }, - 'lastWeek' => function (CarbonInterface $date) { - switch ($date->dayOfWeek) { - case 0: - return '[prošle nedjelje u] LT'; - case 1: - return '[prošle nedjelje u] LT'; - case 2: - return '[prošlog utorka u] LT'; - case 3: - return '[prošle srijede u] LT'; - case 4: - return '[prošlog četvrtka u] LT'; - case 5: - return '[prošlog petka u] LT'; - default: - return '[prošle subote u] LT'; - } - }, - ], - 'weekdays' => ['nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota'], - 'weekdays_short' => ['ned.', 'pon.', 'uto.', 'sri.', 'čet.', 'pet.', 'sub.'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php deleted file mode 100644 index 5278e2e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_Latn_XK.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\Translation\PluralizationRules; - -// @codeCoverageIgnoreStart -if (class_exists(PluralizationRules::class)) { - PluralizationRules::set(static function ($number) { - return PluralizationRules::get($number, 'sr'); - }, 'sr_Latn_XK'); -} -// @codeCoverageIgnoreEnd - -return array_replace_recursive(require __DIR__.'/sr_Latn_BA.php', [ - 'weekdays' => ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php deleted file mode 100644 index d7c65b9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/sr_Latn_ME.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS.php deleted file mode 100644 index bc5e04b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - sr_YU, sr_CS locale Danilo Segan bug-glibc-locales@gnu.org - */ -return require __DIR__.'/sr_Cyrl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS@latin.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS@latin.php deleted file mode 100644 index 9971674..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr_RS@latin.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/sr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ss.php b/vendor/nesbot/carbon/src/Carbon/Lang/ss.php deleted file mode 100644 index 1c52c9b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ss.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Nicolai Davies - */ -return [ - 'year' => '{1}umnyaka|:count iminyaka', - 'month' => '{1}inyanga|:count tinyanga', - 'week' => '{1}:count liviki|:count emaviki', - 'day' => '{1}lilanga|:count emalanga', - 'hour' => '{1}lihora|:count emahora', - 'minute' => '{1}umzuzu|:count emizuzu', - 'second' => '{1}emizuzwana lomcane|:count mzuzwana', - 'ago' => 'wenteka nga :time', - 'from_now' => 'nga :time', - 'diff_yesterday' => 'Itolo', - 'diff_yesterday_regexp' => 'Itolo(?:\\s+nga)?', - 'diff_today' => 'Namuhla', - 'diff_today_regexp' => 'Namuhla(?:\\s+nga)?', - 'diff_tomorrow' => 'Kusasa', - 'diff_tomorrow_regexp' => 'Kusasa(?:\\s+nga)?', - 'formats' => [ - 'LT' => 'h:mm A', - 'LTS' => 'h:mm:ss A', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm A', - 'LLLL' => 'dddd, D MMMM YYYY h:mm A', - ], - 'calendar' => [ - 'sameDay' => '[Namuhla nga] LT', - 'nextDay' => '[Kusasa nga] LT', - 'nextWeek' => 'dddd [nga] LT', - 'lastDay' => '[Itolo nga] LT', - 'lastWeek' => 'dddd [leliphelile] [nga] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - $lastDigit = $number % 10; - - return $number.( - ((int) ($number % 100 / 10) === 1) ? 'e' : ( - ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' - ) - ); - }, - 'meridiem' => function ($hour) { - if ($hour < 11) { - return 'ekuseni'; - } - if ($hour < 15) { - return 'emini'; - } - if ($hour < 19) { - return 'entsambama'; - } - - return 'ebusuku'; - }, - 'months' => ['Bhimbidvwane', 'Indlovana', 'Indlov\'lenkhulu', 'Mabasa', 'Inkhwekhweti', 'Inhlaba', 'Kholwane', 'Ingci', 'Inyoni', 'Imphala', 'Lweti', 'Ingongoni'], - 'months_short' => ['Bhi', 'Ina', 'Inu', 'Mab', 'Ink', 'Inh', 'Kho', 'Igc', 'Iny', 'Imp', 'Lwe', 'Igo'], - 'weekdays' => ['Lisontfo', 'Umsombuluko', 'Lesibili', 'Lesitsatfu', 'Lesine', 'Lesihlanu', 'Umgcibelo'], - 'weekdays_short' => ['Lis', 'Umb', 'Lsb', 'Les', 'Lsi', 'Lsh', 'Umg'], - 'weekdays_min' => ['Li', 'Us', 'Lb', 'Lt', 'Ls', 'Lh', 'Ug'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ss_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ss_ZA.php deleted file mode 100644 index ba89527..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ss_ZA.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/ss.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/st.php b/vendor/nesbot/carbon/src/Carbon/Lang/st.php deleted file mode 100644 index b065445..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/st.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/st_ZA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/st_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/st_ZA.php deleted file mode 100644 index 5bce7f2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/st_ZA.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Pherekgong', 'Hlakola', 'Tlhakubele', 'Mmese', 'Motsheanong', 'Phupjane', 'Phupu', 'Phato', 'Leotse', 'Mphalane', 'Pudungwana', 'Tshitwe'], - 'months_short' => ['Phe', 'Hla', 'TlH', 'Mme', 'Mot', 'Jan', 'Upu', 'Pha', 'Leo', 'Mph', 'Pud', 'Tsh'], - 'weekdays' => ['Sontaha', 'Mantaha', 'Labobedi', 'Laboraro', 'Labone', 'Labohlano', 'Moqebelo'], - 'weekdays_short' => ['Son', 'Mma', 'Bed', 'Rar', 'Ne', 'Hla', 'Moq'], - 'weekdays_min' => ['Son', 'Mma', 'Bed', 'Rar', 'Ne', 'Hla', 'Moq'], - 'day_of_first_week_of_year' => 1, - - 'week' => ':count Sontaha', // less reliable - 'w' => ':count Sontaha', // less reliable - 'a_week' => ':count Sontaha', // less reliable - - 'day' => ':count letsatsi', // less reliable - 'd' => ':count letsatsi', // less reliable - 'a_day' => ':count letsatsi', // less reliable - - 'hour' => ':count sešupanako', // less reliable - 'h' => ':count sešupanako', // less reliable - 'a_hour' => ':count sešupanako', // less reliable - - 'minute' => ':count menyane', // less reliable - 'min' => ':count menyane', // less reliable - 'a_minute' => ':count menyane', // less reliable - - 'second' => ':count thusa', // less reliable - 's' => ':count thusa', // less reliable - 'a_second' => ':count thusa', // less reliable - - 'year' => ':count selemo', - 'y' => ':count selemo', - 'a_year' => ':count selemo', - - 'month' => ':count kgwedi', - 'm' => ':count kgwedi', - 'a_month' => ':count kgwedi', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sv.php b/vendor/nesbot/carbon/src/Carbon/Lang/sv.php deleted file mode 100644 index 1706c71..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sv.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Kristoffer Snabb - * - JD Isaacks - * - Jens Herlevsen - * - Nightpine - * - Anders Nygren (litemerafrukt) - */ -return [ - 'year' => ':count år', - 'a_year' => 'ett år|:count år', - 'y' => ':count år', - 'month' => ':count månad|:count månader', - 'a_month' => 'en månad|:count månader', - 'm' => ':count mån', - 'week' => ':count vecka|:count veckor', - 'a_week' => 'en vecka|:count veckor', - 'w' => ':count v', - 'day' => ':count dag|:count dagar', - 'a_day' => 'en dag|:count dagar', - 'd' => ':count dgr', - 'hour' => ':count timme|:count timmar', - 'a_hour' => 'en timme|:count timmar', - 'h' => ':count tim', - 'minute' => ':count minut|:count minuter', - 'a_minute' => 'en minut|:count minuter', - 'min' => ':count min', - 'second' => ':count sekund|:count sekunder', - 'a_second' => 'några sekunder|:count sekunder', - 's' => ':count s', - 'ago' => 'för :time sedan', - 'from_now' => 'om :time', - 'after' => ':time efter', - 'before' => ':time före', - 'diff_now' => 'nu', - 'diff_today' => 'I dag', - 'diff_yesterday' => 'i går', - 'diff_yesterday_regexp' => 'I går', - 'diff_tomorrow' => 'i morgon', - 'diff_tomorrow_regexp' => 'I morgon', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY [kl.] HH:mm', - 'LLLL' => 'dddd D MMMM YYYY [kl.] HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[I dag] LT', - 'nextDay' => '[I morgon] LT', - 'nextWeek' => '[På] dddd LT', - 'lastDay' => '[I går] LT', - 'lastWeek' => '[I] dddd[s] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - $lastDigit = $number % 10; - - return $number.( - ((int) ($number % 100 / 10) === 1) ? 'e' : ( - ($lastDigit === 1 || $lastDigit === 2) ? 'a' : 'e' - ) - ); - }, - 'months' => ['januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december'], - 'months_short' => ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], - 'weekdays' => ['söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag'], - 'weekdays_short' => ['sön', 'mån', 'tis', 'ons', 'tors', 'fre', 'lör'], - 'weekdays_min' => ['sö', 'må', 'ti', 'on', 'to', 'fr', 'lö'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' och '], - 'meridiem' => ['fm', 'em'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sv_AX.php b/vendor/nesbot/carbon/src/Carbon/Lang/sv_AX.php deleted file mode 100644 index 70cc558..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sv_AX.php +++ /dev/null @@ -1,19 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/sv.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-dd', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sv_FI.php b/vendor/nesbot/carbon/src/Carbon/Lang/sv_FI.php deleted file mode 100644 index d7182c8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sv_FI.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/sv.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sv_SE.php b/vendor/nesbot/carbon/src/Carbon/Lang/sv_SE.php deleted file mode 100644 index d7182c8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sv_SE.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/sv.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sw.php b/vendor/nesbot/carbon/src/Carbon/Lang/sw.php deleted file mode 100644 index f8630d5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sw.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - leyluj - * - Josh Soref - * - ryanhart2 - */ -return [ - 'year' => 'mwaka :count|miaka :count', - 'a_year' => 'mwaka mmoja|miaka :count', - 'y' => 'mwaka :count|miaka :count', - 'month' => 'mwezi :count|miezi :count', - 'a_month' => 'mwezi mmoja|miezi :count', - 'm' => 'mwezi :count|miezi :count', - 'week' => 'wiki :count', - 'a_week' => 'wiki mmoja|wiki :count', - 'w' => 'w. :count', - 'day' => 'siku :count', - 'a_day' => 'siku moja|masiku :count', - 'd' => 'si. :count', - 'hour' => 'saa :count|masaa :count', - 'a_hour' => 'saa limoja|masaa :count', - 'h' => 'saa :count|masaa :count', - 'minute' => 'dakika :count', - 'a_minute' => 'dakika moja|dakika :count', - 'min' => 'd. :count', - 'second' => 'sekunde :count', - 'a_second' => 'hivi punde|sekunde :count', - 's' => 'se. :count', - 'ago' => 'tokea :time', - 'from_now' => ':time baadaye', - 'after' => ':time baada', - 'before' => ':time kabla', - 'diff_now' => 'sasa hivi', - 'diff_today' => 'leo', - 'diff_today_regexp' => 'leo(?:\\s+saa)?', - 'diff_yesterday' => 'jana', - 'diff_tomorrow' => 'kesho', - 'diff_tomorrow_regexp' => 'kesho(?:\\s+saa)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[leo saa] LT', - 'nextDay' => '[kesho saa] LT', - 'nextWeek' => '[wiki ijayo] dddd [saat] LT', - 'lastDay' => '[jana] LT', - 'lastWeek' => '[wiki iliyopita] dddd [saat] LT', - 'sameElse' => 'L', - ], - 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['Jpl', 'Jtat', 'Jnne', 'Jtan', 'Alh', 'Ijm', 'Jmos'], - 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Al', 'Ij', 'J1'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' na '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sw_CD.php b/vendor/nesbot/carbon/src/Carbon/Lang/sw_CD.php deleted file mode 100644 index ec9117b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sw_CD.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/sw.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sw_KE.php b/vendor/nesbot/carbon/src/Carbon/Lang/sw_KE.php deleted file mode 100644 index 2ace0db..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sw_KE.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kamusi Project Martin Benjamin locales@kamusi.org - */ -return array_replace_recursive(require __DIR__.'/sw.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], - 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['asubuhi', 'alasiri'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sw_TZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/sw_TZ.php deleted file mode 100644 index fab3cd6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sw_TZ.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kamusi Project Martin Benjamin locales@kamusi.org - */ -return array_replace_recursive(require __DIR__.'/sw.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Januari', 'Februari', 'Machi', 'Aprili', 'Mei', 'Juni', 'Julai', 'Agosti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'weekdays' => ['Jumapili', 'Jumatatu', 'Jumanne', 'Jumatano', 'Alhamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], - 'weekdays_min' => ['J2', 'J3', 'J4', 'J5', 'Alh', 'Ij', 'J1'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['asubuhi', 'alasiri'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sw_UG.php b/vendor/nesbot/carbon/src/Carbon/Lang/sw_UG.php deleted file mode 100644 index ec9117b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sw_UG.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/sw.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/szl.php b/vendor/nesbot/carbon/src/Carbon/Lang/szl.php deleted file mode 100644 index 4429c4f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/szl.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/szl_PL.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php b/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php deleted file mode 100644 index 9adddcf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/szl_PL.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - szl_PL locale Przemyslaw Buczkowski libc-alpha@sourceware.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['styczyń', 'luty', 'merc', 'kwjeciyń', 'moj', 'czyrwjyń', 'lipjyń', 'siyrpjyń', 'wrzesiyń', 'październik', 'listopad', 'grudziyń'], - 'months_short' => ['sty', 'lut', 'mer', 'kwj', 'moj', 'czy', 'lip', 'siy', 'wrz', 'paź', 'lis', 'gru'], - 'weekdays' => ['niydziela', 'pyńdziŏek', 'wtŏrek', 'strzŏda', 'sztwortek', 'pjōntek', 'sobŏta'], - 'weekdays_short' => ['niy', 'pyń', 'wtŏ', 'str', 'szt', 'pjō', 'sob'], - 'weekdays_min' => ['niy', 'pyń', 'wtŏ', 'str', 'szt', 'pjō', 'sob'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count rok', - 'y' => ':count rok', - 'a_year' => ':count rok', - - 'month' => ':count mjeśůnc', - 'm' => ':count mjeśůnc', - 'a_month' => ':count mjeśůnc', - - 'week' => ':count tydźyń', - 'w' => ':count tydźyń', - 'a_week' => ':count tydźyń', - - 'day' => ':count dźyń', - 'd' => ':count dźyń', - 'a_day' => ':count dźyń', - - 'hour' => ':count godzina', - 'h' => ':count godzina', - 'a_hour' => ':count godzina', - - 'minute' => ':count minuta', - 'min' => ':count minuta', - 'a_minute' => ':count minuta', - - 'second' => ':count sekůnda', - 's' => ':count sekůnda', - 'a_second' => ':count sekůnda', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ta.php b/vendor/nesbot/carbon/src/Carbon/Lang/ta.php deleted file mode 100644 index c1d89cb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ta.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - François B - * - JD Isaacks - * - Satheez - */ -return [ - 'year' => ':count வருடம்|:count ஆண்டுகள்', - 'a_year' => 'ஒரு வருடம்|:count ஆண்டுகள்', - 'y' => ':count வருட.|:count ஆண்.', - 'month' => ':count மாதம்|:count மாதங்கள்', - 'a_month' => 'ஒரு மாதம்|:count மாதங்கள்', - 'm' => ':count மாத.', - 'week' => ':count வாரம்|:count வாரங்கள்', - 'a_week' => 'ஒரு வாரம்|:count வாரங்கள்', - 'w' => ':count வார.', - 'day' => ':count நாள்|:count நாட்கள்', - 'a_day' => 'ஒரு நாள்|:count நாட்கள்', - 'd' => ':count நாள்|:count நாட்.', - 'hour' => ':count மணி நேரம்|:count மணி நேரம்', - 'a_hour' => 'ஒரு மணி நேரம்|:count மணி நேரம்', - 'h' => ':count மணி.', - 'minute' => ':count நிமிடம்|:count நிமிடங்கள்', - 'a_minute' => 'ஒரு நிமிடம்|:count நிமிடங்கள்', - 'min' => ':count நிமி.', - 'second' => ':count சில விநாடிகள்|:count விநாடிகள்', - 'a_second' => 'ஒரு சில விநாடிகள்|:count விநாடிகள்', - 's' => ':count விநா.', - 'ago' => ':time முன்', - 'from_now' => ':time இல்', - 'before' => ':time முன்', - 'after' => ':time பின்', - 'diff_now' => 'இப்போது', - 'diff_today' => 'இன்று', - 'diff_yesterday' => 'நேற்று', - 'diff_tomorrow' => 'நாளை', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[இன்று] LT', - 'nextDay' => '[நாளை] LT', - 'nextWeek' => 'dddd, LT', - 'lastDay' => '[நேற்று] LT', - 'lastWeek' => '[கடந்த வாரம்] dddd, LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':numberவது', - 'meridiem' => function ($hour) { - if ($hour < 2) { - return ' யாமம்'; - } - if ($hour < 6) { - return ' வைகறை'; - } - if ($hour < 10) { - return ' காலை'; - } - if ($hour < 14) { - return ' நண்பகல்'; - } - if ($hour < 18) { - return ' எற்பாடு'; - } - if ($hour < 22) { - return ' மாலை'; - } - - return ' யாமம்'; - }, - 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டெம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], - 'months_short' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டெம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], - 'weekdays' => ['ஞாயிற்றுக்கிழமை', 'திங்கட்கிழமை', 'செவ்வாய்கிழமை', 'புதன்கிழமை', 'வியாழக்கிழமை', 'வெள்ளிக்கிழமை', 'சனிக்கிழமை'], - 'weekdays_short' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], - 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' மற்றும் '], - 'weekend' => [0, 0], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ta_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ta_IN.php deleted file mode 100644 index 492d4c5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ta_IN.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/ta.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], - 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], - 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], - 'weekdays_short' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], - 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['காலை', 'மாலை'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ta_LK.php b/vendor/nesbot/carbon/src/Carbon/Lang/ta_LK.php deleted file mode 100644 index 8e2afbf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ta_LK.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - J.Yogaraj 94-777-315206 yogaraj.ubuntu@gmail.com - */ -return array_replace_recursive(require __DIR__.'/ta.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], - 'months_short' => ['ஜன', 'பிப்', 'மார்', 'ஏப்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக', 'செப்', 'அக்', 'நவ', 'டிச'], - 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], - 'weekdays_short' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], - 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['காலை', 'மாலை'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ta_MY.php b/vendor/nesbot/carbon/src/Carbon/Lang/ta_MY.php deleted file mode 100644 index a6cd8b5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ta_MY.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ta.php', [ - 'formats' => [ - 'LT' => 'a h:mm', - 'LTS' => 'a h:mm:ss', - 'L' => 'D/M/yy', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM, YYYY, a h:mm', - 'LLLL' => 'dddd, D MMMM, YYYY, a h:mm', - ], - 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], - 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], - 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], - 'weekdays_short' => ['ஞாயி.', 'திங்.', 'செவ்.', 'புத.', 'வியா.', 'வெள்.', 'சனி'], - 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], - 'first_day_of_week' => 1, - 'meridiem' => ['மு.ப', 'பி.ப'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ta_SG.php b/vendor/nesbot/carbon/src/Carbon/Lang/ta_SG.php deleted file mode 100644 index 7dbedee..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ta_SG.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ta.php', [ - 'formats' => [ - 'LT' => 'a h:mm', - 'LTS' => 'a h:mm:ss', - 'L' => 'D/M/yy', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM, YYYY, a h:mm', - 'LLLL' => 'dddd, D MMMM, YYYY, a h:mm', - ], - 'months' => ['ஜனவரி', 'பிப்ரவரி', 'மார்ச்', 'ஏப்ரல்', 'மே', 'ஜூன்', 'ஜூலை', 'ஆகஸ்ட்', 'செப்டம்பர்', 'அக்டோபர்', 'நவம்பர்', 'டிசம்பர்'], - 'months_short' => ['ஜன.', 'பிப்.', 'மார்.', 'ஏப்.', 'மே', 'ஜூன்', 'ஜூலை', 'ஆக.', 'செப்.', 'அக்.', 'நவ.', 'டிச.'], - 'weekdays' => ['ஞாயிறு', 'திங்கள்', 'செவ்வாய்', 'புதன்', 'வியாழன்', 'வெள்ளி', 'சனி'], - 'weekdays_short' => ['ஞாயி.', 'திங்.', 'செவ்.', 'புத.', 'வியா.', 'வெள்.', 'சனி'], - 'weekdays_min' => ['ஞா', 'தி', 'செ', 'பு', 'வி', 'வெ', 'ச'], - 'meridiem' => ['மு.ப', 'பி.ப'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tcy.php b/vendor/nesbot/carbon/src/Carbon/Lang/tcy.php deleted file mode 100644 index 2eb9905..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tcy.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/tcy_IN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tcy_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/tcy_IN.php deleted file mode 100644 index 2ff20e0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tcy_IN.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IndLinux.org, Samsung Electronics Co., Ltd. alexey.merzlyakov@samsung.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['ಜನವರಿ', 'ಫೆಬ್ರುವರಿ', 'ಮಾರ್ಚ್', 'ಏಪ್ರಿಲ್‌‌', 'ಮೇ', 'ಜೂನ್', 'ಜುಲೈ', 'ಆಗಸ್ಟ್', 'ಸೆಪ್ಟೆಂಬರ್‌', 'ಅಕ್ಟೋಬರ್', 'ನವೆಂಬರ್', 'ಡಿಸೆಂಬರ್'], - 'months_short' => ['ಜ', 'ಫೆ', 'ಮಾ', 'ಏ', 'ಮೇ', 'ಜೂ', 'ಜು', 'ಆ', 'ಸೆ', 'ಅ', 'ನ', 'ಡಿ'], - 'weekdays' => ['ಐಥಾರ', 'ಸೋಮಾರ', 'ಅಂಗರೆ', 'ಬುಧಾರ', 'ಗುರುವಾರ', 'ಶುಕ್ರರ', 'ಶನಿವಾರ'], - 'weekdays_short' => ['ಐ', 'ಸೋ', 'ಅಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], - 'weekdays_min' => ['ಐ', 'ಸೋ', 'ಅಂ', 'ಬು', 'ಗು', 'ಶು', 'ಶ'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ಕಾಂಡೆ', 'ಬಯ್ಯ'], - - 'year' => ':count ನೀರ್', // less reliable - 'y' => ':count ನೀರ್', // less reliable - 'a_year' => ':count ನೀರ್', // less reliable - - 'month' => ':count ಮೀನ್', // less reliable - 'm' => ':count ಮೀನ್', // less reliable - 'a_month' => ':count ಮೀನ್', // less reliable - - 'day' => ':count ಸುಗ್ಗಿ', // less reliable - 'd' => ':count ಸುಗ್ಗಿ', // less reliable - 'a_day' => ':count ಸುಗ್ಗಿ', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/te.php b/vendor/nesbot/carbon/src/Carbon/Lang/te.php deleted file mode 100644 index ac38218..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/te.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kunal Marwaha - * - Josh Soref - * - François B - * - kc - */ -return [ - 'year' => ':count సంవత్సరం|:count సంవత్సరాలు', - 'a_year' => 'ఒక సంవత్సరం|:count సంవత్సరాలు', - 'y' => ':count సం.', - 'month' => ':count నెల|:count నెలలు', - 'a_month' => 'ఒక నెల|:count నెలలు', - 'm' => ':count నెల|:count నెల.', - 'week' => ':count వారం|:count వారాలు', - 'a_week' => 'ఒక వారం|:count వారాలు', - 'w' => ':count వార.|:count వారా.', - 'day' => ':count రోజు|:count రోజులు', - 'a_day' => 'ఒక రోజు|:count రోజులు', - 'd' => ':count రోజు|:count రోజు.', - 'hour' => ':count గంట|:count గంటలు', - 'a_hour' => 'ఒక గంట|:count గంటలు', - 'h' => ':count గం.', - 'minute' => ':count నిమిషం|:count నిమిషాలు', - 'a_minute' => 'ఒక నిమిషం|:count నిమిషాలు', - 'min' => ':count నిమి.', - 'second' => ':count సెకను|:count సెకన్లు', - 'a_second' => 'కొన్ని క్షణాలు|:count సెకన్లు', - 's' => ':count సెక.', - 'ago' => ':time క్రితం', - 'from_now' => ':time లో', - 'diff_now' => 'ప్రస్తుతం', - 'diff_today' => 'నేడు', - 'diff_yesterday' => 'నిన్న', - 'diff_tomorrow' => 'రేపు', - 'formats' => [ - 'LT' => 'A h:mm', - 'LTS' => 'A h:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, A h:mm', - 'LLLL' => 'dddd, D MMMM YYYY, A h:mm', - ], - 'calendar' => [ - 'sameDay' => '[నేడు] LT', - 'nextDay' => '[రేపు] LT', - 'nextWeek' => 'dddd, LT', - 'lastDay' => '[నిన్న] LT', - 'lastWeek' => '[గత] dddd, LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':numberవ', - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'రాత్రి'; - } - if ($hour < 10) { - return 'ఉదయం'; - } - if ($hour < 17) { - return 'మధ్యాహ్నం'; - } - if ($hour < 20) { - return 'సాయంత్రం'; - } - - return ' రాత్రి'; - }, - 'months' => ['జనవరి', 'ఫిబ్రవరి', 'మార్చి', 'ఏప్రిల్', 'మే', 'జూన్', 'జూలై', 'ఆగస్టు', 'సెప్టెంబర్', 'అక్టోబర్', 'నవంబర్', 'డిసెంబర్'], - 'months_short' => ['జన.', 'ఫిబ్ర.', 'మార్చి', 'ఏప్రి.', 'మే', 'జూన్', 'జూలై', 'ఆగ.', 'సెప్.', 'అక్టో.', 'నవ.', 'డిసె.'], - 'weekdays' => ['ఆదివారం', 'సోమవారం', 'మంగళవారం', 'బుధవారం', 'గురువారం', 'శుక్రవారం', 'శనివారం'], - 'weekdays_short' => ['ఆది', 'సోమ', 'మంగళ', 'బుధ', 'గురు', 'శుక్ర', 'శని'], - 'weekdays_min' => ['ఆ', 'సో', 'మం', 'బు', 'గు', 'శు', 'శ'], - 'list' => ', ', - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'weekend' => [0, 0], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/te_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/te_IN.php deleted file mode 100644 index 3963f8d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/te_IN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/te.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/teo.php b/vendor/nesbot/carbon/src/Carbon/Lang/teo.php deleted file mode 100644 index ca30c37..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/teo.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ta.php', [ - 'meridiem' => ['Taparachu', 'Ebongi'], - 'weekdays' => ['Nakaejuma', 'Nakaebarasa', 'Nakaare', 'Nakauni', 'Nakaung’on', 'Nakakany', 'Nakasabiti'], - 'weekdays_short' => ['Jum', 'Bar', 'Aar', 'Uni', 'Ung', 'Kan', 'Sab'], - 'weekdays_min' => ['Jum', 'Bar', 'Aar', 'Uni', 'Ung', 'Kan', 'Sab'], - 'months' => ['Orara', 'Omuk', 'Okwamg’', 'Odung’el', 'Omaruk', 'Omodok’king’ol', 'Ojola', 'Opedel', 'Osokosokoma', 'Otibar', 'Olabor', 'Opoo'], - 'months_short' => ['Rar', 'Muk', 'Kwa', 'Dun', 'Mar', 'Mod', 'Jol', 'Ped', 'Sok', 'Tib', 'Lab', 'Poo'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/teo_KE.php b/vendor/nesbot/carbon/src/Carbon/Lang/teo_KE.php deleted file mode 100644 index 010a04f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/teo_KE.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/teo.php', [ - 'first_day_of_week' => 0, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tet.php b/vendor/nesbot/carbon/src/Carbon/Lang/tet.php deleted file mode 100644 index d0544d4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tet.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Joshua Brooks - * - François B - */ -return [ - 'year' => 'tinan :count', - 'a_year' => '{1}tinan ida|tinan :count', - 'month' => 'fulan :count', - 'a_month' => '{1}fulan ida|fulan :count', - 'week' => 'semana :count', - 'a_week' => '{1}semana ida|semana :count', - 'day' => 'loron :count', - 'a_day' => '{1}loron ida|loron :count', - 'hour' => 'oras :count', - 'a_hour' => '{1}oras ida|oras :count', - 'minute' => 'minutu :count', - 'a_minute' => '{1}minutu ida|minutu :count', - 'second' => 'segundu :count', - 'a_second' => '{1}segundu balun|segundu :count', - 'ago' => ':time liuba', - 'from_now' => 'iha :time', - 'diff_yesterday' => 'Horiseik', - 'diff_yesterday_regexp' => 'Horiseik(?:\\s+iha)?', - 'diff_today' => 'Ohin', - 'diff_today_regexp' => 'Ohin(?:\\s+iha)?', - 'diff_tomorrow' => 'Aban', - 'diff_tomorrow_regexp' => 'Aban(?:\\s+iha)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Ohin iha] LT', - 'nextDay' => '[Aban iha] LT', - 'nextWeek' => 'dddd [iha] LT', - 'lastDay' => '[Horiseik iha] LT', - 'lastWeek' => 'dddd [semana kotuk] [iha] LT', - 'sameElse' => 'L', - ], - 'ordinal' => ':numberº', - 'months' => ['Janeiru', 'Fevereiru', 'Marsu', 'Abril', 'Maiu', 'Juñu', 'Jullu', 'Agustu', 'Setembru', 'Outubru', 'Novembru', 'Dezembru'], - 'months_short' => ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'], - 'weekdays' => ['Domingu', 'Segunda', 'Tersa', 'Kuarta', 'Kinta', 'Sesta', 'Sabadu'], - 'weekdays_short' => ['Dom', 'Seg', 'Ters', 'Kua', 'Kint', 'Sest', 'Sab'], - 'weekdays_min' => ['Do', 'Seg', 'Te', 'Ku', 'Ki', 'Ses', 'Sa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tg.php b/vendor/nesbot/carbon/src/Carbon/Lang/tg.php deleted file mode 100644 index b7df893..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tg.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Orif N. Jr - */ -return [ - 'year' => '{1}як сол|:count сол', - 'month' => '{1}як моҳ|:count моҳ', - 'week' => '{1}як ҳафта|:count ҳафта', - 'day' => '{1}як рӯз|:count рӯз', - 'hour' => '{1}як соат|:count соат', - 'minute' => '{1}як дақиқа|:count дақиқа', - 'second' => '{1}якчанд сония|:count сония', - 'ago' => ':time пеш', - 'from_now' => 'баъди :time', - 'diff_today' => 'Имрӯз', - 'diff_yesterday' => 'Дирӯз', - 'diff_yesterday_regexp' => 'Дирӯз(?:\\s+соати)?', - 'diff_tomorrow' => 'Пагоҳ', - 'diff_tomorrow_regexp' => 'Пагоҳ(?:\\s+соати)?', - 'diff_today_regexp' => 'Имрӯз(?:\\s+соати)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Имрӯз соати] LT', - 'nextDay' => '[Пагоҳ соати] LT', - 'nextWeek' => 'dddd[и] [ҳафтаи оянда соати] LT', - 'lastDay' => '[Дирӯз соати] LT', - 'lastWeek' => 'dddd[и] [ҳафтаи гузашта соати] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number) { - if ($number === 0) { // special case for zero - return "$number-ıncı"; - } - - static $suffixes = [ - 0 => '-ум', - 1 => '-ум', - 2 => '-юм', - 3 => '-юм', - 4 => '-ум', - 5 => '-ум', - 6 => '-ум', - 7 => '-ум', - 8 => '-ум', - 9 => '-ум', - 10 => '-ум', - 12 => '-ум', - 13 => '-ум', - 20 => '-ум', - 30 => '-юм', - 40 => '-ум', - 50 => '-ум', - 60 => '-ум', - 70 => '-ум', - 80 => '-ум', - 90 => '-ум', - 100 => '-ум', - ]; - - return $number.($suffixes[$number] ?? $suffixes[$number % 10] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); - }, - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'шаб'; - } - if ($hour < 11) { - return 'субҳ'; - } - if ($hour < 16) { - return 'рӯз'; - } - if ($hour < 19) { - return 'бегоҳ'; - } - - return 'шаб'; - }, - 'months' => ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'], - 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], - 'weekdays' => ['якшанбе', 'душанбе', 'сешанбе', 'чоршанбе', 'панҷшанбе', 'ҷумъа', 'шанбе'], - 'weekdays_short' => ['яшб', 'дшб', 'сшб', 'чшб', 'пшб', 'ҷум', 'шнб'], - 'weekdays_min' => ['яш', 'дш', 'сш', 'чш', 'пш', 'ҷм', 'шб'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' ва '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tg_TJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/tg_TJ.php deleted file mode 100644 index badc7d1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tg_TJ.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/tg.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/th.php b/vendor/nesbot/carbon/src/Carbon/Lang/th.php deleted file mode 100644 index 6397f6e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/th.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Nate Whittaker - * - John MacAslan - * - Chanintorn Asavavichairoj - * - JD Isaacks - * - ROKAISAKKON - * - RO'KAISAKKON - * - Andreas Möller - * - nithisa - */ -return [ - 'year' => ':count ปี', - 'y' => ':count ปี', - 'month' => ':count เดือน', - 'm' => ':count เดือน', - 'week' => ':count สัปดาห์', - 'w' => ':count สัปดาห์', - 'day' => ':count วัน', - 'd' => ':count วัน', - 'hour' => ':count ชั่วโมง', - 'h' => ':count ชั่วโมง', - 'minute' => ':count นาที', - 'min' => ':count นาที', - 'second' => ':count วินาที', - 'a_second' => '{1}ไม่กี่วินาที|]1,Inf[:count วินาที', - 's' => ':count วินาที', - 'ago' => ':timeที่แล้ว', - 'from_now' => 'อีก :time', - 'after' => ':timeหลังจากนี้', - 'before' => ':timeก่อน', - 'diff_now' => 'ขณะนี้', - 'diff_today' => 'วันนี้', - 'diff_today_regexp' => 'วันนี้(?:\\s+เวลา)?', - 'diff_yesterday' => 'เมื่อวาน', - 'diff_yesterday_regexp' => 'เมื่อวานนี้(?:\\s+เวลา)?', - 'diff_tomorrow' => 'พรุ่งนี้', - 'diff_tomorrow_regexp' => 'พรุ่งนี้(?:\\s+เวลา)?', - 'formats' => [ - 'LT' => 'H:mm', - 'LTS' => 'H:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY เวลา H:mm', - 'LLLL' => 'วันddddที่ D MMMM YYYY เวลา H:mm', - ], - 'calendar' => [ - 'sameDay' => '[วันนี้ เวลา] LT', - 'nextDay' => '[พรุ่งนี้ เวลา] LT', - 'nextWeek' => 'dddd[หน้า เวลา] LT', - 'lastDay' => '[เมื่อวานนี้ เวลา] LT', - 'lastWeek' => '[วัน]dddd[ที่แล้ว เวลา] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ก่อนเที่ยง', 'หลังเที่ยง'], - 'months' => ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'], - 'months_short' => ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.'], - 'weekdays' => ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'], - 'weekdays_short' => ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัส', 'ศุกร์', 'เสาร์'], - 'weekdays_min' => ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'], - 'list' => [', ', ' และ '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/th_TH.php b/vendor/nesbot/carbon/src/Carbon/Lang/th_TH.php deleted file mode 100644 index b9f94b2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/th_TH.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/th.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/the.php b/vendor/nesbot/carbon/src/Carbon/Lang/the.php deleted file mode 100644 index 85f8333..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/the.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/the_NP.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/the_NP.php b/vendor/nesbot/carbon/src/Carbon/Lang/the_NP.php deleted file mode 100644 index 34da162..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/the_NP.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Chitwanix OS Development info@chitwanix.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'dddd DD MMM YYYY', - ], - 'months' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'months_short' => ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रेल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'], - 'weekdays' => ['आइतबार', 'सोमबार', 'मंगलबार', 'बुधबार', 'बिहिबार', 'शुक्रबार', 'शनिबार'], - 'weekdays_short' => ['आइत', 'सोम', 'मंगल', 'बुध', 'बिहि', 'शुक्र', 'शनि'], - 'weekdays_min' => ['आइत', 'सोम', 'मंगल', 'बुध', 'बिहि', 'शुक्र', 'शनि'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['पूर्वाह्न', 'अपराह्न'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ti.php b/vendor/nesbot/carbon/src/Carbon/Lang/ti.php deleted file mode 100644 index ffd3236..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ti.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ti_ER.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ti_ER.php b/vendor/nesbot/carbon/src/Carbon/Lang/ti_ER.php deleted file mode 100644 index 310c51c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ti_ER.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['ጥሪ', 'ለካቲት', 'መጋቢት', 'ሚያዝያ', 'ግንቦት', 'ሰነ', 'ሓምለ', 'ነሓሰ', 'መስከረም', 'ጥቅምቲ', 'ሕዳር', 'ታሕሳስ'], - 'months_short' => ['ጥሪ ', 'ለካቲ', 'መጋቢ', 'ሚያዝ', 'ግንቦ', 'ሰነ ', 'ሓምለ', 'ነሓሰ', 'መስከ', 'ጥቅም', 'ሕዳር', 'ታሕሳ'], - 'weekdays' => ['ሰንበት', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], - 'weekdays_short' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], - 'weekdays_min' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ንጉሆ ሰዓተ', 'ድሕር ሰዓት'], - - 'year' => ':count ዓመት', - 'y' => ':count ዓመት', - 'a_year' => ':count ዓመት', - - 'month' => 'ወርሒ :count', - 'm' => 'ወርሒ :count', - 'a_month' => 'ወርሒ :count', - - 'week' => ':count ሰሙን', - 'w' => ':count ሰሙን', - 'a_week' => ':count ሰሙን', - - 'day' => ':count መዓልቲ', - 'd' => ':count መዓልቲ', - 'a_day' => ':count መዓልቲ', - - 'hour' => ':count ሰዓት', - 'h' => ':count ሰዓት', - 'a_hour' => ':count ሰዓት', - - 'minute' => ':count ደቒቕ', - 'min' => ':count ደቒቕ', - 'a_minute' => ':count ደቒቕ', - - 'second' => ':count ሰከንድ', - 's' => ':count ሰከንድ', - 'a_second' => ':count ሰከንድ', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ti_ET.php b/vendor/nesbot/carbon/src/Carbon/Lang/ti_ET.php deleted file mode 100644 index 024217f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ti_ET.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], - 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], - 'weekdays' => ['ሰንበት', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], - 'weekdays_short' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], - 'weekdays_min' => ['ሰንበ', 'ሰኑይ', 'ሰሉስ', 'ረቡዕ', 'ሓሙስ', 'ዓርቢ', 'ቀዳም'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ንጉሆ ሰዓተ', 'ድሕር ሰዓት'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tig.php b/vendor/nesbot/carbon/src/Carbon/Lang/tig.php deleted file mode 100644 index 186fe71..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tig.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/tig_ER.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tig_ER.php b/vendor/nesbot/carbon/src/Carbon/Lang/tig_ER.php deleted file mode 100644 index 46887b0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tig_ER.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['ጥሪ', 'ለካቲት', 'መጋቢት', 'ሚያዝያ', 'ግንቦት', 'ሰነ', 'ሓምለ', 'ነሓሰ', 'መስከረም', 'ጥቅምቲ', 'ሕዳር', 'ታሕሳስ'], - 'months_short' => ['ጥሪ ', 'ለካቲ', 'መጋቢ', 'ሚያዝ', 'ግንቦ', 'ሰነ ', 'ሓምለ', 'ነሓሰ', 'መስከ', 'ጥቅም', 'ሕዳር', 'ታሕሳ'], - 'weekdays' => ['ሰንበት ዓባይ', 'ሰኖ', 'ታላሸኖ', 'ኣረርባዓ', 'ከሚሽ', 'ጅምዓት', 'ሰንበት ንኢሽ'], - 'weekdays_short' => ['ሰ//ዓ', 'ሰኖ ', 'ታላሸ', 'ኣረር', 'ከሚሽ', 'ጅምዓ', 'ሰ//ን'], - 'weekdays_min' => ['ሰ//ዓ', 'ሰኖ ', 'ታላሸ', 'ኣረር', 'ከሚሽ', 'ጅምዓ', 'ሰ//ን'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ቀደም ሰር ምዕል', 'ሓቆ ሰር ምዕል'], - - 'year' => ':count ማይ', // less reliable - 'y' => ':count ማይ', // less reliable - 'a_year' => ':count ማይ', // less reliable - - 'month' => ':count ሸምሽ', // less reliable - 'm' => ':count ሸምሽ', // less reliable - 'a_month' => ':count ሸምሽ', // less reliable - - 'week' => ':count ሰቡዕ', // less reliable - 'w' => ':count ሰቡዕ', // less reliable - 'a_week' => ':count ሰቡዕ', // less reliable - - 'day' => ':count ዎሮ', // less reliable - 'd' => ':count ዎሮ', // less reliable - 'a_day' => ':count ዎሮ', // less reliable - - 'hour' => ':count ሰዓት', // less reliable - 'h' => ':count ሰዓት', // less reliable - 'a_hour' => ':count ሰዓት', // less reliable - - 'minute' => ':count ካልኣይት', // less reliable - 'min' => ':count ካልኣይት', // less reliable - 'a_minute' => ':count ካልኣይት', // less reliable - - 'second' => ':count ካልኣይ', - 's' => ':count ካልኣይ', - 'a_second' => ':count ካልኣይ', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tk.php b/vendor/nesbot/carbon/src/Carbon/Lang/tk.php deleted file mode 100644 index d8f7d19..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tk.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/tk_TM.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tk_TM.php b/vendor/nesbot/carbon/src/Carbon/Lang/tk_TM.php deleted file mode 100644 index f949a43..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tk_TM.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Authors: - * - Ghorban M. Tavakoly Pablo Saratxaga & Ghorban M. Tavakoly pablo@walon.org & gmt314@yahoo.com - * - SuperManPHP - * - Maksat Meredow (isadma) - */ -$transformDiff = function ($input) { - return strtr($input, [ - 'sekunt' => 'sekunt', - 'hepde' => 'hepde', - ]); -}; - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Ýanwar', 'Fewral', 'Mart', 'Aprel', 'Maý', 'Iýun', 'Iýul', 'Awgust', 'Sentýabr', 'Oktýabr', 'Noýabr', 'Dekabr'], - 'months_short' => ['Ýan', 'Few', 'Mar', 'Apr', 'Maý', 'Iýn', 'Iýl', 'Awg', 'Sen', 'Okt', 'Noý', 'Dek'], - 'weekdays' => ['Duşenbe', 'Sişenbe', 'Çarşenbe', 'Penşenbe', 'Anna', 'Şenbe', 'Ýekşenbe'], - 'weekdays_short' => ['Duş', 'Siş', 'Çar', 'Pen', 'Ann', 'Şen', 'Ýek'], - 'weekdays_min' => ['Du', 'Si', 'Ça', 'Pe', 'An', 'Şe', 'Ýe'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - - 'year' => ':count ýyl', - 'y' => ':count ýyl', - 'a_year' => ':count ýyl', - - 'month' => ':count aý', - 'm' => ':count aý', - 'a_month' => ':count aý', - - 'week' => ':count hepde', - 'w' => ':count hepde', - 'a_week' => ':count hepde', - - 'day' => ':count gün', - 'd' => ':count gün', - 'a_day' => ':count gün', - - 'hour' => ':count sagat', - 'h' => ':count sagat', - 'a_hour' => ':count sagat', - - 'minute' => ':count minut', - 'min' => ':count minut', - 'a_minute' => ':count minut', - - 'second' => ':count sekunt', - 's' => ':count sekunt', - 'a_second' => ':count sekunt', - - 'ago' => function ($time) use ($transformDiff) { - return $transformDiff($time).' ozal'; - }, - 'from_now' => function ($time) use ($transformDiff) { - return $transformDiff($time).' soňra'; - }, - 'after' => function ($time) use ($transformDiff) { - return $transformDiff($time).' soň'; - }, - 'before' => function ($time) use ($transformDiff) { - return $transformDiff($time).' öň'; - }, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tl.php b/vendor/nesbot/carbon/src/Carbon/Lang/tl.php deleted file mode 100644 index 410a266..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tl.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return [ - 'year' => ':count taon', - 'a_year' => '{1}isang taon|:count taon', - 'month' => ':count buwan', - 'a_month' => '{1}isang buwan|:count buwan', - 'week' => ':count linggo', - 'a_week' => '{1}isang linggo|:count linggo', - 'day' => ':count araw', - 'a_day' => '{1}isang araw|:count araw', - 'hour' => ':count oras', - 'a_hour' => '{1}isang oras|:count oras', - 'minute' => ':count minuto', - 'a_minute' => '{1}isang minuto|:count minuto', - 'min' => ':count min.', - 'second' => ':count segundo', - 'a_second' => '{1}ilang segundo|:count segundo', - 's' => ':count seg.', - 'ago' => ':time ang nakalipas', - 'from_now' => 'sa loob ng :time', - 'diff_now' => 'ngayon', - 'diff_today' => 'ngayong', - 'diff_today_regexp' => 'ngayong(?:\\s+araw)?', - 'diff_yesterday' => 'kahapon', - 'diff_tomorrow' => 'bukas', - 'diff_tomorrow_regexp' => 'Bukas(?:\\s+ng)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'MM/D/YYYY', - 'LL' => 'MMMM D, YYYY', - 'LLL' => 'MMMM D, YYYY HH:mm', - 'LLLL' => 'dddd, MMMM DD, YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => 'LT [ngayong araw]', - 'nextDay' => '[Bukas ng] LT', - 'nextWeek' => 'LT [sa susunod na] dddd', - 'lastDay' => 'LT [kahapon]', - 'lastWeek' => 'LT [noong nakaraang] dddd', - 'sameElse' => 'L', - ], - 'months' => ['Enero', 'Pebrero', 'Marso', 'Abril', 'Mayo', 'Hunyo', 'Hulyo', 'Agosto', 'Setyembre', 'Oktubre', 'Nobyembre', 'Disyembre'], - 'months_short' => ['Ene', 'Peb', 'Mar', 'Abr', 'May', 'Hun', 'Hul', 'Ago', 'Set', 'Okt', 'Nob', 'Dis'], - 'weekdays' => ['Linggo', 'Lunes', 'Martes', 'Miyerkules', 'Huwebes', 'Biyernes', 'Sabado'], - 'weekdays_short' => ['Lin', 'Lun', 'Mar', 'Miy', 'Huw', 'Biy', 'Sab'], - 'weekdays_min' => ['Li', 'Lu', 'Ma', 'Mi', 'Hu', 'Bi', 'Sab'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' at '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tl_PH.php b/vendor/nesbot/carbon/src/Carbon/Lang/tl_PH.php deleted file mode 100644 index 95f508c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tl_PH.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Ian De La Cruz - * - JD Isaacks - */ -return require __DIR__.'/tl.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tlh.php b/vendor/nesbot/carbon/src/Carbon/Lang/tlh.php deleted file mode 100644 index fbf9e6f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tlh.php +++ /dev/null @@ -1,72 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Serhan Apaydın - * - Dominika - */ -return [ - 'year' => '{1}wa’ DIS|:count DIS', - 'month' => '{1}wa’ jar|:count jar', - 'week' => '{1}wa’ hogh|:count hogh', - 'day' => '{1}wa’ jaj|:count jaj', - 'hour' => '{1}wa’ rep|:count rep', - 'minute' => '{1}wa’ tup|:count tup', - 'second' => '{1}puS lup|:count lup', - 'ago' => function ($time) { - $output = strtr($time, [ - 'jaj' => 'Hu’', - 'jar' => 'wen', - 'DIS' => 'ben', - ]); - - return $output === $time ? "$time ret" : $output; - }, - 'from_now' => function ($time) { - $output = strtr($time, [ - 'jaj' => 'leS', - 'jar' => 'waQ', - 'DIS' => 'nem', - ]); - - return $output === $time ? "$time pIq" : $output; - }, - 'diff_yesterday' => 'wa’Hu’', - 'diff_today' => 'DaHjaj', - 'diff_tomorrow' => 'wa’leS', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[DaHjaj] LT', - 'nextDay' => '[wa’leS] LT', - 'nextWeek' => 'LLL', - 'lastDay' => '[wa’Hu’] LT', - 'lastWeek' => 'LLL', - 'sameElse' => 'L', - ], - 'ordinal' => ':number.', - 'months' => ['tera’ jar wa’', 'tera’ jar cha’', 'tera’ jar wej', 'tera’ jar loS', 'tera’ jar vagh', 'tera’ jar jav', 'tera’ jar Soch', 'tera’ jar chorgh', 'tera’ jar Hut', 'tera’ jar wa’maH', 'tera’ jar wa’maH wa’', 'tera’ jar wa’maH cha’'], - 'months_short' => ['jar wa’', 'jar cha’', 'jar wej', 'jar loS', 'jar vagh', 'jar jav', 'jar Soch', 'jar chorgh', 'jar Hut', 'jar wa’maH', 'jar wa’maH wa’', 'jar wa’maH cha’'], - 'weekdays' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], - 'weekdays_short' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], - 'weekdays_min' => ['lojmItjaj', 'DaSjaj', 'povjaj', 'ghItlhjaj', 'loghjaj', 'buqjaj', 'ghInjaj'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' ’ej '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tn.php b/vendor/nesbot/carbon/src/Carbon/Lang/tn.php deleted file mode 100644 index f29bdf6..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tn.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/tn_ZA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tn_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/tn_ZA.php deleted file mode 100644 index aada7db..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tn_ZA.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Ferikgong', 'Tlhakole', 'Mopitlwe', 'Moranang', 'Motsheganong', 'Seetebosigo', 'Phukwi', 'Phatwe', 'Lwetse', 'Diphalane', 'Ngwanatsele', 'Sedimonthole'], - 'months_short' => ['Fer', 'Tlh', 'Mop', 'Mor', 'Mot', 'See', 'Phu', 'Pha', 'Lwe', 'Dip', 'Ngw', 'Sed'], - 'weekdays' => ['laTshipi', 'Mosupologo', 'Labobedi', 'Laboraro', 'Labone', 'Labotlhano', 'Lamatlhatso'], - 'weekdays_short' => ['Tsh', 'Mos', 'Bed', 'Rar', 'Ne', 'Tlh', 'Mat'], - 'weekdays_min' => ['Tsh', 'Mos', 'Bed', 'Rar', 'Ne', 'Tlh', 'Mat'], - 'day_of_first_week_of_year' => 1, - - 'year' => 'dingwaga di le :count', - 'y' => 'dingwaga di le :count', - 'a_year' => 'dingwaga di le :count', - - 'month' => 'dikgwedi di le :count', - 'm' => 'dikgwedi di le :count', - 'a_month' => 'dikgwedi di le :count', - - 'week' => 'dibeke di le :count', - 'w' => 'dibeke di le :count', - 'a_week' => 'dibeke di le :count', - - 'day' => 'malatsi :count', - 'd' => 'malatsi :count', - 'a_day' => 'malatsi :count', - - 'hour' => 'diura di le :count', - 'h' => 'diura di le :count', - 'a_hour' => 'diura di le :count', - - 'minute' => 'metsotso e le :count', - 'min' => 'metsotso e le :count', - 'a_minute' => 'metsotso e le :count', - - 'second' => 'metsotswana e le :count', - 's' => 'metsotswana e le :count', - 'a_second' => 'metsotswana e le :count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/to.php b/vendor/nesbot/carbon/src/Carbon/Lang/to.php deleted file mode 100644 index 20581bb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/to.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/to_TO.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/to_TO.php b/vendor/nesbot/carbon/src/Carbon/Lang/to_TO.php deleted file mode 100644 index 335c69a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/to_TO.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - International Components for Unicode akhilesh.k@samsung.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'dddd DD MMM YYYY', - ], - 'months' => ['Sānuali', 'Fēpueli', 'Maʻasi', 'ʻEpeleli', 'Mē', 'Sune', 'Siulai', 'ʻAokosi', 'Sepitema', 'ʻOkatopa', 'Nōvema', 'Tīsema'], - 'months_short' => ['Sān', 'Fēp', 'Maʻa', 'ʻEpe', 'Mē', 'Sun', 'Siu', 'ʻAok', 'Sep', 'ʻOka', 'Nōv', 'Tīs'], - 'weekdays' => ['Sāpate', 'Mōnite', 'Tūsite', 'Pulelulu', 'Tuʻapulelulu', 'Falaite', 'Tokonaki'], - 'weekdays_short' => ['Sāp', 'Mōn', 'Tūs', 'Pul', 'Tuʻa', 'Fal', 'Tok'], - 'weekdays_min' => ['Sāp', 'Mōn', 'Tūs', 'Pul', 'Tuʻa', 'Fal', 'Tok'], - 'meridiem' => ['hengihengi', 'efiafi'], - - 'year' => ':count fitu', // less reliable - 'y' => ':count fitu', // less reliable - 'a_year' => ':count fitu', // less reliable - - 'month' => ':count mahina', // less reliable - 'm' => ':count mahina', // less reliable - 'a_month' => ':count mahina', // less reliable - - 'week' => ':count Sapate', // less reliable - 'w' => ':count Sapate', // less reliable - 'a_week' => ':count Sapate', // less reliable - - 'day' => ':count ʻaho', // less reliable - 'd' => ':count ʻaho', // less reliable - 'a_day' => ':count ʻaho', // less reliable - - 'hour' => ':count houa', - 'h' => ':count houa', - 'a_hour' => ':count houa', - - 'minute' => ':count miniti', - 'min' => ':count miniti', - 'a_minute' => ':count miniti', - - 'second' => ':count sekoni', - 's' => ':count sekoni', - 'a_second' => ':count sekoni', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tpi.php b/vendor/nesbot/carbon/src/Carbon/Lang/tpi.php deleted file mode 100644 index 7d38dae..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tpi.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/tpi_PG.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tpi_PG.php b/vendor/nesbot/carbon/src/Carbon/Lang/tpi_PG.php deleted file mode 100644 index 5f58c44..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tpi_PG.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Samsung Electronics Co., Ltd. akhilesh.k@samsung.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Janueri', 'Februeri', 'Mas', 'Epril', 'Me', 'Jun', 'Julai', 'Ogas', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mas', 'Epr', 'Me', 'Jun', 'Jul', 'Oga', 'Sep', 'Okt', 'Nov', 'Des'], - 'weekdays' => ['Sande', 'Mande', 'Tunde', 'Trinde', 'Fonde', 'Fraide', 'Sarere'], - 'weekdays_short' => ['San', 'Man', 'Tun', 'Tri', 'Fon', 'Fra', 'Sar'], - 'weekdays_min' => ['San', 'Man', 'Tun', 'Tri', 'Fon', 'Fra', 'Sar'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['biknait', 'apinun'], - - 'year' => 'yia :count', - 'y' => 'yia :count', - 'a_year' => 'yia :count', - - 'month' => ':count mun', - 'm' => ':count mun', - 'a_month' => ':count mun', - - 'week' => ':count wik', - 'w' => ':count wik', - 'a_week' => ':count wik', - - 'day' => ':count de', - 'd' => ':count de', - 'a_day' => ':count de', - - 'hour' => ':count aua', - 'h' => ':count aua', - 'a_hour' => ':count aua', - - 'minute' => ':count minit', - 'min' => ':count minit', - 'a_minute' => ':count minit', - - 'second' => ':count namba tu', - 's' => ':count namba tu', - 'a_second' => ':count namba tu', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tr.php b/vendor/nesbot/carbon/src/Carbon/Lang/tr.php deleted file mode 100644 index f5d9f4c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tr.php +++ /dev/null @@ -1,121 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - Alan Agius - * - Erhan Gundogan - * - François B - * - JD Isaacks - * - Murat Yüksel - * - Baran Şengül - * - Selami (selamialtin) - * - TeomanBey - */ -return [ - 'year' => ':count yıl', - 'a_year' => '{1}bir yıl|]1,Inf[:count yıl', - 'y' => ':county', - 'month' => ':count ay', - 'a_month' => '{1}bir ay|]1,Inf[:count ay', - 'm' => ':countay', - 'week' => ':count hafta', - 'a_week' => '{1}bir hafta|]1,Inf[:count hafta', - 'w' => ':counth', - 'day' => ':count gün', - 'a_day' => '{1}bir gün|]1,Inf[:count gün', - 'd' => ':countg', - 'hour' => ':count saat', - 'a_hour' => '{1}bir saat|]1,Inf[:count saat', - 'h' => ':countsa', - 'minute' => ':count dakika', - 'a_minute' => '{1}bir dakika|]1,Inf[:count dakika', - 'min' => ':countdk', - 'second' => ':count saniye', - 'a_second' => '{1}birkaç saniye|]1,Inf[:count saniye', - 's' => ':countsn', - 'ago' => ':time önce', - 'from_now' => ':time sonra', - 'after' => ':time sonra', - 'before' => ':time önce', - 'diff_now' => 'şimdi', - 'diff_today' => 'bugün', - 'diff_today_regexp' => 'bugün(?:\\s+saat)?', - 'diff_yesterday' => 'dün', - 'diff_tomorrow' => 'yarın', - 'diff_tomorrow_regexp' => 'yarın(?:\\s+saat)?', - 'diff_before_yesterday' => 'evvelsi gün', - 'diff_after_tomorrow' => 'öbür gün', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[bugün saat] LT', - 'nextDay' => '[yarın saat] LT', - 'nextWeek' => '[gelecek] dddd [saat] LT', - 'lastDay' => '[dün] LT', - 'lastWeek' => '[geçen] dddd [saat] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'd': - case 'D': - case 'Do': - case 'DD': - return $number; - default: - if ($number === 0) { // special case for zero - return "$number'ıncı"; - } - - static $suffixes = [ - 1 => '\'inci', - 5 => '\'inci', - 8 => '\'inci', - 70 => '\'inci', - 80 => '\'inci', - 2 => '\'nci', - 7 => '\'nci', - 20 => '\'nci', - 50 => '\'nci', - 3 => '\'üncü', - 4 => '\'üncü', - 100 => '\'üncü', - 6 => '\'ncı', - 9 => '\'uncu', - 10 => '\'uncu', - 30 => '\'uncu', - 60 => '\'ıncı', - 90 => '\'ıncı', - ]; - - $lastDigit = $number % 10; - - return $number.($suffixes[$lastDigit] ?? $suffixes[$number % 100 - $lastDigit] ?? $suffixes[$number >= 100 ? 100 : -1] ?? ''); - } - }, - 'meridiem' => ['ÖÖ', 'ÖS', 'öö', 'ös'], - 'months' => ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'], - 'months_short' => ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'], - 'weekdays' => ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'], - 'weekdays_short' => ['Paz', 'Pts', 'Sal', 'Çar', 'Per', 'Cum', 'Cts'], - 'weekdays_min' => ['Pz', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' ve '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tr_CY.php b/vendor/nesbot/carbon/src/Carbon/Lang/tr_CY.php deleted file mode 100644 index 23f1144..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tr_CY.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/tr.php', [ - 'weekdays_short' => ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'], - 'weekdays_min' => ['Pa', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct'], - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'D.MM.YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'D MMMM YYYY dddd h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tr_TR.php b/vendor/nesbot/carbon/src/Carbon/Lang/tr_TR.php deleted file mode 100644 index 9e99482..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tr_TR.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/tr.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ts.php b/vendor/nesbot/carbon/src/Carbon/Lang/ts.php deleted file mode 100644 index 525736b..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ts.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ts_ZA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ts_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ts_ZA.php deleted file mode 100644 index 37a24ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ts_ZA.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Sunguti', 'Nyenyenyani', 'Nyenyankulu', 'Dzivamisoko', 'Mudyaxihi', 'Khotavuxika', 'Mawuwani', 'Mhawuri', 'Ndzhati', 'Nhlangula', 'Hukuri', 'N\'wendzamhala'], - 'months_short' => ['Sun', 'Yan', 'Kul', 'Dzi', 'Mud', 'Kho', 'Maw', 'Mha', 'Ndz', 'Nhl', 'Huk', 'N\'w'], - 'weekdays' => ['Sonto', 'Musumbhunuku', 'Ravumbirhi', 'Ravunharhu', 'Ravumune', 'Ravuntlhanu', 'Mugqivela'], - 'weekdays_short' => ['Son', 'Mus', 'Bir', 'Har', 'Ne', 'Tlh', 'Mug'], - 'weekdays_min' => ['Son', 'Mus', 'Bir', 'Har', 'Ne', 'Tlh', 'Mug'], - 'day_of_first_week_of_year' => 1, - - 'year' => 'malembe ya :count', - 'y' => 'malembe ya :count', - 'a_year' => 'malembe ya :count', - - 'month' => 'tin’hweti ta :count', - 'm' => 'tin’hweti ta :count', - 'a_month' => 'tin’hweti ta :count', - - 'week' => 'mavhiki ya :count', - 'w' => 'mavhiki ya :count', - 'a_week' => 'mavhiki ya :count', - - 'day' => 'masiku :count', - 'd' => 'masiku :count', - 'a_day' => 'masiku :count', - - 'hour' => 'tiawara ta :count', - 'h' => 'tiawara ta :count', - 'a_hour' => 'tiawara ta :count', - - 'minute' => 'timinete ta :count', - 'min' => 'timinete ta :count', - 'a_minute' => 'timinete ta :count', - - 'second' => 'tisekoni ta :count', - 's' => 'tisekoni ta :count', - 'a_second' => 'tisekoni ta :count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tt.php b/vendor/nesbot/carbon/src/Carbon/Lang/tt.php deleted file mode 100644 index d67d896..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tt.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/tt_RU.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tt_RU.php b/vendor/nesbot/carbon/src/Carbon/Lang/tt_RU.php deleted file mode 100644 index 38e42d0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tt_RU.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Rinat Norkin Pablo Saratxaga, Rinat Norkin pablo@mandrakesoft.com, rinat@taif.ru - */ -return [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'DD MMM, HH:mm', - 'LLLL' => 'DD MMMM YYYY, HH:mm', - ], - 'months' => ['января', 'февраля', 'марта', 'апреля', 'мая', 'июня', 'июля', 'августа', 'сентября', 'октября', 'ноября', 'декабря'], - 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], - 'weekdays' => ['якшәмбе', 'дышәмбе', 'сишәмбе', 'чәршәәмбе', 'пәнҗешмбе', 'җомга', 'шимбә'], - 'weekdays_short' => ['якш', 'дыш', 'сиш', 'чәрш', 'пәнҗ', 'җом', 'шим'], - 'weekdays_min' => ['якш', 'дыш', 'сиш', 'чәрш', 'пәнҗ', 'җом', 'шим'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'year' => ':count ел', - 'month' => ':count ай', - 'week' => ':count атна', - 'day' => ':count көн', - 'hour' => ':count сәгать', - 'minute' => ':count минут', - 'second' => ':count секунд', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tt_RU@iqtelif.php b/vendor/nesbot/carbon/src/Carbon/Lang/tt_RU@iqtelif.php deleted file mode 100644 index 16b8efb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tt_RU@iqtelif.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Reshat Sabiq tatar.iqtelif.i18n@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD.MM.YYYY', - ], - 'months' => ['Ğınwar', 'Fiwral\'', 'Mart', 'April', 'May', 'Yün', 'Yül', 'Awgust', 'Sintebír', 'Üktebír', 'Noyebír', 'Dikebír'], - 'months_short' => ['Ğın', 'Fiw', 'Mar', 'Apr', 'May', 'Yün', 'Yül', 'Awg', 'Sin', 'Ükt', 'Noy', 'Dik'], - 'weekdays' => ['Yekşembí', 'Düşembí', 'Sişembí', 'Çerşembí', 'Pencíşembí', 'Comğa', 'Şimbe'], - 'weekdays_short' => ['Yek', 'Düş', 'Siş', 'Çer', 'Pen', 'Com', 'Şim'], - 'weekdays_min' => ['Yek', 'Düş', 'Siş', 'Çer', 'Pen', 'Com', 'Şim'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ÖA', 'ÖS'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/twq.php b/vendor/nesbot/carbon/src/Carbon/Lang/twq.php deleted file mode 100644 index 5cbb46e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/twq.php +++ /dev/null @@ -1,14 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/ses.php', [ - 'meridiem' => ['Subbaahi', 'Zaarikay b'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tzl.php b/vendor/nesbot/carbon/src/Carbon/Lang/tzl.php deleted file mode 100644 index 50bf26d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tzl.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return [ - 'year' => '[0,1]:count ar|:count ars', - 'y' => '[0,1]:count ar|:count ars', - 'month' => '[0,1]:count mes|:count mesen', - 'm' => '[0,1]:count mes|:count mesen', - 'week' => '[0,1]:count seifetziua|:count seifetziuas', - 'w' => '[0,1]:count seifetziua|:count seifetziuas', - 'day' => '[0,1]:count ziua|:count ziuas', - 'd' => '[0,1]:count ziua|:count ziuas', - 'hour' => '[0,1]:count þora|:count þoras', - 'h' => '[0,1]:count þora|:count þoras', - 'minute' => '[0,1]:count míut|:count míuts', - 'min' => '[0,1]:count míut|:count míuts', - 'second' => ':count secunds', - 's' => ':count secunds', - - 'ago' => 'ja :time', - 'from_now' => 'osprei :time', - - 'diff_yesterday' => 'ieiri', - 'diff_yesterday_regexp' => 'ieiri(?:\\s+à)?', - 'diff_today' => 'oxhi', - 'diff_today_regexp' => 'oxhi(?:\\s+à)?', - 'diff_tomorrow' => 'demà', - 'diff_tomorrow_regexp' => 'demà(?:\\s+à)?', - - 'formats' => [ - 'LT' => 'HH.mm', - 'LTS' => 'HH.mm.ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D. MMMM [dallas] YYYY', - 'LLL' => 'D. MMMM [dallas] YYYY HH.mm', - 'LLLL' => 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', - ], - - 'calendar' => [ - 'sameDay' => '[oxhi à] LT', - 'nextDay' => '[demà à] LT', - 'nextWeek' => 'dddd [à] LT', - 'lastDay' => '[ieiri à] LT', - 'lastWeek' => '[sür el] dddd [lasteu à] LT', - 'sameElse' => 'L', - ], - - 'meridiem' => ["D'A", "D'O"], - 'months' => ['Januar', 'Fevraglh', 'Març', 'Avrïu', 'Mai', 'Gün', 'Julia', 'Guscht', 'Setemvar', 'Listopäts', 'Noemvar', 'Zecemvar'], - 'months_short' => ['Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Gün', 'Jul', 'Gus', 'Set', 'Lis', 'Noe', 'Zec'], - 'weekdays' => ['Súladi', 'Lúneçi', 'Maitzi', 'Márcuri', 'Xhúadi', 'Viénerçi', 'Sáturi'], - 'weekdays_short' => ['Súl', 'Lún', 'Mai', 'Már', 'Xhú', 'Vié', 'Sát'], - 'weekdays_min' => ['Sú', 'Lú', 'Ma', 'Má', 'Xh', 'Vi', 'Sá'], - 'ordinal' => ':number.', - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tzm.php b/vendor/nesbot/carbon/src/Carbon/Lang/tzm.php deleted file mode 100644 index 2a1a0f2..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tzm.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - JD Isaacks - */ -return [ - 'year' => '{1}ⴰⵙⴳⴰⵙ|:count ⵉⵙⴳⴰⵙⵏ', - 'month' => '{1}ⴰⵢoⵓⵔ|:count ⵉⵢⵢⵉⵔⵏ', - 'week' => ':count ⵉⵎⴰⵍⴰⵙⵙ', - 'day' => '{1}ⴰⵙⵙ|:count oⵙⵙⴰⵏ', - 'hour' => '{1}ⵙⴰⵄⴰ|:count ⵜⴰⵙⵙⴰⵄⵉⵏ', - 'minute' => '{1}ⵎⵉⵏⵓⴺ|:count ⵎⵉⵏⵓⴺ', - 'second' => '{1}ⵉⵎⵉⴽ|:count ⵉⵎⵉⴽ', - 'ago' => 'ⵢⴰⵏ :time', - 'from_now' => 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ :time', - 'diff_today' => 'ⴰⵙⴷⵅ', - 'diff_yesterday' => 'ⴰⵚⴰⵏⵜ', - 'diff_yesterday_regexp' => 'ⴰⵚⴰⵏⵜ(?:\\s+ⴴ)?', - 'diff_tomorrow' => 'ⴰⵙⴽⴰ', - 'diff_tomorrow_regexp' => 'ⴰⵙⴽⴰ(?:\\s+ⴴ)?', - 'diff_today_regexp' => 'ⴰⵙⴷⵅ(?:\\s+ⴴ)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[ⴰⵙⴷⵅ ⴴ] LT', - 'nextDay' => '[ⴰⵙⴽⴰ ⴴ] LT', - 'nextWeek' => 'dddd [ⴴ] LT', - 'lastDay' => '[ⴰⵚⴰⵏⵜ ⴴ] LT', - 'lastWeek' => 'dddd [ⴴ] LT', - 'sameElse' => 'L', - ], - 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⵏⴱⵉⵔ'], - 'months_short' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⵏⴱⵉⵔ'], - 'weekdays' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], - 'weekdays_short' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], - 'weekdays_min' => ['ⴰⵙⴰⵎⴰⵙ', 'ⴰⵢⵏⴰⵙ', 'ⴰⵙⵉⵏⴰⵙ', 'ⴰⴽⵔⴰⵙ', 'ⴰⴽⵡⴰⵙ', 'ⴰⵙⵉⵎⵡⴰⵙ', 'ⴰⵙⵉⴹⵢⴰⵙ'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, - 'weekend' => [5, 6], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tzm_Latn.php b/vendor/nesbot/carbon/src/Carbon/Lang/tzm_Latn.php deleted file mode 100644 index 5840d20..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tzm_Latn.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - JD Isaacks - */ -return [ - 'year' => '{1}:count asgas|:count isgasn', - 'a_year' => 'asgas|:count isgasn', - 'month' => '{1}:count ayowr|:count iyyirn', - 'a_month' => 'ayowr|:count iyyirn', - 'week' => ':count imalass', - 'a_week' => ':imalass', - 'day' => '{1}:count ass|:count ossan', - 'a_day' => 'ass|:count ossan', - 'hour' => '{1}:count saɛa|:count tassaɛin', - 'a_hour' => '{1}saɛa|:count tassaɛin', - 'minute' => ':count minuḍ', - 'a_minute' => '{1}minuḍ|:count minuḍ', - 'second' => ':count imik', - 'a_second' => '{1}imik|:count imik', - 'ago' => 'yan :time', - 'from_now' => 'dadkh s yan :time', - 'diff_yesterday' => 'assant', - 'diff_yesterday_regexp' => 'assant(?:\\s+g)?', - 'diff_today' => 'asdkh', - 'diff_today_regexp' => 'asdkh(?:\\s+g)?', - 'diff_tomorrow' => 'aska', - 'diff_tomorrow_regexp' => 'aska(?:\\s+g)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[asdkh g] LT', - 'nextDay' => '[aska g] LT', - 'nextWeek' => 'dddd [g] LT', - 'lastDay' => '[assant g] LT', - 'lastWeek' => 'dddd [g] LT', - 'sameElse' => 'L', - ], - 'months' => ['innayr', 'brˤayrˤ', 'marˤsˤ', 'ibrir', 'mayyw', 'ywnyw', 'ywlywz', 'ɣwšt', 'šwtanbir', 'ktˤwbrˤ', 'nwwanbir', 'dwjnbir'], - 'months_short' => ['innayr', 'brˤayrˤ', 'marˤsˤ', 'ibrir', 'mayyw', 'ywnyw', 'ywlywz', 'ɣwšt', 'šwtanbir', 'ktˤwbrˤ', 'nwwanbir', 'dwjnbir'], - 'weekdays' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], - 'weekdays_short' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], - 'weekdays_min' => ['asamas', 'aynas', 'asinas', 'akras', 'akwas', 'asimwas', 'asiḍyas'], - 'meridiem' => ['Zdat azal', 'Ḍeffir aza'], - 'first_day_of_week' => 6, - 'day_of_first_week_of_year' => 1, -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ug.php b/vendor/nesbot/carbon/src/Carbon/Lang/ug.php deleted file mode 100644 index 259b99a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ug.php +++ /dev/null @@ -1,90 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Philippe Vaucher - * - Tsutomu Kuroda - * - yasinn - */ -return [ - 'year' => '{1}'.'بىر يىل'.'|:count '.'يىل', - 'month' => '{1}'.'بىر ئاي'.'|:count '.'ئاي', - 'week' => '{1}'.'بىر ھەپتە'.'|:count '.'ھەپتە', - 'day' => '{1}'.'بىر كۈن'.'|:count '.'كۈن', - 'hour' => '{1}'.'بىر سائەت'.'|:count '.'سائەت', - 'minute' => '{1}'.'بىر مىنۇت'.'|:count '.'مىنۇت', - 'second' => '{1}'.'نەچچە سېكونت'.'|:count '.'سېكونت', - 'ago' => ':time بۇرۇن', - 'from_now' => ':time كېيىن', - 'diff_today' => 'بۈگۈن', - 'diff_yesterday' => 'تۆنۈگۈن', - 'diff_tomorrow' => 'ئەتە', - 'diff_tomorrow_regexp' => 'ئەتە(?:\\s+سائەت)?', - 'diff_today_regexp' => 'بۈگۈن(?:\\s+سائەت)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-DD', - 'LL' => 'YYYY-يىلىM-ئاينىڭD-كۈنى', - 'LLL' => 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', - 'LLLL' => 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[بۈگۈن سائەت] LT', - 'nextDay' => '[ئەتە سائەت] LT', - 'nextWeek' => '[كېلەركى] dddd [سائەت] LT', - 'lastDay' => '[تۆنۈگۈن] LT', - 'lastWeek' => '[ئالدىنقى] dddd [سائەت] LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'd': - case 'D': - case 'DDD': - return $number.'-كۈنى'; - case 'w': - case 'W': - return $number.'-ھەپتە'; - default: - return $number; - } - }, - 'meridiem' => function ($hour, $minute) { - $time = $hour * 100 + $minute; - if ($time < 600) { - return 'يېرىم كېچە'; - } - if ($time < 900) { - return 'سەھەر'; - } - if ($time < 1130) { - return 'چۈشتىن بۇرۇن'; - } - if ($time < 1230) { - return 'چۈش'; - } - if ($time < 1800) { - return 'چۈشتىن كېيىن'; - } - - return 'كەچ'; - }, - 'months' => ['يانۋار', 'فېۋرال', 'مارت', 'ئاپرېل', 'ماي', 'ئىيۇن', 'ئىيۇل', 'ئاۋغۇست', 'سېنتەبىر', 'ئۆكتەبىر', 'نويابىر', 'دېكابىر'], - 'months_short' => ['يانۋار', 'فېۋرال', 'مارت', 'ئاپرېل', 'ماي', 'ئىيۇن', 'ئىيۇل', 'ئاۋغۇست', 'سېنتەبىر', 'ئۆكتەبىر', 'نويابىر', 'دېكابىر'], - 'weekdays' => ['يەكشەنبە', 'دۈشەنبە', 'سەيشەنبە', 'چارشەنبە', 'پەيشەنبە', 'جۈمە', 'شەنبە'], - 'weekdays_short' => ['يە', 'دۈ', 'سە', 'چا', 'پە', 'جۈ', 'شە'], - 'weekdays_min' => ['يە', 'دۈ', 'سە', 'چا', 'پە', 'جۈ', 'شە'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' ۋە '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ug_CN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ug_CN.php deleted file mode 100644 index deb828c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ug_CN.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Kunal Marwaha - * - Alim Boyaq - */ -return require __DIR__.'/ug.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/vendor/nesbot/carbon/src/Carbon/Lang/uk.php deleted file mode 100644 index 4217d16..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uk.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Carbon\CarbonInterface; - -$processHoursFunction = function (CarbonInterface $date, string $format) { - return $format.'о'.($date->hour === 11 ? 'б' : '').'] LT'; -}; - -/* - * Authors: - * - Kunal Marwaha - * - Josh Soref - * - François B - * - Tim Fish - * - Serhan Apaydın - * - Max Mykhailenko - * - JD Isaacks - * - Max Kovpak - * - AucT - * - Philippe Vaucher - * - Ilya Shaplyko - * - Vadym Ievsieiev - * - Denys Kurets - * - Igor Kasyanchuk - * - Tsutomu Kuroda - * - tjku - * - Max Melentiev - * - Oleh - * - epaminond - * - Juanito Fatas - * - Vitalii Khustochka - * - Akira Matsuda - * - Christopher Dell - * - Enrique Vidal - * - Simone Carletti - * - Aaron Patterson - * - Andriy Tyurnikov - * - Nicolás Hock Isaza - * - Iwakura Taro - * - Andrii Ponomarov - * - alecrabbit - * - vystepanenko - * - AlexWalkerson - * - Andre Havryliuk (Andrend) - * - Max Datsenko (datsenko-md) - */ -return [ - 'year' => ':count рік|:count роки|:count років', - 'y' => ':countр|:countрр|:countрр', - 'a_year' => '{1}рік|:count рік|:count роки|:count років', - 'month' => ':count місяць|:count місяці|:count місяців', - 'm' => ':countм', - 'a_month' => '{1}місяць|:count місяць|:count місяці|:count місяців', - 'week' => ':count тиждень|:count тижні|:count тижнів', - 'w' => ':countт', - 'a_week' => '{1}тиждень|:count тиждень|:count тижні|:count тижнів', - 'day' => ':count день|:count дні|:count днів', - 'd' => ':countд', - 'a_day' => '{1}день|:count день|:count дні|:count днів', - 'hour' => ':count година|:count години|:count годин', - 'h' => ':countг', - 'a_hour' => '{1}година|:count година|:count години|:count годин', - 'minute' => ':count хвилина|:count хвилини|:count хвилин', - 'min' => ':countхв', - 'a_minute' => '{1}хвилина|:count хвилина|:count хвилини|:count хвилин', - 'second' => ':count секунда|:count секунди|:count секунд', - 's' => ':countсек', - 'a_second' => '{1}декілька секунд|:count секунда|:count секунди|:count секунд', - - 'hour_ago' => ':count годину|:count години|:count годин', - 'a_hour_ago' => '{1}годину|:count годину|:count години|:count годин', - 'minute_ago' => ':count хвилину|:count хвилини|:count хвилин', - 'a_minute_ago' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', - 'second_ago' => ':count секунду|:count секунди|:count секунд', - 'a_second_ago' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', - - 'hour_from_now' => ':count годину|:count години|:count годин', - 'a_hour_from_now' => '{1}годину|:count годину|:count години|:count годин', - 'minute_from_now' => ':count хвилину|:count хвилини|:count хвилин', - 'a_minute_from_now' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', - 'second_from_now' => ':count секунду|:count секунди|:count секунд', - 'a_second_from_now' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', - - 'hour_after' => ':count годину|:count години|:count годин', - 'a_hour_after' => '{1}годину|:count годину|:count години|:count годин', - 'minute_after' => ':count хвилину|:count хвилини|:count хвилин', - 'a_minute_after' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', - 'second_after' => ':count секунду|:count секунди|:count секунд', - 'a_second_after' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', - - 'hour_before' => ':count годину|:count години|:count годин', - 'a_hour_before' => '{1}годину|:count годину|:count години|:count годин', - 'minute_before' => ':count хвилину|:count хвилини|:count хвилин', - 'a_minute_before' => '{1}хвилину|:count хвилину|:count хвилини|:count хвилин', - 'second_before' => ':count секунду|:count секунди|:count секунд', - 'a_second_before' => '{1}декілька секунд|:count секунду|:count секунди|:count секунд', - - 'ago' => ':time тому', - 'from_now' => 'за :time', - 'after' => ':time після', - 'before' => ':time до', - 'diff_now' => 'щойно', - 'diff_today' => 'Сьогодні', - 'diff_today_regexp' => 'Сьогодні(?:\\s+о)?', - 'diff_yesterday' => 'вчора', - 'diff_yesterday_regexp' => 'Вчора(?:\\s+о)?', - 'diff_tomorrow' => 'завтра', - 'diff_tomorrow_regexp' => 'Завтра(?:\\s+о)?', - 'diff_before_yesterday' => 'позавчора', - 'diff_after_tomorrow' => 'післязавтра', - 'period_recurrences' => 'один раз|:count рази|:count разів', - 'period_interval' => 'кожні :interval', - 'period_start_date' => 'з :date', - 'period_end_date' => 'до :date', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY, HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY, HH:mm', - ], - 'calendar' => [ - 'sameDay' => function (CarbonInterface $date) use ($processHoursFunction) { - return $processHoursFunction($date, '[Сьогодні '); - }, - 'nextDay' => function (CarbonInterface $date) use ($processHoursFunction) { - return $processHoursFunction($date, '[Завтра '); - }, - 'nextWeek' => function (CarbonInterface $date) use ($processHoursFunction) { - return $processHoursFunction($date, '[У] dddd ['); - }, - 'lastDay' => function (CarbonInterface $date) use ($processHoursFunction) { - return $processHoursFunction($date, '[Вчора '); - }, - 'lastWeek' => function (CarbonInterface $date) use ($processHoursFunction) { - switch ($date->dayOfWeek) { - case 0: - case 3: - case 5: - case 6: - return $processHoursFunction($date, '[Минулої] dddd ['); - default: - return $processHoursFunction($date, '[Минулого] dddd ['); - } - }, - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'M': - case 'd': - case 'DDD': - case 'w': - case 'W': - return $number.'-й'; - case 'D': - return $number.'-го'; - default: - return $number; - } - }, - 'meridiem' => function ($hour) { - if ($hour < 4) { - return 'ночі'; - } - if ($hour < 12) { - return 'ранку'; - } - if ($hour < 17) { - return 'дня'; - } - - return 'вечора'; - }, - 'months' => ['січня', 'лютого', 'березня', 'квітня', 'травня', 'червня', 'липня', 'серпня', 'вересня', 'жовтня', 'листопада', 'грудня'], - 'months_standalone' => ['січень', 'лютий', 'березень', 'квітень', 'травень', 'червень', 'липень', 'серпень', 'вересень', 'жовтень', 'листопад', 'грудень'], - 'months_short' => ['січ', 'лют', 'бер', 'кві', 'тра', 'чер', 'лип', 'сер', 'вер', 'жов', 'лис', 'гру'], - 'months_regexp' => '/(D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|L{2,4}|l{2,4})/', - 'weekdays' => function (CarbonInterface $date, $format, $index) { - static $words = [ - 'nominative' => ['неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п’ятниця', 'субота'], - 'accusative' => ['неділю', 'понеділок', 'вівторок', 'середу', 'четвер', 'п’ятницю', 'суботу'], - 'genitive' => ['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи'], - ]; - - $format = $format ?? ''; - $nounCase = preg_match('/(\[(В|в|У|у)\])\s+dddd/u', $format) - ? 'accusative' - : ( - preg_match('/\[?(?:минулої|наступної)?\s*\]\s+dddd/u', $format) - ? 'genitive' - : 'nominative' - ); - - return $words[$nounCase][$index] ?? null; - }, - 'weekdays_short' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], - 'weekdays_min' => ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' i '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uk_UA.php b/vendor/nesbot/carbon/src/Carbon/Lang/uk_UA.php deleted file mode 100644 index bd11d86..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uk_UA.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/uk.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/unm.php b/vendor/nesbot/carbon/src/Carbon/Lang/unm.php deleted file mode 100644 index d3f19f0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/unm.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/unm_US.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/unm_US.php b/vendor/nesbot/carbon/src/Carbon/Lang/unm_US.php deleted file mode 100644 index fa5c374..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/unm_US.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['enikwsi', 'chkwali', 'xamokhwite', 'kwetayoxe', 'tainipen', 'kichinipen', 'lainipen', 'winaminke', 'kichitahkok', 'puksit', 'wini', 'muxkotae'], - 'months_short' => ['eni', 'chk', 'xam', 'kwe', 'tai', 'nip', 'lai', 'win', 'tah', 'puk', 'kun', 'mux'], - 'weekdays' => ['kentuwei', 'manteke', 'tusteke', 'lelai', 'tasteke', 'pelaiteke', 'sateteke'], - 'weekdays_short' => ['ken', 'man', 'tus', 'lel', 'tas', 'pel', 'sat'], - 'weekdays_min' => ['ken', 'man', 'tus', 'lel', 'tas', 'pel', 'sat'], - 'day_of_first_week_of_year' => 1, - - // Too unreliable - /* - 'year' => ':count kaxtëne', - 'y' => ':count kaxtëne', - 'a_year' => ':count kaxtëne', - - 'month' => ':count piskewëni kishux', // less reliable - 'm' => ':count piskewëni kishux', // less reliable - 'a_month' => ':count piskewëni kishux', // less reliable - - 'week' => ':count kishku', // less reliable - 'w' => ':count kishku', // less reliable - 'a_week' => ':count kishku', // less reliable - - 'day' => ':count kishku', - 'd' => ':count kishku', - 'a_day' => ':count kishku', - - 'hour' => ':count xkuk', // less reliable - 'h' => ':count xkuk', // less reliable - 'a_hour' => ':count xkuk', // less reliable - - 'minute' => ':count txituwàk', // less reliable - 'min' => ':count txituwàk', // less reliable - 'a_minute' => ':count txituwàk', // less reliable - - 'second' => ':count nisha', // less reliable - 's' => ':count nisha', // less reliable - 'a_second' => ':count nisha', // less reliable - */ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ur.php b/vendor/nesbot/carbon/src/Carbon/Lang/ur.php deleted file mode 100644 index dc16c2c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ur.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -$months = [ - 'جنوری', - 'فروری', - 'مارچ', - 'اپریل', - 'مئی', - 'جون', - 'جولائی', - 'اگست', - 'ستمبر', - 'اکتوبر', - 'نومبر', - 'دسمبر', -]; - -$weekdays = [ - 'اتوار', - 'پیر', - 'منگل', - 'بدھ', - 'جمعرات', - 'جمعہ', - 'ہفتہ', -]; - -/* - * Authors: - * - Sawood Alam - * - Mehshan - * - Philippe Vaucher - * - Tsutomu Kuroda - * - tjku - * - Zaid Akram - * - Max Melentiev - * - hafezdivandari - * - Hossein Jabbari - * - nimamo - */ -return [ - 'year' => 'ایک سال|:count سال', - 'month' => 'ایک ماہ|:count ماہ', - 'week' => ':count ہفتے', - 'day' => 'ایک دن|:count دن', - 'hour' => 'ایک گھنٹہ|:count گھنٹے', - 'minute' => 'ایک منٹ|:count منٹ', - 'second' => 'چند سیکنڈ|:count سیکنڈ', - 'ago' => ':time قبل', - 'from_now' => ':time بعد', - 'after' => ':time بعد', - 'before' => ':time پہلے', - 'diff_now' => 'اب', - 'diff_today' => 'آج', - 'diff_today_regexp' => 'آج(?:\\s+بوقت)?', - 'diff_yesterday' => 'گزشتہ کل', - 'diff_yesterday_regexp' => 'گذشتہ(?:\\s+روز)?(?:\\s+بوقت)?', - 'diff_tomorrow' => 'آئندہ کل', - 'diff_tomorrow_regexp' => 'کل(?:\\s+بوقت)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd، D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[آج بوقت] LT', - 'nextDay' => '[کل بوقت] LT', - 'nextWeek' => 'dddd [بوقت] LT', - 'lastDay' => '[گذشتہ روز بوقت] LT', - 'lastWeek' => '[گذشتہ] dddd [بوقت] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['صبح', 'شام'], - 'months' => $months, - 'months_short' => $months, - 'weekdays' => $weekdays, - 'weekdays_short' => $weekdays, - 'weekdays_min' => $weekdays, - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => ['، ', ' اور '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ur_IN.php b/vendor/nesbot/carbon/src/Carbon/Lang/ur_IN.php deleted file mode 100644 index f81c84d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ur_IN.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Red Hat, Pune bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/ur.php', [ - 'formats' => [ - 'L' => 'D/M/YY', - ], - 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'weekdays' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], - 'weekdays_short' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], - 'weekdays_min' => ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'سنیچر'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ur_PK.php b/vendor/nesbot/carbon/src/Carbon/Lang/ur_PK.php deleted file mode 100644 index 8cd593d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ur_PK.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/ur.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'months_short' => ['جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'weekdays' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], - 'weekdays_short' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], - 'weekdays_min' => ['اتوار', 'پير', 'منگل', 'بدھ', 'جمعرات', 'جمعه', 'هفته'], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ص', 'ش'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uz.php b/vendor/nesbot/carbon/src/Carbon/Lang/uz.php deleted file mode 100644 index 61f3b64..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uz.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Dmitriy Shabanov - * - JD Isaacks - * - Inoyatulloh - * - Jamshid - * - aarkhipov - * - Philippe Vaucher - * - felixthemagnificent - * - Tsutomu Kuroda - * - tjku - * - Max Melentiev - * - Juanito Fatas - * - Alisher Ulugbekov - * - Ergashev Adizbek - */ -return [ - 'year' => ':count йил', - 'a_year' => '{1}бир йил|:count йил', - 'y' => ':count й', - 'month' => ':count ой', - 'a_month' => '{1}бир ой|:count ой', - 'm' => ':count о', - 'week' => ':count ҳафта', - 'a_week' => '{1}бир ҳафта|:count ҳафта', - 'w' => ':count ҳ', - 'day' => ':count кун', - 'a_day' => '{1}бир кун|:count кун', - 'd' => ':count к', - 'hour' => ':count соат', - 'a_hour' => '{1}бир соат|:count соат', - 'h' => ':count с', - 'minute' => ':count дақиқа', - 'a_minute' => '{1}бир дақиқа|:count дақиқа', - 'min' => ':count д', - 'second' => ':count сония', - 'a_second' => '{1}сония|:count сония', - 's' => ':count с', - 'ago' => ':time аввал', - 'from_now' => 'Якин :time ичида', - 'after' => ':timeдан кейин', - 'before' => ':time олдин', - 'diff_now' => 'ҳозир', - 'diff_today' => 'Бугун', - 'diff_today_regexp' => 'Бугун(?:\\s+соат)?', - 'diff_yesterday' => 'Кеча', - 'diff_yesterday_regexp' => 'Кеча(?:\\s+соат)?', - 'diff_tomorrow' => 'Эртага', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'D MMMM YYYY, dddd HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Бугун соат] LT [да]', - 'nextDay' => '[Эртага] LT [да]', - 'nextWeek' => 'dddd [куни соат] LT [да]', - 'lastDay' => '[Кеча соат] LT [да]', - 'lastWeek' => '[Утган] dddd [куни соат] LT [да]', - 'sameElse' => 'L', - ], - 'months' => ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'], - 'months_short' => ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'], - 'weekdays' => ['якшанба', 'душанба', 'сешанба', 'чоршанба', 'пайшанба', 'жума', 'шанба'], - 'weekdays_short' => ['якш', 'душ', 'сеш', 'чор', 'пай', 'жум', 'шан'], - 'weekdays_min' => ['як', 'ду', 'се', 'чо', 'па', 'жу', 'ша'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['эрталаб', 'кечаси'], - 'list' => [', ', ' ва '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uz_Arab.php b/vendor/nesbot/carbon/src/Carbon/Lang/uz_Arab.php deleted file mode 100644 index ffb5131..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uz_Arab.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/fa.php', [ - 'weekdays' => ['یکشنبه', 'دوشنبه', 'سه‌شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'], - 'weekdays_short' => ['ی.', 'د.', 'س.', 'چ.', 'پ.', 'ج.', 'ش.'], - 'weekdays_min' => ['ی.', 'د.', 'س.', 'چ.', 'پ.', 'ج.', 'ش.'], - 'months' => ['جنوری', 'فبروری', 'مارچ', 'اپریل', 'می', 'جون', 'جولای', 'اگست', 'سپتمبر', 'اکتوبر', 'نومبر', 'دسمبر'], - 'months_short' => ['جنو', 'فبر', 'مار', 'اپر', 'می', 'جون', 'جول', 'اگس', 'سپت', 'اکت', 'نوم', 'دسم'], - 'first_day_of_week' => 6, - 'weekend' => [4, 5], - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-dd', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D HH:mm', - 'LLLL' => 'YYYY MMMM D, dddd HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uz_Cyrl.php b/vendor/nesbot/carbon/src/Carbon/Lang/uz_Cyrl.php deleted file mode 100644 index 89e9971..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uz_Cyrl.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/uz.php', [ - 'formats' => [ - 'L' => 'DD/MM/yy', - 'LL' => 'D MMM, YYYY', - 'LLL' => 'D MMMM, YYYY HH:mm', - 'LLLL' => 'dddd, DD MMMM, YYYY HH:mm', - ], - 'meridiem' => ['ТО', 'ТК'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uz_Latn.php b/vendor/nesbot/carbon/src/Carbon/Lang/uz_Latn.php deleted file mode 100644 index ecceeaa..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uz_Latn.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Josh Soref - * - Rasulbek - * - Ilyosjon Kamoldinov (ilyosjon09) - */ -return [ - 'year' => ':count yil', - 'a_year' => '{1}bir yil|:count yil', - 'y' => ':count y', - 'month' => ':count oy', - 'a_month' => '{1}bir oy|:count oy', - 'm' => ':count o', - 'week' => ':count hafta', - 'a_week' => '{1}bir hafta|:count hafta', - 'w' => ':count h', - 'day' => ':count kun', - 'a_day' => '{1}bir kun|:count kun', - 'd' => ':count k', - 'hour' => ':count soat', - 'a_hour' => '{1}bir soat|:count soat', - 'h' => ':count soat', - 'minute' => ':count daqiqa', - 'a_minute' => '{1}bir daqiqa|:count daqiqa', - 'min' => ':count d', - 'second' => ':count soniya', - 'a_second' => '{1}soniya|:count soniya', - 's' => ':count son.', - 'ago' => ':time avval', - 'from_now' => 'Yaqin :time ichida', - 'after' => ':timedan keyin', - 'before' => ':time oldin', - 'diff_yesterday' => 'Kecha', - 'diff_yesterday_regexp' => 'Kecha(?:\\s+soat)?', - 'diff_today' => 'Bugun', - 'diff_today_regexp' => 'Bugun(?:\\s+soat)?', - 'diff_tomorrow' => 'Ertaga', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'D MMMM YYYY, dddd HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Bugun soat] LT [da]', - 'nextDay' => '[Ertaga] LT [da]', - 'nextWeek' => 'dddd [kuni soat] LT [da]', - 'lastDay' => '[Kecha soat] LT [da]', - 'lastWeek' => '[O\'tgan] dddd [kuni soat] LT [da]', - 'sameElse' => 'L', - ], - 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'Iyun', 'Iyul', 'Avgust', 'Sentabr', 'Oktabr', 'Noyabr', 'Dekabr'], - 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'Iyun', 'Iyul', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], - 'weekdays' => ['Yakshanba', 'Dushanba', 'Seshanba', 'Chorshanba', 'Payshanba', 'Juma', 'Shanba'], - 'weekdays_short' => ['Yak', 'Dush', 'Sesh', 'Chor', 'Pay', 'Jum', 'Shan'], - 'weekdays_min' => ['Ya', 'Du', 'Se', 'Cho', 'Pa', 'Ju', 'Sha'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' va '], - 'meridiem' => ['TO', 'TK'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uz_UZ.php b/vendor/nesbot/carbon/src/Carbon/Lang/uz_UZ.php deleted file mode 100644 index d41bfee..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uz_UZ.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Bobir Ismailov Bobir Ismailov, Pablo Saratxaga, Mashrab Kuvatov bobir_is@yahoo.com, pablo@mandrakesoft.com, kmashrab@uni-bremen.de - */ -return array_replace_recursive(require __DIR__.'/uz_Latn.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Yanvar', 'Fevral', 'Mart', 'Aprel', 'May', 'Iyun', 'Iyul', 'Avgust', 'Sentabr', 'Oktabr', 'Noyabr', 'Dekabr'], - 'months_short' => ['Yan', 'Fev', 'Mar', 'Apr', 'May', 'Iyn', 'Iyl', 'Avg', 'Sen', 'Okt', 'Noy', 'Dek'], - 'weekdays' => ['Yakshanba', 'Dushanba', 'Seshanba', 'Chorshanba', 'Payshanba', 'Juma', 'Shanba'], - 'weekdays_short' => ['Yak', 'Du', 'Se', 'Cho', 'Pay', 'Ju', 'Sha'], - 'weekdays_min' => ['Yak', 'Du', 'Se', 'Cho', 'Pay', 'Ju', 'Sha'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uz_UZ@cyrillic.php b/vendor/nesbot/carbon/src/Carbon/Lang/uz_UZ@cyrillic.php deleted file mode 100644 index 2fa967c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uz_UZ@cyrillic.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Mashrab Kuvatov Mashrab Kuvatov, Pablo Saratxaga kmashrab@uni-bremen.de, pablo@mandrakesoft.com - */ -return array_replace_recursive(require __DIR__.'/uz.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['Январ', 'Феврал', 'Март', 'Апрел', 'Май', 'Июн', 'Июл', 'Август', 'Сентябр', 'Октябр', 'Ноябр', 'Декабр'], - 'months_short' => ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], - 'weekdays' => ['Якшанба', 'Душанба', 'Сешанба', 'Чоршанба', 'Пайшанба', 'Жума', 'Шанба'], - 'weekdays_short' => ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'], - 'weekdays_min' => ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vai.php b/vendor/nesbot/carbon/src/Carbon/Lang/vai.php deleted file mode 100644 index 3c378df..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/vai.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], - 'weekdays_short' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], - 'weekdays_min' => ['ꕞꕌꔵ', 'ꗳꗡꘉ', 'ꕚꕞꕚ', 'ꕉꕞꕒ', 'ꕉꔤꕆꕢ', 'ꕉꔤꕀꕮ', 'ꔻꔬꔳ'], - 'months' => ['ꖨꖕ ꕪꕴ ꔞꔀꕮꕊ', 'ꕒꕡꖝꖕ', 'ꕾꖺ', 'ꖢꖕ', 'ꖑꕱ', 'ꖱꘋ', 'ꖱꕞꔤ', 'ꗛꔕ', 'ꕢꕌ', 'ꕭꖃ', 'ꔞꘋꕔꕿ ꕸꖃꗏ', 'ꖨꖕ ꕪꕴ ꗏꖺꕮꕊ'], - 'months_short' => ['ꖨꖕꔞ', 'ꕒꕡ', 'ꕾꖺ', 'ꖢꖕ', 'ꖑꕱ', 'ꖱꘋ', 'ꖱꕞ', 'ꗛꔕ', 'ꕢꕌ', 'ꕭꖃ', 'ꔞꘋ', 'ꖨꖕꗏ'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd, D MMMM YYYY h:mm a', - ], - - 'year' => ':count ꕀ', // less reliable - 'y' => ':count ꕀ', // less reliable - 'a_year' => ':count ꕀ', // less reliable - - 'second' => ':count ꗱꕞꕯꕊ', // less reliable - 's' => ':count ꗱꕞꕯꕊ', // less reliable - 'a_second' => ':count ꗱꕞꕯꕊ', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vai_Latn.php b/vendor/nesbot/carbon/src/Carbon/Lang/vai_Latn.php deleted file mode 100644 index 51e83cc..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/vai_Latn.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'weekdays' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], - 'weekdays_short' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], - 'weekdays_min' => ['lahadi', 'tɛɛnɛɛ', 'talata', 'alaba', 'aimisa', 'aijima', 'siɓiti'], - 'months' => ['luukao kemã', 'ɓandaɓu', 'vɔɔ', 'fulu', 'goo', '6', '7', 'kɔnde', 'saah', 'galo', 'kenpkato ɓololɔ', 'luukao lɔma'], - 'months_short' => ['luukao kemã', 'ɓandaɓu', 'vɔɔ', 'fulu', 'goo', '6', '7', 'kɔnde', 'saah', 'galo', 'kenpkato ɓololɔ', 'luukao lɔma'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'h:mm a', - 'LTS' => 'h:mm:ss a', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm a', - 'LLLL' => 'dddd, D MMMM YYYY h:mm a', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vai_Vaii.php b/vendor/nesbot/carbon/src/Carbon/Lang/vai_Vaii.php deleted file mode 100644 index b4bb533..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/vai_Vaii.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/vai.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ve.php b/vendor/nesbot/carbon/src/Carbon/Lang/ve.php deleted file mode 100644 index 7f10aeb..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ve.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/ve_ZA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ve_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/ve_ZA.php deleted file mode 100644 index 5eb2b91..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ve_ZA.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Phando', 'Luhuhi', 'Ṱhafamuhwe', 'Lambamai', 'Shundunthule', 'Fulwi', 'Fulwana', 'Ṱhangule', 'Khubvumedzi', 'Tshimedzi', 'Ḽara', 'Nyendavhusiku'], - 'months_short' => ['Pha', 'Luh', 'Fam', 'Lam', 'Shu', 'Lwi', 'Lwa', 'Ngu', 'Khu', 'Tsh', 'Ḽar', 'Nye'], - 'weekdays' => ['Swondaha', 'Musumbuluwo', 'Ḽavhuvhili', 'Ḽavhuraru', 'Ḽavhuṋa', 'Ḽavhuṱanu', 'Mugivhela'], - 'weekdays_short' => ['Swo', 'Mus', 'Vhi', 'Rar', 'ṋa', 'Ṱan', 'Mug'], - 'weekdays_min' => ['Swo', 'Mus', 'Vhi', 'Rar', 'ṋa', 'Ṱan', 'Mug'], - 'day_of_first_week_of_year' => 1, - - // Too unreliable - /* - 'day' => ':count vhege', // less reliable - 'd' => ':count vhege', // less reliable - 'a_day' => ':count vhege', // less reliable - - 'hour' => ':count watshi', // less reliable - 'h' => ':count watshi', // less reliable - 'a_hour' => ':count watshi', // less reliable - - 'minute' => ':count watshi', // less reliable - 'min' => ':count watshi', // less reliable - 'a_minute' => ':count watshi', // less reliable - - 'second' => ':count Mu', // less reliable - 's' => ':count Mu', // less reliable - 'a_second' => ':count Mu', // less reliable - - 'week' => ':count vhege', - 'w' => ':count vhege', - 'a_week' => ':count vhege', - */ -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vi.php b/vendor/nesbot/carbon/src/Carbon/Lang/vi.php deleted file mode 100644 index 73e2852..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/vi.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Andre Polykanine A.K.A. Menelion Elensúlë - * - JD Isaacks - */ -return [ - 'year' => ':count năm', - 'a_year' => '{1}một năm|]1, Inf[:count năm', - 'y' => ':count năm', - 'month' => ':count tháng', - 'a_month' => '{1}một tháng|]1, Inf[:count tháng', - 'm' => ':count tháng', - 'week' => ':count tuần', - 'a_week' => '{1}một tuần|]1, Inf[:count tuần', - 'w' => ':count tuần', - 'day' => ':count ngày', - 'a_day' => '{1}một ngày|]1, Inf[:count ngày', - 'd' => ':count ngày', - 'hour' => ':count giờ', - 'a_hour' => '{1}một giờ|]1, Inf[:count giờ', - 'h' => ':count giờ', - 'minute' => ':count phút', - 'a_minute' => '{1}một phút|]1, Inf[:count phút', - 'min' => ':count phút', - 'second' => ':count giây', - 'a_second' => '{1}vài giây|]1, Inf[:count giây', - 's' => ':count giây', - 'ago' => ':time trước', - 'from_now' => ':time tới', - 'after' => ':time sau', - 'before' => ':time trước', - 'diff_now' => 'bây giờ', - 'diff_today' => 'Hôm', - 'diff_today_regexp' => 'Hôm(?:\\s+nay)?(?:\\s+lúc)?', - 'diff_yesterday' => 'Hôm qua', - 'diff_yesterday_regexp' => 'Hôm(?:\\s+qua)?(?:\\s+lúc)?', - 'diff_tomorrow' => 'Ngày mai', - 'diff_tomorrow_regexp' => 'Ngày(?:\\s+mai)?(?:\\s+lúc)?', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM [năm] YYYY', - 'LLL' => 'D MMMM [năm] YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM [năm] YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[Hôm nay lúc] LT', - 'nextDay' => '[Ngày mai lúc] LT', - 'nextWeek' => 'dddd [tuần tới lúc] LT', - 'lastDay' => '[Hôm qua lúc] LT', - 'lastWeek' => 'dddd [tuần trước lúc] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['SA', 'CH'], - 'months' => ['tháng 1', 'tháng 2', 'tháng 3', 'tháng 4', 'tháng 5', 'tháng 6', 'tháng 7', 'tháng 8', 'tháng 9', 'tháng 10', 'tháng 11', 'tháng 12'], - 'months_short' => ['Th01', 'Th02', 'Th03', 'Th04', 'Th05', 'Th06', 'Th07', 'Th08', 'Th09', 'Th10', 'Th11', 'Th12'], - 'weekdays' => ['chủ nhật', 'thứ hai', 'thứ ba', 'thứ tư', 'thứ năm', 'thứ sáu', 'thứ bảy'], - 'weekdays_short' => ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], - 'weekdays_min' => ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => [', ', ' và '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vi_VN.php b/vendor/nesbot/carbon/src/Carbon/Lang/vi_VN.php deleted file mode 100644 index 18d8987..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/vi_VN.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/vi.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vo.php b/vendor/nesbot/carbon/src/Carbon/Lang/vo.php deleted file mode 100644 index e273033..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/vo.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'months' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], - 'months_short' => ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY-MM-dd', - 'LL' => 'YYYY MMM D', - 'LLL' => 'YYYY MMMM D HH:mm', - 'LLLL' => 'YYYY MMMM D, dddd HH:mm', - ], - - 'year' => ':count yel', - 'y' => ':count yel', - 'a_year' => ':count yel', - - 'month' => ':count mul', - 'm' => ':count mul', - 'a_month' => ':count mul', - - 'week' => ':count vig', - 'w' => ':count vig', - 'a_week' => ':count vig', - - 'day' => ':count del', - 'd' => ':count del', - 'a_day' => ':count del', - - 'hour' => ':count düp', - 'h' => ':count düp', - 'a_hour' => ':count düp', - - 'minute' => ':count minut', - 'min' => ':count minut', - 'a_minute' => ':count minut', - - 'second' => ':count sekun', - 's' => ':count sekun', - 'a_second' => ':count sekun', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vun.php b/vendor/nesbot/carbon/src/Carbon/Lang/vun.php deleted file mode 100644 index ed92e8e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/vun.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['utuko', 'kyiukonyi'], - 'weekdays' => ['Jumapilyi', 'Jumatatuu', 'Jumanne', 'Jumatanu', 'Alhamisi', 'Ijumaa', 'Jumamosi'], - 'weekdays_short' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'weekdays_min' => ['Jpi', 'Jtt', 'Jnn', 'Jtn', 'Alh', 'Iju', 'Jmo'], - 'months' => ['Januari', 'Februari', 'Machi', 'Aprilyi', 'Mei', 'Junyi', 'Julyai', 'Agusti', 'Septemba', 'Oktoba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mac', 'Apr', 'Mei', 'Jun', 'Jul', 'Ago', 'Sep', 'Okt', 'Nov', 'Des'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/wa.php b/vendor/nesbot/carbon/src/Carbon/Lang/wa.php deleted file mode 100644 index f6dc4cc..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/wa.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/wa_BE.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/wa_BE.php b/vendor/nesbot/carbon/src/Carbon/Lang/wa_BE.php deleted file mode 100644 index a76d80d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/wa_BE.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Djan SACRE Pablo Saratxaga pablo@mandrakesoft.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['di djanvî', 'di fevrî', 'di måss', 'd’ avri', 'di may', 'di djun', 'di djulete', 'd’ awousse', 'di setimbe', 'd’ octôbe', 'di nôvimbe', 'di decimbe'], - 'months_short' => ['dja', 'fev', 'mås', 'avr', 'may', 'djn', 'djl', 'awo', 'set', 'oct', 'nôv', 'dec'], - 'weekdays' => ['dimegne', 'londi', 'mårdi', 'mierkidi', 'djudi', 'vénrdi', 'semdi'], - 'weekdays_short' => ['dim', 'lon', 'mår', 'mie', 'dju', 'vén', 'sem'], - 'weekdays_min' => ['dim', 'lon', 'mår', 'mie', 'dju', 'vén', 'sem'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'year' => ':count anêye', - 'y' => ':count anêye', - 'a_year' => ':count anêye', - - 'month' => ':count meûs', - 'm' => ':count meûs', - 'a_month' => ':count meûs', - - 'week' => ':count samwinne', - 'w' => ':count samwinne', - 'a_week' => ':count samwinne', - - 'day' => ':count djoû', - 'd' => ':count djoû', - 'a_day' => ':count djoû', - - 'hour' => ':count eure', - 'h' => ':count eure', - 'a_hour' => ':count eure', - - 'minute' => ':count munute', - 'min' => ':count munute', - 'a_minute' => ':count munute', - - 'second' => ':count Sigonde', - 's' => ':count Sigonde', - 'a_second' => ':count Sigonde', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/wae.php b/vendor/nesbot/carbon/src/Carbon/Lang/wae.php deleted file mode 100644 index bf57f23..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/wae.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/wae_CH.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/wae_CH.php b/vendor/nesbot/carbon/src/Carbon/Lang/wae_CH.php deleted file mode 100644 index 2af50b4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/wae_CH.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Walser Translation Team ml@translate-wae.ch - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-DD', - ], - 'months' => ['Jenner', 'Hornig', 'Märze', 'Abrille', 'Meije', 'Bráčet', 'Heiwet', 'Öigšte', 'Herbštmánet', 'Wímánet', 'Wintermánet', 'Chrištmánet'], - 'months_short' => ['Jen', 'Hor', 'Mär', 'Abr', 'Mei', 'Brá', 'Hei', 'Öig', 'Her', 'Wím', 'Win', 'Chr'], - 'weekdays' => ['Suntag', 'Mäntag', 'Zischtag', 'Mittwuch', 'Frontag', 'Fritag', 'Samschtag'], - 'weekdays_short' => ['Sun', 'Män', 'Zis', 'Mit', 'Fro', 'Fri', 'Sam'], - 'weekdays_min' => ['Sun', 'Män', 'Zis', 'Mit', 'Fro', 'Fri', 'Sam'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - - 'month' => ':count Maano', // less reliable - 'm' => ':count Maano', // less reliable - 'a_month' => ':count Maano', // less reliable -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/wal.php b/vendor/nesbot/carbon/src/Carbon/Lang/wal.php deleted file mode 100644 index e8ec40f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/wal.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/wal_ET.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/wal_ET.php b/vendor/nesbot/carbon/src/Carbon/Lang/wal_ET.php deleted file mode 100644 index a4e619a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/wal_ET.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Ge'ez Frontier Foundation locales@geez.org - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['ጃንዩወሪ', 'ፌብሩወሪ', 'ማርች', 'ኤፕረል', 'ሜይ', 'ጁን', 'ጁላይ', 'ኦገስት', 'ሴፕቴምበር', 'ኦክተውበር', 'ኖቬምበር', 'ዲሴምበር'], - 'months_short' => ['ጃንዩ', 'ፌብሩ', 'ማርች', 'ኤፕረ', 'ሜይ ', 'ጁን ', 'ጁላይ', 'ኦገስ', 'ሴፕቴ', 'ኦክተ', 'ኖቬም', 'ዲሴም'], - 'weekdays' => ['ወጋ', 'ሳይኖ', 'ማቆሳኛ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ'], - 'weekdays_short' => ['ወጋ ', 'ሳይኖ', 'ማቆሳ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ '], - 'weekdays_min' => ['ወጋ ', 'ሳይኖ', 'ማቆሳ', 'አሩዋ', 'ሃሙሳ', 'አርባ', 'ቄራ '], - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['ማለዶ', 'ቃማ'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/wo.php b/vendor/nesbot/carbon/src/Carbon/Lang/wo.php deleted file mode 100644 index 74b95df..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/wo.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/wo_SN.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/wo_SN.php b/vendor/nesbot/carbon/src/Carbon/Lang/wo_SN.php deleted file mode 100644 index f8a85b3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/wo_SN.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - The Debian Project Christian Perrier bubulle@debian.org - */ -return [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD.MM.YYYY', - 'LL' => 'MMMM DD, YYYY', - 'LLL' => 'DD MMM HH:mm', - 'LLLL' => 'MMMM DD, YYYY HH:mm', - ], - 'months' => ['sanwiy\'e', 'feebriy\'e', 'mars', 'awril', 'me', 'suwen', 'sulet', 'uut', 'septaambar', 'oktoobar', 'nowaambar', 'desaambar'], - 'months_short' => ['san', 'fee', 'mar', 'awr', 'me ', 'suw', 'sul', 'uut', 'sep', 'okt', 'now', 'des'], - 'weekdays' => ['dib\'eer', 'altine', 'talaata', 'allarba', 'alxames', 'ajjuma', 'gaawu'], - 'weekdays_short' => ['dib', 'alt', 'tal', 'all', 'alx', 'ajj', 'gaa'], - 'weekdays_min' => ['dib', 'alt', 'tal', 'all', 'alx', 'ajj', 'gaa'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'year' => ':count at', - 'month' => ':count wèr', - 'week' => ':count ayubés', - 'day' => ':count bés', - 'hour' => ':count waxtu', - 'minute' => ':count simili', - 'second' => ':count saa', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/xh.php b/vendor/nesbot/carbon/src/Carbon/Lang/xh.php deleted file mode 100644 index e88c78d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/xh.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/xh_ZA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/xh_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/xh_ZA.php deleted file mode 100644 index 910f831..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/xh_ZA.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['eyoMqungu', 'eyoMdumba', 'eyoKwindla', 'uTshazimpuzi', 'uCanzibe', 'eyeSilimela', 'eyeKhala', 'eyeThupa', 'eyoMsintsi', 'eyeDwarha', 'eyeNkanga', 'eyoMnga'], - 'months_short' => ['Mqu', 'Mdu', 'Kwi', 'Tsh', 'Can', 'Sil', 'Kha', 'Thu', 'Msi', 'Dwa', 'Nka', 'Mng'], - 'weekdays' => ['iCawa', 'uMvulo', 'lwesiBini', 'lwesiThathu', 'ulweSine', 'lwesiHlanu', 'uMgqibelo'], - 'weekdays_short' => ['Caw', 'Mvu', 'Bin', 'Tha', 'Sin', 'Hla', 'Mgq'], - 'weekdays_min' => ['Caw', 'Mvu', 'Bin', 'Tha', 'Sin', 'Hla', 'Mgq'], - 'day_of_first_week_of_year' => 1, - - 'year' => ':count ihlobo', // less reliable - 'y' => ':count ihlobo', // less reliable - 'a_year' => ':count ihlobo', // less reliable - - 'hour' => ':count iwotshi', // less reliable - 'h' => ':count iwotshi', // less reliable - 'a_hour' => ':count iwotshi', // less reliable - - 'minute' => ':count ingqalelo', // less reliable - 'min' => ':count ingqalelo', // less reliable - 'a_minute' => ':count ingqalelo', // less reliable - - 'second' => ':count nceda', // less reliable - 's' => ':count nceda', // less reliable - 'a_second' => ':count nceda', // less reliable - - 'month' => ':count inyanga', - 'm' => ':count inyanga', - 'a_month' => ':count inyanga', - - 'week' => ':count veki', - 'w' => ':count veki', - 'a_week' => ':count veki', - - 'day' => ':count imini', - 'd' => ':count imini', - 'a_day' => ':count imini', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/xog.php b/vendor/nesbot/carbon/src/Carbon/Lang/xog.php deleted file mode 100644 index eb55b4a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/xog.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['Munkyo', 'Eigulo'], - 'weekdays' => ['Sabiiti', 'Balaza', 'Owokubili', 'Owokusatu', 'Olokuna', 'Olokutaanu', 'Olomukaaga'], - 'weekdays_short' => ['Sabi', 'Bala', 'Kubi', 'Kusa', 'Kuna', 'Kuta', 'Muka'], - 'weekdays_min' => ['Sabi', 'Bala', 'Kubi', 'Kusa', 'Kuna', 'Kuta', 'Muka'], - 'months' => ['Janwaliyo', 'Febwaliyo', 'Marisi', 'Apuli', 'Maayi', 'Juuni', 'Julaayi', 'Agusito', 'Sebuttemba', 'Okitobba', 'Novemba', 'Desemba'], - 'months_short' => ['Jan', 'Feb', 'Mar', 'Apu', 'Maa', 'Juu', 'Jul', 'Agu', 'Seb', 'Oki', 'Nov', 'Des'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yav.php b/vendor/nesbot/carbon/src/Carbon/Lang/yav.php deleted file mode 100644 index 225a20d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yav.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/en.php', [ - 'meridiem' => ['kiɛmɛ́ɛm', 'kisɛ́ndɛ'], - 'weekdays' => ['sɔ́ndiɛ', 'móndie', 'muányáŋmóndie', 'metúkpíápɛ', 'kúpélimetúkpiapɛ', 'feléte', 'séselé'], - 'weekdays_short' => ['sd', 'md', 'mw', 'et', 'kl', 'fl', 'ss'], - 'weekdays_min' => ['sd', 'md', 'mw', 'et', 'kl', 'fl', 'ss'], - 'months' => ['pikítíkítie, oólí ú kutúan', 'siɛyɛ́, oóli ú kándíɛ', 'ɔnsúmbɔl, oóli ú kátátúɛ', 'mesiŋ, oóli ú kénie', 'ensil, oóli ú kátánuɛ', 'ɔsɔn', 'efute', 'pisuyú', 'imɛŋ i puɔs', 'imɛŋ i putúk,oóli ú kátíɛ', 'makandikɛ', 'pilɔndɔ́'], - 'months_short' => ['o.1', 'o.2', 'o.3', 'o.4', 'o.5', 'o.6', 'o.7', 'o.8', 'o.9', 'o.10', 'o.11', 'o.12'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'D/M/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yi.php b/vendor/nesbot/carbon/src/Carbon/Lang/yi.php deleted file mode 100644 index 8f32022..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yi.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/yi_US.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yi_US.php b/vendor/nesbot/carbon/src/Carbon/Lang/yi_US.php deleted file mode 100644 index f764d36..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yi_US.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - http://www.uyip.org/ Pablo Saratxaga pablo@mandrakesoft.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['יאַנואַר', 'פֿעברואַר', 'מערץ', 'אַפּריל', 'מיי', 'יוני', 'יולי', 'אויגוסט', 'סעפּטעמבער', 'אקטאבער', 'נאוועמבער', 'דעצעמבער'], - 'months_short' => ['יאַנ', 'פֿעב', 'מאַר', 'אַפּר', 'מײַ ', 'יונ', 'יול', 'אױג', 'סעפּ', 'אָקט', 'נאָװ', 'דעצ'], - 'weekdays' => ['זונטיק', 'מאָנטיק', 'דינסטיק', 'מיטװאָך', 'דאָנערשטיק', 'פֿרײַטיק', 'שבת'], - 'weekdays_short' => ['זונ\'', 'מאָנ\'', 'דינ\'', 'מיט\'', 'דאָנ\'', 'פֿרײַ\'', 'שבת'], - 'weekdays_min' => ['זונ\'', 'מאָנ\'', 'דינ\'', 'מיט\'', 'דאָנ\'', 'פֿרײַ\'', 'שבת'], - 'day_of_first_week_of_year' => 1, - - 'year' => ':count יאר', - 'y' => ':count יאר', - 'a_year' => ':count יאר', - - 'month' => ':count חודש', - 'm' => ':count חודש', - 'a_month' => ':count חודש', - - 'week' => ':count וואָך', - 'w' => ':count וואָך', - 'a_week' => ':count וואָך', - - 'day' => ':count טאָג', - 'd' => ':count טאָג', - 'a_day' => ':count טאָג', - - 'hour' => ':count שעה', - 'h' => ':count שעה', - 'a_hour' => ':count שעה', - - 'minute' => ':count מינוט', - 'min' => ':count מינוט', - 'a_minute' => ':count מינוט', - - 'second' => ':count סעקונדע', - 's' => ':count סעקונדע', - 'a_second' => ':count סעקונדע', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yo.php b/vendor/nesbot/carbon/src/Carbon/Lang/yo.php deleted file mode 100644 index 0a82981..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yo.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - François B - * - Atolagbe Abisoye - */ -return [ - 'year' => 'ọdún :count', - 'a_year' => '{1}ọdún kan|ọdún :count', - 'month' => 'osù :count', - 'a_month' => '{1}osù kan|osù :count', - 'week' => 'ọsẹ :count', - 'a_week' => '{1}ọsẹ kan|ọsẹ :count', - 'day' => 'ọjọ́ :count', - 'a_day' => '{1}ọjọ́ kan|ọjọ́ :count', - 'hour' => 'wákati :count', - 'a_hour' => '{1}wákati kan|wákati :count', - 'minute' => 'ìsẹjú :count', - 'a_minute' => '{1}ìsẹjú kan|ìsẹjú :count', - 'second' => 'iaayá :count', - 'a_second' => '{1}ìsẹjú aayá die|aayá :count', - 'ago' => ':time kọjá', - 'from_now' => 'ní :time', - 'diff_yesterday' => 'Àna', - 'diff_yesterday_regexp' => 'Àna(?:\\s+ni)?', - 'diff_today' => 'Ònì', - 'diff_today_regexp' => 'Ònì(?:\\s+ni)?', - 'diff_tomorrow' => 'Ọ̀la', - 'diff_tomorrow_regexp' => 'Ọ̀la(?:\\s+ni)?', - 'formats' => [ - 'LT' => 'h:mm A', - 'LTS' => 'h:mm:ss A', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY h:mm A', - 'LLLL' => 'dddd, D MMMM YYYY h:mm A', - ], - 'calendar' => [ - 'sameDay' => '[Ònì ni] LT', - 'nextDay' => '[Ọ̀la ni] LT', - 'nextWeek' => 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', - 'lastDay' => '[Àna ni] LT', - 'lastWeek' => 'dddd [Ọsẹ̀ tólọ́] [ni] LT', - 'sameElse' => 'L', - ], - 'ordinal' => 'ọjọ́ :number', - 'months' => ['Sẹ́rẹ́', 'Èrèlè', 'Ẹrẹ̀nà', 'Ìgbé', 'Èbibi', 'Òkùdu', 'Agẹmo', 'Ògún', 'Owewe', 'Ọ̀wàrà', 'Bélú', 'Ọ̀pẹ̀̀'], - 'months_short' => ['Sẹ́r', 'Èrl', 'Ẹrn', 'Ìgb', 'Èbi', 'Òkù', 'Agẹ', 'Ògú', 'Owe', 'Ọ̀wà', 'Bél', 'Ọ̀pẹ̀̀'], - 'weekdays' => ['Àìkú', 'Ajé', 'Ìsẹ́gun', 'Ọjọ́rú', 'Ọjọ́bọ', 'Ẹtì', 'Àbámẹ́ta'], - 'weekdays_short' => ['Àìk', 'Ajé', 'Ìsẹ́', 'Ọjr', 'Ọjb', 'Ẹtì', 'Àbá'], - 'weekdays_min' => ['Àì', 'Aj', 'Ìs', 'Ọr', 'Ọb', 'Ẹt', 'Àb'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'meridiem' => ['Àárọ̀', 'Ọ̀sán'], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yo_BJ.php b/vendor/nesbot/carbon/src/Carbon/Lang/yo_BJ.php deleted file mode 100644 index 12b9e81..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yo_BJ.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array_replace_recursive(require __DIR__.'/yo.php', [ - 'meridiem' => ['Àárɔ̀', 'Ɔ̀sán'], - 'weekdays' => ['Ɔjɔ́ Àìkú', 'Ɔjɔ́ Ajé', 'Ɔjɔ́ Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɔjɔ́ Ɛtì', 'Ɔjɔ́ Àbámɛ́ta'], - 'weekdays_short' => ['Àìkú', 'Ajé', 'Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɛtì', 'Àbámɛ́ta'], - 'weekdays_min' => ['Àìkú', 'Ajé', 'Ìsɛ́gun', 'Ɔjɔ́rú', 'Ɔjɔ́bɔ', 'Ɛtì', 'Àbámɛ́ta'], - 'months' => ['Oshù Shɛ́rɛ́', 'Oshù Èrèlè', 'Oshù Ɛrɛ̀nà', 'Oshù Ìgbé', 'Oshù Ɛ̀bibi', 'Oshù Òkúdu', 'Oshù Agɛmɔ', 'Oshù Ògún', 'Oshù Owewe', 'Oshù Ɔ̀wàrà', 'Oshù Bélú', 'Oshù Ɔ̀pɛ̀'], - 'months_short' => ['Shɛ́rɛ́', 'Èrèlè', 'Ɛrɛ̀nà', 'Ìgbé', 'Ɛ̀bibi', 'Òkúdu', 'Agɛmɔ', 'Ògún', 'Owewe', 'Ɔ̀wàrà', 'Bélú', 'Ɔ̀pɛ̀'], - 'first_day_of_week' => 1, - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd, D MMMM YYYY HH:mm', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yo_NG.php b/vendor/nesbot/carbon/src/Carbon/Lang/yo_NG.php deleted file mode 100644 index 6860bc1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yo_NG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/yo.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yue.php b/vendor/nesbot/carbon/src/Carbon/Lang/yue.php deleted file mode 100644 index ce233a4..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yue.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/yue_HK.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yue_HK.php b/vendor/nesbot/carbon/src/Carbon/Lang/yue_HK.php deleted file mode 100644 index 4e7d5c3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yue_HK.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/zh_HK.php', [ - 'formats' => [ - 'L' => 'YYYY年MM月DD日 dddd', - ], - 'months' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], - 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], - 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], - 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], - 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], - 'first_day_of_week' => 0, - 'day_of_first_week_of_year' => 1, - 'meridiem' => ['上午', '下午'], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hans.php b/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hans.php deleted file mode 100644 index db913ca..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hans.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hans.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hant.php b/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hant.php deleted file mode 100644 index e2526f1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yue_Hant.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hant.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yuw.php b/vendor/nesbot/carbon/src/Carbon/Lang/yuw.php deleted file mode 100644 index 8efdc93..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yuw.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/yuw_PG.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/yuw_PG.php b/vendor/nesbot/carbon/src/Carbon/Lang/yuw_PG.php deleted file mode 100644 index b99ad2e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/yuw_PG.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Information from native speakers Hannah Sarvasy nungon.localization@gmail.com - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YY', - ], - 'months' => ['jenuari', 'febuari', 'mas', 'epril', 'mei', 'jun', 'julai', 'ögus', 'septemba', 'öktoba', 'nöwemba', 'diksemba'], - 'months_short' => ['jen', 'feb', 'mas', 'epr', 'mei', 'jun', 'jul', 'ögu', 'sep', 'ökt', 'nöw', 'dis'], - 'weekdays' => ['sönda', 'mönda', 'sinda', 'mitiwö', 'sogipbono', 'nenggo', 'söndanggie'], - 'weekdays_short' => ['sön', 'mön', 'sin', 'mit', 'soi', 'nen', 'sab'], - 'weekdays_min' => ['sön', 'mön', 'sin', 'mit', 'soi', 'nen', 'sab'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zgh.php b/vendor/nesbot/carbon/src/Carbon/Lang/zgh.php deleted file mode 100644 index 4d2c3b3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zgh.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - BAKTETE Miloud - */ -return [ - 'year' => ':count ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', - 'a_year' => 'ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', - 'y' => ':count ⵓⵙⴳⴳⵯⴰⵙ|:count ⵉⵙⴳⴳⵓⵙⴰ', - 'month' => ':count ⵡⴰⵢⵢⵓⵔ|:count ⴰⵢⵢⵓⵔⵏ', - 'a_month' => 'ⵉⴷⵊ ⵡⴰⵢⵢⵓⵔ|:count ⴰⵢⵢⵓⵔⵏ', - 'm' => ':count ⴰⵢⵢⵓⵔⵏ', - 'week' => ':count ⵉⵎⴰⵍⴰⵙⵙ|:count ⵉⵎⴰⵍⴰⵙⵙⵏ', - 'a_week' => 'ⵉⵛⵜ ⵉⵎⴰⵍⴰⵙⵙ|:count ⵉⵎⴰⵍⴰⵙⵙⵏ', - 'w' => ':count ⵉⵎⴰⵍⴰⵙⵙ.', - 'day' => ':count ⵡⴰⵙⵙ|:count ⵓⵙⵙⴰⵏ', - 'a_day' => 'ⵉⴷⵊ ⵡⴰⵙⵙ|:count ⵓⵙⵙⴰⵏ', - 'd' => ':count ⵓ', - 'hour' => ':count ⵜⵙⵔⴰⴳⵜ|:count ⵜⵉⵙⵔⴰⴳⵉⵏ', - 'a_hour' => 'ⵉⵛⵜ ⵜⵙⵔⴰⴳⵜ|:count ⵜⵉⵙⵔⴰⴳⵉⵏ', - 'h' => ':count ⵜ', - 'minute' => ':count ⵜⵓⵙⴷⵉⴷⵜ|:count ⵜⵓⵙⴷⵉⴷⵉⵏ', - 'a_minute' => 'ⵉⵛⵜ ⵜⵓⵙⴷⵉⴷⵜ|:count ⵜⵓⵙⴷⵉⴷⵉⵏ', - 'min' => ':count ⵜⵓⵙ', - 'second' => ':count ⵜⵙⵉⵏⵜ|:count ⵜⵉⵙⵉⵏⴰ', - 'a_second' => 'ⴽⵔⴰ ⵜⵉⵙⵉⵏⴰ|:count ⵜⵉⵙⵉⵏⴰ', - 's' => ':count ⵜ', - 'ago' => 'ⵣⴳ :time', - 'from_now' => 'ⴷⴳ :time', - 'after' => ':time ⴰⵡⴰⵔ', - 'before' => ':time ⴷⴰⵜ', - 'diff_now' => 'ⴰⴷⵡⴰⵍⵉ', - 'diff_today' => 'ⴰⵙⵙ', - 'diff_today_regexp' => 'ⴰⵙⵙ(?:\\s+ⴰ/ⴰⴷ)?(?:\\s+ⴳ)?', - 'diff_yesterday' => 'ⴰⵙⵙⵏⵏⴰⵟ', - 'diff_yesterday_regexp' => 'ⴰⵙⵙⵏⵏⴰⵟ(?:\\s+ⴳ)?', - 'diff_tomorrow' => 'ⴰⵙⴽⴽⴰ', - 'diff_tomorrow_regexp' => 'ⴰⵙⴽⴽⴰ(?:\\s+ⴳ)?', - 'diff_before_yesterday' => 'ⴼⵔ ⵉⴹⵏⵏⴰⵟ', - 'diff_after_tomorrow' => 'ⵏⴰⴼ ⵓⵙⴽⴽⴰ', - 'period_recurrences' => ':count ⵜⵉⴽⴽⴰⵍ', - 'period_interval' => 'ⴽⵓ :interval', - 'period_start_date' => 'ⴳ :date', - 'period_end_date' => 'ⵉ :date', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'DD/MM/YYYY', - 'LL' => 'D MMMM YYYY', - 'LLL' => 'D MMMM YYYY HH:mm', - 'LLLL' => 'dddd D MMMM YYYY HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[ⴰⵙⵙ ⴰ/ⴰⴷ ⴳ] LT', - 'nextDay' => '[ⴰⵙⴽⴽⴰ ⴳ] LT', - 'nextWeek' => 'dddd [ⴳ] LT', - 'lastDay' => '[ⴰⵙⵙⵏⵏⴰⵟ ⴳ] LT', - 'lastWeek' => 'dddd [ⴰⵎⴳⴳⴰⵔⵓ ⴳ] LT', - 'sameElse' => 'L', - ], - 'meridiem' => ['ⵜⵉⴼⴰⵡⵜ', 'ⵜⴰⴷⴳⴳⵯⴰⵜ'], - 'months' => ['ⵉⵏⵏⴰⵢⵔ', 'ⴱⵕⴰⵢⵕ', 'ⵎⴰⵕⵚ', 'ⵉⴱⵔⵉⵔ', 'ⵎⴰⵢⵢⵓ', 'ⵢⵓⵏⵢⵓ', 'ⵢⵓⵍⵢⵓⵣ', 'ⵖⵓⵛⵜ', 'ⵛⵓⵜⴰⵏⴱⵉⵔ', 'ⴽⵟⵓⴱⵕ', 'ⵏⵓⵡⴰⵏⴱⵉⵔ', 'ⴷⵓⵊⴰⵏⴱⵉⵔ'], - 'months_short' => ['ⵉⵏⵏ', 'ⴱⵕⴰ', 'ⵎⴰⵕ', 'ⵉⴱⵔ', 'ⵎⴰⵢ', 'ⵢⵓⵏ', 'ⵢⵓⵍ', 'ⵖⵓⵛ', 'ⵛⵓⵜ', 'ⴽⵟⵓ', 'ⵏⵓⵡ', 'ⴷⵓⵊ'], - 'weekdays' => ['ⵓⵙⴰⵎⴰⵙ', 'ⵡⴰⵢⵏⴰⵙ', 'ⵓⵙⵉⵏⴰⵙ', 'ⵡⴰⴽⵕⴰⵙ', 'ⵓⴽⵡⴰⵙ', 'ⵓⵙⵉⵎⵡⴰⵙ', 'ⵓⵙⵉⴹⵢⴰⵙ'], - 'weekdays_short' => ['ⵓⵙⴰ', 'ⵡⴰⵢ', 'ⵓⵙⵉ', 'ⵡⴰⴽ', 'ⵓⴽⵡ', 'ⵓⵙⵉⵎ', 'ⵓⵙⵉⴹ'], - 'weekdays_min' => ['ⵓⵙⴰ', 'ⵡⴰⵢ', 'ⵓⵙⵉ', 'ⵡⴰⴽ', 'ⵓⴽⵡ', 'ⵓⵙⵉⵎ', 'ⵓⵙⵉⴹ'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 1, - 'list' => [', ', ' ⴷ '], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh.php deleted file mode 100644 index 1187c3d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - xuri - * - sycuato - * - bokideckonja - * - Luo Ning - * - William Yang (williamyang233) - */ -return array_merge(require __DIR__.'/zh_Hans.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY/MM/DD', - 'LL' => 'YYYY年M月D日', - 'LLL' => 'YYYY年M月D日 A h点mm分', - 'LLLL' => 'YYYY年M月D日dddd A h点mm分', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_CN.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_CN.php deleted file mode 100644 index 9c05d5a..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_CN.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - monkeycon - * - François B - * - Jason Katz-Brown - * - Serhan Apaydın - * - Matt Johnson - * - JD Isaacks - * - Zeno Zeng - * - Chris Hemp - * - shankesgk2 - */ -return array_merge(require __DIR__.'/zh.php', [ - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY/MM/DD', - 'LL' => 'YYYY年M月D日', - 'LLL' => 'YYYY年M月D日Ah点mm分', - 'LLLL' => 'YYYY年M月D日ddddAh点mm分', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_HK.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_HK.php deleted file mode 100644 index c3ee9fc..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_HK.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hant_HK.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans.php deleted file mode 100644 index 9b91785..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans.php +++ /dev/null @@ -1,109 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - monkeycon - * - François B - * - Jason Katz-Brown - * - Konstantin Konev - * - Chris Lam - * - Serhan Apaydın - * - Gary Lo - * - JD Isaacks - * - Chris Hemp - * - shankesgk2 - * - Daniel Cheung (danvim) - */ -return [ - 'year' => ':count:optional-space年', - 'y' => ':count:optional-space年', - 'month' => ':count:optional-space个月', - 'm' => ':count:optional-space个月', - 'week' => ':count:optional-space周', - 'w' => ':count:optional-space周', - 'day' => ':count:optional-space天', - 'd' => ':count:optional-space天', - 'hour' => ':count:optional-space小时', - 'h' => ':count:optional-space小时', - 'minute' => ':count:optional-space分钟', - 'min' => ':count:optional-space分钟', - 'second' => ':count:optional-space秒', - 'a_second' => '{1}几秒|]1,Inf[:count:optional-space秒', - 's' => ':count:optional-space秒', - 'ago' => ':time前', - 'from_now' => ':time后', - 'after' => ':time后', - 'before' => ':time前', - 'diff_now' => '现在', - 'diff_today' => '今天', - 'diff_yesterday' => '昨天', - 'diff_tomorrow' => '明天', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY/MM/DD', - 'LL' => 'YYYY年M月D日', - 'LLL' => 'YYYY年M月D日 HH:mm', - 'LLLL' => 'YYYY年M月D日dddd HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[今天]LT', - 'nextDay' => '[明天]LT', - 'nextWeek' => '[下]ddddLT', - 'lastDay' => '[昨天]LT', - 'lastWeek' => '[上]ddddLT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'd': - case 'D': - case 'DDD': - return $number.'日'; - case 'M': - return $number.'月'; - case 'w': - case 'W': - return $number.'周'; - default: - return $number; - } - }, - 'meridiem' => function ($hour, $minute) { - $time = $hour * 100 + $minute; - if ($time < 600) { - return '凌晨'; - } - if ($time < 900) { - return '早上'; - } - if ($time < 1130) { - return '上午'; - } - if ($time < 1230) { - return '中午'; - } - if ($time < 1800) { - return '下午'; - } - - return '晚上'; - }, - 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], - 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], - 'weekdays_short' => ['周日', '周一', '周二', '周三', '周四', '周五', '周六'], - 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => '', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_HK.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_HK.php deleted file mode 100644 index db913ca..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_HK.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hans.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_MO.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_MO.php deleted file mode 100644 index db913ca..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_MO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hans.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_SG.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_SG.php deleted file mode 100644 index db913ca..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hans_SG.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hans.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant.php deleted file mode 100644 index a27b610..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Adam - * - monkeycon - * - François B - * - Jason Katz-Brown - * - Chris Lam - * - Serhan Apaydın - * - Gary Lo - * - JD Isaacks - * - Chris Hemp - * - Eddie - * - KID - * - shankesgk2 - * - Daniel Cheung (danvim) - */ -return [ - 'year' => ':count:optional-space年', - 'y' => ':count:optional-space年', - 'month' => ':count:optional-space個月', - 'm' => ':count:optional-space月', - 'week' => ':count:optional-space週', - 'w' => ':count:optional-space週', - 'day' => ':count:optional-space天', - 'd' => ':count:optional-space天', - 'hour' => ':count:optional-space小時', - 'h' => ':count:optional-space小時', - 'minute' => ':count:optional-space分鐘', - 'min' => ':count:optional-space分鐘', - 'second' => ':count:optional-space秒', - 'a_second' => '{1}幾秒|]1,Inf[:count:optional-space秒', - 's' => ':count:optional-space秒', - 'ago' => ':time前', - 'from_now' => ':time後', - 'after' => ':time後', - 'before' => ':time前', - 'diff_now' => '現在', - 'diff_today' => '今天', - 'diff_yesterday' => '昨天', - 'diff_tomorrow' => '明天', - 'formats' => [ - 'LT' => 'HH:mm', - 'LTS' => 'HH:mm:ss', - 'L' => 'YYYY/MM/DD', - 'LL' => 'YYYY年M月D日', - 'LLL' => 'YYYY年M月D日 HH:mm', - 'LLLL' => 'YYYY年M月D日dddd HH:mm', - ], - 'calendar' => [ - 'sameDay' => '[今天] LT', - 'nextDay' => '[明天] LT', - 'nextWeek' => '[下]dddd LT', - 'lastDay' => '[昨天] LT', - 'lastWeek' => '[上]dddd LT', - 'sameElse' => 'L', - ], - 'ordinal' => function ($number, $period) { - switch ($period) { - case 'd': - case 'D': - case 'DDD': - return $number.'日'; - case 'M': - return $number.'月'; - case 'w': - case 'W': - return $number.'周'; - default: - return $number; - } - }, - 'meridiem' => function ($hour, $minute) { - $time = $hour * 100 + $minute; - if ($time < 600) { - return '凌晨'; - } - if ($time < 900) { - return '早上'; - } - if ($time < 1130) { - return '上午'; - } - if ($time < 1230) { - return '中午'; - } - if ($time < 1800) { - return '下午'; - } - - return '晚上'; - }, - 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - 'months_short' => ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], - 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], - 'weekdays_short' => ['週日', '週一', '週二', '週三', '週四', '週五', '週六'], - 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], - 'first_day_of_week' => 1, - 'day_of_first_week_of_year' => 4, - 'list' => '', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_HK.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_HK.php deleted file mode 100644 index e2526f1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_HK.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hant.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_MO.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_MO.php deleted file mode 100644 index e2526f1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_MO.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hant.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_TW.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_TW.php deleted file mode 100644 index e2526f1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_Hant_TW.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hant.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_MO.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_MO.php deleted file mode 100644 index 1c86d47..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_MO.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - tarunvelli - * - Eddie - * - KID - * - shankesgk2 - */ -return array_replace_recursive(require __DIR__.'/zh_Hant.php', [ - 'after' => ':time后', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_SG.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_SG.php deleted file mode 100644 index c451a56..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_SG.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/zh.php', [ - 'formats' => [ - 'L' => 'YYYY年MM月DD日', - ], - 'months' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - 'months_short' => ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], - 'weekdays' => ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], - 'weekdays_short' => ['日', '一', '二', '三', '四', '五', '六'], - 'weekdays_min' => ['日', '一', '二', '三', '四', '五', '六'], - 'day_of_first_week_of_year' => 1, -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php deleted file mode 100644 index c6789ed..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php +++ /dev/null @@ -1,12 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return require __DIR__.'/zh_Hant_TW.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh_YUE.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh_YUE.php deleted file mode 100644 index b0d9ba8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh_YUE.php +++ /dev/null @@ -1,20 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - IBM Globalization Center of Competency, Yamato Software Laboratory bug-glibc-locales@gnu.org - */ -return array_replace_recursive(require __DIR__.'/zh.php', [ - 'formats' => [ - 'L' => 'YYYY-MM-DD', - ], -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zu.php b/vendor/nesbot/carbon/src/Carbon/Lang/zu.php deleted file mode 100644 index 9a6cce0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zu.php +++ /dev/null @@ -1,15 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Unknown default region, use the first alphabetically. - */ -return require __DIR__.'/zu_ZA.php'; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zu_ZA.php b/vendor/nesbot/carbon/src/Carbon/Lang/zu_ZA.php deleted file mode 100644 index 6bfb72f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zu_ZA.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * Authors: - * - Zuza Software Foundation (Translate.org.za) Dwayne Bailey dwayne@translate.org.za - */ -return array_replace_recursive(require __DIR__.'/en.php', [ - 'formats' => [ - 'L' => 'DD/MM/YYYY', - ], - 'months' => ['Januwari', 'Februwari', 'Mashi', 'Ephreli', 'Meyi', 'Juni', 'Julayi', 'Agasti', 'Septhemba', 'Okthoba', 'Novemba', 'Disemba'], - 'months_short' => ['Jan', 'Feb', 'Mas', 'Eph', 'Mey', 'Jun', 'Jul', 'Aga', 'Sep', 'Okt', 'Nov', 'Dis'], - 'weekdays' => ['iSonto', 'uMsombuluko', 'uLwesibili', 'uLwesithathu', 'uLwesine', 'uLwesihlanu', 'uMgqibelo'], - 'weekdays_short' => ['Son', 'Mso', 'Bil', 'Tha', 'Sin', 'Hla', 'Mgq'], - 'weekdays_min' => ['Son', 'Mso', 'Bil', 'Tha', 'Sin', 'Hla', 'Mgq'], - 'day_of_first_week_of_year' => 1, - - 'year' => 'kweminyaka engu-:count', - 'y' => 'kweminyaka engu-:count', - 'a_year' => 'kweminyaka engu-:count', - - 'month' => 'izinyanga ezingu-:count', - 'm' => 'izinyanga ezingu-:count', - 'a_month' => 'izinyanga ezingu-:count', - - 'week' => 'lwamasonto angu-:count', - 'w' => 'lwamasonto angu-:count', - 'a_week' => 'lwamasonto angu-:count', - - 'day' => 'ezingaba ngu-:count', - 'd' => 'ezingaba ngu-:count', - 'a_day' => 'ezingaba ngu-:count', - - 'hour' => 'amahora angu-:count', - 'h' => 'amahora angu-:count', - 'a_hour' => 'amahora angu-:count', - - 'minute' => 'ngemizuzu engu-:count', - 'min' => 'ngemizuzu engu-:count', - 'a_minute' => 'ngemizuzu engu-:count', - - 'second' => 'imizuzwana engu-:count', - 's' => 'imizuzwana engu-:count', - 'a_second' => 'imizuzwana engu-:count', -]); diff --git a/vendor/nesbot/carbon/src/Carbon/Language.php b/vendor/nesbot/carbon/src/Carbon/Language.php deleted file mode 100644 index 1fb5baf..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Language.php +++ /dev/null @@ -1,342 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use JsonSerializable; -use ReturnTypeWillChange; - -class Language implements JsonSerializable -{ - /** - * @var array - */ - protected static $languagesNames; - - /** - * @var array - */ - protected static $regionsNames; - - /** - * @var string - */ - protected $id; - - /** - * @var string - */ - protected $code; - - /** - * @var string|null - */ - protected $variant; - - /** - * @var string|null - */ - protected $region; - - /** - * @var array - */ - protected $names; - - /** - * @var string - */ - protected $isoName; - - /** - * @var string - */ - protected $nativeName; - - public function __construct(string $id) - { - $this->id = str_replace('-', '_', $id); - $parts = explode('_', $this->id); - $this->code = $parts[0]; - - if (isset($parts[1])) { - if (!preg_match('/^[A-Z]+$/', $parts[1])) { - $this->variant = $parts[1]; - $parts[1] = $parts[2] ?? null; - } - if ($parts[1]) { - $this->region = $parts[1]; - } - } - } - - /** - * Get the list of the known languages. - * - * @return array - */ - public static function all() - { - if (!static::$languagesNames) { - static::$languagesNames = require __DIR__.'/List/languages.php'; - } - - return static::$languagesNames; - } - - /** - * Get the list of the known regions. - * - * @return array - */ - public static function regions() - { - if (!static::$regionsNames) { - static::$regionsNames = require __DIR__.'/List/regions.php'; - } - - return static::$regionsNames; - } - - /** - * Get both isoName and nativeName as an array. - * - * @return array - */ - public function getNames(): array - { - if (!$this->names) { - $this->names = static::all()[$this->code] ?? [ - 'isoName' => $this->code, - 'nativeName' => $this->code, - ]; - } - - return $this->names; - } - - /** - * Returns the original locale ID. - * - * @return string - */ - public function getId(): string - { - return $this->id; - } - - /** - * Returns the code of the locale "en"/"fr". - * - * @return string - */ - public function getCode(): string - { - return $this->code; - } - - /** - * Returns the variant code such as cyrl/latn. - * - * @return string|null - */ - public function getVariant(): ?string - { - return $this->variant; - } - - /** - * Returns the variant such as Cyrillic/Latin. - * - * @return string|null - */ - public function getVariantName(): ?string - { - if ($this->variant === 'Latn') { - return 'Latin'; - } - - if ($this->variant === 'Cyrl') { - return 'Cyrillic'; - } - - return $this->variant; - } - - /** - * Returns the region part of the locale. - * - * @return string|null - */ - public function getRegion(): ?string - { - return $this->region; - } - - /** - * Returns the region name for the current language. - * - * @return string|null - */ - public function getRegionName(): ?string - { - return $this->region ? (static::regions()[$this->region] ?? $this->region) : null; - } - - /** - * Returns the long ISO language name. - * - * @return string - */ - public function getFullIsoName(): string - { - if (!$this->isoName) { - $this->isoName = $this->getNames()['isoName']; - } - - return $this->isoName; - } - - /** - * Set the ISO language name. - * - * @param string $isoName - */ - public function setIsoName(string $isoName): self - { - $this->isoName = $isoName; - - return $this; - } - - /** - * Return the full name of the language in this language. - * - * @return string - */ - public function getFullNativeName(): string - { - if (!$this->nativeName) { - $this->nativeName = $this->getNames()['nativeName']; - } - - return $this->nativeName; - } - - /** - * Set the name of the language in this language. - * - * @param string $nativeName - */ - public function setNativeName(string $nativeName): self - { - $this->nativeName = $nativeName; - - return $this; - } - - /** - * Returns the short ISO language name. - * - * @return string - */ - public function getIsoName(): string - { - $name = $this->getFullIsoName(); - - return trim(strstr($name, ',', true) ?: $name); - } - - /** - * Get the short name of the language in this language. - * - * @return string - */ - public function getNativeName(): string - { - $name = $this->getFullNativeName(); - - return trim(strstr($name, ',', true) ?: $name); - } - - /** - * Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable. - * - * @return string - */ - public function getIsoDescription() - { - $region = $this->getRegionName(); - $variant = $this->getVariantName(); - - return $this->getIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); - } - - /** - * Get a string with short native name, region in parentheses if applicable, variant in parentheses if applicable. - * - * @return string - */ - public function getNativeDescription() - { - $region = $this->getRegionName(); - $variant = $this->getVariantName(); - - return $this->getNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); - } - - /** - * Get a string with long ISO name, region in parentheses if applicable, variant in parentheses if applicable. - * - * @return string - */ - public function getFullIsoDescription() - { - $region = $this->getRegionName(); - $variant = $this->getVariantName(); - - return $this->getFullIsoName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); - } - - /** - * Get a string with long native name, region in parentheses if applicable, variant in parentheses if applicable. - * - * @return string - */ - public function getFullNativeDescription() - { - $region = $this->getRegionName(); - $variant = $this->getVariantName(); - - return $this->getFullNativeName().($region ? ' ('.$region.')' : '').($variant ? ' ('.$variant.')' : ''); - } - - /** - * Returns the original locale ID. - * - * @return string - */ - public function __toString() - { - return $this->getId(); - } - - /** - * Get a string with short ISO name, region in parentheses if applicable, variant in parentheses if applicable. - * - * @return string - */ - #[ReturnTypeWillChange] - public function jsonSerialize() - { - return $this->getIsoDescription(); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php b/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php deleted file mode 100644 index 84e241e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Laravel/ServiceProvider.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Laravel; - -use Carbon\Carbon; -use Carbon\CarbonImmutable; -use Carbon\CarbonInterval; -use Carbon\CarbonPeriod; -use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; -use Illuminate\Events\Dispatcher; -use Illuminate\Events\EventDispatcher; -use Illuminate\Support\Carbon as IlluminateCarbon; -use Illuminate\Support\Facades\Date; -use Throwable; - -class ServiceProvider extends \Illuminate\Support\ServiceProvider -{ - /** @var callable|null */ - protected $appGetter = null; - - /** @var callable|null */ - protected $localeGetter = null; - - public function setAppGetter(?callable $appGetter): void - { - $this->appGetter = $appGetter; - } - - public function setLocaleGetter(?callable $localeGetter): void - { - $this->localeGetter = $localeGetter; - } - - public function boot() - { - $this->updateLocale(); - - if (!$this->app->bound('events')) { - return; - } - - $service = $this; - $events = $this->app['events']; - - if ($this->isEventDispatcher($events)) { - $events->listen(class_exists('Illuminate\Foundation\Events\LocaleUpdated') ? 'Illuminate\Foundation\Events\LocaleUpdated' : 'locale.changed', function () use ($service) { - $service->updateLocale(); - }); - } - } - - public function updateLocale() - { - $locale = $this->getLocale(); - - if ($locale === null) { - return; - } - - Carbon::setLocale($locale); - CarbonImmutable::setLocale($locale); - CarbonPeriod::setLocale($locale); - CarbonInterval::setLocale($locale); - - if (class_exists(IlluminateCarbon::class)) { - IlluminateCarbon::setLocale($locale); - } - - if (class_exists(Date::class)) { - try { - $root = Date::getFacadeRoot(); - $root->setLocale($locale); - } catch (Throwable $e) { - // Non Carbon class in use in Date facade - } - } - } - - public function register() - { - // Needed for Laravel < 5.3 compatibility - } - - protected function getLocale() - { - if ($this->localeGetter) { - return ($this->localeGetter)(); - } - - $app = $this->getApp(); - $app = $app && method_exists($app, 'getLocale') - ? $app - : $this->getGlobalApp('translator'); - - return $app ? $app->getLocale() : null; - } - - protected function getApp() - { - if ($this->appGetter) { - return ($this->appGetter)(); - } - - return $this->app ?? $this->getGlobalApp(); - } - - protected function getGlobalApp(...$args) - { - return \function_exists('app') ? \app(...$args) : null; - } - - protected function isEventDispatcher($instance) - { - return $instance instanceof EventDispatcher - || $instance instanceof Dispatcher - || $instance instanceof DispatcherContract; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/List/languages.php b/vendor/nesbot/carbon/src/Carbon/List/languages.php deleted file mode 100644 index 5b5d9a1..0000000 --- a/vendor/nesbot/carbon/src/Carbon/List/languages.php +++ /dev/null @@ -1,1239 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return [ - /* - * ISO 639-2 - */ - 'ab' => [ - 'isoName' => 'Abkhazian', - 'nativeName' => 'аҧсуа бызшәа, аҧсшәа', - ], - 'aa' => [ - 'isoName' => 'Afar', - 'nativeName' => 'Afaraf', - ], - 'af' => [ - 'isoName' => 'Afrikaans', - 'nativeName' => 'Afrikaans', - ], - 'ak' => [ - 'isoName' => 'Akan', - 'nativeName' => 'Akan', - ], - 'sq' => [ - 'isoName' => 'Albanian', - 'nativeName' => 'Shqip', - ], - 'am' => [ - 'isoName' => 'Amharic', - 'nativeName' => 'አማርኛ', - ], - 'ar' => [ - 'isoName' => 'Arabic', - 'nativeName' => 'العربية', - ], - 'an' => [ - 'isoName' => 'Aragonese', - 'nativeName' => 'aragonés', - ], - 'hy' => [ - 'isoName' => 'Armenian', - 'nativeName' => 'Հայերեն', - ], - 'as' => [ - 'isoName' => 'Assamese', - 'nativeName' => 'অসমীয়া', - ], - 'av' => [ - 'isoName' => 'Avaric', - 'nativeName' => 'авар мацӀ, магӀарул мацӀ', - ], - 'ae' => [ - 'isoName' => 'Avestan', - 'nativeName' => 'avesta', - ], - 'ay' => [ - 'isoName' => 'Aymara', - 'nativeName' => 'aymar aru', - ], - 'az' => [ - 'isoName' => 'Azerbaijani', - 'nativeName' => 'azərbaycan dili', - ], - 'bm' => [ - 'isoName' => 'Bambara', - 'nativeName' => 'bamanankan', - ], - 'ba' => [ - 'isoName' => 'Bashkir', - 'nativeName' => 'башҡорт теле', - ], - 'eu' => [ - 'isoName' => 'Basque', - 'nativeName' => 'euskara, euskera', - ], - 'be' => [ - 'isoName' => 'Belarusian', - 'nativeName' => 'беларуская мова', - ], - 'bn' => [ - 'isoName' => 'Bengali', - 'nativeName' => 'বাংলা', - ], - 'bh' => [ - 'isoName' => 'Bihari languages', - 'nativeName' => 'भोजपुरी', - ], - 'bi' => [ - 'isoName' => 'Bislama', - 'nativeName' => 'Bislama', - ], - 'bs' => [ - 'isoName' => 'Bosnian', - 'nativeName' => 'bosanski jezik', - ], - 'br' => [ - 'isoName' => 'Breton', - 'nativeName' => 'brezhoneg', - ], - 'bg' => [ - 'isoName' => 'Bulgarian', - 'nativeName' => 'български език', - ], - 'my' => [ - 'isoName' => 'Burmese', - 'nativeName' => 'ဗမာစာ', - ], - 'ca' => [ - 'isoName' => 'Catalan, Valencian', - 'nativeName' => 'català, valencià', - ], - 'ch' => [ - 'isoName' => 'Chamorro', - 'nativeName' => 'Chamoru', - ], - 'ce' => [ - 'isoName' => 'Chechen', - 'nativeName' => 'нохчийн мотт', - ], - 'ny' => [ - 'isoName' => 'Chichewa, Chewa, Nyanja', - 'nativeName' => 'chiCheŵa, chinyanja', - ], - 'zh' => [ - 'isoName' => 'Chinese', - 'nativeName' => '中文 (Zhōngwén), 汉语, 漢語', - ], - 'cv' => [ - 'isoName' => 'Chuvash', - 'nativeName' => 'чӑваш чӗлхи', - ], - 'kw' => [ - 'isoName' => 'Cornish', - 'nativeName' => 'Kernewek', - ], - 'co' => [ - 'isoName' => 'Corsican', - 'nativeName' => 'corsu, lingua corsa', - ], - 'cr' => [ - 'isoName' => 'Cree', - 'nativeName' => 'ᓀᐦᐃᔭᐍᐏᐣ', - ], - 'hr' => [ - 'isoName' => 'Croatian', - 'nativeName' => 'hrvatski jezik', - ], - 'cs' => [ - 'isoName' => 'Czech', - 'nativeName' => 'čeština, český jazyk', - ], - 'da' => [ - 'isoName' => 'Danish', - 'nativeName' => 'dansk', - ], - 'dv' => [ - 'isoName' => 'Divehi, Dhivehi, Maldivian', - 'nativeName' => 'ދިވެހި', - ], - 'nl' => [ - 'isoName' => 'Dutch, Flemish', - 'nativeName' => 'Nederlands, Vlaams', - ], - 'dz' => [ - 'isoName' => 'Dzongkha', - 'nativeName' => 'རྫོང་ཁ', - ], - 'en' => [ - 'isoName' => 'English', - 'nativeName' => 'English', - ], - 'eo' => [ - 'isoName' => 'Esperanto', - 'nativeName' => 'Esperanto', - ], - 'et' => [ - 'isoName' => 'Estonian', - 'nativeName' => 'eesti, eesti keel', - ], - 'ee' => [ - 'isoName' => 'Ewe', - 'nativeName' => 'Eʋegbe', - ], - 'fo' => [ - 'isoName' => 'Faroese', - 'nativeName' => 'føroyskt', - ], - 'fj' => [ - 'isoName' => 'Fijian', - 'nativeName' => 'vosa Vakaviti', - ], - 'fi' => [ - 'isoName' => 'Finnish', - 'nativeName' => 'suomi, suomen kieli', - ], - 'fr' => [ - 'isoName' => 'French', - 'nativeName' => 'français', - ], - 'ff' => [ - 'isoName' => 'Fulah', - 'nativeName' => 'Fulfulde, Pulaar, Pular', - ], - 'gl' => [ - 'isoName' => 'Galician', - 'nativeName' => 'Galego', - ], - 'ka' => [ - 'isoName' => 'Georgian', - 'nativeName' => 'ქართული', - ], - 'de' => [ - 'isoName' => 'German', - 'nativeName' => 'Deutsch', - ], - 'el' => [ - 'isoName' => 'Greek (modern)', - 'nativeName' => 'ελληνικά', - ], - 'gn' => [ - 'isoName' => 'Guaraní', - 'nativeName' => 'Avañe\'ẽ', - ], - 'gu' => [ - 'isoName' => 'Gujarati', - 'nativeName' => 'ગુજરાતી', - ], - 'ht' => [ - 'isoName' => 'Haitian, Haitian Creole', - 'nativeName' => 'Kreyòl ayisyen', - ], - 'ha' => [ - 'isoName' => 'Hausa', - 'nativeName' => '(Hausa) هَوُسَ', - ], - 'he' => [ - 'isoName' => 'Hebrew (modern)', - 'nativeName' => 'עברית', - ], - 'hz' => [ - 'isoName' => 'Herero', - 'nativeName' => 'Otjiherero', - ], - 'hi' => [ - 'isoName' => 'Hindi', - 'nativeName' => 'हिन्दी, हिंदी', - ], - 'ho' => [ - 'isoName' => 'Hiri Motu', - 'nativeName' => 'Hiri Motu', - ], - 'hu' => [ - 'isoName' => 'Hungarian', - 'nativeName' => 'magyar', - ], - 'ia' => [ - 'isoName' => 'Interlingua', - 'nativeName' => 'Interlingua', - ], - 'id' => [ - 'isoName' => 'Indonesian', - 'nativeName' => 'Bahasa Indonesia', - ], - 'ie' => [ - 'isoName' => 'Interlingue', - 'nativeName' => 'Originally called Occidental; then Interlingue after WWII', - ], - 'ga' => [ - 'isoName' => 'Irish', - 'nativeName' => 'Gaeilge', - ], - 'ig' => [ - 'isoName' => 'Igbo', - 'nativeName' => 'Asụsụ Igbo', - ], - 'ik' => [ - 'isoName' => 'Inupiaq', - 'nativeName' => 'Iñupiaq, Iñupiatun', - ], - 'io' => [ - 'isoName' => 'Ido', - 'nativeName' => 'Ido', - ], - 'is' => [ - 'isoName' => 'Icelandic', - 'nativeName' => 'Íslenska', - ], - 'it' => [ - 'isoName' => 'Italian', - 'nativeName' => 'Italiano', - ], - 'iu' => [ - 'isoName' => 'Inuktitut', - 'nativeName' => 'ᐃᓄᒃᑎᑐᑦ', - ], - 'ja' => [ - 'isoName' => 'Japanese', - 'nativeName' => '日本語 (にほんご)', - ], - 'jv' => [ - 'isoName' => 'Javanese', - 'nativeName' => 'ꦧꦱꦗꦮ, Basa Jawa', - ], - 'kl' => [ - 'isoName' => 'Kalaallisut, Greenlandic', - 'nativeName' => 'kalaallisut, kalaallit oqaasii', - ], - 'kn' => [ - 'isoName' => 'Kannada', - 'nativeName' => 'ಕನ್ನಡ', - ], - 'kr' => [ - 'isoName' => 'Kanuri', - 'nativeName' => 'Kanuri', - ], - 'ks' => [ - 'isoName' => 'Kashmiri', - 'nativeName' => 'कश्मीरी, كشميري‎', - ], - 'kk' => [ - 'isoName' => 'Kazakh', - 'nativeName' => 'қазақ тілі', - ], - 'km' => [ - 'isoName' => 'Central Khmer', - 'nativeName' => 'ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ', - ], - 'ki' => [ - 'isoName' => 'Kikuyu, Gikuyu', - 'nativeName' => 'Gĩkũyũ', - ], - 'rw' => [ - 'isoName' => 'Kinyarwanda', - 'nativeName' => 'Ikinyarwanda', - ], - 'ky' => [ - 'isoName' => 'Kirghiz, Kyrgyz', - 'nativeName' => 'Кыргызча, Кыргыз тили', - ], - 'kv' => [ - 'isoName' => 'Komi', - 'nativeName' => 'коми кыв', - ], - 'kg' => [ - 'isoName' => 'Kongo', - 'nativeName' => 'Kikongo', - ], - 'ko' => [ - 'isoName' => 'Korean', - 'nativeName' => '한국어', - ], - 'ku' => [ - 'isoName' => 'Kurdish', - 'nativeName' => 'Kurdî, کوردی‎', - ], - 'kj' => [ - 'isoName' => 'Kuanyama, Kwanyama', - 'nativeName' => 'Kuanyama', - ], - 'la' => [ - 'isoName' => 'Latin', - 'nativeName' => 'latine, lingua latina', - ], - 'lb' => [ - 'isoName' => 'Luxembourgish, Letzeburgesch', - 'nativeName' => 'Lëtzebuergesch', - ], - 'lg' => [ - 'isoName' => 'Ganda', - 'nativeName' => 'Luganda', - ], - 'li' => [ - 'isoName' => 'Limburgan, Limburger, Limburgish', - 'nativeName' => 'Limburgs', - ], - 'ln' => [ - 'isoName' => 'Lingala', - 'nativeName' => 'Lingála', - ], - 'lo' => [ - 'isoName' => 'Lao', - 'nativeName' => 'ພາສາລາວ', - ], - 'lt' => [ - 'isoName' => 'Lithuanian', - 'nativeName' => 'lietuvių kalba', - ], - 'lu' => [ - 'isoName' => 'Luba-Katanga', - 'nativeName' => 'Kiluba', - ], - 'lv' => [ - 'isoName' => 'Latvian', - 'nativeName' => 'latviešu valoda', - ], - 'gv' => [ - 'isoName' => 'Manx', - 'nativeName' => 'Gaelg, Gailck', - ], - 'mk' => [ - 'isoName' => 'Macedonian', - 'nativeName' => 'македонски јазик', - ], - 'mg' => [ - 'isoName' => 'Malagasy', - 'nativeName' => 'fiteny malagasy', - ], - 'ms' => [ - 'isoName' => 'Malay', - 'nativeName' => 'Bahasa Melayu, بهاس ملايو‎', - ], - 'ml' => [ - 'isoName' => 'Malayalam', - 'nativeName' => 'മലയാളം', - ], - 'mt' => [ - 'isoName' => 'Maltese', - 'nativeName' => 'Malti', - ], - 'mi' => [ - 'isoName' => 'Maori', - 'nativeName' => 'te reo Māori', - ], - 'mr' => [ - 'isoName' => 'Marathi', - 'nativeName' => 'मराठी', - ], - 'mh' => [ - 'isoName' => 'Marshallese', - 'nativeName' => 'Kajin M̧ajeļ', - ], - 'mn' => [ - 'isoName' => 'Mongolian', - 'nativeName' => 'Монгол хэл', - ], - 'na' => [ - 'isoName' => 'Nauru', - 'nativeName' => 'Dorerin Naoero', - ], - 'nv' => [ - 'isoName' => 'Navajo, Navaho', - 'nativeName' => 'Diné bizaad', - ], - 'nd' => [ - 'isoName' => 'North Ndebele', - 'nativeName' => 'isiNdebele', - ], - 'ne' => [ - 'isoName' => 'Nepali', - 'nativeName' => 'नेपाली', - ], - 'ng' => [ - 'isoName' => 'Ndonga', - 'nativeName' => 'Owambo', - ], - 'nb' => [ - 'isoName' => 'Norwegian Bokmål', - 'nativeName' => 'Norsk Bokmål', - ], - 'nn' => [ - 'isoName' => 'Norwegian Nynorsk', - 'nativeName' => 'Norsk Nynorsk', - ], - 'no' => [ - 'isoName' => 'Norwegian', - 'nativeName' => 'Norsk', - ], - 'ii' => [ - 'isoName' => 'Sichuan Yi, Nuosu', - 'nativeName' => 'ꆈꌠ꒿ Nuosuhxop', - ], - 'nr' => [ - 'isoName' => 'South Ndebele', - 'nativeName' => 'isiNdebele', - ], - 'oc' => [ - 'isoName' => 'Occitan', - 'nativeName' => 'occitan, lenga d\'òc', - ], - 'oj' => [ - 'isoName' => 'Ojibwa', - 'nativeName' => 'ᐊᓂᔑᓈᐯᒧᐎᓐ', - ], - 'cu' => [ - 'isoName' => 'Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian', - 'nativeName' => 'ѩзыкъ словѣньскъ', - ], - 'om' => [ - 'isoName' => 'Oromo', - 'nativeName' => 'Afaan Oromoo', - ], - 'or' => [ - 'isoName' => 'Oriya', - 'nativeName' => 'ଓଡ଼ିଆ', - ], - 'os' => [ - 'isoName' => 'Ossetian, Ossetic', - 'nativeName' => 'ирон æвзаг', - ], - 'pa' => [ - 'isoName' => 'Panjabi, Punjabi', - 'nativeName' => 'ਪੰਜਾਬੀ', - ], - 'pi' => [ - 'isoName' => 'Pali', - 'nativeName' => 'पाऴि', - ], - 'fa' => [ - 'isoName' => 'Persian', - 'nativeName' => 'فارسی', - ], - 'pl' => [ - 'isoName' => 'Polish', - 'nativeName' => 'język polski, polszczyzna', - ], - 'ps' => [ - 'isoName' => 'Pashto, Pushto', - 'nativeName' => 'پښتو', - ], - 'pt' => [ - 'isoName' => 'Portuguese', - 'nativeName' => 'Português', - ], - 'qu' => [ - 'isoName' => 'Quechua', - 'nativeName' => 'Runa Simi, Kichwa', - ], - 'rm' => [ - 'isoName' => 'Romansh', - 'nativeName' => 'Rumantsch Grischun', - ], - 'rn' => [ - 'isoName' => 'Rundi', - 'nativeName' => 'Ikirundi', - ], - 'ro' => [ - 'isoName' => 'Romanian, Moldavian, Moldovan', - 'nativeName' => 'Română', - ], - 'ru' => [ - 'isoName' => 'Russian', - 'nativeName' => 'русский', - ], - 'sa' => [ - 'isoName' => 'Sanskrit', - 'nativeName' => 'संस्कृतम्', - ], - 'sc' => [ - 'isoName' => 'Sardinian', - 'nativeName' => 'sardu', - ], - 'sd' => [ - 'isoName' => 'Sindhi', - 'nativeName' => 'सिन्धी, سنڌي، سندھی‎', - ], - 'se' => [ - 'isoName' => 'Northern Sami', - 'nativeName' => 'Davvisámegiella', - ], - 'sm' => [ - 'isoName' => 'Samoan', - 'nativeName' => 'gagana fa\'a Samoa', - ], - 'sg' => [ - 'isoName' => 'Sango', - 'nativeName' => 'yângâ tî sängö', - ], - 'sr' => [ - 'isoName' => 'Serbian', - 'nativeName' => 'српски језик', - ], - 'gd' => [ - 'isoName' => 'Gaelic, Scottish Gaelic', - 'nativeName' => 'Gàidhlig', - ], - 'sn' => [ - 'isoName' => 'Shona', - 'nativeName' => 'chiShona', - ], - 'si' => [ - 'isoName' => 'Sinhala, Sinhalese', - 'nativeName' => 'සිංහල', - ], - 'sk' => [ - 'isoName' => 'Slovak', - 'nativeName' => 'Slovenčina, Slovenský Jazyk', - ], - 'sl' => [ - 'isoName' => 'Slovene', - 'nativeName' => 'Slovenski Jezik, Slovenščina', - ], - 'so' => [ - 'isoName' => 'Somali', - 'nativeName' => 'Soomaaliga, af Soomaali', - ], - 'st' => [ - 'isoName' => 'Southern Sotho', - 'nativeName' => 'Sesotho', - ], - 'es' => [ - 'isoName' => 'Spanish, Castilian', - 'nativeName' => 'Español', - ], - 'su' => [ - 'isoName' => 'Sundanese', - 'nativeName' => 'Basa Sunda', - ], - 'sw' => [ - 'isoName' => 'Swahili', - 'nativeName' => 'Kiswahili', - ], - 'ss' => [ - 'isoName' => 'Swati', - 'nativeName' => 'SiSwati', - ], - 'sv' => [ - 'isoName' => 'Swedish', - 'nativeName' => 'Svenska', - ], - 'ta' => [ - 'isoName' => 'Tamil', - 'nativeName' => 'தமிழ்', - ], - 'te' => [ - 'isoName' => 'Telugu', - 'nativeName' => 'తెలుగు', - ], - 'tg' => [ - 'isoName' => 'Tajik', - 'nativeName' => 'тоҷикӣ, toçikī, تاجیکی‎', - ], - 'th' => [ - 'isoName' => 'Thai', - 'nativeName' => 'ไทย', - ], - 'ti' => [ - 'isoName' => 'Tigrinya', - 'nativeName' => 'ትግርኛ', - ], - 'bo' => [ - 'isoName' => 'Tibetan', - 'nativeName' => 'བོད་ཡིག', - ], - 'tk' => [ - 'isoName' => 'Turkmen', - 'nativeName' => 'Türkmen, Түркмен', - ], - 'tl' => [ - 'isoName' => 'Tagalog', - 'nativeName' => 'Wikang Tagalog', - ], - 'tn' => [ - 'isoName' => 'Tswana', - 'nativeName' => 'Setswana', - ], - 'to' => [ - 'isoName' => 'Tongan (Tonga Islands)', - 'nativeName' => 'Faka Tonga', - ], - 'tr' => [ - 'isoName' => 'Turkish', - 'nativeName' => 'Türkçe', - ], - 'ts' => [ - 'isoName' => 'Tsonga', - 'nativeName' => 'Xitsonga', - ], - 'tt' => [ - 'isoName' => 'Tatar', - 'nativeName' => 'татар теле, tatar tele', - ], - 'tw' => [ - 'isoName' => 'Twi', - 'nativeName' => 'Twi', - ], - 'ty' => [ - 'isoName' => 'Tahitian', - 'nativeName' => 'Reo Tahiti', - ], - 'ug' => [ - 'isoName' => 'Uighur, Uyghur', - 'nativeName' => 'Uyƣurqə, ‫ئۇيغۇرچ', - ], - 'uk' => [ - 'isoName' => 'Ukrainian', - 'nativeName' => 'Українська', - ], - 'ur' => [ - 'isoName' => 'Urdu', - 'nativeName' => 'اردو', - ], - 'uz' => [ - 'isoName' => 'Uzbek', - 'nativeName' => 'Oʻzbek, Ўзбек, أۇزبېك‎', - ], - 've' => [ - 'isoName' => 'Venda', - 'nativeName' => 'Tshivenḓa', - ], - 'vi' => [ - 'isoName' => 'Vietnamese', - 'nativeName' => 'Tiếng Việt', - ], - 'vo' => [ - 'isoName' => 'Volapük', - 'nativeName' => 'Volapük', - ], - 'wa' => [ - 'isoName' => 'Walloon', - 'nativeName' => 'Walon', - ], - 'cy' => [ - 'isoName' => 'Welsh', - 'nativeName' => 'Cymraeg', - ], - 'wo' => [ - 'isoName' => 'Wolof', - 'nativeName' => 'Wollof', - ], - 'fy' => [ - 'isoName' => 'Western Frisian', - 'nativeName' => 'Frysk', - ], - 'xh' => [ - 'isoName' => 'Xhosa', - 'nativeName' => 'isiXhosa', - ], - 'yi' => [ - 'isoName' => 'Yiddish', - 'nativeName' => 'ייִדיש', - ], - 'yo' => [ - 'isoName' => 'Yoruba', - 'nativeName' => 'Yorùbá', - ], - 'za' => [ - 'isoName' => 'Zhuang, Chuang', - 'nativeName' => 'Saɯ cueŋƅ, Saw cuengh', - ], - 'zu' => [ - 'isoName' => 'Zulu', - 'nativeName' => 'isiZulu', - ], - /* - * Add ISO 639-3 languages available in Carbon - */ - 'agq' => [ - 'isoName' => 'Aghem', - 'nativeName' => 'Aghem', - ], - 'agr' => [ - 'isoName' => 'Aguaruna', - 'nativeName' => 'Aguaruna', - ], - 'anp' => [ - 'isoName' => 'Angika', - 'nativeName' => 'Angika', - ], - 'asa' => [ - 'isoName' => 'Asu', - 'nativeName' => 'Asu', - ], - 'ast' => [ - 'isoName' => 'Asturian', - 'nativeName' => 'Asturian', - ], - 'ayc' => [ - 'isoName' => 'Southern Aymara', - 'nativeName' => 'Southern Aymara', - ], - 'bas' => [ - 'isoName' => 'Basaa', - 'nativeName' => 'Basaa', - ], - 'bem' => [ - 'isoName' => 'Bemba', - 'nativeName' => 'Bemba', - ], - 'bez' => [ - 'isoName' => 'Bena', - 'nativeName' => 'Bena', - ], - 'bhb' => [ - 'isoName' => 'Bhili', - 'nativeName' => 'Bhili', - ], - 'bho' => [ - 'isoName' => 'Bhojpuri', - 'nativeName' => 'Bhojpuri', - ], - 'brx' => [ - 'isoName' => 'Bodo', - 'nativeName' => 'Bodo', - ], - 'byn' => [ - 'isoName' => 'Bilin', - 'nativeName' => 'Bilin', - ], - 'ccp' => [ - 'isoName' => 'Chakma', - 'nativeName' => 'Chakma', - ], - 'cgg' => [ - 'isoName' => 'Chiga', - 'nativeName' => 'Chiga', - ], - 'chr' => [ - 'isoName' => 'Cherokee', - 'nativeName' => 'Cherokee', - ], - 'cmn' => [ - 'isoName' => 'Chinese', - 'nativeName' => 'Chinese', - ], - 'crh' => [ - 'isoName' => 'Crimean Turkish', - 'nativeName' => 'Crimean Turkish', - ], - 'csb' => [ - 'isoName' => 'Kashubian', - 'nativeName' => 'Kashubian', - ], - 'dav' => [ - 'isoName' => 'Taita', - 'nativeName' => 'Taita', - ], - 'dje' => [ - 'isoName' => 'Zarma', - 'nativeName' => 'Zarma', - ], - 'doi' => [ - 'isoName' => 'Dogri (macrolanguage)', - 'nativeName' => 'Dogri (macrolanguage)', - ], - 'dsb' => [ - 'isoName' => 'Lower Sorbian', - 'nativeName' => 'Lower Sorbian', - ], - 'dua' => [ - 'isoName' => 'Duala', - 'nativeName' => 'Duala', - ], - 'dyo' => [ - 'isoName' => 'Jola-Fonyi', - 'nativeName' => 'Jola-Fonyi', - ], - 'ebu' => [ - 'isoName' => 'Embu', - 'nativeName' => 'Embu', - ], - 'ewo' => [ - 'isoName' => 'Ewondo', - 'nativeName' => 'Ewondo', - ], - 'fil' => [ - 'isoName' => 'Filipino', - 'nativeName' => 'Filipino', - ], - 'fur' => [ - 'isoName' => 'Friulian', - 'nativeName' => 'Friulian', - ], - 'gez' => [ - 'isoName' => 'Geez', - 'nativeName' => 'Geez', - ], - 'gom' => [ - 'isoName' => 'Konkani, Goan', - 'nativeName' => 'ಕೊಂಕಣಿ', - ], - 'gsw' => [ - 'isoName' => 'Swiss German', - 'nativeName' => 'Swiss German', - ], - 'guz' => [ - 'isoName' => 'Gusii', - 'nativeName' => 'Gusii', - ], - 'hak' => [ - 'isoName' => 'Hakka Chinese', - 'nativeName' => 'Hakka Chinese', - ], - 'haw' => [ - 'isoName' => 'Hawaiian', - 'nativeName' => 'Hawaiian', - ], - 'hif' => [ - 'isoName' => 'Fiji Hindi', - 'nativeName' => 'Fiji Hindi', - ], - 'hne' => [ - 'isoName' => 'Chhattisgarhi', - 'nativeName' => 'Chhattisgarhi', - ], - 'hsb' => [ - 'isoName' => 'Upper Sorbian', - 'nativeName' => 'Upper Sorbian', - ], - 'jgo' => [ - 'isoName' => 'Ngomba', - 'nativeName' => 'Ngomba', - ], - 'jmc' => [ - 'isoName' => 'Machame', - 'nativeName' => 'Machame', - ], - 'kab' => [ - 'isoName' => 'Kabyle', - 'nativeName' => 'Kabyle', - ], - 'kam' => [ - 'isoName' => 'Kamba', - 'nativeName' => 'Kamba', - ], - 'kde' => [ - 'isoName' => 'Makonde', - 'nativeName' => 'Makonde', - ], - 'kea' => [ - 'isoName' => 'Kabuverdianu', - 'nativeName' => 'Kabuverdianu', - ], - 'khq' => [ - 'isoName' => 'Koyra Chiini', - 'nativeName' => 'Koyra Chiini', - ], - 'kkj' => [ - 'isoName' => 'Kako', - 'nativeName' => 'Kako', - ], - 'kln' => [ - 'isoName' => 'Kalenjin', - 'nativeName' => 'Kalenjin', - ], - 'kok' => [ - 'isoName' => 'Konkani', - 'nativeName' => 'Konkani', - ], - 'ksb' => [ - 'isoName' => 'Shambala', - 'nativeName' => 'Shambala', - ], - 'ksf' => [ - 'isoName' => 'Bafia', - 'nativeName' => 'Bafia', - ], - 'ksh' => [ - 'isoName' => 'Colognian', - 'nativeName' => 'Colognian', - ], - 'lag' => [ - 'isoName' => 'Langi', - 'nativeName' => 'Langi', - ], - 'lij' => [ - 'isoName' => 'Ligurian', - 'nativeName' => 'Ligurian', - ], - 'lkt' => [ - 'isoName' => 'Lakota', - 'nativeName' => 'Lakota', - ], - 'lrc' => [ - 'isoName' => 'Northern Luri', - 'nativeName' => 'Northern Luri', - ], - 'luo' => [ - 'isoName' => 'Luo', - 'nativeName' => 'Luo', - ], - 'luy' => [ - 'isoName' => 'Luyia', - 'nativeName' => 'Luyia', - ], - 'lzh' => [ - 'isoName' => 'Literary Chinese', - 'nativeName' => 'Literary Chinese', - ], - 'mag' => [ - 'isoName' => 'Magahi', - 'nativeName' => 'Magahi', - ], - 'mai' => [ - 'isoName' => 'Maithili', - 'nativeName' => 'Maithili', - ], - 'mas' => [ - 'isoName' => 'Masai', - 'nativeName' => 'Masai', - ], - 'mer' => [ - 'isoName' => 'Meru', - 'nativeName' => 'Meru', - ], - 'mfe' => [ - 'isoName' => 'Morisyen', - 'nativeName' => 'Morisyen', - ], - 'mgh' => [ - 'isoName' => 'Makhuwa-Meetto', - 'nativeName' => 'Makhuwa-Meetto', - ], - 'mgo' => [ - 'isoName' => 'Metaʼ', - 'nativeName' => 'Metaʼ', - ], - 'mhr' => [ - 'isoName' => 'Eastern Mari', - 'nativeName' => 'Eastern Mari', - ], - 'miq' => [ - 'isoName' => 'Mískito', - 'nativeName' => 'Mískito', - ], - 'mjw' => [ - 'isoName' => 'Karbi', - 'nativeName' => 'Karbi', - ], - 'mni' => [ - 'isoName' => 'Manipuri', - 'nativeName' => 'Manipuri', - ], - 'mua' => [ - 'isoName' => 'Mundang', - 'nativeName' => 'Mundang', - ], - 'mzn' => [ - 'isoName' => 'Mazanderani', - 'nativeName' => 'Mazanderani', - ], - 'nan' => [ - 'isoName' => 'Min Nan Chinese', - 'nativeName' => 'Min Nan Chinese', - ], - 'naq' => [ - 'isoName' => 'Nama', - 'nativeName' => 'Nama', - ], - 'nds' => [ - 'isoName' => 'Low German', - 'nativeName' => 'Low German', - ], - 'nhn' => [ - 'isoName' => 'Central Nahuatl', - 'nativeName' => 'Central Nahuatl', - ], - 'niu' => [ - 'isoName' => 'Niuean', - 'nativeName' => 'Niuean', - ], - 'nmg' => [ - 'isoName' => 'Kwasio', - 'nativeName' => 'Kwasio', - ], - 'nnh' => [ - 'isoName' => 'Ngiemboon', - 'nativeName' => 'Ngiemboon', - ], - 'nso' => [ - 'isoName' => 'Northern Sotho', - 'nativeName' => 'Northern Sotho', - ], - 'nus' => [ - 'isoName' => 'Nuer', - 'nativeName' => 'Nuer', - ], - 'nyn' => [ - 'isoName' => 'Nyankole', - 'nativeName' => 'Nyankole', - ], - 'pap' => [ - 'isoName' => 'Papiamento', - 'nativeName' => 'Papiamento', - ], - 'prg' => [ - 'isoName' => 'Prussian', - 'nativeName' => 'Prussian', - ], - 'quz' => [ - 'isoName' => 'Cusco Quechua', - 'nativeName' => 'Cusco Quechua', - ], - 'raj' => [ - 'isoName' => 'Rajasthani', - 'nativeName' => 'Rajasthani', - ], - 'rof' => [ - 'isoName' => 'Rombo', - 'nativeName' => 'Rombo', - ], - 'rwk' => [ - 'isoName' => 'Rwa', - 'nativeName' => 'Rwa', - ], - 'sah' => [ - 'isoName' => 'Sakha', - 'nativeName' => 'Sakha', - ], - 'saq' => [ - 'isoName' => 'Samburu', - 'nativeName' => 'Samburu', - ], - 'sat' => [ - 'isoName' => 'Santali', - 'nativeName' => 'Santali', - ], - 'sbp' => [ - 'isoName' => 'Sangu', - 'nativeName' => 'Sangu', - ], - 'scr' => [ - 'isoName' => 'Serbo Croatian', - 'nativeName' => 'Serbo Croatian', - ], - 'seh' => [ - 'isoName' => 'Sena', - 'nativeName' => 'Sena', - ], - 'ses' => [ - 'isoName' => 'Koyraboro Senni', - 'nativeName' => 'Koyraboro Senni', - ], - 'sgs' => [ - 'isoName' => 'Samogitian', - 'nativeName' => 'Samogitian', - ], - 'shi' => [ - 'isoName' => 'Tachelhit', - 'nativeName' => 'Tachelhit', - ], - 'shn' => [ - 'isoName' => 'Shan', - 'nativeName' => 'Shan', - ], - 'shs' => [ - 'isoName' => 'Shuswap', - 'nativeName' => 'Shuswap', - ], - 'sid' => [ - 'isoName' => 'Sidamo', - 'nativeName' => 'Sidamo', - ], - 'smn' => [ - 'isoName' => 'Inari Sami', - 'nativeName' => 'Inari Sami', - ], - 'szl' => [ - 'isoName' => 'Silesian', - 'nativeName' => 'Silesian', - ], - 'tcy' => [ - 'isoName' => 'Tulu', - 'nativeName' => 'Tulu', - ], - 'teo' => [ - 'isoName' => 'Teso', - 'nativeName' => 'Teso', - ], - 'tet' => [ - 'isoName' => 'Tetum', - 'nativeName' => 'Tetum', - ], - 'the' => [ - 'isoName' => 'Chitwania Tharu', - 'nativeName' => 'Chitwania Tharu', - ], - 'tig' => [ - 'isoName' => 'Tigre', - 'nativeName' => 'Tigre', - ], - 'tlh' => [ - 'isoName' => 'Klingon', - 'nativeName' => 'tlhIngan Hol', - ], - 'tpi' => [ - 'isoName' => 'Tok Pisin', - 'nativeName' => 'Tok Pisin', - ], - 'twq' => [ - 'isoName' => 'Tasawaq', - 'nativeName' => 'Tasawaq', - ], - 'tzl' => [ - 'isoName' => 'Talossan', - 'nativeName' => 'Talossan', - ], - 'tzm' => [ - 'isoName' => 'Tamazight, Central Atlas', - 'nativeName' => 'ⵜⵎⴰⵣⵉⵖⵜ', - ], - 'unm' => [ - 'isoName' => 'Unami', - 'nativeName' => 'Unami', - ], - 'vai' => [ - 'isoName' => 'Vai', - 'nativeName' => 'Vai', - ], - 'vun' => [ - 'isoName' => 'Vunjo', - 'nativeName' => 'Vunjo', - ], - 'wae' => [ - 'isoName' => 'Walser', - 'nativeName' => 'Walser', - ], - 'wal' => [ - 'isoName' => 'Wolaytta', - 'nativeName' => 'Wolaytta', - ], - 'xog' => [ - 'isoName' => 'Soga', - 'nativeName' => 'Soga', - ], - 'yav' => [ - 'isoName' => 'Yangben', - 'nativeName' => 'Yangben', - ], - 'yue' => [ - 'isoName' => 'Cantonese', - 'nativeName' => 'Cantonese', - ], - 'yuw' => [ - 'isoName' => 'Yau (Morobe Province)', - 'nativeName' => 'Yau (Morobe Province)', - ], - 'zgh' => [ - 'isoName' => 'Standard Moroccan Tamazight', - 'nativeName' => 'Standard Moroccan Tamazight', - ], -]; diff --git a/vendor/nesbot/carbon/src/Carbon/List/regions.php b/vendor/nesbot/carbon/src/Carbon/List/regions.php deleted file mode 100644 index 8ab8a9e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/List/regions.php +++ /dev/null @@ -1,265 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/* - * ISO 3166-2 - */ -return [ - 'AD' => 'Andorra', - 'AE' => 'United Arab Emirates', - 'AF' => 'Afghanistan', - 'AG' => 'Antigua and Barbuda', - 'AI' => 'Anguilla', - 'AL' => 'Albania', - 'AM' => 'Armenia', - 'AO' => 'Angola', - 'AQ' => 'Antarctica', - 'AR' => 'Argentina', - 'AS' => 'American Samoa', - 'AT' => 'Austria', - 'AU' => 'Australia', - 'AW' => 'Aruba', - 'AX' => 'Åland Islands', - 'AZ' => 'Azerbaijan', - 'BA' => 'Bosnia and Herzegovina', - 'BB' => 'Barbados', - 'BD' => 'Bangladesh', - 'BE' => 'Belgium', - 'BF' => 'Burkina Faso', - 'BG' => 'Bulgaria', - 'BH' => 'Bahrain', - 'BI' => 'Burundi', - 'BJ' => 'Benin', - 'BL' => 'Saint Barthélemy', - 'BM' => 'Bermuda', - 'BN' => 'Brunei Darussalam', - 'BO' => 'Bolivia (Plurinational State of)', - 'BQ' => 'Bonaire, Sint Eustatius and Saba', - 'BR' => 'Brazil', - 'BS' => 'Bahamas', - 'BT' => 'Bhutan', - 'BV' => 'Bouvet Island', - 'BW' => 'Botswana', - 'BY' => 'Belarus', - 'BZ' => 'Belize', - 'CA' => 'Canada', - 'CC' => 'Cocos (Keeling) Islands', - 'CD' => 'Congo, Democratic Republic of the', - 'CF' => 'Central African Republic', - 'CG' => 'Congo', - 'CH' => 'Switzerland', - 'CI' => 'Côte d\'Ivoire', - 'CK' => 'Cook Islands', - 'CL' => 'Chile', - 'CM' => 'Cameroon', - 'CN' => 'China', - 'CO' => 'Colombia', - 'CR' => 'Costa Rica', - 'CU' => 'Cuba', - 'CV' => 'Cabo Verde', - 'CW' => 'Curaçao', - 'CX' => 'Christmas Island', - 'CY' => 'Cyprus', - 'CZ' => 'Czechia', - 'DE' => 'Germany', - 'DJ' => 'Djibouti', - 'DK' => 'Denmark', - 'DM' => 'Dominica', - 'DO' => 'Dominican Republic', - 'DZ' => 'Algeria', - 'EC' => 'Ecuador', - 'EE' => 'Estonia', - 'EG' => 'Egypt', - 'EH' => 'Western Sahara', - 'ER' => 'Eritrea', - 'ES' => 'Spain', - 'ET' => 'Ethiopia', - 'FI' => 'Finland', - 'FJ' => 'Fiji', - 'FK' => 'Falkland Islands (Malvinas)', - 'FM' => 'Micronesia (Federated States of)', - 'FO' => 'Faroe Islands', - 'FR' => 'France', - 'GA' => 'Gabon', - 'GB' => 'United Kingdom of Great Britain and Northern Ireland', - 'GD' => 'Grenada', - 'GE' => 'Georgia', - 'GF' => 'French Guiana', - 'GG' => 'Guernsey', - 'GH' => 'Ghana', - 'GI' => 'Gibraltar', - 'GL' => 'Greenland', - 'GM' => 'Gambia', - 'GN' => 'Guinea', - 'GP' => 'Guadeloupe', - 'GQ' => 'Equatorial Guinea', - 'GR' => 'Greece', - 'GS' => 'South Georgia and the South Sandwich Islands', - 'GT' => 'Guatemala', - 'GU' => 'Guam', - 'GW' => 'Guinea-Bissau', - 'GY' => 'Guyana', - 'HK' => 'Hong Kong', - 'HM' => 'Heard Island and McDonald Islands', - 'HN' => 'Honduras', - 'HR' => 'Croatia', - 'HT' => 'Haiti', - 'HU' => 'Hungary', - 'ID' => 'Indonesia', - 'IE' => 'Ireland', - 'IL' => 'Israel', - 'IM' => 'Isle of Man', - 'IN' => 'India', - 'IO' => 'British Indian Ocean Territory', - 'IQ' => 'Iraq', - 'IR' => 'Iran (Islamic Republic of)', - 'IS' => 'Iceland', - 'IT' => 'Italy', - 'JE' => 'Jersey', - 'JM' => 'Jamaica', - 'JO' => 'Jordan', - 'JP' => 'Japan', - 'KE' => 'Kenya', - 'KG' => 'Kyrgyzstan', - 'KH' => 'Cambodia', - 'KI' => 'Kiribati', - 'KM' => 'Comoros', - 'KN' => 'Saint Kitts and Nevis', - 'KP' => 'Korea (Democratic People\'s Republic of)', - 'KR' => 'Korea, Republic of', - 'KW' => 'Kuwait', - 'KY' => 'Cayman Islands', - 'KZ' => 'Kazakhstan', - 'LA' => 'Lao People\'s Democratic Republic', - 'LB' => 'Lebanon', - 'LC' => 'Saint Lucia', - 'LI' => 'Liechtenstein', - 'LK' => 'Sri Lanka', - 'LR' => 'Liberia', - 'LS' => 'Lesotho', - 'LT' => 'Lithuania', - 'LU' => 'Luxembourg', - 'LV' => 'Latvia', - 'LY' => 'Libya', - 'MA' => 'Morocco', - 'MC' => 'Monaco', - 'MD' => 'Moldova, Republic of', - 'ME' => 'Montenegro', - 'MF' => 'Saint Martin (French part)', - 'MG' => 'Madagascar', - 'MH' => 'Marshall Islands', - 'MK' => 'Macedonia, the former Yugoslav Republic of', - 'ML' => 'Mali', - 'MM' => 'Myanmar', - 'MN' => 'Mongolia', - 'MO' => 'Macao', - 'MP' => 'Northern Mariana Islands', - 'MQ' => 'Martinique', - 'MR' => 'Mauritania', - 'MS' => 'Montserrat', - 'MT' => 'Malta', - 'MU' => 'Mauritius', - 'MV' => 'Maldives', - 'MW' => 'Malawi', - 'MX' => 'Mexico', - 'MY' => 'Malaysia', - 'MZ' => 'Mozambique', - 'NA' => 'Namibia', - 'NC' => 'New Caledonia', - 'NE' => 'Niger', - 'NF' => 'Norfolk Island', - 'NG' => 'Nigeria', - 'NI' => 'Nicaragua', - 'NL' => 'Netherlands', - 'NO' => 'Norway', - 'NP' => 'Nepal', - 'NR' => 'Nauru', - 'NU' => 'Niue', - 'NZ' => 'New Zealand', - 'OM' => 'Oman', - 'PA' => 'Panama', - 'PE' => 'Peru', - 'PF' => 'French Polynesia', - 'PG' => 'Papua New Guinea', - 'PH' => 'Philippines', - 'PK' => 'Pakistan', - 'PL' => 'Poland', - 'PM' => 'Saint Pierre and Miquelon', - 'PN' => 'Pitcairn', - 'PR' => 'Puerto Rico', - 'PS' => 'Palestine, State of', - 'PT' => 'Portugal', - 'PW' => 'Palau', - 'PY' => 'Paraguay', - 'QA' => 'Qatar', - 'RE' => 'Réunion', - 'RO' => 'Romania', - 'RS' => 'Serbia', - 'RU' => 'Russian Federation', - 'RW' => 'Rwanda', - 'SA' => 'Saudi Arabia', - 'SB' => 'Solomon Islands', - 'SC' => 'Seychelles', - 'SD' => 'Sudan', - 'SE' => 'Sweden', - 'SG' => 'Singapore', - 'SH' => 'Saint Helena, Ascension and Tristan da Cunha', - 'SI' => 'Slovenia', - 'SJ' => 'Svalbard and Jan Mayen', - 'SK' => 'Slovakia', - 'SL' => 'Sierra Leone', - 'SM' => 'San Marino', - 'SN' => 'Senegal', - 'SO' => 'Somalia', - 'SR' => 'Suriname', - 'SS' => 'South Sudan', - 'ST' => 'Sao Tome and Principe', - 'SV' => 'El Salvador', - 'SX' => 'Sint Maarten (Dutch part)', - 'SY' => 'Syrian Arab Republic', - 'SZ' => 'Eswatini', - 'TC' => 'Turks and Caicos Islands', - 'TD' => 'Chad', - 'TF' => 'French Southern Territories', - 'TG' => 'Togo', - 'TH' => 'Thailand', - 'TJ' => 'Tajikistan', - 'TK' => 'Tokelau', - 'TL' => 'Timor-Leste', - 'TM' => 'Turkmenistan', - 'TN' => 'Tunisia', - 'TO' => 'Tonga', - 'TR' => 'Turkey', - 'TT' => 'Trinidad and Tobago', - 'TV' => 'Tuvalu', - 'TW' => 'Taiwan, Province of China', - 'TZ' => 'Tanzania, United Republic of', - 'UA' => 'Ukraine', - 'UG' => 'Uganda', - 'UM' => 'United States Minor Outlying Islands', - 'US' => 'United States of America', - 'UY' => 'Uruguay', - 'UZ' => 'Uzbekistan', - 'VA' => 'Holy See', - 'VC' => 'Saint Vincent and the Grenadines', - 'VE' => 'Venezuela (Bolivarian Republic of)', - 'VG' => 'Virgin Islands (British)', - 'VI' => 'Virgin Islands (U.S.)', - 'VN' => 'Viet Nam', - 'VU' => 'Vanuatu', - 'WF' => 'Wallis and Futuna', - 'WS' => 'Samoa', - 'YE' => 'Yemen', - 'YT' => 'Mayotte', - 'ZA' => 'South Africa', - 'ZM' => 'Zambia', - 'ZW' => 'Zimbabwe', -]; diff --git a/vendor/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php b/vendor/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php deleted file mode 100644 index c054808..0000000 --- a/vendor/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\MessageFormatter; - -use ReflectionMethod; -use Symfony\Component\Translation\Formatter\MessageFormatter; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; - -// @codeCoverageIgnoreStart -$transMethod = new ReflectionMethod(MessageFormatterInterface::class, 'format'); - -require $transMethod->getParameters()[0]->hasType() - ? __DIR__.'/../../../lazy/Carbon/MessageFormatter/MessageFormatterMapperStrongType.php' - : __DIR__.'/../../../lazy/Carbon/MessageFormatter/MessageFormatterMapperWeakType.php'; -// @codeCoverageIgnoreEnd - -final class MessageFormatterMapper extends LazyMessageFormatter -{ - /** - * Wrapped formatter. - * - * @var MessageFormatterInterface - */ - protected $formatter; - - public function __construct(?MessageFormatterInterface $formatter = null) - { - $this->formatter = $formatter ?? new MessageFormatter(); - } - - protected function transformLocale(?string $locale): ?string - { - return $locale ? preg_replace('/[_@][A-Za-z][a-z]{2,}/', '', $locale) : $locale; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php b/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php deleted file mode 100644 index fde67b3..0000000 --- a/vendor/nesbot/carbon/src/Carbon/PHPStan/AbstractMacro.php +++ /dev/null @@ -1,286 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\PHPStan; - -use Closure; -use InvalidArgumentException; -use PHPStan\BetterReflection\Reflection\Adapter\ReflectionParameter as AdapterReflectionParameter; -use PHPStan\BetterReflection\Reflection\Adapter\ReflectionType as AdapterReflectionType; -use PHPStan\BetterReflection\Reflection\ReflectionClass as BetterReflectionClass; -use PHPStan\BetterReflection\Reflection\ReflectionFunction as BetterReflectionFunction; -use PHPStan\BetterReflection\Reflection\ReflectionParameter as BetterReflectionParameter; -use PHPStan\Reflection\Php\BuiltinMethodReflection; -use PHPStan\TrinaryLogic; -use ReflectionClass; -use ReflectionFunction; -use ReflectionMethod; -use ReflectionParameter; -use ReflectionType; -use stdClass; -use Throwable; - -abstract class AbstractMacro implements BuiltinMethodReflection -{ - /** - * The reflection function/method. - * - * @var ReflectionFunction|ReflectionMethod - */ - protected $reflectionFunction; - - /** - * The class name. - * - * @var class-string - */ - private $className; - - /** - * The method name. - * - * @var string - */ - private $methodName; - - /** - * The parameters. - * - * @var ReflectionParameter[] - */ - private $parameters; - - /** - * The is static. - * - * @var bool - */ - private $static = false; - - /** - * Macro constructor. - * - * @param class-string $className - * @param string $methodName - * @param callable $macro - */ - public function __construct(string $className, string $methodName, $macro) - { - $this->className = $className; - $this->methodName = $methodName; - $rawReflectionFunction = \is_array($macro) - ? new ReflectionMethod($macro[0], $macro[1]) - : new ReflectionFunction($macro); - $this->reflectionFunction = self::hasModernParser() - ? $this->getReflectionFunction($macro) - : $rawReflectionFunction; // @codeCoverageIgnore - $this->parameters = array_map( - function ($parameter) { - if ($parameter instanceof BetterReflectionParameter) { - return new AdapterReflectionParameter($parameter); - } - - return $parameter; // @codeCoverageIgnore - }, - $this->reflectionFunction->getParameters() - ); - - if ($rawReflectionFunction->isClosure()) { - try { - $closure = $rawReflectionFunction->getClosure(); - $boundClosure = Closure::bind($closure, new stdClass()); - $this->static = (!$boundClosure || (new ReflectionFunction($boundClosure))->getClosureThis() === null); - } catch (Throwable $e) { - $this->static = true; - } - } - } - - private function getReflectionFunction($spec) - { - if (\is_array($spec) && \count($spec) === 2 && \is_string($spec[1])) { - \assert($spec[1] !== ''); - - if (\is_object($spec[0])) { - return BetterReflectionClass::createFromInstance($spec[0]) - ->getMethod($spec[1]); - } - - return BetterReflectionClass::createFromName($spec[0]) - ->getMethod($spec[1]); - } - - if (\is_string($spec)) { - return BetterReflectionFunction::createFromName($spec); - } - - if ($spec instanceof Closure) { - return BetterReflectionFunction::createFromClosure($spec); - } - - throw new InvalidArgumentException('Could not create reflection from the spec given'); // @codeCoverageIgnore - } - - /** - * {@inheritdoc} - */ - public function getDeclaringClass(): ReflectionClass - { - return new ReflectionClass($this->className); - } - - /** - * {@inheritdoc} - */ - public function isPrivate(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isPublic(): bool - { - return true; - } - - /** - * {@inheritdoc} - */ - public function isFinal(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isInternal(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isAbstract(): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - public function isStatic(): bool - { - return $this->static; - } - - /** - * {@inheritdoc} - */ - public function getDocComment(): ?string - { - return $this->reflectionFunction->getDocComment() ?: null; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return $this->methodName; - } - - /** - * {@inheritdoc} - */ - public function getParameters(): array - { - return $this->parameters; - } - - /** - * {@inheritdoc} - */ - public function getReturnType(): ?ReflectionType - { - $type = $this->reflectionFunction->getReturnType(); - - if ($type instanceof ReflectionType) { - return $type; // @codeCoverageIgnore - } - - return self::adaptType($type); - } - - /** - * {@inheritdoc} - */ - public function isDeprecated(): TrinaryLogic - { - return TrinaryLogic::createFromBoolean( - $this->reflectionFunction->isDeprecated() || - preg_match('/@deprecated/i', $this->getDocComment() ?: '') - ); - } - - /** - * {@inheritdoc} - */ - public function isVariadic(): bool - { - return $this->reflectionFunction->isVariadic(); - } - - /** - * {@inheritdoc} - */ - public function getPrototype(): BuiltinMethodReflection - { - return $this; - } - - public function getTentativeReturnType(): ?ReflectionType - { - return null; - } - - public function returnsByReference(): TrinaryLogic - { - return TrinaryLogic::createNo(); - } - - private static function adaptType($type) - { - $method = method_exists(AdapterReflectionType::class, 'fromTypeOrNull') - ? 'fromTypeOrNull' - : 'fromReturnTypeOrNull'; // @codeCoverageIgnore - - return AdapterReflectionType::$method($type); - } - - private static function hasModernParser(): bool - { - static $modernParser = null; - - if ($modernParser !== null) { - return $modernParser; - } - - $modernParser = method_exists(AdapterReflectionType::class, 'fromTypeOrNull'); - - return $modernParser; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php b/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php deleted file mode 100644 index de3e51f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/PHPStan/Macro.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\PHPStan; - -use PHPStan\BetterReflection\Reflection\Adapter; -use PHPStan\Reflection\Php\BuiltinMethodReflection; -use ReflectionMethod; - -$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getReflection'); - -require $method->hasReturnType() && $method->getReturnType()->getName() === Adapter\ReflectionMethod::class - ? __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroStatic.php' - : __DIR__.'/../../../lazy/Carbon/PHPStan/AbstractMacroBuiltin.php'; - -$method = new ReflectionMethod(BuiltinMethodReflection::class, 'getFileName'); - -require $method->hasReturnType() - ? __DIR__.'/../../../lazy/Carbon/PHPStan/MacroStrongType.php' - : __DIR__.'/../../../lazy/Carbon/PHPStan/MacroWeakType.php'; - -final class Macro extends LazyMacro -{ -} diff --git a/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php b/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php deleted file mode 100644 index 2cd6fce..0000000 --- a/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroExtension.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\PHPStan; - -use PHPStan\Reflection\Assertions; -use PHPStan\Reflection\ClassReflection; -use PHPStan\Reflection\MethodReflection; -use PHPStan\Reflection\MethodsClassReflectionExtension; -use PHPStan\Reflection\Php\PhpMethodReflectionFactory; -use PHPStan\Reflection\ReflectionProvider; -use PHPStan\Type\TypehintHelper; - -/** - * Class MacroExtension. - * - * @codeCoverageIgnore Pure PHPStan wrapper. - */ -final class MacroExtension implements MethodsClassReflectionExtension -{ - /** - * @var PhpMethodReflectionFactory - */ - protected $methodReflectionFactory; - - /** - * @var MacroScanner - */ - protected $scanner; - - /** - * Extension constructor. - * - * @param PhpMethodReflectionFactory $methodReflectionFactory - * @param ReflectionProvider $reflectionProvider - */ - public function __construct( - PhpMethodReflectionFactory $methodReflectionFactory, - ReflectionProvider $reflectionProvider - ) { - $this->scanner = new MacroScanner($reflectionProvider); - $this->methodReflectionFactory = $methodReflectionFactory; - } - - /** - * {@inheritdoc} - */ - public function hasMethod(ClassReflection $classReflection, string $methodName): bool - { - return $this->scanner->hasMethod($classReflection->getName(), $methodName); - } - - /** - * {@inheritdoc} - */ - public function getMethod(ClassReflection $classReflection, string $methodName): MethodReflection - { - $builtinMacro = $this->scanner->getMethod($classReflection->getName(), $methodName); - $supportAssertions = class_exists(Assertions::class); - - return $this->methodReflectionFactory->create( - $classReflection, - null, - $builtinMacro, - $classReflection->getActiveTemplateTypeMap(), - [], - TypehintHelper::decideTypeFromReflection($builtinMacro->getReturnType()), - null, - null, - $builtinMacro->isDeprecated()->yes(), - $builtinMacro->isInternal(), - $builtinMacro->isFinal(), - $supportAssertions ? null : $builtinMacro->getDocComment(), - $supportAssertions ? Assertions::createEmpty() : null, - null, - $builtinMacro->getDocComment(), - [] - ); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php b/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php deleted file mode 100644 index eb8957d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/PHPStan/MacroScanner.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\PHPStan; - -use Carbon\CarbonInterface; -use PHPStan\Reflection\ReflectionProvider; -use ReflectionClass; -use ReflectionException; - -final class MacroScanner -{ - /** - * @var \PHPStan\Reflection\ReflectionProvider - */ - private $reflectionProvider; - - /** - * MacroScanner constructor. - * - * @param \PHPStan\Reflection\ReflectionProvider $reflectionProvider - */ - public function __construct(ReflectionProvider $reflectionProvider) - { - $this->reflectionProvider = $reflectionProvider; - } - - /** - * Return true if the given pair class-method is a Carbon macro. - * - * @param class-string $className - * @param string $methodName - * - * @return bool - */ - public function hasMethod(string $className, string $methodName): bool - { - $classReflection = $this->reflectionProvider->getClass($className); - - if ( - $classReflection->getName() !== CarbonInterface::class && - !$classReflection->isSubclassOf(CarbonInterface::class) - ) { - return false; - } - - return \is_callable([$className, 'hasMacro']) && - $className::hasMacro($methodName); - } - - /** - * Return the Macro for a given pair class-method. - * - * @param class-string $className - * @param string $methodName - * - * @throws ReflectionException - * - * @return Macro - */ - public function getMethod(string $className, string $methodName): Macro - { - $reflectionClass = new ReflectionClass($className); - $property = $reflectionClass->getProperty('globalMacros'); - - $property->setAccessible(true); - $macro = $property->getValue()[$methodName]; - - return new Macro( - $className, - $methodName, - $macro - ); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php b/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php deleted file mode 100644 index 71bbb72..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Boundaries.php +++ /dev/null @@ -1,443 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\Exceptions\UnknownUnitException; - -/** - * Trait Boundaries. - * - * startOf, endOf and derived method for each unit. - * - * Depends on the following properties: - * - * @property int $year - * @property int $month - * @property int $daysInMonth - * @property int $quarter - * - * Depends on the following methods: - * - * @method $this setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) - * @method $this setDate(int $year, int $month, int $day) - * @method $this addMonths(int $value = 1) - */ -trait Boundaries -{ - /** - * Resets the time to 00:00:00 start of day - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfDay(); - * ``` - * - * @return static - */ - public function startOfDay() - { - return $this->setTime(0, 0, 0, 0); - } - - /** - * Resets the time to 23:59:59.999999 end of day - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfDay(); - * ``` - * - * @return static - */ - public function endOfDay() - { - return $this->setTime(static::HOURS_PER_DAY - 1, static::MINUTES_PER_HOUR - 1, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); - } - - /** - * Resets the date to the first day of the month and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfMonth(); - * ``` - * - * @return static - */ - public function startOfMonth() - { - return $this->setDate($this->year, $this->month, 1)->startOfDay(); - } - - /** - * Resets the date to end of the month and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfMonth(); - * ``` - * - * @return static - */ - public function endOfMonth() - { - return $this->setDate($this->year, $this->month, $this->daysInMonth)->endOfDay(); - } - - /** - * Resets the date to the first day of the quarter and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfQuarter(); - * ``` - * - * @return static - */ - public function startOfQuarter() - { - $month = ($this->quarter - 1) * static::MONTHS_PER_QUARTER + 1; - - return $this->setDate($this->year, $month, 1)->startOfDay(); - } - - /** - * Resets the date to end of the quarter and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfQuarter(); - * ``` - * - * @return static - */ - public function endOfQuarter() - { - return $this->startOfQuarter()->addMonths(static::MONTHS_PER_QUARTER - 1)->endOfMonth(); - } - - /** - * Resets the date to the first day of the year and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfYear(); - * ``` - * - * @return static - */ - public function startOfYear() - { - return $this->setDate($this->year, 1, 1)->startOfDay(); - } - - /** - * Resets the date to end of the year and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfYear(); - * ``` - * - * @return static - */ - public function endOfYear() - { - return $this->setDate($this->year, 12, 31)->endOfDay(); - } - - /** - * Resets the date to the first day of the decade and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfDecade(); - * ``` - * - * @return static - */ - public function startOfDecade() - { - $year = $this->year - $this->year % static::YEARS_PER_DECADE; - - return $this->setDate($year, 1, 1)->startOfDay(); - } - - /** - * Resets the date to end of the decade and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfDecade(); - * ``` - * - * @return static - */ - public function endOfDecade() - { - $year = $this->year - $this->year % static::YEARS_PER_DECADE + static::YEARS_PER_DECADE - 1; - - return $this->setDate($year, 12, 31)->endOfDay(); - } - - /** - * Resets the date to the first day of the century and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfCentury(); - * ``` - * - * @return static - */ - public function startOfCentury() - { - $year = $this->year - ($this->year - 1) % static::YEARS_PER_CENTURY; - - return $this->setDate($year, 1, 1)->startOfDay(); - } - - /** - * Resets the date to end of the century and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfCentury(); - * ``` - * - * @return static - */ - public function endOfCentury() - { - $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_CENTURY + static::YEARS_PER_CENTURY; - - return $this->setDate($year, 12, 31)->endOfDay(); - } - - /** - * Resets the date to the first day of the millennium and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfMillennium(); - * ``` - * - * @return static - */ - public function startOfMillennium() - { - $year = $this->year - ($this->year - 1) % static::YEARS_PER_MILLENNIUM; - - return $this->setDate($year, 1, 1)->startOfDay(); - } - - /** - * Resets the date to end of the millennium and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfMillennium(); - * ``` - * - * @return static - */ - public function endOfMillennium() - { - $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_MILLENNIUM + static::YEARS_PER_MILLENNIUM; - - return $this->setDate($year, 12, 31)->endOfDay(); - } - - /** - * Resets the date to the first day of week (defined in $weekStartsAt) and the time to 00:00:00 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek() . "\n"; - * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->startOfWeek() . "\n"; - * echo Carbon::parse('2018-07-25 12:45:16')->startOfWeek(Carbon::SUNDAY) . "\n"; - * ``` - * - * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week - * - * @return static - */ - public function startOfWeek($weekStartsAt = null) - { - return $this->subDays((7 + $this->dayOfWeek - ($weekStartsAt ?? $this->firstWeekDay)) % 7)->startOfDay(); - } - - /** - * Resets the date to end of week (defined in $weekEndsAt) and time to 23:59:59.999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek() . "\n"; - * echo Carbon::parse('2018-07-25 12:45:16')->locale('ar')->endOfWeek() . "\n"; - * echo Carbon::parse('2018-07-25 12:45:16')->endOfWeek(Carbon::SATURDAY) . "\n"; - * ``` - * - * @param int $weekEndsAt optional start allow you to specify the day of week to use to end the week - * - * @return static - */ - public function endOfWeek($weekEndsAt = null) - { - return $this->addDays((7 - $this->dayOfWeek + ($weekEndsAt ?? $this->lastWeekDay)) % 7)->endOfDay(); - } - - /** - * Modify to start of current hour, minutes and seconds become 0 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfHour(); - * ``` - * - * @return static - */ - public function startOfHour() - { - return $this->setTime($this->hour, 0, 0, 0); - } - - /** - * Modify to end of current hour, minutes and seconds become 59 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfHour(); - * ``` - * - * @return static - */ - public function endOfHour() - { - return $this->setTime($this->hour, static::MINUTES_PER_HOUR - 1, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); - } - - /** - * Modify to start of current minute, seconds become 0 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->startOfMinute(); - * ``` - * - * @return static - */ - public function startOfMinute() - { - return $this->setTime($this->hour, $this->minute, 0, 0); - } - - /** - * Modify to end of current minute, seconds become 59 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16')->endOfMinute(); - * ``` - * - * @return static - */ - public function endOfMinute() - { - return $this->setTime($this->hour, $this->minute, static::SECONDS_PER_MINUTE - 1, static::MICROSECONDS_PER_SECOND - 1); - } - - /** - * Modify to start of current second, microseconds become 0 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16.334455') - * ->startOfSecond() - * ->format('H:i:s.u'); - * ``` - * - * @return static - */ - public function startOfSecond() - { - return $this->setTime($this->hour, $this->minute, $this->second, 0); - } - - /** - * Modify to end of current second, microseconds become 999999 - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16.334455') - * ->endOfSecond() - * ->format('H:i:s.u'); - * ``` - * - * @return static - */ - public function endOfSecond() - { - return $this->setTime($this->hour, $this->minute, $this->second, static::MICROSECONDS_PER_SECOND - 1); - } - - /** - * Modify to start of current given unit. - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16.334455') - * ->startOf('month') - * ->endOf('week', Carbon::FRIDAY); - * ``` - * - * @param string $unit - * @param array $params - * - * @return static - */ - public function startOf($unit, ...$params) - { - $ucfUnit = ucfirst(static::singularUnit($unit)); - $method = "startOf$ucfUnit"; - if (!method_exists($this, $method)) { - throw new UnknownUnitException($unit); - } - - return $this->$method(...$params); - } - - /** - * Modify to end of current given unit. - * - * @example - * ``` - * echo Carbon::parse('2018-07-25 12:45:16.334455') - * ->startOf('month') - * ->endOf('week', Carbon::FRIDAY); - * ``` - * - * @param string $unit - * @param array $params - * - * @return static - */ - public function endOf($unit, ...$params) - { - $ucfUnit = ucfirst(static::singularUnit($unit)); - $method = "endOf$ucfUnit"; - if (!method_exists($this, $method)) { - throw new UnknownUnitException($unit); - } - - return $this->$method(...$params); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php b/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php deleted file mode 100644 index 5f7c7c0..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Cast.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\Exceptions\InvalidCastException; -use DateTimeInterface; - -/** - * Trait Cast. - * - * Utils to cast into an other class. - */ -trait Cast -{ - /** - * Cast the current instance into the given class. - * - * @param string $className The $className::instance() method will be called to cast the current object. - * - * @return DateTimeInterface - */ - public function cast(string $className) - { - if (!method_exists($className, 'instance')) { - if (is_a($className, DateTimeInterface::class, true)) { - return new $className($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); - } - - throw new InvalidCastException("$className has not the instance() method needed to cast the date."); - } - - return $className::instance($this); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php b/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php deleted file mode 100644 index f6261d8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Comparison.php +++ /dev/null @@ -1,1125 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use BadMethodCallException; -use Carbon\CarbonInterface; -use Carbon\Exceptions\BadComparisonUnitException; -use InvalidArgumentException; - -/** - * Trait Comparison. - * - * Comparison utils and testers. All the following methods return booleans. - * nowWithSameTz - * - * Depends on the following methods: - * - * @method static resolveCarbon($date) - * @method static copy() - * @method static nowWithSameTz() - * @method static static yesterday($timezone = null) - * @method static static tomorrow($timezone = null) - */ -trait Comparison -{ - /** @var bool */ - protected $endOfTime = false; - - /** @var bool */ - protected $startOfTime = false; - - /** - * Determines if the instance is equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->eq(Carbon::parse('2018-07-25 12:45:16')); // true - * Carbon::parse('2018-07-25 12:45:16')->eq('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see equalTo() - * - * @return bool - */ - public function eq($date): bool - { - return $this->equalTo($date); - } - - /** - * Determines if the instance is equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->equalTo(Carbon::parse('2018-07-25 12:45:16')); // true - * Carbon::parse('2018-07-25 12:45:16')->equalTo('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function equalTo($date): bool - { - $this->discourageNull($date); - $this->discourageBoolean($date); - - return $this == $this->resolveCarbon($date); - } - - /** - * Determines if the instance is not equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->ne(Carbon::parse('2018-07-25 12:45:16')); // false - * Carbon::parse('2018-07-25 12:45:16')->ne('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see notEqualTo() - * - * @return bool - */ - public function ne($date): bool - { - return $this->notEqualTo($date); - } - - /** - * Determines if the instance is not equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo(Carbon::parse('2018-07-25 12:45:16')); // false - * Carbon::parse('2018-07-25 12:45:16')->notEqualTo('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function notEqualTo($date): bool - { - return !$this->equalTo($date); - } - - /** - * Determines if the instance is greater (after) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->gt('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see greaterThan() - * - * @return bool - */ - public function gt($date): bool - { - return $this->greaterThan($date); - } - - /** - * Determines if the instance is greater (after) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->greaterThan('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function greaterThan($date): bool - { - $this->discourageNull($date); - $this->discourageBoolean($date); - - return $this > $this->resolveCarbon($date); - } - - /** - * Determines if the instance is greater (after) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->isAfter('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see greaterThan() - * - * @return bool - */ - public function isAfter($date): bool - { - return $this->greaterThan($date); - } - - /** - * Determines if the instance is greater (after) than or equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->gte('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see greaterThanOrEqualTo() - * - * @return bool - */ - public function gte($date): bool - { - return $this->greaterThanOrEqualTo($date); - } - - /** - * Determines if the instance is greater (after) than or equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:15'); // true - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->greaterThanOrEqualTo('2018-07-25 12:45:17'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function greaterThanOrEqualTo($date): bool - { - $this->discourageNull($date); - $this->discourageBoolean($date); - - return $this >= $this->resolveCarbon($date); - } - - /** - * Determines if the instance is less (before) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->lt('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see lessThan() - * - * @return bool - */ - public function lt($date): bool - { - return $this->lessThan($date); - } - - /** - * Determines if the instance is less (before) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->lessThan('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function lessThan($date): bool - { - $this->discourageNull($date); - $this->discourageBoolean($date); - - return $this < $this->resolveCarbon($date); - } - - /** - * Determines if the instance is less (before) than another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:16'); // false - * Carbon::parse('2018-07-25 12:45:16')->isBefore('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see lessThan() - * - * @return bool - */ - public function isBefore($date): bool - { - return $this->lessThan($date); - } - - /** - * Determines if the instance is less (before) or equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->lte('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see lessThanOrEqualTo() - * - * @return bool - */ - public function lte($date): bool - { - return $this->lessThanOrEqualTo($date); - } - - /** - * Determines if the instance is less (before) or equal to another - * - * @example - * ``` - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:15'); // false - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:16'); // true - * Carbon::parse('2018-07-25 12:45:16')->lessThanOrEqualTo('2018-07-25 12:45:17'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return bool - */ - public function lessThanOrEqualTo($date): bool - { - $this->discourageNull($date); - $this->discourageBoolean($date); - - return $this <= $this->resolveCarbon($date); - } - - /** - * Determines if the instance is between two others. - * - * The third argument allow you to specify if bounds are included or not (true by default) - * but for when you including/excluding bounds may produce different results in your application, - * we recommend to use the explicit methods ->betweenIncluded() or ->betweenExcluded() instead. - * - * @example - * ``` - * Carbon::parse('2018-07-25')->between('2018-07-14', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->between('2018-08-01', '2018-08-20'); // false - * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->between('2018-07-25', '2018-08-01', false); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * @param bool $equal Indicates if an equal to comparison should be done - * - * @return bool - */ - public function between($date1, $date2, $equal = true): bool - { - $date1 = $this->resolveCarbon($date1); - $date2 = $this->resolveCarbon($date2); - - if ($date1->greaterThan($date2)) { - [$date1, $date2] = [$date2, $date1]; - } - - if ($equal) { - return $this >= $date1 && $this <= $date2; - } - - return $this > $date1 && $this < $date2; - } - - /** - * Determines if the instance is between two others, bounds included. - * - * @example - * ``` - * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-14', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->betweenIncluded('2018-08-01', '2018-08-20'); // false - * Carbon::parse('2018-07-25')->betweenIncluded('2018-07-25', '2018-08-01'); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * - * @return bool - */ - public function betweenIncluded($date1, $date2): bool - { - return $this->between($date1, $date2, true); - } - - /** - * Determines if the instance is between two others, bounds excluded. - * - * @example - * ``` - * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-14', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->betweenExcluded('2018-08-01', '2018-08-20'); // false - * Carbon::parse('2018-07-25')->betweenExcluded('2018-07-25', '2018-08-01'); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * - * @return bool - */ - public function betweenExcluded($date1, $date2): bool - { - return $this->between($date1, $date2, false); - } - - /** - * Determines if the instance is between two others - * - * @example - * ``` - * Carbon::parse('2018-07-25')->isBetween('2018-07-14', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->isBetween('2018-08-01', '2018-08-20'); // false - * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01'); // true - * Carbon::parse('2018-07-25')->isBetween('2018-07-25', '2018-08-01', false); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * @param bool $equal Indicates if an equal to comparison should be done - * - * @return bool - */ - public function isBetween($date1, $date2, $equal = true): bool - { - return $this->between($date1, $date2, $equal); - } - - /** - * Determines if the instance is a weekday. - * - * @example - * ``` - * Carbon::parse('2019-07-14')->isWeekday(); // false - * Carbon::parse('2019-07-15')->isWeekday(); // true - * ``` - * - * @return bool - */ - public function isWeekday() - { - return !$this->isWeekend(); - } - - /** - * Determines if the instance is a weekend day. - * - * @example - * ``` - * Carbon::parse('2019-07-14')->isWeekend(); // true - * Carbon::parse('2019-07-15')->isWeekend(); // false - * ``` - * - * @return bool - */ - public function isWeekend() - { - return \in_array($this->dayOfWeek, static::$weekendDays, true); - } - - /** - * Determines if the instance is yesterday. - * - * @example - * ``` - * Carbon::yesterday()->isYesterday(); // true - * Carbon::tomorrow()->isYesterday(); // false - * ``` - * - * @return bool - */ - public function isYesterday() - { - return $this->toDateString() === static::yesterday($this->getTimezone())->toDateString(); - } - - /** - * Determines if the instance is today. - * - * @example - * ``` - * Carbon::today()->isToday(); // true - * Carbon::tomorrow()->isToday(); // false - * ``` - * - * @return bool - */ - public function isToday() - { - return $this->toDateString() === $this->nowWithSameTz()->toDateString(); - } - - /** - * Determines if the instance is tomorrow. - * - * @example - * ``` - * Carbon::tomorrow()->isTomorrow(); // true - * Carbon::yesterday()->isTomorrow(); // false - * ``` - * - * @return bool - */ - public function isTomorrow() - { - return $this->toDateString() === static::tomorrow($this->getTimezone())->toDateString(); - } - - /** - * Determines if the instance is in the future, ie. greater (after) than now. - * - * @example - * ``` - * Carbon::now()->addHours(5)->isFuture(); // true - * Carbon::now()->subHours(5)->isFuture(); // false - * ``` - * - * @return bool - */ - public function isFuture() - { - return $this->greaterThan($this->nowWithSameTz()); - } - - /** - * Determines if the instance is in the past, ie. less (before) than now. - * - * @example - * ``` - * Carbon::now()->subHours(5)->isPast(); // true - * Carbon::now()->addHours(5)->isPast(); // false - * ``` - * - * @return bool - */ - public function isPast() - { - return $this->lessThan($this->nowWithSameTz()); - } - - /** - * Determines if the instance is a leap year. - * - * @example - * ``` - * Carbon::parse('2020-01-01')->isLeapYear(); // true - * Carbon::parse('2019-01-01')->isLeapYear(); // false - * ``` - * - * @return bool - */ - public function isLeapYear() - { - return $this->rawFormat('L') === '1'; - } - - /** - * Determines if the instance is a long year (using calendar year). - * - * ⚠️ This method completely ignores month and day to use the numeric year number, - * it's not correct if the exact date matters. For instance as `2019-12-30` is already - * in the first week of the 2020 year, if you want to know from this date if ISO week - * year 2020 is a long year, use `isLongIsoYear` instead. - * - * @example - * ``` - * Carbon::create(2015)->isLongYear(); // true - * Carbon::create(2016)->isLongYear(); // false - * ``` - * - * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates - * - * @return bool - */ - public function isLongYear() - { - return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; - } - - /** - * Determines if the instance is a long year (using ISO 8601 year). - * - * @example - * ``` - * Carbon::parse('2015-01-01')->isLongIsoYear(); // true - * Carbon::parse('2016-01-01')->isLongIsoYear(); // true - * Carbon::parse('2016-01-03')->isLongIsoYear(); // false - * Carbon::parse('2019-12-29')->isLongIsoYear(); // false - * Carbon::parse('2019-12-30')->isLongIsoYear(); // true - * ``` - * - * @see https://en.wikipedia.org/wiki/ISO_8601#Week_dates - * - * @return bool - */ - public function isLongIsoYear() - { - return static::create($this->isoWeekYear, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; - } - - /** - * Compares the formatted values of the two dates. - * - * @example - * ``` - * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-12-13')); // true - * Carbon::parse('2019-06-13')->isSameAs('Y-d', Carbon::parse('2019-06-14')); // false - * ``` - * - * @param string $format date formats to compare. - * @param \Carbon\Carbon|\DateTimeInterface|string|null $date instance to compare with or null to use current day. - * - * @return bool - */ - public function isSameAs($format, $date = null) - { - return $this->rawFormat($format) === $this->resolveCarbon($date)->rawFormat($format); - } - - /** - * Determines if the instance is in the current unit given. - * - * @example - * ``` - * Carbon::parse('2019-01-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // true - * Carbon::parse('2018-12-13')->isSameUnit('year', Carbon::parse('2019-12-25')); // false - * ``` - * - * @param string $unit singular unit string - * @param \Carbon\Carbon|\DateTimeInterface|null $date instance to compare with or null to use current day. - * - * @throws BadComparisonUnitException - * - * @return bool - */ - public function isSameUnit($unit, $date = null) - { - $units = [ - // @call isSameUnit - 'year' => 'Y', - // @call isSameUnit - 'week' => 'o-W', - // @call isSameUnit - 'day' => 'Y-m-d', - // @call isSameUnit - 'hour' => 'Y-m-d H', - // @call isSameUnit - 'minute' => 'Y-m-d H:i', - // @call isSameUnit - 'second' => 'Y-m-d H:i:s', - // @call isSameUnit - 'micro' => 'Y-m-d H:i:s.u', - // @call isSameUnit - 'microsecond' => 'Y-m-d H:i:s.u', - ]; - - if (isset($units[$unit])) { - return $this->isSameAs($units[$unit], $date); - } - - if (isset($this->$unit)) { - return $this->resolveCarbon($date)->$unit === $this->$unit; - } - - if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { - throw new BadComparisonUnitException($unit); - } - - return false; - } - - /** - * Determines if the instance is in the current unit given. - * - * @example - * ``` - * Carbon::now()->isCurrentUnit('hour'); // true - * Carbon::now()->subHours(2)->isCurrentUnit('hour'); // false - * ``` - * - * @param string $unit The unit to test. - * - * @throws BadMethodCallException - * - * @return bool - */ - public function isCurrentUnit($unit) - { - return $this->{'isSame'.ucfirst($unit)}(); - } - - /** - * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). - * - * @example - * ``` - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-03-01')); // true - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2019-04-01')); // false - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01')); // false - * Carbon::parse('2019-01-12')->isSameQuarter(Carbon::parse('2018-03-01'), false); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|string|null $date The instance to compare with or null to use current day. - * @param bool $ofSameYear Check if it is the same month in the same year. - * - * @return bool - */ - public function isSameQuarter($date = null, $ofSameYear = true) - { - $date = $this->resolveCarbon($date); - - return $this->quarter === $date->quarter && (!$ofSameYear || $this->isSameYear($date)); - } - - /** - * Checks if the passed in date is in the same month as the instance´s month. - * - * @example - * ``` - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-01-01')); // true - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2019-02-01')); // false - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01')); // false - * Carbon::parse('2019-01-12')->isSameMonth(Carbon::parse('2018-01-01'), false); // true - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. - * @param bool $ofSameYear Check if it is the same month in the same year. - * - * @return bool - */ - public function isSameMonth($date = null, $ofSameYear = true) - { - return $this->isSameAs($ofSameYear ? 'Y-m' : 'm', $date); - } - - /** - * Checks if this day is a specific day of the week. - * - * @example - * ``` - * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::WEDNESDAY); // true - * Carbon::parse('2019-07-17')->isDayOfWeek(Carbon::FRIDAY); // false - * Carbon::parse('2019-07-17')->isDayOfWeek('Wednesday'); // true - * Carbon::parse('2019-07-17')->isDayOfWeek('Friday'); // false - * ``` - * - * @param int $dayOfWeek - * - * @return bool - */ - public function isDayOfWeek($dayOfWeek) - { - if (\is_string($dayOfWeek) && \defined($constant = static::class.'::'.strtoupper($dayOfWeek))) { - $dayOfWeek = \constant($constant); - } - - return $this->dayOfWeek === $dayOfWeek; - } - - /** - * Check if its the birthday. Compares the date/month values of the two dates. - * - * @example - * ``` - * Carbon::now()->subYears(5)->isBirthday(); // true - * Carbon::now()->subYears(5)->subDay()->isBirthday(); // false - * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-05')); // true - * Carbon::parse('2019-06-05')->isBirthday(Carbon::parse('2001-06-06')); // false - * ``` - * - * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. - * - * @return bool - */ - public function isBirthday($date = null) - { - return $this->isSameAs('md', $date); - } - - /** - * Check if today is the last day of the Month - * - * @example - * ``` - * Carbon::parse('2019-02-28')->isLastOfMonth(); // true - * Carbon::parse('2019-03-28')->isLastOfMonth(); // false - * Carbon::parse('2019-03-30')->isLastOfMonth(); // false - * Carbon::parse('2019-03-31')->isLastOfMonth(); // true - * Carbon::parse('2019-04-30')->isLastOfMonth(); // true - * ``` - * - * @return bool - */ - public function isLastOfMonth() - { - return $this->day === $this->daysInMonth; - } - - /** - * Check if the instance is start of day / midnight. - * - * @example - * ``` - * Carbon::parse('2019-02-28 00:00:00')->isStartOfDay(); // true - * Carbon::parse('2019-02-28 00:00:00.999999')->isStartOfDay(); // true - * Carbon::parse('2019-02-28 00:00:01')->isStartOfDay(); // false - * Carbon::parse('2019-02-28 00:00:00.000000')->isStartOfDay(true); // true - * Carbon::parse('2019-02-28 00:00:00.000012')->isStartOfDay(true); // false - * ``` - * - * @param bool $checkMicroseconds check time at microseconds precision - * - * @return bool - */ - public function isStartOfDay($checkMicroseconds = false) - { - /* @var CarbonInterface $this */ - return $checkMicroseconds - ? $this->rawFormat('H:i:s.u') === '00:00:00.000000' - : $this->rawFormat('H:i:s') === '00:00:00'; - } - - /** - * Check if the instance is end of day. - * - * @example - * ``` - * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(); // true - * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(); // true - * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(); // true - * Carbon::parse('2019-02-28 23:59:58.999999')->isEndOfDay(); // false - * Carbon::parse('2019-02-28 23:59:59.999999')->isEndOfDay(true); // true - * Carbon::parse('2019-02-28 23:59:59.123456')->isEndOfDay(true); // false - * Carbon::parse('2019-02-28 23:59:59')->isEndOfDay(true); // false - * ``` - * - * @param bool $checkMicroseconds check time at microseconds precision - * - * @return bool - */ - public function isEndOfDay($checkMicroseconds = false) - { - /* @var CarbonInterface $this */ - return $checkMicroseconds - ? $this->rawFormat('H:i:s.u') === '23:59:59.999999' - : $this->rawFormat('H:i:s') === '23:59:59'; - } - - /** - * Check if the instance is start of day / midnight. - * - * @example - * ``` - * Carbon::parse('2019-02-28 00:00:00')->isMidnight(); // true - * Carbon::parse('2019-02-28 00:00:00.999999')->isMidnight(); // true - * Carbon::parse('2019-02-28 00:00:01')->isMidnight(); // false - * ``` - * - * @return bool - */ - public function isMidnight() - { - return $this->isStartOfDay(); - } - - /** - * Check if the instance is midday. - * - * @example - * ``` - * Carbon::parse('2019-02-28 11:59:59.999999')->isMidday(); // false - * Carbon::parse('2019-02-28 12:00:00')->isMidday(); // true - * Carbon::parse('2019-02-28 12:00:00.999999')->isMidday(); // true - * Carbon::parse('2019-02-28 12:00:01')->isMidday(); // false - * ``` - * - * @return bool - */ - public function isMidday() - { - /* @var CarbonInterface $this */ - return $this->rawFormat('G:i:s') === static::$midDayAt.':00:00'; - } - - /** - * Checks if the (date)time string is in a given format. - * - * @example - * ``` - * Carbon::hasFormat('11:12:45', 'h:i:s'); // true - * Carbon::hasFormat('13:12:45', 'h:i:s'); // false - * ``` - * - * @param string $date - * @param string $format - * - * @return bool - */ - public static function hasFormat($date, $format) - { - // createFromFormat() is known to handle edge cases silently. - // E.g. "1975-5-1" (Y-n-j) will still be parsed correctly when "Y-m-d" is supplied as the format. - // To ensure we're really testing against our desired format, perform an additional regex validation. - - return self::matchFormatPattern((string) $date, preg_quote((string) $format, '/'), static::$regexFormats); - } - - /** - * Checks if the (date)time string is in a given format. - * - * @example - * ``` - * Carbon::hasFormatWithModifiers('31/08/2015', 'd#m#Y'); // true - * Carbon::hasFormatWithModifiers('31/08/2015', 'm#d#Y'); // false - * ``` - * - * @param string $date - * @param string $format - * - * @return bool - */ - public static function hasFormatWithModifiers($date, $format): bool - { - return self::matchFormatPattern((string) $date, (string) $format, array_merge(static::$regexFormats, static::$regexFormatModifiers)); - } - - /** - * Checks if the (date)time string is in a given format and valid to create a - * new instance. - * - * @example - * ``` - * Carbon::canBeCreatedFromFormat('11:12:45', 'h:i:s'); // true - * Carbon::canBeCreatedFromFormat('13:12:45', 'h:i:s'); // false - * ``` - * - * @param string $date - * @param string $format - * - * @return bool - */ - public static function canBeCreatedFromFormat($date, $format) - { - try { - // Try to create a DateTime object. Throws an InvalidArgumentException if the provided time string - // doesn't match the format in any way. - if (!static::rawCreateFromFormat($format, $date)) { - return false; - } - } catch (InvalidArgumentException $e) { - return false; - } - - return static::hasFormatWithModifiers($date, $format); - } - - /** - * Returns true if the current date matches the given string. - * - * @example - * ``` - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2018')); // false - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('06-02')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('2019-06-02')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('Sunday')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('June')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:45')); // true - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12:23:00')); // false - * var_dump(Carbon::parse('2019-06-02 12:23:45')->is('12h')); // true - * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3pm')); // true - * var_dump(Carbon::parse('2019-06-02 15:23:45')->is('3am')); // false - * ``` - * - * @param string $tester day name, month name, hour, date, etc. as string - * - * @return bool - */ - public function is(string $tester) - { - $tester = trim($tester); - - if (preg_match('/^\d+$/', $tester)) { - return $this->year === (int) $tester; - } - - if (preg_match('/^\d{3,}-\d{1,2}$/', $tester)) { - return $this->isSameMonth(static::parse($tester)); - } - - if (preg_match('/^\d{1,2}-\d{1,2}$/', $tester)) { - return $this->isSameDay(static::parse($this->year.'-'.$tester)); - } - - $modifier = preg_replace('/(\d)h$/i', '$1:00', $tester); - - /* @var CarbonInterface $max */ - $median = static::parse('5555-06-15 12:30:30.555555')->modify($modifier); - $current = $this->avoidMutation(); - /* @var CarbonInterface $other */ - $other = $this->avoidMutation()->modify($modifier); - - if ($current->eq($other)) { - return true; - } - - if (preg_match('/\d:\d{1,2}:\d{1,2}$/', $tester)) { - return $current->startOfSecond()->eq($other); - } - - if (preg_match('/\d:\d{1,2}$/', $tester)) { - return $current->startOfMinute()->eq($other); - } - - if (preg_match('/\d(?:h|am|pm)$/', $tester)) { - return $current->startOfHour()->eq($other); - } - - if (preg_match( - '/^(?:january|february|march|april|may|june|july|august|september|october|november|december)(?:\s+\d+)?$/i', - $tester - )) { - return $current->startOfMonth()->eq($other->startOfMonth()); - } - - $units = [ - 'month' => [1, 'year'], - 'day' => [1, 'month'], - 'hour' => [0, 'day'], - 'minute' => [0, 'hour'], - 'second' => [0, 'minute'], - 'microsecond' => [0, 'second'], - ]; - - foreach ($units as $unit => [$minimum, $startUnit]) { - if ($minimum === $median->$unit) { - $current = $current->startOf($startUnit); - - break; - } - } - - return $current->eq($other); - } - - /** - * Checks if the (date)time string is in a given format with - * given list of pattern replacements. - * - * @example - * ``` - * Carbon::hasFormat('11:12:45', 'h:i:s'); // true - * Carbon::hasFormat('13:12:45', 'h:i:s'); // false - * ``` - * - * @param string $date - * @param string $format - * @param array $replacements - * - * @return bool - */ - private static function matchFormatPattern(string $date, string $format, array $replacements): bool - { - // Preg quote, but remove escaped backslashes since we'll deal with escaped characters in the format string. - $regex = str_replace('\\\\', '\\', $format); - // Replace not-escaped letters - $regex = preg_replace_callback( - '/(?startOfTime ?? false; - } - - /** - * Returns true if the date was created using CarbonImmutable::endOfTime() - * - * @return bool - */ - public function isEndOfTime(): bool - { - return $this->endOfTime ?? false; - } - - private function discourageNull($value): void - { - if ($value === null) { - @trigger_error("Since 2.61.0, it's deprecated to compare a date to null, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate null values.", \E_USER_DEPRECATED); - } - } - - private function discourageBoolean($value): void - { - if (\is_bool($value)) { - @trigger_error("Since 2.61.0, it's deprecated to compare a date to true or false, meaning of such comparison is ambiguous and will no longer be possible in 3.0.0, you should explicitly pass 'now' or make an other check to eliminate boolean values.", \E_USER_DEPRECATED); - } - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php b/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php deleted file mode 100644 index fff8a60..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Converter.php +++ /dev/null @@ -1,639 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\Carbon; -use Carbon\CarbonImmutable; -use Carbon\CarbonInterface; -use Carbon\CarbonInterval; -use Carbon\CarbonPeriod; -use Carbon\CarbonPeriodImmutable; -use Carbon\Exceptions\UnitException; -use Closure; -use DateTime; -use DateTimeImmutable; -use ReturnTypeWillChange; - -/** - * Trait Converter. - * - * Change date into different string formats and types and - * handle the string cast. - * - * Depends on the following methods: - * - * @method static copy() - */ -trait Converter -{ - use ToStringFormat; - - /** - * Returns the formatted date string on success or FALSE on failure. - * - * @see https://php.net/manual/en/datetime.format.php - * - * @param string $format - * - * @return string - */ - #[ReturnTypeWillChange] - public function format($format) - { - $function = $this->localFormatFunction ?: static::$formatFunction; - - if (!$function) { - return $this->rawFormat($format); - } - - if (\is_string($function) && method_exists($this, $function)) { - $function = [$this, $function]; - } - - return $function(...\func_get_args()); - } - - /** - * @see https://php.net/manual/en/datetime.format.php - * - * @param string $format - * - * @return string - */ - public function rawFormat($format) - { - return parent::format($format); - } - - /** - * Format the instance as a string using the set format - * - * @example - * ``` - * echo Carbon::now(); // Carbon instances can be cast to string - * ``` - * - * @return string - */ - public function __toString() - { - $format = $this->localToStringFormat ?? static::$toStringFormat; - - return $format instanceof Closure - ? $format($this) - : $this->rawFormat($format ?: ( - \defined('static::DEFAULT_TO_STRING_FORMAT') - ? static::DEFAULT_TO_STRING_FORMAT - : CarbonInterface::DEFAULT_TO_STRING_FORMAT - )); - } - - /** - * Format the instance as date - * - * @example - * ``` - * echo Carbon::now()->toDateString(); - * ``` - * - * @return string - */ - public function toDateString() - { - return $this->rawFormat('Y-m-d'); - } - - /** - * Format the instance as a readable date - * - * @example - * ``` - * echo Carbon::now()->toFormattedDateString(); - * ``` - * - * @return string - */ - public function toFormattedDateString() - { - return $this->rawFormat('M j, Y'); - } - - /** - * Format the instance with the day, and a readable date - * - * @example - * ``` - * echo Carbon::now()->toFormattedDayDateString(); - * ``` - * - * @return string - */ - public function toFormattedDayDateString(): string - { - return $this->rawFormat('D, M j, Y'); - } - - /** - * Format the instance as time - * - * @example - * ``` - * echo Carbon::now()->toTimeString(); - * ``` - * - * @param string $unitPrecision - * - * @return string - */ - public function toTimeString($unitPrecision = 'second') - { - return $this->rawFormat(static::getTimeFormatByPrecision($unitPrecision)); - } - - /** - * Format the instance as date and time - * - * @example - * ``` - * echo Carbon::now()->toDateTimeString(); - * ``` - * - * @param string $unitPrecision - * - * @return string - */ - public function toDateTimeString($unitPrecision = 'second') - { - return $this->rawFormat('Y-m-d '.static::getTimeFormatByPrecision($unitPrecision)); - } - - /** - * Return a format from H:i to H:i:s.u according to given unit precision. - * - * @param string $unitPrecision "minute", "second", "millisecond" or "microsecond" - * - * @return string - */ - public static function getTimeFormatByPrecision($unitPrecision) - { - switch (static::singularUnit($unitPrecision)) { - case 'minute': - return 'H:i'; - case 'second': - return 'H:i:s'; - case 'm': - case 'millisecond': - return 'H:i:s.v'; - case 'µ': - case 'microsecond': - return 'H:i:s.u'; - } - - throw new UnitException('Precision unit expected among: minute, second, millisecond and microsecond.'); - } - - /** - * Format the instance as date and time T-separated with no timezone - * - * @example - * ``` - * echo Carbon::now()->toDateTimeLocalString(); - * echo "\n"; - * echo Carbon::now()->toDateTimeLocalString('minute'); // You can specify precision among: minute, second, millisecond and microsecond - * ``` - * - * @param string $unitPrecision - * - * @return string - */ - public function toDateTimeLocalString($unitPrecision = 'second') - { - return $this->rawFormat('Y-m-d\T'.static::getTimeFormatByPrecision($unitPrecision)); - } - - /** - * Format the instance with day, date and time - * - * @example - * ``` - * echo Carbon::now()->toDayDateTimeString(); - * ``` - * - * @return string - */ - public function toDayDateTimeString() - { - return $this->rawFormat('D, M j, Y g:i A'); - } - - /** - * Format the instance as ATOM - * - * @example - * ``` - * echo Carbon::now()->toAtomString(); - * ``` - * - * @return string - */ - public function toAtomString() - { - return $this->rawFormat(DateTime::ATOM); - } - - /** - * Format the instance as COOKIE - * - * @example - * ``` - * echo Carbon::now()->toCookieString(); - * ``` - * - * @return string - */ - public function toCookieString() - { - return $this->rawFormat(DateTime::COOKIE); - } - - /** - * Format the instance as ISO8601 - * - * @example - * ``` - * echo Carbon::now()->toIso8601String(); - * ``` - * - * @return string - */ - public function toIso8601String() - { - return $this->toAtomString(); - } - - /** - * Format the instance as RFC822 - * - * @example - * ``` - * echo Carbon::now()->toRfc822String(); - * ``` - * - * @return string - */ - public function toRfc822String() - { - return $this->rawFormat(DateTime::RFC822); - } - - /** - * Convert the instance to UTC and return as Zulu ISO8601 - * - * @example - * ``` - * echo Carbon::now()->toIso8601ZuluString(); - * ``` - * - * @param string $unitPrecision - * - * @return string - */ - public function toIso8601ZuluString($unitPrecision = 'second') - { - return $this->avoidMutation() - ->utc() - ->rawFormat('Y-m-d\T'.static::getTimeFormatByPrecision($unitPrecision).'\Z'); - } - - /** - * Format the instance as RFC850 - * - * @example - * ``` - * echo Carbon::now()->toRfc850String(); - * ``` - * - * @return string - */ - public function toRfc850String() - { - return $this->rawFormat(DateTime::RFC850); - } - - /** - * Format the instance as RFC1036 - * - * @example - * ``` - * echo Carbon::now()->toRfc1036String(); - * ``` - * - * @return string - */ - public function toRfc1036String() - { - return $this->rawFormat(DateTime::RFC1036); - } - - /** - * Format the instance as RFC1123 - * - * @example - * ``` - * echo Carbon::now()->toRfc1123String(); - * ``` - * - * @return string - */ - public function toRfc1123String() - { - return $this->rawFormat(DateTime::RFC1123); - } - - /** - * Format the instance as RFC2822 - * - * @example - * ``` - * echo Carbon::now()->toRfc2822String(); - * ``` - * - * @return string - */ - public function toRfc2822String() - { - return $this->rawFormat(DateTime::RFC2822); - } - - /** - * Format the instance as RFC3339 - * - * @param bool $extended - * - * @example - * ``` - * echo Carbon::now()->toRfc3339String() . "\n"; - * echo Carbon::now()->toRfc3339String(true) . "\n"; - * ``` - * - * @return string - */ - public function toRfc3339String($extended = false) - { - $format = DateTime::RFC3339; - if ($extended) { - $format = DateTime::RFC3339_EXTENDED; - } - - return $this->rawFormat($format); - } - - /** - * Format the instance as RSS - * - * @example - * ``` - * echo Carbon::now()->toRssString(); - * ``` - * - * @return string - */ - public function toRssString() - { - return $this->rawFormat(DateTime::RSS); - } - - /** - * Format the instance as W3C - * - * @example - * ``` - * echo Carbon::now()->toW3cString(); - * ``` - * - * @return string - */ - public function toW3cString() - { - return $this->rawFormat(DateTime::W3C); - } - - /** - * Format the instance as RFC7231 - * - * @example - * ``` - * echo Carbon::now()->toRfc7231String(); - * ``` - * - * @return string - */ - public function toRfc7231String() - { - return $this->avoidMutation() - ->setTimezone('GMT') - ->rawFormat(\defined('static::RFC7231_FORMAT') ? static::RFC7231_FORMAT : CarbonInterface::RFC7231_FORMAT); - } - - /** - * Get default array representation. - * - * @example - * ``` - * var_dump(Carbon::now()->toArray()); - * ``` - * - * @return array - */ - public function toArray() - { - return [ - 'year' => $this->year, - 'month' => $this->month, - 'day' => $this->day, - 'dayOfWeek' => $this->dayOfWeek, - 'dayOfYear' => $this->dayOfYear, - 'hour' => $this->hour, - 'minute' => $this->minute, - 'second' => $this->second, - 'micro' => $this->micro, - 'timestamp' => $this->timestamp, - 'formatted' => $this->rawFormat(\defined('static::DEFAULT_TO_STRING_FORMAT') ? static::DEFAULT_TO_STRING_FORMAT : CarbonInterface::DEFAULT_TO_STRING_FORMAT), - 'timezone' => $this->timezone, - ]; - } - - /** - * Get default object representation. - * - * @example - * ``` - * var_dump(Carbon::now()->toObject()); - * ``` - * - * @return object - */ - public function toObject() - { - return (object) $this->toArray(); - } - - /** - * Returns english human readable complete date string. - * - * @example - * ``` - * echo Carbon::now()->toString(); - * ``` - * - * @return string - */ - public function toString() - { - return $this->avoidMutation()->locale('en')->isoFormat('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); - } - - /** - * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z, if $keepOffset truthy, offset will be kept: - * 1977-04-22T01:00:00-05:00). - * - * @example - * ``` - * echo Carbon::now('America/Toronto')->toISOString() . "\n"; - * echo Carbon::now('America/Toronto')->toISOString(true) . "\n"; - * ``` - * - * @param bool $keepOffset Pass true to keep the date offset. Else forced to UTC. - * - * @return null|string - */ - public function toISOString($keepOffset = false) - { - if (!$this->isValid()) { - return null; - } - - $yearFormat = $this->year < 0 || $this->year > 9999 ? 'YYYYYY' : 'YYYY'; - $tzFormat = $keepOffset ? 'Z' : '[Z]'; - $date = $keepOffset ? $this : $this->avoidMutation()->utc(); - - return $date->isoFormat("$yearFormat-MM-DD[T]HH:mm:ss.SSSSSS$tzFormat"); - } - - /** - * Return the ISO-8601 string (ex: 1977-04-22T06:00:00Z) with UTC timezone. - * - * @example - * ``` - * echo Carbon::now('America/Toronto')->toJSON(); - * ``` - * - * @return null|string - */ - public function toJSON() - { - return $this->toISOString(); - } - - /** - * Return native DateTime PHP object matching the current instance. - * - * @example - * ``` - * var_dump(Carbon::now()->toDateTime()); - * ``` - * - * @return DateTime - */ - public function toDateTime() - { - return new DateTime($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); - } - - /** - * Return native toDateTimeImmutable PHP object matching the current instance. - * - * @example - * ``` - * var_dump(Carbon::now()->toDateTimeImmutable()); - * ``` - * - * @return DateTimeImmutable - */ - public function toDateTimeImmutable() - { - return new DateTimeImmutable($this->rawFormat('Y-m-d H:i:s.u'), $this->getTimezone()); - } - - /** - * @alias toDateTime - * - * Return native DateTime PHP object matching the current instance. - * - * @example - * ``` - * var_dump(Carbon::now()->toDate()); - * ``` - * - * @return DateTime - */ - public function toDate() - { - return $this->toDateTime(); - } - - /** - * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). - * - * @param \DateTimeInterface|Carbon|CarbonImmutable|int|null $end period end date or recurrences count if int - * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit - * @param string|null $unit if specified, $interval must be an integer - * - * @return CarbonPeriod - */ - public function toPeriod($end = null, $interval = null, $unit = null) - { - if ($unit) { - $interval = CarbonInterval::make("$interval ".static::pluralUnit($unit)); - } - - $period = ($this->isMutable() ? new CarbonPeriod() : new CarbonPeriodImmutable()) - ->setDateClass(static::class) - ->setStartDate($this); - - if ($interval) { - $period = $period->setDateInterval($interval); - } - - if (\is_int($end) || (\is_string($end) && ctype_digit($end))) { - $period = $period->setRecurrences($end); - } elseif ($end) { - $period = $period->setEndDate($end); - } - - return $period; - } - - /** - * Create a iterable CarbonPeriod object from current date to a given end date (and optional interval). - * - * @param \DateTimeInterface|Carbon|CarbonImmutable|null $end period end date - * @param int|\DateInterval|string|null $interval period default interval or number of the given $unit - * @param string|null $unit if specified, $interval must be an integer - * - * @return CarbonPeriod - */ - public function range($end = null, $interval = null, $unit = null) - { - return $this->toPeriod($end, $interval, $unit); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php b/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php deleted file mode 100644 index 0d611ea..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php +++ /dev/null @@ -1,977 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\Carbon; -use Carbon\CarbonImmutable; -use Carbon\CarbonInterface; -use Carbon\Exceptions\InvalidDateException; -use Carbon\Exceptions\InvalidFormatException; -use Carbon\Exceptions\OutOfRangeException; -use Carbon\Translator; -use Closure; -use DateMalformedStringException; -use DateTimeImmutable; -use DateTimeInterface; -use DateTimeZone; -use Exception; -use ReturnTypeWillChange; - -/** - * Trait Creator. - * - * Static creators. - * - * Depends on the following methods: - * - * @method static Carbon|CarbonImmutable getTestNow() - */ -trait Creator -{ - use ObjectInitialisation; - - /** - * The errors that can occur. - * - * @var array - */ - protected static $lastErrors; - - /** - * Create a new Carbon instance. - * - * Please see the testing aids section (specifically static::setTestNow()) - * for more on the possibility of this constructor returning a test instance. - * - * @param DateTimeInterface|string|null $time - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - */ - public function __construct($time = null, $tz = null) - { - if ($time instanceof DateTimeInterface) { - $time = $this->constructTimezoneFromDateTime($time, $tz)->format('Y-m-d H:i:s.u'); - } - - if (is_numeric($time) && (!\is_string($time) || !preg_match('/^\d{1,14}$/', $time))) { - $time = static::createFromTimestampUTC($time)->format('Y-m-d\TH:i:s.uP'); - } - - // If the class has a test now set and we are trying to create a now() - // instance then override as required - $isNow = empty($time) || $time === 'now'; - - if (method_exists(static::class, 'hasTestNow') && - method_exists(static::class, 'getTestNow') && - static::hasTestNow() && - ($isNow || static::hasRelativeKeywords($time)) - ) { - static::mockConstructorParameters($time, $tz); - } - - // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 - if (!str_contains((string) .1, '.')) { - $locale = setlocale(LC_NUMERIC, '0'); // @codeCoverageIgnore - setlocale(LC_NUMERIC, 'C'); // @codeCoverageIgnore - } - - try { - parent::__construct($time ?: 'now', static::safeCreateDateTimeZone($tz) ?: null); - } catch (Exception $exception) { - throw new InvalidFormatException($exception->getMessage(), 0, $exception); - } - - $this->constructedObjectId = spl_object_hash($this); - - if (isset($locale)) { - setlocale(LC_NUMERIC, $locale); // @codeCoverageIgnore - } - - self::setLastErrors(parent::getLastErrors()); - } - - /** - * Get timezone from a datetime instance. - * - * @param DateTimeInterface $date - * @param DateTimeZone|string|null $tz - * - * @return DateTimeInterface - */ - private function constructTimezoneFromDateTime(DateTimeInterface $date, &$tz) - { - if ($tz !== null) { - $safeTz = static::safeCreateDateTimeZone($tz); - - if ($safeTz) { - return ($date instanceof DateTimeImmutable ? $date : clone $date)->setTimezone($safeTz); - } - - return $date; - } - - $tz = $date->getTimezone(); - - return $date; - } - - /** - * Update constructedObjectId on cloned. - */ - public function __clone() - { - $this->constructedObjectId = spl_object_hash($this); - } - - /** - * Create a Carbon instance from a DateTime one. - * - * @param DateTimeInterface $date - * - * @return static - */ - public static function instance($date) - { - if ($date instanceof static) { - return clone $date; - } - - static::expectDateTime($date); - - $instance = new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); - - if ($date instanceof CarbonInterface) { - $settings = $date->getSettings(); - - if (!$date->hasLocalTranslator()) { - unset($settings['locale']); - } - - $instance->settings($settings); - } - - return $instance; - } - - /** - * Create a carbon instance from a string. - * - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * - * @param string|DateTimeInterface|null $time - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function rawParse($time = null, $tz = null) - { - if ($time instanceof DateTimeInterface) { - return static::instance($time); - } - - try { - return new static($time, $tz); - } catch (Exception $exception) { - // @codeCoverageIgnoreStart - try { - $date = @static::now($tz)->change($time); - } catch (DateMalformedStringException $ignoredException) { - $date = null; - } - // @codeCoverageIgnoreEnd - - if (!$date) { - throw new InvalidFormatException("Could not parse '$time': ".$exception->getMessage(), 0, $exception); - } - - return $date; - } - } - - /** - * Create a carbon instance from a string. - * - * This is an alias for the constructor that allows better fluent syntax - * as it allows you to do Carbon::parse('Monday next week')->fn() rather - * than (new Carbon('Monday next week'))->fn(). - * - * @param string|DateTimeInterface|null $time - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function parse($time = null, $tz = null) - { - $function = static::$parseFunction; - - if (!$function) { - return static::rawParse($time, $tz); - } - - if (\is_string($function) && method_exists(static::class, $function)) { - $function = [static::class, $function]; - } - - return $function(...\func_get_args()); - } - - /** - * Create a carbon instance from a localized string (in French, Japanese, Arabic, etc.). - * - * @param string $time date/time string in the given language (may also contain English). - * @param string|null $locale if locale is null or not specified, current global locale will be - * used instead. - * @param DateTimeZone|string|null $tz optional timezone for the new instance. - * - * @throws InvalidFormatException - * - * @return static - */ - public static function parseFromLocale($time, $locale = null, $tz = null) - { - return static::rawParse(static::translateTimeString($time, $locale, 'en'), $tz); - } - - /** - * Get a Carbon instance for the current date and time. - * - * @param DateTimeZone|string|null $tz - * - * @return static - */ - public static function now($tz = null) - { - return new static(null, $tz); - } - - /** - * Create a Carbon instance for today. - * - * @param DateTimeZone|string|null $tz - * - * @return static - */ - public static function today($tz = null) - { - return static::rawParse('today', $tz); - } - - /** - * Create a Carbon instance for tomorrow. - * - * @param DateTimeZone|string|null $tz - * - * @return static - */ - public static function tomorrow($tz = null) - { - return static::rawParse('tomorrow', $tz); - } - - /** - * Create a Carbon instance for yesterday. - * - * @param DateTimeZone|string|null $tz - * - * @return static - */ - public static function yesterday($tz = null) - { - return static::rawParse('yesterday', $tz); - } - - /** - * Create a Carbon instance for the greatest supported date. - * - * @return static - */ - public static function maxValue() - { - if (self::$PHPIntSize === 4) { - // 32 bit - return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore - } - - // 64 bit - return static::create(9999, 12, 31, 23, 59, 59); - } - - /** - * Create a Carbon instance for the lowest supported date. - * - * @return static - */ - public static function minValue() - { - if (self::$PHPIntSize === 4) { - // 32 bit - return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore - } - - // 64 bit - return static::create(1, 1, 1, 0, 0, 0); - } - - private static function assertBetween($unit, $value, $min, $max) - { - if (static::isStrictModeEnabled() && ($value < $min || $value > $max)) { - throw new OutOfRangeException($unit, $min, $max, $value); - } - } - - private static function createNowInstance($tz) - { - if (!static::hasTestNow()) { - return static::now($tz); - } - - $now = static::getTestNow(); - - if ($now instanceof Closure) { - return $now(static::now($tz)); - } - - return $now->avoidMutation()->tz($tz); - } - - /** - * Create a new Carbon instance from a specific date and time. - * - * If any of $year, $month or $day are set to null their now() values will - * be used. - * - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * - * If $hour is not null then the default values for $minute and $second - * will be 0. - * - * @param DateTimeInterface|int|null $year - * @param int|null $month - * @param int|null $day - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) - { - if ((\is_string($year) && !is_numeric($year)) || $year instanceof DateTimeInterface) { - return static::parse($year, $tz ?: (\is_string($month) || $month instanceof DateTimeZone ? $month : null)); - } - - $defaults = null; - $getDefault = function ($unit) use ($tz, &$defaults) { - if ($defaults === null) { - $now = self::createNowInstance($tz); - - $defaults = array_combine([ - 'year', - 'month', - 'day', - 'hour', - 'minute', - 'second', - ], explode('-', $now->rawFormat('Y-n-j-G-i-s.u'))); - } - - return $defaults[$unit]; - }; - - $year = $year ?? $getDefault('year'); - $month = $month ?? $getDefault('month'); - $day = $day ?? $getDefault('day'); - $hour = $hour ?? $getDefault('hour'); - $minute = $minute ?? $getDefault('minute'); - $second = (float) ($second ?? $getDefault('second')); - - self::assertBetween('month', $month, 0, 99); - self::assertBetween('day', $day, 0, 99); - self::assertBetween('hour', $hour, 0, 99); - self::assertBetween('minute', $minute, 0, 99); - self::assertBetween('second', $second, 0, 99); - - $fixYear = null; - - if ($year < 0) { - $fixYear = $year; - $year = 0; - } elseif ($year > 9999) { - $fixYear = $year - 9999; - $year = 9999; - } - - $second = ($second < 10 ? '0' : '').number_format($second, 6); - $instance = static::rawCreateFromFormat('!Y-n-j G:i:s.u', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); - - if ($fixYear !== null) { - $instance = $instance->addYears($fixYear); - } - - return $instance; - } - - /** - * Create a new safe Carbon instance from a specific date and time. - * - * If any of $year, $month or $day are set to null their now() values will - * be used. - * - * If $hour is null it will be set to its now() value and the default - * values for $minute and $second will be their now() values. - * - * If $hour is not null then the default values for $minute and $second - * will be 0. - * - * If one of the set values is not valid, an InvalidDateException - * will be thrown. - * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz - * - * @throws InvalidDateException - * - * @return static|false - */ - public static function createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) - { - $fields = static::getRangesByUnit(); - - foreach ($fields as $field => $range) { - if ($$field !== null && (!\is_int($$field) || $$field < $range[0] || $$field > $range[1])) { - if (static::isStrictModeEnabled()) { - throw new InvalidDateException($field, $$field); - } - - return false; - } - } - - $instance = static::create($year, $month, $day, $hour, $minute, $second, $tz); - - foreach (array_reverse($fields) as $field => $range) { - if ($$field !== null && (!\is_int($$field) || $$field !== $instance->$field)) { - if (static::isStrictModeEnabled()) { - throw new InvalidDateException($field, $$field); - } - - return false; - } - } - - return $instance; - } - - /** - * Create a new Carbon instance from a specific date and time using strict validation. - * - * @see create() - * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createStrict(?int $year = 0, ?int $month = 1, ?int $day = 1, ?int $hour = 0, ?int $minute = 0, ?int $second = 0, $tz = null): self - { - $initialStrictMode = static::isStrictModeEnabled(); - static::useStrictMode(true); - - try { - $date = static::create($year, $month, $day, $hour, $minute, $second, $tz); - } finally { - static::useStrictMode($initialStrictMode); - } - - return $date; - } - - /** - * Create a Carbon instance from just a date. The time portion is set to now. - * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createFromDate($year = null, $month = null, $day = null, $tz = null) - { - return static::create($year, $month, $day, null, null, null, $tz); - } - - /** - * Create a Carbon instance from just a date. The time portion is set to midnight. - * - * @param int|null $year - * @param int|null $month - * @param int|null $day - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null) - { - return static::create($year, $month, $day, 0, 0, 0, $tz); - } - - /** - * Create a Carbon instance from just a time. The date portion is set to today. - * - * @param int|null $hour - * @param int|null $minute - * @param int|null $second - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) - { - return static::create(null, null, null, $hour, $minute, $second, $tz); - } - - /** - * Create a Carbon instance from a time string. The date portion is set to today. - * - * @param string $time - * @param DateTimeZone|string|null $tz - * - * @throws InvalidFormatException - * - * @return static - */ - public static function createFromTimeString($time, $tz = null) - { - return static::today($tz)->setTimeFromTimeString($time); - } - - /** - * @param string $format Datetime format - * @param string $time - * @param DateTimeZone|string|false|null $originalTz - * - * @return DateTimeInterface|false - */ - private static function createFromFormatAndTimezone($format, $time, $originalTz) - { - // Work-around for https://bugs.php.net/bug.php?id=75577 - // @codeCoverageIgnoreStart - if (version_compare(PHP_VERSION, '7.3.0-dev', '<')) { - $format = str_replace('.v', '.u', $format); - } - // @codeCoverageIgnoreEnd - - if ($originalTz === null) { - return parent::createFromFormat($format, (string) $time); - } - - $tz = \is_int($originalTz) - ? @timezone_name_from_abbr('', (int) ($originalTz * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE), 1) - : $originalTz; - - $tz = static::safeCreateDateTimeZone($tz, $originalTz); - - if ($tz === false) { - return false; - } - - return parent::createFromFormat($format, (string) $time, $tz); - } - - /** - * Create a Carbon instance from a specific format. - * - * @param string $format Datetime format - * @param string $time - * @param DateTimeZone|string|false|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function rawCreateFromFormat($format, $time, $tz = null) - { - // Work-around for https://bugs.php.net/bug.php?id=80141 - $format = preg_replace('/(?getTimezone(); - } - - $mock = $mock->copy(); - - // Prepend mock datetime only if the format does not contain non escaped unix epoch reset flag. - if (!preg_match("/{$nonEscaped}[!|]/", $format)) { - if (preg_match('/[HhGgisvuB]/', $format)) { - $mock = $mock->setTime(0, 0); - } - - $format = static::MOCK_DATETIME_FORMAT.' '.$format; - $time = ($mock instanceof self ? $mock->rawFormat(static::MOCK_DATETIME_FORMAT) : $mock->format(static::MOCK_DATETIME_FORMAT)).' '.$time; - } - - // Regenerate date from the modified format to base result on the mocked instance instead of now. - $date = self::createFromFormatAndTimezone($format, $time, $tz); - } - - if ($date instanceof DateTimeInterface) { - $instance = static::instance($date); - $instance::setLastErrors($lastErrors); - - return $instance; - } - - if (static::isStrictModeEnabled()) { - throw new InvalidFormatException(implode(PHP_EOL, $lastErrors['errors'])); - } - - return false; - } - - /** - * Create a Carbon instance from a specific format. - * - * @param string $format Datetime format - * @param string $time - * @param DateTimeZone|string|false|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - #[ReturnTypeWillChange] - public static function createFromFormat($format, $time, $tz = null) - { - $function = static::$createFromFormatFunction; - - if (!$function) { - return static::rawCreateFromFormat($format, $time, $tz); - } - - if (\is_string($function) && method_exists(static::class, $function)) { - $function = [static::class, $function]; - } - - return $function(...\func_get_args()); - } - - /** - * Create a Carbon instance from a specific ISO format (same replacements as ->isoFormat()). - * - * @param string $format Datetime format - * @param string $time - * @param DateTimeZone|string|false|null $tz optional timezone - * @param string|null $locale locale to be used for LTS, LT, LL, LLL, etc. macro-formats (en by fault, unneeded if no such macro-format in use) - * @param \Symfony\Component\Translation\TranslatorInterface $translator optional custom translator to use for macro-formats - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function createFromIsoFormat($format, $time, $tz = null, $locale = 'en', $translator = null) - { - $format = preg_replace_callback('/(? static::getTranslationMessageWith($translator, 'formats.LT', $locale, 'h:mm A'), - 'LTS' => static::getTranslationMessageWith($translator, 'formats.LTS', $locale, 'h:mm:ss A'), - 'L' => static::getTranslationMessageWith($translator, 'formats.L', $locale, 'MM/DD/YYYY'), - 'LL' => static::getTranslationMessageWith($translator, 'formats.LL', $locale, 'MMMM D, YYYY'), - 'LLL' => static::getTranslationMessageWith($translator, 'formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), - 'LLLL' => static::getTranslationMessageWith($translator, 'formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), - ]; - } - - return $formats[$code] ?? preg_replace_callback( - '/MMMM|MM|DD|dddd/', - function ($code) { - return mb_substr($code[0], 1); - }, - $formats[strtoupper($code)] ?? '' - ); - }, $format); - - $format = preg_replace_callback('/(? 'd', - 'OM' => 'M', - 'OY' => 'Y', - 'OH' => 'G', - 'Oh' => 'g', - 'Om' => 'i', - 'Os' => 's', - 'D' => 'd', - 'DD' => 'd', - 'Do' => 'd', - 'd' => '!', - 'dd' => '!', - 'ddd' => 'D', - 'dddd' => 'D', - 'DDD' => 'z', - 'DDDD' => 'z', - 'DDDo' => 'z', - 'e' => '!', - 'E' => '!', - 'H' => 'G', - 'HH' => 'H', - 'h' => 'g', - 'hh' => 'h', - 'k' => 'G', - 'kk' => 'G', - 'hmm' => 'gi', - 'hmmss' => 'gis', - 'Hmm' => 'Gi', - 'Hmmss' => 'Gis', - 'm' => 'i', - 'mm' => 'i', - 'a' => 'a', - 'A' => 'a', - 's' => 's', - 'ss' => 's', - 'S' => '*', - 'SS' => '*', - 'SSS' => '*', - 'SSSS' => '*', - 'SSSSS' => '*', - 'SSSSSS' => 'u', - 'SSSSSSS' => 'u*', - 'SSSSSSSS' => 'u*', - 'SSSSSSSSS' => 'u*', - 'M' => 'm', - 'MM' => 'm', - 'MMM' => 'M', - 'MMMM' => 'M', - 'Mo' => 'm', - 'Q' => '!', - 'Qo' => '!', - 'G' => '!', - 'GG' => '!', - 'GGG' => '!', - 'GGGG' => '!', - 'GGGGG' => '!', - 'g' => '!', - 'gg' => '!', - 'ggg' => '!', - 'gggg' => '!', - 'ggggg' => '!', - 'W' => '!', - 'WW' => '!', - 'Wo' => '!', - 'w' => '!', - 'ww' => '!', - 'wo' => '!', - 'x' => 'U???', - 'X' => 'U', - 'Y' => 'Y', - 'YY' => 'y', - 'YYYY' => 'Y', - 'YYYYY' => 'Y', - 'YYYYYY' => 'Y', - 'z' => 'e', - 'zz' => 'e', - 'Z' => 'e', - 'ZZ' => 'e', - ]; - } - - $format = $replacements[$code] ?? '?'; - - if ($format === '!') { - throw new InvalidFormatException("Format $code not supported for creation."); - } - - return $format; - }, $format); - - return static::rawCreateFromFormat($format, $time, $tz); - } - - /** - * Create a Carbon instance from a specific format and a string in a given language. - * - * @param string $format Datetime format - * @param string $locale - * @param string $time - * @param DateTimeZone|string|false|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function createFromLocaleFormat($format, $locale, $time, $tz = null) - { - $format = preg_replace_callback( - '/(?:\\\\[a-zA-Z]|[bfkqCEJKQRV]){2,}/', - static function (array $match) use ($locale): string { - $word = str_replace('\\', '', $match[0]); - $translatedWord = static::translateTimeString($word, $locale, 'en'); - - return $word === $translatedWord - ? $match[0] - : preg_replace('/[a-zA-Z]/', '\\\\$0', $translatedWord); - }, - $format - ); - - return static::rawCreateFromFormat($format, static::translateTimeString($time, $locale, 'en'), $tz); - } - - /** - * Create a Carbon instance from a specific ISO format and a string in a given language. - * - * @param string $format Datetime ISO format - * @param string $locale - * @param string $time - * @param DateTimeZone|string|false|null $tz - * - * @throws InvalidFormatException - * - * @return static|false - */ - public static function createFromLocaleIsoFormat($format, $locale, $time, $tz = null) - { - $time = static::translateTimeString($time, $locale, 'en', CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS | CarbonInterface::TRANSLATE_MERIDIEM); - - return static::createFromIsoFormat($format, $time, $tz, $locale); - } - - /** - * Make a Carbon instance from given variable if possible. - * - * Always return a new instance. Parse only strings and only these likely to be dates (skip intervals - * and recurrences). Throw an exception for invalid format, but otherwise return null. - * - * @param mixed $var - * - * @throws InvalidFormatException - * - * @return static|null - */ - public static function make($var) - { - if ($var instanceof DateTimeInterface) { - return static::instance($var); - } - - $date = null; - - if (\is_string($var)) { - $var = trim($var); - - if (!preg_match('/^P[\dT]/', $var) && - !preg_match('/^R\d/', $var) && - preg_match('/[a-z\d]/i', $var) - ) { - $date = static::parse($var); - } - } - - return $date; - } - - /** - * Set last errors. - * - * @param array|bool $lastErrors - * - * @return void - */ - private static function setLastErrors($lastErrors) - { - if (\is_array($lastErrors) || $lastErrors === false) { - static::$lastErrors = \is_array($lastErrors) ? $lastErrors : [ - 'warning_count' => 0, - 'warnings' => [], - 'error_count' => 0, - 'errors' => [], - ]; - } - } - - /** - * {@inheritdoc} - * - * @return array - */ - #[ReturnTypeWillChange] - public static function getLastErrors() - { - return static::$lastErrors; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Date.php b/vendor/nesbot/carbon/src/Carbon/Traits/Date.php deleted file mode 100644 index 8ae5c17..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Date.php +++ /dev/null @@ -1,2747 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use BadMethodCallException; -use Carbon\Carbon; -use Carbon\CarbonInterface; -use Carbon\CarbonPeriod; -use Carbon\CarbonTimeZone; -use Carbon\Exceptions\BadComparisonUnitException; -use Carbon\Exceptions\ImmutableException; -use Carbon\Exceptions\InvalidTimeZoneException; -use Carbon\Exceptions\InvalidTypeException; -use Carbon\Exceptions\UnknownGetterException; -use Carbon\Exceptions\UnknownMethodException; -use Carbon\Exceptions\UnknownSetterException; -use Carbon\Exceptions\UnknownUnitException; -use Closure; -use DateInterval; -use DatePeriod; -use DateTime; -use DateTimeImmutable; -use DateTimeInterface; -use DateTimeZone; -use InvalidArgumentException; -use ReflectionException; -use ReturnTypeWillChange; -use Throwable; - -/** - * A simple API extension for DateTime. - * - * @mixin DeprecatedProperties - * - * - * - * @property int $year - * @property int $yearIso - * @property int $month - * @property int $day - * @property int $hour - * @property int $minute - * @property int $second - * @property int $micro - * @property int $microsecond - * @property int|float|string $timestamp seconds since the Unix Epoch - * @property string $englishDayOfWeek the day of week in English - * @property string $shortEnglishDayOfWeek the abbreviated day of week in English - * @property string $englishMonth the month in English - * @property string $shortEnglishMonth the abbreviated month in English - * @property int $milliseconds - * @property int $millisecond - * @property int $milli - * @property int $week 1 through 53 - * @property int $isoWeek 1 through 53 - * @property int $weekYear year according to week format - * @property int $isoWeekYear year according to ISO week format - * @property int $dayOfYear 1 through 366 - * @property int $age does a diffInYears() with default parameters - * @property int $offset the timezone offset in seconds from UTC - * @property int $offsetMinutes the timezone offset in minutes from UTC - * @property int $offsetHours the timezone offset in hours from UTC - * @property CarbonTimeZone $timezone the current timezone - * @property CarbonTimeZone $tz alias of $timezone - * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) - * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) - * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday - * @property-read int $daysInMonth number of days in the given month - * @property-read string $latinMeridiem "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) - * @property-read string $latinUpperMeridiem "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) - * @property-read string $timezoneAbbreviatedName the current timezone abbreviated name - * @property-read string $tzAbbrName alias of $timezoneAbbreviatedName - * @property-read string $dayName long name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortDayName short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $minDayName very short name of weekday translated according to Carbon locale, in english if no translation available for current language - * @property-read string $monthName long name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $shortMonthName short name of month translated according to Carbon locale, in english if no translation available for current language - * @property-read string $meridiem lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read string $upperMeridiem uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - * @property-read int $noZeroHour current hour from 1 to 24 - * @property-read int $weeksInYear 51 through 53 - * @property-read int $isoWeeksInYear 51 through 53 - * @property-read int $weekOfMonth 1 through 5 - * @property-read int $weekNumberInMonth 1 through 5 - * @property-read int $firstWeekDay 0 through 6 - * @property-read int $lastWeekDay 0 through 6 - * @property-read int $daysInYear 365 or 366 - * @property-read int $quarter the quarter of this instance, 1 - 4 - * @property-read int $decade the decade of this instance - * @property-read int $century the century of this instance - * @property-read int $millennium the millennium of this instance - * @property-read bool $dst daylight savings time indicator, true if DST, false otherwise - * @property-read bool $local checks if the timezone is local, true if local, false otherwise - * @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise - * @property-read string $timezoneName the current timezone name - * @property-read string $tzName alias of $timezoneName - * @property-read string $locale locale of the current instance - * - * @method bool isUtc() Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) - * @method bool isLocal() Check if the current instance has non-UTC timezone. - * @method bool isValid() Check if the current instance is a valid date. - * @method bool isDST() Check if the current instance is in a daylight saving time. - * @method bool isSunday() Checks if the instance day is sunday. - * @method bool isMonday() Checks if the instance day is monday. - * @method bool isTuesday() Checks if the instance day is tuesday. - * @method bool isWednesday() Checks if the instance day is wednesday. - * @method bool isThursday() Checks if the instance day is thursday. - * @method bool isFriday() Checks if the instance day is friday. - * @method bool isSaturday() Checks if the instance day is saturday. - * @method bool isSameYear(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same year as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentYear() Checks if the instance is in the same year as the current moment. - * @method bool isNextYear() Checks if the instance is in the same year as the current moment next year. - * @method bool isLastYear() Checks if the instance is in the same year as the current moment last year. - * @method bool isSameWeek(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same week as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentWeek() Checks if the instance is in the same week as the current moment. - * @method bool isNextWeek() Checks if the instance is in the same week as the current moment next week. - * @method bool isLastWeek() Checks if the instance is in the same week as the current moment last week. - * @method bool isSameDay(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same day as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDay() Checks if the instance is in the same day as the current moment. - * @method bool isNextDay() Checks if the instance is in the same day as the current moment next day. - * @method bool isLastDay() Checks if the instance is in the same day as the current moment last day. - * @method bool isSameHour(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same hour as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentHour() Checks if the instance is in the same hour as the current moment. - * @method bool isNextHour() Checks if the instance is in the same hour as the current moment next hour. - * @method bool isLastHour() Checks if the instance is in the same hour as the current moment last hour. - * @method bool isSameMinute(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same minute as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMinute() Checks if the instance is in the same minute as the current moment. - * @method bool isNextMinute() Checks if the instance is in the same minute as the current moment next minute. - * @method bool isLastMinute() Checks if the instance is in the same minute as the current moment last minute. - * @method bool isSameSecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same second as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentSecond() Checks if the instance is in the same second as the current moment. - * @method bool isNextSecond() Checks if the instance is in the same second as the current moment next second. - * @method bool isLastSecond() Checks if the instance is in the same second as the current moment last second. - * @method bool isSameMicro(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicro() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicro() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicro() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isSameMicrosecond(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same microsecond as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMicrosecond() Checks if the instance is in the same microsecond as the current moment. - * @method bool isNextMicrosecond() Checks if the instance is in the same microsecond as the current moment next microsecond. - * @method bool isLastMicrosecond() Checks if the instance is in the same microsecond as the current moment last microsecond. - * @method bool isCurrentMonth() Checks if the instance is in the same month as the current moment. - * @method bool isNextMonth() Checks if the instance is in the same month as the current moment next month. - * @method bool isLastMonth() Checks if the instance is in the same month as the current moment last month. - * @method bool isCurrentQuarter() Checks if the instance is in the same quarter as the current moment. - * @method bool isNextQuarter() Checks if the instance is in the same quarter as the current moment next quarter. - * @method bool isLastQuarter() Checks if the instance is in the same quarter as the current moment last quarter. - * @method bool isSameDecade(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same decade as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentDecade() Checks if the instance is in the same decade as the current moment. - * @method bool isNextDecade() Checks if the instance is in the same decade as the current moment next decade. - * @method bool isLastDecade() Checks if the instance is in the same decade as the current moment last decade. - * @method bool isSameCentury(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same century as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentCentury() Checks if the instance is in the same century as the current moment. - * @method bool isNextCentury() Checks if the instance is in the same century as the current moment next century. - * @method bool isLastCentury() Checks if the instance is in the same century as the current moment last century. - * @method bool isSameMillennium(Carbon|DateTimeInterface|string|null $date = null) Checks if the given date is in the same millennium as the instance. If null passed, compare to now (with the same timezone). - * @method bool isCurrentMillennium() Checks if the instance is in the same millennium as the current moment. - * @method bool isNextMillennium() Checks if the instance is in the same millennium as the current moment next millennium. - * @method bool isLastMillennium() Checks if the instance is in the same millennium as the current moment last millennium. - * @method CarbonInterface years(int $value) Set current instance year to the given value. - * @method CarbonInterface year(int $value) Set current instance year to the given value. - * @method CarbonInterface setYears(int $value) Set current instance year to the given value. - * @method CarbonInterface setYear(int $value) Set current instance year to the given value. - * @method CarbonInterface months(int $value) Set current instance month to the given value. - * @method CarbonInterface month(int $value) Set current instance month to the given value. - * @method CarbonInterface setMonths(int $value) Set current instance month to the given value. - * @method CarbonInterface setMonth(int $value) Set current instance month to the given value. - * @method CarbonInterface days(int $value) Set current instance day to the given value. - * @method CarbonInterface day(int $value) Set current instance day to the given value. - * @method CarbonInterface setDays(int $value) Set current instance day to the given value. - * @method CarbonInterface setDay(int $value) Set current instance day to the given value. - * @method CarbonInterface hours(int $value) Set current instance hour to the given value. - * @method CarbonInterface hour(int $value) Set current instance hour to the given value. - * @method CarbonInterface setHours(int $value) Set current instance hour to the given value. - * @method CarbonInterface setHour(int $value) Set current instance hour to the given value. - * @method CarbonInterface minutes(int $value) Set current instance minute to the given value. - * @method CarbonInterface minute(int $value) Set current instance minute to the given value. - * @method CarbonInterface setMinutes(int $value) Set current instance minute to the given value. - * @method CarbonInterface setMinute(int $value) Set current instance minute to the given value. - * @method CarbonInterface seconds(int $value) Set current instance second to the given value. - * @method CarbonInterface second(int $value) Set current instance second to the given value. - * @method CarbonInterface setSeconds(int $value) Set current instance second to the given value. - * @method CarbonInterface setSecond(int $value) Set current instance second to the given value. - * @method CarbonInterface millis(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface milli(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface setMillis(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface setMilli(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface milliseconds(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface millisecond(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface setMilliseconds(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface setMillisecond(int $value) Set current instance millisecond to the given value. - * @method CarbonInterface micros(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface micro(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface setMicros(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface setMicro(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface microseconds(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface microsecond(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface setMicroseconds(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface setMicrosecond(int $value) Set current instance microsecond to the given value. - * @method CarbonInterface addYears(int $value = 1) Add years (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addYear() Add one year to the instance (using date interval). - * @method CarbonInterface subYears(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subYear() Sub one year to the instance (using date interval). - * @method CarbonInterface addYearsWithOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addYearWithOverflow() Add one year to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subYearsWithOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subYearWithOverflow() Sub one year to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addYearsWithoutOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearWithoutOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearsWithoutOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearWithoutOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearsWithNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearWithNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearsWithNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearWithNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearsNoOverflow(int $value = 1) Add years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addYearNoOverflow() Add one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearsNoOverflow(int $value = 1) Sub years (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subYearNoOverflow() Sub one year to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonths(int $value = 1) Add months (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMonth() Add one month to the instance (using date interval). - * @method CarbonInterface subMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMonth() Sub one month to the instance (using date interval). - * @method CarbonInterface addMonthsWithOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addMonthWithOverflow() Add one month to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subMonthsWithOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subMonthWithOverflow() Sub one month to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addMonthsWithoutOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthWithoutOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthsWithoutOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthWithoutOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthsWithNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthWithNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthsWithNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthWithNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthsNoOverflow(int $value = 1) Add months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMonthNoOverflow() Add one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthsNoOverflow(int $value = 1) Sub months (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMonthNoOverflow() Sub one month to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDays(int $value = 1) Add days (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addDay() Add one day to the instance (using date interval). - * @method CarbonInterface subDays(int $value = 1) Sub days (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subDay() Sub one day to the instance (using date interval). - * @method CarbonInterface addHours(int $value = 1) Add hours (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addHour() Add one hour to the instance (using date interval). - * @method CarbonInterface subHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subHour() Sub one hour to the instance (using date interval). - * @method CarbonInterface addMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMinute() Add one minute to the instance (using date interval). - * @method CarbonInterface subMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMinute() Sub one minute to the instance (using date interval). - * @method CarbonInterface addSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addSecond() Add one second to the instance (using date interval). - * @method CarbonInterface subSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subSecond() Sub one second to the instance (using date interval). - * @method CarbonInterface addMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMilli() Add one millisecond to the instance (using date interval). - * @method CarbonInterface subMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMilli() Sub one millisecond to the instance (using date interval). - * @method CarbonInterface addMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMillisecond() Add one millisecond to the instance (using date interval). - * @method CarbonInterface subMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMillisecond() Sub one millisecond to the instance (using date interval). - * @method CarbonInterface addMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMicro() Add one microsecond to the instance (using date interval). - * @method CarbonInterface subMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMicro() Sub one microsecond to the instance (using date interval). - * @method CarbonInterface addMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMicrosecond() Add one microsecond to the instance (using date interval). - * @method CarbonInterface subMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMicrosecond() Sub one microsecond to the instance (using date interval). - * @method CarbonInterface addMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addMillennium() Add one millennium to the instance (using date interval). - * @method CarbonInterface subMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subMillennium() Sub one millennium to the instance (using date interval). - * @method CarbonInterface addMillenniaWithOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addMillenniumWithOverflow() Add one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subMillenniaWithOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subMillenniumWithOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addMillenniaWithoutOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniumWithoutOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniaWithoutOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniumWithoutOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniaWithNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniumWithNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniaWithNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniumWithNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniaNoOverflow(int $value = 1) Add millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addMillenniumNoOverflow() Add one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniaNoOverflow(int $value = 1) Sub millennia (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subMillenniumNoOverflow() Sub one millennium to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addCentury() Add one century to the instance (using date interval). - * @method CarbonInterface subCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subCentury() Sub one century to the instance (using date interval). - * @method CarbonInterface addCenturiesWithOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addCenturyWithOverflow() Add one century to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subCenturiesWithOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subCenturyWithOverflow() Sub one century to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addCenturiesWithoutOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturyWithoutOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturiesWithoutOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturyWithoutOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturiesWithNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturyWithNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturiesWithNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturyWithNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturiesNoOverflow(int $value = 1) Add centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addCenturyNoOverflow() Add one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturiesNoOverflow(int $value = 1) Sub centuries (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subCenturyNoOverflow() Sub one century to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addDecade() Add one decade to the instance (using date interval). - * @method CarbonInterface subDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subDecade() Sub one decade to the instance (using date interval). - * @method CarbonInterface addDecadesWithOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addDecadeWithOverflow() Add one decade to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subDecadesWithOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subDecadeWithOverflow() Sub one decade to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addDecadesWithoutOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadeWithoutOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadesWithoutOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadeWithoutOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadesWithNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadeWithNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadesWithNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadeWithNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadesNoOverflow(int $value = 1) Add decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addDecadeNoOverflow() Add one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadesNoOverflow(int $value = 1) Sub decades (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subDecadeNoOverflow() Sub one decade to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addQuarter() Add one quarter to the instance (using date interval). - * @method CarbonInterface subQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subQuarter() Sub one quarter to the instance (using date interval). - * @method CarbonInterface addQuartersWithOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addQuarterWithOverflow() Add one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subQuartersWithOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface subQuarterWithOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly allowed. - * @method CarbonInterface addQuartersWithoutOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuarterWithoutOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuartersWithoutOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuarterWithoutOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuartersWithNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuarterWithNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuartersWithNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuarterWithNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuartersNoOverflow(int $value = 1) Add quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addQuarterNoOverflow() Add one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuartersNoOverflow(int $value = 1) Sub quarters (the $value count passed in) to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface subQuarterNoOverflow() Sub one quarter to the instance (using date interval) with overflow explicitly forbidden. - * @method CarbonInterface addWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addWeek() Add one week to the instance (using date interval). - * @method CarbonInterface subWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subWeek() Sub one week to the instance (using date interval). - * @method CarbonInterface addWeekdays(int $value = 1) Add weekdays (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface addWeekday() Add one weekday to the instance (using date interval). - * @method CarbonInterface subWeekdays(int $value = 1) Sub weekdays (the $value count passed in) to the instance (using date interval). - * @method CarbonInterface subWeekday() Sub one weekday to the instance (using date interval). - * @method CarbonInterface addRealMicros(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMicro() Add one microsecond to the instance (using timestamp). - * @method CarbonInterface subRealMicros(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMicro() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method CarbonInterface addRealMicroseconds(int $value = 1) Add microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMicrosecond() Add one microsecond to the instance (using timestamp). - * @method CarbonInterface subRealMicroseconds(int $value = 1) Sub microseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMicrosecond() Sub one microsecond to the instance (using timestamp). - * @method CarbonPeriod microsecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each microsecond or every X microseconds if a factor is given. - * @method CarbonInterface addRealMillis(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMilli() Add one millisecond to the instance (using timestamp). - * @method CarbonInterface subRealMillis(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMilli() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method CarbonInterface addRealMilliseconds(int $value = 1) Add milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMillisecond() Add one millisecond to the instance (using timestamp). - * @method CarbonInterface subRealMilliseconds(int $value = 1) Sub milliseconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMillisecond() Sub one millisecond to the instance (using timestamp). - * @method CarbonPeriod millisecondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millisecond or every X milliseconds if a factor is given. - * @method CarbonInterface addRealSeconds(int $value = 1) Add seconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealSecond() Add one second to the instance (using timestamp). - * @method CarbonInterface subRealSeconds(int $value = 1) Sub seconds (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealSecond() Sub one second to the instance (using timestamp). - * @method CarbonPeriod secondsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each second or every X seconds if a factor is given. - * @method CarbonInterface addRealMinutes(int $value = 1) Add minutes (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMinute() Add one minute to the instance (using timestamp). - * @method CarbonInterface subRealMinutes(int $value = 1) Sub minutes (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMinute() Sub one minute to the instance (using timestamp). - * @method CarbonPeriod minutesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each minute or every X minutes if a factor is given. - * @method CarbonInterface addRealHours(int $value = 1) Add hours (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealHour() Add one hour to the instance (using timestamp). - * @method CarbonInterface subRealHours(int $value = 1) Sub hours (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealHour() Sub one hour to the instance (using timestamp). - * @method CarbonPeriod hoursUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each hour or every X hours if a factor is given. - * @method CarbonInterface addRealDays(int $value = 1) Add days (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealDay() Add one day to the instance (using timestamp). - * @method CarbonInterface subRealDays(int $value = 1) Sub days (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealDay() Sub one day to the instance (using timestamp). - * @method CarbonPeriod daysUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each day or every X days if a factor is given. - * @method CarbonInterface addRealWeeks(int $value = 1) Add weeks (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealWeek() Add one week to the instance (using timestamp). - * @method CarbonInterface subRealWeeks(int $value = 1) Sub weeks (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealWeek() Sub one week to the instance (using timestamp). - * @method CarbonPeriod weeksUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each week or every X weeks if a factor is given. - * @method CarbonInterface addRealMonths(int $value = 1) Add months (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMonth() Add one month to the instance (using timestamp). - * @method CarbonInterface subRealMonths(int $value = 1) Sub months (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMonth() Sub one month to the instance (using timestamp). - * @method CarbonPeriod monthsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each month or every X months if a factor is given. - * @method CarbonInterface addRealQuarters(int $value = 1) Add quarters (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealQuarter() Add one quarter to the instance (using timestamp). - * @method CarbonInterface subRealQuarters(int $value = 1) Sub quarters (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealQuarter() Sub one quarter to the instance (using timestamp). - * @method CarbonPeriod quartersUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each quarter or every X quarters if a factor is given. - * @method CarbonInterface addRealYears(int $value = 1) Add years (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealYear() Add one year to the instance (using timestamp). - * @method CarbonInterface subRealYears(int $value = 1) Sub years (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealYear() Sub one year to the instance (using timestamp). - * @method CarbonPeriod yearsUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each year or every X years if a factor is given. - * @method CarbonInterface addRealDecades(int $value = 1) Add decades (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealDecade() Add one decade to the instance (using timestamp). - * @method CarbonInterface subRealDecades(int $value = 1) Sub decades (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealDecade() Sub one decade to the instance (using timestamp). - * @method CarbonPeriod decadesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each decade or every X decades if a factor is given. - * @method CarbonInterface addRealCenturies(int $value = 1) Add centuries (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealCentury() Add one century to the instance (using timestamp). - * @method CarbonInterface subRealCenturies(int $value = 1) Sub centuries (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealCentury() Sub one century to the instance (using timestamp). - * @method CarbonPeriod centuriesUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each century or every X centuries if a factor is given. - * @method CarbonInterface addRealMillennia(int $value = 1) Add millennia (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface addRealMillennium() Add one millennium to the instance (using timestamp). - * @method CarbonInterface subRealMillennia(int $value = 1) Sub millennia (the $value count passed in) to the instance (using timestamp). - * @method CarbonInterface subRealMillennium() Sub one millennium to the instance (using timestamp). - * @method CarbonPeriod millenniaUntil($endDate = null, int $factor = 1) Return an iterable period from current date to given end (string, DateTime or Carbon instance) for each millennium or every X millennia if a factor is given. - * @method CarbonInterface roundYear(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method CarbonInterface roundYears(float $precision = 1, string $function = "round") Round the current instance year with given precision using the given function. - * @method CarbonInterface floorYear(float $precision = 1) Truncate the current instance year with given precision. - * @method CarbonInterface floorYears(float $precision = 1) Truncate the current instance year with given precision. - * @method CarbonInterface ceilYear(float $precision = 1) Ceil the current instance year with given precision. - * @method CarbonInterface ceilYears(float $precision = 1) Ceil the current instance year with given precision. - * @method CarbonInterface roundMonth(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method CarbonInterface roundMonths(float $precision = 1, string $function = "round") Round the current instance month with given precision using the given function. - * @method CarbonInterface floorMonth(float $precision = 1) Truncate the current instance month with given precision. - * @method CarbonInterface floorMonths(float $precision = 1) Truncate the current instance month with given precision. - * @method CarbonInterface ceilMonth(float $precision = 1) Ceil the current instance month with given precision. - * @method CarbonInterface ceilMonths(float $precision = 1) Ceil the current instance month with given precision. - * @method CarbonInterface roundDay(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method CarbonInterface roundDays(float $precision = 1, string $function = "round") Round the current instance day with given precision using the given function. - * @method CarbonInterface floorDay(float $precision = 1) Truncate the current instance day with given precision. - * @method CarbonInterface floorDays(float $precision = 1) Truncate the current instance day with given precision. - * @method CarbonInterface ceilDay(float $precision = 1) Ceil the current instance day with given precision. - * @method CarbonInterface ceilDays(float $precision = 1) Ceil the current instance day with given precision. - * @method CarbonInterface roundHour(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method CarbonInterface roundHours(float $precision = 1, string $function = "round") Round the current instance hour with given precision using the given function. - * @method CarbonInterface floorHour(float $precision = 1) Truncate the current instance hour with given precision. - * @method CarbonInterface floorHours(float $precision = 1) Truncate the current instance hour with given precision. - * @method CarbonInterface ceilHour(float $precision = 1) Ceil the current instance hour with given precision. - * @method CarbonInterface ceilHours(float $precision = 1) Ceil the current instance hour with given precision. - * @method CarbonInterface roundMinute(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method CarbonInterface roundMinutes(float $precision = 1, string $function = "round") Round the current instance minute with given precision using the given function. - * @method CarbonInterface floorMinute(float $precision = 1) Truncate the current instance minute with given precision. - * @method CarbonInterface floorMinutes(float $precision = 1) Truncate the current instance minute with given precision. - * @method CarbonInterface ceilMinute(float $precision = 1) Ceil the current instance minute with given precision. - * @method CarbonInterface ceilMinutes(float $precision = 1) Ceil the current instance minute with given precision. - * @method CarbonInterface roundSecond(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method CarbonInterface roundSeconds(float $precision = 1, string $function = "round") Round the current instance second with given precision using the given function. - * @method CarbonInterface floorSecond(float $precision = 1) Truncate the current instance second with given precision. - * @method CarbonInterface floorSeconds(float $precision = 1) Truncate the current instance second with given precision. - * @method CarbonInterface ceilSecond(float $precision = 1) Ceil the current instance second with given precision. - * @method CarbonInterface ceilSeconds(float $precision = 1) Ceil the current instance second with given precision. - * @method CarbonInterface roundMillennium(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method CarbonInterface roundMillennia(float $precision = 1, string $function = "round") Round the current instance millennium with given precision using the given function. - * @method CarbonInterface floorMillennium(float $precision = 1) Truncate the current instance millennium with given precision. - * @method CarbonInterface floorMillennia(float $precision = 1) Truncate the current instance millennium with given precision. - * @method CarbonInterface ceilMillennium(float $precision = 1) Ceil the current instance millennium with given precision. - * @method CarbonInterface ceilMillennia(float $precision = 1) Ceil the current instance millennium with given precision. - * @method CarbonInterface roundCentury(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method CarbonInterface roundCenturies(float $precision = 1, string $function = "round") Round the current instance century with given precision using the given function. - * @method CarbonInterface floorCentury(float $precision = 1) Truncate the current instance century with given precision. - * @method CarbonInterface floorCenturies(float $precision = 1) Truncate the current instance century with given precision. - * @method CarbonInterface ceilCentury(float $precision = 1) Ceil the current instance century with given precision. - * @method CarbonInterface ceilCenturies(float $precision = 1) Ceil the current instance century with given precision. - * @method CarbonInterface roundDecade(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method CarbonInterface roundDecades(float $precision = 1, string $function = "round") Round the current instance decade with given precision using the given function. - * @method CarbonInterface floorDecade(float $precision = 1) Truncate the current instance decade with given precision. - * @method CarbonInterface floorDecades(float $precision = 1) Truncate the current instance decade with given precision. - * @method CarbonInterface ceilDecade(float $precision = 1) Ceil the current instance decade with given precision. - * @method CarbonInterface ceilDecades(float $precision = 1) Ceil the current instance decade with given precision. - * @method CarbonInterface roundQuarter(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method CarbonInterface roundQuarters(float $precision = 1, string $function = "round") Round the current instance quarter with given precision using the given function. - * @method CarbonInterface floorQuarter(float $precision = 1) Truncate the current instance quarter with given precision. - * @method CarbonInterface floorQuarters(float $precision = 1) Truncate the current instance quarter with given precision. - * @method CarbonInterface ceilQuarter(float $precision = 1) Ceil the current instance quarter with given precision. - * @method CarbonInterface ceilQuarters(float $precision = 1) Ceil the current instance quarter with given precision. - * @method CarbonInterface roundMillisecond(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method CarbonInterface roundMilliseconds(float $precision = 1, string $function = "round") Round the current instance millisecond with given precision using the given function. - * @method CarbonInterface floorMillisecond(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method CarbonInterface floorMilliseconds(float $precision = 1) Truncate the current instance millisecond with given precision. - * @method CarbonInterface ceilMillisecond(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method CarbonInterface ceilMilliseconds(float $precision = 1) Ceil the current instance millisecond with given precision. - * @method CarbonInterface roundMicrosecond(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method CarbonInterface roundMicroseconds(float $precision = 1, string $function = "round") Round the current instance microsecond with given precision using the given function. - * @method CarbonInterface floorMicrosecond(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method CarbonInterface floorMicroseconds(float $precision = 1) Truncate the current instance microsecond with given precision. - * @method CarbonInterface ceilMicrosecond(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method CarbonInterface ceilMicroseconds(float $precision = 1) Ceil the current instance microsecond with given precision. - * @method string shortAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longAbsoluteDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Absolute' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'Relative' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToNowDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToNow' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string shortRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (short format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * @method string longRelativeToOtherDiffForHumans(DateTimeInterface $other = null, int $parts = 1) Get the difference (long format, 'RelativeToOther' mode) in a human readable format in the current locale. ($other and $parts parameters can be swapped.) - * - * - */ -trait Date -{ - use Boundaries; - use Comparison; - use Converter; - use Creator; - use Difference; - use Macro; - use MagicParameter; - use Modifiers; - use Mutability; - use ObjectInitialisation; - use Options; - use Rounding; - use Serialization; - use Test; - use Timestamp; - use Units; - use Week; - - /** - * Names of days of the week. - * - * @var array - */ - protected static $days = [ - // @call isDayOfWeek - CarbonInterface::SUNDAY => 'Sunday', - // @call isDayOfWeek - CarbonInterface::MONDAY => 'Monday', - // @call isDayOfWeek - CarbonInterface::TUESDAY => 'Tuesday', - // @call isDayOfWeek - CarbonInterface::WEDNESDAY => 'Wednesday', - // @call isDayOfWeek - CarbonInterface::THURSDAY => 'Thursday', - // @call isDayOfWeek - CarbonInterface::FRIDAY => 'Friday', - // @call isDayOfWeek - CarbonInterface::SATURDAY => 'Saturday', - ]; - - /** - * Will UTF8 encoding be used to print localized date/time ? - * - * @var bool - */ - protected static $utf8 = false; - - /** - * List of unit and magic methods associated as doc-comments. - * - * @var array - */ - protected static $units = [ - // @call setUnit - // @call addUnit - 'year', - // @call setUnit - // @call addUnit - 'month', - // @call setUnit - // @call addUnit - 'day', - // @call setUnit - // @call addUnit - 'hour', - // @call setUnit - // @call addUnit - 'minute', - // @call setUnit - // @call addUnit - 'second', - // @call setUnit - // @call addUnit - 'milli', - // @call setUnit - // @call addUnit - 'millisecond', - // @call setUnit - // @call addUnit - 'micro', - // @call setUnit - // @call addUnit - 'microsecond', - ]; - - /** - * Creates a DateTimeZone from a string, DateTimeZone or integer offset. - * - * @param DateTimeZone|string|int|null $object original value to get CarbonTimeZone from it. - * @param DateTimeZone|string|int|null $objectDump dump of the object for error messages. - * - * @throws InvalidTimeZoneException - * - * @return CarbonTimeZone|false - */ - protected static function safeCreateDateTimeZone($object, $objectDump = null) - { - return CarbonTimeZone::instance($object, $objectDump); - } - - /** - * Get the TimeZone associated with the Carbon instance (as CarbonTimeZone). - * - * @return CarbonTimeZone - * - * @link https://php.net/manual/en/datetime.gettimezone.php - */ - #[ReturnTypeWillChange] - public function getTimezone() - { - return CarbonTimeZone::instance(parent::getTimezone()); - } - - /** - * List of minimum and maximums for each unit. - * - * @param int $daysInMonth - * - * @return array - */ - protected static function getRangesByUnit(int $daysInMonth = 31): array - { - return [ - // @call roundUnit - 'year' => [1, 9999], - // @call roundUnit - 'month' => [1, static::MONTHS_PER_YEAR], - // @call roundUnit - 'day' => [1, $daysInMonth], - // @call roundUnit - 'hour' => [0, static::HOURS_PER_DAY - 1], - // @call roundUnit - 'minute' => [0, static::MINUTES_PER_HOUR - 1], - // @call roundUnit - 'second' => [0, static::SECONDS_PER_MINUTE - 1], - ]; - } - - /** - * Get a copy of the instance. - * - * @return static - */ - public function copy() - { - return clone $this; - } - - /** - * @alias copy - * - * Get a copy of the instance. - * - * @return static - */ - public function clone() - { - return clone $this; - } - - /** - * Clone the current instance if it's mutable. - * - * This method is convenient to ensure you don't mutate the initial object - * but avoid to make a useless copy of it if it's already immutable. - * - * @return static - */ - public function avoidMutation(): self - { - if ($this instanceof DateTimeImmutable) { - return $this; - } - - return clone $this; - } - - /** - * Returns a present instance in the same timezone. - * - * @return static - */ - public function nowWithSameTz() - { - return static::now($this->getTimezone()); - } - - /** - * Throws an exception if the given object is not a DateTime and does not implement DateTimeInterface. - * - * @param mixed $date - * @param string|array $other - * - * @throws InvalidTypeException - */ - protected static function expectDateTime($date, $other = []) - { - $message = 'Expected '; - foreach ((array) $other as $expect) { - $message .= "$expect, "; - } - - if (!$date instanceof DateTime && !$date instanceof DateTimeInterface) { - throw new InvalidTypeException( - $message.'DateTime or DateTimeInterface, '. - (\is_object($date) ? \get_class($date) : \gettype($date)).' given' - ); - } - } - - /** - * Return the Carbon instance passed through, a now instance in the same timezone - * if null given or parse the input if string given. - * - * @param Carbon|DateTimeInterface|string|null $date - * - * @return static - */ - protected function resolveCarbon($date = null) - { - if (!$date) { - return $this->nowWithSameTz(); - } - - if (\is_string($date)) { - return static::parse($date, $this->getTimezone()); - } - - static::expectDateTime($date, ['null', 'string']); - - return $date instanceof self ? $date : static::instance($date); - } - - /** - * Return the Carbon instance passed through, a now instance in UTC - * if null given or parse the input if string given (using current timezone - * then switching to UTC). - * - * @param Carbon|DateTimeInterface|string|null $date - * - * @return static - */ - protected function resolveUTC($date = null): self - { - if (!$date) { - return static::now('UTC'); - } - - if (\is_string($date)) { - return static::parse($date, $this->getTimezone())->utc(); - } - - static::expectDateTime($date, ['null', 'string']); - - return $date instanceof self ? $date : static::instance($date)->utc(); - } - - /** - * Return the Carbon instance passed through, a now instance in the same timezone - * if null given or parse the input if string given. - * - * @param Carbon|\Carbon\CarbonPeriod|\Carbon\CarbonInterval|\DateInterval|\DatePeriod|DateTimeInterface|string|null $date - * - * @return static - */ - public function carbonize($date = null) - { - if ($date instanceof DateInterval) { - return $this->avoidMutation()->add($date); - } - - if ($date instanceof DatePeriod || $date instanceof CarbonPeriod) { - $date = $date->getStartDate(); - } - - return $this->resolveCarbon($date); - } - - /////////////////////////////////////////////////////////////////// - ///////////////////////// GETTERS AND SETTERS ///////////////////// - /////////////////////////////////////////////////////////////////// - - /** - * Get a part of the Carbon object - * - * @param string $name - * - * @throws UnknownGetterException - * - * @return string|int|bool|DateTimeZone|null - */ - public function __get($name) - { - return $this->get($name); - } - - /** - * Get a part of the Carbon object - * - * @param string $name - * - * @throws UnknownGetterException - * - * @return string|int|bool|DateTimeZone|null - */ - public function get($name) - { - static $formats = [ - // @property int - 'year' => 'Y', - // @property int - 'yearIso' => 'o', - // @property int - // @call isSameUnit - 'month' => 'n', - // @property int - 'day' => 'j', - // @property int - 'hour' => 'G', - // @property int - 'minute' => 'i', - // @property int - 'second' => 's', - // @property int - 'micro' => 'u', - // @property int - 'microsecond' => 'u', - // @property-read int 0 (for Sunday) through 6 (for Saturday) - 'dayOfWeek' => 'w', - // @property-read int 1 (for Monday) through 7 (for Sunday) - 'dayOfWeekIso' => 'N', - // @property-read int ISO-8601 week number of year, weeks starting on Monday - 'weekOfYear' => 'W', - // @property-read int number of days in the given month - 'daysInMonth' => 't', - // @property int|float|string seconds since the Unix Epoch - 'timestamp' => 'U', - // @property-read string "am"/"pm" (Ante meridiem or Post meridiem latin lowercase mark) - 'latinMeridiem' => 'a', - // @property-read string "AM"/"PM" (Ante meridiem or Post meridiem latin uppercase mark) - 'latinUpperMeridiem' => 'A', - // @property string the day of week in English - 'englishDayOfWeek' => 'l', - // @property string the abbreviated day of week in English - 'shortEnglishDayOfWeek' => 'D', - // @property string the month in English - 'englishMonth' => 'F', - // @property string the abbreviated month in English - 'shortEnglishMonth' => 'M', - // @property string the day of week in current locale LC_TIME - // @deprecated - // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. - // replacement: Use ->isoFormat('MMM') instead. - // since: 2.55.0 - 'localeDayOfWeek' => '%A', - // @property string the abbreviated day of week in current locale LC_TIME - // @deprecated - // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. - // replacement: Use ->isoFormat('dddd') instead. - // since: 2.55.0 - 'shortLocaleDayOfWeek' => '%a', - // @property string the month in current locale LC_TIME - // @deprecated - // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. - // replacement: Use ->isoFormat('ddd') instead. - // since: 2.55.0 - 'localeMonth' => '%B', - // @property string the abbreviated month in current locale LC_TIME - // @deprecated - // reason: It uses OS language package and strftime() which is deprecated since PHP 8.1. - // replacement: Use ->isoFormat('MMMM') instead. - // since: 2.55.0 - 'shortLocaleMonth' => '%b', - // @property-read string $timezoneAbbreviatedName the current timezone abbreviated name - 'timezoneAbbreviatedName' => 'T', - // @property-read string $tzAbbrName alias of $timezoneAbbreviatedName - 'tzAbbrName' => 'T', - ]; - - switch (true) { - case isset($formats[$name]): - $format = $formats[$name]; - $method = str_starts_with($format, '%') ? 'formatLocalized' : 'rawFormat'; - $value = $this->$method($format); - - return is_numeric($value) ? (int) $value : $value; - - // @property-read string long name of weekday translated according to Carbon locale, in english if no translation available for current language - case $name === 'dayName': - return $this->getTranslatedDayName(); - // @property-read string short name of weekday translated according to Carbon locale, in english if no translation available for current language - case $name === 'shortDayName': - return $this->getTranslatedShortDayName(); - // @property-read string very short name of weekday translated according to Carbon locale, in english if no translation available for current language - case $name === 'minDayName': - return $this->getTranslatedMinDayName(); - // @property-read string long name of month translated according to Carbon locale, in english if no translation available for current language - case $name === 'monthName': - return $this->getTranslatedMonthName(); - // @property-read string short name of month translated according to Carbon locale, in english if no translation available for current language - case $name === 'shortMonthName': - return $this->getTranslatedShortMonthName(); - // @property-read string lowercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - case $name === 'meridiem': - return $this->meridiem(true); - // @property-read string uppercase meridiem mark translated according to Carbon locale, in latin if no translation available for current language - case $name === 'upperMeridiem': - return $this->meridiem(); - // @property-read int current hour from 1 to 24 - case $name === 'noZeroHour': - return $this->hour ?: 24; - // @property int - case $name === 'milliseconds': - // @property int - case $name === 'millisecond': - // @property int - case $name === 'milli': - return (int) floor(((int) $this->rawFormat('u')) / 1000); - - // @property int 1 through 53 - case $name === 'week': - return (int) $this->week(); - - // @property int 1 through 53 - case $name === 'isoWeek': - return (int) $this->isoWeek(); - - // @property int year according to week format - case $name === 'weekYear': - return (int) $this->weekYear(); - - // @property int year according to ISO week format - case $name === 'isoWeekYear': - return (int) $this->isoWeekYear(); - - // @property-read int 51 through 53 - case $name === 'weeksInYear': - return $this->weeksInYear(); - - // @property-read int 51 through 53 - case $name === 'isoWeeksInYear': - return $this->isoWeeksInYear(); - - // @property-read int 1 through 5 - case $name === 'weekOfMonth': - return (int) ceil($this->day / static::DAYS_PER_WEEK); - - // @property-read int 1 through 5 - case $name === 'weekNumberInMonth': - return (int) ceil(($this->day + $this->avoidMutation()->startOfMonth()->dayOfWeekIso - 1) / static::DAYS_PER_WEEK); - - // @property-read int 0 through 6 - case $name === 'firstWeekDay': - return $this->localTranslator ? ($this->getTranslationMessage('first_day_of_week') ?? 0) : static::getWeekStartsAt(); - - // @property-read int 0 through 6 - case $name === 'lastWeekDay': - return $this->localTranslator ? (($this->getTranslationMessage('first_day_of_week') ?? 0) + static::DAYS_PER_WEEK - 1) % static::DAYS_PER_WEEK : static::getWeekEndsAt(); - - // @property int 1 through 366 - case $name === 'dayOfYear': - return 1 + (int) ($this->rawFormat('z')); - - // @property-read int 365 or 366 - case $name === 'daysInYear': - return $this->isLeapYear() ? 366 : 365; - - // @property int does a diffInYears() with default parameters - case $name === 'age': - return $this->diffInYears(); - - // @property-read int the quarter of this instance, 1 - 4 - // @call isSameUnit - case $name === 'quarter': - return (int) ceil($this->month / static::MONTHS_PER_QUARTER); - - // @property-read int the decade of this instance - // @call isSameUnit - case $name === 'decade': - return (int) ceil($this->year / static::YEARS_PER_DECADE); - - // @property-read int the century of this instance - // @call isSameUnit - case $name === 'century': - $factor = 1; - $year = $this->year; - if ($year < 0) { - $year = -$year; - $factor = -1; - } - - return (int) ($factor * ceil($year / static::YEARS_PER_CENTURY)); - - // @property-read int the millennium of this instance - // @call isSameUnit - case $name === 'millennium': - $factor = 1; - $year = $this->year; - if ($year < 0) { - $year = -$year; - $factor = -1; - } - - return (int) ($factor * ceil($year / static::YEARS_PER_MILLENNIUM)); - - // @property int the timezone offset in seconds from UTC - case $name === 'offset': - return $this->getOffset(); - - // @property int the timezone offset in minutes from UTC - case $name === 'offsetMinutes': - return $this->getOffset() / static::SECONDS_PER_MINUTE; - - // @property int the timezone offset in hours from UTC - case $name === 'offsetHours': - return $this->getOffset() / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR; - - // @property-read bool daylight savings time indicator, true if DST, false otherwise - case $name === 'dst': - return $this->rawFormat('I') === '1'; - - // @property-read bool checks if the timezone is local, true if local, false otherwise - case $name === 'local': - return $this->getOffset() === $this->avoidMutation()->setTimezone(date_default_timezone_get())->getOffset(); - - // @property-read bool checks if the timezone is UTC, true if UTC, false otherwise - case $name === 'utc': - return $this->getOffset() === 0; - - // @property CarbonTimeZone $timezone the current timezone - // @property CarbonTimeZone $tz alias of $timezone - case $name === 'timezone' || $name === 'tz': - return CarbonTimeZone::instance($this->getTimezone()); - - // @property-read string $timezoneName the current timezone name - // @property-read string $tzName alias of $timezoneName - case $name === 'timezoneName' || $name === 'tzName': - return $this->getTimezone()->getName(); - - // @property-read string locale of the current instance - case $name === 'locale': - return $this->getTranslatorLocale(); - - default: - $macro = $this->getLocalMacro('get'.ucfirst($name)); - - if ($macro) { - return $this->executeCallableWithContext($macro); - } - - throw new UnknownGetterException($name); - } - } - - /** - * Check if an attribute exists on the object - * - * @param string $name - * - * @return bool - */ - public function __isset($name) - { - try { - $this->__get($name); - } catch (UnknownGetterException | ReflectionException $e) { - return false; - } - - return true; - } - - /** - * Set a part of the Carbon object - * - * @param string $name - * @param string|int|DateTimeZone $value - * - * @throws UnknownSetterException|ReflectionException - * - * @return void - */ - public function __set($name, $value) - { - if ($this->constructedObjectId === spl_object_hash($this)) { - $this->set($name, $value); - - return; - } - - $this->$name = $value; - } - - /** - * Set a part of the Carbon object - * - * @param string|array $name - * @param string|int|DateTimeZone $value - * - * @throws ImmutableException|UnknownSetterException - * - * @return $this - */ - public function set($name, $value = null) - { - if ($this->isImmutable()) { - throw new ImmutableException(sprintf('%s class', static::class)); - } - - if (\is_array($name)) { - foreach ($name as $key => $value) { - $this->set($key, $value); - } - - return $this; - } - - switch ($name) { - case 'milliseconds': - case 'millisecond': - case 'milli': - case 'microseconds': - case 'microsecond': - case 'micro': - if (str_starts_with($name, 'milli')) { - $value *= 1000; - } - - while ($value < 0) { - $this->subSecond(); - $value += static::MICROSECONDS_PER_SECOND; - } - - while ($value >= static::MICROSECONDS_PER_SECOND) { - $this->addSecond(); - $value -= static::MICROSECONDS_PER_SECOND; - } - - $this->modify($this->rawFormat('H:i:s.').str_pad((string) round($value), 6, '0', STR_PAD_LEFT)); - - break; - - case 'year': - case 'month': - case 'day': - case 'hour': - case 'minute': - case 'second': - [$year, $month, $day, $hour, $minute, $second] = array_map('intval', explode('-', $this->rawFormat('Y-n-j-G-i-s'))); - $$name = $value; - $this->setDateTime($year, $month, $day, $hour, $minute, $second); - - break; - - case 'week': - $this->week($value); - - break; - - case 'isoWeek': - $this->isoWeek($value); - - break; - - case 'weekYear': - $this->weekYear($value); - - break; - - case 'isoWeekYear': - $this->isoWeekYear($value); - - break; - - case 'dayOfYear': - $this->addDays($value - $this->dayOfYear); - - break; - - case 'timestamp': - $this->setTimestamp($value); - - break; - - case 'offset': - $this->setTimezone(static::safeCreateDateTimeZone($value / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR)); - - break; - - case 'offsetMinutes': - $this->setTimezone(static::safeCreateDateTimeZone($value / static::MINUTES_PER_HOUR)); - - break; - - case 'offsetHours': - $this->setTimezone(static::safeCreateDateTimeZone($value)); - - break; - - case 'timezone': - case 'tz': - $this->setTimezone($value); - - break; - - default: - $macro = $this->getLocalMacro('set'.ucfirst($name)); - - if ($macro) { - $this->executeCallableWithContext($macro, $value); - - break; - } - - if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { - throw new UnknownSetterException($name); - } - - $this->$name = $value; - } - - return $this; - } - - protected function getTranslatedFormByRegExp($baseKey, $keySuffix, $context, $subKey, $defaultValue) - { - $key = $baseKey.$keySuffix; - $standaloneKey = "{$key}_standalone"; - $baseTranslation = $this->getTranslationMessage($key); - - if ($baseTranslation instanceof Closure) { - return $baseTranslation($this, $context, $subKey) ?: $defaultValue; - } - - if ( - $this->getTranslationMessage("$standaloneKey.$subKey") && - (!$context || (($regExp = $this->getTranslationMessage("{$baseKey}_regexp")) && !preg_match($regExp, $context))) - ) { - $key = $standaloneKey; - } - - return $this->getTranslationMessage("$key.$subKey", null, $defaultValue); - } - - /** - * Get the translation of the current week day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * @param string $keySuffix "", "_short" or "_min" - * @param string|null $defaultValue default value if translation missing - * - * @return string - */ - public function getTranslatedDayName($context = null, $keySuffix = '', $defaultValue = null) - { - return $this->getTranslatedFormByRegExp('weekdays', $keySuffix, $context, $this->dayOfWeek, $defaultValue ?: $this->englishDayOfWeek); - } - - /** - * Get the translation of the current short week day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * - * @return string - */ - public function getTranslatedShortDayName($context = null) - { - return $this->getTranslatedDayName($context, '_short', $this->shortEnglishDayOfWeek); - } - - /** - * Get the translation of the current abbreviated week day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * - * @return string - */ - public function getTranslatedMinDayName($context = null) - { - return $this->getTranslatedDayName($context, '_min', $this->shortEnglishDayOfWeek); - } - - /** - * Get the translation of the current month day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * @param string $keySuffix "" or "_short" - * @param string|null $defaultValue default value if translation missing - * - * @return string - */ - public function getTranslatedMonthName($context = null, $keySuffix = '', $defaultValue = null) - { - return $this->getTranslatedFormByRegExp('months', $keySuffix, $context, $this->month - 1, $defaultValue ?: $this->englishMonth); - } - - /** - * Get the translation of the current short month day name (with context for languages with multiple forms). - * - * @param string|null $context whole format string - * - * @return string - */ - public function getTranslatedShortMonthName($context = null) - { - return $this->getTranslatedMonthName($context, '_short', $this->shortEnglishMonth); - } - - /** - * Get/set the day of year. - * - * @param int|null $value new value for day of year if using as setter. - * - * @return static|int - */ - public function dayOfYear($value = null) - { - $dayOfYear = $this->dayOfYear; - - return $value === null ? $dayOfYear : $this->addDays($value - $dayOfYear); - } - - /** - * Get/set the weekday from 0 (Sunday) to 6 (Saturday). - * - * @param int|null $value new value for weekday if using as setter. - * - * @return static|int - */ - public function weekday($value = null) - { - if ($value === null) { - return $this->dayOfWeek; - } - - $firstDay = (int) ($this->getTranslationMessage('first_day_of_week') ?? 0); - $dayOfWeek = ($this->dayOfWeek + 7 - $firstDay) % 7; - - return $this->addDays((($value + 7 - $firstDay) % 7) - $dayOfWeek); - } - - /** - * Get/set the ISO weekday from 1 (Monday) to 7 (Sunday). - * - * @param int|null $value new value for weekday if using as setter. - * - * @return static|int - */ - public function isoWeekday($value = null) - { - $dayOfWeekIso = $this->dayOfWeekIso; - - return $value === null ? $dayOfWeekIso : $this->addDays($value - $dayOfWeekIso); - } - - /** - * Return the number of days since the start of the week (using the current locale or the first parameter - * if explicitly given). - * - * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, - * if not provided, start of week is inferred from the locale - * (Sunday for en_US, Monday for de_DE, etc.) - * - * @return int - */ - public function getDaysFromStartOfWeek(int $weekStartsAt = null): int - { - $firstDay = (int) ($weekStartsAt ?? $this->getTranslationMessage('first_day_of_week') ?? 0); - - return ($this->dayOfWeek + 7 - $firstDay) % 7; - } - - /** - * Set the day (keeping the current time) to the start of the week + the number of days passed as the first - * parameter. First day of week is driven by the locale unless explicitly set with the second parameter. - * - * @param int $numberOfDays number of days to add after the start of the current week - * @param int|null $weekStartsAt optional start allow you to specify the day of week to use to start the week, - * if not provided, start of week is inferred from the locale - * (Sunday for en_US, Monday for de_DE, etc.) - * - * @return static - */ - public function setDaysFromStartOfWeek(int $numberOfDays, int $weekStartsAt = null) - { - return $this->addDays($numberOfDays - $this->getDaysFromStartOfWeek($weekStartsAt)); - } - - /** - * Set any unit to a new value without overflowing current other unit given. - * - * @param string $valueUnit unit name to modify - * @param int $value new value for the input unit - * @param string $overflowUnit unit name to not overflow - * - * @return static - */ - public function setUnitNoOverflow($valueUnit, $value, $overflowUnit) - { - try { - $original = $this->avoidMutation(); - /** @var static $date */ - $date = $this->$valueUnit($value); - $end = $original->avoidMutation()->endOf($overflowUnit); - $start = $original->avoidMutation()->startOf($overflowUnit); - if ($date < $start) { - $date = $date->setDateTimeFrom($start); - } elseif ($date > $end) { - $date = $date->setDateTimeFrom($end); - } - - return $date; - } catch (BadMethodCallException | ReflectionException $exception) { - throw new UnknownUnitException($valueUnit, 0, $exception); - } - } - - /** - * Add any unit to a new value without overflowing current other unit given. - * - * @param string $valueUnit unit name to modify - * @param int $value amount to add to the input unit - * @param string $overflowUnit unit name to not overflow - * - * @return static - */ - public function addUnitNoOverflow($valueUnit, $value, $overflowUnit) - { - return $this->setUnitNoOverflow($valueUnit, $this->$valueUnit + $value, $overflowUnit); - } - - /** - * Subtract any unit to a new value without overflowing current other unit given. - * - * @param string $valueUnit unit name to modify - * @param int $value amount to subtract to the input unit - * @param string $overflowUnit unit name to not overflow - * - * @return static - */ - public function subUnitNoOverflow($valueUnit, $value, $overflowUnit) - { - return $this->setUnitNoOverflow($valueUnit, $this->$valueUnit - $value, $overflowUnit); - } - - /** - * Returns the minutes offset to UTC if no arguments passed, else set the timezone with given minutes shift passed. - * - * @param int|null $minuteOffset - * - * @return int|static - */ - public function utcOffset(int $minuteOffset = null) - { - if (\func_num_args() < 1) { - return $this->offsetMinutes; - } - - return $this->setTimezone(CarbonTimeZone::createFromMinuteOffset($minuteOffset)); - } - - /** - * Set the date with gregorian year, month and day numbers. - * - * @see https://php.net/manual/en/datetime.setdate.php - * - * @param int $year - * @param int $month - * @param int $day - * - * @return static - */ - #[ReturnTypeWillChange] - public function setDate($year, $month, $day) - { - return parent::setDate((int) $year, (int) $month, (int) $day); - } - - /** - * Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates. - * - * @see https://php.net/manual/en/datetime.setisodate.php - * - * @param int $year - * @param int $week - * @param int $day - * - * @return static - */ - #[ReturnTypeWillChange] - public function setISODate($year, $week, $day = 1) - { - return parent::setISODate((int) $year, (int) $week, (int) $day); - } - - /** - * Set the date and time all together. - * - * @param int $year - * @param int $month - * @param int $day - * @param int $hour - * @param int $minute - * @param int $second - * @param int $microseconds - * - * @return static - */ - public function setDateTime($year, $month, $day, $hour, $minute, $second = 0, $microseconds = 0) - { - return $this->setDate($year, $month, $day)->setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds); - } - - /** - * Resets the current time of the DateTime object to a different time. - * - * @see https://php.net/manual/en/datetime.settime.php - * - * @param int $hour - * @param int $minute - * @param int $second - * @param int $microseconds - * - * @return static - */ - #[ReturnTypeWillChange] - public function setTime($hour, $minute, $second = 0, $microseconds = 0) - { - return parent::setTime((int) $hour, (int) $minute, (int) $second, (int) $microseconds); - } - - /** - * Set the instance's timestamp. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $unixTimestamp - * - * @return static - */ - #[ReturnTypeWillChange] - public function setTimestamp($unixTimestamp) - { - [$timestamp, $microseconds] = self::getIntegerAndDecimalParts($unixTimestamp); - - return parent::setTimestamp((int) $timestamp)->setMicroseconds((int) $microseconds); - } - - /** - * Set the time by time string. - * - * @param string $time - * - * @return static - */ - public function setTimeFromTimeString($time) - { - if (!str_contains($time, ':')) { - $time .= ':0'; - } - - return $this->modify($time); - } - - /** - * @alias setTimezone - * - * @param DateTimeZone|string $value - * - * @return static - */ - public function timezone($value) - { - return $this->setTimezone($value); - } - - /** - * Set the timezone or returns the timezone name if no arguments passed. - * - * @param DateTimeZone|string $value - * - * @return static|string - */ - public function tz($value = null) - { - if (\func_num_args() < 1) { - return $this->tzName; - } - - return $this->setTimezone($value); - } - - /** - * Set the instance's timezone from a string or object. - * - * @param DateTimeZone|string $value - * - * @return static - */ - #[ReturnTypeWillChange] - public function setTimezone($value) - { - $tz = static::safeCreateDateTimeZone($value); - - if ($tz === false && !self::isStrictModeEnabled()) { - $tz = new CarbonTimeZone(); - } - - return parent::setTimezone($tz); - } - - /** - * Set the instance's timezone from a string or object and add/subtract the offset difference. - * - * @param DateTimeZone|string $value - * - * @return static - */ - public function shiftTimezone($value) - { - $dateTimeString = $this->format('Y-m-d H:i:s.u'); - - return $this - ->setTimezone($value) - ->modify($dateTimeString); - } - - /** - * Set the instance's timezone to UTC. - * - * @return static - */ - public function utc() - { - return $this->setTimezone('UTC'); - } - - /** - * Set the year, month, and date for this instance to that of the passed instance. - * - * @param Carbon|DateTimeInterface $date now if null - * - * @return static - */ - public function setDateFrom($date = null) - { - $date = $this->resolveCarbon($date); - - return $this->setDate($date->year, $date->month, $date->day); - } - - /** - * Set the hour, minute, second and microseconds for this instance to that of the passed instance. - * - * @param Carbon|DateTimeInterface $date now if null - * - * @return static - */ - public function setTimeFrom($date = null) - { - $date = $this->resolveCarbon($date); - - return $this->setTime($date->hour, $date->minute, $date->second, $date->microsecond); - } - - /** - * Set the date and time for this instance to that of the passed instance. - * - * @param Carbon|DateTimeInterface $date - * - * @return static - */ - public function setDateTimeFrom($date = null) - { - $date = $this->resolveCarbon($date); - - return $this->modify($date->rawFormat('Y-m-d H:i:s.u')); - } - - /** - * Get the days of the week - * - * @return array - */ - public static function getDays() - { - return static::$days; - } - - /////////////////////////////////////////////////////////////////// - /////////////////////// WEEK SPECIAL DAYS ///////////////////////// - /////////////////////////////////////////////////////////////////// - - private static function getFirstDayOfWeek(): int - { - return (int) static::getTranslationMessageWith( - static::getTranslator(), - 'first_day_of_week' - ); - } - - /** - * Get the first day of week - * - * @return int - */ - public static function getWeekStartsAt() - { - if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { - return self::getFirstDayOfWeek(); - } - - return static::$weekStartsAt; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekEndsAt optional parameter instead when using endOfWeek method. You can also use the - * 'first_day_of_week' locale setting to change the start of week according to current locale - * selected and implicitly the end of week. - * - * Set the first day of week - * - * @param int|string $day week start day (or 'auto' to get the first day of week from Carbon::getLocale() culture). - * - * @return void - */ - public static function setWeekStartsAt($day) - { - static::$weekStartsAt = $day === static::WEEK_DAY_AUTO ? $day : max(0, (7 + $day) % 7); - } - - /** - * Get the last day of week - * - * @return int - */ - public static function getWeekEndsAt() - { - if (static::$weekStartsAt === static::WEEK_DAY_AUTO) { - return (int) (static::DAYS_PER_WEEK - 1 + self::getFirstDayOfWeek()) % static::DAYS_PER_WEEK; - } - - return static::$weekEndsAt; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * Use $weekStartsAt optional parameter instead when using startOfWeek, floorWeek, ceilWeek - * or roundWeek method. You can also use the 'first_day_of_week' locale setting to change the - * start of week according to current locale selected and implicitly the end of week. - * - * Set the last day of week - * - * @param int|string $day week end day (or 'auto' to get the day before the first day of week - * from Carbon::getLocale() culture). - * - * @return void - */ - public static function setWeekEndsAt($day) - { - static::$weekEndsAt = $day === static::WEEK_DAY_AUTO ? $day : max(0, (7 + $day) % 7); - } - - /** - * Get weekend days - * - * @return array - */ - public static function getWeekendDays() - { - return static::$weekendDays; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider week-end is always saturday and sunday, and if you have some custom - * week-end days to handle, give to those days an other name and create a macro for them: - * - * ``` - * Carbon::macro('isDayOff', function ($date) { - * return $date->isSunday() || $date->isMonday(); - * }); - * Carbon::macro('isNotDayOff', function ($date) { - * return !$date->isDayOff(); - * }); - * if ($someDate->isDayOff()) ... - * if ($someDate->isNotDayOff()) ... - * // Add 5 not-off days - * $count = 5; - * while ($someDate->isDayOff() || ($count-- > 0)) { - * $someDate->addDay(); - * } - * ``` - * - * Set weekend days - * - * @param array $days - * - * @return void - */ - public static function setWeekendDays($days) - { - static::$weekendDays = $days; - } - - /** - * Determine if a time string will produce a relative date. - * - * @param string $time - * - * @return bool true if time match a relative date, false if absolute or invalid time string - */ - public static function hasRelativeKeywords($time) - { - if (!$time || strtotime($time) === false) { - return false; - } - - $date1 = new DateTime('2000-01-01T00:00:00Z'); - $date1->modify($time); - $date2 = new DateTime('2001-12-25T00:00:00Z'); - $date2->modify($time); - - return $date1 != $date2; - } - - /////////////////////////////////////////////////////////////////// - /////////////////////// STRING FORMATTING ///////////////////////// - /////////////////////////////////////////////////////////////////// - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use UTF-8 language packages on every machine. - * - * Set if UTF8 will be used for localized date/time. - * - * @param bool $utf8 - */ - public static function setUtf8($utf8) - { - static::$utf8 = $utf8; - } - - /** - * Format the instance with the current locale. You can set the current - * locale using setlocale() https://php.net/setlocale. - * - * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. - * Use ->isoFormat() instead. - * Deprecated since 2.55.0 - * - * @param string $format - * - * @return string - */ - public function formatLocalized($format) - { - // Check for Windows to find and replace the %e modifier correctly. - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - $format = preg_replace('#(?toDateTimeString()); - $formatted = ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) - ? strftime($format, $time) - : @strftime($format, $time); - - return static::$utf8 - ? ( - \function_exists('mb_convert_encoding') - ? mb_convert_encoding($formatted, 'UTF-8', mb_list_encodings()) - : utf8_encode($formatted) - ) - : $formatted; - } - - /** - * Returns list of locale formats for ISO formatting. - * - * @param string|null $locale current locale used if null - * - * @return array - */ - public function getIsoFormats($locale = null) - { - return [ - 'LT' => $this->getTranslationMessage('formats.LT', $locale, 'h:mm A'), - 'LTS' => $this->getTranslationMessage('formats.LTS', $locale, 'h:mm:ss A'), - 'L' => $this->getTranslationMessage('formats.L', $locale, 'MM/DD/YYYY'), - 'LL' => $this->getTranslationMessage('formats.LL', $locale, 'MMMM D, YYYY'), - 'LLL' => $this->getTranslationMessage('formats.LLL', $locale, 'MMMM D, YYYY h:mm A'), - 'LLLL' => $this->getTranslationMessage('formats.LLLL', $locale, 'dddd, MMMM D, YYYY h:mm A'), - 'l' => $this->getTranslationMessage('formats.l', $locale), - 'll' => $this->getTranslationMessage('formats.ll', $locale), - 'lll' => $this->getTranslationMessage('formats.lll', $locale), - 'llll' => $this->getTranslationMessage('formats.llll', $locale), - ]; - } - - /** - * Returns list of calendar formats for ISO formatting. - * - * @param string|null $locale current locale used if null - * - * @return array - */ - public function getCalendarFormats($locale = null) - { - return [ - 'sameDay' => $this->getTranslationMessage('calendar.sameDay', $locale, '[Today at] LT'), - 'nextDay' => $this->getTranslationMessage('calendar.nextDay', $locale, '[Tomorrow at] LT'), - 'nextWeek' => $this->getTranslationMessage('calendar.nextWeek', $locale, 'dddd [at] LT'), - 'lastDay' => $this->getTranslationMessage('calendar.lastDay', $locale, '[Yesterday at] LT'), - 'lastWeek' => $this->getTranslationMessage('calendar.lastWeek', $locale, '[Last] dddd [at] LT'), - 'sameElse' => $this->getTranslationMessage('calendar.sameElse', $locale, 'L'), - ]; - } - - /** - * Returns list of locale units for ISO formatting. - * - * @return array - */ - public static function getIsoUnits() - { - static $units = null; - - if ($units === null) { - $units = [ - 'OD' => ['getAltNumber', ['day']], - 'OM' => ['getAltNumber', ['month']], - 'OY' => ['getAltNumber', ['year']], - 'OH' => ['getAltNumber', ['hour']], - 'Oh' => ['getAltNumber', ['h']], - 'Om' => ['getAltNumber', ['minute']], - 'Os' => ['getAltNumber', ['second']], - 'D' => 'day', - 'DD' => ['rawFormat', ['d']], - 'Do' => ['ordinal', ['day', 'D']], - 'd' => 'dayOfWeek', - 'dd' => function (CarbonInterface $date, $originalFormat = null) { - return $date->getTranslatedMinDayName($originalFormat); - }, - 'ddd' => function (CarbonInterface $date, $originalFormat = null) { - return $date->getTranslatedShortDayName($originalFormat); - }, - 'dddd' => function (CarbonInterface $date, $originalFormat = null) { - return $date->getTranslatedDayName($originalFormat); - }, - 'DDD' => 'dayOfYear', - 'DDDD' => ['getPaddedUnit', ['dayOfYear', 3]], - 'DDDo' => ['ordinal', ['dayOfYear', 'DDD']], - 'e' => ['weekday', []], - 'E' => 'dayOfWeekIso', - 'H' => ['rawFormat', ['G']], - 'HH' => ['rawFormat', ['H']], - 'h' => ['rawFormat', ['g']], - 'hh' => ['rawFormat', ['h']], - 'k' => 'noZeroHour', - 'kk' => ['getPaddedUnit', ['noZeroHour']], - 'hmm' => ['rawFormat', ['gi']], - 'hmmss' => ['rawFormat', ['gis']], - 'Hmm' => ['rawFormat', ['Gi']], - 'Hmmss' => ['rawFormat', ['Gis']], - 'm' => 'minute', - 'mm' => ['rawFormat', ['i']], - 'a' => 'meridiem', - 'A' => 'upperMeridiem', - 's' => 'second', - 'ss' => ['getPaddedUnit', ['second']], - 'S' => function (CarbonInterface $date) { - return (string) floor($date->micro / 100000); - }, - 'SS' => function (CarbonInterface $date) { - return str_pad((string) floor($date->micro / 10000), 2, '0', STR_PAD_LEFT); - }, - 'SSS' => function (CarbonInterface $date) { - return str_pad((string) floor($date->micro / 1000), 3, '0', STR_PAD_LEFT); - }, - 'SSSS' => function (CarbonInterface $date) { - return str_pad((string) floor($date->micro / 100), 4, '0', STR_PAD_LEFT); - }, - 'SSSSS' => function (CarbonInterface $date) { - return str_pad((string) floor($date->micro / 10), 5, '0', STR_PAD_LEFT); - }, - 'SSSSSS' => ['getPaddedUnit', ['micro', 6]], - 'SSSSSSS' => function (CarbonInterface $date) { - return str_pad((string) floor($date->micro * 10), 7, '0', STR_PAD_LEFT); - }, - 'SSSSSSSS' => function (CarbonInterface $date) { - return str_pad((string) floor($date->micro * 100), 8, '0', STR_PAD_LEFT); - }, - 'SSSSSSSSS' => function (CarbonInterface $date) { - return str_pad((string) floor($date->micro * 1000), 9, '0', STR_PAD_LEFT); - }, - 'M' => 'month', - 'MM' => ['rawFormat', ['m']], - 'MMM' => function (CarbonInterface $date, $originalFormat = null) { - $month = $date->getTranslatedShortMonthName($originalFormat); - $suffix = $date->getTranslationMessage('mmm_suffix'); - if ($suffix && $month !== $date->monthName) { - $month .= $suffix; - } - - return $month; - }, - 'MMMM' => function (CarbonInterface $date, $originalFormat = null) { - return $date->getTranslatedMonthName($originalFormat); - }, - 'Mo' => ['ordinal', ['month', 'M']], - 'Q' => 'quarter', - 'Qo' => ['ordinal', ['quarter', 'M']], - 'G' => 'isoWeekYear', - 'GG' => ['getPaddedUnit', ['isoWeekYear']], - 'GGG' => ['getPaddedUnit', ['isoWeekYear', 3]], - 'GGGG' => ['getPaddedUnit', ['isoWeekYear', 4]], - 'GGGGG' => ['getPaddedUnit', ['isoWeekYear', 5]], - 'g' => 'weekYear', - 'gg' => ['getPaddedUnit', ['weekYear']], - 'ggg' => ['getPaddedUnit', ['weekYear', 3]], - 'gggg' => ['getPaddedUnit', ['weekYear', 4]], - 'ggggg' => ['getPaddedUnit', ['weekYear', 5]], - 'W' => 'isoWeek', - 'WW' => ['getPaddedUnit', ['isoWeek']], - 'Wo' => ['ordinal', ['isoWeek', 'W']], - 'w' => 'week', - 'ww' => ['getPaddedUnit', ['week']], - 'wo' => ['ordinal', ['week', 'w']], - 'x' => ['valueOf', []], - 'X' => 'timestamp', - 'Y' => 'year', - 'YY' => ['rawFormat', ['y']], - 'YYYY' => ['getPaddedUnit', ['year', 4]], - 'YYYYY' => ['getPaddedUnit', ['year', 5]], - 'YYYYYY' => function (CarbonInterface $date) { - return ($date->year < 0 ? '' : '+').$date->getPaddedUnit('year', 6); - }, - 'z' => ['rawFormat', ['T']], - 'zz' => 'tzName', - 'Z' => ['getOffsetString', []], - 'ZZ' => ['getOffsetString', ['']], - ]; - } - - return $units; - } - - /** - * Returns a unit of the instance padded with 0 by default or any other string if specified. - * - * @param string $unit Carbon unit name - * @param int $length Length of the output (2 by default) - * @param string $padString String to use for padding ("0" by default) - * @param int $padType Side(s) to pad (STR_PAD_LEFT by default) - * - * @return string - */ - public function getPaddedUnit($unit, $length = 2, $padString = '0', $padType = STR_PAD_LEFT) - { - return ($this->$unit < 0 ? '-' : '').str_pad((string) abs($this->$unit), $length, $padString, $padType); - } - - /** - * Return a property with its ordinal. - * - * @param string $key - * @param string|null $period - * - * @return string - */ - public function ordinal(string $key, ?string $period = null): string - { - $number = $this->$key; - $result = $this->translate('ordinal', [ - ':number' => $number, - ':period' => (string) $period, - ]); - - return (string) ($result === 'ordinal' ? $number : $result); - } - - /** - * Return the meridiem of the current time in the current locale. - * - * @param bool $isLower if true, returns lowercase variant if available in the current locale. - * - * @return string - */ - public function meridiem(bool $isLower = false): string - { - $hour = $this->hour; - $index = $hour < 12 ? 0 : 1; - - if ($isLower) { - $key = 'meridiem.'.($index + 2); - $result = $this->translate($key); - - if ($result !== $key) { - return $result; - } - } - - $key = "meridiem.$index"; - $result = $this->translate($key); - if ($result === $key) { - $result = $this->translate('meridiem', [ - ':hour' => $this->hour, - ':minute' => $this->minute, - ':isLower' => $isLower, - ]); - - if ($result === 'meridiem') { - return $isLower ? $this->latinMeridiem : $this->latinUpperMeridiem; - } - } elseif ($isLower) { - $result = mb_strtolower($result); - } - - return $result; - } - - /** - * Returns the alternative number for a given date property if available in the current locale. - * - * @param string $key date property - * - * @return string - */ - public function getAltNumber(string $key): string - { - return $this->translateNumber(\strlen($key) > 1 ? $this->$key : $this->rawFormat('h')); - } - - /** - * Format in the current language using ISO replacement patterns. - * - * @param string $format - * @param string|null $originalFormat provide context if a chunk has been passed alone - * - * @return string - */ - public function isoFormat(string $format, ?string $originalFormat = null): string - { - $result = ''; - $length = mb_strlen($format); - $originalFormat = $originalFormat ?: $format; - $inEscaped = false; - $formats = null; - $units = null; - - for ($i = 0; $i < $length; $i++) { - $char = mb_substr($format, $i, 1); - - if ($char === '\\') { - $result .= mb_substr($format, ++$i, 1); - - continue; - } - - if ($char === '[' && !$inEscaped) { - $inEscaped = true; - - continue; - } - - if ($char === ']' && $inEscaped) { - $inEscaped = false; - - continue; - } - - if ($inEscaped) { - $result .= $char; - - continue; - } - - $input = mb_substr($format, $i); - - if (preg_match('/^(LTS|LT|l{1,4}|L{1,4})/', $input, $match)) { - if ($formats === null) { - $formats = $this->getIsoFormats(); - } - - $code = $match[0]; - $sequence = $formats[$code] ?? preg_replace_callback( - '/MMMM|MM|DD|dddd/', - function ($code) { - return mb_substr($code[0], 1); - }, - $formats[strtoupper($code)] ?? '' - ); - $rest = mb_substr($format, $i + mb_strlen($code)); - $format = mb_substr($format, 0, $i).$sequence.$rest; - $length = mb_strlen($format); - $input = $sequence.$rest; - } - - if (preg_match('/^'.CarbonInterface::ISO_FORMAT_REGEXP.'/', $input, $match)) { - $code = $match[0]; - - if ($units === null) { - $units = static::getIsoUnits(); - } - - $sequence = $units[$code] ?? ''; - - if ($sequence instanceof Closure) { - $sequence = $sequence($this, $originalFormat); - } elseif (\is_array($sequence)) { - try { - $sequence = $this->{$sequence[0]}(...$sequence[1]); - } catch (ReflectionException | InvalidArgumentException | BadMethodCallException $e) { - $sequence = ''; - } - } elseif (\is_string($sequence)) { - $sequence = $this->$sequence ?? $code; - } - - $format = mb_substr($format, 0, $i).$sequence.mb_substr($format, $i + mb_strlen($code)); - $i += mb_strlen((string) $sequence) - 1; - $length = mb_strlen($format); - $char = $sequence; - } - - $result .= $char; - } - - return $result; - } - - /** - * List of replacements from date() format to isoFormat(). - * - * @return array - */ - public static function getFormatsToIsoReplacements() - { - static $replacements = null; - - if ($replacements === null) { - $replacements = [ - 'd' => true, - 'D' => 'ddd', - 'j' => true, - 'l' => 'dddd', - 'N' => true, - 'S' => function ($date) { - $day = $date->rawFormat('j'); - - return str_replace((string) $day, '', $date->isoFormat('Do')); - }, - 'w' => true, - 'z' => true, - 'W' => true, - 'F' => 'MMMM', - 'm' => true, - 'M' => 'MMM', - 'n' => true, - 't' => true, - 'L' => true, - 'o' => true, - 'Y' => true, - 'y' => true, - 'a' => 'a', - 'A' => 'A', - 'B' => true, - 'g' => true, - 'G' => true, - 'h' => true, - 'H' => true, - 'i' => true, - 's' => true, - 'u' => true, - 'v' => true, - 'E' => true, - 'I' => true, - 'O' => true, - 'P' => true, - 'Z' => true, - 'c' => true, - 'r' => true, - 'U' => true, - 'T' => true, - ]; - } - - return $replacements; - } - - /** - * Format as ->format() do (using date replacements patterns from https://php.net/manual/en/function.date.php) - * but translate words whenever possible (months, day names, etc.) using the current locale. - * - * @param string $format - * - * @return string - */ - public function translatedFormat(string $format): string - { - $replacements = static::getFormatsToIsoReplacements(); - $context = ''; - $isoFormat = ''; - $length = mb_strlen($format); - - for ($i = 0; $i < $length; $i++) { - $char = mb_substr($format, $i, 1); - - if ($char === '\\') { - $replacement = mb_substr($format, $i, 2); - $isoFormat .= $replacement; - $i++; - - continue; - } - - if (!isset($replacements[$char])) { - $replacement = preg_match('/^[A-Za-z]$/', $char) ? "\\$char" : $char; - $isoFormat .= $replacement; - $context .= $replacement; - - continue; - } - - $replacement = $replacements[$char]; - - if ($replacement === true) { - static $contextReplacements = null; - - if ($contextReplacements === null) { - $contextReplacements = [ - 'm' => 'MM', - 'd' => 'DD', - 't' => 'D', - 'j' => 'D', - 'N' => 'e', - 'w' => 'e', - 'n' => 'M', - 'o' => 'YYYY', - 'Y' => 'YYYY', - 'y' => 'YY', - 'g' => 'h', - 'G' => 'H', - 'h' => 'hh', - 'H' => 'HH', - 'i' => 'mm', - 's' => 'ss', - ]; - } - - $isoFormat .= '['.$this->rawFormat($char).']'; - $context .= $contextReplacements[$char] ?? ' '; - - continue; - } - - if ($replacement instanceof Closure) { - $replacement = '['.$replacement($this).']'; - $isoFormat .= $replacement; - $context .= $replacement; - - continue; - } - - $isoFormat .= $replacement; - $context .= $replacement; - } - - return $this->isoFormat($isoFormat, $context); - } - - /** - * Returns the offset hour and minute formatted with +/- and a given separator (":" by default). - * For example, if the time zone is 9 hours 30 minutes, you'll get "+09:30", with "@@" as first - * argument, "+09@@30", with "" as first argument, "+0930". Negative offset will return something - * like "-12:00". - * - * @param string $separator string to place between hours and minutes (":" by default) - * - * @return string - */ - public function getOffsetString($separator = ':') - { - $second = $this->getOffset(); - $symbol = $second < 0 ? '-' : '+'; - $minute = abs($second) / static::SECONDS_PER_MINUTE; - $hour = str_pad((string) floor($minute / static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); - $minute = str_pad((string) (((int) $minute) % static::MINUTES_PER_HOUR), 2, '0', STR_PAD_LEFT); - - return "$symbol$hour$separator$minute"; - } - - protected static function executeStaticCallable($macro, ...$parameters) - { - return static::bindMacroContext(null, function () use (&$macro, &$parameters) { - if ($macro instanceof Closure) { - $boundMacro = @Closure::bind($macro, null, static::class); - - return ($boundMacro ?: $macro)(...$parameters); - } - - return $macro(...$parameters); - }); - } - - /** - * Dynamically handle calls to the class. - * - * @param string $method magic method name called - * @param array $parameters parameters list - * - * @throws BadMethodCallException - * - * @return mixed - */ - public static function __callStatic($method, $parameters) - { - if (!static::hasMacro($method)) { - foreach (static::getGenericMacros() as $callback) { - try { - return static::executeStaticCallable($callback, $method, ...$parameters); - } catch (BadMethodCallException $exception) { - continue; - } - } - if (static::isStrictModeEnabled()) { - throw new UnknownMethodException(sprintf('%s::%s', static::class, $method)); - } - - return null; - } - - return static::executeStaticCallable(static::$globalMacros[$method], ...$parameters); - } - - /** - * Set specified unit to new given value. - * - * @param string $unit year, month, day, hour, minute, second or microsecond - * @param int $value new value for given unit - * - * @return static - */ - public function setUnit($unit, $value = null) - { - $unit = static::singularUnit($unit); - $dateUnits = ['year', 'month', 'day']; - if (\in_array($unit, $dateUnits)) { - return $this->setDate(...array_map(function ($name) use ($unit, $value) { - return (int) ($name === $unit ? $value : $this->$name); - }, $dateUnits)); - } - - $units = ['hour', 'minute', 'second', 'micro']; - if ($unit === 'millisecond' || $unit === 'milli') { - $value *= 1000; - $unit = 'micro'; - } elseif ($unit === 'microsecond') { - $unit = 'micro'; - } - - return $this->setTime(...array_map(function ($name) use ($unit, $value) { - return (int) ($name === $unit ? $value : $this->$name); - }, $units)); - } - - /** - * Returns standardized singular of a given singular/plural unit name (in English). - * - * @param string $unit - * - * @return string - */ - public static function singularUnit(string $unit): string - { - $unit = rtrim(mb_strtolower($unit), 's'); - - if ($unit === 'centurie') { - return 'century'; - } - - if ($unit === 'millennia') { - return 'millennium'; - } - - return $unit; - } - - /** - * Returns standardized plural of a given singular/plural unit name (in English). - * - * @param string $unit - * - * @return string - */ - public static function pluralUnit(string $unit): string - { - $unit = rtrim(strtolower($unit), 's'); - - if ($unit === 'century') { - return 'centuries'; - } - - if ($unit === 'millennium' || $unit === 'millennia') { - return 'millennia'; - } - - return "{$unit}s"; - } - - protected function executeCallable($macro, ...$parameters) - { - if ($macro instanceof Closure) { - $boundMacro = @$macro->bindTo($this, static::class) ?: @$macro->bindTo(null, static::class); - - return ($boundMacro ?: $macro)(...$parameters); - } - - return $macro(...$parameters); - } - - protected function executeCallableWithContext($macro, ...$parameters) - { - return static::bindMacroContext($this, function () use (&$macro, &$parameters) { - return $this->executeCallable($macro, ...$parameters); - }); - } - - protected static function getGenericMacros() - { - foreach (static::$globalGenericMacros as $list) { - foreach ($list as $macro) { - yield $macro; - } - } - } - - /** - * Dynamically handle calls to the class. - * - * @param string $method magic method name called - * @param array $parameters parameters list - * - * @throws UnknownMethodException|BadMethodCallException|ReflectionException|Throwable - * - * @return mixed - */ - public function __call($method, $parameters) - { - $diffSizes = [ - // @mode diffForHumans - 'short' => true, - // @mode diffForHumans - 'long' => false, - ]; - $diffSyntaxModes = [ - // @call diffForHumans - 'Absolute' => CarbonInterface::DIFF_ABSOLUTE, - // @call diffForHumans - 'Relative' => CarbonInterface::DIFF_RELATIVE_AUTO, - // @call diffForHumans - 'RelativeToNow' => CarbonInterface::DIFF_RELATIVE_TO_NOW, - // @call diffForHumans - 'RelativeToOther' => CarbonInterface::DIFF_RELATIVE_TO_OTHER, - ]; - $sizePattern = implode('|', array_keys($diffSizes)); - $syntaxPattern = implode('|', array_keys($diffSyntaxModes)); - - if (preg_match("/^(?$sizePattern)(?$syntaxPattern)DiffForHumans$/", $method, $match)) { - $dates = array_filter($parameters, function ($parameter) { - return $parameter instanceof DateTimeInterface; - }); - $other = null; - - if (\count($dates)) { - $key = key($dates); - $other = current($dates); - array_splice($parameters, $key, 1); - } - - return $this->diffForHumans($other, $diffSyntaxModes[$match['syntax']], $diffSizes[$match['size']], ...$parameters); - } - - $roundedValue = $this->callRoundMethod($method, $parameters); - - if ($roundedValue !== null) { - return $roundedValue; - } - - $unit = rtrim($method, 's'); - - if (str_starts_with($unit, 'is')) { - $word = substr($unit, 2); - - if (\in_array($word, static::$days, true)) { - return $this->isDayOfWeek($word); - } - - switch ($word) { - // @call is Check if the current instance has UTC timezone. (Both isUtc and isUTC cases are valid.) - case 'Utc': - case 'UTC': - return $this->utc; - // @call is Check if the current instance has non-UTC timezone. - case 'Local': - return $this->local; - // @call is Check if the current instance is a valid date. - case 'Valid': - return $this->year !== 0; - // @call is Check if the current instance is in a daylight saving time. - case 'DST': - return $this->dst; - } - } - - $action = substr($unit, 0, 3); - $overflow = null; - - if ($action === 'set') { - $unit = strtolower(substr($unit, 3)); - } - - if (\in_array($unit, static::$units, true)) { - return $this->setUnit($unit, ...$parameters); - } - - if ($action === 'add' || $action === 'sub') { - $unit = substr($unit, 3); - - if (str_starts_with($unit, 'Real')) { - $unit = static::singularUnit(substr($unit, 4)); - - return $this->{"{$action}RealUnit"}($unit, ...$parameters); - } - - if (preg_match('/^(Month|Quarter|Year|Decade|Century|Centurie|Millennium|Millennia)s?(No|With|Without|WithNo)Overflow$/', $unit, $match)) { - $unit = $match[1]; - $overflow = $match[2] === 'With'; - } - - $unit = static::singularUnit($unit); - } - - if (static::isModifiableUnit($unit)) { - return $this->{"{$action}Unit"}($unit, $this->getMagicParameter($parameters, 0, 'value', 1), $overflow); - } - - $sixFirstLetters = substr($unit, 0, 6); - $factor = -1; - - if ($sixFirstLetters === 'isLast') { - $sixFirstLetters = 'isNext'; - $factor = 1; - } - - if ($sixFirstLetters === 'isNext') { - $lowerUnit = strtolower(substr($unit, 6)); - - if (static::isModifiableUnit($lowerUnit)) { - return $this->copy()->addUnit($lowerUnit, $factor, false)->isSameUnit($lowerUnit, ...$parameters); - } - } - - if ($sixFirstLetters === 'isSame') { - try { - return $this->isSameUnit(strtolower(substr($unit, 6)), ...$parameters); - } catch (BadComparisonUnitException $exception) { - // Try next - } - } - - if (str_starts_with($unit, 'isCurrent')) { - try { - return $this->isCurrentUnit(strtolower(substr($unit, 9))); - } catch (BadComparisonUnitException | BadMethodCallException $exception) { - // Try next - } - } - - if (str_ends_with($method, 'Until')) { - try { - $unit = static::singularUnit(substr($method, 0, -5)); - - return $this->range( - $this->getMagicParameter($parameters, 0, 'endDate', $this), - $this->getMagicParameter($parameters, 1, 'factor', 1), - $unit - ); - } catch (InvalidArgumentException $exception) { - // Try macros - } - } - - return static::bindMacroContext($this, function () use (&$method, &$parameters) { - $macro = $this->getLocalMacro($method); - - if (!$macro) { - foreach ([$this->localGenericMacros ?: [], static::getGenericMacros()] as $list) { - foreach ($list as $callback) { - try { - return $this->executeCallable($callback, $method, ...$parameters); - } catch (BadMethodCallException $exception) { - continue; - } - } - } - - if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { - throw new UnknownMethodException($method); - } - - return null; - } - - return $this->executeCallable($macro, ...$parameters); - }); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php b/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php deleted file mode 100644 index 5acc6f5..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/DeprecatedProperties.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -trait DeprecatedProperties -{ - /** - * the day of week in current locale LC_TIME - * - * @var string - * - * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. - * Use ->isoFormat('MMM') instead. - * Deprecated since 2.55.0 - */ - public $localeDayOfWeek; - - /** - * the abbreviated day of week in current locale LC_TIME - * - * @var string - * - * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. - * Use ->isoFormat('dddd') instead. - * Deprecated since 2.55.0 - */ - public $shortLocaleDayOfWeek; - - /** - * the month in current locale LC_TIME - * - * @var string - * - * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. - * Use ->isoFormat('ddd') instead. - * Deprecated since 2.55.0 - */ - public $localeMonth; - - /** - * the abbreviated month in current locale LC_TIME - * - * @var string - * - * @deprecated It uses OS language package and strftime() which is deprecated since PHP 8.1. - * Use ->isoFormat('MMMM') instead. - * Deprecated since 2.55.0 - */ - public $shortLocaleMonth; -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php b/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php deleted file mode 100644 index ab5b65d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Difference.php +++ /dev/null @@ -1,1182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\Carbon; -use Carbon\CarbonImmutable; -use Carbon\CarbonInterface; -use Carbon\CarbonInterval; -use Carbon\CarbonPeriod; -use Carbon\Translator; -use Closure; -use DateInterval; -use DateTimeInterface; -use ReturnTypeWillChange; - -/** - * Trait Difference. - * - * Depends on the following methods: - * - * @method bool lessThan($date) - * @method static copy() - * @method static resolveCarbon($date = null) - * @method static Translator translator() - */ -trait Difference -{ - /** - * @codeCoverageIgnore - * - * @param CarbonInterval $diff - */ - protected static function fixNegativeMicroseconds(CarbonInterval $diff) - { - if ($diff->s !== 0 || $diff->i !== 0 || $diff->h !== 0 || $diff->d !== 0 || $diff->m !== 0 || $diff->y !== 0) { - $diff->f = (round($diff->f * 1000000) + 1000000) / 1000000; - $diff->s--; - - if ($diff->s < 0) { - $diff->s += 60; - $diff->i--; - - if ($diff->i < 0) { - $diff->i += 60; - $diff->h--; - - if ($diff->h < 0) { - $diff->h += 24; - $diff->d--; - - if ($diff->d < 0) { - $diff->d += 30; - $diff->m--; - - if ($diff->m < 0) { - $diff->m += 12; - $diff->y--; - } - } - } - } - } - - return; - } - - $diff->f *= -1; - $diff->invert(); - } - - /** - * @param DateInterval $diff - * @param bool $absolute - * - * @return CarbonInterval - */ - protected static function fixDiffInterval(DateInterval $diff, $absolute, array $skip = []) - { - $diff = CarbonInterval::instance($diff, $skip); - - // Work-around for https://bugs.php.net/bug.php?id=77145 - // @codeCoverageIgnoreStart - if ($diff->f > 0 && $diff->y === -1 && $diff->m === 11 && $diff->d >= 27 && $diff->h === 23 && $diff->i === 59 && $diff->s === 59) { - $diff->y = 0; - $diff->m = 0; - $diff->d = 0; - $diff->h = 0; - $diff->i = 0; - $diff->s = 0; - $diff->f = (1000000 - round($diff->f * 1000000)) / 1000000; - $diff->invert(); - } elseif ($diff->f < 0) { - static::fixNegativeMicroseconds($diff); - } - // @codeCoverageIgnoreEnd - - if ($absolute && $diff->invert) { - $diff->invert(); - } - - return $diff; - } - - /** - * Get the difference as a DateInterval instance. - * Return relative interval (negative if $absolute flag is not set to true and the given date is before - * current one). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return DateInterval - */ - #[ReturnTypeWillChange] - public function diff($date = null, $absolute = false) - { - $other = $this->resolveCarbon($date); - - // Work-around for https://bugs.php.net/bug.php?id=81458 - // It was initially introduced for https://bugs.php.net/bug.php?id=80998 - // The very specific case of 80998 was fixed in PHP 8.1beta3, but it introduced 81458 - // So we still need to keep this for now - // @codeCoverageIgnoreStart - if (version_compare(PHP_VERSION, '8.1.0-dev', '>=') && $other->tz !== $this->tz) { - $other = $other->avoidMutation()->tz($this->tz); - } - // @codeCoverageIgnoreEnd - - return parent::diff($other, (bool) $absolute); - } - - /** - * Get the difference as a CarbonInterval instance. - * Return relative interval (negative if $absolute flag is not set to true and the given date is before - * current one). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return CarbonInterval - */ - public function diffAsCarbonInterval($date = null, $absolute = true, array $skip = []) - { - return static::fixDiffInterval($this->diff($this->resolveCarbon($date), $absolute), $absolute, $skip); - } - - /** - * Get the difference in years - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInYears($date = null, $absolute = true) - { - return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%y'); - } - - /** - * Get the difference in quarters rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInQuarters($date = null, $absolute = true) - { - return (int) ($this->diffInMonths($date, $absolute) / static::MONTHS_PER_QUARTER); - } - - /** - * Get the difference in months rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInMonths($date = null, $absolute = true) - { - $date = $this->resolveCarbon($date)->avoidMutation()->tz($this->tz); - - [$yearStart, $monthStart, $dayStart] = explode('-', $this->format('Y-m-dHisu')); - [$yearEnd, $monthEnd, $dayEnd] = explode('-', $date->format('Y-m-dHisu')); - - $diff = (((int) $yearEnd) - ((int) $yearStart)) * static::MONTHS_PER_YEAR + - ((int) $monthEnd) - ((int) $monthStart); - - if ($diff > 0) { - $diff -= ($dayStart > $dayEnd ? 1 : 0); - } elseif ($diff < 0) { - $diff += ($dayStart < $dayEnd ? 1 : 0); - } - - return $absolute ? abs($diff) : $diff; - } - - /** - * Get the difference in weeks rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInWeeks($date = null, $absolute = true) - { - return (int) ($this->diffInDays($date, $absolute) / static::DAYS_PER_WEEK); - } - - /** - * Get the difference in days rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInDays($date = null, $absolute = true) - { - return $this->getIntervalDayDiff($this->diff($this->resolveCarbon($date), $absolute)); - } - - /** - * Get the difference in days using a filter closure rounded down. - * - * @param Closure $callback - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true) - { - return $this->diffFiltered(CarbonInterval::day(), $callback, $date, $absolute); - } - - /** - * Get the difference in hours using a filter closure rounded down. - * - * @param Closure $callback - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true) - { - return $this->diffFiltered(CarbonInterval::hour(), $callback, $date, $absolute); - } - - /** - * Get the difference by the given interval using a filter closure. - * - * @param CarbonInterval $ci An interval to traverse by - * @param Closure $callback - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true) - { - $start = $this; - $end = $this->resolveCarbon($date); - $inverse = false; - - if ($end < $start) { - $start = $end; - $end = $this; - $inverse = true; - } - - $options = CarbonPeriod::EXCLUDE_END_DATE | ($this->isMutable() ? 0 : CarbonPeriod::IMMUTABLE); - $diff = $ci->toPeriod($start, $end, $options)->filter($callback)->count(); - - return $inverse && !$absolute ? -$diff : $diff; - } - - /** - * Get the difference in weekdays rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInWeekdays($date = null, $absolute = true) - { - return $this->diffInDaysFiltered(static function (CarbonInterface $date) { - return $date->isWeekday(); - }, $this->resolveCarbon($date)->avoidMutation()->modify($this->format('H:i:s.u')), $absolute); - } - - /** - * Get the difference in weekend days using a filter rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInWeekendDays($date = null, $absolute = true) - { - return $this->diffInDaysFiltered(static function (CarbonInterface $date) { - return $date->isWeekend(); - }, $this->resolveCarbon($date)->avoidMutation()->modify($this->format('H:i:s.u')), $absolute); - } - - /** - * Get the difference in hours rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInHours($date = null, $absolute = true) - { - return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); - } - - /** - * Get the difference in hours rounded down using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealHours($date = null, $absolute = true) - { - return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); - } - - /** - * Get the difference in minutes rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInMinutes($date = null, $absolute = true) - { - return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); - } - - /** - * Get the difference in minutes rounded down using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealMinutes($date = null, $absolute = true) - { - return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); - } - - /** - * Get the difference in seconds rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInSeconds($date = null, $absolute = true) - { - $diff = $this->diff($date); - - if ($diff->days === 0) { - $diff = static::fixDiffInterval($diff, $absolute); - } - - $value = (((($diff->m || $diff->y ? $diff->days : $diff->d) * static::HOURS_PER_DAY) + - $diff->h) * static::MINUTES_PER_HOUR + - $diff->i) * static::SECONDS_PER_MINUTE + - $diff->s; - - return $absolute || !$diff->invert ? $value : -$value; - } - - /** - * Get the difference in microseconds. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInMicroseconds($date = null, $absolute = true) - { - $diff = $this->diff($date); - $value = (int) round(((((($diff->m || $diff->y ? $diff->days : $diff->d) * static::HOURS_PER_DAY) + - $diff->h) * static::MINUTES_PER_HOUR + - $diff->i) * static::SECONDS_PER_MINUTE + - ($diff->f + $diff->s)) * static::MICROSECONDS_PER_SECOND); - - return $absolute || !$diff->invert ? $value : -$value; - } - - /** - * Get the difference in milliseconds rounded down. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInMilliseconds($date = null, $absolute = true) - { - return (int) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); - } - - /** - * Get the difference in seconds using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealSeconds($date = null, $absolute = true) - { - /** @var CarbonInterface $date */ - $date = $this->resolveCarbon($date); - $value = $date->getTimestamp() - $this->getTimestamp(); - - return $absolute ? abs($value) : $value; - } - - /** - * Get the difference in microseconds using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealMicroseconds($date = null, $absolute = true) - { - /** @var CarbonInterface $date */ - $date = $this->resolveCarbon($date); - $value = ($date->timestamp - $this->timestamp) * static::MICROSECONDS_PER_SECOND + - $date->micro - $this->micro; - - return $absolute ? abs($value) : $value; - } - - /** - * Get the difference in milliseconds rounded down using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return int - */ - public function diffInRealMilliseconds($date = null, $absolute = true) - { - return (int) ($this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_MILLISECOND); - } - - /** - * Get the difference in seconds as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInSeconds($date = null, $absolute = true) - { - return (float) ($this->diffInMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND); - } - - /** - * Get the difference in minutes as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInMinutes($date = null, $absolute = true) - { - return $this->floatDiffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE; - } - - /** - * Get the difference in hours as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInHours($date = null, $absolute = true) - { - return $this->floatDiffInMinutes($date, $absolute) / static::MINUTES_PER_HOUR; - } - - /** - * Get the difference in days as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInDays($date = null, $absolute = true) - { - $hoursDiff = $this->floatDiffInHours($date, $absolute); - $interval = $this->diff($date, $absolute); - - if ($interval->y === 0 && $interval->m === 0 && $interval->d === 0) { - return $hoursDiff / static::HOURS_PER_DAY; - } - - $daysDiff = $this->getIntervalDayDiff($interval); - - return $daysDiff + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; - } - - /** - * Get the difference in weeks as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInWeeks($date = null, $absolute = true) - { - return $this->floatDiffInDays($date, $absolute) / static::DAYS_PER_WEEK; - } - - /** - * Get the difference in months as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInMonths($date = null, $absolute = true) - { - $start = $this; - $end = $this->resolveCarbon($date); - $ascending = ($start <= $end); - $sign = $absolute || $ascending ? 1 : -1; - if (!$ascending) { - [$start, $end] = [$end, $start]; - } - $monthsDiff = $start->diffInMonths($end); - /** @var Carbon|CarbonImmutable $floorEnd */ - $floorEnd = $start->avoidMutation()->addMonths($monthsDiff); - - if ($floorEnd >= $end) { - return $sign * $monthsDiff; - } - - /** @var Carbon|CarbonImmutable $startOfMonthAfterFloorEnd */ - $startOfMonthAfterFloorEnd = $floorEnd->avoidMutation()->addMonth()->startOfMonth(); - - if ($startOfMonthAfterFloorEnd > $end) { - return $sign * ($monthsDiff + $floorEnd->floatDiffInDays($end) / $floorEnd->daysInMonth); - } - - return $sign * ($monthsDiff + $floorEnd->floatDiffInDays($startOfMonthAfterFloorEnd) / $floorEnd->daysInMonth + $startOfMonthAfterFloorEnd->floatDiffInDays($end) / $end->daysInMonth); - } - - /** - * Get the difference in year as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInYears($date = null, $absolute = true) - { - $start = $this; - $end = $this->resolveCarbon($date); - $ascending = ($start <= $end); - $sign = $absolute || $ascending ? 1 : -1; - if (!$ascending) { - [$start, $end] = [$end, $start]; - } - $yearsDiff = $start->diffInYears($end); - /** @var Carbon|CarbonImmutable $floorEnd */ - $floorEnd = $start->avoidMutation()->addYears($yearsDiff); - - if ($floorEnd >= $end) { - return $sign * $yearsDiff; - } - - /** @var Carbon|CarbonImmutable $startOfYearAfterFloorEnd */ - $startOfYearAfterFloorEnd = $floorEnd->avoidMutation()->addYear()->startOfYear(); - - if ($startOfYearAfterFloorEnd > $end) { - return $sign * ($yearsDiff + $floorEnd->floatDiffInDays($end) / $floorEnd->daysInYear); - } - - return $sign * ($yearsDiff + $floorEnd->floatDiffInDays($startOfYearAfterFloorEnd) / $floorEnd->daysInYear + $startOfYearAfterFloorEnd->floatDiffInDays($end) / $end->daysInYear); - } - - /** - * Get the difference in seconds as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealSeconds($date = null, $absolute = true) - { - return $this->diffInRealMicroseconds($date, $absolute) / static::MICROSECONDS_PER_SECOND; - } - - /** - * Get the difference in minutes as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealMinutes($date = null, $absolute = true) - { - return $this->floatDiffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE; - } - - /** - * Get the difference in hours as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealHours($date = null, $absolute = true) - { - return $this->floatDiffInRealMinutes($date, $absolute) / static::MINUTES_PER_HOUR; - } - - /** - * Get the difference in days as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealDays($date = null, $absolute = true) - { - $date = $this->resolveUTC($date); - $utc = $this->avoidMutation()->utc(); - $hoursDiff = $utc->floatDiffInRealHours($date, $absolute); - - return ($hoursDiff < 0 ? -1 : 1) * $utc->diffInDays($date) + fmod($hoursDiff, static::HOURS_PER_DAY) / static::HOURS_PER_DAY; - } - - /** - * Get the difference in weeks as float (microsecond-precision). - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealWeeks($date = null, $absolute = true) - { - return $this->floatDiffInRealDays($date, $absolute) / static::DAYS_PER_WEEK; - } - - /** - * Get the difference in months as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealMonths($date = null, $absolute = true) - { - $start = $this; - $end = $this->resolveCarbon($date); - $ascending = ($start <= $end); - $sign = $absolute || $ascending ? 1 : -1; - if (!$ascending) { - [$start, $end] = [$end, $start]; - } - $monthsDiff = $start->diffInMonths($end); - /** @var Carbon|CarbonImmutable $floorEnd */ - $floorEnd = $start->avoidMutation()->addMonths($monthsDiff); - - if ($floorEnd >= $end) { - return $sign * $monthsDiff; - } - - /** @var Carbon|CarbonImmutable $startOfMonthAfterFloorEnd */ - $startOfMonthAfterFloorEnd = $floorEnd->avoidMutation()->addMonth()->startOfMonth(); - - if ($startOfMonthAfterFloorEnd > $end) { - return $sign * ($monthsDiff + $floorEnd->floatDiffInRealDays($end) / $floorEnd->daysInMonth); - } - - return $sign * ($monthsDiff + $floorEnd->floatDiffInRealDays($startOfMonthAfterFloorEnd) / $floorEnd->daysInMonth + $startOfMonthAfterFloorEnd->floatDiffInRealDays($end) / $end->daysInMonth); - } - - /** - * Get the difference in year as float (microsecond-precision) using timestamps. - * - * @param \Carbon\CarbonInterface|\DateTimeInterface|string|null $date - * @param bool $absolute Get the absolute of the difference - * - * @return float - */ - public function floatDiffInRealYears($date = null, $absolute = true) - { - $start = $this; - $end = $this->resolveCarbon($date); - $ascending = ($start <= $end); - $sign = $absolute || $ascending ? 1 : -1; - if (!$ascending) { - [$start, $end] = [$end, $start]; - } - $yearsDiff = $start->diffInYears($end); - /** @var Carbon|CarbonImmutable $floorEnd */ - $floorEnd = $start->avoidMutation()->addYears($yearsDiff); - - if ($floorEnd >= $end) { - return $sign * $yearsDiff; - } - - /** @var Carbon|CarbonImmutable $startOfYearAfterFloorEnd */ - $startOfYearAfterFloorEnd = $floorEnd->avoidMutation()->addYear()->startOfYear(); - - if ($startOfYearAfterFloorEnd > $end) { - return $sign * ($yearsDiff + $floorEnd->floatDiffInRealDays($end) / $floorEnd->daysInYear); - } - - return $sign * ($yearsDiff + $floorEnd->floatDiffInRealDays($startOfYearAfterFloorEnd) / $floorEnd->daysInYear + $startOfYearAfterFloorEnd->floatDiffInRealDays($end) / $end->daysInYear); - } - - /** - * The number of seconds since midnight. - * - * @return int - */ - public function secondsSinceMidnight() - { - return $this->diffInSeconds($this->avoidMutation()->startOfDay()); - } - - /** - * The number of seconds until 23:59:59. - * - * @return int - */ - public function secondsUntilEndOfDay() - { - return $this->diffInSeconds($this->avoidMutation()->endOfDay()); - } - - /** - * Get the difference in a human readable format in the current locale from current instance to an other - * instance given (or now if null given). - * - * @example - * ``` - * echo Carbon::tomorrow()->diffForHumans() . "\n"; - * echo Carbon::tomorrow()->diffForHumans(['parts' => 2]) . "\n"; - * echo Carbon::tomorrow()->diffForHumans(['parts' => 3, 'join' => true]) . "\n"; - * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday()) . "\n"; - * echo Carbon::tomorrow()->diffForHumans(Carbon::yesterday(), ['short' => true]) . "\n"; - * ``` - * - * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; - * if null passed, now will be used as comparison reference; - * if any other type, it will be converted to date and used as reference. - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'skip' entry, list of units to skip (array of strings or a single string, - * ` it can be the unit name (singular or plural) or its shortcut - * ` (y, m, w, d, h, min, s, ms, µs). - * - 'aUnit' entry, prefer "an hour" over "1 hour" if true - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'other' entry (see above) - * - 'minimumUnit' entry determines the smallest unit of time to display can be long or - * ` short form of the units, e.g. 'hour' or 'h' (default value: s) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function diffForHumans($other = null, $syntax = null, $short = false, $parts = 1, $options = null) - { - /* @var CarbonInterface $this */ - if (\is_array($other)) { - $other['syntax'] = \array_key_exists('syntax', $other) ? $other['syntax'] : $syntax; - $syntax = $other; - $other = $syntax['other'] ?? null; - } - - $intSyntax = &$syntax; - if (\is_array($syntax)) { - $syntax['syntax'] = $syntax['syntax'] ?? null; - $intSyntax = &$syntax['syntax']; - } - $intSyntax = (int) ($intSyntax ?? static::DIFF_RELATIVE_AUTO); - $intSyntax = $intSyntax === static::DIFF_RELATIVE_AUTO && $other === null ? static::DIFF_RELATIVE_TO_NOW : $intSyntax; - - $parts = min(7, max(1, (int) $parts)); - $skip = \is_array($syntax) ? ($syntax['skip'] ?? []) : []; - - return $this->diffAsCarbonInterval($other, false, (array) $skip) - ->setLocalTranslator($this->getLocalTranslator()) - ->forHumans($syntax, (bool) $short, $parts, $options ?? $this->localHumanDiffOptions ?? static::getHumanDiffOptions()); - } - - /** - * @alias diffForHumans - * - * Get the difference in a human readable format in the current locale from current instance to an other - * instance given (or now if null given). - * - * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; - * if null passed, now will be used as comparison reference; - * if any other type, it will be converted to date and used as reference. - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'other' entry (see above) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function from($other = null, $syntax = null, $short = false, $parts = 1, $options = null) - { - return $this->diffForHumans($other, $syntax, $short, $parts, $options); - } - - /** - * @alias diffForHumans - * - * Get the difference in a human readable format in the current locale from current instance to an other - * instance given (or now if null given). - */ - public function since($other = null, $syntax = null, $short = false, $parts = 1, $options = null) - { - return $this->diffForHumans($other, $syntax, $short, $parts, $options); - } - - /** - * Get the difference in a human readable format in the current locale from an other - * instance given (or now if null given) to current instance. - * - * When comparing a value in the past to default now: - * 1 hour from now - * 5 months from now - * - * When comparing a value in the future to default now: - * 1 hour ago - * 5 months ago - * - * When comparing a value in the past to another value: - * 1 hour after - * 5 months after - * - * When comparing a value in the future to another value: - * 1 hour before - * 5 months before - * - * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; - * if null passed, now will be used as comparison reference; - * if any other type, it will be converted to date and used as reference. - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'other' entry (see above) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function to($other = null, $syntax = null, $short = false, $parts = 1, $options = null) - { - if (!$syntax && !$other) { - $syntax = CarbonInterface::DIFF_RELATIVE_TO_NOW; - } - - return $this->resolveCarbon($other)->diffForHumans($this, $syntax, $short, $parts, $options); - } - - /** - * @alias to - * - * Get the difference in a human readable format in the current locale from an other - * instance given (or now if null given) to current instance. - * - * @param Carbon|\DateTimeInterface|string|array|null $other if array passed, will be used as parameters array, see $syntax below; - * if null passed, now will be used as comparison reference; - * if any other type, it will be converted to date and used as reference. - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * - 'other' entry (see above) - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function until($other = null, $syntax = null, $short = false, $parts = 1, $options = null) - { - return $this->to($other, $syntax, $short, $parts, $options); - } - - /** - * Get the difference in a human readable format in the current locale from current - * instance to now. - * - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single unit) - * @param int $options human diff options - * - * @return string - */ - public function fromNow($syntax = null, $short = false, $parts = 1, $options = null) - { - $other = null; - - if ($syntax instanceof DateTimeInterface) { - [$other, $syntax, $short, $parts, $options] = array_pad(\func_get_args(), 5, null); - } - - return $this->from($other, $syntax, $short, $parts, $options); - } - - /** - * Get the difference in a human readable format in the current locale from an other - * instance given to now - * - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single part) - * @param int $options human diff options - * - * @return string - */ - public function toNow($syntax = null, $short = false, $parts = 1, $options = null) - { - return $this->to(null, $syntax, $short, $parts, $options); - } - - /** - * Get the difference in a human readable format in the current locale from an other - * instance given to now - * - * @param int|array $syntax if array passed, parameters will be extracted from it, the array may contains: - * - 'syntax' entry (see below) - * - 'short' entry (see below) - * - 'parts' entry (see below) - * - 'options' entry (see below) - * - 'join' entry determines how to join multiple parts of the string - * ` - if $join is a string, it's used as a joiner glue - * ` - if $join is a callable/closure, it get the list of string and should return a string - * ` - if $join is an array, the first item will be the default glue, and the second item - * ` will be used instead of the glue for the last item - * ` - if $join is true, it will be guessed from the locale ('list' translation file entry) - * ` - if $join is missing, a space will be used as glue - * if int passed, it add modifiers: - * Possible values: - * - CarbonInterface::DIFF_ABSOLUTE no modifiers - * - CarbonInterface::DIFF_RELATIVE_TO_NOW add ago/from now modifier - * - CarbonInterface::DIFF_RELATIVE_TO_OTHER add before/after modifier - * Default value: CarbonInterface::DIFF_ABSOLUTE - * @param bool $short displays short format of time units - * @param int $parts maximum number of parts to display (default value: 1: single part) - * @param int $options human diff options - * - * @return string - */ - public function ago($syntax = null, $short = false, $parts = 1, $options = null) - { - $other = null; - - if ($syntax instanceof DateTimeInterface) { - [$other, $syntax, $short, $parts, $options] = array_pad(\func_get_args(), 5, null); - } - - return $this->from($other, $syntax, $short, $parts, $options); - } - - /** - * Get the difference in a human readable format in the current locale from current instance to an other - * instance given (or now if null given). - * - * @return string - */ - public function timespan($other = null, $timezone = null) - { - if (!$other instanceof DateTimeInterface) { - $other = static::parse($other, $timezone); - } - - return $this->diffForHumans($other, [ - 'join' => ', ', - 'syntax' => CarbonInterface::DIFF_ABSOLUTE, - 'options' => CarbonInterface::NO_ZERO_DIFF, - 'parts' => -1, - ]); - } - - /** - * Returns either day of week + time (e.g. "Last Friday at 3:30 PM") if reference time is within 7 days, - * or a calendar date (e.g. "10/29/2017") otherwise. - * - * Language, date and time formats will change according to the current locale. - * - * @param Carbon|\DateTimeInterface|string|null $referenceTime - * @param array $formats - * - * @return string - */ - public function calendar($referenceTime = null, array $formats = []) - { - /** @var CarbonInterface $current */ - $current = $this->avoidMutation()->startOfDay(); - /** @var CarbonInterface $other */ - $other = $this->resolveCarbon($referenceTime)->avoidMutation()->setTimezone($this->getTimezone())->startOfDay(); - $diff = $other->diffInDays($current, false); - $format = $diff < -6 ? 'sameElse' : ( - $diff < -1 ? 'lastWeek' : ( - $diff < 0 ? 'lastDay' : ( - $diff < 1 ? 'sameDay' : ( - $diff < 2 ? 'nextDay' : ( - $diff < 7 ? 'nextWeek' : 'sameElse' - ) - ) - ) - ) - ); - $format = array_merge($this->getCalendarFormats(), $formats)[$format]; - if ($format instanceof Closure) { - $format = $format($current, $other) ?? ''; - } - - return $this->isoFormat((string) $format); - } - - private function getIntervalDayDiff(DateInterval $interval): int - { - $daysDiff = (int) $interval->format('%a'); - $sign = $interval->format('%r') === '-' ? -1 : 1; - - if (\is_int($interval->days) && - $interval->y === 0 && - $interval->m === 0 && - version_compare(PHP_VERSION, '8.1.0-dev', '<') && - abs($interval->d - $daysDiff) === 1 - ) { - $daysDiff = abs($interval->d); // @codeCoverageIgnore - } - - return $daysDiff * $sign; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php b/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php deleted file mode 100644 index f069c28..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/IntervalRounding.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\CarbonInterval; -use Carbon\Exceptions\InvalidIntervalException; -use DateInterval; - -/** - * Trait to call rounding methods to interval or the interval of a period. - */ -trait IntervalRounding -{ - protected function callRoundMethod(string $method, array $parameters) - { - $action = substr($method, 0, 4); - - if ($action !== 'ceil') { - $action = substr($method, 0, 5); - } - - if (\in_array($action, ['round', 'floor', 'ceil'])) { - return $this->{$action.'Unit'}(substr($method, \strlen($action)), ...$parameters); - } - - return null; - } - - protected function roundWith($precision, $function) - { - $unit = 'second'; - - if ($precision instanceof DateInterval) { - $precision = (string) CarbonInterval::instance($precision, [], true); - } - - if (\is_string($precision) && preg_match('/^\s*(?\d+)?\s*(?\w+)(?\W.*)?$/', $precision, $match)) { - if (trim($match['other'] ?? '') !== '') { - throw new InvalidIntervalException('Rounding is only possible with single unit intervals.'); - } - - $precision = (int) ($match['precision'] ?: 1); - $unit = $match['unit']; - } - - return $this->roundUnit($unit, $precision, $function); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php b/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php deleted file mode 100644 index 82d7c32..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/IntervalStep.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\Carbon; -use Carbon\CarbonImmutable; -use Carbon\CarbonInterface; -use Closure; -use DateTimeImmutable; -use DateTimeInterface; - -trait IntervalStep -{ - /** - * Step to apply instead of a fixed interval to get the new date. - * - * @var Closure|null - */ - protected $step; - - /** - * Get the dynamic step in use. - * - * @return Closure - */ - public function getStep(): ?Closure - { - return $this->step; - } - - /** - * Set a step to apply instead of a fixed interval to get the new date. - * - * Or pass null to switch to fixed interval. - * - * @param Closure|null $step - */ - public function setStep(?Closure $step): void - { - $this->step = $step; - } - - /** - * Take a date and apply either the step if set, or the current interval else. - * - * The interval/step is applied negatively (typically subtraction instead of addition) if $negated is true. - * - * @param DateTimeInterface $dateTime - * @param bool $negated - * - * @return CarbonInterface - */ - public function convertDate(DateTimeInterface $dateTime, bool $negated = false): CarbonInterface - { - /** @var CarbonInterface $carbonDate */ - $carbonDate = $dateTime instanceof CarbonInterface ? $dateTime : $this->resolveCarbon($dateTime); - - if ($this->step) { - return $carbonDate->setDateTimeFrom(($this->step)($carbonDate->avoidMutation(), $negated)); - } - - if ($negated) { - return $carbonDate->rawSub($this); - } - - return $carbonDate->rawAdd($this); - } - - /** - * Convert DateTimeImmutable instance to CarbonImmutable instance and DateTime instance to Carbon instance. - * - * @param DateTimeInterface $dateTime - * - * @return Carbon|CarbonImmutable - */ - private function resolveCarbon(DateTimeInterface $dateTime) - { - if ($dateTime instanceof DateTimeImmutable) { - return CarbonImmutable::instance($dateTime); - } - - return Carbon::instance($dateTime); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php b/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php deleted file mode 100644 index 46aff11..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Localization.php +++ /dev/null @@ -1,840 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\CarbonInterface; -use Carbon\Exceptions\InvalidTypeException; -use Carbon\Exceptions\NotLocaleAwareException; -use Carbon\Language; -use Carbon\Translator; -use Carbon\TranslatorStrongTypeInterface; -use Closure; -use Symfony\Component\Translation\TranslatorBagInterface; -use Symfony\Component\Translation\TranslatorInterface; -use Symfony\Contracts\Translation\LocaleAwareInterface; -use Symfony\Contracts\Translation\TranslatorInterface as ContractsTranslatorInterface; - -// @codeCoverageIgnoreStart -if (interface_exists('Symfony\\Contracts\\Translation\\TranslatorInterface') && - !interface_exists('Symfony\\Component\\Translation\\TranslatorInterface') -) { - class_alias( - 'Symfony\\Contracts\\Translation\\TranslatorInterface', - 'Symfony\\Component\\Translation\\TranslatorInterface' - ); -} -// @codeCoverageIgnoreEnd - -/** - * Trait Localization. - * - * Embed default and locale translators and translation base methods. - */ -trait Localization -{ - /** - * Default translator. - * - * @var \Symfony\Component\Translation\TranslatorInterface - */ - protected static $translator; - - /** - * Specific translator of the current instance. - * - * @var \Symfony\Component\Translation\TranslatorInterface - */ - protected $localTranslator; - - /** - * Options for diffForHumans(). - * - * @var int - */ - protected static $humanDiffOptions = CarbonInterface::NO_ZERO_DIFF; - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @see settings - * - * @param int $humanDiffOptions - */ - public static function setHumanDiffOptions($humanDiffOptions) - { - static::$humanDiffOptions = $humanDiffOptions; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @see settings - * - * @param int $humanDiffOption - */ - public static function enableHumanDiffOption($humanDiffOption) - { - static::$humanDiffOptions = static::getHumanDiffOptions() | $humanDiffOption; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @see settings - * - * @param int $humanDiffOption - */ - public static function disableHumanDiffOption($humanDiffOption) - { - static::$humanDiffOptions = static::getHumanDiffOptions() & ~$humanDiffOption; - } - - /** - * Return default humanDiff() options (merged flags as integer). - * - * @return int - */ - public static function getHumanDiffOptions() - { - return static::$humanDiffOptions; - } - - /** - * Get the default translator instance in use. - * - * @return \Symfony\Component\Translation\TranslatorInterface - */ - public static function getTranslator() - { - return static::translator(); - } - - /** - * Set the default translator instance to use. - * - * @param \Symfony\Component\Translation\TranslatorInterface $translator - * - * @return void - */ - public static function setTranslator(TranslatorInterface $translator) - { - static::$translator = $translator; - } - - /** - * Return true if the current instance has its own translator. - * - * @return bool - */ - public function hasLocalTranslator() - { - return isset($this->localTranslator); - } - - /** - * Get the translator of the current instance or the default if none set. - * - * @return \Symfony\Component\Translation\TranslatorInterface - */ - public function getLocalTranslator() - { - return $this->localTranslator ?: static::translator(); - } - - /** - * Set the translator for the current instance. - * - * @param \Symfony\Component\Translation\TranslatorInterface $translator - * - * @return $this - */ - public function setLocalTranslator(TranslatorInterface $translator) - { - $this->localTranslator = $translator; - - return $this; - } - - /** - * Returns raw translation message for a given key. - * - * @param \Symfony\Component\Translation\TranslatorInterface $translator the translator to use - * @param string $key key to find - * @param string|null $locale current locale used if null - * @param string|null $default default value if translation returns the key - * - * @return string - */ - public static function getTranslationMessageWith($translator, string $key, ?string $locale = null, ?string $default = null) - { - if (!($translator instanceof TranslatorBagInterface && $translator instanceof TranslatorInterface)) { - throw new InvalidTypeException( - 'Translator does not implement '.TranslatorInterface::class.' and '.TranslatorBagInterface::class.'. '. - (\is_object($translator) ? \get_class($translator) : \gettype($translator)).' has been given.' - ); - } - - if (!$locale && $translator instanceof LocaleAwareInterface) { - $locale = $translator->getLocale(); - } - - $result = self::getFromCatalogue($translator, $translator->getCatalogue($locale), $key); - - return $result === $key ? $default : $result; - } - - /** - * Returns raw translation message for a given key. - * - * @param string $key key to find - * @param string|null $locale current locale used if null - * @param string|null $default default value if translation returns the key - * @param \Symfony\Component\Translation\TranslatorInterface $translator an optional translator to use - * - * @return string - */ - public function getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) - { - return static::getTranslationMessageWith($translator ?: $this->getLocalTranslator(), $key, $locale, $default); - } - - /** - * Translate using translation string or callback available. - * - * @param \Symfony\Component\Translation\TranslatorInterface $translator - * @param string $key - * @param array $parameters - * @param null $number - * - * @return string - */ - public static function translateWith(TranslatorInterface $translator, string $key, array $parameters = [], $number = null): string - { - $message = static::getTranslationMessageWith($translator, $key, null, $key); - if ($message instanceof Closure) { - return (string) $message(...array_values($parameters)); - } - - if ($number !== null) { - $parameters['%count%'] = $number; - } - if (isset($parameters['%count%'])) { - $parameters[':count'] = $parameters['%count%']; - } - - // @codeCoverageIgnoreStart - $choice = $translator instanceof ContractsTranslatorInterface - ? $translator->trans($key, $parameters) - : $translator->transChoice($key, $number, $parameters); - // @codeCoverageIgnoreEnd - - return (string) $choice; - } - - /** - * Translate using translation string or callback available. - * - * @param string $key - * @param array $parameters - * @param string|int|float|null $number - * @param \Symfony\Component\Translation\TranslatorInterface|null $translator - * @param bool $altNumbers - * - * @return string - */ - public function translate(string $key, array $parameters = [], $number = null, ?TranslatorInterface $translator = null, bool $altNumbers = false): string - { - $translation = static::translateWith($translator ?: $this->getLocalTranslator(), $key, $parameters, $number); - - if ($number !== null && $altNumbers) { - return str_replace($number, $this->translateNumber($number), $translation); - } - - return $translation; - } - - /** - * Returns the alternative number for a given integer if available in the current locale. - * - * @param int $number - * - * @return string - */ - public function translateNumber(int $number): string - { - $translateKey = "alt_numbers.$number"; - $symbol = $this->translate($translateKey); - - if ($symbol !== $translateKey) { - return $symbol; - } - - if ($number > 99 && $this->translate('alt_numbers.99') !== 'alt_numbers.99') { - $start = ''; - foreach ([10000, 1000, 100] as $exp) { - $key = "alt_numbers_pow.$exp"; - if ($number >= $exp && $number < $exp * 10 && ($pow = $this->translate($key)) !== $key) { - $unit = floor($number / $exp); - $number -= $unit * $exp; - $start .= ($unit > 1 ? $this->translate("alt_numbers.$unit") : '').$pow; - } - } - $result = ''; - while ($number) { - $chunk = $number % 100; - $result = $this->translate("alt_numbers.$chunk").$result; - $number = floor($number / 100); - } - - return "$start$result"; - } - - if ($number > 9 && $this->translate('alt_numbers.9') !== 'alt_numbers.9') { - $result = ''; - while ($number) { - $chunk = $number % 10; - $result = $this->translate("alt_numbers.$chunk").$result; - $number = floor($number / 10); - } - - return $result; - } - - return (string) $number; - } - - /** - * Translate a time string from a locale to an other. - * - * @param string $timeString date/time/duration string to translate (may also contain English) - * @param string|null $from input locale of the $timeString parameter (`Carbon::getLocale()` by default) - * @param string|null $to output locale of the result returned (`"en"` by default) - * @param int $mode specify what to translate with options: - * - CarbonInterface::TRANSLATE_ALL (default) - * - CarbonInterface::TRANSLATE_MONTHS - * - CarbonInterface::TRANSLATE_DAYS - * - CarbonInterface::TRANSLATE_UNITS - * - CarbonInterface::TRANSLATE_MERIDIEM - * You can use pipe to group: CarbonInterface::TRANSLATE_MONTHS | CarbonInterface::TRANSLATE_DAYS - * - * @return string - */ - public static function translateTimeString($timeString, $from = null, $to = null, $mode = CarbonInterface::TRANSLATE_ALL) - { - // Fallback source and destination locales - $from = $from ?: static::getLocale(); - $to = $to ?: 'en'; - - if ($from === $to) { - return $timeString; - } - - // Standardize apostrophe - $timeString = strtr($timeString, ['’' => "'"]); - - $fromTranslations = []; - $toTranslations = []; - - foreach (['from', 'to'] as $key) { - $language = $$key; - $translator = Translator::get($language); - $translations = $translator->getMessages(); - - if (!isset($translations[$language])) { - return $timeString; - } - - $translationKey = $key.'Translations'; - $messages = $translations[$language]; - $months = $messages['months'] ?? []; - $weekdays = $messages['weekdays'] ?? []; - $meridiem = $messages['meridiem'] ?? ['AM', 'PM']; - - if (isset($messages['ordinal_words'])) { - $timeString = self::replaceOrdinalWords( - $timeString, - $key === 'from' ? array_flip($messages['ordinal_words']) : $messages['ordinal_words'] - ); - } - - if ($key === 'from') { - foreach (['months', 'weekdays'] as $variable) { - $list = $messages[$variable.'_standalone'] ?? null; - - if ($list) { - foreach ($$variable as $index => &$name) { - $name .= '|'.$messages[$variable.'_standalone'][$index]; - } - } - } - } - - $$translationKey = array_merge( - $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($months, 12, $timeString) : [], - $mode & CarbonInterface::TRANSLATE_MONTHS ? static::getTranslationArray($messages['months_short'] ?? [], 12, $timeString) : [], - $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($weekdays, 7, $timeString) : [], - $mode & CarbonInterface::TRANSLATE_DAYS ? static::getTranslationArray($messages['weekdays_short'] ?? [], 7, $timeString) : [], - $mode & CarbonInterface::TRANSLATE_DIFF ? static::translateWordsByKeys([ - 'diff_now', - 'diff_today', - 'diff_yesterday', - 'diff_tomorrow', - 'diff_before_yesterday', - 'diff_after_tomorrow', - ], $messages, $key) : [], - $mode & CarbonInterface::TRANSLATE_UNITS ? static::translateWordsByKeys([ - 'year', - 'month', - 'week', - 'day', - 'hour', - 'minute', - 'second', - ], $messages, $key) : [], - $mode & CarbonInterface::TRANSLATE_MERIDIEM ? array_map(function ($hour) use ($meridiem) { - if (\is_array($meridiem)) { - return $meridiem[$hour < 12 ? 0 : 1]; - } - - return $meridiem($hour, 0, false); - }, range(0, 23)) : [] - ); - } - - return substr(preg_replace_callback('/(?<=[\d\s+.\/,_-])('.implode('|', $fromTranslations).')(?=[\d\s+.\/,_-])/iu', function ($match) use ($fromTranslations, $toTranslations) { - [$chunk] = $match; - - foreach ($fromTranslations as $index => $word) { - if (preg_match("/^$word\$/iu", $chunk)) { - return $toTranslations[$index] ?? ''; - } - } - - return $chunk; // @codeCoverageIgnore - }, " $timeString "), 1, -1); - } - - /** - * Translate a time string from the current locale (`$date->locale()`) to an other. - * - * @param string $timeString time string to translate - * @param string|null $to output locale of the result returned ("en" by default) - * - * @return string - */ - public function translateTimeStringTo($timeString, $to = null) - { - return static::translateTimeString($timeString, $this->getTranslatorLocale(), $to); - } - - /** - * Get/set the locale for the current instance. - * - * @param string|null $locale - * @param string ...$fallbackLocales - * - * @return $this|string - */ - public function locale(string $locale = null, ...$fallbackLocales) - { - if ($locale === null) { - return $this->getTranslatorLocale(); - } - - if (!$this->localTranslator || $this->getTranslatorLocale($this->localTranslator) !== $locale) { - $translator = Translator::get($locale); - - if (!empty($fallbackLocales)) { - $translator->setFallbackLocales($fallbackLocales); - - foreach ($fallbackLocales as $fallbackLocale) { - $messages = Translator::get($fallbackLocale)->getMessages(); - - if (isset($messages[$fallbackLocale])) { - $translator->setMessages($fallbackLocale, $messages[$fallbackLocale]); - } - } - } - - $this->localTranslator = $translator; - } - - return $this; - } - - /** - * Get the current translator locale. - * - * @return string - */ - public static function getLocale() - { - return static::getLocaleAwareTranslator()->getLocale(); - } - - /** - * Set the current translator locale and indicate if the source locale file exists. - * Pass 'auto' as locale to use closest language from the current LC_TIME locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function setLocale($locale) - { - return static::getLocaleAwareTranslator()->setLocale($locale) !== false; - } - - /** - * Set the fallback locale. - * - * @see https://symfony.com/doc/current/components/translation.html#fallback-locales - * - * @param string $locale - */ - public static function setFallbackLocale($locale) - { - $translator = static::getTranslator(); - - if (method_exists($translator, 'setFallbackLocales')) { - $translator->setFallbackLocales([$locale]); - - if ($translator instanceof Translator) { - $preferredLocale = $translator->getLocale(); - $translator->setMessages($preferredLocale, array_replace_recursive( - $translator->getMessages()[$locale] ?? [], - Translator::get($locale)->getMessages()[$locale] ?? [], - $translator->getMessages($preferredLocale) - )); - } - } - } - - /** - * Get the fallback locale. - * - * @see https://symfony.com/doc/current/components/translation.html#fallback-locales - * - * @return string|null - */ - public static function getFallbackLocale() - { - $translator = static::getTranslator(); - - if (method_exists($translator, 'getFallbackLocales')) { - return $translator->getFallbackLocales()[0] ?? null; - } - - return null; - } - - /** - * Set the current locale to the given, execute the passed function, reset the locale to previous one, - * then return the result of the closure (or null if the closure was void). - * - * @param string $locale locale ex. en - * @param callable $func - * - * @return mixed - */ - public static function executeWithLocale($locale, $func) - { - $currentLocale = static::getLocale(); - $result = $func(static::setLocale($locale) ? static::getLocale() : false, static::translator()); - static::setLocale($currentLocale); - - return $result; - } - - /** - * Returns true if the given locale is internally supported and has short-units support. - * Support is considered enabled if either year, day or hour has a short variant translated. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasShortUnits($locale) - { - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { - return ($newLocale && (($y = static::translateWith($translator, 'y')) !== 'y' && $y !== static::translateWith($translator, 'year'))) || ( - ($y = static::translateWith($translator, 'd')) !== 'd' && - $y !== static::translateWith($translator, 'day') - ) || ( - ($y = static::translateWith($translator, 'h')) !== 'h' && - $y !== static::translateWith($translator, 'hour') - ); - }); - } - - /** - * Returns true if the given locale is internally supported and has diff syntax support (ago, from now, before, after). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasDiffSyntax($locale) - { - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { - if (!$newLocale) { - return false; - } - - foreach (['ago', 'from_now', 'before', 'after'] as $key) { - if ($translator instanceof TranslatorBagInterface && - self::getFromCatalogue($translator, $translator->getCatalogue($newLocale), $key) instanceof Closure - ) { - continue; - } - - if ($translator->trans($key) === $key) { - return false; - } - } - - return true; - }); - } - - /** - * Returns true if the given locale is internally supported and has words for 1-day diff (just now, yesterday, tomorrow). - * Support is considered enabled if the 3 words are translated in the given locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasDiffOneDayWords($locale) - { - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { - return $newLocale && - $translator->trans('diff_now') !== 'diff_now' && - $translator->trans('diff_yesterday') !== 'diff_yesterday' && - $translator->trans('diff_tomorrow') !== 'diff_tomorrow'; - }); - } - - /** - * Returns true if the given locale is internally supported and has words for 2-days diff (before yesterday, after tomorrow). - * Support is considered enabled if the 2 words are translated in the given locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasDiffTwoDayWords($locale) - { - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { - return $newLocale && - $translator->trans('diff_before_yesterday') !== 'diff_before_yesterday' && - $translator->trans('diff_after_tomorrow') !== 'diff_after_tomorrow'; - }); - } - - /** - * Returns true if the given locale is internally supported and has period syntax support (X times, every X, from X, to X). - * Support is considered enabled if the 4 sentences are translated in the given locale. - * - * @param string $locale locale ex. en - * - * @return bool - */ - public static function localeHasPeriodSyntax($locale) - { - return static::executeWithLocale($locale, function ($newLocale, TranslatorInterface $translator) { - return $newLocale && - $translator->trans('period_recurrences') !== 'period_recurrences' && - $translator->trans('period_interval') !== 'period_interval' && - $translator->trans('period_start_date') !== 'period_start_date' && - $translator->trans('period_end_date') !== 'period_end_date'; - }); - } - - /** - * Returns the list of internally available locales and already loaded custom locales. - * (It will ignore custom translator dynamic loading.) - * - * @return array - */ - public static function getAvailableLocales() - { - $translator = static::getLocaleAwareTranslator(); - - return $translator instanceof Translator - ? $translator->getAvailableLocales() - : [$translator->getLocale()]; - } - - /** - * Returns list of Language object for each available locale. This object allow you to get the ISO name, native - * name, region and variant of the locale. - * - * @return Language[] - */ - public static function getAvailableLocalesInfo() - { - $languages = []; - foreach (static::getAvailableLocales() as $id) { - $languages[$id] = new Language($id); - } - - return $languages; - } - - /** - * Initialize the default translator instance if necessary. - * - * @return \Symfony\Component\Translation\TranslatorInterface - */ - protected static function translator() - { - if (static::$translator === null) { - static::$translator = Translator::get(); - } - - return static::$translator; - } - - /** - * Get the locale of a given translator. - * - * If null or omitted, current local translator is used. - * If no local translator is in use, current global translator is used. - * - * @param null $translator - * - * @return string|null - */ - protected function getTranslatorLocale($translator = null): ?string - { - if (\func_num_args() === 0) { - $translator = $this->getLocalTranslator(); - } - - $translator = static::getLocaleAwareTranslator($translator); - - return $translator ? $translator->getLocale() : null; - } - - /** - * Throw an error if passed object is not LocaleAwareInterface. - * - * @param LocaleAwareInterface|null $translator - * - * @return LocaleAwareInterface|null - */ - protected static function getLocaleAwareTranslator($translator = null) - { - if (\func_num_args() === 0) { - $translator = static::translator(); - } - - if ($translator && !($translator instanceof LocaleAwareInterface || method_exists($translator, 'getLocale'))) { - throw new NotLocaleAwareException($translator); // @codeCoverageIgnore - } - - return $translator; - } - - /** - * @param mixed $translator - * @param \Symfony\Component\Translation\MessageCatalogueInterface $catalogue - * - * @return mixed - */ - private static function getFromCatalogue($translator, $catalogue, string $id, string $domain = 'messages') - { - return $translator instanceof TranslatorStrongTypeInterface - ? $translator->getFromCatalogue($catalogue, $id, $domain) // @codeCoverageIgnore - : $catalogue->get($id, $domain); - } - - /** - * Return the word cleaned from its translation codes. - * - * @param string $word - * - * @return string - */ - private static function cleanWordFromTranslationString($word) - { - $word = str_replace([':count', '%count', ':time'], '', $word); - $word = strtr($word, ['’' => "'"]); - $word = preg_replace('/({\d+(,(\d+|Inf))?}|[\[\]]\d+(,(\d+|Inf))?[\[\]])/', '', $word); - - return trim($word); - } - - /** - * Translate a list of words. - * - * @param string[] $keys keys to translate. - * @param string[] $messages messages bag handling translations. - * @param string $key 'to' (to get the translation) or 'from' (to get the detection RegExp pattern). - * - * @return string[] - */ - private static function translateWordsByKeys($keys, $messages, $key): array - { - return array_map(function ($wordKey) use ($messages, $key) { - $message = $key === 'from' && isset($messages[$wordKey.'_regexp']) - ? $messages[$wordKey.'_regexp'] - : ($messages[$wordKey] ?? null); - - if (!$message) { - return '>>DO NOT REPLACE<<'; - } - - $parts = explode('|', $message); - - return $key === 'to' - ? self::cleanWordFromTranslationString(end($parts)) - : '(?:'.implode('|', array_map([static::class, 'cleanWordFromTranslationString'], $parts)).')'; - }, $keys); - } - - /** - * Get an array of translations based on the current date. - * - * @param callable $translation - * @param int $length - * @param string $timeString - * - * @return string[] - */ - private static function getTranslationArray($translation, $length, $timeString): array - { - $filler = '>>DO NOT REPLACE<<'; - - if (\is_array($translation)) { - return array_pad($translation, $length, $filler); - } - - $list = []; - $date = static::now(); - - for ($i = 0; $i < $length; $i++) { - $list[] = $translation($date, $timeString, $i) ?? $filler; - } - - return $list; - } - - private static function replaceOrdinalWords(string $timeString, array $ordinalWords): string - { - return preg_replace_callback('/(? - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -/** - * Trait Macros. - * - * Allows users to register macros within the Carbon class. - */ -trait Macro -{ - use Mixin; - - /** - * The registered macros. - * - * @var array - */ - protected static $globalMacros = []; - - /** - * The registered generic macros. - * - * @var array - */ - protected static $globalGenericMacros = []; - - /** - * Register a custom macro. - * - * @example - * ``` - * $userSettings = [ - * 'locale' => 'pt', - * 'timezone' => 'America/Sao_Paulo', - * ]; - * Carbon::macro('userFormat', function () use ($userSettings) { - * return $this->copy()->locale($userSettings['locale'])->tz($userSettings['timezone'])->calendar(); - * }); - * echo Carbon::yesterday()->hours(11)->userFormat(); - * ``` - * - * @param string $name - * @param object|callable $macro - * - * @return void - */ - public static function macro($name, $macro) - { - static::$globalMacros[$name] = $macro; - } - - /** - * Remove all macros and generic macros. - */ - public static function resetMacros() - { - static::$globalMacros = []; - static::$globalGenericMacros = []; - } - - /** - * Register a custom macro. - * - * @param object|callable $macro - * @param int $priority marco with higher priority is tried first - * - * @return void - */ - public static function genericMacro($macro, $priority = 0) - { - if (!isset(static::$globalGenericMacros[$priority])) { - static::$globalGenericMacros[$priority] = []; - krsort(static::$globalGenericMacros, SORT_NUMERIC); - } - - static::$globalGenericMacros[$priority][] = $macro; - } - - /** - * Checks if macro is registered globally. - * - * @param string $name - * - * @return bool - */ - public static function hasMacro($name) - { - return isset(static::$globalMacros[$name]); - } - - /** - * Get the raw callable macro registered globally for a given name. - * - * @param string $name - * - * @return callable|null - */ - public static function getMacro($name) - { - return static::$globalMacros[$name] ?? null; - } - - /** - * Checks if macro is registered globally or locally. - * - * @param string $name - * - * @return bool - */ - public function hasLocalMacro($name) - { - return ($this->localMacros && isset($this->localMacros[$name])) || static::hasMacro($name); - } - - /** - * Get the raw callable macro registered globally or locally for a given name. - * - * @param string $name - * - * @return callable|null - */ - public function getLocalMacro($name) - { - return ($this->localMacros ?? [])[$name] ?? static::getMacro($name); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/MagicParameter.php b/vendor/nesbot/carbon/src/Carbon/Traits/MagicParameter.php deleted file mode 100644 index 310a44d..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/MagicParameter.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -/** - * Trait MagicParameter. - * - * Allows to retrieve parameter in magic calls by index or name. - */ -trait MagicParameter -{ - private function getMagicParameter(array $parameters, int $index, string $key, $default) - { - if (\array_key_exists($index, $parameters)) { - return $parameters[$index]; - } - - if (\array_key_exists($key, $parameters)) { - return $parameters[$key]; - } - - return $default; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php b/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php deleted file mode 100644 index 5822454..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Mixin.php +++ /dev/null @@ -1,226 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\CarbonInterface; -use Carbon\CarbonInterval; -use Carbon\CarbonPeriod; -use Closure; -use Generator; -use ReflectionClass; -use ReflectionException; -use ReflectionMethod; -use Throwable; - -/** - * Trait Mixin. - * - * Allows mixing in entire classes with multiple macros. - */ -trait Mixin -{ - /** - * Stack of macro instance contexts. - * - * @var array - */ - protected static $macroContextStack = []; - - /** - * Mix another object into the class. - * - * @example - * ``` - * Carbon::mixin(new class { - * public function addMoon() { - * return function () { - * return $this->addDays(30); - * }; - * } - * public function subMoon() { - * return function () { - * return $this->subDays(30); - * }; - * } - * }); - * $fullMoon = Carbon::create('2018-12-22'); - * $nextFullMoon = $fullMoon->addMoon(); - * $blackMoon = Carbon::create('2019-01-06'); - * $previousBlackMoon = $blackMoon->subMoon(); - * echo "$nextFullMoon\n"; - * echo "$previousBlackMoon\n"; - * ``` - * - * @param object|string $mixin - * - * @throws ReflectionException - * - * @return void - */ - public static function mixin($mixin) - { - \is_string($mixin) && trait_exists($mixin) - ? self::loadMixinTrait($mixin) - : self::loadMixinClass($mixin); - } - - /** - * @param object|string $mixin - * - * @throws ReflectionException - */ - private static function loadMixinClass($mixin) - { - $methods = (new ReflectionClass($mixin))->getMethods( - ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED - ); - - foreach ($methods as $method) { - if ($method->isConstructor() || $method->isDestructor()) { - continue; - } - - $method->setAccessible(true); - - static::macro($method->name, $method->invoke($mixin)); - } - } - - /** - * @param string $trait - */ - private static function loadMixinTrait($trait) - { - $context = eval(self::getAnonymousClassCodeForTrait($trait)); - $className = \get_class($context); - $baseClass = static::class; - - foreach (self::getMixableMethods($context) as $name) { - $closureBase = Closure::fromCallable([$context, $name]); - - static::macro($name, function (...$parameters) use ($closureBase, $className, $baseClass) { - $downContext = isset($this) ? ($this) : new $baseClass(); - $context = isset($this) ? $this->cast($className) : new $className(); - - try { - // @ is required to handle error if not converted into exceptions - $closure = @$closureBase->bindTo($context); - } catch (Throwable $throwable) { // @codeCoverageIgnore - $closure = $closureBase; // @codeCoverageIgnore - } - - // in case of errors not converted into exceptions - $closure = $closure ?: $closureBase; - - $result = $closure(...$parameters); - - if (!($result instanceof $className)) { - return $result; - } - - if ($downContext instanceof CarbonInterface && $result instanceof CarbonInterface) { - if ($context !== $result) { - $downContext = $downContext->copy(); - } - - return $downContext - ->setTimezone($result->getTimezone()) - ->modify($result->format('Y-m-d H:i:s.u')) - ->settings($result->getSettings()); - } - - if ($downContext instanceof CarbonInterval && $result instanceof CarbonInterval) { - if ($context !== $result) { - $downContext = $downContext->copy(); - } - - $downContext->copyProperties($result); - self::copyStep($downContext, $result); - self::copyNegativeUnits($downContext, $result); - - return $downContext->settings($result->getSettings()); - } - - if ($downContext instanceof CarbonPeriod && $result instanceof CarbonPeriod) { - if ($context !== $result) { - $downContext = $downContext->copy(); - } - - return $downContext - ->setDates($result->getStartDate(), $result->getEndDate()) - ->setRecurrences($result->getRecurrences()) - ->setOptions($result->getOptions()) - ->settings($result->getSettings()); - } - - return $result; - }); - } - } - - private static function getAnonymousClassCodeForTrait(string $trait) - { - return 'return new class() extends '.static::class.' {use '.$trait.';};'; - } - - private static function getMixableMethods(self $context): Generator - { - foreach (get_class_methods($context) as $name) { - if (method_exists(static::class, $name)) { - continue; - } - - yield $name; - } - } - - /** - * Stack a Carbon context from inside calls of self::this() and execute a given action. - * - * @param static|null $context - * @param callable $callable - * - * @throws Throwable - * - * @return mixed - */ - protected static function bindMacroContext($context, callable $callable) - { - static::$macroContextStack[] = $context; - - try { - return $callable(); - } finally { - array_pop(static::$macroContextStack); - } - } - - /** - * Return the current context from inside a macro callee or a null if static. - * - * @return static|null - */ - protected static function context() - { - return end(static::$macroContextStack) ?: null; - } - - /** - * Return the current context from inside a macro callee or a new one if static. - * - * @return static - */ - protected static function this() - { - return end(static::$macroContextStack) ?: new static(); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php b/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php deleted file mode 100644 index 39343d8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Modifiers.php +++ /dev/null @@ -1,472 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\CarbonInterface; -use ReturnTypeWillChange; - -/** - * Trait Modifiers. - * - * Returns dates relative to current date using modifier short-hand. - */ -trait Modifiers -{ - /** - * Midday/noon hour. - * - * @var int - */ - protected static $midDayAt = 12; - - /** - * get midday/noon hour - * - * @return int - */ - public static function getMidDayAt() - { - return static::$midDayAt; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather consider mid-day is always 12pm, then if you need to test if it's an other - * hour, test it explicitly: - * $date->format('G') == 13 - * or to set explicitly to a given hour: - * $date->setTime(13, 0, 0, 0) - * - * Set midday/noon hour - * - * @param int $hour midday hour - * - * @return void - */ - public static function setMidDayAt($hour) - { - static::$midDayAt = $hour; - } - - /** - * Modify to midday, default to self::$midDayAt - * - * @return static - */ - public function midDay() - { - return $this->setTime(static::$midDayAt, 0, 0, 0); - } - - /** - * Modify to the next occurrence of a given modifier such as a day of - * the week. If no modifier is provided, modify to the next occurrence - * of the current day of the week. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param string|int|null $modifier - * - * @return static|false - */ - public function next($modifier = null) - { - if ($modifier === null) { - $modifier = $this->dayOfWeek; - } - - return $this->change( - 'next '.(\is_string($modifier) ? $modifier : static::$days[$modifier]) - ); - } - - /** - * Go forward or backward to the next week- or weekend-day. - * - * @param bool $weekday - * @param bool $forward - * - * @return static - */ - private function nextOrPreviousDay($weekday = true, $forward = true) - { - /** @var CarbonInterface $date */ - $date = $this; - $step = $forward ? 1 : -1; - - do { - $date = $date->addDays($step); - } while ($weekday ? $date->isWeekend() : $date->isWeekday()); - - return $date; - } - - /** - * Go forward to the next weekday. - * - * @return static - */ - public function nextWeekday() - { - return $this->nextOrPreviousDay(); - } - - /** - * Go backward to the previous weekday. - * - * @return static - */ - public function previousWeekday() - { - return $this->nextOrPreviousDay(true, false); - } - - /** - * Go forward to the next weekend day. - * - * @return static - */ - public function nextWeekendDay() - { - return $this->nextOrPreviousDay(false); - } - - /** - * Go backward to the previous weekend day. - * - * @return static - */ - public function previousWeekendDay() - { - return $this->nextOrPreviousDay(false, false); - } - - /** - * Modify to the previous occurrence of a given modifier such as a day of - * the week. If no dayOfWeek is provided, modify to the previous occurrence - * of the current day of the week. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param string|int|null $modifier - * - * @return static|false - */ - public function previous($modifier = null) - { - if ($modifier === null) { - $modifier = $this->dayOfWeek; - } - - return $this->change( - 'last '.(\is_string($modifier) ? $modifier : static::$days[$modifier]) - ); - } - - /** - * Modify to the first occurrence of a given day of the week - * in the current month. If no dayOfWeek is provided, modify to the - * first day of the current month. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek - * - * @return static - */ - public function firstOfMonth($dayOfWeek = null) - { - $date = $this->startOfDay(); - - if ($dayOfWeek === null) { - return $date->day(1); - } - - return $date->modify('first '.static::$days[$dayOfWeek].' of '.$date->rawFormat('F').' '.$date->year); - } - - /** - * Modify to the last occurrence of a given day of the week - * in the current month. If no dayOfWeek is provided, modify to the - * last day of the current month. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek - * - * @return static - */ - public function lastOfMonth($dayOfWeek = null) - { - $date = $this->startOfDay(); - - if ($dayOfWeek === null) { - return $date->day($date->daysInMonth); - } - - return $date->modify('last '.static::$days[$dayOfWeek].' of '.$date->rawFormat('F').' '.$date->year); - } - - /** - * Modify to the given occurrence of a given day of the week - * in the current month. If the calculated occurrence is outside the scope - * of the current month, then return false and no modifications are made. - * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int $nth - * @param int $dayOfWeek - * - * @return mixed - */ - public function nthOfMonth($nth, $dayOfWeek) - { - $date = $this->avoidMutation()->firstOfMonth(); - $check = $date->rawFormat('Y-m'); - $date = $date->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - - return $date->rawFormat('Y-m') === $check ? $this->modify((string) $date) : false; - } - - /** - * Modify to the first occurrence of a given day of the week - * in the current quarter. If no dayOfWeek is provided, modify to the - * first day of the current quarter. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek day of the week default null - * - * @return static - */ - public function firstOfQuarter($dayOfWeek = null) - { - return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER - 2, 1)->firstOfMonth($dayOfWeek); - } - - /** - * Modify to the last occurrence of a given day of the week - * in the current quarter. If no dayOfWeek is provided, modify to the - * last day of the current quarter. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek day of the week default null - * - * @return static - */ - public function lastOfQuarter($dayOfWeek = null) - { - return $this->setDate($this->year, $this->quarter * static::MONTHS_PER_QUARTER, 1)->lastOfMonth($dayOfWeek); - } - - /** - * Modify to the given occurrence of a given day of the week - * in the current quarter. If the calculated occurrence is outside the scope - * of the current quarter, then return false and no modifications are made. - * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int $nth - * @param int $dayOfWeek - * - * @return mixed - */ - public function nthOfQuarter($nth, $dayOfWeek) - { - $date = $this->avoidMutation()->day(1)->month($this->quarter * static::MONTHS_PER_QUARTER); - $lastMonth = $date->month; - $year = $date->year; - $date = $date->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - - return ($lastMonth < $date->month || $year !== $date->year) ? false : $this->modify((string) $date); - } - - /** - * Modify to the first occurrence of a given day of the week - * in the current year. If no dayOfWeek is provided, modify to the - * first day of the current year. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek day of the week default null - * - * @return static - */ - public function firstOfYear($dayOfWeek = null) - { - return $this->month(1)->firstOfMonth($dayOfWeek); - } - - /** - * Modify to the last occurrence of a given day of the week - * in the current year. If no dayOfWeek is provided, modify to the - * last day of the current year. Use the supplied constants - * to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int|null $dayOfWeek day of the week default null - * - * @return static - */ - public function lastOfYear($dayOfWeek = null) - { - return $this->month(static::MONTHS_PER_YEAR)->lastOfMonth($dayOfWeek); - } - - /** - * Modify to the given occurrence of a given day of the week - * in the current year. If the calculated occurrence is outside the scope - * of the current year, then return false and no modifications are made. - * Use the supplied constants to indicate the desired dayOfWeek, ex. static::MONDAY. - * - * @param int $nth - * @param int $dayOfWeek - * - * @return mixed - */ - public function nthOfYear($nth, $dayOfWeek) - { - $date = $this->avoidMutation()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - - return $this->year === $date->year ? $this->modify((string) $date) : false; - } - - /** - * Modify the current instance to the average of a given instance (default now) and the current instance - * (second-precision). - * - * @param \Carbon\Carbon|\DateTimeInterface|null $date - * - * @return static - */ - public function average($date = null) - { - return $this->addRealMicroseconds((int) ($this->diffInRealMicroseconds($this->resolveCarbon($date), false) / 2)); - } - - /** - * Get the closest date from the instance (second-precision). - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * - * @return static - */ - public function closest($date1, $date2) - { - return $this->diffInRealMicroseconds($date1) < $this->diffInRealMicroseconds($date2) ? $date1 : $date2; - } - - /** - * Get the farthest date from the instance (second-precision). - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 - * - * @return static - */ - public function farthest($date1, $date2) - { - return $this->diffInRealMicroseconds($date1) > $this->diffInRealMicroseconds($date2) ? $date1 : $date2; - } - - /** - * Get the minimum instance between a given instance (default now) and the current instance. - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return static - */ - public function min($date = null) - { - $date = $this->resolveCarbon($date); - - return $this->lt($date) ? $this : $date; - } - - /** - * Get the minimum instance between a given instance (default now) and the current instance. - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see min() - * - * @return static - */ - public function minimum($date = null) - { - return $this->min($date); - } - - /** - * Get the maximum instance between a given instance (default now) and the current instance. - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @return static - */ - public function max($date = null) - { - $date = $this->resolveCarbon($date); - - return $this->gt($date) ? $this : $date; - } - - /** - * Get the maximum instance between a given instance (default now) and the current instance. - * - * @param \Carbon\Carbon|\DateTimeInterface|mixed $date - * - * @see max() - * - * @return static - */ - public function maximum($date = null) - { - return $this->max($date); - } - - /** - * Calls \DateTime::modify if mutable or \DateTimeImmutable::modify else. - * - * @see https://php.net/manual/en/datetime.modify.php - * - * @return static|false - */ - #[ReturnTypeWillChange] - public function modify($modify) - { - return parent::modify((string) $modify); - } - - /** - * Similar to native modify() method of DateTime but can handle more grammars. - * - * @example - * ``` - * echo Carbon::now()->change('next 2pm'); - * ``` - * - * @link https://php.net/manual/en/datetime.modify.php - * - * @param string $modifier - * - * @return static|false - */ - public function change($modifier) - { - return $this->modify(preg_replace_callback('/^(next|previous|last)\s+(\d{1,2}(h|am|pm|:\d{1,2}(:\d{1,2})?))$/i', function ($match) { - $match[2] = str_replace('h', ':00', $match[2]); - $test = $this->avoidMutation()->modify($match[2]); - $method = $match[1] === 'next' ? 'lt' : 'gt'; - $match[1] = $test->$method($this) ? $match[1].' day' : 'today'; - - return $match[1].' '.$match[2]; - }, strtr(trim($modifier), [ - ' at ' => ' ', - 'just now' => 'now', - 'after tomorrow' => 'tomorrow +1 day', - 'before yesterday' => 'yesterday -1 day', - ]))); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php b/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php deleted file mode 100644 index 561c867..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Mutability.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\Carbon; -use Carbon\CarbonImmutable; - -/** - * Trait Mutability. - * - * Utils to know if the current object is mutable or immutable and convert it. - */ -trait Mutability -{ - use Cast; - - /** - * Returns true if the current class/instance is mutable. - * - * @return bool - */ - public static function isMutable() - { - return false; - } - - /** - * Returns true if the current class/instance is immutable. - * - * @return bool - */ - public static function isImmutable() - { - return !static::isMutable(); - } - - /** - * Return a mutable copy of the instance. - * - * @return Carbon - */ - public function toMutable() - { - /** @var Carbon $date */ - $date = $this->cast(Carbon::class); - - return $date; - } - - /** - * Return a immutable copy of the instance. - * - * @return CarbonImmutable - */ - public function toImmutable() - { - /** @var CarbonImmutable $date */ - $date = $this->cast(CarbonImmutable::class); - - return $date; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php b/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php deleted file mode 100644 index c77a102..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/ObjectInitialisation.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -trait ObjectInitialisation -{ - /** - * True when parent::__construct has been called. - * - * @var string - */ - protected $constructedObjectId; -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Options.php b/vendor/nesbot/carbon/src/Carbon/Traits/Options.php deleted file mode 100644 index 48f9739..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Options.php +++ /dev/null @@ -1,471 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\CarbonInterface; -use DateTimeInterface; -use Throwable; - -/** - * Trait Options. - * - * Embed base methods to change settings of Carbon classes. - * - * Depends on the following methods: - * - * @method static shiftTimezone($timezone) Set the timezone - */ -trait Options -{ - use Localization; - - /** - * Customizable PHP_INT_SIZE override. - * - * @var int - */ - public static $PHPIntSize = PHP_INT_SIZE; - - /** - * First day of week. - * - * @var int|string - */ - protected static $weekStartsAt = CarbonInterface::MONDAY; - - /** - * Last day of week. - * - * @var int|string - */ - protected static $weekEndsAt = CarbonInterface::SUNDAY; - - /** - * Days of weekend. - * - * @var array - */ - protected static $weekendDays = [ - CarbonInterface::SATURDAY, - CarbonInterface::SUNDAY, - ]; - - /** - * Format regex patterns. - * - * @var array - */ - protected static $regexFormats = [ - 'd' => '(3[01]|[12][0-9]|0[1-9])', - 'D' => '(Sun|Mon|Tue|Wed|Thu|Fri|Sat)', - 'j' => '([123][0-9]|[1-9])', - 'l' => '([a-zA-Z]{2,})', - 'N' => '([1-7])', - 'S' => '(st|nd|rd|th)', - 'w' => '([0-6])', - 'z' => '(36[0-5]|3[0-5][0-9]|[12][0-9]{2}|[1-9]?[0-9])', - 'W' => '(5[012]|[1-4][0-9]|0?[1-9])', - 'F' => '([a-zA-Z]{2,})', - 'm' => '(1[012]|0[1-9])', - 'M' => '([a-zA-Z]{3})', - 'n' => '(1[012]|[1-9])', - 't' => '(2[89]|3[01])', - 'L' => '(0|1)', - 'o' => '([1-9][0-9]{0,4})', - 'Y' => '([1-9]?[0-9]{4})', - 'y' => '([0-9]{2})', - 'a' => '(am|pm)', - 'A' => '(AM|PM)', - 'B' => '([0-9]{3})', - 'g' => '(1[012]|[1-9])', - 'G' => '(2[0-3]|1?[0-9])', - 'h' => '(1[012]|0[1-9])', - 'H' => '(2[0-3]|[01][0-9])', - 'i' => '([0-5][0-9])', - 's' => '([0-5][0-9])', - 'u' => '([0-9]{1,6})', - 'v' => '([0-9]{1,3})', - 'e' => '([a-zA-Z]{1,5})|([a-zA-Z]*\\/[a-zA-Z]*)', - 'I' => '(0|1)', - 'O' => '([+-](1[012]|0[0-9])[0134][05])', - 'P' => '([+-](1[012]|0[0-9]):[0134][05])', - 'p' => '(Z|[+-](1[012]|0[0-9]):[0134][05])', - 'T' => '([a-zA-Z]{1,5})', - 'Z' => '(-?[1-5]?[0-9]{1,4})', - 'U' => '([0-9]*)', - - // The formats below are combinations of the above formats. - 'c' => '(([1-9]?[0-9]{4})-(1[012]|0[1-9])-(3[01]|[12][0-9]|0[1-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])[+-](1[012]|0[0-9]):([0134][05]))', // Y-m-dTH:i:sP - 'r' => '(([a-zA-Z]{3}), ([123][0-9]|0[1-9]) ([a-zA-Z]{3}) ([1-9]?[0-9]{4}) (2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9]) [+-](1[012]|0[0-9])([0134][05]))', // D, d M Y H:i:s O - ]; - - /** - * Format modifiers (such as available in createFromFormat) regex patterns. - * - * @var array - */ - protected static $regexFormatModifiers = [ - '*' => '.+', - ' ' => '[ ]', - '#' => '[;:\\/.,()-]', - '?' => '([^a]|[a])', - '!' => '', - '|' => '', - '+' => '', - ]; - - /** - * Indicates if months should be calculated with overflow. - * Global setting. - * - * @var bool - */ - protected static $monthsOverflow = true; - - /** - * Indicates if years should be calculated with overflow. - * Global setting. - * - * @var bool - */ - protected static $yearsOverflow = true; - - /** - * Indicates if the strict mode is in use. - * Global setting. - * - * @var bool - */ - protected static $strictModeEnabled = true; - - /** - * Function to call instead of format. - * - * @var string|callable|null - */ - protected static $formatFunction; - - /** - * Function to call instead of createFromFormat. - * - * @var string|callable|null - */ - protected static $createFromFormatFunction; - - /** - * Function to call instead of parse. - * - * @var string|callable|null - */ - protected static $parseFunction; - - /** - * Indicates if months should be calculated with overflow. - * Specific setting. - * - * @var bool|null - */ - protected $localMonthsOverflow; - - /** - * Indicates if years should be calculated with overflow. - * Specific setting. - * - * @var bool|null - */ - protected $localYearsOverflow; - - /** - * Indicates if the strict mode is in use. - * Specific setting. - * - * @var bool|null - */ - protected $localStrictModeEnabled; - - /** - * Options for diffForHumans and forHumans methods. - * - * @var bool|null - */ - protected $localHumanDiffOptions; - - /** - * Format to use on string cast. - * - * @var string|null - */ - protected $localToStringFormat; - - /** - * Format to use on JSON serialization. - * - * @var string|null - */ - protected $localSerializer; - - /** - * Instance-specific macros. - * - * @var array|null - */ - protected $localMacros; - - /** - * Instance-specific generic macros. - * - * @var array|null - */ - protected $localGenericMacros; - - /** - * Function to call instead of format. - * - * @var string|callable|null - */ - protected $localFormatFunction; - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * @see settings - * - * Enable the strict mode (or disable with passing false). - * - * @param bool $strictModeEnabled - */ - public static function useStrictMode($strictModeEnabled = true) - { - static::$strictModeEnabled = $strictModeEnabled; - } - - /** - * Returns true if the strict mode is globally in use, false else. - * (It can be overridden in specific instances.) - * - * @return bool - */ - public static function isStrictModeEnabled() - { - return static::$strictModeEnabled; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @see settings - * - * Indicates if months should be calculated with overflow. - * - * @param bool $monthsOverflow - * - * @return void - */ - public static function useMonthsOverflow($monthsOverflow = true) - { - static::$monthsOverflow = $monthsOverflow; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addMonthsWithOverflow/addMonthsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @see settings - * - * Reset the month overflow behavior. - * - * @return void - */ - public static function resetMonthsOverflow() - { - static::$monthsOverflow = true; - } - - /** - * Get the month overflow global behavior (can be overridden in specific instances). - * - * @return bool - */ - public static function shouldOverflowMonths() - { - return static::$monthsOverflow; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @see settings - * - * Indicates if years should be calculated with overflow. - * - * @param bool $yearsOverflow - * - * @return void - */ - public static function useYearsOverflow($yearsOverflow = true) - { - static::$yearsOverflow = $yearsOverflow; - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather use the ->settings() method. - * Or you can use method variants: addYearsWithOverflow/addYearsNoOverflow, same variants - * are available for quarters, years, decade, centuries, millennia (singular and plural forms). - * @see settings - * - * Reset the month overflow behavior. - * - * @return void - */ - public static function resetYearsOverflow() - { - static::$yearsOverflow = true; - } - - /** - * Get the month overflow global behavior (can be overridden in specific instances). - * - * @return bool - */ - public static function shouldOverflowYears() - { - return static::$yearsOverflow; - } - - /** - * Set specific options. - * - strictMode: true|false|null - * - monthOverflow: true|false|null - * - yearOverflow: true|false|null - * - humanDiffOptions: int|null - * - toStringFormat: string|Closure|null - * - toJsonFormat: string|Closure|null - * - locale: string|null - * - timezone: \DateTimeZone|string|int|null - * - macros: array|null - * - genericMacros: array|null - * - * @param array $settings - * - * @return $this|static - */ - public function settings(array $settings) - { - $this->localStrictModeEnabled = $settings['strictMode'] ?? null; - $this->localMonthsOverflow = $settings['monthOverflow'] ?? null; - $this->localYearsOverflow = $settings['yearOverflow'] ?? null; - $this->localHumanDiffOptions = $settings['humanDiffOptions'] ?? null; - $this->localToStringFormat = $settings['toStringFormat'] ?? null; - $this->localSerializer = $settings['toJsonFormat'] ?? null; - $this->localMacros = $settings['macros'] ?? null; - $this->localGenericMacros = $settings['genericMacros'] ?? null; - $this->localFormatFunction = $settings['formatFunction'] ?? null; - - if (isset($settings['locale'])) { - $locales = $settings['locale']; - - if (!\is_array($locales)) { - $locales = [$locales]; - } - - $this->locale(...$locales); - } - - if (isset($settings['innerTimezone'])) { - return $this->setTimezone($settings['innerTimezone']); - } - - if (isset($settings['timezone'])) { - return $this->shiftTimezone($settings['timezone']); - } - - return $this; - } - - /** - * Returns current local settings. - * - * @return array - */ - public function getSettings() - { - $settings = []; - $map = [ - 'localStrictModeEnabled' => 'strictMode', - 'localMonthsOverflow' => 'monthOverflow', - 'localYearsOverflow' => 'yearOverflow', - 'localHumanDiffOptions' => 'humanDiffOptions', - 'localToStringFormat' => 'toStringFormat', - 'localSerializer' => 'toJsonFormat', - 'localMacros' => 'macros', - 'localGenericMacros' => 'genericMacros', - 'locale' => 'locale', - 'tzName' => 'timezone', - 'localFormatFunction' => 'formatFunction', - ]; - - foreach ($map as $property => $key) { - $value = $this->$property ?? null; - - if ($value !== null && ($key !== 'locale' || $value !== 'en' || $this->localTranslator)) { - $settings[$key] = $value; - } - } - - return $settings; - } - - /** - * Show truthy properties on var_dump(). - * - * @return array - */ - public function __debugInfo() - { - $infos = array_filter(get_object_vars($this), static function ($var) { - return $var; - }); - - foreach (['dumpProperties', 'constructedObjectId', 'constructed'] as $property) { - if (isset($infos[$property])) { - unset($infos[$property]); - } - } - - $this->addExtraDebugInfos($infos); - - return $infos; - } - - protected function addExtraDebugInfos(&$infos): void - { - if ($this instanceof DateTimeInterface) { - try { - if (!isset($infos['date'])) { - $infos['date'] = $this->format(CarbonInterface::MOCK_DATETIME_FORMAT); - } - - if (!isset($infos['timezone'])) { - $infos['timezone'] = $this->tzName; - } - } catch (Throwable $exception) { - // noop - } - } - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php b/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php deleted file mode 100644 index 85ff5a7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php +++ /dev/null @@ -1,254 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\CarbonInterface; -use Carbon\Exceptions\UnknownUnitException; - -/** - * Trait Rounding. - * - * Round, ceil, floor units. - * - * Depends on the following methods: - * - * @method static copy() - * @method static startOfWeek(int $weekStartsAt = null) - */ -trait Rounding -{ - use IntervalRounding; - - /** - * Round the current instance at the given unit with given precision if specified and the given function. - * - * @param string $unit - * @param float|int $precision - * @param string $function - * - * @return CarbonInterface - */ - public function roundUnit($unit, $precision = 1, $function = 'round') - { - $metaUnits = [ - // @call roundUnit - 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], - // @call roundUnit - 'century' => [static::YEARS_PER_CENTURY, 'year'], - // @call roundUnit - 'decade' => [static::YEARS_PER_DECADE, 'year'], - // @call roundUnit - 'quarter' => [static::MONTHS_PER_QUARTER, 'month'], - // @call roundUnit - 'millisecond' => [1000, 'microsecond'], - ]; - $normalizedUnit = static::singularUnit($unit); - $ranges = array_merge(static::getRangesByUnit($this->daysInMonth), [ - // @call roundUnit - 'microsecond' => [0, 999999], - ]); - $factor = 1; - - if ($normalizedUnit === 'week') { - $normalizedUnit = 'day'; - $precision *= static::DAYS_PER_WEEK; - } - - if (isset($metaUnits[$normalizedUnit])) { - [$factor, $normalizedUnit] = $metaUnits[$normalizedUnit]; - } - - $precision *= $factor; - - if (!isset($ranges[$normalizedUnit])) { - throw new UnknownUnitException($unit); - } - - $found = false; - $fraction = 0; - $arguments = null; - $initialValue = null; - $factor = $this->year < 0 ? -1 : 1; - $changes = []; - $minimumInc = null; - - foreach ($ranges as $unit => [$minimum, $maximum]) { - if ($normalizedUnit === $unit) { - $arguments = [$this->$unit, $minimum]; - $initialValue = $this->$unit; - $fraction = $precision - floor($precision); - $found = true; - - continue; - } - - if ($found) { - $delta = $maximum + 1 - $minimum; - $factor /= $delta; - $fraction *= $delta; - $inc = ($this->$unit - $minimum) * $factor; - - if ($inc !== 0.0) { - $minimumInc = $minimumInc ?? ($arguments[0] / pow(2, 52)); - - // If value is still the same when adding a non-zero increment/decrement, - // it means precision got lost in the addition - if (abs($inc) < $minimumInc) { - $inc = $minimumInc * ($inc < 0 ? -1 : 1); - } - - // If greater than $precision, assume precision loss caused an overflow - if ($function !== 'floor' || abs($arguments[0] + $inc - $initialValue) >= $precision) { - $arguments[0] += $inc; - } - } - - $changes[$unit] = round( - $minimum + ($fraction ? $fraction * $function(($this->$unit - $minimum) / $fraction) : 0) - ); - - // Cannot use modulo as it lose double precision - while ($changes[$unit] >= $delta) { - $changes[$unit] -= $delta; - } - - $fraction -= floor($fraction); - } - } - - [$value, $minimum] = $arguments; - $normalizedValue = floor($function(($value - $minimum) / $precision) * $precision + $minimum); - - /** @var CarbonInterface $result */ - $result = $this; - - foreach ($changes as $unit => $value) { - $result = $result->$unit($value); - } - - return $result->$normalizedUnit($normalizedValue); - } - - /** - * Truncate the current instance at the given unit with given precision if specified. - * - * @param string $unit - * @param float|int $precision - * - * @return CarbonInterface - */ - public function floorUnit($unit, $precision = 1) - { - return $this->roundUnit($unit, $precision, 'floor'); - } - - /** - * Ceil the current instance at the given unit with given precision if specified. - * - * @param string $unit - * @param float|int $precision - * - * @return CarbonInterface - */ - public function ceilUnit($unit, $precision = 1) - { - return $this->roundUnit($unit, $precision, 'ceil'); - } - - /** - * Round the current instance second with given precision if specified. - * - * @param float|int|string|\DateInterval|null $precision - * @param string $function - * - * @return CarbonInterface - */ - public function round($precision = 1, $function = 'round') - { - return $this->roundWith($precision, $function); - } - - /** - * Round the current instance second with given precision if specified. - * - * @param float|int|string|\DateInterval|null $precision - * - * @return CarbonInterface - */ - public function floor($precision = 1) - { - return $this->round($precision, 'floor'); - } - - /** - * Ceil the current instance second with given precision if specified. - * - * @param float|int|string|\DateInterval|null $precision - * - * @return CarbonInterface - */ - public function ceil($precision = 1) - { - return $this->round($precision, 'ceil'); - } - - /** - * Round the current instance week. - * - * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week - * - * @return CarbonInterface - */ - public function roundWeek($weekStartsAt = null) - { - return $this->closest( - $this->avoidMutation()->floorWeek($weekStartsAt), - $this->avoidMutation()->ceilWeek($weekStartsAt) - ); - } - - /** - * Truncate the current instance week. - * - * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week - * - * @return CarbonInterface - */ - public function floorWeek($weekStartsAt = null) - { - return $this->startOfWeek($weekStartsAt); - } - - /** - * Ceil the current instance week. - * - * @param int $weekStartsAt optional start allow you to specify the day of week to use to start the week - * - * @return CarbonInterface - */ - public function ceilWeek($weekStartsAt = null) - { - if ($this->isMutable()) { - $startOfWeek = $this->avoidMutation()->startOfWeek($weekStartsAt); - - return $startOfWeek != $this ? - $this->startOfWeek($weekStartsAt)->addWeek() : - $this; - } - - $startOfWeek = $this->startOfWeek($weekStartsAt); - - return $startOfWeek != $this ? - $startOfWeek->addWeek() : - $this->avoidMutation(); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php b/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php deleted file mode 100644 index c1d5c5e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Serialization.php +++ /dev/null @@ -1,326 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\Exceptions\InvalidFormatException; -use ReturnTypeWillChange; -use Throwable; - -/** - * Trait Serialization. - * - * Serialization and JSON stuff. - * - * Depends on the following properties: - * - * @property int $year - * @property int $month - * @property int $daysInMonth - * @property int $quarter - * - * Depends on the following methods: - * - * @method string|static locale(string $locale = null, string ...$fallbackLocales) - * @method string toJSON() - */ -trait Serialization -{ - use ObjectInitialisation; - - /** - * The custom Carbon JSON serializer. - * - * @var callable|null - */ - protected static $serializer; - - /** - * List of key to use for dump/serialization. - * - * @var string[] - */ - protected $dumpProperties = ['date', 'timezone_type', 'timezone']; - - /** - * Locale to dump comes here before serialization. - * - * @var string|null - */ - protected $dumpLocale; - - /** - * Embed date properties to dump in a dedicated variables so it won't overlap native - * DateTime ones. - * - * @var array|null - */ - protected $dumpDateProperties; - - /** - * Return a serialized string of the instance. - * - * @return string - */ - public function serialize() - { - return serialize($this); - } - - /** - * Create an instance from a serialized string. - * - * @param string $value - * - * @throws InvalidFormatException - * - * @return static - */ - public static function fromSerialized($value) - { - $instance = @unserialize((string) $value); - - if (!$instance instanceof static) { - throw new InvalidFormatException("Invalid serialized value: $value"); - } - - return $instance; - } - - /** - * The __set_state handler. - * - * @param string|array $dump - * - * @return static - */ - #[ReturnTypeWillChange] - public static function __set_state($dump) - { - if (\is_string($dump)) { - return static::parse($dump); - } - - /** @var \DateTimeInterface $date */ - $date = get_parent_class(static::class) && method_exists(parent::class, '__set_state') - ? parent::__set_state((array) $dump) - : (object) $dump; - - return static::instance($date); - } - - /** - * Returns the list of properties to dump on serialize() called on. - * - * Only used by PHP < 7.4. - * - * @return array - */ - public function __sleep() - { - $properties = $this->getSleepProperties(); - - if ($this->localTranslator ?? null) { - $properties[] = 'dumpLocale'; - $this->dumpLocale = $this->locale ?? null; - } - - return $properties; - } - - /** - * Returns the values to dump on serialize() called on. - * - * Only used by PHP >= 7.4. - * - * @return array - */ - public function __serialize(): array - { - // @codeCoverageIgnoreStart - if (isset($this->timezone_type, $this->timezone, $this->date)) { - return [ - 'date' => $this->date ?? null, - 'timezone_type' => $this->timezone_type, - 'timezone' => $this->timezone ?? null, - ]; - } - // @codeCoverageIgnoreEnd - - $timezone = $this->getTimezone(); - $export = [ - 'date' => $this->format('Y-m-d H:i:s.u'), - 'timezone_type' => $timezone->getType(), - 'timezone' => $timezone->getName(), - ]; - - // @codeCoverageIgnoreStart - if (\extension_loaded('msgpack') && isset($this->constructedObjectId)) { - $export['dumpDateProperties'] = [ - 'date' => $this->format('Y-m-d H:i:s.u'), - 'timezone' => serialize($this->timezone ?? null), - ]; - } - // @codeCoverageIgnoreEnd - - if ($this->localTranslator ?? null) { - $export['dumpLocale'] = $this->locale ?? null; - } - - return $export; - } - - /** - * Set locale if specified on unserialize() called. - * - * Only used by PHP < 7.4. - * - * @return void - */ - #[ReturnTypeWillChange] - public function __wakeup() - { - if (parent::class && method_exists(parent::class, '__wakeup')) { - // @codeCoverageIgnoreStart - try { - parent::__wakeup(); - } catch (Throwable $exception) { - try { - // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. - ['date' => $date, 'timezone' => $timezone] = $this->dumpDateProperties; - parent::__construct($date, unserialize($timezone)); - } catch (Throwable $ignoredException) { - throw $exception; - } - } - // @codeCoverageIgnoreEnd - } - - $this->constructedObjectId = spl_object_hash($this); - - if (isset($this->dumpLocale)) { - $this->locale($this->dumpLocale); - $this->dumpLocale = null; - } - - $this->cleanupDumpProperties(); - } - - /** - * Set locale if specified on unserialize() called. - * - * Only used by PHP >= 7.4. - * - * @return void - */ - public function __unserialize(array $data): void - { - // @codeCoverageIgnoreStart - try { - $this->__construct($data['date'] ?? null, $data['timezone'] ?? null); - } catch (Throwable $exception) { - if (!isset($data['dumpDateProperties']['date'], $data['dumpDateProperties']['timezone'])) { - throw $exception; - } - - try { - // FatalError occurs when calling msgpack_unpack() in PHP 7.4 or later. - ['date' => $date, 'timezone' => $timezone] = $data['dumpDateProperties']; - $this->__construct($date, unserialize($timezone)); - } catch (Throwable $ignoredException) { - throw $exception; - } - } - // @codeCoverageIgnoreEnd - - if (isset($data['dumpLocale'])) { - $this->locale($data['dumpLocale']); - } - } - - /** - * Prepare the object for JSON serialization. - * - * @return array|string - */ - #[ReturnTypeWillChange] - public function jsonSerialize() - { - $serializer = $this->localSerializer ?? static::$serializer; - - if ($serializer) { - return \is_string($serializer) - ? $this->rawFormat($serializer) - : $serializer($this); - } - - return $this->toJSON(); - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather transform Carbon object before the serialization. - * - * JSON serialize all Carbon instances using the given callback. - * - * @param callable $callback - * - * @return void - */ - public static function serializeUsing($callback) - { - static::$serializer = $callback; - } - - /** - * Cleanup properties attached to the public scope of DateTime when a dump of the date is requested. - * foreach ($date as $_) {} - * serializer($date) - * var_export($date) - * get_object_vars($date) - */ - public function cleanupDumpProperties() - { - // @codeCoverageIgnoreStart - if (PHP_VERSION < 8.2) { - foreach ($this->dumpProperties as $property) { - if (isset($this->$property)) { - unset($this->$property); - } - } - } - // @codeCoverageIgnoreEnd - - return $this; - } - - private function getSleepProperties(): array - { - $properties = $this->dumpProperties; - - // @codeCoverageIgnoreStart - if (!\extension_loaded('msgpack')) { - return $properties; - } - - if (isset($this->constructedObjectId)) { - $this->dumpDateProperties = [ - 'date' => $this->format('Y-m-d H:i:s.u'), - 'timezone' => serialize($this->timezone ?? null), - ]; - - $properties[] = 'dumpDateProperties'; - } - - return $properties; - // @codeCoverageIgnoreEnd - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Test.php b/vendor/nesbot/carbon/src/Carbon/Traits/Test.php deleted file mode 100644 index f23c72e..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Test.php +++ /dev/null @@ -1,228 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\CarbonInterface; -use Carbon\CarbonTimeZone; -use Closure; -use DateTimeImmutable; -use DateTimeInterface; -use InvalidArgumentException; -use Throwable; - -trait Test -{ - /////////////////////////////////////////////////////////////////// - ///////////////////////// TESTING AIDS //////////////////////////// - /////////////////////////////////////////////////////////////////// - - /** - * A test Carbon instance to be returned when now instances are created. - * - * @var Closure|static|null - */ - protected static $testNow; - - /** - * The timezone to resto to when clearing the time mock. - * - * @var string|null - */ - protected static $testDefaultTimezone; - - /** - * Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * - * Note the timezone parameter was left out of the examples above and - * has no affect as the mock value will be returned regardless of its value. - * - * Only the moment is mocked with setTestNow(), the timezone will still be the one passed - * as parameter of date_default_timezone_get() as a fallback (see setTestNowAndTimezone()). - * - * To clear the test instance call this method using the default - * parameter of null. - * - * /!\ Use this method for unit tests only. - * - * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance - */ - public static function setTestNow($testNow = null) - { - static::$testNow = $testNow instanceof self || $testNow instanceof Closure - ? $testNow - : static::make($testNow); - } - - /** - * Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() - * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) - * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') - * - When a string containing the desired time is passed to Carbon::parse(). - * - * It will also align default timezone (e.g. call date_default_timezone_set()) with - * the second argument or if null, with the timezone of the given date object. - * - * To clear the test instance call this method using the default - * parameter of null. - * - * /!\ Use this method for unit tests only. - * - * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance - */ - public static function setTestNowAndTimezone($testNow = null, $tz = null) - { - if ($testNow) { - self::$testDefaultTimezone = self::$testDefaultTimezone ?? date_default_timezone_get(); - } - - $useDateInstanceTimezone = $testNow instanceof DateTimeInterface; - - if ($useDateInstanceTimezone) { - self::setDefaultTimezone($testNow->getTimezone()->getName(), $testNow); - } - - static::setTestNow($testNow); - - if (!$useDateInstanceTimezone) { - $now = static::getMockedTestNow(\func_num_args() === 1 ? null : $tz); - $tzName = $now ? $now->tzName : null; - self::setDefaultTimezone($tzName ?? self::$testDefaultTimezone ?? 'UTC', $now); - } - - if (!$testNow) { - self::$testDefaultTimezone = null; - } - } - - /** - * Temporarily sets a static date to be used within the callback. - * Using setTestNow to set the date, executing the callback, then - * clearing the test instance. - * - * /!\ Use this method for unit tests only. - * - * @template T - * - * @param DateTimeInterface|Closure|static|string|false|null $testNow real or mock Carbon instance - * @param Closure(): T $callback - * - * @return T - */ - public static function withTestNow($testNow, $callback) - { - static::setTestNow($testNow); - - try { - $result = $callback(); - } finally { - static::setTestNow(); - } - - return $result; - } - - /** - * Get the Carbon instance (real or mock) to be returned when a "now" - * instance is created. - * - * @return Closure|static the current instance used for testing - */ - public static function getTestNow() - { - return static::$testNow; - } - - /** - * Determine if there is a valid test instance set. A valid test instance - * is anything that is not null. - * - * @return bool true if there is a test instance, otherwise false - */ - public static function hasTestNow() - { - return static::getTestNow() !== null; - } - - /** - * Get the mocked date passed in setTestNow() and if it's a Closure, execute it. - * - * @param string|\DateTimeZone $tz - * - * @return \Carbon\CarbonImmutable|\Carbon\Carbon|null - */ - protected static function getMockedTestNow($tz) - { - $testNow = static::getTestNow(); - - if ($testNow instanceof Closure) { - $realNow = new DateTimeImmutable('now'); - $testNow = $testNow(static::parse( - $realNow->format('Y-m-d H:i:s.u'), - $tz ?: $realNow->getTimezone() - )); - } - /* @var \Carbon\CarbonImmutable|\Carbon\Carbon|null $testNow */ - - return $testNow instanceof CarbonInterface - ? $testNow->avoidMutation()->tz($tz) - : $testNow; - } - - protected static function mockConstructorParameters(&$time, $tz) - { - /** @var \Carbon\CarbonImmutable|\Carbon\Carbon $testInstance */ - $testInstance = clone static::getMockedTestNow($tz); - - if (static::hasRelativeKeywords($time)) { - $testInstance = $testInstance->modify($time); - } - - $time = $testInstance instanceof self - ? $testInstance->rawFormat(static::MOCK_DATETIME_FORMAT) - : $testInstance->format(static::MOCK_DATETIME_FORMAT); - } - - private static function setDefaultTimezone($timezone, DateTimeInterface $date = null) - { - $previous = null; - $success = false; - - try { - $success = date_default_timezone_set($timezone); - } catch (Throwable $exception) { - $previous = $exception; - } - - if (!$success) { - $suggestion = @CarbonTimeZone::create($timezone)->toRegionName($date); - - throw new InvalidArgumentException( - "Timezone ID '$timezone' is invalid". - ($suggestion && $suggestion !== $timezone ? ", did you mean '$suggestion'?" : '.')."\n". - "It must be one of the IDs from DateTimeZone::listIdentifiers(),\n". - 'For the record, hours/minutes offset are relevant only for a particular moment, '. - 'but not as a default timezone.', - 0, - $previous - ); - } - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php b/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php deleted file mode 100644 index 88a465c..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Timestamp.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -/** - * Trait Timestamp. - */ -trait Timestamp -{ - /** - * Create a Carbon instance from a timestamp and set the timezone (use default one if not specified). - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $timestamp - * @param \DateTimeZone|string|null $tz - * - * @return static - */ - public static function createFromTimestamp($timestamp, $tz = null) - { - return static::createFromTimestampUTC($timestamp)->setTimezone($tz); - } - - /** - * Create a Carbon instance from an timestamp keeping the timezone to UTC. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $timestamp - * - * @return static - */ - public static function createFromTimestampUTC($timestamp) - { - [$integer, $decimal] = self::getIntegerAndDecimalParts($timestamp); - $delta = floor($decimal / static::MICROSECONDS_PER_SECOND); - $integer += $delta; - $decimal -= $delta * static::MICROSECONDS_PER_SECOND; - $decimal = str_pad((string) $decimal, 6, '0', STR_PAD_LEFT); - - return static::rawCreateFromFormat('U u', "$integer $decimal"); - } - - /** - * Create a Carbon instance from a timestamp in milliseconds. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $timestamp - * - * @return static - */ - public static function createFromTimestampMsUTC($timestamp) - { - [$milliseconds, $microseconds] = self::getIntegerAndDecimalParts($timestamp, 3); - $sign = $milliseconds < 0 || ($milliseconds === 0.0 && $microseconds < 0) ? -1 : 1; - $milliseconds = abs($milliseconds); - $microseconds = $sign * abs($microseconds) + static::MICROSECONDS_PER_MILLISECOND * ($milliseconds % static::MILLISECONDS_PER_SECOND); - $seconds = $sign * floor($milliseconds / static::MILLISECONDS_PER_SECOND); - $delta = floor($microseconds / static::MICROSECONDS_PER_SECOND); - $seconds += $delta; - $microseconds -= $delta * static::MICROSECONDS_PER_SECOND; - $microseconds = str_pad($microseconds, 6, '0', STR_PAD_LEFT); - - return static::rawCreateFromFormat('U u', "$seconds $microseconds"); - } - - /** - * Create a Carbon instance from a timestamp in milliseconds. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $timestamp - * @param \DateTimeZone|string|null $tz - * - * @return static - */ - public static function createFromTimestampMs($timestamp, $tz = null) - { - return static::createFromTimestampMsUTC($timestamp) - ->setTimezone($tz); - } - - /** - * Set the instance's timestamp. - * - * Timestamp input can be given as int, float or a string containing one or more numbers. - * - * @param float|int|string $unixTimestamp - * - * @return static - */ - public function timestamp($unixTimestamp) - { - return $this->setTimestamp($unixTimestamp); - } - - /** - * Returns a timestamp rounded with the given precision (6 by default). - * - * @example getPreciseTimestamp() 1532087464437474 (microsecond maximum precision) - * @example getPreciseTimestamp(6) 1532087464437474 - * @example getPreciseTimestamp(5) 153208746443747 (1/100000 second precision) - * @example getPreciseTimestamp(4) 15320874644375 (1/10000 second precision) - * @example getPreciseTimestamp(3) 1532087464437 (millisecond precision) - * @example getPreciseTimestamp(2) 153208746444 (1/100 second precision) - * @example getPreciseTimestamp(1) 15320874644 (1/10 second precision) - * @example getPreciseTimestamp(0) 1532087464 (second precision) - * @example getPreciseTimestamp(-1) 153208746 (10 second precision) - * @example getPreciseTimestamp(-2) 15320875 (100 second precision) - * - * @param int $precision - * - * @return float - */ - public function getPreciseTimestamp($precision = 6) - { - return round(((float) $this->rawFormat('Uu')) / pow(10, 6 - $precision)); - } - - /** - * Returns the milliseconds timestamps used amongst other by Date javascript objects. - * - * @return float - */ - public function valueOf() - { - return $this->getPreciseTimestamp(3); - } - - /** - * Returns the timestamp with millisecond precision. - * - * @return int - */ - public function getTimestampMs() - { - return (int) $this->getPreciseTimestamp(3); - } - - /** - * @alias getTimestamp - * - * Returns the UNIX timestamp for the current date. - * - * @return int - */ - public function unix() - { - return $this->getTimestamp(); - } - - /** - * Return an array with integer part digits and decimals digits split from one or more positive numbers - * (such as timestamps) as string with the given number of decimals (6 by default). - * - * By splitting integer and decimal, this method obtain a better precision than - * number_format when the input is a string. - * - * @param float|int|string $numbers one or more numbers - * @param int $decimals number of decimals precision (6 by default) - * - * @return array 0-index is integer part, 1-index is decimal part digits - */ - private static function getIntegerAndDecimalParts($numbers, $decimals = 6) - { - if (\is_int($numbers) || \is_float($numbers)) { - $numbers = number_format($numbers, $decimals, '.', ''); - } - - $sign = str_starts_with($numbers, '-') ? -1 : 1; - $integer = 0; - $decimal = 0; - - foreach (preg_split('`[^\d.]+`', $numbers) as $chunk) { - [$integerPart, $decimalPart] = explode('.', "$chunk."); - - $integer += (int) $integerPart; - $decimal += (float) ("0.$decimalPart"); - } - - $overflow = floor($decimal); - $integer += $overflow; - $decimal -= $overflow; - - return [$sign * $integer, $decimal === 0.0 ? 0.0 : $sign * round($decimal * pow(10, $decimals))]; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/ToStringFormat.php b/vendor/nesbot/carbon/src/Carbon/Traits/ToStringFormat.php deleted file mode 100644 index a81164f..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/ToStringFormat.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Closure; - -/** - * Trait ToStringFormat. - * - * Handle global format customization for string cast of the object. - */ -trait ToStringFormat -{ - /** - * Format to use for __toString method when type juggling occurs. - * - * @var string|Closure|null - */ - protected static $toStringFormat; - - /** - * Reset the format used to the default when type juggling a Carbon instance to a string - * - * @return void - */ - public static function resetToStringFormat() - { - static::setToStringFormat(null); - } - - /** - * @deprecated To avoid conflict between different third-party libraries, static setters should not be used. - * You should rather let Carbon object being cast to string with DEFAULT_TO_STRING_FORMAT, and - * use other method or custom format passed to format() method if you need to dump another string - * format. - * - * Set the default format used when type juggling a Carbon instance to a string. - * - * @param string|Closure|null $format - * - * @return void - */ - public static function setToStringFormat($format) - { - static::$toStringFormat = $format; - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Units.php b/vendor/nesbot/carbon/src/Carbon/Traits/Units.php deleted file mode 100644 index 5be14ec..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Units.php +++ /dev/null @@ -1,412 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -use Carbon\CarbonConverterInterface; -use Carbon\CarbonInterface; -use Carbon\CarbonInterval; -use Carbon\Exceptions\UnitException; -use Closure; -use DateInterval; -use DateMalformedStringException; -use ReturnTypeWillChange; - -/** - * Trait Units. - * - * Add, subtract and set units. - */ -trait Units -{ - /** - * Add seconds to the instance using timestamp. Positive $value travels - * forward while negative $value travels into the past. - * - * @param string $unit - * @param int $value - * - * @return static - */ - public function addRealUnit($unit, $value = 1) - { - switch ($unit) { - // @call addRealUnit - case 'micro': - - // @call addRealUnit - case 'microsecond': - /* @var CarbonInterface $this */ - $diff = $this->microsecond + $value; - $time = $this->getTimestamp(); - $seconds = (int) floor($diff / static::MICROSECONDS_PER_SECOND); - $time += $seconds; - $diff -= $seconds * static::MICROSECONDS_PER_SECOND; - $microtime = str_pad((string) $diff, 6, '0', STR_PAD_LEFT); - $tz = $this->tz; - - return $this->tz('UTC')->modify("@$time.$microtime")->tz($tz); - - // @call addRealUnit - case 'milli': - // @call addRealUnit - case 'millisecond': - return $this->addRealUnit('microsecond', $value * static::MICROSECONDS_PER_MILLISECOND); - - // @call addRealUnit - case 'second': - break; - - // @call addRealUnit - case 'minute': - $value *= static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'hour': - $value *= static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'day': - $value *= static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'week': - $value *= static::DAYS_PER_WEEK * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'month': - $value *= 30 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'quarter': - $value *= static::MONTHS_PER_QUARTER * 30 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'year': - $value *= 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'decade': - $value *= static::YEARS_PER_DECADE * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'century': - $value *= static::YEARS_PER_CENTURY * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - // @call addRealUnit - case 'millennium': - $value *= static::YEARS_PER_MILLENNIUM * 365 * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE; - - break; - - default: - if ($this->localStrictModeEnabled ?? static::isStrictModeEnabled()) { - throw new UnitException("Invalid unit for real timestamp add/sub: '$unit'"); - } - - return $this; - } - - /* @var CarbonInterface $this */ - return $this->setTimestamp((int) ($this->getTimestamp() + $value)); - } - - public function subRealUnit($unit, $value = 1) - { - return $this->addRealUnit($unit, -$value); - } - - /** - * Returns true if a property can be changed via setter. - * - * @param string $unit - * - * @return bool - */ - public static function isModifiableUnit($unit) - { - static $modifiableUnits = [ - // @call addUnit - 'millennium', - // @call addUnit - 'century', - // @call addUnit - 'decade', - // @call addUnit - 'quarter', - // @call addUnit - 'week', - // @call addUnit - 'weekday', - ]; - - return \in_array($unit, $modifiableUnits, true) || \in_array($unit, static::$units, true); - } - - /** - * Call native PHP DateTime/DateTimeImmutable add() method. - * - * @param DateInterval $interval - * - * @return static - */ - public function rawAdd(DateInterval $interval) - { - return parent::add($interval); - } - - /** - * Add given units or interval to the current instance. - * - * @example $date->add('hour', 3) - * @example $date->add(15, 'days') - * @example $date->add(CarbonInterval::days(4)) - * - * @param string|DateInterval|Closure|CarbonConverterInterface $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - #[ReturnTypeWillChange] - public function add($unit, $value = 1, $overflow = null) - { - if (\is_string($unit) && \func_num_args() === 1) { - $unit = CarbonInterval::make($unit, [], true); - } - - if ($unit instanceof CarbonConverterInterface) { - return $this->resolveCarbon($unit->convertDate($this, false)); - } - - if ($unit instanceof Closure) { - return $this->resolveCarbon($unit($this, false)); - } - - if ($unit instanceof DateInterval) { - return parent::add($unit); - } - - if (is_numeric($unit)) { - [$value, $unit] = [$unit, $value]; - } - - return $this->addUnit($unit, $value, $overflow); - } - - /** - * Add given units to the current instance. - * - * @param string $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - public function addUnit($unit, $value = 1, $overflow = null) - { - $originalArgs = \func_get_args(); - - $date = $this; - - if (!is_numeric($value) || !(float) $value) { - return $date->isMutable() ? $date : $date->avoidMutation(); - } - - $unit = self::singularUnit($unit); - $metaUnits = [ - 'millennium' => [static::YEARS_PER_MILLENNIUM, 'year'], - 'century' => [static::YEARS_PER_CENTURY, 'year'], - 'decade' => [static::YEARS_PER_DECADE, 'year'], - 'quarter' => [static::MONTHS_PER_QUARTER, 'month'], - ]; - - if (isset($metaUnits[$unit])) { - [$factor, $unit] = $metaUnits[$unit]; - $value *= $factor; - } - - if ($unit === 'weekday') { - $weekendDays = static::getWeekendDays(); - - if ($weekendDays !== [static::SATURDAY, static::SUNDAY]) { - $absoluteValue = abs($value); - $sign = $value / max(1, $absoluteValue); - $weekDaysCount = 7 - min(6, \count(array_unique($weekendDays))); - $weeks = floor($absoluteValue / $weekDaysCount); - - for ($diff = $absoluteValue % $weekDaysCount; $diff; $diff--) { - /** @var static $date */ - $date = $date->addDays($sign); - - while (\in_array($date->dayOfWeek, $weekendDays, true)) { - $date = $date->addDays($sign); - } - } - - $value = $weeks * $sign; - $unit = 'week'; - } - - $timeString = $date->toTimeString(); - } elseif ($canOverflow = (\in_array($unit, [ - 'month', - 'year', - ]) && ($overflow === false || ( - $overflow === null && - ($ucUnit = ucfirst($unit).'s') && - !($this->{'local'.$ucUnit.'Overflow'} ?? static::{'shouldOverflow'.$ucUnit}()) - )))) { - $day = $date->day; - } - - $value = (int) $value; - - if ($unit === 'milli' || $unit === 'millisecond') { - $unit = 'microsecond'; - $value *= static::MICROSECONDS_PER_MILLISECOND; - } - - // Work-around for bug https://bugs.php.net/bug.php?id=75642 - if ($unit === 'micro' || $unit === 'microsecond') { - $microseconds = $this->micro + $value; - $second = (int) floor($microseconds / static::MICROSECONDS_PER_SECOND); - $microseconds %= static::MICROSECONDS_PER_SECOND; - if ($microseconds < 0) { - $microseconds += static::MICROSECONDS_PER_SECOND; - } - $date = $date->microseconds($microseconds); - $unit = 'second'; - $value = $second; - } - - try { - $date = $date->modify("$value $unit"); - - if (isset($timeString)) { - $date = $date->setTimeFromTimeString($timeString); - } elseif (isset($canOverflow, $day) && $canOverflow && $day !== $date->day) { - $date = $date->modify('last day of previous month'); - } - } catch (DateMalformedStringException $ignoredException) { // @codeCoverageIgnore - $date = null; // @codeCoverageIgnore - } - - if (!$date) { - throw new UnitException('Unable to add unit '.var_export($originalArgs, true)); - } - - return $date; - } - - /** - * Subtract given units to the current instance. - * - * @param string $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - public function subUnit($unit, $value = 1, $overflow = null) - { - return $this->addUnit($unit, -$value, $overflow); - } - - /** - * Call native PHP DateTime/DateTimeImmutable sub() method. - * - * @param DateInterval $interval - * - * @return static - */ - public function rawSub(DateInterval $interval) - { - return parent::sub($interval); - } - - /** - * Subtract given units or interval to the current instance. - * - * @example $date->sub('hour', 3) - * @example $date->sub(15, 'days') - * @example $date->sub(CarbonInterval::days(4)) - * - * @param string|DateInterval|Closure|CarbonConverterInterface $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - #[ReturnTypeWillChange] - public function sub($unit, $value = 1, $overflow = null) - { - if (\is_string($unit) && \func_num_args() === 1) { - $unit = CarbonInterval::make($unit, [], true); - } - - if ($unit instanceof CarbonConverterInterface) { - return $this->resolveCarbon($unit->convertDate($this, true)); - } - - if ($unit instanceof Closure) { - return $this->resolveCarbon($unit($this, true)); - } - - if ($unit instanceof DateInterval) { - return parent::sub($unit); - } - - if (is_numeric($unit)) { - [$value, $unit] = [$unit, $value]; - } - - return $this->addUnit($unit, -(float) $value, $overflow); - } - - /** - * Subtract given units or interval to the current instance. - * - * @see sub() - * - * @param string|DateInterval $unit - * @param int $value - * @param bool|null $overflow - * - * @return static - */ - public function subtract($unit, $value = 1, $overflow = null) - { - if (\is_string($unit) && \func_num_args() === 1) { - $unit = CarbonInterval::make($unit, [], true); - } - - return $this->sub($unit, $value, $overflow); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Traits/Week.php b/vendor/nesbot/carbon/src/Carbon/Traits/Week.php deleted file mode 100644 index 6f14814..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Traits/Week.php +++ /dev/null @@ -1,219 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon\Traits; - -/** - * Trait Week. - * - * week and ISO week number, year and count in year. - * - * Depends on the following properties: - * - * @property int $daysInYear - * @property int $dayOfWeek - * @property int $dayOfYear - * @property int $year - * - * Depends on the following methods: - * - * @method static addWeeks(int $weeks = 1) - * @method static copy() - * @method static dayOfYear(int $dayOfYear) - * @method string getTranslationMessage(string $key, ?string $locale = null, ?string $default = null, $translator = null) - * @method static next(int|string $day = null) - * @method static startOfWeek(int $day = 1) - * @method static subWeeks(int $weeks = 1) - * @method static year(int $year = null) - */ -trait Week -{ - /** - * Set/get the week number of year using given first day of week and first - * day of year included in the first week. Or use ISO format if no settings - * given. - * - * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. - * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) - * @param int|null $dayOfYear first day of year included in the week #1 - * - * @return int|static - */ - public function isoWeekYear($year = null, $dayOfWeek = null, $dayOfYear = null) - { - return $this->weekYear( - $year, - $dayOfWeek ?? 1, - $dayOfYear ?? 4 - ); - } - - /** - * Set/get the week number of year using given first day of week and first - * day of year included in the first week. Or use US format if no settings - * given (Sunday / Jan 6). - * - * @param int|null $year if null, act as a getter, if not null, set the year and return current instance. - * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) - * @param int|null $dayOfYear first day of year included in the week #1 - * - * @return int|static - */ - public function weekYear($year = null, $dayOfWeek = null, $dayOfYear = null) - { - $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; - $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; - - if ($year !== null) { - $year = (int) round($year); - - if ($this->weekYear(null, $dayOfWeek, $dayOfYear) === $year) { - return $this->avoidMutation(); - } - - $week = $this->week(null, $dayOfWeek, $dayOfYear); - $day = $this->dayOfWeek; - $date = $this->year($year); - switch ($date->weekYear(null, $dayOfWeek, $dayOfYear) - $year) { - case 1: - $date = $date->subWeeks(26); - - break; - case -1: - $date = $date->addWeeks(26); - - break; - } - - $date = $date->addWeeks($week - $date->week(null, $dayOfWeek, $dayOfYear))->startOfWeek($dayOfWeek); - - if ($date->dayOfWeek === $day) { - return $date; - } - - return $date->next($day); - } - - $year = $this->year; - $day = $this->dayOfYear; - $date = $this->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); - - if ($date->year === $year && $day < $date->dayOfYear) { - return $year - 1; - } - - $date = $this->avoidMutation()->addYear()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); - - if ($date->year === $year && $day >= $date->dayOfYear) { - return $year + 1; - } - - return $year; - } - - /** - * Get the number of weeks of the current week-year using given first day of week and first - * day of year included in the first week. Or use ISO format if no settings - * given. - * - * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) - * @param int|null $dayOfYear first day of year included in the week #1 - * - * @return int - */ - public function isoWeeksInYear($dayOfWeek = null, $dayOfYear = null) - { - return $this->weeksInYear( - $dayOfWeek ?? 1, - $dayOfYear ?? 4 - ); - } - - /** - * Get the number of weeks of the current week-year using given first day of week and first - * day of year included in the first week. Or use US format if no settings - * given (Sunday / Jan 6). - * - * @param int|null $dayOfWeek first date of week from 0 (Sunday) to 6 (Saturday) - * @param int|null $dayOfYear first day of year included in the week #1 - * - * @return int - */ - public function weeksInYear($dayOfWeek = null, $dayOfYear = null) - { - $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; - $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; - $year = $this->year; - $start = $this->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); - $startDay = $start->dayOfYear; - if ($start->year !== $year) { - $startDay -= $start->daysInYear; - } - $end = $this->avoidMutation()->addYear()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); - $endDay = $end->dayOfYear; - if ($end->year !== $year) { - $endDay += $this->daysInYear; - } - - return (int) round(($endDay - $startDay) / 7); - } - - /** - * Get/set the week number using given first day of week and first - * day of year included in the first week. Or use US format if no settings - * given (Sunday / Jan 6). - * - * @param int|null $week - * @param int|null $dayOfWeek - * @param int|null $dayOfYear - * - * @return int|static - */ - public function week($week = null, $dayOfWeek = null, $dayOfYear = null) - { - $date = $this; - $dayOfWeek = $dayOfWeek ?? $this->getTranslationMessage('first_day_of_week') ?? 0; - $dayOfYear = $dayOfYear ?? $this->getTranslationMessage('day_of_first_week_of_year') ?? 1; - - if ($week !== null) { - return $date->addWeeks(round($week) - $this->week(null, $dayOfWeek, $dayOfYear)); - } - - $start = $date->avoidMutation()->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); - $end = $date->avoidMutation()->startOfWeek($dayOfWeek); - if ($start > $end) { - $start = $start->subWeeks(26)->dayOfYear($dayOfYear)->startOfWeek($dayOfWeek); - } - $week = (int) ($start->diffInDays($end) / 7 + 1); - - return $week > $end->weeksInYear($dayOfWeek, $dayOfYear) ? 1 : $week; - } - - /** - * Get/set the week number using given first day of week and first - * day of year included in the first week. Or use ISO format if no settings - * given. - * - * @param int|null $week - * @param int|null $dayOfWeek - * @param int|null $dayOfYear - * - * @return int|static - */ - public function isoWeek($week = null, $dayOfWeek = null, $dayOfYear = null) - { - return $this->week( - $week, - $dayOfWeek ?? 1, - $dayOfYear ?? 4 - ); - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/Translator.php b/vendor/nesbot/carbon/src/Carbon/Translator.php deleted file mode 100644 index 491c9e7..0000000 --- a/vendor/nesbot/carbon/src/Carbon/Translator.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use ReflectionMethod; -use Symfony\Component\Translation; -use Symfony\Contracts\Translation\TranslatorInterface; - -$transMethod = new ReflectionMethod( - class_exists(TranslatorInterface::class) - ? TranslatorInterface::class - : Translation\Translator::class, - 'trans' -); - -require $transMethod->hasReturnType() - ? __DIR__.'/../../lazy/Carbon/TranslatorStrongType.php' - : __DIR__.'/../../lazy/Carbon/TranslatorWeakType.php'; - -class Translator extends LazyTranslator -{ - // Proxy dynamically loaded LazyTranslator in a static way -} diff --git a/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php b/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php deleted file mode 100644 index ce6b2f9..0000000 --- a/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Carbon\Exceptions\ImmutableException; -use Symfony\Component\Config\ConfigCacheFactoryInterface; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; - -class TranslatorImmutable extends Translator -{ - /** @var bool */ - private $constructed = false; - - public function __construct($locale, MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false) - { - parent::__construct($locale, $formatter, $cacheDir, $debug); - $this->constructed = true; - } - - /** - * @codeCoverageIgnore - */ - public function setDirectories(array $directories) - { - $this->disallowMutation(__METHOD__); - - return parent::setDirectories($directories); - } - - public function setLocale($locale) - { - $this->disallowMutation(__METHOD__); - - return parent::setLocale($locale); - } - - /** - * @codeCoverageIgnore - */ - public function setMessages($locale, $messages) - { - $this->disallowMutation(__METHOD__); - - return parent::setMessages($locale, $messages); - } - - /** - * @codeCoverageIgnore - */ - public function setTranslations($messages) - { - $this->disallowMutation(__METHOD__); - - return parent::setTranslations($messages); - } - - /** - * @codeCoverageIgnore - */ - public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory): void - { - $this->disallowMutation(__METHOD__); - - parent::setConfigCacheFactory($configCacheFactory); - } - - public function resetMessages($locale = null) - { - $this->disallowMutation(__METHOD__); - - return parent::resetMessages($locale); - } - - /** - * @codeCoverageIgnore - */ - public function setFallbackLocales(array $locales) - { - $this->disallowMutation(__METHOD__); - - parent::setFallbackLocales($locales); - } - - private function disallowMutation($method) - { - if ($this->constructed) { - throw new ImmutableException($method.' not allowed on '.static::class); - } - } -} diff --git a/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php b/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php deleted file mode 100644 index ef4dee8..0000000 --- a/vendor/nesbot/carbon/src/Carbon/TranslatorStrongTypeInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Carbon; - -use Symfony\Component\Translation\MessageCatalogueInterface; - -/** - * Mark translator using strong type from symfony/translation >= 6. - */ -interface TranslatorStrongTypeInterface -{ - public function getFromCatalogue(MessageCatalogueInterface $catalogue, string $id, string $domain = 'messages'); -} diff --git a/vendor/overtrue/socialite/.github/FUNDING.yml b/vendor/overtrue/socialite/.github/FUNDING.yml deleted file mode 100644 index a3be7fa..0000000 --- a/vendor/overtrue/socialite/.github/FUNDING.yml +++ /dev/null @@ -1,9 +0,0 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: overtrue -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -custom: # Replace with a single custom sponsorship URL diff --git a/vendor/overtrue/socialite/.gitignore b/vendor/overtrue/socialite/.gitignore deleted file mode 100644 index d6eb268..0000000 --- a/vendor/overtrue/socialite/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/vendor -composer.phar -composer.lock -.DS_Store -/.idea -Thumbs.db -/*.php -sftp-config.json -.php_cs.cache \ No newline at end of file diff --git a/vendor/overtrue/socialite/.php_cs b/vendor/overtrue/socialite/.php_cs deleted file mode 100644 index bda3644..0000000 --- a/vendor/overtrue/socialite/.php_cs +++ /dev/null @@ -1,28 +0,0 @@ - - -This source file is subject to the MIT license that is bundled -with this source code in the file LICENSE. -EOF; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules(array( - '@Symfony' => true, - 'header_comment' => array('header' => $header), - 'array_syntax' => array('syntax' => 'short'), - 'ordered_imports' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, - 'php_unit_construct' => true, - 'php_unit_strict' => true, - )) - ->setFinder( - PhpCsFixer\Finder::create() - ->exclude('vendor') - ->in(__DIR__) - ) -; \ No newline at end of file diff --git a/vendor/overtrue/socialite/.travis.yml b/vendor/overtrue/socialite/.travis.yml deleted file mode 100644 index 39912f9..0000000 --- a/vendor/overtrue/socialite/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: php - -php: - - 7.0 - - 7.1 - - 7.2 - -sudo: false -dist: trusty - -install: travis_retry composer install --no-interaction --prefer-source - -script: vendor/bin/phpunit --verbose diff --git a/vendor/overtrue/socialite/LICENSE.txt b/vendor/overtrue/socialite/LICENSE.txt deleted file mode 100644 index c5fe984..0000000 --- a/vendor/overtrue/socialite/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) overtrue - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/overtrue/socialite/README.md b/vendor/overtrue/socialite/README.md deleted file mode 100644 index 1309f31..0000000 --- a/vendor/overtrue/socialite/README.md +++ /dev/null @@ -1,267 +0,0 @@ -

    Socialite

    -

    -Build Status -Latest Stable Version -Latest Unstable Version -Build Status -Scrutinizer Code Quality -Code Coverage -Total Downloads -License -

    - - -

    Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, You can easily use it in any PHP project.

    - -# Requirement - -``` -PHP >= 5.6 -``` -# Installation - -```shell -$ composer require "overtrue/socialite" -vvv -``` - -# Usage - -For Laravel 5: [overtrue/laravel-socialite](https://github.com/overtrue/laravel-socialite) - -`authorize.php`: - -```php - [ - 'client_id' => 'your-app-id', - 'client_secret' => 'your-app-secret', - 'redirect' => 'http://localhost/socialite/callback.php', - ], -]; - -$socialite = new SocialiteManager($config); - -$response = $socialite->driver('github')->redirect(); - -echo $response;// or $response->send(); -``` - -`callback.php`: - -```php - [ - 'client_id' => 'your-app-id', - 'client_secret' => 'your-app-secret', - 'redirect' => 'http://localhost/socialite/callback.php', - ], -]; - -$socialite = new SocialiteManager($config); - -$user = $socialite->driver('github')->user(); - -$user->getId(); // 1472352 -$user->getNickname(); // "overtrue" -$user->getUsername(); // "overtrue" -$user->getName(); // "安正超" -$user->getEmail(); // "anzhengchao@gmail.com" -$user->getProviderName(); // GitHub -... -``` - -### Configuration - -Now we support the following sites: - -`facebook`, `github`, `google`, `linkedin`, `outlook`, `weibo`, `taobao`, `qq`, `wechat`, `douyin`, `baidu`, `feishu`, and `douban`. - -Each driver uses the same configuration keys: `client_id`, `client_secret`, `redirect`. - -Example: -``` -... - 'weibo' => [ - 'client_id' => 'your-app-id', - 'client_secret' => 'your-app-secret', - 'redirect' => 'http://localhost/socialite/callback.php', - ], -... -``` - -### Scope - -Before redirecting the user, you may also set "scopes" on the request using the scope method. This method will overwrite all existing scopes: - -```php -$response = $socialite->driver('github') - ->scopes(['scope1', 'scope2'])->redirect(); - -``` - -### Redirect URL - -You may also want to dynamicly set `redirect`,you can use the following methods to change the `redirect` URL: - -```php -$socialite->redirect($url); -// or -$socialite->withRedirectUrl($url)->redirect(); -// or -$socialite->setRedirectUrl($url)->redirect(); -``` - -> WeChat scopes: -- `snsapi_base`, `snsapi_userinfo` - Used to Media Platform Authentication. -- `snsapi_login` - Used to web Authentication. - -### Additional parameters - -To include any optional parameters in the request, call the with method with an associative array: - -```php -$response = $socialite->driver('google') - ->with(['hd' => 'example.com'])->redirect(); -``` - -### User interface - -#### Standard user api: - -```php - -$user = $socialite->driver('weibo')->user(); -``` - -```json -{ - "id": 1472352, - "nickname": "overtrue", - "name": "安正超", - "email": "anzhengchao@gmail.com", - "avatar": "https://avatars.githubusercontent.com/u/1472352?v=3", - "original": { - "login": "overtrue", - "id": 1472352, - "avatar_url": "https://avatars.githubusercontent.com/u/1472352?v=3", - "gravatar_id": "", - "url": "https://api.github.com/users/overtrue", - "html_url": "https://github.com/overtrue", - ... - }, - "token": { - "access_token": "5b1dc56d64fffbd052359f032716cc4e0a1cb9a0", - "token_type": "bearer", - "scope": "user:email" - } -} -``` - -You can fetch the user attribute as a array keys like these: - -```php -$user['id']; // 1472352 -$user['nickname']; // "overtrue" -$user['name']; // "安正超" -$user['email']; // "anzhengchao@gmail.com" -... -``` - -Or using the method: - -```php -$user->getId(); -$user->getNickname(); -$user->getName(); -$user->getEmail(); -$user->getAvatar(); -$user->getOriginal(); -$user->getToken();// or $user->getAccessToken() -$user->getProviderName(); // GitHub/Google/Facebook... -``` - -#### Get original response from OAuth API - -The `$user->getOriginal()` method will return an array of the API raw response. - -#### Get access token Object - -You can get the access token instance of current session by call `$user->getToken()` or `$user->getAccessToken()` or `$user['token']` . - - -### Get user with access token - -```php -$accessToken = new AccessToken(['access_token' => $accessToken]); -$user = $socialite->user($accessToken); -``` - - -### Custom Session or Request instance. - -You can set the request with your custom `Request` instance which instanceof `Symfony\Component\HttpFoundation\Request` before you call `driver` method. - - -```php - -$request = new Request(); // or use AnotherCustomRequest. - -$socialite = new SocialiteManager($config, $request); -``` - -Or set request to `SocialiteManager` instance: - -```php -$socialite->setRequest($request); -``` - -You can get the request from the `SocialiteManager` instance by `getRequest()`: - -```php -$request = $socialite->getRequest(); -``` - -#### Set custom session manager. - -By default, the `SocialiteManager` uses the `Symfony\Component\HttpFoundation\Session\Session` instance as session manager, you can change it as follows: - -```php -$session = new YourCustomSessionManager(); -$socialite->getRequest()->setSession($session); -``` - -> Your custom session manager must be implement the [`Symfony\Component\HttpFoundation\Session\SessionInterface`](http://api.symfony.com/3.0/Symfony/Component/HttpFoundation/Session/SessionInterface.html). - -Enjoy it! :heart: - -# Reference - -- [Google - OpenID Connect](https://developers.google.com/identity/protocols/OpenIDConnect) -- [Facebook - Graph API](https://developers.facebook.com/docs/graph-api) -- [Linkedin - Authenticating with OAuth 2.0](https://developer.linkedin.com/docs/oauth2) -- [微博 - OAuth 2.0 授权机制说明](http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E) -- [QQ - OAuth 2.0 登录QQ](http://wiki.connect.qq.com/oauth2-0%E7%AE%80%E4%BB%8B) -- [微信公众平台 - OAuth文档](http://mp.weixin.qq.com/wiki/9/01f711493b5a02f24b04365ac5d8fd95.html) -- [微信开放平台 - 网站应用微信登录开发指南](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN) -- [微信开放平台 - 代公众号发起网页授权](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419318590&token=&lang=zh_CN) -- [豆瓣 - OAuth 2.0 授权机制说明](http://developers.douban.com/wiki/?title=oauth2) -- [抖音 - 网站应用开发指南](http://open.douyin.com/platform/doc) -- [飞书 - 授权说明](https://open.feishu.cn/document/ukTMukTMukTM/uMTNz4yM1MjLzUzM) - -## PHP 扩展包开发 - -> 想知道如何从零开始构建 PHP 扩展包? -> -> 请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package) - -# License - -MIT diff --git a/vendor/overtrue/socialite/composer.json b/vendor/overtrue/socialite/composer.json deleted file mode 100644 index d5b4aef..0000000 --- a/vendor/overtrue/socialite/composer.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "overtrue/socialite", - "description": "A collection of OAuth 2 packages that extracts from laravel/socialite.", - "keywords": [ - "OAuth", - "social", - "login", - "Weibo", - "WeChat", - "QQ" - ], - "autoload": { - "psr-4": { - "Overtrue\\Socialite\\": "src/" - } - }, - "require": { - "php": ">=5.6", - "guzzlehttp/guzzle": "^5.0|^6.0|^7.0", - "symfony/http-foundation": "^2.7|^3.0|^4.0|^5.0", - "ext-json": "*" - }, - "require-dev": { - "mockery/mockery": "~1.2", - "phpunit/phpunit": "^6.0|^7.0|^8.0|^9.0" - }, - "license": "MIT", - "authors": [ - { - "name": "overtrue", - "email": "anzhengchao@gmail.com" - } - ] -} diff --git a/vendor/overtrue/socialite/phpunit.xml b/vendor/overtrue/socialite/phpunit.xml deleted file mode 100644 index 3347b75..0000000 --- a/vendor/overtrue/socialite/phpunit.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - ./tests/ - - - diff --git a/vendor/overtrue/socialite/src/AccessToken.php b/vendor/overtrue/socialite/src/AccessToken.php deleted file mode 100644 index d62dfe0..0000000 --- a/vendor/overtrue/socialite/src/AccessToken.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -use ArrayAccess; -use InvalidArgumentException; -use JsonSerializable; - -/** - * Class AccessToken. - */ -class AccessToken implements AccessTokenInterface, ArrayAccess, JsonSerializable -{ - use HasAttributes; - - /** - * AccessToken constructor. - * - * @param array $attributes - */ - public function __construct(array $attributes) - { - if (empty($attributes['access_token'])) { - throw new InvalidArgumentException('The key "access_token" could not be empty.'); - } - - $this->attributes = $attributes; - } - - /** - * Return the access token string. - * - * @return string - */ - public function getToken() - { - return $this->getAttribute('access_token'); - } - - /** - * Return the refresh token string. - * - * @return string - */ - public function getRefreshToken() - { - return $this->getAttribute('refresh_token'); - } - - /** - * Set refresh token into this object. - * - * @param string $token - */ - public function setRefreshToken($token) - { - $this->setAttribute('refresh_token', $token); - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return strval($this->getAttribute('access_token', '')); - } - - /** - * {@inheritdoc} - */ - public function jsonSerialize() - { - return $this->getToken(); - } -} diff --git a/vendor/overtrue/socialite/src/AccessTokenInterface.php b/vendor/overtrue/socialite/src/AccessTokenInterface.php deleted file mode 100644 index f6f54bc..0000000 --- a/vendor/overtrue/socialite/src/AccessTokenInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -/** - * Interface AccessTokenInterface. - */ -interface AccessTokenInterface -{ - /** - * Return the access token string. - * - * @return string - */ - public function getToken(); -} diff --git a/vendor/overtrue/socialite/src/AuthorizeFailedException.php b/vendor/overtrue/socialite/src/AuthorizeFailedException.php deleted file mode 100644 index cc2b128..0000000 --- a/vendor/overtrue/socialite/src/AuthorizeFailedException.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -class AuthorizeFailedException extends \RuntimeException -{ - /** - * Response body. - * - * @var array - */ - public $body; - - /** - * Constructor. - * - * @param string $message - * @param array $body - */ - public function __construct($message, $body) - { - parent::__construct($message, -1); - - $this->body = $body; - } -} diff --git a/vendor/overtrue/socialite/src/Config.php b/vendor/overtrue/socialite/src/Config.php deleted file mode 100644 index bbe0862..0000000 --- a/vendor/overtrue/socialite/src/Config.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -use ArrayAccess; -use InvalidArgumentException; - -/** - * Class Config. - */ -class Config implements ArrayAccess -{ - /** - * @var array - */ - protected $config; - - /** - * Config constructor. - * - * @param array $config - */ - public function __construct(array $config) - { - $this->config = $config; - } - - /** - * Get an item from an array using "dot" notation. - * - * @param string $key - * @param mixed $default - * - * @return mixed - */ - public function get($key, $default = null) - { - $config = $this->config; - - if (is_null($key)) { - return $config; - } - if (isset($config[$key])) { - return $config[$key]; - } - foreach (explode('.', $key) as $segment) { - if (!is_array($config) || !array_key_exists($segment, $config)) { - return $default; - } - $config = $config[$segment]; - } - - return $config; - } - - /** - * Set an array item to a given value using "dot" notation. - * - * @param string $key - * @param mixed $value - * - * @return array - */ - public function set($key, $value) - { - if (is_null($key)) { - throw new InvalidArgumentException('Invalid config key.'); - } - - $keys = explode('.', $key); - $config = &$this->config; - - while (count($keys) > 1) { - $key = array_shift($keys); - if (!isset($config[$key]) || !is_array($config[$key])) { - $config[$key] = []; - } - $config = &$config[$key]; - } - - $config[array_shift($keys)] = $value; - - return $config; - } - - /** - * Determine if the given configuration value exists. - * - * @param string $key - * - * @return bool - */ - public function has($key) - { - return (bool) $this->get($key); - } - - /** - * Whether a offset exists. - * - * @see http://php.net/manual/en/arrayaccess.offsetexists.php - * - * @param mixed $offset

    - * An offset to check for. - *

    - * - * @return bool true on success or false on failure. - *

    - *

    - * The return value will be casted to boolean if non-boolean was returned - * - * @since 5.0.0 - */ - public function offsetExists($offset) - { - return array_key_exists($offset, $this->config); - } - - /** - * Offset to retrieve. - * - * @see http://php.net/manual/en/arrayaccess.offsetget.php - * - * @param mixed $offset

    - * The offset to retrieve. - *

    - * - * @return mixed Can return all value types - * - * @since 5.0.0 - */ - public function offsetGet($offset) - { - return $this->get($offset); - } - - /** - * Offset to set. - * - * @see http://php.net/manual/en/arrayaccess.offsetset.php - * - * @param mixed $offset

    - * The offset to assign the value to. - *

    - * @param mixed $value

    - * The value to set. - *

    - * - * @since 5.0.0 - */ - public function offsetSet($offset, $value) - { - $this->set($offset, $value); - } - - /** - * Offset to unset. - * - * @see http://php.net/manual/en/arrayaccess.offsetunset.php - * - * @param mixed $offset

    - * The offset to unset. - *

    - * - * @since 5.0.0 - */ - public function offsetUnset($offset) - { - $this->set($offset, null); - } -} diff --git a/vendor/overtrue/socialite/src/FactoryInterface.php b/vendor/overtrue/socialite/src/FactoryInterface.php deleted file mode 100644 index 7a4959c..0000000 --- a/vendor/overtrue/socialite/src/FactoryInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -/** - * Interface FactoryInterface. - */ -interface FactoryInterface -{ - /** - * Get an OAuth provider implementation. - * - * @param string $driver - * - * @return \Overtrue\Socialite\ProviderInterface - */ - public function driver($driver); -} diff --git a/vendor/overtrue/socialite/src/HasAttributes.php b/vendor/overtrue/socialite/src/HasAttributes.php deleted file mode 100644 index eeff890..0000000 --- a/vendor/overtrue/socialite/src/HasAttributes.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -/** - * Trait HasAttributes. - */ -trait HasAttributes -{ - /** - * @var array - */ - protected $attributes = []; - - /** - * Return the attributes. - * - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Return the extra attribute. - * - * @param string $name - * @param string $default - * - * @return mixed - */ - public function getAttribute($name, $default = null) - { - return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; - } - - /** - * Set extra attributes. - * - * @param string $name - * @param mixed $value - * - * @return $this - */ - public function setAttribute($name, $value) - { - $this->attributes[$name] = $value; - - return $this; - } - - /** - * Map the given array onto the user's properties. - * - * @param array $attributes - * - * @return $this - */ - public function merge(array $attributes) - { - $this->attributes = array_merge($this->attributes, $attributes); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function offsetExists($offset) - { - return array_key_exists($offset, $this->attributes); - } - - /** - * {@inheritdoc} - */ - public function offsetGet($offset) - { - return $this->getAttribute($offset); - } - - /** - * {@inheritdoc} - */ - public function offsetSet($offset, $value) - { - $this->setAttribute($offset, $value); - } - - /** - * {@inheritdoc} - */ - public function offsetUnset($offset) - { - unset($this->attributes[$offset]); - } - - /** - * {@inheritdoc} - */ - public function __get($property) - { - return $this->getAttribute($property); - } - - /** - * Return array. - * - * @return array - */ - public function toArray() - { - return $this->getAttributes(); - } - - /** - * Return JSON. - * - * @return string - */ - public function toJSON() - { - return json_encode($this->getAttributes(), JSON_UNESCAPED_UNICODE); - } -} diff --git a/vendor/overtrue/socialite/src/InvalidArgumentException.php b/vendor/overtrue/socialite/src/InvalidArgumentException.php deleted file mode 100644 index c044e64..0000000 --- a/vendor/overtrue/socialite/src/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -class InvalidArgumentException extends \InvalidArgumentException -{ -} diff --git a/vendor/overtrue/socialite/src/InvalidStateException.php b/vendor/overtrue/socialite/src/InvalidStateException.php deleted file mode 100644 index 96ac503..0000000 --- a/vendor/overtrue/socialite/src/InvalidStateException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -class InvalidStateException extends \InvalidArgumentException -{ -} diff --git a/vendor/overtrue/socialite/src/ProviderInterface.php b/vendor/overtrue/socialite/src/ProviderInterface.php deleted file mode 100644 index e78d172..0000000 --- a/vendor/overtrue/socialite/src/ProviderInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -interface ProviderInterface -{ - /** - * Redirect the user to the authentication page for the provider. - * - * @return \Symfony\Component\HttpFoundation\RedirectResponse - */ - public function redirect(); - - /** - * Get the User instance for the authenticated user. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return \Overtrue\Socialite\User - */ - public function user(AccessTokenInterface $token = null); -} diff --git a/vendor/overtrue/socialite/src/Providers/AbstractProvider.php b/vendor/overtrue/socialite/src/Providers/AbstractProvider.php deleted file mode 100644 index b33e6da..0000000 --- a/vendor/overtrue/socialite/src/Providers/AbstractProvider.php +++ /dev/null @@ -1,585 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use Overtrue\Socialite\AccessToken; -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\AuthorizeFailedException; -use Overtrue\Socialite\Config; -use Overtrue\Socialite\InvalidStateException; -use Overtrue\Socialite\ProviderInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; - -/** - * Class AbstractProvider. - */ -abstract class AbstractProvider implements ProviderInterface -{ - /** - * Provider name. - * - * @var string - */ - protected $name; - - /** - * The HTTP request instance. - * - * @var \Symfony\Component\HttpFoundation\Request - */ - protected $request; - - /** - * Driver config. - * - * @var Config - */ - protected $config; - - /** - * The client ID. - * - * @var string - */ - protected $clientId; - - /** - * The client secret. - * - * @var string - */ - protected $clientSecret; - - /** - * @var \Overtrue\Socialite\AccessTokenInterface - */ - protected $accessToken; - - /** - * The redirect URL. - * - * @var string - */ - protected $redirectUrl; - - /** - * The custom parameters to be sent with the request. - * - * @var array - */ - protected $parameters = []; - - /** - * The scopes being requested. - * - * @var array - */ - protected $scopes = []; - - /** - * The separating character for the requested scopes. - * - * @var string - */ - protected $scopeSeparator = ','; - - /** - * The type of the encoding in the query. - * - * @var int Can be either PHP_QUERY_RFC3986 or PHP_QUERY_RFC1738 - */ - protected $encodingType = PHP_QUERY_RFC1738; - - /** - * Indicates if the session state should be utilized. - * - * @var bool - */ - protected $stateless = false; - - /** - * The options for guzzle\client. - * - * @var array - */ - protected static $guzzleOptions = ['http_errors' => false]; - - /** - * Create a new provider instance. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @param array $config - */ - public function __construct(Request $request, $config) - { - // 兼容处理 - if (!\is_array($config)) { - $config = [ - 'client_id' => \func_get_arg(1), - 'client_secret' => \func_get_arg(2), - 'redirect' => \func_get_arg(3) ?: null, - ]; - } - $this->config = new Config($config); - $this->request = $request; - $this->clientId = $config['client_id']; - $this->clientSecret = $config['client_secret']; - $this->redirectUrl = isset($config['redirect']) ? $config['redirect'] : null; - } - - /** - * Get the authentication URL for the provider. - * - * @param string $state - * - * @return string - */ - abstract protected function getAuthUrl($state); - - /** - * Get the token URL for the provider. - * - * @return string - */ - abstract protected function getTokenUrl(); - - /** - * Get the raw user for the given access token. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return array - */ - abstract protected function getUserByToken(AccessTokenInterface $token); - - /** - * Map the raw user array to a Socialite User instance. - * - * @param array $user - * - * @return \Overtrue\Socialite\User - */ - abstract protected function mapUserToObject(array $user); - - /** - * Redirect the user of the application to the provider's authentication screen. - * - * @param string $redirectUrl - * - * @return \Symfony\Component\HttpFoundation\RedirectResponse - */ - public function redirect($redirectUrl = null) - { - $state = null; - - if (!is_null($redirectUrl)) { - $this->redirectUrl = $redirectUrl; - } - - if ($this->usesState()) { - $state = $this->makeState(); - } - - return new RedirectResponse($this->getAuthUrl($state)); - } - - /** - * {@inheritdoc} - */ - public function user(AccessTokenInterface $token = null) - { - if (is_null($token) && $this->hasInvalidState()) { - throw new InvalidStateException(); - } - - $token = $token ?: $this->getAccessToken($this->getCode()); - - $user = $this->getUserByToken($token); - - $user = $this->mapUserToObject($user)->merge(['original' => $user]); - - return $user->setToken($token)->setProviderName($this->getName()); - } - - /** - * Set redirect url. - * - * @param string $redirectUrl - * - * @return $this - */ - public function setRedirectUrl($redirectUrl) - { - $this->redirectUrl = $redirectUrl; - - return $this; - } - - /** - * Set redirect url. - * - * @param string $redirectUrl - * - * @return $this - */ - public function withRedirectUrl($redirectUrl) - { - $this->redirectUrl = $redirectUrl; - - return $this; - } - - /** - * Return the redirect url. - * - * @return string - */ - public function getRedirectUrl() - { - return $this->redirectUrl; - } - - /** - * @param \Overtrue\Socialite\AccessTokenInterface $accessToken - * - * @return $this - */ - public function setAccessToken(AccessTokenInterface $accessToken) - { - $this->accessToken = $accessToken; - - return $this; - } - - /** - * Get the access token for the given code. - * - * @param string $code - * - * @return \Overtrue\Socialite\AccessTokenInterface - */ - public function getAccessToken($code) - { - if ($this->accessToken) { - return $this->accessToken; - } - - $guzzleVersion = \defined(ClientInterface::class.'::VERSION') ? \constant(ClientInterface::class.'::VERSION') : 7; - - $postKey = (1 === version_compare($guzzleVersion, '6')) ? 'form_params' : 'body'; - - $response = $this->getHttpClient()->post($this->getTokenUrl(), [ - 'headers' => ['Accept' => 'application/json'], - $postKey => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()); - } - - /** - * Set the scopes of the requested access. - * - * @param array $scopes - * - * @return $this - */ - public function scopes(array $scopes) - { - $this->scopes = $scopes; - - return $this; - } - - /** - * Set the request instance. - * - * @param Request $request - * - * @return $this - */ - public function setRequest(Request $request) - { - $this->request = $request; - - return $this; - } - - /** - * Get the request instance. - * - * @return \Symfony\Component\HttpFoundation\Request - */ - public function getRequest() - { - return $this->request; - } - - /** - * Indicates that the provider should operate as stateless. - * - * @return $this - */ - public function stateless() - { - $this->stateless = true; - - return $this; - } - - /** - * Set the custom parameters of the request. - * - * @param array $parameters - * - * @return $this - */ - public function with(array $parameters) - { - $this->parameters = $parameters; - - return $this; - } - - /** - * @throws \ReflectionException - * - * @return string - */ - public function getName() - { - if (empty($this->name)) { - $this->name = strstr((new \ReflectionClass(get_class($this)))->getShortName(), 'Provider', true); - } - - return $this->name; - } - - /** - * @return array - */ - public function getConfig() - { - return $this->config; - } - - /** - * Get the authentication URL for the provider. - * - * @param string $url - * @param string $state - * - * @return string - */ - protected function buildAuthUrlFromBase($url, $state) - { - return $url.'?'.http_build_query($this->getCodeFields($state), '', '&', $this->encodingType); - } - - /** - * Get the GET parameters for the code request. - * - * @param string|null $state - * - * @return array - */ - protected function getCodeFields($state = null) - { - $fields = array_merge([ - 'client_id' => $this->config['client_id'], - 'redirect_uri' => $this->redirectUrl, - 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), - 'response_type' => 'code', - ], $this->parameters); - - if ($this->usesState()) { - $fields['state'] = $state; - } - - return $fields; - } - - /** - * Format the given scopes. - * - * @param array $scopes - * @param string $scopeSeparator - * - * @return string - */ - protected function formatScopes(array $scopes, $scopeSeparator) - { - return implode($scopeSeparator, $scopes); - } - - /** - * Determine if the current request / session has a mismatching "state". - * - * @return bool - */ - protected function hasInvalidState() - { - if ($this->isStateless()) { - return false; - } - - $state = $this->request->getSession()->get('state'); - - return !(strlen($state) > 0 && $this->request->get('state') === $state); - } - - /** - * Get the POST fields for the token request. - * - * @param string $code - * - * @return array - */ - protected function getTokenFields($code) - { - return [ - 'client_id' => $this->getConfig()->get('client_id'), - 'client_secret' => $this->getConfig()->get('client_secret'), - 'code' => $code, - 'redirect_uri' => $this->redirectUrl, - ]; - } - - /** - * Get the access token from the token response body. - * - * @param \Psr\Http\Message\StreamInterface|array $body - * - * @return \Overtrue\Socialite\AccessTokenInterface - */ - protected function parseAccessToken($body) - { - if (!is_array($body)) { - $body = json_decode($body, true); - } - - if (empty($body['access_token'])) { - throw new AuthorizeFailedException('Authorize Failed: '.json_encode($body, JSON_UNESCAPED_UNICODE), $body); - } - - return new AccessToken($body); - } - - /** - * Get the code from the request. - * - * @return string - */ - protected function getCode() - { - return $this->request->get('code'); - } - - /** - * Get a fresh instance of the Guzzle HTTP client. - * - * @return \GuzzleHttp\Client - */ - protected function getHttpClient() - { - return new Client(self::$guzzleOptions); - } - - /** - * Set options for Guzzle HTTP client. - * - * @param array $config - * - * @return array - */ - public static function setGuzzleOptions($config = []) - { - return self::$guzzleOptions = $config; - } - - /** - * Determine if the provider is operating with state. - * - * @return bool - */ - protected function usesState() - { - return !$this->stateless; - } - - /** - * Determine if the provider is operating as stateless. - * - * @return bool - */ - protected function isStateless() - { - return !$this->request->hasSession() || $this->stateless; - } - - /** - * Return array item by key. - * - * @param array $array - * @param string $key - * @param mixed $default - * - * @return mixed - */ - protected function arrayItem(array $array, $key, $default = null) - { - if (is_null($key)) { - return $array; - } - - if (isset($array[$key])) { - return $array[$key]; - } - - foreach (explode('.', $key) as $segment) { - if (!is_array($array) || !array_key_exists($segment, $array)) { - return $default; - } - - $array = $array[$segment]; - } - - return $array; - } - - /** - * Put state to session storage and return it. - * - * @return string|bool - */ - protected function makeState() - { - if (!$this->request->hasSession()) { - return false; - } - - $state = sha1(uniqid(mt_rand(1, 1000000), true)); - $session = $this->request->getSession(); - - if (is_callable([$session, 'put'])) { - $session->put('state', $state); - } elseif (is_callable([$session, 'set'])) { - $session->set('state', $state); - } else { - return false; - } - - return $state; - } -} diff --git a/vendor/overtrue/socialite/src/Providers/BaiduProvider.php b/vendor/overtrue/socialite/src/Providers/BaiduProvider.php deleted file mode 100644 index e06b890..0000000 --- a/vendor/overtrue/socialite/src/Providers/BaiduProvider.php +++ /dev/null @@ -1,134 +0,0 @@ -buildAuthUrlFromBase($this->baseUrl.'/oauth/'.$this->version.'/authorize', $state); - } - - /** - * {@inheritdoc}. - */ - protected function getCodeFields($state = null) - { - return array_merge([ - 'response_type' => 'code', - 'client_id' => $this->getConfig()->get('client_id'), - 'redirect_uri' => $this->redirectUrl, - 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), - 'display' => $this->display, - ], $this->parameters); - } - - /** - * Get the token URL for the provider. - * - * @return string - */ - protected function getTokenUrl() - { - return $this->baseUrl.'/oauth/'.$this->version.'/token'; - } - - /** - * Get the Post fields for the token request. - * - * @param string $code - * - * @return array - */ - protected function getTokenFields($code) - { - return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; - } - - /** - * Get the raw user for the given access token. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return array - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $response = $this->getHttpClient()->get($this->baseUrl.'/rest/'.$this->version.'/passport/users/getInfo', [ - 'query' => [ - 'access_token' => $token->getToken(), - ], - 'headers' => [ - 'Accept' => 'application/json', - ], - ]); - - return json_decode($response->getBody(), true); - } - - /** - * Map the raw user array to a Socialite User instance. - * - * @param array $user - * - * @return \Overtrue\Socialite\User - */ - protected function mapUserToObject(array $user) - { - $realname = $this->arrayItem($user, 'realname'); - - return new User([ - 'id' => $this->arrayItem($user, 'userid'), - 'nickname' => empty($realname) ? '' : $realname, - 'name' => $this->arrayItem($user, 'username'), - 'email' => '', - 'avatar' => $this->arrayItem($user, 'portrait'), - ]); - } -} diff --git a/vendor/overtrue/socialite/src/Providers/DouYinProvider.php b/vendor/overtrue/socialite/src/Providers/DouYinProvider.php deleted file mode 100644 index f798a86..0000000 --- a/vendor/overtrue/socialite/src/Providers/DouYinProvider.php +++ /dev/null @@ -1,169 +0,0 @@ -buildAuthUrlFromBase($this->baseUrl.'/platform/oauth/connect', $state); - } - - /** - * 获取授权码接口参数. - * - * @param string|null $state - * - * @return array - */ - public function getCodeFields($state = null) - { - $fields = [ - 'client_key' => $this->getConfig()->get('client_id'), - 'redirect_uri' => $this->redirectUrl, - 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), - 'response_type' => 'code', - ]; - - if ($this->usesState()) { - $fields['state'] = $state; - } - - return $fields; - } - - /** - * 获取access_token地址. - * - * {@inheritdoc} - */ - protected function getTokenUrl() - { - return $this->baseUrl.'/oauth/access_token'; - } - - /** - * 通过code获取access_token. - * - * @param string $code - * - * @return \Overtrue\Socialite\AccessToken - */ - public function getAccessToken($code) - { - $response = $this->getHttpClient()->get($this->getTokenUrl(), [ - 'query' => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()->getContents()); - } - - /** - * 获取access_token接口参数. - * - * @param string $code - * - * @return array - */ - protected function getTokenFields($code) - { - return [ - 'client_key' => $this->getConfig()->get('client_id'), - 'client_secret' => $this->getConfig()->get('client_secret'), - 'code' => $code, - 'grant_type' => 'authorization_code', - ]; - } - - /** - * 格式化token. - * - * @param \Psr\Http\Message\StreamInterface|array $body - * - * @return \Overtrue\Socialite\AccessTokenInterface - */ - protected function parseAccessToken($body) - { - if (!is_array($body)) { - $body = json_decode($body, true); - } - - if (empty($body['data']['access_token'])) { - throw new AuthorizeFailedException('Authorize Failed: '.json_encode($body, JSON_UNESCAPED_UNICODE), $body); - } - - return new AccessToken($body['data']); - } - - /** - * 通过token 获取用户信息. - * - * @param AccessTokenInterface $token - * - * @return array|mixed - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $userUrl = $this->baseUrl.'/oauth/userinfo/'; - - $response = $this->getHttpClient()->get( - $userUrl, - [ - 'query' => [ - 'access_token' => $token->getToken(), - 'open_id' => $token['open_id'], - ], - ] - ); - - return json_decode($response->getBody(), true); - } - - /** - * 格式化用户信息. - * - * @param array $user - * - * @return User - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'open_id'), - 'username' => $this->arrayItem($user, 'nickname'), - 'nickname' => $this->arrayItem($user, 'nickname'), - 'avatar' => $this->arrayItem($user, 'avatar'), - ]); - } -} diff --git a/vendor/overtrue/socialite/src/Providers/DoubanProvider.php b/vendor/overtrue/socialite/src/Providers/DoubanProvider.php deleted file mode 100644 index f3b5c93..0000000 --- a/vendor/overtrue/socialite/src/Providers/DoubanProvider.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class DoubanProvider. - * - * @see http://developers.douban.com/wiki/?title=oauth2 [使用 OAuth 2.0 访问豆瓣 API] - */ -class DoubanProvider extends AbstractProvider implements ProviderInterface -{ - /** - * {@inheritdoc}. - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase('https://www.douban.com/service/auth2/auth', $state); - } - - /** - * {@inheritdoc}. - */ - protected function getTokenUrl() - { - return 'https://www.douban.com/service/auth2/token'; - } - - /** - * {@inheritdoc}. - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $response = $this->getHttpClient()->get('https://api.douban.com/v2/user/~me', [ - 'headers' => [ - 'Authorization' => 'Bearer '.$token->getToken(), - ], - ]); - - return json_decode($response->getBody()->getContents(), true); - } - - /** - * {@inheritdoc}. - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'id'), - 'nickname' => $this->arrayItem($user, 'name'), - 'name' => $this->arrayItem($user, 'name'), - 'avatar' => $this->arrayItem($user, 'large_avatar'), - 'email' => null, - ]); - } - - /** - * {@inheritdoc}. - */ - protected function getTokenFields($code) - { - return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; - } - - /** - * {@inheritdoc}. - */ - public function getAccessToken($code) - { - $response = $this->getHttpClient()->post($this->getTokenUrl(), [ - 'form_params' => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()->getContents()); - } -} diff --git a/vendor/overtrue/socialite/src/Providers/FacebookProvider.php b/vendor/overtrue/socialite/src/Providers/FacebookProvider.php deleted file mode 100644 index ce2cbec..0000000 --- a/vendor/overtrue/socialite/src/Providers/FacebookProvider.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class FacebookProvider. - * - * @see https://developers.facebook.com/docs/graph-api [Facebook - Graph API] - */ -class FacebookProvider extends AbstractProvider implements ProviderInterface -{ - /** - * The base Facebook Graph URL. - * - * @var string - */ - protected $graphUrl = 'https://graph.facebook.com'; - - /** - * The Graph API version for the request. - * - * @var string - */ - protected $version = 'v3.3'; - - /** - * The user fields being requested. - * - * @var array - */ - protected $fields = ['first_name', 'last_name', 'email', 'gender', 'verified']; - - /** - * The scopes being requested. - * - * @var array - */ - protected $scopes = ['email']; - - /** - * Display the dialog in a popup view. - * - * @var bool - */ - protected $popup = false; - - /** - * {@inheritdoc} - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase('https://www.facebook.com/'.$this->version.'/dialog/oauth', $state); - } - - /** - * {@inheritdoc} - */ - protected function getTokenUrl() - { - return $this->graphUrl.'/oauth/access_token'; - } - - /** - * Get the access token for the given code. - * - * @param string $code - * - * @return \Overtrue\Socialite\AccessToken - */ - public function getAccessToken($code) - { - $response = $this->getHttpClient()->get($this->getTokenUrl(), [ - 'query' => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()); - } - - /** - * {@inheritdoc} - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $appSecretProof = hash_hmac('sha256', $token->getToken(), $this->getConfig()->get('client_secret')); - - $response = $this->getHttpClient()->get($this->graphUrl.'/'.$this->version.'/me?access_token='.$token.'&appsecret_proof='.$appSecretProof.'&fields='.implode(',', $this->fields), [ - 'headers' => [ - 'Accept' => 'application/json', - ], - ]); - - return json_decode($response->getBody(), true); - } - - /** - * {@inheritdoc} - */ - protected function mapUserToObject(array $user) - { - $userId = $this->arrayItem($user, 'id'); - $avatarUrl = $this->graphUrl.'/'.$this->version.'/'.$userId.'/picture'; - - $firstName = $this->arrayItem($user, 'first_name'); - $lastName = $this->arrayItem($user, 'last_name'); - - return new User([ - 'id' => $this->arrayItem($user, 'id'), - 'nickname' => null, - 'name' => $firstName.' '.$lastName, - 'email' => $this->arrayItem($user, 'email'), - 'avatar' => $userId ? $avatarUrl.'?type=normal' : null, - 'avatar_original' => $userId ? $avatarUrl.'?width=1920' : null, - ]); - } - - /** - * {@inheritdoc} - */ - protected function getCodeFields($state = null) - { - $fields = parent::getCodeFields($state); - - if ($this->popup) { - $fields['display'] = 'popup'; - } - - return $fields; - } - - /** - * Set the user fields to request from Facebook. - * - * @param array $fields - * - * @return $this - */ - public function fields(array $fields) - { - $this->fields = $fields; - - return $this; - } - - /** - * Set the dialog to be displayed as a popup. - * - * @return $this - */ - public function asPopup() - { - $this->popup = true; - - return $this; - } -} diff --git a/vendor/overtrue/socialite/src/Providers/FeiShuProvider.php b/vendor/overtrue/socialite/src/Providers/FeiShuProvider.php deleted file mode 100644 index 2d61d07..0000000 --- a/vendor/overtrue/socialite/src/Providers/FeiShuProvider.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessToken; -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\AuthorizeFailedException; -use Overtrue\Socialite\InvalidStateException; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class FeiShuProvider. - * - * @author qijian.song@show.world - * - * @see https://open.feishu.cn/ - */ -class FeiShuProvider extends AbstractProvider implements ProviderInterface -{ - /** - * 飞书接口域名. - * - * @var string - */ - protected $baseUrl = 'https://open.feishu.cn'; - - /** - * 应用授权作用域. - * - * @var array - */ - protected $scopes = ['user_info']; - - /** - * 获取登录页面地址. - * - * {@inheritdoc} - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase($this->baseUrl.'/open-apis/authen/v1/index', $state); - } - - /** - * 获取授权码接口参数. - * - * @param string|null $state - * - * @return array - */ - protected function getCodeFields($state = null) - { - $fields = [ - 'redirect_uri' => $this->redirectUrl, - 'app_id' => $this->getConfig()->get('client_id'), - ]; - - if ($this->usesState()) { - $fields['state'] = $state; - } - - return $fields; - } - - /** - * 获取 app_access_token 地址. - * - * {@inheritdoc} - */ - protected function getTokenUrl() - { - return $this->baseUrl.'/open-apis/auth/v3/app_access_token/internal'; - } - - /** - * 获取 app_access_token. - * - * @return \Overtrue\Socialite\AccessToken - */ - public function getAccessToken($code = '') - { - $response = $this->getHttpClient()->post($this->getTokenUrl(), [ - 'headers' => ['Content-Type' => 'application/json'], - 'json' => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()->getContents()); - } - - /** - * 获取 app_access_token 接口参数. - * - * @return array - */ - protected function getTokenFields($code) - { - return [ - 'app_id' => $this->getConfig()->get('client_id'), - 'app_secret' => $this->getConfig()->get('client_secret'), - ]; - } - - /** - * 格式化 token. - * - * @param \Psr\Http\Message\StreamInterface|array $body - * - * @return \Overtrue\Socialite\AccessTokenInterface - */ - protected function parseAccessToken($body) - { - if (!is_array($body)) { - $body = json_decode($body, true); - } - - if (empty($body['app_access_token'])) { - throw new AuthorizeFailedException('Authorize Failed: '.json_encode($body, JSON_UNESCAPED_UNICODE), $body); - } - $data['access_token'] = $body['app_access_token']; - - return new AccessToken($data); - } - - /** - * 获取用户信息. - * - * @return array|mixed - */ - public function user(AccessTokenInterface $token = null) - { - if (is_null($token) && $this->hasInvalidState()) { - throw new InvalidStateException(); - } - - $token = $token ?: $this->getAccessToken(); - - $user = $this->getUserByToken($token, $this->getCode()); - $user = $this->mapUserToObject($user)->merge(['original' => $user]); - - return $user->setToken($token)->setProviderName($this->getName()); - } - - /** - * 通过 token 获取用户信息. - * - * @return array|mixed - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $userUrl = $this->baseUrl.'/open-apis/authen/v1/access_token'; - - $response = $this->getHttpClient()->post( - $userUrl, - [ - 'json' => [ - 'app_access_token' => $token->getToken(), - 'code' => $this->getCode(), - 'grant_type' => 'authorization_code', - ], - ] - ); - - $result = json_decode($response->getBody(), true); - - return $result['data']; - } - - /** - * 格式化用户信息. - * - * @return User - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'open_id'), - 'username' => $this->arrayItem($user, 'name'), - 'nickname' => $this->arrayItem($user, 'name'), - 'avatar' => $this->arrayItem($user, 'avatar_url'), - ]); - } -} diff --git a/vendor/overtrue/socialite/src/Providers/GitHubProvider.php b/vendor/overtrue/socialite/src/Providers/GitHubProvider.php deleted file mode 100644 index 955fa9d..0000000 --- a/vendor/overtrue/socialite/src/Providers/GitHubProvider.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Exception; -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class GitHubProvider. - */ -class GitHubProvider extends AbstractProvider implements ProviderInterface -{ - /** - * The scopes being requested. - * - * @var array - */ - protected $scopes = ['user:email']; - - /** - * {@inheritdoc} - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase('https://github.com/login/oauth/authorize', $state); - } - - /** - * {@inheritdoc} - */ - protected function getTokenUrl() - { - return 'https://github.com/login/oauth/access_token'; - } - - /** - * {@inheritdoc} - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $userUrl = 'https://api.github.com/user'; - - $response = $this->getHttpClient()->get( - $userUrl, - $this->createAuthorizationHeaders($token) - ); - - $user = json_decode($response->getBody(), true); - - if (in_array('user:email', $this->scopes)) { - $user['email'] = $this->getEmailByToken($token); - } - - return $user; - } - - /** - * Get the email for the given access token. - * - * @param string $token - * - * @return string|null - */ - protected function getEmailByToken($token) - { - $emailsUrl = 'https://api.github.com/user/emails'; - - try { - $response = $this->getHttpClient()->get( - $emailsUrl, - $this->createAuthorizationHeaders($token) - ); - } catch (Exception $e) { - return; - } - - foreach (json_decode($response->getBody(), true) as $email) { - if ($email['primary'] && $email['verified']) { - return $email['email']; - } - } - } - - /** - * {@inheritdoc} - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'id'), - 'username' => $this->arrayItem($user, 'login'), - 'nickname' => $this->arrayItem($user, 'login'), - 'name' => $this->arrayItem($user, 'name'), - 'email' => $this->arrayItem($user, 'email'), - 'avatar' => $this->arrayItem($user, 'avatar_url'), - ]); - } - - /** - * Get the default options for an HTTP request. - * - * @param string $token - * - * @return array - */ - protected function createAuthorizationHeaders(string $token) - { - return [ - 'headers' => [ - 'Accept' => 'application/vnd.github.v3+json', - 'Authorization' => sprintf('token %s', $token), - ], - ]; - } -} diff --git a/vendor/overtrue/socialite/src/Providers/GoogleProvider.php b/vendor/overtrue/socialite/src/Providers/GoogleProvider.php deleted file mode 100644 index c702aff..0000000 --- a/vendor/overtrue/socialite/src/Providers/GoogleProvider.php +++ /dev/null @@ -1,119 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use GuzzleHttp\ClientInterface; -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class GoogleProvider. - * - * @see https://developers.google.com/identity/protocols/OpenIDConnect [OpenID Connect] - */ -class GoogleProvider extends AbstractProvider implements ProviderInterface -{ - /** - * The separating character for the requested scopes. - * - * @var string - */ - protected $scopeSeparator = ' '; - - /** - * The scopes being requested. - * - * @var array - */ - protected $scopes = [ - 'https://www.googleapis.com/auth/userinfo.email', - 'https://www.googleapis.com/auth/userinfo.profile', - ]; - - /** - * {@inheritdoc} - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase('https://accounts.google.com/o/oauth2/v2/auth', $state); - } - - /** - * {@inheritdoc} - */ - protected function getTokenUrl() - { - return 'https://www.googleapis.com/oauth2/v4/token'; - } - - /** - * Get the access token for the given code. - * - * @param string $code - * - * @return string - */ - public function getAccessToken($code) - { - $guzzleVersion = \defined(ClientInterface::class.'::VERSION') ? \constant(ClientInterface::class.'::VERSION') : 7; - $postKey = (1 === version_compare($guzzleVersion, '6')) ? 'form_params' : 'body'; - - $response = $this->getHttpClient()->post($this->getTokenUrl(), [ - $postKey => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()); - } - - /** - * Get the POST fields for the token request. - * - * @param string $code - * - * @return array - */ - protected function getTokenFields($code) - { - return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; - } - - /** - * {@inheritdoc} - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $response = $this->getHttpClient()->get('https://www.googleapis.com/userinfo/v2/me', [ - 'headers' => [ - 'Accept' => 'application/json', - 'Authorization' => 'Bearer '.$token->getToken(), - ], - ]); - - return json_decode($response->getBody(), true); - } - - /** - * {@inheritdoc} - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'id'), - 'username' => $this->arrayItem($user, 'email'), - 'nickname' => $this->arrayItem($user, 'name'), - 'name' => $this->arrayItem($user, 'name'), - 'email' => $this->arrayItem($user, 'email'), - 'avatar' => $this->arrayItem($user, 'picture'), - ]); - } -} diff --git a/vendor/overtrue/socialite/src/Providers/LinkedinProvider.php b/vendor/overtrue/socialite/src/Providers/LinkedinProvider.php deleted file mode 100644 index 019167a..0000000 --- a/vendor/overtrue/socialite/src/Providers/LinkedinProvider.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class LinkedinProvider. - * - * @see https://developer.linkedin.com/docs/oauth2 [Authenticating with OAuth 2.0] - */ -class LinkedinProvider extends AbstractProvider implements ProviderInterface -{ - /** - * The scopes being requested. - * - * @var array - */ - protected $scopes = ['r_liteprofile', 'r_emailaddress']; - - /** - * {@inheritdoc} - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase('https://www.linkedin.com/oauth/v2/authorization', $state); - } - - /** - * Get the access token for the given code. - * - * @param string $code - * - * @return \Overtrue\Socialite\AccessToken - */ - public function getAccessToken($code) - { - $response = $this->getHttpClient() - ->post($this->getTokenUrl(), ['form_params' => $this->getTokenFields($code)]); - - return $this->parseAccessToken($response->getBody()); - } - - /** - * {@inheritdoc} - */ - protected function getTokenUrl() - { - return 'https://www.linkedin.com/oauth/v2/accessToken'; - } - - /** - * Get the POST fields for the token request. - * - * @param string $code - * - * @return array - */ - protected function getTokenFields($code) - { - return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; - } - - /** - * {@inheritdoc} - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $basicProfile = $this->getBasicProfile($token); - $emailAddress = $this->getEmailAddress($token); - - return array_merge($basicProfile, $emailAddress); - } - - /** - * Get the basic profile fields for the user. - * - * @param string $token - * - * @return array - */ - protected function getBasicProfile($token) - { - $url = 'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))'; - - $response = $this->getHttpClient()->get($url, [ - 'headers' => [ - 'Authorization' => 'Bearer '.$token, - 'X-RestLi-Protocol-Version' => '2.0.0', - ], - ]); - - return (array) json_decode($response->getBody(), true); - } - - /** - * Get the email address for the user. - * - * @param string $token - * - * @return array - */ - protected function getEmailAddress($token) - { - $url = 'https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))'; - - $response = $this->getHttpClient()->get($url, [ - 'headers' => [ - 'Authorization' => 'Bearer '.$token, - 'X-RestLi-Protocol-Version' => '2.0.0', - ], - ]); - - return (array) $this->arrayItem(json_decode($response->getBody(), true), 'elements.0.handle~'); - } - - /** - * {@inheritdoc} - */ - protected function mapUserToObject(array $user) - { - $preferredLocale = $this->arrayItem($user, 'firstName.preferredLocale.language').'_'.$this->arrayItem($user, 'firstName.preferredLocale.country'); - $firstName = $this->arrayItem($user, 'firstName.localized.'.$preferredLocale); - $lastName = $this->arrayItem($user, 'lastName.localized.'.$preferredLocale); - $name = $firstName.' '.$lastName; - - $images = (array) $this->arrayItem($user, 'profilePicture.displayImage~.elements', []); - $avatars = array_filter($images, function ($image) { - return $image['data']['com.linkedin.digitalmedia.mediaartifact.StillImage']['storageSize']['width'] === 100; - }); - $avatar = array_shift($avatars); - $originalAvatars = array_filter($images, function ($image) { - return $image['data']['com.linkedin.digitalmedia.mediaartifact.StillImage']['storageSize']['width'] === 800; - }); - $originalAvatar = array_shift($originalAvatars); - - return new User([ - 'id' => $this->arrayItem($user, 'id'), - 'nickname' => $name, - 'name' => $name, - 'email' => $this->arrayItem($user, 'emailAddress'), - 'avatar' => $avatar ? $this->arrayItem($avatar, 'identifiers.0.identifier') : null, - 'avatar_original' => $originalAvatar ? $this->arrayItem($originalAvatar, 'identifiers.0.identifier') : null, - ]); - } - - /** - * Set the user fields to request from LinkedIn. - * - * @param array $fields - * - * @return $this - */ - public function fields(array $fields) - { - $this->fields = $fields; - - return $this; - } - - /** - * Determine if the provider is operating as stateless. - * - * @return bool - */ - protected function isStateless() - { - return true; - } -} diff --git a/vendor/overtrue/socialite/src/Providers/OutlookProvider.php b/vendor/overtrue/socialite/src/Providers/OutlookProvider.php deleted file mode 100644 index 18d9fd7..0000000 --- a/vendor/overtrue/socialite/src/Providers/OutlookProvider.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class OutlookProvider. - */ -class OutlookProvider extends AbstractProvider implements ProviderInterface -{ - /** - * {@inheritdoc} - */ - protected $scopes = ['User.Read']; - - /** - * {@inheritdoc} - */ - protected $scopeSeparator = ' '; - - /** - * {@inheritdoc} - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase('https://login.microsoftonline.com/common/oauth2/v2.0/authorize', $state); - } - - /** - * {@inheritdoc} - */ - protected function getTokenUrl() - { - return 'https://login.microsoftonline.com/common/oauth2/v2.0/token'; - } - - /** - * {@inheritdoc} - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $response = $this->getHttpClient()->get( - 'https://graph.microsoft.com/v1.0/me', - ['headers' => [ - 'Accept' => 'application/json', - 'Authorization' => 'Bearer '.$token->getToken(), - ], - ] - ); - - return json_decode($response->getBody()->getContents(), true); - } - - /** - * {@inheritdoc} - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'id'), - 'nickname' => null, - 'name' => $this->arrayItem($user, 'displayName'), - 'email' => $this->arrayItem($user, 'userPrincipalName'), - 'avatar' => null, - ]); - } - - /** - * {@inheritdoc} - */ - protected function getTokenFields($code) - { - return array_merge(parent::getTokenFields($code), [ - 'grant_type' => 'authorization_code', - ]); - } -} diff --git a/vendor/overtrue/socialite/src/Providers/QQProvider.php b/vendor/overtrue/socialite/src/Providers/QQProvider.php deleted file mode 100644 index 124357e..0000000 --- a/vendor/overtrue/socialite/src/Providers/QQProvider.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class QQProvider. - * - * @see http://wiki.connect.qq.com/oauth2-0%E7%AE%80%E4%BB%8B [QQ - OAuth 2.0 登录QQ] - */ -class QQProvider extends AbstractProvider implements ProviderInterface -{ - /** - * The base url of QQ API. - * - * @var string - */ - protected $baseUrl = 'https://graph.qq.com'; - - /** - * User openid. - * - * @var string - */ - protected $openId; - - /** - * get token(openid) with unionid. - * - * @var bool - */ - protected $withUnionId = false; - - /** - * User unionid. - * - * @var string - */ - protected $unionId; - - /** - * The scopes being requested. - * - * @var array - */ - protected $scopes = ['get_user_info']; - - /** - * The uid of user authorized. - * - * @var int - */ - protected $uid; - - /** - * Get the authentication URL for the provider. - * - * @param string $state - * - * @return string - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase($this->baseUrl.'/oauth2.0/authorize', $state); - } - - /** - * Get the token URL for the provider. - * - * @return string - */ - protected function getTokenUrl() - { - return $this->baseUrl.'/oauth2.0/token'; - } - - /** - * Get the Post fields for the token request. - * - * @param string $code - * - * @return array - */ - protected function getTokenFields($code) - { - return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; - } - - /** - * Get the access token for the given code. - * - * @param string $code - * - * @return \Overtrue\Socialite\AccessToken - */ - public function getAccessToken($code) - { - $response = $this->getHttpClient()->get($this->getTokenUrl(), [ - 'query' => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()->getContents()); - } - - /** - * Get the access token from the token response body. - * - * @param string $body - * - * @return \Overtrue\Socialite\AccessToken - */ - public function parseAccessToken($body) - { - parse_str($body, $token); - - return parent::parseAccessToken($token); - } - - /** - * @return self - */ - public function withUnionId() - { - $this->withUnionId = true; - - return $this; - } - - /** - * Get the raw user for the given access token. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return array - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $url = $this->baseUrl.'/oauth2.0/me?access_token='.$token->getToken(); - $this->withUnionId && $url .= '&unionid=1'; - - $response = $this->getHttpClient()->get($url); - - $me = json_decode($this->removeCallback($response->getBody()->getContents()), true); - $this->openId = $me['openid']; - $this->unionId = isset($me['unionid']) ? $me['unionid'] : ''; - - $queries = [ - 'access_token' => $token->getToken(), - 'openid' => $this->openId, - 'oauth_consumer_key' => $this->getConfig()->get('client_id'), - ]; - - $response = $this->getHttpClient()->get($this->baseUrl.'/user/get_user_info?'.http_build_query($queries)); - - return json_decode($this->removeCallback($response->getBody()->getContents()), true); - } - - /** - * Map the raw user array to a Socialite User instance. - * - * @param array $user - * - * @return \Overtrue\Socialite\User - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->openId, - 'unionid' => $this->unionId, - 'nickname' => $this->arrayItem($user, 'nickname'), - 'name' => $this->arrayItem($user, 'nickname'), - 'email' => $this->arrayItem($user, 'email'), - 'avatar' => $this->arrayItem($user, 'figureurl_qq_2'), - ]); - } - - /** - * Remove the fucking callback parentheses. - * - * @param string $response - * - * @return string - */ - protected function removeCallback($response) - { - if (false !== strpos($response, 'callback')) { - $lpos = strpos($response, '('); - $rpos = strrpos($response, ')'); - $response = substr($response, $lpos + 1, $rpos - $lpos - 1); - } - - return $response; - } -} diff --git a/vendor/overtrue/socialite/src/Providers/TaobaoProvider.php b/vendor/overtrue/socialite/src/Providers/TaobaoProvider.php deleted file mode 100644 index 4daacd9..0000000 --- a/vendor/overtrue/socialite/src/Providers/TaobaoProvider.php +++ /dev/null @@ -1,242 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class TaobaoProvider. - * - * @author mechono - * - * @see https://open.taobao.com/doc.htm?docId=102635&docType=1&source=search [Taobao - OAuth 2.0 授权登录] - */ -class TaobaoProvider extends AbstractProvider implements ProviderInterface -{ - /** - * The base url of Taobao API. - * - * @var string - */ - protected $baseUrl = 'https://oauth.taobao.com'; - - /** - * Taobao API service URL address. - * - * @var string - */ - protected $gatewayUrl = 'https://eco.taobao.com/router/rest'; - - /** - * The API version for the request. - * - * @var string - */ - protected $version = '2.0'; - - /** - * @var string - */ - protected $format = 'json'; - - /** - * @var string - */ - protected $signMethod = 'md5'; - - /** - * Web 对应 PC 端(淘宝 logo )浏览器页面样式;Tmall 对应天猫的浏览器页面样式;Wap 对应无线端的浏览器页面样式。 - */ - protected $view = 'web'; - - /** - * The scopes being requested. - * - * @var array - */ - protected $scopes = ['user_info']; - - /** - * Get the authentication URL for the provider. - * - * @param string $state - * - * @return string - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase($this->baseUrl.'/authorize', $state); - } - - /** - * 获取授权码接口参数. - * - * @param string|null $state - * - * @return array - */ - public function getCodeFields($state = null) - { - $fields = [ - 'client_id' => $this->getConfig()->get('client_id'), - 'redirect_uri' => $this->redirectUrl, - 'view' => $this->view, - 'response_type' => 'code', - ]; - - if ($this->usesState()) { - $fields['state'] = $state; - } - - return $fields; - } - - /** - * Get the token URL for the provider. - * - * @return string - */ - protected function getTokenUrl() - { - return $this->baseUrl.'/token'; - } - - /** - * Get the Post fields for the token request. - * - * @param string $code - * - * @return array - */ - protected function getTokenFields($code) - { - return parent::getTokenFields($code) + ['grant_type' => 'authorization_code', 'view' => $this->view]; - } - - /** - * Get the access token for the given code. - * - * @param string $code - * - * @return \Overtrue\Socialite\AccessToken - */ - public function getAccessToken($code) - { - $response = $this->getHttpClient()->post($this->getTokenUrl(), [ - 'query' => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()->getContents()); - } - - /** - * Get the access token from the token response body. - * - * @param string $body - * - * @return \Overtrue\Socialite\AccessToken - */ - public function parseAccessToken($body) - { - return parent::parseAccessToken($body); - } - - /** - * Get the raw user for the given access token. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return array - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $response = $this->getHttpClient()->post($this->getUserInfoUrl($this->gatewayUrl, $token)); - - return json_decode($response->getBody(), true); - } - - /** - * Map the raw user array to a Socialite User instance. - * - * @param array $user - * - * @return \Overtrue\Socialite\User - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'open_id'), - 'nickname' => $this->arrayItem($user, 'nick'), - 'name' => $this->arrayItem($user, 'nick'), - 'avatar' => $this->arrayItem($user, 'avatar'), - ]); - } - - /** - * @param $params - * - * @return string - */ - protected function generateSign($params) - { - ksort($params); - - $stringToBeSigned = $this->getConfig()->get('client_secret'); - - foreach ($params as $k => $v) { - if (!is_array($v) && '@' != substr($v, 0, 1)) { - $stringToBeSigned .= "$k$v"; - } - } - - $stringToBeSigned .= $this->getConfig()->get('client_secret'); - - return strtoupper(md5($stringToBeSigned)); - } - - /** - * @param \Overtrue\Socialite\AccessTokenInterface $token - * @param array $apiFields - * - * @return array - */ - protected function getPublicFields(AccessTokenInterface $token, array $apiFields = []) - { - $fields = [ - 'app_key' => $this->getConfig()->get('client_id'), - 'sign_method' => $this->signMethod, - 'session' => $token->getToken(), - 'timestamp' => date('Y-m-d H:i:s'), - 'v' => $this->version, - 'format' => $this->format, - ]; - - $fields = array_merge($apiFields, $fields); - $fields['sign'] = $this->generateSign($fields); - - return $fields; - } - - /** - * {@inheritdoc}. - */ - protected function getUserInfoUrl($url, AccessTokenInterface $token) - { - $apiFields = ['method' => 'taobao.miniapp.userInfo.get']; - - $query = http_build_query($this->getPublicFields($token, $apiFields), '', '&', $this->encodingType); - - return $url.'?'.$query; - } -} diff --git a/vendor/overtrue/socialite/src/Providers/WeChatProvider.php b/vendor/overtrue/socialite/src/Providers/WeChatProvider.php deleted file mode 100644 index 0b76532..0000000 --- a/vendor/overtrue/socialite/src/Providers/WeChatProvider.php +++ /dev/null @@ -1,234 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\InvalidArgumentException; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; -use Overtrue\Socialite\WeChatComponentInterface; - -/** - * Class WeChatProvider. - * - * @see http://mp.weixin.qq.com/wiki/9/01f711493b5a02f24b04365ac5d8fd95.html [WeChat - 公众平台OAuth文档] - * @see https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN [网站应用微信登录开发指南] - */ -class WeChatProvider extends AbstractProvider implements ProviderInterface -{ - /** - * The base url of WeChat API. - * - * @var string - */ - protected $baseUrl = 'https://api.weixin.qq.com/sns'; - - /** - * {@inheritdoc}. - */ - protected $openId; - - /** - * {@inheritdoc}. - */ - protected $scopes = ['snsapi_login']; - - /** - * Indicates if the session state should be utilized. - * - * @var bool - */ - protected $stateless = true; - - /** - * Return country code instead of country name. - * - * @var bool - */ - protected $withCountryCode = false; - - /** - * @var WeChatComponentInterface - */ - protected $component; - - /** - * Return country code instead of country name. - * - * @return $this - */ - public function withCountryCode() - { - $this->withCountryCode = true; - - return $this; - } - - /** - * WeChat OpenPlatform 3rd component. - * - * @param WeChatComponentInterface $component - * - * @return $this - */ - public function component(WeChatComponentInterface $component) - { - $this->scopes = ['snsapi_base']; - - $this->component = $component; - - return $this; - } - - /** - * {@inheritdoc}. - */ - public function getAccessToken($code) - { - $response = $this->getHttpClient()->get($this->getTokenUrl(), [ - 'headers' => ['Accept' => 'application/json'], - 'query' => $this->getTokenFields($code), - ]); - - return $this->parseAccessToken($response->getBody()); - } - - /** - * {@inheritdoc}. - */ - protected function getAuthUrl($state) - { - $path = 'oauth2/authorize'; - - if (in_array('snsapi_login', $this->scopes)) { - $path = 'qrconnect'; - } - - return $this->buildAuthUrlFromBase("https://open.weixin.qq.com/connect/{$path}", $state); - } - - /** - * {@inheritdoc}. - */ - protected function buildAuthUrlFromBase($url, $state) - { - $query = http_build_query($this->getCodeFields($state), '', '&', $this->encodingType); - - return $url.'?'.$query.'#wechat_redirect'; - } - - /** - * {@inheritdoc}. - */ - protected function getCodeFields($state = null) - { - if ($this->component) { - $this->with(array_merge($this->parameters, ['component_appid' => $this->component->getAppId()])); - } - - return array_merge([ - 'appid' => $this->getConfig()->get('client_id'), - 'redirect_uri' => $this->redirectUrl, - 'response_type' => 'code', - 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), - 'state' => $state ?: md5(time()), - 'connect_redirect' => 1, - ], $this->parameters); - } - - /** - * {@inheritdoc}. - */ - protected function getTokenUrl() - { - if ($this->component) { - return $this->baseUrl.'/oauth2/component/access_token'; - } - - return $this->baseUrl.'/oauth2/access_token'; - } - - /** - * {@inheritdoc}. - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $scopes = explode(',', $token->getAttribute('scope', '')); - - if (in_array('snsapi_base', $scopes)) { - return $token->toArray(); - } - - if (empty($token['openid'])) { - throw new InvalidArgumentException('openid of AccessToken is required.'); - } - - $language = $this->withCountryCode ? null : (isset($this->parameters['lang']) ? $this->parameters['lang'] : 'zh_CN'); - - $response = $this->getHttpClient()->get($this->baseUrl.'/userinfo', [ - 'query' => array_filter([ - 'access_token' => $token->getToken(), - 'openid' => $token['openid'], - 'lang' => $language, - ]), - ]); - - return json_decode($response->getBody(), true); - } - - /** - * {@inheritdoc}. - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'openid'), - 'name' => $this->arrayItem($user, 'nickname'), - 'nickname' => $this->arrayItem($user, 'nickname'), - 'avatar' => $this->arrayItem($user, 'headimgurl'), - 'email' => null, - ]); - } - - /** - * {@inheritdoc}. - */ - protected function getTokenFields($code) - { - return array_filter([ - 'appid' => $this->getConfig()->get('client_id'), - 'secret' => $this->getConfig()->get('client_secret'), - 'component_appid' => $this->component ? $this->component->getAppId() : null, - 'component_access_token' => $this->component ? $this->component->getToken() : null, - 'code' => $code, - 'grant_type' => 'authorization_code', - ]); - } - - /** - * Remove the fucking callback parentheses. - * - * @param mixed $response - * - * @return string - */ - protected function removeCallback($response) - { - if (false !== strpos($response, 'callback')) { - $lpos = strpos($response, '('); - $rpos = strrpos($response, ')'); - $response = substr($response, $lpos + 1, $rpos - $lpos - 1); - } - - return $response; - } -} diff --git a/vendor/overtrue/socialite/src/Providers/WeWorkProvider.php b/vendor/overtrue/socialite/src/Providers/WeWorkProvider.php deleted file mode 100644 index 7efde33..0000000 --- a/vendor/overtrue/socialite/src/Providers/WeWorkProvider.php +++ /dev/null @@ -1,214 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class WeWorkProvider. - * - * @author mingyoung - */ -class WeWorkProvider extends AbstractProvider implements ProviderInterface -{ - /** - * @var string - */ - protected $agentId; - - /** - * @var bool - */ - protected $detailed = false; - - /** - * Set agent id. - * - * @param string $agentId - * - * @return $this - */ - public function setAgentId($agentId) - { - $this->agentId = $agentId; - - return $this; - } - - /** - * @param string $agentId - * - * @return $this - */ - public function agent($agentId) - { - return $this->setAgentId($agentId); - } - - /** - * Return user details. - * - * @return $this - */ - public function detailed() - { - $this->detailed = true; - - return $this; - } - - /** - * @param string $state - * - * @return string - */ - protected function getAuthUrl($state) - { - // 网页授权登录 - if (!empty($this->scopes)) { - return $this->getOAuthUrl($state); - } - - // 第三方网页应用登录(扫码登录) - return $this->getQrConnectUrl($state); - } - - /** - * OAuth url. - * - * @param string $state - * - * @return string - */ - protected function getOAuthUrl($state) - { - $queries = [ - 'appid' => $this->getConfig()->get('client_id'), - 'redirect_uri' => $this->redirectUrl, - 'response_type' => 'code', - 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), - 'agentid' => $this->agentId, - 'state' => $state, - ]; - - return sprintf('https://open.weixin.qq.com/connect/oauth2/authorize?%s#wechat_redirect', http_build_query($queries)); - } - - /** - * Qr connect url. - * - * @param string $state - * - * @return string - */ - protected function getQrConnectUrl($state) - { - $queries = [ - 'appid' => $this->getConfig()->get('client_id'), - 'agentid' => $this->agentId, - 'redirect_uri' => $this->redirectUrl, - 'state' => $state, - ]; - - return 'https://open.work.weixin.qq.com/wwopen/sso/qrConnect?'.http_build_query($queries); - } - - protected function getTokenUrl() - { - return null; - } - - /** - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return mixed - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $userInfo = $this->getUserInfo($token); - - if ($this->detailed && isset($userInfo['user_ticket'])) { - return $this->getUserDetail($token, $userInfo['user_ticket']); - } - - $this->detailed = false; - - return $userInfo; - } - - /** - * Get user base info. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return mixed - */ - protected function getUserInfo(AccessTokenInterface $token) - { - $response = $this->getHttpClient()->get('https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo', [ - 'query' => array_filter([ - 'access_token' => $token->getToken(), - 'code' => $this->getCode(), - ]), - ]); - - return json_decode($response->getBody(), true); - } - - /** - * Get user detail info. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * @param $ticket - * - * @return mixed - */ - protected function getUserDetail(AccessTokenInterface $token, $ticket) - { - $response = $this->getHttpClient()->post('https://qyapi.weixin.qq.com/cgi-bin/user/getuserdetail', [ - 'query' => [ - 'access_token' => $token->getToken(), - ], - 'json' => [ - 'user_ticket' => $ticket, - ], - ]); - - return json_decode($response->getBody(), true); - } - - /** - * @param array $user - * - * @return \Overtrue\Socialite\User - */ - protected function mapUserToObject(array $user) - { - if ($this->detailed) { - return new User([ - 'id' => $this->arrayItem($user, 'userid'), - 'name' => $this->arrayItem($user, 'name'), - 'avatar' => $this->arrayItem($user, 'avatar'), - 'email' => $this->arrayItem($user, 'email'), - ]); - } - - return new User(array_filter([ - 'id' => $this->arrayItem($user, 'UserId') ?: $this->arrayItem($user, 'OpenId'), - 'userId' => $this->arrayItem($user, 'UserId'), - 'openid' => $this->arrayItem($user, 'OpenId'), - 'deviceId' => $this->arrayItem($user, 'DeviceId'), - ])); - } -} diff --git a/vendor/overtrue/socialite/src/Providers/WeiboProvider.php b/vendor/overtrue/socialite/src/Providers/WeiboProvider.php deleted file mode 100644 index 47ec56d..0000000 --- a/vendor/overtrue/socialite/src/Providers/WeiboProvider.php +++ /dev/null @@ -1,126 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite\Providers; - -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\ProviderInterface; -use Overtrue\Socialite\User; - -/** - * Class WeiboProvider. - * - * @see http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E [OAuth 2.0 授权机制说明] - */ -class WeiboProvider extends AbstractProvider implements ProviderInterface -{ - /** - * The base url of Weibo API. - * - * @var string - */ - protected $baseUrl = 'https://api.weibo.com'; - - /** - * The API version for the request. - * - * @var string - */ - protected $version = '2'; - - /** - * The scopes being requested. - * - * @var array - */ - protected $scopes = ['email']; - - /** - * The uid of user authorized. - * - * @var int - */ - protected $uid; - - /** - * Get the authentication URL for the provider. - * - * @param string $state - * - * @return string - */ - protected function getAuthUrl($state) - { - return $this->buildAuthUrlFromBase($this->baseUrl.'/oauth2/authorize', $state); - } - - /** - * Get the token URL for the provider. - * - * @return string - */ - protected function getTokenUrl() - { - return $this->baseUrl.'/'.$this->version.'/oauth2/access_token'; - } - - /** - * Get the Post fields for the token request. - * - * @param string $code - * - * @return array - */ - protected function getTokenFields($code) - { - return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; - } - - /** - * Get the raw user for the given access token. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return array - */ - protected function getUserByToken(AccessTokenInterface $token) - { - $response = $this->getHttpClient()->get($this->baseUrl.'/'.$this->version.'/users/show.json', [ - 'query' => [ - 'uid' => $token['uid'], - 'access_token' => $token->getToken(), - ], - 'headers' => [ - 'Accept' => 'application/json', - ], - ]); - - return json_decode($response->getBody(), true); - } - - /** - * Map the raw user array to a Socialite User instance. - * - * @param array $user - * - * @return \Overtrue\Socialite\User - */ - protected function mapUserToObject(array $user) - { - return new User([ - 'id' => $this->arrayItem($user, 'id'), - 'nickname' => $this->arrayItem($user, 'screen_name'), - 'name' => $this->arrayItem($user, 'name'), - 'email' => $this->arrayItem($user, 'email'), - 'avatar' => $this->arrayItem($user, 'avatar_large'), - ]); - } -} diff --git a/vendor/overtrue/socialite/src/SocialiteManager.php b/vendor/overtrue/socialite/src/SocialiteManager.php deleted file mode 100644 index cc109ab..0000000 --- a/vendor/overtrue/socialite/src/SocialiteManager.php +++ /dev/null @@ -1,251 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -use Closure; -use InvalidArgumentException; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Session\Session; - -/** - * Class SocialiteManager. - */ -class SocialiteManager implements FactoryInterface -{ - /** - * The configuration. - * - * @var \Overtrue\Socialite\Config - */ - protected $config; - - /** - * The request instance. - * - * @var Request - */ - protected $request; - - /** - * The registered custom driver creators. - * - * @var array - */ - protected $customCreators = []; - - /** - * The initial drivers. - * - * @var array - */ - protected $initialDrivers = [ - 'facebook' => 'Facebook', - 'github' => 'GitHub', - 'google' => 'Google', - 'linkedin' => 'Linkedin', - 'weibo' => 'Weibo', - 'qq' => 'QQ', - 'wechat' => 'WeChat', - 'douban' => 'Douban', - 'wework' => 'WeWork', - 'outlook' => 'Outlook', - 'douyin' => 'DouYin', - 'taobao' => 'Taobao', - 'feishu' => 'FeiShu', - ]; - - /** - * The array of created "drivers". - * - * @var ProviderInterface[] - */ - protected $drivers = []; - - /** - * SocialiteManager constructor. - * - * @param array $config - * @param Request|null $request - */ - public function __construct(array $config, Request $request = null) - { - $this->config = new Config($config); - - if ($this->config->has('guzzle')) { - Providers\AbstractProvider::setGuzzleOptions($this->config->get('guzzle')); - } - - if ($request) { - $this->setRequest($request); - } - } - - /** - * Set config instance. - * - * @param \Overtrue\Socialite\Config $config - * - * @return $this - */ - public function config(Config $config) - { - $this->config = $config; - - return $this; - } - - /** - * Get a driver instance. - * - * @param string $driver - * - * @return ProviderInterface - */ - public function driver($driver) - { - $driver = strtolower($driver); - - if (!isset($this->drivers[$driver])) { - $this->drivers[$driver] = $this->createDriver($driver); - } - - return $this->drivers[$driver]; - } - - /** - * @param \Symfony\Component\HttpFoundation\Request $request - * - * @return $this - */ - public function setRequest(Request $request) - { - $this->request = $request; - - return $this; - } - - /** - * @return \Symfony\Component\HttpFoundation\Request - */ - public function getRequest() - { - return $this->request ?: $this->createDefaultRequest(); - } - - /** - * Create a new driver instance. - * - * @param string $driver - * - * @throws \InvalidArgumentException - * - * @return ProviderInterface - */ - protected function createDriver($driver) - { - if (isset($this->customCreators[$driver])) { - return $this->callCustomCreator($driver); - } - - if (isset($this->initialDrivers[$driver])) { - $provider = $this->initialDrivers[$driver]; - $provider = __NAMESPACE__.'\\Providers\\'.$provider.'Provider'; - - return $this->buildProvider($provider, $this->formatConfig($this->config->get($driver))); - } - - throw new InvalidArgumentException("Driver [$driver] not supported."); - } - - /** - * Call a custom driver creator. - * - * @param string $driver - * - * @return ProviderInterface - */ - protected function callCustomCreator($driver) - { - return $this->customCreators[$driver]($this->config); - } - - /** - * Create default request instance. - * - * @return Request - */ - protected function createDefaultRequest() - { - $request = Request::createFromGlobals(); - $session = new Session(); - - $request->setSession($session); - - return $request; - } - - /** - * Register a custom driver creator Closure. - * - * @param string $driver - * @param \Closure $callback - * - * @return $this - */ - public function extend($driver, Closure $callback) - { - $driver = strtolower($driver); - - $this->customCreators[$driver] = $callback; - - return $this; - } - - /** - * Get all of the created "drivers". - * - * @return ProviderInterface[] - */ - public function getDrivers() - { - return $this->drivers; - } - - /** - * Build an OAuth 2 provider instance. - * - * @param string $provider - * @param array $config - * - * @return ProviderInterface - */ - public function buildProvider($provider, $config) - { - return new $provider($this->getRequest(), $config); - } - - /** - * Format the server configuration. - * - * @param array $config - * - * @return array - */ - public function formatConfig(array $config) - { - return array_merge([ - 'identifier' => $config['client_id'], - 'secret' => $config['client_secret'], - 'callback_uri' => $config['redirect'], - ], $config); - } -} diff --git a/vendor/overtrue/socialite/src/User.php b/vendor/overtrue/socialite/src/User.php deleted file mode 100644 index 761ac8f..0000000 --- a/vendor/overtrue/socialite/src/User.php +++ /dev/null @@ -1,204 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -use ArrayAccess; -use JsonSerializable; - -/** - * Class User. - */ -class User implements ArrayAccess, UserInterface, JsonSerializable, \Serializable -{ - use HasAttributes; - - /** - * User constructor. - * - * @param array $attributes - */ - public function __construct(array $attributes) - { - $this->attributes = $attributes; - } - - /** - * Get the unique identifier for the user. - * - * @return string - */ - public function getId() - { - return $this->getAttribute('id'); - } - - /** - * Get the username for the user. - * - * @return string - */ - public function getUsername() - { - return $this->getAttribute('username', $this->getId()); - } - - /** - * Get the nickname / username for the user. - * - * @return string - */ - public function getNickname() - { - return $this->getAttribute('nickname'); - } - - /** - * Get the full name of the user. - * - * @return string - */ - public function getName() - { - return $this->getAttribute('name'); - } - - /** - * Get the e-mail address of the user. - * - * @return string - */ - public function getEmail() - { - return $this->getAttribute('email'); - } - - /** - * Get the avatar / image URL for the user. - * - * @return string - */ - public function getAvatar() - { - return $this->getAttribute('avatar'); - } - - /** - * Set the token on the user. - * - * @param \Overtrue\Socialite\AccessTokenInterface $token - * - * @return $this - */ - public function setToken(AccessTokenInterface $token) - { - $this->setAttribute('token', $token->getToken()); - $this->setAttribute('access_token', $token->getToken()); - - if (\is_callable([$token, 'getRefreshToken'])) { - $this->setAttribute('refresh_token', $token->getRefreshToken()); - } - - return $this; - } - - /** - * @param string $provider - * - * @return $this - */ - public function setProviderName($provider) - { - $this->setAttribute('provider', $provider); - - return $this; - } - - /** - * @return string - */ - public function getProviderName() - { - return $this->getAttribute('provider'); - } - - /** - * Get the authorized token. - * - * @return \Overtrue\Socialite\AccessToken - */ - public function getToken() - { - return new AccessToken([ - 'access_token' => $this->getAccessToken(), - 'refresh_token' => $this->getAttribute('refresh_token') - ]); - } - - /** - * Get user access token. - * - * @return string - */ - public function getAccessToken() - { - return $this->getAttribute('token') ?: $this->getAttribute('access_token'); - } - - /** - * Get user refresh token. - * - * @return string - */ - public function getRefreshToken() - { - return $this->getAttribute('refresh_token'); - } - - /** - * Get the original attributes. - * - * @return array - */ - public function getOriginal() - { - return $this->getAttribute('original'); - } - - /** - * {@inheritdoc} - */ - public function jsonSerialize() - { - return $this->attributes; - } - - public function serialize() - { - return serialize($this->attributes); - } - - /** - * Constructs the object. - * - * @see https://php.net/manual/en/serializable.unserialize.php - * - * @param string $serialized

    - * The string representation of the object. - *

    - * - * @since 5.1.0 - */ - public function unserialize($serialized) - { - $this->attributes = unserialize($serialized) ?: []; - } -} diff --git a/vendor/overtrue/socialite/src/UserInterface.php b/vendor/overtrue/socialite/src/UserInterface.php deleted file mode 100644 index 1403339..0000000 --- a/vendor/overtrue/socialite/src/UserInterface.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -/** - * Interface UserInterface. - */ -interface UserInterface -{ - /** - * Get the unique identifier for the user. - * - * @return string - */ - public function getId(); - - /** - * Get the nickname / username for the user. - * - * @return string - */ - public function getNickname(); - - /** - * Get the full name of the user. - * - * @return string - */ - public function getName(); - - /** - * Get the e-mail address of the user. - * - * @return string - */ - public function getEmail(); - - /** - * Get the avatar / image URL for the user. - * - * @return string - */ - public function getAvatar(); -} diff --git a/vendor/overtrue/socialite/src/WeChatComponentInterface.php b/vendor/overtrue/socialite/src/WeChatComponentInterface.php deleted file mode 100644 index 1754521..0000000 --- a/vendor/overtrue/socialite/src/WeChatComponentInterface.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace Overtrue\Socialite; - -/** - * Interface WeChatComponentInterface. - */ -interface WeChatComponentInterface -{ - /** - * Return the open-platform component app id. - * - * @return string - */ - public function getAppId(); - - /** - * Return the open-platform component access token string. - * - * @return string - */ - public function getToken(); -} diff --git a/vendor/overtrue/socialite/tests/OAuthTest.php b/vendor/overtrue/socialite/tests/OAuthTest.php deleted file mode 100644 index 64d360b..0000000 --- a/vendor/overtrue/socialite/tests/OAuthTest.php +++ /dev/null @@ -1,243 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -use Mockery as m; -use Overtrue\Socialite\AccessTokenInterface; -use Overtrue\Socialite\Providers\AbstractProvider; -use Overtrue\Socialite\User; -use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\Request; - -class OAuthTest extends TestCase -{ - public function tearDown() - { - m::close(); - } - - public function testAbstractProviderBackwardCompatible() - { - $request = Request::create('foo'); - $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); - $session->shouldReceive('put')->once(); - $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret', 'redirect'); - - $this->assertSame('client_id', $provider->getConfig()['client_id']); - $this->assertSame('client_secret', $provider->getConfig()['client_secret']); - $this->assertSame('redirect', $provider->getConfig()['redirect']); - - $response = $provider->redirect(); - - $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); - $this->assertSame('http://auth.url', $response->getTargetUrl()); - } - - public function testRedirectGeneratesTheProperSymfonyRedirectResponse() - { - $request = Request::create('foo'); - $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); - $session->shouldReceive('put')->once(); - $provider = new OAuthTwoTestProviderStub( - $request, [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'redirect', - ] - ); - $response = $provider->redirect(); - - $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); - $this->assertSame('http://auth.url', $response->getTargetUrl()); - } - - public function testRedirectUrl() - { - $request = Request::create('foo', 'GET', ['state' => str_repeat('A', 40), 'code' => 'code']); - $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); - - $provider = new OAuthTwoTestProviderStub( - $request, [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - ] - ); - $this->assertNull($provider->getRedirectUrl()); - - $provider = new OAuthTwoTestProviderStub( - $request, [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'redirect_uri', - ] - ); - $this->assertSame('redirect_uri', $provider->getRedirectUrl()); - $provider->setRedirectUrl('overtrue.me'); - $this->assertSame('overtrue.me', $provider->getRedirectUrl()); - - $provider->withRedirectUrl('http://overtrue.me'); - $this->assertSame('http://overtrue.me', $provider->getRedirectUrl()); - } - - public function testUserReturnsAUserInstanceForTheAuthenticatedRequest() - { - $request = Request::create('foo', 'GET', ['state' => str_repeat('A', 40), 'code' => 'code']); - $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); - - $session->shouldReceive('get')->once()->with('state')->andReturn(str_repeat('A', 40)); - $provider = new OAuthTwoTestProviderStub( - $request, [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'redirect_uri', - ] - ); - $provider->http = m::mock('StdClass'); - $provider->http->shouldReceive('post')->once()->with( - 'http://token.url', - [ - 'headers' => ['Accept' => 'application/json'], - 'form_params' => [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'code' => 'code', - 'redirect_uri' => 'redirect_uri', - ], - ] - )->andReturn($response = m::mock('StdClass')); - $response->shouldReceive('getBody')->once()->andReturn('{"access_token":"access_token"}'); - $user = $provider->user(); - - $this->assertInstanceOf('Overtrue\Socialite\User', $user); - $this->assertSame('foo', $user->getId()); - } - - /** - * @expectedException \Overtrue\Socialite\InvalidStateException - */ - public function testExceptionIsThrownIfStateIsInvalid() - { - $request = Request::create('foo', 'GET', ['state' => str_repeat('B', 40), 'code' => 'code']); - $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); - $session->shouldReceive('get')->once()->with('state')->andReturn(str_repeat('A', 40)); - $provider = new OAuthTwoTestProviderStub( - $request, [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'redirect', - ] - ); - $user = $provider->user(); - } - - /** - * @expectedException \Overtrue\Socialite\AuthorizeFailedException - * @expectedExceptionMessage Authorize Failed: {"error":"scope is invalid"} - */ - public function testExceptionisThrownIfAuthorizeFailed() - { - $request = Request::create('foo', 'GET', ['state' => str_repeat('A', 40), 'code' => 'code']); - $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); - $session->shouldReceive('get')->once()->with('state')->andReturn(str_repeat('A', 40)); - $provider = new OAuthTwoTestProviderStub( - $request, [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'redirect_uri', - ] - ); - $provider->http = m::mock('StdClass'); - $provider->http->shouldReceive('post')->once()->with( - 'http://token.url', - [ - 'headers' => ['Accept' => 'application/json'], - 'form_params' => [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'code' => 'code', - 'redirect_uri' => 'redirect_uri', - ], - ] - )->andReturn($response = m::mock('StdClass')); - $response->shouldReceive('getBody')->once()->andReturn('{"error":"scope is invalid"}'); - $user = $provider->user(); - } - - /** - * @expectedException \Overtrue\Socialite\InvalidStateException - */ - public function testExceptionIsThrownIfStateIsNotSet() - { - $request = Request::create('foo', 'GET', ['state' => 'state', 'code' => 'code']); - $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); - $session->shouldReceive('get')->once()->with('state'); - $provider = new OAuthTwoTestProviderStub( - $request, [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'redirect', - ] - ); - $user = $provider->user(); - } - - public function testDriverName() - { - $request = Request::create('foo', 'GET', ['state' => 'state', 'code' => 'code']); - $provider = new OAuthTwoTestProviderStub( - $request, [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'redirect', - ] - ); - - $this->assertSame('OAuthTwoTest', $provider->getName()); - } -} - -class OAuthTwoTestProviderStub extends AbstractProvider -{ - public $http; - - protected function getAuthUrl($state) - { - return 'http://auth.url'; - } - - protected function getTokenUrl() - { - return 'http://token.url'; - } - - protected function getUserByToken(AccessTokenInterface $token) - { - return ['id' => 'foo']; - } - - protected function mapUserToObject(array $user) - { - return new User(['id' => $user['id']]); - } - - /** - * Get a fresh instance of the Guzzle HTTP client. - * - * @return \GuzzleHttp\Client - */ - protected function getHttpClient() - { - if ($this->http) { - return $this->http; - } - - return $this->http = m::mock('StdClass'); - } -} diff --git a/vendor/overtrue/socialite/tests/Providers/WeWorkProviderTest.php b/vendor/overtrue/socialite/tests/Providers/WeWorkProviderTest.php deleted file mode 100644 index 9780930..0000000 --- a/vendor/overtrue/socialite/tests/Providers/WeWorkProviderTest.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -use Overtrue\Socialite\Providers\WeWorkProvider; -use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\Request; - -class WeWorkProviderTest extends TestCase -{ - public function testQrConnect() - { - $response = (new WeWorkProvider(Request::create('foo'), [ - 'client_id' => 'ww100000a5f2191', - 'client_secret' => 'client_secret', - 'redirect' => 'http://www.oa.com', - ])) - ->setAgentId('1000000') - ->stateless() - ->redirect(); - - $this->assertSame('https://open.work.weixin.qq.com/wwopen/sso/qrConnect?appid=ww100000a5f2191&agentid=1000000&redirect_uri=http%3A%2F%2Fwww.oa.com', $response->getTargetUrl()); - } - - public function testOAuthWithAgentId() - { - $response = (new WeWorkProvider(Request::create('foo'), [ - 'client_id' => 'CORPID', - 'client_secret' => 'client_secret', - 'redirect' => 'REDIRECT_URI', - ])) - ->scopes(['snsapi_base']) - ->setAgentId('1000000') - ->stateless() - ->redirect(); - - $this->assertSame('https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base&agentid=1000000#wechat_redirect', $response->getTargetUrl()); - } - - public function testOAuthWithoutAgentId() - { - $response = (new WeWorkProvider(Request::create('foo'), [ - 'client_id' => 'CORPID', - 'client_secret' => 'client_secret', - 'redirect' => 'REDIRECT_URI', - ])) - ->scopes(['snsapi_base']) - ->stateless() - ->redirect(); - - $this->assertSame('https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base#wechat_redirect', $response->getTargetUrl()); - } -} diff --git a/vendor/overtrue/socialite/tests/UserTest.php b/vendor/overtrue/socialite/tests/UserTest.php deleted file mode 100644 index 49adf43..0000000 --- a/vendor/overtrue/socialite/tests/UserTest.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -use Overtrue\Socialite\AccessToken; -use Overtrue\Socialite\User; -use PHPUnit\Framework\TestCase; - -class UserTest extends TestCase -{ - public function testJsonserialize() - { - $this->assertSame('[]', json_encode(new User([]))); - - $this->assertSame('{"token":"mock-token"}', json_encode(new User(['token' => new AccessToken(['access_token' => 'mock-token'])]))); - } - - public function test_it_can_get_refresh_token() - { - $user = new User([ - 'access_token' => 'mock-token', - 'refresh_token' => 'fake_refresh', - ]); - - // 能通过用 User 对象获取 refresh token - $this->assertSame('fake_refresh', $user->getRefreshToken()); - // json 序列化只有 token 字段 - $this->assertSame('{"access_token":"mock-token","refresh_token":"fake_refresh"}', json_encode($user)); - - $user = new User([]); - $user->setToken(new AccessToken([ - 'access_token' => 'mock-token', - 'refresh_token' => 'fake_refresh', - ])); - $this->assertSame('fake_refresh', $user->getRefreshToken()); - $this->assertSame('{"token":"mock-token","access_token":"mock-token","refresh_token":"fake_refresh"}', json_encode($user)); - } -} diff --git a/vendor/overtrue/socialite/tests/WechatProviderTest.php b/vendor/overtrue/socialite/tests/WechatProviderTest.php deleted file mode 100644 index 74621df..0000000 --- a/vendor/overtrue/socialite/tests/WechatProviderTest.php +++ /dev/null @@ -1,137 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -use Overtrue\Socialite\Providers\WeChatProvider as RealWeChatProvider; -use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpFoundation\Request; - -class WechatProviderTest extends TestCase -{ - public function testWeChatProviderHasCorrectlyRedirectResponse() - { - $response = (new WeChatProvider(Request::create('foo'), [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'http://localhost/socialite/callback.php', - ]))->redirect(); - - $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); - $this->assertStringStartsWith('https://open.weixin.qq.com/connect/qrconnect', $response->getTargetUrl()); - $this->assertRegExp('/redirect_uri=http%3A%2F%2Flocalhost%2Fsocialite%2Fcallback.php/', $response->getTargetUrl()); - } - - public function testWeChatProviderTokenUrlAndRequestFields() - { - $provider = new WeChatProvider(Request::create('foo'), [ - 'client_id' => 'client_id', - 'client_secret' => 'client_secret', - 'redirect' => 'http://localhost/socialite/callback.php', - ]); - - $this->assertSame('https://api.weixin.qq.com/sns/oauth2/access_token', $provider->tokenUrl()); - $this->assertSame([ - 'appid' => 'client_id', - 'secret' => 'client_secret', - 'code' => 'iloveyou', - 'grant_type' => 'authorization_code', - ], $provider->tokenFields('iloveyou')); - - $this->assertSame([ - 'appid' => 'client_id', - 'redirect_uri' => 'http://localhost/socialite/callback.php', - 'response_type' => 'code', - 'scope' => 'snsapi_login', - 'state' => 'wechat-state', - 'connect_redirect' => 1, - ], $provider->codeFields('wechat-state')); - } - - public function testOpenPlatformComponent() - { - $provider = new WeChatProvider(Request::create('foo'), [ - 'client_id' => 'client_id', - 'client_secret' => null, - 'redirect' => 'redirect-url', - ]); - $provider->component(new WeChatComponent()); - $this->assertSame([ - 'appid' => 'client_id', - 'redirect_uri' => 'redirect-url', - 'response_type' => 'code', - 'scope' => 'snsapi_base', - 'state' => 'state', - 'connect_redirect' => 1, - 'component_appid' => 'component-app-id', - ], $provider->codeFields('state')); - - $this->assertSame([ - 'appid' => 'client_id', - 'component_appid' => 'component-app-id', - 'component_access_token' => 'token', - 'code' => 'simcode', - 'grant_type' => 'authorization_code', - ], $provider->tokenFields('simcode')); - - $this->assertSame('https://api.weixin.qq.com/sns/oauth2/component/access_token', $provider->tokenUrl()); - } - - public function testOpenPlatformComponentWithCustomParameters() - { - $provider = new WeChatProvider(Request::create('foo'), [ - 'client_id' => 'client_id', - 'client_secret' => null, - 'redirect' => 'redirect-url', - ]); - $provider->component(new WeChatComponent()); - $provider->with(['foo' => 'bar']); - - $fields = $provider->codeFields('wechat-state'); - - $this->assertArrayHasKey('foo', $fields); - $this->assertSame('bar', $fields['foo']); - } -} - -trait ProviderTrait -{ - public function tokenUrl() - { - return $this->getTokenUrl(); - } - - public function tokenFields($code) - { - return $this->getTokenFields($code); - } - - public function codeFields($state = null) - { - return $this->getCodeFields($state); - } -} - -class WeChatProvider extends RealWeChatProvider -{ - use ProviderTrait; -} - -class WeChatComponent implements \Overtrue\Socialite\WeChatComponentInterface -{ - public function getAppId() - { - return 'component-app-id'; - } - - public function getToken() - { - return 'token'; - } -} diff --git a/vendor/overtrue/wechat/CHANGELOG.md b/vendor/overtrue/wechat/CHANGELOG.md deleted file mode 100644 index df42aa6..0000000 --- a/vendor/overtrue/wechat/CHANGELOG.md +++ /dev/null @@ -1,1401 +0,0 @@ -# Change Log - -## [Unreleased](https://github.com/overtrue/wechat/tree/HEAD) - -[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0...HEAD) - -**Closed issues:** - -- 能否增加对symfony4的支持 [\#1044](https://github.com/overtrue/wechat/issues/1044) - -## [4.0.0](https://github.com/overtrue/wechat/tree/4.0.0) (2017-12-11) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.21...4.0.0) - -**Closed issues:** - -- filecache.php 文件 createPathIfNeeded\(string $path\) : bool [\#1046](https://github.com/overtrue/wechat/issues/1046) -- 沙箱模式的Notify总是出错:Invalid request payloads. [\#1045](https://github.com/overtrue/wechat/issues/1045) -- 你好我是SwooleDistributed框架的作者 [\#1040](https://github.com/overtrue/wechat/issues/1040) - -## [3.3.21](https://github.com/overtrue/wechat/tree/3.3.21) (2017-12-10) -[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-beta.4...3.3.21) - -**Closed issues:** - -- 开启开放平台自动路由后报错 [\#1042](https://github.com/overtrue/wechat/issues/1042) -- 关于3.x升级4.x的问题 [\#1041](https://github.com/overtrue/wechat/issues/1041) -- 获取不了unionid [\#1038](https://github.com/overtrue/wechat/issues/1038) -- authorizer\_refresh\_token刷新问题 [\#1033](https://github.com/overtrue/wechat/issues/1033) -- lumen+swoole无法获取request信息。 [\#1032](https://github.com/overtrue/wechat/issues/1032) -- 上传素材报错, empty post data hint [\#1031](https://github.com/overtrue/wechat/issues/1031) -- 开放平台不支持全网发布接入检测(第三方) [\#1029](https://github.com/overtrue/wechat/issues/1029) -- 公众号模板消息不兼容跳转小程序 [\#1025](https://github.com/overtrue/wechat/issues/1025) -- swoole下无法使用 [\#1017](https://github.com/overtrue/wechat/issues/1017) -- 请教有没有高清素材下载方法? [\#997](https://github.com/overtrue/wechat/issues/997) -- 自动回复多图文素材,错误 [\#996](https://github.com/overtrue/wechat/issues/996) -- xml解释失败 [\#989](https://github.com/overtrue/wechat/issues/989) -- Curl error 77 [\#982](https://github.com/overtrue/wechat/issues/982) -- 3.1.10 H5支付不晓得算不算BUG的BUG [\#968](https://github.com/overtrue/wechat/issues/968) -- 请问是否有遇到微信扫码或内部打开外部网站出现请求2次的情况 [\#963](https://github.com/overtrue/wechat/issues/963) -- 请问4.0何时正式发布? [\#962](https://github.com/overtrue/wechat/issues/962) -- dev-master 不能用于laravel5.1 [\#952](https://github.com/overtrue/wechat/issues/952) -- 请教小程序的模板消息是否支持 [\#920](https://github.com/overtrue/wechat/issues/920) -- 模板消息的颜色设置问题 [\#914](https://github.com/overtrue/wechat/issues/914) -- 英文文档跳转问题 [\#854](https://github.com/overtrue/wechat/issues/854) -- \[4.0\] 功能测试 [\#849](https://github.com/overtrue/wechat/issues/849) -- \[4.0\] 命名变更 [\#743](https://github.com/overtrue/wechat/issues/743) - -**Merged pull requests:** - -- Scrutinizer Auto-Fixes [\#1043](https://github.com/overtrue/wechat/pull/1043) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- 修复解密小程序转发信息数据\(wx.getShareInfo\)失败的问题 [\#1037](https://github.com/overtrue/wechat/pull/1037) ([yyqqing](https://github.com/yyqqing)) -- 修復微信支付沙盒模式的通知結果本地校驗失敗錯誤。 [\#1036](https://github.com/overtrue/wechat/pull/1036) ([amyuki](https://github.com/amyuki)) -- 修复 verifyTicket 使用不了自定义缓存的问题 [\#1034](https://github.com/overtrue/wechat/pull/1034) ([mingyoung](https://github.com/mingyoung)) -- 🚧 Auto discover extensions. [\#1027](https://github.com/overtrue/wechat/pull/1027) ([mingyoung](https://github.com/mingyoung)) - -## [4.0.0-beta.4](https://github.com/overtrue/wechat/tree/4.0.0-beta.4) (2017-11-21) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.20...4.0.0-beta.4) - -**Closed issues:** - -- Order对象的$attributes中不能传入device\_info参数 [\#1030](https://github.com/overtrue/wechat/issues/1030) -- 默认文件缓存的路径是否可以简单修改? [\#1023](https://github.com/overtrue/wechat/issues/1023) -- 3.3.17 版本获取 token 的问题 [\#1022](https://github.com/overtrue/wechat/issues/1022) -- \[V3\] AccessToken.php:243 [\#1021](https://github.com/overtrue/wechat/issues/1021) - -**Merged pull requests:** - -- more detailed cache key. [\#1028](https://github.com/overtrue/wechat/pull/1028) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#1026](https://github.com/overtrue/wechat/pull/1026) ([mingyoung](https://github.com/mingyoung)) -- Specify the request instance. [\#1024](https://github.com/overtrue/wechat/pull/1024) ([mingyoung](https://github.com/mingyoung)) - -## [3.3.20](https://github.com/overtrue/wechat/tree/3.3.20) (2017-11-13) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.18...3.3.20) - -## [3.3.18](https://github.com/overtrue/wechat/tree/3.3.18) (2017-11-11) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.17...3.3.18) - -**Closed issues:** - -- 临时二维码接口无法生成以字符串为参数的二维码 [\#1020](https://github.com/overtrue/wechat/issues/1020) -- 现金红包出现了500错误,跟进显示http\_error:true [\#1016](https://github.com/overtrue/wechat/issues/1016) -- 4.0 企业微信agent OA的错误 [\#1015](https://github.com/overtrue/wechat/issues/1015) -- 求thinkphp框架demo [\#1010](https://github.com/overtrue/wechat/issues/1010) -- 沙箱模式获取验签 key 时产生无限循环 , 无法正常获取 [\#1009](https://github.com/overtrue/wechat/issues/1009) -- JSSDK里面url导致的invalid signature错误 [\#1002](https://github.com/overtrue/wechat/issues/1002) -- 微信支付沙箱模式下,回调验签错误 [\#998](https://github.com/overtrue/wechat/issues/998) -- 有微信退款回调接口吗? [\#985](https://github.com/overtrue/wechat/issues/985) -- 希望兼容新出的微信H5支付 [\#966](https://github.com/overtrue/wechat/issues/966) -- 小程序生成无限量二维码接口缺少参数 [\#965](https://github.com/overtrue/wechat/issues/965) - -**Merged pull requests:** - -- 查询企业付款接口参数调整,加入企业付款到银行卡接口(RSA 参数加密待完成) [\#1019](https://github.com/overtrue/wechat/pull/1019) ([tianyong90](https://github.com/tianyong90)) -- Token AESKey can be null. [\#1013](https://github.com/overtrue/wechat/pull/1013) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#1012](https://github.com/overtrue/wechat/pull/1012) ([mingyoung](https://github.com/mingyoung)) -- Add Mini-program tester's binding/unbinding feature [\#1011](https://github.com/overtrue/wechat/pull/1011) ([caikeal](https://github.com/caikeal)) -- Apply fixes from StyleCI [\#1008](https://github.com/overtrue/wechat/pull/1008) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#1007](https://github.com/overtrue/wechat/pull/1007) ([overtrue](https://github.com/overtrue)) -- Added open-platform's mini-program code management [\#1003](https://github.com/overtrue/wechat/pull/1003) ([caikeal](https://github.com/caikeal)) -- Cleanup payment [\#1001](https://github.com/overtrue/wechat/pull/1001) ([mingyoung](https://github.com/mingyoung)) -- Unify get stream. [\#995](https://github.com/overtrue/wechat/pull/995) ([mingyoung](https://github.com/mingyoung)) -- Add appCode `page` param. [\#991](https://github.com/overtrue/wechat/pull/991) ([mingyoung](https://github.com/mingyoung)) - -## [3.3.17](https://github.com/overtrue/wechat/tree/3.3.17) (2017-10-27) -[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-beta.3...3.3.17) - -**Closed issues:** - -- open platform component\_verify\_ticket 错误 [\#984](https://github.com/overtrue/wechat/issues/984) -- 请教下载语音后的文件不完整怎么处理? [\#980](https://github.com/overtrue/wechat/issues/980) -- 微信支付 API 调用下单解析缓缓 [\#977](https://github.com/overtrue/wechat/issues/977) -- 是否可以加入微信收款(个人转账版)服务接口 [\#970](https://github.com/overtrue/wechat/issues/970) -- 微信公众号消息加解密方式‘兼容模式’也需要填写‘aes\_key’参数,不能为空 [\#967](https://github.com/overtrue/wechat/issues/967) -- 第三方平台 接收消息一直报错 但是能回复消息 也会提示错误 [\#961](https://github.com/overtrue/wechat/issues/961) -- 中文官网无法访问 [\#960](https://github.com/overtrue/wechat/issues/960) -- laravel队列中使用了SDK报Component verify ticket does not exists. [\#958](https://github.com/overtrue/wechat/issues/958) -- 接口调用次数每日限额清零方法没有? [\#953](https://github.com/overtrue/wechat/issues/953) -- 获取access\_toekn失败之后抛出异常的地方,能够与其他地方统一使用下述这个 resolveResponse 返回数据 [\#951](https://github.com/overtrue/wechat/issues/951) -- 官网挂了 [\#950](https://github.com/overtrue/wechat/issues/950) -- 无法接收到菜单点击事件推送的消息 [\#949](https://github.com/overtrue/wechat/issues/949) -- 请教这个sdk是否可用于android 或者ios 登录? [\#948](https://github.com/overtrue/wechat/issues/948) -- 关于access token 后端分布式部署的中控服务器的问题 [\#947](https://github.com/overtrue/wechat/issues/947) -- 4.0 不支持laravel 5.2? [\#946](https://github.com/overtrue/wechat/issues/946) -- log不能打印出来 [\#945](https://github.com/overtrue/wechat/issues/945) -- EasyWeChat.org域名挂了?? [\#940](https://github.com/overtrue/wechat/issues/940) -- 微信静默授权的时候,页面上老是会显示一段很长的英文Redirecting to http://xxxx,很影响用户体验,有没有什么方法可以去掉,保留空白页,或者允许自定义显示内容 [\#939](https://github.com/overtrue/wechat/issues/939) -- 微信小程序生成二维码(接口B)微信扫描不出来结果 [\#938](https://github.com/overtrue/wechat/issues/938) -- 官网可否支持看老版本的文档? [\#937](https://github.com/overtrue/wechat/issues/937) -- 客服发送消息 收到的中文信息被unicode 编码 [\#935](https://github.com/overtrue/wechat/issues/935) -- 有多个商户时,订单通知的 $payment 怎么创建 [\#934](https://github.com/overtrue/wechat/issues/934) -- console中使用$app-\>user-\>get报错 [\#932](https://github.com/overtrue/wechat/issues/932) -- PC端扫描登录的问题 [\#930](https://github.com/overtrue/wechat/issues/930) -- 关于小程序支付的疑问 [\#912](https://github.com/overtrue/wechat/issues/912) -- 服务商api模式使用可以更加详细吗 [\#653](https://github.com/overtrue/wechat/issues/653) - -**Merged pull requests:** - -- 修正 微信公众号要求 所有接口使用 HTTPS 方式访问 [\#988](https://github.com/overtrue/wechat/pull/988) ([drogjh](https://github.com/drogjh)) -- Apply fixes from StyleCI [\#987](https://github.com/overtrue/wechat/pull/987) ([mingyoung](https://github.com/mingyoung)) -- 修复微信收款(个人转账版)商户添加、查询含有多余字段导致签名失败的问题 [\#986](https://github.com/overtrue/wechat/pull/986) ([chenhaizano](https://github.com/chenhaizano)) -- Add merchant client. [\#983](https://github.com/overtrue/wechat/pull/983) ([mingyoung](https://github.com/mingyoung)) -- Fix PKCS7 unpad issue. [\#981](https://github.com/overtrue/wechat/pull/981) ([mingyoung](https://github.com/mingyoung)) -- 💯 Add unit tests. [\#979](https://github.com/overtrue/wechat/pull/979) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#978](https://github.com/overtrue/wechat/pull/978) ([overtrue](https://github.com/overtrue)) -- Add sub-merchant support. [\#976](https://github.com/overtrue/wechat/pull/976) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#974](https://github.com/overtrue/wechat/pull/974) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#973](https://github.com/overtrue/wechat/pull/973) ([mingyoung](https://github.com/mingyoung)) -- Refactoring payment [\#972](https://github.com/overtrue/wechat/pull/972) ([mingyoung](https://github.com/mingyoung)) -- Fix request method. [\#964](https://github.com/overtrue/wechat/pull/964) ([mingyoung](https://github.com/mingyoung)) -- MiniProgram template. [\#959](https://github.com/overtrue/wechat/pull/959) ([mingyoung](https://github.com/mingyoung)) -- 企业微信 jssdk ticket [\#954](https://github.com/overtrue/wechat/pull/954) ([mingyoung](https://github.com/mingyoung)) -- Scrutinizer Auto-Fixes [\#944](https://github.com/overtrue/wechat/pull/944) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- 简化子商户js config [\#943](https://github.com/overtrue/wechat/pull/943) ([HanSon](https://github.com/HanSon)) -- Apply fixes from StyleCI [\#942](https://github.com/overtrue/wechat/pull/942) ([overtrue](https://github.com/overtrue)) -- 支持子商户JS CONFIG生成 [\#941](https://github.com/overtrue/wechat/pull/941) ([HanSon](https://github.com/HanSon)) - -## [4.0.0-beta.3](https://github.com/overtrue/wechat/tree/4.0.0-beta.3) (2017-09-23) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.16...4.0.0-beta.3) - -**Closed issues:** - -- 退款结果通知 [\#858](https://github.com/overtrue/wechat/issues/858) - -**Merged pull requests:** - -- Update Application.php [\#936](https://github.com/overtrue/wechat/pull/936) ([HanSon](https://github.com/HanSon)) - -## [3.3.16](https://github.com/overtrue/wechat/tree/3.3.16) (2017-09-20) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.15...3.3.16) - -**Closed issues:** - -- 希望能增加获取回复数据的方法 [\#929](https://github.com/overtrue/wechat/issues/929) -- 3.3 版本 数据类型不对导致无法运行 [\#928](https://github.com/overtrue/wechat/issues/928) - -**Merged pull requests:** - -- 增加退款回调处理 [\#931](https://github.com/overtrue/wechat/pull/931) ([leo108](https://github.com/leo108)) - -## [3.3.15](https://github.com/overtrue/wechat/tree/3.3.15) (2017-09-13) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.14...3.3.15) - -**Closed issues:** - -- 微信 for windows 发送文件的时候报错 [\#927](https://github.com/overtrue/wechat/issues/927) - -## [3.3.14](https://github.com/overtrue/wechat/tree/3.3.14) (2017-09-13) -[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-beta.2...3.3.14) - -**Closed issues:** - -- 请教授权的时候什么方法拿到用户是否关注了本公众号? [\#926](https://github.com/overtrue/wechat/issues/926) - -## [4.0.0-beta.2](https://github.com/overtrue/wechat/tree/4.0.0-beta.2) (2017-09-12) -[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-beta.1...4.0.0-beta.2) - -**Closed issues:** - -- readme.md写错了? [\#923](https://github.com/overtrue/wechat/issues/923) -- token验证成功,但还是回复暂时不可用,困扰1个星期多了,真心求助!!!有偿都可以!! [\#922](https://github.com/overtrue/wechat/issues/922) -- 条件判断错了,stripos返回的是“返回在字符串 haystack 中 needle 首次出现的数字位置。”,所以不能直接作为条件判断 [\#915](https://github.com/overtrue/wechat/issues/915) -- README中的链接是否错误 [\#913](https://github.com/overtrue/wechat/issues/913) -- 测试公众号无法接受用户信息 [\#911](https://github.com/overtrue/wechat/issues/911) -- ReadMe文件过期 [\#910](https://github.com/overtrue/wechat/issues/910) -- 开放平台服务,取消授权会有哪些参数过来? [\#909](https://github.com/overtrue/wechat/issues/909) -- token无法验证 [\#908](https://github.com/overtrue/wechat/issues/908) -- laravel 5.4 composer 失败 [\#907](https://github.com/overtrue/wechat/issues/907) -- 开放平台:组件ticket无法通过 [\#904](https://github.com/overtrue/wechat/issues/904) -- 官方网站一直登陆不了,浙江丽水地区 [\#903](https://github.com/overtrue/wechat/issues/903) -- \[4.0\] Pimple\Exception\UnknownIdentifierException [\#901](https://github.com/overtrue/wechat/issues/901) -- 4.0 报错“Your requirements could not be resolved to an installable set of packages.” [\#898](https://github.com/overtrue/wechat/issues/898) - -**Merged pull requests:** - -- 修改通过ticket换取二维码图片地址的逻辑 [\#925](https://github.com/overtrue/wechat/pull/925) ([Gwill](https://github.com/Gwill)) -- make domain more flexible [\#924](https://github.com/overtrue/wechat/pull/924) ([HanSon](https://github.com/HanSon)) -- add code & domain comment [\#921](https://github.com/overtrue/wechat/pull/921) ([HanSon](https://github.com/HanSon)) -- Apply fixes from StyleCI [\#919](https://github.com/overtrue/wechat/pull/919) ([overtrue](https://github.com/overtrue)) -- \[3.1\] Custom PreAuthCode Support [\#918](https://github.com/overtrue/wechat/pull/918) ([freyo](https://github.com/freyo)) -- 修改acess\_token无效时微信返回错误码的判断 [\#916](https://github.com/overtrue/wechat/pull/916) ([blackjune](https://github.com/blackjune)) -- \[4.0\] Add optional 'request' parameter to notify handler methods [\#905](https://github.com/overtrue/wechat/pull/905) ([edwardaa](https://github.com/edwardaa)) -- Apply fixes from StyleCI [\#902](https://github.com/overtrue/wechat/pull/902) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#897](https://github.com/overtrue/wechat/pull/897) ([overtrue](https://github.com/overtrue)) -- 增加OAuth中Guzzle\Client的配置项的设置 [\#893](https://github.com/overtrue/wechat/pull/893) ([khsing](https://github.com/khsing)) -- Apply fixes from StyleCI [\#887](https://github.com/overtrue/wechat/pull/887) ([overtrue](https://github.com/overtrue)) -- Scrutinizer Auto-Fixes [\#884](https://github.com/overtrue/wechat/pull/884) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) - -## [4.0.0-beta.1](https://github.com/overtrue/wechat/tree/4.0.0-beta.1) (2017-08-31) -[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-alpha.2...4.0.0-beta.1) - -**Closed issues:** - -- http://easywechat.org/ 网站访问不了了? [\#896](https://github.com/overtrue/wechat/issues/896) -- 关于缓存,请问为什么key中包含appId \* 2,有什么讲究吗? [\#892](https://github.com/overtrue/wechat/issues/892) -- 小程序调用解密程序报-41003错误 [\#891](https://github.com/overtrue/wechat/issues/891) -- 小程序调用加密数据解密时报错,不存在方法 [\#890](https://github.com/overtrue/wechat/issues/890) -- 有关4.0使用文档的问题 [\#883](https://github.com/overtrue/wechat/issues/883) -- \[4.0\] PHP最低版本能否降到7.0 [\#880](https://github.com/overtrue/wechat/issues/880) - -**Merged pull requests:** - -- \[4.0\] Pass proper arguments to the Response constructor [\#895](https://github.com/overtrue/wechat/pull/895) ([edwardaa](https://github.com/edwardaa)) -- Fix baseUrl and json issues. [\#894](https://github.com/overtrue/wechat/pull/894) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#889](https://github.com/overtrue/wechat/pull/889) ([overtrue](https://github.com/overtrue)) -- Scrutinizer Auto-Fixes [\#885](https://github.com/overtrue/wechat/pull/885) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- Apply fixes from StyleCI [\#882](https://github.com/overtrue/wechat/pull/882) ([overtrue](https://github.com/overtrue)) -- 补充通用卡接口 [\#881](https://github.com/overtrue/wechat/pull/881) ([XiaoLer](https://github.com/XiaoLer)) -- Apply fixes from StyleCI [\#879](https://github.com/overtrue/wechat/pull/879) ([overtrue](https://github.com/overtrue)) -- \[3.1\] Payment/API 没有使用全局的 cache [\#878](https://github.com/overtrue/wechat/pull/878) ([edwardaa](https://github.com/edwardaa)) -- Add JSON\_UNESCAPED\_UNICODE option. [\#874](https://github.com/overtrue/wechat/pull/874) ([mingyoung](https://github.com/mingyoung)) -- update \_\_set\_state magic method to static [\#872](https://github.com/overtrue/wechat/pull/872) ([8090Lambert](https://github.com/8090Lambert)) - -## [4.0.0-alpha.2](https://github.com/overtrue/wechat/tree/4.0.0-alpha.2) (2017-08-20) -[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-alpha.1...4.0.0-alpha.2) - -**Closed issues:** - -- 你好,怎么用的 [\#869](https://github.com/overtrue/wechat/issues/869) - -**Merged pull requests:** - -- Tweak dir [\#871](https://github.com/overtrue/wechat/pull/871) ([mingyoung](https://github.com/mingyoung)) -- Fix mini-program guard. [\#870](https://github.com/overtrue/wechat/pull/870) ([mingyoung](https://github.com/mingyoung)) - -## [4.0.0-alpha.1](https://github.com/overtrue/wechat/tree/4.0.0-alpha.1) (2017-08-14) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.13...4.0.0-alpha.1) - -**Closed issues:** - -- 对doctrine/cache依赖的版本锁定 [\#867](https://github.com/overtrue/wechat/issues/867) - -## [3.3.13](https://github.com/overtrue/wechat/tree/3.3.13) (2017-08-13) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.12...3.3.13) - -**Closed issues:** - -- 文档中网页授权实例写的不明确 [\#850](https://github.com/overtrue/wechat/issues/850) -- \[意见\]作者能否提供getTokenFromServer方法扩展从外部第三方获取access\_token [\#837](https://github.com/overtrue/wechat/issues/837) -- invalid credential, access\_token is invalid or not latest [\#808](https://github.com/overtrue/wechat/issues/808) -- \[4.0\] 重构卡券 [\#806](https://github.com/overtrue/wechat/issues/806) -- \[4.0\] 重构 Broadcasting [\#805](https://github.com/overtrue/wechat/issues/805) -- \[4.0\] 变更日志 [\#746](https://github.com/overtrue/wechat/issues/746) - -**Merged pull requests:** - -- Fixed open-platform authorizer server token. [\#866](https://github.com/overtrue/wechat/pull/866) ([mingyoung](https://github.com/mingyoung)) -- payment\ClientTest 优化 [\#865](https://github.com/overtrue/wechat/pull/865) ([tianyong90](https://github.com/tianyong90)) -- Apply fixes from StyleCI [\#864](https://github.com/overtrue/wechat/pull/864) ([overtrue](https://github.com/overtrue)) -- 退款通知处理及相关单元测试 [\#863](https://github.com/overtrue/wechat/pull/863) ([tianyong90](https://github.com/tianyong90)) -- Apply fixes from StyleCI [\#862](https://github.com/overtrue/wechat/pull/862) ([overtrue](https://github.com/overtrue)) -- Update dependence version. [\#861](https://github.com/overtrue/wechat/pull/861) ([mingyoung](https://github.com/mingyoung)) -- Add tests. [\#859](https://github.com/overtrue/wechat/pull/859) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#857](https://github.com/overtrue/wechat/pull/857) ([overtrue](https://github.com/overtrue)) -- Payment 单元测试优化 [\#856](https://github.com/overtrue/wechat/pull/856) ([tianyong90](https://github.com/tianyong90)) -- Apply fixes from StyleCI [\#855](https://github.com/overtrue/wechat/pull/855) ([overtrue](https://github.com/overtrue)) -- lists 方法重命名为 list,相关单元测试调整 [\#853](https://github.com/overtrue/wechat/pull/853) ([tianyong90](https://github.com/tianyong90)) -- Apply fixes from StyleCI [\#852](https://github.com/overtrue/wechat/pull/852) ([overtrue](https://github.com/overtrue)) -- Payment 单元测试及部分问题修复 [\#851](https://github.com/overtrue/wechat/pull/851) ([tianyong90](https://github.com/tianyong90)) -- Apply fixes from StyleCI [\#848](https://github.com/overtrue/wechat/pull/848) ([overtrue](https://github.com/overtrue)) -- 调整 Payment\BaseClient 注入的 $app 类型 [\#847](https://github.com/overtrue/wechat/pull/847) ([tianyong90](https://github.com/tianyong90)) -- array\_merge 方法参数类型转换, type hints [\#846](https://github.com/overtrue/wechat/pull/846) ([tianyong90](https://github.com/tianyong90)) -- Fix oauth. [\#845](https://github.com/overtrue/wechat/pull/845) ([mingyoung](https://github.com/mingyoung)) -- Text message. [\#844](https://github.com/overtrue/wechat/pull/844) ([mingyoung](https://github.com/mingyoung)) -- Rename BaseService -\> BasicService. [\#843](https://github.com/overtrue/wechat/pull/843) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#842](https://github.com/overtrue/wechat/pull/842) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#841](https://github.com/overtrue/wechat/pull/841) ([overtrue](https://github.com/overtrue)) -- phpdoc types。 [\#840](https://github.com/overtrue/wechat/pull/840) ([tianyong90](https://github.com/tianyong90)) -- Apply fixes from StyleCI [\#839](https://github.com/overtrue/wechat/pull/839) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#836](https://github.com/overtrue/wechat/pull/836) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#835](https://github.com/overtrue/wechat/pull/835) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#833](https://github.com/overtrue/wechat/pull/833) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#831](https://github.com/overtrue/wechat/pull/831) ([overtrue](https://github.com/overtrue)) - -## [3.3.12](https://github.com/overtrue/wechat/tree/3.3.12) (2017-08-01) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.11...3.3.12) - -**Closed issues:** - -- 能否整合微信开放平台在给出一套demo [\#816](https://github.com/overtrue/wechat/issues/816) -- 请教这个项目的支付部分,尤其是签名和结果回调,是否支持小程序? [\#814](https://github.com/overtrue/wechat/issues/814) -- 微信意图识别接口返回invalid param [\#804](https://github.com/overtrue/wechat/issues/804) -- 返回param invalid [\#803](https://github.com/overtrue/wechat/issues/803) - -**Merged pull requests:** - -- change comment word [\#830](https://github.com/overtrue/wechat/pull/830) ([tianyong90](https://github.com/tianyong90)) -- Fix getTicket. [\#829](https://github.com/overtrue/wechat/pull/829) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#827](https://github.com/overtrue/wechat/pull/827) ([overtrue](https://github.com/overtrue)) -- 修正 HasAttributes Trait 引用错误 [\#825](https://github.com/overtrue/wechat/pull/825) ([tianyong90](https://github.com/tianyong90)) -- Apply fixes from StyleCI [\#824](https://github.com/overtrue/wechat/pull/824) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#822](https://github.com/overtrue/wechat/pull/822) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#820](https://github.com/overtrue/wechat/pull/820) ([mingyoung](https://github.com/mingyoung)) -- Add subscribe message. [\#819](https://github.com/overtrue/wechat/pull/819) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#818](https://github.com/overtrue/wechat/pull/818) ([mingyoung](https://github.com/mingyoung)) -- 微信开放平台帐号管理 [\#817](https://github.com/overtrue/wechat/pull/817) ([XiaoLer](https://github.com/XiaoLer)) -- add method in comment [\#813](https://github.com/overtrue/wechat/pull/813) ([HanSon](https://github.com/HanSon)) -- fixed guzzle version [\#812](https://github.com/overtrue/wechat/pull/812) ([HanSon](https://github.com/HanSon)) -- Apply fixes from StyleCI [\#811](https://github.com/overtrue/wechat/pull/811) ([mingyoung](https://github.com/mingyoung)) -- Downgrade to php 7.0 [\#809](https://github.com/overtrue/wechat/pull/809) ([HanSon](https://github.com/HanSon)) - -## [3.3.11](https://github.com/overtrue/wechat/tree/3.3.11) (2017-07-17) -[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-alpha1...3.3.11) - -**Closed issues:** - -- 请添加 「退款原因」 参数 [\#802](https://github.com/overtrue/wechat/issues/802) - -## [4.0.0-alpha1](https://github.com/overtrue/wechat/tree/4.0.0-alpha1) (2017-07-17) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.10...4.0.0-alpha1) - -**Closed issues:** - -- Overtrue\Wechat\Media not found [\#801](https://github.com/overtrue/wechat/issues/801) -- 在微信的接口配置时Token 无效,可任意输入 [\#800](https://github.com/overtrue/wechat/issues/800) - -## [3.3.10](https://github.com/overtrue/wechat/tree/3.3.10) (2017-07-13) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.9...3.3.10) - -**Closed issues:** - -- 第三方平台refresh\_token的保存问题 [\#798](https://github.com/overtrue/wechat/issues/798) -- 网页授权共享session已晚 [\#792](https://github.com/overtrue/wechat/issues/792) - -**Merged pull requests:** - -- 临时二维码也是支持scene\_str的,这里补充上 [\#797](https://github.com/overtrue/wechat/pull/797) ([lornewang](https://github.com/lornewang)) -- Apply fixes from StyleCI [\#795](https://github.com/overtrue/wechat/pull/795) ([overtrue](https://github.com/overtrue)) -- add card message type [\#794](https://github.com/overtrue/wechat/pull/794) ([IanGely](https://github.com/IanGely)) -- add staff message type wxcard [\#793](https://github.com/overtrue/wechat/pull/793) ([IanGely](https://github.com/IanGely)) - -## [3.3.9](https://github.com/overtrue/wechat/tree/3.3.9) (2017-07-07) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.8...3.3.9) - -**Closed issues:** - -- \[4.0\] Http 模块 [\#678](https://github.com/overtrue/wechat/issues/678) -- \[4.0\] Http 请求类 [\#582](https://github.com/overtrue/wechat/issues/582) - -**Merged pull requests:** - -- Apply fixes from StyleCI [\#791](https://github.com/overtrue/wechat/pull/791) ([overtrue](https://github.com/overtrue)) -- Add get user portrait method. [\#790](https://github.com/overtrue/wechat/pull/790) ([getive](https://github.com/getive)) -- \[Feature\] Move directories [\#789](https://github.com/overtrue/wechat/pull/789) ([overtrue](https://github.com/overtrue)) -- \[Feature\] Move traits to kernel. [\#788](https://github.com/overtrue/wechat/pull/788) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#787](https://github.com/overtrue/wechat/pull/787) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#786](https://github.com/overtrue/wechat/pull/786) ([overtrue](https://github.com/overtrue)) - -## [3.3.8](https://github.com/overtrue/wechat/tree/3.3.8) (2017-07-07) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.7...3.3.8) - -**Closed issues:** - -- $temporary-\>getStream\($media\_id\) 与 file\_get\_contents\(\) 有区别??? [\#742](https://github.com/overtrue/wechat/issues/742) - -## [3.3.7](https://github.com/overtrue/wechat/tree/3.3.7) (2017-07-06) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.6...3.3.7) - -**Closed issues:** - -- 多添加一个$option [\#772](https://github.com/overtrue/wechat/issues/772) -- 消息群发,指定openid群发视频时,微信报错invalid message type hint: \[JUs0Oa0779ge25\] [\#757](https://github.com/overtrue/wechat/issues/757) - -## [3.3.6](https://github.com/overtrue/wechat/tree/3.3.6) (2017-07-06) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.5...3.3.6) - -**Fixed bugs:** - -- 素材管理,如果media\_id不存在会保存网页返回的错误代码 [\#592](https://github.com/overtrue/wechat/issues/592) - -**Closed issues:** - -- https://easywechat.org网站证书刚过期了,知会作者一声 [\#781](https://github.com/overtrue/wechat/issues/781) -- access\_token 是否能不内部主动请求微信 [\#778](https://github.com/overtrue/wechat/issues/778) -- 门店创建API \($poi-\>create\) 建议返回 poi\_id / exception [\#774](https://github.com/overtrue/wechat/issues/774) -- 扩展门店小程序错误 [\#762](https://github.com/overtrue/wechat/issues/762) -- \[4.0\] jssdk 抽出独立模块 [\#754](https://github.com/overtrue/wechat/issues/754) -- \[4.0\] 消息加密解密模块提取到 Kernel [\#753](https://github.com/overtrue/wechat/issues/753) -- 网页能授权但无法获取用户信息,代码跟官方文档一样。 [\#713](https://github.com/overtrue/wechat/issues/713) - -**Merged pull requests:** - -- Feature: BaseService. [\#785](https://github.com/overtrue/wechat/pull/785) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#784](https://github.com/overtrue/wechat/pull/784) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#783](https://github.com/overtrue/wechat/pull/783) ([mingyoung](https://github.com/mingyoung)) - -## [3.3.5](https://github.com/overtrue/wechat/tree/3.3.5) (2017-07-04) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.4...3.3.5) - -**Implemented enhancements:** - -- 并发下access\_token存在脏写隐患 [\#696](https://github.com/overtrue/wechat/issues/696) - -**Merged pull requests:** - -- Apply fixes from StyleCI [\#780](https://github.com/overtrue/wechat/pull/780) ([overtrue](https://github.com/overtrue)) - -## [3.3.4](https://github.com/overtrue/wechat/tree/3.3.4) (2017-07-04) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.3...3.3.4) - -**Closed issues:** - -- 网页授权获取用户信息无法打开授权页面 [\#773](https://github.com/overtrue/wechat/issues/773) -- Class 'EasyWechat\Foundation\Application' not found [\#769](https://github.com/overtrue/wechat/issues/769) -- 获取小程序二维码报错 [\#766](https://github.com/overtrue/wechat/issues/766) -- Call to undefined method EasyWeChat\Server\Guard::setRequest\(\) [\#765](https://github.com/overtrue/wechat/issues/765) -- 网页授权问题,提示scopes类型错误 [\#764](https://github.com/overtrue/wechat/issues/764) -- 门店小程序扩展错误问题 [\#763](https://github.com/overtrue/wechat/issues/763) -- 微信开发者平台,全网发布怎么通过 [\#761](https://github.com/overtrue/wechat/issues/761) -- 微信网页授权重复请求报code无效 [\#714](https://github.com/overtrue/wechat/issues/714) - -**Merged pull requests:** - -- 新版客服功能-获取聊天记录 [\#775](https://github.com/overtrue/wechat/pull/775) ([wuwenbao](https://github.com/wuwenbao)) -- Fix mini-program qrcode. [\#768](https://github.com/overtrue/wechat/pull/768) ([mingyoung](https://github.com/mingyoung)) -- Add code comments [\#756](https://github.com/overtrue/wechat/pull/756) ([daxiong123](https://github.com/daxiong123)) - -## [3.3.3](https://github.com/overtrue/wechat/tree/3.3.3) (2017-06-22) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.2...3.3.3) - -**Implemented enhancements:** - -- \[4.0\] Trait HasHttpRequests [\#671](https://github.com/overtrue/wechat/issues/671) -- \[4.0\] 缓存抽象成 trait: InteractsWithCache [\#670](https://github.com/overtrue/wechat/issues/670) -- \[4.0\] 返回值类型可配置 [\#661](https://github.com/overtrue/wechat/issues/661) -- \[4.0\] 报错信息可选 [\#596](https://github.com/overtrue/wechat/issues/596) -- \[4.0\] 简化并完善开发者配置项 [\#584](https://github.com/overtrue/wechat/issues/584) - -**Fixed bugs:** - -- open\_platform.oauth 过早的获取 access token [\#701](https://github.com/overtrue/wechat/issues/701) - -**Closed issues:** - -- 微信网页支付配置生成 [\#751](https://github.com/overtrue/wechat/issues/751) -- configForJSSDKPayment [\#744](https://github.com/overtrue/wechat/issues/744) -- 发现微信上有管理公众号留言的接口,不知道是不是新出的 [\#721](https://github.com/overtrue/wechat/issues/721) -- oauth能获取用户信息,再通过access\_token与用户openid去获取信息,部分用户的信息为空 [\#720](https://github.com/overtrue/wechat/issues/720) -- 接入多个公众号 [\#718](https://github.com/overtrue/wechat/issues/718) -- guzzle curl error28 - 去哪设置默认timeout ? [\#715](https://github.com/overtrue/wechat/issues/715) -- 使用$server-\>getMessage\(\);报错 [\#712](https://github.com/overtrue/wechat/issues/712) -- 怎样从数据库中调取配置 [\#711](https://github.com/overtrue/wechat/issues/711) -- \[4.0\] 支持企业微信 [\#707](https://github.com/overtrue/wechat/issues/707) -- defaultColor does not work. [\#703](https://github.com/overtrue/wechat/issues/703) -- 是否支持H5支付 [\#694](https://github.com/overtrue/wechat/issues/694) -- 生成AccessToken时,似乎没有调用自定义缓存的delete方法 [\#693](https://github.com/overtrue/wechat/issues/693) -- \[4.0\] PSR-6 缓存接口 [\#692](https://github.com/overtrue/wechat/issues/692) -- 微信支付沙盒模式支持配置文件配置 [\#690](https://github.com/overtrue/wechat/issues/690) -- \[4.0\] 优化服务提供器结构 [\#689](https://github.com/overtrue/wechat/issues/689) -- 强制项目不要自动获取AccessToken [\#688](https://github.com/overtrue/wechat/issues/688) -- 小程序解密$encryptedData数据 [\#687](https://github.com/overtrue/wechat/issues/687) -- 微信坑爹timestamp已经解决不需要configForJSSDKPayment改变timestamp中s大小写 [\#686](https://github.com/overtrue/wechat/issues/686) -- \[4.0\] 所有 API 改名为 Client. [\#677](https://github.com/overtrue/wechat/issues/677) -- sandbox\_signkey 过期 [\#675](https://github.com/overtrue/wechat/issues/675) -- 接口配置失败 [\#672](https://github.com/overtrue/wechat/issues/672) -- 下载语音文件偶尔报错:ErrorException: is\_readable\(\) expects parameter 1 to be a valid path [\#667](https://github.com/overtrue/wechat/issues/667) -- 微信支付沙箱地址混乱 [\#665](https://github.com/overtrue/wechat/issues/665) -- 开放平台自动回复出错,提示“该服务号暂时无法提供服务” [\#654](https://github.com/overtrue/wechat/issues/654) -- \[4.0\]自定义微信API的区域接入点 [\#636](https://github.com/overtrue/wechat/issues/636) -- 在命令行使用easywechat如何关闭日志 [\#601](https://github.com/overtrue/wechat/issues/601) -- \[4.0\] PHP 版本最低要求 7.1 [\#586](https://github.com/overtrue/wechat/issues/586) -- \[4.0\] 简化微信 API 请求 [\#583](https://github.com/overtrue/wechat/issues/583) -- \[4.0\] 自定义 endpoint [\#521](https://github.com/overtrue/wechat/issues/521) - -**Merged pull requests:** - -- Apply fixes from StyleCI [\#750](https://github.com/overtrue/wechat/pull/750) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#749](https://github.com/overtrue/wechat/pull/749) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#747](https://github.com/overtrue/wechat/pull/747) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#745](https://github.com/overtrue/wechat/pull/745) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#740](https://github.com/overtrue/wechat/pull/740) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#737](https://github.com/overtrue/wechat/pull/737) ([mingyoung](https://github.com/mingyoung)) -- 分模块静态调用 [\#734](https://github.com/overtrue/wechat/pull/734) ([mingyoung](https://github.com/mingyoung)) -- Revert "Apply fixes from StyleCI" [\#731](https://github.com/overtrue/wechat/pull/731) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#730](https://github.com/overtrue/wechat/pull/730) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#729](https://github.com/overtrue/wechat/pull/729) ([overtrue](https://github.com/overtrue)) -- Revert "Apply fixes from StyleCI" [\#728](https://github.com/overtrue/wechat/pull/728) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#727](https://github.com/overtrue/wechat/pull/727) ([overtrue](https://github.com/overtrue)) -- 修复Https 请求判断不准 [\#726](https://github.com/overtrue/wechat/pull/726) ([xutl](https://github.com/xutl)) -- Apply fixes from StyleCI [\#725](https://github.com/overtrue/wechat/pull/725) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#724](https://github.com/overtrue/wechat/pull/724) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#723](https://github.com/overtrue/wechat/pull/723) ([mingyoung](https://github.com/mingyoung)) -- Correction notes [\#722](https://github.com/overtrue/wechat/pull/722) ([PersiLiao](https://github.com/PersiLiao)) -- Apply fixes from StyleCI [\#717](https://github.com/overtrue/wechat/pull/717) ([mingyoung](https://github.com/mingyoung)) -- 新增图文消息留言管理接口 [\#716](https://github.com/overtrue/wechat/pull/716) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#710](https://github.com/overtrue/wechat/pull/710) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#709](https://github.com/overtrue/wechat/pull/709) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#708](https://github.com/overtrue/wechat/pull/708) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#706](https://github.com/overtrue/wechat/pull/706) ([overtrue](https://github.com/overtrue)) -- 命令行下不打印日志 [\#705](https://github.com/overtrue/wechat/pull/705) ([mingyoung](https://github.com/mingyoung)) -- add defaultColor [\#704](https://github.com/overtrue/wechat/pull/704) ([damonto](https://github.com/damonto)) -- Fix [\#702](https://github.com/overtrue/wechat/pull/702) ([mingyoung](https://github.com/mingyoung)) -- Add api. [\#700](https://github.com/overtrue/wechat/pull/700) ([mingyoung](https://github.com/mingyoung)) -- Rename method. [\#699](https://github.com/overtrue/wechat/pull/699) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#698](https://github.com/overtrue/wechat/pull/698) ([mingyoung](https://github.com/mingyoung)) -- 修正素材管理中的返回值文档注释,正确的类型应该是集合,而不是字符串。 [\#695](https://github.com/overtrue/wechat/pull/695) ([starlight36](https://github.com/starlight36)) -- Payment sandbox config. [\#691](https://github.com/overtrue/wechat/pull/691) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#684](https://github.com/overtrue/wechat/pull/684) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#683](https://github.com/overtrue/wechat/pull/683) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#682](https://github.com/overtrue/wechat/pull/682) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#681](https://github.com/overtrue/wechat/pull/681) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#680](https://github.com/overtrue/wechat/pull/680) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#679](https://github.com/overtrue/wechat/pull/679) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#676](https://github.com/overtrue/wechat/pull/676) ([mingyoung](https://github.com/mingyoung)) -- checks via composer. [\#673](https://github.com/overtrue/wechat/pull/673) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#668](https://github.com/overtrue/wechat/pull/668) ([overtrue](https://github.com/overtrue)) -- Correct payment sandbox endpoint and add a method to get sandbox sign key [\#666](https://github.com/overtrue/wechat/pull/666) ([skyred](https://github.com/skyred)) - -## [3.3.2](https://github.com/overtrue/wechat/tree/3.3.2) (2017-04-27) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.1...3.3.2) - -**Implemented enhancements:** - -- \[4.0\] Open Platform 模块 [\#587](https://github.com/overtrue/wechat/issues/587) -- \[4.0\] 微信支付 sandbox模式 [\#507](https://github.com/overtrue/wechat/issues/507) - -**Closed issues:** - -- \[4.0\] staff 模块改名为 customer service [\#585](https://github.com/overtrue/wechat/issues/585) - -**Merged pull requests:** - -- Module rename. [\#664](https://github.com/overtrue/wechat/pull/664) ([mingyoung](https://github.com/mingyoung)) -- Merge branch master into branch develop. [\#663](https://github.com/overtrue/wechat/pull/663) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#662](https://github.com/overtrue/wechat/pull/662) ([mingyoung](https://github.com/mingyoung)) -- Fix payment tools API [\#660](https://github.com/overtrue/wechat/pull/660) ([mingyoung](https://github.com/mingyoung)) -- Avoid ambiguity [\#659](https://github.com/overtrue/wechat/pull/659) ([mingyoung](https://github.com/mingyoung)) -- Support Payment Sandbox mode [\#658](https://github.com/overtrue/wechat/pull/658) ([skyred](https://github.com/skyred)) -- Apply fixes from StyleCI [\#656](https://github.com/overtrue/wechat/pull/656) ([overtrue](https://github.com/overtrue)) -- Mini program datacube. [\#655](https://github.com/overtrue/wechat/pull/655) ([mingyoung](https://github.com/mingyoung)) - -## [3.3.1](https://github.com/overtrue/wechat/tree/3.3.1) (2017-04-16) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.0...3.3.1) - -**Closed issues:** - -- 微信第三方平台缓存位置,是否可以在配置文件中自定义 [\#648](https://github.com/overtrue/wechat/issues/648) -- 微信开放平台authorizer token缓存问题 [\#644](https://github.com/overtrue/wechat/issues/644) -- 微信开放平台发起网页授权bug [\#638](https://github.com/overtrue/wechat/issues/638) -- 微信公众号不能回复接收到的消息,日志无报错 [\#637](https://github.com/overtrue/wechat/issues/637) -- \[4.0\]黑名单管理 [\#538](https://github.com/overtrue/wechat/issues/538) - -**Merged pull requests:** - -- optimizes [\#652](https://github.com/overtrue/wechat/pull/652) ([mingyoung](https://github.com/mingyoung)) - -## [3.3.0](https://github.com/overtrue/wechat/tree/3.3.0) (2017-04-13) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.7...3.3.0) - -**Closed issues:** - -- 微信接口获取openid是怎么排序的? [\#650](https://github.com/overtrue/wechat/issues/650) -- 缺少网页扫码支付接口 [\#647](https://github.com/overtrue/wechat/issues/647) -- 微信下的单的默认过期时间是多少啊 [\#645](https://github.com/overtrue/wechat/issues/645) -- 在获取用户信息是出错 [\#643](https://github.com/overtrue/wechat/issues/643) -- 调用$app =app\('wechat'\);时报错Use of undefined constant CURLOPT\_IPRESOLVE - assumed 'CURLOPT\_IPRESOLVE' [\#633](https://github.com/overtrue/wechat/issues/633) -- 提示找不到EasyWeChat\Server\Guard::setRequest\(\)方法 [\#626](https://github.com/overtrue/wechat/issues/626) -- 开放平台接收ComponentVerifyTicket,会出现Undefined index: FromUserName [\#623](https://github.com/overtrue/wechat/issues/623) -- 美国移动网络获取不到accessToken [\#610](https://github.com/overtrue/wechat/issues/610) -- 开放平台 APP 微信登录 [\#604](https://github.com/overtrue/wechat/issues/604) - -**Merged pull requests:** - -- Merge from open-platform branch. [\#651](https://github.com/overtrue/wechat/pull/651) ([mingyoung](https://github.com/mingyoung)) -- Update code for open-platform [\#649](https://github.com/overtrue/wechat/pull/649) ([mingyoung](https://github.com/mingyoung)) -- Code cleanup & refactoring. [\#646](https://github.com/overtrue/wechat/pull/646) ([mingyoung](https://github.com/mingyoung)) -- support cash coupon [\#642](https://github.com/overtrue/wechat/pull/642) ([HanSon](https://github.com/HanSon)) -- ♻️ All tests have been namespaced. [\#641](https://github.com/overtrue/wechat/pull/641) ([mingyoung](https://github.com/mingyoung)) -- tweak code. [\#640](https://github.com/overtrue/wechat/pull/640) ([mingyoung](https://github.com/mingyoung)) -- modify oauth property [\#639](https://github.com/overtrue/wechat/pull/639) ([jekst](https://github.com/jekst)) -- Apply fixes from StyleCI [\#635](https://github.com/overtrue/wechat/pull/635) ([overtrue](https://github.com/overtrue)) -- ✨ Blacklist. [\#634](https://github.com/overtrue/wechat/pull/634) ([mingyoung](https://github.com/mingyoung)) -- 🔨 Refactoring for mini-program. [\#632](https://github.com/overtrue/wechat/pull/632) ([mingyoung](https://github.com/mingyoung)) - -## [3.2.7](https://github.com/overtrue/wechat/tree/3.2.7) (2017-03-31) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.6...3.2.7) - -**Closed issues:** - -- 不管哪个公众号,只要填写 这个接口地址,都能配置或应用成功,实际上是不成功的,不到怎么找错。。 [\#611](https://github.com/overtrue/wechat/issues/611) - -**Merged pull requests:** - -- 修复一个创建卡券时的 bug, 添加获取微信门店类目表的api [\#631](https://github.com/overtrue/wechat/pull/631) ([Hexor](https://github.com/Hexor)) - -## [3.2.6](https://github.com/overtrue/wechat/tree/3.2.6) (2017-03-31) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.5...3.2.6) - -**Closed issues:** - -- 我想大量发模板消息,但send每次都等待返回太慢,有啥解决办法吗? [\#630](https://github.com/overtrue/wechat/issues/630) -- 3.2开放平台缺少authorizer\_token和authorization [\#629](https://github.com/overtrue/wechat/issues/629) -- 微信开发平台接受消息报Invalid request signature bug [\#625](https://github.com/overtrue/wechat/issues/625) -- 图文上传thumb\_media\_id 返回 {"errcode":40007,"errmsg":"invalid media\_id hint: \[\]"} [\#622](https://github.com/overtrue/wechat/issues/622) -- Encryptor基类hack导致小程序的sessionKey base64\_decode失败 [\#614](https://github.com/overtrue/wechat/issues/614) -- 是否有 2.1 升级到最新版的方案? [\#609](https://github.com/overtrue/wechat/issues/609) -- laravel5.3 安装 "overtrue/wechat:~3.1 失败 [\#607](https://github.com/overtrue/wechat/issues/607) -- overtrue/wechat和phpdoc包依赖冲突。 [\#605](https://github.com/overtrue/wechat/issues/605) -- \[bug\]2个问题 [\#597](https://github.com/overtrue/wechat/issues/597) -- 微信第三方平台开发是否只做了一部分? [\#594](https://github.com/overtrue/wechat/issues/594) -- \[4.0\] ServiceProvider 移动到各自模块里 [\#588](https://github.com/overtrue/wechat/issues/588) -- Cannot use EasyWeChat\OpenPlatform\Traits\VerifyTicket as VerifyTicket because the name is already in use [\#579](https://github.com/overtrue/wechat/issues/579) -- 授权state值怎么设置 [\#573](https://github.com/overtrue/wechat/issues/573) -- mini\_app get jscode problem, report appid & secret value is null [\#569](https://github.com/overtrue/wechat/issues/569) -- 小程序生成二维码问题 [\#568](https://github.com/overtrue/wechat/issues/568) - -**Merged pull requests:** - -- Update OpenPlatform AppId [\#624](https://github.com/overtrue/wechat/pull/624) ([jeftom](https://github.com/jeftom)) -- Apply fixes from StyleCI [\#621](https://github.com/overtrue/wechat/pull/621) ([overtrue](https://github.com/overtrue)) -- Apply fixes from StyleCI [\#618](https://github.com/overtrue/wechat/pull/618) ([overtrue](https://github.com/overtrue)) -- Compatible with php5.5 [\#617](https://github.com/overtrue/wechat/pull/617) ([mingyoung](https://github.com/mingyoung)) -- Make the testcase works. [\#616](https://github.com/overtrue/wechat/pull/616) ([mingyoung](https://github.com/mingyoung)) -- Fix mini-program decryptor [\#615](https://github.com/overtrue/wechat/pull/615) ([mingyoung](https://github.com/mingyoung)) -- Missing message handling [\#613](https://github.com/overtrue/wechat/pull/613) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#612](https://github.com/overtrue/wechat/pull/612) ([overtrue](https://github.com/overtrue)) -- 添加卡券创建二维码接口 [\#608](https://github.com/overtrue/wechat/pull/608) ([forecho](https://github.com/forecho)) -- 开放平台大幅重构并且添加测试 [\#606](https://github.com/overtrue/wechat/pull/606) ([tsunamilx](https://github.com/tsunamilx)) -- Update MessageBuilder.php [\#603](https://github.com/overtrue/wechat/pull/603) ([U2Fsd](https://github.com/U2Fsd)) -- 生成 js添加到卡包接口 增加fixed\_begintimestamp、outer\_str字段 [\#602](https://github.com/overtrue/wechat/pull/602) ([gychg](https://github.com/gychg)) -- tests for speed [\#600](https://github.com/overtrue/wechat/pull/600) ([mingyoung](https://github.com/mingyoung)) -- Update test files [\#599](https://github.com/overtrue/wechat/pull/599) ([mingyoung](https://github.com/mingyoung)) -- 允许自定义ticket缓存key [\#598](https://github.com/overtrue/wechat/pull/598) ([XiaoLer](https://github.com/XiaoLer)) -- delete top color [\#595](https://github.com/overtrue/wechat/pull/595) ([HanSon](https://github.com/HanSon)) -- Add payment scan notify handler [\#593](https://github.com/overtrue/wechat/pull/593) ([acgrid](https://github.com/acgrid)) -- Apply fixes from StyleCI [\#591](https://github.com/overtrue/wechat/pull/591) ([overtrue](https://github.com/overtrue)) -- Upgrade packages version to 4.0 [\#590](https://github.com/overtrue/wechat/pull/590) ([reatang](https://github.com/reatang)) -- Move providers to module dir. \#588 [\#589](https://github.com/overtrue/wechat/pull/589) ([overtrue](https://github.com/overtrue)) -- 把OpenPlatform中的组件依赖解耦 [\#581](https://github.com/overtrue/wechat/pull/581) ([reatang](https://github.com/reatang)) - -## [3.2.5](https://github.com/overtrue/wechat/tree/3.2.5) (2017-02-04) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.4...3.2.5) - -**Merged pull requests:** - -- fix naming [\#580](https://github.com/overtrue/wechat/pull/580) ([mingyoung](https://github.com/mingyoung)) -- Allow client code configure its own GuzzleHTTP handler [\#578](https://github.com/overtrue/wechat/pull/578) ([acgrid](https://github.com/acgrid)) - -## [3.2.4](https://github.com/overtrue/wechat/tree/3.2.4) (2017-01-24) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.3...3.2.4) - -**Closed issues:** - -- 如何在其他框架下使用$app-\>payment-\>handleNotify [\#574](https://github.com/overtrue/wechat/issues/574) -- 前后端分离单页下获取的config,认证失败 [\#565](https://github.com/overtrue/wechat/issues/565) -- 支付签名错误 [\#563](https://github.com/overtrue/wechat/issues/563) - -**Merged pull requests:** - -- Update Authorizer.php [\#577](https://github.com/overtrue/wechat/pull/577) ([ww380459000](https://github.com/ww380459000)) -- 补全通用卡接口 [\#575](https://github.com/overtrue/wechat/pull/575) ([XiaoLer](https://github.com/XiaoLer)) -- require ext-SimpleXML [\#572](https://github.com/overtrue/wechat/pull/572) ([garveen](https://github.com/garveen)) -- fix README Contribution link [\#571](https://github.com/overtrue/wechat/pull/571) ([zhwei](https://github.com/zhwei)) -- Add user data decryption. [\#570](https://github.com/overtrue/wechat/pull/570) ([mingyoung](https://github.com/mingyoung)) -- change request parameter [\#567](https://github.com/overtrue/wechat/pull/567) ([cloudsthere](https://github.com/cloudsthere)) -- 完善小程序代码 [\#566](https://github.com/overtrue/wechat/pull/566) ([mingyoung](https://github.com/mingyoung)) -- 添加小程序支持 [\#564](https://github.com/overtrue/wechat/pull/564) ([mingyoung](https://github.com/mingyoung)) - -## [3.2.3](https://github.com/overtrue/wechat/tree/3.2.3) (2017-01-04) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.2...3.2.3) - -**Closed issues:** - -- 文档里的自定义菜单中,group\_id是否为tag\_id的误写? [\#561](https://github.com/overtrue/wechat/issues/561) -- Open Platform有简明的使用文档吗?3ks [\#560](https://github.com/overtrue/wechat/issues/560) -- 刷新access\_token有效期,未发现有相关的封装 [\#540](https://github.com/overtrue/wechat/issues/540) - -**Merged pull requests:** - -- Update Card.php [\#562](https://github.com/overtrue/wechat/pull/562) ([XiaoLer](https://github.com/XiaoLer)) -- Apply fixes from StyleCI [\#559](https://github.com/overtrue/wechat/pull/559) ([overtrue](https://github.com/overtrue)) -- Update API.php [\#558](https://github.com/overtrue/wechat/pull/558) ([drogjh](https://github.com/drogjh)) -- optimized code [\#557](https://github.com/overtrue/wechat/pull/557) ([mingyoung](https://github.com/mingyoung)) - -## [3.2.2](https://github.com/overtrue/wechat/tree/3.2.2) (2016-12-27) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.1...3.2.2) - -**Closed issues:** - -- How to get authorize url? [\#555](https://github.com/overtrue/wechat/issues/555) - -**Merged pull requests:** - -- fixed downloadBill method result [\#556](https://github.com/overtrue/wechat/pull/556) ([hidehalo](https://github.com/hidehalo)) -- add config:log.permission for monolog [\#554](https://github.com/overtrue/wechat/pull/554) ([woshizoufeng](https://github.com/woshizoufeng)) -- Improve open platform support. [\#553](https://github.com/overtrue/wechat/pull/553) ([mingyoung](https://github.com/mingyoung)) -- Improve. [\#552](https://github.com/overtrue/wechat/pull/552) ([mingyoung](https://github.com/mingyoung)) -- add $forceRefresh param to js-\>ticket\(\) method [\#551](https://github.com/overtrue/wechat/pull/551) ([leo108](https://github.com/leo108)) - -## [3.2.1](https://github.com/overtrue/wechat/tree/3.2.1) (2016-12-20) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.0...3.2.1) - -**Merged pull requests:** - -- 增加小程序用jscode获取用户信息的接口 [\#550](https://github.com/overtrue/wechat/pull/550) ([soone](https://github.com/soone)) - -## [3.2.0](https://github.com/overtrue/wechat/tree/3.2.0) (2016-12-19) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.9...3.2.0) - -**Closed issues:** - -- 喵喵喵 [\#545](https://github.com/overtrue/wechat/issues/545) -- HttpException with uploadArticle API [\#544](https://github.com/overtrue/wechat/issues/544) -- 是否有接入小程序的计划 [\#543](https://github.com/overtrue/wechat/issues/543) -- "Call to undefined method Overtrue\Socialite\Providers\WeChat Provider::driver\(\) [\#536](https://github.com/overtrue/wechat/issues/536) -- 服务端Server模块回复音乐消息出错 [\#533](https://github.com/overtrue/wechat/issues/533) -- 用户授权出现The key "access\_token" could not be empty [\#527](https://github.com/overtrue/wechat/issues/527) - -**Merged pull requests:** - -- Apply fixes from StyleCI [\#549](https://github.com/overtrue/wechat/pull/549) ([overtrue](https://github.com/overtrue)) -- 添加摇一摇周边模块 [\#548](https://github.com/overtrue/wechat/pull/548) ([allen05ren](https://github.com/allen05ren)) -- Make some compatible. [\#542](https://github.com/overtrue/wechat/pull/542) ([mingyoung](https://github.com/mingyoung)) -- Apply fixes from StyleCI [\#541](https://github.com/overtrue/wechat/pull/541) ([overtrue](https://github.com/overtrue)) -- 改变了http 中 json 方法的接口, 从而支持 添加 添加 query参数 [\#539](https://github.com/overtrue/wechat/pull/539) ([shoaly](https://github.com/shoaly)) -- 提交 [\#537](https://github.com/overtrue/wechat/pull/537) ([shoaly](https://github.com/shoaly)) -- Apply fixes from StyleCI [\#535](https://github.com/overtrue/wechat/pull/535) ([overtrue](https://github.com/overtrue)) - -## [3.1.9](https://github.com/overtrue/wechat/tree/3.1.9) (2016-12-01) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.8...3.1.9) - -**Closed issues:** - -- 还是不懂怎么获取unionid [\#531](https://github.com/overtrue/wechat/issues/531) -- Scope 参数错误或没有 Scope 权限 [\#528](https://github.com/overtrue/wechat/issues/528) -- $\_SERVER\['SERVER\_ADDR'\] 在mac php7中获取不到 [\#520](https://github.com/overtrue/wechat/issues/520) -- 能否永久素材其他类型封装个download方法,跟临时一样 [\#505](https://github.com/overtrue/wechat/issues/505) -- V3.1 JSSDK使用疑惑 [\#503](https://github.com/overtrue/wechat/issues/503) -- 如何加入QQ群 [\#501](https://github.com/overtrue/wechat/issues/501) -- 能否在下一个版本把企业的相关接口整合集成进去 [\#496](https://github.com/overtrue/wechat/issues/496) -- 既然使用了monolog,那么在Application::initializeLogger只使用了文件流的特定形式来记录日志是否合理? [\#494](https://github.com/overtrue/wechat/issues/494) -- configForShareAddress [\#482](https://github.com/overtrue/wechat/issues/482) -- 更新微信文章的时候MatialEasyWeChat\Material,如果设置了show\_pic\_cover和content\_source\_url不会生效 [\#470](https://github.com/overtrue/wechat/issues/470) -- 请问 SDK 是否支持授权接入的公众号接口调用? [\#438](https://github.com/overtrue/wechat/issues/438) -- 通过unionid发送信息。 [\#411](https://github.com/overtrue/wechat/issues/411) -- 【新增】设备管理 [\#77](https://github.com/overtrue/wechat/issues/77) - -**Merged pull requests:** - -- Add support wechat open platform. [\#532](https://github.com/overtrue/wechat/pull/532) ([mingyoung](https://github.com/mingyoung)) -- Applied fixes from StyleCI [\#530](https://github.com/overtrue/wechat/pull/530) ([overtrue](https://github.com/overtrue)) -- 新增硬件设备api [\#529](https://github.com/overtrue/wechat/pull/529) ([soone](https://github.com/soone)) - -## [3.1.8](https://github.com/overtrue/wechat/tree/3.1.8) (2016-11-23) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.7...3.1.8) - -**Closed issues:** - -- SCAN 事件会出现无法提供服务 [\#525](https://github.com/overtrue/wechat/issues/525) - -## [3.1.7](https://github.com/overtrue/wechat/tree/3.1.7) (2016-10-26) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.6...3.1.7) - -**Closed issues:** - -- preg\_replace unicode 的兼容问题 [\#515](https://github.com/overtrue/wechat/issues/515) - -**Merged pull requests:** - -- support psr-http-message-bridge 1.0 [\#524](https://github.com/overtrue/wechat/pull/524) ([wppd](https://github.com/wppd)) -- Applied fixes from StyleCI [\#523](https://github.com/overtrue/wechat/pull/523) ([overtrue](https://github.com/overtrue)) -- for \#520 [\#522](https://github.com/overtrue/wechat/pull/522) ([jinchun](https://github.com/jinchun)) - -## [3.1.6](https://github.com/overtrue/wechat/tree/3.1.6) (2016-10-19) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.5...3.1.6) - -**Closed issues:** - -- PHP Fatal error: Uncaught HttpException [\#517](https://github.com/overtrue/wechat/issues/517) -- 微信支付回调出错 [\#514](https://github.com/overtrue/wechat/issues/514) - -**Merged pull requests:** - -- Fix xml preg replace [\#519](https://github.com/overtrue/wechat/pull/519) ([springjk](https://github.com/springjk)) -- fix the DOC [\#518](https://github.com/overtrue/wechat/pull/518) ([ac1982](https://github.com/ac1982)) - -## [3.1.5](https://github.com/overtrue/wechat/tree/3.1.5) (2016-10-13) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.4...3.1.5) - -**Closed issues:** - -- wechat 在 larave l5.3 使用 passport 包下无法安装 [\#513](https://github.com/overtrue/wechat/issues/513) - -**Merged pull requests:** - -- Applied fixes from StyleCI [\#512](https://github.com/overtrue/wechat/pull/512) ([overtrue](https://github.com/overtrue)) - -## [3.1.4](https://github.com/overtrue/wechat/tree/3.1.4) (2016-10-12) -[Full Changelog](https://github.com/overtrue/wechat/compare/2.1.39...3.1.4) - -**Closed issues:** - -- 微信卡券特殊票券创建之后为什么无法更新卡券信息一致提示code非法。 [\#511](https://github.com/overtrue/wechat/issues/511) -- 请添加 「退款方式」 参数 [\#509](https://github.com/overtrue/wechat/issues/509) -- 2.1.40命名空间巨变引发的重大问题\(疑似提错版本了\) [\#508](https://github.com/overtrue/wechat/issues/508) -- 卡券核销、查询建议 [\#506](https://github.com/overtrue/wechat/issues/506) -- 支付重复回调问题 [\#504](https://github.com/overtrue/wechat/issues/504) - -**Merged pull requests:** - -- Changed method doc to the right accepted param type [\#510](https://github.com/overtrue/wechat/pull/510) ([marianoasselborn](https://github.com/marianoasselborn)) -- 增加判断是否有人工客服帐号,避免出现无账号时候,头像为默认头像的情况 [\#502](https://github.com/overtrue/wechat/pull/502) ([hello2t](https://github.com/hello2t)) -- Applied fixes from StyleCI [\#500](https://github.com/overtrue/wechat/pull/500) ([overtrue](https://github.com/overtrue)) -- 为initializeLogger日志初始话函数添加判断分支 [\#499](https://github.com/overtrue/wechat/pull/499) ([403studio](https://github.com/403studio)) - -## [2.1.39](https://github.com/overtrue/wechat/tree/2.1.39) (2016-09-05) -[Full Changelog](https://github.com/overtrue/wechat/compare/2.1.41...2.1.39) - -## [2.1.41](https://github.com/overtrue/wechat/tree/2.1.41) (2016-09-05) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.3...2.1.41) - -**Closed issues:** - -- 调用接口次数超过最大限制问题 [\#493](https://github.com/overtrue/wechat/issues/493) -- 微信退款证书报错 Unable to set private key file [\#492](https://github.com/overtrue/wechat/issues/492) -- 微信支付存在问题 [\#489](https://github.com/overtrue/wechat/issues/489) -- 预支付下单 response body 为空 [\#488](https://github.com/overtrue/wechat/issues/488) -- https check issue [\#486](https://github.com/overtrue/wechat/issues/486) - -**Merged pull requests:** - -- update composer.json [\#498](https://github.com/overtrue/wechat/pull/498) ([ac1982](https://github.com/ac1982)) -- use openssl instead of mcrypt [\#497](https://github.com/overtrue/wechat/pull/497) ([ac1982](https://github.com/ac1982)) -- 修复 with 方法带数据的问题 [\#491](https://github.com/overtrue/wechat/pull/491) ([XiaoLer](https://github.com/XiaoLer)) - -## [3.1.3](https://github.com/overtrue/wechat/tree/3.1.3) (2016-08-08) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.2...3.1.3) - -**Closed issues:** - -- Laravel中写的最简单的例子在phpunit出错。 [\#485](https://github.com/overtrue/wechat/issues/485) -- 微信的消息回复的FromUserName和ToUserName是不是对调了 [\#484](https://github.com/overtrue/wechat/issues/484) -- 微信红包不能发给别的公众号的用户吗 [\#483](https://github.com/overtrue/wechat/issues/483) -- 用户授权登录问题 [\#481](https://github.com/overtrue/wechat/issues/481) -- cURL error 56: SSLRead\(\) return error -9806 [\#473](https://github.com/overtrue/wechat/issues/473) -- 会员卡开卡字段文档有错误 [\#471](https://github.com/overtrue/wechat/issues/471) -- Getting more done in GitHub with ZenHub [\#439](https://github.com/overtrue/wechat/issues/439) -- 微信支付下单错误 [\#376](https://github.com/overtrue/wechat/issues/376) - -**Merged pull requests:** - -- update the File class to recognize pdf file. [\#480](https://github.com/overtrue/wechat/pull/480) ([ac1982](https://github.com/ac1982)) -- update testActivateUserForm [\#478](https://github.com/overtrue/wechat/pull/478) ([wangniuniu](https://github.com/wangniuniu)) -- Scrutinizer Auto-Fixes [\#477](https://github.com/overtrue/wechat/pull/477) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- Applied fixes from StyleCI [\#476](https://github.com/overtrue/wechat/pull/476) ([overtrue](https://github.com/overtrue)) -- Scrutinizer Auto-Fixes [\#475](https://github.com/overtrue/wechat/pull/475) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- 开放自定义prefix和缓存键值方法 [\#474](https://github.com/overtrue/wechat/pull/474) ([XiaoLer](https://github.com/XiaoLer)) -- Applied fixes from StyleCI [\#469](https://github.com/overtrue/wechat/pull/469) ([overtrue](https://github.com/overtrue)) -- modify stats [\#468](https://github.com/overtrue/wechat/pull/468) ([wangniuniu](https://github.com/wangniuniu)) - -## [3.1.2](https://github.com/overtrue/wechat/tree/3.1.2) (2016-07-21) -[Full Changelog](https://github.com/overtrue/wechat/compare/2.1.38...3.1.2) - -**Closed issues:** - -- 素材管理中,上传图文下的上传图片,关于返回内容的差异 [\#466](https://github.com/overtrue/wechat/issues/466) -- spbill\_create\_ip参数设置 [\#461](https://github.com/overtrue/wechat/issues/461) - -**Merged pull requests:** - -- 更新获取标签下粉丝列表方法 [\#467](https://github.com/overtrue/wechat/pull/467) ([dingdayu](https://github.com/dingdayu)) -- Applied fixes from StyleCI [\#465](https://github.com/overtrue/wechat/pull/465) ([overtrue](https://github.com/overtrue)) -- card module. [\#464](https://github.com/overtrue/wechat/pull/464) ([wangniuniu](https://github.com/wangniuniu)) -- Applied fixes from StyleCI [\#463](https://github.com/overtrue/wechat/pull/463) ([overtrue](https://github.com/overtrue)) -- Scrutinizer Auto-Fixes [\#462](https://github.com/overtrue/wechat/pull/462) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) - -## [2.1.38](https://github.com/overtrue/wechat/tree/2.1.38) (2016-07-16) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.1...2.1.38) - -**Closed issues:** - -- 请问卡券管理功能整合上日程表了吗 [\#454](https://github.com/overtrue/wechat/issues/454) - -**Merged pull requests:** - -- Typo. [\#460](https://github.com/overtrue/wechat/pull/460) ([tianyong90](https://github.com/tianyong90)) -- Applied fixes from StyleCI [\#459](https://github.com/overtrue/wechat/pull/459) ([overtrue](https://github.com/overtrue)) -- add voice recognition [\#458](https://github.com/overtrue/wechat/pull/458) ([leniy](https://github.com/leniy)) -- Applied fixes from StyleCI [\#457](https://github.com/overtrue/wechat/pull/457) ([overtrue](https://github.com/overtrue)) -- Update API.php [\#456](https://github.com/overtrue/wechat/pull/456) ([marvin8212](https://github.com/marvin8212)) -- Update XML.php [\#455](https://github.com/overtrue/wechat/pull/455) ([canon4ever](https://github.com/canon4ever)) - -## [3.1.1](https://github.com/overtrue/wechat/tree/3.1.1) (2016-07-12) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.0...3.1.1) - -**Closed issues:** - -- 拿到code=CODE&state=STATE之后怎么拿到openid? [\#452](https://github.com/overtrue/wechat/issues/452) -- 安装出错 [\#450](https://github.com/overtrue/wechat/issues/450) -- 自定义菜单接口\(新版\)出错 [\#448](https://github.com/overtrue/wechat/issues/448) -- h5上没法打开微信app授权界面 [\#447](https://github.com/overtrue/wechat/issues/447) -- 重构卡券 [\#76](https://github.com/overtrue/wechat/issues/76) - -**Merged pull requests:** - -- typos. [\#453](https://github.com/overtrue/wechat/pull/453) ([tianye](https://github.com/tianye)) -- edit readme.md [\#451](https://github.com/overtrue/wechat/pull/451) ([tianyong90](https://github.com/tianyong90)) -- Add cache driver config. [\#449](https://github.com/overtrue/wechat/pull/449) ([dingdayu](https://github.com/dingdayu)) - -## [3.1.0](https://github.com/overtrue/wechat/tree/3.1.0) (2016-06-28) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.0.21...3.1.0) - -**Merged pull requests:** - -- Applied fixes from StyleCI [\#446](https://github.com/overtrue/wechat/pull/446) ([overtrue](https://github.com/overtrue)) -- New Staff API. [\#445](https://github.com/overtrue/wechat/pull/445) ([overtrue](https://github.com/overtrue)) -- 2.1 [\#444](https://github.com/overtrue/wechat/pull/444) ([dongnanyanhai](https://github.com/dongnanyanhai)) -- Fix path. [\#443](https://github.com/overtrue/wechat/pull/443) ([overtrue](https://github.com/overtrue)) - -## [3.0.21](https://github.com/overtrue/wechat/tree/3.0.21) (2016-06-17) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.0.1...3.0.21) - -**Closed issues:** - -- scan出现公众号暂时无法服务的消息 [\#436](https://github.com/overtrue/wechat/issues/436) -- scan出现公众号暂时无法服务的消息 [\#435](https://github.com/overtrue/wechat/issues/435) -- 用户标签接口无法使用 [\#433](https://github.com/overtrue/wechat/issues/433) -- WeChatProvider下的getAuthUrl个人觉得应该暴露出来 [\#432](https://github.com/overtrue/wechat/issues/432) -- 支持二维码扫描进入公众号推送的SCAN事件 [\#431](https://github.com/overtrue/wechat/issues/431) -- \[3.0\] EasyWeChat\Support\XML::parse方法会将空节点解析为空数组,而不是空字符串 [\#426](https://github.com/overtrue/wechat/issues/426) -- 下载二维码, $qrcode-\>download\($ticket,$paths\); 目录参数不可加入 中文 [\#420](https://github.com/overtrue/wechat/issues/420) -- \[help want\]Is hard to change default configuration of GuzzleHttp [\#415](https://github.com/overtrue/wechat/issues/415) -- PHP7.0 curl\_setopt 设置问题 [\#413](https://github.com/overtrue/wechat/issues/413) -- 无法通知微信支付完成 [\#412](https://github.com/overtrue/wechat/issues/412) -- 如何获取用户的unionid? [\#407](https://github.com/overtrue/wechat/issues/407) -- 是否支持多框架 [\#406](https://github.com/overtrue/wechat/issues/406) -- fuckTheWeChatInvalidJSON [\#405](https://github.com/overtrue/wechat/issues/405) -- Class 'GuzzleHttp\Middleware' not found [\#404](https://github.com/overtrue/wechat/issues/404) -- 支付统一下单接口签名错误 [\#402](https://github.com/overtrue/wechat/issues/402) -- payment里没有configForJSSDKPayment方法 [\#401](https://github.com/overtrue/wechat/issues/401) -- 查询支付的地址多了一个空格,导致查询失败,去掉最后的那个空格后就好了 [\#393](https://github.com/overtrue/wechat/issues/393) -- 网页授权过不了 [\#392](https://github.com/overtrue/wechat/issues/392) -- 微信AccessToken被动更新可能会有并发更新的情况出现 [\#390](https://github.com/overtrue/wechat/issues/390) -- 临时素材下载,文件名和扩展名之间会有2个\[.\] [\#389](https://github.com/overtrue/wechat/issues/389) -- 有一个地方变量名对不上 [\#380](https://github.com/overtrue/wechat/issues/380) -- 自定义缓存 [\#379](https://github.com/overtrue/wechat/issues/379) -- https://easywechat.org/ 底部 “开始使用” url拼错 [\#378](https://github.com/overtrue/wechat/issues/378) -- 在server.php里面调用yii的model,一直报错 [\#375](https://github.com/overtrue/wechat/issues/375) -- overture/wechat 2.1.36\(客服消息转发错误\) [\#374](https://github.com/overtrue/wechat/issues/374) -- 建议支持开发模式下禁用验证 [\#373](https://github.com/overtrue/wechat/issues/373) -- https://easywechat.org/ 导航 首页 about:blank [\#370](https://github.com/overtrue/wechat/issues/370) -- laravel 下session问题 [\#369](https://github.com/overtrue/wechat/issues/369) -- 关于Access——toekn [\#368](https://github.com/overtrue/wechat/issues/368) -- 返回支付页面时报错:"access\_token" could not be empty [\#367](https://github.com/overtrue/wechat/issues/367) -- xampp下js-\>config报错 [\#366](https://github.com/overtrue/wechat/issues/366) -- 官方文档有误 [\#360](https://github.com/overtrue/wechat/issues/360) -- \[BUG\] 微信收货地址无法成功 [\#359](https://github.com/overtrue/wechat/issues/359) -- 无法获取 $message-\>ScanCodeInfo-\>ScanType 对象 [\#358](https://github.com/overtrue/wechat/issues/358) -- \[Bugs\] 项目文档首页跳转问题 [\#357](https://github.com/overtrue/wechat/issues/357) -- Business和UnifiedOrder没有定义 [\#356](https://github.com/overtrue/wechat/issues/356) -- 你的网站访问不了。。。。https://easywechat.org/ [\#352](https://github.com/overtrue/wechat/issues/352) -- 连续多次执行微信支付退款报错 [\#348](https://github.com/overtrue/wechat/issues/348) -- 客服操作 都是 -1 错误 [\#344](https://github.com/overtrue/wechat/issues/344) -- 请使用openssl 而不是不安全的mcrypt来加密 [\#342](https://github.com/overtrue/wechat/issues/342) -- 文本类型的通知消息 [\#341](https://github.com/overtrue/wechat/issues/341) -- 服务器配置https 并且 通过阿里云 https cdn之后, 会出现 https 判断语句失效 [\#338](https://github.com/overtrue/wechat/issues/338) -- 作者请问者个sdk支持企业号吗? [\#336](https://github.com/overtrue/wechat/issues/336) -- laravel 5.1引入包报错 [\#331](https://github.com/overtrue/wechat/issues/331) -- 申请退款有问题 [\#328](https://github.com/overtrue/wechat/issues/328) -- 订单相关接口bug [\#327](https://github.com/overtrue/wechat/issues/327) -- 临时素材接口无法使用 [\#319](https://github.com/overtrue/wechat/issues/319) -- 使用sendNormal\(\),sendGroup\(\)发送红包时,报Undefined index: HTTP\_CLIENT\_IP [\#316](https://github.com/overtrue/wechat/issues/316) -- v3中微信卡券功能缺失? [\#307](https://github.com/overtrue/wechat/issues/307) -- 测试 [\#305](https://github.com/overtrue/wechat/issues/305) -- \[3.0\] 永久素材上传视频无法上传问题 [\#304](https://github.com/overtrue/wechat/issues/304) -- Cannot destroy active lambda function [\#296](https://github.com/overtrue/wechat/issues/296) -- 微信支付-》企业付款也可以增加个类上去,跟企业红包类似 [\#232](https://github.com/overtrue/wechat/issues/232) - -**Merged pull requests:** - -- Applied fixes from StyleCI [\#442](https://github.com/overtrue/wechat/pull/442) ([overtrue](https://github.com/overtrue)) -- NGINX HTTPS无法签名 [\#441](https://github.com/overtrue/wechat/pull/441) ([ares333](https://github.com/ares333)) -- Develop [\#440](https://github.com/overtrue/wechat/pull/440) ([overtrue](https://github.com/overtrue)) -- Develop [\#437](https://github.com/overtrue/wechat/pull/437) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#434](https://github.com/overtrue/wechat/pull/434) ([overtrue](https://github.com/overtrue)) -- 修改错误提示信息,方便跟踪错误 [\#430](https://github.com/overtrue/wechat/pull/430) ([zerozh](https://github.com/zerozh)) -- Develop [\#429](https://github.com/overtrue/wechat/pull/429) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#428](https://github.com/overtrue/wechat/pull/428) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#427](https://github.com/overtrue/wechat/pull/427) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#425](https://github.com/overtrue/wechat/pull/425) ([overtrue](https://github.com/overtrue)) -- update annotation [\#424](https://github.com/overtrue/wechat/pull/424) ([lilocon](https://github.com/lilocon)) -- Develop [\#421](https://github.com/overtrue/wechat/pull/421) ([overtrue](https://github.com/overtrue)) -- Set default timeout. [\#419](https://github.com/overtrue/wechat/pull/419) ([overtrue](https://github.com/overtrue)) -- Develop [\#418](https://github.com/overtrue/wechat/pull/418) ([overtrue](https://github.com/overtrue)) -- Develop [\#416](https://github.com/overtrue/wechat/pull/416) ([overtrue](https://github.com/overtrue)) -- better implementation for prepare oauth callback url [\#414](https://github.com/overtrue/wechat/pull/414) ([lichunqiang](https://github.com/lichunqiang)) -- Develop [\#410](https://github.com/overtrue/wechat/pull/410) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#409](https://github.com/overtrue/wechat/pull/409) ([overtrue](https://github.com/overtrue)) -- 增加微信支付服务商支持 [\#408](https://github.com/overtrue/wechat/pull/408) ([takatost](https://github.com/takatost)) -- Develop [\#403](https://github.com/overtrue/wechat/pull/403) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#400](https://github.com/overtrue/wechat/pull/400) ([overtrue](https://github.com/overtrue)) -- Scrutinizer Auto-Fixes [\#399](https://github.com/overtrue/wechat/pull/399) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- Develop [\#398](https://github.com/overtrue/wechat/pull/398) ([overtrue](https://github.com/overtrue)) -- Develop [\#397](https://github.com/overtrue/wechat/pull/397) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#396](https://github.com/overtrue/wechat/pull/396) ([overtrue](https://github.com/overtrue)) -- Typo & Improve code. [\#395](https://github.com/overtrue/wechat/pull/395) ([jinchun](https://github.com/jinchun)) -- Develop [\#394](https://github.com/overtrue/wechat/pull/394) ([overtrue](https://github.com/overtrue)) -- Bugfix close \#389 [\#391](https://github.com/overtrue/wechat/pull/391) ([overtrue](https://github.com/overtrue)) -- Update NoticeNoticeTest.php [\#388](https://github.com/overtrue/wechat/pull/388) ([xiabeifeng](https://github.com/xiabeifeng)) -- Update Notice.php [\#387](https://github.com/overtrue/wechat/pull/387) ([xiabeifeng](https://github.com/xiabeifeng)) -- Tests for \#384 [\#386](https://github.com/overtrue/wechat/pull/386) ([xiabeifeng](https://github.com/xiabeifeng)) -- Improve Notice API. [\#384](https://github.com/overtrue/wechat/pull/384) ([xiabeifeng](https://github.com/xiabeifeng)) -- 对应根 版本依赖 [\#382](https://github.com/overtrue/wechat/pull/382) ([parkshinhye](https://github.com/parkshinhye)) -- Develop [\#381](https://github.com/overtrue/wechat/pull/381) ([overtrue](https://github.com/overtrue)) -- Develop [\#377](https://github.com/overtrue/wechat/pull/377) ([overtrue](https://github.com/overtrue)) -- Fix test for \#371 [\#372](https://github.com/overtrue/wechat/pull/372) ([overtrue](https://github.com/overtrue)) -- 刷卡支付不需要notify\_url参数 [\#371](https://github.com/overtrue/wechat/pull/371) ([lilocon](https://github.com/lilocon)) -- Applied fixes from StyleCI [\#365](https://github.com/overtrue/wechat/pull/365) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#364](https://github.com/overtrue/wechat/pull/364) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#363](https://github.com/overtrue/wechat/pull/363) ([overtrue](https://github.com/overtrue)) -- Update composer.json [\#361](https://github.com/overtrue/wechat/pull/361) ([jaychan](https://github.com/jaychan)) -- Applied fixes from StyleCI [\#355](https://github.com/overtrue/wechat/pull/355) ([overtrue](https://github.com/overtrue)) -- \[ci skip\]fix document typo [\#354](https://github.com/overtrue/wechat/pull/354) ([lichunqiang](https://github.com/lichunqiang)) -- 自定义Logger [\#353](https://github.com/overtrue/wechat/pull/353) ([lilocon](https://github.com/lilocon)) -- Update Refund.php [\#351](https://github.com/overtrue/wechat/pull/351) ([jaring](https://github.com/jaring)) -- Applied fixes from StyleCI [\#350](https://github.com/overtrue/wechat/pull/350) ([overtrue](https://github.com/overtrue)) -- OpenSSL bugfix. [\#349](https://github.com/overtrue/wechat/pull/349) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#347](https://github.com/overtrue/wechat/pull/347) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#346](https://github.com/overtrue/wechat/pull/346) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#345](https://github.com/overtrue/wechat/pull/345) ([overtrue](https://github.com/overtrue)) -- 添加代码提示 [\#343](https://github.com/overtrue/wechat/pull/343) ([lilocon](https://github.com/lilocon)) -- Applied fixes from StyleCI [\#340](https://github.com/overtrue/wechat/pull/340) ([overtrue](https://github.com/overtrue)) -- Fix bug: Payment::downloadBill\(\) response error. [\#339](https://github.com/overtrue/wechat/pull/339) ([overtrue](https://github.com/overtrue)) -- change get\_client\_ip to get\_server\_ip [\#335](https://github.com/overtrue/wechat/pull/335) ([tianyong90](https://github.com/tianyong90)) -- Payment SSL. [\#334](https://github.com/overtrue/wechat/pull/334) ([overtrue](https://github.com/overtrue)) -- Add a helper to get correct client ip address. fixed \#316 [\#333](https://github.com/overtrue/wechat/pull/333) ([tianyong90](https://github.com/tianyong90)) -- Dependency Bugfix. overtrue/laravel-wechat\#24 [\#332](https://github.com/overtrue/wechat/pull/332) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#330](https://github.com/overtrue/wechat/pull/330) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#329](https://github.com/overtrue/wechat/pull/329) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#326](https://github.com/overtrue/wechat/pull/326) ([overtrue](https://github.com/overtrue)) -- Add order default notify\_url. [\#325](https://github.com/overtrue/wechat/pull/325) ([foreverglory](https://github.com/foreverglory)) -- Revert "Applied fixes from StyleCI" [\#323](https://github.com/overtrue/wechat/pull/323) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#322](https://github.com/overtrue/wechat/pull/322) ([overtrue](https://github.com/overtrue)) -- Develop [\#321](https://github.com/overtrue/wechat/pull/321) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#320](https://github.com/overtrue/wechat/pull/320) ([overtrue](https://github.com/overtrue)) -- 模板消息添加【 获取模板列表】和【 删除模板】接口 [\#318](https://github.com/overtrue/wechat/pull/318) ([forecho](https://github.com/forecho)) -- Applied fixes from StyleCI [\#314](https://github.com/overtrue/wechat/pull/314) ([overtrue](https://github.com/overtrue)) -- fix Temporary upload bug [\#313](https://github.com/overtrue/wechat/pull/313) ([mani95lisa](https://github.com/mani95lisa)) -- Applied fixes from StyleCI [\#312](https://github.com/overtrue/wechat/pull/312) ([overtrue](https://github.com/overtrue)) -- MerchantPay Class [\#311](https://github.com/overtrue/wechat/pull/311) ([ac1982](https://github.com/ac1982)) -- Applied fixes from StyleCI [\#309](https://github.com/overtrue/wechat/pull/309) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#308](https://github.com/overtrue/wechat/pull/308) ([overtrue](https://github.com/overtrue)) -- 删除裂变红包接口中的ip参数 [\#306](https://github.com/overtrue/wechat/pull/306) ([xjchengo](https://github.com/xjchengo)) -- fix code style and some spelling mistakes [\#303](https://github.com/overtrue/wechat/pull/303) ([jinchun](https://github.com/jinchun)) -- Merge Develop [\#302](https://github.com/overtrue/wechat/pull/302) ([overtrue](https://github.com/overtrue)) -- Add method for app payment [\#301](https://github.com/overtrue/wechat/pull/301) ([lichunqiang](https://github.com/lichunqiang)) -- Removed the return syntax [\#300](https://github.com/overtrue/wechat/pull/300) ([lichunqiang](https://github.com/lichunqiang)) -- add return tag [\#299](https://github.com/overtrue/wechat/pull/299) ([lichunqiang](https://github.com/lichunqiang)) -- Merge Develop [\#298](https://github.com/overtrue/wechat/pull/298) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#297](https://github.com/overtrue/wechat/pull/297) ([overtrue](https://github.com/overtrue)) -- \[ci skip\]Update .gitattributes [\#295](https://github.com/overtrue/wechat/pull/295) ([lichunqiang](https://github.com/lichunqiang)) -- Merge Develop [\#294](https://github.com/overtrue/wechat/pull/294) ([overtrue](https://github.com/overtrue)) - -## [3.0.1](https://github.com/overtrue/wechat/tree/3.0.1) (2016-02-19) -[Full Changelog](https://github.com/overtrue/wechat/compare/3.0...3.0.1) - -**Closed issues:** - -- composer 安装 3.0版本,报错如下: [\#291](https://github.com/overtrue/wechat/issues/291) -- \[3.0\] 下载永久素材时,微信返回的Content-Type不正确,导致出错。 [\#290](https://github.com/overtrue/wechat/issues/290) -- 挖个坑,自己跳 [\#147](https://github.com/overtrue/wechat/issues/147) - -**Merged pull requests:** - -- Applied fixes from StyleCI [\#293](https://github.com/overtrue/wechat/pull/293) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#292](https://github.com/overtrue/wechat/pull/292) ([overtrue](https://github.com/overtrue)) - -## [3.0](https://github.com/overtrue/wechat/tree/3.0) (2016-02-17) -[Full Changelog](https://github.com/overtrue/wechat/compare/2.1.0...3.0) - -**Implemented enhancements:** - -- MIME json 格式检查优化 [\#49](https://github.com/overtrue/wechat/issues/49) -- 获取 refresh\_token,access\_token [\#43](https://github.com/overtrue/wechat/issues/43) -- 关于API\_TOKEN\_REFRESH [\#20](https://github.com/overtrue/wechat/issues/20) - -**Closed issues:** - -- \[3.0\] 无法获取用户分组信息 [\#285](https://github.com/overtrue/wechat/issues/285) -- 新的laravel 5.2 不能兼容了 [\#284](https://github.com/overtrue/wechat/issues/284) -- \[3.0\]Message/Article类的$properties内的source\_url没有正常转换为content\_source\_url. [\#281](https://github.com/overtrue/wechat/issues/281) -- 3.0删除个性菜单失败 [\#280](https://github.com/overtrue/wechat/issues/280) -- 也许你该给一个代码贡献规范 [\#277](https://github.com/overtrue/wechat/issues/277) -- 3.0网页授权时scope为snsapi\_base得不到openid [\#276](https://github.com/overtrue/wechat/issues/276) -- wechat3.0中 有2个地方的js调用参数不一样,超哥没有提供 [\#272](https://github.com/overtrue/wechat/issues/272) -- 我想知道2.X和3.0有什么大的区别! [\#270](https://github.com/overtrue/wechat/issues/270) -- 2.1: Link 消息类型没有实现 [\#269](https://github.com/overtrue/wechat/issues/269) -- 关于模板消息换行的问题 [\#266](https://github.com/overtrue/wechat/issues/266) -- easywechat Invalid request [\#265](https://github.com/overtrue/wechat/issues/265) -- 40029不合法的oauth\_code [\#264](https://github.com/overtrue/wechat/issues/264) -- 下载素材的一个小问题 [\#263](https://github.com/overtrue/wechat/issues/263) -- \[2.1\] 微信自定义菜单结构变更导致`Menu::get\(\)` 无法读取个性化菜单 [\#262](https://github.com/overtrue/wechat/issues/262) -- payment中是不是不包含H5和JS的生成配置文件的方法了? [\#261](https://github.com/overtrue/wechat/issues/261) -- payment下prepare方法bug [\#260](https://github.com/overtrue/wechat/issues/260) -- UserServiceProvider中似乎忘记注册user.group了 [\#256](https://github.com/overtrue/wechat/issues/256) -- 2.1.X版媒体下载没有扩展名 [\#252](https://github.com/overtrue/wechat/issues/252) -- 为什么所有的子模块在自己的库都是develop分支 [\#247](https://github.com/overtrue/wechat/issues/247) -- 网页授权使用跳转的bug [\#246](https://github.com/overtrue/wechat/issues/246) -- typo of variable [\#245](https://github.com/overtrue/wechat/issues/245) -- The implementation class of ServerServiceProvider missing an important [\#244](https://github.com/overtrue/wechat/issues/244) -- \[3.0\]\[payment\] 两个可能的bug [\#235](https://github.com/overtrue/wechat/issues/235) -- 发送多图文 [\#233](https://github.com/overtrue/wechat/issues/233) -- 自定义菜单返回应该把个性化自定义菜单也一起返回 [\#231](https://github.com/overtrue/wechat/issues/231) -- 发送模板消息 CRUL 错误 [\#223](https://github.com/overtrue/wechat/issues/223) -- 客服接口暂时测到有3个bug,麻烦修复 [\#222](https://github.com/overtrue/wechat/issues/222) -- JSSDK access\_token missing [\#211](https://github.com/overtrue/wechat/issues/211) -- Js.php/ticket [\#210](https://github.com/overtrue/wechat/issues/210) -- 微信支付里有一个收货地址共享 ,超哥你这里没有,可以加一下不? [\#204](https://github.com/overtrue/wechat/issues/204) -- 小问题 [\#203](https://github.com/overtrue/wechat/issues/203) -- 网页授权 跳转 [\#202](https://github.com/overtrue/wechat/issues/202) -- access token 重复添加的问题 [\#201](https://github.com/overtrue/wechat/issues/201) -- authorize snsapi\_base 下可以获取unionid [\#198](https://github.com/overtrue/wechat/issues/198) -- 网页授权 [\#189](https://github.com/overtrue/wechat/issues/189) -- 一点建议 [\#188](https://github.com/overtrue/wechat/issues/188) -- 接口更新-新增临时素材接口变动 [\#186](https://github.com/overtrue/wechat/issues/186) -- 接入多个公众号不用id [\#185](https://github.com/overtrue/wechat/issues/185) -- \[Insight\] Files should not be executable [\#184](https://github.com/overtrue/wechat/issues/184) -- 建议不要写死Http [\#183](https://github.com/overtrue/wechat/issues/183) -- laravel4.2安装不成功 [\#182](https://github.com/overtrue/wechat/issues/182) -- 是否支持laravel4.2 [\#181](https://github.com/overtrue/wechat/issues/181) -- 微信出个性化菜单了,希望支持 [\#180](https://github.com/overtrue/wechat/issues/180) -- 3.0 composer依赖Symfony2.7。能不能支持Symfony3.0? [\#179](https://github.com/overtrue/wechat/issues/179) -- 发送链接类消息错误 [\#175](https://github.com/overtrue/wechat/issues/175) -- Throw Exception的时候 Intel server status 设置为200是不是好一些 [\#174](https://github.com/overtrue/wechat/issues/174) -- 生成临时二维码时,返回EventKey不是传递的值 [\#173](https://github.com/overtrue/wechat/issues/173) -- 关于素材获取的一个建议 [\#172](https://github.com/overtrue/wechat/issues/172) -- 能否增加微信APP支付相关方法 [\#171](https://github.com/overtrue/wechat/issues/171) -- 微信回调URL回调不到 [\#170](https://github.com/overtrue/wechat/issues/170) -- 素材管理添加永久素材返回JSON/XML内容错误 [\#169](https://github.com/overtrue/wechat/issues/169) -- \[消息的使用\] 中 \[上传素材文件\] 的文档示例貌似有误 [\#168](https://github.com/overtrue/wechat/issues/168) -- 素材管理里的download方法不是很符合sdk一站式的解决. [\#165](https://github.com/overtrue/wechat/issues/165) -- \[Wechat\]不合法的oauth\_code' in /src/Wechat/Http.php:124 [\#164](https://github.com/overtrue/wechat/issues/164) -- AccessToken Expired Error Code [\#163](https://github.com/overtrue/wechat/issues/163) -- 素材管理接口出错 [\#162](https://github.com/overtrue/wechat/issues/162) -- 两处代码php5.4才能运行 [\#158](https://github.com/overtrue/wechat/issues/158) -- extension is null when calling `download video` in wechat.media [\#157](https://github.com/overtrue/wechat/issues/157) -- Payment/UnifiedOrder does not support serialize or create by array [\#155](https://github.com/overtrue/wechat/issues/155) -- 没有找到"微信支付-\>查询订单"相关功能 [\#150](https://github.com/overtrue/wechat/issues/150) -- 请教,Cache::setter中your\_custom\_set\_cache怎么使用 [\#149](https://github.com/overtrue/wechat/issues/149) -- 发生异常时, 希望能把发送和接收的原始数据记录下来. [\#148](https://github.com/overtrue/wechat/issues/148) -- 发送红包,证书错误 [\#144](https://github.com/overtrue/wechat/issues/144) -- 发视频消息总返回 -1 [\#143](https://github.com/overtrue/wechat/issues/143) -- 关于PHP版本 [\#141](https://github.com/overtrue/wechat/issues/141) -- Server消息回复必须以事件方式吗? [\#140](https://github.com/overtrue/wechat/issues/140) -- 微信支付相关文档细化 [\#138](https://github.com/overtrue/wechat/issues/138) -- 好奇地问个问题,这项目的测试用例放在哪? [\#135](https://github.com/overtrue/wechat/issues/135) -- 试了两次,真的不会用 [\#134](https://github.com/overtrue/wechat/issues/134) -- 不知道这算不算是个BUG [\#133](https://github.com/overtrue/wechat/issues/133) -- 微信小店 [\#130](https://github.com/overtrue/wechat/issues/130) -- 多次遇到 accesstoken 无效的问题 [\#129](https://github.com/overtrue/wechat/issues/129) -- MCH\_KEY 微信支付 [\#128](https://github.com/overtrue/wechat/issues/128) -- 使用flightphp框架,验证URL的时候,在Apache下接入成功,在Nginx接入失败 [\#126](https://github.com/overtrue/wechat/issues/126) -- 好东西!可惜没有我需要的微信红包 [\#125](https://github.com/overtrue/wechat/issues/125) -- Cache存储部件可定制 [\#120](https://github.com/overtrue/wechat/issues/120) -- 关于Bag [\#119](https://github.com/overtrue/wechat/issues/119) -- 将代码部署到负载均衡上如何管理access token [\#118](https://github.com/overtrue/wechat/issues/118) -- 消息接受和回复时,如果不对消息做回复,该如何做? [\#117](https://github.com/overtrue/wechat/issues/117) -- 请教一个问题 [\#116](https://github.com/overtrue/wechat/issues/116) -- 关于 Cache [\#115](https://github.com/overtrue/wechat/issues/115) -- 如何才能获取普通的access\_token [\#113](https://github.com/overtrue/wechat/issues/113) -- $HTTP\_RAW\_POST\_DATA DEPRECATED [\#111](https://github.com/overtrue/wechat/issues/111) -- App支付缺少错误码 [\#109](https://github.com/overtrue/wechat/issues/109) -- 当用户信息有 " 字符时系统出错 \(用户与用户组管理接口\) [\#107](https://github.com/overtrue/wechat/issues/107) -- 提示错误 [\#106](https://github.com/overtrue/wechat/issues/106) -- 使用企业号的时候 接入失败啊,在验证url的时候 [\#104](https://github.com/overtrue/wechat/issues/104) -- 支付签名错误 [\#101](https://github.com/overtrue/wechat/issues/101) -- 微信支付.$payment-\>getConfig\(\)调用时候\[Wechat\]系统繁忙,此时请开发者稍候再试. [\#96](https://github.com/overtrue/wechat/issues/96) -- wechat/src/Wechat/Payment/UnifiedOrder.php 小问题 [\#94](https://github.com/overtrue/wechat/issues/94) -- 请教laravel中如何在微信支付中 catch UnifiedOrder 抛出的异常? [\#93](https://github.com/overtrue/wechat/issues/93) -- 是否可以增加一个第三方接口融合功能 [\#91](https://github.com/overtrue/wechat/issues/91) -- 订单查询 [\#90](https://github.com/overtrue/wechat/issues/90) -- 如何不下载图片,通过mediaId获取图片存储的URL [\#89](https://github.com/overtrue/wechat/issues/89) -- 'Undefined index: HTTP\_HOST' [\#88](https://github.com/overtrue/wechat/issues/88) -- Undefined index: HTTP\_HOST [\#87](https://github.com/overtrue/wechat/issues/87) -- 不能上传gif格式的图片素材 [\#84](https://github.com/overtrue/wechat/issues/84) -- OAuth重构 [\#74](https://github.com/overtrue/wechat/issues/74) -- \[3.0\] Tasks [\#50](https://github.com/overtrue/wechat/issues/50) -- appId 和 appSecret不要作为各个类的构造参数 [\#114](https://github.com/overtrue/wechat/issues/114) -- 增加debug相关的选项 [\#112](https://github.com/overtrue/wechat/issues/112) -- 好像没有获取自动回复数据接口 [\#108](https://github.com/overtrue/wechat/issues/108) -- js端查看微信卡券接口 chooseCard [\#79](https://github.com/overtrue/wechat/issues/79) -- 【新增】支付 [\#78](https://github.com/overtrue/wechat/issues/78) -- 模板消息重构 [\#75](https://github.com/overtrue/wechat/issues/75) -- 素材下载自动识别MIME生成后缀 [\#54](https://github.com/overtrue/wechat/issues/54) -- \[建议\] 深度结合微信多图文与素材管理 [\#46](https://github.com/overtrue/wechat/issues/46) -- 群发功能 [\#18](https://github.com/overtrue/wechat/issues/18) - -**Merged pull requests:** - -- 3.0 [\#289](https://github.com/overtrue/wechat/pull/289) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#288](https://github.com/overtrue/wechat/pull/288) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#287](https://github.com/overtrue/wechat/pull/287) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#286](https://github.com/overtrue/wechat/pull/286) ([overtrue](https://github.com/overtrue)) -- Fix bug in batchGet method. [\#283](https://github.com/overtrue/wechat/pull/283) ([tianyong90](https://github.com/tianyong90)) -- Typo. [\#279](https://github.com/overtrue/wechat/pull/279) ([overtrue](https://github.com/overtrue)) -- Add contribution guide. resolves \#277 [\#278](https://github.com/overtrue/wechat/pull/278) ([overtrue](https://github.com/overtrue)) -- Develop [\#274](https://github.com/overtrue/wechat/pull/274) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#273](https://github.com/overtrue/wechat/pull/273) ([overtrue](https://github.com/overtrue)) -- Develop [\#271](https://github.com/overtrue/wechat/pull/271) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#268](https://github.com/overtrue/wechat/pull/268) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#267](https://github.com/overtrue/wechat/pull/267) ([overtrue](https://github.com/overtrue)) -- Update QRCode.php [\#258](https://github.com/overtrue/wechat/pull/258) ([webshiyue](https://github.com/webshiyue)) -- Add tests for LuckyMoney. [\#255](https://github.com/overtrue/wechat/pull/255) ([tianyong90](https://github.com/tianyong90)) -- CS. [\#254](https://github.com/overtrue/wechat/pull/254) ([overtrue](https://github.com/overtrue)) -- Scrutinizer Auto-Fixes [\#253](https://github.com/overtrue/wechat/pull/253) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- Applied fixes from StyleCI [\#251](https://github.com/overtrue/wechat/pull/251) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#250](https://github.com/overtrue/wechat/pull/250) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#249](https://github.com/overtrue/wechat/pull/249) ([overtrue](https://github.com/overtrue)) -- Merge Develop [\#248](https://github.com/overtrue/wechat/pull/248) ([overtrue](https://github.com/overtrue)) -- Merge from Develop [\#243](https://github.com/overtrue/wechat/pull/243) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#242](https://github.com/overtrue/wechat/pull/242) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#241](https://github.com/overtrue/wechat/pull/241) ([overtrue](https://github.com/overtrue)) -- Add Luckymoney. [\#240](https://github.com/overtrue/wechat/pull/240) ([tianyong90](https://github.com/tianyong90)) -- Applied fixes from StyleCI [\#237](https://github.com/overtrue/wechat/pull/237) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#234](https://github.com/overtrue/wechat/pull/234) ([overtrue](https://github.com/overtrue)) -- Multiple News Items Support [\#230](https://github.com/overtrue/wechat/pull/230) ([fanglinks](https://github.com/fanglinks)) -- Applied fixes from StyleCI [\#221](https://github.com/overtrue/wechat/pull/221) ([overtrue](https://github.com/overtrue)) -- \[3.0\]\[Bugfix\]发送图文消息缺少type [\#217](https://github.com/overtrue/wechat/pull/217) ([sunbiao0526](https://github.com/sunbiao0526)) -- fix Js.php 获取自定义cache对象 [\#215](https://github.com/overtrue/wechat/pull/215) ([sunbiao0526](https://github.com/sunbiao0526)) -- Applied fixes from StyleCI [\#197](https://github.com/overtrue/wechat/pull/197) ([overtrue](https://github.com/overtrue)) -- Add alias [\#196](https://github.com/overtrue/wechat/pull/196) ([ruchengtang](https://github.com/ruchengtang)) -- Applied fixes from StyleCI [\#195](https://github.com/overtrue/wechat/pull/195) ([overtrue](https://github.com/overtrue)) -- Applied fixes from StyleCI [\#194](https://github.com/overtrue/wechat/pull/194) ([overtrue](https://github.com/overtrue)) -- Add Broadcast. [\#193](https://github.com/overtrue/wechat/pull/193) ([ruchengtang](https://github.com/ruchengtang)) -- 微信红包类优化 [\#190](https://github.com/overtrue/wechat/pull/190) ([tianyong90](https://github.com/tianyong90)) -- Update ServerServiceProvider.php [\#187](https://github.com/overtrue/wechat/pull/187) ([ghost](https://github.com/ghost)) -- Update README\_EN.md [\#178](https://github.com/overtrue/wechat/pull/178) ([spekulatius](https://github.com/spekulatius)) -- 添加群发消息文档 [\#177](https://github.com/overtrue/wechat/pull/177) ([ruchengtang](https://github.com/ruchengtang)) -- 群发消息 [\#176](https://github.com/overtrue/wechat/pull/176) ([ruchengtang](https://github.com/ruchengtang)) -- Master [\#167](https://github.com/overtrue/wechat/pull/167) ([xiaohome](https://github.com/xiaohome)) -- 微信小店 [\#166](https://github.com/overtrue/wechat/pull/166) ([xiaohome](https://github.com/xiaohome)) -- 红包类更新 [\#161](https://github.com/overtrue/wechat/pull/161) ([overtrue](https://github.com/overtrue)) -- 加入摇一摇红包类,红包类提升至Overtrue命名空间 [\#160](https://github.com/overtrue/wechat/pull/160) ([tianyong90](https://github.com/tianyong90)) -- 2.1 [\#159](https://github.com/overtrue/wechat/pull/159) ([overtrue](https://github.com/overtrue)) -- Update QRCode.php [\#156](https://github.com/overtrue/wechat/pull/156) ([ruchengtang](https://github.com/ruchengtang)) -- 修复使用!=,来判断0 != null 的时候的一个bug [\#154](https://github.com/overtrue/wechat/pull/154) ([Liv1020](https://github.com/Liv1020)) -- 调整多客服类删除客服方法 [\#151](https://github.com/overtrue/wechat/pull/151) ([tianyong90](https://github.com/tianyong90)) -- 修复个bug [\#146](https://github.com/overtrue/wechat/pull/146) ([xiaohome](https://github.com/xiaohome)) -- Update README.md [\#142](https://github.com/overtrue/wechat/pull/142) ([parkshinhye](https://github.com/parkshinhye)) -- Fix code style to PSR-2 [\#139](https://github.com/overtrue/wechat/pull/139) ([tianyong90](https://github.com/tianyong90)) -- 加入红包工具类,支持现金和裂变红包的发送及查询 [\#137](https://github.com/overtrue/wechat/pull/137) ([tianyong90](https://github.com/tianyong90)) -- 卡券类批量获取卡券ID方法支持仅获取指定状态卡券 [\#132](https://github.com/overtrue/wechat/pull/132) ([tianyong90](https://github.com/tianyong90)) -- 添加客服 卡券回复!!! [\#124](https://github.com/overtrue/wechat/pull/124) ([parkshinhye](https://github.com/parkshinhye)) -- 调整退款类中一处异常抛出逻辑并修正单词拼写错误 [\#122](https://github.com/overtrue/wechat/pull/122) ([tianyong90](https://github.com/tianyong90)) -- 加入创建卡券货架接口 [\#121](https://github.com/overtrue/wechat/pull/121) ([tianyong90](https://github.com/tianyong90)) -- 增加退款类 [\#105](https://github.com/overtrue/wechat/pull/105) ([jaring](https://github.com/jaring)) -- 增加获取用户已领取卡券方法 [\#103](https://github.com/overtrue/wechat/pull/103) ([tenstone](https://github.com/tenstone)) -- Scrutinizer Auto-Fixes [\#100](https://github.com/overtrue/wechat/pull/100) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- 修正二维码类中生成卡券二维码方法 [\#99](https://github.com/overtrue/wechat/pull/99) ([tianyong90](https://github.com/tianyong90)) -- 卡券接口加入添加测试白名单方法 [\#98](https://github.com/overtrue/wechat/pull/98) ([tianyong90](https://github.com/tianyong90)) -- 依样画葫芦写了一个查询订单,更改了UnifiedOrder中Http初始化 [\#95](https://github.com/overtrue/wechat/pull/95) ([jaring](https://github.com/jaring)) -- accessToken根据appId变化 [\#92](https://github.com/overtrue/wechat/pull/92) ([keepeye](https://github.com/keepeye)) -- Fix payment sign bug. [\#82](https://github.com/overtrue/wechat/pull/82) ([0i](https://github.com/0i)) -- \[wiki\] wechat payment [\#81](https://github.com/overtrue/wechat/pull/81) ([0i](https://github.com/0i)) - -## [2.1.0](https://github.com/overtrue/wechat/tree/2.1.0) (2015-08-18) -[Full Changelog](https://github.com/overtrue/wechat/compare/2.0.35...2.1.0) - -**Merged pull requests:** - -- Wechat Payment [\#80](https://github.com/overtrue/wechat/pull/80) ([0i](https://github.com/0i)) - -## [2.0.35](https://github.com/overtrue/wechat/tree/2.0.35) (2015-08-11) -[Full Changelog](https://github.com/overtrue/wechat/compare/2.0.1...2.0.35) - -**Implemented enhancements:** - -- Overtrue\Wechat\Http识别JSON的问题 [\#47](https://github.com/overtrue/wechat/issues/47) - -**Fixed bugs:** - -- 模板消息简单格式无效 [\#34](https://github.com/overtrue/wechat/issues/34) - -**Closed issues:** - -- $data是数组,title输出不了内容 [\#73](https://github.com/overtrue/wechat/issues/73) -- 回调是如何传递外部参数的? [\#72](https://github.com/overtrue/wechat/issues/72) -- 【建议】可以添加微信js的功能吗? [\#71](https://github.com/overtrue/wechat/issues/71) -- Message::make\('link'\) 无效 [\#70](https://github.com/overtrue/wechat/issues/70) -- 监听消息 返回Bad Request [\#65](https://github.com/overtrue/wechat/issues/65) -- 微信素材管理小改版,求跟上~ [\#64](https://github.com/overtrue/wechat/issues/64) -- 在新浪SAE平台上的部署问题 [\#63](https://github.com/overtrue/wechat/issues/63) -- $xmlInput = file\_get\_contents\('php://input'\);貌似在某些版本的PHP有问题还是怎的 [\#57](https://github.com/overtrue/wechat/issues/57) -- 卡券的 attachExtension 方法 [\#56](https://github.com/overtrue/wechat/issues/56) -- 网页授权$auth-\>authorize\(\) 后还需要保存access\_token吗? [\#53](https://github.com/overtrue/wechat/issues/53) -- php 5.6版本下出现错误(5.6以下版本正常) [\#51](https://github.com/overtrue/wechat/issues/51) -- 消息发送后服务器无法正确返回响应 [\#48](https://github.com/overtrue/wechat/issues/48) -- token验证失败 [\#45](https://github.com/overtrue/wechat/issues/45) -- 微信关注自动回复问题 [\#44](https://github.com/overtrue/wechat/issues/44) -- js sdk config 建议增加 beta 字段 [\#35](https://github.com/overtrue/wechat/issues/35) -- 关于Util\HTTP::encode\(\)中的urlencode\(\)/urldecode\(\)成组操作的疑问 [\#31](https://github.com/overtrue/wechat/issues/31) -- Media::updateNews\(\) 方法与微信API不一致 [\#29](https://github.com/overtrue/wechat/issues/29) -- 希望能有一个ThinkPHP的使用示例 [\#28](https://github.com/overtrue/wechat/issues/28) -- 事件消息 [\#22](https://github.com/overtrue/wechat/issues/22) -- 模板消息notice [\#21](https://github.com/overtrue/wechat/issues/21) -- 关于获取(接收)用户发送消息 [\#19](https://github.com/overtrue/wechat/issues/19) -- 微信公众号绑定的一点问题,请教。 [\#16](https://github.com/overtrue/wechat/issues/16) -- 获取素材列表错误 [\#15](https://github.com/overtrue/wechat/issues/15) - -**Merged pull requests:** - -- Scrutinizer Auto-Fixes [\#69](https://github.com/overtrue/wechat/pull/69) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- Scrutinizer Auto-Fixes [\#68](https://github.com/overtrue/wechat/pull/68) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- Scrutinizer Auto-Fixes [\#67](https://github.com/overtrue/wechat/pull/67) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) -- Fixed StyleCI config [\#66](https://github.com/overtrue/wechat/pull/66) ([GrahamCampbell](https://github.com/GrahamCampbell)) -- 洁癖爆发了。。。 [\#62](https://github.com/overtrue/wechat/pull/62) ([TheNorthMemory](https://github.com/TheNorthMemory)) -- fix: js getUrl use Url::current\(\) [\#61](https://github.com/overtrue/wechat/pull/61) ([wdjwxh](https://github.com/wdjwxh)) -- bug-fix: add x-forwarded-host for Url::current [\#60](https://github.com/overtrue/wechat/pull/60) ([wdjwxh](https://github.com/wdjwxh)) -- Fix request method for User::batchGet\(\), should be POST with JSON. [\#59](https://github.com/overtrue/wechat/pull/59) ([acgrid](https://github.com/acgrid)) -- optimize some code [\#58](https://github.com/overtrue/wechat/pull/58) ([tabalt](https://github.com/tabalt)) -- 增加使用media id发送图文消息的功能 [\#52](https://github.com/overtrue/wechat/pull/52) ([zengohm](https://github.com/zengohm)) -- fix Staff::delete, let it works [\#42](https://github.com/overtrue/wechat/pull/42) ([TheNorthMemory](https://github.com/TheNorthMemory)) -- 支持自定义菜单类型:下发消息media\_id、跳转图文消息view\_limited [\#40](https://github.com/overtrue/wechat/pull/40) ([acgrid](https://github.com/acgrid)) -- docline comments & fix AccessToken parameter typos [\#39](https://github.com/overtrue/wechat/pull/39) ([TheNorthMemory](https://github.com/TheNorthMemory)) -- Merge from master [\#38](https://github.com/overtrue/wechat/pull/38) ([overtrue](https://github.com/overtrue)) -- 客服接口Bugfix [\#37](https://github.com/overtrue/wechat/pull/37) ([overtrue](https://github.com/overtrue)) -- fix Staff and AccessToken typos [\#36](https://github.com/overtrue/wechat/pull/36) ([TheNorthMemory](https://github.com/TheNorthMemory)) -- Update QRCode.php [\#33](https://github.com/overtrue/wechat/pull/33) ([refear99](https://github.com/refear99)) -- English Readme [\#32](https://github.com/overtrue/wechat/pull/32) ([hareluya](https://github.com/hareluya)) -- 更新图文消息方法Media::updateNews\(\)与微信API不一致 [\#30](https://github.com/overtrue/wechat/pull/30) ([acgrid](https://github.com/acgrid)) -- 代码之美在于不断修正 :\) [\#27](https://github.com/overtrue/wechat/pull/27) ([TheNorthMemory](https://github.com/TheNorthMemory)) -- the json\_encode $depth parameter was added@5.5.0 [\#26](https://github.com/overtrue/wechat/pull/26) ([TheNorthMemory](https://github.com/TheNorthMemory)) -- fix \#4 for PHP5.3 [\#25](https://github.com/overtrue/wechat/pull/25) ([TheNorthMemory](https://github.com/TheNorthMemory)) -- fix \#4 for PHP5.3 [\#23](https://github.com/overtrue/wechat/pull/23) ([TheNorthMemory](https://github.com/TheNorthMemory)) -- Update QRCode.php [\#17](https://github.com/overtrue/wechat/pull/17) ([gundanx10](https://github.com/gundanx10)) - -## [2.0.1](https://github.com/overtrue/wechat/tree/2.0.1) (2015-05-08) -[Full Changelog](https://github.com/overtrue/wechat/compare/2.0.0...2.0.1) - -**Closed issues:** - -- 2.0版本使用问题 [\#14](https://github.com/overtrue/wechat/issues/14) - -## [2.0.0](https://github.com/overtrue/wechat/tree/2.0.0) (2015-05-07) -[Full Changelog](https://github.com/overtrue/wechat/compare/1.0.1...2.0.0) - -**Closed issues:** - -- 素材管理 -- 部分图片下载失败 [\#13](https://github.com/overtrue/wechat/issues/13) -- 素材管理 -- 图片下载失败 [\#12](https://github.com/overtrue/wechat/issues/12) -- 请问这样判断Mcrypt到底准不准? [\#11](https://github.com/overtrue/wechat/issues/11) -- 好奇怪啊,开发者中心的服务器配置已经提交并验证成功了,可是message不起作用 [\#10](https://github.com/overtrue/wechat/issues/10) -- 网页授权一刷新页面就出现40029 不合法的oauth\_code [\#8](https://github.com/overtrue/wechat/issues/8) -- mcrypt\_module\_open error [\#7](https://github.com/overtrue/wechat/issues/7) -- composer update 之后报错 [\#6](https://github.com/overtrue/wechat/issues/6) -- 今天开始,授权时候一直报40029,invalid code的错误 [\#5](https://github.com/overtrue/wechat/issues/5) -- Using $this when not in object context [\#4](https://github.com/overtrue/wechat/issues/4) -- 监听事件时不区分 $target(监听所有event和message) [\#3](https://github.com/overtrue/wechat/issues/3) -- Does this support Oauth already? [\#1](https://github.com/overtrue/wechat/issues/1) - -**Merged pull requests:** - -- Fix wiki url error [\#9](https://github.com/overtrue/wechat/pull/9) ([sinoon](https://github.com/sinoon)) -- Update Bag.php [\#2](https://github.com/overtrue/wechat/pull/2) ([zerozh](https://github.com/zerozh)) - -## [1.0.1](https://github.com/overtrue/wechat/tree/1.0.1) (2015-03-19) -[Full Changelog](https://github.com/overtrue/wechat/compare/1.0...1.0.1) - -## [1.0](https://github.com/overtrue/wechat/tree/1.0) (2015-03-13) - - -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/vendor/overtrue/wechat/CONTRIBUTING.md b/vendor/overtrue/wechat/CONTRIBUTING.md deleted file mode 100644 index 134204f..0000000 --- a/vendor/overtrue/wechat/CONTRIBUTING.md +++ /dev/null @@ -1,67 +0,0 @@ -# Contribute - -## Introduction - -First, thank you for considering contributing to wechat! It's people like you that make the open source community such a great community! 😊 - -We welcome any type of contribution, not only code. You can help with -- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open) -- **Marketing**: writing blog posts, howto's, printing stickers, ... -- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ... -- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them. -- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/wechat). - -## Your First Contribution - -Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). - -## Submitting code - -Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests. - -## Code review process - -The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge. -It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you? - -## Financial contributions - -We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/wechat). -Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. - -## Questions - -If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!). -You can also reach us at hello@wechat.opencollective.com. - -## Credits - -### Contributors - -Thank you to all the people who have already contributed to wechat! - - - -### Backers - -Thank you to all our backers! [[Become a backer](https://opencollective.com/wechat#backer)] - - - - -### Sponsors - -Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/wechat#sponsor)) - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/overtrue/wechat/LICENSE b/vendor/overtrue/wechat/LICENSE deleted file mode 100644 index f80ba02..0000000 --- a/vendor/overtrue/wechat/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) overtrue - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/vendor/overtrue/wechat/README.md b/vendor/overtrue/wechat/README.md deleted file mode 100644 index 6d1747f..0000000 --- a/vendor/overtrue/wechat/README.md +++ /dev/null @@ -1,92 +0,0 @@ -EasyWeChat Logo - -

    EasyWeChat

    - -📦 It is probably the best SDK in the world for developing Wechat App. - -[![Test Status](https://github.com/overtrue/wechat/workflows/Test/badge.svg)](https://github.com/overtrue/wechat/actions) -[![Lint Status](https://github.com/overtrue/wechat/workflows/Lint/badge.svg)](https://github.com/overtrue/wechat/actions) -[![Latest Stable Version](https://poser.pugx.org/overtrue/wechat/v/stable.svg)](https://packagist.org/packages/overtrue/wechat) -[![Latest Unstable Version](https://poser.pugx.org/overtrue/wechat/v/unstable.svg)](https://packagist.org/packages/overtrue/wechat) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/overtrue/wechat/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/overtrue/wechat/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/overtrue/wechat/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/overtrue/wechat/?branch=master) -[![Total Downloads](https://poser.pugx.org/overtrue/wechat/downloads)](https://packagist.org/packages/overtrue/wechat) -[![License](https://poser.pugx.org/overtrue/wechat/license)](https://packagist.org/packages/overtrue/wechat) - - -## Requirement - -1. PHP >= 7.2 -2. **[Composer](https://getcomposer.org/)** -3. openssl 拓展 -4. fileinfo 拓展(素材管理模块需要用到) - -## Installation - -```shell -$ composer require "overtrue/wechat:^4.2" -vvv -``` - -## Usage - -基本使用(以服务端为例): - -```php - 'wx3cf0f39249eb0exxx', - 'secret' => 'f1c242f4f28f735d4687abb469072xxx', - 'token' => 'easywechat', - 'log' => [ - 'level' => 'debug', - 'file' => '/tmp/easywechat.log', - ], - // ... -]; - -$app = Factory::officialAccount($options); - -$server = $app->server; -$user = $app->user; - -$server->push(function($message) use ($user) { - $fromUser = $user->get($message['FromUserName']); - - return "{$fromUser->nickname} 您好!欢迎关注 overtrue!"; -}); - -$server->serve()->send(); -``` - -更多请参考 [https://www.easywechat.com/](https://www.easywechat.com/)。 - -## Documentation - -[官网](https://www.easywechat.com) · [教程](https://www.easywechat.com/tutorials) · [讨论](https://yike.io/) · [微信公众平台](https://mp.weixin.qq.com/wiki) · [WeChat Official](http://admin.wechat.com/wiki) - -## Integration - -[Laravel 5 拓展包: overtrue/laravel-wechat](https://github.com/overtrue/laravel-wechat) - -## Contributors - -This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. - - - -## PHP 扩展包开发 - -> 想知道如何从零开始构建 PHP 扩展包? -> -> 请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package) - - -## License - -MIT - - -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fovertrue%2Fwechat.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fovertrue%2Fwechat?ref=badge_large) diff --git a/vendor/overtrue/wechat/composer.json b/vendor/overtrue/wechat/composer.json deleted file mode 100644 index ad21285..0000000 --- a/vendor/overtrue/wechat/composer.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "overtrue/wechat", - "description": "微信SDK", - "keywords": [ - "easywechat", - "wechat", - "weixin", - "weixin-sdk", - "sdk" - ], - "license": "MIT", - "authors": [ - { - "name": "overtrue", - "email": "anzhengchao@gmail.com" - } - ], - "require": { - "php": ">=7.2", - "ext-fileinfo": "*", - "ext-openssl": "*", - "ext-simplexml": "*", - "easywechat-composer/easywechat-composer": "^1.1", - "guzzlehttp/guzzle": "^6.2 || ^7.0", - "monolog/monolog": "^1.22 || ^2.0", - "overtrue/socialite": "~2.0", - "pimple/pimple": "^3.0", - "psr/simple-cache": "^1.0", - "symfony/cache": "^3.3 || ^4.3 || ^5.0", - "symfony/event-dispatcher": "^4.3 || ^5.0", - "symfony/http-foundation": "^2.7 || ^3.0 || ^4.0 || ^5.0", - "symfony/psr-http-message-bridge": "^0.3 || ^1.0 || ^2.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.15", - "mikey179/vfsstream": "^1.6", - "mockery/mockery": "^1.2.3", - "phpstan/phpstan": "^0.12.0", - "phpunit/phpunit": "^7.5" - }, - "autoload": { - "psr-4": { - "EasyWeChat\\": "src/" - }, - "files": [ - "src/Kernel/Support/Helpers.php", - "src/Kernel/Helpers.php" - ] - }, - "autoload-dev": { - "psr-4": { - "EasyWeChat\\Tests\\": "tests/" - } - }, - "scripts": { - "phpcs": "vendor/bin/php-cs-fixer fix", - "phpstan": "vendor/bin/phpstan analyse", - "check-style": "php-cs-fixer fix --using-cache=no --diff --config=.php_cs --dry-run --ansi", - "fix-style": "php-cs-fixer fix --using-cache=no --config=.php_cs --ansi", - "test": "vendor/bin/phpunit --colors=always" - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/Application.php b/vendor/overtrue/wechat/src/BasicService/Application.php deleted file mode 100644 index e4b1e8a..0000000 --- a/vendor/overtrue/wechat/src/BasicService/Application.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService; - -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Class Application. - * - * @author overtrue - * - * @property \EasyWeChat\BasicService\Jssdk\Client $jssdk - * @property \EasyWeChat\BasicService\Media\Client $media - * @property \EasyWeChat\BasicService\QrCode\Client $qrcode - * @property \EasyWeChat\BasicService\Url\Client $url - * @property \EasyWeChat\BasicService\ContentSecurity\Client $content_security - */ -class Application extends ServiceContainer -{ - /** - * @var array - */ - protected $providers = [ - Jssdk\ServiceProvider::class, - QrCode\ServiceProvider::class, - Media\ServiceProvider::class, - Url\ServiceProvider::class, - ContentSecurity\ServiceProvider::class, - ]; -} diff --git a/vendor/overtrue/wechat/src/BasicService/ContentSecurity/Client.php b/vendor/overtrue/wechat/src/BasicService/ContentSecurity/Client.php deleted file mode 100644 index 9f4b142..0000000 --- a/vendor/overtrue/wechat/src/BasicService/ContentSecurity/Client.php +++ /dev/null @@ -1,107 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\ContentSecurity; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class Client. - * - * @author tianyong90 <412039588@qq.com> - */ -class Client extends BaseClient -{ - /** - * Text content security check. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function checkText(string $text) - { - $params = [ - 'content' => $text, - ]; - - return $this->httpPostJson('wxa/msg_sec_check', $params); - } - - /** - * Image security check. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function checkImage(string $path) - { - return $this->httpUpload('wxa/img_sec_check', ['media' => $path]); - } - - /** - * Media security check. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function checkMediaAsync(string $mediaUrl, int $mediaType) - { - /* - * 1:音频;2:图片 - */ - $mediaTypes = [1, 2]; - - if (!in_array($mediaType, $mediaTypes, true)) { - throw new InvalidArgumentException('media type must be 1 or 2'); - } - - $params = [ - 'media_url' => $mediaUrl, - 'media_type' => $mediaType, - ]; - - return $this->httpPostJson('wxa/media_check_async', $params); - } - - /** - * Image security check async. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function checkImageAsync(string $mediaUrl) - { - return $this->checkMediaAsync($mediaUrl, 2); - } - - /** - * Audio security check async. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function checkAudioAsync(string $mediaUrl) - { - return $this->checkMediaAsync($mediaUrl, 1); - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/ContentSecurity/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/ContentSecurity/ServiceProvider.php deleted file mode 100644 index 3645de9..0000000 --- a/vendor/overtrue/wechat/src/BasicService/ContentSecurity/ServiceProvider.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\ContentSecurity; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['content_security'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/Jssdk/Client.php b/vendor/overtrue/wechat/src/BasicService/Jssdk/Client.php deleted file mode 100644 index f6dbb5e..0000000 --- a/vendor/overtrue/wechat/src/BasicService/Jssdk/Client.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\Jssdk; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Support; -use EasyWeChat\Kernel\Traits\InteractsWithCache; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - use InteractsWithCache; - - /** - * @var string - */ - protected $ticketEndpoint = 'cgi-bin/ticket/getticket'; - - /** - * Current URI. - * - * @var string - */ - protected $url; - - /** - * Get config json for jsapi. - * - * @param array $jsApiList - * @param bool $debug - * @param bool $beta - * @param bool $json - * @param array $openTagList - * @param string $url - * - * @return array|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function buildConfig(array $jsApiList, bool $debug = false, bool $beta = false, bool $json = true, array $openTagList = [], string $url = null) - { - $config = array_merge(compact('debug', 'beta', 'jsApiList', 'openTagList'), $this->configSignature($url)); - - return $json ? json_encode($config) : $config; - } - - /** - * Return jsapi config as a PHP array. - * - * @param array $apis - * @param bool $debug - * @param bool $beta - * @param array $openTagList - * @param string $url - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function getConfigArray(array $apis, bool $debug = false, bool $beta = false, array $openTagList = [], string $url = null) - { - return $this->buildConfig($apis, $debug, $beta, false, $openTagList, $url); - } - - /** - * Get js ticket. - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function getTicket(bool $refresh = false, string $type = 'jsapi'): array - { - $cacheKey = sprintf('easywechat.basic_service.jssdk.ticket.%s.%s', $type, $this->getAppId()); - - if (!$refresh && $this->getCache()->has($cacheKey)) { - return $this->getCache()->get($cacheKey); - } - - /** @var array $result */ - $result = $this->castResponseToType( - $this->requestRaw($this->ticketEndpoint, 'GET', ['query' => ['type' => $type]]), - 'array' - ); - - $this->getCache()->set($cacheKey, $result, $result['expires_in'] - 500); - - if (!$this->getCache()->has($cacheKey)) { - throw new RuntimeException('Failed to cache jssdk ticket.'); - } - - return $result; - } - - /** - * Build signature. - * - * @param int|null $timestamp - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - protected function configSignature(string $url = null, string $nonce = null, $timestamp = null): array - { - $url = $url ?: $this->getUrl(); - $nonce = $nonce ?: Support\Str::quickRandom(10); - $timestamp = $timestamp ?: time(); - - return [ - 'appId' => $this->getAppId(), - 'nonceStr' => $nonce, - 'timestamp' => $timestamp, - 'url' => $url, - 'signature' => $this->getTicketSignature($this->getTicket()['ticket'], $nonce, $timestamp, $url), - ]; - } - - /** - * Sign the params. - * - * @param string $ticket - * @param string $nonce - * @param int $timestamp - * @param string $url - */ - public function getTicketSignature($ticket, $nonce, $timestamp, $url): string - { - return sha1(sprintf('jsapi_ticket=%s&noncestr=%s×tamp=%s&url=%s', $ticket, $nonce, $timestamp, $url)); - } - - /** - * @return string - */ - public function dictionaryOrderSignature() - { - $params = func_get_args(); - - sort($params, SORT_STRING); - - return sha1(implode('', $params)); - } - - /** - * Set current url. - * - * @return $this - */ - public function setUrl(string $url) - { - $this->url = $url; - - return $this; - } - - /** - * Get current url. - */ - public function getUrl(): string - { - if ($this->url) { - return $this->url; - } - - return Support\current_url(); - } - - /** - * @return string - */ - protected function getAppId() - { - return $this->app['config']->get('app_id'); - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/Jssdk/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/Jssdk/ServiceProvider.php deleted file mode 100644 index 5581a1e..0000000 --- a/vendor/overtrue/wechat/src/BasicService/Jssdk/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\Jssdk; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['jssdk'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/Media/Client.php b/vendor/overtrue/wechat/src/BasicService/Media/Client.php deleted file mode 100644 index 70654ba..0000000 --- a/vendor/overtrue/wechat/src/BasicService/Media/Client.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\Media; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Http\StreamResponse; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * Allow media type. - * - * @var array - */ - protected $allowTypes = ['image', 'voice', 'video', 'thumb']; - - /** - * Upload image. - * - * @param string $path - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadImage($path) - { - return $this->upload('image', $path); - } - - /** - * Upload video. - * - * @param string $path - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadVideo($path) - { - return $this->upload('video', $path); - } - - /** - * @param string $path - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadVoice($path) - { - return $this->upload('voice', $path); - } - - /** - * @param string $path - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadThumb($path) - { - return $this->upload('thumb', $path); - } - - /** - * Upload temporary material. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function upload(string $type, string $path) - { - if (!file_exists($path) || !is_readable($path)) { - throw new InvalidArgumentException(sprintf("File does not exist, or the file is unreadable: '%s'", $path)); - } - - if (!in_array($type, $this->allowTypes, true)) { - throw new InvalidArgumentException(sprintf("Unsupported media type: '%s'", $type)); - } - - return $this->httpUpload('cgi-bin/media/upload', ['media' => $path], ['type' => $type]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadVideoForBroadcasting(string $path, string $title, string $description) - { - $response = $this->uploadVideo($path); - /** @var array $arrayResponse */ - $arrayResponse = $this->detectAndCastResponseToType($response, 'array'); - - if (!empty($arrayResponse['media_id'])) { - return $this->createVideoForBroadcasting($arrayResponse['media_id'], $title, $description); - } - - return $response; - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createVideoForBroadcasting(string $mediaId, string $title, string $description) - { - return $this->httpPostJson('cgi-bin/media/uploadvideo', [ - 'media_id' => $mediaId, - 'title' => $title, - 'description' => $description, - ]); - } - - /** - * Fetch item from WeChat server. - * - * @return \EasyWeChat\Kernel\Http\StreamResponse|\Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $mediaId) - { - $response = $this->requestRaw('cgi-bin/media/get', 'GET', [ - 'query' => [ - 'media_id' => $mediaId, - ], - ]); - - if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { - return StreamResponse::buildFromPsrResponse($response); - } - - return $this->castResponseToType($response, $this->app['config']->get('response_type')); - } - - /** - * @return array|\EasyWeChat\Kernel\Http\Response|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getJssdkMedia(string $mediaId) - { - $response = $this->requestRaw('cgi-bin/media/get/jssdk', 'GET', [ - 'query' => [ - 'media_id' => $mediaId, - ], - ]); - - if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { - return StreamResponse::buildFromPsrResponse($response); - } - - return $this->castResponseToType($response, $this->app['config']->get('response_type')); - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/Media/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/Media/ServiceProvider.php deleted file mode 100644 index 45de142..0000000 --- a/vendor/overtrue/wechat/src/BasicService/Media/ServiceProvider.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -/** - * ServiceProvider.php. - * - * This file is part of the wechat. - * - * (c) overtrue - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\Media; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['media'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/QrCode/Client.php b/vendor/overtrue/wechat/src/BasicService/QrCode/Client.php deleted file mode 100644 index 92caeeb..0000000 --- a/vendor/overtrue/wechat/src/BasicService/QrCode/Client.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\QrCode; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - public const DAY = 86400; - public const SCENE_MAX_VALUE = 100000; - public const SCENE_QR_CARD = 'QR_CARD'; - public const SCENE_QR_TEMPORARY = 'QR_SCENE'; - public const SCENE_QR_TEMPORARY_STR = 'QR_STR_SCENE'; - public const SCENE_QR_FOREVER = 'QR_LIMIT_SCENE'; - public const SCENE_QR_FOREVER_STR = 'QR_LIMIT_STR_SCENE'; - - /** - * Create forever QR code. - * - * @param string|int $sceneValue - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function forever($sceneValue) - { - if (is_int($sceneValue) && $sceneValue > 0 && $sceneValue < self::SCENE_MAX_VALUE) { - $type = self::SCENE_QR_FOREVER; - $sceneKey = 'scene_id'; - } else { - $type = self::SCENE_QR_FOREVER_STR; - $sceneKey = 'scene_str'; - } - $scene = [$sceneKey => $sceneValue]; - - return $this->create($type, $scene, false); - } - - /** - * Create temporary QR code. - * - * @param string|int $sceneValue - * @param int|null $expireSeconds - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function temporary($sceneValue, $expireSeconds = null) - { - if (is_int($sceneValue) && $sceneValue > 0) { - $type = self::SCENE_QR_TEMPORARY; - $sceneKey = 'scene_id'; - } else { - $type = self::SCENE_QR_TEMPORARY_STR; - $sceneKey = 'scene_str'; - } - $scene = [$sceneKey => $sceneValue]; - - return $this->create($type, $scene, true, $expireSeconds); - } - - /** - * Return url for ticket. - * Detail: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1443433542 . - * - * @param string $ticket - * - * @return string - */ - public function url($ticket) - { - return sprintf('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=%s', urlencode($ticket)); - } - - /** - * Create a QrCode. - * - * @param string $actionName - * @param array $actionInfo - * @param bool $temporary - * @param int $expireSeconds - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function create($actionName, $actionInfo, $temporary = true, $expireSeconds = null) - { - null !== $expireSeconds || $expireSeconds = 7 * self::DAY; - - $params = [ - 'action_name' => $actionName, - 'action_info' => ['scene' => $actionInfo], - ]; - - if ($temporary) { - $params['expire_seconds'] = min($expireSeconds, 30 * self::DAY); - } - - return $this->httpPostJson('cgi-bin/qrcode/create', $params); - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/QrCode/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/QrCode/ServiceProvider.php deleted file mode 100644 index 1638c66..0000000 --- a/vendor/overtrue/wechat/src/BasicService/QrCode/ServiceProvider.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\QrCode; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['qrcode'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/Url/Client.php b/vendor/overtrue/wechat/src/BasicService/Url/Client.php deleted file mode 100644 index b4b0a4c..0000000 --- a/vendor/overtrue/wechat/src/BasicService/Url/Client.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\Url; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * Shorten the url. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function shorten(string $url) - { - $params = [ - 'action' => 'long2short', - 'long_url' => $url, - ]; - - return $this->httpPostJson('cgi-bin/shorturl', $params); - } -} diff --git a/vendor/overtrue/wechat/src/BasicService/Url/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/Url/ServiceProvider.php deleted file mode 100644 index 6740bb8..0000000 --- a/vendor/overtrue/wechat/src/BasicService/Url/ServiceProvider.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\BasicService\Url; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['url'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Factory.php b/vendor/overtrue/wechat/src/Factory.php deleted file mode 100644 index a004b05..0000000 --- a/vendor/overtrue/wechat/src/Factory.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat; - -/** - * Class Factory. - * - * @method static \EasyWeChat\Payment\Application payment(array $config) - * @method static \EasyWeChat\MiniProgram\Application miniProgram(array $config) - * @method static \EasyWeChat\OpenPlatform\Application openPlatform(array $config) - * @method static \EasyWeChat\OfficialAccount\Application officialAccount(array $config) - * @method static \EasyWeChat\BasicService\Application basicService(array $config) - * @method static \EasyWeChat\Work\Application work(array $config) - * @method static \EasyWeChat\OpenWork\Application openWork(array $config) - * @method static \EasyWeChat\MicroMerchant\Application microMerchant(array $config) - */ -class Factory -{ - /** - * @param string $name - * - * @return \EasyWeChat\Kernel\ServiceContainer - */ - public static function make($name, array $config) - { - $namespace = Kernel\Support\Str::studly($name); - $application = "\\EasyWeChat\\{$namespace}\\Application"; - - return new $application($config); - } - - /** - * Dynamically pass methods to the application. - * - * @param string $name - * @param array $arguments - * - * @return mixed - */ - public static function __callStatic($name, $arguments) - { - return self::make($name, ...$arguments); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/AccessToken.php b/vendor/overtrue/wechat/src/Kernel/AccessToken.php deleted file mode 100644 index 6edc1d4..0000000 --- a/vendor/overtrue/wechat/src/Kernel/AccessToken.php +++ /dev/null @@ -1,255 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel; - -use EasyWeChat\Kernel\Contracts\AccessTokenInterface; -use EasyWeChat\Kernel\Exceptions\HttpException; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Traits\HasHttpRequests; -use EasyWeChat\Kernel\Traits\InteractsWithCache; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; - -/** - * Class AccessToken. - * - * @author overtrue - */ -abstract class AccessToken implements AccessTokenInterface -{ - use HasHttpRequests; - use InteractsWithCache; - - /** - * @var \EasyWeChat\Kernel\ServiceContainer - */ - protected $app; - - /** - * @var string - */ - protected $requestMethod = 'GET'; - - /** - * @var string - */ - protected $endpointToGetToken; - - /** - * @var string - */ - protected $queryName; - - /** - * @var array - */ - protected $token; - - /** - * @var string - */ - protected $tokenKey = 'access_token'; - - /** - * @var string - */ - protected $cachePrefix = 'easywechat.kernel.access_token.'; - - /** - * AccessToken constructor. - * - * @param \EasyWeChat\Kernel\ServiceContainer $app - */ - public function __construct(ServiceContainer $app) - { - $this->app = $app; - } - - public function getLastToken(): array - { - return $this->token; - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\HttpException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function getRefreshedToken(): array - { - return $this->getToken(true); - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\HttpException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function getToken(bool $refresh = false): array - { - $cacheKey = $this->getCacheKey(); - $cache = $this->getCache(); - - if (!$refresh && $cache->has($cacheKey) && $result = $cache->get($cacheKey)) { - return $result; - } - - /** @var array $token */ - $token = $this->requestToken($this->getCredentials(), true); - - $this->setToken($token[$this->tokenKey], $token['expires_in'] ?? 7200); - - $this->token = $token; - - $this->app->events->dispatch(new Events\AccessTokenRefreshed($this)); - - return $token; - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function setToken(string $token, int $lifetime = 7200): AccessTokenInterface - { - $this->getCache()->set($this->getCacheKey(), [ - $this->tokenKey => $token, - 'expires_in' => $lifetime, - ], $lifetime); - - if (!$this->getCache()->has($this->getCacheKey())) { - throw new RuntimeException('Failed to cache access token.'); - } - - return $this; - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\HttpException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function refresh(): AccessTokenInterface - { - $this->getToken(true); - - return $this; - } - - /** - * @param bool $toArray - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\HttpException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function requestToken(array $credentials, $toArray = false) - { - $response = $this->sendRequest($credentials); - $result = json_decode($response->getBody()->getContents(), true); - $formatted = $this->castResponseToType($response, $this->app['config']->get('response_type')); - - if (empty($result[$this->tokenKey])) { - throw new HttpException('Request access_token fail: '.json_encode($result, JSON_UNESCAPED_UNICODE), $response, $formatted); - } - - return $toArray ? $result : $formatted; - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\HttpException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function applyToRequest(RequestInterface $request, array $requestOptions = []): RequestInterface - { - parse_str($request->getUri()->getQuery(), $query); - - $query = http_build_query(array_merge($this->getQuery(), $query)); - - return $request->withUri($request->getUri()->withQuery($query)); - } - - /** - * Send http request. - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function sendRequest(array $credentials): ResponseInterface - { - $options = [ - ('GET' === $this->requestMethod) ? 'query' : 'json' => $credentials, - ]; - - return $this->setHttpClient($this->app['http_client'])->request($this->getEndpoint(), $this->requestMethod, $options); - } - - /** - * @return string - */ - protected function getCacheKey() - { - return $this->cachePrefix.md5(json_encode($this->getCredentials())); - } - - /** - * The request query will be used to add to the request. - * - * @throws \EasyWeChat\Kernel\Exceptions\HttpException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - protected function getQuery(): array - { - return [$this->queryName ?? $this->tokenKey => $this->getToken()[$this->tokenKey]]; - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function getEndpoint(): string - { - if (empty($this->endpointToGetToken)) { - throw new InvalidArgumentException('No endpoint for access token request.'); - } - - return $this->endpointToGetToken; - } - - /** - * @return string - */ - public function getTokenKey() - { - return $this->tokenKey; - } - - /** - * Credential for get token. - */ - abstract protected function getCredentials(): array; -} diff --git a/vendor/overtrue/wechat/src/Kernel/BaseClient.php b/vendor/overtrue/wechat/src/Kernel/BaseClient.php deleted file mode 100644 index 389a0f9..0000000 --- a/vendor/overtrue/wechat/src/Kernel/BaseClient.php +++ /dev/null @@ -1,243 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel; - -use EasyWeChat\Kernel\Contracts\AccessTokenInterface; -use EasyWeChat\Kernel\Http\Response; -use EasyWeChat\Kernel\Traits\HasHttpRequests; -use GuzzleHttp\MessageFormatter; -use GuzzleHttp\Middleware; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; -use Psr\Log\LogLevel; - -/** - * Class BaseClient. - * - * @author overtrue - */ -class BaseClient -{ - use HasHttpRequests { request as performRequest; } - - /** - * @var \EasyWeChat\Kernel\ServiceContainer - */ - protected $app; - - /** - * @var \EasyWeChat\Kernel\Contracts\AccessTokenInterface - */ - protected $accessToken; - - /** - * @var string - */ - protected $baseUri; - - /** - * BaseClient constructor. - * - * @param \EasyWeChat\Kernel\ServiceContainer $app - */ - public function __construct(ServiceContainer $app, AccessTokenInterface $accessToken = null) - { - $this->app = $app; - $this->accessToken = $accessToken ?? $this->app['access_token']; - } - - /** - * GET request. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function httpGet(string $url, array $query = []) - { - return $this->request($url, 'GET', ['query' => $query]); - } - - /** - * POST request. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function httpPost(string $url, array $data = []) - { - return $this->request($url, 'POST', ['form_params' => $data]); - } - - /** - * JSON request. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function httpPostJson(string $url, array $data = [], array $query = []) - { - return $this->request($url, 'POST', ['query' => $query, 'json' => $data]); - } - - /** - * Upload file. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function httpUpload(string $url, array $files = [], array $form = [], array $query = []) - { - $multipart = []; - - foreach ($files as $name => $path) { - $multipart[] = [ - 'name' => $name, - 'contents' => fopen($path, 'r'), - ]; - } - - foreach ($form as $name => $contents) { - $multipart[] = compact('name', 'contents'); - } - - return $this->request($url, 'POST', ['query' => $query, 'multipart' => $multipart, 'connect_timeout' => 30, 'timeout' => 30, 'read_timeout' => 30]); - } - - public function getAccessToken(): AccessTokenInterface - { - return $this->accessToken; - } - - /** - * @return $this - */ - public function setAccessToken(AccessTokenInterface $accessToken) - { - $this->accessToken = $accessToken; - - return $this; - } - - /** - * @param bool $returnRaw - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function request(string $url, string $method = 'GET', array $options = [], $returnRaw = false) - { - if (empty($this->middlewares)) { - $this->registerHttpMiddlewares(); - } - - $response = $this->performRequest($url, $method, $options); - - $this->app->events->dispatch(new Events\HttpResponseCreated($response)); - - return $returnRaw ? $response : $this->castResponseToType($response, $this->app->config->get('response_type')); - } - - /** - * @return \EasyWeChat\Kernel\Http\Response - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function requestRaw(string $url, string $method = 'GET', array $options = []) - { - return Response::buildFromPsrResponse($this->request($url, $method, $options, true)); - } - - /** - * Register Guzzle middlewares. - */ - protected function registerHttpMiddlewares() - { - // retry - $this->pushMiddleware($this->retryMiddleware(), 'retry'); - // access token - $this->pushMiddleware($this->accessTokenMiddleware(), 'access_token'); - // log - $this->pushMiddleware($this->logMiddleware(), 'log'); - } - - /** - * Attache access token to request query. - * - * @return \Closure - */ - protected function accessTokenMiddleware() - { - return function (callable $handler) { - return function (RequestInterface $request, array $options) use ($handler) { - if ($this->accessToken) { - $request = $this->accessToken->applyToRequest($request, $options); - } - - return $handler($request, $options); - }; - }; - } - - /** - * Log the request. - * - * @return \Closure - */ - protected function logMiddleware() - { - $formatter = new MessageFormatter($this->app['config']['http.log_template'] ?? MessageFormatter::DEBUG); - - return Middleware::log($this->app['logger'], $formatter, LogLevel::DEBUG); - } - - /** - * Return retry middleware. - * - * @return \Closure - */ - protected function retryMiddleware() - { - return Middleware::retry(function ( - $retries, - RequestInterface $request, - ResponseInterface $response = null - ) { - // Limit the number of retries to 2 - if ($retries < $this->app->config->get('http.max_retries', 1) && $response && $body = $response->getBody()) { - // Retry on server errors - $response = json_decode($body, true); - - if (!empty($response['errcode']) && in_array(abs($response['errcode']), [40001, 40014, 42001], true)) { - $this->accessToken->refresh(); - $this->app['logger']->debug('Retrying with refreshed access token.'); - - return true; - } - } - - return false; - }, function () { - return abs($this->app->config->get('http.retry_delay', 500)); - }); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Clauses/Clause.php b/vendor/overtrue/wechat/src/Kernel/Clauses/Clause.php deleted file mode 100644 index 6991e39..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Clauses/Clause.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Clauses; - -/** - * Class Clause. - * - * @author mingyoung - */ -class Clause -{ - /** - * @var array - */ - protected $clauses = [ - 'where' => [], - ]; - - /** - * @param mixed ...$args - * - * @return $this - */ - public function where(...$args) - { - array_push($this->clauses['where'], $args); - - return $this; - } - - /** - * @param mixed $payload - * - * @return bool - */ - public function intercepted($payload) - { - return (bool) $this->interceptWhereClause($payload); - } - - /** - * @param mixed $payload - * - * @return bool - */ - protected function interceptWhereClause($payload) - { - foreach ($this->clauses['where'] as $item) { - list($key, $value) = $item; - if (!isset($payload[$key])) { - continue; - } - - if (is_array($value) && !in_array($payload[$key], $value)) { - return true; - } - - if (!is_array($value) && $payload[$key] !== $value) { - return true; - } - } - return false; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Config.php b/vendor/overtrue/wechat/src/Kernel/Config.php deleted file mode 100644 index 081f6fd..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Config.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel; - -use EasyWeChat\Kernel\Support\Collection; - -/** - * Class Config. - * - * @author overtrue - */ -class Config extends Collection -{ -} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/AccessTokenInterface.php b/vendor/overtrue/wechat/src/Kernel/Contracts/AccessTokenInterface.php deleted file mode 100644 index 69268ff..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Contracts/AccessTokenInterface.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Contracts; - -use Psr\Http\Message\RequestInterface; - -/** - * Interface AuthorizerAccessToken. - * - * @author overtrue - */ -interface AccessTokenInterface -{ - public function getToken(): array; - - /** - * @return \EasyWeChat\Kernel\Contracts\AccessTokenInterface - */ - public function refresh(): self; - - public function applyToRequest(RequestInterface $request, array $requestOptions = []): RequestInterface; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/Arrayable.php b/vendor/overtrue/wechat/src/Kernel/Contracts/Arrayable.php deleted file mode 100644 index d947f8f..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Contracts/Arrayable.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Contracts; - -use ArrayAccess; - -/** - * Interface Arrayable. - * - * @author overtrue - */ -interface Arrayable extends ArrayAccess -{ - /** - * Get the instance as an array. - * - * @return array - */ - public function toArray(); -} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/EventHandlerInterface.php b/vendor/overtrue/wechat/src/Kernel/Contracts/EventHandlerInterface.php deleted file mode 100644 index c9d116c..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Contracts/EventHandlerInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Contracts; - -/** - * Interface EventHandlerInterface. - * - * @author mingyoung - */ -interface EventHandlerInterface -{ - /** - * @param mixed $payload - */ - public function handle($payload = null); -} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/MediaInterface.php b/vendor/overtrue/wechat/src/Kernel/Contracts/MediaInterface.php deleted file mode 100644 index a8ded09..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Contracts/MediaInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Contracts; - -/** - * Interface MediaInterface. - * - * @author overtrue - */ -interface MediaInterface extends MessageInterface -{ - public function getMediaId(): string; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/MessageInterface.php b/vendor/overtrue/wechat/src/Kernel/Contracts/MessageInterface.php deleted file mode 100644 index 32aec4a..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Contracts/MessageInterface.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Contracts; - -/** - * Interface MessageInterface. - * - * @author overtrue - */ -interface MessageInterface -{ - public function getType(): string; - - public function transformForJsonRequest(): array; - - public function transformToXml(): string; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Decorators/FinallyResult.php b/vendor/overtrue/wechat/src/Kernel/Decorators/FinallyResult.php deleted file mode 100644 index e698bbf..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Decorators/FinallyResult.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Decorators; - -/** - * Class FinallyResult. - * - * @author overtrue - */ -class FinallyResult -{ - /** - * @var mixed - */ - public $content; - - /** - * FinallyResult constructor. - * - * @param mixed $content - */ - public function __construct($content) - { - $this->content = $content; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Decorators/TerminateResult.php b/vendor/overtrue/wechat/src/Kernel/Decorators/TerminateResult.php deleted file mode 100644 index cf1042d..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Decorators/TerminateResult.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Decorators; - -/** - * Class TerminateResult. - * - * @author overtrue - */ -class TerminateResult -{ - /** - * @var mixed - */ - public $content; - - /** - * FinallyResult constructor. - * - * @param mixed $content - */ - public function __construct($content) - { - $this->content = $content; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Encryptor.php b/vendor/overtrue/wechat/src/Kernel/Encryptor.php deleted file mode 100644 index bebb2a5..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Encryptor.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel; - -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Support\AES; -use EasyWeChat\Kernel\Support\XML; -use Throwable; -use function EasyWeChat\Kernel\Support\str_random; - -/** - * Class Encryptor. - * - * @author overtrue - */ -class Encryptor -{ - public const ERROR_INVALID_SIGNATURE = -40001; // Signature verification failed - public const ERROR_PARSE_XML = -40002; // Parse XML failed - public const ERROR_CALC_SIGNATURE = -40003; // Calculating the signature failed - public const ERROR_INVALID_AES_KEY = -40004; // Invalid AESKey - public const ERROR_INVALID_APP_ID = -40005; // Check AppID failed - public const ERROR_ENCRYPT_AES = -40006; // AES EncryptionInterface failed - public const ERROR_DECRYPT_AES = -40007; // AES decryption failed - public const ERROR_INVALID_XML = -40008; // Invalid XML - public const ERROR_BASE64_ENCODE = -40009; // Base64 encoding failed - public const ERROR_BASE64_DECODE = -40010; // Base64 decoding failed - public const ERROR_XML_BUILD = -40011; // XML build failed - public const ILLEGAL_BUFFER = -41003; // Illegal buffer - - /** - * App id. - * - * @var string - */ - protected $appId; - - /** - * App token. - * - * @var string - */ - protected $token; - - /** - * @var string - */ - protected $aesKey; - - /** - * Block size. - * - * @var int - */ - protected $blockSize = 32; - - /** - * Constructor. - */ - public function __construct(string $appId, string $token = null, string $aesKey = null) - { - $this->appId = $appId; - $this->token = $token; - $this->aesKey = base64_decode($aesKey.'=', true); - } - - /** - * Get the app token. - */ - public function getToken(): string - { - return $this->token; - } - - /** - * Encrypt the message and return XML. - * - * @param string $xml - * @param string $nonce - * @param int $timestamp - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function encrypt($xml, $nonce = null, $timestamp = null): string - { - try { - $xml = $this->pkcs7Pad(str_random(16).pack('N', strlen($xml)).$xml.$this->appId, $this->blockSize); - - $encrypted = base64_encode(AES::encrypt( - $xml, - $this->aesKey, - substr($this->aesKey, 0, 16), - OPENSSL_NO_PADDING - )); - // @codeCoverageIgnoreStart - } catch (Throwable $e) { - throw new RuntimeException($e->getMessage(), self::ERROR_ENCRYPT_AES); - } - // @codeCoverageIgnoreEnd - - !is_null($nonce) || $nonce = substr($this->appId, 0, 10); - !is_null($timestamp) || $timestamp = time(); - - $response = [ - 'Encrypt' => $encrypted, - 'MsgSignature' => $this->signature($this->token, $timestamp, $nonce, $encrypted), - 'TimeStamp' => $timestamp, - 'Nonce' => $nonce, - ]; - - //生成响应xml - return XML::build($response); - } - - /** - * Decrypt message. - * - * @param string $content - * @param string $msgSignature - * @param string $nonce - * @param string $timestamp - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function decrypt($content, $msgSignature, $nonce, $timestamp): string - { - $signature = $this->signature($this->token, $timestamp, $nonce, $content); - - if ($signature !== $msgSignature) { - throw new RuntimeException('Invalid Signature.', self::ERROR_INVALID_SIGNATURE); - } - - $decrypted = AES::decrypt( - base64_decode($content, true), - $this->aesKey, - substr($this->aesKey, 0, 16), - OPENSSL_NO_PADDING - ); - $result = $this->pkcs7Unpad($decrypted); - $content = substr($result, 16, strlen($result)); - $contentLen = unpack('N', substr($content, 0, 4))[1]; - - if (trim(substr($content, $contentLen + 4)) !== $this->appId) { - throw new RuntimeException('Invalid appId.', self::ERROR_INVALID_APP_ID); - } - - return substr($content, 4, $contentLen); - } - - /** - * Get SHA1. - */ - public function signature(): string - { - $array = func_get_args(); - sort($array, SORT_STRING); - - return sha1(implode($array)); - } - - /** - * PKCS#7 pad. - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function pkcs7Pad(string $text, int $blockSize): string - { - if ($blockSize > 256) { - throw new RuntimeException('$blockSize may not be more than 256'); - } - $padding = $blockSize - (strlen($text) % $blockSize); - $pattern = chr($padding); - - return $text.str_repeat($pattern, $padding); - } - - /** - * PKCS#7 unpad. - */ - public function pkcs7Unpad(string $text): string - { - $pad = ord(substr($text, -1)); - if ($pad < 1 || $pad > $this->blockSize) { - $pad = 0; - } - - return substr($text, 0, (strlen($text) - $pad)); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Events/AccessTokenRefreshed.php b/vendor/overtrue/wechat/src/Kernel/Events/AccessTokenRefreshed.php deleted file mode 100644 index 6fd0aca..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Events/AccessTokenRefreshed.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Events; - -use EasyWeChat\Kernel\AccessToken; - -/** - * Class AccessTokenRefreshed. - * - * @author mingyoung - */ -class AccessTokenRefreshed -{ - /** - * @var \EasyWeChat\Kernel\AccessToken - */ - public $accessToken; - - public function __construct(AccessToken $accessToken) - { - $this->accessToken = $accessToken; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Events/ApplicationInitialized.php b/vendor/overtrue/wechat/src/Kernel/Events/ApplicationInitialized.php deleted file mode 100644 index c83df65..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Events/ApplicationInitialized.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Events; - -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Class ApplicationInitialized. - * - * @author mingyoung - */ -class ApplicationInitialized -{ - /** - * @var \EasyWeChat\Kernel\ServiceContainer - */ - public $app; - - public function __construct(ServiceContainer $app) - { - $this->app = $app; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Events/HttpResponseCreated.php b/vendor/overtrue/wechat/src/Kernel/Events/HttpResponseCreated.php deleted file mode 100644 index 809de20..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Events/HttpResponseCreated.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Events; - -use Psr\Http\Message\ResponseInterface; - -/** - * Class HttpResponseCreated. - * - * @author mingyoung - */ -class HttpResponseCreated -{ - /** - * @var \Psr\Http\Message\ResponseInterface - */ - public $response; - - public function __construct(ResponseInterface $response) - { - $this->response = $response; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Events/ServerGuardResponseCreated.php b/vendor/overtrue/wechat/src/Kernel/Events/ServerGuardResponseCreated.php deleted file mode 100644 index 46e221d..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Events/ServerGuardResponseCreated.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Events; - -use Symfony\Component\HttpFoundation\Response; - -/** - * Class ServerGuardResponseCreated. - * - * @author mingyoung - */ -class ServerGuardResponseCreated -{ - /** - * @var \Symfony\Component\HttpFoundation\Response - */ - public $response; - - public function __construct(Response $response) - { - $this->response = $response; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/BadRequestException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/BadRequestException.php deleted file mode 100644 index a0b4f91..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Exceptions/BadRequestException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Exceptions; - -/** - * Class BadRequestException. - * - * @author overtrue - */ -class BadRequestException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/DecryptException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/DecryptException.php deleted file mode 100644 index f29acca..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Exceptions/DecryptException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Exceptions; - -class DecryptException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/Exception.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/Exception.php deleted file mode 100644 index 9eba298..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Exceptions/Exception.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Exceptions; - -use Exception as BaseException; - -/** - * Class Exception. - * - * @author overtrue - */ -class Exception extends BaseException -{ -} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/HttpException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/HttpException.php deleted file mode 100644 index 5f64064..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Exceptions/HttpException.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Exceptions; - -use Psr\Http\Message\ResponseInterface; - -/** - * Class HttpException. - * - * @author overtrue - */ -class HttpException extends Exception -{ - /** - * @var \Psr\Http\Message\ResponseInterface|null - */ - public $response; - - /** - * @var \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string|null - */ - public $formattedResponse; - - /** - * HttpException constructor. - * - * @param string $message - * @param null $formattedResponse - * @param int|null $code - */ - public function __construct($message, ResponseInterface $response = null, $formattedResponse = null, $code = null) - { - parent::__construct($message, $code); - - $this->response = $response; - $this->formattedResponse = $formattedResponse; - - if ($response) { - $response->getBody()->rewind(); - } - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidArgumentException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidArgumentException.php deleted file mode 100644 index 386a144..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Exceptions; - -/** - * Class InvalidArgumentException. - * - * @author overtrue - */ -class InvalidArgumentException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidConfigException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidConfigException.php deleted file mode 100644 index 1e4ae2a..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidConfigException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Exceptions; - -/** - * Class InvalidConfigException. - * - * @author overtrue - */ -class InvalidConfigException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/RuntimeException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/RuntimeException.php deleted file mode 100644 index 25f2f5b..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Exceptions/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Exceptions; - -/** - * Class RuntimeException. - * - * @author overtrue - */ -class RuntimeException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/UnboundServiceException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/UnboundServiceException.php deleted file mode 100644 index 78ea85c..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Exceptions/UnboundServiceException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Exceptions; - -/** - * Class InvalidConfigException. - * - * @author overtrue - */ -class UnboundServiceException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/Kernel/Helpers.php b/vendor/overtrue/wechat/src/Kernel/Helpers.php deleted file mode 100644 index 3ea48a4..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Helpers.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel; - -use EasyWeChat\Kernel\Contracts\Arrayable; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Support\Arr; -use EasyWeChat\Kernel\Support\Collection; - -function data_get($data, $key, $default = null) -{ - switch (true) { - case is_array($data): - return Arr::get($data, $key, $default); - case $data instanceof Collection: - return $data->get($key, $default); - case $data instanceof Arrayable: - return Arr::get($data->toArray(), $key, $default); - case $data instanceof \ArrayIterator: - return $data->getArrayCopy()[$key] ?? $default; - case $data instanceof \ArrayAccess: - return $data[$key] ?? $default; - case $data instanceof \IteratorAggregate && $data->getIterator() instanceof \ArrayIterator: - return $data->getIterator()->getArrayCopy()[$key] ?? $default; - case is_object($data): - return $data->{$key} ?? $default; - default: - throw new RuntimeException(sprintf('Can\'t access data with key "%s"', $key)); - } -} - -function data_to_array($data) -{ - switch (true) { - case is_array($data): - return $data; - case $data instanceof Collection: - return $data->all(); - case $data instanceof Arrayable: - return $data->toArray(); - case $data instanceof \IteratorAggregate && $data->getIterator() instanceof \ArrayIterator: - return $data->getIterator()->getArrayCopy(); - case $data instanceof \ArrayIterator: - return $data->getArrayCopy(); - default: - throw new RuntimeException(sprintf('Can\'t transform data to array')); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Http/Response.php b/vendor/overtrue/wechat/src/Kernel/Http/Response.php deleted file mode 100644 index 4ff2f76..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Http/Response.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Http; - -use EasyWeChat\Kernel\Support\Collection; -use EasyWeChat\Kernel\Support\XML; -use GuzzleHttp\Psr7\Response as GuzzleResponse; -use Psr\Http\Message\ResponseInterface; - -/** - * Class Response. - * - * @author overtrue - */ -class Response extends GuzzleResponse -{ - /** - * @return string - */ - public function getBodyContents() - { - $this->getBody()->rewind(); - $contents = $this->getBody()->getContents(); - $this->getBody()->rewind(); - - return $contents; - } - - /** - * @return \EasyWeChat\Kernel\Http\Response - */ - public static function buildFromPsrResponse(ResponseInterface $response) - { - return new static( - $response->getStatusCode(), - $response->getHeaders(), - $response->getBody(), - $response->getProtocolVersion(), - $response->getReasonPhrase() - ); - } - - /** - * Build to json. - * - * @return string - */ - public function toJson() - { - return json_encode($this->toArray()); - } - - /** - * Build to array. - * - * @return array - */ - public function toArray() - { - $content = $this->removeControlCharacters($this->getBodyContents()); - - if (false !== stripos($this->getHeaderLine('Content-Type'), 'xml') || 0 === stripos($content, 'toArray()); - } - - /** - * @return object - */ - public function toObject() - { - return json_decode($this->toJson()); - } - - /** - * @return bool|string - */ - public function __toString() - { - return $this->getBodyContents(); - } - - /** - * @return string - */ - protected function removeControlCharacters(string $content) - { - return \preg_replace('/[\x00-\x1F\x80-\x9F]/u', '', $content); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Http/StreamResponse.php b/vendor/overtrue/wechat/src/Kernel/Http/StreamResponse.php deleted file mode 100644 index 91c1346..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Http/StreamResponse.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Http; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Support\File; - -/** - * Class StreamResponse. - * - * @author overtrue - */ -class StreamResponse extends Response -{ - /** - * @return bool|int - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function save(string $directory, string $filename = '', bool $appendSuffix = true) - { - $this->getBody()->rewind(); - - $directory = rtrim($directory, '/'); - - if (!is_dir($directory)) { - mkdir($directory, 0755, true); // @codeCoverageIgnore - } - - if (!is_writable($directory)) { - throw new InvalidArgumentException(sprintf("'%s' is not writable.", $directory)); - } - - $contents = $this->getBody()->getContents(); - - if (empty($contents) || '{' === $contents[0]) { - throw new RuntimeException('Invalid media response content.'); - } - - if (empty($filename)) { - if (preg_match('/filename="(?.*?)"/', $this->getHeaderLine('Content-Disposition'), $match)) { - $filename = $match['filename']; - } else { - $filename = md5($contents); - } - } - - if ($appendSuffix && empty(pathinfo($filename, PATHINFO_EXTENSION))) { - $filename .= File::getStreamExt($contents); - } - - file_put_contents($directory.'/'.$filename, $contents); - - return $filename; - } - - /** - * @return bool|int - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function saveAs(string $directory, string $filename, bool $appendSuffix = true) - { - return $this->save($directory, $filename, $appendSuffix); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Log/LogManager.php b/vendor/overtrue/wechat/src/Kernel/Log/LogManager.php deleted file mode 100644 index 0d46e48..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Log/LogManager.php +++ /dev/null @@ -1,580 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Log; - -use EasyWeChat\Kernel\ServiceContainer; -use InvalidArgumentException; -use Monolog\Formatter\LineFormatter; -use Monolog\Handler\ErrorLogHandler; -use Monolog\Handler\FormattableHandlerInterface; -use Monolog\Handler\HandlerInterface; -use Monolog\Handler\NullHandler; -use Monolog\Handler\RotatingFileHandler; -use Monolog\Handler\SlackWebhookHandler; -use Monolog\Handler\StreamHandler; -use Monolog\Handler\SyslogHandler; -use Monolog\Handler\WhatFailureGroupHandler; -use Monolog\Logger as Monolog; -use Psr\Log\LoggerInterface; - -/** - * Class LogManager. - * - * @author overtrue - */ -class LogManager implements LoggerInterface -{ - /** - * @var \EasyWeChat\Kernel\ServiceContainer - */ - protected $app; - - /** - * The array of resolved channels. - * - * @var array - */ - protected $channels = []; - - /** - * The registered custom driver creators. - * - * @var array - */ - protected $customCreators = []; - - /** - * The Log levels. - * - * @var array - */ - protected $levels = [ - 'debug' => Monolog::DEBUG, - 'info' => Monolog::INFO, - 'notice' => Monolog::NOTICE, - 'warning' => Monolog::WARNING, - 'error' => Monolog::ERROR, - 'critical' => Monolog::CRITICAL, - 'alert' => Monolog::ALERT, - 'emergency' => Monolog::EMERGENCY, - ]; - - /** - * LogManager constructor. - */ - public function __construct(ServiceContainer $app) - { - $this->app = $app; - } - - /** - * Create a new, on-demand aggregate logger instance. - * - * @param array $channels - * @param string|null $channel - * - * @return \Psr\Log\LoggerInterface - * - * @throws \Exception - */ - public function stack(array $channels, $channel = null) - { - return $this->createStackDriver(compact('channels', 'channel')); - } - - /** - * Get a log channel instance. - * - * @param string|null $channel - * - * @return mixed - * - * @throws \Exception - */ - public function channel($channel = null) - { - return $this->driver($channel); - } - - /** - * Get a log driver instance. - * - * @param string|null $driver - * - * @return mixed - * - * @throws \Exception - */ - public function driver($driver = null) - { - return $this->get($driver ?? $this->getDefaultDriver()); - } - - /** - * Attempt to get the log from the local cache. - * - * @param string $name - * - * @return \Psr\Log\LoggerInterface - * - * @throws \Exception - */ - protected function get($name) - { - try { - return $this->channels[$name] ?? ($this->channels[$name] = $this->resolve($name)); - } catch (\Throwable $e) { - $logger = $this->createEmergencyLogger(); - - $logger->emergency('Unable to create configured logger. Using emergency logger.', [ - 'exception' => $e, - ]); - - return $logger; - } - } - - /** - * Resolve the given log instance by name. - * - * @param string $name - * - * @return \Psr\Log\LoggerInterface - * - * @throws InvalidArgumentException - */ - protected function resolve($name) - { - $config = $this->app['config']->get(\sprintf('log.channels.%s', $name)); - - if (is_null($config)) { - throw new InvalidArgumentException(\sprintf('Log [%s] is not defined.', $name)); - } - - if (isset($this->customCreators[$config['driver']])) { - return $this->callCustomCreator($config); - } - - $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; - - if (method_exists($this, $driverMethod)) { - return $this->{$driverMethod}($config); - } - - throw new InvalidArgumentException(\sprintf('Driver [%s] is not supported.', $config['driver'])); - } - - /** - * Call a custom driver creator. - * - * @return mixed - */ - protected function callCustomCreator(array $config) - { - return $this->customCreators[$config['driver']]($this->app, $config); - } - - /** - * Create an emergency log handler to avoid white screens of death. - * - * @return \Monolog\Logger - * - * @throws \Exception - */ - protected function createEmergencyLogger() - { - return new Monolog('EasyWeChat', $this->prepareHandlers([new StreamHandler( - \sys_get_temp_dir().'/easywechat/easywechat.log', - $this->level(['level' => 'debug']) - )])); - } - - /** - * Create an aggregate log driver instance. - * - * @return \Monolog\Logger - * - * @throws \Exception - */ - protected function createStackDriver(array $config) - { - $handlers = []; - - foreach ($config['channels'] ?? [] as $channel) { - $handlers = \array_merge($handlers, $this->channel($channel)->getHandlers()); - } - - if ($config['ignore_exceptions'] ?? false) { - $handlers = [new WhatFailureGroupHandler($handlers)]; - } - - return new Monolog($this->parseChannel($config), $handlers); - } - - /** - * Create an instance of the single file log driver. - * - * @return \Psr\Log\LoggerInterface - * - * @throws \Exception - */ - protected function createSingleDriver(array $config) - { - return new Monolog($this->parseChannel($config), [ - $this->prepareHandler(new StreamHandler( - $config['path'], - $this->level($config), - $config['bubble'] ?? true, - $config['permission'] ?? null, - $config['locking'] ?? false - ), $config), - ]); - } - - /** - * Create an instance of the daily file log driver. - * - * @return \Psr\Log\LoggerInterface - */ - protected function createDailyDriver(array $config) - { - return new Monolog($this->parseChannel($config), [ - $this->prepareHandler(new RotatingFileHandler( - $config['path'], - $config['days'] ?? 7, - $this->level($config), - $config['bubble'] ?? true, - $config['permission'] ?? null, - $config['locking'] ?? false - ), $config), - ]); - } - - /** - * Create an instance of the Slack log driver. - * - * @return \Psr\Log\LoggerInterface - */ - protected function createSlackDriver(array $config) - { - return new Monolog($this->parseChannel($config), [ - $this->prepareHandler(new SlackWebhookHandler( - $config['url'], - $config['channel'] ?? null, - $config['username'] ?? 'EasyWeChat', - $config['attachment'] ?? true, - $config['emoji'] ?? ':boom:', - $config['short'] ?? false, - $config['context'] ?? true, - $this->level($config), - $config['bubble'] ?? true, - $config['exclude_fields'] ?? [] - ), $config), - ]); - } - - /** - * Create an instance of the syslog log driver. - * - * @return \Psr\Log\LoggerInterface - */ - protected function createSyslogDriver(array $config) - { - return new Monolog($this->parseChannel($config), [ - $this->prepareHandler(new SyslogHandler( - 'EasyWeChat', - $config['facility'] ?? LOG_USER, - $this->level($config) - ), $config), - ]); - } - - /** - * Create an instance of the "error log" log driver. - * - * @return \Psr\Log\LoggerInterface - */ - protected function createErrorlogDriver(array $config) - { - return new Monolog($this->parseChannel($config), [ - $this->prepareHandler( - new ErrorLogHandler( - $config['type'] ?? ErrorLogHandler::OPERATING_SYSTEM, - $this->level($config) - ) - ), - ]); - } - - protected function createNullDriver() - { - return new Monolog('EasyWeChat', [new NullHandler()]); - } - - /** - * Prepare the handlers for usage by Monolog. - * - * @return array - */ - protected function prepareHandlers(array $handlers) - { - foreach ($handlers as $key => $handler) { - $handlers[$key] = $this->prepareHandler($handler); - } - - return $handlers; - } - - /** - * Prepare the handler for usage by Monolog. - * - * @return \Monolog\Handler\HandlerInterface - */ - protected function prepareHandler(HandlerInterface $handler, array $config = []) - { - if (!isset($config['formatter'])) { - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($this->formatter()); - } - } - - return $handler; - } - - /** - * Get a Monolog formatter instance. - * - * @return \Monolog\Formatter\FormatterInterface - */ - protected function formatter() - { - $formatter = new LineFormatter(null, null, true, true); - $formatter->includeStacktraces(); - - return $formatter; - } - - /** - * Extract the log channel from the given configuration. - * - * @return string - */ - protected function parseChannel(array $config) - { - return $config['name'] ?? 'EasyWeChat'; - } - - /** - * Parse the string level into a Monolog constant. - * - * @return int - * - * @throws InvalidArgumentException - */ - protected function level(array $config) - { - $level = $config['level'] ?? 'debug'; - - if (isset($this->levels[$level])) { - return $this->levels[$level]; - } - - throw new InvalidArgumentException('Invalid log level.'); - } - - /** - * Get the default log driver name. - * - * @return string - */ - public function getDefaultDriver() - { - return $this->app['config']['log.default']; - } - - /** - * Set the default log driver name. - * - * @param string $name - */ - public function setDefaultDriver($name) - { - $this->app['config']['log.default'] = $name; - } - - /** - * Register a custom driver creator Closure. - * - * @param string $driver - * - * @return $this - */ - public function extend($driver, \Closure $callback) - { - $this->customCreators[$driver] = $callback->bindTo($this, $this); - - return $this; - } - - /** - * System is unusable. - * - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function emergency($message, array $context = []) - { - return $this->driver()->emergency($message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function alert($message, array $context = []) - { - return $this->driver()->alert($message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function critical($message, array $context = []) - { - return $this->driver()->critical($message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function error($message, array $context = []) - { - return $this->driver()->error($message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function warning($message, array $context = []) - { - return $this->driver()->warning($message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function notice($message, array $context = []) - { - return $this->driver()->notice($message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function info($message, array $context = []) - { - return $this->driver()->info($message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function debug($message, array $context = []) - { - return $this->driver()->debug($message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * - * @return mixed - * - * @throws \Exception - */ - public function log($level, $message, array $context = []) - { - return $this->driver()->log($level, $message, $context); - } - - /** - * Dynamically call the default driver instance. - * - * @param string $method - * @param array $parameters - * - * @return mixed - * - * @throws \Exception - */ - public function __call($method, $parameters) - { - return $this->driver()->$method(...$parameters); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Article.php b/vendor/overtrue/wechat/src/Kernel/Messages/Article.php deleted file mode 100644 index 4792a1f..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Article.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Article. - */ -class Article extends Message -{ - /** - * @var string - */ - protected $type = 'mpnews'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'thumb_media_id', - 'author', - 'title', - 'content', - 'digest', - 'source_url', - 'show_cover', - ]; - - /** - * Aliases of attribute. - * - * @var array - */ - protected $jsonAliases = [ - 'content_source_url' => 'source_url', - 'show_cover_pic' => 'show_cover', - ]; - - /** - * @var array - */ - protected $required = [ - 'thumb_media_id', - 'title', - 'content', - 'show_cover', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Card.php b/vendor/overtrue/wechat/src/Kernel/Messages/Card.php deleted file mode 100644 index d5b2590..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Card.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -/** - * Card.php. - * - * @author overtrue - * @copyright 2015 overtrue - * - * @see https://github.com/overtrue - * @see http://overtrue.me - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Card. - */ -class Card extends Message -{ - /** - * Message type. - * - * @var string - */ - protected $type = 'wxcard'; - - /** - * Properties. - * - * @var array - */ - protected $properties = ['card_id']; - - /** - * Media constructor. - */ - public function __construct(string $cardId) - { - parent::__construct(['card_id' => $cardId]); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/DeviceEvent.php b/vendor/overtrue/wechat/src/Kernel/Messages/DeviceEvent.php deleted file mode 100644 index ae57910..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/DeviceEvent.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class DeviceEvent. - * - * @property string $media_id - */ -class DeviceEvent extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'device_event'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'device_type', - 'device_id', - 'content', - 'session_id', - 'open_id', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/DeviceText.php b/vendor/overtrue/wechat/src/Kernel/Messages/DeviceText.php deleted file mode 100644 index 87e627a..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/DeviceText.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class DeviceText. - * - * @property string $content - */ -class DeviceText extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'device_text'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'device_type', - 'device_id', - 'content', - 'session_id', - 'open_id', - ]; - - public function toXmlArray() - { - return [ - 'DeviceType' => $this->get('device_type'), - 'DeviceID' => $this->get('device_id'), - 'SessionID' => $this->get('session_id'), - 'Content' => base64_encode($this->get('content')), - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/File.php b/vendor/overtrue/wechat/src/Kernel/Messages/File.php deleted file mode 100644 index a14c42f..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/File.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Image. - * - * @property string $media_id - */ -class File extends Media -{ - /** - * @var string - */ - protected $type = 'file'; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Image.php b/vendor/overtrue/wechat/src/Kernel/Messages/Image.php deleted file mode 100644 index 982033b..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Image.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Image. - * - * @property string $media_id - */ -class Image extends Media -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'image'; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Link.php b/vendor/overtrue/wechat/src/Kernel/Messages/Link.php deleted file mode 100644 index 9c126b5..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Link.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Link. - */ -class Link extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'link'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'title', - 'description', - 'url', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Location.php b/vendor/overtrue/wechat/src/Kernel/Messages/Location.php deleted file mode 100644 index f10351b..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Location.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Location. - */ -class Location extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'location'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'latitude', - 'longitude', - 'scale', - 'label', - 'precision', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Media.php b/vendor/overtrue/wechat/src/Kernel/Messages/Media.php deleted file mode 100644 index ab44477..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Media.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -use EasyWeChat\Kernel\Contracts\MediaInterface; -use EasyWeChat\Kernel\Support\Str; - -/** - * Class Media. - */ -class Media extends Message implements MediaInterface -{ - /** - * Properties. - * - * @var array - */ - protected $properties = ['media_id']; - - /** - * @var array - */ - protected $required = [ - 'media_id', - ]; - - /** - * MaterialClient constructor. - * - * @param string $type - */ - public function __construct(string $mediaId, $type = null, array $attributes = []) - { - parent::__construct(array_merge(['media_id' => $mediaId], $attributes)); - - !empty($type) && $this->setType($type); - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function getMediaId(): string - { - $this->checkRequiredAttributes(); - - return $this->get('media_id'); - } - - public function toXmlArray() - { - return [ - Str::studly($this->getType()) => [ - 'MediaId' => $this->get('media_id'), - ], - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Message.php b/vendor/overtrue/wechat/src/Kernel/Messages/Message.php deleted file mode 100644 index 2c9d72f..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Message.php +++ /dev/null @@ -1,187 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -use EasyWeChat\Kernel\Contracts\MessageInterface; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Support\XML; -use EasyWeChat\Kernel\Traits\HasAttributes; - -/** - * Class Messages. - */ -abstract class Message implements MessageInterface -{ - use HasAttributes; - - public const TEXT = 2; - public const IMAGE = 4; - public const VOICE = 8; - public const VIDEO = 16; - public const SHORT_VIDEO = 32; - public const LOCATION = 64; - public const LINK = 128; - public const DEVICE_EVENT = 256; - public const DEVICE_TEXT = 512; - public const FILE = 1024; - public const TEXT_CARD = 2048; - public const TRANSFER = 4096; - public const EVENT = 1048576; - public const MINIPROGRAM_PAGE = 2097152; - public const MINIPROGRAM_NOTICE = 4194304; - public const ALL = self::TEXT | self::IMAGE | self::VOICE | self::VIDEO | self::SHORT_VIDEO | self::LOCATION | self::LINK - | self::DEVICE_EVENT | self::DEVICE_TEXT | self::FILE | self::TEXT_CARD | self::TRANSFER | self::EVENT - | self::MINIPROGRAM_PAGE | self::MINIPROGRAM_NOTICE; - - /** - * @var string - */ - protected $type; - - /** - * @var int - */ - protected $id; - - /** - * @var string - */ - protected $to; - - /** - * @var string - */ - protected $from; - - /** - * @var array - */ - protected $properties = []; - - /** - * @var array - */ - protected $jsonAliases = []; - - /** - * Message constructor. - */ - public function __construct(array $attributes = []) - { - $this->setAttributes($attributes); - } - - /** - * Return type name message. - */ - public function getType(): string - { - return $this->type; - } - - public function setType(string $type) - { - $this->type = $type; - } - - /** - * Magic getter. - * - * @param string $property - * - * @return mixed - */ - public function __get($property) - { - if (property_exists($this, $property)) { - return $this->$property; - } - - return $this->getAttribute($property); - } - - /** - * Magic setter. - * - * @param string $property - * @param mixed $value - * - * @return Message - */ - public function __set($property, $value) - { - if (property_exists($this, $property)) { - $this->$property = $value; - } else { - $this->setAttribute($property, $value); - } - - return $this; - } - - /** - * @return array - */ - public function transformForJsonRequestWithoutType(array $appends = []) - { - return $this->transformForJsonRequest($appends, false); - } - - /** - * @param bool $withType - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function transformForJsonRequest(array $appends = [], $withType = true): array - { - if (!$withType) { - return $this->propertiesToArray([], $this->jsonAliases); - } - $messageType = $this->getType(); - $data = array_merge(['msgtype' => $messageType], $appends); - - $data[$messageType] = array_merge($data[$messageType] ?? [], $this->propertiesToArray([], $this->jsonAliases)); - - return $data; - } - - public function transformToXml(array $appends = [], bool $returnAsArray = false): string - { - $data = array_merge(['MsgType' => $this->getType()], $this->toXmlArray(), $appends); - - return $returnAsArray ? $data : XML::build($data); - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function propertiesToArray(array $data, array $aliases = []): array - { - $this->checkRequiredAttributes(); - - foreach ($this->attributes as $property => $value) { - if (is_null($value) && !$this->isRequired($property)) { - continue; - } - $alias = array_search($property, $aliases, true); - - $data[$alias ?: $property] = $this->get($property); - } - - return $data; - } - - public function toXmlArray() - { - throw new RuntimeException(sprintf('Class "%s" cannot support transform to XML message.', __CLASS__)); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/MiniProgramPage.php b/vendor/overtrue/wechat/src/Kernel/Messages/MiniProgramPage.php deleted file mode 100644 index e4973b1..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/MiniProgramPage.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class MiniProgramPage. - */ -class MiniProgramPage extends Message -{ - protected $type = 'miniprogrampage'; - - protected $properties = [ - 'title', - 'appid', - 'pagepath', - 'thumb_media_id', - ]; - - protected $required = [ - 'thumb_media_id', 'appid', 'pagepath', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/MiniprogramNotice.php b/vendor/overtrue/wechat/src/Kernel/Messages/MiniprogramNotice.php deleted file mode 100644 index 10589c5..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/MiniprogramNotice.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -class MiniprogramNotice extends Message -{ - protected $type = 'miniprogram_notice'; - - protected $properties = [ - 'appid', - 'title', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Music.php b/vendor/overtrue/wechat/src/Kernel/Messages/Music.php deleted file mode 100644 index 85feb76..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Music.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Music. - * - * @property string $url - * @property string $hq_url - * @property string $title - * @property string $description - * @property string $thumb_media_id - * @property string $format - */ -class Music extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'music'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'title', - 'description', - 'url', - 'hq_url', - 'thumb_media_id', - 'format', - ]; - - /** - * Aliases of attribute. - * - * @var array - */ - protected $jsonAliases = [ - 'musicurl' => 'url', - 'hqmusicurl' => 'hq_url', - ]; - - public function toXmlArray() - { - $music = [ - 'Music' => [ - 'Title' => $this->get('title'), - 'Description' => $this->get('description'), - 'MusicUrl' => $this->get('url'), - 'HQMusicUrl' => $this->get('hq_url'), - ], - ]; - if ($thumbMediaId = $this->get('thumb_media_id')) { - $music['Music']['ThumbMediaId'] = $thumbMediaId; - } - - return $music; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/News.php b/vendor/overtrue/wechat/src/Kernel/Messages/News.php deleted file mode 100644 index 33703d2..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/News.php +++ /dev/null @@ -1,65 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class News. - * - * @author overtrue - */ -class News extends Message -{ - /** - * @var string - */ - protected $type = 'news'; - - /** - * @var array - */ - protected $properties = [ - 'items', - ]; - - /** - * News constructor. - */ - public function __construct(array $items = []) - { - parent::__construct(compact('items')); - } - - public function propertiesToArray(array $data, array $aliases = []): array - { - return ['articles' => array_map(function ($item) { - if ($item instanceof NewsItem) { - return $item->toJsonArray(); - } - }, $this->get('items'))]; - } - - public function toXmlArray() - { - $items = []; - - foreach ($this->get('items') as $item) { - if ($item instanceof NewsItem) { - $items[] = $item->toXmlArray(); - } - } - - return [ - 'ArticleCount' => count($items), - 'Articles' => $items, - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/NewsItem.php b/vendor/overtrue/wechat/src/Kernel/Messages/NewsItem.php deleted file mode 100644 index 50bf336..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/NewsItem.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class NewsItem. - */ -class NewsItem extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'news'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'title', - 'description', - 'url', - 'image', - ]; - - public function toJsonArray() - { - return [ - 'title' => $this->get('title'), - 'description' => $this->get('description'), - 'url' => $this->get('url'), - 'picurl' => $this->get('image'), - ]; - } - - public function toXmlArray() - { - return [ - 'Title' => $this->get('title'), - 'Description' => $this->get('description'), - 'Url' => $this->get('url'), - 'PicUrl' => $this->get('image'), - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Raw.php b/vendor/overtrue/wechat/src/Kernel/Messages/Raw.php deleted file mode 100644 index a3dd609..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Raw.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Raw. - */ -class Raw extends Message -{ - /** - * @var string - */ - protected $type = 'raw'; - - /** - * Properties. - * - * @var array - */ - protected $properties = ['content']; - - /** - * Constructor. - */ - public function __construct(string $content) - { - parent::__construct(['content' => strval($content)]); - } - - /** - * @param bool $withType - */ - public function transformForJsonRequest(array $appends = [], $withType = true): array - { - return json_decode($this->content, true) ?? []; - } - - public function __toString() - { - return $this->get('content') ?? ''; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/ShortVideo.php b/vendor/overtrue/wechat/src/Kernel/Messages/ShortVideo.php deleted file mode 100644 index 1dc1db9..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/ShortVideo.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class ShortVideo. - * - * @property string $title - * @property string $media_id - * @property string $description - * @property string $thumb_media_id - */ -class ShortVideo extends Video -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'shortvideo'; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/TaskCard.php b/vendor/overtrue/wechat/src/Kernel/Messages/TaskCard.php deleted file mode 100644 index d02c411..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/TaskCard.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class TaskCard. - * - * @property string $title - * @property string $description - * @property string $url - * @property string $task_id - * @property array $btn - */ -class TaskCard extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'taskcard'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'title', - 'description', - 'url', - 'task_id', - 'btn', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Text.php b/vendor/overtrue/wechat/src/Kernel/Messages/Text.php deleted file mode 100644 index 7ce9df5..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Text.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Text. - * - * @property string $content - */ -class Text extends Message -{ - /** - * Message type. - * - * @var string - */ - protected $type = 'text'; - - /** - * Properties. - * - * @var array - */ - protected $properties = ['content']; - - /** - * Text constructor. - */ - public function __construct(string $content) - { - parent::__construct(compact('content')); - } - - /** - * @return array - */ - public function toXmlArray() - { - return [ - 'Content' => $this->get('content'), - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/TextCard.php b/vendor/overtrue/wechat/src/Kernel/Messages/TextCard.php deleted file mode 100644 index edfb7c5..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/TextCard.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Text. - * - * @property string $title - * @property string $description - * @property string $url - */ -class TextCard extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'textcard'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'title', - 'description', - 'url', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Transfer.php b/vendor/overtrue/wechat/src/Kernel/Messages/Transfer.php deleted file mode 100644 index fe7918b..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Transfer.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Transfer. - * - * @property string $to - * @property string $account - */ -class Transfer extends Message -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'transfer_customer_service'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'account', - ]; - - /** - * Transfer constructor. - */ - public function __construct(string $account = null) - { - parent::__construct(compact('account')); - } - - public function toXmlArray() - { - return empty($this->get('account')) ? [] : [ - 'TransInfo' => [ - 'KfAccount' => $this->get('account'), - ], - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Video.php b/vendor/overtrue/wechat/src/Kernel/Messages/Video.php deleted file mode 100644 index 3ae4860..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Video.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Video. - * - * @property string $video - * @property string $title - * @property string $media_id - * @property string $description - * @property string $thumb_media_id - */ -class Video extends Media -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'video'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'title', - 'description', - 'media_id', - 'thumb_media_id', - ]; - - /** - * Video constructor. - */ - public function __construct(string $mediaId, array $attributes = []) - { - parent::__construct($mediaId, 'video', $attributes); - } - - public function toXmlArray() - { - return [ - 'Video' => [ - 'MediaId' => $this->get('media_id'), - 'Title' => $this->get('title'), - 'Description' => $this->get('description'), - ], - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Voice.php b/vendor/overtrue/wechat/src/Kernel/Messages/Voice.php deleted file mode 100644 index ff723ea..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Messages/Voice.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Messages; - -/** - * Class Voice. - * - * @property string $media_id - */ -class Voice extends Media -{ - /** - * Messages type. - * - * @var string - */ - protected $type = 'voice'; - - /** - * Properties. - * - * @var array - */ - protected $properties = [ - 'media_id', - 'recognition', - ]; -} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/ConfigServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/ConfigServiceProvider.php deleted file mode 100644 index 24ff919..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Providers/ConfigServiceProvider.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Providers; - -use EasyWeChat\Kernel\Config; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ConfigServiceProvider. - * - * @author overtrue - */ -class ConfigServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - * - * @param Container $pimple A container instance - */ - public function register(Container $pimple) - { - !isset($pimple['config']) && $pimple['config'] = function ($app) { - return new Config($app->getConfig()); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/EventDispatcherServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/EventDispatcherServiceProvider.php deleted file mode 100644 index 97b2b99..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Providers/EventDispatcherServiceProvider.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Providers; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; -use Symfony\Component\EventDispatcher\EventDispatcher; - -/** - * Class EventDispatcherServiceProvider. - * - * @author mingyoung - */ -class EventDispatcherServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - * - * @param Container $pimple A container instance - */ - public function register(Container $pimple) - { - !isset($pimple['events']) && $pimple['events'] = function ($app) { - $dispatcher = new EventDispatcher(); - - foreach ($app->config->get('events.listen', []) as $event => $listeners) { - foreach ($listeners as $listener) { - $dispatcher->addListener($event, $listener); - } - } - - return $dispatcher; - }; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/ExtensionServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/ExtensionServiceProvider.php deleted file mode 100644 index 1d8badd..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Providers/ExtensionServiceProvider.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Providers; - -use EasyWeChatComposer\Extension; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ExtensionServiceProvider. - * - * @author overtrue - */ -class ExtensionServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - * - * @param Container $pimple A container instance - */ - public function register(Container $pimple) - { - !isset($pimple['extension']) && $pimple['extension'] = function ($app) { - return new Extension($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/HttpClientServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/HttpClientServiceProvider.php deleted file mode 100644 index e21edfa..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Providers/HttpClientServiceProvider.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Providers; - -use GuzzleHttp\Client; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class HttpClientServiceProvider. - * - * @author overtrue - */ -class HttpClientServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - * - * @param Container $pimple A container instance - */ - public function register(Container $pimple) - { - !isset($pimple['http_client']) && $pimple['http_client'] = function ($app) { - return new Client($app['config']->get('http', [])); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/LogServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/LogServiceProvider.php deleted file mode 100644 index b3ee84b..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Providers/LogServiceProvider.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Providers; - -use EasyWeChat\Kernel\Log\LogManager; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class LoggingServiceProvider. - * - * @author overtrue - */ -class LogServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - * - * @param Container $pimple A container instance - */ - public function register(Container $pimple) - { - !isset($pimple['log']) && $pimple['log'] = function ($app) { - $config = $this->formatLogConfig($app); - - if (!empty($config)) { - $app->rebind('config', $app['config']->merge($config)); - } - - return new LogManager($app); - }; - - !isset($pimple['logger']) && $pimple['logger'] = $pimple['log']; - } - - public function formatLogConfig($app) - { - if (!empty($app['config']->get('log.channels'))) { - return [ - 'log' => $app['config']->get('log'), - ]; - } - - if (empty($app['config']->get('log'))) { - return [ - 'log' => [ - 'default' => 'null', - 'channels' => [ - 'null' => [ - 'driver' => 'null', - ], - ], - ], - ]; - } - - return [ - 'log' => [ - 'default' => 'single', - 'channels' => [ - 'single' => [ - 'driver' => 'single', - 'path' => $app['config']->get('log.file') ?: \sys_get_temp_dir().'/logs/easywechat.log', - 'level' => $app['config']->get('log.level', 'debug'), - ], - ], - ], - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/RequestServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/RequestServiceProvider.php deleted file mode 100644 index d38522e..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Providers/RequestServiceProvider.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Providers; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; -use Symfony\Component\HttpFoundation\Request; - -/** - * Class RequestServiceProvider. - * - * @author overtrue - */ -class RequestServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - * - * @param Container $pimple A container instance - */ - public function register(Container $pimple) - { - !isset($pimple['request']) && $pimple['request'] = function () { - return Request::createFromGlobals(); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/ServerGuard.php b/vendor/overtrue/wechat/src/Kernel/ServerGuard.php deleted file mode 100644 index 11d5399..0000000 --- a/vendor/overtrue/wechat/src/Kernel/ServerGuard.php +++ /dev/null @@ -1,352 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel; - -use EasyWeChat\Kernel\Contracts\MessageInterface; -use EasyWeChat\Kernel\Exceptions\BadRequestException; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Messages\Message; -use EasyWeChat\Kernel\Messages\News; -use EasyWeChat\Kernel\Messages\NewsItem; -use EasyWeChat\Kernel\Messages\Raw as RawMessage; -use EasyWeChat\Kernel\Messages\Text; -use EasyWeChat\Kernel\Support\XML; -use EasyWeChat\Kernel\Traits\Observable; -use EasyWeChat\Kernel\Traits\ResponseCastable; -use Symfony\Component\HttpFoundation\Response; - -/** - * Class ServerGuard. - * - * 1. url 里的 signature 只是将 token+nonce+timestamp 得到的签名,只是用于验证当前请求的,在公众号环境下一直有 - * 2. 企业号消息发送时是没有的,因为固定为完全模式,所以 url 里不会存在 signature, 只有 msg_signature 用于解密消息的 - * - * @author overtrue - */ -class ServerGuard -{ - use Observable; - use ResponseCastable; - - /** - * @var bool - */ - protected $alwaysValidate = false; - - /** - * Empty string. - */ - public const SUCCESS_EMPTY_RESPONSE = 'success'; - - /** - * @var array - */ - public const MESSAGE_TYPE_MAPPING = [ - 'text' => Message::TEXT, - 'image' => Message::IMAGE, - 'voice' => Message::VOICE, - 'video' => Message::VIDEO, - 'shortvideo' => Message::SHORT_VIDEO, - 'location' => Message::LOCATION, - 'link' => Message::LINK, - 'device_event' => Message::DEVICE_EVENT, - 'device_text' => Message::DEVICE_TEXT, - 'event' => Message::EVENT, - 'file' => Message::FILE, - 'miniprogrampage' => Message::MINIPROGRAM_PAGE, - ]; - - /** - * @var \EasyWeChat\Kernel\ServiceContainer - */ - protected $app; - - /** - * Constructor. - * - * @codeCoverageIgnore - * - * @param \EasyWeChat\Kernel\ServiceContainer $app - */ - public function __construct(ServiceContainer $app) - { - $this->app = $app; - - foreach ($this->app->extension->observers() as $observer) { - call_user_func_array([$this, 'push'], $observer); - } - } - - /** - * Handle and return response. - * - * @throws BadRequestException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function serve(): Response - { - $this->app['logger']->debug('Request received:', [ - 'method' => $this->app['request']->getMethod(), - 'uri' => $this->app['request']->getUri(), - 'content-type' => $this->app['request']->getContentType(), - 'content' => $this->app['request']->getContent(), - ]); - - $response = $this->validate()->resolve(); - - $this->app['logger']->debug('Server response created:', ['content' => $response->getContent()]); - - return $response; - } - - /** - * @return $this - * - * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException - */ - public function validate() - { - if (!$this->alwaysValidate && !$this->isSafeMode()) { - return $this; - } - - if ($this->app['request']->get('signature') !== $this->signature([ - $this->getToken(), - $this->app['request']->get('timestamp'), - $this->app['request']->get('nonce'), - ])) { - throw new BadRequestException('Invalid request signature.', 400); - } - - return $this; - } - - /** - * Force validate request. - * - * @return $this - */ - public function forceValidate() - { - $this->alwaysValidate = true; - - return $this; - } - - /** - * Get request message. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|string - * - * @throws BadRequestException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getMessage() - { - $message = $this->parseMessage($this->app['request']->getContent(false)); - - if (!is_array($message) || empty($message)) { - throw new BadRequestException('No message received.'); - } - - if ($this->isSafeMode() && !empty($message['Encrypt'])) { - $message = $this->decryptMessage($message); - - // Handle JSON format. - $dataSet = json_decode($message, true); - - if ($dataSet && (JSON_ERROR_NONE === json_last_error())) { - return $dataSet; - } - - $message = XML::parse($message); - } - - return $this->detectAndCastResponseToType($message, $this->app->config->get('response_type')); - } - - /** - * Resolve server request and return the response. - * - * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - protected function resolve(): Response - { - $result = $this->handleRequest(); - - if ($this->shouldReturnRawResponse()) { - $response = new Response($result['response']); - } else { - $response = new Response( - $this->buildResponse($result['to'], $result['from'], $result['response']), - 200, - ['Content-Type' => 'application/xml'] - ); - } - - $this->app->events->dispatch(new Events\ServerGuardResponseCreated($response)); - - return $response; - } - - /** - * @return string|null - */ - protected function getToken() - { - return $this->app['config']['token']; - } - - /** - * @param \EasyWeChat\Kernel\Contracts\MessageInterface|string|int $message - * - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function buildResponse(string $to, string $from, $message) - { - if (empty($message) || self::SUCCESS_EMPTY_RESPONSE === $message) { - return self::SUCCESS_EMPTY_RESPONSE; - } - - if ($message instanceof RawMessage) { - return $message->get('content', self::SUCCESS_EMPTY_RESPONSE); - } - - if (is_string($message) || is_numeric($message)) { - $message = new Text((string) $message); - } - - if (is_array($message) && reset($message) instanceof NewsItem) { - $message = new News($message); - } - - if (!($message instanceof Message)) { - throw new InvalidArgumentException(sprintf('Invalid Messages type "%s".', gettype($message))); - } - - return $this->buildReply($to, $from, $message); - } - - /** - * Handle request. - * - * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - protected function handleRequest(): array - { - $castedMessage = $this->getMessage(); - - $messageArray = $this->detectAndCastResponseToType($castedMessage, 'array'); - - $response = $this->dispatch(self::MESSAGE_TYPE_MAPPING[$messageArray['MsgType'] ?? $messageArray['msg_type'] ?? 'text'], $castedMessage); - - return [ - 'to' => $messageArray['FromUserName'] ?? '', - 'from' => $messageArray['ToUserName'] ?? '', - 'response' => $response, - ]; - } - - /** - * Build reply XML. - */ - protected function buildReply(string $to, string $from, MessageInterface $message): string - { - $prepends = [ - 'ToUserName' => $to, - 'FromUserName' => $from, - 'CreateTime' => time(), - 'MsgType' => $message->getType(), - ]; - - $response = $message->transformToXml($prepends); - - if ($this->isSafeMode()) { - $this->app['logger']->debug('Messages safe mode is enabled.'); - $response = $this->app['encryptor']->encrypt($response); - } - - return $response; - } - - /** - * @return string - */ - protected function signature(array $params) - { - sort($params, SORT_STRING); - - return sha1(implode($params)); - } - - /** - * Parse message array from raw php input. - * - * @param string $content - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException - */ - protected function parseMessage($content) - { - try { - if (0 === stripos($content, '<')) { - $content = XML::parse($content); - } else { - // Handle JSON format. - $dataSet = json_decode($content, true); - if ($dataSet && (JSON_ERROR_NONE === json_last_error())) { - $content = $dataSet; - } - } - - return (array) $content; - } catch (\Exception $e) { - throw new BadRequestException(sprintf('Invalid message content:(%s) %s', $e->getCode(), $e->getMessage()), $e->getCode()); - } - } - - /** - * Check the request message safe mode. - */ - protected function isSafeMode(): bool - { - return $this->app['request']->get('signature') && 'aes' === $this->app['request']->get('encrypt_type'); - } - - protected function shouldReturnRawResponse(): bool - { - return false; - } - - /** - * @return mixed - */ - protected function decryptMessage(array $message) - { - return $message = $this->app['encryptor']->decrypt( - $message['Encrypt'], - $this->app['request']->get('msg_signature'), - $this->app['request']->get('nonce'), - $this->app['request']->get('timestamp') - ); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/ServiceContainer.php b/vendor/overtrue/wechat/src/Kernel/ServiceContainer.php deleted file mode 100644 index 78798ae..0000000 --- a/vendor/overtrue/wechat/src/Kernel/ServiceContainer.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel; - -use EasyWeChat\Kernel\Providers\ConfigServiceProvider; -use EasyWeChat\Kernel\Providers\EventDispatcherServiceProvider; -use EasyWeChat\Kernel\Providers\ExtensionServiceProvider; -use EasyWeChat\Kernel\Providers\HttpClientServiceProvider; -use EasyWeChat\Kernel\Providers\LogServiceProvider; -use EasyWeChat\Kernel\Providers\RequestServiceProvider; -use EasyWeChatComposer\Traits\WithAggregator; -use Pimple\Container; - -/** - * Class ServiceContainer. - * - * @author overtrue - * - * @property \EasyWeChat\Kernel\Config $config - * @property \Symfony\Component\HttpFoundation\Request $request - * @property \GuzzleHttp\Client $http_client - * @property \Monolog\Logger $logger - * @property \Symfony\Component\EventDispatcher\EventDispatcher $events - */ -class ServiceContainer extends Container -{ - use WithAggregator; - - /** - * @var string - */ - protected $id; - - /** - * @var array - */ - protected $providers = []; - - /** - * @var array - */ - protected $defaultConfig = []; - - /** - * @var array - */ - protected $userConfig = []; - - /** - * Constructor. - */ - public function __construct(array $config = [], array $prepends = [], string $id = null) - { - $this->userConfig = $config; - - parent::__construct($prepends); - - $this->id = $id; - - $this->registerProviders($this->getProviders()); - - $this->aggregate(); - - $this->events->dispatch(new Events\ApplicationInitialized($this)); - } - - /** - * @return string - */ - public function getId() - { - return $this->id ?? $this->id = md5(json_encode($this->userConfig)); - } - - /** - * @return array - */ - public function getConfig() - { - $base = [ - // http://docs.guzzlephp.org/en/stable/request-options.html - 'http' => [ - 'timeout' => 30.0, - 'base_uri' => 'https://api.weixin.qq.com/', - ], - ]; - - return array_replace_recursive($base, $this->defaultConfig, $this->userConfig); - } - - /** - * Return all providers. - * - * @return array - */ - public function getProviders() - { - return array_merge([ - ConfigServiceProvider::class, - LogServiceProvider::class, - RequestServiceProvider::class, - HttpClientServiceProvider::class, - ExtensionServiceProvider::class, - EventDispatcherServiceProvider::class, - ], $this->providers); - } - - /** - * @param string $id - * @param mixed $value - */ - public function rebind($id, $value) - { - $this->offsetUnset($id); - $this->offsetSet($id, $value); - } - - /** - * Magic get access. - * - * @param string $id - * - * @return mixed - */ - public function __get($id) - { - if ($this->shouldDelegate($id)) { - return $this->delegateTo($id); - } - - return $this->offsetGet($id); - } - - /** - * Magic set access. - * - * @param string $id - * @param mixed $value - */ - public function __set($id, $value) - { - $this->offsetSet($id, $value); - } - - public function registerProviders(array $providers) - { - foreach ($providers as $provider) { - parent::register(new $provider()); - } - } - - public function getClient () { - return new BaseClient($this); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/AES.php b/vendor/overtrue/wechat/src/Kernel/Support/AES.php deleted file mode 100644 index 8aa1694..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Support/AES.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Support; - -/** - * Class AES. - * - * @author overtrue - */ -class AES -{ - public static function encrypt(string $text, string $key, string $iv, int $option = OPENSSL_RAW_DATA): string - { - self::validateKey($key); - self::validateIv($iv); - - return openssl_encrypt($text, self::getMode($key), $key, $option, $iv); - } - - /** - * @param string|null $method - */ - public static function decrypt(string $cipherText, string $key, string $iv, int $option = OPENSSL_RAW_DATA, $method = null): string - { - self::validateKey($key); - self::validateIv($iv); - - return openssl_decrypt($cipherText, $method ?: self::getMode($key), $key, $option, $iv); - } - - /** - * @param string $key - * - * @return string - */ - public static function getMode($key) - { - return 'aes-'.(8 * strlen($key)).'-cbc'; - } - - public static function validateKey(string $key) - { - if (!in_array(strlen($key), [16, 24, 32], true)) { - throw new \InvalidArgumentException(sprintf('Key length must be 16, 24, or 32 bytes; got key len (%s).', strlen($key))); - } - } - - /** - * @throws \InvalidArgumentException - */ - public static function validateIv(string $iv) - { - if (!empty($iv) && 16 !== strlen($iv)) { - throw new \InvalidArgumentException('IV length must be 16 bytes.'); - } - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/Arr.php b/vendor/overtrue/wechat/src/Kernel/Support/Arr.php deleted file mode 100644 index 00fd654..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Support/Arr.php +++ /dev/null @@ -1,439 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Support; - -/** - * Array helper from Illuminate\Support\Arr. - */ -class Arr -{ - /** - * Add an element to an array using "dot" notation if it doesn't exist. - * - * @param string $key - * @param mixed $value - * - * @return array - */ - public static function add(array $array, $key, $value) - { - if (is_null(static::get($array, $key))) { - static::set($array, $key, $value); - } - - return $array; - } - - /** - * Cross join the given arrays, returning all possible permutations. - * - * @param array ...$arrays - * - * @return array - */ - public static function crossJoin(...$arrays) - { - $results = [[]]; - - foreach ($arrays as $index => $array) { - $append = []; - - foreach ($results as $product) { - foreach ($array as $item) { - $product[$index] = $item; - - $append[] = $product; - } - } - - $results = $append; - } - - return $results; - } - - /** - * Divide an array into two arrays. One with keys and the other with values. - * - * @return array - */ - public static function divide(array $array) - { - return [array_keys($array), array_values($array)]; - } - - /** - * Flatten a multi-dimensional associative array with dots. - * - * @param string $prepend - * - * @return array - */ - public static function dot(array $array, $prepend = '') - { - $results = []; - - foreach ($array as $key => $value) { - if (is_array($value) && !empty($value)) { - $results = array_merge($results, static::dot($value, $prepend.$key.'.')); - } else { - $results[$prepend.$key] = $value; - } - } - - return $results; - } - - /** - * Get all of the given array except for a specified array of items. - * - * @param array|string $keys - * - * @return array - */ - public static function except(array $array, $keys) - { - static::forget($array, $keys); - - return $array; - } - - /** - * Determine if the given key exists in the provided array. - * - * @param string|int $key - * - * @return bool - */ - public static function exists(array $array, $key) - { - return array_key_exists($key, $array); - } - - /** - * Return the first element in an array passing a given truth test. - * - * @param mixed $default - * - * @return mixed - */ - public static function first(array $array, callable $callback = null, $default = null) - { - if (is_null($callback)) { - if (empty($array)) { - return $default; - } - - foreach ($array as $item) { - return $item; - } - } - - foreach ($array as $key => $value) { - if (call_user_func($callback, $value, $key)) { - return $value; - } - } - - return $default; - } - - /** - * Return the last element in an array passing a given truth test. - * - * @param mixed $default - * - * @return mixed - */ - public static function last(array $array, callable $callback = null, $default = null) - { - if (is_null($callback)) { - return empty($array) ? $default : end($array); - } - - return static::first(array_reverse($array, true), $callback, $default); - } - - /** - * Flatten a multi-dimensional array into a single level. - * - * @param int $depth - * - * @return array - */ - public static function flatten(array $array, $depth = INF) - { - return array_reduce($array, function ($result, $item) use ($depth) { - $item = $item instanceof Collection ? $item->all() : $item; - - if (!is_array($item)) { - return array_merge($result, [$item]); - } elseif (1 === $depth) { - return array_merge($result, array_values($item)); - } - - return array_merge($result, static::flatten($item, $depth - 1)); - }, []); - } - - /** - * Remove one or many array items from a given array using "dot" notation. - * - * @param array|string $keys - */ - public static function forget(array &$array, $keys) - { - $original = &$array; - - $keys = (array) $keys; - - if (0 === count($keys)) { - return; - } - - foreach ($keys as $key) { - // if the exact key exists in the top-level, remove it - if (static::exists($array, $key)) { - unset($array[$key]); - - continue; - } - - $parts = explode('.', $key); - - // clean up before each pass - $array = &$original; - - while (count($parts) > 1) { - $part = array_shift($parts); - - if (isset($array[$part]) && is_array($array[$part])) { - $array = &$array[$part]; - } else { - continue 2; - } - } - - unset($array[array_shift($parts)]); - } - } - - /** - * Get an item from an array using "dot" notation. - * - * @param string $key - * @param mixed $default - * - * @return mixed - */ - public static function get(array $array, $key, $default = null) - { - if (is_null($key)) { - return $array; - } - - if (static::exists($array, $key)) { - return $array[$key]; - } - - foreach (explode('.', $key) as $segment) { - if (static::exists($array, $segment)) { - $array = $array[$segment]; - } else { - return $default; - } - } - - return $array; - } - - /** - * Check if an item or items exist in an array using "dot" notation. - * - * @param string|array $keys - * - * @return bool - */ - public static function has(array $array, $keys) - { - if (is_null($keys)) { - return false; - } - - $keys = (array) $keys; - - if (empty($array)) { - return false; - } - - if ($keys === []) { - return false; - } - - foreach ($keys as $key) { - $subKeyArray = $array; - - if (static::exists($array, $key)) { - continue; - } - - foreach (explode('.', $key) as $segment) { - if (static::exists($subKeyArray, $segment)) { - $subKeyArray = $subKeyArray[$segment]; - } else { - return false; - } - } - } - - return true; - } - - /** - * Determines if an array is associative. - * - * An array is "associative" if it doesn't have sequential numerical keys beginning with zero. - * - * @return bool - */ - public static function isAssoc(array $array) - { - $keys = array_keys($array); - - return array_keys($keys) !== $keys; - } - - /** - * Get a subset of the items from the given array. - * - * @param array|string $keys - * - * @return array - */ - public static function only(array $array, $keys) - { - return array_intersect_key($array, array_flip((array) $keys)); - } - - /** - * Push an item onto the beginning of an array. - * - * @param mixed $value - * @param mixed $key - * - * @return array - */ - public static function prepend(array $array, $value, $key = null) - { - if (is_null($key)) { - array_unshift($array, $value); - } else { - $array = [$key => $value] + $array; - } - - return $array; - } - - /** - * Get a value from the array, and remove it. - * - * @param string $key - * @param mixed $default - * - * @return mixed - */ - public static function pull(array &$array, $key, $default = null) - { - $value = static::get($array, $key, $default); - - static::forget($array, $key); - - return $value; - } - - /** - * Get a 1 value from an array. - * - * @return mixed - * - * @throws \InvalidArgumentException - */ - public static function random(array $array, int $amount = null) - { - if (is_null($amount)) { - return $array[array_rand($array)]; - } - - $keys = array_rand($array, $amount); - - $results = []; - - foreach ((array) $keys as $key) { - $results[] = $array[$key]; - } - - return $results; - } - - /** - * Set an array item to a given value using "dot" notation. - * - * If no key is given to the method, the entire array will be replaced. - * - * @param mixed $value - * - * @return array - */ - public static function set(array &$array, string $key, $value) - { - $keys = explode('.', $key); - - while (count($keys) > 1) { - $key = array_shift($keys); - - // If the key doesn't exist at this depth, we will just create an empty array - // to hold the next value, allowing us to create the arrays to hold final - // values at the correct depth. Then we'll keep digging into the array. - if (!isset($array[$key]) || !is_array($array[$key])) { - $array[$key] = []; - } - - $array = &$array[$key]; - } - - $array[array_shift($keys)] = $value; - - return $array; - } - - /** - * Filter the array using the given callback. - * - * @return array - */ - public static function where(array $array, callable $callback) - { - return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); - } - - /** - * If the given value is not an array, wrap it in one. - * - * @param mixed $value - * - * @return array - */ - public static function wrap($value) - { - return !is_array($value) ? [$value] : $value; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/ArrayAccessible.php b/vendor/overtrue/wechat/src/Kernel/Support/ArrayAccessible.php deleted file mode 100644 index 72e0b04..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Support/ArrayAccessible.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Support; - -use ArrayAccess; -use ArrayIterator; -use EasyWeChat\Kernel\Contracts\Arrayable; -use IteratorAggregate; - -/** - * Class ArrayAccessible. - * - * @author overtrue - */ -class ArrayAccessible implements ArrayAccess, IteratorAggregate, Arrayable -{ - private $array; - - public function __construct(array $array = []) - { - $this->array = $array; - } - - public function offsetExists($offset) - { - return array_key_exists($offset, $this->array); - } - - public function offsetGet($offset) - { - return $this->array[$offset]; - } - - public function offsetSet($offset, $value) - { - if (null === $offset) { - $this->array[] = $value; - } else { - $this->array[$offset] = $value; - } - } - - public function offsetUnset($offset) - { - unset($this->array[$offset]); - } - - public function getIterator() - { - return new ArrayIterator($this->array); - } - - public function toArray() - { - return $this->array; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/Collection.php b/vendor/overtrue/wechat/src/Kernel/Support/Collection.php deleted file mode 100644 index f750e0b..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Support/Collection.php +++ /dev/null @@ -1,417 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Support; - -use ArrayAccess; -use ArrayIterator; -use Countable; -use EasyWeChat\Kernel\Contracts\Arrayable; -use IteratorAggregate; -use JsonSerializable; -use Serializable; - -/** - * Class Collection. - */ -class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable, Serializable, Arrayable -{ - /** - * The collection data. - * - * @var array - */ - protected $items = []; - - /** - * set data. - */ - public function __construct(array $items = []) - { - foreach ($items as $key => $value) { - $this->set($key, $value); - } - } - - /** - * Return all items. - * - * @return array - */ - public function all() - { - return $this->items; - } - - /** - * Return specific items. - * - * @return \EasyWeChat\Kernel\Support\Collection - */ - public function only(array $keys) - { - $return = []; - - foreach ($keys as $key) { - $value = $this->get($key); - - if (!is_null($value)) { - $return[$key] = $value; - } - } - - return new static($return); - } - - /** - * Get all items except for those with the specified keys. - * - * @param mixed $keys - * - * @return static - */ - public function except($keys) - { - $keys = is_array($keys) ? $keys : func_get_args(); - - return new static(Arr::except($this->items, $keys)); - } - - /** - * Merge data. - * - * @param Collection|array $items - * - * @return \EasyWeChat\Kernel\Support\Collection - */ - public function merge($items) - { - $clone = new static($this->all()); - - foreach ($items as $key => $value) { - $clone->set($key, $value); - } - - return $clone; - } - - /** - * To determine Whether the specified element exists. - * - * @param string $key - * - * @return bool - */ - public function has($key) - { - return !is_null(Arr::get($this->items, $key)); - } - - /** - * Retrieve the first item. - * - * @return mixed - */ - public function first() - { - return reset($this->items); - } - - /** - * Retrieve the last item. - * - * @return bool - */ - public function last() - { - $end = end($this->items); - - reset($this->items); - - return $end; - } - - /** - * add the item value. - * - * @param string $key - * @param mixed $value - */ - public function add($key, $value) - { - Arr::set($this->items, $key, $value); - } - - /** - * Set the item value. - * - * @param string $key - * @param mixed $value - */ - public function set($key, $value) - { - Arr::set($this->items, $key, $value); - } - - /** - * Retrieve item from Collection. - * - * @param string $key - * @param mixed $default - * - * @return mixed - */ - public function get($key, $default = null) - { - return Arr::get($this->items, $key, $default); - } - - /** - * Remove item form Collection. - * - * @param string $key - */ - public function forget($key) - { - Arr::forget($this->items, $key); - } - - /** - * Build to array. - * - * @return array - */ - public function toArray() - { - return $this->all(); - } - - /** - * Build to json. - * - * @param int $option - * - * @return string - */ - public function toJson($option = JSON_UNESCAPED_UNICODE) - { - return json_encode($this->all(), $option); - } - - /** - * To string. - * - * @return string - */ - public function __toString() - { - return $this->toJson(); - } - - /** - * (PHP 5 >= 5.4.0)
    - * Specify data which should be serialized to JSON. - * - * @see http://php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed data which can be serialized by json_encode, - * which is a value of any type other than a resource - */ - public function jsonSerialize() - { - return $this->items; - } - - /** - * (PHP 5 >= 5.1.0)
    - * String representation of object. - * - * @see http://php.net/manual/en/serializable.serialize.php - * - * @return string the string representation of the object or null - */ - public function serialize() - { - return serialize($this->items); - } - - /** - * (PHP 5 >= 5.0.0)
    - * Retrieve an external iterator. - * - * @see http://php.net/manual/en/iteratoraggregate.getiterator.php - * - * @return \ArrayIterator An instance of an object implementing Iterator or - * Traversable - */ - public function getIterator() - { - return new ArrayIterator($this->items); - } - - /** - * (PHP 5 >= 5.1.0)
    - * Count elements of an object. - * - * @see http://php.net/manual/en/countable.count.php - * - * @return int the custom count as an integer. - *

    - *

    - * The return value is cast to an integer - */ - public function count() - { - return count($this->items); - } - - /** - * (PHP 5 >= 5.1.0)
    - * Constructs the object. - * - * @see http://php.net/manual/en/serializable.unserialize.php - * - * @param string $serialized

    - * The string representation of the object. - *

    - * - * @return mixed|void - */ - public function unserialize($serialized) - { - return $this->items = unserialize($serialized); - } - - /** - * Get a data by key. - * - * @param string $key - * - * @return mixed - */ - public function __get($key) - { - return $this->get($key); - } - - /** - * Assigns a value to the specified data. - * - * @param string $key - * @param mixed $value - */ - public function __set($key, $value) - { - $this->set($key, $value); - } - - /** - * Whether or not an data exists by key. - * - * @param string $key - * - * @return bool - */ - public function __isset($key) - { - return $this->has($key); - } - - /** - * Unset an data by key. - * - * @param string $key - */ - public function __unset($key) - { - $this->forget($key); - } - - /** - * var_export. - * - * @return array - */ - public static function __set_state(array $properties) - { - return (new static($properties))->all(); - } - - /** - * (PHP 5 >= 5.0.0)
    - * Whether a offset exists. - * - * @see http://php.net/manual/en/arrayaccess.offsetexists.php - * - * @param mixed $offset

    - * An offset to check for. - *

    - * - * @return bool true on success or false on failure. - * The return value will be casted to boolean if non-boolean was returned - */ - public function offsetExists($offset) - { - return $this->has($offset); - } - - /** - * (PHP 5 >= 5.0.0)
    - * Offset to unset. - * - * @see http://php.net/manual/en/arrayaccess.offsetunset.php - * - * @param mixed $offset

    - * The offset to unset. - *

    - */ - public function offsetUnset($offset) - { - if ($this->offsetExists($offset)) { - $this->forget($offset); - } - } - - /** - * (PHP 5 >= 5.0.0)
    - * Offset to retrieve. - * - * @see http://php.net/manual/en/arrayaccess.offsetget.php - * - * @param mixed $offset

    - * The offset to retrieve. - *

    - * - * @return mixed Can return all value types - */ - public function offsetGet($offset) - { - return $this->offsetExists($offset) ? $this->get($offset) : null; - } - - /** - * (PHP 5 >= 5.0.0)
    - * Offset to set. - * - * @see http://php.net/manual/en/arrayaccess.offsetset.php - * - * @param mixed $offset

    - * The offset to assign the value to. - *

    - * @param mixed $value

    - * The value to set. - *

    - */ - public function offsetSet($offset, $value) - { - $this->set($offset, $value); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/File.php b/vendor/overtrue/wechat/src/Kernel/Support/File.php deleted file mode 100644 index b51b41d..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Support/File.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Support; - -use finfo; - -/** - * Class File. - */ -class File -{ - /** - * MIME mapping. - * - * @var array - */ - protected static $extensionMap = [ - 'audio/wav' => '.wav', - 'audio/x-ms-wma' => '.wma', - 'video/x-ms-wmv' => '.wmv', - 'video/mp4' => '.mp4', - 'audio/mpeg' => '.mp3', - 'audio/amr' => '.amr', - 'application/vnd.rn-realmedia' => '.rm', - 'audio/mid' => '.mid', - 'image/bmp' => '.bmp', - 'image/gif' => '.gif', - 'image/png' => '.png', - 'image/tiff' => '.tiff', - 'image/jpeg' => '.jpg', - 'application/pdf' => '.pdf', - - // 列举更多的文件 mime, 企业号是支持的,公众平台这边之后万一也更新了呢 - 'application/msword' => '.doc', - - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => '.docx', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => '.dotx', - 'application/vnd.ms-word.document.macroEnabled.12' => '.docm', - 'application/vnd.ms-word.template.macroEnabled.12' => '.dotm', - - 'application/vnd.ms-excel' => '.xls', - - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => '.xlsx', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => '.xltx', - 'application/vnd.ms-excel.sheet.macroEnabled.12' => '.xlsm', - 'application/vnd.ms-excel.template.macroEnabled.12' => '.xltm', - 'application/vnd.ms-excel.addin.macroEnabled.12' => '.xlam', - 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => '.xlsb', - - 'application/vnd.ms-powerpoint' => '.ppt', - - 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => '.pptx', - 'application/vnd.openxmlformats-officedocument.presentationml.template' => '.potx', - 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => '.ppsx', - 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => '.ppam', - ]; - - /** - * File header signatures. - * - * @var array - */ - protected static $signatures = [ - 'ffd8ff' => '.jpg', - '424d' => '.bmp', - '47494638' => '.gif', - '2f55736572732f6f7665' => '.png', - '89504e47' => '.png', - '494433' => '.mp3', - 'fffb' => '.mp3', - 'fff3' => '.mp3', - '3026b2758e66cf11' => '.wma', - '52494646' => '.wav', - '57415645' => '.wav', - '41564920' => '.avi', - '000001ba' => '.mpg', - '000001b3' => '.mpg', - '2321414d52' => '.amr', - '25504446' => '.pdf', - ]; - - /** - * Return steam extension. - * - * @param string $stream - * - * @return string|false - */ - public static function getStreamExt($stream) - { - $ext = self::getExtBySignature($stream); - - try { - if (empty($ext) && is_readable($stream)) { - $stream = file_get_contents($stream); - } - } catch (\Exception $e) { - } - - $fileInfo = new finfo(FILEINFO_MIME); - - $mime = strstr($fileInfo->buffer($stream), ';', true); - - return isset(self::$extensionMap[$mime]) ? self::$extensionMap[$mime] : $ext; - } - - /** - * Get file extension by file header signature. - * - * @param string $stream - * - * @return string - */ - public static function getExtBySignature($stream) - { - $prefix = strval(bin2hex(mb_strcut($stream, 0, 10))); - - foreach (self::$signatures as $signature => $extension) { - if (0 === strpos($prefix, strval($signature))) { - return $extension; - } - } - - return ''; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/Helpers.php b/vendor/overtrue/wechat/src/Kernel/Support/Helpers.php deleted file mode 100644 index 6f1db32..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Support/Helpers.php +++ /dev/null @@ -1,127 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Support; - -/* - * helpers. - * - * @author overtrue - */ - -/** - * Generate a signature. - * - * @param string $key - * @param string $encryptMethod - * - * @return string - */ -function generate_sign(array $attributes, $key, $encryptMethod = 'md5') -{ - ksort($attributes); - - $attributes['key'] = $key; - - return strtoupper(call_user_func_array($encryptMethod, [urldecode(http_build_query($attributes))])); -} - -/** - * @return \Closure|string - */ -function get_encrypt_method(string $signType, string $secretKey = '') -{ - if ('HMAC-SHA256' === $signType) { - return function ($str) use ($secretKey) { - return hash_hmac('sha256', $str, $secretKey); - }; - } - - return 'md5'; -} - -/** - * Get client ip. - * - * @return string - */ -function get_client_ip() -{ - if (!empty($_SERVER['REMOTE_ADDR'])) { - $ip = $_SERVER['REMOTE_ADDR']; - } else { - // for php-cli(phpunit etc.) - $ip = defined('PHPUNIT_RUNNING') ? '127.0.0.1' : gethostbyname(gethostname()); - } - - return filter_var($ip, FILTER_VALIDATE_IP) ?: '127.0.0.1'; -} - -/** - * Get current server ip. - * - * @return string - */ -function get_server_ip() -{ - if (!empty($_SERVER['SERVER_ADDR'])) { - $ip = $_SERVER['SERVER_ADDR']; - } elseif (!empty($_SERVER['SERVER_NAME'])) { - $ip = gethostbyname($_SERVER['SERVER_NAME']); - } else { - // for php-cli(phpunit etc.) - $ip = defined('PHPUNIT_RUNNING') ? '127.0.0.1' : gethostbyname(gethostname()); - } - - return filter_var($ip, FILTER_VALIDATE_IP) ?: '127.0.0.1'; -} - -/** - * Return current url. - * - * @return string - */ -function current_url() -{ - $protocol = 'http://'; - - if ((!empty($_SERVER['HTTPS']) && 'off' !== $_SERVER['HTTPS']) || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? 'http') === 'https') { - $protocol = 'https://'; - } - - return $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; -} - -/** - * Return random string. - * - * @param string $length - * - * @return string - */ -function str_random($length) -{ - return Str::random($length); -} - -/** - * @param string $content - * @param string $publicKey - * - * @return string - */ -function rsa_public_encrypt($content, $publicKey) -{ - $encrypted = ''; - openssl_public_encrypt($content, $encrypted, openssl_pkey_get_public($publicKey), OPENSSL_PKCS1_OAEP_PADDING); - - return base64_encode($encrypted); -} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/Str.php b/vendor/overtrue/wechat/src/Kernel/Support/Str.php deleted file mode 100644 index 3a51968..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Support/Str.php +++ /dev/null @@ -1,193 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Support; - -use EasyWeChat\Kernel\Exceptions\RuntimeException; - -/** - * Class Str. - */ -class Str -{ - /** - * The cache of snake-cased words. - * - * @var array - */ - protected static $snakeCache = []; - - /** - * The cache of camel-cased words. - * - * @var array - */ - protected static $camelCache = []; - - /** - * The cache of studly-cased words. - * - * @var array - */ - protected static $studlyCache = []; - - /** - * Convert a value to camel case. - * - * @param string $value - * - * @return string - */ - public static function camel($value) - { - if (isset(static::$camelCache[$value])) { - return static::$camelCache[$value]; - } - - return static::$camelCache[$value] = lcfirst(static::studly($value)); - } - - /** - * Generate a more truly "random" alpha-numeric string. - * - * @param int $length - * - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public static function random($length = 16) - { - $string = ''; - - while (($len = strlen($string)) < $length) { - $size = $length - $len; - - $bytes = static::randomBytes($size); - - $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size); - } - - return $string; - } - - /** - * Generate a more truly "random" bytes. - * - * @param int $length - * - * @return string - * - * @throws RuntimeException - * - * @codeCoverageIgnore - * - * @throws \Exception - */ - public static function randomBytes($length = 16) - { - if (function_exists('random_bytes')) { - $bytes = random_bytes($length); - } elseif (function_exists('openssl_random_pseudo_bytes')) { - $bytes = openssl_random_pseudo_bytes($length, $strong); - if (false === $bytes || false === $strong) { - throw new RuntimeException('Unable to generate random string.'); - } - } else { - throw new RuntimeException('OpenSSL extension is required for PHP 5 users.'); - } - - return $bytes; - } - - /** - * Generate a "random" alpha-numeric string. - * - * Should not be considered sufficient for cryptography, etc. - * - * @param int $length - * - * @return string - */ - public static function quickRandom($length = 16) - { - $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - - return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); - } - - /** - * Convert the given string to upper-case. - * - * @param string $value - * - * @return string - */ - public static function upper($value) - { - return mb_strtoupper($value); - } - - /** - * Convert the given string to title case. - * - * @param string $value - * - * @return string - */ - public static function title($value) - { - return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); - } - - /** - * Convert a string to snake case. - * - * @param string $value - * @param string $delimiter - * - * @return string - */ - public static function snake($value, $delimiter = '_') - { - $key = $value.$delimiter; - - if (isset(static::$snakeCache[$key])) { - return static::$snakeCache[$key]; - } - - if (!ctype_lower($value)) { - $value = strtolower(preg_replace('/(.)(?=[A-Z])/', '$1'.$delimiter, $value)); - } - - return static::$snakeCache[$key] = trim($value, '_'); - } - - /** - * Convert a value to studly caps case. - * - * @param string $value - * - * @return string - */ - public static function studly($value) - { - $key = $value; - - if (isset(static::$studlyCache[$key])) { - return static::$studlyCache[$key]; - } - - $value = ucwords(str_replace(['-', '_'], ' ', $value)); - - return static::$studlyCache[$key] = str_replace(' ', '', $value); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/XML.php b/vendor/overtrue/wechat/src/Kernel/Support/XML.php deleted file mode 100644 index b131892..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Support/XML.php +++ /dev/null @@ -1,166 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Support; - -use SimpleXMLElement; - -/** - * Class XML. - */ -class XML -{ - /** - * XML to array. - * - * @param string $xml XML string - * - * @return array - */ - public static function parse($xml) - { - $backup = libxml_disable_entity_loader(true); - - $result = self::normalize(simplexml_load_string(self::sanitize($xml), 'SimpleXMLElement', LIBXML_COMPACT | LIBXML_NOCDATA | LIBXML_NOBLANKS)); - - libxml_disable_entity_loader($backup); - - return $result; - } - - /** - * XML encode. - * - * @param mixed $data - * @param string $root - * @param string $item - * @param string $attr - * @param string $id - * - * @return string - */ - public static function build( - $data, - $root = 'xml', - $item = 'item', - $attr = '', - $id = 'id' - ) { - if (is_array($attr)) { - $_attr = []; - - foreach ($attr as $key => $value) { - $_attr[] = "{$key}=\"{$value}\""; - } - - $attr = implode(' ', $_attr); - } - - $attr = trim($attr); - $attr = empty($attr) ? '' : " {$attr}"; - $xml = "<{$root}{$attr}>"; - $xml .= self::data2Xml($data, $item, $id); - $xml .= ""; - - return $xml; - } - - /** - * Build CDATA. - * - * @param string $string - * - * @return string - */ - public static function cdata($string) - { - return sprintf('', $string); - } - - /** - * Object to array. - * - * @param SimpleXMLElement $obj - * - * @return array - */ - protected static function normalize($obj) - { - $result = null; - - if (is_object($obj)) { - $obj = (array) $obj; - } - - if (is_array($obj)) { - foreach ($obj as $key => $value) { - $res = self::normalize($value); - if (('@attributes' === $key) && ($key)) { - $result = $res; // @codeCoverageIgnore - } else { - $result[$key] = $res; - } - } - } else { - $result = $obj; - } - - return $result; - } - - /** - * Array to XML. - * - * @param array $data - * @param string $item - * @param string $id - * - * @return string - */ - protected static function data2Xml($data, $item = 'item', $id = 'id') - { - $xml = $attr = ''; - - foreach ($data as $key => $val) { - if (is_numeric($key)) { - $id && $attr = " {$id}=\"{$key}\""; - $key = $item; - } - - $xml .= "<{$key}{$attr}>"; - - if ((is_array($val) || is_object($val))) { - $xml .= self::data2Xml((array) $val, $item, $id); - } else { - $xml .= is_numeric($val) ? $val : self::cdata($val); - } - - $xml .= ""; - } - - return $xml; - } - - /** - * Delete invalid characters in XML. - * - * @see https://www.w3.org/TR/2008/REC-xml-20081126/#charsets - XML charset range - * @see http://php.net/manual/en/regexp.reference.escape.php - escape in UTF-8 mode - * - * @param string $xml - * - * @return string - */ - public static function sanitize($xml) - { - return preg_replace('/[^\x{9}\x{A}\x{D}\x{20}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]+/u', '', $xml); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/HasAttributes.php b/vendor/overtrue/wechat/src/Kernel/Traits/HasAttributes.php deleted file mode 100644 index 28dcf7a..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Traits/HasAttributes.php +++ /dev/null @@ -1,245 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Traits; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Support\Arr; -use EasyWeChat\Kernel\Support\Str; - -/** - * Trait Attributes. - */ -trait HasAttributes -{ - /** - * @var array - */ - protected $attributes = []; - - /** - * @var bool - */ - protected $snakeable = true; - - /** - * Set Attributes. - * - * @return $this - */ - public function setAttributes(array $attributes = []) - { - $this->attributes = $attributes; - - return $this; - } - - /** - * Set attribute. - * - * @param string $attribute - * @param string $value - * - * @return $this - */ - public function setAttribute($attribute, $value) - { - Arr::set($this->attributes, $attribute, $value); - - return $this; - } - - /** - * Get attribute. - * - * @param string $attribute - * @param mixed $default - * - * @return mixed - */ - public function getAttribute($attribute, $default = null) - { - return Arr::get($this->attributes, $attribute, $default); - } - - /** - * @param string $attribute - * - * @return bool - */ - public function isRequired($attribute) - { - return in_array($attribute, $this->getRequired(), true); - } - - /** - * @return array|mixed - */ - public function getRequired() - { - return property_exists($this, 'required') ? $this->required : []; - } - - /** - * Set attribute. - * - * @param string $attribute - * @param mixed $value - * - * @return $this - */ - public function with($attribute, $value) - { - $this->snakeable && $attribute = Str::snake($attribute); - - $this->setAttribute($attribute, $value); - - return $this; - } - - /** - * Override parent set() method. - * - * @param string $attribute - * @param mixed $value - * - * @return $this - */ - public function set($attribute, $value) - { - $this->setAttribute($attribute, $value); - - return $this; - } - - /** - * Override parent get() method. - * - * @param string $attribute - * @param mixed $default - * - * @return mixed - */ - public function get($attribute, $default = null) - { - return $this->getAttribute($attribute, $default); - } - - /** - * @return bool - */ - public function has(string $key) - { - return Arr::has($this->attributes, $key); - } - - /** - * @return $this - */ - public function merge(array $attributes) - { - $this->attributes = array_merge($this->attributes, $attributes); - - return $this; - } - - /** - * @param array|string $keys - * - * @return array - */ - public function only($keys) - { - return Arr::only($this->attributes, $keys); - } - - /** - * Return all items. - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function all() - { - $this->checkRequiredAttributes(); - - return $this->attributes; - } - - /** - * Magic call. - * - * @param string $method - * @param array $args - * - * @return $this - */ - public function __call($method, $args) - { - if (0 === stripos($method, 'with')) { - return $this->with(substr($method, 4), array_shift($args)); - } - - throw new \BadMethodCallException(sprintf('Method "%s" does not exists.', $method)); - } - - /** - * Magic get. - * - * @param string $property - * - * @return mixed - */ - public function __get($property) - { - return $this->get($property); - } - - /** - * Magic set. - * - * @param string $property - * @param mixed $value - * - * @return $this - */ - public function __set($property, $value) - { - return $this->with($property, $value); - } - - /** - * Whether or not an data exists by key. - * - * @param string $key - * - * @return bool - */ - public function __isset($key) - { - return isset($this->attributes[$key]); - } - - /** - * Check required attributes. - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function checkRequiredAttributes() - { - foreach ($this->getRequired() as $attribute) { - if (is_null($this->get($attribute))) { - throw new InvalidArgumentException(sprintf('"%s" cannot be empty.', $attribute)); - } - } - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/HasHttpRequests.php b/vendor/overtrue/wechat/src/Kernel/Traits/HasHttpRequests.php deleted file mode 100644 index 1d05e2a..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Traits/HasHttpRequests.php +++ /dev/null @@ -1,211 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Traits; - -use GuzzleHttp\Client; -use GuzzleHttp\ClientInterface; -use GuzzleHttp\HandlerStack; -use Psr\Http\Message\ResponseInterface; - -/** - * Trait HasHttpRequests. - * - * @author overtrue - */ -trait HasHttpRequests -{ - use ResponseCastable; - - /** - * @var \GuzzleHttp\ClientInterface - */ - protected $httpClient; - - /** - * @var array - */ - protected $middlewares = []; - - /** - * @var \GuzzleHttp\HandlerStack - */ - protected $handlerStack; - - /** - * @var array - */ - protected static $defaults = [ - 'curl' => [ - CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4, - ], - ]; - - /** - * Set guzzle default settings. - * - * @param array $defaults - */ - public static function setDefaultOptions($defaults = []) - { - self::$defaults = $defaults; - } - - /** - * Return current guzzle default settings. - */ - public static function getDefaultOptions(): array - { - return self::$defaults; - } - - /** - * Set GuzzleHttp\Client. - * - * @return $this - */ - public function setHttpClient(ClientInterface $httpClient) - { - $this->httpClient = $httpClient; - - return $this; - } - - /** - * Return GuzzleHttp\ClientInterface instance. - */ - public function getHttpClient(): ClientInterface - { - if (!($this->httpClient instanceof ClientInterface)) { - if (property_exists($this, 'app') && $this->app['http_client']) { - $this->httpClient = $this->app['http_client']; - } else { - $this->httpClient = new Client(['handler' => HandlerStack::create($this->getGuzzleHandler())]); - } - } - - return $this->httpClient; - } - - /** - * Add a middleware. - * - * @param string $name - * - * @return $this - */ - public function pushMiddleware(callable $middleware, string $name = null) - { - if (!is_null($name)) { - $this->middlewares[$name] = $middleware; - } else { - array_push($this->middlewares, $middleware); - } - - return $this; - } - - /** - * Return all middlewares. - */ - public function getMiddlewares(): array - { - return $this->middlewares; - } - - /** - * Make a request. - * - * @param string $url - * @param string $method - * @param array $options - * - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function request($url, $method = 'GET', $options = []): ResponseInterface - { - $method = strtoupper($method); - - $options = array_merge(self::$defaults, $options, ['handler' => $this->getHandlerStack()]); - - $options = $this->fixJsonIssue($options); - - if (property_exists($this, 'baseUri') && !is_null($this->baseUri)) { - $options['base_uri'] = $this->baseUri; - } - - $response = $this->getHttpClient()->request($method, $url, $options); - $response->getBody()->rewind(); - - return $response; - } - - /** - * @return $this - */ - public function setHandlerStack(HandlerStack $handlerStack) - { - $this->handlerStack = $handlerStack; - - return $this; - } - - /** - * Build a handler stack. - */ - public function getHandlerStack(): HandlerStack - { - if ($this->handlerStack) { - return $this->handlerStack; - } - - $this->handlerStack = HandlerStack::create($this->getGuzzleHandler()); - - foreach ($this->middlewares as $name => $middleware) { - $this->handlerStack->push($middleware, $name); - } - - return $this->handlerStack; - } - - protected function fixJsonIssue(array $options): array - { - if (isset($options['json']) && is_array($options['json'])) { - $options['headers'] = array_merge($options['headers'] ?? [], ['Content-Type' => 'application/json']); - - if (empty($options['json'])) { - $options['body'] = \GuzzleHttp\json_encode($options['json'], JSON_FORCE_OBJECT); - } else { - $options['body'] = \GuzzleHttp\json_encode($options['json'], JSON_UNESCAPED_UNICODE); - } - - unset($options['json']); - } - - return $options; - } - - /** - * Get guzzle handler. - * - * @return callable - */ - protected function getGuzzleHandler() - { - if (property_exists($this, 'app') && isset($this->app['guzzle_handler'])) { - return is_string($handler = $this->app->raw('guzzle_handler')) - ? new $handler() - : $handler; - } - - return \GuzzleHttp\choose_handler(); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/InteractsWithCache.php b/vendor/overtrue/wechat/src/Kernel/Traits/InteractsWithCache.php deleted file mode 100644 index ab26fe6..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Traits/InteractsWithCache.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Traits; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\ServiceContainer; -use Psr\Cache\CacheItemPoolInterface; -use Psr\SimpleCache\CacheInterface as SimpleCacheInterface; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Psr16Cache; -use Symfony\Component\Cache\Simple\FilesystemCache; - -/** - * Trait InteractsWithCache. - * - * @author overtrue - */ -trait InteractsWithCache -{ - /** - * @var \Psr\SimpleCache\CacheInterface - */ - protected $cache; - - /** - * Get cache instance. - * - * @return \Psr\SimpleCache\CacheInterface - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function getCache() - { - if ($this->cache) { - return $this->cache; - } - - if (property_exists($this, 'app') && $this->app instanceof ServiceContainer && isset($this->app['cache'])) { - $this->setCache($this->app['cache']); - - // Fix PHPStan error - assert($this->cache instanceof \Psr\SimpleCache\CacheInterface); - - return $this->cache; - } - - return $this->cache = $this->createDefaultCache(); - } - - /** - * Set cache instance. - * - * @param \Psr\SimpleCache\CacheInterface|\Psr\Cache\CacheItemPoolInterface $cache - * - * @return $this - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function setCache($cache) - { - if (empty(\array_intersect([SimpleCacheInterface::class, CacheItemPoolInterface::class], \class_implements($cache)))) { - throw new InvalidArgumentException(\sprintf('The cache instance must implements %s or %s interface.', SimpleCacheInterface::class, CacheItemPoolInterface::class)); - } - - if ($cache instanceof CacheItemPoolInterface) { - if (!$this->isSymfony43OrHigher()) { - throw new InvalidArgumentException(sprintf('The cache instance must implements %s', SimpleCacheInterface::class)); - } - $cache = new Psr16Cache($cache); - } - - $this->cache = $cache; - - return $this; - } - - /** - * @return \Psr\SimpleCache\CacheInterface - */ - protected function createDefaultCache() - { - if ($this->isSymfony43OrHigher()) { - return new Psr16Cache(new FilesystemAdapter('easywechat', 1500)); - } - - return new FilesystemCache(); - } - - protected function isSymfony43OrHigher(): bool - { - return \class_exists('Symfony\Component\Cache\Psr16Cache'); - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/Observable.php b/vendor/overtrue/wechat/src/Kernel/Traits/Observable.php deleted file mode 100644 index 668d490..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Traits/Observable.php +++ /dev/null @@ -1,278 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Traits; - -use EasyWeChat\Kernel\Clauses\Clause; -use EasyWeChat\Kernel\Contracts\EventHandlerInterface; -use EasyWeChat\Kernel\Decorators\FinallyResult; -use EasyWeChat\Kernel\Decorators\TerminateResult; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Trait Observable. - * - * @author overtrue - */ -trait Observable -{ - /** - * @var array - */ - protected $handlers = []; - - /** - * @var array - */ - protected $clauses = []; - - /** - * @param \Closure|EventHandlerInterface|callable|string $handler - * @param \Closure|EventHandlerInterface|callable|string $condition - * - * @return \EasyWeChat\Kernel\Clauses\Clause - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \ReflectionException - */ - public function push($handler, $condition = '*') - { - list($handler, $condition) = $this->resolveHandlerAndCondition($handler, $condition); - - if (!isset($this->handlers[$condition])) { - $this->handlers[$condition] = []; - } - - array_push($this->handlers[$condition], $handler); - - return $this->newClause($handler); - } - - /** - * @return $this - */ - public function setHandlers(array $handlers = []) - { - $this->handlers = $handlers; - - return $this; - } - - /** - * @param \Closure|EventHandlerInterface|string $handler - * @param \Closure|EventHandlerInterface|string $condition - * - * @return \EasyWeChat\Kernel\Clauses\Clause - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \ReflectionException - */ - public function unshift($handler, $condition = '*') - { - list($handler, $condition) = $this->resolveHandlerAndCondition($handler, $condition); - - if (!isset($this->handlers[$condition])) { - $this->handlers[$condition] = []; - } - - array_unshift($this->handlers[$condition], $handler); - - return $this->newClause($handler); - } - - /** - * @param string $condition - * @param \Closure|EventHandlerInterface|string $handler - * - * @return \EasyWeChat\Kernel\Clauses\Clause - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \ReflectionException - */ - public function observe($condition, $handler) - { - return $this->push($handler, $condition); - } - - /** - * @param string $condition - * @param \Closure|EventHandlerInterface|string $handler - * - * @return \EasyWeChat\Kernel\Clauses\Clause - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \ReflectionException - */ - public function on($condition, $handler) - { - return $this->push($handler, $condition); - } - - /** - * @param string|int $event - * @param mixed ...$payload - * - * @return mixed|null - */ - public function dispatch($event, $payload) - { - return $this->notify($event, $payload); - } - - /** - * @param string|int $event - * @param mixed ...$payload - * - * @return mixed|null - */ - public function notify($event, $payload) - { - $result = null; - - foreach ($this->handlers as $condition => $handlers) { - if ('*' === $condition || ($condition & $event) === $event) { - foreach ($handlers as $handler) { - if ($clause = $this->clauses[$this->getHandlerHash($handler)] ?? null) { - if ($clause->intercepted($payload)) { - continue; - } - } - - $response = $this->callHandler($handler, $payload); - - switch (true) { - case $response instanceof TerminateResult: - return $response->content; - case true === $response: - continue 2; - case false === $response: - break 2; - case !empty($response) && !($result instanceof FinallyResult): - $result = $response; - } - } - } - } - - return $result instanceof FinallyResult ? $result->content : $result; - } - - /** - * @return array - */ - public function getHandlers() - { - return $this->handlers; - } - - /** - * @param mixed $handler - */ - protected function newClause($handler): Clause - { - return $this->clauses[$this->getHandlerHash($handler)] = new Clause(); - } - - /** - * @param mixed $handler - * - * @return string - */ - protected function getHandlerHash($handler) - { - if (is_string($handler)) { - return $handler; - } - - if (is_array($handler)) { - return is_string($handler[0]) - ? $handler[0].'::'.$handler[1] - : get_class($handler[0]).$handler[1]; - } - - return spl_object_hash($handler); - } - - /** - * @param mixed $payload - * - * @return mixed - */ - protected function callHandler(callable $handler, $payload) - { - try { - return call_user_func_array($handler, [$payload]); - } catch (\Exception $e) { - if (property_exists($this, 'app') && $this->app instanceof ServiceContainer) { - $this->app['logger']->error($e->getCode().': '.$e->getMessage(), [ - 'code' => $e->getCode(), - 'message' => $e->getMessage(), - 'file' => $e->getFile(), - 'line' => $e->getLine(), - ]); - } - } - } - - /** - * @param mixed $handler - * - * @return \Closure - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \ReflectionException - */ - protected function makeClosure($handler) - { - if (is_callable($handler)) { - return $handler; - } - - if (is_string($handler) && '*' !== $handler) { - if (!class_exists($handler)) { - throw new InvalidArgumentException(sprintf('Class "%s" not exists.', $handler)); - } - - if (!in_array(EventHandlerInterface::class, (new \ReflectionClass($handler))->getInterfaceNames(), true)) { - throw new InvalidArgumentException(sprintf('Class "%s" not an instance of "%s".', $handler, EventHandlerInterface::class)); - } - - return function ($payload) use ($handler) { - return (new $handler($this->app ?? null))->handle($payload); - }; - } - - if ($handler instanceof EventHandlerInterface) { - return function () use ($handler) { - return $handler->handle(...func_get_args()); - }; - } - - throw new InvalidArgumentException('No valid handler is found in arguments.'); - } - - /** - * @param mixed $handler - * @param mixed $condition - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \ReflectionException - */ - protected function resolveHandlerAndCondition($handler, $condition): array - { - if (is_int($handler) || (is_string($handler) && !class_exists($handler))) { - list($handler, $condition) = [$condition, $handler]; - } - - return [$this->makeClosure($handler), $condition]; - } -} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/ResponseCastable.php b/vendor/overtrue/wechat/src/Kernel/Traits/ResponseCastable.php deleted file mode 100644 index 504b5ea..0000000 --- a/vendor/overtrue/wechat/src/Kernel/Traits/ResponseCastable.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Kernel\Traits; - -use EasyWeChat\Kernel\Contracts\Arrayable; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Exceptions\InvalidConfigException; -use EasyWeChat\Kernel\Http\Response; -use EasyWeChat\Kernel\Support\Collection; -use Psr\Http\Message\ResponseInterface; - -/** - * Trait ResponseCastable. - * - * @author overtrue - */ -trait ResponseCastable -{ - /** - * @param string|null $type - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - protected function castResponseToType(ResponseInterface $response, $type = null) - { - $response = Response::buildFromPsrResponse($response); - $response->getBody()->rewind(); - - switch ($type ?? 'array') { - case 'collection': - return $response->toCollection(); - case 'array': - return $response->toArray(); - case 'object': - return $response->toObject(); - case 'raw': - return $response; - default: - if (!is_subclass_of($type, Arrayable::class)) { - throw new InvalidConfigException(sprintf('Config key "response_type" classname must be an instanceof %s', Arrayable::class)); - } - - return new $type($response); - } - } - - /** - * @param mixed $response - * @param string|null $type - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - protected function detectAndCastResponseToType($response, $type = null) - { - switch (true) { - case $response instanceof ResponseInterface: - $response = Response::buildFromPsrResponse($response); - - break; - case $response instanceof Arrayable: - $response = new Response(200, [], json_encode($response->toArray())); - - break; - case ($response instanceof Collection) || is_array($response) || is_object($response): - $response = new Response(200, [], json_encode($response)); - - break; - case is_scalar($response): - $response = new Response(200, [], (string) $response); - - break; - default: - throw new InvalidArgumentException(sprintf('Unsupported response type "%s"', gettype($response))); - } - - return $this->castResponseToType($response, $type); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Application.php b/vendor/overtrue/wechat/src/MicroMerchant/Application.php deleted file mode 100644 index 2d5976c..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Application.php +++ /dev/null @@ -1,168 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\ServiceContainer; -use EasyWeChat\Kernel\Support; -use EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException; - -/** - * Class Application. - * - * @author liuml - * - * @property \EasyWeChat\MicroMerchant\Certficates\Client $certficates - * @property \EasyWeChat\MicroMerchant\Material\Client $material - * @property \EasyWeChat\MicroMerchant\MerchantConfig\Client $merchantConfig - * @property \EasyWeChat\MicroMerchant\Withdraw\Client $withdraw - * @property \EasyWeChat\MicroMerchant\Media\Client $media - * - * @method mixed submitApplication(array $params) - * @method mixed getStatus(string $applymentId, string $businessCode = '') - * @method mixed upgrade(array $params) - * @method mixed getUpgradeStatus(string $subMchId = '') - */ -class Application extends ServiceContainer -{ - /** - * @var array - */ - protected $providers = [ - // Base services - Base\ServiceProvider::class, - Certficates\ServiceProvider::class, - MerchantConfig\ServiceProvider::class, - Material\ServiceProvider::class, - Withdraw\ServiceProvider::class, - Media\ServiceProvider::class, - ]; - - /** - * @var array - */ - protected $defaultConfig = [ - 'http' => [ - 'base_uri' => 'https://api.mch.weixin.qq.com/', - ], - 'log' => [ - 'default' => 'dev', // 默认使用的 channel,生产环境可以改为下面的 prod - 'channels' => [ - // 测试环境 - 'dev' => [ - 'driver' => 'single', - 'path' => '/tmp/easywechat.log', - 'level' => 'debug', - ], - // 生产环境 - 'prod' => [ - 'driver' => 'daily', - 'path' => '/tmp/easywechat.log', - 'level' => 'info', - ], - ], - ], - ]; - - /** - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function getKey() - { - $key = $this['config']->key; - - if (empty($key)) { - throw new InvalidArgumentException('config key connot be empty.'); - } - - if (32 !== strlen($key)) { - throw new InvalidArgumentException(sprintf("'%s' should be 32 chars length.", $key)); - } - - return $key; - } - - /** - * set sub-mch-id and appid. - * - * @param string $subMchId Identification Number of Small and Micro Businessmen Reported by Service Providers - * @param string $appId Public Account ID of Service Provider - * - * @return $this - */ - public function setSubMchId(string $subMchId, string $appId = '') - { - $this['config']->set('sub_mch_id', $subMchId); - if ($appId) { - $this['config']->set('appid', $appId); - } - - return $this; - } - - /** - * setCertificate. - * - * @return $this - */ - public function setCertificate(string $certificate, string $serialNo) - { - $this['config']->set('certificate', $certificate); - $this['config']->set('serial_no', $serialNo); - - return $this; - } - - /** - * Returning true indicates that the verification is successful, - * returning false indicates that the signature field does not exist or is empty, - * and if the signature verification is wrong, the InvalidSignException will be thrown directly. - * - * @return bool - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException - */ - public function verifySignature(array $data) - { - if (!isset($data['sign']) || empty($data['sign'])) { - return false; - } - - $sign = $data['sign']; - unset($data['sign']); - - $signType = strlen($sign) > 32 ? 'HMAC-SHA256' : 'MD5'; - $secretKey = $this->getKey(); - - $encryptMethod = Support\get_encrypt_method($signType, $secretKey); - - if (Support\generate_sign($data, $secretKey, $encryptMethod) === $sign) { - return true; - } - - throw new InvalidSignException('return value signature verification error'); - } - - /** - * @param string $name - * @param array $arguments - * - * @return mixed - */ - public function __call($name, $arguments) - { - return call_user_func_array([$this['base'], $name], $arguments); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Base/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Base/Client.php deleted file mode 100644 index 3493649..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Base/Client.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Base; - -use EasyWeChat\MicroMerchant\Kernel\BaseClient; - -/** - * Class Client. - * - * @author liuml - * @DateTime 2019-05-30 14:19 - */ -class Client extends BaseClient -{ - /** - * apply to settle in to become a small micro merchant. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function submitApplication(array $params) - { - $params = $this->processParams(array_merge($params, [ - 'version' => '3.0', - 'cert_sn' => '', - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - ])); - - return $this->safeRequest('applyment/micro/submit', $params); - } - - /** - * query application status. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getStatus(string $applymentId, string $businessCode = '') - { - if (!empty($applymentId)) { - $params = [ - 'applyment_id' => $applymentId, - ]; - } else { - $params = [ - 'business_code' => $businessCode, - ]; - } - - $params = array_merge($params, [ - 'version' => '1.0', - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - ]); - - return $this->safeRequest('applyment/micro/getstate', $params); - } - - /** - * merchant upgrade api. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function upgrade(array $params) - { - $params['sub_mch_id'] = $params['sub_mch_id'] ?? $this->app['config']->sub_mch_id; - $params = $this->processParams(array_merge($params, [ - 'version' => '1.0', - 'cert_sn' => '', - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - ])); - - return $this->safeRequest('applyment/micro/submitupgrade', $params); - } - - /** - * get upgrade status. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getUpgradeStatus(string $subMchId = '') - { - return $this->safeRequest('applyment/micro/getupgradestate', [ - 'version' => '1.0', - 'sign_type' => 'HMAC-SHA256', - 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, - 'nonce_str' => uniqid('micro'), - ]); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Base/ServiceProvider.php deleted file mode 100644 index db2f056..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Base/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Base; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['base'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Certficates/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Certficates/Client.php deleted file mode 100644 index 2b09145..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Certficates/Client.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Certficates; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\MicroMerchant\Kernel\BaseClient; -use EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidExtensionException; - -/** - * Class Client. - * - * @author liuml - * @DateTime 2019-05-30 14:19 - */ -class Client extends BaseClient -{ - /** - * get certficates. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidExtensionException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(bool $returnRaw = false) - { - $params = [ - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - ]; - - if (true === $returnRaw) { - return $this->requestRaw('risk/getcertficates', $params); - } - /** @var array $response */ - $response = $this->requestArray('risk/getcertficates', $params); - - if ('SUCCESS' !== $response['return_code']) { - throw new InvalidArgumentException(sprintf('Failed to get certificate. return_code_msg: "%s" .', $response['return_code'].'('.$response['return_msg'].')')); - } - if ('SUCCESS' !== $response['result_code']) { - throw new InvalidArgumentException(sprintf('Failed to get certificate. result_err_code_desc: "%s" .', $response['result_code'].'('.$response['err_code'].'['.$response['err_code_desc'].'])')); - } - $certificates = \GuzzleHttp\json_decode($response['certificates'], true)['data'][0]; - $ciphertext = $this->decrypt($certificates['encrypt_certificate']); - unset($certificates['encrypt_certificate']); - $certificates['certificates'] = $ciphertext; - - return $certificates; - } - - /** - * decrypt ciphertext. - * - * @return string - * - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidExtensionException - */ - public function decrypt(array $encryptCertificate) - { - if (false === extension_loaded('sodium')) { - throw new InvalidExtensionException('sodium extension is not installed,Reference link https://php.net/manual/zh/book.sodium.php'); - } - - if (false === sodium_crypto_aead_aes256gcm_is_available()) { - throw new InvalidExtensionException('aes256gcm is not currently supported'); - } - - // sodium_crypto_aead_aes256gcm_decrypt function needs to open libsodium extension. - // https://www.php.net/manual/zh/function.sodium-crypto-aead-aes256gcm-decrypt.php - return sodium_crypto_aead_aes256gcm_decrypt( - base64_decode($encryptCertificate['ciphertext'], true), - $encryptCertificate['associated_data'], - $encryptCertificate['nonce'], - $this->app['config']->apiv3_key - ); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Certficates/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Certficates/ServiceProvider.php deleted file mode 100644 index 2e88b7e..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Certficates/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Certficates; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['certficates'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/BaseClient.php b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/BaseClient.php deleted file mode 100644 index fa1e796..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/BaseClient.php +++ /dev/null @@ -1,241 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Kernel; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Support; -use EasyWeChat\MicroMerchant\Application; -use EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException; -use EasyWeChat\Payment\Kernel\BaseClient as PaymentBaseClient; - -/** - * Class BaseClient. - * - * @author liuml - * @DateTime 2019-07-10 12:06 - */ -class BaseClient extends PaymentBaseClient -{ - /** - * @var string - */ - protected $certificates; - - /** - * BaseClient constructor. - */ - public function __construct(Application $app) - { - $this->app = $app; - - $this->setHttpClient($this->app['http_client']); - } - - /** - * Extra request params. - * - * @return array - */ - protected function prepends() - { - return []; - } - - /** - * httpUpload. - * - * @param bool $returnResponse - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function httpUpload(string $url, array $files = [], array $form = [], array $query = [], $returnResponse = false) - { - $multipart = []; - - foreach ($files as $name => $path) { - $multipart[] = [ - 'name' => $name, - 'contents' => fopen($path, 'r'), - ]; - } - - $base = [ - 'mch_id' => $this->app['config']['mch_id'], - ]; - - $form = array_merge($base, $form); - - $form['sign'] = $this->getSign($form); - - foreach ($form as $name => $contents) { - $multipart[] = compact('name', 'contents'); - } - - $options = [ - 'query' => $query, - 'multipart' => $multipart, - 'connect_timeout' => 30, - 'timeout' => 30, - 'read_timeout' => 30, - 'cert' => $this->app['config']->get('cert_path'), - 'ssl_key' => $this->app['config']->get('key_path'), - ]; - - $this->pushMiddleware($this->logMiddleware(), 'log'); - - $response = $this->performRequest($url, 'POST', $options); - - $result = $returnResponse ? $response : $this->castResponseToType($response, $this->app->config->get('response_type')); - // auto verify signature - if ($returnResponse || 'array' !== ($this->app->config->get('response_type') ?? 'array')) { - $this->app->verifySignature($this->castResponseToType($response, 'array')); - } else { - $this->app->verifySignature($result); - } - - return $result; - } - - /** - * request. - * - * @param string $method - * @param bool $returnResponse - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function request(string $endpoint, array $params = [], $method = 'post', array $options = [], $returnResponse = false) - { - $base = [ - 'mch_id' => $this->app['config']['mch_id'], - ]; - - $params = array_merge($base, $this->prepends(), $params); - $params['sign'] = $this->getSign($params); - $options = array_merge([ - 'body' => Support\XML::build($params), - ], $options); - - $this->pushMiddleware($this->logMiddleware(), 'log'); - $response = $this->performRequest($endpoint, $method, $options); - $result = $returnResponse ? $response : $this->castResponseToType($response, $this->app->config->get('response_type')); - // auto verify signature - if ($returnResponse || 'array' !== ($this->app->config->get('response_type') ?? 'array')) { - $this->app->verifySignature($this->castResponseToType($response, 'array')); - } else { - $this->app->verifySignature($result); - } - - return $result; - } - - /** - * processing parameters contain fields that require sensitive information encryption. - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException - */ - protected function processParams(array $params) - { - $serial_no = $this->app['config']->get('serial_no'); - if (null === $serial_no) { - throw new InvalidArgumentException('config serial_no connot be empty.'); - } - - $params['cert_sn'] = $serial_no; - $sensitive_fields = $this->getSensitiveFieldsName(); - foreach ($params as $k => $v) { - if (in_array($k, $sensitive_fields, true)) { - $params[$k] = $this->encryptSensitiveInformation($v); - } - } - - return $params; - } - - /** - * To id card, mobile phone number and other fields sensitive information encryption. - * - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException - */ - protected function encryptSensitiveInformation(string $string) - { - $certificates = $this->app['config']->get('certificate'); - if (null === $certificates) { - throw new InvalidArgumentException('config certificate connot be empty.'); - } - - $encrypted = ''; - $publicKeyResource = openssl_get_publickey($certificates); - $f = openssl_public_encrypt($string, $encrypted, $publicKeyResource); - openssl_free_key($publicKeyResource); - if ($f) { - return base64_encode($encrypted); - } - - throw new EncryptException('Encryption of sensitive information failed'); - } - - /** - * get sensitive fields name. - * - * @return array - */ - protected function getSensitiveFieldsName() - { - return [ - 'id_card_name', - 'id_card_number', - 'account_name', - 'account_number', - 'contact', - 'contact_phone', - 'contact_email', - 'legal_person', - 'mobile_phone', - 'email', - ]; - } - - /** - * getSign. - * - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function getSign(array $params) - { - $params = array_filter($params); - - $key = $this->app->getKey(); - - $encryptMethod = Support\get_encrypt_method(Support\Arr::get($params, 'sign_type', 'MD5'), $key); - - return Support\generate_sign($params, $key, $encryptMethod); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/EncryptException.php b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/EncryptException.php deleted file mode 100644 index dd874ae..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/EncryptException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Kernel\Exceptions; - -use EasyWeChat\Kernel\Exceptions\Exception; - -/** - * Class EncryptException. - * - * @author liuml - */ -class EncryptException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidExtensionException.php b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidExtensionException.php deleted file mode 100644 index 41e21cf..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidExtensionException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Kernel\Exceptions; - -use EasyWeChat\Kernel\Exceptions\Exception; - -/** - * Class InvalidExtensionException. - * - * @author liuml - */ -class InvalidExtensionException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidSignException.php b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidSignException.php deleted file mode 100644 index d09d92b..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidSignException.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Kernel\Exceptions; - -use EasyWeChat\Kernel\Exceptions\Exception; - -/** - * Class InvalidSignException. - * - * @author liuml - */ -class InvalidSignException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Material/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Material/Client.php deleted file mode 100644 index eb7a0d8..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Material/Client.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Material; - -use EasyWeChat\MicroMerchant\Kernel\BaseClient; - -/** - * Class Client. - * - * @author liuml - * @DateTime 2019-05-30 14:19 - */ -class Client extends BaseClient -{ - /** - * update settlement card. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setSettlementCard(array $params) - { - $params['sub_mch_id'] = $params['sub_mch_id'] ?? $this->app['config']->sub_mch_id; - $params = $this->processParams(array_merge($params, [ - 'version' => '1.0', - 'cert_sn' => '', - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - ])); - - return $this->safeRequest('applyment/micro/modifyarchives', $params); - } - - /** - * update contact info. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateContact(array $params) - { - $params['sub_mch_id'] = $params['sub_mch_id'] ?? $this->app['config']->sub_mch_id; - $params = $this->processParams(array_merge($params, [ - 'version' => '1.0', - 'cert_sn' => '', - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - ])); - - return $this->safeRequest('applyment/micro/modifycontactinfo', $params); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Material/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Material/ServiceProvider.php deleted file mode 100644 index dec5af7..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Material/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Material; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['material'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Media/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Media/Client.php deleted file mode 100644 index 7d8e83c..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Media/Client.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Media; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\MicroMerchant\Kernel\BaseClient; - -/** - * Class Client. - * - * @author liuml - * @DateTime 2019-06-10 14:50 - */ -class Client extends BaseClient -{ - /** - * Upload material. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException - */ - public function upload(string $path) - { - if (!file_exists($path) || !is_readable($path)) { - throw new InvalidArgumentException(sprintf("File does not exist, or the file is unreadable: '%s'", $path)); - } - - $form = [ - 'media_hash' => strtolower(md5_file($path)), - 'sign_type' => 'HMAC-SHA256', - ]; - - return $this->httpUpload('secapi/mch/uploadmedia', ['media' => $path], $form); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Media/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Media/ServiceProvider.php deleted file mode 100644 index 9d46a84..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Media/ServiceProvider.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -/** - * ServiceProvider.php. - * - * This file is part of the wechat. - * - * (c) overtrue - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Media; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['media'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/Client.php deleted file mode 100644 index e72cc91..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/Client.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\MerchantConfig; - -use EasyWeChat\MicroMerchant\Kernel\BaseClient; - -/** - * Class Client. - * - * @author liuml - * @DateTime 2019-05-30 14:19 - */ -class Client extends BaseClient -{ - /** - * Service providers configure recommendation functions for small and micro businesses. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setFollowConfig(string $subAppId, string $subscribeAppId, string $receiptAppId = '', string $subMchId = '') - { - $params = [ - 'sub_appid' => $subAppId, - 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, - ]; - - if (!empty($subscribeAppId)) { - $params['subscribe_appid'] = $subscribeAppId; - } else { - $params['receipt_appid'] = $receiptAppId; - } - - return $this->safeRequest('secapi/mkt/addrecommendconf', array_merge($params, [ - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - ])); - } - - /** - * Configure the new payment directory. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function addPath(string $jsapiPath, string $appId = '', string $subMchId = '') - { - return $this->addConfig([ - 'appid' => $appId ?: $this->app['config']->appid, - 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, - 'jsapi_path' => $jsapiPath, - ]); - } - - /** - * bind appid. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function bindAppId(string $subAppId, string $appId = '', string $subMchId = '') - { - return $this->addConfig([ - 'appid' => $appId ?: $this->app['config']->appid, - 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, - 'sub_appid' => $subAppId, - ]); - } - - /** - * add sub dev config. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - private function addConfig(array $params) - { - return $this->safeRequest('secapi/mch/addsubdevconfig', $params); - } - - /** - * query Sub Dev Config. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getConfig(string $subMchId = '', string $appId = '') - { - return $this->safeRequest('secapi/mch/querysubdevconfig', [ - 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, - 'appid' => $appId ?: $this->app['config']->appid, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/ServiceProvider.php deleted file mode 100644 index 5b78710..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\MerchantConfig; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['merchantConfig'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/Client.php deleted file mode 100644 index c96c363..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/Client.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Withdraw; - -use EasyWeChat\MicroMerchant\Kernel\BaseClient; - -/** - * Class Client. - * - * @author liuml - * @DateTime 2019-05-30 14:19 - */ -class Client extends BaseClient -{ - /** - * Query withdrawal status. - * - * @param string $date - * @param string $subMchId - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function queryWithdrawalStatus($date, $subMchId = '') - { - return $this->safeRequest('fund/queryautowithdrawbydate', [ - 'date' => $date, - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, - ]); - } - - /** - * Re-initiation of withdrawal. - * - * @param string $date - * @param string $subMchId - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function requestWithdraw($date, $subMchId = '') - { - return $this->safeRequest('fund/reautowithdrawbydate', [ - 'date' => $date, - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/ServiceProvider.php deleted file mode 100644 index b9c0141..0000000 --- a/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MicroMerchant\Withdraw; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['withdraw'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/Client.php b/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/Client.php deleted file mode 100644 index 2cbfa08..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/Client.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\ActivityMessage; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -class Client extends BaseClient -{ - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function createActivityId() - { - return $this->httpGet('cgi-bin/message/wxopen/activityid/create'); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateMessage(string $activityId, int $state = 0, array $params = []) - { - if (!in_array($state, [0, 1], true)) { - throw new InvalidArgumentException('"state" should be "0" or "1".'); - } - - $params = $this->formatParameters($params); - - $params = [ - 'activity_id' => $activityId, - 'target_state' => $state, - 'template_info' => ['parameter_list' => $params], - ]; - - return $this->httpPostJson('cgi-bin/message/wxopen/updatablemsg/send', $params); - } - - /** - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function formatParameters(array $params) - { - $formatted = []; - - foreach ($params as $name => $value) { - if (!in_array($name, ['member_count', 'room_limit', 'path', 'version_type'], true)) { - continue; - } - - if ('version_type' === $name && !in_array($value, ['develop', 'trial', 'release'], true)) { - throw new InvalidArgumentException('Invalid value of attribute "version_type".'); - } - - $formatted[] = [ - 'name' => $name, - 'value' => strval($value), - ]; - } - - return $formatted; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/ServiceProvider.php deleted file mode 100644 index fa7d3cf..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/ServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\ActivityMessage; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['activity_message'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/AppCode/Client.php b/vendor/overtrue/wechat/src/MiniProgram/AppCode/Client.php deleted file mode 100644 index b9df3bc..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/AppCode/Client.php +++ /dev/null @@ -1,80 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\AppCode; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Http\StreamResponse; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get AppCode. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - */ - public function get(string $path, array $optional = []) - { - $params = array_merge([ - 'path' => $path, - ], $optional); - - return $this->getStream('wxa/getwxacode', $params); - } - - /** - * Get AppCode unlimit. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - */ - public function getUnlimit(string $scene, array $optional = []) - { - $params = array_merge([ - 'scene' => $scene, - ], $optional); - - return $this->getStream('wxa/getwxacodeunlimit', $params); - } - - /** - * Create QrCode. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - */ - public function getQrCode(string $path, int $width = null) - { - return $this->getStream('cgi-bin/wxaapp/createwxaqrcode', compact('path', 'width')); - } - - /** - * Get stream. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function getStream(string $endpoint, array $params) - { - $response = $this->requestRaw($endpoint, 'POST', ['json' => $params]); - - if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { - return StreamResponse::buildFromPsrResponse($response); - } - - return $this->castResponseToType($response, $this->app['config']->get('response_type')); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/AppCode/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/AppCode/ServiceProvider.php deleted file mode 100644 index fefdc22..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/AppCode/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\AppCode; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['app_code'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Application.php b/vendor/overtrue/wechat/src/MiniProgram/Application.php deleted file mode 100644 index ee655a7..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Application.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram; - -use EasyWeChat\BasicService; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Class Application. - * - * @author mingyoung - * - * @property \EasyWeChat\MiniProgram\Auth\AccessToken $access_token - * @property \EasyWeChat\MiniProgram\DataCube\Client $data_cube - * @property \EasyWeChat\MiniProgram\AppCode\Client $app_code - * @property \EasyWeChat\MiniProgram\Auth\Client $auth - * @property \EasyWeChat\OfficialAccount\Server\Guard $server - * @property \EasyWeChat\MiniProgram\Encryptor $encryptor - * @property \EasyWeChat\MiniProgram\TemplateMessage\Client $template_message - * @property \EasyWeChat\OfficialAccount\CustomerService\Client $customer_service - * @property \EasyWeChat\MiniProgram\Plugin\Client $plugin - * @property \EasyWeChat\MiniProgram\Plugin\DevClient $plugin_dev - * @property \EasyWeChat\MiniProgram\UniformMessage\Client $uniform_message - * @property \EasyWeChat\MiniProgram\ActivityMessage\Client $activity_message - * @property \EasyWeChat\MiniProgram\Express\Client $logistics - * @property \EasyWeChat\MiniProgram\NearbyPoi\Client $nearby_poi - * @property \EasyWeChat\MiniProgram\OCR\Client $ocr - * @property \EasyWeChat\MiniProgram\Soter\Client $soter - * @property \EasyWeChat\BasicService\Media\Client $media - * @property \EasyWeChat\BasicService\ContentSecurity\Client $content_security - * @property \EasyWeChat\MiniProgram\Mall\ForwardsMall $mall - * @property \EasyWeChat\MiniProgram\SubscribeMessage\Client $subscribe_message - * @property \EasyWeChat\MiniProgram\RealtimeLog\Client $realtime_log - * @property \EasyWeChat\MiniProgram\Search\Client $search - * @property \EasyWeChat\MiniProgram\Live\Client $live - * @property \EasyWeChat\MiniProgram\Broadcast\Client $broadcast - */ -class Application extends ServiceContainer -{ - /** - * @var array - */ - protected $providers = [ - Auth\ServiceProvider::class, - DataCube\ServiceProvider::class, - AppCode\ServiceProvider::class, - Server\ServiceProvider::class, - TemplateMessage\ServiceProvider::class, - CustomerService\ServiceProvider::class, - UniformMessage\ServiceProvider::class, - ActivityMessage\ServiceProvider::class, - OpenData\ServiceProvider::class, - Plugin\ServiceProvider::class, - Base\ServiceProvider::class, - Express\ServiceProvider::class, - NearbyPoi\ServiceProvider::class, - OCR\ServiceProvider::class, - Soter\ServiceProvider::class, - Mall\ServiceProvider::class, - SubscribeMessage\ServiceProvider::class, - RealtimeLog\ServiceProvider::class, - Search\ServiceProvider::class, - Live\ServiceProvider::class, - Broadcast\ServiceProvider::class, - // Base services - BasicService\Media\ServiceProvider::class, - BasicService\ContentSecurity\ServiceProvider::class, - ]; - - /** - * Handle dynamic calls. - * - * @param string $method - * @param array $args - * - * @return mixed - */ - public function __call($method, $args) - { - return $this->base->$method(...$args); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Auth/AccessToken.php b/vendor/overtrue/wechat/src/MiniProgram/Auth/AccessToken.php deleted file mode 100644 index af08921..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Auth/AccessToken.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Auth; - -use EasyWeChat\Kernel\AccessToken as BaseAccessToken; - -/** - * Class AccessToken. - * - * @author mingyoung - */ -class AccessToken extends BaseAccessToken -{ - /** - * @var string - */ - protected $endpointToGetToken = 'cgi-bin/token'; - - /** - * {@inheritdoc} - */ - protected function getCredentials(): array - { - return [ - 'grant_type' => 'client_credential', - 'appid' => $this->app['config']['app_id'], - 'secret' => $this->app['config']['secret'], - ]; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Auth/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Auth/Client.php deleted file mode 100644 index 3131208..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Auth/Client.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Auth; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Auth. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get session info by code. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function session(string $code) - { - $params = [ - 'appid' => $this->app['config']['app_id'], - 'secret' => $this->app['config']['secret'], - 'js_code' => $code, - 'grant_type' => 'authorization_code', - ]; - - return $this->httpGet('sns/jscode2session', $params); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Auth/ServiceProvider.php deleted file mode 100644 index fcb687b..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Auth/ServiceProvider.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Auth; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - !isset($app['access_token']) && $app['access_token'] = function ($app) { - return new AccessToken($app); - }; - - !isset($app['auth']) && $app['auth'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Base/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Base/Client.php deleted file mode 100644 index b4f5bd8..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Base/Client.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Base; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get paid unionid. - * - * @param string $openid - * @param array $options - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getPaidUnionid($openid, $options = []) - { - return $this->httpGet('wxa/getpaidunionid', compact('openid') + $options); - } - - /** - * Get user phone number by code - * - * @param string $code - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getPhoneNumber($code) - { - return $this->httpPostJson('wxa/business/getuserphonenumber', ['code' => $code]); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Base/ServiceProvider.php deleted file mode 100644 index d9aa41b..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Base/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Base; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['base'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Broadcast/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Broadcast/Client.php deleted file mode 100644 index 8ab659e..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Broadcast/Client.php +++ /dev/null @@ -1,206 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Broadcast; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author Abbotton - */ -class Client extends BaseClient -{ - /** - * Add broadcast goods. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $goodsInfo) - { - $params = [ - 'goodsInfo' => $goodsInfo, - ]; - - return $this->httpPostJson('wxaapi/broadcast/goods/add', $params); - } - - /** - * Reset audit. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function resetAudit(int $auditId, int $goodsId) - { - $params = [ - 'auditId' => $auditId, - 'goodsId' => $goodsId, - ]; - - return $this->httpPostJson('wxaapi/broadcast/goods/resetaudit', $params); - } - - /** - * Resubmit audit goods. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function resubmitAudit(int $goodsId) - { - $params = [ - 'goodsId' => $goodsId, - ]; - - return $this->httpPostJson('wxaapi/broadcast/goods/audit', $params); - } - - /** - * Delete broadcast goods. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(int $goodsId) - { - $params = [ - 'goodsId' => $goodsId, - ]; - - return $this->httpPostJson('wxaapi/broadcast/goods/delete', $params); - } - - /** - * Update goods info. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(array $goodsInfo) - { - $params = [ - 'goodsInfo' => $goodsInfo, - ]; - - return $this->httpPostJson('wxaapi/broadcast/goods/update', $params); - } - - /** - * Get goods information and review status. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getGoodsWarehouse(array $goodsIdArray) - { - $params = [ - 'goods_ids' => $goodsIdArray, - ]; - - return $this->httpPostJson('wxa/business/getgoodswarehouse', $params); - } - - /** - * Get goods list based on status. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getApproved(array $params) - { - return $this->httpGet('wxaapi/broadcast/goods/getapproved', $params); - } - - /** - * Add goods to the designated live room. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addGoods(array $params) - { - return $this->httpPost('wxaapi/broadcast/room/addgoods', $params); - } - - /** - * Get Room List. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - * - * @author onekb <1@1kb.ren> - */ - public function getRooms(int $start = 0, int $limit = 10) - { - $params = [ - 'start' => $start, - 'limit' => $limit, - ]; - - return $this->httpPostJson('wxa/business/getliveinfo', $params); - } - - /** - * Get Playback List. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - * - * @author onekb <1@1kb.ren> - */ - public function getPlaybacks(int $roomId, int $start = 0, int $limit = 10) - { - $params = [ - 'action' => 'get_replay', - 'room_id' => $roomId, - 'start' => $start, - 'limit' => $limit, - ]; - - return $this->httpPostJson('wxa/business/getliveinfo', $params); - } - - /** - * Create a live room. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createLiveRoom(array $params) - { - return $this->httpPost('wxaapi/broadcast/room/create', $params); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Broadcast/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Broadcast/ServiceProvider.php deleted file mode 100644 index f33f29f..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Broadcast/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Broadcast; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author Abbotton - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['broadcast'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/CustomerService/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/CustomerService/ServiceProvider.php deleted file mode 100644 index cfd3039..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/CustomerService/ServiceProvider.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\CustomerService; - -use EasyWeChat\OfficialAccount\CustomerService\Client; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['customer_service'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/DataCube/Client.php b/vendor/overtrue/wechat/src/MiniProgram/DataCube/Client.php deleted file mode 100644 index 0430d71..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/DataCube/Client.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\DataCube; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get summary trend. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function summaryTrend(string $from, string $to) - { - return $this->query('datacube/getweanalysisappiddailysummarytrend', $from, $to); - } - - /** - * Get daily visit trend. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function dailyVisitTrend(string $from, string $to) - { - return $this->query('datacube/getweanalysisappiddailyvisittrend', $from, $to); - } - - /** - * Get weekly visit trend. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function weeklyVisitTrend(string $from, string $to) - { - return $this->query('datacube/getweanalysisappidweeklyvisittrend', $from, $to); - } - - /** - * Get monthly visit trend. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function monthlyVisitTrend(string $from, string $to) - { - return $this->query('datacube/getweanalysisappidmonthlyvisittrend', $from, $to); - } - - /** - * Get visit distribution. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function visitDistribution(string $from, string $to) - { - return $this->query('datacube/getweanalysisappidvisitdistribution', $from, $to); - } - - /** - * Get daily retain info. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function dailyRetainInfo(string $from, string $to) - { - return $this->query('datacube/getweanalysisappiddailyretaininfo', $from, $to); - } - - /** - * Get weekly retain info. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function weeklyRetainInfo(string $from, string $to) - { - return $this->query('datacube/getweanalysisappidweeklyretaininfo', $from, $to); - } - - /** - * Get monthly retain info. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function monthlyRetainInfo(string $from, string $to) - { - return $this->query('datacube/getweanalysisappidmonthlyretaininfo', $from, $to); - } - - /** - * Get visit page. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function visitPage(string $from, string $to) - { - return $this->query('datacube/getweanalysisappidvisitpage', $from, $to); - } - - /** - * Get user portrait. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function userPortrait(string $from, string $to) - { - return $this->query('datacube/getweanalysisappiduserportrait', $from, $to); - } - - /** - * Unify query. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function query(string $api, string $from, string $to) - { - $params = [ - 'begin_date' => $from, - 'end_date' => $to, - ]; - - return $this->httpPostJson($api, $params); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/DataCube/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/DataCube/ServiceProvider.php deleted file mode 100644 index 258d7c4..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/DataCube/ServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\DataCube; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['data_cube'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Encryptor.php b/vendor/overtrue/wechat/src/MiniProgram/Encryptor.php deleted file mode 100644 index 28a2dd8..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Encryptor.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram; - -use EasyWeChat\Kernel\Encryptor as BaseEncryptor; -use EasyWeChat\Kernel\Exceptions\DecryptException; -use EasyWeChat\Kernel\Support\AES; - -/** - * Class Encryptor. - * - * @author mingyoung - */ -class Encryptor extends BaseEncryptor -{ - /** - * Decrypt data. - * - * @throws \EasyWeChat\Kernel\Exceptions\DecryptException - */ - public function decryptData(string $sessionKey, string $iv, string $encrypted): array - { - $decrypted = AES::decrypt( - base64_decode($encrypted, false), - base64_decode($sessionKey, false), - base64_decode($iv, false) - ); - - $decrypted = json_decode($decrypted, true); - - if (!$decrypted) { - throw new DecryptException('The given payload is invalid.'); - } - - return $decrypted; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Express/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Express/Client.php deleted file mode 100644 index 342ebd5..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Express/Client.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Express; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author kehuanhuan <1152018701@qq.com> - */ -class Client extends BaseClient -{ - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function listProviders() - { - return $this->httpGet('cgi-bin/express/business/delivery/getall'); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createWaybill(array $params = []) - { - return $this->httpPostJson('cgi-bin/express/business/order/add', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deleteWaybill(array $params = []) - { - return $this->httpPostJson('cgi-bin/express/business/order/cancel', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getWaybill(array $params = []) - { - return $this->httpPostJson('cgi-bin/express/business/order/get', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getWaybillTrack(array $params = []) - { - return $this->httpPostJson('cgi-bin/express/business/path/get', $params); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getBalance(string $deliveryId, string $bizId) - { - return $this->httpPostJson('cgi-bin/express/business/quota/get', [ - 'delivery_id' => $deliveryId, - 'biz_id' => $bizId, - ]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getPrinter() - { - return $this->httpPostJson('cgi-bin/express/business/printer/getall'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function bindPrinter(string $openid) - { - return $this->httpPostJson('cgi-bin/express/business/printer/update', [ - 'update_type' => 'bind', - 'openid' => $openid, - ]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unbindPrinter(string $openid) - { - return $this->httpPostJson('cgi-bin/express/business/printer/update', [ - 'update_type' => 'unbind', - 'openid' => $openid, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Express/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Express/ServiceProvider.php deleted file mode 100644 index 4794094..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Express/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Express; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author kehuanhuan <1152018701@qq.com> - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['express'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Live/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Live/Client.php deleted file mode 100644 index de0b034..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Live/Client.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Live; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author onekb <1@1kb.ren> - */ -class Client extends BaseClient -{ - /** - * Get Room List. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @deprecated This method has been merged into `\EasyWeChat\MiniProgram\Broadcast` - */ - public function getRooms(int $start = 0, int $limit = 10) - { - $params = [ - 'start' => $start, - 'limit' => $limit, - ]; - - return $this->httpPostJson('wxa/business/getliveinfo', $params); - } - - /** - * Get Playback List. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @deprecated This method has been merged into `\EasyWeChat\MiniProgram\Broadcast` - */ - public function getPlaybacks(int $roomId, int $start = 0, int $limit = 10) - { - $params = [ - 'action' => 'get_replay', - 'room_id' => $roomId, - 'start' => $start, - 'limit' => $limit, - ]; - - return $this->httpPostJson('wxa/business/getliveinfo', $params); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Live/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Live/ServiceProvider.php deleted file mode 100644 index 6d6dff6..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Live/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Live; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author onekb <1@1kb.ren> - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['live'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/CartClient.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/CartClient.php deleted file mode 100644 index ddf0587..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Mall/CartClient.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Mall; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class CartClient extends BaseClient -{ - /** - * 导入收藏. - * - * @param array $params - * @param bool $isTest - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function add($params, $isTest = false) - { - return $this->httpPostJson('mall/addshoppinglist', $params, ['is_test' => (int) $isTest]); - } - - /** - * 查询用户收藏信息. - * - * @param array $params - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function query($params) - { - return $this->httpPostJson('mall/queryshoppinglist', $params, ['type' => 'batchquery']); - } - - /** - * 查询用户收藏信息. - * - * @param array $params - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function queryByPage($params) - { - return $this->httpPostJson('mall/queryshoppinglist', $params, ['type' => 'getbypage']); - } - - /** - * 删除收藏. - * - * @param string $openid - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete($openid, array $products = []) - { - if (empty($products)) { - return $this->httpPostJson('mall/deletebizallshoppinglist', ['user_open_id' => $openid]); - } - - return $this->httpPostJson('mall/deleteshoppinglist', ['user_open_id' => $openid, 'sku_product_list' => $products]); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/ForwardsMall.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/ForwardsMall.php deleted file mode 100644 index f727b17..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Mall/ForwardsMall.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Mall; - -/** - * Class Application. - * - * @author mingyoung - * - * @property \EasyWeChat\MiniProgram\Mall\OrderClient $order - * @property \EasyWeChat\MiniProgram\Mall\CartClient $cart - * @property \EasyWeChat\MiniProgram\Mall\ProductClient $product - * @property \EasyWeChat\MiniProgram\Mall\MediaClient $media - */ -class ForwardsMall -{ - /** - * @var \EasyWeChat\Kernel\ServiceContainer - */ - protected $app; - - /** - * @param \EasyWeChat\Kernel\ServiceContainer $app - */ - public function __construct($app) - { - $this->app = $app; - } - - /** - * @param string $property - * - * @return mixed - */ - public function __get($property) - { - return $this->app["mall.{$property}"]; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/MediaClient.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/MediaClient.php deleted file mode 100644 index a3827bc..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Mall/MediaClient.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Mall; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class MediaClient extends BaseClient -{ - /** - * 更新或导入媒体信息. - * - * @param array $params - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function import($params) - { - return $this->httpPostJson('mall/importmedia', $params); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/OrderClient.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/OrderClient.php deleted file mode 100644 index 9879695..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Mall/OrderClient.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Mall; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class OrderClient extends BaseClient -{ - /** - * 导入订单. - * - * @param array $params - * @param bool $isHistory - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function add($params, $isHistory = false) - { - return $this->httpPostJson('mall/importorder', $params, ['action' => 'add-order', 'is_history' => (int) $isHistory]); - } - - /** - * 导入订单. - * - * @param array $params - * @param bool $isHistory - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update($params, $isHistory = false) - { - return $this->httpPostJson('mall/importorder', $params, ['action' => 'update-order', 'is_history' => (int) $isHistory]); - } - - /** - * 删除订单. - * - * @param string $openid - * @param string $orderId - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete($openid, $orderId) - { - $params = [ - 'user_open_id' => $openid, - 'order_id' => $orderId, - ]; - - return $this->httpPostJson('mall/deleteorder', $params); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/ProductClient.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/ProductClient.php deleted file mode 100644 index f7fbfd0..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Mall/ProductClient.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Mall; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class ProductClient extends BaseClient -{ - /** - * 更新或导入物品信息. - * - * @param array $params - * @param bool $isTest - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function import($params, $isTest = false) - { - return $this->httpPostJson('mall/importproduct', $params, ['is_test' => (int) $isTest]); - } - - /** - * 查询物品信息. - * - * @param array $params - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function query($params) - { - return $this->httpPostJson('mall/queryproduct', $params, ['type' => 'batchquery']); - } - - /** - * 小程序的物品是否可被搜索. - * - * @param bool $value - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setSearchable($value) - { - return $this->httpPostJson('mall/brandmanage', ['can_be_search' => $value], ['action' => 'set_biz_can_be_search']); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/ServiceProvider.php deleted file mode 100644 index 964395b..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Mall/ServiceProvider.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Mall; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['mall'] = function ($app) { - return new ForwardsMall($app); - }; - - $app['mall.order'] = function ($app) { - return new OrderClient($app); - }; - - $app['mall.cart'] = function ($app) { - return new CartClient($app); - }; - - $app['mall.product'] = function ($app) { - return new ProductClient($app); - }; - - $app['mall.media'] = function ($app) { - return new MediaClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/Client.php b/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/Client.php deleted file mode 100644 index b5e17de..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/Client.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\NearbyPoi; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class Client. - * - * @author joyeekk - */ -class Client extends BaseClient -{ - /** - * Add nearby poi. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function add(array $params) - { - $params = array_merge([ - 'is_comm_nearby' => '1', - 'poi_id' => '', - ], $params); - - return $this->httpPostJson('wxa/addnearbypoi', $params); - } - - /** - * Update nearby poi. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $poiId, array $params) - { - $params = array_merge([ - 'is_comm_nearby' => '1', - 'poi_id' => $poiId, - ], $params); - - return $this->httpPostJson('wxa/addnearbypoi', $params); - } - - /** - * Delete nearby poi. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $poiId) - { - return $this->httpPostJson('wxa/delnearbypoi', [ - 'poi_id' => $poiId, - ]); - } - - /** - * Get nearby poi list. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list(int $page, int $pageRows) - { - return $this->httpGet('wxa/getnearbypoilist', [ - 'page' => $page, - 'page_rows' => $pageRows, - ]); - } - - /** - * Set nearby poi show status. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setVisibility(string $poiId, int $status) - { - if (!in_array($status, [0, 1], true)) { - throw new InvalidArgumentException('status should be 0 or 1.'); - } - - return $this->httpPostJson('wxa/setnearbypoishowstatus', [ - 'poi_id' => $poiId, - 'status' => $status, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/ServiceProvider.php deleted file mode 100644 index cb15bb3..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\NearbyPoi; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author joyeekk - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['nearby_poi'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/OCR/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/OCR/ServiceProvider.php deleted file mode 100644 index 80e0001..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/OCR/ServiceProvider.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\OCR; - -use EasyWeChat\OfficialAccount\OCR\Client; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author joyeekk - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['ocr'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/OpenData/Client.php b/vendor/overtrue/wechat/src/MiniProgram/OpenData/Client.php deleted file mode 100644 index c945f8c..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/OpenData/Client.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\OpenData; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author tianyong90 <412039588@qq.com> - */ -class Client extends BaseClient -{ - /** - * removeUserStorage. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function removeUserStorage(string $openid, string $sessionKey, array $key) - { - $data = ['key' => $key]; - $query = [ - 'openid' => $openid, - 'sig_method' => 'hmac_sha256', - 'signature' => hash_hmac('sha256', json_encode($data), $sessionKey), - ]; - - return $this->httpPostJson('wxa/remove_user_storage', $data, $query); - } - - /** - * setUserStorage. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setUserStorage(string $openid, string $sessionKey, array $kvList) - { - $kvList = $this->formatKVLists($kvList); - - $data = ['kv_list' => $kvList]; - $query = [ - 'openid' => $openid, - 'sig_method' => 'hmac_sha256', - 'signature' => hash_hmac('sha256', json_encode($data), $sessionKey), - ]; - - return $this->httpPostJson('wxa/set_user_storage', $data, $query); - } - - /** - * @return array - */ - protected function formatKVLists(array $params) - { - $formatted = []; - - foreach ($params as $name => $value) { - $formatted[] = [ - 'key' => $name, - 'value' => strval($value), - ]; - } - - return $formatted; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/OpenData/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/OpenData/ServiceProvider.php deleted file mode 100644 index 3ea1287..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/OpenData/ServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\OpenData; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['open_data'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Plugin/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Plugin/Client.php deleted file mode 100644 index cd885cc..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Plugin/Client.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Plugin; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * @param string $appId - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function apply($appId) - { - return $this->httpPostJson('wxa/plugin', [ - 'action' => 'apply', - 'plugin_appid' => $appId, - ]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list() - { - return $this->httpPostJson('wxa/plugin', [ - 'action' => 'list', - ]); - } - - /** - * @param string $appId - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unbind($appId) - { - return $this->httpPostJson('wxa/plugin', [ - 'action' => 'unbind', - 'plugin_appid' => $appId, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Plugin/DevClient.php b/vendor/overtrue/wechat/src/MiniProgram/Plugin/DevClient.php deleted file mode 100644 index 663501b..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Plugin/DevClient.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Plugin; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class DevClient. - * - * @author her-cat - */ -class DevClient extends BaseClient -{ - /** - * Get users. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getUsers(int $page = 1, int $size = 10) - { - return $this->httpPostJson('wxa/devplugin', [ - 'action' => 'dev_apply_list', - 'page' => $page, - 'num' => $size, - ]); - } - - /** - * Agree to use plugin. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function agree(string $appId) - { - return $this->httpPostJson('wxa/devplugin', [ - 'action' => 'dev_agree', - 'appid' => $appId, - ]); - } - - /** - * Refuse to use plugin. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function refuse(string $reason) - { - return $this->httpPostJson('wxa/devplugin', [ - 'action' => 'dev_refuse', - 'reason' => $reason, - ]); - } - - /** - * Delete rejected applications. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete() - { - return $this->httpPostJson('wxa/devplugin', [ - 'action' => 'dev_delete', - ]); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Plugin/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Plugin/ServiceProvider.php deleted file mode 100644 index d2c6837..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Plugin/ServiceProvider.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Plugin; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - */ - public function register(Container $app) - { - $app['plugin'] = function ($app) { - return new Client($app); - }; - - $app['plugin_dev'] = function ($app) { - return new DevClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/RealtimeLog/Client.php b/vendor/overtrue/wechat/src/MiniProgram/RealtimeLog/Client.php deleted file mode 100644 index eda114f..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/RealtimeLog/Client.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\RealtimeLog; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author her-cat - */ -class Client extends BaseClient -{ - /** - * Real time log query. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function search(string $date, int $beginTime, int $endTime, array $options = []) - { - $params = [ - 'date' => $date, - 'begintime' => $beginTime, - 'endtime' => $endTime, - ]; - - return $this->httpGet('wxaapi/userlog/userlog_search', $params + $options); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/RealtimeLog/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/RealtimeLog/ServiceProvider.php deleted file mode 100644 index 9a28141..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/RealtimeLog/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\RealtimeLog; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author her-cat - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc} - */ - public function register(Container $app) - { - $app['realtime_log'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Search/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Search/Client.php deleted file mode 100644 index 81bc42d..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Search/Client.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Search; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author her-cat - */ -class Client extends BaseClient -{ - /** - * Submit applet page URL and parameter information. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function submitPage(array $pages) - { - return $this->httpPostJson('wxa/search/wxaapi_submitpages', compact('pages')); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Search/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Search/ServiceProvider.php deleted file mode 100644 index 85cb569..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Search/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Search; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author her-cat - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['search'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Server/ServiceProvider.php deleted file mode 100644 index 0586bb9..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Server/ServiceProvider.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Server; - -use EasyWeChat\MiniProgram\Encryptor; -use EasyWeChat\OfficialAccount\Server\Guard; -use EasyWeChat\OfficialAccount\Server\Handlers\EchoStrHandler; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - !isset($app['encryptor']) && $app['encryptor'] = function ($app) { - return new Encryptor( - $app['config']['app_id'], - $app['config']['token'], - $app['config']['aes_key'] - ); - }; - - !isset($app['server']) && $app['server'] = function ($app) { - $guard = new Guard($app); - $guard->push(new EchoStrHandler($app)); - - return $guard; - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Soter/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Soter/Client.php deleted file mode 100644 index 287fd22..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Soter/Client.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Soter; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author her-cat - */ -class Client extends BaseClient -{ - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function verifySignature(string $openid, string $json, string $signature) - { - return $this->httpPostJson('cgi-bin/soter/verify_signature', [ - 'openid' => $openid, - 'json_string' => $json, - 'json_signature' => $signature, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Soter/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Soter/ServiceProvider.php deleted file mode 100644 index c8520db..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/Soter/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\Soter; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author her-cat - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc} - */ - public function register(Container $app) - { - $app['soter'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/SubscribeMessage/Client.php b/vendor/overtrue/wechat/src/MiniProgram/SubscribeMessage/Client.php deleted file mode 100644 index 02b3de9..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/SubscribeMessage/Client.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\SubscribeMessage; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use ReflectionClass; - -/** - * Class Client. - * - * @author hugo - */ -class Client extends BaseClient -{ - /** - * {@inheritdoc}. - */ - protected $message = [ - 'touser' => '', - 'template_id' => '', - 'page' => '', - 'data' => [], - ]; - - /** - * {@inheritdoc}. - */ - protected $required = ['touser', 'template_id', 'data']; - - /** - * Send a template message. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(array $data = []) - { - $params = $this->formatMessage($data); - - $this->restoreMessage(); - - return $this->httpPostJson('cgi-bin/message/subscribe/send', $params); - } - - /** - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function formatMessage(array $data = []) - { - $params = array_merge($this->message, $data); - - foreach ($params as $key => $value) { - if (in_array($key, $this->required, true) && empty($value) && empty($this->message[$key])) { - throw new InvalidArgumentException(sprintf('Attribute "%s" can not be empty!', $key)); - } - - $params[$key] = empty($value) ? $this->message[$key] : $value; - } - - foreach ($params['data'] as $key => $value) { - if (is_array($value)) { - if (\array_key_exists('value', $value)) { - $params['data'][$key] = ['value' => $value['value']]; - - continue; - } - - if (count($value) >= 1) { - $value = [ - 'value' => $value[0], -// 'color' => $value[1],// color unsupported - ]; - } - } else { - $value = [ - 'value' => strval($value), - ]; - } - - $params['data'][$key] = $value; - } - - return $params; - } - - /** - * Restore message. - */ - protected function restoreMessage() - { - $this->message = (new ReflectionClass(static::class))->getDefaultProperties()['message']; - } - - /** - * Combine templates and add them to your personal template library under your account. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addTemplate(string $tid, array $kidList, string $sceneDesc = null) - { - $sceneDesc = $sceneDesc ?? ''; - $data = \compact('tid', 'kidList', 'sceneDesc'); - - return $this->httpPost('wxaapi/newtmpl/addtemplate', $data); - } - - /** - * Delete personal template under account. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deleteTemplate(string $id) - { - return $this->httpPost('wxaapi/newtmpl/deltemplate', ['priTmplId' => $id]); - } - - /** - * Get keyword list under template title. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getTemplateKeywords(string $tid) - { - return $this->httpGet('wxaapi/newtmpl/getpubtemplatekeywords', compact('tid')); - } - - /** - * Get the title of the public template under the category to which the account belongs. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getTemplateTitles(array $ids, int $start = 0, int $limit = 30) - { - $ids = \implode(',', $ids); - $query = \compact('ids', 'start', 'limit'); - - return $this->httpGet('wxaapi/newtmpl/getpubtemplatetitles', $query); - } - - /** - * Get list of personal templates under the current account. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getTemplates() - { - return $this->httpGet('wxaapi/newtmpl/gettemplate'); - } - - /** - * Get the category of the applet account. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getCategory() - { - return $this->httpGet('wxaapi/newtmpl/getcategory'); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/SubscribeMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/SubscribeMessage/ServiceProvider.php deleted file mode 100644 index 726b3ed..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/SubscribeMessage/ServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\SubscribeMessage; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['subscribe_message'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/Client.php b/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/Client.php deleted file mode 100644 index 6c6da31..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/Client.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\TemplateMessage; - -use EasyWeChat\OfficialAccount\TemplateMessage\Client as BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - public const API_SEND = 'cgi-bin/message/wxopen/template/send'; - - /** - * {@inheritdoc}. - */ - protected $message = [ - 'touser' => '', - 'template_id' => '', - 'page' => '', - 'form_id' => '', - 'data' => [], - 'emphasis_keyword' => '', - ]; - - /** - * {@inheritdoc}. - */ - protected $required = ['touser', 'template_id', 'form_id']; - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(int $offset, int $count) - { - return $this->httpPostJson('cgi-bin/wxopen/template/library/list', compact('offset', 'count')); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $id) - { - return $this->httpPostJson('cgi-bin/wxopen/template/library/get', compact('id')); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function add(string $id, array $keyword) - { - return $this->httpPostJson('cgi-bin/wxopen/template/add', [ - 'id' => $id, - 'keyword_id_list' => $keyword, - ]); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $templateId) - { - return $this->httpPostJson('cgi-bin/wxopen/template/del', [ - 'template_id' => $templateId, - ]); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getTemplates(int $offset, int $count) - { - return $this->httpPostJson('cgi-bin/wxopen/template/list', compact('offset', 'count')); - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/ServiceProvider.php deleted file mode 100644 index 776a15e..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/ServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\TemplateMessage; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['template_message'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/Client.php b/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/Client.php deleted file mode 100644 index 56a9132..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/Client.php +++ /dev/null @@ -1,140 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\UniformMessage; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\OfficialAccount\TemplateMessage\Client as BaseClient; - -class Client extends BaseClient -{ - public const API_SEND = 'cgi-bin/message/wxopen/template/uniform_send'; - - /** - * {@inheritdoc}. - * - * @var array - */ - protected $message = [ - 'touser' => '', - ]; - - /** - * Weapp Attributes. - * - * @var array - */ - protected $weappMessage = [ - 'template_id' => '', - 'page' => '', - 'form_id' => '', - 'data' => [], - 'emphasis_keyword' => '', - ]; - - /** - * Official account attributes. - * - * @var array - */ - protected $mpMessage = [ - 'appid' => '', - 'template_id' => '', - 'url' => '', - 'miniprogram' => [], - 'data' => [], - ]; - - /** - * Required attributes. - * - * @var array - */ - protected $required = ['touser', 'template_id', 'form_id', 'miniprogram', 'appid']; - - /** - * @return array - * - * @throws InvalidArgumentException - */ - protected function formatMessage(array $data = []) - { - $params = array_merge($this->message, $data); - - if (empty($params['touser'])) { - throw new InvalidArgumentException(sprintf('Attribute "touser" can not be empty!')); - } - - if (!empty($params['weapp_template_msg'])) { - $params['weapp_template_msg'] = $this->formatWeappMessage($params['weapp_template_msg']); - } - - if (!empty($params['mp_template_msg'])) { - $params['mp_template_msg'] = $this->formatMpMessage($params['mp_template_msg']); - } - - return $params; - } - - /** - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function formatWeappMessage(array $data = []) - { - $params = $this->baseFormat($data, $this->weappMessage); - - $params['data'] = $this->formatData($params['data'] ?? []); - - return $params; - } - - /** - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function formatMpMessage(array $data = []) - { - $params = $this->baseFormat($data, $this->mpMessage); - - if (empty($params['miniprogram']['appid'])) { - $params['miniprogram']['appid'] = $this->app['config']['app_id']; - } - - $params['data'] = $this->formatData($params['data'] ?? []); - - return $params; - } - - /** - * @param array $data - * @param array $default - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function baseFormat($data = [], $default = []) - { - $params = array_merge($default, $data); - foreach ($params as $key => $value) { - if (in_array($key, $this->required, true) && empty($value) && empty($default[$key])) { - throw new InvalidArgumentException(sprintf('Attribute "%s" can not be empty!', $key)); - } - - $params[$key] = empty($value) ? $default[$key] : $value; - } - - return $params; - } -} diff --git a/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/ServiceProvider.php deleted file mode 100644 index 0e86db3..0000000 --- a/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/ServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\MiniProgram\UniformMessage; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['uniform_message'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Application.php b/vendor/overtrue/wechat/src/OfficialAccount/Application.php deleted file mode 100644 index 75cb1dd..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Application.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount; - -use EasyWeChat\BasicService; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Class Application. - * - * @author overtrue - * - * @property \EasyWeChat\BasicService\Media\Client $media - * @property \EasyWeChat\BasicService\Url\Client $url - * @property \EasyWeChat\BasicService\QrCode\Client $qrcode - * @property \EasyWeChat\BasicService\Jssdk\Client $jssdk - * @property \EasyWeChat\OfficialAccount\Auth\AccessToken $access_token - * @property \EasyWeChat\OfficialAccount\Server\Guard $server - * @property \EasyWeChat\OfficialAccount\User\UserClient $user - * @property \EasyWeChat\OfficialAccount\User\TagClient $user_tag - * @property \EasyWeChat\OfficialAccount\Menu\Client $menu - * @property \EasyWeChat\OfficialAccount\TemplateMessage\Client $template_message - * @property \EasyWeChat\OfficialAccount\SubscribeMessage\Client $subscribe_message - * @property \EasyWeChat\OfficialAccount\Material\Client $material - * @property \EasyWeChat\OfficialAccount\CustomerService\Client $customer_service - * @property \EasyWeChat\OfficialAccount\CustomerService\SessionClient $customer_service_session - * @property \EasyWeChat\OfficialAccount\Semantic\Client $semantic - * @property \EasyWeChat\OfficialAccount\DataCube\Client $data_cube - * @property \EasyWeChat\OfficialAccount\AutoReply\Client $auto_reply - * @property \EasyWeChat\OfficialAccount\Broadcasting\Client $broadcasting - * @property \EasyWeChat\OfficialAccount\Card\Card $card - * @property \EasyWeChat\OfficialAccount\Device\Client $device - * @property \EasyWeChat\OfficialAccount\ShakeAround\ShakeAround $shake_around - * @property \EasyWeChat\OfficialAccount\POI\Client $poi - * @property \EasyWeChat\OfficialAccount\Store\Client $store - * @property \EasyWeChat\OfficialAccount\Base\Client $base - * @property \EasyWeChat\OfficialAccount\Comment\Client $comment - * @property \EasyWeChat\OfficialAccount\OCR\Client $ocr - * @property \EasyWeChat\OfficialAccount\Goods\Client $goods - * @property \Overtrue\Socialite\Providers\WeChatProvider $oauth - * @property \EasyWeChat\OfficialAccount\WiFi\Client $wifi - * @property \EasyWeChat\OfficialAccount\WiFi\CardClient $wifi_card - * @property \EasyWeChat\OfficialAccount\WiFi\DeviceClient $wifi_device - * @property \EasyWeChat\OfficialAccount\WiFi\ShopClient $wifi_shop - * @property \EasyWeChat\OfficialAccount\Guide\Client $guide - */ -class Application extends ServiceContainer -{ - /** - * @var array - */ - protected $providers = [ - Auth\ServiceProvider::class, - Server\ServiceProvider::class, - User\ServiceProvider::class, - OAuth\ServiceProvider::class, - Menu\ServiceProvider::class, - TemplateMessage\ServiceProvider::class, - SubscribeMessage\ServiceProvider::class, - Material\ServiceProvider::class, - CustomerService\ServiceProvider::class, - Semantic\ServiceProvider::class, - DataCube\ServiceProvider::class, - POI\ServiceProvider::class, - AutoReply\ServiceProvider::class, - Broadcasting\ServiceProvider::class, - Card\ServiceProvider::class, - Device\ServiceProvider::class, - ShakeAround\ServiceProvider::class, - Store\ServiceProvider::class, - Comment\ServiceProvider::class, - Base\ServiceProvider::class, - OCR\ServiceProvider::class, - Goods\ServiceProvider::class, - WiFi\ServiceProvider::class, - // Base services - BasicService\QrCode\ServiceProvider::class, - BasicService\Media\ServiceProvider::class, - BasicService\Url\ServiceProvider::class, - BasicService\Jssdk\ServiceProvider::class, - // Append Guide Interface - Guide\ServiceProvider::class, - ]; -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OfficialAccount/Auth/AccessToken.php deleted file mode 100644 index 55409ba..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Auth/AccessToken.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Auth; - -use EasyWeChat\Kernel\AccessToken as BaseAccessToken; - -/** - * Class AuthorizerAccessToken. - * - * @author overtrue - */ -class AccessToken extends BaseAccessToken -{ - /** - * @var string - */ - protected $endpointToGetToken = 'cgi-bin/token'; - - protected function getCredentials(): array - { - return [ - 'grant_type' => 'client_credential', - 'appid' => $this->app['config']['app_id'], - 'secret' => $this->app['config']['secret'], - ]; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Auth/ServiceProvider.php deleted file mode 100644 index e748730..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Auth/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Auth; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - !isset($app['access_token']) && $app['access_token'] = function ($app) { - return new AccessToken($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/Client.php deleted file mode 100644 index 6d2e4d6..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/Client.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\AutoReply; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * Get current auto reply settings. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function current() - { - return $this->httpGet('cgi-bin/get_current_autoreply_info'); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/ServiceProvider.php deleted file mode 100644 index 4377550..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\AutoReply; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['auto_reply'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Base/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Base/Client.php deleted file mode 100644 index 3d2a3e9..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Base/Client.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Base; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Clear quota. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function clearQuota() - { - $params = [ - 'appid' => $this->app['config']['app_id'], - ]; - - return $this->httpPostJson('cgi-bin/clear_quota', $params); - } - - /** - * Get wechat callback ip. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getValidIps() - { - return $this->httpGet('cgi-bin/getcallbackip'); - } - - /** - * Check the callback address network. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function checkCallbackUrl(string $action = 'all', string $operator = 'DEFAULT') - { - if (!in_array($action, ['dns', 'ping', 'all'], true)) { - throw new InvalidArgumentException('The action must be dns, ping, all.'); - } - - $operator = strtoupper($operator); - - if (!in_array($operator, ['CHINANET', 'UNICOM', 'CAP', 'DEFAULT'], true)) { - throw new InvalidArgumentException('The operator must be CHINANET, UNICOM, CAP, DEFAULT.'); - } - - $params = [ - 'action' => $action, - 'check_operator' => $operator, - ]; - - return $this->httpPostJson('cgi-bin/callback/check', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Base/ServiceProvider.php deleted file mode 100644 index 409593d..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Base/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Base; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['base'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/Client.php deleted file mode 100644 index 27515c3..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/Client.php +++ /dev/null @@ -1,359 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Broadcasting; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Contracts\MessageInterface; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Messages\Card; -use EasyWeChat\Kernel\Messages\Image; -use EasyWeChat\Kernel\Messages\Media; -use EasyWeChat\Kernel\Messages\Text; -use EasyWeChat\Kernel\Support\Arr; - -/** - * Class Client. - * - * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewTextByName($text, $name); - * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewNewsByName($mediaId, $name); - * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewVoiceByName($mediaId, $name); - * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewImageByName($mediaId, $name); - * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewVideoByName($message, $name); - * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewCardByName($cardId, $name); - * - * @author overtrue - */ -class Client extends BaseClient -{ - public const PREVIEW_BY_OPENID = 'touser'; - public const PREVIEW_BY_NAME = 'towxname'; - - /** - * Send a message. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(array $message) - { - if (empty($message['filter']) && empty($message['touser'])) { - throw new RuntimeException('The message reception object is not specified'); - } - - $api = Arr::get($message, 'touser') ? 'cgi-bin/message/mass/send' : 'cgi-bin/message/mass/sendall'; - - return $this->httpPostJson($api, $message); - } - - /** - * Preview a message. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function preview(array $message) - { - return $this->httpPostJson('cgi-bin/message/mass/preview', $message); - } - - /** - * Delete a broadcast. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $msgId, int $index = 0) - { - $options = [ - 'msg_id' => $msgId, - 'article_idx' => $index, - ]; - - return $this->httpPostJson('cgi-bin/message/mass/delete', $options); - } - - /** - * Get a broadcast status. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function status(string $msgId) - { - $options = [ - 'msg_id' => $msgId, - ]; - - return $this->httpPostJson('cgi-bin/message/mass/get', $options); - } - - /** - * Send a text message. - * - * @param mixed $reception - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function sendText(string $message, $reception = null, array $attributes = []) - { - return $this->sendMessage(new Text($message), $reception, $attributes); - } - - /** - * Send a news message. - * - * @param mixed $reception - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function sendNews(string $mediaId, $reception = null, array $attributes = []) - { - return $this->sendMessage(new Media($mediaId, 'mpnews'), $reception, $attributes); - } - - /** - * Send a voice message. - * - * @param mixed $reception - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function sendVoice(string $mediaId, $reception = null, array $attributes = []) - { - return $this->sendMessage(new Media($mediaId, 'voice'), $reception, $attributes); - } - - /** - * Send a image message. - * - * @param mixed $reception - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function sendImage(string $mediaId, $reception = null, array $attributes = []) - { - return $this->sendMessage(new Image($mediaId), $reception, $attributes); - } - - /** - * Send a video message. - * - * @param mixed $reception - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function sendVideo(string $mediaId, $reception = null, array $attributes = []) - { - return $this->sendMessage(new Media($mediaId, 'mpvideo'), $reception, $attributes); - } - - /** - * Send a card message. - * - * @param mixed $reception - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function sendCard(string $cardId, $reception = null, array $attributes = []) - { - return $this->sendMessage(new Card($cardId), $reception, $attributes); - } - - /** - * Preview a text message. - * - * @param string $message message - * @param string $reception - * @param string $method - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function previewText(string $message, $reception, $method = self::PREVIEW_BY_OPENID) - { - return $this->previewMessage(new Text($message), $reception, $method); - } - - /** - * Preview a news message. - * - * @param string $mediaId message - * @param string $reception - * @param string $method - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function previewNews(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) - { - return $this->previewMessage(new Media($mediaId, 'mpnews'), $reception, $method); - } - - /** - * Preview a voice message. - * - * @param string $mediaId message - * @param string $reception - * @param string $method - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function previewVoice(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) - { - return $this->previewMessage(new Media($mediaId, 'voice'), $reception, $method); - } - - /** - * Preview a image message. - * - * @param string $mediaId message - * @param string $reception - * @param string $method - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function previewImage(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) - { - return $this->previewMessage(new Image($mediaId), $reception, $method); - } - - /** - * Preview a video message. - * - * @param string $mediaId message - * @param string $reception - * @param string $method - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function previewVideo(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) - { - return $this->previewMessage(new Media($mediaId, 'mpvideo'), $reception, $method); - } - - /** - * Preview a card message. - * - * @param string $cardId message - * @param string $reception - * @param string $method - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function previewCard(string $cardId, $reception, $method = self::PREVIEW_BY_OPENID) - { - return $this->previewMessage(new Card($cardId), $reception, $method); - } - - /** - * @param string $method - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function previewMessage(MessageInterface $message, string $reception, $method = self::PREVIEW_BY_OPENID) - { - $message = (new MessageBuilder())->message($message)->buildForPreview($method, $reception); - - return $this->preview($message); - } - - /** - * @param mixed $reception - * @param array $attributes - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function sendMessage(MessageInterface $message, $reception = null, $attributes = []) - { - $message = (new MessageBuilder())->message($message)->with($attributes)->toAll(); - - if (\is_int($reception)) { - $message->toTag($reception); - } elseif (\is_array($reception)) { - $message->toUsers($reception); - } - - return $this->send($message->build()); - } - - /** - * @codeCoverageIgnore - * - * @param string $method - * @param array $args - * - * @return mixed - */ - public function __call($method, $args) - { - if (strpos($method, 'ByName') > 0) { - $method = strstr($method, 'ByName', true); - - if (method_exists($this, $method)) { - array_push($args, self::PREVIEW_BY_NAME); - - return $this->$method(...$args); - } - } - - throw new \BadMethodCallException(sprintf('Method %s not exists.', $method)); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/MessageBuilder.php b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/MessageBuilder.php deleted file mode 100644 index 9bf80f1..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/MessageBuilder.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Broadcasting; - -use EasyWeChat\Kernel\Contracts\MessageInterface; -use EasyWeChat\Kernel\Exceptions\RuntimeException; - -/** - * Class MessageBuilder. - * - * @author overtrue - */ -class MessageBuilder -{ - /** - * @var array - */ - protected $to = []; - - /** - * @var \EasyWeChat\Kernel\Contracts\MessageInterface - */ - protected $message; - - /** - * @var array - */ - protected $attributes = []; - - /** - * Set message. - * - * @return $this - */ - public function message(MessageInterface $message) - { - $this->message = $message; - - return $this; - } - - /** - * Set target user or group. - * - * @return $this - */ - public function to(array $to) - { - $this->to = $to; - - return $this; - } - - /** - * @return \EasyWeChat\OfficialAccount\Broadcasting\MessageBuilder - */ - public function toTag(int $tagId) - { - $this->to([ - 'filter' => [ - 'is_to_all' => false, - 'tag_id' => $tagId, - ], - ]); - - return $this; - } - - /** - * @return \EasyWeChat\OfficialAccount\Broadcasting\MessageBuilder - */ - public function toUsers(array $openids) - { - $this->to([ - 'touser' => $openids, - ]); - - return $this; - } - - /** - * @return $this - */ - public function toAll() - { - $this->to([ - 'filter' => ['is_to_all' => true], - ]); - - return $this; - } - - /** - * @return \EasyWeChat\OfficialAccount\Broadcasting\MessageBuilder - */ - public function with(array $attributes) - { - $this->attributes = $attributes; - - return $this; - } - - /** - * Build message. - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function build(array $prepends = []): array - { - if (empty($this->message)) { - throw new RuntimeException('No message content to send.'); - } - - $content = $this->message->transformForJsonRequest(); - - if (empty($prepends)) { - $prepends = $this->to; - } - - $message = array_merge($prepends, $content, $this->attributes); - - return $message; - } - - /** - * Build preview message. - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function buildForPreview(string $by, string $user): array - { - return $this->build([$by => $user]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/ServiceProvider.php deleted file mode 100644 index 1f956cf..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Broadcasting; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['broadcasting'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/BoardingPassClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/BoardingPassClient.php deleted file mode 100644 index de33298..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/BoardingPassClient.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -/** - * Class BoardingPassClient. - * - * @author overtrue - */ -class BoardingPassClient extends Client -{ - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function checkin(array $params) - { - return $this->httpPostJson('card/boardingpass/checkin', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/Card.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/Card.php deleted file mode 100644 index 14e817b..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/Card.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class Card. - * - * @author overtrue - * - * @property \EasyWeChat\OfficialAccount\Card\CodeClient $code - * @property \EasyWeChat\OfficialAccount\Card\MeetingTicketClient $meeting_ticket - * @property \EasyWeChat\OfficialAccount\Card\MemberCardClient $member_card - * @property \EasyWeChat\OfficialAccount\Card\GeneralCardClient $general_card - * @property \EasyWeChat\OfficialAccount\Card\MovieTicketClient $movie_ticket - * @property \EasyWeChat\OfficialAccount\Card\CoinClient $coin - * @property \EasyWeChat\OfficialAccount\Card\SubMerchantClient $sub_merchant - * @property \EasyWeChat\OfficialAccount\Card\BoardingPassClient $boarding_pass - * @property \EasyWeChat\OfficialAccount\Card\JssdkClient $jssdk - * @property \EasyWeChat\OfficialAccount\Card\GiftCardClient $gift_card - * @property \EasyWeChat\OfficialAccount\Card\GiftCardOrderClient $gift_card_order - * @property \EasyWeChat\OfficialAccount\Card\GiftCardPageClient $gift_card_page - * @property \EasyWeChat\OfficialAccount\Card\InvoiceClient $invoice - */ -class Card extends Client -{ - /** - * @param string $property - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function __get($property) - { - if (isset($this->app["card.{$property}"])) { - return $this->app["card.{$property}"]; - } - - throw new InvalidArgumentException(sprintf('No card service named "%s".', $property)); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/Client.php deleted file mode 100644 index 9db4e1b..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/Client.php +++ /dev/null @@ -1,422 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Traits\InteractsWithCache; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - use InteractsWithCache; - - /** - * @var string - */ - protected $url; - - /** - * Ticket cache key. - * - * @var string - */ - protected $ticketCacheKey; - - /** - * Ticket cache prefix. - * - * @var string - */ - protected $ticketCachePrefix = 'easywechat.official_account.card.api_ticket.'; - - /** - * 获取卡券颜色. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function colors() - { - return $this->httpGet('card/getcolors'); - } - - /** - * 卡券开放类目查询接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function categories() - { - return $this->httpGet('card/getapplyprotocol'); - } - - /** - * 创建卡券. - * - * @param string $cardType - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create($cardType = 'member_card', array $attributes) - { - $params = [ - 'card' => [ - 'card_type' => strtoupper($cardType), - strtolower($cardType) => $attributes, - ], - ]; - - return $this->httpPostJson('card/create', $params); - } - - /** - * 查看卡券详情. - * - * @param string $cardId - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get($cardId) - { - $params = [ - 'card_id' => $cardId, - ]; - - return $this->httpPostJson('card/get', $params); - } - - /** - * 批量查询卡列表. - * - * @param int $offset - * @param int $count - * @param string $statusList - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list($offset = 0, $count = 10, $statusList = 'CARD_STATUS_VERIFY_OK') - { - $params = [ - 'offset' => $offset, - 'count' => $count, - 'status_list' => $statusList, - ]; - - return $this->httpPostJson('card/batchget', $params); - } - - /** - * 更改卡券信息接口 and 设置跟随推荐接口. - * - * @param string $cardId - * @param string $type - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update($cardId, $type, array $attributes = []) - { - $card = []; - $card['card_id'] = $cardId; - $card[strtolower($type)] = $attributes; - - return $this->httpPostJson('card/update', $card); - } - - /** - * 删除卡券接口. - * - * @param string $cardId - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete($cardId) - { - $params = [ - 'card_id' => $cardId, - ]; - - return $this->httpPostJson('card/delete', $params); - } - - /** - * 创建二维码. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createQrCode(array $cards) - { - return $this->httpPostJson('card/qrcode/create', $cards); - } - - /** - * ticket 换取二维码图片. - * - * @param string $ticket - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getQrCode($ticket) - { - $baseUri = 'https://mp.weixin.qq.com/cgi-bin/showqrcode'; - $params = [ - 'ticket' => $ticket, - ]; - - $response = $this->requestRaw($baseUri, 'GET', $params); - - return [ - 'status' => $response->getStatusCode(), - 'reason' => $response->getReasonPhrase(), - 'headers' => $response->getHeaders(), - 'body' => strval($response->getBody()), - 'url' => $baseUri.'?'.http_build_query($params), - ]; - } - - /** - * 通过ticket换取二维码 链接. - * - * @param string $ticket - * - * @return string - */ - public function getQrCodeUrl($ticket) - { - return sprintf('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=%s', $ticket); - } - - /** - * 创建货架接口. - * - * @param string $banner - * @param string $pageTitle - * @param bool $canShare - * @param string $scene [SCENE_NEAR_BY 附近,SCENE_MENU 自定义菜单,SCENE_QRCODE 二维码,SCENE_ARTICLE 公众号文章, - * SCENE_H5 h5页面,SCENE_IVR 自动回复,SCENE_CARD_CUSTOM_CELL 卡券自定义cell] - * @param array $cardList - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createLandingPage($banner, $pageTitle, $canShare, $scene, $cardList) - { - $params = [ - 'banner' => $banner, - 'page_title' => $pageTitle, - 'can_share' => $canShare, - 'scene' => $scene, - 'card_list' => $cardList, - ]; - - return $this->httpPostJson('card/landingpage/create', $params); - } - - /** - * 图文消息群发卡券. - * - * @param string $cardId - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getHtml($cardId) - { - $params = [ - 'card_id' => $cardId, - ]; - - return $this->httpPostJson('card/mpnews/gethtml', $params); - } - - /** - * 设置测试白名单. - * - * @param array $openids - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setTestWhitelist($openids) - { - $params = [ - 'openid' => $openids, - ]; - - return $this->httpPostJson('card/testwhitelist/set', $params); - } - - /** - * 设置测试白名单(by username). - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setTestWhitelistByName(array $usernames) - { - $params = [ - 'username' => $usernames, - ]; - - return $this->httpPostJson('card/testwhitelist/set', $params); - } - - /** - * 获取用户已领取卡券接口. - * - * @param string $openid - * @param string $cardId - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getUserCards($openid, $cardId = '') - { - $params = [ - 'openid' => $openid, - 'card_id' => $cardId, - ]; - - return $this->httpPostJson('card/user/getcardlist', $params); - } - - /** - * 设置微信买单接口. - * 设置买单的 card_id 必须已经配置了门店,否则会报错. - * - * @param string $cardId - * @param bool $isOpen - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setPayCell($cardId, $isOpen = true) - { - $params = [ - 'card_id' => $cardId, - 'is_open' => $isOpen, - ]; - - return $this->httpPostJson('card/paycell/set', $params); - } - - /** - * 设置自助核销接口 - * 设置买单的 card_id 必须已经配置了门店,否则会报错. - * - * @param string $cardId - * @param bool $isOpen - * @param bool $verifyCod - * @param bool $remarkAmount - * - * @return mixed - */ - public function setPayConsumeCell($cardId, $isOpen = true, $verifyCod = false, $remarkAmount = false) - { - $params = [ - 'card_id' => $cardId, - 'is_open' => $isOpen, - 'need_verify_cod' => $verifyCod, - 'need_remark_amount' => $remarkAmount, - ]; - - return $this->httpPostJson('card/selfconsumecell/set', $params); - } - - /** - * 增加库存. - * - * @param string $cardId - * @param int $amount - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function increaseStock($cardId, $amount) - { - return $this->updateStock($cardId, $amount, 'increase'); - } - - /** - * 减少库存. - * - * @param string $cardId - * @param int $amount - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function reduceStock($cardId, $amount) - { - return $this->updateStock($cardId, $amount, 'reduce'); - } - - /** - * 修改库存接口. - * - * @param string $cardId - * @param int $amount - * @param string $action - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function updateStock($cardId, $amount, $action = 'increase') - { - $key = 'increase' === $action ? 'increase_stock_value' : 'reduce_stock_value'; - $params = [ - 'card_id' => $cardId, - $key => abs($amount), - ]; - - return $this->httpPostJson('card/modifystock', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/CodeClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/CodeClient.php deleted file mode 100644 index 8a000a3..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/CodeClient.php +++ /dev/null @@ -1,169 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class CodeClient. - * - * @author overtrue - */ -class CodeClient extends BaseClient -{ - /** - * 导入code接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deposit(string $cardId, array $codes) - { - $params = [ - 'card_id' => $cardId, - 'code' => $codes, - ]; - - return $this->httpPostJson('card/code/deposit', $params); - } - - /** - * 查询导入code数目. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getDepositedCount(string $cardId) - { - $params = [ - 'card_id' => $cardId, - ]; - - return $this->httpPostJson('card/code/getdepositcount', $params); - } - - /** - * 核查code接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function check(string $cardId, array $codes) - { - $params = [ - 'card_id' => $cardId, - 'code' => $codes, - ]; - - return $this->httpPostJson('card/code/checkcode', $params); - } - - /** - * 查询 Code 接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $code, string $cardId = '', bool $checkConsume = true) - { - $params = [ - 'code' => $code, - 'check_consume' => $checkConsume, - 'card_id' => $cardId, - ]; - - return $this->httpPostJson('card/code/get', $params); - } - - /** - * 更改Code接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $code, string $newCode, string $cardId = '') - { - $params = [ - 'code' => $code, - 'new_code' => $newCode, - 'card_id' => $cardId, - ]; - - return $this->httpPostJson('card/code/update', $params); - } - - /** - * 设置卡券失效. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function disable(string $code, string $cardId = '') - { - $params = [ - 'code' => $code, - 'card_id' => $cardId, - ]; - - return $this->httpPostJson('card/code/unavailable', $params); - } - - /** - * 核销 Code 接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function consume(string $code, string $cardId = null) - { - $params = [ - 'code' => $code, - ]; - - if (!is_null($cardId)) { - $params['card_id'] = $cardId; - } - - return $this->httpPostJson('card/code/consume', $params); - } - - /** - * Code解码接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function decrypt(string $encryptedCode) - { - $params = [ - 'encrypt_code' => $encryptedCode, - ]; - - return $this->httpPostJson('card/code/decrypt', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/CoinClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/CoinClient.php deleted file mode 100644 index ceb93c5..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/CoinClient.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class CoinClient. - * - * @author overtrue - */ -class CoinClient extends BaseClient -{ - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function activate() - { - return $this->httpGet('card/pay/activate'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getPrice(string $cardId, int $quantity) - { - return $this->httpPostJson('card/pay/getpayprice', [ - 'card_id' => $cardId, - 'quantity' => $quantity, - ]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function summary() - { - return $this->httpGet('card/pay/getcoinsinfo'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function recharge(int $count) - { - return $this->httpPostJson('card/pay/recharge', [ - 'coin_count' => $count, - ]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function order(string $orderId) - { - return $this->httpPostJson('card/pay/getorder', ['order_id' => $orderId]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function orders(array $filters) - { - return $this->httpPostJson('card/pay/getorderlist', $filters); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function confirm(string $cardId, string $orderId, int $quantity) - { - return $this->httpPostJson('card/pay/confirm', [ - 'card_id' => $cardId, - 'order_id' => $orderId, - 'quantity' => $quantity, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/GeneralCardClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/GeneralCardClient.php deleted file mode 100644 index 5f52e17..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/GeneralCardClient.php +++ /dev/null @@ -1,64 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -/** - * Class GeneralCardClient. - * - * @author overtrue - */ -class GeneralCardClient extends Client -{ - /** - * 通用卡接口激活. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function activate(array $info = []) - { - return $this->httpPostJson('card/generalcard/activate', $info); - } - - /** - * 通用卡撤销激活. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deactivate(string $cardId, string $code) - { - $params = [ - 'card_id' => $cardId, - 'code' => $code, - ]; - - return $this->httpPostJson('card/generalcard/unactivate', $params); - } - - /** - * 更新会员信息. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateUser(array $params = []) - { - return $this->httpPostJson('card/generalcard/updateuser', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardClient.php deleted file mode 100644 index 938f8c9..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardClient.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class GiftCardClient. - * - * @author overtrue - */ -class GiftCardClient extends BaseClient -{ - /** - * 申请微信支付礼品卡权限接口. - * - * @return mixed - */ - public function add(string $subMchId) - { - $params = [ - 'sub_mch_id' => $subMchId, - ]; - - return $this->httpPostJson('card/giftcard/pay/whitelist/add', $params); - } - - /** - * 绑定商户号到礼品卡小程序接口(商户号必须为公众号申请的商户号,否则报错). - * - * @return mixed - */ - public function bind(string $subMchId, string $wxaAppid) - { - $params = [ - 'sub_mch_id' => $subMchId, - 'wxa_appid' => $wxaAppid, - ]; - - return $this->httpPostJson('card/giftcard/pay/submch/bind', $params); - } - - /** - * 上传小程序代码. - * - * @return mixed - */ - public function set(string $wxaAppid, string $pageId) - { - $params = [ - 'wxa_appid' => $wxaAppid, - 'page_id' => $pageId, - ]; - - return $this->httpPostJson('card/giftcard/wxa/set', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardOrderClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardOrderClient.php deleted file mode 100644 index 9f3be73..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardOrderClient.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class GiftCardOrderClient. - * - * @author overtrue - */ -class GiftCardOrderClient extends BaseClient -{ - /** - * 查询-单个礼品卡订单信息接口. - * - * @return mixed - */ - public function get(string $orderId) - { - $params = [ - 'order_id' => $orderId, - ]; - - return $this->httpPostJson('card/giftcard/order/get', $params); - } - - /** - * 查询-批量查询礼品卡订单信息接口. - * - * @return mixed - */ - public function list(int $beginTime, int $endTime, int $offset = 0, int $count = 10, string $sortType = 'ASC') - { - $params = [ - 'begin_time' => $beginTime, - 'end_time' => $endTime, - 'sort_type' => $sortType, - 'offset' => $offset, - 'count' => $count, - ]; - - return $this->httpPostJson('card/giftcard/order/batchget', $params); - } - - /** - * 退款接口. - * - * @return mixed - */ - public function refund(string $orderId) - { - $params = [ - 'order_id' => $orderId, - ]; - - return $this->httpPostJson('card/giftcard/order/refund', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardPageClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardPageClient.php deleted file mode 100644 index c525ec6..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/GiftCardPageClient.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class GiftCardPageClient. - * - * @author overtrue - */ -class GiftCardPageClient extends BaseClient -{ - /** - * 创建-礼品卡货架接口. - * - * @return mixed - */ - public function add(array $attributes) - { - $params = [ - 'page' => $attributes, - ]; - - return $this->httpPostJson('card/giftcard/page/add', $params); - } - - /** - * 查询-礼品卡货架信息接口. - * - * @return mixed - */ - public function get(string $pageId) - { - $params = [ - 'page_id' => $pageId, - ]; - - return $this->httpPostJson('card/giftcard/page/get', $params); - } - - /** - * 修改-礼品卡货架信息接口. - * - * @return mixed - */ - public function update(string $pageId, string $bannerPicUrl, array $themeList) - { - $params = [ - 'page' => [ - 'page_id' => $pageId, - 'banner_pic_url' => $bannerPicUrl, - 'theme_list' => $themeList, - ], - ]; - - return $this->httpPostJson('card/giftcard/page/update', $params); - } - - /** - * 查询-礼品卡货架列表接口. - * - * @return mixed - */ - public function list() - { - return $this->httpPostJson('card/giftcard/page/batchget'); - } - - /** - * 下架-礼品卡货架接口(下架某一个货架或者全部货架). - * - * @return mixed - */ - public function setMaintain(string $pageId = '') - { - $params = ($pageId ? ['page_id' => $pageId] : ['all' => true]) + [ - 'maintain' => true, - ]; - - return $this->httpPostJson('card/giftcard/maintain/set', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/InvoiceClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/InvoiceClient.php deleted file mode 100644 index d80d3bb..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/InvoiceClient.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class InvoiceClient. - * - * @author overtrue - */ -class InvoiceClient extends BaseClient -{ - /** - * 设置支付后开票信息接口. - * - * @return mixed - */ - public function set(string $mchid, string $sPappid) - { - $params = [ - 'paymch_info' => [ - 'mchid' => $mchid, - 's_pappid' => $sPappid, - ], - ]; - - return $this->setBizAttr('set_pay_mch', $params); - } - - /** - * 查询支付后开票信息接口. - * - * @return mixed - */ - public function get() - { - return $this->setBizAttr('get_pay_mch'); - } - - /** - * 设置授权页字段信息接口. - * - * @return mixed - */ - public function setAuthField(array $userData, array $bizData) - { - $params = [ - 'auth_field' => [ - 'user_field' => $userData, - 'biz_field' => $bizData, - ], - ]; - - return $this->setBizAttr('set_auth_field', $params); - } - - /** - * 查询授权页字段信息接口. - * - * @return mixed - */ - public function getAuthField() - { - return $this->setBizAttr('get_auth_field'); - } - - /** - * 查询开票信息. - * - * @return mixed - */ - public function getAuthData(string $appId, string $orderId) - { - $params = [ - 'order_id' => $orderId, - 's_appid' => $appId, - ]; - - return $this->httpPost('card/invoice/getauthdata', $params); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - private function setBizAttr(string $action, array $params = []) - { - return $this->httpPostJson('card/invoice/setbizattr', $params, ['action' => $action]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/JssdkClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/JssdkClient.php deleted file mode 100644 index 7630724..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/JssdkClient.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\BasicService\Jssdk\Client as Jssdk; -use EasyWeChat\Kernel\Support\Arr; -use function EasyWeChat\Kernel\Support\str_random; - -/** - * Class Jssdk. - * - * @author overtrue - */ -class JssdkClient extends Jssdk -{ - /** - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function getTicket(bool $refresh = false, string $type = 'wx_card'): array - { - return parent::getTicket($refresh, $type); - } - - /** - * 微信卡券:JSAPI 卡券发放. - * - * @return string - */ - public function assign(array $cards) - { - return json_encode(array_map(function ($card) { - return $this->attachExtension($card['card_id'], $card); - }, $cards)); - } - - /** - * 生成 js添加到卡包 需要的 card_list 项. - * - * @param string $cardId - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function attachExtension($cardId, array $extension = []) - { - $timestamp = time(); - $nonce = str_random(6); - $ticket = $this->getTicket()['ticket']; - - $ext = array_merge(['timestamp' => $timestamp, 'nonce_str' => $nonce], Arr::only( - $extension, - ['code', 'openid', 'outer_id', 'balance', 'fixed_begintimestamp', 'outer_str'] - )); - - $ext['signature'] = $this->dictionaryOrderSignature($ticket, $timestamp, $cardId, $ext['code'] ?? '', $ext['openid'] ?? '', $nonce); - - return [ - 'cardId' => $cardId, - 'cardExt' => json_encode($ext), - ]; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/MeetingTicketClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/MeetingTicketClient.php deleted file mode 100644 index ae0cff7..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/MeetingTicketClient.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -/** - * Class MeetingTicketClient. - * - * @author overtrue - */ -class MeetingTicketClient extends Client -{ - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateUser(array $params) - { - return $this->httpPostJson('card/meetingticket/updateuser', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/MemberCardClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/MemberCardClient.php deleted file mode 100644 index f2a9758..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/MemberCardClient.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -/** - * Class MemberCardClient. - * - * @author overtrue - */ -class MemberCardClient extends Client -{ - /** - * 会员卡接口激活. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function activate(array $info = []) - { - return $this->httpPostJson('card/membercard/activate', $info); - } - - /** - * 设置开卡字段接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setActivationForm(string $cardId, array $settings) - { - $params = array_merge(['card_id' => $cardId], $settings); - - return $this->httpPostJson('card/membercard/activateuserform/set', $params); - } - - /** - * 拉取会员信息接口. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getUser(string $cardId, string $code) - { - $params = [ - 'card_id' => $cardId, - 'code' => $code, - ]; - - return $this->httpPostJson('card/membercard/userinfo/get', $params); - } - - /** - * 更新会员信息. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateUser(array $params = []) - { - return $this->httpPostJson('card/membercard/updateuser', $params); - } - - /** - * 获取用户提交资料. - * - * @param string $activateTicket - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getActivationForm($activateTicket) - { - $params = [ - 'activate_ticket' => $activateTicket, - ]; - - return $this->httpPostJson('card/membercard/activatetempinfo/get', $params); - } - - /** - * 获取开卡组件链接接口. - * - * @param array $params 包含会员卡ID和随机字符串 - * - * @return string 开卡组件链接 - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getActivateUrl(array $params = []) - { - return $this->httpPostJson('card/membercard/activate/geturl', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/MovieTicketClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/MovieTicketClient.php deleted file mode 100644 index 9540a74..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/MovieTicketClient.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -/** - * Class MovieTicketClient. - * - * @author overtrue - */ -class MovieTicketClient extends Client -{ - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateUser(array $params) - { - return $this->httpPostJson('card/movieticket/updateuser', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/ServiceProvider.php deleted file mode 100644 index 3807fa3..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/ServiceProvider.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['card'] = function ($app) { - return new Card($app); - }; - - $app['card.client'] = function ($app) { - return new Client($app); - }; - - $app['card.coin'] = function ($app) { - return new CoinClient($app); - }; - - $app['card.sub_merchant'] = function ($app) { - return new SubMerchantClient($app); - }; - - $app['card.code'] = function ($app) { - return new CodeClient($app); - }; - - $app['card.movie_ticket'] = function ($app) { - return new MovieTicketClient($app); - }; - - $app['card.member_card'] = function ($app) { - return new MemberCardClient($app); - }; - - $app['card.general_card'] = function ($app) { - return new GeneralCardClient($app); - }; - - $app['card.boarding_pass'] = function ($app) { - return new BoardingPassClient($app); - }; - - $app['card.meeting_ticket'] = function ($app) { - return new MeetingTicketClient($app); - }; - - $app['card.jssdk'] = function ($app) { - return new JssdkClient($app); - }; - - $app['card.gift_card'] = function ($app) { - return new GiftCardClient($app); - }; - - $app['card.gift_card_order'] = function ($app) { - return new GiftCardOrderClient($app); - }; - - $app['card.gift_card_page'] = function ($app) { - return new GiftCardPageClient($app); - }; - - $app['card.invoice'] = function ($app) { - return new InvoiceClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/SubMerchantClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/SubMerchantClient.php deleted file mode 100644 index cf09c81..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Card/SubMerchantClient.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Card; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Support\Arr; - -/** - * Class SubMerchantClient. - * - * @author overtrue - */ -class SubMerchantClient extends BaseClient -{ - /** - * 添加子商户. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $info = []) - { - $params = [ - 'info' => Arr::only($info, [ - 'brand_name', - 'logo_url', - 'protocol', - 'end_time', - 'primary_category_id', - 'secondary_category_id', - 'agreement_media_id', - 'operator_media_id', - 'app_id', - ]), - ]; - - return $this->httpPostJson('card/submerchant/submit', $params); - } - - /** - * 更新子商户. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $merchantId, array $info = []) - { - $params = [ - 'info' => array_merge( - ['merchant_id' => $merchantId], - Arr::only($info, [ - 'brand_name', - 'logo_url', - 'protocol', - 'end_time', - 'primary_category_id', - 'secondary_category_id', - 'agreement_media_id', - 'operator_media_id', - 'app_id', - ]) - ), - ]; - - return $this->httpPostJson('card/submerchant/update', $params); - } - - /** - * 获取子商户信息. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(int $merchantId) - { - return $this->httpPostJson('card/submerchant/get', ['merchant_id' => $merchantId]); - } - - /** - * 批量获取子商户信息. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(int $beginId = 0, int $limit = 50, string $status = 'CHECKING') - { - $params = [ - 'begin_id' => $beginId, - 'limit' => $limit, - 'status' => $status, - ]; - - return $this->httpPostJson('card/submerchant/batchget', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Comment/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Comment/Client.php deleted file mode 100644 index 6a5da10..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Comment/Client.php +++ /dev/null @@ -1,175 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Comment; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * Open article comment. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function open(string $msgId, int $index = null) - { - $params = [ - 'msg_data_id' => $msgId, - 'index' => $index, - ]; - - return $this->httpPostJson('cgi-bin/comment/open', $params); - } - - /** - * Close comment. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function close(string $msgId, int $index = null) - { - $params = [ - 'msg_data_id' => $msgId, - 'index' => $index, - ]; - - return $this->httpPostJson('cgi-bin/comment/close', $params); - } - - /** - * Get article comments. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(string $msgId, int $index, int $begin, int $count, int $type = 0) - { - $params = [ - 'msg_data_id' => $msgId, - 'index' => $index, - 'begin' => $begin, - 'count' => $count, - 'type' => $type, - ]; - - return $this->httpPostJson('cgi-bin/comment/list', $params); - } - - /** - * Mark elect comment. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function markElect(string $msgId, int $index, int $commentId) - { - $params = [ - 'msg_data_id' => $msgId, - 'index' => $index, - 'user_comment_id' => $commentId, - ]; - - return $this->httpPostJson('cgi-bin/comment/markelect', $params); - } - - /** - * Unmark elect comment. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unmarkElect(string $msgId, int $index, int $commentId) - { - $params = [ - 'msg_data_id' => $msgId, - 'index' => $index, - 'user_comment_id' => $commentId, - ]; - - return $this->httpPostJson('cgi-bin/comment/unmarkelect', $params); - } - - /** - * Delete comment. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $msgId, int $index, int $commentId) - { - $params = [ - 'msg_data_id' => $msgId, - 'index' => $index, - 'user_comment_id' => $commentId, - ]; - - return $this->httpPostJson('cgi-bin/comment/delete', $params); - } - - /** - * Reply to a comment. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function reply(string $msgId, int $index, int $commentId, string $content) - { - $params = [ - 'msg_data_id' => $msgId, - 'index' => $index, - 'user_comment_id' => $commentId, - 'content' => $content, - ]; - - return $this->httpPostJson('cgi-bin/comment/reply/add', $params); - } - - /** - * Delete a reply. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deleteReply(string $msgId, int $index, int $commentId) - { - $params = [ - 'msg_data_id' => $msgId, - 'index' => $index, - 'user_comment_id' => $commentId, - ]; - - return $this->httpPostJson('cgi-bin/comment/reply/delete', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Comment/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Comment/ServiceProvider.php deleted file mode 100644 index 8d6806c..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Comment/ServiceProvider.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -/** - * ServiceProvider.php. - * - * This file is part of the wechat. - * - * (c) overtrue - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Comment; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['comment'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Client.php deleted file mode 100644 index 7726910..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Client.php +++ /dev/null @@ -1,208 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\CustomerService; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * List all staffs. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list() - { - return $this->httpGet('cgi-bin/customservice/getkflist'); - } - - /** - * List all online staffs. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function online() - { - return $this->httpGet('cgi-bin/customservice/getonlinekflist'); - } - - /** - * Create a staff. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(string $account, string $nickname) - { - $params = [ - 'kf_account' => $account, - 'nickname' => $nickname, - ]; - - return $this->httpPostJson('customservice/kfaccount/add', $params); - } - - /** - * Update a staff. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $account, string $nickname) - { - $params = [ - 'kf_account' => $account, - 'nickname' => $nickname, - ]; - - return $this->httpPostJson('customservice/kfaccount/update', $params); - } - - /** - * Delete a staff. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $account) - { - return $this->httpPostJson('customservice/kfaccount/del', [], ['kf_account' => $account]); - } - - /** - * Invite a staff. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function invite(string $account, string $wechatId) - { - $params = [ - 'kf_account' => $account, - 'invite_wx' => $wechatId, - ]; - - return $this->httpPostJson('customservice/kfaccount/inviteworker', $params); - } - - /** - * Set staff avatar. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setAvatar(string $account, string $path) - { - return $this->httpUpload('customservice/kfaccount/uploadheadimg', ['media' => $path], [], ['kf_account' => $account]); - } - - /** - * Get message builder. - * - * @param \EasyWeChat\Kernel\Messages\Message|string $message - * - * @return \EasyWeChat\OfficialAccount\CustomerService\Messenger - */ - public function message($message) - { - $messageBuilder = new Messenger($this); - - return $messageBuilder->message($message); - } - - /** - * Send a message. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(array $message) - { - return $this->httpPostJson('cgi-bin/message/custom/send', $message); - } - - /** - * Show typing status. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function showTypingStatusToUser(string $openid) - { - return $this->httpPostJson('cgi-bin/message/custom/typing', [ - 'touser' => $openid, - 'command' => 'Typing', - ]); - } - - /** - * Hide typing status. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function hideTypingStatusToUser(string $openid) - { - return $this->httpPostJson('cgi-bin/message/custom/typing', [ - 'touser' => $openid, - 'command' => 'CancelTyping', - ]); - } - - /** - * Get messages history. - * - * @param int $startTime - * @param int $endTime - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function messages($startTime, $endTime, int $msgId = 1, int $number = 10000) - { - $params = [ - 'starttime' => is_numeric($startTime) ? $startTime : strtotime($startTime), - 'endtime' => is_numeric($endTime) ? $endTime : strtotime($endTime), - 'msgid' => $msgId, - 'number' => $number, - ]; - - return $this->httpPostJson('customservice/msgrecord/getmsglist', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Messenger.php b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Messenger.php deleted file mode 100644 index 4b66a9e..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Messenger.php +++ /dev/null @@ -1,159 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\CustomerService; - -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Messages\Message; -use EasyWeChat\Kernel\Messages\Raw as RawMessage; -use EasyWeChat\Kernel\Messages\Text; - -/** - * Class MessageBuilder. - * - * @author overtrue - */ -class Messenger -{ - /** - * Messages to send. - * - * @var \EasyWeChat\Kernel\Messages\Message; - */ - protected $message; - - /** - * Messages target user open id. - * - * @var string - */ - protected $to; - - /** - * Messages sender staff id. - * - * @var string - */ - protected $account; - - /** - * Customer service instance. - * - * @var \EasyWeChat\OfficialAccount\CustomerService\Client - */ - protected $client; - - /** - * MessageBuilder constructor. - * - * @param \EasyWeChat\OfficialAccount\CustomerService\Client $client - */ - public function __construct(Client $client) - { - $this->client = $client; - } - - /** - * Set message to send. - * - * @param string|Message $message - * - * @return Messenger - */ - public function message($message) - { - if (is_string($message)) { - $message = new Text($message); - } - - $this->message = $message; - - return $this; - } - - /** - * Set staff account to send message. - * - * @return Messenger - */ - public function by(string $account) - { - $this->account = $account; - - return $this; - } - - /** - * @return Messenger - */ - public function from(string $account) - { - return $this->by($account); - } - - /** - * Set target user open id. - * - * @param string $openid - * - * @return Messenger - */ - public function to($openid) - { - $this->to = $openid; - - return $this; - } - - /** - * Send the message. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function send() - { - if (empty($this->message)) { - throw new RuntimeException('No message to send.'); - } - - if ($this->message instanceof RawMessage) { - $message = json_decode($this->message->get('content'), true); - } else { - $prepends = [ - 'touser' => $this->to, - ]; - if ($this->account) { - $prepends['customservice'] = ['kf_account' => $this->account]; - } - $message = $this->message->transformForJsonRequest($prepends); - } - - return $this->client->send($message); - } - - /** - * Return property. - * - * @return mixed - */ - public function __get(string $property) - { - if (property_exists($this, $property)) { - return $this->$property; - } - - return null; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/ServiceProvider.php deleted file mode 100644 index a879ce8..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/ServiceProvider.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\CustomerService; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['customer_service'] = function ($app) { - return new Client($app); - }; - - $app['customer_service_session'] = function ($app) { - return new SessionClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/SessionClient.php b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/SessionClient.php deleted file mode 100644 index 0802b32..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/SessionClient.php +++ /dev/null @@ -1,94 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\CustomerService; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class SessionClient. - * - * @author overtrue - */ -class SessionClient extends BaseClient -{ - /** - * List all sessions of $account. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list(string $account) - { - return $this->httpGet('customservice/kfsession/getsessionlist', ['kf_account' => $account]); - } - - /** - * List all the people waiting. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function waiting() - { - return $this->httpGet('customservice/kfsession/getwaitcase'); - } - - /** - * Create a session. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(string $account, string $openid) - { - $params = [ - 'kf_account' => $account, - 'openid' => $openid, - ]; - - return $this->httpPostJson('customservice/kfsession/create', $params); - } - - /** - * Close a session. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function close(string $account, string $openid) - { - $params = [ - 'kf_account' => $account, - 'openid' => $openid, - ]; - - return $this->httpPostJson('customservice/kfsession/close', $params); - } - - /** - * Get a session. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function get(string $openid) - { - return $this->httpGet('customservice/kfsession/getsession', ['openid' => $openid]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/DataCube/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/DataCube/Client.php deleted file mode 100644 index ca53024..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/DataCube/Client.php +++ /dev/null @@ -1,271 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\DataCube; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * 获取用户增减数据. - * - * @return mixed - */ - public function userSummary(string $from, string $to) - { - return $this->query('datacube/getusersummary', $from, $to); - } - - /** - * 获取累计用户数据. - * - * @return mixed - */ - public function userCumulate(string $from, string $to) - { - return $this->query('datacube/getusercumulate', $from, $to); - } - - /** - * 获取图文群发每日数据. - * - * @return mixed - */ - public function articleSummary(string $from, string $to) - { - return $this->query('datacube/getarticlesummary', $from, $to); - } - - /** - * 获取图文群发总数据. - * - * @return mixed - */ - public function articleTotal(string $from, string $to) - { - return $this->query('datacube/getarticletotal', $from, $to); - } - - /** - * 获取图文统计数据. - * - * @return mixed - */ - public function userReadSummary(string $from, string $to) - { - return $this->query('datacube/getuserread', $from, $to); - } - - /** - * 获取图文统计分时数据. - * - * @return mixed - */ - public function userReadHourly(string $from, string $to) - { - return $this->query('datacube/getuserreadhour', $from, $to); - } - - /** - * 获取图文分享转发数据. - * - * @return mixed - */ - public function userShareSummary(string $from, string $to) - { - return $this->query('datacube/getusershare', $from, $to); - } - - /** - * 获取图文分享转发分时数据. - * - * @return mixed - */ - public function userShareHourly(string $from, string $to) - { - return $this->query('datacube/getusersharehour', $from, $to); - } - - /** - * 获取消息发送概况数据. - * - * @return mixed - */ - public function upstreamMessageSummary(string $from, string $to) - { - return $this->query('datacube/getupstreammsg', $from, $to); - } - - /** - * 获取消息分送分时数据. - * - * @return mixed - */ - public function upstreamMessageHourly(string $from, string $to) - { - return $this->query('datacube/getupstreammsghour', $from, $to); - } - - /** - * 获取消息发送周数据. - * - * @return mixed - */ - public function upstreamMessageWeekly(string $from, string $to) - { - return $this->query('datacube/getupstreammsgweek', $from, $to); - } - - /** - * 获取消息发送月数据. - * - * @return mixed - */ - public function upstreamMessageMonthly(string $from, string $to) - { - return $this->query('datacube/getupstreammsgmonth', $from, $to); - } - - /** - * 获取消息发送分布数据. - * - * @return mixed - */ - public function upstreamMessageDistSummary(string $from, string $to) - { - return $this->query('datacube/getupstreammsgdist', $from, $to); - } - - /** - * 获取消息发送分布周数据. - * - * @return mixed - */ - public function upstreamMessageDistWeekly(string $from, string $to) - { - return $this->query('datacube/getupstreammsgdistweek', $from, $to); - } - - /** - * 获取消息发送分布月数据. - * - * @return mixed - */ - public function upstreamMessageDistMonthly(string $from, string $to) - { - return $this->query('datacube/getupstreammsgdistmonth', $from, $to); - } - - /** - * 获取接口分析数据. - * - * @return mixed - */ - public function interfaceSummary(string $from, string $to) - { - return $this->query('datacube/getinterfacesummary', $from, $to); - } - - /** - * 获取接口分析分时数据. - * - * @return mixed - */ - public function interfaceSummaryHourly(string $from, string $to) - { - return $this->query('datacube/getinterfacesummaryhour', $from, $to); - } - - /** - * 拉取卡券概况数据接口. - * - * @param int $condSource - * - * @return mixed - */ - public function cardSummary(string $from, string $to, $condSource = 0) - { - $ext = [ - 'cond_source' => intval($condSource), - ]; - - return $this->query('datacube/getcardbizuininfo', $from, $to, $ext); - } - - /** - * 获取免费券数据接口. - * - * @return mixed - */ - public function freeCardSummary(string $from, string $to, int $condSource = 0, string $cardId = '') - { - $ext = [ - 'cond_source' => intval($condSource), - 'card_id' => $cardId, - ]; - - return $this->query('datacube/getcardcardinfo', $from, $to, $ext); - } - - /** - * 拉取会员卡数据接口. - * - * @param int $condSource - * - * @return mixed - */ - public function memberCardSummary(string $from, string $to, $condSource = 0) - { - $ext = [ - 'cond_source' => intval($condSource), - ]; - - return $this->query('datacube/getcardmembercardinfo', $from, $to, $ext); - } - - /** - * 拉取单张会员卡数据接口. - * - * @return mixed - */ - public function memberCardSummaryById(string $from, string $to, string $cardId) - { - $ext = [ - 'card_id' => $cardId, - ]; - - return $this->query('datacube/getcardmembercarddetail', $from, $to, $ext); - } - - /** - * 查询数据. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function query(string $api, string $from, string $to, array $ext = []) - { - $params = array_merge([ - 'begin_date' => $from, - 'end_date' => $to, - ], $ext); - - return $this->httpPostJson($api, $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/DataCube/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/DataCube/ServiceProvider.php deleted file mode 100644 index bfec89a..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/DataCube/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\DataCube; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['data_cube'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Device/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Device/Client.php deleted file mode 100644 index 7d2bbfc..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Device/Client.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Device; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @see http://iot.weixin.qq.com/wiki/new/index.html - * - * @author soone <66812590@qq.com> - */ -class Client extends BaseClient -{ - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function message(string $deviceId, string $openid, string $content) - { - $params = [ - 'device_type' => $this->app['config']['device_type'], - 'device_id' => $deviceId, - 'open_id' => $openid, - 'content' => base64_encode($content), - ]; - - return $this->httpPostJson('device/transmsg', $params); - } - - /** - * Get device qrcode. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function qrCode(array $deviceIds) - { - $params = [ - 'device_num' => count($deviceIds), - 'device_id_list' => $deviceIds, - ]; - - return $this->httpPostJson('device/create_qrcode', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function authorize(array $devices, string $productId, int $opType = 0) - { - $params = [ - 'device_num' => count($devices), - 'device_list' => $devices, - 'op_type' => $opType, - 'product_id' => $productId, - ]; - - return $this->httpPostJson('device/authorize_device', $params); - } - - /** - * 获取 device id 和二维码 - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function createId(string $productId) - { - $params = [ - 'product_id' => $productId, - ]; - - return $this->httpGet('device/getqrcode', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function bind(string $openid, string $deviceId, string $ticket) - { - $params = [ - 'ticket' => $ticket, - 'device_id' => $deviceId, - 'openid' => $openid, - ]; - - return $this->httpPostJson('device/bind', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unbind(string $openid, string $deviceId, string $ticket) - { - $params = [ - 'ticket' => $ticket, - 'device_id' => $deviceId, - 'openid' => $openid, - ]; - - return $this->httpPostJson('device/unbind', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function forceBind(string $openid, string $deviceId) - { - $params = [ - 'device_id' => $deviceId, - 'openid' => $openid, - ]; - - return $this->httpPostJson('device/compel_bind', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function forceUnbind(string $openid, string $deviceId) - { - $params = [ - 'device_id' => $deviceId, - 'openid' => $openid, - ]; - - return $this->httpPostJson('device/compel_unbind', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function status(string $deviceId) - { - $params = [ - 'device_id' => $deviceId, - ]; - - return $this->httpGet('device/get_stat', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function verify(string $ticket) - { - $params = [ - 'ticket' => $ticket, - ]; - - return $this->httpPost('device/verify_qrcode', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function openid(string $deviceId) - { - $params = [ - 'device_type' => $this->app['config']['device_type'], - 'device_id' => $deviceId, - ]; - - return $this->httpGet('device/get_openid', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function listByOpenid(string $openid) - { - $params = [ - 'openid' => $openid, - ]; - - return $this->httpGet('device/get_bind_device', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Device/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Device/ServiceProvider.php deleted file mode 100644 index e3dce8e..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Device/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Device; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author soone <66812590@qq.com - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['device'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Goods/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Goods/Client.php deleted file mode 100644 index 49c7ec2..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Goods/Client.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Goods; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author her-cat - */ -class Client extends BaseClient -{ - /** - * Add the goods. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function add(array $data) - { - return $this->httpPostJson('scan/product/v2/add', [ - 'product' => $data, - ]); - } - - /** - * Update the goods. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(array $data) - { - return $this->httpPostJson('scan/product/v2/add', [ - 'product' => $data, - ]); - } - - /** - * Get add or update goods results. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function status(string $ticket) - { - return $this->httpPostJson('scan/product/v2/status', [ - 'status_ticket' => $ticket, - ]); - } - - /** - * Get goods information. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $pid) - { - return $this->httpPostJson('scan/product/v2/getinfo', [ - 'product' => [ - 'pid' => $pid, - ], - ]); - } - - /** - * Get a list of goods. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(string $context = '', int $page = 1, int $size = 10) - { - return $this->httpPostJson('scan/product/v2/getinfobypage', [ - 'page_context' => $context, - 'page_num' => $page, - 'page_size' => $size, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Goods/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Goods/ServiceProvider.php deleted file mode 100644 index 38a0902..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Goods/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Goods; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author her-cat - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['goods'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Guide/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Guide/Client.php deleted file mode 100644 index 9c771dc..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Guide/Client.php +++ /dev/null @@ -1,991 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Guide; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidConfigException; -use EasyWeChat\Kernel\Support\Collection; -use Psr\Http\Message\ResponseInterface; - -/** - * Class Client. - * - * @author MillsGuo - */ -class Client extends BaseClient -{ - /** - * 添加顾问 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $guideHeadImgUrl - * @param string $guideNickname - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createAdviser($guideAccount = '', $guideOpenid = '', $guideHeadImgUrl = '', $guideNickname = '') - { - $params = $this->selectAccountAndOpenid(array(), $guideAccount, $guideOpenid); - if (!empty($guideHeadImgUrl)) { - $params['guide_headimgurl'] = $guideHeadImgUrl; - } - if (!empty($guideNickname)) { - $params['guide_nickname'] = $guideNickname; - } - - return $this->httpPostJson('cgi-bin/guide/addguideacct', $params); - } - - /** - * 获取顾问信息 - * @param string $guideAccount - * @param string $guideOpenid - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getAdviser($guideAccount = '', $guideOpenid = '') - { - $params = $this->selectAccountAndOpenid(array(), $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/getguideacct', $params); - } - - /** - * 修改顾问的昵称或头像 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $guideHeadImgUrl - * @param string $guideNickname - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function updateAdviser($guideAccount = '', $guideOpenid = '', $guideHeadImgUrl = '', $guideNickname = '') - { - $params = $this->selectAccountAndOpenid(array(), $guideAccount, $guideOpenid); - if (!empty($guideHeadImgUrl)) { - $params['guide_headimgurl'] = $guideHeadImgUrl; - } - if (!empty($guideNickname)) { - $params['guide_nickname'] = $guideNickname; - } - - return $this->httpPostJson('cgi-bin/guide/updateguideacct', $params); - } - - /** - * 删除顾问 - * @param string $guideAccount - * @param string $guideOpenid - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteAdviser($guideAccount = '', $guideOpenid = '') - { - $params = $this->selectAccountAndOpenid(array(), $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/delguideacct', $params); - } - - /** - * 获取服务号顾问列表 - * - * @return mixed - * - * @throws InvalidConfigException - */ - public function getAdvisers($count, $page) - { - $params = [ - 'page' => $page, - 'num' => $count - ]; - - return $this->httpPostJson('cgi-bin/guide/getguideacctlist', $params); - } - - /** - * 生成顾问二维码 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $qrCodeInfo - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createQrCode($guideAccount = '', $guideOpenid = '', $qrCodeInfo = '') - { - $params = $this->selectAccountAndOpenid(array(), $guideAccount, $guideOpenid); - if (!empty($qrCodeInfo)) { - $params['qrcode_info'] = $qrCodeInfo; - } - - return $this->httpPostJson('cgi-bin/guide/guidecreateqrcode', $params); - } - - /** - * 获取顾问聊天记录 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $openid - * @param int $beginTime - * @param int $endTime - * @param int $page - * @param int $count - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getBuyerChatRecords($guideAccount = '', $guideOpenid = '', $openid = '', $beginTime = 0, $endTime = 0, $page = 1, $count = 100) - { - $params = [ - 'page' => $page, - 'num' => $count - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - if (!empty($openid)) { - $params['openid'] = $openid; - } - if (!empty($beginTime)) { - $params['begin_time'] = $beginTime; - } - if (!empty($endTime)) { - $params['end_time'] = $endTime; - } - - return $this->httpPostJson('cgi-bin/guide/getguidebuyerchatrecord', $params); - } - - /** - * 设置快捷回复与关注自动回复 - * @param string $guideAccount - * @param string $guideOpenid - * @param bool $isDelete - * @param array $fastReplyListArray - * @param array $guideAutoReply - * @param array $guideAutoReplyPlus - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function setConfig($guideAccount = '', $guideOpenid = '', $isDelete = false, $fastReplyListArray = array(), $guideAutoReply = array(), $guideAutoReplyPlus = array()) - { - $params = [ - 'is_delete' => $isDelete - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - if (!empty($fastReplyListArray)) { - $params['guide_fast_reply_list'] = $fastReplyListArray; - } - if (!empty($guideAutoReply)) { - $params['guide_auto_reply'] = $guideAutoReply; - } - if (!empty($guideAutoReplyPlus)) { - $params['guide_auto_reply_plus'] = $guideAutoReplyPlus; - } - - return $this->httpPostJson('cgi-bin/guide/setguideconfig', $params); - } - - /** - * 获取快捷回复与关注自动回复 - * @param string $guideAccount - * @param string $guideOpenid - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getConfig($guideAccount = '', $guideOpenid = '') - { - try { - $params = $this->selectAccountAndOpenid(array(), $guideAccount, $guideOpenid); - } catch (InvalidConfigException $e) { - $params = array(); - } - - return $this->httpPostJson('cgi-bin/guide/getguideconfig', $params); - } - - /** - * 设置离线自动回复与敏感词 - * @param bool $isDelete - * @param array $blackKeyword - * @param array $guideAutoReply - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function setAdviserConfig(bool $isDelete, array $blackKeyword = [], array $guideAutoReply = []) - { - $params = [ - 'is_delete' => $isDelete - ]; - if (!empty($blackKeyword)) { - $params['black_keyword'] = $blackKeyword; - } - if (!empty($guideAutoReply)) { - $params['guide_auto_reply'] = $guideAutoReply; - } - - return $this->httpPostJson('cgi-bin/guide/setguideacctconfig', $params); - } - - /** - * 获取离线自动回复与敏感词 - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getAdviserConfig() - { - return $this->httpPostJson('cgi-bin/guide/getguideacctconfig', array()); - } - - /** - * 允许微信用户复制小程序页面路径 - * @param string $wxaAppid 小程序APPID - * @param string $wxUsername 微信用户的微信号 - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function allowCopyMiniAppPath(string $wxaAppid, string $wxUsername) - { - $params = [ - 'wxa_appid' => $wxaAppid, - 'wx_username' => $wxUsername - ]; - - return $this->httpPostJson('cgi-bin/guide/pushshowwxapathmenu', $params); - } - - /** - * 传入微信号或OPENID二选一 - * @param array $params - * @param string $guideAccount - * @param string $guideOpenid - * @return array - * @throws InvalidConfigException - */ - protected function selectAccountAndOpenid($params, $guideAccount = '', $guideOpenid = '') - { - if (!is_array($params)) { - throw new InvalidConfigException("传入配置参数必须为数组"); - } - if (!empty($guideOpenid)) { - $params['guide_openid'] = $guideOpenid; - } elseif (!empty($guideAccount)) { - $params['guide_account'] = $guideAccount; - } else { - throw new InvalidConfigException("微信号和OPENID不能同时为空"); - } - - return $params; - } - - /** - * 新建顾问分组 - * @param string $groupName - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createGroup(string $groupName) - { - $params = [ - 'group_name' => $groupName - ]; - - return $this->httpPostJson('cgi-bin/guide/newguidegroup', $params); - } - - /** - * 获取顾问分组列表 - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getGuideGroups() - { - return $this->httpPostJson('cgi-bin/guide/getguidegrouplist', array()); - } - - /** - * 获取指定顾问分组信息 - * @param int $groupId - * @param int $page - * @param int $num - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getGroups(int $groupId, int $page, int $num) - { - $params = [ - 'group_id' => $groupId, - 'page' => $page, - 'num' => $num - ]; - - return $this->httpPostJson('cgi-bin/guide/getgroupinfo', $params); - } - - /** - * 分组内添加顾问 - * @param int $groupId - * @param string $guideAccount - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function addGroupGuide(int $groupId, string $guideAccount) - { - $params = [ - 'group_id' => $groupId, - 'gruide_account' => $guideAccount - ]; - - return $this->httpPostJson('cgi-bin/guide/addguide2guidegroup', $params); - } - - /** - * 分组内删除顾问 - * @param int $groupId - * @param string $guideAccount - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteGroupGuide(int $groupId, string $guideAccount) - { - $params = [ - 'group_id' => $groupId, - 'guide_account' => $guideAccount - ]; - - return $this->httpPostJson('cgi-bin/guide/delguide2guidegroup', $params); - } - - /** - * 获取顾问所在分组 - * @param string $guideAccount - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getGuideGroup(string $guideAccount) - { - $params = [ - 'guide_account' => $guideAccount - ]; - - return $this->httpPostJson('cgi-bin/guide/getgroupbyguide', $params); - } - - /** - * 删除指定顾问分组 - * @param int $groupId - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteGroup(int $groupId) - { - $params = [ - 'group_id' => $groupId - ]; - - return $this->httpPostJson('cgi-bin/guide/delguidegroup', $params); - } - - /** - * 为顾问分配客户 - * @param string $guideAccount - * @param string $guideOpenid - * @param array $buyerList - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createBuyerRelation(string $guideAccount, string $guideOpenid, array $buyerList) - { - $params = [ - 'buyer_list' => $buyerList - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/addguidebuyerrelation', $params); - } - - /** - * 为顾问移除客户 - * @param string $guideAccount - * @param string $guideOpenid - * @param array $openidList - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteBuyerRelation(string $guideAccount, string $guideOpenid, array $openidList) - { - $params = [ - 'openid_list' => $openidList - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/delguidebuyerrelation', $params); - } - - /** - * 获取顾问的客户列表 - * @param string $guideAccount - * @param string $guideOpenid - * @param int $page - * @param int $num - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getBuyerRelations(string $guideAccount, string $guideOpenid, int $page, int $num) - { - $params = [ - 'page' => $page, - 'num' => $num - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/getguidebuyerrelationlist', $params); - } - - /** - * 为客户更换顾问 - * @param string $oldGuideTarget - * @param string $newGuideTarget - * @param array $openidList - * @param bool $useTargetOpenid true使用OPENID,false使用微信号 - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function rebindBuyerGuide(string $oldGuideTarget, string $newGuideTarget, array $openidList, bool $useTargetOpenid = true) - { - $params = [ - 'openid_list' => $openidList - ]; - if ($useTargetOpenid) { - $params['old_guide_openid'] = $oldGuideTarget; - $params['new_guide_openid'] = $newGuideTarget; - } else { - $params['old_guide_account'] = $oldGuideTarget; - $params['new_guide_account'] = $newGuideTarget; - } - - return $this->httpPostJson('cgi-bin/guide/rebindguideacctforbuyer', $params); - } - - /** - * 修改客户昵称 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $openid - * @param string $nickname - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function updateBuyerRelation(string $guideAccount, string $guideOpenid, string $openid, string $nickname) - { - $params = [ - 'openid' => $openid, - 'buyer_nickname' => $nickname - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/updateguidebuyerrelation', $params); - } - - /** - * 查询客户所属顾问 - * @param string $openid - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getBuyerRelation(string $openid) - { - $params = [ - 'openid' => $openid - ]; - - return $this->httpPostJson('cgi-bin/guide/getguidebuyerrelationbybuyer', $params); - } - - /** - * 查询指定顾问和客户的关系 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $openid - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getBuyerRelationByGuide(string $guideAccount, string $guideOpenid, string $openid) - { - $params = [ - 'openid' => $openid - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/getguidebuyerrelation', $params); - } - - /** - * 新建可查询的标签类型 - * @param string $tagName - * @param array $tagValues - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function newTagOption(string $tagName, array $tagValues) - { - $params = [ - 'tag_name' => $tagName, - 'tag_values' => $tagValues - ]; - - return $this->httpPostJson('cgi-bin/guide/newguidetagoption', $params); - } - - /** - * 删除指定标签类型 - * @param string $tagName - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteTagOption(string $tagName) - { - $params = [ - 'tag_name' => $tagName - ]; - - return $this->httpPostJson('cgi-bin/guide/delguidetagoption', $params); - } - - /** - * 为标签添加可选值 - * @param string $tagName - * @param array $tagValues - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createTagOption(string $tagName, array $tagValues) - { - $params = [ - 'tag_name' => $tagName, - 'tag_values' => $tagValues - ]; - - return $this->httpPostJson('cgi-bin/guide/addguidetagoption', $params); - } - - /** - * 获取标签和可选值 - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getTagOption() - { - return $this->httpPostJson('cgi-bin/guide/getguidetagoption', array()); - } - - /** - * 为客户设置标签 - * @param string $guideAccount - * @param string $guideOpenid - * @param array $openidList - * @param string $tagValue - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function setBuyersTag(string $guideAccount, string $guideOpenid, array $openidList, string $tagValue) - { - $params = [ - 'tag_value' => $tagValue, - 'openid_list' => $openidList - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/addguidebuyertag', $params); - } - - /** - * 查询客户标签 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $openid - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getBuyerTags(string $guideAccount, string $guideOpenid, string $openid) - { - $params = [ - 'openid' => $openid - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/getguidebuyertag', $params); - } - - /** - * 根据标签值筛选粉丝 - * @param string $guideAccount - * @param string $guideOpenid - * @param int $pushCount - * @param array $tagValues - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getBuyerByTag(string $guideAccount, string $guideOpenid, int $pushCount = 0, array $tagValues = array()) - { - $params = $this->selectAccountAndOpenid(array(), $guideAccount, $guideOpenid); - if ($pushCount > 0) { - $params['push_count'] = $pushCount; - } - if (count($tagValues) > 0) { - $params['tag_values'] = $tagValues; - } - - return $this->httpPostJson('cgi-bin/guide/queryguidebuyerbytag', $params); - } - - /** - * 删除客户标签 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $tagValue - * @param array $openidList - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteBuyerTag(string $guideAccount, string $guideOpenid, string $tagValue, array $openidList) - { - $params = [ - 'tag_value' => $tagValue - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - if (count($openidList) > 0) { - $params['openid_list'] = $openidList; - } - - return $this->httpPostJson('cgi-bin/guide/delguidebuyertag', $params); - } - - /** - * 设置自定义客户信息 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $openid - * @param array $displayTagList - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function setBuyerDisplayTags(string $guideAccount, string $guideOpenid, string $openid, array $displayTagList) - { - $params = [ - 'openid' => $openid, - 'display_tag_list' => $displayTagList - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/addguidebuyerdisplaytag', $params); - } - - /** - * 获取自定义客户信息 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $openid - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getBuyerDisplayTags(string $guideAccount, string $guideOpenid, string $openid) - { - $params = [ - 'openid' => $openid - ]; - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/getguidebuyerdisplaytag', $params); - } - - /** - * 添加小程序卡片素材 - * @param string $mediaId - * @param string $title - * @param string $path - * @param string $appid - * @param int $type - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createCardMaterial(string $mediaId, string $title, string $path, string $appid, int $type = 0) - { - $params = [ - 'media_id' => $mediaId, - 'type' => $type, - 'title' => $title, - 'path' => $path, - 'appid' => $appid - ]; - - return $this->httpPostJson('cgi-bin/guide/setguidecardmaterial', $params); - } - - /** - * 查询小程序卡片素材 - * @param int $type - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getCardMaterial(int $type = 0) - { - $params = [ - 'type' => $type - ]; - - return $this->httpPostJson('cgi-bin/guide/getguidecardmaterial', $params); - } - - /** - * 删除小程序卡片素材 - * @param string $title - * @param string $path - * @param string $appid - * @param int $type - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteCardMaterial(string $title, string $path, string $appid, int $type = 0) - { - $params = [ - 'type' => $type, - 'title' => $title, - 'path' => $path, - 'appid' => $appid - ]; - - return $this->httpPostJson('cgi-bin/guide/delguidecardmaterial', $params); - } - - /** - * 添加图片素材 - * @param string $mediaId - * @param int $type - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createImageMaterial(string $mediaId, int $type = 0) - { - $params = [ - 'media_id' => $mediaId, - 'type' => $type - ]; - - return $this->httpPostJson('cgi-bin/guide/setguideimagematerial', $params); - } - - /** - * 查询图片素材 - * @param int $type - * @param int $start - * @param int $num - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getImageMaterial(int $type, int $start, int $num) - { - $params = [ - 'type' => $type, - 'start' => $start, - 'num' => $num - ]; - - return $this->httpPostJson('cgi-bin/guide/getguideimagematerial', $params); - } - - /** - * 删除图片素材 - * @param int $type - * @param string $picUrl - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteImageMaterial(int $type, string $picUrl) - { - $params = [ - 'type' => $type, - 'picurl' => $picUrl - ]; - - return $this->httpPostJson('cgi-bin/guide/delguideimagematerial', $params); - } - - /** - * 添加文字素材 - * @param int $type - * @param string $word - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createWordMaterial(int $type, string $word) - { - $params = [ - 'type' => $type, - 'word' => $word - ]; - - return $this->httpPostJson('cgi-bin/guide/setguidewordmaterial', $params); - } - - /** - * 查询文字素材 - * @param int $type - * @param int $start - * @param int $num - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getWordMaterial(int $type, int $start, int $num) - { - $params = [ - 'type' => $type, - 'start' => $start, - 'num' => $num - ]; - - return $this->httpPostJson('cgi-bin/guide/getguidewordmaterial', $params); - } - - /** - * 删除文字素材 - * @param int $type - * @param string $word - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function deleteWordMaterial(int $type, string $word) - { - $params = [ - 'type' => $type, - 'word' => $word - ]; - - return $this->httpPostJson('cgi-bin/guide/delguidewordmaterial', $params); - } - - /** - * 添加群发任务,为指定顾问添加群发任务 - * @param string $guideAccount - * @param string $guideOpenid - * @param string $taskName - * @param string $taskRemark - * @param int $pushTime - * @param array $openidArray - * @param array $materialArray - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function createMasSendJob(string $guideAccount, string $guideOpenid, string $taskName, string $taskRemark, int $pushTime, array $openidArray, array $materialArray) - { - $params = [ - 'task_name' => $taskName, - 'push_time' => $pushTime, - 'openid' => $openidArray, - 'material' => $materialArray - ]; - if (!empty($taskRemark)) { - $params['task_remark'] = $taskRemark; - } - $params = $this->selectAccountAndOpenid($params, $guideAccount, $guideOpenid); - - return $this->httpPostJson('cgi-bin/guide/addguidemassendjob', $params); - } - - /** - * 获取群发任务列表 - * @param string $guideAccount - * @param string $guideOpenid - * @param array $taskStatus - * @param int $offset - * @param int $limit - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getMasSendJobs(string $guideAccount, string $guideOpenid, array $taskStatus = [], int $offset = 0, int $limit = 50) - { - $params = $this->selectAccountAndOpenid(array(), $guideAccount, $guideOpenid); - if (!empty($taskStatus)) { - $params['task_status'] = $taskStatus; - } - if ($offset > 0) { - $params['offset'] = $offset; - } - if ($limit != 50) { - $params['limit'] = $limit; - } - - return $this->httpPostJson('cgi-bin/guide/getguidemassendjoblist', $params); - } - - /** - * 获取指定群发任务信息 - * @param string $taskId - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function getMasSendJob(string $taskId) - { - $params = [ - 'task_id' => $taskId - ]; - - return $this->httpPostJson('cgi-bin/guide/getguidemassendjob', $params); - } - - /** - * 修改群发任务 - * @param string $taskId - * @param string $taskName - * @param string $taskRemark - * @param int $pushTime - * @param array $openidArray - * @param array $materialArray - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function updateMasSendJob(string $taskId, string $taskName, string $taskRemark, int $pushTime, array $openidArray, array $materialArray) - { - $params = [ - 'task_id' => $taskId - ]; - if (!empty($taskName)) { - $params['task_name'] = $taskName; - } - if (!empty($taskRemark)) { - $params['task_remark'] = $taskRemark; - } - if (!empty($pushTime)) { - $params['push_time'] = $pushTime; - } - if (!empty($openidArray)) { - $params['openid'] = $openidArray; - } - if (!empty($materialArray)) { - $params['material'] = $materialArray; - } - - return $this->httpPostJson('cgi-bin/guide/updateguidemassendjob', $params); - } - - /** - * 取消群发任务 - * @param string $taskId - * @return array|Collection|object|ResponseInterface|string - * @throws InvalidConfigException - */ - public function cancelMasSendJob(string $taskId) - { - $params = [ - 'task_id' => $taskId - ]; - - return $this->httpPostJson('cgi-bin/guide/cancelguidemassendjob', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Guide/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Guide/ServiceProvider.php deleted file mode 100644 index 46ebbca..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Guide/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Guide; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author millsguo - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['guide'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Material/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Material/Client.php deleted file mode 100644 index ef39ab6..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Material/Client.php +++ /dev/null @@ -1,275 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Material; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Http\StreamResponse; -use EasyWeChat\Kernel\Messages\Article; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * Allow media type. - * - * @var array - */ - protected $allowTypes = ['image', 'voice', 'video', 'thumb', 'news_image']; - - /** - * Upload image. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadImage(string $path) - { - return $this->upload('image', $path); - } - - /** - * Upload voice. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadVoice(string $path) - { - return $this->upload('voice', $path); - } - - /** - * Upload thumb. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadThumb(string $path) - { - return $this->upload('thumb', $path); - } - - /** - * Upload video. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadVideo(string $path, string $title, string $description) - { - $params = [ - 'description' => json_encode( - [ - 'title' => $title, - 'introduction' => $description, - ], - JSON_UNESCAPED_UNICODE - ), - ]; - - return $this->upload('video', $path, $params); - } - - /** - * Upload articles. - * - * @param array|Article $articles - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadArticle($articles) - { - if ($articles instanceof Article || !empty($articles['title'])) { - $articles = [$articles]; - } - - $params = ['articles' => array_map(function ($article) { - if ($article instanceof Article) { - return $article->transformForJsonRequestWithoutType(); - } - - return $article; - }, $articles)]; - - return $this->httpPostJson('cgi-bin/material/add_news', $params); - } - - /** - * Update article. - * - * @param array|Article $article - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateArticle(string $mediaId, $article, int $index = 0) - { - if ($article instanceof Article) { - $article = $article->transformForJsonRequestWithoutType(); - } - - $params = [ - 'media_id' => $mediaId, - 'index' => $index, - 'articles' => isset($article['title']) ? $article : (isset($article[$index]) ? $article[$index] : []), - ]; - - return $this->httpPostJson('cgi-bin/material/update_news', $params); - } - - /** - * Upload image for article. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function uploadArticleImage(string $path) - { - return $this->upload('news_image', $path); - } - - /** - * Fetch material. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $mediaId) - { - $response = $this->requestRaw('cgi-bin/material/get_material', 'POST', ['json' => ['media_id' => $mediaId]]); - - if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { - return StreamResponse::buildFromPsrResponse($response); - } - - return $this->castResponseToType($response, $this->app['config']->get('response_type')); - } - - /** - * Delete material by media ID. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $mediaId) - { - return $this->httpPostJson('cgi-bin/material/del_material', ['media_id' => $mediaId]); - } - - /** - * List materials. - * - * example: - * - * { - * "total_count": TOTAL_COUNT, - * "item_count": ITEM_COUNT, - * "item": [{ - * "media_id": MEDIA_ID, - * "name": NAME, - * "update_time": UPDATE_TIME - * }, - * // more... - * ] - * } - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(string $type, int $offset = 0, int $count = 20) - { - $params = [ - 'type' => $type, - 'offset' => $offset, - 'count' => $count, - ]; - - return $this->httpPostJson('cgi-bin/material/batchget_material', $params); - } - - /** - * Get stats of materials. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function stats() - { - return $this->httpGet('cgi-bin/material/get_materialcount'); - } - - /** - * Upload material. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function upload(string $type, string $path, array $form = []) - { - if (!file_exists($path) || !is_readable($path)) { - throw new InvalidArgumentException(sprintf('File does not exist, or the file is unreadable: "%s"', $path)); - } - - $form['type'] = $type; - - return $this->httpUpload($this->getApiByType($type), ['media' => $path], $form); - } - - /** - * Get API by type. - * - * @return string - */ - public function getApiByType(string $type) - { - switch ($type) { - case 'news_image': - return 'cgi-bin/media/uploadimg'; - default: - return 'cgi-bin/material/add_material'; - } - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Material/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Material/ServiceProvider.php deleted file mode 100644 index 089a8f8..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Material/ServiceProvider.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -/** - * ServiceProvider.php. - * - * This file is part of the wechat. - * - * (c) overtrue - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Material; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['material'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Menu/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Menu/Client.php deleted file mode 100644 index c8b3b88..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Menu/Client.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Menu; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * Get all menus. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list() - { - return $this->httpGet('cgi-bin/menu/get'); - } - - /** - * Get current menus. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function current() - { - return $this->httpGet('cgi-bin/get_current_selfmenu_info'); - } - - /** - * Add menu. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $buttons, array $matchRule = []) - { - if (!empty($matchRule)) { - return $this->httpPostJson('cgi-bin/menu/addconditional', [ - 'button' => $buttons, - 'matchrule' => $matchRule, - ]); - } - - return $this->httpPostJson('cgi-bin/menu/create', ['button' => $buttons]); - } - - /** - * Destroy menu. - * - * @param int $menuId - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(int $menuId = null) - { - if (is_null($menuId)) { - return $this->httpGet('cgi-bin/menu/delete'); - } - - return $this->httpPostJson('cgi-bin/menu/delconditional', ['menuid' => $menuId]); - } - - /** - * Test conditional menu. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function match(string $userId) - { - return $this->httpPostJson('cgi-bin/menu/trymatch', ['user_id' => $userId]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Menu/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Menu/ServiceProvider.php deleted file mode 100644 index e79b105..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Menu/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Menu; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['menu'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/OAuth/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/OAuth/ServiceProvider.php deleted file mode 100644 index ba176dc..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/OAuth/ServiceProvider.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\OAuth; - -use Overtrue\Socialite\SocialiteManager as Socialite; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['oauth'] = function ($app) { - $socialite = (new Socialite([ - 'wechat' => [ - 'client_id' => $app['config']['app_id'], - 'client_secret' => $app['config']['secret'], - 'redirect' => $this->prepareCallbackUrl($app), - ], - ], $app['request']))->driver('wechat'); - - $scopes = (array) $app['config']->get('oauth.scopes', ['snsapi_userinfo']); - - if (!empty($scopes)) { - $socialite->scopes($scopes); - } - - return $socialite; - }; - } - - /** - * Prepare the OAuth callback url for wechat. - * - * @param Container $app - * - * @return string - */ - private function prepareCallbackUrl($app) - { - $callback = $app['config']->get('oauth.callback'); - if (0 === stripos($callback, 'http')) { - return $callback; - } - $baseUrl = $app['request']->getSchemeAndHttpHost(); - - return $baseUrl.'/'.ltrim($callback, '/'); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/OCR/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/OCR/Client.php deleted file mode 100644 index 80b7a95..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/OCR/Client.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\OCR; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class Client. - * - * @author joyeekk - */ -class Client extends BaseClient -{ - /** - * Allow image parameter type. - * - * @var array - */ - protected $allowTypes = ['photo', 'scan']; - - /** - * ID card OCR. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function idCard(string $path, string $type = 'photo') - { - if (!\in_array($type, $this->allowTypes, true)) { - throw new InvalidArgumentException(sprintf("Unsupported type: '%s'", $type)); - } - - return $this->httpPost('cv/ocr/idcard', [ - 'type' => $type, - 'img_url' => $path, - ]); - } - - /** - * Bank card OCR. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function bankCard(string $path) - { - return $this->httpPost('cv/ocr/bankcard', [ - 'img_url' => $path, - ]); - } - - /** - * Vehicle license OCR. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function vehicleLicense(string $path) - { - return $this->httpPost('cv/ocr/drivinglicense', [ - 'img_url' => $path, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/OCR/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/OCR/ServiceProvider.php deleted file mode 100644 index 1773079..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/OCR/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\OCR; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author joyeekk - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['ocr'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/POI/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/POI/Client.php deleted file mode 100644 index f71d5d2..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/POI/Client.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\POI; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * Get POI supported categories. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function categories() - { - return $this->httpGet('cgi-bin/poi/getwxcategory'); - } - - /** - * Get POI by ID. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(int $poiId) - { - return $this->httpPostJson('cgi-bin/poi/getpoi', ['poi_id' => $poiId]); - } - - /** - * List POI. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(int $offset = 0, int $limit = 10) - { - $params = [ - 'begin' => $offset, - 'limit' => $limit, - ]; - - return $this->httpPostJson('cgi-bin/poi/getpoilist', $params); - } - - /** - * Create a POI. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $baseInfo) - { - $params = [ - 'business' => [ - 'base_info' => $baseInfo, - ], - ]; - - return $this->httpPostJson('cgi-bin/poi/addpoi', $params); - } - - /** - * @return int - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function createAndGetId(array $databaseInfo) - { - /** @var array $response */ - $response = $this->detectAndCastResponseToType($this->create($databaseInfo), 'array'); - - return $response['poi_id']; - } - - /** - * Update a POI. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $poiId, array $baseInfo) - { - $params = [ - 'business' => [ - 'base_info' => array_merge($baseInfo, ['poi_id' => $poiId]), - ], - ]; - - return $this->httpPostJson('cgi-bin/poi/updatepoi', $params); - } - - /** - * Delete a POI. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(int $poiId) - { - return $this->httpPostJson('cgi-bin/poi/delpoi', ['poi_id' => $poiId]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/POI/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/POI/ServiceProvider.php deleted file mode 100644 index 156440b..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/POI/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\POI; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['poi'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Semantic/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Semantic/Client.php deleted file mode 100644 index d0e2a51..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Semantic/Client.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Semantic; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * Get the semantic content of giving string. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function query(string $keyword, string $categories, array $optional = []) - { - $params = [ - 'query' => $keyword, - 'category' => $categories, - 'appid' => $this->app['config']['app_id'], - ]; - - return $this->httpPostJson('semantic/semproxy/search', array_merge($params, $optional)); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Semantic/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Semantic/ServiceProvider.php deleted file mode 100644 index 835b7fc..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Semantic/ServiceProvider.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Semantic; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['semantic'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Server/Guard.php b/vendor/overtrue/wechat/src/OfficialAccount/Server/Guard.php deleted file mode 100644 index a42205f..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Server/Guard.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Server; - -use EasyWeChat\Kernel\ServerGuard; - -/** - * Class Guard. - * - * @author overtrue - */ -class Guard extends ServerGuard -{ - protected function shouldReturnRawResponse(): bool - { - return !is_null($this->app['request']->get('echostr')); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Server/Handlers/EchoStrHandler.php b/vendor/overtrue/wechat/src/OfficialAccount/Server/Handlers/EchoStrHandler.php deleted file mode 100644 index b999375..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Server/Handlers/EchoStrHandler.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Server\Handlers; - -use EasyWeChat\Kernel\Contracts\EventHandlerInterface; -use EasyWeChat\Kernel\Decorators\FinallyResult; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Class EchoStrHandler. - * - * @author overtrue - */ -class EchoStrHandler implements EventHandlerInterface -{ - /** - * @var ServiceContainer - */ - protected $app; - - /** - * EchoStrHandler constructor. - */ - public function __construct(ServiceContainer $app) - { - $this->app = $app; - } - - /** - * @param mixed $payload - * - * @return FinallyResult|null - */ - public function handle($payload = null) - { - if ($str = $this->app['request']->get('echostr')) { - return new FinallyResult($str); - } - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Server/ServiceProvider.php deleted file mode 100644 index 0c6716b..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Server/ServiceProvider.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Server; - -use EasyWeChat\Kernel\Encryptor; -use EasyWeChat\OfficialAccount\Server\Handlers\EchoStrHandler; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - !isset($app['encryptor']) && $app['encryptor'] = function ($app) { - return new Encryptor( - $app['config']['app_id'], - $app['config']['token'], - $app['config']['aes_key'] - ); - }; - - !isset($app['server']) && $app['server'] = function ($app) { - $guard = new Guard($app); - $guard->push(new EchoStrHandler($app)); - - return $guard; - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/Client.php deleted file mode 100644 index bcc2a0d..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/Client.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * @param array $data - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function register($data) - { - return $this->httpPostJson('shakearound/account/register', $data); - } - - /** - * Get audit status. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function status() - { - return $this->httpGet('shakearound/account/auditstatus'); - } - - /** - * Get shake info. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function user(string $ticket, bool $needPoi = false) - { - $params = [ - 'ticket' => $ticket, - ]; - - if ($needPoi) { - $params['need_poi'] = 1; - } - - return $this->httpPostJson('shakearound/user/getshakeinfo', $params); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - */ - public function userWithPoi(string $ticket) - { - return $this->user($ticket, true); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/DeviceClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/DeviceClient.php deleted file mode 100644 index 0e0f7d7..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/DeviceClient.php +++ /dev/null @@ -1,165 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class DeviceClient. - * - * @author allen05ren - */ -class DeviceClient extends BaseClient -{ - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function apply(array $data) - { - return $this->httpPostJson('shakearound/device/applyid', $data); - } - - /** - * Get audit status. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function status(int $applyId) - { - $params = [ - 'apply_id' => $applyId, - ]; - - return $this->httpPostJson('shakearound/device/applystatus', $params); - } - - /** - * Update a device comment. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(array $deviceIdentifier, string $comment) - { - $params = [ - 'device_identifier' => $deviceIdentifier, - 'comment' => $comment, - ]; - - return $this->httpPostJson('shakearound/device/update', $params); - } - - /** - * Bind location for device. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function bindPoi(array $deviceIdentifier, int $poiId) - { - $params = [ - 'device_identifier' => $deviceIdentifier, - 'poi_id' => $poiId, - ]; - - return $this->httpPostJson('shakearound/device/bindlocation', $params); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function bindThirdPoi(array $deviceIdentifier, int $poiId, string $appId) - { - $params = [ - 'device_identifier' => $deviceIdentifier, - 'poi_id' => $poiId, - 'type' => 2, - 'poi_appid' => $appId, - ]; - - return $this->httpPostJson('shakearound/device/bindlocation', $params); - } - - /** - * Fetch batch of devices by deviceIds. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function listByIds(array $deviceIdentifiers) - { - $params = [ - 'type' => 1, - 'device_identifiers' => $deviceIdentifiers, - ]; - - return $this->search($params); - } - - /** - * Pagination to get batch of devices. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function list(int $lastId, int $count) - { - $params = [ - 'type' => 2, - 'last_seen' => $lastId, - 'count' => $count, - ]; - - return $this->search($params); - } - - /** - * Fetch batch of devices by applyId. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - */ - public function listByApplyId(int $applyId, int $lastId, int $count) - { - $params = [ - 'type' => 3, - 'apply_id' => $applyId, - 'last_seen' => $lastId, - 'count' => $count, - ]; - - return $this->search($params); - } - - /** - * Fetch batch of devices. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function search(array $params) - { - return $this->httpPostJson('shakearound/device/search', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/GroupClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/GroupClient.php deleted file mode 100644 index 1907c2d..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/GroupClient.php +++ /dev/null @@ -1,147 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class GroupClient. - * - * @author allen05ren - */ -class GroupClient extends BaseClient -{ - /** - * Add device group. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(string $name) - { - $params = [ - 'group_name' => $name, - ]; - - return $this->httpPostJson('shakearound/device/group/add', $params); - } - - /** - * Update a device group name. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $groupId, string $name) - { - $params = [ - 'group_id' => $groupId, - 'group_name' => $name, - ]; - - return $this->httpPostJson('shakearound/device/group/update', $params); - } - - /** - * Delete device group. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(int $groupId) - { - $params = [ - 'group_id' => $groupId, - ]; - - return $this->httpPostJson('shakearound/device/group/delete', $params); - } - - /** - * List all device groups. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(int $begin, int $count) - { - $params = [ - 'begin' => $begin, - 'count' => $count, - ]; - - return $this->httpPostJson('shakearound/device/group/getlist', $params); - } - - /** - * Get detail of a device group. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(int $groupId, int $begin, int $count) - { - $params = [ - 'group_id' => $groupId, - 'begin' => $begin, - 'count' => $count, - ]; - - return $this->httpPostJson('shakearound/device/group/getdetail', $params); - } - - /** - * Add one or more devices to a device group. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addDevices(int $groupId, array $deviceIdentifiers) - { - $params = [ - 'group_id' => $groupId, - 'device_identifiers' => $deviceIdentifiers, - ]; - - return $this->httpPostJson('shakearound/device/group/adddevice', $params); - } - - /** - * Remove one or more devices from a device group. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function removeDevices(int $groupId, array $deviceIdentifiers) - { - $params = [ - 'group_id' => $groupId, - 'device_identifiers' => $deviceIdentifiers, - ]; - - return $this->httpPostJson('shakearound/device/group/deletedevice', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/MaterialClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/MaterialClient.php deleted file mode 100644 index e7a4d06..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/MaterialClient.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class MaterialClient. - * - * @author allen05ren - */ -class MaterialClient extends BaseClient -{ - /** - * Upload image material. - * - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadImage(string $path, string $type = 'icon') - { - if (!file_exists($path) || !is_readable($path)) { - throw new InvalidArgumentException(sprintf('File does not exist, or the file is unreadable: "%s"', $path)); - } - - return $this->httpUpload('shakearound/material/add', ['media' => $path], [], ['type' => strtolower($type)]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/PageClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/PageClient.php deleted file mode 100644 index e230bb3..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/PageClient.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class PageClient. - * - * @author allen05ren - */ -class PageClient extends BaseClient -{ - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $data) - { - return $this->httpPostJson('shakearound/page/add', $data); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $pageId, array $data) - { - return $this->httpPostJson('shakearound/page/update', array_merge(['page_id' => $pageId], $data)); - } - - /** - * Fetch batch of pages by pageIds. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function listByIds(array $pageIds) - { - $params = [ - 'type' => 1, - 'page_ids' => $pageIds, - ]; - - return $this->httpPostJson('shakearound/page/search', $params); - } - - /** - * Pagination to get batch of pages. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(int $begin, int $count) - { - $params = [ - 'type' => 2, - 'begin' => $begin, - 'count' => $count, - ]; - - return $this->httpPostJson('shakearound/page/search', $params); - } - - /** - * delete a page. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(int $pageId) - { - $params = [ - 'page_id' => $pageId, - ]; - - return $this->httpPostJson('shakearound/page/delete', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/RelationClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/RelationClient.php deleted file mode 100644 index 774199b..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/RelationClient.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class RelationClient. - * - * @author allen05ren - */ -class RelationClient extends BaseClient -{ - /** - * Bind pages for device. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function bindPages(array $deviceIdentifier, array $pageIds) - { - $params = [ - 'device_identifier' => $deviceIdentifier, - 'page_ids' => $pageIds, - ]; - - return $this->httpPostJson('shakearound/device/bindpage', $params); - } - - /** - * Get pageIds by deviceId. - * - * @return array|\EasyWeChat\Kernel\Support\Collection - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function listByDeviceId(array $deviceIdentifier) - { - $params = [ - 'type' => 1, - 'device_identifier' => $deviceIdentifier, - ]; - - return $this->httpPostJson('shakearound/relation/search', $params); - } - - /** - * Get devices by pageId. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function listByPageId(int $pageId, int $begin, int $count) - { - $params = [ - 'type' => 2, - 'page_id' => $pageId, - 'begin' => $begin, - 'count' => $count, - ]; - - return $this->httpPostJson('shakearound/relation/search', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ServiceProvider.php deleted file mode 100644 index a13d2b0..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ServiceProvider.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author allen05ren - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['shake_around'] = function ($app) { - return new ShakeAround($app); - }; - - $app['shake_around.device'] = function ($app) { - return new DeviceClient($app); - }; - - $app['shake_around.page'] = function ($app) { - return new PageClient($app); - }; - - $app['shake_around.material'] = function ($app) { - return new MaterialClient($app); - }; - - $app['shake_around.group'] = function ($app) { - return new GroupClient($app); - }; - - $app['shake_around.relation'] = function ($app) { - return new RelationClient($app); - }; - - $app['shake_around.stats'] = function ($app) { - return new StatsClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ShakeAround.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ShakeAround.php deleted file mode 100644 index 666a38a..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ShakeAround.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class Card. - * - * @author overtrue - * - * @property \EasyWeChat\OfficialAccount\ShakeAround\DeviceClient $device - * @property \EasyWeChat\OfficialAccount\ShakeAround\GroupClient $group - * @property \EasyWeChat\OfficialAccount\ShakeAround\MaterialClient $material - * @property \EasyWeChat\OfficialAccount\ShakeAround\RelationClient $relation - * @property \EasyWeChat\OfficialAccount\ShakeAround\StatsClient $stats - */ -class ShakeAround extends Client -{ - /** - * @param string $property - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function __get($property) - { - if (isset($this->app["shake_around.{$property}"])) { - return $this->app["shake_around.{$property}"]; - } - - throw new InvalidArgumentException(sprintf('No shake_around service named "%s".', $property)); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/StatsClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/StatsClient.php deleted file mode 100644 index 1b52ef7..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/StatsClient.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\ShakeAround; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class StatsClient. - * - * @author allen05ren - */ -class StatsClient extends BaseClient -{ - /** - * Fetch statistics data by deviceId. - * - * @param int $beginTime (Unix timestamp) - * @param int $endTime (Unix timestamp) - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deviceSummary(array $deviceIdentifier, int $beginTime, int $endTime) - { - $params = [ - 'device_identifier' => $deviceIdentifier, - 'begin_date' => $beginTime, - 'end_date' => $endTime, - ]; - - return $this->httpPostJson('shakearound/statistics/device', $params); - } - - /** - * Fetch all devices statistics data by date. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function devicesSummary(int $timestamp, int $pageIndex) - { - $params = [ - 'date' => $timestamp, - 'page_index' => $pageIndex, - ]; - - return $this->httpPostJson('shakearound/statistics/devicelist', $params); - } - - /** - * Fetch statistics data by pageId. - * - * @param int $beginTime (Unix timestamp) - * @param int $endTime (Unix timestamp) - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function pageSummary(int $pageId, int $beginTime, int $endTime) - { - $params = [ - 'page_id' => $pageId, - 'begin_date' => $beginTime, - 'end_date' => $endTime, - ]; - - return $this->httpPostJson('shakearound/statistics/page', $params); - } - - /** - * Fetch all pages statistics data by date. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function pagesSummary(int $timestamp, int $pageIndex) - { - $params = [ - 'date' => $timestamp, - 'page_index' => $pageIndex, - ]; - - return $this->httpPostJson('shakearound/statistics/pagelist', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Store/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Store/Client.php deleted file mode 100644 index 5b2bab7..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Store/Client.php +++ /dev/null @@ -1,188 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Store; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author bigface - */ -class Client extends BaseClient -{ - /** - * Get WXA supported categories. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function categories() - { - return $this->httpGet('wxa/get_merchant_category'); - } - - /** - * Get district from tencent map . - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function districts() - { - return $this->httpGet('wxa/get_district'); - } - - /** - * Search store from tencent map. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function searchFromMap(int $districtId, string $keyword) - { - $params = [ - 'districtid' => $districtId, - 'keyword' => $keyword, - ]; - - return $this->httpPostJson('wxa/search_map_poi', $params); - } - - /** - * Get store check status. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getStatus() - { - return $this->httpPostJson('wxa/get_merchant_audit_info'); - } - - /** - * Create a merchant. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createMerchant(array $baseInfo) - { - return $this->httpPostJson('wxa/apply_merchant', $baseInfo); - } - - /** - * Update a merchant. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateMerchant(array $params) - { - return $this->httpPostJson('wxa/modify_merchant', $params); - } - - /** - * Create a store from tencent map. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createFromMap(array $baseInfo) - { - return $this->httpPostJson('wxa/create_map_poi', $baseInfo); - } - - /** - * Create a store. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $baseInfo) - { - return $this->httpPostJson('wxa/add_store', $baseInfo); - } - - /** - * Update a store. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $poiId, array $baseInfo) - { - $params = array_merge($baseInfo, ['poi_id' => $poiId]); - - return $this->httpPostJson('wxa/update_store', $params); - } - - /** - * Get store by ID. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(int $poiId) - { - return $this->httpPostJson('wxa/get_store_info', ['poi_id' => $poiId]); - } - - /** - * List store. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(int $offset = 0, int $limit = 10) - { - $params = [ - 'offset' => $offset, - 'limit' => $limit, - ]; - - return $this->httpPostJson('wxa/get_store_list', $params); - } - - /** - * Delete a store. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(int $poiId) - { - return $this->httpPostJson('wxa/del_store', ['poi_id' => $poiId]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Store/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Store/ServiceProvider.php deleted file mode 100644 index f5c48d7..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/Store/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\Store; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author bigface - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['store'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/SubscribeMessage/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/SubscribeMessage/Client.php deleted file mode 100644 index 9dbb57b..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/SubscribeMessage/Client.php +++ /dev/null @@ -1,193 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\SubscribeMessage; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use ReflectionClass; - -/** - * Class Client. - * - * @author hugo - */ -class Client extends BaseClient -{ - /** - * {@inheritdoc}. - */ - protected $message = [ - 'touser' => '', - 'template_id' => '', - 'page' => '', - 'miniprogram' => '', - 'data' => [], - ]; - - /** - * {@inheritdoc}. - */ - protected $required = ['touser', 'template_id', 'data']; - - /** - * Combine templates and add them to your personal template library under your account. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addTemplate(string $tid, array $kidList, string $sceneDesc = null) - { - $sceneDesc = $sceneDesc ?? ''; - $data = \compact('tid', 'kidList', 'sceneDesc'); - - return $this->httpPost('wxaapi/newtmpl/addtemplate', $data); - } - - /** - * Delete personal template under account. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deleteTemplate(string $id) - { - return $this->httpPost('wxaapi/newtmpl/deltemplate', ['priTmplId' => $id]); - } - - /** - * Get the category of the applet account. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getCategory() - { - return $this->httpGet('wxaapi/newtmpl/getcategory'); - } - - /** - * Get keyword list under template title. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getTemplateKeywords(string $tid) - { - return $this->httpGet('wxaapi/newtmpl/getpubtemplatekeywords', compact('tid')); - } - - /** - * Get the title of the public template under the category to which the account belongs. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getTemplateTitles(array $ids, int $start = 0, int $limit = 30) - { - $ids = \implode(',', $ids); - $query = \compact('ids', 'start', 'limit'); - - return $this->httpGet('wxaapi/newtmpl/getpubtemplatetitles', $query); - } - - /** - * Get list of personal templates under the current account. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getTemplates() - { - return $this->httpGet('wxaapi/newtmpl/gettemplate'); - } - - /** - * Send a subscribe message. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(array $data = []) - { - $params = $this->formatMessage($data); - - $this->restoreMessage(); - - return $this->httpPostJson('cgi-bin/message/subscribe/bizsend', $params); - } - - /** - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function formatMessage(array $data = []) - { - $params = array_merge($this->message, $data); - - foreach ($params as $key => $value) { - if (in_array($key, $this->required, true) && empty($value) && empty($this->message[$key])) { - throw new InvalidArgumentException(sprintf('Attribute "%s" can not be empty!', $key)); - } - - $params[$key] = empty($value) ? $this->message[$key] : $value; - } - - foreach ($params['data'] as $key => $value) { - if (is_array($value)) { - if (\array_key_exists('value', $value)) { - $params['data'][$key] = ['value' => $value['value']]; - - continue; - } - - if (count($value) >= 1) { - $value = [ - 'value' => $value[0], -// 'color' => $value[1],// color unsupported - ]; - } - } else { - $value = [ - 'value' => strval($value), - ]; - } - - $params['data'][$key] = $value; - } - - return $params; - } - - /** - * Restore message. - */ - protected function restoreMessage() - { - $this->message = (new ReflectionClass(static::class))->getDefaultProperties()['message']; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/SubscribeMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/SubscribeMessage/ServiceProvider.php deleted file mode 100644 index babe11f..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/SubscribeMessage/ServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\SubscribeMessage; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['subscribe_message'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/Client.php deleted file mode 100644 index 11f592d..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/Client.php +++ /dev/null @@ -1,226 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\TemplateMessage; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use ReflectionClass; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - public const API_SEND = 'cgi-bin/message/template/send'; - - /** - * Attributes. - * - * @var array - */ - protected $message = [ - 'touser' => '', - 'template_id' => '', - 'url' => '', - 'data' => [], - 'miniprogram' => '', - ]; - - /** - * Required attributes. - * - * @var array - */ - protected $required = ['touser', 'template_id']; - - /** - * Set industry. - * - * @param int $industryOne - * @param int $industryTwo - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setIndustry($industryOne, $industryTwo) - { - $params = [ - 'industry_id1' => $industryOne, - 'industry_id2' => $industryTwo, - ]; - - return $this->httpPostJson('cgi-bin/template/api_set_industry', $params); - } - - /** - * Get industry. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getIndustry() - { - return $this->httpPostJson('cgi-bin/template/get_industry'); - } - - /** - * Add a template and get template ID. - * - * @param string $shortId - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addTemplate($shortId) - { - $params = ['template_id_short' => $shortId]; - - return $this->httpPostJson('cgi-bin/template/api_add_template', $params); - } - - /** - * Get private templates. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getPrivateTemplates() - { - return $this->httpPostJson('cgi-bin/template/get_all_private_template'); - } - - /** - * Delete private template. - * - * @param string $templateId - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deletePrivateTemplate($templateId) - { - $params = ['template_id' => $templateId]; - - return $this->httpPostJson('cgi-bin/template/del_private_template', $params); - } - - /** - * Send a template message. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(array $data = []) - { - $params = $this->formatMessage($data); - - $this->restoreMessage(); - - return $this->httpPostJson(static::API_SEND, $params); - } - - /** - * Send template-message for subscription. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function sendSubscription(array $data = []) - { - $params = $this->formatMessage($data); - - $this->restoreMessage(); - - return $this->httpPostJson('cgi-bin/message/template/subscribe', $params); - } - - /** - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function formatMessage(array $data = []) - { - $params = array_merge($this->message, $data); - - foreach ($params as $key => $value) { - if (in_array($key, $this->required, true) && empty($value) && empty($this->message[$key])) { - throw new InvalidArgumentException(sprintf('Attribute "%s" can not be empty!', $key)); - } - - $params[$key] = empty($value) ? $this->message[$key] : $value; - } - - $params['data'] = $this->formatData($params['data'] ?? []); - - return $params; - } - - /** - * @return array - */ - protected function formatData(array $data) - { - $formatted = []; - - foreach ($data as $key => $value) { - if (is_array($value)) { - if (\array_key_exists('value', $value)) { - $formatted[$key] = $value; - - continue; - } - - if (count($value) >= 2) { - $value = [ - 'value' => $value[0], - 'color' => $value[1], - ]; - } - } else { - $value = [ - 'value' => strval($value), - ]; - } - - $formatted[$key] = $value; - } - - return $formatted; - } - - /** - * Restore message. - */ - protected function restoreMessage() - { - $this->message = (new ReflectionClass(static::class))->getDefaultProperties()['message']; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/ServiceProvider.php deleted file mode 100644 index 98476fc..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\TemplateMessage; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['template_message'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/User/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/User/ServiceProvider.php deleted file mode 100644 index c11d8b3..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/User/ServiceProvider.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\User; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['user'] = function ($app) { - return new UserClient($app); - }; - - $app['user_tag'] = function ($app) { - return new TagClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/User/TagClient.php b/vendor/overtrue/wechat/src/OfficialAccount/User/TagClient.php deleted file mode 100644 index 9c145c8..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/User/TagClient.php +++ /dev/null @@ -1,157 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\User; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class TagClient. - * - * @author overtrue - */ -class TagClient extends BaseClient -{ - /** - * Create tag. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(string $name) - { - $params = [ - 'tag' => ['name' => $name], - ]; - - return $this->httpPostJson('cgi-bin/tags/create', $params); - } - - /** - * List all tags. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list() - { - return $this->httpGet('cgi-bin/tags/get'); - } - - /** - * Update a tag name. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $tagId, string $name) - { - $params = [ - 'tag' => [ - 'id' => $tagId, - 'name' => $name, - ], - ]; - - return $this->httpPostJson('cgi-bin/tags/update', $params); - } - - /** - * Delete tag. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(int $tagId) - { - $params = [ - 'tag' => ['id' => $tagId], - ]; - - return $this->httpPostJson('cgi-bin/tags/delete', $params); - } - - /** - * Get user tags. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function userTags(string $openid) - { - $params = ['openid' => $openid]; - - return $this->httpPostJson('cgi-bin/tags/getidlist', $params); - } - - /** - * Get users from a tag. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function usersOfTag(int $tagId, string $nextOpenId = '') - { - $params = [ - 'tagid' => $tagId, - 'next_openid' => $nextOpenId, - ]; - - return $this->httpPostJson('cgi-bin/user/tag/get', $params); - } - - /** - * Batch tag users. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function tagUsers(array $openids, int $tagId) - { - $params = [ - 'openid_list' => $openids, - 'tagid' => $tagId, - ]; - - return $this->httpPostJson('cgi-bin/tags/members/batchtagging', $params); - } - - /** - * Untag users from a tag. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function untagUsers(array $openids, int $tagId) - { - $params = [ - 'openid_list' => $openids, - 'tagid' => $tagId, - ]; - - return $this->httpPostJson('cgi-bin/tags/members/batchuntagging', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/User/UserClient.php b/vendor/overtrue/wechat/src/OfficialAccount/User/UserClient.php deleted file mode 100644 index 625ae0f..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/User/UserClient.php +++ /dev/null @@ -1,158 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\User; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class UserClient. - * - * @author overtrue - */ -class UserClient extends BaseClient -{ - /** - * Fetch a user by open id. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function get(string $openid, string $lang = 'zh_CN') - { - $params = [ - 'openid' => $openid, - 'lang' => $lang, - ]; - - return $this->httpGet('cgi-bin/user/info', $params); - } - - /** - * Batch get users. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function select(array $openids, string $lang = 'zh_CN') - { - return $this->httpPostJson('cgi-bin/user/info/batchget', [ - 'user_list' => array_map(function ($openid) use ($lang) { - return [ - 'openid' => $openid, - 'lang' => $lang, - ]; - }, $openids), - ]); - } - - /** - * List users. - * - * @param string $nextOpenId - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list(string $nextOpenId = null) - { - $params = ['next_openid' => $nextOpenId]; - - return $this->httpGet('cgi-bin/user/get', $params); - } - - /** - * Set user remark. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function remark(string $openid, string $remark) - { - $params = [ - 'openid' => $openid, - 'remark' => $remark, - ]; - - return $this->httpPostJson('cgi-bin/user/info/updateremark', $params); - } - - /** - * Get black list. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function blacklist(string $beginOpenid = null) - { - $params = ['begin_openid' => $beginOpenid]; - - return $this->httpPostJson('cgi-bin/tags/members/getblacklist', $params); - } - - /** - * Batch block user. - * - * @param array|string $openidList - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function block($openidList) - { - $params = ['openid_list' => (array) $openidList]; - - return $this->httpPostJson('cgi-bin/tags/members/batchblacklist', $params); - } - - /** - * Batch unblock user. - * - * @param array $openidList - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unblock($openidList) - { - $params = ['openid_list' => (array) $openidList]; - - return $this->httpPostJson('cgi-bin/tags/members/batchunblacklist', $params); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function changeOpenid(string $oldAppId, array $openidList) - { - $params = [ - 'from_appid' => $oldAppId, - 'openid_list' => $openidList, - ]; - - return $this->httpPostJson('cgi-bin/changeopenid', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/CardClient.php b/vendor/overtrue/wechat/src/OfficialAccount/WiFi/CardClient.php deleted file mode 100644 index 9e58b0d..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/CardClient.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\WiFi; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class CardClient. - * - * @author her-cat - */ -class CardClient extends BaseClient -{ - /** - * Set shop card coupon delivery information. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function set(array $data) - { - return $this->httpPostJson('bizwifi/couponput/set', $data); - } - - /** - * Get shop card coupon delivery information. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(int $shopId = 0) - { - return $this->httpPostJson('bizwifi/couponput/get', ['shop_id' => $shopId]); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/WiFi/Client.php deleted file mode 100644 index 638a8c9..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/Client.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\WiFi; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author her-cat - */ -class Client extends BaseClient -{ - /** - * Get Wi-Fi statistics. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function summary(string $beginDate, string $endDate, int $shopId = -1) - { - $data = [ - 'begin_date' => $beginDate, - 'end_date' => $endDate, - 'shop_id' => $shopId, - ]; - - return $this->httpPostJson('bizwifi/statistics/list', $data); - } - - /** - * Get the material QR code. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getQrCodeUrl(int $shopId, string $ssid, int $type = 0) - { - $data = [ - 'shop_id' => $shopId, - 'ssid' => $ssid, - 'img_id' => $type, - ]; - - return $this->httpPostJson('bizwifi/qrcode/get', $data); - } - - /** - * Wi-Fi completion page jump applet. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setFinishPage(array $data) - { - return $this->httpPostJson('bizwifi/finishpage/set', $data); - } - - /** - * Set the top banner jump applet. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setHomePage(array $data) - { - return $this->httpPostJson('bizwifi/homepage/set', $data); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/DeviceClient.php b/vendor/overtrue/wechat/src/OfficialAccount/WiFi/DeviceClient.php deleted file mode 100644 index 99ff8fd..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/DeviceClient.php +++ /dev/null @@ -1,110 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\WiFi; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class DeviceClient. - * - * @author her-cat - */ -class DeviceClient extends BaseClient -{ - /** - * Add a password device. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addPasswordDevice(int $shopId, string $ssid, string $password) - { - $data = [ - 'shop_id' => $shopId, - 'ssid' => $ssid, - 'password' => $password, - ]; - - return $this->httpPostJson('bizwifi/device/add', $data); - } - - /** - * Add a portal device. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addPortalDevice(int $shopId, string $ssid, bool $reset = false) - { - $data = [ - 'shop_id' => $shopId, - 'ssid' => $ssid, - 'reset' => $reset, - ]; - - return $this->httpPostJson('bizwifi/apportal/register', $data); - } - - /** - * Delete device by MAC address. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $macAddress) - { - return $this->httpPostJson('bizwifi/device/delete', ['bssid' => $macAddress]); - } - - /** - * Get a list of devices. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(int $page = 1, int $size = 10) - { - $data = [ - 'pageindex' => $page, - 'pagesize' => $size, - ]; - - return $this->httpPostJson('bizwifi/device/list', $data); - } - - /** - * Get a list of devices by shop ID. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function listByShopId(int $shopId, int $page = 1, int $size = 10) - { - $data = [ - 'shop_id' => $shopId, - 'pageindex' => $page, - 'pagesize' => $size, - ]; - - return $this->httpPostJson('bizwifi/device/list', $data); - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/WiFi/ServiceProvider.php deleted file mode 100644 index 7a28b51..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/ServiceProvider.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\WiFi; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author her-cat - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc} - */ - public function register(Container $app) - { - $app['wifi'] = function ($app) { - return new Client($app); - }; - - $app['wifi_card'] = function ($app) { - return new CardClient($app); - }; - - $app['wifi_device'] = function ($app) { - return new DeviceClient($app); - }; - - $app['wifi_shop'] = function ($app) { - return new ShopClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/ShopClient.php b/vendor/overtrue/wechat/src/OfficialAccount/WiFi/ShopClient.php deleted file mode 100644 index 30cac21..0000000 --- a/vendor/overtrue/wechat/src/OfficialAccount/WiFi/ShopClient.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OfficialAccount\WiFi; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class ShopClient. - * - * @author her-cat - */ -class ShopClient extends BaseClient -{ - /** - * Get shop Wi-Fi information. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(int $shopId) - { - return $this->httpPostJson('bizwifi/shop/get', ['shop_id' => $shopId]); - } - - /** - * Get a list of Wi-Fi shops. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list(int $page = 1, int $size = 10) - { - $data = [ - 'pageindex' => $page, - 'pagesize' => $size, - ]; - - return $this->httpPostJson('bizwifi/shop/list', $data); - } - - /** - * Update shop Wi-Fi information. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $shopId, array $data) - { - $data = array_merge(['shop_id' => $shopId], $data); - - return $this->httpPostJson('bizwifi/shop/update', $data); - } - - /** - * Clear shop network and equipment. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function clearDevice(int $shopId, string $ssid = null) - { - $data = [ - 'shop_id' => $shopId, - ]; - - if (!is_null($ssid)) { - $data['ssid'] = $ssid; - } - - return $this->httpPostJson('bizwifi/shop/clean', $data); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Application.php b/vendor/overtrue/wechat/src/OpenPlatform/Application.php deleted file mode 100644 index 79faa4d..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Application.php +++ /dev/null @@ -1,199 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform; - -use EasyWeChat\Kernel\ServiceContainer; -use EasyWeChat\Kernel\Traits\ResponseCastable; -use EasyWeChat\MiniProgram\Encryptor; -use EasyWeChat\OpenPlatform\Authorizer\Auth\AccessToken; -use EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Application as MiniProgram; -use EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Auth\Client; -use EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Account\Client as AccountClient; -use EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Application as OfficialAccount; -use EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\OAuth\ComponentDelegate; -use EasyWeChat\OpenPlatform\Authorizer\Server\Guard; - -use function EasyWeChat\Kernel\data_get; - -/** - * Class Application. - * - * @property \EasyWeChat\OpenPlatform\Server\Guard $server - * @property \EasyWeChat\OpenPlatform\Auth\AccessToken $access_token - * @property \EasyWeChat\OpenPlatform\CodeTemplate\Client $code_template - * @property \EasyWeChat\OpenPlatform\Component\Client $component - * - * @method mixed handleAuthorize(string $authCode = null) - * @method mixed getAuthorizer(string $appId) - * @method mixed getAuthorizerOption(string $appId, string $name) - * @method mixed setAuthorizerOption(string $appId, string $name, string $value) - * @method mixed getAuthorizers(int $offset = 0, int $count = 500) - * @method mixed createPreAuthorizationCode() - */ -class Application extends ServiceContainer -{ - use ResponseCastable; - - /** - * @var array - */ - protected $providers = [ - Auth\ServiceProvider::class, - Base\ServiceProvider::class, - Server\ServiceProvider::class, - CodeTemplate\ServiceProvider::class, - Component\ServiceProvider::class, - ]; - - /** - * @var array - */ - protected $defaultConfig = [ - 'http' => [ - 'timeout' => 5.0, - 'base_uri' => 'https://api.weixin.qq.com/', - ], - ]; - - /** - * Creates the officialAccount application. - */ - public function officialAccount(string $appId, string $refreshToken = null, AccessToken $accessToken = null): OfficialAccount - { - $application = new OfficialAccount($this->getAuthorizerConfig($appId, $refreshToken), $this->getReplaceServices($accessToken) + [ - 'encryptor' => $this['encryptor'], - - 'account' => function ($app) { - return new AccountClient($app, $this); - }, - ]); - - $application->extend('oauth', function ($socialite) { - /* @var \Overtrue\Socialite\Providers\WeChatProvider $socialite */ - return $socialite->component(new ComponentDelegate($this)); - }); - - return $application; - } - - /** - * Creates the miniProgram application. - */ - public function miniProgram(string $appId, string $refreshToken = null, AccessToken $accessToken = null): MiniProgram - { - return new MiniProgram($this->getAuthorizerConfig($appId, $refreshToken), $this->getReplaceServices($accessToken) + [ - 'encryptor' => function () { - return new Encryptor($this['config']['app_id'], $this['config']['token'], $this['config']['aes_key']); - }, - - 'auth' => function ($app) { - return new Client($app, $this); - }, - ]); - } - - /** - * Return the pre-authorization login page url. - * - * @param string|array|null $optional - */ - public function getPreAuthorizationUrl(string $callbackUrl, $optional = []): string - { - // 兼容旧版 API 设计 - if (\is_string($optional)) { - $optional = [ - 'pre_auth_code' => $optional, - ]; - } else { - $optional['pre_auth_code'] = data_get($this->createPreAuthorizationCode(), 'pre_auth_code'); - } - - $queries = \array_merge($optional, [ - 'component_appid' => $this['config']['app_id'], - 'redirect_uri' => $callbackUrl, - ]); - - return 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?'.http_build_query($queries); - } - - /** - * Return the pre-authorization login page url (mobile). - * - * @param string|array|null $optional - * - * @return string - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - public function getMobilePreAuthorizationUrl(string $callbackUrl, $optional = []): string - { - // 兼容旧版 API 设计 - if (\is_string($optional)) { - $optional = [ - 'pre_auth_code' => $optional, - ]; - } else { - $optional['pre_auth_code'] = data_get($this->createPreAuthorizationCode(), 'pre_auth_code'); - } - - $queries = \array_merge($optional, [ - 'component_appid' => $this['config']['app_id'], - 'redirect_uri' => $callbackUrl, - 'action' => 'bindcomponent', - 'no_scan' => 1, - ]); - - return 'https://mp.weixin.qq.com/safe/bindcomponent?'.http_build_query($queries).'#wechat_redirect'; - } - - protected function getAuthorizerConfig(string $appId, string $refreshToken = null): array - { - return $this['config']->merge([ - 'component_app_id' => $this['config']['app_id'], - 'app_id' => $appId, - 'refresh_token' => $refreshToken, - ])->toArray(); - } - - protected function getReplaceServices(AccessToken $accessToken = null): array - { - $services = [ - 'access_token' => $accessToken ?: function ($app) { - return new AccessToken($app, $this); - }, - - 'server' => function ($app) { - return new Guard($app); - }, - ]; - - foreach (['cache', 'http_client', 'log', 'logger', 'request'] as $reuse) { - if (isset($this[$reuse])) { - $services[$reuse] = $this[$reuse]; - } - } - - return $services; - } - - /** - * Handle dynamic calls. - * - * @param string $method - * @param array $args - * - * @return mixed - */ - public function __call($method, $args) - { - return $this->base->$method(...$args); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OpenPlatform/Auth/AccessToken.php deleted file mode 100644 index a8cf5e4..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Auth/AccessToken.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Auth; - -use EasyWeChat\Kernel\AccessToken as BaseAccessToken; - -/** - * Class AccessToken. - * - * @author mingyoung - */ -class AccessToken extends BaseAccessToken -{ - /** - * @var string - */ - protected $requestMethod = 'POST'; - - /** - * @var string - */ - protected $tokenKey = 'component_access_token'; - - /** - * @var string - */ - protected $endpointToGetToken = 'cgi-bin/component/api_component_token'; - - protected function getCredentials(): array - { - return [ - 'component_appid' => $this->app['config']['app_id'], - 'component_appsecret' => $this->app['config']['secret'], - 'component_verify_ticket' => $this->app['verify_ticket']->getTicket(), - ]; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Auth/ServiceProvider.php deleted file mode 100644 index c60784b..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Auth/ServiceProvider.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Auth; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['verify_ticket'] = function ($app) { - return new VerifyTicket($app); - }; - - $app['access_token'] = function ($app) { - return new AccessToken($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Auth/VerifyTicket.php b/vendor/overtrue/wechat/src/OpenPlatform/Auth/VerifyTicket.php deleted file mode 100644 index d2c495a..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Auth/VerifyTicket.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Auth; - -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Traits\InteractsWithCache; -use EasyWeChat\OpenPlatform\Application; - -/** - * Class VerifyTicket. - * - * @author mingyoung - */ -class VerifyTicket -{ - use InteractsWithCache; - - /** - * @var \EasyWeChat\OpenPlatform\Application - */ - protected $app; - - /** - * Constructor. - */ - public function __construct(Application $app) - { - $this->app = $app; - } - - /** - * Put the credential `component_verify_ticket` in cache. - * - * @return $this - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function setTicket(string $ticket) - { - $this->getCache()->set($this->getCacheKey(), $ticket, 3600); - - if (!$this->getCache()->has($this->getCacheKey())) { - throw new RuntimeException('Failed to cache verify ticket.'); - } - - return $this; - } - - /** - * Get the credential `component_verify_ticket` from cache. - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function getTicket(): string - { - if ($cached = $this->getCache()->get($this->getCacheKey())) { - return $cached; - } - - throw new RuntimeException('Credential "component_verify_ticket" does not exist in cache.'); - } - - /** - * Get cache key. - */ - protected function getCacheKey(): string - { - return 'easywechat.open_platform.verify_ticket.'.$this->app['config']['app_id']; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/Account/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/Account/Client.php deleted file mode 100644 index b062e3a..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/Account/Client.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\Aggregate\Account; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author Scholer - */ -class Client extends BaseClient -{ - /** - * 创建开放平台帐号并绑定公众号/小程序. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create() - { - $params = [ - 'appid' => $this->app['config']['app_id'], - ]; - - return $this->httpPostJson('cgi-bin/open/create', $params); - } - - /** - * 将公众号/小程序绑定到开放平台帐号下. - * - * @param string $openAppId 开放平台帐号appid - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function bindTo(string $openAppId) - { - $params = [ - 'appid' => $this->app['config']['app_id'], - 'open_appid' => $openAppId, - ]; - - return $this->httpPostJson('cgi-bin/open/bind', $params); - } - - /** - * 将公众号/小程序从开放平台帐号下解绑. - * - * @param string $openAppId 开放平台帐号appid - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unbindFrom(string $openAppId) - { - $params = [ - 'appid' => $this->app['config']['app_id'], - 'open_appid' => $openAppId, - ]; - - return $this->httpPostJson('cgi-bin/open/unbind', $params); - } - - /** - * 获取公众号/小程序所绑定的开放平台帐号. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getBinding() - { - $params = [ - 'appid' => $this->app['config']['app_id'], - ]; - - return $this->httpPostJson('cgi-bin/open/get', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/AggregateServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/AggregateServiceProvider.php deleted file mode 100644 index d93293d..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/AggregateServiceProvider.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\Aggregate; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class AggregateServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Auth/AccessToken.php deleted file mode 100644 index 2c9d53c..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Auth/AccessToken.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\Auth; - -use EasyWeChat\Kernel\AccessToken as BaseAccessToken; -use EasyWeChat\OpenPlatform\Application; -use Pimple\Container; - -/** - * Class AccessToken. - * - * @author mingyoung - */ -class AccessToken extends BaseAccessToken -{ - /** - * @var string - */ - protected $requestMethod = 'POST'; - - /** - * @var string - */ - protected $queryName = 'access_token'; - - /** - * {@inheritdoc}. - */ - protected $tokenKey = 'authorizer_access_token'; - - /** - * @var \EasyWeChat\OpenPlatform\Application - */ - protected $component; - - /** - * AuthorizerAccessToken constructor. - */ - public function __construct(Container $app, Application $component) - { - parent::__construct($app); - - $this->component = $component; - } - - /** - * {@inheritdoc}. - */ - protected function getCredentials(): array - { - return [ - 'component_appid' => $this->component['config']['app_id'], - 'authorizer_appid' => $this->app['config']['app_id'], - 'authorizer_refresh_token' => $this->app['config']['refresh_token'], - ]; - } - - public function getEndpoint(): string - { - return 'cgi-bin/component/api_authorizer_token?'.http_build_query([ - 'component_access_token' => $this->component['access_token']->getToken()['component_access_token'], - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/Client.php deleted file mode 100644 index f1b7afb..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/Client.php +++ /dev/null @@ -1,79 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Account; - -use EasyWeChat\OpenPlatform\Authorizer\Aggregate\Account\Client as BaseClient; - -/** - * Class Client. - * - * @author ClouderSky - */ -class Client extends BaseClient -{ - /** - * 获取账号基本信息. - */ - public function getBasicInfo() - { - return $this->httpPostJson('cgi-bin/account/getaccountbasicinfo'); - } - - /** - * 修改头像. - * - * @param string $mediaId 头像素材mediaId - * @param string $left 剪裁框左上角x坐标(取值范围:[0, 1]) - * @param string $top 剪裁框左上角y坐标(取值范围:[0, 1]) - * @param string $right 剪裁框右下角x坐标(取值范围:[0, 1]) - * @param string $bottom 剪裁框右下角y坐标(取值范围:[0, 1]) - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateAvatar( - string $mediaId, - $left = '0.0', - $top = '0.0', - $right = '1.0', - $bottom = '1.0' - ) { - $params = [ - 'head_img_media_id' => $mediaId, - 'x1' => \strval($left), - 'y1' => \strval($top), - 'x2' => \strval($right), - 'y2' => \strval($bottom), - ]; - - return $this->httpPostJson('cgi-bin/account/modifyheadimage', $params); - } - - /** - * 修改功能介绍. - * - * @param string $signature 功能介绍(简介) - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateSignature(string $signature) - { - $params = ['signature' => $signature]; - - return $this->httpPostJson('cgi-bin/account/modifysignature', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/ServiceProvider.php deleted file mode 100644 index f062954..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/ServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Account; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['account'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Application.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Application.php deleted file mode 100644 index 85bb557..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Application.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram; - -use EasyWeChat\MiniProgram\Application as MiniProgram; -use EasyWeChat\OpenPlatform\Authorizer\Aggregate\AggregateServiceProvider; - -/** - * Class Application. - * - * @author mingyoung - * - * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Account\Client $account - * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Code\Client $code - * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Domain\Client $domain - * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Setting\Client $setting - * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Tester\Client $tester - */ -class Application extends MiniProgram -{ - /** - * Application constructor. - */ - public function __construct(array $config = [], array $prepends = []) - { - parent::__construct($config, $prepends); - - $providers = [ - AggregateServiceProvider::class, - Code\ServiceProvider::class, - Domain\ServiceProvider::class, - Account\ServiceProvider::class, - Setting\ServiceProvider::class, - Tester\ServiceProvider::class, - ]; - - foreach ($providers as $provider) { - $this->register(new $provider()); - } - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Auth/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Auth/Client.php deleted file mode 100644 index caf87d7..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Auth/Client.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Auth; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\ServiceContainer; -use EasyWeChat\OpenPlatform\Application; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * @var \EasyWeChat\OpenPlatform\Application - */ - protected $component; - - /** - * Client constructor. - */ - public function __construct(ServiceContainer $app, Application $component) - { - parent::__construct($app); - - $this->component = $component; - } - - /** - * Get session info by code. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function session(string $code) - { - $params = [ - 'appid' => $this->app['config']['app_id'], - 'js_code' => $code, - 'grant_type' => 'authorization_code', - 'component_appid' => $this->component['config']['app_id'], - 'component_access_token' => $this->component['access_token']->getToken()['component_access_token'], - ]; - - return $this->httpGet('sns/component/jscode2session', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/Client.php deleted file mode 100644 index c733f6a..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/Client.php +++ /dev/null @@ -1,252 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Code; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function commit(int $templateId, string $extJson, string $version, string $description) - { - return $this->httpPostJson('wxa/commit', [ - 'template_id' => $templateId, - 'ext_json' => $extJson, - 'user_version' => $version, - 'user_desc' => $description, - ]); - } - - /** - * @return \EasyWeChat\Kernel\Http\Response - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getQrCode(string $path = null) - { - return $this->requestRaw('wxa/get_qrcode', 'GET', [ - 'query' => ['path' => $path], - ]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getCategory() - { - return $this->httpGet('wxa/get_category'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getPage() - { - return $this->httpGet('wxa/get_page'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function submitAudit(array $data, string $feedbackInfo = null, string $feedbackStuff = null) - { - if (isset($data['item_list'])) { - return $this->httpPostJson('wxa/submit_audit', $data); - } - - return $this->httpPostJson('wxa/submit_audit', [ - 'item_list' => $data, - 'feedback_info' => $feedbackInfo, - 'feedback_stuff' => $feedbackStuff, - ]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getAuditStatus(int $auditId) - { - return $this->httpPostJson('wxa/get_auditstatus', [ - 'auditid' => $auditId, - ]); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getLatestAuditStatus() - { - return $this->httpGet('wxa/get_latest_auditstatus'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function release() - { - return $this->httpPostJson('wxa/release'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function withdrawAudit() - { - return $this->httpGet('wxa/undocodeaudit'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function rollbackRelease() - { - return $this->httpGet('wxa/revertcoderelease'); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function changeVisitStatus(string $action) - { - return $this->httpPostJson('wxa/change_visitstatus', [ - 'action' => $action, - ]); - } - - /** - * 分阶段发布. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function grayRelease(int $grayPercentage) - { - return $this->httpPostJson('wxa/grayrelease', [ - 'gray_percentage' => $grayPercentage, - ]); - } - - /** - * 取消分阶段发布. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function revertGrayRelease() - { - return $this->httpGet('wxa/revertgrayrelease'); - } - - /** - * 查询当前分阶段发布详情. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getGrayRelease() - { - return $this->httpGet('wxa/getgrayreleaseplan'); - } - - /** - * 查询当前设置的最低基础库版本及各版本用户占比. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getSupportVersion() - { - return $this->httpPostJson('cgi-bin/wxopen/getweappsupportversion'); - } - - /** - * 设置最低基础库版本. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setSupportVersion(string $version) - { - return $this->httpPostJson('cgi-bin/wxopen/setweappsupportversion', [ - 'version' => $version, - ]); - } - - /** - * 查询服务商的当月提审限额(quota)和加急次数. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function queryQuota() - { - return $this->httpGet('wxa/queryquota'); - } - - /** - * 加急审核申请. - * - * @param int $auditId 审核单ID - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function speedupAudit(int $auditId) - { - return $this->httpPostJson('wxa/speedupaudit', [ - 'auditid' => $auditId, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/ServiceProvider.php deleted file mode 100644 index bce8611..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/ServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Code; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['code'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/Client.php deleted file mode 100644 index c065802..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/Client.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Domain; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function modify(array $params) - { - return $this->httpPostJson('wxa/modify_domain', $params); - } - - /** - * 设置小程序业务域名. - * - * @param string $action - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setWebviewDomain(array $domains, $action = 'add') - { - return $this->httpPostJson('wxa/setwebviewdomain', [ - 'action' => $action, - 'webviewdomain' => $domains, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/ServiceProvider.php deleted file mode 100644 index 4eaef13..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/ServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Domain; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['domain'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/Client.php deleted file mode 100644 index 3186fda..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/Client.php +++ /dev/null @@ -1,247 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Setting; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author ClouderSky - */ -class Client extends BaseClient -{ - /** - * 获取账号可以设置的所有类目. - */ - public function getAllCategories() - { - return $this->httpPostJson('cgi-bin/wxopen/getallcategories'); - } - - /** - * 添加类目. - * - * @param array $categories 类目数组 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addCategories(array $categories) - { - $params = ['categories' => $categories]; - - return $this->httpPostJson('cgi-bin/wxopen/addcategory', $params); - } - - /** - * 删除类目. - * - * @param int $firstId 一级类目ID - * @param int $secondId 二级类目ID - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deleteCategories(int $firstId, int $secondId) - { - $params = ['first' => $firstId, 'second' => $secondId]; - - return $this->httpPostJson('cgi-bin/wxopen/deletecategory', $params); - } - - /** - * 获取账号已经设置的所有类目. - */ - public function getCategories() - { - return $this->httpPostJson('cgi-bin/wxopen/getcategory'); - } - - /** - * 修改类目. - * - * @param array $category 单个类目 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateCategory(array $category) - { - return $this->httpPostJson('cgi-bin/wxopen/modifycategory', $category); - } - - /** - * 小程序名称设置及改名. - * - * @param string $nickname 昵称 - * @param string $idCardMediaId 身份证照片素材ID - * @param string $licenseMediaId 组织机构代码证或营业执照素材ID - * @param array $otherStuffs 其他证明材料素材ID - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setNickname( - string $nickname, - string $idCardMediaId = '', - string $licenseMediaId = '', - array $otherStuffs = [] - ) { - $params = [ - 'nick_name' => $nickname, - 'id_card' => $idCardMediaId, - 'license' => $licenseMediaId, - ]; - - for ($i = \count($otherStuffs) - 1; $i >= 0; --$i) { - $params['naming_other_stuff_'.($i + 1)] = $otherStuffs[$i]; - } - - return $this->httpPostJson('wxa/setnickname', $params); - } - - /** - * 小程序改名审核状态查询. - * - * @param int $auditId 审核单id - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getNicknameAuditStatus($auditId) - { - $params = ['audit_id' => $auditId]; - - return $this->httpPostJson('wxa/api_wxa_querynickname', $params); - } - - /** - * 微信认证名称检测. - * - * @param string $nickname 名称(昵称) - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function isAvailableNickname($nickname) - { - $params = ['nick_name' => $nickname]; - - return $this->httpPostJson( - 'cgi-bin/wxverify/checkwxverifynickname', - $params - ); - } - - /** - * 查询小程序是否可被搜索. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getSearchStatus() - { - return $this->httpGet('wxa/getwxasearchstatus'); - } - - /** - * 设置小程序可被搜素. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setSearchable() - { - return $this->httpPostJson('wxa/changewxasearchstatus', [ - 'status' => 0, - ]); - } - - /** - * 设置小程序不可被搜素. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setUnsearchable() - { - return $this->httpPostJson('wxa/changewxasearchstatus', [ - 'status' => 1, - ]); - } - - /** - * 获取展示的公众号信息. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getDisplayedOfficialAccount() - { - return $this->httpGet('wxa/getshowwxaitem'); - } - - /** - * 设置展示的公众号. - * - * @param string|bool $appid - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setDisplayedOfficialAccount($appid) - { - return $this->httpPostJson('wxa/updateshowwxaitem', [ - 'appid' => $appid ?: null, - 'wxa_subscribe_biz_flag' => $appid ? 1 : 0, - ]); - } - - /** - * 获取可以用来设置的公众号列表. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getDisplayableOfficialAccounts(int $page, int $num) - { - return $this->httpGet('wxa/getwxamplinkforshow', [ - 'page' => $page, - 'num' => $num, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/ServiceProvider.php deleted file mode 100644 index 917aec5..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/ServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Setting; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['setting'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/Client.php deleted file mode 100644 index 6ff0901..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/Client.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Tester; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author caikeal - */ -class Client extends BaseClient -{ - /** - * 绑定小程序体验者. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function bind(string $wechatId) - { - return $this->httpPostJson('wxa/bind_tester', [ - 'wechatid' => $wechatId, - ]); - } - - /** - * 解绑小程序体验者. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unbind(string $wechatId) - { - return $this->httpPostJson('wxa/unbind_tester', [ - 'wechatid' => $wechatId, - ]); - } - - /** - * 获取体验者列表. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list() - { - return $this->httpPostJson('wxa/memberauth', [ - 'action' => 'get_experiencer', - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/ServiceProvider.php deleted file mode 100644 index ff1ffb3..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/ServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Tester; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['tester'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Account/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Account/Client.php deleted file mode 100644 index 603bc3d..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Account/Client.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Account; - -use EasyWeChat\Kernel\ServiceContainer; -use EasyWeChat\OpenPlatform\Application; -use EasyWeChat\OpenPlatform\Authorizer\Aggregate\Account\Client as BaseClient; - -/** - * Class Client. - * - * @author Keal - */ -class Client extends BaseClient -{ - /** - * @var \EasyWeChat\OpenPlatform\Application - */ - protected $component; - - /** - * Client constructor. - */ - public function __construct(ServiceContainer $app, Application $component) - { - parent::__construct($app); - - $this->component = $component; - } - - /** - * 从第三方平台跳转至微信公众平台授权注册页面, 授权注册小程序. - */ - public function getFastRegistrationUrl(string $callbackUrl, bool $copyWxVerify = true): string - { - $queries = [ - 'copy_wx_verify' => $copyWxVerify, - 'component_appid' => $this->component['config']['app_id'], - 'appid' => $this->app['config']['app_id'], - 'redirect_uri' => $callbackUrl, - ]; - - return 'https://mp.weixin.qq.com/cgi-bin/fastregisterauth?'.http_build_query($queries); - } - - /** - * 小程序快速注册. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function register(string $ticket) - { - $params = [ - 'ticket' => $ticket, - ]; - - return $this->httpPostJson('cgi-bin/account/fastregister', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Application.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Application.php deleted file mode 100644 index 9e23778..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Application.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount; - -use EasyWeChat\OfficialAccount\Application as OfficialAccount; -use EasyWeChat\OpenPlatform\Authorizer\Aggregate\AggregateServiceProvider; - -/** - * Class Application. - * - * @author mingyoung - * - * @property \EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Account\Client $account - * @property \EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\MiniProgram\Client $mini_program - */ -class Application extends OfficialAccount -{ - /** - * Application constructor. - */ - public function __construct(array $config = [], array $prepends = []) - { - parent::__construct($config, $prepends); - - $providers = [ - AggregateServiceProvider::class, - MiniProgram\ServiceProvider::class, - ]; - - foreach ($providers as $provider) { - $this->register(new $provider()); - } - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/Client.php deleted file mode 100644 index e5d4e1f..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/Client.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\MiniProgram; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author Keal - */ -class Client extends BaseClient -{ - /** - * 获取公众号关联的小程序. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list() - { - return $this->httpPostJson('cgi-bin/wxopen/wxamplinkget'); - } - - /** - * 关联小程序. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function link(string $appId, bool $notifyUsers = true, bool $showProfile = false) - { - $params = [ - 'appid' => $appId, - 'notify_users' => (string) $notifyUsers, - 'show_profile' => (string) $showProfile, - ]; - - return $this->httpPostJson('cgi-bin/wxopen/wxamplink', $params); - } - - /** - * 解除已关联的小程序. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unlink(string $appId) - { - $params = [ - 'appid' => $appId, - ]; - - return $this->httpPostJson('cgi-bin/wxopen/wxampunlink', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/ServiceProvider.php deleted file mode 100644 index 31ce10b..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/ServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\MiniProgram; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['mini_program'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/OAuth/ComponentDelegate.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/OAuth/ComponentDelegate.php deleted file mode 100644 index 4a1cab2..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/OAuth/ComponentDelegate.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\OAuth; - -use EasyWeChat\OpenPlatform\Application; -use Overtrue\Socialite\WeChatComponentInterface; - -/** - * Class ComponentDelegate. - * - * @author mingyoung - */ -class ComponentDelegate implements WeChatComponentInterface -{ - /** - * @var \EasyWeChat\OpenPlatform\Application - */ - protected $app; - - /** - * ComponentDelegate Constructor. - */ - public function __construct(Application $app) - { - $this->app = $app; - } - - /** - * @return string - */ - public function getAppId() - { - return $this->app['config']['app_id']; - } - - /** - * @return string - */ - public function getToken() - { - return $this->app['access_token']->getToken()['component_access_token']; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Server/Guard.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Server/Guard.php deleted file mode 100644 index d7efbd3..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Server/Guard.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Authorizer\Server; - -use EasyWeChat\Kernel\ServerGuard; - -/** - * Class Guard. - * - * @author mingyoung - */ -class Guard extends ServerGuard -{ - /** - * Get token from OpenPlatform encryptor. - * - * @return string - */ - protected function getToken() - { - return $this->app['encryptor']->getToken(); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Base/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Base/Client.php deleted file mode 100644 index 57baa65..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Base/Client.php +++ /dev/null @@ -1,155 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Base; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get authorization info. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function handleAuthorize(string $authCode = null) - { - $params = [ - 'component_appid' => $this->app['config']['app_id'], - 'authorization_code' => $authCode ?? $this->app['request']->get('auth_code'), - ]; - - return $this->httpPostJson('cgi-bin/component/api_query_auth', $params); - } - - /** - * Get authorizer info. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getAuthorizer(string $appId) - { - $params = [ - 'component_appid' => $this->app['config']['app_id'], - 'authorizer_appid' => $appId, - ]; - - return $this->httpPostJson('cgi-bin/component/api_get_authorizer_info', $params); - } - - /** - * Get options. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getAuthorizerOption(string $appId, string $name) - { - $params = [ - 'component_appid' => $this->app['config']['app_id'], - 'authorizer_appid' => $appId, - 'option_name' => $name, - ]; - - return $this->httpPostJson('cgi-bin/component/api_get_authorizer_option', $params); - } - - /** - * Set authorizer option. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setAuthorizerOption(string $appId, string $name, string $value) - { - $params = [ - 'component_appid' => $this->app['config']['app_id'], - 'authorizer_appid' => $appId, - 'option_name' => $name, - 'option_value' => $value, - ]; - - return $this->httpPostJson('cgi-bin/component/api_set_authorizer_option', $params); - } - - /** - * Get authorizer list. - * - * @param int $offset - * @param int $count - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getAuthorizers($offset = 0, $count = 500) - { - $params = [ - 'component_appid' => $this->app['config']['app_id'], - 'offset' => $offset, - 'count' => $count, - ]; - - return $this->httpPostJson('cgi-bin/component/api_get_authorizer_list', $params); - } - - /** - * Create pre-authorization code. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createPreAuthorizationCode() - { - $params = [ - 'component_appid' => $this->app['config']['app_id'], - ]; - - return $this->httpPostJson('cgi-bin/component/api_create_preauthcode', $params); - } - - /** - * OpenPlatform Clear quota. - * - * @see https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419318587 - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function clearQuota() - { - $params = [ - 'component_appid' => $this->app['config']['app_id'], - ]; - - return $this->httpPostJson('cgi-bin/component/clear_quota', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Base/ServiceProvider.php deleted file mode 100644 index e647c41..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Base/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Base; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['base'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/Client.php deleted file mode 100644 index 5949eb0..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/Client.php +++ /dev/null @@ -1,84 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\CodeTemplate; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author caikeal - */ -class Client extends BaseClient -{ - /** - * 获取草稿箱内的所有临时代码草稿 - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getDrafts() - { - return $this->httpGet('wxa/gettemplatedraftlist'); - } - - /** - * 将草稿箱的草稿选为小程序代码模版. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createFromDraft(int $draftId) - { - $params = [ - 'draft_id' => $draftId, - ]; - - return $this->httpPostJson('wxa/addtotemplate', $params); - } - - /** - * 获取代码模版库中的所有小程序代码模版. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function list() - { - return $this->httpGet('wxa/gettemplatelist'); - } - - /** - * 删除指定小程序代码模版. - * - * @param string $templateId - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete($templateId) - { - $params = [ - 'template_id' => $templateId, - ]; - - return $this->httpPostJson('wxa/deletetemplate', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/ServiceProvider.php deleted file mode 100644 index ab543a7..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/ServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\CodeTemplate; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['code_template'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Component/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Component/Client.php deleted file mode 100644 index b7d1402..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Component/Client.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Component; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author dudashuang - */ -class Client extends BaseClient -{ - /** - * 通过法人微信快速创建小程序. - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function registerMiniProgram(array $params) - { - return $this->httpPostJson('cgi-bin/component/fastregisterweapp', $params, ['action' => 'create']); - } - - /** - * 查询创建任务状态. - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getRegistrationStatus(string $companyName, string $legalPersonaWechat, string $legalPersonaName) - { - $params = [ - 'name' => $companyName, - 'legal_persona_wechat' => $legalPersonaWechat, - 'legal_persona_name' => $legalPersonaName, - ]; - - return $this->httpPostJson('cgi-bin/component/fastregisterweapp', $params, ['action' => 'search']); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Component/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Component/ServiceProvider.php deleted file mode 100644 index 83e309f..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Component/ServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Component; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['component'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Guard.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Guard.php deleted file mode 100644 index ca0f1d2..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Server/Guard.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Server; - -use EasyWeChat\Kernel\ServerGuard; -use EasyWeChat\OpenPlatform\Server\Handlers\Authorized; -use EasyWeChat\OpenPlatform\Server\Handlers\Unauthorized; -use EasyWeChat\OpenPlatform\Server\Handlers\UpdateAuthorized; -use EasyWeChat\OpenPlatform\Server\Handlers\VerifyTicketRefreshed; -use Symfony\Component\HttpFoundation\Response; -use function EasyWeChat\Kernel\data_get; - -/** - * Class Guard. - * - * @author mingyoung - */ -class Guard extends ServerGuard -{ - public const EVENT_AUTHORIZED = 'authorized'; - public const EVENT_UNAUTHORIZED = 'unauthorized'; - public const EVENT_UPDATE_AUTHORIZED = 'updateauthorized'; - public const EVENT_COMPONENT_VERIFY_TICKET = 'component_verify_ticket'; - public const EVENT_THIRD_FAST_REGISTERED = 'notify_third_fasteregister'; - - /** - * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - protected function resolve(): Response - { - $this->registerHandlers(); - - $message = $this->getMessage(); - - if ($infoType = data_get($message, 'InfoType')) { - $this->dispatch($infoType, $message); - } - - return new Response(static::SUCCESS_EMPTY_RESPONSE); - } - - /** - * Register event handlers. - */ - protected function registerHandlers() - { - $this->on(self::EVENT_AUTHORIZED, Authorized::class); - $this->on(self::EVENT_UNAUTHORIZED, Unauthorized::class); - $this->on(self::EVENT_UPDATE_AUTHORIZED, UpdateAuthorized::class); - $this->on(self::EVENT_COMPONENT_VERIFY_TICKET, VerifyTicketRefreshed::class); - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Authorized.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Authorized.php deleted file mode 100644 index fe7f9c6..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Authorized.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Server\Handlers; - -use EasyWeChat\Kernel\Contracts\EventHandlerInterface; - -/** - * Class Authorized. - * - * @author mingyoung - */ -class Authorized implements EventHandlerInterface -{ - /** - * {@inheritdoc}. - */ - public function handle($payload = null) - { - // Do nothing for the time being. - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Unauthorized.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Unauthorized.php deleted file mode 100644 index 158228b..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Unauthorized.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Server\Handlers; - -use EasyWeChat\Kernel\Contracts\EventHandlerInterface; - -/** - * Class Unauthorized. - * - * @author mingyoung - */ -class Unauthorized implements EventHandlerInterface -{ - /** - * {@inheritdoc}. - */ - public function handle($payload = null) - { - // Do nothing for the time being. - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/UpdateAuthorized.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/UpdateAuthorized.php deleted file mode 100644 index e73caa5..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/UpdateAuthorized.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Server\Handlers; - -use EasyWeChat\Kernel\Contracts\EventHandlerInterface; - -/** - * Class UpdateAuthorized. - * - * @author mingyoung - */ -class UpdateAuthorized implements EventHandlerInterface -{ - /** - * {@inheritdoc} - */ - public function handle($payload = null) - { - // Do nothing for the time being. - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/VerifyTicketRefreshed.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/VerifyTicketRefreshed.php deleted file mode 100644 index 67fe661..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/VerifyTicketRefreshed.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Server\Handlers; - -use EasyWeChat\Kernel\Contracts\EventHandlerInterface; -use EasyWeChat\OpenPlatform\Application; - -use function EasyWeChat\Kernel\data_get; - -/** - * Class VerifyTicketRefreshed. - * - * @author mingyoung - */ -class VerifyTicketRefreshed implements EventHandlerInterface -{ - /** - * @var \EasyWeChat\OpenPlatform\Application - */ - protected $app; - - /** - * Constructor. - */ - public function __construct(Application $app) - { - $this->app = $app; - } - - /** - * {@inheritdoc}. - */ - public function handle($payload = null) - { - $ticket = data_get($payload, 'ComponentVerifyTicket'); - - if (!empty($ticket)) { - $this->app['verify_ticket']->setTicket($ticket); - } - } -} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/ServiceProvider.php deleted file mode 100644 index 7747061..0000000 --- a/vendor/overtrue/wechat/src/OpenPlatform/Server/ServiceProvider.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenPlatform\Server; - -use EasyWeChat\Kernel\Encryptor; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['encryptor'] = function ($app) { - return new Encryptor( - $app['config']['app_id'], - $app['config']['token'], - $app['config']['aes_key'] - ); - }; - - $app['server'] = function ($app) { - return new Guard($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Application.php b/vendor/overtrue/wechat/src/OpenWork/Application.php deleted file mode 100644 index 47db6da..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Application.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork; - -use EasyWeChat\Kernel\ServiceContainer; -use EasyWeChat\OpenWork\Work\Application as Work; - -/** - * Application. - * - * @author xiaomin - * - * @property \EasyWeChat\OpenWork\Server\Guard $server - * @property \EasyWeChat\OpenWork\Corp\Client $corp - * @property \EasyWeChat\OpenWork\Provider\Client $provider - * @property \EasyWeChat\OpenWork\SuiteAuth\AccessToken $suite_access_token - * @property \EasyWeChat\OpenWork\Auth\AccessToken $provider_access_token - * @property \EasyWeChat\OpenWork\SuiteAuth\SuiteTicket $suite_ticket - * @property \EasyWeChat\OpenWork\MiniProgram\Auth\Client $mini_program - */ -class Application extends ServiceContainer -{ - /** - * @var array - */ - protected $providers = [ - Auth\ServiceProvider::class, - SuiteAuth\ServiceProvider::class, - Server\ServiceProvider::class, - Corp\ServiceProvider::class, - Provider\ServiceProvider::class, - MiniProgram\ServiceProvider::class, - ]; - - /** - * @var array - */ - protected $defaultConfig = [ - // http://docs.guzzlephp.org/en/stable/request-options.html - 'http' => [ - 'base_uri' => 'https://qyapi.weixin.qq.com/', - ], - ]; - - /** - * Creates the miniProgram application. - */ - public function miniProgram(): \EasyWeChat\Work\MiniProgram\Application - { - return new \EasyWeChat\Work\MiniProgram\Application($this->getConfig()); - } - - /** - * @param string $authCorpId 企业 corp_id - * @param string $permanentCode 企业永久授权码 - */ - public function work(string $authCorpId, string $permanentCode): Work - { - return new Work($authCorpId, $permanentCode, $this); - } - - /** - * @param string $method - * @param array $arguments - * - * @return mixed - */ - public function __call($method, $arguments) - { - return $this['base']->$method(...$arguments); - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OpenWork/Auth/AccessToken.php deleted file mode 100644 index a90ab32..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Auth/AccessToken.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Auth; - -use EasyWeChat\Kernel\AccessToken as BaseAccessToken; - -/** - * AccessToken. - * - * @author xiaomin - */ -class AccessToken extends BaseAccessToken -{ - protected $requestMethod = 'POST'; - - /** - * @var string - */ - protected $endpointToGetToken = 'cgi-bin/service/get_provider_token'; - - /** - * @var string - */ - protected $tokenKey = 'provider_access_token'; - - /** - * @var string - */ - protected $cachePrefix = 'easywechat.kernel.provider_access_token.'; - - /** - * Credential for get token. - */ - protected function getCredentials(): array - { - return [ - 'corpid' => $this->app['config']['corp_id'], //服务商的corpid - 'provider_secret' => $this->app['config']['secret'], - ]; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/Auth/ServiceProvider.php deleted file mode 100644 index 78aba05..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Auth/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Auth; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * ServiceProvider. - * - * @author xiaomin - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - isset($app['provider_access_token']) || $app['provider_access_token'] = function ($app) { - return new AccessToken($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Corp/Client.php b/vendor/overtrue/wechat/src/OpenWork/Corp/Client.php deleted file mode 100644 index 1220779..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Corp/Client.php +++ /dev/null @@ -1,197 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Corp; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Client. - * - * @author xiaomin - */ -class Client extends BaseClient -{ - /** - * Client constructor. - * 三方接口有三个access_token,这里用的是suite_access_token. - */ - public function __construct(ServiceContainer $app) - { - parent::__construct($app, $app['suite_access_token']); - } - - /** - * 企业微信安装应用授权 url. - * - * @param string $preAuthCode 预授权码 - * @param string $redirectUri 回调地址 - * - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getPreAuthorizationUrl(string $preAuthCode = '', string $redirectUri = '', string $state = '') - { - $redirectUri || $redirectUri = $this->app->config['redirect_uri_install']; - $preAuthCode || $preAuthCode = $this->getPreAuthCode()['pre_auth_code']; - $state || $state = rand(); - - $params = [ - 'suite_id' => $this->app['config']['suite_id'], - 'redirect_uri' => $redirectUri, - 'pre_auth_code' => $preAuthCode, - 'state' => $state, - ]; - - return 'https://open.work.weixin.qq.com/3rdapp/install?'.http_build_query($params); - } - - /** - * 获取预授权码. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getPreAuthCode() - { - return $this->httpGet('cgi-bin/service/get_pre_auth_code'); - } - - /** - * 设置授权配置. - * 该接口可对某次授权进行配置. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function setSession(string $preAuthCode, array $sessionInfo) - { - $params = [ - 'pre_auth_code' => $preAuthCode, - 'session_info' => $sessionInfo, - ]; - - return $this->httpPostJson('cgi-bin/service/set_session_info', $params); - } - - /** - * 获取企业永久授权码. - * - * @param string $authCode 临时授权码,会在授权成功时附加在redirect_uri中跳转回第三方服务商网站,或通过回调推送给服务商。长度为64至512个字节 - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getPermanentByCode(string $authCode) - { - $params = [ - 'auth_code' => $authCode, - ]; - - return $this->httpPostJson('cgi-bin/service/get_permanent_code', $params); - } - - /** - * 获取企业授权信息. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getAuthorization(string $authCorpId, string $permanentCode) - { - $params = [ - 'auth_corpid' => $authCorpId, - 'permanent_code' => $permanentCode, - ]; - - return $this->httpPostJson('cgi-bin/service/get_auth_info', $params); - } - - /** - * 获取应用的管理员列表. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getManagers(string $authCorpId, string $agentId) - { - $params = [ - 'auth_corpid' => $authCorpId, - 'agentid' => $agentId, - ]; - - return $this->httpPostJson('cgi-bin/service/get_admin_list', $params); - } - - /** - * 获取登录url. - * - * @return string - */ - public function getOAuthRedirectUrl(string $redirectUri = '', string $scope = 'snsapi_userinfo', string $state = null) - { - $redirectUri || $redirectUri = $this->app->config['redirect_uri_oauth']; - $state || $state = rand(); - $params = [ - 'appid' => $this->app['config']['suite_id'], - 'redirect_uri' => $redirectUri, - 'response_type' => 'code', - 'scope' => $scope, - 'state' => $state, - ]; - - return 'https://open.weixin.qq.com/connect/oauth2/authorize?'.http_build_query($params).'#wechat_redirect'; - } - - /** - * 第三方根据code获取企业成员信息. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getUserByCode(string $code) - { - $params = [ - 'code' => $code, - ]; - - return $this->httpGet('cgi-bin/service/getuserinfo3rd', $params); - } - - /** - * 第三方使用user_ticket获取成员详情. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getUserByTicket(string $userTicket) - { - $params = [ - 'user_ticket' => $userTicket, - ]; - - return $this->httpPostJson('cgi-bin/service/getuserdetail3rd', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Corp/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/Corp/ServiceProvider.php deleted file mode 100644 index f467e18..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Corp/ServiceProvider.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Corp; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * ServiceProvider. - * - * @author xiaomin - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - */ - public function register(Container $app) - { - isset($app['corp']) || $app['corp'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/MiniProgram/Client.php b/vendor/overtrue/wechat/src/OpenWork/MiniProgram/Client.php deleted file mode 100644 index a054aae..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/MiniProgram/Client.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\MiniProgram; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Class Client. - */ -class Client extends BaseClient -{ - /** - * Client constructor. - */ - public function __construct(ServiceContainer $app) - { - parent::__construct($app, $app['suite_access_token']); - } - - /** - * Get session info by code. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function session(string $code) - { - $params = [ - 'js_code' => $code, - 'grant_type' => 'authorization_code', - ]; - - return $this->httpGet('cgi-bin/service/miniprogram/jscode2session', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/MiniProgram/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/MiniProgram/ServiceProvider.php deleted file mode 100644 index 8e7dba2..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/MiniProgram/ServiceProvider.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\MiniProgram; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * ServiceProvider. - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - !isset($app['mini_program']) && $app['mini_program'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Provider/Client.php b/vendor/overtrue/wechat/src/OpenWork/Provider/Client.php deleted file mode 100644 index 047ac0e..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Provider/Client.php +++ /dev/null @@ -1,214 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Provider; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Client. - * - * @author xiaomin - */ -class Client extends BaseClient -{ - /** - * Client constructor. - */ - public function __construct(ServiceContainer $app) - { - parent::__construct($app, $app['provider_access_token']); - } - - /** - * 单点登录 - 获取登录的地址. - * - * @return string - */ - public function getLoginUrl(string $redirectUri = '', string $userType = 'admin', string $state = '') - { - $redirectUri || $redirectUri = $this->app->config['redirect_uri_single']; - $state || $state = rand(); - $params = [ - 'appid' => $this->app['config']['corp_id'], - 'redirect_uri' => $redirectUri, - 'usertype' => $userType, - 'state' => $state, - ]; - - return 'https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?'.http_build_query($params); - } - - /** - * 单点登录 - 获取登录用户信息. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getLoginInfo(string $authCode) - { - $params = [ - 'auth_code' => $authCode, - ]; - - return $this->httpPostJson('cgi-bin/service/get_login_info', $params); - } - - /** - * 获取注册定制化URL. - * - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function getRegisterUri(string $registerCode = '') - { - if (!$registerCode) { - /** @var array $response */ - $response = $this->detectAndCastResponseToType($this->getRegisterCode(), 'array'); - - $registerCode = $response['register_code']; - } - - $params = ['register_code' => $registerCode]; - - return 'https://open.work.weixin.qq.com/3rdservice/wework/register?'.http_build_query($params); - } - - /** - * 获取注册码. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getRegisterCode( - string $corpName = '', - string $adminName = '', - string $adminMobile = '', - string $state = '' - ) { - $params = []; - $params['template_id'] = $this->app['config']['reg_template_id']; - !empty($corpName) && $params['corp_name'] = $corpName; - !empty($adminName) && $params['admin_name'] = $adminName; - !empty($adminMobile) && $params['admin_mobile'] = $adminMobile; - !empty($state) && $params['state'] = $state; - - return $this->httpPostJson('cgi-bin/service/get_register_code', $params); - } - - /** - * 查询注册状态. - * - * Desc:该API用于查询企业注册状态,企业注册成功返回注册信息. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getRegisterInfo(string $registerCode) - { - $params = [ - 'register_code' => $registerCode, - ]; - - return $this->httpPostJson('cgi-bin/service/get_register_info', $params); - } - - /** - * 设置授权应用可见范围. - * - * Desc:调用该接口前提是开启通讯录迁移,收到授权成功通知后可调用。 - * 企业注册初始化安装应用后,应用默认可见范围为根部门。 - * 如需修改应用可见范围,服务商可以调用该接口设置授权应用的可见范围。 - * 该接口只能使用注册完成回调事件或者查询注册状态返回的access_token。 - * 调用设置通讯录同步完成后或者access_token超过30分钟失效(即解除通讯录锁定状态)则不能继续调用该接口。 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function setAgentScope( - string $accessToken, - string $agentId, - array $allowUser = [], - array $allowParty = [], - array $allowTag = [] - ) { - $params = [ - 'agentid' => $agentId, - 'allow_user' => $allowUser, - 'allow_party' => $allowParty, - 'allow_tag' => $allowTag, - 'access_token' => $accessToken, - ]; - - return $this->httpGet('cgi-bin/agent/set_scope', $params); - } - - /** - * 设置通讯录同步完成. - * - * Desc:该API用于设置通讯录同步完成,解除通讯录锁定状态,同时使通讯录迁移access_token失效。 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function contactSyncSuccess(string $accessToken) - { - $params = ['access_token' => $accessToken]; - - return $this->httpGet('cgi-bin/sync/contact_sync_success', $params); - } - - /** - * 通讯录单个搜索 - * - * @param string $queryWord - * @param $agentId - * @param int $offset - * @param int $limit - * @param int $queryType - * @param null $fullMatchField - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function searchContact( - string $queryWord, - $agentId, - int $offset = 0, - int $limit = 50, - int $queryType = 0, - $fullMatchField = null - ) { - $params = []; - $params['auth_corpid'] = $this->app['config']['corp_id']; - $params['query_word'] = $queryWord; - $params['query_type'] = $queryType; - $params['agentid'] = $agentId; - $params['offset'] = $offset; - $params['limit'] = $limit; - !empty($fullMatchField) && $params['full_match_field'] = $fullMatchField; - - return $this->httpPostJson('cgi-bin/service/contact/search', $params); - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Provider/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/Provider/ServiceProvider.php deleted file mode 100644 index 09c4faa..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Provider/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Provider; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * ServiceProvider. - * - * @author xiaomin - */ -class ServiceProvider implements ServiceProviderInterface -{ - protected $app; - - public function register(Container $app) - { - $this->app = $app; - isset($app['provider']) || $app['provider'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Server/Guard.php b/vendor/overtrue/wechat/src/OpenWork/Server/Guard.php deleted file mode 100644 index 1e16794..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Server/Guard.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Server; - -use EasyWeChat\Kernel\Encryptor; -use EasyWeChat\Kernel\ServerGuard; - -/** - * Guard. - * - * @author xiaomin - */ -class Guard extends ServerGuard -{ - /** - * @var bool - */ - protected $alwaysValidate = true; - - /** - * @return $this - */ - public function validate() - { - return $this; - } - - protected function shouldReturnRawResponse(): bool - { - return !is_null($this->app['request']->get('echostr')); - } - - protected function isSafeMode(): bool - { - return true; - } - - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - */ - protected function decryptMessage(array $message) - { - $encryptor = new Encryptor($message['ToUserName'], $this->app['config']->get('token'), $this->app['config']->get('aes_key')); - - return $message = $encryptor->decrypt( - $message['Encrypt'], - $this->app['request']->get('msg_signature'), - $this->app['request']->get('nonce'), - $this->app['request']->get('timestamp') - ); - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Server/Handlers/EchoStrHandler.php b/vendor/overtrue/wechat/src/OpenWork/Server/Handlers/EchoStrHandler.php deleted file mode 100644 index b3aaf37..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Server/Handlers/EchoStrHandler.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Server\Handlers; - -use EasyWeChat\Kernel\Contracts\EventHandlerInterface; -use EasyWeChat\Kernel\Decorators\FinallyResult; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * EchoStrHandler. - * - * @author xiaomin - */ -class EchoStrHandler implements EventHandlerInterface -{ - /** - * @var ServiceContainer - */ - protected $app; - - /** - * EchoStrHandler constructor. - */ - public function __construct(ServiceContainer $app) - { - $this->app = $app; - } - - /** - * @param mixed $payload - * - * @return FinallyResult|null - */ - public function handle($payload = null) - { - if ($decrypted = $this->app['request']->get('echostr')) { - $str = $this->app['encryptor_corp']->decrypt( - $decrypted, - $this->app['request']->get('msg_signature'), - $this->app['request']->get('nonce'), - $this->app['request']->get('timestamp') - ); - - return new FinallyResult($str); - } - //把SuiteTicket缓存起来 - if (!empty($payload['SuiteTicket']) && !empty($payload['SuiteId']) && $this->app['config']['suite_id'] == $payload['SuiteId']) { - $this->app['suite_ticket']->setTicket($payload['SuiteTicket']); - } - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/Server/ServiceProvider.php deleted file mode 100644 index d33d5c8..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Server/ServiceProvider.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Server; - -use EasyWeChat\Kernel\Encryptor; -use EasyWeChat\OpenWork\Server\Handlers\EchoStrHandler; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * ServiceProvider. - * - * @author xiaomin - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - //微信第三方在校验url是使用的是GET方式请求和corp_id进行加密 - !isset($app['encryptor_corp']) && $app['encryptor_corp'] = function ($app) { - return new Encryptor( - $app['config']['corp_id'], - $app['config']['token'], - $app['config']['aes_key'] - ); - }; - - //微信第三方推送数据时使用的是suite_id进行加密 - !isset($app['encryptor']) && $app['encryptor'] = function ($app) { - return new Encryptor( - $app['config']['suite_id'], - $app['config']['token'], - $app['config']['aes_key'] - ); - }; - - !isset($app['server']) && $app['server'] = function ($app) { - $guard = new Guard($app); - $guard->push(new EchoStrHandler($app)); - - return $guard; - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/AccessToken.php b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/AccessToken.php deleted file mode 100644 index 3c5a611..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/AccessToken.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\SuiteAuth; - -use EasyWeChat\Kernel\AccessToken as BaseAccessToken; - -/** - * AccessToken. - * - * @author xiaomin - */ -class AccessToken extends BaseAccessToken -{ - /** - * @var string - */ - protected $requestMethod = 'POST'; - - /** - * @var string - */ - protected $endpointToGetToken = 'cgi-bin/service/get_suite_token'; - - /** - * @var string - */ - protected $tokenKey = 'suite_access_token'; - - /** - * @var string - */ - protected $cachePrefix = 'easywechat.kernel.suite_access_token.'; - - /** - * Credential for get token. - */ - protected function getCredentials(): array - { - return [ - 'suite_id' => $this->app['config']['suite_id'], - 'suite_secret' => $this->app['config']['suite_secret'], - 'suite_ticket' => $this->app['suite_ticket']->getTicket(), - ]; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/ServiceProvider.php deleted file mode 100644 index a4f5386..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/ServiceProvider.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\SuiteAuth; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * ServiceProvider. - * - * @author xiaomin - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['suite_ticket'] = function ($app) { - return new SuiteTicket($app); - }; - - isset($app['suite_access_token']) || $app['suite_access_token'] = function ($app) { - return new AccessToken($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/SuiteTicket.php b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/SuiteTicket.php deleted file mode 100644 index c9acb7d..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/SuiteTicket.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\SuiteAuth; - -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Traits\InteractsWithCache; -use EasyWeChat\OpenWork\Application; - -/** - * SuiteTicket. - * - * @author xiaomin - */ -class SuiteTicket -{ - use InteractsWithCache; - - /** - * @var Application - */ - protected $app; - - /** - * SuiteTicket constructor. - */ - public function __construct(Application $app) - { - $this->app = $app; - } - - /** - * @return $this - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function setTicket(string $ticket) - { - $this->getCache()->set($this->getCacheKey(), $ticket, 1800); - - if (!$this->getCache()->has($this->getCacheKey())) { - throw new RuntimeException('Failed to cache suite ticket.'); - } - - return $this; - } - - /** - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function getTicket(): string - { - if ($cached = $this->getCache()->get($this->getCacheKey())) { - return $cached; - } - - throw new RuntimeException('Credential "suite_ticket" does not exist in cache.'); - } - - protected function getCacheKey(): string - { - return 'easywechat.open_work.suite_ticket.'.$this->app['config']['suite_id']; - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Work/Application.php b/vendor/overtrue/wechat/src/OpenWork/Work/Application.php deleted file mode 100644 index fbf9cc2..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Work/Application.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Work; - -use EasyWeChat\OpenWork\Application as OpenWork; -use EasyWeChat\OpenWork\Work\Auth\AccessToken; -use EasyWeChat\Work\Application as Work; - -/** - * Application. - * - * @author xiaomin - */ -class Application extends Work -{ - /** - * Application constructor. - */ - public function __construct(string $authCorpId, string $permanentCode, OpenWork $component, array $prepends = []) - { - parent::__construct($component->getConfig(), $prepends + [ - 'access_token' => function ($app) use ($authCorpId, $permanentCode, $component) { - return new AccessToken($app, $authCorpId, $permanentCode, $component); - }, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/OpenWork/Work/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OpenWork/Work/Auth/AccessToken.php deleted file mode 100644 index 6a895a7..0000000 --- a/vendor/overtrue/wechat/src/OpenWork/Work/Auth/AccessToken.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\OpenWork\Work\Auth; - -use EasyWeChat\Kernel\AccessToken as BaseAccessToken; -use EasyWeChat\OpenWork\Application; -use Pimple\Container; - -/** - * AccessToken. - * - * @author xiaomin - */ -class AccessToken extends BaseAccessToken -{ - /** - * @var string - */ - protected $requestMethod = 'POST'; - - /** - * @var string 授权方企业ID - */ - protected $authCorpid; - - /** - * @var string 授权方企业永久授权码,通过get_permanent_code获取 - */ - protected $permanentCode; - - protected $component; - - /** - * AccessToken constructor. - */ - public function __construct(Container $app, string $authCorpId, string $permanentCode, Application $component) - { - $this->authCorpid = $authCorpId; - $this->permanentCode = $permanentCode; - $this->component = $component; - parent::__construct($app); - } - - /** - * Credential for get token. - */ - protected function getCredentials(): array - { - return [ - 'auth_corpid' => $this->authCorpid, - 'permanent_code' => $this->permanentCode, - ]; - } - - public function getEndpoint(): string - { - return 'cgi-bin/service/get_corp_token?'.http_build_query([ - 'suite_access_token' => $this->component['suite_access_token']->getToken()['suite_access_token'], - ]); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Application.php b/vendor/overtrue/wechat/src/Payment/Application.php deleted file mode 100644 index 5f5b4c6..0000000 --- a/vendor/overtrue/wechat/src/Payment/Application.php +++ /dev/null @@ -1,190 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment; - -use Closure; -use EasyWeChat\BasicService; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\ServiceContainer; -use EasyWeChat\Kernel\Support; -use EasyWeChat\OfficialAccount; - -/** - * Class Application. - * - * @property \EasyWeChat\Payment\Bill\Client $bill - * @property \EasyWeChat\Payment\Fundflow\Client $fundflow - * @property \EasyWeChat\Payment\Jssdk\Client $jssdk - * @property \EasyWeChat\Payment\Order\Client $order - * @property \EasyWeChat\Payment\Refund\Client $refund - * @property \EasyWeChat\Payment\Coupon\Client $coupon - * @property \EasyWeChat\Payment\Reverse\Client $reverse - * @property \EasyWeChat\Payment\Redpack\Client $redpack - * @property \EasyWeChat\BasicService\Url\Client $url - * @property \EasyWeChat\Payment\Transfer\Client $transfer - * @property \EasyWeChat\Payment\Security\Client $security - * @property \EasyWeChat\Payment\ProfitSharing\Client $profit_sharing - * @property \EasyWeChat\Payment\Contract\Client $contract - * @property \EasyWeChat\OfficialAccount\Auth\AccessToken $access_token - * - * @method mixed pay(array $attributes) - * @method mixed authCodeToOpenid(string $authCode) - */ -class Application extends ServiceContainer -{ - /** - * @var array - */ - protected $providers = [ - OfficialAccount\Auth\ServiceProvider::class, - BasicService\Url\ServiceProvider::class, - Base\ServiceProvider::class, - Bill\ServiceProvider::class, - Fundflow\ServiceProvider::class, - Coupon\ServiceProvider::class, - Jssdk\ServiceProvider::class, - Merchant\ServiceProvider::class, - Order\ServiceProvider::class, - Redpack\ServiceProvider::class, - Refund\ServiceProvider::class, - Reverse\ServiceProvider::class, - Sandbox\ServiceProvider::class, - Transfer\ServiceProvider::class, - Security\ServiceProvider::class, - ProfitSharing\ServiceProvider::class, - Contract\ServiceProvider::class, - ]; - - /** - * @var array - */ - protected $defaultConfig = [ - 'http' => [ - 'base_uri' => 'https://api.mch.weixin.qq.com/', - ], - ]; - - /** - * Build payment scheme for product. - */ - public function scheme(string $productId): string - { - $params = [ - 'appid' => $this['config']->app_id, - 'mch_id' => $this['config']->mch_id, - 'time_stamp' => time(), - 'nonce_str' => uniqid(), - 'product_id' => $productId, - ]; - - $params['sign'] = Support\generate_sign($params, $this['config']->key); - - return 'weixin://wxpay/bizpayurl?'.http_build_query($params); - } - - /** - * @return string - */ - public function codeUrlScheme(string $codeUrl) - { - return \sprintf('weixin://wxpay/bizpayurl?sr=%s', $codeUrl); - } - - /** - * @return \Symfony\Component\HttpFoundation\Response - * - * @codeCoverageIgnore - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function handlePaidNotify(Closure $closure) - { - return (new Notify\Paid($this))->handle($closure); - } - - /** - * @return \Symfony\Component\HttpFoundation\Response - * - * @codeCoverageIgnore - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function handleRefundedNotify(Closure $closure) - { - return (new Notify\Refunded($this))->handle($closure); - } - - /** - * @return \Symfony\Component\HttpFoundation\Response - * - * @codeCoverageIgnore - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function handleScannedNotify(Closure $closure) - { - return (new Notify\Scanned($this))->handle($closure); - } - - /** - * Set sub-merchant. - * - * @return $this - */ - public function setSubMerchant(string $mchId, string $appId = null) - { - $this['config']->set('sub_mch_id', $mchId); - $this['config']->set('sub_appid', $appId); - - return $this; - } - - public function inSandbox(): bool - { - return (bool) $this['config']->get('sandbox'); - } - - /** - * @return string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function getKey(string $endpoint = null) - { - if ('sandboxnew/pay/getsignkey' === $endpoint) { - return $this['config']->key; - } - - $key = $this->inSandbox() ? $this['sandbox']->getKey() : $this['config']->key; - - if (empty($key)) { - throw new InvalidArgumentException('config key should not empty.'); - } - - if (32 !== strlen($key)) { - throw new InvalidArgumentException(sprintf("'%s' should be 32 chars length.", $key)); - } - - return $key; - } - - /** - * @param string $name - * @param array $arguments - * - * @return mixed - */ - public function __call($name, $arguments) - { - return call_user_func_array([$this['base'], $name], $arguments); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Base/Client.php b/vendor/overtrue/wechat/src/Payment/Base/Client.php deleted file mode 100644 index 1fbb607..0000000 --- a/vendor/overtrue/wechat/src/Payment/Base/Client.php +++ /dev/null @@ -1,50 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Base; - -use EasyWeChat\Payment\Kernel\BaseClient; - -class Client extends BaseClient -{ - /** - * Pay the order. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function pay(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->request($this->wrap('pay/micropay'), $params); - } - - /** - * Get openid by auth code. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function authCodeToOpenid(string $authCode) - { - return $this->request('tools/authcodetoopenid', [ - 'appid' => $this->app['config']->app_id, - 'auth_code' => $authCode, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Base/ServiceProvider.php deleted file mode 100644 index 71aebd9..0000000 --- a/vendor/overtrue/wechat/src/Payment/Base/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Base; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['base'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Bill/Client.php b/vendor/overtrue/wechat/src/Payment/Bill/Client.php deleted file mode 100644 index e8df7f9..0000000 --- a/vendor/overtrue/wechat/src/Payment/Bill/Client.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Bill; - -use EasyWeChat\Kernel\Http\StreamResponse; -use EasyWeChat\Payment\Kernel\BaseClient; - -class Client extends BaseClient -{ - /** - * Download bill history as a table file. - * - * @return \EasyWeChat\Kernel\Http\StreamResponse|\Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $date, string $type = 'ALL', array $optional = []) - { - $params = [ - 'appid' => $this->app['config']->app_id, - 'bill_date' => $date, - 'bill_type' => $type, - ] + $optional; - - $response = $this->requestRaw($this->wrap('pay/downloadbill'), $params); - - if (0 === strpos($response->getBody()->getContents(), '')) { - return $this->castResponseToType($response, $this->app['config']->get('response_type')); - } - - return StreamResponse::buildFromPsrResponse($response); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Bill/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Bill/ServiceProvider.php deleted file mode 100644 index 3fd98d4..0000000 --- a/vendor/overtrue/wechat/src/Payment/Bill/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Bill; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['bill'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Contract/Client.php b/vendor/overtrue/wechat/src/Payment/Contract/Client.php deleted file mode 100644 index 141d22c..0000000 --- a/vendor/overtrue/wechat/src/Payment/Contract/Client.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Contract; - -use EasyWeChat\Payment\Kernel\BaseClient; - -/** - * Class Client. - * - * @author tianyong90 <412039588@qq.com> - */ -class Client extends BaseClient -{ - /** - * entrust official account. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function web(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->safeRequest('papay/entrustweb', $params); - } - - /** - * entrust app. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function app(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->safeRequest('papay/preentrustweb', $params); - } - - /** - * entrust html 5. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function h5(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->safeRequest('papay/h5entrustweb', $params); - } - - /** - * apply papay. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function apply(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->safeRequest('pay/pappayapply', $params); - } - - /** - * delete papay contrace. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->safeRequest('papay/deletecontract', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Contract/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Contract/ServiceProvider.php deleted file mode 100644 index 945ea68..0000000 --- a/vendor/overtrue/wechat/src/Payment/Contract/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Contract; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['contract'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Coupon/Client.php b/vendor/overtrue/wechat/src/Payment/Coupon/Client.php deleted file mode 100644 index b81831b..0000000 --- a/vendor/overtrue/wechat/src/Payment/Coupon/Client.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Coupon; - -use EasyWeChat\Payment\Kernel\BaseClient; - -/** - * Class Client. - * - * @author tianyong90 <412039588@qq.com> - */ -class Client extends BaseClient -{ - /** - * send a cash coupon. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(array $params) - { - $params['appid'] = $this->app['config']->app_id; - $params['openid_count'] = 1; - - return $this->safeRequest('mmpaymkttransfers/send_coupon', $params); - } - - /** - * query a coupon stock. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function stock(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->request('mmpaymkttransfers/query_coupon_stock', $params); - } - - /** - * query a info of coupon. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function info(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->request('mmpaymkttransfers/querycouponsinfo', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Coupon/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Coupon/ServiceProvider.php deleted file mode 100644 index 513734b..0000000 --- a/vendor/overtrue/wechat/src/Payment/Coupon/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Coupon; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['coupon'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Fundflow/Client.php b/vendor/overtrue/wechat/src/Payment/Fundflow/Client.php deleted file mode 100644 index b69c7eb..0000000 --- a/vendor/overtrue/wechat/src/Payment/Fundflow/Client.php +++ /dev/null @@ -1,54 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Fundflow; - -use EasyWeChat\Kernel\Http\StreamResponse; -use EasyWeChat\Payment\Kernel\BaseClient; - -class Client extends BaseClient -{ - /** - * Download fundflow history as a table file. - * - * @param array $options - * - * @return array|\EasyWeChat\Kernel\Http\Response|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $date, string $type = 'Basic', $options = []) - { - $params = [ - 'appid' => $this->app['config']->app_id, - 'bill_date' => $date, - 'account_type' => $type, - 'sign_type' => 'HMAC-SHA256', - 'nonce_str' => uniqid('micro'), - ]; - $options = array_merge( - [ - 'cert' => $this->app['config']->get('cert_path'), - 'ssl_key' => $this->app['config']->get('key_path'), - ], - $options - ); - $response = $this->requestRaw('pay/downloadfundflow', $params, 'post', $options); - - if (0 === strpos($response->getBody()->getContents(), '')) { - return $this->castResponseToType($response, $this->app['config']->get('response_type')); - } - - return StreamResponse::buildFromPsrResponse($response); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Fundflow/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Fundflow/ServiceProvider.php deleted file mode 100644 index 9901124..0000000 --- a/vendor/overtrue/wechat/src/Payment/Fundflow/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Fundflow; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['fundflow'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Jssdk/Client.php b/vendor/overtrue/wechat/src/Payment/Jssdk/Client.php deleted file mode 100644 index 52cf7f7..0000000 --- a/vendor/overtrue/wechat/src/Payment/Jssdk/Client.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Jssdk; - -use EasyWeChat\BasicService\Jssdk\Client as JssdkClient; -use EasyWeChat\Kernel\Support; -use Overtrue\Socialite\AccessTokenInterface; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends JssdkClient -{ - /** - * [WeixinJSBridge] Generate js config for payment. - * - *
    -     * WeixinJSBridge.invoke(
    -     *  'getBrandWCPayRequest',
    -     *  ...
    -     * );
    -     * 
    - * - * @return string|array - */ - public function bridgeConfig(string $prepayId, bool $json = true) - { - $params = [ - 'appId' => $this->app['config']->sub_appid ?: $this->app['config']->app_id, - 'timeStamp' => strval(time()), - 'nonceStr' => uniqid(), - 'package' => "prepay_id=$prepayId", - 'signType' => 'MD5', - ]; - - $params['paySign'] = Support\generate_sign($params, $this->app['config']->key, 'md5'); - - return $json ? json_encode($params) : $params; - } - - /** - * [JSSDK] Generate js config for payment. - * - *
    -     * wx.chooseWXPay({...});
    -     * 
    - */ - public function sdkConfig(string $prepayId): array - { - $config = $this->bridgeConfig($prepayId, false); - - $config['timestamp'] = $config['timeStamp']; - unset($config['timeStamp']); - - return $config; - } - - /** - * Generate app payment parameters. - */ - public function appConfig(string $prepayId): array - { - $params = [ - 'appid' => $this->app['config']->app_id, - 'partnerid' => $this->app['config']->mch_id, - 'prepayid' => $prepayId, - 'noncestr' => uniqid(), - 'timestamp' => time(), - 'package' => 'Sign=WXPay', - ]; - - $params['sign'] = Support\generate_sign($params, $this->app['config']->key); - - return $params; - } - - /** - * Generate js config for share user address. - * - * @param string|\Overtrue\Socialite\AccessTokenInterface $accessToken - * - * @return string|array - */ - public function shareAddressConfig($accessToken, bool $json = true) - { - if ($accessToken instanceof AccessTokenInterface) { - $accessToken = $accessToken->getToken(); - } - - $params = [ - 'appId' => $this->app['config']->app_id, - 'scope' => 'jsapi_address', - 'timeStamp' => strval(time()), - 'nonceStr' => uniqid(), - 'signType' => 'SHA1', - ]; - - $signParams = [ - 'appid' => $params['appId'], - 'url' => $this->getUrl(), - 'timestamp' => $params['timeStamp'], - 'noncestr' => $params['nonceStr'], - 'accesstoken' => strval($accessToken), - ]; - - ksort($signParams); - - $params['addrSign'] = sha1(urldecode(http_build_query($signParams))); - - return $json ? json_encode($params) : $params; - } - - /** - * Generate js config for contract of mini program. - */ - public function contractConfig(array $params): array - { - $params['appid'] = $this->app['config']->app_id; - $params['timestamp'] = time(); - - $params['sign'] = Support\generate_sign($params, $this->app['config']->key); - - return $params; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Jssdk/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Jssdk/ServiceProvider.php deleted file mode 100644 index 24f2a76..0000000 --- a/vendor/overtrue/wechat/src/Payment/Jssdk/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Jssdk; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['jssdk'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Kernel/BaseClient.php b/vendor/overtrue/wechat/src/Payment/Kernel/BaseClient.php deleted file mode 100644 index c765f40..0000000 --- a/vendor/overtrue/wechat/src/Payment/Kernel/BaseClient.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Kernel; - -use EasyWeChat\Kernel\Support; -use EasyWeChat\Kernel\Traits\HasHttpRequests; -use EasyWeChat\Payment\Application; -use GuzzleHttp\MessageFormatter; -use GuzzleHttp\Middleware; -use Psr\Http\Message\ResponseInterface; - -/** - * Class BaseClient. - * - * @author overtrue - */ -class BaseClient -{ - use HasHttpRequests { request as performRequest; } - - /** - * @var \EasyWeChat\Payment\Application - */ - protected $app; - - /** - * Constructor. - */ - public function __construct(Application $app) - { - $this->app = $app; - - $this->setHttpClient($this->app['http_client']); - } - - /** - * Extra request params. - * - * @return array - */ - protected function prepends() - { - return []; - } - - /** - * Make a API request. - * - * @param string $method - * @param bool $returnResponse - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function request(string $endpoint, array $params = [], $method = 'post', array $options = [], $returnResponse = false) - { - $base = [ - 'mch_id' => $this->app['config']['mch_id'], - 'nonce_str' => uniqid(), - 'sub_mch_id' => $this->app['config']['sub_mch_id'], - 'sub_appid' => $this->app['config']['sub_appid'], - ]; - - $params = array_filter(array_merge($base, $this->prepends(), $params), 'strlen'); - - $secretKey = $this->app->getKey($endpoint); - - $encryptMethod = Support\get_encrypt_method(Support\Arr::get($params, 'sign_type', 'MD5'), $secretKey); - - $params['sign'] = Support\generate_sign($params, $secretKey, $encryptMethod); - - $options = array_merge([ - 'body' => Support\XML::build($params), - ], $options); - - $this->pushMiddleware($this->logMiddleware(), 'log'); - - $response = $this->performRequest($endpoint, $method, $options); - - return $returnResponse ? $response : $this->castResponseToType($response, $this->app->config->get('response_type')); - } - - /** - * Log the request. - * - * @return \Closure - */ - protected function logMiddleware() - { - $formatter = new MessageFormatter($this->app['config']['http.log_template'] ?? MessageFormatter::DEBUG); - - return Middleware::log($this->app['logger'], $formatter); - } - - /** - * Make a request and return raw response. - * - * @param string $method - * - * @return ResponseInterface - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function requestRaw(string $endpoint, array $params = [], $method = 'post', array $options = []) - { - /** @var ResponseInterface $response */ - $response = $this->request($endpoint, $params, $method, $options, true); - - return $response; - } - - /** - * Make a request and return an array. - * - * @param string $method - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function requestArray(string $endpoint, array $params = [], $method = 'post', array $options = []): array - { - $response = $this->requestRaw($endpoint, $params, $method, $options); - - return $this->castResponseToType($response, 'array'); - } - - /** - * Request with SSL. - * - * @param string $endpoint - * @param string $method - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function safeRequest($endpoint, array $params, $method = 'post', array $options = []) - { - $options = array_merge([ - 'cert' => $this->app['config']->get('cert_path'), - 'ssl_key' => $this->app['config']->get('key_path'), - ], $options); - - return $this->request($endpoint, $params, $method, $options); - } - - /** - * Wrapping an API endpoint. - */ - protected function wrap(string $endpoint): string - { - return $this->app->inSandbox() ? "sandboxnew/{$endpoint}" : $endpoint; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/InvalidSignException.php b/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/InvalidSignException.php deleted file mode 100644 index cdd25ba..0000000 --- a/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/InvalidSignException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Kernel\Exceptions; - -use EasyWeChat\Kernel\Exceptions\Exception; - -class InvalidSignException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/SandboxException.php b/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/SandboxException.php deleted file mode 100644 index 01f9dd5..0000000 --- a/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/SandboxException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Kernel\Exceptions; - -use EasyWeChat\Kernel\Exceptions\Exception; - -class SandboxException extends Exception -{ -} diff --git a/vendor/overtrue/wechat/src/Payment/Merchant/Client.php b/vendor/overtrue/wechat/src/Payment/Merchant/Client.php deleted file mode 100644 index 493bce1..0000000 --- a/vendor/overtrue/wechat/src/Payment/Merchant/Client.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Merchant; - -use EasyWeChat\Payment\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Add sub-merchant. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function addSubMerchant(array $params) - { - return $this->manage($params, ['action' => 'add']); - } - - /** - * Query sub-merchant by merchant id. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function querySubMerchantByMerchantId(string $id) - { - $params = [ - 'micro_mch_id' => $id, - ]; - - return $this->manage($params, ['action' => 'query']); - } - - /** - * Query sub-merchant by wechat id. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function querySubMerchantByWeChatId(string $id) - { - $params = [ - 'recipient_wechatid' => $id, - ]; - - return $this->manage($params, ['action' => 'query']); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function manage(array $params, array $query) - { - $params = array_merge($params, [ - 'appid' => $this->app['config']->app_id, - 'nonce_str' => '', - 'sub_mch_id' => '', - 'sub_appid' => '', - ]); - - return $this->safeRequest('secapi/mch/submchmanage', $params, 'post', compact('query')); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Merchant/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Merchant/ServiceProvider.php deleted file mode 100644 index 5d05c95..0000000 --- a/vendor/overtrue/wechat/src/Payment/Merchant/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Merchant; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['merchant'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Notify/Handler.php b/vendor/overtrue/wechat/src/Payment/Notify/Handler.php deleted file mode 100644 index 886e55f..0000000 --- a/vendor/overtrue/wechat/src/Payment/Notify/Handler.php +++ /dev/null @@ -1,189 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Notify; - -use Closure; -use EasyWeChat\Kernel\Exceptions\Exception; -use EasyWeChat\Kernel\Support; -use EasyWeChat\Kernel\Support\XML; -use EasyWeChat\Payment\Kernel\Exceptions\InvalidSignException; -use Symfony\Component\HttpFoundation\Response; - -abstract class Handler -{ - public const SUCCESS = 'SUCCESS'; - public const FAIL = 'FAIL'; - - /** - * @var \EasyWeChat\Payment\Application - */ - protected $app; - - /** - * @var array - */ - protected $message; - - /** - * @var string|null - */ - protected $fail; - - /** - * @var array - */ - protected $attributes = []; - - /** - * Check sign. - * If failed, throws an exception. - * - * @var bool - */ - protected $check = true; - - /** - * Respond with sign. - * - * @var bool - */ - protected $sign = false; - - /** - * @param \EasyWeChat\Payment\Application $app - */ - public function __construct($app) - { - $this->app = $app; - } - - /** - * Handle incoming notify. - * - * @return \Symfony\Component\HttpFoundation\Response - */ - abstract public function handle(Closure $closure); - - public function fail(string $message) - { - $this->fail = $message; - } - - /** - * @return $this - */ - public function respondWith(array $attributes, bool $sign = false) - { - $this->attributes = $attributes; - $this->sign = $sign; - - return $this; - } - - /** - * Build xml and return the response to WeChat. - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function toResponse(): Response - { - $base = [ - 'return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL, - 'return_msg' => $this->fail, - ]; - - $attributes = array_merge($base, $this->attributes); - - if ($this->sign) { - $attributes['sign'] = Support\generate_sign($attributes, $this->app->getKey()); - } - - return new Response(XML::build($attributes)); - } - - /** - * Return the notify message from request. - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function getMessage(): array - { - if (!empty($this->message)) { - return $this->message; - } - - try { - $message = XML::parse(strval($this->app['request']->getContent())); - } catch (\Throwable $e) { - throw new Exception('Invalid request XML: '.$e->getMessage(), 400); - } - - if (!is_array($message) || empty($message)) { - throw new Exception('Invalid request XML.', 400); - } - - if ($this->check) { - $this->validate($message); - } - - return $this->message = $message; - } - - /** - * Decrypt message. - * - * @return string|null - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function decryptMessage(string $key) - { - $message = $this->getMessage(); - if (empty($message[$key])) { - return null; - } - - return Support\AES::decrypt( - base64_decode($message[$key], true), - md5($this->app['config']->key), - '', - OPENSSL_RAW_DATA, - 'AES-256-ECB' - ); - } - - /** - * Validate the request params. - * - * @throws \EasyWeChat\Payment\Kernel\Exceptions\InvalidSignException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - protected function validate(array $message) - { - $sign = $message['sign']; - unset($message['sign']); - - if (Support\generate_sign($message, $this->app->getKey()) !== $sign) { - throw new InvalidSignException(); - } - } - - /** - * @param mixed $result - */ - protected function strict($result) - { - if (true !== $result && is_null($this->fail)) { - $this->fail(strval($result)); - } - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Notify/Paid.php b/vendor/overtrue/wechat/src/Payment/Notify/Paid.php deleted file mode 100644 index 8e107bd..0000000 --- a/vendor/overtrue/wechat/src/Payment/Notify/Paid.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Notify; - -use Closure; - -class Paid extends Handler -{ - /** - * @return \Symfony\Component\HttpFoundation\Response - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function handle(Closure $closure) - { - $this->strict( - \call_user_func($closure, $this->getMessage(), [$this, 'fail']) - ); - - return $this->toResponse(); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Notify/Refunded.php b/vendor/overtrue/wechat/src/Payment/Notify/Refunded.php deleted file mode 100644 index 2ff7edd..0000000 --- a/vendor/overtrue/wechat/src/Payment/Notify/Refunded.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Notify; - -use Closure; -use EasyWeChat\Kernel\Support\XML; - -class Refunded extends Handler -{ - protected $check = false; - - /** - * @return \Symfony\Component\HttpFoundation\Response - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function handle(Closure $closure) - { - $this->strict( - \call_user_func($closure, $this->getMessage(), $this->reqInfo(), [$this, 'fail']) - ); - - return $this->toResponse(); - } - - /** - * Decrypt the `req_info` from request message. - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function reqInfo() - { - return XML::parse($this->decryptMessage('req_info')); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Notify/Scanned.php b/vendor/overtrue/wechat/src/Payment/Notify/Scanned.php deleted file mode 100644 index dfa9543..0000000 --- a/vendor/overtrue/wechat/src/Payment/Notify/Scanned.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Notify; - -use Closure; - -class Scanned extends Handler -{ - protected $check = false; - - /** - * @var string|null - */ - protected $alert; - - public function alert(string $message) - { - $this->alert = $message; - } - - /** - * @return \Symfony\Component\HttpFoundation\Response - * - * @throws \EasyWeChat\Kernel\Exceptions\Exception - */ - public function handle(Closure $closure) - { - $result = \call_user_func($closure, $this->getMessage(), [$this, 'fail'], [$this, 'alert']); - - $attributes = [ - 'result_code' => is_null($this->alert) && is_null($this->fail) ? static::SUCCESS : static::FAIL, - 'err_code_des' => $this->alert, - ]; - - if (is_null($this->alert) && is_string($result)) { - $attributes += [ - 'appid' => $this->app['config']->app_id, - 'mch_id' => $this->app['config']->mch_id, - 'nonce_str' => uniqid(), - 'prepay_id' => $result, - ]; - } - - return $this->respondWith($attributes, true)->toResponse(); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Order/Client.php b/vendor/overtrue/wechat/src/Payment/Order/Client.php deleted file mode 100644 index 0be54ed..0000000 --- a/vendor/overtrue/wechat/src/Payment/Order/Client.php +++ /dev/null @@ -1,117 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Order; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Exceptions\InvalidConfigException; -use EasyWeChat\Kernel\Support; -use EasyWeChat\Kernel\Support\Collection; -use EasyWeChat\Payment\Kernel\BaseClient; -use Psr\Http\Message\ResponseInterface; - -class Client extends BaseClient -{ - /** - * Unify order. - * - * @param bool $isContract - * - * @return ResponseInterface|Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function unify(array $params, $isContract = false) - { - if (empty($params['spbill_create_ip'])) { - $params['spbill_create_ip'] = ('NATIVE' === $params['trade_type']) ? Support\get_server_ip() : Support\get_client_ip(); - } - - $params['appid'] = $this->app['config']->app_id; - $params['notify_url'] = $params['notify_url'] ?? $this->app['config']['notify_url']; - - if ($isContract) { - $params['contract_appid'] = $this->app['config']['app_id']; - $params['contract_mchid'] = $this->app['config']['mch_id']; - $params['request_serial'] = $params['request_serial'] ?? time(); - $params['contract_notify_url'] = $params['contract_notify_url'] ?? $this->app['config']['contract_notify_url']; - - return $this->request($this->wrap('pay/contractorder'), $params); - } - - return $this->request($this->wrap('pay/unifiedorder'), $params); - } - - /** - * Query order by out trade number. - * - * @return ResponseInterface|Collection|array|object|string - * - * @throws InvalidArgumentException - * @throws InvalidConfigException - */ - public function queryByOutTradeNumber(string $number) - { - return $this->query([ - 'out_trade_no' => $number, - ]); - } - - /** - * Query order by transaction id. - * - * @return ResponseInterface|Collection|array|object|string - * - * @throws InvalidArgumentException - * @throws InvalidConfigException - */ - public function queryByTransactionId(string $transactionId) - { - return $this->query([ - 'transaction_id' => $transactionId, - ]); - } - - /** - * @return ResponseInterface|Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function query(array $params) - { - $params['appid'] = $this->app['config']->app_id; - - return $this->request($this->wrap('pay/orderquery'), $params); - } - - /** - * Close order by out_trade_no. - * - * @return ResponseInterface|Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function close(string $tradeNo) - { - $params = [ - 'appid' => $this->app['config']->app_id, - 'out_trade_no' => $tradeNo, - ]; - - return $this->request($this->wrap('pay/closeorder'), $params); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Order/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Order/ServiceProvider.php deleted file mode 100644 index 9e781c0..0000000 --- a/vendor/overtrue/wechat/src/Payment/Order/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Order; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['order'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/ProfitSharing/Client.php b/vendor/overtrue/wechat/src/Payment/ProfitSharing/Client.php deleted file mode 100644 index 8b75b32..0000000 --- a/vendor/overtrue/wechat/src/Payment/ProfitSharing/Client.php +++ /dev/null @@ -1,249 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\ProfitSharing; - -use EasyWeChat\Payment\Kernel\BaseClient; - -/** - * Class Client. - * - * @author ClouderSky - */ -class Client extends BaseClient -{ - /** - * {@inheritdoc}. - */ - protected function prepends() - { - return [ - 'sign_type' => 'HMAC-SHA256', - ]; - } - - /** - * Add profit sharing receiver. - * 服务商代子商户发起添加分账接收方请求. - * 后续可通过发起分账请求将结算后的钱分到该分账接收方. - * - * @param array $receiver 分账接收方对象,json格式 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addReceiver(array $receiver) - { - $params = [ - 'appid' => $this->app['config']->app_id, - 'receiver' => json_encode( - $receiver, - JSON_UNESCAPED_UNICODE - ), - ]; - - return $this->request( - 'pay/profitsharingaddreceiver', - $params - ); - } - - /** - * Delete profit sharing receiver. - * 服务商代子商户发起删除分账接收方请求. - * 删除后不支持将结算后的钱分到该分账接收方. - * - * @param array $receiver 分账接收方对象,json格式 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deleteReceiver(array $receiver) - { - $params = [ - 'appid' => $this->app['config']->app_id, - 'receiver' => json_encode( - $receiver, - JSON_UNESCAPED_UNICODE - ), - ]; - - return $this->request( - 'pay/profitsharingremovereceiver', - $params - ); - } - - /** - * Single profit sharing. - * 请求单次分账. - * - * @param string $transactionId 微信支付订单号 - * @param string $outOrderNo 商户系统内部的分账单号 - * @param array $receivers 分账接收方列表 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function share( - string $transactionId, - string $outOrderNo, - array $receivers - ) { - $params = [ - 'appid' => $this->app['config']->app_id, - 'transaction_id' => $transactionId, - 'out_order_no' => $outOrderNo, - 'receivers' => json_encode( - $receivers, - JSON_UNESCAPED_UNICODE - ), - ]; - - return $this->safeRequest( - 'secapi/pay/profitsharing', - $params - ); - } - - /** - * Multi profit sharing. - * 请求多次分账. - * - * @param string $transactionId 微信支付订单号 - * @param string $outOrderNo 商户系统内部的分账单号 - * @param array $receivers 分账接收方列表 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function multiShare( - string $transactionId, - string $outOrderNo, - array $receivers - ) { - $params = [ - 'appid' => $this->app['config']->app_id, - 'transaction_id' => $transactionId, - 'out_order_no' => $outOrderNo, - 'receivers' => json_encode( - $receivers, - JSON_UNESCAPED_UNICODE - ), - ]; - - return $this->safeRequest( - 'secapi/pay/multiprofitsharing', - $params - ); - } - - /** - * Finish profit sharing. - * 完结分账. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function markOrderAsFinished(array $params) - { - $params['appid'] = $this->app['config']->app_id; - $params['sub_appid'] = null; - - return $this->safeRequest( - 'secapi/pay/profitsharingfinish', - $params - ); - } - - /** - * Query profit sharing result. - * 查询分账结果. - * - * @param string $transactionId 微信支付订单号 - * @param string $outOrderNo 商户系统内部的分账单号 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function query( - string $transactionId, - string $outOrderNo - ) { - $params = [ - 'sub_appid' => null, - 'transaction_id' => $transactionId, - 'out_order_no' => $outOrderNo, - ]; - - return $this->request( - 'pay/profitsharingquery', - $params - ); - } - - /** - * Profit sharing return. - * 分账回退. - * - * @param string $outOrderNo 商户系统内部的分账单号 - * @param string $outReturnNo 商户系统内部分账回退单号 - * @param int $returnAmount 回退金额 - * @param string $returnAccount 回退方账号 - * @param string $description 回退描述 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function returnShare( - string $outOrderNo, - string $outReturnNo, - int $returnAmount, - string $returnAccount, - string $description - ) { - $params = [ - 'appid' => $this->app['config']->app_id, - 'out_order_no' => $outOrderNo, - 'out_return_no' => $outReturnNo, - 'return_account_type' => 'MERCHANT_ID', - 'return_account' => $returnAccount, - 'return_amount' => $returnAmount, - 'description' => $description, - ]; - - return $this->safeRequest( - 'secapi/pay/profitsharingreturn', - $params - ); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/ProfitSharing/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/ProfitSharing/ServiceProvider.php deleted file mode 100644 index d247d53..0000000 --- a/vendor/overtrue/wechat/src/Payment/ProfitSharing/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\ProfitSharing; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author ClouderSky - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['profit_sharing'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Redpack/Client.php b/vendor/overtrue/wechat/src/Payment/Redpack/Client.php deleted file mode 100644 index 1f16fb0..0000000 --- a/vendor/overtrue/wechat/src/Payment/Redpack/Client.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Redpack; - -use EasyWeChat\Kernel\Support; -use EasyWeChat\Payment\Kernel\BaseClient; - -/** - * Class Client. - * - * @author tianyong90 <412039588@qq.com> - */ -class Client extends BaseClient -{ - /** - * Query redpack. - * - * @param mixed $mchBillno - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function info($mchBillno) - { - $params = is_array($mchBillno) ? $mchBillno : ['mch_billno' => $mchBillno]; - $base = [ - 'appid' => $this->app['config']->app_id, - 'bill_type' => 'MCHT', - ]; - - return $this->safeRequest('mmpaymkttransfers/gethbinfo', array_merge($base, $params)); - } - - /** - * Send miniprogram normal redpack. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function sendMiniprogramNormal(array $params) - { - $base = [ - 'total_num' => 1, - 'client_ip' => $params['client_ip'] ?? Support\get_server_ip(), - 'wxappid' => $this->app['config']->app_id, - ]; - - return $this->safeRequest('mmpaymkttransfers/sendminiprogramhb', array_merge($base, $params)); - } - - /** - * Send normal redpack. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function sendNormal(array $params) - { - $base = [ - 'total_num' => 1, - 'client_ip' => $params['client_ip'] ?? Support\get_server_ip(), - 'wxappid' => $this->app['config']->app_id, - ]; - - return $this->safeRequest('mmpaymkttransfers/sendredpack', array_merge($base, $params)); - } - - /** - * Send group redpack. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function sendGroup(array $params) - { - $base = [ - 'amt_type' => 'ALL_RAND', - 'wxappid' => $this->app['config']->app_id, - ]; - - return $this->safeRequest('mmpaymkttransfers/sendgroupredpack', array_merge($base, $params)); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Redpack/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Redpack/ServiceProvider.php deleted file mode 100644 index af36f35..0000000 --- a/vendor/overtrue/wechat/src/Payment/Redpack/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Redpack; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['redpack'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Refund/Client.php b/vendor/overtrue/wechat/src/Payment/Refund/Client.php deleted file mode 100644 index 0036bde..0000000 --- a/vendor/overtrue/wechat/src/Payment/Refund/Client.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Refund; - -use EasyWeChat\Payment\Kernel\BaseClient; - -class Client extends BaseClient -{ - /** - * Refund by out trade number. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function byOutTradeNumber(string $number, string $refundNumber, int $totalFee, int $refundFee, array $optional = []) - { - return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['out_trade_no' => $number])); - } - - /** - * Refund by transaction id. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function byTransactionId(string $transactionId, string $refundNumber, int $totalFee, int $refundFee, array $optional = []) - { - return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['transaction_id' => $transactionId])); - } - - /** - * Query refund by transaction id. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function queryByTransactionId(string $transactionId) - { - return $this->query($transactionId, 'transaction_id'); - } - - /** - * Query refund by out trade number. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function queryByOutTradeNumber(string $outTradeNumber) - { - return $this->query($outTradeNumber, 'out_trade_no'); - } - - /** - * Query refund by out refund number. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function queryByOutRefundNumber(string $outRefundNumber) - { - return $this->query($outRefundNumber, 'out_refund_no'); - } - - /** - * Query refund by refund id. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function queryByRefundId(string $refundId) - { - return $this->query($refundId, 'refund_id'); - } - - /** - * Refund. - * - * @param array $optional - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function refund(string $refundNumber, int $totalFee, int $refundFee, $optional = []) - { - $params = array_merge([ - 'out_refund_no' => $refundNumber, - 'total_fee' => $totalFee, - 'refund_fee' => $refundFee, - 'appid' => $this->app['config']->app_id, - ], $optional); - - return $this->safeRequest($this->wrap( - $this->app->inSandbox() ? 'pay/refund' : 'secapi/pay/refund' - ), $params); - } - - /** - * Query refund. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function query(string $number, string $type) - { - $params = [ - 'appid' => $this->app['config']->app_id, - $type => $number, - ]; - - return $this->request($this->wrap('pay/refundquery'), $params); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Refund/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Refund/ServiceProvider.php deleted file mode 100644 index faa4e89..0000000 --- a/vendor/overtrue/wechat/src/Payment/Refund/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Refund; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['refund'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Reverse/Client.php b/vendor/overtrue/wechat/src/Payment/Reverse/Client.php deleted file mode 100644 index ee0b245..0000000 --- a/vendor/overtrue/wechat/src/Payment/Reverse/Client.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Reverse; - -use EasyWeChat\Payment\Kernel\BaseClient; - -class Client extends BaseClient -{ - /** - * Reverse order by out trade number. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function byOutTradeNumber(string $outTradeNumber) - { - return $this->reverse($outTradeNumber, 'out_trade_no'); - } - - /** - * Reverse order by transaction_id. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function byTransactionId(string $transactionId) - { - return $this->reverse($transactionId, 'transaction_id'); - } - - /** - * Reverse order. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function reverse(string $number, string $type) - { - $params = [ - 'appid' => $this->app['config']->app_id, - $type => $number, - ]; - - return $this->safeRequest($this->wrap('secapi/pay/reverse'), $params); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Reverse/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Reverse/ServiceProvider.php deleted file mode 100644 index 2417874..0000000 --- a/vendor/overtrue/wechat/src/Payment/Reverse/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Reverse; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['reverse'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Sandbox/Client.php b/vendor/overtrue/wechat/src/Payment/Sandbox/Client.php deleted file mode 100644 index e5a6b44..0000000 --- a/vendor/overtrue/wechat/src/Payment/Sandbox/Client.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Sandbox; - -use EasyWeChat\Kernel\Traits\InteractsWithCache; -use EasyWeChat\Payment\Kernel\BaseClient; -use EasyWeChat\Payment\Kernel\Exceptions\SandboxException; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - use InteractsWithCache; - - /** - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Payment\Kernel\Exceptions\SandboxException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getKey(): string - { - if ($cache = $this->getCache()->get($this->getCacheKey())) { - return $cache; - } - - $response = $this->requestArray('sandboxnew/pay/getsignkey'); - - if ('SUCCESS' === $response['return_code']) { - $this->getCache()->set($this->getCacheKey(), $key = $response['sandbox_signkey'], 24 * 3600); - - return $key; - } - - throw new SandboxException($response['retmsg'] ?? $response['return_msg']); - } - - protected function getCacheKey(): string - { - return 'easywechat.payment.sandbox.'.md5($this->app['config']->app_id.$this->app['config']['mch_id']); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Sandbox/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Sandbox/ServiceProvider.php deleted file mode 100644 index 05fb7dd..0000000 --- a/vendor/overtrue/wechat/src/Payment/Sandbox/ServiceProvider.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Sandbox; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['sandbox'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Security/Client.php b/vendor/overtrue/wechat/src/Payment/Security/Client.php deleted file mode 100644 index 01aa752..0000000 --- a/vendor/overtrue/wechat/src/Payment/Security/Client.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Security; - -use EasyWeChat\Payment\Kernel\BaseClient; - -/** - * Class Client. - * - * @author overtrue - */ -class Client extends BaseClient -{ - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getPublicKey() - { - $params = [ - 'sign_type' => 'MD5', - ]; - - return $this->safeRequest('https://fraud.mch.weixin.qq.com/risk/getpublickey', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Security/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Security/ServiceProvider.php deleted file mode 100644 index e0e31f8..0000000 --- a/vendor/overtrue/wechat/src/Payment/Security/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Security; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['security'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Transfer/Client.php b/vendor/overtrue/wechat/src/Payment/Transfer/Client.php deleted file mode 100644 index 1e80c68..0000000 --- a/vendor/overtrue/wechat/src/Payment/Transfer/Client.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Transfer; - -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Payment\Kernel\BaseClient; -use function EasyWeChat\Kernel\Support\get_server_ip; -use function EasyWeChat\Kernel\Support\rsa_public_encrypt; - -/** - * Class Client. - * - * @author AC - */ -class Client extends BaseClient -{ - /** - * Query MerchantPay to balance. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function queryBalanceOrder(string $partnerTradeNo) - { - $params = [ - 'appid' => $this->app['config']->app_id, - 'mch_id' => $this->app['config']->mch_id, - 'partner_trade_no' => $partnerTradeNo, - ]; - - return $this->safeRequest('mmpaymkttransfers/gettransferinfo', $params); - } - - /** - * Send MerchantPay to balance. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function toBalance(array $params) - { - $base = [ - 'mch_id' => null, - 'mchid' => $this->app['config']->mch_id, - 'mch_appid' => $this->app['config']->app_id, - ]; - - if (empty($params['spbill_create_ip'])) { - $params['spbill_create_ip'] = get_server_ip(); - } - - return $this->safeRequest('mmpaymkttransfers/promotion/transfers', array_merge($base, $params)); - } - - /** - * Query MerchantPay order to BankCard. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function queryBankCardOrder(string $partnerTradeNo) - { - $params = [ - 'mch_id' => $this->app['config']->mch_id, - 'partner_trade_no' => $partnerTradeNo, - ]; - - return $this->safeRequest('mmpaysptrans/query_bank', $params); - } - - /** - * Send MerchantPay to BankCard. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function toBankCard(array $params) - { - foreach (['bank_code', 'partner_trade_no', 'enc_bank_no', 'enc_true_name', 'amount'] as $key) { - if (empty($params[$key])) { - throw new RuntimeException(\sprintf('"%s" is required.', $key)); - } - } - - $publicKey = file_get_contents($this->app['config']->get('rsa_public_key_path')); - - $params['enc_bank_no'] = rsa_public_encrypt($params['enc_bank_no'], $publicKey); - $params['enc_true_name'] = rsa_public_encrypt($params['enc_true_name'], $publicKey); - - return $this->safeRequest('mmpaysptrans/pay_bank', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Payment/Transfer/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Transfer/ServiceProvider.php deleted file mode 100644 index 0e27aad..0000000 --- a/vendor/overtrue/wechat/src/Payment/Transfer/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Payment\Transfer; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['transfer'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Agent/Client.php b/vendor/overtrue/wechat/src/Work/Agent/Client.php deleted file mode 100644 index f049883..0000000 --- a/vendor/overtrue/wechat/src/Work/Agent/Client.php +++ /dev/null @@ -1,63 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Agent; - -use EasyWeChat\Kernel\BaseClient; - -/** - * This is WeWork Agent Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get agent. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function get(int $agentId) - { - $params = [ - 'agentid' => $agentId, - ]; - - return $this->httpGet('cgi-bin/agent/get', $params); - } - - /** - * Set agent. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function set(int $agentId, array $attributes) - { - return $this->httpPostJson('cgi-bin/agent/set', array_merge(['agentid' => $agentId], $attributes)); - } - - /** - * Get agent list. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list() - { - return $this->httpGet('cgi-bin/agent/list'); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Agent/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Agent/ServiceProvider.php deleted file mode 100644 index b85a6f5..0000000 --- a/vendor/overtrue/wechat/src/Work/Agent/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Agent; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['agent'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Application.php b/vendor/overtrue/wechat/src/Work/Application.php deleted file mode 100644 index 30d4241..0000000 --- a/vendor/overtrue/wechat/src/Work/Application.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work; - -use EasyWeChat\Kernel\ServiceContainer; -use EasyWeChat\Work\MiniProgram\Application as MiniProgram; - -/** - * Application. - * - * @author mingyoung - * - * @property \EasyWeChat\Work\OA\Client $oa - * @property \EasyWeChat\Work\Auth\AccessToken $access_token - * @property \EasyWeChat\Work\Agent\Client $agent - * @property \EasyWeChat\Work\Department\Client $department - * @property \EasyWeChat\Work\Media\Client $media - * @property \EasyWeChat\Work\Menu\Client $menu - * @property \EasyWeChat\Work\Message\Client $message - * @property \EasyWeChat\Work\Message\Messenger $messenger - * @property \EasyWeChat\Work\User\Client $user - * @property \EasyWeChat\Work\User\TagClient $tag - * @property \EasyWeChat\Work\Server\Guard $server - * @property \EasyWeChat\Work\Jssdk\Client $jssdk - * @property \Overtrue\Socialite\Providers\WeWorkProvider $oauth - * @property \EasyWeChat\Work\Invoice\Client $invoice - * @property \EasyWeChat\Work\Chat\Client $chat - * @property \EasyWeChat\Work\ExternalContact\Client $external_contact - * @property \EasyWeChat\Work\ExternalContact\ContactWayClient $contact_way - * @property \EasyWeChat\Work\ExternalContact\StatisticsClient $external_contact_statistics - * @property \EasyWeChat\Work\ExternalContact\MessageClient $external_contact_message - * @property \EasyWeChat\Work\GroupRobot\Client $group_robot - * @property \EasyWeChat\Work\GroupRobot\Messenger $group_robot_messenger - * @property \EasyWeChat\Work\Calendar\Client $calendar - * @property \EasyWeChat\Work\Schedule\Client $schedule - * @property \EasyWeChat\Work\MsgAudit\Client $msg_audit - * @property \EasyWeChat\Work\ExternalContact\SchoolClient $school - * - * @method mixed getCallbackIp() - */ -class Application extends ServiceContainer -{ - /** - * @var array - */ - protected $providers = [ - OA\ServiceProvider::class, - Auth\ServiceProvider::class, - Base\ServiceProvider::class, - Menu\ServiceProvider::class, - OAuth\ServiceProvider::class, - User\ServiceProvider::class, - Agent\ServiceProvider::class, - Media\ServiceProvider::class, - Message\ServiceProvider::class, - Department\ServiceProvider::class, - Server\ServiceProvider::class, - Jssdk\ServiceProvider::class, - Invoice\ServiceProvider::class, - Chat\ServiceProvider::class, - ExternalContact\ServiceProvider::class, - GroupRobot\ServiceProvider::class, - Calendar\ServiceProvider::class, - Schedule\ServiceProvider::class, - MsgAudit\ServiceProvider::class, - ]; - - /** - * @var array - */ - protected $defaultConfig = [ - // http://docs.guzzlephp.org/en/stable/request-options.html - 'http' => [ - 'base_uri' => 'https://qyapi.weixin.qq.com/', - ], - ]; - - /** - * Creates the miniProgram application. - */ - public function miniProgram(): MiniProgram - { - return new MiniProgram($this->getConfig()); - } - - /** - * @param string $method - * @param array $arguments - * - * @return mixed - */ - public function __call($method, $arguments) - { - return $this['base']->$method(...$arguments); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Auth/AccessToken.php b/vendor/overtrue/wechat/src/Work/Auth/AccessToken.php deleted file mode 100644 index 2ad59d4..0000000 --- a/vendor/overtrue/wechat/src/Work/Auth/AccessToken.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Auth; - -use EasyWeChat\Kernel\AccessToken as BaseAccessToken; - -/** - * Class AccessToken. - * - * @author mingyoung - */ -class AccessToken extends BaseAccessToken -{ - /** - * @var string - */ - protected $endpointToGetToken = 'cgi-bin/gettoken'; - - /** - * @var int - */ - protected $safeSeconds = 0; - - /** - * Credential for get token. - */ - protected function getCredentials(): array - { - return [ - 'corpid' => $this->app['config']['corp_id'], - 'corpsecret' => $this->app['config']['secret'], - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Auth/ServiceProvider.php deleted file mode 100644 index 5f0dba9..0000000 --- a/vendor/overtrue/wechat/src/Work/Auth/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Auth; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - isset($app['access_token']) || $app['access_token'] = function ($app) { - return new AccessToken($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Base/Client.php b/vendor/overtrue/wechat/src/Work/Base/Client.php deleted file mode 100644 index 97b5445..0000000 --- a/vendor/overtrue/wechat/src/Work/Base/Client.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Base; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get callback ip. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getCallbackIp() - { - return $this->httpGet('cgi-bin/getcallbackip'); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Base/ServiceProvider.php deleted file mode 100644 index 375eb76..0000000 --- a/vendor/overtrue/wechat/src/Work/Base/ServiceProvider.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Base; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['base'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Calendar/Client.php b/vendor/overtrue/wechat/src/Work/Calendar/Client.php deleted file mode 100644 index ed6e99d..0000000 --- a/vendor/overtrue/wechat/src/Work/Calendar/Client.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Calendar; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author her-cat - */ -class Client extends BaseClient -{ - /** - * Add a calendar. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function add(array $calendar) - { - return $this->httpPostJson('cgi-bin/oa/calendar/add', compact('calendar')); - } - - /** - * Update the calendar. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $id, array $calendar) - { - $calendar += ['cal_id' => $id]; - - return $this->httpPostJson('cgi-bin/oa/calendar/update', compact('calendar')); - } - - /** - * Get one or more calendars. - * - * @param string|array $ids - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get($ids) - { - return $this->httpPostJson('cgi-bin/oa/calendar/get', ['cal_id_list' => (array) $ids]); - } - - /** - * Delete a calendar. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $id) - { - return $this->httpPostJson('cgi-bin/oa/calendar/del', ['cal_id' => $id]); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Calendar/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Calendar/ServiceProvider.php deleted file mode 100644 index 1819e4f..0000000 --- a/vendor/overtrue/wechat/src/Work/Calendar/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Calendar; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author her-cat - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc} - */ - public function register(Container $app) - { - $app['calendar'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Chat/Client.php b/vendor/overtrue/wechat/src/Work/Chat/Client.php deleted file mode 100644 index 8881989..0000000 --- a/vendor/overtrue/wechat/src/Work/Chat/Client.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Chat; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author XiaolonY - */ -class Client extends BaseClient -{ - /** - * Get chat. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function get(string $chatId) - { - return $this->httpGet('cgi-bin/appchat/get', ['chatid' => $chatId]); - } - - /** - * Create chat. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $data) - { - return $this->httpPostJson('cgi-bin/appchat/create', $data); - } - - /** - * Update chat. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $chatId, array $data) - { - return $this->httpPostJson('cgi-bin/appchat/update', array_merge(['chatid' => $chatId], $data)); - } - - /** - * Send a message. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(array $message) - { - return $this->httpPostJson('cgi-bin/appchat/send', $message); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Chat/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Chat/ServiceProvider.php deleted file mode 100644 index 5bf9b2c..0000000 --- a/vendor/overtrue/wechat/src/Work/Chat/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Chat; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author XiaolonY - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['chat'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Department/Client.php b/vendor/overtrue/wechat/src/Work/Department/Client.php deleted file mode 100644 index 3b23042..0000000 --- a/vendor/overtrue/wechat/src/Work/Department/Client.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Department; - -use EasyWeChat\Kernel\BaseClient; - -/** - * This is WeWork Department Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Create a department. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $data) - { - return $this->httpPostJson('cgi-bin/department/create', $data); - } - - /** - * Update a department. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $id, array $data) - { - return $this->httpPostJson('cgi-bin/department/update', array_merge(compact('id'), $data)); - } - - /** - * Delete a department. - * - * @param int $id - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function delete($id) - { - return $this->httpGet('cgi-bin/department/delete', compact('id')); - } - - /** - * Get department lists. - * - * @param int|null $id - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list($id = null) - { - return $this->httpGet('cgi-bin/department/list', compact('id')); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Department/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Department/ServiceProvider.php deleted file mode 100644 index 2fe5bc6..0000000 --- a/vendor/overtrue/wechat/src/Work/Department/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Department; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['department'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/Client.php b/vendor/overtrue/wechat/src/Work/ExternalContact/Client.php deleted file mode 100644 index 21ece98..0000000 --- a/vendor/overtrue/wechat/src/Work/ExternalContact/Client.php +++ /dev/null @@ -1,266 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\ExternalContact; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * 获取配置了客户联系功能的成员列表. - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91554 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getFollowUsers() - { - return $this->httpGet('cgi-bin/externalcontact/get_follow_user_list'); - } - - /** - * 获取外部联系人列表. - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91555 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list(string $userId) - { - return $this->httpGet('cgi-bin/externalcontact/list', [ - 'userid' => $userId, - ]); - } - - /** - * 获取外部联系人详情. - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91556 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function get(string $externalUserId) - { - return $this->httpGet('cgi-bin/externalcontact/get', [ - 'external_userid' => $externalUserId, - ]); - } - - /** - * 批量获取外部联系人详情. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92994 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function batchGetUsers(array $data) - { - return $this->httpPostJson( - 'cgi-bin/externalcontact/batch/get_by_user', - $data - ); - } - - /** - * 修改客户备注信息. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92115 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function remark(array $data) - { - return $this->httpPostJson( - 'cgi-bin/externalcontact/remark', - $data - ); - } - - /** - * 获取离职成员的客户列表. - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91563 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getUnassigned(int $pageId = 0, int $pageSize = 1000) - { - return $this->httpPostJson('cgi-bin/externalcontact/get_unassigned_list', [ - 'page_id' => $pageId, - 'page_size' => $pageSize, - ]); - } - - /** - * 离职成员的外部联系人再分配. - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91564 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function transfer(string $externalUserId, string $handoverUserId, string $takeoverUserId) - { - $params = [ - 'external_userid' => $externalUserId, - 'handover_userid' => $handoverUserId, - 'takeover_userid' => $takeoverUserId, - ]; - - return $this->httpPostJson('cgi-bin/externalcontact/transfer', $params); - } - - /** - * 获取客户群列表. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92120 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getGroupChats(array $params) - { - return $this->httpPostJson('cgi-bin/externalcontact/groupchat/list', $params); - } - - /** - * 获取客户群详情. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92122 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getGroupChat(string $chatId, int $needName = 0) - { - $params = [ - 'chat_id' => $chatId, - 'need_name' => $needName, - ]; - - return $this->httpPostJson('cgi-bin/externalcontact/groupchat/get', $params); - } - - /** - * 获取企业标签库. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92117#获取企业标签库 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getCorpTags(array $tagIds = []) - { - $params = [ - 'tag_id' => $tagIds, - ]; - - return $this->httpPostJson('cgi-bin/externalcontact/get_corp_tag_list', $params); - } - - /** - * 添加企业客户标签. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92117#添加企业客户标签 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function addCorpTag(array $params) - { - return $this->httpPostJson('cgi-bin/externalcontact/add_corp_tag', $params); - } - - /** - * 编辑企业客户标签. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92117#编辑企业客户标签 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function updateCorpTag(string $id, string $name, int $order = 1) - { - $params = [ - 'id' => $id, - 'name' => $name, - 'order' => $order, - ]; - - return $this->httpPostJson('cgi-bin/externalcontact/edit_corp_tag', $params); - } - - /** - * 删除企业客户标签. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92117#删除企业客户标签 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function deleteCorpTag(array $tagId, array $groupId) - { - $params = [ - 'tag_id' => $tagId, - 'group_id' => $groupId, - ]; - - return $this->httpPostJson('cgi-bin/externalcontact/del_corp_tag', $params); - } - - /** - * 编辑客户企业标签. - * - * @see https://work.weixin.qq.com/api/doc/90000/90135/92118 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function markTags(array $params) - { - return $this->httpPostJson('cgi-bin/externalcontact/mark_tag', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/ContactWayClient.php b/vendor/overtrue/wechat/src/Work/ExternalContact/ContactWayClient.php deleted file mode 100644 index e373f94..0000000 --- a/vendor/overtrue/wechat/src/Work/ExternalContact/ContactWayClient.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\ExternalContact; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class ContactWayClient. - * - * @author milkmeowo - */ -class ContactWayClient extends BaseClient -{ - /** - * 配置客户联系「联系我」方式. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(int $type, int $scene, array $config = []) - { - $params = array_merge([ - 'type' => $type, - 'scene' => $scene, - ], $config); - - return $this->httpPostJson('cgi-bin/externalcontact/add_contact_way', $params); - } - - /** - * 获取企业已配置的「联系我」方式. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $configId) - { - return $this->httpPostJson('cgi-bin/externalcontact/get_contact_way', [ - 'config_id' => $configId, - ]); - } - - /** - * 更新企业已配置的「联系我」方式. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $configId, array $config = []) - { - $params = array_merge([ - 'config_id' => $configId, - ], $config); - - return $this->httpPostJson('cgi-bin/externalcontact/update_contact_way', $params); - } - - /** - * 删除企业已配置的「联系我」方式. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $configId) - { - return $this->httpPostJson('cgi-bin/externalcontact/del_contact_way', [ - 'config_id' => $configId, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/MessageClient.php b/vendor/overtrue/wechat/src/Work/ExternalContact/MessageClient.php deleted file mode 100644 index a790175..0000000 --- a/vendor/overtrue/wechat/src/Work/ExternalContact/MessageClient.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\ExternalContact; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class MessageClient. - * - * @author milkmeowo - */ -class MessageClient extends BaseClient -{ - /** - * Required attributes. - * - * @var array - */ - protected $required = ['media_id', 'title', 'url', 'pic_media_id', 'appid', 'page']; - - protected $textMessage = [ - 'content' => '', - ]; - - protected $imageMessage = [ - 'media_id' => '', - ]; - - protected $linkMessage = [ - 'title' => '', - 'picurl' => '', - 'desc' => '', - 'url' => '', - ]; - - protected $miniprogramMessage = [ - 'title' => '', - 'pic_media_id' => '', - 'appid' => '', - 'page' => '', - ]; - - /** - * 添加企业群发消息模板 - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91560 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function submit(array $msg) - { - $params = $this->formatMessage($msg); - - return $this->httpPostJson('cgi-bin/externalcontact/add_msg_template', $params); - } - - /** - * 获取企业群发消息发送结果. - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91561 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $msgId) - { - return $this->httpPostJson('cgi-bin/externalcontact/get_group_msg_result', [ - 'msgid' => $msgId, - ]); - } - - /** - * 发送新客户欢迎语. - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91688 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function sendWelcome(string $welcomeCode, array $msg) - { - $formattedMsg = $this->formatMessage($msg); - - $params = array_merge($formattedMsg, [ - 'welcome_code' => $welcomeCode, - ]); - - return $this->httpPostJson('cgi-bin/externalcontact/send_welcome_msg', $params); - } - - /** - * @return array - * - * @throws InvalidArgumentException - */ - protected function formatMessage(array $data = []) - { - $params = $data; - - if (!empty($params['text'])) { - $params['text'] = $this->formatFields($params['text'], $this->textMessage); - } - - if (!empty($params['image'])) { - $params['image'] = $this->formatFields($params['image'], $this->imageMessage); - } - - if (!empty($params['link'])) { - $params['link'] = $this->formatFields($params['link'], $this->linkMessage); - } - - if (!empty($params['miniprogram'])) { - $params['miniprogram'] = $this->formatFields($params['miniprogram'], $this->miniprogramMessage); - } - - return $params; - } - - /** - * @return array - * - * @throws InvalidArgumentException - */ - protected function formatFields(array $data = [], array $default = []) - { - $params = array_merge($default, $data); - foreach ($params as $key => $value) { - if (in_array($key, $this->required, true) && empty($value) && empty($default[$key])) { - throw new InvalidArgumentException(sprintf('Attribute "%s" can not be empty!', $key)); - } - - $params[$key] = empty($value) ? $default[$key] : $value; - } - - return $params; - } - - /** - * 企业发表内容到客户的朋友圈 - * - * @see https://developer.work.weixin.qq.com/document/path/95094 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function moments(array $msg) - { - return $this->httpPostJson('cgi-bin/externalcontact/add_moment_task', $msg); - } -} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/SchoolClient.php b/vendor/overtrue/wechat/src/Work/ExternalContact/SchoolClient.php deleted file mode 100644 index 1e86328..0000000 --- a/vendor/overtrue/wechat/src/Work/ExternalContact/SchoolClient.php +++ /dev/null @@ -1,454 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\ExternalContact; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author MillsGuo - */ -class SchoolClient extends BaseClient -{ - /** - * 创建部门 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92340 - * @param string $name - * @param int $parentId - * @param int $type - * @param int $standardGrade - * @param int $registerYear - * @param int $order - * @param array $departmentAdmins [['userid':'139','type':1],['userid':'1399','type':2]] - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function createDepartment(string $name, int $parentId, int $type, int $standardGrade, int $registerYear, int $order, array $departmentAdmins) - { - $params = [ - 'name' => $name, - 'parentid' => $parentId, - 'type' => $type, - 'standard_grade' => $standardGrade, - 'register_year' => $registerYear, - 'order' => $order, - 'department_admins' => $departmentAdmins - ]; - - return $this->httpPostJson('cgi-bin/school/department/create', $params); - } - - /** - * 更新部门 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92341 - * @param int $id - * @param string $name - * @param int $parentId - * @param int $type - * @param int $standardGrade - * @param int $registerYear - * @param int $order - * @param array $departmentAdmins [['op':0,'userid':'139','type':1],['op':1,'userid':'1399','type':2]] OP=0表示新增或更新,OP=1表示删除管理员 - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function updateDepartment(int $id, string $name, int $parentId, int $type, int $standardGrade, int $registerYear, int $order, array $departmentAdmins) - { - $params = [ - 'id' => $id, - 'name' => $name, - 'parentid' => $parentId, - 'type' => $type, - 'standard_grade' => $standardGrade, - 'register_year' => $registerYear, - 'order' => $order, - 'department_admins' => $departmentAdmins - ]; - $params = $this->filterNullValue($params); - - return $this->httpPostJson('cgi-bin/school/department/update', $params); - } - - /** - * 删除部门 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92342 - * @param int $id - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function deleteDepartment(int $id) - { - return $this->httpGet('cgi-bin/school/department/delete', [ - 'id' => $id - ]); - } - - /** - * 获取部门列表 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92343 - * @param int $id 如果ID为0,则获取全量组织架构 - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getDepartments(int $id) - { - if ($id > 0) { - $params = [ - 'id' => $id - ]; - } else { - $params = []; - } - - return $this->httpGet('cgi-bin/school/department/list', $params); - } - - /** - * 创建学生 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92325 - * @param string $userId - * @param string $name - * @param array $department - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function createStudent(string $userId, string $name, array $department) - { - $params = [ - 'student_userid' => $userId, - 'name' => $name, - 'department' => $department - ]; - - return $this->httpPostJson('cgi-bin/school/user/create_student', $params); - } - - /** - * 删除学生 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92326 - * @param string $userId - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function deleteStudent(string $userId) - { - return $this->httpGet('cgi-bin/school/user/delete_student', [ - 'userid' => $userId - ]); - } - - /** - * 更新学生 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92327 - * @param string $userId - * @param string $name - * @param string $newUserId - * @param array $department - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function updateStudent(string $userId, string $name, string $newUserId, array $department) - { - $params = [ - 'student_userid' => $userId - ]; - if (!empty($name)) { - $params['name'] = $name; - } - if (!empty($newUserId)) { - $params['new_student_userid'] = $newUserId; - } - if (!empty($department)) { - $params['department'] = $department; - } - - return $this->httpPostJson('cgi-bin/school/user/update_student', $params); - } - - /** - * 批量创建学生,学生最多100个 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92328 - * @param array $students 学生格式:[[student_userid:'','name':'','department':[1,2]],['student_userid':'','name':'','department':[1,2]]] - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function batchCreateStudents(array $students) - { - $params = [ - 'students' => $students - ]; - - return $this->httpPostJson('cgi-bin/school/user/batch_create_student', $params); - } - - /** - * 批量删除学生,每次最多100个学生 - * @see https://work.weixin.qq.com/api/doc/90000/90135/92329 - * @param array $useridList 学生USERID,格式:['zhangsan','lisi'] - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function batchDeleteStudents(array $useridList) - { - return $this->httpPostJson('cgi-bin/school/user/batch_delete_student', [ - 'useridlist' => $useridList - ]); - } - - /** - * 批量更新学生,每次最多100个 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92042 - * @param array $students 格式:[['student_userid':'lisi','new_student_userid':'lisi2','name':'','department':[1,2]],.....] - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function batchUpdateStudents(array $students) - { - return $this->httpPostJson('cgi-bin/school/user/batch_update_student', [ - 'students' => $students - ]); - } - - /** - * 创建家长 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92077 - * @param string $userId - * @param string $mobile - * @param bool $toInvite - * @param array $children - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function createParent(string $userId, string $mobile, bool $toInvite, array $children) - { - $params = [ - 'parent_userid' => $userId, - 'mobile' => $mobile, - 'to_invite' => $toInvite, - 'children' => $children - ]; - - return $this->httpPostJson('cgi-bin/school/user/create_parent', $params); - } - - /** - * 删除家长 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92079 - * @param string $userId - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function deleteParent(string $userId) - { - return $this->httpPostJson('cgi-bin/school/user/delete_parent', [ - 'userid' => $userId - ]); - } - - /** - * 更新家长 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92081 - * @param string $userId - * @param string $mobile - * @param string $newUserId - * @param array $children 格式:[['student_userid':'','relation':''],[]] - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function updateParent(string $userId, string $mobile, string $newUserId, array $children) - { - $params = [ - 'parent_userid' => $userId - ]; - if (!empty($newUserId)) { - $params['new_parent_userid'] = $newUserId; - } - if (!empty($mobile)) { - $params['mobile'] = $mobile; - } - if (!empty($children)) { - $params['children'] = $children; - } - - return $this->httpPostJson('cgi-bin/school/user/update_parent', $params); - } - - /** - * 批量创建家长 每次最多100个 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92078 - * @param array $parents [['parent_userid':'','mobile':'','to_invite':true,'children':['student_userid':'','relation':'']],.....] - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function batchCreateParents(array $parents) - { - return $this->httpPostJson('cgi-bin/school/user/batch_create_parent', [ - 'parents' => $parents - ]); - } - - /** - * 批量删除家长,每次最多100个 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92080 - * @param array $userIdList 格式:['chang','lisi'] - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function batchDeleteParents(array $userIdList) - { - return $this->httpPostJson('cgi-bin/school/user/batch_delete_parent', [ - 'useridlist' => $userIdList - ]); - } - - /** - * 批量更新家长,每次最多100个 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92082 - * @param array $parents 格式:[['parent_userid':'','new_parent_userid':'','mobile':'','children':[['student_userid':'','relation':''],...]],.....] - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function batchUpdateParents(array $parents) - { - return $this->httpPostJson('cgi-bin/school/user/batch_update_parent', [ - 'parents' => $parents - ]); - } - - /** - * 读取学生或家长 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92038 - * @param string $userId 学生或家长的userid - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getUser(string $userId) - { - return $this->httpGet('cgi-bin/school/user/get', [ - 'userid' => $userId - ]); - } - - /** - * 获取部门成员详情 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92038 - * @param int $departmentId - * @param bool $fetchChild - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getStudents(int $departmentId, bool $fetchChild) - { - $params = [ - 'department_id' => $departmentId - ]; - if ($fetchChild) { - $params['fetch_child'] = 1; - } else { - $params['fetch_child'] = 0; - } - - return $this->httpGet('cgi-bin/school/user/list', $params); - } - - /** - * 获取学校通知二维码 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92197 - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getSubscribeQrCode() - { - return $this->httpGet('cgi-bin/externalcontact/get_subscribe_qr_code'); - } - - /** - * 设置关注学校通知的模式 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92290 - * @param int $mode 关注模式,1可扫码填写资料加入,2禁止扫码填写资料加入 - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function setSubscribeMode(int $mode) - { - return $this->httpPostJson('cgi-bin/externalcontact/set_subscribe_mode', [ - 'subscribe_mode' => $mode - ]); - } - - /** - * 获取关注学校通知的模式 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92290 - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getSubscribeMode() - { - return $this->httpGet('cgi-bin/externalcontact/get_subscribe_mode'); - } - - /** - * 设置【老师可查看班级】的模式 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92652 - * @param int $mode - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function setTeacherViewMode(int $mode) - { - return $this->httpPostJson('cgi-bin/school/set_teacher_view_mode', [ - 'view_mode' => $mode - ]); - } - - /** - * 获取【老师可查看班级】的模式 - * @see https://open.work.weixin.qq.com/api/doc/90001/90143/92652 - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getTeacherViewMode() - { - return $this->httpGet('cgi-bin/school/get_teacher_view_mode'); - } - - /** - * 外部联系人OPENID转换 - * @param string $userId - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function convertOpenid(string $userId) - { - return $this->httpGet('cgi-bin/externalcontact/convert_to_openid', [ - 'external_userid' => $userId - ]); - } - - /** - * 过滤数组中值为NULL的键 - * @param array $data - * @return array - */ - protected function filterNullValue(array $data) - { - $returnData = []; - foreach ($data as $key => $value) { - if ($value !== null) { - $returnData[$key] = trim($value); - } - } - - return $returnData; - } -} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/ExternalContact/ServiceProvider.php deleted file mode 100644 index 25d2f8e..0000000 --- a/vendor/overtrue/wechat/src/Work/ExternalContact/ServiceProvider.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\ExternalContact; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['external_contact'] = function ($app) { - return new Client($app); - }; - - $app['contact_way'] = function ($app) { - return new ContactWayClient($app); - }; - - $app['external_contact_statistics'] = function ($app) { - return new StatisticsClient($app); - }; - - $app['external_contact_message'] = function ($app) { - return new MessageClient($app); - }; - - $app['school'] = function ($app) { - return new SchoolClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/StatisticsClient.php b/vendor/overtrue/wechat/src/Work/ExternalContact/StatisticsClient.php deleted file mode 100644 index cb19da7..0000000 --- a/vendor/overtrue/wechat/src/Work/ExternalContact/StatisticsClient.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\ExternalContact; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class StatisticsClient. - * - * @author milkmeowo - */ -class StatisticsClient extends BaseClient -{ - /** - * 获取员工行为数据. - * - * @see https://work.weixin.qq.com/api/doc#90000/90135/91580 - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function userBehavior(array $userIds, string $from, string $to) - { - $params = [ - 'userid' => $userIds, - 'start_time' => $from, - 'end_time' => $to, - ]; - - return $this->httpPostJson('cgi-bin/externalcontact/get_user_behavior_data', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Client.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Client.php deleted file mode 100644 index 3b3df8a..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/Client.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Work\GroupRobot\Messages\Message; - -/** - * Class Client. - * - * @author her-cat - */ -class Client extends BaseClient -{ - /** - * @param string|Message $message - * - * @return Messenger - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function message($message) - { - return (new Messenger($this))->message($message); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(string $key, array $message) - { - $this->accessToken = null; - - return $this->httpPostJson('cgi-bin/webhook/send', $message, ['key' => $key]); - } -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Image.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Image.php deleted file mode 100644 index 8ba69b0..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Image.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot\Messages; - -/** - * Class Image. - * - * @author her-cat - */ -class Image extends Message -{ - /** - * @var string - */ - protected $type = 'image'; - - /** - * @var array - */ - protected $properties = ['base64', 'md5']; - - /** - * Image constructor. - */ - public function __construct(string $base64, string $md5) - { - parent::__construct(compact('base64', 'md5')); - } -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Markdown.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Markdown.php deleted file mode 100644 index f26ac6f..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Markdown.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot\Messages; - -/** - * Class Markdown. - * - * @author her-cat - */ -class Markdown extends Message -{ - /** - * @var string - */ - protected $type = 'markdown'; - - /** - * @var array - */ - protected $properties = ['content']; - - /** - * Markdown constructor. - */ - public function __construct(string $content) - { - parent::__construct(compact('content')); - } -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Message.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Message.php deleted file mode 100644 index 50201b9..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Message.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot\Messages; - -use EasyWeChat\Kernel\Messages\Message as BaseMessage; - -/** - * Class Message. - * - * @author her-cat - */ -class Message extends BaseMessage -{ -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/News.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/News.php deleted file mode 100644 index eeb37f0..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/News.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot\Messages; - -/** - * Class News. - * - * @author her-cat - */ -class News extends Message -{ - /** - * @var string - */ - protected $type = 'news'; - - /** - * @var array - */ - protected $properties = ['items']; - - /** - * News constructor. - */ - public function __construct(array $items = []) - { - parent::__construct(compact('items')); - } - - public function propertiesToArray(array $data, array $aliases = []): array - { - return ['articles' => array_map(function ($item) { - if ($item instanceof NewsItem) { - return $item->toJsonArray(); - } - }, $this->get('items'))]; - } -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/NewsItem.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/NewsItem.php deleted file mode 100644 index 2d206de..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/NewsItem.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot\Messages; - -/** - * Class NewsItem. - * - * @author her-cat - */ -class NewsItem extends Message -{ - /** - * @var string - */ - protected $type = 'news'; - - /** - * @var array - */ - protected $properties = [ - 'title', - 'description', - 'url', - 'image', - ]; - - public function toJsonArray() - { - return [ - 'title' => $this->get('title'), - 'description' => $this->get('description'), - 'url' => $this->get('url'), - 'picurl' => $this->get('image'), - ]; - } -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Text.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Text.php deleted file mode 100644 index db7c2f8..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Text.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot\Messages; - -/** - * Class Text. - * - * @author her-cat - */ -class Text extends Message -{ - /** - * @var string - */ - protected $type = 'text'; - - /** - * @var array - */ - protected $properties = ['content', 'mentioned_list', 'mentioned_mobile_list']; - - /** - * Text constructor. - * - * @param string|array $userIds - * @param string|array $mobiles - */ - public function __construct(string $content, $userIds = [], $mobiles = []) - { - parent::__construct([ - 'content' => $content, - 'mentioned_list' => (array) $userIds, - 'mentioned_mobile_list' => (array) $mobiles, - ]); - } - - /** - * @param array $userIds - * - * @return Text - */ - public function mention($userIds) - { - $this->set('mentioned_list', (array) $userIds); - - return $this; - } - - /** - * @param array $mobiles - * - * @return Text - */ - public function mentionByMobile($mobiles) - { - $this->set('mentioned_mobile_list', (array) $mobiles); - - return $this; - } -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messenger.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messenger.php deleted file mode 100644 index 5a4e9c5..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/Messenger.php +++ /dev/null @@ -1,125 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Exceptions\InvalidConfigException; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Work\GroupRobot\Messages\Message; -use EasyWeChat\Work\GroupRobot\Messages\Text; - -/** - * Class Messenger. - * - * @author her-cat - */ -class Messenger -{ - /** - * @var Client - */ - protected $client; - - /** - * @var Message|null - */ - protected $message; - - /** - * @var string|null - */ - protected $groupKey; - - /** - * Messenger constructor. - */ - public function __construct(Client $client) - { - $this->client = $client; - } - - /** - * @param string|Message $message - * - * @return Messenger - * - * @throws InvalidArgumentException - */ - public function message($message) - { - if (is_string($message) || is_numeric($message)) { - $message = new Text($message); - } - - if (!($message instanceof Message)) { - throw new InvalidArgumentException('Invalid message.'); - } - - $this->message = $message; - - return $this; - } - - /** - * @return Messenger - */ - public function toGroup(string $groupKey) - { - $this->groupKey = $groupKey; - - return $this; - } - - /** - * @param string|Message|null $message - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws RuntimeException - * @throws InvalidArgumentException - * @throws InvalidConfigException - */ - public function send($message = null) - { - if ($message) { - $this->message($message); - } - - if (empty($this->message)) { - throw new RuntimeException('No message to send.'); - } - - if (is_null($this->groupKey)) { - throw new RuntimeException('No group key specified.'); - } - - $message = $this->message->transformForJsonRequest(); - - return $this->client->send($this->groupKey, $message); - } - - /** - * @param string $property - * - * @return mixed - * - * @throws InvalidArgumentException - */ - public function __get($property) - { - if (property_exists($this, $property)) { - return $this->$property; - } - - throw new InvalidArgumentException(sprintf('No property named "%s"', $property)); - } -} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/GroupRobot/ServiceProvider.php deleted file mode 100644 index d72d630..0000000 --- a/vendor/overtrue/wechat/src/Work/GroupRobot/ServiceProvider.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\GroupRobot; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author her-cat - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc} - */ - public function register(Container $app) - { - $app['group_robot'] = function ($app) { - return new Client($app); - }; - - $app['group_robot_messenger'] = function ($app) { - return new Messenger($app['group_robot']); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Invoice/Client.php b/vendor/overtrue/wechat/src/Work/Invoice/Client.php deleted file mode 100644 index 8dbc8b9..0000000 --- a/vendor/overtrue/wechat/src/Work/Invoice/Client.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Invoice; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $cardId, string $encryptCode) - { - $params = [ - 'card_id' => $cardId, - 'encrypt_code' => $encryptCode, - ]; - - return $this->httpPostJson('cgi-bin/card/invoice/reimburse/getinvoiceinfo', $params); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function select(array $invoices) - { - $params = [ - 'item_list' => $invoices, - ]; - - return $this->httpPostJson('cgi-bin/card/invoice/reimburse/getinvoiceinfobatch', $params); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $cardId, string $encryptCode, string $status) - { - $params = [ - 'card_id' => $cardId, - 'encrypt_code' => $encryptCode, - 'reimburse_status' => $status, - ]; - - return $this->httpPostJson('cgi-bin/card/invoice/reimburse/updateinvoicestatus', $params); - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function batchUpdate(array $invoices, string $openid, string $status) - { - $params = [ - 'openid' => $openid, - 'reimburse_status' => $status, - 'invoice_list' => $invoices, - ]; - - return $this->httpPostJson('cgi-bin/card/invoice/reimburse/updatestatusbatch', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Invoice/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Invoice/ServiceProvider.php deleted file mode 100644 index 3259d80..0000000 --- a/vendor/overtrue/wechat/src/Work/Invoice/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Invoice; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['invoice'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Jssdk/Client.php b/vendor/overtrue/wechat/src/Work/Jssdk/Client.php deleted file mode 100644 index d65bbe2..0000000 --- a/vendor/overtrue/wechat/src/Work/Jssdk/Client.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Jssdk; - -use EasyWeChat\BasicService\Jssdk\Client as BaseClient; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Support; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - protected $ticketEndpoint = 'cgi-bin/get_jsapi_ticket'; - - /** - * @return string - */ - protected function getAppId() - { - return $this->app['config']->get('corp_id'); - } - - /** - * @return string - */ - protected function getAgentId() - { - return $this->app['config']->get('agent_id'); - } - - /** - * @param array $apis - * @param $agentId - * @param bool $debug - * @param bool $beta - * @param array $openTagList - * @param string|null $url - * - * @return array|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function getAgentConfigArray(array $apis, $agentId, bool $debug = false, bool $beta = false, array $openTagList = [], string $url = null) - { - return $this->buildAgentConfig($apis, $agentId, $debug, $beta, false, $openTagList, $url); - } - - /** - * @param array $jsApiList - * @param $agentId - * @param bool $debug - * @param bool $beta - * @param bool $json - * @param array $openTagList - * @param string|null $url - * - * @return array|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function buildAgentConfig(array $jsApiList, $agentId, bool $debug = false, bool $beta = false, bool $json = true, array $openTagList = [], string $url = null) - { - $config = array_merge(compact('debug', 'beta', 'jsApiList', 'openTagList'), $this->agentConfigSignature($agentId, $url)); - - return $json ? json_encode($config) : $config; - } - - /** - * @param $agentId - * @param string|null $url - * @param string|null $nonce - * @param null $timestamp - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - protected function agentConfigSignature($agentId, string $url = null, string $nonce = null, $timestamp = null): array - { - $url = $url ?: $this->getUrl(); - $nonce = $nonce ?: Support\Str::quickRandom(10); - $timestamp = $timestamp ?: time(); - - return [ - 'corpid' => $this->getAppId(), - 'agentid' => $agentId, - 'nonceStr' => $nonce, - 'timestamp' => $timestamp, - 'url' => $url, - 'signature' => $this->getTicketSignature($this->getAgentTicket()['ticket'], $nonce, $timestamp, $url), - ]; - } - - /** - * Get js ticket. - * - * @param bool $refresh - * @param string $type - * - * @return array - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function getTicket(bool $refresh = false, string $type = 'config'): array - { - $cacheKey = sprintf('easywechat.work.jssdk.ticket.%s.%s', $type, $this->getAppId()); - - if (!$refresh && $this->getCache()->has($cacheKey)) { - return $this->getCache()->get($cacheKey); - } - - /** @var array $result */ - $result = $this->castResponseToType( - $this->requestRaw($this->ticketEndpoint, 'GET'), - 'array' - ); - - $this->getCache()->set($cacheKey, $result, $result['expires_in'] - 500); - - if (!$this->getCache()->has($cacheKey)) { - throw new RuntimeException('Failed to cache jssdk ticket.'); - } - - return $result; - } - - /** - * @return array|\EasyWeChat\Kernel\Support\Collection|mixed|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - */ - public function getAgentTicket(bool $refresh = false, string $type = 'agent_config') - { - $cacheKey = sprintf('easywechat.work.jssdk.ticket.%s.%s.%s', $type, $this->getAppId(), $this->getAgentId()); - - if (!$refresh && $this->getCache()->has($cacheKey)) { - return $this->getCache()->get($cacheKey); - } - - /** @var array $result */ - $result = $this->castResponseToType( - $this->requestRaw('cgi-bin/ticket/get', 'GET', ['query' => ['type' => $type]]), - 'array' - ); - - $this->getCache()->set($cacheKey, $result, $result['expires_in'] - 500); - - if (!$this->getCache()->has($cacheKey)) { - throw new RuntimeException('Failed to cache jssdk ticket.'); - } - - return $result; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Jssdk/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Jssdk/ServiceProvider.php deleted file mode 100644 index efb509c..0000000 --- a/vendor/overtrue/wechat/src/Work/Jssdk/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Jssdk; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['jssdk'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Media/Client.php b/vendor/overtrue/wechat/src/Work/Media/Client.php deleted file mode 100644 index 9b8a815..0000000 --- a/vendor/overtrue/wechat/src/Work/Media/Client.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Media; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Http\StreamResponse; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get media. - * - * @return array|\EasyWeChat\Kernel\Http\Response|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get(string $mediaId) - { - $response = $this->requestRaw('cgi-bin/media/get', 'GET', [ - 'query' => [ - 'media_id' => $mediaId, - ], - ]); - - if (false !== stripos($response->getHeaderLine('Content-Type'), 'text/plain')) { - return $this->castResponseToType($response, $this->app['config']->get('response_type')); - } - - return StreamResponse::buildFromPsrResponse($response); - } - - /** - * Upload Image. - * - * @return mixed - */ - public function uploadImage(string $path) - { - return $this->upload('image', $path); - } - - /** - * Upload Voice. - * - * @return mixed - */ - public function uploadVoice(string $path) - { - return $this->upload('voice', $path); - } - - /** - * Upload Video. - * - * @return mixed - */ - public function uploadVideo(string $path) - { - return $this->upload('video', $path); - } - - /** - * Upload File. - * - * @return mixed - */ - public function uploadFile(string $path) - { - return $this->upload('file', $path); - } - - /** - * Upload Attachment Resources - * - * @return mixed - */ - public function uploadAttachmentResources(string $path, string $mediaType = 'image', int $attachmentType = 1) - { - return $this->uploadAttachment($path, $mediaType, $attachmentType); - } - - /** - * Upload media. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function upload(string $type, string $path) - { - $files = [ - 'media' => $path, - ]; - - return $this->httpUpload('cgi-bin/media/upload', $files, [], compact('type')); - } - - /** - * Upload media - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function uploadAttachment(string $path, string $mediaType, int $attachmentType) - { - $files = [ - 'media' => $path, - ]; - - $query = [ - 'media_type' => $mediaType, - 'attachment_type' => $attachmentType, - ]; - - return $this->httpUpload('cgi-bin/media/upload_attachment', $files, [], $query); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Media/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Media/ServiceProvider.php deleted file mode 100644 index 450d156..0000000 --- a/vendor/overtrue/wechat/src/Work/Media/ServiceProvider.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Media; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['media'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Menu/Client.php b/vendor/overtrue/wechat/src/Work/Menu/Client.php deleted file mode 100644 index bdb8850..0000000 --- a/vendor/overtrue/wechat/src/Work/Menu/Client.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Menu; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get menu. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function get() - { - return $this->httpGet('cgi-bin/menu/get', ['agentid' => $this->app['config']['agent_id']]); - } - - /** - * Create menu for the given agent. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $data) - { - return $this->httpPostJson('cgi-bin/menu/create', $data, ['agentid' => $this->app['config']['agent_id']]); - } - - /** - * Delete menu. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function delete() - { - return $this->httpGet('cgi-bin/menu/delete', ['agentid' => $this->app['config']['agent_id']]); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Menu/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Menu/ServiceProvider.php deleted file mode 100644 index 02c4290..0000000 --- a/vendor/overtrue/wechat/src/Work/Menu/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Menu; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['menu'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Message/Client.php b/vendor/overtrue/wechat/src/Work/Message/Client.php deleted file mode 100644 index 8de4f3d..0000000 --- a/vendor/overtrue/wechat/src/Work/Message/Client.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Message; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Messages\Message; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * @param string|\EasyWeChat\Kernel\Messages\Message $message - * - * @return \EasyWeChat\Work\Message\Messenger - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function message($message) - { - return (new Messenger($this))->message($message); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function send(array $message) - { - return $this->httpPostJson('cgi-bin/message/send', $message); - } - - /** - * @param string $msgid - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function recall(string $msgid) - { - return $this->httpPostJson('cgi-bin/message/recall', ['msgid' => $msgid]); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Message/Messenger.php b/vendor/overtrue/wechat/src/Work/Message/Messenger.php deleted file mode 100644 index aa2d215..0000000 --- a/vendor/overtrue/wechat/src/Work/Message/Messenger.php +++ /dev/null @@ -1,217 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Message; - -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; -use EasyWeChat\Kernel\Exceptions\RuntimeException; -use EasyWeChat\Kernel\Messages\Message; -use EasyWeChat\Kernel\Messages\Text; - -/** - * Class MessageBuilder. - * - * @author overtrue - */ -class Messenger -{ - /** - * @var \EasyWeChat\Kernel\Messages\Message; - */ - protected $message; - - /** - * @var array - */ - protected $to = ['touser' => '@all']; - - /** - * @var int - */ - protected $agentId; - - /** - * @var bool - */ - protected $secretive = false; - - /** - * @var \EasyWeChat\Work\Message\Client - */ - protected $client; - - /** - * MessageBuilder constructor. - * - * @param \EasyWeChat\Work\Message\Client $client - */ - public function __construct(Client $client) - { - $this->client = $client; - } - - /** - * Set message to send. - * - * @param string|Message $message - * - * @return \EasyWeChat\Work\Message\Messenger - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function message($message) - { - if (is_string($message) || is_numeric($message)) { - $message = new Text($message); - } - - if (!($message instanceof Message)) { - throw new InvalidArgumentException('Invalid message.'); - } - - $this->message = $message; - - return $this; - } - - /** - * @return \EasyWeChat\Work\Message\Messenger - */ - public function ofAgent(int $agentId) - { - $this->agentId = $agentId; - - return $this; - } - - /** - * @param array|string $userIds - * - * @return \EasyWeChat\Work\Message\Messenger - */ - public function toUser($userIds) - { - return $this->setRecipients($userIds, 'touser'); - } - - /** - * @param array|string $partyIds - * - * @return \EasyWeChat\Work\Message\Messenger - */ - public function toParty($partyIds) - { - return $this->setRecipients($partyIds, 'toparty'); - } - - /** - * @param array|string $tagIds - * - * @return \EasyWeChat\Work\Message\Messenger - */ - public function toTag($tagIds) - { - return $this->setRecipients($tagIds, 'totag'); - } - - /** - * Keep secret. - * - * @return \EasyWeChat\Work\Message\Messenger - */ - public function secretive() - { - $this->secretive = true; - - return $this; - } - - /** - * @param array|string $ids - * - * @return \EasyWeChat\Work\Message\Messenger - */ - protected function setRecipients($ids, string $key): self - { - if (is_array($ids)) { - $ids = implode('|', $ids); - } - - $this->to = [$key => $ids]; - - return $this; - } - - /** - * @param \EasyWeChat\Kernel\Messages\Message|string|null $message - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException - */ - public function send($message = null) - { - if ($message) { - $this->message($message); - } - - if (empty($this->message)) { - throw new RuntimeException('No message to send.'); - } - - if (is_null($this->agentId)) { - throw new RuntimeException('No agentid specified.'); - } - - $message = $this->message->transformForJsonRequest(array_merge([ - 'agentid' => $this->agentId, - 'safe' => intval($this->secretive), - ], $this->to)); - - $this->secretive = false; - - return $this->client->send($message); - } - - /** - * @param string $msgid - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws RuntimeException - */ - public function recall(string $msgid) - { - if (empty($msgid)) { - throw new RuntimeException('No msgid specified.'); - } - return $this->client->recall($msgid); - } - - /** - * Return property. - * - * @param string $property - * - * @return mixed - * - * @throws InvalidArgumentException - */ - public function __get($property) - { - if (property_exists($this, $property)) { - return $this->$property; - } - - throw new InvalidArgumentException(sprintf('No property named "%s"', $property)); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Message/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Message/ServiceProvider.php deleted file mode 100644 index ea14f9e..0000000 --- a/vendor/overtrue/wechat/src/Work/Message/ServiceProvider.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Message; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['message'] = function ($app) { - return new Client($app); - }; - - $app['messenger'] = function ($app) { - $messenger = new Messenger($app['message']); - - if (is_numeric($app['config']['agent_id'])) { - $messenger->ofAgent($app['config']['agent_id']); - } - - return $messenger; - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/MiniProgram/Application.php b/vendor/overtrue/wechat/src/Work/MiniProgram/Application.php deleted file mode 100644 index abc425f..0000000 --- a/vendor/overtrue/wechat/src/Work/MiniProgram/Application.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\MiniProgram; - -use EasyWeChat\MiniProgram\Application as MiniProgram; -use EasyWeChat\Work\Auth\AccessToken; -use EasyWeChat\Work\MiniProgram\Auth\Client; - -/** - * Class Application. - * - * @author Caikeal - * - * @property \EasyWeChat\Work\MiniProgram\Auth\Client $auth - */ -class Application extends MiniProgram -{ - /** - * Application constructor. - */ - public function __construct(array $config = [], array $prepends = []) - { - parent::__construct($config, $prepends + [ - 'access_token' => function ($app) { - return new AccessToken($app); - }, - 'auth' => function ($app) { - return new Client($app); - }, - ]); - } -} diff --git a/vendor/overtrue/wechat/src/Work/MiniProgram/Auth/Client.php b/vendor/overtrue/wechat/src/Work/MiniProgram/Auth/Client.php deleted file mode 100644 index 71f79c4..0000000 --- a/vendor/overtrue/wechat/src/Work/MiniProgram/Auth/Client.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\MiniProgram\Auth; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - */ -class Client extends BaseClient -{ - /** - * Get session info by code. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function session(string $code) - { - $params = [ - 'js_code' => $code, - 'grant_type' => 'authorization_code', - ]; - - return $this->httpGet('cgi-bin/miniprogram/jscode2session', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Work/MsgAudit/Client.php b/vendor/overtrue/wechat/src/Work/MsgAudit/Client.php deleted file mode 100644 index 4f4acca..0000000 --- a/vendor/overtrue/wechat/src/Work/MsgAudit/Client.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\MsgAudit; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author ZengJJ - */ -class Client extends BaseClient -{ - /** - * @param string|null $type - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getPermitUsers(string $type = null) - { - return $this->httpPostJson('cgi-bin/msgaudit/get_permit_user_list', (empty($type) ? [] : ['type' => $type])); - } - - /** - * @param array $info 数组,格式: [[userid, exteranalopenid], [userid, exteranalopenid]] - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getSingleAgreeStatus(array $info) - { - $params = [ - 'info' => $info - ]; - - return $this->httpPostJson('cgi-bin/msgaudit/check_single_agree', $params); - } - - /** - * @param string $roomid - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getRoomAgreeStatus(string $roomId) - { - $params = [ - 'roomid' => $roomId - ]; - - return $this->httpPostJson('cgi-bin/msgaudit/check_room_agree', $params); - } - - /** - * @param string $roomid - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getRoom(string $roomId) - { - $params = [ - 'roomid' => $roomId - ]; - - return $this->httpPostJson('cgi-bin/msgaudit/groupchat/get', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Work/MsgAudit/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/MsgAudit/ServiceProvider.php deleted file mode 100644 index e24c8b3..0000000 --- a/vendor/overtrue/wechat/src/Work/MsgAudit/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\MsgAudit; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author ZengJJ - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['msg_audit'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/OA/Client.php b/vendor/overtrue/wechat/src/Work/OA/Client.php deleted file mode 100644 index c89f463..0000000 --- a/vendor/overtrue/wechat/src/Work/OA/Client.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\OA; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Get the checkin data. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function checkinRecords(int $startTime, int $endTime, array $userList, int $type = 3) - { - $params = [ - 'opencheckindatatype' => $type, - 'starttime' => $startTime, - 'endtime' => $endTime, - 'useridlist' => $userList, - ]; - - return $this->httpPostJson('cgi-bin/checkin/getcheckindata', $params); - } - - /** - * Get the checkin rules. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function checkinRules(int $datetime, array $userList) - { - $params = [ - 'datetime' => $datetime, - 'useridlist' => $userList, - ]; - - return $this->httpPostJson('cgi-bin/checkin/getcheckinoption', $params); - } - - /** - * Get approval template details. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function approvalTemplate(string $templateId) - { - $params = [ - 'template_id' => $templateId, - ]; - - return $this->httpPostJson('cgi-bin/oa/gettemplatedetail', $params); - } - - /** - * Submit an application for approval. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function createApproval(array $data) - { - return $this->httpPostJson('cgi-bin/oa/applyevent', $data); - } - - /** - * Get Approval number. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function approvalNumbers(int $startTime, int $endTime, int $nextCursor = 0, int $size = 100, array $filters = []) - { - $params = [ - 'starttime' => $startTime, - 'endtime' => $endTime, - 'cursor' => $nextCursor, - 'size' => $size > 100 ? 100 : $size, - 'filters' => $filters, - ]; - - return $this->httpPostJson('cgi-bin/oa/getapprovalinfo', $params); - } - - /** - * Get approval detail. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function approvalDetail(int $number) - { - $params = [ - 'sp_no' => $number, - ]; - - return $this->httpPostJson('cgi-bin/oa/getapprovaldetail', $params); - } - - /** - * Get Approval Data. - * - * @param int $nextNumber - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function approvalRecords(int $startTime, int $endTime, int $nextNumber = null) - { - $params = [ - 'starttime' => $startTime, - 'endtime' => $endTime, - 'next_spnum' => $nextNumber, - ]; - - return $this->httpPostJson('cgi-bin/corp/getapprovaldata', $params); - } -} diff --git a/vendor/overtrue/wechat/src/Work/OA/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/OA/ServiceProvider.php deleted file mode 100644 index 5d389c2..0000000 --- a/vendor/overtrue/wechat/src/Work/OA/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\OA; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['oa'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/OAuth/AccessTokenDelegate.php b/vendor/overtrue/wechat/src/Work/OAuth/AccessTokenDelegate.php deleted file mode 100644 index dc41b32..0000000 --- a/vendor/overtrue/wechat/src/Work/OAuth/AccessTokenDelegate.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\OAuth; - -use EasyWeChat\Work\Application; -use Overtrue\Socialite\AccessTokenInterface; - -/** - * Class AccessTokenDelegate. - * - * @author mingyoung - */ -class AccessTokenDelegate implements AccessTokenInterface -{ - /** - * @var \EasyWeChat\Work\Application - */ - protected $app; - - public function __construct(Application $app) - { - $this->app = $app; - } - - /** - * Return the access token string. - * - * @return string - */ - public function getToken() - { - return $this->app['access_token']->getToken()['access_token']; - } -} diff --git a/vendor/overtrue/wechat/src/Work/OAuth/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/OAuth/ServiceProvider.php deleted file mode 100644 index b1fdfce..0000000 --- a/vendor/overtrue/wechat/src/Work/OAuth/ServiceProvider.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\OAuth; - -use Overtrue\Socialite\SocialiteManager; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class ServiceProvider implements ServiceProviderInterface -{ - public function register(Container $app) - { - $app['oauth'] = function ($app) { - $socialite = (new SocialiteManager([ - 'wework' => [ - 'client_id' => $app['config']['corp_id'], - 'client_secret' => null, - 'redirect' => $this->prepareCallbackUrl($app), - ], - ], $app['request']))->driver('wework'); - - $scopes = (array) $app['config']->get('oauth.scopes', ['snsapi_base']); - - if (!empty($scopes)) { - $socialite->scopes($scopes); - } else { - $socialite->setAgentId($app['config']['agent_id']); - } - - return $socialite->setAccessToken(new AccessTokenDelegate($app)); - }; - } - - /** - * Prepare the OAuth callback url for wechat. - * - * @param Container $app - * - * @return string - */ - private function prepareCallbackUrl($app) - { - $callback = $app['config']->get('oauth.callback'); - - if (0 === stripos($callback, 'http')) { - return $callback; - } - - $baseUrl = $app['request']->getSchemeAndHttpHost(); - - return $baseUrl.'/'.ltrim($callback, '/'); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Schedule/Client.php b/vendor/overtrue/wechat/src/Work/Schedule/Client.php deleted file mode 100644 index b873a01..0000000 --- a/vendor/overtrue/wechat/src/Work/Schedule/Client.php +++ /dev/null @@ -1,93 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Schedule; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class Client. - * - * @author her-cat - */ -class Client extends BaseClient -{ - /** - * Add a schedule. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function add(array $schedule) - { - return $this->httpPostJson('cgi-bin/oa/schedule/add', compact('schedule')); - } - - /** - * Update the schedule. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $id, array $schedule) - { - $schedule += ['schedule_id' => $id]; - - return $this->httpPostJson('cgi-bin/oa/schedule/update', compact('schedule')); - } - - /** - * Get one or more schedules. - * - * @param string|array $ids - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function get($ids) - { - return $this->httpPostJson('cgi-bin/oa/schedule/get', ['schedule_id_list' => (array) $ids]); - } - - /** - * Get the list of schedules under a calendar. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function getByCalendar(string $calendarId, int $offset = 0, int $limit = 500) - { - $data = compact('offset', 'limit') + ['cal_id' => $calendarId]; - - return $this->httpPostJson('cgi-bin/oa/schedule/get_by_calendar', $data); - } - - /** - * Delete a schedule. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete(string $id) - { - return $this->httpPostJson('cgi-bin/oa/schedule/del', ['schedule_id' => $id]); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Schedule/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Schedule/ServiceProvider.php deleted file mode 100644 index 9bdd17b..0000000 --- a/vendor/overtrue/wechat/src/Work/Schedule/ServiceProvider.php +++ /dev/null @@ -1,33 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Schedule; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author her-cat - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc} - */ - public function register(Container $app) - { - $app['schedule'] = function ($app) { - return new Client($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/Server/Guard.php b/vendor/overtrue/wechat/src/Work/Server/Guard.php deleted file mode 100644 index aac3d8f..0000000 --- a/vendor/overtrue/wechat/src/Work/Server/Guard.php +++ /dev/null @@ -1,43 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Server; - -use EasyWeChat\Kernel\ServerGuard; - -/** - * Class Guard. - * - * @author overtrue - */ -class Guard extends ServerGuard -{ - /** - * @return $this - */ - public function validate() - { - return $this; - } - - /** - * Check the request message safe mode. - */ - protected function isSafeMode(): bool - { - return true; - } - - protected function shouldReturnRawResponse(): bool - { - return !is_null($this->app['request']->get('echostr')); - } -} diff --git a/vendor/overtrue/wechat/src/Work/Server/Handlers/EchoStrHandler.php b/vendor/overtrue/wechat/src/Work/Server/Handlers/EchoStrHandler.php deleted file mode 100644 index 6427ba5..0000000 --- a/vendor/overtrue/wechat/src/Work/Server/Handlers/EchoStrHandler.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Server\Handlers; - -use EasyWeChat\Kernel\Contracts\EventHandlerInterface; -use EasyWeChat\Kernel\Decorators\FinallyResult; -use EasyWeChat\Kernel\ServiceContainer; - -/** - * Class EchoStrHandler. - * - * @author overtrue - */ -class EchoStrHandler implements EventHandlerInterface -{ - /** - * @var ServiceContainer - */ - protected $app; - - /** - * EchoStrHandler constructor. - */ - public function __construct(ServiceContainer $app) - { - $this->app = $app; - } - - /** - * @param mixed $payload - * - * @return FinallyResult|null - */ - public function handle($payload = null) - { - if ($decrypted = $this->app['request']->get('echostr')) { - $str = $this->app['encryptor']->decrypt( - $decrypted, - $this->app['request']->get('msg_signature'), - $this->app['request']->get('nonce'), - $this->app['request']->get('timestamp') - ); - - return new FinallyResult($str); - } - } -} diff --git a/vendor/overtrue/wechat/src/Work/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Server/ServiceProvider.php deleted file mode 100644 index 8a2fc3e..0000000 --- a/vendor/overtrue/wechat/src/Work/Server/ServiceProvider.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\Server; - -use EasyWeChat\Kernel\Encryptor; -use EasyWeChat\Work\Server\Handlers\EchoStrHandler; -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author overtrue - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - !isset($app['encryptor']) && $app['encryptor'] = function ($app) { - return new Encryptor( - $app['config']['corp_id'], - $app['config']['token'], - $app['config']['aes_key'] - ); - }; - - !isset($app['server']) && $app['server'] = function ($app) { - $guard = new Guard($app); - $guard->push(new EchoStrHandler($app)); - - return $guard; - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/User/Client.php b/vendor/overtrue/wechat/src/Work/User/Client.php deleted file mode 100644 index 9141fc7..0000000 --- a/vendor/overtrue/wechat/src/Work/User/Client.php +++ /dev/null @@ -1,223 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\User; - -use EasyWeChat\Kernel\BaseClient; -use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; - -/** - * Class Client. - * - * @author mingyoung - */ -class Client extends BaseClient -{ - /** - * Create a user. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(array $data) - { - return $this->httpPostJson('cgi-bin/user/create', $data); - } - - /** - * Update an exist user. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(string $id, array $data) - { - return $this->httpPostJson('cgi-bin/user/update', array_merge(['userid' => $id], $data)); - } - - /** - * Delete a user. - * - * @param string|array $userId - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function delete($userId) - { - if (is_array($userId)) { - return $this->batchDelete($userId); - } - - return $this->httpGet('cgi-bin/user/delete', ['userid' => $userId]); - } - - /** - * Batch delete users. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function batchDelete(array $userIds) - { - return $this->httpPostJson('cgi-bin/user/batchdelete', ['useridlist' => $userIds]); - } - - /** - * Get user. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function get(string $userId) - { - return $this->httpGet('cgi-bin/user/get', ['userid' => $userId]); - } - - /** - * Get simple user list. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getDepartmentUsers(int $departmentId, bool $fetchChild = false) - { - $params = [ - 'department_id' => $departmentId, - 'fetch_child' => (int) $fetchChild, - ]; - - return $this->httpGet('cgi-bin/user/simplelist', $params); - } - - /** - * Get user list. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getDetailedDepartmentUsers(int $departmentId, bool $fetchChild = false) - { - $params = [ - 'department_id' => $departmentId, - 'fetch_child' => (int) $fetchChild, - ]; - - return $this->httpGet('cgi-bin/user/list', $params); - } - - /** - * Convert userId to openid. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function userIdToOpenid(string $userId, int $agentId = null) - { - $params = [ - 'userid' => $userId, - 'agentid' => $agentId, - ]; - - return $this->httpPostJson('cgi-bin/user/convert_to_openid', $params); - } - - /** - * Convert openid to userId. - * - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function openidToUserId(string $openid) - { - $params = [ - 'openid' => $openid, - ]; - - return $this->httpPostJson('cgi-bin/user/convert_to_userid', $params); - } - - /** - * Convert mobile to userId. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function mobileToUserId(string $mobile) - { - $params = [ - 'mobile' => $mobile, - ]; - - return $this->httpPostJson('cgi-bin/user/getuserid', $params); - } - - /** - * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function accept(string $userId) - { - $params = [ - 'userid' => $userId, - ]; - - return $this->httpGet('cgi-bin/user/authsucc', $params); - } - - /** - * Batch invite users. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function invite(array $params) - { - return $this->httpPostJson('cgi-bin/batch/invite', $params); - } - - /** - * Get invitation QR code. - * - * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string - * - * @throws InvalidArgumentException - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function getInvitationQrCode(int $sizeType = 1) - { - if (!\in_array($sizeType, [1, 2, 3, 4], true)) { - throw new InvalidArgumentException('The sizeType must be 1, 2, 3, 4.'); - } - - return $this->httpGet('cgi-bin/corp/get_join_qrcode', ['size_type' => $sizeType]); - } -} diff --git a/vendor/overtrue/wechat/src/Work/User/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/User/ServiceProvider.php deleted file mode 100644 index fcb5f10..0000000 --- a/vendor/overtrue/wechat/src/Work/User/ServiceProvider.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\User; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -/** - * Class ServiceProvider. - * - * @author mingyoung - */ -class ServiceProvider implements ServiceProviderInterface -{ - /** - * {@inheritdoc}. - */ - public function register(Container $app) - { - $app['user'] = function ($app) { - return new Client($app); - }; - - $app['tag'] = function ($app) { - return new TagClient($app); - }; - } -} diff --git a/vendor/overtrue/wechat/src/Work/User/TagClient.php b/vendor/overtrue/wechat/src/Work/User/TagClient.php deleted file mode 100644 index c8d31f9..0000000 --- a/vendor/overtrue/wechat/src/Work/User/TagClient.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - * This source file is subject to the MIT license that is bundled - * with this source code in the file LICENSE. - */ - -namespace EasyWeChat\Work\User; - -use EasyWeChat\Kernel\BaseClient; - -/** - * Class TagClient. - * - * @author mingyoung - */ -class TagClient extends BaseClient -{ - /** - * Create tag. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function create(string $tagName, int $tagId = null) - { - $params = [ - 'tagname' => $tagName, - 'tagid' => $tagId, - ]; - - return $this->httpPostJson('cgi-bin/tag/create', $params); - } - - /** - * Update tag. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function update(int $tagId, string $tagName) - { - $params = [ - 'tagid' => $tagId, - 'tagname' => $tagName, - ]; - - return $this->httpPostJson('cgi-bin/tag/update', $params); - } - - /** - * Delete tag. - * - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function delete(int $tagId) - { - return $this->httpGet('cgi-bin/tag/delete', ['tagid' => $tagId]); - } - - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function get(int $tagId) - { - return $this->httpGet('cgi-bin/tag/get', ['tagid' => $tagId]); - } - - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function tagUsers(int $tagId, array $userList = []) - { - return $this->tagOrUntagUsers('cgi-bin/tag/addtagusers', $tagId, $userList); - } - - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function tagDepartments(int $tagId, array $partyList = []) - { - return $this->tagOrUntagUsers('cgi-bin/tag/addtagusers', $tagId, [], $partyList); - } - - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function untagUsers(int $tagId, array $userList = []) - { - return $this->tagOrUntagUsers('cgi-bin/tag/deltagusers', $tagId, $userList); - } - - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - public function untagDepartments(int $tagId, array $partyList = []) - { - return $this->tagOrUntagUsers('cgi-bin/tag/deltagusers', $tagId, [], $partyList); - } - - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - * @throws \GuzzleHttp\Exception\GuzzleException - */ - protected function tagOrUntagUsers(string $endpoint, int $tagId, array $userList = [], array $partyList = []) - { - $data = [ - 'tagid' => $tagId, - 'userlist' => $userList, - 'partylist' => $partyList, - ]; - - return $this->httpPostJson($endpoint, $data); - } - - /** - * @return mixed - * - * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException - */ - public function list() - { - return $this->httpGet('cgi-bin/tag/list'); - } -} diff --git a/vendor/phpoffice/phpexcel/.gitattributes b/vendor/phpoffice/phpexcel/.gitattributes deleted file mode 100644 index 58182f2..0000000 --- a/vendor/phpoffice/phpexcel/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -/Build export-ignore -/unitTests export-ignore -README.md export-ignore diff --git a/vendor/phpoffice/phpexcel/.gitignore b/vendor/phpoffice/phpexcel/.gitignore deleted file mode 100644 index dea03b5..0000000 --- a/vendor/phpoffice/phpexcel/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -build/PHPExcel.phar -unitTests/codeCoverage -analysis - -## IDE support -*.buildpath -*.project -/.settings -/.idea diff --git a/vendor/phpoffice/phpexcel/.travis.yml b/vendor/phpoffice/phpexcel/.travis.yml deleted file mode 100644 index 99e9e8d..0000000 --- a/vendor/phpoffice/phpexcel/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm - -matrix: - allow_failures: - - php: hhvm - -before_script: - ## Packages - - sudo apt-get -qq update > /dev/null - ## Composer - - composer self-update - - composer install --prefer-source --dev - - phpenv global "$TRAVIS_PHP_VERSION" - -script: - ## PHP_CodeSniffer - - ./vendor/bin/phpcs --report-width=200 --report-summary --report-full Classes/ unitTests/ --standard=PSR2 -n - ## PHPUnit - - phpunit -c ./unitTests/ - -notifications: - email: false diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel.php deleted file mode 100644 index b8dbe0e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel.php +++ /dev/null @@ -1,1153 +0,0 @@ -hasMacros; - } - - /** - * Define if a workbook has macros - * - * @param boolean $hasMacros true|false - */ - public function setHasMacros($hasMacros = false) - { - $this->hasMacros = (bool) $hasMacros; - } - - /** - * Set the macros code - * - * @param string $MacrosCode string|null - */ - public function setMacrosCode($MacrosCode = null) - { - $this->macrosCode=$MacrosCode; - $this->setHasMacros(!is_null($MacrosCode)); - } - - /** - * Return the macros code - * - * @return string|null - */ - public function getMacrosCode() - { - return $this->macrosCode; - } - - /** - * Set the macros certificate - * - * @param string|null $Certificate - */ - public function setMacrosCertificate($Certificate = null) - { - $this->macrosCertificate=$Certificate; - } - - /** - * Is the project signed ? - * - * @return boolean true|false - */ - public function hasMacrosCertificate() - { - return !is_null($this->macrosCertificate); - } - - /** - * Return the macros certificate - * - * @return string|null - */ - public function getMacrosCertificate() - { - return $this->macrosCertificate; - } - - /** - * Remove all macros, certificate from spreadsheet - * - */ - public function discardMacros() - { - $this->hasMacros=false; - $this->macrosCode=null; - $this->macrosCertificate=null; - } - - /** - * set ribbon XML data - * - */ - public function setRibbonXMLData($Target = null, $XMLData = null) - { - if (!is_null($Target) && !is_null($XMLData)) { - $this->ribbonXMLData = array('target' => $Target, 'data' => $XMLData); - } else { - $this->ribbonXMLData = null; - } - } - - /** - * retrieve ribbon XML Data - * - * return string|null|array - */ - public function getRibbonXMLData($What = 'all') //we need some constants here... - { - $ReturnData = null; - $What = strtolower($What); - switch ($What){ - case 'all': - $ReturnData = $this->ribbonXMLData; - break; - case 'target': - case 'data': - if (is_array($this->ribbonXMLData) && array_key_exists($What, $this->ribbonXMLData)) { - $ReturnData = $this->ribbonXMLData[$What]; - } - break; - } - - return $ReturnData; - } - - /** - * store binaries ribbon objects (pictures) - * - */ - public function setRibbonBinObjects($BinObjectsNames = null, $BinObjectsData = null) - { - if (!is_null($BinObjectsNames) && !is_null($BinObjectsData)) { - $this->ribbonBinObjects = array('names' => $BinObjectsNames, 'data' => $BinObjectsData); - } else { - $this->ribbonBinObjects = null; - } - } - /** - * return the extension of a filename. Internal use for a array_map callback (php<5.3 don't like lambda function) - * - */ - private function getExtensionOnly($ThePath) - { - return pathinfo($ThePath, PATHINFO_EXTENSION); - } - - /** - * retrieve Binaries Ribbon Objects - * - */ - public function getRibbonBinObjects($What = 'all') - { - $ReturnData = null; - $What = strtolower($What); - switch($What) { - case 'all': - return $this->ribbonBinObjects; - break; - case 'names': - case 'data': - if (is_array($this->ribbonBinObjects) && array_key_exists($What, $this->ribbonBinObjects)) { - $ReturnData=$this->ribbonBinObjects[$What]; - } - break; - case 'types': - if (is_array($this->ribbonBinObjects) && - array_key_exists('data', $this->ribbonBinObjects) && is_array($this->ribbonBinObjects['data'])) { - $tmpTypes=array_keys($this->ribbonBinObjects['data']); - $ReturnData = array_unique(array_map(array($this, 'getExtensionOnly'), $tmpTypes)); - } else { - $ReturnData=array(); // the caller want an array... not null if empty - } - break; - } - return $ReturnData; - } - - /** - * This workbook have a custom UI ? - * - * @return boolean true|false - */ - public function hasRibbon() - { - return !is_null($this->ribbonXMLData); - } - - /** - * This workbook have additionnal object for the ribbon ? - * - * @return boolean true|false - */ - public function hasRibbonBinObjects() - { - return !is_null($this->ribbonBinObjects); - } - - /** - * Check if a sheet with a specified code name already exists - * - * @param string $pSheetCodeName Name of the worksheet to check - * @return boolean - */ - public function sheetCodeNameExists($pSheetCodeName) - { - return ($this->getSheetByCodeName($pSheetCodeName) !== null); - } - - /** - * Get sheet by code name. Warning : sheet don't have always a code name ! - * - * @param string $pName Sheet name - * @return PHPExcel_Worksheet - */ - public function getSheetByCodeName($pName = '') - { - $worksheetCount = count($this->workSheetCollection); - for ($i = 0; $i < $worksheetCount; ++$i) { - if ($this->workSheetCollection[$i]->getCodeName() == $pName) { - return $this->workSheetCollection[$i]; - } - } - - return null; - } - - /** - * Create a new PHPExcel with one Worksheet - */ - public function __construct() - { - $this->uniqueID = uniqid(); - $this->calculationEngine = new PHPExcel_Calculation($this); - - // Initialise worksheet collection and add one worksheet - $this->workSheetCollection = array(); - $this->workSheetCollection[] = new PHPExcel_Worksheet($this); - $this->activeSheetIndex = 0; - - // Create document properties - $this->properties = new PHPExcel_DocumentProperties(); - - // Create document security - $this->security = new PHPExcel_DocumentSecurity(); - - // Set named ranges - $this->namedRanges = array(); - - // Create the cellXf supervisor - $this->cellXfSupervisor = new PHPExcel_Style(true); - $this->cellXfSupervisor->bindParent($this); - - // Create the default style - $this->addCellXf(new PHPExcel_Style); - $this->addCellStyleXf(new PHPExcel_Style); - } - - /** - * Code to execute when this worksheet is unset() - * - */ - public function __destruct() - { - $this->calculationEngine = null; - $this->disconnectWorksheets(); - } - - /** - * Disconnect all worksheets from this PHPExcel workbook object, - * typically so that the PHPExcel object can be unset - * - */ - public function disconnectWorksheets() - { - $worksheet = null; - foreach ($this->workSheetCollection as $k => &$worksheet) { - $worksheet->disconnectCells(); - $this->workSheetCollection[$k] = null; - } - unset($worksheet); - $this->workSheetCollection = array(); - } - - /** - * Return the calculation engine for this worksheet - * - * @return PHPExcel_Calculation - */ - public function getCalculationEngine() - { - return $this->calculationEngine; - } // function getCellCacheController() - - /** - * Get properties - * - * @return PHPExcel_DocumentProperties - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Set properties - * - * @param PHPExcel_DocumentProperties $pValue - */ - public function setProperties(PHPExcel_DocumentProperties $pValue) - { - $this->properties = $pValue; - } - - /** - * Get security - * - * @return PHPExcel_DocumentSecurity - */ - public function getSecurity() - { - return $this->security; - } - - /** - * Set security - * - * @param PHPExcel_DocumentSecurity $pValue - */ - public function setSecurity(PHPExcel_DocumentSecurity $pValue) - { - $this->security = $pValue; - } - - /** - * Get active sheet - * - * @return PHPExcel_Worksheet - * - * @throws PHPExcel_Exception - */ - public function getActiveSheet() - { - return $this->getSheet($this->activeSheetIndex); - } - - /** - * Create sheet and add it to this workbook - * - * @param int|null $iSheetIndex Index where sheet should go (0,1,..., or null for last) - * @return PHPExcel_Worksheet - * @throws PHPExcel_Exception - */ - public function createSheet($iSheetIndex = null) - { - $newSheet = new PHPExcel_Worksheet($this); - $this->addSheet($newSheet, $iSheetIndex); - return $newSheet; - } - - /** - * Check if a sheet with a specified name already exists - * - * @param string $pSheetName Name of the worksheet to check - * @return boolean - */ - public function sheetNameExists($pSheetName) - { - return ($this->getSheetByName($pSheetName) !== null); - } - - /** - * Add sheet - * - * @param PHPExcel_Worksheet $pSheet - * @param int|null $iSheetIndex Index where sheet should go (0,1,..., or null for last) - * @return PHPExcel_Worksheet - * @throws PHPExcel_Exception - */ - public function addSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex = null) - { - if ($this->sheetNameExists($pSheet->getTitle())) { - throw new PHPExcel_Exception( - "Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename this worksheet first." - ); - } - - if ($iSheetIndex === null) { - if ($this->activeSheetIndex < 0) { - $this->activeSheetIndex = 0; - } - $this->workSheetCollection[] = $pSheet; - } else { - // Insert the sheet at the requested index - array_splice( - $this->workSheetCollection, - $iSheetIndex, - 0, - array($pSheet) - ); - - // Adjust active sheet index if necessary - if ($this->activeSheetIndex >= $iSheetIndex) { - ++$this->activeSheetIndex; - } - } - - if ($pSheet->getParent() === null) { - $pSheet->rebindParent($this); - } - - return $pSheet; - } - - /** - * Remove sheet by index - * - * @param int $pIndex Active sheet index - * @throws PHPExcel_Exception - */ - public function removeSheetByIndex($pIndex = 0) - { - - $numSheets = count($this->workSheetCollection); - if ($pIndex > $numSheets - 1) { - throw new PHPExcel_Exception( - "You tried to remove a sheet by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}." - ); - } else { - array_splice($this->workSheetCollection, $pIndex, 1); - } - // Adjust active sheet index if necessary - if (($this->activeSheetIndex >= $pIndex) && - ($pIndex > count($this->workSheetCollection) - 1)) { - --$this->activeSheetIndex; - } - - } - - /** - * Get sheet by index - * - * @param int $pIndex Sheet index - * @return PHPExcel_Worksheet - * @throws PHPExcel_Exception - */ - public function getSheet($pIndex = 0) - { - if (!isset($this->workSheetCollection[$pIndex])) { - $numSheets = $this->getSheetCount(); - throw new PHPExcel_Exception( - "Your requested sheet index: {$pIndex} is out of bounds. The actual number of sheets is {$numSheets}." - ); - } - - return $this->workSheetCollection[$pIndex]; - } - - /** - * Get all sheets - * - * @return PHPExcel_Worksheet[] - */ - public function getAllSheets() - { - return $this->workSheetCollection; - } - - /** - * Get sheet by name - * - * @param string $pName Sheet name - * @return PHPExcel_Worksheet - */ - public function getSheetByName($pName = '') - { - $worksheetCount = count($this->workSheetCollection); - for ($i = 0; $i < $worksheetCount; ++$i) { - if ($this->workSheetCollection[$i]->getTitle() === $pName) { - return $this->workSheetCollection[$i]; - } - } - - return null; - } - - /** - * Get index for sheet - * - * @param PHPExcel_Worksheet $pSheet - * @return int Sheet index - * @throws PHPExcel_Exception - */ - public function getIndex(PHPExcel_Worksheet $pSheet) - { - foreach ($this->workSheetCollection as $key => $value) { - if ($value->getHashCode() == $pSheet->getHashCode()) { - return $key; - } - } - - throw new PHPExcel_Exception("Sheet does not exist."); - } - - /** - * Set index for sheet by sheet name. - * - * @param string $sheetName Sheet name to modify index for - * @param int $newIndex New index for the sheet - * @return int New sheet index - * @throws PHPExcel_Exception - */ - public function setIndexByName($sheetName, $newIndex) - { - $oldIndex = $this->getIndex($this->getSheetByName($sheetName)); - $pSheet = array_splice( - $this->workSheetCollection, - $oldIndex, - 1 - ); - array_splice( - $this->workSheetCollection, - $newIndex, - 0, - $pSheet - ); - return $newIndex; - } - - /** - * Get sheet count - * - * @return int - */ - public function getSheetCount() - { - return count($this->workSheetCollection); - } - - /** - * Get active sheet index - * - * @return int Active sheet index - */ - public function getActiveSheetIndex() - { - return $this->activeSheetIndex; - } - - /** - * Set active sheet index - * - * @param int $pIndex Active sheet index - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function setActiveSheetIndex($pIndex = 0) - { - $numSheets = count($this->workSheetCollection); - - if ($pIndex > $numSheets - 1) { - throw new PHPExcel_Exception( - "You tried to set a sheet active by the out of bounds index: {$pIndex}. The actual number of sheets is {$numSheets}." - ); - } else { - $this->activeSheetIndex = $pIndex; - } - return $this->getActiveSheet(); - } - - /** - * Set active sheet index by name - * - * @param string $pValue Sheet title - * @return PHPExcel_Worksheet - * @throws PHPExcel_Exception - */ - public function setActiveSheetIndexByName($pValue = '') - { - if (($worksheet = $this->getSheetByName($pValue)) instanceof PHPExcel_Worksheet) { - $this->setActiveSheetIndex($this->getIndex($worksheet)); - return $worksheet; - } - - throw new PHPExcel_Exception('Workbook does not contain sheet:' . $pValue); - } - - /** - * Get sheet names - * - * @return string[] - */ - public function getSheetNames() - { - $returnValue = array(); - $worksheetCount = $this->getSheetCount(); - for ($i = 0; $i < $worksheetCount; ++$i) { - $returnValue[] = $this->getSheet($i)->getTitle(); - } - - return $returnValue; - } - - /** - * Add external sheet - * - * @param PHPExcel_Worksheet $pSheet External sheet to add - * @param int|null $iSheetIndex Index where sheet should go (0,1,..., or null for last) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function addExternalSheet(PHPExcel_Worksheet $pSheet, $iSheetIndex = null) - { - if ($this->sheetNameExists($pSheet->getTitle())) { - throw new PHPExcel_Exception("Workbook already contains a worksheet named '{$pSheet->getTitle()}'. Rename the external sheet first."); - } - - // count how many cellXfs there are in this workbook currently, we will need this below - $countCellXfs = count($this->cellXfCollection); - - // copy all the shared cellXfs from the external workbook and append them to the current - foreach ($pSheet->getParent()->getCellXfCollection() as $cellXf) { - $this->addCellXf(clone $cellXf); - } - - // move sheet to this workbook - $pSheet->rebindParent($this); - - // update the cellXfs - foreach ($pSheet->getCellCollection(false) as $cellID) { - $cell = $pSheet->getCell($cellID); - $cell->setXfIndex($cell->getXfIndex() + $countCellXfs); - } - - return $this->addSheet($pSheet, $iSheetIndex); - } - - /** - * Get named ranges - * - * @return PHPExcel_NamedRange[] - */ - public function getNamedRanges() - { - return $this->namedRanges; - } - - /** - * Add named range - * - * @param PHPExcel_NamedRange $namedRange - * @return boolean - */ - public function addNamedRange(PHPExcel_NamedRange $namedRange) - { - if ($namedRange->getScope() == null) { - // global scope - $this->namedRanges[$namedRange->getName()] = $namedRange; - } else { - // local scope - $this->namedRanges[$namedRange->getScope()->getTitle().'!'.$namedRange->getName()] = $namedRange; - } - return true; - } - - /** - * Get named range - * - * @param string $namedRange - * @param PHPExcel_Worksheet|null $pSheet Scope. Use null for global scope - * @return PHPExcel_NamedRange|null - */ - public function getNamedRange($namedRange, PHPExcel_Worksheet $pSheet = null) - { - $returnValue = null; - - if ($namedRange != '' && ($namedRange !== null)) { - // first look for global defined name - if (isset($this->namedRanges[$namedRange])) { - $returnValue = $this->namedRanges[$namedRange]; - } - - // then look for local defined name (has priority over global defined name if both names exist) - if (($pSheet !== null) && isset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange])) { - $returnValue = $this->namedRanges[$pSheet->getTitle() . '!' . $namedRange]; - } - } - - return $returnValue; - } - - /** - * Remove named range - * - * @param string $namedRange - * @param PHPExcel_Worksheet|null $pSheet Scope: use null for global scope. - * @return PHPExcel - */ - public function removeNamedRange($namedRange, PHPExcel_Worksheet $pSheet = null) - { - if ($pSheet === null) { - if (isset($this->namedRanges[$namedRange])) { - unset($this->namedRanges[$namedRange]); - } - } else { - if (isset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange])) { - unset($this->namedRanges[$pSheet->getTitle() . '!' . $namedRange]); - } - } - return $this; - } - - /** - * Get worksheet iterator - * - * @return PHPExcel_WorksheetIterator - */ - public function getWorksheetIterator() - { - return new PHPExcel_WorksheetIterator($this); - } - - /** - * Copy workbook (!= clone!) - * - * @return PHPExcel - */ - public function copy() - { - $copied = clone $this; - - $worksheetCount = count($this->workSheetCollection); - for ($i = 0; $i < $worksheetCount; ++$i) { - $this->workSheetCollection[$i] = $this->workSheetCollection[$i]->copy(); - $this->workSheetCollection[$i]->rebindParent($this); - } - - return $copied; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - foreach ($this as $key => $val) { - if (is_object($val) || (is_array($val))) { - $this->{$key} = unserialize(serialize($val)); - } - } - } - - /** - * Get the workbook collection of cellXfs - * - * @return PHPExcel_Style[] - */ - public function getCellXfCollection() - { - return $this->cellXfCollection; - } - - /** - * Get cellXf by index - * - * @param int $pIndex - * @return PHPExcel_Style - */ - public function getCellXfByIndex($pIndex = 0) - { - return $this->cellXfCollection[$pIndex]; - } - - /** - * Get cellXf by hash code - * - * @param string $pValue - * @return PHPExcel_Style|boolean False if no match found - */ - public function getCellXfByHashCode($pValue = '') - { - foreach ($this->cellXfCollection as $cellXf) { - if ($cellXf->getHashCode() == $pValue) { - return $cellXf; - } - } - return false; - } - - /** - * Check if style exists in style collection - * - * @param PHPExcel_Style $pCellStyle - * @return boolean - */ - public function cellXfExists($pCellStyle = null) - { - return in_array($pCellStyle, $this->cellXfCollection, true); - } - - /** - * Get default style - * - * @return PHPExcel_Style - * @throws PHPExcel_Exception - */ - public function getDefaultStyle() - { - if (isset($this->cellXfCollection[0])) { - return $this->cellXfCollection[0]; - } - throw new PHPExcel_Exception('No default style found for this workbook'); - } - - /** - * Add a cellXf to the workbook - * - * @param PHPExcel_Style $style - */ - public function addCellXf(PHPExcel_Style $style) - { - $this->cellXfCollection[] = $style; - $style->setIndex(count($this->cellXfCollection) - 1); - } - - /** - * Remove cellXf by index. It is ensured that all cells get their xf index updated. - * - * @param integer $pIndex Index to cellXf - * @throws PHPExcel_Exception - */ - public function removeCellXfByIndex($pIndex = 0) - { - if ($pIndex > count($this->cellXfCollection) - 1) { - throw new PHPExcel_Exception("CellXf index is out of bounds."); - } else { - // first remove the cellXf - array_splice($this->cellXfCollection, $pIndex, 1); - - // then update cellXf indexes for cells - foreach ($this->workSheetCollection as $worksheet) { - foreach ($worksheet->getCellCollection(false) as $cellID) { - $cell = $worksheet->getCell($cellID); - $xfIndex = $cell->getXfIndex(); - if ($xfIndex > $pIndex) { - // decrease xf index by 1 - $cell->setXfIndex($xfIndex - 1); - } elseif ($xfIndex == $pIndex) { - // set to default xf index 0 - $cell->setXfIndex(0); - } - } - } - } - } - - /** - * Get the cellXf supervisor - * - * @return PHPExcel_Style - */ - public function getCellXfSupervisor() - { - return $this->cellXfSupervisor; - } - - /** - * Get the workbook collection of cellStyleXfs - * - * @return PHPExcel_Style[] - */ - public function getCellStyleXfCollection() - { - return $this->cellStyleXfCollection; - } - - /** - * Get cellStyleXf by index - * - * @param integer $pIndex Index to cellXf - * @return PHPExcel_Style - */ - public function getCellStyleXfByIndex($pIndex = 0) - { - return $this->cellStyleXfCollection[$pIndex]; - } - - /** - * Get cellStyleXf by hash code - * - * @param string $pValue - * @return PHPExcel_Style|boolean False if no match found - */ - public function getCellStyleXfByHashCode($pValue = '') - { - foreach ($this->cellStyleXfCollection as $cellStyleXf) { - if ($cellStyleXf->getHashCode() == $pValue) { - return $cellStyleXf; - } - } - return false; - } - - /** - * Add a cellStyleXf to the workbook - * - * @param PHPExcel_Style $pStyle - */ - public function addCellStyleXf(PHPExcel_Style $pStyle) - { - $this->cellStyleXfCollection[] = $pStyle; - $pStyle->setIndex(count($this->cellStyleXfCollection) - 1); - } - - /** - * Remove cellStyleXf by index - * - * @param integer $pIndex Index to cellXf - * @throws PHPExcel_Exception - */ - public function removeCellStyleXfByIndex($pIndex = 0) - { - if ($pIndex > count($this->cellStyleXfCollection) - 1) { - throw new PHPExcel_Exception("CellStyleXf index is out of bounds."); - } else { - array_splice($this->cellStyleXfCollection, $pIndex, 1); - } - } - - /** - * Eliminate all unneeded cellXf and afterwards update the xfIndex for all cells - * and columns in the workbook - */ - public function garbageCollect() - { - // how many references are there to each cellXf ? - $countReferencesCellXf = array(); - foreach ($this->cellXfCollection as $index => $cellXf) { - $countReferencesCellXf[$index] = 0; - } - - foreach ($this->getWorksheetIterator() as $sheet) { - // from cells - foreach ($sheet->getCellCollection(false) as $cellID) { - $cell = $sheet->getCell($cellID); - ++$countReferencesCellXf[$cell->getXfIndex()]; - } - - // from row dimensions - foreach ($sheet->getRowDimensions() as $rowDimension) { - if ($rowDimension->getXfIndex() !== null) { - ++$countReferencesCellXf[$rowDimension->getXfIndex()]; - } - } - - // from column dimensions - foreach ($sheet->getColumnDimensions() as $columnDimension) { - ++$countReferencesCellXf[$columnDimension->getXfIndex()]; - } - } - - // remove cellXfs without references and create mapping so we can update xfIndex - // for all cells and columns - $countNeededCellXfs = 0; - $map = array(); - foreach ($this->cellXfCollection as $index => $cellXf) { - if ($countReferencesCellXf[$index] > 0 || $index == 0) { // we must never remove the first cellXf - ++$countNeededCellXfs; - } else { - unset($this->cellXfCollection[$index]); - } - $map[$index] = $countNeededCellXfs - 1; - } - $this->cellXfCollection = array_values($this->cellXfCollection); - - // update the index for all cellXfs - foreach ($this->cellXfCollection as $i => $cellXf) { - $cellXf->setIndex($i); - } - - // make sure there is always at least one cellXf (there should be) - if (empty($this->cellXfCollection)) { - $this->cellXfCollection[] = new PHPExcel_Style(); - } - - // update the xfIndex for all cells, row dimensions, column dimensions - foreach ($this->getWorksheetIterator() as $sheet) { - // for all cells - foreach ($sheet->getCellCollection(false) as $cellID) { - $cell = $sheet->getCell($cellID); - $cell->setXfIndex($map[$cell->getXfIndex()]); - } - - // for all row dimensions - foreach ($sheet->getRowDimensions() as $rowDimension) { - if ($rowDimension->getXfIndex() !== null) { - $rowDimension->setXfIndex($map[$rowDimension->getXfIndex()]); - } - } - - // for all column dimensions - foreach ($sheet->getColumnDimensions() as $columnDimension) { - $columnDimension->setXfIndex($map[$columnDimension->getXfIndex()]); - } - - // also do garbage collection for all the sheets - $sheet->garbageCollect(); - } - } - - /** - * Return the unique ID value assigned to this spreadsheet workbook - * - * @return string - */ - public function getID() - { - return $this->uniqueID; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Autoloader.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Autoloader.php deleted file mode 100644 index c3b95a2..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Autoloader.php +++ /dev/null @@ -1,81 +0,0 @@ -= 0) { - return spl_autoload_register(array('PHPExcel_Autoloader', 'load'), true, true); - } else { - return spl_autoload_register(array('PHPExcel_Autoloader', 'load')); - } - } - - /** - * Autoload a class identified by name - * - * @param string $pClassName Name of the object to load - */ - public static function load($pClassName) - { - if ((class_exists($pClassName, false)) || (strpos($pClassName, 'PHPExcel') !== 0)) { - // Either already loaded, or not a PHPExcel class request - return false; - } - - $pClassFilePath = PHPEXCEL_ROOT . - str_replace('_', DIRECTORY_SEPARATOR, $pClassName) . - '.php'; - - if ((file_exists($pClassFilePath) === false) || (is_readable($pClassFilePath) === false)) { - // Can't load - return false; - } - - require($pClassFilePath); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/APC.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/APC.php deleted file mode 100644 index c74b07f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/APC.php +++ /dev/null @@ -1,290 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - if (!apc_store( - $this->cachePrefix . $this->currentObjectID . '.cache', - serialize($this->currentObject), - $this->cacheTime - )) { - $this->__destruct(); - throw new PHPExcel_Exception('Failed to store cell ' . $this->currentObjectID . ' in APC'); - } - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @access public - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - $this->cellCache[$pCoord] = true; - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } - - /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? - * - * @access public - * @param string $pCoord Coordinate address of the cell to check - * @throws PHPExcel_Exception - * @return boolean - */ - public function isDataSet($pCoord) - { - // Check if the requested entry is the current object, or exists in the cache - if (parent::isDataSet($pCoord)) { - if ($this->currentObjectID == $pCoord) { - return true; - } - // Check if the requested entry still exists in apc - $success = apc_fetch($this->cachePrefix.$pCoord.'.cache'); - if ($success === false) { - // Entry no longer exists in APC, so clear it from the cache array - parent::deleteCacheData($pCoord); - throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in APC cache'); - } - return true; - } - return false; - } - - /** - * Get cell at a specific coordinate - * - * @access public - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - // Check if the entry that has been requested actually exists - if (parent::isDataSet($pCoord)) { - $obj = apc_fetch($this->cachePrefix . $pCoord . '.cache'); - if ($obj === false) { - // Entry no longer exists in APC, so clear it from the cache array - parent::deleteCacheData($pCoord); - throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in APC cache'); - } - } else { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - $this->currentObject = unserialize($obj); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - return parent::getCellList(); - } - - /** - * Delete a cell in cache identified by coordinate address - * - * @access public - * @param string $pCoord Coordinate address of the cell to delete - * @throws PHPExcel_Exception - */ - public function deleteCacheData($pCoord) - { - // Delete the entry from APC - apc_delete($this->cachePrefix.$pCoord.'.cache'); - - // Delete the entry from our cell address array - parent::deleteCacheData($pCoord); - } - - /** - * Clone the cell collection - * - * @access public - * @param PHPExcel_Worksheet $parent The new worksheet - * @throws PHPExcel_Exception - * @return void - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - parent::copyCellCollection($parent); - // Get a new id for the new file name - $baseUnique = $this->getUniqueID(); - $newCachePrefix = substr(md5($baseUnique), 0, 8) . '.'; - $cacheList = $this->getCellList(); - foreach ($cacheList as $cellID) { - if ($cellID != $this->currentObjectID) { - $obj = apc_fetch($this->cachePrefix . $cellID . '.cache'); - if ($obj === false) { - // Entry no longer exists in APC, so clear it from the cache array - parent::deleteCacheData($cellID); - throw new PHPExcel_Exception('Cell entry ' . $cellID . ' no longer exists in APC'); - } - if (!apc_store($newCachePrefix . $cellID . '.cache', $obj, $this->cacheTime)) { - $this->__destruct(); - throw new PHPExcel_Exception('Failed to store cell ' . $cellID . ' in APC'); - } - } - } - $this->cachePrefix = $newCachePrefix; - } - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if ($this->currentObject !== null) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - - // Flush the APC cache - $this->__destruct(); - - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - } - - /** - * Initialise this new cell collection - * - * @param PHPExcel_Worksheet $parent The worksheet for this cell collection - * @param array of mixed $arguments Additional initialisation arguments - */ - public function __construct(PHPExcel_Worksheet $parent, $arguments) - { - $cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600; - - if ($this->cachePrefix === null) { - $baseUnique = $this->getUniqueID(); - $this->cachePrefix = substr(md5($baseUnique), 0, 8) . '.'; - $this->cacheTime = $cacheTime; - - parent::__construct($parent); - } - } - - /** - * Destroy this cell collection - */ - public function __destruct() - { - $cacheList = $this->getCellList(); - foreach ($cacheList as $cellID) { - apc_delete($this->cachePrefix . $cellID . '.cache'); - } - } - - /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build - * - * @return boolean - */ - public static function cacheMethodIsAvailable() - { - if (!function_exists('apc_store')) { - return false; - } - if (apc_sma_info() === false) { - return false; - } - - return true; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/CacheBase.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/CacheBase.php deleted file mode 100644 index 9a12ec8..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/CacheBase.php +++ /dev/null @@ -1,368 +0,0 @@ -parent = $parent; - } - - /** - * Return the parent worksheet for this cell collection - * - * @return PHPExcel_Worksheet - */ - public function getParent() - { - return $this->parent; - } - - /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? - * - * @param string $pCoord Coordinate address of the cell to check - * @return boolean - */ - public function isDataSet($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return true; - } - // Check if the requested entry exists in the cache - return isset($this->cellCache[$pCoord]); - } - - /** - * Move a cell object from one address to another - * - * @param string $fromAddress Current address of the cell to move - * @param string $toAddress Destination address of the cell to move - * @return boolean - */ - public function moveCell($fromAddress, $toAddress) - { - if ($fromAddress === $this->currentObjectID) { - $this->currentObjectID = $toAddress; - } - $this->currentCellIsDirty = true; - if (isset($this->cellCache[$fromAddress])) { - $this->cellCache[$toAddress] = &$this->cellCache[$fromAddress]; - unset($this->cellCache[$fromAddress]); - } - - return true; - } - - /** - * Add or Update a cell in cache - * - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function updateCacheData(PHPExcel_Cell $cell) - { - return $this->addCacheData($cell->getCoordinate(), $cell); - } - - /** - * Delete a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to delete - * @throws PHPExcel_Exception - */ - public function deleteCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID && !is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObjectID = $this->currentObject = null; - } - - if (is_object($this->cellCache[$pCoord])) { - $this->cellCache[$pCoord]->detach(); - unset($this->cellCache[$pCoord]); - } - $this->currentCellIsDirty = false; - } - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - return array_keys($this->cellCache); - } - - /** - * Sort the list of all cell addresses currently held in cache by row and column - * - * @return string[] - */ - public function getSortedCellList() - { - $sortKeys = array(); - foreach ($this->getCellList() as $coord) { - sscanf($coord, '%[A-Z]%d', $column, $row); - $sortKeys[sprintf('%09d%3s', $row, $column)] = $coord; - } - ksort($sortKeys); - - return array_values($sortKeys); - } - - /** - * Get highest worksheet column and highest row that have cell records - * - * @return array Highest column name and highest row number - */ - public function getHighestRowAndColumn() - { - // Lookup highest column and highest row - $col = array('A' => '1A'); - $row = array(1); - foreach ($this->getCellList() as $coord) { - sscanf($coord, '%[A-Z]%d', $c, $r); - $row[$r] = $r; - $col[$c] = strlen($c).$c; - } - if (!empty($row)) { - // Determine highest column and row - $highestRow = max($row); - $highestColumn = substr(max($col), 1); - } - - return array( - 'row' => $highestRow, - 'column' => $highestColumn - ); - } - - /** - * Return the cell address of the currently active cell object - * - * @return string - */ - public function getCurrentAddress() - { - return $this->currentObjectID; - } - - /** - * Return the column address of the currently active cell object - * - * @return string - */ - public function getCurrentColumn() - { - sscanf($this->currentObjectID, '%[A-Z]%d', $column, $row); - return $column; - } - - /** - * Return the row address of the currently active cell object - * - * @return integer - */ - public function getCurrentRow() - { - sscanf($this->currentObjectID, '%[A-Z]%d', $column, $row); - return (integer) $row; - } - - /** - * Get highest worksheet column - * - * @param string $row Return the highest column for the specified row, - * or the highest column of any row if no row number is passed - * @return string Highest column name - */ - public function getHighestColumn($row = null) - { - if ($row == null) { - $colRow = $this->getHighestRowAndColumn(); - return $colRow['column']; - } - - $columnList = array(1); - foreach ($this->getCellList() as $coord) { - sscanf($coord, '%[A-Z]%d', $c, $r); - if ($r != $row) { - continue; - } - $columnList[] = PHPExcel_Cell::columnIndexFromString($c); - } - return PHPExcel_Cell::stringFromColumnIndex(max($columnList) - 1); - } - - /** - * Get highest worksheet row - * - * @param string $column Return the highest row for the specified column, - * or the highest row of any column if no column letter is passed - * @return int Highest row number - */ - public function getHighestRow($column = null) - { - if ($column == null) { - $colRow = $this->getHighestRowAndColumn(); - return $colRow['row']; - } - - $rowList = array(0); - foreach ($this->getCellList() as $coord) { - sscanf($coord, '%[A-Z]%d', $c, $r); - if ($c != $column) { - continue; - } - $rowList[] = $r; - } - - return max($rowList); - } - - /** - * Generate a unique ID for cache referencing - * - * @return string Unique Reference - */ - protected function getUniqueID() - { - if (function_exists('posix_getpid')) { - $baseUnique = posix_getpid(); - } else { - $baseUnique = mt_rand(); - } - return uniqid($baseUnique, true); - } - - /** - * Clone the cell collection - * - * @param PHPExcel_Worksheet $parent The new worksheet - * @return void - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - $this->currentCellIsDirty; - $this->storeData(); - - $this->parent = $parent; - if (($this->currentObject !== null) && (is_object($this->currentObject))) { - $this->currentObject->attach($this); - } - } // function copyCellCollection() - - /** - * Remove a row, deleting all cells in that row - * - * @param string $row Row number to remove - * @return void - */ - public function removeRow($row) - { - foreach ($this->getCellList() as $coord) { - sscanf($coord, '%[A-Z]%d', $c, $r); - if ($r == $row) { - $this->deleteCacheData($coord); - } - } - } - - /** - * Remove a column, deleting all cells in that column - * - * @param string $column Column ID to remove - * @return void - */ - public function removeColumn($column) - { - foreach ($this->getCellList() as $coord) { - sscanf($coord, '%[A-Z]%d', $c, $r); - if ($c == $column) { - $this->deleteCacheData($coord); - } - } - } - - /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build - * - * @return boolean - */ - public static function cacheMethodIsAvailable() - { - return true; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php deleted file mode 100644 index 13bc033..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php +++ /dev/null @@ -1,208 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - fseek($this->fileHandle, 0, SEEK_END); - - $this->cellCache[$this->currentObjectID] = array( - 'ptr' => ftell($this->fileHandle), - 'sz' => fwrite($this->fileHandle, serialize($this->currentObject)) - ); - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - // Check if the entry that has been requested actually exists - if (!isset($this->cellCache[$pCoord])) { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - fseek($this->fileHandle, $this->cellCache[$pCoord]['ptr']); - $this->currentObject = unserialize(fread($this->fileHandle, $this->cellCache[$pCoord]['sz'])); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - return parent::getCellList(); - } - - /** - * Clone the cell collection - * - * @param PHPExcel_Worksheet $parent The new worksheet - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - parent::copyCellCollection($parent); - // Get a new id for the new file name - $baseUnique = $this->getUniqueID(); - $newFileName = $this->cacheDirectory.'/PHPExcel.'.$baseUnique.'.cache'; - // Copy the existing cell cache file - copy($this->fileName, $newFileName); - $this->fileName = $newFileName; - // Open the copied cell cache file - $this->fileHandle = fopen($this->fileName, 'a+'); - } - - /** - * Clear the cell collection and disconnect from our parent - * - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - - // Close down the temporary cache file - $this->__destruct(); - } - - /** - * Initialise this new cell collection - * - * @param PHPExcel_Worksheet $parent The worksheet for this cell collection - * @param array of mixed $arguments Additional initialisation arguments - */ - public function __construct(PHPExcel_Worksheet $parent, $arguments) - { - $this->cacheDirectory = ((isset($arguments['dir'])) && ($arguments['dir'] !== null)) - ? $arguments['dir'] - : PHPExcel_Shared_File::sys_get_temp_dir(); - - parent::__construct($parent); - if (is_null($this->fileHandle)) { - $baseUnique = $this->getUniqueID(); - $this->fileName = $this->cacheDirectory.'/PHPExcel.'.$baseUnique.'.cache'; - $this->fileHandle = fopen($this->fileName, 'a+'); - } - } - - /** - * Destroy this cell collection - */ - public function __destruct() - { - if (!is_null($this->fileHandle)) { - fclose($this->fileHandle); - unlink($this->fileName); - } - $this->fileHandle = null; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/ICache.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/ICache.php deleted file mode 100644 index aafef6e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/ICache.php +++ /dev/null @@ -1,103 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - $this->cellCache[$this->currentObjectID] = igbinary_serialize($this->currentObject); - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } // function _storeData() - - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } // function addCacheData() - - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - // Check if the entry that has been requested actually exists - if (!isset($this->cellCache[$pCoord])) { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - $this->currentObject = igbinary_unserialize($this->cellCache[$pCoord]); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } // function getCacheData() - - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - return parent::getCellList(); - } - - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - } // function unsetWorksheetCells() - - - /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build - * - * @return boolean - */ - public static function cacheMethodIsAvailable() - { - if (!function_exists('igbinary_serialize')) { - return false; - } - - return true; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memcache.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memcache.php deleted file mode 100644 index 07942cc..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memcache.php +++ /dev/null @@ -1,308 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - $obj = serialize($this->currentObject); - if (!$this->memcache->replace($this->cachePrefix . $this->currentObjectID . '.cache', $obj, null, $this->cacheTime)) { - if (!$this->memcache->add($this->cachePrefix . $this->currentObjectID . '.cache', $obj, null, $this->cacheTime)) { - $this->__destruct(); - throw new PHPExcel_Exception("Failed to store cell {$this->currentObjectID} in MemCache"); - } - } - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } // function _storeData() - - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - $this->cellCache[$pCoord] = true; - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } // function addCacheData() - - - /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? - * - * @param string $pCoord Coordinate address of the cell to check - * @return boolean - * @return boolean - */ - public function isDataSet($pCoord) - { - // Check if the requested entry is the current object, or exists in the cache - if (parent::isDataSet($pCoord)) { - if ($this->currentObjectID == $pCoord) { - return true; - } - // Check if the requested entry still exists in Memcache - $success = $this->memcache->get($this->cachePrefix.$pCoord.'.cache'); - if ($success === false) { - // Entry no longer exists in Memcache, so clear it from the cache array - parent::deleteCacheData($pCoord); - throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in MemCache'); - } - return true; - } - return false; - } - - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - // Check if the entry that has been requested actually exists - if (parent::isDataSet($pCoord)) { - $obj = $this->memcache->get($this->cachePrefix . $pCoord . '.cache'); - if ($obj === false) { - // Entry no longer exists in Memcache, so clear it from the cache array - parent::deleteCacheData($pCoord); - throw new PHPExcel_Exception("Cell entry {$pCoord} no longer exists in MemCache"); - } - } else { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - $this->currentObject = unserialize($obj); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - return parent::getCellList(); - } - - /** - * Delete a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to delete - * @throws PHPExcel_Exception - */ - public function deleteCacheData($pCoord) - { - // Delete the entry from Memcache - $this->memcache->delete($this->cachePrefix . $pCoord . '.cache'); - - // Delete the entry from our cell address array - parent::deleteCacheData($pCoord); - } - - /** - * Clone the cell collection - * - * @param PHPExcel_Worksheet $parent The new worksheet - * @return void - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - parent::copyCellCollection($parent); - // Get a new id for the new file name - $baseUnique = $this->getUniqueID(); - $newCachePrefix = substr(md5($baseUnique), 0, 8) . '.'; - $cacheList = $this->getCellList(); - foreach ($cacheList as $cellID) { - if ($cellID != $this->currentObjectID) { - $obj = $this->memcache->get($this->cachePrefix.$cellID.'.cache'); - if ($obj === false) { - // Entry no longer exists in Memcache, so clear it from the cache array - parent::deleteCacheData($cellID); - throw new PHPExcel_Exception("Cell entry {$cellID} no longer exists in MemCache"); - } - if (!$this->memcache->add($newCachePrefix . $cellID . '.cache', $obj, null, $this->cacheTime)) { - $this->__destruct(); - throw new PHPExcel_Exception("Failed to store cell {$cellID} in MemCache"); - } - } - } - $this->cachePrefix = $newCachePrefix; - } - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - - // Flush the Memcache cache - $this->__destruct(); - - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - } - - /** - * Initialise this new cell collection - * - * @param PHPExcel_Worksheet $parent The worksheet for this cell collection - * @param array of mixed $arguments Additional initialisation arguments - */ - public function __construct(PHPExcel_Worksheet $parent, $arguments) - { - $memcacheServer = (isset($arguments['memcacheServer'])) ? $arguments['memcacheServer'] : 'localhost'; - $memcachePort = (isset($arguments['memcachePort'])) ? $arguments['memcachePort'] : 11211; - $cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600; - - if (is_null($this->cachePrefix)) { - $baseUnique = $this->getUniqueID(); - $this->cachePrefix = substr(md5($baseUnique), 0, 8) . '.'; - - // Set a new Memcache object and connect to the Memcache server - $this->memcache = new Memcache(); - if (!$this->memcache->addServer($memcacheServer, $memcachePort, false, 50, 5, 5, true, array($this, 'failureCallback'))) { - throw new PHPExcel_Exception("Could not connect to MemCache server at {$memcacheServer}:{$memcachePort}"); - } - $this->cacheTime = $cacheTime; - - parent::__construct($parent); - } - } - - /** - * Memcache error handler - * - * @param string $host Memcache server - * @param integer $port Memcache port - * @throws PHPExcel_Exception - */ - public function failureCallback($host, $port) - { - throw new PHPExcel_Exception("memcache {$host}:{$port} failed"); - } - - /** - * Destroy this cell collection - */ - public function __destruct() - { - $cacheList = $this->getCellList(); - foreach ($cacheList as $cellID) { - $this->memcache->delete($this->cachePrefix.$cellID . '.cache'); - } - } - - /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build - * - * @return boolean - */ - public static function cacheMethodIsAvailable() - { - if (!function_exists('memcache_add')) { - return false; - } - - return true; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memory.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memory.php deleted file mode 100644 index 0e2ea0b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Memory.php +++ /dev/null @@ -1,118 +0,0 @@ -cellCache[$pCoord] = $cell; - - // Set current entry to the new/updated entry - $this->currentObjectID = $pCoord; - - return $cell; - } - - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - // Check if the entry that has been requested actually exists - if (!isset($this->cellCache[$pCoord])) { - $this->currentObjectID = null; - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - - // Return requested entry - return $this->cellCache[$pCoord]; - } - - - /** - * Clone the cell collection - * - * @param PHPExcel_Worksheet $parent The new worksheet - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - parent::copyCellCollection($parent); - - $newCollection = array(); - foreach ($this->cellCache as $k => &$cell) { - $newCollection[$k] = clone $cell; - $newCollection[$k]->attach($this); - } - - $this->cellCache = $newCollection; - } - - /** - * Clear the cell collection and disconnect from our parent - * - */ - public function unsetWorksheetCells() - { - // Because cells are all stored as intact objects in memory, we need to detach each one from the parent - foreach ($this->cellCache as $k => &$cell) { - $cell->detach(); - $this->cellCache[$k] = null; - } - unset($cell); - - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php deleted file mode 100644 index c06ec71..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/MemoryGZip.php +++ /dev/null @@ -1,133 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - $this->cellCache[$this->currentObjectID] = gzdeflate(serialize($this->currentObject)); - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } - - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } - - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - // Check if the entry that has been requested actually exists - if (!isset($this->cellCache[$pCoord])) { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - $this->currentObject = unserialize(gzinflate($this->cellCache[$pCoord])); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - return parent::getCellList(); - } - - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php deleted file mode 100644 index 1332514..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/MemorySerialized.php +++ /dev/null @@ -1,129 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - $this->cellCache[$this->currentObjectID] = serialize($this->currentObject); - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - // Check if the entry that has been requested actually exists - if (!isset($this->cellCache[$pCoord])) { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - $this->currentObject = unserialize($this->cellCache[$pCoord]); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - return parent::getCellList(); - } - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php deleted file mode 100644 index 43c7819..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/PHPTemp.php +++ /dev/null @@ -1,200 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - fseek($this->fileHandle, 0, SEEK_END); - - $this->cellCache[$this->currentObjectID] = array( - 'ptr' => ftell($this->fileHandle), - 'sz' => fwrite($this->fileHandle, serialize($this->currentObject)) - ); - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } - - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } - - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - // Check if the entry that has been requested actually exists - if (!isset($this->cellCache[$pCoord])) { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - fseek($this->fileHandle, $this->cellCache[$pCoord]['ptr']); - $this->currentObject = unserialize(fread($this->fileHandle, $this->cellCache[$pCoord]['sz'])); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - return parent::getCellList(); - } - - /** - * Clone the cell collection - * - * @param PHPExcel_Worksheet $parent The new worksheet - * @return void - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - parent::copyCellCollection($parent); - // Open a new stream for the cell cache data - $newFileHandle = fopen('php://temp/maxmemory:' . $this->memoryCacheSize, 'a+'); - // Copy the existing cell cache data to the new stream - fseek($this->fileHandle, 0); - while (!feof($this->fileHandle)) { - fwrite($newFileHandle, fread($this->fileHandle, 1024)); - } - $this->fileHandle = $newFileHandle; - } - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - - // Close down the php://temp file - $this->__destruct(); - } - - /** - * Initialise this new cell collection - * - * @param PHPExcel_Worksheet $parent The worksheet for this cell collection - * @param array of mixed $arguments Additional initialisation arguments - */ - public function __construct(PHPExcel_Worksheet $parent, $arguments) - { - $this->memoryCacheSize = (isset($arguments['memoryCacheSize'])) ? $arguments['memoryCacheSize'] : '1MB'; - - parent::__construct($parent); - if (is_null($this->fileHandle)) { - $this->fileHandle = fopen('php://temp/maxmemory:' . $this->memoryCacheSize, 'a+'); - } - } - - /** - * Destroy this cell collection - */ - public function __destruct() - { - if (!is_null($this->fileHandle)) { - fclose($this->fileHandle); - } - $this->fileHandle = null; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php deleted file mode 100644 index e7b50c5..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite.php +++ /dev/null @@ -1,307 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - if (!$this->DBHandle->queryExec("INSERT OR REPLACE INTO kvp_".$this->TableName." VALUES('".$this->currentObjectID."','".sqlite_escape_string(serialize($this->currentObject))."')")) { - throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError())); - } - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - $query = "SELECT value FROM kvp_".$this->TableName." WHERE id='".$pCoord."'"; - $cellResultSet = $this->DBHandle->query($query, SQLITE_ASSOC); - if ($cellResultSet === false) { - throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError())); - } elseif ($cellResultSet->numRows() == 0) { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - - $cellResult = $cellResultSet->fetchSingle(); - $this->currentObject = unserialize($cellResult); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - /** - * Is a value set for an indexed cell? - * - * @param string $pCoord Coordinate address of the cell to check - * @return boolean - */ - public function isDataSet($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return true; - } - - // Check if the requested entry exists in the cache - $query = "SELECT id FROM kvp_".$this->TableName." WHERE id='".$pCoord."'"; - $cellResultSet = $this->DBHandle->query($query, SQLITE_ASSOC); - if ($cellResultSet === false) { - throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError())); - } elseif ($cellResultSet->numRows() == 0) { - // Return null if requested entry doesn't exist in cache - return false; - } - return true; - } - - /** - * Delete a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to delete - * @throws PHPExcel_Exception - */ - public function deleteCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - $this->currentObject->detach(); - $this->currentObjectID = $this->currentObject = null; - } - - // Check if the requested entry exists in the cache - $query = "DELETE FROM kvp_".$this->TableName." WHERE id='".$pCoord."'"; - if (!$this->DBHandle->queryExec($query)) { - throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError())); - } - - $this->currentCellIsDirty = false; - } - - /** - * Move a cell object from one address to another - * - * @param string $fromAddress Current address of the cell to move - * @param string $toAddress Destination address of the cell to move - * @return boolean - */ - public function moveCell($fromAddress, $toAddress) - { - if ($fromAddress === $this->currentObjectID) { - $this->currentObjectID = $toAddress; - } - - $query = "DELETE FROM kvp_".$this->TableName." WHERE id='".$toAddress."'"; - $result = $this->DBHandle->exec($query); - if ($result === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - - $query = "UPDATE kvp_".$this->TableName." SET id='".$toAddress."' WHERE id='".$fromAddress."'"; - $result = $this->DBHandle->exec($query); - if ($result === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - - return true; - } - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - $query = "SELECT id FROM kvp_".$this->TableName; - $cellIdsResult = $this->DBHandle->unbufferedQuery($query, SQLITE_ASSOC); - if ($cellIdsResult === false) { - throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError())); - } - - $cellKeys = array(); - foreach ($cellIdsResult as $row) { - $cellKeys[] = $row['id']; - } - - return $cellKeys; - } - - /** - * Clone the cell collection - * - * @param PHPExcel_Worksheet $parent The new worksheet - * @return void - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - $this->currentCellIsDirty; - $this->storeData(); - - // Get a new id for the new table name - $tableName = str_replace('.', '_', $this->getUniqueID()); - if (!$this->DBHandle->queryExec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB) - AS SELECT * FROM kvp_'.$this->TableName) - ) { - throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError())); - } - - // Copy the existing cell cache file - $this->TableName = $tableName; - } - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - - // Close down the temporary cache file - $this->__destruct(); - } - - /** - * Initialise this new cell collection - * - * @param PHPExcel_Worksheet $parent The worksheet for this cell collection - */ - public function __construct(PHPExcel_Worksheet $parent) - { - parent::__construct($parent); - if (is_null($this->DBHandle)) { - $this->TableName = str_replace('.', '_', $this->getUniqueID()); - $_DBName = ':memory:'; - - $this->DBHandle = new SQLiteDatabase($_DBName); - if ($this->DBHandle === false) { - throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError())); - } - if (!$this->DBHandle->queryExec('CREATE TABLE kvp_'.$this->TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) { - throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError())); - } - } - } - - /** - * Destroy this cell collection - */ - public function __destruct() - { - if (!is_null($this->DBHandle)) { - $this->DBHandle->queryExec('DROP TABLE kvp_'.$this->TableName); - } - $this->DBHandle = null; - } - - /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build - * - * @return boolean - */ - public static function cacheMethodIsAvailable() - { - if (!function_exists('sqlite_open')) { - return false; - } - - return true; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite3.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite3.php deleted file mode 100644 index 27473d6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/SQLite3.php +++ /dev/null @@ -1,346 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - $this->insertQuery->bindValue('id', $this->currentObjectID, SQLITE3_TEXT); - $this->insertQuery->bindValue('data', serialize($this->currentObject), SQLITE3_BLOB); - $result = $this->insertQuery->execute(); - if ($result === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - $this->currentCellIsDirty = false; - } - $this->currentObjectID = $this->currentObject = null; - } - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - $this->selectQuery->bindValue('id', $pCoord, SQLITE3_TEXT); - $cellResult = $this->selectQuery->execute(); - if ($cellResult === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - $cellData = $cellResult->fetchArray(SQLITE3_ASSOC); - if ($cellData === false) { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - - $this->currentObject = unserialize($cellData['value']); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - /** - * Is a value set for an indexed cell? - * - * @param string $pCoord Coordinate address of the cell to check - * @return boolean - */ - public function isDataSet($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return true; - } - - // Check if the requested entry exists in the cache - $this->selectQuery->bindValue('id', $pCoord, SQLITE3_TEXT); - $cellResult = $this->selectQuery->execute(); - if ($cellResult === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - $cellData = $cellResult->fetchArray(SQLITE3_ASSOC); - - return ($cellData === false) ? false : true; - } - - /** - * Delete a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to delete - * @throws PHPExcel_Exception - */ - public function deleteCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - $this->currentObject->detach(); - $this->currentObjectID = $this->currentObject = null; - } - - // Check if the requested entry exists in the cache - $this->deleteQuery->bindValue('id', $pCoord, SQLITE3_TEXT); - $result = $this->deleteQuery->execute(); - if ($result === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - - $this->currentCellIsDirty = false; - } - - /** - * Move a cell object from one address to another - * - * @param string $fromAddress Current address of the cell to move - * @param string $toAddress Destination address of the cell to move - * @return boolean - */ - public function moveCell($fromAddress, $toAddress) - { - if ($fromAddress === $this->currentObjectID) { - $this->currentObjectID = $toAddress; - } - - $this->deleteQuery->bindValue('id', $toAddress, SQLITE3_TEXT); - $result = $this->deleteQuery->execute(); - if ($result === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - - $this->updateQuery->bindValue('toid', $toAddress, SQLITE3_TEXT); - $this->updateQuery->bindValue('fromid', $fromAddress, SQLITE3_TEXT); - $result = $this->updateQuery->execute(); - if ($result === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - - return true; - } - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - $query = "SELECT id FROM kvp_".$this->TableName; - $cellIdsResult = $this->DBHandle->query($query); - if ($cellIdsResult === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - - $cellKeys = array(); - while ($row = $cellIdsResult->fetchArray(SQLITE3_ASSOC)) { - $cellKeys[] = $row['id']; - } - - return $cellKeys; - } - - /** - * Clone the cell collection - * - * @param PHPExcel_Worksheet $parent The new worksheet - * @return void - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - $this->currentCellIsDirty; - $this->storeData(); - - // Get a new id for the new table name - $tableName = str_replace('.', '_', $this->getUniqueID()); - if (!$this->DBHandle->exec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB) - AS SELECT * FROM kvp_'.$this->TableName) - ) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - - // Copy the existing cell cache file - $this->TableName = $tableName; - } - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - - // Close down the temporary cache file - $this->__destruct(); - } - - /** - * Initialise this new cell collection - * - * @param PHPExcel_Worksheet $parent The worksheet for this cell collection - */ - public function __construct(PHPExcel_Worksheet $parent) - { - parent::__construct($parent); - if (is_null($this->DBHandle)) { - $this->TableName = str_replace('.', '_', $this->getUniqueID()); - $_DBName = ':memory:'; - - $this->DBHandle = new SQLite3($_DBName); - if ($this->DBHandle === false) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - if (!$this->DBHandle->exec('CREATE TABLE kvp_'.$this->TableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)')) { - throw new PHPExcel_Exception($this->DBHandle->lastErrorMsg()); - } - } - - $this->selectQuery = $this->DBHandle->prepare("SELECT value FROM kvp_".$this->TableName." WHERE id = :id"); - $this->insertQuery = $this->DBHandle->prepare("INSERT OR REPLACE INTO kvp_".$this->TableName." VALUES(:id,:data)"); - $this->updateQuery = $this->DBHandle->prepare("UPDATE kvp_".$this->TableName." SET id=:toId WHERE id=:fromId"); - $this->deleteQuery = $this->DBHandle->prepare("DELETE FROM kvp_".$this->TableName." WHERE id = :id"); - } - - /** - * Destroy this cell collection - */ - public function __destruct() - { - if (!is_null($this->DBHandle)) { - $this->DBHandle->exec('DROP TABLE kvp_'.$this->TableName); - $this->DBHandle->close(); - } - $this->DBHandle = null; - } - - /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build - * - * @return boolean - */ - public static function cacheMethodIsAvailable() - { - if (!class_exists('SQLite3', false)) { - return false; - } - - return true; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Wincache.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Wincache.php deleted file mode 100644 index 1567874..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorage/Wincache.php +++ /dev/null @@ -1,289 +0,0 @@ -currentCellIsDirty && !empty($this->currentObjectID)) { - $this->currentObject->detach(); - - $obj = serialize($this->currentObject); - if (wincache_ucache_exists($this->cachePrefix.$this->currentObjectID.'.cache')) { - if (!wincache_ucache_set($this->cachePrefix.$this->currentObjectID.'.cache', $obj, $this->cacheTime)) { - $this->__destruct(); - throw new PHPExcel_Exception('Failed to store cell '.$this->currentObjectID.' in WinCache'); - } - } else { - if (!wincache_ucache_add($this->cachePrefix.$this->currentObjectID.'.cache', $obj, $this->cacheTime)) { - $this->__destruct(); - throw new PHPExcel_Exception('Failed to store cell '.$this->currentObjectID.' in WinCache'); - } - } - $this->currentCellIsDirty = false; - } - - $this->currentObjectID = $this->currentObject = null; - } - - /** - * Add or Update a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to update - * @param PHPExcel_Cell $cell Cell to update - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function addCacheData($pCoord, PHPExcel_Cell $cell) - { - if (($pCoord !== $this->currentObjectID) && ($this->currentObjectID !== null)) { - $this->storeData(); - } - $this->cellCache[$pCoord] = true; - - $this->currentObjectID = $pCoord; - $this->currentObject = $cell; - $this->currentCellIsDirty = true; - - return $cell; - } - - /** - * Is a value set in the current PHPExcel_CachedObjectStorage_ICache for an indexed cell? - * - * @param string $pCoord Coordinate address of the cell to check - * @return boolean - */ - public function isDataSet($pCoord) - { - // Check if the requested entry is the current object, or exists in the cache - if (parent::isDataSet($pCoord)) { - if ($this->currentObjectID == $pCoord) { - return true; - } - // Check if the requested entry still exists in cache - $success = wincache_ucache_exists($this->cachePrefix.$pCoord.'.cache'); - if ($success === false) { - // Entry no longer exists in Wincache, so clear it from the cache array - parent::deleteCacheData($pCoord); - throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in WinCache'); - } - return true; - } - return false; - } - - - /** - * Get cell at a specific coordinate - * - * @param string $pCoord Coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Cell Cell that was found, or null if not found - */ - public function getCacheData($pCoord) - { - if ($pCoord === $this->currentObjectID) { - return $this->currentObject; - } - $this->storeData(); - - // Check if the entry that has been requested actually exists - $obj = null; - if (parent::isDataSet($pCoord)) { - $success = false; - $obj = wincache_ucache_get($this->cachePrefix.$pCoord.'.cache', $success); - if ($success === false) { - // Entry no longer exists in WinCache, so clear it from the cache array - parent::deleteCacheData($pCoord); - throw new PHPExcel_Exception('Cell entry '.$pCoord.' no longer exists in WinCache'); - } - } else { - // Return null if requested entry doesn't exist in cache - return null; - } - - // Set current entry to the requested entry - $this->currentObjectID = $pCoord; - $this->currentObject = unserialize($obj); - // Re-attach this as the cell's parent - $this->currentObject->attach($this); - - // Return requested entry - return $this->currentObject; - } - - - /** - * Get a list of all cell addresses currently held in cache - * - * @return string[] - */ - public function getCellList() - { - if ($this->currentObjectID !== null) { - $this->storeData(); - } - - return parent::getCellList(); - } - - /** - * Delete a cell in cache identified by coordinate address - * - * @param string $pCoord Coordinate address of the cell to delete - * @throws PHPExcel_Exception - */ - public function deleteCacheData($pCoord) - { - // Delete the entry from Wincache - wincache_ucache_delete($this->cachePrefix.$pCoord.'.cache'); - - // Delete the entry from our cell address array - parent::deleteCacheData($pCoord); - } - - /** - * Clone the cell collection - * - * @param PHPExcel_Worksheet $parent The new worksheet - * @return void - */ - public function copyCellCollection(PHPExcel_Worksheet $parent) - { - parent::copyCellCollection($parent); - // Get a new id for the new file name - $baseUnique = $this->getUniqueID(); - $newCachePrefix = substr(md5($baseUnique), 0, 8) . '.'; - $cacheList = $this->getCellList(); - foreach ($cacheList as $cellID) { - if ($cellID != $this->currentObjectID) { - $success = false; - $obj = wincache_ucache_get($this->cachePrefix.$cellID.'.cache', $success); - if ($success === false) { - // Entry no longer exists in WinCache, so clear it from the cache array - parent::deleteCacheData($cellID); - throw new PHPExcel_Exception('Cell entry '.$cellID.' no longer exists in Wincache'); - } - if (!wincache_ucache_add($newCachePrefix.$cellID.'.cache', $obj, $this->cacheTime)) { - $this->__destruct(); - throw new PHPExcel_Exception('Failed to store cell '.$cellID.' in Wincache'); - } - } - } - $this->cachePrefix = $newCachePrefix; - } - - - /** - * Clear the cell collection and disconnect from our parent - * - * @return void - */ - public function unsetWorksheetCells() - { - if (!is_null($this->currentObject)) { - $this->currentObject->detach(); - $this->currentObject = $this->currentObjectID = null; - } - - // Flush the WinCache cache - $this->__destruct(); - - $this->cellCache = array(); - - // detach ourself from the worksheet, so that it can then delete this object successfully - $this->parent = null; - } - - /** - * Initialise this new cell collection - * - * @param PHPExcel_Worksheet $parent The worksheet for this cell collection - * @param array of mixed $arguments Additional initialisation arguments - */ - public function __construct(PHPExcel_Worksheet $parent, $arguments) - { - $cacheTime = (isset($arguments['cacheTime'])) ? $arguments['cacheTime'] : 600; - - if (is_null($this->cachePrefix)) { - $baseUnique = $this->getUniqueID(); - $this->cachePrefix = substr(md5($baseUnique), 0, 8).'.'; - $this->cacheTime = $cacheTime; - - parent::__construct($parent); - } - } - - /** - * Destroy this cell collection - */ - public function __destruct() - { - $cacheList = $this->getCellList(); - foreach ($cacheList as $cellID) { - wincache_ucache_delete($this->cachePrefix.$cellID.'.cache'); - } - } - - /** - * Identify whether the caching method is currently available - * Some methods are dependent on the availability of certain extensions being enabled in the PHP build - * - * @return boolean - */ - public static function cacheMethodIsAvailable() - { - if (!function_exists('wincache_ucache_add')) { - return false; - } - - return true; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorageFactory.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorageFactory.php deleted file mode 100644 index 0a96978..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CachedObjectStorageFactory.php +++ /dev/null @@ -1,231 +0,0 @@ - array( - ), - self::cache_in_memory_gzip => array( - ), - self::cache_in_memory_serialized => array( - ), - self::cache_igbinary => array( - ), - self::cache_to_phpTemp => array( 'memoryCacheSize' => '1MB' - ), - self::cache_to_discISAM => array( 'dir' => null - ), - self::cache_to_apc => array( 'cacheTime' => 600 - ), - self::cache_to_memcache => array( 'memcacheServer' => 'localhost', - 'memcachePort' => 11211, - 'cacheTime' => 600 - ), - self::cache_to_wincache => array( 'cacheTime' => 600 - ), - self::cache_to_sqlite => array( - ), - self::cache_to_sqlite3 => array( - ), - ); - - /** - * Arguments for the active cache storage method - * - * @var array of mixed array - */ - private static $storageMethodParameters = array(); - - /** - * Return the current cache storage method - * - * @return string|null - **/ - public static function getCacheStorageMethod() - { - return self::$cacheStorageMethod; - } - - /** - * Return the current cache storage class - * - * @return PHPExcel_CachedObjectStorage_ICache|null - **/ - public static function getCacheStorageClass() - { - return self::$cacheStorageClass; - } - - /** - * Return the list of all possible cache storage methods - * - * @return string[] - **/ - public static function getAllCacheStorageMethods() - { - return self::$storageMethods; - } - - /** - * Return the list of all available cache storage methods - * - * @return string[] - **/ - public static function getCacheStorageMethods() - { - $activeMethods = array(); - foreach (self::$storageMethods as $storageMethod) { - $cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $storageMethod; - if (call_user_func(array($cacheStorageClass, 'cacheMethodIsAvailable'))) { - $activeMethods[] = $storageMethod; - } - } - return $activeMethods; - } - - /** - * Identify the cache storage method to use - * - * @param string $method Name of the method to use for cell cacheing - * @param array of mixed $arguments Additional arguments to pass to the cell caching class - * when instantiating - * @return boolean - **/ - public static function initialize($method = self::cache_in_memory, $arguments = array()) - { - if (!in_array($method, self::$storageMethods)) { - return false; - } - - $cacheStorageClass = 'PHPExcel_CachedObjectStorage_'.$method; - if (!call_user_func(array( $cacheStorageClass, - 'cacheMethodIsAvailable'))) { - return false; - } - - self::$storageMethodParameters[$method] = self::$storageMethodDefaultParameters[$method]; - foreach ($arguments as $k => $v) { - if (array_key_exists($k, self::$storageMethodParameters[$method])) { - self::$storageMethodParameters[$method][$k] = $v; - } - } - - if (self::$cacheStorageMethod === null) { - self::$cacheStorageClass = 'PHPExcel_CachedObjectStorage_' . $method; - self::$cacheStorageMethod = $method; - } - return true; - } - - /** - * Initialise the cache storage - * - * @param PHPExcel_Worksheet $parent Enable cell caching for this worksheet - * @return PHPExcel_CachedObjectStorage_ICache - **/ - public static function getInstance(PHPExcel_Worksheet $parent) - { - $cacheMethodIsAvailable = true; - if (self::$cacheStorageMethod === null) { - $cacheMethodIsAvailable = self::initialize(); - } - - if ($cacheMethodIsAvailable) { - $instance = new self::$cacheStorageClass( - $parent, - self::$storageMethodParameters[self::$cacheStorageMethod] - ); - if ($instance !== null) { - return $instance; - } - } - - return false; - } - - /** - * Clear the cache storage - * - **/ - public static function finalize() - { - self::$cacheStorageMethod = null; - self::$cacheStorageClass = null; - self::$storageMethodParameters = array(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CalcEngine/CyclicReferenceStack.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CalcEngine/CyclicReferenceStack.php deleted file mode 100644 index 1072fc7..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CalcEngine/CyclicReferenceStack.php +++ /dev/null @@ -1,94 +0,0 @@ -stack); - } - - /** - * Push a new entry onto the stack - * - * @param mixed $value - */ - public function push($value) - { - $this->stack[$value] = $value; - } - - /** - * Pop the last entry from the stack - * - * @return mixed - */ - public function pop() - { - return array_pop($this->stack); - } - - /** - * Test to see if a specified entry exists on the stack - * - * @param mixed $value The value to test - */ - public function onStack($value) - { - return isset($this->stack[$value]); - } - - /** - * Clear the stack - */ - public function clear() - { - $this->stack = array(); - } - - /** - * Return an array of all entries on the stack - * - * @return mixed[] - */ - public function showStack() - { - return $this->stack; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CalcEngine/Logger.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/CalcEngine/Logger.php deleted file mode 100644 index c5ffe73..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/CalcEngine/Logger.php +++ /dev/null @@ -1,151 +0,0 @@ -cellStack = $stack; - } - - /** - * Enable/Disable Calculation engine logging - * - * @param boolean $pValue - */ - public function setWriteDebugLog($pValue = false) - { - $this->writeDebugLog = $pValue; - } - - /** - * Return whether calculation engine logging is enabled or disabled - * - * @return boolean - */ - public function getWriteDebugLog() - { - return $this->writeDebugLog; - } - - /** - * Enable/Disable echoing of debug log information - * - * @param boolean $pValue - */ - public function setEchoDebugLog($pValue = false) - { - $this->echoDebugLog = $pValue; - } - - /** - * Return whether echoing of debug log information is enabled or disabled - * - * @return boolean - */ - public function getEchoDebugLog() - { - return $this->echoDebugLog; - } - - /** - * Write an entry to the calculation engine debug log - */ - public function writeDebugLog() - { - // Only write the debug log if logging is enabled - if ($this->writeDebugLog) { - $message = implode(func_get_args()); - $cellReference = implode(' -> ', $this->cellStack->showStack()); - if ($this->echoDebugLog) { - echo $cellReference, - ($this->cellStack->count() > 0 ? ' => ' : ''), - $message, - PHP_EOL; - } - $this->debugLog[] = $cellReference . - ($this->cellStack->count() > 0 ? ' => ' : '') . - $message; - } - } - - /** - * Clear the calculation engine debug log - */ - public function clearLog() - { - $this->debugLog = array(); - } - - /** - * Return the calculation engine debug log - * - * @return string[] - */ - public function getLog() - { - return $this->debugLog; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php deleted file mode 100644 index 20b1ec3..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation.php +++ /dev/null @@ -1,4391 +0,0 @@ -=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d{1,7})'); - // Named Range of cells - define('CALCULATION_REGEXP_NAMEDRANGE', '((([^\s,!&%^\/\*\+<>=-]*)|(\'[^\']*\')|(\"[^\"]*\"))!)?([_A-Z][_A-Z0-9\.]*)'); - } else { - // Cell reference (cell or range of cells, with or without a sheet reference) - define('CALCULATION_REGEXP_CELLREF', '(((\w*)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d+)'); - // Named Range of cells - define('CALCULATION_REGEXP_NAMEDRANGE', '(((\w*)|(\'.*\')|(\".*\"))!)?([_A-Z][_A-Z0-9\.]*)'); - } -} - -/** - * PHPExcel_Calculation (Multiton) - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Calculation - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Calculation -{ - /** Constants */ - /** Regular Expressions */ - // Numeric operand - const CALCULATION_REGEXP_NUMBER = '[-+]?\d*\.?\d+(e[-+]?\d+)?'; - // String operand - const CALCULATION_REGEXP_STRING = '"(?:[^"]|"")*"'; - // Opening bracket - const CALCULATION_REGEXP_OPENBRACE = '\('; - // Function (allow for the old @ symbol that could be used to prefix a function, but we'll ignore it) - const CALCULATION_REGEXP_FUNCTION = '@?([A-Z][A-Z0-9\.]*)[\s]*\('; - // Cell reference (cell or range of cells, with or without a sheet reference) - const CALCULATION_REGEXP_CELLREF = CALCULATION_REGEXP_CELLREF; - // Named Range of cells - const CALCULATION_REGEXP_NAMEDRANGE = CALCULATION_REGEXP_NAMEDRANGE; - // Error - const CALCULATION_REGEXP_ERROR = '\#[A-Z][A-Z0_\/]*[!\?]?'; - - - /** constants */ - const RETURN_ARRAY_AS_ERROR = 'error'; - const RETURN_ARRAY_AS_VALUE = 'value'; - const RETURN_ARRAY_AS_ARRAY = 'array'; - - private static $returnArrayAsType = self::RETURN_ARRAY_AS_VALUE; - - - /** - * Instance of this class - * - * @access private - * @var PHPExcel_Calculation - */ - private static $instance; - - - /** - * Instance of the workbook this Calculation Engine is using - * - * @access private - * @var PHPExcel - */ - private $workbook; - - /** - * List of instances of the calculation engine that we've instantiated for individual workbooks - * - * @access private - * @var PHPExcel_Calculation[] - */ - private static $workbookSets; - - /** - * Calculation cache - * - * @access private - * @var array - */ - private $calculationCache = array (); - - - /** - * Calculation cache enabled - * - * @access private - * @var boolean - */ - private $calculationCacheEnabled = true; - - - /** - * List of operators that can be used within formulae - * The true/false value indicates whether it is a binary operator or a unary operator - * - * @access private - * @var array - */ - private static $operators = array( - '+' => true, '-' => true, '*' => true, '/' => true, - '^' => true, '&' => true, '%' => false, '~' => false, - '>' => true, '<' => true, '=' => true, '>=' => true, - '<=' => true, '<>' => true, '|' => true, ':' => true - ); - - /** - * List of binary operators (those that expect two operands) - * - * @access private - * @var array - */ - private static $binaryOperators = array( - '+' => true, '-' => true, '*' => true, '/' => true, - '^' => true, '&' => true, '>' => true, '<' => true, - '=' => true, '>=' => true, '<=' => true, '<>' => true, - '|' => true, ':' => true - ); - - /** - * The debug log generated by the calculation engine - * - * @access private - * @var PHPExcel_CalcEngine_Logger - * - */ - private $debugLog; - - /** - * Flag to determine how formula errors should be handled - * If true, then a user error will be triggered - * If false, then an exception will be thrown - * - * @access public - * @var boolean - * - */ - public $suppressFormulaErrors = false; - - /** - * Error message for any error that was raised/thrown by the calculation engine - * - * @access public - * @var string - * - */ - public $formulaError = null; - - /** - * An array of the nested cell references accessed by the calculation engine, used for the debug log - * - * @access private - * @var array of string - * - */ - private $cyclicReferenceStack; - - private $cellStack = array(); - - /** - * Current iteration counter for cyclic formulae - * If the value is 0 (or less) then cyclic formulae will throw an exception, - * otherwise they will iterate to the limit defined here before returning a result - * - * @var integer - * - */ - private $cyclicFormulaCounter = 1; - - private $cyclicFormulaCell = ''; - - /** - * Number of iterations for cyclic formulae - * - * @var integer - * - */ - public $cyclicFormulaCount = 1; - - /** - * Epsilon Precision used for comparisons in calculations - * - * @var float - * - */ - private $delta = 0.1e-12; - - - /** - * The current locale setting - * - * @var string - * - */ - private static $localeLanguage = 'en_us'; // US English (default locale) - - /** - * List of available locale settings - * Note that this is read for the locale subdirectory only when requested - * - * @var string[] - * - */ - private static $validLocaleLanguages = array( - 'en' // English (default language) - ); - - /** - * Locale-specific argument separator for function arguments - * - * @var string - * - */ - private static $localeArgumentSeparator = ','; - private static $localeFunctions = array(); - - /** - * Locale-specific translations for Excel constants (True, False and Null) - * - * @var string[] - * - */ - public static $localeBoolean = array( - 'TRUE' => 'TRUE', - 'FALSE' => 'FALSE', - 'NULL' => 'NULL' - ); - - /** - * Excel constant string translations to their PHP equivalents - * Constant conversion from text name/value to actual (datatyped) value - * - * @var string[] - * - */ - private static $excelConstants = array( - 'TRUE' => true, - 'FALSE' => false, - 'NULL' => null - ); - - // PHPExcel functions - private static $PHPExcelFunctions = array( - 'ABS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'abs', - 'argumentCount' => '1' - ), - 'ACCRINT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::ACCRINT', - 'argumentCount' => '4-7' - ), - 'ACCRINTM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::ACCRINTM', - 'argumentCount' => '3-5' - ), - 'ACOS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'acos', - 'argumentCount' => '1' - ), - 'ACOSH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'acosh', - 'argumentCount' => '1' - ), - 'ADDRESS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::CELL_ADDRESS', - 'argumentCount' => '2-5' - ), - 'AMORDEGRC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::AMORDEGRC', - 'argumentCount' => '6,7' - ), - 'AMORLINC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::AMORLINC', - 'argumentCount' => '6,7' - ), - 'AND' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOGICAL, - 'functionCall' => 'PHPExcel_Calculation_Logical::LOGICAL_AND', - 'argumentCount' => '1+' - ), - 'AREAS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1' - ), - 'ASC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1' - ), - 'ASIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'asin', - 'argumentCount' => '1' - ), - 'ASINH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'asinh', - 'argumentCount' => '1' - ), - 'ATAN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'atan', - 'argumentCount' => '1' - ), - 'ATAN2' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::ATAN2', - 'argumentCount' => '2' - ), - 'ATANH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'atanh', - 'argumentCount' => '1' - ), - 'AVEDEV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::AVEDEV', - 'argumentCount' => '1+' - ), - 'AVERAGE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::AVERAGE', - 'argumentCount' => '1+' - ), - 'AVERAGEA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::AVERAGEA', - 'argumentCount' => '1+' - ), - 'AVERAGEIF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::AVERAGEIF', - 'argumentCount' => '2,3' - ), - 'AVERAGEIFS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '3+' - ), - 'BAHTTEXT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1' - ), - 'BESSELI' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::BESSELI', - 'argumentCount' => '2' - ), - 'BESSELJ' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::BESSELJ', - 'argumentCount' => '2' - ), - 'BESSELK' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::BESSELK', - 'argumentCount' => '2' - ), - 'BESSELY' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::BESSELY', - 'argumentCount' => '2' - ), - 'BETADIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::BETADIST', - 'argumentCount' => '3-5' - ), - 'BETAINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::BETAINV', - 'argumentCount' => '3-5' - ), - 'BIN2DEC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::BINTODEC', - 'argumentCount' => '1' - ), - 'BIN2HEX' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::BINTOHEX', - 'argumentCount' => '1,2' - ), - 'BIN2OCT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::BINTOOCT', - 'argumentCount' => '1,2' - ), - 'BINOMDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::BINOMDIST', - 'argumentCount' => '4' - ), - 'CEILING' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::CEILING', - 'argumentCount' => '2' - ), - 'CELL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1,2' - ), - 'CHAR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::CHARACTER', - 'argumentCount' => '1' - ), - 'CHIDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::CHIDIST', - 'argumentCount' => '2' - ), - 'CHIINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::CHIINV', - 'argumentCount' => '2' - ), - 'CHITEST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '2' - ), - 'CHOOSE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::CHOOSE', - 'argumentCount' => '2+' - ), - 'CLEAN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::TRIMNONPRINTABLE', - 'argumentCount' => '1' - ), - 'CODE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::ASCIICODE', - 'argumentCount' => '1' - ), - 'COLUMN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::COLUMN', - 'argumentCount' => '-1', - 'passByReference' => array(true) - ), - 'COLUMNS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::COLUMNS', - 'argumentCount' => '1' - ), - 'COMBIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::COMBIN', - 'argumentCount' => '2' - ), - 'COMPLEX' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::COMPLEX', - 'argumentCount' => '2,3' - ), - 'CONCATENATE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::CONCATENATE', - 'argumentCount' => '1+' - ), - 'CONFIDENCE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::CONFIDENCE', - 'argumentCount' => '3' - ), - 'CONVERT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::CONVERTUOM', - 'argumentCount' => '3' - ), - 'CORREL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::CORREL', - 'argumentCount' => '2' - ), - 'COS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'cos', - 'argumentCount' => '1' - ), - 'COSH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'cosh', - 'argumentCount' => '1' - ), - 'COUNT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::COUNT', - 'argumentCount' => '1+' - ), - 'COUNTA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::COUNTA', - 'argumentCount' => '1+' - ), - 'COUNTBLANK' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::COUNTBLANK', - 'argumentCount' => '1' - ), - 'COUNTIF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::COUNTIF', - 'argumentCount' => '2' - ), - 'COUNTIFS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '2' - ), - 'COUPDAYBS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::COUPDAYBS', - 'argumentCount' => '3,4' - ), - 'COUPDAYS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::COUPDAYS', - 'argumentCount' => '3,4' - ), - 'COUPDAYSNC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::COUPDAYSNC', - 'argumentCount' => '3,4' - ), - 'COUPNCD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::COUPNCD', - 'argumentCount' => '3,4' - ), - 'COUPNUM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::COUPNUM', - 'argumentCount' => '3,4' - ), - 'COUPPCD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::COUPPCD', - 'argumentCount' => '3,4' - ), - 'COVAR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::COVAR', - 'argumentCount' => '2' - ), - 'CRITBINOM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::CRITBINOM', - 'argumentCount' => '3' - ), - 'CUBEKPIMEMBER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_CUBE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '?' - ), - 'CUBEMEMBER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_CUBE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '?' - ), - 'CUBEMEMBERPROPERTY' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_CUBE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '?' - ), - 'CUBERANKEDMEMBER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_CUBE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '?' - ), - 'CUBESET' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_CUBE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '?' - ), - 'CUBESETCOUNT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_CUBE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '?' - ), - 'CUBEVALUE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_CUBE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '?' - ), - 'CUMIPMT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::CUMIPMT', - 'argumentCount' => '6' - ), - 'CUMPRINC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::CUMPRINC', - 'argumentCount' => '6' - ), - 'DATE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::DATE', - 'argumentCount' => '3' - ), - 'DATEDIF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::DATEDIF', - 'argumentCount' => '2,3' - ), - 'DATEVALUE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::DATEVALUE', - 'argumentCount' => '1' - ), - 'DAVERAGE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DAVERAGE', - 'argumentCount' => '3' - ), - 'DAY' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::DAYOFMONTH', - 'argumentCount' => '1' - ), - 'DAYS360' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::DAYS360', - 'argumentCount' => '2,3' - ), - 'DB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::DB', - 'argumentCount' => '4,5' - ), - 'DCOUNT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DCOUNT', - 'argumentCount' => '3' - ), - 'DCOUNTA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DCOUNTA', - 'argumentCount' => '3' - ), - 'DDB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::DDB', - 'argumentCount' => '4,5' - ), - 'DEC2BIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::DECTOBIN', - 'argumentCount' => '1,2' - ), - 'DEC2HEX' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::DECTOHEX', - 'argumentCount' => '1,2' - ), - 'DEC2OCT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::DECTOOCT', - 'argumentCount' => '1,2' - ), - 'DEGREES' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'rad2deg', - 'argumentCount' => '1' - ), - 'DELTA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::DELTA', - 'argumentCount' => '1,2' - ), - 'DEVSQ' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::DEVSQ', - 'argumentCount' => '1+' - ), - 'DGET' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DGET', - 'argumentCount' => '3' - ), - 'DISC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::DISC', - 'argumentCount' => '4,5' - ), - 'DMAX' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DMAX', - 'argumentCount' => '3' - ), - 'DMIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DMIN', - 'argumentCount' => '3' - ), - 'DOLLAR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::DOLLAR', - 'argumentCount' => '1,2' - ), - 'DOLLARDE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::DOLLARDE', - 'argumentCount' => '2' - ), - 'DOLLARFR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::DOLLARFR', - 'argumentCount' => '2' - ), - 'DPRODUCT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DPRODUCT', - 'argumentCount' => '3' - ), - 'DSTDEV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DSTDEV', - 'argumentCount' => '3' - ), - 'DSTDEVP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DSTDEVP', - 'argumentCount' => '3' - ), - 'DSUM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DSUM', - 'argumentCount' => '3' - ), - 'DURATION' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '5,6' - ), - 'DVAR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DVAR', - 'argumentCount' => '3' - ), - 'DVARP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATABASE, - 'functionCall' => 'PHPExcel_Calculation_Database::DVARP', - 'argumentCount' => '3' - ), - 'EDATE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::EDATE', - 'argumentCount' => '2' - ), - 'EFFECT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::EFFECT', - 'argumentCount' => '2' - ), - 'EOMONTH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::EOMONTH', - 'argumentCount' => '2' - ), - 'ERF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::ERF', - 'argumentCount' => '1,2' - ), - 'ERFC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::ERFC', - 'argumentCount' => '1' - ), - 'ERROR.TYPE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::ERROR_TYPE', - 'argumentCount' => '1' - ), - 'EVEN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::EVEN', - 'argumentCount' => '1' - ), - 'EXACT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '2' - ), - 'EXP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'exp', - 'argumentCount' => '1' - ), - 'EXPONDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::EXPONDIST', - 'argumentCount' => '3' - ), - 'FACT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::FACT', - 'argumentCount' => '1' - ), - 'FACTDOUBLE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::FACTDOUBLE', - 'argumentCount' => '1' - ), - 'FALSE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOGICAL, - 'functionCall' => 'PHPExcel_Calculation_Logical::FALSE', - 'argumentCount' => '0' - ), - 'FDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '3' - ), - 'FIND' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::SEARCHSENSITIVE', - 'argumentCount' => '2,3' - ), - 'FINDB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::SEARCHSENSITIVE', - 'argumentCount' => '2,3' - ), - 'FINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '3' - ), - 'FISHER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::FISHER', - 'argumentCount' => '1' - ), - 'FISHERINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::FISHERINV', - 'argumentCount' => '1' - ), - 'FIXED' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::FIXEDFORMAT', - 'argumentCount' => '1-3' - ), - 'FLOOR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::FLOOR', - 'argumentCount' => '2' - ), - 'FORECAST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::FORECAST', - 'argumentCount' => '3' - ), - 'FREQUENCY' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '2' - ), - 'FTEST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '2' - ), - 'FV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::FV', - 'argumentCount' => '3-5' - ), - 'FVSCHEDULE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::FVSCHEDULE', - 'argumentCount' => '2' - ), - 'GAMMADIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::GAMMADIST', - 'argumentCount' => '4' - ), - 'GAMMAINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::GAMMAINV', - 'argumentCount' => '3' - ), - 'GAMMALN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::GAMMALN', - 'argumentCount' => '1' - ), - 'GCD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::GCD', - 'argumentCount' => '1+' - ), - 'GEOMEAN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::GEOMEAN', - 'argumentCount' => '1+' - ), - 'GESTEP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::GESTEP', - 'argumentCount' => '1,2' - ), - 'GETPIVOTDATA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '2+' - ), - 'GROWTH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::GROWTH', - 'argumentCount' => '1-4' - ), - 'HARMEAN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::HARMEAN', - 'argumentCount' => '1+' - ), - 'HEX2BIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::HEXTOBIN', - 'argumentCount' => '1,2' - ), - 'HEX2DEC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::HEXTODEC', - 'argumentCount' => '1' - ), - 'HEX2OCT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::HEXTOOCT', - 'argumentCount' => '1,2' - ), - 'HLOOKUP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::HLOOKUP', - 'argumentCount' => '3,4' - ), - 'HOUR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::HOUROFDAY', - 'argumentCount' => '1' - ), - 'HYPERLINK' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::HYPERLINK', - 'argumentCount' => '1,2', - 'passCellReference' => true - ), - 'HYPGEOMDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::HYPGEOMDIST', - 'argumentCount' => '4' - ), - 'IF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOGICAL, - 'functionCall' => 'PHPExcel_Calculation_Logical::STATEMENT_IF', - 'argumentCount' => '1-3' - ), - 'IFERROR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOGICAL, - 'functionCall' => 'PHPExcel_Calculation_Logical::IFERROR', - 'argumentCount' => '2' - ), - 'IMABS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMABS', - 'argumentCount' => '1' - ), - 'IMAGINARY' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMAGINARY', - 'argumentCount' => '1' - ), - 'IMARGUMENT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMARGUMENT', - 'argumentCount' => '1' - ), - 'IMCONJUGATE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMCONJUGATE', - 'argumentCount' => '1' - ), - 'IMCOS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMCOS', - 'argumentCount' => '1' - ), - 'IMDIV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMDIV', - 'argumentCount' => '2' - ), - 'IMEXP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMEXP', - 'argumentCount' => '1' - ), - 'IMLN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMLN', - 'argumentCount' => '1' - ), - 'IMLOG10' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMLOG10', - 'argumentCount' => '1' - ), - 'IMLOG2' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMLOG2', - 'argumentCount' => '1' - ), - 'IMPOWER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMPOWER', - 'argumentCount' => '2' - ), - 'IMPRODUCT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMPRODUCT', - 'argumentCount' => '1+' - ), - 'IMREAL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMREAL', - 'argumentCount' => '1' - ), - 'IMSIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMSIN', - 'argumentCount' => '1' - ), - 'IMSQRT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMSQRT', - 'argumentCount' => '1' - ), - 'IMSUB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMSUB', - 'argumentCount' => '2' - ), - 'IMSUM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::IMSUM', - 'argumentCount' => '1+' - ), - 'INDEX' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::INDEX', - 'argumentCount' => '1-4' - ), - 'INDIRECT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::INDIRECT', - 'argumentCount' => '1,2', - 'passCellReference' => true - ), - 'INFO' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1' - ), - 'INT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::INT', - 'argumentCount' => '1' - ), - 'INTERCEPT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::INTERCEPT', - 'argumentCount' => '2' - ), - 'INTRATE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::INTRATE', - 'argumentCount' => '4,5' - ), - 'IPMT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::IPMT', - 'argumentCount' => '4-6' - ), - 'IRR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::IRR', - 'argumentCount' => '1,2' - ), - 'ISBLANK' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_BLANK', - 'argumentCount' => '1' - ), - 'ISERR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_ERR', - 'argumentCount' => '1' - ), - 'ISERROR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_ERROR', - 'argumentCount' => '1' - ), - 'ISEVEN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_EVEN', - 'argumentCount' => '1' - ), - 'ISLOGICAL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_LOGICAL', - 'argumentCount' => '1' - ), - 'ISNA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_NA', - 'argumentCount' => '1' - ), - 'ISNONTEXT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_NONTEXT', - 'argumentCount' => '1' - ), - 'ISNUMBER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_NUMBER', - 'argumentCount' => '1' - ), - 'ISODD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_ODD', - 'argumentCount' => '1' - ), - 'ISPMT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::ISPMT', - 'argumentCount' => '4' - ), - 'ISREF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1' - ), - 'ISTEXT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::IS_TEXT', - 'argumentCount' => '1' - ), - 'JIS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1' - ), - 'KURT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::KURT', - 'argumentCount' => '1+' - ), - 'LARGE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::LARGE', - 'argumentCount' => '2' - ), - 'LCM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::LCM', - 'argumentCount' => '1+' - ), - 'LEFT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::LEFT', - 'argumentCount' => '1,2' - ), - 'LEFTB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::LEFT', - 'argumentCount' => '1,2' - ), - 'LEN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::STRINGLENGTH', - 'argumentCount' => '1' - ), - 'LENB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::STRINGLENGTH', - 'argumentCount' => '1' - ), - 'LINEST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::LINEST', - 'argumentCount' => '1-4' - ), - 'LN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'log', - 'argumentCount' => '1' - ), - 'LOG' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::LOG_BASE', - 'argumentCount' => '1,2' - ), - 'LOG10' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'log10', - 'argumentCount' => '1' - ), - 'LOGEST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::LOGEST', - 'argumentCount' => '1-4' - ), - 'LOGINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::LOGINV', - 'argumentCount' => '3' - ), - 'LOGNORMDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::LOGNORMDIST', - 'argumentCount' => '3' - ), - 'LOOKUP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::LOOKUP', - 'argumentCount' => '2,3' - ), - 'LOWER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::LOWERCASE', - 'argumentCount' => '1' - ), - 'MATCH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::MATCH', - 'argumentCount' => '2,3' - ), - 'MAX' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::MAX', - 'argumentCount' => '1+' - ), - 'MAXA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::MAXA', - 'argumentCount' => '1+' - ), - 'MAXIF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::MAXIF', - 'argumentCount' => '2+' - ), - 'MDETERM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::MDETERM', - 'argumentCount' => '1' - ), - 'MDURATION' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '5,6' - ), - 'MEDIAN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::MEDIAN', - 'argumentCount' => '1+' - ), - 'MEDIANIF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '2+' - ), - 'MID' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::MID', - 'argumentCount' => '3' - ), - 'MIDB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::MID', - 'argumentCount' => '3' - ), - 'MIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::MIN', - 'argumentCount' => '1+' - ), - 'MINA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::MINA', - 'argumentCount' => '1+' - ), - 'MINIF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::MINIF', - 'argumentCount' => '2+' - ), - 'MINUTE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::MINUTEOFHOUR', - 'argumentCount' => '1' - ), - 'MINVERSE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::MINVERSE', - 'argumentCount' => '1' - ), - 'MIRR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::MIRR', - 'argumentCount' => '3' - ), - 'MMULT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::MMULT', - 'argumentCount' => '2' - ), - 'MOD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::MOD', - 'argumentCount' => '2' - ), - 'MODE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::MODE', - 'argumentCount' => '1+' - ), - 'MONTH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::MONTHOFYEAR', - 'argumentCount' => '1' - ), - 'MROUND' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::MROUND', - 'argumentCount' => '2' - ), - 'MULTINOMIAL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::MULTINOMIAL', - 'argumentCount' => '1+' - ), - 'N' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::N', - 'argumentCount' => '1' - ), - 'NA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::NA', - 'argumentCount' => '0' - ), - 'NEGBINOMDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::NEGBINOMDIST', - 'argumentCount' => '3' - ), - 'NETWORKDAYS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::NETWORKDAYS', - 'argumentCount' => '2+' - ), - 'NOMINAL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::NOMINAL', - 'argumentCount' => '2' - ), - 'NORMDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::NORMDIST', - 'argumentCount' => '4' - ), - 'NORMINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::NORMINV', - 'argumentCount' => '3' - ), - 'NORMSDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::NORMSDIST', - 'argumentCount' => '1' - ), - 'NORMSINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::NORMSINV', - 'argumentCount' => '1' - ), - 'NOT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOGICAL, - 'functionCall' => 'PHPExcel_Calculation_Logical::NOT', - 'argumentCount' => '1' - ), - 'NOW' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::DATETIMENOW', - 'argumentCount' => '0' - ), - 'NPER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::NPER', - 'argumentCount' => '3-5' - ), - 'NPV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::NPV', - 'argumentCount' => '2+' - ), - 'OCT2BIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::OCTTOBIN', - 'argumentCount' => '1,2' - ), - 'OCT2DEC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::OCTTODEC', - 'argumentCount' => '1' - ), - 'OCT2HEX' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_ENGINEERING, - 'functionCall' => 'PHPExcel_Calculation_Engineering::OCTTOHEX', - 'argumentCount' => '1,2' - ), - 'ODD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::ODD', - 'argumentCount' => '1' - ), - 'ODDFPRICE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '8,9' - ), - 'ODDFYIELD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '8,9' - ), - 'ODDLPRICE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '7,8' - ), - 'ODDLYIELD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '7,8' - ), - 'OFFSET' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::OFFSET', - 'argumentCount' => '3-5', - 'passCellReference' => true, - 'passByReference' => array(true) - ), - 'OR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOGICAL, - 'functionCall' => 'PHPExcel_Calculation_Logical::LOGICAL_OR', - 'argumentCount' => '1+' - ), - 'PEARSON' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::CORREL', - 'argumentCount' => '2' - ), - 'PERCENTILE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::PERCENTILE', - 'argumentCount' => '2' - ), - 'PERCENTRANK' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::PERCENTRANK', - 'argumentCount' => '2,3' - ), - 'PERMUT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::PERMUT', - 'argumentCount' => '2' - ), - 'PHONETIC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1' - ), - 'PI' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'pi', - 'argumentCount' => '0' - ), - 'PMT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::PMT', - 'argumentCount' => '3-5' - ), - 'POISSON' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::POISSON', - 'argumentCount' => '3' - ), - 'POWER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::POWER', - 'argumentCount' => '2' - ), - 'PPMT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::PPMT', - 'argumentCount' => '4-6' - ), - 'PRICE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::PRICE', - 'argumentCount' => '6,7' - ), - 'PRICEDISC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::PRICEDISC', - 'argumentCount' => '4,5' - ), - 'PRICEMAT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::PRICEMAT', - 'argumentCount' => '5,6' - ), - 'PROB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '3,4' - ), - 'PRODUCT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::PRODUCT', - 'argumentCount' => '1+' - ), - 'PROPER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::PROPERCASE', - 'argumentCount' => '1' - ), - 'PV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::PV', - 'argumentCount' => '3-5' - ), - 'QUARTILE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::QUARTILE', - 'argumentCount' => '2' - ), - 'QUOTIENT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::QUOTIENT', - 'argumentCount' => '2' - ), - 'RADIANS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'deg2rad', - 'argumentCount' => '1' - ), - 'RAND' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::RAND', - 'argumentCount' => '0' - ), - 'RANDBETWEEN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::RAND', - 'argumentCount' => '2' - ), - 'RANK' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::RANK', - 'argumentCount' => '2,3' - ), - 'RATE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::RATE', - 'argumentCount' => '3-6' - ), - 'RECEIVED' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::RECEIVED', - 'argumentCount' => '4-5' - ), - 'REPLACE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::REPLACE', - 'argumentCount' => '4' - ), - 'REPLACEB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::REPLACE', - 'argumentCount' => '4' - ), - 'REPT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'str_repeat', - 'argumentCount' => '2' - ), - 'RIGHT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::RIGHT', - 'argumentCount' => '1,2' - ), - 'RIGHTB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::RIGHT', - 'argumentCount' => '1,2' - ), - 'ROMAN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::ROMAN', - 'argumentCount' => '1,2' - ), - 'ROUND' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'round', - 'argumentCount' => '2' - ), - 'ROUNDDOWN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::ROUNDDOWN', - 'argumentCount' => '2' - ), - 'ROUNDUP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::ROUNDUP', - 'argumentCount' => '2' - ), - 'ROW' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::ROW', - 'argumentCount' => '-1', - 'passByReference' => array(true) - ), - 'ROWS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::ROWS', - 'argumentCount' => '1' - ), - 'RSQ' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::RSQ', - 'argumentCount' => '2' - ), - 'RTD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '1+' - ), - 'SEARCH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::SEARCHINSENSITIVE', - 'argumentCount' => '2,3' - ), - 'SEARCHB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::SEARCHINSENSITIVE', - 'argumentCount' => '2,3' - ), - 'SECOND' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::SECONDOFMINUTE', - 'argumentCount' => '1' - ), - 'SERIESSUM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SERIESSUM', - 'argumentCount' => '4' - ), - 'SIGN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SIGN', - 'argumentCount' => '1' - ), - 'SIN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'sin', - 'argumentCount' => '1' - ), - 'SINH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'sinh', - 'argumentCount' => '1' - ), - 'SKEW' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::SKEW', - 'argumentCount' => '1+' - ), - 'SLN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::SLN', - 'argumentCount' => '3' - ), - 'SLOPE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::SLOPE', - 'argumentCount' => '2' - ), - 'SMALL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::SMALL', - 'argumentCount' => '2' - ), - 'SQRT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'sqrt', - 'argumentCount' => '1' - ), - 'SQRTPI' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SQRTPI', - 'argumentCount' => '1' - ), - 'STANDARDIZE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::STANDARDIZE', - 'argumentCount' => '3' - ), - 'STDEV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::STDEV', - 'argumentCount' => '1+' - ), - 'STDEVA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::STDEVA', - 'argumentCount' => '1+' - ), - 'STDEVP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::STDEVP', - 'argumentCount' => '1+' - ), - 'STDEVPA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::STDEVPA', - 'argumentCount' => '1+' - ), - 'STEYX' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::STEYX', - 'argumentCount' => '2' - ), - 'SUBSTITUTE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::SUBSTITUTE', - 'argumentCount' => '3,4' - ), - 'SUBTOTAL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUBTOTAL', - 'argumentCount' => '2+' - ), - 'SUM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUM', - 'argumentCount' => '1+' - ), - 'SUMIF' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUMIF', - 'argumentCount' => '2,3' - ), - 'SUMIFS' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUMIFS', - 'argumentCount' => '3+' - ), - 'SUMPRODUCT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUMPRODUCT', - 'argumentCount' => '1+' - ), - 'SUMSQ' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUMSQ', - 'argumentCount' => '1+' - ), - 'SUMX2MY2' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUMX2MY2', - 'argumentCount' => '2' - ), - 'SUMX2PY2' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUMX2PY2', - 'argumentCount' => '2' - ), - 'SUMXMY2' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::SUMXMY2', - 'argumentCount' => '2' - ), - 'SYD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::SYD', - 'argumentCount' => '4' - ), - 'T' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::RETURNSTRING', - 'argumentCount' => '1' - ), - 'TAN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'tan', - 'argumentCount' => '1' - ), - 'TANH' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'tanh', - 'argumentCount' => '1' - ), - 'TBILLEQ' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::TBILLEQ', - 'argumentCount' => '3' - ), - 'TBILLPRICE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::TBILLPRICE', - 'argumentCount' => '3' - ), - 'TBILLYIELD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::TBILLYIELD', - 'argumentCount' => '3' - ), - 'TDIST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::TDIST', - 'argumentCount' => '3' - ), - 'TEXT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::TEXTFORMAT', - 'argumentCount' => '2' - ), - 'TIME' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::TIME', - 'argumentCount' => '3' - ), - 'TIMEVALUE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::TIMEVALUE', - 'argumentCount' => '1' - ), - 'TINV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::TINV', - 'argumentCount' => '2' - ), - 'TODAY' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::DATENOW', - 'argumentCount' => '0' - ), - 'TRANSPOSE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::TRANSPOSE', - 'argumentCount' => '1' - ), - 'TREND' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::TREND', - 'argumentCount' => '1-4' - ), - 'TRIM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::TRIMSPACES', - 'argumentCount' => '1' - ), - 'TRIMMEAN' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::TRIMMEAN', - 'argumentCount' => '2' - ), - 'TRUE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOGICAL, - 'functionCall' => 'PHPExcel_Calculation_Logical::TRUE', - 'argumentCount' => '0' - ), - 'TRUNC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_MATH_AND_TRIG, - 'functionCall' => 'PHPExcel_Calculation_MathTrig::TRUNC', - 'argumentCount' => '1,2' - ), - 'TTEST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '4' - ), - 'TYPE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::TYPE', - 'argumentCount' => '1' - ), - 'UPPER' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::UPPERCASE', - 'argumentCount' => '1' - ), - 'USDOLLAR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '2' - ), - 'VALUE' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_TEXT_AND_DATA, - 'functionCall' => 'PHPExcel_Calculation_TextData::VALUE', - 'argumentCount' => '1' - ), - 'VAR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::VARFunc', - 'argumentCount' => '1+' - ), - 'VARA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::VARA', - 'argumentCount' => '1+' - ), - 'VARP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::VARP', - 'argumentCount' => '1+' - ), - 'VARPA' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::VARPA', - 'argumentCount' => '1+' - ), - 'VDB' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '5-7' - ), - 'VERSION' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_INFORMATION, - 'functionCall' => 'PHPExcel_Calculation_Functions::VERSION', - 'argumentCount' => '0' - ), - 'VLOOKUP' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_LOOKUP_AND_REFERENCE, - 'functionCall' => 'PHPExcel_Calculation_LookupRef::VLOOKUP', - 'argumentCount' => '3,4' - ), - 'WEEKDAY' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::DAYOFWEEK', - 'argumentCount' => '1,2' - ), - 'WEEKNUM' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::WEEKOFYEAR', - 'argumentCount' => '1,2' - ), - 'WEIBULL' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::WEIBULL', - 'argumentCount' => '4' - ), - 'WORKDAY' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::WORKDAY', - 'argumentCount' => '2+' - ), - 'XIRR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::XIRR', - 'argumentCount' => '2,3' - ), - 'XNPV' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::XNPV', - 'argumentCount' => '3' - ), - 'YEAR' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::YEAR', - 'argumentCount' => '1' - ), - 'YEARFRAC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_DATE_AND_TIME, - 'functionCall' => 'PHPExcel_Calculation_DateTime::YEARFRAC', - 'argumentCount' => '2,3' - ), - 'YIELD' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Functions::DUMMY', - 'argumentCount' => '6,7' - ), - 'YIELDDISC' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::YIELDDISC', - 'argumentCount' => '4,5' - ), - 'YIELDMAT' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_FINANCIAL, - 'functionCall' => 'PHPExcel_Calculation_Financial::YIELDMAT', - 'argumentCount' => '5,6' - ), - 'ZTEST' => array( - 'category' => PHPExcel_Calculation_Function::CATEGORY_STATISTICAL, - 'functionCall' => 'PHPExcel_Calculation_Statistical::ZTEST', - 'argumentCount' => '2-3' - ) - ); - - // Internal functions used for special control purposes - private static $controlFunctions = array( - 'MKMATRIX' => array( - 'argumentCount' => '*', - 'functionCall' => 'self::mkMatrix' - ) - ); - - - public function __construct(PHPExcel $workbook = null) - { - $this->delta = 1 * pow(10, 0 - ini_get('precision')); - - $this->workbook = $workbook; - $this->cyclicReferenceStack = new PHPExcel_CalcEngine_CyclicReferenceStack(); - $this->_debugLog = new PHPExcel_CalcEngine_Logger($this->cyclicReferenceStack); - } - - - private static function loadLocales() - { - $localeFileDirectory = PHPEXCEL_ROOT.'PHPExcel/locale/'; - foreach (glob($localeFileDirectory.'/*', GLOB_ONLYDIR) as $filename) { - $filename = substr($filename, strlen($localeFileDirectory)+1); - if ($filename != 'en') { - self::$validLocaleLanguages[] = $filename; - } - } - } - - /** - * Get an instance of this class - * - * @access public - * @param PHPExcel $workbook Injected workbook for working with a PHPExcel object, - * or NULL to create a standalone claculation engine - * @return PHPExcel_Calculation - */ - public static function getInstance(PHPExcel $workbook = null) - { - if ($workbook !== null) { - $instance = $workbook->getCalculationEngine(); - if (isset($instance)) { - return $instance; - } - } - - if (!isset(self::$instance) || (self::$instance === null)) { - self::$instance = new PHPExcel_Calculation(); - } - return self::$instance; - } - - /** - * Unset an instance of this class - * - * @access public - */ - public function __destruct() - { - $this->workbook = null; - } - - /** - * Flush the calculation cache for any existing instance of this class - * but only if a PHPExcel_Calculation instance exists - * - * @access public - * @return null - */ - public function flushInstance() - { - $this->clearCalculationCache(); - } - - - /** - * Get the debuglog for this claculation engine instance - * - * @access public - * @return PHPExcel_CalcEngine_Logger - */ - public function getDebugLog() - { - return $this->_debugLog; - } - - /** - * __clone implementation. Cloning should not be allowed in a Singleton! - * - * @access public - * @throws PHPExcel_Calculation_Exception - */ - final public function __clone() - { - throw new PHPExcel_Calculation_Exception('Cloning the calculation engine is not allowed!'); - } - - - /** - * Return the locale-specific translation of TRUE - * - * @access public - * @return string locale-specific translation of TRUE - */ - public static function getTRUE() - { - return self::$localeBoolean['TRUE']; - } - - /** - * Return the locale-specific translation of FALSE - * - * @access public - * @return string locale-specific translation of FALSE - */ - public static function getFALSE() - { - return self::$localeBoolean['FALSE']; - } - - /** - * Set the Array Return Type (Array or Value of first element in the array) - * - * @access public - * @param string $returnType Array return type - * @return boolean Success or failure - */ - public static function setArrayReturnType($returnType) - { - if (($returnType == self::RETURN_ARRAY_AS_VALUE) || - ($returnType == self::RETURN_ARRAY_AS_ERROR) || - ($returnType == self::RETURN_ARRAY_AS_ARRAY)) { - self::$returnArrayAsType = $returnType; - return true; - } - return false; - } - - - /** - * Return the Array Return Type (Array or Value of first element in the array) - * - * @access public - * @return string $returnType Array return type - */ - public static function getArrayReturnType() - { - return self::$returnArrayAsType; - } - - - /** - * Is calculation caching enabled? - * - * @access public - * @return boolean - */ - public function getCalculationCacheEnabled() - { - return $this->calculationCacheEnabled; - } - - /** - * Enable/disable calculation cache - * - * @access public - * @param boolean $pValue - */ - public function setCalculationCacheEnabled($pValue = true) - { - $this->calculationCacheEnabled = $pValue; - $this->clearCalculationCache(); - } - - - /** - * Enable calculation cache - */ - public function enableCalculationCache() - { - $this->setCalculationCacheEnabled(true); - } - - - /** - * Disable calculation cache - */ - public function disableCalculationCache() - { - $this->setCalculationCacheEnabled(false); - } - - - /** - * Clear calculation cache - */ - public function clearCalculationCache() - { - $this->calculationCache = array(); - } - - /** - * Clear calculation cache for a specified worksheet - * - * @param string $worksheetName - */ - public function clearCalculationCacheForWorksheet($worksheetName) - { - if (isset($this->calculationCache[$worksheetName])) { - unset($this->calculationCache[$worksheetName]); - } - } - - /** - * Rename calculation cache for a specified worksheet - * - * @param string $fromWorksheetName - * @param string $toWorksheetName - */ - public function renameCalculationCacheForWorksheet($fromWorksheetName, $toWorksheetName) - { - if (isset($this->calculationCache[$fromWorksheetName])) { - $this->calculationCache[$toWorksheetName] = &$this->calculationCache[$fromWorksheetName]; - unset($this->calculationCache[$fromWorksheetName]); - } - } - - - /** - * Get the currently defined locale code - * - * @return string - */ - public function getLocale() - { - return self::$localeLanguage; - } - - - /** - * Set the locale code - * - * @param string $locale The locale to use for formula translation - * @return boolean - */ - public function setLocale($locale = 'en_us') - { - // Identify our locale and language - $language = $locale = strtolower($locale); - if (strpos($locale, '_') !== false) { - list($language) = explode('_', $locale); - } - - if (count(self::$validLocaleLanguages) == 1) { - self::loadLocales(); - } - // Test whether we have any language data for this language (any locale) - if (in_array($language, self::$validLocaleLanguages)) { - // initialise language/locale settings - self::$localeFunctions = array(); - self::$localeArgumentSeparator = ','; - self::$localeBoolean = array('TRUE' => 'TRUE', 'FALSE' => 'FALSE', 'NULL' => 'NULL'); - // Default is English, if user isn't requesting english, then read the necessary data from the locale files - if ($locale != 'en_us') { - // Search for a file with a list of function names for locale - $functionNamesFile = PHPEXCEL_ROOT . 'PHPExcel'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $locale).DIRECTORY_SEPARATOR.'functions'; - if (!file_exists($functionNamesFile)) { - // If there isn't a locale specific function file, look for a language specific function file - $functionNamesFile = PHPEXCEL_ROOT . 'PHPExcel'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.$language.DIRECTORY_SEPARATOR.'functions'; - if (!file_exists($functionNamesFile)) { - return false; - } - } - // Retrieve the list of locale or language specific function names - $localeFunctions = file($functionNamesFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - foreach ($localeFunctions as $localeFunction) { - list($localeFunction) = explode('##', $localeFunction); // Strip out comments - if (strpos($localeFunction, '=') !== false) { - list($fName, $lfName) = explode('=', $localeFunction); - $fName = trim($fName); - $lfName = trim($lfName); - if ((isset(self::$PHPExcelFunctions[$fName])) && ($lfName != '') && ($fName != $lfName)) { - self::$localeFunctions[$fName] = $lfName; - } - } - } - // Default the TRUE and FALSE constants to the locale names of the TRUE() and FALSE() functions - if (isset(self::$localeFunctions['TRUE'])) { - self::$localeBoolean['TRUE'] = self::$localeFunctions['TRUE']; - } - if (isset(self::$localeFunctions['FALSE'])) { - self::$localeBoolean['FALSE'] = self::$localeFunctions['FALSE']; - } - - $configFile = PHPEXCEL_ROOT . 'PHPExcel'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $locale).DIRECTORY_SEPARATOR.'config'; - if (!file_exists($configFile)) { - $configFile = PHPEXCEL_ROOT . 'PHPExcel'.DIRECTORY_SEPARATOR.'locale'.DIRECTORY_SEPARATOR.$language.DIRECTORY_SEPARATOR.'config'; - } - if (file_exists($configFile)) { - $localeSettings = file($configFile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - foreach ($localeSettings as $localeSetting) { - list($localeSetting) = explode('##', $localeSetting); // Strip out comments - if (strpos($localeSetting, '=') !== false) { - list($settingName, $settingValue) = explode('=', $localeSetting); - $settingName = strtoupper(trim($settingName)); - switch ($settingName) { - case 'ARGUMENTSEPARATOR': - self::$localeArgumentSeparator = trim($settingValue); - break; - } - } - } - } - } - - self::$functionReplaceFromExcel = self::$functionReplaceToExcel = - self::$functionReplaceFromLocale = self::$functionReplaceToLocale = null; - self::$localeLanguage = $locale; - return true; - } - return false; - } - - - - public static function translateSeparator($fromSeparator, $toSeparator, $formula, &$inBraces) - { - $strlen = mb_strlen($formula); - for ($i = 0; $i < $strlen; ++$i) { - $chr = mb_substr($formula, $i, 1); - switch ($chr) { - case '{': - $inBraces = true; - break; - case '}': - $inBraces = false; - break; - case $fromSeparator: - if (!$inBraces) { - $formula = mb_substr($formula, 0, $i).$toSeparator.mb_substr($formula, $i+1); - } - } - } - return $formula; - } - - private static function translateFormula($from, $to, $formula, $fromSeparator, $toSeparator) - { - // Convert any Excel function names to the required language - if (self::$localeLanguage !== 'en_us') { - $inBraces = false; - // If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators - if (strpos($formula, '"') !== false) { - // So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded - // the formula - $temp = explode('"', $formula); - $i = false; - foreach ($temp as &$value) { - // Only count/replace in alternating array entries - if ($i = !$i) { - $value = preg_replace($from, $to, $value); - $value = self::translateSeparator($fromSeparator, $toSeparator, $value, $inBraces); - } - } - unset($value); - // Then rebuild the formula string - $formula = implode('"', $temp); - } else { - // If there's no quoted strings, then we do a simple count/replace - $formula = preg_replace($from, $to, $formula); - $formula = self::translateSeparator($fromSeparator, $toSeparator, $formula, $inBraces); - } - } - - return $formula; - } - - private static $functionReplaceFromExcel = null; - private static $functionReplaceToLocale = null; - - public function _translateFormulaToLocale($formula) - { - if (self::$functionReplaceFromExcel === null) { - self::$functionReplaceFromExcel = array(); - foreach (array_keys(self::$localeFunctions) as $excelFunctionName) { - self::$functionReplaceFromExcel[] = '/(@?[^\w\.])'.preg_quote($excelFunctionName).'([\s]*\()/Ui'; - } - foreach (array_keys(self::$localeBoolean) as $excelBoolean) { - self::$functionReplaceFromExcel[] = '/(@?[^\w\.])'.preg_quote($excelBoolean).'([^\w\.])/Ui'; - } - - } - - if (self::$functionReplaceToLocale === null) { - self::$functionReplaceToLocale = array(); - foreach (array_values(self::$localeFunctions) as $localeFunctionName) { - self::$functionReplaceToLocale[] = '$1'.trim($localeFunctionName).'$2'; - } - foreach (array_values(self::$localeBoolean) as $localeBoolean) { - self::$functionReplaceToLocale[] = '$1'.trim($localeBoolean).'$2'; - } - } - - return self::translateFormula(self::$functionReplaceFromExcel, self::$functionReplaceToLocale, $formula, ',', self::$localeArgumentSeparator); - } - - - private static $functionReplaceFromLocale = null; - private static $functionReplaceToExcel = null; - - public function _translateFormulaToEnglish($formula) - { - if (self::$functionReplaceFromLocale === null) { - self::$functionReplaceFromLocale = array(); - foreach (array_values(self::$localeFunctions) as $localeFunctionName) { - self::$functionReplaceFromLocale[] = '/(@?[^\w\.])'.preg_quote($localeFunctionName).'([\s]*\()/Ui'; - } - foreach (array_values(self::$localeBoolean) as $excelBoolean) { - self::$functionReplaceFromLocale[] = '/(@?[^\w\.])'.preg_quote($excelBoolean).'([^\w\.])/Ui'; - } - } - - if (self::$functionReplaceToExcel === null) { - self::$functionReplaceToExcel = array(); - foreach (array_keys(self::$localeFunctions) as $excelFunctionName) { - self::$functionReplaceToExcel[] = '$1'.trim($excelFunctionName).'$2'; - } - foreach (array_keys(self::$localeBoolean) as $excelBoolean) { - self::$functionReplaceToExcel[] = '$1'.trim($excelBoolean).'$2'; - } - } - - return self::translateFormula(self::$functionReplaceFromLocale, self::$functionReplaceToExcel, $formula, self::$localeArgumentSeparator, ','); - } - - - public static function localeFunc($function) - { - if (self::$localeLanguage !== 'en_us') { - $functionName = trim($function, '('); - if (isset(self::$localeFunctions[$functionName])) { - $brace = ($functionName != $function); - $function = self::$localeFunctions[$functionName]; - if ($brace) { - $function .= '('; - } - } - } - return $function; - } - - - - - /** - * Wrap string values in quotes - * - * @param mixed $value - * @return mixed - */ - public static function wrapResult($value) - { - if (is_string($value)) { - // Error values cannot be "wrapped" - if (preg_match('/^'.self::CALCULATION_REGEXP_ERROR.'$/i', $value, $match)) { - // Return Excel errors "as is" - return $value; - } - // Return strings wrapped in quotes - return '"'.$value.'"'; - // Convert numeric errors to NaN error - } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) { - return PHPExcel_Calculation_Functions::NaN(); - } - - return $value; - } - - - /** - * Remove quotes used as a wrapper to identify string values - * - * @param mixed $value - * @return mixed - */ - public static function unwrapResult($value) - { - if (is_string($value)) { - if ((isset($value{0})) && ($value{0} == '"') && (substr($value, -1) == '"')) { - return substr($value, 1, -1); - } - // Convert numeric errors to NaN error - } elseif ((is_float($value)) && ((is_nan($value)) || (is_infinite($value)))) { - return PHPExcel_Calculation_Functions::NaN(); - } - return $value; - } - - - - - /** - * Calculate cell value (using formula from a cell ID) - * Retained for backward compatibility - * - * @access public - * @param PHPExcel_Cell $pCell Cell to calculate - * @return mixed - * @throws PHPExcel_Calculation_Exception - */ - public function calculate(PHPExcel_Cell $pCell = null) - { - try { - return $this->calculateCellValue($pCell); - } catch (PHPExcel_Exception $e) { - throw new PHPExcel_Calculation_Exception($e->getMessage()); - } - } - - - /** - * Calculate the value of a cell formula - * - * @access public - * @param PHPExcel_Cell $pCell Cell to calculate - * @param Boolean $resetLog Flag indicating whether the debug log should be reset or not - * @return mixed - * @throws PHPExcel_Calculation_Exception - */ - public function calculateCellValue(PHPExcel_Cell $pCell = null, $resetLog = true) - { - if ($pCell === null) { - return null; - } - - $returnArrayAsType = self::$returnArrayAsType; - if ($resetLog) { - // Initialise the logging settings if requested - $this->formulaError = null; - $this->_debugLog->clearLog(); - $this->cyclicReferenceStack->clear(); - $this->cyclicFormulaCounter = 1; - - self::$returnArrayAsType = self::RETURN_ARRAY_AS_ARRAY; - } - - // Execute the calculation for the cell formula - $this->cellStack[] = array( - 'sheet' => $pCell->getWorksheet()->getTitle(), - 'cell' => $pCell->getCoordinate(), - ); - try { - $result = self::unwrapResult($this->_calculateFormulaValue($pCell->getValue(), $pCell->getCoordinate(), $pCell)); - $cellAddress = array_pop($this->cellStack); - $this->workbook->getSheetByName($cellAddress['sheet'])->getCell($cellAddress['cell']); - } catch (PHPExcel_Exception $e) { - $cellAddress = array_pop($this->cellStack); - $this->workbook->getSheetByName($cellAddress['sheet'])->getCell($cellAddress['cell']); - throw new PHPExcel_Calculation_Exception($e->getMessage()); - } - - if ((is_array($result)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) { - self::$returnArrayAsType = $returnArrayAsType; - $testResult = PHPExcel_Calculation_Functions::flattenArray($result); - if (self::$returnArrayAsType == self::RETURN_ARRAY_AS_ERROR) { - return PHPExcel_Calculation_Functions::VALUE(); - } - // If there's only a single cell in the array, then we allow it - if (count($testResult) != 1) { - // If keys are numeric, then it's a matrix result rather than a cell range result, so we permit it - $r = array_keys($result); - $r = array_shift($r); - if (!is_numeric($r)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_array($result[$r])) { - $c = array_keys($result[$r]); - $c = array_shift($c); - if (!is_numeric($c)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - } - $result = array_shift($testResult); - } - self::$returnArrayAsType = $returnArrayAsType; - - - if ($result === null) { - return 0; - } elseif ((is_float($result)) && ((is_nan($result)) || (is_infinite($result)))) { - return PHPExcel_Calculation_Functions::NaN(); - } - return $result; - } - - - /** - * Validate and parse a formula string - * - * @param string $formula Formula to parse - * @return array - * @throws PHPExcel_Calculation_Exception - */ - public function parseFormula($formula) - { - // Basic validation that this is indeed a formula - // We return an empty array if not - $formula = trim($formula); - if ((!isset($formula{0})) || ($formula{0} != '=')) { - return array(); - } - $formula = ltrim(substr($formula, 1)); - if (!isset($formula{0})) { - return array(); - } - - // Parse the formula and return the token stack - return $this->_parseFormula($formula); - } - - - /** - * Calculate the value of a formula - * - * @param string $formula Formula to parse - * @param string $cellID Address of the cell to calculate - * @param PHPExcel_Cell $pCell Cell to calculate - * @return mixed - * @throws PHPExcel_Calculation_Exception - */ - public function calculateFormula($formula, $cellID = null, PHPExcel_Cell $pCell = null) - { - // Initialise the logging settings - $this->formulaError = null; - $this->_debugLog->clearLog(); - $this->cyclicReferenceStack->clear(); - - if ($this->workbook !== null && $cellID === null && $pCell === null) { - $cellID = 'A1'; - $pCell = $this->workbook->getActiveSheet()->getCell($cellID); - } else { - // Disable calculation cacheing because it only applies to cell calculations, not straight formulae - // But don't actually flush any cache - $resetCache = $this->getCalculationCacheEnabled(); - $this->calculationCacheEnabled = false; - } - - // Execute the calculation - try { - $result = self::unwrapResult($this->_calculateFormulaValue($formula, $cellID, $pCell)); - } catch (PHPExcel_Exception $e) { - throw new PHPExcel_Calculation_Exception($e->getMessage()); - } - - if ($this->workbook === null) { - // Reset calculation cacheing to its previous state - $this->calculationCacheEnabled = $resetCache; - } - - return $result; - } - - - public function getValueFromCache($cellReference, &$cellValue) - { - // Is calculation cacheing enabled? - // Is the value present in calculation cache? - $this->_debugLog->writeDebugLog('Testing cache value for cell ', $cellReference); - if (($this->calculationCacheEnabled) && (isset($this->calculationCache[$cellReference]))) { - $this->_debugLog->writeDebugLog('Retrieving value for cell ', $cellReference, ' from cache'); - // Return the cached result - $cellValue = $this->calculationCache[$cellReference]; - return true; - } - return false; - } - - public function saveValueToCache($cellReference, $cellValue) - { - if ($this->calculationCacheEnabled) { - $this->calculationCache[$cellReference] = $cellValue; - } - } - - /** - * Parse a cell formula and calculate its value - * - * @param string $formula The formula to parse and calculate - * @param string $cellID The ID (e.g. A3) of the cell that we are calculating - * @param PHPExcel_Cell $pCell Cell to calculate - * @return mixed - * @throws PHPExcel_Calculation_Exception - */ - public function _calculateFormulaValue($formula, $cellID = null, PHPExcel_Cell $pCell = null) - { - $cellValue = null; - - // Basic validation that this is indeed a formula - // We simply return the cell value if not - $formula = trim($formula); - if ($formula{0} != '=') { - return self::wrapResult($formula); - } - $formula = ltrim(substr($formula, 1)); - if (!isset($formula{0})) { - return self::wrapResult($formula); - } - - $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null; - $wsTitle = ($pCellParent !== null) ? $pCellParent->getTitle() : "\x00Wrk"; - $wsCellReference = $wsTitle . '!' . $cellID; - - if (($cellID !== null) && ($this->getValueFromCache($wsCellReference, $cellValue))) { - return $cellValue; - } - - if (($wsTitle{0} !== "\x00") && ($this->cyclicReferenceStack->onStack($wsCellReference))) { - if ($this->cyclicFormulaCount <= 0) { - $this->cyclicFormulaCell = ''; - return $this->raiseFormulaError('Cyclic Reference in Formula'); - } elseif ($this->cyclicFormulaCell === $wsCellReference) { - ++$this->cyclicFormulaCounter; - if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) { - $this->cyclicFormulaCell = ''; - return $cellValue; - } - } elseif ($this->cyclicFormulaCell == '') { - if ($this->cyclicFormulaCounter >= $this->cyclicFormulaCount) { - return $cellValue; - } - $this->cyclicFormulaCell = $wsCellReference; - } - } - - // Parse the formula onto the token stack and calculate the value - $this->cyclicReferenceStack->push($wsCellReference); - $cellValue = $this->processTokenStack($this->_parseFormula($formula, $pCell), $cellID, $pCell); - $this->cyclicReferenceStack->pop(); - - // Save to calculation cache - if ($cellID !== null) { - $this->saveValueToCache($wsCellReference, $cellValue); - } - - // Return the calculated value - return $cellValue; - } - - - /** - * Ensure that paired matrix operands are both matrices and of the same size - * - * @param mixed &$operand1 First matrix operand - * @param mixed &$operand2 Second matrix operand - * @param integer $resize Flag indicating whether the matrices should be resized to match - * and (if so), whether the smaller dimension should grow or the - * larger should shrink. - * 0 = no resize - * 1 = shrink to fit - * 2 = extend to fit - */ - private static function checkMatrixOperands(&$operand1, &$operand2, $resize = 1) - { - // Examine each of the two operands, and turn them into an array if they aren't one already - // Note that this function should only be called if one or both of the operand is already an array - if (!is_array($operand1)) { - list($matrixRows, $matrixColumns) = self::getMatrixDimensions($operand2); - $operand1 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand1)); - $resize = 0; - } elseif (!is_array($operand2)) { - list($matrixRows, $matrixColumns) = self::getMatrixDimensions($operand1); - $operand2 = array_fill(0, $matrixRows, array_fill(0, $matrixColumns, $operand2)); - $resize = 0; - } - - list($matrix1Rows, $matrix1Columns) = self::getMatrixDimensions($operand1); - list($matrix2Rows, $matrix2Columns) = self::getMatrixDimensions($operand2); - if (($matrix1Rows == $matrix2Columns) && ($matrix2Rows == $matrix1Columns)) { - $resize = 1; - } - - if ($resize == 2) { - // Given two matrices of (potentially) unequal size, convert the smaller in each dimension to match the larger - self::resizeMatricesExtend($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); - } elseif ($resize == 1) { - // Given two matrices of (potentially) unequal size, convert the larger in each dimension to match the smaller - self::resizeMatricesShrink($operand1, $operand2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); - } - return array( $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns); - } - - - /** - * Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0 - * - * @param mixed &$matrix matrix operand - * @return array An array comprising the number of rows, and number of columns - */ - private static function getMatrixDimensions(&$matrix) - { - $matrixRows = count($matrix); - $matrixColumns = 0; - foreach ($matrix as $rowKey => $rowValue) { - $matrixColumns = max(count($rowValue), $matrixColumns); - if (!is_array($rowValue)) { - $matrix[$rowKey] = array($rowValue); - } else { - $matrix[$rowKey] = array_values($rowValue); - } - } - $matrix = array_values($matrix); - return array($matrixRows, $matrixColumns); - } - - - /** - * Ensure that paired matrix operands are both matrices of the same size - * - * @param mixed &$matrix1 First matrix operand - * @param mixed &$matrix2 Second matrix operand - * @param integer $matrix1Rows Row size of first matrix operand - * @param integer $matrix1Columns Column size of first matrix operand - * @param integer $matrix2Rows Row size of second matrix operand - * @param integer $matrix2Columns Column size of second matrix operand - */ - private static function resizeMatricesShrink(&$matrix1, &$matrix2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns) - { - if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { - if ($matrix2Rows < $matrix1Rows) { - for ($i = $matrix2Rows; $i < $matrix1Rows; ++$i) { - unset($matrix1[$i]); - } - } - if ($matrix2Columns < $matrix1Columns) { - for ($i = 0; $i < $matrix1Rows; ++$i) { - for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) { - unset($matrix1[$i][$j]); - } - } - } - } - - if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) { - if ($matrix1Rows < $matrix2Rows) { - for ($i = $matrix1Rows; $i < $matrix2Rows; ++$i) { - unset($matrix2[$i]); - } - } - if ($matrix1Columns < $matrix2Columns) { - for ($i = 0; $i < $matrix2Rows; ++$i) { - for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) { - unset($matrix2[$i][$j]); - } - } - } - } - } - - - /** - * Ensure that paired matrix operands are both matrices of the same size - * - * @param mixed &$matrix1 First matrix operand - * @param mixed &$matrix2 Second matrix operand - * @param integer $matrix1Rows Row size of first matrix operand - * @param integer $matrix1Columns Column size of first matrix operand - * @param integer $matrix2Rows Row size of second matrix operand - * @param integer $matrix2Columns Column size of second matrix operand - */ - private static function resizeMatricesExtend(&$matrix1, &$matrix2, $matrix1Rows, $matrix1Columns, $matrix2Rows, $matrix2Columns) - { - if (($matrix2Columns < $matrix1Columns) || ($matrix2Rows < $matrix1Rows)) { - if ($matrix2Columns < $matrix1Columns) { - for ($i = 0; $i < $matrix2Rows; ++$i) { - $x = $matrix2[$i][$matrix2Columns-1]; - for ($j = $matrix2Columns; $j < $matrix1Columns; ++$j) { - $matrix2[$i][$j] = $x; - } - } - } - if ($matrix2Rows < $matrix1Rows) { - $x = $matrix2[$matrix2Rows-1]; - for ($i = 0; $i < $matrix1Rows; ++$i) { - $matrix2[$i] = $x; - } - } - } - - if (($matrix1Columns < $matrix2Columns) || ($matrix1Rows < $matrix2Rows)) { - if ($matrix1Columns < $matrix2Columns) { - for ($i = 0; $i < $matrix1Rows; ++$i) { - $x = $matrix1[$i][$matrix1Columns-1]; - for ($j = $matrix1Columns; $j < $matrix2Columns; ++$j) { - $matrix1[$i][$j] = $x; - } - } - } - if ($matrix1Rows < $matrix2Rows) { - $x = $matrix1[$matrix1Rows-1]; - for ($i = 0; $i < $matrix2Rows; ++$i) { - $matrix1[$i] = $x; - } - } - } - } - - - /** - * Format details of an operand for display in the log (based on operand type) - * - * @param mixed $value First matrix operand - * @return mixed - */ - private function showValue($value) - { - if ($this->_debugLog->getWriteDebugLog()) { - $testArray = PHPExcel_Calculation_Functions::flattenArray($value); - if (count($testArray) == 1) { - $value = array_pop($testArray); - } - - if (is_array($value)) { - $returnMatrix = array(); - $pad = $rpad = ', '; - foreach ($value as $row) { - if (is_array($row)) { - $returnMatrix[] = implode($pad, array_map(array($this, 'showValue'), $row)); - $rpad = '; '; - } else { - $returnMatrix[] = $this->showValue($row); - } - } - return '{ '.implode($rpad, $returnMatrix).' }'; - } elseif (is_string($value) && (trim($value, '"') == $value)) { - return '"'.$value.'"'; - } elseif (is_bool($value)) { - return ($value) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; - } - } - return PHPExcel_Calculation_Functions::flattenSingleValue($value); - } - - - /** - * Format type and details of an operand for display in the log (based on operand type) - * - * @param mixed $value First matrix operand - * @return mixed - */ - private function showTypeDetails($value) - { - if ($this->_debugLog->getWriteDebugLog()) { - $testArray = PHPExcel_Calculation_Functions::flattenArray($value); - if (count($testArray) == 1) { - $value = array_pop($testArray); - } - - if ($value === null) { - return 'a NULL value'; - } elseif (is_float($value)) { - $typeString = 'a floating point number'; - } elseif (is_int($value)) { - $typeString = 'an integer number'; - } elseif (is_bool($value)) { - $typeString = 'a boolean'; - } elseif (is_array($value)) { - $typeString = 'a matrix'; - } else { - if ($value == '') { - return 'an empty string'; - } elseif ($value{0} == '#') { - return 'a '.$value.' error'; - } else { - $typeString = 'a string'; - } - } - return $typeString.' with a value of '.$this->showValue($value); - } - } - - - private function convertMatrixReferences($formula) - { - static $matrixReplaceFrom = array('{', ';', '}'); - static $matrixReplaceTo = array('MKMATRIX(MKMATRIX(', '),MKMATRIX(', '))'); - - // Convert any Excel matrix references to the MKMATRIX() function - if (strpos($formula, '{') !== false) { - // If there is the possibility of braces within a quoted string, then we don't treat those as matrix indicators - if (strpos($formula, '"') !== false) { - // So instead we skip replacing in any quoted strings by only replacing in every other array element after we've exploded - // the formula - $temp = explode('"', $formula); - // Open and Closed counts used for trapping mismatched braces in the formula - $openCount = $closeCount = 0; - $i = false; - foreach ($temp as &$value) { - // Only count/replace in alternating array entries - if ($i = !$i) { - $openCount += substr_count($value, '{'); - $closeCount += substr_count($value, '}'); - $value = str_replace($matrixReplaceFrom, $matrixReplaceTo, $value); - } - } - unset($value); - // Then rebuild the formula string - $formula = implode('"', $temp); - } else { - // If there's no quoted strings, then we do a simple count/replace - $openCount = substr_count($formula, '{'); - $closeCount = substr_count($formula, '}'); - $formula = str_replace($matrixReplaceFrom, $matrixReplaceTo, $formula); - } - // Trap for mismatched braces and trigger an appropriate error - if ($openCount < $closeCount) { - if ($openCount > 0) { - return $this->raiseFormulaError("Formula Error: Mismatched matrix braces '}'"); - } else { - return $this->raiseFormulaError("Formula Error: Unexpected '}' encountered"); - } - } elseif ($openCount > $closeCount) { - if ($closeCount > 0) { - return $this->raiseFormulaError("Formula Error: Mismatched matrix braces '{'"); - } else { - return $this->raiseFormulaError("Formula Error: Unexpected '{' encountered"); - } - } - } - - return $formula; - } - - - private static function mkMatrix() - { - return func_get_args(); - } - - - // Binary Operators - // These operators always work on two values - // Array key is the operator, the value indicates whether this is a left or right associative operator - private static $operatorAssociativity = array( - '^' => 0, // Exponentiation - '*' => 0, '/' => 0, // Multiplication and Division - '+' => 0, '-' => 0, // Addition and Subtraction - '&' => 0, // Concatenation - '|' => 0, ':' => 0, // Intersect and Range - '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0 // Comparison - ); - - // Comparison (Boolean) Operators - // These operators work on two values, but always return a boolean result - private static $comparisonOperators = array('>' => true, '<' => true, '=' => true, '>=' => true, '<=' => true, '<>' => true); - - // Operator Precedence - // This list includes all valid operators, whether binary (including boolean) or unary (such as %) - // Array key is the operator, the value is its precedence - private static $operatorPrecedence = array( - ':' => 8, // Range - '|' => 7, // Intersect - '~' => 6, // Negation - '%' => 5, // Percentage - '^' => 4, // Exponentiation - '*' => 3, '/' => 3, // Multiplication and Division - '+' => 2, '-' => 2, // Addition and Subtraction - '&' => 1, // Concatenation - '>' => 0, '<' => 0, '=' => 0, '>=' => 0, '<=' => 0, '<>' => 0 // Comparison - ); - - // Convert infix to postfix notation - private function _parseFormula($formula, PHPExcel_Cell $pCell = null) - { - if (($formula = $this->convertMatrixReferences(trim($formula))) === false) { - return false; - } - - // If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent worksheet), - // so we store the parent worksheet so that we can re-attach it when necessary - $pCellParent = ($pCell !== null) ? $pCell->getWorksheet() : null; - - $regexpMatchString = '/^('.self::CALCULATION_REGEXP_FUNCTION. - '|'.self::CALCULATION_REGEXP_CELLREF. - '|'.self::CALCULATION_REGEXP_NUMBER. - '|'.self::CALCULATION_REGEXP_STRING. - '|'.self::CALCULATION_REGEXP_OPENBRACE. - '|'.self::CALCULATION_REGEXP_NAMEDRANGE. - '|'.self::CALCULATION_REGEXP_ERROR. - ')/si'; - - // Start with initialisation - $index = 0; - $stack = new PHPExcel_Calculation_Token_Stack; - $output = array(); - $expectingOperator = false; // We use this test in syntax-checking the expression to determine when a - // - is a negation or + is a positive operator rather than an operation - $expectingOperand = false; // We use this test in syntax-checking the expression to determine whether an operand - // should be null in a function call - // The guts of the lexical parser - // Loop through the formula extracting each operator and operand in turn - while (true) { -//echo 'Assessing Expression '.substr($formula, $index), PHP_EOL; - $opCharacter = $formula{$index}; // Get the first character of the value at the current index position -//echo 'Initial character of expression block is '.$opCharacter, PHP_EOL; - if ((isset(self::$comparisonOperators[$opCharacter])) && (strlen($formula) > $index) && (isset(self::$comparisonOperators[$formula{$index+1}]))) { - $opCharacter .= $formula{++$index}; -//echo 'Initial character of expression block is comparison operator '.$opCharacter.PHP_EOL; - } - - // Find out if we're currently at the beginning of a number, variable, cell reference, function, parenthesis or operand - $isOperandOrFunction = preg_match($regexpMatchString, substr($formula, $index), $match); -//echo '$isOperandOrFunction is '.(($isOperandOrFunction) ? 'True' : 'False').PHP_EOL; -//var_dump($match); - - if ($opCharacter == '-' && !$expectingOperator) { // Is it a negation instead of a minus? -//echo 'Element is a Negation operator', PHP_EOL; - $stack->push('Unary Operator', '~'); // Put a negation on the stack - ++$index; // and drop the negation symbol - } elseif ($opCharacter == '%' && $expectingOperator) { -//echo 'Element is a Percentage operator', PHP_EOL; - $stack->push('Unary Operator', '%'); // Put a percentage on the stack - ++$index; - } elseif ($opCharacter == '+' && !$expectingOperator) { // Positive (unary plus rather than binary operator plus) can be discarded? -//echo 'Element is a Positive number, not Plus operator', PHP_EOL; - ++$index; // Drop the redundant plus symbol - } elseif ((($opCharacter == '~') || ($opCharacter == '|')) && (!$isOperandOrFunction)) { // We have to explicitly deny a tilde or pipe, because they are legal - return $this->raiseFormulaError("Formula Error: Illegal character '~'"); // on the stack but not in the input expression - - } elseif ((isset(self::$operators[$opCharacter]) or $isOperandOrFunction) && $expectingOperator) { // Are we putting an operator on the stack? -//echo 'Element with value '.$opCharacter.' is an Operator', PHP_EOL; - while ($stack->count() > 0 && - ($o2 = $stack->last()) && - isset(self::$operators[$o2['value']]) && - @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])) { - $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output - } - $stack->push('Binary Operator', $opCharacter); // Finally put our current operator onto the stack - ++$index; - $expectingOperator = false; - - } elseif ($opCharacter == ')' && $expectingOperator) { // Are we expecting to close a parenthesis? -//echo 'Element is a Closing bracket', PHP_EOL; - $expectingOperand = false; - while (($o2 = $stack->pop()) && $o2['value'] != '(') { // Pop off the stack back to the last ( - if ($o2 === null) { - return $this->raiseFormulaError('Formula Error: Unexpected closing brace ")"'); - } else { - $output[] = $o2; - } - } - $d = $stack->last(2); - if (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $d['value'], $matches)) { // Did this parenthesis just close a function? - $functionName = $matches[1]; // Get the function name -//echo 'Closed Function is '.$functionName, PHP_EOL; - $d = $stack->pop(); - $argumentCount = $d['value']; // See how many arguments there were (argument count is the next value stored on the stack) -//if ($argumentCount == 0) { -// echo 'With no arguments', PHP_EOL; -//} elseif ($argumentCount == 1) { -// echo 'With 1 argument', PHP_EOL; -//} else { -// echo 'With '.$argumentCount.' arguments', PHP_EOL; -//} - $output[] = $d; // Dump the argument count on the output - $output[] = $stack->pop(); // Pop the function and push onto the output - if (isset(self::$controlFunctions[$functionName])) { -//echo 'Built-in function '.$functionName, PHP_EOL; - $expectedArgumentCount = self::$controlFunctions[$functionName]['argumentCount']; - $functionCall = self::$controlFunctions[$functionName]['functionCall']; - } elseif (isset(self::$PHPExcelFunctions[$functionName])) { -//echo 'PHPExcel function '.$functionName, PHP_EOL; - $expectedArgumentCount = self::$PHPExcelFunctions[$functionName]['argumentCount']; - $functionCall = self::$PHPExcelFunctions[$functionName]['functionCall']; - } else { // did we somehow push a non-function on the stack? this should never happen - return $this->raiseFormulaError("Formula Error: Internal error, non-function on stack"); - } - // Check the argument count - $argumentCountError = false; - if (is_numeric($expectedArgumentCount)) { - if ($expectedArgumentCount < 0) { -//echo '$expectedArgumentCount is between 0 and '.abs($expectedArgumentCount), PHP_EOL; - if ($argumentCount > abs($expectedArgumentCount)) { - $argumentCountError = true; - $expectedArgumentCountString = 'no more than '.abs($expectedArgumentCount); - } - } else { -//echo '$expectedArgumentCount is numeric '.$expectedArgumentCount, PHP_EOL; - if ($argumentCount != $expectedArgumentCount) { - $argumentCountError = true; - $expectedArgumentCountString = $expectedArgumentCount; - } - } - } elseif ($expectedArgumentCount != '*') { - $isOperandOrFunction = preg_match('/(\d*)([-+,])(\d*)/', $expectedArgumentCount, $argMatch); -//print_r($argMatch); -//echo PHP_EOL; - switch ($argMatch[2]) { - case '+': - if ($argumentCount < $argMatch[1]) { - $argumentCountError = true; - $expectedArgumentCountString = $argMatch[1].' or more '; - } - break; - case '-': - if (($argumentCount < $argMatch[1]) || ($argumentCount > $argMatch[3])) { - $argumentCountError = true; - $expectedArgumentCountString = 'between '.$argMatch[1].' and '.$argMatch[3]; - } - break; - case ',': - if (($argumentCount != $argMatch[1]) && ($argumentCount != $argMatch[3])) { - $argumentCountError = true; - $expectedArgumentCountString = 'either '.$argMatch[1].' or '.$argMatch[3]; - } - break; - } - } - if ($argumentCountError) { - return $this->raiseFormulaError("Formula Error: Wrong number of arguments for $functionName() function: $argumentCount given, ".$expectedArgumentCountString." expected"); - } - } - ++$index; - - } elseif ($opCharacter == ',') { // Is this the separator for function arguments? -//echo 'Element is a Function argument separator', PHP_EOL; - while (($o2 = $stack->pop()) && $o2['value'] != '(') { // Pop off the stack back to the last ( - if ($o2 === null) { - return $this->raiseFormulaError("Formula Error: Unexpected ,"); - } else { - $output[] = $o2; // pop the argument expression stuff and push onto the output - } - } - // If we've a comma when we're expecting an operand, then what we actually have is a null operand; - // so push a null onto the stack - if (($expectingOperand) || (!$expectingOperator)) { - $output[] = array('type' => 'NULL Value', 'value' => self::$excelConstants['NULL'], 'reference' => null); - } - // make sure there was a function - $d = $stack->last(2); - if (!preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $d['value'], $matches)) { - return $this->raiseFormulaError("Formula Error: Unexpected ,"); - } - $d = $stack->pop(); - $stack->push($d['type'], ++$d['value'], $d['reference']); // increment the argument count - $stack->push('Brace', '('); // put the ( back on, we'll need to pop back to it again - $expectingOperator = false; - $expectingOperand = true; - ++$index; - - } elseif ($opCharacter == '(' && !$expectingOperator) { -// echo 'Element is an Opening Bracket
    '; - $stack->push('Brace', '('); - ++$index; - - } elseif ($isOperandOrFunction && !$expectingOperator) { // do we now have a function/variable/number? - $expectingOperator = true; - $expectingOperand = false; - $val = $match[1]; - $length = strlen($val); -// echo 'Element with value '.$val.' is an Operand, Variable, Constant, String, Number, Cell Reference or Function
    '; - - if (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $val, $matches)) { - $val = preg_replace('/\s/u', '', $val); -// echo 'Element '.$val.' is a Function
    '; - if (isset(self::$PHPExcelFunctions[strtoupper($matches[1])]) || isset(self::$controlFunctions[strtoupper($matches[1])])) { // it's a function - $stack->push('Function', strtoupper($val)); - $ax = preg_match('/^\s*(\s*\))/ui', substr($formula, $index+$length), $amatch); - if ($ax) { - $stack->push('Operand Count for Function '.strtoupper($val).')', 0); - $expectingOperator = true; - } else { - $stack->push('Operand Count for Function '.strtoupper($val).')', 1); - $expectingOperator = false; - } - $stack->push('Brace', '('); - } else { // it's a var w/ implicit multiplication - $output[] = array('type' => 'Value', 'value' => $matches[1], 'reference' => null); - } - } elseif (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $val, $matches)) { -// echo 'Element '.$val.' is a Cell reference
    '; - // Watch for this case-change when modifying to allow cell references in different worksheets... - // Should only be applied to the actual cell column, not the worksheet name - - // If the last entry on the stack was a : operator, then we have a cell range reference - $testPrevOp = $stack->last(1); - if ($testPrevOp['value'] == ':') { - // If we have a worksheet reference, then we're playing with a 3D reference - if ($matches[2] == '') { - // Otherwise, we 'inherit' the worksheet reference from the start cell reference - // The start of the cell range reference should be the last entry in $output - $startCellRef = $output[count($output)-1]['value']; - preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $startCellRef, $startMatches); - if ($startMatches[2] > '') { - $val = $startMatches[2].'!'.$val; - } - } else { - return $this->raiseFormulaError("3D Range references are not yet supported"); - } - } - - $output[] = array('type' => 'Cell Reference', 'value' => $val, 'reference' => $val); -// $expectingOperator = FALSE; - } else { // it's a variable, constant, string, number or boolean -// echo 'Element is a Variable, Constant, String, Number or Boolean
    '; - // If the last entry on the stack was a : operator, then we may have a row or column range reference - $testPrevOp = $stack->last(1); - if ($testPrevOp['value'] == ':') { - $startRowColRef = $output[count($output)-1]['value']; - $rangeWS1 = ''; - if (strpos('!', $startRowColRef) !== false) { - list($rangeWS1, $startRowColRef) = explode('!', $startRowColRef); - } - if ($rangeWS1 != '') { - $rangeWS1 .= '!'; - } - $rangeWS2 = $rangeWS1; - if (strpos('!', $val) !== false) { - list($rangeWS2, $val) = explode('!', $val); - } - if ($rangeWS2 != '') { - $rangeWS2 .= '!'; - } - if ((is_integer($startRowColRef)) && (ctype_digit($val)) && - ($startRowColRef <= 1048576) && ($val <= 1048576)) { - // Row range - $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestColumn() : 'XFD'; // Max 16,384 columns for Excel2007 - $output[count($output)-1]['value'] = $rangeWS1.'A'.$startRowColRef; - $val = $rangeWS2.$endRowColRef.$val; - } elseif ((ctype_alpha($startRowColRef)) && (ctype_alpha($val)) && - (strlen($startRowColRef) <= 3) && (strlen($val) <= 3)) { - // Column range - $endRowColRef = ($pCellParent !== null) ? $pCellParent->getHighestRow() : 1048576; // Max 1,048,576 rows for Excel2007 - $output[count($output)-1]['value'] = $rangeWS1.strtoupper($startRowColRef).'1'; - $val = $rangeWS2.$val.$endRowColRef; - } - } - - $localeConstant = false; - if ($opCharacter == '"') { -// echo 'Element is a String
    '; - // UnEscape any quotes within the string - $val = self::wrapResult(str_replace('""', '"', self::unwrapResult($val))); - } elseif (is_numeric($val)) { -// echo 'Element is a Number
    '; - if ((strpos($val, '.') !== false) || (stripos($val, 'e') !== false) || ($val > PHP_INT_MAX) || ($val < -PHP_INT_MAX)) { -// echo 'Casting '.$val.' to float
    '; - $val = (float) $val; - } else { -// echo 'Casting '.$val.' to integer
    '; - $val = (integer) $val; - } - } elseif (isset(self::$excelConstants[trim(strtoupper($val))])) { - $excelConstant = trim(strtoupper($val)); -// echo 'Element '.$excelConstant.' is an Excel Constant
    '; - $val = self::$excelConstants[$excelConstant]; - } elseif (($localeConstant = array_search(trim(strtoupper($val)), self::$localeBoolean)) !== false) { -// echo 'Element '.$localeConstant.' is an Excel Constant
    '; - $val = self::$excelConstants[$localeConstant]; - } - $details = array('type' => 'Value', 'value' => $val, 'reference' => null); - if ($localeConstant) { - $details['localeValue'] = $localeConstant; - } - $output[] = $details; - } - $index += $length; - - } elseif ($opCharacter == '$') { // absolute row or column range - ++$index; - } elseif ($opCharacter == ')') { // miscellaneous error checking - if ($expectingOperand) { - $output[] = array('type' => 'NULL Value', 'value' => self::$excelConstants['NULL'], 'reference' => null); - $expectingOperand = false; - $expectingOperator = true; - } else { - return $this->raiseFormulaError("Formula Error: Unexpected ')'"); - } - } elseif (isset(self::$operators[$opCharacter]) && !$expectingOperator) { - return $this->raiseFormulaError("Formula Error: Unexpected operator '$opCharacter'"); - } else { // I don't even want to know what you did to get here - return $this->raiseFormulaError("Formula Error: An unexpected error occured"); - } - // Test for end of formula string - if ($index == strlen($formula)) { - // Did we end with an operator?. - // Only valid for the % unary operator - if ((isset(self::$operators[$opCharacter])) && ($opCharacter != '%')) { - return $this->raiseFormulaError("Formula Error: Operator '$opCharacter' has no operands"); - } else { - break; - } - } - // Ignore white space - while (($formula{$index} == "\n") || ($formula{$index} == "\r")) { - ++$index; - } - if ($formula{$index} == ' ') { - while ($formula{$index} == ' ') { - ++$index; - } - // If we're expecting an operator, but only have a space between the previous and next operands (and both are - // Cell References) then we have an INTERSECTION operator -// echo 'Possible Intersect Operator
    '; - if (($expectingOperator) && (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'.*/Ui', substr($formula, $index), $match)) && - ($output[count($output)-1]['type'] == 'Cell Reference')) { -// echo 'Element is an Intersect Operator
    '; - while ($stack->count() > 0 && - ($o2 = $stack->last()) && - isset(self::$operators[$o2['value']]) && - @(self::$operatorAssociativity[$opCharacter] ? self::$operatorPrecedence[$opCharacter] < self::$operatorPrecedence[$o2['value']] : self::$operatorPrecedence[$opCharacter] <= self::$operatorPrecedence[$o2['value']])) { - $output[] = $stack->pop(); // Swap operands and higher precedence operators from the stack to the output - } - $stack->push('Binary Operator', '|'); // Put an Intersect Operator on the stack - $expectingOperator = false; - } - } - } - - while (($op = $stack->pop()) !== null) { // pop everything off the stack and push onto output - if ((is_array($op) && $op['value'] == '(') || ($op === '(')) { - return $this->raiseFormulaError("Formula Error: Expecting ')'"); // if there are any opening braces on the stack, then braces were unbalanced - } - $output[] = $op; - } - return $output; - } - - - private static function dataTestReference(&$operandData) - { - $operand = $operandData['value']; - if (($operandData['reference'] === null) && (is_array($operand))) { - $rKeys = array_keys($operand); - $rowKey = array_shift($rKeys); - $cKeys = array_keys(array_keys($operand[$rowKey])); - $colKey = array_shift($cKeys); - if (ctype_upper($colKey)) { - $operandData['reference'] = $colKey.$rowKey; - } - } - return $operand; - } - - // evaluate postfix notation - private function processTokenStack($tokens, $cellID = null, PHPExcel_Cell $pCell = null) - { - if ($tokens == false) { - return false; - } - - // If we're using cell caching, then $pCell may well be flushed back to the cache (which detaches the parent cell collection), - // so we store the parent cell collection so that we can re-attach it when necessary - $pCellWorksheet = ($pCell !== null) ? $pCell->getWorksheet() : null; - $pCellParent = ($pCell !== null) ? $pCell->getParent() : null; - $stack = new PHPExcel_Calculation_Token_Stack; - - // Loop through each token in turn - foreach ($tokens as $tokenData) { -// print_r($tokenData); -// echo '
    '; - $token = $tokenData['value']; -// echo 'Token is '.$token.'
    '; - // if the token is a binary operator, pop the top two values off the stack, do the operation, and push the result back on the stack - if (isset(self::$binaryOperators[$token])) { -// echo 'Token is a binary operator
    '; - // We must have two operands, error if we don't - if (($operand2Data = $stack->pop()) === null) { - return $this->raiseFormulaError('Internal error - Operand value missing from stack'); - } - if (($operand1Data = $stack->pop()) === null) { - return $this->raiseFormulaError('Internal error - Operand value missing from stack'); - } - - $operand1 = self::dataTestReference($operand1Data); - $operand2 = self::dataTestReference($operand2Data); - - // Log what we're doing - if ($token == ':') { - $this->_debugLog->writeDebugLog('Evaluating Range ', $this->showValue($operand1Data['reference']), ' ', $token, ' ', $this->showValue($operand2Data['reference'])); - } else { - $this->_debugLog->writeDebugLog('Evaluating ', $this->showValue($operand1), ' ', $token, ' ', $this->showValue($operand2)); - } - - // Process the operation in the appropriate manner - switch ($token) { - // Comparison (Boolean) Operators - case '>': // Greater than - case '<': // Less than - case '>=': // Greater than or Equal to - case '<=': // Less than or Equal to - case '=': // Equality - case '<>': // Inequality - $this->executeBinaryComparisonOperation($cellID, $operand1, $operand2, $token, $stack); - break; - // Binary Operators - case ':': // Range - $sheet1 = $sheet2 = ''; - if (strpos($operand1Data['reference'], '!') !== false) { - list($sheet1, $operand1Data['reference']) = explode('!', $operand1Data['reference']); - } else { - $sheet1 = ($pCellParent !== null) ? $pCellWorksheet->getTitle() : ''; - } - if (strpos($operand2Data['reference'], '!') !== false) { - list($sheet2, $operand2Data['reference']) = explode('!', $operand2Data['reference']); - } else { - $sheet2 = $sheet1; - } - if ($sheet1 == $sheet2) { - if ($operand1Data['reference'] === null) { - if ((trim($operand1Data['value']) != '') && (is_numeric($operand1Data['value']))) { - $operand1Data['reference'] = $pCell->getColumn().$operand1Data['value']; - } elseif (trim($operand1Data['reference']) == '') { - $operand1Data['reference'] = $pCell->getCoordinate(); - } else { - $operand1Data['reference'] = $operand1Data['value'].$pCell->getRow(); - } - } - if ($operand2Data['reference'] === null) { - if ((trim($operand2Data['value']) != '') && (is_numeric($operand2Data['value']))) { - $operand2Data['reference'] = $pCell->getColumn().$operand2Data['value']; - } elseif (trim($operand2Data['reference']) == '') { - $operand2Data['reference'] = $pCell->getCoordinate(); - } else { - $operand2Data['reference'] = $operand2Data['value'].$pCell->getRow(); - } - } - - $oData = array_merge(explode(':', $operand1Data['reference']), explode(':', $operand2Data['reference'])); - $oCol = $oRow = array(); - foreach ($oData as $oDatum) { - $oCR = PHPExcel_Cell::coordinateFromString($oDatum); - $oCol[] = PHPExcel_Cell::columnIndexFromString($oCR[0]) - 1; - $oRow[] = $oCR[1]; - } - $cellRef = PHPExcel_Cell::stringFromColumnIndex(min($oCol)).min($oRow).':'.PHPExcel_Cell::stringFromColumnIndex(max($oCol)).max($oRow); - if ($pCellParent !== null) { - $cellValue = $this->extractCellRange($cellRef, $this->workbook->getSheetByName($sheet1), false); - } else { - return $this->raiseFormulaError('Unable to access Cell Reference'); - } - $stack->push('Cell Reference', $cellValue, $cellRef); - } else { - $stack->push('Error', PHPExcel_Calculation_Functions::REF(), null); - } - break; - case '+': // Addition - $this->executeNumericBinaryOperation($cellID, $operand1, $operand2, $token, 'plusEquals', $stack); - break; - case '-': // Subtraction - $this->executeNumericBinaryOperation($cellID, $operand1, $operand2, $token, 'minusEquals', $stack); - break; - case '*': // Multiplication - $this->executeNumericBinaryOperation($cellID, $operand1, $operand2, $token, 'arrayTimesEquals', $stack); - break; - case '/': // Division - $this->executeNumericBinaryOperation($cellID, $operand1, $operand2, $token, 'arrayRightDivide', $stack); - break; - case '^': // Exponential - $this->executeNumericBinaryOperation($cellID, $operand1, $operand2, $token, 'power', $stack); - break; - case '&': // Concatenation - // If either of the operands is a matrix, we need to treat them both as matrices - // (converting the other operand to a matrix if need be); then perform the required - // matrix operation - if (is_bool($operand1)) { - $operand1 = ($operand1) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; - } - if (is_bool($operand2)) { - $operand2 = ($operand2) ? self::$localeBoolean['TRUE'] : self::$localeBoolean['FALSE']; - } - if ((is_array($operand1)) || (is_array($operand2))) { - // Ensure that both operands are arrays/matrices - self::checkMatrixOperands($operand1, $operand2, 2); - try { - // Convert operand 1 from a PHP array to a matrix - $matrix = new PHPExcel_Shared_JAMA_Matrix($operand1); - // Perform the required operation against the operand 1 matrix, passing in operand 2 - $matrixResult = $matrix->concat($operand2); - $result = $matrixResult->getArray(); - } catch (PHPExcel_Exception $ex) { - $this->_debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); - $result = '#VALUE!'; - } - } else { - $result = '"'.str_replace('""', '"', self::unwrapResult($operand1, '"').self::unwrapResult($operand2, '"')).'"'; - } - $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); - $stack->push('Value', $result); - break; - case '|': // Intersect - $rowIntersect = array_intersect_key($operand1, $operand2); - $cellIntersect = $oCol = $oRow = array(); - foreach (array_keys($rowIntersect) as $row) { - $oRow[] = $row; - foreach ($rowIntersect[$row] as $col => $data) { - $oCol[] = PHPExcel_Cell::columnIndexFromString($col) - 1; - $cellIntersect[$row] = array_intersect_key($operand1[$row], $operand2[$row]); - } - } - $cellRef = PHPExcel_Cell::stringFromColumnIndex(min($oCol)).min($oRow).':'.PHPExcel_Cell::stringFromColumnIndex(max($oCol)).max($oRow); - $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($cellIntersect)); - $stack->push('Value', $cellIntersect, $cellRef); - break; - } - - // if the token is a unary operator, pop one value off the stack, do the operation, and push it back on - } elseif (($token === '~') || ($token === '%')) { -// echo 'Token is a unary operator
    '; - if (($arg = $stack->pop()) === null) { - return $this->raiseFormulaError('Internal error - Operand value missing from stack'); - } - $arg = $arg['value']; - if ($token === '~') { -// echo 'Token is a negation operator
    '; - $this->_debugLog->writeDebugLog('Evaluating Negation of ', $this->showValue($arg)); - $multiplier = -1; - } else { -// echo 'Token is a percentile operator
    '; - $this->_debugLog->writeDebugLog('Evaluating Percentile of ', $this->showValue($arg)); - $multiplier = 0.01; - } - if (is_array($arg)) { - self::checkMatrixOperands($arg, $multiplier, 2); - try { - $matrix1 = new PHPExcel_Shared_JAMA_Matrix($arg); - $matrixResult = $matrix1->arrayTimesEquals($multiplier); - $result = $matrixResult->getArray(); - } catch (PHPExcel_Exception $ex) { - $this->_debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); - $result = '#VALUE!'; - } - $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); - $stack->push('Value', $result); - } else { - $this->executeNumericBinaryOperation($cellID, $multiplier, $arg, '*', 'arrayTimesEquals', $stack); - } - - } elseif (preg_match('/^'.self::CALCULATION_REGEXP_CELLREF.'$/i', $token, $matches)) { - $cellRef = null; -// echo 'Element '.$token.' is a Cell reference
    '; - if (isset($matches[8])) { -// echo 'Reference is a Range of cells
    '; - if ($pCell === null) { -// We can't access the range, so return a REF error - $cellValue = PHPExcel_Calculation_Functions::REF(); - } else { - $cellRef = $matches[6].$matches[7].':'.$matches[9].$matches[10]; - if ($matches[2] > '') { - $matches[2] = trim($matches[2], "\"'"); - if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) { - // It's a Reference to an external workbook (not currently supported) - return $this->raiseFormulaError('Unable to access External Workbook'); - } - $matches[2] = trim($matches[2], "\"'"); -// echo '$cellRef='.$cellRef.' in worksheet '.$matches[2].'
    '; - $this->_debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in worksheet ', $matches[2]); - if ($pCellParent !== null) { - $cellValue = $this->extractCellRange($cellRef, $this->workbook->getSheetByName($matches[2]), false); - } else { - return $this->raiseFormulaError('Unable to access Cell Reference'); - } - $this->_debugLog->writeDebugLog('Evaluation Result for cells ', $cellRef, ' in worksheet ', $matches[2], ' is ', $this->showTypeDetails($cellValue)); -// $cellRef = $matches[2].'!'.$cellRef; - } else { -// echo '$cellRef='.$cellRef.' in current worksheet
    '; - $this->_debugLog->writeDebugLog('Evaluating Cell Range ', $cellRef, ' in current worksheet'); - if ($pCellParent !== null) { - $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false); - } else { - return $this->raiseFormulaError('Unable to access Cell Reference'); - } - $this->_debugLog->writeDebugLog('Evaluation Result for cells ', $cellRef, ' is ', $this->showTypeDetails($cellValue)); - } - } - } else { -// echo 'Reference is a single Cell
    '; - if ($pCell === null) { -// We can't access the cell, so return a REF error - $cellValue = PHPExcel_Calculation_Functions::REF(); - } else { - $cellRef = $matches[6].$matches[7]; - if ($matches[2] > '') { - $matches[2] = trim($matches[2], "\"'"); - if ((strpos($matches[2], '[') !== false) || (strpos($matches[2], ']') !== false)) { - // It's a Reference to an external workbook (not currently supported) - return $this->raiseFormulaError('Unable to access External Workbook'); - } -// echo '$cellRef='.$cellRef.' in worksheet '.$matches[2].'
    '; - $this->_debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in worksheet ', $matches[2]); - if ($pCellParent !== null) { - $cellSheet = $this->workbook->getSheetByName($matches[2]); - if ($cellSheet && $cellSheet->cellExists($cellRef)) { - $cellValue = $this->extractCellRange($cellRef, $this->workbook->getSheetByName($matches[2]), false); - $pCell->attach($pCellParent); - } else { - $cellValue = null; - } - } else { - return $this->raiseFormulaError('Unable to access Cell Reference'); - } - $this->_debugLog->writeDebugLog('Evaluation Result for cell ', $cellRef, ' in worksheet ', $matches[2], ' is ', $this->showTypeDetails($cellValue)); -// $cellRef = $matches[2].'!'.$cellRef; - } else { -// echo '$cellRef='.$cellRef.' in current worksheet
    '; - $this->_debugLog->writeDebugLog('Evaluating Cell ', $cellRef, ' in current worksheet'); - if ($pCellParent->isDataSet($cellRef)) { - $cellValue = $this->extractCellRange($cellRef, $pCellWorksheet, false); - $pCell->attach($pCellParent); - } else { - $cellValue = null; - } - $this->_debugLog->writeDebugLog('Evaluation Result for cell ', $cellRef, ' is ', $this->showTypeDetails($cellValue)); - } - } - } - $stack->push('Value', $cellValue, $cellRef); - - // if the token is a function, pop arguments off the stack, hand them to the function, and push the result back on - } elseif (preg_match('/^'.self::CALCULATION_REGEXP_FUNCTION.'$/i', $token, $matches)) { -// echo 'Token is a function
    '; - $functionName = $matches[1]; - $argCount = $stack->pop(); - $argCount = $argCount['value']; - if ($functionName != 'MKMATRIX') { - $this->_debugLog->writeDebugLog('Evaluating Function ', self::localeFunc($functionName), '() with ', (($argCount == 0) ? 'no' : $argCount), ' argument', (($argCount == 1) ? '' : 's')); - } - if ((isset(self::$PHPExcelFunctions[$functionName])) || (isset(self::$controlFunctions[$functionName]))) { // function - if (isset(self::$PHPExcelFunctions[$functionName])) { - $functionCall = self::$PHPExcelFunctions[$functionName]['functionCall']; - $passByReference = isset(self::$PHPExcelFunctions[$functionName]['passByReference']); - $passCellReference = isset(self::$PHPExcelFunctions[$functionName]['passCellReference']); - } elseif (isset(self::$controlFunctions[$functionName])) { - $functionCall = self::$controlFunctions[$functionName]['functionCall']; - $passByReference = isset(self::$controlFunctions[$functionName]['passByReference']); - $passCellReference = isset(self::$controlFunctions[$functionName]['passCellReference']); - } - // get the arguments for this function -// echo 'Function '.$functionName.' expects '.$argCount.' arguments
    '; - $args = $argArrayVals = array(); - for ($i = 0; $i < $argCount; ++$i) { - $arg = $stack->pop(); - $a = $argCount - $i - 1; - if (($passByReference) && - (isset(self::$PHPExcelFunctions[$functionName]['passByReference'][$a])) && - (self::$PHPExcelFunctions[$functionName]['passByReference'][$a])) { - if ($arg['reference'] === null) { - $args[] = $cellID; - if ($functionName != 'MKMATRIX') { - $argArrayVals[] = $this->showValue($cellID); - } - } else { - $args[] = $arg['reference']; - if ($functionName != 'MKMATRIX') { - $argArrayVals[] = $this->showValue($arg['reference']); - } - } - } else { - $args[] = self::unwrapResult($arg['value']); - if ($functionName != 'MKMATRIX') { - $argArrayVals[] = $this->showValue($arg['value']); - } - } - } - // Reverse the order of the arguments - krsort($args); - if (($passByReference) && ($argCount == 0)) { - $args[] = $cellID; - $argArrayVals[] = $this->showValue($cellID); - } -// echo 'Arguments are: '; -// print_r($args); -// echo '
    '; - if ($functionName != 'MKMATRIX') { - if ($this->_debugLog->getWriteDebugLog()) { - krsort($argArrayVals); - $this->_debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', implode(self::$localeArgumentSeparator.' ', PHPExcel_Calculation_Functions::flattenArray($argArrayVals)), ' )'); - } - } - // Process each argument in turn, building the return value as an array -// if (($argCount == 1) && (is_array($args[1])) && ($functionName != 'MKMATRIX')) { -// $operand1 = $args[1]; -// $this->_debugLog->writeDebugLog('Argument is a matrix: ', $this->showValue($operand1)); -// $result = array(); -// $row = 0; -// foreach($operand1 as $args) { -// if (is_array($args)) { -// foreach($args as $arg) { -// $this->_debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', $this->showValue($arg), ' )'); -// $r = call_user_func_array($functionCall, $arg); -// $this->_debugLog->writeDebugLog('Evaluation Result for ', self::localeFunc($functionName), '() function call is ', $this->showTypeDetails($r)); -// $result[$row][] = $r; -// } -// ++$row; -// } else { -// $this->_debugLog->writeDebugLog('Evaluating ', self::localeFunc($functionName), '( ', $this->showValue($args), ' )'); -// $r = call_user_func_array($functionCall, $args); -// $this->_debugLog->writeDebugLog('Evaluation Result for ', self::localeFunc($functionName), '() function call is ', $this->showTypeDetails($r)); -// $result[] = $r; -// } -// } -// } else { - // Process the argument with the appropriate function call - if ($passCellReference) { - $args[] = $pCell; - } - if (strpos($functionCall, '::') !== false) { - $result = call_user_func_array(explode('::', $functionCall), $args); - } else { - foreach ($args as &$arg) { - $arg = PHPExcel_Calculation_Functions::flattenSingleValue($arg); - } - unset($arg); - $result = call_user_func_array($functionCall, $args); - } - if ($functionName != 'MKMATRIX') { - $this->_debugLog->writeDebugLog('Evaluation Result for ', self::localeFunc($functionName), '() function call is ', $this->showTypeDetails($result)); - } - $stack->push('Value', self::wrapResult($result)); - } - - } else { - // if the token is a number, boolean, string or an Excel error, push it onto the stack - if (isset(self::$excelConstants[strtoupper($token)])) { - $excelConstant = strtoupper($token); -// echo 'Token is a PHPExcel constant: '.$excelConstant.'
    '; - $stack->push('Constant Value', self::$excelConstants[$excelConstant]); - $this->_debugLog->writeDebugLog('Evaluating Constant ', $excelConstant, ' as ', $this->showTypeDetails(self::$excelConstants[$excelConstant])); - } elseif ((is_numeric($token)) || ($token === null) || (is_bool($token)) || ($token == '') || ($token{0} == '"') || ($token{0} == '#')) { -// echo 'Token is a number, boolean, string, null or an Excel error
    '; - $stack->push('Value', $token); - // if the token is a named range, push the named range name onto the stack - } elseif (preg_match('/^'.self::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $token, $matches)) { -// echo 'Token is a named range
    '; - $namedRange = $matches[6]; -// echo 'Named Range is '.$namedRange.'
    '; - $this->_debugLog->writeDebugLog('Evaluating Named Range ', $namedRange); - $cellValue = $this->extractNamedRange($namedRange, ((null !== $pCell) ? $pCellWorksheet : null), false); - $pCell->attach($pCellParent); - $this->_debugLog->writeDebugLog('Evaluation Result for named range ', $namedRange, ' is ', $this->showTypeDetails($cellValue)); - $stack->push('Named Range', $cellValue, $namedRange); - } else { - return $this->raiseFormulaError("undefined variable '$token'"); - } - } - } - // when we're out of tokens, the stack should have a single element, the final result - if ($stack->count() != 1) { - return $this->raiseFormulaError("internal error"); - } - $output = $stack->pop(); - $output = $output['value']; - -// if ((is_array($output)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) { -// return array_shift(PHPExcel_Calculation_Functions::flattenArray($output)); -// } - return $output; - } - - - private function validateBinaryOperand($cellID, &$operand, &$stack) - { - if (is_array($operand)) { - if ((count($operand, COUNT_RECURSIVE) - count($operand)) == 1) { - do { - $operand = array_pop($operand); - } while (is_array($operand)); - } - } - // Numbers, matrices and booleans can pass straight through, as they're already valid - if (is_string($operand)) { - // We only need special validations for the operand if it is a string - // Start by stripping off the quotation marks we use to identify true excel string values internally - if ($operand > '' && $operand{0} == '"') { - $operand = self::unwrapResult($operand); - } - // If the string is a numeric value, we treat it as a numeric, so no further testing - if (!is_numeric($operand)) { - // If not a numeric, test to see if the value is an Excel error, and so can't be used in normal binary operations - if ($operand > '' && $operand{0} == '#') { - $stack->push('Value', $operand); - $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($operand)); - return false; - } elseif (!PHPExcel_Shared_String::convertToNumberIfFraction($operand)) { - // If not a numeric or a fraction, then it's a text string, and so can't be used in mathematical binary operations - $stack->push('Value', '#VALUE!'); - $this->_debugLog->writeDebugLog('Evaluation Result is a ', $this->showTypeDetails('#VALUE!')); - return false; - } - } - } - - // return a true if the value of the operand is one that we can use in normal binary operations - return true; - } - - - private function executeBinaryComparisonOperation($cellID, $operand1, $operand2, $operation, &$stack, $recursingArrays = false) - { - // If we're dealing with matrix operations, we want a matrix result - if ((is_array($operand1)) || (is_array($operand2))) { - $result = array(); - if ((is_array($operand1)) && (!is_array($operand2))) { - foreach ($operand1 as $x => $operandData) { - $this->_debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2)); - $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2, $operation, $stack); - $r = $stack->pop(); - $result[$x] = $r['value']; - } - } elseif ((!is_array($operand1)) && (is_array($operand2))) { - foreach ($operand2 as $x => $operandData) { - $this->_debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operand1), ' ', $operation, ' ', $this->showValue($operandData)); - $this->executeBinaryComparisonOperation($cellID, $operand1, $operandData, $operation, $stack); - $r = $stack->pop(); - $result[$x] = $r['value']; - } - } else { - if (!$recursingArrays) { - self::checkMatrixOperands($operand1, $operand2, 2); - } - foreach ($operand1 as $x => $operandData) { - $this->_debugLog->writeDebugLog('Evaluating Comparison ', $this->showValue($operandData), ' ', $operation, ' ', $this->showValue($operand2[$x])); - $this->executeBinaryComparisonOperation($cellID, $operandData, $operand2[$x], $operation, $stack, true); - $r = $stack->pop(); - $result[$x] = $r['value']; - } - } - // Log the result details - $this->_debugLog->writeDebugLog('Comparison Evaluation Result is ', $this->showTypeDetails($result)); - // And push the result onto the stack - $stack->push('Array', $result); - return true; - } - - // Simple validate the two operands if they are string values - if (is_string($operand1) && $operand1 > '' && $operand1{0} == '"') { - $operand1 = self::unwrapResult($operand1); - } - if (is_string($operand2) && $operand2 > '' && $operand2{0} == '"') { - $operand2 = self::unwrapResult($operand2); - } - - // Use case insensitive comparaison if not OpenOffice mode - if (PHPExcel_Calculation_Functions::getCompatibilityMode() != PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - if (is_string($operand1)) { - $operand1 = strtoupper($operand1); - } - if (is_string($operand2)) { - $operand2 = strtoupper($operand2); - } - } - - $useLowercaseFirstComparison = is_string($operand1) && is_string($operand2) && PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE; - - // execute the necessary operation - switch ($operation) { - // Greater than - case '>': - if ($useLowercaseFirstComparison) { - $result = $this->strcmpLowercaseFirst($operand1, $operand2) > 0; - } else { - $result = ($operand1 > $operand2); - } - break; - // Less than - case '<': - if ($useLowercaseFirstComparison) { - $result = $this->strcmpLowercaseFirst($operand1, $operand2) < 0; - } else { - $result = ($operand1 < $operand2); - } - break; - // Equality - case '=': - if (is_numeric($operand1) && is_numeric($operand2)) { - $result = (abs($operand1 - $operand2) < $this->delta); - } else { - $result = strcmp($operand1, $operand2) == 0; - } - break; - // Greater than or equal - case '>=': - if (is_numeric($operand1) && is_numeric($operand2)) { - $result = ((abs($operand1 - $operand2) < $this->delta) || ($operand1 > $operand2)); - } elseif ($useLowercaseFirstComparison) { - $result = $this->strcmpLowercaseFirst($operand1, $operand2) >= 0; - } else { - $result = strcmp($operand1, $operand2) >= 0; - } - break; - // Less than or equal - case '<=': - if (is_numeric($operand1) && is_numeric($operand2)) { - $result = ((abs($operand1 - $operand2) < $this->delta) || ($operand1 < $operand2)); - } elseif ($useLowercaseFirstComparison) { - $result = $this->strcmpLowercaseFirst($operand1, $operand2) <= 0; - } else { - $result = strcmp($operand1, $operand2) <= 0; - } - break; - // Inequality - case '<>': - if (is_numeric($operand1) && is_numeric($operand2)) { - $result = (abs($operand1 - $operand2) > 1E-14); - } else { - $result = strcmp($operand1, $operand2) != 0; - } - break; - } - - // Log the result details - $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); - // And push the result onto the stack - $stack->push('Value', $result); - return true; - } - - /** - * Compare two strings in the same way as strcmp() except that lowercase come before uppercase letters - * @param string $str1 First string value for the comparison - * @param string $str2 Second string value for the comparison - * @return integer - */ - private function strcmpLowercaseFirst($str1, $str2) - { - $inversedStr1 = PHPExcel_Shared_String::StrCaseReverse($str1); - $inversedStr2 = PHPExcel_Shared_String::StrCaseReverse($str2); - - return strcmp($inversedStr1, $inversedStr2); - } - - private function executeNumericBinaryOperation($cellID, $operand1, $operand2, $operation, $matrixFunction, &$stack) - { - // Validate the two operands - if (!$this->validateBinaryOperand($cellID, $operand1, $stack)) { - return false; - } - if (!$this->validateBinaryOperand($cellID, $operand2, $stack)) { - return false; - } - - // If either of the operands is a matrix, we need to treat them both as matrices - // (converting the other operand to a matrix if need be); then perform the required - // matrix operation - if ((is_array($operand1)) || (is_array($operand2))) { - // Ensure that both operands are arrays/matrices of the same size - self::checkMatrixOperands($operand1, $operand2, 2); - - try { - // Convert operand 1 from a PHP array to a matrix - $matrix = new PHPExcel_Shared_JAMA_Matrix($operand1); - // Perform the required operation against the operand 1 matrix, passing in operand 2 - $matrixResult = $matrix->$matrixFunction($operand2); - $result = $matrixResult->getArray(); - } catch (PHPExcel_Exception $ex) { - $this->_debugLog->writeDebugLog('JAMA Matrix Exception: ', $ex->getMessage()); - $result = '#VALUE!'; - } - } else { - if ((PHPExcel_Calculation_Functions::getCompatibilityMode() != PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) && - ((is_string($operand1) && !is_numeric($operand1) && strlen($operand1)>0) || - (is_string($operand2) && !is_numeric($operand2) && strlen($operand2)>0))) { - $result = PHPExcel_Calculation_Functions::VALUE(); - } else { - // If we're dealing with non-matrix operations, execute the necessary operation - switch ($operation) { - // Addition - case '+': - $result = $operand1 + $operand2; - break; - // Subtraction - case '-': - $result = $operand1 - $operand2; - break; - // Multiplication - case '*': - $result = $operand1 * $operand2; - break; - // Division - case '/': - if ($operand2 == 0) { - // Trap for Divide by Zero error - $stack->push('Value', '#DIV/0!'); - $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails('#DIV/0!')); - return false; - } else { - $result = $operand1 / $operand2; - } - break; - // Power - case '^': - $result = pow($operand1, $operand2); - break; - } - } - } - - // Log the result details - $this->_debugLog->writeDebugLog('Evaluation Result is ', $this->showTypeDetails($result)); - // And push the result onto the stack - $stack->push('Value', $result); - return true; - } - - - // trigger an error, but nicely, if need be - protected function raiseFormulaError($errorMessage) - { - $this->formulaError = $errorMessage; - $this->cyclicReferenceStack->clear(); - if (!$this->suppressFormulaErrors) { - throw new PHPExcel_Calculation_Exception($errorMessage); - } - trigger_error($errorMessage, E_USER_ERROR); - } - - - /** - * Extract range values - * - * @param string &$pRange String based range representation - * @param PHPExcel_Worksheet $pSheet Worksheet - * @param boolean $resetLog Flag indicating whether calculation log should be reset or not - * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. - * @throws PHPExcel_Calculation_Exception - */ - public function extractCellRange(&$pRange = 'A1', PHPExcel_Worksheet $pSheet = null, $resetLog = true) - { - // Return value - $returnValue = array (); - -// echo 'extractCellRange('.$pRange.')', PHP_EOL; - if ($pSheet !== null) { - $pSheetName = $pSheet->getTitle(); -// echo 'Passed sheet name is '.$pSheetName.PHP_EOL; -// echo 'Range reference is '.$pRange.PHP_EOL; - if (strpos($pRange, '!') !== false) { -// echo '$pRange reference includes sheet reference', PHP_EOL; - list($pSheetName, $pRange) = PHPExcel_Worksheet::extractSheetTitle($pRange, true); -// echo 'New sheet name is '.$pSheetName, PHP_EOL; -// echo 'Adjusted Range reference is '.$pRange, PHP_EOL; - $pSheet = $this->workbook->getSheetByName($pSheetName); - } - - // Extract range - $aReferences = PHPExcel_Cell::extractAllCellReferencesInRange($pRange); - $pRange = $pSheetName.'!'.$pRange; - if (!isset($aReferences[1])) { - // Single cell in range - sscanf($aReferences[0], '%[A-Z]%d', $currentCol, $currentRow); - $cellValue = null; - if ($pSheet->cellExists($aReferences[0])) { - $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog); - } else { - $returnValue[$currentRow][$currentCol] = null; - } - } else { - // Extract cell data for all cells in the range - foreach ($aReferences as $reference) { - // Extract range - sscanf($reference, '%[A-Z]%d', $currentCol, $currentRow); - $cellValue = null; - if ($pSheet->cellExists($reference)) { - $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog); - } else { - $returnValue[$currentRow][$currentCol] = null; - } - } - } - } - - return $returnValue; - } - - - /** - * Extract range values - * - * @param string &$pRange String based range representation - * @param PHPExcel_Worksheet $pSheet Worksheet - * @return mixed Array of values in range if range contains more than one element. Otherwise, a single value is returned. - * @param boolean $resetLog Flag indicating whether calculation log should be reset or not - * @throws PHPExcel_Calculation_Exception - */ - public function extractNamedRange(&$pRange = 'A1', PHPExcel_Worksheet $pSheet = null, $resetLog = true) - { - // Return value - $returnValue = array (); - -// echo 'extractNamedRange('.$pRange.')
    '; - if ($pSheet !== null) { - $pSheetName = $pSheet->getTitle(); -// echo 'Current sheet name is '.$pSheetName.'
    '; -// echo 'Range reference is '.$pRange.'
    '; - if (strpos($pRange, '!') !== false) { -// echo '$pRange reference includes sheet reference', PHP_EOL; - list($pSheetName, $pRange) = PHPExcel_Worksheet::extractSheetTitle($pRange, true); -// echo 'New sheet name is '.$pSheetName, PHP_EOL; -// echo 'Adjusted Range reference is '.$pRange, PHP_EOL; - $pSheet = $this->workbook->getSheetByName($pSheetName); - } - - // Named range? - $namedRange = PHPExcel_NamedRange::resolveRange($pRange, $pSheet); - if ($namedRange !== null) { - $pSheet = $namedRange->getWorksheet(); -// echo 'Named Range '.$pRange.' ('; - $pRange = $namedRange->getRange(); - $splitRange = PHPExcel_Cell::splitRange($pRange); - // Convert row and column references - if (ctype_alpha($splitRange[0][0])) { - $pRange = $splitRange[0][0] . '1:' . $splitRange[0][1] . $namedRange->getWorksheet()->getHighestRow(); - } elseif (ctype_digit($splitRange[0][0])) { - $pRange = 'A' . $splitRange[0][0] . ':' . $namedRange->getWorksheet()->getHighestColumn() . $splitRange[0][1]; - } -// echo $pRange.') is in sheet '.$namedRange->getWorksheet()->getTitle().'
    '; - -// if ($pSheet->getTitle() != $namedRange->getWorksheet()->getTitle()) { -// if (!$namedRange->getLocalOnly()) { -// $pSheet = $namedRange->getWorksheet(); -// } else { -// return $returnValue; -// } -// } - } else { - return PHPExcel_Calculation_Functions::REF(); - } - - // Extract range - $aReferences = PHPExcel_Cell::extractAllCellReferencesInRange($pRange); -// var_dump($aReferences); - if (!isset($aReferences[1])) { - // Single cell (or single column or row) in range - list($currentCol, $currentRow) = PHPExcel_Cell::coordinateFromString($aReferences[0]); - $cellValue = null; - if ($pSheet->cellExists($aReferences[0])) { - $returnValue[$currentRow][$currentCol] = $pSheet->getCell($aReferences[0])->getCalculatedValue($resetLog); - } else { - $returnValue[$currentRow][$currentCol] = null; - } - } else { - // Extract cell data for all cells in the range - foreach ($aReferences as $reference) { - // Extract range - list($currentCol, $currentRow) = PHPExcel_Cell::coordinateFromString($reference); -// echo 'NAMED RANGE: $currentCol='.$currentCol.' $currentRow='.$currentRow.'
    '; - $cellValue = null; - if ($pSheet->cellExists($reference)) { - $returnValue[$currentRow][$currentCol] = $pSheet->getCell($reference)->getCalculatedValue($resetLog); - } else { - $returnValue[$currentRow][$currentCol] = null; - } - } - } -// print_r($returnValue); -// echo '
    '; - } - - return $returnValue; - } - - - /** - * Is a specific function implemented? - * - * @param string $pFunction Function Name - * @return boolean - */ - public function isImplemented($pFunction = '') - { - $pFunction = strtoupper($pFunction); - if (isset(self::$PHPExcelFunctions[$pFunction])) { - return (self::$PHPExcelFunctions[$pFunction]['functionCall'] != 'PHPExcel_Calculation_Functions::DUMMY'); - } else { - return false; - } - } - - - /** - * Get a list of all implemented functions as an array of function objects - * - * @return array of PHPExcel_Calculation_Function - */ - public function listFunctions() - { - $returnValue = array(); - - foreach (self::$PHPExcelFunctions as $functionName => $function) { - if ($function['functionCall'] != 'PHPExcel_Calculation_Functions::DUMMY') { - $returnValue[$functionName] = new PHPExcel_Calculation_Function( - $function['category'], - $functionName, - $function['functionCall'] - ); - } - } - - return $returnValue; - } - - - /** - * Get a list of all Excel function names - * - * @return array - */ - public function listAllFunctionNames() - { - return array_keys(self::$PHPExcelFunctions); - } - - /** - * Get a list of implemented Excel function names - * - * @return array - */ - public function listFunctionNames() - { - $returnValue = array(); - foreach (self::$PHPExcelFunctions as $functionName => $function) { - if ($function['functionCall'] != 'PHPExcel_Calculation_Functions::DUMMY') { - $returnValue[] = $functionName; - } - } - - return $returnValue; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Database.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Database.php deleted file mode 100644 index b8d91cb..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Database.php +++ /dev/null @@ -1,676 +0,0 @@ - $criteriaName) { - $testCondition = array(); - $testConditionCount = 0; - foreach ($criteria as $row => $criterion) { - if ($criterion[$key] > '') { - $testCondition[] = '[:'.$criteriaName.']'.PHPExcel_Calculation_Functions::ifCondition($criterion[$key]); - $testConditionCount++; - } - } - if ($testConditionCount > 1) { - $testConditions[] = 'OR(' . implode(',', $testCondition) . ')'; - $testConditionsCount++; - } elseif ($testConditionCount == 1) { - $testConditions[] = $testCondition[0]; - $testConditionsCount++; - } - } - - if ($testConditionsCount > 1) { - $testConditionSet = 'AND(' . implode(',', $testConditions) . ')'; - } elseif ($testConditionsCount == 1) { - $testConditionSet = $testConditions[0]; - } - - // Loop through each row of the database - foreach ($database as $dataRow => $dataValues) { - // Substitute actual values from the database row for our [:placeholders] - $testConditionList = $testConditionSet; - foreach ($criteriaNames as $key => $criteriaName) { - $k = array_search($criteriaName, $fieldNames); - if (isset($dataValues[$k])) { - $dataValue = $dataValues[$k]; - $dataValue = (is_string($dataValue)) ? PHPExcel_Calculation::wrapResult(strtoupper($dataValue)) : $dataValue; - $testConditionList = str_replace('[:' . $criteriaName . ']', $dataValue, $testConditionList); - } - } - // evaluate the criteria against the row data - $result = PHPExcel_Calculation::getInstance()->_calculateFormulaValue('='.$testConditionList); - // If the row failed to meet the criteria, remove it from the database - if (!$result) { - unset($database[$dataRow]); - } - } - - return $database; - } - - - private static function getFilteredColumn($database, $field, $criteria) - { - // reduce the database to a set of rows that match all the criteria - $database = self::filter($database, $criteria); - // extract an array of values for the requested column - $colData = array(); - foreach ($database as $row) { - $colData[] = $row[$field]; - } - - return $colData; - } - - /** - * DAVERAGE - * - * Averages the values in a column of a list or database that match conditions you specify. - * - * Excel Function: - * DAVERAGE(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DAVERAGE($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_Statistical::AVERAGE( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DCOUNT - * - * Counts the cells that contain numbers in a column of a list or database that match conditions - * that you specify. - * - * Excel Function: - * DCOUNT(database,[field],criteria) - * - * Excel Function: - * DAVERAGE(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return integer - * - * @TODO The field argument is optional. If field is omitted, DCOUNT counts all records in the - * database that match the criteria. - * - */ - public static function DCOUNT($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_Statistical::COUNT( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DCOUNTA - * - * Counts the nonblank cells in a column of a list or database that match conditions that you specify. - * - * Excel Function: - * DCOUNTA(database,[field],criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return integer - * - * @TODO The field argument is optional. If field is omitted, DCOUNTA counts all records in the - * database that match the criteria. - * - */ - public static function DCOUNTA($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // reduce the database to a set of rows that match all the criteria - $database = self::filter($database, $criteria); - // extract an array of values for the requested column - $colData = array(); - foreach ($database as $row) { - $colData[] = $row[$field]; - } - - // Return - return PHPExcel_Calculation_Statistical::COUNTA( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DGET - * - * Extracts a single value from a column of a list or database that matches conditions that you - * specify. - * - * Excel Function: - * DGET(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return mixed - * - */ - public static function DGET($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - $colData = self::getFilteredColumn($database, $field, $criteria); - if (count($colData) > 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - - return $colData[0]; - } - - - /** - * DMAX - * - * Returns the largest number in a column of a list or database that matches conditions you that - * specify. - * - * Excel Function: - * DMAX(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DMAX($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_Statistical::MAX( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DMIN - * - * Returns the smallest number in a column of a list or database that matches conditions you that - * specify. - * - * Excel Function: - * DMIN(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DMIN($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_Statistical::MIN( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DPRODUCT - * - * Multiplies the values in a column of a list or database that match conditions that you specify. - * - * Excel Function: - * DPRODUCT(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DPRODUCT($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_MathTrig::PRODUCT( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DSTDEV - * - * Estimates the standard deviation of a population based on a sample by using the numbers in a - * column of a list or database that match conditions that you specify. - * - * Excel Function: - * DSTDEV(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DSTDEV($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_Statistical::STDEV( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DSTDEVP - * - * Calculates the standard deviation of a population based on the entire population by using the - * numbers in a column of a list or database that match conditions that you specify. - * - * Excel Function: - * DSTDEVP(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DSTDEVP($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_Statistical::STDEVP( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DSUM - * - * Adds the numbers in a column of a list or database that match conditions that you specify. - * - * Excel Function: - * DSUM(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DSUM($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_MathTrig::SUM( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DVAR - * - * Estimates the variance of a population based on a sample by using the numbers in a column - * of a list or database that match conditions that you specify. - * - * Excel Function: - * DVAR(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DVAR($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_Statistical::VARFunc( - self::getFilteredColumn($database, $field, $criteria) - ); - } - - - /** - * DVARP - * - * Calculates the variance of a population based on the entire population by using the numbers - * in a column of a list or database that match conditions that you specify. - * - * Excel Function: - * DVARP(database,field,criteria) - * - * @access public - * @category Database Functions - * @param mixed[] $database The range of cells that makes up the list or database. - * A database is a list of related data in which rows of related - * information are records, and columns of data are fields. The - * first row of the list contains labels for each column. - * @param string|integer $field Indicates which column is used in the function. Enter the - * column label enclosed between double quotation marks, such as - * "Age" or "Yield," or a number (without quotation marks) that - * represents the position of the column within the list: 1 for - * the first column, 2 for the second column, and so on. - * @param mixed[] $criteria The range of cells that contains the conditions you specify. - * You can use any range for the criteria argument, as long as it - * includes at least one column label and at least one cell below - * the column label in which you specify a condition for the - * column. - * @return float - * - */ - public static function DVARP($database, $field, $criteria) - { - $field = self::fieldExtract($database, $field); - if (is_null($field)) { - return null; - } - - // Return - return PHPExcel_Calculation_Statistical::VARP( - self::getFilteredColumn($database, $field, $criteria) - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php deleted file mode 100644 index 72f4c7a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/DateTime.php +++ /dev/null @@ -1,1553 +0,0 @@ -format('m'); - $oYear = (int) $PHPDateObject->format('Y'); - - $adjustmentMonthsString = (string) $adjustmentMonths; - if ($adjustmentMonths > 0) { - $adjustmentMonthsString = '+'.$adjustmentMonths; - } - if ($adjustmentMonths != 0) { - $PHPDateObject->modify($adjustmentMonthsString.' months'); - } - $nMonth = (int) $PHPDateObject->format('m'); - $nYear = (int) $PHPDateObject->format('Y'); - - $monthDiff = ($nMonth - $oMonth) + (($nYear - $oYear) * 12); - if ($monthDiff != $adjustmentMonths) { - $adjustDays = (int) $PHPDateObject->format('d'); - $adjustDaysString = '-'.$adjustDays.' days'; - $PHPDateObject->modify($adjustDaysString); - } - return $PHPDateObject; - } - - - /** - * DATETIMENOW - * - * Returns the current date and time. - * The NOW function is useful when you need to display the current date and time on a worksheet or - * calculate a value based on the current date and time, and have that value updated each time you - * open the worksheet. - * - * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date - * and time format of your regional settings. PHPExcel does not change cell formatting in this way. - * - * Excel Function: - * NOW() - * - * @access public - * @category Date/Time Functions - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function DATETIMENOW() - { - $saveTimeZone = date_default_timezone_get(); - date_default_timezone_set('UTC'); - $retValue = false; - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - $retValue = (float) PHPExcel_Shared_Date::PHPToExcel(time()); - break; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - $retValue = (integer) time(); - break; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - $retValue = new DateTime(); - break; - } - date_default_timezone_set($saveTimeZone); - - return $retValue; - } - - - /** - * DATENOW - * - * Returns the current date. - * The NOW function is useful when you need to display the current date and time on a worksheet or - * calculate a value based on the current date and time, and have that value updated each time you - * open the worksheet. - * - * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date - * and time format of your regional settings. PHPExcel does not change cell formatting in this way. - * - * Excel Function: - * TODAY() - * - * @access public - * @category Date/Time Functions - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function DATENOW() - { - $saveTimeZone = date_default_timezone_get(); - date_default_timezone_set('UTC'); - $retValue = false; - $excelDateTime = floor(PHPExcel_Shared_Date::PHPToExcel(time())); - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - $retValue = (float) $excelDateTime; - break; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - $retValue = (integer) PHPExcel_Shared_Date::ExcelToPHP($excelDateTime); - break; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - $retValue = PHPExcel_Shared_Date::ExcelToPHPObject($excelDateTime); - break; - } - date_default_timezone_set($saveTimeZone); - - return $retValue; - } - - - /** - * DATE - * - * The DATE function returns a value that represents a particular date. - * - * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date - * format of your regional settings. PHPExcel does not change cell formatting in this way. - * - * Excel Function: - * DATE(year,month,day) - * - * PHPExcel is a lot more forgiving than MS Excel when passing non numeric values to this function. - * A Month name or abbreviation (English only at this point) such as 'January' or 'Jan' will still be accepted, - * as will a day value with a suffix (e.g. '21st' rather than simply 21); again only English language. - * - * @access public - * @category Date/Time Functions - * @param integer $year The value of the year argument can include one to four digits. - * Excel interprets the year argument according to the configured - * date system: 1900 or 1904. - * If year is between 0 (zero) and 1899 (inclusive), Excel adds that - * value to 1900 to calculate the year. For example, DATE(108,1,2) - * returns January 2, 2008 (1900+108). - * If year is between 1900 and 9999 (inclusive), Excel uses that - * value as the year. For example, DATE(2008,1,2) returns January 2, - * 2008. - * If year is less than 0 or is 10000 or greater, Excel returns the - * #NUM! error value. - * @param integer $month A positive or negative integer representing the month of the year - * from 1 to 12 (January to December). - * If month is greater than 12, month adds that number of months to - * the first month in the year specified. For example, DATE(2008,14,2) - * returns the serial number representing February 2, 2009. - * If month is less than 1, month subtracts the magnitude of that - * number of months, plus 1, from the first month in the year - * specified. For example, DATE(2008,-3,2) returns the serial number - * representing September 2, 2007. - * @param integer $day A positive or negative integer representing the day of the month - * from 1 to 31. - * If day is greater than the number of days in the month specified, - * day adds that number of days to the first day in the month. For - * example, DATE(2008,1,35) returns the serial number representing - * February 4, 2008. - * If day is less than 1, day subtracts the magnitude that number of - * days, plus one, from the first day of the month specified. For - * example, DATE(2008,1,-15) returns the serial number representing - * December 16, 2007. - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function DATE($year = 0, $month = 1, $day = 1) - { - $year = PHPExcel_Calculation_Functions::flattenSingleValue($year); - $month = PHPExcel_Calculation_Functions::flattenSingleValue($month); - $day = PHPExcel_Calculation_Functions::flattenSingleValue($day); - - if (($month !== null) && (!is_numeric($month))) { - $month = PHPExcel_Shared_Date::monthStringToNumber($month); - } - - if (($day !== null) && (!is_numeric($day))) { - $day = PHPExcel_Shared_Date::dayStringToNumber($day); - } - - $year = ($year !== null) ? PHPExcel_Shared_String::testStringAsNumeric($year) : 0; - $month = ($month !== null) ? PHPExcel_Shared_String::testStringAsNumeric($month) : 0; - $day = ($day !== null) ? PHPExcel_Shared_String::testStringAsNumeric($day) : 0; - if ((!is_numeric($year)) || - (!is_numeric($month)) || - (!is_numeric($day))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $year = (integer) $year; - $month = (integer) $month; - $day = (integer) $day; - - $baseYear = PHPExcel_Shared_Date::getExcelCalendar(); - // Validate parameters - if ($year < ($baseYear-1900)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ((($baseYear-1900) != 0) && ($year < $baseYear) && ($year >= 1900)) { - return PHPExcel_Calculation_Functions::NaN(); - } - - if (($year < $baseYear) && ($year >= ($baseYear-1900))) { - $year += 1900; - } - - if ($month < 1) { - // Handle year/month adjustment if month < 1 - --$month; - $year += ceil($month / 12) - 1; - $month = 13 - abs($month % 12); - } elseif ($month > 12) { - // Handle year/month adjustment if month > 12 - $year += floor($month / 12); - $month = ($month % 12); - } - - // Re-validate the year parameter after adjustments - if (($year < $baseYear) || ($year >= 10000)) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Execute function - $excelDateValue = PHPExcel_Shared_Date::FormattedPHPToExcel($year, $month, $day); - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - return (float) $excelDateValue; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - return (integer) PHPExcel_Shared_Date::ExcelToPHP($excelDateValue); - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - return PHPExcel_Shared_Date::ExcelToPHPObject($excelDateValue); - } - } - - - /** - * TIME - * - * The TIME function returns a value that represents a particular time. - * - * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time - * format of your regional settings. PHPExcel does not change cell formatting in this way. - * - * Excel Function: - * TIME(hour,minute,second) - * - * @access public - * @category Date/Time Functions - * @param integer $hour A number from 0 (zero) to 32767 representing the hour. - * Any value greater than 23 will be divided by 24 and the remainder - * will be treated as the hour value. For example, TIME(27,0,0) = - * TIME(3,0,0) = .125 or 3:00 AM. - * @param integer $minute A number from 0 to 32767 representing the minute. - * Any value greater than 59 will be converted to hours and minutes. - * For example, TIME(0,750,0) = TIME(12,30,0) = .520833 or 12:30 PM. - * @param integer $second A number from 0 to 32767 representing the second. - * Any value greater than 59 will be converted to hours, minutes, - * and seconds. For example, TIME(0,0,2000) = TIME(0,33,22) = .023148 - * or 12:33:20 AM - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function TIME($hour = 0, $minute = 0, $second = 0) - { - $hour = PHPExcel_Calculation_Functions::flattenSingleValue($hour); - $minute = PHPExcel_Calculation_Functions::flattenSingleValue($minute); - $second = PHPExcel_Calculation_Functions::flattenSingleValue($second); - - if ($hour == '') { - $hour = 0; - } - if ($minute == '') { - $minute = 0; - } - if ($second == '') { - $second = 0; - } - - if ((!is_numeric($hour)) || (!is_numeric($minute)) || (!is_numeric($second))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $hour = (integer) $hour; - $minute = (integer) $minute; - $second = (integer) $second; - - if ($second < 0) { - $minute += floor($second / 60); - $second = 60 - abs($second % 60); - if ($second == 60) { - $second = 0; - } - } elseif ($second >= 60) { - $minute += floor($second / 60); - $second = $second % 60; - } - if ($minute < 0) { - $hour += floor($minute / 60); - $minute = 60 - abs($minute % 60); - if ($minute == 60) { - $minute = 0; - } - } elseif ($minute >= 60) { - $hour += floor($minute / 60); - $minute = $minute % 60; - } - - if ($hour > 23) { - $hour = $hour % 24; - } elseif ($hour < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Execute function - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - $date = 0; - $calendar = PHPExcel_Shared_Date::getExcelCalendar(); - if ($calendar != PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900) { - $date = 1; - } - return (float) PHPExcel_Shared_Date::FormattedPHPToExcel($calendar, 1, $date, $hour, $minute, $second); - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - return (integer) PHPExcel_Shared_Date::ExcelToPHP(PHPExcel_Shared_Date::FormattedPHPToExcel(1970, 1, 1, $hour, $minute, $second)); // -2147468400; // -2147472000 + 3600 - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - $dayAdjust = 0; - if ($hour < 0) { - $dayAdjust = floor($hour / 24); - $hour = 24 - abs($hour % 24); - if ($hour == 24) { - $hour = 0; - } - } elseif ($hour >= 24) { - $dayAdjust = floor($hour / 24); - $hour = $hour % 24; - } - $phpDateObject = new DateTime('1900-01-01 '.$hour.':'.$minute.':'.$second); - if ($dayAdjust != 0) { - $phpDateObject->modify($dayAdjust.' days'); - } - return $phpDateObject; - } - } - - - /** - * DATEVALUE - * - * Returns a value that represents a particular date. - * Use DATEVALUE to convert a date represented by a text string to an Excel or PHP date/time stamp - * value. - * - * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the date - * format of your regional settings. PHPExcel does not change cell formatting in this way. - * - * Excel Function: - * DATEVALUE(dateValue) - * - * @access public - * @category Date/Time Functions - * @param string $dateValue Text that represents a date in a Microsoft Excel date format. - * For example, "1/30/2008" or "30-Jan-2008" are text strings within - * quotation marks that represent dates. Using the default date - * system in Excel for Windows, date_text must represent a date from - * January 1, 1900, to December 31, 9999. Using the default date - * system in Excel for the Macintosh, date_text must represent a date - * from January 1, 1904, to December 31, 9999. DATEVALUE returns the - * #VALUE! error value if date_text is out of this range. - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function DATEVALUE($dateValue = 1) - { - $dateValue = trim(PHPExcel_Calculation_Functions::flattenSingleValue($dateValue), '"'); - // Strip any ordinals because they're allowed in Excel (English only) - $dateValue = preg_replace('/(\d)(st|nd|rd|th)([ -\/])/Ui', '$1$3', $dateValue); - // Convert separators (/ . or space) to hyphens (should also handle dot used for ordinals in some countries, e.g. Denmark, Germany) - $dateValue = str_replace(array('/', '.', '-', ' '), array(' ', ' ', ' ', ' '), $dateValue); - - $yearFound = false; - $t1 = explode(' ', $dateValue); - foreach ($t1 as &$t) { - if ((is_numeric($t)) && ($t > 31)) { - if ($yearFound) { - return PHPExcel_Calculation_Functions::VALUE(); - } else { - if ($t < 100) { - $t += 1900; - } - $yearFound = true; - } - } - } - if ((count($t1) == 1) && (strpos($t, ':') != false)) { - // We've been fed a time value without any date - return 0.0; - } elseif (count($t1) == 2) { - // We only have two parts of the date: either day/month or month/year - if ($yearFound) { - array_unshift($t1, 1); - } else { - array_push($t1, date('Y')); - } - } - unset($t); - $dateValue = implode(' ', $t1); - - $PHPDateArray = date_parse($dateValue); - if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { - $testVal1 = strtok($dateValue, '- '); - if ($testVal1 !== false) { - $testVal2 = strtok('- '); - if ($testVal2 !== false) { - $testVal3 = strtok('- '); - if ($testVal3 === false) { - $testVal3 = strftime('%Y'); - } - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - $PHPDateArray = date_parse($testVal1.'-'.$testVal2.'-'.$testVal3); - if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { - $PHPDateArray = date_parse($testVal2.'-'.$testVal1.'-'.$testVal3); - if (($PHPDateArray === false) || ($PHPDateArray['error_count'] > 0)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - } - - if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) { - // Execute function - if ($PHPDateArray['year'] == '') { - $PHPDateArray['year'] = strftime('%Y'); - } - if ($PHPDateArray['year'] < 1900) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if ($PHPDateArray['month'] == '') { - $PHPDateArray['month'] = strftime('%m'); - } - if ($PHPDateArray['day'] == '') { - $PHPDateArray['day'] = strftime('%d'); - } - $excelDateValue = floor( - PHPExcel_Shared_Date::FormattedPHPToExcel( - $PHPDateArray['year'], - $PHPDateArray['month'], - $PHPDateArray['day'], - $PHPDateArray['hour'], - $PHPDateArray['minute'], - $PHPDateArray['second'] - ) - ); - - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - return (float) $excelDateValue; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - return (integer) PHPExcel_Shared_Date::ExcelToPHP($excelDateValue); - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - return new DateTime($PHPDateArray['year'].'-'.$PHPDateArray['month'].'-'.$PHPDateArray['day'].' 00:00:00'); - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * TIMEVALUE - * - * Returns a value that represents a particular time. - * Use TIMEVALUE to convert a time represented by a text string to an Excel or PHP date/time stamp - * value. - * - * NOTE: When used in a Cell Formula, MS Excel changes the cell format so that it matches the time - * format of your regional settings. PHPExcel does not change cell formatting in this way. - * - * Excel Function: - * TIMEVALUE(timeValue) - * - * @access public - * @category Date/Time Functions - * @param string $timeValue A text string that represents a time in any one of the Microsoft - * Excel time formats; for example, "6:45 PM" and "18:45" text strings - * within quotation marks that represent time. - * Date information in time_text is ignored. - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function TIMEVALUE($timeValue) - { - $timeValue = trim(PHPExcel_Calculation_Functions::flattenSingleValue($timeValue), '"'); - $timeValue = str_replace(array('/', '.'), array('-', '-'), $timeValue); - - $PHPDateArray = date_parse($timeValue); - if (($PHPDateArray !== false) && ($PHPDateArray['error_count'] == 0)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $excelDateValue = PHPExcel_Shared_Date::FormattedPHPToExcel( - $PHPDateArray['year'], - $PHPDateArray['month'], - $PHPDateArray['day'], - $PHPDateArray['hour'], - $PHPDateArray['minute'], - $PHPDateArray['second'] - ); - } else { - $excelDateValue = PHPExcel_Shared_Date::FormattedPHPToExcel(1900, 1, 1, $PHPDateArray['hour'], $PHPDateArray['minute'], $PHPDateArray['second']) - 1; - } - - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - return (float) $excelDateValue; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - return (integer) $phpDateValue = PHPExcel_Shared_Date::ExcelToPHP($excelDateValue+25569) - 3600; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - return new DateTime('1900-01-01 '.$PHPDateArray['hour'].':'.$PHPDateArray['minute'].':'.$PHPDateArray['second']); - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * DATEDIF - * - * @param mixed $startDate Excel date serial value, PHP date/time stamp, PHP DateTime object - * or a standard date string - * @param mixed $endDate Excel date serial value, PHP date/time stamp, PHP DateTime object - * or a standard date string - * @param string $unit - * @return integer Interval between the dates - */ - public static function DATEDIF($startDate = 0, $endDate = 0, $unit = 'D') - { - $startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate); - $endDate = PHPExcel_Calculation_Functions::flattenSingleValue($endDate); - $unit = strtoupper(PHPExcel_Calculation_Functions::flattenSingleValue($unit)); - - if (is_string($startDate = self::getDateValue($startDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($endDate = self::getDateValue($endDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Validate parameters - if ($startDate >= $endDate) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Execute function - $difference = $endDate - $startDate; - - $PHPStartDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($startDate); - $startDays = $PHPStartDateObject->format('j'); - $startMonths = $PHPStartDateObject->format('n'); - $startYears = $PHPStartDateObject->format('Y'); - - $PHPEndDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($endDate); - $endDays = $PHPEndDateObject->format('j'); - $endMonths = $PHPEndDateObject->format('n'); - $endYears = $PHPEndDateObject->format('Y'); - - $retVal = PHPExcel_Calculation_Functions::NaN(); - switch ($unit) { - case 'D': - $retVal = intval($difference); - break; - case 'M': - $retVal = intval($endMonths - $startMonths) + (intval($endYears - $startYears) * 12); - // We're only interested in full months - if ($endDays < $startDays) { - --$retVal; - } - break; - case 'Y': - $retVal = intval($endYears - $startYears); - // We're only interested in full months - if ($endMonths < $startMonths) { - --$retVal; - } elseif (($endMonths == $startMonths) && ($endDays < $startDays)) { - --$retVal; - } - break; - case 'MD': - if ($endDays < $startDays) { - $retVal = $endDays; - $PHPEndDateObject->modify('-'.$endDays.' days'); - $adjustDays = $PHPEndDateObject->format('j'); - if ($adjustDays > $startDays) { - $retVal += ($adjustDays - $startDays); - } - } else { - $retVal = $endDays - $startDays; - } - break; - case 'YM': - $retVal = intval($endMonths - $startMonths); - if ($retVal < 0) { - $retVal += 12; - } - // We're only interested in full months - if ($endDays < $startDays) { - --$retVal; - } - break; - case 'YD': - $retVal = intval($difference); - if ($endYears > $startYears) { - while ($endYears > $startYears) { - $PHPEndDateObject->modify('-1 year'); - $endYears = $PHPEndDateObject->format('Y'); - } - $retVal = $PHPEndDateObject->format('z') - $PHPStartDateObject->format('z'); - if ($retVal < 0) { - $retVal += 365; - } - } - break; - default: - $retVal = PHPExcel_Calculation_Functions::NaN(); - } - return $retVal; - } - - - /** - * DAYS360 - * - * Returns the number of days between two dates based on a 360-day year (twelve 30-day months), - * which is used in some accounting calculations. Use this function to help compute payments if - * your accounting system is based on twelve 30-day months. - * - * Excel Function: - * DAYS360(startDate,endDate[,method]) - * - * @access public - * @category Date/Time Functions - * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param boolean $method US or European Method - * FALSE or omitted: U.S. (NASD) method. If the starting date is - * the last day of a month, it becomes equal to the 30th of the - * same month. If the ending date is the last day of a month and - * the starting date is earlier than the 30th of a month, the - * ending date becomes equal to the 1st of the next month; - * otherwise the ending date becomes equal to the 30th of the - * same month. - * TRUE: European method. Starting dates and ending dates that - * occur on the 31st of a month become equal to the 30th of the - * same month. - * @return integer Number of days between start date and end date - */ - public static function DAYS360($startDate = 0, $endDate = 0, $method = false) - { - $startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate); - $endDate = PHPExcel_Calculation_Functions::flattenSingleValue($endDate); - - if (is_string($startDate = self::getDateValue($startDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($endDate = self::getDateValue($endDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (!is_bool($method)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Execute function - $PHPStartDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($startDate); - $startDay = $PHPStartDateObject->format('j'); - $startMonth = $PHPStartDateObject->format('n'); - $startYear = $PHPStartDateObject->format('Y'); - - $PHPEndDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($endDate); - $endDay = $PHPEndDateObject->format('j'); - $endMonth = $PHPEndDateObject->format('n'); - $endYear = $PHPEndDateObject->format('Y'); - - return self::dateDiff360($startDay, $startMonth, $startYear, $endDay, $endMonth, $endYear, !$method); - } - - - /** - * YEARFRAC - * - * Calculates the fraction of the year represented by the number of whole days between two dates - * (the start_date and the end_date). - * Use the YEARFRAC worksheet function to identify the proportion of a whole year's benefits or - * obligations to assign to a specific term. - * - * Excel Function: - * YEARFRAC(startDate,endDate[,method]) - * - * @access public - * @category Date/Time Functions - * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param integer $method Method used for the calculation - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float fraction of the year - */ - public static function YEARFRAC($startDate = 0, $endDate = 0, $method = 0) - { - $startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate); - $endDate = PHPExcel_Calculation_Functions::flattenSingleValue($endDate); - $method = PHPExcel_Calculation_Functions::flattenSingleValue($method); - - if (is_string($startDate = self::getDateValue($startDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($endDate = self::getDateValue($endDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (((is_numeric($method)) && (!is_string($method))) || ($method == '')) { - switch ($method) { - case 0: - return self::DAYS360($startDate, $endDate) / 360; - case 1: - $days = self::DATEDIF($startDate, $endDate); - $startYear = self::YEAR($startDate); - $endYear = self::YEAR($endDate); - $years = $endYear - $startYear + 1; - $leapDays = 0; - if ($years == 1) { - if (self::isLeapYear($endYear)) { - $startMonth = self::MONTHOFYEAR($startDate); - $endMonth = self::MONTHOFYEAR($endDate); - $endDay = self::DAYOFMONTH($endDate); - if (($startMonth < 3) || - (($endMonth * 100 + $endDay) >= (2 * 100 + 29))) { - $leapDays += 1; - } - } - } else { - for ($year = $startYear; $year <= $endYear; ++$year) { - if ($year == $startYear) { - $startMonth = self::MONTHOFYEAR($startDate); - $startDay = self::DAYOFMONTH($startDate); - if ($startMonth < 3) { - $leapDays += (self::isLeapYear($year)) ? 1 : 0; - } - } elseif ($year == $endYear) { - $endMonth = self::MONTHOFYEAR($endDate); - $endDay = self::DAYOFMONTH($endDate); - if (($endMonth * 100 + $endDay) >= (2 * 100 + 29)) { - $leapDays += (self::isLeapYear($year)) ? 1 : 0; - } - } else { - $leapDays += (self::isLeapYear($year)) ? 1 : 0; - } - } - if ($years == 2) { - if (($leapDays == 0) && (self::isLeapYear($startYear)) && ($days > 365)) { - $leapDays = 1; - } elseif ($days < 366) { - $years = 1; - } - } - $leapDays /= $years; - } - return $days / (365 + $leapDays); - case 2: - return self::DATEDIF($startDate, $endDate) / 360; - case 3: - return self::DATEDIF($startDate, $endDate) / 365; - case 4: - return self::DAYS360($startDate, $endDate, true) / 360; - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * NETWORKDAYS - * - * Returns the number of whole working days between start_date and end_date. Working days - * exclude weekends and any dates identified in holidays. - * Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days - * worked during a specific term. - * - * Excel Function: - * NETWORKDAYS(startDate,endDate[,holidays[,holiday[,...]]]) - * - * @access public - * @category Date/Time Functions - * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param mixed $endDate Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param mixed $holidays,... Optional series of Excel date serial value (float), PHP date - * timestamp (integer), PHP DateTime object, or a standard date - * strings that will be excluded from the working calendar, such - * as state and federal holidays and floating holidays. - * @return integer Interval between the dates - */ - public static function NETWORKDAYS($startDate, $endDate) - { - // Retrieve the mandatory start and end date that are referenced in the function definition - $startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate); - $endDate = PHPExcel_Calculation_Functions::flattenSingleValue($endDate); - // Flush the mandatory start and end date that are referenced in the function definition, and get the optional days - $dateArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - array_shift($dateArgs); - array_shift($dateArgs); - - // Validate the start and end dates - if (is_string($startDate = $sDate = self::getDateValue($startDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $startDate = (float) floor($startDate); - if (is_string($endDate = $eDate = self::getDateValue($endDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $endDate = (float) floor($endDate); - - if ($sDate > $eDate) { - $startDate = $eDate; - $endDate = $sDate; - } - - // Execute function - $startDoW = 6 - self::DAYOFWEEK($startDate, 2); - if ($startDoW < 0) { - $startDoW = 0; - } - $endDoW = self::DAYOFWEEK($endDate, 2); - if ($endDoW >= 6) { - $endDoW = 0; - } - - $wholeWeekDays = floor(($endDate - $startDate) / 7) * 5; - $partWeekDays = $endDoW + $startDoW; - if ($partWeekDays > 5) { - $partWeekDays -= 5; - } - - // Test any extra holiday parameters - $holidayCountedArray = array(); - foreach ($dateArgs as $holidayDate) { - if (is_string($holidayDate = self::getDateValue($holidayDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) { - if ((self::DAYOFWEEK($holidayDate, 2) < 6) && (!in_array($holidayDate, $holidayCountedArray))) { - --$partWeekDays; - $holidayCountedArray[] = $holidayDate; - } - } - } - - if ($sDate > $eDate) { - return 0 - ($wholeWeekDays + $partWeekDays); - } - return $wholeWeekDays + $partWeekDays; - } - - - /** - * WORKDAY - * - * Returns the date that is the indicated number of working days before or after a date (the - * starting date). Working days exclude weekends and any dates identified as holidays. - * Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected - * delivery times, or the number of days of work performed. - * - * Excel Function: - * WORKDAY(startDate,endDays[,holidays[,holiday[,...]]]) - * - * @access public - * @category Date/Time Functions - * @param mixed $startDate Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param integer $endDays The number of nonweekend and nonholiday days before or after - * startDate. A positive value for days yields a future date; a - * negative value yields a past date. - * @param mixed $holidays,... Optional series of Excel date serial value (float), PHP date - * timestamp (integer), PHP DateTime object, or a standard date - * strings that will be excluded from the working calendar, such - * as state and federal holidays and floating holidays. - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function WORKDAY($startDate, $endDays) - { - // Retrieve the mandatory start date and days that are referenced in the function definition - $startDate = PHPExcel_Calculation_Functions::flattenSingleValue($startDate); - $endDays = PHPExcel_Calculation_Functions::flattenSingleValue($endDays); - // Flush the mandatory start date and days that are referenced in the function definition, and get the optional days - $dateArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - array_shift($dateArgs); - array_shift($dateArgs); - - if ((is_string($startDate = self::getDateValue($startDate))) || (!is_numeric($endDays))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $startDate = (float) floor($startDate); - $endDays = (int) floor($endDays); - // If endDays is 0, we always return startDate - if ($endDays == 0) { - return $startDate; - } - - $decrementing = ($endDays < 0) ? true : false; - - // Adjust the start date if it falls over a weekend - - $startDoW = self::DAYOFWEEK($startDate, 3); - if (self::DAYOFWEEK($startDate, 3) >= 5) { - $startDate += ($decrementing) ? -$startDoW + 4: 7 - $startDoW; - ($decrementing) ? $endDays++ : $endDays--; - } - - // Add endDays - $endDate = (float) $startDate + (intval($endDays / 5) * 7) + ($endDays % 5); - - // Adjust the calculated end date if it falls over a weekend - $endDoW = self::DAYOFWEEK($endDate, 3); - if ($endDoW >= 5) { - $endDate += ($decrementing) ? -$endDoW + 4: 7 - $endDoW; - } - - // Test any extra holiday parameters - if (!empty($dateArgs)) { - $holidayCountedArray = $holidayDates = array(); - foreach ($dateArgs as $holidayDate) { - if (($holidayDate !== null) && (trim($holidayDate) > '')) { - if (is_string($holidayDate = self::getDateValue($holidayDate))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (self::DAYOFWEEK($holidayDate, 3) < 5) { - $holidayDates[] = $holidayDate; - } - } - } - if ($decrementing) { - rsort($holidayDates, SORT_NUMERIC); - } else { - sort($holidayDates, SORT_NUMERIC); - } - foreach ($holidayDates as $holidayDate) { - if ($decrementing) { - if (($holidayDate <= $startDate) && ($holidayDate >= $endDate)) { - if (!in_array($holidayDate, $holidayCountedArray)) { - --$endDate; - $holidayCountedArray[] = $holidayDate; - } - } - } else { - if (($holidayDate >= $startDate) && ($holidayDate <= $endDate)) { - if (!in_array($holidayDate, $holidayCountedArray)) { - ++$endDate; - $holidayCountedArray[] = $holidayDate; - } - } - } - // Adjust the calculated end date if it falls over a weekend - $endDoW = self::DAYOFWEEK($endDate, 3); - if ($endDoW >= 5) { - $endDate += ($decrementing) ? -$endDoW + 4 : 7 - $endDoW; - } - } - } - - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - return (float) $endDate; - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - return (integer) PHPExcel_Shared_Date::ExcelToPHP($endDate); - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - return PHPExcel_Shared_Date::ExcelToPHPObject($endDate); - } - } - - - /** - * DAYOFMONTH - * - * Returns the day of the month, for a specified date. The day is given as an integer - * ranging from 1 to 31. - * - * Excel Function: - * DAY(dateValue) - * - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @return int Day of the month - */ - public static function DAYOFMONTH($dateValue = 1) - { - $dateValue = PHPExcel_Calculation_Functions::flattenSingleValue($dateValue); - - if ($dateValue === null) { - $dateValue = 1; - } elseif (is_string($dateValue = self::getDateValue($dateValue))) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ($dateValue == 0.0) { - return 0; - } elseif ($dateValue < 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Execute function - $PHPDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($dateValue); - - return (int) $PHPDateObject->format('j'); - } - - - /** - * DAYOFWEEK - * - * Returns the day of the week for a specified date. The day is given as an integer - * ranging from 0 to 7 (dependent on the requested style). - * - * Excel Function: - * WEEKDAY(dateValue[,style]) - * - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param int $style A number that determines the type of return value - * 1 or omitted Numbers 1 (Sunday) through 7 (Saturday). - * 2 Numbers 1 (Monday) through 7 (Sunday). - * 3 Numbers 0 (Monday) through 6 (Sunday). - * @return int Day of the week value - */ - public static function DAYOFWEEK($dateValue = 1, $style = 1) - { - $dateValue = PHPExcel_Calculation_Functions::flattenSingleValue($dateValue); - $style = PHPExcel_Calculation_Functions::flattenSingleValue($style); - - if (!is_numeric($style)) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif (($style < 1) || ($style > 3)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $style = floor($style); - - if ($dateValue === null) { - $dateValue = 1; - } elseif (is_string($dateValue = self::getDateValue($dateValue))) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ($dateValue < 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Execute function - $PHPDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($dateValue); - $DoW = $PHPDateObject->format('w'); - - $firstDay = 1; - switch ($style) { - case 1: - ++$DoW; - break; - case 2: - if ($DoW == 0) { - $DoW = 7; - } - break; - case 3: - if ($DoW == 0) { - $DoW = 7; - } - $firstDay = 0; - --$DoW; - break; - } - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL) { - // Test for Excel's 1900 leap year, and introduce the error as required - if (($PHPDateObject->format('Y') == 1900) && ($PHPDateObject->format('n') <= 2)) { - --$DoW; - if ($DoW < $firstDay) { - $DoW += 7; - } - } - } - - return (int) $DoW; - } - - - /** - * WEEKOFYEAR - * - * Returns the week of the year for a specified date. - * The WEEKNUM function considers the week containing January 1 to be the first week of the year. - * However, there is a European standard that defines the first week as the one with the majority - * of days (four or more) falling in the new year. This means that for years in which there are - * three days or less in the first week of January, the WEEKNUM function returns week numbers - * that are incorrect according to the European standard. - * - * Excel Function: - * WEEKNUM(dateValue[,style]) - * - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param boolean $method Week begins on Sunday or Monday - * 1 or omitted Week begins on Sunday. - * 2 Week begins on Monday. - * @return int Week Number - */ - public static function WEEKOFYEAR($dateValue = 1, $method = 1) - { - $dateValue = PHPExcel_Calculation_Functions::flattenSingleValue($dateValue); - $method = PHPExcel_Calculation_Functions::flattenSingleValue($method); - - if (!is_numeric($method)) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif (($method < 1) || ($method > 2)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $method = floor($method); - - if ($dateValue === null) { - $dateValue = 1; - } elseif (is_string($dateValue = self::getDateValue($dateValue))) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ($dateValue < 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Execute function - $PHPDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($dateValue); - $dayOfYear = $PHPDateObject->format('z'); - $dow = $PHPDateObject->format('w'); - $PHPDateObject->modify('-' . $dayOfYear . ' days'); - $dow = $PHPDateObject->format('w'); - $daysInFirstWeek = 7 - (($dow + (2 - $method)) % 7); - $dayOfYear -= $daysInFirstWeek; - $weekOfYear = ceil($dayOfYear / 7) + 1; - - return (int) $weekOfYear; - } - - - /** - * MONTHOFYEAR - * - * Returns the month of a date represented by a serial number. - * The month is given as an integer, ranging from 1 (January) to 12 (December). - * - * Excel Function: - * MONTH(dateValue) - * - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @return int Month of the year - */ - public static function MONTHOFYEAR($dateValue = 1) - { - $dateValue = PHPExcel_Calculation_Functions::flattenSingleValue($dateValue); - - if ($dateValue === null) { - $dateValue = 1; - } elseif (is_string($dateValue = self::getDateValue($dateValue))) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ($dateValue < 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Execute function - $PHPDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($dateValue); - - return (int) $PHPDateObject->format('n'); - } - - - /** - * YEAR - * - * Returns the year corresponding to a date. - * The year is returned as an integer in the range 1900-9999. - * - * Excel Function: - * YEAR(dateValue) - * - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @return int Year - */ - public static function YEAR($dateValue = 1) - { - $dateValue = PHPExcel_Calculation_Functions::flattenSingleValue($dateValue); - - if ($dateValue === null) { - $dateValue = 1; - } elseif (is_string($dateValue = self::getDateValue($dateValue))) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ($dateValue < 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Execute function - $PHPDateObject = PHPExcel_Shared_Date::ExcelToPHPObject($dateValue); - - return (int) $PHPDateObject->format('Y'); - } - - - /** - * HOUROFDAY - * - * Returns the hour of a time value. - * The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.). - * - * Excel Function: - * HOUR(timeValue) - * - * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard time string - * @return int Hour - */ - public static function HOUROFDAY($timeValue = 0) - { - $timeValue = PHPExcel_Calculation_Functions::flattenSingleValue($timeValue); - - if (!is_numeric($timeValue)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - $testVal = strtok($timeValue, '/-: '); - if (strlen($testVal) < strlen($timeValue)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - $timeValue = self::getTimeValue($timeValue); - if (is_string($timeValue)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - // Execute function - if ($timeValue >= 1) { - $timeValue = fmod($timeValue, 1); - } elseif ($timeValue < 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - $timeValue = PHPExcel_Shared_Date::ExcelToPHP($timeValue); - - return (int) gmdate('G', $timeValue); - } - - - /** - * MINUTEOFHOUR - * - * Returns the minutes of a time value. - * The minute is given as an integer, ranging from 0 to 59. - * - * Excel Function: - * MINUTE(timeValue) - * - * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard time string - * @return int Minute - */ - public static function MINUTEOFHOUR($timeValue = 0) - { - $timeValue = $timeTester = PHPExcel_Calculation_Functions::flattenSingleValue($timeValue); - - if (!is_numeric($timeValue)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - $testVal = strtok($timeValue, '/-: '); - if (strlen($testVal) < strlen($timeValue)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - $timeValue = self::getTimeValue($timeValue); - if (is_string($timeValue)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - // Execute function - if ($timeValue >= 1) { - $timeValue = fmod($timeValue, 1); - } elseif ($timeValue < 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - $timeValue = PHPExcel_Shared_Date::ExcelToPHP($timeValue); - - return (int) gmdate('i', $timeValue); - } - - - /** - * SECONDOFMINUTE - * - * Returns the seconds of a time value. - * The second is given as an integer in the range 0 (zero) to 59. - * - * Excel Function: - * SECOND(timeValue) - * - * @param mixed $timeValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard time string - * @return int Second - */ - public static function SECONDOFMINUTE($timeValue = 0) - { - $timeValue = PHPExcel_Calculation_Functions::flattenSingleValue($timeValue); - - if (!is_numeric($timeValue)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - $testVal = strtok($timeValue, '/-: '); - if (strlen($testVal) < strlen($timeValue)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - $timeValue = self::getTimeValue($timeValue); - if (is_string($timeValue)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - // Execute function - if ($timeValue >= 1) { - $timeValue = fmod($timeValue, 1); - } elseif ($timeValue < 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - $timeValue = PHPExcel_Shared_Date::ExcelToPHP($timeValue); - - return (int) gmdate('s', $timeValue); - } - - - /** - * EDATE - * - * Returns the serial number that represents the date that is the indicated number of months - * before or after a specified date (the start_date). - * Use EDATE to calculate maturity dates or due dates that fall on the same day of the month - * as the date of issue. - * - * Excel Function: - * EDATE(dateValue,adjustmentMonths) - * - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param int $adjustmentMonths The number of months before or after start_date. - * A positive value for months yields a future date; - * a negative value yields a past date. - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function EDATE($dateValue = 1, $adjustmentMonths = 0) - { - $dateValue = PHPExcel_Calculation_Functions::flattenSingleValue($dateValue); - $adjustmentMonths = PHPExcel_Calculation_Functions::flattenSingleValue($adjustmentMonths); - - if (!is_numeric($adjustmentMonths)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $adjustmentMonths = floor($adjustmentMonths); - - if (is_string($dateValue = self::getDateValue($dateValue))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Execute function - $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths); - - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - return (float) PHPExcel_Shared_Date::PHPToExcel($PHPDateObject); - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - return (integer) PHPExcel_Shared_Date::ExcelToPHP(PHPExcel_Shared_Date::PHPToExcel($PHPDateObject)); - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - return $PHPDateObject; - } - } - - - /** - * EOMONTH - * - * Returns the date value for the last day of the month that is the indicated number of months - * before or after start_date. - * Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month. - * - * Excel Function: - * EOMONTH(dateValue,adjustmentMonths) - * - * @param mixed $dateValue Excel date serial value (float), PHP date timestamp (integer), - * PHP DateTime object, or a standard date string - * @param int $adjustmentMonths The number of months before or after start_date. - * A positive value for months yields a future date; - * a negative value yields a past date. - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function EOMONTH($dateValue = 1, $adjustmentMonths = 0) - { - $dateValue = PHPExcel_Calculation_Functions::flattenSingleValue($dateValue); - $adjustmentMonths = PHPExcel_Calculation_Functions::flattenSingleValue($adjustmentMonths); - - if (!is_numeric($adjustmentMonths)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $adjustmentMonths = floor($adjustmentMonths); - - if (is_string($dateValue = self::getDateValue($dateValue))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Execute function - $PHPDateObject = self::adjustDateByMonths($dateValue, $adjustmentMonths+1); - $adjustDays = (int) $PHPDateObject->format('d'); - $adjustDaysString = '-' . $adjustDays . ' days'; - $PHPDateObject->modify($adjustDaysString); - - switch (PHPExcel_Calculation_Functions::getReturnDateType()) { - case PHPExcel_Calculation_Functions::RETURNDATE_EXCEL: - return (float) PHPExcel_Shared_Date::PHPToExcel($PHPDateObject); - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC: - return (integer) PHPExcel_Shared_Date::ExcelToPHP(PHPExcel_Shared_Date::PHPToExcel($PHPDateObject)); - case PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT: - return $PHPDateObject; - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php deleted file mode 100644 index 75e2784..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Engineering.php +++ /dev/null @@ -1,2650 +0,0 @@ - array('Group' => 'Mass', 'Unit Name' => 'Gram', 'AllowPrefix' => true), - 'sg' => array('Group' => 'Mass', 'Unit Name' => 'Slug', 'AllowPrefix' => false), - 'lbm' => array('Group' => 'Mass', 'Unit Name' => 'Pound mass (avoirdupois)', 'AllowPrefix' => false), - 'u' => array('Group' => 'Mass', 'Unit Name' => 'U (atomic mass unit)', 'AllowPrefix' => true), - 'ozm' => array('Group' => 'Mass', 'Unit Name' => 'Ounce mass (avoirdupois)', 'AllowPrefix' => false), - 'm' => array('Group' => 'Distance', 'Unit Name' => 'Meter', 'AllowPrefix' => true), - 'mi' => array('Group' => 'Distance', 'Unit Name' => 'Statute mile', 'AllowPrefix' => false), - 'Nmi' => array('Group' => 'Distance', 'Unit Name' => 'Nautical mile', 'AllowPrefix' => false), - 'in' => array('Group' => 'Distance', 'Unit Name' => 'Inch', 'AllowPrefix' => false), - 'ft' => array('Group' => 'Distance', 'Unit Name' => 'Foot', 'AllowPrefix' => false), - 'yd' => array('Group' => 'Distance', 'Unit Name' => 'Yard', 'AllowPrefix' => false), - 'ang' => array('Group' => 'Distance', 'Unit Name' => 'Angstrom', 'AllowPrefix' => true), - 'Pica' => array('Group' => 'Distance', 'Unit Name' => 'Pica (1/72 in)', 'AllowPrefix' => false), - 'yr' => array('Group' => 'Time', 'Unit Name' => 'Year', 'AllowPrefix' => false), - 'day' => array('Group' => 'Time', 'Unit Name' => 'Day', 'AllowPrefix' => false), - 'hr' => array('Group' => 'Time', 'Unit Name' => 'Hour', 'AllowPrefix' => false), - 'mn' => array('Group' => 'Time', 'Unit Name' => 'Minute', 'AllowPrefix' => false), - 'sec' => array('Group' => 'Time', 'Unit Name' => 'Second', 'AllowPrefix' => true), - 'Pa' => array('Group' => 'Pressure', 'Unit Name' => 'Pascal', 'AllowPrefix' => true), - 'p' => array('Group' => 'Pressure', 'Unit Name' => 'Pascal', 'AllowPrefix' => true), - 'atm' => array('Group' => 'Pressure', 'Unit Name' => 'Atmosphere', 'AllowPrefix' => true), - 'at' => array('Group' => 'Pressure', 'Unit Name' => 'Atmosphere', 'AllowPrefix' => true), - 'mmHg' => array('Group' => 'Pressure', 'Unit Name' => 'mm of Mercury', 'AllowPrefix' => true), - 'N' => array('Group' => 'Force', 'Unit Name' => 'Newton', 'AllowPrefix' => true), - 'dyn' => array('Group' => 'Force', 'Unit Name' => 'Dyne', 'AllowPrefix' => true), - 'dy' => array('Group' => 'Force', 'Unit Name' => 'Dyne', 'AllowPrefix' => true), - 'lbf' => array('Group' => 'Force', 'Unit Name' => 'Pound force', 'AllowPrefix' => false), - 'J' => array('Group' => 'Energy', 'Unit Name' => 'Joule', 'AllowPrefix' => true), - 'e' => array('Group' => 'Energy', 'Unit Name' => 'Erg', 'AllowPrefix' => true), - 'c' => array('Group' => 'Energy', 'Unit Name' => 'Thermodynamic calorie', 'AllowPrefix' => true), - 'cal' => array('Group' => 'Energy', 'Unit Name' => 'IT calorie', 'AllowPrefix' => true), - 'eV' => array('Group' => 'Energy', 'Unit Name' => 'Electron volt', 'AllowPrefix' => true), - 'ev' => array('Group' => 'Energy', 'Unit Name' => 'Electron volt', 'AllowPrefix' => true), - 'HPh' => array('Group' => 'Energy', 'Unit Name' => 'Horsepower-hour', 'AllowPrefix' => false), - 'hh' => array('Group' => 'Energy', 'Unit Name' => 'Horsepower-hour', 'AllowPrefix' => false), - 'Wh' => array('Group' => 'Energy', 'Unit Name' => 'Watt-hour', 'AllowPrefix' => true), - 'wh' => array('Group' => 'Energy', 'Unit Name' => 'Watt-hour', 'AllowPrefix' => true), - 'flb' => array('Group' => 'Energy', 'Unit Name' => 'Foot-pound', 'AllowPrefix' => false), - 'BTU' => array('Group' => 'Energy', 'Unit Name' => 'BTU', 'AllowPrefix' => false), - 'btu' => array('Group' => 'Energy', 'Unit Name' => 'BTU', 'AllowPrefix' => false), - 'HP' => array('Group' => 'Power', 'Unit Name' => 'Horsepower', 'AllowPrefix' => false), - 'h' => array('Group' => 'Power', 'Unit Name' => 'Horsepower', 'AllowPrefix' => false), - 'W' => array('Group' => 'Power', 'Unit Name' => 'Watt', 'AllowPrefix' => true), - 'w' => array('Group' => 'Power', 'Unit Name' => 'Watt', 'AllowPrefix' => true), - 'T' => array('Group' => 'Magnetism', 'Unit Name' => 'Tesla', 'AllowPrefix' => true), - 'ga' => array('Group' => 'Magnetism', 'Unit Name' => 'Gauss', 'AllowPrefix' => true), - 'C' => array('Group' => 'Temperature', 'Unit Name' => 'Celsius', 'AllowPrefix' => false), - 'cel' => array('Group' => 'Temperature', 'Unit Name' => 'Celsius', 'AllowPrefix' => false), - 'F' => array('Group' => 'Temperature', 'Unit Name' => 'Fahrenheit', 'AllowPrefix' => false), - 'fah' => array('Group' => 'Temperature', 'Unit Name' => 'Fahrenheit', 'AllowPrefix' => false), - 'K' => array('Group' => 'Temperature', 'Unit Name' => 'Kelvin', 'AllowPrefix' => false), - 'kel' => array('Group' => 'Temperature', 'Unit Name' => 'Kelvin', 'AllowPrefix' => false), - 'tsp' => array('Group' => 'Liquid', 'Unit Name' => 'Teaspoon', 'AllowPrefix' => false), - 'tbs' => array('Group' => 'Liquid', 'Unit Name' => 'Tablespoon', 'AllowPrefix' => false), - 'oz' => array('Group' => 'Liquid', 'Unit Name' => 'Fluid Ounce', 'AllowPrefix' => false), - 'cup' => array('Group' => 'Liquid', 'Unit Name' => 'Cup', 'AllowPrefix' => false), - 'pt' => array('Group' => 'Liquid', 'Unit Name' => 'U.S. Pint', 'AllowPrefix' => false), - 'us_pt' => array('Group' => 'Liquid', 'Unit Name' => 'U.S. Pint', 'AllowPrefix' => false), - 'uk_pt' => array('Group' => 'Liquid', 'Unit Name' => 'U.K. Pint', 'AllowPrefix' => false), - 'qt' => array('Group' => 'Liquid', 'Unit Name' => 'Quart', 'AllowPrefix' => false), - 'gal' => array('Group' => 'Liquid', 'Unit Name' => 'Gallon', 'AllowPrefix' => false), - 'l' => array('Group' => 'Liquid', 'Unit Name' => 'Litre', 'AllowPrefix' => true), - 'lt' => array('Group' => 'Liquid', 'Unit Name' => 'Litre', 'AllowPrefix' => true), - ); - - /** - * Details of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM() - * - * @var mixed[] - */ - private static $conversionMultipliers = array( - 'Y' => array('multiplier' => 1E24, 'name' => 'yotta'), - 'Z' => array('multiplier' => 1E21, 'name' => 'zetta'), - 'E' => array('multiplier' => 1E18, 'name' => 'exa'), - 'P' => array('multiplier' => 1E15, 'name' => 'peta'), - 'T' => array('multiplier' => 1E12, 'name' => 'tera'), - 'G' => array('multiplier' => 1E9, 'name' => 'giga'), - 'M' => array('multiplier' => 1E6, 'name' => 'mega'), - 'k' => array('multiplier' => 1E3, 'name' => 'kilo'), - 'h' => array('multiplier' => 1E2, 'name' => 'hecto'), - 'e' => array('multiplier' => 1E1, 'name' => 'deka'), - 'd' => array('multiplier' => 1E-1, 'name' => 'deci'), - 'c' => array('multiplier' => 1E-2, 'name' => 'centi'), - 'm' => array('multiplier' => 1E-3, 'name' => 'milli'), - 'u' => array('multiplier' => 1E-6, 'name' => 'micro'), - 'n' => array('multiplier' => 1E-9, 'name' => 'nano'), - 'p' => array('multiplier' => 1E-12, 'name' => 'pico'), - 'f' => array('multiplier' => 1E-15, 'name' => 'femto'), - 'a' => array('multiplier' => 1E-18, 'name' => 'atto'), - 'z' => array('multiplier' => 1E-21, 'name' => 'zepto'), - 'y' => array('multiplier' => 1E-24, 'name' => 'yocto'), - ); - - /** - * Details of the Units of measure conversion factors, organised by group - * - * @var mixed[] - */ - private static $unitConversions = array( - 'Mass' => array( - 'g' => array( - 'g' => 1.0, - 'sg' => 6.85220500053478E-05, - 'lbm' => 2.20462291469134E-03, - 'u' => 6.02217000000000E+23, - 'ozm' => 3.52739718003627E-02, - ), - 'sg' => array( - 'g' => 1.45938424189287E+04, - 'sg' => 1.0, - 'lbm' => 3.21739194101647E+01, - 'u' => 8.78866000000000E+27, - 'ozm' => 5.14782785944229E+02, - ), - 'lbm' => array( - 'g' => 4.5359230974881148E+02, - 'sg' => 3.10810749306493E-02, - 'lbm' => 1.0, - 'u' => 2.73161000000000E+26, - 'ozm' => 1.60000023429410E+01, - ), - 'u' => array( - 'g' => 1.66053100460465E-24, - 'sg' => 1.13782988532950E-28, - 'lbm' => 3.66084470330684E-27, - 'u' => 1.0, - 'ozm' => 5.85735238300524E-26, - ), - 'ozm' => array( - 'g' => 2.83495152079732E+01, - 'sg' => 1.94256689870811E-03, - 'lbm' => 6.24999908478882E-02, - 'u' => 1.70725600000000E+25, - 'ozm' => 1.0, - ), - ), - 'Distance' => array( - 'm' => array( - 'm' => 1.0, - 'mi' => 6.21371192237334E-04, - 'Nmi' => 5.39956803455724E-04, - 'in' => 3.93700787401575E+01, - 'ft' => 3.28083989501312E+00, - 'yd' => 1.09361329797891E+00, - 'ang' => 1.00000000000000E+10, - 'Pica' => 2.83464566929116E+03, - ), - 'mi' => array( - 'm' => 1.60934400000000E+03, - 'mi' => 1.0, - 'Nmi' => 8.68976241900648E-01, - 'in' => 6.33600000000000E+04, - 'ft' => 5.28000000000000E+03, - 'yd' => 1.76000000000000E+03, - 'ang' => 1.60934400000000E+13, - 'Pica' => 4.56191999999971E+06, - ), - 'Nmi' => array( - 'm' => 1.85200000000000E+03, - 'mi' => 1.15077944802354E+00, - 'Nmi' => 1.0, - 'in' => 7.29133858267717E+04, - 'ft' => 6.07611548556430E+03, - 'yd' => 2.02537182785694E+03, - 'ang' => 1.85200000000000E+13, - 'Pica' => 5.24976377952723E+06, - ), - 'in' => array( - 'm' => 2.54000000000000E-02, - 'mi' => 1.57828282828283E-05, - 'Nmi' => 1.37149028077754E-05, - 'in' => 1.0, - 'ft' => 8.33333333333333E-02, - 'yd' => 2.77777777686643E-02, - 'ang' => 2.54000000000000E+08, - 'Pica' => 7.19999999999955E+01, - ), - 'ft' => array( - 'm' => 3.04800000000000E-01, - 'mi' => 1.89393939393939E-04, - 'Nmi' => 1.64578833693305E-04, - 'in' => 1.20000000000000E+01, - 'ft' => 1.0, - 'yd' => 3.33333333223972E-01, - 'ang' => 3.04800000000000E+09, - 'Pica' => 8.63999999999946E+02, - ), - 'yd' => array( - 'm' => 9.14400000300000E-01, - 'mi' => 5.68181818368230E-04, - 'Nmi' => 4.93736501241901E-04, - 'in' => 3.60000000118110E+01, - 'ft' => 3.00000000000000E+00, - 'yd' => 1.0, - 'ang' => 9.14400000300000E+09, - 'Pica' => 2.59200000085023E+03, - ), - 'ang' => array( - 'm' => 1.00000000000000E-10, - 'mi' => 6.21371192237334E-14, - 'Nmi' => 5.39956803455724E-14, - 'in' => 3.93700787401575E-09, - 'ft' => 3.28083989501312E-10, - 'yd' => 1.09361329797891E-10, - 'ang' => 1.0, - 'Pica' => 2.83464566929116E-07, - ), - 'Pica' => array( - 'm' => 3.52777777777800E-04, - 'mi' => 2.19205948372629E-07, - 'Nmi' => 1.90484761219114E-07, - 'in' => 1.38888888888898E-02, - 'ft' => 1.15740740740748E-03, - 'yd' => 3.85802469009251E-04, - 'ang' => 3.52777777777800E+06, - 'Pica' => 1.0, - ), - ), - 'Time' => array( - 'yr' => array( - 'yr' => 1.0, - 'day' => 365.25, - 'hr' => 8766.0, - 'mn' => 525960.0, - 'sec' => 31557600.0, - ), - 'day' => array( - 'yr' => 2.73785078713210E-03, - 'day' => 1.0, - 'hr' => 24.0, - 'mn' => 1440.0, - 'sec' => 86400.0, - ), - 'hr' => array( - 'yr' => 1.14077116130504E-04, - 'day' => 4.16666666666667E-02, - 'hr' => 1.0, - 'mn' => 60.0, - 'sec' => 3600.0, - ), - 'mn' => array( - 'yr' => 1.90128526884174E-06, - 'day' => 6.94444444444444E-04, - 'hr' => 1.66666666666667E-02, - 'mn' => 1.0, - 'sec' => 60.0, - ), - 'sec' => array( - 'yr' => 3.16880878140289E-08, - 'day' => 1.15740740740741E-05, - 'hr' => 2.77777777777778E-04, - 'mn' => 1.66666666666667E-02, - 'sec' => 1.0, - ), - ), - 'Pressure' => array( - 'Pa' => array( - 'Pa' => 1.0, - 'p' => 1.0, - 'atm' => 9.86923299998193E-06, - 'at' => 9.86923299998193E-06, - 'mmHg' => 7.50061707998627E-03, - ), - 'p' => array( - 'Pa' => 1.0, - 'p' => 1.0, - 'atm' => 9.86923299998193E-06, - 'at' => 9.86923299998193E-06, - 'mmHg' => 7.50061707998627E-03, - ), - 'atm' => array( - 'Pa' => 1.01324996583000E+05, - 'p' => 1.01324996583000E+05, - 'atm' => 1.0, - 'at' => 1.0, - 'mmHg' => 760.0, - ), - 'at' => array( - 'Pa' => 1.01324996583000E+05, - 'p' => 1.01324996583000E+05, - 'atm' => 1.0, - 'at' => 1.0, - 'mmHg' => 760.0, - ), - 'mmHg' => array( - 'Pa' => 1.33322363925000E+02, - 'p' => 1.33322363925000E+02, - 'atm' => 1.31578947368421E-03, - 'at' => 1.31578947368421E-03, - 'mmHg' => 1.0, - ), - ), - 'Force' => array( - 'N' => array( - 'N' => 1.0, - 'dyn' => 1.0E+5, - 'dy' => 1.0E+5, - 'lbf' => 2.24808923655339E-01, - ), - 'dyn' => array( - 'N' => 1.0E-5, - 'dyn' => 1.0, - 'dy' => 1.0, - 'lbf' => 2.24808923655339E-06, - ), - 'dy' => array( - 'N' => 1.0E-5, - 'dyn' => 1.0, - 'dy' => 1.0, - 'lbf' => 2.24808923655339E-06, - ), - 'lbf' => array( - 'N' => 4.448222, - 'dyn' => 4.448222E+5, - 'dy' => 4.448222E+5, - 'lbf' => 1.0, - ), - ), - 'Energy' => array( - 'J' => array( - 'J' => 1.0, - 'e' => 9.99999519343231E+06, - 'c' => 2.39006249473467E-01, - 'cal' => 2.38846190642017E-01, - 'eV' => 6.24145700000000E+18, - 'ev' => 6.24145700000000E+18, - 'HPh' => 3.72506430801000E-07, - 'hh' => 3.72506430801000E-07, - 'Wh' => 2.77777916238711E-04, - 'wh' => 2.77777916238711E-04, - 'flb' => 2.37304222192651E+01, - 'BTU' => 9.47815067349015E-04, - 'btu' => 9.47815067349015E-04, - ), - 'e' => array( - 'J' => 1.00000048065700E-07, - 'e' => 1.0, - 'c' => 2.39006364353494E-08, - 'cal' => 2.38846305445111E-08, - 'eV' => 6.24146000000000E+11, - 'ev' => 6.24146000000000E+11, - 'HPh' => 3.72506609848824E-14, - 'hh' => 3.72506609848824E-14, - 'Wh' => 2.77778049754611E-11, - 'wh' => 2.77778049754611E-11, - 'flb' => 2.37304336254586E-06, - 'BTU' => 9.47815522922962E-11, - 'btu' => 9.47815522922962E-11, - ), - 'c' => array( - 'J' => 4.18399101363672E+00, - 'e' => 4.18398900257312E+07, - 'c' => 1.0, - 'cal' => 9.99330315287563E-01, - 'eV' => 2.61142000000000E+19, - 'ev' => 2.61142000000000E+19, - 'HPh' => 1.55856355899327E-06, - 'hh' => 1.55856355899327E-06, - 'Wh' => 1.16222030532950E-03, - 'wh' => 1.16222030532950E-03, - 'flb' => 9.92878733152102E+01, - 'BTU' => 3.96564972437776E-03, - 'btu' => 3.96564972437776E-03, - ), - 'cal' => array( - 'J' => 4.18679484613929E+00, - 'e' => 4.18679283372801E+07, - 'c' => 1.00067013349059E+00, - 'cal' => 1.0, - 'eV' => 2.61317000000000E+19, - 'ev' => 2.61317000000000E+19, - 'HPh' => 1.55960800463137E-06, - 'hh' => 1.55960800463137E-06, - 'Wh' => 1.16299914807955E-03, - 'wh' => 1.16299914807955E-03, - 'flb' => 9.93544094443283E+01, - 'BTU' => 3.96830723907002E-03, - 'btu' => 3.96830723907002E-03, - ), - 'eV' => array( - 'J' => 1.60219000146921E-19, - 'e' => 1.60218923136574E-12, - 'c' => 3.82933423195043E-20, - 'cal' => 3.82676978535648E-20, - 'eV' => 1.0, - 'ev' => 1.0, - 'HPh' => 5.96826078912344E-26, - 'hh' => 5.96826078912344E-26, - 'Wh' => 4.45053000026614E-23, - 'wh' => 4.45053000026614E-23, - 'flb' => 3.80206452103492E-18, - 'BTU' => 1.51857982414846E-22, - 'btu' => 1.51857982414846E-22, - ), - 'ev' => array( - 'J' => 1.60219000146921E-19, - 'e' => 1.60218923136574E-12, - 'c' => 3.82933423195043E-20, - 'cal' => 3.82676978535648E-20, - 'eV' => 1.0, - 'ev' => 1.0, - 'HPh' => 5.96826078912344E-26, - 'hh' => 5.96826078912344E-26, - 'Wh' => 4.45053000026614E-23, - 'wh' => 4.45053000026614E-23, - 'flb' => 3.80206452103492E-18, - 'BTU' => 1.51857982414846E-22, - 'btu' => 1.51857982414846E-22, - ), - 'HPh' => array( - 'J' => 2.68451741316170E+06, - 'e' => 2.68451612283024E+13, - 'c' => 6.41616438565991E+05, - 'cal' => 6.41186757845835E+05, - 'eV' => 1.67553000000000E+25, - 'ev' => 1.67553000000000E+25, - 'HPh' => 1.0, - 'hh' => 1.0, - 'Wh' => 7.45699653134593E+02, - 'wh' => 7.45699653134593E+02, - 'flb' => 6.37047316692964E+07, - 'BTU' => 2.54442605275546E+03, - 'btu' => 2.54442605275546E+03, - ), - 'hh' => array( - 'J' => 2.68451741316170E+06, - 'e' => 2.68451612283024E+13, - 'c' => 6.41616438565991E+05, - 'cal' => 6.41186757845835E+05, - 'eV' => 1.67553000000000E+25, - 'ev' => 1.67553000000000E+25, - 'HPh' => 1.0, - 'hh' => 1.0, - 'Wh' => 7.45699653134593E+02, - 'wh' => 7.45699653134593E+02, - 'flb' => 6.37047316692964E+07, - 'BTU' => 2.54442605275546E+03, - 'btu' => 2.54442605275546E+03, - ), - 'Wh' => array( - 'J' => 3.59999820554720E+03, - 'e' => 3.59999647518369E+10, - 'c' => 8.60422069219046E+02, - 'cal' => 8.59845857713046E+02, - 'eV' => 2.24692340000000E+22, - 'ev' => 2.24692340000000E+22, - 'HPh' => 1.34102248243839E-03, - 'hh' => 1.34102248243839E-03, - 'Wh' => 1.0, - 'wh' => 1.0, - 'flb' => 8.54294774062316E+04, - 'BTU' => 3.41213254164705E+00, - 'btu' => 3.41213254164705E+00, - ), - 'wh' => array( - 'J' => 3.59999820554720E+03, - 'e' => 3.59999647518369E+10, - 'c' => 8.60422069219046E+02, - 'cal' => 8.59845857713046E+02, - 'eV' => 2.24692340000000E+22, - 'ev' => 2.24692340000000E+22, - 'HPh' => 1.34102248243839E-03, - 'hh' => 1.34102248243839E-03, - 'Wh' => 1.0, - 'wh' => 1.0, - 'flb' => 8.54294774062316E+04, - 'BTU' => 3.41213254164705E+00, - 'btu' => 3.41213254164705E+00, - ), - 'flb' => array( - 'J' => 4.21400003236424E-02, - 'e' => 4.21399800687660E+05, - 'c' => 1.00717234301644E-02, - 'cal' => 1.00649785509554E-02, - 'eV' => 2.63015000000000E+17, - 'ev' => 2.63015000000000E+17, - 'HPh' => 1.56974211145130E-08, - 'hh' => 1.56974211145130E-08, - 'Wh' => 1.17055614802000E-05, - 'wh' => 1.17055614802000E-05, - 'flb' => 1.0, - 'BTU' => 3.99409272448406E-05, - 'btu' => 3.99409272448406E-05, - ), - 'BTU' => array( - 'J' => 1.05505813786749E+03, - 'e' => 1.05505763074665E+10, - 'c' => 2.52165488508168E+02, - 'cal' => 2.51996617135510E+02, - 'eV' => 6.58510000000000E+21, - 'ev' => 6.58510000000000E+21, - 'HPh' => 3.93015941224568E-04, - 'hh' => 3.93015941224568E-04, - 'Wh' => 2.93071851047526E-01, - 'wh' => 2.93071851047526E-01, - 'flb' => 2.50369750774671E+04, - 'BTU' => 1.0, - 'btu' => 1.0, - ), - 'btu' => array( - 'J' => 1.05505813786749E+03, - 'e' => 1.05505763074665E+10, - 'c' => 2.52165488508168E+02, - 'cal' => 2.51996617135510E+02, - 'eV' => 6.58510000000000E+21, - 'ev' => 6.58510000000000E+21, - 'HPh' => 3.93015941224568E-04, - 'hh' => 3.93015941224568E-04, - 'Wh' => 2.93071851047526E-01, - 'wh' => 2.93071851047526E-01, - 'flb' => 2.50369750774671E+04, - 'BTU' => 1.0, - 'btu' => 1.0, - ), - ), - 'Power' => array( - 'HP' => array( - 'HP' => 1.0, - 'h' => 1.0, - 'W' => 7.45701000000000E+02, - 'w' => 7.45701000000000E+02, - ), - 'h' => array( - 'HP' => 1.0, - 'h' => 1.0, - 'W' => 7.45701000000000E+02, - 'w' => 7.45701000000000E+02, - ), - 'W' => array( - 'HP' => 1.34102006031908E-03, - 'h' => 1.34102006031908E-03, - 'W' => 1.0, - 'w' => 1.0, - ), - 'w' => array( - 'HP' => 1.34102006031908E-03, - 'h' => 1.34102006031908E-03, - 'W' => 1.0, - 'w' => 1.0, - ), - ), - 'Magnetism' => array( - 'T' => array( - 'T' => 1.0, - 'ga' => 10000.0, - ), - 'ga' => array( - 'T' => 0.0001, - 'ga' => 1.0, - ), - ), - 'Liquid' => array( - 'tsp' => array( - 'tsp' => 1.0, - 'tbs' => 3.33333333333333E-01, - 'oz' => 1.66666666666667E-01, - 'cup' => 2.08333333333333E-02, - 'pt' => 1.04166666666667E-02, - 'us_pt' => 1.04166666666667E-02, - 'uk_pt' => 8.67558516821960E-03, - 'qt' => 5.20833333333333E-03, - 'gal' => 1.30208333333333E-03, - 'l' => 4.92999408400710E-03, - 'lt' => 4.92999408400710E-03, - ), - 'tbs' => array( - 'tsp' => 3.00000000000000E+00, - 'tbs' => 1.0, - 'oz' => 5.00000000000000E-01, - 'cup' => 6.25000000000000E-02, - 'pt' => 3.12500000000000E-02, - 'us_pt' => 3.12500000000000E-02, - 'uk_pt' => 2.60267555046588E-02, - 'qt' => 1.56250000000000E-02, - 'gal' => 3.90625000000000E-03, - 'l' => 1.47899822520213E-02, - 'lt' => 1.47899822520213E-02, - ), - 'oz' => array( - 'tsp' => 6.00000000000000E+00, - 'tbs' => 2.00000000000000E+00, - 'oz' => 1.0, - 'cup' => 1.25000000000000E-01, - 'pt' => 6.25000000000000E-02, - 'us_pt' => 6.25000000000000E-02, - 'uk_pt' => 5.20535110093176E-02, - 'qt' => 3.12500000000000E-02, - 'gal' => 7.81250000000000E-03, - 'l' => 2.95799645040426E-02, - 'lt' => 2.95799645040426E-02, - ), - 'cup' => array( - 'tsp' => 4.80000000000000E+01, - 'tbs' => 1.60000000000000E+01, - 'oz' => 8.00000000000000E+00, - 'cup' => 1.0, - 'pt' => 5.00000000000000E-01, - 'us_pt' => 5.00000000000000E-01, - 'uk_pt' => 4.16428088074541E-01, - 'qt' => 2.50000000000000E-01, - 'gal' => 6.25000000000000E-02, - 'l' => 2.36639716032341E-01, - 'lt' => 2.36639716032341E-01, - ), - 'pt' => array( - 'tsp' => 9.60000000000000E+01, - 'tbs' => 3.20000000000000E+01, - 'oz' => 1.60000000000000E+01, - 'cup' => 2.00000000000000E+00, - 'pt' => 1.0, - 'us_pt' => 1.0, - 'uk_pt' => 8.32856176149081E-01, - 'qt' => 5.00000000000000E-01, - 'gal' => 1.25000000000000E-01, - 'l' => 4.73279432064682E-01, - 'lt' => 4.73279432064682E-01, - ), - 'us_pt' => array( - 'tsp' => 9.60000000000000E+01, - 'tbs' => 3.20000000000000E+01, - 'oz' => 1.60000000000000E+01, - 'cup' => 2.00000000000000E+00, - 'pt' => 1.0, - 'us_pt' => 1.0, - 'uk_pt' => 8.32856176149081E-01, - 'qt' => 5.00000000000000E-01, - 'gal' => 1.25000000000000E-01, - 'l' => 4.73279432064682E-01, - 'lt' => 4.73279432064682E-01, - ), - 'uk_pt' => array( - 'tsp' => 1.15266000000000E+02, - 'tbs' => 3.84220000000000E+01, - 'oz' => 1.92110000000000E+01, - 'cup' => 2.40137500000000E+00, - 'pt' => 1.20068750000000E+00, - 'us_pt' => 1.20068750000000E+00, - 'uk_pt' => 1.0, - 'qt' => 6.00343750000000E-01, - 'gal' => 1.50085937500000E-01, - 'l' => 5.68260698087162E-01, - 'lt' => 5.68260698087162E-01, - ), - 'qt' => array( - 'tsp' => 1.92000000000000E+02, - 'tbs' => 6.40000000000000E+01, - 'oz' => 3.20000000000000E+01, - 'cup' => 4.00000000000000E+00, - 'pt' => 2.00000000000000E+00, - 'us_pt' => 2.00000000000000E+00, - 'uk_pt' => 1.66571235229816E+00, - 'qt' => 1.0, - 'gal' => 2.50000000000000E-01, - 'l' => 9.46558864129363E-01, - 'lt' => 9.46558864129363E-01, - ), - 'gal' => array( - 'tsp' => 7.68000000000000E+02, - 'tbs' => 2.56000000000000E+02, - 'oz' => 1.28000000000000E+02, - 'cup' => 1.60000000000000E+01, - 'pt' => 8.00000000000000E+00, - 'us_pt' => 8.00000000000000E+00, - 'uk_pt' => 6.66284940919265E+00, - 'qt' => 4.00000000000000E+00, - 'gal' => 1.0, - 'l' => 3.78623545651745E+00, - 'lt' => 3.78623545651745E+00, - ), - 'l' => array( - 'tsp' => 2.02840000000000E+02, - 'tbs' => 6.76133333333333E+01, - 'oz' => 3.38066666666667E+01, - 'cup' => 4.22583333333333E+00, - 'pt' => 2.11291666666667E+00, - 'us_pt' => 2.11291666666667E+00, - 'uk_pt' => 1.75975569552166E+00, - 'qt' => 1.05645833333333E+00, - 'gal' => 2.64114583333333E-01, - 'l' => 1.0, - 'lt' => 1.0, - ), - 'lt' => array( - 'tsp' => 2.02840000000000E+02, - 'tbs' => 6.76133333333333E+01, - 'oz' => 3.38066666666667E+01, - 'cup' => 4.22583333333333E+00, - 'pt' => 2.11291666666667E+00, - 'us_pt' => 2.11291666666667E+00, - 'uk_pt' => 1.75975569552166E+00, - 'qt' => 1.05645833333333E+00, - 'gal' => 2.64114583333333E-01, - 'l' => 1.0, - 'lt' => 1.0, - ), - ), - ); - - - /** - * parseComplex - * - * Parses a complex number into its real and imaginary parts, and an I or J suffix - * - * @param string $complexNumber The complex number - * @return string[] Indexed on "real", "imaginary" and "suffix" - */ - public static function parseComplex($complexNumber) - { - $workString = (string) $complexNumber; - - $realNumber = $imaginary = 0; - // Extract the suffix, if there is one - $suffix = substr($workString, -1); - if (!is_numeric($suffix)) { - $workString = substr($workString, 0, -1); - } else { - $suffix = ''; - } - - // Split the input into its Real and Imaginary components - $leadingSign = 0; - if (strlen($workString) > 0) { - $leadingSign = (($workString{0} == '+') || ($workString{0} == '-')) ? 1 : 0; - } - $power = ''; - $realNumber = strtok($workString, '+-'); - if (strtoupper(substr($realNumber, -1)) == 'E') { - $power = strtok('+-'); - ++$leadingSign; - } - - $realNumber = substr($workString, 0, strlen($realNumber)+strlen($power)+$leadingSign); - - if ($suffix != '') { - $imaginary = substr($workString, strlen($realNumber)); - - if (($imaginary == '') && (($realNumber == '') || ($realNumber == '+') || ($realNumber == '-'))) { - $imaginary = $realNumber.'1'; - $realNumber = '0'; - } elseif ($imaginary == '') { - $imaginary = $realNumber; - $realNumber = '0'; - } elseif (($imaginary == '+') || ($imaginary == '-')) { - $imaginary .= '1'; - } - } - - return array( - 'real' => $realNumber, - 'imaginary' => $imaginary, - 'suffix' => $suffix - ); - } - - - /** - * Cleans the leading characters in a complex number string - * - * @param string $complexNumber The complex number to clean - * @return string The "cleaned" complex number - */ - private static function cleanComplex($complexNumber) - { - if ($complexNumber{0} == '+') { - $complexNumber = substr($complexNumber, 1); - } - if ($complexNumber{0} == '0') { - $complexNumber = substr($complexNumber, 1); - } - if ($complexNumber{0} == '.') { - $complexNumber = '0'.$complexNumber; - } - if ($complexNumber{0} == '+') { - $complexNumber = substr($complexNumber, 1); - } - return $complexNumber; - } - - /** - * Formats a number base string value with leading zeroes - * - * @param string $xVal The "number" to pad - * @param integer $places The length that we want to pad this value - * @return string The padded "number" - */ - private static function nbrConversionFormat($xVal, $places) - { - if (!is_null($places)) { - if (strlen($xVal) <= $places) { - return substr(str_pad($xVal, $places, '0', STR_PAD_LEFT), -10); - } else { - return PHPExcel_Calculation_Functions::NaN(); - } - } - - return substr($xVal, -10); - } - - /** - * BESSELI - * - * Returns the modified Bessel function In(x), which is equivalent to the Bessel function evaluated - * for purely imaginary arguments - * - * Excel Function: - * BESSELI(x,ord) - * - * @access public - * @category Engineering Functions - * @param float $x The value at which to evaluate the function. - * If x is nonnumeric, BESSELI returns the #VALUE! error value. - * @param integer $ord The order of the Bessel function. - * If ord is not an integer, it is truncated. - * If $ord is nonnumeric, BESSELI returns the #VALUE! error value. - * If $ord < 0, BESSELI returns the #NUM! error value. - * @return float - * - */ - public static function BESSELI($x, $ord) - { - $x = (is_null($x)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($x); - $ord = (is_null($ord)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($ord); - - if ((is_numeric($x)) && (is_numeric($ord))) { - $ord = floor($ord); - if ($ord < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - if (abs($x) <= 30) { - $fResult = $fTerm = pow($x / 2, $ord) / PHPExcel_Calculation_MathTrig::FACT($ord); - $ordK = 1; - $fSqrX = ($x * $x) / 4; - do { - $fTerm *= $fSqrX; - $fTerm /= ($ordK * ($ordK + $ord)); - $fResult += $fTerm; - } while ((abs($fTerm) > 1e-12) && (++$ordK < 100)); - } else { - $f_2_PI = 2 * M_PI; - - $fXAbs = abs($x); - $fResult = exp($fXAbs) / sqrt($f_2_PI * $fXAbs); - if (($ord & 1) && ($x < 0)) { - $fResult = -$fResult; - } - } - return (is_nan($fResult)) ? PHPExcel_Calculation_Functions::NaN() : $fResult; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * BESSELJ - * - * Returns the Bessel function - * - * Excel Function: - * BESSELJ(x,ord) - * - * @access public - * @category Engineering Functions - * @param float $x The value at which to evaluate the function. - * If x is nonnumeric, BESSELJ returns the #VALUE! error value. - * @param integer $ord The order of the Bessel function. If n is not an integer, it is truncated. - * If $ord is nonnumeric, BESSELJ returns the #VALUE! error value. - * If $ord < 0, BESSELJ returns the #NUM! error value. - * @return float - * - */ - public static function BESSELJ($x, $ord) - { - $x = (is_null($x)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($x); - $ord = (is_null($ord)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($ord); - - if ((is_numeric($x)) && (is_numeric($ord))) { - $ord = floor($ord); - if ($ord < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $fResult = 0; - if (abs($x) <= 30) { - $fResult = $fTerm = pow($x / 2, $ord) / PHPExcel_Calculation_MathTrig::FACT($ord); - $ordK = 1; - $fSqrX = ($x * $x) / -4; - do { - $fTerm *= $fSqrX; - $fTerm /= ($ordK * ($ordK + $ord)); - $fResult += $fTerm; - } while ((abs($fTerm) > 1e-12) && (++$ordK < 100)); - } else { - $f_PI_DIV_2 = M_PI / 2; - $f_PI_DIV_4 = M_PI / 4; - - $fXAbs = abs($x); - $fResult = sqrt(M_2DIVPI / $fXAbs) * cos($fXAbs - $ord * $f_PI_DIV_2 - $f_PI_DIV_4); - if (($ord & 1) && ($x < 0)) { - $fResult = -$fResult; - } - } - return (is_nan($fResult)) ? PHPExcel_Calculation_Functions::NaN() : $fResult; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - private static function besselK0($fNum) - { - if ($fNum <= 2) { - $fNum2 = $fNum * 0.5; - $y = ($fNum2 * $fNum2); - $fRet = -log($fNum2) * self::BESSELI($fNum, 0) + - (-0.57721566 + $y * (0.42278420 + $y * (0.23069756 + $y * (0.3488590e-1 + $y * (0.262698e-2 + $y * - (0.10750e-3 + $y * 0.74e-5)))))); - } else { - $y = 2 / $fNum; - $fRet = exp(-$fNum) / sqrt($fNum) * - (1.25331414 + $y * (-0.7832358e-1 + $y * (0.2189568e-1 + $y * (-0.1062446e-1 + $y * - (0.587872e-2 + $y * (-0.251540e-2 + $y * 0.53208e-3)))))); - } - return $fRet; - } - - - private static function besselK1($fNum) - { - if ($fNum <= 2) { - $fNum2 = $fNum * 0.5; - $y = ($fNum2 * $fNum2); - $fRet = log($fNum2) * self::BESSELI($fNum, 1) + - (1 + $y * (0.15443144 + $y * (-0.67278579 + $y * (-0.18156897 + $y * (-0.1919402e-1 + $y * - (-0.110404e-2 + $y * (-0.4686e-4))))))) / $fNum; - } else { - $y = 2 / $fNum; - $fRet = exp(-$fNum) / sqrt($fNum) * - (1.25331414 + $y * (0.23498619 + $y * (-0.3655620e-1 + $y * (0.1504268e-1 + $y * (-0.780353e-2 + $y * - (0.325614e-2 + $y * (-0.68245e-3))))))); - } - return $fRet; - } - - - /** - * BESSELK - * - * Returns the modified Bessel function Kn(x), which is equivalent to the Bessel functions evaluated - * for purely imaginary arguments. - * - * Excel Function: - * BESSELK(x,ord) - * - * @access public - * @category Engineering Functions - * @param float $x The value at which to evaluate the function. - * If x is nonnumeric, BESSELK returns the #VALUE! error value. - * @param integer $ord The order of the Bessel function. If n is not an integer, it is truncated. - * If $ord is nonnumeric, BESSELK returns the #VALUE! error value. - * If $ord < 0, BESSELK returns the #NUM! error value. - * @return float - * - */ - public static function BESSELK($x, $ord) - { - $x = (is_null($x)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($x); - $ord = (is_null($ord)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($ord); - - if ((is_numeric($x)) && (is_numeric($ord))) { - if (($ord < 0) || ($x == 0.0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - - switch (floor($ord)) { - case 0: - return self::besselK0($x); - case 1: - return self::besselK1($x); - default: - $fTox = 2 / $x; - $fBkm = self::besselK0($x); - $fBk = self::besselK1($x); - for ($n = 1; $n < $ord; ++$n) { - $fBkp = $fBkm + $n * $fTox * $fBk; - $fBkm = $fBk; - $fBk = $fBkp; - } - } - return (is_nan($fBk)) ? PHPExcel_Calculation_Functions::NaN() : $fBk; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - private static function besselY0($fNum) - { - if ($fNum < 8.0) { - $y = ($fNum * $fNum); - $f1 = -2957821389.0 + $y * (7062834065.0 + $y * (-512359803.6 + $y * (10879881.29 + $y * (-86327.92757 + $y * 228.4622733)))); - $f2 = 40076544269.0 + $y * (745249964.8 + $y * (7189466.438 + $y * (47447.26470 + $y * (226.1030244 + $y)))); - $fRet = $f1 / $f2 + 0.636619772 * self::BESSELJ($fNum, 0) * log($fNum); - } else { - $z = 8.0 / $fNum; - $y = ($z * $z); - $xx = $fNum - 0.785398164; - $f1 = 1 + $y * (-0.1098628627e-2 + $y * (0.2734510407e-4 + $y * (-0.2073370639e-5 + $y * 0.2093887211e-6))); - $f2 = -0.1562499995e-1 + $y * (0.1430488765e-3 + $y * (-0.6911147651e-5 + $y * (0.7621095161e-6 + $y * (-0.934945152e-7)))); - $fRet = sqrt(0.636619772 / $fNum) * (sin($xx) * $f1 + $z * cos($xx) * $f2); - } - return $fRet; - } - - - private static function besselY1($fNum) - { - if ($fNum < 8.0) { - $y = ($fNum * $fNum); - $f1 = $fNum * (-0.4900604943e13 + $y * (0.1275274390e13 + $y * (-0.5153438139e11 + $y * (0.7349264551e9 + $y * - (-0.4237922726e7 + $y * 0.8511937935e4))))); - $f2 = 0.2499580570e14 + $y * (0.4244419664e12 + $y * (0.3733650367e10 + $y * (0.2245904002e8 + $y * - (0.1020426050e6 + $y * (0.3549632885e3 + $y))))); - $fRet = $f1 / $f2 + 0.636619772 * ( self::BESSELJ($fNum, 1) * log($fNum) - 1 / $fNum); - } else { - $fRet = sqrt(0.636619772 / $fNum) * sin($fNum - 2.356194491); - } - return $fRet; - } - - - /** - * BESSELY - * - * Returns the Bessel function, which is also called the Weber function or the Neumann function. - * - * Excel Function: - * BESSELY(x,ord) - * - * @access public - * @category Engineering Functions - * @param float $x The value at which to evaluate the function. - * If x is nonnumeric, BESSELK returns the #VALUE! error value. - * @param integer $ord The order of the Bessel function. If n is not an integer, it is truncated. - * If $ord is nonnumeric, BESSELK returns the #VALUE! error value. - * If $ord < 0, BESSELK returns the #NUM! error value. - * - * @return float - */ - public static function BESSELY($x, $ord) - { - $x = (is_null($x)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($x); - $ord = (is_null($ord)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($ord); - - if ((is_numeric($x)) && (is_numeric($ord))) { - if (($ord < 0) || ($x == 0.0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - - switch (floor($ord)) { - case 0: - return self::besselY0($x); - case 1: - return self::besselY1($x); - default: - $fTox = 2 / $x; - $fBym = self::besselY0($x); - $fBy = self::besselY1($x); - for ($n = 1; $n < $ord; ++$n) { - $fByp = $n * $fTox * $fBy - $fBym; - $fBym = $fBy; - $fBy = $fByp; - } - } - return (is_nan($fBy)) ? PHPExcel_Calculation_Functions::NaN() : $fBy; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * BINTODEC - * - * Return a binary value as decimal. - * - * Excel Function: - * BIN2DEC(x) - * - * @access public - * @category Engineering Functions - * @param string $x The binary number (as a string) that you want to convert. The number - * cannot contain more than 10 characters (10 bits). The most significant - * bit of number is the sign bit. The remaining 9 bits are magnitude bits. - * Negative numbers are represented using two's-complement notation. - * If number is not a valid binary number, or if number contains more than - * 10 characters (10 bits), BIN2DEC returns the #NUM! error value. - * @return string - */ - public static function BINTODEC($x) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - - if (is_bool($x)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $x = (int) $x; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - $x = floor($x); - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (strlen($x) > 10) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (strlen($x) == 10) { - // Two's Complement - $x = substr($x, -9); - return '-'.(512-bindec($x)); - } - return bindec($x); - } - - - /** - * BINTOHEX - * - * Return a binary value as hex. - * - * Excel Function: - * BIN2HEX(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x The binary number (as a string) that you want to convert. The number - * cannot contain more than 10 characters (10 bits). The most significant - * bit of number is the sign bit. The remaining 9 bits are magnitude bits. - * Negative numbers are represented using two's-complement notation. - * If number is not a valid binary number, or if number contains more than - * 10 characters (10 bits), BIN2HEX returns the #NUM! error value. - * @param integer $places The number of characters to use. If places is omitted, BIN2HEX uses the - * minimum number of characters necessary. Places is useful for padding the - * return value with leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, BIN2HEX returns the #VALUE! error value. - * If places is negative, BIN2HEX returns the #NUM! error value. - * @return string - */ - public static function BINTOHEX($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $x = (int) $x; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - $x = floor($x); - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (strlen($x) > 10) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (strlen($x) == 10) { - // Two's Complement - return str_repeat('F', 8).substr(strtoupper(dechex(bindec(substr($x, -9)))), -2); - } - $hexVal = (string) strtoupper(dechex(bindec($x))); - - return self::nbrConversionFormat($hexVal, $places); - } - - - /** - * BINTOOCT - * - * Return a binary value as octal. - * - * Excel Function: - * BIN2OCT(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x The binary number (as a string) that you want to convert. The number - * cannot contain more than 10 characters (10 bits). The most significant - * bit of number is the sign bit. The remaining 9 bits are magnitude bits. - * Negative numbers are represented using two's-complement notation. - * If number is not a valid binary number, or if number contains more than - * 10 characters (10 bits), BIN2OCT returns the #NUM! error value. - * @param integer $places The number of characters to use. If places is omitted, BIN2OCT uses the - * minimum number of characters necessary. Places is useful for padding the - * return value with leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, BIN2OCT returns the #VALUE! error value. - * If places is negative, BIN2OCT returns the #NUM! error value. - * @return string - */ - public static function BINTOOCT($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $x = (int) $x; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - $x = floor($x); - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[01]/', $x, $out)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (strlen($x) > 10) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (strlen($x) == 10) { - // Two's Complement - return str_repeat('7', 7).substr(strtoupper(decoct(bindec(substr($x, -9)))), -3); - } - $octVal = (string) decoct(bindec($x)); - - return self::nbrConversionFormat($octVal, $places); - } - - - /** - * DECTOBIN - * - * Return a decimal value as binary. - * - * Excel Function: - * DEC2BIN(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x The decimal integer you want to convert. If number is negative, - * valid place values are ignored and DEC2BIN returns a 10-character - * (10-bit) binary number in which the most significant bit is the sign - * bit. The remaining 9 bits are magnitude bits. Negative numbers are - * represented using two's-complement notation. - * If number < -512 or if number > 511, DEC2BIN returns the #NUM! error - * value. - * If number is nonnumeric, DEC2BIN returns the #VALUE! error value. - * If DEC2BIN requires more than places characters, it returns the #NUM! - * error value. - * @param integer $places The number of characters to use. If places is omitted, DEC2BIN uses - * the minimum number of characters necessary. Places is useful for - * padding the return value with leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, DEC2BIN returns the #VALUE! error value. - * If places is zero or negative, DEC2BIN returns the #NUM! error value. - * @return string - */ - public static function DECTOBIN($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $x = (int) $x; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) floor($x); - $r = decbin($x); - if (strlen($r) == 32) { - // Two's Complement - $r = substr($r, -10); - } elseif (strlen($r) > 11) { - return PHPExcel_Calculation_Functions::NaN(); - } - - return self::nbrConversionFormat($r, $places); - } - - - /** - * DECTOHEX - * - * Return a decimal value as hex. - * - * Excel Function: - * DEC2HEX(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x The decimal integer you want to convert. If number is negative, - * places is ignored and DEC2HEX returns a 10-character (40-bit) - * hexadecimal number in which the most significant bit is the sign - * bit. The remaining 39 bits are magnitude bits. Negative numbers - * are represented using two's-complement notation. - * If number < -549,755,813,888 or if number > 549,755,813,887, - * DEC2HEX returns the #NUM! error value. - * If number is nonnumeric, DEC2HEX returns the #VALUE! error value. - * If DEC2HEX requires more than places characters, it returns the - * #NUM! error value. - * @param integer $places The number of characters to use. If places is omitted, DEC2HEX uses - * the minimum number of characters necessary. Places is useful for - * padding the return value with leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, DEC2HEX returns the #VALUE! error value. - * If places is zero or negative, DEC2HEX returns the #NUM! error value. - * @return string - */ - public static function DECTOHEX($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $x = (int) $x; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) floor($x); - $r = strtoupper(dechex($x)); - if (strlen($r) == 8) { - // Two's Complement - $r = 'FF'.$r; - } - - return self::nbrConversionFormat($r, $places); - } - - - /** - * DECTOOCT - * - * Return an decimal value as octal. - * - * Excel Function: - * DEC2OCT(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x The decimal integer you want to convert. If number is negative, - * places is ignored and DEC2OCT returns a 10-character (30-bit) - * octal number in which the most significant bit is the sign bit. - * The remaining 29 bits are magnitude bits. Negative numbers are - * represented using two's-complement notation. - * If number < -536,870,912 or if number > 536,870,911, DEC2OCT - * returns the #NUM! error value. - * If number is nonnumeric, DEC2OCT returns the #VALUE! error value. - * If DEC2OCT requires more than places characters, it returns the - * #NUM! error value. - * @param integer $places The number of characters to use. If places is omitted, DEC2OCT uses - * the minimum number of characters necessary. Places is useful for - * padding the return value with leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, DEC2OCT returns the #VALUE! error value. - * If places is zero or negative, DEC2OCT returns the #NUM! error value. - * @return string - */ - public static function DECTOOCT($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $x = (int) $x; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[-0123456789.]/', $x, $out)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) floor($x); - $r = decoct($x); - if (strlen($r) == 11) { - // Two's Complement - $r = substr($r, -10); - } - - return self::nbrConversionFormat($r, $places); - } - - - /** - * HEXTOBIN - * - * Return a hex value as binary. - * - * Excel Function: - * HEX2BIN(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x the hexadecimal number you want to convert. Number cannot - * contain more than 10 characters. The most significant bit of - * number is the sign bit (40th bit from the right). The remaining - * 9 bits are magnitude bits. Negative numbers are represented - * using two's-complement notation. - * If number is negative, HEX2BIN ignores places and returns a - * 10-character binary number. - * If number is negative, it cannot be less than FFFFFFFE00, and - * if number is positive, it cannot be greater than 1FF. - * If number is not a valid hexadecimal number, HEX2BIN returns - * the #NUM! error value. - * If HEX2BIN requires more than places characters, it returns - * the #NUM! error value. - * @param integer $places The number of characters to use. If places is omitted, - * HEX2BIN uses the minimum number of characters necessary. Places - * is useful for padding the return value with leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, HEX2BIN returns the #VALUE! error value. - * If places is negative, HEX2BIN returns the #NUM! error value. - * @return string - */ - public static function HEXTOBIN($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $binVal = decbin(hexdec($x)); - - return substr(self::nbrConversionFormat($binVal, $places), -10); - } - - - /** - * HEXTODEC - * - * Return a hex value as decimal. - * - * Excel Function: - * HEX2DEC(x) - * - * @access public - * @category Engineering Functions - * @param string $x The hexadecimal number you want to convert. This number cannot - * contain more than 10 characters (40 bits). The most significant - * bit of number is the sign bit. The remaining 39 bits are magnitude - * bits. Negative numbers are represented using two's-complement - * notation. - * If number is not a valid hexadecimal number, HEX2DEC returns the - * #NUM! error value. - * @return string - */ - public static function HEXTODEC($x) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - - if (is_bool($x)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return hexdec($x); - } - - - /** - * HEXTOOCT - * - * Return a hex value as octal. - * - * Excel Function: - * HEX2OCT(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x The hexadecimal number you want to convert. Number cannot - * contain more than 10 characters. The most significant bit of - * number is the sign bit. The remaining 39 bits are magnitude - * bits. Negative numbers are represented using two's-complement - * notation. - * If number is negative, HEX2OCT ignores places and returns a - * 10-character octal number. - * If number is negative, it cannot be less than FFE0000000, and - * if number is positive, it cannot be greater than 1FFFFFFF. - * If number is not a valid hexadecimal number, HEX2OCT returns - * the #NUM! error value. - * If HEX2OCT requires more than places characters, it returns - * the #NUM! error value. - * @param integer $places The number of characters to use. If places is omitted, HEX2OCT - * uses the minimum number of characters necessary. Places is - * useful for padding the return value with leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, HEX2OCT returns the #VALUE! error - * value. - * If places is negative, HEX2OCT returns the #NUM! error value. - * @return string - */ - public static function HEXTOOCT($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) $x; - if (strlen($x) > preg_match_all('/[0123456789ABCDEF]/', strtoupper($x), $out)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $octVal = decoct(hexdec($x)); - - return self::nbrConversionFormat($octVal, $places); - } // function HEXTOOCT() - - - /** - * OCTTOBIN - * - * Return an octal value as binary. - * - * Excel Function: - * OCT2BIN(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x The octal number you want to convert. Number may not - * contain more than 10 characters. The most significant - * bit of number is the sign bit. The remaining 29 bits - * are magnitude bits. Negative numbers are represented - * using two's-complement notation. - * If number is negative, OCT2BIN ignores places and returns - * a 10-character binary number. - * If number is negative, it cannot be less than 7777777000, - * and if number is positive, it cannot be greater than 777. - * If number is not a valid octal number, OCT2BIN returns - * the #NUM! error value. - * If OCT2BIN requires more than places characters, it - * returns the #NUM! error value. - * @param integer $places The number of characters to use. If places is omitted, - * OCT2BIN uses the minimum number of characters necessary. - * Places is useful for padding the return value with - * leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, OCT2BIN returns the #VALUE! - * error value. - * If places is negative, OCT2BIN returns the #NUM! error - * value. - * @return string - */ - public static function OCTTOBIN($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) $x; - if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $r = decbin(octdec($x)); - - return self::nbrConversionFormat($r, $places); - } - - - /** - * OCTTODEC - * - * Return an octal value as decimal. - * - * Excel Function: - * OCT2DEC(x) - * - * @access public - * @category Engineering Functions - * @param string $x The octal number you want to convert. Number may not contain - * more than 10 octal characters (30 bits). The most significant - * bit of number is the sign bit. The remaining 29 bits are - * magnitude bits. Negative numbers are represented using - * two's-complement notation. - * If number is not a valid octal number, OCT2DEC returns the - * #NUM! error value. - * @return string - */ - public static function OCTTODEC($x) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - - if (is_bool($x)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) $x; - if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return octdec($x); - } - - - /** - * OCTTOHEX - * - * Return an octal value as hex. - * - * Excel Function: - * OCT2HEX(x[,places]) - * - * @access public - * @category Engineering Functions - * @param string $x The octal number you want to convert. Number may not contain - * more than 10 octal characters (30 bits). The most significant - * bit of number is the sign bit. The remaining 29 bits are - * magnitude bits. Negative numbers are represented using - * two's-complement notation. - * If number is negative, OCT2HEX ignores places and returns a - * 10-character hexadecimal number. - * If number is not a valid octal number, OCT2HEX returns the - * #NUM! error value. - * If OCT2HEX requires more than places characters, it returns - * the #NUM! error value. - * @param integer $places The number of characters to use. If places is omitted, OCT2HEX - * uses the minimum number of characters necessary. Places is useful - * for padding the return value with leading 0s (zeros). - * If places is not an integer, it is truncated. - * If places is nonnumeric, OCT2HEX returns the #VALUE! error value. - * If places is negative, OCT2HEX returns the #NUM! error value. - * @return string - */ - public static function OCTTOHEX($x, $places = null) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $places = PHPExcel_Calculation_Functions::flattenSingleValue($places); - - if (is_bool($x)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $x = (string) $x; - if (preg_match_all('/[01234567]/', $x, $out) != strlen($x)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $hexVal = strtoupper(dechex(octdec($x))); - - return self::nbrConversionFormat($hexVal, $places); - } - - - /** - * COMPLEX - * - * Converts real and imaginary coefficients into a complex number of the form x + yi or x + yj. - * - * Excel Function: - * COMPLEX(realNumber,imaginary[,places]) - * - * @access public - * @category Engineering Functions - * @param float $realNumber The real coefficient of the complex number. - * @param float $imaginary The imaginary coefficient of the complex number. - * @param string $suffix The suffix for the imaginary component of the complex number. - * If omitted, the suffix is assumed to be "i". - * @return string - */ - public static function COMPLEX($realNumber = 0.0, $imaginary = 0.0, $suffix = 'i') - { - $realNumber = (is_null($realNumber)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($realNumber); - $imaginary = (is_null($imaginary)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($imaginary); - $suffix = (is_null($suffix)) ? 'i' : PHPExcel_Calculation_Functions::flattenSingleValue($suffix); - - if (((is_numeric($realNumber)) && (is_numeric($imaginary))) && - (($suffix == 'i') || ($suffix == 'j') || ($suffix == ''))) { - $realNumber = (float) $realNumber; - $imaginary = (float) $imaginary; - - if ($suffix == '') { - $suffix = 'i'; - } - if ($realNumber == 0.0) { - if ($imaginary == 0.0) { - return (string) '0'; - } elseif ($imaginary == 1.0) { - return (string) $suffix; - } elseif ($imaginary == -1.0) { - return (string) '-'.$suffix; - } - return (string) $imaginary.$suffix; - } elseif ($imaginary == 0.0) { - return (string) $realNumber; - } elseif ($imaginary == 1.0) { - return (string) $realNumber.'+'.$suffix; - } elseif ($imaginary == -1.0) { - return (string) $realNumber.'-'.$suffix; - } - if ($imaginary > 0) { - $imaginary = (string) '+'.$imaginary; - } - return (string) $realNumber.$imaginary.$suffix; - } - - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * IMAGINARY - * - * Returns the imaginary coefficient of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMAGINARY(complexNumber) - * - * @access public - * @category Engineering Functions - * @param string $complexNumber The complex number for which you want the imaginary - * coefficient. - * @return float - */ - public static function IMAGINARY($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - return $parsedComplex['imaginary']; - } - - - /** - * IMREAL - * - * Returns the real coefficient of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMREAL(complexNumber) - * - * @access public - * @category Engineering Functions - * @param string $complexNumber The complex number for which you want the real coefficient. - * @return float - */ - public static function IMREAL($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - return $parsedComplex['real']; - } - - - /** - * IMABS - * - * Returns the absolute value (modulus) of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMABS(complexNumber) - * - * @param string $complexNumber The complex number for which you want the absolute value. - * @return float - */ - public static function IMABS($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - return sqrt( - ($parsedComplex['real'] * $parsedComplex['real']) + - ($parsedComplex['imaginary'] * $parsedComplex['imaginary']) - ); - } - - - /** - * IMARGUMENT - * - * Returns the argument theta of a complex number, i.e. the angle in radians from the real - * axis to the representation of the number in polar coordinates. - * - * Excel Function: - * IMARGUMENT(complexNumber) - * - * @param string $complexNumber The complex number for which you want the argument theta. - * @return float - */ - public static function IMARGUMENT($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - if ($parsedComplex['real'] == 0.0) { - if ($parsedComplex['imaginary'] == 0.0) { - return 0.0; - } elseif ($parsedComplex['imaginary'] < 0.0) { - return M_PI / -2; - } else { - return M_PI / 2; - } - } elseif ($parsedComplex['real'] > 0.0) { - return atan($parsedComplex['imaginary'] / $parsedComplex['real']); - } elseif ($parsedComplex['imaginary'] < 0.0) { - return 0 - (M_PI - atan(abs($parsedComplex['imaginary']) / abs($parsedComplex['real']))); - } else { - return M_PI - atan($parsedComplex['imaginary'] / abs($parsedComplex['real'])); - } - } - - - /** - * IMCONJUGATE - * - * Returns the complex conjugate of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMCONJUGATE(complexNumber) - * - * @param string $complexNumber The complex number for which you want the conjugate. - * @return string - */ - public static function IMCONJUGATE($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - if ($parsedComplex['imaginary'] == 0.0) { - return $parsedComplex['real']; - } else { - return self::cleanComplex( - self::COMPLEX( - $parsedComplex['real'], - 0 - $parsedComplex['imaginary'], - $parsedComplex['suffix'] - ) - ); - } - } - - - /** - * IMCOS - * - * Returns the cosine of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMCOS(complexNumber) - * - * @param string $complexNumber The complex number for which you want the cosine. - * @return string|float - */ - public static function IMCOS($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - if ($parsedComplex['imaginary'] == 0.0) { - return cos($parsedComplex['real']); - } else { - return self::IMCONJUGATE( - self::COMPLEX( - cos($parsedComplex['real']) * cosh($parsedComplex['imaginary']), - sin($parsedComplex['real']) * sinh($parsedComplex['imaginary']), - $parsedComplex['suffix'] - ) - ); - } - } - - - /** - * IMSIN - * - * Returns the sine of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMSIN(complexNumber) - * - * @param string $complexNumber The complex number for which you want the sine. - * @return string|float - */ - public static function IMSIN($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - if ($parsedComplex['imaginary'] == 0.0) { - return sin($parsedComplex['real']); - } else { - return self::COMPLEX( - sin($parsedComplex['real']) * cosh($parsedComplex['imaginary']), - cos($parsedComplex['real']) * sinh($parsedComplex['imaginary']), - $parsedComplex['suffix'] - ); - } - } - - - /** - * IMSQRT - * - * Returns the square root of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMSQRT(complexNumber) - * - * @param string $complexNumber The complex number for which you want the square root. - * @return string - */ - public static function IMSQRT($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - $theta = self::IMARGUMENT($complexNumber); - $d1 = cos($theta / 2); - $d2 = sin($theta / 2); - $r = sqrt(sqrt(($parsedComplex['real'] * $parsedComplex['real']) + ($parsedComplex['imaginary'] * $parsedComplex['imaginary']))); - - if ($parsedComplex['suffix'] == '') { - return self::COMPLEX($d1 * $r, $d2 * $r); - } else { - return self::COMPLEX($d1 * $r, $d2 * $r, $parsedComplex['suffix']); - } - } - - - /** - * IMLN - * - * Returns the natural logarithm of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMLN(complexNumber) - * - * @param string $complexNumber The complex number for which you want the natural logarithm. - * @return string - */ - public static function IMLN($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $logR = log(sqrt(($parsedComplex['real'] * $parsedComplex['real']) + ($parsedComplex['imaginary'] * $parsedComplex['imaginary']))); - $t = self::IMARGUMENT($complexNumber); - - if ($parsedComplex['suffix'] == '') { - return self::COMPLEX($logR, $t); - } else { - return self::COMPLEX($logR, $t, $parsedComplex['suffix']); - } - } - - - /** - * IMLOG10 - * - * Returns the common logarithm (base 10) of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMLOG10(complexNumber) - * - * @param string $complexNumber The complex number for which you want the common logarithm. - * @return string - */ - public static function IMLOG10($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (($parsedComplex['real'] > 0.0) && ($parsedComplex['imaginary'] == 0.0)) { - return log10($parsedComplex['real']); - } - - return self::IMPRODUCT(log10(EULER), self::IMLN($complexNumber)); - } - - - /** - * IMLOG2 - * - * Returns the base-2 logarithm of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMLOG2(complexNumber) - * - * @param string $complexNumber The complex number for which you want the base-2 logarithm. - * @return string - */ - public static function IMLOG2($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (($parsedComplex['real'] > 0.0) && ($parsedComplex['imaginary'] == 0.0)) { - return log($parsedComplex['real'], 2); - } - - return self::IMPRODUCT(log(EULER, 2), self::IMLN($complexNumber)); - } - - - /** - * IMEXP - * - * Returns the exponential of a complex number in x + yi or x + yj text format. - * - * Excel Function: - * IMEXP(complexNumber) - * - * @param string $complexNumber The complex number for which you want the exponential. - * @return string - */ - public static function IMEXP($complexNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - - $parsedComplex = self::parseComplex($complexNumber); - - if (($parsedComplex['real'] == 0.0) && ($parsedComplex['imaginary'] == 0.0)) { - return '1'; - } - - $e = exp($parsedComplex['real']); - $eX = $e * cos($parsedComplex['imaginary']); - $eY = $e * sin($parsedComplex['imaginary']); - - if ($parsedComplex['suffix'] == '') { - return self::COMPLEX($eX, $eY); - } else { - return self::COMPLEX($eX, $eY, $parsedComplex['suffix']); - } - } - - - /** - * IMPOWER - * - * Returns a complex number in x + yi or x + yj text format raised to a power. - * - * Excel Function: - * IMPOWER(complexNumber,realNumber) - * - * @param string $complexNumber The complex number you want to raise to a power. - * @param float $realNumber The power to which you want to raise the complex number. - * @return string - */ - public static function IMPOWER($complexNumber, $realNumber) - { - $complexNumber = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber); - $realNumber = PHPExcel_Calculation_Functions::flattenSingleValue($realNumber); - - if (!is_numeric($realNumber)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - $parsedComplex = self::parseComplex($complexNumber); - - $r = sqrt(($parsedComplex['real'] * $parsedComplex['real']) + ($parsedComplex['imaginary'] * $parsedComplex['imaginary'])); - $rPower = pow($r, $realNumber); - $theta = self::IMARGUMENT($complexNumber) * $realNumber; - if ($theta == 0) { - return 1; - } elseif ($parsedComplex['imaginary'] == 0.0) { - return self::COMPLEX($rPower * cos($theta), $rPower * sin($theta), $parsedComplex['suffix']); - } else { - return self::COMPLEX($rPower * cos($theta), $rPower * sin($theta), $parsedComplex['suffix']); - } - } - - - /** - * IMDIV - * - * Returns the quotient of two complex numbers in x + yi or x + yj text format. - * - * Excel Function: - * IMDIV(complexDividend,complexDivisor) - * - * @param string $complexDividend The complex numerator or dividend. - * @param string $complexDivisor The complex denominator or divisor. - * @return string - */ - public static function IMDIV($complexDividend, $complexDivisor) - { - $complexDividend = PHPExcel_Calculation_Functions::flattenSingleValue($complexDividend); - $complexDivisor = PHPExcel_Calculation_Functions::flattenSingleValue($complexDivisor); - - $parsedComplexDividend = self::parseComplex($complexDividend); - $parsedComplexDivisor = self::parseComplex($complexDivisor); - - if (($parsedComplexDividend['suffix'] != '') && ($parsedComplexDivisor['suffix'] != '') && - ($parsedComplexDividend['suffix'] != $parsedComplexDivisor['suffix'])) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (($parsedComplexDividend['suffix'] != '') && ($parsedComplexDivisor['suffix'] == '')) { - $parsedComplexDivisor['suffix'] = $parsedComplexDividend['suffix']; - } - - $d1 = ($parsedComplexDividend['real'] * $parsedComplexDivisor['real']) + ($parsedComplexDividend['imaginary'] * $parsedComplexDivisor['imaginary']); - $d2 = ($parsedComplexDividend['imaginary'] * $parsedComplexDivisor['real']) - ($parsedComplexDividend['real'] * $parsedComplexDivisor['imaginary']); - $d3 = ($parsedComplexDivisor['real'] * $parsedComplexDivisor['real']) + ($parsedComplexDivisor['imaginary'] * $parsedComplexDivisor['imaginary']); - - $r = $d1 / $d3; - $i = $d2 / $d3; - - if ($i > 0.0) { - return self::cleanComplex($r.'+'.$i.$parsedComplexDivisor['suffix']); - } elseif ($i < 0.0) { - return self::cleanComplex($r.$i.$parsedComplexDivisor['suffix']); - } else { - return $r; - } - } - - - /** - * IMSUB - * - * Returns the difference of two complex numbers in x + yi or x + yj text format. - * - * Excel Function: - * IMSUB(complexNumber1,complexNumber2) - * - * @param string $complexNumber1 The complex number from which to subtract complexNumber2. - * @param string $complexNumber2 The complex number to subtract from complexNumber1. - * @return string - */ - public static function IMSUB($complexNumber1, $complexNumber2) - { - $complexNumber1 = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber1); - $complexNumber2 = PHPExcel_Calculation_Functions::flattenSingleValue($complexNumber2); - - $parsedComplex1 = self::parseComplex($complexNumber1); - $parsedComplex2 = self::parseComplex($complexNumber2); - - if ((($parsedComplex1['suffix'] != '') && ($parsedComplex2['suffix'] != '')) && - ($parsedComplex1['suffix'] != $parsedComplex2['suffix'])) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (($parsedComplex1['suffix'] == '') && ($parsedComplex2['suffix'] != '')) { - $parsedComplex1['suffix'] = $parsedComplex2['suffix']; - } - - $d1 = $parsedComplex1['real'] - $parsedComplex2['real']; - $d2 = $parsedComplex1['imaginary'] - $parsedComplex2['imaginary']; - - return self::COMPLEX($d1, $d2, $parsedComplex1['suffix']); - } - - - /** - * IMSUM - * - * Returns the sum of two or more complex numbers in x + yi or x + yj text format. - * - * Excel Function: - * IMSUM(complexNumber[,complexNumber[,...]]) - * - * @param string $complexNumber,... Series of complex numbers to add - * @return string - */ - public static function IMSUM() - { - // Return value - $returnValue = self::parseComplex('0'); - $activeSuffix = ''; - - // Loop through the arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - $parsedComplex = self::parseComplex($arg); - - if ($activeSuffix == '') { - $activeSuffix = $parsedComplex['suffix']; - } elseif (($parsedComplex['suffix'] != '') && ($activeSuffix != $parsedComplex['suffix'])) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - $returnValue['real'] += $parsedComplex['real']; - $returnValue['imaginary'] += $parsedComplex['imaginary']; - } - - if ($returnValue['imaginary'] == 0.0) { - $activeSuffix = ''; - } - return self::COMPLEX($returnValue['real'], $returnValue['imaginary'], $activeSuffix); - } - - - /** - * IMPRODUCT - * - * Returns the product of two or more complex numbers in x + yi or x + yj text format. - * - * Excel Function: - * IMPRODUCT(complexNumber[,complexNumber[,...]]) - * - * @param string $complexNumber,... Series of complex numbers to multiply - * @return string - */ - public static function IMPRODUCT() - { - // Return value - $returnValue = self::parseComplex('1'); - $activeSuffix = ''; - - // Loop through the arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - $parsedComplex = self::parseComplex($arg); - - $workValue = $returnValue; - if (($parsedComplex['suffix'] != '') && ($activeSuffix == '')) { - $activeSuffix = $parsedComplex['suffix']; - } elseif (($parsedComplex['suffix'] != '') && ($activeSuffix != $parsedComplex['suffix'])) { - return PHPExcel_Calculation_Functions::NaN(); - } - $returnValue['real'] = ($workValue['real'] * $parsedComplex['real']) - ($workValue['imaginary'] * $parsedComplex['imaginary']); - $returnValue['imaginary'] = ($workValue['real'] * $parsedComplex['imaginary']) + ($workValue['imaginary'] * $parsedComplex['real']); - } - - if ($returnValue['imaginary'] == 0.0) { - $activeSuffix = ''; - } - return self::COMPLEX($returnValue['real'], $returnValue['imaginary'], $activeSuffix); - } - - - /** - * DELTA - * - * Tests whether two values are equal. Returns 1 if number1 = number2; returns 0 otherwise. - * Use this function to filter a set of values. For example, by summing several DELTA - * functions you calculate the count of equal pairs. This function is also known as the - * Kronecker Delta function. - * - * Excel Function: - * DELTA(a[,b]) - * - * @param float $a The first number. - * @param float $b The second number. If omitted, b is assumed to be zero. - * @return int - */ - public static function DELTA($a, $b = 0) - { - $a = PHPExcel_Calculation_Functions::flattenSingleValue($a); - $b = PHPExcel_Calculation_Functions::flattenSingleValue($b); - - return (int) ($a == $b); - } - - - /** - * GESTEP - * - * Excel Function: - * GESTEP(number[,step]) - * - * Returns 1 if number >= step; returns 0 (zero) otherwise - * Use this function to filter a set of values. For example, by summing several GESTEP - * functions you calculate the count of values that exceed a threshold. - * - * @param float $number The value to test against step. - * @param float $step The threshold value. - * If you omit a value for step, GESTEP uses zero. - * @return int - */ - public static function GESTEP($number, $step = 0) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - $step = PHPExcel_Calculation_Functions::flattenSingleValue($step); - - return (int) ($number >= $step); - } - - - // - // Private method to calculate the erf value - // - private static $twoSqrtPi = 1.128379167095512574; - - public static function erfVal($x) - { - if (abs($x) > 2.2) { - return 1 - self::erfcVal($x); - } - $sum = $term = $x; - $xsqr = ($x * $x); - $j = 1; - do { - $term *= $xsqr / $j; - $sum -= $term / (2 * $j + 1); - ++$j; - $term *= $xsqr / $j; - $sum += $term / (2 * $j + 1); - ++$j; - if ($sum == 0.0) { - break; - } - } while (abs($term / $sum) > PRECISION); - return self::$twoSqrtPi * $sum; - } - - - /** - * ERF - * - * Returns the error function integrated between the lower and upper bound arguments. - * - * Note: In Excel 2007 or earlier, if you input a negative value for the upper or lower bound arguments, - * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was - * improved, so that it can now calculate the function for both positive and negative ranges. - * PHPExcel follows Excel 2010 behaviour, and accepts nagative arguments. - * - * Excel Function: - * ERF(lower[,upper]) - * - * @param float $lower lower bound for integrating ERF - * @param float $upper upper bound for integrating ERF. - * If omitted, ERF integrates between zero and lower_limit - * @return float - */ - public static function ERF($lower, $upper = null) - { - $lower = PHPExcel_Calculation_Functions::flattenSingleValue($lower); - $upper = PHPExcel_Calculation_Functions::flattenSingleValue($upper); - - if (is_numeric($lower)) { - if (is_null($upper)) { - return self::erfVal($lower); - } - if (is_numeric($upper)) { - return self::erfVal($upper) - self::erfVal($lower); - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - // - // Private method to calculate the erfc value - // - private static $oneSqrtPi = 0.564189583547756287; - - private static function erfcVal($x) - { - if (abs($x) < 2.2) { - return 1 - self::erfVal($x); - } - if ($x < 0) { - return 2 - self::ERFC(-$x); - } - $a = $n = 1; - $b = $c = $x; - $d = ($x * $x) + 0.5; - $q1 = $q2 = $b / $d; - $t = 0; - do { - $t = $a * $n + $b * $x; - $a = $b; - $b = $t; - $t = $c * $n + $d * $x; - $c = $d; - $d = $t; - $n += 0.5; - $q1 = $q2; - $q2 = $b / $d; - } while ((abs($q1 - $q2) / $q2) > PRECISION); - return self::$oneSqrtPi * exp(-$x * $x) * $q2; - } - - - /** - * ERFC - * - * Returns the complementary ERF function integrated between x and infinity - * - * Note: In Excel 2007 or earlier, if you input a negative value for the lower bound argument, - * the function would return a #NUM! error. However, in Excel 2010, the function algorithm was - * improved, so that it can now calculate the function for both positive and negative x values. - * PHPExcel follows Excel 2010 behaviour, and accepts nagative arguments. - * - * Excel Function: - * ERFC(x) - * - * @param float $x The lower bound for integrating ERFC - * @return float - */ - public static function ERFC($x) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - - if (is_numeric($x)) { - return self::erfcVal($x); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * getConversionGroups - * Returns a list of the different conversion groups for UOM conversions - * - * @return array - */ - public static function getConversionGroups() - { - $conversionGroups = array(); - foreach (self::$conversionUnits as $conversionUnit) { - $conversionGroups[] = $conversionUnit['Group']; - } - return array_merge(array_unique($conversionGroups)); - } - - - /** - * getConversionGroupUnits - * Returns an array of units of measure, for a specified conversion group, or for all groups - * - * @param string $group The group whose units of measure you want to retrieve - * @return array - */ - public static function getConversionGroupUnits($group = null) - { - $conversionGroups = array(); - foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) { - if ((is_null($group)) || ($conversionGroup['Group'] == $group)) { - $conversionGroups[$conversionGroup['Group']][] = $conversionUnit; - } - } - return $conversionGroups; - } - - - /** - * getConversionGroupUnitDetails - * - * @param string $group The group whose units of measure you want to retrieve - * @return array - */ - public static function getConversionGroupUnitDetails($group = null) - { - $conversionGroups = array(); - foreach (self::$conversionUnits as $conversionUnit => $conversionGroup) { - if ((is_null($group)) || ($conversionGroup['Group'] == $group)) { - $conversionGroups[$conversionGroup['Group']][] = array( - 'unit' => $conversionUnit, - 'description' => $conversionGroup['Unit Name'] - ); - } - } - return $conversionGroups; - } - - - /** - * getConversionMultipliers - * Returns an array of the Multiplier prefixes that can be used with Units of Measure in CONVERTUOM() - * - * @return array of mixed - */ - public static function getConversionMultipliers() - { - return self::$conversionMultipliers; - } - - - /** - * CONVERTUOM - * - * Converts a number from one measurement system to another. - * For example, CONVERT can translate a table of distances in miles to a table of distances - * in kilometers. - * - * Excel Function: - * CONVERT(value,fromUOM,toUOM) - * - * @param float $value The value in fromUOM to convert. - * @param string $fromUOM The units for value. - * @param string $toUOM The units for the result. - * - * @return float - */ - public static function CONVERTUOM($value, $fromUOM, $toUOM) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $fromUOM = PHPExcel_Calculation_Functions::flattenSingleValue($fromUOM); - $toUOM = PHPExcel_Calculation_Functions::flattenSingleValue($toUOM); - - if (!is_numeric($value)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $fromMultiplier = 1.0; - if (isset(self::$conversionUnits[$fromUOM])) { - $unitGroup1 = self::$conversionUnits[$fromUOM]['Group']; - } else { - $fromMultiplier = substr($fromUOM, 0, 1); - $fromUOM = substr($fromUOM, 1); - if (isset(self::$conversionMultipliers[$fromMultiplier])) { - $fromMultiplier = self::$conversionMultipliers[$fromMultiplier]['multiplier']; - } else { - return PHPExcel_Calculation_Functions::NA(); - } - if ((isset(self::$conversionUnits[$fromUOM])) && (self::$conversionUnits[$fromUOM]['AllowPrefix'])) { - $unitGroup1 = self::$conversionUnits[$fromUOM]['Group']; - } else { - return PHPExcel_Calculation_Functions::NA(); - } - } - $value *= $fromMultiplier; - - $toMultiplier = 1.0; - if (isset(self::$conversionUnits[$toUOM])) { - $unitGroup2 = self::$conversionUnits[$toUOM]['Group']; - } else { - $toMultiplier = substr($toUOM, 0, 1); - $toUOM = substr($toUOM, 1); - if (isset(self::$conversionMultipliers[$toMultiplier])) { - $toMultiplier = self::$conversionMultipliers[$toMultiplier]['multiplier']; - } else { - return PHPExcel_Calculation_Functions::NA(); - } - if ((isset(self::$conversionUnits[$toUOM])) && (self::$conversionUnits[$toUOM]['AllowPrefix'])) { - $unitGroup2 = self::$conversionUnits[$toUOM]['Group']; - } else { - return PHPExcel_Calculation_Functions::NA(); - } - } - if ($unitGroup1 != $unitGroup2) { - return PHPExcel_Calculation_Functions::NA(); - } - - if (($fromUOM == $toUOM) && ($fromMultiplier == $toMultiplier)) { - // We've already factored $fromMultiplier into the value, so we need - // to reverse it again - return $value / $fromMultiplier; - } elseif ($unitGroup1 == 'Temperature') { - if (($fromUOM == 'F') || ($fromUOM == 'fah')) { - if (($toUOM == 'F') || ($toUOM == 'fah')) { - return $value; - } else { - $value = (($value - 32) / 1.8); - if (($toUOM == 'K') || ($toUOM == 'kel')) { - $value += 273.15; - } - return $value; - } - } elseif ((($fromUOM == 'K') || ($fromUOM == 'kel')) && - (($toUOM == 'K') || ($toUOM == 'kel'))) { - return $value; - } elseif ((($fromUOM == 'C') || ($fromUOM == 'cel')) && - (($toUOM == 'C') || ($toUOM == 'cel'))) { - return $value; - } - if (($toUOM == 'F') || ($toUOM == 'fah')) { - if (($fromUOM == 'K') || ($fromUOM == 'kel')) { - $value -= 273.15; - } - return ($value * 1.8) + 32; - } - if (($toUOM == 'C') || ($toUOM == 'cel')) { - return $value - 273.15; - } - return $value + 273.15; - } - return ($value * self::$unitConversions[$unitGroup1][$fromUOM][$toUOM]) / $toMultiplier; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Exception.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Exception.php deleted file mode 100644 index 52d73fc..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Exception.php +++ /dev/null @@ -1,46 +0,0 @@ -line = $line; - $e->file = $file; - throw $e; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/ExceptionHandler.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/ExceptionHandler.php deleted file mode 100644 index 4cb0a68..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/ExceptionHandler.php +++ /dev/null @@ -1,45 +0,0 @@ -format('d') == $testDate->format('t')); - } - - - /** - * isFirstDayOfMonth - * - * Returns a boolean TRUE/FALSE indicating if this date is the first date of the month - * - * @param DateTime $testDate The date for testing - * @return boolean - */ - private static function isFirstDayOfMonth($testDate) - { - return ($testDate->format('d') == 1); - } - - - private static function couponFirstPeriodDate($settlement, $maturity, $frequency, $next) - { - $months = 12 / $frequency; - - $result = PHPExcel_Shared_Date::ExcelToPHPObject($maturity); - $eom = self::isLastDayOfMonth($result); - - while ($settlement < PHPExcel_Shared_Date::PHPToExcel($result)) { - $result->modify('-'.$months.' months'); - } - if ($next) { - $result->modify('+'.$months.' months'); - } - - if ($eom) { - $result->modify('-1 day'); - } - - return PHPExcel_Shared_Date::PHPToExcel($result); - } - - - private static function isValidFrequency($frequency) - { - if (($frequency == 1) || ($frequency == 2) || ($frequency == 4)) { - return true; - } - if ((PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) && - (($frequency == 6) || ($frequency == 12))) { - return true; - } - return false; - } - - - /** - * daysPerYear - * - * Returns the number of days in a specified year, as defined by the "basis" value - * - * @param integer $year The year against which we're testing - * @param integer $basis The type of day count: - * 0 or omitted US (NASD) 360 - * 1 Actual (365 or 366 in a leap year) - * 2 360 - * 3 365 - * 4 European 360 - * @return integer - */ - private static function daysPerYear($year, $basis = 0) - { - switch ($basis) { - case 0: - case 2: - case 4: - $daysPerYear = 360; - break; - case 3: - $daysPerYear = 365; - break; - case 1: - $daysPerYear = (PHPExcel_Calculation_DateTime::isLeapYear($year)) ? 366 : 365; - break; - default: - return PHPExcel_Calculation_Functions::NaN(); - } - return $daysPerYear; - } - - - private static function interestAndPrincipal($rate = 0, $per = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0) - { - $pmt = self::PMT($rate, $nper, $pv, $fv, $type); - $capital = $pv; - for ($i = 1; $i<= $per; ++$i) { - $interest = ($type && $i == 1) ? 0 : -$capital * $rate; - $principal = $pmt - $interest; - $capital += $principal; - } - return array($interest, $principal); - } - - - /** - * ACCRINT - * - * Returns the accrued interest for a security that pays periodic interest. - * - * Excel Function: - * ACCRINT(issue,firstinterest,settlement,rate,par,frequency[,basis]) - * - * @access public - * @category Financial Functions - * @param mixed $issue The security's issue date. - * @param mixed $firstinterest The security's first interest date. - * @param mixed $settlement The security's settlement date. - * The security settlement date is the date after the issue date - * when the security is traded to the buyer. - * @param float $rate The security's annual coupon rate. - * @param float $par The security's par value. - * If you omit par, ACCRINT uses $1,000. - * @param integer $frequency the number of coupon payments per year. - * Valid frequency values are: - * 1 Annual - * 2 Semi-Annual - * 4 Quarterly - * If working in Gnumeric Mode, the following frequency options are - * also available - * 6 Bimonthly - * 12 Monthly - * @param integer $basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function ACCRINT($issue, $firstinterest, $settlement, $rate, $par = 1000, $frequency = 1, $basis = 0) - { - $issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue); - $firstinterest = PHPExcel_Calculation_Functions::flattenSingleValue($firstinterest); - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $par = (is_null($par)) ? 1000 : PHPExcel_Calculation_Functions::flattenSingleValue($par); - $frequency = (is_null($frequency)) ? 1 : PHPExcel_Calculation_Functions::flattenSingleValue($frequency); - $basis = (is_null($basis)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if ((is_numeric($rate)) && (is_numeric($par))) { - $rate = (float) $rate; - $par = (float) $par; - if (($rate <= 0) || ($par <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysBetweenIssueAndSettlement = PHPExcel_Calculation_DateTime::YEARFRAC($issue, $settlement, $basis); - if (!is_numeric($daysBetweenIssueAndSettlement)) { - // return date error - return $daysBetweenIssueAndSettlement; - } - - return $par * $rate * $daysBetweenIssueAndSettlement; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * ACCRINTM - * - * Returns the accrued interest for a security that pays interest at maturity. - * - * Excel Function: - * ACCRINTM(issue,settlement,rate[,par[,basis]]) - * - * @access public - * @category Financial Functions - * @param mixed issue The security's issue date. - * @param mixed settlement The security's settlement (or maturity) date. - * @param float rate The security's annual coupon rate. - * @param float par The security's par value. - * If you omit par, ACCRINT uses $1,000. - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function ACCRINTM($issue, $settlement, $rate, $par = 1000, $basis = 0) - { - $issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue); - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $par = (is_null($par)) ? 1000 : PHPExcel_Calculation_Functions::flattenSingleValue($par); - $basis = (is_null($basis)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if ((is_numeric($rate)) && (is_numeric($par))) { - $rate = (float) $rate; - $par = (float) $par; - if (($rate <= 0) || ($par <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysBetweenIssueAndSettlement = PHPExcel_Calculation_DateTime::YEARFRAC($issue, $settlement, $basis); - if (!is_numeric($daysBetweenIssueAndSettlement)) { - // return date error - return $daysBetweenIssueAndSettlement; - } - return $par * $rate * $daysBetweenIssueAndSettlement; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * AMORDEGRC - * - * Returns the depreciation for each accounting period. - * This function is provided for the French accounting system. If an asset is purchased in - * the middle of the accounting period, the prorated depreciation is taken into account. - * The function is similar to AMORLINC, except that a depreciation coefficient is applied in - * the calculation depending on the life of the assets. - * This function will return the depreciation until the last period of the life of the assets - * or until the cumulated value of depreciation is greater than the cost of the assets minus - * the salvage value. - * - * Excel Function: - * AMORDEGRC(cost,purchased,firstPeriod,salvage,period,rate[,basis]) - * - * @access public - * @category Financial Functions - * @param float cost The cost of the asset. - * @param mixed purchased Date of the purchase of the asset. - * @param mixed firstPeriod Date of the end of the first period. - * @param mixed salvage The salvage value at the end of the life of the asset. - * @param float period The period. - * @param float rate Rate of depreciation. - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function AMORDEGRC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0) - { - $cost = PHPExcel_Calculation_Functions::flattenSingleValue($cost); - $purchased = PHPExcel_Calculation_Functions::flattenSingleValue($purchased); - $firstPeriod = PHPExcel_Calculation_Functions::flattenSingleValue($firstPeriod); - $salvage = PHPExcel_Calculation_Functions::flattenSingleValue($salvage); - $period = floor(PHPExcel_Calculation_Functions::flattenSingleValue($period)); - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // The depreciation coefficients are: - // Life of assets (1/rate) Depreciation coefficient - // Less than 3 years 1 - // Between 3 and 4 years 1.5 - // Between 5 and 6 years 2 - // More than 6 years 2.5 - $fUsePer = 1.0 / $rate; - if ($fUsePer < 3.0) { - $amortiseCoeff = 1.0; - } elseif ($fUsePer < 5.0) { - $amortiseCoeff = 1.5; - } elseif ($fUsePer <= 6.0) { - $amortiseCoeff = 2.0; - } else { - $amortiseCoeff = 2.5; - } - - $rate *= $amortiseCoeff; - $fNRate = round(PHPExcel_Calculation_DateTime::YEARFRAC($purchased, $firstPeriod, $basis) * $rate * $cost, 0); - $cost -= $fNRate; - $fRest = $cost - $salvage; - - for ($n = 0; $n < $period; ++$n) { - $fNRate = round($rate * $cost, 0); - $fRest -= $fNRate; - - if ($fRest < 0.0) { - switch ($period - $n) { - case 0: - case 1: - return round($cost * 0.5, 0); - default: - return 0.0; - } - } - $cost -= $fNRate; - } - return $fNRate; - } - - - /** - * AMORLINC - * - * Returns the depreciation for each accounting period. - * This function is provided for the French accounting system. If an asset is purchased in - * the middle of the accounting period, the prorated depreciation is taken into account. - * - * Excel Function: - * AMORLINC(cost,purchased,firstPeriod,salvage,period,rate[,basis]) - * - * @access public - * @category Financial Functions - * @param float cost The cost of the asset. - * @param mixed purchased Date of the purchase of the asset. - * @param mixed firstPeriod Date of the end of the first period. - * @param mixed salvage The salvage value at the end of the life of the asset. - * @param float period The period. - * @param float rate Rate of depreciation. - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function AMORLINC($cost, $purchased, $firstPeriod, $salvage, $period, $rate, $basis = 0) - { - $cost = PHPExcel_Calculation_Functions::flattenSingleValue($cost); - $purchased = PHPExcel_Calculation_Functions::flattenSingleValue($purchased); - $firstPeriod = PHPExcel_Calculation_Functions::flattenSingleValue($firstPeriod); - $salvage = PHPExcel_Calculation_Functions::flattenSingleValue($salvage); - $period = PHPExcel_Calculation_Functions::flattenSingleValue($period); - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - $fOneRate = $cost * $rate; - $fCostDelta = $cost - $salvage; - // Note, quirky variation for leap years on the YEARFRAC for this function - $purchasedYear = PHPExcel_Calculation_DateTime::YEAR($purchased); - $yearFrac = PHPExcel_Calculation_DateTime::YEARFRAC($purchased, $firstPeriod, $basis); - - if (($basis == 1) && ($yearFrac < 1) && (PHPExcel_Calculation_DateTime::isLeapYear($purchasedYear))) { - $yearFrac *= 365 / 366; - } - - $f0Rate = $yearFrac * $rate * $cost; - $nNumOfFullPeriods = intval(($cost - $salvage - $f0Rate) / $fOneRate); - - if ($period == 0) { - return $f0Rate; - } elseif ($period <= $nNumOfFullPeriods) { - return $fOneRate; - } elseif ($period == ($nNumOfFullPeriods + 1)) { - return ($fCostDelta - $fOneRate * $nNumOfFullPeriods - $f0Rate); - } else { - return 0.0; - } - } - - - /** - * COUPDAYBS - * - * Returns the number of days from the beginning of the coupon period to the settlement date. - * - * Excel Function: - * COUPDAYBS(settlement,maturity,frequency[,basis]) - * - * @access public - * @category Financial Functions - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue - * date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param mixed frequency the number of coupon payments per year. - * Valid frequency values are: - * 1 Annual - * 2 Semi-Annual - * 4 Quarterly - * If working in Gnumeric Mode, the following frequency options are - * also available - * 6 Bimonthly - * 12 Monthly - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function COUPDAYBS($settlement, $maturity, $frequency, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $frequency = (int) PHPExcel_Calculation_Functions::flattenSingleValue($frequency); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - if (is_string($settlement = PHPExcel_Calculation_DateTime::getDateValue($settlement))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (($settlement > $maturity) || - (!self::isValidFrequency($frequency)) || - (($basis < 0) || ($basis > 4))) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $daysPerYear = self::daysPerYear(PHPExcel_Calculation_DateTime::YEAR($settlement), $basis); - $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); - - return PHPExcel_Calculation_DateTime::YEARFRAC($prev, $settlement, $basis) * $daysPerYear; - } - - - /** - * COUPDAYS - * - * Returns the number of days in the coupon period that contains the settlement date. - * - * Excel Function: - * COUPDAYS(settlement,maturity,frequency[,basis]) - * - * @access public - * @category Financial Functions - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue - * date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param mixed frequency the number of coupon payments per year. - * Valid frequency values are: - * 1 Annual - * 2 Semi-Annual - * 4 Quarterly - * If working in Gnumeric Mode, the following frequency options are - * also available - * 6 Bimonthly - * 12 Monthly - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function COUPDAYS($settlement, $maturity, $frequency, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $frequency = (int) PHPExcel_Calculation_Functions::flattenSingleValue($frequency); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - if (is_string($settlement = PHPExcel_Calculation_DateTime::getDateValue($settlement))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (($settlement > $maturity) || - (!self::isValidFrequency($frequency)) || - (($basis < 0) || ($basis > 4))) { - return PHPExcel_Calculation_Functions::NaN(); - } - - switch ($basis) { - case 3: - // Actual/365 - return 365 / $frequency; - case 1: - // Actual/actual - if ($frequency == 1) { - $daysPerYear = self::daysPerYear(PHPExcel_Calculation_DateTime::YEAR($maturity), $basis); - return ($daysPerYear / $frequency); - } - $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); - $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); - return ($next - $prev); - default: - // US (NASD) 30/360, Actual/360 or European 30/360 - return 360 / $frequency; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * COUPDAYSNC - * - * Returns the number of days from the settlement date to the next coupon date. - * - * Excel Function: - * COUPDAYSNC(settlement,maturity,frequency[,basis]) - * - * @access public - * @category Financial Functions - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue - * date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param mixed frequency the number of coupon payments per year. - * Valid frequency values are: - * 1 Annual - * 2 Semi-Annual - * 4 Quarterly - * If working in Gnumeric Mode, the following frequency options are - * also available - * 6 Bimonthly - * 12 Monthly - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function COUPDAYSNC($settlement, $maturity, $frequency, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $frequency = (int) PHPExcel_Calculation_Functions::flattenSingleValue($frequency); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - if (is_string($settlement = PHPExcel_Calculation_DateTime::getDateValue($settlement))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (($settlement > $maturity) || - (!self::isValidFrequency($frequency)) || - (($basis < 0) || ($basis > 4))) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $daysPerYear = self::daysPerYear(PHPExcel_Calculation_DateTime::YEAR($settlement), $basis); - $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); - - return PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $next, $basis) * $daysPerYear; - } - - - /** - * COUPNCD - * - * Returns the next coupon date after the settlement date. - * - * Excel Function: - * COUPNCD(settlement,maturity,frequency[,basis]) - * - * @access public - * @category Financial Functions - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue - * date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param mixed frequency the number of coupon payments per year. - * Valid frequency values are: - * 1 Annual - * 2 Semi-Annual - * 4 Quarterly - * If working in Gnumeric Mode, the following frequency options are - * also available - * 6 Bimonthly - * 12 Monthly - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function COUPNCD($settlement, $maturity, $frequency, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $frequency = (int) PHPExcel_Calculation_Functions::flattenSingleValue($frequency); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - if (is_string($settlement = PHPExcel_Calculation_DateTime::getDateValue($settlement))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (($settlement > $maturity) || - (!self::isValidFrequency($frequency)) || - (($basis < 0) || ($basis > 4))) { - return PHPExcel_Calculation_Functions::NaN(); - } - - return self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); - } - - - /** - * COUPNUM - * - * Returns the number of coupons payable between the settlement date and maturity date, - * rounded up to the nearest whole coupon. - * - * Excel Function: - * COUPNUM(settlement,maturity,frequency[,basis]) - * - * @access public - * @category Financial Functions - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue - * date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param mixed frequency the number of coupon payments per year. - * Valid frequency values are: - * 1 Annual - * 2 Semi-Annual - * 4 Quarterly - * If working in Gnumeric Mode, the following frequency options are - * also available - * 6 Bimonthly - * 12 Monthly - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return integer - */ - public static function COUPNUM($settlement, $maturity, $frequency, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $frequency = (int) PHPExcel_Calculation_Functions::flattenSingleValue($frequency); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - if (is_string($settlement = PHPExcel_Calculation_DateTime::getDateValue($settlement))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (($settlement > $maturity) || - (!self::isValidFrequency($frequency)) || - (($basis < 0) || ($basis > 4))) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $settlement = self::couponFirstPeriodDate($settlement, $maturity, $frequency, true); - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity, $basis) * 365; - - switch ($frequency) { - case 1: // annual payments - return ceil($daysBetweenSettlementAndMaturity / 360); - case 2: // half-yearly - return ceil($daysBetweenSettlementAndMaturity / 180); - case 4: // quarterly - return ceil($daysBetweenSettlementAndMaturity / 90); - case 6: // bimonthly - return ceil($daysBetweenSettlementAndMaturity / 60); - case 12: // monthly - return ceil($daysBetweenSettlementAndMaturity / 30); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * COUPPCD - * - * Returns the previous coupon date before the settlement date. - * - * Excel Function: - * COUPPCD(settlement,maturity,frequency[,basis]) - * - * @access public - * @category Financial Functions - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue - * date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param mixed frequency the number of coupon payments per year. - * Valid frequency values are: - * 1 Annual - * 2 Semi-Annual - * 4 Quarterly - * If working in Gnumeric Mode, the following frequency options are - * also available - * 6 Bimonthly - * 12 Monthly - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return mixed Excel date/time serial value, PHP date/time serial value or PHP date/time object, - * depending on the value of the ReturnDateType flag - */ - public static function COUPPCD($settlement, $maturity, $frequency, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $frequency = (int) PHPExcel_Calculation_Functions::flattenSingleValue($frequency); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - if (is_string($settlement = PHPExcel_Calculation_DateTime::getDateValue($settlement))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (($settlement > $maturity) || - (!self::isValidFrequency($frequency)) || - (($basis < 0) || ($basis > 4))) { - return PHPExcel_Calculation_Functions::NaN(); - } - - return self::couponFirstPeriodDate($settlement, $maturity, $frequency, false); - } - - - /** - * CUMIPMT - * - * Returns the cumulative interest paid on a loan between the start and end periods. - * - * Excel Function: - * CUMIPMT(rate,nper,pv,start,end[,type]) - * - * @access public - * @category Financial Functions - * @param float $rate The Interest rate - * @param integer $nper The total number of payment periods - * @param float $pv Present Value - * @param integer $start The first period in the calculation. - * Payment periods are numbered beginning with 1. - * @param integer $end The last period in the calculation. - * @param integer $type A number 0 or 1 and indicates when payments are due: - * 0 or omitted At the end of the period. - * 1 At the beginning of the period. - * @return float - */ - public static function CUMIPMT($rate, $nper, $pv, $start, $end, $type = 0) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $nper = (int) PHPExcel_Calculation_Functions::flattenSingleValue($nper); - $pv = PHPExcel_Calculation_Functions::flattenSingleValue($pv); - $start = (int) PHPExcel_Calculation_Functions::flattenSingleValue($start); - $end = (int) PHPExcel_Calculation_Functions::flattenSingleValue($end); - $type = (int) PHPExcel_Calculation_Functions::flattenSingleValue($type); - - // Validate parameters - if ($type != 0 && $type != 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($start < 1 || $start > $end) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Calculate - $interest = 0; - for ($per = $start; $per <= $end; ++$per) { - $interest += self::IPMT($rate, $per, $nper, $pv, 0, $type); - } - - return $interest; - } - - - /** - * CUMPRINC - * - * Returns the cumulative principal paid on a loan between the start and end periods. - * - * Excel Function: - * CUMPRINC(rate,nper,pv,start,end[,type]) - * - * @access public - * @category Financial Functions - * @param float $rate The Interest rate - * @param integer $nper The total number of payment periods - * @param float $pv Present Value - * @param integer $start The first period in the calculation. - * Payment periods are numbered beginning with 1. - * @param integer $end The last period in the calculation. - * @param integer $type A number 0 or 1 and indicates when payments are due: - * 0 or omitted At the end of the period. - * 1 At the beginning of the period. - * @return float - */ - public static function CUMPRINC($rate, $nper, $pv, $start, $end, $type = 0) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $nper = (int) PHPExcel_Calculation_Functions::flattenSingleValue($nper); - $pv = PHPExcel_Calculation_Functions::flattenSingleValue($pv); - $start = (int) PHPExcel_Calculation_Functions::flattenSingleValue($start); - $end = (int) PHPExcel_Calculation_Functions::flattenSingleValue($end); - $type = (int) PHPExcel_Calculation_Functions::flattenSingleValue($type); - - // Validate parameters - if ($type != 0 && $type != 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($start < 1 || $start > $end) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Calculate - $principal = 0; - for ($per = $start; $per <= $end; ++$per) { - $principal += self::PPMT($rate, $per, $nper, $pv, 0, $type); - } - - return $principal; - } - - - /** - * DB - * - * Returns the depreciation of an asset for a specified period using the - * fixed-declining balance method. - * This form of depreciation is used if you want to get a higher depreciation value - * at the beginning of the depreciation (as opposed to linear depreciation). The - * depreciation value is reduced with every depreciation period by the depreciation - * already deducted from the initial cost. - * - * Excel Function: - * DB(cost,salvage,life,period[,month]) - * - * @access public - * @category Financial Functions - * @param float cost Initial cost of the asset. - * @param float salvage Value at the end of the depreciation. - * (Sometimes called the salvage value of the asset) - * @param integer life Number of periods over which the asset is depreciated. - * (Sometimes called the useful life of the asset) - * @param integer period The period for which you want to calculate the - * depreciation. Period must use the same units as life. - * @param integer month Number of months in the first year. If month is omitted, - * it defaults to 12. - * @return float - */ - public static function DB($cost, $salvage, $life, $period, $month = 12) - { - $cost = PHPExcel_Calculation_Functions::flattenSingleValue($cost); - $salvage = PHPExcel_Calculation_Functions::flattenSingleValue($salvage); - $life = PHPExcel_Calculation_Functions::flattenSingleValue($life); - $period = PHPExcel_Calculation_Functions::flattenSingleValue($period); - $month = PHPExcel_Calculation_Functions::flattenSingleValue($month); - - // Validate - if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($month))) { - $cost = (float) $cost; - $salvage = (float) $salvage; - $life = (int) $life; - $period = (int) $period; - $month = (int) $month; - if ($cost == 0) { - return 0.0; - } elseif (($cost < 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($month < 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - // Set Fixed Depreciation Rate - $fixedDepreciationRate = 1 - pow(($salvage / $cost), (1 / $life)); - $fixedDepreciationRate = round($fixedDepreciationRate, 3); - - // Loop through each period calculating the depreciation - $previousDepreciation = 0; - for ($per = 1; $per <= $period; ++$per) { - if ($per == 1) { - $depreciation = $cost * $fixedDepreciationRate * $month / 12; - } elseif ($per == ($life + 1)) { - $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate * (12 - $month) / 12; - } else { - $depreciation = ($cost - $previousDepreciation) * $fixedDepreciationRate; - } - $previousDepreciation += $depreciation; - } - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - $depreciation = round($depreciation, 2); - } - return $depreciation; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * DDB - * - * Returns the depreciation of an asset for a specified period using the - * double-declining balance method or some other method you specify. - * - * Excel Function: - * DDB(cost,salvage,life,period[,factor]) - * - * @access public - * @category Financial Functions - * @param float cost Initial cost of the asset. - * @param float salvage Value at the end of the depreciation. - * (Sometimes called the salvage value of the asset) - * @param integer life Number of periods over which the asset is depreciated. - * (Sometimes called the useful life of the asset) - * @param integer period The period for which you want to calculate the - * depreciation. Period must use the same units as life. - * @param float factor The rate at which the balance declines. - * If factor is omitted, it is assumed to be 2 (the - * double-declining balance method). - * @return float - */ - public static function DDB($cost, $salvage, $life, $period, $factor = 2.0) - { - $cost = PHPExcel_Calculation_Functions::flattenSingleValue($cost); - $salvage = PHPExcel_Calculation_Functions::flattenSingleValue($salvage); - $life = PHPExcel_Calculation_Functions::flattenSingleValue($life); - $period = PHPExcel_Calculation_Functions::flattenSingleValue($period); - $factor = PHPExcel_Calculation_Functions::flattenSingleValue($factor); - - // Validate - if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period)) && (is_numeric($factor))) { - $cost = (float) $cost; - $salvage = (float) $salvage; - $life = (int) $life; - $period = (int) $period; - $factor = (float) $factor; - if (($cost <= 0) || (($salvage / $cost) < 0) || ($life <= 0) || ($period < 1) || ($factor <= 0.0) || ($period > $life)) { - return PHPExcel_Calculation_Functions::NaN(); - } - // Set Fixed Depreciation Rate - $fixedDepreciationRate = 1 - pow(($salvage / $cost), (1 / $life)); - $fixedDepreciationRate = round($fixedDepreciationRate, 3); - - // Loop through each period calculating the depreciation - $previousDepreciation = 0; - for ($per = 1; $per <= $period; ++$per) { - $depreciation = min(($cost - $previousDepreciation) * ($factor / $life), ($cost - $salvage - $previousDepreciation)); - $previousDepreciation += $depreciation; - } - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - $depreciation = round($depreciation, 2); - } - return $depreciation; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * DISC - * - * Returns the discount rate for a security. - * - * Excel Function: - * DISC(settlement,maturity,price,redemption[,basis]) - * - * @access public - * @category Financial Functions - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue - * date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param integer price The security's price per $100 face value. - * @param integer redemption The security's redemption value per $100 face value. - * @param integer basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function DISC($settlement, $maturity, $price, $redemption, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $price = PHPExcel_Calculation_Functions::flattenSingleValue($price); - $redemption = PHPExcel_Calculation_Functions::flattenSingleValue($redemption); - $basis = PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if ((is_numeric($price)) && (is_numeric($redemption)) && (is_numeric($basis))) { - $price = (float) $price; - $redemption = (float) $redemption; - $basis = (int) $basis; - if (($price <= 0) || ($redemption <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity, $basis); - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - - return ((1 - $price / $redemption) / $daysBetweenSettlementAndMaturity); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * DOLLARDE - * - * Converts a dollar price expressed as an integer part and a fraction - * part into a dollar price expressed as a decimal number. - * Fractional dollar numbers are sometimes used for security prices. - * - * Excel Function: - * DOLLARDE(fractional_dollar,fraction) - * - * @access public - * @category Financial Functions - * @param float $fractional_dollar Fractional Dollar - * @param integer $fraction Fraction - * @return float - */ - public static function DOLLARDE($fractional_dollar = null, $fraction = 0) - { - $fractional_dollar = PHPExcel_Calculation_Functions::flattenSingleValue($fractional_dollar); - $fraction = (int)PHPExcel_Calculation_Functions::flattenSingleValue($fraction); - - // Validate parameters - if (is_null($fractional_dollar) || $fraction < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($fraction == 0) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $dollars = floor($fractional_dollar); - $cents = fmod($fractional_dollar, 1); - $cents /= $fraction; - $cents *= pow(10, ceil(log10($fraction))); - return $dollars + $cents; - } - - - /** - * DOLLARFR - * - * Converts a dollar price expressed as a decimal number into a dollar price - * expressed as a fraction. - * Fractional dollar numbers are sometimes used for security prices. - * - * Excel Function: - * DOLLARFR(decimal_dollar,fraction) - * - * @access public - * @category Financial Functions - * @param float $decimal_dollar Decimal Dollar - * @param integer $fraction Fraction - * @return float - */ - public static function DOLLARFR($decimal_dollar = null, $fraction = 0) - { - $decimal_dollar = PHPExcel_Calculation_Functions::flattenSingleValue($decimal_dollar); - $fraction = (int)PHPExcel_Calculation_Functions::flattenSingleValue($fraction); - - // Validate parameters - if (is_null($decimal_dollar) || $fraction < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($fraction == 0) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $dollars = floor($decimal_dollar); - $cents = fmod($decimal_dollar, 1); - $cents *= $fraction; - $cents *= pow(10, -ceil(log10($fraction))); - return $dollars + $cents; - } - - - /** - * EFFECT - * - * Returns the effective interest rate given the nominal rate and the number of - * compounding payments per year. - * - * Excel Function: - * EFFECT(nominal_rate,npery) - * - * @access public - * @category Financial Functions - * @param float $nominal_rate Nominal interest rate - * @param integer $npery Number of compounding payments per year - * @return float - */ - public static function EFFECT($nominal_rate = 0, $npery = 0) - { - $nominal_rate = PHPExcel_Calculation_Functions::flattenSingleValue($nominal_rate); - $npery = (int)PHPExcel_Calculation_Functions::flattenSingleValue($npery); - - // Validate parameters - if ($nominal_rate <= 0 || $npery < 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - - return pow((1 + $nominal_rate / $npery), $npery) - 1; - } - - - /** - * FV - * - * Returns the Future Value of a cash flow with constant payments and interest rate (annuities). - * - * Excel Function: - * FV(rate,nper,pmt[,pv[,type]]) - * - * @access public - * @category Financial Functions - * @param float $rate The interest rate per period - * @param int $nper Total number of payment periods in an annuity - * @param float $pmt The payment made each period: it cannot change over the - * life of the annuity. Typically, pmt contains principal - * and interest but no other fees or taxes. - * @param float $pv Present Value, or the lump-sum amount that a series of - * future payments is worth right now. - * @param integer $type A number 0 or 1 and indicates when payments are due: - * 0 or omitted At the end of the period. - * 1 At the beginning of the period. - * @return float - */ - public static function FV($rate = 0, $nper = 0, $pmt = 0, $pv = 0, $type = 0) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $nper = PHPExcel_Calculation_Functions::flattenSingleValue($nper); - $pmt = PHPExcel_Calculation_Functions::flattenSingleValue($pmt); - $pv = PHPExcel_Calculation_Functions::flattenSingleValue($pv); - $type = PHPExcel_Calculation_Functions::flattenSingleValue($type); - - // Validate parameters - if ($type != 0 && $type != 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Calculate - if (!is_null($rate) && $rate != 0) { - return -$pv * pow(1 + $rate, $nper) - $pmt * (1 + $rate * $type) * (pow(1 + $rate, $nper) - 1) / $rate; - } - return -$pv - $pmt * $nper; - } - - - /** - * FVSCHEDULE - * - * Returns the future value of an initial principal after applying a series of compound interest rates. - * Use FVSCHEDULE to calculate the future value of an investment with a variable or adjustable rate. - * - * Excel Function: - * FVSCHEDULE(principal,schedule) - * - * @param float $principal The present value. - * @param float[] $schedule An array of interest rates to apply. - * @return float - */ - public static function FVSCHEDULE($principal, $schedule) - { - $principal = PHPExcel_Calculation_Functions::flattenSingleValue($principal); - $schedule = PHPExcel_Calculation_Functions::flattenArray($schedule); - - foreach ($schedule as $rate) { - $principal *= 1 + $rate; - } - - return $principal; - } - - - /** - * INTRATE - * - * Returns the interest rate for a fully invested security. - * - * Excel Function: - * INTRATE(settlement,maturity,investment,redemption[,basis]) - * - * @param mixed $settlement The security's settlement date. - * The security settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed $maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param integer $investment The amount invested in the security. - * @param integer $redemption The amount to be received at maturity. - * @param integer $basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function INTRATE($settlement, $maturity, $investment, $redemption, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $investment = PHPExcel_Calculation_Functions::flattenSingleValue($investment); - $redemption = PHPExcel_Calculation_Functions::flattenSingleValue($redemption); - $basis = PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if ((is_numeric($investment)) && (is_numeric($redemption)) && (is_numeric($basis))) { - $investment = (float) $investment; - $redemption = (float) $redemption; - $basis = (int) $basis; - if (($investment <= 0) || ($redemption <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity, $basis); - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - - return (($redemption / $investment) - 1) / ($daysBetweenSettlementAndMaturity); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * IPMT - * - * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. - * - * Excel Function: - * IPMT(rate,per,nper,pv[,fv][,type]) - * - * @param float $rate Interest rate per period - * @param int $per Period for which we want to find the interest - * @param int $nper Number of periods - * @param float $pv Present Value - * @param float $fv Future Value - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float - */ - public static function IPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $per = (int) PHPExcel_Calculation_Functions::flattenSingleValue($per); - $nper = (int) PHPExcel_Calculation_Functions::flattenSingleValue($nper); - $pv = PHPExcel_Calculation_Functions::flattenSingleValue($pv); - $fv = PHPExcel_Calculation_Functions::flattenSingleValue($fv); - $type = (int) PHPExcel_Calculation_Functions::flattenSingleValue($type); - - // Validate parameters - if ($type != 0 && $type != 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($per <= 0 || $per > $nper) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Calculate - $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type); - return $interestAndPrincipal[0]; - } - - /** - * IRR - * - * Returns the internal rate of return for a series of cash flows represented by the numbers in values. - * These cash flows do not have to be even, as they would be for an annuity. However, the cash flows must occur - * at regular intervals, such as monthly or annually. The internal rate of return is the interest rate received - * for an investment consisting of payments (negative values) and income (positive values) that occur at regular - * periods. - * - * Excel Function: - * IRR(values[,guess]) - * - * @param float[] $values An array or a reference to cells that contain numbers for which you want - * to calculate the internal rate of return. - * Values must contain at least one positive value and one negative value to - * calculate the internal rate of return. - * @param float $guess A number that you guess is close to the result of IRR - * @return float - */ - public static function IRR($values, $guess = 0.1) - { - if (!is_array($values)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $values = PHPExcel_Calculation_Functions::flattenArray($values); - $guess = PHPExcel_Calculation_Functions::flattenSingleValue($guess); - - // create an initial range, with a root somewhere between 0 and guess - $x1 = 0.0; - $x2 = $guess; - $f1 = self::NPV($x1, $values); - $f2 = self::NPV($x2, $values); - for ($i = 0; $i < FINANCIAL_MAX_ITERATIONS; ++$i) { - if (($f1 * $f2) < 0.0) { - break; - } - if (abs($f1) < abs($f2)) { - $f1 = self::NPV($x1 += 1.6 * ($x1 - $x2), $values); - } else { - $f2 = self::NPV($x2 += 1.6 * ($x2 - $x1), $values); - } - } - if (($f1 * $f2) > 0.0) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - $f = self::NPV($x1, $values); - if ($f < 0.0) { - $rtb = $x1; - $dx = $x2 - $x1; - } else { - $rtb = $x2; - $dx = $x1 - $x2; - } - - for ($i = 0; $i < FINANCIAL_MAX_ITERATIONS; ++$i) { - $dx *= 0.5; - $x_mid = $rtb + $dx; - $f_mid = self::NPV($x_mid, $values); - if ($f_mid <= 0.0) { - $rtb = $x_mid; - } - if ((abs($f_mid) < FINANCIAL_PRECISION) || (abs($dx) < FINANCIAL_PRECISION)) { - return $x_mid; - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * ISPMT - * - * Returns the interest payment for an investment based on an interest rate and a constant payment schedule. - * - * Excel Function: - * =ISPMT(interest_rate, period, number_payments, PV) - * - * interest_rate is the interest rate for the investment - * - * period is the period to calculate the interest rate. It must be betweeen 1 and number_payments. - * - * number_payments is the number of payments for the annuity - * - * PV is the loan amount or present value of the payments - */ - public static function ISPMT() - { - // Return value - $returnValue = 0; - - // Get the parameters - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - $interestRate = array_shift($aArgs); - $period = array_shift($aArgs); - $numberPeriods = array_shift($aArgs); - $principleRemaining = array_shift($aArgs); - - // Calculate - $principlePayment = ($principleRemaining * 1.0) / ($numberPeriods * 1.0); - for ($i=0; $i <= $period; ++$i) { - $returnValue = $interestRate * $principleRemaining * -1; - $principleRemaining -= $principlePayment; - // principle needs to be 0 after the last payment, don't let floating point screw it up - if ($i == $numberPeriods) { - $returnValue = 0; - } - } - return($returnValue); - } - - - /** - * MIRR - * - * Returns the modified internal rate of return for a series of periodic cash flows. MIRR considers both - * the cost of the investment and the interest received on reinvestment of cash. - * - * Excel Function: - * MIRR(values,finance_rate, reinvestment_rate) - * - * @param float[] $values An array or a reference to cells that contain a series of payments and - * income occurring at regular intervals. - * Payments are negative value, income is positive values. - * @param float $finance_rate The interest rate you pay on the money used in the cash flows - * @param float $reinvestment_rate The interest rate you receive on the cash flows as you reinvest them - * @return float - */ - public static function MIRR($values, $finance_rate, $reinvestment_rate) - { - if (!is_array($values)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $values = PHPExcel_Calculation_Functions::flattenArray($values); - $finance_rate = PHPExcel_Calculation_Functions::flattenSingleValue($finance_rate); - $reinvestment_rate = PHPExcel_Calculation_Functions::flattenSingleValue($reinvestment_rate); - $n = count($values); - - $rr = 1.0 + $reinvestment_rate; - $fr = 1.0 + $finance_rate; - - $npv_pos = $npv_neg = 0.0; - foreach ($values as $i => $v) { - if ($v >= 0) { - $npv_pos += $v / pow($rr, $i); - } else { - $npv_neg += $v / pow($fr, $i); - } - } - - if (($npv_neg == 0) || ($npv_pos == 0) || ($reinvestment_rate <= -1)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - $mirr = pow((-$npv_pos * pow($rr, $n)) - / ($npv_neg * ($rr)), (1.0 / ($n - 1))) - 1.0; - - return (is_finite($mirr) ? $mirr : PHPExcel_Calculation_Functions::VALUE()); - } - - - /** - * NOMINAL - * - * Returns the nominal interest rate given the effective rate and the number of compounding payments per year. - * - * @param float $effect_rate Effective interest rate - * @param int $npery Number of compounding payments per year - * @return float - */ - public static function NOMINAL($effect_rate = 0, $npery = 0) - { - $effect_rate = PHPExcel_Calculation_Functions::flattenSingleValue($effect_rate); - $npery = (int)PHPExcel_Calculation_Functions::flattenSingleValue($npery); - - // Validate parameters - if ($effect_rate <= 0 || $npery < 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Calculate - return $npery * (pow($effect_rate + 1, 1 / $npery) - 1); - } - - - /** - * NPER - * - * Returns the number of periods for a cash flow with constant periodic payments (annuities), and interest rate. - * - * @param float $rate Interest rate per period - * @param int $pmt Periodic payment (annuity) - * @param float $pv Present Value - * @param float $fv Future Value - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float - */ - public static function NPER($rate = 0, $pmt = 0, $pv = 0, $fv = 0, $type = 0) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $pmt = PHPExcel_Calculation_Functions::flattenSingleValue($pmt); - $pv = PHPExcel_Calculation_Functions::flattenSingleValue($pv); - $fv = PHPExcel_Calculation_Functions::flattenSingleValue($fv); - $type = PHPExcel_Calculation_Functions::flattenSingleValue($type); - - // Validate parameters - if ($type != 0 && $type != 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Calculate - if (!is_null($rate) && $rate != 0) { - if ($pmt == 0 && $pv == 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return log(($pmt * (1 + $rate * $type) / $rate - $fv) / ($pv + $pmt * (1 + $rate * $type) / $rate)) / log(1 + $rate); - } - if ($pmt == 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return (-$pv -$fv) / $pmt; - } - - /** - * NPV - * - * Returns the Net Present Value of a cash flow series given a discount rate. - * - * @return float - */ - public static function NPV() - { - // Return value - $returnValue = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - // Calculate - $rate = array_shift($aArgs); - for ($i = 1; $i <= count($aArgs); ++$i) { - // Is it a numeric value? - if (is_numeric($aArgs[$i - 1])) { - $returnValue += $aArgs[$i - 1] / pow(1 + $rate, $i); - } - } - - // Return - return $returnValue; - } - - /** - * PMT - * - * Returns the constant payment (annuity) for a cash flow with a constant interest rate. - * - * @param float $rate Interest rate per period - * @param int $nper Number of periods - * @param float $pv Present Value - * @param float $fv Future Value - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float - */ - public static function PMT($rate = 0, $nper = 0, $pv = 0, $fv = 0, $type = 0) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $nper = PHPExcel_Calculation_Functions::flattenSingleValue($nper); - $pv = PHPExcel_Calculation_Functions::flattenSingleValue($pv); - $fv = PHPExcel_Calculation_Functions::flattenSingleValue($fv); - $type = PHPExcel_Calculation_Functions::flattenSingleValue($type); - - // Validate parameters - if ($type != 0 && $type != 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Calculate - if (!is_null($rate) && $rate != 0) { - return (-$fv - $pv * pow(1 + $rate, $nper)) / (1 + $rate * $type) / ((pow(1 + $rate, $nper) - 1) / $rate); - } - return (-$pv - $fv) / $nper; - } - - - /** - * PPMT - * - * Returns the interest payment for a given period for an investment based on periodic, constant payments and a constant interest rate. - * - * @param float $rate Interest rate per period - * @param int $per Period for which we want to find the interest - * @param int $nper Number of periods - * @param float $pv Present Value - * @param float $fv Future Value - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float - */ - public static function PPMT($rate, $per, $nper, $pv, $fv = 0, $type = 0) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $per = (int) PHPExcel_Calculation_Functions::flattenSingleValue($per); - $nper = (int) PHPExcel_Calculation_Functions::flattenSingleValue($nper); - $pv = PHPExcel_Calculation_Functions::flattenSingleValue($pv); - $fv = PHPExcel_Calculation_Functions::flattenSingleValue($fv); - $type = (int) PHPExcel_Calculation_Functions::flattenSingleValue($type); - - // Validate parameters - if ($type != 0 && $type != 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($per <= 0 || $per > $nper) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Calculate - $interestAndPrincipal = self::interestAndPrincipal($rate, $per, $nper, $pv, $fv, $type); - return $interestAndPrincipal[1]; - } - - - public static function PRICE($settlement, $maturity, $rate, $yield, $redemption, $frequency, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $rate = (float) PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $yield = (float) PHPExcel_Calculation_Functions::flattenSingleValue($yield); - $redemption = (float) PHPExcel_Calculation_Functions::flattenSingleValue($redemption); - $frequency = (int) PHPExcel_Calculation_Functions::flattenSingleValue($frequency); - $basis = (is_null($basis)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - if (is_string($settlement = PHPExcel_Calculation_DateTime::getDateValue($settlement))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (($settlement > $maturity) || - (!self::isValidFrequency($frequency)) || - (($basis < 0) || ($basis > 4))) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $dsc = self::COUPDAYSNC($settlement, $maturity, $frequency, $basis); - $e = self::COUPDAYS($settlement, $maturity, $frequency, $basis); - $n = self::COUPNUM($settlement, $maturity, $frequency, $basis); - $a = self::COUPDAYBS($settlement, $maturity, $frequency, $basis); - - $baseYF = 1.0 + ($yield / $frequency); - $rfp = 100 * ($rate / $frequency); - $de = $dsc / $e; - - $result = $redemption / pow($baseYF, (--$n + $de)); - for ($k = 0; $k <= $n; ++$k) { - $result += $rfp / (pow($baseYF, ($k + $de))); - } - $result -= $rfp * ($a / $e); - - return $result; - } - - - /** - * PRICEDISC - * - * Returns the price per $100 face value of a discounted security. - * - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param int discount The security's discount rate. - * @param int redemption The security's redemption value per $100 face value. - * @param int basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function PRICEDISC($settlement, $maturity, $discount, $redemption, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $discount = (float) PHPExcel_Calculation_Functions::flattenSingleValue($discount); - $redemption = (float) PHPExcel_Calculation_Functions::flattenSingleValue($redemption); - $basis = (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if ((is_numeric($discount)) && (is_numeric($redemption)) && (is_numeric($basis))) { - if (($discount <= 0) || ($redemption <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity, $basis); - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - - return $redemption * (1 - $discount * $daysBetweenSettlementAndMaturity); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * PRICEMAT - * - * Returns the price per $100 face value of a security that pays interest at maturity. - * - * @param mixed settlement The security's settlement date. - * The security's settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param mixed issue The security's issue date. - * @param int rate The security's interest rate at date of issue. - * @param int yield The security's annual yield. - * @param int basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function PRICEMAT($settlement, $maturity, $issue, $rate, $yield, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue); - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $yield = PHPExcel_Calculation_Functions::flattenSingleValue($yield); - $basis = (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if (is_numeric($rate) && is_numeric($yield)) { - if (($rate <= 0) || ($yield <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysPerYear = self::daysPerYear(PHPExcel_Calculation_DateTime::YEAR($settlement), $basis); - if (!is_numeric($daysPerYear)) { - return $daysPerYear; - } - $daysBetweenIssueAndSettlement = PHPExcel_Calculation_DateTime::YEARFRAC($issue, $settlement, $basis); - if (!is_numeric($daysBetweenIssueAndSettlement)) { - // return date error - return $daysBetweenIssueAndSettlement; - } - $daysBetweenIssueAndSettlement *= $daysPerYear; - $daysBetweenIssueAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($issue, $maturity, $basis); - if (!is_numeric($daysBetweenIssueAndMaturity)) { - // return date error - return $daysBetweenIssueAndMaturity; - } - $daysBetweenIssueAndMaturity *= $daysPerYear; - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity, $basis); - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - $daysBetweenSettlementAndMaturity *= $daysPerYear; - - return ((100 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate * 100)) / - (1 + (($daysBetweenSettlementAndMaturity / $daysPerYear) * $yield)) - - (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate * 100)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * PV - * - * Returns the Present Value of a cash flow with constant payments and interest rate (annuities). - * - * @param float $rate Interest rate per period - * @param int $nper Number of periods - * @param float $pmt Periodic payment (annuity) - * @param float $fv Future Value - * @param int $type Payment type: 0 = at the end of each period, 1 = at the beginning of each period - * @return float - */ - public static function PV($rate = 0, $nper = 0, $pmt = 0, $fv = 0, $type = 0) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $nper = PHPExcel_Calculation_Functions::flattenSingleValue($nper); - $pmt = PHPExcel_Calculation_Functions::flattenSingleValue($pmt); - $fv = PHPExcel_Calculation_Functions::flattenSingleValue($fv); - $type = PHPExcel_Calculation_Functions::flattenSingleValue($type); - - // Validate parameters - if ($type != 0 && $type != 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // Calculate - if (!is_null($rate) && $rate != 0) { - return (-$pmt * (1 + $rate * $type) * ((pow(1 + $rate, $nper) - 1) / $rate) - $fv) / pow(1 + $rate, $nper); - } - return -$fv - $pmt * $nper; - } - - - /** - * RATE - * - * Returns the interest rate per period of an annuity. - * RATE is calculated by iteration and can have zero or more solutions. - * If the successive results of RATE do not converge to within 0.0000001 after 20 iterations, - * RATE returns the #NUM! error value. - * - * Excel Function: - * RATE(nper,pmt,pv[,fv[,type[,guess]]]) - * - * @access public - * @category Financial Functions - * @param float nper The total number of payment periods in an annuity. - * @param float pmt The payment made each period and cannot change over the life - * of the annuity. - * Typically, pmt includes principal and interest but no other - * fees or taxes. - * @param float pv The present value - the total amount that a series of future - * payments is worth now. - * @param float fv The future value, or a cash balance you want to attain after - * the last payment is made. If fv is omitted, it is assumed - * to be 0 (the future value of a loan, for example, is 0). - * @param integer type A number 0 or 1 and indicates when payments are due: - * 0 or omitted At the end of the period. - * 1 At the beginning of the period. - * @param float guess Your guess for what the rate will be. - * If you omit guess, it is assumed to be 10 percent. - * @return float - **/ - public static function RATE($nper, $pmt, $pv, $fv = 0.0, $type = 0, $guess = 0.1) - { - $nper = (int) PHPExcel_Calculation_Functions::flattenSingleValue($nper); - $pmt = PHPExcel_Calculation_Functions::flattenSingleValue($pmt); - $pv = PHPExcel_Calculation_Functions::flattenSingleValue($pv); - $fv = (is_null($fv)) ? 0.0 : PHPExcel_Calculation_Functions::flattenSingleValue($fv); - $type = (is_null($type)) ? 0 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($type); - $guess = (is_null($guess)) ? 0.1 : PHPExcel_Calculation_Functions::flattenSingleValue($guess); - - $rate = $guess; - if (abs($rate) < FINANCIAL_PRECISION) { - $y = $pv * (1 + $nper * $rate) + $pmt * (1 + $rate * $type) * $nper + $fv; - } else { - $f = exp($nper * log(1 + $rate)); - $y = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; - } - $y0 = $pv + $pmt * $nper + $fv; - $y1 = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; - - // find root by secant method - $i = $x0 = 0.0; - $x1 = $rate; - while ((abs($y0 - $y1) > FINANCIAL_PRECISION) && ($i < FINANCIAL_MAX_ITERATIONS)) { - $rate = ($y1 * $x0 - $y0 * $x1) / ($y1 - $y0); - $x0 = $x1; - $x1 = $rate; - if (($nper * abs($pmt)) > ($pv - $fv)) { - $x1 = abs($x1); - } - if (abs($rate) < FINANCIAL_PRECISION) { - $y = $pv * (1 + $nper * $rate) + $pmt * (1 + $rate * $type) * $nper + $fv; - } else { - $f = exp($nper * log(1 + $rate)); - $y = $pv * $f + $pmt * (1 / $rate + $type) * ($f - 1) + $fv; - } - - $y0 = $y1; - $y1 = $y; - ++$i; - } - return $rate; - } - - - /** - * RECEIVED - * - * Returns the price per $100 face value of a discounted security. - * - * @param mixed settlement The security's settlement date. - * The security settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param int investment The amount invested in the security. - * @param int discount The security's discount rate. - * @param int basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function RECEIVED($settlement, $maturity, $investment, $discount, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $investment = (float) PHPExcel_Calculation_Functions::flattenSingleValue($investment); - $discount = (float) PHPExcel_Calculation_Functions::flattenSingleValue($discount); - $basis = (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if ((is_numeric($investment)) && (is_numeric($discount)) && (is_numeric($basis))) { - if (($investment <= 0) || ($discount <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity, $basis); - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - - return $investment / ( 1 - ($discount * $daysBetweenSettlementAndMaturity)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * SLN - * - * Returns the straight-line depreciation of an asset for one period - * - * @param cost Initial cost of the asset - * @param salvage Value at the end of the depreciation - * @param life Number of periods over which the asset is depreciated - * @return float - */ - public static function SLN($cost, $salvage, $life) - { - $cost = PHPExcel_Calculation_Functions::flattenSingleValue($cost); - $salvage = PHPExcel_Calculation_Functions::flattenSingleValue($salvage); - $life = PHPExcel_Calculation_Functions::flattenSingleValue($life); - - // Calculate - if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life))) { - if ($life < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return ($cost - $salvage) / $life; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * SYD - * - * Returns the sum-of-years' digits depreciation of an asset for a specified period. - * - * @param cost Initial cost of the asset - * @param salvage Value at the end of the depreciation - * @param life Number of periods over which the asset is depreciated - * @param period Period - * @return float - */ - public static function SYD($cost, $salvage, $life, $period) - { - $cost = PHPExcel_Calculation_Functions::flattenSingleValue($cost); - $salvage = PHPExcel_Calculation_Functions::flattenSingleValue($salvage); - $life = PHPExcel_Calculation_Functions::flattenSingleValue($life); - $period = PHPExcel_Calculation_Functions::flattenSingleValue($period); - - // Calculate - if ((is_numeric($cost)) && (is_numeric($salvage)) && (is_numeric($life)) && (is_numeric($period))) { - if (($life < 1) || ($period > $life)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return (($cost - $salvage) * ($life - $period + 1) * 2) / ($life * ($life + 1)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * TBILLEQ - * - * Returns the bond-equivalent yield for a Treasury bill. - * - * @param mixed settlement The Treasury bill's settlement date. - * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. - * @param mixed maturity The Treasury bill's maturity date. - * The maturity date is the date when the Treasury bill expires. - * @param int discount The Treasury bill's discount rate. - * @return float - */ - public static function TBILLEQ($settlement, $maturity, $discount) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $discount = PHPExcel_Calculation_Functions::flattenSingleValue($discount); - - // Use TBILLPRICE for validation - $testValue = self::TBILLPRICE($settlement, $maturity, $discount); - if (is_string($testValue)) { - return $testValue; - } - - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - ++$maturity; - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity) * 360; - } else { - $daysBetweenSettlementAndMaturity = (PHPExcel_Calculation_DateTime::getDateValue($maturity) - PHPExcel_Calculation_DateTime::getDateValue($settlement)); - } - - return (365 * $discount) / (360 - $discount * $daysBetweenSettlementAndMaturity); - } - - - /** - * TBILLPRICE - * - * Returns the yield for a Treasury bill. - * - * @param mixed settlement The Treasury bill's settlement date. - * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. - * @param mixed maturity The Treasury bill's maturity date. - * The maturity date is the date when the Treasury bill expires. - * @param int discount The Treasury bill's discount rate. - * @return float - */ - public static function TBILLPRICE($settlement, $maturity, $discount) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $discount = PHPExcel_Calculation_Functions::flattenSingleValue($discount); - - if (is_string($maturity = PHPExcel_Calculation_DateTime::getDateValue($maturity))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // Validate - if (is_numeric($discount)) { - if ($discount <= 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - ++$maturity; - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity) * 360; - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - } else { - $daysBetweenSettlementAndMaturity = (PHPExcel_Calculation_DateTime::getDateValue($maturity) - PHPExcel_Calculation_DateTime::getDateValue($settlement)); - } - - if ($daysBetweenSettlementAndMaturity > 360) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $price = 100 * (1 - (($discount * $daysBetweenSettlementAndMaturity) / 360)); - if ($price <= 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return $price; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * TBILLYIELD - * - * Returns the yield for a Treasury bill. - * - * @param mixed settlement The Treasury bill's settlement date. - * The Treasury bill's settlement date is the date after the issue date when the Treasury bill is traded to the buyer. - * @param mixed maturity The Treasury bill's maturity date. - * The maturity date is the date when the Treasury bill expires. - * @param int price The Treasury bill's price per $100 face value. - * @return float - */ - public static function TBILLYIELD($settlement, $maturity, $price) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $price = PHPExcel_Calculation_Functions::flattenSingleValue($price); - - // Validate - if (is_numeric($price)) { - if ($price <= 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - ++$maturity; - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity) * 360; - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - } else { - $daysBetweenSettlementAndMaturity = (PHPExcel_Calculation_DateTime::getDateValue($maturity) - PHPExcel_Calculation_DateTime::getDateValue($settlement)); - } - - if ($daysBetweenSettlementAndMaturity > 360) { - return PHPExcel_Calculation_Functions::NaN(); - } - - return ((100 - $price) / $price) * (360 / $daysBetweenSettlementAndMaturity); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - public static function XIRR($values, $dates, $guess = 0.1) - { - if ((!is_array($values)) && (!is_array($dates))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $values = PHPExcel_Calculation_Functions::flattenArray($values); - $dates = PHPExcel_Calculation_Functions::flattenArray($dates); - $guess = PHPExcel_Calculation_Functions::flattenSingleValue($guess); - if (count($values) != count($dates)) { - return PHPExcel_Calculation_Functions::NaN(); - } - - // create an initial range, with a root somewhere between 0 and guess - $x1 = 0.0; - $x2 = $guess; - $f1 = self::XNPV($x1, $values, $dates); - $f2 = self::XNPV($x2, $values, $dates); - for ($i = 0; $i < FINANCIAL_MAX_ITERATIONS; ++$i) { - if (($f1 * $f2) < 0.0) { - break; - } elseif (abs($f1) < abs($f2)) { - $f1 = self::XNPV($x1 += 1.6 * ($x1 - $x2), $values, $dates); - } else { - $f2 = self::XNPV($x2 += 1.6 * ($x2 - $x1), $values, $dates); - } - } - if (($f1 * $f2) > 0.0) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - $f = self::XNPV($x1, $values, $dates); - if ($f < 0.0) { - $rtb = $x1; - $dx = $x2 - $x1; - } else { - $rtb = $x2; - $dx = $x1 - $x2; - } - - for ($i = 0; $i < FINANCIAL_MAX_ITERATIONS; ++$i) { - $dx *= 0.5; - $x_mid = $rtb + $dx; - $f_mid = self::XNPV($x_mid, $values, $dates); - if ($f_mid <= 0.0) { - $rtb = $x_mid; - } - if ((abs($f_mid) < FINANCIAL_PRECISION) || (abs($dx) < FINANCIAL_PRECISION)) { - return $x_mid; - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * XNPV - * - * Returns the net present value for a schedule of cash flows that is not necessarily periodic. - * To calculate the net present value for a series of cash flows that is periodic, use the NPV function. - * - * Excel Function: - * =XNPV(rate,values,dates) - * - * @param float $rate The discount rate to apply to the cash flows. - * @param array of float $values A series of cash flows that corresponds to a schedule of payments in dates. - * The first payment is optional and corresponds to a cost or payment that occurs at the beginning of the investment. - * If the first value is a cost or payment, it must be a negative value. All succeeding payments are discounted based on a 365-day year. - * The series of values must contain at least one positive value and one negative value. - * @param array of mixed $dates A schedule of payment dates that corresponds to the cash flow payments. - * The first payment date indicates the beginning of the schedule of payments. - * All other dates must be later than this date, but they may occur in any order. - * @return float - */ - public static function XNPV($rate, $values, $dates) - { - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - if (!is_numeric($rate)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if ((!is_array($values)) || (!is_array($dates))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $values = PHPExcel_Calculation_Functions::flattenArray($values); - $dates = PHPExcel_Calculation_Functions::flattenArray($dates); - $valCount = count($values); - if ($valCount != count($dates)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ((min($values) > 0) || (max($values) < 0)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - $xnpv = 0.0; - for ($i = 0; $i < $valCount; ++$i) { - if (!is_numeric($values[$i])) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $xnpv += $values[$i] / pow(1 + $rate, PHPExcel_Calculation_DateTime::DATEDIF($dates[0], $dates[$i], 'd') / 365); - } - return (is_finite($xnpv)) ? $xnpv : PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * YIELDDISC - * - * Returns the annual yield of a security that pays interest at maturity. - * - * @param mixed settlement The security's settlement date. - * The security's settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param int price The security's price per $100 face value. - * @param int redemption The security's redemption value per $100 face value. - * @param int basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function YIELDDISC($settlement, $maturity, $price, $redemption, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $price = PHPExcel_Calculation_Functions::flattenSingleValue($price); - $redemption = PHPExcel_Calculation_Functions::flattenSingleValue($redemption); - $basis = (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if (is_numeric($price) && is_numeric($redemption)) { - if (($price <= 0) || ($redemption <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysPerYear = self::daysPerYear(PHPExcel_Calculation_DateTime::YEAR($settlement), $basis); - if (!is_numeric($daysPerYear)) { - return $daysPerYear; - } - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity, $basis); - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - $daysBetweenSettlementAndMaturity *= $daysPerYear; - - return (($redemption - $price) / $price) * ($daysPerYear / $daysBetweenSettlementAndMaturity); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * YIELDMAT - * - * Returns the annual yield of a security that pays interest at maturity. - * - * @param mixed settlement The security's settlement date. - * The security's settlement date is the date after the issue date when the security is traded to the buyer. - * @param mixed maturity The security's maturity date. - * The maturity date is the date when the security expires. - * @param mixed issue The security's issue date. - * @param int rate The security's interest rate at date of issue. - * @param int price The security's price per $100 face value. - * @param int basis The type of day count to use. - * 0 or omitted US (NASD) 30/360 - * 1 Actual/actual - * 2 Actual/360 - * 3 Actual/365 - * 4 European 30/360 - * @return float - */ - public static function YIELDMAT($settlement, $maturity, $issue, $rate, $price, $basis = 0) - { - $settlement = PHPExcel_Calculation_Functions::flattenSingleValue($settlement); - $maturity = PHPExcel_Calculation_Functions::flattenSingleValue($maturity); - $issue = PHPExcel_Calculation_Functions::flattenSingleValue($issue); - $rate = PHPExcel_Calculation_Functions::flattenSingleValue($rate); - $price = PHPExcel_Calculation_Functions::flattenSingleValue($price); - $basis = (int) PHPExcel_Calculation_Functions::flattenSingleValue($basis); - - // Validate - if (is_numeric($rate) && is_numeric($price)) { - if (($rate <= 0) || ($price <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $daysPerYear = self::daysPerYear(PHPExcel_Calculation_DateTime::YEAR($settlement), $basis); - if (!is_numeric($daysPerYear)) { - return $daysPerYear; - } - $daysBetweenIssueAndSettlement = PHPExcel_Calculation_DateTime::YEARFRAC($issue, $settlement, $basis); - if (!is_numeric($daysBetweenIssueAndSettlement)) { - // return date error - return $daysBetweenIssueAndSettlement; - } - $daysBetweenIssueAndSettlement *= $daysPerYear; - $daysBetweenIssueAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($issue, $maturity, $basis); - if (!is_numeric($daysBetweenIssueAndMaturity)) { - // return date error - return $daysBetweenIssueAndMaturity; - } - $daysBetweenIssueAndMaturity *= $daysPerYear; - $daysBetweenSettlementAndMaturity = PHPExcel_Calculation_DateTime::YEARFRAC($settlement, $maturity, $basis); - if (!is_numeric($daysBetweenSettlementAndMaturity)) { - // return date error - return $daysBetweenSettlementAndMaturity; - } - $daysBetweenSettlementAndMaturity *= $daysPerYear; - - return ((1 + (($daysBetweenIssueAndMaturity / $daysPerYear) * $rate) - (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) / - (($price / 100) + (($daysBetweenIssueAndSettlement / $daysPerYear) * $rate))) * - ($daysPerYear / $daysBetweenSettlementAndMaturity); - } - return PHPExcel_Calculation_Functions::VALUE(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/FormulaParser.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/FormulaParser.php deleted file mode 100644 index 893f19e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/FormulaParser.php +++ /dev/null @@ -1,622 +0,0 @@ -<"; - const OPERATORS_POSTFIX = "%"; - - /** - * Formula - * - * @var string - */ - private $formula; - - /** - * Tokens - * - * @var PHPExcel_Calculation_FormulaToken[] - */ - private $tokens = array(); - - /** - * Create a new PHPExcel_Calculation_FormulaParser - * - * @param string $pFormula Formula to parse - * @throws PHPExcel_Calculation_Exception - */ - public function __construct($pFormula = '') - { - // Check parameters - if (is_null($pFormula)) { - throw new PHPExcel_Calculation_Exception("Invalid parameter passed: formula"); - } - - // Initialise values - $this->formula = trim($pFormula); - // Parse! - $this->parseToTokens(); - } - - /** - * Get Formula - * - * @return string - */ - public function getFormula() - { - return $this->formula; - } - - /** - * Get Token - * - * @param int $pId Token id - * @return string - * @throws PHPExcel_Calculation_Exception - */ - public function getToken($pId = 0) - { - if (isset($this->tokens[$pId])) { - return $this->tokens[$pId]; - } else { - throw new PHPExcel_Calculation_Exception("Token with id $pId does not exist."); - } - } - - /** - * Get Token count - * - * @return string - */ - public function getTokenCount() - { - return count($this->tokens); - } - - /** - * Get Tokens - * - * @return PHPExcel_Calculation_FormulaToken[] - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * Parse to tokens - */ - private function parseToTokens() - { - // No attempt is made to verify formulas; assumes formulas are derived from Excel, where - // they can only exist if valid; stack overflows/underflows sunk as nulls without exceptions. - - // Check if the formula has a valid starting = - $formulaLength = strlen($this->formula); - if ($formulaLength < 2 || $this->formula{0} != '=') { - return; - } - - // Helper variables - $tokens1 = $tokens2 = $stack = array(); - $inString = $inPath = $inRange = $inError = false; - $token = $previousToken = $nextToken = null; - - $index = 1; - $value = ''; - - $ERRORS = array("#NULL!", "#DIV/0!", "#VALUE!", "#REF!", "#NAME?", "#NUM!", "#N/A"); - $COMPARATORS_MULTI = array(">=", "<=", "<>"); - - while ($index < $formulaLength) { - // state-dependent character evaluation (order is important) - - // double-quoted strings - // embeds are doubled - // end marks token - if ($inString) { - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { - if ((($index + 2) <= $formulaLength) && ($this->formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE)) { - $value .= PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE; - ++$index; - } else { - $inString = false; - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_TEXT); - $value = ""; - } - } else { - $value .= $this->formula{$index}; - } - ++$index; - continue; - } - - // single-quoted strings (links) - // embeds are double - // end does not mark a token - if ($inPath) { - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { - if ((($index + 2) <= $formulaLength) && ($this->formula{$index + 1} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE)) { - $value .= PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE; - ++$index; - } else { - $inPath = false; - } - } else { - $value .= $this->formula{$index}; - } - ++$index; - continue; - } - - // bracked strings (R1C1 range index or linked workbook name) - // no embeds (changed to "()" by Excel) - // end does not mark a token - if ($inRange) { - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_CLOSE) { - $inRange = false; - } - $value .= $this->formula{$index}; - ++$index; - continue; - } - - // error values - // end marks a token, determined from absolute list of values - if ($inError) { - $value .= $this->formula{$index}; - ++$index; - if (in_array($value, $ERRORS)) { - $inError = false; - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_ERROR); - $value = ""; - } - continue; - } - - // scientific notation check - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_SN, $this->formula{$index}) !== false) { - if (strlen($value) > 1) { - if (preg_match("/^[1-9]{1}(\.[0-9]+)?E{1}$/", $this->formula{$index}) != 0) { - $value .= $this->formula{$index}; - ++$index; - continue; - } - } - } - - // independent character evaluation (order not important) - - // establish state-dependent character evaluations - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_DOUBLE) { - if (strlen($value > 0)) { - // unexpected - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); - $value = ""; - } - $inString = true; - ++$index; - continue; - } - - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::QUOTE_SINGLE) { - if (strlen($value) > 0) { - // unexpected - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); - $value = ""; - } - $inPath = true; - ++$index; - continue; - } - - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACKET_OPEN) { - $inRange = true; - $value .= PHPExcel_Calculation_FormulaParser::BRACKET_OPEN; - ++$index; - continue; - } - - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::ERROR_START) { - if (strlen($value) > 0) { - // unexpected - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); - $value = ""; - } - $inError = true; - $value .= PHPExcel_Calculation_FormulaParser::ERROR_START; - ++$index; - continue; - } - - // mark start and end of arrays and array rows - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_OPEN) { - if (strlen($value) > 0) { - // unexpected - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN); - $value = ""; - } - - $tmp = new PHPExcel_Calculation_FormulaToken("ARRAY", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START); - $tokens1[] = $tmp; - $stack[] = clone $tmp; - - $tmp = new PHPExcel_Calculation_FormulaToken("ARRAYROW", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START); - $tokens1[] = $tmp; - $stack[] = clone $tmp; - - ++$index; - continue; - } - - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::SEMICOLON) { - if (strlen($value) > 0) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - $value = ""; - } - - $tmp = array_pop($stack); - $tmp->setValue(""); - $tmp->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP); - $tokens1[] = $tmp; - - $tmp = new PHPExcel_Calculation_FormulaToken(",", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_ARGUMENT); - $tokens1[] = $tmp; - - $tmp = new PHPExcel_Calculation_FormulaToken("ARRAYROW", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START); - $tokens1[] = $tmp; - $stack[] = clone $tmp; - - ++$index; - continue; - } - - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::BRACE_CLOSE) { - if (strlen($value) > 0) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - $value = ""; - } - - $tmp = array_pop($stack); - $tmp->setValue(""); - $tmp->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP); - $tokens1[] = $tmp; - - $tmp = array_pop($stack); - $tmp->setValue(""); - $tmp->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP); - $tokens1[] = $tmp; - - ++$index; - continue; - } - - // trim white-space - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) { - if (strlen($value) > 0) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - $value = ""; - } - $tokens1[] = new PHPExcel_Calculation_FormulaToken("", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_WHITESPACE); - ++$index; - while (($this->formula{$index} == PHPExcel_Calculation_FormulaParser::WHITESPACE) && ($index < $formulaLength)) { - ++$index; - } - continue; - } - - // multi-character comparators - if (($index + 2) <= $formulaLength) { - if (in_array(substr($this->formula, $index, 2), $COMPARATORS_MULTI)) { - if (strlen($value) > 0) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - $value = ""; - } - $tokens1[] = new PHPExcel_Calculation_FormulaToken(substr($this->formula, $index, 2), PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_LOGICAL); - $index += 2; - continue; - } - } - - // standard infix operators - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_INFIX, $this->formula{$index}) !== false) { - if (strlen($value) > 0) { - $tokens1[] =new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - $value = ""; - } - $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX); - ++$index; - continue; - } - - // standard postfix operators (only one) - if (strpos(PHPExcel_Calculation_FormulaParser::OPERATORS_POSTFIX, $this->formula{$index}) !== false) { - if (strlen($value) > 0) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - $value = ""; - } - $tokens1[] = new PHPExcel_Calculation_FormulaToken($this->formula{$index}, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX); - ++$index; - continue; - } - - // start subexpression or function - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_OPEN) { - if (strlen($value) > 0) { - $tmp = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START); - $tokens1[] = $tmp; - $stack[] = clone $tmp; - $value = ""; - } else { - $tmp = new PHPExcel_Calculation_FormulaToken("", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_SUBEXPRESSION, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START); - $tokens1[] = $tmp; - $stack[] = clone $tmp; - } - ++$index; - continue; - } - - // function, subexpression, or array parameters, or operand unions - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::COMMA) { - if (strlen($value) > 0) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - $value = ""; - } - - $tmp = array_pop($stack); - $tmp->setValue(""); - $tmp->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP); - $stack[] = $tmp; - - if ($tmp->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken(",", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_UNION); - } else { - $tokens1[] = new PHPExcel_Calculation_FormulaToken(",", PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_ARGUMENT); - } - ++$index; - continue; - } - - // stop subexpression - if ($this->formula{$index} == PHPExcel_Calculation_FormulaParser::PAREN_CLOSE) { - if (strlen($value) > 0) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - $value = ""; - } - - $tmp = array_pop($stack); - $tmp->setValue(""); - $tmp->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP); - $tokens1[] = $tmp; - - ++$index; - continue; - } - - // token accumulation - $value .= $this->formula{$index}; - ++$index; - } - - // dump remaining accumulation - if (strlen($value) > 0) { - $tokens1[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND); - } - - // move tokenList to new set, excluding unnecessary white-space tokens and converting necessary ones to intersections - $tokenCount = count($tokens1); - for ($i = 0; $i < $tokenCount; ++$i) { - $token = $tokens1[$i]; - if (isset($tokens1[$i - 1])) { - $previousToken = $tokens1[$i - 1]; - } else { - $previousToken = null; - } - if (isset($tokens1[$i + 1])) { - $nextToken = $tokens1[$i + 1]; - } else { - $nextToken = null; - } - - if (is_null($token)) { - continue; - } - - if ($token->getTokenType() != PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_WHITESPACE) { - $tokens2[] = $token; - continue; - } - - if (is_null($previousToken)) { - continue; - } - - if (! ( - (($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION) && ($previousToken->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP)) || - (($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($previousToken->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP)) || - ($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND) - ) ) { - continue; - } - - if (is_null($nextToken)) { - continue; - } - - if (! ( - (($nextToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION) && ($nextToken->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START)) || - (($nextToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && ($nextToken->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_START)) || - ($nextToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND) - ) ) { - continue; - } - - $tokens2[] = new PHPExcel_Calculation_FormulaToken($value, PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX, PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_INTERSECTION); - } - - // move tokens to final list, switching infix "-" operators to prefix when appropriate, switching infix "+" operators - // to noop when appropriate, identifying operand and infix-operator subtypes, and pulling "@" from function names - $this->tokens = array(); - - $tokenCount = count($tokens2); - for ($i = 0; $i < $tokenCount; ++$i) { - $token = $tokens2[$i]; - if (isset($tokens2[$i - 1])) { - $previousToken = $tokens2[$i - 1]; - } else { - $previousToken = null; - } - if (isset($tokens2[$i + 1])) { - $nextToken = $tokens2[$i + 1]; - } else { - $nextToken = null; - } - - if (is_null($token)) { - continue; - } - - if ($token->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == "-") { - if ($i == 0) { - $token->setTokenType(PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPREFIX); - } elseif ((($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION) && - ($previousToken->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP)) || - (($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && - ($previousToken->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP)) || - ($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX) || - ($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND)) { - $token->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_MATH); - } else { - $token->setTokenType(PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPREFIX); - } - - $this->tokens[] = $token; - continue; - } - - if ($token->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX && $token->getValue() == "+") { - if ($i == 0) { - continue; - } elseif ((($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION) && - ($previousToken->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP)) || - (($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_SUBEXPRESSION) && - ($previousToken->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_STOP)) || - ($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORPOSTFIX) || - ($previousToken->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND)) { - $token->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_MATH); - } else { - continue; - } - - $this->tokens[] = $token; - continue; - } - - if ($token->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERATORINFIX && - $token->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING) { - if (strpos("<>=", substr($token->getValue(), 0, 1)) !== false) { - $token->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_LOGICAL); - } elseif ($token->getValue() == "&") { - $token->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_CONCATENATION); - } else { - $token->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_MATH); - } - - $this->tokens[] = $token; - continue; - } - - if ($token->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_OPERAND && - $token->getTokenSubType() == PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING) { - if (!is_numeric($token->getValue())) { - if (strtoupper($token->getValue()) == "TRUE" || strtoupper($token->getValue() == "FALSE")) { - $token->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_LOGICAL); - } else { - $token->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_RANGE); - } - } else { - $token->setTokenSubType(PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NUMBER); - } - - $this->tokens[] = $token; - continue; - } - - if ($token->getTokenType() == PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_FUNCTION) { - if (strlen($token->getValue() > 0)) { - if (substr($token->getValue(), 0, 1) == "@") { - $token->setValue(substr($token->getValue(), 1)); - } - } - } - - $this->tokens[] = $token; - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/FormulaToken.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/FormulaToken.php deleted file mode 100644 index 41c6e3d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/FormulaToken.php +++ /dev/null @@ -1,176 +0,0 @@ -value = $pValue; - $this->tokenType = $pTokenType; - $this->tokenSubType = $pTokenSubType; - } - - /** - * Get Value - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Set Value - * - * @param string $value - */ - public function setValue($value) - { - $this->value = $value; - } - - /** - * Get Token Type (represented by TOKEN_TYPE_*) - * - * @return string - */ - public function getTokenType() - { - return $this->tokenType; - } - - /** - * Set Token Type - * - * @param string $value - */ - public function setTokenType($value = PHPExcel_Calculation_FormulaToken::TOKEN_TYPE_UNKNOWN) - { - $this->tokenType = $value; - } - - /** - * Get Token SubType (represented by TOKEN_SUBTYPE_*) - * - * @return string - */ - public function getTokenSubType() - { - return $this->tokenSubType; - } - - /** - * Set Token SubType - * - * @param string $value - */ - public function setTokenSubType($value = PHPExcel_Calculation_FormulaToken::TOKEN_SUBTYPE_NOTHING) - { - $this->tokenSubType = $value; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Function.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Function.php deleted file mode 100644 index d58cef2..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Function.php +++ /dev/null @@ -1,148 +0,0 @@ -category = $pCategory; - $this->excelName = $pExcelName; - $this->phpExcelName = $pPHPExcelName; - } else { - throw new PHPExcel_Calculation_Exception("Invalid parameters passed."); - } - } - - /** - * Get Category (represented by CATEGORY_*) - * - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * Set Category (represented by CATEGORY_*) - * - * @param string $value - * @throws PHPExcel_Calculation_Exception - */ - public function setCategory($value = null) - { - if (!is_null($value)) { - $this->category = $value; - } else { - throw new PHPExcel_Calculation_Exception("Invalid parameter passed."); - } - } - - /** - * Get Excel name - * - * @return string - */ - public function getExcelName() - { - return $this->excelName; - } - - /** - * Set Excel name - * - * @param string $value - */ - public function setExcelName($value) - { - $this->excelName = $value; - } - - /** - * Get PHPExcel name - * - * @return string - */ - public function getPHPExcelName() - { - return $this->phpExcelName; - } - - /** - * Set PHPExcel name - * - * @param string $value - */ - public function setPHPExcelName($value) - { - $this->phpExcelName = $value; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Functions.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Functions.php deleted file mode 100644 index b8b784f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Functions.php +++ /dev/null @@ -1,759 +0,0 @@ - '#NULL!', - 'divisionbyzero' => '#DIV/0!', - 'value' => '#VALUE!', - 'reference' => '#REF!', - 'name' => '#NAME?', - 'num' => '#NUM!', - 'na' => '#N/A', - 'gettingdata' => '#GETTING_DATA' - ); - - - /** - * Set the Compatibility Mode - * - * @access public - * @category Function Configuration - * @param string $compatibilityMode Compatibility Mode - * Permitted values are: - * PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel' - * PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' - * PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc' - * @return boolean (Success or Failure) - */ - public static function setCompatibilityMode($compatibilityMode) - { - if (($compatibilityMode == self::COMPATIBILITY_EXCEL) || - ($compatibilityMode == self::COMPATIBILITY_GNUMERIC) || - ($compatibilityMode == self::COMPATIBILITY_OPENOFFICE)) { - self::$compatibilityMode = $compatibilityMode; - return true; - } - return false; - } - - - /** - * Return the current Compatibility Mode - * - * @access public - * @category Function Configuration - * @return string Compatibility Mode - * Possible Return values are: - * PHPExcel_Calculation_Functions::COMPATIBILITY_EXCEL 'Excel' - * PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC 'Gnumeric' - * PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE 'OpenOfficeCalc' - */ - public static function getCompatibilityMode() - { - return self::$compatibilityMode; - } - - - /** - * Set the Return Date Format used by functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object) - * - * @access public - * @category Function Configuration - * @param string $returnDateType Return Date Format - * Permitted values are: - * PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P' - * PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O' - * PHPExcel_Calculation_Functions::RETURNDATE_EXCEL 'E' - * @return boolean Success or failure - */ - public static function setReturnDateType($returnDateType) - { - if (($returnDateType == self::RETURNDATE_PHP_NUMERIC) || - ($returnDateType == self::RETURNDATE_PHP_OBJECT) || - ($returnDateType == self::RETURNDATE_EXCEL)) { - self::$returnDateType = $returnDateType; - return true; - } - return false; - } - - - /** - * Return the current Return Date Format for functions that return a date/time (Excel, PHP Serialized Numeric or PHP Object) - * - * @access public - * @category Function Configuration - * @return string Return Date Format - * Possible Return values are: - * PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC 'P' - * PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT 'O' - * PHPExcel_Calculation_Functions::RETURNDATE_EXCEL 'E' - */ - public static function getReturnDateType() - { - return self::$returnDateType; - } - - - /** - * DUMMY - * - * @access public - * @category Error Returns - * @return string #Not Yet Implemented - */ - public static function DUMMY() - { - return '#Not Yet Implemented'; - } - - - /** - * DIV0 - * - * @access public - * @category Error Returns - * @return string #Not Yet Implemented - */ - public static function DIV0() - { - return self::$errorCodes['divisionbyzero']; - } - - - /** - * NA - * - * Excel Function: - * =NA() - * - * Returns the error value #N/A - * #N/A is the error value that means "no value is available." - * - * @access public - * @category Logical Functions - * @return string #N/A! - */ - public static function NA() - { - return self::$errorCodes['na']; - } - - - /** - * NaN - * - * Returns the error value #NUM! - * - * @access public - * @category Error Returns - * @return string #NUM! - */ - public static function NaN() - { - return self::$errorCodes['num']; - } - - - /** - * NAME - * - * Returns the error value #NAME? - * - * @access public - * @category Error Returns - * @return string #NAME? - */ - public static function NAME() - { - return self::$errorCodes['name']; - } - - - /** - * REF - * - * Returns the error value #REF! - * - * @access public - * @category Error Returns - * @return string #REF! - */ - public static function REF() - { - return self::$errorCodes['reference']; - } - - - /** - * NULL - * - * Returns the error value #NULL! - * - * @access public - * @category Error Returns - * @return string #NULL! - */ - public static function NULL() - { - return self::$errorCodes['null']; - } - - - /** - * VALUE - * - * Returns the error value #VALUE! - * - * @access public - * @category Error Returns - * @return string #VALUE! - */ - public static function VALUE() - { - return self::$errorCodes['value']; - } - - - public static function isMatrixValue($idx) - { - return ((substr_count($idx, '.') <= 1) || (preg_match('/\.[A-Z]/', $idx) > 0)); - } - - - public static function isValue($idx) - { - return (substr_count($idx, '.') == 0); - } - - - public static function isCellValue($idx) - { - return (substr_count($idx, '.') > 1); - } - - - public static function ifCondition($condition) - { - $condition = PHPExcel_Calculation_Functions::flattenSingleValue($condition); - if (!isset($condition{0})) { - $condition = '=""'; - } - if (!in_array($condition{0}, array('>', '<', '='))) { - if (!is_numeric($condition)) { - $condition = PHPExcel_Calculation::wrapResult(strtoupper($condition)); - } - return '=' . $condition; - } else { - preg_match('/([<>=]+)(.*)/', $condition, $matches); - list(, $operator, $operand) = $matches; - - if (!is_numeric($operand)) { - $operand = str_replace('"', '""', $operand); - $operand = PHPExcel_Calculation::wrapResult(strtoupper($operand)); - } - - return $operator.$operand; - } - } - - /** - * ERROR_TYPE - * - * @param mixed $value Value to check - * @return boolean - */ - public static function ERROR_TYPE($value = '') - { - $value = self::flattenSingleValue($value); - - $i = 1; - foreach (self::$errorCodes as $errorCode) { - if ($value === $errorCode) { - return $i; - } - ++$i; - } - return self::NA(); - } - - - /** - * IS_BLANK - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_BLANK($value = null) - { - if (!is_null($value)) { - $value = self::flattenSingleValue($value); - } - - return is_null($value); - } - - - /** - * IS_ERR - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_ERR($value = '') - { - $value = self::flattenSingleValue($value); - - return self::IS_ERROR($value) && (!self::IS_NA($value)); - } - - - /** - * IS_ERROR - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_ERROR($value = '') - { - $value = self::flattenSingleValue($value); - - if (!is_string($value)) { - return false; - } - return in_array($value, array_values(self::$errorCodes)); - } - - - /** - * IS_NA - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_NA($value = '') - { - $value = self::flattenSingleValue($value); - - return ($value === self::NA()); - } - - - /** - * IS_EVEN - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_EVEN($value = null) - { - $value = self::flattenSingleValue($value); - - if ($value === null) { - return self::NAME(); - } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) { - return self::VALUE(); - } - - return ($value % 2 == 0); - } - - - /** - * IS_ODD - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_ODD($value = null) - { - $value = self::flattenSingleValue($value); - - if ($value === null) { - return self::NAME(); - } elseif ((is_bool($value)) || ((is_string($value)) && (!is_numeric($value)))) { - return self::VALUE(); - } - - return (abs($value) % 2 == 1); - } - - - /** - * IS_NUMBER - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_NUMBER($value = null) - { - $value = self::flattenSingleValue($value); - - if (is_string($value)) { - return false; - } - return is_numeric($value); - } - - - /** - * IS_LOGICAL - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_LOGICAL($value = null) - { - $value = self::flattenSingleValue($value); - - return is_bool($value); - } - - - /** - * IS_TEXT - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_TEXT($value = null) - { - $value = self::flattenSingleValue($value); - - return (is_string($value) && !self::IS_ERROR($value)); - } - - - /** - * IS_NONTEXT - * - * @param mixed $value Value to check - * @return boolean - */ - public static function IS_NONTEXT($value = null) - { - return !self::IS_TEXT($value); - } - - - /** - * VERSION - * - * @return string Version information - */ - public static function VERSION() { - return 'PHPExcel 1.8.2, 2018-11-22'; - } // function VERSION() - - - /** - * N - * - * Returns a value converted to a number - * - * @param value The value you want converted - * @return number N converts values listed in the following table - * If value is or refers to N returns - * A number That number - * A date The serial number of that date - * TRUE 1 - * FALSE 0 - * An error value The error value - * Anything else 0 - */ - public static function N($value = null) - { - while (is_array($value)) { - $value = array_shift($value); - } - - switch (gettype($value)) { - case 'double': - case 'float': - case 'integer': - return $value; - case 'boolean': - return (integer) $value; - case 'string': - // Errors - if ((strlen($value) > 0) && ($value{0} == '#')) { - return $value; - } - break; - } - return 0; - } - - - /** - * TYPE - * - * Returns a number that identifies the type of a value - * - * @param value The value you want tested - * @return number N converts values listed in the following table - * If value is or refers to N returns - * A number 1 - * Text 2 - * Logical Value 4 - * An error value 16 - * Array or Matrix 64 - */ - public static function TYPE($value = null) - { - $value = self::flattenArrayIndexed($value); - if (is_array($value) && (count($value) > 1)) { - end($value); - $a = key($value); - // Range of cells is an error - if (self::isCellValue($a)) { - return 16; - // Test for Matrix - } elseif (self::isMatrixValue($a)) { - return 64; - } - } elseif (empty($value)) { - // Empty Cell - return 1; - } - $value = self::flattenSingleValue($value); - - if (($value === null) || (is_float($value)) || (is_int($value))) { - return 1; - } elseif (is_bool($value)) { - return 4; - } elseif (is_array($value)) { - return 64; - } elseif (is_string($value)) { - // Errors - if ((strlen($value) > 0) && ($value{0} == '#')) { - return 16; - } - return 2; - } - return 0; - } - - - /** - * Convert a multi-dimensional array to a simple 1-dimensional array - * - * @param array $array Array to be flattened - * @return array Flattened array - */ - public static function flattenArray($array) - { - if (!is_array($array)) { - return (array) $array; - } - - $arrayValues = array(); - foreach ($array as $value) { - if (is_array($value)) { - foreach ($value as $val) { - if (is_array($val)) { - foreach ($val as $v) { - $arrayValues[] = $v; - } - } else { - $arrayValues[] = $val; - } - } - } else { - $arrayValues[] = $value; - } - } - - return $arrayValues; - } - - - /** - * Convert a multi-dimensional array to a simple 1-dimensional array, but retain an element of indexing - * - * @param array $array Array to be flattened - * @return array Flattened array - */ - public static function flattenArrayIndexed($array) - { - if (!is_array($array)) { - return (array) $array; - } - - $arrayValues = array(); - foreach ($array as $k1 => $value) { - if (is_array($value)) { - foreach ($value as $k2 => $val) { - if (is_array($val)) { - foreach ($val as $k3 => $v) { - $arrayValues[$k1.'.'.$k2.'.'.$k3] = $v; - } - } else { - $arrayValues[$k1.'.'.$k2] = $val; - } - } - } else { - $arrayValues[$k1] = $value; - } - } - - return $arrayValues; - } - - - /** - * Convert an array to a single scalar value by extracting the first element - * - * @param mixed $value Array or scalar value - * @return mixed - */ - public static function flattenSingleValue($value = '') - { - while (is_array($value)) { - $value = array_pop($value); - } - - return $value; - } -} - - -// -// There are a few mathematical functions that aren't available on all versions of PHP for all platforms -// These functions aren't available in Windows implementations of PHP prior to version 5.3.0 -// So we test if they do exist for this version of PHP/operating platform; and if not we create them -// -if (!function_exists('acosh')) { - function acosh($x) - { - return 2 * log(sqrt(($x + 1) / 2) + sqrt(($x - 1) / 2)); - } // function acosh() -} - -if (!function_exists('asinh')) { - function asinh($x) - { - return log($x + sqrt(1 + $x * $x)); - } // function asinh() -} - -if (!function_exists('atanh')) { - function atanh($x) - { - return (log(1 + $x) - log(1 - $x)) / 2; - } // function atanh() -} - - -// -// Strangely, PHP doesn't have a mb_str_replace multibyte function -// As we'll only ever use this function with UTF-8 characters, we can simply "hard-code" the character set -// -if ((!function_exists('mb_str_replace')) && - (function_exists('mb_substr')) && (function_exists('mb_strlen')) && (function_exists('mb_strpos'))) { - function mb_str_replace($search, $replace, $subject) - { - if (is_array($subject)) { - $ret = array(); - foreach ($subject as $key => $val) { - $ret[$key] = mb_str_replace($search, $replace, $val); - } - return $ret; - } - - foreach ((array) $search as $key => $s) { - if ($s == '' && $s !== 0) { - continue; - } - $r = !is_array($replace) ? $replace : (array_key_exists($key, $replace) ? $replace[$key] : ''); - $pos = mb_strpos($subject, $s, 0, 'UTF-8'); - while ($pos !== false) { - $subject = mb_substr($subject, 0, $pos, 'UTF-8') . $r . mb_substr($subject, $pos + mb_strlen($s, 'UTF-8'), 65535, 'UTF-8'); - $pos = mb_strpos($subject, $s, $pos + mb_strlen($r, 'UTF-8'), 'UTF-8'); - } - } - return $subject; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Logical.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Logical.php deleted file mode 100644 index dd65f01..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Logical.php +++ /dev/null @@ -1,285 +0,0 @@ - $arg) { - // Is it a boolean value? - if (is_bool($arg)) { - $returnValue = $returnValue && $arg; - } elseif ((is_numeric($arg)) && (!is_string($arg))) { - $returnValue = $returnValue && ($arg != 0); - } elseif (is_string($arg)) { - $arg = strtoupper($arg); - if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) { - $arg = true; - } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) { - $arg = false; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - $returnValue = $returnValue && ($arg != 0); - } - } - - // Return - if ($argCount < 0) { - return PHPExcel_Calculation_Functions::VALUE(); - } - return $returnValue; - } - - - /** - * LOGICAL_OR - * - * Returns boolean TRUE if any argument is TRUE; returns FALSE if all arguments are FALSE. - * - * Excel Function: - * =OR(logical1[,logical2[, ...]]) - * - * The arguments must evaluate to logical values such as TRUE or FALSE, or the arguments must be arrays - * or references that contain logical values. - * - * Boolean arguments are treated as True or False as appropriate - * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False - * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds - * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value - * - * @access public - * @category Logical Functions - * @param mixed $arg,... Data values - * @return boolean The logical OR of the arguments. - */ - public static function LOGICAL_OR() - { - // Return value - $returnValue = false; - - // Loop through the arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - $argCount = -1; - foreach ($aArgs as $argCount => $arg) { - // Is it a boolean value? - if (is_bool($arg)) { - $returnValue = $returnValue || $arg; - } elseif ((is_numeric($arg)) && (!is_string($arg))) { - $returnValue = $returnValue || ($arg != 0); - } elseif (is_string($arg)) { - $arg = strtoupper($arg); - if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) { - $arg = true; - } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) { - $arg = false; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - $returnValue = $returnValue || ($arg != 0); - } - } - - // Return - if ($argCount < 0) { - return PHPExcel_Calculation_Functions::VALUE(); - } - return $returnValue; - } - - - /** - * NOT - * - * Returns the boolean inverse of the argument. - * - * Excel Function: - * =NOT(logical) - * - * The argument must evaluate to a logical value such as TRUE or FALSE - * - * Boolean arguments are treated as True or False as appropriate - * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False - * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds - * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value - * - * @access public - * @category Logical Functions - * @param mixed $logical A value or expression that can be evaluated to TRUE or FALSE - * @return boolean The boolean inverse of the argument. - */ - public static function NOT($logical = false) - { - $logical = PHPExcel_Calculation_Functions::flattenSingleValue($logical); - if (is_string($logical)) { - $logical = strtoupper($logical); - if (($logical == 'TRUE') || ($logical == PHPExcel_Calculation::getTRUE())) { - return false; - } elseif (($logical == 'FALSE') || ($logical == PHPExcel_Calculation::getFALSE())) { - return true; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - - return !$logical; - } - - /** - * STATEMENT_IF - * - * Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE. - * - * Excel Function: - * =IF(condition[,returnIfTrue[,returnIfFalse]]) - * - * Condition is any value or expression that can be evaluated to TRUE or FALSE. - * For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, - * the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. - * This argument can use any comparison calculation operator. - * ReturnIfTrue is the value that is returned if condition evaluates to TRUE. - * For example, if this argument is the text string "Within budget" and the condition argument evaluates to TRUE, - * then the IF function returns the text "Within budget" - * If condition is TRUE and ReturnIfTrue is blank, this argument returns 0 (zero). To display the word TRUE, use - * the logical value TRUE for this argument. - * ReturnIfTrue can be another formula. - * ReturnIfFalse is the value that is returned if condition evaluates to FALSE. - * For example, if this argument is the text string "Over budget" and the condition argument evaluates to FALSE, - * then the IF function returns the text "Over budget". - * If condition is FALSE and ReturnIfFalse is omitted, then the logical value FALSE is returned. - * If condition is FALSE and ReturnIfFalse is blank, then the value 0 (zero) is returned. - * ReturnIfFalse can be another formula. - * - * @access public - * @category Logical Functions - * @param mixed $condition Condition to evaluate - * @param mixed $returnIfTrue Value to return when condition is true - * @param mixed $returnIfFalse Optional value to return when condition is false - * @return mixed The value of returnIfTrue or returnIfFalse determined by condition - */ - public static function STATEMENT_IF($condition = true, $returnIfTrue = 0, $returnIfFalse = false) - { - $condition = (is_null($condition)) ? true : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($condition); - $returnIfTrue = (is_null($returnIfTrue)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfTrue); - $returnIfFalse = (is_null($returnIfFalse)) ? false : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfFalse); - - return ($condition) ? $returnIfTrue : $returnIfFalse; - } - - - /** - * IFERROR - * - * Excel Function: - * =IFERROR(testValue,errorpart) - * - * @access public - * @category Logical Functions - * @param mixed $testValue Value to check, is also the value returned when no error - * @param mixed $errorpart Value to return when testValue is an error condition - * @return mixed The value of errorpart or testValue determined by error condition - */ - public static function IFERROR($testValue = '', $errorpart = '') - { - $testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue); - $errorpart = (is_null($errorpart)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($errorpart); - - return self::STATEMENT_IF(PHPExcel_Calculation_Functions::IS_ERROR($testValue), $errorpart, $testValue); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/LookupRef.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/LookupRef.php deleted file mode 100644 index 1fe7790..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/LookupRef.php +++ /dev/null @@ -1,879 +0,0 @@ - '') { - if (strpos($sheetText, ' ') !== false) { - $sheetText = "'".$sheetText."'"; - } - $sheetText .='!'; - } - if ((!is_bool($referenceStyle)) || $referenceStyle) { - $rowRelative = $columnRelative = '$'; - $column = PHPExcel_Cell::stringFromColumnIndex($column-1); - if (($relativity == 2) || ($relativity == 4)) { - $columnRelative = ''; - } - if (($relativity == 3) || ($relativity == 4)) { - $rowRelative = ''; - } - return $sheetText.$columnRelative.$column.$rowRelative.$row; - } else { - if (($relativity == 2) || ($relativity == 4)) { - $column = '['.$column.']'; - } - if (($relativity == 3) || ($relativity == 4)) { - $row = '['.$row.']'; - } - return $sheetText.'R'.$row.'C'.$column; - } - } - - - /** - * COLUMN - * - * Returns the column number of the given cell reference - * If the cell reference is a range of cells, COLUMN returns the column numbers of each column in the reference as a horizontal array. - * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the - * reference of the cell in which the COLUMN function appears; otherwise this function returns 0. - * - * Excel Function: - * =COLUMN([cellAddress]) - * - * @param cellAddress A reference to a range of cells for which you want the column numbers - * @return integer or array of integer - */ - public static function COLUMN($cellAddress = null) - { - if (is_null($cellAddress) || trim($cellAddress) === '') { - return 0; - } - - if (is_array($cellAddress)) { - foreach ($cellAddress as $columnKey => $value) { - $columnKey = preg_replace('/[^a-z]/i', '', $columnKey); - return (integer) PHPExcel_Cell::columnIndexFromString($columnKey); - } - } else { - if (strpos($cellAddress, '!') !== false) { - list($sheet, $cellAddress) = explode('!', $cellAddress); - } - if (strpos($cellAddress, ':') !== false) { - list($startAddress, $endAddress) = explode(':', $cellAddress); - $startAddress = preg_replace('/[^a-z]/i', '', $startAddress); - $endAddress = preg_replace('/[^a-z]/i', '', $endAddress); - $returnValue = array(); - do { - $returnValue[] = (integer) PHPExcel_Cell::columnIndexFromString($startAddress); - } while ($startAddress++ != $endAddress); - return $returnValue; - } else { - $cellAddress = preg_replace('/[^a-z]/i', '', $cellAddress); - return (integer) PHPExcel_Cell::columnIndexFromString($cellAddress); - } - } - } - - - /** - * COLUMNS - * - * Returns the number of columns in an array or reference. - * - * Excel Function: - * =COLUMNS(cellAddress) - * - * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of columns - * @return integer The number of columns in cellAddress - */ - public static function COLUMNS($cellAddress = null) - { - if (is_null($cellAddress) || $cellAddress === '') { - return 1; - } elseif (!is_array($cellAddress)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - reset($cellAddress); - $isMatrix = (is_numeric(key($cellAddress))); - list($columns, $rows) = PHPExcel_Calculation::_getMatrixDimensions($cellAddress); - - if ($isMatrix) { - return $rows; - } else { - return $columns; - } - } - - - /** - * ROW - * - * Returns the row number of the given cell reference - * If the cell reference is a range of cells, ROW returns the row numbers of each row in the reference as a vertical array. - * If cell reference is omitted, and the function is being called through the calculation engine, then it is assumed to be the - * reference of the cell in which the ROW function appears; otherwise this function returns 0. - * - * Excel Function: - * =ROW([cellAddress]) - * - * @param cellAddress A reference to a range of cells for which you want the row numbers - * @return integer or array of integer - */ - public static function ROW($cellAddress = null) - { - if (is_null($cellAddress) || trim($cellAddress) === '') { - return 0; - } - - if (is_array($cellAddress)) { - foreach ($cellAddress as $columnKey => $rowValue) { - foreach ($rowValue as $rowKey => $cellValue) { - return (integer) preg_replace('/[^0-9]/i', '', $rowKey); - } - } - } else { - if (strpos($cellAddress, '!') !== false) { - list($sheet, $cellAddress) = explode('!', $cellAddress); - } - if (strpos($cellAddress, ':') !== false) { - list($startAddress, $endAddress) = explode(':', $cellAddress); - $startAddress = preg_replace('/[^0-9]/', '', $startAddress); - $endAddress = preg_replace('/[^0-9]/', '', $endAddress); - $returnValue = array(); - do { - $returnValue[][] = (integer) $startAddress; - } while ($startAddress++ != $endAddress); - return $returnValue; - } else { - list($cellAddress) = explode(':', $cellAddress); - return (integer) preg_replace('/[^0-9]/', '', $cellAddress); - } - } - } - - - /** - * ROWS - * - * Returns the number of rows in an array or reference. - * - * Excel Function: - * =ROWS(cellAddress) - * - * @param cellAddress An array or array formula, or a reference to a range of cells for which you want the number of rows - * @return integer The number of rows in cellAddress - */ - public static function ROWS($cellAddress = null) - { - if (is_null($cellAddress) || $cellAddress === '') { - return 1; - } elseif (!is_array($cellAddress)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - reset($cellAddress); - $isMatrix = (is_numeric(key($cellAddress))); - list($columns, $rows) = PHPExcel_Calculation::_getMatrixDimensions($cellAddress); - - if ($isMatrix) { - return $columns; - } else { - return $rows; - } - } - - - /** - * HYPERLINK - * - * Excel Function: - * =HYPERLINK(linkURL,displayName) - * - * @access public - * @category Logical Functions - * @param string $linkURL Value to check, is also the value returned when no error - * @param string $displayName Value to return when testValue is an error condition - * @param PHPExcel_Cell $pCell The cell to set the hyperlink in - * @return mixed The value of $displayName (or $linkURL if $displayName was blank) - */ - public static function HYPERLINK($linkURL = '', $displayName = null, PHPExcel_Cell $pCell = null) - { - $args = func_get_args(); - $pCell = array_pop($args); - - $linkURL = (is_null($linkURL)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($linkURL); - $displayName = (is_null($displayName)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($displayName); - - if ((!is_object($pCell)) || (trim($linkURL) == '')) { - return PHPExcel_Calculation_Functions::REF(); - } - - if ((is_object($displayName)) || trim($displayName) == '') { - $displayName = $linkURL; - } - - $pCell->getHyperlink()->setUrl($linkURL); - $pCell->getHyperlink()->setTooltip($displayName); - - return $displayName; - } - - - /** - * INDIRECT - * - * Returns the reference specified by a text string. - * References are immediately evaluated to display their contents. - * - * Excel Function: - * =INDIRECT(cellAddress) - * - * NOTE - INDIRECT() does not yet support the optional a1 parameter introduced in Excel 2010 - * - * @param cellAddress $cellAddress The cell address of the current cell (containing this formula) - * @param PHPExcel_Cell $pCell The current cell (containing this formula) - * @return mixed The cells referenced by cellAddress - * - * @todo Support for the optional a1 parameter introduced in Excel 2010 - * - */ - public static function INDIRECT($cellAddress = null, PHPExcel_Cell $pCell = null) - { - $cellAddress = PHPExcel_Calculation_Functions::flattenSingleValue($cellAddress); - if (is_null($cellAddress) || $cellAddress === '') { - return PHPExcel_Calculation_Functions::REF(); - } - - $cellAddress1 = $cellAddress; - $cellAddress2 = null; - if (strpos($cellAddress, ':') !== false) { - list($cellAddress1, $cellAddress2) = explode(':', $cellAddress); - } - - if ((!preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellAddress1, $matches)) || - ((!is_null($cellAddress2)) && (!preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $cellAddress2, $matches)))) { - if (!preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $cellAddress1, $matches)) { - return PHPExcel_Calculation_Functions::REF(); - } - - if (strpos($cellAddress, '!') !== false) { - list($sheetName, $cellAddress) = explode('!', $cellAddress); - $sheetName = trim($sheetName, "'"); - $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); - } else { - $pSheet = $pCell->getWorksheet(); - } - - return PHPExcel_Calculation::getInstance()->extractNamedRange($cellAddress, $pSheet, false); - } - - if (strpos($cellAddress, '!') !== false) { - list($sheetName, $cellAddress) = explode('!', $cellAddress); - $sheetName = trim($sheetName, "'"); - $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); - } else { - $pSheet = $pCell->getWorksheet(); - } - - return PHPExcel_Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false); - } - - - /** - * OFFSET - * - * Returns a reference to a range that is a specified number of rows and columns from a cell or range of cells. - * The reference that is returned can be a single cell or a range of cells. You can specify the number of rows and - * the number of columns to be returned. - * - * Excel Function: - * =OFFSET(cellAddress, rows, cols, [height], [width]) - * - * @param cellAddress The reference from which you want to base the offset. Reference must refer to a cell or - * range of adjacent cells; otherwise, OFFSET returns the #VALUE! error value. - * @param rows The number of rows, up or down, that you want the upper-left cell to refer to. - * Using 5 as the rows argument specifies that the upper-left cell in the reference is - * five rows below reference. Rows can be positive (which means below the starting reference) - * or negative (which means above the starting reference). - * @param cols The number of columns, to the left or right, that you want the upper-left cell of the result - * to refer to. Using 5 as the cols argument specifies that the upper-left cell in the - * reference is five columns to the right of reference. Cols can be positive (which means - * to the right of the starting reference) or negative (which means to the left of the - * starting reference). - * @param height The height, in number of rows, that you want the returned reference to be. Height must be a positive number. - * @param width The width, in number of columns, that you want the returned reference to be. Width must be a positive number. - * @return string A reference to a cell or range of cells - */ - public static function OFFSET($cellAddress = null, $rows = 0, $columns = 0, $height = null, $width = null) - { - $rows = PHPExcel_Calculation_Functions::flattenSingleValue($rows); - $columns = PHPExcel_Calculation_Functions::flattenSingleValue($columns); - $height = PHPExcel_Calculation_Functions::flattenSingleValue($height); - $width = PHPExcel_Calculation_Functions::flattenSingleValue($width); - if ($cellAddress == null) { - return 0; - } - - $args = func_get_args(); - $pCell = array_pop($args); - if (!is_object($pCell)) { - return PHPExcel_Calculation_Functions::REF(); - } - - $sheetName = null; - if (strpos($cellAddress, "!")) { - list($sheetName, $cellAddress) = explode("!", $cellAddress); - $sheetName = trim($sheetName, "'"); - } - if (strpos($cellAddress, ":")) { - list($startCell, $endCell) = explode(":", $cellAddress); - } else { - $startCell = $endCell = $cellAddress; - } - list($startCellColumn, $startCellRow) = PHPExcel_Cell::coordinateFromString($startCell); - list($endCellColumn, $endCellRow) = PHPExcel_Cell::coordinateFromString($endCell); - - $startCellRow += $rows; - $startCellColumn = PHPExcel_Cell::columnIndexFromString($startCellColumn) - 1; - $startCellColumn += $columns; - - if (($startCellRow <= 0) || ($startCellColumn < 0)) { - return PHPExcel_Calculation_Functions::REF(); - } - $endCellColumn = PHPExcel_Cell::columnIndexFromString($endCellColumn) - 1; - if (($width != null) && (!is_object($width))) { - $endCellColumn = $startCellColumn + $width - 1; - } else { - $endCellColumn += $columns; - } - $startCellColumn = PHPExcel_Cell::stringFromColumnIndex($startCellColumn); - - if (($height != null) && (!is_object($height))) { - $endCellRow = $startCellRow + $height - 1; - } else { - $endCellRow += $rows; - } - - if (($endCellRow <= 0) || ($endCellColumn < 0)) { - return PHPExcel_Calculation_Functions::REF(); - } - $endCellColumn = PHPExcel_Cell::stringFromColumnIndex($endCellColumn); - - $cellAddress = $startCellColumn.$startCellRow; - if (($startCellColumn != $endCellColumn) || ($startCellRow != $endCellRow)) { - $cellAddress .= ':'.$endCellColumn.$endCellRow; - } - - if ($sheetName !== null) { - $pSheet = $pCell->getWorksheet()->getParent()->getSheetByName($sheetName); - } else { - $pSheet = $pCell->getWorksheet(); - } - - return PHPExcel_Calculation::getInstance()->extractCellRange($cellAddress, $pSheet, false); - } - - - /** - * CHOOSE - * - * Uses lookup_value to return a value from the list of value arguments. - * Use CHOOSE to select one of up to 254 values based on the lookup_value. - * - * Excel Function: - * =CHOOSE(index_num, value1, [value2], ...) - * - * @param index_num Specifies which value argument is selected. - * Index_num must be a number between 1 and 254, or a formula or reference to a cell containing a number - * between 1 and 254. - * @param value1... Value1 is required, subsequent values are optional. - * Between 1 to 254 value arguments from which CHOOSE selects a value or an action to perform based on - * index_num. The arguments can be numbers, cell references, defined names, formulas, functions, or - * text. - * @return mixed The selected value - */ - public static function CHOOSE() - { - $chooseArgs = func_get_args(); - $chosenEntry = PHPExcel_Calculation_Functions::flattenArray(array_shift($chooseArgs)); - $entryCount = count($chooseArgs) - 1; - - if (is_array($chosenEntry)) { - $chosenEntry = array_shift($chosenEntry); - } - if ((is_numeric($chosenEntry)) && (!is_bool($chosenEntry))) { - --$chosenEntry; - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - $chosenEntry = floor($chosenEntry); - if (($chosenEntry < 0) || ($chosenEntry > $entryCount)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (is_array($chooseArgs[$chosenEntry])) { - return PHPExcel_Calculation_Functions::flattenArray($chooseArgs[$chosenEntry]); - } else { - return $chooseArgs[$chosenEntry]; - } - } - - - /** - * MATCH - * - * The MATCH function searches for a specified item in a range of cells - * - * Excel Function: - * =MATCH(lookup_value, lookup_array, [match_type]) - * - * @param lookup_value The value that you want to match in lookup_array - * @param lookup_array The range of cells being searched - * @param match_type The number -1, 0, or 1. -1 means above, 0 means exact match, 1 means below. If match_type is 1 or -1, the list has to be ordered. - * @return integer The relative position of the found item - */ - public static function MATCH($lookup_value, $lookup_array, $match_type = 1) - { - $lookup_array = PHPExcel_Calculation_Functions::flattenArray($lookup_array); - $lookup_value = PHPExcel_Calculation_Functions::flattenSingleValue($lookup_value); - $match_type = (is_null($match_type)) ? 1 : (int) PHPExcel_Calculation_Functions::flattenSingleValue($match_type); - // MATCH is not case sensitive - $lookup_value = strtolower($lookup_value); - - // lookup_value type has to be number, text, or logical values - if ((!is_numeric($lookup_value)) && (!is_string($lookup_value)) && (!is_bool($lookup_value))) { - return PHPExcel_Calculation_Functions::NA(); - } - - // match_type is 0, 1 or -1 - if (($match_type !== 0) && ($match_type !== -1) && ($match_type !== 1)) { - return PHPExcel_Calculation_Functions::NA(); - } - - // lookup_array should not be empty - $lookupArraySize = count($lookup_array); - if ($lookupArraySize <= 0) { - return PHPExcel_Calculation_Functions::NA(); - } - - // lookup_array should contain only number, text, or logical values, or empty (null) cells - foreach ($lookup_array as $i => $lookupArrayValue) { - // check the type of the value - if ((!is_numeric($lookupArrayValue)) && (!is_string($lookupArrayValue)) && - (!is_bool($lookupArrayValue)) && (!is_null($lookupArrayValue))) { - return PHPExcel_Calculation_Functions::NA(); - } - // convert strings to lowercase for case-insensitive testing - if (is_string($lookupArrayValue)) { - $lookup_array[$i] = strtolower($lookupArrayValue); - } - if ((is_null($lookupArrayValue)) && (($match_type == 1) || ($match_type == -1))) { - $lookup_array = array_slice($lookup_array, 0, $i-1); - } - } - - // if match_type is 1 or -1, the list has to be ordered - if ($match_type == 1) { - asort($lookup_array); - $keySet = array_keys($lookup_array); - } elseif ($match_type == -1) { - arsort($lookup_array); - $keySet = array_keys($lookup_array); - } - - // ** - // find the match - // ** - foreach ($lookup_array as $i => $lookupArrayValue) { - if (($match_type == 0) && ($lookupArrayValue == $lookup_value)) { - // exact match - return ++$i; - } elseif (($match_type == -1) && ($lookupArrayValue <= $lookup_value)) { - $i = array_search($i, $keySet); - // if match_type is -1 <=> find the smallest value that is greater than or equal to lookup_value - if ($i < 1) { - // 1st cell was already smaller than the lookup_value - break; - } else { - // the previous cell was the match - return $keySet[$i-1]+1; - } - } elseif (($match_type == 1) && ($lookupArrayValue >= $lookup_value)) { - $i = array_search($i, $keySet); - // if match_type is 1 <=> find the largest value that is less than or equal to lookup_value - if ($i < 1) { - // 1st cell was already bigger than the lookup_value - break; - } else { - // the previous cell was the match - return $keySet[$i-1]+1; - } - } - } - - // unsuccessful in finding a match, return #N/A error value - return PHPExcel_Calculation_Functions::NA(); - } - - - /** - * INDEX - * - * Uses an index to choose a value from a reference or array - * - * Excel Function: - * =INDEX(range_array, row_num, [column_num]) - * - * @param range_array A range of cells or an array constant - * @param row_num The row in array from which to return a value. If row_num is omitted, column_num is required. - * @param column_num The column in array from which to return a value. If column_num is omitted, row_num is required. - * @return mixed the value of a specified cell or array of cells - */ - public static function INDEX($arrayValues, $rowNum = 0, $columnNum = 0) - { - if (($rowNum < 0) || ($columnNum < 0)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (!is_array($arrayValues)) { - return PHPExcel_Calculation_Functions::REF(); - } - - $rowKeys = array_keys($arrayValues); - $columnKeys = @array_keys($arrayValues[$rowKeys[0]]); - - if ($columnNum > count($columnKeys)) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ($columnNum == 0) { - if ($rowNum == 0) { - return $arrayValues; - } - $rowNum = $rowKeys[--$rowNum]; - $returnArray = array(); - foreach ($arrayValues as $arrayColumn) { - if (is_array($arrayColumn)) { - if (isset($arrayColumn[$rowNum])) { - $returnArray[] = $arrayColumn[$rowNum]; - } else { - return $arrayValues[$rowNum]; - } - } else { - return $arrayValues[$rowNum]; - } - } - return $returnArray; - } - $columnNum = $columnKeys[--$columnNum]; - if ($rowNum > count($rowKeys)) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ($rowNum == 0) { - return $arrayValues[$columnNum]; - } - $rowNum = $rowKeys[--$rowNum]; - - return $arrayValues[$rowNum][$columnNum]; - } - - - /** - * TRANSPOSE - * - * @param array $matrixData A matrix of values - * @return array - * - * Unlike the Excel TRANSPOSE function, which will only work on a single row or column, this function will transpose a full matrix. - */ - public static function TRANSPOSE($matrixData) - { - $returnMatrix = array(); - if (!is_array($matrixData)) { - $matrixData = array(array($matrixData)); - } - - $column = 0; - foreach ($matrixData as $matrixRow) { - $row = 0; - foreach ($matrixRow as $matrixCell) { - $returnMatrix[$row][$column] = $matrixCell; - ++$row; - } - ++$column; - } - return $returnMatrix; - } - - - private static function vlookupSort($a, $b) - { - reset($a); - $firstColumn = key($a); - if (($aLower = strtolower($a[$firstColumn])) == ($bLower = strtolower($b[$firstColumn]))) { - return 0; - } - return ($aLower < $bLower) ? -1 : 1; - } - - - /** - * VLOOKUP - * The VLOOKUP function searches for value in the left-most column of lookup_array and returns the value in the same row based on the index_number. - * @param lookup_value The value that you want to match in lookup_array - * @param lookup_array The range of cells being searched - * @param index_number The column number in table_array from which the matching value must be returned. The first column is 1. - * @param not_exact_match Determines if you are looking for an exact match based on lookup_value. - * @return mixed The value of the found cell - */ - public static function VLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true) - { - $lookup_value = PHPExcel_Calculation_Functions::flattenSingleValue($lookup_value); - $index_number = PHPExcel_Calculation_Functions::flattenSingleValue($index_number); - $not_exact_match = PHPExcel_Calculation_Functions::flattenSingleValue($not_exact_match); - - // index_number must be greater than or equal to 1 - if ($index_number < 1) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // index_number must be less than or equal to the number of columns in lookup_array - if ((!is_array($lookup_array)) || (empty($lookup_array))) { - return PHPExcel_Calculation_Functions::REF(); - } else { - $f = array_keys($lookup_array); - $firstRow = array_pop($f); - if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array[$firstRow]))) { - return PHPExcel_Calculation_Functions::REF(); - } else { - $columnKeys = array_keys($lookup_array[$firstRow]); - $returnColumn = $columnKeys[--$index_number]; - $firstColumn = array_shift($columnKeys); - } - } - - if (!$not_exact_match) { - uasort($lookup_array, array('self', 'vlookupSort')); - } - - $rowNumber = $rowValue = false; - foreach ($lookup_array as $rowKey => $rowData) { - if ((is_numeric($lookup_value) && is_numeric($rowData[$firstColumn]) && ($rowData[$firstColumn] > $lookup_value)) || - (!is_numeric($lookup_value) && !is_numeric($rowData[$firstColumn]) && (strtolower($rowData[$firstColumn]) > strtolower($lookup_value)))) { - break; - } - $rowNumber = $rowKey; - $rowValue = $rowData[$firstColumn]; - } - - if ($rowNumber !== false) { - if ((!$not_exact_match) && ($rowValue != $lookup_value)) { - // if an exact match is required, we have what we need to return an appropriate response - return PHPExcel_Calculation_Functions::NA(); - } else { - // otherwise return the appropriate value - return $lookup_array[$rowNumber][$returnColumn]; - } - } - - return PHPExcel_Calculation_Functions::NA(); - } - - - /** - * HLOOKUP - * The HLOOKUP function searches for value in the top-most row of lookup_array and returns the value in the same column based on the index_number. - * @param lookup_value The value that you want to match in lookup_array - * @param lookup_array The range of cells being searched - * @param index_number The row number in table_array from which the matching value must be returned. The first row is 1. - * @param not_exact_match Determines if you are looking for an exact match based on lookup_value. - * @return mixed The value of the found cell - */ - public static function HLOOKUP($lookup_value, $lookup_array, $index_number, $not_exact_match = true) - { - $lookup_value = PHPExcel_Calculation_Functions::flattenSingleValue($lookup_value); - $index_number = PHPExcel_Calculation_Functions::flattenSingleValue($index_number); - $not_exact_match = PHPExcel_Calculation_Functions::flattenSingleValue($not_exact_match); - - // index_number must be greater than or equal to 1 - if ($index_number < 1) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - // index_number must be less than or equal to the number of columns in lookup_array - if ((!is_array($lookup_array)) || (empty($lookup_array))) { - return PHPExcel_Calculation_Functions::REF(); - } else { - $f = array_keys($lookup_array); - $firstRow = array_pop($f); - if ((!is_array($lookup_array[$firstRow])) || ($index_number > count($lookup_array[$firstRow]))) { - return PHPExcel_Calculation_Functions::REF(); - } else { - $columnKeys = array_keys($lookup_array[$firstRow]); - $firstkey = $f[0] - 1; - $returnColumn = $firstkey + $index_number; - $firstColumn = array_shift($f); - } - } - - if (!$not_exact_match) { - $firstRowH = asort($lookup_array[$firstColumn]); - } - - $rowNumber = $rowValue = false; - foreach ($lookup_array[$firstColumn] as $rowKey => $rowData) { - if ((is_numeric($lookup_value) && is_numeric($rowData) && ($rowData > $lookup_value)) || - (!is_numeric($lookup_value) && !is_numeric($rowData) && (strtolower($rowData) > strtolower($lookup_value)))) { - break; - } - $rowNumber = $rowKey; - $rowValue = $rowData; - } - - if ($rowNumber !== false) { - if ((!$not_exact_match) && ($rowValue != $lookup_value)) { - // if an exact match is required, we have what we need to return an appropriate response - return PHPExcel_Calculation_Functions::NA(); - } else { - // otherwise return the appropriate value - return $lookup_array[$returnColumn][$rowNumber]; - } - } - - return PHPExcel_Calculation_Functions::NA(); - } - - - /** - * LOOKUP - * The LOOKUP function searches for value either from a one-row or one-column range or from an array. - * @param lookup_value The value that you want to match in lookup_array - * @param lookup_vector The range of cells being searched - * @param result_vector The column from which the matching value must be returned - * @return mixed The value of the found cell - */ - public static function LOOKUP($lookup_value, $lookup_vector, $result_vector = null) - { - $lookup_value = PHPExcel_Calculation_Functions::flattenSingleValue($lookup_value); - - if (!is_array($lookup_vector)) { - return PHPExcel_Calculation_Functions::NA(); - } - $lookupRows = count($lookup_vector); - $l = array_keys($lookup_vector); - $l = array_shift($l); - $lookupColumns = count($lookup_vector[$l]); - if ((($lookupRows == 1) && ($lookupColumns > 1)) || (($lookupRows == 2) && ($lookupColumns != 2))) { - $lookup_vector = self::TRANSPOSE($lookup_vector); - $lookupRows = count($lookup_vector); - $l = array_keys($lookup_vector); - $lookupColumns = count($lookup_vector[array_shift($l)]); - } - - if (is_null($result_vector)) { - $result_vector = $lookup_vector; - } - $resultRows = count($result_vector); - $l = array_keys($result_vector); - $l = array_shift($l); - $resultColumns = count($result_vector[$l]); - if ((($resultRows == 1) && ($resultColumns > 1)) || (($resultRows == 2) && ($resultColumns != 2))) { - $result_vector = self::TRANSPOSE($result_vector); - $resultRows = count($result_vector); - $r = array_keys($result_vector); - $resultColumns = count($result_vector[array_shift($r)]); - } - - if ($lookupRows == 2) { - $result_vector = array_pop($lookup_vector); - $lookup_vector = array_shift($lookup_vector); - } - if ($lookupColumns != 2) { - foreach ($lookup_vector as &$value) { - if (is_array($value)) { - $k = array_keys($value); - $key1 = $key2 = array_shift($k); - $key2++; - $dataValue1 = $value[$key1]; - } else { - $key1 = 0; - $key2 = 1; - $dataValue1 = $value; - } - $dataValue2 = array_shift($result_vector); - if (is_array($dataValue2)) { - $dataValue2 = array_shift($dataValue2); - } - $value = array($key1 => $dataValue1, $key2 => $dataValue2); - } - unset($value); - } - - return self::VLOOKUP($lookup_value, $lookup_vector, 2); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php deleted file mode 100644 index 894ba9c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/MathTrig.php +++ /dev/null @@ -1,1459 +0,0 @@ - 1; --$i) { - if (($value % $i) == 0) { - $factorArray = array_merge($factorArray, self::factors($value / $i)); - $factorArray = array_merge($factorArray, self::factors($i)); - if ($i <= sqrt($value)) { - break; - } - } - } - if (!empty($factorArray)) { - rsort($factorArray); - return $factorArray; - } else { - return array((integer) $value); - } - } - - - private static function romanCut($num, $n) - { - return ($num - ($num % $n ) ) / $n; - } - - - /** - * ATAN2 - * - * This function calculates the arc tangent of the two variables x and y. It is similar to - * calculating the arc tangent of y ÷ x, except that the signs of both arguments are used - * to determine the quadrant of the result. - * The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a - * point with coordinates (xCoordinate, yCoordinate). The angle is given in radians between - * -pi and pi, excluding -pi. - * - * Note that the Excel ATAN2() function accepts its arguments in the reverse order to the standard - * PHP atan2() function, so we need to reverse them here before calling the PHP atan() function. - * - * Excel Function: - * ATAN2(xCoordinate,yCoordinate) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $xCoordinate The x-coordinate of the point. - * @param float $yCoordinate The y-coordinate of the point. - * @return float The inverse tangent of the specified x- and y-coordinates. - */ - public static function ATAN2($xCoordinate = null, $yCoordinate = null) - { - $xCoordinate = PHPExcel_Calculation_Functions::flattenSingleValue($xCoordinate); - $yCoordinate = PHPExcel_Calculation_Functions::flattenSingleValue($yCoordinate); - - $xCoordinate = ($xCoordinate !== null) ? $xCoordinate : 0.0; - $yCoordinate = ($yCoordinate !== null) ? $yCoordinate : 0.0; - - if (((is_numeric($xCoordinate)) || (is_bool($xCoordinate))) && - ((is_numeric($yCoordinate))) || (is_bool($yCoordinate))) { - $xCoordinate = (float) $xCoordinate; - $yCoordinate = (float) $yCoordinate; - - if (($xCoordinate == 0) && ($yCoordinate == 0)) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - return atan2($yCoordinate, $xCoordinate); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * CEILING - * - * Returns number rounded up, away from zero, to the nearest multiple of significance. - * For example, if you want to avoid using pennies in your prices and your product is - * priced at $4.42, use the formula =CEILING(4.42,0.05) to round prices up to the - * nearest nickel. - * - * Excel Function: - * CEILING(number[,significance]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $number The number you want to round. - * @param float $significance The multiple to which you want to round. - * @return float Rounded Number - */ - public static function CEILING($number, $significance = null) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - $significance = PHPExcel_Calculation_Functions::flattenSingleValue($significance); - - if ((is_null($significance)) && - (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC)) { - $significance = $number / abs($number); - } - - if ((is_numeric($number)) && (is_numeric($significance))) { - if (($number == 0.0 ) || ($significance == 0.0)) { - return 0.0; - } elseif (self::SIGN($number) == self::SIGN($significance)) { - return ceil($number / $significance) * $significance; - } else { - return PHPExcel_Calculation_Functions::NaN(); - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * COMBIN - * - * Returns the number of combinations for a given number of items. Use COMBIN to - * determine the total possible number of groups for a given number of items. - * - * Excel Function: - * COMBIN(numObjs,numInSet) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param int $numObjs Number of different objects - * @param int $numInSet Number of objects in each combination - * @return int Number of combinations - */ - public static function COMBIN($numObjs, $numInSet) - { - $numObjs = PHPExcel_Calculation_Functions::flattenSingleValue($numObjs); - $numInSet = PHPExcel_Calculation_Functions::flattenSingleValue($numInSet); - - if ((is_numeric($numObjs)) && (is_numeric($numInSet))) { - if ($numObjs < $numInSet) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif ($numInSet < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return round(self::FACT($numObjs) / self::FACT($numObjs - $numInSet)) / self::FACT($numInSet); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * EVEN - * - * Returns number rounded up to the nearest even integer. - * You can use this function for processing items that come in twos. For example, - * a packing crate accepts rows of one or two items. The crate is full when - * the number of items, rounded up to the nearest two, matches the crate's - * capacity. - * - * Excel Function: - * EVEN(number) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $number Number to round - * @return int Rounded Number - */ - public static function EVEN($number) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - - if (is_null($number)) { - return 0; - } elseif (is_bool($number)) { - $number = (int) $number; - } - - if (is_numeric($number)) { - $significance = 2 * self::SIGN($number); - return (int) self::CEILING($number, $significance); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * FACT - * - * Returns the factorial of a number. - * The factorial of a number is equal to 1*2*3*...* number. - * - * Excel Function: - * FACT(factVal) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $factVal Factorial Value - * @return int Factorial - */ - public static function FACT($factVal) - { - $factVal = PHPExcel_Calculation_Functions::flattenSingleValue($factVal); - - if (is_numeric($factVal)) { - if ($factVal < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - $factLoop = floor($factVal); - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - if ($factVal > $factLoop) { - return PHPExcel_Calculation_Functions::NaN(); - } - } - - $factorial = 1; - while ($factLoop > 1) { - $factorial *= $factLoop--; - } - return $factorial ; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * FACTDOUBLE - * - * Returns the double factorial of a number. - * - * Excel Function: - * FACTDOUBLE(factVal) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $factVal Factorial Value - * @return int Double Factorial - */ - public static function FACTDOUBLE($factVal) - { - $factLoop = PHPExcel_Calculation_Functions::flattenSingleValue($factVal); - - if (is_numeric($factLoop)) { - $factLoop = floor($factLoop); - if ($factVal < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - $factorial = 1; - while ($factLoop > 1) { - $factorial *= $factLoop--; - --$factLoop; - } - return $factorial ; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * FLOOR - * - * Rounds number down, toward zero, to the nearest multiple of significance. - * - * Excel Function: - * FLOOR(number[,significance]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $number Number to round - * @param float $significance Significance - * @return float Rounded Number - */ - public static function FLOOR($number, $significance = null) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - $significance = PHPExcel_Calculation_Functions::flattenSingleValue($significance); - - if ((is_null($significance)) && - (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC)) { - $significance = $number/abs($number); - } - - if ((is_numeric($number)) && (is_numeric($significance))) { - if ($significance == 0.0) { - return PHPExcel_Calculation_Functions::DIV0(); - } elseif ($number == 0.0) { - return 0.0; - } elseif (self::SIGN($number) == self::SIGN($significance)) { - return floor($number / $significance) * $significance; - } else { - return PHPExcel_Calculation_Functions::NaN(); - } - } - - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * GCD - * - * Returns the greatest common divisor of a series of numbers. - * The greatest common divisor is the largest integer that divides both - * number1 and number2 without a remainder. - * - * Excel Function: - * GCD(number1[,number2[, ...]]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return integer Greatest Common Divisor - */ - public static function GCD() - { - $returnValue = 1; - $allValuesFactors = array(); - // Loop through arguments - foreach (PHPExcel_Calculation_Functions::flattenArray(func_get_args()) as $value) { - if (!is_numeric($value)) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ($value == 0) { - continue; - } elseif ($value < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - $myFactors = self::factors($value); - $myCountedFactors = array_count_values($myFactors); - $allValuesFactors[] = $myCountedFactors; - } - $allValuesCount = count($allValuesFactors); - if ($allValuesCount == 0) { - return 0; - } - - $mergedArray = $allValuesFactors[0]; - for ($i=1; $i < $allValuesCount; ++$i) { - $mergedArray = array_intersect_key($mergedArray, $allValuesFactors[$i]); - } - $mergedArrayValues = count($mergedArray); - if ($mergedArrayValues == 0) { - return $returnValue; - } elseif ($mergedArrayValues > 1) { - foreach ($mergedArray as $mergedKey => $mergedValue) { - foreach ($allValuesFactors as $highestPowerTest) { - foreach ($highestPowerTest as $testKey => $testValue) { - if (($testKey == $mergedKey) && ($testValue < $mergedValue)) { - $mergedArray[$mergedKey] = $testValue; - $mergedValue = $testValue; - } - } - } - } - - $returnValue = 1; - foreach ($mergedArray as $key => $value) { - $returnValue *= pow($key, $value); - } - return $returnValue; - } else { - $keys = array_keys($mergedArray); - $key = $keys[0]; - $value = $mergedArray[$key]; - foreach ($allValuesFactors as $testValue) { - foreach ($testValue as $mergedKey => $mergedValue) { - if (($mergedKey == $key) && ($mergedValue < $value)) { - $value = $mergedValue; - } - } - } - return pow($key, $value); - } - } - - - /** - * INT - * - * Casts a floating point value to an integer - * - * Excel Function: - * INT(number) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $number Number to cast to an integer - * @return integer Integer value - */ - public static function INT($number) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - - if (is_null($number)) { - return 0; - } elseif (is_bool($number)) { - return (int) $number; - } - if (is_numeric($number)) { - return (int) floor($number); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * LCM - * - * Returns the lowest common multiplier of a series of numbers - * The least common multiple is the smallest positive integer that is a multiple - * of all integer arguments number1, number2, and so on. Use LCM to add fractions - * with different denominators. - * - * Excel Function: - * LCM(number1[,number2[, ...]]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return int Lowest Common Multiplier - */ - public static function LCM() - { - $returnValue = 1; - $allPoweredFactors = array(); - // Loop through arguments - foreach (PHPExcel_Calculation_Functions::flattenArray(func_get_args()) as $value) { - if (!is_numeric($value)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if ($value == 0) { - return 0; - } elseif ($value < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - $myFactors = self::factors(floor($value)); - $myCountedFactors = array_count_values($myFactors); - $myPoweredFactors = array(); - foreach ($myCountedFactors as $myCountedFactor => $myCountedPower) { - $myPoweredFactors[$myCountedFactor] = pow($myCountedFactor, $myCountedPower); - } - foreach ($myPoweredFactors as $myPoweredValue => $myPoweredFactor) { - if (array_key_exists($myPoweredValue, $allPoweredFactors)) { - if ($allPoweredFactors[$myPoweredValue] < $myPoweredFactor) { - $allPoweredFactors[$myPoweredValue] = $myPoweredFactor; - } - } else { - $allPoweredFactors[$myPoweredValue] = $myPoweredFactor; - } - } - } - foreach ($allPoweredFactors as $allPoweredFactor) { - $returnValue *= (integer) $allPoweredFactor; - } - return $returnValue; - } - - - /** - * LOG_BASE - * - * Returns the logarithm of a number to a specified base. The default base is 10. - * - * Excel Function: - * LOG(number[,base]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param float $number The positive real number for which you want the logarithm - * @param float $base The base of the logarithm. If base is omitted, it is assumed to be 10. - * @return float - */ - public static function LOG_BASE($number = null, $base = 10) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - $base = (is_null($base)) ? 10 : (float) PHPExcel_Calculation_Functions::flattenSingleValue($base); - - if ((!is_numeric($base)) || (!is_numeric($number))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (($base <= 0) || ($number <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return log($number, $base); - } - - - /** - * MDETERM - * - * Returns the matrix determinant of an array. - * - * Excel Function: - * MDETERM(array) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param array $matrixValues A matrix of values - * @return float - */ - public static function MDETERM($matrixValues) - { - $matrixData = array(); - if (!is_array($matrixValues)) { - $matrixValues = array(array($matrixValues)); - } - - $row = $maxColumn = 0; - foreach ($matrixValues as $matrixRow) { - if (!is_array($matrixRow)) { - $matrixRow = array($matrixRow); - } - $column = 0; - foreach ($matrixRow as $matrixCell) { - if ((is_string($matrixCell)) || ($matrixCell === null)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $matrixData[$column][$row] = $matrixCell; - ++$column; - } - if ($column > $maxColumn) { - $maxColumn = $column; - } - ++$row; - } - if ($row != $maxColumn) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - try { - $matrix = new PHPExcel_Shared_JAMA_Matrix($matrixData); - return $matrix->det(); - } catch (PHPExcel_Exception $ex) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - - - /** - * MINVERSE - * - * Returns the inverse matrix for the matrix stored in an array. - * - * Excel Function: - * MINVERSE(array) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param array $matrixValues A matrix of values - * @return array - */ - public static function MINVERSE($matrixValues) - { - $matrixData = array(); - if (!is_array($matrixValues)) { - $matrixValues = array(array($matrixValues)); - } - - $row = $maxColumn = 0; - foreach ($matrixValues as $matrixRow) { - if (!is_array($matrixRow)) { - $matrixRow = array($matrixRow); - } - $column = 0; - foreach ($matrixRow as $matrixCell) { - if ((is_string($matrixCell)) || ($matrixCell === null)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $matrixData[$column][$row] = $matrixCell; - ++$column; - } - if ($column > $maxColumn) { - $maxColumn = $column; - } - ++$row; - } - if ($row != $maxColumn) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - try { - $matrix = new PHPExcel_Shared_JAMA_Matrix($matrixData); - return $matrix->inverse()->getArray(); - } catch (PHPExcel_Exception $ex) { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - - - /** - * MMULT - * - * @param array $matrixData1 A matrix of values - * @param array $matrixData2 A matrix of values - * @return array - */ - public static function MMULT($matrixData1, $matrixData2) - { - $matrixAData = $matrixBData = array(); - if (!is_array($matrixData1)) { - $matrixData1 = array(array($matrixData1)); - } - if (!is_array($matrixData2)) { - $matrixData2 = array(array($matrixData2)); - } - - try { - $rowA = 0; - foreach ($matrixData1 as $matrixRow) { - if (!is_array($matrixRow)) { - $matrixRow = array($matrixRow); - } - $columnA = 0; - foreach ($matrixRow as $matrixCell) { - if ((!is_numeric($matrixCell)) || ($matrixCell === null)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $matrixAData[$rowA][$columnA] = $matrixCell; - ++$columnA; - } - ++$rowA; - } - $matrixA = new PHPExcel_Shared_JAMA_Matrix($matrixAData); - $rowB = 0; - foreach ($matrixData2 as $matrixRow) { - if (!is_array($matrixRow)) { - $matrixRow = array($matrixRow); - } - $columnB = 0; - foreach ($matrixRow as $matrixCell) { - if ((!is_numeric($matrixCell)) || ($matrixCell === null)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $matrixBData[$rowB][$columnB] = $matrixCell; - ++$columnB; - } - ++$rowB; - } - $matrixB = new PHPExcel_Shared_JAMA_Matrix($matrixBData); - - if ($columnA != $rowB) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - return $matrixA->times($matrixB)->getArray(); - } catch (PHPExcel_Exception $ex) { - var_dump($ex->getMessage()); - return PHPExcel_Calculation_Functions::VALUE(); - } - } - - - /** - * MOD - * - * @param int $a Dividend - * @param int $b Divisor - * @return int Remainder - */ - public static function MOD($a = 1, $b = 1) - { - $a = PHPExcel_Calculation_Functions::flattenSingleValue($a); - $b = PHPExcel_Calculation_Functions::flattenSingleValue($b); - - if ($b == 0.0) { - return PHPExcel_Calculation_Functions::DIV0(); - } elseif (($a < 0.0) && ($b > 0.0)) { - return $b - fmod(abs($a), $b); - } elseif (($a > 0.0) && ($b < 0.0)) { - return $b + fmod($a, abs($b)); - } - - return fmod($a, $b); - } - - - /** - * MROUND - * - * Rounds a number to the nearest multiple of a specified value - * - * @param float $number Number to round - * @param int $multiple Multiple to which you want to round $number - * @return float Rounded Number - */ - public static function MROUND($number, $multiple) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - $multiple = PHPExcel_Calculation_Functions::flattenSingleValue($multiple); - - if ((is_numeric($number)) && (is_numeric($multiple))) { - if ($multiple == 0) { - return 0; - } - if ((self::SIGN($number)) == (self::SIGN($multiple))) { - $multiplier = 1 / $multiple; - return round($number * $multiplier) / $multiplier; - } - return PHPExcel_Calculation_Functions::NaN(); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * MULTINOMIAL - * - * Returns the ratio of the factorial of a sum of values to the product of factorials. - * - * @param array of mixed Data Series - * @return float - */ - public static function MULTINOMIAL() - { - $summer = 0; - $divisor = 1; - // Loop through arguments - foreach (PHPExcel_Calculation_Functions::flattenArray(func_get_args()) as $arg) { - // Is it a numeric value? - if (is_numeric($arg)) { - if ($arg < 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - $summer += floor($arg); - $divisor *= self::FACT($arg); - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - - // Return - if ($summer > 0) { - $summer = self::FACT($summer); - return $summer / $divisor; - } - return 0; - } - - - /** - * ODD - * - * Returns number rounded up to the nearest odd integer. - * - * @param float $number Number to round - * @return int Rounded Number - */ - public static function ODD($number) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - - if (is_null($number)) { - return 1; - } elseif (is_bool($number)) { - return 1; - } elseif (is_numeric($number)) { - $significance = self::SIGN($number); - if ($significance == 0) { - return 1; - } - - $result = self::CEILING($number, $significance); - if ($result == self::EVEN($result)) { - $result += $significance; - } - - return (int) $result; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * POWER - * - * Computes x raised to the power y. - * - * @param float $x - * @param float $y - * @return float - */ - public static function POWER($x = 0, $y = 2) - { - $x = PHPExcel_Calculation_Functions::flattenSingleValue($x); - $y = PHPExcel_Calculation_Functions::flattenSingleValue($y); - - // Validate parameters - if ($x == 0.0 && $y == 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif ($x == 0.0 && $y < 0.0) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - // Return - $result = pow($x, $y); - return (!is_nan($result) && !is_infinite($result)) ? $result : PHPExcel_Calculation_Functions::NaN(); - } - - - /** - * PRODUCT - * - * PRODUCT returns the product of all the values and cells referenced in the argument list. - * - * Excel Function: - * PRODUCT(value1[,value2[, ...]]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function PRODUCT() - { - // Return value - $returnValue = null; - - // Loop through arguments - foreach (PHPExcel_Calculation_Functions::flattenArray(func_get_args()) as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if (is_null($returnValue)) { - $returnValue = $arg; - } else { - $returnValue *= $arg; - } - } - } - - // Return - if (is_null($returnValue)) { - return 0; - } - return $returnValue; - } - - - /** - * QUOTIENT - * - * QUOTIENT function returns the integer portion of a division. Numerator is the divided number - * and denominator is the divisor. - * - * Excel Function: - * QUOTIENT(value1[,value2[, ...]]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function QUOTIENT() - { - // Return value - $returnValue = null; - - // Loop through arguments - foreach (PHPExcel_Calculation_Functions::flattenArray(func_get_args()) as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if (is_null($returnValue)) { - $returnValue = ($arg == 0) ? 0 : $arg; - } else { - if (($returnValue == 0) || ($arg == 0)) { - $returnValue = 0; - } else { - $returnValue /= $arg; - } - } - } - } - - // Return - return intval($returnValue); - } - - - /** - * RAND - * - * @param int $min Minimal value - * @param int $max Maximal value - * @return int Random number - */ - public static function RAND($min = 0, $max = 0) - { - $min = PHPExcel_Calculation_Functions::flattenSingleValue($min); - $max = PHPExcel_Calculation_Functions::flattenSingleValue($max); - - if ($min == 0 && $max == 0) { - return (mt_rand(0, 10000000)) / 10000000; - } else { - return mt_rand($min, $max); - } - } - - - public static function ROMAN($aValue, $style = 0) - { - $aValue = PHPExcel_Calculation_Functions::flattenSingleValue($aValue); - $style = (is_null($style)) ? 0 : (integer) PHPExcel_Calculation_Functions::flattenSingleValue($style); - if ((!is_numeric($aValue)) || ($aValue < 0) || ($aValue >= 4000)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $aValue = (integer) $aValue; - if ($aValue == 0) { - return ''; - } - - $mill = array('', 'M', 'MM', 'MMM', 'MMMM', 'MMMMM'); - $cent = array('', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM'); - $tens = array('', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'); - $ones = array('', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'); - - $roman = ''; - while ($aValue > 5999) { - $roman .= 'M'; - $aValue -= 1000; - } - $m = self::romanCut($aValue, 1000); - $aValue %= 1000; - $c = self::romanCut($aValue, 100); - $aValue %= 100; - $t = self::romanCut($aValue, 10); - $aValue %= 10; - - return $roman.$mill[$m].$cent[$c].$tens[$t].$ones[$aValue]; - } - - - /** - * ROUNDUP - * - * Rounds a number up to a specified number of decimal places - * - * @param float $number Number to round - * @param int $digits Number of digits to which you want to round $number - * @return float Rounded Number - */ - public static function ROUNDUP($number, $digits) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - $digits = PHPExcel_Calculation_Functions::flattenSingleValue($digits); - - if ((is_numeric($number)) && (is_numeric($digits))) { - $significance = pow(10, (int) $digits); - if ($number < 0.0) { - return floor($number * $significance) / $significance; - } else { - return ceil($number * $significance) / $significance; - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * ROUNDDOWN - * - * Rounds a number down to a specified number of decimal places - * - * @param float $number Number to round - * @param int $digits Number of digits to which you want to round $number - * @return float Rounded Number - */ - public static function ROUNDDOWN($number, $digits) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - $digits = PHPExcel_Calculation_Functions::flattenSingleValue($digits); - - if ((is_numeric($number)) && (is_numeric($digits))) { - $significance = pow(10, (int) $digits); - if ($number < 0.0) { - return ceil($number * $significance) / $significance; - } else { - return floor($number * $significance) / $significance; - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * SERIESSUM - * - * Returns the sum of a power series - * - * @param float $x Input value to the power series - * @param float $n Initial power to which you want to raise $x - * @param float $m Step by which to increase $n for each term in the series - * @param array of mixed Data Series - * @return float - */ - public static function SERIESSUM() - { - $returnValue = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - $x = array_shift($aArgs); - $n = array_shift($aArgs); - $m = array_shift($aArgs); - - if ((is_numeric($x)) && (is_numeric($n)) && (is_numeric($m))) { - // Calculate - $i = 0; - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $returnValue += $arg * pow($x, $n + ($m * $i++)); - } else { - return PHPExcel_Calculation_Functions::VALUE(); - } - } - return $returnValue; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * SIGN - * - * Determines the sign of a number. Returns 1 if the number is positive, zero (0) - * if the number is 0, and -1 if the number is negative. - * - * @param float $number Number to round - * @return int sign value - */ - public static function SIGN($number) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - - if (is_bool($number)) { - return (int) $number; - } - if (is_numeric($number)) { - if ($number == 0.0) { - return 0; - } - return $number / abs($number); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * SQRTPI - * - * Returns the square root of (number * pi). - * - * @param float $number Number - * @return float Square Root of Number * Pi - */ - public static function SQRTPI($number) - { - $number = PHPExcel_Calculation_Functions::flattenSingleValue($number); - - if (is_numeric($number)) { - if ($number < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return sqrt($number * M_PI) ; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * SUBTOTAL - * - * Returns a subtotal in a list or database. - * - * @param int the number 1 to 11 that specifies which function to - * use in calculating subtotals within a list. - * @param array of mixed Data Series - * @return float - */ - public static function SUBTOTAL() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - // Calculate - $subtotal = array_shift($aArgs); - - if ((is_numeric($subtotal)) && (!is_string($subtotal))) { - switch ($subtotal) { - case 1: - return PHPExcel_Calculation_Statistical::AVERAGE($aArgs); - case 2: - return PHPExcel_Calculation_Statistical::COUNT($aArgs); - case 3: - return PHPExcel_Calculation_Statistical::COUNTA($aArgs); - case 4: - return PHPExcel_Calculation_Statistical::MAX($aArgs); - case 5: - return PHPExcel_Calculation_Statistical::MIN($aArgs); - case 6: - return self::PRODUCT($aArgs); - case 7: - return PHPExcel_Calculation_Statistical::STDEV($aArgs); - case 8: - return PHPExcel_Calculation_Statistical::STDEVP($aArgs); - case 9: - return self::SUM($aArgs); - case 10: - return PHPExcel_Calculation_Statistical::VARFunc($aArgs); - case 11: - return PHPExcel_Calculation_Statistical::VARP($aArgs); - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * SUM - * - * SUM computes the sum of all the values and cells referenced in the argument list. - * - * Excel Function: - * SUM(value1[,value2[, ...]]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function SUM() - { - $returnValue = 0; - - // Loop through the arguments - foreach (PHPExcel_Calculation_Functions::flattenArray(func_get_args()) as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $returnValue += $arg; - } - } - - return $returnValue; - } - - - /** - * SUMIF - * - * Counts the number of cells that contain numbers within the list of arguments - * - * Excel Function: - * SUMIF(value1[,value2[, ...]],condition) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be summed. - * @return float - */ - public static function SUMIF($aArgs, $condition, $sumArgs = array()) - { - $returnValue = 0; - - $aArgs = PHPExcel_Calculation_Functions::flattenArray($aArgs); - $sumArgs = PHPExcel_Calculation_Functions::flattenArray($sumArgs); - if (empty($sumArgs)) { - $sumArgs = $aArgs; - } - $condition = PHPExcel_Calculation_Functions::ifCondition($condition); - // Loop through arguments - foreach ($aArgs as $key => $arg) { - if (!is_numeric($arg)) { - $arg = str_replace('"', '""', $arg); - $arg = PHPExcel_Calculation::wrapResult(strtoupper($arg)); - } - - $testCondition = '='.$arg.$condition; - if (PHPExcel_Calculation::getInstance()->_calculateFormulaValue($testCondition)) { - // Is it a value within our criteria - $returnValue += $sumArgs[$key]; - } - } - - return $returnValue; - } - - - /** - * SUMIFS - * - * Counts the number of cells that contain numbers within the list of arguments - * - * Excel Function: - * SUMIFS(value1[,value2[, ...]],condition) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be summed. - * @return float - */ - public static function SUMIFS() { - $arrayList = func_get_args(); - - $sumArgs = PHPExcel_Calculation_Functions::flattenArray(array_shift($arrayList)); - - while (count($arrayList) > 0) { - $aArgsArray[] = PHPExcel_Calculation_Functions::flattenArray(array_shift($arrayList)); - $conditions[] = PHPExcel_Calculation_Functions::ifCondition(array_shift($arrayList)); - } - - // Loop through each set of arguments and conditions - foreach ($conditions as $index => $condition) { - $aArgs = $aArgsArray[$index]; - $wildcard = false; - if ((strpos($condition, '*') !== false) || (strpos($condition, '?') !== false)) { - // * and ? are wildcard characters. - // Use ~* and ~? for literal star and question mark - // Code logic doesn't yet handle escaping - $condition = trim(ltrim($condition, '=<>'), '"'); - $wildcard = true; - } - // Loop through arguments - foreach ($aArgs as $key => $arg) { - if ($wildcard) { - if (!fnmatch($condition, $arg, FNM_CASEFOLD)) { - // Is it a value within our criteria - $sumArgs[$key] = 0.0; - } - } else { - if (!is_numeric($arg)) { - $arg = PHPExcel_Calculation::wrapResult(strtoupper($arg)); - } - $testCondition = '='.$arg.$condition; - if (!PHPExcel_Calculation::getInstance()->_calculateFormulaValue($testCondition)) { - // Is it a value within our criteria - $sumArgs[$key] = 0.0; - } - } - } - } - - // Return - return array_sum($sumArgs); - } - - - /** - * SUMPRODUCT - * - * Excel Function: - * SUMPRODUCT(value1[,value2[, ...]]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function SUMPRODUCT() - { - $arrayList = func_get_args(); - - $wrkArray = PHPExcel_Calculation_Functions::flattenArray(array_shift($arrayList)); - $wrkCellCount = count($wrkArray); - - for ($i=0; $i< $wrkCellCount; ++$i) { - if ((!is_numeric($wrkArray[$i])) || (is_string($wrkArray[$i]))) { - $wrkArray[$i] = 0; - } - } - - foreach ($arrayList as $matrixData) { - $array2 = PHPExcel_Calculation_Functions::flattenArray($matrixData); - $count = count($array2); - if ($wrkCellCount != $count) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - foreach ($array2 as $i => $val) { - if ((!is_numeric($val)) || (is_string($val))) { - $val = 0; - } - $wrkArray[$i] *= $val; - } - } - - return array_sum($wrkArray); - } - - - /** - * SUMSQ - * - * SUMSQ returns the sum of the squares of the arguments - * - * Excel Function: - * SUMSQ(value1[,value2[, ...]]) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function SUMSQ() - { - $returnValue = 0; - - // Loop through arguments - foreach (PHPExcel_Calculation_Functions::flattenArray(func_get_args()) as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $returnValue += ($arg * $arg); - } - } - - return $returnValue; - } - - - /** - * SUMX2MY2 - * - * @param mixed[] $matrixData1 Matrix #1 - * @param mixed[] $matrixData2 Matrix #2 - * @return float - */ - public static function SUMX2MY2($matrixData1, $matrixData2) - { - $array1 = PHPExcel_Calculation_Functions::flattenArray($matrixData1); - $array2 = PHPExcel_Calculation_Functions::flattenArray($matrixData2); - $count = min(count($array1), count($array2)); - - $result = 0; - for ($i = 0; $i < $count; ++$i) { - if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && - ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { - $result += ($array1[$i] * $array1[$i]) - ($array2[$i] * $array2[$i]); - } - } - - return $result; - } - - - /** - * SUMX2PY2 - * - * @param mixed[] $matrixData1 Matrix #1 - * @param mixed[] $matrixData2 Matrix #2 - * @return float - */ - public static function SUMX2PY2($matrixData1, $matrixData2) - { - $array1 = PHPExcel_Calculation_Functions::flattenArray($matrixData1); - $array2 = PHPExcel_Calculation_Functions::flattenArray($matrixData2); - $count = min(count($array1), count($array2)); - - $result = 0; - for ($i = 0; $i < $count; ++$i) { - if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && - ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { - $result += ($array1[$i] * $array1[$i]) + ($array2[$i] * $array2[$i]); - } - } - - return $result; - } - - - /** - * SUMXMY2 - * - * @param mixed[] $matrixData1 Matrix #1 - * @param mixed[] $matrixData2 Matrix #2 - * @return float - */ - public static function SUMXMY2($matrixData1, $matrixData2) - { - $array1 = PHPExcel_Calculation_Functions::flattenArray($matrixData1); - $array2 = PHPExcel_Calculation_Functions::flattenArray($matrixData2); - $count = min(count($array1), count($array2)); - - $result = 0; - for ($i = 0; $i < $count; ++$i) { - if (((is_numeric($array1[$i])) && (!is_string($array1[$i]))) && - ((is_numeric($array2[$i])) && (!is_string($array2[$i])))) { - $result += ($array1[$i] - $array2[$i]) * ($array1[$i] - $array2[$i]); - } - } - - return $result; - } - - - /** - * TRUNC - * - * Truncates value to the number of fractional digits by number_digits. - * - * @param float $value - * @param int $digits - * @return float Truncated value - */ - public static function TRUNC($value = 0, $digits = 0) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $digits = PHPExcel_Calculation_Functions::flattenSingleValue($digits); - - // Validate parameters - if ((!is_numeric($value)) || (!is_numeric($digits))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $digits = floor($digits); - - // Truncate - $adjust = pow(10, $digits); - - if (($digits > 0) && (rtrim(intval((abs($value) - abs(intval($value))) * $adjust), '0') < $adjust/10)) { - return $value; - } - - return (intval($value * $adjust)) / $adjust; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php deleted file mode 100644 index 1a33610..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Statistical.php +++ /dev/null @@ -1,3745 +0,0 @@ - $value) { - if ((is_bool($value)) || (is_string($value)) || (is_null($value))) { - unset($array1[$key]); - unset($array2[$key]); - } - } - foreach ($array2 as $key => $value) { - if ((is_bool($value)) || (is_string($value)) || (is_null($value))) { - unset($array1[$key]); - unset($array2[$key]); - } - } - $array1 = array_merge($array1); - $array2 = array_merge($array2); - - return true; - } - - - /** - * Beta function. - * - * @author Jaco van Kooten - * - * @param p require p>0 - * @param q require q>0 - * @return 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow - */ - private static function beta($p, $q) - { - if ($p <= 0.0 || $q <= 0.0 || ($p + $q) > LOG_GAMMA_X_MAX_VALUE) { - return 0.0; - } else { - return exp(self::logBeta($p, $q)); - } - } - - - /** - * Incomplete beta function - * - * @author Jaco van Kooten - * @author Paul Meagher - * - * The computation is based on formulas from Numerical Recipes, Chapter 6.4 (W.H. Press et al, 1992). - * @param x require 0<=x<=1 - * @param p require p>0 - * @param q require q>0 - * @return 0 if x<0, p<=0, q<=0 or p+q>2.55E305 and 1 if x>1 to avoid errors and over/underflow - */ - private static function incompleteBeta($x, $p, $q) - { - if ($x <= 0.0) { - return 0.0; - } elseif ($x >= 1.0) { - return 1.0; - } elseif (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > LOG_GAMMA_X_MAX_VALUE)) { - return 0.0; - } - $beta_gam = exp((0 - self::logBeta($p, $q)) + $p * log($x) + $q * log(1.0 - $x)); - if ($x < ($p + 1.0) / ($p + $q + 2.0)) { - return $beta_gam * self::betaFraction($x, $p, $q) / $p; - } else { - return 1.0 - ($beta_gam * self::betaFraction(1 - $x, $q, $p) / $q); - } - } - - - // Function cache for logBeta function - private static $logBetaCacheP = 0.0; - private static $logBetaCacheQ = 0.0; - private static $logBetaCacheResult = 0.0; - - /** - * The natural logarithm of the beta function. - * - * @param p require p>0 - * @param q require q>0 - * @return 0 if p<=0, q<=0 or p+q>2.55E305 to avoid errors and over/underflow - * @author Jaco van Kooten - */ - private static function logBeta($p, $q) - { - if ($p != self::$logBetaCacheP || $q != self::$logBetaCacheQ) { - self::$logBetaCacheP = $p; - self::$logBetaCacheQ = $q; - if (($p <= 0.0) || ($q <= 0.0) || (($p + $q) > LOG_GAMMA_X_MAX_VALUE)) { - self::$logBetaCacheResult = 0.0; - } else { - self::$logBetaCacheResult = self::logGamma($p) + self::logGamma($q) - self::logGamma($p + $q); - } - } - return self::$logBetaCacheResult; - } - - - /** - * Evaluates of continued fraction part of incomplete beta function. - * Based on an idea from Numerical Recipes (W.H. Press et al, 1992). - * @author Jaco van Kooten - */ - private static function betaFraction($x, $p, $q) - { - $c = 1.0; - $sum_pq = $p + $q; - $p_plus = $p + 1.0; - $p_minus = $p - 1.0; - $h = 1.0 - $sum_pq * $x / $p_plus; - if (abs($h) < XMININ) { - $h = XMININ; - } - $h = 1.0 / $h; - $frac = $h; - $m = 1; - $delta = 0.0; - while ($m <= MAX_ITERATIONS && abs($delta-1.0) > PRECISION) { - $m2 = 2 * $m; - // even index for d - $d = $m * ($q - $m) * $x / ( ($p_minus + $m2) * ($p + $m2)); - $h = 1.0 + $d * $h; - if (abs($h) < XMININ) { - $h = XMININ; - } - $h = 1.0 / $h; - $c = 1.0 + $d / $c; - if (abs($c) < XMININ) { - $c = XMININ; - } - $frac *= $h * $c; - // odd index for d - $d = -($p + $m) * ($sum_pq + $m) * $x / (($p + $m2) * ($p_plus + $m2)); - $h = 1.0 + $d * $h; - if (abs($h) < XMININ) { - $h = XMININ; - } - $h = 1.0 / $h; - $c = 1.0 + $d / $c; - if (abs($c) < XMININ) { - $c = XMININ; - } - $delta = $h * $c; - $frac *= $delta; - ++$m; - } - return $frac; - } - - - /** - * logGamma function - * - * @version 1.1 - * @author Jaco van Kooten - * - * Original author was Jaco van Kooten. Ported to PHP by Paul Meagher. - * - * The natural logarithm of the gamma function.
    - * Based on public domain NETLIB (Fortran) code by W. J. Cody and L. Stoltz
    - * Applied Mathematics Division
    - * Argonne National Laboratory
    - * Argonne, IL 60439
    - *

    - * References: - *

      - *
    1. W. J. Cody and K. E. Hillstrom, 'Chebyshev Approximations for the Natural - * Logarithm of the Gamma Function,' Math. Comp. 21, 1967, pp. 198-203.
    2. - *
    3. K. E. Hillstrom, ANL/AMD Program ANLC366S, DGAMMA/DLGAMA, May, 1969.
    4. - *
    5. Hart, Et. Al., Computer Approximations, Wiley and sons, New York, 1968.
    6. - *
    - *

    - *

    - * From the original documentation: - *

    - *

    - * This routine calculates the LOG(GAMMA) function for a positive real argument X. - * Computation is based on an algorithm outlined in references 1 and 2. - * The program uses rational functions that theoretically approximate LOG(GAMMA) - * to at least 18 significant decimal digits. The approximation for X > 12 is from - * reference 3, while approximations for X < 12.0 are similar to those in reference - * 1, but are unpublished. The accuracy achieved depends on the arithmetic system, - * the compiler, the intrinsic functions, and proper selection of the - * machine-dependent constants. - *

    - *

    - * Error returns:
    - * The program returns the value XINF for X .LE. 0.0 or when overflow would occur. - * The computation is believed to be free of underflow and overflow. - *

    - * @return MAX_VALUE for x < 0.0 or when overflow would occur, i.e. x > 2.55E305 - */ - - // Function cache for logGamma - private static $logGammaCacheResult = 0.0; - private static $logGammaCacheX = 0.0; - - private static function logGamma($x) - { - // Log Gamma related constants - static $lg_d1 = -0.5772156649015328605195174; - static $lg_d2 = 0.4227843350984671393993777; - static $lg_d4 = 1.791759469228055000094023; - - static $lg_p1 = array( - 4.945235359296727046734888, - 201.8112620856775083915565, - 2290.838373831346393026739, - 11319.67205903380828685045, - 28557.24635671635335736389, - 38484.96228443793359990269, - 26377.48787624195437963534, - 7225.813979700288197698961 - ); - static $lg_p2 = array( - 4.974607845568932035012064, - 542.4138599891070494101986, - 15506.93864978364947665077, - 184793.2904445632425417223, - 1088204.76946882876749847, - 3338152.967987029735917223, - 5106661.678927352456275255, - 3074109.054850539556250927 - ); - static $lg_p4 = array( - 14745.02166059939948905062, - 2426813.369486704502836312, - 121475557.4045093227939592, - 2663432449.630976949898078, - 29403789566.34553899906876, - 170266573776.5398868392998, - 492612579337.743088758812, - 560625185622.3951465078242 - ); - static $lg_q1 = array( - 67.48212550303777196073036, - 1113.332393857199323513008, - 7738.757056935398733233834, - 27639.87074403340708898585, - 54993.10206226157329794414, - 61611.22180066002127833352, - 36351.27591501940507276287, - 8785.536302431013170870835 - ); - static $lg_q2 = array( - 183.0328399370592604055942, - 7765.049321445005871323047, - 133190.3827966074194402448, - 1136705.821321969608938755, - 5267964.117437946917577538, - 13467014.54311101692290052, - 17827365.30353274213975932, - 9533095.591844353613395747 - ); - static $lg_q4 = array( - 2690.530175870899333379843, - 639388.5654300092398984238, - 41355999.30241388052042842, - 1120872109.61614794137657, - 14886137286.78813811542398, - 101680358627.2438228077304, - 341747634550.7377132798597, - 446315818741.9713286462081 - ); - static $lg_c = array( - -0.001910444077728, - 8.4171387781295e-4, - -5.952379913043012e-4, - 7.93650793500350248e-4, - -0.002777777777777681622553, - 0.08333333333333333331554247, - 0.0057083835261 - ); - - // Rough estimate of the fourth root of logGamma_xBig - static $lg_frtbig = 2.25e76; - static $pnt68 = 0.6796875; - - - if ($x == self::$logGammaCacheX) { - return self::$logGammaCacheResult; - } - $y = $x; - if ($y > 0.0 && $y <= LOG_GAMMA_X_MAX_VALUE) { - if ($y <= EPS) { - $res = -log(y); - } elseif ($y <= 1.5) { - // --------------------- - // EPS .LT. X .LE. 1.5 - // --------------------- - if ($y < $pnt68) { - $corr = -log($y); - $xm1 = $y; - } else { - $corr = 0.0; - $xm1 = $y - 1.0; - } - if ($y <= 0.5 || $y >= $pnt68) { - $xden = 1.0; - $xnum = 0.0; - for ($i = 0; $i < 8; ++$i) { - $xnum = $xnum * $xm1 + $lg_p1[$i]; - $xden = $xden * $xm1 + $lg_q1[$i]; - } - $res = $corr + $xm1 * ($lg_d1 + $xm1 * ($xnum / $xden)); - } else { - $xm2 = $y - 1.0; - $xden = 1.0; - $xnum = 0.0; - for ($i = 0; $i < 8; ++$i) { - $xnum = $xnum * $xm2 + $lg_p2[$i]; - $xden = $xden * $xm2 + $lg_q2[$i]; - } - $res = $corr + $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden)); - } - } elseif ($y <= 4.0) { - // --------------------- - // 1.5 .LT. X .LE. 4.0 - // --------------------- - $xm2 = $y - 2.0; - $xden = 1.0; - $xnum = 0.0; - for ($i = 0; $i < 8; ++$i) { - $xnum = $xnum * $xm2 + $lg_p2[$i]; - $xden = $xden * $xm2 + $lg_q2[$i]; - } - $res = $xm2 * ($lg_d2 + $xm2 * ($xnum / $xden)); - } elseif ($y <= 12.0) { - // ---------------------- - // 4.0 .LT. X .LE. 12.0 - // ---------------------- - $xm4 = $y - 4.0; - $xden = -1.0; - $xnum = 0.0; - for ($i = 0; $i < 8; ++$i) { - $xnum = $xnum * $xm4 + $lg_p4[$i]; - $xden = $xden * $xm4 + $lg_q4[$i]; - } - $res = $lg_d4 + $xm4 * ($xnum / $xden); - } else { - // --------------------------------- - // Evaluate for argument .GE. 12.0 - // --------------------------------- - $res = 0.0; - if ($y <= $lg_frtbig) { - $res = $lg_c[6]; - $ysq = $y * $y; - for ($i = 0; $i < 6; ++$i) { - $res = $res / $ysq + $lg_c[$i]; - } - $res /= $y; - $corr = log($y); - $res = $res + log(SQRT2PI) - 0.5 * $corr; - $res += $y * ($corr - 1.0); - } - } - } else { - // -------------------------- - // Return for bad arguments - // -------------------------- - $res = MAX_VALUE; - } - // ------------------------------ - // Final adjustments and return - // ------------------------------ - self::$logGammaCacheX = $x; - self::$logGammaCacheResult = $res; - return $res; - } - - - // - // Private implementation of the incomplete Gamma function - // - private static function incompleteGamma($a, $x) - { - static $max = 32; - $summer = 0; - for ($n=0; $n<=$max; ++$n) { - $divisor = $a; - for ($i=1; $i<=$n; ++$i) { - $divisor *= ($a + $i); - } - $summer += (pow($x, $n) / $divisor); - } - return pow($x, $a) * exp(0-$x) * $summer; - } - - - // - // Private implementation of the Gamma function - // - private static function gamma($data) - { - if ($data == 0.0) { - return 0; - } - - static $p0 = 1.000000000190015; - static $p = array( - 1 => 76.18009172947146, - 2 => -86.50532032941677, - 3 => 24.01409824083091, - 4 => -1.231739572450155, - 5 => 1.208650973866179e-3, - 6 => -5.395239384953e-6 - ); - - $y = $x = $data; - $tmp = $x + 5.5; - $tmp -= ($x + 0.5) * log($tmp); - - $summer = $p0; - for ($j=1; $j<=6; ++$j) { - $summer += ($p[$j] / ++$y); - } - return exp(0 - $tmp + log(SQRT2PI * $summer / $x)); - } - - - /*************************************************************************** - * inverse_ncdf.php - * ------------------- - * begin : Friday, January 16, 2004 - * copyright : (C) 2004 Michael Nickerson - * email : nickersonm@yahoo.com - * - ***************************************************************************/ - private static function inverseNcdf($p) - { - // Inverse ncdf approximation by Peter J. Acklam, implementation adapted to - // PHP by Michael Nickerson, using Dr. Thomas Ziegler's C implementation as - // a guide. http://home.online.no/~pjacklam/notes/invnorm/index.html - // I have not checked the accuracy of this implementation. Be aware that PHP - // will truncate the coeficcients to 14 digits. - - // You have permission to use and distribute this function freely for - // whatever purpose you want, but please show common courtesy and give credit - // where credit is due. - - // Input paramater is $p - probability - where 0 < p < 1. - - // Coefficients in rational approximations - static $a = array( - 1 => -3.969683028665376e+01, - 2 => 2.209460984245205e+02, - 3 => -2.759285104469687e+02, - 4 => 1.383577518672690e+02, - 5 => -3.066479806614716e+01, - 6 => 2.506628277459239e+00 - ); - - static $b = array( - 1 => -5.447609879822406e+01, - 2 => 1.615858368580409e+02, - 3 => -1.556989798598866e+02, - 4 => 6.680131188771972e+01, - 5 => -1.328068155288572e+01 - ); - - static $c = array( - 1 => -7.784894002430293e-03, - 2 => -3.223964580411365e-01, - 3 => -2.400758277161838e+00, - 4 => -2.549732539343734e+00, - 5 => 4.374664141464968e+00, - 6 => 2.938163982698783e+00 - ); - - static $d = array( - 1 => 7.784695709041462e-03, - 2 => 3.224671290700398e-01, - 3 => 2.445134137142996e+00, - 4 => 3.754408661907416e+00 - ); - - // Define lower and upper region break-points. - $p_low = 0.02425; //Use lower region approx. below this - $p_high = 1 - $p_low; //Use upper region approx. above this - - if (0 < $p && $p < $p_low) { - // Rational approximation for lower region. - $q = sqrt(-2 * log($p)); - return ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) / - (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1); - } elseif ($p_low <= $p && $p <= $p_high) { - // Rational approximation for central region. - $q = $p - 0.5; - $r = $q * $q; - return ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) * $r + $a[6]) * $q / - ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r + $b[4]) * $r + $b[5]) * $r + 1); - } elseif ($p_high < $p && $p < 1) { - // Rational approximation for upper region. - $q = sqrt(-2 * log(1 - $p)); - return -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) * $q + $c[6]) / - (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) * $q + 1); - } - // If 0 < p < 1, return a null value - return PHPExcel_Calculation_Functions::NULL(); - } - - - private static function inverseNcdf2($prob) - { - // Approximation of inverse standard normal CDF developed by - // B. Moro, "The Full Monte," Risk 8(2), Feb 1995, 57-58. - - $a1 = 2.50662823884; - $a2 = -18.61500062529; - $a3 = 41.39119773534; - $a4 = -25.44106049637; - - $b1 = -8.4735109309; - $b2 = 23.08336743743; - $b3 = -21.06224101826; - $b4 = 3.13082909833; - - $c1 = 0.337475482272615; - $c2 = 0.976169019091719; - $c3 = 0.160797971491821; - $c4 = 2.76438810333863E-02; - $c5 = 3.8405729373609E-03; - $c6 = 3.951896511919E-04; - $c7 = 3.21767881768E-05; - $c8 = 2.888167364E-07; - $c9 = 3.960315187E-07; - - $y = $prob - 0.5; - if (abs($y) < 0.42) { - $z = ($y * $y); - $z = $y * ((($a4 * $z + $a3) * $z + $a2) * $z + $a1) / (((($b4 * $z + $b3) * $z + $b2) * $z + $b1) * $z + 1); - } else { - if ($y > 0) { - $z = log(-log(1 - $prob)); - } else { - $z = log(-log($prob)); - } - $z = $c1 + $z * ($c2 + $z * ($c3 + $z * ($c4 + $z * ($c5 + $z * ($c6 + $z * ($c7 + $z * ($c8 + $z * $c9))))))); - if ($y < 0) { - $z = -$z; - } - } - return $z; - } // function inverseNcdf2() - - - private static function inverseNcdf3($p) - { - // ALGORITHM AS241 APPL. STATIST. (1988) VOL. 37, NO. 3. - // Produces the normal deviate Z corresponding to a given lower - // tail area of P; Z is accurate to about 1 part in 10**16. - // - // This is a PHP version of the original FORTRAN code that can - // be found at http://lib.stat.cmu.edu/apstat/ - $split1 = 0.425; - $split2 = 5; - $const1 = 0.180625; - $const2 = 1.6; - - // coefficients for p close to 0.5 - $a0 = 3.3871328727963666080; - $a1 = 1.3314166789178437745E+2; - $a2 = 1.9715909503065514427E+3; - $a3 = 1.3731693765509461125E+4; - $a4 = 4.5921953931549871457E+4; - $a5 = 6.7265770927008700853E+4; - $a6 = 3.3430575583588128105E+4; - $a7 = 2.5090809287301226727E+3; - - $b1 = 4.2313330701600911252E+1; - $b2 = 6.8718700749205790830E+2; - $b3 = 5.3941960214247511077E+3; - $b4 = 2.1213794301586595867E+4; - $b5 = 3.9307895800092710610E+4; - $b6 = 2.8729085735721942674E+4; - $b7 = 5.2264952788528545610E+3; - - // coefficients for p not close to 0, 0.5 or 1. - $c0 = 1.42343711074968357734; - $c1 = 4.63033784615654529590; - $c2 = 5.76949722146069140550; - $c3 = 3.64784832476320460504; - $c4 = 1.27045825245236838258; - $c5 = 2.41780725177450611770E-1; - $c6 = 2.27238449892691845833E-2; - $c7 = 7.74545014278341407640E-4; - - $d1 = 2.05319162663775882187; - $d2 = 1.67638483018380384940; - $d3 = 6.89767334985100004550E-1; - $d4 = 1.48103976427480074590E-1; - $d5 = 1.51986665636164571966E-2; - $d6 = 5.47593808499534494600E-4; - $d7 = 1.05075007164441684324E-9; - - // coefficients for p near 0 or 1. - $e0 = 6.65790464350110377720; - $e1 = 5.46378491116411436990; - $e2 = 1.78482653991729133580; - $e3 = 2.96560571828504891230E-1; - $e4 = 2.65321895265761230930E-2; - $e5 = 1.24266094738807843860E-3; - $e6 = 2.71155556874348757815E-5; - $e7 = 2.01033439929228813265E-7; - - $f1 = 5.99832206555887937690E-1; - $f2 = 1.36929880922735805310E-1; - $f3 = 1.48753612908506148525E-2; - $f4 = 7.86869131145613259100E-4; - $f5 = 1.84631831751005468180E-5; - $f6 = 1.42151175831644588870E-7; - $f7 = 2.04426310338993978564E-15; - - $q = $p - 0.5; - - // computation for p close to 0.5 - if (abs($q) <= split1) { - $R = $const1 - $q * $q; - $z = $q * ((((((($a7 * $R + $a6) * $R + $a5) * $R + $a4) * $R + $a3) * $R + $a2) * $R + $a1) * $R + $a0) / - ((((((($b7 * $R + $b6) * $R + $b5) * $R + $b4) * $R + $b3) * $R + $b2) * $R + $b1) * $R + 1); - } else { - if ($q < 0) { - $R = $p; - } else { - $R = 1 - $p; - } - $R = pow(-log($R), 2); - - // computation for p not close to 0, 0.5 or 1. - if ($R <= $split2) { - $R = $R - $const2; - $z = ((((((($c7 * $R + $c6) * $R + $c5) * $R + $c4) * $R + $c3) * $R + $c2) * $R + $c1) * $R + $c0) / - ((((((($d7 * $R + $d6) * $R + $d5) * $R + $d4) * $R + $d3) * $R + $d2) * $R + $d1) * $R + 1); - } else { - // computation for p near 0 or 1. - $R = $R - $split2; - $z = ((((((($e7 * $R + $e6) * $R + $e5) * $R + $e4) * $R + $e3) * $R + $e2) * $R + $e1) * $R + $e0) / - ((((((($f7 * $R + $f6) * $R + $f5) * $R + $f4) * $R + $f3) * $R + $f2) * $R + $f1) * $R + 1); - } - if ($q < 0) { - $z = -$z; - } - } - return $z; - } - - - /** - * AVEDEV - * - * Returns the average of the absolute deviations of data points from their mean. - * AVEDEV is a measure of the variability in a data set. - * - * Excel Function: - * AVEDEV(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function AVEDEV() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - - // Return value - $returnValue = null; - - $aMean = self::AVERAGE($aArgs); - if ($aMean != PHPExcel_Calculation_Functions::DIV0()) { - $aCount = 0; - foreach ($aArgs as $k => $arg) { - if ((is_bool($arg)) && - ((!PHPExcel_Calculation_Functions::isCellValue($k)) || (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE))) { - $arg = (integer) $arg; - } - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if (is_null($returnValue)) { - $returnValue = abs($arg - $aMean); - } else { - $returnValue += abs($arg - $aMean); - } - ++$aCount; - } - } - - // Return - if ($aCount == 0) { - return PHPExcel_Calculation_Functions::DIV0(); - } - return $returnValue / $aCount; - } - return PHPExcel_Calculation_Functions::NaN(); - } - - - /** - * AVERAGE - * - * Returns the average (arithmetic mean) of the arguments - * - * Excel Function: - * AVERAGE(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function AVERAGE() - { - $returnValue = $aCount = 0; - - // Loop through arguments - foreach (PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()) as $k => $arg) { - if ((is_bool($arg)) && - ((!PHPExcel_Calculation_Functions::isCellValue($k)) || (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE))) { - $arg = (integer) $arg; - } - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if (is_null($returnValue)) { - $returnValue = $arg; - } else { - $returnValue += $arg; - } - ++$aCount; - } - } - - // Return - if ($aCount > 0) { - return $returnValue / $aCount; - } else { - return PHPExcel_Calculation_Functions::DIV0(); - } - } - - - /** - * AVERAGEA - * - * Returns the average of its arguments, including numbers, text, and logical values - * - * Excel Function: - * AVERAGEA(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function AVERAGEA() - { - $returnValue = null; - - $aCount = 0; - // Loop through arguments - foreach (PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()) as $k => $arg) { - if ((is_bool($arg)) && - (!PHPExcel_Calculation_Functions::isMatrixValue($k))) { - } else { - if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } elseif (is_string($arg)) { - $arg = 0; - } - if (is_null($returnValue)) { - $returnValue = $arg; - } else { - $returnValue += $arg; - } - ++$aCount; - } - } - } - - if ($aCount > 0) { - return $returnValue / $aCount; - } else { - return PHPExcel_Calculation_Functions::DIV0(); - } - } - - - /** - * AVERAGEIF - * - * Returns the average value from a range of cells that contain numbers within the list of arguments - * - * Excel Function: - * AVERAGEIF(value1[,value2[, ...]],condition) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be checked. - * @param mixed[] $averageArgs Data values - * @return float - */ - public static function AVERAGEIF($aArgs, $condition, $averageArgs = array()) - { - $returnValue = 0; - - $aArgs = PHPExcel_Calculation_Functions::flattenArray($aArgs); - $averageArgs = PHPExcel_Calculation_Functions::flattenArray($averageArgs); - if (empty($averageArgs)) { - $averageArgs = $aArgs; - } - $condition = PHPExcel_Calculation_Functions::ifCondition($condition); - // Loop through arguments - $aCount = 0; - foreach ($aArgs as $key => $arg) { - if (!is_numeric($arg)) { - $arg = PHPExcel_Calculation::wrapResult(strtoupper($arg)); - } - $testCondition = '='.$arg.$condition; - if (PHPExcel_Calculation::getInstance()->_calculateFormulaValue($testCondition)) { - if ((is_null($returnValue)) || ($arg > $returnValue)) { - $returnValue += $arg; - ++$aCount; - } - } - } - - if ($aCount > 0) { - return $returnValue / $aCount; - } - return PHPExcel_Calculation_Functions::DIV0(); - } - - - /** - * BETADIST - * - * Returns the beta distribution. - * - * @param float $value Value at which you want to evaluate the distribution - * @param float $alpha Parameter to the distribution - * @param float $beta Parameter to the distribution - * @param boolean $cumulative - * @return float - * - */ - public static function BETADIST($value, $alpha, $beta, $rMin = 0, $rMax = 1) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $alpha = PHPExcel_Calculation_Functions::flattenSingleValue($alpha); - $beta = PHPExcel_Calculation_Functions::flattenSingleValue($beta); - $rMin = PHPExcel_Calculation_Functions::flattenSingleValue($rMin); - $rMax = PHPExcel_Calculation_Functions::flattenSingleValue($rMax); - - if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) { - if (($value < $rMin) || ($value > $rMax) || ($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($rMin > $rMax) { - $tmp = $rMin; - $rMin = $rMax; - $rMax = $tmp; - } - $value -= $rMin; - $value /= ($rMax - $rMin); - return self::incompleteBeta($value, $alpha, $beta); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * BETAINV - * - * Returns the inverse of the beta distribution. - * - * @param float $probability Probability at which you want to evaluate the distribution - * @param float $alpha Parameter to the distribution - * @param float $beta Parameter to the distribution - * @param float $rMin Minimum value - * @param float $rMax Maximum value - * @param boolean $cumulative - * @return float - * - */ - public static function BETAINV($probability, $alpha, $beta, $rMin = 0, $rMax = 1) - { - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - $alpha = PHPExcel_Calculation_Functions::flattenSingleValue($alpha); - $beta = PHPExcel_Calculation_Functions::flattenSingleValue($beta); - $rMin = PHPExcel_Calculation_Functions::flattenSingleValue($rMin); - $rMax = PHPExcel_Calculation_Functions::flattenSingleValue($rMax); - - if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta)) && (is_numeric($rMin)) && (is_numeric($rMax))) { - if (($alpha <= 0) || ($beta <= 0) || ($rMin == $rMax) || ($probability <= 0) || ($probability > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($rMin > $rMax) { - $tmp = $rMin; - $rMin = $rMax; - $rMax = $tmp; - } - $a = 0; - $b = 2; - - $i = 0; - while ((($b - $a) > PRECISION) && ($i++ < MAX_ITERATIONS)) { - $guess = ($a + $b) / 2; - $result = self::BETADIST($guess, $alpha, $beta); - if (($result == $probability) || ($result == 0)) { - $b = $a; - } elseif ($result > $probability) { - $b = $guess; - } else { - $a = $guess; - } - } - if ($i == MAX_ITERATIONS) { - return PHPExcel_Calculation_Functions::NA(); - } - return round($rMin + $guess * ($rMax - $rMin), 12); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * BINOMDIST - * - * Returns the individual term binomial distribution probability. Use BINOMDIST in problems with - * a fixed number of tests or trials, when the outcomes of any trial are only success or failure, - * when trials are independent, and when the probability of success is constant throughout the - * experiment. For example, BINOMDIST can calculate the probability that two of the next three - * babies born are male. - * - * @param float $value Number of successes in trials - * @param float $trials Number of trials - * @param float $probability Probability of success on each trial - * @param boolean $cumulative - * @return float - * - * @todo Cumulative distribution function - * - */ - public static function BINOMDIST($value, $trials, $probability, $cumulative) - { - $value = floor(PHPExcel_Calculation_Functions::flattenSingleValue($value)); - $trials = floor(PHPExcel_Calculation_Functions::flattenSingleValue($trials)); - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - - if ((is_numeric($value)) && (is_numeric($trials)) && (is_numeric($probability))) { - if (($value < 0) || ($value > $trials)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (($probability < 0) || ($probability > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ((is_numeric($cumulative)) || (is_bool($cumulative))) { - if ($cumulative) { - $summer = 0; - for ($i = 0; $i <= $value; ++$i) { - $summer += PHPExcel_Calculation_MathTrig::COMBIN($trials, $i) * pow($probability, $i) * pow(1 - $probability, $trials - $i); - } - return $summer; - } else { - return PHPExcel_Calculation_MathTrig::COMBIN($trials, $value) * pow($probability, $value) * pow(1 - $probability, $trials - $value) ; - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * CHIDIST - * - * Returns the one-tailed probability of the chi-squared distribution. - * - * @param float $value Value for the function - * @param float $degrees degrees of freedom - * @return float - */ - public static function CHIDIST($value, $degrees) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $degrees = floor(PHPExcel_Calculation_Functions::flattenSingleValue($degrees)); - - if ((is_numeric($value)) && (is_numeric($degrees))) { - if ($degrees < 1) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($value < 0) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - return 1; - } - return PHPExcel_Calculation_Functions::NaN(); - } - return 1 - (self::incompleteGamma($degrees/2, $value/2) / self::gamma($degrees/2)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * CHIINV - * - * Returns the one-tailed probability of the chi-squared distribution. - * - * @param float $probability Probability for the function - * @param float $degrees degrees of freedom - * @return float - */ - public static function CHIINV($probability, $degrees) - { - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - $degrees = floor(PHPExcel_Calculation_Functions::flattenSingleValue($degrees)); - - if ((is_numeric($probability)) && (is_numeric($degrees))) { - $xLo = 100; - $xHi = 0; - - $x = $xNew = 1; - $dx = 1; - $i = 0; - - while ((abs($dx) > PRECISION) && ($i++ < MAX_ITERATIONS)) { - // Apply Newton-Raphson step - $result = self::CHIDIST($x, $degrees); - $error = $result - $probability; - if ($error == 0.0) { - $dx = 0; - } elseif ($error < 0.0) { - $xLo = $x; - } else { - $xHi = $x; - } - // Avoid division by zero - if ($result != 0.0) { - $dx = $error / $result; - $xNew = $x - $dx; - } - // If the NR fails to converge (which for example may be the - // case if the initial guess is too rough) we apply a bisection - // step to determine a more narrow interval around the root. - if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) { - $xNew = ($xLo + $xHi) / 2; - $dx = $xNew - $x; - } - $x = $xNew; - } - if ($i == MAX_ITERATIONS) { - return PHPExcel_Calculation_Functions::NA(); - } - return round($x, 12); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * CONFIDENCE - * - * Returns the confidence interval for a population mean - * - * @param float $alpha - * @param float $stdDev Standard Deviation - * @param float $size - * @return float - * - */ - public static function CONFIDENCE($alpha, $stdDev, $size) - { - $alpha = PHPExcel_Calculation_Functions::flattenSingleValue($alpha); - $stdDev = PHPExcel_Calculation_Functions::flattenSingleValue($stdDev); - $size = floor(PHPExcel_Calculation_Functions::flattenSingleValue($size)); - - if ((is_numeric($alpha)) && (is_numeric($stdDev)) && (is_numeric($size))) { - if (($alpha <= 0) || ($alpha >= 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (($stdDev <= 0) || ($size < 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return self::NORMSINV(1 - $alpha / 2) * $stdDev / sqrt($size); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * CORREL - * - * Returns covariance, the average of the products of deviations for each data point pair. - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float - */ - public static function CORREL($yValues, $xValues = null) - { - if ((is_null($xValues)) || (!is_array($yValues)) || (!is_array($xValues))) { - return PHPExcel_Calculation_Functions::VALUE(); - } - if (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues); - return $bestFitLinear->getCorrelation(); - } - - - /** - * COUNT - * - * Counts the number of cells that contain numbers within the list of arguments - * - * Excel Function: - * COUNT(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return int - */ - public static function COUNT() - { - $returnValue = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - foreach ($aArgs as $k => $arg) { - if ((is_bool($arg)) && - ((!PHPExcel_Calculation_Functions::isCellValue($k)) || (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE))) { - $arg = (integer) $arg; - } - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - ++$returnValue; - } - } - - return $returnValue; - } - - - /** - * COUNTA - * - * Counts the number of cells that are not empty within the list of arguments - * - * Excel Function: - * COUNTA(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return int - */ - public static function COUNTA() - { - $returnValue = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - // Is it a numeric, boolean or string value? - if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { - ++$returnValue; - } - } - - return $returnValue; - } - - - /** - * COUNTBLANK - * - * Counts the number of empty cells within the list of arguments - * - * Excel Function: - * COUNTBLANK(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return int - */ - public static function COUNTBLANK() - { - $returnValue = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - // Is it a blank cell? - if ((is_null($arg)) || ((is_string($arg)) && ($arg == ''))) { - ++$returnValue; - } - } - - return $returnValue; - } - - - /** - * COUNTIF - * - * Counts the number of cells that contain numbers within the list of arguments - * - * Excel Function: - * COUNTIF(value1[,value2[, ...]],condition) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be counted. - * @return int - */ - public static function COUNTIF($aArgs, $condition) - { - $returnValue = 0; - - $aArgs = PHPExcel_Calculation_Functions::flattenArray($aArgs); - $condition = PHPExcel_Calculation_Functions::ifCondition($condition); - // Loop through arguments - foreach ($aArgs as $arg) { - if (!is_numeric($arg)) { - $arg = PHPExcel_Calculation::wrapResult(strtoupper($arg)); - } - $testCondition = '='.$arg.$condition; - if (PHPExcel_Calculation::getInstance()->_calculateFormulaValue($testCondition)) { - // Is it a value within our criteria - ++$returnValue; - } - } - - return $returnValue; - } - - - /** - * COVAR - * - * Returns covariance, the average of the products of deviations for each data point pair. - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float - */ - public static function COVAR($yValues, $xValues) - { - if (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues); - return $bestFitLinear->getCovariance(); - } - - - /** - * CRITBINOM - * - * Returns the smallest value for which the cumulative binomial distribution is greater - * than or equal to a criterion value - * - * See http://support.microsoft.com/kb/828117/ for details of the algorithm used - * - * @param float $trials number of Bernoulli trials - * @param float $probability probability of a success on each trial - * @param float $alpha criterion value - * @return int - * - * @todo Warning. This implementation differs from the algorithm detailed on the MS - * web site in that $CumPGuessMinus1 = $CumPGuess - 1 rather than $CumPGuess - $PGuess - * This eliminates a potential endless loop error, but may have an adverse affect on the - * accuracy of the function (although all my tests have so far returned correct results). - * - */ - public static function CRITBINOM($trials, $probability, $alpha) - { - $trials = floor(PHPExcel_Calculation_Functions::flattenSingleValue($trials)); - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - $alpha = PHPExcel_Calculation_Functions::flattenSingleValue($alpha); - - if ((is_numeric($trials)) && (is_numeric($probability)) && (is_numeric($alpha))) { - if ($trials < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (($probability < 0) || ($probability > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (($alpha < 0) || ($alpha > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif ($alpha <= 0.5) { - $t = sqrt(log(1 / ($alpha * $alpha))); - $trialsApprox = 0 - ($t + (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t)); - } else { - $t = sqrt(log(1 / pow(1 - $alpha, 2))); - $trialsApprox = $t - (2.515517 + 0.802853 * $t + 0.010328 * $t * $t) / (1 + 1.432788 * $t + 0.189269 * $t * $t + 0.001308 * $t * $t * $t); - } - $Guess = floor($trials * $probability + $trialsApprox * sqrt($trials * $probability * (1 - $probability))); - if ($Guess < 0) { - $Guess = 0; - } elseif ($Guess > $trials) { - $Guess = $trials; - } - - $TotalUnscaledProbability = $UnscaledPGuess = $UnscaledCumPGuess = 0.0; - $EssentiallyZero = 10e-12; - - $m = floor($trials * $probability); - ++$TotalUnscaledProbability; - if ($m == $Guess) { - ++$UnscaledPGuess; - } - if ($m <= $Guess) { - ++$UnscaledCumPGuess; - } - - $PreviousValue = 1; - $Done = false; - $k = $m + 1; - while ((!$Done) && ($k <= $trials)) { - $CurrentValue = $PreviousValue * ($trials - $k + 1) * $probability / ($k * (1 - $probability)); - $TotalUnscaledProbability += $CurrentValue; - if ($k == $Guess) { - $UnscaledPGuess += $CurrentValue; - } - if ($k <= $Guess) { - $UnscaledCumPGuess += $CurrentValue; - } - if ($CurrentValue <= $EssentiallyZero) { - $Done = true; - } - $PreviousValue = $CurrentValue; - ++$k; - } - - $PreviousValue = 1; - $Done = false; - $k = $m - 1; - while ((!$Done) && ($k >= 0)) { - $CurrentValue = $PreviousValue * $k + 1 * (1 - $probability) / (($trials - $k) * $probability); - $TotalUnscaledProbability += $CurrentValue; - if ($k == $Guess) { - $UnscaledPGuess += $CurrentValue; - } - if ($k <= $Guess) { - $UnscaledCumPGuess += $CurrentValue; - } - if ($CurrentValue <= $EssentiallyZero) { - $Done = true; - } - $PreviousValue = $CurrentValue; - --$k; - } - - $PGuess = $UnscaledPGuess / $TotalUnscaledProbability; - $CumPGuess = $UnscaledCumPGuess / $TotalUnscaledProbability; - -// $CumPGuessMinus1 = $CumPGuess - $PGuess; - $CumPGuessMinus1 = $CumPGuess - 1; - - while (true) { - if (($CumPGuessMinus1 < $alpha) && ($CumPGuess >= $alpha)) { - return $Guess; - } elseif (($CumPGuessMinus1 < $alpha) && ($CumPGuess < $alpha)) { - $PGuessPlus1 = $PGuess * ($trials - $Guess) * $probability / $Guess / (1 - $probability); - $CumPGuessMinus1 = $CumPGuess; - $CumPGuess = $CumPGuess + $PGuessPlus1; - $PGuess = $PGuessPlus1; - ++$Guess; - } elseif (($CumPGuessMinus1 >= $alpha) && ($CumPGuess >= $alpha)) { - $PGuessMinus1 = $PGuess * $Guess * (1 - $probability) / ($trials - $Guess + 1) / $probability; - $CumPGuess = $CumPGuessMinus1; - $CumPGuessMinus1 = $CumPGuessMinus1 - $PGuess; - $PGuess = $PGuessMinus1; - --$Guess; - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * DEVSQ - * - * Returns the sum of squares of deviations of data points from their sample mean. - * - * Excel Function: - * DEVSQ(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function DEVSQ() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - - // Return value - $returnValue = null; - - $aMean = self::AVERAGE($aArgs); - if ($aMean != PHPExcel_Calculation_Functions::DIV0()) { - $aCount = -1; - foreach ($aArgs as $k => $arg) { - // Is it a numeric value? - if ((is_bool($arg)) && - ((!PHPExcel_Calculation_Functions::isCellValue($k)) || - (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE))) { - $arg = (integer) $arg; - } - if ((is_numeric($arg)) && (!is_string($arg))) { - if (is_null($returnValue)) { - $returnValue = pow(($arg - $aMean), 2); - } else { - $returnValue += pow(($arg - $aMean), 2); - } - ++$aCount; - } - } - - // Return - if (is_null($returnValue)) { - return PHPExcel_Calculation_Functions::NaN(); - } else { - return $returnValue; - } - } - return self::NA(); - } - - - /** - * EXPONDIST - * - * Returns the exponential distribution. Use EXPONDIST to model the time between events, - * such as how long an automated bank teller takes to deliver cash. For example, you can - * use EXPONDIST to determine the probability that the process takes at most 1 minute. - * - * @param float $value Value of the function - * @param float $lambda The parameter value - * @param boolean $cumulative - * @return float - */ - public static function EXPONDIST($value, $lambda, $cumulative) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $lambda = PHPExcel_Calculation_Functions::flattenSingleValue($lambda); - $cumulative = PHPExcel_Calculation_Functions::flattenSingleValue($cumulative); - - if ((is_numeric($value)) && (is_numeric($lambda))) { - if (($value < 0) || ($lambda < 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ((is_numeric($cumulative)) || (is_bool($cumulative))) { - if ($cumulative) { - return 1 - exp(0-$value*$lambda); - } else { - return $lambda * exp(0-$value*$lambda); - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * FISHER - * - * Returns the Fisher transformation at x. This transformation produces a function that - * is normally distributed rather than skewed. Use this function to perform hypothesis - * testing on the correlation coefficient. - * - * @param float $value - * @return float - */ - public static function FISHER($value) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - - if (is_numeric($value)) { - if (($value <= -1) || ($value >= 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return 0.5 * log((1+$value)/(1-$value)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * FISHERINV - * - * Returns the inverse of the Fisher transformation. Use this transformation when - * analyzing correlations between ranges or arrays of data. If y = FISHER(x), then - * FISHERINV(y) = x. - * - * @param float $value - * @return float - */ - public static function FISHERINV($value) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - - if (is_numeric($value)) { - return (exp(2 * $value) - 1) / (exp(2 * $value) + 1); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * FORECAST - * - * Calculates, or predicts, a future value by using existing values. The predicted value is a y-value for a given x-value. - * - * @param float Value of X for which we want to find Y - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float - */ - public static function FORECAST($xValue, $yValues, $xValues) - { - $xValue = PHPExcel_Calculation_Functions::flattenSingleValue($xValue); - if (!is_numeric($xValue)) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues); - return $bestFitLinear->getValueOfYForX($xValue); - } - - - /** - * GAMMADIST - * - * Returns the gamma distribution. - * - * @param float $value Value at which you want to evaluate the distribution - * @param float $a Parameter to the distribution - * @param float $b Parameter to the distribution - * @param boolean $cumulative - * @return float - * - */ - public static function GAMMADIST($value, $a, $b, $cumulative) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $a = PHPExcel_Calculation_Functions::flattenSingleValue($a); - $b = PHPExcel_Calculation_Functions::flattenSingleValue($b); - - if ((is_numeric($value)) && (is_numeric($a)) && (is_numeric($b))) { - if (($value < 0) || ($a <= 0) || ($b <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ((is_numeric($cumulative)) || (is_bool($cumulative))) { - if ($cumulative) { - return self::incompleteGamma($a, $value / $b) / self::gamma($a); - } else { - return (1 / (pow($b, $a) * self::gamma($a))) * pow($value, $a-1) * exp(0-($value / $b)); - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * GAMMAINV - * - * Returns the inverse of the beta distribution. - * - * @param float $probability Probability at which you want to evaluate the distribution - * @param float $alpha Parameter to the distribution - * @param float $beta Parameter to the distribution - * @return float - * - */ - public static function GAMMAINV($probability, $alpha, $beta) - { - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - $alpha = PHPExcel_Calculation_Functions::flattenSingleValue($alpha); - $beta = PHPExcel_Calculation_Functions::flattenSingleValue($beta); - - if ((is_numeric($probability)) && (is_numeric($alpha)) && (is_numeric($beta))) { - if (($alpha <= 0) || ($beta <= 0) || ($probability < 0) || ($probability > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $xLo = 0; - $xHi = $alpha * $beta * 5; - - $x = $xNew = 1; - $error = $pdf = 0; - $dx = 1024; - $i = 0; - - while ((abs($dx) > PRECISION) && ($i++ < MAX_ITERATIONS)) { - // Apply Newton-Raphson step - $error = self::GAMMADIST($x, $alpha, $beta, true) - $probability; - if ($error < 0.0) { - $xLo = $x; - } else { - $xHi = $x; - } - $pdf = self::GAMMADIST($x, $alpha, $beta, false); - // Avoid division by zero - if ($pdf != 0.0) { - $dx = $error / $pdf; - $xNew = $x - $dx; - } - // If the NR fails to converge (which for example may be the - // case if the initial guess is too rough) we apply a bisection - // step to determine a more narrow interval around the root. - if (($xNew < $xLo) || ($xNew > $xHi) || ($pdf == 0.0)) { - $xNew = ($xLo + $xHi) / 2; - $dx = $xNew - $x; - } - $x = $xNew; - } - if ($i == MAX_ITERATIONS) { - return PHPExcel_Calculation_Functions::NA(); - } - return $x; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * GAMMALN - * - * Returns the natural logarithm of the gamma function. - * - * @param float $value - * @return float - */ - public static function GAMMALN($value) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - - if (is_numeric($value)) { - if ($value <= 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return log(self::gamma($value)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * GEOMEAN - * - * Returns the geometric mean of an array or range of positive data. For example, you - * can use GEOMEAN to calculate average growth rate given compound interest with - * variable rates. - * - * Excel Function: - * GEOMEAN(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function GEOMEAN() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - $aMean = PHPExcel_Calculation_MathTrig::PRODUCT($aArgs); - if (is_numeric($aMean) && ($aMean > 0)) { - $aCount = self::COUNT($aArgs) ; - if (self::MIN($aArgs) > 0) { - return pow($aMean, (1 / $aCount)); - } - } - return PHPExcel_Calculation_Functions::NaN(); - } - - - /** - * GROWTH - * - * Returns values along a predicted emponential trend - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param array of mixed Values of X for which we want to find Y - * @param boolean A logical value specifying whether to force the intersect to equal 0. - * @return array of float - */ - public static function GROWTH($yValues, $xValues = array(), $newValues = array(), $const = true) - { - $yValues = PHPExcel_Calculation_Functions::flattenArray($yValues); - $xValues = PHPExcel_Calculation_Functions::flattenArray($xValues); - $newValues = PHPExcel_Calculation_Functions::flattenArray($newValues); - $const = (is_null($const)) ? true : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($const); - - $bestFitExponential = trendClass::calculate(trendClass::TREND_EXPONENTIAL, $yValues, $xValues, $const); - if (empty($newValues)) { - $newValues = $bestFitExponential->getXValues(); - } - - $returnArray = array(); - foreach ($newValues as $xValue) { - $returnArray[0][] = $bestFitExponential->getValueOfYForX($xValue); - } - - return $returnArray; - } - - - /** - * HARMEAN - * - * Returns the harmonic mean of a data set. The harmonic mean is the reciprocal of the - * arithmetic mean of reciprocals. - * - * Excel Function: - * HARMEAN(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function HARMEAN() - { - // Return value - $returnValue = PHPExcel_Calculation_Functions::NA(); - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - if (self::MIN($aArgs) < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - $aCount = 0; - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if ($arg <= 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (is_null($returnValue)) { - $returnValue = (1 / $arg); - } else { - $returnValue += (1 / $arg); - } - ++$aCount; - } - } - - // Return - if ($aCount > 0) { - return 1 / ($returnValue / $aCount); - } else { - return $returnValue; - } - } - - - /** - * HYPGEOMDIST - * - * Returns the hypergeometric distribution. HYPGEOMDIST returns the probability of a given number of - * sample successes, given the sample size, population successes, and population size. - * - * @param float $sampleSuccesses Number of successes in the sample - * @param float $sampleNumber Size of the sample - * @param float $populationSuccesses Number of successes in the population - * @param float $populationNumber Population size - * @return float - * - */ - public static function HYPGEOMDIST($sampleSuccesses, $sampleNumber, $populationSuccesses, $populationNumber) - { - $sampleSuccesses = floor(PHPExcel_Calculation_Functions::flattenSingleValue($sampleSuccesses)); - $sampleNumber = floor(PHPExcel_Calculation_Functions::flattenSingleValue($sampleNumber)); - $populationSuccesses = floor(PHPExcel_Calculation_Functions::flattenSingleValue($populationSuccesses)); - $populationNumber = floor(PHPExcel_Calculation_Functions::flattenSingleValue($populationNumber)); - - if ((is_numeric($sampleSuccesses)) && (is_numeric($sampleNumber)) && (is_numeric($populationSuccesses)) && (is_numeric($populationNumber))) { - if (($sampleSuccesses < 0) || ($sampleSuccesses > $sampleNumber) || ($sampleSuccesses > $populationSuccesses)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (($sampleNumber <= 0) || ($sampleNumber > $populationNumber)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (($populationSuccesses <= 0) || ($populationSuccesses > $populationNumber)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return PHPExcel_Calculation_MathTrig::COMBIN($populationSuccesses, $sampleSuccesses) * - PHPExcel_Calculation_MathTrig::COMBIN($populationNumber - $populationSuccesses, $sampleNumber - $sampleSuccesses) / - PHPExcel_Calculation_MathTrig::COMBIN($populationNumber, $sampleNumber); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * INTERCEPT - * - * Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values. - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float - */ - public static function INTERCEPT($yValues, $xValues) - { - if (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues); - return $bestFitLinear->getIntersect(); - } - - - /** - * KURT - * - * Returns the kurtosis of a data set. Kurtosis characterizes the relative peakedness - * or flatness of a distribution compared with the normal distribution. Positive - * kurtosis indicates a relatively peaked distribution. Negative kurtosis indicates a - * relatively flat distribution. - * - * @param array Data Series - * @return float - */ - public static function KURT() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - $mean = self::AVERAGE($aArgs); - $stdDev = self::STDEV($aArgs); - - if ($stdDev > 0) { - $count = $summer = 0; - // Loop through arguments - foreach ($aArgs as $k => $arg) { - if ((is_bool($arg)) && - (!PHPExcel_Calculation_Functions::isMatrixValue($k))) { - } else { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $summer += pow((($arg - $mean) / $stdDev), 4); - ++$count; - } - } - } - - // Return - if ($count > 3) { - return $summer * ($count * ($count+1) / (($count-1) * ($count-2) * ($count-3))) - (3 * pow($count-1, 2) / (($count-2) * ($count-3))); - } - } - return PHPExcel_Calculation_Functions::DIV0(); - } - - - /** - * LARGE - * - * Returns the nth largest value in a data set. You can use this function to - * select a value based on its relative standing. - * - * Excel Function: - * LARGE(value1[,value2[, ...]],entry) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param int $entry Position (ordered from the largest) in the array or range of data to return - * @return float - * - */ - public static function LARGE() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - // Calculate - $entry = floor(array_pop($aArgs)); - - if ((is_numeric($entry)) && (!is_string($entry))) { - $mArgs = array(); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $mArgs[] = $arg; - } - } - $count = self::COUNT($mArgs); - $entry = floor(--$entry); - if (($entry < 0) || ($entry >= $count) || ($count == 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - rsort($mArgs); - return $mArgs[$entry]; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * LINEST - * - * Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, - * and then returns an array that describes the line. - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param boolean A logical value specifying whether to force the intersect to equal 0. - * @param boolean A logical value specifying whether to return additional regression statistics. - * @return array - */ - public static function LINEST($yValues, $xValues = null, $const = true, $stats = false) - { - $const = (is_null($const)) ? true : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($const); - $stats = (is_null($stats)) ? false : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($stats); - if (is_null($xValues)) { - $xValues = range(1, count(PHPExcel_Calculation_Functions::flattenArray($yValues))); - } - - if (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return 0; - } - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues, $const); - if ($stats) { - return array( - array( - $bestFitLinear->getSlope(), - $bestFitLinear->getSlopeSE(), - $bestFitLinear->getGoodnessOfFit(), - $bestFitLinear->getF(), - $bestFitLinear->getSSRegression(), - ), - array( - $bestFitLinear->getIntersect(), - $bestFitLinear->getIntersectSE(), - $bestFitLinear->getStdevOfResiduals(), - $bestFitLinear->getDFResiduals(), - $bestFitLinear->getSSResiduals() - ) - ); - } else { - return array( - $bestFitLinear->getSlope(), - $bestFitLinear->getIntersect() - ); - } - } - - - /** - * LOGEST - * - * Calculates an exponential curve that best fits the X and Y data series, - * and then returns an array that describes the line. - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param boolean A logical value specifying whether to force the intersect to equal 0. - * @param boolean A logical value specifying whether to return additional regression statistics. - * @return array - */ - public static function LOGEST($yValues, $xValues = null, $const = true, $stats = false) - { - $const = (is_null($const)) ? true : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($const); - $stats = (is_null($stats)) ? false : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($stats); - if (is_null($xValues)) { - $xValues = range(1, count(PHPExcel_Calculation_Functions::flattenArray($yValues))); - } - - if (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - foreach ($yValues as $value) { - if ($value <= 0.0) { - return PHPExcel_Calculation_Functions::NaN(); - } - } - - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return 1; - } - - $bestFitExponential = trendClass::calculate(trendClass::TREND_EXPONENTIAL, $yValues, $xValues, $const); - if ($stats) { - return array( - array( - $bestFitExponential->getSlope(), - $bestFitExponential->getSlopeSE(), - $bestFitExponential->getGoodnessOfFit(), - $bestFitExponential->getF(), - $bestFitExponential->getSSRegression(), - ), - array( - $bestFitExponential->getIntersect(), - $bestFitExponential->getIntersectSE(), - $bestFitExponential->getStdevOfResiduals(), - $bestFitExponential->getDFResiduals(), - $bestFitExponential->getSSResiduals() - ) - ); - } else { - return array( - $bestFitExponential->getSlope(), - $bestFitExponential->getIntersect() - ); - } - } - - - /** - * LOGINV - * - * Returns the inverse of the normal cumulative distribution - * - * @param float $probability - * @param float $mean - * @param float $stdDev - * @return float - * - * @todo Try implementing P J Acklam's refinement algorithm for greater - * accuracy if I can get my head round the mathematics - * (as described at) http://home.online.no/~pjacklam/notes/invnorm/ - */ - public static function LOGINV($probability, $mean, $stdDev) - { - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - $mean = PHPExcel_Calculation_Functions::flattenSingleValue($mean); - $stdDev = PHPExcel_Calculation_Functions::flattenSingleValue($stdDev); - - if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) { - if (($probability < 0) || ($probability > 1) || ($stdDev <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return exp($mean + $stdDev * self::NORMSINV($probability)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * LOGNORMDIST - * - * Returns the cumulative lognormal distribution of x, where ln(x) is normally distributed - * with parameters mean and standard_dev. - * - * @param float $value - * @param float $mean - * @param float $stdDev - * @return float - */ - public static function LOGNORMDIST($value, $mean, $stdDev) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $mean = PHPExcel_Calculation_Functions::flattenSingleValue($mean); - $stdDev = PHPExcel_Calculation_Functions::flattenSingleValue($stdDev); - - if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { - if (($value <= 0) || ($stdDev <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return self::NORMSDIST((log($value) - $mean) / $stdDev); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * MAX - * - * MAX returns the value of the element of the values passed that has the highest value, - * with negative numbers considered smaller than positive numbers. - * - * Excel Function: - * MAX(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function MAX() - { - $returnValue = null; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if ((is_null($returnValue)) || ($arg > $returnValue)) { - $returnValue = $arg; - } - } - } - - if (is_null($returnValue)) { - return 0; - } - return $returnValue; - } - - - /** - * MAXA - * - * Returns the greatest value in a list of arguments, including numbers, text, and logical values - * - * Excel Function: - * MAXA(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function MAXA() - { - $returnValue = null; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } elseif (is_string($arg)) { - $arg = 0; - } - if ((is_null($returnValue)) || ($arg > $returnValue)) { - $returnValue = $arg; - } - } - } - - if (is_null($returnValue)) { - return 0; - } - return $returnValue; - } - - - /** - * MAXIF - * - * Counts the maximum value within a range of cells that contain numbers within the list of arguments - * - * Excel Function: - * MAXIF(value1[,value2[, ...]],condition) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be checked. - * @return float - */ - public static function MAXIF($aArgs, $condition, $sumArgs = array()) - { - $returnValue = null; - - $aArgs = PHPExcel_Calculation_Functions::flattenArray($aArgs); - $sumArgs = PHPExcel_Calculation_Functions::flattenArray($sumArgs); - if (empty($sumArgs)) { - $sumArgs = $aArgs; - } - $condition = PHPExcel_Calculation_Functions::ifCondition($condition); - // Loop through arguments - foreach ($aArgs as $key => $arg) { - if (!is_numeric($arg)) { - $arg = PHPExcel_Calculation::wrapResult(strtoupper($arg)); - } - $testCondition = '='.$arg.$condition; - if (PHPExcel_Calculation::getInstance()->_calculateFormulaValue($testCondition)) { - if ((is_null($returnValue)) || ($arg > $returnValue)) { - $returnValue = $arg; - } - } - } - - return $returnValue; - } - - /** - * MEDIAN - * - * Returns the median of the given numbers. The median is the number in the middle of a set of numbers. - * - * Excel Function: - * MEDIAN(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function MEDIAN() - { - $returnValue = PHPExcel_Calculation_Functions::NaN(); - - $mArgs = array(); - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $mArgs[] = $arg; - } - } - - $mValueCount = count($mArgs); - if ($mValueCount > 0) { - sort($mArgs, SORT_NUMERIC); - $mValueCount = $mValueCount / 2; - if ($mValueCount == floor($mValueCount)) { - $returnValue = ($mArgs[$mValueCount--] + $mArgs[$mValueCount]) / 2; - } else { - $mValueCount = floor($mValueCount); - $returnValue = $mArgs[$mValueCount]; - } - } - - return $returnValue; - } - - - /** - * MIN - * - * MIN returns the value of the element of the values passed that has the smallest value, - * with negative numbers considered smaller than positive numbers. - * - * Excel Function: - * MIN(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function MIN() - { - $returnValue = null; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if ((is_null($returnValue)) || ($arg < $returnValue)) { - $returnValue = $arg; - } - } - } - - if (is_null($returnValue)) { - return 0; - } - return $returnValue; - } - - - /** - * MINA - * - * Returns the smallest value in a list of arguments, including numbers, text, and logical values - * - * Excel Function: - * MINA(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function MINA() - { - $returnValue = null; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) && ($arg != '')))) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } elseif (is_string($arg)) { - $arg = 0; - } - if ((is_null($returnValue)) || ($arg < $returnValue)) { - $returnValue = $arg; - } - } - } - - if (is_null($returnValue)) { - return 0; - } - return $returnValue; - } - - - /** - * MINIF - * - * Returns the minimum value within a range of cells that contain numbers within the list of arguments - * - * Excel Function: - * MINIF(value1[,value2[, ...]],condition) - * - * @access public - * @category Mathematical and Trigonometric Functions - * @param mixed $arg,... Data values - * @param string $condition The criteria that defines which cells will be checked. - * @return float - */ - public static function MINIF($aArgs, $condition, $sumArgs = array()) - { - $returnValue = null; - - $aArgs = PHPExcel_Calculation_Functions::flattenArray($aArgs); - $sumArgs = PHPExcel_Calculation_Functions::flattenArray($sumArgs); - if (empty($sumArgs)) { - $sumArgs = $aArgs; - } - $condition = PHPExcel_Calculation_Functions::ifCondition($condition); - // Loop through arguments - foreach ($aArgs as $key => $arg) { - if (!is_numeric($arg)) { - $arg = PHPExcel_Calculation::wrapResult(strtoupper($arg)); - } - $testCondition = '='.$arg.$condition; - if (PHPExcel_Calculation::getInstance()->_calculateFormulaValue($testCondition)) { - if ((is_null($returnValue)) || ($arg < $returnValue)) { - $returnValue = $arg; - } - } - } - - return $returnValue; - } - - - // - // Special variant of array_count_values that isn't limited to strings and integers, - // but can work with floating point numbers as values - // - private static function modeCalc($data) - { - $frequencyArray = array(); - foreach ($data as $datum) { - $found = false; - foreach ($frequencyArray as $key => $value) { - if ((string) $value['value'] == (string) $datum) { - ++$frequencyArray[$key]['frequency']; - $found = true; - break; - } - } - if (!$found) { - $frequencyArray[] = array( - 'value' => $datum, - 'frequency' => 1 - ); - } - } - - foreach ($frequencyArray as $key => $value) { - $frequencyList[$key] = $value['frequency']; - $valueList[$key] = $value['value']; - } - array_multisort($frequencyList, SORT_DESC, $valueList, SORT_ASC, SORT_NUMERIC, $frequencyArray); - - if ($frequencyArray[0]['frequency'] == 1) { - return PHPExcel_Calculation_Functions::NA(); - } - return $frequencyArray[0]['value']; - } - - - /** - * MODE - * - * Returns the most frequently occurring, or repetitive, value in an array or range of data - * - * Excel Function: - * MODE(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function MODE() - { - $returnValue = PHPExcel_Calculation_Functions::NA(); - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - $mArgs = array(); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $mArgs[] = $arg; - } - } - - if (!empty($mArgs)) { - return self::modeCalc($mArgs); - } - - return $returnValue; - } - - - /** - * NEGBINOMDIST - * - * Returns the negative binomial distribution. NEGBINOMDIST returns the probability that - * there will be number_f failures before the number_s-th success, when the constant - * probability of a success is probability_s. This function is similar to the binomial - * distribution, except that the number of successes is fixed, and the number of trials is - * variable. Like the binomial, trials are assumed to be independent. - * - * @param float $failures Number of Failures - * @param float $successes Threshold number of Successes - * @param float $probability Probability of success on each trial - * @return float - * - */ - public static function NEGBINOMDIST($failures, $successes, $probability) - { - $failures = floor(PHPExcel_Calculation_Functions::flattenSingleValue($failures)); - $successes = floor(PHPExcel_Calculation_Functions::flattenSingleValue($successes)); - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - - if ((is_numeric($failures)) && (is_numeric($successes)) && (is_numeric($probability))) { - if (($failures < 0) || ($successes < 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } elseif (($probability < 0) || ($probability > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_GNUMERIC) { - if (($failures + $successes - 1) <= 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - } - return (PHPExcel_Calculation_MathTrig::COMBIN($failures + $successes - 1, $successes - 1)) * (pow($probability, $successes)) * (pow(1 - $probability, $failures)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * NORMDIST - * - * Returns the normal distribution for the specified mean and standard deviation. This - * function has a very wide range of applications in statistics, including hypothesis - * testing. - * - * @param float $value - * @param float $mean Mean Value - * @param float $stdDev Standard Deviation - * @param boolean $cumulative - * @return float - * - */ - public static function NORMDIST($value, $mean, $stdDev, $cumulative) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $mean = PHPExcel_Calculation_Functions::flattenSingleValue($mean); - $stdDev = PHPExcel_Calculation_Functions::flattenSingleValue($stdDev); - - if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { - if ($stdDev < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ((is_numeric($cumulative)) || (is_bool($cumulative))) { - if ($cumulative) { - return 0.5 * (1 + PHPExcel_Calculation_Engineering::erfVal(($value - $mean) / ($stdDev * sqrt(2)))); - } else { - return (1 / (SQRT2PI * $stdDev)) * exp(0 - (pow($value - $mean, 2) / (2 * ($stdDev * $stdDev)))); - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * NORMINV - * - * Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation. - * - * @param float $value - * @param float $mean Mean Value - * @param float $stdDev Standard Deviation - * @return float - * - */ - public static function NORMINV($probability, $mean, $stdDev) - { - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - $mean = PHPExcel_Calculation_Functions::flattenSingleValue($mean); - $stdDev = PHPExcel_Calculation_Functions::flattenSingleValue($stdDev); - - if ((is_numeric($probability)) && (is_numeric($mean)) && (is_numeric($stdDev))) { - if (($probability < 0) || ($probability > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ($stdDev < 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return (self::inverseNcdf($probability) * $stdDev) + $mean; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * NORMSDIST - * - * Returns the standard normal cumulative distribution function. The distribution has - * a mean of 0 (zero) and a standard deviation of one. Use this function in place of a - * table of standard normal curve areas. - * - * @param float $value - * @return float - */ - public static function NORMSDIST($value) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - - return self::NORMDIST($value, 0, 1, true); - } - - - /** - * NORMSINV - * - * Returns the inverse of the standard normal cumulative distribution - * - * @param float $value - * @return float - */ - public static function NORMSINV($value) - { - return self::NORMINV($value, 0, 1); - } - - - /** - * PERCENTILE - * - * Returns the nth percentile of values in a range.. - * - * Excel Function: - * PERCENTILE(value1[,value2[, ...]],entry) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param float $entry Percentile value in the range 0..1, inclusive. - * @return float - */ - public static function PERCENTILE() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - // Calculate - $entry = array_pop($aArgs); - - if ((is_numeric($entry)) && (!is_string($entry))) { - if (($entry < 0) || ($entry > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $mArgs = array(); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $mArgs[] = $arg; - } - } - $mValueCount = count($mArgs); - if ($mValueCount > 0) { - sort($mArgs); - $count = self::COUNT($mArgs); - $index = $entry * ($count-1); - $iBase = floor($index); - if ($index == $iBase) { - return $mArgs[$index]; - } else { - $iNext = $iBase + 1; - $iProportion = $index - $iBase; - return $mArgs[$iBase] + (($mArgs[$iNext] - $mArgs[$iBase]) * $iProportion) ; - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * PERCENTRANK - * - * Returns the rank of a value in a data set as a percentage of the data set. - * - * @param array of number An array of, or a reference to, a list of numbers. - * @param number The number whose rank you want to find. - * @param number The number of significant digits for the returned percentage value. - * @return float - */ - public static function PERCENTRANK($valueSet, $value, $significance = 3) - { - $valueSet = PHPExcel_Calculation_Functions::flattenArray($valueSet); - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $significance = (is_null($significance)) ? 3 : (integer) PHPExcel_Calculation_Functions::flattenSingleValue($significance); - - foreach ($valueSet as $key => $valueEntry) { - if (!is_numeric($valueEntry)) { - unset($valueSet[$key]); - } - } - sort($valueSet, SORT_NUMERIC); - $valueCount = count($valueSet); - if ($valueCount == 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - - $valueAdjustor = $valueCount - 1; - if (($value < $valueSet[0]) || ($value > $valueSet[$valueAdjustor])) { - return PHPExcel_Calculation_Functions::NA(); - } - - $pos = array_search($value, $valueSet); - if ($pos === false) { - $pos = 0; - $testValue = $valueSet[0]; - while ($testValue < $value) { - $testValue = $valueSet[++$pos]; - } - --$pos; - $pos += (($value - $valueSet[$pos]) / ($testValue - $valueSet[$pos])); - } - - return round($pos / $valueAdjustor, $significance); - } - - - /** - * PERMUT - * - * Returns the number of permutations for a given number of objects that can be - * selected from number objects. A permutation is any set or subset of objects or - * events where internal order is significant. Permutations are different from - * combinations, for which the internal order is not significant. Use this function - * for lottery-style probability calculations. - * - * @param int $numObjs Number of different objects - * @param int $numInSet Number of objects in each permutation - * @return int Number of permutations - */ - public static function PERMUT($numObjs, $numInSet) - { - $numObjs = PHPExcel_Calculation_Functions::flattenSingleValue($numObjs); - $numInSet = PHPExcel_Calculation_Functions::flattenSingleValue($numInSet); - - if ((is_numeric($numObjs)) && (is_numeric($numInSet))) { - $numInSet = floor($numInSet); - if ($numObjs < $numInSet) { - return PHPExcel_Calculation_Functions::NaN(); - } - return round(PHPExcel_Calculation_MathTrig::FACT($numObjs) / PHPExcel_Calculation_MathTrig::FACT($numObjs - $numInSet)); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * POISSON - * - * Returns the Poisson distribution. A common application of the Poisson distribution - * is predicting the number of events over a specific time, such as the number of - * cars arriving at a toll plaza in 1 minute. - * - * @param float $value - * @param float $mean Mean Value - * @param boolean $cumulative - * @return float - * - */ - public static function POISSON($value, $mean, $cumulative) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $mean = PHPExcel_Calculation_Functions::flattenSingleValue($mean); - - if ((is_numeric($value)) && (is_numeric($mean))) { - if (($value < 0) || ($mean <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ((is_numeric($cumulative)) || (is_bool($cumulative))) { - if ($cumulative) { - $summer = 0; - for ($i = 0; $i <= floor($value); ++$i) { - $summer += pow($mean, $i) / PHPExcel_Calculation_MathTrig::FACT($i); - } - return exp(0-$mean) * $summer; - } else { - return (exp(0-$mean) * pow($mean, $value)) / PHPExcel_Calculation_MathTrig::FACT($value); - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * QUARTILE - * - * Returns the quartile of a data set. - * - * Excel Function: - * QUARTILE(value1[,value2[, ...]],entry) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param int $entry Quartile value in the range 1..3, inclusive. - * @return float - */ - public static function QUARTILE() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - // Calculate - $entry = floor(array_pop($aArgs)); - - if ((is_numeric($entry)) && (!is_string($entry))) { - $entry /= 4; - if (($entry < 0) || ($entry > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - return self::PERCENTILE($aArgs, $entry); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * RANK - * - * Returns the rank of a number in a list of numbers. - * - * @param number The number whose rank you want to find. - * @param array of number An array of, or a reference to, a list of numbers. - * @param mixed Order to sort the values in the value set - * @return float - */ - public static function RANK($value, $valueSet, $order = 0) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $valueSet = PHPExcel_Calculation_Functions::flattenArray($valueSet); - $order = (is_null($order)) ? 0 : (integer) PHPExcel_Calculation_Functions::flattenSingleValue($order); - - foreach ($valueSet as $key => $valueEntry) { - if (!is_numeric($valueEntry)) { - unset($valueSet[$key]); - } - } - - if ($order == 0) { - rsort($valueSet, SORT_NUMERIC); - } else { - sort($valueSet, SORT_NUMERIC); - } - $pos = array_search($value, $valueSet); - if ($pos === false) { - return PHPExcel_Calculation_Functions::NA(); - } - - return ++$pos; - } - - - /** - * RSQ - * - * Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float - */ - public static function RSQ($yValues, $xValues) - { - if (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues); - return $bestFitLinear->getGoodnessOfFit(); - } - - - /** - * SKEW - * - * Returns the skewness of a distribution. Skewness characterizes the degree of asymmetry - * of a distribution around its mean. Positive skewness indicates a distribution with an - * asymmetric tail extending toward more positive values. Negative skewness indicates a - * distribution with an asymmetric tail extending toward more negative values. - * - * @param array Data Series - * @return float - */ - public static function SKEW() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - $mean = self::AVERAGE($aArgs); - $stdDev = self::STDEV($aArgs); - - $count = $summer = 0; - // Loop through arguments - foreach ($aArgs as $k => $arg) { - if ((is_bool($arg)) && - (!PHPExcel_Calculation_Functions::isMatrixValue($k))) { - } else { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $summer += pow((($arg - $mean) / $stdDev), 3); - ++$count; - } - } - } - - if ($count > 2) { - return $summer * ($count / (($count-1) * ($count-2))); - } - return PHPExcel_Calculation_Functions::DIV0(); - } - - - /** - * SLOPE - * - * Returns the slope of the linear regression line through data points in known_y's and known_x's. - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float - */ - public static function SLOPE($yValues, $xValues) - { - if (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues); - return $bestFitLinear->getSlope(); - } - - - /** - * SMALL - * - * Returns the nth smallest value in a data set. You can use this function to - * select a value based on its relative standing. - * - * Excel Function: - * SMALL(value1[,value2[, ...]],entry) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param int $entry Position (ordered from the smallest) in the array or range of data to return - * @return float - */ - public static function SMALL() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - // Calculate - $entry = array_pop($aArgs); - - if ((is_numeric($entry)) && (!is_string($entry))) { - $mArgs = array(); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $mArgs[] = $arg; - } - } - $count = self::COUNT($mArgs); - $entry = floor(--$entry); - if (($entry < 0) || ($entry >= $count) || ($count == 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - sort($mArgs); - return $mArgs[$entry]; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * STANDARDIZE - * - * Returns a normalized value from a distribution characterized by mean and standard_dev. - * - * @param float $value Value to normalize - * @param float $mean Mean Value - * @param float $stdDev Standard Deviation - * @return float Standardized value - */ - public static function STANDARDIZE($value, $mean, $stdDev) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $mean = PHPExcel_Calculation_Functions::flattenSingleValue($mean); - $stdDev = PHPExcel_Calculation_Functions::flattenSingleValue($stdDev); - - if ((is_numeric($value)) && (is_numeric($mean)) && (is_numeric($stdDev))) { - if ($stdDev <= 0) { - return PHPExcel_Calculation_Functions::NaN(); - } - return ($value - $mean) / $stdDev ; - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * STDEV - * - * Estimates standard deviation based on a sample. The standard deviation is a measure of how - * widely values are dispersed from the average value (the mean). - * - * Excel Function: - * STDEV(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function STDEV() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - - // Return value - $returnValue = null; - - $aMean = self::AVERAGE($aArgs); - if (!is_null($aMean)) { - $aCount = -1; - foreach ($aArgs as $k => $arg) { - if ((is_bool($arg)) && - ((!PHPExcel_Calculation_Functions::isCellValue($k)) || (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE))) { - $arg = (integer) $arg; - } - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if (is_null($returnValue)) { - $returnValue = pow(($arg - $aMean), 2); - } else { - $returnValue += pow(($arg - $aMean), 2); - } - ++$aCount; - } - } - - // Return - if (($aCount > 0) && ($returnValue >= 0)) { - return sqrt($returnValue / $aCount); - } - } - return PHPExcel_Calculation_Functions::DIV0(); - } - - - /** - * STDEVA - * - * Estimates standard deviation based on a sample, including numbers, text, and logical values - * - * Excel Function: - * STDEVA(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function STDEVA() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - - $returnValue = null; - - $aMean = self::AVERAGEA($aArgs); - if (!is_null($aMean)) { - $aCount = -1; - foreach ($aArgs as $k => $arg) { - if ((is_bool($arg)) && - (!PHPExcel_Calculation_Functions::isMatrixValue($k))) { - } else { - // Is it a numeric value? - if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } elseif (is_string($arg)) { - $arg = 0; - } - if (is_null($returnValue)) { - $returnValue = pow(($arg - $aMean), 2); - } else { - $returnValue += pow(($arg - $aMean), 2); - } - ++$aCount; - } - } - } - - if (($aCount > 0) && ($returnValue >= 0)) { - return sqrt($returnValue / $aCount); - } - } - return PHPExcel_Calculation_Functions::DIV0(); - } - - - /** - * STDEVP - * - * Calculates standard deviation based on the entire population - * - * Excel Function: - * STDEVP(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function STDEVP() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - - $returnValue = null; - - $aMean = self::AVERAGE($aArgs); - if (!is_null($aMean)) { - $aCount = 0; - foreach ($aArgs as $k => $arg) { - if ((is_bool($arg)) && - ((!PHPExcel_Calculation_Functions::isCellValue($k)) || (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE))) { - $arg = (integer) $arg; - } - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - if (is_null($returnValue)) { - $returnValue = pow(($arg - $aMean), 2); - } else { - $returnValue += pow(($arg - $aMean), 2); - } - ++$aCount; - } - } - - if (($aCount > 0) && ($returnValue >= 0)) { - return sqrt($returnValue / $aCount); - } - } - return PHPExcel_Calculation_Functions::DIV0(); - } - - - /** - * STDEVPA - * - * Calculates standard deviation based on the entire population, including numbers, text, and logical values - * - * Excel Function: - * STDEVPA(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function STDEVPA() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - - $returnValue = null; - - $aMean = self::AVERAGEA($aArgs); - if (!is_null($aMean)) { - $aCount = 0; - foreach ($aArgs as $k => $arg) { - if ((is_bool($arg)) && - (!PHPExcel_Calculation_Functions::isMatrixValue($k))) { - } else { - // Is it a numeric value? - if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } elseif (is_string($arg)) { - $arg = 0; - } - if (is_null($returnValue)) { - $returnValue = pow(($arg - $aMean), 2); - } else { - $returnValue += pow(($arg - $aMean), 2); - } - ++$aCount; - } - } - } - - if (($aCount > 0) && ($returnValue >= 0)) { - return sqrt($returnValue / $aCount); - } - } - return PHPExcel_Calculation_Functions::DIV0(); - } - - - /** - * STEYX - * - * Returns the standard error of the predicted y-value for each x in the regression. - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @return float - */ - public static function STEYX($yValues, $xValues) - { - if (!self::checkTrendArrays($yValues, $xValues)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $yValueCount = count($yValues); - $xValueCount = count($xValues); - - if (($yValueCount == 0) || ($yValueCount != $xValueCount)) { - return PHPExcel_Calculation_Functions::NA(); - } elseif ($yValueCount == 1) { - return PHPExcel_Calculation_Functions::DIV0(); - } - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues); - return $bestFitLinear->getStdevOfResiduals(); - } - - - /** - * TDIST - * - * Returns the probability of Student's T distribution. - * - * @param float $value Value for the function - * @param float $degrees degrees of freedom - * @param float $tails number of tails (1 or 2) - * @return float - */ - public static function TDIST($value, $degrees, $tails) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $degrees = floor(PHPExcel_Calculation_Functions::flattenSingleValue($degrees)); - $tails = floor(PHPExcel_Calculation_Functions::flattenSingleValue($tails)); - - if ((is_numeric($value)) && (is_numeric($degrees)) && (is_numeric($tails))) { - if (($value < 0) || ($degrees < 1) || ($tails < 1) || ($tails > 2)) { - return PHPExcel_Calculation_Functions::NaN(); - } - // tdist, which finds the probability that corresponds to a given value - // of t with k degrees of freedom. This algorithm is translated from a - // pascal function on p81 of "Statistical Computing in Pascal" by D - // Cooke, A H Craven & G M Clark (1985: Edward Arnold (Pubs.) Ltd: - // London). The above Pascal algorithm is itself a translation of the - // fortran algoritm "AS 3" by B E Cooper of the Atlas Computer - // Laboratory as reported in (among other places) "Applied Statistics - // Algorithms", editied by P Griffiths and I D Hill (1985; Ellis - // Horwood Ltd.; W. Sussex, England). - $tterm = $degrees; - $ttheta = atan2($value, sqrt($tterm)); - $tc = cos($ttheta); - $ts = sin($ttheta); - $tsum = 0; - - if (($degrees % 2) == 1) { - $ti = 3; - $tterm = $tc; - } else { - $ti = 2; - $tterm = 1; - } - - $tsum = $tterm; - while ($ti < $degrees) { - $tterm *= $tc * $tc * ($ti - 1) / $ti; - $tsum += $tterm; - $ti += 2; - } - $tsum *= $ts; - if (($degrees % 2) == 1) { - $tsum = M_2DIVPI * ($tsum + $ttheta); - } - $tValue = 0.5 * (1 + $tsum); - if ($tails == 1) { - return 1 - abs($tValue); - } else { - return 1 - abs((1 - $tValue) - $tValue); - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * TINV - * - * Returns the one-tailed probability of the chi-squared distribution. - * - * @param float $probability Probability for the function - * @param float $degrees degrees of freedom - * @return float - */ - public static function TINV($probability, $degrees) - { - $probability = PHPExcel_Calculation_Functions::flattenSingleValue($probability); - $degrees = floor(PHPExcel_Calculation_Functions::flattenSingleValue($degrees)); - - if ((is_numeric($probability)) && (is_numeric($degrees))) { - $xLo = 100; - $xHi = 0; - - $x = $xNew = 1; - $dx = 1; - $i = 0; - - while ((abs($dx) > PRECISION) && ($i++ < MAX_ITERATIONS)) { - // Apply Newton-Raphson step - $result = self::TDIST($x, $degrees, 2); - $error = $result - $probability; - if ($error == 0.0) { - $dx = 0; - } elseif ($error < 0.0) { - $xLo = $x; - } else { - $xHi = $x; - } - // Avoid division by zero - if ($result != 0.0) { - $dx = $error / $result; - $xNew = $x - $dx; - } - // If the NR fails to converge (which for example may be the - // case if the initial guess is too rough) we apply a bisection - // step to determine a more narrow interval around the root. - if (($xNew < $xLo) || ($xNew > $xHi) || ($result == 0.0)) { - $xNew = ($xLo + $xHi) / 2; - $dx = $xNew - $x; - } - $x = $xNew; - } - if ($i == MAX_ITERATIONS) { - return PHPExcel_Calculation_Functions::NA(); - } - return round($x, 12); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * TREND - * - * Returns values along a linear trend - * - * @param array of mixed Data Series Y - * @param array of mixed Data Series X - * @param array of mixed Values of X for which we want to find Y - * @param boolean A logical value specifying whether to force the intersect to equal 0. - * @return array of float - */ - public static function TREND($yValues, $xValues = array(), $newValues = array(), $const = true) - { - $yValues = PHPExcel_Calculation_Functions::flattenArray($yValues); - $xValues = PHPExcel_Calculation_Functions::flattenArray($xValues); - $newValues = PHPExcel_Calculation_Functions::flattenArray($newValues); - $const = (is_null($const)) ? true : (boolean) PHPExcel_Calculation_Functions::flattenSingleValue($const); - - $bestFitLinear = trendClass::calculate(trendClass::TREND_LINEAR, $yValues, $xValues, $const); - if (empty($newValues)) { - $newValues = $bestFitLinear->getXValues(); - } - - $returnArray = array(); - foreach ($newValues as $xValue) { - $returnArray[0][] = $bestFitLinear->getValueOfYForX($xValue); - } - - return $returnArray; - } - - - /** - * TRIMMEAN - * - * Returns the mean of the interior of a data set. TRIMMEAN calculates the mean - * taken by excluding a percentage of data points from the top and bottom tails - * of a data set. - * - * Excel Function: - * TRIMEAN(value1[,value2[, ...]], $discard) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @param float $discard Percentage to discard - * @return float - */ - public static function TRIMMEAN() - { - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - - // Calculate - $percent = array_pop($aArgs); - - if ((is_numeric($percent)) && (!is_string($percent))) { - if (($percent < 0) || ($percent > 1)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $mArgs = array(); - foreach ($aArgs as $arg) { - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $mArgs[] = $arg; - } - } - $discard = floor(self::COUNT($mArgs) * $percent / 2); - sort($mArgs); - for ($i=0; $i < $discard; ++$i) { - array_pop($mArgs); - array_shift($mArgs); - } - return self::AVERAGE($mArgs); - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * VARFunc - * - * Estimates variance based on a sample. - * - * Excel Function: - * VAR(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function VARFunc() - { - $returnValue = PHPExcel_Calculation_Functions::DIV0(); - - $summerA = $summerB = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - $aCount = 0; - foreach ($aArgs as $arg) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $summerA += ($arg * $arg); - $summerB += $arg; - ++$aCount; - } - } - - if ($aCount > 1) { - $summerA *= $aCount; - $summerB *= $summerB; - $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1)); - } - return $returnValue; - } - - - /** - * VARA - * - * Estimates variance based on a sample, including numbers, text, and logical values - * - * Excel Function: - * VARA(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function VARA() - { - $returnValue = PHPExcel_Calculation_Functions::DIV0(); - - $summerA = $summerB = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - $aCount = 0; - foreach ($aArgs as $k => $arg) { - if ((is_string($arg)) && - (PHPExcel_Calculation_Functions::isValue($k))) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ((is_string($arg)) && - (!PHPExcel_Calculation_Functions::isMatrixValue($k))) { - } else { - // Is it a numeric value? - if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } elseif (is_string($arg)) { - $arg = 0; - } - $summerA += ($arg * $arg); - $summerB += $arg; - ++$aCount; - } - } - } - - if ($aCount > 1) { - $summerA *= $aCount; - $summerB *= $summerB; - $returnValue = ($summerA - $summerB) / ($aCount * ($aCount - 1)); - } - return $returnValue; - } - - - /** - * VARP - * - * Calculates variance based on the entire population - * - * Excel Function: - * VARP(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function VARP() - { - // Return value - $returnValue = PHPExcel_Calculation_Functions::DIV0(); - - $summerA = $summerB = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - $aCount = 0; - foreach ($aArgs as $arg) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } - // Is it a numeric value? - if ((is_numeric($arg)) && (!is_string($arg))) { - $summerA += ($arg * $arg); - $summerB += $arg; - ++$aCount; - } - } - - if ($aCount > 0) { - $summerA *= $aCount; - $summerB *= $summerB; - $returnValue = ($summerA - $summerB) / ($aCount * $aCount); - } - return $returnValue; - } - - - /** - * VARPA - * - * Calculates variance based on the entire population, including numbers, text, and logical values - * - * Excel Function: - * VARPA(value1[,value2[, ...]]) - * - * @access public - * @category Statistical Functions - * @param mixed $arg,... Data values - * @return float - */ - public static function VARPA() - { - $returnValue = PHPExcel_Calculation_Functions::DIV0(); - - $summerA = $summerB = 0; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArrayIndexed(func_get_args()); - $aCount = 0; - foreach ($aArgs as $k => $arg) { - if ((is_string($arg)) && - (PHPExcel_Calculation_Functions::isValue($k))) { - return PHPExcel_Calculation_Functions::VALUE(); - } elseif ((is_string($arg)) && - (!PHPExcel_Calculation_Functions::isMatrixValue($k))) { - } else { - // Is it a numeric value? - if ((is_numeric($arg)) || (is_bool($arg)) || ((is_string($arg) & ($arg != '')))) { - if (is_bool($arg)) { - $arg = (integer) $arg; - } elseif (is_string($arg)) { - $arg = 0; - } - $summerA += ($arg * $arg); - $summerB += $arg; - ++$aCount; - } - } - } - - if ($aCount > 0) { - $summerA *= $aCount; - $summerB *= $summerB; - $returnValue = ($summerA - $summerB) / ($aCount * $aCount); - } - return $returnValue; - } - - - /** - * WEIBULL - * - * Returns the Weibull distribution. Use this distribution in reliability - * analysis, such as calculating a device's mean time to failure. - * - * @param float $value - * @param float $alpha Alpha Parameter - * @param float $beta Beta Parameter - * @param boolean $cumulative - * @return float - * - */ - public static function WEIBULL($value, $alpha, $beta, $cumulative) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $alpha = PHPExcel_Calculation_Functions::flattenSingleValue($alpha); - $beta = PHPExcel_Calculation_Functions::flattenSingleValue($beta); - - if ((is_numeric($value)) && (is_numeric($alpha)) && (is_numeric($beta))) { - if (($value < 0) || ($alpha <= 0) || ($beta <= 0)) { - return PHPExcel_Calculation_Functions::NaN(); - } - if ((is_numeric($cumulative)) || (is_bool($cumulative))) { - if ($cumulative) { - return 1 - exp(0 - pow($value / $beta, $alpha)); - } else { - return ($alpha / pow($beta, $alpha)) * pow($value, $alpha - 1) * exp(0 - pow($value / $beta, $alpha)); - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * ZTEST - * - * Returns the Weibull distribution. Use this distribution in reliability - * analysis, such as calculating a device's mean time to failure. - * - * @param float $dataSet - * @param float $m0 Alpha Parameter - * @param float $sigma Beta Parameter - * @param boolean $cumulative - * @return float - * - */ - public static function ZTEST($dataSet, $m0, $sigma = null) - { - $dataSet = PHPExcel_Calculation_Functions::flattenArrayIndexed($dataSet); - $m0 = PHPExcel_Calculation_Functions::flattenSingleValue($m0); - $sigma = PHPExcel_Calculation_Functions::flattenSingleValue($sigma); - - if (is_null($sigma)) { - $sigma = self::STDEV($dataSet); - } - $n = count($dataSet); - - return 1 - self::NORMSDIST((self::AVERAGE($dataSet) - $m0) / ($sigma / SQRT($n))); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/TextData.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/TextData.php deleted file mode 100644 index 6461d06..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/TextData.php +++ /dev/null @@ -1,651 +0,0 @@ -=0 && ord($c{0}) <= 127) { - return ord($c{0}); - } elseif (ord($c{0}) >= 192 && ord($c{0}) <= 223) { - return (ord($c{0})-192)*64 + (ord($c{1})-128); - } elseif (ord($c{0}) >= 224 && ord($c{0}) <= 239) { - return (ord($c{0})-224)*4096 + (ord($c{1})-128)*64 + (ord($c{2})-128); - } elseif (ord($c{0}) >= 240 && ord($c{0}) <= 247) { - return (ord($c{0})-240)*262144 + (ord($c{1})-128)*4096 + (ord($c{2})-128)*64 + (ord($c{3})-128); - } elseif (ord($c{0}) >= 248 && ord($c{0}) <= 251) { - return (ord($c{0})-248)*16777216 + (ord($c{1})-128)*262144 + (ord($c{2})-128)*4096 + (ord($c{3})-128)*64 + (ord($c{4})-128); - } elseif (ord($c{0}) >= 252 && ord($c{0}) <= 253) { - return (ord($c{0})-252)*1073741824 + (ord($c{1})-128)*16777216 + (ord($c{2})-128)*262144 + (ord($c{3})-128)*4096 + (ord($c{4})-128)*64 + (ord($c{5})-128); - } elseif (ord($c{0}) >= 254 && ord($c{0}) <= 255) { - // error - return PHPExcel_Calculation_Functions::VALUE(); - } - return 0; - } - - /** - * CHARACTER - * - * @param string $character Value - * @return int - */ - public static function CHARACTER($character) - { - $character = PHPExcel_Calculation_Functions::flattenSingleValue($character); - - if ((!is_numeric($character)) || ($character < 0)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (function_exists('mb_convert_encoding')) { - return mb_convert_encoding('&#'.intval($character).';', 'UTF-8', 'HTML-ENTITIES'); - } else { - return chr(intval($character)); - } - } - - - /** - * TRIMNONPRINTABLE - * - * @param mixed $stringValue Value to check - * @return string - */ - public static function TRIMNONPRINTABLE($stringValue = '') - { - $stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue); - - if (is_bool($stringValue)) { - return ($stringValue) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - if (self::$invalidChars == null) { - self::$invalidChars = range(chr(0), chr(31)); - } - - if (is_string($stringValue) || is_numeric($stringValue)) { - return str_replace(self::$invalidChars, '', trim($stringValue, "\x00..\x1F")); - } - return null; - } - - - /** - * TRIMSPACES - * - * @param mixed $stringValue Value to check - * @return string - */ - public static function TRIMSPACES($stringValue = '') - { - $stringValue = PHPExcel_Calculation_Functions::flattenSingleValue($stringValue); - if (is_bool($stringValue)) { - return ($stringValue) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - if (is_string($stringValue) || is_numeric($stringValue)) { - return trim(preg_replace('/ +/', ' ', trim($stringValue, ' ')), ' '); - } - return null; - } - - - /** - * ASCIICODE - * - * @param string $characters Value - * @return int - */ - public static function ASCIICODE($characters) - { - if (($characters === null) || ($characters === '')) { - return PHPExcel_Calculation_Functions::VALUE(); - } - $characters = PHPExcel_Calculation_Functions::flattenSingleValue($characters); - if (is_bool($characters)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $characters = (int) $characters; - } else { - $characters = ($characters) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - } - - $character = $characters; - if ((function_exists('mb_strlen')) && (function_exists('mb_substr'))) { - if (mb_strlen($characters, 'UTF-8') > 1) { - $character = mb_substr($characters, 0, 1, 'UTF-8'); - } - return self::unicodeToOrd($character); - } else { - if (strlen($characters) > 0) { - $character = substr($characters, 0, 1); - } - return ord($character); - } - } - - - /** - * CONCATENATE - * - * @return string - */ - public static function CONCATENATE() - { - $returnValue = ''; - - // Loop through arguments - $aArgs = PHPExcel_Calculation_Functions::flattenArray(func_get_args()); - foreach ($aArgs as $arg) { - if (is_bool($arg)) { - if (PHPExcel_Calculation_Functions::getCompatibilityMode() == PHPExcel_Calculation_Functions::COMPATIBILITY_OPENOFFICE) { - $arg = (int) $arg; - } else { - $arg = ($arg) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - } - $returnValue .= $arg; - } - - return $returnValue; - } - - - /** - * DOLLAR - * - * This function converts a number to text using currency format, with the decimals rounded to the specified place. - * The format used is $#,##0.00_);($#,##0.00).. - * - * @param float $value The value to format - * @param int $decimals The number of digits to display to the right of the decimal point. - * If decimals is negative, number is rounded to the left of the decimal point. - * If you omit decimals, it is assumed to be 2 - * @return string - */ - public static function DOLLAR($value = 0, $decimals = 2) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $decimals = is_null($decimals) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($decimals); - - // Validate parameters - if (!is_numeric($value) || !is_numeric($decimals)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $decimals = floor($decimals); - - $mask = '$#,##0'; - if ($decimals > 0) { - $mask .= '.' . str_repeat('0', $decimals); - } else { - $round = pow(10, abs($decimals)); - if ($value < 0) { - $round = 0-$round; - } - $value = PHPExcel_Calculation_MathTrig::MROUND($value, $round); - } - - return PHPExcel_Style_NumberFormat::toFormattedString($value, $mask); - - } - - - /** - * SEARCHSENSITIVE - * - * @param string $needle The string to look for - * @param string $haystack The string in which to look - * @param int $offset Offset within $haystack - * @return string - */ - public static function SEARCHSENSITIVE($needle, $haystack, $offset = 1) - { - $needle = PHPExcel_Calculation_Functions::flattenSingleValue($needle); - $haystack = PHPExcel_Calculation_Functions::flattenSingleValue($haystack); - $offset = PHPExcel_Calculation_Functions::flattenSingleValue($offset); - - if (!is_bool($needle)) { - if (is_bool($haystack)) { - $haystack = ($haystack) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - if (($offset > 0) && (PHPExcel_Shared_String::CountCharacters($haystack) > $offset)) { - if (PHPExcel_Shared_String::CountCharacters($needle) == 0) { - return $offset; - } - if (function_exists('mb_strpos')) { - $pos = mb_strpos($haystack, $needle, --$offset, 'UTF-8'); - } else { - $pos = strpos($haystack, $needle, --$offset); - } - if ($pos !== false) { - return ++$pos; - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * SEARCHINSENSITIVE - * - * @param string $needle The string to look for - * @param string $haystack The string in which to look - * @param int $offset Offset within $haystack - * @return string - */ - public static function SEARCHINSENSITIVE($needle, $haystack, $offset = 1) - { - $needle = PHPExcel_Calculation_Functions::flattenSingleValue($needle); - $haystack = PHPExcel_Calculation_Functions::flattenSingleValue($haystack); - $offset = PHPExcel_Calculation_Functions::flattenSingleValue($offset); - - if (!is_bool($needle)) { - if (is_bool($haystack)) { - $haystack = ($haystack) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - if (($offset > 0) && (PHPExcel_Shared_String::CountCharacters($haystack) > $offset)) { - if (PHPExcel_Shared_String::CountCharacters($needle) == 0) { - return $offset; - } - if (function_exists('mb_stripos')) { - $pos = mb_stripos($haystack, $needle, --$offset, 'UTF-8'); - } else { - $pos = stripos($haystack, $needle, --$offset); - } - if ($pos !== false) { - return ++$pos; - } - } - } - return PHPExcel_Calculation_Functions::VALUE(); - } - - - /** - * FIXEDFORMAT - * - * @param mixed $value Value to check - * @param integer $decimals - * @param boolean $no_commas - * @return boolean - */ - public static function FIXEDFORMAT($value, $decimals = 2, $no_commas = false) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $decimals = PHPExcel_Calculation_Functions::flattenSingleValue($decimals); - $no_commas = PHPExcel_Calculation_Functions::flattenSingleValue($no_commas); - - // Validate parameters - if (!is_numeric($value) || !is_numeric($decimals)) { - return PHPExcel_Calculation_Functions::NaN(); - } - $decimals = floor($decimals); - - $valueResult = round($value, $decimals); - if ($decimals < 0) { - $decimals = 0; - } - if (!$no_commas) { - $valueResult = number_format($valueResult, $decimals); - } - - return (string) $valueResult; - } - - - /** - * LEFT - * - * @param string $value Value - * @param int $chars Number of characters - * @return string - */ - public static function LEFT($value = '', $chars = 1) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $chars = PHPExcel_Calculation_Functions::flattenSingleValue($chars); - - if ($chars < 0) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (is_bool($value)) { - $value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - if (function_exists('mb_substr')) { - return mb_substr($value, 0, $chars, 'UTF-8'); - } else { - return substr($value, 0, $chars); - } - } - - - /** - * MID - * - * @param string $value Value - * @param int $start Start character - * @param int $chars Number of characters - * @return string - */ - public static function MID($value = '', $start = 1, $chars = null) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $start = PHPExcel_Calculation_Functions::flattenSingleValue($start); - $chars = PHPExcel_Calculation_Functions::flattenSingleValue($chars); - - if (($start < 1) || ($chars < 0)) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (is_bool($value)) { - $value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - if (function_exists('mb_substr')) { - return mb_substr($value, --$start, $chars, 'UTF-8'); - } else { - return substr($value, --$start, $chars); - } - } - - - /** - * RIGHT - * - * @param string $value Value - * @param int $chars Number of characters - * @return string - */ - public static function RIGHT($value = '', $chars = 1) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $chars = PHPExcel_Calculation_Functions::flattenSingleValue($chars); - - if ($chars < 0) { - return PHPExcel_Calculation_Functions::VALUE(); - } - - if (is_bool($value)) { - $value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - if ((function_exists('mb_substr')) && (function_exists('mb_strlen'))) { - return mb_substr($value, mb_strlen($value, 'UTF-8') - $chars, $chars, 'UTF-8'); - } else { - return substr($value, strlen($value) - $chars); - } - } - - - /** - * STRINGLENGTH - * - * @param string $value Value - * @return string - */ - public static function STRINGLENGTH($value = '') - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - - if (is_bool($value)) { - $value = ($value) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - if (function_exists('mb_strlen')) { - return mb_strlen($value, 'UTF-8'); - } else { - return strlen($value); - } - } - - - /** - * LOWERCASE - * - * Converts a string value to upper case. - * - * @param string $mixedCaseString - * @return string - */ - public static function LOWERCASE($mixedCaseString) - { - $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString); - - if (is_bool($mixedCaseString)) { - $mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - return PHPExcel_Shared_String::StrToLower($mixedCaseString); - } - - - /** - * UPPERCASE - * - * Converts a string value to upper case. - * - * @param string $mixedCaseString - * @return string - */ - public static function UPPERCASE($mixedCaseString) - { - $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString); - - if (is_bool($mixedCaseString)) { - $mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - return PHPExcel_Shared_String::StrToUpper($mixedCaseString); - } - - - /** - * PROPERCASE - * - * Converts a string value to upper case. - * - * @param string $mixedCaseString - * @return string - */ - public static function PROPERCASE($mixedCaseString) - { - $mixedCaseString = PHPExcel_Calculation_Functions::flattenSingleValue($mixedCaseString); - - if (is_bool($mixedCaseString)) { - $mixedCaseString = ($mixedCaseString) ? PHPExcel_Calculation::getTRUE() : PHPExcel_Calculation::getFALSE(); - } - - return PHPExcel_Shared_String::StrToTitle($mixedCaseString); - } - - - /** - * REPLACE - * - * @param string $oldText String to modify - * @param int $start Start character - * @param int $chars Number of characters - * @param string $newText String to replace in defined position - * @return string - */ - public static function REPLACE($oldText = '', $start = 1, $chars = null, $newText) - { - $oldText = PHPExcel_Calculation_Functions::flattenSingleValue($oldText); - $start = PHPExcel_Calculation_Functions::flattenSingleValue($start); - $chars = PHPExcel_Calculation_Functions::flattenSingleValue($chars); - $newText = PHPExcel_Calculation_Functions::flattenSingleValue($newText); - - $left = self::LEFT($oldText, $start-1); - $right = self::RIGHT($oldText, self::STRINGLENGTH($oldText)-($start+$chars)+1); - - return $left.$newText.$right; - } - - - /** - * SUBSTITUTE - * - * @param string $text Value - * @param string $fromText From Value - * @param string $toText To Value - * @param integer $instance Instance Number - * @return string - */ - public static function SUBSTITUTE($text = '', $fromText = '', $toText = '', $instance = 0) - { - $text = PHPExcel_Calculation_Functions::flattenSingleValue($text); - $fromText = PHPExcel_Calculation_Functions::flattenSingleValue($fromText); - $toText = PHPExcel_Calculation_Functions::flattenSingleValue($toText); - $instance = floor(PHPExcel_Calculation_Functions::flattenSingleValue($instance)); - - if ($instance == 0) { - if (function_exists('mb_str_replace')) { - return mb_str_replace($fromText, $toText, $text); - } else { - return str_replace($fromText, $toText, $text); - } - } else { - $pos = -1; - while ($instance > 0) { - if (function_exists('mb_strpos')) { - $pos = mb_strpos($text, $fromText, $pos+1, 'UTF-8'); - } else { - $pos = strpos($text, $fromText, $pos+1); - } - if ($pos === false) { - break; - } - --$instance; - } - if ($pos !== false) { - if (function_exists('mb_strlen')) { - return self::REPLACE($text, ++$pos, mb_strlen($fromText, 'UTF-8'), $toText); - } else { - return self::REPLACE($text, ++$pos, strlen($fromText), $toText); - } - } - } - - return $text; - } - - - /** - * RETURNSTRING - * - * @param mixed $testValue Value to check - * @return boolean - */ - public static function RETURNSTRING($testValue = '') - { - $testValue = PHPExcel_Calculation_Functions::flattenSingleValue($testValue); - - if (is_string($testValue)) { - return $testValue; - } - return null; - } - - - /** - * TEXTFORMAT - * - * @param mixed $value Value to check - * @param string $format Format mask to use - * @return boolean - */ - public static function TEXTFORMAT($value, $format) - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - $format = PHPExcel_Calculation_Functions::flattenSingleValue($format); - - if ((is_string($value)) && (!is_numeric($value)) && PHPExcel_Shared_Date::isDateTimeFormatCode($format)) { - $value = PHPExcel_Calculation_DateTime::DATEVALUE($value); - } - - return (string) PHPExcel_Style_NumberFormat::toFormattedString($value, $format); - } - - /** - * VALUE - * - * @param mixed $value Value to check - * @return boolean - */ - public static function VALUE($value = '') - { - $value = PHPExcel_Calculation_Functions::flattenSingleValue($value); - - if (!is_numeric($value)) { - $numberValue = str_replace( - PHPExcel_Shared_String::getThousandsSeparator(), - '', - trim($value, " \t\n\r\0\x0B" . PHPExcel_Shared_String::getCurrencyCode()) - ); - if (is_numeric($numberValue)) { - return (float) $numberValue; - } - - $dateSetting = PHPExcel_Calculation_Functions::getReturnDateType(); - PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL); - - if (strpos($value, ':') !== false) { - $timeValue = PHPExcel_Calculation_DateTime::TIMEVALUE($value); - if ($timeValue !== PHPExcel_Calculation_Functions::VALUE()) { - PHPExcel_Calculation_Functions::setReturnDateType($dateSetting); - return $timeValue; - } - } - $dateValue = PHPExcel_Calculation_DateTime::DATEVALUE($value); - if ($dateValue !== PHPExcel_Calculation_Functions::VALUE()) { - PHPExcel_Calculation_Functions::setReturnDateType($dateSetting); - return $dateValue; - } - PHPExcel_Calculation_Functions::setReturnDateType($dateSetting); - - return PHPExcel_Calculation_Functions::VALUE(); - } - return (float) $value; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Token/Stack.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Token/Stack.php deleted file mode 100644 index 02ed5aa..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Token/Stack.php +++ /dev/null @@ -1,111 +0,0 @@ -count; - } - - /** - * Push a new entry onto the stack - * - * @param mixed $type - * @param mixed $value - * @param mixed $reference - */ - public function push($type, $value, $reference = null) - { - $this->stack[$this->count++] = array( - 'type' => $type, - 'value' => $value, - 'reference' => $reference - ); - if ($type == 'Function') { - $localeFunction = PHPExcel_Calculation::localeFunc($value); - if ($localeFunction != $value) { - $this->stack[($this->count - 1)]['localeValue'] = $localeFunction; - } - } - } - - /** - * Pop the last entry from the stack - * - * @return mixed - */ - public function pop() - { - if ($this->count > 0) { - return $this->stack[--$this->count]; - } - return null; - } - - /** - * Return an entry from the stack without removing it - * - * @param integer $n number indicating how far back in the stack we want to look - * @return mixed - */ - public function last($n = 1) - { - if ($this->count - $n < 0) { - return null; - } - return $this->stack[$this->count - $n]; - } - - /** - * Clear the stack - */ - public function clear() - { - $this->stack = array(); - $this->count = 0; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/functionlist.txt b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/functionlist.txt deleted file mode 100644 index 67dbd49..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/functionlist.txt +++ /dev/null @@ -1,351 +0,0 @@ -ABS -ACCRINT -ACCRINTM -ACOS -ACOSH -ADDRESS -AMORDEGRC -AMORLINC -AND -AREAS -ASC -ASIN -ASINH -ATAN -ATAN2 -ATANH -AVEDEV -AVERAGE -AVERAGEA -AVERAGEIF -AVERAGEIFS -BAHTTEXT -BESSELI -BESSELJ -BESSELK -BESSELY -BETADIST -BETAINV -BIN2DEC -BIN2HEX -BIN2OCT -BINOMDIST -CEILING -CELL -CHAR -CHIDIST -CHIINV -CHITEST -CHOOSE -CLEAN -CODE -COLUMN -COLUMNS -COMBIN -COMPLEX -CONCATENATE -CONFIDENCE -CONVERT -CORREL -COS -COSH -COUNT -COUNTA -COUNTBLANK -COUNTIF -COUNTIFS -COUPDAYBS -COUPDAYBS -COUPDAYSNC -COUPNCD -COUPNUM -COUPPCD -COVAR -CRITBINOM -CUBEKPIMEMBER -CUBEMEMBER -CUBEMEMBERPROPERTY -CUBERANKEDMEMBER -CUBESET -CUBESETCOUNT -CUBEVALUE -CUMIPMT -CUMPRINC -DATE -DATEDIF -DATEVALUE -DAVERAGE -DAY -DAYS360 -DB -DCOUNT -DCOUNTA -DDB -DEC2BIN -DEC2HEX -DEC2OCT -DEGREES -DELTA -DEVSQ -DGET -DISC -DMAX -DMIN -DOLLAR -DOLLARDE -DOLLARFR -DPRODUCT -DSTDEV -DSTDEVP -DSUM -DURATION -DVAR -DVARP -EDATE -EFFECT -EOMONTH -ERF -ERFC -ERROR.TYPE -EVEN -EXACT -EXP -EXPONDIST -FACT -FACTDOUBLE -FALSE -FDIST -FIND -FINDB -FINV -FISHER -FISHERINV -FIXED -FLOOR -FORECAST -FREQUENCY -FTEST -FV -FVSCHEDULE -GAMAMDIST -GAMMAINV -GAMMALN -GCD -GEOMEAN -GESTEP -GETPIVOTDATA -GROWTH -HARMEAN -HEX2BIN -HEX2OCT -HLOOKUP -HOUR -HYPERLINK -HYPGEOMDIST -IF -IFERROR -IMABS -IMAGINARY -IMARGUMENT -IMCONJUGATE -IMCOS -IMEXP -IMLN -IMLOG10 -IMLOG2 -IMPOWER -IMPRODUCT -IMREAL -IMSIN -IMSQRT -IMSUB -IMSUM -INDEX -INDIRECT -INFO -INT -INTERCEPT -INTRATE -IPMT -IRR -ISBLANK -ISERR -ISERROR -ISEVEN -ISLOGICAL -ISNA -ISNONTEXT -ISNUMBER -ISODD -ISPMT -ISREF -ISTEXT -JIS -KURT -LARGE -LCM -LEFT -LEFTB -LEN -LENB -LINEST -LN -LOG -LOG10 -LOGEST -LOGINV -LOGNORMDIST -LOOKUP -LOWER -MATCH -MAX -MAXA -MDETERM -MDURATION -MEDIAN -MID -MIDB -MIN -MINA -MINUTE -MINVERSE -MIRR -MMULT -MOD -MODE -MONTH -MROUND -MULTINOMIAL -N -NA -NEGBINOMDIST -NETWORKDAYS -NOMINAL -NORMDIST -NORMINV -NORMSDIST -NORMSINV -NOT -NOW -NPER -NPV -OCT2BIN -OCT2DEC -OCT2HEX -ODD -ODDFPRICE -ODDFYIELD -ODDLPRICE -ODDLYIELD -OFFSET -OR -PEARSON -PERCENTILE -PERCENTRANK -PERMUT -PHONETIC -PI -PMT -POISSON -POWER -PPMT -PRICE -PRICEDISC -PRICEMAT -PROB -PRODUCT -PROPER -PV -QUARTILE -QUOTIENT -RADIANS -RAND -RANDBETWEEN -RANK -RATE -RECEIVED -REPLACE -REPLACEB -REPT -RIGHT -RIGHTB -ROMAN -ROUND -ROUNDDOWN -ROUNDUP -ROW -ROWS -RSQ -RTD -SEARCH -SEARCHB -SECOND -SERIESSUM -SIGN -SIN -SINH -SKEW -SLN -SLOPE -SMALL -SQRT -SQRTPI -STANDARDIZE -STDEV -STDEVA -STDEVP -STDEVPA -STEYX -SUBSTITUTE -SUBTOTAL -SUM -SUMIF -SUMIFS -SUMPRODUCT -SUMSQ -SUMX2MY2 -SUMX2PY2 -SUMXMY2 -SYD -T -TAN -TANH -TBILLEQ -TBILLPRICE -TBILLYIELD -TDIST -TEXT -TIME -TIMEVALUE -TINV -TODAY -TRANSPOSE -TREND -TRIM -TRIMMEAN -TRUE -TRUNC -TTEST -TYPE -UPPER -USDOLLAR -VALUE -VAR -VARA -VARP -VARPA -VDB -VERSION -VLOOKUP -WEEKDAY -WEEKNUM -WEIBULL -WORKDAY -XIRR -XNPV -YEAR -YEARFRAC -YIELD -YIELDDISC -YIELDMAT -ZTEST diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php deleted file mode 100644 index c99a3c8..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell.php +++ /dev/null @@ -1,1032 +0,0 @@ -parent->updateCacheData($this); - - return $this; - } - - public function detach() - { - $this->parent = null; - } - - public function attach(PHPExcel_CachedObjectStorage_CacheBase $parent) - { - $this->parent = $parent; - } - - - /** - * Create a new Cell - * - * @param mixed $pValue - * @param string $pDataType - * @param PHPExcel_Worksheet $pSheet - * @throws PHPExcel_Exception - */ - public function __construct($pValue = null, $pDataType = null, PHPExcel_Worksheet $pSheet = null) - { - // Initialise cell value - $this->value = $pValue; - - // Set worksheet cache - $this->parent = $pSheet->getCellCacheController(); - - // Set datatype? - if ($pDataType !== null) { - if ($pDataType == PHPExcel_Cell_DataType::TYPE_STRING2) { - $pDataType = PHPExcel_Cell_DataType::TYPE_STRING; - } - $this->dataType = $pDataType; - } elseif (!self::getValueBinder()->bindValue($this, $pValue)) { - throw new PHPExcel_Exception("Value could not be bound to cell."); - } - } - - /** - * Get cell coordinate column - * - * @return string - */ - public function getColumn() - { - return $this->parent->getCurrentColumn(); - } - - /** - * Get cell coordinate row - * - * @return int - */ - public function getRow() - { - return $this->parent->getCurrentRow(); - } - - /** - * Get cell coordinate - * - * @return string - */ - public function getCoordinate() - { - return $this->parent->getCurrentAddress(); - } - - /** - * Get cell value - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Get cell value with formatting - * - * @return string - */ - public function getFormattedValue() - { - return (string) PHPExcel_Style_NumberFormat::toFormattedString( - $this->getCalculatedValue(), - $this->getStyle() - ->getNumberFormat()->getFormatCode() - ); - } - - /** - * Set cell value - * - * Sets the value for a cell, automatically determining the datatype using the value binder - * - * @param mixed $pValue Value - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function setValue($pValue = null) - { - if (!self::getValueBinder()->bindValue($this, $pValue)) { - throw new PHPExcel_Exception("Value could not be bound to cell."); - } - return $this; - } - - /** - * Set the value for a cell, with the explicit data type passed to the method (bypassing any use of the value binder) - * - * @param mixed $pValue Value - * @param string $pDataType Explicit data type - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function setValueExplicit($pValue = null, $pDataType = PHPExcel_Cell_DataType::TYPE_STRING) - { - // set the value according to data type - switch ($pDataType) { - case PHPExcel_Cell_DataType::TYPE_NULL: - $this->value = $pValue; - break; - case PHPExcel_Cell_DataType::TYPE_STRING2: - $pDataType = PHPExcel_Cell_DataType::TYPE_STRING; - // no break - case PHPExcel_Cell_DataType::TYPE_STRING: - // Synonym for string - case PHPExcel_Cell_DataType::TYPE_INLINE: - // Rich text - $this->value = PHPExcel_Cell_DataType::checkString($pValue); - break; - case PHPExcel_Cell_DataType::TYPE_NUMERIC: - $this->value = (float) $pValue; - break; - case PHPExcel_Cell_DataType::TYPE_FORMULA: - $this->value = (string) $pValue; - break; - case PHPExcel_Cell_DataType::TYPE_BOOL: - $this->value = (bool) $pValue; - break; - case PHPExcel_Cell_DataType::TYPE_ERROR: - $this->value = PHPExcel_Cell_DataType::checkErrorCode($pValue); - break; - default: - throw new PHPExcel_Exception('Invalid datatype: ' . $pDataType); - break; - } - - // set the datatype - $this->dataType = $pDataType; - - return $this->notifyCacheController(); - } - - /** - * Get calculated cell value - * - * @deprecated Since version 1.7.8 for planned changes to cell for array formula handling - * - * @param boolean $resetLog Whether the calculation engine logger should be reset or not - * @return mixed - * @throws PHPExcel_Exception - */ - public function getCalculatedValue($resetLog = true) - { -//echo 'Cell '.$this->getCoordinate().' value is a '.$this->dataType.' with a value of '.$this->getValue().PHP_EOL; - if ($this->dataType == PHPExcel_Cell_DataType::TYPE_FORMULA) { - try { -//echo 'Cell value for '.$this->getCoordinate().' is a formula: Calculating value'.PHP_EOL; - $result = PHPExcel_Calculation::getInstance( - $this->getWorksheet()->getParent() - )->calculateCellValue($this, $resetLog); -//echo $this->getCoordinate().' calculation result is '.$result.PHP_EOL; - // We don't yet handle array returns - if (is_array($result)) { - while (is_array($result)) { - $result = array_pop($result); - } - } - } catch (PHPExcel_Exception $ex) { - if (($ex->getMessage() === 'Unable to access External Workbook') && ($this->calculatedValue !== null)) { -//echo 'Returning fallback value of '.$this->calculatedValue.' for cell '.$this->getCoordinate().PHP_EOL; - return $this->calculatedValue; // Fallback for calculations referencing external files. - } -//echo 'Calculation Exception: '.$ex->getMessage().PHP_EOL; - $result = '#N/A'; - throw new PHPExcel_Calculation_Exception( - $this->getWorksheet()->getTitle().'!'.$this->getCoordinate().' -> '.$ex->getMessage() - ); - } - - if ($result === '#Not Yet Implemented') { -//echo 'Returning fallback value of '.$this->calculatedValue.' for cell '.$this->getCoordinate().PHP_EOL; - return $this->calculatedValue; // Fallback if calculation engine does not support the formula. - } -//echo 'Returning calculated value of '.$result.' for cell '.$this->getCoordinate().PHP_EOL; - return $result; - } elseif ($this->value instanceof PHPExcel_RichText) { -// echo 'Cell value for '.$this->getCoordinate().' is rich text: Returning data value of '.$this->value.'
    '; - return $this->value->getPlainText(); - } -// echo 'Cell value for '.$this->getCoordinate().' is not a formula: Returning data value of '.$this->value.'
    '; - return $this->value; - } - - /** - * Set old calculated value (cached) - * - * @param mixed $pValue Value - * @return PHPExcel_Cell - */ - public function setCalculatedValue($pValue = null) - { - if ($pValue !== null) { - $this->calculatedValue = (is_numeric($pValue)) ? (float) $pValue : $pValue; - } - - return $this->notifyCacheController(); - } - - /** - * Get old calculated value (cached) - * This returns the value last calculated by MS Excel or whichever spreadsheet program was used to - * create the original spreadsheet file. - * Note that this value is not guaranteed to refelect the actual calculated value because it is - * possible that auto-calculation was disabled in the original spreadsheet, and underlying data - * values used by the formula have changed since it was last calculated. - * - * @return mixed - */ - public function getOldCalculatedValue() - { - return $this->calculatedValue; - } - - /** - * Get cell data type - * - * @return string - */ - public function getDataType() - { - return $this->dataType; - } - - /** - * Set cell data type - * - * @param string $pDataType - * @return PHPExcel_Cell - */ - public function setDataType($pDataType = PHPExcel_Cell_DataType::TYPE_STRING) - { - if ($pDataType == PHPExcel_Cell_DataType::TYPE_STRING2) { - $pDataType = PHPExcel_Cell_DataType::TYPE_STRING; - } - $this->dataType = $pDataType; - - return $this->notifyCacheController(); - } - - /** - * Identify if the cell contains a formula - * - * @return boolean - */ - public function isFormula() - { - return $this->dataType == PHPExcel_Cell_DataType::TYPE_FORMULA; - } - - /** - * Does this cell contain Data validation rules? - * - * @return boolean - * @throws PHPExcel_Exception - */ - public function hasDataValidation() - { - if (!isset($this->parent)) { - throw new PHPExcel_Exception('Cannot check for data validation when cell is not bound to a worksheet'); - } - - return $this->getWorksheet()->dataValidationExists($this->getCoordinate()); - } - - /** - * Get Data validation rules - * - * @return PHPExcel_Cell_DataValidation - * @throws PHPExcel_Exception - */ - public function getDataValidation() - { - if (!isset($this->parent)) { - throw new PHPExcel_Exception('Cannot get data validation for cell that is not bound to a worksheet'); - } - - return $this->getWorksheet()->getDataValidation($this->getCoordinate()); - } - - /** - * Set Data validation rules - * - * @param PHPExcel_Cell_DataValidation $pDataValidation - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function setDataValidation(PHPExcel_Cell_DataValidation $pDataValidation = null) - { - if (!isset($this->parent)) { - throw new PHPExcel_Exception('Cannot set data validation for cell that is not bound to a worksheet'); - } - - $this->getWorksheet()->setDataValidation($this->getCoordinate(), $pDataValidation); - - return $this->notifyCacheController(); - } - - /** - * Does this cell contain a Hyperlink? - * - * @return boolean - * @throws PHPExcel_Exception - */ - public function hasHyperlink() - { - if (!isset($this->parent)) { - throw new PHPExcel_Exception('Cannot check for hyperlink when cell is not bound to a worksheet'); - } - - return $this->getWorksheet()->hyperlinkExists($this->getCoordinate()); - } - - /** - * Get Hyperlink - * - * @return PHPExcel_Cell_Hyperlink - * @throws PHPExcel_Exception - */ - public function getHyperlink() - { - if (!isset($this->parent)) { - throw new PHPExcel_Exception('Cannot get hyperlink for cell that is not bound to a worksheet'); - } - - return $this->getWorksheet()->getHyperlink($this->getCoordinate()); - } - - /** - * Set Hyperlink - * - * @param PHPExcel_Cell_Hyperlink $pHyperlink - * @return PHPExcel_Cell - * @throws PHPExcel_Exception - */ - public function setHyperlink(PHPExcel_Cell_Hyperlink $pHyperlink = null) - { - if (!isset($this->parent)) { - throw new PHPExcel_Exception('Cannot set hyperlink for cell that is not bound to a worksheet'); - } - - $this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink); - - return $this->notifyCacheController(); - } - - /** - * Get parent worksheet - * - * @return PHPExcel_CachedObjectStorage_CacheBase - */ - public function getParent() - { - return $this->parent; - } - - /** - * Get parent worksheet - * - * @return PHPExcel_Worksheet - */ - public function getWorksheet() - { - return $this->parent->getParent(); - } - - /** - * Is this cell in a merge range - * - * @return boolean - */ - public function isInMergeRange() - { - return (boolean) $this->getMergeRange(); - } - - /** - * Is this cell the master (top left cell) in a merge range (that holds the actual data value) - * - * @return boolean - */ - public function isMergeRangeValueCell() - { - if ($mergeRange = $this->getMergeRange()) { - $mergeRange = PHPExcel_Cell::splitRange($mergeRange); - list($startCell) = $mergeRange[0]; - if ($this->getCoordinate() === $startCell) { - return true; - } - } - return false; - } - - /** - * If this cell is in a merge range, then return the range - * - * @return string - */ - public function getMergeRange() - { - foreach ($this->getWorksheet()->getMergeCells() as $mergeRange) { - if ($this->isInRange($mergeRange)) { - return $mergeRange; - } - } - return false; - } - - /** - * Get cell style - * - * @return PHPExcel_Style - */ - public function getStyle() - { - return $this->getWorksheet()->getStyle($this->getCoordinate()); - } - - /** - * Re-bind parent - * - * @param PHPExcel_Worksheet $parent - * @return PHPExcel_Cell - */ - public function rebindParent(PHPExcel_Worksheet $parent) - { - $this->parent = $parent->getCellCacheController(); - - return $this->notifyCacheController(); - } - - /** - * Is cell in a specific range? - * - * @param string $pRange Cell range (e.g. A1:A1) - * @return boolean - */ - public function isInRange($pRange = 'A1:A1') - { - list($rangeStart, $rangeEnd) = self::rangeBoundaries($pRange); - - // Translate properties - $myColumn = self::columnIndexFromString($this->getColumn()); - $myRow = $this->getRow(); - - // Verify if cell is in range - return (($rangeStart[0] <= $myColumn) && ($rangeEnd[0] >= $myColumn) && - ($rangeStart[1] <= $myRow) && ($rangeEnd[1] >= $myRow) - ); - } - - /** - * Coordinate from string - * - * @param string $pCoordinateString - * @return array Array containing column and row (indexes 0 and 1) - * @throws PHPExcel_Exception - */ - public static function coordinateFromString($pCoordinateString = 'A1') - { - if (preg_match("/^([$]?[A-Z]{1,3})([$]?\d{1,7})$/", $pCoordinateString, $matches)) { - return array($matches[1],$matches[2]); - } elseif ((strpos($pCoordinateString, ':') !== false) || (strpos($pCoordinateString, ',') !== false)) { - throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells'); - } elseif ($pCoordinateString == '') { - throw new PHPExcel_Exception('Cell coordinate can not be zero-length string'); - } - - throw new PHPExcel_Exception('Invalid cell coordinate '.$pCoordinateString); - } - - /** - * Make string row, column or cell coordinate absolute - * - * @param string $pCoordinateString e.g. 'A' or '1' or 'A1' - * Note that this value can be a row or column reference as well as a cell reference - * @return string Absolute coordinate e.g. '$A' or '$1' or '$A$1' - * @throws PHPExcel_Exception - */ - public static function absoluteReference($pCoordinateString = 'A1') - { - if (strpos($pCoordinateString, ':') === false && strpos($pCoordinateString, ',') === false) { - // Split out any worksheet name from the reference - $worksheet = ''; - $cellAddress = explode('!', $pCoordinateString); - if (count($cellAddress) > 1) { - list($worksheet, $pCoordinateString) = $cellAddress; - } - if ($worksheet > '') { - $worksheet .= '!'; - } - - // Create absolute coordinate - if (ctype_digit($pCoordinateString)) { - return $worksheet . '$' . $pCoordinateString; - } elseif (ctype_alpha($pCoordinateString)) { - return $worksheet . '$' . strtoupper($pCoordinateString); - } - return $worksheet . self::absoluteCoordinate($pCoordinateString); - } - - throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells'); - } - - /** - * Make string coordinate absolute - * - * @param string $pCoordinateString e.g. 'A1' - * @return string Absolute coordinate e.g. '$A$1' - * @throws PHPExcel_Exception - */ - public static function absoluteCoordinate($pCoordinateString = 'A1') - { - if (strpos($pCoordinateString, ':') === false && strpos($pCoordinateString, ',') === false) { - // Split out any worksheet name from the coordinate - $worksheet = ''; - $cellAddress = explode('!', $pCoordinateString); - if (count($cellAddress) > 1) { - list($worksheet, $pCoordinateString) = $cellAddress; - } - if ($worksheet > '') { - $worksheet .= '!'; - } - - // Create absolute coordinate - list($column, $row) = self::coordinateFromString($pCoordinateString); - $column = ltrim($column, '$'); - $row = ltrim($row, '$'); - return $worksheet . '$' . $column . '$' . $row; - } - - throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells'); - } - - /** - * Split range into coordinate strings - * - * @param string $pRange e.g. 'B4:D9' or 'B4:D9,H2:O11' or 'B4' - * @return array Array containg one or more arrays containing one or two coordinate strings - * e.g. array('B4','D9') or array(array('B4','D9'),array('H2','O11')) - * or array('B4') - */ - public static function splitRange($pRange = 'A1:A1') - { - // Ensure $pRange is a valid range - if (empty($pRange)) { - $pRange = self::DEFAULT_RANGE; - } - - $exploded = explode(',', $pRange); - $counter = count($exploded); - for ($i = 0; $i < $counter; ++$i) { - $exploded[$i] = explode(':', $exploded[$i]); - } - return $exploded; - } - - /** - * Build range from coordinate strings - * - * @param array $pRange Array containg one or more arrays containing one or two coordinate strings - * @return string String representation of $pRange - * @throws PHPExcel_Exception - */ - public static function buildRange($pRange) - { - // Verify range - if (!is_array($pRange) || empty($pRange) || !is_array($pRange[0])) { - throw new PHPExcel_Exception('Range does not contain any information'); - } - - // Build range - $imploded = array(); - $counter = count($pRange); - for ($i = 0; $i < $counter; ++$i) { - $pRange[$i] = implode(':', $pRange[$i]); - } - $imploded = implode(',', $pRange); - - return $imploded; - } - - /** - * Calculate range boundaries - * - * @param string $pRange Cell range (e.g. A1:A1) - * @return array Range coordinates array(Start Cell, End Cell) - * where Start Cell and End Cell are arrays (Column Number, Row Number) - */ - public static function rangeBoundaries($pRange = 'A1:A1') - { - // Ensure $pRange is a valid range - if (empty($pRange)) { - $pRange = self::DEFAULT_RANGE; - } - - // Uppercase coordinate - $pRange = strtoupper($pRange); - - // Extract range - if (strpos($pRange, ':') === false) { - $rangeA = $rangeB = $pRange; - } else { - list($rangeA, $rangeB) = explode(':', $pRange); - } - - // Calculate range outer borders - $rangeStart = self::coordinateFromString($rangeA); - $rangeEnd = self::coordinateFromString($rangeB); - - // Translate column into index - $rangeStart[0] = self::columnIndexFromString($rangeStart[0]); - $rangeEnd[0] = self::columnIndexFromString($rangeEnd[0]); - - return array($rangeStart, $rangeEnd); - } - - /** - * Calculate range dimension - * - * @param string $pRange Cell range (e.g. A1:A1) - * @return array Range dimension (width, height) - */ - public static function rangeDimension($pRange = 'A1:A1') - { - // Calculate range outer borders - list($rangeStart, $rangeEnd) = self::rangeBoundaries($pRange); - - return array( ($rangeEnd[0] - $rangeStart[0] + 1), ($rangeEnd[1] - $rangeStart[1] + 1) ); - } - - /** - * Calculate range boundaries - * - * @param string $pRange Cell range (e.g. A1:A1) - * @return array Range coordinates array(Start Cell, End Cell) - * where Start Cell and End Cell are arrays (Column ID, Row Number) - */ - public static function getRangeBoundaries($pRange = 'A1:A1') - { - // Ensure $pRange is a valid range - if (empty($pRange)) { - $pRange = self::DEFAULT_RANGE; - } - - // Uppercase coordinate - $pRange = strtoupper($pRange); - - // Extract range - if (strpos($pRange, ':') === false) { - $rangeA = $rangeB = $pRange; - } else { - list($rangeA, $rangeB) = explode(':', $pRange); - } - - return array( self::coordinateFromString($rangeA), self::coordinateFromString($rangeB)); - } - - /** - * Column index from string - * - * @param string $pString - * @return int Column index (base 1 !!!) - */ - public static function columnIndexFromString($pString = 'A') - { - // Using a lookup cache adds a slight memory overhead, but boosts speed - // caching using a static within the method is faster than a class static, - // though it's additional memory overhead - static $_indexCache = array(); - - if (isset($_indexCache[$pString])) { - return $_indexCache[$pString]; - } - // It's surprising how costly the strtoupper() and ord() calls actually are, so we use a lookup array rather than use ord() - // and make it case insensitive to get rid of the strtoupper() as well. Because it's a static, there's no significant - // memory overhead either - static $_columnLookup = array( - 'A' => 1, 'B' => 2, 'C' => 3, 'D' => 4, 'E' => 5, 'F' => 6, 'G' => 7, 'H' => 8, 'I' => 9, 'J' => 10, 'K' => 11, 'L' => 12, 'M' => 13, - 'N' => 14, 'O' => 15, 'P' => 16, 'Q' => 17, 'R' => 18, 'S' => 19, 'T' => 20, 'U' => 21, 'V' => 22, 'W' => 23, 'X' => 24, 'Y' => 25, 'Z' => 26, - 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5, 'f' => 6, 'g' => 7, 'h' => 8, 'i' => 9, 'j' => 10, 'k' => 11, 'l' => 12, 'm' => 13, - 'n' => 14, 'o' => 15, 'p' => 16, 'q' => 17, 'r' => 18, 's' => 19, 't' => 20, 'u' => 21, 'v' => 22, 'w' => 23, 'x' => 24, 'y' => 25, 'z' => 26 - ); - - // We also use the language construct isset() rather than the more costly strlen() function to match the length of $pString - // for improved performance - if (isset($pString{0})) { - if (!isset($pString{1})) { - $_indexCache[$pString] = $_columnLookup[$pString]; - return $_indexCache[$pString]; - } elseif (!isset($pString{2})) { - $_indexCache[$pString] = $_columnLookup[$pString{0}] * 26 + $_columnLookup[$pString{1}]; - return $_indexCache[$pString]; - } elseif (!isset($pString{3})) { - $_indexCache[$pString] = $_columnLookup[$pString{0}] * 676 + $_columnLookup[$pString{1}] * 26 + $_columnLookup[$pString{2}]; - return $_indexCache[$pString]; - } - } - throw new PHPExcel_Exception("Column string index can not be " . ((isset($pString{0})) ? "longer than 3 characters" : "empty")); - } - - /** - * String from columnindex - * - * @param int $pColumnIndex Column index (base 0 !!!) - * @return string - */ - public static function stringFromColumnIndex($pColumnIndex = 0) - { - // Using a lookup cache adds a slight memory overhead, but boosts speed - // caching using a static within the method is faster than a class static, - // though it's additional memory overhead - static $_indexCache = array(); - - if (!isset($_indexCache[$pColumnIndex])) { - // Determine column string - if ($pColumnIndex < 26) { - $_indexCache[$pColumnIndex] = chr(65 + $pColumnIndex); - } elseif ($pColumnIndex < 702) { - $_indexCache[$pColumnIndex] = chr(64 + ($pColumnIndex / 26)) . - chr(65 + $pColumnIndex % 26); - } else { - $_indexCache[$pColumnIndex] = chr(64 + (($pColumnIndex - 26) / 676)) . - chr(65 + ((($pColumnIndex - 26) % 676) / 26)) . - chr(65 + $pColumnIndex % 26); - } - } - return $_indexCache[$pColumnIndex]; - } - - /** - * Extract all cell references in range - * - * @param string $pRange Range (e.g. A1 or A1:C10 or A1:E10 A20:E25) - * @return array Array containing single cell references - */ - public static function extractAllCellReferencesInRange($pRange = 'A1') - { - // Returnvalue - $returnValue = array(); - - // Explode spaces - $cellBlocks = explode(' ', str_replace('$', '', strtoupper($pRange))); - foreach ($cellBlocks as $cellBlock) { - // Single cell? - if (strpos($cellBlock, ':') === false && strpos($cellBlock, ',') === false) { - $returnValue[] = $cellBlock; - continue; - } - - // Range... - $ranges = self::splitRange($cellBlock); - foreach ($ranges as $range) { - // Single cell? - if (!isset($range[1])) { - $returnValue[] = $range[0]; - continue; - } - - // Range... - list($rangeStart, $rangeEnd) = $range; - sscanf($rangeStart, '%[A-Z]%d', $startCol, $startRow); - sscanf($rangeEnd, '%[A-Z]%d', $endCol, $endRow); - ++$endCol; - - // Current data - $currentCol = $startCol; - $currentRow = $startRow; - - // Loop cells - while ($currentCol != $endCol) { - while ($currentRow <= $endRow) { - $returnValue[] = $currentCol.$currentRow; - ++$currentRow; - } - ++$currentCol; - $currentRow = $startRow; - } - } - } - - // Sort the result by column and row - $sortKeys = array(); - foreach (array_unique($returnValue) as $coord) { - sscanf($coord, '%[A-Z]%d', $column, $row); - $sortKeys[sprintf('%3s%09d', $column, $row)] = $coord; - } - ksort($sortKeys); - - // Return value - return array_values($sortKeys); - } - - /** - * Compare 2 cells - * - * @param PHPExcel_Cell $a Cell a - * @param PHPExcel_Cell $b Cell b - * @return int Result of comparison (always -1 or 1, never zero!) - */ - public static function compareCells(PHPExcel_Cell $a, PHPExcel_Cell $b) - { - if ($a->getRow() < $b->getRow()) { - return -1; - } elseif ($a->getRow() > $b->getRow()) { - return 1; - } elseif (self::columnIndexFromString($a->getColumn()) < self::columnIndexFromString($b->getColumn())) { - return -1; - } else { - return 1; - } - } - - /** - * Get value binder to use - * - * @return PHPExcel_Cell_IValueBinder - */ - public static function getValueBinder() - { - if (self::$valueBinder === null) { - self::$valueBinder = new PHPExcel_Cell_DefaultValueBinder(); - } - - return self::$valueBinder; - } - - /** - * Set value binder to use - * - * @param PHPExcel_Cell_IValueBinder $binder - * @throws PHPExcel_Exception - */ - public static function setValueBinder(PHPExcel_Cell_IValueBinder $binder = null) - { - if ($binder === null) { - throw new PHPExcel_Exception("A PHPExcel_Cell_IValueBinder is required for PHPExcel to function correctly."); - } - - self::$valueBinder = $binder; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if ((is_object($value)) && ($key != 'parent')) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } - - /** - * Get index to cellXf - * - * @return int - */ - public function getXfIndex() - { - return $this->xfIndex; - } - - /** - * Set index to cellXf - * - * @param int $pValue - * @return PHPExcel_Cell - */ - public function setXfIndex($pValue = 0) - { - $this->xfIndex = $pValue; - - return $this->notifyCacheController(); - } - - /** - * @deprecated Since version 1.7.8 for planned changes to cell for array formula handling - */ - public function setFormulaAttributes($pAttributes) - { - $this->formulaAttributes = $pAttributes; - return $this; - } - - /** - * @deprecated Since version 1.7.8 for planned changes to cell for array formula handling - */ - public function getFormulaAttributes() - { - return $this->formulaAttributes; - } - - /** - * Convert to string - * - * @return string - */ - public function __toString() - { - return (string) $this->getValue(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/AdvancedValueBinder.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/AdvancedValueBinder.php deleted file mode 100644 index 061d04e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/AdvancedValueBinder.php +++ /dev/null @@ -1,187 +0,0 @@ -setValueExplicit(true, PHPExcel_Cell_DataType::TYPE_BOOL); - return true; - } elseif ($value == PHPExcel_Calculation::getFALSE()) { - $cell->setValueExplicit(false, PHPExcel_Cell_DataType::TYPE_BOOL); - return true; - } - - // Check for number in scientific format - if (preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NUMBER.'$/', $value)) { - $cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC); - return true; - } - - // Check for fraction - if (preg_match('/^([+-]?)\s*([0-9]+)\s?\/\s*([0-9]+)$/', $value, $matches)) { - // Convert value to number - $value = $matches[2] / $matches[3]; - if ($matches[1] == '-') { - $value = 0 - $value; - } - $cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC); - // Set style - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getNumberFormat()->setFormatCode('??/??'); - return true; - } elseif (preg_match('/^([+-]?)([0-9]*) +([0-9]*)\s?\/\s*([0-9]*)$/', $value, $matches)) { - // Convert value to number - $value = $matches[2] + ($matches[3] / $matches[4]); - if ($matches[1] == '-') { - $value = 0 - $value; - } - $cell->setValueExplicit((float) $value, PHPExcel_Cell_DataType::TYPE_NUMERIC); - // Set style - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getNumberFormat()->setFormatCode('# ??/??'); - return true; - } - - // Check for percentage - if (preg_match('/^\-?[0-9]*\.?[0-9]*\s?\%$/', $value)) { - // Convert value to number - $value = (float) str_replace('%', '', $value) / 100; - $cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_NUMERIC); - // Set style - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00); - return true; - } - - // Check for currency - $currencyCode = PHPExcel_Shared_String::getCurrencyCode(); - $decimalSeparator = PHPExcel_Shared_String::getDecimalSeparator(); - $thousandsSeparator = PHPExcel_Shared_String::getThousandsSeparator(); - if (preg_match('/^'.preg_quote($currencyCode).' *(\d{1,3}('.preg_quote($thousandsSeparator).'\d{3})*|(\d+))('.preg_quote($decimalSeparator).'\d{2})?$/', $value)) { - // Convert value to number - $value = (float) trim(str_replace(array($currencyCode, $thousandsSeparator, $decimalSeparator), array('', '', '.'), $value)); - $cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_NUMERIC); - // Set style - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getNumberFormat()->setFormatCode( - str_replace('$', $currencyCode, PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE) - ); - return true; - } elseif (preg_match('/^\$ *(\d{1,3}(\,\d{3})*|(\d+))(\.\d{2})?$/', $value)) { - // Convert value to number - $value = (float) trim(str_replace(array('$',','), '', $value)); - $cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_NUMERIC); - // Set style - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE); - return true; - } - - // Check for time without seconds e.g. '9:45', '09:45' - if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d$/', $value)) { - // Convert value to number - list($h, $m) = explode(':', $value); - $days = $h / 24 + $m / 1440; - $cell->setValueExplicit($days, PHPExcel_Cell_DataType::TYPE_NUMERIC); - // Set style - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3); - return true; - } - - // Check for time with seconds '9:45:59', '09:45:59' - if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d:[0-5]\d$/', $value)) { - // Convert value to number - list($h, $m, $s) = explode(':', $value); - $days = $h / 24 + $m / 1440 + $s / 86400; - // Convert value to number - $cell->setValueExplicit($days, PHPExcel_Cell_DataType::TYPE_NUMERIC); - // Set style - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4); - return true; - } - - // Check for datetime, e.g. '2008-12-31', '2008-12-31 15:59', '2008-12-31 15:59:10' - if (($d = PHPExcel_Shared_Date::stringToExcel($value)) !== false) { - // Convert value to number - $cell->setValueExplicit($d, PHPExcel_Cell_DataType::TYPE_NUMERIC); - // Determine style. Either there is a time part or not. Look for ':' - if (strpos($value, ':') !== false) { - $formatCode = 'yyyy-mm-dd h:mm'; - } else { - $formatCode = 'yyyy-mm-dd'; - } - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getNumberFormat()->setFormatCode($formatCode); - return true; - } - - // Check for newline character "\n" - if (strpos($value, "\n") !== false) { - $value = PHPExcel_Shared_String::SanitizeUTF8($value); - $cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING); - // Set style - $cell->getWorksheet()->getStyle($cell->getCoordinate()) - ->getAlignment()->setWrapText(true); - return true; - } - } - - // Not bound yet? Use parent... - return parent::bindValue($cell, $value); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DataType.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DataType.php deleted file mode 100644 index fc010e6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DataType.php +++ /dev/null @@ -1,115 +0,0 @@ - 0, - '#DIV/0!' => 1, - '#VALUE!' => 2, - '#REF!' => 3, - '#NAME?' => 4, - '#NUM!' => 5, - '#N/A' => 6 - ); - - /** - * Get list of error codes - * - * @return array - */ - public static function getErrorCodes() - { - return self::$errorCodes; - } - - /** - * DataType for value - * - * @deprecated Replaced by PHPExcel_Cell_IValueBinder infrastructure, will be removed in version 1.8.0 - * @param mixed $pValue - * @return string - */ - public static function dataTypeForValue($pValue = null) - { - return PHPExcel_Cell_DefaultValueBinder::dataTypeForValue($pValue); - } - - /** - * Check a string that it satisfies Excel requirements - * - * @param mixed Value to sanitize to an Excel string - * @return mixed Sanitized value - */ - public static function checkString($pValue = null) - { - if ($pValue instanceof PHPExcel_RichText) { - // TODO: Sanitize Rich-Text string (max. character count is 32,767) - return $pValue; - } - - // string must never be longer than 32,767 characters, truncate if necessary - $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 32767); - - // we require that newline is represented as "\n" in core, not as "\r\n" or "\r" - $pValue = str_replace(array("\r\n", "\r"), "\n", $pValue); - - return $pValue; - } - - /** - * Check a value that it is a valid error code - * - * @param mixed Value to sanitize to an Excel error code - * @return string Sanitized value - */ - public static function checkErrorCode($pValue = null) - { - $pValue = (string) $pValue; - - if (!array_key_exists($pValue, self::$errorCodes)) { - $pValue = '#NULL!'; - } - - return $pValue; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DataValidation.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DataValidation.php deleted file mode 100644 index 9883633..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DataValidation.php +++ /dev/null @@ -1,492 +0,0 @@ -formula1 = ''; - $this->formula2 = ''; - $this->type = PHPExcel_Cell_DataValidation::TYPE_NONE; - $this->errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP; - $this->operator = ''; - $this->allowBlank = false; - $this->showDropDown = false; - $this->showInputMessage = false; - $this->showErrorMessage = false; - $this->errorTitle = ''; - $this->error = ''; - $this->promptTitle = ''; - $this->prompt = ''; - } - - /** - * Get Formula 1 - * - * @return string - */ - public function getFormula1() - { - return $this->formula1; - } - - /** - * Set Formula 1 - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setFormula1($value = '') - { - $this->formula1 = $value; - return $this; - } - - /** - * Get Formula 2 - * - * @return string - */ - public function getFormula2() - { - return $this->formula2; - } - - /** - * Set Formula 2 - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setFormula2($value = '') - { - $this->formula2 = $value; - return $this; - } - - /** - * Get Type - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Set Type - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setType($value = PHPExcel_Cell_DataValidation::TYPE_NONE) - { - $this->type = $value; - return $this; - } - - /** - * Get Error style - * - * @return string - */ - public function getErrorStyle() - { - return $this->errorStyle; - } - - /** - * Set Error style - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setErrorStyle($value = PHPExcel_Cell_DataValidation::STYLE_STOP) - { - $this->errorStyle = $value; - return $this; - } - - /** - * Get Operator - * - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Set Operator - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setOperator($value = '') - { - $this->operator = $value; - return $this; - } - - /** - * Get Allow Blank - * - * @return boolean - */ - public function getAllowBlank() - { - return $this->allowBlank; - } - - /** - * Set Allow Blank - * - * @param boolean $value - * @return PHPExcel_Cell_DataValidation - */ - public function setAllowBlank($value = false) - { - $this->allowBlank = $value; - return $this; - } - - /** - * Get Show DropDown - * - * @return boolean - */ - public function getShowDropDown() - { - return $this->showDropDown; - } - - /** - * Set Show DropDown - * - * @param boolean $value - * @return PHPExcel_Cell_DataValidation - */ - public function setShowDropDown($value = false) - { - $this->showDropDown = $value; - return $this; - } - - /** - * Get Show InputMessage - * - * @return boolean - */ - public function getShowInputMessage() - { - return $this->showInputMessage; - } - - /** - * Set Show InputMessage - * - * @param boolean $value - * @return PHPExcel_Cell_DataValidation - */ - public function setShowInputMessage($value = false) - { - $this->showInputMessage = $value; - return $this; - } - - /** - * Get Show ErrorMessage - * - * @return boolean - */ - public function getShowErrorMessage() - { - return $this->showErrorMessage; - } - - /** - * Set Show ErrorMessage - * - * @param boolean $value - * @return PHPExcel_Cell_DataValidation - */ - public function setShowErrorMessage($value = false) - { - $this->showErrorMessage = $value; - return $this; - } - - /** - * Get Error title - * - * @return string - */ - public function getErrorTitle() - { - return $this->errorTitle; - } - - /** - * Set Error title - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setErrorTitle($value = '') - { - $this->errorTitle = $value; - return $this; - } - - /** - * Get Error - * - * @return string - */ - public function getError() - { - return $this->error; - } - - /** - * Set Error - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setError($value = '') - { - $this->error = $value; - return $this; - } - - /** - * Get Prompt title - * - * @return string - */ - public function getPromptTitle() - { - return $this->promptTitle; - } - - /** - * Set Prompt title - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setPromptTitle($value = '') - { - $this->promptTitle = $value; - return $this; - } - - /** - * Get Prompt - * - * @return string - */ - public function getPrompt() - { - return $this->prompt; - } - - /** - * Set Prompt - * - * @param string $value - * @return PHPExcel_Cell_DataValidation - */ - public function setPrompt($value = '') - { - $this->prompt = $value; - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->formula1 . - $this->formula2 . - $this->type = PHPExcel_Cell_DataValidation::TYPE_NONE . - $this->errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP . - $this->operator . - ($this->allowBlank ? 't' : 'f') . - ($this->showDropDown ? 't' : 'f') . - ($this->showInputMessage ? 't' : 'f') . - ($this->showErrorMessage ? 't' : 'f') . - $this->errorTitle . - $this->error . - $this->promptTitle . - $this->prompt . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DefaultValueBinder.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DefaultValueBinder.php deleted file mode 100644 index dc19e6c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/DefaultValueBinder.php +++ /dev/null @@ -1,102 +0,0 @@ -format('Y-m-d H:i:s'); - } elseif (!($value instanceof PHPExcel_RichText)) { - $value = (string) $value; - } - } - - // Set value explicit - $cell->setValueExplicit($value, self::dataTypeForValue($value)); - - // Done! - return true; - } - - /** - * DataType for value - * - * @param mixed $pValue - * @return string - */ - public static function dataTypeForValue($pValue = null) - { - // Match the value against a few data types - if ($pValue === null) { - return PHPExcel_Cell_DataType::TYPE_NULL; - } elseif ($pValue === '') { - return PHPExcel_Cell_DataType::TYPE_STRING; - } elseif ($pValue instanceof PHPExcel_RichText) { - return PHPExcel_Cell_DataType::TYPE_INLINE; - } elseif ($pValue{0} === '=' && strlen($pValue) > 1) { - return PHPExcel_Cell_DataType::TYPE_FORMULA; - } elseif (is_bool($pValue)) { - return PHPExcel_Cell_DataType::TYPE_BOOL; - } elseif (is_float($pValue) || is_int($pValue)) { - return PHPExcel_Cell_DataType::TYPE_NUMERIC; - } elseif (preg_match('/^[\+\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\-\+]?[0-2]?\d{1,3})?$/', $pValue)) { - $tValue = ltrim($pValue, '+-'); - if (is_string($pValue) && $tValue{0} === '0' && strlen($tValue) > 1 && $tValue{1} !== '.') { - return PHPExcel_Cell_DataType::TYPE_STRING; - } elseif ((strpos($pValue, '.') === false) && ($pValue > PHP_INT_MAX)) { - return PHPExcel_Cell_DataType::TYPE_STRING; - } - return PHPExcel_Cell_DataType::TYPE_NUMERIC; - } elseif (is_string($pValue) && array_key_exists($pValue, PHPExcel_Cell_DataType::getErrorCodes())) { - return PHPExcel_Cell_DataType::TYPE_ERROR; - } - - return PHPExcel_Cell_DataType::TYPE_STRING; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/Hyperlink.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/Hyperlink.php deleted file mode 100644 index daab54c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/Hyperlink.php +++ /dev/null @@ -1,124 +0,0 @@ -url = $pUrl; - $this->tooltip = $pTooltip; - } - - /** - * Get URL - * - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Set URL - * - * @param string $value - * @return PHPExcel_Cell_Hyperlink - */ - public function setUrl($value = '') - { - $this->url = $value; - return $this; - } - - /** - * Get tooltip - * - * @return string - */ - public function getTooltip() - { - return $this->tooltip; - } - - /** - * Set tooltip - * - * @param string $value - * @return PHPExcel_Cell_Hyperlink - */ - public function setTooltip($value = '') - { - $this->tooltip = $value; - return $this; - } - - /** - * Is this hyperlink internal? (to another worksheet) - * - * @return boolean - */ - public function isInternal() - { - return strpos($this->url, 'sheet://') !== false; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->url . - $this->tooltip . - __CLASS__ - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/IValueBinder.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/IValueBinder.php deleted file mode 100644 index de2d0ac..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Cell/IValueBinder.php +++ /dev/null @@ -1,47 +0,0 @@ -name = $name; - $this->title = $title; - $this->legend = $legend; - $this->xAxisLabel = $xAxisLabel; - $this->yAxisLabel = $yAxisLabel; - $this->plotArea = $plotArea; - $this->plotVisibleOnly = $plotVisibleOnly; - $this->displayBlanksAs = $displayBlanksAs; - $this->xAxis = $xAxis; - $this->yAxis = $yAxis; - $this->majorGridlines = $majorGridlines; - $this->minorGridlines = $minorGridlines; - } - - /** - * Get Name - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Get Worksheet - * - * @return PHPExcel_Worksheet - */ - public function getWorksheet() - { - return $this->worksheet; - } - - /** - * Set Worksheet - * - * @param PHPExcel_Worksheet $pValue - * @throws PHPExcel_Chart_Exception - * @return PHPExcel_Chart - */ - public function setWorksheet(PHPExcel_Worksheet $pValue = null) - { - $this->worksheet = $pValue; - - return $this; - } - - /** - * Get Title - * - * @return PHPExcel_Chart_Title - */ - public function getTitle() - { - return $this->title; - } - - /** - * Set Title - * - * @param PHPExcel_Chart_Title $title - * @return PHPExcel_Chart - */ - public function setTitle(PHPExcel_Chart_Title $title) - { - $this->title = $title; - - return $this; - } - - /** - * Get Legend - * - * @return PHPExcel_Chart_Legend - */ - public function getLegend() - { - return $this->legend; - } - - /** - * Set Legend - * - * @param PHPExcel_Chart_Legend $legend - * @return PHPExcel_Chart - */ - public function setLegend(PHPExcel_Chart_Legend $legend) - { - $this->legend = $legend; - - return $this; - } - - /** - * Get X-Axis Label - * - * @return PHPExcel_Chart_Title - */ - public function getXAxisLabel() - { - return $this->xAxisLabel; - } - - /** - * Set X-Axis Label - * - * @param PHPExcel_Chart_Title $label - * @return PHPExcel_Chart - */ - public function setXAxisLabel(PHPExcel_Chart_Title $label) - { - $this->xAxisLabel = $label; - - return $this; - } - - /** - * Get Y-Axis Label - * - * @return PHPExcel_Chart_Title - */ - public function getYAxisLabel() - { - return $this->yAxisLabel; - } - - /** - * Set Y-Axis Label - * - * @param PHPExcel_Chart_Title $label - * @return PHPExcel_Chart - */ - public function setYAxisLabel(PHPExcel_Chart_Title $label) - { - $this->yAxisLabel = $label; - - return $this; - } - - /** - * Get Plot Area - * - * @return PHPExcel_Chart_PlotArea - */ - public function getPlotArea() - { - return $this->plotArea; - } - - /** - * Get Plot Visible Only - * - * @return boolean - */ - public function getPlotVisibleOnly() - { - return $this->plotVisibleOnly; - } - - /** - * Set Plot Visible Only - * - * @param boolean $plotVisibleOnly - * @return PHPExcel_Chart - */ - public function setPlotVisibleOnly($plotVisibleOnly = true) - { - $this->plotVisibleOnly = $plotVisibleOnly; - - return $this; - } - - /** - * Get Display Blanks as - * - * @return string - */ - public function getDisplayBlanksAs() - { - return $this->displayBlanksAs; - } - - /** - * Set Display Blanks as - * - * @param string $displayBlanksAs - * @return PHPExcel_Chart - */ - public function setDisplayBlanksAs($displayBlanksAs = '0') - { - $this->displayBlanksAs = $displayBlanksAs; - } - - - /** - * Get yAxis - * - * @return PHPExcel_Chart_Axis - */ - public function getChartAxisY() - { - if ($this->yAxis !== null) { - return $this->yAxis; - } - - return new PHPExcel_Chart_Axis(); - } - - /** - * Get xAxis - * - * @return PHPExcel_Chart_Axis - */ - public function getChartAxisX() - { - if ($this->xAxis !== null) { - return $this->xAxis; - } - - return new PHPExcel_Chart_Axis(); - } - - /** - * Get Major Gridlines - * - * @return PHPExcel_Chart_GridLines - */ - public function getMajorGridlines() - { - if ($this->majorGridlines !== null) { - return $this->majorGridlines; - } - - return new PHPExcel_Chart_GridLines(); - } - - /** - * Get Minor Gridlines - * - * @return PHPExcel_Chart_GridLines - */ - public function getMinorGridlines() - { - if ($this->minorGridlines !== null) { - return $this->minorGridlines; - } - - return new PHPExcel_Chart_GridLines(); - } - - - /** - * Set the Top Left position for the chart - * - * @param string $cell - * @param integer $xOffset - * @param integer $yOffset - * @return PHPExcel_Chart - */ - public function setTopLeftPosition($cell, $xOffset = null, $yOffset = null) - { - $this->topLeftCellRef = $cell; - if (!is_null($xOffset)) { - $this->setTopLeftXOffset($xOffset); - } - if (!is_null($yOffset)) { - $this->setTopLeftYOffset($yOffset); - } - - return $this; - } - - /** - * Get the top left position of the chart - * - * @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell - */ - public function getTopLeftPosition() - { - return array( - 'cell' => $this->topLeftCellRef, - 'xOffset' => $this->topLeftXOffset, - 'yOffset' => $this->topLeftYOffset - ); - } - - /** - * Get the cell address where the top left of the chart is fixed - * - * @return string - */ - public function getTopLeftCell() - { - return $this->topLeftCellRef; - } - - /** - * Set the Top Left cell position for the chart - * - * @param string $cell - * @return PHPExcel_Chart - */ - public function setTopLeftCell($cell) - { - $this->topLeftCellRef = $cell; - - return $this; - } - - /** - * Set the offset position within the Top Left cell for the chart - * - * @param integer $xOffset - * @param integer $yOffset - * @return PHPExcel_Chart - */ - public function setTopLeftOffset($xOffset = null, $yOffset = null) - { - if (!is_null($xOffset)) { - $this->setTopLeftXOffset($xOffset); - } - if (!is_null($yOffset)) { - $this->setTopLeftYOffset($yOffset); - } - - return $this; - } - - /** - * Get the offset position within the Top Left cell for the chart - * - * @return integer[] - */ - public function getTopLeftOffset() - { - return array( - 'X' => $this->topLeftXOffset, - 'Y' => $this->topLeftYOffset - ); - } - - public function setTopLeftXOffset($xOffset) - { - $this->topLeftXOffset = $xOffset; - - return $this; - } - - public function getTopLeftXOffset() - { - return $this->topLeftXOffset; - } - - public function setTopLeftYOffset($yOffset) - { - $this->topLeftYOffset = $yOffset; - - return $this; - } - - public function getTopLeftYOffset() - { - return $this->topLeftYOffset; - } - - /** - * Set the Bottom Right position of the chart - * - * @param string $cell - * @param integer $xOffset - * @param integer $yOffset - * @return PHPExcel_Chart - */ - public function setBottomRightPosition($cell, $xOffset = null, $yOffset = null) - { - $this->bottomRightCellRef = $cell; - if (!is_null($xOffset)) { - $this->setBottomRightXOffset($xOffset); - } - if (!is_null($yOffset)) { - $this->setBottomRightYOffset($yOffset); - } - - return $this; - } - - /** - * Get the bottom right position of the chart - * - * @return array an associative array containing the cell address, X-Offset and Y-Offset from the top left of that cell - */ - public function getBottomRightPosition() - { - return array( - 'cell' => $this->bottomRightCellRef, - 'xOffset' => $this->bottomRightXOffset, - 'yOffset' => $this->bottomRightYOffset - ); - } - - public function setBottomRightCell($cell) - { - $this->bottomRightCellRef = $cell; - - return $this; - } - - /** - * Get the cell address where the bottom right of the chart is fixed - * - * @return string - */ - public function getBottomRightCell() - { - return $this->bottomRightCellRef; - } - - /** - * Set the offset position within the Bottom Right cell for the chart - * - * @param integer $xOffset - * @param integer $yOffset - * @return PHPExcel_Chart - */ - public function setBottomRightOffset($xOffset = null, $yOffset = null) - { - if (!is_null($xOffset)) { - $this->setBottomRightXOffset($xOffset); - } - if (!is_null($yOffset)) { - $this->setBottomRightYOffset($yOffset); - } - - return $this; - } - - /** - * Get the offset position within the Bottom Right cell for the chart - * - * @return integer[] - */ - public function getBottomRightOffset() - { - return array( - 'X' => $this->bottomRightXOffset, - 'Y' => $this->bottomRightYOffset - ); - } - - public function setBottomRightXOffset($xOffset) - { - $this->bottomRightXOffset = $xOffset; - - return $this; - } - - public function getBottomRightXOffset() - { - return $this->bottomRightXOffset; - } - - public function setBottomRightYOffset($yOffset) - { - $this->bottomRightYOffset = $yOffset; - - return $this; - } - - public function getBottomRightYOffset() - { - return $this->bottomRightYOffset; - } - - - public function refresh() - { - if ($this->worksheet !== null) { - $this->plotArea->refresh($this->worksheet); - } - } - - public function render($outputDestination = null) - { - $libraryName = PHPExcel_Settings::getChartRendererName(); - if (is_null($libraryName)) { - return false; - } - // Ensure that data series values are up-to-date before we render - $this->refresh(); - - $libraryPath = PHPExcel_Settings::getChartRendererPath(); - $includePath = str_replace('\\', '/', get_include_path()); - $rendererPath = str_replace('\\', '/', $libraryPath); - if (strpos($rendererPath, $includePath) === false) { - set_include_path(get_include_path() . PATH_SEPARATOR . $libraryPath); - } - - $rendererName = 'PHPExcel_Chart_Renderer_'.$libraryName; - $renderer = new $rendererName($this); - - if ($outputDestination == 'php://output') { - $outputDestination = null; - } - return $renderer->render($outputDestination); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Axis.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Axis.php deleted file mode 100644 index 9aeafc6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Axis.php +++ /dev/null @@ -1,561 +0,0 @@ - self::FORMAT_CODE_GENERAL, - 'source_linked' => 1 - ); - - /** - * Axis Options - * - * @var array of mixed - */ - private $axisOptions = array( - 'minimum' => null, - 'maximum' => null, - 'major_unit' => null, - 'minor_unit' => null, - 'orientation' => self::ORIENTATION_NORMAL, - 'minor_tick_mark' => self::TICK_MARK_NONE, - 'major_tick_mark' => self::TICK_MARK_NONE, - 'axis_labels' => self::AXIS_LABELS_NEXT_TO, - 'horizontal_crosses' => self::HORIZONTAL_CROSSES_AUTOZERO, - 'horizontal_crosses_value' => null - ); - - /** - * Fill Properties - * - * @var array of mixed - */ - private $fillProperties = array( - 'type' => self::EXCEL_COLOR_TYPE_ARGB, - 'value' => null, - 'alpha' => 0 - ); - - /** - * Line Properties - * - * @var array of mixed - */ - private $lineProperties = array( - 'type' => self::EXCEL_COLOR_TYPE_ARGB, - 'value' => null, - 'alpha' => 0 - ); - - /** - * Line Style Properties - * - * @var array of mixed - */ - private $lineStyleProperties = array( - 'width' => '9525', - 'compound' => self::LINE_STYLE_COMPOUND_SIMPLE, - 'dash' => self::LINE_STYLE_DASH_SOLID, - 'cap' => self::LINE_STYLE_CAP_FLAT, - 'join' => self::LINE_STYLE_JOIN_BEVEL, - 'arrow' => array( - 'head' => array( - 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, - 'size' => self::LINE_STYLE_ARROW_SIZE_5 - ), - 'end' => array( - 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, - 'size' => self::LINE_STYLE_ARROW_SIZE_8 - ), - ) - ); - - /** - * Shadow Properties - * - * @var array of mixed - */ - private $shadowProperties = array( - 'presets' => self::SHADOW_PRESETS_NOSHADOW, - 'effect' => null, - 'color' => array( - 'type' => self::EXCEL_COLOR_TYPE_STANDARD, - 'value' => 'black', - 'alpha' => 40, - ), - 'size' => array( - 'sx' => null, - 'sy' => null, - 'kx' => null - ), - 'blur' => null, - 'direction' => null, - 'distance' => null, - 'algn' => null, - 'rotWithShape' => null - ); - - /** - * Glow Properties - * - * @var array of mixed - */ - private $glowProperties = array( - 'size' => null, - 'color' => array( - 'type' => self::EXCEL_COLOR_TYPE_STANDARD, - 'value' => 'black', - 'alpha' => 40 - ) - ); - - /** - * Soft Edge Properties - * - * @var array of mixed - */ - private $softEdges = array( - 'size' => null - ); - - /** - * Get Series Data Type - * - * @return string - */ - public function setAxisNumberProperties($format_code) - { - $this->axisNumber['format'] = (string) $format_code; - $this->axisNumber['source_linked'] = 0; - } - - /** - * Get Axis Number Format Data Type - * - * @return string - */ - public function getAxisNumberFormat() - { - return $this->axisNumber['format']; - } - - /** - * Get Axis Number Source Linked - * - * @return string - */ - public function getAxisNumberSourceLinked() - { - return (string) $this->axisNumber['source_linked']; - } - - /** - * Set Axis Options Properties - * - * @param string $axis_labels - * @param string $horizontal_crosses_value - * @param string $horizontal_crosses - * @param string $axis_orientation - * @param string $major_tmt - * @param string $minor_tmt - * @param string $minimum - * @param string $maximum - * @param string $major_unit - * @param string $minor_unit - * - */ - public function setAxisOptionsProperties($axis_labels, $horizontal_crosses_value = null, $horizontal_crosses = null, $axis_orientation = null, $major_tmt = null, $minor_tmt = null, $minimum = null, $maximum = null, $major_unit = null, $minor_unit = null) - { - $this->axisOptions['axis_labels'] = (string) $axis_labels; - ($horizontal_crosses_value !== null) ? $this->axisOptions['horizontal_crosses_value'] = (string) $horizontal_crosses_value : null; - ($horizontal_crosses !== null) ? $this->axisOptions['horizontal_crosses'] = (string) $horizontal_crosses : null; - ($axis_orientation !== null) ? $this->axisOptions['orientation'] = (string) $axis_orientation : null; - ($major_tmt !== null) ? $this->axisOptions['major_tick_mark'] = (string) $major_tmt : null; - ($minor_tmt !== null) ? $this->axisOptions['minor_tick_mark'] = (string) $minor_tmt : null; - ($minor_tmt !== null) ? $this->axisOptions['minor_tick_mark'] = (string) $minor_tmt : null; - ($minimum !== null) ? $this->axisOptions['minimum'] = (string) $minimum : null; - ($maximum !== null) ? $this->axisOptions['maximum'] = (string) $maximum : null; - ($major_unit !== null) ? $this->axisOptions['major_unit'] = (string) $major_unit : null; - ($minor_unit !== null) ? $this->axisOptions['minor_unit'] = (string) $minor_unit : null; - } - - /** - * Get Axis Options Property - * - * @param string $property - * - * @return string - */ - public function getAxisOptionsProperty($property) - { - return $this->axisOptions[$property]; - } - - /** - * Set Axis Orientation Property - * - * @param string $orientation - * - */ - public function setAxisOrientation($orientation) - { - $this->orientation = (string) $orientation; - } - - /** - * Set Fill Property - * - * @param string $color - * @param int $alpha - * @param string $type - * - */ - public function setFillParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB) - { - $this->fillProperties = $this->setColorProperties($color, $alpha, $type); - } - - /** - * Set Line Property - * - * @param string $color - * @param int $alpha - * @param string $type - * - */ - public function setLineParameters($color, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_ARGB) - { - $this->lineProperties = $this->setColorProperties($color, $alpha, $type); - } - - /** - * Get Fill Property - * - * @param string $property - * - * @return string - */ - public function getFillProperty($property) - { - return $this->fillProperties[$property]; - } - - /** - * Get Line Property - * - * @param string $property - * - * @return string - */ - public function getLineProperty($property) - { - return $this->lineProperties[$property]; - } - - /** - * Set Line Style Properties - * - * @param float $line_width - * @param string $compound_type - * @param string $dash_type - * @param string $cap_type - * @param string $join_type - * @param string $head_arrow_type - * @param string $head_arrow_size - * @param string $end_arrow_type - * @param string $end_arrow_size - * - */ - public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null) - { - (!is_null($line_width)) ? $this->lineStyleProperties['width'] = $this->getExcelPointsWidth((float) $line_width) : null; - (!is_null($compound_type)) ? $this->lineStyleProperties['compound'] = (string) $compound_type : null; - (!is_null($dash_type)) ? $this->lineStyleProperties['dash'] = (string) $dash_type : null; - (!is_null($cap_type)) ? $this->lineStyleProperties['cap'] = (string) $cap_type : null; - (!is_null($join_type)) ? $this->lineStyleProperties['join'] = (string) $join_type : null; - (!is_null($head_arrow_type)) ? $this->lineStyleProperties['arrow']['head']['type'] = (string) $head_arrow_type : null; - (!is_null($head_arrow_size)) ? $this->lineStyleProperties['arrow']['head']['size'] = (string) $head_arrow_size : null; - (!is_null($end_arrow_type)) ? $this->lineStyleProperties['arrow']['end']['type'] = (string) $end_arrow_type : null; - (!is_null($end_arrow_size)) ? $this->lineStyleProperties['arrow']['end']['size'] = (string) $end_arrow_size : null; - } - - /** - * Get Line Style Property - * - * @param array|string $elements - * - * @return string - */ - public function getLineStyleProperty($elements) - { - return $this->getArrayElementsValue($this->lineStyleProperties, $elements); - } - - /** - * Get Line Style Arrow Excel Width - * - * @param string $arrow - * - * @return string - */ - public function getLineStyleArrowWidth($arrow) - { - return $this->getLineStyleArrowSize($this->lineStyleProperties['arrow'][$arrow]['size'], 'w'); - } - - /** - * Get Line Style Arrow Excel Length - * - * @param string $arrow - * - * @return string - */ - public function getLineStyleArrowLength($arrow) - { - return $this->getLineStyleArrowSize($this->lineStyleProperties['arrow'][$arrow]['size'], 'len'); - } - - /** - * Set Shadow Properties - * - * @param int $shadow_presets - * @param string $sh_color_value - * @param string $sh_color_type - * @param string $sh_color_alpha - * @param float $sh_blur - * @param int $sh_angle - * @param float $sh_distance - * - */ - public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null) - { - $this->setShadowPresetsProperties((int) $sh_presets) - ->setShadowColor( - is_null($sh_color_value) ? $this->shadowProperties['color']['value'] : $sh_color_value, - is_null($sh_color_alpha) ? (int) $this->shadowProperties['color']['alpha'] : $sh_color_alpha, - is_null($sh_color_type) ? $this->shadowProperties['color']['type'] : $sh_color_type - ) - ->setShadowBlur($sh_blur) - ->setShadowAngle($sh_angle) - ->setShadowDistance($sh_distance); - } - - /** - * Set Shadow Color - * - * @param int $shadow_presets - * - * @return PHPExcel_Chart_Axis - */ - private function setShadowPresetsProperties($shadow_presets) - { - $this->shadowProperties['presets'] = $shadow_presets; - $this->setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets)); - - return $this; - } - - /** - * Set Shadow Properties from Maped Values - * - * @param array $properties_map - * @param * $reference - * - * @return PHPExcel_Chart_Axis - */ - private function setShadowProperiesMapValues(array $properties_map, &$reference = null) - { - $base_reference = $reference; - foreach ($properties_map as $property_key => $property_val) { - if (is_array($property_val)) { - if ($reference === null) { - $reference = & $this->shadowProperties[$property_key]; - } else { - $reference = & $reference[$property_key]; - } - $this->setShadowProperiesMapValues($property_val, $reference); - } else { - if ($base_reference === null) { - $this->shadowProperties[$property_key] = $property_val; - } else { - $reference[$property_key] = $property_val; - } - } - } - - return $this; - } - - /** - * Set Shadow Color - * - * @param string $color - * @param int $alpha - * @param string $type - * - * @return PHPExcel_Chart_Axis - */ - private function setShadowColor($color, $alpha, $type) - { - $this->shadowProperties['color'] = $this->setColorProperties($color, $alpha, $type); - - return $this; - } - - /** - * Set Shadow Blur - * - * @param float $blur - * - * @return PHPExcel_Chart_Axis - */ - private function setShadowBlur($blur) - { - if ($blur !== null) { - $this->shadowProperties['blur'] = (string) $this->getExcelPointsWidth($blur); - } - - return $this; - } - - /** - * Set Shadow Angle - * - * @param int $angle - * - * @return PHPExcel_Chart_Axis - */ - private function setShadowAngle($angle) - { - if ($angle !== null) { - $this->shadowProperties['direction'] = (string) $this->getExcelPointsAngle($angle); - } - - return $this; - } - - /** - * Set Shadow Distance - * - * @param float $distance - * - * @return PHPExcel_Chart_Axis - */ - private function setShadowDistance($distance) - { - if ($distance !== null) { - $this->shadowProperties['distance'] = (string) $this->getExcelPointsWidth($distance); - } - - return $this; - } - - /** - * Get Glow Property - * - * @param float $size - * @param string $color_value - * @param int $color_alpha - * @param string $color_type - */ - public function getShadowProperty($elements) - { - return $this->getArrayElementsValue($this->shadowProperties, $elements); - } - - /** - * Set Glow Properties - * - * @param float $size - * @param string $color_value - * @param int $color_alpha - * @param string $color_type - */ - public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null) - { - $this->setGlowSize($size) - ->setGlowColor( - is_null($color_value) ? $this->glowProperties['color']['value'] : $color_value, - is_null($color_alpha) ? (int) $this->glowProperties['color']['alpha'] : $color_alpha, - is_null($color_type) ? $this->glowProperties['color']['type'] : $color_type - ); - } - - /** - * Get Glow Property - * - * @param array|string $property - * - * @return string - */ - public function getGlowProperty($property) - { - return $this->getArrayElementsValue($this->glowProperties, $property); - } - - /** - * Set Glow Color - * - * @param float $size - * - * @return PHPExcel_Chart_Axis - */ - private function setGlowSize($size) - { - if (!is_null($size)) { - $this->glowProperties['size'] = $this->getExcelPointsWidth($size); - } - - return $this; - } - - /** - * Set Glow Color - * - * @param string $color - * @param int $alpha - * @param string $type - * - * @return PHPExcel_Chart_Axis - */ - private function setGlowColor($color, $alpha, $type) - { - $this->glowProperties['color'] = $this->setColorProperties($color, $alpha, $type); - - return $this; - } - - /** - * Set Soft Edges Size - * - * @param float $size - */ - public function setSoftEdges($size) - { - if (!is_null($size)) { - $softEdges['size'] = (string) $this->getExcelPointsWidth($size); - } - } - - /** - * Get Soft Edges Size - * - * @return string - */ - public function getSoftEdgesSize() - { - return $this->softEdges['size']; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeries.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeries.php deleted file mode 100644 index 9ecd543..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeries.php +++ /dev/null @@ -1,390 +0,0 @@ -plotType = $plotType; - $this->plotGrouping = $plotGrouping; - $this->plotOrder = $plotOrder; - $keys = array_keys($plotValues); - $this->plotValues = $plotValues; - if ((count($plotLabel) == 0) || (is_null($plotLabel[$keys[0]]))) { - $plotLabel[$keys[0]] = new PHPExcel_Chart_DataSeriesValues(); - } - - $this->plotLabel = $plotLabel; - if ((count($plotCategory) == 0) || (is_null($plotCategory[$keys[0]]))) { - $plotCategory[$keys[0]] = new PHPExcel_Chart_DataSeriesValues(); - } - $this->plotCategory = $plotCategory; - $this->smoothLine = $smoothLine; - $this->plotStyle = $plotStyle; - - if (is_null($plotDirection)) { - $plotDirection = self::DIRECTION_COL; - } - $this->plotDirection = $plotDirection; - } - - /** - * Get Plot Type - * - * @return string - */ - public function getPlotType() - { - return $this->plotType; - } - - /** - * Set Plot Type - * - * @param string $plotType - * @return PHPExcel_Chart_DataSeries - */ - public function setPlotType($plotType = '') - { - $this->plotType = $plotType; - return $this; - } - - /** - * Get Plot Grouping Type - * - * @return string - */ - public function getPlotGrouping() - { - return $this->plotGrouping; - } - - /** - * Set Plot Grouping Type - * - * @param string $groupingType - * @return PHPExcel_Chart_DataSeries - */ - public function setPlotGrouping($groupingType = null) - { - $this->plotGrouping = $groupingType; - return $this; - } - - /** - * Get Plot Direction - * - * @return string - */ - public function getPlotDirection() - { - return $this->plotDirection; - } - - /** - * Set Plot Direction - * - * @param string $plotDirection - * @return PHPExcel_Chart_DataSeries - */ - public function setPlotDirection($plotDirection = null) - { - $this->plotDirection = $plotDirection; - return $this; - } - - /** - * Get Plot Order - * - * @return string - */ - public function getPlotOrder() - { - return $this->plotOrder; - } - - /** - * Get Plot Labels - * - * @return array of PHPExcel_Chart_DataSeriesValues - */ - public function getPlotLabels() - { - return $this->plotLabel; - } - - /** - * Get Plot Label by Index - * - * @return PHPExcel_Chart_DataSeriesValues - */ - public function getPlotLabelByIndex($index) - { - $keys = array_keys($this->plotLabel); - if (in_array($index, $keys)) { - return $this->plotLabel[$index]; - } elseif (isset($keys[$index])) { - return $this->plotLabel[$keys[$index]]; - } - return false; - } - - /** - * Get Plot Categories - * - * @return array of PHPExcel_Chart_DataSeriesValues - */ - public function getPlotCategories() - { - return $this->plotCategory; - } - - /** - * Get Plot Category by Index - * - * @return PHPExcel_Chart_DataSeriesValues - */ - public function getPlotCategoryByIndex($index) - { - $keys = array_keys($this->plotCategory); - if (in_array($index, $keys)) { - return $this->plotCategory[$index]; - } elseif (isset($keys[$index])) { - return $this->plotCategory[$keys[$index]]; - } - return false; - } - - /** - * Get Plot Style - * - * @return string - */ - public function getPlotStyle() - { - return $this->plotStyle; - } - - /** - * Set Plot Style - * - * @param string $plotStyle - * @return PHPExcel_Chart_DataSeries - */ - public function setPlotStyle($plotStyle = null) - { - $this->plotStyle = $plotStyle; - return $this; - } - - /** - * Get Plot Values - * - * @return array of PHPExcel_Chart_DataSeriesValues - */ - public function getPlotValues() - { - return $this->plotValues; - } - - /** - * Get Plot Values by Index - * - * @return PHPExcel_Chart_DataSeriesValues - */ - public function getPlotValuesByIndex($index) - { - $keys = array_keys($this->plotValues); - if (in_array($index, $keys)) { - return $this->plotValues[$index]; - } elseif (isset($keys[$index])) { - return $this->plotValues[$keys[$index]]; - } - return false; - } - - /** - * Get Number of Plot Series - * - * @return integer - */ - public function getPlotSeriesCount() - { - return count($this->plotValues); - } - - /** - * Get Smooth Line - * - * @return boolean - */ - public function getSmoothLine() - { - return $this->smoothLine; - } - - /** - * Set Smooth Line - * - * @param boolean $smoothLine - * @return PHPExcel_Chart_DataSeries - */ - public function setSmoothLine($smoothLine = true) - { - $this->smoothLine = $smoothLine; - return $this; - } - - public function refresh(PHPExcel_Worksheet $worksheet) - { - foreach ($this->plotValues as $plotValues) { - if ($plotValues !== null) { - $plotValues->refresh($worksheet, true); - } - } - foreach ($this->plotLabel as $plotValues) { - if ($plotValues !== null) { - $plotValues->refresh($worksheet, true); - } - } - foreach ($this->plotCategory as $plotValues) { - if ($plotValues !== null) { - $plotValues->refresh($worksheet, false); - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeriesValues.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeriesValues.php deleted file mode 100644 index ea57e52..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/DataSeriesValues.php +++ /dev/null @@ -1,333 +0,0 @@ -setDataType($dataType); - $this->dataSource = $dataSource; - $this->formatCode = $formatCode; - $this->pointCount = $pointCount; - $this->dataValues = $dataValues; - $this->pointMarker = $marker; - } - - /** - * Get Series Data Type - * - * @return string - */ - public function getDataType() - { - return $this->dataType; - } - - /** - * Set Series Data Type - * - * @param string $dataType Datatype of this data series - * Typical values are: - * PHPExcel_Chart_DataSeriesValues::DATASERIES_TYPE_STRING - * Normally used for axis point values - * PHPExcel_Chart_DataSeriesValues::DATASERIES_TYPE_NUMBER - * Normally used for chart data values - * @return PHPExcel_Chart_DataSeriesValues - */ - public function setDataType($dataType = self::DATASERIES_TYPE_NUMBER) - { - if (!in_array($dataType, self::$dataTypeValues)) { - throw new PHPExcel_Chart_Exception('Invalid datatype for chart data series values'); - } - $this->dataType = $dataType; - - return $this; - } - - /** - * Get Series Data Source (formula) - * - * @return string - */ - public function getDataSource() - { - return $this->dataSource; - } - - /** - * Set Series Data Source (formula) - * - * @param string $dataSource - * @return PHPExcel_Chart_DataSeriesValues - */ - public function setDataSource($dataSource = null, $refreshDataValues = true) - { - $this->dataSource = $dataSource; - - if ($refreshDataValues) { - // TO DO - } - - return $this; - } - - /** - * Get Point Marker - * - * @return string - */ - public function getPointMarker() - { - return $this->pointMarker; - } - - /** - * Set Point Marker - * - * @param string $marker - * @return PHPExcel_Chart_DataSeriesValues - */ - public function setPointMarker($marker = null) - { - $this->pointMarker = $marker; - - return $this; - } - - /** - * Get Series Format Code - * - * @return string - */ - public function getFormatCode() - { - return $this->formatCode; - } - - /** - * Set Series Format Code - * - * @param string $formatCode - * @return PHPExcel_Chart_DataSeriesValues - */ - public function setFormatCode($formatCode = null) - { - $this->formatCode = $formatCode; - - return $this; - } - - /** - * Get Series Point Count - * - * @return integer - */ - public function getPointCount() - { - return $this->pointCount; - } - - /** - * Identify if the Data Series is a multi-level or a simple series - * - * @return boolean - */ - public function isMultiLevelSeries() - { - if (count($this->dataValues) > 0) { - return is_array($this->dataValues[0]); - } - return null; - } - - /** - * Return the level count of a multi-level Data Series - * - * @return boolean - */ - public function multiLevelCount() - { - $levelCount = 0; - foreach ($this->dataValues as $dataValueSet) { - $levelCount = max($levelCount, count($dataValueSet)); - } - return $levelCount; - } - - /** - * Get Series Data Values - * - * @return array of mixed - */ - public function getDataValues() - { - return $this->dataValues; - } - - /** - * Get the first Series Data value - * - * @return mixed - */ - public function getDataValue() - { - $count = count($this->dataValues); - if ($count == 0) { - return null; - } elseif ($count == 1) { - return $this->dataValues[0]; - } - return $this->dataValues; - } - - /** - * Set Series Data Values - * - * @param array $dataValues - * @param boolean $refreshDataSource - * TRUE - refresh the value of dataSource based on the values of $dataValues - * FALSE - don't change the value of dataSource - * @return PHPExcel_Chart_DataSeriesValues - */ - public function setDataValues($dataValues = array(), $refreshDataSource = true) - { - $this->dataValues = PHPExcel_Calculation_Functions::flattenArray($dataValues); - $this->pointCount = count($dataValues); - - if ($refreshDataSource) { - // TO DO - } - - return $this; - } - - private function stripNulls($var) - { - return $var !== null; - } - - public function refresh(PHPExcel_Worksheet $worksheet, $flatten = true) - { - if ($this->dataSource !== null) { - $calcEngine = PHPExcel_Calculation::getInstance($worksheet->getParent()); - $newDataValues = PHPExcel_Calculation::unwrapResult( - $calcEngine->_calculateFormulaValue( - '='.$this->dataSource, - null, - $worksheet->getCell('A1') - ) - ); - if ($flatten) { - $this->dataValues = PHPExcel_Calculation_Functions::flattenArray($newDataValues); - foreach ($this->dataValues as &$dataValue) { - if ((!empty($dataValue)) && ($dataValue[0] == '#')) { - $dataValue = 0.0; - } - } - unset($dataValue); - } else { - $cellRange = explode('!', $this->dataSource); - if (count($cellRange) > 1) { - list(, $cellRange) = $cellRange; - } - - $dimensions = PHPExcel_Cell::rangeDimension(str_replace('$', '', $cellRange)); - if (($dimensions[0] == 1) || ($dimensions[1] == 1)) { - $this->dataValues = PHPExcel_Calculation_Functions::flattenArray($newDataValues); - } else { - $newArray = array_values(array_shift($newDataValues)); - foreach ($newArray as $i => $newDataSet) { - $newArray[$i] = array($newDataSet); - } - - foreach ($newDataValues as $newDataSet) { - $i = 0; - foreach ($newDataSet as $newDataVal) { - array_unshift($newArray[$i++], $newDataVal); - } - } - $this->dataValues = $newArray; - } - } - $this->pointCount = count($this->dataValues); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Exception.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Exception.php deleted file mode 100644 index e20dfa5..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Exception.php +++ /dev/null @@ -1,46 +0,0 @@ -line = $line; - $e->file = $file; - throw $e; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/GridLines.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/GridLines.php deleted file mode 100644 index 898012e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/GridLines.php +++ /dev/null @@ -1,472 +0,0 @@ - array( - 'type' => self::EXCEL_COLOR_TYPE_STANDARD, - 'value' => null, - 'alpha' => 0 - ), - 'style' => array( - 'width' => '9525', - 'compound' => self::LINE_STYLE_COMPOUND_SIMPLE, - 'dash' => self::LINE_STYLE_DASH_SOLID, - 'cap' => self::LINE_STYLE_CAP_FLAT, - 'join' => self::LINE_STYLE_JOIN_BEVEL, - 'arrow' => array( - 'head' => array( - 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, - 'size' => self::LINE_STYLE_ARROW_SIZE_5 - ), - 'end' => array( - 'type' => self::LINE_STYLE_ARROW_TYPE_NOARROW, - 'size' => self::LINE_STYLE_ARROW_SIZE_8 - ), - ) - ) - ); - - private $shadowProperties = array( - 'presets' => self::SHADOW_PRESETS_NOSHADOW, - 'effect' => null, - 'color' => array( - 'type' => self::EXCEL_COLOR_TYPE_STANDARD, - 'value' => 'black', - 'alpha' => 85, - ), - 'size' => array( - 'sx' => null, - 'sy' => null, - 'kx' => null - ), - 'blur' => null, - 'direction' => null, - 'distance' => null, - 'algn' => null, - 'rotWithShape' => null - ); - - private $glowProperties = array( - 'size' => null, - 'color' => array( - 'type' => self::EXCEL_COLOR_TYPE_STANDARD, - 'value' => 'black', - 'alpha' => 40 - ) - ); - - private $softEdges = array( - 'size' => null - ); - - /** - * Get Object State - * - * @return bool - */ - - public function getObjectState() - { - return $this->objectState; - } - - /** - * Change Object State to True - * - * @return PHPExcel_Chart_GridLines - */ - - private function activateObject() - { - $this->objectState = true; - - return $this; - } - - /** - * Set Line Color Properties - * - * @param string $value - * @param int $alpha - * @param string $type - */ - - public function setLineColorProperties($value, $alpha = 0, $type = self::EXCEL_COLOR_TYPE_STANDARD) - { - $this->activateObject() - ->lineProperties['color'] = $this->setColorProperties( - $value, - $alpha, - $type - ); - } - - /** - * Set Line Color Properties - * - * @param float $line_width - * @param string $compound_type - * @param string $dash_type - * @param string $cap_type - * @param string $join_type - * @param string $head_arrow_type - * @param string $head_arrow_size - * @param string $end_arrow_type - * @param string $end_arrow_size - */ - - public function setLineStyleProperties($line_width = null, $compound_type = null, $dash_type = null, $cap_type = null, $join_type = null, $head_arrow_type = null, $head_arrow_size = null, $end_arrow_type = null, $end_arrow_size = null) - { - $this->activateObject(); - (!is_null($line_width)) - ? $this->lineProperties['style']['width'] = $this->getExcelPointsWidth((float) $line_width) - : null; - (!is_null($compound_type)) - ? $this->lineProperties['style']['compound'] = (string) $compound_type - : null; - (!is_null($dash_type)) - ? $this->lineProperties['style']['dash'] = (string) $dash_type - : null; - (!is_null($cap_type)) - ? $this->lineProperties['style']['cap'] = (string) $cap_type - : null; - (!is_null($join_type)) - ? $this->lineProperties['style']['join'] = (string) $join_type - : null; - (!is_null($head_arrow_type)) - ? $this->lineProperties['style']['arrow']['head']['type'] = (string) $head_arrow_type - : null; - (!is_null($head_arrow_size)) - ? $this->lineProperties['style']['arrow']['head']['size'] = (string) $head_arrow_size - : null; - (!is_null($end_arrow_type)) - ? $this->lineProperties['style']['arrow']['end']['type'] = (string) $end_arrow_type - : null; - (!is_null($end_arrow_size)) - ? $this->lineProperties['style']['arrow']['end']['size'] = (string) $end_arrow_size - : null; - } - - /** - * Get Line Color Property - * - * @param string $parameter - * - * @return string - */ - - public function getLineColorProperty($parameter) - { - return $this->lineProperties['color'][$parameter]; - } - - /** - * Get Line Style Property - * - * @param array|string $elements - * - * @return string - */ - - public function getLineStyleProperty($elements) - { - return $this->getArrayElementsValue($this->lineProperties['style'], $elements); - } - - /** - * Set Glow Properties - * - * @param float $size - * @param string $color_value - * @param int $color_alpha - * @param string $color_type - * - */ - - public function setGlowProperties($size, $color_value = null, $color_alpha = null, $color_type = null) - { - $this - ->activateObject() - ->setGlowSize($size) - ->setGlowColor($color_value, $color_alpha, $color_type); - } - - /** - * Get Glow Color Property - * - * @param string $property - * - * @return string - */ - - public function getGlowColor($property) - { - return $this->glowProperties['color'][$property]; - } - - /** - * Get Glow Size - * - * @return string - */ - - public function getGlowSize() - { - return $this->glowProperties['size']; - } - - /** - * Set Glow Size - * - * @param float $size - * - * @return PHPExcel_Chart_GridLines - */ - - private function setGlowSize($size) - { - $this->glowProperties['size'] = $this->getExcelPointsWidth((float) $size); - - return $this; - } - - /** - * Set Glow Color - * - * @param string $color - * @param int $alpha - * @param string $type - * - * @return PHPExcel_Chart_GridLines - */ - - private function setGlowColor($color, $alpha, $type) - { - if (!is_null($color)) { - $this->glowProperties['color']['value'] = (string) $color; - } - if (!is_null($alpha)) { - $this->glowProperties['color']['alpha'] = $this->getTrueAlpha((int) $alpha); - } - if (!is_null($type)) { - $this->glowProperties['color']['type'] = (string) $type; - } - - return $this; - } - - /** - * Get Line Style Arrow Parameters - * - * @param string $arrow_selector - * @param string $property_selector - * - * @return string - */ - - public function getLineStyleArrowParameters($arrow_selector, $property_selector) - { - return $this->getLineStyleArrowSize($this->lineProperties['style']['arrow'][$arrow_selector]['size'], $property_selector); - } - - /** - * Set Shadow Properties - * - * @param int $sh_presets - * @param string $sh_color_value - * @param string $sh_color_type - * @param int $sh_color_alpha - * @param string $sh_blur - * @param int $sh_angle - * @param float $sh_distance - * - */ - - public function setShadowProperties($sh_presets, $sh_color_value = null, $sh_color_type = null, $sh_color_alpha = null, $sh_blur = null, $sh_angle = null, $sh_distance = null) - { - $this->activateObject() - ->setShadowPresetsProperties((int) $sh_presets) - ->setShadowColor( - is_null($sh_color_value) ? $this->shadowProperties['color']['value'] : $sh_color_value, - is_null($sh_color_alpha) ? (int) $this->shadowProperties['color']['alpha'] : $this->getTrueAlpha($sh_color_alpha), - is_null($sh_color_type) ? $this->shadowProperties['color']['type'] : $sh_color_type - ) - ->setShadowBlur($sh_blur) - ->setShadowAngle($sh_angle) - ->setShadowDistance($sh_distance); - } - - /** - * Set Shadow Presets Properties - * - * @param int $shadow_presets - * - * @return PHPExcel_Chart_GridLines - */ - - private function setShadowPresetsProperties($shadow_presets) - { - $this->shadowProperties['presets'] = $shadow_presets; - $this->setShadowProperiesMapValues($this->getShadowPresetsMap($shadow_presets)); - - return $this; - } - - /** - * Set Shadow Properties Values - * - * @param array $properties_map - * @param * $reference - * - * @return PHPExcel_Chart_GridLines - */ - - private function setShadowProperiesMapValues(array $properties_map, &$reference = null) - { - $base_reference = $reference; - foreach ($properties_map as $property_key => $property_val) { - if (is_array($property_val)) { - if ($reference === null) { - $reference = & $this->shadowProperties[$property_key]; - } else { - $reference = & $reference[$property_key]; - } - $this->setShadowProperiesMapValues($property_val, $reference); - } else { - if ($base_reference === null) { - $this->shadowProperties[$property_key] = $property_val; - } else { - $reference[$property_key] = $property_val; - } - } - } - - return $this; - } - - /** - * Set Shadow Color - * - * @param string $color - * @param int $alpha - * @param string $type - * @return PHPExcel_Chart_GridLines - */ - private function setShadowColor($color, $alpha, $type) - { - if (!is_null($color)) { - $this->shadowProperties['color']['value'] = (string) $color; - } - if (!is_null($alpha)) { - $this->shadowProperties['color']['alpha'] = $this->getTrueAlpha((int) $alpha); - } - if (!is_null($type)) { - $this->shadowProperties['color']['type'] = (string) $type; - } - - return $this; - } - - /** - * Set Shadow Blur - * - * @param float $blur - * - * @return PHPExcel_Chart_GridLines - */ - private function setShadowBlur($blur) - { - if ($blur !== null) { - $this->shadowProperties['blur'] = (string) $this->getExcelPointsWidth($blur); - } - - return $this; - } - - /** - * Set Shadow Angle - * - * @param int $angle - * @return PHPExcel_Chart_GridLines - */ - - private function setShadowAngle($angle) - { - if ($angle !== null) { - $this->shadowProperties['direction'] = (string) $this->getExcelPointsAngle($angle); - } - - return $this; - } - - /** - * Set Shadow Distance - * - * @param float $distance - * @return PHPExcel_Chart_GridLines - */ - private function setShadowDistance($distance) - { - if ($distance !== null) { - $this->shadowProperties['distance'] = (string) $this->getExcelPointsWidth($distance); - } - - return $this; - } - - /** - * Get Shadow Property - * - * @param string $elements - * @param array $elements - * @return string - */ - public function getShadowProperty($elements) - { - return $this->getArrayElementsValue($this->shadowProperties, $elements); - } - - /** - * Set Soft Edges Size - * - * @param float $size - */ - public function setSoftEdgesSize($size) - { - if (!is_null($size)) { - $this->activateObject(); - $softEdges['size'] = (string) $this->getExcelPointsWidth($size); - } - } - - /** - * Get Soft Edges Size - * - * @return string - */ - public function getSoftEdgesSize() - { - return $this->softEdges['size']; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Layout.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Layout.php deleted file mode 100644 index 7fef074..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Layout.php +++ /dev/null @@ -1,486 +0,0 @@ -layoutTarget = $layout['layoutTarget']; - } - if (isset($layout['xMode'])) { - $this->xMode = $layout['xMode']; - } - if (isset($layout['yMode'])) { - $this->yMode = $layout['yMode']; - } - if (isset($layout['x'])) { - $this->xPos = (float) $layout['x']; - } - if (isset($layout['y'])) { - $this->yPos = (float) $layout['y']; - } - if (isset($layout['w'])) { - $this->width = (float) $layout['w']; - } - if (isset($layout['h'])) { - $this->height = (float) $layout['h']; - } - } - - /** - * Get Layout Target - * - * @return string - */ - public function getLayoutTarget() - { - return $this->layoutTarget; - } - - /** - * Set Layout Target - * - * @param Layout Target $value - * @return PHPExcel_Chart_Layout - */ - public function setLayoutTarget($value) - { - $this->layoutTarget = $value; - return $this; - } - - /** - * Get X-Mode - * - * @return string - */ - public function getXMode() - { - return $this->xMode; - } - - /** - * Set X-Mode - * - * @param X-Mode $value - * @return PHPExcel_Chart_Layout - */ - public function setXMode($value) - { - $this->xMode = $value; - return $this; - } - - /** - * Get Y-Mode - * - * @return string - */ - public function getYMode() - { - return $this->yMode; - } - - /** - * Set Y-Mode - * - * @param Y-Mode $value - * @return PHPExcel_Chart_Layout - */ - public function setYMode($value) - { - $this->yMode = $value; - return $this; - } - - /** - * Get X-Position - * - * @return number - */ - public function getXPosition() - { - return $this->xPos; - } - - /** - * Set X-Position - * - * @param X-Position $value - * @return PHPExcel_Chart_Layout - */ - public function setXPosition($value) - { - $this->xPos = $value; - return $this; - } - - /** - * Get Y-Position - * - * @return number - */ - public function getYPosition() - { - return $this->yPos; - } - - /** - * Set Y-Position - * - * @param Y-Position $value - * @return PHPExcel_Chart_Layout - */ - public function setYPosition($value) - { - $this->yPos = $value; - return $this; - } - - /** - * Get Width - * - * @return number - */ - public function getWidth() - { - return $this->width; - } - - /** - * Set Width - * - * @param Width $value - * @return PHPExcel_Chart_Layout - */ - public function setWidth($value) - { - $this->width = $value; - return $this; - } - - /** - * Get Height - * - * @return number - */ - public function getHeight() - { - return $this->height; - } - - /** - * Set Height - * - * @param Height $value - * @return PHPExcel_Chart_Layout - */ - public function setHeight($value) - { - $this->height = $value; - return $this; - } - - - /** - * Get show legend key - * - * @return boolean - */ - public function getShowLegendKey() - { - return $this->showLegendKey; - } - - /** - * Set show legend key - * Specifies that legend keys should be shown in data labels. - * - * @param boolean $value Show legend key - * @return PHPExcel_Chart_Layout - */ - public function setShowLegendKey($value) - { - $this->showLegendKey = $value; - return $this; - } - - /** - * Get show value - * - * @return boolean - */ - public function getShowVal() - { - return $this->showVal; - } - - /** - * Set show val - * Specifies that the value should be shown in data labels. - * - * @param boolean $value Show val - * @return PHPExcel_Chart_Layout - */ - public function setShowVal($value) - { - $this->showVal = $value; - return $this; - } - - /** - * Get show category name - * - * @return boolean - */ - public function getShowCatName() - { - return $this->showCatName; - } - - /** - * Set show cat name - * Specifies that the category name should be shown in data labels. - * - * @param boolean $value Show cat name - * @return PHPExcel_Chart_Layout - */ - public function setShowCatName($value) - { - $this->showCatName = $value; - return $this; - } - - /** - * Get show data series name - * - * @return boolean - */ - public function getShowSerName() - { - return $this->showSerName; - } - - /** - * Set show ser name - * Specifies that the series name should be shown in data labels. - * - * @param boolean $value Show series name - * @return PHPExcel_Chart_Layout - */ - public function setShowSerName($value) - { - $this->showSerName = $value; - return $this; - } - - /** - * Get show percentage - * - * @return boolean - */ - public function getShowPercent() - { - return $this->showPercent; - } - - /** - * Set show percentage - * Specifies that the percentage should be shown in data labels. - * - * @param boolean $value Show percentage - * @return PHPExcel_Chart_Layout - */ - public function setShowPercent($value) - { - $this->showPercent = $value; - return $this; - } - - /** - * Get show bubble size - * - * @return boolean - */ - public function getShowBubbleSize() - { - return $this->showBubbleSize; - } - - /** - * Set show bubble size - * Specifies that the bubble size should be shown in data labels. - * - * @param boolean $value Show bubble size - * @return PHPExcel_Chart_Layout - */ - public function setShowBubbleSize($value) - { - $this->showBubbleSize = $value; - return $this; - } - - /** - * Get show leader lines - * - * @return boolean - */ - public function getShowLeaderLines() - { - return $this->showLeaderLines; - } - - /** - * Set show leader lines - * Specifies that leader lines should be shown in data labels. - * - * @param boolean $value Show leader lines - * @return PHPExcel_Chart_Layout - */ - public function setShowLeaderLines($value) - { - $this->showLeaderLines = $value; - return $this; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Legend.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Legend.php deleted file mode 100644 index e850eb5..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Legend.php +++ /dev/null @@ -1,170 +0,0 @@ - self::POSITION_BOTTOM, - self::xlLegendPositionCorner => self::POSITION_TOPRIGHT, - self::xlLegendPositionCustom => '??', - self::xlLegendPositionLeft => self::POSITION_LEFT, - self::xlLegendPositionRight => self::POSITION_RIGHT, - self::xlLegendPositionTop => self::POSITION_TOP - ); - - /** - * Legend position - * - * @var string - */ - private $position = self::POSITION_RIGHT; - - /** - * Allow overlay of other elements? - * - * @var boolean - */ - private $overlay = true; - - /** - * Legend Layout - * - * @var PHPExcel_Chart_Layout - */ - private $layout = null; - - - /** - * Create a new PHPExcel_Chart_Legend - */ - public function __construct($position = self::POSITION_RIGHT, PHPExcel_Chart_Layout $layout = null, $overlay = false) - { - $this->setPosition($position); - $this->layout = $layout; - $this->setOverlay($overlay); - } - - /** - * Get legend position as an excel string value - * - * @return string - */ - public function getPosition() - { - return $this->position; - } - - /** - * Get legend position using an excel string value - * - * @param string $position - */ - public function setPosition($position = self::POSITION_RIGHT) - { - if (!in_array($position, self::$positionXLref)) { - return false; - } - - $this->position = $position; - return true; - } - - /** - * Get legend position as an Excel internal numeric value - * - * @return number - */ - public function getPositionXL() - { - return array_search($this->position, self::$positionXLref); - } - - /** - * Set legend position using an Excel internal numeric value - * - * @param number $positionXL - */ - public function setPositionXL($positionXL = self::xlLegendPositionRight) - { - if (!array_key_exists($positionXL, self::$positionXLref)) { - return false; - } - - $this->position = self::$positionXLref[$positionXL]; - return true; - } - - /** - * Get allow overlay of other elements? - * - * @return boolean - */ - public function getOverlay() - { - return $this->overlay; - } - - /** - * Set allow overlay of other elements? - * - * @param boolean $overlay - * @return boolean - */ - public function setOverlay($overlay = false) - { - if (!is_bool($overlay)) { - return false; - } - - $this->overlay = $overlay; - return true; - } - - /** - * Get Layout - * - * @return PHPExcel_Chart_Layout - */ - public function getLayout() - { - return $this->layout; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/PlotArea.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/PlotArea.php deleted file mode 100644 index 551cc51..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/PlotArea.php +++ /dev/null @@ -1,126 +0,0 @@ -layout = $layout; - $this->plotSeries = $plotSeries; - } - - /** - * Get Layout - * - * @return PHPExcel_Chart_Layout - */ - public function getLayout() - { - return $this->layout; - } - - /** - * Get Number of Plot Groups - * - * @return array of PHPExcel_Chart_DataSeries - */ - public function getPlotGroupCount() - { - return count($this->plotSeries); - } - - /** - * Get Number of Plot Series - * - * @return integer - */ - public function getPlotSeriesCount() - { - $seriesCount = 0; - foreach ($this->plotSeries as $plot) { - $seriesCount += $plot->getPlotSeriesCount(); - } - return $seriesCount; - } - - /** - * Get Plot Series - * - * @return array of PHPExcel_Chart_DataSeries - */ - public function getPlotGroup() - { - return $this->plotSeries; - } - - /** - * Get Plot Series by Index - * - * @return PHPExcel_Chart_DataSeries - */ - public function getPlotGroupByIndex($index) - { - return $this->plotSeries[$index]; - } - - /** - * Set Plot Series - * - * @param [PHPExcel_Chart_DataSeries] - * @return PHPExcel_Chart_PlotArea - */ - public function setPlotSeries($plotSeries = array()) - { - $this->plotSeries = $plotSeries; - - return $this; - } - - public function refresh(PHPExcel_Worksheet $worksheet) - { - foreach ($this->plotSeries as $plotSeries) { - $plotSeries->refresh($worksheet); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Properties.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Properties.php deleted file mode 100644 index 9bb6e93..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Properties.php +++ /dev/null @@ -1,363 +0,0 @@ - (string) $type, - 'value' => (string) $color, - 'alpha' => (string) $this->getTrueAlpha($alpha) - ); - } - - protected function getLineStyleArrowSize($array_selector, $array_kay_selector) - { - $sizes = array( - 1 => array('w' => 'sm', 'len' => 'sm'), - 2 => array('w' => 'sm', 'len' => 'med'), - 3 => array('w' => 'sm', 'len' => 'lg'), - 4 => array('w' => 'med', 'len' => 'sm'), - 5 => array('w' => 'med', 'len' => 'med'), - 6 => array('w' => 'med', 'len' => 'lg'), - 7 => array('w' => 'lg', 'len' => 'sm'), - 8 => array('w' => 'lg', 'len' => 'med'), - 9 => array('w' => 'lg', 'len' => 'lg') - ); - - return $sizes[$array_selector][$array_kay_selector]; - } - - protected function getShadowPresetsMap($shadow_presets_option) - { - $presets_options = array( - //OUTER - 1 => array( - 'effect' => 'outerShdw', - 'blur' => '50800', - 'distance' => '38100', - 'direction' => '2700000', - 'algn' => 'tl', - 'rotWithShape' => '0' - ), - 2 => array( - 'effect' => 'outerShdw', - 'blur' => '50800', - 'distance' => '38100', - 'direction' => '5400000', - 'algn' => 't', - 'rotWithShape' => '0' - ), - 3 => array( - 'effect' => 'outerShdw', - 'blur' => '50800', - 'distance' => '38100', - 'direction' => '8100000', - 'algn' => 'tr', - 'rotWithShape' => '0' - ), - 4 => array( - 'effect' => 'outerShdw', - 'blur' => '50800', - 'distance' => '38100', - 'algn' => 'l', - 'rotWithShape' => '0' - ), - 5 => array( - 'effect' => 'outerShdw', - 'size' => array( - 'sx' => '102000', - 'sy' => '102000' - ) - , - 'blur' => '63500', - 'distance' => '38100', - 'algn' => 'ctr', - 'rotWithShape' => '0' - ), - 6 => array( - 'effect' => 'outerShdw', - 'blur' => '50800', - 'distance' => '38100', - 'direction' => '10800000', - 'algn' => 'r', - 'rotWithShape' => '0' - ), - 7 => array( - 'effect' => 'outerShdw', - 'blur' => '50800', - 'distance' => '38100', - 'direction' => '18900000', - 'algn' => 'bl', - 'rotWithShape' => '0' - ), - 8 => array( - 'effect' => 'outerShdw', - 'blur' => '50800', - 'distance' => '38100', - 'direction' => '16200000', - 'rotWithShape' => '0' - ), - 9 => array( - 'effect' => 'outerShdw', - 'blur' => '50800', - 'distance' => '38100', - 'direction' => '13500000', - 'algn' => 'br', - 'rotWithShape' => '0' - ), - //INNER - 10 => array( - 'effect' => 'innerShdw', - 'blur' => '63500', - 'distance' => '50800', - 'direction' => '2700000', - ), - 11 => array( - 'effect' => 'innerShdw', - 'blur' => '63500', - 'distance' => '50800', - 'direction' => '5400000', - ), - 12 => array( - 'effect' => 'innerShdw', - 'blur' => '63500', - 'distance' => '50800', - 'direction' => '8100000', - ), - 13 => array( - 'effect' => 'innerShdw', - 'blur' => '63500', - 'distance' => '50800', - ), - 14 => array( - 'effect' => 'innerShdw', - 'blur' => '114300', - ), - 15 => array( - 'effect' => 'innerShdw', - 'blur' => '63500', - 'distance' => '50800', - 'direction' => '10800000', - ), - 16 => array( - 'effect' => 'innerShdw', - 'blur' => '63500', - 'distance' => '50800', - 'direction' => '18900000', - ), - 17 => array( - 'effect' => 'innerShdw', - 'blur' => '63500', - 'distance' => '50800', - 'direction' => '16200000', - ), - 18 => array( - 'effect' => 'innerShdw', - 'blur' => '63500', - 'distance' => '50800', - 'direction' => '13500000', - ), - //perspective - 19 => array( - 'effect' => 'outerShdw', - 'blur' => '152400', - 'distance' => '317500', - 'size' => array( - 'sx' => '90000', - 'sy' => '-19000', - ), - 'direction' => '5400000', - 'rotWithShape' => '0', - ), - 20 => array( - 'effect' => 'outerShdw', - 'blur' => '76200', - 'direction' => '18900000', - 'size' => array( - 'sy' => '23000', - 'kx' => '-1200000', - ), - 'algn' => 'bl', - 'rotWithShape' => '0', - ), - 21 => array( - 'effect' => 'outerShdw', - 'blur' => '76200', - 'direction' => '13500000', - 'size' => array( - 'sy' => '23000', - 'kx' => '1200000', - ), - 'algn' => 'br', - 'rotWithShape' => '0', - ), - 22 => array( - 'effect' => 'outerShdw', - 'blur' => '76200', - 'distance' => '12700', - 'direction' => '2700000', - 'size' => array( - 'sy' => '-23000', - 'kx' => '-800400', - ), - 'algn' => 'bl', - 'rotWithShape' => '0', - ), - 23 => array( - 'effect' => 'outerShdw', - 'blur' => '76200', - 'distance' => '12700', - 'direction' => '8100000', - 'size' => array( - 'sy' => '-23000', - 'kx' => '800400', - ), - 'algn' => 'br', - 'rotWithShape' => '0', - ), - ); - - return $presets_options[$shadow_presets_option]; - } - - protected function getArrayElementsValue($properties, $elements) - { - $reference = & $properties; - if (!is_array($elements)) { - return $reference[$elements]; - } else { - foreach ($elements as $keys) { - $reference = & $reference[$keys]; - } - return $reference; - } - return $this; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/PHP Charting Libraries.txt b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/PHP Charting Libraries.txt deleted file mode 100644 index 9334f68..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/PHP Charting Libraries.txt +++ /dev/null @@ -1,20 +0,0 @@ -ChartDirector - http://www.advsofteng.com/cdphp.html - -GraPHPite - http://graphpite.sourceforge.net/ - -JpGraph - http://www.aditus.nu/jpgraph/ - -LibChart - http://naku.dohcrew.com/libchart/pages/introduction/ - -pChart - http://pchart.sourceforge.net/ - -TeeChart - http://www.steema.com/products/teechart/overview.html - -PHPGraphLib - http://www.ebrueggeman.com/phpgraphlib \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php deleted file mode 100644 index b3d7396..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Renderer/jpgraph.php +++ /dev/null @@ -1,883 +0,0 @@ - MARK_DIAMOND, - 'square' => MARK_SQUARE, - 'triangle' => MARK_UTRIANGLE, - 'x' => MARK_X, - 'star' => MARK_STAR, - 'dot' => MARK_FILLEDCIRCLE, - 'dash' => MARK_DTRIANGLE, - 'circle' => MARK_CIRCLE, - 'plus' => MARK_CROSS - ); - - - private $chart; - - private $graph; - - private static $plotColour = 0; - - private static $plotMark = 0; - - - private function formatPointMarker($seriesPlot, $markerID) - { - $plotMarkKeys = array_keys(self::$markSet); - if (is_null($markerID)) { - // Use default plot marker (next marker in the series) - self::$plotMark %= count(self::$markSet); - $seriesPlot->mark->SetType(self::$markSet[$plotMarkKeys[self::$plotMark++]]); - } elseif ($markerID !== 'none') { - // Use specified plot marker (if it exists) - if (isset(self::$markSet[$markerID])) { - $seriesPlot->mark->SetType(self::$markSet[$markerID]); - } else { - // If the specified plot marker doesn't exist, use default plot marker (next marker in the series) - self::$plotMark %= count(self::$markSet); - $seriesPlot->mark->SetType(self::$markSet[$plotMarkKeys[self::$plotMark++]]); - } - } else { - // Hide plot marker - $seriesPlot->mark->Hide(); - } - $seriesPlot->mark->SetColor(self::$colourSet[self::$plotColour]); - $seriesPlot->mark->SetFillColor(self::$colourSet[self::$plotColour]); - $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); - - return $seriesPlot; - } - - - private function formatDataSetLabels($groupID, $datasetLabels, $labelCount, $rotation = '') - { - $datasetLabelFormatCode = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getFormatCode(); - if (!is_null($datasetLabelFormatCode)) { - // Retrieve any label formatting code - $datasetLabelFormatCode = stripslashes($datasetLabelFormatCode); - } - - $testCurrentIndex = 0; - foreach ($datasetLabels as $i => $datasetLabel) { - if (is_array($datasetLabel)) { - if ($rotation == 'bar') { - $datasetLabels[$i] = implode(" ", $datasetLabel); - } else { - $datasetLabel = array_reverse($datasetLabel); - $datasetLabels[$i] = implode("\n", $datasetLabel); - } - } else { - // Format labels according to any formatting code - if (!is_null($datasetLabelFormatCode)) { - $datasetLabels[$i] = PHPExcel_Style_NumberFormat::toFormattedString($datasetLabel, $datasetLabelFormatCode); - } - } - ++$testCurrentIndex; - } - - return $datasetLabels; - } - - - private function percentageSumCalculation($groupID, $seriesCount) - { - // Adjust our values to a percentage value across all series in the group - for ($i = 0; $i < $seriesCount; ++$i) { - if ($i == 0) { - $sumValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); - } else { - $nextValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); - foreach ($nextValues as $k => $value) { - if (isset($sumValues[$k])) { - $sumValues[$k] += $value; - } else { - $sumValues[$k] = $value; - } - } - } - } - - return $sumValues; - } - - - private function percentageAdjustValues($dataValues, $sumValues) - { - foreach ($dataValues as $k => $dataValue) { - $dataValues[$k] = $dataValue / $sumValues[$k] * 100; - } - - return $dataValues; - } - - - private function getCaption($captionElement) - { - // Read any caption - $caption = (!is_null($captionElement)) ? $captionElement->getCaption() : null; - // Test if we have a title caption to display - if (!is_null($caption)) { - // If we do, it could be a plain string or an array - if (is_array($caption)) { - // Implode an array to a plain string - $caption = implode('', $caption); - } - } - return $caption; - } - - - private function renderTitle() - { - $title = $this->getCaption($this->chart->getTitle()); - if (!is_null($title)) { - $this->graph->title->Set($title); - } - } - - - private function renderLegend() - { - $legend = $this->chart->getLegend(); - if (!is_null($legend)) { - $legendPosition = $legend->getPosition(); - $legendOverlay = $legend->getOverlay(); - switch ($legendPosition) { - case 'r': - $this->graph->legend->SetPos(0.01, 0.5, 'right', 'center'); // right - $this->graph->legend->SetColumns(1); - break; - case 'l': - $this->graph->legend->SetPos(0.01, 0.5, 'left', 'center'); // left - $this->graph->legend->SetColumns(1); - break; - case 't': - $this->graph->legend->SetPos(0.5, 0.01, 'center', 'top'); // top - break; - case 'b': - $this->graph->legend->SetPos(0.5, 0.99, 'center', 'bottom'); // bottom - break; - default: - $this->graph->legend->SetPos(0.01, 0.01, 'right', 'top'); // top-right - $this->graph->legend->SetColumns(1); - break; - } - } else { - $this->graph->legend->Hide(); - } - } - - - private function renderCartesianPlotArea($type = 'textlin') - { - $this->graph = new Graph(self::$width, self::$height); - $this->graph->SetScale($type); - - $this->renderTitle(); - - // Rotate for bar rather than column chart - $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotDirection(); - $reverse = ($rotation == 'bar') ? true : false; - - $xAxisLabel = $this->chart->getXAxisLabel(); - if (!is_null($xAxisLabel)) { - $title = $this->getCaption($xAxisLabel); - if (!is_null($title)) { - $this->graph->xaxis->SetTitle($title, 'center'); - $this->graph->xaxis->title->SetMargin(35); - if ($reverse) { - $this->graph->xaxis->title->SetAngle(90); - $this->graph->xaxis->title->SetMargin(90); - } - } - } - - $yAxisLabel = $this->chart->getYAxisLabel(); - if (!is_null($yAxisLabel)) { - $title = $this->getCaption($yAxisLabel); - if (!is_null($title)) { - $this->graph->yaxis->SetTitle($title, 'center'); - if ($reverse) { - $this->graph->yaxis->title->SetAngle(0); - $this->graph->yaxis->title->SetMargin(-55); - } - } - } - } - - - private function renderPiePlotArea($doughnut = false) - { - $this->graph = new PieGraph(self::$width, self::$height); - - $this->renderTitle(); - } - - - private function renderRadarPlotArea() - { - $this->graph = new RadarGraph(self::$width, self::$height); - $this->graph->SetScale('lin'); - - $this->renderTitle(); - } - - - private function renderPlotLine($groupID, $filled = false, $combination = false, $dimensions = '2d') - { - $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); - - $labelCount = count($this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount()); - if ($labelCount > 0) { - $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); - $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); - $this->graph->xaxis->SetTickLabels($datasetLabels); - } - - $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); - $seriesPlots = array(); - if ($grouping == 'percentStacked') { - $sumValues = $this->percentageSumCalculation($groupID, $seriesCount); - } - - // Loop through each data series in turn - for ($i = 0; $i < $seriesCount; ++$i) { - $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); - $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); - - if ($grouping == 'percentStacked') { - $dataValues = $this->percentageAdjustValues($dataValues, $sumValues); - } - - // Fill in any missing values in the $dataValues array - $testCurrentIndex = 0; - foreach ($dataValues as $k => $dataValue) { - while ($k != $testCurrentIndex) { - $dataValues[$testCurrentIndex] = null; - ++$testCurrentIndex; - } - ++$testCurrentIndex; - } - - $seriesPlot = new LinePlot($dataValues); - if ($combination) { - $seriesPlot->SetBarCenter(); - } - - if ($filled) { - $seriesPlot->SetFilled(true); - $seriesPlot->SetColor('black'); - $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour++]); - } else { - // Set the appropriate plot marker - $this->formatPointMarker($seriesPlot, $marker); - } - $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); - $seriesPlot->SetLegend($dataLabel); - - $seriesPlots[] = $seriesPlot; - } - - if ($grouping == 'standard') { - $groupPlot = $seriesPlots; - } else { - $groupPlot = new AccLinePlot($seriesPlots); - } - $this->graph->Add($groupPlot); - } - - - private function renderPlotBar($groupID, $dimensions = '2d') - { - $rotation = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotDirection(); - // Rotate for bar rather than column chart - if (($groupID == 0) && ($rotation == 'bar')) { - $this->graph->Set90AndMargin(); - } - $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); - - $labelCount = count($this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount()); - if ($labelCount > 0) { - $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); - $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount, $rotation); - // Rotate for bar rather than column chart - if ($rotation == 'bar') { - $datasetLabels = array_reverse($datasetLabels); - $this->graph->yaxis->SetPos('max'); - $this->graph->yaxis->SetLabelAlign('center', 'top'); - $this->graph->yaxis->SetLabelSide(SIDE_RIGHT); - } - $this->graph->xaxis->SetTickLabels($datasetLabels); - } - - - $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); - $seriesPlots = array(); - if ($grouping == 'percentStacked') { - $sumValues = $this->percentageSumCalculation($groupID, $seriesCount); - } - - // Loop through each data series in turn - for ($j = 0; $j < $seriesCount; ++$j) { - $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($j)->getDataValues(); - if ($grouping == 'percentStacked') { - $dataValues = $this->percentageAdjustValues($dataValues, $sumValues); - } - - // Fill in any missing values in the $dataValues array - $testCurrentIndex = 0; - foreach ($dataValues as $k => $dataValue) { - while ($k != $testCurrentIndex) { - $dataValues[$testCurrentIndex] = null; - ++$testCurrentIndex; - } - ++$testCurrentIndex; - } - - // Reverse the $dataValues order for bar rather than column chart - if ($rotation == 'bar') { - $dataValues = array_reverse($dataValues); - } - $seriesPlot = new BarPlot($dataValues); - $seriesPlot->SetColor('black'); - $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour++]); - if ($dimensions == '3d') { - $seriesPlot->SetShadow(); - } - if (!$this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($j)) { - $dataLabel = ''; - } else { - $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($j)->getDataValue(); - } - $seriesPlot->SetLegend($dataLabel); - - $seriesPlots[] = $seriesPlot; - } - // Reverse the plot order for bar rather than column chart - if (($rotation == 'bar') && (!($grouping == 'percentStacked'))) { - $seriesPlots = array_reverse($seriesPlots); - } - - if ($grouping == 'clustered') { - $groupPlot = new GroupBarPlot($seriesPlots); - } elseif ($grouping == 'standard') { - $groupPlot = new GroupBarPlot($seriesPlots); - } else { - $groupPlot = new AccBarPlot($seriesPlots); - if ($dimensions == '3d') { - $groupPlot->SetShadow(); - } - } - - $this->graph->Add($groupPlot); - } - - - private function renderPlotScatter($groupID, $bubble) - { - $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); - $scatterStyle = $bubbleSize = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); - - $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); - $seriesPlots = array(); - - // Loop through each data series in turn - for ($i = 0; $i < $seriesCount; ++$i) { - $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); - $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); - - foreach ($dataValuesY as $k => $dataValueY) { - $dataValuesY[$k] = $k; - } - - $seriesPlot = new ScatterPlot($dataValuesX, $dataValuesY); - if ($scatterStyle == 'lineMarker') { - $seriesPlot->SetLinkPoints(); - $seriesPlot->link->SetColor(self::$colourSet[self::$plotColour]); - } elseif ($scatterStyle == 'smoothMarker') { - $spline = new Spline($dataValuesY, $dataValuesX); - list($splineDataY, $splineDataX) = $spline->Get(count($dataValuesX) * self::$width / 20); - $lplot = new LinePlot($splineDataX, $splineDataY); - $lplot->SetColor(self::$colourSet[self::$plotColour]); - - $this->graph->Add($lplot); - } - - if ($bubble) { - $this->formatPointMarker($seriesPlot, 'dot'); - $seriesPlot->mark->SetColor('black'); - $seriesPlot->mark->SetSize($bubbleSize); - } else { - $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); - $this->formatPointMarker($seriesPlot, $marker); - } - $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); - $seriesPlot->SetLegend($dataLabel); - - $this->graph->Add($seriesPlot); - } - } - - - private function renderPlotRadar($groupID) - { - $radarStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); - - $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); - $seriesPlots = array(); - - // Loop through each data series in turn - for ($i = 0; $i < $seriesCount; ++$i) { - $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); - $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); - $marker = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getPointMarker(); - - $dataValues = array(); - foreach ($dataValuesY as $k => $dataValueY) { - $dataValues[$k] = implode(' ', array_reverse($dataValueY)); - } - $tmp = array_shift($dataValues); - $dataValues[] = $tmp; - $tmp = array_shift($dataValuesX); - $dataValuesX[] = $tmp; - - $this->graph->SetTitles(array_reverse($dataValues)); - - $seriesPlot = new RadarPlot(array_reverse($dataValuesX)); - - $dataLabel = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotLabelByIndex($i)->getDataValue(); - $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); - if ($radarStyle == 'filled') { - $seriesPlot->SetFillColor(self::$colourSet[self::$plotColour]); - } - $this->formatPointMarker($seriesPlot, $marker); - $seriesPlot->SetLegend($dataLabel); - - $this->graph->Add($seriesPlot); - } - } - - - private function renderPlotContour($groupID) - { - $contourStyle = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); - - $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); - $seriesPlots = array(); - - $dataValues = array(); - // Loop through each data series in turn - for ($i = 0; $i < $seriesCount; ++$i) { - $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); - $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); - - $dataValues[$i] = $dataValuesX; - } - $seriesPlot = new ContourPlot($dataValues); - - $this->graph->Add($seriesPlot); - } - - - private function renderPlotStock($groupID) - { - $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); - $plotOrder = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotOrder(); - - $dataValues = array(); - // Loop through each data series in turn and build the plot arrays - foreach ($plotOrder as $i => $v) { - $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($v)->getDataValues(); - foreach ($dataValuesX as $j => $dataValueX) { - $dataValues[$plotOrder[$i]][$j] = $dataValueX; - } - } - if (empty($dataValues)) { - return; - } - - $dataValuesPlot = array(); - // Flatten the plot arrays to a single dimensional array to work with jpgraph - for ($j = 0; $j < count($dataValues[0]); ++$j) { - for ($i = 0; $i < $seriesCount; ++$i) { - $dataValuesPlot[] = $dataValues[$i][$j]; - } - } - - // Set the x-axis labels - $labelCount = count($this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount()); - if ($labelCount > 0) { - $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); - $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); - $this->graph->xaxis->SetTickLabels($datasetLabels); - } - - $seriesPlot = new StockPlot($dataValuesPlot); - $seriesPlot->SetWidth(20); - - $this->graph->Add($seriesPlot); - } - - - private function renderAreaChart($groupCount, $dimensions = '2d') - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_line.php'); - - $this->renderCartesianPlotArea(); - - for ($i = 0; $i < $groupCount; ++$i) { - $this->renderPlotLine($i, true, false, $dimensions); - } - } - - - private function renderLineChart($groupCount, $dimensions = '2d') - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_line.php'); - - $this->renderCartesianPlotArea(); - - for ($i = 0; $i < $groupCount; ++$i) { - $this->renderPlotLine($i, false, false, $dimensions); - } - } - - - private function renderBarChart($groupCount, $dimensions = '2d') - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_bar.php'); - - $this->renderCartesianPlotArea(); - - for ($i = 0; $i < $groupCount; ++$i) { - $this->renderPlotBar($i, $dimensions); - } - } - - - private function renderScatterChart($groupCount) - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_scatter.php'); - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_regstat.php'); - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_line.php'); - - $this->renderCartesianPlotArea('linlin'); - - for ($i = 0; $i < $groupCount; ++$i) { - $this->renderPlotScatter($i, false); - } - } - - - private function renderBubbleChart($groupCount) - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_scatter.php'); - - $this->renderCartesianPlotArea('linlin'); - - for ($i = 0; $i < $groupCount; ++$i) { - $this->renderPlotScatter($i, true); - } - } - - - private function renderPieChart($groupCount, $dimensions = '2d', $doughnut = false, $multiplePlots = false) - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_pie.php'); - if ($dimensions == '3d') { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_pie3d.php'); - } - - $this->renderPiePlotArea($doughnut); - - $iLimit = ($multiplePlots) ? $groupCount : 1; - for ($groupID = 0; $groupID < $iLimit; ++$groupID) { - $grouping = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotGrouping(); - $exploded = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotStyle(); - if ($groupID == 0) { - $labelCount = count($this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex(0)->getPointCount()); - if ($labelCount > 0) { - $datasetLabels = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0)->getDataValues(); - $datasetLabels = $this->formatDataSetLabels($groupID, $datasetLabels, $labelCount); - } - } - - $seriesCount = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotSeriesCount(); - $seriesPlots = array(); - // For pie charts, we only display the first series: doughnut charts generally display all series - $jLimit = ($multiplePlots) ? $seriesCount : 1; - // Loop through each data series in turn - for ($j = 0; $j < $jLimit; ++$j) { - $dataValues = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($j)->getDataValues(); - - // Fill in any missing values in the $dataValues array - $testCurrentIndex = 0; - foreach ($dataValues as $k => $dataValue) { - while ($k != $testCurrentIndex) { - $dataValues[$testCurrentIndex] = null; - ++$testCurrentIndex; - } - ++$testCurrentIndex; - } - - if ($dimensions == '3d') { - $seriesPlot = new PiePlot3D($dataValues); - } else { - if ($doughnut) { - $seriesPlot = new PiePlotC($dataValues); - } else { - $seriesPlot = new PiePlot($dataValues); - } - } - - if ($multiplePlots) { - $seriesPlot->SetSize(($jLimit-$j) / ($jLimit * 4)); - } - - if ($doughnut) { - $seriesPlot->SetMidColor('white'); - } - - $seriesPlot->SetColor(self::$colourSet[self::$plotColour++]); - if (count($datasetLabels) > 0) { - $seriesPlot->SetLabels(array_fill(0, count($datasetLabels), '')); - } - if ($dimensions != '3d') { - $seriesPlot->SetGuideLines(false); - } - if ($j == 0) { - if ($exploded) { - $seriesPlot->ExplodeAll(); - } - $seriesPlot->SetLegends($datasetLabels); - } - - $this->graph->Add($seriesPlot); - } - } - } - - - private function renderRadarChart($groupCount) - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_radar.php'); - - $this->renderRadarPlotArea(); - - for ($groupID = 0; $groupID < $groupCount; ++$groupID) { - $this->renderPlotRadar($groupID); - } - } - - - private function renderStockChart($groupCount) - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_stock.php'); - - $this->renderCartesianPlotArea('intint'); - - for ($groupID = 0; $groupID < $groupCount; ++$groupID) { - $this->renderPlotStock($groupID); - } - } - - - private function renderContourChart($groupCount, $dimensions) - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_contour.php'); - - $this->renderCartesianPlotArea('intint'); - - for ($i = 0; $i < $groupCount; ++$i) { - $this->renderPlotContour($i); - } - } - - - private function renderCombinationChart($groupCount, $dimensions, $outputDestination) - { - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_line.php'); - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_bar.php'); - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_scatter.php'); - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_regstat.php'); - require_once(PHPExcel_Settings::getChartRendererPath().'jpgraph_line.php'); - - $this->renderCartesianPlotArea(); - - for ($i = 0; $i < $groupCount; ++$i) { - $dimensions = null; - $chartType = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); - switch ($chartType) { - case 'area3DChart': - $dimensions = '3d'; - // no break - case 'areaChart': - $this->renderPlotLine($i, true, true, $dimensions); - break; - case 'bar3DChart': - $dimensions = '3d'; - // no break - case 'barChart': - $this->renderPlotBar($i, $dimensions); - break; - case 'line3DChart': - $dimensions = '3d'; - // no break - case 'lineChart': - $this->renderPlotLine($i, false, true, $dimensions); - break; - case 'scatterChart': - $this->renderPlotScatter($i, false); - break; - case 'bubbleChart': - $this->renderPlotScatter($i, true); - break; - default: - $this->graph = null; - return false; - } - } - - $this->renderLegend(); - - $this->graph->Stroke($outputDestination); - return true; - } - - - public function render($outputDestination) - { - self::$plotColour = 0; - - $groupCount = $this->chart->getPlotArea()->getPlotGroupCount(); - - $dimensions = null; - if ($groupCount == 1) { - $chartType = $this->chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType(); - } else { - $chartTypes = array(); - for ($i = 0; $i < $groupCount; ++$i) { - $chartTypes[] = $this->chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); - } - $chartTypes = array_unique($chartTypes); - if (count($chartTypes) == 1) { - $chartType = array_pop($chartTypes); - } elseif (count($chartTypes) == 0) { - echo 'Chart is not yet implemented
    '; - return false; - } else { - return $this->renderCombinationChart($groupCount, $dimensions, $outputDestination); - } - } - - switch ($chartType) { - case 'area3DChart': - $dimensions = '3d'; - // no break - case 'areaChart': - $this->renderAreaChart($groupCount, $dimensions); - break; - case 'bar3DChart': - $dimensions = '3d'; - // no break - case 'barChart': - $this->renderBarChart($groupCount, $dimensions); - break; - case 'line3DChart': - $dimensions = '3d'; - // no break - case 'lineChart': - $this->renderLineChart($groupCount, $dimensions); - break; - case 'pie3DChart': - $dimensions = '3d'; - // no break - case 'pieChart': - $this->renderPieChart($groupCount, $dimensions, false, false); - break; - case 'doughnut3DChart': - $dimensions = '3d'; - // no break - case 'doughnutChart': - $this->renderPieChart($groupCount, $dimensions, true, true); - break; - case 'scatterChart': - $this->renderScatterChart($groupCount); - break; - case 'bubbleChart': - $this->renderBubbleChart($groupCount); - break; - case 'radarChart': - $this->renderRadarChart($groupCount); - break; - case 'surface3DChart': - $dimensions = '3d'; - // no break - case 'surfaceChart': - $this->renderContourChart($groupCount, $dimensions); - break; - case 'stockChart': - $this->renderStockChart($groupCount, $dimensions); - break; - default: - echo $chartType.' is not yet implemented
    '; - return false; - } - $this->renderLegend(); - - $this->graph->Stroke($outputDestination); - return true; - } - - - /** - * Create a new PHPExcel_Chart_Renderer_jpgraph - */ - public function __construct(PHPExcel_Chart $chart) - { - $this->graph = null; - $this->chart = $chart; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Title.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Title.php deleted file mode 100644 index d8dc14f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Chart/Title.php +++ /dev/null @@ -1,86 +0,0 @@ -caption = $caption; - $this->layout = $layout; - } - - /** - * Get caption - * - * @return string - */ - public function getCaption() - { - return $this->caption; - } - - /** - * Set caption - * - * @param string $caption - * @return PHPExcel_Chart_Title - */ - public function setCaption($caption = null) - { - $this->caption = $caption; - - return $this; - } - - /** - * Get Layout - * - * @return PHPExcel_Chart_Layout - */ - public function getLayout() - { - return $this->layout; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Comment.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Comment.php deleted file mode 100644 index d55363f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Comment.php +++ /dev/null @@ -1,338 +0,0 @@ -author = 'Author'; - $this->text = new PHPExcel_RichText(); - $this->fillColor = new PHPExcel_Style_Color('FFFFFFE1'); - $this->alignment = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL; - } - - /** - * Get Author - * - * @return string - */ - public function getAuthor() - { - return $this->author; - } - - /** - * Set Author - * - * @param string $pValue - * @return PHPExcel_Comment - */ - public function setAuthor($pValue = '') - { - $this->author = $pValue; - return $this; - } - - /** - * Get Rich text comment - * - * @return PHPExcel_RichText - */ - public function getText() - { - return $this->text; - } - - /** - * Set Rich text comment - * - * @param PHPExcel_RichText $pValue - * @return PHPExcel_Comment - */ - public function setText(PHPExcel_RichText $pValue) - { - $this->text = $pValue; - return $this; - } - - /** - * Get comment width (CSS style, i.e. XXpx or YYpt) - * - * @return string - */ - public function getWidth() - { - return $this->width; - } - - /** - * Set comment width (CSS style, i.e. XXpx or YYpt) - * - * @param string $value - * @return PHPExcel_Comment - */ - public function setWidth($value = '96pt') - { - $this->width = $value; - return $this; - } - - /** - * Get comment height (CSS style, i.e. XXpx or YYpt) - * - * @return string - */ - public function getHeight() - { - return $this->height; - } - - /** - * Set comment height (CSS style, i.e. XXpx or YYpt) - * - * @param string $value - * @return PHPExcel_Comment - */ - public function setHeight($value = '55.5pt') - { - $this->height = $value; - return $this; - } - - /** - * Get left margin (CSS style, i.e. XXpx or YYpt) - * - * @return string - */ - public function getMarginLeft() - { - return $this->marginLeft; - } - - /** - * Set left margin (CSS style, i.e. XXpx or YYpt) - * - * @param string $value - * @return PHPExcel_Comment - */ - public function setMarginLeft($value = '59.25pt') - { - $this->marginLeft = $value; - return $this; - } - - /** - * Get top margin (CSS style, i.e. XXpx or YYpt) - * - * @return string - */ - public function getMarginTop() - { - return $this->marginTop; - } - - /** - * Set top margin (CSS style, i.e. XXpx or YYpt) - * - * @param string $value - * @return PHPExcel_Comment - */ - public function setMarginTop($value = '1.5pt') - { - $this->marginTop = $value; - return $this; - } - - /** - * Is the comment visible by default? - * - * @return boolean - */ - public function getVisible() - { - return $this->visible; - } - - /** - * Set comment default visibility - * - * @param boolean $value - * @return PHPExcel_Comment - */ - public function setVisible($value = false) - { - $this->visible = $value; - return $this; - } - - /** - * Get fill color - * - * @return PHPExcel_Style_Color - */ - public function getFillColor() - { - return $this->fillColor; - } - - /** - * Set Alignment - * - * @param string $pValue - * @return PHPExcel_Comment - */ - public function setAlignment($pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL) - { - $this->alignment = $pValue; - return $this; - } - - /** - * Get Alignment - * - * @return string - */ - public function getAlignment() - { - return $this->alignment; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->author . - $this->text->getHashCode() . - $this->width . - $this->height . - $this->marginLeft . - $this->marginTop . - ($this->visible ? 1 : 0) . - $this->fillColor->getHashCode() . - $this->alignment . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } - - /** - * Convert to string - * - * @return string - */ - public function __toString() - { - return $this->text->getPlainText(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/DocumentProperties.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/DocumentProperties.php deleted file mode 100644 index 2395ba9..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/DocumentProperties.php +++ /dev/null @@ -1,611 +0,0 @@ -lastModifiedBy = $this->creator; - $this->created = time(); - $this->modified = time(); - } - - /** - * Get Creator - * - * @return string - */ - public function getCreator() - { - return $this->creator; - } - - /** - * Set Creator - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setCreator($pValue = '') - { - $this->creator = $pValue; - return $this; - } - - /** - * Get Last Modified By - * - * @return string - */ - public function getLastModifiedBy() - { - return $this->lastModifiedBy; - } - - /** - * Set Last Modified By - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setLastModifiedBy($pValue = '') - { - $this->lastModifiedBy = $pValue; - return $this; - } - - /** - * Get Created - * - * @return datetime - */ - public function getCreated() - { - return $this->created; - } - - /** - * Set Created - * - * @param datetime $pValue - * @return PHPExcel_DocumentProperties - */ - public function setCreated($pValue = null) - { - if ($pValue === null) { - $pValue = time(); - } elseif (is_string($pValue)) { - if (is_numeric($pValue)) { - $pValue = intval($pValue); - } else { - $pValue = strtotime($pValue); - } - } - - $this->created = $pValue; - return $this; - } - - /** - * Get Modified - * - * @return datetime - */ - public function getModified() - { - return $this->modified; - } - - /** - * Set Modified - * - * @param datetime $pValue - * @return PHPExcel_DocumentProperties - */ - public function setModified($pValue = null) - { - if ($pValue === null) { - $pValue = time(); - } elseif (is_string($pValue)) { - if (is_numeric($pValue)) { - $pValue = intval($pValue); - } else { - $pValue = strtotime($pValue); - } - } - - $this->modified = $pValue; - return $this; - } - - /** - * Get Title - * - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Set Title - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setTitle($pValue = '') - { - $this->title = $pValue; - return $this; - } - - /** - * Get Description - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Set Description - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setDescription($pValue = '') - { - $this->description = $pValue; - return $this; - } - - /** - * Get Subject - * - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Set Subject - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setSubject($pValue = '') - { - $this->subject = $pValue; - return $this; - } - - /** - * Get Keywords - * - * @return string - */ - public function getKeywords() - { - return $this->keywords; - } - - /** - * Set Keywords - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setKeywords($pValue = '') - { - $this->keywords = $pValue; - return $this; - } - - /** - * Get Category - * - * @return string - */ - public function getCategory() - { - return $this->category; - } - - /** - * Set Category - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setCategory($pValue = '') - { - $this->category = $pValue; - return $this; - } - - /** - * Get Company - * - * @return string - */ - public function getCompany() - { - return $this->company; - } - - /** - * Set Company - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setCompany($pValue = '') - { - $this->company = $pValue; - return $this; - } - - /** - * Get Manager - * - * @return string - */ - public function getManager() - { - return $this->manager; - } - - /** - * Set Manager - * - * @param string $pValue - * @return PHPExcel_DocumentProperties - */ - public function setManager($pValue = '') - { - $this->manager = $pValue; - return $this; - } - - /** - * Get a List of Custom Property Names - * - * @return array of string - */ - public function getCustomProperties() - { - return array_keys($this->customProperties); - } - - /** - * Check if a Custom Property is defined - * - * @param string $propertyName - * @return boolean - */ - public function isCustomPropertySet($propertyName) - { - return isset($this->customProperties[$propertyName]); - } - - /** - * Get a Custom Property Value - * - * @param string $propertyName - * @return string - */ - public function getCustomPropertyValue($propertyName) - { - if (isset($this->customProperties[$propertyName])) { - return $this->customProperties[$propertyName]['value']; - } - - } - - /** - * Get a Custom Property Type - * - * @param string $propertyName - * @return string - */ - public function getCustomPropertyType($propertyName) - { - if (isset($this->customProperties[$propertyName])) { - return $this->customProperties[$propertyName]['type']; - } - - } - - /** - * Set a Custom Property - * - * @param string $propertyName - * @param mixed $propertyValue - * @param string $propertyType - * 'i' : Integer - * 'f' : Floating Point - * 's' : String - * 'd' : Date/Time - * 'b' : Boolean - * @return PHPExcel_DocumentProperties - */ - public function setCustomProperty($propertyName, $propertyValue = '', $propertyType = null) - { - if (($propertyType === null) || (!in_array($propertyType, array(self::PROPERTY_TYPE_INTEGER, - self::PROPERTY_TYPE_FLOAT, - self::PROPERTY_TYPE_STRING, - self::PROPERTY_TYPE_DATE, - self::PROPERTY_TYPE_BOOLEAN)))) { - if ($propertyValue === null) { - $propertyType = self::PROPERTY_TYPE_STRING; - } elseif (is_float($propertyValue)) { - $propertyType = self::PROPERTY_TYPE_FLOAT; - } elseif (is_int($propertyValue)) { - $propertyType = self::PROPERTY_TYPE_INTEGER; - } elseif (is_bool($propertyValue)) { - $propertyType = self::PROPERTY_TYPE_BOOLEAN; - } else { - $propertyType = self::PROPERTY_TYPE_STRING; - } - } - - $this->customProperties[$propertyName] = array( - 'value' => $propertyValue, - 'type' => $propertyType - ); - return $this; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } - - public static function convertProperty($propertyValue, $propertyType) - { - switch ($propertyType) { - case 'empty': // Empty - return ''; - break; - case 'null': // Null - return null; - break; - case 'i1': // 1-Byte Signed Integer - case 'i2': // 2-Byte Signed Integer - case 'i4': // 4-Byte Signed Integer - case 'i8': // 8-Byte Signed Integer - case 'int': // Integer - return (int) $propertyValue; - break; - case 'ui1': // 1-Byte Unsigned Integer - case 'ui2': // 2-Byte Unsigned Integer - case 'ui4': // 4-Byte Unsigned Integer - case 'ui8': // 8-Byte Unsigned Integer - case 'uint': // Unsigned Integer - return abs((int) $propertyValue); - break; - case 'r4': // 4-Byte Real Number - case 'r8': // 8-Byte Real Number - case 'decimal': // Decimal - return (float) $propertyValue; - break; - case 'lpstr': // LPSTR - case 'lpwstr': // LPWSTR - case 'bstr': // Basic String - return $propertyValue; - break; - case 'date': // Date and Time - case 'filetime': // File Time - return strtotime($propertyValue); - break; - case 'bool': // Boolean - return ($propertyValue == 'true') ? true : false; - break; - case 'cy': // Currency - case 'error': // Error Status Code - case 'vector': // Vector - case 'array': // Array - case 'blob': // Binary Blob - case 'oblob': // Binary Blob Object - case 'stream': // Binary Stream - case 'ostream': // Binary Stream Object - case 'storage': // Binary Storage - case 'ostorage': // Binary Storage Object - case 'vstream': // Binary Versioned Stream - case 'clsid': // Class ID - case 'cf': // Clipboard Data - return $propertyValue; - break; - } - return $propertyValue; - } - - public static function convertPropertyType($propertyType) - { - switch ($propertyType) { - case 'i1': // 1-Byte Signed Integer - case 'i2': // 2-Byte Signed Integer - case 'i4': // 4-Byte Signed Integer - case 'i8': // 8-Byte Signed Integer - case 'int': // Integer - case 'ui1': // 1-Byte Unsigned Integer - case 'ui2': // 2-Byte Unsigned Integer - case 'ui4': // 4-Byte Unsigned Integer - case 'ui8': // 8-Byte Unsigned Integer - case 'uint': // Unsigned Integer - return self::PROPERTY_TYPE_INTEGER; - break; - case 'r4': // 4-Byte Real Number - case 'r8': // 8-Byte Real Number - case 'decimal': // Decimal - return self::PROPERTY_TYPE_FLOAT; - break; - case 'empty': // Empty - case 'null': // Null - case 'lpstr': // LPSTR - case 'lpwstr': // LPWSTR - case 'bstr': // Basic String - return self::PROPERTY_TYPE_STRING; - break; - case 'date': // Date and Time - case 'filetime': // File Time - return self::PROPERTY_TYPE_DATE; - break; - case 'bool': // Boolean - return self::PROPERTY_TYPE_BOOLEAN; - break; - case 'cy': // Currency - case 'error': // Error Status Code - case 'vector': // Vector - case 'array': // Array - case 'blob': // Binary Blob - case 'oblob': // Binary Blob Object - case 'stream': // Binary Stream - case 'ostream': // Binary Stream Object - case 'storage': // Binary Storage - case 'ostorage': // Binary Storage Object - case 'vstream': // Binary Versioned Stream - case 'clsid': // Class ID - case 'cf': // Clipboard Data - return self::PROPERTY_TYPE_UNKNOWN; - break; - } - return self::PROPERTY_TYPE_UNKNOWN; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/DocumentSecurity.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/DocumentSecurity.php deleted file mode 100644 index ecea0da..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/DocumentSecurity.php +++ /dev/null @@ -1,222 +0,0 @@ -lockRevision = false; - $this->lockStructure = false; - $this->lockWindows = false; - $this->revisionsPassword = ''; - $this->workbookPassword = ''; - } - - /** - * Is some sort of document security enabled? - * - * @return boolean - */ - public function isSecurityEnabled() - { - return $this->lockRevision || - $this->lockStructure || - $this->lockWindows; - } - - /** - * Get LockRevision - * - * @return boolean - */ - public function getLockRevision() - { - return $this->lockRevision; - } - - /** - * Set LockRevision - * - * @param boolean $pValue - * @return PHPExcel_DocumentSecurity - */ - public function setLockRevision($pValue = false) - { - $this->lockRevision = $pValue; - return $this; - } - - /** - * Get LockStructure - * - * @return boolean - */ - public function getLockStructure() - { - return $this->lockStructure; - } - - /** - * Set LockStructure - * - * @param boolean $pValue - * @return PHPExcel_DocumentSecurity - */ - public function setLockStructure($pValue = false) - { - $this->lockStructure = $pValue; - return $this; - } - - /** - * Get LockWindows - * - * @return boolean - */ - public function getLockWindows() - { - return $this->lockWindows; - } - - /** - * Set LockWindows - * - * @param boolean $pValue - * @return PHPExcel_DocumentSecurity - */ - public function setLockWindows($pValue = false) - { - $this->lockWindows = $pValue; - return $this; - } - - /** - * Get RevisionsPassword (hashed) - * - * @return string - */ - public function getRevisionsPassword() - { - return $this->revisionsPassword; - } - - /** - * Set RevisionsPassword - * - * @param string $pValue - * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @return PHPExcel_DocumentSecurity - */ - public function setRevisionsPassword($pValue = '', $pAlreadyHashed = false) - { - if (!$pAlreadyHashed) { - $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue); - } - $this->revisionsPassword = $pValue; - return $this; - } - - /** - * Get WorkbookPassword (hashed) - * - * @return string - */ - public function getWorkbookPassword() - { - return $this->workbookPassword; - } - - /** - * Set WorkbookPassword - * - * @param string $pValue - * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @return PHPExcel_DocumentSecurity - */ - public function setWorkbookPassword($pValue = '', $pAlreadyHashed = false) - { - if (!$pAlreadyHashed) { - $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue); - } - $this->workbookPassword = $pValue; - return $this; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Exception.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Exception.php deleted file mode 100644 index b27750e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Exception.php +++ /dev/null @@ -1,54 +0,0 @@ -line = $line; - $e->file = $file; - throw $e; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/HashTable.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/HashTable.php deleted file mode 100644 index c21d18c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/HashTable.php +++ /dev/null @@ -1,204 +0,0 @@ -addFromSource($pSource); - } - } - - /** - * Add HashTable items from source - * - * @param PHPExcel_IComparable[] $pSource Source array to create HashTable from - * @throws PHPExcel_Exception - */ - public function addFromSource($pSource = null) - { - // Check if an array was passed - if ($pSource == null) { - return; - } elseif (!is_array($pSource)) { - throw new PHPExcel_Exception('Invalid array parameter passed.'); - } - - foreach ($pSource as $item) { - $this->add($item); - } - } - - /** - * Add HashTable item - * - * @param PHPExcel_IComparable $pSource Item to add - * @throws PHPExcel_Exception - */ - public function add(PHPExcel_IComparable $pSource = null) - { - $hash = $pSource->getHashCode(); - if (!isset($this->items[$hash])) { - $this->items[$hash] = $pSource; - $this->keyMap[count($this->items) - 1] = $hash; - } - } - - /** - * Remove HashTable item - * - * @param PHPExcel_IComparable $pSource Item to remove - * @throws PHPExcel_Exception - */ - public function remove(PHPExcel_IComparable $pSource = null) - { - $hash = $pSource->getHashCode(); - if (isset($this->items[$hash])) { - unset($this->items[$hash]); - - $deleteKey = -1; - foreach ($this->keyMap as $key => $value) { - if ($deleteKey >= 0) { - $this->keyMap[$key - 1] = $value; - } - - if ($value == $hash) { - $deleteKey = $key; - } - } - unset($this->keyMap[count($this->keyMap) - 1]); - } - } - - /** - * Clear HashTable - * - */ - public function clear() - { - $this->items = array(); - $this->keyMap = array(); - } - - /** - * Count - * - * @return int - */ - public function count() - { - return count($this->items); - } - - /** - * Get index for hash code - * - * @param string $pHashCode - * @return int Index - */ - public function getIndexForHashCode($pHashCode = '') - { - return array_search($pHashCode, $this->keyMap); - } - - /** - * Get by index - * - * @param int $pIndex - * @return PHPExcel_IComparable - * - */ - public function getByIndex($pIndex = 0) - { - if (isset($this->keyMap[$pIndex])) { - return $this->getByHashCode($this->keyMap[$pIndex]); - } - - return null; - } - - /** - * Get by hashcode - * - * @param string $pHashCode - * @return PHPExcel_IComparable - * - */ - public function getByHashCode($pHashCode = '') - { - if (isset($this->items[$pHashCode])) { - return $this->items[$pHashCode]; - } - - return null; - } - - /** - * HashTable to array - * - * @return PHPExcel_IComparable[] - */ - public function toArray() - { - return $this->items; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Helper/HTML.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Helper/HTML.php deleted file mode 100644 index a78f11c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Helper/HTML.php +++ /dev/null @@ -1,808 +0,0 @@ - 'f0f8ff', - 'antiquewhite' => 'faebd7', - 'antiquewhite1' => 'ffefdb', - 'antiquewhite2' => 'eedfcc', - 'antiquewhite3' => 'cdc0b0', - 'antiquewhite4' => '8b8378', - 'aqua' => '00ffff', - 'aquamarine1' => '7fffd4', - 'aquamarine2' => '76eec6', - 'aquamarine4' => '458b74', - 'azure1' => 'f0ffff', - 'azure2' => 'e0eeee', - 'azure3' => 'c1cdcd', - 'azure4' => '838b8b', - 'beige' => 'f5f5dc', - 'bisque1' => 'ffe4c4', - 'bisque2' => 'eed5b7', - 'bisque3' => 'cdb79e', - 'bisque4' => '8b7d6b', - 'black' => '000000', - 'blanchedalmond' => 'ffebcd', - 'blue' => '0000ff', - 'blue1' => '0000ff', - 'blue2' => '0000ee', - 'blue4' => '00008b', - 'blueviolet' => '8a2be2', - 'brown' => 'a52a2a', - 'brown1' => 'ff4040', - 'brown2' => 'ee3b3b', - 'brown3' => 'cd3333', - 'brown4' => '8b2323', - 'burlywood' => 'deb887', - 'burlywood1' => 'ffd39b', - 'burlywood2' => 'eec591', - 'burlywood3' => 'cdaa7d', - 'burlywood4' => '8b7355', - 'cadetblue' => '5f9ea0', - 'cadetblue1' => '98f5ff', - 'cadetblue2' => '8ee5ee', - 'cadetblue3' => '7ac5cd', - 'cadetblue4' => '53868b', - 'chartreuse1' => '7fff00', - 'chartreuse2' => '76ee00', - 'chartreuse3' => '66cd00', - 'chartreuse4' => '458b00', - 'chocolate' => 'd2691e', - 'chocolate1' => 'ff7f24', - 'chocolate2' => 'ee7621', - 'chocolate3' => 'cd661d', - 'coral' => 'ff7f50', - 'coral1' => 'ff7256', - 'coral2' => 'ee6a50', - 'coral3' => 'cd5b45', - 'coral4' => '8b3e2f', - 'cornflowerblue' => '6495ed', - 'cornsilk1' => 'fff8dc', - 'cornsilk2' => 'eee8cd', - 'cornsilk3' => 'cdc8b1', - 'cornsilk4' => '8b8878', - 'cyan1' => '00ffff', - 'cyan2' => '00eeee', - 'cyan3' => '00cdcd', - 'cyan4' => '008b8b', - 'darkgoldenrod' => 'b8860b', - 'darkgoldenrod1' => 'ffb90f', - 'darkgoldenrod2' => 'eead0e', - 'darkgoldenrod3' => 'cd950c', - 'darkgoldenrod4' => '8b6508', - 'darkgreen' => '006400', - 'darkkhaki' => 'bdb76b', - 'darkolivegreen' => '556b2f', - 'darkolivegreen1' => 'caff70', - 'darkolivegreen2' => 'bcee68', - 'darkolivegreen3' => 'a2cd5a', - 'darkolivegreen4' => '6e8b3d', - 'darkorange' => 'ff8c00', - 'darkorange1' => 'ff7f00', - 'darkorange2' => 'ee7600', - 'darkorange3' => 'cd6600', - 'darkorange4' => '8b4500', - 'darkorchid' => '9932cc', - 'darkorchid1' => 'bf3eff', - 'darkorchid2' => 'b23aee', - 'darkorchid3' => '9a32cd', - 'darkorchid4' => '68228b', - 'darksalmon' => 'e9967a', - 'darkseagreen' => '8fbc8f', - 'darkseagreen1' => 'c1ffc1', - 'darkseagreen2' => 'b4eeb4', - 'darkseagreen3' => '9bcd9b', - 'darkseagreen4' => '698b69', - 'darkslateblue' => '483d8b', - 'darkslategray' => '2f4f4f', - 'darkslategray1' => '97ffff', - 'darkslategray2' => '8deeee', - 'darkslategray3' => '79cdcd', - 'darkslategray4' => '528b8b', - 'darkturquoise' => '00ced1', - 'darkviolet' => '9400d3', - 'deeppink1' => 'ff1493', - 'deeppink2' => 'ee1289', - 'deeppink3' => 'cd1076', - 'deeppink4' => '8b0a50', - 'deepskyblue1' => '00bfff', - 'deepskyblue2' => '00b2ee', - 'deepskyblue3' => '009acd', - 'deepskyblue4' => '00688b', - 'dimgray' => '696969', - 'dodgerblue1' => '1e90ff', - 'dodgerblue2' => '1c86ee', - 'dodgerblue3' => '1874cd', - 'dodgerblue4' => '104e8b', - 'firebrick' => 'b22222', - 'firebrick1' => 'ff3030', - 'firebrick2' => 'ee2c2c', - 'firebrick3' => 'cd2626', - 'firebrick4' => '8b1a1a', - 'floralwhite' => 'fffaf0', - 'forestgreen' => '228b22', - 'fuchsia' => 'ff00ff', - 'gainsboro' => 'dcdcdc', - 'ghostwhite' => 'f8f8ff', - 'gold1' => 'ffd700', - 'gold2' => 'eec900', - 'gold3' => 'cdad00', - 'gold4' => '8b7500', - 'goldenrod' => 'daa520', - 'goldenrod1' => 'ffc125', - 'goldenrod2' => 'eeb422', - 'goldenrod3' => 'cd9b1d', - 'goldenrod4' => '8b6914', - 'gray' => 'bebebe', - 'gray1' => '030303', - 'gray10' => '1a1a1a', - 'gray11' => '1c1c1c', - 'gray12' => '1f1f1f', - 'gray13' => '212121', - 'gray14' => '242424', - 'gray15' => '262626', - 'gray16' => '292929', - 'gray17' => '2b2b2b', - 'gray18' => '2e2e2e', - 'gray19' => '303030', - 'gray2' => '050505', - 'gray20' => '333333', - 'gray21' => '363636', - 'gray22' => '383838', - 'gray23' => '3b3b3b', - 'gray24' => '3d3d3d', - 'gray25' => '404040', - 'gray26' => '424242', - 'gray27' => '454545', - 'gray28' => '474747', - 'gray29' => '4a4a4a', - 'gray3' => '080808', - 'gray30' => '4d4d4d', - 'gray31' => '4f4f4f', - 'gray32' => '525252', - 'gray33' => '545454', - 'gray34' => '575757', - 'gray35' => '595959', - 'gray36' => '5c5c5c', - 'gray37' => '5e5e5e', - 'gray38' => '616161', - 'gray39' => '636363', - 'gray4' => '0a0a0a', - 'gray40' => '666666', - 'gray41' => '696969', - 'gray42' => '6b6b6b', - 'gray43' => '6e6e6e', - 'gray44' => '707070', - 'gray45' => '737373', - 'gray46' => '757575', - 'gray47' => '787878', - 'gray48' => '7a7a7a', - 'gray49' => '7d7d7d', - 'gray5' => '0d0d0d', - 'gray50' => '7f7f7f', - 'gray51' => '828282', - 'gray52' => '858585', - 'gray53' => '878787', - 'gray54' => '8a8a8a', - 'gray55' => '8c8c8c', - 'gray56' => '8f8f8f', - 'gray57' => '919191', - 'gray58' => '949494', - 'gray59' => '969696', - 'gray6' => '0f0f0f', - 'gray60' => '999999', - 'gray61' => '9c9c9c', - 'gray62' => '9e9e9e', - 'gray63' => 'a1a1a1', - 'gray64' => 'a3a3a3', - 'gray65' => 'a6a6a6', - 'gray66' => 'a8a8a8', - 'gray67' => 'ababab', - 'gray68' => 'adadad', - 'gray69' => 'b0b0b0', - 'gray7' => '121212', - 'gray70' => 'b3b3b3', - 'gray71' => 'b5b5b5', - 'gray72' => 'b8b8b8', - 'gray73' => 'bababa', - 'gray74' => 'bdbdbd', - 'gray75' => 'bfbfbf', - 'gray76' => 'c2c2c2', - 'gray77' => 'c4c4c4', - 'gray78' => 'c7c7c7', - 'gray79' => 'c9c9c9', - 'gray8' => '141414', - 'gray80' => 'cccccc', - 'gray81' => 'cfcfcf', - 'gray82' => 'd1d1d1', - 'gray83' => 'd4d4d4', - 'gray84' => 'd6d6d6', - 'gray85' => 'd9d9d9', - 'gray86' => 'dbdbdb', - 'gray87' => 'dedede', - 'gray88' => 'e0e0e0', - 'gray89' => 'e3e3e3', - 'gray9' => '171717', - 'gray90' => 'e5e5e5', - 'gray91' => 'e8e8e8', - 'gray92' => 'ebebeb', - 'gray93' => 'ededed', - 'gray94' => 'f0f0f0', - 'gray95' => 'f2f2f2', - 'gray97' => 'f7f7f7', - 'gray98' => 'fafafa', - 'gray99' => 'fcfcfc', - 'green' => '00ff00', - 'green1' => '00ff00', - 'green2' => '00ee00', - 'green3' => '00cd00', - 'green4' => '008b00', - 'greenyellow' => 'adff2f', - 'honeydew1' => 'f0fff0', - 'honeydew2' => 'e0eee0', - 'honeydew3' => 'c1cdc1', - 'honeydew4' => '838b83', - 'hotpink' => 'ff69b4', - 'hotpink1' => 'ff6eb4', - 'hotpink2' => 'ee6aa7', - 'hotpink3' => 'cd6090', - 'hotpink4' => '8b3a62', - 'indianred' => 'cd5c5c', - 'indianred1' => 'ff6a6a', - 'indianred2' => 'ee6363', - 'indianred3' => 'cd5555', - 'indianred4' => '8b3a3a', - 'ivory1' => 'fffff0', - 'ivory2' => 'eeeee0', - 'ivory3' => 'cdcdc1', - 'ivory4' => '8b8b83', - 'khaki' => 'f0e68c', - 'khaki1' => 'fff68f', - 'khaki2' => 'eee685', - 'khaki3' => 'cdc673', - 'khaki4' => '8b864e', - 'lavender' => 'e6e6fa', - 'lavenderblush1' => 'fff0f5', - 'lavenderblush2' => 'eee0e5', - 'lavenderblush3' => 'cdc1c5', - 'lavenderblush4' => '8b8386', - 'lawngreen' => '7cfc00', - 'lemonchiffon1' => 'fffacd', - 'lemonchiffon2' => 'eee9bf', - 'lemonchiffon3' => 'cdc9a5', - 'lemonchiffon4' => '8b8970', - 'light' => 'eedd82', - 'lightblue' => 'add8e6', - 'lightblue1' => 'bfefff', - 'lightblue2' => 'b2dfee', - 'lightblue3' => '9ac0cd', - 'lightblue4' => '68838b', - 'lightcoral' => 'f08080', - 'lightcyan1' => 'e0ffff', - 'lightcyan2' => 'd1eeee', - 'lightcyan3' => 'b4cdcd', - 'lightcyan4' => '7a8b8b', - 'lightgoldenrod1' => 'ffec8b', - 'lightgoldenrod2' => 'eedc82', - 'lightgoldenrod3' => 'cdbe70', - 'lightgoldenrod4' => '8b814c', - 'lightgoldenrodyellow' => 'fafad2', - 'lightgray' => 'd3d3d3', - 'lightpink' => 'ffb6c1', - 'lightpink1' => 'ffaeb9', - 'lightpink2' => 'eea2ad', - 'lightpink3' => 'cd8c95', - 'lightpink4' => '8b5f65', - 'lightsalmon1' => 'ffa07a', - 'lightsalmon2' => 'ee9572', - 'lightsalmon3' => 'cd8162', - 'lightsalmon4' => '8b5742', - 'lightseagreen' => '20b2aa', - 'lightskyblue' => '87cefa', - 'lightskyblue1' => 'b0e2ff', - 'lightskyblue2' => 'a4d3ee', - 'lightskyblue3' => '8db6cd', - 'lightskyblue4' => '607b8b', - 'lightslateblue' => '8470ff', - 'lightslategray' => '778899', - 'lightsteelblue' => 'b0c4de', - 'lightsteelblue1' => 'cae1ff', - 'lightsteelblue2' => 'bcd2ee', - 'lightsteelblue3' => 'a2b5cd', - 'lightsteelblue4' => '6e7b8b', - 'lightyellow1' => 'ffffe0', - 'lightyellow2' => 'eeeed1', - 'lightyellow3' => 'cdcdb4', - 'lightyellow4' => '8b8b7a', - 'lime' => '00ff00', - 'limegreen' => '32cd32', - 'linen' => 'faf0e6', - 'magenta' => 'ff00ff', - 'magenta2' => 'ee00ee', - 'magenta3' => 'cd00cd', - 'magenta4' => '8b008b', - 'maroon' => 'b03060', - 'maroon1' => 'ff34b3', - 'maroon2' => 'ee30a7', - 'maroon3' => 'cd2990', - 'maroon4' => '8b1c62', - 'medium' => '66cdaa', - 'mediumaquamarine' => '66cdaa', - 'mediumblue' => '0000cd', - 'mediumorchid' => 'ba55d3', - 'mediumorchid1' => 'e066ff', - 'mediumorchid2' => 'd15fee', - 'mediumorchid3' => 'b452cd', - 'mediumorchid4' => '7a378b', - 'mediumpurple' => '9370db', - 'mediumpurple1' => 'ab82ff', - 'mediumpurple2' => '9f79ee', - 'mediumpurple3' => '8968cd', - 'mediumpurple4' => '5d478b', - 'mediumseagreen' => '3cb371', - 'mediumslateblue' => '7b68ee', - 'mediumspringgreen' => '00fa9a', - 'mediumturquoise' => '48d1cc', - 'mediumvioletred' => 'c71585', - 'midnightblue' => '191970', - 'mintcream' => 'f5fffa', - 'mistyrose1' => 'ffe4e1', - 'mistyrose2' => 'eed5d2', - 'mistyrose3' => 'cdb7b5', - 'mistyrose4' => '8b7d7b', - 'moccasin' => 'ffe4b5', - 'navajowhite1' => 'ffdead', - 'navajowhite2' => 'eecfa1', - 'navajowhite3' => 'cdb38b', - 'navajowhite4' => '8b795e', - 'navy' => '000080', - 'navyblue' => '000080', - 'oldlace' => 'fdf5e6', - 'olive' => '808000', - 'olivedrab' => '6b8e23', - 'olivedrab1' => 'c0ff3e', - 'olivedrab2' => 'b3ee3a', - 'olivedrab4' => '698b22', - 'orange' => 'ffa500', - 'orange1' => 'ffa500', - 'orange2' => 'ee9a00', - 'orange3' => 'cd8500', - 'orange4' => '8b5a00', - 'orangered1' => 'ff4500', - 'orangered2' => 'ee4000', - 'orangered3' => 'cd3700', - 'orangered4' => '8b2500', - 'orchid' => 'da70d6', - 'orchid1' => 'ff83fa', - 'orchid2' => 'ee7ae9', - 'orchid3' => 'cd69c9', - 'orchid4' => '8b4789', - 'pale' => 'db7093', - 'palegoldenrod' => 'eee8aa', - 'palegreen' => '98fb98', - 'palegreen1' => '9aff9a', - 'palegreen2' => '90ee90', - 'palegreen3' => '7ccd7c', - 'palegreen4' => '548b54', - 'paleturquoise' => 'afeeee', - 'paleturquoise1' => 'bbffff', - 'paleturquoise2' => 'aeeeee', - 'paleturquoise3' => '96cdcd', - 'paleturquoise4' => '668b8b', - 'palevioletred' => 'db7093', - 'palevioletred1' => 'ff82ab', - 'palevioletred2' => 'ee799f', - 'palevioletred3' => 'cd6889', - 'palevioletred4' => '8b475d', - 'papayawhip' => 'ffefd5', - 'peachpuff1' => 'ffdab9', - 'peachpuff2' => 'eecbad', - 'peachpuff3' => 'cdaf95', - 'peachpuff4' => '8b7765', - 'pink' => 'ffc0cb', - 'pink1' => 'ffb5c5', - 'pink2' => 'eea9b8', - 'pink3' => 'cd919e', - 'pink4' => '8b636c', - 'plum' => 'dda0dd', - 'plum1' => 'ffbbff', - 'plum2' => 'eeaeee', - 'plum3' => 'cd96cd', - 'plum4' => '8b668b', - 'powderblue' => 'b0e0e6', - 'purple' => 'a020f0', - 'rebeccapurple' => '663399', - 'purple1' => '9b30ff', - 'purple2' => '912cee', - 'purple3' => '7d26cd', - 'purple4' => '551a8b', - 'red' => 'ff0000', - 'red1' => 'ff0000', - 'red2' => 'ee0000', - 'red3' => 'cd0000', - 'red4' => '8b0000', - 'rosybrown' => 'bc8f8f', - 'rosybrown1' => 'ffc1c1', - 'rosybrown2' => 'eeb4b4', - 'rosybrown3' => 'cd9b9b', - 'rosybrown4' => '8b6969', - 'royalblue' => '4169e1', - 'royalblue1' => '4876ff', - 'royalblue2' => '436eee', - 'royalblue3' => '3a5fcd', - 'royalblue4' => '27408b', - 'saddlebrown' => '8b4513', - 'salmon' => 'fa8072', - 'salmon1' => 'ff8c69', - 'salmon2' => 'ee8262', - 'salmon3' => 'cd7054', - 'salmon4' => '8b4c39', - 'sandybrown' => 'f4a460', - 'seagreen1' => '54ff9f', - 'seagreen2' => '4eee94', - 'seagreen3' => '43cd80', - 'seagreen4' => '2e8b57', - 'seashell1' => 'fff5ee', - 'seashell2' => 'eee5de', - 'seashell3' => 'cdc5bf', - 'seashell4' => '8b8682', - 'sienna' => 'a0522d', - 'sienna1' => 'ff8247', - 'sienna2' => 'ee7942', - 'sienna3' => 'cd6839', - 'sienna4' => '8b4726', - 'silver' => 'c0c0c0', - 'skyblue' => '87ceeb', - 'skyblue1' => '87ceff', - 'skyblue2' => '7ec0ee', - 'skyblue3' => '6ca6cd', - 'skyblue4' => '4a708b', - 'slateblue' => '6a5acd', - 'slateblue1' => '836fff', - 'slateblue2' => '7a67ee', - 'slateblue3' => '6959cd', - 'slateblue4' => '473c8b', - 'slategray' => '708090', - 'slategray1' => 'c6e2ff', - 'slategray2' => 'b9d3ee', - 'slategray3' => '9fb6cd', - 'slategray4' => '6c7b8b', - 'snow1' => 'fffafa', - 'snow2' => 'eee9e9', - 'snow3' => 'cdc9c9', - 'snow4' => '8b8989', - 'springgreen1' => '00ff7f', - 'springgreen2' => '00ee76', - 'springgreen3' => '00cd66', - 'springgreen4' => '008b45', - 'steelblue' => '4682b4', - 'steelblue1' => '63b8ff', - 'steelblue2' => '5cacee', - 'steelblue3' => '4f94cd', - 'steelblue4' => '36648b', - 'tan' => 'd2b48c', - 'tan1' => 'ffa54f', - 'tan2' => 'ee9a49', - 'tan3' => 'cd853f', - 'tan4' => '8b5a2b', - 'teal' => '008080', - 'thistle' => 'd8bfd8', - 'thistle1' => 'ffe1ff', - 'thistle2' => 'eed2ee', - 'thistle3' => 'cdb5cd', - 'thistle4' => '8b7b8b', - 'tomato1' => 'ff6347', - 'tomato2' => 'ee5c42', - 'tomato3' => 'cd4f39', - 'tomato4' => '8b3626', - 'turquoise' => '40e0d0', - 'turquoise1' => '00f5ff', - 'turquoise2' => '00e5ee', - 'turquoise3' => '00c5cd', - 'turquoise4' => '00868b', - 'violet' => 'ee82ee', - 'violetred' => 'd02090', - 'violetred1' => 'ff3e96', - 'violetred2' => 'ee3a8c', - 'violetred3' => 'cd3278', - 'violetred4' => '8b2252', - 'wheat' => 'f5deb3', - 'wheat1' => 'ffe7ba', - 'wheat2' => 'eed8ae', - 'wheat3' => 'cdba96', - 'wheat4' => '8b7e66', - 'white' => 'ffffff', - 'whitesmoke' => 'f5f5f5', - 'yellow' => 'ffff00', - 'yellow1' => 'ffff00', - 'yellow2' => 'eeee00', - 'yellow3' => 'cdcd00', - 'yellow4' => '8b8b00', - 'yellowgreen' => '9acd32', - ); - - protected $face; - protected $size; - protected $color; - - protected $bold = false; - protected $italic = false; - protected $underline = false; - protected $superscript = false; - protected $subscript = false; - protected $strikethrough = false; - - protected $startTagCallbacks = array( - 'font' => 'startFontTag', - 'b' => 'startBoldTag', - 'strong' => 'startBoldTag', - 'i' => 'startItalicTag', - 'em' => 'startItalicTag', - 'u' => 'startUnderlineTag', - 'ins' => 'startUnderlineTag', - 'del' => 'startStrikethruTag', - 'sup' => 'startSuperscriptTag', - 'sub' => 'startSubscriptTag', - ); - - protected $endTagCallbacks = array( - 'font' => 'endFontTag', - 'b' => 'endBoldTag', - 'strong' => 'endBoldTag', - 'i' => 'endItalicTag', - 'em' => 'endItalicTag', - 'u' => 'endUnderlineTag', - 'ins' => 'endUnderlineTag', - 'del' => 'endStrikethruTag', - 'sup' => 'endSuperscriptTag', - 'sub' => 'endSubscriptTag', - 'br' => 'breakTag', - 'p' => 'breakTag', - 'h1' => 'breakTag', - 'h2' => 'breakTag', - 'h3' => 'breakTag', - 'h4' => 'breakTag', - 'h5' => 'breakTag', - 'h6' => 'breakTag', - ); - - protected $stack = array(); - - protected $stringData = ''; - - protected $richTextObject; - - protected function initialise() - { - $this->face = $this->size = $this->color = null; - $this->bold = $this->italic = $this->underline = $this->superscript = $this->subscript = $this->strikethrough = false; - - $this->stack = array(); - - $this->stringData = ''; - } - - public function toRichTextObject($html) - { - $this->initialise(); - - // Create a new DOM object - $dom = new \DOMDocument; - // Load the HTML file into the DOM object - // Note the use of error suppression, because typically this will be an html fragment, so not fully valid markup - $loaded = @$dom->loadHTML($html); - - // Discard excess white space - $dom->preserveWhiteSpace = false; - - $this->richTextObject = new PHPExcel_RichText();; - $this->parseElements($dom); - - // Clean any further spurious whitespace - $this->cleanWhitespace(); - - return $this->richTextObject; - } - - protected function cleanWhitespace() - { - foreach ($this->richTextObject->getRichTextElements() as $key => $element) { - $text = $element->getText(); - // Trim any leading spaces on the first run - if ($key == 0) { - $text = ltrim($text); - } - // Trim any spaces immediately after a line break - $text = preg_replace('/\n */mu', "\n", $text); - $element->setText($text); - } - } - - protected function buildTextRun() - { - $text = $this->stringData; - if (trim($text) === '') { - return; - } - - $richtextRun = $this->richTextObject->createTextRun($this->stringData); - if ($this->face) { - $richtextRun->getFont()->setName($this->face); - } - if ($this->size) { - $richtextRun->getFont()->setSize($this->size); - } - if ($this->color) { - $richtextRun->getFont()->setColor(new PHPExcel_Style_Color('ff' . $this->color)); - } - if ($this->bold) { - $richtextRun->getFont()->setBold(true); - } - if ($this->italic) { - $richtextRun->getFont()->setItalic(true); - } - if ($this->underline) { - $richtextRun->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE); - } - if ($this->superscript) { - $richtextRun->getFont()->setSuperScript(true); - } - if ($this->subscript) { - $richtextRun->getFont()->setSubScript(true); - } - if ($this->strikethrough) { - $richtextRun->getFont()->setStrikethrough(true); - } - $this->stringData = ''; - } - - protected function rgbToColour($rgb) - { - preg_match_all('/\d+/', $rgb, $values); - foreach ($values[0] as &$value) { - $value = str_pad(dechex($value), 2, '0', STR_PAD_LEFT); - } - return implode($values[0]); - } - - protected function colourNameLookup($rgb) - { - return self::$colourMap[$rgb]; - } - - protected function startFontTag($tag) - { - foreach ($tag->attributes as $attribute) { - $attributeName = strtolower($attribute->name); - $attributeValue = $attribute->value; - - if ($attributeName == 'color') { - if (preg_match('/rgb\s*\(/', $attributeValue)) { - $this->$attributeName = $this->rgbToColour($attributeValue); - } elseif (strpos(trim($attributeValue), '#') === 0) { - $this->$attributeName = ltrim($attributeValue, '#'); - } else { - $this->$attributeName = $this->colourNameLookup($attributeValue); - } - } else { - $this->$attributeName = $attributeValue; - } - } - } - - protected function endFontTag() - { - $this->face = $this->size = $this->color = null; - } - - protected function startBoldTag() - { - $this->bold = true; - } - - protected function endBoldTag() - { - $this->bold = false; - } - - protected function startItalicTag() - { - $this->italic = true; - } - - protected function endItalicTag() - { - $this->italic = false; - } - - protected function startUnderlineTag() - { - $this->underline = true; - } - - protected function endUnderlineTag() - { - $this->underline = false; - } - - protected function startSubscriptTag() - { - $this->subscript = true; - } - - protected function endSubscriptTag() - { - $this->subscript = false; - } - - protected function startSuperscriptTag() - { - $this->superscript = true; - } - - protected function endSuperscriptTag() - { - $this->superscript = false; - } - - protected function startStrikethruTag() - { - $this->strikethrough = true; - } - - protected function endStrikethruTag() - { - $this->strikethrough = false; - } - - protected function breakTag() - { - $this->stringData .= "\n"; - } - - protected function parseTextNode(DOMText $textNode) - { - $domText = preg_replace( - '/\s+/u', - ' ', - str_replace(array("\r", "\n"), ' ', $textNode->nodeValue) - ); - $this->stringData .= $domText; - $this->buildTextRun(); - } - - protected function handleCallback($element, $callbackTag, $callbacks) - { - if (isset($callbacks[$callbackTag])) { - $elementHandler = $callbacks[$callbackTag]; - if (method_exists($this, $elementHandler)) { - call_user_func(array($this, $elementHandler), $element); - } - } - } - - protected function parseElementNode(DOMElement $element) - { - $callbackTag = strtolower($element->nodeName); - $this->stack[] = $callbackTag; - - $this->handleCallback($element, $callbackTag, $this->startTagCallbacks); - - $this->parseElements($element); - array_pop($this->stack); - - $this->handleCallback($element, $callbackTag, $this->endTagCallbacks); - } - - protected function parseElements(DOMNode $element) - { - foreach ($element->childNodes as $child) { - if ($child instanceof DOMText) { - $this->parseTextNode($child); - } elseif ($child instanceof DOMElement) { - $this->parseElementNode($child); - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/IComparable.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/IComparable.php deleted file mode 100644 index 6dc36a9..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/IComparable.php +++ /dev/null @@ -1,34 +0,0 @@ - 'IWriter', 'path' => 'PHPExcel/Writer/{0}.php', 'class' => 'PHPExcel_Writer_{0}' ), - array( 'type' => 'IReader', 'path' => 'PHPExcel/Reader/{0}.php', 'class' => 'PHPExcel_Reader_{0}' ) - ); - - /** - * Autoresolve classes - * - * @var array - * @access private - * @static - */ - private static $autoResolveClasses = array( - 'Excel2007', - 'Excel5', - 'Excel2003XML', - 'OOCalc', - 'SYLK', - 'Gnumeric', - 'HTML', - 'CSV', - ); - - /** - * Private constructor for PHPExcel_IOFactory - */ - private function __construct() - { - } - - /** - * Get search locations - * - * @static - * @access public - * @return array - */ - public static function getSearchLocations() - { - return self::$searchLocations; - } - - /** - * Set search locations - * - * @static - * @access public - * @param array $value - * @throws PHPExcel_Reader_Exception - */ - public static function setSearchLocations($value) - { - if (is_array($value)) { - self::$searchLocations = $value; - } else { - throw new PHPExcel_Reader_Exception('Invalid parameter passed.'); - } - } - - /** - * Add search location - * - * @static - * @access public - * @param string $type Example: IWriter - * @param string $location Example: PHPExcel/Writer/{0}.php - * @param string $classname Example: PHPExcel_Writer_{0} - */ - public static function addSearchLocation($type = '', $location = '', $classname = '') - { - self::$searchLocations[] = array( 'type' => $type, 'path' => $location, 'class' => $classname ); - } - - /** - * Create PHPExcel_Writer_IWriter - * - * @static - * @access public - * @param PHPExcel $phpExcel - * @param string $writerType Example: Excel2007 - * @return PHPExcel_Writer_IWriter - * @throws PHPExcel_Reader_Exception - */ - public static function createWriter(PHPExcel $phpExcel, $writerType = '') - { - // Search type - $searchType = 'IWriter'; - - // Include class - foreach (self::$searchLocations as $searchLocation) { - if ($searchLocation['type'] == $searchType) { - $className = str_replace('{0}', $writerType, $searchLocation['class']); - - $instance = new $className($phpExcel); - if ($instance !== null) { - return $instance; - } - } - } - - // Nothing found... - throw new PHPExcel_Reader_Exception("No $searchType found for type $writerType"); - } - - /** - * Create PHPExcel_Reader_IReader - * - * @static - * @access public - * @param string $readerType Example: Excel2007 - * @return PHPExcel_Reader_IReader - * @throws PHPExcel_Reader_Exception - */ - public static function createReader($readerType = '') - { - // Search type - $searchType = 'IReader'; - - // Include class - foreach (self::$searchLocations as $searchLocation) { - if ($searchLocation['type'] == $searchType) { - $className = str_replace('{0}', $readerType, $searchLocation['class']); - - $instance = new $className(); - if ($instance !== null) { - return $instance; - } - } - } - - // Nothing found... - throw new PHPExcel_Reader_Exception("No $searchType found for type $readerType"); - } - - /** - * Loads PHPExcel from file using automatic PHPExcel_Reader_IReader resolution - * - * @static - * @access public - * @param string $pFilename The name of the spreadsheet file - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public static function load($pFilename) - { - $reader = self::createReaderForFile($pFilename); - return $reader->load($pFilename); - } - - /** - * Identify file type using automatic PHPExcel_Reader_IReader resolution - * - * @static - * @access public - * @param string $pFilename The name of the spreadsheet file to identify - * @return string - * @throws PHPExcel_Reader_Exception - */ - public static function identify($pFilename) - { - $reader = self::createReaderForFile($pFilename); - $className = get_class($reader); - $classType = explode('_', $className); - unset($reader); - return array_pop($classType); - } - - /** - * Create PHPExcel_Reader_IReader for file using automatic PHPExcel_Reader_IReader resolution - * - * @static - * @access public - * @param string $pFilename The name of the spreadsheet file - * @return PHPExcel_Reader_IReader - * @throws PHPExcel_Reader_Exception - */ - public static function createReaderForFile($pFilename) - { - // First, lucky guess by inspecting file extension - $pathinfo = pathinfo($pFilename); - - $extensionType = null; - if (isset($pathinfo['extension'])) { - switch (strtolower($pathinfo['extension'])) { - case 'xlsx': // Excel (OfficeOpenXML) Spreadsheet - case 'xlsm': // Excel (OfficeOpenXML) Macro Spreadsheet (macros will be discarded) - case 'xltx': // Excel (OfficeOpenXML) Template - case 'xltm': // Excel (OfficeOpenXML) Macro Template (macros will be discarded) - $extensionType = 'Excel2007'; - break; - case 'xls': // Excel (BIFF) Spreadsheet - case 'xlt': // Excel (BIFF) Template - $extensionType = 'Excel5'; - break; - case 'ods': // Open/Libre Offic Calc - case 'ots': // Open/Libre Offic Calc Template - $extensionType = 'OOCalc'; - break; - case 'slk': - $extensionType = 'SYLK'; - break; - case 'xml': // Excel 2003 SpreadSheetML - $extensionType = 'Excel2003XML'; - break; - case 'gnumeric': - $extensionType = 'Gnumeric'; - break; - case 'htm': - case 'html': - $extensionType = 'HTML'; - break; - case 'csv': - // Do nothing - // We must not try to use CSV reader since it loads - // all files including Excel files etc. - break; - default: - break; - } - - if ($extensionType !== null) { - $reader = self::createReader($extensionType); - // Let's see if we are lucky - if (isset($reader) && $reader->canRead($pFilename)) { - return $reader; - } - } - } - - // If we reach here then "lucky guess" didn't give any result - // Try walking through all the options in self::$autoResolveClasses - foreach (self::$autoResolveClasses as $autoResolveClass) { - // Ignore our original guess, we know that won't work - if ($autoResolveClass !== $extensionType) { - $reader = self::createReader($autoResolveClass); - if ($reader->canRead($pFilename)) { - return $reader; - } - } - } - - throw new PHPExcel_Reader_Exception('Unable to identify a reader for this file'); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/NamedRange.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/NamedRange.php deleted file mode 100644 index 2848db8..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/NamedRange.php +++ /dev/null @@ -1,249 +0,0 @@ -worksheet) - * - * @var bool - */ - private $localOnly; - - /** - * Scope - * - * @var PHPExcel_Worksheet - */ - private $scope; - - /** - * Create a new NamedRange - * - * @param string $pName - * @param PHPExcel_Worksheet $pWorksheet - * @param string $pRange - * @param bool $pLocalOnly - * @param PHPExcel_Worksheet|null $pScope Scope. Only applies when $pLocalOnly = true. Null for global scope. - * @throws PHPExcel_Exception - */ - public function __construct($pName = null, PHPExcel_Worksheet $pWorksheet, $pRange = 'A1', $pLocalOnly = false, $pScope = null) - { - // Validate data - if (($pName === null) || ($pWorksheet === null) || ($pRange === null)) { - throw new PHPExcel_Exception('Parameters can not be null.'); - } - - // Set local members - $this->name = $pName; - $this->worksheet = $pWorksheet; - $this->range = $pRange; - $this->localOnly = $pLocalOnly; - $this->scope = ($pLocalOnly == true) ? (($pScope == null) ? $pWorksheet : $pScope) : null; - } - - /** - * Get name - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Set name - * - * @param string $value - * @return PHPExcel_NamedRange - */ - public function setName($value = null) - { - if ($value !== null) { - // Old title - $oldTitle = $this->name; - - // Re-attach - if ($this->worksheet !== null) { - $this->worksheet->getParent()->removeNamedRange($this->name, $this->worksheet); - } - $this->name = $value; - - if ($this->worksheet !== null) { - $this->worksheet->getParent()->addNamedRange($this); - } - - // New title - $newTitle = $this->name; - PHPExcel_ReferenceHelper::getInstance()->updateNamedFormulas($this->worksheet->getParent(), $oldTitle, $newTitle); - } - return $this; - } - - /** - * Get worksheet - * - * @return PHPExcel_Worksheet - */ - public function getWorksheet() - { - return $this->worksheet; - } - - /** - * Set worksheet - * - * @param PHPExcel_Worksheet $value - * @return PHPExcel_NamedRange - */ - public function setWorksheet(PHPExcel_Worksheet $value = null) - { - if ($value !== null) { - $this->worksheet = $value; - } - return $this; - } - - /** - * Get range - * - * @return string - */ - public function getRange() - { - return $this->range; - } - - /** - * Set range - * - * @param string $value - * @return PHPExcel_NamedRange - */ - public function setRange($value = null) - { - if ($value !== null) { - $this->range = $value; - } - return $this; - } - - /** - * Get localOnly - * - * @return bool - */ - public function getLocalOnly() - { - return $this->localOnly; - } - - /** - * Set localOnly - * - * @param bool $value - * @return PHPExcel_NamedRange - */ - public function setLocalOnly($value = false) - { - $this->localOnly = $value; - $this->scope = $value ? $this->worksheet : null; - return $this; - } - - /** - * Get scope - * - * @return PHPExcel_Worksheet|null - */ - public function getScope() - { - return $this->scope; - } - - /** - * Set scope - * - * @param PHPExcel_Worksheet|null $value - * @return PHPExcel_NamedRange - */ - public function setScope(PHPExcel_Worksheet $value = null) - { - $this->scope = $value; - $this->localOnly = ($value == null) ? false : true; - return $this; - } - - /** - * Resolve a named range to a regular cell range - * - * @param string $pNamedRange Named range - * @param PHPExcel_Worksheet|null $pSheet Scope. Use null for global scope - * @return PHPExcel_NamedRange - */ - public static function resolveRange($pNamedRange = '', PHPExcel_Worksheet $pSheet) - { - return $pSheet->getParent()->getNamedRange($pNamedRange, $pSheet); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Abstract.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Abstract.php deleted file mode 100644 index deeb75a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Abstract.php +++ /dev/null @@ -1,301 +0,0 @@ -readDataOnly; - } - - /** - * Set read data only - * Set to true, to advise the Reader only to read data values for cells, and to ignore any formatting information. - * Set to false (the default) to advise the Reader to read both data and formatting for cells. - * - * @param boolean $pValue - * - * @return PHPExcel_Reader_IReader - */ - public function setReadDataOnly($pValue = false) - { - $this->readDataOnly = $pValue; - return $this; - } - - /** - * Read empty cells? - * If this is true (the default), then the Reader will read data values for all cells, irrespective of value. - * If false it will not read data for cells containing a null value or an empty string. - * - * @return boolean - */ - public function getReadEmptyCells() - { - return $this->readEmptyCells; - } - - /** - * Set read empty cells - * Set to true (the default) to advise the Reader read data values for all cells, irrespective of value. - * Set to false to advise the Reader to ignore cells containing a null value or an empty string. - * - * @param boolean $pValue - * - * @return PHPExcel_Reader_IReader - */ - public function setReadEmptyCells($pValue = true) - { - $this->readEmptyCells = $pValue; - return $this; - } - - /** - * Read charts in workbook? - * If this is true, then the Reader will include any charts that exist in the workbook. - * Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. - * If false (the default) it will ignore any charts defined in the workbook file. - * - * @return boolean - */ - public function getIncludeCharts() - { - return $this->includeCharts; - } - - /** - * Set read charts in workbook - * Set to true, to advise the Reader to include any charts that exist in the workbook. - * Note that a ReadDataOnly value of false overrides, and charts won't be read regardless of the IncludeCharts value. - * Set to false (the default) to discard charts. - * - * @param boolean $pValue - * - * @return PHPExcel_Reader_IReader - */ - public function setIncludeCharts($pValue = false) - { - $this->includeCharts = (boolean) $pValue; - return $this; - } - - /** - * Get which sheets to load - * Returns either an array of worksheet names (the list of worksheets that should be loaded), or a null - * indicating that all worksheets in the workbook should be loaded. - * - * @return mixed - */ - public function getLoadSheetsOnly() - { - return $this->loadSheetsOnly; - } - - /** - * Set which sheets to load - * - * @param mixed $value - * This should be either an array of worksheet names to be loaded, or a string containing a single worksheet name. - * If NULL, then it tells the Reader to read all worksheets in the workbook - * - * @return PHPExcel_Reader_IReader - */ - public function setLoadSheetsOnly($value = null) - { - if ($value === null) { - return $this->setLoadAllSheets(); - } - - $this->loadSheetsOnly = is_array($value) ? $value : array($value); - return $this; - } - - /** - * Set all sheets to load - * Tells the Reader to load all worksheets from the workbook. - * - * @return PHPExcel_Reader_IReader - */ - public function setLoadAllSheets() - { - $this->loadSheetsOnly = null; - return $this; - } - - /** - * Read filter - * - * @return PHPExcel_Reader_IReadFilter - */ - public function getReadFilter() - { - return $this->readFilter; - } - - /** - * Set read filter - * - * @param PHPExcel_Reader_IReadFilter $pValue - * @return PHPExcel_Reader_IReader - */ - public function setReadFilter(PHPExcel_Reader_IReadFilter $pValue) - { - $this->readFilter = $pValue; - return $this; - } - - /** - * Open file for reading - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - * @return resource - */ - protected function openFile($pFilename) - { - // Check if file exists - if (!file_exists($pFilename) || !is_readable($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - // Open file - $this->fileHandle = fopen($pFilename, 'r'); - if ($this->fileHandle === false) { - throw new PHPExcel_Reader_Exception("Could not open file " . $pFilename . " for reading."); - } - } - - /** - * Can the current PHPExcel_Reader_IReader read the file? - * - * @param string $pFilename - * @return boolean - * @throws PHPExcel_Reader_Exception - */ - public function canRead($pFilename) - { - // Check if file exists - try { - $this->openFile($pFilename); - } catch (Exception $e) { - return false; - } - - $readable = $this->isValidFormat(); - fclose($this->fileHandle); - return $readable; - } - - /** - * Scan theXML for use of securityScan(file_get_contents($filestream)); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/CSV.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/CSV.php deleted file mode 100644 index 21329da..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/CSV.php +++ /dev/null @@ -1,406 +0,0 @@ -readFilter = new PHPExcel_Reader_DefaultReadFilter(); - } - - /** - * Validate that the current file is a CSV file - * - * @return boolean - */ - protected function isValidFormat() - { - return true; - } - - /** - * Set input encoding - * - * @param string $pValue Input encoding - */ - public function setInputEncoding($pValue = 'UTF-8') - { - $this->inputEncoding = $pValue; - return $this; - } - - /** - * Get input encoding - * - * @return string - */ - public function getInputEncoding() - { - return $this->inputEncoding; - } - - /** - * Move filepointer past any BOM marker - * - */ - protected function skipBOM() - { - rewind($this->fileHandle); - - switch ($this->inputEncoding) { - case 'UTF-8': - fgets($this->fileHandle, 4) == "\xEF\xBB\xBF" ? - fseek($this->fileHandle, 3) : fseek($this->fileHandle, 0); - break; - case 'UTF-16LE': - fgets($this->fileHandle, 3) == "\xFF\xFE" ? - fseek($this->fileHandle, 2) : fseek($this->fileHandle, 0); - break; - case 'UTF-16BE': - fgets($this->fileHandle, 3) == "\xFE\xFF" ? - fseek($this->fileHandle, 2) : fseek($this->fileHandle, 0); - break; - case 'UTF-32LE': - fgets($this->fileHandle, 5) == "\xFF\xFE\x00\x00" ? - fseek($this->fileHandle, 4) : fseek($this->fileHandle, 0); - break; - case 'UTF-32BE': - fgets($this->fileHandle, 5) == "\x00\x00\xFE\xFF" ? - fseek($this->fileHandle, 4) : fseek($this->fileHandle, 0); - break; - default: - break; - } - } - - /** - * Identify any separator that is explicitly set in the file - * - */ - protected function checkSeparator() - { - $line = fgets($this->fileHandle); - if ($line === false) { - return; - } - - if ((strlen(trim($line, "\r\n")) == 5) && (stripos($line, 'sep=') === 0)) { - $this->delimiter = substr($line, 4, 1); - return; - } - return $this->skipBOM(); - } - - /** - * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetInfo($pFilename) - { - // Open file - $this->openFile($pFilename); - if (!$this->isValidFormat()) { - fclose($this->fileHandle); - throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); - } - $fileHandle = $this->fileHandle; - - // Skip BOM, if any - $this->skipBOM(); - $this->checkSeparator(); - - $escapeEnclosures = array( "\\" . $this->enclosure, $this->enclosure . $this->enclosure ); - - $worksheetInfo = array(); - $worksheetInfo[0]['worksheetName'] = 'Worksheet'; - $worksheetInfo[0]['lastColumnLetter'] = 'A'; - $worksheetInfo[0]['lastColumnIndex'] = 0; - $worksheetInfo[0]['totalRows'] = 0; - $worksheetInfo[0]['totalColumns'] = 0; - - // Loop through each line of the file in turn - while (($rowData = fgetcsv($fileHandle, 0, $this->delimiter, $this->enclosure)) !== false) { - $worksheetInfo[0]['totalRows']++; - $worksheetInfo[0]['lastColumnIndex'] = max($worksheetInfo[0]['lastColumnIndex'], count($rowData) - 1); - } - - $worksheetInfo[0]['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($worksheetInfo[0]['lastColumnIndex']); - $worksheetInfo[0]['totalColumns'] = $worksheetInfo[0]['lastColumnIndex'] + 1; - - // Close file - fclose($fileHandle); - - return $worksheetInfo; - } - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename) - { - // Create new PHPExcel - $objPHPExcel = new PHPExcel(); - - // Load into this instance - return $this->loadIntoExisting($pFilename, $objPHPExcel); - } - - /** - * Loads PHPExcel from file into PHPExcel instance - * - * @param string $pFilename - * @param PHPExcel $objPHPExcel - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) - { - $lineEnding = ini_get('auto_detect_line_endings'); - ini_set('auto_detect_line_endings', true); - - // Open file - $this->openFile($pFilename); - if (!$this->isValidFormat()) { - fclose($this->fileHandle); - throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); - } - $fileHandle = $this->fileHandle; - - // Skip BOM, if any - $this->skipBOM(); - $this->checkSeparator(); - - // Create new PHPExcel object - while ($objPHPExcel->getSheetCount() <= $this->sheetIndex) { - $objPHPExcel->createSheet(); - } - $sheet = $objPHPExcel->setActiveSheetIndex($this->sheetIndex); - - $escapeEnclosures = array( "\\" . $this->enclosure, - $this->enclosure . $this->enclosure - ); - - // Set our starting row based on whether we're in contiguous mode or not - $currentRow = 1; - if ($this->contiguous) { - $currentRow = ($this->contiguousRow == -1) ? $sheet->getHighestRow(): $this->contiguousRow; - } - - // Loop through each line of the file in turn - while (($rowData = fgetcsv($fileHandle, 0, $this->delimiter, $this->enclosure)) !== false) { - $columnLetter = 'A'; - foreach ($rowData as $rowDatum) { - if ($rowDatum != '' && $this->readFilter->readCell($columnLetter, $currentRow)) { - // Unescape enclosures - $rowDatum = str_replace($escapeEnclosures, $this->enclosure, $rowDatum); - - // Convert encoding if necessary - if ($this->inputEncoding !== 'UTF-8') { - $rowDatum = PHPExcel_Shared_String::ConvertEncoding($rowDatum, 'UTF-8', $this->inputEncoding); - } - - // Set cell value - $sheet->getCell($columnLetter . $currentRow)->setValue($rowDatum); - } - ++$columnLetter; - } - ++$currentRow; - } - - // Close file - fclose($fileHandle); - - if ($this->contiguous) { - $this->contiguousRow = $currentRow; - } - - ini_set('auto_detect_line_endings', $lineEnding); - - // Return - return $objPHPExcel; - } - - /** - * Get delimiter - * - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Set delimiter - * - * @param string $pValue Delimiter, defaults to , - * @return PHPExcel_Reader_CSV - */ - public function setDelimiter($pValue = ',') - { - $this->delimiter = $pValue; - return $this; - } - - /** - * Get enclosure - * - * @return string - */ - public function getEnclosure() - { - return $this->enclosure; - } - - /** - * Set enclosure - * - * @param string $pValue Enclosure, defaults to " - * @return PHPExcel_Reader_CSV - */ - public function setEnclosure($pValue = '"') - { - if ($pValue == '') { - $pValue = '"'; - } - $this->enclosure = $pValue; - return $this; - } - - /** - * Get sheet index - * - * @return integer - */ - public function getSheetIndex() - { - return $this->sheetIndex; - } - - /** - * Set sheet index - * - * @param integer $pValue Sheet index - * @return PHPExcel_Reader_CSV - */ - public function setSheetIndex($pValue = 0) - { - $this->sheetIndex = $pValue; - return $this; - } - - /** - * Set Contiguous - * - * @param boolean $contiguous - */ - public function setContiguous($contiguous = false) - { - $this->contiguous = (bool) $contiguous; - if (!$contiguous) { - $this->contiguousRow = -1; - } - - return $this; - } - - /** - * Get Contiguous - * - * @return boolean - */ - public function getContiguous() - { - return $this->contiguous; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/DefaultReadFilter.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/DefaultReadFilter.php deleted file mode 100644 index ea25f63..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/DefaultReadFilter.php +++ /dev/null @@ -1,51 +0,0 @@ -readFilter = new PHPExcel_Reader_DefaultReadFilter(); - } - - - /** - * Can the current PHPExcel_Reader_IReader read the file? - * - * @param string $pFilename - * @return boolean - * @throws PHPExcel_Reader_Exception - */ - public function canRead($pFilename) - { - - // Office xmlns:o="urn:schemas-microsoft-com:office:office" - // Excel xmlns:x="urn:schemas-microsoft-com:office:excel" - // XML Spreadsheet xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" - // Spreadsheet component xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" - // XML schema xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" - // XML data type xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" - // MS-persist recordset xmlns:rs="urn:schemas-microsoft-com:rowset" - // Rowset xmlns:z="#RowsetSchema" - // - - $signature = array( - '' - ); - - // Open file - $this->openFile($pFilename); - $fileHandle = $this->fileHandle; - - // Read sample data (first 2 KB will do) - $data = fread($fileHandle, 2048); - fclose($fileHandle); - - $valid = true; - foreach ($signature as $match) { - // every part of the signature must be present - if (strpos($data, $match) === false) { - $valid = false; - break; - } - } - - // Retrieve charset encoding - if (preg_match('//um', $data, $matches)) { - $this->charSet = strtoupper($matches[1]); - } -// echo 'Character Set is ', $this->charSet,'
    '; - - return $valid; - } - - - /** - * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetNames($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - if (!$this->canRead($pFilename)) { - throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); - } - - $worksheetNames = array(); - - $xml = simplexml_load_string($this->securityScan(file_get_contents($pFilename)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $namespaces = $xml->getNamespaces(true); - - $xml_ss = $xml->children($namespaces['ss']); - foreach ($xml_ss->Worksheet as $worksheet) { - $worksheet_ss = $worksheet->attributes($namespaces['ss']); - $worksheetNames[] = self::convertStringEncoding((string) $worksheet_ss['Name'], $this->charSet); - } - - return $worksheetNames; - } - - - /** - * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetInfo($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $worksheetInfo = array(); - - $xml = simplexml_load_string($this->securityScan(file_get_contents($pFilename)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $namespaces = $xml->getNamespaces(true); - - $worksheetID = 1; - $xml_ss = $xml->children($namespaces['ss']); - foreach ($xml_ss->Worksheet as $worksheet) { - $worksheet_ss = $worksheet->attributes($namespaces['ss']); - - $tmpInfo = array(); - $tmpInfo['worksheetName'] = ''; - $tmpInfo['lastColumnLetter'] = 'A'; - $tmpInfo['lastColumnIndex'] = 0; - $tmpInfo['totalRows'] = 0; - $tmpInfo['totalColumns'] = 0; - - if (isset($worksheet_ss['Name'])) { - $tmpInfo['worksheetName'] = (string) $worksheet_ss['Name']; - } else { - $tmpInfo['worksheetName'] = "Worksheet_{$worksheetID}"; - } - - if (isset($worksheet->Table->Row)) { - $rowIndex = 0; - - foreach ($worksheet->Table->Row as $rowData) { - $columnIndex = 0; - $rowHasData = false; - - foreach ($rowData->Cell as $cell) { - if (isset($cell->Data)) { - $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex); - $rowHasData = true; - } - - ++$columnIndex; - } - - ++$rowIndex; - - if ($rowHasData) { - $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex); - } - } - } - - $tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']); - $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1; - - $worksheetInfo[] = $tmpInfo; - ++$worksheetID; - } - - return $worksheetInfo; - } - - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename) - { - // Create new PHPExcel - $objPHPExcel = new PHPExcel(); - $objPHPExcel->removeSheetByIndex(0); - - // Load into this instance - return $this->loadIntoExisting($pFilename, $objPHPExcel); - } - - protected static function identifyFixedStyleValue($styleList, &$styleAttributeValue) - { - $styleAttributeValue = strtolower($styleAttributeValue); - foreach ($styleList as $style) { - if ($styleAttributeValue == strtolower($style)) { - $styleAttributeValue = $style; - return true; - } - } - return false; - } - - /** - * pixel units to excel width units(units of 1/256th of a character width) - * @param pxs - * @return - */ - protected static function pixel2WidthUnits($pxs) - { - $UNIT_OFFSET_MAP = array(0, 36, 73, 109, 146, 182, 219); - - $widthUnits = 256 * ($pxs / 7); - $widthUnits += $UNIT_OFFSET_MAP[($pxs % 7)]; - return $widthUnits; - } - - /** - * excel width units(units of 1/256th of a character width) to pixel units - * @param widthUnits - * @return - */ - protected static function widthUnits2Pixel($widthUnits) - { - $pixels = ($widthUnits / 256) * 7; - $offsetWidthUnits = $widthUnits % 256; - $pixels += round($offsetWidthUnits / (256 / 7)); - return $pixels; - } - - protected static function hex2str($hex) - { - return chr(hexdec($hex[1])); - } - - /** - * Loads PHPExcel from file into PHPExcel instance - * - * @param string $pFilename - * @param PHPExcel $objPHPExcel - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) - { - $fromFormats = array('\-', '\ '); - $toFormats = array('-', ' '); - - $underlineStyles = array ( - PHPExcel_Style_Font::UNDERLINE_NONE, - PHPExcel_Style_Font::UNDERLINE_DOUBLE, - PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING, - PHPExcel_Style_Font::UNDERLINE_SINGLE, - PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING - ); - $verticalAlignmentStyles = array ( - PHPExcel_Style_Alignment::VERTICAL_BOTTOM, - PHPExcel_Style_Alignment::VERTICAL_TOP, - PHPExcel_Style_Alignment::VERTICAL_CENTER, - PHPExcel_Style_Alignment::VERTICAL_JUSTIFY - ); - $horizontalAlignmentStyles = array ( - PHPExcel_Style_Alignment::HORIZONTAL_GENERAL, - PHPExcel_Style_Alignment::HORIZONTAL_LEFT, - PHPExcel_Style_Alignment::HORIZONTAL_RIGHT, - PHPExcel_Style_Alignment::HORIZONTAL_CENTER, - PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS, - PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY - ); - - $timezoneObj = new DateTimeZone('Europe/London'); - $GMT = new DateTimeZone('UTC'); - - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - if (!$this->canRead($pFilename)) { - throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); - } - - $xml = simplexml_load_string($this->securityScan(file_get_contents($pFilename)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $namespaces = $xml->getNamespaces(true); - - $docProps = $objPHPExcel->getProperties(); - if (isset($xml->DocumentProperties[0])) { - foreach ($xml->DocumentProperties[0] as $propertyName => $propertyValue) { - switch ($propertyName) { - case 'Title': - $docProps->setTitle(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - case 'Subject': - $docProps->setSubject(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - case 'Author': - $docProps->setCreator(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - case 'Created': - $creationDate = strtotime($propertyValue); - $docProps->setCreated($creationDate); - break; - case 'LastAuthor': - $docProps->setLastModifiedBy(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - case 'LastSaved': - $lastSaveDate = strtotime($propertyValue); - $docProps->setModified($lastSaveDate); - break; - case 'Company': - $docProps->setCompany(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - case 'Category': - $docProps->setCategory(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - case 'Manager': - $docProps->setManager(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - case 'Keywords': - $docProps->setKeywords(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - case 'Description': - $docProps->setDescription(self::convertStringEncoding($propertyValue, $this->charSet)); - break; - } - } - } - if (isset($xml->CustomDocumentProperties)) { - foreach ($xml->CustomDocumentProperties[0] as $propertyName => $propertyValue) { - $propertyAttributes = $propertyValue->attributes($namespaces['dt']); - $propertyName = preg_replace_callback('/_x([0-9a-z]{4})_/', 'PHPExcel_Reader_Excel2003XML::hex2str', $propertyName); - $propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_UNKNOWN; - switch ((string) $propertyAttributes) { - case 'string': - $propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING; - $propertyValue = trim($propertyValue); - break; - case 'boolean': - $propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN; - $propertyValue = (bool) $propertyValue; - break; - case 'integer': - $propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_INTEGER; - $propertyValue = intval($propertyValue); - break; - case 'float': - $propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT; - $propertyValue = floatval($propertyValue); - break; - case 'dateTime.tz': - $propertyType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE; - $propertyValue = strtotime(trim($propertyValue)); - break; - } - $docProps->setCustomProperty($propertyName, $propertyValue, $propertyType); - } - } - - foreach ($xml->Styles[0] as $style) { - $style_ss = $style->attributes($namespaces['ss']); - $styleID = (string) $style_ss['ID']; -// echo 'Style ID = '.$styleID.'
    '; - $this->styles[$styleID] = (isset($this->styles['Default'])) ? $this->styles['Default'] : array(); - foreach ($style as $styleType => $styleData) { - $styleAttributes = $styleData->attributes($namespaces['ss']); -// echo $styleType.'
    '; - switch ($styleType) { - case 'Alignment': - foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { -// echo $styleAttributeKey.' = '.$styleAttributeValue.'
    '; - $styleAttributeValue = (string) $styleAttributeValue; - switch ($styleAttributeKey) { - case 'Vertical': - if (self::identifyFixedStyleValue($verticalAlignmentStyles, $styleAttributeValue)) { - $this->styles[$styleID]['alignment']['vertical'] = $styleAttributeValue; - } - break; - case 'Horizontal': - if (self::identifyFixedStyleValue($horizontalAlignmentStyles, $styleAttributeValue)) { - $this->styles[$styleID]['alignment']['horizontal'] = $styleAttributeValue; - } - break; - case 'WrapText': - $this->styles[$styleID]['alignment']['wrap'] = true; - break; - } - } - break; - case 'Borders': - foreach ($styleData->Border as $borderStyle) { - $borderAttributes = $borderStyle->attributes($namespaces['ss']); - $thisBorder = array(); - foreach ($borderAttributes as $borderStyleKey => $borderStyleValue) { -// echo $borderStyleKey.' = '.$borderStyleValue.'
    '; - switch ($borderStyleKey) { - case 'LineStyle': - $thisBorder['style'] = PHPExcel_Style_Border::BORDER_MEDIUM; -// $thisBorder['style'] = $borderStyleValue; - break; - case 'Weight': -// $thisBorder['style'] = $borderStyleValue; - break; - case 'Position': - $borderPosition = strtolower($borderStyleValue); - break; - case 'Color': - $borderColour = substr($borderStyleValue, 1); - $thisBorder['color']['rgb'] = $borderColour; - break; - } - } - if (!empty($thisBorder)) { - if (($borderPosition == 'left') || ($borderPosition == 'right') || ($borderPosition == 'top') || ($borderPosition == 'bottom')) { - $this->styles[$styleID]['borders'][$borderPosition] = $thisBorder; - } - } - } - break; - case 'Font': - foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { -// echo $styleAttributeKey.' = '.$styleAttributeValue.'
    '; - $styleAttributeValue = (string) $styleAttributeValue; - switch ($styleAttributeKey) { - case 'FontName': - $this->styles[$styleID]['font']['name'] = $styleAttributeValue; - break; - case 'Size': - $this->styles[$styleID]['font']['size'] = $styleAttributeValue; - break; - case 'Color': - $this->styles[$styleID]['font']['color']['rgb'] = substr($styleAttributeValue, 1); - break; - case 'Bold': - $this->styles[$styleID]['font']['bold'] = true; - break; - case 'Italic': - $this->styles[$styleID]['font']['italic'] = true; - break; - case 'Underline': - if (self::identifyFixedStyleValue($underlineStyles, $styleAttributeValue)) { - $this->styles[$styleID]['font']['underline'] = $styleAttributeValue; - } - break; - } - } - break; - case 'Interior': - foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { -// echo $styleAttributeKey.' = '.$styleAttributeValue.'
    '; - switch ($styleAttributeKey) { - case 'Color': - $this->styles[$styleID]['fill']['color']['rgb'] = substr($styleAttributeValue, 1); - break; - } - } - break; - case 'NumberFormat': - foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { -// echo $styleAttributeKey.' = '.$styleAttributeValue.'
    '; - $styleAttributeValue = str_replace($fromFormats, $toFormats, $styleAttributeValue); - switch ($styleAttributeValue) { - case 'Short Date': - $styleAttributeValue = 'dd/mm/yyyy'; - break; - } - if ($styleAttributeValue > '') { - $this->styles[$styleID]['numberformat']['code'] = $styleAttributeValue; - } - } - break; - case 'Protection': - foreach ($styleAttributes as $styleAttributeKey => $styleAttributeValue) { -// echo $styleAttributeKey.' = '.$styleAttributeValue.'
    '; - } - break; - } - } -// print_r($this->styles[$styleID]); -// echo '
    '; - } -// echo '
    '; - - $worksheetID = 0; - $xml_ss = $xml->children($namespaces['ss']); - - foreach ($xml_ss->Worksheet as $worksheet) { - $worksheet_ss = $worksheet->attributes($namespaces['ss']); - - if ((isset($this->loadSheetsOnly)) && (isset($worksheet_ss['Name'])) && - (!in_array($worksheet_ss['Name'], $this->loadSheetsOnly))) { - continue; - } - -// echo '

    Worksheet: ', $worksheet_ss['Name'],'

    '; -// - // Create new Worksheet - $objPHPExcel->createSheet(); - $objPHPExcel->setActiveSheetIndex($worksheetID); - if (isset($worksheet_ss['Name'])) { - $worksheetName = self::convertStringEncoding((string) $worksheet_ss['Name'], $this->charSet); - // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in - // formula cells... during the load, all formulae should be correct, and we're simply bringing - // the worksheet name in line with the formula, not the reverse - $objPHPExcel->getActiveSheet()->setTitle($worksheetName, false); - } - - $columnID = 'A'; - if (isset($worksheet->Table->Column)) { - foreach ($worksheet->Table->Column as $columnData) { - $columnData_ss = $columnData->attributes($namespaces['ss']); - if (isset($columnData_ss['Index'])) { - $columnID = PHPExcel_Cell::stringFromColumnIndex($columnData_ss['Index']-1); - } - if (isset($columnData_ss['Width'])) { - $columnWidth = $columnData_ss['Width']; -// echo 'Setting column width for '.$columnID.' to '.$columnWidth.'
    '; - $objPHPExcel->getActiveSheet()->getColumnDimension($columnID)->setWidth($columnWidth / 5.4); - } - ++$columnID; - } - } - - $rowID = 1; - if (isset($worksheet->Table->Row)) { - $additionalMergedCells = 0; - foreach ($worksheet->Table->Row as $rowData) { - $rowHasData = false; - $row_ss = $rowData->attributes($namespaces['ss']); - if (isset($row_ss['Index'])) { - $rowID = (integer) $row_ss['Index']; - } -// echo 'Row '.$rowID.'
    '; - - $columnID = 'A'; - foreach ($rowData->Cell as $cell) { - $cell_ss = $cell->attributes($namespaces['ss']); - if (isset($cell_ss['Index'])) { - $columnID = PHPExcel_Cell::stringFromColumnIndex($cell_ss['Index']-1); - } - $cellRange = $columnID.$rowID; - - if ($this->getReadFilter() !== null) { - if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { - continue; - } - } - - if ((isset($cell_ss['MergeAcross'])) || (isset($cell_ss['MergeDown']))) { - $columnTo = $columnID; - if (isset($cell_ss['MergeAcross'])) { - $additionalMergedCells += (int)$cell_ss['MergeAcross']; - $columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cell_ss['MergeAcross'] -1); - } - $rowTo = $rowID; - if (isset($cell_ss['MergeDown'])) { - $rowTo = $rowTo + $cell_ss['MergeDown']; - } - $cellRange .= ':'.$columnTo.$rowTo; - $objPHPExcel->getActiveSheet()->mergeCells($cellRange); - } - - $cellIsSet = $hasCalculatedValue = false; - $cellDataFormula = ''; - if (isset($cell_ss['Formula'])) { - $cellDataFormula = $cell_ss['Formula']; - // added this as a check for array formulas - if (isset($cell_ss['ArrayRange'])) { - $cellDataCSEFormula = $cell_ss['ArrayRange']; -// echo "found an array formula at ".$columnID.$rowID."
    "; - } - $hasCalculatedValue = true; - } - if (isset($cell->Data)) { - $cellValue = $cellData = $cell->Data; - $type = PHPExcel_Cell_DataType::TYPE_NULL; - $cellData_ss = $cellData->attributes($namespaces['ss']); - if (isset($cellData_ss['Type'])) { - $cellDataType = $cellData_ss['Type']; - switch ($cellDataType) { - /* - const TYPE_STRING = 's'; - const TYPE_FORMULA = 'f'; - const TYPE_NUMERIC = 'n'; - const TYPE_BOOL = 'b'; - const TYPE_NULL = 'null'; - const TYPE_INLINE = 'inlineStr'; - const TYPE_ERROR = 'e'; - */ - case 'String': - $cellValue = self::convertStringEncoding($cellValue, $this->charSet); - $type = PHPExcel_Cell_DataType::TYPE_STRING; - break; - case 'Number': - $type = PHPExcel_Cell_DataType::TYPE_NUMERIC; - $cellValue = (float) $cellValue; - if (floor($cellValue) == $cellValue) { - $cellValue = (integer) $cellValue; - } - break; - case 'Boolean': - $type = PHPExcel_Cell_DataType::TYPE_BOOL; - $cellValue = ($cellValue != 0); - break; - case 'DateTime': - $type = PHPExcel_Cell_DataType::TYPE_NUMERIC; - $cellValue = PHPExcel_Shared_Date::PHPToExcel(strtotime($cellValue)); - break; - case 'Error': - $type = PHPExcel_Cell_DataType::TYPE_ERROR; - break; - } - } - - if ($hasCalculatedValue) { -// echo 'FORMULA
    '; - $type = PHPExcel_Cell_DataType::TYPE_FORMULA; - $columnNumber = PHPExcel_Cell::columnIndexFromString($columnID); - if (substr($cellDataFormula, 0, 3) == 'of:') { - $cellDataFormula = substr($cellDataFormula, 3); -// echo 'Before: ', $cellDataFormula,'
    '; - $temp = explode('"', $cellDataFormula); - $key = false; - foreach ($temp as &$value) { - // Only replace in alternate array entries (i.e. non-quoted blocks) - if ($key = !$key) { - $value = str_replace(array('[.', '.', ']'), '', $value); - } - } - } else { - // Convert R1C1 style references to A1 style references (but only when not quoted) -// echo 'Before: ', $cellDataFormula,'
    '; - $temp = explode('"', $cellDataFormula); - $key = false; - foreach ($temp as &$value) { - // Only replace in alternate array entries (i.e. non-quoted blocks) - if ($key = !$key) { - preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/', $value, $cellReferences, PREG_SET_ORDER + PREG_OFFSET_CAPTURE); - // Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way - // through the formula from left to right. Reversing means that we work right to left.through - // the formula - $cellReferences = array_reverse($cellReferences); - // Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent, - // then modify the formula to use that new reference - foreach ($cellReferences as $cellReference) { - $rowReference = $cellReference[2][0]; - // Empty R reference is the current row - if ($rowReference == '') { - $rowReference = $rowID; - } - // Bracketed R references are relative to the current row - if ($rowReference{0} == '[') { - $rowReference = $rowID + trim($rowReference, '[]'); - } - $columnReference = $cellReference[4][0]; - // Empty C reference is the current column - if ($columnReference == '') { - $columnReference = $columnNumber; - } - // Bracketed C references are relative to the current column - if ($columnReference{0} == '[') { - $columnReference = $columnNumber + trim($columnReference, '[]'); - } - $A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference; - $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); - } - } - } - } - unset($value); - // Then rebuild the formula string - $cellDataFormula = implode('"', $temp); -// echo 'After: ', $cellDataFormula,'
    '; - } - -// echo 'Cell '.$columnID.$rowID.' is a '.$type.' with a value of '.(($hasCalculatedValue) ? $cellDataFormula : $cellValue).'
    '; -// - $objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $cellValue), $type); - if ($hasCalculatedValue) { -// echo 'Formula result is '.$cellValue.'
    '; - $objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setCalculatedValue($cellValue); - } - $cellIsSet = $rowHasData = true; - } - - if (isset($cell->Comment)) { -// echo 'comment found
    '; - $commentAttributes = $cell->Comment->attributes($namespaces['ss']); - $author = 'unknown'; - if (isset($commentAttributes->Author)) { - $author = (string)$commentAttributes->Author; -// echo 'Author: ', $author,'
    '; - } - $node = $cell->Comment->Data->asXML(); -// $annotation = str_replace('html:','',substr($node,49,-10)); -// echo $annotation,'
    '; - $annotation = strip_tags($node); -// echo 'Annotation: ', $annotation,'
    '; - $objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setAuthor(self::convertStringEncoding($author, $this->charSet))->setText($this->parseRichText($annotation)); - } - - if (($cellIsSet) && (isset($cell_ss['StyleID']))) { - $style = (string) $cell_ss['StyleID']; -// echo 'Cell style for '.$columnID.$rowID.' is '.$style.'
    '; - if ((isset($this->styles[$style])) && (!empty($this->styles[$style]))) { -// echo 'Cell '.$columnID.$rowID.'
    '; -// print_r($this->styles[$style]); -// echo '
    '; - if (!$objPHPExcel->getActiveSheet()->cellExists($columnID.$rowID)) { - $objPHPExcel->getActiveSheet()->getCell($columnID.$rowID)->setValue(null); - } - $objPHPExcel->getActiveSheet()->getStyle($cellRange)->applyFromArray($this->styles[$style]); - } - } - ++$columnID; - while ($additionalMergedCells > 0) { - ++$columnID; - $additionalMergedCells--; - } - } - - if ($rowHasData) { - if (isset($row_ss['StyleID'])) { - $rowStyle = $row_ss['StyleID']; - } - if (isset($row_ss['Height'])) { - $rowHeight = $row_ss['Height']; -// echo 'Setting row height to '.$rowHeight.'
    '; - $objPHPExcel->getActiveSheet()->getRowDimension($rowID)->setRowHeight($rowHeight); - } - } - - ++$rowID; - } - } - ++$worksheetID; - } - - // Return - return $objPHPExcel; - } - - - protected static function convertStringEncoding($string, $charset) - { - if ($charset != 'UTF-8') { - return PHPExcel_Shared_String::ConvertEncoding($string, 'UTF-8', $charset); - } - return $string; - } - - - protected function parseRichText($is = '') - { - $value = new PHPExcel_RichText(); - - $value->createText(self::convertStringEncoding($is, $this->charSet)); - - return $value; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php deleted file mode 100644 index 1932df4..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007.php +++ /dev/null @@ -1,2051 +0,0 @@ -readFilter = new PHPExcel_Reader_DefaultReadFilter(); - $this->referenceHelper = PHPExcel_ReferenceHelper::getInstance(); - } - - /** - * Can the current PHPExcel_Reader_IReader read the file? - * - * @param string $pFilename - * @return boolean - * @throws PHPExcel_Reader_Exception - */ - public function canRead($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $zipClass = PHPExcel_Settings::getZipClass(); - - // Check if zip class exists -// if (!class_exists($zipClass, false)) { -// throw new PHPExcel_Reader_Exception($zipClass . " library is not enabled"); -// } - - $xl = false; - // Load file - $zip = new $zipClass; - if ($zip->open($pFilename) === true) { - // check if it is an OOXML archive - $rels = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "_rels/.rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - if ($rels !== false) { - foreach ($rels->Relationship as $rel) { - switch ($rel["Type"]) { - case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument": - if (basename($rel["Target"]) == 'workbook.xml') { - $xl = true; - } - break; - - } - } - } - $zip->close(); - } - - return $xl; - } - - - /** - * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetNames($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $worksheetNames = array(); - - $zipClass = PHPExcel_Settings::getZipClass(); - - $zip = new $zipClass; - $zip->open($pFilename); - - // The files we're looking at here are small enough that simpleXML is more efficient than XMLReader - $rels = simplexml_load_string( - $this->securityScan($this->getFromZipArchive($zip, "_rels/.rels"), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()) - ); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - foreach ($rels->Relationship as $rel) { - switch ($rel["Type"]) { - case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument": - $xmlWorkbook = simplexml_load_string( - $this->securityScan($this->getFromZipArchive($zip, "{$rel['Target']}"), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()) - ); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"); - - if ($xmlWorkbook->sheets) { - foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { - // Check if sheet should be skipped - $worksheetNames[] = (string) $eleSheet["name"]; - } - } - } - } - - $zip->close(); - - return $worksheetNames; - } - - - /** - * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetInfo($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $worksheetInfo = array(); - - $zipClass = PHPExcel_Settings::getZipClass(); - - $zip = new $zipClass; - $zip->open($pFilename); - - $rels = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "_rels/.rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - foreach ($rels->Relationship as $rel) { - if ($rel["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument") { - $dir = dirname($rel["Target"]); - $relsWorkbook = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "$dir/_rels/" . basename($rel["Target"]) . ".rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - $relsWorkbook->registerXPathNamespace("rel", "http://schemas.openxmlformats.org/package/2006/relationships"); - - $worksheets = array(); - foreach ($relsWorkbook->Relationship as $ele) { - if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet") { - $worksheets[(string) $ele["Id"]] = $ele["Target"]; - } - } - - $xmlWorkbook = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"); - if ($xmlWorkbook->sheets) { - $dir = dirname($rel["Target"]); - foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { - $tmpInfo = array( - 'worksheetName' => (string) $eleSheet["name"], - 'lastColumnLetter' => 'A', - 'lastColumnIndex' => 0, - 'totalRows' => 0, - 'totalColumns' => 0, - ); - - $fileWorksheet = $worksheets[(string) self::getArrayItem($eleSheet->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "id")]; - - $xml = new XMLReader(); - $res = $xml->xml($this->securityScanFile('zip://'.PHPExcel_Shared_File::realpath($pFilename).'#'."$dir/$fileWorksheet"), null, PHPExcel_Settings::getLibXmlLoaderOptions()); - $xml->setParserProperty(2, true); - - $currCells = 0; - while ($xml->read()) { - if ($xml->name == 'row' && $xml->nodeType == XMLReader::ELEMENT) { - $row = $xml->getAttribute('r'); - $tmpInfo['totalRows'] = $row; - $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); - $currCells = 0; - } elseif ($xml->name == 'c' && $xml->nodeType == XMLReader::ELEMENT) { - $currCells++; - } - } - $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); - $xml->close(); - - $tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1; - $tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']); - - $worksheetInfo[] = $tmpInfo; - } - } - } - } - - $zip->close(); - - return $worksheetInfo; - } - - private static function castToBoolean($c) - { -// echo 'Initial Cast to Boolean', PHP_EOL; - $value = isset($c->v) ? (string) $c->v : null; - if ($value == '0') { - return false; - } elseif ($value == '1') { - return true; - } else { - return (bool)$c->v; - } - return $value; - } - - private static function castToError($c) - { -// echo 'Initial Cast to Error', PHP_EOL; - return isset($c->v) ? (string) $c->v : null; - } - - private static function castToString($c) - { -// echo 'Initial Cast to String, PHP_EOL; - return isset($c->v) ? (string) $c->v : null; - } - - private function castToFormula($c, $r, &$cellDataType, &$value, &$calculatedValue, &$sharedFormulas, $castBaseType) - { -// echo 'Formula', PHP_EOL; -// echo '$c->f is ', $c->f, PHP_EOL; - $cellDataType = 'f'; - $value = "={$c->f}"; - $calculatedValue = self::$castBaseType($c); - - // Shared formula? - if (isset($c->f['t']) && strtolower((string)$c->f['t']) == 'shared') { -// echo 'SHARED FORMULA', PHP_EOL; - $instance = (string)$c->f['si']; - -// echo 'Instance ID = ', $instance, PHP_EOL; -// -// echo 'Shared Formula Array:', PHP_EOL; -// print_r($sharedFormulas); - if (!isset($sharedFormulas[(string)$c->f['si']])) { -// echo 'SETTING NEW SHARED FORMULA', PHP_EOL; -// echo 'Master is ', $r, PHP_EOL; -// echo 'Formula is ', $value, PHP_EOL; - $sharedFormulas[$instance] = array('master' => $r, 'formula' => $value); -// echo 'New Shared Formula Array:', PHP_EOL; -// print_r($sharedFormulas); - } else { -// echo 'GETTING SHARED FORMULA', PHP_EOL; -// echo 'Master is ', $sharedFormulas[$instance]['master'], PHP_EOL; -// echo 'Formula is ', $sharedFormulas[$instance]['formula'], PHP_EOL; - $master = PHPExcel_Cell::coordinateFromString($sharedFormulas[$instance]['master']); - $current = PHPExcel_Cell::coordinateFromString($r); - - $difference = array(0, 0); - $difference[0] = PHPExcel_Cell::columnIndexFromString($current[0]) - PHPExcel_Cell::columnIndexFromString($master[0]); - $difference[1] = $current[1] - $master[1]; - - $value = $this->referenceHelper->updateFormulaReferences($sharedFormulas[$instance]['formula'], 'A1', $difference[0], $difference[1]); -// echo 'Adjusted Formula is ', $value, PHP_EOL; - } - } - } - - - private function getFromZipArchive($archive, $fileName = '') - { - // Root-relative paths - if (strpos($fileName, '//') !== false) { - $fileName = substr($fileName, strpos($fileName, '//') + 1); - } - $fileName = PHPExcel_Shared_File::realpath($fileName); - - // Sadly, some 3rd party xlsx generators don't use consistent case for filenaming - // so we need to load case-insensitively from the zip file - - // Apache POI fixes - $contents = $archive->getFromIndex( - $archive->locateName($fileName, ZIPARCHIVE::FL_NOCASE) - ); - if ($contents === false) { - $contents = $archive->getFromIndex( - $archive->locateName(substr($fileName, 1), ZIPARCHIVE::FL_NOCASE) - ); - } - - return $contents; - } - - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - // Initialisations - $excel = new PHPExcel; - $excel->removeSheetByIndex(0); - if (!$this->readDataOnly) { - $excel->removeCellStyleXfByIndex(0); // remove the default style - $excel->removeCellXfByIndex(0); // remove the default style - } - - $zipClass = PHPExcel_Settings::getZipClass(); - - $zip = new $zipClass; - $zip->open($pFilename); - - // Read the theme first, because we need the colour scheme when reading the styles - $wbRels = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "xl/_rels/workbook.xml.rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - foreach ($wbRels->Relationship as $rel) { - switch ($rel["Type"]) { - case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme": - $themeOrderArray = array('lt1', 'dk1', 'lt2', 'dk2'); - $themeOrderAdditional = count($themeOrderArray); - - $xmlTheme = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "xl/{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - if (is_object($xmlTheme)) { - $xmlThemeName = $xmlTheme->attributes(); - $xmlTheme = $xmlTheme->children("http://schemas.openxmlformats.org/drawingml/2006/main"); - $themeName = (string)$xmlThemeName['name']; - - $colourScheme = $xmlTheme->themeElements->clrScheme->attributes(); - $colourSchemeName = (string)$colourScheme['name']; - $colourScheme = $xmlTheme->themeElements->clrScheme->children("http://schemas.openxmlformats.org/drawingml/2006/main"); - - $themeColours = array(); - foreach ($colourScheme as $k => $xmlColour) { - $themePos = array_search($k, $themeOrderArray); - if ($themePos === false) { - $themePos = $themeOrderAdditional++; - } - if (isset($xmlColour->sysClr)) { - $xmlColourData = $xmlColour->sysClr->attributes(); - $themeColours[$themePos] = $xmlColourData['lastClr']; - } elseif (isset($xmlColour->srgbClr)) { - $xmlColourData = $xmlColour->srgbClr->attributes(); - $themeColours[$themePos] = $xmlColourData['val']; - } - } - self::$theme = new PHPExcel_Reader_Excel2007_Theme($themeName, $colourSchemeName, $themeColours); - } - break; - } - } - - $rels = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "_rels/.rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - foreach ($rels->Relationship as $rel) { - switch ($rel["Type"]) { - case "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties": - $xmlCore = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - if (is_object($xmlCore)) { - $xmlCore->registerXPathNamespace("dc", "http://purl.org/dc/elements/1.1/"); - $xmlCore->registerXPathNamespace("dcterms", "http://purl.org/dc/terms/"); - $xmlCore->registerXPathNamespace("cp", "http://schemas.openxmlformats.org/package/2006/metadata/core-properties"); - $docProps = $excel->getProperties(); - $docProps->setCreator((string) self::getArrayItem($xmlCore->xpath("dc:creator"))); - $docProps->setLastModifiedBy((string) self::getArrayItem($xmlCore->xpath("cp:lastModifiedBy"))); - $docProps->setCreated(strtotime(self::getArrayItem($xmlCore->xpath("dcterms:created")))); //! respect xsi:type - $docProps->setModified(strtotime(self::getArrayItem($xmlCore->xpath("dcterms:modified")))); //! respect xsi:type - $docProps->setTitle((string) self::getArrayItem($xmlCore->xpath("dc:title"))); - $docProps->setDescription((string) self::getArrayItem($xmlCore->xpath("dc:description"))); - $docProps->setSubject((string) self::getArrayItem($xmlCore->xpath("dc:subject"))); - $docProps->setKeywords((string) self::getArrayItem($xmlCore->xpath("cp:keywords"))); - $docProps->setCategory((string) self::getArrayItem($xmlCore->xpath("cp:category"))); - } - break; - case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties": - $xmlCore = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - if (is_object($xmlCore)) { - $docProps = $excel->getProperties(); - if (isset($xmlCore->Company)) { - $docProps->setCompany((string) $xmlCore->Company); - } - if (isset($xmlCore->Manager)) { - $docProps->setManager((string) $xmlCore->Manager); - } - } - break; - case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties": - $xmlCore = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - if (is_object($xmlCore)) { - $docProps = $excel->getProperties(); - foreach ($xmlCore as $xmlProperty) { - $cellDataOfficeAttributes = $xmlProperty->attributes(); - if (isset($cellDataOfficeAttributes['name'])) { - $propertyName = (string) $cellDataOfficeAttributes['name']; - $cellDataOfficeChildren = $xmlProperty->children('http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); - $attributeType = $cellDataOfficeChildren->getName(); - $attributeValue = (string) $cellDataOfficeChildren->{$attributeType}; - $attributeValue = PHPExcel_DocumentProperties::convertProperty($attributeValue, $attributeType); - $attributeType = PHPExcel_DocumentProperties::convertPropertyType($attributeType); - $docProps->setCustomProperty($propertyName, $attributeValue, $attributeType); - } - } - } - break; - //Ribbon - case "http://schemas.microsoft.com/office/2006/relationships/ui/extensibility": - $customUI = $rel['Target']; - if (!is_null($customUI)) { - $this->readRibbon($excel, $customUI, $zip); - } - break; - case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument": - $dir = dirname($rel["Target"]); - $relsWorkbook = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "$dir/_rels/" . basename($rel["Target"]) . ".rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - $relsWorkbook->registerXPathNamespace("rel", "http://schemas.openxmlformats.org/package/2006/relationships"); - - $sharedStrings = array(); - $xpath = self::getArrayItem($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings']")); - $xmlStrings = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "$dir/$xpath[Target]")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"); - if (isset($xmlStrings) && isset($xmlStrings->si)) { - foreach ($xmlStrings->si as $val) { - if (isset($val->t)) { - $sharedStrings[] = PHPExcel_Shared_String::ControlCharacterOOXML2PHP((string) $val->t); - } elseif (isset($val->r)) { - $sharedStrings[] = $this->parseRichText($val); - } - } - } - - $worksheets = array(); - $macros = $customUI = null; - foreach ($relsWorkbook->Relationship as $ele) { - switch ($ele['Type']) { - case "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet": - $worksheets[(string) $ele["Id"]] = $ele["Target"]; - break; - // a vbaProject ? (: some macros) - case "http://schemas.microsoft.com/office/2006/relationships/vbaProject": - $macros = $ele["Target"]; - break; - } - } - - if (!is_null($macros)) { - $macrosCode = $this->getFromZipArchive($zip, 'xl/vbaProject.bin');//vbaProject.bin always in 'xl' dir and always named vbaProject.bin - if ($macrosCode !== false) { - $excel->setMacrosCode($macrosCode); - $excel->setHasMacros(true); - //short-circuit : not reading vbaProject.bin.rel to get Signature =>allways vbaProjectSignature.bin in 'xl' dir - $Certificate = $this->getFromZipArchive($zip, 'xl/vbaProjectSignature.bin'); - if ($Certificate !== false) { - $excel->setMacrosCertificate($Certificate); - } - } - } - $styles = array(); - $cellStyles = array(); - $xpath = self::getArrayItem($relsWorkbook->xpath("rel:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles']")); - $xmlStyles = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "$dir/$xpath[Target]")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"); - - $numFmts = null; - if ($xmlStyles && $xmlStyles->numFmts[0]) { - $numFmts = $xmlStyles->numFmts[0]; - } - if (isset($numFmts) && ($numFmts !== null)) { - $numFmts->registerXPathNamespace("sml", "http://schemas.openxmlformats.org/spreadsheetml/2006/main"); - } - if (!$this->readDataOnly && $xmlStyles) { - foreach ($xmlStyles->cellXfs->xf as $xf) { - $numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL; - if ($xf["numFmtId"]) { - if (isset($numFmts)) { - $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]")); - - if (isset($tmpNumFmt["formatCode"])) { - $numFmt = (string) $tmpNumFmt["formatCode"]; - } - } - - // We shouldn't override any of the built-in MS Excel values (values below id 164) - // But there's a lot of naughty homebrew xlsx writers that do use "reserved" id values that aren't actually used - // So we make allowance for them rather than lose formatting masks - if ((int)$xf["numFmtId"] < 164 && PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]) !== '') { - $numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]); - } - } - $quotePrefix = false; - if (isset($xf["quotePrefix"])) { - $quotePrefix = (boolean) $xf["quotePrefix"]; - } - - $style = (object) array( - "numFmt" => $numFmt, - "font" => $xmlStyles->fonts->font[intval($xf["fontId"])], - "fill" => $xmlStyles->fills->fill[intval($xf["fillId"])], - "border" => $xmlStyles->borders->border[intval($xf["borderId"])], - "alignment" => $xf->alignment, - "protection" => $xf->protection, - "quotePrefix" => $quotePrefix, - ); - $styles[] = $style; - - // add style to cellXf collection - $objStyle = new PHPExcel_Style; - self::readStyle($objStyle, $style); - $excel->addCellXf($objStyle); - } - - foreach ($xmlStyles->cellStyleXfs->xf as $xf) { - $numFmt = PHPExcel_Style_NumberFormat::FORMAT_GENERAL; - if ($numFmts && $xf["numFmtId"]) { - $tmpNumFmt = self::getArrayItem($numFmts->xpath("sml:numFmt[@numFmtId=$xf[numFmtId]]")); - if (isset($tmpNumFmt["formatCode"])) { - $numFmt = (string) $tmpNumFmt["formatCode"]; - } elseif ((int)$xf["numFmtId"] < 165) { - $numFmt = PHPExcel_Style_NumberFormat::builtInFormatCode((int)$xf["numFmtId"]); - } - } - - $cellStyle = (object) array( - "numFmt" => $numFmt, - "font" => $xmlStyles->fonts->font[intval($xf["fontId"])], - "fill" => $xmlStyles->fills->fill[intval($xf["fillId"])], - "border" => $xmlStyles->borders->border[intval($xf["borderId"])], - "alignment" => $xf->alignment, - "protection" => $xf->protection, - "quotePrefix" => $quotePrefix, - ); - $cellStyles[] = $cellStyle; - - // add style to cellStyleXf collection - $objStyle = new PHPExcel_Style; - self::readStyle($objStyle, $cellStyle); - $excel->addCellStyleXf($objStyle); - } - } - - $dxfs = array(); - if (!$this->readDataOnly && $xmlStyles) { - // Conditional Styles - if ($xmlStyles->dxfs) { - foreach ($xmlStyles->dxfs->dxf as $dxf) { - $style = new PHPExcel_Style(false, true); - self::readStyle($style, $dxf); - $dxfs[] = $style; - } - } - // Cell Styles - if ($xmlStyles->cellStyles) { - foreach ($xmlStyles->cellStyles->cellStyle as $cellStyle) { - if (intval($cellStyle['builtinId']) == 0) { - if (isset($cellStyles[intval($cellStyle['xfId'])])) { - // Set default style - $style = new PHPExcel_Style; - self::readStyle($style, $cellStyles[intval($cellStyle['xfId'])]); - - // normal style, currently not using it for anything - } - } - } - } - } - - $xmlWorkbook = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "{$rel['Target']}")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"); - - // Set base date - if ($xmlWorkbook->workbookPr) { - PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900); - if (isset($xmlWorkbook->workbookPr['date1904'])) { - if (self::boolean((string) $xmlWorkbook->workbookPr['date1904'])) { - PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_MAC_1904); - } - } - } - - $sheetId = 0; // keep track of new sheet id in final workbook - $oldSheetId = -1; // keep track of old sheet id in final workbook - $countSkippedSheets = 0; // keep track of number of skipped sheets - $mapSheetId = array(); // mapping of sheet ids from old to new - - $charts = $chartDetails = array(); - - if ($xmlWorkbook->sheets) { - foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { - ++$oldSheetId; - - // Check if sheet should be skipped - if (isset($this->loadSheetsOnly) && !in_array((string) $eleSheet["name"], $this->loadSheetsOnly)) { - ++$countSkippedSheets; - $mapSheetId[$oldSheetId] = null; - continue; - } - - // Map old sheet id in original workbook to new sheet id. - // They will differ if loadSheetsOnly() is being used - $mapSheetId[$oldSheetId] = $oldSheetId - $countSkippedSheets; - - // Load sheet - $docSheet = $excel->createSheet(); - // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet - // references in formula cells... during the load, all formulae should be correct, - // and we're simply bringing the worksheet name in line with the formula, not the - // reverse - $docSheet->setTitle((string) $eleSheet["name"], false); - $fileWorksheet = $worksheets[(string) self::getArrayItem($eleSheet->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "id")]; - $xmlSheet = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "$dir/$fileWorksheet")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/spreadsheetml/2006/main"); - - $sharedFormulas = array(); - - if (isset($eleSheet["state"]) && (string) $eleSheet["state"] != '') { - $docSheet->setSheetState((string) $eleSheet["state"]); - } - - if (isset($xmlSheet->sheetViews) && isset($xmlSheet->sheetViews->sheetView)) { - if (isset($xmlSheet->sheetViews->sheetView['zoomScale'])) { - $docSheet->getSheetView()->setZoomScale(intval($xmlSheet->sheetViews->sheetView['zoomScale'])); - } - if (isset($xmlSheet->sheetViews->sheetView['zoomScaleNormal'])) { - $docSheet->getSheetView()->setZoomScaleNormal(intval($xmlSheet->sheetViews->sheetView['zoomScaleNormal'])); - } - if (isset($xmlSheet->sheetViews->sheetView['view'])) { - $docSheet->getSheetView()->setView((string) $xmlSheet->sheetViews->sheetView['view']); - } - if (isset($xmlSheet->sheetViews->sheetView['showGridLines'])) { - $docSheet->setShowGridLines(self::boolean((string)$xmlSheet->sheetViews->sheetView['showGridLines'])); - } - if (isset($xmlSheet->sheetViews->sheetView['showRowColHeaders'])) { - $docSheet->setShowRowColHeaders(self::boolean((string)$xmlSheet->sheetViews->sheetView['showRowColHeaders'])); - } - if (isset($xmlSheet->sheetViews->sheetView['rightToLeft'])) { - $docSheet->setRightToLeft(self::boolean((string)$xmlSheet->sheetViews->sheetView['rightToLeft'])); - } - if (isset($xmlSheet->sheetViews->sheetView->pane)) { - if (isset($xmlSheet->sheetViews->sheetView->pane['topLeftCell'])) { - $docSheet->freezePane((string)$xmlSheet->sheetViews->sheetView->pane['topLeftCell']); - } else { - $xSplit = 0; - $ySplit = 0; - - if (isset($xmlSheet->sheetViews->sheetView->pane['xSplit'])) { - $xSplit = 1 + intval($xmlSheet->sheetViews->sheetView->pane['xSplit']); - } - - if (isset($xmlSheet->sheetViews->sheetView->pane['ySplit'])) { - $ySplit = 1 + intval($xmlSheet->sheetViews->sheetView->pane['ySplit']); - } - - $docSheet->freezePaneByColumnAndRow($xSplit, $ySplit); - } - } - - if (isset($xmlSheet->sheetViews->sheetView->selection)) { - if (isset($xmlSheet->sheetViews->sheetView->selection['sqref'])) { - $sqref = (string)$xmlSheet->sheetViews->sheetView->selection['sqref']; - $sqref = explode(' ', $sqref); - $sqref = $sqref[0]; - $docSheet->setSelectedCells($sqref); - } - } - } - - if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->tabColor)) { - if (isset($xmlSheet->sheetPr->tabColor['rgb'])) { - $docSheet->getTabColor()->setARGB((string)$xmlSheet->sheetPr->tabColor['rgb']); - } - } - if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr['codeName'])) { - $docSheet->setCodeName((string) $xmlSheet->sheetPr['codeName']); - } - if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->outlinePr)) { - if (isset($xmlSheet->sheetPr->outlinePr['summaryRight']) && - !self::boolean((string) $xmlSheet->sheetPr->outlinePr['summaryRight'])) { - $docSheet->setShowSummaryRight(false); - } else { - $docSheet->setShowSummaryRight(true); - } - - if (isset($xmlSheet->sheetPr->outlinePr['summaryBelow']) && - !self::boolean((string) $xmlSheet->sheetPr->outlinePr['summaryBelow'])) { - $docSheet->setShowSummaryBelow(false); - } else { - $docSheet->setShowSummaryBelow(true); - } - } - - if (isset($xmlSheet->sheetPr) && isset($xmlSheet->sheetPr->pageSetUpPr)) { - if (isset($xmlSheet->sheetPr->pageSetUpPr['fitToPage']) && - !self::boolean((string) $xmlSheet->sheetPr->pageSetUpPr['fitToPage'])) { - $docSheet->getPageSetup()->setFitToPage(false); - } else { - $docSheet->getPageSetup()->setFitToPage(true); - } - } - - if (isset($xmlSheet->sheetFormatPr)) { - if (isset($xmlSheet->sheetFormatPr['customHeight']) && - self::boolean((string) $xmlSheet->sheetFormatPr['customHeight']) && - isset($xmlSheet->sheetFormatPr['defaultRowHeight'])) { - $docSheet->getDefaultRowDimension()->setRowHeight((float)$xmlSheet->sheetFormatPr['defaultRowHeight']); - } - if (isset($xmlSheet->sheetFormatPr['defaultColWidth'])) { - $docSheet->getDefaultColumnDimension()->setWidth((float)$xmlSheet->sheetFormatPr['defaultColWidth']); - } - if (isset($xmlSheet->sheetFormatPr['zeroHeight']) && - ((string)$xmlSheet->sheetFormatPr['zeroHeight'] == '1')) { - $docSheet->getDefaultRowDimension()->setZeroHeight(true); - } - } - - if (isset($xmlSheet->cols) && !$this->readDataOnly) { - foreach ($xmlSheet->cols->col as $col) { - for ($i = intval($col["min"]) - 1; $i < intval($col["max"]); ++$i) { - if ($col["style"] && !$this->readDataOnly) { - $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setXfIndex(intval($col["style"])); - } - if (self::boolean($col["bestFit"])) { - //$docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setAutoSize(true); - } - if (self::boolean($col["hidden"])) { - // echo PHPExcel_Cell::stringFromColumnIndex($i), ': HIDDEN COLUMN',PHP_EOL; - $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setVisible(false); - } - if (self::boolean($col["collapsed"])) { - $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setCollapsed(true); - } - if ($col["outlineLevel"] > 0) { - $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setOutlineLevel(intval($col["outlineLevel"])); - } - $docSheet->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($i))->setWidth(floatval($col["width"])); - - if (intval($col["max"]) == 16384) { - break; - } - } - } - } - - if (isset($xmlSheet->printOptions) && !$this->readDataOnly) { - if (self::boolean((string) $xmlSheet->printOptions['gridLinesSet'])) { - $docSheet->setShowGridlines(true); - } - if (self::boolean((string) $xmlSheet->printOptions['gridLines'])) { - $docSheet->setPrintGridlines(true); - } - if (self::boolean((string) $xmlSheet->printOptions['horizontalCentered'])) { - $docSheet->getPageSetup()->setHorizontalCentered(true); - } - if (self::boolean((string) $xmlSheet->printOptions['verticalCentered'])) { - $docSheet->getPageSetup()->setVerticalCentered(true); - } - } - - if ($xmlSheet && $xmlSheet->sheetData && $xmlSheet->sheetData->row) { - foreach ($xmlSheet->sheetData->row as $row) { - if ($row["ht"] && !$this->readDataOnly) { - $docSheet->getRowDimension(intval($row["r"]))->setRowHeight(floatval($row["ht"])); - } - if (self::boolean($row["hidden"]) && !$this->readDataOnly) { - $docSheet->getRowDimension(intval($row["r"]))->setVisible(false); - } - if (self::boolean($row["collapsed"])) { - $docSheet->getRowDimension(intval($row["r"]))->setCollapsed(true); - } - if ($row["outlineLevel"] > 0) { - $docSheet->getRowDimension(intval($row["r"]))->setOutlineLevel(intval($row["outlineLevel"])); - } - if ($row["s"] && !$this->readDataOnly) { - $docSheet->getRowDimension(intval($row["r"]))->setXfIndex(intval($row["s"])); - } - - foreach ($row->c as $c) { - $r = (string) $c["r"]; - $cellDataType = (string) $c["t"]; - $value = null; - $calculatedValue = null; - - // Read cell? - if ($this->getReadFilter() !== null) { - $coordinates = PHPExcel_Cell::coordinateFromString($r); - - if (!$this->getReadFilter()->readCell($coordinates[0], $coordinates[1], $docSheet->getTitle())) { - continue; - } - } - - // echo 'Reading cell ', $coordinates[0], $coordinates[1], PHP_EOL; - // print_r($c); - // echo PHP_EOL; - // echo 'Cell Data Type is ', $cellDataType, ': '; - // - // Read cell! - switch ($cellDataType) { - case "s": - // echo 'String', PHP_EOL; - if ((string)$c->v != '') { - $value = $sharedStrings[intval($c->v)]; - - if ($value instanceof PHPExcel_RichText) { - $value = clone $value; - } - } else { - $value = ''; - } - break; - case "b": - // echo 'Boolean', PHP_EOL; - if (!isset($c->f)) { - $value = self::castToBoolean($c); - } else { - // Formula - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToBoolean'); - if (isset($c->f['t'])) { - $att = array(); - $att = $c->f; - $docSheet->getCell($r)->setFormulaAttributes($att); - } - // echo '$calculatedValue = ', $calculatedValue, PHP_EOL; - } - break; - case "inlineStr": -// echo 'Inline String', PHP_EOL; - if (isset($c->f)) { - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); - } else { - $value = $this->parseRichText($c->is); - } - break; - case "e": - // echo 'Error', PHP_EOL; - if (!isset($c->f)) { - $value = self::castToError($c); - } else { - // Formula - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); - // echo '$calculatedValue = ', $calculatedValue, PHP_EOL; - } - break; - default: -// echo 'Default', PHP_EOL; - if (!isset($c->f)) { - // echo 'Not a Formula', PHP_EOL; - $value = self::castToString($c); - } else { - // echo 'Treat as Formula', PHP_EOL; - // Formula - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToString'); - // echo '$calculatedValue = ', $calculatedValue, PHP_EOL; - } - break; - } - // echo 'Value is ', $value, PHP_EOL; - - // Check for numeric values - if (is_numeric($value) && $cellDataType != 's') { - if ($value == (int)$value) { - $value = (int)$value; - } elseif ($value == (float)$value) { - $value = (float)$value; - } elseif ($value == (double)$value) { - $value = (double)$value; - } - } - - // Rich text? - if ($value instanceof PHPExcel_RichText && $this->readDataOnly) { - $value = $value->getPlainText(); - } - - $cell = $docSheet->getCell($r); - // Assign value - if ($cellDataType != '') { - $cell->setValueExplicit($value, $cellDataType); - } else { - $cell->setValue($value); - } - if ($calculatedValue !== null) { - $cell->setCalculatedValue($calculatedValue); - } - - // Style information? - if ($c["s"] && !$this->readDataOnly) { - // no style index means 0, it seems - $cell->setXfIndex(isset($styles[intval($c["s"])]) ? - intval($c["s"]) : 0); - } - } - } - } - - $conditionals = array(); - if (!$this->readDataOnly && $xmlSheet && $xmlSheet->conditionalFormatting) { - foreach ($xmlSheet->conditionalFormatting as $conditional) { - foreach ($conditional->cfRule as $cfRule) { - if (((string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_NONE || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_CELLIS || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT || (string)$cfRule["type"] == PHPExcel_Style_Conditional::CONDITION_EXPRESSION) && isset($dxfs[intval($cfRule["dxfId"])])) { - $conditionals[(string) $conditional["sqref"]][intval($cfRule["priority"])] = $cfRule; - } - } - } - - foreach ($conditionals as $ref => $cfRules) { - ksort($cfRules); - $conditionalStyles = array(); - foreach ($cfRules as $cfRule) { - $objConditional = new PHPExcel_Style_Conditional(); - $objConditional->setConditionType((string)$cfRule["type"]); - $objConditional->setOperatorType((string)$cfRule["operator"]); - - if ((string)$cfRule["text"] != '') { - $objConditional->setText((string)$cfRule["text"]); - } - - if (count($cfRule->formula) > 1) { - foreach ($cfRule->formula as $formula) { - $objConditional->addCondition((string)$formula); - } - } else { - $objConditional->addCondition((string)$cfRule->formula); - } - $objConditional->setStyle(clone $dxfs[intval($cfRule["dxfId"])]); - $conditionalStyles[] = $objConditional; - } - - // Extract all cell references in $ref - $cellBlocks = explode(' ', str_replace('$', '', strtoupper($ref))); - foreach ($cellBlocks as $cellBlock) { - $docSheet->getStyle($cellBlock)->setConditionalStyles($conditionalStyles); - } - } - } - - $aKeys = array("sheet", "objects", "scenarios", "formatCells", "formatColumns", "formatRows", "insertColumns", "insertRows", "insertHyperlinks", "deleteColumns", "deleteRows", "selectLockedCells", "sort", "autoFilter", "pivotTables", "selectUnlockedCells"); - if (!$this->readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) { - foreach ($aKeys as $key) { - $method = "set" . ucfirst($key); - $docSheet->getProtection()->$method(self::boolean((string) $xmlSheet->sheetProtection[$key])); - } - } - - if (!$this->readDataOnly && $xmlSheet && $xmlSheet->sheetProtection) { - $docSheet->getProtection()->setPassword((string) $xmlSheet->sheetProtection["password"], true); - if ($xmlSheet->protectedRanges->protectedRange) { - foreach ($xmlSheet->protectedRanges->protectedRange as $protectedRange) { - $docSheet->protectCells((string) $protectedRange["sqref"], (string) $protectedRange["password"], true); - } - } - } - - if ($xmlSheet && $xmlSheet->autoFilter && !$this->readDataOnly) { - $autoFilterRange = (string) $xmlSheet->autoFilter["ref"]; - if (strpos($autoFilterRange, ':') !== false) { - $autoFilter = $docSheet->getAutoFilter(); - $autoFilter->setRange($autoFilterRange); - - foreach ($xmlSheet->autoFilter->filterColumn as $filterColumn) { - $column = $autoFilter->getColumnByOffset((integer) $filterColumn["colId"]); - // Check for standard filters - if ($filterColumn->filters) { - $column->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER); - $filters = $filterColumn->filters; - if ((isset($filters["blank"])) && ($filters["blank"] == 1)) { - // Operator is undefined, but always treated as EQUAL - $column->createRule()->setRule(null, '')->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER); - } - // Standard filters are always an OR join, so no join rule needs to be set - // Entries can be either filter elements - foreach ($filters->filter as $filterRule) { - // Operator is undefined, but always treated as EQUAL - $column->createRule()->setRule(null, (string) $filterRule["val"])->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER); - } - // Or Date Group elements - foreach ($filters->dateGroupItem as $dateGroupItem) { - $column->createRule()->setRule( - // Operator is undefined, but always treated as EQUAL - null, - array( - 'year' => (string) $dateGroupItem["year"], - 'month' => (string) $dateGroupItem["month"], - 'day' => (string) $dateGroupItem["day"], - 'hour' => (string) $dateGroupItem["hour"], - 'minute' => (string) $dateGroupItem["minute"], - 'second' => (string) $dateGroupItem["second"], - ), - (string) $dateGroupItem["dateTimeGrouping"] - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP); - } - } - // Check for custom filters - if ($filterColumn->customFilters) { - $column->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER); - $customFilters = $filterColumn->customFilters; - // Custom filters can an AND or an OR join; - // and there should only ever be one or two entries - if ((isset($customFilters["and"])) && ($customFilters["and"] == 1)) { - $column->setJoin(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_AND); - } - foreach ($customFilters->customFilter as $filterRule) { - $column->createRule()->setRule( - (string) $filterRule["operator"], - (string) $filterRule["val"] - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); - } - } - // Check for dynamic filters - if ($filterColumn->dynamicFilter) { - $column->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER); - // We should only ever have one dynamic filter - foreach ($filterColumn->dynamicFilter as $filterRule) { - $column->createRule()->setRule( - // Operator is undefined, but always treated as EQUAL - null, - (string) $filterRule["val"], - (string) $filterRule["type"] - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER); - if (isset($filterRule["val"])) { - $column->setAttribute('val', (string) $filterRule["val"]); - } - if (isset($filterRule["maxVal"])) { - $column->setAttribute('maxVal', (string) $filterRule["maxVal"]); - } - } - } - // Check for dynamic filters - if ($filterColumn->top10) { - $column->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER); - // We should only ever have one top10 filter - foreach ($filterColumn->top10 as $filterRule) { - $column->createRule()->setRule( - (((isset($filterRule["percent"])) && ($filterRule["percent"] == 1)) - ? PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT - : PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE - ), - (string) $filterRule["val"], - (((isset($filterRule["top"])) && ($filterRule["top"] == 1)) - ? PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP - : PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM - ) - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_TOPTENFILTER); - } - } - } - } - } - - if ($xmlSheet && $xmlSheet->mergeCells && $xmlSheet->mergeCells->mergeCell && !$this->readDataOnly) { - foreach ($xmlSheet->mergeCells->mergeCell as $mergeCell) { - $mergeRef = (string) $mergeCell["ref"]; - if (strpos($mergeRef, ':') !== false) { - $docSheet->mergeCells((string) $mergeCell["ref"]); - } - } - } - - if ($xmlSheet && $xmlSheet->pageMargins && !$this->readDataOnly) { - $docPageMargins = $docSheet->getPageMargins(); - $docPageMargins->setLeft(floatval($xmlSheet->pageMargins["left"])); - $docPageMargins->setRight(floatval($xmlSheet->pageMargins["right"])); - $docPageMargins->setTop(floatval($xmlSheet->pageMargins["top"])); - $docPageMargins->setBottom(floatval($xmlSheet->pageMargins["bottom"])); - $docPageMargins->setHeader(floatval($xmlSheet->pageMargins["header"])); - $docPageMargins->setFooter(floatval($xmlSheet->pageMargins["footer"])); - } - - if ($xmlSheet && $xmlSheet->pageSetup && !$this->readDataOnly) { - $docPageSetup = $docSheet->getPageSetup(); - - if (isset($xmlSheet->pageSetup["orientation"])) { - $docPageSetup->setOrientation((string) $xmlSheet->pageSetup["orientation"]); - } - if (isset($xmlSheet->pageSetup["paperSize"])) { - $docPageSetup->setPaperSize(intval($xmlSheet->pageSetup["paperSize"])); - } - if (isset($xmlSheet->pageSetup["scale"])) { - $docPageSetup->setScale(intval($xmlSheet->pageSetup["scale"]), false); - } - if (isset($xmlSheet->pageSetup["fitToHeight"]) && intval($xmlSheet->pageSetup["fitToHeight"]) >= 0) { - $docPageSetup->setFitToHeight(intval($xmlSheet->pageSetup["fitToHeight"]), false); - } - if (isset($xmlSheet->pageSetup["fitToWidth"]) && intval($xmlSheet->pageSetup["fitToWidth"]) >= 0) { - $docPageSetup->setFitToWidth(intval($xmlSheet->pageSetup["fitToWidth"]), false); - } - if (isset($xmlSheet->pageSetup["firstPageNumber"]) && isset($xmlSheet->pageSetup["useFirstPageNumber"]) && - self::boolean((string) $xmlSheet->pageSetup["useFirstPageNumber"])) { - $docPageSetup->setFirstPageNumber(intval($xmlSheet->pageSetup["firstPageNumber"])); - } - } - - if ($xmlSheet && $xmlSheet->headerFooter && !$this->readDataOnly) { - $docHeaderFooter = $docSheet->getHeaderFooter(); - - if (isset($xmlSheet->headerFooter["differentOddEven"]) && - self::boolean((string)$xmlSheet->headerFooter["differentOddEven"])) { - $docHeaderFooter->setDifferentOddEven(true); - } else { - $docHeaderFooter->setDifferentOddEven(false); - } - if (isset($xmlSheet->headerFooter["differentFirst"]) && - self::boolean((string)$xmlSheet->headerFooter["differentFirst"])) { - $docHeaderFooter->setDifferentFirst(true); - } else { - $docHeaderFooter->setDifferentFirst(false); - } - if (isset($xmlSheet->headerFooter["scaleWithDoc"]) && - !self::boolean((string)$xmlSheet->headerFooter["scaleWithDoc"])) { - $docHeaderFooter->setScaleWithDocument(false); - } else { - $docHeaderFooter->setScaleWithDocument(true); - } - if (isset($xmlSheet->headerFooter["alignWithMargins"]) && - !self::boolean((string)$xmlSheet->headerFooter["alignWithMargins"])) { - $docHeaderFooter->setAlignWithMargins(false); - } else { - $docHeaderFooter->setAlignWithMargins(true); - } - - $docHeaderFooter->setOddHeader((string) $xmlSheet->headerFooter->oddHeader); - $docHeaderFooter->setOddFooter((string) $xmlSheet->headerFooter->oddFooter); - $docHeaderFooter->setEvenHeader((string) $xmlSheet->headerFooter->evenHeader); - $docHeaderFooter->setEvenFooter((string) $xmlSheet->headerFooter->evenFooter); - $docHeaderFooter->setFirstHeader((string) $xmlSheet->headerFooter->firstHeader); - $docHeaderFooter->setFirstFooter((string) $xmlSheet->headerFooter->firstFooter); - } - - if ($xmlSheet && $xmlSheet->rowBreaks && $xmlSheet->rowBreaks->brk && !$this->readDataOnly) { - foreach ($xmlSheet->rowBreaks->brk as $brk) { - if ($brk["man"]) { - $docSheet->setBreak("A$brk[id]", PHPExcel_Worksheet::BREAK_ROW); - } - } - } - if ($xmlSheet && $xmlSheet->colBreaks && $xmlSheet->colBreaks->brk && !$this->readDataOnly) { - foreach ($xmlSheet->colBreaks->brk as $brk) { - if ($brk["man"]) { - $docSheet->setBreak(PHPExcel_Cell::stringFromColumnIndex((string) $brk["id"]) . "1", PHPExcel_Worksheet::BREAK_COLUMN); - } - } - } - - if ($xmlSheet && $xmlSheet->dataValidations && !$this->readDataOnly) { - foreach ($xmlSheet->dataValidations->dataValidation as $dataValidation) { - // Uppercase coordinate - $range = strtoupper($dataValidation["sqref"]); - $rangeSet = explode(' ', $range); - foreach ($rangeSet as $range) { - $stRange = $docSheet->shrinkRangeToFit($range); - - // Extract all cell references in $range - foreach (PHPExcel_Cell::extractAllCellReferencesInRange($stRange) as $reference) { - // Create validation - $docValidation = $docSheet->getCell($reference)->getDataValidation(); - $docValidation->setType((string) $dataValidation["type"]); - $docValidation->setErrorStyle((string) $dataValidation["errorStyle"]); - $docValidation->setOperator((string) $dataValidation["operator"]); - $docValidation->setAllowBlank($dataValidation["allowBlank"] != 0); - $docValidation->setShowDropDown($dataValidation["showDropDown"] == 0); - $docValidation->setShowInputMessage($dataValidation["showInputMessage"] != 0); - $docValidation->setShowErrorMessage($dataValidation["showErrorMessage"] != 0); - $docValidation->setErrorTitle((string) $dataValidation["errorTitle"]); - $docValidation->setError((string) $dataValidation["error"]); - $docValidation->setPromptTitle((string) $dataValidation["promptTitle"]); - $docValidation->setPrompt((string) $dataValidation["prompt"]); - $docValidation->setFormula1((string) $dataValidation->formula1); - $docValidation->setFormula2((string) $dataValidation->formula2); - } - } - } - } - - // Add hyperlinks - $hyperlinks = array(); - if (!$this->readDataOnly) { - // Locate hyperlink relations - if ($zip->locateName(dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")) { - $relsWorksheet = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - foreach ($relsWorksheet->Relationship as $ele) { - if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink") { - $hyperlinks[(string)$ele["Id"]] = (string)$ele["Target"]; - } - } - } - - // Loop through hyperlinks - if ($xmlSheet && $xmlSheet->hyperlinks) { - foreach ($xmlSheet->hyperlinks->hyperlink as $hyperlink) { - // Link url - $linkRel = $hyperlink->attributes('http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - - foreach (PHPExcel_Cell::extractAllCellReferencesInRange($hyperlink['ref']) as $cellReference) { - $cell = $docSheet->getCell($cellReference); - if (isset($linkRel['id'])) { - $hyperlinkUrl = $hyperlinks[ (string)$linkRel['id'] ]; - if (isset($hyperlink['location'])) { - $hyperlinkUrl .= '#' . (string) $hyperlink['location']; - } - $cell->getHyperlink()->setUrl($hyperlinkUrl); - } elseif (isset($hyperlink['location'])) { - $cell->getHyperlink()->setUrl('sheet://' . (string)$hyperlink['location']); - } - - // Tooltip - if (isset($hyperlink['tooltip'])) { - $cell->getHyperlink()->setTooltip((string)$hyperlink['tooltip']); - } - } - } - } - } - - // Add comments - $comments = array(); - $vmlComments = array(); - if (!$this->readDataOnly) { - // Locate comment relations - if ($zip->locateName(dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")) { - $relsWorksheet = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - foreach ($relsWorksheet->Relationship as $ele) { - if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments") { - $comments[(string)$ele["Id"]] = (string)$ele["Target"]; - } - if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing") { - $vmlComments[(string)$ele["Id"]] = (string)$ele["Target"]; - } - } - } - - // Loop through comments - foreach ($comments as $relName => $relPath) { - // Load comments file - $relPath = PHPExcel_Shared_File::realpath(dirname("$dir/$fileWorksheet") . "/" . $relPath); - $commentsFile = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, $relPath)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - - // Utility variables - $authors = array(); - - // Loop through authors - foreach ($commentsFile->authors->author as $author) { - $authors[] = (string)$author; - } - - // Loop through contents - foreach ($commentsFile->commentList->comment as $comment) { - if (!empty($comment['authorId'])) { - $docSheet->getComment((string)$comment['ref'])->setAuthor($authors[(string)$comment['authorId']]); - } - $docSheet->getComment((string)$comment['ref'])->setText($this->parseRichText($comment->text)); - } - } - - // Loop through VML comments - foreach ($vmlComments as $relName => $relPath) { - // Load VML comments file - $relPath = PHPExcel_Shared_File::realpath(dirname("$dir/$fileWorksheet") . "/" . $relPath); - $vmlCommentsFile = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, $relPath)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $vmlCommentsFile->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); - - $shapes = $vmlCommentsFile->xpath('//v:shape'); - foreach ($shapes as $shape) { - $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); - - if (isset($shape['style'])) { - $style = (string)$shape['style']; - $fillColor = strtoupper(substr((string)$shape['fillcolor'], 1)); - $column = null; - $row = null; - - $clientData = $shape->xpath('.//x:ClientData'); - if (is_array($clientData) && !empty($clientData)) { - $clientData = $clientData[0]; - - if (isset($clientData['ObjectType']) && (string)$clientData['ObjectType'] == 'Note') { - $temp = $clientData->xpath('.//x:Row'); - if (is_array($temp)) { - $row = $temp[0]; - } - - $temp = $clientData->xpath('.//x:Column'); - if (is_array($temp)) { - $column = $temp[0]; - } - } - } - - if (($column !== null) && ($row !== null)) { - // Set comment properties - $comment = $docSheet->getCommentByColumnAndRow((string) $column, $row + 1); - $comment->getFillColor()->setRGB($fillColor); - - // Parse style - $styleArray = explode(';', str_replace(' ', '', $style)); - foreach ($styleArray as $stylePair) { - $stylePair = explode(':', $stylePair); - - if ($stylePair[0] == 'margin-left') { - $comment->setMarginLeft($stylePair[1]); - } - if ($stylePair[0] == 'margin-top') { - $comment->setMarginTop($stylePair[1]); - } - if ($stylePair[0] == 'width') { - $comment->setWidth($stylePair[1]); - } - if ($stylePair[0] == 'height') { - $comment->setHeight($stylePair[1]); - } - if ($stylePair[0] == 'visibility') { - $comment->setVisible($stylePair[1] == 'visible'); - } - } - } - } - } - } - - // Header/footer images - if ($xmlSheet && $xmlSheet->legacyDrawingHF && !$this->readDataOnly) { - if ($zip->locateName(dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")) { - $relsWorksheet = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - $vmlRelationship = ''; - - foreach ($relsWorksheet->Relationship as $ele) { - if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing") { - $vmlRelationship = self::dirAdd("$dir/$fileWorksheet", $ele["Target"]); - } - } - - if ($vmlRelationship != '') { - // Fetch linked images - $relsVML = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, dirname($vmlRelationship) . '/_rels/' . basename($vmlRelationship) . '.rels')), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - $drawings = array(); - foreach ($relsVML->Relationship as $ele) { - if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") { - $drawings[(string) $ele["Id"]] = self::dirAdd($vmlRelationship, $ele["Target"]); - } - } - - // Fetch VML document - $vmlDrawing = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, $vmlRelationship)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $vmlDrawing->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); - - $hfImages = array(); - - $shapes = $vmlDrawing->xpath('//v:shape'); - foreach ($shapes as $idx => $shape) { - $shape->registerXPathNamespace('v', 'urn:schemas-microsoft-com:vml'); - $imageData = $shape->xpath('//v:imagedata'); - $imageData = $imageData[$idx]; - - $imageData = $imageData->attributes('urn:schemas-microsoft-com:office:office'); - $style = self::toCSSArray((string)$shape['style']); - - $hfImages[ (string)$shape['id'] ] = new PHPExcel_Worksheet_HeaderFooterDrawing(); - if (isset($imageData['title'])) { - $hfImages[ (string)$shape['id'] ]->setName((string)$imageData['title']); - } - - $hfImages[ (string)$shape['id'] ]->setPath("zip://".PHPExcel_Shared_File::realpath($pFilename)."#" . $drawings[(string)$imageData['relid']], false); - $hfImages[ (string)$shape['id'] ]->setResizeProportional(false); - $hfImages[ (string)$shape['id'] ]->setWidth($style['width']); - $hfImages[ (string)$shape['id'] ]->setHeight($style['height']); - if (isset($style['margin-left'])) { - $hfImages[ (string)$shape['id'] ]->setOffsetX($style['margin-left']); - } - $hfImages[ (string)$shape['id'] ]->setOffsetY($style['margin-top']); - $hfImages[ (string)$shape['id'] ]->setResizeProportional(true); - } - - $docSheet->getHeaderFooter()->setImages($hfImages); - } - } - } - - } - - // TODO: Autoshapes from twoCellAnchors! - if ($zip->locateName(dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")) { - $relsWorksheet = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, dirname("$dir/$fileWorksheet") . "/_rels/" . basename($fileWorksheet) . ".rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - $drawings = array(); - foreach ($relsWorksheet->Relationship as $ele) { - if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing") { - $drawings[(string) $ele["Id"]] = self::dirAdd("$dir/$fileWorksheet", $ele["Target"]); - } - } - if ($xmlSheet->drawing && !$this->readDataOnly) { - foreach ($xmlSheet->drawing as $drawing) { - $fileDrawing = $drawings[(string) self::getArrayItem($drawing->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "id")]; - $relsDrawing = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, dirname($fileDrawing) . "/_rels/" . basename($fileDrawing) . ".rels")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); //~ http://schemas.openxmlformats.org/package/2006/relationships"); - $images = array(); - - if ($relsDrawing && $relsDrawing->Relationship) { - foreach ($relsDrawing->Relationship as $ele) { - if ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image") { - $images[(string) $ele["Id"]] = self::dirAdd($fileDrawing, $ele["Target"]); - } elseif ($ele["Type"] == "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart") { - if ($this->includeCharts) { - $charts[self::dirAdd($fileDrawing, $ele["Target"])] = array( - 'id' => (string) $ele["Id"], - 'sheet' => $docSheet->getTitle() - ); - } - } - } - } - $xmlDrawing = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, $fileDrawing)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions())->children("http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"); - - if ($xmlDrawing->oneCellAnchor) { - foreach ($xmlDrawing->oneCellAnchor as $oneCellAnchor) { - if ($oneCellAnchor->pic->blipFill) { - $blip = $oneCellAnchor->pic->blipFill->children("http://schemas.openxmlformats.org/drawingml/2006/main")->blip; - $xfrm = $oneCellAnchor->pic->spPr->children("http://schemas.openxmlformats.org/drawingml/2006/main")->xfrm; - $outerShdw = $oneCellAnchor->pic->spPr->children("http://schemas.openxmlformats.org/drawingml/2006/main")->effectLst->outerShdw; - $objDrawing = new PHPExcel_Worksheet_Drawing; - $objDrawing->setName((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), "name")); - $objDrawing->setDescription((string) self::getArrayItem($oneCellAnchor->pic->nvPicPr->cNvPr->attributes(), "descr")); - $objDrawing->setPath("zip://".PHPExcel_Shared_File::realpath($pFilename)."#" . $images[(string) self::getArrayItem($blip->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "embed")], false); - $objDrawing->setCoordinates(PHPExcel_Cell::stringFromColumnIndex((string) $oneCellAnchor->from->col) . ($oneCellAnchor->from->row + 1)); - $objDrawing->setOffsetX(PHPExcel_Shared_Drawing::EMUToPixels($oneCellAnchor->from->colOff)); - $objDrawing->setOffsetY(PHPExcel_Shared_Drawing::EMUToPixels($oneCellAnchor->from->rowOff)); - $objDrawing->setResizeProportional(false); - $objDrawing->setWidth(PHPExcel_Shared_Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), "cx"))); - $objDrawing->setHeight(PHPExcel_Shared_Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), "cy"))); - if ($xfrm) { - $objDrawing->setRotation(PHPExcel_Shared_Drawing::angleToDegrees(self::getArrayItem($xfrm->attributes(), "rot"))); - } - if ($outerShdw) { - $shadow = $objDrawing->getShadow(); - $shadow->setVisible(true); - $shadow->setBlurRadius(PHPExcel_Shared_Drawing::EMUTopixels(self::getArrayItem($outerShdw->attributes(), "blurRad"))); - $shadow->setDistance(PHPExcel_Shared_Drawing::EMUTopixels(self::getArrayItem($outerShdw->attributes(), "dist"))); - $shadow->setDirection(PHPExcel_Shared_Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), "dir"))); - $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), "algn")); - $shadow->getColor()->setRGB(self::getArrayItem($outerShdw->srgbClr->attributes(), "val")); - $shadow->setAlpha(self::getArrayItem($outerShdw->srgbClr->alpha->attributes(), "val") / 1000); - } - $objDrawing->setWorksheet($docSheet); - } else { - // ? Can charts be positioned with a oneCellAnchor ? - $coordinates = PHPExcel_Cell::stringFromColumnIndex((string) $oneCellAnchor->from->col) . ($oneCellAnchor->from->row + 1); - $offsetX = PHPExcel_Shared_Drawing::EMUToPixels($oneCellAnchor->from->colOff); - $offsetY = PHPExcel_Shared_Drawing::EMUToPixels($oneCellAnchor->from->rowOff); - $width = PHPExcel_Shared_Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), "cx")); - $height = PHPExcel_Shared_Drawing::EMUToPixels(self::getArrayItem($oneCellAnchor->ext->attributes(), "cy")); - } - } - } - if ($xmlDrawing->twoCellAnchor) { - foreach ($xmlDrawing->twoCellAnchor as $twoCellAnchor) { - if ($twoCellAnchor->pic->blipFill) { - $blip = $twoCellAnchor->pic->blipFill->children("http://schemas.openxmlformats.org/drawingml/2006/main")->blip; - $xfrm = $twoCellAnchor->pic->spPr->children("http://schemas.openxmlformats.org/drawingml/2006/main")->xfrm; - $outerShdw = $twoCellAnchor->pic->spPr->children("http://schemas.openxmlformats.org/drawingml/2006/main")->effectLst->outerShdw; - $objDrawing = new PHPExcel_Worksheet_Drawing; - $objDrawing->setName((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), "name")); - $objDrawing->setDescription((string) self::getArrayItem($twoCellAnchor->pic->nvPicPr->cNvPr->attributes(), "descr")); - $objDrawing->setPath("zip://".PHPExcel_Shared_File::realpath($pFilename)."#" . $images[(string) self::getArrayItem($blip->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"), "embed")], false); - $objDrawing->setCoordinates(PHPExcel_Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col) . ($twoCellAnchor->from->row + 1)); - $objDrawing->setOffsetX(PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->from->colOff)); - $objDrawing->setOffsetY(PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->from->rowOff)); - $objDrawing->setResizeProportional(false); - - if ($xfrm) { - $objDrawing->setWidth(PHPExcel_Shared_Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), "cx"))); - $objDrawing->setHeight(PHPExcel_Shared_Drawing::EMUToPixels(self::getArrayItem($xfrm->ext->attributes(), "cy"))); - $objDrawing->setRotation(PHPExcel_Shared_Drawing::angleToDegrees(self::getArrayItem($xfrm->attributes(), "rot"))); - } - if ($outerShdw) { - $shadow = $objDrawing->getShadow(); - $shadow->setVisible(true); - $shadow->setBlurRadius(PHPExcel_Shared_Drawing::EMUTopixels(self::getArrayItem($outerShdw->attributes(), "blurRad"))); - $shadow->setDistance(PHPExcel_Shared_Drawing::EMUTopixels(self::getArrayItem($outerShdw->attributes(), "dist"))); - $shadow->setDirection(PHPExcel_Shared_Drawing::angleToDegrees(self::getArrayItem($outerShdw->attributes(), "dir"))); - $shadow->setAlignment((string) self::getArrayItem($outerShdw->attributes(), "algn")); - $shadow->getColor()->setRGB(self::getArrayItem($outerShdw->srgbClr->attributes(), "val")); - $shadow->setAlpha(self::getArrayItem($outerShdw->srgbClr->alpha->attributes(), "val") / 1000); - } - $objDrawing->setWorksheet($docSheet); - } elseif (($this->includeCharts) && ($twoCellAnchor->graphicFrame)) { - $fromCoordinate = PHPExcel_Cell::stringFromColumnIndex((string) $twoCellAnchor->from->col) . ($twoCellAnchor->from->row + 1); - $fromOffsetX = PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->from->colOff); - $fromOffsetY = PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->from->rowOff); - $toCoordinate = PHPExcel_Cell::stringFromColumnIndex((string) $twoCellAnchor->to->col) . ($twoCellAnchor->to->row + 1); - $toOffsetX = PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->to->colOff); - $toOffsetY = PHPExcel_Shared_Drawing::EMUToPixels($twoCellAnchor->to->rowOff); - $graphic = $twoCellAnchor->graphicFrame->children("http://schemas.openxmlformats.org/drawingml/2006/main")->graphic; - $chartRef = $graphic->graphicData->children("http://schemas.openxmlformats.org/drawingml/2006/chart")->chart; - $thisChart = (string) $chartRef->attributes("http://schemas.openxmlformats.org/officeDocument/2006/relationships"); - - $chartDetails[$docSheet->getTitle().'!'.$thisChart] = array( - 'fromCoordinate' => $fromCoordinate, - 'fromOffsetX' => $fromOffsetX, - 'fromOffsetY' => $fromOffsetY, - 'toCoordinate' => $toCoordinate, - 'toOffsetX' => $toOffsetX, - 'toOffsetY' => $toOffsetY, - 'worksheetTitle' => $docSheet->getTitle() - ); - } - } - } - } - } - } - - // Loop through definedNames - if ($xmlWorkbook->definedNames) { - foreach ($xmlWorkbook->definedNames->definedName as $definedName) { - // Extract range - $extractedRange = (string)$definedName; - $extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange); - if (($spos = strpos($extractedRange, '!')) !== false) { - $extractedRange = substr($extractedRange, 0, $spos).str_replace('$', '', substr($extractedRange, $spos)); - } else { - $extractedRange = str_replace('$', '', $extractedRange); - } - - // Valid range? - if (stripos((string)$definedName, '#REF!') !== false || $extractedRange == '') { - continue; - } - - // Some definedNames are only applicable if we are on the same sheet... - if ((string)$definedName['localSheetId'] != '' && (string)$definedName['localSheetId'] == $sheetId) { - // Switch on type - switch ((string)$definedName['name']) { - case '_xlnm._FilterDatabase': - if ((string)$definedName['hidden'] !== '1') { - $extractedRange = explode(',', $extractedRange); - foreach ($extractedRange as $range) { - $autoFilterRange = $range; - if (strpos($autoFilterRange, ':') !== false) { - $docSheet->getAutoFilter()->setRange($autoFilterRange); - } - } - } - break; - case '_xlnm.Print_Titles': - // Split $extractedRange - $extractedRange = explode(',', $extractedRange); - - // Set print titles - foreach ($extractedRange as $range) { - $matches = array(); - $range = str_replace('$', '', $range); - - // check for repeating columns, e g. 'A:A' or 'A:D' - if (preg_match('/!?([A-Z]+)\:([A-Z]+)$/', $range, $matches)) { - $docSheet->getPageSetup()->setColumnsToRepeatAtLeft(array($matches[1], $matches[2])); - } elseif (preg_match('/!?(\d+)\:(\d+)$/', $range, $matches)) { - // check for repeating rows, e.g. '1:1' or '1:5' - $docSheet->getPageSetup()->setRowsToRepeatAtTop(array($matches[1], $matches[2])); - } - } - break; - case '_xlnm.Print_Area': - $rangeSets = explode(',', $extractedRange); // FIXME: what if sheetname contains comma? - $newRangeSets = array(); - foreach ($rangeSets as $rangeSet) { - $range = explode('!', $rangeSet); // FIXME: what if sheetname contains exclamation mark? - $rangeSet = isset($range[1]) ? $range[1] : $range[0]; - if (strpos($rangeSet, ':') === false) { - $rangeSet = $rangeSet . ':' . $rangeSet; - } - $newRangeSets[] = str_replace('$', '', $rangeSet); - } - $docSheet->getPageSetup()->setPrintArea(implode(',', $newRangeSets)); - break; - - default: - break; - } - } - } - } - - // Next sheet id - ++$sheetId; - } - - // Loop through definedNames - if ($xmlWorkbook->definedNames) { - foreach ($xmlWorkbook->definedNames->definedName as $definedName) { - // Extract range - $extractedRange = (string)$definedName; - $extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange); - if (($spos = strpos($extractedRange, '!')) !== false) { - $extractedRange = substr($extractedRange, 0, $spos).str_replace('$', '', substr($extractedRange, $spos)); - } else { - $extractedRange = str_replace('$', '', $extractedRange); - } - - // Valid range? - if (stripos((string)$definedName, '#REF!') !== false || $extractedRange == '') { - continue; - } - - // Some definedNames are only applicable if we are on the same sheet... - if ((string)$definedName['localSheetId'] != '') { - // Local defined name - // Switch on type - switch ((string)$definedName['name']) { - case '_xlnm._FilterDatabase': - case '_xlnm.Print_Titles': - case '_xlnm.Print_Area': - break; - default: - if ($mapSheetId[(integer) $definedName['localSheetId']] !== null) { - $range = explode('!', (string)$definedName); - if (count($range) == 2) { - $range[0] = str_replace("''", "'", $range[0]); - $range[0] = str_replace("'", "", $range[0]); - if ($worksheet = $docSheet->getParent()->getSheetByName($range[0])) { - $extractedRange = str_replace('$', '', $range[1]); - $scope = $docSheet->getParent()->getSheet($mapSheetId[(integer) $definedName['localSheetId']]); - $excel->addNamedRange(new PHPExcel_NamedRange((string)$definedName['name'], $worksheet, $extractedRange, true, $scope)); - } - } - } - break; - } - } elseif (!isset($definedName['localSheetId'])) { - // "Global" definedNames - $locatedSheet = null; - $extractedSheetName = ''; - if (strpos((string)$definedName, '!') !== false) { - // Extract sheet name - $extractedSheetName = PHPExcel_Worksheet::extractSheetTitle((string)$definedName, true); - $extractedSheetName = $extractedSheetName[0]; - - // Locate sheet - $locatedSheet = $excel->getSheetByName($extractedSheetName); - - // Modify range - $range = explode('!', $extractedRange); - $extractedRange = isset($range[1]) ? $range[1] : $range[0]; - } - - if ($locatedSheet !== null) { - $excel->addNamedRange(new PHPExcel_NamedRange((string)$definedName['name'], $locatedSheet, $extractedRange, false)); - } - } - } - } - } - - if ((!$this->readDataOnly) || (!empty($this->loadSheetsOnly))) { - // active sheet index - $activeTab = intval($xmlWorkbook->bookViews->workbookView["activeTab"]); // refers to old sheet index - - // keep active sheet index if sheet is still loaded, else first sheet is set as the active - if (isset($mapSheetId[$activeTab]) && $mapSheetId[$activeTab] !== null) { - $excel->setActiveSheetIndex($mapSheetId[$activeTab]); - } else { - if ($excel->getSheetCount() == 0) { - $excel->createSheet(); - } - $excel->setActiveSheetIndex(0); - } - } - break; - } - } - - if (!$this->readDataOnly) { - $contentTypes = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, "[Content_Types].xml")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - foreach ($contentTypes->Override as $contentType) { - switch ($contentType["ContentType"]) { - case "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": - if ($this->includeCharts) { - $chartEntryRef = ltrim($contentType['PartName'], '/'); - $chartElements = simplexml_load_string($this->securityScan($this->getFromZipArchive($zip, $chartEntryRef)), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $objChart = PHPExcel_Reader_Excel2007_Chart::readChart($chartElements, basename($chartEntryRef, '.xml')); - -// echo 'Chart ', $chartEntryRef, '
    '; -// var_dump($charts[$chartEntryRef]); -// - if (isset($charts[$chartEntryRef])) { - $chartPositionRef = $charts[$chartEntryRef]['sheet'].'!'.$charts[$chartEntryRef]['id']; -// echo 'Position Ref ', $chartPositionRef, '
    '; - if (isset($chartDetails[$chartPositionRef])) { -// var_dump($chartDetails[$chartPositionRef]); - - $excel->getSheetByName($charts[$chartEntryRef]['sheet'])->addChart($objChart); - $objChart->setWorksheet($excel->getSheetByName($charts[$chartEntryRef]['sheet'])); - $objChart->setTopLeftPosition($chartDetails[$chartPositionRef]['fromCoordinate'], $chartDetails[$chartPositionRef]['fromOffsetX'], $chartDetails[$chartPositionRef]['fromOffsetY']); - $objChart->setBottomRightPosition($chartDetails[$chartPositionRef]['toCoordinate'], $chartDetails[$chartPositionRef]['toOffsetX'], $chartDetails[$chartPositionRef]['toOffsetY']); - } - } - } - } - } - } - - $zip->close(); - - return $excel; - } - - private static function readColor($color, $background = false) - { - if (isset($color["rgb"])) { - return (string)$color["rgb"]; - } elseif (isset($color["indexed"])) { - return PHPExcel_Style_Color::indexedColor($color["indexed"]-7, $background)->getARGB(); - } elseif (isset($color["theme"])) { - if (self::$theme !== null) { - $returnColour = self::$theme->getColourByIndex((int)$color["theme"]); - if (isset($color["tint"])) { - $tintAdjust = (float) $color["tint"]; - $returnColour = PHPExcel_Style_Color::changeBrightness($returnColour, $tintAdjust); - } - return 'FF'.$returnColour; - } - } - - if ($background) { - return 'FFFFFFFF'; - } - return 'FF000000'; - } - - private static function readStyle($docStyle, $style) - { - // format code -// if (isset($style->numFmt)) { -// if (isset($style->numFmt['formatCode'])) { -// $docStyle->getNumberFormat()->setFormatCode((string) $style->numFmt['formatCode']); -// } else { - $docStyle->getNumberFormat()->setFormatCode($style->numFmt); -// } -// } - - // font - if (isset($style->font)) { - $docStyle->getFont()->setName((string) $style->font->name["val"]); - $docStyle->getFont()->setSize((string) $style->font->sz["val"]); - if (isset($style->font->b)) { - $docStyle->getFont()->setBold(!isset($style->font->b["val"]) || self::boolean((string) $style->font->b["val"])); - } - if (isset($style->font->i)) { - $docStyle->getFont()->setItalic(!isset($style->font->i["val"]) || self::boolean((string) $style->font->i["val"])); - } - if (isset($style->font->strike)) { - $docStyle->getFont()->setStrikethrough(!isset($style->font->strike["val"]) || self::boolean((string) $style->font->strike["val"])); - } - $docStyle->getFont()->getColor()->setARGB(self::readColor($style->font->color)); - - if (isset($style->font->u) && !isset($style->font->u["val"])) { - $docStyle->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE); - } elseif (isset($style->font->u) && isset($style->font->u["val"])) { - $docStyle->getFont()->setUnderline((string)$style->font->u["val"]); - } - - if (isset($style->font->vertAlign) && isset($style->font->vertAlign["val"])) { - $vertAlign = strtolower((string)$style->font->vertAlign["val"]); - if ($vertAlign == 'superscript') { - $docStyle->getFont()->setSuperScript(true); - } - if ($vertAlign == 'subscript') { - $docStyle->getFont()->setSubScript(true); - } - } - } - - // fill - if (isset($style->fill)) { - if ($style->fill->gradientFill) { - $gradientFill = $style->fill->gradientFill[0]; - if (!empty($gradientFill["type"])) { - $docStyle->getFill()->setFillType((string) $gradientFill["type"]); - } - $docStyle->getFill()->setRotation(floatval($gradientFill["degree"])); - $gradientFill->registerXPathNamespace("sml", "http://schemas.openxmlformats.org/spreadsheetml/2006/main"); - $docStyle->getFill()->getStartColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath("sml:stop[@position=0]"))->color)); - $docStyle->getFill()->getEndColor()->setARGB(self::readColor(self::getArrayItem($gradientFill->xpath("sml:stop[@position=1]"))->color)); - } elseif ($style->fill->patternFill) { - $patternType = (string)$style->fill->patternFill["patternType"] != '' ? (string)$style->fill->patternFill["patternType"] : 'solid'; - $docStyle->getFill()->setFillType($patternType); - if ($style->fill->patternFill->fgColor) { - $docStyle->getFill()->getStartColor()->setARGB(self::readColor($style->fill->patternFill->fgColor, true)); - } else { - $docStyle->getFill()->getStartColor()->setARGB('FF000000'); - } - if ($style->fill->patternFill->bgColor) { - $docStyle->getFill()->getEndColor()->setARGB(self::readColor($style->fill->patternFill->bgColor, true)); - } - } - } - - // border - if (isset($style->border)) { - $diagonalUp = self::boolean((string) $style->border["diagonalUp"]); - $diagonalDown = self::boolean((string) $style->border["diagonalDown"]); - if (!$diagonalUp && !$diagonalDown) { - $docStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_NONE); - } elseif ($diagonalUp && !$diagonalDown) { - $docStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_UP); - } elseif (!$diagonalUp && $diagonalDown) { - $docStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_DOWN); - } else { - $docStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_BOTH); - } - self::readBorder($docStyle->getBorders()->getLeft(), $style->border->left); - self::readBorder($docStyle->getBorders()->getRight(), $style->border->right); - self::readBorder($docStyle->getBorders()->getTop(), $style->border->top); - self::readBorder($docStyle->getBorders()->getBottom(), $style->border->bottom); - self::readBorder($docStyle->getBorders()->getDiagonal(), $style->border->diagonal); - } - - // alignment - if (isset($style->alignment)) { - $docStyle->getAlignment()->setHorizontal((string) $style->alignment["horizontal"]); - $docStyle->getAlignment()->setVertical((string) $style->alignment["vertical"]); - - $textRotation = 0; - if ((int)$style->alignment["textRotation"] <= 90) { - $textRotation = (int)$style->alignment["textRotation"]; - } elseif ((int)$style->alignment["textRotation"] > 90) { - $textRotation = 90 - (int)$style->alignment["textRotation"]; - } - - $docStyle->getAlignment()->setTextRotation(intval($textRotation)); - $docStyle->getAlignment()->setWrapText(self::boolean((string) $style->alignment["wrapText"])); - $docStyle->getAlignment()->setShrinkToFit(self::boolean((string) $style->alignment["shrinkToFit"])); - $docStyle->getAlignment()->setIndent(intval((string)$style->alignment["indent"]) > 0 ? intval((string)$style->alignment["indent"]) : 0); - $docStyle->getAlignment()->setReadorder(intval((string)$style->alignment["readingOrder"]) > 0 ? intval((string)$style->alignment["readingOrder"]) : 0); - } - - // protection - if (isset($style->protection)) { - if (isset($style->protection['locked'])) { - if (self::boolean((string) $style->protection['locked'])) { - $docStyle->getProtection()->setLocked(PHPExcel_Style_Protection::PROTECTION_PROTECTED); - } else { - $docStyle->getProtection()->setLocked(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED); - } - } - - if (isset($style->protection['hidden'])) { - if (self::boolean((string) $style->protection['hidden'])) { - $docStyle->getProtection()->setHidden(PHPExcel_Style_Protection::PROTECTION_PROTECTED); - } else { - $docStyle->getProtection()->setHidden(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED); - } - } - } - - // top-level style settings - if (isset($style->quotePrefix)) { - $docStyle->setQuotePrefix($style->quotePrefix); - } - } - - private static function readBorder($docBorder, $eleBorder) - { - if (isset($eleBorder["style"])) { - $docBorder->setBorderStyle((string) $eleBorder["style"]); - } - if (isset($eleBorder->color)) { - $docBorder->getColor()->setARGB(self::readColor($eleBorder->color)); - } - } - - private function parseRichText($is = null) - { - $value = new PHPExcel_RichText(); - - if (isset($is->t)) { - $value->createText(PHPExcel_Shared_String::ControlCharacterOOXML2PHP((string) $is->t)); - } else { - if (is_object($is->r)) { - foreach ($is->r as $run) { - if (!isset($run->rPr)) { - $objText = $value->createText(PHPExcel_Shared_String::ControlCharacterOOXML2PHP((string) $run->t)); - - } else { - $objText = $value->createTextRun(PHPExcel_Shared_String::ControlCharacterOOXML2PHP((string) $run->t)); - - if (isset($run->rPr->rFont["val"])) { - $objText->getFont()->setName((string) $run->rPr->rFont["val"]); - } - if (isset($run->rPr->sz["val"])) { - $objText->getFont()->setSize((string) $run->rPr->sz["val"]); - } - if (isset($run->rPr->color)) { - $objText->getFont()->setColor(new PHPExcel_Style_Color(self::readColor($run->rPr->color))); - } - if ((isset($run->rPr->b["val"]) && self::boolean((string) $run->rPr->b["val"])) || - (isset($run->rPr->b) && !isset($run->rPr->b["val"]))) { - $objText->getFont()->setBold(true); - } - if ((isset($run->rPr->i["val"]) && self::boolean((string) $run->rPr->i["val"])) || - (isset($run->rPr->i) && !isset($run->rPr->i["val"]))) { - $objText->getFont()->setItalic(true); - } - if (isset($run->rPr->vertAlign) && isset($run->rPr->vertAlign["val"])) { - $vertAlign = strtolower((string)$run->rPr->vertAlign["val"]); - if ($vertAlign == 'superscript') { - $objText->getFont()->setSuperScript(true); - } - if ($vertAlign == 'subscript') { - $objText->getFont()->setSubScript(true); - } - } - if (isset($run->rPr->u) && !isset($run->rPr->u["val"])) { - $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE); - } elseif (isset($run->rPr->u) && isset($run->rPr->u["val"])) { - $objText->getFont()->setUnderline((string)$run->rPr->u["val"]); - } - if ((isset($run->rPr->strike["val"]) && self::boolean((string) $run->rPr->strike["val"])) || - (isset($run->rPr->strike) && !isset($run->rPr->strike["val"]))) { - $objText->getFont()->setStrikethrough(true); - } - } - } - } - } - - return $value; - } - - private function readRibbon($excel, $customUITarget, $zip) - { - $baseDir = dirname($customUITarget); - $nameCustomUI = basename($customUITarget); - // get the xml file (ribbon) - $localRibbon = $this->getFromZipArchive($zip, $customUITarget); - $customUIImagesNames = array(); - $customUIImagesBinaries = array(); - // something like customUI/_rels/customUI.xml.rels - $pathRels = $baseDir . '/_rels/' . $nameCustomUI . '.rels'; - $dataRels = $this->getFromZipArchive($zip, $pathRels); - if ($dataRels) { - // exists and not empty if the ribbon have some pictures (other than internal MSO) - $UIRels = simplexml_load_string($this->securityScan($dataRels), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - if ($UIRels) { - // we need to save id and target to avoid parsing customUI.xml and "guess" if it's a pseudo callback who load the image - foreach ($UIRels->Relationship as $ele) { - if ($ele["Type"] == 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image') { - // an image ? - $customUIImagesNames[(string) $ele['Id']] = (string)$ele['Target']; - $customUIImagesBinaries[(string)$ele['Target']] = $this->getFromZipArchive($zip, $baseDir . '/' . (string) $ele['Target']); - } - } - } - } - if ($localRibbon) { - $excel->setRibbonXMLData($customUITarget, $localRibbon); - if (count($customUIImagesNames) > 0 && count($customUIImagesBinaries) > 0) { - $excel->setRibbonBinObjects($customUIImagesNames, $customUIImagesBinaries); - } else { - $excel->setRibbonBinObjects(null); - } - } else { - $excel->setRibbonXMLData(null); - $excel->setRibbonBinObjects(null); - } - } - - private static function getArrayItem($array, $key = 0) - { - return (isset($array[$key]) ? $array[$key] : null); - } - - private static function dirAdd($base, $add) - { - return preg_replace('~[^/]+/\.\./~', '', dirname($base) . "/$add"); - } - - private static function toCSSArray($style) - { - $style = str_replace(array("\r","\n"), "", $style); - - $temp = explode(';', $style); - $style = array(); - foreach ($temp as $item) { - $item = explode(':', $item); - - if (strpos($item[1], 'px') !== false) { - $item[1] = str_replace('px', '', $item[1]); - } - if (strpos($item[1], 'pt') !== false) { - $item[1] = str_replace('pt', '', $item[1]); - $item[1] = PHPExcel_Shared_Font::fontSizeToPixels($item[1]); - } - if (strpos($item[1], 'in') !== false) { - $item[1] = str_replace('in', '', $item[1]); - $item[1] = PHPExcel_Shared_Font::inchSizeToPixels($item[1]); - } - if (strpos($item[1], 'cm') !== false) { - $item[1] = str_replace('cm', '', $item[1]); - $item[1] = PHPExcel_Shared_Font::centimeterSizeToPixels($item[1]); - } - - $style[$item[0]] = $item[1]; - } - - return $style; - } - - private static function boolean($value = null) - { - if (is_object($value)) { - $value = (string) $value; - } - if (is_numeric($value)) { - return (bool) $value; - } - return ($value === 'true' || $value === 'TRUE'); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Chart.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Chart.php deleted file mode 100644 index 590bf2d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Chart.php +++ /dev/null @@ -1,520 +0,0 @@ -attributes(); - if (isset($attributes[$name])) { - if ($format == 'string') { - return (string) $attributes[$name]; - } elseif ($format == 'integer') { - return (integer) $attributes[$name]; - } elseif ($format == 'boolean') { - return (boolean) ($attributes[$name] === '0' || $attributes[$name] !== 'true') ? false : true; - } else { - return (float) $attributes[$name]; - } - } - return null; - } - - - private static function readColor($color, $background = false) - { - if (isset($color["rgb"])) { - return (string)$color["rgb"]; - } elseif (isset($color["indexed"])) { - return PHPExcel_Style_Color::indexedColor($color["indexed"]-7, $background)->getARGB(); - } - } - - public static function readChart($chartElements, $chartName) - { - $namespacesChartMeta = $chartElements->getNamespaces(true); - $chartElementsC = $chartElements->children($namespacesChartMeta['c']); - - $XaxisLabel = $YaxisLabel = $legend = $title = null; - $dispBlanksAs = $plotVisOnly = null; - - foreach ($chartElementsC as $chartElementKey => $chartElement) { - switch ($chartElementKey) { - case "chart": - foreach ($chartElement as $chartDetailsKey => $chartDetails) { - $chartDetailsC = $chartDetails->children($namespacesChartMeta['c']); - switch ($chartDetailsKey) { - case "plotArea": - $plotAreaLayout = $XaxisLable = $YaxisLable = null; - $plotSeries = $plotAttributes = array(); - foreach ($chartDetails as $chartDetailKey => $chartDetail) { - switch ($chartDetailKey) { - case "layout": - $plotAreaLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta, 'plotArea'); - break; - case "catAx": - if (isset($chartDetail->title)) { - $XaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta, 'cat'); - } - break; - case "dateAx": - if (isset($chartDetail->title)) { - $XaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta, 'cat'); - } - break; - case "valAx": - if (isset($chartDetail->title)) { - $YaxisLabel = self::chartTitle($chartDetail->title->children($namespacesChartMeta['c']), $namespacesChartMeta, 'cat'); - } - break; - case "barChart": - case "bar3DChart": - $barDirection = self::getAttribute($chartDetail->barDir, 'val', 'string'); - $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotSer->setPlotDirection($barDirection); - $plotSeries[] = $plotSer; - $plotAttributes = self::readChartAttributes($chartDetail); - break; - case "lineChart": - case "line3DChart": - $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotAttributes = self::readChartAttributes($chartDetail); - break; - case "areaChart": - case "area3DChart": - $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotAttributes = self::readChartAttributes($chartDetail); - break; - case "doughnutChart": - case "pieChart": - case "pie3DChart": - $explosion = isset($chartDetail->ser->explosion); - $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotSer->setPlotStyle($explosion); - $plotSeries[] = $plotSer; - $plotAttributes = self::readChartAttributes($chartDetail); - break; - case "scatterChart": - $scatterStyle = self::getAttribute($chartDetail->scatterStyle, 'val', 'string'); - $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotSer->setPlotStyle($scatterStyle); - $plotSeries[] = $plotSer; - $plotAttributes = self::readChartAttributes($chartDetail); - break; - case "bubbleChart": - $bubbleScale = self::getAttribute($chartDetail->bubbleScale, 'val', 'integer'); - $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotSer->setPlotStyle($bubbleScale); - $plotSeries[] = $plotSer; - $plotAttributes = self::readChartAttributes($chartDetail); - break; - case "radarChart": - $radarStyle = self::getAttribute($chartDetail->radarStyle, 'val', 'string'); - $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotSer->setPlotStyle($radarStyle); - $plotSeries[] = $plotSer; - $plotAttributes = self::readChartAttributes($chartDetail); - break; - case "surfaceChart": - case "surface3DChart": - $wireFrame = self::getAttribute($chartDetail->wireframe, 'val', 'boolean'); - $plotSer = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotSer->setPlotStyle($wireFrame); - $plotSeries[] = $plotSer; - $plotAttributes = self::readChartAttributes($chartDetail); - break; - case "stockChart": - $plotSeries[] = self::chartDataSeries($chartDetail, $namespacesChartMeta, $chartDetailKey); - $plotAttributes = self::readChartAttributes($plotAreaLayout); - break; - } - } - if ($plotAreaLayout == null) { - $plotAreaLayout = new PHPExcel_Chart_Layout(); - } - $plotArea = new PHPExcel_Chart_PlotArea($plotAreaLayout, $plotSeries); - self::setChartAttributes($plotAreaLayout, $plotAttributes); - break; - case "plotVisOnly": - $plotVisOnly = self::getAttribute($chartDetails, 'val', 'string'); - break; - case "dispBlanksAs": - $dispBlanksAs = self::getAttribute($chartDetails, 'val', 'string'); - break; - case "title": - $title = self::chartTitle($chartDetails, $namespacesChartMeta, 'title'); - break; - case "legend": - $legendPos = 'r'; - $legendLayout = null; - $legendOverlay = false; - foreach ($chartDetails as $chartDetailKey => $chartDetail) { - switch ($chartDetailKey) { - case "legendPos": - $legendPos = self::getAttribute($chartDetail, 'val', 'string'); - break; - case "overlay": - $legendOverlay = self::getAttribute($chartDetail, 'val', 'boolean'); - break; - case "layout": - $legendLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta, 'legend'); - break; - } - } - $legend = new PHPExcel_Chart_Legend($legendPos, $legendLayout, $legendOverlay); - break; - } - } - } - } - $chart = new PHPExcel_Chart($chartName, $title, $legend, $plotArea, $plotVisOnly, $dispBlanksAs, $XaxisLabel, $YaxisLabel); - - return $chart; - } - - private static function chartTitle($titleDetails, $namespacesChartMeta, $type) - { - $caption = array(); - $titleLayout = null; - foreach ($titleDetails as $titleDetailKey => $chartDetail) { - switch ($titleDetailKey) { - case "tx": - $titleDetails = $chartDetail->rich->children($namespacesChartMeta['a']); - foreach ($titleDetails as $titleKey => $titleDetail) { - switch ($titleKey) { - case "p": - $titleDetailPart = $titleDetail->children($namespacesChartMeta['a']); - $caption[] = self::parseRichText($titleDetailPart); - } - } - break; - case "layout": - $titleLayout = self::chartLayoutDetails($chartDetail, $namespacesChartMeta); - break; - } - } - - return new PHPExcel_Chart_Title($caption, $titleLayout); - } - - private static function chartLayoutDetails($chartDetail, $namespacesChartMeta) - { - if (!isset($chartDetail->manualLayout)) { - return null; - } - $details = $chartDetail->manualLayout->children($namespacesChartMeta['c']); - if (is_null($details)) { - return null; - } - $layout = array(); - foreach ($details as $detailKey => $detail) { -// echo $detailKey, ' => ',self::getAttribute($detail, 'val', 'string'),PHP_EOL; - $layout[$detailKey] = self::getAttribute($detail, 'val', 'string'); - } - return new PHPExcel_Chart_Layout($layout); - } - - private static function chartDataSeries($chartDetail, $namespacesChartMeta, $plotType) - { - $multiSeriesType = null; - $smoothLine = false; - $seriesLabel = $seriesCategory = $seriesValues = $plotOrder = array(); - - $seriesDetailSet = $chartDetail->children($namespacesChartMeta['c']); - foreach ($seriesDetailSet as $seriesDetailKey => $seriesDetails) { - switch ($seriesDetailKey) { - case "grouping": - $multiSeriesType = self::getAttribute($chartDetail->grouping, 'val', 'string'); - break; - case "ser": - $marker = null; - foreach ($seriesDetails as $seriesKey => $seriesDetail) { - switch ($seriesKey) { - case "idx": - $seriesIndex = self::getAttribute($seriesDetail, 'val', 'integer'); - break; - case "order": - $seriesOrder = self::getAttribute($seriesDetail, 'val', 'integer'); - $plotOrder[$seriesIndex] = $seriesOrder; - break; - case "tx": - $seriesLabel[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta); - break; - case "marker": - $marker = self::getAttribute($seriesDetail->symbol, 'val', 'string'); - break; - case "smooth": - $smoothLine = self::getAttribute($seriesDetail, 'val', 'boolean'); - break; - case "cat": - $seriesCategory[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta); - break; - case "val": - $seriesValues[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); - break; - case "xVal": - $seriesCategory[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); - break; - case "yVal": - $seriesValues[$seriesIndex] = self::chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker); - break; - } - } - } - } - return new PHPExcel_Chart_DataSeries($plotType, $multiSeriesType, $plotOrder, $seriesLabel, $seriesCategory, $seriesValues, $smoothLine); - } - - - private static function chartDataSeriesValueSet($seriesDetail, $namespacesChartMeta, $marker = null, $smoothLine = false) - { - if (isset($seriesDetail->strRef)) { - $seriesSource = (string) $seriesDetail->strRef->f; - $seriesData = self::chartDataSeriesValues($seriesDetail->strRef->strCache->children($namespacesChartMeta['c']), 's'); - - return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine); - } elseif (isset($seriesDetail->numRef)) { - $seriesSource = (string) $seriesDetail->numRef->f; - $seriesData = self::chartDataSeriesValues($seriesDetail->numRef->numCache->children($namespacesChartMeta['c'])); - - return new PHPExcel_Chart_DataSeriesValues('Number', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine); - } elseif (isset($seriesDetail->multiLvlStrRef)) { - $seriesSource = (string) $seriesDetail->multiLvlStrRef->f; - $seriesData = self::chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlStrRef->multiLvlStrCache->children($namespacesChartMeta['c']), 's'); - $seriesData['pointCount'] = count($seriesData['dataValues']); - - return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine); - } elseif (isset($seriesDetail->multiLvlNumRef)) { - $seriesSource = (string) $seriesDetail->multiLvlNumRef->f; - $seriesData = self::chartDataSeriesValuesMultiLevel($seriesDetail->multiLvlNumRef->multiLvlNumCache->children($namespacesChartMeta['c']), 's'); - $seriesData['pointCount'] = count($seriesData['dataValues']); - - return new PHPExcel_Chart_DataSeriesValues('String', $seriesSource, $seriesData['formatCode'], $seriesData['pointCount'], $seriesData['dataValues'], $marker, $smoothLine); - } - return null; - } - - - private static function chartDataSeriesValues($seriesValueSet, $dataType = 'n') - { - $seriesVal = array(); - $formatCode = ''; - $pointCount = 0; - - foreach ($seriesValueSet as $seriesValueIdx => $seriesValue) { - switch ($seriesValueIdx) { - case 'ptCount': - $pointCount = self::getAttribute($seriesValue, 'val', 'integer'); - break; - case 'formatCode': - $formatCode = (string) $seriesValue; - break; - case 'pt': - $pointVal = self::getAttribute($seriesValue, 'idx', 'integer'); - if ($dataType == 's') { - $seriesVal[$pointVal] = (string) $seriesValue->v; - } else { - $seriesVal[$pointVal] = (float) $seriesValue->v; - } - break; - } - } - - return array( - 'formatCode' => $formatCode, - 'pointCount' => $pointCount, - 'dataValues' => $seriesVal - ); - } - - private static function chartDataSeriesValuesMultiLevel($seriesValueSet, $dataType = 'n') - { - $seriesVal = array(); - $formatCode = ''; - $pointCount = 0; - - foreach ($seriesValueSet->lvl as $seriesLevelIdx => $seriesLevel) { - foreach ($seriesLevel as $seriesValueIdx => $seriesValue) { - switch ($seriesValueIdx) { - case 'ptCount': - $pointCount = self::getAttribute($seriesValue, 'val', 'integer'); - break; - case 'formatCode': - $formatCode = (string) $seriesValue; - break; - case 'pt': - $pointVal = self::getAttribute($seriesValue, 'idx', 'integer'); - if ($dataType == 's') { - $seriesVal[$pointVal][] = (string) $seriesValue->v; - } else { - $seriesVal[$pointVal][] = (float) $seriesValue->v; - } - break; - } - } - } - - return array( - 'formatCode' => $formatCode, - 'pointCount' => $pointCount, - 'dataValues' => $seriesVal - ); - } - - private static function parseRichText($titleDetailPart = null) - { - $value = new PHPExcel_RichText(); - - foreach ($titleDetailPart as $titleDetailElementKey => $titleDetailElement) { - if (isset($titleDetailElement->t)) { - $objText = $value->createTextRun((string) $titleDetailElement->t); - } - if (isset($titleDetailElement->rPr)) { - if (isset($titleDetailElement->rPr->rFont["val"])) { - $objText->getFont()->setName((string) $titleDetailElement->rPr->rFont["val"]); - } - - $fontSize = (self::getAttribute($titleDetailElement->rPr, 'sz', 'integer')); - if (!is_null($fontSize)) { - $objText->getFont()->setSize(floor($fontSize / 100)); - } - - $fontColor = (self::getAttribute($titleDetailElement->rPr, 'color', 'string')); - if (!is_null($fontColor)) { - $objText->getFont()->setColor(new PHPExcel_Style_Color(self::readColor($fontColor))); - } - - $bold = self::getAttribute($titleDetailElement->rPr, 'b', 'boolean'); - if (!is_null($bold)) { - $objText->getFont()->setBold($bold); - } - - $italic = self::getAttribute($titleDetailElement->rPr, 'i', 'boolean'); - if (!is_null($italic)) { - $objText->getFont()->setItalic($italic); - } - - $baseline = self::getAttribute($titleDetailElement->rPr, 'baseline', 'integer'); - if (!is_null($baseline)) { - if ($baseline > 0) { - $objText->getFont()->setSuperScript(true); - } elseif ($baseline < 0) { - $objText->getFont()->setSubScript(true); - } - } - - $underscore = (self::getAttribute($titleDetailElement->rPr, 'u', 'string')); - if (!is_null($underscore)) { - if ($underscore == 'sng') { - $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE); - } elseif ($underscore == 'dbl') { - $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_DOUBLE); - } else { - $objText->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_NONE); - } - } - - $strikethrough = (self::getAttribute($titleDetailElement->rPr, 's', 'string')); - if (!is_null($strikethrough)) { - if ($strikethrough == 'noStrike') { - $objText->getFont()->setStrikethrough(false); - } else { - $objText->getFont()->setStrikethrough(true); - } - } - } - } - - return $value; - } - - private static function readChartAttributes($chartDetail) - { - $plotAttributes = array(); - if (isset($chartDetail->dLbls)) { - if (isset($chartDetail->dLbls->howLegendKey)) { - $plotAttributes['showLegendKey'] = self::getAttribute($chartDetail->dLbls->showLegendKey, 'val', 'string'); - } - if (isset($chartDetail->dLbls->showVal)) { - $plotAttributes['showVal'] = self::getAttribute($chartDetail->dLbls->showVal, 'val', 'string'); - } - if (isset($chartDetail->dLbls->showCatName)) { - $plotAttributes['showCatName'] = self::getAttribute($chartDetail->dLbls->showCatName, 'val', 'string'); - } - if (isset($chartDetail->dLbls->showSerName)) { - $plotAttributes['showSerName'] = self::getAttribute($chartDetail->dLbls->showSerName, 'val', 'string'); - } - if (isset($chartDetail->dLbls->showPercent)) { - $plotAttributes['showPercent'] = self::getAttribute($chartDetail->dLbls->showPercent, 'val', 'string'); - } - if (isset($chartDetail->dLbls->showBubbleSize)) { - $plotAttributes['showBubbleSize'] = self::getAttribute($chartDetail->dLbls->showBubbleSize, 'val', 'string'); - } - if (isset($chartDetail->dLbls->showLeaderLines)) { - $plotAttributes['showLeaderLines'] = self::getAttribute($chartDetail->dLbls->showLeaderLines, 'val', 'string'); - } - } - - return $plotAttributes; - } - - private static function setChartAttributes($plotArea, $plotAttributes) - { - foreach ($plotAttributes as $plotAttributeKey => $plotAttributeValue) { - switch ($plotAttributeKey) { - case 'showLegendKey': - $plotArea->setShowLegendKey($plotAttributeValue); - break; - case 'showVal': - $plotArea->setShowVal($plotAttributeValue); - break; - case 'showCatName': - $plotArea->setShowCatName($plotAttributeValue); - break; - case 'showSerName': - $plotArea->setShowSerName($plotAttributeValue); - break; - case 'showPercent': - $plotArea->setShowPercent($plotAttributeValue); - break; - case 'showBubbleSize': - $plotArea->setShowBubbleSize($plotAttributeValue); - break; - case 'showLeaderLines': - $plotArea->setShowLeaderLines($plotAttributeValue); - break; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Theme.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Theme.php deleted file mode 100644 index 134f4b6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel2007/Theme.php +++ /dev/null @@ -1,127 +0,0 @@ -themeName = $themeName; - $this->colourSchemeName = $colourSchemeName; - $this->colourMap = $colourMap; - } - - /** - * Get Theme Name - * - * @return string - */ - public function getThemeName() - { - return $this->themeName; - } - - /** - * Get colour Scheme Name - * - * @return string - */ - public function getColourSchemeName() - { - return $this->colourSchemeName; - } - - /** - * Get colour Map Value by Position - * - * @return string - */ - public function getColourByIndex($index = 0) - { - if (isset($this->colourMap[$index])) { - return $this->colourMap[$index]; - } - return null; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if ((is_object($value)) && ($key != '_parent')) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php deleted file mode 100644 index 62e971d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5.php +++ /dev/null @@ -1,7594 +0,0 @@ -data - * - * @var int - */ - private $dataSize; - - /** - * Current position in stream - * - * @var integer - */ - private $pos; - - /** - * Workbook to be returned by the reader. - * - * @var PHPExcel - */ - private $phpExcel; - - /** - * Worksheet that is currently being built by the reader. - * - * @var PHPExcel_Worksheet - */ - private $phpSheet; - - /** - * BIFF version - * - * @var int - */ - private $version; - - /** - * Codepage set in the Excel file being read. Only important for BIFF5 (Excel 5.0 - Excel 95) - * For BIFF8 (Excel 97 - Excel 2003) this will always have the value 'UTF-16LE' - * - * @var string - */ - private $codepage; - - /** - * Shared formats - * - * @var array - */ - private $formats; - - /** - * Shared fonts - * - * @var array - */ - private $objFonts; - - /** - * Color palette - * - * @var array - */ - private $palette; - - /** - * Worksheets - * - * @var array - */ - private $sheets; - - /** - * External books - * - * @var array - */ - private $externalBooks; - - /** - * REF structures. Only applies to BIFF8. - * - * @var array - */ - private $ref; - - /** - * External names - * - * @var array - */ - private $externalNames; - - /** - * Defined names - * - * @var array - */ - private $definedname; - - /** - * Shared strings. Only applies to BIFF8. - * - * @var array - */ - private $sst; - - /** - * Panes are frozen? (in sheet currently being read). See WINDOW2 record. - * - * @var boolean - */ - private $frozen; - - /** - * Fit printout to number of pages? (in sheet currently being read). See SHEETPR record. - * - * @var boolean - */ - private $isFitToPages; - - /** - * Objects. One OBJ record contributes with one entry. - * - * @var array - */ - private $objs; - - /** - * Text Objects. One TXO record corresponds with one entry. - * - * @var array - */ - private $textObjects; - - /** - * Cell Annotations (BIFF8) - * - * @var array - */ - private $cellNotes; - - /** - * The combined MSODRAWINGGROUP data - * - * @var string - */ - private $drawingGroupData; - - /** - * The combined MSODRAWING data (per sheet) - * - * @var string - */ - private $drawingData; - - /** - * Keep track of XF index - * - * @var int - */ - private $xfIndex; - - /** - * Mapping of XF index (that is a cell XF) to final index in cellXf collection - * - * @var array - */ - private $mapCellXfIndex; - - /** - * Mapping of XF index (that is a style XF) to final index in cellStyleXf collection - * - * @var array - */ - private $mapCellStyleXfIndex; - - /** - * The shared formulas in a sheet. One SHAREDFMLA record contributes with one value. - * - * @var array - */ - private $sharedFormulas; - - /** - * The shared formula parts in a sheet. One FORMULA record contributes with one value if it - * refers to a shared formula. - * - * @var array - */ - private $sharedFormulaParts; - - /** - * The type of encryption in use - * - * @var int - */ - private $encryption = 0; - - /** - * The position in the stream after which contents are encrypted - * - * @var int - */ - private $encryptionStartPos = false; - - /** - * The current RC4 decryption object - * - * @var PHPExcel_Reader_Excel5_RC4 - */ - private $rc4Key = null; - - /** - * The position in the stream that the RC4 decryption object was left at - * - * @var int - */ - private $rc4Pos = 0; - - /** - * The current MD5 context state - * - * @var string - */ - private $md5Ctxt = null; - - /** - * Create a new PHPExcel_Reader_Excel5 instance - */ - public function __construct() - { - $this->readFilter = new PHPExcel_Reader_DefaultReadFilter(); - } - - /** - * Can the current PHPExcel_Reader_IReader read the file? - * - * @param string $pFilename - * @return boolean - * @throws PHPExcel_Reader_Exception - */ - public function canRead($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - try { - // Use ParseXL for the hard work. - $ole = new PHPExcel_Shared_OLERead(); - - // get excel data - $res = $ole->read($pFilename); - return true; - } catch (PHPExcel_Exception $e) { - return false; - } - } - - /** - * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetNames($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $worksheetNames = array(); - - // Read the OLE file - $this->loadOLE($pFilename); - - // total byte size of Excel data (workbook global substream + sheet substreams) - $this->dataSize = strlen($this->data); - - $this->pos = 0; - $this->sheets = array(); - - // Parse Workbook Global Substream - while ($this->pos < $this->dataSize) { - $code = self::getInt2d($this->data, $this->pos); - - switch ($code) { - case self::XLS_TYPE_BOF: - $this->readBof(); - break; - case self::XLS_TYPE_SHEET: - $this->readSheet(); - break; - case self::XLS_TYPE_EOF: - $this->readDefault(); - break 2; - default: - $this->readDefault(); - break; - } - } - - foreach ($this->sheets as $sheet) { - if ($sheet['sheetType'] != 0x00) { - // 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module - continue; - } - - $worksheetNames[] = $sheet['name']; - } - - return $worksheetNames; - } - - - /** - * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetInfo($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $worksheetInfo = array(); - - // Read the OLE file - $this->loadOLE($pFilename); - - // total byte size of Excel data (workbook global substream + sheet substreams) - $this->dataSize = strlen($this->data); - - // initialize - $this->pos = 0; - $this->sheets = array(); - - // Parse Workbook Global Substream - while ($this->pos < $this->dataSize) { - $code = self::getInt2d($this->data, $this->pos); - - switch ($code) { - case self::XLS_TYPE_BOF: - $this->readBof(); - break; - case self::XLS_TYPE_SHEET: - $this->readSheet(); - break; - case self::XLS_TYPE_EOF: - $this->readDefault(); - break 2; - default: - $this->readDefault(); - break; - } - } - - // Parse the individual sheets - foreach ($this->sheets as $sheet) { - if ($sheet['sheetType'] != 0x00) { - // 0x00: Worksheet - // 0x02: Chart - // 0x06: Visual Basic module - continue; - } - - $tmpInfo = array(); - $tmpInfo['worksheetName'] = $sheet['name']; - $tmpInfo['lastColumnLetter'] = 'A'; - $tmpInfo['lastColumnIndex'] = 0; - $tmpInfo['totalRows'] = 0; - $tmpInfo['totalColumns'] = 0; - - $this->pos = $sheet['offset']; - - while ($this->pos <= $this->dataSize - 4) { - $code = self::getInt2d($this->data, $this->pos); - - switch ($code) { - case self::XLS_TYPE_RK: - case self::XLS_TYPE_LABELSST: - case self::XLS_TYPE_NUMBER: - case self::XLS_TYPE_FORMULA: - case self::XLS_TYPE_BOOLERR: - case self::XLS_TYPE_LABEL: - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - $rowIndex = self::getInt2d($recordData, 0) + 1; - $columnIndex = self::getInt2d($recordData, 2); - - $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex); - $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex); - break; - case self::XLS_TYPE_BOF: - $this->readBof(); - break; - case self::XLS_TYPE_EOF: - $this->readDefault(); - break 2; - default: - $this->readDefault(); - break; - } - } - - $tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']); - $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1; - - $worksheetInfo[] = $tmpInfo; - } - - return $worksheetInfo; - } - - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename) - { - // Read the OLE file - $this->loadOLE($pFilename); - - // Initialisations - $this->phpExcel = new PHPExcel; - $this->phpExcel->removeSheetByIndex(0); // remove 1st sheet - if (!$this->readDataOnly) { - $this->phpExcel->removeCellStyleXfByIndex(0); // remove the default style - $this->phpExcel->removeCellXfByIndex(0); // remove the default style - } - - // Read the summary information stream (containing meta data) - $this->readSummaryInformation(); - - // Read the Additional document summary information stream (containing application-specific meta data) - $this->readDocumentSummaryInformation(); - - // total byte size of Excel data (workbook global substream + sheet substreams) - $this->dataSize = strlen($this->data); - - // initialize - $this->pos = 0; - $this->codepage = 'CP1252'; - $this->formats = array(); - $this->objFonts = array(); - $this->palette = array(); - $this->sheets = array(); - $this->externalBooks = array(); - $this->ref = array(); - $this->definedname = array(); - $this->sst = array(); - $this->drawingGroupData = ''; - $this->xfIndex = ''; - $this->mapCellXfIndex = array(); - $this->mapCellStyleXfIndex = array(); - - // Parse Workbook Global Substream - while ($this->pos < $this->dataSize) { - $code = self::getInt2d($this->data, $this->pos); - - switch ($code) { - case self::XLS_TYPE_BOF: - $this->readBof(); - break; - case self::XLS_TYPE_FILEPASS: - $this->readFilepass(); - break; - case self::XLS_TYPE_CODEPAGE: - $this->readCodepage(); - break; - case self::XLS_TYPE_DATEMODE: - $this->readDateMode(); - break; - case self::XLS_TYPE_FONT: - $this->readFont(); - break; - case self::XLS_TYPE_FORMAT: - $this->readFormat(); - break; - case self::XLS_TYPE_XF: - $this->readXf(); - break; - case self::XLS_TYPE_XFEXT: - $this->readXfExt(); - break; - case self::XLS_TYPE_STYLE: - $this->readStyle(); - break; - case self::XLS_TYPE_PALETTE: - $this->readPalette(); - break; - case self::XLS_TYPE_SHEET: - $this->readSheet(); - break; - case self::XLS_TYPE_EXTERNALBOOK: - $this->readExternalBook(); - break; - case self::XLS_TYPE_EXTERNNAME: - $this->readExternName(); - break; - case self::XLS_TYPE_EXTERNSHEET: - $this->readExternSheet(); - break; - case self::XLS_TYPE_DEFINEDNAME: - $this->readDefinedName(); - break; - case self::XLS_TYPE_MSODRAWINGGROUP: - $this->readMsoDrawingGroup(); - break; - case self::XLS_TYPE_SST: - $this->readSst(); - break; - case self::XLS_TYPE_EOF: - $this->readDefault(); - break 2; - default: - $this->readDefault(); - break; - } - } - - // Resolve indexed colors for font, fill, and border colors - // Cannot be resolved already in XF record, because PALETTE record comes afterwards - if (!$this->readDataOnly) { - foreach ($this->objFonts as $objFont) { - if (isset($objFont->colorIndex)) { - $color = PHPExcel_Reader_Excel5_Color::map($objFont->colorIndex, $this->palette, $this->version); - $objFont->getColor()->setRGB($color['rgb']); - } - } - - foreach ($this->phpExcel->getCellXfCollection() as $objStyle) { - // fill start and end color - $fill = $objStyle->getFill(); - - if (isset($fill->startcolorIndex)) { - $startColor = PHPExcel_Reader_Excel5_Color::map($fill->startcolorIndex, $this->palette, $this->version); - $fill->getStartColor()->setRGB($startColor['rgb']); - } - if (isset($fill->endcolorIndex)) { - $endColor = PHPExcel_Reader_Excel5_Color::map($fill->endcolorIndex, $this->palette, $this->version); - $fill->getEndColor()->setRGB($endColor['rgb']); - } - - // border colors - $top = $objStyle->getBorders()->getTop(); - $right = $objStyle->getBorders()->getRight(); - $bottom = $objStyle->getBorders()->getBottom(); - $left = $objStyle->getBorders()->getLeft(); - $diagonal = $objStyle->getBorders()->getDiagonal(); - - if (isset($top->colorIndex)) { - $borderTopColor = PHPExcel_Reader_Excel5_Color::map($top->colorIndex, $this->palette, $this->version); - $top->getColor()->setRGB($borderTopColor['rgb']); - } - if (isset($right->colorIndex)) { - $borderRightColor = PHPExcel_Reader_Excel5_Color::map($right->colorIndex, $this->palette, $this->version); - $right->getColor()->setRGB($borderRightColor['rgb']); - } - if (isset($bottom->colorIndex)) { - $borderBottomColor = PHPExcel_Reader_Excel5_Color::map($bottom->colorIndex, $this->palette, $this->version); - $bottom->getColor()->setRGB($borderBottomColor['rgb']); - } - if (isset($left->colorIndex)) { - $borderLeftColor = PHPExcel_Reader_Excel5_Color::map($left->colorIndex, $this->palette, $this->version); - $left->getColor()->setRGB($borderLeftColor['rgb']); - } - if (isset($diagonal->colorIndex)) { - $borderDiagonalColor = PHPExcel_Reader_Excel5_Color::map($diagonal->colorIndex, $this->palette, $this->version); - $diagonal->getColor()->setRGB($borderDiagonalColor['rgb']); - } - } - } - - // treat MSODRAWINGGROUP records, workbook-level Escher - if (!$this->readDataOnly && $this->drawingGroupData) { - $escherWorkbook = new PHPExcel_Shared_Escher(); - $reader = new PHPExcel_Reader_Excel5_Escher($escherWorkbook); - $escherWorkbook = $reader->load($this->drawingGroupData); - - // debug Escher stream - //$debug = new Debug_Escher(new PHPExcel_Shared_Escher()); - //$debug->load($this->drawingGroupData); - } - - // Parse the individual sheets - foreach ($this->sheets as $sheet) { - if ($sheet['sheetType'] != 0x00) { - // 0x00: Worksheet, 0x02: Chart, 0x06: Visual Basic module - continue; - } - - // check if sheet should be skipped - if (isset($this->loadSheetsOnly) && !in_array($sheet['name'], $this->loadSheetsOnly)) { - continue; - } - - // add sheet to PHPExcel object - $this->phpSheet = $this->phpExcel->createSheet(); - // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula - // cells... during the load, all formulae should be correct, and we're simply bringing the worksheet - // name in line with the formula, not the reverse - $this->phpSheet->setTitle($sheet['name'], false); - $this->phpSheet->setSheetState($sheet['sheetState']); - - $this->pos = $sheet['offset']; - - // Initialize isFitToPages. May change after reading SHEETPR record. - $this->isFitToPages = false; - - // Initialize drawingData - $this->drawingData = ''; - - // Initialize objs - $this->objs = array(); - - // Initialize shared formula parts - $this->sharedFormulaParts = array(); - - // Initialize shared formulas - $this->sharedFormulas = array(); - - // Initialize text objs - $this->textObjects = array(); - - // Initialize cell annotations - $this->cellNotes = array(); - $this->textObjRef = -1; - - while ($this->pos <= $this->dataSize - 4) { - $code = self::getInt2d($this->data, $this->pos); - - switch ($code) { - case self::XLS_TYPE_BOF: - $this->readBof(); - break; - case self::XLS_TYPE_PRINTGRIDLINES: - $this->readPrintGridlines(); - break; - case self::XLS_TYPE_DEFAULTROWHEIGHT: - $this->readDefaultRowHeight(); - break; - case self::XLS_TYPE_SHEETPR: - $this->readSheetPr(); - break; - case self::XLS_TYPE_HORIZONTALPAGEBREAKS: - $this->readHorizontalPageBreaks(); - break; - case self::XLS_TYPE_VERTICALPAGEBREAKS: - $this->readVerticalPageBreaks(); - break; - case self::XLS_TYPE_HEADER: - $this->readHeader(); - break; - case self::XLS_TYPE_FOOTER: - $this->readFooter(); - break; - case self::XLS_TYPE_HCENTER: - $this->readHcenter(); - break; - case self::XLS_TYPE_VCENTER: - $this->readVcenter(); - break; - case self::XLS_TYPE_LEFTMARGIN: - $this->readLeftMargin(); - break; - case self::XLS_TYPE_RIGHTMARGIN: - $this->readRightMargin(); - break; - case self::XLS_TYPE_TOPMARGIN: - $this->readTopMargin(); - break; - case self::XLS_TYPE_BOTTOMMARGIN: - $this->readBottomMargin(); - break; - case self::XLS_TYPE_PAGESETUP: - $this->readPageSetup(); - break; - case self::XLS_TYPE_PROTECT: - $this->readProtect(); - break; - case self::XLS_TYPE_SCENPROTECT: - $this->readScenProtect(); - break; - case self::XLS_TYPE_OBJECTPROTECT: - $this->readObjectProtect(); - break; - case self::XLS_TYPE_PASSWORD: - $this->readPassword(); - break; - case self::XLS_TYPE_DEFCOLWIDTH: - $this->readDefColWidth(); - break; - case self::XLS_TYPE_COLINFO: - $this->readColInfo(); - break; - case self::XLS_TYPE_DIMENSION: - $this->readDefault(); - break; - case self::XLS_TYPE_ROW: - $this->readRow(); - break; - case self::XLS_TYPE_DBCELL: - $this->readDefault(); - break; - case self::XLS_TYPE_RK: - $this->readRk(); - break; - case self::XLS_TYPE_LABELSST: - $this->readLabelSst(); - break; - case self::XLS_TYPE_MULRK: - $this->readMulRk(); - break; - case self::XLS_TYPE_NUMBER: - $this->readNumber(); - break; - case self::XLS_TYPE_FORMULA: - $this->readFormula(); - break; - case self::XLS_TYPE_SHAREDFMLA: - $this->readSharedFmla(); - break; - case self::XLS_TYPE_BOOLERR: - $this->readBoolErr(); - break; - case self::XLS_TYPE_MULBLANK: - $this->readMulBlank(); - break; - case self::XLS_TYPE_LABEL: - $this->readLabel(); - break; - case self::XLS_TYPE_BLANK: - $this->readBlank(); - break; - case self::XLS_TYPE_MSODRAWING: - $this->readMsoDrawing(); - break; - case self::XLS_TYPE_OBJ: - $this->readObj(); - break; - case self::XLS_TYPE_WINDOW2: - $this->readWindow2(); - break; - case self::XLS_TYPE_PAGELAYOUTVIEW: - $this->readPageLayoutView(); - break; - case self::XLS_TYPE_SCL: - $this->readScl(); - break; - case self::XLS_TYPE_PANE: - $this->readPane(); - break; - case self::XLS_TYPE_SELECTION: - $this->readSelection(); - break; - case self::XLS_TYPE_MERGEDCELLS: - $this->readMergedCells(); - break; - case self::XLS_TYPE_HYPERLINK: - $this->readHyperLink(); - break; - case self::XLS_TYPE_DATAVALIDATIONS: - $this->readDataValidations(); - break; - case self::XLS_TYPE_DATAVALIDATION: - $this->readDataValidation(); - break; - case self::XLS_TYPE_SHEETLAYOUT: - $this->readSheetLayout(); - break; - case self::XLS_TYPE_SHEETPROTECTION: - $this->readSheetProtection(); - break; - case self::XLS_TYPE_RANGEPROTECTION: - $this->readRangeProtection(); - break; - case self::XLS_TYPE_NOTE: - $this->readNote(); - break; - //case self::XLS_TYPE_IMDATA: $this->readImData(); break; - case self::XLS_TYPE_TXO: - $this->readTextObject(); - break; - case self::XLS_TYPE_CONTINUE: - $this->readContinue(); - break; - case self::XLS_TYPE_EOF: - $this->readDefault(); - break 2; - default: - $this->readDefault(); - break; - } - - } - - // treat MSODRAWING records, sheet-level Escher - if (!$this->readDataOnly && $this->drawingData) { - $escherWorksheet = new PHPExcel_Shared_Escher(); - $reader = new PHPExcel_Reader_Excel5_Escher($escherWorksheet); - $escherWorksheet = $reader->load($this->drawingData); - - // debug Escher stream - //$debug = new Debug_Escher(new PHPExcel_Shared_Escher()); - //$debug->load($this->drawingData); - - // get all spContainers in one long array, so they can be mapped to OBJ records - $allSpContainers = $escherWorksheet->getDgContainer()->getSpgrContainer()->getAllSpContainers(); - } - - // treat OBJ records - foreach ($this->objs as $n => $obj) { -// echo '
    Object reference is ', $n,'
    '; -// var_dump($obj); -// echo '
    '; - - // the first shape container never has a corresponding OBJ record, hence $n + 1 - if (isset($allSpContainers[$n + 1]) && is_object($allSpContainers[$n + 1])) { - $spContainer = $allSpContainers[$n + 1]; - - // we skip all spContainers that are a part of a group shape since we cannot yet handle those - if ($spContainer->getNestingLevel() > 1) { - continue; - } - - // calculate the width and height of the shape - list($startColumn, $startRow) = PHPExcel_Cell::coordinateFromString($spContainer->getStartCoordinates()); - list($endColumn, $endRow) = PHPExcel_Cell::coordinateFromString($spContainer->getEndCoordinates()); - - $startOffsetX = $spContainer->getStartOffsetX(); - $startOffsetY = $spContainer->getStartOffsetY(); - $endOffsetX = $spContainer->getEndOffsetX(); - $endOffsetY = $spContainer->getEndOffsetY(); - - $width = PHPExcel_Shared_Excel5::getDistanceX($this->phpSheet, $startColumn, $startOffsetX, $endColumn, $endOffsetX); - $height = PHPExcel_Shared_Excel5::getDistanceY($this->phpSheet, $startRow, $startOffsetY, $endRow, $endOffsetY); - - // calculate offsetX and offsetY of the shape - $offsetX = $startOffsetX * PHPExcel_Shared_Excel5::sizeCol($this->phpSheet, $startColumn) / 1024; - $offsetY = $startOffsetY * PHPExcel_Shared_Excel5::sizeRow($this->phpSheet, $startRow) / 256; - - switch ($obj['otObjType']) { - case 0x19: - // Note -// echo 'Cell Annotation Object
    '; -// echo 'Object ID is ', $obj['idObjID'],'
    '; - if (isset($this->cellNotes[$obj['idObjID']])) { - $cellNote = $this->cellNotes[$obj['idObjID']]; - - if (isset($this->textObjects[$obj['idObjID']])) { - $textObject = $this->textObjects[$obj['idObjID']]; - $this->cellNotes[$obj['idObjID']]['objTextData'] = $textObject; - } - } - break; - case 0x08: -// echo 'Picture Object
    '; - // picture - // get index to BSE entry (1-based) - $BSEindex = $spContainer->getOPT(0x0104); - $BSECollection = $escherWorkbook->getDggContainer()->getBstoreContainer()->getBSECollection(); - $BSE = $BSECollection[$BSEindex - 1]; - $blipType = $BSE->getBlipType(); - - // need check because some blip types are not supported by Escher reader such as EMF - if ($blip = $BSE->getBlip()) { - $ih = imagecreatefromstring($blip->getData()); - $drawing = new PHPExcel_Worksheet_MemoryDrawing(); - $drawing->setImageResource($ih); - - // width, height, offsetX, offsetY - $drawing->setResizeProportional(false); - $drawing->setWidth($width); - $drawing->setHeight($height); - $drawing->setOffsetX($offsetX); - $drawing->setOffsetY($offsetY); - - switch ($blipType) { - case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_JPEG: - $drawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG); - $drawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_JPEG); - break; - case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG: - $drawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_PNG); - $drawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_PNG); - break; - } - - $drawing->setWorksheet($this->phpSheet); - $drawing->setCoordinates($spContainer->getStartCoordinates()); - } - break; - default: - // other object type - break; - } - } - } - - // treat SHAREDFMLA records - if ($this->version == self::XLS_BIFF8) { - foreach ($this->sharedFormulaParts as $cell => $baseCell) { - list($column, $row) = PHPExcel_Cell::coordinateFromString($cell); - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { - $formula = $this->getFormulaFromStructure($this->sharedFormulas[$baseCell], $cell); - $this->phpSheet->getCell($cell)->setValueExplicit('=' . $formula, PHPExcel_Cell_DataType::TYPE_FORMULA); - } - } - } - - if (!empty($this->cellNotes)) { - foreach ($this->cellNotes as $note => $noteDetails) { - if (!isset($noteDetails['objTextData'])) { - if (isset($this->textObjects[$note])) { - $textObject = $this->textObjects[$note]; - $noteDetails['objTextData'] = $textObject; - } else { - $noteDetails['objTextData']['text'] = ''; - } - } -// echo 'Cell annotation ', $note,'
    '; -// var_dump($noteDetails); -// echo '
    '; - $cellAddress = str_replace('$', '', $noteDetails['cellRef']); - $this->phpSheet->getComment($cellAddress)->setAuthor($noteDetails['author'])->setText($this->parseRichText($noteDetails['objTextData']['text'])); - } - } - } - - // add the named ranges (defined names) - foreach ($this->definedname as $definedName) { - if ($definedName['isBuiltInName']) { - switch ($definedName['name']) { - case pack('C', 0x06): - // print area - // in general, formula looks like this: Foo!$C$7:$J$66,Bar!$A$1:$IV$2 - $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma? - - $extractedRanges = array(); - foreach ($ranges as $range) { - // $range should look like one of these - // Foo!$C$7:$J$66 - // Bar!$A$1:$IV$2 - $explodes = explode('!', $range); // FIXME: what if sheetname contains exclamation mark? - $sheetName = trim($explodes[0], "'"); - if (count($explodes) == 2) { - if (strpos($explodes[1], ':') === false) { - $explodes[1] = $explodes[1] . ':' . $explodes[1]; - } - $extractedRanges[] = str_replace('$', '', $explodes[1]); // C7:J66 - } - } - if ($docSheet = $this->phpExcel->getSheetByName($sheetName)) { - $docSheet->getPageSetup()->setPrintArea(implode(',', $extractedRanges)); // C7:J66,A1:IV2 - } - break; - case pack('C', 0x07): - // print titles (repeating rows) - // Assuming BIFF8, there are 3 cases - // 1. repeating rows - // formula looks like this: Sheet!$A$1:$IV$2 - // rows 1-2 repeat - // 2. repeating columns - // formula looks like this: Sheet!$A$1:$B$65536 - // columns A-B repeat - // 3. both repeating rows and repeating columns - // formula looks like this: Sheet!$A$1:$B$65536,Sheet!$A$1:$IV$2 - $ranges = explode(',', $definedName['formula']); // FIXME: what if sheetname contains comma? - foreach ($ranges as $range) { - // $range should look like this one of these - // Sheet!$A$1:$B$65536 - // Sheet!$A$1:$IV$2 - $explodes = explode('!', $range); - if (count($explodes) == 2) { - if ($docSheet = $this->phpExcel->getSheetByName($explodes[0])) { - $extractedRange = $explodes[1]; - $extractedRange = str_replace('$', '', $extractedRange); - - $coordinateStrings = explode(':', $extractedRange); - if (count($coordinateStrings) == 2) { - list($firstColumn, $firstRow) = PHPExcel_Cell::coordinateFromString($coordinateStrings[0]); - list($lastColumn, $lastRow) = PHPExcel_Cell::coordinateFromString($coordinateStrings[1]); - - if ($firstColumn == 'A' and $lastColumn == 'IV') { - // then we have repeating rows - $docSheet->getPageSetup()->setRowsToRepeatAtTop(array($firstRow, $lastRow)); - } elseif ($firstRow == 1 and $lastRow == 65536) { - // then we have repeating columns - $docSheet->getPageSetup()->setColumnsToRepeatAtLeft(array($firstColumn, $lastColumn)); - } - } - } - } - } - break; - } - } else { - // Extract range - $explodes = explode('!', $definedName['formula']); - - if (count($explodes) == 2) { - if (($docSheet = $this->phpExcel->getSheetByName($explodes[0])) || - ($docSheet = $this->phpExcel->getSheetByName(trim($explodes[0], "'")))) { - $extractedRange = $explodes[1]; - $extractedRange = str_replace('$', '', $extractedRange); - - $localOnly = ($definedName['scope'] == 0) ? false : true; - - $scope = ($definedName['scope'] == 0) ? null : $this->phpExcel->getSheetByName($this->sheets[$definedName['scope'] - 1]['name']); - - $this->phpExcel->addNamedRange(new PHPExcel_NamedRange((string)$definedName['name'], $docSheet, $extractedRange, $localOnly, $scope)); - } - } else { - // Named Value - // TODO Provide support for named values - } - } - } - $this->data = null; - - return $this->phpExcel; - } - - /** - * Read record data from stream, decrypting as required - * - * @param string $data Data stream to read from - * @param int $pos Position to start reading from - * @param int $length Record data length - * - * @return string Record data - */ - private function readRecordData($data, $pos, $len) - { - $data = substr($data, $pos, $len); - - // File not encrypted, or record before encryption start point - if ($this->encryption == self::MS_BIFF_CRYPTO_NONE || $pos < $this->encryptionStartPos) { - return $data; - } - - $recordData = ''; - if ($this->encryption == self::MS_BIFF_CRYPTO_RC4) { - $oldBlock = floor($this->rc4Pos / self::REKEY_BLOCK); - $block = floor($pos / self::REKEY_BLOCK); - $endBlock = floor(($pos + $len) / self::REKEY_BLOCK); - - // Spin an RC4 decryptor to the right spot. If we have a decryptor sitting - // at a point earlier in the current block, re-use it as we can save some time. - if ($block != $oldBlock || $pos < $this->rc4Pos || !$this->rc4Key) { - $this->rc4Key = $this->makeKey($block, $this->md5Ctxt); - $step = $pos % self::REKEY_BLOCK; - } else { - $step = $pos - $this->rc4Pos; - } - $this->rc4Key->RC4(str_repeat("\0", $step)); - - // Decrypt record data (re-keying at the end of every block) - while ($block != $endBlock) { - $step = self::REKEY_BLOCK - ($pos % self::REKEY_BLOCK); - $recordData .= $this->rc4Key->RC4(substr($data, 0, $step)); - $data = substr($data, $step); - $pos += $step; - $len -= $step; - $block++; - $this->rc4Key = $this->makeKey($block, $this->md5Ctxt); - } - $recordData .= $this->rc4Key->RC4(substr($data, 0, $len)); - - // Keep track of the position of this decryptor. - // We'll try and re-use it later if we can to speed things up - $this->rc4Pos = $pos + $len; - } elseif ($this->encryption == self::MS_BIFF_CRYPTO_XOR) { - throw new PHPExcel_Reader_Exception('XOr encryption not supported'); - } - return $recordData; - } - - /** - * Use OLE reader to extract the relevant data streams from the OLE file - * - * @param string $pFilename - */ - private function loadOLE($pFilename) - { - // OLE reader - $ole = new PHPExcel_Shared_OLERead(); - // get excel data, - $res = $ole->read($pFilename); - // Get workbook data: workbook stream + sheet streams - $this->data = $ole->getStream($ole->wrkbook); - // Get summary information data - $this->summaryInformation = $ole->getStream($ole->summaryInformation); - // Get additional document summary information data - $this->documentSummaryInformation = $ole->getStream($ole->documentSummaryInformation); - // Get user-defined property data -// $this->userDefinedProperties = $ole->getUserDefinedProperties(); - } - - - /** - * Read summary information - */ - private function readSummaryInformation() - { - if (!isset($this->summaryInformation)) { - return; - } - - // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) - // offset: 2; size: 2; - // offset: 4; size: 2; OS version - // offset: 6; size: 2; OS indicator - // offset: 8; size: 16 - // offset: 24; size: 4; section count - $secCount = self::getInt4d($this->summaryInformation, 24); - - // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9 - // offset: 44; size: 4 - $secOffset = self::getInt4d($this->summaryInformation, 44); - - // section header - // offset: $secOffset; size: 4; section length - $secLength = self::getInt4d($this->summaryInformation, $secOffset); - - // offset: $secOffset+4; size: 4; property count - $countProperties = self::getInt4d($this->summaryInformation, $secOffset+4); - - // initialize code page (used to resolve string values) - $codePage = 'CP1252'; - - // offset: ($secOffset+8); size: var - // loop through property decarations and properties - for ($i = 0; $i < $countProperties; ++$i) { - // offset: ($secOffset+8) + (8 * $i); size: 4; property ID - $id = self::getInt4d($this->summaryInformation, ($secOffset+8) + (8 * $i)); - - // Use value of property id as appropriate - // offset: ($secOffset+12) + (8 * $i); size: 4; offset from beginning of section (48) - $offset = self::getInt4d($this->summaryInformation, ($secOffset+12) + (8 * $i)); - - $type = self::getInt4d($this->summaryInformation, $secOffset + $offset); - - // initialize property value - $value = null; - - // extract property value based on property type - switch ($type) { - case 0x02: // 2 byte signed integer - $value = self::getInt2d($this->summaryInformation, $secOffset + 4 + $offset); - break; - case 0x03: // 4 byte signed integer - $value = self::getInt4d($this->summaryInformation, $secOffset + 4 + $offset); - break; - case 0x13: // 4 byte unsigned integer - // not needed yet, fix later if necessary - break; - case 0x1E: // null-terminated string prepended by dword string length - $byteLength = self::getInt4d($this->summaryInformation, $secOffset + 4 + $offset); - $value = substr($this->summaryInformation, $secOffset + 8 + $offset, $byteLength); - $value = PHPExcel_Shared_String::ConvertEncoding($value, 'UTF-8', $codePage); - $value = rtrim($value); - break; - case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) - // PHP-time - $value = PHPExcel_Shared_OLE::OLE2LocalDate(substr($this->summaryInformation, $secOffset + 4 + $offset, 8)); - break; - case 0x47: // Clipboard format - // not needed yet, fix later if necessary - break; - } - - switch ($id) { - case 0x01: // Code Page - $codePage = PHPExcel_Shared_CodePage::NumberToName($value); - break; - case 0x02: // Title - $this->phpExcel->getProperties()->setTitle($value); - break; - case 0x03: // Subject - $this->phpExcel->getProperties()->setSubject($value); - break; - case 0x04: // Author (Creator) - $this->phpExcel->getProperties()->setCreator($value); - break; - case 0x05: // Keywords - $this->phpExcel->getProperties()->setKeywords($value); - break; - case 0x06: // Comments (Description) - $this->phpExcel->getProperties()->setDescription($value); - break; - case 0x07: // Template - // Not supported by PHPExcel - break; - case 0x08: // Last Saved By (LastModifiedBy) - $this->phpExcel->getProperties()->setLastModifiedBy($value); - break; - case 0x09: // Revision - // Not supported by PHPExcel - break; - case 0x0A: // Total Editing Time - // Not supported by PHPExcel - break; - case 0x0B: // Last Printed - // Not supported by PHPExcel - break; - case 0x0C: // Created Date/Time - $this->phpExcel->getProperties()->setCreated($value); - break; - case 0x0D: // Modified Date/Time - $this->phpExcel->getProperties()->setModified($value); - break; - case 0x0E: // Number of Pages - // Not supported by PHPExcel - break; - case 0x0F: // Number of Words - // Not supported by PHPExcel - break; - case 0x10: // Number of Characters - // Not supported by PHPExcel - break; - case 0x11: // Thumbnail - // Not supported by PHPExcel - break; - case 0x12: // Name of creating application - // Not supported by PHPExcel - break; - case 0x13: // Security - // Not supported by PHPExcel - break; - } - } - } - - - /** - * Read additional document summary information - */ - private function readDocumentSummaryInformation() - { - if (!isset($this->documentSummaryInformation)) { - return; - } - - // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) - // offset: 2; size: 2; - // offset: 4; size: 2; OS version - // offset: 6; size: 2; OS indicator - // offset: 8; size: 16 - // offset: 24; size: 4; section count - $secCount = self::getInt4d($this->documentSummaryInformation, 24); -// echo '$secCount = ', $secCount,'
    '; - - // offset: 28; size: 16; first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae - // offset: 44; size: 4; first section offset - $secOffset = self::getInt4d($this->documentSummaryInformation, 44); -// echo '$secOffset = ', $secOffset,'
    '; - - // section header - // offset: $secOffset; size: 4; section length - $secLength = self::getInt4d($this->documentSummaryInformation, $secOffset); -// echo '$secLength = ', $secLength,'
    '; - - // offset: $secOffset+4; size: 4; property count - $countProperties = self::getInt4d($this->documentSummaryInformation, $secOffset+4); -// echo '$countProperties = ', $countProperties,'
    '; - - // initialize code page (used to resolve string values) - $codePage = 'CP1252'; - - // offset: ($secOffset+8); size: var - // loop through property decarations and properties - for ($i = 0; $i < $countProperties; ++$i) { -// echo 'Property ', $i,'
    '; - // offset: ($secOffset+8) + (8 * $i); size: 4; property ID - $id = self::getInt4d($this->documentSummaryInformation, ($secOffset+8) + (8 * $i)); -// echo 'ID is ', $id,'
    '; - - // Use value of property id as appropriate - // offset: 60 + 8 * $i; size: 4; offset from beginning of section (48) - $offset = self::getInt4d($this->documentSummaryInformation, ($secOffset+12) + (8 * $i)); - - $type = self::getInt4d($this->documentSummaryInformation, $secOffset + $offset); -// echo 'Type is ', $type,', '; - - // initialize property value - $value = null; - - // extract property value based on property type - switch ($type) { - case 0x02: // 2 byte signed integer - $value = self::getInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset); - break; - case 0x03: // 4 byte signed integer - $value = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset); - break; - case 0x0B: // Boolean - $value = self::getInt2d($this->documentSummaryInformation, $secOffset + 4 + $offset); - $value = ($value == 0 ? false : true); - break; - case 0x13: // 4 byte unsigned integer - // not needed yet, fix later if necessary - break; - case 0x1E: // null-terminated string prepended by dword string length - $byteLength = self::getInt4d($this->documentSummaryInformation, $secOffset + 4 + $offset); - $value = substr($this->documentSummaryInformation, $secOffset + 8 + $offset, $byteLength); - $value = PHPExcel_Shared_String::ConvertEncoding($value, 'UTF-8', $codePage); - $value = rtrim($value); - break; - case 0x40: // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) - // PHP-Time - $value = PHPExcel_Shared_OLE::OLE2LocalDate(substr($this->documentSummaryInformation, $secOffset + 4 + $offset, 8)); - break; - case 0x47: // Clipboard format - // not needed yet, fix later if necessary - break; - } - - switch ($id) { - case 0x01: // Code Page - $codePage = PHPExcel_Shared_CodePage::NumberToName($value); - break; - case 0x02: // Category - $this->phpExcel->getProperties()->setCategory($value); - break; - case 0x03: // Presentation Target - // Not supported by PHPExcel - break; - case 0x04: // Bytes - // Not supported by PHPExcel - break; - case 0x05: // Lines - // Not supported by PHPExcel - break; - case 0x06: // Paragraphs - // Not supported by PHPExcel - break; - case 0x07: // Slides - // Not supported by PHPExcel - break; - case 0x08: // Notes - // Not supported by PHPExcel - break; - case 0x09: // Hidden Slides - // Not supported by PHPExcel - break; - case 0x0A: // MM Clips - // Not supported by PHPExcel - break; - case 0x0B: // Scale Crop - // Not supported by PHPExcel - break; - case 0x0C: // Heading Pairs - // Not supported by PHPExcel - break; - case 0x0D: // Titles of Parts - // Not supported by PHPExcel - break; - case 0x0E: // Manager - $this->phpExcel->getProperties()->setManager($value); - break; - case 0x0F: // Company - $this->phpExcel->getProperties()->setCompany($value); - break; - case 0x10: // Links up-to-date - // Not supported by PHPExcel - break; - } - } - } - - - /** - * Reads a general type of BIFF record. Does nothing except for moving stream pointer forward to next record. - */ - private function readDefault() - { - $length = self::getInt2d($this->data, $this->pos + 2); -// $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - } - - - /** - * The NOTE record specifies a comment associated with a particular cell. In Excel 95 (BIFF7) and earlier versions, - * this record stores a note (cell note). This feature was significantly enhanced in Excel 97. - */ - private function readNote() - { -// echo 'Read Cell Annotation
    '; - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->readDataOnly) { - return; - } - - $cellAddress = $this->readBIFF8CellAddress(substr($recordData, 0, 4)); - if ($this->version == self::XLS_BIFF8) { - $noteObjID = self::getInt2d($recordData, 6); - $noteAuthor = self::readUnicodeStringLong(substr($recordData, 8)); - $noteAuthor = $noteAuthor['value']; -// echo 'Note Address=', $cellAddress,'
    '; -// echo 'Note Object ID=', $noteObjID,'
    '; -// echo 'Note Author=', $noteAuthor,'
    '; -// - $this->cellNotes[$noteObjID] = array( - 'cellRef' => $cellAddress, - 'objectID' => $noteObjID, - 'author' => $noteAuthor - ); - } else { - $extension = false; - if ($cellAddress == '$B$65536') { - // If the address row is -1 and the column is 0, (which translates as $B$65536) then this is a continuation - // note from the previous cell annotation. We're not yet handling this, so annotations longer than the - // max 2048 bytes will probably throw a wobbly. - $row = self::getInt2d($recordData, 0); - $extension = true; - $cellAddress = array_pop(array_keys($this->phpSheet->getComments())); - } -// echo 'Note Address=', $cellAddress,'
    '; - - $cellAddress = str_replace('$', '', $cellAddress); - $noteLength = self::getInt2d($recordData, 4); - $noteText = trim(substr($recordData, 6)); -// echo 'Note Length=', $noteLength,'
    '; -// echo 'Note Text=', $noteText,'
    '; - - if ($extension) { - // Concatenate this extension with the currently set comment for the cell - $comment = $this->phpSheet->getComment($cellAddress); - $commentText = $comment->getText()->getPlainText(); - $comment->setText($this->parseRichText($commentText.$noteText)); - } else { - // Set comment for the cell - $this->phpSheet->getComment($cellAddress)->setText($this->parseRichText($noteText)); -// ->setAuthor($author) - } - } - - } - - - /** - * The TEXT Object record contains the text associated with a cell annotation. - */ - private function readTextObject() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->readDataOnly) { - return; - } - - // recordData consists of an array of subrecords looking like this: - // grbit: 2 bytes; Option Flags - // rot: 2 bytes; rotation - // cchText: 2 bytes; length of the text (in the first continue record) - // cbRuns: 2 bytes; length of the formatting (in the second continue record) - // followed by the continuation records containing the actual text and formatting - $grbitOpts = self::getInt2d($recordData, 0); - $rot = self::getInt2d($recordData, 2); - $cchText = self::getInt2d($recordData, 10); - $cbRuns = self::getInt2d($recordData, 12); - $text = $this->getSplicedRecordData(); - - $this->textObjects[$this->textObjRef] = array( - 'text' => substr($text["recordData"], $text["spliceOffsets"][0]+1, $cchText), - 'format' => substr($text["recordData"], $text["spliceOffsets"][1], $cbRuns), - 'alignment' => $grbitOpts, - 'rotation' => $rot - ); - -// echo '_readTextObject()
    '; -// var_dump($this->textObjects[$this->textObjRef]); -// echo '
    '; - } - - - /** - * Read BOF - */ - private function readBof() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = substr($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 2; size: 2; type of the following data - $substreamType = self::getInt2d($recordData, 2); - - switch ($substreamType) { - case self::XLS_WorkbookGlobals: - $version = self::getInt2d($recordData, 0); - if (($version != self::XLS_BIFF8) && ($version != self::XLS_BIFF7)) { - throw new PHPExcel_Reader_Exception('Cannot read this Excel file. Version is too old.'); - } - $this->version = $version; - break; - case self::XLS_Worksheet: - // do not use this version information for anything - // it is unreliable (OpenOffice doc, 5.8), use only version information from the global stream - break; - default: - // substream, e.g. chart - // just skip the entire substream - do { - $code = self::getInt2d($this->data, $this->pos); - $this->readDefault(); - } while ($code != self::XLS_TYPE_EOF && $this->pos < $this->dataSize); - break; - } - } - - - /** - * FILEPASS - * - * This record is part of the File Protection Block. It - * contains information about the read/write password of the - * file. All record contents following this record will be - * encrypted. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - * - * The decryption functions and objects used from here on in - * are based on the source of Spreadsheet-ParseExcel: - * http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel/ - */ - private function readFilepass() - { - $length = self::getInt2d($this->data, $this->pos + 2); - - if ($length != 54) { - throw new PHPExcel_Reader_Exception('Unexpected file pass record length'); - } - - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->verifyPassword('VelvetSweatshop', substr($recordData, 6, 16), substr($recordData, 22, 16), substr($recordData, 38, 16), $this->md5Ctxt)) { - throw new PHPExcel_Reader_Exception('Decryption password incorrect'); - } - - $this->encryption = self::MS_BIFF_CRYPTO_RC4; - - // Decryption required from the record after next onwards - $this->encryptionStartPos = $this->pos + self::getInt2d($this->data, $this->pos + 2); - } - - /** - * Make an RC4 decryptor for the given block - * - * @var int $block Block for which to create decrypto - * @var string $valContext MD5 context state - * - * @return PHPExcel_Reader_Excel5_RC4 - */ - private function makeKey($block, $valContext) - { - $pwarray = str_repeat("\0", 64); - - for ($i = 0; $i < 5; $i++) { - $pwarray[$i] = $valContext[$i]; - } - - $pwarray[5] = chr($block & 0xff); - $pwarray[6] = chr(($block >> 8) & 0xff); - $pwarray[7] = chr(($block >> 16) & 0xff); - $pwarray[8] = chr(($block >> 24) & 0xff); - - $pwarray[9] = "\x80"; - $pwarray[56] = "\x48"; - - $md5 = new PHPExcel_Reader_Excel5_MD5(); - $md5->add($pwarray); - - $s = $md5->getContext(); - return new PHPExcel_Reader_Excel5_RC4($s); - } - - /** - * Verify RC4 file password - * - * @var string $password Password to check - * @var string $docid Document id - * @var string $salt_data Salt data - * @var string $hashedsalt_data Hashed salt data - * @var string &$valContext Set to the MD5 context of the value - * - * @return bool Success - */ - private function verifyPassword($password, $docid, $salt_data, $hashedsalt_data, &$valContext) - { - $pwarray = str_repeat("\0", 64); - - for ($i = 0; $i < strlen($password); $i++) { - $o = ord(substr($password, $i, 1)); - $pwarray[2 * $i] = chr($o & 0xff); - $pwarray[2 * $i + 1] = chr(($o >> 8) & 0xff); - } - $pwarray[2 * $i] = chr(0x80); - $pwarray[56] = chr(($i << 4) & 0xff); - - $md5 = new PHPExcel_Reader_Excel5_MD5(); - $md5->add($pwarray); - - $mdContext1 = $md5->getContext(); - - $offset = 0; - $keyoffset = 0; - $tocopy = 5; - - $md5->reset(); - - while ($offset != 16) { - if ((64 - $offset) < 5) { - $tocopy = 64 - $offset; - } - for ($i = 0; $i <= $tocopy; $i++) { - $pwarray[$offset + $i] = $mdContext1[$keyoffset + $i]; - } - $offset += $tocopy; - - if ($offset == 64) { - $md5->add($pwarray); - $keyoffset = $tocopy; - $tocopy = 5 - $tocopy; - $offset = 0; - continue; - } - - $keyoffset = 0; - $tocopy = 5; - for ($i = 0; $i < 16; $i++) { - $pwarray[$offset + $i] = $docid[$i]; - } - $offset += 16; - } - - $pwarray[16] = "\x80"; - for ($i = 0; $i < 47; $i++) { - $pwarray[17 + $i] = "\0"; - } - $pwarray[56] = "\x80"; - $pwarray[57] = "\x0a"; - - $md5->add($pwarray); - $valContext = $md5->getContext(); - - $key = $this->makeKey(0, $valContext); - - $salt = $key->RC4($salt_data); - $hashedsalt = $key->RC4($hashedsalt_data); - - $salt .= "\x80" . str_repeat("\0", 47); - $salt[56] = "\x80"; - - $md5->reset(); - $md5->add($salt); - $mdContext2 = $md5->getContext(); - - return $mdContext2 == $hashedsalt; - } - - /** - * CODEPAGE - * - * This record stores the text encoding used to write byte - * strings, stored as MS Windows code page identifier. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readCodepage() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; code page identifier - $codepage = self::getInt2d($recordData, 0); - - $this->codepage = PHPExcel_Shared_CodePage::NumberToName($codepage); - } - - - /** - * DATEMODE - * - * This record specifies the base date for displaying date - * values. All dates are stored as count of days past this - * base date. In BIFF2-BIFF4 this record is part of the - * Calculation Settings Block. In BIFF5-BIFF8 it is - * stored in the Workbook Globals Substream. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readDateMode() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; 0 = base 1900, 1 = base 1904 - PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900); - if (ord($recordData{0}) == 1) { - PHPExcel_Shared_Date::setExcelCalendar(PHPExcel_Shared_Date::CALENDAR_MAC_1904); - } - } - - - /** - * Read a FONT record - */ - private function readFont() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - $objFont = new PHPExcel_Style_Font(); - - // offset: 0; size: 2; height of the font (in twips = 1/20 of a point) - $size = self::getInt2d($recordData, 0); - $objFont->setSize($size / 20); - - // offset: 2; size: 2; option flags - // bit: 0; mask 0x0001; bold (redundant in BIFF5-BIFF8) - // bit: 1; mask 0x0002; italic - $isItalic = (0x0002 & self::getInt2d($recordData, 2)) >> 1; - if ($isItalic) { - $objFont->setItalic(true); - } - - // bit: 2; mask 0x0004; underlined (redundant in BIFF5-BIFF8) - // bit: 3; mask 0x0008; strike - $isStrike = (0x0008 & self::getInt2d($recordData, 2)) >> 3; - if ($isStrike) { - $objFont->setStrikethrough(true); - } - - // offset: 4; size: 2; colour index - $colorIndex = self::getInt2d($recordData, 4); - $objFont->colorIndex = $colorIndex; - - // offset: 6; size: 2; font weight - $weight = self::getInt2d($recordData, 6); - switch ($weight) { - case 0x02BC: - $objFont->setBold(true); - break; - } - - // offset: 8; size: 2; escapement type - $escapement = self::getInt2d($recordData, 8); - switch ($escapement) { - case 0x0001: - $objFont->setSuperScript(true); - break; - case 0x0002: - $objFont->setSubScript(true); - break; - } - - // offset: 10; size: 1; underline type - $underlineType = ord($recordData{10}); - switch ($underlineType) { - case 0x00: - break; // no underline - case 0x01: - $objFont->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE); - break; - case 0x02: - $objFont->setUnderline(PHPExcel_Style_Font::UNDERLINE_DOUBLE); - break; - case 0x21: - $objFont->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING); - break; - case 0x22: - $objFont->setUnderline(PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING); - break; - } - - // offset: 11; size: 1; font family - // offset: 12; size: 1; character set - // offset: 13; size: 1; not used - // offset: 14; size: var; font name - if ($this->version == self::XLS_BIFF8) { - $string = self::readUnicodeStringShort(substr($recordData, 14)); - } else { - $string = $this->readByteStringShort(substr($recordData, 14)); - } - $objFont->setName($string['value']); - - $this->objFonts[] = $objFont; - } - } - - - /** - * FORMAT - * - * This record contains information about a number format. - * All FORMAT records occur together in a sequential list. - * - * In BIFF2-BIFF4 other records referencing a FORMAT record - * contain a zero-based index into this list. From BIFF5 on - * the FORMAT record contains the index itself that will be - * used by other records. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readFormat() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - $indexCode = self::getInt2d($recordData, 0); - - if ($this->version == self::XLS_BIFF8) { - $string = self::readUnicodeStringLong(substr($recordData, 2)); - } else { - // BIFF7 - $string = $this->readByteStringShort(substr($recordData, 2)); - } - - $formatString = $string['value']; - $this->formats[$indexCode] = $formatString; - } - } - - - /** - * XF - Extended Format - * - * This record contains formatting information for cells, rows, columns or styles. - * According to http://support.microsoft.com/kb/147732 there are always at least 15 cell style XF - * and 1 cell XF. - * Inspection of Excel files generated by MS Office Excel shows that XF records 0-14 are cell style XF - * and XF record 15 is a cell XF - * We only read the first cell style XF and skip the remaining cell style XF records - * We read all cell XF records. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readXf() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - $objStyle = new PHPExcel_Style(); - - if (!$this->readDataOnly) { - // offset: 0; size: 2; Index to FONT record - if (self::getInt2d($recordData, 0) < 4) { - $fontIndex = self::getInt2d($recordData, 0); - } else { - // this has to do with that index 4 is omitted in all BIFF versions for some strange reason - // check the OpenOffice documentation of the FONT record - $fontIndex = self::getInt2d($recordData, 0) - 1; - } - $objStyle->setFont($this->objFonts[$fontIndex]); - - // offset: 2; size: 2; Index to FORMAT record - $numberFormatIndex = self::getInt2d($recordData, 2); - if (isset($this->formats[$numberFormatIndex])) { - // then we have user-defined format code - $numberformat = array('code' => $this->formats[$numberFormatIndex]); - } elseif (($code = PHPExcel_Style_NumberFormat::builtInFormatCode($numberFormatIndex)) !== '') { - // then we have built-in format code - $numberformat = array('code' => $code); - } else { - // we set the general format code - $numberformat = array('code' => 'General'); - } - $objStyle->getNumberFormat()->setFormatCode($numberformat['code']); - - // offset: 4; size: 2; XF type, cell protection, and parent style XF - // bit 2-0; mask 0x0007; XF_TYPE_PROT - $xfTypeProt = self::getInt2d($recordData, 4); - // bit 0; mask 0x01; 1 = cell is locked - $isLocked = (0x01 & $xfTypeProt) >> 0; - $objStyle->getProtection()->setLocked($isLocked ? PHPExcel_Style_Protection::PROTECTION_INHERIT : PHPExcel_Style_Protection::PROTECTION_UNPROTECTED); - - // bit 1; mask 0x02; 1 = Formula is hidden - $isHidden = (0x02 & $xfTypeProt) >> 1; - $objStyle->getProtection()->setHidden($isHidden ? PHPExcel_Style_Protection::PROTECTION_PROTECTED : PHPExcel_Style_Protection::PROTECTION_UNPROTECTED); - - // bit 2; mask 0x04; 0 = Cell XF, 1 = Cell Style XF - $isCellStyleXf = (0x04 & $xfTypeProt) >> 2; - - // offset: 6; size: 1; Alignment and text break - // bit 2-0, mask 0x07; horizontal alignment - $horAlign = (0x07 & ord($recordData{6})) >> 0; - switch ($horAlign) { - case 0: - $objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_GENERAL); - break; - case 1: - $objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT); - break; - case 2: - $objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); - break; - case 3: - $objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT); - break; - case 4: - $objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_FILL); - break; - case 5: - $objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY); - break; - case 6: - $objStyle->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS); - break; - } - // bit 3, mask 0x08; wrap text - $wrapText = (0x08 & ord($recordData{6})) >> 3; - switch ($wrapText) { - case 0: - $objStyle->getAlignment()->setWrapText(false); - break; - case 1: - $objStyle->getAlignment()->setWrapText(true); - break; - } - // bit 6-4, mask 0x70; vertical alignment - $vertAlign = (0x70 & ord($recordData{6})) >> 4; - switch ($vertAlign) { - case 0: - $objStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP); - break; - case 1: - $objStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER); - break; - case 2: - $objStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_BOTTOM); - break; - case 3: - $objStyle->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_JUSTIFY); - break; - } - - if ($this->version == self::XLS_BIFF8) { - // offset: 7; size: 1; XF_ROTATION: Text rotation angle - $angle = ord($recordData{7}); - $rotation = 0; - if ($angle <= 90) { - $rotation = $angle; - } elseif ($angle <= 180) { - $rotation = 90 - $angle; - } elseif ($angle == 255) { - $rotation = -165; - } - $objStyle->getAlignment()->setTextRotation($rotation); - - // offset: 8; size: 1; Indentation, shrink to cell size, and text direction - // bit: 3-0; mask: 0x0F; indent level - $indent = (0x0F & ord($recordData{8})) >> 0; - $objStyle->getAlignment()->setIndent($indent); - - // bit: 4; mask: 0x10; 1 = shrink content to fit into cell - $shrinkToFit = (0x10 & ord($recordData{8})) >> 4; - switch ($shrinkToFit) { - case 0: - $objStyle->getAlignment()->setShrinkToFit(false); - break; - case 1: - $objStyle->getAlignment()->setShrinkToFit(true); - break; - } - - // offset: 9; size: 1; Flags used for attribute groups - - // offset: 10; size: 4; Cell border lines and background area - // bit: 3-0; mask: 0x0000000F; left style - if ($bordersLeftStyle = PHPExcel_Reader_Excel5_Style_Border::lookup((0x0000000F & self::getInt4d($recordData, 10)) >> 0)) { - $objStyle->getBorders()->getLeft()->setBorderStyle($bordersLeftStyle); - } - // bit: 7-4; mask: 0x000000F0; right style - if ($bordersRightStyle = PHPExcel_Reader_Excel5_Style_Border::lookup((0x000000F0 & self::getInt4d($recordData, 10)) >> 4)) { - $objStyle->getBorders()->getRight()->setBorderStyle($bordersRightStyle); - } - // bit: 11-8; mask: 0x00000F00; top style - if ($bordersTopStyle = PHPExcel_Reader_Excel5_Style_Border::lookup((0x00000F00 & self::getInt4d($recordData, 10)) >> 8)) { - $objStyle->getBorders()->getTop()->setBorderStyle($bordersTopStyle); - } - // bit: 15-12; mask: 0x0000F000; bottom style - if ($bordersBottomStyle = PHPExcel_Reader_Excel5_Style_Border::lookup((0x0000F000 & self::getInt4d($recordData, 10)) >> 12)) { - $objStyle->getBorders()->getBottom()->setBorderStyle($bordersBottomStyle); - } - // bit: 22-16; mask: 0x007F0000; left color - $objStyle->getBorders()->getLeft()->colorIndex = (0x007F0000 & self::getInt4d($recordData, 10)) >> 16; - - // bit: 29-23; mask: 0x3F800000; right color - $objStyle->getBorders()->getRight()->colorIndex = (0x3F800000 & self::getInt4d($recordData, 10)) >> 23; - - // bit: 30; mask: 0x40000000; 1 = diagonal line from top left to right bottom - $diagonalDown = (0x40000000 & self::getInt4d($recordData, 10)) >> 30 ? true : false; - - // bit: 31; mask: 0x80000000; 1 = diagonal line from bottom left to top right - $diagonalUp = (0x80000000 & self::getInt4d($recordData, 10)) >> 31 ? true : false; - - if ($diagonalUp == false && $diagonalDown == false) { - $objStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_NONE); - } elseif ($diagonalUp == true && $diagonalDown == false) { - $objStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_UP); - } elseif ($diagonalUp == false && $diagonalDown == true) { - $objStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_DOWN); - } elseif ($diagonalUp == true && $diagonalDown == true) { - $objStyle->getBorders()->setDiagonalDirection(PHPExcel_Style_Borders::DIAGONAL_BOTH); - } - - // offset: 14; size: 4; - // bit: 6-0; mask: 0x0000007F; top color - $objStyle->getBorders()->getTop()->colorIndex = (0x0000007F & self::getInt4d($recordData, 14)) >> 0; - - // bit: 13-7; mask: 0x00003F80; bottom color - $objStyle->getBorders()->getBottom()->colorIndex = (0x00003F80 & self::getInt4d($recordData, 14)) >> 7; - - // bit: 20-14; mask: 0x001FC000; diagonal color - $objStyle->getBorders()->getDiagonal()->colorIndex = (0x001FC000 & self::getInt4d($recordData, 14)) >> 14; - - // bit: 24-21; mask: 0x01E00000; diagonal style - if ($bordersDiagonalStyle = PHPExcel_Reader_Excel5_Style_Border::lookup((0x01E00000 & self::getInt4d($recordData, 14)) >> 21)) { - $objStyle->getBorders()->getDiagonal()->setBorderStyle($bordersDiagonalStyle); - } - - // bit: 31-26; mask: 0xFC000000 fill pattern - if ($fillType = PHPExcel_Reader_Excel5_Style_FillPattern::lookup((0xFC000000 & self::getInt4d($recordData, 14)) >> 26)) { - $objStyle->getFill()->setFillType($fillType); - } - // offset: 18; size: 2; pattern and background colour - // bit: 6-0; mask: 0x007F; color index for pattern color - $objStyle->getFill()->startcolorIndex = (0x007F & self::getInt2d($recordData, 18)) >> 0; - - // bit: 13-7; mask: 0x3F80; color index for pattern background - $objStyle->getFill()->endcolorIndex = (0x3F80 & self::getInt2d($recordData, 18)) >> 7; - } else { - // BIFF5 - - // offset: 7; size: 1; Text orientation and flags - $orientationAndFlags = ord($recordData{7}); - - // bit: 1-0; mask: 0x03; XF_ORIENTATION: Text orientation - $xfOrientation = (0x03 & $orientationAndFlags) >> 0; - switch ($xfOrientation) { - case 0: - $objStyle->getAlignment()->setTextRotation(0); - break; - case 1: - $objStyle->getAlignment()->setTextRotation(-165); - break; - case 2: - $objStyle->getAlignment()->setTextRotation(90); - break; - case 3: - $objStyle->getAlignment()->setTextRotation(-90); - break; - } - - // offset: 8; size: 4; cell border lines and background area - $borderAndBackground = self::getInt4d($recordData, 8); - - // bit: 6-0; mask: 0x0000007F; color index for pattern color - $objStyle->getFill()->startcolorIndex = (0x0000007F & $borderAndBackground) >> 0; - - // bit: 13-7; mask: 0x00003F80; color index for pattern background - $objStyle->getFill()->endcolorIndex = (0x00003F80 & $borderAndBackground) >> 7; - - // bit: 21-16; mask: 0x003F0000; fill pattern - $objStyle->getFill()->setFillType(PHPExcel_Reader_Excel5_Style_FillPattern::lookup((0x003F0000 & $borderAndBackground) >> 16)); - - // bit: 24-22; mask: 0x01C00000; bottom line style - $objStyle->getBorders()->getBottom()->setBorderStyle(PHPExcel_Reader_Excel5_Style_Border::lookup((0x01C00000 & $borderAndBackground) >> 22)); - - // bit: 31-25; mask: 0xFE000000; bottom line color - $objStyle->getBorders()->getBottom()->colorIndex = (0xFE000000 & $borderAndBackground) >> 25; - - // offset: 12; size: 4; cell border lines - $borderLines = self::getInt4d($recordData, 12); - - // bit: 2-0; mask: 0x00000007; top line style - $objStyle->getBorders()->getTop()->setBorderStyle(PHPExcel_Reader_Excel5_Style_Border::lookup((0x00000007 & $borderLines) >> 0)); - - // bit: 5-3; mask: 0x00000038; left line style - $objStyle->getBorders()->getLeft()->setBorderStyle(PHPExcel_Reader_Excel5_Style_Border::lookup((0x00000038 & $borderLines) >> 3)); - - // bit: 8-6; mask: 0x000001C0; right line style - $objStyle->getBorders()->getRight()->setBorderStyle(PHPExcel_Reader_Excel5_Style_Border::lookup((0x000001C0 & $borderLines) >> 6)); - - // bit: 15-9; mask: 0x0000FE00; top line color index - $objStyle->getBorders()->getTop()->colorIndex = (0x0000FE00 & $borderLines) >> 9; - - // bit: 22-16; mask: 0x007F0000; left line color index - $objStyle->getBorders()->getLeft()->colorIndex = (0x007F0000 & $borderLines) >> 16; - - // bit: 29-23; mask: 0x3F800000; right line color index - $objStyle->getBorders()->getRight()->colorIndex = (0x3F800000 & $borderLines) >> 23; - } - - // add cellStyleXf or cellXf and update mapping - if ($isCellStyleXf) { - // we only read one style XF record which is always the first - if ($this->xfIndex == 0) { - $this->phpExcel->addCellStyleXf($objStyle); - $this->mapCellStyleXfIndex[$this->xfIndex] = 0; - } - } else { - // we read all cell XF records - $this->phpExcel->addCellXf($objStyle); - $this->mapCellXfIndex[$this->xfIndex] = count($this->phpExcel->getCellXfCollection()) - 1; - } - - // update XF index for when we read next record - ++$this->xfIndex; - } - } - - - /** - * - */ - private function readXfExt() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; 0x087D = repeated header - - // offset: 2; size: 2 - - // offset: 4; size: 8; not used - - // offset: 12; size: 2; record version - - // offset: 14; size: 2; index to XF record which this record modifies - $ixfe = self::getInt2d($recordData, 14); - - // offset: 16; size: 2; not used - - // offset: 18; size: 2; number of extension properties that follow - $cexts = self::getInt2d($recordData, 18); - - // start reading the actual extension data - $offset = 20; - while ($offset < $length) { - // extension type - $extType = self::getInt2d($recordData, $offset); - - // extension length - $cb = self::getInt2d($recordData, $offset + 2); - - // extension data - $extData = substr($recordData, $offset + 4, $cb); - - switch ($extType) { - case 4: // fill start color - $xclfType = self::getInt2d($extData, 0); // color type - $xclrValue = substr($extData, 4, 4); // color value (value based on color type) - - if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); - - // modify the relevant style property - if (isset($this->mapCellXfIndex[$ixfe])) { - $fill = $this->phpExcel->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFill(); - $fill->getStartColor()->setRGB($rgb); - unset($fill->startcolorIndex); // normal color index does not apply, discard - } - } - break; - case 5: // fill end color - $xclfType = self::getInt2d($extData, 0); // color type - $xclrValue = substr($extData, 4, 4); // color value (value based on color type) - - if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); - - // modify the relevant style property - if (isset($this->mapCellXfIndex[$ixfe])) { - $fill = $this->phpExcel->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFill(); - $fill->getEndColor()->setRGB($rgb); - unset($fill->endcolorIndex); // normal color index does not apply, discard - } - } - break; - case 7: // border color top - $xclfType = self::getInt2d($extData, 0); // color type - $xclrValue = substr($extData, 4, 4); // color value (value based on color type) - - if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); - - // modify the relevant style property - if (isset($this->mapCellXfIndex[$ixfe])) { - $top = $this->phpExcel->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getTop(); - $top->getColor()->setRGB($rgb); - unset($top->colorIndex); // normal color index does not apply, discard - } - } - break; - case 8: // border color bottom - $xclfType = self::getInt2d($extData, 0); // color type - $xclrValue = substr($extData, 4, 4); // color value (value based on color type) - - if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); - - // modify the relevant style property - if (isset($this->mapCellXfIndex[$ixfe])) { - $bottom = $this->phpExcel->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getBottom(); - $bottom->getColor()->setRGB($rgb); - unset($bottom->colorIndex); // normal color index does not apply, discard - } - } - break; - case 9: // border color left - $xclfType = self::getInt2d($extData, 0); // color type - $xclrValue = substr($extData, 4, 4); // color value (value based on color type) - - if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); - - // modify the relevant style property - if (isset($this->mapCellXfIndex[$ixfe])) { - $left = $this->phpExcel->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getLeft(); - $left->getColor()->setRGB($rgb); - unset($left->colorIndex); // normal color index does not apply, discard - } - } - break; - case 10: // border color right - $xclfType = self::getInt2d($extData, 0); // color type - $xclrValue = substr($extData, 4, 4); // color value (value based on color type) - - if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); - - // modify the relevant style property - if (isset($this->mapCellXfIndex[$ixfe])) { - $right = $this->phpExcel->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getRight(); - $right->getColor()->setRGB($rgb); - unset($right->colorIndex); // normal color index does not apply, discard - } - } - break; - case 11: // border color diagonal - $xclfType = self::getInt2d($extData, 0); // color type - $xclrValue = substr($extData, 4, 4); // color value (value based on color type) - - if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); - - // modify the relevant style property - if (isset($this->mapCellXfIndex[$ixfe])) { - $diagonal = $this->phpExcel->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getBorders()->getDiagonal(); - $diagonal->getColor()->setRGB($rgb); - unset($diagonal->colorIndex); // normal color index does not apply, discard - } - } - break; - case 13: // font color - $xclfType = self::getInt2d($extData, 0); // color type - $xclrValue = substr($extData, 4, 4); // color value (value based on color type) - - if ($xclfType == 2) { - $rgb = sprintf('%02X%02X%02X', ord($xclrValue{0}), ord($xclrValue{1}), ord($xclrValue{2})); - - // modify the relevant style property - if (isset($this->mapCellXfIndex[$ixfe])) { - $font = $this->phpExcel->getCellXfByIndex($this->mapCellXfIndex[$ixfe])->getFont(); - $font->getColor()->setRGB($rgb); - unset($font->colorIndex); // normal color index does not apply, discard - } - } - break; - } - - $offset += $cb; - } - } - - } - - - /** - * Read STYLE record - */ - private function readStyle() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; index to XF record and flag for built-in style - $ixfe = self::getInt2d($recordData, 0); - - // bit: 11-0; mask 0x0FFF; index to XF record - $xfIndex = (0x0FFF & $ixfe) >> 0; - - // bit: 15; mask 0x8000; 0 = user-defined style, 1 = built-in style - $isBuiltIn = (bool) ((0x8000 & $ixfe) >> 15); - - if ($isBuiltIn) { - // offset: 2; size: 1; identifier for built-in style - $builtInId = ord($recordData{2}); - - switch ($builtInId) { - case 0x00: - // currently, we are not using this for anything - break; - default: - break; - } - } else { - // user-defined; not supported by PHPExcel - } - } - } - - - /** - * Read PALETTE record - */ - private function readPalette() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; number of following colors - $nm = self::getInt2d($recordData, 0); - - // list of RGB colors - for ($i = 0; $i < $nm; ++$i) { - $rgb = substr($recordData, 2 + 4 * $i, 4); - $this->palette[] = self::readRGB($rgb); - } - } - } - - - /** - * SHEET - * - * This record is located in the Workbook Globals - * Substream and represents a sheet inside the workbook. - * One SHEET record is written for each sheet. It stores the - * sheet name and a stream offset to the BOF record of the - * respective Sheet Substream within the Workbook Stream. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readSheet() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // offset: 0; size: 4; absolute stream position of the BOF record of the sheet - // NOTE: not encrypted - $rec_offset = self::getInt4d($this->data, $this->pos + 4); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 4; size: 1; sheet state - switch (ord($recordData{4})) { - case 0x00: - $sheetState = PHPExcel_Worksheet::SHEETSTATE_VISIBLE; - break; - case 0x01: - $sheetState = PHPExcel_Worksheet::SHEETSTATE_HIDDEN; - break; - case 0x02: - $sheetState = PHPExcel_Worksheet::SHEETSTATE_VERYHIDDEN; - break; - default: - $sheetState = PHPExcel_Worksheet::SHEETSTATE_VISIBLE; - break; - } - - // offset: 5; size: 1; sheet type - $sheetType = ord($recordData{5}); - - // offset: 6; size: var; sheet name - if ($this->version == self::XLS_BIFF8) { - $string = self::readUnicodeStringShort(substr($recordData, 6)); - $rec_name = $string['value']; - } elseif ($this->version == self::XLS_BIFF7) { - $string = $this->readByteStringShort(substr($recordData, 6)); - $rec_name = $string['value']; - } - - $this->sheets[] = array( - 'name' => $rec_name, - 'offset' => $rec_offset, - 'sheetState' => $sheetState, - 'sheetType' => $sheetType, - ); - } - - - /** - * Read EXTERNALBOOK record - */ - private function readExternalBook() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset within record data - $offset = 0; - - // there are 4 types of records - if (strlen($recordData) > 4) { - // external reference - // offset: 0; size: 2; number of sheet names ($nm) - $nm = self::getInt2d($recordData, 0); - $offset += 2; - - // offset: 2; size: var; encoded URL without sheet name (Unicode string, 16-bit length) - $encodedUrlString = self::readUnicodeStringLong(substr($recordData, 2)); - $offset += $encodedUrlString['size']; - - // offset: var; size: var; list of $nm sheet names (Unicode strings, 16-bit length) - $externalSheetNames = array(); - for ($i = 0; $i < $nm; ++$i) { - $externalSheetNameString = self::readUnicodeStringLong(substr($recordData, $offset)); - $externalSheetNames[] = $externalSheetNameString['value']; - $offset += $externalSheetNameString['size']; - } - - // store the record data - $this->externalBooks[] = array( - 'type' => 'external', - 'encodedUrl' => $encodedUrlString['value'], - 'externalSheetNames' => $externalSheetNames, - ); - } elseif (substr($recordData, 2, 2) == pack('CC', 0x01, 0x04)) { - // internal reference - // offset: 0; size: 2; number of sheet in this document - // offset: 2; size: 2; 0x01 0x04 - $this->externalBooks[] = array( - 'type' => 'internal', - ); - } elseif (substr($recordData, 0, 4) == pack('vCC', 0x0001, 0x01, 0x3A)) { - // add-in function - // offset: 0; size: 2; 0x0001 - $this->externalBooks[] = array( - 'type' => 'addInFunction', - ); - } elseif (substr($recordData, 0, 2) == pack('v', 0x0000)) { - // DDE links, OLE links - // offset: 0; size: 2; 0x0000 - // offset: 2; size: var; encoded source document name - $this->externalBooks[] = array( - 'type' => 'DDEorOLE', - ); - } - } - - - /** - * Read EXTERNNAME record. - */ - private function readExternName() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // external sheet references provided for named cells - if ($this->version == self::XLS_BIFF8) { - // offset: 0; size: 2; options - $options = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; - - // offset: 4; size: 2; not used - - // offset: 6; size: var - $nameString = self::readUnicodeStringShort(substr($recordData, 6)); - - // offset: var; size: var; formula data - $offset = 6 + $nameString['size']; - $formula = $this->getFormulaFromStructure(substr($recordData, $offset)); - - $this->externalNames[] = array( - 'name' => $nameString['value'], - 'formula' => $formula, - ); - } - } - - - /** - * Read EXTERNSHEET record - */ - private function readExternSheet() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // external sheet references provided for named cells - if ($this->version == self::XLS_BIFF8) { - // offset: 0; size: 2; number of following ref structures - $nm = self::getInt2d($recordData, 0); - for ($i = 0; $i < $nm; ++$i) { - $this->ref[] = array( - // offset: 2 + 6 * $i; index to EXTERNALBOOK record - 'externalBookIndex' => self::getInt2d($recordData, 2 + 6 * $i), - // offset: 4 + 6 * $i; index to first sheet in EXTERNALBOOK record - 'firstSheetIndex' => self::getInt2d($recordData, 4 + 6 * $i), - // offset: 6 + 6 * $i; index to last sheet in EXTERNALBOOK record - 'lastSheetIndex' => self::getInt2d($recordData, 6 + 6 * $i), - ); - } - } - } - - - /** - * DEFINEDNAME - * - * This record is part of a Link Table. It contains the name - * and the token array of an internal defined name. Token - * arrays of defined names contain tokens with aberrant - * token classes. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readDefinedName() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->version == self::XLS_BIFF8) { - // retrieves named cells - - // offset: 0; size: 2; option flags - $opts = self::getInt2d($recordData, 0); - - // bit: 5; mask: 0x0020; 0 = user-defined name, 1 = built-in-name - $isBuiltInName = (0x0020 & $opts) >> 5; - - // offset: 2; size: 1; keyboard shortcut - - // offset: 3; size: 1; length of the name (character count) - $nlen = ord($recordData{3}); - - // offset: 4; size: 2; size of the formula data (it can happen that this is zero) - // note: there can also be additional data, this is not included in $flen - $flen = self::getInt2d($recordData, 4); - - // offset: 8; size: 2; 0=Global name, otherwise index to sheet (1-based) - $scope = self::getInt2d($recordData, 8); - - // offset: 14; size: var; Name (Unicode string without length field) - $string = self::readUnicodeString(substr($recordData, 14), $nlen); - - // offset: var; size: $flen; formula data - $offset = 14 + $string['size']; - $formulaStructure = pack('v', $flen) . substr($recordData, $offset); - - try { - $formula = $this->getFormulaFromStructure($formulaStructure); - } catch (PHPExcel_Exception $e) { - $formula = ''; - } - - $this->definedname[] = array( - 'isBuiltInName' => $isBuiltInName, - 'name' => $string['value'], - 'formula' => $formula, - 'scope' => $scope, - ); - } - } - - - /** - * Read MSODRAWINGGROUP record - */ - private function readMsoDrawingGroup() - { - $length = self::getInt2d($this->data, $this->pos + 2); - - // get spliced record data - $splicedRecordData = $this->getSplicedRecordData(); - $recordData = $splicedRecordData['recordData']; - - $this->drawingGroupData .= $recordData; - } - - - /** - * SST - Shared String Table - * - * This record contains a list of all strings used anywhere - * in the workbook. Each string occurs only once. The - * workbook uses indexes into the list to reference the - * strings. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - **/ - private function readSst() - { - // offset within (spliced) record data - $pos = 0; - - // get spliced record data - $splicedRecordData = $this->getSplicedRecordData(); - - $recordData = $splicedRecordData['recordData']; - $spliceOffsets = $splicedRecordData['spliceOffsets']; - - // offset: 0; size: 4; total number of strings in the workbook - $pos += 4; - - // offset: 4; size: 4; number of following strings ($nm) - $nm = self::getInt4d($recordData, 4); - $pos += 4; - - // loop through the Unicode strings (16-bit length) - for ($i = 0; $i < $nm; ++$i) { - // number of characters in the Unicode string - $numChars = self::getInt2d($recordData, $pos); - $pos += 2; - - // option flags - $optionFlags = ord($recordData{$pos}); - ++$pos; - - // bit: 0; mask: 0x01; 0 = compressed; 1 = uncompressed - $isCompressed = (($optionFlags & 0x01) == 0) ; - - // bit: 2; mask: 0x02; 0 = ordinary; 1 = Asian phonetic - $hasAsian = (($optionFlags & 0x04) != 0); - - // bit: 3; mask: 0x03; 0 = ordinary; 1 = Rich-Text - $hasRichText = (($optionFlags & 0x08) != 0); - - if ($hasRichText) { - // number of Rich-Text formatting runs - $formattingRuns = self::getInt2d($recordData, $pos); - $pos += 2; - } - - if ($hasAsian) { - // size of Asian phonetic setting - $extendedRunLength = self::getInt4d($recordData, $pos); - $pos += 4; - } - - // expected byte length of character array if not split - $len = ($isCompressed) ? $numChars : $numChars * 2; - - // look up limit position - foreach ($spliceOffsets as $spliceOffset) { - // it can happen that the string is empty, therefore we need - // <= and not just < - if ($pos <= $spliceOffset) { - $limitpos = $spliceOffset; - break; - } - } - - if ($pos + $len <= $limitpos) { - // character array is not split between records - - $retstr = substr($recordData, $pos, $len); - $pos += $len; - } else { - // character array is split between records - - // first part of character array - $retstr = substr($recordData, $pos, $limitpos - $pos); - - $bytesRead = $limitpos - $pos; - - // remaining characters in Unicode string - $charsLeft = $numChars - (($isCompressed) ? $bytesRead : ($bytesRead / 2)); - - $pos = $limitpos; - - // keep reading the characters - while ($charsLeft > 0) { - // look up next limit position, in case the string span more than one continue record - foreach ($spliceOffsets as $spliceOffset) { - if ($pos < $spliceOffset) { - $limitpos = $spliceOffset; - break; - } - } - - // repeated option flags - // OpenOffice.org documentation 5.21 - $option = ord($recordData{$pos}); - ++$pos; - - if ($isCompressed && ($option == 0)) { - // 1st fragment compressed - // this fragment compressed - $len = min($charsLeft, $limitpos - $pos); - $retstr .= substr($recordData, $pos, $len); - $charsLeft -= $len; - $isCompressed = true; - } elseif (!$isCompressed && ($option != 0)) { - // 1st fragment uncompressed - // this fragment uncompressed - $len = min($charsLeft * 2, $limitpos - $pos); - $retstr .= substr($recordData, $pos, $len); - $charsLeft -= $len / 2; - $isCompressed = false; - } elseif (!$isCompressed && ($option == 0)) { - // 1st fragment uncompressed - // this fragment compressed - $len = min($charsLeft, $limitpos - $pos); - for ($j = 0; $j < $len; ++$j) { - $retstr .= $recordData{$pos + $j} . chr(0); - } - $charsLeft -= $len; - $isCompressed = false; - } else { - // 1st fragment compressed - // this fragment uncompressed - $newstr = ''; - for ($j = 0; $j < strlen($retstr); ++$j) { - $newstr .= $retstr[$j] . chr(0); - } - $retstr = $newstr; - $len = min($charsLeft * 2, $limitpos - $pos); - $retstr .= substr($recordData, $pos, $len); - $charsLeft -= $len / 2; - $isCompressed = false; - } - - $pos += $len; - } - } - - // convert to UTF-8 - $retstr = self::encodeUTF16($retstr, $isCompressed); - - // read additional Rich-Text information, if any - $fmtRuns = array(); - if ($hasRichText) { - // list of formatting runs - for ($j = 0; $j < $formattingRuns; ++$j) { - // first formatted character; zero-based - $charPos = self::getInt2d($recordData, $pos + $j * 4); - - // index to font record - $fontIndex = self::getInt2d($recordData, $pos + 2 + $j * 4); - - $fmtRuns[] = array( - 'charPos' => $charPos, - 'fontIndex' => $fontIndex, - ); - } - $pos += 4 * $formattingRuns; - } - - // read additional Asian phonetics information, if any - if ($hasAsian) { - // For Asian phonetic settings, we skip the extended string data - $pos += $extendedRunLength; - } - - // store the shared sting - $this->sst[] = array( - 'value' => $retstr, - 'fmtRuns' => $fmtRuns, - ); - } - - // getSplicedRecordData() takes care of moving current position in data stream - } - - - /** - * Read PRINTGRIDLINES record - */ - private function readPrintGridlines() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { - // offset: 0; size: 2; 0 = do not print sheet grid lines; 1 = print sheet gridlines - $printGridlines = (bool) self::getInt2d($recordData, 0); - $this->phpSheet->setPrintGridlines($printGridlines); - } - } - - - /** - * Read DEFAULTROWHEIGHT record - */ - private function readDefaultRowHeight() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; option flags - // offset: 2; size: 2; default height for unused rows, (twips 1/20 point) - $height = self::getInt2d($recordData, 2); - $this->phpSheet->getDefaultRowDimension()->setRowHeight($height / 20); - } - - - /** - * Read SHEETPR record - */ - private function readSheetPr() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2 - - // bit: 6; mask: 0x0040; 0 = outline buttons above outline group - $isSummaryBelow = (0x0040 & self::getInt2d($recordData, 0)) >> 6; - $this->phpSheet->setShowSummaryBelow($isSummaryBelow); - - // bit: 7; mask: 0x0080; 0 = outline buttons left of outline group - $isSummaryRight = (0x0080 & self::getInt2d($recordData, 0)) >> 7; - $this->phpSheet->setShowSummaryRight($isSummaryRight); - - // bit: 8; mask: 0x100; 0 = scale printout in percent, 1 = fit printout to number of pages - // this corresponds to radio button setting in page setup dialog in Excel - $this->isFitToPages = (bool) ((0x0100 & self::getInt2d($recordData, 0)) >> 8); - } - - - /** - * Read HORIZONTALPAGEBREAKS record - */ - private function readHorizontalPageBreaks() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { - // offset: 0; size: 2; number of the following row index structures - $nm = self::getInt2d($recordData, 0); - - // offset: 2; size: 6 * $nm; list of $nm row index structures - for ($i = 0; $i < $nm; ++$i) { - $r = self::getInt2d($recordData, 2 + 6 * $i); - $cf = self::getInt2d($recordData, 2 + 6 * $i + 2); - $cl = self::getInt2d($recordData, 2 + 6 * $i + 4); - - // not sure why two column indexes are necessary? - $this->phpSheet->setBreakByColumnAndRow($cf, $r, PHPExcel_Worksheet::BREAK_ROW); - } - } - } - - - /** - * Read VERTICALPAGEBREAKS record - */ - private function readVerticalPageBreaks() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { - // offset: 0; size: 2; number of the following column index structures - $nm = self::getInt2d($recordData, 0); - - // offset: 2; size: 6 * $nm; list of $nm row index structures - for ($i = 0; $i < $nm; ++$i) { - $c = self::getInt2d($recordData, 2 + 6 * $i); - $rf = self::getInt2d($recordData, 2 + 6 * $i + 2); - $rl = self::getInt2d($recordData, 2 + 6 * $i + 4); - - // not sure why two row indexes are necessary? - $this->phpSheet->setBreakByColumnAndRow($c, $rf, PHPExcel_Worksheet::BREAK_COLUMN); - } - } - } - - - /** - * Read HEADER record - */ - private function readHeader() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: var - // realized that $recordData can be empty even when record exists - if ($recordData) { - if ($this->version == self::XLS_BIFF8) { - $string = self::readUnicodeStringLong($recordData); - } else { - $string = $this->readByteStringShort($recordData); - } - - $this->phpSheet->getHeaderFooter()->setOddHeader($string['value']); - $this->phpSheet->getHeaderFooter()->setEvenHeader($string['value']); - } - } - } - - - /** - * Read FOOTER record - */ - private function readFooter() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: var - // realized that $recordData can be empty even when record exists - if ($recordData) { - if ($this->version == self::XLS_BIFF8) { - $string = self::readUnicodeStringLong($recordData); - } else { - $string = $this->readByteStringShort($recordData); - } - $this->phpSheet->getHeaderFooter()->setOddFooter($string['value']); - $this->phpSheet->getHeaderFooter()->setEvenFooter($string['value']); - } - } - } - - - /** - * Read HCENTER record - */ - private function readHcenter() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; 0 = print sheet left aligned, 1 = print sheet centered horizontally - $isHorizontalCentered = (bool) self::getInt2d($recordData, 0); - - $this->phpSheet->getPageSetup()->setHorizontalCentered($isHorizontalCentered); - } - } - - - /** - * Read VCENTER record - */ - private function readVcenter() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; 0 = print sheet aligned at top page border, 1 = print sheet vertically centered - $isVerticalCentered = (bool) self::getInt2d($recordData, 0); - - $this->phpSheet->getPageSetup()->setVerticalCentered($isVerticalCentered); - } - } - - - /** - * Read LEFTMARGIN record - */ - private function readLeftMargin() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 8 - $this->phpSheet->getPageMargins()->setLeft(self::extractNumber($recordData)); - } - } - - - /** - * Read RIGHTMARGIN record - */ - private function readRightMargin() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 8 - $this->phpSheet->getPageMargins()->setRight(self::extractNumber($recordData)); - } - } - - - /** - * Read TOPMARGIN record - */ - private function readTopMargin() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 8 - $this->phpSheet->getPageMargins()->setTop(self::extractNumber($recordData)); - } - } - - - /** - * Read BOTTOMMARGIN record - */ - private function readBottomMargin() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 8 - $this->phpSheet->getPageMargins()->setBottom(self::extractNumber($recordData)); - } - } - - - /** - * Read PAGESETUP record - */ - private function readPageSetup() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; paper size - $paperSize = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; scaling factor - $scale = self::getInt2d($recordData, 2); - - // offset: 6; size: 2; fit worksheet width to this number of pages, 0 = use as many as needed - $fitToWidth = self::getInt2d($recordData, 6); - - // offset: 8; size: 2; fit worksheet height to this number of pages, 0 = use as many as needed - $fitToHeight = self::getInt2d($recordData, 8); - - // offset: 10; size: 2; option flags - - // bit: 1; mask: 0x0002; 0=landscape, 1=portrait - $isPortrait = (0x0002 & self::getInt2d($recordData, 10)) >> 1; - - // bit: 2; mask: 0x0004; 1= paper size, scaling factor, paper orient. not init - // when this bit is set, do not use flags for those properties - $isNotInit = (0x0004 & self::getInt2d($recordData, 10)) >> 2; - - if (!$isNotInit) { - $this->phpSheet->getPageSetup()->setPaperSize($paperSize); - switch ($isPortrait) { - case 0: - $this->phpSheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE); - break; - case 1: - $this->phpSheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT); - break; - } - - $this->phpSheet->getPageSetup()->setScale($scale, false); - $this->phpSheet->getPageSetup()->setFitToPage((bool) $this->isFitToPages); - $this->phpSheet->getPageSetup()->setFitToWidth($fitToWidth, false); - $this->phpSheet->getPageSetup()->setFitToHeight($fitToHeight, false); - } - - // offset: 16; size: 8; header margin (IEEE 754 floating-point value) - $marginHeader = self::extractNumber(substr($recordData, 16, 8)); - $this->phpSheet->getPageMargins()->setHeader($marginHeader); - - // offset: 24; size: 8; footer margin (IEEE 754 floating-point value) - $marginFooter = self::extractNumber(substr($recordData, 24, 8)); - $this->phpSheet->getPageMargins()->setFooter($marginFooter); - } - } - - - /** - * PROTECT - Sheet protection (BIFF2 through BIFF8) - * if this record is omitted, then it also means no sheet protection - */ - private function readProtect() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->readDataOnly) { - return; - } - - // offset: 0; size: 2; - - // bit 0, mask 0x01; 1 = sheet is protected - $bool = (0x01 & self::getInt2d($recordData, 0)) >> 0; - $this->phpSheet->getProtection()->setSheet((bool)$bool); - } - - - /** - * SCENPROTECT - */ - private function readScenProtect() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->readDataOnly) { - return; - } - - // offset: 0; size: 2; - - // bit: 0, mask 0x01; 1 = scenarios are protected - $bool = (0x01 & self::getInt2d($recordData, 0)) >> 0; - - $this->phpSheet->getProtection()->setScenarios((bool)$bool); - } - - - /** - * OBJECTPROTECT - */ - private function readObjectProtect() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->readDataOnly) { - return; - } - - // offset: 0; size: 2; - - // bit: 0, mask 0x01; 1 = objects are protected - $bool = (0x01 & self::getInt2d($recordData, 0)) >> 0; - - $this->phpSheet->getProtection()->setObjects((bool)$bool); - } - - - /** - * PASSWORD - Sheet protection (hashed) password (BIFF2 through BIFF8) - */ - private function readPassword() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; 16-bit hash value of password - $password = strtoupper(dechex(self::getInt2d($recordData, 0))); // the hashed password - $this->phpSheet->getProtection()->setPassword($password, true); - } - } - - - /** - * Read DEFCOLWIDTH record - */ - private function readDefColWidth() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; default column width - $width = self::getInt2d($recordData, 0); - if ($width != 8) { - $this->phpSheet->getDefaultColumnDimension()->setWidth($width); - } - } - - - /** - * Read COLINFO record - */ - private function readColInfo() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; index to first column in range - $fc = self::getInt2d($recordData, 0); // first column index - - // offset: 2; size: 2; index to last column in range - $lc = self::getInt2d($recordData, 2); // first column index - - // offset: 4; size: 2; width of the column in 1/256 of the width of the zero character - $width = self::getInt2d($recordData, 4); - - // offset: 6; size: 2; index to XF record for default column formatting - $xfIndex = self::getInt2d($recordData, 6); - - // offset: 8; size: 2; option flags - // bit: 0; mask: 0x0001; 1= columns are hidden - $isHidden = (0x0001 & self::getInt2d($recordData, 8)) >> 0; - - // bit: 10-8; mask: 0x0700; outline level of the columns (0 = no outline) - $level = (0x0700 & self::getInt2d($recordData, 8)) >> 8; - - // bit: 12; mask: 0x1000; 1 = collapsed - $isCollapsed = (0x1000 & self::getInt2d($recordData, 8)) >> 12; - - // offset: 10; size: 2; not used - - for ($i = $fc; $i <= $lc; ++$i) { - if ($lc == 255 || $lc == 256) { - $this->phpSheet->getDefaultColumnDimension()->setWidth($width / 256); - break; - } - $this->phpSheet->getColumnDimensionByColumn($i)->setWidth($width / 256); - $this->phpSheet->getColumnDimensionByColumn($i)->setVisible(!$isHidden); - $this->phpSheet->getColumnDimensionByColumn($i)->setOutlineLevel($level); - $this->phpSheet->getColumnDimensionByColumn($i)->setCollapsed($isCollapsed); - $this->phpSheet->getColumnDimensionByColumn($i)->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - } - } - - - /** - * ROW - * - * This record contains the properties of a single row in a - * sheet. Rows and cells in a sheet are divided into blocks - * of 32 rows. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readRow() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; index of this row - $r = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; index to column of the first cell which is described by a cell record - - // offset: 4; size: 2; index to column of the last cell which is described by a cell record, increased by 1 - - // offset: 6; size: 2; - - // bit: 14-0; mask: 0x7FFF; height of the row, in twips = 1/20 of a point - $height = (0x7FFF & self::getInt2d($recordData, 6)) >> 0; - - // bit: 15: mask: 0x8000; 0 = row has custom height; 1= row has default height - $useDefaultHeight = (0x8000 & self::getInt2d($recordData, 6)) >> 15; - - if (!$useDefaultHeight) { - $this->phpSheet->getRowDimension($r + 1)->setRowHeight($height / 20); - } - - // offset: 8; size: 2; not used - - // offset: 10; size: 2; not used in BIFF5-BIFF8 - - // offset: 12; size: 4; option flags and default row formatting - - // bit: 2-0: mask: 0x00000007; outline level of the row - $level = (0x00000007 & self::getInt4d($recordData, 12)) >> 0; - $this->phpSheet->getRowDimension($r + 1)->setOutlineLevel($level); - - // bit: 4; mask: 0x00000010; 1 = outline group start or ends here... and is collapsed - $isCollapsed = (0x00000010 & self::getInt4d($recordData, 12)) >> 4; - $this->phpSheet->getRowDimension($r + 1)->setCollapsed($isCollapsed); - - // bit: 5; mask: 0x00000020; 1 = row is hidden - $isHidden = (0x00000020 & self::getInt4d($recordData, 12)) >> 5; - $this->phpSheet->getRowDimension($r + 1)->setVisible(!$isHidden); - - // bit: 7; mask: 0x00000080; 1 = row has explicit format - $hasExplicitFormat = (0x00000080 & self::getInt4d($recordData, 12)) >> 7; - - // bit: 27-16; mask: 0x0FFF0000; only applies when hasExplicitFormat = 1; index to XF record - $xfIndex = (0x0FFF0000 & self::getInt4d($recordData, 12)) >> 16; - - if ($hasExplicitFormat) { - $this->phpSheet->getRowDimension($r + 1)->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - } - } - - - /** - * Read RK record - * This record represents a cell that contains an RK value - * (encoded integer or floating-point value). If a - * floating-point value cannot be encoded to an RK value, - * a NUMBER record will be written. This record replaces the - * record INTEGER written in BIFF2. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readRk() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; index to row - $row = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; index to column - $column = self::getInt2d($recordData, 2); - $columnString = PHPExcel_Cell::stringFromColumnIndex($column); - - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - // offset: 4; size: 2; index to XF record - $xfIndex = self::getInt2d($recordData, 4); - - // offset: 6; size: 4; RK value - $rknum = self::getInt4d($recordData, 6); - $numValue = self::getIEEE754($rknum); - - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); - if (!$this->readDataOnly) { - // add style information - $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - - // add cell - $cell->setValueExplicit($numValue, PHPExcel_Cell_DataType::TYPE_NUMERIC); - } - } - - - /** - * Read LABELSST record - * This record represents a cell that contains a string. It - * replaces the LABEL record and RSTRING record used in - * BIFF2-BIFF5. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readLabelSst() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; index to row - $row = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; index to column - $column = self::getInt2d($recordData, 2); - $columnString = PHPExcel_Cell::stringFromColumnIndex($column); - - $emptyCell = true; - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - // offset: 4; size: 2; index to XF record - $xfIndex = self::getInt2d($recordData, 4); - - // offset: 6; size: 4; index to SST record - $index = self::getInt4d($recordData, 6); - - // add cell - if (($fmtRuns = $this->sst[$index]['fmtRuns']) && !$this->readDataOnly) { - // then we should treat as rich text - $richText = new PHPExcel_RichText(); - $charPos = 0; - $sstCount = count($this->sst[$index]['fmtRuns']); - for ($i = 0; $i <= $sstCount; ++$i) { - if (isset($fmtRuns[$i])) { - $text = PHPExcel_Shared_String::Substring($this->sst[$index]['value'], $charPos, $fmtRuns[$i]['charPos'] - $charPos); - $charPos = $fmtRuns[$i]['charPos']; - } else { - $text = PHPExcel_Shared_String::Substring($this->sst[$index]['value'], $charPos, PHPExcel_Shared_String::CountCharacters($this->sst[$index]['value'])); - } - - if (PHPExcel_Shared_String::CountCharacters($text) > 0) { - if ($i == 0) { // first text run, no style - $richText->createText($text); - } else { - $textRun = $richText->createTextRun($text); - if (isset($fmtRuns[$i - 1])) { - if ($fmtRuns[$i - 1]['fontIndex'] < 4) { - $fontIndex = $fmtRuns[$i - 1]['fontIndex']; - } else { - // this has to do with that index 4 is omitted in all BIFF versions for some strange reason - // check the OpenOffice documentation of the FONT record - $fontIndex = $fmtRuns[$i - 1]['fontIndex'] - 1; - } - $textRun->setFont(clone $this->objFonts[$fontIndex]); - } - } - } - } - if ($this->readEmptyCells || trim($richText->getPlainText()) !== '') { - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); - $cell->setValueExplicit($richText, PHPExcel_Cell_DataType::TYPE_STRING); - $emptyCell = false; - } - } else { - if ($this->readEmptyCells || trim($this->sst[$index]['value']) !== '') { - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); - $cell->setValueExplicit($this->sst[$index]['value'], PHPExcel_Cell_DataType::TYPE_STRING); - $emptyCell = false; - } - } - - if (!$this->readDataOnly && !$emptyCell) { - // add style information - $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - } - } - - - /** - * Read MULRK record - * This record represents a cell range containing RK value - * cells. All cells are located in the same row. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readMulRk() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; index to row - $row = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; index to first column - $colFirst = self::getInt2d($recordData, 2); - - // offset: var; size: 2; index to last column - $colLast = self::getInt2d($recordData, $length - 2); - $columns = $colLast - $colFirst + 1; - - // offset within record data - $offset = 4; - - for ($i = 0; $i < $columns; ++$i) { - $columnString = PHPExcel_Cell::stringFromColumnIndex($colFirst + $i); - - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - // offset: var; size: 2; index to XF record - $xfIndex = self::getInt2d($recordData, $offset); - - // offset: var; size: 4; RK value - $numValue = self::getIEEE754(self::getInt4d($recordData, $offset + 2)); - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); - if (!$this->readDataOnly) { - // add style - $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - - // add cell value - $cell->setValueExplicit($numValue, PHPExcel_Cell_DataType::TYPE_NUMERIC); - } - - $offset += 6; - } - } - - - /** - * Read NUMBER record - * This record represents a cell that contains a - * floating-point value. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readNumber() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; index to row - $row = self::getInt2d($recordData, 0); - - // offset: 2; size 2; index to column - $column = self::getInt2d($recordData, 2); - $columnString = PHPExcel_Cell::stringFromColumnIndex($column); - - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - // offset 4; size: 2; index to XF record - $xfIndex = self::getInt2d($recordData, 4); - - $numValue = self::extractNumber(substr($recordData, 6, 8)); - - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); - if (!$this->readDataOnly) { - // add cell style - $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - - // add cell value - $cell->setValueExplicit($numValue, PHPExcel_Cell_DataType::TYPE_NUMERIC); - } - } - - - /** - * Read FORMULA record + perhaps a following STRING record if formula result is a string - * This record contains the token array and the result of a - * formula cell. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readFormula() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; row index - $row = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; col index - $column = self::getInt2d($recordData, 2); - $columnString = PHPExcel_Cell::stringFromColumnIndex($column); - - // offset: 20: size: variable; formula structure - $formulaStructure = substr($recordData, 20); - - // offset: 14: size: 2; option flags, recalculate always, recalculate on open etc. - $options = self::getInt2d($recordData, 14); - - // bit: 0; mask: 0x0001; 1 = recalculate always - // bit: 1; mask: 0x0002; 1 = calculate on open - // bit: 2; mask: 0x0008; 1 = part of a shared formula - $isPartOfSharedFormula = (bool) (0x0008 & $options); - - // WARNING: - // We can apparently not rely on $isPartOfSharedFormula. Even when $isPartOfSharedFormula = true - // the formula data may be ordinary formula data, therefore we need to check - // explicitly for the tExp token (0x01) - $isPartOfSharedFormula = $isPartOfSharedFormula && ord($formulaStructure{2}) == 0x01; - - if ($isPartOfSharedFormula) { - // part of shared formula which means there will be a formula with a tExp token and nothing else - // get the base cell, grab tExp token - $baseRow = self::getInt2d($formulaStructure, 3); - $baseCol = self::getInt2d($formulaStructure, 5); - $this->_baseCell = PHPExcel_Cell::stringFromColumnIndex($baseCol). ($baseRow + 1); - } - - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - if ($isPartOfSharedFormula) { - // formula is added to this cell after the sheet has been read - $this->sharedFormulaParts[$columnString . ($row + 1)] = $this->_baseCell; - } - - // offset: 16: size: 4; not used - - // offset: 4; size: 2; XF index - $xfIndex = self::getInt2d($recordData, 4); - - // offset: 6; size: 8; result of the formula - if ((ord($recordData{6}) == 0) && (ord($recordData{12}) == 255) && (ord($recordData{13}) == 255)) { - // String formula. Result follows in appended STRING record - $dataType = PHPExcel_Cell_DataType::TYPE_STRING; - - // read possible SHAREDFMLA record - $code = self::getInt2d($this->data, $this->pos); - if ($code == self::XLS_TYPE_SHAREDFMLA) { - $this->readSharedFmla(); - } - - // read STRING record - $value = $this->readString(); - } elseif ((ord($recordData{6}) == 1) - && (ord($recordData{12}) == 255) - && (ord($recordData{13}) == 255)) { - // Boolean formula. Result is in +2; 0=false, 1=true - $dataType = PHPExcel_Cell_DataType::TYPE_BOOL; - $value = (bool) ord($recordData{8}); - } elseif ((ord($recordData{6}) == 2) - && (ord($recordData{12}) == 255) - && (ord($recordData{13}) == 255)) { - // Error formula. Error code is in +2 - $dataType = PHPExcel_Cell_DataType::TYPE_ERROR; - $value = PHPExcel_Reader_Excel5_ErrorCode::lookup(ord($recordData{8})); - } elseif ((ord($recordData{6}) == 3) - && (ord($recordData{12}) == 255) - && (ord($recordData{13}) == 255)) { - // Formula result is a null string - $dataType = PHPExcel_Cell_DataType::TYPE_NULL; - $value = ''; - } else { - // forumla result is a number, first 14 bytes like _NUMBER record - $dataType = PHPExcel_Cell_DataType::TYPE_NUMERIC; - $value = self::extractNumber(substr($recordData, 6, 8)); - } - - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); - if (!$this->readDataOnly) { - // add cell style - $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - - // store the formula - if (!$isPartOfSharedFormula) { - // not part of shared formula - // add cell value. If we can read formula, populate with formula, otherwise just used cached value - try { - if ($this->version != self::XLS_BIFF8) { - throw new PHPExcel_Reader_Exception('Not BIFF8. Can only read BIFF8 formulas'); - } - $formula = $this->getFormulaFromStructure($formulaStructure); // get formula in human language - $cell->setValueExplicit('=' . $formula, PHPExcel_Cell_DataType::TYPE_FORMULA); - - } catch (PHPExcel_Exception $e) { - $cell->setValueExplicit($value, $dataType); - } - } else { - if ($this->version == self::XLS_BIFF8) { - // do nothing at this point, formula id added later in the code - } else { - $cell->setValueExplicit($value, $dataType); - } - } - - // store the cached calculated value - $cell->setCalculatedValue($value); - } - } - - - /** - * Read a SHAREDFMLA record. This function just stores the binary shared formula in the reader, - * which usually contains relative references. - * These will be used to construct the formula in each shared formula part after the sheet is read. - */ - private function readSharedFmla() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0, size: 6; cell range address of the area used by the shared formula, not used for anything - $cellRange = substr($recordData, 0, 6); - $cellRange = $this->readBIFF5CellRangeAddressFixed($cellRange); // note: even BIFF8 uses BIFF5 syntax - - // offset: 6, size: 1; not used - - // offset: 7, size: 1; number of existing FORMULA records for this shared formula - $no = ord($recordData{7}); - - // offset: 8, size: var; Binary token array of the shared formula - $formula = substr($recordData, 8); - - // at this point we only store the shared formula for later use - $this->sharedFormulas[$this->_baseCell] = $formula; - } - - - /** - * Read a STRING record from current stream position and advance the stream pointer to next record - * This record is used for storing result from FORMULA record when it is a string, and - * it occurs directly after the FORMULA record - * - * @return string The string contents as UTF-8 - */ - private function readString() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->version == self::XLS_BIFF8) { - $string = self::readUnicodeStringLong($recordData); - $value = $string['value']; - } else { - $string = $this->readByteStringLong($recordData); - $value = $string['value']; - } - - return $value; - } - - - /** - * Read BOOLERR record - * This record represents a Boolean value or error value - * cell. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readBoolErr() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; row index - $row = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; column index - $column = self::getInt2d($recordData, 2); - $columnString = PHPExcel_Cell::stringFromColumnIndex($column); - - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - // offset: 4; size: 2; index to XF record - $xfIndex = self::getInt2d($recordData, 4); - - // offset: 6; size: 1; the boolean value or error value - $boolErr = ord($recordData{6}); - - // offset: 7; size: 1; 0=boolean; 1=error - $isError = ord($recordData{7}); - - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); - switch ($isError) { - case 0: // boolean - $value = (bool) $boolErr; - - // add cell value - $cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_BOOL); - break; - case 1: // error type - $value = PHPExcel_Reader_Excel5_ErrorCode::lookup($boolErr); - - // add cell value - $cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_ERROR); - break; - } - - if (!$this->readDataOnly) { - // add cell style - $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - } - } - - - /** - * Read MULBLANK record - * This record represents a cell range of empty cells. All - * cells are located in the same row - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readMulBlank() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; index to row - $row = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; index to first column - $fc = self::getInt2d($recordData, 2); - - // offset: 4; size: 2 x nc; list of indexes to XF records - // add style information - if (!$this->readDataOnly && $this->readEmptyCells) { - for ($i = 0; $i < $length / 2 - 3; ++$i) { - $columnString = PHPExcel_Cell::stringFromColumnIndex($fc + $i); - - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - $xfIndex = self::getInt2d($recordData, 4 + 2 * $i); - $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - } - } - - // offset: 6; size 2; index to last column (not needed) - } - - - /** - * Read LABEL record - * This record represents a cell that contains a string. In - * BIFF8 it is usually replaced by the LABELSST record. - * Excel still uses this record, if it copies unformatted - * text cells to the clipboard. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readLabel() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; index to row - $row = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; index to column - $column = self::getInt2d($recordData, 2); - $columnString = PHPExcel_Cell::stringFromColumnIndex($column); - - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - // offset: 4; size: 2; XF index - $xfIndex = self::getInt2d($recordData, 4); - - // add cell value - // todo: what if string is very long? continue record - if ($this->version == self::XLS_BIFF8) { - $string = self::readUnicodeStringLong(substr($recordData, 6)); - $value = $string['value']; - } else { - $string = $this->readByteStringLong(substr($recordData, 6)); - $value = $string['value']; - } - if ($this->readEmptyCells || trim($value) !== '') { - $cell = $this->phpSheet->getCell($columnString . ($row + 1)); - $cell->setValueExplicit($value, PHPExcel_Cell_DataType::TYPE_STRING); - - if (!$this->readDataOnly) { - // add cell style - $cell->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - } - } - } - - - /** - * Read BLANK record - */ - private function readBlank() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; row index - $row = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; col index - $col = self::getInt2d($recordData, 2); - $columnString = PHPExcel_Cell::stringFromColumnIndex($col); - - // Read cell? - if (($this->getReadFilter() !== null) && $this->getReadFilter()->readCell($columnString, $row + 1, $this->phpSheet->getTitle())) { - // offset: 4; size: 2; XF index - $xfIndex = self::getInt2d($recordData, 4); - - // add style information - if (!$this->readDataOnly && $this->readEmptyCells) { - $this->phpSheet->getCell($columnString . ($row + 1))->setXfIndex($this->mapCellXfIndex[$xfIndex]); - } - } - } - - - /** - * Read MSODRAWING record - */ - private function readMsoDrawing() - { - $length = self::getInt2d($this->data, $this->pos + 2); - - // get spliced record data - $splicedRecordData = $this->getSplicedRecordData(); - $recordData = $splicedRecordData['recordData']; - - $this->drawingData .= $recordData; - } - - - /** - * Read OBJ record - */ - private function readObj() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->readDataOnly || $this->version != self::XLS_BIFF8) { - return; - } - - // recordData consists of an array of subrecords looking like this: - // ft: 2 bytes; ftCmo type (0x15) - // cb: 2 bytes; size in bytes of ftCmo data - // ot: 2 bytes; Object Type - // id: 2 bytes; Object id number - // grbit: 2 bytes; Option Flags - // data: var; subrecord data - - // for now, we are just interested in the second subrecord containing the object type - $ftCmoType = self::getInt2d($recordData, 0); - $cbCmoSize = self::getInt2d($recordData, 2); - $otObjType = self::getInt2d($recordData, 4); - $idObjID = self::getInt2d($recordData, 6); - $grbitOpts = self::getInt2d($recordData, 6); - - $this->objs[] = array( - 'ftCmoType' => $ftCmoType, - 'cbCmoSize' => $cbCmoSize, - 'otObjType' => $otObjType, - 'idObjID' => $idObjID, - 'grbitOpts' => $grbitOpts - ); - $this->textObjRef = $idObjID; - -// echo '_readObj()
    '; -// var_dump(end($this->objs)); -// echo '
    '; - } - - - /** - * Read WINDOW2 record - */ - private function readWindow2() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; option flags - $options = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; index to first visible row - $firstVisibleRow = self::getInt2d($recordData, 2); - - // offset: 4; size: 2; index to first visible colum - $firstVisibleColumn = self::getInt2d($recordData, 4); - if ($this->version === self::XLS_BIFF8) { - // offset: 8; size: 2; not used - // offset: 10; size: 2; cached magnification factor in page break preview (in percent); 0 = Default (60%) - // offset: 12; size: 2; cached magnification factor in normal view (in percent); 0 = Default (100%) - // offset: 14; size: 4; not used - $zoomscaleInPageBreakPreview = self::getInt2d($recordData, 10); - if ($zoomscaleInPageBreakPreview === 0) { - $zoomscaleInPageBreakPreview = 60; - } - $zoomscaleInNormalView = self::getInt2d($recordData, 12); - if ($zoomscaleInNormalView === 0) { - $zoomscaleInNormalView = 100; - } - } - - // bit: 1; mask: 0x0002; 0 = do not show gridlines, 1 = show gridlines - $showGridlines = (bool) ((0x0002 & $options) >> 1); - $this->phpSheet->setShowGridlines($showGridlines); - - // bit: 2; mask: 0x0004; 0 = do not show headers, 1 = show headers - $showRowColHeaders = (bool) ((0x0004 & $options) >> 2); - $this->phpSheet->setShowRowColHeaders($showRowColHeaders); - - // bit: 3; mask: 0x0008; 0 = panes are not frozen, 1 = panes are frozen - $this->frozen = (bool) ((0x0008 & $options) >> 3); - - // bit: 6; mask: 0x0040; 0 = columns from left to right, 1 = columns from right to left - $this->phpSheet->setRightToLeft((bool)((0x0040 & $options) >> 6)); - - // bit: 10; mask: 0x0400; 0 = sheet not active, 1 = sheet active - $isActive = (bool) ((0x0400 & $options) >> 10); - if ($isActive) { - $this->phpExcel->setActiveSheetIndex($this->phpExcel->getIndex($this->phpSheet)); - } - - // bit: 11; mask: 0x0800; 0 = normal view, 1 = page break view - $isPageBreakPreview = (bool) ((0x0800 & $options) >> 11); - - //FIXME: set $firstVisibleRow and $firstVisibleColumn - - if ($this->phpSheet->getSheetView()->getView() !== PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT) { - //NOTE: this setting is inferior to page layout view(Excel2007-) - $view = $isPageBreakPreview ? PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW : PHPExcel_Worksheet_SheetView::SHEETVIEW_NORMAL; - $this->phpSheet->getSheetView()->setView($view); - if ($this->version === self::XLS_BIFF8) { - $zoomScale = $isPageBreakPreview ? $zoomscaleInPageBreakPreview : $zoomscaleInNormalView; - $this->phpSheet->getSheetView()->setZoomScale($zoomScale); - $this->phpSheet->getSheetView()->setZoomScaleNormal($zoomscaleInNormalView); - } - } - } - - /** - * Read PLV Record(Created by Excel2007 or upper) - */ - private function readPageLayoutView() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - //var_dump(unpack("vrt/vgrbitFrt/V2reserved/vwScalePLV/vgrbit", $recordData)); - - // offset: 0; size: 2; rt - //->ignore - $rt = self::getInt2d($recordData, 0); - // offset: 2; size: 2; grbitfr - //->ignore - $grbitFrt = self::getInt2d($recordData, 2); - // offset: 4; size: 8; reserved - //->ignore - - // offset: 12; size 2; zoom scale - $wScalePLV = self::getInt2d($recordData, 12); - // offset: 14; size 2; grbit - $grbit = self::getInt2d($recordData, 14); - - // decomprise grbit - $fPageLayoutView = $grbit & 0x01; - $fRulerVisible = ($grbit >> 1) & 0x01; //no support - $fWhitespaceHidden = ($grbit >> 3) & 0x01; //no support - - if ($fPageLayoutView === 1) { - $this->phpSheet->getSheetView()->setView(PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT); - $this->phpSheet->getSheetView()->setZoomScale($wScalePLV); //set by Excel2007 only if SHEETVIEW_PAGE_LAYOUT - } - //otherwise, we cannot know whether SHEETVIEW_PAGE_LAYOUT or SHEETVIEW_PAGE_BREAK_PREVIEW. - } - - /** - * Read SCL record - */ - private function readScl() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // offset: 0; size: 2; numerator of the view magnification - $numerator = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; numerator of the view magnification - $denumerator = self::getInt2d($recordData, 2); - - // set the zoom scale (in percent) - $this->phpSheet->getSheetView()->setZoomScale($numerator * 100 / $denumerator); - } - - - /** - * Read PANE record - */ - private function readPane() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; position of vertical split - $px = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; position of horizontal split - $py = self::getInt2d($recordData, 2); - - if ($this->frozen) { - // frozen panes - $this->phpSheet->freezePane(PHPExcel_Cell::stringFromColumnIndex($px) . ($py + 1)); - } else { - // unfrozen panes; split windows; not supported by PHPExcel core - } - } - } - - - /** - * Read SELECTION record. There is one such record for each pane in the sheet. - */ - private function readSelection() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 1; pane identifier - $paneId = ord($recordData{0}); - - // offset: 1; size: 2; index to row of the active cell - $r = self::getInt2d($recordData, 1); - - // offset: 3; size: 2; index to column of the active cell - $c = self::getInt2d($recordData, 3); - - // offset: 5; size: 2; index into the following cell range list to the - // entry that contains the active cell - $index = self::getInt2d($recordData, 5); - - // offset: 7; size: var; cell range address list containing all selected cell ranges - $data = substr($recordData, 7); - $cellRangeAddressList = $this->readBIFF5CellRangeAddressList($data); // note: also BIFF8 uses BIFF5 syntax - - $selectedCells = $cellRangeAddressList['cellRangeAddresses'][0]; - - // first row '1' + last row '16384' indicates that full column is selected (apparently also in BIFF8!) - if (preg_match('/^([A-Z]+1\:[A-Z]+)16384$/', $selectedCells)) { - $selectedCells = preg_replace('/^([A-Z]+1\:[A-Z]+)16384$/', '${1}1048576', $selectedCells); - } - - // first row '1' + last row '65536' indicates that full column is selected - if (preg_match('/^([A-Z]+1\:[A-Z]+)65536$/', $selectedCells)) { - $selectedCells = preg_replace('/^([A-Z]+1\:[A-Z]+)65536$/', '${1}1048576', $selectedCells); - } - - // first column 'A' + last column 'IV' indicates that full row is selected - if (preg_match('/^(A[0-9]+\:)IV([0-9]+)$/', $selectedCells)) { - $selectedCells = preg_replace('/^(A[0-9]+\:)IV([0-9]+)$/', '${1}XFD${2}', $selectedCells); - } - - $this->phpSheet->setSelectedCells($selectedCells); - } - } - - - private function includeCellRangeFiltered($cellRangeAddress) - { - $includeCellRange = true; - if ($this->getReadFilter() !== null) { - $includeCellRange = false; - $rangeBoundaries = PHPExcel_Cell::getRangeBoundaries($cellRangeAddress); - $rangeBoundaries[1][0]++; - for ($row = $rangeBoundaries[0][1]; $row <= $rangeBoundaries[1][1]; $row++) { - for ($column = $rangeBoundaries[0][0]; $column != $rangeBoundaries[1][0]; $column++) { - if ($this->getReadFilter()->readCell($column, $row, $this->phpSheet->getTitle())) { - $includeCellRange = true; - break 2; - } - } - } - } - return $includeCellRange; - } - - - /** - * MERGEDCELLS - * - * This record contains the addresses of merged cell ranges - * in the current sheet. - * - * -- "OpenOffice.org's Documentation of the Microsoft - * Excel File Format" - */ - private function readMergedCells() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) { - $cellRangeAddressList = $this->readBIFF8CellRangeAddressList($recordData); - foreach ($cellRangeAddressList['cellRangeAddresses'] as $cellRangeAddress) { - if ((strpos($cellRangeAddress, ':') !== false) && - ($this->includeCellRangeFiltered($cellRangeAddress))) { - $this->phpSheet->mergeCells($cellRangeAddress); - } - } - } - } - - - /** - * Read HYPERLINK record - */ - private function readHyperLink() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer forward to next record - $this->pos += 4 + $length; - - if (!$this->readDataOnly) { - // offset: 0; size: 8; cell range address of all cells containing this hyperlink - try { - $cellRange = $this->readBIFF8CellRangeAddressFixed($recordData, 0, 8); - } catch (PHPExcel_Exception $e) { - return; - } - - // offset: 8, size: 16; GUID of StdLink - - // offset: 24, size: 4; unknown value - - // offset: 28, size: 4; option flags - // bit: 0; mask: 0x00000001; 0 = no link or extant, 1 = file link or URL - $isFileLinkOrUrl = (0x00000001 & self::getInt2d($recordData, 28)) >> 0; - - // bit: 1; mask: 0x00000002; 0 = relative path, 1 = absolute path or URL - $isAbsPathOrUrl = (0x00000001 & self::getInt2d($recordData, 28)) >> 1; - - // bit: 2 (and 4); mask: 0x00000014; 0 = no description - $hasDesc = (0x00000014 & self::getInt2d($recordData, 28)) >> 2; - - // bit: 3; mask: 0x00000008; 0 = no text, 1 = has text - $hasText = (0x00000008 & self::getInt2d($recordData, 28)) >> 3; - - // bit: 7; mask: 0x00000080; 0 = no target frame, 1 = has target frame - $hasFrame = (0x00000080 & self::getInt2d($recordData, 28)) >> 7; - - // bit: 8; mask: 0x00000100; 0 = file link or URL, 1 = UNC path (inc. server name) - $isUNC = (0x00000100 & self::getInt2d($recordData, 28)) >> 8; - - // offset within record data - $offset = 32; - - if ($hasDesc) { - // offset: 32; size: var; character count of description text - $dl = self::getInt4d($recordData, 32); - // offset: 36; size: var; character array of description text, no Unicode string header, always 16-bit characters, zero terminated - $desc = self::encodeUTF16(substr($recordData, 36, 2 * ($dl - 1)), false); - $offset += 4 + 2 * $dl; - } - if ($hasFrame) { - $fl = self::getInt4d($recordData, $offset); - $offset += 4 + 2 * $fl; - } - - // detect type of hyperlink (there are 4 types) - $hyperlinkType = null; - - if ($isUNC) { - $hyperlinkType = 'UNC'; - } elseif (!$isFileLinkOrUrl) { - $hyperlinkType = 'workbook'; - } elseif (ord($recordData{$offset}) == 0x03) { - $hyperlinkType = 'local'; - } elseif (ord($recordData{$offset}) == 0xE0) { - $hyperlinkType = 'URL'; - } - - switch ($hyperlinkType) { - case 'URL': - // section 5.58.2: Hyperlink containing a URL - // e.g. http://example.org/index.php - - // offset: var; size: 16; GUID of URL Moniker - $offset += 16; - // offset: var; size: 4; size (in bytes) of character array of the URL including trailing zero word - $us = self::getInt4d($recordData, $offset); - $offset += 4; - // offset: var; size: $us; character array of the URL, no Unicode string header, always 16-bit characters, zero-terminated - $url = self::encodeUTF16(substr($recordData, $offset, $us - 2), false); - $nullOffset = strpos($url, 0x00); - if ($nullOffset) { - $url = substr($url, 0, $nullOffset); - } - $url .= $hasText ? '#' : ''; - $offset += $us; - break; - case 'local': - // section 5.58.3: Hyperlink to local file - // examples: - // mydoc.txt - // ../../somedoc.xls#Sheet!A1 - - // offset: var; size: 16; GUI of File Moniker - $offset += 16; - - // offset: var; size: 2; directory up-level count. - $upLevelCount = self::getInt2d($recordData, $offset); - $offset += 2; - - // offset: var; size: 4; character count of the shortened file path and name, including trailing zero word - $sl = self::getInt4d($recordData, $offset); - $offset += 4; - - // offset: var; size: sl; character array of the shortened file path and name in 8.3-DOS-format (compressed Unicode string) - $shortenedFilePath = substr($recordData, $offset, $sl); - $shortenedFilePath = self::encodeUTF16($shortenedFilePath, true); - $shortenedFilePath = substr($shortenedFilePath, 0, -1); // remove trailing zero - - $offset += $sl; - - // offset: var; size: 24; unknown sequence - $offset += 24; - - // extended file path - // offset: var; size: 4; size of the following file link field including string lenth mark - $sz = self::getInt4d($recordData, $offset); - $offset += 4; - - // only present if $sz > 0 - if ($sz > 0) { - // offset: var; size: 4; size of the character array of the extended file path and name - $xl = self::getInt4d($recordData, $offset); - $offset += 4; - - // offset: var; size 2; unknown - $offset += 2; - - // offset: var; size $xl; character array of the extended file path and name. - $extendedFilePath = substr($recordData, $offset, $xl); - $extendedFilePath = self::encodeUTF16($extendedFilePath, false); - $offset += $xl; - } - - // construct the path - $url = str_repeat('..\\', $upLevelCount); - $url .= ($sz > 0) ? $extendedFilePath : $shortenedFilePath; // use extended path if available - $url .= $hasText ? '#' : ''; - - break; - case 'UNC': - // section 5.58.4: Hyperlink to a File with UNC (Universal Naming Convention) Path - // todo: implement - return; - case 'workbook': - // section 5.58.5: Hyperlink to the Current Workbook - // e.g. Sheet2!B1:C2, stored in text mark field - $url = 'sheet://'; - break; - default: - return; - } - - if ($hasText) { - // offset: var; size: 4; character count of text mark including trailing zero word - $tl = self::getInt4d($recordData, $offset); - $offset += 4; - // offset: var; size: var; character array of the text mark without the # sign, no Unicode header, always 16-bit characters, zero-terminated - $text = self::encodeUTF16(substr($recordData, $offset, 2 * ($tl - 1)), false); - $url .= $text; - } - - // apply the hyperlink to all the relevant cells - foreach (PHPExcel_Cell::extractAllCellReferencesInRange($cellRange) as $coordinate) { - $this->phpSheet->getCell($coordinate)->getHyperLink()->setUrl($url); - } - } - } - - - /** - * Read DATAVALIDATIONS record - */ - private function readDataValidations() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer forward to next record - $this->pos += 4 + $length; - } - - - /** - * Read DATAVALIDATION record - */ - private function readDataValidation() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer forward to next record - $this->pos += 4 + $length; - - if ($this->readDataOnly) { - return; - } - - // offset: 0; size: 4; Options - $options = self::getInt4d($recordData, 0); - - // bit: 0-3; mask: 0x0000000F; type - $type = (0x0000000F & $options) >> 0; - switch ($type) { - case 0x00: - $type = PHPExcel_Cell_DataValidation::TYPE_NONE; - break; - case 0x01: - $type = PHPExcel_Cell_DataValidation::TYPE_WHOLE; - break; - case 0x02: - $type = PHPExcel_Cell_DataValidation::TYPE_DECIMAL; - break; - case 0x03: - $type = PHPExcel_Cell_DataValidation::TYPE_LIST; - break; - case 0x04: - $type = PHPExcel_Cell_DataValidation::TYPE_DATE; - break; - case 0x05: - $type = PHPExcel_Cell_DataValidation::TYPE_TIME; - break; - case 0x06: - $type = PHPExcel_Cell_DataValidation::TYPE_TEXTLENGTH; - break; - case 0x07: - $type = PHPExcel_Cell_DataValidation::TYPE_CUSTOM; - break; - } - - // bit: 4-6; mask: 0x00000070; error type - $errorStyle = (0x00000070 & $options) >> 4; - switch ($errorStyle) { - case 0x00: - $errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP; - break; - case 0x01: - $errorStyle = PHPExcel_Cell_DataValidation::STYLE_WARNING; - break; - case 0x02: - $errorStyle = PHPExcel_Cell_DataValidation::STYLE_INFORMATION; - break; - } - - // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list) - // I have only seen cases where this is 1 - $explicitFormula = (0x00000080 & $options) >> 7; - - // bit: 8; mask: 0x00000100; 1= empty cells allowed - $allowBlank = (0x00000100 & $options) >> 8; - - // bit: 9; mask: 0x00000200; 1= suppress drop down arrow in list type validity - $suppressDropDown = (0x00000200 & $options) >> 9; - - // bit: 18; mask: 0x00040000; 1= show prompt box if cell selected - $showInputMessage = (0x00040000 & $options) >> 18; - - // bit: 19; mask: 0x00080000; 1= show error box if invalid values entered - $showErrorMessage = (0x00080000 & $options) >> 19; - - // bit: 20-23; mask: 0x00F00000; condition operator - $operator = (0x00F00000 & $options) >> 20; - switch ($operator) { - case 0x00: - $operator = PHPExcel_Cell_DataValidation::OPERATOR_BETWEEN; - break; - case 0x01: - $operator = PHPExcel_Cell_DataValidation::OPERATOR_NOTBETWEEN; - break; - case 0x02: - $operator = PHPExcel_Cell_DataValidation::OPERATOR_EQUAL; - break; - case 0x03: - $operator = PHPExcel_Cell_DataValidation::OPERATOR_NOTEQUAL; - break; - case 0x04: - $operator = PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHAN; - break; - case 0x05: - $operator = PHPExcel_Cell_DataValidation::OPERATOR_LESSTHAN; - break; - case 0x06: - $operator = PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHANOREQUAL; - break; - case 0x07: - $operator = PHPExcel_Cell_DataValidation::OPERATOR_LESSTHANOREQUAL; - break; - } - - // offset: 4; size: var; title of the prompt box - $offset = 4; - $string = self::readUnicodeStringLong(substr($recordData, $offset)); - $promptTitle = $string['value'] !== chr(0) ? $string['value'] : ''; - $offset += $string['size']; - - // offset: var; size: var; title of the error box - $string = self::readUnicodeStringLong(substr($recordData, $offset)); - $errorTitle = $string['value'] !== chr(0) ? $string['value'] : ''; - $offset += $string['size']; - - // offset: var; size: var; text of the prompt box - $string = self::readUnicodeStringLong(substr($recordData, $offset)); - $prompt = $string['value'] !== chr(0) ? $string['value'] : ''; - $offset += $string['size']; - - // offset: var; size: var; text of the error box - $string = self::readUnicodeStringLong(substr($recordData, $offset)); - $error = $string['value'] !== chr(0) ? $string['value'] : ''; - $offset += $string['size']; - - // offset: var; size: 2; size of the formula data for the first condition - $sz1 = self::getInt2d($recordData, $offset); - $offset += 2; - - // offset: var; size: 2; not used - $offset += 2; - - // offset: var; size: $sz1; formula data for first condition (without size field) - $formula1 = substr($recordData, $offset, $sz1); - $formula1 = pack('v', $sz1) . $formula1; // prepend the length - try { - $formula1 = $this->getFormulaFromStructure($formula1); - - // in list type validity, null characters are used as item separators - if ($type == PHPExcel_Cell_DataValidation::TYPE_LIST) { - $formula1 = str_replace(chr(0), ',', $formula1); - } - } catch (PHPExcel_Exception $e) { - return; - } - $offset += $sz1; - - // offset: var; size: 2; size of the formula data for the first condition - $sz2 = self::getInt2d($recordData, $offset); - $offset += 2; - - // offset: var; size: 2; not used - $offset += 2; - - // offset: var; size: $sz2; formula data for second condition (without size field) - $formula2 = substr($recordData, $offset, $sz2); - $formula2 = pack('v', $sz2) . $formula2; // prepend the length - try { - $formula2 = $this->getFormulaFromStructure($formula2); - } catch (PHPExcel_Exception $e) { - return; - } - $offset += $sz2; - - // offset: var; size: var; cell range address list with - $cellRangeAddressList = $this->readBIFF8CellRangeAddressList(substr($recordData, $offset)); - $cellRangeAddresses = $cellRangeAddressList['cellRangeAddresses']; - - foreach ($cellRangeAddresses as $cellRange) { - $stRange = $this->phpSheet->shrinkRangeToFit($cellRange); - foreach (PHPExcel_Cell::extractAllCellReferencesInRange($stRange) as $coordinate) { - $objValidation = $this->phpSheet->getCell($coordinate)->getDataValidation(); - $objValidation->setType($type); - $objValidation->setErrorStyle($errorStyle); - $objValidation->setAllowBlank((bool)$allowBlank); - $objValidation->setShowInputMessage((bool)$showInputMessage); - $objValidation->setShowErrorMessage((bool)$showErrorMessage); - $objValidation->setShowDropDown(!$suppressDropDown); - $objValidation->setOperator($operator); - $objValidation->setErrorTitle($errorTitle); - $objValidation->setError($error); - $objValidation->setPromptTitle($promptTitle); - $objValidation->setPrompt($prompt); - $objValidation->setFormula1($formula1); - $objValidation->setFormula2($formula2); - } - } - } - - /** - * Read SHEETLAYOUT record. Stores sheet tab color information. - */ - private function readSheetLayout() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // local pointer in record data - $offset = 0; - - if (!$this->readDataOnly) { - // offset: 0; size: 2; repeated record identifier 0x0862 - - // offset: 2; size: 10; not used - - // offset: 12; size: 4; size of record data - // Excel 2003 uses size of 0x14 (documented), Excel 2007 uses size of 0x28 (not documented?) - $sz = self::getInt4d($recordData, 12); - - switch ($sz) { - case 0x14: - // offset: 16; size: 2; color index for sheet tab - $colorIndex = self::getInt2d($recordData, 16); - $color = PHPExcel_Reader_Excel5_Color::map($colorIndex, $this->palette, $this->version); - $this->phpSheet->getTabColor()->setRGB($color['rgb']); - break; - case 0x28: - // TODO: Investigate structure for .xls SHEETLAYOUT record as saved by MS Office Excel 2007 - return; - break; - } - } - } - - - /** - * Read SHEETPROTECTION record (FEATHEADR) - */ - private function readSheetProtection() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - if ($this->readDataOnly) { - return; - } - - // offset: 0; size: 2; repeated record header - - // offset: 2; size: 2; FRT cell reference flag (=0 currently) - - // offset: 4; size: 8; Currently not used and set to 0 - - // offset: 12; size: 2; Shared feature type index (2=Enhanced Protetion, 4=SmartTag) - $isf = self::getInt2d($recordData, 12); - if ($isf != 2) { - return; - } - - // offset: 14; size: 1; =1 since this is a feat header - - // offset: 15; size: 4; size of rgbHdrSData - - // rgbHdrSData, assume "Enhanced Protection" - // offset: 19; size: 2; option flags - $options = self::getInt2d($recordData, 19); - - // bit: 0; mask 0x0001; 1 = user may edit objects, 0 = users must not edit objects - $bool = (0x0001 & $options) >> 0; - $this->phpSheet->getProtection()->setObjects(!$bool); - - // bit: 1; mask 0x0002; edit scenarios - $bool = (0x0002 & $options) >> 1; - $this->phpSheet->getProtection()->setScenarios(!$bool); - - // bit: 2; mask 0x0004; format cells - $bool = (0x0004 & $options) >> 2; - $this->phpSheet->getProtection()->setFormatCells(!$bool); - - // bit: 3; mask 0x0008; format columns - $bool = (0x0008 & $options) >> 3; - $this->phpSheet->getProtection()->setFormatColumns(!$bool); - - // bit: 4; mask 0x0010; format rows - $bool = (0x0010 & $options) >> 4; - $this->phpSheet->getProtection()->setFormatRows(!$bool); - - // bit: 5; mask 0x0020; insert columns - $bool = (0x0020 & $options) >> 5; - $this->phpSheet->getProtection()->setInsertColumns(!$bool); - - // bit: 6; mask 0x0040; insert rows - $bool = (0x0040 & $options) >> 6; - $this->phpSheet->getProtection()->setInsertRows(!$bool); - - // bit: 7; mask 0x0080; insert hyperlinks - $bool = (0x0080 & $options) >> 7; - $this->phpSheet->getProtection()->setInsertHyperlinks(!$bool); - - // bit: 8; mask 0x0100; delete columns - $bool = (0x0100 & $options) >> 8; - $this->phpSheet->getProtection()->setDeleteColumns(!$bool); - - // bit: 9; mask 0x0200; delete rows - $bool = (0x0200 & $options) >> 9; - $this->phpSheet->getProtection()->setDeleteRows(!$bool); - - // bit: 10; mask 0x0400; select locked cells - $bool = (0x0400 & $options) >> 10; - $this->phpSheet->getProtection()->setSelectLockedCells(!$bool); - - // bit: 11; mask 0x0800; sort cell range - $bool = (0x0800 & $options) >> 11; - $this->phpSheet->getProtection()->setSort(!$bool); - - // bit: 12; mask 0x1000; auto filter - $bool = (0x1000 & $options) >> 12; - $this->phpSheet->getProtection()->setAutoFilter(!$bool); - - // bit: 13; mask 0x2000; pivot tables - $bool = (0x2000 & $options) >> 13; - $this->phpSheet->getProtection()->setPivotTables(!$bool); - - // bit: 14; mask 0x4000; select unlocked cells - $bool = (0x4000 & $options) >> 14; - $this->phpSheet->getProtection()->setSelectUnlockedCells(!$bool); - - // offset: 21; size: 2; not used - } - - - /** - * Read RANGEPROTECTION record - * Reading of this record is based on Microsoft Office Excel 97-2000 Binary File Format Specification, - * where it is referred to as FEAT record - */ - private function readRangeProtection() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // move stream pointer to next record - $this->pos += 4 + $length; - - // local pointer in record data - $offset = 0; - - if (!$this->readDataOnly) { - $offset += 12; - - // offset: 12; size: 2; shared feature type, 2 = enhanced protection, 4 = smart tag - $isf = self::getInt2d($recordData, 12); - if ($isf != 2) { - // we only read FEAT records of type 2 - return; - } - $offset += 2; - - $offset += 5; - - // offset: 19; size: 2; count of ref ranges this feature is on - $cref = self::getInt2d($recordData, 19); - $offset += 2; - - $offset += 6; - - // offset: 27; size: 8 * $cref; list of cell ranges (like in hyperlink record) - $cellRanges = array(); - for ($i = 0; $i < $cref; ++$i) { - try { - $cellRange = $this->readBIFF8CellRangeAddressFixed(substr($recordData, 27 + 8 * $i, 8)); - } catch (PHPExcel_Exception $e) { - return; - } - $cellRanges[] = $cellRange; - $offset += 8; - } - - // offset: var; size: var; variable length of feature specific data - $rgbFeat = substr($recordData, $offset); - $offset += 4; - - // offset: var; size: 4; the encrypted password (only 16-bit although field is 32-bit) - $wPassword = self::getInt4d($recordData, $offset); - $offset += 4; - - // Apply range protection to sheet - if ($cellRanges) { - $this->phpSheet->protectCells(implode(' ', $cellRanges), strtoupper(dechex($wPassword)), true); - } - } - } - - - /** - * Read IMDATA record - */ - private function readImData() - { - $length = self::getInt2d($this->data, $this->pos + 2); - - // get spliced record data - $splicedRecordData = $this->getSplicedRecordData(); - $recordData = $splicedRecordData['recordData']; - - // UNDER CONSTRUCTION - - // offset: 0; size: 2; image format - $cf = self::getInt2d($recordData, 0); - - // offset: 2; size: 2; environment from which the file was written - $env = self::getInt2d($recordData, 2); - - // offset: 4; size: 4; length of the image data - $lcb = self::getInt4d($recordData, 4); - - // offset: 8; size: var; image data - $iData = substr($recordData, 8); - - switch ($cf) { - case 0x09: // Windows bitmap format - // BITMAPCOREINFO - // 1. BITMAPCOREHEADER - // offset: 0; size: 4; bcSize, Specifies the number of bytes required by the structure - $bcSize = self::getInt4d($iData, 0); - // var_dump($bcSize); - - // offset: 4; size: 2; bcWidth, specifies the width of the bitmap, in pixels - $bcWidth = self::getInt2d($iData, 4); - // var_dump($bcWidth); - - // offset: 6; size: 2; bcHeight, specifies the height of the bitmap, in pixels. - $bcHeight = self::getInt2d($iData, 6); - // var_dump($bcHeight); - $ih = imagecreatetruecolor($bcWidth, $bcHeight); - - // offset: 8; size: 2; bcPlanes, specifies the number of planes for the target device. This value must be 1 - - // offset: 10; size: 2; bcBitCount specifies the number of bits-per-pixel. This value must be 1, 4, 8, or 24 - $bcBitCount = self::getInt2d($iData, 10); - // var_dump($bcBitCount); - - $rgbString = substr($iData, 12); - $rgbTriples = array(); - while (strlen($rgbString) > 0) { - $rgbTriples[] = unpack('Cb/Cg/Cr', $rgbString); - $rgbString = substr($rgbString, 3); - } - $x = 0; - $y = 0; - foreach ($rgbTriples as $i => $rgbTriple) { - $color = imagecolorallocate($ih, $rgbTriple['r'], $rgbTriple['g'], $rgbTriple['b']); - imagesetpixel($ih, $x, $bcHeight - 1 - $y, $color); - $x = ($x + 1) % $bcWidth; - $y = $y + floor(($x + 1) / $bcWidth); - } - //imagepng($ih, 'image.png'); - - $drawing = new PHPExcel_Worksheet_Drawing(); - $drawing->setPath($filename); - $drawing->setWorksheet($this->phpSheet); - break; - case 0x02: // Windows metafile or Macintosh PICT format - case 0x0e: // native format - default: - break; - } - - // getSplicedRecordData() takes care of moving current position in data stream - } - - - /** - * Read a free CONTINUE record. Free CONTINUE record may be a camouflaged MSODRAWING record - * When MSODRAWING data on a sheet exceeds 8224 bytes, CONTINUE records are used instead. Undocumented. - * In this case, we must treat the CONTINUE record as a MSODRAWING record - */ - private function readContinue() - { - $length = self::getInt2d($this->data, $this->pos + 2); - $recordData = $this->readRecordData($this->data, $this->pos + 4, $length); - - // check if we are reading drawing data - // this is in case a free CONTINUE record occurs in other circumstances we are unaware of - if ($this->drawingData == '') { - // move stream pointer to next record - $this->pos += 4 + $length; - - return; - } - - // check if record data is at least 4 bytes long, otherwise there is no chance this is MSODRAWING data - if ($length < 4) { - // move stream pointer to next record - $this->pos += 4 + $length; - - return; - } - - // dirty check to see if CONTINUE record could be a camouflaged MSODRAWING record - // look inside CONTINUE record to see if it looks like a part of an Escher stream - // we know that Escher stream may be split at least at - // 0xF003 MsofbtSpgrContainer - // 0xF004 MsofbtSpContainer - // 0xF00D MsofbtClientTextbox - $validSplitPoints = array(0xF003, 0xF004, 0xF00D); // add identifiers if we find more - - $splitPoint = self::getInt2d($recordData, 2); - if (in_array($splitPoint, $validSplitPoints)) { - // get spliced record data (and move pointer to next record) - $splicedRecordData = $this->getSplicedRecordData(); - $this->drawingData .= $splicedRecordData['recordData']; - - return; - } - - // move stream pointer to next record - $this->pos += 4 + $length; - } - - - /** - * Reads a record from current position in data stream and continues reading data as long as CONTINUE - * records are found. Splices the record data pieces and returns the combined string as if record data - * is in one piece. - * Moves to next current position in data stream to start of next record different from a CONtINUE record - * - * @return array - */ - private function getSplicedRecordData() - { - $data = ''; - $spliceOffsets = array(); - - $i = 0; - $spliceOffsets[0] = 0; - - do { - ++$i; - - // offset: 0; size: 2; identifier - $identifier = self::getInt2d($this->data, $this->pos); - // offset: 2; size: 2; length - $length = self::getInt2d($this->data, $this->pos + 2); - $data .= $this->readRecordData($this->data, $this->pos + 4, $length); - - $spliceOffsets[$i] = $spliceOffsets[$i - 1] + $length; - - $this->pos += 4 + $length; - $nextIdentifier = self::getInt2d($this->data, $this->pos); - } while ($nextIdentifier == self::XLS_TYPE_CONTINUE); - - $splicedData = array( - 'recordData' => $data, - 'spliceOffsets' => $spliceOffsets, - ); - - return $splicedData; - - } - - - /** - * Convert formula structure into human readable Excel formula like 'A3+A5*5' - * - * @param string $formulaStructure The complete binary data for the formula - * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas - * @return string Human readable formula - */ - private function getFormulaFromStructure($formulaStructure, $baseCell = 'A1') - { - // offset: 0; size: 2; size of the following formula data - $sz = self::getInt2d($formulaStructure, 0); - - // offset: 2; size: sz - $formulaData = substr($formulaStructure, 2, $sz); - - // for debug: dump the formula data - //echo ''; - //echo 'size: ' . $sz . "\n"; - //echo 'the entire formula data: '; - //Debug::dump($formulaData); - //echo "\n----\n"; - - // offset: 2 + sz; size: variable (optional) - if (strlen($formulaStructure) > 2 + $sz) { - $additionalData = substr($formulaStructure, 2 + $sz); - - // for debug: dump the additional data - //echo 'the entire additional data: '; - //Debug::dump($additionalData); - //echo "\n----\n"; - } else { - $additionalData = ''; - } - - return $this->getFormulaFromData($formulaData, $additionalData, $baseCell); - } - - - /** - * Take formula data and additional data for formula and return human readable formula - * - * @param string $formulaData The binary data for the formula itself - * @param string $additionalData Additional binary data going with the formula - * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas - * @return string Human readable formula - */ - private function getFormulaFromData($formulaData, $additionalData = '', $baseCell = 'A1') - { - // start parsing the formula data - $tokens = array(); - - while (strlen($formulaData) > 0 and $token = $this->getNextToken($formulaData, $baseCell)) { - $tokens[] = $token; - $formulaData = substr($formulaData, $token['size']); - - // for debug: dump the token - //var_dump($token); - } - - $formulaString = $this->createFormulaFromTokens($tokens, $additionalData); - - return $formulaString; - } - - - /** - * Take array of tokens together with additional data for formula and return human readable formula - * - * @param array $tokens - * @param array $additionalData Additional binary data going with the formula - * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas - * @return string Human readable formula - */ - private function createFormulaFromTokens($tokens, $additionalData) - { - // empty formula? - if (empty($tokens)) { - return ''; - } - - $formulaStrings = array(); - foreach ($tokens as $token) { - // initialize spaces - $space0 = isset($space0) ? $space0 : ''; // spaces before next token, not tParen - $space1 = isset($space1) ? $space1 : ''; // carriage returns before next token, not tParen - $space2 = isset($space2) ? $space2 : ''; // spaces before opening parenthesis - $space3 = isset($space3) ? $space3 : ''; // carriage returns before opening parenthesis - $space4 = isset($space4) ? $space4 : ''; // spaces before closing parenthesis - $space5 = isset($space5) ? $space5 : ''; // carriage returns before closing parenthesis - - switch ($token['name']) { - case 'tAdd': // addition - case 'tConcat': // addition - case 'tDiv': // division - case 'tEQ': // equality - case 'tGE': // greater than or equal - case 'tGT': // greater than - case 'tIsect': // intersection - case 'tLE': // less than or equal - case 'tList': // less than or equal - case 'tLT': // less than - case 'tMul': // multiplication - case 'tNE': // multiplication - case 'tPower': // power - case 'tRange': // range - case 'tSub': // subtraction - $op2 = array_pop($formulaStrings); - $op1 = array_pop($formulaStrings); - $formulaStrings[] = "$op1$space1$space0{$token['data']}$op2"; - unset($space0, $space1); - break; - case 'tUplus': // unary plus - case 'tUminus': // unary minus - $op = array_pop($formulaStrings); - $formulaStrings[] = "$space1$space0{$token['data']}$op"; - unset($space0, $space1); - break; - case 'tPercent': // percent sign - $op = array_pop($formulaStrings); - $formulaStrings[] = "$op$space1$space0{$token['data']}"; - unset($space0, $space1); - break; - case 'tAttrVolatile': // indicates volatile function - case 'tAttrIf': - case 'tAttrSkip': - case 'tAttrChoose': - // token is only important for Excel formula evaluator - // do nothing - break; - case 'tAttrSpace': // space / carriage return - // space will be used when next token arrives, do not alter formulaString stack - switch ($token['data']['spacetype']) { - case 'type0': - $space0 = str_repeat(' ', $token['data']['spacecount']); - break; - case 'type1': - $space1 = str_repeat("\n", $token['data']['spacecount']); - break; - case 'type2': - $space2 = str_repeat(' ', $token['data']['spacecount']); - break; - case 'type3': - $space3 = str_repeat("\n", $token['data']['spacecount']); - break; - case 'type4': - $space4 = str_repeat(' ', $token['data']['spacecount']); - break; - case 'type5': - $space5 = str_repeat("\n", $token['data']['spacecount']); - break; - } - break; - case 'tAttrSum': // SUM function with one parameter - $op = array_pop($formulaStrings); - $formulaStrings[] = "{$space1}{$space0}SUM($op)"; - unset($space0, $space1); - break; - case 'tFunc': // function with fixed number of arguments - case 'tFuncV': // function with variable number of arguments - if ($token['data']['function'] != '') { - // normal function - $ops = array(); // array of operators - for ($i = 0; $i < $token['data']['args']; ++$i) { - $ops[] = array_pop($formulaStrings); - } - $ops = array_reverse($ops); - $formulaStrings[] = "$space1$space0{$token['data']['function']}(" . implode(',', $ops) . ")"; - unset($space0, $space1); - } else { - // add-in function - $ops = array(); // array of operators - for ($i = 0; $i < $token['data']['args'] - 1; ++$i) { - $ops[] = array_pop($formulaStrings); - } - $ops = array_reverse($ops); - $function = array_pop($formulaStrings); - $formulaStrings[] = "$space1$space0$function(" . implode(',', $ops) . ")"; - unset($space0, $space1); - } - break; - case 'tParen': // parenthesis - $expression = array_pop($formulaStrings); - $formulaStrings[] = "$space3$space2($expression$space5$space4)"; - unset($space2, $space3, $space4, $space5); - break; - case 'tArray': // array constant - $constantArray = self::readBIFF8ConstantArray($additionalData); - $formulaStrings[] = $space1 . $space0 . $constantArray['value']; - $additionalData = substr($additionalData, $constantArray['size']); // bite of chunk of additional data - unset($space0, $space1); - break; - case 'tMemArea': - // bite off chunk of additional data - $cellRangeAddressList = $this->readBIFF8CellRangeAddressList($additionalData); - $additionalData = substr($additionalData, $cellRangeAddressList['size']); - $formulaStrings[] = "$space1$space0{$token['data']}"; - unset($space0, $space1); - break; - case 'tArea': // cell range address - case 'tBool': // boolean - case 'tErr': // error code - case 'tInt': // integer - case 'tMemErr': - case 'tMemFunc': - case 'tMissArg': - case 'tName': - case 'tNameX': - case 'tNum': // number - case 'tRef': // single cell reference - case 'tRef3d': // 3d cell reference - case 'tArea3d': // 3d cell range reference - case 'tRefN': - case 'tAreaN': - case 'tStr': // string - $formulaStrings[] = "$space1$space0{$token['data']}"; - unset($space0, $space1); - break; - } - } - $formulaString = $formulaStrings[0]; - - // for debug: dump the human readable formula - //echo '----' . "\n"; - //echo 'Formula: ' . $formulaString; - - return $formulaString; - } - - - /** - * Fetch next token from binary formula data - * - * @param string Formula data - * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas - * @return array - * @throws PHPExcel_Reader_Exception - */ - private function getNextToken($formulaData, $baseCell = 'A1') - { - // offset: 0; size: 1; token id - $id = ord($formulaData[0]); // token id - $name = false; // initialize token name - - switch ($id) { - case 0x03: - $name = 'tAdd'; - $size = 1; - $data = '+'; - break; - case 0x04: - $name = 'tSub'; - $size = 1; - $data = '-'; - break; - case 0x05: - $name = 'tMul'; - $size = 1; - $data = '*'; - break; - case 0x06: - $name = 'tDiv'; - $size = 1; - $data = '/'; - break; - case 0x07: - $name = 'tPower'; - $size = 1; - $data = '^'; - break; - case 0x08: - $name = 'tConcat'; - $size = 1; - $data = '&'; - break; - case 0x09: - $name = 'tLT'; - $size = 1; - $data = '<'; - break; - case 0x0A: - $name = 'tLE'; - $size = 1; - $data = '<='; - break; - case 0x0B: - $name = 'tEQ'; - $size = 1; - $data = '='; - break; - case 0x0C: - $name = 'tGE'; - $size = 1; - $data = '>='; - break; - case 0x0D: - $name = 'tGT'; - $size = 1; - $data = '>'; - break; - case 0x0E: - $name = 'tNE'; - $size = 1; - $data = '<>'; - break; - case 0x0F: - $name = 'tIsect'; - $size = 1; - $data = ' '; - break; - case 0x10: - $name = 'tList'; - $size = 1; - $data = ','; - break; - case 0x11: - $name = 'tRange'; - $size = 1; - $data = ':'; - break; - case 0x12: - $name = 'tUplus'; - $size = 1; - $data = '+'; - break; - case 0x13: - $name = 'tUminus'; - $size = 1; - $data = '-'; - break; - case 0x14: - $name = 'tPercent'; - $size = 1; - $data = '%'; - break; - case 0x15: // parenthesis - $name = 'tParen'; - $size = 1; - $data = null; - break; - case 0x16: // missing argument - $name = 'tMissArg'; - $size = 1; - $data = ''; - break; - case 0x17: // string - $name = 'tStr'; - // offset: 1; size: var; Unicode string, 8-bit string length - $string = self::readUnicodeStringShort(substr($formulaData, 1)); - $size = 1 + $string['size']; - $data = self::UTF8toExcelDoubleQuoted($string['value']); - break; - case 0x19: // Special attribute - // offset: 1; size: 1; attribute type flags: - switch (ord($formulaData[1])) { - case 0x01: - $name = 'tAttrVolatile'; - $size = 4; - $data = null; - break; - case 0x02: - $name = 'tAttrIf'; - $size = 4; - $data = null; - break; - case 0x04: - $name = 'tAttrChoose'; - // offset: 2; size: 2; number of choices in the CHOOSE function ($nc, number of parameters decreased by 1) - $nc = self::getInt2d($formulaData, 2); - // offset: 4; size: 2 * $nc - // offset: 4 + 2 * $nc; size: 2 - $size = 2 * $nc + 6; - $data = null; - break; - case 0x08: - $name = 'tAttrSkip'; - $size = 4; - $data = null; - break; - case 0x10: - $name = 'tAttrSum'; - $size = 4; - $data = null; - break; - case 0x40: - case 0x41: - $name = 'tAttrSpace'; - $size = 4; - // offset: 2; size: 2; space type and position - switch (ord($formulaData[2])) { - case 0x00: - $spacetype = 'type0'; - break; - case 0x01: - $spacetype = 'type1'; - break; - case 0x02: - $spacetype = 'type2'; - break; - case 0x03: - $spacetype = 'type3'; - break; - case 0x04: - $spacetype = 'type4'; - break; - case 0x05: - $spacetype = 'type5'; - break; - default: - throw new PHPExcel_Reader_Exception('Unrecognized space type in tAttrSpace token'); - break; - } - // offset: 3; size: 1; number of inserted spaces/carriage returns - $spacecount = ord($formulaData[3]); - - $data = array('spacetype' => $spacetype, 'spacecount' => $spacecount); - break; - default: - throw new PHPExcel_Reader_Exception('Unrecognized attribute flag in tAttr token'); - break; - } - break; - case 0x1C: // error code - // offset: 1; size: 1; error code - $name = 'tErr'; - $size = 2; - $data = PHPExcel_Reader_Excel5_ErrorCode::lookup(ord($formulaData[1])); - break; - case 0x1D: // boolean - // offset: 1; size: 1; 0 = false, 1 = true; - $name = 'tBool'; - $size = 2; - $data = ord($formulaData[1]) ? 'TRUE' : 'FALSE'; - break; - case 0x1E: // integer - // offset: 1; size: 2; unsigned 16-bit integer - $name = 'tInt'; - $size = 3; - $data = self::getInt2d($formulaData, 1); - break; - case 0x1F: // number - // offset: 1; size: 8; - $name = 'tNum'; - $size = 9; - $data = self::extractNumber(substr($formulaData, 1)); - $data = str_replace(',', '.', (string)$data); // in case non-English locale - break; - case 0x20: // array constant - case 0x40: - case 0x60: - // offset: 1; size: 7; not used - $name = 'tArray'; - $size = 8; - $data = null; - break; - case 0x21: // function with fixed number of arguments - case 0x41: - case 0x61: - $name = 'tFunc'; - $size = 3; - // offset: 1; size: 2; index to built-in sheet function - switch (self::getInt2d($formulaData, 1)) { - case 2: - $function = 'ISNA'; - $args = 1; - break; - case 3: - $function = 'ISERROR'; - $args = 1; - break; - case 10: - $function = 'NA'; - $args = 0; - break; - case 15: - $function = 'SIN'; - $args = 1; - break; - case 16: - $function = 'COS'; - $args = 1; - break; - case 17: - $function = 'TAN'; - $args = 1; - break; - case 18: - $function = 'ATAN'; - $args = 1; - break; - case 19: - $function = 'PI'; - $args = 0; - break; - case 20: - $function = 'SQRT'; - $args = 1; - break; - case 21: - $function = 'EXP'; - $args = 1; - break; - case 22: - $function = 'LN'; - $args = 1; - break; - case 23: - $function = 'LOG10'; - $args = 1; - break; - case 24: - $function = 'ABS'; - $args = 1; - break; - case 25: - $function = 'INT'; - $args = 1; - break; - case 26: - $function = 'SIGN'; - $args = 1; - break; - case 27: - $function = 'ROUND'; - $args = 2; - break; - case 30: - $function = 'REPT'; - $args = 2; - break; - case 31: - $function = 'MID'; - $args = 3; - break; - case 32: - $function = 'LEN'; - $args = 1; - break; - case 33: - $function = 'VALUE'; - $args = 1; - break; - case 34: - $function = 'TRUE'; - $args = 0; - break; - case 35: - $function = 'FALSE'; - $args = 0; - break; - case 38: - $function = 'NOT'; - $args = 1; - break; - case 39: - $function = 'MOD'; - $args = 2; - break; - case 40: - $function = 'DCOUNT'; - $args = 3; - break; - case 41: - $function = 'DSUM'; - $args = 3; - break; - case 42: - $function = 'DAVERAGE'; - $args = 3; - break; - case 43: - $function = 'DMIN'; - $args = 3; - break; - case 44: - $function = 'DMAX'; - $args = 3; - break; - case 45: - $function = 'DSTDEV'; - $args = 3; - break; - case 48: - $function = 'TEXT'; - $args = 2; - break; - case 61: - $function = 'MIRR'; - $args = 3; - break; - case 63: - $function = 'RAND'; - $args = 0; - break; - case 65: - $function = 'DATE'; - $args = 3; - break; - case 66: - $function = 'TIME'; - $args = 3; - break; - case 67: - $function = 'DAY'; - $args = 1; - break; - case 68: - $function = 'MONTH'; - $args = 1; - break; - case 69: - $function = 'YEAR'; - $args = 1; - break; - case 71: - $function = 'HOUR'; - $args = 1; - break; - case 72: - $function = 'MINUTE'; - $args = 1; - break; - case 73: - $function = 'SECOND'; - $args = 1; - break; - case 74: - $function = 'NOW'; - $args = 0; - break; - case 75: - $function = 'AREAS'; - $args = 1; - break; - case 76: - $function = 'ROWS'; - $args = 1; - break; - case 77: - $function = 'COLUMNS'; - $args = 1; - break; - case 83: - $function = 'TRANSPOSE'; - $args = 1; - break; - case 86: - $function = 'TYPE'; - $args = 1; - break; - case 97: - $function = 'ATAN2'; - $args = 2; - break; - case 98: - $function = 'ASIN'; - $args = 1; - break; - case 99: - $function = 'ACOS'; - $args = 1; - break; - case 105: - $function = 'ISREF'; - $args = 1; - break; - case 111: - $function = 'CHAR'; - $args = 1; - break; - case 112: - $function = 'LOWER'; - $args = 1; - break; - case 113: - $function = 'UPPER'; - $args = 1; - break; - case 114: - $function = 'PROPER'; - $args = 1; - break; - case 117: - $function = 'EXACT'; - $args = 2; - break; - case 118: - $function = 'TRIM'; - $args = 1; - break; - case 119: - $function = 'REPLACE'; - $args = 4; - break; - case 121: - $function = 'CODE'; - $args = 1; - break; - case 126: - $function = 'ISERR'; - $args = 1; - break; - case 127: - $function = 'ISTEXT'; - $args = 1; - break; - case 128: - $function = 'ISNUMBER'; - $args = 1; - break; - case 129: - $function = 'ISBLANK'; - $args = 1; - break; - case 130: - $function = 'T'; - $args = 1; - break; - case 131: - $function = 'N'; - $args = 1; - break; - case 140: - $function = 'DATEVALUE'; - $args = 1; - break; - case 141: - $function = 'TIMEVALUE'; - $args = 1; - break; - case 142: - $function = 'SLN'; - $args = 3; - break; - case 143: - $function = 'SYD'; - $args = 4; - break; - case 162: - $function = 'CLEAN'; - $args = 1; - break; - case 163: - $function = 'MDETERM'; - $args = 1; - break; - case 164: - $function = 'MINVERSE'; - $args = 1; - break; - case 165: - $function = 'MMULT'; - $args = 2; - break; - case 184: - $function = 'FACT'; - $args = 1; - break; - case 189: - $function = 'DPRODUCT'; - $args = 3; - break; - case 190: - $function = 'ISNONTEXT'; - $args = 1; - break; - case 195: - $function = 'DSTDEVP'; - $args = 3; - break; - case 196: - $function = 'DVARP'; - $args = 3; - break; - case 198: - $function = 'ISLOGICAL'; - $args = 1; - break; - case 199: - $function = 'DCOUNTA'; - $args = 3; - break; - case 207: - $function = 'REPLACEB'; - $args = 4; - break; - case 210: - $function = 'MIDB'; - $args = 3; - break; - case 211: - $function = 'LENB'; - $args = 1; - break; - case 212: - $function = 'ROUNDUP'; - $args = 2; - break; - case 213: - $function = 'ROUNDDOWN'; - $args = 2; - break; - case 214: - $function = 'ASC'; - $args = 1; - break; - case 215: - $function = 'DBCS'; - $args = 1; - break; - case 221: - $function = 'TODAY'; - $args = 0; - break; - case 229: - $function = 'SINH'; - $args = 1; - break; - case 230: - $function = 'COSH'; - $args = 1; - break; - case 231: - $function = 'TANH'; - $args = 1; - break; - case 232: - $function = 'ASINH'; - $args = 1; - break; - case 233: - $function = 'ACOSH'; - $args = 1; - break; - case 234: - $function = 'ATANH'; - $args = 1; - break; - case 235: - $function = 'DGET'; - $args = 3; - break; - case 244: - $function = 'INFO'; - $args = 1; - break; - case 252: - $function = 'FREQUENCY'; - $args = 2; - break; - case 261: - $function = 'ERROR.TYPE'; - $args = 1; - break; - case 271: - $function = 'GAMMALN'; - $args = 1; - break; - case 273: - $function = 'BINOMDIST'; - $args = 4; - break; - case 274: - $function = 'CHIDIST'; - $args = 2; - break; - case 275: - $function = 'CHIINV'; - $args = 2; - break; - case 276: - $function = 'COMBIN'; - $args = 2; - break; - case 277: - $function = 'CONFIDENCE'; - $args = 3; - break; - case 278: - $function = 'CRITBINOM'; - $args = 3; - break; - case 279: - $function = 'EVEN'; - $args = 1; - break; - case 280: - $function = 'EXPONDIST'; - $args = 3; - break; - case 281: - $function = 'FDIST'; - $args = 3; - break; - case 282: - $function = 'FINV'; - $args = 3; - break; - case 283: - $function = 'FISHER'; - $args = 1; - break; - case 284: - $function = 'FISHERINV'; - $args = 1; - break; - case 285: - $function = 'FLOOR'; - $args = 2; - break; - case 286: - $function = 'GAMMADIST'; - $args = 4; - break; - case 287: - $function = 'GAMMAINV'; - $args = 3; - break; - case 288: - $function = 'CEILING'; - $args = 2; - break; - case 289: - $function = 'HYPGEOMDIST'; - $args = 4; - break; - case 290: - $function = 'LOGNORMDIST'; - $args = 3; - break; - case 291: - $function = 'LOGINV'; - $args = 3; - break; - case 292: - $function = 'NEGBINOMDIST'; - $args = 3; - break; - case 293: - $function = 'NORMDIST'; - $args = 4; - break; - case 294: - $function = 'NORMSDIST'; - $args = 1; - break; - case 295: - $function = 'NORMINV'; - $args = 3; - break; - case 296: - $function = 'NORMSINV'; - $args = 1; - break; - case 297: - $function = 'STANDARDIZE'; - $args = 3; - break; - case 298: - $function = 'ODD'; - $args = 1; - break; - case 299: - $function = 'PERMUT'; - $args = 2; - break; - case 300: - $function = 'POISSON'; - $args = 3; - break; - case 301: - $function = 'TDIST'; - $args = 3; - break; - case 302: - $function = 'WEIBULL'; - $args = 4; - break; - case 303: - $function = 'SUMXMY2'; - $args = 2; - break; - case 304: - $function = 'SUMX2MY2'; - $args = 2; - break; - case 305: - $function = 'SUMX2PY2'; - $args = 2; - break; - case 306: - $function = 'CHITEST'; - $args = 2; - break; - case 307: - $function = 'CORREL'; - $args = 2; - break; - case 308: - $function = 'COVAR'; - $args = 2; - break; - case 309: - $function = 'FORECAST'; - $args = 3; - break; - case 310: - $function = 'FTEST'; - $args = 2; - break; - case 311: - $function = 'INTERCEPT'; - $args = 2; - break; - case 312: - $function = 'PEARSON'; - $args = 2; - break; - case 313: - $function = 'RSQ'; - $args = 2; - break; - case 314: - $function = 'STEYX'; - $args = 2; - break; - case 315: - $function = 'SLOPE'; - $args = 2; - break; - case 316: - $function = 'TTEST'; - $args = 4; - break; - case 325: - $function = 'LARGE'; - $args = 2; - break; - case 326: - $function = 'SMALL'; - $args = 2; - break; - case 327: - $function = 'QUARTILE'; - $args = 2; - break; - case 328: - $function = 'PERCENTILE'; - $args = 2; - break; - case 331: - $function = 'TRIMMEAN'; - $args = 2; - break; - case 332: - $function = 'TINV'; - $args = 2; - break; - case 337: - $function = 'POWER'; - $args = 2; - break; - case 342: - $function = 'RADIANS'; - $args = 1; - break; - case 343: - $function = 'DEGREES'; - $args = 1; - break; - case 346: - $function = 'COUNTIF'; - $args = 2; - break; - case 347: - $function = 'COUNTBLANK'; - $args = 1; - break; - case 350: - $function = 'ISPMT'; - $args = 4; - break; - case 351: - $function = 'DATEDIF'; - $args = 3; - break; - case 352: - $function = 'DATESTRING'; - $args = 1; - break; - case 353: - $function = 'NUMBERSTRING'; - $args = 2; - break; - case 360: - $function = 'PHONETIC'; - $args = 1; - break; - case 368: - $function = 'BAHTTEXT'; - $args = 1; - break; - default: - throw new PHPExcel_Reader_Exception('Unrecognized function in formula'); - break; - } - $data = array('function' => $function, 'args' => $args); - break; - case 0x22: // function with variable number of arguments - case 0x42: - case 0x62: - $name = 'tFuncV'; - $size = 4; - // offset: 1; size: 1; number of arguments - $args = ord($formulaData[1]); - // offset: 2: size: 2; index to built-in sheet function - $index = self::getInt2d($formulaData, 2); - switch ($index) { - case 0: - $function = 'COUNT'; - break; - case 1: - $function = 'IF'; - break; - case 4: - $function = 'SUM'; - break; - case 5: - $function = 'AVERAGE'; - break; - case 6: - $function = 'MIN'; - break; - case 7: - $function = 'MAX'; - break; - case 8: - $function = 'ROW'; - break; - case 9: - $function = 'COLUMN'; - break; - case 11: - $function = 'NPV'; - break; - case 12: - $function = 'STDEV'; - break; - case 13: - $function = 'DOLLAR'; - break; - case 14: - $function = 'FIXED'; - break; - case 28: - $function = 'LOOKUP'; - break; - case 29: - $function = 'INDEX'; - break; - case 36: - $function = 'AND'; - break; - case 37: - $function = 'OR'; - break; - case 46: - $function = 'VAR'; - break; - case 49: - $function = 'LINEST'; - break; - case 50: - $function = 'TREND'; - break; - case 51: - $function = 'LOGEST'; - break; - case 52: - $function = 'GROWTH'; - break; - case 56: - $function = 'PV'; - break; - case 57: - $function = 'FV'; - break; - case 58: - $function = 'NPER'; - break; - case 59: - $function = 'PMT'; - break; - case 60: - $function = 'RATE'; - break; - case 62: - $function = 'IRR'; - break; - case 64: - $function = 'MATCH'; - break; - case 70: - $function = 'WEEKDAY'; - break; - case 78: - $function = 'OFFSET'; - break; - case 82: - $function = 'SEARCH'; - break; - case 100: - $function = 'CHOOSE'; - break; - case 101: - $function = 'HLOOKUP'; - break; - case 102: - $function = 'VLOOKUP'; - break; - case 109: - $function = 'LOG'; - break; - case 115: - $function = 'LEFT'; - break; - case 116: - $function = 'RIGHT'; - break; - case 120: - $function = 'SUBSTITUTE'; - break; - case 124: - $function = 'FIND'; - break; - case 125: - $function = 'CELL'; - break; - case 144: - $function = 'DDB'; - break; - case 148: - $function = 'INDIRECT'; - break; - case 167: - $function = 'IPMT'; - break; - case 168: - $function = 'PPMT'; - break; - case 169: - $function = 'COUNTA'; - break; - case 183: - $function = 'PRODUCT'; - break; - case 193: - $function = 'STDEVP'; - break; - case 194: - $function = 'VARP'; - break; - case 197: - $function = 'TRUNC'; - break; - case 204: - $function = 'USDOLLAR'; - break; - case 205: - $function = 'FINDB'; - break; - case 206: - $function = 'SEARCHB'; - break; - case 208: - $function = 'LEFTB'; - break; - case 209: - $function = 'RIGHTB'; - break; - case 216: - $function = 'RANK'; - break; - case 219: - $function = 'ADDRESS'; - break; - case 220: - $function = 'DAYS360'; - break; - case 222: - $function = 'VDB'; - break; - case 227: - $function = 'MEDIAN'; - break; - case 228: - $function = 'SUMPRODUCT'; - break; - case 247: - $function = 'DB'; - break; - case 255: - $function = ''; - break; - case 269: - $function = 'AVEDEV'; - break; - case 270: - $function = 'BETADIST'; - break; - case 272: - $function = 'BETAINV'; - break; - case 317: - $function = 'PROB'; - break; - case 318: - $function = 'DEVSQ'; - break; - case 319: - $function = 'GEOMEAN'; - break; - case 320: - $function = 'HARMEAN'; - break; - case 321: - $function = 'SUMSQ'; - break; - case 322: - $function = 'KURT'; - break; - case 323: - $function = 'SKEW'; - break; - case 324: - $function = 'ZTEST'; - break; - case 329: - $function = 'PERCENTRANK'; - break; - case 330: - $function = 'MODE'; - break; - case 336: - $function = 'CONCATENATE'; - break; - case 344: - $function = 'SUBTOTAL'; - break; - case 345: - $function = 'SUMIF'; - break; - case 354: - $function = 'ROMAN'; - break; - case 358: - $function = 'GETPIVOTDATA'; - break; - case 359: - $function = 'HYPERLINK'; - break; - case 361: - $function = 'AVERAGEA'; - break; - case 362: - $function = 'MAXA'; - break; - case 363: - $function = 'MINA'; - break; - case 364: - $function = 'STDEVPA'; - break; - case 365: - $function = 'VARPA'; - break; - case 366: - $function = 'STDEVA'; - break; - case 367: - $function = 'VARA'; - break; - default: - throw new PHPExcel_Reader_Exception('Unrecognized function in formula'); - break; - } - $data = array('function' => $function, 'args' => $args); - break; - case 0x23: // index to defined name - case 0x43: - case 0x63: - $name = 'tName'; - $size = 5; - // offset: 1; size: 2; one-based index to definedname record - $definedNameIndex = self::getInt2d($formulaData, 1) - 1; - // offset: 2; size: 2; not used - $data = $this->definedname[$definedNameIndex]['name']; - break; - case 0x24: // single cell reference e.g. A5 - case 0x44: - case 0x64: - $name = 'tRef'; - $size = 5; - $data = $this->readBIFF8CellAddress(substr($formulaData, 1, 4)); - break; - case 0x25: // cell range reference to cells in the same sheet (2d) - case 0x45: - case 0x65: - $name = 'tArea'; - $size = 9; - $data = $this->readBIFF8CellRangeAddress(substr($formulaData, 1, 8)); - break; - case 0x26: // Constant reference sub-expression - case 0x46: - case 0x66: - $name = 'tMemArea'; - // offset: 1; size: 4; not used - // offset: 5; size: 2; size of the following subexpression - $subSize = self::getInt2d($formulaData, 5); - $size = 7 + $subSize; - $data = $this->getFormulaFromData(substr($formulaData, 7, $subSize)); - break; - case 0x27: // Deleted constant reference sub-expression - case 0x47: - case 0x67: - $name = 'tMemErr'; - // offset: 1; size: 4; not used - // offset: 5; size: 2; size of the following subexpression - $subSize = self::getInt2d($formulaData, 5); - $size = 7 + $subSize; - $data = $this->getFormulaFromData(substr($formulaData, 7, $subSize)); - break; - case 0x29: // Variable reference sub-expression - case 0x49: - case 0x69: - $name = 'tMemFunc'; - // offset: 1; size: 2; size of the following sub-expression - $subSize = self::getInt2d($formulaData, 1); - $size = 3 + $subSize; - $data = $this->getFormulaFromData(substr($formulaData, 3, $subSize)); - break; - case 0x2C: // Relative 2d cell reference reference, used in shared formulas and some other places - case 0x4C: - case 0x6C: - $name = 'tRefN'; - $size = 5; - $data = $this->readBIFF8CellAddressB(substr($formulaData, 1, 4), $baseCell); - break; - case 0x2D: // Relative 2d range reference - case 0x4D: - case 0x6D: - $name = 'tAreaN'; - $size = 9; - $data = $this->readBIFF8CellRangeAddressB(substr($formulaData, 1, 8), $baseCell); - break; - case 0x39: // External name - case 0x59: - case 0x79: - $name = 'tNameX'; - $size = 7; - // offset: 1; size: 2; index to REF entry in EXTERNSHEET record - // offset: 3; size: 2; one-based index to DEFINEDNAME or EXTERNNAME record - $index = self::getInt2d($formulaData, 3); - // assume index is to EXTERNNAME record - $data = $this->externalNames[$index - 1]['name']; - // offset: 5; size: 2; not used - break; - case 0x3A: // 3d reference to cell - case 0x5A: - case 0x7A: - $name = 'tRef3d'; - $size = 7; - - try { - // offset: 1; size: 2; index to REF entry - $sheetRange = $this->readSheetRangeByRefIndex(self::getInt2d($formulaData, 1)); - // offset: 3; size: 4; cell address - $cellAddress = $this->readBIFF8CellAddress(substr($formulaData, 3, 4)); - - $data = "$sheetRange!$cellAddress"; - } catch (PHPExcel_Exception $e) { - // deleted sheet reference - $data = '#REF!'; - } - break; - case 0x3B: // 3d reference to cell range - case 0x5B: - case 0x7B: - $name = 'tArea3d'; - $size = 11; - - try { - // offset: 1; size: 2; index to REF entry - $sheetRange = $this->readSheetRangeByRefIndex(self::getInt2d($formulaData, 1)); - // offset: 3; size: 8; cell address - $cellRangeAddress = $this->readBIFF8CellRangeAddress(substr($formulaData, 3, 8)); - - $data = "$sheetRange!$cellRangeAddress"; - } catch (PHPExcel_Exception $e) { - // deleted sheet reference - $data = '#REF!'; - } - break; - // Unknown cases // don't know how to deal with - default: - throw new PHPExcel_Reader_Exception('Unrecognized token ' . sprintf('%02X', $id) . ' in formula'); - break; - } - - return array( - 'id' => $id, - 'name' => $name, - 'size' => $size, - 'data' => $data, - ); - } - - - /** - * Reads a cell address in BIFF8 e.g. 'A2' or '$A$2' - * section 3.3.4 - * - * @param string $cellAddressStructure - * @return string - */ - private function readBIFF8CellAddress($cellAddressStructure) - { - // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767)) - $row = self::getInt2d($cellAddressStructure, 0) + 1; - - // offset: 2; size: 2; index to column or column offset + relative flags - // bit: 7-0; mask 0x00FF; column index - $column = PHPExcel_Cell::stringFromColumnIndex(0x00FF & self::getInt2d($cellAddressStructure, 2)); - - // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) - if (!(0x4000 & self::getInt2d($cellAddressStructure, 2))) { - $column = '$' . $column; - } - // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) - if (!(0x8000 & self::getInt2d($cellAddressStructure, 2))) { - $row = '$' . $row; - } - - return $column . $row; - } - - - /** - * Reads a cell address in BIFF8 for shared formulas. Uses positive and negative values for row and column - * to indicate offsets from a base cell - * section 3.3.4 - * - * @param string $cellAddressStructure - * @param string $baseCell Base cell, only needed when formula contains tRefN tokens, e.g. with shared formulas - * @return string - */ - private function readBIFF8CellAddressB($cellAddressStructure, $baseCell = 'A1') - { - list($baseCol, $baseRow) = PHPExcel_Cell::coordinateFromString($baseCell); - $baseCol = PHPExcel_Cell::columnIndexFromString($baseCol) - 1; - - // offset: 0; size: 2; index to row (0... 65535) (or offset (-32768... 32767)) - $rowIndex = self::getInt2d($cellAddressStructure, 0); - $row = self::getInt2d($cellAddressStructure, 0) + 1; - - // offset: 2; size: 2; index to column or column offset + relative flags - // bit: 7-0; mask 0x00FF; column index - $colIndex = 0x00FF & self::getInt2d($cellAddressStructure, 2); - - // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) - if (!(0x4000 & self::getInt2d($cellAddressStructure, 2))) { - $column = PHPExcel_Cell::stringFromColumnIndex($colIndex); - $column = '$' . $column; - } else { - $colIndex = ($colIndex <= 127) ? $colIndex : $colIndex - 256; - $column = PHPExcel_Cell::stringFromColumnIndex($baseCol + $colIndex); - } - - // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) - if (!(0x8000 & self::getInt2d($cellAddressStructure, 2))) { - $row = '$' . $row; - } else { - $rowIndex = ($rowIndex <= 32767) ? $rowIndex : $rowIndex - 65536; - $row = $baseRow + $rowIndex; - } - - return $column . $row; - } - - - /** - * Reads a cell range address in BIFF5 e.g. 'A2:B6' or 'A1' - * always fixed range - * section 2.5.14 - * - * @param string $subData - * @return string - * @throws PHPExcel_Reader_Exception - */ - private function readBIFF5CellRangeAddressFixed($subData) - { - // offset: 0; size: 2; index to first row - $fr = self::getInt2d($subData, 0) + 1; - - // offset: 2; size: 2; index to last row - $lr = self::getInt2d($subData, 2) + 1; - - // offset: 4; size: 1; index to first column - $fc = ord($subData{4}); - - // offset: 5; size: 1; index to last column - $lc = ord($subData{5}); - - // check values - if ($fr > $lr || $fc > $lc) { - throw new PHPExcel_Reader_Exception('Not a cell range address'); - } - - // column index to letter - $fc = PHPExcel_Cell::stringFromColumnIndex($fc); - $lc = PHPExcel_Cell::stringFromColumnIndex($lc); - - if ($fr == $lr and $fc == $lc) { - return "$fc$fr"; - } - return "$fc$fr:$lc$lr"; - } - - - /** - * Reads a cell range address in BIFF8 e.g. 'A2:B6' or 'A1' - * always fixed range - * section 2.5.14 - * - * @param string $subData - * @return string - * @throws PHPExcel_Reader_Exception - */ - private function readBIFF8CellRangeAddressFixed($subData) - { - // offset: 0; size: 2; index to first row - $fr = self::getInt2d($subData, 0) + 1; - - // offset: 2; size: 2; index to last row - $lr = self::getInt2d($subData, 2) + 1; - - // offset: 4; size: 2; index to first column - $fc = self::getInt2d($subData, 4); - - // offset: 6; size: 2; index to last column - $lc = self::getInt2d($subData, 6); - - // check values - if ($fr > $lr || $fc > $lc) { - throw new PHPExcel_Reader_Exception('Not a cell range address'); - } - - // column index to letter - $fc = PHPExcel_Cell::stringFromColumnIndex($fc); - $lc = PHPExcel_Cell::stringFromColumnIndex($lc); - - if ($fr == $lr and $fc == $lc) { - return "$fc$fr"; - } - return "$fc$fr:$lc$lr"; - } - - - /** - * Reads a cell range address in BIFF8 e.g. 'A2:B6' or '$A$2:$B$6' - * there are flags indicating whether column/row index is relative - * section 3.3.4 - * - * @param string $subData - * @return string - */ - private function readBIFF8CellRangeAddress($subData) - { - // todo: if cell range is just a single cell, should this funciton - // not just return e.g. 'A1' and not 'A1:A1' ? - - // offset: 0; size: 2; index to first row (0... 65535) (or offset (-32768... 32767)) - $fr = self::getInt2d($subData, 0) + 1; - - // offset: 2; size: 2; index to last row (0... 65535) (or offset (-32768... 32767)) - $lr = self::getInt2d($subData, 2) + 1; - - // offset: 4; size: 2; index to first column or column offset + relative flags - - // bit: 7-0; mask 0x00FF; column index - $fc = PHPExcel_Cell::stringFromColumnIndex(0x00FF & self::getInt2d($subData, 4)); - - // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) - if (!(0x4000 & self::getInt2d($subData, 4))) { - $fc = '$' . $fc; - } - - // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) - if (!(0x8000 & self::getInt2d($subData, 4))) { - $fr = '$' . $fr; - } - - // offset: 6; size: 2; index to last column or column offset + relative flags - - // bit: 7-0; mask 0x00FF; column index - $lc = PHPExcel_Cell::stringFromColumnIndex(0x00FF & self::getInt2d($subData, 6)); - - // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) - if (!(0x4000 & self::getInt2d($subData, 6))) { - $lc = '$' . $lc; - } - - // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) - if (!(0x8000 & self::getInt2d($subData, 6))) { - $lr = '$' . $lr; - } - - return "$fc$fr:$lc$lr"; - } - - - /** - * Reads a cell range address in BIFF8 for shared formulas. Uses positive and negative values for row and column - * to indicate offsets from a base cell - * section 3.3.4 - * - * @param string $subData - * @param string $baseCell Base cell - * @return string Cell range address - */ - private function readBIFF8CellRangeAddressB($subData, $baseCell = 'A1') - { - list($baseCol, $baseRow) = PHPExcel_Cell::coordinateFromString($baseCell); - $baseCol = PHPExcel_Cell::columnIndexFromString($baseCol) - 1; - - // TODO: if cell range is just a single cell, should this funciton - // not just return e.g. 'A1' and not 'A1:A1' ? - - // offset: 0; size: 2; first row - $frIndex = self::getInt2d($subData, 0); // adjust below - - // offset: 2; size: 2; relative index to first row (0... 65535) should be treated as offset (-32768... 32767) - $lrIndex = self::getInt2d($subData, 2); // adjust below - - // offset: 4; size: 2; first column with relative/absolute flags - - // bit: 7-0; mask 0x00FF; column index - $fcIndex = 0x00FF & self::getInt2d($subData, 4); - - // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) - if (!(0x4000 & self::getInt2d($subData, 4))) { - // absolute column index - $fc = PHPExcel_Cell::stringFromColumnIndex($fcIndex); - $fc = '$' . $fc; - } else { - // column offset - $fcIndex = ($fcIndex <= 127) ? $fcIndex : $fcIndex - 256; - $fc = PHPExcel_Cell::stringFromColumnIndex($baseCol + $fcIndex); - } - - // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) - if (!(0x8000 & self::getInt2d($subData, 4))) { - // absolute row index - $fr = $frIndex + 1; - $fr = '$' . $fr; - } else { - // row offset - $frIndex = ($frIndex <= 32767) ? $frIndex : $frIndex - 65536; - $fr = $baseRow + $frIndex; - } - - // offset: 6; size: 2; last column with relative/absolute flags - - // bit: 7-0; mask 0x00FF; column index - $lcIndex = 0x00FF & self::getInt2d($subData, 6); - $lcIndex = ($lcIndex <= 127) ? $lcIndex : $lcIndex - 256; - $lc = PHPExcel_Cell::stringFromColumnIndex($baseCol + $lcIndex); - - // bit: 14; mask 0x4000; (1 = relative column index, 0 = absolute column index) - if (!(0x4000 & self::getInt2d($subData, 6))) { - // absolute column index - $lc = PHPExcel_Cell::stringFromColumnIndex($lcIndex); - $lc = '$' . $lc; - } else { - // column offset - $lcIndex = ($lcIndex <= 127) ? $lcIndex : $lcIndex - 256; - $lc = PHPExcel_Cell::stringFromColumnIndex($baseCol + $lcIndex); - } - - // bit: 15; mask 0x8000; (1 = relative row index, 0 = absolute row index) - if (!(0x8000 & self::getInt2d($subData, 6))) { - // absolute row index - $lr = $lrIndex + 1; - $lr = '$' . $lr; - } else { - // row offset - $lrIndex = ($lrIndex <= 32767) ? $lrIndex : $lrIndex - 65536; - $lr = $baseRow + $lrIndex; - } - - return "$fc$fr:$lc$lr"; - } - - - /** - * Read BIFF8 cell range address list - * section 2.5.15 - * - * @param string $subData - * @return array - */ - private function readBIFF8CellRangeAddressList($subData) - { - $cellRangeAddresses = array(); - - // offset: 0; size: 2; number of the following cell range addresses - $nm = self::getInt2d($subData, 0); - - $offset = 2; - // offset: 2; size: 8 * $nm; list of $nm (fixed) cell range addresses - for ($i = 0; $i < $nm; ++$i) { - $cellRangeAddresses[] = $this->readBIFF8CellRangeAddressFixed(substr($subData, $offset, 8)); - $offset += 8; - } - - return array( - 'size' => 2 + 8 * $nm, - 'cellRangeAddresses' => $cellRangeAddresses, - ); - } - - - /** - * Read BIFF5 cell range address list - * section 2.5.15 - * - * @param string $subData - * @return array - */ - private function readBIFF5CellRangeAddressList($subData) - { - $cellRangeAddresses = array(); - - // offset: 0; size: 2; number of the following cell range addresses - $nm = self::getInt2d($subData, 0); - - $offset = 2; - // offset: 2; size: 6 * $nm; list of $nm (fixed) cell range addresses - for ($i = 0; $i < $nm; ++$i) { - $cellRangeAddresses[] = $this->readBIFF5CellRangeAddressFixed(substr($subData, $offset, 6)); - $offset += 6; - } - - return array( - 'size' => 2 + 6 * $nm, - 'cellRangeAddresses' => $cellRangeAddresses, - ); - } - - - /** - * Get a sheet range like Sheet1:Sheet3 from REF index - * Note: If there is only one sheet in the range, one gets e.g Sheet1 - * It can also happen that the REF structure uses the -1 (FFFF) code to indicate deleted sheets, - * in which case an PHPExcel_Reader_Exception is thrown - * - * @param int $index - * @return string|false - * @throws PHPExcel_Reader_Exception - */ - private function readSheetRangeByRefIndex($index) - { - if (isset($this->ref[$index])) { - $type = $this->externalBooks[$this->ref[$index]['externalBookIndex']]['type']; - - switch ($type) { - case 'internal': - // check if we have a deleted 3d reference - if ($this->ref[$index]['firstSheetIndex'] == 0xFFFF or $this->ref[$index]['lastSheetIndex'] == 0xFFFF) { - throw new PHPExcel_Reader_Exception('Deleted sheet reference'); - } - - // we have normal sheet range (collapsed or uncollapsed) - $firstSheetName = $this->sheets[$this->ref[$index]['firstSheetIndex']]['name']; - $lastSheetName = $this->sheets[$this->ref[$index]['lastSheetIndex']]['name']; - - if ($firstSheetName == $lastSheetName) { - // collapsed sheet range - $sheetRange = $firstSheetName; - } else { - $sheetRange = "$firstSheetName:$lastSheetName"; - } - - // escape the single-quotes - $sheetRange = str_replace("'", "''", $sheetRange); - - // if there are special characters, we need to enclose the range in single-quotes - // todo: check if we have identified the whole set of special characters - // it seems that the following characters are not accepted for sheet names - // and we may assume that they are not present: []*/:\? - if (preg_match("/[ !\"@#£$%&{()}<>=+'|^,;-]/", $sheetRange)) { - $sheetRange = "'$sheetRange'"; - } - - return $sheetRange; - break; - default: - // TODO: external sheet support - throw new PHPExcel_Reader_Exception('Excel5 reader only supports internal sheets in fomulas'); - break; - } - } - return false; - } - - - /** - * read BIFF8 constant value array from array data - * returns e.g. array('value' => '{1,2;3,4}', 'size' => 40} - * section 2.5.8 - * - * @param string $arrayData - * @return array - */ - private static function readBIFF8ConstantArray($arrayData) - { - // offset: 0; size: 1; number of columns decreased by 1 - $nc = ord($arrayData[0]); - - // offset: 1; size: 2; number of rows decreased by 1 - $nr = self::getInt2d($arrayData, 1); - $size = 3; // initialize - $arrayData = substr($arrayData, 3); - - // offset: 3; size: var; list of ($nc + 1) * ($nr + 1) constant values - $matrixChunks = array(); - for ($r = 1; $r <= $nr + 1; ++$r) { - $items = array(); - for ($c = 1; $c <= $nc + 1; ++$c) { - $constant = self::readBIFF8Constant($arrayData); - $items[] = $constant['value']; - $arrayData = substr($arrayData, $constant['size']); - $size += $constant['size']; - } - $matrixChunks[] = implode(',', $items); // looks like e.g. '1,"hello"' - } - $matrix = '{' . implode(';', $matrixChunks) . '}'; - - return array( - 'value' => $matrix, - 'size' => $size, - ); - } - - - /** - * read BIFF8 constant value which may be 'Empty Value', 'Number', 'String Value', 'Boolean Value', 'Error Value' - * section 2.5.7 - * returns e.g. array('value' => '5', 'size' => 9) - * - * @param string $valueData - * @return array - */ - private static function readBIFF8Constant($valueData) - { - // offset: 0; size: 1; identifier for type of constant - $identifier = ord($valueData[0]); - - switch ($identifier) { - case 0x00: // empty constant (what is this?) - $value = ''; - $size = 9; - break; - case 0x01: // number - // offset: 1; size: 8; IEEE 754 floating-point value - $value = self::extractNumber(substr($valueData, 1, 8)); - $size = 9; - break; - case 0x02: // string value - // offset: 1; size: var; Unicode string, 16-bit string length - $string = self::readUnicodeStringLong(substr($valueData, 1)); - $value = '"' . $string['value'] . '"'; - $size = 1 + $string['size']; - break; - case 0x04: // boolean - // offset: 1; size: 1; 0 = FALSE, 1 = TRUE - if (ord($valueData[1])) { - $value = 'TRUE'; - } else { - $value = 'FALSE'; - } - $size = 9; - break; - case 0x10: // error code - // offset: 1; size: 1; error code - $value = PHPExcel_Reader_Excel5_ErrorCode::lookup(ord($valueData[1])); - $size = 9; - break; - } - return array( - 'value' => $value, - 'size' => $size, - ); - } - - - /** - * Extract RGB color - * OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.4 - * - * @param string $rgb Encoded RGB value (4 bytes) - * @return array - */ - private static function readRGB($rgb) - { - // offset: 0; size 1; Red component - $r = ord($rgb{0}); - - // offset: 1; size: 1; Green component - $g = ord($rgb{1}); - - // offset: 2; size: 1; Blue component - $b = ord($rgb{2}); - - // HEX notation, e.g. 'FF00FC' - $rgb = sprintf('%02X%02X%02X', $r, $g, $b); - - return array('rgb' => $rgb); - } - - - /** - * Read byte string (8-bit string length) - * OpenOffice documentation: 2.5.2 - * - * @param string $subData - * @return array - */ - private function readByteStringShort($subData) - { - // offset: 0; size: 1; length of the string (character count) - $ln = ord($subData[0]); - - // offset: 1: size: var; character array (8-bit characters) - $value = $this->decodeCodepage(substr($subData, 1, $ln)); - - return array( - 'value' => $value, - 'size' => 1 + $ln, // size in bytes of data structure - ); - } - - - /** - * Read byte string (16-bit string length) - * OpenOffice documentation: 2.5.2 - * - * @param string $subData - * @return array - */ - private function readByteStringLong($subData) - { - // offset: 0; size: 2; length of the string (character count) - $ln = self::getInt2d($subData, 0); - - // offset: 2: size: var; character array (8-bit characters) - $value = $this->decodeCodepage(substr($subData, 2)); - - //return $string; - return array( - 'value' => $value, - 'size' => 2 + $ln, // size in bytes of data structure - ); - } - - - /** - * Extracts an Excel Unicode short string (8-bit string length) - * OpenOffice documentation: 2.5.3 - * function will automatically find out where the Unicode string ends. - * - * @param string $subData - * @return array - */ - private static function readUnicodeStringShort($subData) - { - $value = ''; - - // offset: 0: size: 1; length of the string (character count) - $characterCount = ord($subData[0]); - - $string = self::readUnicodeString(substr($subData, 1), $characterCount); - - // add 1 for the string length - $string['size'] += 1; - - return $string; - } - - - /** - * Extracts an Excel Unicode long string (16-bit string length) - * OpenOffice documentation: 2.5.3 - * this function is under construction, needs to support rich text, and Asian phonetic settings - * - * @param string $subData - * @return array - */ - private static function readUnicodeStringLong($subData) - { - $value = ''; - - // offset: 0: size: 2; length of the string (character count) - $characterCount = self::getInt2d($subData, 0); - - $string = self::readUnicodeString(substr($subData, 2), $characterCount); - - // add 2 for the string length - $string['size'] += 2; - - return $string; - } - - - /** - * Read Unicode string with no string length field, but with known character count - * this function is under construction, needs to support rich text, and Asian phonetic settings - * OpenOffice.org's Documentation of the Microsoft Excel File Format, section 2.5.3 - * - * @param string $subData - * @param int $characterCount - * @return array - */ - private static function readUnicodeString($subData, $characterCount) - { - $value = ''; - - // offset: 0: size: 1; option flags - // bit: 0; mask: 0x01; character compression (0 = compressed 8-bit, 1 = uncompressed 16-bit) - $isCompressed = !((0x01 & ord($subData[0])) >> 0); - - // bit: 2; mask: 0x04; Asian phonetic settings - $hasAsian = (0x04) & ord($subData[0]) >> 2; - - // bit: 3; mask: 0x08; Rich-Text settings - $hasRichText = (0x08) & ord($subData[0]) >> 3; - - // offset: 1: size: var; character array - // this offset assumes richtext and Asian phonetic settings are off which is generally wrong - // needs to be fixed - $value = self::encodeUTF16(substr($subData, 1, $isCompressed ? $characterCount : 2 * $characterCount), $isCompressed); - - return array( - 'value' => $value, - 'size' => $isCompressed ? 1 + $characterCount : 1 + 2 * $characterCount, // the size in bytes including the option flags - ); - } - - - /** - * Convert UTF-8 string to string surounded by double quotes. Used for explicit string tokens in formulas. - * Example: hello"world --> "hello""world" - * - * @param string $value UTF-8 encoded string - * @return string - */ - private static function UTF8toExcelDoubleQuoted($value) - { - return '"' . str_replace('"', '""', $value) . '"'; - } - - - /** - * Reads first 8 bytes of a string and return IEEE 754 float - * - * @param string $data Binary string that is at least 8 bytes long - * @return float - */ - private static function extractNumber($data) - { - $rknumhigh = self::getInt4d($data, 4); - $rknumlow = self::getInt4d($data, 0); - $sign = ($rknumhigh & 0x80000000) >> 31; - $exp = (($rknumhigh & 0x7ff00000) >> 20) - 1023; - $mantissa = (0x100000 | ($rknumhigh & 0x000fffff)); - $mantissalow1 = ($rknumlow & 0x80000000) >> 31; - $mantissalow2 = ($rknumlow & 0x7fffffff); - $value = $mantissa / pow(2, (20 - $exp)); - - if ($mantissalow1 != 0) { - $value += 1 / pow(2, (21 - $exp)); - } - - $value += $mantissalow2 / pow(2, (52 - $exp)); - if ($sign) { - $value *= -1; - } - - return $value; - } - - - private static function getIEEE754($rknum) - { - if (($rknum & 0x02) != 0) { - $value = $rknum >> 2; - } else { - // changes by mmp, info on IEEE754 encoding from - // research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html - // The RK format calls for using only the most significant 30 bits - // of the 64 bit floating point value. The other 34 bits are assumed - // to be 0 so we use the upper 30 bits of $rknum as follows... - $sign = ($rknum & 0x80000000) >> 31; - $exp = ($rknum & 0x7ff00000) >> 20; - $mantissa = (0x100000 | ($rknum & 0x000ffffc)); - $value = $mantissa / pow(2, (20- ($exp - 1023))); - if ($sign) { - $value = -1 * $value; - } - //end of changes by mmp - } - if (($rknum & 0x01) != 0) { - $value /= 100; - } - return $value; - } - - - /** - * Get UTF-8 string from (compressed or uncompressed) UTF-16 string - * - * @param string $string - * @param bool $compressed - * @return string - */ - private static function encodeUTF16($string, $compressed = '') - { - if ($compressed) { - $string = self::uncompressByteString($string); - } - - return PHPExcel_Shared_String::ConvertEncoding($string, 'UTF-8', 'UTF-16LE'); - } - - /** - * Convert UTF-16 string in compressed notation to uncompressed form. Only used for BIFF8. - * - * @param string $string - * @return string - */ - private static function uncompressByteString($string) - { - $uncompressedString = ''; - $strLen = strlen($string); - for ($i = 0; $i < $strLen; ++$i) { - $uncompressedString .= $string[$i] . "\0"; - } - - return $uncompressedString; - } - - /** - * Convert string to UTF-8. Only used for BIFF5. - * - * @param string $string - * @return string - */ - private function decodeCodepage($string) - { - return PHPExcel_Shared_String::ConvertEncoding($string, 'UTF-8', $this->codepage); - } - - /** - * Read 16-bit unsigned integer - * - * @param string $data - * @param int $pos - * @return int - */ - public static function getInt2d($data, $pos) - { - return ord($data[$pos]) | (ord($data[$pos+1]) << 8); - } - - /** - * Read 32-bit signed integer - * - * @param string $data - * @param int $pos - * @return int - */ - public static function getInt4d($data, $pos) - { - // FIX: represent numbers correctly on 64-bit system - // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334 - // Hacked by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems - $_or_24 = ord($data[$pos + 3]); - if ($_or_24 >= 128) { - // negative number - $_ord_24 = -abs((256 - $_or_24) << 24); - } else { - $_ord_24 = ($_or_24 & 127) << 24; - } - return ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | $_ord_24; - } - - private function parseRichText($is = '') - { - $value = new PHPExcel_RichText(); - $value->createText($is); - - return $value; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color.php deleted file mode 100644 index 1801df5..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -class PHPExcel_Reader_Excel5_Color -{ - /** - * Read color - * - * @param int $color Indexed color - * @param array $palette Color palette - * @return array RGB color value, example: array('rgb' => 'FF0000') - */ - public static function map($color, $palette, $version) - { - if ($color <= 0x07 || $color >= 0x40) { - // special built-in color - return PHPExcel_Reader_Excel5_Color_BuiltIn::lookup($color); - } elseif (isset($palette) && isset($palette[$color - 8])) { - // palette color, color index 0x08 maps to pallete index 0 - return $palette[$color - 8]; - } else { - // default color table - if ($version == PHPExcel_Reader_Excel5::XLS_BIFF8) { - return PHPExcel_Reader_Excel5_Color_BIFF8::lookup($color); - } else { - // BIFF5 - return PHPExcel_Reader_Excel5_Color_BIFF5::lookup($color); - } - } - - return $color; - } -} \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BIFF5.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BIFF5.php deleted file mode 100644 index 159c27f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BIFF5.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -class PHPExcel_Reader_Excel5_Color_BIFF5 -{ - protected static $map = array( - 0x08 => '000000', - 0x09 => 'FFFFFF', - 0x0A => 'FF0000', - 0x0B => '00FF00', - 0x0C => '0000FF', - 0x0D => 'FFFF00', - 0x0E => 'FF00FF', - 0x0F => '00FFFF', - 0x10 => '800000', - 0x11 => '008000', - 0x12 => '000080', - 0x13 => '808000', - 0x14 => '800080', - 0x15 => '008080', - 0x16 => 'C0C0C0', - 0x17 => '808080', - 0x18 => '8080FF', - 0x19 => '802060', - 0x1A => 'FFFFC0', - 0x1B => 'A0E0F0', - 0x1C => '600080', - 0x1D => 'FF8080', - 0x1E => '0080C0', - 0x1F => 'C0C0FF', - 0x20 => '000080', - 0x21 => 'FF00FF', - 0x22 => 'FFFF00', - 0x23 => '00FFFF', - 0x24 => '800080', - 0x25 => '800000', - 0x26 => '008080', - 0x27 => '0000FF', - 0x28 => '00CFFF', - 0x29 => '69FFFF', - 0x2A => 'E0FFE0', - 0x2B => 'FFFF80', - 0x2C => 'A6CAF0', - 0x2D => 'DD9CB3', - 0x2E => 'B38FEE', - 0x2F => 'E3E3E3', - 0x30 => '2A6FF9', - 0x31 => '3FB8CD', - 0x32 => '488436', - 0x33 => '958C41', - 0x34 => '8E5E42', - 0x35 => 'A0627A', - 0x36 => '624FAC', - 0x37 => '969696', - 0x38 => '1D2FBE', - 0x39 => '286676', - 0x3A => '004500', - 0x3B => '453E01', - 0x3C => '6A2813', - 0x3D => '85396A', - 0x3E => '4A3285', - 0x3F => '424242', - ); - - /** - * Map color array from BIFF5 built-in color index - * - * @param int $color - * @return array - */ - public static function lookup($color) - { - if (isset(self::$map[$color])) { - return array('rgb' => self::$map[$color]); - } - return array('rgb' => '000000'); - } -} \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BIFF8.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BIFF8.php deleted file mode 100644 index 4d3f2d0..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BIFF8.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -class PHPExcel_Reader_Excel5_Color_BIFF8 -{ - protected static $map = array( - 0x08 => '000000', - 0x09 => 'FFFFFF', - 0x0A => 'FF0000', - 0x0B => '00FF00', - 0x0C => '0000FF', - 0x0D => 'FFFF00', - 0x0E => 'FF00FF', - 0x0F => '00FFFF', - 0x10 => '800000', - 0x11 => '008000', - 0x12 => '000080', - 0x13 => '808000', - 0x14 => '800080', - 0x15 => '008080', - 0x16 => 'C0C0C0', - 0x17 => '808080', - 0x18 => '9999FF', - 0x19 => '993366', - 0x1A => 'FFFFCC', - 0x1B => 'CCFFFF', - 0x1C => '660066', - 0x1D => 'FF8080', - 0x1E => '0066CC', - 0x1F => 'CCCCFF', - 0x20 => '000080', - 0x21 => 'FF00FF', - 0x22 => 'FFFF00', - 0x23 => '00FFFF', - 0x24 => '800080', - 0x25 => '800000', - 0x26 => '008080', - 0x27 => '0000FF', - 0x28 => '00CCFF', - 0x29 => 'CCFFFF', - 0x2A => 'CCFFCC', - 0x2B => 'FFFF99', - 0x2C => '99CCFF', - 0x2D => 'FF99CC', - 0x2E => 'CC99FF', - 0x2F => 'FFCC99', - 0x30 => '3366FF', - 0x31 => '33CCCC', - 0x32 => '99CC00', - 0x33 => 'FFCC00', - 0x34 => 'FF9900', - 0x35 => 'FF6600', - 0x36 => '666699', - 0x37 => '969696', - 0x38 => '003366', - 0x39 => '339966', - 0x3A => '003300', - 0x3B => '333300', - 0x3C => '993300', - 0x3D => '993366', - 0x3E => '333399', - 0x3F => '333333', - ); - - /** - * Map color array from BIFF8 built-in color index - * - * @param int $color - * @return array - */ - public static function lookup($color) - { - if (isset(self::$map[$color])) { - return array('rgb' => self::$map[$color]); - } - return array('rgb' => '000000'); - } -} \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BuiltIn.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BuiltIn.php deleted file mode 100644 index a5b7e59..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Color/BuiltIn.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -class PHPExcel_Reader_Excel5_Color_BuiltIn -{ - protected static $map = array( - 0x00 => '000000', - 0x01 => 'FFFFFF', - 0x02 => 'FF0000', - 0x03 => '00FF00', - 0x04 => '0000FF', - 0x05 => 'FFFF00', - 0x06 => 'FF00FF', - 0x07 => '00FFFF', - 0x40 => '000000', // system window text color - 0x41 => 'FFFFFF', // system window background color - ); - - /** - * Map built-in color to RGB value - * - * @param int $color Indexed color - * @return array - */ - public static function lookup($color) - { - if (isset(self::$map[$color])) { - return array('rgb' => self::$map[$color]); - } - return array('rgb' => '000000'); - } -} \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/ErrorCode.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/ErrorCode.php deleted file mode 100644 index f1d1cb6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/ErrorCode.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -class PHPExcel_Reader_Excel5_ErrorCode -{ - protected static $map = array( - 0x00 => '#NULL!', - 0x07 => '#DIV/0!', - 0x0F => '#VALUE!', - 0x17 => '#REF!', - 0x1D => '#NAME?', - 0x24 => '#NUM!', - 0x2A => '#N/A', - ); - - /** - * Map error code, e.g. '#N/A' - * - * @param int $code - * @return string - */ - public static function lookup($code) - { - if (isset(self::$map[$code])) { - return self::$map[$code]; - } - return false; - } -} \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Escher.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Escher.php deleted file mode 100644 index 2b99e22..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Escher.php +++ /dev/null @@ -1,669 +0,0 @@ -<?php - -/** - * PHPExcel_Reader_Excel5_Escher - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Reader_Excel5_Escher -{ - const DGGCONTAINER = 0xF000; - const BSTORECONTAINER = 0xF001; - const DGCONTAINER = 0xF002; - const SPGRCONTAINER = 0xF003; - const SPCONTAINER = 0xF004; - const DGG = 0xF006; - const BSE = 0xF007; - const DG = 0xF008; - const SPGR = 0xF009; - const SP = 0xF00A; - const OPT = 0xF00B; - const CLIENTTEXTBOX = 0xF00D; - const CLIENTANCHOR = 0xF010; - const CLIENTDATA = 0xF011; - const BLIPJPEG = 0xF01D; - const BLIPPNG = 0xF01E; - const SPLITMENUCOLORS = 0xF11E; - const TERTIARYOPT = 0xF122; - - /** - * Escher stream data (binary) - * - * @var string - */ - private $data; - - /** - * Size in bytes of the Escher stream data - * - * @var int - */ - private $dataSize; - - /** - * Current position of stream pointer in Escher stream data - * - * @var int - */ - private $pos; - - /** - * The object to be returned by the reader. Modified during load. - * - * @var mixed - */ - private $object; - - /** - * Create a new PHPExcel_Reader_Excel5_Escher instance - * - * @param mixed $object - */ - public function __construct($object) - { - $this->object = $object; - } - - /** - * Load Escher stream data. May be a partial Escher stream. - * - * @param string $data - */ - public function load($data) - { - $this->data = $data; - - // total byte size of Excel data (workbook global substream + sheet substreams) - $this->dataSize = strlen($this->data); - - $this->pos = 0; - - // Parse Escher stream - while ($this->pos < $this->dataSize) { - // offset: 2; size: 2: Record Type - $fbt = PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos + 2); - - switch ($fbt) { - case self::DGGCONTAINER: - $this->readDggContainer(); - break; - case self::DGG: - $this->readDgg(); - break; - case self::BSTORECONTAINER: - $this->readBstoreContainer(); - break; - case self::BSE: - $this->readBSE(); - break; - case self::BLIPJPEG: - $this->readBlipJPEG(); - break; - case self::BLIPPNG: - $this->readBlipPNG(); - break; - case self::OPT: - $this->readOPT(); - break; - case self::TERTIARYOPT: - $this->readTertiaryOPT(); - break; - case self::SPLITMENUCOLORS: - $this->readSplitMenuColors(); - break; - case self::DGCONTAINER: - $this->readDgContainer(); - break; - case self::DG: - $this->readDg(); - break; - case self::SPGRCONTAINER: - $this->readSpgrContainer(); - break; - case self::SPCONTAINER: - $this->readSpContainer(); - break; - case self::SPGR: - $this->readSpgr(); - break; - case self::SP: - $this->readSp(); - break; - case self::CLIENTTEXTBOX: - $this->readClientTextbox(); - break; - case self::CLIENTANCHOR: - $this->readClientAnchor(); - break; - case self::CLIENTDATA: - $this->readClientData(); - break; - default: - $this->readDefault(); - break; - } - } - - return $this->object; - } - - /** - * Read a generic record - */ - private function readDefault() - { - // offset 0; size: 2; recVer and recInstance - $verInstance = PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos); - - // offset: 2; size: 2: Record Type - $fbt = PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos + 2); - - // bit: 0-3; mask: 0x000F; recVer - $recVer = (0x000F & $verInstance) >> 0; - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read DggContainer record (Drawing Group Container) - */ - private function readDggContainer() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - // record is a container, read contents - $dggContainer = new PHPExcel_Shared_Escher_DggContainer(); - $this->object->setDggContainer($dggContainer); - $reader = new PHPExcel_Reader_Excel5_Escher($dggContainer); - $reader->load($recordData); - } - - /** - * Read Dgg record (Drawing Group) - */ - private function readDgg() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read BstoreContainer record (Blip Store Container) - */ - private function readBstoreContainer() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - // record is a container, read contents - $bstoreContainer = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer(); - $this->object->setBstoreContainer($bstoreContainer); - $reader = new PHPExcel_Reader_Excel5_Escher($bstoreContainer); - $reader->load($recordData); - } - - /** - * Read BSE record - */ - private function readBSE() - { - // offset: 0; size: 2; recVer and recInstance - - // bit: 4-15; mask: 0xFFF0; recInstance - $recInstance = (0xFFF0 & PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos)) >> 4; - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - // add BSE to BstoreContainer - $BSE = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE(); - $this->object->addBSE($BSE); - - $BSE->setBLIPType($recInstance); - - // offset: 0; size: 1; btWin32 (MSOBLIPTYPE) - $btWin32 = ord($recordData[0]); - - // offset: 1; size: 1; btWin32 (MSOBLIPTYPE) - $btMacOS = ord($recordData[1]); - - // offset: 2; size: 16; MD4 digest - $rgbUid = substr($recordData, 2, 16); - - // offset: 18; size: 2; tag - $tag = PHPExcel_Reader_Excel5::getInt2d($recordData, 18); - - // offset: 20; size: 4; size of BLIP in bytes - $size = PHPExcel_Reader_Excel5::getInt4d($recordData, 20); - - // offset: 24; size: 4; number of references to this BLIP - $cRef = PHPExcel_Reader_Excel5::getInt4d($recordData, 24); - - // offset: 28; size: 4; MSOFO file offset - $foDelay = PHPExcel_Reader_Excel5::getInt4d($recordData, 28); - - // offset: 32; size: 1; unused1 - $unused1 = ord($recordData{32}); - - // offset: 33; size: 1; size of nameData in bytes (including null terminator) - $cbName = ord($recordData{33}); - - // offset: 34; size: 1; unused2 - $unused2 = ord($recordData{34}); - - // offset: 35; size: 1; unused3 - $unused3 = ord($recordData{35}); - - // offset: 36; size: $cbName; nameData - $nameData = substr($recordData, 36, $cbName); - - // offset: 36 + $cbName, size: var; the BLIP data - $blipData = substr($recordData, 36 + $cbName); - - // record is a container, read contents - $reader = new PHPExcel_Reader_Excel5_Escher($BSE); - $reader->load($blipData); - } - - /** - * Read BlipJPEG record. Holds raw JPEG image data - */ - private function readBlipJPEG() - { - // offset: 0; size: 2; recVer and recInstance - - // bit: 4-15; mask: 0xFFF0; recInstance - $recInstance = (0xFFF0 & PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos)) >> 4; - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - $pos = 0; - - // offset: 0; size: 16; rgbUid1 (MD4 digest of) - $rgbUid1 = substr($recordData, 0, 16); - $pos += 16; - - // offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3 - if (in_array($recInstance, array(0x046B, 0x06E3))) { - $rgbUid2 = substr($recordData, 16, 16); - $pos += 16; - } - - // offset: var; size: 1; tag - $tag = ord($recordData{$pos}); - $pos += 1; - - // offset: var; size: var; the raw image data - $data = substr($recordData, $pos); - - $blip = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip(); - $blip->setData($data); - - $this->object->setBlip($blip); - } - - /** - * Read BlipPNG record. Holds raw PNG image data - */ - private function readBlipPNG() - { - // offset: 0; size: 2; recVer and recInstance - - // bit: 4-15; mask: 0xFFF0; recInstance - $recInstance = (0xFFF0 & PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos)) >> 4; - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - $pos = 0; - - // offset: 0; size: 16; rgbUid1 (MD4 digest of) - $rgbUid1 = substr($recordData, 0, 16); - $pos += 16; - - // offset: 16; size: 16; rgbUid2 (MD4 digest), only if $recInstance = 0x46B or 0x6E3 - if ($recInstance == 0x06E1) { - $rgbUid2 = substr($recordData, 16, 16); - $pos += 16; - } - - // offset: var; size: 1; tag - $tag = ord($recordData{$pos}); - $pos += 1; - - // offset: var; size: var; the raw image data - $data = substr($recordData, $pos); - - $blip = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip(); - $blip->setData($data); - - $this->object->setBlip($blip); - } - - /** - * Read OPT record. This record may occur within DggContainer record or SpContainer - */ - private function readOPT() - { - // offset: 0; size: 2; recVer and recInstance - - // bit: 4-15; mask: 0xFFF0; recInstance - $recInstance = (0xFFF0 & PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos)) >> 4; - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - $this->readOfficeArtRGFOPTE($recordData, $recInstance); - } - - /** - * Read TertiaryOPT record - */ - private function readTertiaryOPT() - { - // offset: 0; size: 2; recVer and recInstance - - // bit: 4-15; mask: 0xFFF0; recInstance - $recInstance = (0xFFF0 & PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos)) >> 4; - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read SplitMenuColors record - */ - private function readSplitMenuColors() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read DgContainer record (Drawing Container) - */ - private function readDgContainer() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - // record is a container, read contents - $dgContainer = new PHPExcel_Shared_Escher_DgContainer(); - $this->object->setDgContainer($dgContainer); - $reader = new PHPExcel_Reader_Excel5_Escher($dgContainer); - $escher = $reader->load($recordData); - } - - /** - * Read Dg record (Drawing) - */ - private function readDg() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read SpgrContainer record (Shape Group Container) - */ - private function readSpgrContainer() - { - // context is either context DgContainer or SpgrContainer - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - // record is a container, read contents - $spgrContainer = new PHPExcel_Shared_Escher_DgContainer_SpgrContainer(); - - if ($this->object instanceof PHPExcel_Shared_Escher_DgContainer) { - // DgContainer - $this->object->setSpgrContainer($spgrContainer); - } else { - // SpgrContainer - $this->object->addChild($spgrContainer); - } - - $reader = new PHPExcel_Reader_Excel5_Escher($spgrContainer); - $escher = $reader->load($recordData); - } - - /** - * Read SpContainer record (Shape Container) - */ - private function readSpContainer() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // add spContainer to spgrContainer - $spContainer = new PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer(); - $this->object->addChild($spContainer); - - // move stream pointer to next record - $this->pos += 8 + $length; - - // record is a container, read contents - $reader = new PHPExcel_Reader_Excel5_Escher($spContainer); - $escher = $reader->load($recordData); - } - - /** - * Read Spgr record (Shape Group) - */ - private function readSpgr() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read Sp record (Shape) - */ - private function readSp() - { - // offset: 0; size: 2; recVer and recInstance - - // bit: 4-15; mask: 0xFFF0; recInstance - $recInstance = (0xFFF0 & PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos)) >> 4; - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read ClientTextbox record - */ - private function readClientTextbox() - { - // offset: 0; size: 2; recVer and recInstance - - // bit: 4-15; mask: 0xFFF0; recInstance - $recInstance = (0xFFF0 & PHPExcel_Reader_Excel5::getInt2d($this->data, $this->pos)) >> 4; - - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read ClientAnchor record. This record holds information about where the shape is anchored in worksheet - */ - private function readClientAnchor() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - - // offset: 2; size: 2; upper-left corner column index (0-based) - $c1 = PHPExcel_Reader_Excel5::getInt2d($recordData, 2); - - // offset: 4; size: 2; upper-left corner horizontal offset in 1/1024 of column width - $startOffsetX = PHPExcel_Reader_Excel5::getInt2d($recordData, 4); - - // offset: 6; size: 2; upper-left corner row index (0-based) - $r1 = PHPExcel_Reader_Excel5::getInt2d($recordData, 6); - - // offset: 8; size: 2; upper-left corner vertical offset in 1/256 of row height - $startOffsetY = PHPExcel_Reader_Excel5::getInt2d($recordData, 8); - - // offset: 10; size: 2; bottom-right corner column index (0-based) - $c2 = PHPExcel_Reader_Excel5::getInt2d($recordData, 10); - - // offset: 12; size: 2; bottom-right corner horizontal offset in 1/1024 of column width - $endOffsetX = PHPExcel_Reader_Excel5::getInt2d($recordData, 12); - - // offset: 14; size: 2; bottom-right corner row index (0-based) - $r2 = PHPExcel_Reader_Excel5::getInt2d($recordData, 14); - - // offset: 16; size: 2; bottom-right corner vertical offset in 1/256 of row height - $endOffsetY = PHPExcel_Reader_Excel5::getInt2d($recordData, 16); - - // set the start coordinates - $this->object->setStartCoordinates(PHPExcel_Cell::stringFromColumnIndex($c1) . ($r1 + 1)); - - // set the start offsetX - $this->object->setStartOffsetX($startOffsetX); - - // set the start offsetY - $this->object->setStartOffsetY($startOffsetY); - - // set the end coordinates - $this->object->setEndCoordinates(PHPExcel_Cell::stringFromColumnIndex($c2) . ($r2 + 1)); - - // set the end offsetX - $this->object->setEndOffsetX($endOffsetX); - - // set the end offsetY - $this->object->setEndOffsetY($endOffsetY); - } - - /** - * Read ClientData record - */ - private function readClientData() - { - $length = PHPExcel_Reader_Excel5::getInt4d($this->data, $this->pos + 4); - $recordData = substr($this->data, $this->pos + 8, $length); - - // move stream pointer to next record - $this->pos += 8 + $length; - } - - /** - * Read OfficeArtRGFOPTE table of property-value pairs - * - * @param string $data Binary data - * @param int $n Number of properties - */ - private function readOfficeArtRGFOPTE($data, $n) - { - $splicedComplexData = substr($data, 6 * $n); - - // loop through property-value pairs - for ($i = 0; $i < $n; ++$i) { - // read 6 bytes at a time - $fopte = substr($data, 6 * $i, 6); - - // offset: 0; size: 2; opid - $opid = PHPExcel_Reader_Excel5::getInt2d($fopte, 0); - - // bit: 0-13; mask: 0x3FFF; opid.opid - $opidOpid = (0x3FFF & $opid) >> 0; - - // bit: 14; mask 0x4000; 1 = value in op field is BLIP identifier - $opidFBid = (0x4000 & $opid) >> 14; - - // bit: 15; mask 0x8000; 1 = this is a complex property, op field specifies size of complex data - $opidFComplex = (0x8000 & $opid) >> 15; - - // offset: 2; size: 4; the value for this property - $op = PHPExcel_Reader_Excel5::getInt4d($fopte, 2); - - if ($opidFComplex) { - $complexData = substr($splicedComplexData, 0, $op); - $splicedComplexData = substr($splicedComplexData, $op); - - // we store string value with complex data - $value = $complexData; - } else { - // we store integer value - $value = $op; - } - - $this->object->setOPT($opidOpid, $value); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/MD5.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/MD5.php deleted file mode 100644 index f14ea94..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/MD5.php +++ /dev/null @@ -1,203 +0,0 @@ -<?php - -/** - * PHPExcel_Reader_Excel5_MD5 - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Reader_Excel5_MD5 -{ - // Context - private $a; - private $b; - private $c; - private $d; - - /** - * MD5 stream constructor - */ - public function __construct() - { - $this->reset(); - } - - /** - * Reset the MD5 stream context - */ - public function reset() - { - $this->a = 0x67452301; - $this->b = 0xEFCDAB89; - $this->c = 0x98BADCFE; - $this->d = 0x10325476; - } - - /** - * Get MD5 stream context - * - * @return string - */ - public function getContext() - { - $s = ''; - foreach (array('a', 'b', 'c', 'd') as $i) { - $v = $this->{$i}; - $s .= chr($v & 0xff); - $s .= chr(($v >> 8) & 0xff); - $s .= chr(($v >> 16) & 0xff); - $s .= chr(($v >> 24) & 0xff); - } - - return $s; - } - - /** - * Add data to context - * - * @param string $data Data to add - */ - public function add($data) - { - $words = array_values(unpack('V16', $data)); - - $A = $this->a; - $B = $this->b; - $C = $this->c; - $D = $this->d; - - $F = array('PHPExcel_Reader_Excel5_MD5','f'); - $G = array('PHPExcel_Reader_Excel5_MD5','g'); - $H = array('PHPExcel_Reader_Excel5_MD5','h'); - $I = array('PHPExcel_Reader_Excel5_MD5','i'); - - /* ROUND 1 */ - self::step($F, $A, $B, $C, $D, $words[0], 7, 0xd76aa478); - self::step($F, $D, $A, $B, $C, $words[1], 12, 0xe8c7b756); - self::step($F, $C, $D, $A, $B, $words[2], 17, 0x242070db); - self::step($F, $B, $C, $D, $A, $words[3], 22, 0xc1bdceee); - self::step($F, $A, $B, $C, $D, $words[4], 7, 0xf57c0faf); - self::step($F, $D, $A, $B, $C, $words[5], 12, 0x4787c62a); - self::step($F, $C, $D, $A, $B, $words[6], 17, 0xa8304613); - self::step($F, $B, $C, $D, $A, $words[7], 22, 0xfd469501); - self::step($F, $A, $B, $C, $D, $words[8], 7, 0x698098d8); - self::step($F, $D, $A, $B, $C, $words[9], 12, 0x8b44f7af); - self::step($F, $C, $D, $A, $B, $words[10], 17, 0xffff5bb1); - self::step($F, $B, $C, $D, $A, $words[11], 22, 0x895cd7be); - self::step($F, $A, $B, $C, $D, $words[12], 7, 0x6b901122); - self::step($F, $D, $A, $B, $C, $words[13], 12, 0xfd987193); - self::step($F, $C, $D, $A, $B, $words[14], 17, 0xa679438e); - self::step($F, $B, $C, $D, $A, $words[15], 22, 0x49b40821); - - /* ROUND 2 */ - self::step($G, $A, $B, $C, $D, $words[1], 5, 0xf61e2562); - self::step($G, $D, $A, $B, $C, $words[6], 9, 0xc040b340); - self::step($G, $C, $D, $A, $B, $words[11], 14, 0x265e5a51); - self::step($G, $B, $C, $D, $A, $words[0], 20, 0xe9b6c7aa); - self::step($G, $A, $B, $C, $D, $words[5], 5, 0xd62f105d); - self::step($G, $D, $A, $B, $C, $words[10], 9, 0x02441453); - self::step($G, $C, $D, $A, $B, $words[15], 14, 0xd8a1e681); - self::step($G, $B, $C, $D, $A, $words[4], 20, 0xe7d3fbc8); - self::step($G, $A, $B, $C, $D, $words[9], 5, 0x21e1cde6); - self::step($G, $D, $A, $B, $C, $words[14], 9, 0xc33707d6); - self::step($G, $C, $D, $A, $B, $words[3], 14, 0xf4d50d87); - self::step($G, $B, $C, $D, $A, $words[8], 20, 0x455a14ed); - self::step($G, $A, $B, $C, $D, $words[13], 5, 0xa9e3e905); - self::step($G, $D, $A, $B, $C, $words[2], 9, 0xfcefa3f8); - self::step($G, $C, $D, $A, $B, $words[7], 14, 0x676f02d9); - self::step($G, $B, $C, $D, $A, $words[12], 20, 0x8d2a4c8a); - - /* ROUND 3 */ - self::step($H, $A, $B, $C, $D, $words[5], 4, 0xfffa3942); - self::step($H, $D, $A, $B, $C, $words[8], 11, 0x8771f681); - self::step($H, $C, $D, $A, $B, $words[11], 16, 0x6d9d6122); - self::step($H, $B, $C, $D, $A, $words[14], 23, 0xfde5380c); - self::step($H, $A, $B, $C, $D, $words[1], 4, 0xa4beea44); - self::step($H, $D, $A, $B, $C, $words[4], 11, 0x4bdecfa9); - self::step($H, $C, $D, $A, $B, $words[7], 16, 0xf6bb4b60); - self::step($H, $B, $C, $D, $A, $words[10], 23, 0xbebfbc70); - self::step($H, $A, $B, $C, $D, $words[13], 4, 0x289b7ec6); - self::step($H, $D, $A, $B, $C, $words[0], 11, 0xeaa127fa); - self::step($H, $C, $D, $A, $B, $words[3], 16, 0xd4ef3085); - self::step($H, $B, $C, $D, $A, $words[6], 23, 0x04881d05); - self::step($H, $A, $B, $C, $D, $words[9], 4, 0xd9d4d039); - self::step($H, $D, $A, $B, $C, $words[12], 11, 0xe6db99e5); - self::step($H, $C, $D, $A, $B, $words[15], 16, 0x1fa27cf8); - self::step($H, $B, $C, $D, $A, $words[2], 23, 0xc4ac5665); - - /* ROUND 4 */ - self::step($I, $A, $B, $C, $D, $words[0], 6, 0xf4292244); - self::step($I, $D, $A, $B, $C, $words[7], 10, 0x432aff97); - self::step($I, $C, $D, $A, $B, $words[14], 15, 0xab9423a7); - self::step($I, $B, $C, $D, $A, $words[5], 21, 0xfc93a039); - self::step($I, $A, $B, $C, $D, $words[12], 6, 0x655b59c3); - self::step($I, $D, $A, $B, $C, $words[3], 10, 0x8f0ccc92); - self::step($I, $C, $D, $A, $B, $words[10], 15, 0xffeff47d); - self::step($I, $B, $C, $D, $A, $words[1], 21, 0x85845dd1); - self::step($I, $A, $B, $C, $D, $words[8], 6, 0x6fa87e4f); - self::step($I, $D, $A, $B, $C, $words[15], 10, 0xfe2ce6e0); - self::step($I, $C, $D, $A, $B, $words[6], 15, 0xa3014314); - self::step($I, $B, $C, $D, $A, $words[13], 21, 0x4e0811a1); - self::step($I, $A, $B, $C, $D, $words[4], 6, 0xf7537e82); - self::step($I, $D, $A, $B, $C, $words[11], 10, 0xbd3af235); - self::step($I, $C, $D, $A, $B, $words[2], 15, 0x2ad7d2bb); - self::step($I, $B, $C, $D, $A, $words[9], 21, 0xeb86d391); - - $this->a = ($this->a + $A) & 0xffffffff; - $this->b = ($this->b + $B) & 0xffffffff; - $this->c = ($this->c + $C) & 0xffffffff; - $this->d = ($this->d + $D) & 0xffffffff; - } - - private static function f($X, $Y, $Z) - { - return (($X & $Y) | ((~ $X) & $Z)); // X AND Y OR NOT X AND Z - } - - private static function g($X, $Y, $Z) - { - return (($X & $Z) | ($Y & (~ $Z))); // X AND Z OR Y AND NOT Z - } - - private static function h($X, $Y, $Z) - { - return ($X ^ $Y ^ $Z); // X XOR Y XOR Z - } - - private static function i($X, $Y, $Z) - { - return ($Y ^ ($X | (~ $Z))) ; // Y XOR (X OR NOT Z) - } - - private static function step($func, &$A, $B, $C, $D, $M, $s, $t) - { - $A = ($A + call_user_func($func, $B, $C, $D) + $M + $t) & 0xffffffff; - $A = self::rotate($A, $s); - $A = ($B + $A) & 0xffffffff; - } - - private static function rotate($decimal, $bits) - { - $binary = str_pad(decbin($decimal), 32, "0", STR_PAD_LEFT); - return bindec(substr($binary, $bits).substr($binary, 0, $bits)); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/RC4.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/RC4.php deleted file mode 100644 index 5640539..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/RC4.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -/** - * PHPExcel_Reader_Excel5_RC4 - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Reader_Excel5_RC4 -{ - // Context - protected $s = array(); - protected $i = 0; - protected $j = 0; - - /** - * RC4 stream decryption/encryption constrcutor - * - * @param string $key Encryption key/passphrase - */ - public function __construct($key) - { - $len = strlen($key); - - for ($this->i = 0; $this->i < 256; $this->i++) { - $this->s[$this->i] = $this->i; - } - - $this->j = 0; - for ($this->i = 0; $this->i < 256; $this->i++) { - $this->j = ($this->j + $this->s[$this->i] + ord($key[$this->i % $len])) % 256; - $t = $this->s[$this->i]; - $this->s[$this->i] = $this->s[$this->j]; - $this->s[$this->j] = $t; - } - $this->i = $this->j = 0; - } - - /** - * Symmetric decryption/encryption function - * - * @param string $data Data to encrypt/decrypt - * - * @return string - */ - public function RC4($data) - { - $len = strlen($data); - for ($c = 0; $c < $len; $c++) { - $this->i = ($this->i + 1) % 256; - $this->j = ($this->j + $this->s[$this->i]) % 256; - $t = $this->s[$this->i]; - $this->s[$this->i] = $this->s[$this->j]; - $this->s[$this->j] = $t; - - $t = ($this->s[$this->i] + $this->s[$this->j]) % 256; - - $data[$c] = chr(ord($data[$c]) ^ $this->s[$t]); - } - return $data; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Style/Border.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Style/Border.php deleted file mode 100644 index fb45b9d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Style/Border.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -class PHPExcel_Reader_Excel5_Style_Border -{ - protected static $map = array( - 0x00 => PHPExcel_Style_Border::BORDER_NONE, - 0x01 => PHPExcel_Style_Border::BORDER_THIN, - 0x02 => PHPExcel_Style_Border::BORDER_MEDIUM, - 0x03 => PHPExcel_Style_Border::BORDER_DASHED, - 0x04 => PHPExcel_Style_Border::BORDER_DOTTED, - 0x05 => PHPExcel_Style_Border::BORDER_THICK, - 0x06 => PHPExcel_Style_Border::BORDER_DOUBLE, - 0x07 => PHPExcel_Style_Border::BORDER_HAIR, - 0x08 => PHPExcel_Style_Border::BORDER_MEDIUMDASHED, - 0x09 => PHPExcel_Style_Border::BORDER_DASHDOT, - 0x0A => PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT, - 0x0B => PHPExcel_Style_Border::BORDER_DASHDOTDOT, - 0x0C => PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT, - 0x0D => PHPExcel_Style_Border::BORDER_SLANTDASHDOT, - ); - - /** - * Map border style - * OpenOffice documentation: 2.5.11 - * - * @param int $index - * @return string - */ - public static function lookup($index) - { - if (isset(self::$map[$index])) { - return self::$map[$index]; - } - return PHPExcel_Style_Border::BORDER_NONE; - } -} \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Style/FillPattern.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Style/FillPattern.php deleted file mode 100644 index c92d19a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Excel5/Style/FillPattern.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -class PHPExcel_Reader_Excel5_Style_FillPattern -{ - protected static $map = array( - 0x00 => PHPExcel_Style_Fill::FILL_NONE, - 0x01 => PHPExcel_Style_Fill::FILL_SOLID, - 0x02 => PHPExcel_Style_Fill::FILL_PATTERN_MEDIUMGRAY, - 0x03 => PHPExcel_Style_Fill::FILL_PATTERN_DARKGRAY, - 0x04 => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRAY, - 0x05 => PHPExcel_Style_Fill::FILL_PATTERN_DARKHORIZONTAL, - 0x06 => PHPExcel_Style_Fill::FILL_PATTERN_DARKVERTICAL, - 0x07 => PHPExcel_Style_Fill::FILL_PATTERN_DARKDOWN, - 0x08 => PHPExcel_Style_Fill::FILL_PATTERN_DARKUP, - 0x09 => PHPExcel_Style_Fill::FILL_PATTERN_DARKGRID, - 0x0A => PHPExcel_Style_Fill::FILL_PATTERN_DARKTRELLIS, - 0x0B => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTHORIZONTAL, - 0x0C => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTVERTICAL, - 0x0D => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTDOWN, - 0x0E => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTUP, - 0x0F => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRID, - 0x10 => PHPExcel_Style_Fill::FILL_PATTERN_LIGHTTRELLIS, - 0x11 => PHPExcel_Style_Fill::FILL_PATTERN_GRAY125, - 0x12 => PHPExcel_Style_Fill::FILL_PATTERN_GRAY0625, - ); - - /** - * Get fill pattern from index - * OpenOffice documentation: 2.5.12 - * - * @param int $index - * @return string - */ - public static function lookup($index) - { - if (isset(self::$map[$index])) { - return self::$map[$index]; - } - return PHPExcel_Style_Fill::FILL_NONE; - } -} \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Exception.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Exception.php deleted file mode 100644 index 48b3f82..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Exception.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * PHPExcel_Reader_Exception - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Reader_Exception extends PHPExcel_Exception -{ - /** - * Error handler callback - * - * @param mixed $code - * @param mixed $string - * @param mixed $file - * @param mixed $line - * @param mixed $context - */ - public static function errorHandlerCallback($code, $string, $file, $line, $context) - { - $e = new self($string, $code); - $e->line = $line; - $e->file = $file; - throw $e; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Gnumeric.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Gnumeric.php deleted file mode 100644 index 913e52b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/Gnumeric.php +++ /dev/null @@ -1,850 +0,0 @@ -<?php - -/** PHPExcel root directory */ -if (!defined('PHPEXCEL_ROOT')) { - /** - * @ignore - */ - define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../'); - require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); -} - -/** - * PHPExcel_Reader_Gnumeric - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Reader_Gnumeric extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader -{ - /** - * Formats - * - * @var array - */ - private $styles = array(); - - /** - * Shared Expressions - * - * @var array - */ - private $expressions = array(); - - private $referenceHelper = null; - - /** - * Create a new PHPExcel_Reader_Gnumeric - */ - public function __construct() - { - $this->readFilter = new PHPExcel_Reader_DefaultReadFilter(); - $this->referenceHelper = PHPExcel_ReferenceHelper::getInstance(); - } - - /** - * Can the current PHPExcel_Reader_IReader read the file? - * - * @param string $pFilename - * @return boolean - * @throws PHPExcel_Reader_Exception - */ - public function canRead($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - // Check if gzlib functions are available - if (!function_exists('gzread')) { - throw new PHPExcel_Reader_Exception("gzlib library is not enabled"); - } - - // Read signature data (first 3 bytes) - $fh = fopen($pFilename, 'r'); - $data = fread($fh, 2); - fclose($fh); - - if ($data != chr(0x1F).chr(0x8B)) { - return false; - } - - return true; - } - - /** - * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetNames($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $xml = new XMLReader(); - $xml->xml($this->securityScanFile('compress.zlib://'.realpath($pFilename)), null, PHPExcel_Settings::getLibXmlLoaderOptions()); - $xml->setParserProperty(2, true); - - $worksheetNames = array(); - while ($xml->read()) { - if ($xml->name == 'gnm:SheetName' && $xml->nodeType == XMLReader::ELEMENT) { - $xml->read(); // Move onto the value node - $worksheetNames[] = (string) $xml->value; - } elseif ($xml->name == 'gnm:Sheets') { - // break out of the loop once we've got our sheet names rather than parse the entire file - break; - } - } - - return $worksheetNames; - } - - /** - * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetInfo($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $xml = new XMLReader(); - $xml->xml($this->securityScanFile('compress.zlib://'.realpath($pFilename)), null, PHPExcel_Settings::getLibXmlLoaderOptions()); - $xml->setParserProperty(2, true); - - $worksheetInfo = array(); - while ($xml->read()) { - if ($xml->name == 'gnm:Sheet' && $xml->nodeType == XMLReader::ELEMENT) { - $tmpInfo = array( - 'worksheetName' => '', - 'lastColumnLetter' => 'A', - 'lastColumnIndex' => 0, - 'totalRows' => 0, - 'totalColumns' => 0, - ); - - while ($xml->read()) { - if ($xml->name == 'gnm:Name' && $xml->nodeType == XMLReader::ELEMENT) { - $xml->read(); // Move onto the value node - $tmpInfo['worksheetName'] = (string) $xml->value; - } elseif ($xml->name == 'gnm:MaxCol' && $xml->nodeType == XMLReader::ELEMENT) { - $xml->read(); // Move onto the value node - $tmpInfo['lastColumnIndex'] = (int) $xml->value; - $tmpInfo['totalColumns'] = (int) $xml->value + 1; - } elseif ($xml->name == 'gnm:MaxRow' && $xml->nodeType == XMLReader::ELEMENT) { - $xml->read(); // Move onto the value node - $tmpInfo['totalRows'] = (int) $xml->value + 1; - break; - } - } - $tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']); - $worksheetInfo[] = $tmpInfo; - } - } - - return $worksheetInfo; - } - - private function gzfileGetContents($filename) - { - $file = @gzopen($filename, 'rb'); - if ($file !== false) { - $data = ''; - while (!gzeof($file)) { - $data .= gzread($file, 1024); - } - gzclose($file); - } - return $data; - } - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename) - { - // Create new PHPExcel - $objPHPExcel = new PHPExcel(); - - // Load into this instance - return $this->loadIntoExisting($pFilename, $objPHPExcel); - } - - /** - * Loads PHPExcel from file into PHPExcel instance - * - * @param string $pFilename - * @param PHPExcel $objPHPExcel - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $timezoneObj = new DateTimeZone('Europe/London'); - $GMT = new DateTimeZone('UTC'); - - $gFileData = $this->gzfileGetContents($pFilename); - -// echo '<pre>'; -// echo htmlentities($gFileData,ENT_QUOTES,'UTF-8'); -// echo '</pre><hr />'; -// - $xml = simplexml_load_string($this->securityScan($gFileData), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $namespacesMeta = $xml->getNamespaces(true); - -// var_dump($namespacesMeta); -// - $gnmXML = $xml->children($namespacesMeta['gnm']); - - $docProps = $objPHPExcel->getProperties(); - // Document Properties are held differently, depending on the version of Gnumeric - if (isset($namespacesMeta['office'])) { - $officeXML = $xml->children($namespacesMeta['office']); - $officeDocXML = $officeXML->{'document-meta'}; - $officeDocMetaXML = $officeDocXML->meta; - - foreach ($officeDocMetaXML as $officePropertyData) { - $officePropertyDC = array(); - if (isset($namespacesMeta['dc'])) { - $officePropertyDC = $officePropertyData->children($namespacesMeta['dc']); - } - foreach ($officePropertyDC as $propertyName => $propertyValue) { - $propertyValue = (string) $propertyValue; - switch ($propertyName) { - case 'title': - $docProps->setTitle(trim($propertyValue)); - break; - case 'subject': - $docProps->setSubject(trim($propertyValue)); - break; - case 'creator': - $docProps->setCreator(trim($propertyValue)); - $docProps->setLastModifiedBy(trim($propertyValue)); - break; - case 'date': - $creationDate = strtotime(trim($propertyValue)); - $docProps->setCreated($creationDate); - $docProps->setModified($creationDate); - break; - case 'description': - $docProps->setDescription(trim($propertyValue)); - break; - } - } - $officePropertyMeta = array(); - if (isset($namespacesMeta['meta'])) { - $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']); - } - foreach ($officePropertyMeta as $propertyName => $propertyValue) { - $attributes = $propertyValue->attributes($namespacesMeta['meta']); - $propertyValue = (string) $propertyValue; - switch ($propertyName) { - case 'keyword': - $docProps->setKeywords(trim($propertyValue)); - break; - case 'initial-creator': - $docProps->setCreator(trim($propertyValue)); - $docProps->setLastModifiedBy(trim($propertyValue)); - break; - case 'creation-date': - $creationDate = strtotime(trim($propertyValue)); - $docProps->setCreated($creationDate); - $docProps->setModified($creationDate); - break; - case 'user-defined': - list(, $attrName) = explode(':', $attributes['name']); - switch ($attrName) { - case 'publisher': - $docProps->setCompany(trim($propertyValue)); - break; - case 'category': - $docProps->setCategory(trim($propertyValue)); - break; - case 'manager': - $docProps->setManager(trim($propertyValue)); - break; - } - break; - } - } - } - } elseif (isset($gnmXML->Summary)) { - foreach ($gnmXML->Summary->Item as $summaryItem) { - $propertyName = $summaryItem->name; - $propertyValue = $summaryItem->{'val-string'}; - switch ($propertyName) { - case 'title': - $docProps->setTitle(trim($propertyValue)); - break; - case 'comments': - $docProps->setDescription(trim($propertyValue)); - break; - case 'keywords': - $docProps->setKeywords(trim($propertyValue)); - break; - case 'category': - $docProps->setCategory(trim($propertyValue)); - break; - case 'manager': - $docProps->setManager(trim($propertyValue)); - break; - case 'author': - $docProps->setCreator(trim($propertyValue)); - $docProps->setLastModifiedBy(trim($propertyValue)); - break; - case 'company': - $docProps->setCompany(trim($propertyValue)); - break; - } - } - } - - $worksheetID = 0; - foreach ($gnmXML->Sheets->Sheet as $sheet) { - $worksheetName = (string) $sheet->Name; -// echo '<b>Worksheet: ', $worksheetName,'</b><br />'; - if ((isset($this->loadSheetsOnly)) && (!in_array($worksheetName, $this->loadSheetsOnly))) { - continue; - } - - $maxRow = $maxCol = 0; - - // Create new Worksheet - $objPHPExcel->createSheet(); - $objPHPExcel->setActiveSheetIndex($worksheetID); - // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in formula - // cells... during the load, all formulae should be correct, and we're simply bringing the worksheet - // name in line with the formula, not the reverse - $objPHPExcel->getActiveSheet()->setTitle($worksheetName, false); - - if ((!$this->readDataOnly) && (isset($sheet->PrintInformation))) { - if (isset($sheet->PrintInformation->Margins)) { - foreach ($sheet->PrintInformation->Margins->children('gnm', true) as $key => $margin) { - $marginAttributes = $margin->attributes(); - $marginSize = 72 / 100; // Default - switch ($marginAttributes['PrefUnit']) { - case 'mm': - $marginSize = intval($marginAttributes['Points']) / 100; - break; - } - switch ($key) { - case 'top': - $objPHPExcel->getActiveSheet()->getPageMargins()->setTop($marginSize); - break; - case 'bottom': - $objPHPExcel->getActiveSheet()->getPageMargins()->setBottom($marginSize); - break; - case 'left': - $objPHPExcel->getActiveSheet()->getPageMargins()->setLeft($marginSize); - break; - case 'right': - $objPHPExcel->getActiveSheet()->getPageMargins()->setRight($marginSize); - break; - case 'header': - $objPHPExcel->getActiveSheet()->getPageMargins()->setHeader($marginSize); - break; - case 'footer': - $objPHPExcel->getActiveSheet()->getPageMargins()->setFooter($marginSize); - break; - } - } - } - } - - foreach ($sheet->Cells->Cell as $cell) { - $cellAttributes = $cell->attributes(); - $row = (int) $cellAttributes->Row + 1; - $column = (int) $cellAttributes->Col; - - if ($row > $maxRow) { - $maxRow = $row; - } - if ($column > $maxCol) { - $maxCol = $column; - } - - $column = PHPExcel_Cell::stringFromColumnIndex($column); - - // Read cell? - if ($this->getReadFilter() !== null) { - if (!$this->getReadFilter()->readCell($column, $row, $worksheetName)) { - continue; - } - } - - $ValueType = $cellAttributes->ValueType; - $ExprID = (string) $cellAttributes->ExprID; -// echo 'Cell ', $column, $row,'<br />'; -// echo 'Type is ', $ValueType,'<br />'; -// echo 'Value is ', $cell,'<br />'; - $type = PHPExcel_Cell_DataType::TYPE_FORMULA; - if ($ExprID > '') { - if (((string) $cell) > '') { - $this->expressions[$ExprID] = array( - 'column' => $cellAttributes->Col, - 'row' => $cellAttributes->Row, - 'formula' => (string) $cell - ); -// echo 'NEW EXPRESSION ', $ExprID,'<br />'; - } else { - $expression = $this->expressions[$ExprID]; - - $cell = $this->referenceHelper->updateFormulaReferences( - $expression['formula'], - 'A1', - $cellAttributes->Col - $expression['column'], - $cellAttributes->Row - $expression['row'], - $worksheetName - ); -// echo 'SHARED EXPRESSION ', $ExprID,'<br />'; -// echo 'New Value is ', $cell,'<br />'; - } - $type = PHPExcel_Cell_DataType::TYPE_FORMULA; - } else { - switch ($ValueType) { - case '10': // NULL - $type = PHPExcel_Cell_DataType::TYPE_NULL; - break; - case '20': // Boolean - $type = PHPExcel_Cell_DataType::TYPE_BOOL; - $cell = ($cell == 'TRUE') ? true: false; - break; - case '30': // Integer - $cell = intval($cell); - // Excel 2007+ doesn't differentiate between integer and float, so set the value and dropthru to the next (numeric) case - case '40': // Float - $type = PHPExcel_Cell_DataType::TYPE_NUMERIC; - break; - case '50': // Error - $type = PHPExcel_Cell_DataType::TYPE_ERROR; - break; - case '60': // String - $type = PHPExcel_Cell_DataType::TYPE_STRING; - break; - case '70': // Cell Range - case '80': // Array - } - } - $objPHPExcel->getActiveSheet()->getCell($column.$row)->setValueExplicit($cell, $type); - } - - if ((!$this->readDataOnly) && (isset($sheet->Objects))) { - foreach ($sheet->Objects->children('gnm', true) as $key => $comment) { - $commentAttributes = $comment->attributes(); - // Only comment objects are handled at the moment - if ($commentAttributes->Text) { - $objPHPExcel->getActiveSheet()->getComment((string)$commentAttributes->ObjectBound)->setAuthor((string)$commentAttributes->Author)->setText($this->parseRichText((string)$commentAttributes->Text)); - } - } - } -// echo '$maxCol=', $maxCol,'; $maxRow=', $maxRow,'<br />'; -// - foreach ($sheet->Styles->StyleRegion as $styleRegion) { - $styleAttributes = $styleRegion->attributes(); - if (($styleAttributes['startRow'] <= $maxRow) && - ($styleAttributes['startCol'] <= $maxCol)) { - $startColumn = PHPExcel_Cell::stringFromColumnIndex((int) $styleAttributes['startCol']); - $startRow = $styleAttributes['startRow'] + 1; - - $endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : (int) $styleAttributes['endCol']; - $endColumn = PHPExcel_Cell::stringFromColumnIndex($endColumn); - $endRow = ($styleAttributes['endRow'] > $maxRow) ? $maxRow : $styleAttributes['endRow']; - $endRow += 1; - $cellRange = $startColumn.$startRow.':'.$endColumn.$endRow; -// echo $cellRange,'<br />'; - - $styleAttributes = $styleRegion->Style->attributes(); -// var_dump($styleAttributes); -// echo '<br />'; - - // We still set the number format mask for date/time values, even if readDataOnly is true - if ((!$this->readDataOnly) || - (PHPExcel_Shared_Date::isDateTimeFormatCode((string) $styleAttributes['Format']))) { - $styleArray = array(); - $styleArray['numberformat']['code'] = (string) $styleAttributes['Format']; - // If readDataOnly is false, we set all formatting information - if (!$this->readDataOnly) { - switch ($styleAttributes['HAlign']) { - case '1': - $styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL; - break; - case '2': - $styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_LEFT; - break; - case '4': - $styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_RIGHT; - break; - case '8': - $styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_CENTER; - break; - case '16': - case '64': - $styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS; - break; - case '32': - $styleArray['alignment']['horizontal'] = PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY; - break; - } - - switch ($styleAttributes['VAlign']) { - case '1': - $styleArray['alignment']['vertical'] = PHPExcel_Style_Alignment::VERTICAL_TOP; - break; - case '2': - $styleArray['alignment']['vertical'] = PHPExcel_Style_Alignment::VERTICAL_BOTTOM; - break; - case '4': - $styleArray['alignment']['vertical'] = PHPExcel_Style_Alignment::VERTICAL_CENTER; - break; - case '8': - $styleArray['alignment']['vertical'] = PHPExcel_Style_Alignment::VERTICAL_JUSTIFY; - break; - } - - $styleArray['alignment']['wrap'] = ($styleAttributes['WrapText'] == '1') ? true : false; - $styleArray['alignment']['shrinkToFit'] = ($styleAttributes['ShrinkToFit'] == '1') ? true : false; - $styleArray['alignment']['indent'] = (intval($styleAttributes["Indent"]) > 0) ? $styleAttributes["indent"] : 0; - - $RGB = self::parseGnumericColour($styleAttributes["Fore"]); - $styleArray['font']['color']['rgb'] = $RGB; - $RGB = self::parseGnumericColour($styleAttributes["Back"]); - $shade = $styleAttributes["Shade"]; - if (($RGB != '000000') || ($shade != '0')) { - $styleArray['fill']['color']['rgb'] = $styleArray['fill']['startcolor']['rgb'] = $RGB; - $RGB2 = self::parseGnumericColour($styleAttributes["PatternColor"]); - $styleArray['fill']['endcolor']['rgb'] = $RGB2; - switch ($shade) { - case '1': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_SOLID; - break; - case '2': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR; - break; - case '3': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_GRADIENT_PATH; - break; - case '4': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKDOWN; - break; - case '5': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKGRAY; - break; - case '6': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKGRID; - break; - case '7': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKHORIZONTAL; - break; - case '8': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKTRELLIS; - break; - case '9': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKUP; - break; - case '10': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_DARKVERTICAL; - break; - case '11': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_GRAY0625; - break; - case '12': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_GRAY125; - break; - case '13': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTDOWN; - break; - case '14': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRAY; - break; - case '15': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRID; - break; - case '16': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTHORIZONTAL; - break; - case '17': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTTRELLIS; - break; - case '18': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTUP; - break; - case '19': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_LIGHTVERTICAL; - break; - case '20': - $styleArray['fill']['type'] = PHPExcel_Style_Fill::FILL_PATTERN_MEDIUMGRAY; - break; - } - } - - $fontAttributes = $styleRegion->Style->Font->attributes(); -// var_dump($fontAttributes); -// echo '<br />'; - $styleArray['font']['name'] = (string) $styleRegion->Style->Font; - $styleArray['font']['size'] = intval($fontAttributes['Unit']); - $styleArray['font']['bold'] = ($fontAttributes['Bold'] == '1') ? true : false; - $styleArray['font']['italic'] = ($fontAttributes['Italic'] == '1') ? true : false; - $styleArray['font']['strike'] = ($fontAttributes['StrikeThrough'] == '1') ? true : false; - switch ($fontAttributes['Underline']) { - case '1': - $styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_SINGLE; - break; - case '2': - $styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_DOUBLE; - break; - case '3': - $styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING; - break; - case '4': - $styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING; - break; - default: - $styleArray['font']['underline'] = PHPExcel_Style_Font::UNDERLINE_NONE; - break; - } - switch ($fontAttributes['Script']) { - case '1': - $styleArray['font']['superScript'] = true; - break; - case '-1': - $styleArray['font']['subScript'] = true; - break; - } - - if (isset($styleRegion->Style->StyleBorder)) { - if (isset($styleRegion->Style->StyleBorder->Top)) { - $styleArray['borders']['top'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Top->attributes()); - } - if (isset($styleRegion->Style->StyleBorder->Bottom)) { - $styleArray['borders']['bottom'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Bottom->attributes()); - } - if (isset($styleRegion->Style->StyleBorder->Left)) { - $styleArray['borders']['left'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Left->attributes()); - } - if (isset($styleRegion->Style->StyleBorder->Right)) { - $styleArray['borders']['right'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Right->attributes()); - } - if ((isset($styleRegion->Style->StyleBorder->Diagonal)) && (isset($styleRegion->Style->StyleBorder->{'Rev-Diagonal'}))) { - $styleArray['borders']['diagonal'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Diagonal->attributes()); - $styleArray['borders']['diagonaldirection'] = PHPExcel_Style_Borders::DIAGONAL_BOTH; - } elseif (isset($styleRegion->Style->StyleBorder->Diagonal)) { - $styleArray['borders']['diagonal'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->Diagonal->attributes()); - $styleArray['borders']['diagonaldirection'] = PHPExcel_Style_Borders::DIAGONAL_UP; - } elseif (isset($styleRegion->Style->StyleBorder->{'Rev-Diagonal'})) { - $styleArray['borders']['diagonal'] = self::parseBorderAttributes($styleRegion->Style->StyleBorder->{'Rev-Diagonal'}->attributes()); - $styleArray['borders']['diagonaldirection'] = PHPExcel_Style_Borders::DIAGONAL_DOWN; - } - } - if (isset($styleRegion->Style->HyperLink)) { - // TO DO - $hyperlink = $styleRegion->Style->HyperLink->attributes(); - } - } -// var_dump($styleArray); -// echo '<br />'; - $objPHPExcel->getActiveSheet()->getStyle($cellRange)->applyFromArray($styleArray); - } - } - } - - if ((!$this->readDataOnly) && (isset($sheet->Cols))) { - // Column Widths - $columnAttributes = $sheet->Cols->attributes(); - $defaultWidth = $columnAttributes['DefaultSizePts'] / 5.4; - $c = 0; - foreach ($sheet->Cols->ColInfo as $columnOverride) { - $columnAttributes = $columnOverride->attributes(); - $column = $columnAttributes['No']; - $columnWidth = $columnAttributes['Unit'] / 5.4; - $hidden = ((isset($columnAttributes['Hidden'])) && ($columnAttributes['Hidden'] == '1')) ? true : false; - $columnCount = (isset($columnAttributes['Count'])) ? $columnAttributes['Count'] : 1; - while ($c < $column) { - $objPHPExcel->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($c))->setWidth($defaultWidth); - ++$c; - } - while (($c < ($column+$columnCount)) && ($c <= $maxCol)) { - $objPHPExcel->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($c))->setWidth($columnWidth); - if ($hidden) { - $objPHPExcel->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($c))->setVisible(false); - } - ++$c; - } - } - while ($c <= $maxCol) { - $objPHPExcel->getActiveSheet()->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($c))->setWidth($defaultWidth); - ++$c; - } - } - - if ((!$this->readDataOnly) && (isset($sheet->Rows))) { - // Row Heights - $rowAttributes = $sheet->Rows->attributes(); - $defaultHeight = $rowAttributes['DefaultSizePts']; - $r = 0; - - foreach ($sheet->Rows->RowInfo as $rowOverride) { - $rowAttributes = $rowOverride->attributes(); - $row = $rowAttributes['No']; - $rowHeight = $rowAttributes['Unit']; - $hidden = ((isset($rowAttributes['Hidden'])) && ($rowAttributes['Hidden'] == '1')) ? true : false; - $rowCount = (isset($rowAttributes['Count'])) ? $rowAttributes['Count'] : 1; - while ($r < $row) { - ++$r; - $objPHPExcel->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight); - } - while (($r < ($row+$rowCount)) && ($r < $maxRow)) { - ++$r; - $objPHPExcel->getActiveSheet()->getRowDimension($r)->setRowHeight($rowHeight); - if ($hidden) { - $objPHPExcel->getActiveSheet()->getRowDimension($r)->setVisible(false); - } - } - } - while ($r < $maxRow) { - ++$r; - $objPHPExcel->getActiveSheet()->getRowDimension($r)->setRowHeight($defaultHeight); - } - } - - // Handle Merged Cells in this worksheet - if (isset($sheet->MergedRegions)) { - foreach ($sheet->MergedRegions->Merge as $mergeCells) { - if (strpos($mergeCells, ':') !== false) { - $objPHPExcel->getActiveSheet()->mergeCells($mergeCells); - } - } - } - - $worksheetID++; - } - - // Loop through definedNames (global named ranges) - if (isset($gnmXML->Names)) { - foreach ($gnmXML->Names->Name as $namedRange) { - $name = (string) $namedRange->name; - $range = (string) $namedRange->value; - if (stripos($range, '#REF!') !== false) { - continue; - } - - $range = explode('!', $range); - $range[0] = trim($range[0], "'"); - if ($worksheet = $objPHPExcel->getSheetByName($range[0])) { - $extractedRange = str_replace('$', '', $range[1]); - $objPHPExcel->addNamedRange(new PHPExcel_NamedRange($name, $worksheet, $extractedRange)); - } - } - } - - // Return - return $objPHPExcel; - } - - private static function parseBorderAttributes($borderAttributes) - { - $styleArray = array(); - if (isset($borderAttributes["Color"])) { - $styleArray['color']['rgb'] = self::parseGnumericColour($borderAttributes["Color"]); - } - - switch ($borderAttributes["Style"]) { - case '0': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_NONE; - break; - case '1': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - case '2': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUM; - break; - case '3': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_SLANTDASHDOT; - break; - case '4': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_DASHED; - break; - case '5': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_THICK; - break; - case '6': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_DOUBLE; - break; - case '7': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_DOTTED; - break; - case '8': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUMDASHED; - break; - case '9': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_DASHDOT; - break; - case '10': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT; - break; - case '11': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_DASHDOTDOT; - break; - case '12': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT; - break; - case '13': - $styleArray['style'] = PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT; - break; - } - return $styleArray; - } - - private function parseRichText($is = '') - { - $value = new PHPExcel_RichText(); - $value->createText($is); - - return $value; - } - - private static function parseGnumericColour($gnmColour) - { - list($gnmR, $gnmG, $gnmB) = explode(':', $gnmColour); - $gnmR = substr(str_pad($gnmR, 4, '0', STR_PAD_RIGHT), 0, 2); - $gnmG = substr(str_pad($gnmG, 4, '0', STR_PAD_RIGHT), 0, 2); - $gnmB = substr(str_pad($gnmB, 4, '0', STR_PAD_RIGHT), 0, 2); - return $gnmR . $gnmG . $gnmB; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/HTML.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/HTML.php deleted file mode 100644 index ac762a4..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/HTML.php +++ /dev/null @@ -1,549 +0,0 @@ -<?php - -if (!defined('PHPEXCEL_ROOT')) { - /** - * @ignore - */ - define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../'); - require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); -} - -/** - * PHPExcel_Reader_HTML - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -/** PHPExcel root directory */ -class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader -{ - - /** - * Input encoding - * - * @var string - */ - protected $inputEncoding = 'ANSI'; - - /** - * Sheet index to read - * - * @var int - */ - protected $sheetIndex = 0; - - /** - * Formats - * - * @var array - */ - protected $formats = array( - 'h1' => array( - 'font' => array( - 'bold' => true, - 'size' => 24, - ), - ), // Bold, 24pt - 'h2' => array( - 'font' => array( - 'bold' => true, - 'size' => 18, - ), - ), // Bold, 18pt - 'h3' => array( - 'font' => array( - 'bold' => true, - 'size' => 13.5, - ), - ), // Bold, 13.5pt - 'h4' => array( - 'font' => array( - 'bold' => true, - 'size' => 12, - ), - ), // Bold, 12pt - 'h5' => array( - 'font' => array( - 'bold' => true, - 'size' => 10, - ), - ), // Bold, 10pt - 'h6' => array( - 'font' => array( - 'bold' => true, - 'size' => 7.5, - ), - ), // Bold, 7.5pt - 'a' => array( - 'font' => array( - 'underline' => true, - 'color' => array( - 'argb' => PHPExcel_Style_Color::COLOR_BLUE, - ), - ), - ), // Blue underlined - 'hr' => array( - 'borders' => array( - 'bottom' => array( - 'style' => PHPExcel_Style_Border::BORDER_THIN, - 'color' => array( - PHPExcel_Style_Color::COLOR_BLACK, - ), - ), - ), - ), // Bottom border - ); - - protected $rowspan = array(); - - /** - * Create a new PHPExcel_Reader_HTML - */ - public function __construct() - { - $this->readFilter = new PHPExcel_Reader_DefaultReadFilter(); - } - - /** - * Validate that the current file is an HTML file - * - * @return boolean - */ - protected function isValidFormat() - { - // Reading 2048 bytes should be enough to validate that the format is HTML - $data = fread($this->fileHandle, 2048); - if ((strpos($data, '<') !== false) && - (strlen($data) !== strlen(strip_tags($data)))) { - return true; - } - - return false; - } - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename) - { - // Create new PHPExcel - $objPHPExcel = new PHPExcel(); - - // Load into this instance - return $this->loadIntoExisting($pFilename, $objPHPExcel); - } - - /** - * Set input encoding - * - * @param string $pValue Input encoding - */ - public function setInputEncoding($pValue = 'ANSI') - { - $this->inputEncoding = $pValue; - - return $this; - } - - /** - * Get input encoding - * - * @return string - */ - public function getInputEncoding() - { - return $this->inputEncoding; - } - - // Data Array used for testing only, should write to PHPExcel object on completion of tests - protected $dataArray = array(); - protected $tableLevel = 0; - protected $nestedColumn = array('A'); - - protected function setTableStartColumn($column) - { - if ($this->tableLevel == 0) { - $column = 'A'; - } - ++$this->tableLevel; - $this->nestedColumn[$this->tableLevel] = $column; - - return $this->nestedColumn[$this->tableLevel]; - } - - protected function getTableStartColumn() - { - return $this->nestedColumn[$this->tableLevel]; - } - - protected function releaseTableStartColumn() - { - --$this->tableLevel; - - return array_pop($this->nestedColumn); - } - - protected function flushCell($sheet, $column, $row, &$cellContent) - { - if (is_string($cellContent)) { - // Simple String content - if (trim($cellContent) > '') { - // Only actually write it if there's content in the string -// echo 'FLUSH CELL: ' , $column , $row , ' => ' , $cellContent , '<br />'; - // Write to worksheet to be done here... - // ... we return the cell so we can mess about with styles more easily - $sheet->setCellValue($column . $row, $cellContent, true); - $this->dataArray[$row][$column] = $cellContent; - } - } else { - // We have a Rich Text run - // TODO - $this->dataArray[$row][$column] = 'RICH TEXT: ' . $cellContent; - } - $cellContent = (string) ''; - } - - protected function processDomElement(DOMNode $element, $sheet, &$row, &$column, &$cellContent, $format = null) - { - foreach ($element->childNodes as $child) { - if ($child instanceof DOMText) { - $domText = preg_replace('/\s+/u', ' ', trim($child->nodeValue)); - if (is_string($cellContent)) { - // simply append the text if the cell content is a plain text string - $cellContent .= $domText; - } else { - // but if we have a rich text run instead, we need to append it correctly - // TODO - } - } elseif ($child instanceof DOMElement) { -// echo '<b>DOM ELEMENT: </b>' , strtoupper($child->nodeName) , '<br />'; - - $attributeArray = array(); - foreach ($child->attributes as $attribute) { -// echo '<b>ATTRIBUTE: </b>' , $attribute->name , ' => ' , $attribute->value , '<br />'; - $attributeArray[$attribute->name] = $attribute->value; - } - - switch ($child->nodeName) { - case 'meta': - foreach ($attributeArray as $attributeName => $attributeValue) { - switch ($attributeName) { - case 'content': - // TODO - // Extract character set, so we can convert to UTF-8 if required - break; - } - } - $this->processDomElement($child, $sheet, $row, $column, $cellContent); - break; - case 'title': - $this->processDomElement($child, $sheet, $row, $column, $cellContent); - $sheet->setTitle($cellContent); - $cellContent = ''; - break; - case 'span': - case 'div': - case 'font': - case 'i': - case 'em': - case 'strong': - case 'b': -// echo 'STYLING, SPAN OR DIV<br />'; - if ($cellContent > '') { - $cellContent .= ' '; - } - $this->processDomElement($child, $sheet, $row, $column, $cellContent); - if ($cellContent > '') { - $cellContent .= ' '; - } -// echo 'END OF STYLING, SPAN OR DIV<br />'; - break; - case 'hr': - $this->flushCell($sheet, $column, $row, $cellContent); - ++$row; - if (isset($this->formats[$child->nodeName])) { - $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); - } else { - $cellContent = '----------'; - $this->flushCell($sheet, $column, $row, $cellContent); - } - ++$row; - // Add a break after a horizontal rule, simply by allowing the code to dropthru - case 'br': - if ($this->tableLevel > 0) { - // If we're inside a table, replace with a \n - $cellContent .= "\n"; - } else { - // Otherwise flush our existing content and move the row cursor on - $this->flushCell($sheet, $column, $row, $cellContent); - ++$row; - } -// echo 'HARD LINE BREAK: ' , '<br />'; - break; - case 'a': -// echo 'START OF HYPERLINK: ' , '<br />'; - foreach ($attributeArray as $attributeName => $attributeValue) { - switch ($attributeName) { - case 'href': -// echo 'Link to ' , $attributeValue , '<br />'; - $sheet->getCell($column . $row)->getHyperlink()->setUrl($attributeValue); - if (isset($this->formats[$child->nodeName])) { - $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); - } - break; - } - } - $cellContent .= ' '; - $this->processDomElement($child, $sheet, $row, $column, $cellContent); -// echo 'END OF HYPERLINK:' , '<br />'; - break; - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': - case 'ol': - case 'ul': - case 'p': - if ($this->tableLevel > 0) { - // If we're inside a table, replace with a \n - $cellContent .= "\n"; -// echo 'LIST ENTRY: ' , '<br />'; - $this->processDomElement($child, $sheet, $row, $column, $cellContent); -// echo 'END OF LIST ENTRY:' , '<br />'; - } else { - if ($cellContent > '') { - $this->flushCell($sheet, $column, $row, $cellContent); - $row++; - } -// echo 'START OF PARAGRAPH: ' , '<br />'; - $this->processDomElement($child, $sheet, $row, $column, $cellContent); -// echo 'END OF PARAGRAPH:' , '<br />'; - $this->flushCell($sheet, $column, $row, $cellContent); - - if (isset($this->formats[$child->nodeName])) { - $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); - } - - $row++; - $column = 'A'; - } - break; - case 'li': - if ($this->tableLevel > 0) { - // If we're inside a table, replace with a \n - $cellContent .= "\n"; -// echo 'LIST ENTRY: ' , '<br />'; - $this->processDomElement($child, $sheet, $row, $column, $cellContent); -// echo 'END OF LIST ENTRY:' , '<br />'; - } else { - if ($cellContent > '') { - $this->flushCell($sheet, $column, $row, $cellContent); - } - ++$row; -// echo 'LIST ENTRY: ' , '<br />'; - $this->processDomElement($child, $sheet, $row, $column, $cellContent); -// echo 'END OF LIST ENTRY:' , '<br />'; - $this->flushCell($sheet, $column, $row, $cellContent); - $column = 'A'; - } - break; - case 'table': - $this->flushCell($sheet, $column, $row, $cellContent); - $column = $this->setTableStartColumn($column); -// echo 'START OF TABLE LEVEL ' , $this->tableLevel , '<br />'; - if ($this->tableLevel > 1) { - --$row; - } - $this->processDomElement($child, $sheet, $row, $column, $cellContent); -// echo 'END OF TABLE LEVEL ' , $this->tableLevel , '<br />'; - $column = $this->releaseTableStartColumn(); - if ($this->tableLevel > 1) { - ++$column; - } else { - ++$row; - } - break; - case 'thead': - case 'tbody': - $this->processDomElement($child, $sheet, $row, $column, $cellContent); - break; - case 'tr': - $column = $this->getTableStartColumn(); - $cellContent = ''; -// echo 'START OF TABLE ' , $this->tableLevel , ' ROW<br />'; - $this->processDomElement($child, $sheet, $row, $column, $cellContent); - ++$row; -// echo 'END OF TABLE ' , $this->tableLevel , ' ROW<br />'; - break; - case 'th': - case 'td': -// echo 'START OF TABLE ' , $this->tableLevel , ' CELL<br />'; - $this->processDomElement($child, $sheet, $row, $column, $cellContent); -// echo 'END OF TABLE ' , $this->tableLevel , ' CELL<br />'; - - while (isset($this->rowspan[$column . $row])) { - ++$column; - } - - $this->flushCell($sheet, $column, $row, $cellContent); - -// if (isset($attributeArray['style']) && !empty($attributeArray['style'])) { -// $styleAry = $this->getPhpExcelStyleArray($attributeArray['style']); -// -// if (!empty($styleAry)) { -// $sheet->getStyle($column . $row)->applyFromArray($styleAry); -// } -// } - - if (isset($attributeArray['rowspan']) && isset($attributeArray['colspan'])) { - //create merging rowspan and colspan - $columnTo = $column; - for ($i = 0; $i < $attributeArray['colspan'] - 1; $i++) { - ++$columnTo; - } - $range = $column . $row . ':' . $columnTo . ($row + $attributeArray['rowspan'] - 1); - foreach (\PHPExcel_Cell::extractAllCellReferencesInRange($range) as $value) { - $this->rowspan[$value] = true; - } - $sheet->mergeCells($range); - $column = $columnTo; - } elseif (isset($attributeArray['rowspan'])) { - //create merging rowspan - $range = $column . $row . ':' . $column . ($row + $attributeArray['rowspan'] - 1); - foreach (\PHPExcel_Cell::extractAllCellReferencesInRange($range) as $value) { - $this->rowspan[$value] = true; - } - $sheet->mergeCells($range); - } elseif (isset($attributeArray['colspan'])) { - //create merging colspan - $columnTo = $column; - for ($i = 0; $i < $attributeArray['colspan'] - 1; $i++) { - ++$columnTo; - } - $sheet->mergeCells($column . $row . ':' . $columnTo . $row); - $column = $columnTo; - } - ++$column; - break; - case 'body': - $row = 1; - $column = 'A'; - $content = ''; - $this->tableLevel = 0; - $this->processDomElement($child, $sheet, $row, $column, $cellContent); - break; - default: - $this->processDomElement($child, $sheet, $row, $column, $cellContent); - } - } - } - } - - /** - * Loads PHPExcel from file into PHPExcel instance - * - * @param string $pFilename - * @param PHPExcel $objPHPExcel - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) - { - // Open file to validate - $this->openFile($pFilename); - if (!$this->isValidFormat()) { - fclose($this->fileHandle); - throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid HTML file."); - } - // Close after validating - fclose($this->fileHandle); - - // Create new PHPExcel - while ($objPHPExcel->getSheetCount() <= $this->sheetIndex) { - $objPHPExcel->createSheet(); - } - $objPHPExcel->setActiveSheetIndex($this->sheetIndex); - - // Create a new DOM object - $dom = new domDocument; - // Reload the HTML file into the DOM object - $loaded = $dom->loadHTML(mb_convert_encoding($this->securityScanFile($pFilename), 'HTML-ENTITIES', 'UTF-8')); - if ($loaded === false) { - throw new PHPExcel_Reader_Exception('Failed to load ' . $pFilename . ' as a DOM Document'); - } - - // Discard white space - $dom->preserveWhiteSpace = false; - - $row = 0; - $column = 'A'; - $content = ''; - $this->processDomElement($dom, $objPHPExcel->getActiveSheet(), $row, $column, $content); - - // Return - return $objPHPExcel; - } - - /** - * Get sheet index - * - * @return int - */ - public function getSheetIndex() - { - return $this->sheetIndex; - } - - /** - * Set sheet index - * - * @param int $pValue Sheet index - * @return PHPExcel_Reader_HTML - */ - public function setSheetIndex($pValue = 0) - { - $this->sheetIndex = $pValue; - - return $this; - } - - /** - * Scan theXML for use of <!ENTITY to prevent XXE/XEE attacks - * - * @param string $xml - * @throws PHPExcel_Reader_Exception - */ - public function securityScan($xml) - { - $pattern = '/\\0?' . implode('\\0?', str_split('<!ENTITY')) . '\\0?/'; - if (preg_match($pattern, $xml)) { - throw new PHPExcel_Reader_Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); - } - return $xml; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/IReadFilter.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/IReadFilter.php deleted file mode 100644 index f7c852d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/IReadFilter.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/** - * PHPExcel_Reader_IReadFilter - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -interface PHPExcel_Reader_IReadFilter -{ - /** - * Should this cell be read? - * - * @param $column Column address (as a string value like "A", or "IV") - * @param $row Row number - * @param $worksheetName Optional worksheet name - * @return boolean - */ - public function readCell($column, $row, $worksheetName = ''); -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/IReader.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/IReader.php deleted file mode 100644 index 9034546..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/IReader.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * PHPExcel_Reader_IReader - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -interface PHPExcel_Reader_IReader -{ - /** - * Can the current PHPExcel_Reader_IReader read the file? - * - * @param string $pFilename - * @return boolean - */ - public function canRead($pFilename); - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename); -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/OOCalc.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/OOCalc.php deleted file mode 100644 index a889d95..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/OOCalc.php +++ /dev/null @@ -1,696 +0,0 @@ -<?php - -/** PHPExcel root directory */ -if (!defined('PHPEXCEL_ROOT')) { - /** - * @ignore - */ - define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../'); - require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); -} - -/** - * PHPExcel_Reader_OOCalc - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Reader_OOCalc extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader -{ - /** - * Formats - * - * @var array - */ - private $styles = array(); - - /** - * Create a new PHPExcel_Reader_OOCalc - */ - public function __construct() - { - $this->readFilter = new PHPExcel_Reader_DefaultReadFilter(); - } - - /** - * Can the current PHPExcel_Reader_IReader read the file? - * - * @param string $pFilename - * @return boolean - * @throws PHPExcel_Reader_Exception - */ - public function canRead($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $zipClass = PHPExcel_Settings::getZipClass(); - - // Check if zip class exists -// if (!class_exists($zipClass, false)) { -// throw new PHPExcel_Reader_Exception($zipClass . " library is not enabled"); -// } - - $mimeType = 'UNKNOWN'; - // Load file - $zip = new $zipClass; - if ($zip->open($pFilename) === true) { - // check if it is an OOXML archive - $stat = $zip->statName('mimetype'); - if ($stat && ($stat['size'] <= 255)) { - $mimeType = $zip->getFromName($stat['name']); - } elseif ($stat = $zip->statName('META-INF/manifest.xml')) { - $xml = simplexml_load_string($this->securityScan($zip->getFromName('META-INF/manifest.xml')), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $namespacesContent = $xml->getNamespaces(true); - if (isset($namespacesContent['manifest'])) { - $manifest = $xml->children($namespacesContent['manifest']); - foreach ($manifest as $manifestDataSet) { - $manifestAttributes = $manifestDataSet->attributes($namespacesContent['manifest']); - if ($manifestAttributes->{'full-path'} == '/') { - $mimeType = (string) $manifestAttributes->{'media-type'}; - break; - } - } - } - } - - $zip->close(); - - return ($mimeType === 'application/vnd.oasis.opendocument.spreadsheet'); - } - - return false; - } - - - /** - * Reads names of the worksheets from a file, without parsing the whole file to a PHPExcel object - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetNames($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $zipClass = PHPExcel_Settings::getZipClass(); - - $zip = new $zipClass; - if (!$zip->open($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! Error opening file."); - } - - $worksheetNames = array(); - - $xml = new XMLReader(); - $res = $xml->xml($this->securityScanFile('zip://'.realpath($pFilename).'#content.xml'), null, PHPExcel_Settings::getLibXmlLoaderOptions()); - $xml->setParserProperty(2, true); - - // Step into the first level of content of the XML - $xml->read(); - while ($xml->read()) { - // Quickly jump through to the office:body node - while ($xml->name !== 'office:body') { - if ($xml->isEmptyElement) { - $xml->read(); - } else { - $xml->next(); - } - } - // Now read each node until we find our first table:table node - while ($xml->read()) { - if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) { - // Loop through each table:table node reading the table:name attribute for each worksheet name - do { - $worksheetNames[] = $xml->getAttribute('table:name'); - $xml->next(); - } while ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT); - } - } - } - - return $worksheetNames; - } - - /** - * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetInfo($pFilename) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $worksheetInfo = array(); - - $zipClass = PHPExcel_Settings::getZipClass(); - - $zip = new $zipClass; - if (!$zip->open($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! Error opening file."); - } - - $xml = new XMLReader(); - $res = $xml->xml($this->securityScanFile('zip://'.realpath($pFilename).'#content.xml'), null, PHPExcel_Settings::getLibXmlLoaderOptions()); - $xml->setParserProperty(2, true); - - // Step into the first level of content of the XML - $xml->read(); - while ($xml->read()) { - // Quickly jump through to the office:body node - while ($xml->name !== 'office:body') { - if ($xml->isEmptyElement) { - $xml->read(); - } else { - $xml->next(); - } - } - // Now read each node until we find our first table:table node - while ($xml->read()) { - if ($xml->name == 'table:table' && $xml->nodeType == XMLReader::ELEMENT) { - $worksheetNames[] = $xml->getAttribute('table:name'); - - $tmpInfo = array( - 'worksheetName' => $xml->getAttribute('table:name'), - 'lastColumnLetter' => 'A', - 'lastColumnIndex' => 0, - 'totalRows' => 0, - 'totalColumns' => 0, - ); - - // Loop through each child node of the table:table element reading - $currCells = 0; - do { - $xml->read(); - if ($xml->name == 'table:table-row' && $xml->nodeType == XMLReader::ELEMENT) { - $rowspan = $xml->getAttribute('table:number-rows-repeated'); - $rowspan = empty($rowspan) ? 1 : $rowspan; - $tmpInfo['totalRows'] += $rowspan; - $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); - $currCells = 0; - // Step into the row - $xml->read(); - do { - if ($xml->name == 'table:table-cell' && $xml->nodeType == XMLReader::ELEMENT) { - if (!$xml->isEmptyElement) { - $currCells++; - $xml->next(); - } else { - $xml->read(); - } - } elseif ($xml->name == 'table:covered-table-cell' && $xml->nodeType == XMLReader::ELEMENT) { - $mergeSize = $xml->getAttribute('table:number-columns-repeated'); - $currCells += $mergeSize; - $xml->read(); - } - } while ($xml->name != 'table:table-row'); - } - } while ($xml->name != 'table:table'); - - $tmpInfo['totalColumns'] = max($tmpInfo['totalColumns'], $currCells); - $tmpInfo['lastColumnIndex'] = $tmpInfo['totalColumns'] - 1; - $tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']); - $worksheetInfo[] = $tmpInfo; - } - } - -// foreach ($workbookData->table as $worksheetDataSet) { -// $worksheetData = $worksheetDataSet->children($namespacesContent['table']); -// $worksheetDataAttributes = $worksheetDataSet->attributes($namespacesContent['table']); -// -// $rowIndex = 0; -// foreach ($worksheetData as $key => $rowData) { -// switch ($key) { -// case 'table-row' : -// $rowDataTableAttributes = $rowData->attributes($namespacesContent['table']); -// $rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ? -// $rowDataTableAttributes['number-rows-repeated'] : 1; -// $columnIndex = 0; -// -// foreach ($rowData as $key => $cellData) { -// $cellDataTableAttributes = $cellData->attributes($namespacesContent['table']); -// $colRepeats = (isset($cellDataTableAttributes['number-columns-repeated'])) ? -// $cellDataTableAttributes['number-columns-repeated'] : 1; -// $cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']); -// if (isset($cellDataOfficeAttributes['value-type'])) { -// $tmpInfo['lastColumnIndex'] = max($tmpInfo['lastColumnIndex'], $columnIndex + $colRepeats - 1); -// $tmpInfo['totalRows'] = max($tmpInfo['totalRows'], $rowIndex + $rowRepeats); -// } -// $columnIndex += $colRepeats; -// } -// $rowIndex += $rowRepeats; -// break; -// } -// } -// -// $tmpInfo['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($tmpInfo['lastColumnIndex']); -// $tmpInfo['totalColumns'] = $tmpInfo['lastColumnIndex'] + 1; -// -// } -// } - } - - return $worksheetInfo; - } - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename) - { - // Create new PHPExcel - $objPHPExcel = new PHPExcel(); - - // Load into this instance - return $this->loadIntoExisting($pFilename, $objPHPExcel); - } - - private static function identifyFixedStyleValue($styleList, &$styleAttributeValue) - { - $styleAttributeValue = strtolower($styleAttributeValue); - foreach ($styleList as $style) { - if ($styleAttributeValue == strtolower($style)) { - $styleAttributeValue = $style; - return true; - } - } - return false; - } - - /** - * Loads PHPExcel from file into PHPExcel instance - * - * @param string $pFilename - * @param PHPExcel $objPHPExcel - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) - { - // Check if file exists - if (!file_exists($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! File does not exist."); - } - - $timezoneObj = new DateTimeZone('Europe/London'); - $GMT = new DateTimeZone('UTC'); - - $zipClass = PHPExcel_Settings::getZipClass(); - - $zip = new $zipClass; - if (!$zip->open($pFilename)) { - throw new PHPExcel_Reader_Exception("Could not open " . $pFilename . " for reading! Error opening file."); - } - -// echo '<h1>Meta Information</h1>'; - $xml = simplexml_load_string($this->securityScan($zip->getFromName("meta.xml")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $namespacesMeta = $xml->getNamespaces(true); -// echo '<pre>'; -// print_r($namespacesMeta); -// echo '</pre><hr />'; - - $docProps = $objPHPExcel->getProperties(); - $officeProperty = $xml->children($namespacesMeta['office']); - foreach ($officeProperty as $officePropertyData) { - $officePropertyDC = array(); - if (isset($namespacesMeta['dc'])) { - $officePropertyDC = $officePropertyData->children($namespacesMeta['dc']); - } - foreach ($officePropertyDC as $propertyName => $propertyValue) { - $propertyValue = (string) $propertyValue; - switch ($propertyName) { - case 'title': - $docProps->setTitle($propertyValue); - break; - case 'subject': - $docProps->setSubject($propertyValue); - break; - case 'creator': - $docProps->setCreator($propertyValue); - $docProps->setLastModifiedBy($propertyValue); - break; - case 'date': - $creationDate = strtotime($propertyValue); - $docProps->setCreated($creationDate); - $docProps->setModified($creationDate); - break; - case 'description': - $docProps->setDescription($propertyValue); - break; - } - } - $officePropertyMeta = array(); - if (isset($namespacesMeta['dc'])) { - $officePropertyMeta = $officePropertyData->children($namespacesMeta['meta']); - } - foreach ($officePropertyMeta as $propertyName => $propertyValue) { - $propertyValueAttributes = $propertyValue->attributes($namespacesMeta['meta']); - $propertyValue = (string) $propertyValue; - switch ($propertyName) { - case 'initial-creator': - $docProps->setCreator($propertyValue); - break; - case 'keyword': - $docProps->setKeywords($propertyValue); - break; - case 'creation-date': - $creationDate = strtotime($propertyValue); - $docProps->setCreated($creationDate); - break; - case 'user-defined': - $propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING; - foreach ($propertyValueAttributes as $key => $value) { - if ($key == 'name') { - $propertyValueName = (string) $value; - } elseif ($key == 'value-type') { - switch ($value) { - case 'date': - $propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'date'); - $propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE; - break; - case 'boolean': - $propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'bool'); - $propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN; - break; - case 'float': - $propertyValue = PHPExcel_DocumentProperties::convertProperty($propertyValue, 'r4'); - $propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_FLOAT; - break; - default: - $propertyValueType = PHPExcel_DocumentProperties::PROPERTY_TYPE_STRING; - } - } - } - $docProps->setCustomProperty($propertyValueName, $propertyValue, $propertyValueType); - break; - } - } - } - - -// echo '<h1>Workbook Content</h1>'; - $xml = simplexml_load_string($this->securityScan($zip->getFromName("content.xml")), 'SimpleXMLElement', PHPExcel_Settings::getLibXmlLoaderOptions()); - $namespacesContent = $xml->getNamespaces(true); -// echo '<pre>'; -// print_r($namespacesContent); -// echo '</pre><hr />'; - - $workbook = $xml->children($namespacesContent['office']); - foreach ($workbook->body->spreadsheet as $workbookData) { - $workbookData = $workbookData->children($namespacesContent['table']); - $worksheetID = 0; - foreach ($workbookData->table as $worksheetDataSet) { - $worksheetData = $worksheetDataSet->children($namespacesContent['table']); -// print_r($worksheetData); -// echo '<br />'; - $worksheetDataAttributes = $worksheetDataSet->attributes($namespacesContent['table']); -// print_r($worksheetDataAttributes); -// echo '<br />'; - if ((isset($this->loadSheetsOnly)) && (isset($worksheetDataAttributes['name'])) && - (!in_array($worksheetDataAttributes['name'], $this->loadSheetsOnly))) { - continue; - } - -// echo '<h2>Worksheet '.$worksheetDataAttributes['name'].'</h2>'; - // Create new Worksheet - $objPHPExcel->createSheet(); - $objPHPExcel->setActiveSheetIndex($worksheetID); - if (isset($worksheetDataAttributes['name'])) { - $worksheetName = (string) $worksheetDataAttributes['name']; - // Use false for $updateFormulaCellReferences to prevent adjustment of worksheet references in - // formula cells... during the load, all formulae should be correct, and we're simply - // bringing the worksheet name in line with the formula, not the reverse - $objPHPExcel->getActiveSheet()->setTitle($worksheetName, false); - } - - $rowID = 1; - foreach ($worksheetData as $key => $rowData) { -// echo '<b>'.$key.'</b><br />'; - switch ($key) { - case 'table-header-rows': - foreach ($rowData as $key => $cellData) { - $rowData = $cellData; - break; - } - case 'table-row': - $rowDataTableAttributes = $rowData->attributes($namespacesContent['table']); - $rowRepeats = (isset($rowDataTableAttributes['number-rows-repeated'])) ? $rowDataTableAttributes['number-rows-repeated'] : 1; - $columnID = 'A'; - foreach ($rowData as $key => $cellData) { - if ($this->getReadFilter() !== null) { - if (!$this->getReadFilter()->readCell($columnID, $rowID, $worksheetName)) { - continue; - } - } - -// echo '<b>'.$columnID.$rowID.'</b><br />'; - $cellDataText = (isset($namespacesContent['text'])) ? $cellData->children($namespacesContent['text']) : ''; - $cellDataOffice = $cellData->children($namespacesContent['office']); - $cellDataOfficeAttributes = $cellData->attributes($namespacesContent['office']); - $cellDataTableAttributes = $cellData->attributes($namespacesContent['table']); - -// echo 'Office Attributes: '; -// print_r($cellDataOfficeAttributes); -// echo '<br />Table Attributes: '; -// print_r($cellDataTableAttributes); -// echo '<br />Cell Data Text'; -// print_r($cellDataText); -// echo '<br />'; -// - $type = $formatting = $hyperlink = null; - $hasCalculatedValue = false; - $cellDataFormula = ''; - if (isset($cellDataTableAttributes['formula'])) { - $cellDataFormula = $cellDataTableAttributes['formula']; - $hasCalculatedValue = true; - } - - if (isset($cellDataOffice->annotation)) { -// echo 'Cell has comment<br />'; - $annotationText = $cellDataOffice->annotation->children($namespacesContent['text']); - $textArray = array(); - foreach ($annotationText as $t) { - if (isset($t->span)) { - foreach ($t->span as $text) { - $textArray[] = (string)$text; - } - } else { - $textArray[] = (string) $t; - } - } - $text = implode("\n", $textArray); -// echo $text, '<br />'; - $objPHPExcel->getActiveSheet()->getComment($columnID.$rowID)->setText($this->parseRichText($text)); -// ->setAuthor( $author ) - } - - if (isset($cellDataText->p)) { - // Consolidate if there are multiple p records (maybe with spans as well) - $dataArray = array(); - // Text can have multiple text:p and within those, multiple text:span. - // text:p newlines, but text:span does not. - // Also, here we assume there is no text data is span fields are specified, since - // we have no way of knowing proper positioning anyway. - foreach ($cellDataText->p as $pData) { - if (isset($pData->span)) { - // span sections do not newline, so we just create one large string here - $spanSection = ""; - foreach ($pData->span as $spanData) { - $spanSection .= $spanData; - } - array_push($dataArray, $spanSection); - } else { - array_push($dataArray, $pData); - } - } - $allCellDataText = implode($dataArray, "\n"); - -// echo 'Value Type is '.$cellDataOfficeAttributes['value-type'].'<br />'; - switch ($cellDataOfficeAttributes['value-type']) { - case 'string': - $type = PHPExcel_Cell_DataType::TYPE_STRING; - $dataValue = $allCellDataText; - if (isset($dataValue->a)) { - $dataValue = $dataValue->a; - $cellXLinkAttributes = $dataValue->attributes($namespacesContent['xlink']); - $hyperlink = $cellXLinkAttributes['href']; - } - break; - case 'boolean': - $type = PHPExcel_Cell_DataType::TYPE_BOOL; - $dataValue = ($allCellDataText == 'TRUE') ? true : false; - break; - case 'percentage': - $type = PHPExcel_Cell_DataType::TYPE_NUMERIC; - $dataValue = (float) $cellDataOfficeAttributes['value']; - if (floor($dataValue) == $dataValue) { - $dataValue = (integer) $dataValue; - } - $formatting = PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00; - break; - case 'currency': - $type = PHPExcel_Cell_DataType::TYPE_NUMERIC; - $dataValue = (float) $cellDataOfficeAttributes['value']; - if (floor($dataValue) == $dataValue) { - $dataValue = (integer) $dataValue; - } - $formatting = PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE; - break; - case 'float': - $type = PHPExcel_Cell_DataType::TYPE_NUMERIC; - $dataValue = (float) $cellDataOfficeAttributes['value']; - if (floor($dataValue) == $dataValue) { - if ($dataValue == (integer) $dataValue) { - $dataValue = (integer) $dataValue; - } else { - $dataValue = (float) $dataValue; - } - } - break; - case 'date': - $type = PHPExcel_Cell_DataType::TYPE_NUMERIC; - $dateObj = new DateTime($cellDataOfficeAttributes['date-value'], $GMT); - $dateObj->setTimeZone($timezoneObj); - list($year, $month, $day, $hour, $minute, $second) = explode(' ', $dateObj->format('Y m d H i s')); - $dataValue = PHPExcel_Shared_Date::FormattedPHPToExcel($year, $month, $day, $hour, $minute, $second); - if ($dataValue != floor($dataValue)) { - $formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15.' '.PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4; - } else { - $formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15; - } - break; - case 'time': - $type = PHPExcel_Cell_DataType::TYPE_NUMERIC; - $dataValue = PHPExcel_Shared_Date::PHPToExcel(strtotime('01-01-1970 '.implode(':', sscanf($cellDataOfficeAttributes['time-value'], 'PT%dH%dM%dS')))); - $formatting = PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4; - break; - } -// echo 'Data value is '.$dataValue.'<br />'; -// if ($hyperlink !== null) { -// echo 'Hyperlink is '.$hyperlink.'<br />'; -// } - } else { - $type = PHPExcel_Cell_DataType::TYPE_NULL; - $dataValue = null; - } - - if ($hasCalculatedValue) { - $type = PHPExcel_Cell_DataType::TYPE_FORMULA; -// echo 'Formula: ', $cellDataFormula, PHP_EOL; - $cellDataFormula = substr($cellDataFormula, strpos($cellDataFormula, ':=')+1); - $temp = explode('"', $cellDataFormula); - $tKey = false; - foreach ($temp as &$value) { - // Only replace in alternate array entries (i.e. non-quoted blocks) - if ($tKey = !$tKey) { - $value = preg_replace('/\[([^\.]+)\.([^\.]+):\.([^\.]+)\]/Ui', '$1!$2:$3', $value); // Cell range reference in another sheet - $value = preg_replace('/\[([^\.]+)\.([^\.]+)\]/Ui', '$1!$2', $value); // Cell reference in another sheet - $value = preg_replace('/\[\.([^\.]+):\.([^\.]+)\]/Ui', '$1:$2', $value); // Cell range reference - $value = preg_replace('/\[\.([^\.]+)\]/Ui', '$1', $value); // Simple cell reference - $value = PHPExcel_Calculation::translateSeparator(';', ',', $value, $inBraces); - } - } - unset($value); - // Then rebuild the formula string - $cellDataFormula = implode('"', $temp); -// echo 'Adjusted Formula: ', $cellDataFormula, PHP_EOL; - } - - $colRepeats = (isset($cellDataTableAttributes['number-columns-repeated'])) ? $cellDataTableAttributes['number-columns-repeated'] : 1; - if ($type !== null) { - for ($i = 0; $i < $colRepeats; ++$i) { - if ($i > 0) { - ++$columnID; - } - if ($type !== PHPExcel_Cell_DataType::TYPE_NULL) { - for ($rowAdjust = 0; $rowAdjust < $rowRepeats; ++$rowAdjust) { - $rID = $rowID + $rowAdjust; - $objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->setValueExplicit((($hasCalculatedValue) ? $cellDataFormula : $dataValue), $type); - if ($hasCalculatedValue) { -// echo 'Forumla result is '.$dataValue.'<br />'; - $objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->setCalculatedValue($dataValue); - } - if ($formatting !== null) { - $objPHPExcel->getActiveSheet()->getStyle($columnID.$rID)->getNumberFormat()->setFormatCode($formatting); - } else { - $objPHPExcel->getActiveSheet()->getStyle($columnID.$rID)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_GENERAL); - } - if ($hyperlink !== null) { - $objPHPExcel->getActiveSheet()->getCell($columnID.$rID)->getHyperlink()->setUrl($hyperlink); - } - } - } - } - } - - // Merged cells - if ((isset($cellDataTableAttributes['number-columns-spanned'])) || (isset($cellDataTableAttributes['number-rows-spanned']))) { - if (($type !== PHPExcel_Cell_DataType::TYPE_NULL) || (!$this->readDataOnly)) { - $columnTo = $columnID; - if (isset($cellDataTableAttributes['number-columns-spanned'])) { - $columnTo = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($columnID) + $cellDataTableAttributes['number-columns-spanned'] -2); - } - $rowTo = $rowID; - if (isset($cellDataTableAttributes['number-rows-spanned'])) { - $rowTo = $rowTo + $cellDataTableAttributes['number-rows-spanned'] - 1; - } - $cellRange = $columnID.$rowID.':'.$columnTo.$rowTo; - $objPHPExcel->getActiveSheet()->mergeCells($cellRange); - } - } - - ++$columnID; - } - $rowID += $rowRepeats; - break; - } - } - ++$worksheetID; - } - } - - // Return - return $objPHPExcel; - } - - private function parseRichText($is = '') - { - $value = new PHPExcel_RichText(); - - $value->createText($is); - - return $value; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/SYLK.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/SYLK.php deleted file mode 100644 index eb7ef1a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Reader/SYLK.php +++ /dev/null @@ -1,478 +0,0 @@ -<?php - -/** PHPExcel root directory */ -if (!defined('PHPEXCEL_ROOT')) { - /** - * @ignore - */ - define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../'); - require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); -} - -/** - * PHPExcel_Reader_SYLK - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Reader - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Reader_SYLK extends PHPExcel_Reader_Abstract implements PHPExcel_Reader_IReader -{ - /** - * Input encoding - * - * @var string - */ - private $inputEncoding = 'ANSI'; - - /** - * Sheet index to read - * - * @var int - */ - private $sheetIndex = 0; - - /** - * Formats - * - * @var array - */ - private $formats = array(); - - /** - * Format Count - * - * @var int - */ - private $format = 0; - - /** - * Create a new PHPExcel_Reader_SYLK - */ - public function __construct() - { - $this->readFilter = new PHPExcel_Reader_DefaultReadFilter(); - } - - /** - * Validate that the current file is a SYLK file - * - * @return boolean - */ - protected function isValidFormat() - { - // Read sample data (first 2 KB will do) - $data = fread($this->fileHandle, 2048); - - // Count delimiters in file - $delimiterCount = substr_count($data, ';'); - if ($delimiterCount < 1) { - return false; - } - - // Analyze first line looking for ID; signature - $lines = explode("\n", $data); - if (substr($lines[0], 0, 4) != 'ID;P') { - return false; - } - - return true; - } - - /** - * Set input encoding - * - * @param string $pValue Input encoding - */ - public function setInputEncoding($pValue = 'ANSI') - { - $this->inputEncoding = $pValue; - return $this; - } - - /** - * Get input encoding - * - * @return string - */ - public function getInputEncoding() - { - return $this->inputEncoding; - } - - /** - * Return worksheet info (Name, Last Column Letter, Last Column Index, Total Rows, Total Columns) - * - * @param string $pFilename - * @throws PHPExcel_Reader_Exception - */ - public function listWorksheetInfo($pFilename) - { - // Open file - $this->openFile($pFilename); - if (!$this->isValidFormat()) { - fclose($this->fileHandle); - throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); - } - $fileHandle = $this->fileHandle; - rewind($fileHandle); - - $worksheetInfo = array(); - $worksheetInfo[0]['worksheetName'] = 'Worksheet'; - $worksheetInfo[0]['lastColumnLetter'] = 'A'; - $worksheetInfo[0]['lastColumnIndex'] = 0; - $worksheetInfo[0]['totalRows'] = 0; - $worksheetInfo[0]['totalColumns'] = 0; - - // Loop through file - $rowData = array(); - - // loop through one row (line) at a time in the file - $rowIndex = 0; - while (($rowData = fgets($fileHandle)) !== false) { - $columnIndex = 0; - - // convert SYLK encoded $rowData to UTF-8 - $rowData = PHPExcel_Shared_String::SYLKtoUTF8($rowData); - - // explode each row at semicolons while taking into account that literal semicolon (;) - // is escaped like this (;;) - $rowData = explode("\t", str_replace('¤', ';', str_replace(';', "\t", str_replace(';;', '¤', rtrim($rowData))))); - - $dataType = array_shift($rowData); - if ($dataType == 'C') { - // Read cell value data - foreach ($rowData as $rowDatum) { - switch ($rowDatum{0}) { - case 'C': - case 'X': - $columnIndex = substr($rowDatum, 1) - 1; - break; - case 'R': - case 'Y': - $rowIndex = substr($rowDatum, 1); - break; - } - - $worksheetInfo[0]['totalRows'] = max($worksheetInfo[0]['totalRows'], $rowIndex); - $worksheetInfo[0]['lastColumnIndex'] = max($worksheetInfo[0]['lastColumnIndex'], $columnIndex); - } - } - } - - $worksheetInfo[0]['lastColumnLetter'] = PHPExcel_Cell::stringFromColumnIndex($worksheetInfo[0]['lastColumnIndex']); - $worksheetInfo[0]['totalColumns'] = $worksheetInfo[0]['lastColumnIndex'] + 1; - - // Close file - fclose($fileHandle); - - return $worksheetInfo; - } - - /** - * Loads PHPExcel from file - * - * @param string $pFilename - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function load($pFilename) - { - // Create new PHPExcel - $objPHPExcel = new PHPExcel(); - - // Load into this instance - return $this->loadIntoExisting($pFilename, $objPHPExcel); - } - - /** - * Loads PHPExcel from file into PHPExcel instance - * - * @param string $pFilename - * @param PHPExcel $objPHPExcel - * @return PHPExcel - * @throws PHPExcel_Reader_Exception - */ - public function loadIntoExisting($pFilename, PHPExcel $objPHPExcel) - { - // Open file - $this->openFile($pFilename); - if (!$this->isValidFormat()) { - fclose($this->fileHandle); - throw new PHPExcel_Reader_Exception($pFilename . " is an Invalid Spreadsheet file."); - } - $fileHandle = $this->fileHandle; - rewind($fileHandle); - - // Create new PHPExcel - while ($objPHPExcel->getSheetCount() <= $this->sheetIndex) { - $objPHPExcel->createSheet(); - } - $objPHPExcel->setActiveSheetIndex($this->sheetIndex); - - $fromFormats = array('\-', '\ '); - $toFormats = array('-', ' '); - - // Loop through file - $rowData = array(); - $column = $row = ''; - - // loop through one row (line) at a time in the file - while (($rowData = fgets($fileHandle)) !== false) { - // convert SYLK encoded $rowData to UTF-8 - $rowData = PHPExcel_Shared_String::SYLKtoUTF8($rowData); - - // explode each row at semicolons while taking into account that literal semicolon (;) - // is escaped like this (;;) - $rowData = explode("\t", str_replace('¤', ';', str_replace(';', "\t", str_replace(';;', '¤', rtrim($rowData))))); - - $dataType = array_shift($rowData); - // Read shared styles - if ($dataType == 'P') { - $formatArray = array(); - foreach ($rowData as $rowDatum) { - switch ($rowDatum{0}) { - case 'P': - $formatArray['numberformat']['code'] = str_replace($fromFormats, $toFormats, substr($rowDatum, 1)); - break; - case 'E': - case 'F': - $formatArray['font']['name'] = substr($rowDatum, 1); - break; - case 'L': - $formatArray['font']['size'] = substr($rowDatum, 1); - break; - case 'S': - $styleSettings = substr($rowDatum, 1); - for ($i=0; $i<strlen($styleSettings); ++$i) { - switch ($styleSettings{$i}) { - case 'I': - $formatArray['font']['italic'] = true; - break; - case 'D': - $formatArray['font']['bold'] = true; - break; - case 'T': - $formatArray['borders']['top']['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - case 'B': - $formatArray['borders']['bottom']['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - case 'L': - $formatArray['borders']['left']['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - case 'R': - $formatArray['borders']['right']['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - } - } - break; - } - } - $this->formats['P'.$this->format++] = $formatArray; - // Read cell value data - } elseif ($dataType == 'C') { - $hasCalculatedValue = false; - $cellData = $cellDataFormula = ''; - foreach ($rowData as $rowDatum) { - switch ($rowDatum{0}) { - case 'C': - case 'X': - $column = substr($rowDatum, 1); - break; - case 'R': - case 'Y': - $row = substr($rowDatum, 1); - break; - case 'K': - $cellData = substr($rowDatum, 1); - break; - case 'E': - $cellDataFormula = '='.substr($rowDatum, 1); - // Convert R1C1 style references to A1 style references (but only when not quoted) - $temp = explode('"', $cellDataFormula); - $key = false; - foreach ($temp as &$value) { - // Only count/replace in alternate array entries - if ($key = !$key) { - preg_match_all('/(R(\[?-?\d*\]?))(C(\[?-?\d*\]?))/', $value, $cellReferences, PREG_SET_ORDER+PREG_OFFSET_CAPTURE); - // Reverse the matches array, otherwise all our offsets will become incorrect if we modify our way - // through the formula from left to right. Reversing means that we work right to left.through - // the formula - $cellReferences = array_reverse($cellReferences); - // Loop through each R1C1 style reference in turn, converting it to its A1 style equivalent, - // then modify the formula to use that new reference - foreach ($cellReferences as $cellReference) { - $rowReference = $cellReference[2][0]; - // Empty R reference is the current row - if ($rowReference == '') { - $rowReference = $row; - } - // Bracketed R references are relative to the current row - if ($rowReference{0} == '[') { - $rowReference = $row + trim($rowReference, '[]'); - } - $columnReference = $cellReference[4][0]; - // Empty C reference is the current column - if ($columnReference == '') { - $columnReference = $column; - } - // Bracketed C references are relative to the current column - if ($columnReference{0} == '[') { - $columnReference = $column + trim($columnReference, '[]'); - } - $A1CellReference = PHPExcel_Cell::stringFromColumnIndex($columnReference-1).$rowReference; - - $value = substr_replace($value, $A1CellReference, $cellReference[0][1], strlen($cellReference[0][0])); - } - } - } - unset($value); - // Then rebuild the formula string - $cellDataFormula = implode('"', $temp); - $hasCalculatedValue = true; - break; - } - } - $columnLetter = PHPExcel_Cell::stringFromColumnIndex($column-1); - $cellData = PHPExcel_Calculation::unwrapResult($cellData); - - // Set cell value - $objPHPExcel->getActiveSheet()->getCell($columnLetter.$row)->setValue(($hasCalculatedValue) ? $cellDataFormula : $cellData); - if ($hasCalculatedValue) { - $cellData = PHPExcel_Calculation::unwrapResult($cellData); - $objPHPExcel->getActiveSheet()->getCell($columnLetter.$row)->setCalculatedValue($cellData); - } - // Read cell formatting - } elseif ($dataType == 'F') { - $formatStyle = $columnWidth = $styleSettings = ''; - $styleData = array(); - foreach ($rowData as $rowDatum) { - switch ($rowDatum{0}) { - case 'C': - case 'X': - $column = substr($rowDatum, 1); - break; - case 'R': - case 'Y': - $row = substr($rowDatum, 1); - break; - case 'P': - $formatStyle = $rowDatum; - break; - case 'W': - list($startCol, $endCol, $columnWidth) = explode(' ', substr($rowDatum, 1)); - break; - case 'S': - $styleSettings = substr($rowDatum, 1); - for ($i=0; $i<strlen($styleSettings); ++$i) { - switch ($styleSettings{$i}) { - case 'I': - $styleData['font']['italic'] = true; - break; - case 'D': - $styleData['font']['bold'] = true; - break; - case 'T': - $styleData['borders']['top']['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - case 'B': - $styleData['borders']['bottom']['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - case 'L': - $styleData['borders']['left']['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - case 'R': - $styleData['borders']['right']['style'] = PHPExcel_Style_Border::BORDER_THIN; - break; - } - } - break; - } - } - if (($formatStyle > '') && ($column > '') && ($row > '')) { - $columnLetter = PHPExcel_Cell::stringFromColumnIndex($column-1); - if (isset($this->formats[$formatStyle])) { - $objPHPExcel->getActiveSheet()->getStyle($columnLetter.$row)->applyFromArray($this->formats[$formatStyle]); - } - } - if ((!empty($styleData)) && ($column > '') && ($row > '')) { - $columnLetter = PHPExcel_Cell::stringFromColumnIndex($column-1); - $objPHPExcel->getActiveSheet()->getStyle($columnLetter.$row)->applyFromArray($styleData); - } - if ($columnWidth > '') { - if ($startCol == $endCol) { - $startCol = PHPExcel_Cell::stringFromColumnIndex($startCol-1); - $objPHPExcel->getActiveSheet()->getColumnDimension($startCol)->setWidth($columnWidth); - } else { - $startCol = PHPExcel_Cell::stringFromColumnIndex($startCol-1); - $endCol = PHPExcel_Cell::stringFromColumnIndex($endCol-1); - $objPHPExcel->getActiveSheet()->getColumnDimension($startCol)->setWidth($columnWidth); - do { - $objPHPExcel->getActiveSheet()->getColumnDimension(++$startCol)->setWidth($columnWidth); - } while ($startCol != $endCol); - } - } - } else { - foreach ($rowData as $rowDatum) { - switch ($rowDatum{0}) { - case 'C': - case 'X': - $column = substr($rowDatum, 1); - break; - case 'R': - case 'Y': - $row = substr($rowDatum, 1); - break; - } - } - } - } - - // Close file - fclose($fileHandle); - - // Return - return $objPHPExcel; - } - - /** - * Get sheet index - * - * @return int - */ - public function getSheetIndex() - { - return $this->sheetIndex; - } - - /** - * Set sheet index - * - * @param int $pValue Sheet index - * @return PHPExcel_Reader_SYLK - */ - public function setSheetIndex($pValue = 0) - { - $this->sheetIndex = $pValue; - return $this; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/ReferenceHelper.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/ReferenceHelper.php deleted file mode 100644 index 7d7de93..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/ReferenceHelper.php +++ /dev/null @@ -1,913 +0,0 @@ -<?php - -/** - * PHPExcel_ReferenceHelper (Singleton) - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_ReferenceHelper -{ - /** Constants */ - /** Regular Expressions */ - const REFHELPER_REGEXP_CELLREF = '((\w*|\'[^!]*\')!)?(?<![:a-z\$])(\$?[a-z]{1,3}\$?\d+)(?=[^:!\d\'])'; - const REFHELPER_REGEXP_CELLRANGE = '((\w*|\'[^!]*\')!)?(\$?[a-z]{1,3}\$?\d+):(\$?[a-z]{1,3}\$?\d+)'; - const REFHELPER_REGEXP_ROWRANGE = '((\w*|\'[^!]*\')!)?(\$?\d+):(\$?\d+)'; - const REFHELPER_REGEXP_COLRANGE = '((\w*|\'[^!]*\')!)?(\$?[a-z]{1,3}):(\$?[a-z]{1,3})'; - - /** - * Instance of this class - * - * @var PHPExcel_ReferenceHelper - */ - private static $instance; - - /** - * Get an instance of this class - * - * @return PHPExcel_ReferenceHelper - */ - public static function getInstance() - { - if (!isset(self::$instance) || (self::$instance === null)) { - self::$instance = new PHPExcel_ReferenceHelper(); - } - - return self::$instance; - } - - /** - * Create a new PHPExcel_ReferenceHelper - */ - protected function __construct() - { - } - - /** - * Compare two column addresses - * Intended for use as a Callback function for sorting column addresses by column - * - * @param string $a First column to test (e.g. 'AA') - * @param string $b Second column to test (e.g. 'Z') - * @return integer - */ - public static function columnSort($a, $b) - { - return strcasecmp(strlen($a) . $a, strlen($b) . $b); - } - - /** - * Compare two column addresses - * Intended for use as a Callback function for reverse sorting column addresses by column - * - * @param string $a First column to test (e.g. 'AA') - * @param string $b Second column to test (e.g. 'Z') - * @return integer - */ - public static function columnReverseSort($a, $b) - { - return 1 - strcasecmp(strlen($a) . $a, strlen($b) . $b); - } - - /** - * Compare two cell addresses - * Intended for use as a Callback function for sorting cell addresses by column and row - * - * @param string $a First cell to test (e.g. 'AA1') - * @param string $b Second cell to test (e.g. 'Z1') - * @return integer - */ - public static function cellSort($a, $b) - { - sscanf($a, '%[A-Z]%d', $ac, $ar); - sscanf($b, '%[A-Z]%d', $bc, $br); - - if ($ar == $br) { - return strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc); - } - return ($ar < $br) ? -1 : 1; - } - - /** - * Compare two cell addresses - * Intended for use as a Callback function for sorting cell addresses by column and row - * - * @param string $a First cell to test (e.g. 'AA1') - * @param string $b Second cell to test (e.g. 'Z1') - * @return integer - */ - public static function cellReverseSort($a, $b) - { - sscanf($a, '%[A-Z]%d', $ac, $ar); - sscanf($b, '%[A-Z]%d', $bc, $br); - - if ($ar == $br) { - return 1 - strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc); - } - return ($ar < $br) ? 1 : -1; - } - - /** - * Test whether a cell address falls within a defined range of cells - * - * @param string $cellAddress Address of the cell we're testing - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @return boolean - */ - private static function cellAddressInDeleteRange($cellAddress, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols) - { - list($cellColumn, $cellRow) = PHPExcel_Cell::coordinateFromString($cellAddress); - $cellColumnIndex = PHPExcel_Cell::columnIndexFromString($cellColumn); - // Is cell within the range of rows/columns if we're deleting - if ($pNumRows < 0 && - ($cellRow >= ($beforeRow + $pNumRows)) && - ($cellRow < $beforeRow)) { - return true; - } elseif ($pNumCols < 0 && - ($cellColumnIndex >= ($beforeColumnIndex + $pNumCols)) && - ($cellColumnIndex < $beforeColumnIndex)) { - return true; - } - return false; - } - - /** - * Update page breaks when inserting/deleting rows/columns - * - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - */ - protected function adjustPageBreaks(PHPExcel_Worksheet $pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) - { - $aBreaks = $pSheet->getBreaks(); - ($pNumCols > 0 || $pNumRows > 0) ? - uksort($aBreaks, array('PHPExcel_ReferenceHelper','cellReverseSort')) : - uksort($aBreaks, array('PHPExcel_ReferenceHelper','cellSort')); - - foreach ($aBreaks as $key => $value) { - if (self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) { - // If we're deleting, then clear any defined breaks that are within the range - // of rows/columns that we're deleting - $pSheet->setBreak($key, PHPExcel_Worksheet::BREAK_NONE); - } else { - // Otherwise update any affected breaks by inserting a new break at the appropriate point - // and removing the old affected break - $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); - if ($key != $newReference) { - $pSheet->setBreak($newReference, $value) - ->setBreak($key, PHPExcel_Worksheet::BREAK_NONE); - } - } - } - } - - /** - * Update cell comments when inserting/deleting rows/columns - * - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - */ - protected function adjustComments($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) - { - $aComments = $pSheet->getComments(); - $aNewComments = array(); // the new array of all comments - - foreach ($aComments as $key => &$value) { - // Any comments inside a deleted range will be ignored - if (!self::cellAddressInDeleteRange($key, $beforeRow, $pNumRows, $beforeColumnIndex, $pNumCols)) { - // Otherwise build a new array of comments indexed by the adjusted cell reference - $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); - $aNewComments[$newReference] = $value; - } - } - // Replace the comments array with the new set of comments - $pSheet->setComments($aNewComments); - } - - /** - * Update hyperlinks when inserting/deleting rows/columns - * - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - */ - protected function adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) - { - $aHyperlinkCollection = $pSheet->getHyperlinkCollection(); - ($pNumCols > 0 || $pNumRows > 0) ? uksort($aHyperlinkCollection, array('PHPExcel_ReferenceHelper','cellReverseSort')) : uksort($aHyperlinkCollection, array('PHPExcel_ReferenceHelper','cellSort')); - - foreach ($aHyperlinkCollection as $key => $value) { - $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); - if ($key != $newReference) { - $pSheet->setHyperlink($newReference, $value); - $pSheet->setHyperlink($key, null); - } - } - } - - /** - * Update data validations when inserting/deleting rows/columns - * - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - */ - protected function adjustDataValidations($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) - { - $aDataValidationCollection = $pSheet->getDataValidationCollection(); - ($pNumCols > 0 || $pNumRows > 0) ? uksort($aDataValidationCollection, array('PHPExcel_ReferenceHelper','cellReverseSort')) : uksort($aDataValidationCollection, array('PHPExcel_ReferenceHelper','cellSort')); - - foreach ($aDataValidationCollection as $key => $value) { - $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); - if ($key != $newReference) { - $pSheet->setDataValidation($newReference, $value); - $pSheet->setDataValidation($key, null); - } - } - } - - /** - * Update merged cells when inserting/deleting rows/columns - * - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - */ - protected function adjustMergeCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) - { - $aMergeCells = $pSheet->getMergeCells(); - $aNewMergeCells = array(); // the new array of all merge cells - foreach ($aMergeCells as $key => &$value) { - $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); - $aNewMergeCells[$newReference] = $newReference; - } - $pSheet->setMergeCells($aNewMergeCells); // replace the merge cells array - } - - /** - * Update protected cells when inserting/deleting rows/columns - * - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - */ - protected function adjustProtectedCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) - { - $aProtectedCells = $pSheet->getProtectedCells(); - ($pNumCols > 0 || $pNumRows > 0) ? - uksort($aProtectedCells, array('PHPExcel_ReferenceHelper','cellReverseSort')) : - uksort($aProtectedCells, array('PHPExcel_ReferenceHelper','cellSort')); - foreach ($aProtectedCells as $key => $value) { - $newReference = $this->updateCellReference($key, $pBefore, $pNumCols, $pNumRows); - if ($key != $newReference) { - $pSheet->protectCells($newReference, $value, true); - $pSheet->unprotectCells($key); - } - } - } - - /** - * Update column dimensions when inserting/deleting rows/columns - * - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - */ - protected function adjustColumnDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) - { - $aColumnDimensions = array_reverse($pSheet->getColumnDimensions(), true); - if (!empty($aColumnDimensions)) { - foreach ($aColumnDimensions as $objColumnDimension) { - $newReference = $this->updateCellReference($objColumnDimension->getColumnIndex() . '1', $pBefore, $pNumCols, $pNumRows); - list($newReference) = PHPExcel_Cell::coordinateFromString($newReference); - if ($objColumnDimension->getColumnIndex() != $newReference) { - $objColumnDimension->setColumnIndex($newReference); - } - } - $pSheet->refreshColumnDimensions(); - } - } - - /** - * Update row dimensions when inserting/deleting rows/columns - * - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @param string $pBefore Insert/Delete before this cell address (e.g. 'A1') - * @param integer $beforeColumnIndex Index number of the column we're inserting/deleting before - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $beforeRow Number of the row we're inserting/deleting before - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - */ - protected function adjustRowDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows) - { - $aRowDimensions = array_reverse($pSheet->getRowDimensions(), true); - if (!empty($aRowDimensions)) { - foreach ($aRowDimensions as $objRowDimension) { - $newReference = $this->updateCellReference('A' . $objRowDimension->getRowIndex(), $pBefore, $pNumCols, $pNumRows); - list(, $newReference) = PHPExcel_Cell::coordinateFromString($newReference); - if ($objRowDimension->getRowIndex() != $newReference) { - $objRowDimension->setRowIndex($newReference); - } - } - $pSheet->refreshRowDimensions(); - - $copyDimension = $pSheet->getRowDimension($beforeRow - 1); - for ($i = $beforeRow; $i <= $beforeRow - 1 + $pNumRows; ++$i) { - $newDimension = $pSheet->getRowDimension($i); - $newDimension->setRowHeight($copyDimension->getRowHeight()); - $newDimension->setVisible($copyDimension->getVisible()); - $newDimension->setOutlineLevel($copyDimension->getOutlineLevel()); - $newDimension->setCollapsed($copyDimension->getCollapsed()); - } - } - } - - /** - * Insert a new column or row, updating all possible related data - * - * @param string $pBefore Insert before this cell address (e.g. 'A1') - * @param integer $pNumCols Number of columns to insert/delete (negative values indicate deletion) - * @param integer $pNumRows Number of rows to insert/delete (negative values indicate deletion) - * @param PHPExcel_Worksheet $pSheet The worksheet that we're editing - * @throws PHPExcel_Exception - */ - public function insertNewBefore($pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, PHPExcel_Worksheet $pSheet = null) - { - $remove = ($pNumCols < 0 || $pNumRows < 0); - $aCellCollection = $pSheet->getCellCollection(); - - // Get coordinates of $pBefore - $beforeColumn = 'A'; - $beforeRow = 1; - list($beforeColumn, $beforeRow) = PHPExcel_Cell::coordinateFromString($pBefore); - $beforeColumnIndex = PHPExcel_Cell::columnIndexFromString($beforeColumn); - - // Clear cells if we are removing columns or rows - $highestColumn = $pSheet->getHighestColumn(); - $highestRow = $pSheet->getHighestRow(); - - // 1. Clear column strips if we are removing columns - if ($pNumCols < 0 && $beforeColumnIndex - 2 + $pNumCols > 0) { - for ($i = 1; $i <= $highestRow - 1; ++$i) { - for ($j = $beforeColumnIndex - 1 + $pNumCols; $j <= $beforeColumnIndex - 2; ++$j) { - $coordinate = PHPExcel_Cell::stringFromColumnIndex($j) . $i; - $pSheet->removeConditionalStyles($coordinate); - if ($pSheet->cellExists($coordinate)) { - $pSheet->getCell($coordinate)->setValueExplicit('', PHPExcel_Cell_DataType::TYPE_NULL); - $pSheet->getCell($coordinate)->setXfIndex(0); - } - } - } - } - - // 2. Clear row strips if we are removing rows - if ($pNumRows < 0 && $beforeRow - 1 + $pNumRows > 0) { - for ($i = $beforeColumnIndex - 1; $i <= PHPExcel_Cell::columnIndexFromString($highestColumn) - 1; ++$i) { - for ($j = $beforeRow + $pNumRows; $j <= $beforeRow - 1; ++$j) { - $coordinate = PHPExcel_Cell::stringFromColumnIndex($i) . $j; - $pSheet->removeConditionalStyles($coordinate); - if ($pSheet->cellExists($coordinate)) { - $pSheet->getCell($coordinate)->setValueExplicit('', PHPExcel_Cell_DataType::TYPE_NULL); - $pSheet->getCell($coordinate)->setXfIndex(0); - } - } - } - } - - // Loop through cells, bottom-up, and change cell coordinates - if ($remove) { - // It's faster to reverse and pop than to use unshift, especially with large cell collections - $aCellCollection = array_reverse($aCellCollection); - } - while ($cellID = array_pop($aCellCollection)) { - $cell = $pSheet->getCell($cellID); - $cellIndex = PHPExcel_Cell::columnIndexFromString($cell->getColumn()); - - if ($cellIndex-1 + $pNumCols < 0) { - continue; - } - - // New coordinates - $newCoordinates = PHPExcel_Cell::stringFromColumnIndex($cellIndex-1 + $pNumCols) . ($cell->getRow() + $pNumRows); - - // Should the cell be updated? Move value and cellXf index from one cell to another. - if (($cellIndex >= $beforeColumnIndex) && ($cell->getRow() >= $beforeRow)) { - // Update cell styles - $pSheet->getCell($newCoordinates)->setXfIndex($cell->getXfIndex()); - - // Insert this cell at its new location - if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) { - // Formula should be adjusted - $pSheet->getCell($newCoordinates) - ->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle())); - } else { - // Formula should not be adjusted - $pSheet->getCell($newCoordinates)->setValue($cell->getValue()); - } - - // Clear the original cell - $pSheet->getCellCacheController()->deleteCacheData($cellID); - } else { - /* We don't need to update styles for rows/columns before our insertion position, - but we do still need to adjust any formulae in those cells */ - if ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA) { - // Formula should be adjusted - $cell->setValue($this->updateFormulaReferences($cell->getValue(), $pBefore, $pNumCols, $pNumRows, $pSheet->getTitle())); - } - - } - } - - // Duplicate styles for the newly inserted cells - $highestColumn = $pSheet->getHighestColumn(); - $highestRow = $pSheet->getHighestRow(); - - if ($pNumCols > 0 && $beforeColumnIndex - 2 > 0) { - for ($i = $beforeRow; $i <= $highestRow - 1; ++$i) { - // Style - $coordinate = PHPExcel_Cell::stringFromColumnIndex($beforeColumnIndex - 2) . $i; - if ($pSheet->cellExists($coordinate)) { - $xfIndex = $pSheet->getCell($coordinate)->getXfIndex(); - $conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ? - $pSheet->getConditionalStyles($coordinate) : false; - for ($j = $beforeColumnIndex - 1; $j <= $beforeColumnIndex - 2 + $pNumCols; ++$j) { - $pSheet->getCellByColumnAndRow($j, $i)->setXfIndex($xfIndex); - if ($conditionalStyles) { - $cloned = array(); - foreach ($conditionalStyles as $conditionalStyle) { - $cloned[] = clone $conditionalStyle; - } - $pSheet->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($j) . $i, $cloned); - } - } - } - - } - } - - if ($pNumRows > 0 && $beforeRow - 1 > 0) { - for ($i = $beforeColumnIndex - 1; $i <= PHPExcel_Cell::columnIndexFromString($highestColumn) - 1; ++$i) { - // Style - $coordinate = PHPExcel_Cell::stringFromColumnIndex($i) . ($beforeRow - 1); - if ($pSheet->cellExists($coordinate)) { - $xfIndex = $pSheet->getCell($coordinate)->getXfIndex(); - $conditionalStyles = $pSheet->conditionalStylesExists($coordinate) ? - $pSheet->getConditionalStyles($coordinate) : false; - for ($j = $beforeRow; $j <= $beforeRow - 1 + $pNumRows; ++$j) { - $pSheet->getCell(PHPExcel_Cell::stringFromColumnIndex($i) . $j)->setXfIndex($xfIndex); - if ($conditionalStyles) { - $cloned = array(); - foreach ($conditionalStyles as $conditionalStyle) { - $cloned[] = clone $conditionalStyle; - } - $pSheet->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($i) . $j, $cloned); - } - } - } - } - } - - // Update worksheet: column dimensions - $this->adjustColumnDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); - - // Update worksheet: row dimensions - $this->adjustRowDimensions($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); - - // Update worksheet: page breaks - $this->adjustPageBreaks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); - - // Update worksheet: comments - $this->adjustComments($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); - - // Update worksheet: hyperlinks - $this->adjustHyperlinks($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); - - // Update worksheet: data validations - $this->adjustDataValidations($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); - - // Update worksheet: merge cells - $this->adjustMergeCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); - - // Update worksheet: protected cells - $this->adjustProtectedCells($pSheet, $pBefore, $beforeColumnIndex, $pNumCols, $beforeRow, $pNumRows); - - // Update worksheet: autofilter - $autoFilter = $pSheet->getAutoFilter(); - $autoFilterRange = $autoFilter->getRange(); - if (!empty($autoFilterRange)) { - if ($pNumCols != 0) { - $autoFilterColumns = array_keys($autoFilter->getColumns()); - if (count($autoFilterColumns) > 0) { - sscanf($pBefore, '%[A-Z]%d', $column, $row); - $columnIndex = PHPExcel_Cell::columnIndexFromString($column); - list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($autoFilterRange); - if ($columnIndex <= $rangeEnd[0]) { - if ($pNumCols < 0) { - // If we're actually deleting any columns that fall within the autofilter range, - // then we delete any rules for those columns - $deleteColumn = $columnIndex + $pNumCols - 1; - $deleteCount = abs($pNumCols); - for ($i = 1; $i <= $deleteCount; ++$i) { - if (in_array(PHPExcel_Cell::stringFromColumnIndex($deleteColumn), $autoFilterColumns)) { - $autoFilter->clearColumn(PHPExcel_Cell::stringFromColumnIndex($deleteColumn)); - } - ++$deleteColumn; - } - } - $startCol = ($columnIndex > $rangeStart[0]) ? $columnIndex : $rangeStart[0]; - - // Shuffle columns in autofilter range - if ($pNumCols > 0) { - // For insert, we shuffle from end to beginning to avoid overwriting - $startColID = PHPExcel_Cell::stringFromColumnIndex($startCol-1); - $toColID = PHPExcel_Cell::stringFromColumnIndex($startCol+$pNumCols-1); - $endColID = PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0]); - - $startColRef = $startCol; - $endColRef = $rangeEnd[0]; - $toColRef = $rangeEnd[0]+$pNumCols; - - do { - $autoFilter->shiftColumn(PHPExcel_Cell::stringFromColumnIndex($endColRef-1), PHPExcel_Cell::stringFromColumnIndex($toColRef-1)); - --$endColRef; - --$toColRef; - } while ($startColRef <= $endColRef); - } else { - // For delete, we shuffle from beginning to end to avoid overwriting - $startColID = PHPExcel_Cell::stringFromColumnIndex($startCol-1); - $toColID = PHPExcel_Cell::stringFromColumnIndex($startCol+$pNumCols-1); - $endColID = PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0]); - do { - $autoFilter->shiftColumn($startColID, $toColID); - ++$startColID; - ++$toColID; - } while ($startColID != $endColID); - } - } - } - } - $pSheet->setAutoFilter($this->updateCellReference($autoFilterRange, $pBefore, $pNumCols, $pNumRows)); - } - - // Update worksheet: freeze pane - if ($pSheet->getFreezePane() != '') { - $pSheet->freezePane($this->updateCellReference($pSheet->getFreezePane(), $pBefore, $pNumCols, $pNumRows)); - } - - // Page setup - if ($pSheet->getPageSetup()->isPrintAreaSet()) { - $pSheet->getPageSetup()->setPrintArea($this->updateCellReference($pSheet->getPageSetup()->getPrintArea(), $pBefore, $pNumCols, $pNumRows)); - } - - // Update worksheet: drawings - $aDrawings = $pSheet->getDrawingCollection(); - foreach ($aDrawings as $objDrawing) { - $newReference = $this->updateCellReference($objDrawing->getCoordinates(), $pBefore, $pNumCols, $pNumRows); - if ($objDrawing->getCoordinates() != $newReference) { - $objDrawing->setCoordinates($newReference); - } - } - - // Update workbook: named ranges - if (count($pSheet->getParent()->getNamedRanges()) > 0) { - foreach ($pSheet->getParent()->getNamedRanges() as $namedRange) { - if ($namedRange->getWorksheet()->getHashCode() == $pSheet->getHashCode()) { - $namedRange->setRange($this->updateCellReference($namedRange->getRange(), $pBefore, $pNumCols, $pNumRows)); - } - } - } - - // Garbage collect - $pSheet->garbageCollect(); - } - - /** - * Update references within formulas - * - * @param string $pFormula Formula to update - * @param int $pBefore Insert before this one - * @param int $pNumCols Number of columns to insert - * @param int $pNumRows Number of rows to insert - * @param string $sheetName Worksheet name/title - * @return string Updated formula - * @throws PHPExcel_Exception - */ - public function updateFormulaReferences($pFormula = '', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0, $sheetName = '') - { - // Update cell references in the formula - $formulaBlocks = explode('"', $pFormula); - $i = false; - foreach ($formulaBlocks as &$formulaBlock) { - // Ignore blocks that were enclosed in quotes (alternating entries in the $formulaBlocks array after the explode) - if ($i = !$i) { - $adjustCount = 0; - $newCellTokens = $cellTokens = array(); - // Search for row ranges (e.g. 'Sheet1'!3:5 or 3:5) with or without $ absolutes (e.g. $3:5) - $matchCount = preg_match_all('/'.self::REFHELPER_REGEXP_ROWRANGE.'/i', ' '.$formulaBlock.' ', $matches, PREG_SET_ORDER); - if ($matchCount > 0) { - foreach ($matches as $match) { - $fromString = ($match[2] > '') ? $match[2].'!' : ''; - $fromString .= $match[3].':'.$match[4]; - $modified3 = substr($this->updateCellReference('$A'.$match[3], $pBefore, $pNumCols, $pNumRows), 2); - $modified4 = substr($this->updateCellReference('$A'.$match[4], $pBefore, $pNumCols, $pNumRows), 2); - - if ($match[3].':'.$match[4] !== $modified3.':'.$modified4) { - if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { - $toString = ($match[2] > '') ? $match[2].'!' : ''; - $toString .= $modified3.':'.$modified4; - // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more - $column = 100000; - $row = 10000000 + trim($match[3], '$'); - $cellIndex = $column.$row; - - $newCellTokens[$cellIndex] = preg_quote($toString); - $cellTokens[$cellIndex] = '/(?<!\d\$\!)'.preg_quote($fromString).'(?!\d)/i'; - ++$adjustCount; - } - } - } - } - // Search for column ranges (e.g. 'Sheet1'!C:E or C:E) with or without $ absolutes (e.g. $C:E) - $matchCount = preg_match_all('/'.self::REFHELPER_REGEXP_COLRANGE.'/i', ' '.$formulaBlock.' ', $matches, PREG_SET_ORDER); - if ($matchCount > 0) { - foreach ($matches as $match) { - $fromString = ($match[2] > '') ? $match[2].'!' : ''; - $fromString .= $match[3].':'.$match[4]; - $modified3 = substr($this->updateCellReference($match[3].'$1', $pBefore, $pNumCols, $pNumRows), 0, -2); - $modified4 = substr($this->updateCellReference($match[4].'$1', $pBefore, $pNumCols, $pNumRows), 0, -2); - - if ($match[3].':'.$match[4] !== $modified3.':'.$modified4) { - if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { - $toString = ($match[2] > '') ? $match[2].'!' : ''; - $toString .= $modified3.':'.$modified4; - // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more - $column = PHPExcel_Cell::columnIndexFromString(trim($match[3], '$')) + 100000; - $row = 10000000; - $cellIndex = $column.$row; - - $newCellTokens[$cellIndex] = preg_quote($toString); - $cellTokens[$cellIndex] = '/(?<![A-Z\$\!])'.preg_quote($fromString).'(?![A-Z])/i'; - ++$adjustCount; - } - } - } - } - // Search for cell ranges (e.g. 'Sheet1'!A3:C5 or A3:C5) with or without $ absolutes (e.g. $A1:C$5) - $matchCount = preg_match_all('/'.self::REFHELPER_REGEXP_CELLRANGE.'/i', ' '.$formulaBlock.' ', $matches, PREG_SET_ORDER); - if ($matchCount > 0) { - foreach ($matches as $match) { - $fromString = ($match[2] > '') ? $match[2].'!' : ''; - $fromString .= $match[3].':'.$match[4]; - $modified3 = $this->updateCellReference($match[3], $pBefore, $pNumCols, $pNumRows); - $modified4 = $this->updateCellReference($match[4], $pBefore, $pNumCols, $pNumRows); - - if ($match[3].$match[4] !== $modified3.$modified4) { - if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { - $toString = ($match[2] > '') ? $match[2].'!' : ''; - $toString .= $modified3.':'.$modified4; - list($column, $row) = PHPExcel_Cell::coordinateFromString($match[3]); - // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more - $column = PHPExcel_Cell::columnIndexFromString(trim($column, '$')) + 100000; - $row = trim($row, '$') + 10000000; - $cellIndex = $column.$row; - - $newCellTokens[$cellIndex] = preg_quote($toString); - $cellTokens[$cellIndex] = '/(?<![A-Z]\$\!)'.preg_quote($fromString).'(?!\d)/i'; - ++$adjustCount; - } - } - } - } - // Search for cell references (e.g. 'Sheet1'!A3 or C5) with or without $ absolutes (e.g. $A1 or C$5) - $matchCount = preg_match_all('/'.self::REFHELPER_REGEXP_CELLREF.'/i', ' '.$formulaBlock.' ', $matches, PREG_SET_ORDER); - - if ($matchCount > 0) { - foreach ($matches as $match) { - $fromString = ($match[2] > '') ? $match[2].'!' : ''; - $fromString .= $match[3]; - - $modified3 = $this->updateCellReference($match[3], $pBefore, $pNumCols, $pNumRows); - if ($match[3] !== $modified3) { - if (($match[2] == '') || (trim($match[2], "'") == $sheetName)) { - $toString = ($match[2] > '') ? $match[2].'!' : ''; - $toString .= $modified3; - list($column, $row) = PHPExcel_Cell::coordinateFromString($match[3]); - // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more - $column = PHPExcel_Cell::columnIndexFromString(trim($column, '$')) + 100000; - $row = trim($row, '$') + 10000000; - $cellIndex = $row . $column; - - $newCellTokens[$cellIndex] = preg_quote($toString); - $cellTokens[$cellIndex] = '/(?<![A-Z\$\!])'.preg_quote($fromString).'(?!\d)/i'; - ++$adjustCount; - } - } - } - } - if ($adjustCount > 0) { - if ($pNumCols > 0 || $pNumRows > 0) { - krsort($cellTokens); - krsort($newCellTokens); - } else { - ksort($cellTokens); - ksort($newCellTokens); - } // Update cell references in the formula - $formulaBlock = str_replace('\\', '', preg_replace($cellTokens, $newCellTokens, $formulaBlock)); - } - } - } - unset($formulaBlock); - - // Then rebuild the formula string - return implode('"', $formulaBlocks); - } - - /** - * Update cell reference - * - * @param string $pCellRange Cell range - * @param int $pBefore Insert before this one - * @param int $pNumCols Number of columns to increment - * @param int $pNumRows Number of rows to increment - * @return string Updated cell range - * @throws PHPExcel_Exception - */ - public function updateCellReference($pCellRange = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) - { - // Is it in another worksheet? Will not have to update anything. - if (strpos($pCellRange, "!") !== false) { - return $pCellRange; - // Is it a range or a single cell? - } elseif (strpos($pCellRange, ':') === false && strpos($pCellRange, ',') === false) { - // Single cell - return $this->updateSingleCellReference($pCellRange, $pBefore, $pNumCols, $pNumRows); - } elseif (strpos($pCellRange, ':') !== false || strpos($pCellRange, ',') !== false) { - // Range - return $this->updateCellRange($pCellRange, $pBefore, $pNumCols, $pNumRows); - } else { - // Return original - return $pCellRange; - } - } - - /** - * Update named formulas (i.e. containing worksheet references / named ranges) - * - * @param PHPExcel $pPhpExcel Object to update - * @param string $oldName Old name (name to replace) - * @param string $newName New name - */ - public function updateNamedFormulas(PHPExcel $pPhpExcel, $oldName = '', $newName = '') - { - if ($oldName == '') { - return; - } - - foreach ($pPhpExcel->getWorksheetIterator() as $sheet) { - foreach ($sheet->getCellCollection(false) as $cellID) { - $cell = $sheet->getCell($cellID); - if (($cell !== null) && ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_FORMULA)) { - $formula = $cell->getValue(); - if (strpos($formula, $oldName) !== false) { - $formula = str_replace("'" . $oldName . "'!", "'" . $newName . "'!", $formula); - $formula = str_replace($oldName . "!", $newName . "!", $formula); - $cell->setValueExplicit($formula, PHPExcel_Cell_DataType::TYPE_FORMULA); - } - } - } - } - } - - /** - * Update cell range - * - * @param string $pCellRange Cell range (e.g. 'B2:D4', 'B:C' or '2:3') - * @param int $pBefore Insert before this one - * @param int $pNumCols Number of columns to increment - * @param int $pNumRows Number of rows to increment - * @return string Updated cell range - * @throws PHPExcel_Exception - */ - private function updateCellRange($pCellRange = 'A1:A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) - { - if (strpos($pCellRange, ':') !== false || strpos($pCellRange, ',') !== false) { - // Update range - $range = PHPExcel_Cell::splitRange($pCellRange); - $ic = count($range); - for ($i = 0; $i < $ic; ++$i) { - $jc = count($range[$i]); - for ($j = 0; $j < $jc; ++$j) { - if (ctype_alpha($range[$i][$j])) { - $r = PHPExcel_Cell::coordinateFromString($this->updateSingleCellReference($range[$i][$j].'1', $pBefore, $pNumCols, $pNumRows)); - $range[$i][$j] = $r[0]; - } elseif (ctype_digit($range[$i][$j])) { - $r = PHPExcel_Cell::coordinateFromString($this->updateSingleCellReference('A'.$range[$i][$j], $pBefore, $pNumCols, $pNumRows)); - $range[$i][$j] = $r[1]; - } else { - $range[$i][$j] = $this->updateSingleCellReference($range[$i][$j], $pBefore, $pNumCols, $pNumRows); - } - } - } - - // Recreate range string - return PHPExcel_Cell::buildRange($range); - } else { - throw new PHPExcel_Exception("Only cell ranges may be passed to this method."); - } - } - - /** - * Update single cell reference - * - * @param string $pCellReference Single cell reference - * @param int $pBefore Insert before this one - * @param int $pNumCols Number of columns to increment - * @param int $pNumRows Number of rows to increment - * @return string Updated cell reference - * @throws PHPExcel_Exception - */ - private function updateSingleCellReference($pCellReference = 'A1', $pBefore = 'A1', $pNumCols = 0, $pNumRows = 0) - { - if (strpos($pCellReference, ':') === false && strpos($pCellReference, ',') === false) { - // Get coordinates of $pBefore - list($beforeColumn, $beforeRow) = PHPExcel_Cell::coordinateFromString($pBefore); - - // Get coordinates of $pCellReference - list($newColumn, $newRow) = PHPExcel_Cell::coordinateFromString($pCellReference); - - // Verify which parts should be updated - $updateColumn = (($newColumn{0} != '$') && ($beforeColumn{0} != '$') && (PHPExcel_Cell::columnIndexFromString($newColumn) >= PHPExcel_Cell::columnIndexFromString($beforeColumn))); - $updateRow = (($newRow{0} != '$') && ($beforeRow{0} != '$') && $newRow >= $beforeRow); - - // Create new column reference - if ($updateColumn) { - $newColumn = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($newColumn) - 1 + $pNumCols); - } - - // Create new row reference - if ($updateRow) { - $newRow = $newRow + $pNumRows; - } - - // Return new reference - return $newColumn . $newRow; - } else { - throw new PHPExcel_Exception("Only single cell references may be passed to this method."); - } - } - - /** - * __clone implementation. Cloning should not be allowed in a Singleton! - * - * @throws PHPExcel_Exception - */ - final public function __clone() - { - throw new PHPExcel_Exception("Cloning a Singleton is not allowed!"); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText.php deleted file mode 100644 index 74a3534..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText.php +++ /dev/null @@ -1,191 +0,0 @@ -<?php - -/** - * PHPExcel_RichText - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_RichText - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_RichText implements PHPExcel_IComparable -{ - /** - * Rich text elements - * - * @var PHPExcel_RichText_ITextElement[] - */ - private $richTextElements; - - /** - * Create a new PHPExcel_RichText instance - * - * @param PHPExcel_Cell $pCell - * @throws PHPExcel_Exception - */ - public function __construct(PHPExcel_Cell $pCell = null) - { - // Initialise variables - $this->richTextElements = array(); - - // Rich-Text string attached to cell? - if ($pCell !== null) { - // Add cell text and style - if ($pCell->getValue() != "") { - $objRun = new PHPExcel_RichText_Run($pCell->getValue()); - $objRun->setFont(clone $pCell->getParent()->getStyle($pCell->getCoordinate())->getFont()); - $this->addText($objRun); - } - - // Set parent value - $pCell->setValueExplicit($this, PHPExcel_Cell_DataType::TYPE_STRING); - } - } - - /** - * Add text - * - * @param PHPExcel_RichText_ITextElement $pText Rich text element - * @throws PHPExcel_Exception - * @return PHPExcel_RichText - */ - public function addText(PHPExcel_RichText_ITextElement $pText = null) - { - $this->richTextElements[] = $pText; - return $this; - } - - /** - * Create text - * - * @param string $pText Text - * @return PHPExcel_RichText_TextElement - * @throws PHPExcel_Exception - */ - public function createText($pText = '') - { - $objText = new PHPExcel_RichText_TextElement($pText); - $this->addText($objText); - return $objText; - } - - /** - * Create text run - * - * @param string $pText Text - * @return PHPExcel_RichText_Run - * @throws PHPExcel_Exception - */ - public function createTextRun($pText = '') - { - $objText = new PHPExcel_RichText_Run($pText); - $this->addText($objText); - return $objText; - } - - /** - * Get plain text - * - * @return string - */ - public function getPlainText() - { - // Return value - $returnValue = ''; - - // Loop through all PHPExcel_RichText_ITextElement - foreach ($this->richTextElements as $text) { - $returnValue .= $text->getText(); - } - - // Return - return $returnValue; - } - - /** - * Convert to string - * - * @return string - */ - public function __toString() - { - return $this->getPlainText(); - } - - /** - * Get Rich Text elements - * - * @return PHPExcel_RichText_ITextElement[] - */ - public function getRichTextElements() - { - return $this->richTextElements; - } - - /** - * Set Rich Text elements - * - * @param PHPExcel_RichText_ITextElement[] $pElements Array of elements - * @throws PHPExcel_Exception - * @return PHPExcel_RichText - */ - public function setRichTextElements($pElements = null) - { - if (is_array($pElements)) { - $this->richTextElements = $pElements; - } else { - throw new PHPExcel_Exception("Invalid PHPExcel_RichText_ITextElement[] array passed."); - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - $hashElements = ''; - foreach ($this->richTextElements as $element) { - $hashElements .= $element->getHashCode(); - } - - return md5( - $hashElements . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/ITextElement.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/ITextElement.php deleted file mode 100644 index 5db3432..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/ITextElement.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/** - * PHPExcel_RichText_ITextElement - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_RichText - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -interface PHPExcel_RichText_ITextElement -{ - /** - * Get text - * - * @return string Text - */ - public function getText(); - - /** - * Set text - * - * @param $pText string Text - * @return PHPExcel_RichText_ITextElement - */ - public function setText($pText = ''); - - /** - * Get font - * - * @return PHPExcel_Style_Font - */ - public function getFont(); - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode(); -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/Run.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/Run.php deleted file mode 100644 index 5737bb0..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/Run.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php - -/** - * PHPExcel_RichText_Run - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_RichText - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_RichText_Run extends PHPExcel_RichText_TextElement implements PHPExcel_RichText_ITextElement -{ - /** - * Font - * - * @var PHPExcel_Style_Font - */ - private $font; - - /** - * Create a new PHPExcel_RichText_Run instance - * - * @param string $pText Text - */ - public function __construct($pText = '') - { - // Initialise variables - $this->setText($pText); - $this->font = new PHPExcel_Style_Font(); - } - - /** - * Get font - * - * @return PHPExcel_Style_Font - */ - public function getFont() - { - return $this->font; - } - - /** - * Set font - * - * @param PHPExcel_Style_Font $pFont Font - * @throws PHPExcel_Exception - * @return PHPExcel_RichText_ITextElement - */ - public function setFont(PHPExcel_Style_Font $pFont = null) - { - $this->font = $pFont; - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->getText() . - $this->font->getHashCode() . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/TextElement.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/TextElement.php deleted file mode 100644 index f86e703..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/RichText/TextElement.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php - -/** - * PHPExcel_RichText_TextElement - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_RichText - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_RichText_TextElement implements PHPExcel_RichText_ITextElement -{ - /** - * Text - * - * @var string - */ - private $text; - - /** - * Create a new PHPExcel_RichText_TextElement instance - * - * @param string $pText Text - */ - public function __construct($pText = '') - { - // Initialise variables - $this->text = $pText; - } - - /** - * Get text - * - * @return string Text - */ - public function getText() - { - return $this->text; - } - - /** - * Set text - * - * @param $pText string Text - * @return PHPExcel_RichText_ITextElement - */ - public function setText($pText = '') - { - $this->text = $pText; - return $this; - } - - /** - * Get font - * - * @return PHPExcel_Style_Font - */ - public function getFont() - { - return null; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->text . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Settings.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Settings.php deleted file mode 100644 index dcbc89f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Settings.php +++ /dev/null @@ -1,389 +0,0 @@ -<?php - -/** PHPExcel root directory */ -if (!defined('PHPEXCEL_ROOT')) { - /** - * @ignore - */ - define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../'); - require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); -} - -/** - * PHPExcel_Settings - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Settings - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Settings -{ - /** constants */ - /** Available Zip library classes */ - const PCLZIP = 'PHPExcel_Shared_ZipArchive'; - const ZIPARCHIVE = 'ZipArchive'; - - /** Optional Chart Rendering libraries */ - const CHART_RENDERER_JPGRAPH = 'jpgraph'; - - /** Optional PDF Rendering libraries */ - const PDF_RENDERER_TCPDF = 'tcPDF'; - const PDF_RENDERER_DOMPDF = 'DomPDF'; - const PDF_RENDERER_MPDF = 'mPDF'; - - - private static $chartRenderers = array( - self::CHART_RENDERER_JPGRAPH, - ); - - private static $pdfRenderers = array( - self::PDF_RENDERER_TCPDF, - self::PDF_RENDERER_DOMPDF, - self::PDF_RENDERER_MPDF, - ); - - - /** - * Name of the class used for Zip file management - * e.g. - * ZipArchive - * - * @var string - */ - private static $zipClass = self::ZIPARCHIVE; - - - /** - * Name of the external Library used for rendering charts - * e.g. - * jpgraph - * - * @var string - */ - private static $chartRendererName; - - /** - * Directory Path to the external Library used for rendering charts - * - * @var string - */ - private static $chartRendererPath; - - - /** - * Name of the external Library used for rendering PDF files - * e.g. - * mPDF - * - * @var string - */ - private static $pdfRendererName; - - /** - * Directory Path to the external Library used for rendering PDF files - * - * @var string - */ - private static $pdfRendererPath; - - /** - * Default options for libxml loader - * - * @var int - */ - private static $libXmlLoaderOptions = null; - - /** - * Set the Zip handler Class that PHPExcel should use for Zip file management (PCLZip or ZipArchive) - * - * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management - * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive - * @return boolean Success or failure - */ - public static function setZipClass($zipClass) - { - if (($zipClass === self::PCLZIP) || - ($zipClass === self::ZIPARCHIVE)) { - self::$zipClass = $zipClass; - return true; - } - return false; - } - - - /** - * Return the name of the Zip handler Class that PHPExcel is configured to use (PCLZip or ZipArchive) - * or Zip file management - * - * @return string Name of the Zip handler Class that PHPExcel is configured to use - * for Zip file management - * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive - */ - public static function getZipClass() - { - return self::$zipClass; - } - - - /** - * Return the name of the method that is currently configured for cell cacheing - * - * @return string Name of the cacheing method - */ - public static function getCacheStorageMethod() - { - return PHPExcel_CachedObjectStorageFactory::getCacheStorageMethod(); - } - - - /** - * Return the name of the class that is currently being used for cell cacheing - * - * @return string Name of the class currently being used for cacheing - */ - public static function getCacheStorageClass() - { - return PHPExcel_CachedObjectStorageFactory::getCacheStorageClass(); - } - - - /** - * Set the method that should be used for cell cacheing - * - * @param string $method Name of the cacheing method - * @param array $arguments Optional configuration arguments for the cacheing method - * @return boolean Success or failure - */ - public static function setCacheStorageMethod($method = PHPExcel_CachedObjectStorageFactory::cache_in_memory, $arguments = array()) - { - return PHPExcel_CachedObjectStorageFactory::initialize($method, $arguments); - } - - - /** - * Set the locale code to use for formula translations and any special formatting - * - * @param string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk") - * @return boolean Success or failure - */ - public static function setLocale($locale = 'en_us') - { - return PHPExcel_Calculation::getInstance()->setLocale($locale); - } - - - /** - * Set details of the external library that PHPExcel should use for rendering charts - * - * @param string $libraryName Internal reference name of the library - * e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH - * @param string $libraryBaseDir Directory path to the library's base folder - * - * @return boolean Success or failure - */ - public static function setChartRenderer($libraryName, $libraryBaseDir) - { - if (!self::setChartRendererName($libraryName)) { - return false; - } - return self::setChartRendererPath($libraryBaseDir); - } - - - /** - * Identify to PHPExcel the external library to use for rendering charts - * - * @param string $libraryName Internal reference name of the library - * e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH - * - * @return boolean Success or failure - */ - public static function setChartRendererName($libraryName) - { - if (!in_array($libraryName, self::$chartRenderers)) { - return false; - } - self::$chartRendererName = $libraryName; - - return true; - } - - - /** - * Tell PHPExcel where to find the external library to use for rendering charts - * - * @param string $libraryBaseDir Directory path to the library's base folder - * @return boolean Success or failure - */ - public static function setChartRendererPath($libraryBaseDir) - { - if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) { - return false; - } - self::$chartRendererPath = $libraryBaseDir; - - return true; - } - - - /** - * Return the Chart Rendering Library that PHPExcel is currently configured to use (e.g. jpgraph) - * - * @return string|NULL Internal reference name of the Chart Rendering Library that PHPExcel is - * currently configured to use - * e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH - */ - public static function getChartRendererName() - { - return self::$chartRendererName; - } - - - /** - * Return the directory path to the Chart Rendering Library that PHPExcel is currently configured to use - * - * @return string|NULL Directory Path to the Chart Rendering Library that PHPExcel is - * currently configured to use - */ - public static function getChartRendererPath() - { - return self::$chartRendererPath; - } - - - /** - * Set details of the external library that PHPExcel should use for rendering PDF files - * - * @param string $libraryName Internal reference name of the library - * e.g. PHPExcel_Settings::PDF_RENDERER_TCPDF, - * PHPExcel_Settings::PDF_RENDERER_DOMPDF - * or PHPExcel_Settings::PDF_RENDERER_MPDF - * @param string $libraryBaseDir Directory path to the library's base folder - * - * @return boolean Success or failure - */ - public static function setPdfRenderer($libraryName, $libraryBaseDir) - { - if (!self::setPdfRendererName($libraryName)) { - return false; - } - return self::setPdfRendererPath($libraryBaseDir); - } - - - /** - * Identify to PHPExcel the external library to use for rendering PDF files - * - * @param string $libraryName Internal reference name of the library - * e.g. PHPExcel_Settings::PDF_RENDERER_TCPDF, - * PHPExcel_Settings::PDF_RENDERER_DOMPDF - * or PHPExcel_Settings::PDF_RENDERER_MPDF - * - * @return boolean Success or failure - */ - public static function setPdfRendererName($libraryName) - { - if (!in_array($libraryName, self::$pdfRenderers)) { - return false; - } - self::$pdfRendererName = $libraryName; - - return true; - } - - - /** - * Tell PHPExcel where to find the external library to use for rendering PDF files - * - * @param string $libraryBaseDir Directory path to the library's base folder - * @return boolean Success or failure - */ - public static function setPdfRendererPath($libraryBaseDir) - { - if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) { - return false; - } - self::$pdfRendererPath = $libraryBaseDir; - - return true; - } - - - /** - * Return the PDF Rendering Library that PHPExcel is currently configured to use (e.g. dompdf) - * - * @return string|NULL Internal reference name of the PDF Rendering Library that PHPExcel is - * currently configured to use - * e.g. PHPExcel_Settings::PDF_RENDERER_TCPDF, - * PHPExcel_Settings::PDF_RENDERER_DOMPDF - * or PHPExcel_Settings::PDF_RENDERER_MPDF - */ - public static function getPdfRendererName() - { - return self::$pdfRendererName; - } - - /** - * Return the directory path to the PDF Rendering Library that PHPExcel is currently configured to use - * - * @return string|NULL Directory Path to the PDF Rendering Library that PHPExcel is - * currently configured to use - */ - public static function getPdfRendererPath() - { - return self::$pdfRendererPath; - } - - /** - * Set options for libxml loader - * - * @param int $options Options for libxml loader - */ - public static function setLibXmlLoaderOptions($options = null) - { - if (is_null($options) && defined('LIBXML_DTDLOAD')) { - $options = LIBXML_DTDLOAD | LIBXML_DTDATTR; - } - if (version_compare(PHP_VERSION, '5.2.11') >= 0) { - @libxml_disable_entity_loader((bool) $options); - } - self::$libXmlLoaderOptions = $options; - } - - /** - * Get defined options for libxml loader. - * Defaults to LIBXML_DTDLOAD | LIBXML_DTDATTR when not set explicitly. - * - * @return int Default options for libxml loader - */ - public static function getLibXmlLoaderOptions() - { - if (is_null(self::$libXmlLoaderOptions) && defined('LIBXML_DTDLOAD')) { - self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR); - } elseif (is_null(self::$libXmlLoaderOptions)) { - self::$libXmlLoaderOptions = true; - } - if (version_compare(PHP_VERSION, '5.2.11') >= 0) { - @libxml_disable_entity_loader((bool) self::$libXmlLoaderOptions); - } - return self::$libXmlLoaderOptions; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/CodePage.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/CodePage.php deleted file mode 100644 index b3e440e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/CodePage.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_CodePage - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_CodePage -{ - /** - * Convert Microsoft Code Page Identifier to Code Page Name which iconv - * and mbstring understands - * - * @param integer $codePage Microsoft Code Page Indentifier - * @return string Code Page Name - * @throws PHPExcel_Exception - */ - public static function NumberToName($codePage = 1252) - { - switch ($codePage) { - case 367: - return 'ASCII'; // ASCII - case 437: - return 'CP437'; // OEM US - case 720: - throw new PHPExcel_Exception('Code page 720 not supported.'); // OEM Arabic - case 737: - return 'CP737'; // OEM Greek - case 775: - return 'CP775'; // OEM Baltic - case 850: - return 'CP850'; // OEM Latin I - case 852: - return 'CP852'; // OEM Latin II (Central European) - case 855: - return 'CP855'; // OEM Cyrillic - case 857: - return 'CP857'; // OEM Turkish - case 858: - return 'CP858'; // OEM Multilingual Latin I with Euro - case 860: - return 'CP860'; // OEM Portugese - case 861: - return 'CP861'; // OEM Icelandic - case 862: - return 'CP862'; // OEM Hebrew - case 863: - return 'CP863'; // OEM Canadian (French) - case 864: - return 'CP864'; // OEM Arabic - case 865: - return 'CP865'; // OEM Nordic - case 866: - return 'CP866'; // OEM Cyrillic (Russian) - case 869: - return 'CP869'; // OEM Greek (Modern) - case 874: - return 'CP874'; // ANSI Thai - case 932: - return 'CP932'; // ANSI Japanese Shift-JIS - case 936: - return 'CP936'; // ANSI Chinese Simplified GBK - case 949: - return 'CP949'; // ANSI Korean (Wansung) - case 950: - return 'CP950'; // ANSI Chinese Traditional BIG5 - case 1200: - return 'UTF-16LE'; // UTF-16 (BIFF8) - case 1250: - return 'CP1250'; // ANSI Latin II (Central European) - case 1251: - return 'CP1251'; // ANSI Cyrillic - case 0: - // CodePage is not always correctly set when the xls file was saved by Apple's Numbers program - case 1252: - return 'CP1252'; // ANSI Latin I (BIFF4-BIFF7) - case 1253: - return 'CP1253'; // ANSI Greek - case 1254: - return 'CP1254'; // ANSI Turkish - case 1255: - return 'CP1255'; // ANSI Hebrew - case 1256: - return 'CP1256'; // ANSI Arabic - case 1257: - return 'CP1257'; // ANSI Baltic - case 1258: - return 'CP1258'; // ANSI Vietnamese - case 1361: - return 'CP1361'; // ANSI Korean (Johab) - case 10000: - return 'MAC'; // Apple Roman - case 10001: - return 'CP932'; // Macintosh Japanese - case 10002: - return 'CP950'; // Macintosh Chinese Traditional - case 10003: - return 'CP1361'; // Macintosh Korean - case 10004: - return 'MACARABIC'; // Apple Arabic - case 10005: - return 'MACHEBREW'; // Apple Hebrew - case 10006: - return 'MACGREEK'; // Macintosh Greek - case 10007: - return 'MACCYRILLIC'; // Macintosh Cyrillic - case 10008: - return 'CP936'; // Macintosh - Simplified Chinese (GB 2312) - case 10010: - return 'MACROMANIA'; // Macintosh Romania - case 10017: - return 'MACUKRAINE'; // Macintosh Ukraine - case 10021: - return 'MACTHAI'; // Macintosh Thai - case 10029: - return 'MACCENTRALEUROPE'; // Macintosh Central Europe - case 10079: - return 'MACICELAND'; // Macintosh Icelandic - case 10081: - return 'MACTURKISH'; // Macintosh Turkish - case 10082: - return 'MACCROATIAN'; // Macintosh Croatian - case 21010: - return 'UTF-16LE'; // UTF-16 (BIFF8) This isn't correct, but some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE - case 32768: - return 'MAC'; // Apple Roman - case 32769: - throw new PHPExcel_Exception('Code page 32769 not supported.'); // ANSI Latin I (BIFF2-BIFF3) - case 65000: - return 'UTF-7'; // Unicode (UTF-7) - case 65001: - return 'UTF-8'; // Unicode (UTF-8) - } - throw new PHPExcel_Exception('Unknown codepage: ' . $codePage); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Date.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Date.php deleted file mode 100644 index b00a39a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Date.php +++ /dev/null @@ -1,418 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Date - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Date -{ - /** constants */ - const CALENDAR_WINDOWS_1900 = 1900; // Base date of 1st Jan 1900 = 1.0 - const CALENDAR_MAC_1904 = 1904; // Base date of 2nd Jan 1904 = 1.0 - - /* - * Names of the months of the year, indexed by shortname - * Planned usage for locale settings - * - * @public - * @var string[] - */ - public static $monthNames = array( - 'Jan' => 'January', - 'Feb' => 'February', - 'Mar' => 'March', - 'Apr' => 'April', - 'May' => 'May', - 'Jun' => 'June', - 'Jul' => 'July', - 'Aug' => 'August', - 'Sep' => 'September', - 'Oct' => 'October', - 'Nov' => 'November', - 'Dec' => 'December', - ); - - /* - * Names of the months of the year, indexed by shortname - * Planned usage for locale settings - * - * @public - * @var string[] - */ - public static $numberSuffixes = array( - 'st', - 'nd', - 'rd', - 'th', - ); - - /* - * Base calendar year to use for calculations - * - * @private - * @var int - */ - protected static $excelBaseDate = self::CALENDAR_WINDOWS_1900; - - /** - * Set the Excel calendar (Windows 1900 or Mac 1904) - * - * @param integer $baseDate Excel base date (1900 or 1904) - * @return boolean Success or failure - */ - public static function setExcelCalendar($baseDate) - { - if (($baseDate == self::CALENDAR_WINDOWS_1900) || - ($baseDate == self::CALENDAR_MAC_1904)) { - self::$excelBaseDate = $baseDate; - return true; - } - return false; - } - - - /** - * Return the Excel calendar (Windows 1900 or Mac 1904) - * - * @return integer Excel base date (1900 or 1904) - */ - public static function getExcelCalendar() - { - return self::$excelBaseDate; - } - - - /** - * Convert a date from Excel to PHP - * - * @param integer $dateValue Excel date/time value - * @param boolean $adjustToTimezone Flag indicating whether $dateValue should be treated as - * a UST timestamp, or adjusted to UST - * @param string $timezone The timezone for finding the adjustment from UST - * @return integer PHP serialized date/time - */ - public static function ExcelToPHP($dateValue = 0, $adjustToTimezone = false, $timezone = null) - { - if (self::$excelBaseDate == self::CALENDAR_WINDOWS_1900) { - $myexcelBaseDate = 25569; - // Adjust for the spurious 29-Feb-1900 (Day 60) - if ($dateValue < 60) { - --$myexcelBaseDate; - } - } else { - $myexcelBaseDate = 24107; - } - - // Perform conversion - if ($dateValue >= 1) { - $utcDays = $dateValue - $myexcelBaseDate; - $returnValue = round($utcDays * 86400); - if (($returnValue <= PHP_INT_MAX) && ($returnValue >= -PHP_INT_MAX)) { - $returnValue = (integer) $returnValue; - } - } else { - $hours = round($dateValue * 24); - $mins = round($dateValue * 1440) - round($hours * 60); - $secs = round($dateValue * 86400) - round($hours * 3600) - round($mins * 60); - $returnValue = (integer) gmmktime($hours, $mins, $secs); - } - - $timezoneAdjustment = ($adjustToTimezone) ? - PHPExcel_Shared_TimeZone::getTimezoneAdjustment($timezone, $returnValue) : - 0; - - return $returnValue + $timezoneAdjustment; - } - - - /** - * Convert a date from Excel to a PHP Date/Time object - * - * @param integer $dateValue Excel date/time value - * @return DateTime PHP date/time object - */ - public static function ExcelToPHPObject($dateValue = 0) - { - $dateTime = self::ExcelToPHP($dateValue); - $days = floor($dateTime / 86400); - $time = round((($dateTime / 86400) - $days) * 86400); - $hours = round($time / 3600); - $minutes = round($time / 60) - ($hours * 60); - $seconds = round($time) - ($hours * 3600) - ($minutes * 60); - - $dateObj = date_create('1-Jan-1970+'.$days.' days'); - $dateObj->setTime($hours, $minutes, $seconds); - - return $dateObj; - } - - - /** - * Convert a date from PHP to Excel - * - * @param mixed $dateValue PHP serialized date/time or date object - * @param boolean $adjustToTimezone Flag indicating whether $dateValue should be treated as - * a UST timestamp, or adjusted to UST - * @param string $timezone The timezone for finding the adjustment from UST - * @return mixed Excel date/time value - * or boolean FALSE on failure - */ - public static function PHPToExcel($dateValue = 0, $adjustToTimezone = false, $timezone = null) - { - $saveTimeZone = date_default_timezone_get(); - date_default_timezone_set('UTC'); - - $timezoneAdjustment = ($adjustToTimezone) ? - PHPExcel_Shared_TimeZone::getTimezoneAdjustment($timezone ? $timezone : $saveTimeZone, $dateValue) : - 0; - - $retValue = false; - if ((is_object($dateValue)) && ($dateValue instanceof DateTime)) { - $dateValue->add(new DateInterval('PT' . $timezoneAdjustment . 'S')); - $retValue = self::FormattedPHPToExcel($dateValue->format('Y'), $dateValue->format('m'), $dateValue->format('d'), $dateValue->format('H'), $dateValue->format('i'), $dateValue->format('s')); - } elseif (is_numeric($dateValue)) { - $dateValue += $timezoneAdjustment; - $retValue = self::FormattedPHPToExcel(date('Y', $dateValue), date('m', $dateValue), date('d', $dateValue), date('H', $dateValue), date('i', $dateValue), date('s', $dateValue)); - } elseif (is_string($dateValue)) { - $retValue = self::stringToExcel($dateValue); - } - date_default_timezone_set($saveTimeZone); - - return $retValue; - } - - - /** - * FormattedPHPToExcel - * - * @param integer $year - * @param integer $month - * @param integer $day - * @param integer $hours - * @param integer $minutes - * @param integer $seconds - * @return integer Excel date/time value - */ - public static function FormattedPHPToExcel($year, $month, $day, $hours = 0, $minutes = 0, $seconds = 0) - { - if (self::$excelBaseDate == self::CALENDAR_WINDOWS_1900) { - // - // Fudge factor for the erroneous fact that the year 1900 is treated as a Leap Year in MS Excel - // This affects every date following 28th February 1900 - // - $excel1900isLeapYear = true; - if (($year == 1900) && ($month <= 2)) { - $excel1900isLeapYear = false; - } - $myexcelBaseDate = 2415020; - } else { - $myexcelBaseDate = 2416481; - $excel1900isLeapYear = false; - } - - // Julian base date Adjustment - if ($month > 2) { - $month -= 3; - } else { - $month += 9; - --$year; - } - - // Calculate the Julian Date, then subtract the Excel base date (JD 2415020 = 31-Dec-1899 Giving Excel Date of 0) - $century = substr($year, 0, 2); - $decade = substr($year, 2, 2); - $excelDate = floor((146097 * $century) / 4) + floor((1461 * $decade) / 4) + floor((153 * $month + 2) / 5) + $day + 1721119 - $myexcelBaseDate + $excel1900isLeapYear; - - $excelTime = (($hours * 3600) + ($minutes * 60) + $seconds) / 86400; - - return (float) $excelDate + $excelTime; - } - - - /** - * Is a given cell a date/time? - * - * @param PHPExcel_Cell $pCell - * @return boolean - */ - public static function isDateTime(PHPExcel_Cell $pCell) - { - return self::isDateTimeFormat( - $pCell->getWorksheet()->getStyle( - $pCell->getCoordinate() - )->getNumberFormat() - ); - } - - - /** - * Is a given number format a date/time? - * - * @param PHPExcel_Style_NumberFormat $pFormat - * @return boolean - */ - public static function isDateTimeFormat(PHPExcel_Style_NumberFormat $pFormat) - { - return self::isDateTimeFormatCode($pFormat->getFormatCode()); - } - - - private static $possibleDateFormatCharacters = 'eymdHs'; - - /** - * Is a given number format code a date/time? - * - * @param string $pFormatCode - * @return boolean - */ - public static function isDateTimeFormatCode($pFormatCode = '') - { - if (strtolower($pFormatCode) === strtolower(PHPExcel_Style_NumberFormat::FORMAT_GENERAL)) { - // "General" contains an epoch letter 'e', so we trap for it explicitly here (case-insensitive check) - return false; - } - if (preg_match('/[0#]E[+-]0/i', $pFormatCode)) { - // Scientific format - return false; - } - - // Switch on formatcode - switch ($pFormatCode) { - // Explicitly defined date formats - case PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_DMYSLASH: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_DMYMINUS: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_DMMINUS: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_MYMINUS: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME1: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME2: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME3: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME5: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME6: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME7: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME8: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDDSLASH: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX14: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX16: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX17: - case PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX22: - return true; - } - - // Typically number, currency or accounting (or occasionally fraction) formats - if ((substr($pFormatCode, 0, 1) == '_') || (substr($pFormatCode, 0, 2) == '0 ')) { - return false; - } - // Try checking for any of the date formatting characters that don't appear within square braces - if (preg_match('/(^|\])[^\[]*['.self::$possibleDateFormatCharacters.']/i', $pFormatCode)) { - // We might also have a format mask containing quoted strings... - // we don't want to test for any of our characters within the quoted blocks - if (strpos($pFormatCode, '"') !== false) { - $segMatcher = false; - foreach (explode('"', $pFormatCode) as $subVal) { - // Only test in alternate array entries (the non-quoted blocks) - if (($segMatcher = !$segMatcher) && - (preg_match('/(^|\])[^\[]*['.self::$possibleDateFormatCharacters.']/i', $subVal))) { - return true; - } - } - return false; - } - return true; - } - - // No date... - return false; - } - - - /** - * Convert a date/time string to Excel time - * - * @param string $dateValue Examples: '2009-12-31', '2009-12-31 15:59', '2009-12-31 15:59:10' - * @return float|FALSE Excel date/time serial value - */ - public static function stringToExcel($dateValue = '') - { - if (strlen($dateValue) < 2) { - return false; - } - if (!preg_match('/^(\d{1,4}[ \.\/\-][A-Z]{3,9}([ \.\/\-]\d{1,4})?|[A-Z]{3,9}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?|\d{1,4}[ \.\/\-]\d{1,4}([ \.\/\-]\d{1,4})?)( \d{1,2}:\d{1,2}(:\d{1,2})?)?$/iu', $dateValue)) { - return false; - } - - $dateValueNew = PHPExcel_Calculation_DateTime::DATEVALUE($dateValue); - - if ($dateValueNew === PHPExcel_Calculation_Functions::VALUE()) { - return false; - } - - if (strpos($dateValue, ':') !== false) { - $timeValue = PHPExcel_Calculation_DateTime::TIMEVALUE($dateValue); - if ($timeValue === PHPExcel_Calculation_Functions::VALUE()) { - return false; - } - $dateValueNew += $timeValue; - } - return $dateValueNew; - } - - /** - * Converts a month name (either a long or a short name) to a month number - * - * @param string $month Month name or abbreviation - * @return integer|string Month number (1 - 12), or the original string argument if it isn't a valid month name - */ - public static function monthStringToNumber($month) - { - $monthIndex = 1; - foreach (self::$monthNames as $shortMonthName => $longMonthName) { - if (($month === $longMonthName) || ($month === $shortMonthName)) { - return $monthIndex; - } - ++$monthIndex; - } - return $month; - } - - /** - * Strips an ordinal froma numeric value - * - * @param string $day Day number with an ordinal - * @return integer|string The integer value with any ordinal stripped, or the original string argument if it isn't a valid numeric - */ - public static function dayStringToNumber($day) - { - $strippedDayValue = (str_replace(self::$numberSuffixes, '', $day)); - if (is_numeric($strippedDayValue)) { - return (integer) $strippedDayValue; - } - return $day; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Drawing.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Drawing.php deleted file mode 100644 index 3e027b4..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Drawing.php +++ /dev/null @@ -1,270 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Shared_Drawing - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Shared_Drawing -{ - /** - * Convert pixels to EMU - * - * @param int $pValue Value in pixels - * @return int Value in EMU - */ - public static function pixelsToEMU($pValue = 0) - { - return round($pValue * 9525); - } - - /** - * Convert EMU to pixels - * - * @param int $pValue Value in EMU - * @return int Value in pixels - */ - public static function EMUToPixels($pValue = 0) - { - if ($pValue != 0) { - return round($pValue / 9525); - } else { - return 0; - } - } - - /** - * Convert pixels to column width. Exact algorithm not known. - * By inspection of a real Excel file using Calibri 11, one finds 1000px ~ 142.85546875 - * This gives a conversion factor of 7. Also, we assume that pixels and font size are proportional. - * - * @param int $pValue Value in pixels - * @param PHPExcel_Style_Font $pDefaultFont Default font of the workbook - * @return int Value in cell dimension - */ - public static function pixelsToCellDimension($pValue = 0, PHPExcel_Style_Font $pDefaultFont) - { - // Font name and size - $name = $pDefaultFont->getName(); - $size = $pDefaultFont->getSize(); - - if (isset(PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size])) { - // Exact width can be determined - $colWidth = $pValue * PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size]['width'] / PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size]['px']; - } else { - // We don't have data for this particular font and size, use approximation by - // extrapolating from Calibri 11 - $colWidth = $pValue * 11 * PHPExcel_Shared_Font::$defaultColumnWidths['Calibri'][11]['width'] / PHPExcel_Shared_Font::$defaultColumnWidths['Calibri'][11]['px'] / $size; - } - - return $colWidth; - } - - /** - * Convert column width from (intrinsic) Excel units to pixels - * - * @param float $pValue Value in cell dimension - * @param PHPExcel_Style_Font $pDefaultFont Default font of the workbook - * @return int Value in pixels - */ - public static function cellDimensionToPixels($pValue = 0, PHPExcel_Style_Font $pDefaultFont) - { - // Font name and size - $name = $pDefaultFont->getName(); - $size = $pDefaultFont->getSize(); - - if (isset(PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size])) { - // Exact width can be determined - $colWidth = $pValue * PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size]['px'] / PHPExcel_Shared_Font::$defaultColumnWidths[$name][$size]['width']; - } else { - // We don't have data for this particular font and size, use approximation by - // extrapolating from Calibri 11 - $colWidth = $pValue * $size * PHPExcel_Shared_Font::$defaultColumnWidths['Calibri'][11]['px'] / PHPExcel_Shared_Font::$defaultColumnWidths['Calibri'][11]['width'] / 11; - } - - // Round pixels to closest integer - $colWidth = (int) round($colWidth); - - return $colWidth; - } - - /** - * Convert pixels to points - * - * @param int $pValue Value in pixels - * @return int Value in points - */ - public static function pixelsToPoints($pValue = 0) - { - return $pValue * 0.67777777; - } - - /** - * Convert points to pixels - * - * @param int $pValue Value in points - * @return int Value in pixels - */ - public static function pointsToPixels($pValue = 0) - { - if ($pValue != 0) { - return (int) ceil($pValue * 1.333333333); - } else { - return 0; - } - } - - /** - * Convert degrees to angle - * - * @param int $pValue Degrees - * @return int Angle - */ - public static function degreesToAngle($pValue = 0) - { - return (int)round($pValue * 60000); - } - - /** - * Convert angle to degrees - * - * @param int $pValue Angle - * @return int Degrees - */ - public static function angleToDegrees($pValue = 0) - { - if ($pValue != 0) { - return round($pValue / 60000); - } else { - return 0; - } - } - - /** - * Create a new image from file. By alexander at alexauto dot nl - * - * @link http://www.php.net/manual/en/function.imagecreatefromwbmp.php#86214 - * @param string $filename Path to Windows DIB (BMP) image - * @return resource - */ - public static function imagecreatefrombmp($p_sFile) - { - // Load the image into a string - $file = fopen($p_sFile, "rb"); - $read = fread($file, 10); - while (!feof($file) && ($read<>"")) { - $read .= fread($file, 1024); - } - - $temp = unpack("H*", $read); - $hex = $temp[1]; - $header = substr($hex, 0, 108); - - // Process the header - // Structure: http://www.fastgraph.com/help/bmp_header_format.html - if (substr($header, 0, 4)=="424d") { - // Cut it in parts of 2 bytes - $header_parts = str_split($header, 2); - - // Get the width 4 bytes - $width = hexdec($header_parts[19].$header_parts[18]); - - // Get the height 4 bytes - $height = hexdec($header_parts[23].$header_parts[22]); - - // Unset the header params - unset($header_parts); - } - - // Define starting X and Y - $x = 0; - $y = 1; - - // Create newimage - $image = imagecreatetruecolor($width, $height); - - // Grab the body from the image - $body = substr($hex, 108); - - // Calculate if padding at the end-line is needed - // Divided by two to keep overview. - // 1 byte = 2 HEX-chars - $body_size = (strlen($body)/2); - $header_size = ($width*$height); - - // Use end-line padding? Only when needed - $usePadding = ($body_size>($header_size*3)+4); - - // Using a for-loop with index-calculation instaid of str_split to avoid large memory consumption - // Calculate the next DWORD-position in the body - for ($i = 0; $i < $body_size; $i += 3) { - // Calculate line-ending and padding - if ($x >= $width) { - // If padding needed, ignore image-padding - // Shift i to the ending of the current 32-bit-block - if ($usePadding) { - $i += $width%4; - } - - // Reset horizontal position - $x = 0; - - // Raise the height-position (bottom-up) - $y++; - - // Reached the image-height? Break the for-loop - if ($y > $height) { - break; - } - } - - // Calculation of the RGB-pixel (defined as BGR in image-data) - // Define $i_pos as absolute position in the body - $i_pos = $i * 2; - $r = hexdec($body[$i_pos+4].$body[$i_pos+5]); - $g = hexdec($body[$i_pos+2].$body[$i_pos+3]); - $b = hexdec($body[$i_pos].$body[$i_pos+1]); - - // Calculate and draw the pixel - $color = imagecolorallocate($image, $r, $g, $b); - imagesetpixel($image, $x, $height-$y, $color); - - // Raise the horizontal position - $x++; - } - - // Unset the body / free the memory - unset($body); - - // Return image-object - return $image; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher.php deleted file mode 100644 index 1aedb9d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Escher - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Escher - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Escher -{ - /** - * Drawing Group Container - * - * @var PHPExcel_Shared_Escher_DggContainer - */ - private $dggContainer; - - /** - * Drawing Container - * - * @var PHPExcel_Shared_Escher_DgContainer - */ - private $dgContainer; - - /** - * Get Drawing Group Container - * - * @return PHPExcel_Shared_Escher_DgContainer - */ - public function getDggContainer() - { - return $this->dggContainer; - } - - /** - * Set Drawing Group Container - * - * @param PHPExcel_Shared_Escher_DggContainer $dggContainer - */ - public function setDggContainer($dggContainer) - { - return $this->dggContainer = $dggContainer; - } - - /** - * Get Drawing Container - * - * @return PHPExcel_Shared_Escher_DgContainer - */ - public function getDgContainer() - { - return $this->dgContainer; - } - - /** - * Set Drawing Container - * - * @param PHPExcel_Shared_Escher_DgContainer $dgContainer - */ - public function setDgContainer($dgContainer) - { - return $this->dgContainer = $dgContainer; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer.php deleted file mode 100644 index 739cd90..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Escher_DgContainer - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Escher - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Escher_DgContainer -{ - /** - * Drawing index, 1-based. - * - * @var int - */ - private $dgId; - - /** - * Last shape index in this drawing - * - * @var int - */ - private $lastSpId; - - private $spgrContainer = null; - - public function getDgId() - { - return $this->dgId; - } - - public function setDgId($value) - { - $this->dgId = $value; - } - - public function getLastSpId() - { - return $this->lastSpId; - } - - public function setLastSpId($value) - { - $this->lastSpId = $value; - } - - public function getSpgrContainer() - { - return $this->spgrContainer; - } - - public function setSpgrContainer($spgrContainer) - { - return $this->spgrContainer = $spgrContainer; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php deleted file mode 100644 index 49e7d68..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Escher_DgContainer_SpgrContainer - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Escher - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Escher_DgContainer_SpgrContainer -{ - /** - * Parent Shape Group Container - * - * @var PHPExcel_Shared_Escher_DgContainer_SpgrContainer - */ - private $parent; - - /** - * Shape Container collection - * - * @var array - */ - private $children = array(); - - /** - * Set parent Shape Group Container - * - * @param PHPExcel_Shared_Escher_DgContainer_SpgrContainer $parent - */ - public function setParent($parent) - { - $this->parent = $parent; - } - - /** - * Get the parent Shape Group Container if any - * - * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer|null - */ - public function getParent() - { - return $this->parent; - } - - /** - * Add a child. This will be either spgrContainer or spContainer - * - * @param mixed $child - */ - public function addChild($child) - { - $this->children[] = $child; - $child->setParent($this); - } - - /** - * Get collection of Shape Containers - */ - public function getChildren() - { - return $this->children; - } - - /** - * Recursively get all spContainers within this spgrContainer - * - * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer[] - */ - public function getAllSpContainers() - { - $allSpContainers = array(); - - foreach ($this->children as $child) { - if ($child instanceof PHPExcel_Shared_Escher_DgContainer_SpgrContainer) { - $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers()); - } else { - $allSpContainers[] = $child; - } - } - - return $allSpContainers; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php deleted file mode 100644 index a1f1a46..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer/SpContainer.php +++ /dev/null @@ -1,388 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Escher - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer -{ - /** - * Parent Shape Group Container - * - * @var PHPExcel_Shared_Escher_DgContainer_SpgrContainer - */ - private $parent; - - /** - * Is this a group shape? - * - * @var boolean - */ - private $spgr = false; - - /** - * Shape type - * - * @var int - */ - private $spType; - - /** - * Shape flag - * - * @var int - */ - private $spFlag; - - /** - * Shape index (usually group shape has index 0, and the rest: 1,2,3...) - * - * @var boolean - */ - private $spId; - - /** - * Array of options - * - * @var array - */ - private $OPT; - - /** - * Cell coordinates of upper-left corner of shape, e.g. 'A1' - * - * @var string - */ - private $startCoordinates; - - /** - * Horizontal offset of upper-left corner of shape measured in 1/1024 of column width - * - * @var int - */ - private $startOffsetX; - - /** - * Vertical offset of upper-left corner of shape measured in 1/256 of row height - * - * @var int - */ - private $startOffsetY; - - /** - * Cell coordinates of bottom-right corner of shape, e.g. 'B2' - * - * @var string - */ - private $endCoordinates; - - /** - * Horizontal offset of bottom-right corner of shape measured in 1/1024 of column width - * - * @var int - */ - private $endOffsetX; - - /** - * Vertical offset of bottom-right corner of shape measured in 1/256 of row height - * - * @var int - */ - private $endOffsetY; - - /** - * Set parent Shape Group Container - * - * @param PHPExcel_Shared_Escher_DgContainer_SpgrContainer $parent - */ - public function setParent($parent) - { - $this->parent = $parent; - } - - /** - * Get the parent Shape Group Container - * - * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer - */ - public function getParent() - { - return $this->parent; - } - - /** - * Set whether this is a group shape - * - * @param boolean $value - */ - public function setSpgr($value = false) - { - $this->spgr = $value; - } - - /** - * Get whether this is a group shape - * - * @return boolean - */ - public function getSpgr() - { - return $this->spgr; - } - - /** - * Set the shape type - * - * @param int $value - */ - public function setSpType($value) - { - $this->spType = $value; - } - - /** - * Get the shape type - * - * @return int - */ - public function getSpType() - { - return $this->spType; - } - - /** - * Set the shape flag - * - * @param int $value - */ - public function setSpFlag($value) - { - $this->spFlag = $value; - } - - /** - * Get the shape flag - * - * @return int - */ - public function getSpFlag() - { - return $this->spFlag; - } - - /** - * Set the shape index - * - * @param int $value - */ - public function setSpId($value) - { - $this->spId = $value; - } - - /** - * Get the shape index - * - * @return int - */ - public function getSpId() - { - return $this->spId; - } - - /** - * Set an option for the Shape Group Container - * - * @param int $property The number specifies the option - * @param mixed $value - */ - public function setOPT($property, $value) - { - $this->OPT[$property] = $value; - } - - /** - * Get an option for the Shape Group Container - * - * @param int $property The number specifies the option - * @return mixed - */ - public function getOPT($property) - { - if (isset($this->OPT[$property])) { - return $this->OPT[$property]; - } - return null; - } - - /** - * Get the collection of options - * - * @return array - */ - public function getOPTCollection() - { - return $this->OPT; - } - - /** - * Set cell coordinates of upper-left corner of shape - * - * @param string $value - */ - public function setStartCoordinates($value = 'A1') - { - $this->startCoordinates = $value; - } - - /** - * Get cell coordinates of upper-left corner of shape - * - * @return string - */ - public function getStartCoordinates() - { - return $this->startCoordinates; - } - - /** - * Set offset in x-direction of upper-left corner of shape measured in 1/1024 of column width - * - * @param int $startOffsetX - */ - public function setStartOffsetX($startOffsetX = 0) - { - $this->startOffsetX = $startOffsetX; - } - - /** - * Get offset in x-direction of upper-left corner of shape measured in 1/1024 of column width - * - * @return int - */ - public function getStartOffsetX() - { - return $this->startOffsetX; - } - - /** - * Set offset in y-direction of upper-left corner of shape measured in 1/256 of row height - * - * @param int $startOffsetY - */ - public function setStartOffsetY($startOffsetY = 0) - { - $this->startOffsetY = $startOffsetY; - } - - /** - * Get offset in y-direction of upper-left corner of shape measured in 1/256 of row height - * - * @return int - */ - public function getStartOffsetY() - { - return $this->startOffsetY; - } - - /** - * Set cell coordinates of bottom-right corner of shape - * - * @param string $value - */ - public function setEndCoordinates($value = 'A1') - { - $this->endCoordinates = $value; - } - - /** - * Get cell coordinates of bottom-right corner of shape - * - * @return string - */ - public function getEndCoordinates() - { - return $this->endCoordinates; - } - - /** - * Set offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width - * - * @param int $startOffsetX - */ - public function setEndOffsetX($endOffsetX = 0) - { - $this->endOffsetX = $endOffsetX; - } - - /** - * Get offset in x-direction of bottom-right corner of shape measured in 1/1024 of column width - * - * @return int - */ - public function getEndOffsetX() - { - return $this->endOffsetX; - } - - /** - * Set offset in y-direction of bottom-right corner of shape measured in 1/256 of row height - * - * @param int $endOffsetY - */ - public function setEndOffsetY($endOffsetY = 0) - { - $this->endOffsetY = $endOffsetY; - } - - /** - * Get offset in y-direction of bottom-right corner of shape measured in 1/256 of row height - * - * @return int - */ - public function getEndOffsetY() - { - return $this->endOffsetY; - } - - /** - * Get the nesting level of this spContainer. This is the number of spgrContainers between this spContainer and - * the dgContainer. A value of 1 = immediately within first spgrContainer - * Higher nesting level occurs if and only if spContainer is part of a shape group - * - * @return int Nesting level - */ - public function getNestingLevel() - { - $nestingLevel = 0; - - $parent = $this->getParent(); - while ($parent instanceof PHPExcel_Shared_Escher_DgContainer_SpgrContainer) { - ++$nestingLevel; - $parent = $parent->getParent(); - } - - return $nestingLevel; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer.php deleted file mode 100644 index b116b1b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer.php +++ /dev/null @@ -1,196 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Escher_DggContainer - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Escher - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Escher_DggContainer -{ - /** - * Maximum shape index of all shapes in all drawings increased by one - * - * @var int - */ - private $spIdMax; - - /** - * Total number of drawings saved - * - * @var int - */ - private $cDgSaved; - - /** - * Total number of shapes saved (including group shapes) - * - * @var int - */ - private $cSpSaved; - - /** - * BLIP Store Container - * - * @var PHPExcel_Shared_Escher_DggContainer_BstoreContainer - */ - private $bstoreContainer; - - /** - * Array of options for the drawing group - * - * @var array - */ - private $OPT = array(); - - /** - * Array of identifier clusters containg information about the maximum shape identifiers - * - * @var array - */ - private $IDCLs = array(); - - /** - * Get maximum shape index of all shapes in all drawings (plus one) - * - * @return int - */ - public function getSpIdMax() - { - return $this->spIdMax; - } - - /** - * Set maximum shape index of all shapes in all drawings (plus one) - * - * @param int - */ - public function setSpIdMax($value) - { - $this->spIdMax = $value; - } - - /** - * Get total number of drawings saved - * - * @return int - */ - public function getCDgSaved() - { - return $this->cDgSaved; - } - - /** - * Set total number of drawings saved - * - * @param int - */ - public function setCDgSaved($value) - { - $this->cDgSaved = $value; - } - - /** - * Get total number of shapes saved (including group shapes) - * - * @return int - */ - public function getCSpSaved() - { - return $this->cSpSaved; - } - - /** - * Set total number of shapes saved (including group shapes) - * - * @param int - */ - public function setCSpSaved($value) - { - $this->cSpSaved = $value; - } - - /** - * Get BLIP Store Container - * - * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer - */ - public function getBstoreContainer() - { - return $this->bstoreContainer; - } - - /** - * Set BLIP Store Container - * - * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer $bstoreContainer - */ - public function setBstoreContainer($bstoreContainer) - { - $this->bstoreContainer = $bstoreContainer; - } - - /** - * Set an option for the drawing group - * - * @param int $property The number specifies the option - * @param mixed $value - */ - public function setOPT($property, $value) - { - $this->OPT[$property] = $value; - } - - /** - * Get an option for the drawing group - * - * @param int $property The number specifies the option - * @return mixed - */ - public function getOPT($property) - { - if (isset($this->OPT[$property])) { - return $this->OPT[$property]; - } - return null; - } - - /** - * Get identifier clusters - * - * @return array - */ - public function getIDCLs() - { - return $this->IDCLs; - } - - /** - * Set identifier clusters. array(<drawingId> => <max shape id>, ...) - * - * @param array $pValue - */ - public function setIDCLs($pValue) - { - $this->IDCLs = $pValue; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer.php deleted file mode 100644 index 1af2432..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Escher_DggContainer_BstoreContainer - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Escher - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Escher_DggContainer_BstoreContainer -{ - /** - * BLIP Store Entries. Each of them holds one BLIP (Big Large Image or Picture) - * - * @var array - */ - private $BSECollection = array(); - - /** - * Add a BLIP Store Entry - * - * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $BSE - */ - public function addBSE($BSE) - { - $this->BSECollection[] = $BSE; - $BSE->setParent($this); - } - - /** - * Get the collection of BLIP Store Entries - * - * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE[] - */ - public function getBSECollection() - { - return $this->BSECollection; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE.php deleted file mode 100644 index d17e91e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Escher - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE -{ - const BLIPTYPE_ERROR = 0x00; - const BLIPTYPE_UNKNOWN = 0x01; - const BLIPTYPE_EMF = 0x02; - const BLIPTYPE_WMF = 0x03; - const BLIPTYPE_PICT = 0x04; - const BLIPTYPE_JPEG = 0x05; - const BLIPTYPE_PNG = 0x06; - const BLIPTYPE_DIB = 0x07; - const BLIPTYPE_TIFF = 0x11; - const BLIPTYPE_CMYKJPEG = 0x12; - - /** - * The parent BLIP Store Entry Container - * - * @var PHPExcel_Shared_Escher_DggContainer_BstoreContainer - */ - private $parent; - - /** - * The BLIP (Big Large Image or Picture) - * - * @var PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip - */ - private $blip; - - /** - * The BLIP type - * - * @var int - */ - private $blipType; - - /** - * Set parent BLIP Store Entry Container - * - * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer $parent - */ - public function setParent($parent) - { - $this->parent = $parent; - } - - /** - * Get the BLIP - * - * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip - */ - public function getBlip() - { - return $this->blip; - } - - /** - * Set the BLIP - * - * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip $blip - */ - public function setBlip($blip) - { - $this->blip = $blip; - $blip->setParent($this); - } - - /** - * Get the BLIP type - * - * @return int - */ - public function getBlipType() - { - return $this->blipType; - } - - /** - * Set the BLIP type - * - * @param int - */ - public function setBlipType($blipType) - { - $this->blipType = $blipType; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php deleted file mode 100644 index 3bcbbbe..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DggContainer/BstoreContainer/BSE/Blip.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Escher - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip -{ - /** - * The parent BSE - * - * @var PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE - */ - private $parent; - - /** - * Raw image data - * - * @var string - */ - private $data; - - /** - * Get the raw image data - * - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Set the raw image data - * - * @param string - */ - public function setData($data) - { - $this->data = $data; - } - - /** - * Set parent BSE - * - * @param PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $parent - */ - public function setParent($parent) - { - $this->parent = $parent; - } - - /** - * Get parent BSE - * - * @return PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE $parent - */ - public function getParent() - { - return $this->parent; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Excel5.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Excel5.php deleted file mode 100644 index c3ff209..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Excel5.php +++ /dev/null @@ -1,298 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_Excel5 - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_Excel5 -{ - /** - * Get the width of a column in pixels. We use the relationship y = ceil(7x) where - * x is the width in intrinsic Excel units (measuring width in number of normal characters) - * This holds for Arial 10 - * - * @param PHPExcel_Worksheet $sheet The sheet - * @param string $col The column - * @return integer The width in pixels - */ - public static function sizeCol($sheet, $col = 'A') - { - // default font of the workbook - $font = $sheet->getParent()->getDefaultStyle()->getFont(); - - $columnDimensions = $sheet->getColumnDimensions(); - - // first find the true column width in pixels (uncollapsed and unhidden) - if (isset($columnDimensions[$col]) and $columnDimensions[$col]->getWidth() != -1) { - // then we have column dimension with explicit width - $columnDimension = $columnDimensions[$col]; - $width = $columnDimension->getWidth(); - $pixelWidth = PHPExcel_Shared_Drawing::cellDimensionToPixels($width, $font); - } elseif ($sheet->getDefaultColumnDimension()->getWidth() != -1) { - // then we have default column dimension with explicit width - $defaultColumnDimension = $sheet->getDefaultColumnDimension(); - $width = $defaultColumnDimension->getWidth(); - $pixelWidth = PHPExcel_Shared_Drawing::cellDimensionToPixels($width, $font); - } else { - // we don't even have any default column dimension. Width depends on default font - $pixelWidth = PHPExcel_Shared_Font::getDefaultColumnWidthByFont($font, true); - } - - // now find the effective column width in pixels - if (isset($columnDimensions[$col]) and !$columnDimensions[$col]->getVisible()) { - $effectivePixelWidth = 0; - } else { - $effectivePixelWidth = $pixelWidth; - } - - return $effectivePixelWidth; - } - - /** - * Convert the height of a cell from user's units to pixels. By interpolation - * the relationship is: y = 4/3x. If the height hasn't been set by the user we - * use the default value. If the row is hidden we use a value of zero. - * - * @param PHPExcel_Worksheet $sheet The sheet - * @param integer $row The row index (1-based) - * @return integer The width in pixels - */ - public static function sizeRow($sheet, $row = 1) - { - // default font of the workbook - $font = $sheet->getParent()->getDefaultStyle()->getFont(); - - $rowDimensions = $sheet->getRowDimensions(); - - // first find the true row height in pixels (uncollapsed and unhidden) - if (isset($rowDimensions[$row]) and $rowDimensions[$row]->getRowHeight() != -1) { - // then we have a row dimension - $rowDimension = $rowDimensions[$row]; - $rowHeight = $rowDimension->getRowHeight(); - $pixelRowHeight = (int) ceil(4 * $rowHeight / 3); // here we assume Arial 10 - } elseif ($sheet->getDefaultRowDimension()->getRowHeight() != -1) { - // then we have a default row dimension with explicit height - $defaultRowDimension = $sheet->getDefaultRowDimension(); - $rowHeight = $defaultRowDimension->getRowHeight(); - $pixelRowHeight = PHPExcel_Shared_Drawing::pointsToPixels($rowHeight); - } else { - // we don't even have any default row dimension. Height depends on default font - $pointRowHeight = PHPExcel_Shared_Font::getDefaultRowHeightByFont($font); - $pixelRowHeight = PHPExcel_Shared_Font::fontSizeToPixels($pointRowHeight); - } - - // now find the effective row height in pixels - if (isset($rowDimensions[$row]) and !$rowDimensions[$row]->getVisible()) { - $effectivePixelRowHeight = 0; - } else { - $effectivePixelRowHeight = $pixelRowHeight; - } - - return $effectivePixelRowHeight; - } - - /** - * Get the horizontal distance in pixels between two anchors - * The distanceX is found as sum of all the spanning columns widths minus correction for the two offsets - * - * @param PHPExcel_Worksheet $sheet - * @param string $startColumn - * @param integer $startOffsetX Offset within start cell measured in 1/1024 of the cell width - * @param string $endColumn - * @param integer $endOffsetX Offset within end cell measured in 1/1024 of the cell width - * @return integer Horizontal measured in pixels - */ - public static function getDistanceX(PHPExcel_Worksheet $sheet, $startColumn = 'A', $startOffsetX = 0, $endColumn = 'A', $endOffsetX = 0) - { - $distanceX = 0; - - // add the widths of the spanning columns - $startColumnIndex = PHPExcel_Cell::columnIndexFromString($startColumn) - 1; // 1-based - $endColumnIndex = PHPExcel_Cell::columnIndexFromString($endColumn) - 1; // 1-based - for ($i = $startColumnIndex; $i <= $endColumnIndex; ++$i) { - $distanceX += self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($i)); - } - - // correct for offsetX in startcell - $distanceX -= (int) floor(self::sizeCol($sheet, $startColumn) * $startOffsetX / 1024); - - // correct for offsetX in endcell - $distanceX -= (int) floor(self::sizeCol($sheet, $endColumn) * (1 - $endOffsetX / 1024)); - - return $distanceX; - } - - /** - * Get the vertical distance in pixels between two anchors - * The distanceY is found as sum of all the spanning rows minus two offsets - * - * @param PHPExcel_Worksheet $sheet - * @param integer $startRow (1-based) - * @param integer $startOffsetY Offset within start cell measured in 1/256 of the cell height - * @param integer $endRow (1-based) - * @param integer $endOffsetY Offset within end cell measured in 1/256 of the cell height - * @return integer Vertical distance measured in pixels - */ - public static function getDistanceY(PHPExcel_Worksheet $sheet, $startRow = 1, $startOffsetY = 0, $endRow = 1, $endOffsetY = 0) - { - $distanceY = 0; - - // add the widths of the spanning rows - for ($row = $startRow; $row <= $endRow; ++$row) { - $distanceY += self::sizeRow($sheet, $row); - } - - // correct for offsetX in startcell - $distanceY -= (int) floor(self::sizeRow($sheet, $startRow) * $startOffsetY / 256); - - // correct for offsetX in endcell - $distanceY -= (int) floor(self::sizeRow($sheet, $endRow) * (1 - $endOffsetY / 256)); - - return $distanceY; - } - - /** - * Convert 1-cell anchor coordinates to 2-cell anchor coordinates - * This function is ported from PEAR Spreadsheet_Writer_Excel with small modifications - * - * Calculate the vertices that define the position of the image as required by - * the OBJ record. - * - * +------------+------------+ - * | A | B | - * +-----+------------+------------+ - * | |(x1,y1) | | - * | 1 |(A1)._______|______ | - * | | | | | - * | | | | | - * +-----+----| BITMAP |-----+ - * | | | | | - * | 2 | |______________. | - * | | | (B2)| - * | | | (x2,y2)| - * +---- +------------+------------+ - * - * Example of a bitmap that covers some of the area from cell A1 to cell B2. - * - * Based on the width and height of the bitmap we need to calculate 8 vars: - * $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2. - * The width and height of the cells are also variable and have to be taken into - * account. - * The values of $col_start and $row_start are passed in from the calling - * function. The values of $col_end and $row_end are calculated by subtracting - * the width and height of the bitmap from the width and height of the - * underlying cells. - * The vertices are expressed as a percentage of the underlying cell width as - * follows (rhs values are in pixels): - * - * x1 = X / W *1024 - * y1 = Y / H *256 - * x2 = (X-1) / W *1024 - * y2 = (Y-1) / H *256 - * - * Where: X is distance from the left side of the underlying cell - * Y is distance from the top of the underlying cell - * W is the width of the cell - * H is the height of the cell - * - * @param PHPExcel_Worksheet $sheet - * @param string $coordinates E.g. 'A1' - * @param integer $offsetX Horizontal offset in pixels - * @param integer $offsetY Vertical offset in pixels - * @param integer $width Width in pixels - * @param integer $height Height in pixels - * @return array - */ - public static function oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height) - { - list($column, $row) = PHPExcel_Cell::coordinateFromString($coordinates); - $col_start = PHPExcel_Cell::columnIndexFromString($column) - 1; - $row_start = $row - 1; - - $x1 = $offsetX; - $y1 = $offsetY; - - // Initialise end cell to the same as the start cell - $col_end = $col_start; // Col containing lower right corner of object - $row_end = $row_start; // Row containing bottom right corner of object - - // Zero the specified offset if greater than the cell dimensions - if ($x1 >= self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_start))) { - $x1 = 0; - } - if ($y1 >= self::sizeRow($sheet, $row_start + 1)) { - $y1 = 0; - } - - $width = $width + $x1 -1; - $height = $height + $y1 -1; - - // Subtract the underlying cell widths to find the end cell of the image - while ($width >= self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_end))) { - $width -= self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_end)); - ++$col_end; - } - - // Subtract the underlying cell heights to find the end cell of the image - while ($height >= self::sizeRow($sheet, $row_end + 1)) { - $height -= self::sizeRow($sheet, $row_end + 1); - ++$row_end; - } - - // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell - // with zero height or width. - if (self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_start)) == 0) { - return; - } - if (self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_end)) == 0) { - return; - } - if (self::sizeRow($sheet, $row_start + 1) == 0) { - return; - } - if (self::sizeRow($sheet, $row_end + 1) == 0) { - return; - } - - // Convert the pixel values to the percentage value expected by Excel - $x1 = $x1 / self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_start)) * 1024; - $y1 = $y1 / self::sizeRow($sheet, $row_start + 1) * 256; - $x2 = ($width + 1) / self::sizeCol($sheet, PHPExcel_Cell::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object - $y2 = ($height + 1) / self::sizeRow($sheet, $row_end + 1) * 256; // Distance to bottom of object - - $startCoordinates = PHPExcel_Cell::stringFromColumnIndex($col_start) . ($row_start + 1); - $endCoordinates = PHPExcel_Cell::stringFromColumnIndex($col_end) . ($row_end + 1); - - $twoAnchor = array( - 'startCoordinates' => $startCoordinates, - 'startOffsetX' => $x1, - 'startOffsetY' => $y1, - 'endCoordinates' => $endCoordinates, - 'endOffsetX' => $x2, - 'endOffsetY' => $y2, - ); - - return $twoAnchor; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/File.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/File.php deleted file mode 100644 index a62df75..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/File.php +++ /dev/null @@ -1,180 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_File - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_File -{ - /* - * Use Temp or File Upload Temp for temporary files - * - * @protected - * @var boolean - */ - protected static $useUploadTempDirectory = false; - - - /** - * Set the flag indicating whether the File Upload Temp directory should be used for temporary files - * - * @param boolean $useUploadTempDir Use File Upload Temporary directory (true or false) - */ - public static function setUseUploadTempDirectory($useUploadTempDir = false) - { - self::$useUploadTempDirectory = (boolean) $useUploadTempDir; - } - - - /** - * Get the flag indicating whether the File Upload Temp directory should be used for temporary files - * - * @return boolean Use File Upload Temporary directory (true or false) - */ - public static function getUseUploadTempDirectory() - { - return self::$useUploadTempDirectory; - } - - - /** - * Verify if a file exists - * - * @param string $pFilename Filename - * @return bool - */ - public static function file_exists($pFilename) - { - // Sick construction, but it seems that - // file_exists returns strange values when - // doing the original file_exists on ZIP archives... - if (strtolower(substr($pFilename, 0, 3)) == 'zip') { - // Open ZIP file and verify if the file exists - $zipFile = substr($pFilename, 6, strpos($pFilename, '#') - 6); - $archiveFile = substr($pFilename, strpos($pFilename, '#') + 1); - - $zip = new ZipArchive(); - if ($zip->open($zipFile) === true) { - $returnValue = ($zip->getFromName($archiveFile) !== false); - $zip->close(); - return $returnValue; - } else { - return false; - } - } else { - // Regular file_exists - return file_exists($pFilename); - } - } - - /** - * Returns canonicalized absolute pathname, also for ZIP archives - * - * @param string $pFilename - * @return string - */ - public static function realpath($pFilename) - { - // Returnvalue - $returnValue = ''; - - // Try using realpath() - if (file_exists($pFilename)) { - $returnValue = realpath($pFilename); - } - - // Found something? - if ($returnValue == '' || ($returnValue === null)) { - $pathArray = explode('/', $pFilename); - while (in_array('..', $pathArray) && $pathArray[0] != '..') { - for ($i = 0; $i < count($pathArray); ++$i) { - if ($pathArray[$i] == '..' && $i > 0) { - unset($pathArray[$i]); - unset($pathArray[$i - 1]); - break; - } - } - } - $returnValue = implode('/', $pathArray); - } - - // Return - return $returnValue; - } - - /** - * Get the systems temporary directory. - * - * @return string - */ - public static function sys_get_temp_dir() - { - if (self::$useUploadTempDirectory) { - // use upload-directory when defined to allow running on environments having very restricted - // open_basedir configs - if (ini_get('upload_tmp_dir') !== false) { - if ($temp = ini_get('upload_tmp_dir')) { - if (file_exists($temp)) { - return realpath($temp); - } - } - } - } - - // sys_get_temp_dir is only available since PHP 5.2.1 - // http://php.net/manual/en/function.sys-get-temp-dir.php#94119 - if (!function_exists('sys_get_temp_dir')) { - if ($temp = getenv('TMP')) { - if ((!empty($temp)) && (file_exists($temp))) { - return realpath($temp); - } - } - if ($temp = getenv('TEMP')) { - if ((!empty($temp)) && (file_exists($temp))) { - return realpath($temp); - } - } - if ($temp = getenv('TMPDIR')) { - if ((!empty($temp)) && (file_exists($temp))) { - return realpath($temp); - } - } - - // trick for creating a file in system's temporary dir - // without knowing the path of the system's temporary dir - $temp = tempnam(__FILE__, ''); - if (file_exists($temp)) { - unlink($temp); - return realpath(dirname($temp)); - } - - return null; - } - - // use ordinary built-in PHP function - // There should be no problem with the 5.2.4 Suhosin realpath() bug, because this line should only - // be called if we're running 5.2.1 or earlier - return realpath(sys_get_temp_dir()); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Font.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Font.php deleted file mode 100644 index 7efb3c9..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Font.php +++ /dev/null @@ -1,741 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Shared_Font - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Shared_Font -{ - /* Methods for resolving autosize value */ - const AUTOSIZE_METHOD_APPROX = 'approx'; - const AUTOSIZE_METHOD_EXACT = 'exact'; - - private static $autoSizeMethods = array( - self::AUTOSIZE_METHOD_APPROX, - self::AUTOSIZE_METHOD_EXACT, - ); - - /** Character set codes used by BIFF5-8 in Font records */ - const CHARSET_ANSI_LATIN = 0x00; - const CHARSET_SYSTEM_DEFAULT = 0x01; - const CHARSET_SYMBOL = 0x02; - const CHARSET_APPLE_ROMAN = 0x4D; - const CHARSET_ANSI_JAPANESE_SHIFTJIS = 0x80; - const CHARSET_ANSI_KOREAN_HANGUL = 0x81; - const CHARSET_ANSI_KOREAN_JOHAB = 0x82; - const CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86; // gb2312 - const CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88; // big5 - const CHARSET_ANSI_GREEK = 0xA1; - const CHARSET_ANSI_TURKISH = 0xA2; - const CHARSET_ANSI_VIETNAMESE = 0xA3; - const CHARSET_ANSI_HEBREW = 0xB1; - const CHARSET_ANSI_ARABIC = 0xB2; - const CHARSET_ANSI_BALTIC = 0xBA; - const CHARSET_ANSI_CYRILLIC = 0xCC; - const CHARSET_ANSI_THAI = 0xDD; - const CHARSET_ANSI_LATIN_II = 0xEE; - const CHARSET_OEM_LATIN_I = 0xFF; - - // XXX: Constants created! - /** Font filenames */ - const ARIAL = 'arial.ttf'; - const ARIAL_BOLD = 'arialbd.ttf'; - const ARIAL_ITALIC = 'ariali.ttf'; - const ARIAL_BOLD_ITALIC = 'arialbi.ttf'; - - const CALIBRI = 'CALIBRI.TTF'; - const CALIBRI_BOLD = 'CALIBRIB.TTF'; - const CALIBRI_ITALIC = 'CALIBRII.TTF'; - const CALIBRI_BOLD_ITALIC = 'CALIBRIZ.TTF'; - - const COMIC_SANS_MS = 'comic.ttf'; - const COMIC_SANS_MS_BOLD = 'comicbd.ttf'; - - const COURIER_NEW = 'cour.ttf'; - const COURIER_NEW_BOLD = 'courbd.ttf'; - const COURIER_NEW_ITALIC = 'couri.ttf'; - const COURIER_NEW_BOLD_ITALIC = 'courbi.ttf'; - - const GEORGIA = 'georgia.ttf'; - const GEORGIA_BOLD = 'georgiab.ttf'; - const GEORGIA_ITALIC = 'georgiai.ttf'; - const GEORGIA_BOLD_ITALIC = 'georgiaz.ttf'; - - const IMPACT = 'impact.ttf'; - - const LIBERATION_SANS = 'LiberationSans-Regular.ttf'; - const LIBERATION_SANS_BOLD = 'LiberationSans-Bold.ttf'; - const LIBERATION_SANS_ITALIC = 'LiberationSans-Italic.ttf'; - const LIBERATION_SANS_BOLD_ITALIC = 'LiberationSans-BoldItalic.ttf'; - - const LUCIDA_CONSOLE = 'lucon.ttf'; - const LUCIDA_SANS_UNICODE = 'l_10646.ttf'; - - const MICROSOFT_SANS_SERIF = 'micross.ttf'; - - const PALATINO_LINOTYPE = 'pala.ttf'; - const PALATINO_LINOTYPE_BOLD = 'palab.ttf'; - const PALATINO_LINOTYPE_ITALIC = 'palai.ttf'; - const PALATINO_LINOTYPE_BOLD_ITALIC = 'palabi.ttf'; - - const SYMBOL = 'symbol.ttf'; - - const TAHOMA = 'tahoma.ttf'; - const TAHOMA_BOLD = 'tahomabd.ttf'; - - const TIMES_NEW_ROMAN = 'times.ttf'; - const TIMES_NEW_ROMAN_BOLD = 'timesbd.ttf'; - const TIMES_NEW_ROMAN_ITALIC = 'timesi.ttf'; - const TIMES_NEW_ROMAN_BOLD_ITALIC = 'timesbi.ttf'; - - const TREBUCHET_MS = 'trebuc.ttf'; - const TREBUCHET_MS_BOLD = 'trebucbd.ttf'; - const TREBUCHET_MS_ITALIC = 'trebucit.ttf'; - const TREBUCHET_MS_BOLD_ITALIC = 'trebucbi.ttf'; - - const VERDANA = 'verdana.ttf'; - const VERDANA_BOLD = 'verdanab.ttf'; - const VERDANA_ITALIC = 'verdanai.ttf'; - const VERDANA_BOLD_ITALIC = 'verdanaz.ttf'; - - /** - * AutoSize method - * - * @var string - */ - private static $autoSizeMethod = self::AUTOSIZE_METHOD_APPROX; - - /** - * Path to folder containing TrueType font .ttf files - * - * @var string - */ - private static $trueTypeFontPath = null; - - /** - * How wide is a default column for a given default font and size? - * Empirical data found by inspecting real Excel files and reading off the pixel width - * in Microsoft Office Excel 2007. - * - * @var array - */ - public static $defaultColumnWidths = array( - 'Arial' => array( - 1 => array('px' => 24, 'width' => 12.00000000), - 2 => array('px' => 24, 'width' => 12.00000000), - 3 => array('px' => 32, 'width' => 10.66406250), - 4 => array('px' => 32, 'width' => 10.66406250), - 5 => array('px' => 40, 'width' => 10.00000000), - 6 => array('px' => 48, 'width' => 9.59765625), - 7 => array('px' => 48, 'width' => 9.59765625), - 8 => array('px' => 56, 'width' => 9.33203125), - 9 => array('px' => 64, 'width' => 9.14062500), - 10 => array('px' => 64, 'width' => 9.14062500), - ), - 'Calibri' => array( - 1 => array('px' => 24, 'width' => 12.00000000), - 2 => array('px' => 24, 'width' => 12.00000000), - 3 => array('px' => 32, 'width' => 10.66406250), - 4 => array('px' => 32, 'width' => 10.66406250), - 5 => array('px' => 40, 'width' => 10.00000000), - 6 => array('px' => 48, 'width' => 9.59765625), - 7 => array('px' => 48, 'width' => 9.59765625), - 8 => array('px' => 56, 'width' => 9.33203125), - 9 => array('px' => 56, 'width' => 9.33203125), - 10 => array('px' => 64, 'width' => 9.14062500), - 11 => array('px' => 64, 'width' => 9.14062500), - ), - 'Verdana' => array( - 1 => array('px' => 24, 'width' => 12.00000000), - 2 => array('px' => 24, 'width' => 12.00000000), - 3 => array('px' => 32, 'width' => 10.66406250), - 4 => array('px' => 32, 'width' => 10.66406250), - 5 => array('px' => 40, 'width' => 10.00000000), - 6 => array('px' => 48, 'width' => 9.59765625), - 7 => array('px' => 48, 'width' => 9.59765625), - 8 => array('px' => 64, 'width' => 9.14062500), - 9 => array('px' => 72, 'width' => 9.00000000), - 10 => array('px' => 72, 'width' => 9.00000000), - ), - ); - - /** - * Set autoSize method - * - * @param string $pValue - * @return boolean Success or failure - */ - public static function setAutoSizeMethod($pValue = self::AUTOSIZE_METHOD_APPROX) - { - if (!in_array($pValue, self::$autoSizeMethods)) { - return false; - } - self::$autoSizeMethod = $pValue; - - return true; - } - - /** - * Get autoSize method - * - * @return string - */ - public static function getAutoSizeMethod() - { - return self::$autoSizeMethod; - } - - /** - * Set the path to the folder containing .ttf files. There should be a trailing slash. - * Typical locations on variout some platforms: - * <ul> - * <li>C:/Windows/Fonts/</li> - * <li>/usr/share/fonts/truetype/</li> - * <li>~/.fonts/</li> - * </ul> - * - * @param string $pValue - */ - public static function setTrueTypeFontPath($pValue = '') - { - self::$trueTypeFontPath = $pValue; - } - - /** - * Get the path to the folder containing .ttf files. - * - * @return string - */ - public static function getTrueTypeFontPath() - { - return self::$trueTypeFontPath; - } - - /** - * Calculate an (approximate) OpenXML column width, based on font size and text contained - * - * @param PHPExcel_Style_Font $font Font object - * @param PHPExcel_RichText|string $cellText Text to calculate width - * @param integer $rotation Rotation angle - * @param PHPExcel_Style_Font|NULL $defaultFont Font object - * @return integer Column width - */ - public static function calculateColumnWidth(PHPExcel_Style_Font $font, $cellText = '', $rotation = 0, PHPExcel_Style_Font $defaultFont = null) - { - // If it is rich text, use plain text - if ($cellText instanceof PHPExcel_RichText) { - $cellText = $cellText->getPlainText(); - } - - // Special case if there are one or more newline characters ("\n") - if (strpos($cellText, "\n") !== false) { - $lineTexts = explode("\n", $cellText); - $lineWidths = array(); - foreach ($lineTexts as $lineText) { - $lineWidths[] = self::calculateColumnWidth($font, $lineText, $rotation = 0, $defaultFont); - } - return max($lineWidths); // width of longest line in cell - } - - // Try to get the exact text width in pixels - $approximate = self::$autoSizeMethod == self::AUTOSIZE_METHOD_APPROX; - if (!$approximate) { - $columnWidthAdjust = ceil(self::getTextWidthPixelsExact('n', $font, 0) * 1.07); - try { - // Width of text in pixels excl. padding - // and addition because Excel adds some padding, just use approx width of 'n' glyph - $columnWidth = self::getTextWidthPixelsExact($cellText, $font, $rotation) + $columnWidthAdjust; - } catch (PHPExcel_Exception $e) { - $approximate = true; - } - } - - if ($approximate) { - $columnWidthAdjust = self::getTextWidthPixelsApprox('n', $font, 0); - // Width of text in pixels excl. padding, approximation - // and addition because Excel adds some padding, just use approx width of 'n' glyph - $columnWidth = self::getTextWidthPixelsApprox($cellText, $font, $rotation) + $columnWidthAdjust; - } - - // Convert from pixel width to column width - $columnWidth = PHPExcel_Shared_Drawing::pixelsToCellDimension($columnWidth, $defaultFont); - - // Return - return round($columnWidth, 6); - } - - /** - * Get GD text width in pixels for a string of text in a certain font at a certain rotation angle - * - * @param string $text - * @param PHPExcel_Style_Font - * @param int $rotation - * @return int - * @throws PHPExcel_Exception - */ - public static function getTextWidthPixelsExact($text, PHPExcel_Style_Font $font, $rotation = 0) - { - if (!function_exists('imagettfbbox')) { - throw new PHPExcel_Exception('GD library needs to be enabled'); - } - - // font size should really be supplied in pixels in GD2, - // but since GD2 seems to assume 72dpi, pixels and points are the same - $fontFile = self::getTrueTypeFontFileFromFont($font); - $textBox = imagettfbbox($font->getSize(), $rotation, $fontFile, $text); - - // Get corners positions - $lowerLeftCornerX = $textBox[0]; -// $lowerLeftCornerY = $textBox[1]; - $lowerRightCornerX = $textBox[2]; -// $lowerRightCornerY = $textBox[3]; - $upperRightCornerX = $textBox[4]; -// $upperRightCornerY = $textBox[5]; - $upperLeftCornerX = $textBox[6]; -// $upperLeftCornerY = $textBox[7]; - - // Consider the rotation when calculating the width - $textWidth = max($lowerRightCornerX - $upperLeftCornerX, $upperRightCornerX - $lowerLeftCornerX); - - return $textWidth; - } - - /** - * Get approximate width in pixels for a string of text in a certain font at a certain rotation angle - * - * @param string $columnText - * @param PHPExcel_Style_Font $font - * @param int $rotation - * @return int Text width in pixels (no padding added) - */ - public static function getTextWidthPixelsApprox($columnText, PHPExcel_Style_Font $font = null, $rotation = 0) - { - $fontName = $font->getName(); - $fontSize = $font->getSize(); - - // Calculate column width in pixels. We assume fixed glyph width. Result varies with font name and size. - switch ($fontName) { - case 'Calibri': - // value 8.26 was found via interpolation by inspecting real Excel files with Calibri 11 font. - $columnWidth = (int) (8.26 * PHPExcel_Shared_String::CountCharacters($columnText)); - $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size - break; - - case 'Arial': - // value 7 was found via interpolation by inspecting real Excel files with Arial 10 font. -// $columnWidth = (int) (7 * PHPExcel_Shared_String::CountCharacters($columnText)); - // value 8 was set because of experience in different exports at Arial 10 font. - $columnWidth = (int) (8 * PHPExcel_Shared_String::CountCharacters($columnText)); - $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size - break; - - case 'Verdana': - // value 8 was found via interpolation by inspecting real Excel files with Verdana 10 font. - $columnWidth = (int) (8 * PHPExcel_Shared_String::CountCharacters($columnText)); - $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size - break; - - default: - // just assume Calibri - $columnWidth = (int) (8.26 * PHPExcel_Shared_String::CountCharacters($columnText)); - $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size - break; - } - - // Calculate approximate rotated column width - if ($rotation !== 0) { - if ($rotation == -165) { - // stacked text - $columnWidth = 4; // approximation - } else { - // rotated text - $columnWidth = $columnWidth * cos(deg2rad($rotation)) - + $fontSize * abs(sin(deg2rad($rotation))) / 5; // approximation - } - } - - // pixel width is an integer - return (int) $columnWidth; - } - - /** - * Calculate an (approximate) pixel size, based on a font points size - * - * @param int $fontSizeInPoints Font size (in points) - * @return int Font size (in pixels) - */ - public static function fontSizeToPixels($fontSizeInPoints = 11) - { - return (int) ((4 / 3) * $fontSizeInPoints); - } - - /** - * Calculate an (approximate) pixel size, based on inch size - * - * @param int $sizeInInch Font size (in inch) - * @return int Size (in pixels) - */ - public static function inchSizeToPixels($sizeInInch = 1) - { - return ($sizeInInch * 96); - } - - /** - * Calculate an (approximate) pixel size, based on centimeter size - * - * @param int $sizeInCm Font size (in centimeters) - * @return int Size (in pixels) - */ - public static function centimeterSizeToPixels($sizeInCm = 1) - { - return ($sizeInCm * 37.795275591); - } - - /** - * Returns the font path given the font - * - * @param PHPExcel_Style_Font - * @return string Path to TrueType font file - */ - public static function getTrueTypeFontFileFromFont($font) - { - if (!file_exists(self::$trueTypeFontPath) || !is_dir(self::$trueTypeFontPath)) { - throw new PHPExcel_Exception('Valid directory to TrueType Font files not specified'); - } - - $name = $font->getName(); - $bold = $font->getBold(); - $italic = $font->getItalic(); - - // Check if we can map font to true type font file - switch ($name) { - case 'Arial': - $fontFile = ( - $bold ? ($italic ? self::ARIAL_BOLD_ITALIC : self::ARIAL_BOLD) - : ($italic ? self::ARIAL_ITALIC : self::ARIAL) - ); - break; - case 'Calibri': - $fontFile = ( - $bold ? ($italic ? self::CALIBRI_BOLD_ITALIC : self::CALIBRI_BOLD) - : ($italic ? self::CALIBRI_ITALIC : self::CALIBRI) - ); - break; - case 'Courier New': - $fontFile = ( - $bold ? ($italic ? self::COURIER_NEW_BOLD_ITALIC : self::COURIER_NEW_BOLD) - : ($italic ? self::COURIER_NEW_ITALIC : self::COURIER_NEW) - ); - break; - case 'Comic Sans MS': - $fontFile = ( - $bold ? self::COMIC_SANS_MS_BOLD : self::COMIC_SANS_MS - ); - break; - case 'Georgia': - $fontFile = ( - $bold ? ($italic ? self::GEORGIA_BOLD_ITALIC : self::GEORGIA_BOLD) - : ($italic ? self::GEORGIA_ITALIC : self::GEORGIA) - ); - break; - case 'Impact': - $fontFile = self::IMPACT; - break; - case 'Liberation Sans': - $fontFile = ( - $bold ? ($italic ? self::LIBERATION_SANS_BOLD_ITALIC : self::LIBERATION_SANS_BOLD) - : ($italic ? self::LIBERATION_SANS_ITALIC : self::LIBERATION_SANS) - ); - break; - case 'Lucida Console': - $fontFile = self::LUCIDA_CONSOLE; - break; - case 'Lucida Sans Unicode': - $fontFile = self::LUCIDA_SANS_UNICODE; - break; - case 'Microsoft Sans Serif': - $fontFile = self::MICROSOFT_SANS_SERIF; - break; - case 'Palatino Linotype': - $fontFile = ( - $bold ? ($italic ? self::PALATINO_LINOTYPE_BOLD_ITALIC : self::PALATINO_LINOTYPE_BOLD) - : ($italic ? self::PALATINO_LINOTYPE_ITALIC : self::PALATINO_LINOTYPE) - ); - break; - case 'Symbol': - $fontFile = self::SYMBOL; - break; - case 'Tahoma': - $fontFile = ( - $bold ? self::TAHOMA_BOLD : self::TAHOMA - ); - break; - case 'Times New Roman': - $fontFile = ( - $bold ? ($italic ? self::TIMES_NEW_ROMAN_BOLD_ITALIC : self::TIMES_NEW_ROMAN_BOLD) - : ($italic ? self::TIMES_NEW_ROMAN_ITALIC : self::TIMES_NEW_ROMAN) - ); - break; - case 'Trebuchet MS': - $fontFile = ( - $bold ? ($italic ? self::TREBUCHET_MS_BOLD_ITALIC : self::TREBUCHET_MS_BOLD) - : ($italic ? self::TREBUCHET_MS_ITALIC : self::TREBUCHET_MS) - ); - break; - case 'Verdana': - $fontFile = ( - $bold ? ($italic ? self::VERDANA_BOLD_ITALIC : self::VERDANA_BOLD) - : ($italic ? self::VERDANA_ITALIC : self::VERDANA) - ); - break; - default: - throw new PHPExcel_Exception('Unknown font name "'. $name .'". Cannot map to TrueType font file'); - break; - } - - $fontFile = self::$trueTypeFontPath . $fontFile; - - // Check if file actually exists - if (!file_exists($fontFile)) { - throw new PHPExcel_Exception('TrueType Font file not found'); - } - - return $fontFile; - } - - /** - * Returns the associated charset for the font name. - * - * @param string $name Font name - * @return int Character set code - */ - public static function getCharsetFromFontName($name) - { - switch ($name) { - // Add more cases. Check FONT records in real Excel files. - case 'EucrosiaUPC': - return self::CHARSET_ANSI_THAI; - case 'Wingdings': - return self::CHARSET_SYMBOL; - case 'Wingdings 2': - return self::CHARSET_SYMBOL; - case 'Wingdings 3': - return self::CHARSET_SYMBOL; - default: - return self::CHARSET_ANSI_LATIN; - } - } - - /** - * Get the effective column width for columns without a column dimension or column with width -1 - * For example, for Calibri 11 this is 9.140625 (64 px) - * - * @param PHPExcel_Style_Font $font The workbooks default font - * @param boolean $pPixels true = return column width in pixels, false = return in OOXML units - * @return mixed Column width - */ - public static function getDefaultColumnWidthByFont(PHPExcel_Style_Font $font, $pPixels = false) - { - if (isset(self::$defaultColumnWidths[$font->getName()][$font->getSize()])) { - // Exact width can be determined - $columnWidth = $pPixels ? - self::$defaultColumnWidths[$font->getName()][$font->getSize()]['px'] - : self::$defaultColumnWidths[$font->getName()][$font->getSize()]['width']; - - } else { - // We don't have data for this particular font and size, use approximation by - // extrapolating from Calibri 11 - $columnWidth = $pPixels ? - self::$defaultColumnWidths['Calibri'][11]['px'] - : self::$defaultColumnWidths['Calibri'][11]['width']; - $columnWidth = $columnWidth * $font->getSize() / 11; - - // Round pixels to closest integer - if ($pPixels) { - $columnWidth = (int) round($columnWidth); - } - } - - return $columnWidth; - } - - /** - * Get the effective row height for rows without a row dimension or rows with height -1 - * For example, for Calibri 11 this is 15 points - * - * @param PHPExcel_Style_Font $font The workbooks default font - * @return float Row height in points - */ - public static function getDefaultRowHeightByFont(PHPExcel_Style_Font $font) - { - switch ($font->getName()) { - case 'Arial': - switch ($font->getSize()) { - case 10: - // inspection of Arial 10 workbook says 12.75pt ~17px - $rowHeight = 12.75; - break; - case 9: - // inspection of Arial 9 workbook says 12.00pt ~16px - $rowHeight = 12; - break; - case 8: - // inspection of Arial 8 workbook says 11.25pt ~15px - $rowHeight = 11.25; - break; - case 7: - // inspection of Arial 7 workbook says 9.00pt ~12px - $rowHeight = 9; - break; - case 6: - case 5: - // inspection of Arial 5,6 workbook says 8.25pt ~11px - $rowHeight = 8.25; - break; - case 4: - // inspection of Arial 4 workbook says 6.75pt ~9px - $rowHeight = 6.75; - break; - case 3: - // inspection of Arial 3 workbook says 6.00pt ~8px - $rowHeight = 6; - break; - case 2: - case 1: - // inspection of Arial 1,2 workbook says 5.25pt ~7px - $rowHeight = 5.25; - break; - default: - // use Arial 10 workbook as an approximation, extrapolation - $rowHeight = 12.75 * $font->getSize() / 10; - break; - } - break; - - case 'Calibri': - switch ($font->getSize()) { - case 11: - // inspection of Calibri 11 workbook says 15.00pt ~20px - $rowHeight = 15; - break; - case 10: - // inspection of Calibri 10 workbook says 12.75pt ~17px - $rowHeight = 12.75; - break; - case 9: - // inspection of Calibri 9 workbook says 12.00pt ~16px - $rowHeight = 12; - break; - case 8: - // inspection of Calibri 8 workbook says 11.25pt ~15px - $rowHeight = 11.25; - break; - case 7: - // inspection of Calibri 7 workbook says 9.00pt ~12px - $rowHeight = 9; - break; - case 6: - case 5: - // inspection of Calibri 5,6 workbook says 8.25pt ~11px - $rowHeight = 8.25; - break; - case 4: - // inspection of Calibri 4 workbook says 6.75pt ~9px - $rowHeight = 6.75; - break; - case 3: - // inspection of Calibri 3 workbook says 6.00pt ~8px - $rowHeight = 6.00; - break; - case 2: - case 1: - // inspection of Calibri 1,2 workbook says 5.25pt ~7px - $rowHeight = 5.25; - break; - default: - // use Calibri 11 workbook as an approximation, extrapolation - $rowHeight = 15 * $font->getSize() / 11; - break; - } - break; - - case 'Verdana': - switch ($font->getSize()) { - case 10: - // inspection of Verdana 10 workbook says 12.75pt ~17px - $rowHeight = 12.75; - break; - case 9: - // inspection of Verdana 9 workbook says 11.25pt ~15px - $rowHeight = 11.25; - break; - case 8: - // inspection of Verdana 8 workbook says 10.50pt ~14px - $rowHeight = 10.50; - break; - case 7: - // inspection of Verdana 7 workbook says 9.00pt ~12px - $rowHeight = 9.00; - break; - case 6: - case 5: - // inspection of Verdana 5,6 workbook says 8.25pt ~11px - $rowHeight = 8.25; - break; - case 4: - // inspection of Verdana 4 workbook says 6.75pt ~9px - $rowHeight = 6.75; - break; - case 3: - // inspection of Verdana 3 workbook says 6.00pt ~8px - $rowHeight = 6; - break; - case 2: - case 1: - // inspection of Verdana 1,2 workbook says 5.25pt ~7px - $rowHeight = 5.25; - break; - default: - // use Verdana 10 workbook as an approximation, extrapolation - $rowHeight = 12.75 * $font->getSize() / 10; - break; - } - break; - default: - // just use Calibri as an approximation - $rowHeight = 15 * $font->getSize() / 11; - break; - } - - return $rowHeight; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/CHANGELOG.TXT b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/CHANGELOG.TXT deleted file mode 100644 index 1c18a5d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/CHANGELOG.TXT +++ /dev/null @@ -1,16 +0,0 @@ -Mar 1, 2005 11:15 AST by PM - -+ For consistency, renamed Math.php to Maths.java, utils to util, - tests to test, docs to doc - - -+ Removed conditional logic from top of Matrix class. - -+ Switched to using hypo function in Maths.php for all php-hypot calls. - NOTE TO SELF: Need to make sure that all decompositions have been - switched over to using the bundled hypo. - -Feb 25, 2005 at 10:00 AST by PM - -+ Recommend using simpler Error.php instead of JAMA_Error.php but - can be persuaded otherwise. - diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/CholeskyDecomposition.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/CholeskyDecomposition.php deleted file mode 100644 index d68109b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/CholeskyDecomposition.php +++ /dev/null @@ -1,148 +0,0 @@ -<?php -/** - * @package JAMA - * - * Cholesky decomposition class - * - * For a symmetric, positive definite matrix A, the Cholesky decomposition - * is an lower triangular matrix L so that A = L*L'. - * - * If the matrix is not symmetric or positive definite, the constructor - * returns a partial decomposition and sets an internal flag that may - * be queried by the isSPD() method. - * - * @author Paul Meagher - * @author Michael Bommarito - * @version 1.2 - */ -class CholeskyDecomposition -{ - /** - * Decomposition storage - * @var array - * @access private - */ - private $L = array(); - - /** - * Matrix row and column dimension - * @var int - * @access private - */ - private $m; - - /** - * Symmetric positive definite flag - * @var boolean - * @access private - */ - private $isspd = true; - - /** - * CholeskyDecomposition - * - * Class constructor - decomposes symmetric positive definite matrix - * @param mixed Matrix square symmetric positive definite matrix - */ - public function __construct($A = null) - { - if ($A instanceof Matrix) { - $this->L = $A->getArray(); - $this->m = $A->getRowDimension(); - - for ($i = 0; $i < $this->m; ++$i) { - for ($j = $i; $j < $this->m; ++$j) { - for ($sum = $this->L[$i][$j], $k = $i - 1; $k >= 0; --$k) { - $sum -= $this->L[$i][$k] * $this->L[$j][$k]; - } - if ($i == $j) { - if ($sum >= 0) { - $this->L[$i][$i] = sqrt($sum); - } else { - $this->isspd = false; - } - } else { - if ($this->L[$i][$i] != 0) { - $this->L[$j][$i] = $sum / $this->L[$i][$i]; - } - } - } - - for ($k = $i+1; $k < $this->m; ++$k) { - $this->L[$i][$k] = 0.0; - } - } - } else { - throw new PHPExcel_Calculation_Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION)); - } - } // function __construct() - - /** - * Is the matrix symmetric and positive definite? - * - * @return boolean - */ - public function isSPD() - { - return $this->isspd; - } // function isSPD() - - /** - * getL - * - * Return triangular factor. - * @return Matrix Lower triangular matrix - */ - public function getL() - { - return new Matrix($this->L); - } // function getL() - - /** - * Solve A*X = B - * - * @param $B Row-equal matrix - * @return Matrix L * L' * X = B - */ - public function solve($B = null) - { - if ($B instanceof Matrix) { - if ($B->getRowDimension() == $this->m) { - if ($this->isspd) { - $X = $B->getArrayCopy(); - $nx = $B->getColumnDimension(); - - for ($k = 0; $k < $this->m; ++$k) { - for ($i = $k + 1; $i < $this->m; ++$i) { - for ($j = 0; $j < $nx; ++$j) { - $X[$i][$j] -= $X[$k][$j] * $this->L[$i][$k]; - } - } - for ($j = 0; $j < $nx; ++$j) { - $X[$k][$j] /= $this->L[$k][$k]; - } - } - - for ($k = $this->m - 1; $k >= 0; --$k) { - for ($j = 0; $j < $nx; ++$j) { - $X[$k][$j] /= $this->L[$k][$k]; - } - for ($i = 0; $i < $k; ++$i) { - for ($j = 0; $j < $nx; ++$j) { - $X[$i][$j] -= $X[$k][$j] * $this->L[$k][$i]; - } - } - } - - return new Matrix($X, $this->m, $nx); - } else { - throw new PHPExcel_Calculation_Exception(JAMAError(MatrixSPDException)); - } - } else { - throw new PHPExcel_Calculation_Exception(JAMAError(MATRIX_DIMENSION_EXCEPTION)); - } - } else { - throw new PHPExcel_Calculation_Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION)); - } - } // function solve() -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/EigenvalueDecomposition.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/EigenvalueDecomposition.php deleted file mode 100644 index d4ae397..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/EigenvalueDecomposition.php +++ /dev/null @@ -1,864 +0,0 @@ -<?php -/** - * @package JAMA - * - * Class to obtain eigenvalues and eigenvectors of a real matrix. - * - * If A is symmetric, then A = V*D*V' where the eigenvalue matrix D - * is diagonal and the eigenvector matrix V is orthogonal (i.e. - * A = V.times(D.times(V.transpose())) and V.times(V.transpose()) - * equals the identity matrix). - * - * If A is not symmetric, then the eigenvalue matrix D is block diagonal - * with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues, - * lambda + i*mu, in 2-by-2 blocks, [lambda, mu; -mu, lambda]. The - * columns of V represent the eigenvectors in the sense that A*V = V*D, - * i.e. A.times(V) equals V.times(D). The matrix V may be badly - * conditioned, or even singular, so the validity of the equation - * A = V*D*inverse(V) depends upon V.cond(). - * - * @author Paul Meagher - * @license PHP v3.0 - * @version 1.1 - */ -class EigenvalueDecomposition -{ - /** - * Row and column dimension (square matrix). - * @var int - */ - private $n; - - /** - * Internal symmetry flag. - * @var int - */ - private $issymmetric; - - /** - * Arrays for internal storage of eigenvalues. - * @var array - */ - private $d = array(); - private $e = array(); - - /** - * Array for internal storage of eigenvectors. - * @var array - */ - private $V = array(); - - /** - * Array for internal storage of nonsymmetric Hessenberg form. - * @var array - */ - private $H = array(); - - /** - * Working storage for nonsymmetric algorithm. - * @var array - */ - private $ort; - - /** - * Used for complex scalar division. - * @var float - */ - private $cdivr; - private $cdivi; - - /** - * Symmetric Householder reduction to tridiagonal form. - * - * @access private - */ - private function tred2() - { - // This is derived from the Algol procedures tred2 by - // Bowdler, Martin, Reinsch, and Wilkinson, Handbook for - // Auto. Comp., Vol.ii-Linear Algebra, and the corresponding - // Fortran subroutine in EISPACK. - $this->d = $this->V[$this->n-1]; - // Householder reduction to tridiagonal form. - for ($i = $this->n-1; $i > 0; --$i) { - $i_ = $i -1; - // Scale to avoid under/overflow. - $h = $scale = 0.0; - $scale += array_sum(array_map(abs, $this->d)); - if ($scale == 0.0) { - $this->e[$i] = $this->d[$i_]; - $this->d = array_slice($this->V[$i_], 0, $i_); - for ($j = 0; $j < $i; ++$j) { - $this->V[$j][$i] = $this->V[$i][$j] = 0.0; - } - } else { - // Generate Householder vector. - for ($k = 0; $k < $i; ++$k) { - $this->d[$k] /= $scale; - $h += pow($this->d[$k], 2); - } - $f = $this->d[$i_]; - $g = sqrt($h); - if ($f > 0) { - $g = -$g; - } - $this->e[$i] = $scale * $g; - $h = $h - $f * $g; - $this->d[$i_] = $f - $g; - for ($j = 0; $j < $i; ++$j) { - $this->e[$j] = 0.0; - } - // Apply similarity transformation to remaining columns. - for ($j = 0; $j < $i; ++$j) { - $f = $this->d[$j]; - $this->V[$j][$i] = $f; - $g = $this->e[$j] + $this->V[$j][$j] * $f; - for ($k = $j+1; $k <= $i_; ++$k) { - $g += $this->V[$k][$j] * $this->d[$k]; - $this->e[$k] += $this->V[$k][$j] * $f; - } - $this->e[$j] = $g; - } - $f = 0.0; - for ($j = 0; $j < $i; ++$j) { - $this->e[$j] /= $h; - $f += $this->e[$j] * $this->d[$j]; - } - $hh = $f / (2 * $h); - for ($j=0; $j < $i; ++$j) { - $this->e[$j] -= $hh * $this->d[$j]; - } - for ($j = 0; $j < $i; ++$j) { - $f = $this->d[$j]; - $g = $this->e[$j]; - for ($k = $j; $k <= $i_; ++$k) { - $this->V[$k][$j] -= ($f * $this->e[$k] + $g * $this->d[$k]); - } - $this->d[$j] = $this->V[$i-1][$j]; - $this->V[$i][$j] = 0.0; - } - } - $this->d[$i] = $h; - } - - // Accumulate transformations. - for ($i = 0; $i < $this->n-1; ++$i) { - $this->V[$this->n-1][$i] = $this->V[$i][$i]; - $this->V[$i][$i] = 1.0; - $h = $this->d[$i+1]; - if ($h != 0.0) { - for ($k = 0; $k <= $i; ++$k) { - $this->d[$k] = $this->V[$k][$i+1] / $h; - } - for ($j = 0; $j <= $i; ++$j) { - $g = 0.0; - for ($k = 0; $k <= $i; ++$k) { - $g += $this->V[$k][$i+1] * $this->V[$k][$j]; - } - for ($k = 0; $k <= $i; ++$k) { - $this->V[$k][$j] -= $g * $this->d[$k]; - } - } - } - for ($k = 0; $k <= $i; ++$k) { - $this->V[$k][$i+1] = 0.0; - } - } - - $this->d = $this->V[$this->n-1]; - $this->V[$this->n-1] = array_fill(0, $j, 0.0); - $this->V[$this->n-1][$this->n-1] = 1.0; - $this->e[0] = 0.0; - } - - /** - * Symmetric tridiagonal QL algorithm. - * - * This is derived from the Algol procedures tql2, by - * Bowdler, Martin, Reinsch, and Wilkinson, Handbook for - * Auto. Comp., Vol.ii-Linear Algebra, and the corresponding - * Fortran subroutine in EISPACK. - * - * @access private - */ - private function tql2() - { - for ($i = 1; $i < $this->n; ++$i) { - $this->e[$i-1] = $this->e[$i]; - } - $this->e[$this->n-1] = 0.0; - $f = 0.0; - $tst1 = 0.0; - $eps = pow(2.0, -52.0); - - for ($l = 0; $l < $this->n; ++$l) { - // Find small subdiagonal element - $tst1 = max($tst1, abs($this->d[$l]) + abs($this->e[$l])); - $m = $l; - while ($m < $this->n) { - if (abs($this->e[$m]) <= $eps * $tst1) { - break; - } - ++$m; - } - // If m == l, $this->d[l] is an eigenvalue, - // otherwise, iterate. - if ($m > $l) { - $iter = 0; - do { - // Could check iteration count here. - $iter += 1; - // Compute implicit shift - $g = $this->d[$l]; - $p = ($this->d[$l+1] - $g) / (2.0 * $this->e[$l]); - $r = hypo($p, 1.0); - if ($p < 0) { - $r *= -1; - } - $this->d[$l] = $this->e[$l] / ($p + $r); - $this->d[$l+1] = $this->e[$l] * ($p + $r); - $dl1 = $this->d[$l+1]; - $h = $g - $this->d[$l]; - for ($i = $l + 2; $i < $this->n; ++$i) { - $this->d[$i] -= $h; - } - $f += $h; - // Implicit QL transformation. - $p = $this->d[$m]; - $c = 1.0; - $c2 = $c3 = $c; - $el1 = $this->e[$l + 1]; - $s = $s2 = 0.0; - for ($i = $m-1; $i >= $l; --$i) { - $c3 = $c2; - $c2 = $c; - $s2 = $s; - $g = $c * $this->e[$i]; - $h = $c * $p; - $r = hypo($p, $this->e[$i]); - $this->e[$i+1] = $s * $r; - $s = $this->e[$i] / $r; - $c = $p / $r; - $p = $c * $this->d[$i] - $s * $g; - $this->d[$i+1] = $h + $s * ($c * $g + $s * $this->d[$i]); - // Accumulate transformation. - for ($k = 0; $k < $this->n; ++$k) { - $h = $this->V[$k][$i+1]; - $this->V[$k][$i+1] = $s * $this->V[$k][$i] + $c * $h; - $this->V[$k][$i] = $c * $this->V[$k][$i] - $s * $h; - } - } - $p = -$s * $s2 * $c3 * $el1 * $this->e[$l] / $dl1; - $this->e[$l] = $s * $p; - $this->d[$l] = $c * $p; - // Check for convergence. - } while (abs($this->e[$l]) > $eps * $tst1); - } - $this->d[$l] = $this->d[$l] + $f; - $this->e[$l] = 0.0; - } - - // Sort eigenvalues and corresponding vectors. - for ($i = 0; $i < $this->n - 1; ++$i) { - $k = $i; - $p = $this->d[$i]; - for ($j = $i+1; $j < $this->n; ++$j) { - if ($this->d[$j] < $p) { - $k = $j; - $p = $this->d[$j]; - } - } - if ($k != $i) { - $this->d[$k] = $this->d[$i]; - $this->d[$i] = $p; - for ($j = 0; $j < $this->n; ++$j) { - $p = $this->V[$j][$i]; - $this->V[$j][$i] = $this->V[$j][$k]; - $this->V[$j][$k] = $p; - } - } - } - } - - /** - * Nonsymmetric reduction to Hessenberg form. - * - * This is derived from the Algol procedures orthes and ortran, - * by Martin and Wilkinson, Handbook for Auto. Comp., - * Vol.ii-Linear Algebra, and the corresponding - * Fortran subroutines in EISPACK. - * - * @access private - */ - private function orthes() - { - $low = 0; - $high = $this->n-1; - - for ($m = $low+1; $m <= $high-1; ++$m) { - // Scale column. - $scale = 0.0; - for ($i = $m; $i <= $high; ++$i) { - $scale = $scale + abs($this->H[$i][$m-1]); - } - if ($scale != 0.0) { - // Compute Householder transformation. - $h = 0.0; - for ($i = $high; $i >= $m; --$i) { - $this->ort[$i] = $this->H[$i][$m-1] / $scale; - $h += $this->ort[$i] * $this->ort[$i]; - } - $g = sqrt($h); - if ($this->ort[$m] > 0) { - $g *= -1; - } - $h -= $this->ort[$m] * $g; - $this->ort[$m] -= $g; - // Apply Householder similarity transformation - // H = (I -u * u' / h) * H * (I -u * u') / h) - for ($j = $m; $j < $this->n; ++$j) { - $f = 0.0; - for ($i = $high; $i >= $m; --$i) { - $f += $this->ort[$i] * $this->H[$i][$j]; - } - $f /= $h; - for ($i = $m; $i <= $high; ++$i) { - $this->H[$i][$j] -= $f * $this->ort[$i]; - } - } - for ($i = 0; $i <= $high; ++$i) { - $f = 0.0; - for ($j = $high; $j >= $m; --$j) { - $f += $this->ort[$j] * $this->H[$i][$j]; - } - $f = $f / $h; - for ($j = $m; $j <= $high; ++$j) { - $this->H[$i][$j] -= $f * $this->ort[$j]; - } - } - $this->ort[$m] = $scale * $this->ort[$m]; - $this->H[$m][$m-1] = $scale * $g; - } - } - - // Accumulate transformations (Algol's ortran). - for ($i = 0; $i < $this->n; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $this->V[$i][$j] = ($i == $j ? 1.0 : 0.0); - } - } - for ($m = $high-1; $m >= $low+1; --$m) { - if ($this->H[$m][$m-1] != 0.0) { - for ($i = $m+1; $i <= $high; ++$i) { - $this->ort[$i] = $this->H[$i][$m-1]; - } - for ($j = $m; $j <= $high; ++$j) { - $g = 0.0; - for ($i = $m; $i <= $high; ++$i) { - $g += $this->ort[$i] * $this->V[$i][$j]; - } - // Double division avoids possible underflow - $g = ($g / $this->ort[$m]) / $this->H[$m][$m-1]; - for ($i = $m; $i <= $high; ++$i) { - $this->V[$i][$j] += $g * $this->ort[$i]; - } - } - } - } - } - - /** - * Performs complex division. - * - * @access private - */ - private function cdiv($xr, $xi, $yr, $yi) - { - if (abs($yr) > abs($yi)) { - $r = $yi / $yr; - $d = $yr + $r * $yi; - $this->cdivr = ($xr + $r * $xi) / $d; - $this->cdivi = ($xi - $r * $xr) / $d; - } else { - $r = $yr / $yi; - $d = $yi + $r * $yr; - $this->cdivr = ($r * $xr + $xi) / $d; - $this->cdivi = ($r * $xi - $xr) / $d; - } - } - - /** - * Nonsymmetric reduction from Hessenberg to real Schur form. - * - * Code is derived from the Algol procedure hqr2, - * by Martin and Wilkinson, Handbook for Auto. Comp., - * Vol.ii-Linear Algebra, and the corresponding - * Fortran subroutine in EISPACK. - * - * @access private - */ - private function hqr2() - { - // Initialize - $nn = $this->n; - $n = $nn - 1; - $low = 0; - $high = $nn - 1; - $eps = pow(2.0, -52.0); - $exshift = 0.0; - $p = $q = $r = $s = $z = 0; - // Store roots isolated by balanc and compute matrix norm - $norm = 0.0; - - for ($i = 0; $i < $nn; ++$i) { - if (($i < $low) or ($i > $high)) { - $this->d[$i] = $this->H[$i][$i]; - $this->e[$i] = 0.0; - } - for ($j = max($i-1, 0); $j < $nn; ++$j) { - $norm = $norm + abs($this->H[$i][$j]); - } - } - - // Outer loop over eigenvalue index - $iter = 0; - while ($n >= $low) { - // Look for single small sub-diagonal element - $l = $n; - while ($l > $low) { - $s = abs($this->H[$l-1][$l-1]) + abs($this->H[$l][$l]); - if ($s == 0.0) { - $s = $norm; - } - if (abs($this->H[$l][$l-1]) < $eps * $s) { - break; - } - --$l; - } - // Check for convergence - // One root found - if ($l == $n) { - $this->H[$n][$n] = $this->H[$n][$n] + $exshift; - $this->d[$n] = $this->H[$n][$n]; - $this->e[$n] = 0.0; - --$n; - $iter = 0; - // Two roots found - } elseif ($l == $n-1) { - $w = $this->H[$n][$n-1] * $this->H[$n-1][$n]; - $p = ($this->H[$n-1][$n-1] - $this->H[$n][$n]) / 2.0; - $q = $p * $p + $w; - $z = sqrt(abs($q)); - $this->H[$n][$n] = $this->H[$n][$n] + $exshift; - $this->H[$n-1][$n-1] = $this->H[$n-1][$n-1] + $exshift; - $x = $this->H[$n][$n]; - // Real pair - if ($q >= 0) { - if ($p >= 0) { - $z = $p + $z; - } else { - $z = $p - $z; - } - $this->d[$n-1] = $x + $z; - $this->d[$n] = $this->d[$n-1]; - if ($z != 0.0) { - $this->d[$n] = $x - $w / $z; - } - $this->e[$n-1] = 0.0; - $this->e[$n] = 0.0; - $x = $this->H[$n][$n-1]; - $s = abs($x) + abs($z); - $p = $x / $s; - $q = $z / $s; - $r = sqrt($p * $p + $q * $q); - $p = $p / $r; - $q = $q / $r; - // Row modification - for ($j = $n-1; $j < $nn; ++$j) { - $z = $this->H[$n-1][$j]; - $this->H[$n-1][$j] = $q * $z + $p * $this->H[$n][$j]; - $this->H[$n][$j] = $q * $this->H[$n][$j] - $p * $z; - } - // Column modification - for ($i = 0; $i <= $n; ++$i) { - $z = $this->H[$i][$n-1]; - $this->H[$i][$n-1] = $q * $z + $p * $this->H[$i][$n]; - $this->H[$i][$n] = $q * $this->H[$i][$n] - $p * $z; - } - // Accumulate transformations - for ($i = $low; $i <= $high; ++$i) { - $z = $this->V[$i][$n-1]; - $this->V[$i][$n-1] = $q * $z + $p * $this->V[$i][$n]; - $this->V[$i][$n] = $q * $this->V[$i][$n] - $p * $z; - } - // Complex pair - } else { - $this->d[$n-1] = $x + $p; - $this->d[$n] = $x + $p; - $this->e[$n-1] = $z; - $this->e[$n] = -$z; - } - $n = $n - 2; - $iter = 0; - // No convergence yet - } else { - // Form shift - $x = $this->H[$n][$n]; - $y = 0.0; - $w = 0.0; - if ($l < $n) { - $y = $this->H[$n-1][$n-1]; - $w = $this->H[$n][$n-1] * $this->H[$n-1][$n]; - } - // Wilkinson's original ad hoc shift - if ($iter == 10) { - $exshift += $x; - for ($i = $low; $i <= $n; ++$i) { - $this->H[$i][$i] -= $x; - } - $s = abs($this->H[$n][$n-1]) + abs($this->H[$n-1][$n-2]); - $x = $y = 0.75 * $s; - $w = -0.4375 * $s * $s; - } - // MATLAB's new ad hoc shift - if ($iter == 30) { - $s = ($y - $x) / 2.0; - $s = $s * $s + $w; - if ($s > 0) { - $s = sqrt($s); - if ($y < $x) { - $s = -$s; - } - $s = $x - $w / (($y - $x) / 2.0 + $s); - for ($i = $low; $i <= $n; ++$i) { - $this->H[$i][$i] -= $s; - } - $exshift += $s; - $x = $y = $w = 0.964; - } - } - // Could check iteration count here. - $iter = $iter + 1; - // Look for two consecutive small sub-diagonal elements - $m = $n - 2; - while ($m >= $l) { - $z = $this->H[$m][$m]; - $r = $x - $z; - $s = $y - $z; - $p = ($r * $s - $w) / $this->H[$m+1][$m] + $this->H[$m][$m+1]; - $q = $this->H[$m+1][$m+1] - $z - $r - $s; - $r = $this->H[$m+2][$m+1]; - $s = abs($p) + abs($q) + abs($r); - $p = $p / $s; - $q = $q / $s; - $r = $r / $s; - if ($m == $l) { - break; - } - if (abs($this->H[$m][$m-1]) * (abs($q) + abs($r)) < - $eps * (abs($p) * (abs($this->H[$m-1][$m-1]) + abs($z) + abs($this->H[$m+1][$m+1])))) { - break; - } - --$m; - } - for ($i = $m + 2; $i <= $n; ++$i) { - $this->H[$i][$i-2] = 0.0; - if ($i > $m+2) { - $this->H[$i][$i-3] = 0.0; - } - } - // Double QR step involving rows l:n and columns m:n - for ($k = $m; $k <= $n-1; ++$k) { - $notlast = ($k != $n-1); - if ($k != $m) { - $p = $this->H[$k][$k-1]; - $q = $this->H[$k+1][$k-1]; - $r = ($notlast ? $this->H[$k+2][$k-1] : 0.0); - $x = abs($p) + abs($q) + abs($r); - if ($x != 0.0) { - $p = $p / $x; - $q = $q / $x; - $r = $r / $x; - } - } - if ($x == 0.0) { - break; - } - $s = sqrt($p * $p + $q * $q + $r * $r); - if ($p < 0) { - $s = -$s; - } - if ($s != 0) { - if ($k != $m) { - $this->H[$k][$k-1] = -$s * $x; - } elseif ($l != $m) { - $this->H[$k][$k-1] = -$this->H[$k][$k-1]; - } - $p = $p + $s; - $x = $p / $s; - $y = $q / $s; - $z = $r / $s; - $q = $q / $p; - $r = $r / $p; - // Row modification - for ($j = $k; $j < $nn; ++$j) { - $p = $this->H[$k][$j] + $q * $this->H[$k+1][$j]; - if ($notlast) { - $p = $p + $r * $this->H[$k+2][$j]; - $this->H[$k+2][$j] = $this->H[$k+2][$j] - $p * $z; - } - $this->H[$k][$j] = $this->H[$k][$j] - $p * $x; - $this->H[$k+1][$j] = $this->H[$k+1][$j] - $p * $y; - } - // Column modification - for ($i = 0; $i <= min($n, $k+3); ++$i) { - $p = $x * $this->H[$i][$k] + $y * $this->H[$i][$k+1]; - if ($notlast) { - $p = $p + $z * $this->H[$i][$k+2]; - $this->H[$i][$k+2] = $this->H[$i][$k+2] - $p * $r; - } - $this->H[$i][$k] = $this->H[$i][$k] - $p; - $this->H[$i][$k+1] = $this->H[$i][$k+1] - $p * $q; - } - // Accumulate transformations - for ($i = $low; $i <= $high; ++$i) { - $p = $x * $this->V[$i][$k] + $y * $this->V[$i][$k+1]; - if ($notlast) { - $p = $p + $z * $this->V[$i][$k+2]; - $this->V[$i][$k+2] = $this->V[$i][$k+2] - $p * $r; - } - $this->V[$i][$k] = $this->V[$i][$k] - $p; - $this->V[$i][$k+1] = $this->V[$i][$k+1] - $p * $q; - } - } // ($s != 0) - } // k loop - } // check convergence - } // while ($n >= $low) - - // Backsubstitute to find vectors of upper triangular form - if ($norm == 0.0) { - return; - } - - for ($n = $nn-1; $n >= 0; --$n) { - $p = $this->d[$n]; - $q = $this->e[$n]; - // Real vector - if ($q == 0) { - $l = $n; - $this->H[$n][$n] = 1.0; - for ($i = $n-1; $i >= 0; --$i) { - $w = $this->H[$i][$i] - $p; - $r = 0.0; - for ($j = $l; $j <= $n; ++$j) { - $r = $r + $this->H[$i][$j] * $this->H[$j][$n]; - } - if ($this->e[$i] < 0.0) { - $z = $w; - $s = $r; - } else { - $l = $i; - if ($this->e[$i] == 0.0) { - if ($w != 0.0) { - $this->H[$i][$n] = -$r / $w; - } else { - $this->H[$i][$n] = -$r / ($eps * $norm); - } - // Solve real equations - } else { - $x = $this->H[$i][$i+1]; - $y = $this->H[$i+1][$i]; - $q = ($this->d[$i] - $p) * ($this->d[$i] - $p) + $this->e[$i] * $this->e[$i]; - $t = ($x * $s - $z * $r) / $q; - $this->H[$i][$n] = $t; - if (abs($x) > abs($z)) { - $this->H[$i+1][$n] = (-$r - $w * $t) / $x; - } else { - $this->H[$i+1][$n] = (-$s - $y * $t) / $z; - } - } - // Overflow control - $t = abs($this->H[$i][$n]); - if (($eps * $t) * $t > 1) { - for ($j = $i; $j <= $n; ++$j) { - $this->H[$j][$n] = $this->H[$j][$n] / $t; - } - } - } - } - // Complex vector - } elseif ($q < 0) { - $l = $n-1; - // Last vector component imaginary so matrix is triangular - if (abs($this->H[$n][$n-1]) > abs($this->H[$n-1][$n])) { - $this->H[$n-1][$n-1] = $q / $this->H[$n][$n-1]; - $this->H[$n-1][$n] = -($this->H[$n][$n] - $p) / $this->H[$n][$n-1]; - } else { - $this->cdiv(0.0, -$this->H[$n-1][$n], $this->H[$n-1][$n-1] - $p, $q); - $this->H[$n-1][$n-1] = $this->cdivr; - $this->H[$n-1][$n] = $this->cdivi; - } - $this->H[$n][$n-1] = 0.0; - $this->H[$n][$n] = 1.0; - for ($i = $n-2; $i >= 0; --$i) { - // double ra,sa,vr,vi; - $ra = 0.0; - $sa = 0.0; - for ($j = $l; $j <= $n; ++$j) { - $ra = $ra + $this->H[$i][$j] * $this->H[$j][$n-1]; - $sa = $sa + $this->H[$i][$j] * $this->H[$j][$n]; - } - $w = $this->H[$i][$i] - $p; - if ($this->e[$i] < 0.0) { - $z = $w; - $r = $ra; - $s = $sa; - } else { - $l = $i; - if ($this->e[$i] == 0) { - $this->cdiv(-$ra, -$sa, $w, $q); - $this->H[$i][$n-1] = $this->cdivr; - $this->H[$i][$n] = $this->cdivi; - } else { - // Solve complex equations - $x = $this->H[$i][$i+1]; - $y = $this->H[$i+1][$i]; - $vr = ($this->d[$i] - $p) * ($this->d[$i] - $p) + $this->e[$i] * $this->e[$i] - $q * $q; - $vi = ($this->d[$i] - $p) * 2.0 * $q; - if ($vr == 0.0 & $vi == 0.0) { - $vr = $eps * $norm * (abs($w) + abs($q) + abs($x) + abs($y) + abs($z)); - } - $this->cdiv($x * $r - $z * $ra + $q * $sa, $x * $s - $z * $sa - $q * $ra, $vr, $vi); - $this->H[$i][$n-1] = $this->cdivr; - $this->H[$i][$n] = $this->cdivi; - if (abs($x) > (abs($z) + abs($q))) { - $this->H[$i+1][$n-1] = (-$ra - $w * $this->H[$i][$n-1] + $q * $this->H[$i][$n]) / $x; - $this->H[$i+1][$n] = (-$sa - $w * $this->H[$i][$n] - $q * $this->H[$i][$n-1]) / $x; - } else { - $this->cdiv(-$r - $y * $this->H[$i][$n-1], -$s - $y * $this->H[$i][$n], $z, $q); - $this->H[$i+1][$n-1] = $this->cdivr; - $this->H[$i+1][$n] = $this->cdivi; - } - } - // Overflow control - $t = max(abs($this->H[$i][$n-1]), abs($this->H[$i][$n])); - if (($eps * $t) * $t > 1) { - for ($j = $i; $j <= $n; ++$j) { - $this->H[$j][$n-1] = $this->H[$j][$n-1] / $t; - $this->H[$j][$n] = $this->H[$j][$n] / $t; - } - } - } // end else - } // end for - } // end else for complex case - } // end for - - // Vectors of isolated roots - for ($i = 0; $i < $nn; ++$i) { - if ($i < $low | $i > $high) { - for ($j = $i; $j < $nn; ++$j) { - $this->V[$i][$j] = $this->H[$i][$j]; - } - } - } - - // Back transformation to get eigenvectors of original matrix - for ($j = $nn-1; $j >= $low; --$j) { - for ($i = $low; $i <= $high; ++$i) { - $z = 0.0; - for ($k = $low; $k <= min($j, $high); ++$k) { - $z = $z + $this->V[$i][$k] * $this->H[$k][$j]; - } - $this->V[$i][$j] = $z; - } - } - } // end hqr2 - - /** - * Constructor: Check for symmetry, then construct the eigenvalue decomposition - * - * @access public - * @param A Square matrix - * @return Structure to access D and V. - */ - public function __construct($Arg) - { - $this->A = $Arg->getArray(); - $this->n = $Arg->getColumnDimension(); - - $issymmetric = true; - for ($j = 0; ($j < $this->n) & $issymmetric; ++$j) { - for ($i = 0; ($i < $this->n) & $issymmetric; ++$i) { - $issymmetric = ($this->A[$i][$j] == $this->A[$j][$i]); - } - } - - if ($issymmetric) { - $this->V = $this->A; - // Tridiagonalize. - $this->tred2(); - // Diagonalize. - $this->tql2(); - } else { - $this->H = $this->A; - $this->ort = array(); - // Reduce to Hessenberg form. - $this->orthes(); - // Reduce Hessenberg to real Schur form. - $this->hqr2(); - } - } - - /** - * Return the eigenvector matrix - * - * @access public - * @return V - */ - public function getV() - { - return new Matrix($this->V, $this->n, $this->n); - } - - /** - * Return the real parts of the eigenvalues - * - * @access public - * @return real(diag(D)) - */ - public function getRealEigenvalues() - { - return $this->d; - } - - /** - * Return the imaginary parts of the eigenvalues - * - * @access public - * @return imag(diag(D)) - */ - public function getImagEigenvalues() - { - return $this->e; - } - - /** - * Return the block diagonal eigenvalue matrix - * - * @access public - * @return D - */ - public function getD() - { - for ($i = 0; $i < $this->n; ++$i) { - $D[$i] = array_fill(0, $this->n, 0.0); - $D[$i][$i] = $this->d[$i]; - if ($this->e[$i] == 0) { - continue; - } - $o = ($this->e[$i] > 0) ? $i + 1 : $i - 1; - $D[$i][$o] = $this->e[$i]; - } - return new Matrix($D); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/LUDecomposition.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/LUDecomposition.php deleted file mode 100644 index 2505d92..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/LUDecomposition.php +++ /dev/null @@ -1,257 +0,0 @@ -<?php -/** - * @package JAMA - * - * For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n - * unit lower triangular matrix L, an n-by-n upper triangular matrix U, - * and a permutation vector piv of length m so that A(piv,:) = L*U. - * If m < n, then L is m-by-m and U is m-by-n. - * - * The LU decompostion with pivoting always exists, even if the matrix is - * singular, so the constructor will never fail. The primary use of the - * LU decomposition is in the solution of square systems of simultaneous - * linear equations. This will fail if isNonsingular() returns false. - * - * @author Paul Meagher - * @author Bartosz Matosiuk - * @author Michael Bommarito - * @version 1.1 - * @license PHP v3.0 - */ -class PHPExcel_Shared_JAMA_LUDecomposition -{ - const MATRIX_SINGULAR_EXCEPTION = "Can only perform operation on singular matrix."; - const MATRIX_SQUARE_EXCEPTION = "Mismatched Row dimension"; - - /** - * Decomposition storage - * @var array - */ - private $LU = array(); - - /** - * Row dimension. - * @var int - */ - private $m; - - /** - * Column dimension. - * @var int - */ - private $n; - - /** - * Pivot sign. - * @var int - */ - private $pivsign; - - /** - * Internal storage of pivot vector. - * @var array - */ - private $piv = array(); - - /** - * LU Decomposition constructor. - * - * @param $A Rectangular matrix - * @return Structure to access L, U and piv. - */ - public function __construct($A) - { - if ($A instanceof PHPExcel_Shared_JAMA_Matrix) { - // Use a "left-looking", dot-product, Crout/Doolittle algorithm. - $this->LU = $A->getArray(); - $this->m = $A->getRowDimension(); - $this->n = $A->getColumnDimension(); - for ($i = 0; $i < $this->m; ++$i) { - $this->piv[$i] = $i; - } - $this->pivsign = 1; - $LUrowi = $LUcolj = array(); - - // Outer loop. - for ($j = 0; $j < $this->n; ++$j) { - // Make a copy of the j-th column to localize references. - for ($i = 0; $i < $this->m; ++$i) { - $LUcolj[$i] = &$this->LU[$i][$j]; - } - // Apply previous transformations. - for ($i = 0; $i < $this->m; ++$i) { - $LUrowi = $this->LU[$i]; - // Most of the time is spent in the following dot product. - $kmax = min($i, $j); - $s = 0.0; - for ($k = 0; $k < $kmax; ++$k) { - $s += $LUrowi[$k] * $LUcolj[$k]; - } - $LUrowi[$j] = $LUcolj[$i] -= $s; - } - // Find pivot and exchange if necessary. - $p = $j; - for ($i = $j+1; $i < $this->m; ++$i) { - if (abs($LUcolj[$i]) > abs($LUcolj[$p])) { - $p = $i; - } - } - if ($p != $j) { - for ($k = 0; $k < $this->n; ++$k) { - $t = $this->LU[$p][$k]; - $this->LU[$p][$k] = $this->LU[$j][$k]; - $this->LU[$j][$k] = $t; - } - $k = $this->piv[$p]; - $this->piv[$p] = $this->piv[$j]; - $this->piv[$j] = $k; - $this->pivsign = $this->pivsign * -1; - } - // Compute multipliers. - if (($j < $this->m) && ($this->LU[$j][$j] != 0.0)) { - for ($i = $j+1; $i < $this->m; ++$i) { - $this->LU[$i][$j] /= $this->LU[$j][$j]; - } - } - } - } else { - throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ARGUMENT_TYPE_EXCEPTION); - } - } // function __construct() - - /** - * Get lower triangular factor. - * - * @return array Lower triangular factor - */ - public function getL() - { - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - if ($i > $j) { - $L[$i][$j] = $this->LU[$i][$j]; - } elseif ($i == $j) { - $L[$i][$j] = 1.0; - } else { - $L[$i][$j] = 0.0; - } - } - } - return new PHPExcel_Shared_JAMA_Matrix($L); - } // function getL() - - /** - * Get upper triangular factor. - * - * @return array Upper triangular factor - */ - public function getU() - { - for ($i = 0; $i < $this->n; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - if ($i <= $j) { - $U[$i][$j] = $this->LU[$i][$j]; - } else { - $U[$i][$j] = 0.0; - } - } - } - return new PHPExcel_Shared_JAMA_Matrix($U); - } // function getU() - - /** - * Return pivot permutation vector. - * - * @return array Pivot vector - */ - public function getPivot() - { - return $this->piv; - } // function getPivot() - - /** - * Alias for getPivot - * - * @see getPivot - */ - public function getDoublePivot() - { - return $this->getPivot(); - } // function getDoublePivot() - - /** - * Is the matrix nonsingular? - * - * @return true if U, and hence A, is nonsingular. - */ - public function isNonsingular() - { - for ($j = 0; $j < $this->n; ++$j) { - if ($this->LU[$j][$j] == 0) { - return false; - } - } - return true; - } // function isNonsingular() - - /** - * Count determinants - * - * @return array d matrix deterninat - */ - public function det() - { - if ($this->m == $this->n) { - $d = $this->pivsign; - for ($j = 0; $j < $this->n; ++$j) { - $d *= $this->LU[$j][$j]; - } - return $d; - } else { - throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MATRIX_DIMENSION_EXCEPTION); - } - } // function det() - - /** - * Solve A*X = B - * - * @param $B A Matrix with as many rows as A and any number of columns. - * @return X so that L*U*X = B(piv,:) - * @PHPExcel_Calculation_Exception IllegalArgumentException Matrix row dimensions must agree. - * @PHPExcel_Calculation_Exception RuntimeException Matrix is singular. - */ - public function solve($B) - { - if ($B->getRowDimension() == $this->m) { - if ($this->isNonsingular()) { - // Copy right hand side with pivoting - $nx = $B->getColumnDimension(); - $X = $B->getMatrix($this->piv, 0, $nx-1); - // Solve L*Y = B(piv,:) - for ($k = 0; $k < $this->n; ++$k) { - for ($i = $k+1; $i < $this->n; ++$i) { - for ($j = 0; $j < $nx; ++$j) { - $X->A[$i][$j] -= $X->A[$k][$j] * $this->LU[$i][$k]; - } - } - } - // Solve U*X = Y; - for ($k = $this->n-1; $k >= 0; --$k) { - for ($j = 0; $j < $nx; ++$j) { - $X->A[$k][$j] /= $this->LU[$k][$k]; - } - for ($i = 0; $i < $k; ++$i) { - for ($j = 0; $j < $nx; ++$j) { - $X->A[$i][$j] -= $X->A[$k][$j] * $this->LU[$i][$k]; - } - } - } - return $X; - } else { - throw new PHPExcel_Calculation_Exception(self::MATRIX_SINGULAR_EXCEPTION); - } - } else { - throw new PHPExcel_Calculation_Exception(self::MATRIX_SQUARE_EXCEPTION); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/Matrix.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/Matrix.php deleted file mode 100644 index 82fb0fb..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/Matrix.php +++ /dev/null @@ -1,1159 +0,0 @@ -<?php -/** - * @package JAMA - */ - -/** PHPExcel root directory */ -if (!defined('PHPEXCEL_ROOT')) { - /** - * @ignore - */ - define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../../'); - require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php'); -} - - -/* - * Matrix class - * - * @author Paul Meagher - * @author Michael Bommarito - * @author Lukasz Karapuda - * @author Bartek Matosiuk - * @version 1.8 - * @license PHP v3.0 - * @see http://math.nist.gov/javanumerics/jama/ - */ -class PHPExcel_Shared_JAMA_Matrix -{ - const POLYMORPHIC_ARGUMENT_EXCEPTION = "Invalid argument pattern for polymorphic function."; - const ARGUMENT_TYPE_EXCEPTION = "Invalid argument type."; - const ARGUMENT_BOUNDS_EXCEPTION = "Invalid argument range."; - const MATRIX_DIMENSION_EXCEPTION = "Matrix dimensions are not equal."; - const ARRAY_LENGTH_EXCEPTION = "Array length must be a multiple of m."; - - /** - * Matrix storage - * - * @var array - * @access public - */ - public $A = array(); - - /** - * Matrix row dimension - * - * @var int - * @access private - */ - private $m; - - /** - * Matrix column dimension - * - * @var int - * @access private - */ - private $n; - - /** - * Polymorphic constructor - * - * As PHP has no support for polymorphic constructors, we hack our own sort of polymorphism using func_num_args, func_get_arg, and gettype. In essence, we're just implementing a simple RTTI filter and calling the appropriate constructor. - */ - public function __construct() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - //Rectangular matrix - m x n initialized from 2D array - case 'array': - $this->m = count($args[0]); - $this->n = count($args[0][0]); - $this->A = $args[0]; - break; - //Square matrix - n x n - case 'integer': - $this->m = $args[0]; - $this->n = $args[0]; - $this->A = array_fill(0, $this->m, array_fill(0, $this->n, 0)); - break; - //Rectangular matrix - m x n - case 'integer,integer': - $this->m = $args[0]; - $this->n = $args[1]; - $this->A = array_fill(0, $this->m, array_fill(0, $this->n, 0)); - break; - //Rectangular matrix - m x n initialized from packed array - case 'array,integer': - $this->m = $args[1]; - if ($this->m != 0) { - $this->n = count($args[0]) / $this->m; - } else { - $this->n = 0; - } - if (($this->m * $this->n) == count($args[0])) { - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $this->A[$i][$j] = $args[0][$i + $j * $this->m]; - } - } - } else { - throw new PHPExcel_Calculation_Exception(self::ARRAY_LENGTH_EXCEPTION); - } - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * getArray - * - * @return array Matrix array - */ - public function getArray() - { - return $this->A; - } - - /** - * getRowDimension - * - * @return int Row dimension - */ - public function getRowDimension() - { - return $this->m; - } - - /** - * getColumnDimension - * - * @return int Column dimension - */ - public function getColumnDimension() - { - return $this->n; - } - - /** - * get - * - * Get the i,j-th element of the matrix. - * @param int $i Row position - * @param int $j Column position - * @return mixed Element (int/float/double) - */ - public function get($i = null, $j = null) - { - return $this->A[$i][$j]; - } - - /** - * getMatrix - * - * Get a submatrix - * @param int $i0 Initial row index - * @param int $iF Final row index - * @param int $j0 Initial column index - * @param int $jF Final column index - * @return Matrix Submatrix - */ - public function getMatrix() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - //A($i0...; $j0...) - case 'integer,integer': - list($i0, $j0) = $args; - if ($i0 >= 0) { - $m = $this->m - $i0; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - if ($j0 >= 0) { - $n = $this->n - $j0; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); - for ($i = $i0; $i < $this->m; ++$i) { - for ($j = $j0; $j < $this->n; ++$j) { - $R->set($i, $j, $this->A[$i][$j]); - } - } - return $R; - break; - //A($i0...$iF; $j0...$jF) - case 'integer,integer,integer,integer': - list($i0, $iF, $j0, $jF) = $args; - if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { - $m = $iF - $i0; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - if (($jF > $j0) && ($this->n >= $jF) && ($j0 >= 0)) { - $n = $jF - $j0; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - $R = new PHPExcel_Shared_JAMA_Matrix($m+1, $n+1); - for ($i = $i0; $i <= $iF; ++$i) { - for ($j = $j0; $j <= $jF; ++$j) { - $R->set($i - $i0, $j - $j0, $this->A[$i][$j]); - } - } - return $R; - break; - //$R = array of row indices; $C = array of column indices - case 'array,array': - list($RL, $CL) = $args; - if (count($RL) > 0) { - $m = count($RL); - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - if (count($CL) > 0) { - $n = count($CL); - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); - for ($i = 0; $i < $m; ++$i) { - for ($j = 0; $j < $n; ++$j) { - $R->set($i - $i0, $j - $j0, $this->A[$RL[$i]][$CL[$j]]); - } - } - return $R; - break; - //$RL = array of row indices; $CL = array of column indices - case 'array,array': - list($RL, $CL) = $args; - if (count($RL) > 0) { - $m = count($RL); - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - if (count($CL) > 0) { - $n = count($CL); - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); - for ($i = 0; $i < $m; ++$i) { - for ($j = 0; $j < $n; ++$j) { - $R->set($i, $j, $this->A[$RL[$i]][$CL[$j]]); - } - } - return $R; - break; - //A($i0...$iF); $CL = array of column indices - case 'integer,integer,array': - list($i0, $iF, $CL) = $args; - if (($iF > $i0) && ($this->m >= $iF) && ($i0 >= 0)) { - $m = $iF - $i0; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - if (count($CL) > 0) { - $n = count($CL); - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); - for ($i = $i0; $i < $iF; ++$i) { - for ($j = 0; $j < $n; ++$j) { - $R->set($i - $i0, $j, $this->A[$RL[$i]][$j]); - } - } - return $R; - break; - //$RL = array of row indices - case 'array,integer,integer': - list($RL, $j0, $jF) = $args; - if (count($RL) > 0) { - $m = count($RL); - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - if (($jF >= $j0) && ($this->n >= $jF) && ($j0 >= 0)) { - $n = $jF - $j0; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_BOUNDS_EXCEPTION); - } - $R = new PHPExcel_Shared_JAMA_Matrix($m, $n+1); - for ($i = 0; $i < $m; ++$i) { - for ($j = $j0; $j <= $jF; ++$j) { - $R->set($i, $j - $j0, $this->A[$RL[$i]][$j]); - } - } - return $R; - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * checkMatrixDimensions - * - * Is matrix B the same size? - * @param Matrix $B Matrix B - * @return boolean - */ - public function checkMatrixDimensions($B = null) - { - if ($B instanceof PHPExcel_Shared_JAMA_Matrix) { - if (($this->m == $B->getRowDimension()) && ($this->n == $B->getColumnDimension())) { - return true; - } else { - throw new PHPExcel_Calculation_Exception(self::MATRIX_DIMENSION_EXCEPTION); - } - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - } // function checkMatrixDimensions() - - /** - * set - * - * Set the i,j-th element of the matrix. - * @param int $i Row position - * @param int $j Column position - * @param mixed $c Int/float/double value - * @return mixed Element (int/float/double) - */ - public function set($i = null, $j = null, $c = null) - { - // Optimized set version just has this - $this->A[$i][$j] = $c; - } // function set() - - /** - * identity - * - * Generate an identity matrix. - * @param int $m Row dimension - * @param int $n Column dimension - * @return Matrix Identity matrix - */ - public function identity($m = null, $n = null) - { - return $this->diagonal($m, $n, 1); - } - - /** - * diagonal - * - * Generate a diagonal matrix - * @param int $m Row dimension - * @param int $n Column dimension - * @param mixed $c Diagonal value - * @return Matrix Diagonal matrix - */ - public function diagonal($m = null, $n = null, $c = 1) - { - $R = new PHPExcel_Shared_JAMA_Matrix($m, $n); - for ($i = 0; $i < $m; ++$i) { - $R->set($i, $i, $c); - } - return $R; - } - - /** - * getMatrixByRow - * - * Get a submatrix by row index/range - * @param int $i0 Initial row index - * @param int $iF Final row index - * @return Matrix Submatrix - */ - public function getMatrixByRow($i0 = null, $iF = null) - { - if (is_int($i0)) { - if (is_int($iF)) { - return $this->getMatrix($i0, 0, $iF + 1, $this->n); - } else { - return $this->getMatrix($i0, 0, $i0 + 1, $this->n); - } - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - } - - /** - * getMatrixByCol - * - * Get a submatrix by column index/range - * @param int $i0 Initial column index - * @param int $iF Final column index - * @return Matrix Submatrix - */ - public function getMatrixByCol($j0 = null, $jF = null) - { - if (is_int($j0)) { - if (is_int($jF)) { - return $this->getMatrix(0, $j0, $this->m, $jF + 1); - } else { - return $this->getMatrix(0, $j0, $this->m, $j0 + 1); - } - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - } - - /** - * transpose - * - * Tranpose matrix - * @return Matrix Transposed matrix - */ - public function transpose() - { - $R = new PHPExcel_Shared_JAMA_Matrix($this->n, $this->m); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $R->set($j, $i, $this->A[$i][$j]); - } - } - return $R; - } // function transpose() - - /** - * trace - * - * Sum of diagonal elements - * @return float Sum of diagonal elements - */ - public function trace() - { - $s = 0; - $n = min($this->m, $this->n); - for ($i = 0; $i < $n; ++$i) { - $s += $this->A[$i][$i]; - } - return $s; - } - - /** - * uminus - * - * Unary minus matrix -A - * @return Matrix Unary minus matrix - */ - public function uminus() - { - } - - /** - * plus - * - * A + B - * @param mixed $B Matrix/Array - * @return Matrix Sum - */ - public function plus() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $M->set($i, $j, $M->get($i, $j) + $this->A[$i][$j]); - } - } - return $M; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * plusEquals - * - * A = A + B - * @param mixed $B Matrix/Array - * @return Matrix Sum - */ - public function plusEquals() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $validValues = true; - $value = $M->get($i, $j); - if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { - $this->A[$i][$j] = trim($this->A[$i][$j], '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]); - } - if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { - $value = trim($value, '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value); - } - if ($validValues) { - $this->A[$i][$j] += $value; - } else { - $this->A[$i][$j] = PHPExcel_Calculation_Functions::NaN(); - } - } - } - return $this; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * minus - * - * A - B - * @param mixed $B Matrix/Array - * @return Matrix Sum - */ - public function minus() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $M->set($i, $j, $M->get($i, $j) - $this->A[$i][$j]); - } - } - return $M; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * minusEquals - * - * A = A - B - * @param mixed $B Matrix/Array - * @return Matrix Sum - */ - public function minusEquals() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $validValues = true; - $value = $M->get($i, $j); - if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { - $this->A[$i][$j] = trim($this->A[$i][$j], '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]); - } - if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { - $value = trim($value, '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value); - } - if ($validValues) { - $this->A[$i][$j] -= $value; - } else { - $this->A[$i][$j] = PHPExcel_Calculation_Functions::NaN(); - } - } - } - return $this; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * arrayTimes - * - * Element-by-element multiplication - * Cij = Aij * Bij - * @param mixed $B Matrix/Array - * @return Matrix Matrix Cij - */ - public function arrayTimes() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $M->set($i, $j, $M->get($i, $j) * $this->A[$i][$j]); - } - } - return $M; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * arrayTimesEquals - * - * Element-by-element multiplication - * Aij = Aij * Bij - * @param mixed $B Matrix/Array - * @return Matrix Matrix Aij - */ - public function arrayTimesEquals() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $validValues = true; - $value = $M->get($i, $j); - if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { - $this->A[$i][$j] = trim($this->A[$i][$j], '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]); - } - if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { - $value = trim($value, '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value); - } - if ($validValues) { - $this->A[$i][$j] *= $value; - } else { - $this->A[$i][$j] = PHPExcel_Calculation_Functions::NaN(); - } - } - } - return $this; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * arrayRightDivide - * - * Element-by-element right division - * A / B - * @param Matrix $B Matrix B - * @return Matrix Division result - */ - public function arrayRightDivide() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $validValues = true; - $value = $M->get($i, $j); - if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { - $this->A[$i][$j] = trim($this->A[$i][$j], '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]); - } - if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { - $value = trim($value, '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value); - } - if ($validValues) { - if ($value == 0) { - // Trap for Divide by Zero error - $M->set($i, $j, '#DIV/0!'); - } else { - $M->set($i, $j, $this->A[$i][$j] / $value); - } - } else { - $M->set($i, $j, PHPExcel_Calculation_Functions::NaN()); - } - } - } - return $M; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - - /** - * arrayRightDivideEquals - * - * Element-by-element right division - * Aij = Aij / Bij - * @param mixed $B Matrix/Array - * @return Matrix Matrix Aij - */ - public function arrayRightDivideEquals() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $this->A[$i][$j] = $this->A[$i][$j] / $M->get($i, $j); - } - } - return $M; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - - /** - * arrayLeftDivide - * - * Element-by-element Left division - * A / B - * @param Matrix $B Matrix B - * @return Matrix Division result - */ - public function arrayLeftDivide() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $M->set($i, $j, $M->get($i, $j) / $this->A[$i][$j]); - } - } - return $M; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - - /** - * arrayLeftDivideEquals - * - * Element-by-element Left division - * Aij = Aij / Bij - * @param mixed $B Matrix/Array - * @return Matrix Matrix Aij - */ - public function arrayLeftDivideEquals() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $this->A[$i][$j] = $M->get($i, $j) / $this->A[$i][$j]; - } - } - return $M; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - - /** - * times - * - * Matrix multiplication - * @param mixed $n Matrix/Array/Scalar - * @return Matrix Product - */ - public function times() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $B = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - if ($this->n == $B->m) { - $C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n); - for ($j = 0; $j < $B->n; ++$j) { - for ($k = 0; $k < $this->n; ++$k) { - $Bcolj[$k] = $B->A[$k][$j]; - } - for ($i = 0; $i < $this->m; ++$i) { - $Arowi = $this->A[$i]; - $s = 0; - for ($k = 0; $k < $this->n; ++$k) { - $s += $Arowi[$k] * $Bcolj[$k]; - } - $C->A[$i][$j] = $s; - } - } - return $C; - } else { - throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionMismatch)); - } - break; - case 'array': - $B = new PHPExcel_Shared_JAMA_Matrix($args[0]); - if ($this->n == $B->m) { - $C = new PHPExcel_Shared_JAMA_Matrix($this->m, $B->n); - for ($i = 0; $i < $C->m; ++$i) { - for ($j = 0; $j < $C->n; ++$j) { - $s = "0"; - for ($k = 0; $k < $C->n; ++$k) { - $s += $this->A[$i][$k] * $B->A[$k][$j]; - } - $C->A[$i][$j] = $s; - } - } - return $C; - } else { - throw new PHPExcel_Calculation_Exception(JAMAError(MatrixDimensionMismatch)); - } - return $M; - break; - case 'integer': - $C = new PHPExcel_Shared_JAMA_Matrix($this->A); - for ($i = 0; $i < $C->m; ++$i) { - for ($j = 0; $j < $C->n; ++$j) { - $C->A[$i][$j] *= $args[0]; - } - } - return $C; - break; - case 'double': - $C = new PHPExcel_Shared_JAMA_Matrix($this->m, $this->n); - for ($i = 0; $i < $C->m; ++$i) { - for ($j = 0; $j < $C->n; ++$j) { - $C->A[$i][$j] = $args[0] * $this->A[$i][$j]; - } - } - return $C; - break; - case 'float': - $C = new PHPExcel_Shared_JAMA_Matrix($this->A); - for ($i = 0; $i < $C->m; ++$i) { - for ($j = 0; $j < $C->n; ++$j) { - $C->A[$i][$j] *= $args[0]; - } - } - return $C; - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * power - * - * A = A ^ B - * @param mixed $B Matrix/Array - * @return Matrix Sum - */ - public function power() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - break; - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $validValues = true; - $value = $M->get($i, $j); - if ((is_string($this->A[$i][$j])) && (strlen($this->A[$i][$j]) > 0) && (!is_numeric($this->A[$i][$j]))) { - $this->A[$i][$j] = trim($this->A[$i][$j], '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($this->A[$i][$j]); - } - if ((is_string($value)) && (strlen($value) > 0) && (!is_numeric($value))) { - $value = trim($value, '"'); - $validValues &= PHPExcel_Shared_String::convertToNumberIfFraction($value); - } - if ($validValues) { - $this->A[$i][$j] = pow($this->A[$i][$j], $value); - } else { - $this->A[$i][$j] = PHPExcel_Calculation_Functions::NaN(); - } - } - } - return $this; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * concat - * - * A = A & B - * @param mixed $B Matrix/Array - * @return Matrix Sum - */ - public function concat() - { - if (func_num_args() > 0) { - $args = func_get_args(); - $match = implode(",", array_map('gettype', $args)); - - switch ($match) { - case 'object': - if ($args[0] instanceof PHPExcel_Shared_JAMA_Matrix) { - $M = $args[0]; - } else { - throw new PHPExcel_Calculation_Exception(self::ARGUMENT_TYPE_EXCEPTION); - } - case 'array': - $M = new PHPExcel_Shared_JAMA_Matrix($args[0]); - break; - default: - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - break; - } - $this->checkMatrixDimensions($M); - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $this->A[$i][$j] = trim($this->A[$i][$j], '"').trim($M->get($i, $j), '"'); - } - } - return $this; - } else { - throw new PHPExcel_Calculation_Exception(self::POLYMORPHIC_ARGUMENT_EXCEPTION); - } - } - - /** - * Solve A*X = B. - * - * @param Matrix $B Right hand side - * @return Matrix ... Solution if A is square, least squares solution otherwise - */ - public function solve($B) - { - if ($this->m == $this->n) { - $LU = new PHPExcel_Shared_JAMA_LUDecomposition($this); - return $LU->solve($B); - } else { - $QR = new PHPExcel_Shared_JAMA_QRDecomposition($this); - return $QR->solve($B); - } - } - - /** - * Matrix inverse or pseudoinverse. - * - * @return Matrix ... Inverse(A) if A is square, pseudoinverse otherwise. - */ - public function inverse() - { - return $this->solve($this->identity($this->m, $this->m)); - } - - /** - * det - * - * Calculate determinant - * @return float Determinant - */ - public function det() - { - $L = new PHPExcel_Shared_JAMA_LUDecomposition($this); - return $L->det(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php deleted file mode 100644 index 1e43c7c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/QRDecomposition.php +++ /dev/null @@ -1,235 +0,0 @@ -<?php -/** - * @package JAMA - * - * For an m-by-n matrix A with m >= n, the QR decomposition is an m-by-n - * orthogonal matrix Q and an n-by-n upper triangular matrix R so that - * A = Q*R. - * - * The QR decompostion always exists, even if the matrix does not have - * full rank, so the constructor will never fail. The primary use of the - * QR decomposition is in the least squares solution of nonsquare systems - * of simultaneous linear equations. This will fail if isFullRank() - * returns false. - * - * @author Paul Meagher - * @license PHP v3.0 - * @version 1.1 - */ -class PHPExcel_Shared_JAMA_QRDecomposition -{ - const MATRIX_RANK_EXCEPTION = "Can only perform operation on full-rank matrix."; - - /** - * Array for internal storage of decomposition. - * @var array - */ - private $QR = array(); - - /** - * Row dimension. - * @var integer - */ - private $m; - - /** - * Column dimension. - * @var integer - */ - private $n; - - /** - * Array for internal storage of diagonal of R. - * @var array - */ - private $Rdiag = array(); - - - /** - * QR Decomposition computed by Householder reflections. - * - * @param matrix $A Rectangular matrix - * @return Structure to access R and the Householder vectors and compute Q. - */ - public function __construct($A) - { - if ($A instanceof PHPExcel_Shared_JAMA_Matrix) { - // Initialize. - $this->QR = $A->getArrayCopy(); - $this->m = $A->getRowDimension(); - $this->n = $A->getColumnDimension(); - // Main loop. - for ($k = 0; $k < $this->n; ++$k) { - // Compute 2-norm of k-th column without under/overflow. - $nrm = 0.0; - for ($i = $k; $i < $this->m; ++$i) { - $nrm = hypo($nrm, $this->QR[$i][$k]); - } - if ($nrm != 0.0) { - // Form k-th Householder vector. - if ($this->QR[$k][$k] < 0) { - $nrm = -$nrm; - } - for ($i = $k; $i < $this->m; ++$i) { - $this->QR[$i][$k] /= $nrm; - } - $this->QR[$k][$k] += 1.0; - // Apply transformation to remaining columns. - for ($j = $k+1; $j < $this->n; ++$j) { - $s = 0.0; - for ($i = $k; $i < $this->m; ++$i) { - $s += $this->QR[$i][$k] * $this->QR[$i][$j]; - } - $s = -$s/$this->QR[$k][$k]; - for ($i = $k; $i < $this->m; ++$i) { - $this->QR[$i][$j] += $s * $this->QR[$i][$k]; - } - } - } - $this->Rdiag[$k] = -$nrm; - } - } else { - throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::ARGUMENT_TYPE_EXCEPTION); - } - } // function __construct() - - - /** - * Is the matrix full rank? - * - * @return boolean true if R, and hence A, has full rank, else false. - */ - public function isFullRank() - { - for ($j = 0; $j < $this->n; ++$j) { - if ($this->Rdiag[$j] == 0) { - return false; - } - } - return true; - } // function isFullRank() - - /** - * Return the Householder vectors - * - * @return Matrix Lower trapezoidal matrix whose columns define the reflections - */ - public function getH() - { - for ($i = 0; $i < $this->m; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - if ($i >= $j) { - $H[$i][$j] = $this->QR[$i][$j]; - } else { - $H[$i][$j] = 0.0; - } - } - } - return new PHPExcel_Shared_JAMA_Matrix($H); - } // function getH() - - /** - * Return the upper triangular factor - * - * @return Matrix upper triangular factor - */ - public function getR() - { - for ($i = 0; $i < $this->n; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - if ($i < $j) { - $R[$i][$j] = $this->QR[$i][$j]; - } elseif ($i == $j) { - $R[$i][$j] = $this->Rdiag[$i]; - } else { - $R[$i][$j] = 0.0; - } - } - } - return new PHPExcel_Shared_JAMA_Matrix($R); - } // function getR() - - /** - * Generate and return the (economy-sized) orthogonal factor - * - * @return Matrix orthogonal factor - */ - public function getQ() - { - for ($k = $this->n-1; $k >= 0; --$k) { - for ($i = 0; $i < $this->m; ++$i) { - $Q[$i][$k] = 0.0; - } - $Q[$k][$k] = 1.0; - for ($j = $k; $j < $this->n; ++$j) { - if ($this->QR[$k][$k] != 0) { - $s = 0.0; - for ($i = $k; $i < $this->m; ++$i) { - $s += $this->QR[$i][$k] * $Q[$i][$j]; - } - $s = -$s/$this->QR[$k][$k]; - for ($i = $k; $i < $this->m; ++$i) { - $Q[$i][$j] += $s * $this->QR[$i][$k]; - } - } - } - } - /* - for($i = 0; $i < count($Q); ++$i) { - for($j = 0; $j < count($Q); ++$j) { - if (! isset($Q[$i][$j]) ) { - $Q[$i][$j] = 0; - } - } - } - */ - return new PHPExcel_Shared_JAMA_Matrix($Q); - } // function getQ() - - /** - * Least squares solution of A*X = B - * - * @param Matrix $B A Matrix with as many rows as A and any number of columns. - * @return Matrix Matrix that minimizes the two norm of Q*R*X-B. - */ - public function solve($B) - { - if ($B->getRowDimension() == $this->m) { - if ($this->isFullRank()) { - // Copy right hand side - $nx = $B->getColumnDimension(); - $X = $B->getArrayCopy(); - // Compute Y = transpose(Q)*B - for ($k = 0; $k < $this->n; ++$k) { - for ($j = 0; $j < $nx; ++$j) { - $s = 0.0; - for ($i = $k; $i < $this->m; ++$i) { - $s += $this->QR[$i][$k] * $X[$i][$j]; - } - $s = -$s/$this->QR[$k][$k]; - for ($i = $k; $i < $this->m; ++$i) { - $X[$i][$j] += $s * $this->QR[$i][$k]; - } - } - } - // Solve R*X = Y; - for ($k = $this->n-1; $k >= 0; --$k) { - for ($j = 0; $j < $nx; ++$j) { - $X[$k][$j] /= $this->Rdiag[$k]; - } - for ($i = 0; $i < $k; ++$i) { - for ($j = 0; $j < $nx; ++$j) { - $X[$i][$j] -= $X[$k][$j]* $this->QR[$i][$k]; - } - } - } - $X = new PHPExcel_Shared_JAMA_Matrix($X); - return ($X->getMatrix(0, $this->n-1, 0, $nx)); - } else { - throw new PHPExcel_Calculation_Exception(self::MATRIX_RANK_EXCEPTION); - } - } else { - throw new PHPExcel_Calculation_Exception(PHPExcel_Shared_JAMA_Matrix::MATRIX_DIMENSION_EXCEPTION); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/SingularValueDecomposition.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/SingularValueDecomposition.php deleted file mode 100644 index f57d122..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/SingularValueDecomposition.php +++ /dev/null @@ -1,528 +0,0 @@ -<?php -/** - * @package JAMA - * - * For an m-by-n matrix A with m >= n, the singular value decomposition is - * an m-by-n orthogonal matrix U, an n-by-n diagonal matrix S, and - * an n-by-n orthogonal matrix V so that A = U*S*V'. - * - * The singular values, sigma[$k] = S[$k][$k], are ordered so that - * sigma[0] >= sigma[1] >= ... >= sigma[n-1]. - * - * The singular value decompostion always exists, so the constructor will - * never fail. The matrix condition number and the effective numerical - * rank can be computed from this decomposition. - * - * @author Paul Meagher - * @license PHP v3.0 - * @version 1.1 - */ -class SingularValueDecomposition -{ - /** - * Internal storage of U. - * @var array - */ - private $U = array(); - - /** - * Internal storage of V. - * @var array - */ - private $V = array(); - - /** - * Internal storage of singular values. - * @var array - */ - private $s = array(); - - /** - * Row dimension. - * @var int - */ - private $m; - - /** - * Column dimension. - * @var int - */ - private $n; - - /** - * Construct the singular value decomposition - * - * Derived from LINPACK code. - * - * @param $A Rectangular matrix - * @return Structure to access U, S and V. - */ - public function __construct($Arg) - { - // Initialize. - $A = $Arg->getArrayCopy(); - $this->m = $Arg->getRowDimension(); - $this->n = $Arg->getColumnDimension(); - $nu = min($this->m, $this->n); - $e = array(); - $work = array(); - $wantu = true; - $wantv = true; - $nct = min($this->m - 1, $this->n); - $nrt = max(0, min($this->n - 2, $this->m)); - - // Reduce A to bidiagonal form, storing the diagonal elements - // in s and the super-diagonal elements in e. - for ($k = 0; $k < max($nct, $nrt); ++$k) { - if ($k < $nct) { - // Compute the transformation for the k-th column and - // place the k-th diagonal in s[$k]. - // Compute 2-norm of k-th column without under/overflow. - $this->s[$k] = 0; - for ($i = $k; $i < $this->m; ++$i) { - $this->s[$k] = hypo($this->s[$k], $A[$i][$k]); - } - if ($this->s[$k] != 0.0) { - if ($A[$k][$k] < 0.0) { - $this->s[$k] = -$this->s[$k]; - } - for ($i = $k; $i < $this->m; ++$i) { - $A[$i][$k] /= $this->s[$k]; - } - $A[$k][$k] += 1.0; - } - $this->s[$k] = -$this->s[$k]; - } - - for ($j = $k + 1; $j < $this->n; ++$j) { - if (($k < $nct) & ($this->s[$k] != 0.0)) { - // Apply the transformation. - $t = 0; - for ($i = $k; $i < $this->m; ++$i) { - $t += $A[$i][$k] * $A[$i][$j]; - } - $t = -$t / $A[$k][$k]; - for ($i = $k; $i < $this->m; ++$i) { - $A[$i][$j] += $t * $A[$i][$k]; - } - // Place the k-th row of A into e for the - // subsequent calculation of the row transformation. - $e[$j] = $A[$k][$j]; - } - } - - if ($wantu and ($k < $nct)) { - // Place the transformation in U for subsequent back - // multiplication. - for ($i = $k; $i < $this->m; ++$i) { - $this->U[$i][$k] = $A[$i][$k]; - } - } - - if ($k < $nrt) { - // Compute the k-th row transformation and place the - // k-th super-diagonal in e[$k]. - // Compute 2-norm without under/overflow. - $e[$k] = 0; - for ($i = $k + 1; $i < $this->n; ++$i) { - $e[$k] = hypo($e[$k], $e[$i]); - } - if ($e[$k] != 0.0) { - if ($e[$k+1] < 0.0) { - $e[$k] = -$e[$k]; - } - for ($i = $k + 1; $i < $this->n; ++$i) { - $e[$i] /= $e[$k]; - } - $e[$k+1] += 1.0; - } - $e[$k] = -$e[$k]; - if (($k+1 < $this->m) and ($e[$k] != 0.0)) { - // Apply the transformation. - for ($i = $k+1; $i < $this->m; ++$i) { - $work[$i] = 0.0; - } - for ($j = $k+1; $j < $this->n; ++$j) { - for ($i = $k+1; $i < $this->m; ++$i) { - $work[$i] += $e[$j] * $A[$i][$j]; - } - } - for ($j = $k + 1; $j < $this->n; ++$j) { - $t = -$e[$j] / $e[$k+1]; - for ($i = $k + 1; $i < $this->m; ++$i) { - $A[$i][$j] += $t * $work[$i]; - } - } - } - if ($wantv) { - // Place the transformation in V for subsequent - // back multiplication. - for ($i = $k + 1; $i < $this->n; ++$i) { - $this->V[$i][$k] = $e[$i]; - } - } - } - } - - // Set up the final bidiagonal matrix or order p. - $p = min($this->n, $this->m + 1); - if ($nct < $this->n) { - $this->s[$nct] = $A[$nct][$nct]; - } - if ($this->m < $p) { - $this->s[$p-1] = 0.0; - } - if ($nrt + 1 < $p) { - $e[$nrt] = $A[$nrt][$p-1]; - } - $e[$p-1] = 0.0; - // If required, generate U. - if ($wantu) { - for ($j = $nct; $j < $nu; ++$j) { - for ($i = 0; $i < $this->m; ++$i) { - $this->U[$i][$j] = 0.0; - } - $this->U[$j][$j] = 1.0; - } - for ($k = $nct - 1; $k >= 0; --$k) { - if ($this->s[$k] != 0.0) { - for ($j = $k + 1; $j < $nu; ++$j) { - $t = 0; - for ($i = $k; $i < $this->m; ++$i) { - $t += $this->U[$i][$k] * $this->U[$i][$j]; - } - $t = -$t / $this->U[$k][$k]; - for ($i = $k; $i < $this->m; ++$i) { - $this->U[$i][$j] += $t * $this->U[$i][$k]; - } - } - for ($i = $k; $i < $this->m; ++$i) { - $this->U[$i][$k] = -$this->U[$i][$k]; - } - $this->U[$k][$k] = 1.0 + $this->U[$k][$k]; - for ($i = 0; $i < $k - 1; ++$i) { - $this->U[$i][$k] = 0.0; - } - } else { - for ($i = 0; $i < $this->m; ++$i) { - $this->U[$i][$k] = 0.0; - } - $this->U[$k][$k] = 1.0; - } - } - } - - // If required, generate V. - if ($wantv) { - for ($k = $this->n - 1; $k >= 0; --$k) { - if (($k < $nrt) and ($e[$k] != 0.0)) { - for ($j = $k + 1; $j < $nu; ++$j) { - $t = 0; - for ($i = $k + 1; $i < $this->n; ++$i) { - $t += $this->V[$i][$k]* $this->V[$i][$j]; - } - $t = -$t / $this->V[$k+1][$k]; - for ($i = $k + 1; $i < $this->n; ++$i) { - $this->V[$i][$j] += $t * $this->V[$i][$k]; - } - } - } - for ($i = 0; $i < $this->n; ++$i) { - $this->V[$i][$k] = 0.0; - } - $this->V[$k][$k] = 1.0; - } - } - - // Main iteration loop for the singular values. - $pp = $p - 1; - $iter = 0; - $eps = pow(2.0, -52.0); - - while ($p > 0) { - // Here is where a test for too many iterations would go. - // This section of the program inspects for negligible - // elements in the s and e arrays. On completion the - // variables kase and k are set as follows: - // kase = 1 if s(p) and e[k-1] are negligible and k<p - // kase = 2 if s(k) is negligible and k<p - // kase = 3 if e[k-1] is negligible, k<p, and - // s(k), ..., s(p) are not negligible (qr step). - // kase = 4 if e(p-1) is negligible (convergence). - for ($k = $p - 2; $k >= -1; --$k) { - if ($k == -1) { - break; - } - if (abs($e[$k]) <= $eps * (abs($this->s[$k]) + abs($this->s[$k+1]))) { - $e[$k] = 0.0; - break; - } - } - if ($k == $p - 2) { - $kase = 4; - } else { - for ($ks = $p - 1; $ks >= $k; --$ks) { - if ($ks == $k) { - break; - } - $t = ($ks != $p ? abs($e[$ks]) : 0.) + ($ks != $k + 1 ? abs($e[$ks-1]) : 0.); - if (abs($this->s[$ks]) <= $eps * $t) { - $this->s[$ks] = 0.0; - break; - } - } - if ($ks == $k) { - $kase = 3; - } elseif ($ks == $p-1) { - $kase = 1; - } else { - $kase = 2; - $k = $ks; - } - } - ++$k; - - // Perform the task indicated by kase. - switch ($kase) { - // Deflate negligible s(p). - case 1: - $f = $e[$p-2]; - $e[$p-2] = 0.0; - for ($j = $p - 2; $j >= $k; --$j) { - $t = hypo($this->s[$j], $f); - $cs = $this->s[$j] / $t; - $sn = $f / $t; - $this->s[$j] = $t; - if ($j != $k) { - $f = -$sn * $e[$j-1]; - $e[$j-1] = $cs * $e[$j-1]; - } - if ($wantv) { - for ($i = 0; $i < $this->n; ++$i) { - $t = $cs * $this->V[$i][$j] + $sn * $this->V[$i][$p-1]; - $this->V[$i][$p-1] = -$sn * $this->V[$i][$j] + $cs * $this->V[$i][$p-1]; - $this->V[$i][$j] = $t; - } - } - } - break; - // Split at negligible s(k). - case 2: - $f = $e[$k-1]; - $e[$k-1] = 0.0; - for ($j = $k; $j < $p; ++$j) { - $t = hypo($this->s[$j], $f); - $cs = $this->s[$j] / $t; - $sn = $f / $t; - $this->s[$j] = $t; - $f = -$sn * $e[$j]; - $e[$j] = $cs * $e[$j]; - if ($wantu) { - for ($i = 0; $i < $this->m; ++$i) { - $t = $cs * $this->U[$i][$j] + $sn * $this->U[$i][$k-1]; - $this->U[$i][$k-1] = -$sn * $this->U[$i][$j] + $cs * $this->U[$i][$k-1]; - $this->U[$i][$j] = $t; - } - } - } - break; - // Perform one qr step. - case 3: - // Calculate the shift. - $scale = max(max(max(max(abs($this->s[$p-1]), abs($this->s[$p-2])), abs($e[$p-2])), abs($this->s[$k])), abs($e[$k])); - $sp = $this->s[$p-1] / $scale; - $spm1 = $this->s[$p-2] / $scale; - $epm1 = $e[$p-2] / $scale; - $sk = $this->s[$k] / $scale; - $ek = $e[$k] / $scale; - $b = (($spm1 + $sp) * ($spm1 - $sp) + $epm1 * $epm1) / 2.0; - $c = ($sp * $epm1) * ($sp * $epm1); - $shift = 0.0; - if (($b != 0.0) || ($c != 0.0)) { - $shift = sqrt($b * $b + $c); - if ($b < 0.0) { - $shift = -$shift; - } - $shift = $c / ($b + $shift); - } - $f = ($sk + $sp) * ($sk - $sp) + $shift; - $g = $sk * $ek; - // Chase zeros. - for ($j = $k; $j < $p-1; ++$j) { - $t = hypo($f, $g); - $cs = $f/$t; - $sn = $g/$t; - if ($j != $k) { - $e[$j-1] = $t; - } - $f = $cs * $this->s[$j] + $sn * $e[$j]; - $e[$j] = $cs * $e[$j] - $sn * $this->s[$j]; - $g = $sn * $this->s[$j+1]; - $this->s[$j+1] = $cs * $this->s[$j+1]; - if ($wantv) { - for ($i = 0; $i < $this->n; ++$i) { - $t = $cs * $this->V[$i][$j] + $sn * $this->V[$i][$j+1]; - $this->V[$i][$j+1] = -$sn * $this->V[$i][$j] + $cs * $this->V[$i][$j+1]; - $this->V[$i][$j] = $t; - } - } - $t = hypo($f, $g); - $cs = $f/$t; - $sn = $g/$t; - $this->s[$j] = $t; - $f = $cs * $e[$j] + $sn * $this->s[$j+1]; - $this->s[$j+1] = -$sn * $e[$j] + $cs * $this->s[$j+1]; - $g = $sn * $e[$j+1]; - $e[$j+1] = $cs * $e[$j+1]; - if ($wantu && ($j < $this->m - 1)) { - for ($i = 0; $i < $this->m; ++$i) { - $t = $cs * $this->U[$i][$j] + $sn * $this->U[$i][$j+1]; - $this->U[$i][$j+1] = -$sn * $this->U[$i][$j] + $cs * $this->U[$i][$j+1]; - $this->U[$i][$j] = $t; - } - } - } - $e[$p-2] = $f; - $iter = $iter + 1; - break; - // Convergence. - case 4: - // Make the singular values positive. - if ($this->s[$k] <= 0.0) { - $this->s[$k] = ($this->s[$k] < 0.0 ? -$this->s[$k] : 0.0); - if ($wantv) { - for ($i = 0; $i <= $pp; ++$i) { - $this->V[$i][$k] = -$this->V[$i][$k]; - } - } - } - // Order the singular values. - while ($k < $pp) { - if ($this->s[$k] >= $this->s[$k+1]) { - break; - } - $t = $this->s[$k]; - $this->s[$k] = $this->s[$k+1]; - $this->s[$k+1] = $t; - if ($wantv and ($k < $this->n - 1)) { - for ($i = 0; $i < $this->n; ++$i) { - $t = $this->V[$i][$k+1]; - $this->V[$i][$k+1] = $this->V[$i][$k]; - $this->V[$i][$k] = $t; - } - } - if ($wantu and ($k < $this->m-1)) { - for ($i = 0; $i < $this->m; ++$i) { - $t = $this->U[$i][$k+1]; - $this->U[$i][$k+1] = $this->U[$i][$k]; - $this->U[$i][$k] = $t; - } - } - ++$k; - } - $iter = 0; - --$p; - break; - } // end switch - } // end while - - } // end constructor - - - /** - * Return the left singular vectors - * - * @access public - * @return U - */ - public function getU() - { - return new Matrix($this->U, $this->m, min($this->m + 1, $this->n)); - } - - - /** - * Return the right singular vectors - * - * @access public - * @return V - */ - public function getV() - { - return new Matrix($this->V); - } - - - /** - * Return the one-dimensional array of singular values - * - * @access public - * @return diagonal of S. - */ - public function getSingularValues() - { - return $this->s; - } - - - /** - * Return the diagonal matrix of singular values - * - * @access public - * @return S - */ - public function getS() - { - for ($i = 0; $i < $this->n; ++$i) { - for ($j = 0; $j < $this->n; ++$j) { - $S[$i][$j] = 0.0; - } - $S[$i][$i] = $this->s[$i]; - } - return new Matrix($S); - } - - - /** - * Two norm - * - * @access public - * @return max(S) - */ - public function norm2() - { - return $this->s[0]; - } - - - /** - * Two norm condition number - * - * @access public - * @return max(S)/min(S) - */ - public function cond() - { - return $this->s[0] / $this->s[min($this->m, $this->n) - 1]; - } - - - /** - * Effective numerical matrix rank - * - * @access public - * @return Number of nonnegligible singular values. - */ - public function rank() - { - $eps = pow(2.0, -52.0); - $tol = max($this->m, $this->n) * $this->s[0] * $eps; - $r = 0; - for ($i = 0; $i < count($this->s); ++$i) { - if ($this->s[$i] > $tol) { - ++$r; - } - } - return $r; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/utils/Error.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/utils/Error.php deleted file mode 100644 index 71b8c99..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/utils/Error.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/** - * @package JAMA - * - * Error handling - * @author Michael Bommarito - * @version 01292005 - */ - -//Language constant -define('JAMALANG', 'EN'); - - -//All errors may be defined by the following format: -//define('ExceptionName', N); -//$error['lang'][ExceptionName] = 'Error message'; -$error = array(); - -/* -I've used Babelfish and a little poor knowledge of Romance/Germanic languages for the translations here. -Feel free to correct anything that looks amiss to you. -*/ - -define('POLYMORPHIC_ARGUMENT_EXCEPTION', -1); -$error['EN'][POLYMORPHIC_ARGUMENT_EXCEPTION] = "Invalid argument pattern for polymorphic function."; -$error['FR'][POLYMORPHIC_ARGUMENT_EXCEPTION] = "Modèle inadmissible d'argument pour la fonction polymorphe.". -$error['DE'][POLYMORPHIC_ARGUMENT_EXCEPTION] = "Unzulässiges Argumentmuster für polymorphe Funktion."; - -define('ARGUMENT_TYPE_EXCEPTION', -2); -$error['EN'][ARGUMENT_TYPE_EXCEPTION] = "Invalid argument type."; -$error['FR'][ARGUMENT_TYPE_EXCEPTION] = "Type inadmissible d'argument."; -$error['DE'][ARGUMENT_TYPE_EXCEPTION] = "Unzulässige Argumentart."; - -define('ARGUMENT_BOUNDS_EXCEPTION', -3); -$error['EN'][ARGUMENT_BOUNDS_EXCEPTION] = "Invalid argument range."; -$error['FR'][ARGUMENT_BOUNDS_EXCEPTION] = "Gamme inadmissible d'argument."; -$error['DE'][ARGUMENT_BOUNDS_EXCEPTION] = "Unzulässige Argumentstrecke."; - -define('MATRIX_DIMENSION_EXCEPTION', -4); -$error['EN'][MATRIX_DIMENSION_EXCEPTION] = "Matrix dimensions are not equal."; -$error['FR'][MATRIX_DIMENSION_EXCEPTION] = "Les dimensions de Matrix ne sont pas égales."; -$error['DE'][MATRIX_DIMENSION_EXCEPTION] = "Matrixmaße sind nicht gleich."; - -define('PRECISION_LOSS_EXCEPTION', -5); -$error['EN'][PRECISION_LOSS_EXCEPTION] = "Significant precision loss detected."; -$error['FR'][PRECISION_LOSS_EXCEPTION] = "Perte significative de précision détectée."; -$error['DE'][PRECISION_LOSS_EXCEPTION] = "Bedeutender Präzision Verlust ermittelte."; - -define('MATRIX_SPD_EXCEPTION', -6); -$error['EN'][MATRIX_SPD_EXCEPTION] = "Can only perform operation on symmetric positive definite matrix."; -$error['FR'][MATRIX_SPD_EXCEPTION] = "Perte significative de précision détectée."; -$error['DE'][MATRIX_SPD_EXCEPTION] = "Bedeutender Präzision Verlust ermittelte."; - -define('MATRIX_SINGULAR_EXCEPTION', -7); -$error['EN'][MATRIX_SINGULAR_EXCEPTION] = "Can only perform operation on singular matrix."; - -define('MATRIX_RANK_EXCEPTION', -8); -$error['EN'][MATRIX_RANK_EXCEPTION] = "Can only perform operation on full-rank matrix."; - -define('ARRAY_LENGTH_EXCEPTION', -9); -$error['EN'][ARRAY_LENGTH_EXCEPTION] = "Array length must be a multiple of m."; - -define('ROW_LENGTH_EXCEPTION', -10); -$error['EN'][ROW_LENGTH_EXCEPTION] = "All rows must have the same length."; - -/** - * Custom error handler - * @param int $num Error number - */ -function JAMAError($errorNumber = null) -{ - global $error; - - if (isset($errorNumber)) { - if (isset($error[JAMALANG][$errorNumber])) { - return $error[JAMALANG][$errorNumber]; - } else { - return $error['EN'][$errorNumber]; - } - } else { - return ("Invalid argument to JAMAError()"); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/utils/Maths.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/utils/Maths.php deleted file mode 100644 index 386c1e6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/utils/Maths.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -/** - * @package JAMA - * - * Pythagorean Theorem: - * - * a = 3 - * b = 4 - * r = sqrt(square(a) + square(b)) - * r = 5 - * - * r = sqrt(a^2 + b^2) without under/overflow. - */ -function hypo($a, $b) -{ - if (abs($a) > abs($b)) { - $r = $b / $a; - $r = abs($a) * sqrt(1 + $r * $r); - } elseif ($b != 0) { - $r = $a / $b; - $r = abs($b) * sqrt(1 + $r * $r); - } else { - $r = 0.0; - } - return $r; -} // function hypo() - - -/** - * Mike Bommarito's version. - * Compute n-dimensional hyotheneuse. - * -function hypot() { - $s = 0; - foreach (func_get_args() as $d) { - if (is_numeric($d)) { - $s += pow($d, 2); - } else { - throw new PHPExcel_Calculation_Exception(JAMAError(ARGUMENT_TYPE_EXCEPTION)); - } - } - return sqrt($s); -} -*/ diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE.php deleted file mode 100644 index 42a3c52..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE.php +++ /dev/null @@ -1,526 +0,0 @@ -<?php -/* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP Version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2002 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 2.02 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | -// | http://www.php.net/license/2_02.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Author: Xavier Noguer <xnoguer@php.net> | -// | Based on OLE::Storage_Lite by Kawai, Takanori | -// +----------------------------------------------------------------------+ -// -// $Id: OLE.php,v 1.13 2007/03/07 14:38:25 schmidt Exp $ - - -/** -* Array for storing OLE instances that are accessed from -* OLE_ChainedBlockStream::stream_open(). -* @var array -*/ -$GLOBALS['_OLE_INSTANCES'] = array(); - -/** -* OLE package base class. -* -* @author Xavier Noguer <xnoguer@php.net> -* @author Christian Schmidt <schmidt@php.net> -* @category PHPExcel -* @package PHPExcel_Shared_OLE -*/ -class PHPExcel_Shared_OLE -{ - const OLE_PPS_TYPE_ROOT = 5; - const OLE_PPS_TYPE_DIR = 1; - const OLE_PPS_TYPE_FILE = 2; - const OLE_DATA_SIZE_SMALL = 0x1000; - const OLE_LONG_INT_SIZE = 4; - const OLE_PPS_SIZE = 0x80; - - /** - * The file handle for reading an OLE container - * @var resource - */ - public $_file_handle; - - /** - * Array of PPS's found on the OLE container - * @var array - */ - public $_list = array(); - - /** - * Root directory of OLE container - * @var OLE_PPS_Root - */ - public $root; - - /** - * Big Block Allocation Table - * @var array (blockId => nextBlockId) - */ - public $bbat; - - /** - * Short Block Allocation Table - * @var array (blockId => nextBlockId) - */ - public $sbat; - - /** - * Size of big blocks. This is usually 512. - * @var int number of octets per block. - */ - public $bigBlockSize; - - /** - * Size of small blocks. This is usually 64. - * @var int number of octets per block - */ - public $smallBlockSize; - - /** - * Reads an OLE container from the contents of the file given. - * - * @acces public - * @param string $file - * @return mixed true on success, PEAR_Error on failure - */ - public function read($file) - { - $fh = fopen($file, "r"); - if (!$fh) { - throw new PHPExcel_Reader_Exception("Can't open file $file"); - } - $this->_file_handle = $fh; - - $signature = fread($fh, 8); - if ("\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" != $signature) { - throw new PHPExcel_Reader_Exception("File doesn't seem to be an OLE container."); - } - fseek($fh, 28); - if (fread($fh, 2) != "\xFE\xFF") { - // This shouldn't be a problem in practice - throw new PHPExcel_Reader_Exception("Only Little-Endian encoding is supported."); - } - // Size of blocks and short blocks in bytes - $this->bigBlockSize = pow(2, self::_readInt2($fh)); - $this->smallBlockSize = pow(2, self::_readInt2($fh)); - - // Skip UID, revision number and version number - fseek($fh, 44); - // Number of blocks in Big Block Allocation Table - $bbatBlockCount = self::_readInt4($fh); - - // Root chain 1st block - $directoryFirstBlockId = self::_readInt4($fh); - - // Skip unused bytes - fseek($fh, 56); - // Streams shorter than this are stored using small blocks - $this->bigBlockThreshold = self::_readInt4($fh); - // Block id of first sector in Short Block Allocation Table - $sbatFirstBlockId = self::_readInt4($fh); - // Number of blocks in Short Block Allocation Table - $sbbatBlockCount = self::_readInt4($fh); - // Block id of first sector in Master Block Allocation Table - $mbatFirstBlockId = self::_readInt4($fh); - // Number of blocks in Master Block Allocation Table - $mbbatBlockCount = self::_readInt4($fh); - $this->bbat = array(); - - // Remaining 4 * 109 bytes of current block is beginning of Master - // Block Allocation Table - $mbatBlocks = array(); - for ($i = 0; $i < 109; ++$i) { - $mbatBlocks[] = self::_readInt4($fh); - } - - // Read rest of Master Block Allocation Table (if any is left) - $pos = $this->_getBlockOffset($mbatFirstBlockId); - for ($i = 0; $i < $mbbatBlockCount; ++$i) { - fseek($fh, $pos); - for ($j = 0; $j < $this->bigBlockSize / 4 - 1; ++$j) { - $mbatBlocks[] = self::_readInt4($fh); - } - // Last block id in each block points to next block - $pos = $this->_getBlockOffset(self::_readInt4($fh)); - } - - // Read Big Block Allocation Table according to chain specified by - // $mbatBlocks - for ($i = 0; $i < $bbatBlockCount; ++$i) { - $pos = $this->_getBlockOffset($mbatBlocks[$i]); - fseek($fh, $pos); - for ($j = 0; $j < $this->bigBlockSize / 4; ++$j) { - $this->bbat[] = self::_readInt4($fh); - } - } - - // Read short block allocation table (SBAT) - $this->sbat = array(); - $shortBlockCount = $sbbatBlockCount * $this->bigBlockSize / 4; - $sbatFh = $this->getStream($sbatFirstBlockId); - for ($blockId = 0; $blockId < $shortBlockCount; ++$blockId) { - $this->sbat[$blockId] = self::_readInt4($sbatFh); - } - fclose($sbatFh); - - $this->_readPpsWks($directoryFirstBlockId); - - return true; - } - - /** - * @param int block id - * @param int byte offset from beginning of file - * @access public - */ - public function _getBlockOffset($blockId) - { - return 512 + $blockId * $this->bigBlockSize; - } - - /** - * Returns a stream for use with fread() etc. External callers should - * use PHPExcel_Shared_OLE_PPS_File::getStream(). - * @param int|PPS block id or PPS - * @return resource read-only stream - */ - public function getStream($blockIdOrPps) - { - static $isRegistered = false; - if (!$isRegistered) { - stream_wrapper_register('ole-chainedblockstream', 'PHPExcel_Shared_OLE_ChainedBlockStream'); - $isRegistered = true; - } - - // Store current instance in global array, so that it can be accessed - // in OLE_ChainedBlockStream::stream_open(). - // Object is removed from self::$instances in OLE_Stream::close(). - $GLOBALS['_OLE_INSTANCES'][] = $this; - $instanceId = end(array_keys($GLOBALS['_OLE_INSTANCES'])); - - $path = 'ole-chainedblockstream://oleInstanceId=' . $instanceId; - if ($blockIdOrPps instanceof PHPExcel_Shared_OLE_PPS) { - $path .= '&blockId=' . $blockIdOrPps->_StartBlock; - $path .= '&size=' . $blockIdOrPps->Size; - } else { - $path .= '&blockId=' . $blockIdOrPps; - } - return fopen($path, 'r'); - } - - /** - * Reads a signed char. - * @param resource file handle - * @return int - * @access public - */ - private static function _readInt1($fh) - { - list(, $tmp) = unpack("c", fread($fh, 1)); - return $tmp; - } - - /** - * Reads an unsigned short (2 octets). - * @param resource file handle - * @return int - * @access public - */ - private static function _readInt2($fh) - { - list(, $tmp) = unpack("v", fread($fh, 2)); - return $tmp; - } - - /** - * Reads an unsigned long (4 octets). - * @param resource file handle - * @return int - * @access public - */ - private static function _readInt4($fh) - { - list(, $tmp) = unpack("V", fread($fh, 4)); - return $tmp; - } - - /** - * Gets information about all PPS's on the OLE container from the PPS WK's - * creates an OLE_PPS object for each one. - * - * @access public - * @param integer the block id of the first block - * @return mixed true on success, PEAR_Error on failure - */ - public function _readPpsWks($blockId) - { - $fh = $this->getStream($blockId); - for ($pos = 0;; $pos += 128) { - fseek($fh, $pos, SEEK_SET); - $nameUtf16 = fread($fh, 64); - $nameLength = self::_readInt2($fh); - $nameUtf16 = substr($nameUtf16, 0, $nameLength - 2); - // Simple conversion from UTF-16LE to ISO-8859-1 - $name = str_replace("\x00", "", $nameUtf16); - $type = self::_readInt1($fh); - switch ($type) { - case self::OLE_PPS_TYPE_ROOT: - $pps = new PHPExcel_Shared_OLE_PPS_Root(null, null, array()); - $this->root = $pps; - break; - case self::OLE_PPS_TYPE_DIR: - $pps = new PHPExcel_Shared_OLE_PPS(null, null, null, null, null, null, null, null, null, array()); - break; - case self::OLE_PPS_TYPE_FILE: - $pps = new PHPExcel_Shared_OLE_PPS_File($name); - break; - default: - continue; - } - fseek($fh, 1, SEEK_CUR); - $pps->Type = $type; - $pps->Name = $name; - $pps->PrevPps = self::_readInt4($fh); - $pps->NextPps = self::_readInt4($fh); - $pps->DirPps = self::_readInt4($fh); - fseek($fh, 20, SEEK_CUR); - $pps->Time1st = self::OLE2LocalDate(fread($fh, 8)); - $pps->Time2nd = self::OLE2LocalDate(fread($fh, 8)); - $pps->_StartBlock = self::_readInt4($fh); - $pps->Size = self::_readInt4($fh); - $pps->No = count($this->_list); - $this->_list[] = $pps; - - // check if the PPS tree (starting from root) is complete - if (isset($this->root) && $this->_ppsTreeComplete($this->root->No)) { - break; - } - } - fclose($fh); - - // Initialize $pps->children on directories - foreach ($this->_list as $pps) { - if ($pps->Type == self::OLE_PPS_TYPE_DIR || $pps->Type == self::OLE_PPS_TYPE_ROOT) { - $nos = array($pps->DirPps); - $pps->children = array(); - while ($nos) { - $no = array_pop($nos); - if ($no != -1) { - $childPps = $this->_list[$no]; - $nos[] = $childPps->PrevPps; - $nos[] = $childPps->NextPps; - $pps->children[] = $childPps; - } - } - } - } - - return true; - } - - /** - * It checks whether the PPS tree is complete (all PPS's read) - * starting with the given PPS (not necessarily root) - * - * @access public - * @param integer $index The index of the PPS from which we are checking - * @return boolean Whether the PPS tree for the given PPS is complete - */ - public function _ppsTreeComplete($index) - { - return isset($this->_list[$index]) && - ($pps = $this->_list[$index]) && - ($pps->PrevPps == -1 || - $this->_ppsTreeComplete($pps->PrevPps)) && - ($pps->NextPps == -1 || - $this->_ppsTreeComplete($pps->NextPps)) && - ($pps->DirPps == -1 || - $this->_ppsTreeComplete($pps->DirPps)); - } - - /** - * Checks whether a PPS is a File PPS or not. - * If there is no PPS for the index given, it will return false. - * - * @access public - * @param integer $index The index for the PPS - * @return bool true if it's a File PPS, false otherwise - */ - public function isFile($index) - { - if (isset($this->_list[$index])) { - return ($this->_list[$index]->Type == self::OLE_PPS_TYPE_FILE); - } - return false; - } - - /** - * Checks whether a PPS is a Root PPS or not. - * If there is no PPS for the index given, it will return false. - * - * @access public - * @param integer $index The index for the PPS. - * @return bool true if it's a Root PPS, false otherwise - */ - public function isRoot($index) - { - if (isset($this->_list[$index])) { - return ($this->_list[$index]->Type == self::OLE_PPS_TYPE_ROOT); - } - return false; - } - - /** - * Gives the total number of PPS's found in the OLE container. - * - * @access public - * @return integer The total number of PPS's found in the OLE container - */ - public function ppsTotal() - { - return count($this->_list); - } - - /** - * Gets data from a PPS - * If there is no PPS for the index given, it will return an empty string. - * - * @access public - * @param integer $index The index for the PPS - * @param integer $position The position from which to start reading - * (relative to the PPS) - * @param integer $length The amount of bytes to read (at most) - * @return string The binary string containing the data requested - * @see OLE_PPS_File::getStream() - */ - public function getData($index, $position, $length) - { - // if position is not valid return empty string - if (!isset($this->_list[$index]) || ($position >= $this->_list[$index]->Size) || ($position < 0)) { - return ''; - } - $fh = $this->getStream($this->_list[$index]); - $data = stream_get_contents($fh, $length, $position); - fclose($fh); - return $data; - } - - /** - * Gets the data length from a PPS - * If there is no PPS for the index given, it will return 0. - * - * @access public - * @param integer $index The index for the PPS - * @return integer The amount of bytes in data the PPS has - */ - public function getDataLength($index) - { - if (isset($this->_list[$index])) { - return $this->_list[$index]->Size; - } - return 0; - } - - /** - * Utility function to transform ASCII text to Unicode - * - * @access public - * @static - * @param string $ascii The ASCII string to transform - * @return string The string in Unicode - */ - public static function Asc2Ucs($ascii) - { - $rawname = ''; - for ($i = 0; $i < strlen($ascii); ++$i) { - $rawname .= $ascii{$i} . "\x00"; - } - return $rawname; - } - - /** - * Utility function - * Returns a string for the OLE container with the date given - * - * @access public - * @static - * @param integer $date A timestamp - * @return string The string for the OLE container - */ - public static function LocalDate2OLE($date = null) - { - if (!isset($date)) { - return "\x00\x00\x00\x00\x00\x00\x00\x00"; - } - - // factor used for separating numbers into 4 bytes parts - $factor = pow(2, 32); - - // days from 1-1-1601 until the beggining of UNIX era - $days = 134774; - // calculate seconds - $big_date = $days*24*3600 + gmmktime(date("H", $date), date("i", $date), date("s", $date), date("m", $date), date("d", $date), date("Y", $date)); - // multiply just to make MS happy - $big_date *= 10000000; - - $high_part = floor($big_date / $factor); - // lower 4 bytes - $low_part = floor((($big_date / $factor) - $high_part) * $factor); - - // Make HEX string - $res = ''; - - for ($i = 0; $i < 4; ++$i) { - $hex = $low_part % 0x100; - $res .= pack('c', $hex); - $low_part /= 0x100; - } - for ($i = 0; $i < 4; ++$i) { - $hex = $high_part % 0x100; - $res .= pack('c', $hex); - $high_part /= 0x100; - } - return $res; - } - - /** - * Returns a timestamp from an OLE container's date - * - * @access public - * @static - * @param integer $string A binary string with the encoded date - * @return string The timestamp corresponding to the string - */ - public static function OLE2LocalDate($string) - { - if (strlen($string) != 8) { - return new PEAR_Error("Expecting 8 byte string"); - } - - // factor used for separating numbers into 4 bytes parts - $factor = pow(2, 32); - list(, $high_part) = unpack('V', substr($string, 4, 4)); - list(, $low_part) = unpack('V', substr($string, 0, 4)); - - $big_date = ($high_part * $factor) + $low_part; - // translate to seconds - $big_date /= 10000000; - - // days from 1-1-1601 until the beggining of UNIX era - $days = 134774; - - // translate to seconds from beggining of UNIX era - $big_date -= $days * 24 * 3600; - return floor($big_date); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/ChainedBlockStream.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/ChainedBlockStream.php deleted file mode 100644 index 84d2cc5..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/ChainedBlockStream.php +++ /dev/null @@ -1,206 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_OLE_ChainedBlockStream - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_OLE - * @copyright Copyright (c) 2006 - 2007 Christian Schmidt - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_OLE_ChainedBlockStream -{ - /** - * The OLE container of the file that is being read. - * @var OLE - */ - public $ole; - - /** - * Parameters specified by fopen(). - * @var array - */ - public $params; - - /** - * The binary data of the file. - * @var string - */ - public $data; - - /** - * The file pointer. - * @var int byte offset - */ - public $pos; - - /** - * Implements support for fopen(). - * For creating streams using this wrapper, use OLE_PPS_File::getStream(). - * - * @param string $path resource name including scheme, e.g. - * ole-chainedblockstream://oleInstanceId=1 - * @param string $mode only "r" is supported - * @param int $options mask of STREAM_REPORT_ERRORS and STREAM_USE_PATH - * @param string &$openedPath absolute path of the opened stream (out parameter) - * @return bool true on success - */ - public function stream_open($path, $mode, $options, &$openedPath) - { - if ($mode != 'r') { - if ($options & STREAM_REPORT_ERRORS) { - trigger_error('Only reading is supported', E_USER_WARNING); - } - return false; - } - - // 25 is length of "ole-chainedblockstream://" - parse_str(substr($path, 25), $this->params); - if (!isset($this->params['oleInstanceId'], $this->params['blockId'], $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']])) { - if ($options & STREAM_REPORT_ERRORS) { - trigger_error('OLE stream not found', E_USER_WARNING); - } - return false; - } - $this->ole = $GLOBALS['_OLE_INSTANCES'][$this->params['oleInstanceId']]; - - $blockId = $this->params['blockId']; - $this->data = ''; - if (isset($this->params['size']) && $this->params['size'] < $this->ole->bigBlockThreshold && $blockId != $this->ole->root->_StartBlock) { - // Block id refers to small blocks - $rootPos = $this->ole->_getBlockOffset($this->ole->root->_StartBlock); - while ($blockId != -2) { - $pos = $rootPos + $blockId * $this->ole->bigBlockSize; - $blockId = $this->ole->sbat[$blockId]; - fseek($this->ole->_file_handle, $pos); - $this->data .= fread($this->ole->_file_handle, $this->ole->bigBlockSize); - } - } else { - // Block id refers to big blocks - while ($blockId != -2) { - $pos = $this->ole->_getBlockOffset($blockId); - fseek($this->ole->_file_handle, $pos); - $this->data .= fread($this->ole->_file_handle, $this->ole->bigBlockSize); - $blockId = $this->ole->bbat[$blockId]; - } - } - if (isset($this->params['size'])) { - $this->data = substr($this->data, 0, $this->params['size']); - } - - if ($options & STREAM_USE_PATH) { - $openedPath = $path; - } - - return true; - } - - /** - * Implements support for fclose(). - * - */ - public function stream_close() - { - $this->ole = null; - unset($GLOBALS['_OLE_INSTANCES']); - } - - /** - * Implements support for fread(), fgets() etc. - * - * @param int $count maximum number of bytes to read - * @return string - */ - public function stream_read($count) - { - if ($this->stream_eof()) { - return false; - } - $s = substr($this->data, $this->pos, $count); - $this->pos += $count; - return $s; - } - - /** - * Implements support for feof(). - * - * @return bool TRUE if the file pointer is at EOF; otherwise FALSE - */ - public function stream_eof() - { - return $this->pos >= strlen($this->data); - } - - /** - * Returns the position of the file pointer, i.e. its offset into the file - * stream. Implements support for ftell(). - * - * @return int - */ - public function stream_tell() - { - return $this->pos; - } - - /** - * Implements support for fseek(). - * - * @param int $offset byte offset - * @param int $whence SEEK_SET, SEEK_CUR or SEEK_END - * @return bool - */ - public function stream_seek($offset, $whence) - { - if ($whence == SEEK_SET && $offset >= 0) { - $this->pos = $offset; - } elseif ($whence == SEEK_CUR && -$offset <= $this->pos) { - $this->pos += $offset; - } elseif ($whence == SEEK_END && -$offset <= sizeof($this->data)) { - $this->pos = strlen($this->data) + $offset; - } else { - return false; - } - return true; - } - - /** - * Implements support for fstat(). Currently the only supported field is - * "size". - * @return array - */ - public function stream_stat() - { - return array( - 'size' => strlen($this->data), - ); - } - - // Methods used by stream_wrapper_register() that are not implemented: - // bool stream_flush ( void ) - // int stream_write ( string data ) - // bool rename ( string path_from, string path_to ) - // bool mkdir ( string path, int mode, int options ) - // bool rmdir ( string path, int options ) - // bool dir_opendir ( string path, int options ) - // array url_stat ( string path, int flags ) - // string dir_readdir ( void ) - // bool dir_rewinddir ( void ) - // bool dir_closedir ( void ) -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS.php deleted file mode 100644 index 608a892..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS.php +++ /dev/null @@ -1,230 +0,0 @@ -<?php -/* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP Version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2002 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 2.02 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | -// | http://www.php.net/license/2_02.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Author: Xavier Noguer <xnoguer@php.net> | -// | Based on OLE::Storage_Lite by Kawai, Takanori | -// +----------------------------------------------------------------------+ -// -// $Id: PPS.php,v 1.7 2007/02/13 21:00:42 schmidt Exp $ - - -/** -* Class for creating PPS's for OLE containers -* -* @author Xavier Noguer <xnoguer@php.net> -* @category PHPExcel -* @package PHPExcel_Shared_OLE -*/ -class PHPExcel_Shared_OLE_PPS -{ - /** - * The PPS index - * @var integer - */ - public $No; - - /** - * The PPS name (in Unicode) - * @var string - */ - public $Name; - - /** - * The PPS type. Dir, Root or File - * @var integer - */ - public $Type; - - /** - * The index of the previous PPS - * @var integer - */ - public $PrevPps; - - /** - * The index of the next PPS - * @var integer - */ - public $NextPps; - - /** - * The index of it's first child if this is a Dir or Root PPS - * @var integer - */ - public $DirPps; - - /** - * A timestamp - * @var integer - */ - public $Time1st; - - /** - * A timestamp - * @var integer - */ - public $Time2nd; - - /** - * Starting block (small or big) for this PPS's data inside the container - * @var integer - */ - public $_StartBlock; - - /** - * The size of the PPS's data (in bytes) - * @var integer - */ - public $Size; - - /** - * The PPS's data (only used if it's not using a temporary file) - * @var string - */ - public $_data; - - /** - * Array of child PPS's (only used by Root and Dir PPS's) - * @var array - */ - public $children = array(); - - /** - * Pointer to OLE container - * @var OLE - */ - public $ole; - - /** - * The constructor - * - * @access public - * @param integer $No The PPS index - * @param string $name The PPS name - * @param integer $type The PPS type. Dir, Root or File - * @param integer $prev The index of the previous PPS - * @param integer $next The index of the next PPS - * @param integer $dir The index of it's first child if this is a Dir or Root PPS - * @param integer $time_1st A timestamp - * @param integer $time_2nd A timestamp - * @param string $data The (usually binary) source data of the PPS - * @param array $children Array containing children PPS for this PPS - */ - public function __construct($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children) - { - $this->No = $No; - $this->Name = $name; - $this->Type = $type; - $this->PrevPps = $prev; - $this->NextPps = $next; - $this->DirPps = $dir; - $this->Time1st = $time_1st; - $this->Time2nd = $time_2nd; - $this->_data = $data; - $this->children = $children; - if ($data != '') { - $this->Size = strlen($data); - } else { - $this->Size = 0; - } - } - - /** - * Returns the amount of data saved for this PPS - * - * @access public - * @return integer The amount of data (in bytes) - */ - public function _DataLen() - { - if (!isset($this->_data)) { - return 0; - } - //if (isset($this->_PPS_FILE)) { - // fseek($this->_PPS_FILE, 0); - // $stats = fstat($this->_PPS_FILE); - // return $stats[7]; - //} else { - return strlen($this->_data); - //} - } - - /** - * Returns a string with the PPS's WK (What is a WK?) - * - * @access public - * @return string The binary string - */ - public function _getPpsWk() - { - $ret = str_pad($this->Name, 64, "\x00"); - - $ret .= pack("v", strlen($this->Name) + 2) // 66 - . pack("c", $this->Type) // 67 - . pack("c", 0x00) //UK // 68 - . pack("V", $this->PrevPps) //Prev // 72 - . pack("V", $this->NextPps) //Next // 76 - . pack("V", $this->DirPps) //Dir // 80 - . "\x00\x09\x02\x00" // 84 - . "\x00\x00\x00\x00" // 88 - . "\xc0\x00\x00\x00" // 92 - . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root - . "\x00\x00\x00\x00" // 100 - . PHPExcel_Shared_OLE::LocalDate2OLE($this->Time1st) // 108 - . PHPExcel_Shared_OLE::LocalDate2OLE($this->Time2nd) // 116 - . pack("V", isset($this->_StartBlock)? - $this->_StartBlock:0) // 120 - . pack("V", $this->Size) // 124 - . pack("V", 0); // 128 - return $ret; - } - - /** - * Updates index and pointers to previous, next and children PPS's for this - * PPS. I don't think it'll work with Dir PPS's. - * - * @access public - * @param array &$raList Reference to the array of PPS's for the whole OLE - * container - * @return integer The index for this PPS - */ - public static function _savePpsSetPnt(&$raList, $to_save, $depth = 0) - { - if (!is_array($to_save) || (empty($to_save))) { - return 0xFFFFFFFF; - } elseif (count($to_save) == 1) { - $cnt = count($raList); - // If the first entry, it's the root... Don't clone it! - $raList[$cnt] = ( $depth == 0 ) ? $to_save[0] : clone $to_save[0]; - $raList[$cnt]->No = $cnt; - $raList[$cnt]->PrevPps = 0xFFFFFFFF; - $raList[$cnt]->NextPps = 0xFFFFFFFF; - $raList[$cnt]->DirPps = self::_savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++); - } else { - $iPos = floor(count($to_save) / 2); - $aPrev = array_slice($to_save, 0, $iPos); - $aNext = array_slice($to_save, $iPos + 1); - $cnt = count($raList); - // If the first entry, it's the root... Don't clone it! - $raList[$cnt] = ( $depth == 0 ) ? $to_save[$iPos] : clone $to_save[$iPos]; - $raList[$cnt]->No = $cnt; - $raList[$cnt]->PrevPps = self::_savePpsSetPnt($raList, $aPrev, $depth++); - $raList[$cnt]->NextPps = self::_savePpsSetPnt($raList, $aNext, $depth++); - $raList[$cnt]->DirPps = self::_savePpsSetPnt($raList, @$raList[$cnt]->children, $depth++); - - } - return $cnt; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS/File.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS/File.php deleted file mode 100644 index 1ca337c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS/File.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -/* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP Version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2002 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 2.02 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | -// | http://www.php.net/license/2_02.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Author: Xavier Noguer <xnoguer@php.net> | -// | Based on OLE::Storage_Lite by Kawai, Takanori | -// +----------------------------------------------------------------------+ -// -// $Id: File.php,v 1.11 2007/02/13 21:00:42 schmidt Exp $ - - -/** -* Class for creating File PPS's for OLE containers -* -* @author Xavier Noguer <xnoguer@php.net> -* @category PHPExcel -* @package PHPExcel_Shared_OLE -*/ -class PHPExcel_Shared_OLE_PPS_File extends PHPExcel_Shared_OLE_PPS -{ - /** - * The constructor - * - * @access public - * @param string $name The name of the file (in Unicode) - * @see OLE::Asc2Ucs() - */ - public function __construct($name) - { - parent::__construct(null, $name, PHPExcel_Shared_OLE::OLE_PPS_TYPE_FILE, null, null, null, null, null, '', array()); - } - - /** - * Initialization method. Has to be called right after OLE_PPS_File(). - * - * @access public - * @return mixed true on success - */ - public function init() - { - return true; - } - - /** - * Append data to PPS - * - * @access public - * @param string $data The data to append - */ - public function append($data) - { - $this->_data .= $data; - } - - /** - * Returns a stream for reading this file using fread() etc. - * @return resource a read-only stream - */ - public function getStream() - { - $this->ole->getStream($this); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS/Root.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS/Root.php deleted file mode 100644 index 5d4052f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLE/PPS/Root.php +++ /dev/null @@ -1,462 +0,0 @@ -<?php -/* vim: set expandtab tabstop=4 shiftwidth=4: */ -// +----------------------------------------------------------------------+ -// | PHP Version 4 | -// +----------------------------------------------------------------------+ -// | Copyright (c) 1997-2002 The PHP Group | -// +----------------------------------------------------------------------+ -// | This source file is subject to version 2.02 of the PHP license, | -// | that is bundled with this package in the file LICENSE, and is | -// | available at through the world-wide-web at | -// | http://www.php.net/license/2_02.txt. | -// | If you did not receive a copy of the PHP license and are unable to | -// | obtain it through the world-wide-web, please send a note to | -// | license@php.net so we can mail you a copy immediately. | -// +----------------------------------------------------------------------+ -// | Author: Xavier Noguer <xnoguer@php.net> | -// | Based on OLE::Storage_Lite by Kawai, Takanori | -// +----------------------------------------------------------------------+ -// -// $Id: Root.php,v 1.9 2005/04/23 21:53:49 dufuz Exp $ - - -/** -* Class for creating Root PPS's for OLE containers -* -* @author Xavier Noguer <xnoguer@php.net> -* @category PHPExcel -* @package PHPExcel_Shared_OLE -*/ -class PHPExcel_Shared_OLE_PPS_Root extends PHPExcel_Shared_OLE_PPS -{ - - /** - * Directory for temporary files - * @var string - */ - protected $tempDirectory = null; - - /** - * @param integer $time_1st A timestamp - * @param integer $time_2nd A timestamp - */ - public function __construct($time_1st, $time_2nd, $raChild) - { - $this->_tempDir = PHPExcel_Shared_File::sys_get_temp_dir(); - - parent::__construct(null, PHPExcel_Shared_OLE::Asc2Ucs('Root Entry'), PHPExcel_Shared_OLE::OLE_PPS_TYPE_ROOT, null, null, null, $time_1st, $time_2nd, null, $raChild); - } - - /** - * Method for saving the whole OLE container (including files). - * In fact, if called with an empty argument (or '-'), it saves to a - * temporary file and then outputs it's contents to stdout. - * If a resource pointer to a stream created by fopen() is passed - * it will be used, but you have to close such stream by yourself. - * - * @param string|resource $filename The name of the file or stream where to save the OLE container. - * @access public - * @return mixed true on success - */ - public function save($filename) - { - // Initial Setting for saving - $this->_BIG_BLOCK_SIZE = pow( - 2, - (isset($this->_BIG_BLOCK_SIZE))? self::adjust2($this->_BIG_BLOCK_SIZE) : 9 - ); - $this->_SMALL_BLOCK_SIZE= pow( - 2, - (isset($this->_SMALL_BLOCK_SIZE))? self::adjust2($this->_SMALL_BLOCK_SIZE) : 6 - ); - - if (is_resource($filename)) { - $this->_FILEH_ = $filename; - } elseif ($filename == '-' || $filename == '') { - if ($this->tempDirectory === null) { - $this->tempDirectory = PHPExcel_Shared_File::sys_get_temp_dir(); - } - $this->_tmp_filename = tempnam($this->tempDirectory, "OLE_PPS_Root"); - $this->_FILEH_ = fopen($this->_tmp_filename, "w+b"); - if ($this->_FILEH_ == false) { - throw new PHPExcel_Writer_Exception("Can't create temporary file."); - } - } else { - $this->_FILEH_ = fopen($filename, "wb"); - } - if ($this->_FILEH_ == false) { - throw new PHPExcel_Writer_Exception("Can't open $filename. It may be in use or protected."); - } - // Make an array of PPS's (for Save) - $aList = array(); - PHPExcel_Shared_OLE_PPS::_savePpsSetPnt($aList, array($this)); - // calculate values for header - list($iSBDcnt, $iBBcnt, $iPPScnt) = $this->_calcSize($aList); //, $rhInfo); - // Save Header - $this->_saveHeader($iSBDcnt, $iBBcnt, $iPPScnt); - - // Make Small Data string (write SBD) - $this->_data = $this->_makeSmallData($aList); - - // Write BB - $this->_saveBigData($iSBDcnt, $aList); - // Write PPS - $this->_savePps($aList); - // Write Big Block Depot and BDList and Adding Header informations - $this->_saveBbd($iSBDcnt, $iBBcnt, $iPPScnt); - - if (!is_resource($filename)) { - fclose($this->_FILEH_); - } - - return true; - } - - /** - * Calculate some numbers - * - * @access public - * @param array $raList Reference to an array of PPS's - * @return array The array of numbers - */ - public function _calcSize(&$raList) - { - // Calculate Basic Setting - list($iSBDcnt, $iBBcnt, $iPPScnt) = array(0,0,0); - $iSmallLen = 0; - $iSBcnt = 0; - $iCount = count($raList); - for ($i = 0; $i < $iCount; ++$i) { - if ($raList[$i]->Type == PHPExcel_Shared_OLE::OLE_PPS_TYPE_FILE) { - $raList[$i]->Size = $raList[$i]->_DataLen(); - if ($raList[$i]->Size < PHPExcel_Shared_OLE::OLE_DATA_SIZE_SMALL) { - $iSBcnt += floor($raList[$i]->Size / $this->_SMALL_BLOCK_SIZE) - + (($raList[$i]->Size % $this->_SMALL_BLOCK_SIZE)? 1: 0); - } else { - $iBBcnt += (floor($raList[$i]->Size / $this->_BIG_BLOCK_SIZE) + - (($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)? 1: 0)); - } - } - } - $iSmallLen = $iSBcnt * $this->_SMALL_BLOCK_SIZE; - $iSlCnt = floor($this->_BIG_BLOCK_SIZE / PHPExcel_Shared_OLE::OLE_LONG_INT_SIZE); - $iSBDcnt = floor($iSBcnt / $iSlCnt) + (($iSBcnt % $iSlCnt)? 1:0); - $iBBcnt += (floor($iSmallLen / $this->_BIG_BLOCK_SIZE) + - (( $iSmallLen % $this->_BIG_BLOCK_SIZE)? 1: 0)); - $iCnt = count($raList); - $iBdCnt = $this->_BIG_BLOCK_SIZE / PHPExcel_Shared_OLE::OLE_PPS_SIZE; - $iPPScnt = (floor($iCnt/$iBdCnt) + (($iCnt % $iBdCnt)? 1: 0)); - - return array($iSBDcnt, $iBBcnt, $iPPScnt); - } - - /** - * Helper function for caculating a magic value for block sizes - * - * @access public - * @param integer $i2 The argument - * @see save() - * @return integer - */ - private static function adjust2($i2) - { - $iWk = log($i2)/log(2); - return ($iWk > floor($iWk))? floor($iWk)+1:$iWk; - } - - /** - * Save OLE header - * - * @access public - * @param integer $iSBDcnt - * @param integer $iBBcnt - * @param integer $iPPScnt - */ - public function _saveHeader($iSBDcnt, $iBBcnt, $iPPScnt) - { - $FILE = $this->_FILEH_; - - // Calculate Basic Setting - $iBlCnt = $this->_BIG_BLOCK_SIZE / PHPExcel_Shared_OLE::OLE_LONG_INT_SIZE; - $i1stBdL = ($this->_BIG_BLOCK_SIZE - 0x4C) / PHPExcel_Shared_OLE::OLE_LONG_INT_SIZE; - - $iBdExL = 0; - $iAll = $iBBcnt + $iPPScnt + $iSBDcnt; - $iAllW = $iAll; - $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt)? 1: 0); - $iBdCnt = floor(($iAll + $iBdCntW) / $iBlCnt) + ((($iAllW+$iBdCntW) % $iBlCnt)? 1: 0); - - // Calculate BD count - if ($iBdCnt > $i1stBdL) { - while (1) { - ++$iBdExL; - ++$iAllW; - $iBdCntW = floor($iAllW / $iBlCnt) + (($iAllW % $iBlCnt)? 1: 0); - $iBdCnt = floor(($iAllW + $iBdCntW) / $iBlCnt) + ((($iAllW+$iBdCntW) % $iBlCnt)? 1: 0); - if ($iBdCnt <= ($iBdExL*$iBlCnt+ $i1stBdL)) { - break; - } - } - } - - // Save Header - fwrite( - $FILE, - "\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1" - . "\x00\x00\x00\x00" - . "\x00\x00\x00\x00" - . "\x00\x00\x00\x00" - . "\x00\x00\x00\x00" - . pack("v", 0x3b) - . pack("v", 0x03) - . pack("v", -2) - . pack("v", 9) - . pack("v", 6) - . pack("v", 0) - . "\x00\x00\x00\x00" - . "\x00\x00\x00\x00" - . pack("V", $iBdCnt) - . pack("V", $iBBcnt+$iSBDcnt) //ROOT START - . pack("V", 0) - . pack("V", 0x1000) - . pack("V", $iSBDcnt ? 0 : -2) //Small Block Depot - . pack("V", $iSBDcnt) - ); - // Extra BDList Start, Count - if ($iBdCnt < $i1stBdL) { - fwrite( - $FILE, - pack("V", -2) // Extra BDList Start - . pack("V", 0)// Extra BDList Count - ); - } else { - fwrite($FILE, pack("V", $iAll+$iBdCnt) . pack("V", $iBdExL)); - } - - // BDList - for ($i = 0; $i < $i1stBdL && $i < $iBdCnt; ++$i) { - fwrite($FILE, pack("V", $iAll+$i)); - } - if ($i < $i1stBdL) { - $jB = $i1stBdL - $i; - for ($j = 0; $j < $jB; ++$j) { - fwrite($FILE, (pack("V", -1))); - } - } - } - - /** - * Saving big data (PPS's with data bigger than PHPExcel_Shared_OLE::OLE_DATA_SIZE_SMALL) - * - * @access public - * @param integer $iStBlk - * @param array &$raList Reference to array of PPS's - */ - public function _saveBigData($iStBlk, &$raList) - { - $FILE = $this->_FILEH_; - - // cycle through PPS's - $iCount = count($raList); - for ($i = 0; $i < $iCount; ++$i) { - if ($raList[$i]->Type != PHPExcel_Shared_OLE::OLE_PPS_TYPE_DIR) { - $raList[$i]->Size = $raList[$i]->_DataLen(); - if (($raList[$i]->Size >= PHPExcel_Shared_OLE::OLE_DATA_SIZE_SMALL) || (($raList[$i]->Type == PHPExcel_Shared_OLE::OLE_PPS_TYPE_ROOT) && isset($raList[$i]->_data))) { - // Write Data - //if (isset($raList[$i]->_PPS_FILE)) { - // $iLen = 0; - // fseek($raList[$i]->_PPS_FILE, 0); // To The Top - // while ($sBuff = fread($raList[$i]->_PPS_FILE, 4096)) { - // $iLen += strlen($sBuff); - // fwrite($FILE, $sBuff); - // } - //} else { - fwrite($FILE, $raList[$i]->_data); - //} - - if ($raList[$i]->Size % $this->_BIG_BLOCK_SIZE) { - fwrite($FILE, str_repeat("\x00", $this->_BIG_BLOCK_SIZE - ($raList[$i]->Size % $this->_BIG_BLOCK_SIZE))); - } - // Set For PPS - $raList[$i]->_StartBlock = $iStBlk; - $iStBlk += - (floor($raList[$i]->Size / $this->_BIG_BLOCK_SIZE) + - (($raList[$i]->Size % $this->_BIG_BLOCK_SIZE)? 1: 0)); - } - // Close file for each PPS, and unlink it - //if (isset($raList[$i]->_PPS_FILE)) { - // fclose($raList[$i]->_PPS_FILE); - // $raList[$i]->_PPS_FILE = null; - // unlink($raList[$i]->_tmp_filename); - //} - } - } - } - - /** - * get small data (PPS's with data smaller than PHPExcel_Shared_OLE::OLE_DATA_SIZE_SMALL) - * - * @access public - * @param array &$raList Reference to array of PPS's - */ - public function _makeSmallData(&$raList) - { - $sRes = ''; - $FILE = $this->_FILEH_; - $iSmBlk = 0; - - $iCount = count($raList); - for ($i = 0; $i < $iCount; ++$i) { - // Make SBD, small data string - if ($raList[$i]->Type == PHPExcel_Shared_OLE::OLE_PPS_TYPE_FILE) { - if ($raList[$i]->Size <= 0) { - continue; - } - if ($raList[$i]->Size < PHPExcel_Shared_OLE::OLE_DATA_SIZE_SMALL) { - $iSmbCnt = floor($raList[$i]->Size / $this->_SMALL_BLOCK_SIZE) - + (($raList[$i]->Size % $this->_SMALL_BLOCK_SIZE)? 1: 0); - // Add to SBD - $jB = $iSmbCnt - 1; - for ($j = 0; $j < $jB; ++$j) { - fwrite($FILE, pack("V", $j+$iSmBlk+1)); - } - fwrite($FILE, pack("V", -2)); - - //// Add to Data String(this will be written for RootEntry) - //if ($raList[$i]->_PPS_FILE) { - // fseek($raList[$i]->_PPS_FILE, 0); // To The Top - // while ($sBuff = fread($raList[$i]->_PPS_FILE, 4096)) { - // $sRes .= $sBuff; - // } - //} else { - $sRes .= $raList[$i]->_data; - //} - if ($raList[$i]->Size % $this->_SMALL_BLOCK_SIZE) { - $sRes .= str_repeat("\x00", $this->_SMALL_BLOCK_SIZE - ($raList[$i]->Size % $this->_SMALL_BLOCK_SIZE)); - } - // Set for PPS - $raList[$i]->_StartBlock = $iSmBlk; - $iSmBlk += $iSmbCnt; - } - } - } - $iSbCnt = floor($this->_BIG_BLOCK_SIZE / PHPExcel_Shared_OLE::OLE_LONG_INT_SIZE); - if ($iSmBlk % $iSbCnt) { - $iB = $iSbCnt - ($iSmBlk % $iSbCnt); - for ($i = 0; $i < $iB; ++$i) { - fwrite($FILE, pack("V", -1)); - } - } - return $sRes; - } - - /** - * Saves all the PPS's WKs - * - * @access public - * @param array $raList Reference to an array with all PPS's - */ - public function _savePps(&$raList) - { - // Save each PPS WK - $iC = count($raList); - for ($i = 0; $i < $iC; ++$i) { - fwrite($this->_FILEH_, $raList[$i]->_getPpsWk()); - } - // Adjust for Block - $iCnt = count($raList); - $iBCnt = $this->_BIG_BLOCK_SIZE / PHPExcel_Shared_OLE::OLE_PPS_SIZE; - if ($iCnt % $iBCnt) { - fwrite($this->_FILEH_, str_repeat("\x00", ($iBCnt - ($iCnt % $iBCnt)) * PHPExcel_Shared_OLE::OLE_PPS_SIZE)); - } - } - - /** - * Saving Big Block Depot - * - * @access public - * @param integer $iSbdSize - * @param integer $iBsize - * @param integer $iPpsCnt - */ - public function _saveBbd($iSbdSize, $iBsize, $iPpsCnt) - { - $FILE = $this->_FILEH_; - // Calculate Basic Setting - $iBbCnt = $this->_BIG_BLOCK_SIZE / PHPExcel_Shared_OLE::OLE_LONG_INT_SIZE; - $i1stBdL = ($this->_BIG_BLOCK_SIZE - 0x4C) / PHPExcel_Shared_OLE::OLE_LONG_INT_SIZE; - - $iBdExL = 0; - $iAll = $iBsize + $iPpsCnt + $iSbdSize; - $iAllW = $iAll; - $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt)? 1: 0); - $iBdCnt = floor(($iAll + $iBdCntW) / $iBbCnt) + ((($iAllW+$iBdCntW) % $iBbCnt)? 1: 0); - // Calculate BD count - if ($iBdCnt >$i1stBdL) { - while (1) { - ++$iBdExL; - ++$iAllW; - $iBdCntW = floor($iAllW / $iBbCnt) + (($iAllW % $iBbCnt)? 1: 0); - $iBdCnt = floor(($iAllW + $iBdCntW) / $iBbCnt) + ((($iAllW+$iBdCntW) % $iBbCnt)? 1: 0); - if ($iBdCnt <= ($iBdExL*$iBbCnt+ $i1stBdL)) { - break; - } - } - } - - // Making BD - // Set for SBD - if ($iSbdSize > 0) { - for ($i = 0; $i < ($iSbdSize - 1); ++$i) { - fwrite($FILE, pack("V", $i+1)); - } - fwrite($FILE, pack("V", -2)); - } - // Set for B - for ($i = 0; $i < ($iBsize - 1); ++$i) { - fwrite($FILE, pack("V", $i+$iSbdSize+1)); - } - fwrite($FILE, pack("V", -2)); - - // Set for PPS - for ($i = 0; $i < ($iPpsCnt - 1); ++$i) { - fwrite($FILE, pack("V", $i+$iSbdSize+$iBsize+1)); - } - fwrite($FILE, pack("V", -2)); - // Set for BBD itself ( 0xFFFFFFFD : BBD) - for ($i = 0; $i < $iBdCnt; ++$i) { - fwrite($FILE, pack("V", 0xFFFFFFFD)); - } - // Set for ExtraBDList - for ($i = 0; $i < $iBdExL; ++$i) { - fwrite($FILE, pack("V", 0xFFFFFFFC)); - } - // Adjust for Block - if (($iAllW + $iBdCnt) % $iBbCnt) { - $iBlock = ($iBbCnt - (($iAllW + $iBdCnt) % $iBbCnt)); - for ($i = 0; $i < $iBlock; ++$i) { - fwrite($FILE, pack("V", -1)); - } - } - // Extra BDList - if ($iBdCnt > $i1stBdL) { - $iN=0; - $iNb=0; - for ($i = $i1stBdL; $i < $iBdCnt; $i++, ++$iN) { - if ($iN >= ($iBbCnt - 1)) { - $iN = 0; - ++$iNb; - fwrite($FILE, pack("V", $iAll+$iBdCnt+$iNb)); - } - fwrite($FILE, pack("V", $iBsize+$iSbdSize+$iPpsCnt+$i)); - } - if (($iBdCnt-$i1stBdL) % ($iBbCnt-1)) { - $iB = ($iBbCnt - 1) - (($iBdCnt - $i1stBdL) % ($iBbCnt - 1)); - for ($i = 0; $i < $iB; ++$i) { - fwrite($FILE, pack("V", -1)); - } - } - fwrite($FILE, pack("V", -2)); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php deleted file mode 100644 index 6b15d97..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/OLERead.php +++ /dev/null @@ -1,318 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -defined('IDENTIFIER_OLE') || - define('IDENTIFIER_OLE', pack('CCCCCCCC', 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1)); - -class PHPExcel_Shared_OLERead -{ - private $data = ''; - - // OLE identifier - const IDENTIFIER_OLE = IDENTIFIER_OLE; - - // Size of a sector = 512 bytes - const BIG_BLOCK_SIZE = 0x200; - - // Size of a short sector = 64 bytes - const SMALL_BLOCK_SIZE = 0x40; - - // Size of a directory entry always = 128 bytes - const PROPERTY_STORAGE_BLOCK_SIZE = 0x80; - - // Minimum size of a standard stream = 4096 bytes, streams smaller than this are stored as short streams - const SMALL_BLOCK_THRESHOLD = 0x1000; - - // header offsets - const NUM_BIG_BLOCK_DEPOT_BLOCKS_POS = 0x2c; - const ROOT_START_BLOCK_POS = 0x30; - const SMALL_BLOCK_DEPOT_BLOCK_POS = 0x3c; - const EXTENSION_BLOCK_POS = 0x44; - const NUM_EXTENSION_BLOCK_POS = 0x48; - const BIG_BLOCK_DEPOT_BLOCKS_POS = 0x4c; - - // property storage offsets (directory offsets) - const SIZE_OF_NAME_POS = 0x40; - const TYPE_POS = 0x42; - const START_BLOCK_POS = 0x74; - const SIZE_POS = 0x78; - - - - public $wrkbook = null; - public $summaryInformation = null; - public $documentSummaryInformation = null; - - - /** - * Read the file - * - * @param $sFileName string Filename - * @throws PHPExcel_Reader_Exception - */ - public function read($sFileName) - { - // Check if file exists and is readable - if (!is_readable($sFileName)) { - throw new PHPExcel_Reader_Exception("Could not open " . $sFileName . " for reading! File does not exist, or it is not readable."); - } - - // Get the file identifier - // Don't bother reading the whole file until we know it's a valid OLE file - $this->data = file_get_contents($sFileName, false, null, 0, 8); - - // Check OLE identifier - if ($this->data != self::IDENTIFIER_OLE) { - throw new PHPExcel_Reader_Exception('The filename ' . $sFileName . ' is not recognised as an OLE file'); - } - - // Get the file data - $this->data = file_get_contents($sFileName); - - // Total number of sectors used for the SAT - $this->numBigBlockDepotBlocks = self::getInt4d($this->data, self::NUM_BIG_BLOCK_DEPOT_BLOCKS_POS); - - // SecID of the first sector of the directory stream - $this->rootStartBlock = self::getInt4d($this->data, self::ROOT_START_BLOCK_POS); - - // SecID of the first sector of the SSAT (or -2 if not extant) - $this->sbdStartBlock = self::getInt4d($this->data, self::SMALL_BLOCK_DEPOT_BLOCK_POS); - - // SecID of the first sector of the MSAT (or -2 if no additional sectors are used) - $this->extensionBlock = self::getInt4d($this->data, self::EXTENSION_BLOCK_POS); - - // Total number of sectors used by MSAT - $this->numExtensionBlocks = self::getInt4d($this->data, self::NUM_EXTENSION_BLOCK_POS); - - $bigBlockDepotBlocks = array(); - $pos = self::BIG_BLOCK_DEPOT_BLOCKS_POS; - - $bbdBlocks = $this->numBigBlockDepotBlocks; - - if ($this->numExtensionBlocks != 0) { - $bbdBlocks = (self::BIG_BLOCK_SIZE - self::BIG_BLOCK_DEPOT_BLOCKS_POS)/4; - } - - for ($i = 0; $i < $bbdBlocks; ++$i) { - $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos); - $pos += 4; - } - - for ($j = 0; $j < $this->numExtensionBlocks; ++$j) { - $pos = ($this->extensionBlock + 1) * self::BIG_BLOCK_SIZE; - $blocksToRead = min($this->numBigBlockDepotBlocks - $bbdBlocks, self::BIG_BLOCK_SIZE / 4 - 1); - - for ($i = $bbdBlocks; $i < $bbdBlocks + $blocksToRead; ++$i) { - $bigBlockDepotBlocks[$i] = self::getInt4d($this->data, $pos); - $pos += 4; - } - - $bbdBlocks += $blocksToRead; - if ($bbdBlocks < $this->numBigBlockDepotBlocks) { - $this->extensionBlock = self::getInt4d($this->data, $pos); - } - } - - $pos = 0; - $this->bigBlockChain = ''; - $bbs = self::BIG_BLOCK_SIZE / 4; - for ($i = 0; $i < $this->numBigBlockDepotBlocks; ++$i) { - $pos = ($bigBlockDepotBlocks[$i] + 1) * self::BIG_BLOCK_SIZE; - - $this->bigBlockChain .= substr($this->data, $pos, 4*$bbs); - $pos += 4*$bbs; - } - - $pos = 0; - $sbdBlock = $this->sbdStartBlock; - $this->smallBlockChain = ''; - while ($sbdBlock != -2) { - $pos = ($sbdBlock + 1) * self::BIG_BLOCK_SIZE; - - $this->smallBlockChain .= substr($this->data, $pos, 4*$bbs); - $pos += 4*$bbs; - - $sbdBlock = self::getInt4d($this->bigBlockChain, $sbdBlock*4); - } - - // read the directory stream - $block = $this->rootStartBlock; - $this->entry = $this->_readData($block); - - $this->readPropertySets(); - } - - /** - * Extract binary stream data - * - * @return string - */ - public function getStream($stream) - { - if ($stream === null) { - return null; - } - - $streamData = ''; - - if ($this->props[$stream]['size'] < self::SMALL_BLOCK_THRESHOLD) { - $rootdata = $this->_readData($this->props[$this->rootentry]['startBlock']); - - $block = $this->props[$stream]['startBlock']; - - while ($block != -2) { - $pos = $block * self::SMALL_BLOCK_SIZE; - $streamData .= substr($rootdata, $pos, self::SMALL_BLOCK_SIZE); - - $block = self::getInt4d($this->smallBlockChain, $block*4); - } - - return $streamData; - } else { - $numBlocks = $this->props[$stream]['size'] / self::BIG_BLOCK_SIZE; - if ($this->props[$stream]['size'] % self::BIG_BLOCK_SIZE != 0) { - ++$numBlocks; - } - - if ($numBlocks == 0) { - return ''; - } - - $block = $this->props[$stream]['startBlock']; - - while ($block != -2) { - $pos = ($block + 1) * self::BIG_BLOCK_SIZE; - $streamData .= substr($this->data, $pos, self::BIG_BLOCK_SIZE); - $block = self::getInt4d($this->bigBlockChain, $block*4); - } - - return $streamData; - } - } - - /** - * Read a standard stream (by joining sectors using information from SAT) - * - * @param int $bl Sector ID where the stream starts - * @return string Data for standard stream - */ - private function _readData($bl) - { - $block = $bl; - $data = ''; - - while ($block != -2) { - $pos = ($block + 1) * self::BIG_BLOCK_SIZE; - $data .= substr($this->data, $pos, self::BIG_BLOCK_SIZE); - $block = self::getInt4d($this->bigBlockChain, $block*4); - } - return $data; - } - - /** - * Read entries in the directory stream. - */ - private function readPropertySets() - { - $offset = 0; - - // loop through entires, each entry is 128 bytes - $entryLen = strlen($this->entry); - while ($offset < $entryLen) { - // entry data (128 bytes) - $d = substr($this->entry, $offset, self::PROPERTY_STORAGE_BLOCK_SIZE); - - // size in bytes of name - $nameSize = ord($d[self::SIZE_OF_NAME_POS]) | (ord($d[self::SIZE_OF_NAME_POS+1]) << 8); - - // type of entry - $type = ord($d[self::TYPE_POS]); - - // sectorID of first sector or short sector, if this entry refers to a stream (the case with workbook) - // sectorID of first sector of the short-stream container stream, if this entry is root entry - $startBlock = self::getInt4d($d, self::START_BLOCK_POS); - - $size = self::getInt4d($d, self::SIZE_POS); - - $name = str_replace("\x00", "", substr($d, 0, $nameSize)); - - $this->props[] = array( - 'name' => $name, - 'type' => $type, - 'startBlock' => $startBlock, - 'size' => $size - ); - - // tmp helper to simplify checks - $upName = strtoupper($name); - - // Workbook directory entry (BIFF5 uses Book, BIFF8 uses Workbook) - if (($upName === 'WORKBOOK') || ($upName === 'BOOK')) { - $this->wrkbook = count($this->props) - 1; - } elseif ($upName === 'ROOT ENTRY' || $upName === 'R') { - // Root entry - $this->rootentry = count($this->props) - 1; - } - - // Summary information - if ($name == chr(5) . 'SummaryInformation') { -// echo 'Summary Information<br />'; - $this->summaryInformation = count($this->props) - 1; - } - - // Additional Document Summary information - if ($name == chr(5) . 'DocumentSummaryInformation') { -// echo 'Document Summary Information<br />'; - $this->documentSummaryInformation = count($this->props) - 1; - } - - $offset += self::PROPERTY_STORAGE_BLOCK_SIZE; - } - } - - /** - * Read 4 bytes of data at specified position - * - * @param string $data - * @param int $pos - * @return int - */ - private static function getInt4d($data, $pos) - { - // FIX: represent numbers correctly on 64-bit system - // http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334 - // Hacked by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems - $_or_24 = ord($data[$pos + 3]); - if ($_or_24 >= 128) { - // negative number - $_ord_24 = -abs((256 - $_or_24) << 24); - } else { - $_ord_24 = ($_or_24 & 127) << 24; - } - return ord($data[$pos]) | (ord($data[$pos + 1]) << 8) | (ord($data[$pos + 2]) << 16) | $_ord_24; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/gnu-lgpl.txt b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/gnu-lgpl.txt deleted file mode 100644 index b1e3f5a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/gnu-lgpl.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - <one line to give the library's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - <signature of Ty Coon>, 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php deleted file mode 100644 index a5a9b0a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/pclzip.lib.php +++ /dev/null @@ -1,5173 +0,0 @@ -<?php -// -------------------------------------------------------------------------------- -// PhpConcept Library - Zip Module 2.8.2 -// -------------------------------------------------------------------------------- -// License GNU/LGPL - Vincent Blavet - August 2009 -// http://www.phpconcept.net -// -------------------------------------------------------------------------------- -// -// Presentation : -// PclZip is a PHP library that manage ZIP archives. -// So far tests show that archives generated by PclZip are readable by -// WinZip application and other tools. -// -// Description : -// See readme.txt and http://www.phpconcept.net -// -// Warning : -// This library and the associated files are non commercial, non professional -// work. -// It should not have unexpected results. However if any damage is caused by -// this software the author can not be responsible. -// The use of this software is at the risk of the user. -// -// -------------------------------------------------------------------------------- -// $Id: pclzip.lib.php,v 1.60 2009/09/30 21:01:04 vblavet Exp $ -// -------------------------------------------------------------------------------- - -// ----- Constants -if (!defined('PCLZIP_READ_BLOCK_SIZE')) { - define('PCLZIP_READ_BLOCK_SIZE', 2048); -} - -// ----- File list separator -// In version 1.x of PclZip, the separator for file list is a space -// (which is not a very smart choice, specifically for windows paths !). -// A better separator should be a comma (,). This constant gives you the -// abilty to change that. -// However notice that changing this value, may have impact on existing -// scripts, using space separated filenames. -// Recommanded values for compatibility with older versions : -//define('PCLZIP_SEPARATOR', ' '); -// Recommanded values for smart separation of filenames. -if (!defined('PCLZIP_SEPARATOR')) { - define('PCLZIP_SEPARATOR', ','); -} - -// ----- Error configuration -// 0 : PclZip Class integrated error handling -// 1 : PclError external library error handling. By enabling this -// you must ensure that you have included PclError library. -// [2,...] : reserved for futur use -if (!defined('PCLZIP_ERROR_EXTERNAL')) { - define('PCLZIP_ERROR_EXTERNAL', 0); -} - -// ----- Optional static temporary directory -// By default temporary files are generated in the script current -// path. -// If defined : -// - MUST BE terminated by a '/'. -// - MUST be a valid, already created directory -// Samples : -// define('PCLZIP_TEMPORARY_DIR', '/temp/'); -// define('PCLZIP_TEMPORARY_DIR', 'C:/Temp/'); -if (!defined('PCLZIP_TEMPORARY_DIR')) { - define('PCLZIP_TEMPORARY_DIR', ''); -} - -// ----- Optional threshold ratio for use of temporary files -// Pclzip sense the size of the file to add/extract and decide to -// use or not temporary file. The algorythm is looking for -// memory_limit of PHP and apply a ratio. -// threshold = memory_limit * ratio. -// Recommended values are under 0.5. Default 0.47. -// Samples : -// define('PCLZIP_TEMPORARY_FILE_RATIO', 0.5); -if (!defined('PCLZIP_TEMPORARY_FILE_RATIO')) { - define('PCLZIP_TEMPORARY_FILE_RATIO', 0.47); -} - -// -------------------------------------------------------------------------------- -// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED ***** -// -------------------------------------------------------------------------------- - -// ----- Global variables -$g_pclzip_version = "2.8.2"; - -// ----- Error codes -// -1 : Unable to open file in binary write mode -// -2 : Unable to open file in binary read mode -// -3 : Invalid parameters -// -4 : File does not exist -// -5 : Filename is too long (max. 255) -// -6 : Not a valid zip file -// -7 : Invalid extracted file size -// -8 : Unable to create directory -// -9 : Invalid archive extension -// -10 : Invalid archive format -// -11 : Unable to delete file (unlink) -// -12 : Unable to rename file (rename) -// -13 : Invalid header checksum -// -14 : Invalid archive size -define('PCLZIP_ERR_USER_ABORTED', 2); -define('PCLZIP_ERR_NO_ERROR', 0); -define('PCLZIP_ERR_WRITE_OPEN_FAIL', -1); -define('PCLZIP_ERR_READ_OPEN_FAIL', -2); -define('PCLZIP_ERR_INVALID_PARAMETER', -3); -define('PCLZIP_ERR_MISSING_FILE', -4); -define('PCLZIP_ERR_FILENAME_TOO_LONG', -5); -define('PCLZIP_ERR_INVALID_ZIP', -6); -define('PCLZIP_ERR_BAD_EXTRACTED_FILE', -7); -define('PCLZIP_ERR_DIR_CREATE_FAIL', -8); -define('PCLZIP_ERR_BAD_EXTENSION', -9); -define('PCLZIP_ERR_BAD_FORMAT', -10); -define('PCLZIP_ERR_DELETE_FILE_FAIL', -11); -define('PCLZIP_ERR_RENAME_FILE_FAIL', -12); -define('PCLZIP_ERR_BAD_CHECKSUM', -13); -define('PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14); -define('PCLZIP_ERR_MISSING_OPTION_VALUE', -15); -define('PCLZIP_ERR_INVALID_OPTION_VALUE', -16); -define('PCLZIP_ERR_ALREADY_A_DIRECTORY', -17); -define('PCLZIP_ERR_UNSUPPORTED_COMPRESSION', -18); -define('PCLZIP_ERR_UNSUPPORTED_ENCRYPTION', -19); -define('PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE', -20); -define('PCLZIP_ERR_DIRECTORY_RESTRICTION', -21); - -// ----- Options values -define('PCLZIP_OPT_PATH', 77001); -define('PCLZIP_OPT_ADD_PATH', 77002); -define('PCLZIP_OPT_REMOVE_PATH', 77003); -define('PCLZIP_OPT_REMOVE_ALL_PATH', 77004); -define('PCLZIP_OPT_SET_CHMOD', 77005); -define('PCLZIP_OPT_EXTRACT_AS_STRING', 77006); -define('PCLZIP_OPT_NO_COMPRESSION', 77007); -define('PCLZIP_OPT_BY_NAME', 77008); -define('PCLZIP_OPT_BY_INDEX', 77009); -define('PCLZIP_OPT_BY_EREG', 77010); -define('PCLZIP_OPT_BY_PREG', 77011); -define('PCLZIP_OPT_COMMENT', 77012); -define('PCLZIP_OPT_ADD_COMMENT', 77013); -define('PCLZIP_OPT_PREPEND_COMMENT', 77014); -define('PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015); -define('PCLZIP_OPT_REPLACE_NEWER', 77016); -define('PCLZIP_OPT_STOP_ON_ERROR', 77017); -// Having big trouble with crypt. Need to multiply 2 long int -// which is not correctly supported by PHP ... -//define('PCLZIP_OPT_CRYPT', 77018); -define('PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019); -define('PCLZIP_OPT_TEMP_FILE_THRESHOLD', 77020); -define('PCLZIP_OPT_ADD_TEMP_FILE_THRESHOLD', 77020); // alias -define('PCLZIP_OPT_TEMP_FILE_ON', 77021); -define('PCLZIP_OPT_ADD_TEMP_FILE_ON', 77021); // alias -define('PCLZIP_OPT_TEMP_FILE_OFF', 77022); -define('PCLZIP_OPT_ADD_TEMP_FILE_OFF', 77022); // alias - -// ----- File description attributes -define('PCLZIP_ATT_FILE_NAME', 79001); -define('PCLZIP_ATT_FILE_NEW_SHORT_NAME', 79002); -define('PCLZIP_ATT_FILE_NEW_FULL_NAME', 79003); -define('PCLZIP_ATT_FILE_MTIME', 79004); -define('PCLZIP_ATT_FILE_CONTENT', 79005); -define('PCLZIP_ATT_FILE_COMMENT', 79006); - -// ----- Call backs values -define('PCLZIP_CB_PRE_EXTRACT', 78001); -define('PCLZIP_CB_POST_EXTRACT', 78002); -define('PCLZIP_CB_PRE_ADD', 78003); -define('PCLZIP_CB_POST_ADD', 78004); -/* For futur use -define('PCLZIP_CB_PRE_LIST', 78005); -define('PCLZIP_CB_POST_LIST', 78006); -define('PCLZIP_CB_PRE_DELETE', 78007); -define('PCLZIP_CB_POST_DELETE', 78008); -*/ - -// -------------------------------------------------------------------------------- -// Class : PclZip -// Description : -// PclZip is the class that represent a Zip archive. -// The public methods allow the manipulation of the archive. -// Attributes : -// Attributes must not be accessed directly. -// Methods : -// PclZip() : Object creator -// create() : Creates the Zip archive -// listContent() : List the content of the Zip archive -// extract() : Extract the content of the archive -// properties() : List the properties of the archive -// -------------------------------------------------------------------------------- -class PclZip -{ - // ----- Filename of the zip file - public $zipname = ''; - - // ----- File descriptor of the zip file - public $zip_fd = 0; - - // ----- Internal error handling - public $error_code = 1; - public $error_string = ''; - - // ----- Current status of the magic_quotes_runtime - // This value store the php configuration for magic_quotes - // The class can then disable the magic_quotes and reset it after - public $magic_quotes_status; - - // -------------------------------------------------------------------------------- - // Function : PclZip() - // Description : - // Creates a PclZip object and set the name of the associated Zip archive - // filename. - // Note that no real action is taken, if the archive does not exist it is not - // created. Use create() for that. - // -------------------------------------------------------------------------------- - public function __construct($p_zipname) - { - - // ----- Tests the zlib - if (!function_exists('gzopen')) { - die('Abort '.basename(__FILE__).' : Missing zlib extensions'); - } - - // ----- Set the attributes - $this->zipname = $p_zipname; - $this->zip_fd = 0; - $this->magic_quotes_status = -1; - - // ----- Return - return; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : - // create($p_filelist, $p_add_dir="", $p_remove_dir="") - // create($p_filelist, $p_option, $p_option_value, ...) - // Description : - // This method supports two different synopsis. The first one is historical. - // This method creates a Zip Archive. The Zip file is created in the - // filesystem. The files and directories indicated in $p_filelist - // are added in the archive. See the parameters description for the - // supported format of $p_filelist. - // When a directory is in the list, the directory and its content is added - // in the archive. - // In this synopsis, the function takes an optional variable list of - // options. See bellow the supported options. - // Parameters : - // $p_filelist : An array containing file or directory names, or - // a string containing one filename or one directory name, or - // a string containing a list of filenames and/or directory - // names separated by spaces. - // $p_add_dir : A path to add before the real path of the archived file, - // in order to have it memorized in the archive. - // $p_remove_dir : A path to remove from the real path of the file to archive, - // in order to have a shorter path memorized in the archive. - // When $p_add_dir and $p_remove_dir are set, $p_remove_dir - // is removed first, before $p_add_dir is added. - // Options : - // PCLZIP_OPT_ADD_PATH : - // PCLZIP_OPT_REMOVE_PATH : - // PCLZIP_OPT_REMOVE_ALL_PATH : - // PCLZIP_OPT_COMMENT : - // PCLZIP_CB_PRE_ADD : - // PCLZIP_CB_POST_ADD : - // Return Values : - // 0 on failure, - // The list of the added files, with a status of the add action. - // (see PclZip::listContent() for list entry format) - // -------------------------------------------------------------------------------- - public function create($p_filelist) - { - $v_result=1; - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Set default values - $v_options = array(); - $v_options[PCLZIP_OPT_NO_COMPRESSION] = false; - - // ----- Look for variable options arguments - $v_size = func_num_args(); - - // ----- Look for arguments - if ($v_size > 1) { - // ----- Get the arguments - $v_arg_list = func_get_args(); - - // ----- Remove from the options list the first argument - array_shift($v_arg_list); - $v_size--; - - // ----- Look for first arg - if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { - // ----- Parse the options - $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, array ( - PCLZIP_OPT_REMOVE_PATH => 'optional', - PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', - PCLZIP_OPT_ADD_PATH => 'optional', - PCLZIP_CB_PRE_ADD => 'optional', - PCLZIP_CB_POST_ADD => 'optional', - PCLZIP_OPT_NO_COMPRESSION => 'optional', - PCLZIP_OPT_COMMENT => 'optional', - PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', - PCLZIP_OPT_TEMP_FILE_ON => 'optional', - PCLZIP_OPT_TEMP_FILE_OFF => 'optional' - //, PCLZIP_OPT_CRYPT => 'optional' - )); - if ($v_result != 1) { - return 0; - } - } else { - // ----- Look for 2 args - // Here we need to support the first historic synopsis of the - // method. - // ----- Get the first argument - $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0]; - - // ----- Look for the optional second argument - if ($v_size == 2) { - $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; - } elseif ($v_size > 2) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); - return 0; - } - } - } - - // ----- Look for default option values - $this->privOptionDefaultThreshold($v_options); - - // ----- Init - $v_string_list = array(); - $v_att_list = array(); - $v_filedescr_list = array(); - $p_result_list = array(); - - // ----- Look if the $p_filelist is really an array - if (is_array($p_filelist)) { - // ----- Look if the first element is also an array - // This will mean that this is a file description entry - if (isset($p_filelist[0]) && is_array($p_filelist[0])) { - $v_att_list = $p_filelist; - } else { - // ----- The list is a list of string names - $v_string_list = $p_filelist; - } - } elseif (is_string($p_filelist)) { - // ----- Look if the $p_filelist is a string - // ----- Create a list from the string - $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); - } else { - // ----- Invalid variable type for $p_filelist - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist"); - return 0; - } - - // ----- Reformat the string list - if (sizeof($v_string_list) != 0) { - foreach ($v_string_list as $v_string) { - if ($v_string != '') { - $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; - } else { - } - } - } - - // ----- For each file in the list check the attributes - $v_supported_attributes = array( - PCLZIP_ATT_FILE_NAME => 'mandatory', - PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional', - PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional', - PCLZIP_ATT_FILE_MTIME => 'optional', - PCLZIP_ATT_FILE_CONTENT => 'optional', - PCLZIP_ATT_FILE_COMMENT => 'optional' - ); - foreach ($v_att_list as $v_entry) { - $v_result = $this->privFileDescrParseAtt($v_entry, $v_filedescr_list[], $v_options, $v_supported_attributes); - if ($v_result != 1) { - return 0; - } - } - - // ----- Expand the filelist (expand directories) - $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); - if ($v_result != 1) { - return 0; - } - - // ----- Call the create fct - $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options); - if ($v_result != 1) { - return 0; - } - - // ----- Return - return $p_result_list; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : - // add($p_filelist, $p_add_dir="", $p_remove_dir="") - // add($p_filelist, $p_option, $p_option_value, ...) - // Description : - // This method supports two synopsis. The first one is historical. - // This methods add the list of files in an existing archive. - // If a file with the same name already exists, it is added at the end of the - // archive, the first one is still present. - // If the archive does not exist, it is created. - // Parameters : - // $p_filelist : An array containing file or directory names, or - // a string containing one filename or one directory name, or - // a string containing a list of filenames and/or directory - // names separated by spaces. - // $p_add_dir : A path to add before the real path of the archived file, - // in order to have it memorized in the archive. - // $p_remove_dir : A path to remove from the real path of the file to archive, - // in order to have a shorter path memorized in the archive. - // When $p_add_dir and $p_remove_dir are set, $p_remove_dir - // is removed first, before $p_add_dir is added. - // Options : - // PCLZIP_OPT_ADD_PATH : - // PCLZIP_OPT_REMOVE_PATH : - // PCLZIP_OPT_REMOVE_ALL_PATH : - // PCLZIP_OPT_COMMENT : - // PCLZIP_OPT_ADD_COMMENT : - // PCLZIP_OPT_PREPEND_COMMENT : - // PCLZIP_CB_PRE_ADD : - // PCLZIP_CB_POST_ADD : - // Return Values : - // 0 on failure, - // The list of the added files, with a status of the add action. - // (see PclZip::listContent() for list entry format) - // -------------------------------------------------------------------------------- - public function add($p_filelist) - { - $v_result=1; - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Set default values - $v_options = array(); - $v_options[PCLZIP_OPT_NO_COMPRESSION] = false; - - // ----- Look for variable options arguments - $v_size = func_num_args(); - - // ----- Look for arguments - if ($v_size > 1) { - // ----- Get the arguments - $v_arg_list = func_get_args(); - - // ----- Remove form the options list the first argument - array_shift($v_arg_list); - $v_size--; - - // ----- Look for first arg - if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { - // ----- Parse the options - $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, array ( - PCLZIP_OPT_REMOVE_PATH => 'optional', - PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', - PCLZIP_OPT_ADD_PATH => 'optional', - PCLZIP_CB_PRE_ADD => 'optional', - PCLZIP_CB_POST_ADD => 'optional', - PCLZIP_OPT_NO_COMPRESSION => 'optional', - PCLZIP_OPT_COMMENT => 'optional', - PCLZIP_OPT_ADD_COMMENT => 'optional', - PCLZIP_OPT_PREPEND_COMMENT => 'optional', - PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', - PCLZIP_OPT_TEMP_FILE_ON => 'optional', - PCLZIP_OPT_TEMP_FILE_OFF => 'optional' - //, PCLZIP_OPT_CRYPT => 'optional' - )); - if ($v_result != 1) { - return 0; - } - } else { - // ----- Look for 2 args - // Here we need to support the first historic synopsis of the - // method. - // ----- Get the first argument - $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0]; - - // ----- Look for the optional second argument - if ($v_size == 2) { - $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; - } elseif ($v_size > 2) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); - - // ----- Return - return 0; - } - } - } - - // ----- Look for default option values - $this->privOptionDefaultThreshold($v_options); - - // ----- Init - $v_string_list = array(); - $v_att_list = array(); - $v_filedescr_list = array(); - $p_result_list = array(); - - // ----- Look if the $p_filelist is really an array - if (is_array($p_filelist)) { - // ----- Look if the first element is also an array - // This will mean that this is a file description entry - if (isset($p_filelist[0]) && is_array($p_filelist[0])) { - $v_att_list = $p_filelist; - } else { - // ----- The list is a list of string names - $v_string_list = $p_filelist; - } - } elseif (is_string($p_filelist)) { - // ----- Look if the $p_filelist is a string - // ----- Create a list from the string - $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); - } else { - // ----- Invalid variable type for $p_filelist - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); - return 0; - } - - // ----- Reformat the string list - if (sizeof($v_string_list) != 0) { - foreach ($v_string_list as $v_string) { - $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; - } - } - - // ----- For each file in the list check the attributes - $v_supported_attributes = array( - PCLZIP_ATT_FILE_NAME => 'mandatory', - PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional', - PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional', - PCLZIP_ATT_FILE_MTIME => 'optional', - PCLZIP_ATT_FILE_CONTENT => 'optional', - PCLZIP_ATT_FILE_COMMENT => 'optional', - ); - foreach ($v_att_list as $v_entry) { - $v_result = $this->privFileDescrParseAtt($v_entry, $v_filedescr_list[], $v_options, $v_supported_attributes); - if ($v_result != 1) { - return 0; - } - } - - // ----- Expand the filelist (expand directories) - $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); - if ($v_result != 1) { - return 0; - } - - // ----- Call the create fct - $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options); - if ($v_result != 1) { - return 0; - } - - // ----- Return - return $p_result_list; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : listContent() - // Description : - // This public method, gives the list of the files and directories, with their - // properties. - // The properties of each entries in the list are (used also in other functions) : - // filename : Name of the file. For a create or add action it is the filename - // given by the user. For an extract function it is the filename - // of the extracted file. - // stored_filename : Name of the file / directory stored in the archive. - // size : Size of the stored file. - // compressed_size : Size of the file's data compressed in the archive - // (without the headers overhead) - // mtime : Last known modification date of the file (UNIX timestamp) - // comment : Comment associated with the file - // folder : true | false - // index : index of the file in the archive - // status : status of the action (depending of the action) : - // Values are : - // ok : OK ! - // filtered : the file / dir is not extracted (filtered by user) - // already_a_directory : the file can not be extracted because a - // directory with the same name already exists - // write_protected : the file can not be extracted because a file - // with the same name already exists and is - // write protected - // newer_exist : the file was not extracted because a newer file exists - // path_creation_fail : the file is not extracted because the folder - // does not exist and can not be created - // write_error : the file was not extracted because there was a - // error while writing the file - // read_error : the file was not extracted because there was a error - // while reading the file - // invalid_header : the file was not extracted because of an archive - // format error (bad file header) - // Note that each time a method can continue operating when there - // is an action error on a file, the error is only logged in the file status. - // Return Values : - // 0 on an unrecoverable failure, - // The list of the files in the archive. - // -------------------------------------------------------------------------------- - public function listContent() - { - $v_result=1; - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Check archive - if (!$this->privCheckFormat()) { - return(0); - } - - // ----- Call the extracting fct - $p_list = array(); - if (($v_result = $this->privList($p_list)) != 1) { - unset($p_list); - return(0); - } - - // ----- Return - return $p_list; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : - // extract($p_path="./", $p_remove_path="") - // extract([$p_option, $p_option_value, ...]) - // Description : - // This method supports two synopsis. The first one is historical. - // This method extract all the files / directories from the archive to the - // folder indicated in $p_path. - // If you want to ignore the 'root' part of path of the memorized files - // you can indicate this in the optional $p_remove_path parameter. - // By default, if a newer file with the same name already exists, the - // file is not extracted. - // - // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions - // are used, the path indicated in PCLZIP_OPT_ADD_PATH is append - // at the end of the path value of PCLZIP_OPT_PATH. - // Parameters : - // $p_path : Path where the files and directories are to be extracted - // $p_remove_path : First part ('root' part) of the memorized path - // (if any similar) to remove while extracting. - // Options : - // PCLZIP_OPT_PATH : - // PCLZIP_OPT_ADD_PATH : - // PCLZIP_OPT_REMOVE_PATH : - // PCLZIP_OPT_REMOVE_ALL_PATH : - // PCLZIP_CB_PRE_EXTRACT : - // PCLZIP_CB_POST_EXTRACT : - // Return Values : - // 0 or a negative value on failure, - // The list of the extracted files, with a status of the action. - // (see PclZip::listContent() for list entry format) - // -------------------------------------------------------------------------------- - public function extract() - { - $v_result=1; - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Check archive - if (!$this->privCheckFormat()) { - return(0); - } - - // ----- Set default values - $v_options = array(); - // $v_path = "./"; - $v_path = ''; - $v_remove_path = ""; - $v_remove_all_path = false; - - // ----- Look for variable options arguments - $v_size = func_num_args(); - - // ----- Default values for option - $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = false; - - // ----- Look for arguments - if ($v_size > 0) { - // ----- Get the arguments - $v_arg_list = func_get_args(); - - // ----- Look for first arg - if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { - // ----- Parse the options - $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, array ( - PCLZIP_OPT_PATH => 'optional', - PCLZIP_OPT_REMOVE_PATH => 'optional', - PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', - PCLZIP_OPT_ADD_PATH => 'optional', - PCLZIP_CB_PRE_EXTRACT => 'optional', - PCLZIP_CB_POST_EXTRACT => 'optional', - PCLZIP_OPT_SET_CHMOD => 'optional', - PCLZIP_OPT_BY_NAME => 'optional', - PCLZIP_OPT_BY_EREG => 'optional', - PCLZIP_OPT_BY_PREG => 'optional', - PCLZIP_OPT_BY_INDEX => 'optional', - PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', - PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional', - PCLZIP_OPT_REPLACE_NEWER => 'optional', - PCLZIP_OPT_STOP_ON_ERROR => 'optional', - PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', - PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', - PCLZIP_OPT_TEMP_FILE_ON => 'optional', - PCLZIP_OPT_TEMP_FILE_OFF => 'optional' - )); - if ($v_result != 1) { - return 0; - } - - // ----- Set the arguments - if (isset($v_options[PCLZIP_OPT_PATH])) { - $v_path = $v_options[PCLZIP_OPT_PATH]; - } - if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { - $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; - } - if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { - $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; - } - if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { - // ----- Check for '/' in last path char - if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { - $v_path .= '/'; - } - $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; - } - } else { - // ----- Look for 2 args - // Here we need to support the first historic synopsis of the - // method. - // ----- Get the first argument - $v_path = $v_arg_list[0]; - - // ----- Look for the optional second argument - if ($v_size == 2) { - $v_remove_path = $v_arg_list[1]; - } elseif ($v_size > 2) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); - - // ----- Return - return 0; - } - } - } - - // ----- Look for default option values - $this->privOptionDefaultThreshold($v_options); - - // ----- Trace - - // ----- Call the extracting fct - $p_list = array(); - $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options); - if ($v_result < 1) { - unset($p_list); - return(0); - } - - // ----- Return - return $p_list; - } - // -------------------------------------------------------------------------------- - - - // -------------------------------------------------------------------------------- - // Function : - // extractByIndex($p_index, $p_path="./", $p_remove_path="") - // extractByIndex($p_index, [$p_option, $p_option_value, ...]) - // Description : - // This method supports two synopsis. The first one is historical. - // This method is doing a partial extract of the archive. - // The extracted files or folders are identified by their index in the - // archive (from 0 to n). - // Note that if the index identify a folder, only the folder entry is - // extracted, not all the files included in the archive. - // Parameters : - // $p_index : A single index (integer) or a string of indexes of files to - // extract. The form of the string is "0,4-6,8-12" with only numbers - // and '-' for range or ',' to separate ranges. No spaces or ';' - // are allowed. - // $p_path : Path where the files and directories are to be extracted - // $p_remove_path : First part ('root' part) of the memorized path - // (if any similar) to remove while extracting. - // Options : - // PCLZIP_OPT_PATH : - // PCLZIP_OPT_ADD_PATH : - // PCLZIP_OPT_REMOVE_PATH : - // PCLZIP_OPT_REMOVE_ALL_PATH : - // PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and - // not as files. - // The resulting content is in a new field 'content' in the file - // structure. - // This option must be used alone (any other options are ignored). - // PCLZIP_CB_PRE_EXTRACT : - // PCLZIP_CB_POST_EXTRACT : - // Return Values : - // 0 on failure, - // The list of the extracted files, with a status of the action. - // (see PclZip::listContent() for list entry format) - // -------------------------------------------------------------------------------- - //function extractByIndex($p_index, options...) - public function extractByIndex($p_index) - { - $v_result=1; - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Check archive - if (!$this->privCheckFormat()) { - return(0); - } - - // ----- Set default values - $v_options = array(); - // $v_path = "./"; - $v_path = ''; - $v_remove_path = ""; - $v_remove_all_path = false; - - // ----- Look for variable options arguments - $v_size = func_num_args(); - - // ----- Default values for option - $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = false; - - // ----- Look for arguments - if ($v_size > 1) { - // ----- Get the arguments - $v_arg_list = func_get_args(); - - // ----- Remove form the options list the first argument - array_shift($v_arg_list); - $v_size--; - - // ----- Look for first arg - if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { - // ----- Parse the options - $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, array( - PCLZIP_OPT_PATH => 'optional', - PCLZIP_OPT_REMOVE_PATH => 'optional', - PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', - PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', - PCLZIP_OPT_ADD_PATH => 'optional', - PCLZIP_CB_PRE_EXTRACT => 'optional', - PCLZIP_CB_POST_EXTRACT => 'optional', - PCLZIP_OPT_SET_CHMOD => 'optional', - PCLZIP_OPT_REPLACE_NEWER => 'optional', - PCLZIP_OPT_STOP_ON_ERROR => 'optional', - PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', - PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', - PCLZIP_OPT_TEMP_FILE_ON => 'optional', - PCLZIP_OPT_TEMP_FILE_OFF => 'optional' - )); - if ($v_result != 1) { - return 0; - } - - // ----- Set the arguments - if (isset($v_options[PCLZIP_OPT_PATH])) { - $v_path = $v_options[PCLZIP_OPT_PATH]; - } - if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { - $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; - } - if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { - $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; - } - if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { - // ----- Check for '/' in last path char - if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { - $v_path .= '/'; - } - $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; - } - if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) { - $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = false; - } else { - } - } else { - // ----- Look for 2 args - // Here we need to support the first historic synopsis of the - // method. - - // ----- Get the first argument - $v_path = $v_arg_list[0]; - - // ----- Look for the optional second argument - if ($v_size == 2) { - $v_remove_path = $v_arg_list[1]; - } elseif ($v_size > 2) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); - - // ----- Return - return 0; - } - } - } - - // ----- Trace - - // ----- Trick - // Here I want to reuse extractByRule(), so I need to parse the $p_index - // with privParseOptions() - $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index); - $v_options_trick = array(); - $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick, array (PCLZIP_OPT_BY_INDEX => 'optional')); - if ($v_result != 1) { - return 0; - } - $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX]; - - // ----- Look for default option values - $this->privOptionDefaultThreshold($v_options); - - // ----- Call the extracting fct - if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) { - return(0); - } - - // ----- Return - return $p_list; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : - // delete([$p_option, $p_option_value, ...]) - // Description : - // This method removes files from the archive. - // If no parameters are given, then all the archive is emptied. - // Parameters : - // None or optional arguments. - // Options : - // PCLZIP_OPT_BY_INDEX : - // PCLZIP_OPT_BY_NAME : - // PCLZIP_OPT_BY_EREG : - // PCLZIP_OPT_BY_PREG : - // Return Values : - // 0 on failure, - // The list of the files which are still present in the archive. - // (see PclZip::listContent() for list entry format) - // -------------------------------------------------------------------------------- - public function delete() - { - $v_result=1; - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Check archive - if (!$this->privCheckFormat()) { - return(0); - } - - // ----- Set default values - $v_options = array(); - - // ----- Look for variable options arguments - $v_size = func_num_args(); - - // ----- Look for arguments - if ($v_size > 0) { - // ----- Get the arguments - $v_arg_list = func_get_args(); - - // ----- Parse the options - $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, array ( - PCLZIP_OPT_BY_NAME => 'optional', - PCLZIP_OPT_BY_EREG => 'optional', - PCLZIP_OPT_BY_PREG => 'optional', - PCLZIP_OPT_BY_INDEX => 'optional' - )); - if ($v_result != 1) { - return 0; - } - } - - // ----- Magic quotes trick - $this->privDisableMagicQuotes(); - - // ----- Call the delete fct - $v_list = array(); - if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) { - $this->privSwapBackMagicQuotes(); - unset($v_list); - return(0); - } - - // ----- Magic quotes trick - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_list; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : deleteByIndex() - // Description : - // ***** Deprecated ***** - // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered. - // -------------------------------------------------------------------------------- - public function deleteByIndex($p_index) - { - - $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); - - // ----- Return - return $p_list; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : properties() - // Description : - // This method gives the properties of the archive. - // The properties are : - // nb : Number of files in the archive - // comment : Comment associated with the archive file - // status : not_exist, ok - // Parameters : - // None - // Return Values : - // 0 on failure, - // An array with the archive properties. - // -------------------------------------------------------------------------------- - public function properties() - { - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Magic quotes trick - $this->privDisableMagicQuotes(); - - // ----- Check archive - if (!$this->privCheckFormat()) { - $this->privSwapBackMagicQuotes(); - return(0); - } - - // ----- Default properties - $v_prop = array(); - $v_prop['comment'] = ''; - $v_prop['nb'] = 0; - $v_prop['status'] = 'not_exist'; - - // ----- Look if file exists - if (@is_file($this->zipname)) { - // ----- Open the zip file - if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) { - $this->privSwapBackMagicQuotes(); - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); - - // ----- Return - return 0; - } - - // ----- Read the central directory informations - $v_central_dir = array(); - if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { - $this->privSwapBackMagicQuotes(); - return 0; - } - - // ----- Close the zip file - $this->privCloseFd(); - - // ----- Set the user attributes - $v_prop['comment'] = $v_central_dir['comment']; - $v_prop['nb'] = $v_central_dir['entries']; - $v_prop['status'] = 'ok'; - } - - // ----- Magic quotes trick - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_prop; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : duplicate() - // Description : - // This method creates an archive by copying the content of an other one. If - // the archive already exist, it is replaced by the new one without any warning. - // Parameters : - // $p_archive : The filename of a valid archive, or - // a valid PclZip object. - // Return Values : - // 1 on success. - // 0 or a negative value on error (error code). - // -------------------------------------------------------------------------------- - public function duplicate($p_archive) - { - $v_result = 1; - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Look if the $p_archive is a PclZip object - if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip')) { - // ----- Duplicate the archive - $v_result = $this->privDuplicate($p_archive->zipname); - } elseif (is_string($p_archive)) { - // ----- Look if the $p_archive is a string (so a filename) - // ----- Check that $p_archive is a valid zip file - // TBC : Should also check the archive format - if (!is_file($p_archive)) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); - $v_result = PCLZIP_ERR_MISSING_FILE; - } else { - // ----- Duplicate the archive - $v_result = $this->privDuplicate($p_archive); - } - } else { - // ----- Invalid variable - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); - $v_result = PCLZIP_ERR_INVALID_PARAMETER; - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : merge() - // Description : - // This method merge the $p_archive_to_add archive at the end of the current - // one ($this). - // If the archive ($this) does not exist, the merge becomes a duplicate. - // If the $p_archive_to_add archive does not exist, the merge is a success. - // Parameters : - // $p_archive_to_add : It can be directly the filename of a valid zip archive, - // or a PclZip object archive. - // Return Values : - // 1 on success, - // 0 or negative values on error (see below). - // -------------------------------------------------------------------------------- - public function merge($p_archive_to_add) - { - $v_result = 1; - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Check archive - if (!$this->privCheckFormat()) { - return(0); - } - - // ----- Look if the $p_archive_to_add is a PclZip object - if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip')) { - // ----- Merge the archive - $v_result = $this->privMerge($p_archive_to_add); - } elseif (is_string($p_archive_to_add)) { - // ----- Look if the $p_archive_to_add is a string (so a filename) - // ----- Create a temporary archive - $v_object_archive = new PclZip($p_archive_to_add); - - // ----- Merge the archive - $v_result = $this->privMerge($v_object_archive); - } else { - // ----- Invalid variable - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); - $v_result = PCLZIP_ERR_INVALID_PARAMETER; - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - - - // -------------------------------------------------------------------------------- - // Function : errorCode() - // Description : - // Parameters : - // -------------------------------------------------------------------------------- - public function errorCode() - { - if (PCLZIP_ERROR_EXTERNAL == 1) { - return(PclErrorCode()); - } else { - return($this->error_code); - } - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : errorName() - // Description : - // Parameters : - // -------------------------------------------------------------------------------- - public function errorName($p_with_code = false) - { - $v_name = array( - PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR', - PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL', - PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL', - PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER', - PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE', - PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG', - PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP', - PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE', - PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL', - PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION', - PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT', - PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL', - PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL', - PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM', - PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', - PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE', - PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE', - PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', - PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION', - PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE => 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE', - PCLZIP_ERR_DIRECTORY_RESTRICTION => 'PCLZIP_ERR_DIRECTORY_RESTRICTION', - ); - - if (isset($v_name[$this->error_code])) { - $v_value = $v_name[$this->error_code]; - } else { - $v_value = 'NoName'; - } - - if ($p_with_code) { - return($v_value.' ('.$this->error_code.')'); - } else { - return($v_value); - } - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : errorInfo() - // Description : - // Parameters : - // -------------------------------------------------------------------------------- - public function errorInfo($p_full = false) - { - if (PCLZIP_ERROR_EXTERNAL == 1) { - return(PclErrorString()); - } else { - if ($p_full) { - return($this->errorName(true)." : ".$this->error_string); - } else { - return($this->error_string." [code ".$this->error_code."]"); - } - } - } - // -------------------------------------------------------------------------------- - - - // -------------------------------------------------------------------------------- - // ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS ***** - // ***** ***** - // ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY ***** - // -------------------------------------------------------------------------------- - - - - // -------------------------------------------------------------------------------- - // Function : privCheckFormat() - // Description : - // This method check that the archive exists and is a valid zip archive. - // Several level of check exists. (futur) - // Parameters : - // $p_level : Level of check. Default 0. - // 0 : Check the first bytes (magic codes) (default value)) - // 1 : 0 + Check the central directory (futur) - // 2 : 1 + Check each file header (futur) - // Return Values : - // true on success, - // false on error, the error code is set. - // -------------------------------------------------------------------------------- - public function privCheckFormat($p_level = 0) - { - $v_result = true; - - // ----- Reset the file system cache - clearstatcache(); - - // ----- Reset the error handler - $this->privErrorReset(); - - // ----- Look if the file exits - if (!is_file($this->zipname)) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'"); - return(false); - } - - // ----- Check that the file is readeable - if (!is_readable($this->zipname)) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); - return(false); - } - - // ----- Check the magic code - // TBC - - // ----- Check the central header - // TBC - - // ----- Check each file header - // TBC - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privParseOptions() - // Description : - // This internal methods reads the variable list of arguments ($p_options_list, - // $p_size) and generate an array with the options and values ($v_result_list). - // $v_requested_options contains the options that can be present and those that - // must be present. - // $v_requested_options is an array, with the option value as key, and 'optional', - // or 'mandatory' as value. - // Parameters : - // See above. - // Return Values : - // 1 on success. - // 0 on failure. - // -------------------------------------------------------------------------------- - public function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options = false) - { - $v_result=1; - - // ----- Read the options - $i=0; - while ($i<$p_size) { - // ----- Check if the option is supported - if (!isset($v_requested_options[$p_options_list[$i]])) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Look for next option - switch ($p_options_list[$i]) { - // ----- Look for options that request a path value - case PCLZIP_OPT_PATH: - case PCLZIP_OPT_REMOVE_PATH: - case PCLZIP_OPT_ADD_PATH: - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Get the value - $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false); - $i++; - break; - - case PCLZIP_OPT_TEMP_FILE_THRESHOLD: - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - return PclZip::errorCode(); - } - - // ----- Check for incompatible options - if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); - return PclZip::errorCode(); - } - - // ----- Check the value - $v_value = $p_options_list[$i+1]; - if ((!is_integer($v_value)) || ($v_value<0)) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - return PclZip::errorCode(); - } - - // ----- Get the value (and convert it in bytes) - $v_result_list[$p_options_list[$i]] = $v_value*1048576; - $i++; - break; - - case PCLZIP_OPT_TEMP_FILE_ON: - // ----- Check for incompatible options - if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); - return PclZip::errorCode(); - } - - $v_result_list[$p_options_list[$i]] = true; - break; - - case PCLZIP_OPT_TEMP_FILE_OFF: - // ----- Check for incompatible options - if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); - return PclZip::errorCode(); - } - // ----- Check for incompatible options - if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); - return PclZip::errorCode(); - } - $v_result_list[$p_options_list[$i]] = true; - break; - - case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION: - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - // ----- Return - return PclZip::errorCode(); - } - - // ----- Get the value - if (is_string($p_options_list[$i+1]) && ($p_options_list[$i+1] != '')) { - $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false); - $i++; - } else { - } - break; - // ----- Look for options that request an array of string for value - case PCLZIP_OPT_BY_NAME: - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - // ----- Return - return PclZip::errorCode(); - } - - // ----- Get the value - if (is_string($p_options_list[$i+1])) { - $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1]; - } elseif (is_array($p_options_list[$i+1])) { - $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; - } else { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - // ----- Return - return PclZip::errorCode(); - } - $i++; - break; - // ----- Look for options that request an EREG or PREG expression - case PCLZIP_OPT_BY_EREG: - // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG - // to PCLZIP_OPT_BY_PREG - $p_options_list[$i] = PCLZIP_OPT_BY_PREG; - case PCLZIP_OPT_BY_PREG: - //case PCLZIP_OPT_CRYPT : - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - // ----- Return - return PclZip::errorCode(); - } - - // ----- Get the value - if (is_string($p_options_list[$i+1])) { - $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; - } else { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - // ----- Return - return PclZip::errorCode(); - } - $i++; - break; - - // ----- Look for options that takes a string - case PCLZIP_OPT_COMMENT: - case PCLZIP_OPT_ADD_COMMENT: - case PCLZIP_OPT_PREPEND_COMMENT: - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Get the value - if (is_string($p_options_list[$i+1])) { - $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; - } else { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '" .PclZipUtilOptionText($p_options_list[$i]) ."'"); - - // ----- Return - return PclZip::errorCode(); - } - $i++; - break; - - // ----- Look for options that request an array of index - case PCLZIP_OPT_BY_INDEX: - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Get the value - $v_work_list = array(); - if (is_string($p_options_list[$i+1])) { - // ----- Remove spaces - $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', ''); - - // ----- Parse items - $v_work_list = explode(",", $p_options_list[$i+1]); - } elseif (is_integer($p_options_list[$i+1])) { - $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1]; - } elseif (is_array($p_options_list[$i+1])) { - $v_work_list = $p_options_list[$i+1]; - } else { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Reduce the index list - // each index item in the list must be a couple with a start and - // an end value : [0,3], [5-5], [8-10], ... - // ----- Check the format of each item - $v_sort_flag=false; - $v_sort_value=0; - for ($j=0; $j<sizeof($v_work_list); $j++) { - // ----- Explode the item - $v_item_list = explode("-", $v_work_list[$j]); - $v_size_item_list = sizeof($v_item_list); - - // ----- TBC : Here we might check that each item is a - // real integer ... - - // ----- Look for single value - if ($v_size_item_list == 1) { - // ----- Set the option value - $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0]; - $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[0]; - } elseif ($v_size_item_list == 2) { - // ----- Set the option value - $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0]; - $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1]; - } else { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - - // ----- Return - return PclZip::errorCode(); - } - - - // ----- Look for list sort - if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) { - $v_sort_flag=true; - - // ----- TBC : An automatic sort should be writen ... - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - - // ----- Return - return PclZip::errorCode(); - } - $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start']; - } - - // ----- Sort the items - if ($v_sort_flag) { - // TBC : To Be Completed - } - // ----- Next option - $i++; - break; - // ----- Look for options that request no value - case PCLZIP_OPT_REMOVE_ALL_PATH: - case PCLZIP_OPT_EXTRACT_AS_STRING: - case PCLZIP_OPT_NO_COMPRESSION: - case PCLZIP_OPT_EXTRACT_IN_OUTPUT: - case PCLZIP_OPT_REPLACE_NEWER: - case PCLZIP_OPT_STOP_ON_ERROR: - $v_result_list[$p_options_list[$i]] = true; - break; - // ----- Look for options that request an octal value - case PCLZIP_OPT_SET_CHMOD: - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - // ----- Return - return PclZip::errorCode(); - } - // ----- Get the value - $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; - $i++; - break; - - // ----- Look for options that request a call-back - case PCLZIP_CB_PRE_EXTRACT: - case PCLZIP_CB_POST_EXTRACT: - case PCLZIP_CB_PRE_ADD: - case PCLZIP_CB_POST_ADD: - /* for futur use - case PCLZIP_CB_PRE_DELETE : - case PCLZIP_CB_POST_DELETE : - case PCLZIP_CB_PRE_LIST : - case PCLZIP_CB_POST_LIST : - */ - // ----- Check the number of parameters - if (($i+1) >= $p_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - // ----- Return - return PclZip::errorCode(); - } - - // ----- Get the value - $v_function_name = $p_options_list[$i+1]; - - // ----- Check that the value is a valid existing function - if (!function_exists($v_function_name)) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'"); - // ----- Return - return PclZip::errorCode(); - } - - // ----- Set the attribute - $v_result_list[$p_options_list[$i]] = $v_function_name; - $i++; - break; - default: - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '" .$p_options_list[$i]."'"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Next options - $i++; - } - - // ----- Look for mandatory options - if ($v_requested_options !== false) { - for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { - // ----- Look for mandatory option - if ($v_requested_options[$key] == 'mandatory') { - // ----- Look if present - if (!isset($v_result_list[$key])) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); - - // ----- Return - return PclZip::errorCode(); - } - } - } - } - - // ----- Look for default values - if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privOptionDefaultThreshold() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privOptionDefaultThreshold(&$p_options) - { - $v_result=1; - - if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) { - return $v_result; - } - - // ----- Get 'memory_limit' configuration value - $v_memory_limit = ini_get('memory_limit'); - $v_memory_limit = trim($v_memory_limit); - $last = strtolower(substr($v_memory_limit, -1)); - - if ($last == 'g') { - //$v_memory_limit = $v_memory_limit*1024*1024*1024; - $v_memory_limit = $v_memory_limit*1073741824; - } - if ($last == 'm') { - //$v_memory_limit = $v_memory_limit*1024*1024; - $v_memory_limit = $v_memory_limit*1048576; - } - if ($last == 'k') { - $v_memory_limit = $v_memory_limit*1024; - } - - $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO); - - // ----- Sanity check : No threshold if value lower than 1M - if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { - unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privFileDescrParseAtt() - // Description : - // Parameters : - // Return Values : - // 1 on success. - // 0 on failure. - // -------------------------------------------------------------------------------- - public function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options = false) - { - $v_result=1; - - // ----- For each file in the list check the attributes - foreach ($p_file_list as $v_key => $v_value) { - // ----- Check if the option is supported - if (!isset($v_requested_options[$v_key])) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Look for attribute - switch ($v_key) { - case PCLZIP_ATT_FILE_NAME: - if (!is_string($v_value)) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); - return PclZip::errorCode(); - } - - $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); - - if ($p_filedescr['filename'] == '') { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); - return PclZip::errorCode(); - } - break; - case PCLZIP_ATT_FILE_NEW_SHORT_NAME: - if (!is_string($v_value)) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); - return PclZip::errorCode(); - } - - $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); - - if ($p_filedescr['new_short_name'] == '') { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); - return PclZip::errorCode(); - } - break; - case PCLZIP_ATT_FILE_NEW_FULL_NAME: - if (!is_string($v_value)) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); - return PclZip::errorCode(); - } - - $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); - - if ($p_filedescr['new_full_name'] == '') { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); - return PclZip::errorCode(); - } - break; - // ----- Look for options that takes a string - case PCLZIP_ATT_FILE_COMMENT: - if (!is_string($v_value)) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); - return PclZip::errorCode(); - } - $p_filedescr['comment'] = $v_value; - break; - case PCLZIP_ATT_FILE_MTIME: - if (!is_integer($v_value)) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'"); - return PclZip::errorCode(); - } - $p_filedescr['mtime'] = $v_value; - break; - case PCLZIP_ATT_FILE_CONTENT: - $p_filedescr['content'] = $v_value; - break; - default: - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '".$v_key."'"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Look for mandatory options - if ($v_requested_options !== false) { - for ($key = reset($v_requested_options); $key = key($v_requested_options); $key = next($v_requested_options)) { - // ----- Look for mandatory option - if ($v_requested_options[$key] == 'mandatory') { - // ----- Look if present - if (!isset($p_file_list[$key])) { - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); - return PclZip::errorCode(); - } - } - } - } - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privFileDescrExpand() - // Description : - // This method look for each item of the list to see if its a file, a folder - // or a string to be added as file. For any other type of files (link, other) - // just ignore the item. - // Then prepare the information that will be stored for that file. - // When its a folder, expand the folder with all the files that are in that - // folder (recursively). - // Parameters : - // Return Values : - // 1 on success. - // 0 on failure. - // -------------------------------------------------------------------------------- - public function privFileDescrExpand(&$p_filedescr_list, &$p_options) - { - $v_result=1; - - // ----- Create a result list - $v_result_list = array(); - - // ----- Look each entry - for ($i=0; $i<sizeof($p_filedescr_list); $i++) { - // ----- Get filedescr - $v_descr = $p_filedescr_list[$i]; - - // ----- Reduce the filename - $v_descr['filename'] = PclZipUtilTranslateWinPath($v_descr['filename'], false); - $v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']); - - // ----- Look for real file or folder - if (file_exists($v_descr['filename'])) { - if (@is_file($v_descr['filename'])) { - $v_descr['type'] = 'file'; - } elseif (@is_dir($v_descr['filename'])) { - $v_descr['type'] = 'folder'; - } elseif (@is_link($v_descr['filename'])) { - // skip - continue; - } else { - // skip - continue; - } - } elseif (isset($v_descr['content'])) { - // ----- Look for string added as file - $v_descr['type'] = 'virtual_file'; - } else { - // ----- Missing file - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$v_descr['filename']."' does not exist"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Calculate the stored filename - $this->privCalculateStoredFilename($v_descr, $p_options); - - // ----- Add the descriptor in result list - $v_result_list[sizeof($v_result_list)] = $v_descr; - - // ----- Look for folder - if ($v_descr['type'] == 'folder') { - // ----- List of items in folder - $v_dirlist_descr = array(); - $v_dirlist_nb = 0; - if ($v_folder_handler = @opendir($v_descr['filename'])) { - while (($v_item_handler = @readdir($v_folder_handler)) !== false) { - // ----- Skip '.' and '..' - if (($v_item_handler == '.') || ($v_item_handler == '..')) { - continue; - } - - // ----- Compose the full filename - $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; - - // ----- Look for different stored filename - // Because the name of the folder was changed, the name of the - // files/sub-folders also change - if (($v_descr['stored_filename'] != $v_descr['filename']) - && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { - if ($v_descr['stored_filename'] != '') { - $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; - } else { - $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler; - } - } - $v_dirlist_nb++; - } - - @closedir($v_folder_handler); - } else { - // TBC : unable to open folder in read mode - } - - // ----- Expand each element of the list - if ($v_dirlist_nb != 0) { - // ----- Expand - if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) { - return $v_result; - } - - // ----- Concat the resulting list - $v_result_list = array_merge($v_result_list, $v_dirlist_descr); - } - - // ----- Free local array - unset($v_dirlist_descr); - } - } - - // ----- Get the result list - $p_filedescr_list = $v_result_list; - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privCreate() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privCreate($p_filedescr_list, &$p_result_list, &$p_options) - { - $v_result=1; - $v_list_detail = array(); - - // ----- Magic quotes trick - $this->privDisableMagicQuotes(); - - // ----- Open the file in write mode - if (($v_result = $this->privOpenFd('wb')) != 1) { - // ----- Return - return $v_result; - } - - // ----- Add the list of files - $v_result = $this->privAddList($p_filedescr_list, $p_result_list, $p_options); - - // ----- Close - $this->privCloseFd(); - - // ----- Magic quotes trick - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privAdd() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privAdd($p_filedescr_list, &$p_result_list, &$p_options) - { - $v_result=1; - $v_list_detail = array(); - - // ----- Look if the archive exists or is empty - if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0)) { - // ----- Do a create - $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options); - - // ----- Return - return $v_result; - } - // ----- Magic quotes trick - $this->privDisableMagicQuotes(); - - // ----- Open the zip file - if (($v_result=$this->privOpenFd('rb')) != 1) { - // ----- Magic quotes trick - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_result; - } - - // ----- Read the central directory informations - $v_central_dir = array(); - if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - return $v_result; - } - - // ----- Go to beginning of File - @rewind($this->zip_fd); - - // ----- Creates a temporay file - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; - - // ----- Open the temporary file in write mode - if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) { - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Copy the files from the archive to the temporary file - // TBC : Here I should better append the file and go back to erase the central dir - $v_size = $v_central_dir['offset']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = fread($this->zip_fd, $v_read_size); - @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Swap the file descriptor - // Here is a trick : I swap the temporary fd with the zip fd, in order to use - // the following methods on the temporary fil and not the real archive - $v_swap = $this->zip_fd; - $this->zip_fd = $v_zip_temp_fd; - $v_zip_temp_fd = $v_swap; - - // ----- Add the files - $v_header_list = array(); - if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) { - fclose($v_zip_temp_fd); - $this->privCloseFd(); - @unlink($v_zip_temp_name); - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_result; - } - - // ----- Store the offset of the central dir - $v_offset = @ftell($this->zip_fd); - - // ----- Copy the block of file headers from the old archive - $v_size = $v_central_dir['size']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($v_zip_temp_fd, $v_read_size); - @fwrite($this->zip_fd, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Create the Central Dir files header - for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++) { - // ----- Create the file header - if ($v_header_list[$i]['status'] == 'ok') { - if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) { - fclose($v_zip_temp_fd); - $this->privCloseFd(); - @unlink($v_zip_temp_name); - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_result; - } - $v_count++; - } - - // ----- Transform the header to a 'usable' info - $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); - } - - // ----- Zip file comment - $v_comment = $v_central_dir['comment']; - if (isset($p_options[PCLZIP_OPT_COMMENT])) { - $v_comment = $p_options[PCLZIP_OPT_COMMENT]; - } - if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) { - $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT]; - } - if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) { - $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment; - } - - // ----- Calculate the size of the central header - $v_size = @ftell($this->zip_fd)-$v_offset; - - // ----- Create the central dir footer - if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1) { - // ----- Reset the file list - unset($v_header_list); - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_result; - } - - // ----- Swap back the file descriptor - $v_swap = $this->zip_fd; - $this->zip_fd = $v_zip_temp_fd; - $v_zip_temp_fd = $v_swap; - - // ----- Close - $this->privCloseFd(); - - // ----- Close the temporary file - @fclose($v_zip_temp_fd); - - // ----- Magic quotes trick - $this->privSwapBackMagicQuotes(); - - // ----- Delete the zip file - // TBC : I should test the result ... - @unlink($this->zipname); - - // ----- Rename the temporary file - // TBC : I should test the result ... - //@rename($v_zip_temp_name, $this->zipname); - PclZipUtilRename($v_zip_temp_name, $this->zipname); - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privOpenFd() - // Description : - // Parameters : - // -------------------------------------------------------------------------------- - public function privOpenFd($p_mode) - { - $v_result=1; - - // ----- Look if already open - if ($this->zip_fd != 0) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Open the zip file - if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privCloseFd() - // Description : - // Parameters : - // -------------------------------------------------------------------------------- - public function privCloseFd() - { - $v_result=1; - - if ($this->zip_fd != 0) { - @fclose($this->zip_fd); - } - $this->zip_fd = 0; - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privAddList() - // Description : - // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is - // different from the real path of the file. This is usefull if you want to have PclTar - // running in any directory, and memorize relative path from an other directory. - // Parameters : - // $p_list : An array containing the file or directory names to add in the tar - // $p_result_list : list of added files with their properties (specially the status field) - // $p_add_dir : Path to add in the filename path archived - // $p_remove_dir : Path to remove in the filename path archived - // Return Values : - // -------------------------------------------------------------------------------- - // public function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options) - public function privAddList($p_filedescr_list, &$p_result_list, &$p_options) - { - $v_result=1; - - // ----- Add the files - $v_header_list = array(); - if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) { - // ----- Return - return $v_result; - } - - // ----- Store the offset of the central dir - $v_offset = @ftell($this->zip_fd); - - // ----- Create the Central Dir files header - for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++) { - // ----- Create the file header - if ($v_header_list[$i]['status'] == 'ok') { - if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) { - // ----- Return - return $v_result; - } - $v_count++; - } - - // ----- Transform the header to a 'usable' info - $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); - } - - // ----- Zip file comment - $v_comment = ''; - if (isset($p_options[PCLZIP_OPT_COMMENT])) { - $v_comment = $p_options[PCLZIP_OPT_COMMENT]; - } - - // ----- Calculate the size of the central header - $v_size = @ftell($this->zip_fd)-$v_offset; - - // ----- Create the central dir footer - if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1) { - // ----- Reset the file list - unset($v_header_list); - - // ----- Return - return $v_result; - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privAddFileList() - // Description : - // Parameters : - // $p_filedescr_list : An array containing the file description - // or directory names to add in the zip - // $p_result_list : list of added files with their properties (specially the status field) - // Return Values : - // -------------------------------------------------------------------------------- - public function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options) - { - $v_result=1; - $v_header = array(); - - // ----- Recuperate the current number of elt in list - $v_nb = sizeof($p_result_list); - - // ----- Loop on the files - for ($j=0; ($j<sizeof($p_filedescr_list)) && ($v_result==1); $j++) { - // ----- Format the filename - $p_filedescr_list[$j]['filename'] = PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false); - - // ----- Skip empty file names - // TBC : Can this be possible ? not checked in DescrParseAtt ? - if ($p_filedescr_list[$j]['filename'] == "") { - continue; - } - - // ----- Check the filename - if (($p_filedescr_list[$j]['type'] != 'virtual_file') && (!file_exists($p_filedescr_list[$j]['filename']))) { - PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$p_filedescr_list[$j]['filename']."' does not exist"); - return PclZip::errorCode(); - } - - // ----- Look if it is a file or a dir with no all path remove option - // or a dir with all its path removed - // if ( (is_file($p_filedescr_list[$j]['filename'])) - // || ( is_dir($p_filedescr_list[$j]['filename']) - if (($p_filedescr_list[$j]['type'] == 'file') || ($p_filedescr_list[$j]['type'] == 'virtual_file') || (($p_filedescr_list[$j]['type'] == 'folder') && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]) || !$p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { - // ----- Add the file - $v_result = $this->privAddFile($p_filedescr_list[$j], $v_header, $p_options); - if ($v_result != 1) { - return $v_result; - } - - // ----- Store the file infos - $p_result_list[$v_nb++] = $v_header; - } - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privAddFile() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privAddFile($p_filedescr, &$p_header, &$p_options) - { - $v_result=1; - - // ----- Working variable - $p_filename = $p_filedescr['filename']; - - // TBC : Already done in the fileAtt check ... ? - if ($p_filename == "") { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Look for a stored different filename - /* TBC : Removed - if (isset($p_filedescr['stored_filename'])) { - $v_stored_filename = $p_filedescr['stored_filename']; - } - else { - $v_stored_filename = $p_filedescr['stored_filename']; - } - */ - - // ----- Set the file properties - clearstatcache(); - $p_header['version'] = 20; - $p_header['version_extracted'] = 10; - $p_header['flag'] = 0; - $p_header['compression'] = 0; - $p_header['crc'] = 0; - $p_header['compressed_size'] = 0; - $p_header['filename_len'] = strlen($p_filename); - $p_header['extra_len'] = 0; - $p_header['disk'] = 0; - $p_header['internal'] = 0; - $p_header['offset'] = 0; - $p_header['filename'] = $p_filename; - // TBC : Removed $p_header['stored_filename'] = $v_stored_filename; - $p_header['stored_filename'] = $p_filedescr['stored_filename']; - $p_header['extra'] = ''; - $p_header['status'] = 'ok'; - $p_header['index'] = -1; - - // ----- Look for regular file - if ($p_filedescr['type']=='file') { - $p_header['external'] = 0x00000000; - $p_header['size'] = filesize($p_filename); - } elseif ($p_filedescr['type']=='folder') { - // ----- Look for regular folder - $p_header['external'] = 0x00000010; - $p_header['mtime'] = filemtime($p_filename); - $p_header['size'] = filesize($p_filename); - } elseif ($p_filedescr['type'] == 'virtual_file') { - // ----- Look for virtual file - $p_header['external'] = 0x00000000; - $p_header['size'] = strlen($p_filedescr['content']); - } - - // ----- Look for filetime - if (isset($p_filedescr['mtime'])) { - $p_header['mtime'] = $p_filedescr['mtime']; - } elseif ($p_filedescr['type'] == 'virtual_file') { - $p_header['mtime'] = time(); - } else { - $p_header['mtime'] = filemtime($p_filename); - } - - // ------ Look for file comment - if (isset($p_filedescr['comment'])) { - $p_header['comment_len'] = strlen($p_filedescr['comment']); - $p_header['comment'] = $p_filedescr['comment']; - } else { - $p_header['comment_len'] = 0; - $p_header['comment'] = ''; - } - - // ----- Look for pre-add callback - if (isset($p_options[PCLZIP_CB_PRE_ADD])) { - // ----- Generate a local information - $v_local_header = array(); - $this->privConvertHeader2FileInfo($p_header, $v_local_header); - - // ----- Call the callback - // Here I do not use call_user_func() because I need to send a reference to the - // header. - // eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);'); - $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header); - if ($v_result == 0) { - // ----- Change the file status - $p_header['status'] = "skipped"; - $v_result = 1; - } - - // ----- Update the informations - // Only some fields can be modified - if ($p_header['stored_filename'] != $v_local_header['stored_filename']) { - $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']); - } - } - - // ----- Look for empty stored filename - if ($p_header['stored_filename'] == "") { - $p_header['status'] = "filtered"; - } - - // ----- Check the path length - if (strlen($p_header['stored_filename']) > 0xFF) { - $p_header['status'] = 'filename_too_long'; - } - - // ----- Look if no error, or file not skipped - if ($p_header['status'] == 'ok') { - // ----- Look for a file - if ($p_filedescr['type'] == 'file') { - // ----- Look for using temporary file to zip - if ((!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])))) { - $v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options); - if ($v_result < PCLZIP_ERR_NO_ERROR) { - return $v_result; - } - } else { - // ----- Use "in memory" zip algo - // ----- Open the source file - if (($v_file = @fopen($p_filename, "rb")) == 0) { - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); - return PclZip::errorCode(); - } - - // ----- Read the file content - $v_content = @fread($v_file, $p_header['size']); - - // ----- Close the file - @fclose($v_file); - - // ----- Calculate the CRC - $p_header['crc'] = @crc32($v_content); - - // ----- Look for no compression - if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { - // ----- Set header parameters - $p_header['compressed_size'] = $p_header['size']; - $p_header['compression'] = 0; - } else { - // ----- Look for normal compression - // ----- Compress the content - $v_content = @gzdeflate($v_content); - - // ----- Set header parameters - $p_header['compressed_size'] = strlen($v_content); - $p_header['compression'] = 8; - } - - // ----- Call the header generation - if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { - @fclose($v_file); - return $v_result; - } - - // ----- Write the compressed (or not) content - @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); - } - } elseif ($p_filedescr['type'] == 'virtual_file') { - // ----- Look for a virtual file (a file from string) - $v_content = $p_filedescr['content']; - - // ----- Calculate the CRC - $p_header['crc'] = @crc32($v_content); - - // ----- Look for no compression - if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { - // ----- Set header parameters - $p_header['compressed_size'] = $p_header['size']; - $p_header['compression'] = 0; - } else { - // ----- Look for normal compression - // ----- Compress the content - $v_content = @gzdeflate($v_content); - - // ----- Set header parameters - $p_header['compressed_size'] = strlen($v_content); - $p_header['compression'] = 8; - } - - // ----- Call the header generation - if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { - @fclose($v_file); - return $v_result; - } - - // ----- Write the compressed (or not) content - @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); - } elseif ($p_filedescr['type'] == 'folder') { - // ----- Look for a directory - // ----- Look for directory last '/' - if (@substr($p_header['stored_filename'], -1) != '/') { - $p_header['stored_filename'] .= '/'; - } - - // ----- Set the file properties - $p_header['size'] = 0; - //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked - $p_header['external'] = 0x00000010; // Value for a folder : to be checked - - // ----- Call the header generation - if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { - return $v_result; - } - } - } - - // ----- Look for post-add callback - if (isset($p_options[PCLZIP_CB_POST_ADD])) { - // ----- Generate a local information - $v_local_header = array(); - $this->privConvertHeader2FileInfo($p_header, $v_local_header); - - // ----- Call the callback - // Here I do not use call_user_func() because I need to send a reference to the - // header. - // eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);'); - $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header); - if ($v_result == 0) { - // ----- Ignored - $v_result = 1; - } - - // ----- Update the informations - // Nothing can be modified - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privAddFileUsingTempFile() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) - { - $v_result=PCLZIP_ERR_NO_ERROR; - - // ----- Working variable - $p_filename = $p_filedescr['filename']; - - - // ----- Open the source file - if (($v_file = @fopen($p_filename, "rb")) == 0) { - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); - return PclZip::errorCode(); - } - - // ----- Creates a compressed temporary file - $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; - if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) { - fclose($v_file); - PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); - return PclZip::errorCode(); - } - - // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks - $v_size = filesize($p_filename); - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($v_file, $v_read_size); - //$v_binary_data = pack('a'.$v_read_size, $v_buffer); - @gzputs($v_file_compressed, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Close the file - @fclose($v_file); - @gzclose($v_file_compressed); - - // ----- Check the minimum file size - if (filesize($v_gzip_temp_name) < 18) { - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes'); - return PclZip::errorCode(); - } - - // ----- Extract the compressed attributes - if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); - return PclZip::errorCode(); - } - - // ----- Read the gzip file header - $v_binary_data = @fread($v_file_compressed, 10); - $v_data_header = unpack('a1id1/a1id2/a1cm/a1flag/Vmtime/a1xfl/a1os', $v_binary_data); - - // ----- Check some parameters - $v_data_header['os'] = bin2hex($v_data_header['os']); - - // ----- Read the gzip file footer - @fseek($v_file_compressed, filesize($v_gzip_temp_name)-8); - $v_binary_data = @fread($v_file_compressed, 8); - $v_data_footer = unpack('Vcrc/Vcompressed_size', $v_binary_data); - - // ----- Set the attributes - $p_header['compression'] = ord($v_data_header['cm']); - //$p_header['mtime'] = $v_data_header['mtime']; - $p_header['crc'] = $v_data_footer['crc']; - $p_header['compressed_size'] = filesize($v_gzip_temp_name)-18; - - // ----- Close the file - @fclose($v_file_compressed); - - // ----- Call the header generation - if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { - return $v_result; - } - - // ----- Add the compressed data - if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); - return PclZip::errorCode(); - } - - // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks - fseek($v_file_compressed, 10); - $v_size = $p_header['compressed_size']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($v_file_compressed, $v_read_size); - //$v_binary_data = pack('a'.$v_read_size, $v_buffer); - @fwrite($this->zip_fd, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Close the file - @fclose($v_file_compressed); - - // ----- Unlink the temporary file - @unlink($v_gzip_temp_name); - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privCalculateStoredFilename() - // Description : - // Based on file descriptor properties and global options, this method - // calculate the filename that will be stored in the archive. - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privCalculateStoredFilename(&$p_filedescr, &$p_options) - { - $v_result=1; - - // ----- Working variables - $p_filename = $p_filedescr['filename']; - if (isset($p_options[PCLZIP_OPT_ADD_PATH])) { - $p_add_dir = $p_options[PCLZIP_OPT_ADD_PATH]; - } else { - $p_add_dir = ''; - } - if (isset($p_options[PCLZIP_OPT_REMOVE_PATH])) { - $p_remove_dir = $p_options[PCLZIP_OPT_REMOVE_PATH]; - } else { - $p_remove_dir = ''; - } - if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { - $p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH]; - } else { - $p_remove_all_dir = 0; - } - - // ----- Look for full name change - if (isset($p_filedescr['new_full_name'])) { - // ----- Remove drive letter if any - $v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']); - } else { - // ----- Look for path and/or short name change - // ----- Look for short name change - // Its when we cahnge just the filename but not the path - if (isset($p_filedescr['new_short_name'])) { - $v_path_info = pathinfo($p_filename); - $v_dir = ''; - if ($v_path_info['dirname'] != '') { - $v_dir = $v_path_info['dirname'].'/'; - } - $v_stored_filename = $v_dir.$p_filedescr['new_short_name']; - } else { - // ----- Calculate the stored filename - $v_stored_filename = $p_filename; - } - - // ----- Look for all path to remove - if ($p_remove_all_dir) { - $v_stored_filename = basename($p_filename); - } elseif ($p_remove_dir != "") { - // ----- Look for partial path remove - if (substr($p_remove_dir, -1) != '/') { - $p_remove_dir .= "/"; - } - - if ((substr($p_filename, 0, 2) == "./") || (substr($p_remove_dir, 0, 2) == "./")) { - if ((substr($p_filename, 0, 2) == "./") && (substr($p_remove_dir, 0, 2) != "./")) { - $p_remove_dir = "./".$p_remove_dir; - } - if ((substr($p_filename, 0, 2) != "./") && (substr($p_remove_dir, 0, 2) == "./")) { - $p_remove_dir = substr($p_remove_dir, 2); - } - } - - $v_compare = PclZipUtilPathInclusion($p_remove_dir, $v_stored_filename); - if ($v_compare > 0) { - if ($v_compare == 2) { - $v_stored_filename = ""; - } else { - $v_stored_filename = substr($v_stored_filename, strlen($p_remove_dir)); - } - } - } - - // ----- Remove drive letter if any - $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename); - - // ----- Look for path to add - if ($p_add_dir != "") { - if (substr($p_add_dir, -1) == "/") { - $v_stored_filename = $p_add_dir.$v_stored_filename; - } else { - $v_stored_filename = $p_add_dir."/".$v_stored_filename; - } - } - } - - // ----- Filename (reduce the path of stored name) - $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); - $p_filedescr['stored_filename'] = $v_stored_filename; - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privWriteFileHeader() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privWriteFileHeader(&$p_header) - { - $v_result=1; - - // ----- Store the offset position of the file - $p_header['offset'] = ftell($this->zip_fd); - - // ----- Transform UNIX mtime to DOS format mdate/mtime - $v_date = getdate($p_header['mtime']); - $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; - $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; - - // ----- Packed data - $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50, $p_header['version_extracted'], $p_header['flag'], $p_header['compression'], $v_mtime, $v_mdate, $p_header['crc'], $p_header['compressed_size'], $p_header['size'], strlen($p_header['stored_filename']), $p_header['extra_len']); - - // ----- Write the first 148 bytes of the header in the archive - fputs($this->zip_fd, $v_binary_data, 30); - - // ----- Write the variable fields - if (strlen($p_header['stored_filename']) != 0) { - fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); - } - if ($p_header['extra_len'] != 0) { - fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privWriteCentralFileHeader() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privWriteCentralFileHeader(&$p_header) - { - $v_result=1; - - // TBC - //for(reset($p_header); $key = key($p_header); next($p_header)) { - //} - - // ----- Transform UNIX mtime to DOS format mdate/mtime - $v_date = getdate($p_header['mtime']); - $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; - $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; - - - // ----- Packed data - $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, $p_header['version'], $p_header['version_extracted'], $p_header['flag'], $p_header['compression'], $v_mtime, $v_mdate, $p_header['crc'], $p_header['compressed_size'], $p_header['size'], strlen($p_header['stored_filename']), $p_header['extra_len'], $p_header['comment_len'], $p_header['disk'], $p_header['internal'], $p_header['external'], $p_header['offset']); - - // ----- Write the 42 bytes of the header in the zip file - fputs($this->zip_fd, $v_binary_data, 46); - - // ----- Write the variable fields - if (strlen($p_header['stored_filename']) != 0) { - fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); - } - if ($p_header['extra_len'] != 0) { - fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); - } - if ($p_header['comment_len'] != 0) { - fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privWriteCentralHeader() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) - { - $v_result = 1; - - // ----- Packed data - $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries, $p_nb_entries, $p_size, $p_offset, strlen($p_comment)); - - // ----- Write the 22 bytes of the header in the zip file - fputs($this->zip_fd, $v_binary_data, 22); - - // ----- Write the variable fields - if (strlen($p_comment) != 0) { - fputs($this->zip_fd, $p_comment, strlen($p_comment)); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privList() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privList(&$p_list) - { - $v_result = 1; - - // ----- Magic quotes trick - $this->privDisableMagicQuotes(); - - // ----- Open the zip file - if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) { - // ----- Magic quotes trick - $this->privSwapBackMagicQuotes(); - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read the central directory informations - $v_central_dir = array(); - if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { - $this->privSwapBackMagicQuotes(); - return $v_result; - } - - // ----- Go to beginning of Central Dir - @rewind($this->zip_fd); - if (@fseek($this->zip_fd, $v_central_dir['offset'])) { - $this->privSwapBackMagicQuotes(); - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read each entry - for ($i=0; $i<$v_central_dir['entries']; $i++) { - // ----- Read the file header - if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) { - $this->privSwapBackMagicQuotes(); - return $v_result; - } - $v_header['index'] = $i; - - // ----- Get the only interesting attributes - $this->privConvertHeader2FileInfo($v_header, $p_list[$i]); - unset($v_header); - } - - // ----- Close the zip file - $this->privCloseFd(); - - // ----- Magic quotes trick - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privConvertHeader2FileInfo() - // Description : - // This function takes the file informations from the central directory - // entries and extract the interesting parameters that will be given back. - // The resulting file infos are set in the array $p_info - // $p_info['filename'] : Filename with full path. Given by user (add), - // extracted in the filesystem (extract). - // $p_info['stored_filename'] : Stored filename in the archive. - // $p_info['size'] = Size of the file. - // $p_info['compressed_size'] = Compressed size of the file. - // $p_info['mtime'] = Last modification date of the file. - // $p_info['comment'] = Comment associated with the file. - // $p_info['folder'] = true/false : indicates if the entry is a folder or not. - // $p_info['status'] = status of the action on the file. - // $p_info['crc'] = CRC of the file content. - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privConvertHeader2FileInfo($p_header, &$p_info) - { - $v_result=1; - - // ----- Get the interesting attributes - $v_temp_path = PclZipUtilPathReduction($p_header['filename']); - $p_info['filename'] = $v_temp_path; - $v_temp_path = PclZipUtilPathReduction($p_header['stored_filename']); - $p_info['stored_filename'] = $v_temp_path; - $p_info['size'] = $p_header['size']; - $p_info['compressed_size'] = $p_header['compressed_size']; - $p_info['mtime'] = $p_header['mtime']; - $p_info['comment'] = $p_header['comment']; - $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010); - $p_info['index'] = $p_header['index']; - $p_info['status'] = $p_header['status']; - $p_info['crc'] = $p_header['crc']; - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privExtractByRule() - // Description : - // Extract a file or directory depending of rules (by index, by name, ...) - // Parameters : - // $p_file_list : An array where will be placed the properties of each - // extracted file - // $p_path : Path to add while writing the extracted files - // $p_remove_path : Path to remove (from the file memorized path) while writing the - // extracted files. If the path does not match the file path, - // the file is extracted with its memorized path. - // $p_remove_path does not apply to 'list' mode. - // $p_path and $p_remove_path are commulative. - // Return Values : - // 1 on success,0 or less on error (see error code list) - // -------------------------------------------------------------------------------- - public function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) - { - $v_result=1; - - // ----- Magic quotes trick - $this->privDisableMagicQuotes(); - - // ----- Check the path - if (($p_path == "") || ((substr($p_path, 0, 1) != "/") && (substr($p_path, 0, 3) != "../") && (substr($p_path, 1, 2)!=":/"))) { - $p_path = "./".$p_path; - } - - // ----- Reduce the path last (and duplicated) '/' - if (($p_path != "./") && ($p_path != "/")) { - // ----- Look for the path end '/' - while (substr($p_path, -1) == "/") { - $p_path = substr($p_path, 0, strlen($p_path)-1); - } - } - - // ----- Look for path to remove format (should end by /) - if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/')) { - $p_remove_path .= '/'; - } - $p_remove_path_size = strlen($p_remove_path); - - // ----- Open the zip file - if (($v_result = $this->privOpenFd('rb')) != 1) { - $this->privSwapBackMagicQuotes(); - return $v_result; - } - - // ----- Read the central directory informations - $v_central_dir = array(); - if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { - // ----- Close the zip file - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - - return $v_result; - } - - // ----- Start at beginning of Central Dir - $v_pos_entry = $v_central_dir['offset']; - - // ----- Read each entry - $j_start = 0; - for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) { - // ----- Read next Central dir entry - @rewind($this->zip_fd); - if (@fseek($this->zip_fd, $v_pos_entry)) { - // ----- Close the zip file - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read the file header - $v_header = array(); - if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) { - // ----- Close the zip file - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - - return $v_result; - } - - // ----- Store the index - $v_header['index'] = $i; - - // ----- Store the file position - $v_pos_entry = ftell($this->zip_fd); - - // ----- Look for the specific extract rules - $v_extract = false; - - // ----- Look for extract by name rule - if ((isset($p_options[PCLZIP_OPT_BY_NAME])) && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { - // ----- Look if the filename is in the list - for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_extract); $j++) { - // ----- Look for a directory - if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") { - // ----- Look if the directory is in the filename path - if ((strlen($v_header['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { - $v_extract = true; - } - } elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { - // ----- Look for a filename - $v_extract = true; - } - } - } elseif ((isset($p_options[PCLZIP_OPT_BY_PREG])) && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { - // ----- Look for extract by preg rule - if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) { - $v_extract = true; - } - } elseif ((isset($p_options[PCLZIP_OPT_BY_INDEX])) && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { - // ----- Look for extract by index rule - // ----- Look if the index is in the list - for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) { - if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { - $v_extract = true; - } - if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { - $j_start = $j+1; - } - - if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { - break; - } - } - } else { - // ----- Look for no rule, which means extract all the archive - $v_extract = true; - } - - // ----- Check compression method - if (($v_extract) && (($v_header['compression'] != 8) && ($v_header['compression'] != 0))) { - $v_header['status'] = 'unsupported_compression'; - - // ----- Look for PCLZIP_OPT_STOP_ON_ERROR - if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { - $this->privSwapBackMagicQuotes(); - - PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, "Filename '".$v_header['stored_filename']."' is compressed by an unsupported compression method (".$v_header['compression'].") "); - - return PclZip::errorCode(); - } - } - - // ----- Check encrypted files - if (($v_extract) && (($v_header['flag'] & 1) == 1)) { - $v_header['status'] = 'unsupported_encryption'; - // ----- Look for PCLZIP_OPT_STOP_ON_ERROR - if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { - $this->privSwapBackMagicQuotes(); - - PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, "Unsupported encryption for filename '".$v_header['stored_filename']."'"); - - return PclZip::errorCode(); - } - } - - // ----- Look for real extraction - if (($v_extract) && ($v_header['status'] != 'ok')) { - $v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++]); - if ($v_result != 1) { - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - return $v_result; - } - - $v_extract = false; - } - - // ----- Look for real extraction - if ($v_extract) { - // ----- Go to the file position - @rewind($this->zip_fd); - if (@fseek($this->zip_fd, $v_header['offset'])) { - // ----- Close the zip file - $this->privCloseFd(); - - $this->privSwapBackMagicQuotes(); - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Look for extraction as string - if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) { - $v_string = ''; - - // ----- Extracting the file - $v_result1 = $this->privExtractFileAsString($v_header, $v_string, $p_options); - if ($v_result1 < 1) { - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - return $v_result1; - } - - // ----- Get the only interesting attributes - if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1) { - // ----- Close the zip file - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - - return $v_result; - } - - // ----- Set the file content - $p_file_list[$v_nb_extracted]['content'] = $v_string; - - // ----- Next extracted file - $v_nb_extracted++; - - // ----- Look for user callback abort - if ($v_result1 == 2) { - break; - } - } elseif ((isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) { - // ----- Look for extraction in standard output - // ----- Extracting the file in standard output - $v_result1 = $this->privExtractFileInOutput($v_header, $p_options); - if ($v_result1 < 1) { - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - return $v_result1; - } - - // ----- Get the only interesting attributes - if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) { - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - return $v_result; - } - - // ----- Look for user callback abort - if ($v_result1 == 2) { - break; - } - } else { - // ----- Look for normal extraction - // ----- Extracting the file - $v_result1 = $this->privExtractFile($v_header, $p_path, $p_remove_path, $p_remove_all_path, $p_options); - if ($v_result1 < 1) { - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - return $v_result1; - } - - // ----- Get the only interesting attributes - if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) { - // ----- Close the zip file - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - - return $v_result; - } - - // ----- Look for user callback abort - if ($v_result1 == 2) { - break; - } - } - } - } - - // ----- Close the zip file - $this->privCloseFd(); - $this->privSwapBackMagicQuotes(); - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privExtractFile() - // Description : - // Parameters : - // Return Values : - // - // 1 : ... ? - // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback - // -------------------------------------------------------------------------------- - public function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) - { - $v_result=1; - - // ----- Read the file header - if (($v_result = $this->privReadFileHeader($v_header)) != 1) { - // ----- Return - return $v_result; - } - - - // ----- Check that the file header is coherent with $p_entry info - if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { - // TBC - } - - // ----- Look for all path to remove - if ($p_remove_all_path == true) { - // ----- Look for folder entry that not need to be extracted - if (($p_entry['external']&0x00000010)==0x00000010) { - $p_entry['status'] = "filtered"; - - return $v_result; - } - - // ----- Get the basename of the path - $p_entry['filename'] = basename($p_entry['filename']); - } elseif ($p_remove_path != "") { - // ----- Look for path to remove - if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2) { - // ----- Change the file status - $p_entry['status'] = "filtered"; - - // ----- Return - return $v_result; - } - - $p_remove_path_size = strlen($p_remove_path); - if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path) { - // ----- Remove the path - $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size); - } - } - - // ----- Add the path - if ($p_path != '') { - $p_entry['filename'] = $p_path."/".$p_entry['filename']; - } - - // ----- Check a base_dir_restriction - if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { - $v_inclusion = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], $p_entry['filename']); - if ($v_inclusion == 0) { - PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, "Filename '".$p_entry['filename']."' is outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); - - return PclZip::errorCode(); - } - } - - // ----- Look for pre-extract callback - if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { - // ----- Generate a local information - $v_local_header = array(); - $this->privConvertHeader2FileInfo($p_entry, $v_local_header); - - // ----- Call the callback - // Here I do not use call_user_func() because I need to send a reference to the - // header. - // eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); - $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); - if ($v_result == 0) { - // ----- Change the file status - $p_entry['status'] = "skipped"; - $v_result = 1; - } - - // ----- Look for abort result - if ($v_result == 2) { - // ----- This status is internal and will be changed in 'skipped' - $p_entry['status'] = "aborted"; - $v_result = PCLZIP_ERR_USER_ABORTED; - } - - // ----- Update the informations - // Only some fields can be modified - $p_entry['filename'] = $v_local_header['filename']; - } - - // ----- Look if extraction should be done - if ($p_entry['status'] == 'ok') { - // ----- Look for specific actions while the file exist - if (file_exists($p_entry['filename'])) { - // ----- Look if file is a directory - if (is_dir($p_entry['filename'])) { - // ----- Change the file status - $p_entry['status'] = "already_a_directory"; - - // ----- Look for PCLZIP_OPT_STOP_ON_ERROR - // For historical reason first PclZip implementation does not stop - // when this kind of error occurs. - if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { - PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, "Filename '".$p_entry['filename']."' is already used by an existing directory"); - return PclZip::errorCode(); - } - } elseif (!is_writeable($p_entry['filename'])) { - // ----- Look if file is write protected - // ----- Change the file status - $p_entry['status'] = "write_protected"; - - // ----- Look for PCLZIP_OPT_STOP_ON_ERROR - // For historical reason first PclZip implementation does not stop - // when this kind of error occurs. - if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { - PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Filename '".$p_entry['filename']."' exists and is write protected"); - return PclZip::errorCode(); - } - } elseif (filemtime($p_entry['filename']) > $p_entry['mtime']) { - // ----- Look if the extracted file is older - // ----- Change the file status - if ((isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) && ($p_options[PCLZIP_OPT_REPLACE_NEWER] === true)) { - } else { - $p_entry['status'] = "newer_exist"; - - // ----- Look for PCLZIP_OPT_STOP_ON_ERROR - // For historical reason first PclZip implementation does not stop - // when this kind of error occurs. - if ((isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) && ($p_options[PCLZIP_OPT_STOP_ON_ERROR] === true)) { - PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, "Newer version of '".$p_entry['filename']."' exists and option PCLZIP_OPT_REPLACE_NEWER is not selected"); - return PclZip::errorCode(); - } - } - } else { - } - } else { - // ----- Check the directory availability and create it if necessary - if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/')) { - $v_dir_to_check = $p_entry['filename']; - } elseif (!strstr($p_entry['filename'], "/")) { - $v_dir_to_check = ""; - } else { - $v_dir_to_check = dirname($p_entry['filename']); - } - - if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) { - // ----- Change the file status - $p_entry['status'] = "path_creation_fail"; - - // ----- Return - //return $v_result; - $v_result = 1; - } - } - } - - // ----- Look if extraction should be done - if ($p_entry['status'] == 'ok') { - // ----- Do the extraction (if not a folder) - if (!(($p_entry['external']&0x00000010) == 0x00000010)) { - // ----- Look for not compressed file - if ($p_entry['compression'] == 0) { - // ----- Opening destination file - if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { - // ----- Change the file status - $p_entry['status'] = "write_error"; - - // ----- Return - return $v_result; - } - - // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks - $v_size = $p_entry['compressed_size']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($this->zip_fd, $v_read_size); - /* Try to speed up the code - $v_binary_data = pack('a'.$v_read_size, $v_buffer); - @fwrite($v_dest_file, $v_binary_data, $v_read_size); - */ - @fwrite($v_dest_file, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Closing the destination file - fclose($v_dest_file); - - // ----- Change the file mtime - touch($p_entry['filename'], $p_entry['mtime']); - } else { - // ----- TBC - // Need to be finished - if (($p_entry['flag'] & 1) == 1) { - PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); - return PclZip::errorCode(); - } - - // ----- Look for using temporary file to unzip - if ((!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])))) { - $v_result = $this->privExtractFileUsingTempFile($p_entry, $p_options); - if ($v_result < PCLZIP_ERR_NO_ERROR) { - return $v_result; - } - } else { - // ----- Look for extract in memory - // ----- Read the compressed file in a buffer (one shot) - $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); - - // ----- Decompress the file - $v_file_content = @gzinflate($v_buffer); - unset($v_buffer); - if ($v_file_content === false) { - // ----- Change the file status - // TBC - $p_entry['status'] = "error"; - - return $v_result; - } - - // ----- Opening destination file - if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { - // ----- Change the file status - $p_entry['status'] = "write_error"; - - return $v_result; - } - - // ----- Write the uncompressed data - @fwrite($v_dest_file, $v_file_content, $p_entry['size']); - unset($v_file_content); - - // ----- Closing the destination file - @fclose($v_dest_file); - } - - // ----- Change the file mtime - @touch($p_entry['filename'], $p_entry['mtime']); - } - - // ----- Look for chmod option - if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) { - // ----- Change the mode of the file - @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]); - } - } - } - - // ----- Change abort status - if ($p_entry['status'] == "aborted") { - $p_entry['status'] = "skipped"; - } elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { - // ----- Look for post-extract callback - // ----- Generate a local information - $v_local_header = array(); - $this->privConvertHeader2FileInfo($p_entry, $v_local_header); - - // ----- Call the callback - // Here I do not use call_user_func() because I need to send a reference to the - // header. - // eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); - $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); - - // ----- Look for abort result - if ($v_result == 2) { - $v_result = PCLZIP_ERR_USER_ABORTED; - } - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privExtractFileUsingTempFile() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privExtractFileUsingTempFile(&$p_entry, &$p_options) - { - $v_result=1; - - // ----- Creates a temporary file - $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; - if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) { - fclose($v_file); - PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); - return PclZip::errorCode(); - } - - // ----- Write gz file format header - $v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3)); - @fwrite($v_dest_file, $v_binary_data, 10); - - // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks - $v_size = $p_entry['compressed_size']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($this->zip_fd, $v_read_size); - //$v_binary_data = pack('a'.$v_read_size, $v_buffer); - @fwrite($v_dest_file, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Write gz file format footer - $v_binary_data = pack('VV', $p_entry['crc'], $p_entry['size']); - @fwrite($v_dest_file, $v_binary_data, 8); - - // ----- Close the temporary file - @fclose($v_dest_file); - - // ----- Opening destination file - if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { - $p_entry['status'] = "write_error"; - return $v_result; - } - - // ----- Open the temporary gz file - if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) { - @fclose($v_dest_file); - $p_entry['status'] = "read_error"; - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); - return PclZip::errorCode(); - } - - // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks - $v_size = $p_entry['size']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @gzread($v_src_file, $v_read_size); - //$v_binary_data = pack('a'.$v_read_size, $v_buffer); - @fwrite($v_dest_file, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - @fclose($v_dest_file); - @gzclose($v_src_file); - - // ----- Delete the temporary file - @unlink($v_gzip_temp_name); - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privExtractFileInOutput() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privExtractFileInOutput(&$p_entry, &$p_options) - { - $v_result=1; - - // ----- Read the file header - if (($v_result = $this->privReadFileHeader($v_header)) != 1) { - return $v_result; - } - - // ----- Check that the file header is coherent with $p_entry info - if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { - // TBC - } - - // ----- Look for pre-extract callback - if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { - // ----- Generate a local information - $v_local_header = array(); - $this->privConvertHeader2FileInfo($p_entry, $v_local_header); - - // ----- Call the callback - // Here I do not use call_user_func() because I need to send a reference to the - // header. - // eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); - $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); - if ($v_result == 0) { - // ----- Change the file status - $p_entry['status'] = "skipped"; - $v_result = 1; - } - - // ----- Look for abort result - if ($v_result == 2) { - // ----- This status is internal and will be changed in 'skipped' - $p_entry['status'] = "aborted"; - $v_result = PCLZIP_ERR_USER_ABORTED; - } - - // ----- Update the informations - // Only some fields can be modified - $p_entry['filename'] = $v_local_header['filename']; - } - - // ----- Trace - - // ----- Look if extraction should be done - if ($p_entry['status'] == 'ok') { - // ----- Do the extraction (if not a folder) - if (!(($p_entry['external']&0x00000010)==0x00000010)) { - // ----- Look for not compressed file - if ($p_entry['compressed_size'] == $p_entry['size']) { - // ----- Read the file in a buffer (one shot) - $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); - - // ----- Send the file to the output - echo $v_buffer; - unset($v_buffer); - } else { - // ----- Read the compressed file in a buffer (one shot) - $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); - - // ----- Decompress the file - $v_file_content = gzinflate($v_buffer); - unset($v_buffer); - - // ----- Send the file to the output - echo $v_file_content; - unset($v_file_content); - } - } - } - - // ----- Change abort status - if ($p_entry['status'] == "aborted") { - $p_entry['status'] = "skipped"; - } elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { - // ----- Look for post-extract callback - - // ----- Generate a local information - $v_local_header = array(); - $this->privConvertHeader2FileInfo($p_entry, $v_local_header); - - // ----- Call the callback - // Here I do not use call_user_func() because I need to send a reference to the - // header. - // eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); - $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); - - // ----- Look for abort result - if ($v_result == 2) { - $v_result = PCLZIP_ERR_USER_ABORTED; - } - } - - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privExtractFileAsString() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privExtractFileAsString(&$p_entry, &$p_string, &$p_options) - { - $v_result=1; - - // ----- Read the file header - $v_header = array(); - if (($v_result = $this->privReadFileHeader($v_header)) != 1) { - // ----- Return - return $v_result; - } - - // ----- Check that the file header is coherent with $p_entry info - if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { - // TBC - } - - // ----- Look for pre-extract callback - if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { - // ----- Generate a local information - $v_local_header = array(); - $this->privConvertHeader2FileInfo($p_entry, $v_local_header); - - // ----- Call the callback - // Here I do not use call_user_func() because I need to send a reference to the - // header. - // eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); - $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); - if ($v_result == 0) { - // ----- Change the file status - $p_entry['status'] = "skipped"; - $v_result = 1; - } - - // ----- Look for abort result - if ($v_result == 2) { - // ----- This status is internal and will be changed in 'skipped' - $p_entry['status'] = "aborted"; - $v_result = PCLZIP_ERR_USER_ABORTED; - } - - // ----- Update the informations - // Only some fields can be modified - $p_entry['filename'] = $v_local_header['filename']; - } - - // ----- Look if extraction should be done - if ($p_entry['status'] == 'ok') { - // ----- Do the extraction (if not a folder) - if (!(($p_entry['external']&0x00000010)==0x00000010)) { - // ----- Look for not compressed file - // if ($p_entry['compressed_size'] == $p_entry['size']) - if ($p_entry['compression'] == 0) { - // ----- Reading the file - $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); - } else { - // ----- Reading the file - $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); - - // ----- Decompress the file - if (($p_string = @gzinflate($v_data)) === false) { - // TBC - } - } - // ----- Trace - } else { - // TBC : error : can not extract a folder in a string - } - } - - // ----- Change abort status - if ($p_entry['status'] == "aborted") { - $p_entry['status'] = "skipped"; - } elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { - // ----- Look for post-extract callback - // ----- Generate a local information - $v_local_header = array(); - $this->privConvertHeader2FileInfo($p_entry, $v_local_header); - - // ----- Swap the content to header - $v_local_header['content'] = $p_string; - $p_string = ''; - - // ----- Call the callback - // Here I do not use call_user_func() because I need to send a reference to the - // header. - // eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); - $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); - - // ----- Swap back the content to header - $p_string = $v_local_header['content']; - unset($v_local_header['content']); - - // ----- Look for abort result - if ($v_result == 2) { - $v_result = PCLZIP_ERR_USER_ABORTED; - } - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privReadFileHeader() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privReadFileHeader(&$p_header) - { - $v_result=1; - - // ----- Read the 4 bytes signature - $v_binary_data = @fread($this->zip_fd, 4); - $v_data = unpack('Vid', $v_binary_data); - - // ----- Check signature - if ($v_data['id'] != 0x04034b50) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read the first 42 bytes of the header - $v_binary_data = fread($this->zip_fd, 26); - - // ----- Look for invalid block size - if (strlen($v_binary_data) != 26) { - $p_header['filename'] = ""; - $p_header['status'] = "invalid_header"; - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Extract the values - $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data); - - // ----- Get filename - $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']); - - // ----- Get extra_fields - if ($v_data['extra_len'] != 0) { - $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']); - } else { - $p_header['extra'] = ''; - } - - // ----- Extract properties - $p_header['version_extracted'] = $v_data['version']; - $p_header['compression'] = $v_data['compression']; - $p_header['size'] = $v_data['size']; - $p_header['compressed_size'] = $v_data['compressed_size']; - $p_header['crc'] = $v_data['crc']; - $p_header['flag'] = $v_data['flag']; - $p_header['filename_len'] = $v_data['filename_len']; - - // ----- Recuperate date in UNIX format - $p_header['mdate'] = $v_data['mdate']; - $p_header['mtime'] = $v_data['mtime']; - if ($p_header['mdate'] && $p_header['mtime']) { - // ----- Extract time - $v_hour = ($p_header['mtime'] & 0xF800) >> 11; - $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; - $v_seconde = ($p_header['mtime'] & 0x001F)*2; - - // ----- Extract date - $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; - $v_month = ($p_header['mdate'] & 0x01E0) >> 5; - $v_day = $p_header['mdate'] & 0x001F; - - // ----- Get UNIX date format - $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); - - } else { - $p_header['mtime'] = time(); - } - - // TBC - //for(reset($v_data); $key = key($v_data); next($v_data)) { - //} - - // ----- Set the stored filename - $p_header['stored_filename'] = $p_header['filename']; - - // ----- Set the status field - $p_header['status'] = "ok"; - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privReadCentralFileHeader() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privReadCentralFileHeader(&$p_header) - { - $v_result = 1; - - // ----- Read the 4 bytes signature - $v_binary_data = @fread($this->zip_fd, 4); - $v_data = unpack('Vid', $v_binary_data); - - // ----- Check signature - if ($v_data['id'] != 0x02014b50) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read the first 42 bytes of the header - $v_binary_data = fread($this->zip_fd, 42); - - // ----- Look for invalid block size - if (strlen($v_binary_data) != 42) { - $p_header['filename'] = ""; - $p_header['status'] = "invalid_header"; - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Extract the values - $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data); - - // ----- Get filename - if ($p_header['filename_len'] != 0) { - $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']); - } else { - $p_header['filename'] = ''; - } - - // ----- Get extra - if ($p_header['extra_len'] != 0) { - $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']); - } else { - $p_header['extra'] = ''; - } - - // ----- Get comment - if ($p_header['comment_len'] != 0) { - $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']); - } else { - $p_header['comment'] = ''; - } - - // ----- Extract properties - - // ----- Recuperate date in UNIX format - //if ($p_header['mdate'] && $p_header['mtime']) - // TBC : bug : this was ignoring time with 0/0/0 - if (1) { - // ----- Extract time - $v_hour = ($p_header['mtime'] & 0xF800) >> 11; - $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; - $v_seconde = ($p_header['mtime'] & 0x001F)*2; - - // ----- Extract date - $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; - $v_month = ($p_header['mdate'] & 0x01E0) >> 5; - $v_day = $p_header['mdate'] & 0x001F; - - // ----- Get UNIX date format - $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); - - } else { - $p_header['mtime'] = time(); - } - - // ----- Set the stored filename - $p_header['stored_filename'] = $p_header['filename']; - - // ----- Set default status to ok - $p_header['status'] = 'ok'; - - // ----- Look if it is a directory - if (substr($p_header['filename'], -1) == '/') { - //$p_header['external'] = 0x41FF0010; - $p_header['external'] = 0x00000010; - } - - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privCheckFileHeaders() - // Description : - // Parameters : - // Return Values : - // 1 on success, - // 0 on error; - // -------------------------------------------------------------------------------- - public function privCheckFileHeaders(&$p_local_header, &$p_central_header) - { - $v_result=1; - - // ----- Check the static values - // TBC - if ($p_local_header['filename'] != $p_central_header['filename']) { - } - if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) { - } - if ($p_local_header['flag'] != $p_central_header['flag']) { - } - if ($p_local_header['compression'] != $p_central_header['compression']) { - } - if ($p_local_header['mtime'] != $p_central_header['mtime']) { - } - if ($p_local_header['filename_len'] != $p_central_header['filename_len']) { - } - - // ----- Look for flag bit 3 - if (($p_local_header['flag'] & 8) == 8) { - $p_local_header['size'] = $p_central_header['size']; - $p_local_header['compressed_size'] = $p_central_header['compressed_size']; - $p_local_header['crc'] = $p_central_header['crc']; - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privReadEndCentralDir() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privReadEndCentralDir(&$p_central_dir) - { - $v_result=1; - - // ----- Go to the end of the zip file - $v_size = filesize($this->zipname); - @fseek($this->zip_fd, $v_size); - if (@ftell($this->zip_fd) != $v_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\''); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- First try : look if this is an archive with no commentaries (most of the time) - // in this case the end of central dir is at 22 bytes of the file end - $v_found = 0; - if ($v_size > 26) { - @fseek($this->zip_fd, $v_size-22); - if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22)) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read for bytes - $v_binary_data = @fread($this->zip_fd, 4); - $v_data = @unpack('Vid', $v_binary_data); - - // ----- Check signature - if ($v_data['id'] == 0x06054b50) { - $v_found = 1; - } - - $v_pos = ftell($this->zip_fd); - } - - // ----- Go back to the maximum possible size of the Central Dir End Record - if (!$v_found) { - $v_maximum_size = 65557; // 0xFFFF + 22; - if ($v_maximum_size > $v_size) { - $v_maximum_size = $v_size; - } - @fseek($this->zip_fd, $v_size-$v_maximum_size); - if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size)) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read byte per byte in order to find the signature - $v_pos = ftell($this->zip_fd); - $v_bytes = 0x00000000; - while ($v_pos < $v_size) { - // ----- Read a byte - $v_byte = @fread($this->zip_fd, 1); - - // ----- Add the byte - //$v_bytes = ($v_bytes << 8) | Ord($v_byte); - // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number - // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. - $v_bytes = (($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); - - // ----- Compare the bytes - if ($v_bytes == 0x504b0506) { - $v_pos++; - break; - } - - $v_pos++; - } - - // ----- Look if not found end of central dir - if ($v_pos == $v_size) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); - - // ----- Return - return PclZip::errorCode(); - } - } - - // ----- Read the first 18 bytes of the header - $v_binary_data = fread($this->zip_fd, 18); - - // ----- Look for invalid block size - if (strlen($v_binary_data) != 18) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Extract the values - $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data); - - // ----- Check the global size - if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { - // ----- Removed in release 2.2 see readme file - // The check of the file size is a little too strict. - // Some bugs where found when a zip is encrypted/decrypted with 'crypt'. - // While decrypted, zip has training 0 bytes - if (0) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'The central dir is not at the end of the archive. Some trailing bytes exists after the archive.'); - - // ----- Return - return PclZip::errorCode(); - } - } - - // ----- Get comment - if ($v_data['comment_size'] != 0) { - $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']); - } else { - $p_central_dir['comment'] = ''; - } - - $p_central_dir['entries'] = $v_data['entries']; - $p_central_dir['disk_entries'] = $v_data['disk_entries']; - $p_central_dir['offset'] = $v_data['offset']; - $p_central_dir['size'] = $v_data['size']; - $p_central_dir['disk'] = $v_data['disk']; - $p_central_dir['disk_start'] = $v_data['disk_start']; - - // TBC - //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) { - //} - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privDeleteByRule() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privDeleteByRule(&$p_result_list, &$p_options) - { - $v_result=1; - $v_list_detail = array(); - - // ----- Open the zip file - if (($v_result=$this->privOpenFd('rb')) != 1) { - // ----- Return - return $v_result; - } - - // ----- Read the central directory informations - $v_central_dir = array(); - if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { - $this->privCloseFd(); - return $v_result; - } - - // ----- Go to beginning of File - @rewind($this->zip_fd); - - // ----- Scan all the files - // ----- Start at beginning of Central Dir - $v_pos_entry = $v_central_dir['offset']; - @rewind($this->zip_fd); - if (@fseek($this->zip_fd, $v_pos_entry)) { - // ----- Close the zip file - $this->privCloseFd(); - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read each entry - $v_header_list = array(); - $j_start = 0; - for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) { - // ----- Read the file header - $v_header_list[$v_nb_extracted] = array(); - if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1) { - // ----- Close the zip file - $this->privCloseFd(); - - return $v_result; - } - - - // ----- Store the index - $v_header_list[$v_nb_extracted]['index'] = $i; - - // ----- Look for the specific extract rules - $v_found = false; - - // ----- Look for extract by name rule - if ((isset($p_options[PCLZIP_OPT_BY_NAME])) && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { - // ----- Look if the filename is in the list - for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_found); $j++) { - // ----- Look for a directory - if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") { - // ----- Look if the directory is in the filename path - if ((strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { - $v_found = true; - } elseif ((($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */ && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { - $v_found = true; - } - } elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { - // ----- Look for a filename - $v_found = true; - } - } - } elseif ((isset($p_options[PCLZIP_OPT_BY_PREG])) && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { - // ----- Look for extract by preg rule - if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { - $v_found = true; - } - } elseif ((isset($p_options[PCLZIP_OPT_BY_INDEX])) && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { - // ----- Look for extract by index rule - // ----- Look if the index is in the list - for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_found); $j++) { - if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { - $v_found = true; - } - if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { - $j_start = $j+1; - } - if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { - break; - } - } - } else { - $v_found = true; - } - - // ----- Look for deletion - if ($v_found) { - unset($v_header_list[$v_nb_extracted]); - } else { - $v_nb_extracted++; - } - } - - // ----- Look if something need to be deleted - if ($v_nb_extracted > 0) { - // ----- Creates a temporay file - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; - - // ----- Creates a temporary zip archive - $v_temp_zip = new PclZip($v_zip_temp_name); - - // ----- Open the temporary zip file in write mode - if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) { - $this->privCloseFd(); - - // ----- Return - return $v_result; - } - - // ----- Look which file need to be kept - for ($i=0; $i<sizeof($v_header_list); $i++) { - // ----- Calculate the position of the header - @rewind($this->zip_fd); - if (@fseek($this->zip_fd, $v_header_list[$i]['offset'])) { - // ----- Close the zip file - $this->privCloseFd(); - $v_temp_zip->privCloseFd(); - @unlink($v_zip_temp_name); - - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Read the file header - $v_local_header = array(); - if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) { - // ----- Close the zip file - $this->privCloseFd(); - $v_temp_zip->privCloseFd(); - @unlink($v_zip_temp_name); - - // ----- Return - return $v_result; - } - - // ----- Check that local file header is same as central file header - if ($this->privCheckFileHeaders($v_local_header, $v_header_list[$i]) != 1) { - // TBC - } - unset($v_local_header); - - // ----- Write the file header - if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) { - // ----- Close the zip file - $this->privCloseFd(); - $v_temp_zip->privCloseFd(); - @unlink($v_zip_temp_name); - - // ----- Return - return $v_result; - } - - // ----- Read/write the data block - if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) { - // ----- Close the zip file - $this->privCloseFd(); - $v_temp_zip->privCloseFd(); - @unlink($v_zip_temp_name); - - // ----- Return - return $v_result; - } - } - - // ----- Store the offset of the central dir - $v_offset = @ftell($v_temp_zip->zip_fd); - - // ----- Re-Create the Central Dir files header - for ($i=0; $i<sizeof($v_header_list); $i++) { - // ----- Create the file header - if (($v_result = $v_temp_zip->privWriteCentralFileHeader($v_header_list[$i])) != 1) { - $v_temp_zip->privCloseFd(); - $this->privCloseFd(); - @unlink($v_zip_temp_name); - - // ----- Return - return $v_result; - } - - // ----- Transform the header to a 'usable' info - $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); - } - - - // ----- Zip file comment - $v_comment = ''; - if (isset($p_options[PCLZIP_OPT_COMMENT])) { - $v_comment = $p_options[PCLZIP_OPT_COMMENT]; - } - - // ----- Calculate the size of the central header - $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset; - - // ----- Create the central dir footer - if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) { - // ----- Reset the file list - unset($v_header_list); - $v_temp_zip->privCloseFd(); - $this->privCloseFd(); - @unlink($v_zip_temp_name); - - // ----- Return - return $v_result; - } - - // ----- Close - $v_temp_zip->privCloseFd(); - $this->privCloseFd(); - - // ----- Delete the zip file - // TBC : I should test the result ... - @unlink($this->zipname); - - // ----- Rename the temporary file - // TBC : I should test the result ... - //@rename($v_zip_temp_name, $this->zipname); - PclZipUtilRename($v_zip_temp_name, $this->zipname); - - // ----- Destroy the temporary archive - unset($v_temp_zip); - } elseif ($v_central_dir['entries'] != 0) { - // ----- Remove every files : reset the file - $this->privCloseFd(); - - if (($v_result = $this->privOpenFd('wb')) != 1) { - return $v_result; - } - - if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) { - return $v_result; - } - - $this->privCloseFd(); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privDirCheck() - // Description : - // Check if a directory exists, if not it creates it and all the parents directory - // which may be useful. - // Parameters : - // $p_dir : Directory path to check. - // Return Values : - // 1 : OK - // -1 : Unable to create directory - // -------------------------------------------------------------------------------- - public function privDirCheck($p_dir, $p_is_dir = false) - { - $v_result = 1; - - // ----- Remove the final '/' - if (($p_is_dir) && (substr($p_dir, -1)=='/')) { - $p_dir = substr($p_dir, 0, strlen($p_dir)-1); - } - - // ----- Check the directory availability - if ((is_dir($p_dir)) || ($p_dir == "")) { - return 1; - } - - // ----- Extract parent directory - $p_parent_dir = dirname($p_dir); - - // ----- Just a check - if ($p_parent_dir != $p_dir) { - // ----- Look for parent directory - if ($p_parent_dir != "") { - if (($v_result = $this->privDirCheck($p_parent_dir)) != 1) { - return $v_result; - } - } - } - - // ----- Create the directory - if (!@mkdir($p_dir, 0777)) { - // ----- Error log - PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'"); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privMerge() - // Description : - // If $p_archive_to_add does not exist, the function exit with a success result. - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privMerge(&$p_archive_to_add) - { - $v_result=1; - - // ----- Look if the archive_to_add exists - if (!is_file($p_archive_to_add->zipname)) { - // ----- Nothing to merge, so merge is a success - $v_result = 1; - - // ----- Return - return $v_result; - } - - // ----- Look if the archive exists - if (!is_file($this->zipname)) { - // ----- Do a duplicate - $v_result = $this->privDuplicate($p_archive_to_add->zipname); - - // ----- Return - return $v_result; - } - - // ----- Open the zip file - if (($v_result=$this->privOpenFd('rb')) != 1) { - // ----- Return - return $v_result; - } - - // ----- Read the central directory informations - $v_central_dir = array(); - if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) { - $this->privCloseFd(); - return $v_result; - } - - // ----- Go to beginning of File - @rewind($this->zip_fd); - - // ----- Open the archive_to_add file - if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1) { - $this->privCloseFd(); - - // ----- Return - return $v_result; - } - - // ----- Read the central directory informations - $v_central_dir_to_add = array(); - if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1) { - $this->privCloseFd(); - $p_archive_to_add->privCloseFd(); - - return $v_result; - } - - // ----- Go to beginning of File - @rewind($p_archive_to_add->zip_fd); - - // ----- Creates a temporay file - $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; - - // ----- Open the temporary file in write mode - if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) { - $this->privCloseFd(); - $p_archive_to_add->privCloseFd(); - - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Copy the files from the archive to the temporary file - // TBC : Here I should better append the file and go back to erase the central dir - $v_size = $v_central_dir['offset']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = fread($this->zip_fd, $v_read_size); - @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Copy the files from the archive_to_add into the temporary file - $v_size = $v_central_dir_to_add['offset']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size); - @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Store the offset of the central dir - $v_offset = @ftell($v_zip_temp_fd); - - // ----- Copy the block of file headers from the old archive - $v_size = $v_central_dir['size']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($this->zip_fd, $v_read_size); - @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Copy the block of file headers from the archive_to_add - $v_size = $v_central_dir_to_add['size']; - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size); - @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Merge the file comments - $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment']; - - // ----- Calculate the size of the (new) central header - $v_size = @ftell($v_zip_temp_fd)-$v_offset; - - // ----- Swap the file descriptor - // Here is a trick : I swap the temporary fd with the zip fd, in order to use - // the following methods on the temporary fil and not the real archive fd - $v_swap = $this->zip_fd; - $this->zip_fd = $v_zip_temp_fd; - $v_zip_temp_fd = $v_swap; - - // ----- Create the central dir footer - if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1) { - $this->privCloseFd(); - $p_archive_to_add->privCloseFd(); - @fclose($v_zip_temp_fd); - $this->zip_fd = null; - - // ----- Reset the file list - unset($v_header_list); - - // ----- Return - return $v_result; - } - - // ----- Swap back the file descriptor - $v_swap = $this->zip_fd; - $this->zip_fd = $v_zip_temp_fd; - $v_zip_temp_fd = $v_swap; - - // ----- Close - $this->privCloseFd(); - $p_archive_to_add->privCloseFd(); - - // ----- Close the temporary file - @fclose($v_zip_temp_fd); - - // ----- Delete the zip file - // TBC : I should test the result ... - @unlink($this->zipname); - - // ----- Rename the temporary file - // TBC : I should test the result ... - //@rename($v_zip_temp_name, $this->zipname); - PclZipUtilRename($v_zip_temp_name, $this->zipname); - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privDuplicate() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privDuplicate($p_archive_filename) - { - $v_result=1; - - // ----- Look if the $p_archive_filename exists - if (!is_file($p_archive_filename)) { - // ----- Nothing to duplicate, so duplicate is a success. - $v_result = 1; - - // ----- Return - return $v_result; - } - - // ----- Open the zip file - if (($v_result=$this->privOpenFd('wb')) != 1) { - // ----- Return - return $v_result; - } - - // ----- Open the temporary file in write mode - if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0) { - $this->privCloseFd(); - - PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); - - // ----- Return - return PclZip::errorCode(); - } - - // ----- Copy the files from the archive to the temporary file - // TBC : Here I should better append the file and go back to erase the central dir - $v_size = filesize($p_archive_filename); - while ($v_size != 0) { - $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = fread($v_zip_temp_fd, $v_read_size); - @fwrite($this->zip_fd, $v_buffer, $v_read_size); - $v_size -= $v_read_size; - } - - // ----- Close - $this->privCloseFd(); - - // ----- Close the temporary file - @fclose($v_zip_temp_fd); - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privErrorLog() - // Description : - // Parameters : - // -------------------------------------------------------------------------------- - public function privErrorLog($p_error_code = 0, $p_error_string = '') - { - if (PCLZIP_ERROR_EXTERNAL == 1) { - PclError($p_error_code, $p_error_string); - } else { - $this->error_code = $p_error_code; - $this->error_string = $p_error_string; - } - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privErrorReset() - // Description : - // Parameters : - // -------------------------------------------------------------------------------- - public function privErrorReset() - { - if (PCLZIP_ERROR_EXTERNAL == 1) { - PclErrorReset(); - } else { - $this->error_code = 0; - $this->error_string = ''; - } - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privDisableMagicQuotes() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privDisableMagicQuotes() - { - $v_result=1; - - // ----- Look if function exists - if ((!function_exists("get_magic_quotes_runtime")) || (!function_exists("set_magic_quotes_runtime"))) { - return $v_result; - } - - // ----- Look if already done - if ($this->magic_quotes_status != -1) { - return $v_result; - } - - // ----- Get and memorize the magic_quote value - $this->magic_quotes_status = @get_magic_quotes_runtime(); - - // ----- Disable magic_quotes - if ($this->magic_quotes_status == 1) { - @set_magic_quotes_runtime(0); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- - - // -------------------------------------------------------------------------------- - // Function : privSwapBackMagicQuotes() - // Description : - // Parameters : - // Return Values : - // -------------------------------------------------------------------------------- - public function privSwapBackMagicQuotes() - { - $v_result=1; - - // ----- Look if function exists - if ((!function_exists("get_magic_quotes_runtime")) || (!function_exists("set_magic_quotes_runtime"))) { - return $v_result; - } - - // ----- Look if something to do - if ($this->magic_quotes_status != -1) { - return $v_result; - } - - // ----- Swap back magic_quotes - if ($this->magic_quotes_status == 1) { - @set_magic_quotes_runtime($this->magic_quotes_status); - } - - // ----- Return - return $v_result; - } - // -------------------------------------------------------------------------------- -} -// End of class -// -------------------------------------------------------------------------------- - -// -------------------------------------------------------------------------------- -// Function : PclZipUtilPathReduction() -// Description : -// Parameters : -// Return Values : -// -------------------------------------------------------------------------------- -function PclZipUtilPathReduction($p_dir) -{ - $v_result = ""; - - // ----- Look for not empty path - if ($p_dir != "") { - // ----- Explode path by directory names - $v_list = explode("/", $p_dir); - - // ----- Study directories from last to first - $v_skip = 0; - for ($i=sizeof($v_list)-1; $i>=0; $i--) { - // ----- Look for current path - if ($v_list[$i] == ".") { - // ----- Ignore this directory - // Should be the first $i=0, but no check is done - } elseif ($v_list[$i] == "..") { - $v_skip++; - } elseif ($v_list[$i] == "") { - // ----- First '/' i.e. root slash - if ($i == 0) { - $v_result = "/".$v_result; - if ($v_skip > 0) { - // ----- It is an invalid path, so the path is not modified - // TBC - $v_result = $p_dir; - $v_skip = 0; - } - } elseif ($i == (sizeof($v_list)-1)) { - // ----- Last '/' i.e. indicates a directory - $v_result = $v_list[$i]; - } else { - // ----- Double '/' inside the path - // ----- Ignore only the double '//' in path, - // but not the first and last '/' - } - } else { - // ----- Look for item to skip - if ($v_skip > 0) { - $v_skip--; - } else { - $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:""); - } - } - } - - // ----- Look for skip - if ($v_skip > 0) { - while ($v_skip > 0) { - $v_result = '../'.$v_result; - $v_skip--; - } - } - } - - // ----- Return - return $v_result; -} -// -------------------------------------------------------------------------------- - -// -------------------------------------------------------------------------------- -// Function : PclZipUtilPathInclusion() -// Description : -// This function indicates if the path $p_path is under the $p_dir tree. Or, -// said in an other way, if the file or sub-dir $p_path is inside the dir -// $p_dir. -// The function indicates also if the path is exactly the same as the dir. -// This function supports path with duplicated '/' like '//', but does not -// support '.' or '..' statements. -// Parameters : -// Return Values : -// 0 if $p_path is not inside directory $p_dir -// 1 if $p_path is inside directory $p_dir -// 2 if $p_path is exactly the same as $p_dir -// -------------------------------------------------------------------------------- -function PclZipUtilPathInclusion($p_dir, $p_path) -{ - $v_result = 1; - - // ----- Look for path beginning by ./ - if (($p_dir == '.') || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) { - $p_dir = PclZipUtilTranslateWinPath(getcwd(), false).'/'.substr($p_dir, 1); - } - if (($p_path == '.') || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) { - $p_path = PclZipUtilTranslateWinPath(getcwd(), false).'/'.substr($p_path, 1); - } - - // ----- Explode dir and path by directory separator - $v_list_dir = explode("/", $p_dir); - $v_list_dir_size = sizeof($v_list_dir); - $v_list_path = explode("/", $p_path); - $v_list_path_size = sizeof($v_list_path); - - // ----- Study directories paths - $i = 0; - $j = 0; - while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) { - // ----- Look for empty dir (path reduction) - if ($v_list_dir[$i] == '') { - $i++; - continue; - } - if ($v_list_path[$j] == '') { - $j++; - continue; - } - - // ----- Compare the items - if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ($v_list_path[$j] != '')) { - $v_result = 0; - } - - // ----- Next items - $i++; - $j++; - } - - // ----- Look if everything seems to be the same - if ($v_result) { - // ----- Skip all the empty items - while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) { - $j++; - } - while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) { - $i++; - } - - if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) { - // ----- There are exactly the same - $v_result = 2; - } elseif ($i < $v_list_dir_size) { - // ----- The path is shorter than the dir - $v_result = 0; - } - } - - // ----- Return - return $v_result; -} -// -------------------------------------------------------------------------------- - -// -------------------------------------------------------------------------------- -// Function : PclZipUtilCopyBlock() -// Description : -// Parameters : -// $p_mode : read/write compression mode -// 0 : src & dest normal -// 1 : src gzip, dest normal -// 2 : src normal, dest gzip -// 3 : src & dest gzip -// Return Values : -// -------------------------------------------------------------------------------- -function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode = 0) -{ - $v_result = 1; - - if ($p_mode==0) { - while ($p_size != 0) { - $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($p_src, $v_read_size); - @fwrite($p_dest, $v_buffer, $v_read_size); - $p_size -= $v_read_size; - } - } elseif ($p_mode==1) { - while ($p_size != 0) { - $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @gzread($p_src, $v_read_size); - @fwrite($p_dest, $v_buffer, $v_read_size); - $p_size -= $v_read_size; - } - } elseif ($p_mode==2) { - while ($p_size != 0) { - $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @fread($p_src, $v_read_size); - @gzwrite($p_dest, $v_buffer, $v_read_size); - $p_size -= $v_read_size; - } - } elseif ($p_mode==3) { - while ($p_size != 0) { - $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); - $v_buffer = @gzread($p_src, $v_read_size); - @gzwrite($p_dest, $v_buffer, $v_read_size); - $p_size -= $v_read_size; - } - } - - // ----- Return - return $v_result; -} -// -------------------------------------------------------------------------------- - -// -------------------------------------------------------------------------------- -// Function : PclZipUtilRename() -// Description : -// This function tries to do a simple rename() function. If it fails, it -// tries to copy the $p_src file in a new $p_dest file and then unlink the -// first one. -// Parameters : -// $p_src : Old filename -// $p_dest : New filename -// Return Values : -// 1 on success, 0 on failure. -// -------------------------------------------------------------------------------- -function PclZipUtilRename($p_src, $p_dest) -{ - $v_result = 1; - - // ----- Try to rename the files - if (!@rename($p_src, $p_dest)) { - // ----- Try to copy & unlink the src - if (!@copy($p_src, $p_dest)) { - $v_result = 0; - } elseif (!@unlink($p_src)) { - $v_result = 0; - } - } - - // ----- Return - return $v_result; -} -// -------------------------------------------------------------------------------- - -// -------------------------------------------------------------------------------- -// Function : PclZipUtilOptionText() -// Description : -// Translate option value in text. Mainly for debug purpose. -// Parameters : -// $p_option : the option value. -// Return Values : -// The option text value. -// -------------------------------------------------------------------------------- -function PclZipUtilOptionText($p_option) -{ - $v_list = get_defined_constants(); - for (reset($v_list); $v_key = key($v_list); next($v_list)) { - $v_prefix = substr($v_key, 0, 10); - if ((($v_prefix == 'PCLZIP_OPT') || ($v_prefix == 'PCLZIP_CB_') || ($v_prefix == 'PCLZIP_ATT')) && ($v_list[$v_key] == $p_option)) { - return $v_key; - } - } - - $v_result = 'Unknown'; - - return $v_result; -} -// -------------------------------------------------------------------------------- - -// -------------------------------------------------------------------------------- -// Function : PclZipUtilTranslateWinPath() -// Description : -// Translate windows path by replacing '\' by '/' and optionally removing -// drive letter. -// Parameters : -// $p_path : path to translate. -// $p_remove_disk_letter : true | false -// Return Values : -// The path translated. -// -------------------------------------------------------------------------------- -function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter = true) -{ - if (stristr(php_uname(), 'windows')) { - // ----- Look for potential disk letter - if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) { - $p_path = substr($p_path, $v_position+1); - } - // ----- Change potential windows directory separator - if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0, 1) == '\\')) { - $p_path = strtr($p_path, '\\', '/'); - } - } - return $p_path; -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/readme.txt b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/readme.txt deleted file mode 100644 index d1b11e2..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PCLZip/readme.txt +++ /dev/null @@ -1,421 +0,0 @@ -// -------------------------------------------------------------------------------- -// PclZip 2.8.2 - readme.txt -// -------------------------------------------------------------------------------- -// License GNU/LGPL - August 2009 -// Vincent Blavet - vincent@phpconcept.net -// http://www.phpconcept.net -// -------------------------------------------------------------------------------- -// $Id: readme.txt,v 1.60 2009/09/30 20:35:21 vblavet Exp $ -// -------------------------------------------------------------------------------- - - - -0 - Sommaire -============ - 1 - Introduction - 2 - What's new - 3 - Corrected bugs - 4 - Known bugs or limitations - 5 - License - 6 - Warning - 7 - Documentation - 8 - Author - 9 - Contribute - -1 - Introduction -================ - - PclZip is a library that allow you to manage a Zip archive. - - Full documentation about PclZip can be found here : http://www.phpconcept.net/pclzip - -2 - What's new -============== - - Version 2.8.2 : - - PCLZIP_CB_PRE_EXTRACT and PCLZIP_CB_POST_EXTRACT are now supported with - extraction as a string (PCLZIP_OPT_EXTRACT_AS_STRING). The string - can also be modified in the post-extract call back. - **Bugs correction : - - PCLZIP_OPT_REMOVE_ALL_PATH was not working correctly - - Remove use of eval() and do direct call to callback functions - - Correct support of 64bits systems (Thanks to WordPress team) - - Version 2.8.1 : - - Move option PCLZIP_OPT_BY_EREG to PCLZIP_OPT_BY_PREG because ereg() is - deprecated in PHP 5.3. When using option PCLZIP_OPT_BY_EREG, PclZip will - automatically replace it by PCLZIP_OPT_BY_PREG. - - Version 2.8 : - - Improve extraction of zip archive for large files by using temporary files - This feature is working like the one defined in r2.7. - Options are renamed : PCLZIP_OPT_TEMP_FILE_ON, PCLZIP_OPT_TEMP_FILE_OFF, - PCLZIP_OPT_TEMP_FILE_THRESHOLD - - Add a ratio constant PCLZIP_TEMPORARY_FILE_RATIO to configure the auto - sense of temporary file use. - - Bug correction : Reduce filepath in returned file list to remove ennoying - './/' preambule in file path. - - Version 2.7 : - - Improve creation of zip archive for large files : - PclZip will now autosense the configured memory and use temporary files - when large file is suspected. - This feature can also ne triggered by manual options in create() and add() - methods. 'PCLZIP_OPT_ADD_TEMP_FILE_ON' force the use of temporary files, - 'PCLZIP_OPT_ADD_TEMP_FILE_OFF' disable the autosense technic, - 'PCLZIP_OPT_ADD_TEMP_FILE_THRESHOLD' allow for configuration of a size - threshold to use temporary files. - Using "temporary files" rather than "memory" might take more time, but - might give the ability to zip very large files : - Tested on my win laptop with a 88Mo file : - Zip "in-memory" : 18sec (max_execution_time=30, memory_limit=180Mo) - Zip "tmporary-files" : 23sec (max_execution_time=30, memory_limit=30Mo) - - Replace use of mktime() by time() to limit the E_STRICT error messages. - - Bug correction : When adding files with full windows path (drive letter) - PclZip is now working. Before, if the drive letter is not the default - path, PclZip was not able to add the file. - - Version 2.6 : - - Code optimisation - - New attributes PCLZIP_ATT_FILE_COMMENT gives the ability to - add a comment for a specific file. (Don't really know if this is usefull) - - New attribute PCLZIP_ATT_FILE_CONTENT gives the ability to add a string - as a file. - - New attribute PCLZIP_ATT_FILE_MTIME modify the timestamp associated with - a file. - - Correct a bug. Files archived with a timestamp with 0h0m0s were extracted - with current time - - Add CRC value in the informations returned back for each file after an - action. - - Add missing closedir() statement. - - When adding a folder, and removing the path of this folder, files were - incorrectly added with a '/' at the beginning. Which means files are - related to root in unix systems. Corrected. - - Add conditional if before constant definition. This will allow users - to redefine constants without changing the file, and then improve - upgrade of pclzip code for new versions. - - Version 2.5 : - - Introduce the ability to add file/folder with individual properties (file descriptor). - This gives for example the ability to change the filename of a zipped file. - . Able to add files individually - . Able to change full name - . Able to change short name - . Compatible with global options - - New attributes : PCLZIP_ATT_FILE_NAME, PCLZIP_ATT_FILE_NEW_SHORT_NAME, PCLZIP_ATT_FILE_NEW_FULL_NAME - - New error code : PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE - - Add a security control feature. PclZip can extract any file in any folder - of a system. People may use this to upload a zip file and try to override - a system file. The PCLZIP_OPT_EXTRACT_DIR_RESTRICTION will give the - ability to forgive any directory transversal behavior. - - New PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : check extraction path - - New error code : PCLZIP_ERR_DIRECTORY_RESTRICTION - - Modification in PclZipUtilPathInclusion() : dir and path beginning with ./ will be prepend - by current path (getcwd()) - - Version 2.4 : - - Code improvment : try to speed up the code by removing unusefull call to pack() - - Correct bug in delete() : delete() should be called with no argument. This was not - the case in 2.3. This is corrected in 2.4. - - Correct a bug in path_inclusion function. When the path has several '../../', the - result was bad. - - Add a check for magic_quotes_runtime configuration. If enabled, PclZip will - disable it while working and det it back to its original value. - This resolve a lots of bad formated archive errors. - - Bug correction : PclZip now correctly unzip file in some specific situation, - when compressed content has same size as uncompressed content. - - Bug correction : When selecting option 'PCLZIP_OPT_REMOVE_ALL_PATH', - directories are not any more created. - - Code improvment : correct unclosed opendir(), better handling of . and .. in - loops. - - - Version 2.3 : - - Correct a bug with PHP5 : affecting the value 0xFE49FFE0 to a variable does not - give the same result in PHP4 and PHP5 .... - - Version 2.2 : - - Try development of PCLZIP_OPT_CRYPT ..... - However this becomes to a stop. To crypt/decrypt I need to multiply 2 long integers, - the result (greater than a long) is not supported by PHP. Even the use of bcmath - functions does not help. I did not find yet a solution ...; - - Add missing '/' at end of directory entries - - Check is a file is encrypted or not. Returns status 'unsupported_encryption' and/or - error code PCLZIP_ERR_UNSUPPORTED_ENCRYPTION. - - Corrected : Bad "version need to extract" field in local file header - - Add private method privCheckFileHeaders() in order to check local and central - file headers. PclZip is now supporting purpose bit flag bit 3. Purpose bit flag bit 3 gives - the ability to have a local file header without size, compressed size and crc filled. - - Add a generic status 'error' for file status - - Add control of compression type. PclZip only support deflate compression method. - Before v2.2, PclZip does not check the compression method used in an archive while - extracting. With v2.2 PclZip returns a new error status for a file using an unsupported - compression method. New status is "unsupported_compression". New error code is - PCLZIP_ERR_UNSUPPORTED_COMPRESSION. - - Add optional attribute PCLZIP_OPT_STOP_ON_ERROR. This will stop the extract of files - when errors like 'a folder with same name exists' or 'a newer file exists' or - 'a write protected file' exists, rather than set a status for the concerning file - and resume the extract of the zip. - - Add optional attribute PCLZIP_OPT_REPLACE_NEWER. This will force, during an extract' the - replacement of the file, even if a newer version of the file exists. - Note that today if a file with the same name already exists but is older it will be - replaced by the extracted one. - - Improve PclZipUtilOption() - - Support of zip archive with trailing bytes. Before 2.2, PclZip checks that the central - directory structure is the last data in the archive. Crypt encryption/decryption of - zip archive put trailing 0 bytes after decryption. PclZip is now supporting this. - - Version 2.1 : - - Add the ability to abort the extraction by using a user callback function. - The user can now return the value '2' in its callback which indicates to stop the - extraction. For a pre call-back extract is stopped before the extration of the current - file. For a post call back, the extraction is stopped after. - - Add the ability to extract a file (or several files) directly in the standard output. - This is done by the new parameter PCLZIP_OPT_EXTRACT_IN_OUTPUT with method extract(). - - Add support for parameters PCLZIP_OPT_COMMENT, PCLZIP_OPT_ADD_COMMENT, - PCLZIP_OPT_PREPEND_COMMENT. This will create, replace, add, or prepend comments - in the zip archive. - - When merging two archives, the comments are not any more lost, but merged, with a - blank space separator. - - Corrected bug : Files are not deleted when all files are asked to be deleted. - - Corrected bug : Folders with name '0' made PclZip to abort the create or add feature. - - - Version 2.0 : - ***** Warning : Some new features may break the backward compatibility for your scripts. - Please carefully read the readme file. - - Add the ability to delete by Index, name and regular expression. This feature is - performed by the method delete(), which uses the optional parameters - PCLZIP_OPT_BY_INDEX, PCLZIP_OPT_BY_NAME, PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG. - - Add the ability to extract by regular expression. To extract by regexp you must use the method - extract(), with the option PCLZIP_OPT_BY_EREG or PCLZIP_OPT_BY_PREG - (depending if you want to use ereg() or preg_match() syntax) followed by the - regular expression pattern. - - Add the ability to extract by index, directly with the extract() method. This is a - code improvment of the extractByIndex() method. - - Add the ability to extract by name. To extract by name you must use the method - extract(), with the option PCLZIP_OPT_BY_NAME followed by the filename to - extract or an array of filenames to extract. To extract all a folder, use the folder - name rather than the filename with a '/' at the end. - - Add the ability to add files without compression. This is done with a new attribute - which is PCLZIP_OPT_NO_COMPRESSION. - - Add the attribute PCLZIP_OPT_EXTRACT_AS_STRING, which allow to extract a file directly - in a string without using any file (or temporary file). - - Add constant PCLZIP_SEPARATOR for static configuration of filename separators in a single string. - The default separator is now a comma (,) and not any more a blank space. - THIS BREAK THE BACKWARD COMPATIBILITY : Please check if this may have an impact with - your script. - - Improve algorythm performance by removing the use of temporary files when adding or - extracting files in an archive. - - Add (correct) detection of empty filename zipping. This can occurs when the removed - path is the same - as a zipped dir. The dir is not zipped (['status'] = filtered), only its content. - - Add better support for windows paths (thanks for help from manus@manusfreedom.com). - - Corrected bug : When the archive file already exists with size=0, the add() method - fails. Corrected in 2.0. - - Remove the use of OS_WINDOWS constant. Use php_uname() function rather. - - Control the order of index ranges in extract by index feature. - - Change the internal management of folders (better handling of internal flag). - - - Version 1.3 : - - Removing the double include check. This is now done by include_once() and require_once() - PHP directives. - - Changing the error handling mecanism : Remove the use of an external error library. - The former PclError...() functions are replaced by internal equivalent methods. - By changing the environment variable PCLZIP_ERROR_EXTERNAL you can still use the former library. - Introducing the use of constants for error codes rather than integer values. This will help - in futur improvment. - Introduction of error handling functions like errorCode(), errorName() and errorInfo(). - - Remove the deprecated use of calling function with arguments passed by reference. - - Add the calling of extract(), extractByIndex(), create() and add() functions - with variable options rather than fixed arguments. - - Add the ability to remove all the file path while extracting or adding, - without any need to specify the path to remove. - This is available for extract(), extractByIndex(), create() and add() functionS by using - the new variable options parameters : - - PCLZIP_OPT_REMOVE_ALL_PATH : by indicating this option while calling the fct. - - Ability to change the mode of a file after the extraction (chmod()). - This is available for extract() and extractByIndex() functionS by using - the new variable options parameters. - - PCLZIP_OPT_SET_CHMOD : by setting the value of this option. - - Ability to definition call-back options. These call-back will be called during the adding, - or the extracting of file (extract(), extractByIndex(), create() and add() functions) : - - PCLZIP_CB_PRE_EXTRACT : will be called before each extraction of a file. The user - can trigerred the change the filename of the extracted file. The user can triggered the - skip of the extraction. This is adding a 'skipped' status in the file list result value. - - PCLZIP_CB_POST_EXTRACT : will be called after each extraction of a file. - Nothing can be triggered from that point. - - PCLZIP_CB_PRE_ADD : will be called before each add of a file. The user - can trigerred the change the stored filename of the added file. The user can triggered the - skip of the add. This is adding a 'skipped' status in the file list result value. - - PCLZIP_CB_POST_ADD : will be called after each add of a file. - Nothing can be triggered from that point. - - Two status are added in the file list returned as function result : skipped & filename_too_long - 'skipped' is used when a call-back function ask for skipping the file. - 'filename_too_long' is used while adding a file with a too long filename to archive (the file is - not added) - - Adding the function PclZipUtilPathInclusion(), that check the inclusion of a path into - a directory. - - Add a check of the presence of the archive file before some actions (like list, ...) - - Add the initialisation of field "index" in header array. This means that by - default index will be -1 when not explicitly set by the methods. - - Version 1.2 : - - Adding a duplicate function. - - Adding a merge function. The merge function is a "quick merge" function, - it just append the content of an archive at the end of the first one. There - is no check for duplicate files or more recent files. - - Improve the search of the central directory end. - - Version 1.1.2 : - - - Changing the license of PclZip. PclZip is now released under the GNU / LGPL license - (see License section). - - Adding the optional support of a static temporary directory. You will need to configure - the constant PCLZIP_TEMPORARY_DIR if you want to use this feature. - - Improving the rename() function. In some cases rename() does not work (different - Filesystems), so it will be replaced by a copy() + unlink() functions. - - Version 1.1.1 : - - - Maintenance release, no new feature. - - Version 1.1 : - - - New method Add() : adding files in the archive - - New method ExtractByIndex() : partial extract of the archive, files are identified by - their index in the archive - - New method DeleteByIndex() : delete some files/folder entries from the archive, - files are identified by their index in the archive. - - Adding a test of the zlib extension presence. If not present abort the script. - - Version 1.0.1 : - - - No new feature - - -3 - Corrected bugs -================== - - Corrected in Version 2.0 : - - Corrected : During an extraction, if a call-back fucntion is used and try to skip - a file, all the extraction process is stopped. - - Corrected in Version 1.3 : - - Corrected : Support of static synopsis for method extract() is broken. - - Corrected : invalid size of archive content field (0xFF) should be (0xFFFF). - - Corrected : When an extract is done with a remove_path parameter, the entry for - the directory with exactly the same path is not skipped/filtered. - - Corrected : extractByIndex() and deleteByIndex() were not managing index in the - right way. For example indexes '1,3-5,11' will only extract files 1 and 11. This - is due to a sort of the index resulting table that puts 11 before 3-5 (sort on - string and not interger). The sort is temporarilly removed, this means that - you must provide a sorted list of index ranges. - - Corrected in Version 1.2 : - - - Nothing. - - Corrected in Version 1.1.2 : - - - Corrected : Winzip is unable to delete or add new files in a PclZip created archives. - - Corrected in Version 1.1.1 : - - - Corrected : When archived file is not compressed (0% compression), the - extract method fails. - - Corrected in Version 1.1 : - - - Corrected : Adding a complete tree of folder may result in a bad archive - creation. - - Corrected in Version 1.0.1 : - - - Corrected : Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024). - - -4 - Known bugs or limitations -============================= - - Please publish bugs reports in SourceForge : - http://sourceforge.net/tracker/?group_id=40254&atid=427564 - - In Version 2.x : - - PclZip does only support file uncompressed or compressed with deflate (compression method 8) - - PclZip does not support password protected zip archive - - Some concern were seen when changing mtime of a file while archiving. - Seems to be linked to Daylight Saving Time (PclTest_changing_mtime). - - In Version 1.2 : - - - merge() methods does not check for duplicate files or last date of modifications. - - In Version 1.1 : - - - Limitation : Using 'extract' fields in the file header in the zip archive is not supported. - - WinZip is unable to delete a single file in a PclZip created archive. It is also unable to - add a file in a PclZip created archive. (Corrected in v.1.2) - - In Version 1.0.1 : - - - Adding a complete tree of folder may result in a bad archive - creation. (Corrected in V.1.1). - - Path given to methods must be in the unix format (/) and not the Windows format (\). - Workaround : Use only / directory separators. - - PclZip is using temporary files that are sometime the name of the file with a .tmp or .gz - added suffix. Files with these names may already exist and may be overwritten. - Workaround : none. - - PclZip does not check if the zlib extension is present. If it is absent, the zip - file is not created and the lib abort without warning. - Workaround : enable the zlib extension on the php install - - In Version 1.0 : - - - Error while compressing files greater than PCLZIP_READ_BLOCK_SIZE (default=1024). - (Corrected in v.1.0.1) - - Limitation : Multi-disk zip archive are not supported. - - -5 - License -=========== - - Since version 1.1.2, PclZip Library is released under GNU/LGPL license. - This library is free, so you can use it at no cost. - - HOWEVER, if you release a script, an application, a library or any kind of - code using PclZip library (or a part of it), YOU MUST : - - Indicate in the documentation (or a readme file), that your work - uses PclZip Library, and make a reference to the author and the web site - http://www.phpconcept.net - - Gives the ability to the final user to update the PclZip libary. - - I will also appreciate that you send me a mail (vincent@phpconcept.net), just to - be aware that someone is using PclZip. - - For more information about GNU/LGPL license : http://www.gnu.org - -6 - Warning -================= - - This library and the associated files are non commercial, non professional work. - It should not have unexpected results. However if any damage is caused by this software - the author can not be responsible. - The use of this software is at the risk of the user. - -7 - Documentation -================= - PclZip User Manuel is available in English on PhpConcept : http://www.phpconcept.net/pclzip/man/en/index.php - A Russian translation was done by Feskov Kuzma : http://php.russofile.ru/ru/authors/unsort/zip/ - -8 - Author -========== - - This software was written by Vincent Blavet (vincent@phpconcept.net) on its leasure time. - -9 - Contribute -============== - If you want to contribute to the development of PclZip, please contact vincent@phpconcept.net. - If you can help in financing PhpConcept hosting service, please go to - http://www.phpconcept.net/soutien.php diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PasswordHasher.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PasswordHasher.php deleted file mode 100644 index 946742b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/PasswordHasher.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Shared_PasswordHasher - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Shared_PasswordHasher -{ - /** - * Create a password hash from a given string. - * - * This method is based on the algorithm provided by - * Daniel Rentz of OpenOffice and the PEAR package - * Spreadsheet_Excel_Writer by Xavier Noguer <xnoguer@rezebra.com>. - * - * @param string $pPassword Password to hash - * @return string Hashed password - */ - public static function hashPassword($pPassword = '') - { - $password = 0x0000; - $charPos = 1; // char position - - // split the plain text password in its component characters - $chars = preg_split('//', $pPassword, -1, PREG_SPLIT_NO_EMPTY); - foreach ($chars as $char) { - $value = ord($char) << $charPos++; // shifted ASCII value - $rotated_bits = $value >> 15; // rotated bits beyond bit 15 - $value &= 0x7fff; // first 15 bits - $password ^= ($value | $rotated_bits); - } - - $password ^= strlen($pPassword); - $password ^= 0xCE4B; - - return(strtoupper(dechex($password))); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/String.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/String.php deleted file mode 100644 index fa1a64e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/String.php +++ /dev/null @@ -1,819 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_String - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_String -{ - /** Constants */ - /** Regular Expressions */ - // Fraction - const STRING_REGEXP_FRACTION = '(-?)(\d+)\s+(\d+\/\d+)'; - - - /** - * Control characters array - * - * @var string[] - */ - private static $controlCharacters = array(); - - /** - * SYLK Characters array - * - * $var array - */ - private static $SYLKCharacters = array(); - - /** - * Decimal separator - * - * @var string - */ - private static $decimalSeparator; - - /** - * Thousands separator - * - * @var string - */ - private static $thousandsSeparator; - - /** - * Currency code - * - * @var string - */ - private static $currencyCode; - - /** - * Is mbstring extension avalable? - * - * @var boolean - */ - private static $isMbstringEnabled; - - /** - * Is iconv extension avalable? - * - * @var boolean - */ - private static $isIconvEnabled; - - /** - * Build control characters array - */ - private static function buildControlCharacters() - { - for ($i = 0; $i <= 31; ++$i) { - if ($i != 9 && $i != 10 && $i != 13) { - $find = '_x' . sprintf('%04s', strtoupper(dechex($i))) . '_'; - $replace = chr($i); - self::$controlCharacters[$find] = $replace; - } - } - } - - /** - * Build SYLK characters array - */ - private static function buildSYLKCharacters() - { - self::$SYLKCharacters = array( - "\x1B 0" => chr(0), - "\x1B 1" => chr(1), - "\x1B 2" => chr(2), - "\x1B 3" => chr(3), - "\x1B 4" => chr(4), - "\x1B 5" => chr(5), - "\x1B 6" => chr(6), - "\x1B 7" => chr(7), - "\x1B 8" => chr(8), - "\x1B 9" => chr(9), - "\x1B :" => chr(10), - "\x1B ;" => chr(11), - "\x1B <" => chr(12), - "\x1B :" => chr(13), - "\x1B >" => chr(14), - "\x1B ?" => chr(15), - "\x1B!0" => chr(16), - "\x1B!1" => chr(17), - "\x1B!2" => chr(18), - "\x1B!3" => chr(19), - "\x1B!4" => chr(20), - "\x1B!5" => chr(21), - "\x1B!6" => chr(22), - "\x1B!7" => chr(23), - "\x1B!8" => chr(24), - "\x1B!9" => chr(25), - "\x1B!:" => chr(26), - "\x1B!;" => chr(27), - "\x1B!<" => chr(28), - "\x1B!=" => chr(29), - "\x1B!>" => chr(30), - "\x1B!?" => chr(31), - "\x1B'?" => chr(127), - "\x1B(0" => '€', // 128 in CP1252 - "\x1B(2" => '‚', // 130 in CP1252 - "\x1B(3" => 'ƒ', // 131 in CP1252 - "\x1B(4" => '„', // 132 in CP1252 - "\x1B(5" => '…', // 133 in CP1252 - "\x1B(6" => '†', // 134 in CP1252 - "\x1B(7" => '‡', // 135 in CP1252 - "\x1B(8" => 'ˆ', // 136 in CP1252 - "\x1B(9" => '‰', // 137 in CP1252 - "\x1B(:" => 'Š', // 138 in CP1252 - "\x1B(;" => '‹', // 139 in CP1252 - "\x1BNj" => 'Œ', // 140 in CP1252 - "\x1B(>" => 'Ž', // 142 in CP1252 - "\x1B)1" => '‘', // 145 in CP1252 - "\x1B)2" => '’', // 146 in CP1252 - "\x1B)3" => '“', // 147 in CP1252 - "\x1B)4" => '”', // 148 in CP1252 - "\x1B)5" => '•', // 149 in CP1252 - "\x1B)6" => '–', // 150 in CP1252 - "\x1B)7" => '—', // 151 in CP1252 - "\x1B)8" => '˜', // 152 in CP1252 - "\x1B)9" => '™', // 153 in CP1252 - "\x1B):" => 'š', // 154 in CP1252 - "\x1B);" => '›', // 155 in CP1252 - "\x1BNz" => 'œ', // 156 in CP1252 - "\x1B)>" => 'ž', // 158 in CP1252 - "\x1B)?" => 'Ÿ', // 159 in CP1252 - "\x1B*0" => ' ', // 160 in CP1252 - "\x1BN!" => '¡', // 161 in CP1252 - "\x1BN\"" => '¢', // 162 in CP1252 - "\x1BN#" => '£', // 163 in CP1252 - "\x1BN(" => '¤', // 164 in CP1252 - "\x1BN%" => '¥', // 165 in CP1252 - "\x1B*6" => '¦', // 166 in CP1252 - "\x1BN'" => '§', // 167 in CP1252 - "\x1BNH " => '¨', // 168 in CP1252 - "\x1BNS" => '©', // 169 in CP1252 - "\x1BNc" => 'ª', // 170 in CP1252 - "\x1BN+" => '«', // 171 in CP1252 - "\x1B*<" => '¬', // 172 in CP1252 - "\x1B*=" => '­', // 173 in CP1252 - "\x1BNR" => '®', // 174 in CP1252 - "\x1B*?" => '¯', // 175 in CP1252 - "\x1BN0" => '°', // 176 in CP1252 - "\x1BN1" => '±', // 177 in CP1252 - "\x1BN2" => '²', // 178 in CP1252 - "\x1BN3" => '³', // 179 in CP1252 - "\x1BNB " => '´', // 180 in CP1252 - "\x1BN5" => 'µ', // 181 in CP1252 - "\x1BN6" => '¶', // 182 in CP1252 - "\x1BN7" => '·', // 183 in CP1252 - "\x1B+8" => '¸', // 184 in CP1252 - "\x1BNQ" => '¹', // 185 in CP1252 - "\x1BNk" => 'º', // 186 in CP1252 - "\x1BN;" => '»', // 187 in CP1252 - "\x1BN<" => '¼', // 188 in CP1252 - "\x1BN=" => '½', // 189 in CP1252 - "\x1BN>" => '¾', // 190 in CP1252 - "\x1BN?" => '¿', // 191 in CP1252 - "\x1BNAA" => 'À', // 192 in CP1252 - "\x1BNBA" => 'Á', // 193 in CP1252 - "\x1BNCA" => 'Â', // 194 in CP1252 - "\x1BNDA" => 'Ã', // 195 in CP1252 - "\x1BNHA" => 'Ä', // 196 in CP1252 - "\x1BNJA" => 'Å', // 197 in CP1252 - "\x1BNa" => 'Æ', // 198 in CP1252 - "\x1BNKC" => 'Ç', // 199 in CP1252 - "\x1BNAE" => 'È', // 200 in CP1252 - "\x1BNBE" => 'É', // 201 in CP1252 - "\x1BNCE" => 'Ê', // 202 in CP1252 - "\x1BNHE" => 'Ë', // 203 in CP1252 - "\x1BNAI" => 'Ì', // 204 in CP1252 - "\x1BNBI" => 'Í', // 205 in CP1252 - "\x1BNCI" => 'Î', // 206 in CP1252 - "\x1BNHI" => 'Ï', // 207 in CP1252 - "\x1BNb" => 'Ð', // 208 in CP1252 - "\x1BNDN" => 'Ñ', // 209 in CP1252 - "\x1BNAO" => 'Ò', // 210 in CP1252 - "\x1BNBO" => 'Ó', // 211 in CP1252 - "\x1BNCO" => 'Ô', // 212 in CP1252 - "\x1BNDO" => 'Õ', // 213 in CP1252 - "\x1BNHO" => 'Ö', // 214 in CP1252 - "\x1B-7" => '×', // 215 in CP1252 - "\x1BNi" => 'Ø', // 216 in CP1252 - "\x1BNAU" => 'Ù', // 217 in CP1252 - "\x1BNBU" => 'Ú', // 218 in CP1252 - "\x1BNCU" => 'Û', // 219 in CP1252 - "\x1BNHU" => 'Ü', // 220 in CP1252 - "\x1B-=" => 'Ý', // 221 in CP1252 - "\x1BNl" => 'Þ', // 222 in CP1252 - "\x1BN{" => 'ß', // 223 in CP1252 - "\x1BNAa" => 'à', // 224 in CP1252 - "\x1BNBa" => 'á', // 225 in CP1252 - "\x1BNCa" => 'â', // 226 in CP1252 - "\x1BNDa" => 'ã', // 227 in CP1252 - "\x1BNHa" => 'ä', // 228 in CP1252 - "\x1BNJa" => 'å', // 229 in CP1252 - "\x1BNq" => 'æ', // 230 in CP1252 - "\x1BNKc" => 'ç', // 231 in CP1252 - "\x1BNAe" => 'è', // 232 in CP1252 - "\x1BNBe" => 'é', // 233 in CP1252 - "\x1BNCe" => 'ê', // 234 in CP1252 - "\x1BNHe" => 'ë', // 235 in CP1252 - "\x1BNAi" => 'ì', // 236 in CP1252 - "\x1BNBi" => 'í', // 237 in CP1252 - "\x1BNCi" => 'î', // 238 in CP1252 - "\x1BNHi" => 'ï', // 239 in CP1252 - "\x1BNs" => 'ð', // 240 in CP1252 - "\x1BNDn" => 'ñ', // 241 in CP1252 - "\x1BNAo" => 'ò', // 242 in CP1252 - "\x1BNBo" => 'ó', // 243 in CP1252 - "\x1BNCo" => 'ô', // 244 in CP1252 - "\x1BNDo" => 'õ', // 245 in CP1252 - "\x1BNHo" => 'ö', // 246 in CP1252 - "\x1B/7" => '÷', // 247 in CP1252 - "\x1BNy" => 'ø', // 248 in CP1252 - "\x1BNAu" => 'ù', // 249 in CP1252 - "\x1BNBu" => 'ú', // 250 in CP1252 - "\x1BNCu" => 'û', // 251 in CP1252 - "\x1BNHu" => 'ü', // 252 in CP1252 - "\x1B/=" => 'ý', // 253 in CP1252 - "\x1BN|" => 'þ', // 254 in CP1252 - "\x1BNHy" => 'ÿ', // 255 in CP1252 - ); - } - - /** - * Get whether mbstring extension is available - * - * @return boolean - */ - public static function getIsMbstringEnabled() - { - if (isset(self::$isMbstringEnabled)) { - return self::$isMbstringEnabled; - } - - self::$isMbstringEnabled = function_exists('mb_convert_encoding') ? - true : false; - - return self::$isMbstringEnabled; - } - - /** - * Get whether iconv extension is available - * - * @return boolean - */ - public static function getIsIconvEnabled() - { - if (isset(self::$isIconvEnabled)) { - return self::$isIconvEnabled; - } - - // Fail if iconv doesn't exist - if (!function_exists('iconv')) { - self::$isIconvEnabled = false; - return false; - } - - // Sometimes iconv is not working, and e.g. iconv('UTF-8', 'UTF-16LE', 'x') just returns false, - if (!@iconv('UTF-8', 'UTF-16LE', 'x')) { - self::$isIconvEnabled = false; - return false; - } - - // Sometimes iconv_substr('A', 0, 1, 'UTF-8') just returns false in PHP 5.2.0 - // we cannot use iconv in that case either (http://bugs.php.net/bug.php?id=37773) - if (!@iconv_substr('A', 0, 1, 'UTF-8')) { - self::$isIconvEnabled = false; - return false; - } - - // CUSTOM: IBM AIX iconv() does not work - if (defined('PHP_OS') && @stristr(PHP_OS, 'AIX') && defined('ICONV_IMPL') && (@strcasecmp(ICONV_IMPL, 'unknown') == 0) && defined('ICONV_VERSION') && (@strcasecmp(ICONV_VERSION, 'unknown') == 0)) { - self::$isIconvEnabled = false; - return false; - } - - // If we reach here no problems were detected with iconv - self::$isIconvEnabled = true; - return true; - } - - public static function buildCharacterSets() - { - if (empty(self::$controlCharacters)) { - self::buildControlCharacters(); - } - if (empty(self::$SYLKCharacters)) { - self::buildSYLKCharacters(); - } - } - - /** - * Convert from OpenXML escaped control character to PHP control character - * - * Excel 2007 team: - * ---------------- - * That's correct, control characters are stored directly in the shared-strings table. - * We do encode characters that cannot be represented in XML using the following escape sequence: - * _xHHHH_ where H represents a hexadecimal character in the character's value... - * So you could end up with something like _x0008_ in a string (either in a cell value (<v>) - * element or in the shared string <t> element. - * - * @param string $value Value to unescape - * @return string - */ - public static function ControlCharacterOOXML2PHP($value = '') - { - return str_replace(array_keys(self::$controlCharacters), array_values(self::$controlCharacters), $value); - } - - /** - * Convert from PHP control character to OpenXML escaped control character - * - * Excel 2007 team: - * ---------------- - * That's correct, control characters are stored directly in the shared-strings table. - * We do encode characters that cannot be represented in XML using the following escape sequence: - * _xHHHH_ where H represents a hexadecimal character in the character's value... - * So you could end up with something like _x0008_ in a string (either in a cell value (<v>) - * element or in the shared string <t> element. - * - * @param string $value Value to escape - * @return string - */ - public static function ControlCharacterPHP2OOXML($value = '') - { - return str_replace(array_values(self::$controlCharacters), array_keys(self::$controlCharacters), $value); - } - - /** - * Try to sanitize UTF8, stripping invalid byte sequences. Not perfect. Does not surrogate characters. - * - * @param string $value - * @return string - */ - public static function SanitizeUTF8($value) - { - if (self::getIsIconvEnabled()) { - $value = @iconv('UTF-8', 'UTF-8', $value); - return $value; - } - - if (self::getIsMbstringEnabled()) { - $value = mb_convert_encoding($value, 'UTF-8', 'UTF-8'); - return $value; - } - - // else, no conversion - return $value; - } - - /** - * Check if a string contains UTF8 data - * - * @param string $value - * @return boolean - */ - public static function IsUTF8($value = '') - { - return $value === '' || preg_match('/^./su', $value) === 1; - } - - /** - * Formats a numeric value as a string for output in various output writers forcing - * point as decimal separator in case locale is other than English. - * - * @param mixed $value - * @return string - */ - public static function FormatNumber($value) - { - if (is_float($value)) { - return str_replace(',', '.', $value); - } - return (string) $value; - } - - /** - * Converts a UTF-8 string into BIFF8 Unicode string data (8-bit string length) - * Writes the string using uncompressed notation, no rich text, no Asian phonetics - * If mbstring extension is not available, ASCII is assumed, and compressed notation is used - * although this will give wrong results for non-ASCII strings - * see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3 - * - * @param string $value UTF-8 encoded string - * @param mixed[] $arrcRuns Details of rich text runs in $value - * @return string - */ - public static function UTF8toBIFF8UnicodeShort($value, $arrcRuns = array()) - { - // character count - $ln = self::CountCharacters($value, 'UTF-8'); - // option flags - if (empty($arrcRuns)) { - $opt = (self::getIsIconvEnabled() || self::getIsMbstringEnabled()) ? - 0x0001 : 0x0000; - $data = pack('CC', $ln, $opt); - // characters - $data .= self::ConvertEncoding($value, 'UTF-16LE', 'UTF-8'); - } else { - $data = pack('vC', $ln, 0x09); - $data .= pack('v', count($arrcRuns)); - // characters - $data .= self::ConvertEncoding($value, 'UTF-16LE', 'UTF-8'); - foreach ($arrcRuns as $cRun) { - $data .= pack('v', $cRun['strlen']); - $data .= pack('v', $cRun['fontidx']); - } - } - return $data; - } - - /** - * Converts a UTF-8 string into BIFF8 Unicode string data (16-bit string length) - * Writes the string using uncompressed notation, no rich text, no Asian phonetics - * If mbstring extension is not available, ASCII is assumed, and compressed notation is used - * although this will give wrong results for non-ASCII strings - * see OpenOffice.org's Documentation of the Microsoft Excel File Format, sect. 2.5.3 - * - * @param string $value UTF-8 encoded string - * @return string - */ - public static function UTF8toBIFF8UnicodeLong($value) - { - // character count - $ln = self::CountCharacters($value, 'UTF-8'); - - // option flags - $opt = (self::getIsIconvEnabled() || self::getIsMbstringEnabled()) ? - 0x0001 : 0x0000; - - // characters - $chars = self::ConvertEncoding($value, 'UTF-16LE', 'UTF-8'); - - $data = pack('vC', $ln, $opt) . $chars; - return $data; - } - - /** - * Convert string from one encoding to another. First try mbstring, then iconv, finally strlen - * - * @param string $value - * @param string $to Encoding to convert to, e.g. 'UTF-8' - * @param string $from Encoding to convert from, e.g. 'UTF-16LE' - * @return string - */ - public static function ConvertEncoding($value, $to, $from) - { - if (self::getIsIconvEnabled()) { - return iconv($from, $to, $value); - } - - if (self::getIsMbstringEnabled()) { - return mb_convert_encoding($value, $to, $from); - } - - if ($from == 'UTF-16LE') { - return self::utf16_decode($value, false); - } elseif ($from == 'UTF-16BE') { - return self::utf16_decode($value); - } - // else, no conversion - return $value; - } - - /** - * Decode UTF-16 encoded strings. - * - * Can handle both BOM'ed data and un-BOM'ed data. - * Assumes Big-Endian byte order if no BOM is available. - * This function was taken from http://php.net/manual/en/function.utf8-decode.php - * and $bom_be parameter added. - * - * @param string $str UTF-16 encoded data to decode. - * @return string UTF-8 / ISO encoded data. - * @access public - * @version 0.2 / 2010-05-13 - * @author Rasmus Andersson {@link http://rasmusandersson.se/} - * @author vadik56 - */ - public static function utf16_decode($str, $bom_be = true) - { - if (strlen($str) < 2) { - return $str; - } - $c0 = ord($str{0}); - $c1 = ord($str{1}); - if ($c0 == 0xfe && $c1 == 0xff) { - $str = substr($str, 2); - } elseif ($c0 == 0xff && $c1 == 0xfe) { - $str = substr($str, 2); - $bom_be = false; - } - $len = strlen($str); - $newstr = ''; - for ($i=0; $i<$len; $i+=2) { - if ($bom_be) { - $val = ord($str{$i}) << 4; - $val += ord($str{$i+1}); - } else { - $val = ord($str{$i+1}) << 4; - $val += ord($str{$i}); - } - $newstr .= ($val == 0x228) ? "\n" : chr($val); - } - return $newstr; - } - - /** - * Get character count. First try mbstring, then iconv, finally strlen - * - * @param string $value - * @param string $enc Encoding - * @return int Character count - */ - public static function CountCharacters($value, $enc = 'UTF-8') - { - if (self::getIsMbstringEnabled()) { - return mb_strlen($value, $enc); - } - - if (self::getIsIconvEnabled()) { - return iconv_strlen($value, $enc); - } - - // else strlen - return strlen($value); - } - - /** - * Get a substring of a UTF-8 encoded string. First try mbstring, then iconv, finally strlen - * - * @param string $pValue UTF-8 encoded string - * @param int $pStart Start offset - * @param int $pLength Maximum number of characters in substring - * @return string - */ - public static function Substring($pValue = '', $pStart = 0, $pLength = 0) - { - if (self::getIsMbstringEnabled()) { - return mb_substr($pValue, $pStart, $pLength, 'UTF-8'); - } - - if (self::getIsIconvEnabled()) { - return iconv_substr($pValue, $pStart, $pLength, 'UTF-8'); - } - - // else substr - return substr($pValue, $pStart, $pLength); - } - - /** - * Convert a UTF-8 encoded string to upper case - * - * @param string $pValue UTF-8 encoded string - * @return string - */ - public static function StrToUpper($pValue = '') - { - if (function_exists('mb_convert_case')) { - return mb_convert_case($pValue, MB_CASE_UPPER, "UTF-8"); - } - return strtoupper($pValue); - } - - /** - * Convert a UTF-8 encoded string to lower case - * - * @param string $pValue UTF-8 encoded string - * @return string - */ - public static function StrToLower($pValue = '') - { - if (function_exists('mb_convert_case')) { - return mb_convert_case($pValue, MB_CASE_LOWER, "UTF-8"); - } - return strtolower($pValue); - } - - /** - * Convert a UTF-8 encoded string to title/proper case - * (uppercase every first character in each word, lower case all other characters) - * - * @param string $pValue UTF-8 encoded string - * @return string - */ - public static function StrToTitle($pValue = '') - { - if (function_exists('mb_convert_case')) { - return mb_convert_case($pValue, MB_CASE_TITLE, "UTF-8"); - } - return ucwords($pValue); - } - - public static function mb_is_upper($char) - { - return mb_strtolower($char, "UTF-8") != $char; - } - - public static function mb_str_split($string) - { - # Split at all position not after the start: ^ - # and not before the end: $ - return preg_split('/(?<!^)(?!$)/u', $string); - } - - /** - * Reverse the case of a string, so that all uppercase characters become lowercase - * and all lowercase characters become uppercase - * - * @param string $pValue UTF-8 encoded string - * @return string - */ - public static function StrCaseReverse($pValue = '') - { - if (self::getIsMbstringEnabled()) { - $characters = self::mb_str_split($pValue); - foreach ($characters as &$character) { - if (self::mb_is_upper($character)) { - $character = mb_strtolower($character, 'UTF-8'); - } else { - $character = mb_strtoupper($character, 'UTF-8'); - } - } - return implode('', $characters); - } - return strtolower($pValue) ^ strtoupper($pValue) ^ $pValue; - } - - /** - * Identify whether a string contains a fractional numeric value, - * and convert it to a numeric if it is - * - * @param string &$operand string value to test - * @return boolean - */ - public static function convertToNumberIfFraction(&$operand) - { - if (preg_match('/^'.self::STRING_REGEXP_FRACTION.'$/i', $operand, $match)) { - $sign = ($match[1] == '-') ? '-' : '+'; - $fractionFormula = '='.$sign.$match[2].$sign.$match[3]; - $operand = PHPExcel_Calculation::getInstance()->_calculateFormulaValue($fractionFormula); - return true; - } - return false; - } // function convertToNumberIfFraction() - - /** - * Get the decimal separator. If it has not yet been set explicitly, try to obtain number - * formatting information from locale. - * - * @return string - */ - public static function getDecimalSeparator() - { - if (!isset(self::$decimalSeparator)) { - $localeconv = localeconv(); - self::$decimalSeparator = ($localeconv['decimal_point'] != '') - ? $localeconv['decimal_point'] : $localeconv['mon_decimal_point']; - - if (self::$decimalSeparator == '') { - // Default to . - self::$decimalSeparator = '.'; - } - } - return self::$decimalSeparator; - } - - /** - * Set the decimal separator. Only used by PHPExcel_Style_NumberFormat::toFormattedString() - * to format output by PHPExcel_Writer_HTML and PHPExcel_Writer_PDF - * - * @param string $pValue Character for decimal separator - */ - public static function setDecimalSeparator($pValue = '.') - { - self::$decimalSeparator = $pValue; - } - - /** - * Get the thousands separator. If it has not yet been set explicitly, try to obtain number - * formatting information from locale. - * - * @return string - */ - public static function getThousandsSeparator() - { - if (!isset(self::$thousandsSeparator)) { - $localeconv = localeconv(); - self::$thousandsSeparator = ($localeconv['thousands_sep'] != '') - ? $localeconv['thousands_sep'] : $localeconv['mon_thousands_sep']; - - if (self::$thousandsSeparator == '') { - // Default to . - self::$thousandsSeparator = ','; - } - } - return self::$thousandsSeparator; - } - - /** - * Set the thousands separator. Only used by PHPExcel_Style_NumberFormat::toFormattedString() - * to format output by PHPExcel_Writer_HTML and PHPExcel_Writer_PDF - * - * @param string $pValue Character for thousands separator - */ - public static function setThousandsSeparator($pValue = ',') - { - self::$thousandsSeparator = $pValue; - } - - /** - * Get the currency code. If it has not yet been set explicitly, try to obtain the - * symbol information from locale. - * - * @return string - */ - public static function getCurrencyCode() - { - if (!isset(self::$currencyCode)) { - $localeconv = localeconv(); - self::$currencyCode = ($localeconv['currency_symbol'] != '') - ? $localeconv['currency_symbol'] : $localeconv['int_curr_symbol']; - - if (self::$currencyCode == '') { - // Default to $ - self::$currencyCode = '$'; - } - } - return self::$currencyCode; - } - - /** - * Set the currency code. Only used by PHPExcel_Style_NumberFormat::toFormattedString() - * to format output by PHPExcel_Writer_HTML and PHPExcel_Writer_PDF - * - * @param string $pValue Character for currency code - */ - public static function setCurrencyCode($pValue = '$') - { - self::$currencyCode = $pValue; - } - - /** - * Convert SYLK encoded string to UTF-8 - * - * @param string $pValue - * @return string UTF-8 encoded string - */ - public static function SYLKtoUTF8($pValue = '') - { - // If there is no escape character in the string there is nothing to do - if (strpos($pValue, '') === false) { - return $pValue; - } - - foreach (self::$SYLKCharacters as $k => $v) { - $pValue = str_replace($k, $v, $pValue); - } - - return $pValue; - } - - /** - * Retrieve any leading numeric part of a string, or return the full string if no leading numeric - * (handles basic integer or float, but not exponent or non decimal) - * - * @param string $value - * @return mixed string or only the leading numeric part of the string - */ - public static function testStringAsNumeric($value) - { - if (is_numeric($value)) { - return $value; - } - $v = floatval($value); - return (is_numeric(substr($value, 0, strlen($v)))) ? $v : $value; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/TimeZone.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/TimeZone.php deleted file mode 100644 index 73373e0..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/TimeZone.php +++ /dev/null @@ -1,144 +0,0 @@ -<?php - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Shared_TimeZone - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Shared_TimeZone -{ - /* - * Default Timezone used for date/time conversions - * - * @private - * @var string - */ - protected static $timezone = 'UTC'; - - /** - * Validate a Timezone name - * - * @param string $timezone Time zone (e.g. 'Europe/London') - * @return boolean Success or failure - */ - public static function _validateTimeZone($timezone) - { - if (in_array($timezone, DateTimeZone::listIdentifiers())) { - return true; - } - return false; - } - - /** - * Set the Default Timezone used for date/time conversions - * - * @param string $timezone Time zone (e.g. 'Europe/London') - * @return boolean Success or failure - */ - public static function setTimeZone($timezone) - { - if (self::_validateTimezone($timezone)) { - self::$timezone = $timezone; - return true; - } - return false; - } - - - /** - * Return the Default Timezone used for date/time conversions - * - * @return string Timezone (e.g. 'Europe/London') - */ - public static function getTimeZone() - { - return self::$timezone; - } - - - /** - * Return the Timezone transition for the specified timezone and timestamp - * - * @param DateTimeZone $objTimezone The timezone for finding the transitions - * @param integer $timestamp PHP date/time value for finding the current transition - * @return array The current transition details - */ - private static function getTimezoneTransitions($objTimezone, $timestamp) - { - $allTransitions = $objTimezone->getTransitions(); - $transitions = array(); - foreach ($allTransitions as $key => $transition) { - if ($transition['ts'] > $timestamp) { - $transitions[] = ($key > 0) ? $allTransitions[$key - 1] : $transition; - break; - } - if (empty($transitions)) { - $transitions[] = end($allTransitions); - } - } - - return $transitions; - } - - /** - * Return the Timezone offset used for date/time conversions to/from UST - * This requires both the timezone and the calculated date/time to allow for local DST - * - * @param string $timezone The timezone for finding the adjustment to UST - * @param integer $timestamp PHP date/time value - * @return integer Number of seconds for timezone adjustment - * @throws PHPExcel_Exception - */ - public static function getTimeZoneAdjustment($timezone, $timestamp) - { - if ($timezone !== null) { - if (!self::_validateTimezone($timezone)) { - throw new PHPExcel_Exception("Invalid timezone " . $timezone); - } - } else { - $timezone = self::$timezone; - } - - if ($timezone == 'UST') { - return 0; - } - - $objTimezone = new DateTimeZone($timezone); - if (version_compare(PHP_VERSION, '5.3.0') >= 0) { - $transitions = $objTimezone->getTransitions($timestamp, $timestamp); - } else { - $transitions = self::getTimezoneTransitions($objTimezone, $timestamp); - } - - return (count($transitions) > 0) ? $transitions[0]['offset'] : 0; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/XMLWriter.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/XMLWriter.php deleted file mode 100644 index 1dc119b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/XMLWriter.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php - -if (!defined('DATE_W3C')) { - define('DATE_W3C', 'Y-m-d\TH:i:sP'); -} - -if (!defined('DEBUGMODE_ENABLED')) { - define('DEBUGMODE_ENABLED', false); -} - -/** - * PHPExcel_Shared_XMLWriter - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_XMLWriter extends XMLWriter -{ - /** Temporary storage method */ - const STORAGE_MEMORY = 1; - const STORAGE_DISK = 2; - - /** - * Temporary filename - * - * @var string - */ - private $tempFileName = ''; - - /** - * Create a new PHPExcel_Shared_XMLWriter instance - * - * @param int $pTemporaryStorage Temporary storage location - * @param string $pTemporaryStorageFolder Temporary storage folder - */ - public function __construct($pTemporaryStorage = self::STORAGE_MEMORY, $pTemporaryStorageFolder = null) - { - // Open temporary storage - if ($pTemporaryStorage == self::STORAGE_MEMORY) { - $this->openMemory(); - } else { - // Create temporary filename - if ($pTemporaryStorageFolder === null) { - $pTemporaryStorageFolder = PHPExcel_Shared_File::sys_get_temp_dir(); - } - $this->tempFileName = @tempnam($pTemporaryStorageFolder, 'xml'); - - // Open storage - if ($this->openUri($this->tempFileName) === false) { - // Fallback to memory... - $this->openMemory(); - } - } - - // Set default values - if (DEBUGMODE_ENABLED) { - $this->setIndent(true); - } - } - - /** - * Destructor - */ - public function __destruct() - { - // Unlink temporary files - if ($this->tempFileName != '') { - @unlink($this->tempFileName); - } - } - - /** - * Get written data - * - * @return $data - */ - public function getData() - { - if ($this->tempFileName == '') { - return $this->outputMemory(true); - } else { - $this->flush(); - return file_get_contents($this->tempFileName); - } - } - - /** - * Fallback method for writeRaw, introduced in PHP 5.2 - * - * @param string $text - * @return string - */ - public function writeRawData($text) - { - if (is_array($text)) { - $text = implode("\n", $text); - } - - if (method_exists($this, 'writeRaw')) { - return $this->writeRaw(htmlspecialchars($text)); - } - - return $this->text($text); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/ZipArchive.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/ZipArchive.php deleted file mode 100644 index 9eac8ca..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/ZipArchive.php +++ /dev/null @@ -1,163 +0,0 @@ -<?php - -if (!defined('PCLZIP_TEMPORARY_DIR')) { - define('PCLZIP_TEMPORARY_DIR', PHPExcel_Shared_File::sys_get_temp_dir() . DIRECTORY_SEPARATOR); -} -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/PCLZip/pclzip.lib.php'; - -/** - * PHPExcel_Shared_ZipArchive - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_ZipArchive - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_ZipArchive -{ - - /** constants */ - const OVERWRITE = 'OVERWRITE'; - const CREATE = 'CREATE'; - - - /** - * Temporary storage directory - * - * @var string - */ - private $tempDir; - - /** - * Zip Archive Stream Handle - * - * @var string - */ - private $zip; - - - /** - * Open a new zip archive - * - * @param string $fileName Filename for the zip archive - * @return boolean - */ - public function open($fileName) - { - $this->tempDir = PHPExcel_Shared_File::sys_get_temp_dir(); - $this->zip = new PclZip($fileName); - - return true; - } - - - /** - * Close this zip archive - * - */ - public function close() - { - } - - - /** - * Add a new file to the zip archive from a string of raw data. - * - * @param string $localname Directory/Name of the file to add to the zip archive - * @param string $contents String of data to add to the zip archive - */ - public function addFromString($localname, $contents) - { - $filenameParts = pathinfo($localname); - - $handle = fopen($this->tempDir.'/'.$filenameParts["basename"], "wb"); - fwrite($handle, $contents); - fclose($handle); - - $res = $this->zip->add($this->tempDir.'/'.$filenameParts["basename"], PCLZIP_OPT_REMOVE_PATH, $this->tempDir, PCLZIP_OPT_ADD_PATH, $filenameParts["dirname"]); - if ($res == 0) { - throw new PHPExcel_Writer_Exception("Error zipping files : " . $this->zip->errorInfo(true)); - } - - unlink($this->tempDir.'/'.$filenameParts["basename"]); - } - - /** - * Find if given fileName exist in archive (Emulate ZipArchive locateName()) - * - * @param string $fileName Filename for the file in zip archive - * @return boolean - */ - public function locateName($fileName) - { - $fileName = strtolower($fileName); - - $list = $this->zip->listContent(); - $listCount = count($list); - $index = -1; - for ($i = 0; $i < $listCount; ++$i) { - if (strtolower($list[$i]["filename"]) == $fileName || - strtolower($list[$i]["stored_filename"]) == $fileName) { - $index = $i; - break; - } - } - return ($index > -1) ? $index : false; - } - - /** - * Extract file from archive by given fileName (Emulate ZipArchive getFromName()) - * - * @param string $fileName Filename for the file in zip archive - * @return string $contents File string contents - */ - public function getFromName($fileName) - { - $index = $this->locateName($fileName); - - if ($index !== false) { - $extracted = $this->getFromIndex($index); - } else { - $fileName = substr($fileName, 1); - $index = $this->locateName($fileName); - if ($index === false) { - return false; - } - $extracted = $this->zip->getFromIndex($index); - } - - $contents = $extracted; - if ((is_array($extracted)) && ($extracted != 0)) { - $contents = $extracted[0]["content"]; - } - - return $contents; - } - - public function getFromIndex($index) { - $extracted = $this->zip->extractByIndex($index, PCLZIP_OPT_EXTRACT_AS_STRING); - $contents = ''; - if ((is_array($extracted)) && ($extracted != 0)) { - $contents = $extracted[0]["content"]; - } - - return $contents; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/ZipStreamWrapper.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/ZipStreamWrapper.php deleted file mode 100644 index 2e0324c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/ZipStreamWrapper.php +++ /dev/null @@ -1,200 +0,0 @@ -<?php - -/** - * PHPExcel_Shared_ZipStreamWrapper - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Shared_ZipStreamWrapper -{ - /** - * Internal ZipAcrhive - * - * @var ZipArchive - */ - private $archive; - - /** - * Filename in ZipAcrhive - * - * @var string - */ - private $fileNameInArchive = ''; - - /** - * Position in file - * - * @var int - */ - private $position = 0; - - /** - * Data - * - * @var mixed - */ - private $data = ''; - - /** - * Register wrapper - */ - public static function register() - { - @stream_wrapper_unregister('zip'); - @stream_wrapper_register('zip', __CLASS__); - } - - /** - * Implements support for fopen(). - * - * @param string $path resource name including scheme, e.g. - * @param string $mode only "r" is supported - * @param int $options mask of STREAM_REPORT_ERRORS and STREAM_USE_PATH - * @param string &$openedPath absolute path of the opened stream (out parameter) - * @return bool true on success - */ - public function stream_open($path, $mode, $options, &$opened_path) - { - // Check for mode - if ($mode{0} != 'r') { - throw new PHPExcel_Reader_Exception('Mode ' . $mode . ' is not supported. Only read mode is supported.'); - } - - $pos = strrpos($path, '#'); - $url['host'] = substr($path, 6, $pos - 6); // 6: strlen('zip://') - $url['fragment'] = substr($path, $pos + 1); - - // Open archive - $this->archive = new ZipArchive(); - $this->archive->open($url['host']); - - $this->fileNameInArchive = $url['fragment']; - $this->position = 0; - $this->data = $this->archive->getFromName($this->fileNameInArchive); - - return true; - } - - /** - * Implements support for fstat(). - * - * @return boolean - */ - public function statName() - { - return $this->fileNameInArchive; - } - - /** - * Implements support for fstat(). - * - * @return boolean - */ - public function url_stat() - { - return $this->statName($this->fileNameInArchive); - } - - /** - * Implements support for fstat(). - * - * @return boolean - */ - public function stream_stat() - { - return $this->archive->statName($this->fileNameInArchive); - } - - /** - * Implements support for fread(), fgets() etc. - * - * @param int $count maximum number of bytes to read - * @return string - */ - public function stream_read($count) - { - $ret = substr($this->data, $this->position, $count); - $this->position += strlen($ret); - return $ret; - } - - /** - * Returns the position of the file pointer, i.e. its offset into the file - * stream. Implements support for ftell(). - * - * @return int - */ - public function stream_tell() - { - return $this->position; - } - - /** - * EOF stream - * - * @return bool - */ - public function stream_eof() - { - return $this->position >= strlen($this->data); - } - - /** - * Seek stream - * - * @param int $offset byte offset - * @param int $whence SEEK_SET, SEEK_CUR or SEEK_END - * @return bool - */ - public function stream_seek($offset, $whence) - { - switch ($whence) { - case SEEK_SET: - if ($offset < strlen($this->data) && $offset >= 0) { - $this->position = $offset; - return true; - } else { - return false; - } - break; - case SEEK_CUR: - if ($offset >= 0) { - $this->position += $offset; - return true; - } else { - return false; - } - break; - case SEEK_END: - if (strlen($this->data) + $offset >= 0) { - $this->position = strlen($this->data) + $offset; - return true; - } else { - return false; - } - break; - default: - return false; - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/bestFitClass.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/bestFitClass.php deleted file mode 100644 index 2de029f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/bestFitClass.php +++ /dev/null @@ -1,425 +0,0 @@ -<?php - -/** - * PHPExcel_Best_Fit - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Trend - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Best_Fit -{ - /** - * Indicator flag for a calculation error - * - * @var boolean - **/ - protected $error = false; - - /** - * Algorithm type to use for best-fit - * - * @var string - **/ - protected $bestFitType = 'undetermined'; - - /** - * Number of entries in the sets of x- and y-value arrays - * - * @var int - **/ - protected $valueCount = 0; - - /** - * X-value dataseries of values - * - * @var float[] - **/ - protected $xValues = array(); - - /** - * Y-value dataseries of values - * - * @var float[] - **/ - protected $yValues = array(); - - /** - * Flag indicating whether values should be adjusted to Y=0 - * - * @var boolean - **/ - protected $adjustToZero = false; - - /** - * Y-value series of best-fit values - * - * @var float[] - **/ - protected $yBestFitValues = array(); - - protected $goodnessOfFit = 1; - - protected $stdevOfResiduals = 0; - - protected $covariance = 0; - - protected $correlation = 0; - - protected $SSRegression = 0; - - protected $SSResiduals = 0; - - protected $DFResiduals = 0; - - protected $f = 0; - - protected $slope = 0; - - protected $slopeSE = 0; - - protected $intersect = 0; - - protected $intersectSE = 0; - - protected $xOffset = 0; - - protected $yOffset = 0; - - - public function getError() - { - return $this->error; - } - - - public function getBestFitType() - { - return $this->bestFitType; - } - - /** - * Return the Y-Value for a specified value of X - * - * @param float $xValue X-Value - * @return float Y-Value - */ - public function getValueOfYForX($xValue) - { - return false; - } - - /** - * Return the X-Value for a specified value of Y - * - * @param float $yValue Y-Value - * @return float X-Value - */ - public function getValueOfXForY($yValue) - { - return false; - } - - /** - * Return the original set of X-Values - * - * @return float[] X-Values - */ - public function getXValues() - { - return $this->xValues; - } - - /** - * Return the Equation of the best-fit line - * - * @param int $dp Number of places of decimal precision to display - * @return string - */ - public function getEquation($dp = 0) - { - return false; - } - - /** - * Return the Slope of the line - * - * @param int $dp Number of places of decimal precision to display - * @return string - */ - public function getSlope($dp = 0) - { - if ($dp != 0) { - return round($this->slope, $dp); - } - return $this->slope; - } - - /** - * Return the standard error of the Slope - * - * @param int $dp Number of places of decimal precision to display - * @return string - */ - public function getSlopeSE($dp = 0) - { - if ($dp != 0) { - return round($this->slopeSE, $dp); - } - return $this->slopeSE; - } - - /** - * Return the Value of X where it intersects Y = 0 - * - * @param int $dp Number of places of decimal precision to display - * @return string - */ - public function getIntersect($dp = 0) - { - if ($dp != 0) { - return round($this->intersect, $dp); - } - return $this->intersect; - } - - /** - * Return the standard error of the Intersect - * - * @param int $dp Number of places of decimal precision to display - * @return string - */ - public function getIntersectSE($dp = 0) - { - if ($dp != 0) { - return round($this->intersectSE, $dp); - } - return $this->intersectSE; - } - - /** - * Return the goodness of fit for this regression - * - * @param int $dp Number of places of decimal precision to return - * @return float - */ - public function getGoodnessOfFit($dp = 0) - { - if ($dp != 0) { - return round($this->goodnessOfFit, $dp); - } - return $this->goodnessOfFit; - } - - public function getGoodnessOfFitPercent($dp = 0) - { - if ($dp != 0) { - return round($this->goodnessOfFit * 100, $dp); - } - return $this->goodnessOfFit * 100; - } - - /** - * Return the standard deviation of the residuals for this regression - * - * @param int $dp Number of places of decimal precision to return - * @return float - */ - public function getStdevOfResiduals($dp = 0) - { - if ($dp != 0) { - return round($this->stdevOfResiduals, $dp); - } - return $this->stdevOfResiduals; - } - - public function getSSRegression($dp = 0) - { - if ($dp != 0) { - return round($this->SSRegression, $dp); - } - return $this->SSRegression; - } - - public function getSSResiduals($dp = 0) - { - if ($dp != 0) { - return round($this->SSResiduals, $dp); - } - return $this->SSResiduals; - } - - public function getDFResiduals($dp = 0) - { - if ($dp != 0) { - return round($this->DFResiduals, $dp); - } - return $this->DFResiduals; - } - - public function getF($dp = 0) - { - if ($dp != 0) { - return round($this->f, $dp); - } - return $this->f; - } - - public function getCovariance($dp = 0) - { - if ($dp != 0) { - return round($this->covariance, $dp); - } - return $this->covariance; - } - - public function getCorrelation($dp = 0) - { - if ($dp != 0) { - return round($this->correlation, $dp); - } - return $this->correlation; - } - - public function getYBestFitValues() - { - return $this->yBestFitValues; - } - - protected function calculateGoodnessOfFit($sumX, $sumY, $sumX2, $sumY2, $sumXY, $meanX, $meanY, $const) - { - $SSres = $SScov = $SScor = $SStot = $SSsex = 0.0; - foreach ($this->xValues as $xKey => $xValue) { - $bestFitY = $this->yBestFitValues[$xKey] = $this->getValueOfYForX($xValue); - - $SSres += ($this->yValues[$xKey] - $bestFitY) * ($this->yValues[$xKey] - $bestFitY); - if ($const) { - $SStot += ($this->yValues[$xKey] - $meanY) * ($this->yValues[$xKey] - $meanY); - } else { - $SStot += $this->yValues[$xKey] * $this->yValues[$xKey]; - } - $SScov += ($this->xValues[$xKey] - $meanX) * ($this->yValues[$xKey] - $meanY); - if ($const) { - $SSsex += ($this->xValues[$xKey] - $meanX) * ($this->xValues[$xKey] - $meanX); - } else { - $SSsex += $this->xValues[$xKey] * $this->xValues[$xKey]; - } - } - - $this->SSResiduals = $SSres; - $this->DFResiduals = $this->valueCount - 1 - $const; - - if ($this->DFResiduals == 0.0) { - $this->stdevOfResiduals = 0.0; - } else { - $this->stdevOfResiduals = sqrt($SSres / $this->DFResiduals); - } - if (($SStot == 0.0) || ($SSres == $SStot)) { - $this->goodnessOfFit = 1; - } else { - $this->goodnessOfFit = 1 - ($SSres / $SStot); - } - - $this->SSRegression = $this->goodnessOfFit * $SStot; - $this->covariance = $SScov / $this->valueCount; - $this->correlation = ($this->valueCount * $sumXY - $sumX * $sumY) / sqrt(($this->valueCount * $sumX2 - pow($sumX, 2)) * ($this->valueCount * $sumY2 - pow($sumY, 2))); - $this->slopeSE = $this->stdevOfResiduals / sqrt($SSsex); - $this->intersectSE = $this->stdevOfResiduals * sqrt(1 / ($this->valueCount - ($sumX * $sumX) / $sumX2)); - if ($this->SSResiduals != 0.0) { - if ($this->DFResiduals == 0.0) { - $this->f = 0.0; - } else { - $this->f = $this->SSRegression / ($this->SSResiduals / $this->DFResiduals); - } - } else { - if ($this->DFResiduals == 0.0) { - $this->f = 0.0; - } else { - $this->f = $this->SSRegression / $this->DFResiduals; - } - } - } - - protected function leastSquareFit($yValues, $xValues, $const) - { - // calculate sums - $x_sum = array_sum($xValues); - $y_sum = array_sum($yValues); - $meanX = $x_sum / $this->valueCount; - $meanY = $y_sum / $this->valueCount; - $mBase = $mDivisor = $xx_sum = $xy_sum = $yy_sum = 0.0; - for ($i = 0; $i < $this->valueCount; ++$i) { - $xy_sum += $xValues[$i] * $yValues[$i]; - $xx_sum += $xValues[$i] * $xValues[$i]; - $yy_sum += $yValues[$i] * $yValues[$i]; - - if ($const) { - $mBase += ($xValues[$i] - $meanX) * ($yValues[$i] - $meanY); - $mDivisor += ($xValues[$i] - $meanX) * ($xValues[$i] - $meanX); - } else { - $mBase += $xValues[$i] * $yValues[$i]; - $mDivisor += $xValues[$i] * $xValues[$i]; - } - } - - // calculate slope -// $this->slope = (($this->valueCount * $xy_sum) - ($x_sum * $y_sum)) / (($this->valueCount * $xx_sum) - ($x_sum * $x_sum)); - $this->slope = $mBase / $mDivisor; - - // calculate intersect -// $this->intersect = ($y_sum - ($this->slope * $x_sum)) / $this->valueCount; - if ($const) { - $this->intersect = $meanY - ($this->slope * $meanX); - } else { - $this->intersect = 0; - } - - $this->calculateGoodnessOfFit($x_sum, $y_sum, $xx_sum, $yy_sum, $xy_sum, $meanX, $meanY, $const); - } - - /** - * Define the regression - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - public function __construct($yValues, $xValues = array(), $const = true) - { - // Calculate number of points - $nY = count($yValues); - $nX = count($xValues); - - // Define X Values if necessary - if ($nX == 0) { - $xValues = range(1, $nY); - $nX = $nY; - } elseif ($nY != $nX) { - // Ensure both arrays of points are the same size - $this->error = true; - return false; - } - - $this->valueCount = $nY; - $this->xValues = $xValues; - $this->yValues = $yValues; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php deleted file mode 100644 index 4448735..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/exponentialBestFitClass.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -require_once(PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/bestFitClass.php'); - -/** - * PHPExcel_Exponential_Best_Fit - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Trend - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Exponential_Best_Fit extends PHPExcel_Best_Fit -{ - /** - * Algorithm type to use for best-fit - * (Name of this trend class) - * - * @var string - **/ - protected $bestFitType = 'exponential'; - - /** - * Return the Y-Value for a specified value of X - * - * @param float $xValue X-Value - * @return float Y-Value - **/ - public function getValueOfYForX($xValue) - { - return $this->getIntersect() * pow($this->getSlope(), ($xValue - $this->xOffset)); - } - - /** - * Return the X-Value for a specified value of Y - * - * @param float $yValue Y-Value - * @return float X-Value - **/ - public function getValueOfXForY($yValue) - { - return log(($yValue + $this->yOffset) / $this->getIntersect()) / log($this->getSlope()); - } - - /** - * Return the Equation of the best-fit line - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getEquation($dp = 0) - { - $slope = $this->getSlope($dp); - $intersect = $this->getIntersect($dp); - - return 'Y = ' . $intersect . ' * ' . $slope . '^X'; - } - - /** - * Return the Slope of the line - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getSlope($dp = 0) - { - if ($dp != 0) { - return round(exp($this->_slope), $dp); - } - return exp($this->_slope); - } - - /** - * Return the Value of X where it intersects Y = 0 - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getIntersect($dp = 0) - { - if ($dp != 0) { - return round(exp($this->intersect), $dp); - } - return exp($this->intersect); - } - - /** - * Execute the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - private function exponentialRegression($yValues, $xValues, $const) - { - foreach ($yValues as &$value) { - if ($value < 0.0) { - $value = 0 - log(abs($value)); - } elseif ($value > 0.0) { - $value = log($value); - } - } - unset($value); - - $this->leastSquareFit($yValues, $xValues, $const); - } - - /** - * Define the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - public function __construct($yValues, $xValues = array(), $const = true) - { - if (parent::__construct($yValues, $xValues) !== false) { - $this->exponentialRegression($yValues, $xValues, $const); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/linearBestFitClass.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/linearBestFitClass.php deleted file mode 100644 index 76b55b3..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/linearBestFitClass.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -require_once(PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/bestFitClass.php'); - -/** - * PHPExcel_Linear_Best_Fit - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Trend - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Linear_Best_Fit extends PHPExcel_Best_Fit -{ - /** - * Algorithm type to use for best-fit - * (Name of this trend class) - * - * @var string - **/ - protected $bestFitType = 'linear'; - - /** - * Return the Y-Value for a specified value of X - * - * @param float $xValue X-Value - * @return float Y-Value - **/ - public function getValueOfYForX($xValue) - { - return $this->getIntersect() + $this->getSlope() * $xValue; - } - - /** - * Return the X-Value for a specified value of Y - * - * @param float $yValue Y-Value - * @return float X-Value - **/ - public function getValueOfXForY($yValue) - { - return ($yValue - $this->getIntersect()) / $this->getSlope(); - } - - - /** - * Return the Equation of the best-fit line - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getEquation($dp = 0) - { - $slope = $this->getSlope($dp); - $intersect = $this->getIntersect($dp); - - return 'Y = ' . $intersect . ' + ' . $slope . ' * X'; - } - - /** - * Execute the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - private function linearRegression($yValues, $xValues, $const) - { - $this->leastSquareFit($yValues, $xValues, $const); - } - - /** - * Define the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - public function __construct($yValues, $xValues = array(), $const = true) - { - if (parent::__construct($yValues, $xValues) !== false) { - $this->linearRegression($yValues, $xValues, $const); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/logarithmicBestFitClass.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/logarithmicBestFitClass.php deleted file mode 100644 index 221c538..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/logarithmicBestFitClass.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php - -require_once(PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/bestFitClass.php'); - -/** - * PHPExcel_Logarithmic_Best_Fit - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Trend - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Logarithmic_Best_Fit extends PHPExcel_Best_Fit -{ - /** - * Algorithm type to use for best-fit - * (Name of this trend class) - * - * @var string - **/ - protected $bestFitType = 'logarithmic'; - - /** - * Return the Y-Value for a specified value of X - * - * @param float $xValue X-Value - * @return float Y-Value - **/ - public function getValueOfYForX($xValue) - { - return $this->getIntersect() + $this->getSlope() * log($xValue - $this->xOffset); - } - - /** - * Return the X-Value for a specified value of Y - * - * @param float $yValue Y-Value - * @return float X-Value - **/ - public function getValueOfXForY($yValue) - { - return exp(($yValue - $this->getIntersect()) / $this->getSlope()); - } - - /** - * Return the Equation of the best-fit line - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getEquation($dp = 0) - { - $slope = $this->getSlope($dp); - $intersect = $this->getIntersect($dp); - - return 'Y = '.$intersect.' + '.$slope.' * log(X)'; - } - - /** - * Execute the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - private function logarithmicRegression($yValues, $xValues, $const) - { - foreach ($xValues as &$value) { - if ($value < 0.0) { - $value = 0 - log(abs($value)); - } elseif ($value > 0.0) { - $value = log($value); - } - } - unset($value); - - $this->leastSquareFit($yValues, $xValues, $const); - } - - /** - * Define the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - public function __construct($yValues, $xValues = array(), $const = true) - { - if (parent::__construct($yValues, $xValues) !== false) { - $this->logarithmicRegression($yValues, $xValues, $const); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php deleted file mode 100644 index 8a882b7..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/polynomialBestFitClass.php +++ /dev/null @@ -1,222 +0,0 @@ -<?php - -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/bestFitClass.php'; -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/JAMA/Matrix.php'; - -/** - * PHPExcel_Polynomial_Best_Fit - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Trend - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Polynomial_Best_Fit extends PHPExcel_Best_Fit -{ - /** - * Algorithm type to use for best-fit - * (Name of this trend class) - * - * @var string - **/ - protected $bestFitType = 'polynomial'; - - /** - * Polynomial order - * - * @protected - * @var int - **/ - protected $order = 0; - - - /** - * Return the order of this polynomial - * - * @return int - **/ - public function getOrder() - { - return $this->order; - } - - - /** - * Return the Y-Value for a specified value of X - * - * @param float $xValue X-Value - * @return float Y-Value - **/ - public function getValueOfYForX($xValue) - { - $retVal = $this->getIntersect(); - $slope = $this->getSlope(); - foreach ($slope as $key => $value) { - if ($value != 0.0) { - $retVal += $value * pow($xValue, $key + 1); - } - } - return $retVal; - } - - - /** - * Return the X-Value for a specified value of Y - * - * @param float $yValue Y-Value - * @return float X-Value - **/ - public function getValueOfXForY($yValue) - { - return ($yValue - $this->getIntersect()) / $this->getSlope(); - } - - - /** - * Return the Equation of the best-fit line - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getEquation($dp = 0) - { - $slope = $this->getSlope($dp); - $intersect = $this->getIntersect($dp); - - $equation = 'Y = ' . $intersect; - foreach ($slope as $key => $value) { - if ($value != 0.0) { - $equation .= ' + ' . $value . ' * X'; - if ($key > 0) { - $equation .= '^' . ($key + 1); - } - } - } - return $equation; - } - - - /** - * Return the Slope of the line - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getSlope($dp = 0) - { - if ($dp != 0) { - $coefficients = array(); - foreach ($this->_slope as $coefficient) { - $coefficients[] = round($coefficient, $dp); - } - return $coefficients; - } - return $this->_slope; - } - - - public function getCoefficients($dp = 0) - { - return array_merge(array($this->getIntersect($dp)), $this->getSlope($dp)); - } - - - /** - * Execute the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param int $order Order of Polynomial for this regression - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - private function polynomialRegression($order, $yValues, $xValues, $const) - { - // calculate sums - $x_sum = array_sum($xValues); - $y_sum = array_sum($yValues); - $xx_sum = $xy_sum = 0; - for ($i = 0; $i < $this->valueCount; ++$i) { - $xy_sum += $xValues[$i] * $yValues[$i]; - $xx_sum += $xValues[$i] * $xValues[$i]; - $yy_sum += $yValues[$i] * $yValues[$i]; - } - /* - * This routine uses logic from the PHP port of polyfit version 0.1 - * written by Michael Bommarito and Paul Meagher - * - * The function fits a polynomial function of order $order through - * a series of x-y data points using least squares. - * - */ - for ($i = 0; $i < $this->valueCount; ++$i) { - for ($j = 0; $j <= $order; ++$j) { - $A[$i][$j] = pow($xValues[$i], $j); - } - } - for ($i=0; $i < $this->valueCount; ++$i) { - $B[$i] = array($yValues[$i]); - } - $matrixA = new Matrix($A); - $matrixB = new Matrix($B); - $C = $matrixA->solve($matrixB); - - $coefficients = array(); - for ($i = 0; $i < $C->m; ++$i) { - $r = $C->get($i, 0); - if (abs($r) <= pow(10, -9)) { - $r = 0; - } - $coefficients[] = $r; - } - - $this->intersect = array_shift($coefficients); - $this->_slope = $coefficients; - - $this->calculateGoodnessOfFit($x_sum, $y_sum, $xx_sum, $yy_sum, $xy_sum); - foreach ($this->xValues as $xKey => $xValue) { - $this->yBestFitValues[$xKey] = $this->getValueOfYForX($xValue); - } - } - - - /** - * Define the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param int $order Order of Polynomial for this regression - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - public function __construct($order, $yValues, $xValues = array(), $const = true) - { - if (parent::__construct($yValues, $xValues) !== false) { - if ($order < $this->valueCount) { - $this->bestFitType .= '_'.$order; - $this->order = $order; - $this->polynomialRegression($order, $yValues, $xValues, $const); - if (($this->getGoodnessOfFit() < 0.0) || ($this->getGoodnessOfFit() > 1.0)) { - $this->_error = true; - } - } else { - $this->_error = true; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/powerBestFitClass.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/powerBestFitClass.php deleted file mode 100644 index 77c4734..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/powerBestFitClass.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/bestFitClass.php'; - -/** - * PHPExcel_Power_Best_Fit - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Trend - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Power_Best_Fit extends PHPExcel_Best_Fit -{ - /** - * Algorithm type to use for best-fit - * (Name of this trend class) - * - * @var string - **/ - protected $bestFitType = 'power'; - - - /** - * Return the Y-Value for a specified value of X - * - * @param float $xValue X-Value - * @return float Y-Value - **/ - public function getValueOfYForX($xValue) - { - return $this->getIntersect() * pow(($xValue - $this->xOffset), $this->getSlope()); - } - - - /** - * Return the X-Value for a specified value of Y - * - * @param float $yValue Y-Value - * @return float X-Value - **/ - public function getValueOfXForY($yValue) - { - return pow((($yValue + $this->yOffset) / $this->getIntersect()), (1 / $this->getSlope())); - } - - - /** - * Return the Equation of the best-fit line - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getEquation($dp = 0) - { - $slope = $this->getSlope($dp); - $intersect = $this->getIntersect($dp); - - return 'Y = ' . $intersect . ' * X^' . $slope; - } - - - /** - * Return the Value of X where it intersects Y = 0 - * - * @param int $dp Number of places of decimal precision to display - * @return string - **/ - public function getIntersect($dp = 0) - { - if ($dp != 0) { - return round(exp($this->intersect), $dp); - } - return exp($this->intersect); - } - - - /** - * Execute the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - private function powerRegression($yValues, $xValues, $const) - { - foreach ($xValues as &$value) { - if ($value < 0.0) { - $value = 0 - log(abs($value)); - } elseif ($value > 0.0) { - $value = log($value); - } - } - unset($value); - foreach ($yValues as &$value) { - if ($value < 0.0) { - $value = 0 - log(abs($value)); - } elseif ($value > 0.0) { - $value = log($value); - } - } - unset($value); - - $this->leastSquareFit($yValues, $xValues, $const); - } - - - /** - * Define the regression and calculate the goodness of fit for a set of X and Y data values - * - * @param float[] $yValues The set of Y-values for this regression - * @param float[] $xValues The set of X-values for this regression - * @param boolean $const - */ - public function __construct($yValues, $xValues = array(), $const = true) - { - if (parent::__construct($yValues, $xValues) !== false) { - $this->powerRegression($yValues, $xValues, $const); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/trendClass.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/trendClass.php deleted file mode 100644 index 715cd41..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/trend/trendClass.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php - -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/linearBestFitClass.php'; -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/logarithmicBestFitClass.php'; -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/exponentialBestFitClass.php'; -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/powerBestFitClass.php'; -require_once PHPEXCEL_ROOT . 'PHPExcel/Shared/trend/polynomialBestFitClass.php'; - -/** - * PHPExcel_trendClass - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Shared_Trend - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class trendClass -{ - const TREND_LINEAR = 'Linear'; - const TREND_LOGARITHMIC = 'Logarithmic'; - const TREND_EXPONENTIAL = 'Exponential'; - const TREND_POWER = 'Power'; - const TREND_POLYNOMIAL_2 = 'Polynomial_2'; - const TREND_POLYNOMIAL_3 = 'Polynomial_3'; - const TREND_POLYNOMIAL_4 = 'Polynomial_4'; - const TREND_POLYNOMIAL_5 = 'Polynomial_5'; - const TREND_POLYNOMIAL_6 = 'Polynomial_6'; - const TREND_BEST_FIT = 'Bestfit'; - const TREND_BEST_FIT_NO_POLY = 'Bestfit_no_Polynomials'; - - /** - * Names of the best-fit trend analysis methods - * - * @var string[] - **/ - private static $trendTypes = array( - self::TREND_LINEAR, - self::TREND_LOGARITHMIC, - self::TREND_EXPONENTIAL, - self::TREND_POWER - ); - - /** - * Names of the best-fit trend polynomial orders - * - * @var string[] - **/ - private static $trendTypePolynomialOrders = array( - self::TREND_POLYNOMIAL_2, - self::TREND_POLYNOMIAL_3, - self::TREND_POLYNOMIAL_4, - self::TREND_POLYNOMIAL_5, - self::TREND_POLYNOMIAL_6 - ); - - /** - * Cached results for each method when trying to identify which provides the best fit - * - * @var PHPExcel_Best_Fit[] - **/ - private static $trendCache = array(); - - - public static function calculate($trendType = self::TREND_BEST_FIT, $yValues, $xValues = array(), $const = true) - { - // Calculate number of points in each dataset - $nY = count($yValues); - $nX = count($xValues); - - // Define X Values if necessary - if ($nX == 0) { - $xValues = range(1, $nY); - $nX = $nY; - } elseif ($nY != $nX) { - // Ensure both arrays of points are the same size - trigger_error("trend(): Number of elements in coordinate arrays do not match.", E_USER_ERROR); - } - - $key = md5($trendType.$const.serialize($yValues).serialize($xValues)); - // Determine which trend method has been requested - switch ($trendType) { - // Instantiate and return the class for the requested trend method - case self::TREND_LINEAR: - case self::TREND_LOGARITHMIC: - case self::TREND_EXPONENTIAL: - case self::TREND_POWER: - if (!isset(self::$trendCache[$key])) { - $className = 'PHPExcel_'.$trendType.'_Best_Fit'; - self::$trendCache[$key] = new $className($yValues, $xValues, $const); - } - return self::$trendCache[$key]; - case self::TREND_POLYNOMIAL_2: - case self::TREND_POLYNOMIAL_3: - case self::TREND_POLYNOMIAL_4: - case self::TREND_POLYNOMIAL_5: - case self::TREND_POLYNOMIAL_6: - if (!isset(self::$trendCache[$key])) { - $order = substr($trendType, -1); - self::$trendCache[$key] = new PHPExcel_Polynomial_Best_Fit($order, $yValues, $xValues, $const); - } - return self::$trendCache[$key]; - case self::TREND_BEST_FIT: - case self::TREND_BEST_FIT_NO_POLY: - // If the request is to determine the best fit regression, then we test each trend line in turn - // Start by generating an instance of each available trend method - foreach (self::$trendTypes as $trendMethod) { - $className = 'PHPExcel_'.$trendMethod.'BestFit'; - $bestFit[$trendMethod] = new $className($yValues, $xValues, $const); - $bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit(); - } - if ($trendType != self::TREND_BEST_FIT_NO_POLY) { - foreach (self::$trendTypePolynomialOrders as $trendMethod) { - $order = substr($trendMethod, -1); - $bestFit[$trendMethod] = new PHPExcel_Polynomial_Best_Fit($order, $yValues, $xValues, $const); - if ($bestFit[$trendMethod]->getError()) { - unset($bestFit[$trendMethod]); - } else { - $bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit(); - } - } - } - // Determine which of our trend lines is the best fit, and then we return the instance of that trend class - arsort($bestFitValue); - $bestFitType = key($bestFitValue); - return $bestFit[$bestFitType]; - default: - return false; - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style.php deleted file mode 100644 index 6b952ef..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style.php +++ /dev/null @@ -1,644 +0,0 @@ -<?php - -/** - * PHPExcel_Style - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /** - * Font - * - * @var PHPExcel_Style_Font - */ - protected $font; - - /** - * Fill - * - * @var PHPExcel_Style_Fill - */ - protected $fill; - - /** - * Borders - * - * @var PHPExcel_Style_Borders - */ - protected $borders; - - /** - * Alignment - * - * @var PHPExcel_Style_Alignment - */ - protected $alignment; - - /** - * Number Format - * - * @var PHPExcel_Style_NumberFormat - */ - protected $numberFormat; - - /** - * Conditional styles - * - * @var PHPExcel_Style_Conditional[] - */ - protected $conditionalStyles; - - /** - * Protection - * - * @var PHPExcel_Style_Protection - */ - protected $protection; - - /** - * Index of style in collection. Only used for real style. - * - * @var int - */ - protected $index; - - /** - * Use Quote Prefix when displaying in cell editor. Only used for real style. - * - * @var boolean - */ - protected $quotePrefix = false; - - /** - * Create a new PHPExcel_Style - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false, $isConditional = false) - { - // Supervisor? - $this->isSupervisor = $isSupervisor; - - // Initialise values - $this->conditionalStyles = array(); - $this->font = new PHPExcel_Style_Font($isSupervisor, $isConditional); - $this->fill = new PHPExcel_Style_Fill($isSupervisor, $isConditional); - $this->borders = new PHPExcel_Style_Borders($isSupervisor, $isConditional); - $this->alignment = new PHPExcel_Style_Alignment($isSupervisor, $isConditional); - $this->numberFormat = new PHPExcel_Style_NumberFormat($isSupervisor, $isConditional); - $this->protection = new PHPExcel_Style_Protection($isSupervisor, $isConditional); - - // bind parent if we are a supervisor - if ($isSupervisor) { - $this->font->bindParent($this); - $this->fill->bindParent($this); - $this->borders->bindParent($this); - $this->alignment->bindParent($this); - $this->numberFormat->bindParent($this); - $this->protection->bindParent($this); - } - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style - */ - public function getSharedComponent() - { - $activeSheet = $this->getActiveSheet(); - $selectedCell = $this->getActiveCell(); // e.g. 'A1' - - if ($activeSheet->cellExists($selectedCell)) { - $xfIndex = $activeSheet->getCell($selectedCell)->getXfIndex(); - } else { - $xfIndex = 0; - } - - return $this->parent->getCellXfByIndex($xfIndex); - } - - /** - * Get parent. Only used for style supervisor - * - * @return PHPExcel - */ - public function getParent() - { - return $this->parent; - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - return array('quotePrefix' => $array); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->applyFromArray( - * array( - * 'font' => array( - * 'name' => 'Arial', - * 'bold' => true, - * 'italic' => false, - * 'underline' => PHPExcel_Style_Font::UNDERLINE_DOUBLE, - * 'strike' => false, - * 'color' => array( - * 'rgb' => '808080' - * ) - * ), - * 'borders' => array( - * 'bottom' => array( - * 'style' => PHPExcel_Style_Border::BORDER_DASHDOT, - * 'color' => array( - * 'rgb' => '808080' - * ) - * ), - * 'top' => array( - * 'style' => PHPExcel_Style_Border::BORDER_DASHDOT, - * 'color' => array( - * 'rgb' => '808080' - * ) - * ) - * ), - * 'quotePrefix' => true - * ) - * ); - * </code> - * - * @param array $pStyles Array containing style information - * @param boolean $pAdvanced Advanced mode for setting borders. - * @throws PHPExcel_Exception - * @return PHPExcel_Style - */ - public function applyFromArray($pStyles = null, $pAdvanced = true) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $pRange = $this->getSelectedCells(); - - // Uppercase coordinate - $pRange = strtoupper($pRange); - - // Is it a cell range or a single cell? - if (strpos($pRange, ':') === false) { - $rangeA = $pRange; - $rangeB = $pRange; - } else { - list($rangeA, $rangeB) = explode(':', $pRange); - } - - // Calculate range outer borders - $rangeStart = PHPExcel_Cell::coordinateFromString($rangeA); - $rangeEnd = PHPExcel_Cell::coordinateFromString($rangeB); - - // Translate column into index - $rangeStart[0] = PHPExcel_Cell::columnIndexFromString($rangeStart[0]) - 1; - $rangeEnd[0] = PHPExcel_Cell::columnIndexFromString($rangeEnd[0]) - 1; - - // Make sure we can loop upwards on rows and columns - if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { - $tmp = $rangeStart; - $rangeStart = $rangeEnd; - $rangeEnd = $tmp; - } - - // ADVANCED MODE: - if ($pAdvanced && isset($pStyles['borders'])) { - // 'allborders' is a shorthand property for 'outline' and 'inside' and - // it applies to components that have not been set explicitly - if (isset($pStyles['borders']['allborders'])) { - foreach (array('outline', 'inside') as $component) { - if (!isset($pStyles['borders'][$component])) { - $pStyles['borders'][$component] = $pStyles['borders']['allborders']; - } - } - unset($pStyles['borders']['allborders']); // not needed any more - } - // 'outline' is a shorthand property for 'top', 'right', 'bottom', 'left' - // it applies to components that have not been set explicitly - if (isset($pStyles['borders']['outline'])) { - foreach (array('top', 'right', 'bottom', 'left') as $component) { - if (!isset($pStyles['borders'][$component])) { - $pStyles['borders'][$component] = $pStyles['borders']['outline']; - } - } - unset($pStyles['borders']['outline']); // not needed any more - } - // 'inside' is a shorthand property for 'vertical' and 'horizontal' - // it applies to components that have not been set explicitly - if (isset($pStyles['borders']['inside'])) { - foreach (array('vertical', 'horizontal') as $component) { - if (!isset($pStyles['borders'][$component])) { - $pStyles['borders'][$component] = $pStyles['borders']['inside']; - } - } - unset($pStyles['borders']['inside']); // not needed any more - } - // width and height characteristics of selection, 1, 2, or 3 (for 3 or more) - $xMax = min($rangeEnd[0] - $rangeStart[0] + 1, 3); - $yMax = min($rangeEnd[1] - $rangeStart[1] + 1, 3); - - // loop through up to 3 x 3 = 9 regions - for ($x = 1; $x <= $xMax; ++$x) { - // start column index for region - $colStart = ($x == 3) ? - PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0]) - : PHPExcel_Cell::stringFromColumnIndex($rangeStart[0] + $x - 1); - // end column index for region - $colEnd = ($x == 1) ? - PHPExcel_Cell::stringFromColumnIndex($rangeStart[0]) - : PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0] - $xMax + $x); - - for ($y = 1; $y <= $yMax; ++$y) { - // which edges are touching the region - $edges = array(); - if ($x == 1) { - // are we at left edge - $edges[] = 'left'; - } - if ($x == $xMax) { - // are we at right edge - $edges[] = 'right'; - } - if ($y == 1) { - // are we at top edge? - $edges[] = 'top'; - } - if ($y == $yMax) { - // are we at bottom edge? - $edges[] = 'bottom'; - } - - // start row index for region - $rowStart = ($y == 3) ? - $rangeEnd[1] : $rangeStart[1] + $y - 1; - - // end row index for region - $rowEnd = ($y == 1) ? - $rangeStart[1] : $rangeEnd[1] - $yMax + $y; - - // build range for region - $range = $colStart . $rowStart . ':' . $colEnd . $rowEnd; - - // retrieve relevant style array for region - $regionStyles = $pStyles; - unset($regionStyles['borders']['inside']); - - // what are the inner edges of the region when looking at the selection - $innerEdges = array_diff(array('top', 'right', 'bottom', 'left'), $edges); - - // inner edges that are not touching the region should take the 'inside' border properties if they have been set - foreach ($innerEdges as $innerEdge) { - switch ($innerEdge) { - case 'top': - case 'bottom': - // should pick up 'horizontal' border property if set - if (isset($pStyles['borders']['horizontal'])) { - $regionStyles['borders'][$innerEdge] = $pStyles['borders']['horizontal']; - } else { - unset($regionStyles['borders'][$innerEdge]); - } - break; - case 'left': - case 'right': - // should pick up 'vertical' border property if set - if (isset($pStyles['borders']['vertical'])) { - $regionStyles['borders'][$innerEdge] = $pStyles['borders']['vertical']; - } else { - unset($regionStyles['borders'][$innerEdge]); - } - break; - } - } - - // apply region style to region by calling applyFromArray() in simple mode - $this->getActiveSheet()->getStyle($range)->applyFromArray($regionStyles, false); - } - } - return $this; - } - - // SIMPLE MODE: - // Selection type, inspect - if (preg_match('/^[A-Z]+1:[A-Z]+1048576$/', $pRange)) { - $selectionType = 'COLUMN'; - } elseif (preg_match('/^A[0-9]+:XFD[0-9]+$/', $pRange)) { - $selectionType = 'ROW'; - } else { - $selectionType = 'CELL'; - } - - // First loop through columns, rows, or cells to find out which styles are affected by this operation - switch ($selectionType) { - case 'COLUMN': - $oldXfIndexes = array(); - for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { - $oldXfIndexes[$this->getActiveSheet()->getColumnDimensionByColumn($col)->getXfIndex()] = true; - } - break; - case 'ROW': - $oldXfIndexes = array(); - for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { - if ($this->getActiveSheet()->getRowDimension($row)->getXfIndex() == null) { - $oldXfIndexes[0] = true; // row without explicit style should be formatted based on default style - } else { - $oldXfIndexes[$this->getActiveSheet()->getRowDimension($row)->getXfIndex()] = true; - } - } - break; - case 'CELL': - $oldXfIndexes = array(); - for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { - for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { - $oldXfIndexes[$this->getActiveSheet()->getCellByColumnAndRow($col, $row)->getXfIndex()] = true; - } - } - break; - } - - // clone each of the affected styles, apply the style array, and add the new styles to the workbook - $workbook = $this->getActiveSheet()->getParent(); - foreach ($oldXfIndexes as $oldXfIndex => $dummy) { - $style = $workbook->getCellXfByIndex($oldXfIndex); - $newStyle = clone $style; - $newStyle->applyFromArray($pStyles); - - if ($existingStyle = $workbook->getCellXfByHashCode($newStyle->getHashCode())) { - // there is already such cell Xf in our collection - $newXfIndexes[$oldXfIndex] = $existingStyle->getIndex(); - } else { - // we don't have such a cell Xf, need to add - $workbook->addCellXf($newStyle); - $newXfIndexes[$oldXfIndex] = $newStyle->getIndex(); - } - } - - // Loop through columns, rows, or cells again and update the XF index - switch ($selectionType) { - case 'COLUMN': - for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { - $columnDimension = $this->getActiveSheet()->getColumnDimensionByColumn($col); - $oldXfIndex = $columnDimension->getXfIndex(); - $columnDimension->setXfIndex($newXfIndexes[$oldXfIndex]); - } - break; - - case 'ROW': - for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { - $rowDimension = $this->getActiveSheet()->getRowDimension($row); - $oldXfIndex = $rowDimension->getXfIndex() === null ? - 0 : $rowDimension->getXfIndex(); // row without explicit style should be formatted based on default style - $rowDimension->setXfIndex($newXfIndexes[$oldXfIndex]); - } - break; - - case 'CELL': - for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { - for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { - $cell = $this->getActiveSheet()->getCellByColumnAndRow($col, $row); - $oldXfIndex = $cell->getXfIndex(); - $cell->setXfIndex($newXfIndexes[$oldXfIndex]); - } - } - break; - } - - } else { - // not a supervisor, just apply the style array directly on style object - if (array_key_exists('fill', $pStyles)) { - $this->getFill()->applyFromArray($pStyles['fill']); - } - if (array_key_exists('font', $pStyles)) { - $this->getFont()->applyFromArray($pStyles['font']); - } - if (array_key_exists('borders', $pStyles)) { - $this->getBorders()->applyFromArray($pStyles['borders']); - } - if (array_key_exists('alignment', $pStyles)) { - $this->getAlignment()->applyFromArray($pStyles['alignment']); - } - if (array_key_exists('numberformat', $pStyles)) { - $this->getNumberFormat()->applyFromArray($pStyles['numberformat']); - } - if (array_key_exists('protection', $pStyles)) { - $this->getProtection()->applyFromArray($pStyles['protection']); - } - if (array_key_exists('quotePrefix', $pStyles)) { - $this->quotePrefix = $pStyles['quotePrefix']; - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get Fill - * - * @return PHPExcel_Style_Fill - */ - public function getFill() - { - return $this->fill; - } - - /** - * Get Font - * - * @return PHPExcel_Style_Font - */ - public function getFont() - { - return $this->font; - } - - /** - * Set font - * - * @param PHPExcel_Style_Font $font - * @return PHPExcel_Style - */ - public function setFont(PHPExcel_Style_Font $font) - { - $this->font = $font; - return $this; - } - - /** - * Get Borders - * - * @return PHPExcel_Style_Borders - */ - public function getBorders() - { - return $this->borders; - } - - /** - * Get Alignment - * - * @return PHPExcel_Style_Alignment - */ - public function getAlignment() - { - return $this->alignment; - } - - /** - * Get Number Format - * - * @return PHPExcel_Style_NumberFormat - */ - public function getNumberFormat() - { - return $this->numberFormat; - } - - /** - * Get Conditional Styles. Only used on supervisor. - * - * @return PHPExcel_Style_Conditional[] - */ - public function getConditionalStyles() - { - return $this->getActiveSheet()->getConditionalStyles($this->getActiveCell()); - } - - /** - * Set Conditional Styles. Only used on supervisor. - * - * @param PHPExcel_Style_Conditional[] $pValue Array of condtional styles - * @return PHPExcel_Style - */ - public function setConditionalStyles($pValue = null) - { - if (is_array($pValue)) { - $this->getActiveSheet()->setConditionalStyles($this->getSelectedCells(), $pValue); - } - return $this; - } - - /** - * Get Protection - * - * @return PHPExcel_Style_Protection - */ - public function getProtection() - { - return $this->protection; - } - - /** - * Get quote prefix - * - * @return boolean - */ - public function getQuotePrefix() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getQuotePrefix(); - } - return $this->quotePrefix; - } - - /** - * Set quote prefix - * - * @param boolean $pValue - */ - public function setQuotePrefix($pValue) - { - if ($pValue == '') { - $pValue = false; - } - if ($this->isSupervisor) { - $styleArray = array('quotePrefix' => $pValue); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->quotePrefix = (boolean) $pValue; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - $hashConditionals = ''; - foreach ($this->conditionalStyles as $conditional) { - $hashConditionals .= $conditional->getHashCode(); - } - - return md5( - $this->fill->getHashCode() . - $this->font->getHashCode() . - $this->borders->getHashCode() . - $this->alignment->getHashCode() . - $this->numberFormat->getHashCode() . - $hashConditionals . - $this->protection->getHashCode() . - ($this->quotePrefix ? 't' : 'f') . - __CLASS__ - ); - } - - /** - * Get own index in style collection - * - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Set own index in style collection - * - * @param int $pValue - */ - public function setIndex($pValue) - { - $this->index = $pValue; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Alignment.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Alignment.php deleted file mode 100644 index bfc4947..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Alignment.php +++ /dev/null @@ -1,464 +0,0 @@ -<?php -/** - * PHPExcel_Style_Alignment - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style_Alignment extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /* Horizontal alignment styles */ - const HORIZONTAL_GENERAL = 'general'; - const HORIZONTAL_LEFT = 'left'; - const HORIZONTAL_RIGHT = 'right'; - const HORIZONTAL_CENTER = 'center'; - const HORIZONTAL_CENTER_CONTINUOUS = 'centerContinuous'; - const HORIZONTAL_JUSTIFY = 'justify'; - const HORIZONTAL_FILL = 'fill'; - const HORIZONTAL_DISTRIBUTED = 'distributed'; // Excel2007 only - - /* Vertical alignment styles */ - const VERTICAL_BOTTOM = 'bottom'; - const VERTICAL_TOP = 'top'; - const VERTICAL_CENTER = 'center'; - const VERTICAL_JUSTIFY = 'justify'; - const VERTICAL_DISTRIBUTED = 'distributed'; // Excel2007 only - - /* Read order */ - const READORDER_CONTEXT = 0; - const READORDER_LTR = 1; - const READORDER_RTL = 2; - - /** - * Horizontal alignment - * - * @var string - */ - protected $horizontal = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL; - - /** - * Vertical alignment - * - * @var string - */ - protected $vertical = PHPExcel_Style_Alignment::VERTICAL_BOTTOM; - - /** - * Text rotation - * - * @var integer - */ - protected $textRotation = 0; - - /** - * Wrap text - * - * @var boolean - */ - protected $wrapText = false; - - /** - * Shrink to fit - * - * @var boolean - */ - protected $shrinkToFit = false; - - /** - * Indent - only possible with horizontal alignment left and right - * - * @var integer - */ - protected $indent = 0; - - /** - * Read order - * - * @var integer - */ - protected $readorder = 0; - - /** - * Create a new PHPExcel_Style_Alignment - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false, $isConditional = false) - { - // Supervisor? - parent::__construct($isSupervisor); - - if ($isConditional) { - $this->horizontal = null; - $this->vertical = null; - $this->textRotation = null; - } - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style_Alignment - */ - public function getSharedComponent() - { - return $this->parent->getSharedComponent()->getAlignment(); - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - return array('alignment' => $array); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getAlignment()->applyFromArray( - * array( - * 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, - * 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER, - * 'rotation' => 0, - * 'wrap' => TRUE - * ) - * ); - * </code> - * - * @param array $pStyles Array containing style information - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Alignment - */ - public function applyFromArray($pStyles = null) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $this->getActiveSheet()->getStyle($this->getSelectedCells()) - ->applyFromArray($this->getStyleArray($pStyles)); - } else { - if (isset($pStyles['horizontal'])) { - $this->setHorizontal($pStyles['horizontal']); - } - if (isset($pStyles['vertical'])) { - $this->setVertical($pStyles['vertical']); - } - if (isset($pStyles['rotation'])) { - $this->setTextRotation($pStyles['rotation']); - } - if (isset($pStyles['wrap'])) { - $this->setWrapText($pStyles['wrap']); - } - if (isset($pStyles['shrinkToFit'])) { - $this->setShrinkToFit($pStyles['shrinkToFit']); - } - if (isset($pStyles['indent'])) { - $this->setIndent($pStyles['indent']); - } - if (isset($pStyles['readorder'])) { - $this->setReadorder($pStyles['readorder']); - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get Horizontal - * - * @return string - */ - public function getHorizontal() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHorizontal(); - } - return $this->horizontal; - } - - /** - * Set Horizontal - * - * @param string $pValue - * @return PHPExcel_Style_Alignment - */ - public function setHorizontal($pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL) - { - if ($pValue == '') { - $pValue = PHPExcel_Style_Alignment::HORIZONTAL_GENERAL; - } - - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('horizontal' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->horizontal = $pValue; - } - return $this; - } - - /** - * Get Vertical - * - * @return string - */ - public function getVertical() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getVertical(); - } - return $this->vertical; - } - - /** - * Set Vertical - * - * @param string $pValue - * @return PHPExcel_Style_Alignment - */ - public function setVertical($pValue = PHPExcel_Style_Alignment::VERTICAL_BOTTOM) - { - if ($pValue == '') { - $pValue = PHPExcel_Style_Alignment::VERTICAL_BOTTOM; - } - - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('vertical' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->vertical = $pValue; - } - return $this; - } - - /** - * Get TextRotation - * - * @return int - */ - public function getTextRotation() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getTextRotation(); - } - return $this->textRotation; - } - - /** - * Set TextRotation - * - * @param int $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Alignment - */ - public function setTextRotation($pValue = 0) - { - // Excel2007 value 255 => PHPExcel value -165 - if ($pValue == 255) { - $pValue = -165; - } - - // Set rotation - if (($pValue >= -90 && $pValue <= 90) || $pValue == -165) { - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('rotation' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->textRotation = $pValue; - } - } else { - throw new PHPExcel_Exception("Text rotation should be a value between -90 and 90."); - } - - return $this; - } - - /** - * Get Wrap Text - * - * @return boolean - */ - public function getWrapText() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getWrapText(); - } - return $this->wrapText; - } - - /** - * Set Wrap Text - * - * @param boolean $pValue - * @return PHPExcel_Style_Alignment - */ - public function setWrapText($pValue = false) - { - if ($pValue == '') { - $pValue = false; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('wrap' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->wrapText = $pValue; - } - return $this; - } - - /** - * Get Shrink to fit - * - * @return boolean - */ - public function getShrinkToFit() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getShrinkToFit(); - } - return $this->shrinkToFit; - } - - /** - * Set Shrink to fit - * - * @param boolean $pValue - * @return PHPExcel_Style_Alignment - */ - public function setShrinkToFit($pValue = false) - { - if ($pValue == '') { - $pValue = false; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('shrinkToFit' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->shrinkToFit = $pValue; - } - return $this; - } - - /** - * Get indent - * - * @return int - */ - public function getIndent() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getIndent(); - } - return $this->indent; - } - - /** - * Set indent - * - * @param int $pValue - * @return PHPExcel_Style_Alignment - */ - public function setIndent($pValue = 0) - { - if ($pValue > 0) { - if ($this->getHorizontal() != self::HORIZONTAL_GENERAL && - $this->getHorizontal() != self::HORIZONTAL_LEFT && - $this->getHorizontal() != self::HORIZONTAL_RIGHT) { - $pValue = 0; // indent not supported - } - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('indent' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->indent = $pValue; - } - return $this; - } - - /** - * Get read order - * - * @return integer - */ - public function getReadorder() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getReadorder(); - } - return $this->readorder; - } - - /** - * Set read order - * - * @param int $pValue - * @return PHPExcel_Style_Alignment - */ - public function setReadorder($pValue = 0) - { - if ($pValue < 0 || $pValue > 2) { - $pValue = 0; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('readorder' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->readorder = $pValue; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHashCode(); - } - return md5( - $this->horizontal . - $this->vertical . - $this->textRotation . - ($this->wrapText ? 't' : 'f') . - ($this->shrinkToFit ? 't' : 'f') . - $this->indent . - $this->readorder . - __CLASS__ - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Border.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Border.php deleted file mode 100644 index 55efc50..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Border.php +++ /dev/null @@ -1,282 +0,0 @@ -<?php - -/** - * PHPExcel_Style_Border - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style_Border extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /* Border style */ - const BORDER_NONE = 'none'; - const BORDER_DASHDOT = 'dashDot'; - const BORDER_DASHDOTDOT = 'dashDotDot'; - const BORDER_DASHED = 'dashed'; - const BORDER_DOTTED = 'dotted'; - const BORDER_DOUBLE = 'double'; - const BORDER_HAIR = 'hair'; - const BORDER_MEDIUM = 'medium'; - const BORDER_MEDIUMDASHDOT = 'mediumDashDot'; - const BORDER_MEDIUMDASHDOTDOT = 'mediumDashDotDot'; - const BORDER_MEDIUMDASHED = 'mediumDashed'; - const BORDER_SLANTDASHDOT = 'slantDashDot'; - const BORDER_THICK = 'thick'; - const BORDER_THIN = 'thin'; - - /** - * Border style - * - * @var string - */ - protected $borderStyle = PHPExcel_Style_Border::BORDER_NONE; - - /** - * Border color - * - * @var PHPExcel_Style_Color - */ - protected $color; - - /** - * Parent property name - * - * @var string - */ - protected $parentPropertyName; - - /** - * Create a new PHPExcel_Style_Border - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false, $isConditional = false) - { - // Supervisor? - parent::__construct($isSupervisor); - - // Initialise values - $this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor); - - // bind parent if we are a supervisor - if ($isSupervisor) { - $this->color->bindParent($this, 'color'); - } - } - - /** - * Bind parent. Only used for supervisor - * - * @param PHPExcel_Style_Borders $parent - * @param string $parentPropertyName - * @return PHPExcel_Style_Border - */ - public function bindParent($parent, $parentPropertyName = null) - { - $this->parent = $parent; - $this->parentPropertyName = $parentPropertyName; - return $this; - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style_Border - * @throws PHPExcel_Exception - */ - public function getSharedComponent() - { - switch ($this->parentPropertyName) { - case 'allBorders': - case 'horizontal': - case 'inside': - case 'outline': - case 'vertical': - throw new PHPExcel_Exception('Cannot get shared component for a pseudo-border.'); - break; - case 'bottom': - return $this->parent->getSharedComponent()->getBottom(); - case 'diagonal': - return $this->parent->getSharedComponent()->getDiagonal(); - case 'left': - return $this->parent->getSharedComponent()->getLeft(); - case 'right': - return $this->parent->getSharedComponent()->getRight(); - case 'top': - return $this->parent->getSharedComponent()->getTop(); - } - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - switch ($this->parentPropertyName) { - case 'allBorders': - case 'bottom': - case 'diagonal': - case 'horizontal': - case 'inside': - case 'left': - case 'outline': - case 'right': - case 'top': - case 'vertical': - $key = strtolower('vertical'); - break; - } - return $this->parent->getStyleArray(array($key => $array)); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->getTop()->applyFromArray( - * array( - * 'style' => PHPExcel_Style_Border::BORDER_DASHDOT, - * 'color' => array( - * 'rgb' => '808080' - * ) - * ) - * ); - * </code> - * - * @param array $pStyles Array containing style information - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Border - */ - public function applyFromArray($pStyles = null) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); - } else { - if (isset($pStyles['style'])) { - $this->setBorderStyle($pStyles['style']); - } - if (isset($pStyles['color'])) { - $this->getColor()->applyFromArray($pStyles['color']); - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get Border style - * - * @return string - */ - public function getBorderStyle() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getBorderStyle(); - } - return $this->borderStyle; - } - - /** - * Set Border style - * - * @param string|boolean $pValue - * When passing a boolean, FALSE equates PHPExcel_Style_Border::BORDER_NONE - * and TRUE to PHPExcel_Style_Border::BORDER_MEDIUM - * @return PHPExcel_Style_Border - */ - public function setBorderStyle($pValue = PHPExcel_Style_Border::BORDER_NONE) - { - - if (empty($pValue)) { - $pValue = PHPExcel_Style_Border::BORDER_NONE; - } elseif (is_bool($pValue) && $pValue) { - $pValue = PHPExcel_Style_Border::BORDER_MEDIUM; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('style' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->borderStyle = $pValue; - } - return $this; - } - - /** - * Get Border Color - * - * @return PHPExcel_Style_Color - */ - public function getColor() - { - return $this->color; - } - - /** - * Set Border Color - * - * @param PHPExcel_Style_Color $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Border - */ - public function setColor(PHPExcel_Style_Color $pValue = null) - { - // make sure parameter is a real color and not a supervisor - $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; - - if ($this->isSupervisor) { - $styleArray = $this->getColor()->getStyleArray(array('argb' => $color->getARGB())); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->color = $color; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHashCode(); - } - return md5( - $this->borderStyle . - $this->color->getHashCode() . - __CLASS__ - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Borders.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Borders.php deleted file mode 100644 index 27c40a4..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Borders.php +++ /dev/null @@ -1,429 +0,0 @@ -<?php - -/** - * PHPExcel_Style_Borders - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style_Borders extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /* Diagonal directions */ - const DIAGONAL_NONE = 0; - const DIAGONAL_UP = 1; - const DIAGONAL_DOWN = 2; - const DIAGONAL_BOTH = 3; - - /** - * Left - * - * @var PHPExcel_Style_Border - */ - protected $left; - - /** - * Right - * - * @var PHPExcel_Style_Border - */ - protected $right; - - /** - * Top - * - * @var PHPExcel_Style_Border - */ - protected $top; - - /** - * Bottom - * - * @var PHPExcel_Style_Border - */ - protected $bottom; - - /** - * Diagonal - * - * @var PHPExcel_Style_Border - */ - protected $diagonal; - - /** - * DiagonalDirection - * - * @var int - */ - protected $diagonalDirection; - - /** - * All borders psedo-border. Only applies to supervisor. - * - * @var PHPExcel_Style_Border - */ - protected $allBorders; - - /** - * Outline psedo-border. Only applies to supervisor. - * - * @var PHPExcel_Style_Border - */ - protected $outline; - - /** - * Inside psedo-border. Only applies to supervisor. - * - * @var PHPExcel_Style_Border - */ - protected $inside; - - /** - * Vertical pseudo-border. Only applies to supervisor. - * - * @var PHPExcel_Style_Border - */ - protected $vertical; - - /** - * Horizontal pseudo-border. Only applies to supervisor. - * - * @var PHPExcel_Style_Border - */ - protected $horizontal; - - /** - * Create a new PHPExcel_Style_Borders - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false, $isConditional = false) - { - // Supervisor? - parent::__construct($isSupervisor); - - // Initialise values - $this->left = new PHPExcel_Style_Border($isSupervisor, $isConditional); - $this->right = new PHPExcel_Style_Border($isSupervisor, $isConditional); - $this->top = new PHPExcel_Style_Border($isSupervisor, $isConditional); - $this->bottom = new PHPExcel_Style_Border($isSupervisor, $isConditional); - $this->diagonal = new PHPExcel_Style_Border($isSupervisor, $isConditional); - $this->diagonalDirection = PHPExcel_Style_Borders::DIAGONAL_NONE; - - // Specially for supervisor - if ($isSupervisor) { - // Initialize pseudo-borders - $this->allBorders = new PHPExcel_Style_Border(true); - $this->outline = new PHPExcel_Style_Border(true); - $this->inside = new PHPExcel_Style_Border(true); - $this->vertical = new PHPExcel_Style_Border(true); - $this->horizontal = new PHPExcel_Style_Border(true); - - // bind parent if we are a supervisor - $this->left->bindParent($this, 'left'); - $this->right->bindParent($this, 'right'); - $this->top->bindParent($this, 'top'); - $this->bottom->bindParent($this, 'bottom'); - $this->diagonal->bindParent($this, 'diagonal'); - $this->allBorders->bindParent($this, 'allBorders'); - $this->outline->bindParent($this, 'outline'); - $this->inside->bindParent($this, 'inside'); - $this->vertical->bindParent($this, 'vertical'); - $this->horizontal->bindParent($this, 'horizontal'); - } - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style_Borders - */ - public function getSharedComponent() - { - return $this->parent->getSharedComponent()->getBorders(); - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - return array('borders' => $array); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray( - * array( - * 'bottom' => array( - * 'style' => PHPExcel_Style_Border::BORDER_DASHDOT, - * 'color' => array( - * 'rgb' => '808080' - * ) - * ), - * 'top' => array( - * 'style' => PHPExcel_Style_Border::BORDER_DASHDOT, - * 'color' => array( - * 'rgb' => '808080' - * ) - * ) - * ) - * ); - * </code> - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getBorders()->applyFromArray( - * array( - * 'allborders' => array( - * 'style' => PHPExcel_Style_Border::BORDER_DASHDOT, - * 'color' => array( - * 'rgb' => '808080' - * ) - * ) - * ) - * ); - * </code> - * - * @param array $pStyles Array containing style information - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Borders - */ - public function applyFromArray($pStyles = null) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); - } else { - if (array_key_exists('left', $pStyles)) { - $this->getLeft()->applyFromArray($pStyles['left']); - } - if (array_key_exists('right', $pStyles)) { - $this->getRight()->applyFromArray($pStyles['right']); - } - if (array_key_exists('top', $pStyles)) { - $this->getTop()->applyFromArray($pStyles['top']); - } - if (array_key_exists('bottom', $pStyles)) { - $this->getBottom()->applyFromArray($pStyles['bottom']); - } - if (array_key_exists('diagonal', $pStyles)) { - $this->getDiagonal()->applyFromArray($pStyles['diagonal']); - } - if (array_key_exists('diagonaldirection', $pStyles)) { - $this->setDiagonalDirection($pStyles['diagonaldirection']); - } - if (array_key_exists('allborders', $pStyles)) { - $this->getLeft()->applyFromArray($pStyles['allborders']); - $this->getRight()->applyFromArray($pStyles['allborders']); - $this->getTop()->applyFromArray($pStyles['allborders']); - $this->getBottom()->applyFromArray($pStyles['allborders']); - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get Left - * - * @return PHPExcel_Style_Border - */ - public function getLeft() - { - return $this->left; - } - - /** - * Get Right - * - * @return PHPExcel_Style_Border - */ - public function getRight() - { - return $this->right; - } - - /** - * Get Top - * - * @return PHPExcel_Style_Border - */ - public function getTop() - { - return $this->top; - } - - /** - * Get Bottom - * - * @return PHPExcel_Style_Border - */ - public function getBottom() - { - return $this->bottom; - } - - /** - * Get Diagonal - * - * @return PHPExcel_Style_Border - */ - public function getDiagonal() - { - return $this->diagonal; - } - - /** - * Get AllBorders (pseudo-border). Only applies to supervisor. - * - * @return PHPExcel_Style_Border - * @throws PHPExcel_Exception - */ - public function getAllBorders() - { - if (!$this->isSupervisor) { - throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.'); - } - return $this->allBorders; - } - - /** - * Get Outline (pseudo-border). Only applies to supervisor. - * - * @return boolean - * @throws PHPExcel_Exception - */ - public function getOutline() - { - if (!$this->isSupervisor) { - throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.'); - } - return $this->outline; - } - - /** - * Get Inside (pseudo-border). Only applies to supervisor. - * - * @return boolean - * @throws PHPExcel_Exception - */ - public function getInside() - { - if (!$this->isSupervisor) { - throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.'); - } - return $this->inside; - } - - /** - * Get Vertical (pseudo-border). Only applies to supervisor. - * - * @return PHPExcel_Style_Border - * @throws PHPExcel_Exception - */ - public function getVertical() - { - if (!$this->isSupervisor) { - throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.'); - } - return $this->vertical; - } - - /** - * Get Horizontal (pseudo-border). Only applies to supervisor. - * - * @return PHPExcel_Style_Border - * @throws PHPExcel_Exception - */ - public function getHorizontal() - { - if (!$this->isSupervisor) { - throw new PHPExcel_Exception('Can only get pseudo-border for supervisor.'); - } - return $this->horizontal; - } - - /** - * Get DiagonalDirection - * - * @return int - */ - public function getDiagonalDirection() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getDiagonalDirection(); - } - return $this->diagonalDirection; - } - - /** - * Set DiagonalDirection - * - * @param int $pValue - * @return PHPExcel_Style_Borders - */ - public function setDiagonalDirection($pValue = PHPExcel_Style_Borders::DIAGONAL_NONE) - { - if ($pValue == '') { - $pValue = PHPExcel_Style_Borders::DIAGONAL_NONE; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('diagonaldirection' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->diagonalDirection = $pValue; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHashcode(); - } - return md5( - $this->getLeft()->getHashCode() . - $this->getRight()->getHashCode() . - $this->getTop()->getHashCode() . - $this->getBottom()->getHashCode() . - $this->getDiagonal()->getHashCode() . - $this->getDiagonalDirection() . - __CLASS__ - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php deleted file mode 100644 index 9c7790f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Color.php +++ /dev/null @@ -1,443 +0,0 @@ -<?php - -/** - * PHPExcel_Style_Color - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style_Color extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /* Colors */ - const COLOR_BLACK = 'FF000000'; - const COLOR_WHITE = 'FFFFFFFF'; - const COLOR_RED = 'FFFF0000'; - const COLOR_DARKRED = 'FF800000'; - const COLOR_BLUE = 'FF0000FF'; - const COLOR_DARKBLUE = 'FF000080'; - const COLOR_GREEN = 'FF00FF00'; - const COLOR_DARKGREEN = 'FF008000'; - const COLOR_YELLOW = 'FFFFFF00'; - const COLOR_DARKYELLOW = 'FF808000'; - - /** - * Indexed colors array - * - * @var array - */ - protected static $indexedColors; - - /** - * ARGB - Alpha RGB - * - * @var string - */ - protected $argb = null; - - /** - * Parent property name - * - * @var string - */ - protected $parentPropertyName; - - - /** - * Create a new PHPExcel_Style_Color - * - * @param string $pARGB ARGB value for the colour - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($pARGB = PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor = false, $isConditional = false) - { - // Supervisor? - parent::__construct($isSupervisor); - - // Initialise values - if (!$isConditional) { - $this->argb = $pARGB; - } - } - - /** - * Bind parent. Only used for supervisor - * - * @param mixed $parent - * @param string $parentPropertyName - * @return PHPExcel_Style_Color - */ - public function bindParent($parent, $parentPropertyName = null) - { - $this->parent = $parent; - $this->parentPropertyName = $parentPropertyName; - return $this; - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style_Color - */ - public function getSharedComponent() - { - switch ($this->parentPropertyName) { - case 'endColor': - return $this->parent->getSharedComponent()->getEndColor(); - case 'color': - return $this->parent->getSharedComponent()->getColor(); - case 'startColor': - return $this->parent->getSharedComponent()->getStartColor(); - } - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - switch ($this->parentPropertyName) { - case 'endColor': - $key = 'endcolor'; - break; - case 'color': - $key = 'color'; - break; - case 'startColor': - $key = 'startcolor'; - break; - - } - return $this->parent->getStyleArray(array($key => $array)); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->getColor()->applyFromArray( array('rgb' => '808080') ); - * </code> - * - * @param array $pStyles Array containing style information - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Color - */ - public function applyFromArray($pStyles = null) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); - } else { - if (array_key_exists('rgb', $pStyles)) { - $this->setRGB($pStyles['rgb']); - } - if (array_key_exists('argb', $pStyles)) { - $this->setARGB($pStyles['argb']); - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get ARGB - * - * @return string - */ - public function getARGB() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getARGB(); - } - return $this->argb; - } - - /** - * Set ARGB - * - * @param string $pValue - * @return PHPExcel_Style_Color - */ - public function setARGB($pValue = PHPExcel_Style_Color::COLOR_BLACK) - { - if ($pValue == '') { - $pValue = PHPExcel_Style_Color::COLOR_BLACK; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('argb' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->argb = $pValue; - } - return $this; - } - - /** - * Get RGB - * - * @return string - */ - public function getRGB() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getRGB(); - } - return substr($this->argb, 2); - } - - /** - * Set RGB - * - * @param string $pValue RGB value - * @return PHPExcel_Style_Color - */ - public function setRGB($pValue = '000000') - { - if ($pValue == '') { - $pValue = '000000'; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('argb' => 'FF' . $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->argb = 'FF' . $pValue; - } - return $this; - } - - /** - * Get a specified colour component of an RGB value - * - * @private - * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE - * @param int $offset Position within the RGB value to extract - * @param boolean $hex Flag indicating whether the component should be returned as a hex or a - * decimal value - * @return string The extracted colour component - */ - private static function getColourComponent($RGB, $offset, $hex = true) - { - $colour = substr($RGB, $offset, 2); - if (!$hex) { - $colour = hexdec($colour); - } - return $colour; - } - - /** - * Get the red colour component of an RGB value - * - * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE - * @param boolean $hex Flag indicating whether the component should be returned as a hex or a - * decimal value - * @return string The red colour component - */ - public static function getRed($RGB, $hex = true) - { - return self::getColourComponent($RGB, strlen($RGB) - 6, $hex); - } - - /** - * Get the green colour component of an RGB value - * - * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE - * @param boolean $hex Flag indicating whether the component should be returned as a hex or a - * decimal value - * @return string The green colour component - */ - public static function getGreen($RGB, $hex = true) - { - return self::getColourComponent($RGB, strlen($RGB) - 4, $hex); - } - - /** - * Get the blue colour component of an RGB value - * - * @param string $RGB The colour as an RGB value (e.g. FF00CCCC or CCDDEE - * @param boolean $hex Flag indicating whether the component should be returned as a hex or a - * decimal value - * @return string The blue colour component - */ - public static function getBlue($RGB, $hex = true) - { - return self::getColourComponent($RGB, strlen($RGB) - 2, $hex); - } - - /** - * Adjust the brightness of a color - * - * @param string $hex The colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE) - * @param float $adjustPercentage The percentage by which to adjust the colour as a float from -1 to 1 - * @return string The adjusted colour as an RGBA or RGB value (e.g. FF00CCCC or CCDDEE) - */ - public static function changeBrightness($hex, $adjustPercentage) - { - $rgba = (strlen($hex) == 8); - - $red = self::getRed($hex, false); - $green = self::getGreen($hex, false); - $blue = self::getBlue($hex, false); - if ($adjustPercentage > 0) { - $red += (255 - $red) * $adjustPercentage; - $green += (255 - $green) * $adjustPercentage; - $blue += (255 - $blue) * $adjustPercentage; - } else { - $red += $red * $adjustPercentage; - $green += $green * $adjustPercentage; - $blue += $blue * $adjustPercentage; - } - - if ($red < 0) { - $red = 0; - } elseif ($red > 255) { - $red = 255; - } - if ($green < 0) { - $green = 0; - } elseif ($green > 255) { - $green = 255; - } - if ($blue < 0) { - $blue = 0; - } elseif ($blue > 255) { - $blue = 255; - } - - $rgb = strtoupper( - str_pad(dechex($red), 2, '0', 0) . - str_pad(dechex($green), 2, '0', 0) . - str_pad(dechex($blue), 2, '0', 0) - ); - return (($rgba) ? 'FF' : '') . $rgb; - } - - /** - * Get indexed color - * - * @param int $pIndex Index entry point into the colour array - * @param boolean $background Flag to indicate whether default background or foreground colour - * should be returned if the indexed colour doesn't exist - * @return PHPExcel_Style_Color - */ - public static function indexedColor($pIndex, $background = false) - { - // Clean parameter - $pIndex = intval($pIndex); - - // Indexed colors - if (is_null(self::$indexedColors)) { - self::$indexedColors = array( - 1 => 'FF000000', // System Colour #1 - Black - 2 => 'FFFFFFFF', // System Colour #2 - White - 3 => 'FFFF0000', // System Colour #3 - Red - 4 => 'FF00FF00', // System Colour #4 - Green - 5 => 'FF0000FF', // System Colour #5 - Blue - 6 => 'FFFFFF00', // System Colour #6 - Yellow - 7 => 'FFFF00FF', // System Colour #7- Magenta - 8 => 'FF00FFFF', // System Colour #8- Cyan - 9 => 'FF800000', // Standard Colour #9 - 10 => 'FF008000', // Standard Colour #10 - 11 => 'FF000080', // Standard Colour #11 - 12 => 'FF808000', // Standard Colour #12 - 13 => 'FF800080', // Standard Colour #13 - 14 => 'FF008080', // Standard Colour #14 - 15 => 'FFC0C0C0', // Standard Colour #15 - 16 => 'FF808080', // Standard Colour #16 - 17 => 'FF9999FF', // Chart Fill Colour #17 - 18 => 'FF993366', // Chart Fill Colour #18 - 19 => 'FFFFFFCC', // Chart Fill Colour #19 - 20 => 'FFCCFFFF', // Chart Fill Colour #20 - 21 => 'FF660066', // Chart Fill Colour #21 - 22 => 'FFFF8080', // Chart Fill Colour #22 - 23 => 'FF0066CC', // Chart Fill Colour #23 - 24 => 'FFCCCCFF', // Chart Fill Colour #24 - 25 => 'FF000080', // Chart Line Colour #25 - 26 => 'FFFF00FF', // Chart Line Colour #26 - 27 => 'FFFFFF00', // Chart Line Colour #27 - 28 => 'FF00FFFF', // Chart Line Colour #28 - 29 => 'FF800080', // Chart Line Colour #29 - 30 => 'FF800000', // Chart Line Colour #30 - 31 => 'FF008080', // Chart Line Colour #31 - 32 => 'FF0000FF', // Chart Line Colour #32 - 33 => 'FF00CCFF', // Standard Colour #33 - 34 => 'FFCCFFFF', // Standard Colour #34 - 35 => 'FFCCFFCC', // Standard Colour #35 - 36 => 'FFFFFF99', // Standard Colour #36 - 37 => 'FF99CCFF', // Standard Colour #37 - 38 => 'FFFF99CC', // Standard Colour #38 - 39 => 'FFCC99FF', // Standard Colour #39 - 40 => 'FFFFCC99', // Standard Colour #40 - 41 => 'FF3366FF', // Standard Colour #41 - 42 => 'FF33CCCC', // Standard Colour #42 - 43 => 'FF99CC00', // Standard Colour #43 - 44 => 'FFFFCC00', // Standard Colour #44 - 45 => 'FFFF9900', // Standard Colour #45 - 46 => 'FFFF6600', // Standard Colour #46 - 47 => 'FF666699', // Standard Colour #47 - 48 => 'FF969696', // Standard Colour #48 - 49 => 'FF003366', // Standard Colour #49 - 50 => 'FF339966', // Standard Colour #50 - 51 => 'FF003300', // Standard Colour #51 - 52 => 'FF333300', // Standard Colour #52 - 53 => 'FF993300', // Standard Colour #53 - 54 => 'FF993366', // Standard Colour #54 - 55 => 'FF333399', // Standard Colour #55 - 56 => 'FF333333' // Standard Colour #56 - ); - } - - if (array_key_exists($pIndex, self::$indexedColors)) { - return new PHPExcel_Style_Color(self::$indexedColors[$pIndex]); - } - - if ($background) { - return new PHPExcel_Style_Color(self::COLOR_WHITE); - } - return new PHPExcel_Style_Color(self::COLOR_BLACK); - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHashCode(); - } - return md5( - $this->argb . - __CLASS__ - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Conditional.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Conditional.php deleted file mode 100644 index 331362b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Conditional.php +++ /dev/null @@ -1,293 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Style_Conditional - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Style_Conditional implements PHPExcel_IComparable -{ - /* Condition types */ - const CONDITION_NONE = 'none'; - const CONDITION_CELLIS = 'cellIs'; - const CONDITION_CONTAINSTEXT = 'containsText'; - const CONDITION_EXPRESSION = 'expression'; - - /* Operator types */ - const OPERATOR_NONE = ''; - const OPERATOR_BEGINSWITH = 'beginsWith'; - const OPERATOR_ENDSWITH = 'endsWith'; - const OPERATOR_EQUAL = 'equal'; - const OPERATOR_GREATERTHAN = 'greaterThan'; - const OPERATOR_GREATERTHANOREQUAL = 'greaterThanOrEqual'; - const OPERATOR_LESSTHAN = 'lessThan'; - const OPERATOR_LESSTHANOREQUAL = 'lessThanOrEqual'; - const OPERATOR_NOTEQUAL = 'notEqual'; - const OPERATOR_CONTAINSTEXT = 'containsText'; - const OPERATOR_NOTCONTAINS = 'notContains'; - const OPERATOR_BETWEEN = 'between'; - - /** - * Condition type - * - * @var int - */ - private $conditionType; - - /** - * Operator type - * - * @var int - */ - private $operatorType; - - /** - * Text - * - * @var string - */ - private $text; - - /** - * Condition - * - * @var string[] - */ - private $condition = array(); - - /** - * Style - * - * @var PHPExcel_Style - */ - private $style; - - /** - * Create a new PHPExcel_Style_Conditional - */ - public function __construct() - { - // Initialise values - $this->conditionType = PHPExcel_Style_Conditional::CONDITION_NONE; - $this->operatorType = PHPExcel_Style_Conditional::OPERATOR_NONE; - $this->text = null; - $this->condition = array(); - $this->style = new PHPExcel_Style(false, true); - } - - /** - * Get Condition type - * - * @return string - */ - public function getConditionType() - { - return $this->conditionType; - } - - /** - * Set Condition type - * - * @param string $pValue PHPExcel_Style_Conditional condition type - * @return PHPExcel_Style_Conditional - */ - public function setConditionType($pValue = PHPExcel_Style_Conditional::CONDITION_NONE) - { - $this->conditionType = $pValue; - return $this; - } - - /** - * Get Operator type - * - * @return string - */ - public function getOperatorType() - { - return $this->operatorType; - } - - /** - * Set Operator type - * - * @param string $pValue PHPExcel_Style_Conditional operator type - * @return PHPExcel_Style_Conditional - */ - public function setOperatorType($pValue = PHPExcel_Style_Conditional::OPERATOR_NONE) - { - $this->operatorType = $pValue; - return $this; - } - - /** - * Get text - * - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Set text - * - * @param string $value - * @return PHPExcel_Style_Conditional - */ - public function setText($value = null) - { - $this->text = $value; - return $this; - } - - /** - * Get Condition - * - * @deprecated Deprecated, use getConditions instead - * @return string - */ - public function getCondition() - { - if (isset($this->condition[0])) { - return $this->condition[0]; - } - - return ''; - } - - /** - * Set Condition - * - * @deprecated Deprecated, use setConditions instead - * @param string $pValue Condition - * @return PHPExcel_Style_Conditional - */ - public function setCondition($pValue = '') - { - if (!is_array($pValue)) { - $pValue = array($pValue); - } - - return $this->setConditions($pValue); - } - - /** - * Get Conditions - * - * @return string[] - */ - public function getConditions() - { - return $this->condition; - } - - /** - * Set Conditions - * - * @param string[] $pValue Condition - * @return PHPExcel_Style_Conditional - */ - public function setConditions($pValue) - { - if (!is_array($pValue)) { - $pValue = array($pValue); - } - $this->condition = $pValue; - return $this; - } - - /** - * Add Condition - * - * @param string $pValue Condition - * @return PHPExcel_Style_Conditional - */ - public function addCondition($pValue = '') - { - $this->condition[] = $pValue; - return $this; - } - - /** - * Get Style - * - * @return PHPExcel_Style - */ - public function getStyle() - { - return $this->style; - } - - /** - * Set Style - * - * @param PHPExcel_Style $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Conditional - */ - public function setStyle(PHPExcel_Style $pValue = null) - { - $this->style = $pValue; - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->conditionType . - $this->operatorType . - implode(';', $this->condition) . - $this->style->getHashCode() . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Fill.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Fill.php deleted file mode 100644 index 26343ff..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Fill.php +++ /dev/null @@ -1,322 +0,0 @@ -<?php - -/** - * PHPExcel_Style_Fill - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style_Fill extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /* Fill types */ - const FILL_NONE = 'none'; - const FILL_SOLID = 'solid'; - const FILL_GRADIENT_LINEAR = 'linear'; - const FILL_GRADIENT_PATH = 'path'; - const FILL_PATTERN_DARKDOWN = 'darkDown'; - const FILL_PATTERN_DARKGRAY = 'darkGray'; - const FILL_PATTERN_DARKGRID = 'darkGrid'; - const FILL_PATTERN_DARKHORIZONTAL = 'darkHorizontal'; - const FILL_PATTERN_DARKTRELLIS = 'darkTrellis'; - const FILL_PATTERN_DARKUP = 'darkUp'; - const FILL_PATTERN_DARKVERTICAL = 'darkVertical'; - const FILL_PATTERN_GRAY0625 = 'gray0625'; - const FILL_PATTERN_GRAY125 = 'gray125'; - const FILL_PATTERN_LIGHTDOWN = 'lightDown'; - const FILL_PATTERN_LIGHTGRAY = 'lightGray'; - const FILL_PATTERN_LIGHTGRID = 'lightGrid'; - const FILL_PATTERN_LIGHTHORIZONTAL = 'lightHorizontal'; - const FILL_PATTERN_LIGHTTRELLIS = 'lightTrellis'; - const FILL_PATTERN_LIGHTUP = 'lightUp'; - const FILL_PATTERN_LIGHTVERTICAL = 'lightVertical'; - const FILL_PATTERN_MEDIUMGRAY = 'mediumGray'; - - /** - * Fill type - * - * @var string - */ - protected $fillType = PHPExcel_Style_Fill::FILL_NONE; - - /** - * Rotation - * - * @var double - */ - protected $rotation = 0; - - /** - * Start color - * - * @var PHPExcel_Style_Color - */ - protected $startColor; - - /** - * End color - * - * @var PHPExcel_Style_Color - */ - protected $endColor; - - /** - * Create a new PHPExcel_Style_Fill - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false, $isConditional = false) - { - // Supervisor? - parent::__construct($isSupervisor); - - // Initialise values - if ($isConditional) { - $this->fillType = null; - } - $this->startColor = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_WHITE, $isSupervisor, $isConditional); - $this->endColor = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor, $isConditional); - - // bind parent if we are a supervisor - if ($isSupervisor) { - $this->startColor->bindParent($this, 'startColor'); - $this->endColor->bindParent($this, 'endColor'); - } - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style_Fill - */ - public function getSharedComponent() - { - return $this->parent->getSharedComponent()->getFill(); - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - return array('fill' => $array); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getFill()->applyFromArray( - * array( - * 'type' => PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR, - * 'rotation' => 0, - * 'startcolor' => array( - * 'rgb' => '000000' - * ), - * 'endcolor' => array( - * 'argb' => 'FFFFFFFF' - * ) - * ) - * ); - * </code> - * - * @param array $pStyles Array containing style information - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Fill - */ - public function applyFromArray($pStyles = null) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); - } else { - if (array_key_exists('type', $pStyles)) { - $this->setFillType($pStyles['type']); - } - if (array_key_exists('rotation', $pStyles)) { - $this->setRotation($pStyles['rotation']); - } - if (array_key_exists('startcolor', $pStyles)) { - $this->getStartColor()->applyFromArray($pStyles['startcolor']); - } - if (array_key_exists('endcolor', $pStyles)) { - $this->getEndColor()->applyFromArray($pStyles['endcolor']); - } - if (array_key_exists('color', $pStyles)) { - $this->getStartColor()->applyFromArray($pStyles['color']); - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get Fill Type - * - * @return string - */ - public function getFillType() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getFillType(); - } - return $this->fillType; - } - - /** - * Set Fill Type - * - * @param string $pValue PHPExcel_Style_Fill fill type - * @return PHPExcel_Style_Fill - */ - public function setFillType($pValue = PHPExcel_Style_Fill::FILL_NONE) - { - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('type' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->fillType = $pValue; - } - return $this; - } - - /** - * Get Rotation - * - * @return double - */ - public function getRotation() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getRotation(); - } - return $this->rotation; - } - - /** - * Set Rotation - * - * @param double $pValue - * @return PHPExcel_Style_Fill - */ - public function setRotation($pValue = 0) - { - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('rotation' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->rotation = $pValue; - } - return $this; - } - - /** - * Get Start Color - * - * @return PHPExcel_Style_Color - */ - public function getStartColor() - { - return $this->startColor; - } - - /** - * Set Start Color - * - * @param PHPExcel_Style_Color $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Fill - */ - public function setStartColor(PHPExcel_Style_Color $pValue = null) - { - // make sure parameter is a real color and not a supervisor - $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; - - if ($this->isSupervisor) { - $styleArray = $this->getStartColor()->getStyleArray(array('argb' => $color->getARGB())); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->startColor = $color; - } - return $this; - } - - /** - * Get End Color - * - * @return PHPExcel_Style_Color - */ - public function getEndColor() - { - return $this->endColor; - } - - /** - * Set End Color - * - * @param PHPExcel_Style_Color $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Fill - */ - public function setEndColor(PHPExcel_Style_Color $pValue = null) - { - // make sure parameter is a real color and not a supervisor - $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; - - if ($this->isSupervisor) { - $styleArray = $this->getEndColor()->getStyleArray(array('argb' => $color->getARGB())); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->endColor = $color; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHashCode(); - } - return md5( - $this->getFillType() . - $this->getRotation() . - $this->getStartColor()->getHashCode() . - $this->getEndColor()->getHashCode() . - __CLASS__ - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Font.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Font.php deleted file mode 100644 index 9566e1d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Font.php +++ /dev/null @@ -1,543 +0,0 @@ -<?php - -/** - * PHPExcel_Style_Font - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style_Font extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /* Underline types */ - const UNDERLINE_NONE = 'none'; - const UNDERLINE_DOUBLE = 'double'; - const UNDERLINE_DOUBLEACCOUNTING = 'doubleAccounting'; - const UNDERLINE_SINGLE = 'single'; - const UNDERLINE_SINGLEACCOUNTING = 'singleAccounting'; - - /** - * Font Name - * - * @var string - */ - protected $name = 'Calibri'; - - /** - * Font Size - * - * @var float - */ - protected $size = 11; - - /** - * Bold - * - * @var boolean - */ - protected $bold = false; - - /** - * Italic - * - * @var boolean - */ - protected $italic = false; - - /** - * Superscript - * - * @var boolean - */ - protected $superScript = false; - - /** - * Subscript - * - * @var boolean - */ - protected $subScript = false; - - /** - * Underline - * - * @var string - */ - protected $underline = self::UNDERLINE_NONE; - - /** - * Strikethrough - * - * @var boolean - */ - protected $strikethrough = false; - - /** - * Foreground color - * - * @var PHPExcel_Style_Color - */ - protected $color; - - /** - * Create a new PHPExcel_Style_Font - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false, $isConditional = false) - { - // Supervisor? - parent::__construct($isSupervisor); - - // Initialise values - if ($isConditional) { - $this->name = null; - $this->size = null; - $this->bold = null; - $this->italic = null; - $this->superScript = null; - $this->subScript = null; - $this->underline = null; - $this->strikethrough = null; - $this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor, $isConditional); - } else { - $this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK, $isSupervisor); - } - // bind parent if we are a supervisor - if ($isSupervisor) { - $this->color->bindParent($this, 'color'); - } - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style_Font - */ - public function getSharedComponent() - { - return $this->parent->getSharedComponent()->getFont(); - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - return array('font' => $array); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray( - * array( - * 'name' => 'Arial', - * 'bold' => TRUE, - * 'italic' => FALSE, - * 'underline' => PHPExcel_Style_Font::UNDERLINE_DOUBLE, - * 'strike' => FALSE, - * 'color' => array( - * 'rgb' => '808080' - * ) - * ) - * ); - * </code> - * - * @param array $pStyles Array containing style information - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Font - */ - public function applyFromArray($pStyles = null) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); - } else { - if (array_key_exists('name', $pStyles)) { - $this->setName($pStyles['name']); - } - if (array_key_exists('bold', $pStyles)) { - $this->setBold($pStyles['bold']); - } - if (array_key_exists('italic', $pStyles)) { - $this->setItalic($pStyles['italic']); - } - if (array_key_exists('superScript', $pStyles)) { - $this->setSuperScript($pStyles['superScript']); - } - if (array_key_exists('subScript', $pStyles)) { - $this->setSubScript($pStyles['subScript']); - } - if (array_key_exists('underline', $pStyles)) { - $this->setUnderline($pStyles['underline']); - } - if (array_key_exists('strike', $pStyles)) { - $this->setStrikethrough($pStyles['strike']); - } - if (array_key_exists('color', $pStyles)) { - $this->getColor()->applyFromArray($pStyles['color']); - } - if (array_key_exists('size', $pStyles)) { - $this->setSize($pStyles['size']); - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get Name - * - * @return string - */ - public function getName() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getName(); - } - return $this->name; - } - - /** - * Set Name - * - * @param string $pValue - * @return PHPExcel_Style_Font - */ - public function setName($pValue = 'Calibri') - { - if ($pValue == '') { - $pValue = 'Calibri'; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('name' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->name = $pValue; - } - return $this; - } - - /** - * Get Size - * - * @return double - */ - public function getSize() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getSize(); - } - return $this->size; - } - - /** - * Set Size - * - * @param double $pValue - * @return PHPExcel_Style_Font - */ - public function setSize($pValue = 10) - { - if ($pValue == '') { - $pValue = 10; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('size' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->size = $pValue; - } - return $this; - } - - /** - * Get Bold - * - * @return boolean - */ - public function getBold() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getBold(); - } - return $this->bold; - } - - /** - * Set Bold - * - * @param boolean $pValue - * @return PHPExcel_Style_Font - */ - public function setBold($pValue = false) - { - if ($pValue == '') { - $pValue = false; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('bold' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->bold = $pValue; - } - return $this; - } - - /** - * Get Italic - * - * @return boolean - */ - public function getItalic() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getItalic(); - } - return $this->italic; - } - - /** - * Set Italic - * - * @param boolean $pValue - * @return PHPExcel_Style_Font - */ - public function setItalic($pValue = false) - { - if ($pValue == '') { - $pValue = false; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('italic' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->italic = $pValue; - } - return $this; - } - - /** - * Get SuperScript - * - * @return boolean - */ - public function getSuperScript() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getSuperScript(); - } - return $this->superScript; - } - - /** - * Set SuperScript - * - * @param boolean $pValue - * @return PHPExcel_Style_Font - */ - public function setSuperScript($pValue = false) - { - if ($pValue == '') { - $pValue = false; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('superScript' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->superScript = $pValue; - $this->subScript = !$pValue; - } - return $this; - } - - /** - * Get SubScript - * - * @return boolean - */ - public function getSubScript() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getSubScript(); - } - return $this->subScript; - } - - /** - * Set SubScript - * - * @param boolean $pValue - * @return PHPExcel_Style_Font - */ - public function setSubScript($pValue = false) - { - if ($pValue == '') { - $pValue = false; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('subScript' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->subScript = $pValue; - $this->superScript = !$pValue; - } - return $this; - } - - /** - * Get Underline - * - * @return string - */ - public function getUnderline() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getUnderline(); - } - return $this->underline; - } - - /** - * Set Underline - * - * @param string|boolean $pValue PHPExcel_Style_Font underline type - * If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE, - * false equates to UNDERLINE_NONE - * @return PHPExcel_Style_Font - */ - public function setUnderline($pValue = self::UNDERLINE_NONE) - { - if (is_bool($pValue)) { - $pValue = ($pValue) ? self::UNDERLINE_SINGLE : self::UNDERLINE_NONE; - } elseif ($pValue == '') { - $pValue = self::UNDERLINE_NONE; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('underline' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->underline = $pValue; - } - return $this; - } - - /** - * Get Strikethrough - * - * @return boolean - */ - public function getStrikethrough() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getStrikethrough(); - } - return $this->strikethrough; - } - - /** - * Set Strikethrough - * - * @param boolean $pValue - * @return PHPExcel_Style_Font - */ - public function setStrikethrough($pValue = false) - { - if ($pValue == '') { - $pValue = false; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('strike' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->strikethrough = $pValue; - } - return $this; - } - - /** - * Get Color - * - * @return PHPExcel_Style_Color - */ - public function getColor() - { - return $this->color; - } - - /** - * Set Color - * - * @param PHPExcel_Style_Color $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Font - */ - public function setColor(PHPExcel_Style_Color $pValue = null) - { - // make sure parameter is a real color and not a supervisor - $color = $pValue->getIsSupervisor() ? $pValue->getSharedComponent() : $pValue; - - if ($this->isSupervisor) { - $styleArray = $this->getColor()->getStyleArray(array('argb' => $color->getARGB())); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->color = $color; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHashCode(); - } - return md5( - $this->name . - $this->size . - ($this->bold ? 't' : 'f') . - ($this->italic ? 't' : 'f') . - ($this->superScript ? 't' : 'f') . - ($this->subScript ? 't' : 'f') . - $this->underline . - ($this->strikethrough ? 't' : 'f') . - $this->color->getHashCode() . - __CLASS__ - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/NumberFormat.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/NumberFormat.php deleted file mode 100644 index 1b72cda..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/NumberFormat.php +++ /dev/null @@ -1,751 +0,0 @@ -<?php - -/** - * PHPExcel_Style_NumberFormat - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style_NumberFormat extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /* Pre-defined formats */ - const FORMAT_GENERAL = 'General'; - - const FORMAT_TEXT = '@'; - - const FORMAT_NUMBER = '0'; - const FORMAT_NUMBER_00 = '0.00'; - const FORMAT_NUMBER_COMMA_SEPARATED1 = '#,##0.00'; - const FORMAT_NUMBER_COMMA_SEPARATED2 = '#,##0.00_-'; - - const FORMAT_PERCENTAGE = '0%'; - const FORMAT_PERCENTAGE_00 = '0.00%'; - - const FORMAT_DATE_YYYYMMDD2 = 'yyyy-mm-dd'; - const FORMAT_DATE_YYYYMMDD = 'yy-mm-dd'; - const FORMAT_DATE_DDMMYYYY = 'dd/mm/yy'; - const FORMAT_DATE_DMYSLASH = 'd/m/y'; - const FORMAT_DATE_DMYMINUS = 'd-m-y'; - const FORMAT_DATE_DMMINUS = 'd-m'; - const FORMAT_DATE_MYMINUS = 'm-y'; - const FORMAT_DATE_XLSX14 = 'mm-dd-yy'; - const FORMAT_DATE_XLSX15 = 'd-mmm-yy'; - const FORMAT_DATE_XLSX16 = 'd-mmm'; - const FORMAT_DATE_XLSX17 = 'mmm-yy'; - const FORMAT_DATE_XLSX22 = 'm/d/yy h:mm'; - const FORMAT_DATE_DATETIME = 'd/m/y h:mm'; - const FORMAT_DATE_TIME1 = 'h:mm AM/PM'; - const FORMAT_DATE_TIME2 = 'h:mm:ss AM/PM'; - const FORMAT_DATE_TIME3 = 'h:mm'; - const FORMAT_DATE_TIME4 = 'h:mm:ss'; - const FORMAT_DATE_TIME5 = 'mm:ss'; - const FORMAT_DATE_TIME6 = 'h:mm:ss'; - const FORMAT_DATE_TIME7 = 'i:s.S'; - const FORMAT_DATE_TIME8 = 'h:mm:ss;@'; - const FORMAT_DATE_YYYYMMDDSLASH = 'yy/mm/dd;@'; - - const FORMAT_CURRENCY_USD_SIMPLE = '"$"#,##0.00_-'; - const FORMAT_CURRENCY_USD = '$#,##0_-'; - const FORMAT_CURRENCY_EUR_SIMPLE = '[$EUR ]#,##0.00_-'; - - /** - * Excel built-in number formats - * - * @var array - */ - protected static $builtInFormats; - - /** - * Excel built-in number formats (flipped, for faster lookups) - * - * @var array - */ - protected static $flippedBuiltInFormats; - - /** - * Format Code - * - * @var string - */ - protected $formatCode = PHPExcel_Style_NumberFormat::FORMAT_GENERAL; - - /** - * Built-in format Code - * - * @var string - */ - protected $builtInFormatCode = 0; - - /** - * Create a new PHPExcel_Style_NumberFormat - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false, $isConditional = false) - { - // Supervisor? - parent::__construct($isSupervisor); - - if ($isConditional) { - $this->formatCode = null; - $this->builtInFormatCode = false; - } - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style_NumberFormat - */ - public function getSharedComponent() - { - return $this->parent->getSharedComponent()->getNumberFormat(); - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - return array('numberformat' => $array); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray( - * array( - * 'code' => PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE - * ) - * ); - * </code> - * - * @param array $pStyles Array containing style information - * @throws PHPExcel_Exception - * @return PHPExcel_Style_NumberFormat - */ - public function applyFromArray($pStyles = null) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); - } else { - if (array_key_exists('code', $pStyles)) { - $this->setFormatCode($pStyles['code']); - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get Format Code - * - * @return string - */ - public function getFormatCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getFormatCode(); - } - if ($this->builtInFormatCode !== false) { - return self::builtInFormatCode($this->builtInFormatCode); - } - return $this->formatCode; - } - - /** - * Set Format Code - * - * @param string $pValue - * @return PHPExcel_Style_NumberFormat - */ - public function setFormatCode($pValue = PHPExcel_Style_NumberFormat::FORMAT_GENERAL) - { - if ($pValue == '') { - $pValue = PHPExcel_Style_NumberFormat::FORMAT_GENERAL; - } - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('code' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->formatCode = $pValue; - $this->builtInFormatCode = self::builtInFormatCodeIndex($pValue); - } - return $this; - } - - /** - * Get Built-In Format Code - * - * @return int - */ - public function getBuiltInFormatCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getBuiltInFormatCode(); - } - return $this->builtInFormatCode; - } - - /** - * Set Built-In Format Code - * - * @param int $pValue - * @return PHPExcel_Style_NumberFormat - */ - public function setBuiltInFormatCode($pValue = 0) - { - - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('code' => self::builtInFormatCode($pValue))); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->builtInFormatCode = $pValue; - $this->formatCode = self::builtInFormatCode($pValue); - } - return $this; - } - - /** - * Fill built-in format codes - */ - private static function fillBuiltInFormatCodes() - { - // [MS-OI29500: Microsoft Office Implementation Information for ISO/IEC-29500 Standard Compliance] - // 18.8.30. numFmt (Number Format) - // - // The ECMA standard defines built-in format IDs - // 14: "mm-dd-yy" - // 22: "m/d/yy h:mm" - // 37: "#,##0 ;(#,##0)" - // 38: "#,##0 ;[Red](#,##0)" - // 39: "#,##0.00;(#,##0.00)" - // 40: "#,##0.00;[Red](#,##0.00)" - // 47: "mmss.0" - // KOR fmt 55: "yyyy-mm-dd" - // Excel defines built-in format IDs - // 14: "m/d/yyyy" - // 22: "m/d/yyyy h:mm" - // 37: "#,##0_);(#,##0)" - // 38: "#,##0_);[Red](#,##0)" - // 39: "#,##0.00_);(#,##0.00)" - // 40: "#,##0.00_);[Red](#,##0.00)" - // 47: "mm:ss.0" - // KOR fmt 55: "yyyy/mm/dd" - - // Built-in format codes - if (is_null(self::$builtInFormats)) { - self::$builtInFormats = array(); - - // General - self::$builtInFormats[0] = PHPExcel_Style_NumberFormat::FORMAT_GENERAL; - self::$builtInFormats[1] = '0'; - self::$builtInFormats[2] = '0.00'; - self::$builtInFormats[3] = '#,##0'; - self::$builtInFormats[4] = '#,##0.00'; - - self::$builtInFormats[9] = '0%'; - self::$builtInFormats[10] = '0.00%'; - self::$builtInFormats[11] = '0.00E+00'; - self::$builtInFormats[12] = '# ?/?'; - self::$builtInFormats[13] = '# ??/??'; - self::$builtInFormats[14] = 'm/d/yyyy'; // Despite ECMA 'mm-dd-yy'; - self::$builtInFormats[15] = 'd-mmm-yy'; - self::$builtInFormats[16] = 'd-mmm'; - self::$builtInFormats[17] = 'mmm-yy'; - self::$builtInFormats[18] = 'h:mm AM/PM'; - self::$builtInFormats[19] = 'h:mm:ss AM/PM'; - self::$builtInFormats[20] = 'h:mm'; - self::$builtInFormats[21] = 'h:mm:ss'; - self::$builtInFormats[22] = 'm/d/yyyy h:mm'; // Despite ECMA 'm/d/yy h:mm'; - - self::$builtInFormats[37] = '#,##0_);(#,##0)'; // Despite ECMA '#,##0 ;(#,##0)'; - self::$builtInFormats[38] = '#,##0_);[Red](#,##0)'; // Despite ECMA '#,##0 ;[Red](#,##0)'; - self::$builtInFormats[39] = '#,##0.00_);(#,##0.00)'; // Despite ECMA '#,##0.00;(#,##0.00)'; - self::$builtInFormats[40] = '#,##0.00_);[Red](#,##0.00)'; // Despite ECMA '#,##0.00;[Red](#,##0.00)'; - - self::$builtInFormats[44] = '_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)'; - self::$builtInFormats[45] = 'mm:ss'; - self::$builtInFormats[46] = '[h]:mm:ss'; - self::$builtInFormats[47] = 'mm:ss.0'; // Despite ECMA 'mmss.0'; - self::$builtInFormats[48] = '##0.0E+0'; - self::$builtInFormats[49] = '@'; - - // CHT - self::$builtInFormats[27] = '[$-404]e/m/d'; - self::$builtInFormats[30] = 'm/d/yy'; - self::$builtInFormats[36] = '[$-404]e/m/d'; - self::$builtInFormats[50] = '[$-404]e/m/d'; - self::$builtInFormats[57] = '[$-404]e/m/d'; - - // THA - self::$builtInFormats[59] = 't0'; - self::$builtInFormats[60] = 't0.00'; - self::$builtInFormats[61] = 't#,##0'; - self::$builtInFormats[62] = 't#,##0.00'; - self::$builtInFormats[67] = 't0%'; - self::$builtInFormats[68] = 't0.00%'; - self::$builtInFormats[69] = 't# ?/?'; - self::$builtInFormats[70] = 't# ??/??'; - - // Flip array (for faster lookups) - self::$flippedBuiltInFormats = array_flip(self::$builtInFormats); - } - } - - /** - * Get built-in format code - * - * @param int $pIndex - * @return string - */ - public static function builtInFormatCode($pIndex) - { - // Clean parameter - $pIndex = intval($pIndex); - - // Ensure built-in format codes are available - self::fillBuiltInFormatCodes(); - // Lookup format code - if (isset(self::$builtInFormats[$pIndex])) { - return self::$builtInFormats[$pIndex]; - } - - return ''; - } - - /** - * Get built-in format code index - * - * @param string $formatCode - * @return int|boolean - */ - public static function builtInFormatCodeIndex($formatCode) - { - // Ensure built-in format codes are available - self::fillBuiltInFormatCodes(); - - // Lookup format code - if (isset(self::$flippedBuiltInFormats[$formatCode])) { - return self::$flippedBuiltInFormats[$formatCode]; - } - - return false; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHashCode(); - } - return md5( - $this->formatCode . - $this->builtInFormatCode . - __CLASS__ - ); - } - - /** - * Search/replace values to convert Excel date/time format masks to PHP format masks - * - * @var array - */ - private static $dateFormatReplacements = array( - // first remove escapes related to non-format characters - '\\' => '', - // 12-hour suffix - 'am/pm' => 'A', - // 4-digit year - 'e' => 'Y', - 'yyyy' => 'Y', - // 2-digit year - 'yy' => 'y', - // first letter of month - no php equivalent - 'mmmmm' => 'M', - // full month name - 'mmmm' => 'F', - // short month name - 'mmm' => 'M', - // mm is minutes if time, but can also be month w/leading zero - // so we try to identify times be the inclusion of a : separator in the mask - // It isn't perfect, but the best way I know how - ':mm' => ':i', - 'mm:' => 'i:', - // month leading zero - 'mm' => 'm', - // month no leading zero - 'm' => 'n', - // full day of week name - 'dddd' => 'l', - // short day of week name - 'ddd' => 'D', - // days leading zero - 'dd' => 'd', - // days no leading zero - 'd' => 'j', - // seconds - 'ss' => 's', - // fractional seconds - no php equivalent - '.s' => '' - ); - /** - * Search/replace values to convert Excel date/time format masks hours to PHP format masks (24 hr clock) - * - * @var array - */ - private static $dateFormatReplacements24 = array( - 'hh' => 'H', - 'h' => 'G' - ); - /** - * Search/replace values to convert Excel date/time format masks hours to PHP format masks (12 hr clock) - * - * @var array - */ - private static $dateFormatReplacements12 = array( - 'hh' => 'h', - 'h' => 'g' - ); - - private static function setLowercaseCallback($matches) { - return mb_strtolower($matches[0]); - } - - private static function escapeQuotesCallback($matches) { - return '\\' . implode('\\', str_split($matches[1])); - } - - private static function formatAsDate(&$value, &$format) - { - // strip off first part containing e.g. [$-F800] or [$USD-409] - // general syntax: [$<Currency string>-<language info>] - // language info is in hexadecimal - $format = preg_replace('/^(\[\$[A-Z]*-[0-9A-F]*\])/i', '', $format); - - // OpenOffice.org uses upper-case number formats, e.g. 'YYYY', convert to lower-case; - // but we don't want to change any quoted strings - $format = preg_replace_callback('/(?:^|")([^"]*)(?:$|")/', array('self', 'setLowercaseCallback'), $format); - - // Only process the non-quoted blocks for date format characters - $blocks = explode('"', $format); - foreach($blocks as $key => &$block) { - if ($key % 2 == 0) { - $block = strtr($block, self::$dateFormatReplacements); - if (!strpos($block, 'A')) { - // 24-hour time format - $block = strtr($block, self::$dateFormatReplacements24); - } else { - // 12-hour time format - $block = strtr($block, self::$dateFormatReplacements12); - } - } - } - $format = implode('"', $blocks); - - // escape any quoted characters so that DateTime format() will render them correctly - $format = preg_replace_callback('/"(.*)"/U', array('self', 'escapeQuotesCallback'), $format); - - $dateObj = PHPExcel_Shared_Date::ExcelToPHPObject($value); - $value = $dateObj->format($format); - } - - private static function formatAsPercentage(&$value, &$format) - { - if ($format === self::FORMAT_PERCENTAGE) { - $value = round((100 * $value), 0) . '%'; - } else { - if (preg_match('/\.[#0]+/i', $format, $m)) { - $s = substr($m[0], 0, 1) . (strlen($m[0]) - 1); - $format = str_replace($m[0], $s, $format); - } - if (preg_match('/^[#0]+/', $format, $m)) { - $format = str_replace($m[0], strlen($m[0]), $format); - } - $format = '%' . str_replace('%', 'f%%', $format); - - $value = sprintf($format, 100 * $value); - } - } - - private static function formatAsFraction(&$value, &$format) - { - $sign = ($value < 0) ? '-' : ''; - - $integerPart = floor(abs($value)); - $decimalPart = trim(fmod(abs($value), 1), '0.'); - $decimalLength = strlen($decimalPart); - $decimalDivisor = pow(10, $decimalLength); - - $GCD = PHPExcel_Calculation_MathTrig::GCD($decimalPart, $decimalDivisor); - - $adjustedDecimalPart = $decimalPart/$GCD; - $adjustedDecimalDivisor = $decimalDivisor/$GCD; - - if ((strpos($format, '0') !== false) || (strpos($format, '#') !== false) || (substr($format, 0, 3) == '? ?')) { - if ($integerPart == 0) { - $integerPart = ''; - } - $value = "$sign$integerPart $adjustedDecimalPart/$adjustedDecimalDivisor"; - } else { - $adjustedDecimalPart += $integerPart * $adjustedDecimalDivisor; - $value = "$sign$adjustedDecimalPart/$adjustedDecimalDivisor"; - } - } - - private static function complexNumberFormatMask($number, $mask, $level = 0) - { - $sign = ($number < 0.0); - $number = abs($number); - if (strpos($mask, '.') !== false) { - $numbers = explode('.', $number . '.0'); - $masks = explode('.', $mask . '.0'); - $result1 = self::complexNumberFormatMask($numbers[0], $masks[0], 1); - $result2 = strrev(self::complexNumberFormatMask(strrev($numbers[1]), strrev($masks[1]), 1)); - return (($sign) ? '-' : '') . $result1 . '.' . $result2; - } - - $r = preg_match_all('/0+/', $mask, $result, PREG_OFFSET_CAPTURE); - if ($r > 1) { - $result = array_reverse($result[0]); - - foreach ($result as $block) { - $divisor = 1 . $block[0]; - $size = strlen($block[0]); - $offset = $block[1]; - - $blockValue = sprintf( - '%0' . $size . 'd', - fmod($number, $divisor) - ); - $number = floor($number / $divisor); - $mask = substr_replace($mask, $blockValue, $offset, $size); - } - if ($number > 0) { - $mask = substr_replace($mask, $number, $offset, 0); - } - $result = $mask; - } else { - $result = $number; - } - - return (($sign) ? '-' : '') . $result; - } - - /** - * Convert a value in a pre-defined format to a PHP string - * - * @param mixed $value Value to format - * @param string $format Format code - * @param array $callBack Callback function for additional formatting of string - * @return string Formatted string - */ - public static function toFormattedString($value = '0', $format = PHPExcel_Style_NumberFormat::FORMAT_GENERAL, $callBack = null) - { - // For now we do not treat strings although section 4 of a format code affects strings - if (!is_numeric($value)) { - return $value; - } - - // For 'General' format code, we just pass the value although this is not entirely the way Excel does it, - // it seems to round numbers to a total of 10 digits. - if (($format === PHPExcel_Style_NumberFormat::FORMAT_GENERAL) || ($format === PHPExcel_Style_NumberFormat::FORMAT_TEXT)) { - return $value; - } - - // Convert any other escaped characters to quoted strings, e.g. (\T to "T") - $format = preg_replace('/(\\\(.))(?=(?:[^"]|"[^"]*")*$)/u', '"${2}"', $format); - - // Get the sections, there can be up to four sections, separated with a semi-colon (but only if not a quoted literal) - $sections = preg_split('/(;)(?=(?:[^"]|"[^"]*")*$)/u', $format); - - // Extract the relevant section depending on whether number is positive, negative, or zero? - // Text not supported yet. - // Here is how the sections apply to various values in Excel: - // 1 section: [POSITIVE/NEGATIVE/ZERO/TEXT] - // 2 sections: [POSITIVE/ZERO/TEXT] [NEGATIVE] - // 3 sections: [POSITIVE/TEXT] [NEGATIVE] [ZERO] - // 4 sections: [POSITIVE] [NEGATIVE] [ZERO] [TEXT] - switch (count($sections)) { - case 1: - $format = $sections[0]; - break; - case 2: - $format = ($value >= 0) ? $sections[0] : $sections[1]; - $value = abs($value); // Use the absolute value - break; - case 3: - $format = ($value > 0) ? - $sections[0] : ( ($value < 0) ? - $sections[1] : $sections[2]); - $value = abs($value); // Use the absolute value - break; - case 4: - $format = ($value > 0) ? - $sections[0] : ( ($value < 0) ? - $sections[1] : $sections[2]); - $value = abs($value); // Use the absolute value - break; - default: - // something is wrong, just use first section - $format = $sections[0]; - break; - } - - // In Excel formats, "_" is used to add spacing, - // The following character indicates the size of the spacing, which we can't do in HTML, so we just use a standard space - $format = preg_replace('/_./', ' ', $format); - - // Save format with color information for later use below - $formatColor = $format; - - // Strip color information - $color_regex = '/^\\[[a-zA-Z]+\\]/'; - $format = preg_replace($color_regex, '', $format); - - // Let's begin inspecting the format and converting the value to a formatted string - - // Check for date/time characters (not inside quotes) - if (preg_match('/(\[\$[A-Z]*-[0-9A-F]*\])*[hmsdy](?=(?:[^"]|"[^"]*")*$)/miu', $format, $matches)) { - // datetime format - self::formatAsDate($value, $format); - } elseif (preg_match('/%$/', $format)) { - // % number format - self::formatAsPercentage($value, $format); - } else { - if ($format === self::FORMAT_CURRENCY_EUR_SIMPLE) { - $value = 'EUR ' . sprintf('%1.2f', $value); - } else { - // Some non-number strings are quoted, so we'll get rid of the quotes, likewise any positional * symbols - $format = str_replace(array('"', '*'), '', $format); - - // Find out if we need thousands separator - // This is indicated by a comma enclosed by a digit placeholder: - // #,# or 0,0 - $useThousands = preg_match('/(#,#|0,0)/', $format); - if ($useThousands) { - $format = preg_replace('/0,0/', '00', $format); - $format = preg_replace('/#,#/', '##', $format); - } - - // Scale thousands, millions,... - // This is indicated by a number of commas after a digit placeholder: - // #, or 0.0,, - $scale = 1; // same as no scale - $matches = array(); - if (preg_match('/(#|0)(,+)/', $format, $matches)) { - $scale = pow(1000, strlen($matches[2])); - - // strip the commas - $format = preg_replace('/0,+/', '0', $format); - $format = preg_replace('/#,+/', '#', $format); - } - - if (preg_match('/#?.*\?\/\?/', $format, $m)) { - //echo 'Format mask is fractional '.$format.' <br />'; - if ($value != (int)$value) { - self::formatAsFraction($value, $format); - } - - } else { - // Handle the number itself - - // scale number - $value = $value / $scale; - - // Strip # - $format = preg_replace('/\\#/', '0', $format); - - $n = "/\[[^\]]+\]/"; - $m = preg_replace($n, '', $format); - $number_regex = "/(0+)(\.?)(0*)/"; - if (preg_match($number_regex, $m, $matches)) { - $left = $matches[1]; - $dec = $matches[2]; - $right = $matches[3]; - - // minimun width of formatted number (including dot) - $minWidth = strlen($left) + strlen($dec) + strlen($right); - if ($useThousands) { - $value = number_format( - $value, - strlen($right), - PHPExcel_Shared_String::getDecimalSeparator(), - PHPExcel_Shared_String::getThousandsSeparator() - ); - $value = preg_replace($number_regex, $value, $format); - } else { - if (preg_match('/[0#]E[+-]0/i', $format)) { - // Scientific format - $value = sprintf('%5.2E', $value); - } elseif (preg_match('/0([^\d\.]+)0/', $format)) { - $value = self::complexNumberFormatMask($value, $format); - } else { - $sprintf_pattern = "%0$minWidth." . strlen($right) . "f"; - $value = sprintf($sprintf_pattern, $value); - $value = preg_replace($number_regex, $value, $format); - } - } - } - } - if (preg_match('/\[\$(.*)\]/u', $format, $m)) { - // Currency or Accounting - $currencyFormat = $m[0]; - $currencyCode = $m[1]; - list($currencyCode) = explode('-', $currencyCode); - if ($currencyCode == '') { - $currencyCode = PHPExcel_Shared_String::getCurrencyCode(); - } - $value = preg_replace('/\[\$([^\]]*)\]/u', $currencyCode, $value); - } - } - } - - // Escape any escaped slashes to a single slash - $format = preg_replace("/\\\\/u", '\\', $format); - - // Additional formatting provided by callback function - if ($callBack !== null) { - list($writerInstance, $function) = $callBack; - $value = $writerInstance->$function($value, $formatColor); - } - - return $value; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Protection.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Protection.php deleted file mode 100644 index d5568f6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Protection.php +++ /dev/null @@ -1,204 +0,0 @@ -<?php - -/** - * PHPExcel_Style_Protection - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Style_Protection extends PHPExcel_Style_Supervisor implements PHPExcel_IComparable -{ - /** Protection styles */ - const PROTECTION_INHERIT = 'inherit'; - const PROTECTION_PROTECTED = 'protected'; - const PROTECTION_UNPROTECTED = 'unprotected'; - - /** - * Locked - * - * @var string - */ - protected $locked; - - /** - * Hidden - * - * @var string - */ - protected $hidden; - - /** - * Create a new PHPExcel_Style_Protection - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - * @param boolean $isConditional Flag indicating if this is a conditional style or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false, $isConditional = false) - { - // Supervisor? - parent::__construct($isSupervisor); - - // Initialise values - if (!$isConditional) { - $this->locked = self::PROTECTION_INHERIT; - $this->hidden = self::PROTECTION_INHERIT; - } - } - - /** - * Get the shared style component for the currently active cell in currently active sheet. - * Only used for style supervisor - * - * @return PHPExcel_Style_Protection - */ - public function getSharedComponent() - { - return $this->parent->getSharedComponent()->getProtection(); - } - - /** - * Build style array from subcomponents - * - * @param array $array - * @return array - */ - public function getStyleArray($array) - { - return array('protection' => $array); - } - - /** - * Apply styles from array - * - * <code> - * $objPHPExcel->getActiveSheet()->getStyle('B2')->getLocked()->applyFromArray( - * array( - * 'locked' => TRUE, - * 'hidden' => FALSE - * ) - * ); - * </code> - * - * @param array $pStyles Array containing style information - * @throws PHPExcel_Exception - * @return PHPExcel_Style_Protection - */ - public function applyFromArray($pStyles = null) - { - if (is_array($pStyles)) { - if ($this->isSupervisor) { - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles)); - } else { - if (isset($pStyles['locked'])) { - $this->setLocked($pStyles['locked']); - } - if (isset($pStyles['hidden'])) { - $this->setHidden($pStyles['hidden']); - } - } - } else { - throw new PHPExcel_Exception("Invalid style array passed."); - } - return $this; - } - - /** - * Get locked - * - * @return string - */ - public function getLocked() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getLocked(); - } - return $this->locked; - } - - /** - * Set locked - * - * @param string $pValue - * @return PHPExcel_Style_Protection - */ - public function setLocked($pValue = self::PROTECTION_INHERIT) - { - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('locked' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->locked = $pValue; - } - return $this; - } - - /** - * Get hidden - * - * @return string - */ - public function getHidden() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHidden(); - } - return $this->hidden; - } - - /** - * Set hidden - * - * @param string $pValue - * @return PHPExcel_Style_Protection - */ - public function setHidden($pValue = self::PROTECTION_INHERIT) - { - if ($this->isSupervisor) { - $styleArray = $this->getStyleArray(array('hidden' => $pValue)); - $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); - } else { - $this->hidden = $pValue; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->isSupervisor) { - return $this->getSharedComponent()->getHashCode(); - } - return md5( - $this->locked . - $this->hidden . - __CLASS__ - ); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Supervisor.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Supervisor.php deleted file mode 100644 index a90e1c6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Style/Supervisor.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - -/** - * PHPExcel_Style_Supervisor - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Style - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -abstract class PHPExcel_Style_Supervisor -{ - /** - * Supervisor? - * - * @var boolean - */ - protected $isSupervisor; - - /** - * Parent. Only used for supervisor - * - * @var PHPExcel_Style - */ - protected $parent; - - /** - * Create a new PHPExcel_Style_Alignment - * - * @param boolean $isSupervisor Flag indicating if this is a supervisor or not - * Leave this value at default unless you understand exactly what - * its ramifications are - */ - public function __construct($isSupervisor = false) - { - // Supervisor? - $this->isSupervisor = $isSupervisor; - } - - /** - * Bind parent. Only used for supervisor - * - * @param PHPExcel $parent - * @return PHPExcel_Style_Supervisor - */ - public function bindParent($parent, $parentPropertyName = null) - { - $this->parent = $parent; - return $this; - } - - /** - * Is this a supervisor or a cell style component? - * - * @return boolean - */ - public function getIsSupervisor() - { - return $this->isSupervisor; - } - - /** - * Get the currently active sheet. Only used for supervisor - * - * @return PHPExcel_Worksheet - */ - public function getActiveSheet() - { - return $this->parent->getActiveSheet(); - } - - /** - * Get the currently active cell coordinate in currently active sheet. - * Only used for supervisor - * - * @return string E.g. 'A1' - */ - public function getSelectedCells() - { - return $this->getActiveSheet()->getSelectedCells(); - } - - /** - * Get the currently active cell coordinate in currently active sheet. - * Only used for supervisor - * - * @return string E.g. 'A1' - */ - public function getActiveCell() - { - return $this->getActiveSheet()->getActiveCell(); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if ((is_object($value)) && ($key != 'parent')) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php deleted file mode 100644 index 483aa00..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php +++ /dev/null @@ -1,2968 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet implements PHPExcel_IComparable -{ - /* Break types */ - const BREAK_NONE = 0; - const BREAK_ROW = 1; - const BREAK_COLUMN = 2; - - /* Sheet state */ - const SHEETSTATE_VISIBLE = 'visible'; - const SHEETSTATE_HIDDEN = 'hidden'; - const SHEETSTATE_VERYHIDDEN = 'veryHidden'; - - /** - * Invalid characters in sheet title - * - * @var array - */ - private static $invalidCharacters = array('*', ':', '/', '\\', '?', '[', ']'); - - /** - * Parent spreadsheet - * - * @var PHPExcel - */ - private $parent; - - /** - * Cacheable collection of cells - * - * @var PHPExcel_CachedObjectStorage_xxx - */ - private $cellCollection; - - /** - * Collection of row dimensions - * - * @var PHPExcel_Worksheet_RowDimension[] - */ - private $rowDimensions = array(); - - /** - * Default row dimension - * - * @var PHPExcel_Worksheet_RowDimension - */ - private $defaultRowDimension; - - /** - * Collection of column dimensions - * - * @var PHPExcel_Worksheet_ColumnDimension[] - */ - private $columnDimensions = array(); - - /** - * Default column dimension - * - * @var PHPExcel_Worksheet_ColumnDimension - */ - private $defaultColumnDimension = null; - - /** - * Collection of drawings - * - * @var PHPExcel_Worksheet_BaseDrawing[] - */ - private $drawingCollection = null; - - /** - * Collection of Chart objects - * - * @var PHPExcel_Chart[] - */ - private $chartCollection = array(); - - /** - * Worksheet title - * - * @var string - */ - private $title; - - /** - * Sheet state - * - * @var string - */ - private $sheetState; - - /** - * Page setup - * - * @var PHPExcel_Worksheet_PageSetup - */ - private $pageSetup; - - /** - * Page margins - * - * @var PHPExcel_Worksheet_PageMargins - */ - private $pageMargins; - - /** - * Page header/footer - * - * @var PHPExcel_Worksheet_HeaderFooter - */ - private $headerFooter; - - /** - * Sheet view - * - * @var PHPExcel_Worksheet_SheetView - */ - private $sheetView; - - /** - * Protection - * - * @var PHPExcel_Worksheet_Protection - */ - private $protection; - - /** - * Collection of styles - * - * @var PHPExcel_Style[] - */ - private $styles = array(); - - /** - * Conditional styles. Indexed by cell coordinate, e.g. 'A1' - * - * @var array - */ - private $conditionalStylesCollection = array(); - - /** - * Is the current cell collection sorted already? - * - * @var boolean - */ - private $cellCollectionIsSorted = false; - - /** - * Collection of breaks - * - * @var array - */ - private $breaks = array(); - - /** - * Collection of merged cell ranges - * - * @var array - */ - private $mergeCells = array(); - - /** - * Collection of protected cell ranges - * - * @var array - */ - private $protectedCells = array(); - - /** - * Autofilter Range and selection - * - * @var PHPExcel_Worksheet_AutoFilter - */ - private $autoFilter; - - /** - * Freeze pane - * - * @var string - */ - private $freezePane = ''; - - /** - * Show gridlines? - * - * @var boolean - */ - private $showGridlines = true; - - /** - * Print gridlines? - * - * @var boolean - */ - private $printGridlines = false; - - /** - * Show row and column headers? - * - * @var boolean - */ - private $showRowColHeaders = true; - - /** - * Show summary below? (Row/Column outline) - * - * @var boolean - */ - private $showSummaryBelow = true; - - /** - * Show summary right? (Row/Column outline) - * - * @var boolean - */ - private $showSummaryRight = true; - - /** - * Collection of comments - * - * @var PHPExcel_Comment[] - */ - private $comments = array(); - - /** - * Active cell. (Only one!) - * - * @var string - */ - private $activeCell = 'A1'; - - /** - * Selected cells - * - * @var string - */ - private $selectedCells = 'A1'; - - /** - * Cached highest column - * - * @var string - */ - private $cachedHighestColumn = 'A'; - - /** - * Cached highest row - * - * @var int - */ - private $cachedHighestRow = 1; - - /** - * Right-to-left? - * - * @var boolean - */ - private $rightToLeft = false; - - /** - * Hyperlinks. Indexed by cell coordinate, e.g. 'A1' - * - * @var array - */ - private $hyperlinkCollection = array(); - - /** - * Data validation objects. Indexed by cell coordinate, e.g. 'A1' - * - * @var array - */ - private $dataValidationCollection = array(); - - /** - * Tab color - * - * @var PHPExcel_Style_Color - */ - private $tabColor; - - /** - * Dirty flag - * - * @var boolean - */ - private $dirty = true; - - /** - * Hash - * - * @var string - */ - private $hash; - - /** - * CodeName - * - * @var string - */ - private $codeName = null; - - /** - * Create a new worksheet - * - * @param PHPExcel $pParent - * @param string $pTitle - */ - public function __construct(PHPExcel $pParent = null, $pTitle = 'Worksheet') - { - // Set parent and title - $this->parent = $pParent; - $this->setTitle($pTitle, false); - // setTitle can change $pTitle - $this->setCodeName($this->getTitle()); - $this->setSheetState(PHPExcel_Worksheet::SHEETSTATE_VISIBLE); - - $this->cellCollection = PHPExcel_CachedObjectStorageFactory::getInstance($this); - // Set page setup - $this->pageSetup = new PHPExcel_Worksheet_PageSetup(); - // Set page margins - $this->pageMargins = new PHPExcel_Worksheet_PageMargins(); - // Set page header/footer - $this->headerFooter = new PHPExcel_Worksheet_HeaderFooter(); - // Set sheet view - $this->sheetView = new PHPExcel_Worksheet_SheetView(); - // Drawing collection - $this->drawingCollection = new ArrayObject(); - // Chart collection - $this->chartCollection = new ArrayObject(); - // Protection - $this->protection = new PHPExcel_Worksheet_Protection(); - // Default row dimension - $this->defaultRowDimension = new PHPExcel_Worksheet_RowDimension(null); - // Default column dimension - $this->defaultColumnDimension = new PHPExcel_Worksheet_ColumnDimension(null); - $this->autoFilter = new PHPExcel_Worksheet_AutoFilter(null, $this); - } - - - /** - * Disconnect all cells from this PHPExcel_Worksheet object, - * typically so that the worksheet object can be unset - * - */ - public function disconnectCells() - { - if ($this->cellCollection !== null) { - $this->cellCollection->unsetWorksheetCells(); - $this->cellCollection = null; - } - // detach ourself from the workbook, so that it can then delete this worksheet successfully - $this->parent = null; - } - - /** - * Code to execute when this worksheet is unset() - * - */ - public function __destruct() - { - PHPExcel_Calculation::getInstance($this->parent)->clearCalculationCacheForWorksheet($this->title); - - $this->disconnectCells(); - } - - /** - * Return the cache controller for the cell collection - * - * @return PHPExcel_CachedObjectStorage_xxx - */ - public function getCellCacheController() - { - return $this->cellCollection; - } - - - /** - * Get array of invalid characters for sheet title - * - * @return array - */ - public static function getInvalidCharacters() - { - return self::$invalidCharacters; - } - - /** - * Check sheet code name for valid Excel syntax - * - * @param string $pValue The string to check - * @return string The valid string - * @throws Exception - */ - private static function checkSheetCodeName($pValue) - { - $CharCount = PHPExcel_Shared_String::CountCharacters($pValue); - if ($CharCount == 0) { - throw new PHPExcel_Exception('Sheet code name cannot be empty.'); - } - // Some of the printable ASCII characters are invalid: * : / \ ? [ ] and first and last characters cannot be a "'" - if ((str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) || - (PHPExcel_Shared_String::Substring($pValue, -1, 1)=='\'') || - (PHPExcel_Shared_String::Substring($pValue, 0, 1)=='\'')) { - throw new PHPExcel_Exception('Invalid character found in sheet code name'); - } - - // Maximum 31 characters allowed for sheet title - if ($CharCount > 31) { - throw new PHPExcel_Exception('Maximum 31 characters allowed in sheet code name.'); - } - - return $pValue; - } - - /** - * Check sheet title for valid Excel syntax - * - * @param string $pValue The string to check - * @return string The valid string - * @throws PHPExcel_Exception - */ - private static function checkSheetTitle($pValue) - { - // Some of the printable ASCII characters are invalid: * : / \ ? [ ] - if (str_replace(self::$invalidCharacters, '', $pValue) !== $pValue) { - throw new PHPExcel_Exception('Invalid character found in sheet title'); - } - - // Maximum 31 characters allowed for sheet title - if (PHPExcel_Shared_String::CountCharacters($pValue) > 31) { - throw new PHPExcel_Exception('Maximum 31 characters allowed in sheet title.'); - } - - return $pValue; - } - - /** - * Get collection of cells - * - * @param boolean $pSorted Also sort the cell collection? - * @return PHPExcel_Cell[] - */ - public function getCellCollection($pSorted = true) - { - if ($pSorted) { - // Re-order cell collection - return $this->sortCellCollection(); - } - if ($this->cellCollection !== null) { - return $this->cellCollection->getCellList(); - } - return array(); - } - - /** - * Sort collection of cells - * - * @return PHPExcel_Worksheet - */ - public function sortCellCollection() - { - if ($this->cellCollection !== null) { - return $this->cellCollection->getSortedCellList(); - } - return array(); - } - - /** - * Get collection of row dimensions - * - * @return PHPExcel_Worksheet_RowDimension[] - */ - public function getRowDimensions() - { - return $this->rowDimensions; - } - - /** - * Get default row dimension - * - * @return PHPExcel_Worksheet_RowDimension - */ - public function getDefaultRowDimension() - { - return $this->defaultRowDimension; - } - - /** - * Get collection of column dimensions - * - * @return PHPExcel_Worksheet_ColumnDimension[] - */ - public function getColumnDimensions() - { - return $this->columnDimensions; - } - - /** - * Get default column dimension - * - * @return PHPExcel_Worksheet_ColumnDimension - */ - public function getDefaultColumnDimension() - { - return $this->defaultColumnDimension; - } - - /** - * Get collection of drawings - * - * @return PHPExcel_Worksheet_BaseDrawing[] - */ - public function getDrawingCollection() - { - return $this->drawingCollection; - } - - /** - * Get collection of charts - * - * @return PHPExcel_Chart[] - */ - public function getChartCollection() - { - return $this->chartCollection; - } - - /** - * Add chart - * - * @param PHPExcel_Chart $pChart - * @param int|null $iChartIndex Index where chart should go (0,1,..., or null for last) - * @return PHPExcel_Chart - */ - public function addChart(PHPExcel_Chart $pChart = null, $iChartIndex = null) - { - $pChart->setWorksheet($this); - if (is_null($iChartIndex)) { - $this->chartCollection[] = $pChart; - } else { - // Insert the chart at the requested index - array_splice($this->chartCollection, $iChartIndex, 0, array($pChart)); - } - - return $pChart; - } - - /** - * Return the count of charts on this worksheet - * - * @return int The number of charts - */ - public function getChartCount() - { - return count($this->chartCollection); - } - - /** - * Get a chart by its index position - * - * @param string $index Chart index position - * @return false|PHPExcel_Chart - * @throws PHPExcel_Exception - */ - public function getChartByIndex($index = null) - { - $chartCount = count($this->chartCollection); - if ($chartCount == 0) { - return false; - } - if (is_null($index)) { - $index = --$chartCount; - } - if (!isset($this->chartCollection[$index])) { - return false; - } - - return $this->chartCollection[$index]; - } - - /** - * Return an array of the names of charts on this worksheet - * - * @return string[] The names of charts - * @throws PHPExcel_Exception - */ - public function getChartNames() - { - $chartNames = array(); - foreach ($this->chartCollection as $chart) { - $chartNames[] = $chart->getName(); - } - return $chartNames; - } - - /** - * Get a chart by name - * - * @param string $chartName Chart name - * @return false|PHPExcel_Chart - * @throws PHPExcel_Exception - */ - public function getChartByName($chartName = '') - { - $chartCount = count($this->chartCollection); - if ($chartCount == 0) { - return false; - } - foreach ($this->chartCollection as $index => $chart) { - if ($chart->getName() == $chartName) { - return $this->chartCollection[$index]; - } - } - return false; - } - - /** - * Refresh column dimensions - * - * @return PHPExcel_Worksheet - */ - public function refreshColumnDimensions() - { - $currentColumnDimensions = $this->getColumnDimensions(); - $newColumnDimensions = array(); - - foreach ($currentColumnDimensions as $objColumnDimension) { - $newColumnDimensions[$objColumnDimension->getColumnIndex()] = $objColumnDimension; - } - - $this->columnDimensions = $newColumnDimensions; - - return $this; - } - - /** - * Refresh row dimensions - * - * @return PHPExcel_Worksheet - */ - public function refreshRowDimensions() - { - $currentRowDimensions = $this->getRowDimensions(); - $newRowDimensions = array(); - - foreach ($currentRowDimensions as $objRowDimension) { - $newRowDimensions[$objRowDimension->getRowIndex()] = $objRowDimension; - } - - $this->rowDimensions = $newRowDimensions; - - return $this; - } - - /** - * Calculate worksheet dimension - * - * @return string String containing the dimension of this worksheet - */ - public function calculateWorksheetDimension() - { - // Return - return 'A1' . ':' . $this->getHighestColumn() . $this->getHighestRow(); - } - - /** - * Calculate worksheet data dimension - * - * @return string String containing the dimension of this worksheet that actually contain data - */ - public function calculateWorksheetDataDimension() - { - // Return - return 'A1' . ':' . $this->getHighestDataColumn() . $this->getHighestDataRow(); - } - - /** - * Calculate widths for auto-size columns - * - * @param boolean $calculateMergeCells Calculate merge cell width - * @return PHPExcel_Worksheet; - */ - public function calculateColumnWidths($calculateMergeCells = false) - { - // initialize $autoSizes array - $autoSizes = array(); - foreach ($this->getColumnDimensions() as $colDimension) { - if ($colDimension->getAutoSize()) { - $autoSizes[$colDimension->getColumnIndex()] = -1; - } - } - - // There is only something to do if there are some auto-size columns - if (!empty($autoSizes)) { - // build list of cells references that participate in a merge - $isMergeCell = array(); - foreach ($this->getMergeCells() as $cells) { - foreach (PHPExcel_Cell::extractAllCellReferencesInRange($cells) as $cellReference) { - $isMergeCell[$cellReference] = true; - } - } - - // loop through all cells in the worksheet - foreach ($this->getCellCollection(false) as $cellID) { - $cell = $this->getCell($cellID, false); - if ($cell !== null && isset($autoSizes[$this->cellCollection->getCurrentColumn()])) { - // Determine width if cell does not participate in a merge - if (!isset($isMergeCell[$this->cellCollection->getCurrentAddress()])) { - // Calculated value - // To formatted string - $cellValue = PHPExcel_Style_NumberFormat::toFormattedString( - $cell->getCalculatedValue(), - $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode() - ); - - $autoSizes[$this->cellCollection->getCurrentColumn()] = max( - (float) $autoSizes[$this->cellCollection->getCurrentColumn()], - (float)PHPExcel_Shared_Font::calculateColumnWidth( - $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont(), - $cellValue, - $this->getParent()->getCellXfByIndex($cell->getXfIndex())->getAlignment()->getTextRotation(), - $this->getDefaultStyle()->getFont() - ) - ); - } - } - } - - // adjust column widths - foreach ($autoSizes as $columnIndex => $width) { - if ($width == -1) { - $width = $this->getDefaultColumnDimension()->getWidth(); - } - $this->getColumnDimension($columnIndex)->setWidth($width); - } - } - - return $this; - } - - /** - * Get parent - * - * @return PHPExcel - */ - public function getParent() - { - return $this->parent; - } - - /** - * Re-bind parent - * - * @param PHPExcel $parent - * @return PHPExcel_Worksheet - */ - public function rebindParent(PHPExcel $parent) - { - if ($this->parent !== null) { - $namedRanges = $this->parent->getNamedRanges(); - foreach ($namedRanges as $namedRange) { - $parent->addNamedRange($namedRange); - } - - $this->parent->removeSheetByIndex( - $this->parent->getIndex($this) - ); - } - $this->parent = $parent; - - return $this; - } - - /** - * Get title - * - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Set title - * - * @param string $pValue String containing the dimension of this worksheet - * @param string $updateFormulaCellReferences boolean Flag indicating whether cell references in formulae should - * be updated to reflect the new sheet name. - * This should be left as the default true, unless you are - * certain that no formula cells on any worksheet contain - * references to this worksheet - * @return PHPExcel_Worksheet - */ - public function setTitle($pValue = 'Worksheet', $updateFormulaCellReferences = true) - { - // Is this a 'rename' or not? - if ($this->getTitle() == $pValue) { - return $this; - } - - // Syntax check - self::checkSheetTitle($pValue); - - // Old title - $oldTitle = $this->getTitle(); - - if ($this->parent) { - // Is there already such sheet name? - if ($this->parent->sheetNameExists($pValue)) { - // Use name, but append with lowest possible integer - - if (PHPExcel_Shared_String::CountCharacters($pValue) > 29) { - $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 29); - } - $i = 1; - while ($this->parent->sheetNameExists($pValue . ' ' . $i)) { - ++$i; - if ($i == 10) { - if (PHPExcel_Shared_String::CountCharacters($pValue) > 28) { - $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 28); - } - } elseif ($i == 100) { - if (PHPExcel_Shared_String::CountCharacters($pValue) > 27) { - $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 27); - } - } - } - - $altTitle = $pValue . ' ' . $i; - return $this->setTitle($altTitle, $updateFormulaCellReferences); - } - } - - // Set title - $this->title = $pValue; - $this->dirty = true; - - if ($this->parent && $this->parent->getCalculationEngine()) { - // New title - $newTitle = $this->getTitle(); - $this->parent->getCalculationEngine() - ->renameCalculationCacheForWorksheet($oldTitle, $newTitle); - if ($updateFormulaCellReferences) { - PHPExcel_ReferenceHelper::getInstance()->updateNamedFormulas($this->parent, $oldTitle, $newTitle); - } - } - - return $this; - } - - /** - * Get sheet state - * - * @return string Sheet state (visible, hidden, veryHidden) - */ - public function getSheetState() - { - return $this->sheetState; - } - - /** - * Set sheet state - * - * @param string $value Sheet state (visible, hidden, veryHidden) - * @return PHPExcel_Worksheet - */ - public function setSheetState($value = PHPExcel_Worksheet::SHEETSTATE_VISIBLE) - { - $this->sheetState = $value; - return $this; - } - - /** - * Get page setup - * - * @return PHPExcel_Worksheet_PageSetup - */ - public function getPageSetup() - { - return $this->pageSetup; - } - - /** - * Set page setup - * - * @param PHPExcel_Worksheet_PageSetup $pValue - * @return PHPExcel_Worksheet - */ - public function setPageSetup(PHPExcel_Worksheet_PageSetup $pValue) - { - $this->pageSetup = $pValue; - return $this; - } - - /** - * Get page margins - * - * @return PHPExcel_Worksheet_PageMargins - */ - public function getPageMargins() - { - return $this->pageMargins; - } - - /** - * Set page margins - * - * @param PHPExcel_Worksheet_PageMargins $pValue - * @return PHPExcel_Worksheet - */ - public function setPageMargins(PHPExcel_Worksheet_PageMargins $pValue) - { - $this->pageMargins = $pValue; - return $this; - } - - /** - * Get page header/footer - * - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function getHeaderFooter() - { - return $this->headerFooter; - } - - /** - * Set page header/footer - * - * @param PHPExcel_Worksheet_HeaderFooter $pValue - * @return PHPExcel_Worksheet - */ - public function setHeaderFooter(PHPExcel_Worksheet_HeaderFooter $pValue) - { - $this->headerFooter = $pValue; - return $this; - } - - /** - * Get sheet view - * - * @return PHPExcel_Worksheet_SheetView - */ - public function getSheetView() - { - return $this->sheetView; - } - - /** - * Set sheet view - * - * @param PHPExcel_Worksheet_SheetView $pValue - * @return PHPExcel_Worksheet - */ - public function setSheetView(PHPExcel_Worksheet_SheetView $pValue) - { - $this->sheetView = $pValue; - return $this; - } - - /** - * Get Protection - * - * @return PHPExcel_Worksheet_Protection - */ - public function getProtection() - { - return $this->protection; - } - - /** - * Set Protection - * - * @param PHPExcel_Worksheet_Protection $pValue - * @return PHPExcel_Worksheet - */ - public function setProtection(PHPExcel_Worksheet_Protection $pValue) - { - $this->protection = $pValue; - $this->dirty = true; - - return $this; - } - - /** - * Get highest worksheet column - * - * @param string $row Return the data highest column for the specified row, - * or the highest column of any row if no row number is passed - * @return string Highest column name - */ - public function getHighestColumn($row = null) - { - if ($row == null) { - return $this->cachedHighestColumn; - } - return $this->getHighestDataColumn($row); - } - - /** - * Get highest worksheet column that contains data - * - * @param string $row Return the highest data column for the specified row, - * or the highest data column of any row if no row number is passed - * @return string Highest column name that contains data - */ - public function getHighestDataColumn($row = null) - { - return $this->cellCollection->getHighestColumn($row); - } - - /** - * Get highest worksheet row - * - * @param string $column Return the highest data row for the specified column, - * or the highest row of any column if no column letter is passed - * @return int Highest row number - */ - public function getHighestRow($column = null) - { - if ($column == null) { - return $this->cachedHighestRow; - } - return $this->getHighestDataRow($column); - } - - /** - * Get highest worksheet row that contains data - * - * @param string $column Return the highest data row for the specified column, - * or the highest data row of any column if no column letter is passed - * @return string Highest row number that contains data - */ - public function getHighestDataRow($column = null) - { - return $this->cellCollection->getHighestRow($column); - } - - /** - * Get highest worksheet column and highest row that have cell records - * - * @return array Highest column name and highest row number - */ - public function getHighestRowAndColumn() - { - return $this->cellCollection->getHighestRowAndColumn(); - } - - /** - * Set a cell value - * - * @param string $pCoordinate Coordinate of the cell - * @param mixed $pValue Value of the cell - * @param bool $returnCell Return the worksheet (false, default) or the cell (true) - * @return PHPExcel_Worksheet|PHPExcel_Cell Depending on the last parameter being specified - */ - public function setCellValue($pCoordinate = 'A1', $pValue = null, $returnCell = false) - { - $cell = $this->getCell(strtoupper($pCoordinate))->setValue($pValue); - return ($returnCell) ? $cell : $this; - } - - /** - * Set a cell value by using numeric cell coordinates - * - * @param string $pColumn Numeric column coordinate of the cell (A = 0) - * @param string $pRow Numeric row coordinate of the cell - * @param mixed $pValue Value of the cell - * @param bool $returnCell Return the worksheet (false, default) or the cell (true) - * @return PHPExcel_Worksheet|PHPExcel_Cell Depending on the last parameter being specified - */ - public function setCellValueByColumnAndRow($pColumn = 0, $pRow = 1, $pValue = null, $returnCell = false) - { - $cell = $this->getCellByColumnAndRow($pColumn, $pRow)->setValue($pValue); - return ($returnCell) ? $cell : $this; - } - - /** - * Set a cell value - * - * @param string $pCoordinate Coordinate of the cell - * @param mixed $pValue Value of the cell - * @param string $pDataType Explicit data type - * @param bool $returnCell Return the worksheet (false, default) or the cell (true) - * @return PHPExcel_Worksheet|PHPExcel_Cell Depending on the last parameter being specified - */ - public function setCellValueExplicit($pCoordinate = 'A1', $pValue = null, $pDataType = PHPExcel_Cell_DataType::TYPE_STRING, $returnCell = false) - { - // Set value - $cell = $this->getCell(strtoupper($pCoordinate))->setValueExplicit($pValue, $pDataType); - return ($returnCell) ? $cell : $this; - } - - /** - * Set a cell value by using numeric cell coordinates - * - * @param string $pColumn Numeric column coordinate of the cell - * @param string $pRow Numeric row coordinate of the cell - * @param mixed $pValue Value of the cell - * @param string $pDataType Explicit data type - * @param bool $returnCell Return the worksheet (false, default) or the cell (true) - * @return PHPExcel_Worksheet|PHPExcel_Cell Depending on the last parameter being specified - */ - public function setCellValueExplicitByColumnAndRow($pColumn = 0, $pRow = 1, $pValue = null, $pDataType = PHPExcel_Cell_DataType::TYPE_STRING, $returnCell = false) - { - $cell = $this->getCellByColumnAndRow($pColumn, $pRow)->setValueExplicit($pValue, $pDataType); - return ($returnCell) ? $cell : $this; - } - - /** - * Get cell at a specific coordinate - * - * @param string $pCoordinate Coordinate of the cell - * @param boolean $createIfNotExists Flag indicating whether a new cell should be created if it doesn't - * already exist, or a null should be returned instead - * @throws PHPExcel_Exception - * @return null|PHPExcel_Cell Cell that was found/created or null - */ - public function getCell($pCoordinate = 'A1', $createIfNotExists = true) - { - // Check cell collection - if ($this->cellCollection->isDataSet(strtoupper($pCoordinate))) { - return $this->cellCollection->getCacheData($pCoordinate); - } - - // Worksheet reference? - if (strpos($pCoordinate, '!') !== false) { - $worksheetReference = PHPExcel_Worksheet::extractSheetTitle($pCoordinate, true); - return $this->parent->getSheetByName($worksheetReference[0])->getCell(strtoupper($worksheetReference[1]), $createIfNotExists); - } - - // Named range? - if ((!preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) && - (preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) { - $namedRange = PHPExcel_NamedRange::resolveRange($pCoordinate, $this); - if ($namedRange !== null) { - $pCoordinate = $namedRange->getRange(); - return $namedRange->getWorksheet()->getCell($pCoordinate, $createIfNotExists); - } - } - - // Uppercase coordinate - $pCoordinate = strtoupper($pCoordinate); - - if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) { - throw new PHPExcel_Exception('Cell coordinate can not be a range of cells.'); - } elseif (strpos($pCoordinate, '$') !== false) { - throw new PHPExcel_Exception('Cell coordinate must not be absolute.'); - } - - // Create new cell object, if required - return $createIfNotExists ? $this->createNewCell($pCoordinate) : null; - } - - /** - * Get cell at a specific coordinate by using numeric cell coordinates - * - * @param string $pColumn Numeric column coordinate of the cell (starting from 0) - * @param string $pRow Numeric row coordinate of the cell - * @param boolean $createIfNotExists Flag indicating whether a new cell should be created if it doesn't - * already exist, or a null should be returned instead - * @return null|PHPExcel_Cell Cell that was found/created or null - */ - public function getCellByColumnAndRow($pColumn = 0, $pRow = 1, $createIfNotExists = true) - { - $columnLetter = PHPExcel_Cell::stringFromColumnIndex($pColumn); - $coordinate = $columnLetter . $pRow; - - if ($this->cellCollection->isDataSet($coordinate)) { - return $this->cellCollection->getCacheData($coordinate); - } - - // Create new cell object, if required - return $createIfNotExists ? $this->createNewCell($coordinate) : null; - } - - /** - * Create a new cell at the specified coordinate - * - * @param string $pCoordinate Coordinate of the cell - * @return PHPExcel_Cell Cell that was created - */ - private function createNewCell($pCoordinate) - { - $cell = $this->cellCollection->addCacheData( - $pCoordinate, - new PHPExcel_Cell(null, PHPExcel_Cell_DataType::TYPE_NULL, $this) - ); - $this->cellCollectionIsSorted = false; - - // Coordinates - $aCoordinates = PHPExcel_Cell::coordinateFromString($pCoordinate); - if (PHPExcel_Cell::columnIndexFromString($this->cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($aCoordinates[0])) { - $this->cachedHighestColumn = $aCoordinates[0]; - } - $this->cachedHighestRow = max($this->cachedHighestRow, $aCoordinates[1]); - - // Cell needs appropriate xfIndex from dimensions records - // but don't create dimension records if they don't already exist - $rowDimension = $this->getRowDimension($aCoordinates[1], false); - $columnDimension = $this->getColumnDimension($aCoordinates[0], false); - - if ($rowDimension !== null && $rowDimension->getXfIndex() > 0) { - // then there is a row dimension with explicit style, assign it to the cell - $cell->setXfIndex($rowDimension->getXfIndex()); - } elseif ($columnDimension !== null && $columnDimension->getXfIndex() > 0) { - // then there is a column dimension, assign it to the cell - $cell->setXfIndex($columnDimension->getXfIndex()); - } - - return $cell; - } - - /** - * Does the cell at a specific coordinate exist? - * - * @param string $pCoordinate Coordinate of the cell - * @throws PHPExcel_Exception - * @return boolean - */ - public function cellExists($pCoordinate = 'A1') - { - // Worksheet reference? - if (strpos($pCoordinate, '!') !== false) { - $worksheetReference = PHPExcel_Worksheet::extractSheetTitle($pCoordinate, true); - return $this->parent->getSheetByName($worksheetReference[0])->cellExists(strtoupper($worksheetReference[1])); - } - - // Named range? - if ((!preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_CELLREF.'$/i', $pCoordinate, $matches)) && - (preg_match('/^'.PHPExcel_Calculation::CALCULATION_REGEXP_NAMEDRANGE.'$/i', $pCoordinate, $matches))) { - $namedRange = PHPExcel_NamedRange::resolveRange($pCoordinate, $this); - if ($namedRange !== null) { - $pCoordinate = $namedRange->getRange(); - if ($this->getHashCode() != $namedRange->getWorksheet()->getHashCode()) { - if (!$namedRange->getLocalOnly()) { - return $namedRange->getWorksheet()->cellExists($pCoordinate); - } else { - throw new PHPExcel_Exception('Named range ' . $namedRange->getName() . ' is not accessible from within sheet ' . $this->getTitle()); - } - } - } else { - return false; - } - } - - // Uppercase coordinate - $pCoordinate = strtoupper($pCoordinate); - - if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) { - throw new PHPExcel_Exception('Cell coordinate can not be a range of cells.'); - } elseif (strpos($pCoordinate, '$') !== false) { - throw new PHPExcel_Exception('Cell coordinate must not be absolute.'); - } else { - // Coordinates - $aCoordinates = PHPExcel_Cell::coordinateFromString($pCoordinate); - - // Cell exists? - return $this->cellCollection->isDataSet($pCoordinate); - } - } - - /** - * Cell at a specific coordinate by using numeric cell coordinates exists? - * - * @param string $pColumn Numeric column coordinate of the cell - * @param string $pRow Numeric row coordinate of the cell - * @return boolean - */ - public function cellExistsByColumnAndRow($pColumn = 0, $pRow = 1) - { - return $this->cellExists(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow); - } - - /** - * Get row dimension at a specific row - * - * @param int $pRow Numeric index of the row - * @return PHPExcel_Worksheet_RowDimension - */ - public function getRowDimension($pRow = 1, $create = true) - { - // Found - $found = null; - - // Get row dimension - if (!isset($this->rowDimensions[$pRow])) { - if (!$create) { - return null; - } - $this->rowDimensions[$pRow] = new PHPExcel_Worksheet_RowDimension($pRow); - - $this->cachedHighestRow = max($this->cachedHighestRow, $pRow); - } - return $this->rowDimensions[$pRow]; - } - - /** - * Get column dimension at a specific column - * - * @param string $pColumn String index of the column - * @return PHPExcel_Worksheet_ColumnDimension - */ - public function getColumnDimension($pColumn = 'A', $create = true) - { - // Uppercase coordinate - $pColumn = strtoupper($pColumn); - - // Fetch dimensions - if (!isset($this->columnDimensions[$pColumn])) { - if (!$create) { - return null; - } - $this->columnDimensions[$pColumn] = new PHPExcel_Worksheet_ColumnDimension($pColumn); - - if (PHPExcel_Cell::columnIndexFromString($this->cachedHighestColumn) < PHPExcel_Cell::columnIndexFromString($pColumn)) { - $this->cachedHighestColumn = $pColumn; - } - } - return $this->columnDimensions[$pColumn]; - } - - /** - * Get column dimension at a specific column by using numeric cell coordinates - * - * @param string $pColumn Numeric column coordinate of the cell - * @return PHPExcel_Worksheet_ColumnDimension - */ - public function getColumnDimensionByColumn($pColumn = 0) - { - return $this->getColumnDimension(PHPExcel_Cell::stringFromColumnIndex($pColumn)); - } - - /** - * Get styles - * - * @return PHPExcel_Style[] - */ - public function getStyles() - { - return $this->styles; - } - - /** - * Get default style of workbook. - * - * @deprecated - * @return PHPExcel_Style - * @throws PHPExcel_Exception - */ - public function getDefaultStyle() - { - return $this->parent->getDefaultStyle(); - } - - /** - * Set default style - should only be used by PHPExcel_IReader implementations! - * - * @deprecated - * @param PHPExcel_Style $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function setDefaultStyle(PHPExcel_Style $pValue) - { - $this->parent->getDefaultStyle()->applyFromArray(array( - 'font' => array( - 'name' => $pValue->getFont()->getName(), - 'size' => $pValue->getFont()->getSize(), - ), - )); - return $this; - } - - /** - * Get style for cell - * - * @param string $pCellCoordinate Cell coordinate (or range) to get style for - * @return PHPExcel_Style - * @throws PHPExcel_Exception - */ - public function getStyle($pCellCoordinate = 'A1') - { - // set this sheet as active - $this->parent->setActiveSheetIndex($this->parent->getIndex($this)); - - // set cell coordinate as active - $this->setSelectedCells(strtoupper($pCellCoordinate)); - - return $this->parent->getCellXfSupervisor(); - } - - /** - * Get conditional styles for a cell - * - * @param string $pCoordinate - * @return PHPExcel_Style_Conditional[] - */ - public function getConditionalStyles($pCoordinate = 'A1') - { - $pCoordinate = strtoupper($pCoordinate); - if (!isset($this->conditionalStylesCollection[$pCoordinate])) { - $this->conditionalStylesCollection[$pCoordinate] = array(); - } - return $this->conditionalStylesCollection[$pCoordinate]; - } - - /** - * Do conditional styles exist for this cell? - * - * @param string $pCoordinate - * @return boolean - */ - public function conditionalStylesExists($pCoordinate = 'A1') - { - if (isset($this->conditionalStylesCollection[strtoupper($pCoordinate)])) { - return true; - } - return false; - } - - /** - * Removes conditional styles for a cell - * - * @param string $pCoordinate - * @return PHPExcel_Worksheet - */ - public function removeConditionalStyles($pCoordinate = 'A1') - { - unset($this->conditionalStylesCollection[strtoupper($pCoordinate)]); - return $this; - } - - /** - * Get collection of conditional styles - * - * @return array - */ - public function getConditionalStylesCollection() - { - return $this->conditionalStylesCollection; - } - - /** - * Set conditional styles - * - * @param $pCoordinate string E.g. 'A1' - * @param $pValue PHPExcel_Style_Conditional[] - * @return PHPExcel_Worksheet - */ - public function setConditionalStyles($pCoordinate = 'A1', $pValue) - { - $this->conditionalStylesCollection[strtoupper($pCoordinate)] = $pValue; - return $this; - } - - /** - * Get style for cell by using numeric cell coordinates - * - * @param int $pColumn Numeric column coordinate of the cell - * @param int $pRow Numeric row coordinate of the cell - * @param int pColumn2 Numeric column coordinate of the range cell - * @param int pRow2 Numeric row coordinate of the range cell - * @return PHPExcel_Style - */ - public function getStyleByColumnAndRow($pColumn = 0, $pRow = 1, $pColumn2 = null, $pRow2 = null) - { - if (!is_null($pColumn2) && !is_null($pRow2)) { - $cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2; - return $this->getStyle($cellRange); - } - - return $this->getStyle(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow); - } - - /** - * Set shared cell style to a range of cells - * - * Please note that this will overwrite existing cell styles for cells in range! - * - * @deprecated - * @param PHPExcel_Style $pSharedCellStyle Cell style to share - * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function setSharedStyle(PHPExcel_Style $pSharedCellStyle = null, $pRange = '') - { - $this->duplicateStyle($pSharedCellStyle, $pRange); - return $this; - } - - /** - * Duplicate cell style to a range of cells - * - * Please note that this will overwrite existing cell styles for cells in range! - * - * @param PHPExcel_Style $pCellStyle Cell style to duplicate - * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function duplicateStyle(PHPExcel_Style $pCellStyle = null, $pRange = '') - { - // make sure we have a real style and not supervisor - $style = $pCellStyle->getIsSupervisor() ? $pCellStyle->getSharedComponent() : $pCellStyle; - - // Add the style to the workbook if necessary - $workbook = $this->parent; - if ($existingStyle = $this->parent->getCellXfByHashCode($pCellStyle->getHashCode())) { - // there is already such cell Xf in our collection - $xfIndex = $existingStyle->getIndex(); - } else { - // we don't have such a cell Xf, need to add - $workbook->addCellXf($pCellStyle); - $xfIndex = $pCellStyle->getIndex(); - } - - // Calculate range outer borders - list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($pRange . ':' . $pRange); - - // Make sure we can loop upwards on rows and columns - if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { - $tmp = $rangeStart; - $rangeStart = $rangeEnd; - $rangeEnd = $tmp; - } - - // Loop through cells and apply styles - for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { - for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { - $this->getCell(PHPExcel_Cell::stringFromColumnIndex($col - 1) . $row)->setXfIndex($xfIndex); - } - } - - return $this; - } - - /** - * Duplicate conditional style to a range of cells - * - * Please note that this will overwrite existing cell styles for cells in range! - * - * @param array of PHPExcel_Style_Conditional $pCellStyle Cell style to duplicate - * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function duplicateConditionalStyle(array $pCellStyle = null, $pRange = '') - { - foreach ($pCellStyle as $cellStyle) { - if (!($cellStyle instanceof PHPExcel_Style_Conditional)) { - throw new PHPExcel_Exception('Style is not a conditional style'); - } - } - - // Calculate range outer borders - list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($pRange . ':' . $pRange); - - // Make sure we can loop upwards on rows and columns - if ($rangeStart[0] > $rangeEnd[0] && $rangeStart[1] > $rangeEnd[1]) { - $tmp = $rangeStart; - $rangeStart = $rangeEnd; - $rangeEnd = $tmp; - } - - // Loop through cells and apply styles - for ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) { - for ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) { - $this->setConditionalStyles(PHPExcel_Cell::stringFromColumnIndex($col - 1) . $row, $pCellStyle); - } - } - - return $this; - } - - /** - * Duplicate cell style array to a range of cells - * - * Please note that this will overwrite existing cell styles for cells in range, - * if they are in the styles array. For example, if you decide to set a range of - * cells to font bold, only include font bold in the styles array. - * - * @deprecated - * @param array $pStyles Array containing style information - * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") - * @param boolean $pAdvanced Advanced mode for setting borders. - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function duplicateStyleArray($pStyles = null, $pRange = '', $pAdvanced = true) - { - $this->getStyle($pRange)->applyFromArray($pStyles, $pAdvanced); - return $this; - } - - /** - * Set break on a cell - * - * @param string $pCell Cell coordinate (e.g. A1) - * @param int $pBreak Break type (type of PHPExcel_Worksheet::BREAK_*) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function setBreak($pCell = 'A1', $pBreak = PHPExcel_Worksheet::BREAK_NONE) - { - // Uppercase coordinate - $pCell = strtoupper($pCell); - - if ($pCell != '') { - if ($pBreak == PHPExcel_Worksheet::BREAK_NONE) { - if (isset($this->breaks[$pCell])) { - unset($this->breaks[$pCell]); - } - } else { - $this->breaks[$pCell] = $pBreak; - } - } else { - throw new PHPExcel_Exception('No cell coordinate specified.'); - } - - return $this; - } - - /** - * Set break on a cell by using numeric cell coordinates - * - * @param integer $pColumn Numeric column coordinate of the cell - * @param integer $pRow Numeric row coordinate of the cell - * @param integer $pBreak Break type (type of PHPExcel_Worksheet::BREAK_*) - * @return PHPExcel_Worksheet - */ - public function setBreakByColumnAndRow($pColumn = 0, $pRow = 1, $pBreak = PHPExcel_Worksheet::BREAK_NONE) - { - return $this->setBreak(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow, $pBreak); - } - - /** - * Get breaks - * - * @return array[] - */ - public function getBreaks() - { - return $this->breaks; - } - - /** - * Set merge on a cell range - * - * @param string $pRange Cell range (e.g. A1:E1) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function mergeCells($pRange = 'A1:A1') - { - // Uppercase coordinate - $pRange = strtoupper($pRange); - - if (strpos($pRange, ':') !== false) { - $this->mergeCells[$pRange] = $pRange; - - // make sure cells are created - - // get the cells in the range - $aReferences = PHPExcel_Cell::extractAllCellReferencesInRange($pRange); - - // create upper left cell if it does not already exist - $upperLeft = $aReferences[0]; - if (!$this->cellExists($upperLeft)) { - $this->getCell($upperLeft)->setValueExplicit(null, PHPExcel_Cell_DataType::TYPE_NULL); - } - - // Blank out the rest of the cells in the range (if they exist) - $count = count($aReferences); - for ($i = 1; $i < $count; $i++) { - if ($this->cellExists($aReferences[$i])) { - $this->getCell($aReferences[$i])->setValueExplicit(null, PHPExcel_Cell_DataType::TYPE_NULL); - } - } - } else { - throw new PHPExcel_Exception('Merge must be set on a range of cells.'); - } - - return $this; - } - - /** - * Set merge on a cell range by using numeric cell coordinates - * - * @param int $pColumn1 Numeric column coordinate of the first cell - * @param int $pRow1 Numeric row coordinate of the first cell - * @param int $pColumn2 Numeric column coordinate of the last cell - * @param int $pRow2 Numeric row coordinate of the last cell - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function mergeCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1) - { - $cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2; - return $this->mergeCells($cellRange); - } - - /** - * Remove merge on a cell range - * - * @param string $pRange Cell range (e.g. A1:E1) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function unmergeCells($pRange = 'A1:A1') - { - // Uppercase coordinate - $pRange = strtoupper($pRange); - - if (strpos($pRange, ':') !== false) { - if (isset($this->mergeCells[$pRange])) { - unset($this->mergeCells[$pRange]); - } else { - throw new PHPExcel_Exception('Cell range ' . $pRange . ' not known as merged.'); - } - } else { - throw new PHPExcel_Exception('Merge can only be removed from a range of cells.'); - } - - return $this; - } - - /** - * Remove merge on a cell range by using numeric cell coordinates - * - * @param int $pColumn1 Numeric column coordinate of the first cell - * @param int $pRow1 Numeric row coordinate of the first cell - * @param int $pColumn2 Numeric column coordinate of the last cell - * @param int $pRow2 Numeric row coordinate of the last cell - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function unmergeCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1) - { - $cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2; - return $this->unmergeCells($cellRange); - } - - /** - * Get merge cells array. - * - * @return array[] - */ - public function getMergeCells() - { - return $this->mergeCells; - } - - /** - * Set merge cells array for the entire sheet. Use instead mergeCells() to merge - * a single cell range. - * - * @param array - */ - public function setMergeCells($pValue = array()) - { - $this->mergeCells = $pValue; - return $this; - } - - /** - * Set protection on a cell range - * - * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) - * @param string $pPassword Password to unlock the protection - * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function protectCells($pRange = 'A1', $pPassword = '', $pAlreadyHashed = false) - { - // Uppercase coordinate - $pRange = strtoupper($pRange); - - if (!$pAlreadyHashed) { - $pPassword = PHPExcel_Shared_PasswordHasher::hashPassword($pPassword); - } - $this->protectedCells[$pRange] = $pPassword; - - return $this; - } - - /** - * Set protection on a cell range by using numeric cell coordinates - * - * @param int $pColumn1 Numeric column coordinate of the first cell - * @param int $pRow1 Numeric row coordinate of the first cell - * @param int $pColumn2 Numeric column coordinate of the last cell - * @param int $pRow2 Numeric row coordinate of the last cell - * @param string $pPassword Password to unlock the protection - * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function protectCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1, $pPassword = '', $pAlreadyHashed = false) - { - $cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2; - return $this->protectCells($cellRange, $pPassword, $pAlreadyHashed); - } - - /** - * Remove protection on a cell range - * - * @param string $pRange Cell (e.g. A1) or cell range (e.g. A1:E1) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function unprotectCells($pRange = 'A1') - { - // Uppercase coordinate - $pRange = strtoupper($pRange); - - if (isset($this->protectedCells[$pRange])) { - unset($this->protectedCells[$pRange]); - } else { - throw new PHPExcel_Exception('Cell range ' . $pRange . ' not known as protected.'); - } - return $this; - } - - /** - * Remove protection on a cell range by using numeric cell coordinates - * - * @param int $pColumn1 Numeric column coordinate of the first cell - * @param int $pRow1 Numeric row coordinate of the first cell - * @param int $pColumn2 Numeric column coordinate of the last cell - * @param int $pRow2 Numeric row coordinate of the last cell - * @param string $pPassword Password to unlock the protection - * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function unprotectCellsByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1, $pPassword = '', $pAlreadyHashed = false) - { - $cellRange = PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 . ':' . PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2; - return $this->unprotectCells($cellRange, $pPassword, $pAlreadyHashed); - } - - /** - * Get protected cells - * - * @return array[] - */ - public function getProtectedCells() - { - return $this->protectedCells; - } - - /** - * Get Autofilter - * - * @return PHPExcel_Worksheet_AutoFilter - */ - public function getAutoFilter() - { - return $this->autoFilter; - } - - /** - * Set AutoFilter - * - * @param PHPExcel_Worksheet_AutoFilter|string $pValue - * A simple string containing a Cell range like 'A1:E10' is permitted for backward compatibility - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function setAutoFilter($pValue) - { - $pRange = strtoupper($pValue); - if (is_string($pValue)) { - $this->autoFilter->setRange($pValue); - } elseif (is_object($pValue) && ($pValue instanceof PHPExcel_Worksheet_AutoFilter)) { - $this->autoFilter = $pValue; - } - return $this; - } - - /** - * Set Autofilter Range by using numeric cell coordinates - * - * @param integer $pColumn1 Numeric column coordinate of the first cell - * @param integer $pRow1 Numeric row coordinate of the first cell - * @param integer $pColumn2 Numeric column coordinate of the second cell - * @param integer $pRow2 Numeric row coordinate of the second cell - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function setAutoFilterByColumnAndRow($pColumn1 = 0, $pRow1 = 1, $pColumn2 = 0, $pRow2 = 1) - { - return $this->setAutoFilter( - PHPExcel_Cell::stringFromColumnIndex($pColumn1) . $pRow1 - . ':' . - PHPExcel_Cell::stringFromColumnIndex($pColumn2) . $pRow2 - ); - } - - /** - * Remove autofilter - * - * @return PHPExcel_Worksheet - */ - public function removeAutoFilter() - { - $this->autoFilter->setRange(null); - return $this; - } - - /** - * Get Freeze Pane - * - * @return string - */ - public function getFreezePane() - { - return $this->freezePane; - } - - /** - * Freeze Pane - * - * @param string $pCell Cell (i.e. A2) - * Examples: - * A2 will freeze the rows above cell A2 (i.e row 1) - * B1 will freeze the columns to the left of cell B1 (i.e column A) - * B2 will freeze the rows above and to the left of cell A2 - * (i.e row 1 and column A) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function freezePane($pCell = '') - { - // Uppercase coordinate - $pCell = strtoupper($pCell); - if (strpos($pCell, ':') === false && strpos($pCell, ',') === false) { - $this->freezePane = $pCell; - } else { - throw new PHPExcel_Exception('Freeze pane can not be set on a range of cells.'); - } - return $this; - } - - /** - * Freeze Pane by using numeric cell coordinates - * - * @param int $pColumn Numeric column coordinate of the cell - * @param int $pRow Numeric row coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function freezePaneByColumnAndRow($pColumn = 0, $pRow = 1) - { - return $this->freezePane(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow); - } - - /** - * Unfreeze Pane - * - * @return PHPExcel_Worksheet - */ - public function unfreezePane() - { - return $this->freezePane(''); - } - - /** - * Insert a new row, updating all possible related data - * - * @param int $pBefore Insert before this one - * @param int $pNumRows Number of rows to insert - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function insertNewRowBefore($pBefore = 1, $pNumRows = 1) - { - if ($pBefore >= 1) { - $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); - $objReferenceHelper->insertNewBefore('A' . $pBefore, 0, $pNumRows, $this); - } else { - throw new PHPExcel_Exception("Rows can only be inserted before at least row 1."); - } - return $this; - } - - /** - * Insert a new column, updating all possible related data - * - * @param int $pBefore Insert before this one - * @param int $pNumCols Number of columns to insert - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function insertNewColumnBefore($pBefore = 'A', $pNumCols = 1) - { - if (!is_numeric($pBefore)) { - $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); - $objReferenceHelper->insertNewBefore($pBefore . '1', $pNumCols, 0, $this); - } else { - throw new PHPExcel_Exception("Column references should not be numeric."); - } - return $this; - } - - /** - * Insert a new column, updating all possible related data - * - * @param int $pBefore Insert before this one (numeric column coordinate of the cell) - * @param int $pNumCols Number of columns to insert - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function insertNewColumnBeforeByIndex($pBefore = 0, $pNumCols = 1) - { - if ($pBefore >= 0) { - return $this->insertNewColumnBefore(PHPExcel_Cell::stringFromColumnIndex($pBefore), $pNumCols); - } else { - throw new PHPExcel_Exception("Columns can only be inserted before at least column A (0)."); - } - } - - /** - * Delete a row, updating all possible related data - * - * @param int $pRow Remove starting with this one - * @param int $pNumRows Number of rows to remove - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function removeRow($pRow = 1, $pNumRows = 1) - { - if ($pRow >= 1) { - $highestRow = $this->getHighestDataRow(); - $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); - $objReferenceHelper->insertNewBefore('A' . ($pRow + $pNumRows), 0, -$pNumRows, $this); - for ($r = 0; $r < $pNumRows; ++$r) { - $this->getCellCacheController()->removeRow($highestRow); - --$highestRow; - } - } else { - throw new PHPExcel_Exception("Rows to be deleted should at least start from row 1."); - } - return $this; - } - - /** - * Remove a column, updating all possible related data - * - * @param string $pColumn Remove starting with this one - * @param int $pNumCols Number of columns to remove - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function removeColumn($pColumn = 'A', $pNumCols = 1) - { - if (!is_numeric($pColumn)) { - $highestColumn = $this->getHighestDataColumn(); - $pColumn = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($pColumn) - 1 + $pNumCols); - $objReferenceHelper = PHPExcel_ReferenceHelper::getInstance(); - $objReferenceHelper->insertNewBefore($pColumn . '1', -$pNumCols, 0, $this); - for ($c = 0; $c < $pNumCols; ++$c) { - $this->getCellCacheController()->removeColumn($highestColumn); - $highestColumn = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::columnIndexFromString($highestColumn) - 2); - } - } else { - throw new PHPExcel_Exception("Column references should not be numeric."); - } - return $this; - } - - /** - * Remove a column, updating all possible related data - * - * @param int $pColumn Remove starting with this one (numeric column coordinate of the cell) - * @param int $pNumCols Number of columns to remove - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function removeColumnByIndex($pColumn = 0, $pNumCols = 1) - { - if ($pColumn >= 0) { - return $this->removeColumn(PHPExcel_Cell::stringFromColumnIndex($pColumn), $pNumCols); - } else { - throw new PHPExcel_Exception("Columns to be deleted should at least start from column 0"); - } - } - - /** - * Show gridlines? - * - * @return boolean - */ - public function getShowGridlines() - { - return $this->showGridlines; - } - - /** - * Set show gridlines - * - * @param boolean $pValue Show gridlines (true/false) - * @return PHPExcel_Worksheet - */ - public function setShowGridlines($pValue = false) - { - $this->showGridlines = $pValue; - return $this; - } - - /** - * Print gridlines? - * - * @return boolean - */ - public function getPrintGridlines() - { - return $this->printGridlines; - } - - /** - * Set print gridlines - * - * @param boolean $pValue Print gridlines (true/false) - * @return PHPExcel_Worksheet - */ - public function setPrintGridlines($pValue = false) - { - $this->printGridlines = $pValue; - return $this; - } - - /** - * Show row and column headers? - * - * @return boolean - */ - public function getShowRowColHeaders() - { - return $this->showRowColHeaders; - } - - /** - * Set show row and column headers - * - * @param boolean $pValue Show row and column headers (true/false) - * @return PHPExcel_Worksheet - */ - public function setShowRowColHeaders($pValue = false) - { - $this->showRowColHeaders = $pValue; - return $this; - } - - /** - * Show summary below? (Row/Column outlining) - * - * @return boolean - */ - public function getShowSummaryBelow() - { - return $this->showSummaryBelow; - } - - /** - * Set show summary below - * - * @param boolean $pValue Show summary below (true/false) - * @return PHPExcel_Worksheet - */ - public function setShowSummaryBelow($pValue = true) - { - $this->showSummaryBelow = $pValue; - return $this; - } - - /** - * Show summary right? (Row/Column outlining) - * - * @return boolean - */ - public function getShowSummaryRight() - { - return $this->showSummaryRight; - } - - /** - * Set show summary right - * - * @param boolean $pValue Show summary right (true/false) - * @return PHPExcel_Worksheet - */ - public function setShowSummaryRight($pValue = true) - { - $this->showSummaryRight = $pValue; - return $this; - } - - /** - * Get comments - * - * @return PHPExcel_Comment[] - */ - public function getComments() - { - return $this->comments; - } - - /** - * Set comments array for the entire sheet. - * - * @param array of PHPExcel_Comment - * @return PHPExcel_Worksheet - */ - public function setComments($pValue = array()) - { - $this->comments = $pValue; - - return $this; - } - - /** - * Get comment for cell - * - * @param string $pCellCoordinate Cell coordinate to get comment for - * @return PHPExcel_Comment - * @throws PHPExcel_Exception - */ - public function getComment($pCellCoordinate = 'A1') - { - // Uppercase coordinate - $pCellCoordinate = strtoupper($pCellCoordinate); - - if (strpos($pCellCoordinate, ':') !== false || strpos($pCellCoordinate, ',') !== false) { - throw new PHPExcel_Exception('Cell coordinate string can not be a range of cells.'); - } elseif (strpos($pCellCoordinate, '$') !== false) { - throw new PHPExcel_Exception('Cell coordinate string must not be absolute.'); - } elseif ($pCellCoordinate == '') { - throw new PHPExcel_Exception('Cell coordinate can not be zero-length string.'); - } else { - // Check if we already have a comment for this cell. - // If not, create a new comment. - if (isset($this->comments[$pCellCoordinate])) { - return $this->comments[$pCellCoordinate]; - } else { - $newComment = new PHPExcel_Comment(); - $this->comments[$pCellCoordinate] = $newComment; - return $newComment; - } - } - } - - /** - * Get comment for cell by using numeric cell coordinates - * - * @param int $pColumn Numeric column coordinate of the cell - * @param int $pRow Numeric row coordinate of the cell - * @return PHPExcel_Comment - */ - public function getCommentByColumnAndRow($pColumn = 0, $pRow = 1) - { - return $this->getComment(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow); - } - - /** - * Get selected cell - * - * @deprecated - * @return string - */ - public function getSelectedCell() - { - return $this->getSelectedCells(); - } - - /** - * Get active cell - * - * @return string Example: 'A1' - */ - public function getActiveCell() - { - return $this->activeCell; - } - - /** - * Get selected cells - * - * @return string - */ - public function getSelectedCells() - { - return $this->selectedCells; - } - - /** - * Selected cell - * - * @param string $pCoordinate Cell (i.e. A1) - * @return PHPExcel_Worksheet - */ - public function setSelectedCell($pCoordinate = 'A1') - { - return $this->setSelectedCells($pCoordinate); - } - - /** - * Select a range of cells. - * - * @param string $pCoordinate Cell range, examples: 'A1', 'B2:G5', 'A:C', '3:6' - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function setSelectedCells($pCoordinate = 'A1') - { - // Uppercase coordinate - $pCoordinate = strtoupper($pCoordinate); - - // Convert 'A' to 'A:A' - $pCoordinate = preg_replace('/^([A-Z]+)$/', '${1}:${1}', $pCoordinate); - - // Convert '1' to '1:1' - $pCoordinate = preg_replace('/^([0-9]+)$/', '${1}:${1}', $pCoordinate); - - // Convert 'A:C' to 'A1:C1048576' - $pCoordinate = preg_replace('/^([A-Z]+):([A-Z]+)$/', '${1}1:${2}1048576', $pCoordinate); - - // Convert '1:3' to 'A1:XFD3' - $pCoordinate = preg_replace('/^([0-9]+):([0-9]+)$/', 'A${1}:XFD${2}', $pCoordinate); - - if (strpos($pCoordinate, ':') !== false || strpos($pCoordinate, ',') !== false) { - list($first, ) = PHPExcel_Cell::splitRange($pCoordinate); - $this->activeCell = $first[0]; - } else { - $this->activeCell = $pCoordinate; - } - $this->selectedCells = $pCoordinate; - return $this; - } - - /** - * Selected cell by using numeric cell coordinates - * - * @param int $pColumn Numeric column coordinate of the cell - * @param int $pRow Numeric row coordinate of the cell - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function setSelectedCellByColumnAndRow($pColumn = 0, $pRow = 1) - { - return $this->setSelectedCells(PHPExcel_Cell::stringFromColumnIndex($pColumn) . $pRow); - } - - /** - * Get right-to-left - * - * @return boolean - */ - public function getRightToLeft() - { - return $this->rightToLeft; - } - - /** - * Set right-to-left - * - * @param boolean $value Right-to-left true/false - * @return PHPExcel_Worksheet - */ - public function setRightToLeft($value = false) - { - $this->rightToLeft = $value; - return $this; - } - - /** - * Fill worksheet from values in array - * - * @param array $source Source array - * @param mixed $nullValue Value in source array that stands for blank cell - * @param string $startCell Insert array starting from this cell address as the top left coordinate - * @param boolean $strictNullComparison Apply strict comparison when testing for null values in the array - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet - */ - public function fromArray($source = null, $nullValue = null, $startCell = 'A1', $strictNullComparison = false) - { - if (is_array($source)) { - // Convert a 1-D array to 2-D (for ease of looping) - if (!is_array(end($source))) { - $source = array($source); - } - - // start coordinate - list ($startColumn, $startRow) = PHPExcel_Cell::coordinateFromString($startCell); - - // Loop through $source - foreach ($source as $rowData) { - $currentColumn = $startColumn; - foreach ($rowData as $cellValue) { - if ($strictNullComparison) { - if ($cellValue !== $nullValue) { - // Set cell value - $this->getCell($currentColumn . $startRow)->setValue($cellValue); - } - } else { - if ($cellValue != $nullValue) { - // Set cell value - $this->getCell($currentColumn . $startRow)->setValue($cellValue); - } - } - ++$currentColumn; - } - ++$startRow; - } - } else { - throw new PHPExcel_Exception("Parameter \$source should be an array."); - } - return $this; - } - - /** - * Create array from a range of cells - * - * @param string $pRange Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") - * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist - * @param boolean $calculateFormulas Should formulas be calculated? - * @param boolean $formatData Should formatting be applied to cell values? - * @param boolean $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero - * True - Return rows and columns indexed by their actual row and column IDs - * @return array - */ - public function rangeToArray($pRange = 'A1', $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) - { - // Returnvalue - $returnValue = array(); - // Identify the range that we need to extract from the worksheet - list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($pRange); - $minCol = PHPExcel_Cell::stringFromColumnIndex($rangeStart[0] -1); - $minRow = $rangeStart[1]; - $maxCol = PHPExcel_Cell::stringFromColumnIndex($rangeEnd[0] -1); - $maxRow = $rangeEnd[1]; - - $maxCol++; - // Loop through rows - $r = -1; - for ($row = $minRow; $row <= $maxRow; ++$row) { - $rRef = ($returnCellRef) ? $row : ++$r; - $c = -1; - // Loop through columns in the current row - for ($col = $minCol; $col != $maxCol; ++$col) { - $cRef = ($returnCellRef) ? $col : ++$c; - // Using getCell() will create a new cell if it doesn't already exist. We don't want that to happen - // so we test and retrieve directly against cellCollection - if ($this->cellCollection->isDataSet($col.$row)) { - // Cell exists - $cell = $this->cellCollection->getCacheData($col.$row); - if ($cell->getValue() !== null) { - if ($cell->getValue() instanceof PHPExcel_RichText) { - $returnValue[$rRef][$cRef] = $cell->getValue()->getPlainText(); - } else { - if ($calculateFormulas) { - $returnValue[$rRef][$cRef] = $cell->getCalculatedValue(); - } else { - $returnValue[$rRef][$cRef] = $cell->getValue(); - } - } - - if ($formatData) { - $style = $this->parent->getCellXfByIndex($cell->getXfIndex()); - $returnValue[$rRef][$cRef] = PHPExcel_Style_NumberFormat::toFormattedString( - $returnValue[$rRef][$cRef], - ($style && $style->getNumberFormat()) ? $style->getNumberFormat()->getFormatCode() : PHPExcel_Style_NumberFormat::FORMAT_GENERAL - ); - } - } else { - // Cell holds a NULL - $returnValue[$rRef][$cRef] = $nullValue; - } - } else { - // Cell doesn't exist - $returnValue[$rRef][$cRef] = $nullValue; - } - } - } - - // Return - return $returnValue; - } - - - /** - * Create array from a range of cells - * - * @param string $pNamedRange Name of the Named Range - * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist - * @param boolean $calculateFormulas Should formulas be calculated? - * @param boolean $formatData Should formatting be applied to cell values? - * @param boolean $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero - * True - Return rows and columns indexed by their actual row and column IDs - * @return array - * @throws PHPExcel_Exception - */ - public function namedRangeToArray($pNamedRange = '', $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) - { - $namedRange = PHPExcel_NamedRange::resolveRange($pNamedRange, $this); - if ($namedRange !== null) { - $pWorkSheet = $namedRange->getWorksheet(); - $pCellRange = $namedRange->getRange(); - - return $pWorkSheet->rangeToArray($pCellRange, $nullValue, $calculateFormulas, $formatData, $returnCellRef); - } - - throw new PHPExcel_Exception('Named Range '.$pNamedRange.' does not exist.'); - } - - - /** - * Create array from worksheet - * - * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist - * @param boolean $calculateFormulas Should formulas be calculated? - * @param boolean $formatData Should formatting be applied to cell values? - * @param boolean $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero - * True - Return rows and columns indexed by their actual row and column IDs - * @return array - */ - public function toArray($nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) - { - // Garbage collect... - $this->garbageCollect(); - - // Identify the range that we need to extract from the worksheet - $maxCol = $this->getHighestColumn(); - $maxRow = $this->getHighestRow(); - // Return - return $this->rangeToArray('A1:'.$maxCol.$maxRow, $nullValue, $calculateFormulas, $formatData, $returnCellRef); - } - - /** - * Get row iterator - * - * @param integer $startRow The row number at which to start iterating - * @param integer $endRow The row number at which to stop iterating - * - * @return PHPExcel_Worksheet_RowIterator - */ - public function getRowIterator($startRow = 1, $endRow = null) - { - return new PHPExcel_Worksheet_RowIterator($this, $startRow, $endRow); - } - - /** - * Get column iterator - * - * @param string $startColumn The column address at which to start iterating - * @param string $endColumn The column address at which to stop iterating - * - * @return PHPExcel_Worksheet_ColumnIterator - */ - public function getColumnIterator($startColumn = 'A', $endColumn = null) - { - return new PHPExcel_Worksheet_ColumnIterator($this, $startColumn, $endColumn); - } - - /** - * Run PHPExcel garabage collector. - * - * @return PHPExcel_Worksheet - */ - public function garbageCollect() - { - // Flush cache - $this->cellCollection->getCacheData('A1'); - // Build a reference table from images -// $imageCoordinates = array(); -// $iterator = $this->getDrawingCollection()->getIterator(); -// while ($iterator->valid()) { -// $imageCoordinates[$iterator->current()->getCoordinates()] = true; -// -// $iterator->next(); -// } -// - // Lookup highest column and highest row if cells are cleaned - $colRow = $this->cellCollection->getHighestRowAndColumn(); - $highestRow = $colRow['row']; - $highestColumn = PHPExcel_Cell::columnIndexFromString($colRow['column']); - - // Loop through column dimensions - foreach ($this->columnDimensions as $dimension) { - $highestColumn = max($highestColumn, PHPExcel_Cell::columnIndexFromString($dimension->getColumnIndex())); - } - - // Loop through row dimensions - foreach ($this->rowDimensions as $dimension) { - $highestRow = max($highestRow, $dimension->getRowIndex()); - } - - // Cache values - if ($highestColumn < 0) { - $this->cachedHighestColumn = 'A'; - } else { - $this->cachedHighestColumn = PHPExcel_Cell::stringFromColumnIndex(--$highestColumn); - } - $this->cachedHighestRow = $highestRow; - - // Return - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - if ($this->dirty) { - $this->hash = md5($this->title . $this->autoFilter . ($this->protection->isProtectionEnabled() ? 't' : 'f') . __CLASS__); - $this->dirty = false; - } - return $this->hash; - } - - /** - * Extract worksheet title from range. - * - * Example: extractSheetTitle("testSheet!A1") ==> 'A1' - * Example: extractSheetTitle("'testSheet 1'!A1", true) ==> array('testSheet 1', 'A1'); - * - * @param string $pRange Range to extract title from - * @param bool $returnRange Return range? (see example) - * @return mixed - */ - public static function extractSheetTitle($pRange, $returnRange = false) - { - // Sheet title included? - if (($sep = strpos($pRange, '!')) === false) { - return ''; - } - - if ($returnRange) { - return array(trim(substr($pRange, 0, $sep), "'"), substr($pRange, $sep + 1)); - } - - return substr($pRange, $sep + 1); - } - - /** - * Get hyperlink - * - * @param string $pCellCoordinate Cell coordinate to get hyperlink for - */ - public function getHyperlink($pCellCoordinate = 'A1') - { - // return hyperlink if we already have one - if (isset($this->hyperlinkCollection[$pCellCoordinate])) { - return $this->hyperlinkCollection[$pCellCoordinate]; - } - - // else create hyperlink - $this->hyperlinkCollection[$pCellCoordinate] = new PHPExcel_Cell_Hyperlink(); - return $this->hyperlinkCollection[$pCellCoordinate]; - } - - /** - * Set hyperlnk - * - * @param string $pCellCoordinate Cell coordinate to insert hyperlink - * @param PHPExcel_Cell_Hyperlink $pHyperlink - * @return PHPExcel_Worksheet - */ - public function setHyperlink($pCellCoordinate = 'A1', PHPExcel_Cell_Hyperlink $pHyperlink = null) - { - if ($pHyperlink === null) { - unset($this->hyperlinkCollection[$pCellCoordinate]); - } else { - $this->hyperlinkCollection[$pCellCoordinate] = $pHyperlink; - } - return $this; - } - - /** - * Hyperlink at a specific coordinate exists? - * - * @param string $pCoordinate - * @return boolean - */ - public function hyperlinkExists($pCoordinate = 'A1') - { - return isset($this->hyperlinkCollection[$pCoordinate]); - } - - /** - * Get collection of hyperlinks - * - * @return PHPExcel_Cell_Hyperlink[] - */ - public function getHyperlinkCollection() - { - return $this->hyperlinkCollection; - } - - /** - * Get data validation - * - * @param string $pCellCoordinate Cell coordinate to get data validation for - */ - public function getDataValidation($pCellCoordinate = 'A1') - { - // return data validation if we already have one - if (isset($this->dataValidationCollection[$pCellCoordinate])) { - return $this->dataValidationCollection[$pCellCoordinate]; - } - - // else create data validation - $this->dataValidationCollection[$pCellCoordinate] = new PHPExcel_Cell_DataValidation(); - return $this->dataValidationCollection[$pCellCoordinate]; - } - - /** - * Set data validation - * - * @param string $pCellCoordinate Cell coordinate to insert data validation - * @param PHPExcel_Cell_DataValidation $pDataValidation - * @return PHPExcel_Worksheet - */ - public function setDataValidation($pCellCoordinate = 'A1', PHPExcel_Cell_DataValidation $pDataValidation = null) - { - if ($pDataValidation === null) { - unset($this->dataValidationCollection[$pCellCoordinate]); - } else { - $this->dataValidationCollection[$pCellCoordinate] = $pDataValidation; - } - return $this; - } - - /** - * Data validation at a specific coordinate exists? - * - * @param string $pCoordinate - * @return boolean - */ - public function dataValidationExists($pCoordinate = 'A1') - { - return isset($this->dataValidationCollection[$pCoordinate]); - } - - /** - * Get collection of data validations - * - * @return PHPExcel_Cell_DataValidation[] - */ - public function getDataValidationCollection() - { - return $this->dataValidationCollection; - } - - /** - * Accepts a range, returning it as a range that falls within the current highest row and column of the worksheet - * - * @param string $range - * @return string Adjusted range value - */ - public function shrinkRangeToFit($range) - { - $maxCol = $this->getHighestColumn(); - $maxRow = $this->getHighestRow(); - $maxCol = PHPExcel_Cell::columnIndexFromString($maxCol); - - $rangeBlocks = explode(' ', $range); - foreach ($rangeBlocks as &$rangeSet) { - $rangeBoundaries = PHPExcel_Cell::getRangeBoundaries($rangeSet); - - if (PHPExcel_Cell::columnIndexFromString($rangeBoundaries[0][0]) > $maxCol) { - $rangeBoundaries[0][0] = PHPExcel_Cell::stringFromColumnIndex($maxCol); - } - if ($rangeBoundaries[0][1] > $maxRow) { - $rangeBoundaries[0][1] = $maxRow; - } - if (PHPExcel_Cell::columnIndexFromString($rangeBoundaries[1][0]) > $maxCol) { - $rangeBoundaries[1][0] = PHPExcel_Cell::stringFromColumnIndex($maxCol); - } - if ($rangeBoundaries[1][1] > $maxRow) { - $rangeBoundaries[1][1] = $maxRow; - } - $rangeSet = $rangeBoundaries[0][0].$rangeBoundaries[0][1].':'.$rangeBoundaries[1][0].$rangeBoundaries[1][1]; - } - unset($rangeSet); - $stRange = implode(' ', $rangeBlocks); - - return $stRange; - } - - /** - * Get tab color - * - * @return PHPExcel_Style_Color - */ - public function getTabColor() - { - if ($this->tabColor === null) { - $this->tabColor = new PHPExcel_Style_Color(); - } - return $this->tabColor; - } - - /** - * Reset tab color - * - * @return PHPExcel_Worksheet - */ - public function resetTabColor() - { - $this->tabColor = null; - unset($this->tabColor); - - return $this; - } - - /** - * Tab color set? - * - * @return boolean - */ - public function isTabColorSet() - { - return ($this->tabColor !== null); - } - - /** - * Copy worksheet (!= clone!) - * - * @return PHPExcel_Worksheet - */ - public function copy() - { - $copied = clone $this; - - return $copied; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - foreach ($this as $key => $val) { - if ($key == 'parent') { - continue; - } - - if (is_object($val) || (is_array($val))) { - if ($key == 'cellCollection') { - $newCollection = clone $this->cellCollection; - $newCollection->copyCellCollection($this); - $this->cellCollection = $newCollection; - } elseif ($key == 'drawingCollection') { - $newCollection = clone $this->drawingCollection; - $this->drawingCollection = $newCollection; - } elseif (($key == 'autoFilter') && ($this->autoFilter instanceof PHPExcel_Worksheet_AutoFilter)) { - $newAutoFilter = clone $this->autoFilter; - $this->autoFilter = $newAutoFilter; - $this->autoFilter->setParent($this); - } else { - $this->{$key} = unserialize(serialize($val)); - } - } - } - } -/** - * Define the code name of the sheet - * - * @param null|string Same rule as Title minus space not allowed (but, like Excel, change silently space to underscore) - * @return objWorksheet - * @throws PHPExcel_Exception - */ - public function setCodeName($pValue = null) - { - // Is this a 'rename' or not? - if ($this->getCodeName() == $pValue) { - return $this; - } - $pValue = str_replace(' ', '_', $pValue);//Excel does this automatically without flinching, we are doing the same - // Syntax check - // throw an exception if not valid - self::checkSheetCodeName($pValue); - - // We use the same code that setTitle to find a valid codeName else not using a space (Excel don't like) but a '_' - - if ($this->getParent()) { - // Is there already such sheet name? - if ($this->getParent()->sheetCodeNameExists($pValue)) { - // Use name, but append with lowest possible integer - - if (PHPExcel_Shared_String::CountCharacters($pValue) > 29) { - $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 29); - } - $i = 1; - while ($this->getParent()->sheetCodeNameExists($pValue . '_' . $i)) { - ++$i; - if ($i == 10) { - if (PHPExcel_Shared_String::CountCharacters($pValue) > 28) { - $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 28); - } - } elseif ($i == 100) { - if (PHPExcel_Shared_String::CountCharacters($pValue) > 27) { - $pValue = PHPExcel_Shared_String::Substring($pValue, 0, 27); - } - } - } - - $pValue = $pValue . '_' . $i;// ok, we have a valid name - //codeName is'nt used in formula : no need to call for an update - //return $this->setTitle($altTitle, $updateFormulaCellReferences); - } - } - - $this->codeName=$pValue; - return $this; - } - /** - * Return the code name of the sheet - * - * @return null|string - */ - public function getCodeName() - { - return $this->codeName; - } - /** - * Sheet has a code name ? - * @return boolean - */ - public function hasCodeName() - { - return !(is_null($this->codeName)); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter.php deleted file mode 100644 index 6ec8a44..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter.php +++ /dev/null @@ -1,846 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_AutoFilter - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_AutoFilter -{ - /** - * Autofilter Worksheet - * - * @var PHPExcel_Worksheet - */ - private $workSheet; - - - /** - * Autofilter Range - * - * @var string - */ - private $range = ''; - - - /** - * Autofilter Column Ruleset - * - * @var array of PHPExcel_Worksheet_AutoFilter_Column - */ - private $columns = array(); - - - /** - * Create a new PHPExcel_Worksheet_AutoFilter - * - * @param string $pRange Cell range (i.e. A1:E10) - * @param PHPExcel_Worksheet $pSheet - */ - public function __construct($pRange = '', PHPExcel_Worksheet $pSheet = null) - { - $this->range = $pRange; - $this->workSheet = $pSheet; - } - - /** - * Get AutoFilter Parent Worksheet - * - * @return PHPExcel_Worksheet - */ - public function getParent() - { - return $this->workSheet; - } - - /** - * Set AutoFilter Parent Worksheet - * - * @param PHPExcel_Worksheet $pSheet - * @return PHPExcel_Worksheet_AutoFilter - */ - public function setParent(PHPExcel_Worksheet $pSheet = null) - { - $this->workSheet = $pSheet; - - return $this; - } - - /** - * Get AutoFilter Range - * - * @return string - */ - public function getRange() - { - return $this->range; - } - - /** - * Set AutoFilter Range - * - * @param string $pRange Cell range (i.e. A1:E10) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter - */ - public function setRange($pRange = '') - { - // Uppercase coordinate - $cellAddress = explode('!', strtoupper($pRange)); - if (count($cellAddress) > 1) { - list($worksheet, $pRange) = $cellAddress; - } - - if (strpos($pRange, ':') !== false) { - $this->range = $pRange; - } elseif (empty($pRange)) { - $this->range = ''; - } else { - throw new PHPExcel_Exception('Autofilter must be set on a range of cells.'); - } - - if (empty($pRange)) { - // Discard all column rules - $this->columns = array(); - } else { - // Discard any column rules that are no longer valid within this range - list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($this->range); - foreach ($this->columns as $key => $value) { - $colIndex = PHPExcel_Cell::columnIndexFromString($key); - if (($rangeStart[0] > $colIndex) || ($rangeEnd[0] < $colIndex)) { - unset($this->columns[$key]); - } - } - } - - return $this; - } - - /** - * Get all AutoFilter Columns - * - * @throws PHPExcel_Exception - * @return array of PHPExcel_Worksheet_AutoFilter_Column - */ - public function getColumns() - { - return $this->columns; - } - - /** - * Validate that the specified column is in the AutoFilter range - * - * @param string $column Column name (e.g. A) - * @throws PHPExcel_Exception - * @return integer The column offset within the autofilter range - */ - public function testColumnInRange($column) - { - if (empty($this->range)) { - throw new PHPExcel_Exception("No autofilter range is defined."); - } - - $columnIndex = PHPExcel_Cell::columnIndexFromString($column); - list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($this->range); - if (($rangeStart[0] > $columnIndex) || ($rangeEnd[0] < $columnIndex)) { - throw new PHPExcel_Exception("Column is outside of current autofilter range."); - } - - return $columnIndex - $rangeStart[0]; - } - - /** - * Get a specified AutoFilter Column Offset within the defined AutoFilter range - * - * @param string $pColumn Column name (e.g. A) - * @throws PHPExcel_Exception - * @return integer The offset of the specified column within the autofilter range - */ - public function getColumnOffset($pColumn) - { - return $this->testColumnInRange($pColumn); - } - - /** - * Get a specified AutoFilter Column - * - * @param string $pColumn Column name (e.g. A) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function getColumn($pColumn) - { - $this->testColumnInRange($pColumn); - - if (!isset($this->columns[$pColumn])) { - $this->columns[$pColumn] = new PHPExcel_Worksheet_AutoFilter_Column($pColumn, $this); - } - - return $this->columns[$pColumn]; - } - - /** - * Get a specified AutoFilter Column by it's offset - * - * @param integer $pColumnOffset Column offset within range (starting from 0) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function getColumnByOffset($pColumnOffset = 0) - { - list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($this->range); - $pColumn = PHPExcel_Cell::stringFromColumnIndex($rangeStart[0] + $pColumnOffset - 1); - - return $this->getColumn($pColumn); - } - - /** - * Set AutoFilter - * - * @param PHPExcel_Worksheet_AutoFilter_Column|string $pColumn - * A simple string containing a Column ID like 'A' is permitted - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter - */ - public function setColumn($pColumn) - { - if ((is_string($pColumn)) && (!empty($pColumn))) { - $column = $pColumn; - } elseif (is_object($pColumn) && ($pColumn instanceof PHPExcel_Worksheet_AutoFilter_Column)) { - $column = $pColumn->getColumnIndex(); - } else { - throw new PHPExcel_Exception("Column is not within the autofilter range."); - } - $this->testColumnInRange($column); - - if (is_string($pColumn)) { - $this->columns[$pColumn] = new PHPExcel_Worksheet_AutoFilter_Column($pColumn, $this); - } elseif (is_object($pColumn) && ($pColumn instanceof PHPExcel_Worksheet_AutoFilter_Column)) { - $pColumn->setParent($this); - $this->columns[$column] = $pColumn; - } - ksort($this->columns); - - return $this; - } - - /** - * Clear a specified AutoFilter Column - * - * @param string $pColumn Column name (e.g. A) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter - */ - public function clearColumn($pColumn) - { - $this->testColumnInRange($pColumn); - - if (isset($this->columns[$pColumn])) { - unset($this->columns[$pColumn]); - } - - return $this; - } - - /** - * Shift an AutoFilter Column Rule to a different column - * - * Note: This method bypasses validation of the destination column to ensure it is within this AutoFilter range. - * Nor does it verify whether any column rule already exists at $toColumn, but will simply overrideany existing value. - * Use with caution. - * - * @param string $fromColumn Column name (e.g. A) - * @param string $toColumn Column name (e.g. B) - * @return PHPExcel_Worksheet_AutoFilter - */ - public function shiftColumn($fromColumn = null, $toColumn = null) - { - $fromColumn = strtoupper($fromColumn); - $toColumn = strtoupper($toColumn); - - if (($fromColumn !== null) && (isset($this->columns[$fromColumn])) && ($toColumn !== null)) { - $this->columns[$fromColumn]->setParent(); - $this->columns[$fromColumn]->setColumnIndex($toColumn); - $this->columns[$toColumn] = $this->columns[$fromColumn]; - $this->columns[$toColumn]->setParent($this); - unset($this->columns[$fromColumn]); - - ksort($this->columns); - } - - return $this; - } - - - /** - * Test if cell value is in the defined set of values - * - * @param mixed $cellValue - * @param mixed[] $dataSet - * @return boolean - */ - private static function filterTestInSimpleDataSet($cellValue, $dataSet) - { - $dataSetValues = $dataSet['filterValues']; - $blanks = $dataSet['blanks']; - if (($cellValue == '') || ($cellValue === null)) { - return $blanks; - } - return in_array($cellValue, $dataSetValues); - } - - /** - * Test if cell value is in the defined set of Excel date values - * - * @param mixed $cellValue - * @param mixed[] $dataSet - * @return boolean - */ - private static function filterTestInDateGroupSet($cellValue, $dataSet) - { - $dateSet = $dataSet['filterValues']; - $blanks = $dataSet['blanks']; - if (($cellValue == '') || ($cellValue === null)) { - return $blanks; - } - - if (is_numeric($cellValue)) { - $dateValue = PHPExcel_Shared_Date::ExcelToPHP($cellValue); - if ($cellValue < 1) { - // Just the time part - $dtVal = date('His', $dateValue); - $dateSet = $dateSet['time']; - } elseif ($cellValue == floor($cellValue)) { - // Just the date part - $dtVal = date('Ymd', $dateValue); - $dateSet = $dateSet['date']; - } else { - // date and time parts - $dtVal = date('YmdHis', $dateValue); - $dateSet = $dateSet['dateTime']; - } - foreach ($dateSet as $dateValue) { - // Use of substr to extract value at the appropriate group level - if (substr($dtVal, 0, strlen($dateValue)) == $dateValue) { - return true; - } - } - } - return false; - } - - /** - * Test if cell value is within a set of values defined by a ruleset - * - * @param mixed $cellValue - * @param mixed[] $ruleSet - * @return boolean - */ - private static function filterTestInCustomDataSet($cellValue, $ruleSet) - { - $dataSet = $ruleSet['filterRules']; - $join = $ruleSet['join']; - $customRuleForBlanks = isset($ruleSet['customRuleForBlanks']) ? $ruleSet['customRuleForBlanks'] : false; - - if (!$customRuleForBlanks) { - // Blank cells are always ignored, so return a FALSE - if (($cellValue == '') || ($cellValue === null)) { - return false; - } - } - $returnVal = ($join == PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_AND); - foreach ($dataSet as $rule) { - if (is_numeric($rule['value'])) { - // Numeric values are tested using the appropriate operator - switch ($rule['operator']) { - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL: - $retVal = ($cellValue == $rule['value']); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL: - $retVal = ($cellValue != $rule['value']); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN: - $retVal = ($cellValue > $rule['value']); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL: - $retVal = ($cellValue >= $rule['value']); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN: - $retVal = ($cellValue < $rule['value']); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL: - $retVal = ($cellValue <= $rule['value']); - break; - } - } elseif ($rule['value'] == '') { - switch ($rule['operator']) { - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL: - $retVal = (($cellValue == '') || ($cellValue === null)); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_NOTEQUAL: - $retVal = (($cellValue != '') && ($cellValue !== null)); - break; - default: - $retVal = true; - break; - } - } else { - // String values are always tested for equality, factoring in for wildcards (hence a regexp test) - $retVal = preg_match('/^'.$rule['value'].'$/i', $cellValue); - } - // If there are multiple conditions, then we need to test both using the appropriate join operator - switch ($join) { - case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_OR: - $returnVal = $returnVal || $retVal; - // Break as soon as we have a TRUE match for OR joins, - // to avoid unnecessary additional code execution - if ($returnVal) { - return $returnVal; - } - break; - case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_AND: - $returnVal = $returnVal && $retVal; - break; - } - } - - return $returnVal; - } - - /** - * Test if cell date value is matches a set of values defined by a set of months - * - * @param mixed $cellValue - * @param mixed[] $monthSet - * @return boolean - */ - private static function filterTestInPeriodDateSet($cellValue, $monthSet) - { - // Blank cells are always ignored, so return a FALSE - if (($cellValue == '') || ($cellValue === null)) { - return false; - } - - if (is_numeric($cellValue)) { - $dateValue = date('m', PHPExcel_Shared_Date::ExcelToPHP($cellValue)); - if (in_array($dateValue, $monthSet)) { - return true; - } - } - - return false; - } - - /** - * Search/Replace arrays to convert Excel wildcard syntax to a regexp syntax for preg_matching - * - * @var array - */ - private static $fromReplace = array('\*', '\?', '~~', '~.*', '~.?'); - private static $toReplace = array('.*', '.', '~', '\*', '\?'); - - - /** - * Convert a dynamic rule daterange to a custom filter range expression for ease of calculation - * - * @param string $dynamicRuleType - * @param PHPExcel_Worksheet_AutoFilter_Column &$filterColumn - * @return mixed[] - */ - private function dynamicFilterDateRange($dynamicRuleType, &$filterColumn) - { - $rDateType = PHPExcel_Calculation_Functions::getReturnDateType(); - PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC); - $val = $maxVal = null; - - $ruleValues = array(); - $baseDate = PHPExcel_Calculation_DateTime::DATENOW(); - // Calculate start/end dates for the required date range based on current date - switch ($dynamicRuleType) { - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK: - $baseDate = strtotime('-7 days', $baseDate); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK: - $baseDate = strtotime('-7 days', $baseDate); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH: - $baseDate = strtotime('-1 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH: - $baseDate = strtotime('+1 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER: - $baseDate = strtotime('-3 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER: - $baseDate = strtotime('+3 month', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR: - $baseDate = strtotime('-1 year', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR: - $baseDate = strtotime('+1 year', gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); - break; - } - - switch ($dynamicRuleType) { - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_TODAY: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW: - $maxVal = (int) PHPExcel_Shared_Date::PHPtoExcel(strtotime('+1 day', $baseDate)); - $val = (int) PHPExcel_Shared_Date::PHPToExcel($baseDate); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE: - $maxVal = (int) PHPExcel_Shared_Date::PHPtoExcel(strtotime('+1 day', $baseDate)); - $val = (int) PHPExcel_Shared_Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1, date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR: - $maxVal = (int) PHPExcel_Shared_Date::PHPToExcel(gmmktime(0, 0, 0, 31, 12, date('Y', $baseDate))); - ++$maxVal; - $val = (int) PHPExcel_Shared_Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1, date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER: - $thisMonth = date('m', $baseDate); - $thisQuarter = floor(--$thisMonth / 3); - $maxVal = (int) PHPExcel_Shared_Date::PHPtoExcel(gmmktime(0, 0, 0, date('t', $baseDate), (1+$thisQuarter)*3, date('Y', $baseDate))); - ++$maxVal; - $val = (int) PHPExcel_Shared_Date::PHPToExcel(gmmktime(0, 0, 0, 1, 1+$thisQuarter*3, date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH: - $maxVal = (int) PHPExcel_Shared_Date::PHPtoExcel(gmmktime(0, 0, 0, date('t', $baseDate), date('m', $baseDate), date('Y', $baseDate))); - ++$maxVal; - $val = (int) PHPExcel_Shared_Date::PHPToExcel(gmmktime(0, 0, 0, 1, date('m', $baseDate), date('Y', $baseDate))); - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK: - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK: - $dayOfWeek = date('w', $baseDate); - $val = (int) PHPExcel_Shared_Date::PHPToExcel($baseDate) - $dayOfWeek; - $maxVal = $val + 7; - break; - } - - switch ($dynamicRuleType) { - // Adjust Today dates for Yesterday and Tomorrow - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY: - --$maxVal; - --$val; - break; - case PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW: - ++$maxVal; - ++$val; - break; - } - - // Set the filter column rule attributes ready for writing - $filterColumn->setAttributes(array('val' => $val, 'maxVal' => $maxVal)); - - // Set the rules for identifying rows for hide/show - $ruleValues[] = array('operator' => PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, 'value' => $val); - $ruleValues[] = array('operator' => PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN, 'value' => $maxVal); - PHPExcel_Calculation_Functions::setReturnDateType($rDateType); - - return array('method' => 'filterTestInCustomDataSet', 'arguments' => array('filterRules' => $ruleValues, 'join' => PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_AND)); - } - - private function calculateTopTenValue($columnID, $startRow, $endRow, $ruleType, $ruleValue) - { - $range = $columnID.$startRow.':'.$columnID.$endRow; - $dataValues = PHPExcel_Calculation_Functions::flattenArray($this->workSheet->rangeToArray($range, null, true, false)); - - $dataValues = array_filter($dataValues); - if ($ruleType == PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) { - rsort($dataValues); - } else { - sort($dataValues); - } - - return array_pop(array_slice($dataValues, 0, $ruleValue)); - } - - /** - * Apply the AutoFilter rules to the AutoFilter Range - * - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter - */ - public function showHideRows() - { - list($rangeStart, $rangeEnd) = PHPExcel_Cell::rangeBoundaries($this->range); - - // The heading row should always be visible -// echo 'AutoFilter Heading Row ', $rangeStart[1],' is always SHOWN',PHP_EOL; - $this->workSheet->getRowDimension($rangeStart[1])->setVisible(true); - - $columnFilterTests = array(); - foreach ($this->columns as $columnID => $filterColumn) { - $rules = $filterColumn->getRules(); - switch ($filterColumn->getFilterType()) { - case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER: - $ruleValues = array(); - // Build a list of the filter value selections - foreach ($rules as $rule) { - $ruleType = $rule->getRuleType(); - $ruleValues[] = $rule->getValue(); - } - // Test if we want to include blanks in our filter criteria - $blanks = false; - $ruleDataSet = array_filter($ruleValues); - if (count($ruleValues) != count($ruleDataSet)) { - $blanks = true; - } - if ($ruleType == PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_FILTER) { - // Filter on absolute values - $columnFilterTests[$columnID] = array( - 'method' => 'filterTestInSimpleDataSet', - 'arguments' => array('filterValues' => $ruleDataSet, 'blanks' => $blanks) - ); - } else { - // Filter on date group values - $arguments = array( - 'date' => array(), - 'time' => array(), - 'dateTime' => array(), - ); - foreach ($ruleDataSet as $ruleValue) { - $date = $time = ''; - if ((isset($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR])) && - ($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR] !== '')) { - $date .= sprintf('%04d', $ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_YEAR]); - } - if ((isset($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH])) && - ($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH] != '')) { - $date .= sprintf('%02d', $ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_MONTH]); - } - if ((isset($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY])) && - ($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY] !== '')) { - $date .= sprintf('%02d', $ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_DAY]); - } - if ((isset($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR])) && - ($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR] !== '')) { - $time .= sprintf('%02d', $ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_HOUR]); - } - if ((isset($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE])) && - ($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE] !== '')) { - $time .= sprintf('%02d', $ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE]); - } - if ((isset($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND])) && - ($ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND] !== '')) { - $time .= sprintf('%02d', $ruleValue[PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP_SECOND]); - } - $dateTime = $date . $time; - $arguments['date'][] = $date; - $arguments['time'][] = $time; - $arguments['dateTime'][] = $dateTime; - } - // Remove empty elements - $arguments['date'] = array_filter($arguments['date']); - $arguments['time'] = array_filter($arguments['time']); - $arguments['dateTime'] = array_filter($arguments['dateTime']); - $columnFilterTests[$columnID] = array( - 'method' => 'filterTestInDateGroupSet', - 'arguments' => array('filterValues' => $arguments, 'blanks' => $blanks) - ); - } - break; - case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER: - $customRuleForBlanks = false; - $ruleValues = array(); - // Build a list of the filter value selections - foreach ($rules as $rule) { - $ruleType = $rule->getRuleType(); - $ruleValue = $rule->getValue(); - if (!is_numeric($ruleValue)) { - // Convert to a regexp allowing for regexp reserved characters, wildcards and escaped wildcards - $ruleValue = preg_quote($ruleValue); - $ruleValue = str_replace(self::$fromReplace, self::$toReplace, $ruleValue); - if (trim($ruleValue) == '') { - $customRuleForBlanks = true; - $ruleValue = trim($ruleValue); - } - } - $ruleValues[] = array('operator' => $rule->getOperator(), 'value' => $ruleValue); - } - $join = $filterColumn->getJoin(); - $columnFilterTests[$columnID] = array( - 'method' => 'filterTestInCustomDataSet', - 'arguments' => array('filterRules' => $ruleValues, 'join' => $join, 'customRuleForBlanks' => $customRuleForBlanks) - ); - break; - case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER: - $ruleValues = array(); - foreach ($rules as $rule) { - // We should only ever have one Dynamic Filter Rule anyway - $dynamicRuleType = $rule->getGrouping(); - if (($dynamicRuleType == PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE) || - ($dynamicRuleType == PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE)) { - // Number (Average) based - // Calculate the average - $averageFormula = '=AVERAGE('.$columnID.($rangeStart[1]+1).':'.$columnID.$rangeEnd[1].')'; - $average = PHPExcel_Calculation::getInstance()->calculateFormula($averageFormula, null, $this->workSheet->getCell('A1')); - // Set above/below rule based on greaterThan or LessTan - $operator = ($dynamicRuleType === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE) - ? PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHAN - : PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHAN; - $ruleValues[] = array('operator' => $operator, - 'value' => $average - ); - $columnFilterTests[$columnID] = array( - 'method' => 'filterTestInCustomDataSet', - 'arguments' => array('filterRules' => $ruleValues, 'join' => PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_OR) - ); - } else { - // Date based - if ($dynamicRuleType{0} == 'M' || $dynamicRuleType{0} == 'Q') { - // Month or Quarter - sscanf($dynamicRuleType, '%[A-Z]%d', $periodType, $period); - if ($periodType == 'M') { - $ruleValues = array($period); - } else { - --$period; - $periodEnd = (1+$period)*3; - $periodStart = 1+$period*3; - $ruleValues = range($periodStart, $periodEnd); - } - $columnFilterTests[$columnID] = array( - 'method' => 'filterTestInPeriodDateSet', - 'arguments' => $ruleValues - ); - $filterColumn->setAttributes(array()); - } else { - // Date Range - $columnFilterTests[$columnID] = $this->dynamicFilterDateRange($dynamicRuleType, $filterColumn); - break; - } - } - } - break; - case PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER: - $ruleValues = array(); - $dataRowCount = $rangeEnd[1] - $rangeStart[1]; - foreach ($rules as $rule) { - // We should only ever have one Dynamic Filter Rule anyway - $toptenRuleType = $rule->getGrouping(); - $ruleValue = $rule->getValue(); - $ruleOperator = $rule->getOperator(); - } - if ($ruleOperator === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) { - $ruleValue = floor($ruleValue * ($dataRowCount / 100)); - } - if ($ruleValue < 1) { - $ruleValue = 1; - } - if ($ruleValue > 500) { - $ruleValue = 500; - } - - $maxVal = $this->calculateTopTenValue($columnID, $rangeStart[1]+1, $rangeEnd[1], $toptenRuleType, $ruleValue); - - $operator = ($toptenRuleType == PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) - ? PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL - : PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL; - $ruleValues[] = array('operator' => $operator, 'value' => $maxVal); - $columnFilterTests[$columnID] = array( - 'method' => 'filterTestInCustomDataSet', - 'arguments' => array('filterRules' => $ruleValues, 'join' => PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_OR) - ); - $filterColumn->setAttributes(array('maxVal' => $maxVal)); - break; - } - } - -// echo 'Column Filter Test CRITERIA',PHP_EOL; -// var_dump($columnFilterTests); -// - // Execute the column tests for each row in the autoFilter range to determine show/hide, - for ($row = $rangeStart[1]+1; $row <= $rangeEnd[1]; ++$row) { -// echo 'Testing Row = ', $row,PHP_EOL; - $result = true; - foreach ($columnFilterTests as $columnID => $columnFilterTest) { -// echo 'Testing cell ', $columnID.$row,PHP_EOL; - $cellValue = $this->workSheet->getCell($columnID.$row)->getCalculatedValue(); -// echo 'Value is ', $cellValue,PHP_EOL; - // Execute the filter test - $result = $result && - call_user_func_array( - array('PHPExcel_Worksheet_AutoFilter', $columnFilterTest['method']), - array($cellValue, $columnFilterTest['arguments']) - ); -// echo (($result) ? 'VALID' : 'INVALID'),PHP_EOL; - // If filter test has resulted in FALSE, exit the loop straightaway rather than running any more tests - if (!$result) { - break; - } - } - // Set show/hide for the row based on the result of the autoFilter result -// echo (($result) ? 'SHOW' : 'HIDE'),PHP_EOL; - $this->workSheet->getRowDimension($row)->setVisible($result); - } - - return $this; - } - - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - if ($key == 'workSheet') { - // Detach from worksheet - $this->{$key} = null; - } else { - $this->{$key} = clone $value; - } - } elseif ((is_array($value)) && ($key == 'columns')) { - // The columns array of PHPExcel_Worksheet_AutoFilter objects - $this->{$key} = array(); - foreach ($value as $k => $v) { - $this->{$key}[$k] = clone $v; - // attach the new cloned Column to this new cloned Autofilter object - $this->{$key}[$k]->setParent($this); - } - } else { - $this->{$key} = $value; - } - } - } - - /** - * toString method replicates previous behavior by returning the range if object is - * referenced as a property of its parent. - */ - public function __toString() - { - return (string) $this->range; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter/Column.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter/Column.php deleted file mode 100644 index d64fd81..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter/Column.php +++ /dev/null @@ -1,405 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_AutoFilter_Column - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_AutoFilter_Column -{ - const AUTOFILTER_FILTERTYPE_FILTER = 'filters'; - const AUTOFILTER_FILTERTYPE_CUSTOMFILTER = 'customFilters'; - // Supports no more than 2 rules, with an And/Or join criteria - // if more than 1 rule is defined - const AUTOFILTER_FILTERTYPE_DYNAMICFILTER = 'dynamicFilter'; - // Even though the filter rule is constant, the filtered data can vary - // e.g. filtered by date = TODAY - const AUTOFILTER_FILTERTYPE_TOPTENFILTER = 'top10'; - - /** - * Types of autofilter rules - * - * @var string[] - */ - private static $filterTypes = array( - // Currently we're not handling - // colorFilter - // extLst - // iconFilter - self::AUTOFILTER_FILTERTYPE_FILTER, - self::AUTOFILTER_FILTERTYPE_CUSTOMFILTER, - self::AUTOFILTER_FILTERTYPE_DYNAMICFILTER, - self::AUTOFILTER_FILTERTYPE_TOPTENFILTER, - ); - - /* Multiple Rule Connections */ - const AUTOFILTER_COLUMN_JOIN_AND = 'and'; - const AUTOFILTER_COLUMN_JOIN_OR = 'or'; - - /** - * Join options for autofilter rules - * - * @var string[] - */ - private static $ruleJoins = array( - self::AUTOFILTER_COLUMN_JOIN_AND, - self::AUTOFILTER_COLUMN_JOIN_OR, - ); - - /** - * Autofilter - * - * @var PHPExcel_Worksheet_AutoFilter - */ - private $parent; - - - /** - * Autofilter Column Index - * - * @var string - */ - private $columnIndex = ''; - - - /** - * Autofilter Column Filter Type - * - * @var string - */ - private $filterType = self::AUTOFILTER_FILTERTYPE_FILTER; - - - /** - * Autofilter Multiple Rules And/Or - * - * @var string - */ - private $join = self::AUTOFILTER_COLUMN_JOIN_OR; - - - /** - * Autofilter Column Rules - * - * @var array of PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - private $ruleset = array(); - - - /** - * Autofilter Column Dynamic Attributes - * - * @var array of mixed - */ - private $attributes = array(); - - - /** - * Create a new PHPExcel_Worksheet_AutoFilter_Column - * - * @param string $pColumn Column (e.g. A) - * @param PHPExcel_Worksheet_AutoFilter $pParent Autofilter for this column - */ - public function __construct($pColumn, PHPExcel_Worksheet_AutoFilter $pParent = null) - { - $this->columnIndex = $pColumn; - $this->parent = $pParent; - } - - /** - * Get AutoFilter Column Index - * - * @return string - */ - public function getColumnIndex() - { - return $this->columnIndex; - } - - /** - * Set AutoFilter Column Index - * - * @param string $pColumn Column (e.g. A) - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function setColumnIndex($pColumn) - { - // Uppercase coordinate - $pColumn = strtoupper($pColumn); - if ($this->parent !== null) { - $this->parent->testColumnInRange($pColumn); - } - - $this->columnIndex = $pColumn; - - return $this; - } - - /** - * Get this Column's AutoFilter Parent - * - * @return PHPExcel_Worksheet_AutoFilter - */ - public function getParent() - { - return $this->parent; - } - - /** - * Set this Column's AutoFilter Parent - * - * @param PHPExcel_Worksheet_AutoFilter - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function setParent(PHPExcel_Worksheet_AutoFilter $pParent = null) - { - $this->parent = $pParent; - - return $this; - } - - /** - * Get AutoFilter Type - * - * @return string - */ - public function getFilterType() - { - return $this->filterType; - } - - /** - * Set AutoFilter Type - * - * @param string $pFilterType - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function setFilterType($pFilterType = self::AUTOFILTER_FILTERTYPE_FILTER) - { - if (!in_array($pFilterType, self::$filterTypes)) { - throw new PHPExcel_Exception('Invalid filter type for column AutoFilter.'); - } - - $this->filterType = $pFilterType; - - return $this; - } - - /** - * Get AutoFilter Multiple Rules And/Or Join - * - * @return string - */ - public function getJoin() - { - return $this->join; - } - - /** - * Set AutoFilter Multiple Rules And/Or - * - * @param string $pJoin And/Or - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function setJoin($pJoin = self::AUTOFILTER_COLUMN_JOIN_OR) - { - // Lowercase And/Or - $pJoin = strtolower($pJoin); - if (!in_array($pJoin, self::$ruleJoins)) { - throw new PHPExcel_Exception('Invalid rule connection for column AutoFilter.'); - } - - $this->join = $pJoin; - - return $this; - } - - /** - * Set AutoFilter Attributes - * - * @param string[] $pAttributes - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function setAttributes($pAttributes = array()) - { - $this->attributes = $pAttributes; - - return $this; - } - - /** - * Set An AutoFilter Attribute - * - * @param string $pName Attribute Name - * @param string $pValue Attribute Value - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function setAttribute($pName, $pValue) - { - $this->attributes[$pName] = $pValue; - - return $this; - } - - /** - * Get AutoFilter Column Attributes - * - * @return string - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Get specific AutoFilter Column Attribute - * - * @param string $pName Attribute Name - * @return string - */ - public function getAttribute($pName) - { - if (isset($this->attributes[$pName])) { - return $this->attributes[$pName]; - } - return null; - } - - /** - * Get all AutoFilter Column Rules - * - * @throws PHPExcel_Exception - * @return array of PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function getRules() - { - return $this->ruleset; - } - - /** - * Get a specified AutoFilter Column Rule - * - * @param integer $pIndex Rule index in the ruleset array - * @return PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function getRule($pIndex) - { - if (!isset($this->ruleset[$pIndex])) { - $this->ruleset[$pIndex] = new PHPExcel_Worksheet_AutoFilter_Column_Rule($this); - } - return $this->ruleset[$pIndex]; - } - - /** - * Create a new AutoFilter Column Rule in the ruleset - * - * @return PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function createRule() - { - $this->ruleset[] = new PHPExcel_Worksheet_AutoFilter_Column_Rule($this); - - return end($this->ruleset); - } - - /** - * Add a new AutoFilter Column Rule to the ruleset - * - * @param PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule - * @param boolean $returnRule Flag indicating whether the rule object or the column object should be returned - * @return PHPExcel_Worksheet_AutoFilter_Column|PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function addRule(PHPExcel_Worksheet_AutoFilter_Column_Rule $pRule, $returnRule = true) - { - $pRule->setParent($this); - $this->ruleset[] = $pRule; - - return ($returnRule) ? $pRule : $this; - } - - /** - * Delete a specified AutoFilter Column Rule - * If the number of rules is reduced to 1, then we reset And/Or logic to Or - * - * @param integer $pIndex Rule index in the ruleset array - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function deleteRule($pIndex) - { - if (isset($this->ruleset[$pIndex])) { - unset($this->ruleset[$pIndex]); - // If we've just deleted down to a single rule, then reset And/Or joining to Or - if (count($this->ruleset) <= 1) { - $this->setJoin(self::AUTOFILTER_COLUMN_JOIN_OR); - } - } - - return $this; - } - - /** - * Delete all AutoFilter Column Rules - * - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function clearRules() - { - $this->ruleset = array(); - $this->setJoin(self::AUTOFILTER_COLUMN_JOIN_OR); - - return $this; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - if ($key == 'parent') { - // Detach from autofilter parent - $this->$key = null; - } else { - $this->$key = clone $value; - } - } elseif ((is_array($value)) && ($key == 'ruleset')) { - // The columns array of PHPExcel_Worksheet_AutoFilter objects - $this->$key = array(); - foreach ($value as $k => $v) { - $this->$key[$k] = clone $v; - // attach the new cloned Rule to this new cloned Autofilter Cloned object - $this->$key[$k]->setParent($this); - } - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter/Column/Rule.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter/Column/Rule.php deleted file mode 100644 index 39ad18b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/AutoFilter/Column/Rule.php +++ /dev/null @@ -1,468 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_AutoFilter_Column_Rule - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_AutoFilter_Column_Rule -{ - const AUTOFILTER_RULETYPE_FILTER = 'filter'; - const AUTOFILTER_RULETYPE_DATEGROUP = 'dateGroupItem'; - const AUTOFILTER_RULETYPE_CUSTOMFILTER = 'customFilter'; - const AUTOFILTER_RULETYPE_DYNAMICFILTER = 'dynamicFilter'; - const AUTOFILTER_RULETYPE_TOPTENFILTER = 'top10Filter'; - - private static $ruleTypes = array( - // Currently we're not handling - // colorFilter - // extLst - // iconFilter - self::AUTOFILTER_RULETYPE_FILTER, - self::AUTOFILTER_RULETYPE_DATEGROUP, - self::AUTOFILTER_RULETYPE_CUSTOMFILTER, - self::AUTOFILTER_RULETYPE_DYNAMICFILTER, - self::AUTOFILTER_RULETYPE_TOPTENFILTER, - ); - - const AUTOFILTER_RULETYPE_DATEGROUP_YEAR = 'year'; - const AUTOFILTER_RULETYPE_DATEGROUP_MONTH = 'month'; - const AUTOFILTER_RULETYPE_DATEGROUP_DAY = 'day'; - const AUTOFILTER_RULETYPE_DATEGROUP_HOUR = 'hour'; - const AUTOFILTER_RULETYPE_DATEGROUP_MINUTE = 'minute'; - const AUTOFILTER_RULETYPE_DATEGROUP_SECOND = 'second'; - - private static $dateTimeGroups = array( - self::AUTOFILTER_RULETYPE_DATEGROUP_YEAR, - self::AUTOFILTER_RULETYPE_DATEGROUP_MONTH, - self::AUTOFILTER_RULETYPE_DATEGROUP_DAY, - self::AUTOFILTER_RULETYPE_DATEGROUP_HOUR, - self::AUTOFILTER_RULETYPE_DATEGROUP_MINUTE, - self::AUTOFILTER_RULETYPE_DATEGROUP_SECOND, - ); - - const AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY = 'yesterday'; - const AUTOFILTER_RULETYPE_DYNAMIC_TODAY = 'today'; - const AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW = 'tomorrow'; - const AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE = 'yearToDate'; - const AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR = 'thisYear'; - const AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER = 'thisQuarter'; - const AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH = 'thisMonth'; - const AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK = 'thisWeek'; - const AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR = 'lastYear'; - const AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER = 'lastQuarter'; - const AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH = 'lastMonth'; - const AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK = 'lastWeek'; - const AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR = 'nextYear'; - const AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER = 'nextQuarter'; - const AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH = 'nextMonth'; - const AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK = 'nextWeek'; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1 = 'M1'; - const AUTOFILTER_RULETYPE_DYNAMIC_JANUARY = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2 = 'M2'; - const AUTOFILTER_RULETYPE_DYNAMIC_FEBRUARY = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3 = 'M3'; - const AUTOFILTER_RULETYPE_DYNAMIC_MARCH = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4 = 'M4'; - const AUTOFILTER_RULETYPE_DYNAMIC_APRIL = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5 = 'M5'; - const AUTOFILTER_RULETYPE_DYNAMIC_MAY = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6 = 'M6'; - const AUTOFILTER_RULETYPE_DYNAMIC_JUNE = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7 = 'M7'; - const AUTOFILTER_RULETYPE_DYNAMIC_JULY = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8 = 'M8'; - const AUTOFILTER_RULETYPE_DYNAMIC_AUGUST = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9 = 'M9'; - const AUTOFILTER_RULETYPE_DYNAMIC_SEPTEMBER = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10 = 'M10'; - const AUTOFILTER_RULETYPE_DYNAMIC_OCTOBER = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11 = 'M11'; - const AUTOFILTER_RULETYPE_DYNAMIC_NOVEMBER = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11; - const AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12 = 'M12'; - const AUTOFILTER_RULETYPE_DYNAMIC_DECEMBER = self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12; - const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1 = 'Q1'; - const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2 = 'Q2'; - const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3 = 'Q3'; - const AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4 = 'Q4'; - const AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE = 'aboveAverage'; - const AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE = 'belowAverage'; - - private static $dynamicTypes = array( - self::AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY, - self::AUTOFILTER_RULETYPE_DYNAMIC_TODAY, - self::AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW, - self::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE, - self::AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR, - self::AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER, - self::AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH, - self::AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK, - self::AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR, - self::AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER, - self::AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH, - self::AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK, - self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR, - self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER, - self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH, - self::AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11, - self::AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12, - self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1, - self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2, - self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3, - self::AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4, - self::AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE, - self::AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE, - ); - - /* - * The only valid filter rule operators for filter and customFilter types are: - * <xsd:enumeration value="equal"/> - * <xsd:enumeration value="lessThan"/> - * <xsd:enumeration value="lessThanOrEqual"/> - * <xsd:enumeration value="notEqual"/> - * <xsd:enumeration value="greaterThanOrEqual"/> - * <xsd:enumeration value="greaterThan"/> - */ - const AUTOFILTER_COLUMN_RULE_EQUAL = 'equal'; - const AUTOFILTER_COLUMN_RULE_NOTEQUAL = 'notEqual'; - const AUTOFILTER_COLUMN_RULE_GREATERTHAN = 'greaterThan'; - const AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL = 'greaterThanOrEqual'; - const AUTOFILTER_COLUMN_RULE_LESSTHAN = 'lessThan'; - const AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL = 'lessThanOrEqual'; - - private static $operators = array( - self::AUTOFILTER_COLUMN_RULE_EQUAL, - self::AUTOFILTER_COLUMN_RULE_NOTEQUAL, - self::AUTOFILTER_COLUMN_RULE_GREATERTHAN, - self::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, - self::AUTOFILTER_COLUMN_RULE_LESSTHAN, - self::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, - ); - - const AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE = 'byValue'; - const AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT = 'byPercent'; - - private static $topTenValue = array( - self::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, - self::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT, - ); - - const AUTOFILTER_COLUMN_RULE_TOPTEN_TOP = 'top'; - const AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM = 'bottom'; - - private static $topTenType = array( - self::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP, - self::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM, - ); - - - /* Rule Operators (Numeric, Boolean etc) */ -// const AUTOFILTER_COLUMN_RULE_BETWEEN = 'between'; // greaterThanOrEqual 1 && lessThanOrEqual 2 - /* Rule Operators (Numeric Special) which are translated to standard numeric operators with calculated values */ -// const AUTOFILTER_COLUMN_RULE_TOPTEN = 'topTen'; // greaterThan calculated value -// const AUTOFILTER_COLUMN_RULE_TOPTENPERCENT = 'topTenPercent'; // greaterThan calculated value -// const AUTOFILTER_COLUMN_RULE_ABOVEAVERAGE = 'aboveAverage'; // Value is calculated as the average -// const AUTOFILTER_COLUMN_RULE_BELOWAVERAGE = 'belowAverage'; // Value is calculated as the average - /* Rule Operators (String) which are set as wild-carded values */ -// const AUTOFILTER_COLUMN_RULE_BEGINSWITH = 'beginsWith'; // A* -// const AUTOFILTER_COLUMN_RULE_ENDSWITH = 'endsWith'; // *Z -// const AUTOFILTER_COLUMN_RULE_CONTAINS = 'contains'; // *B* -// const AUTOFILTER_COLUMN_RULE_DOESNTCONTAIN = 'notEqual'; // notEqual *B* - /* Rule Operators (Date Special) which are translated to standard numeric operators with calculated values */ -// const AUTOFILTER_COLUMN_RULE_BEFORE = 'lessThan'; -// const AUTOFILTER_COLUMN_RULE_AFTER = 'greaterThan'; -// const AUTOFILTER_COLUMN_RULE_YESTERDAY = 'yesterday'; -// const AUTOFILTER_COLUMN_RULE_TODAY = 'today'; -// const AUTOFILTER_COLUMN_RULE_TOMORROW = 'tomorrow'; -// const AUTOFILTER_COLUMN_RULE_LASTWEEK = 'lastWeek'; -// const AUTOFILTER_COLUMN_RULE_THISWEEK = 'thisWeek'; -// const AUTOFILTER_COLUMN_RULE_NEXTWEEK = 'nextWeek'; -// const AUTOFILTER_COLUMN_RULE_LASTMONTH = 'lastMonth'; -// const AUTOFILTER_COLUMN_RULE_THISMONTH = 'thisMonth'; -// const AUTOFILTER_COLUMN_RULE_NEXTMONTH = 'nextMonth'; -// const AUTOFILTER_COLUMN_RULE_LASTQUARTER = 'lastQuarter'; -// const AUTOFILTER_COLUMN_RULE_THISQUARTER = 'thisQuarter'; -// const AUTOFILTER_COLUMN_RULE_NEXTQUARTER = 'nextQuarter'; -// const AUTOFILTER_COLUMN_RULE_LASTYEAR = 'lastYear'; -// const AUTOFILTER_COLUMN_RULE_THISYEAR = 'thisYear'; -// const AUTOFILTER_COLUMN_RULE_NEXTYEAR = 'nextYear'; -// const AUTOFILTER_COLUMN_RULE_YEARTODATE = 'yearToDate'; // <dynamicFilter val="40909" type="yearToDate" maxVal="41113"/> -// const AUTOFILTER_COLUMN_RULE_ALLDATESINMONTH = 'allDatesInMonth'; // <dynamicFilter type="M2"/> for Month/February -// const AUTOFILTER_COLUMN_RULE_ALLDATESINQUARTER = 'allDatesInQuarter'; // <dynamicFilter type="Q2"/> for Quarter 2 - - /** - * Autofilter Column - * - * @var PHPExcel_Worksheet_AutoFilter_Column - */ - private $parent = null; - - - /** - * Autofilter Rule Type - * - * @var string - */ - private $ruleType = self::AUTOFILTER_RULETYPE_FILTER; - - - /** - * Autofilter Rule Value - * - * @var string - */ - private $value = ''; - - /** - * Autofilter Rule Operator - * - * @var string - */ - private $operator = self::AUTOFILTER_COLUMN_RULE_EQUAL; - - /** - * DateTimeGrouping Group Value - * - * @var string - */ - private $grouping = ''; - - - /** - * Create a new PHPExcel_Worksheet_AutoFilter_Column_Rule - * - * @param PHPExcel_Worksheet_AutoFilter_Column $pParent - */ - public function __construct(PHPExcel_Worksheet_AutoFilter_Column $pParent = null) - { - $this->parent = $pParent; - } - - /** - * Get AutoFilter Rule Type - * - * @return string - */ - public function getRuleType() - { - return $this->ruleType; - } - - /** - * Set AutoFilter Rule Type - * - * @param string $pRuleType - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function setRuleType($pRuleType = self::AUTOFILTER_RULETYPE_FILTER) - { - if (!in_array($pRuleType, self::$ruleTypes)) { - throw new PHPExcel_Exception('Invalid rule type for column AutoFilter Rule.'); - } - - $this->ruleType = $pRuleType; - - return $this; - } - - /** - * Get AutoFilter Rule Value - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Set AutoFilter Rule Value - * - * @param string|string[] $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function setValue($pValue = '') - { - if (is_array($pValue)) { - $grouping = -1; - foreach ($pValue as $key => $value) { - // Validate array entries - if (!in_array($key, self::$dateTimeGroups)) { - // Remove any invalid entries from the value array - unset($pValue[$key]); - } else { - // Work out what the dateTime grouping will be - $grouping = max($grouping, array_search($key, self::$dateTimeGroups)); - } - } - if (count($pValue) == 0) { - throw new PHPExcel_Exception('Invalid rule value for column AutoFilter Rule.'); - } - // Set the dateTime grouping that we've anticipated - $this->setGrouping(self::$dateTimeGroups[$grouping]); - } - $this->value = $pValue; - - return $this; - } - - /** - * Get AutoFilter Rule Operator - * - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Set AutoFilter Rule Operator - * - * @param string $pOperator - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function setOperator($pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL) - { - if (empty($pOperator)) { - $pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL; - } - if ((!in_array($pOperator, self::$operators)) && - (!in_array($pOperator, self::$topTenValue))) { - throw new PHPExcel_Exception('Invalid operator for column AutoFilter Rule.'); - } - $this->operator = $pOperator; - - return $this; - } - - /** - * Get AutoFilter Rule Grouping - * - * @return string - */ - public function getGrouping() - { - return $this->grouping; - } - - /** - * Set AutoFilter Rule Grouping - * - * @param string $pGrouping - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function setGrouping($pGrouping = null) - { - if (($pGrouping !== null) && - (!in_array($pGrouping, self::$dateTimeGroups)) && - (!in_array($pGrouping, self::$dynamicTypes)) && - (!in_array($pGrouping, self::$topTenType))) { - throw new PHPExcel_Exception('Invalid rule type for column AutoFilter Rule.'); - } - $this->grouping = $pGrouping; - - return $this; - } - - /** - * Set AutoFilter Rule - * - * @param string $pOperator - * @param string|string[] $pValue - * @param string $pGrouping - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function setRule($pOperator = self::AUTOFILTER_COLUMN_RULE_EQUAL, $pValue = '', $pGrouping = null) - { - $this->setOperator($pOperator); - $this->setValue($pValue); - // Only set grouping if it's been passed in as a user-supplied argument, - // otherwise we're calculating it when we setValue() and don't want to overwrite that - // If the user supplies an argumnet for grouping, then on their own head be it - if ($pGrouping !== null) { - $this->setGrouping($pGrouping); - } - - return $this; - } - - /** - * Get this Rule's AutoFilter Column Parent - * - * @return PHPExcel_Worksheet_AutoFilter_Column - */ - public function getParent() - { - return $this->parent; - } - - /** - * Set this Rule's AutoFilter Column Parent - * - * @param PHPExcel_Worksheet_AutoFilter_Column - * @return PHPExcel_Worksheet_AutoFilter_Column_Rule - */ - public function setParent(PHPExcel_Worksheet_AutoFilter_Column $pParent = null) - { - $this->parent = $pParent; - - return $this; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - if ($key == 'parent') { - // Detach from autofilter column parent - $this->$key = null; - } else { - $this->$key = clone $value; - } - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/BaseDrawing.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/BaseDrawing.php deleted file mode 100644 index 9ad15c7..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/BaseDrawing.php +++ /dev/null @@ -1,507 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_BaseDrawing - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable -{ - /** - * Image counter - * - * @var int - */ - private static $imageCounter = 0; - - /** - * Image index - * - * @var int - */ - private $imageIndex = 0; - - /** - * Name - * - * @var string - */ - protected $name; - - /** - * Description - * - * @var string - */ - protected $description; - - /** - * Worksheet - * - * @var PHPExcel_Worksheet - */ - protected $worksheet; - - /** - * Coordinates - * - * @var string - */ - protected $coordinates; - - /** - * Offset X - * - * @var int - */ - protected $offsetX; - - /** - * Offset Y - * - * @var int - */ - protected $offsetY; - - /** - * Width - * - * @var int - */ - protected $width; - - /** - * Height - * - * @var int - */ - protected $height; - - /** - * Proportional resize - * - * @var boolean - */ - protected $resizeProportional; - - /** - * Rotation - * - * @var int - */ - protected $rotation; - - /** - * Shadow - * - * @var PHPExcel_Worksheet_Drawing_Shadow - */ - protected $shadow; - - /** - * Create a new PHPExcel_Worksheet_BaseDrawing - */ - public function __construct() - { - // Initialise values - $this->name = ''; - $this->description = ''; - $this->worksheet = null; - $this->coordinates = 'A1'; - $this->offsetX = 0; - $this->offsetY = 0; - $this->width = 0; - $this->height = 0; - $this->resizeProportional = true; - $this->rotation = 0; - $this->shadow = new PHPExcel_Worksheet_Drawing_Shadow(); - - // Set image index - self::$imageCounter++; - $this->imageIndex = self::$imageCounter; - } - - /** - * Get image index - * - * @return int - */ - public function getImageIndex() - { - return $this->imageIndex; - } - - /** - * Get Name - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Set Name - * - * @param string $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setName($pValue = '') - { - $this->name = $pValue; - return $this; - } - - /** - * Get Description - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Set Description - * - * @param string $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setDescription($pValue = '') - { - $this->description = $pValue; - return $this; - } - - /** - * Get Worksheet - * - * @return PHPExcel_Worksheet - */ - public function getWorksheet() - { - return $this->worksheet; - } - - /** - * Set Worksheet - * - * @param PHPExcel_Worksheet $pValue - * @param bool $pOverrideOld If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet? - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setWorksheet(PHPExcel_Worksheet $pValue = null, $pOverrideOld = false) - { - if (is_null($this->worksheet)) { - // Add drawing to PHPExcel_Worksheet - $this->worksheet = $pValue; - $this->worksheet->getCell($this->coordinates); - $this->worksheet->getDrawingCollection()->append($this); - } else { - if ($pOverrideOld) { - // Remove drawing from old PHPExcel_Worksheet - $iterator = $this->worksheet->getDrawingCollection()->getIterator(); - - while ($iterator->valid()) { - if ($iterator->current()->getHashCode() == $this->getHashCode()) { - $this->worksheet->getDrawingCollection()->offsetUnset($iterator->key()); - $this->worksheet = null; - break; - } - } - - // Set new PHPExcel_Worksheet - $this->setWorksheet($pValue); - } else { - throw new PHPExcel_Exception("A PHPExcel_Worksheet has already been assigned. Drawings can only exist on one PHPExcel_Worksheet."); - } - } - return $this; - } - - /** - * Get Coordinates - * - * @return string - */ - public function getCoordinates() - { - return $this->coordinates; - } - - /** - * Set Coordinates - * - * @param string $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setCoordinates($pValue = 'A1') - { - $this->coordinates = $pValue; - return $this; - } - - /** - * Get OffsetX - * - * @return int - */ - public function getOffsetX() - { - return $this->offsetX; - } - - /** - * Set OffsetX - * - * @param int $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setOffsetX($pValue = 0) - { - $this->offsetX = $pValue; - return $this; - } - - /** - * Get OffsetY - * - * @return int - */ - public function getOffsetY() - { - return $this->offsetY; - } - - /** - * Set OffsetY - * - * @param int $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setOffsetY($pValue = 0) - { - $this->offsetY = $pValue; - return $this; - } - - /** - * Get Width - * - * @return int - */ - public function getWidth() - { - return $this->width; - } - - /** - * Set Width - * - * @param int $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setWidth($pValue = 0) - { - // Resize proportional? - if ($this->resizeProportional && $pValue != 0) { - $ratio = $this->height / ($this->width != 0 ? $this->width : 1); - $this->height = round($ratio * $pValue); - } - - // Set width - $this->width = $pValue; - - return $this; - } - - /** - * Get Height - * - * @return int - */ - public function getHeight() - { - return $this->height; - } - - /** - * Set Height - * - * @param int $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setHeight($pValue = 0) - { - // Resize proportional? - if ($this->resizeProportional && $pValue != 0) { - $ratio = $this->width / ($this->height != 0 ? $this->height : 1); - $this->width = round($ratio * $pValue); - } - - // Set height - $this->height = $pValue; - - return $this; - } - - /** - * Set width and height with proportional resize - * Example: - * <code> - * $objDrawing->setResizeProportional(true); - * $objDrawing->setWidthAndHeight(160,120); - * </code> - * - * @author Vincent@luo MSN:kele_100@hotmail.com - * @param int $width - * @param int $height - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setWidthAndHeight($width = 0, $height = 0) - { - $xratio = $width / ($this->width != 0 ? $this->width : 1); - $yratio = $height / ($this->height != 0 ? $this->height : 1); - if ($this->resizeProportional && !($width == 0 || $height == 0)) { - if (($xratio * $this->height) < $height) { - $this->height = ceil($xratio * $this->height); - $this->width = $width; - } else { - $this->width = ceil($yratio * $this->width); - $this->height = $height; - } - } else { - $this->width = $width; - $this->height = $height; - } - - return $this; - } - - /** - * Get ResizeProportional - * - * @return boolean - */ - public function getResizeProportional() - { - return $this->resizeProportional; - } - - /** - * Set ResizeProportional - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setResizeProportional($pValue = true) - { - $this->resizeProportional = $pValue; - return $this; - } - - /** - * Get Rotation - * - * @return int - */ - public function getRotation() - { - return $this->rotation; - } - - /** - * Set Rotation - * - * @param int $pValue - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setRotation($pValue = 0) - { - $this->rotation = $pValue; - return $this; - } - - /** - * Get Shadow - * - * @return PHPExcel_Worksheet_Drawing_Shadow - */ - public function getShadow() - { - return $this->shadow; - } - - /** - * Set Shadow - * - * @param PHPExcel_Worksheet_Drawing_Shadow $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_BaseDrawing - */ - public function setShadow(PHPExcel_Worksheet_Drawing_Shadow $pValue = null) - { - $this->shadow = $pValue; - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->name . - $this->description . - $this->worksheet->getHashCode() . - $this->coordinates . - $this->offsetX . - $this->offsetY . - $this->width . - $this->height . - $this->rotation . - $this->shadow->getHashCode() . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/CellIterator.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/CellIterator.php deleted file mode 100644 index 53cf7bf..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/CellIterator.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_CellIterator - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -abstract class PHPExcel_Worksheet_CellIterator -{ - /** - * PHPExcel_Worksheet to iterate - * - * @var PHPExcel_Worksheet - */ - protected $subject; - - /** - * Current iterator position - * - * @var mixed - */ - protected $position = null; - - /** - * Iterate only existing cells - * - * @var boolean - */ - protected $onlyExistingCells = false; - - /** - * Destructor - */ - public function __destruct() - { - unset($this->subject); - } - - /** - * Get loop only existing cells - * - * @return boolean - */ - public function getIterateOnlyExistingCells() - { - return $this->onlyExistingCells; - } - - /** - * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary - * - * @throws PHPExcel_Exception - */ - abstract protected function adjustForExistingOnlyRange(); - - /** - * Set the iterator to loop only existing cells - * - * @param boolean $value - * @throws PHPExcel_Exception - */ - public function setIterateOnlyExistingCells($value = true) - { - $this->onlyExistingCells = (boolean) $value; - - $this->adjustForExistingOnlyRange(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Column.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Column.php deleted file mode 100644 index 6d3f36d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Column.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_Column - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_Column -{ - /** - * PHPExcel_Worksheet - * - * @var PHPExcel_Worksheet - */ - private $parent; - - /** - * Column index - * - * @var string - */ - private $columnIndex; - - /** - * Create a new column - * - * @param PHPExcel_Worksheet $parent - * @param string $columnIndex - */ - public function __construct(PHPExcel_Worksheet $parent = null, $columnIndex = 'A') - { - // Set parent and column index - $this->parent = $parent; - $this->columnIndex = $columnIndex; - } - - /** - * Destructor - */ - public function __destruct() - { - unset($this->parent); - } - - /** - * Get column index - * - * @return string - */ - public function getColumnIndex() - { - return $this->columnIndex; - } - - /** - * Get cell iterator - * - * @param integer $startRow The row number at which to start iterating - * @param integer $endRow Optionally, the row number at which to stop iterating - * @return PHPExcel_Worksheet_CellIterator - */ - public function getCellIterator($startRow = 1, $endRow = null) - { - return new PHPExcel_Worksheet_ColumnCellIterator($this->parent, $this->columnIndex, $startRow, $endRow); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnCellIterator.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnCellIterator.php deleted file mode 100644 index 7b8c219..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnCellIterator.php +++ /dev/null @@ -1,216 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_ColumnCellIterator - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_ColumnCellIterator extends PHPExcel_Worksheet_CellIterator implements Iterator -{ - /** - * Column index - * - * @var string - */ - protected $columnIndex; - - /** - * Start position - * - * @var int - */ - protected $startRow = 1; - - /** - * End position - * - * @var int - */ - protected $endRow = 1; - - /** - * Create a new row iterator - * - * @param PHPExcel_Worksheet $subject The worksheet to iterate over - * @param string $columnIndex The column that we want to iterate - * @param integer $startRow The row number at which to start iterating - * @param integer $endRow Optionally, the row number at which to stop iterating - */ - public function __construct(PHPExcel_Worksheet $subject = null, $columnIndex = 'A', $startRow = 1, $endRow = null) - { - // Set subject - $this->subject = $subject; - $this->columnIndex = PHPExcel_Cell::columnIndexFromString($columnIndex) - 1; - $this->resetEnd($endRow); - $this->resetStart($startRow); - } - - /** - * Destructor - */ - public function __destruct() - { - unset($this->subject); - } - - /** - * (Re)Set the start row and the current row pointer - * - * @param integer $startRow The row number at which to start iterating - * @return PHPExcel_Worksheet_ColumnCellIterator - * @throws PHPExcel_Exception - */ - public function resetStart($startRow = 1) - { - $this->startRow = $startRow; - $this->adjustForExistingOnlyRange(); - $this->seek($startRow); - - return $this; - } - - /** - * (Re)Set the end row - * - * @param integer $endRow The row number at which to stop iterating - * @return PHPExcel_Worksheet_ColumnCellIterator - * @throws PHPExcel_Exception - */ - public function resetEnd($endRow = null) - { - $this->endRow = ($endRow) ? $endRow : $this->subject->getHighestRow(); - $this->adjustForExistingOnlyRange(); - - return $this; - } - - /** - * Set the row pointer to the selected row - * - * @param integer $row The row number to set the current pointer at - * @return PHPExcel_Worksheet_ColumnCellIterator - * @throws PHPExcel_Exception - */ - public function seek($row = 1) - { - if (($row < $this->startRow) || ($row > $this->endRow)) { - throw new PHPExcel_Exception("Row $row is out of range ({$this->startRow} - {$this->endRow})"); - } elseif ($this->onlyExistingCells && !($this->subject->cellExistsByColumnAndRow($this->columnIndex, $row))) { - throw new PHPExcel_Exception('In "IterateOnlyExistingCells" mode and Cell does not exist'); - } - $this->position = $row; - - return $this; - } - - /** - * Rewind the iterator to the starting row - */ - public function rewind() - { - $this->position = $this->startRow; - } - - /** - * Return the current cell in this worksheet column - * - * @return PHPExcel_Worksheet_Row - */ - public function current() - { - return $this->subject->getCellByColumnAndRow($this->columnIndex, $this->position); - } - - /** - * Return the current iterator key - * - * @return int - */ - public function key() - { - return $this->position; - } - - /** - * Set the iterator to its next value - */ - public function next() - { - do { - ++$this->position; - } while (($this->onlyExistingCells) && - (!$this->subject->cellExistsByColumnAndRow($this->columnIndex, $this->position)) && - ($this->position <= $this->endRow)); - } - - /** - * Set the iterator to its previous value - */ - public function prev() - { - if ($this->position <= $this->startRow) { - throw new PHPExcel_Exception("Row is already at the beginning of range ({$this->startRow} - {$this->endRow})"); - } - - do { - --$this->position; - } while (($this->onlyExistingCells) && - (!$this->subject->cellExistsByColumnAndRow($this->columnIndex, $this->position)) && - ($this->position >= $this->startRow)); - } - - /** - * Indicate if more rows exist in the worksheet range of rows that we're iterating - * - * @return boolean - */ - public function valid() - { - return $this->position <= $this->endRow; - } - - /** - * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary - * - * @throws PHPExcel_Exception - */ - protected function adjustForExistingOnlyRange() - { - if ($this->onlyExistingCells) { - while ((!$this->subject->cellExistsByColumnAndRow($this->columnIndex, $this->startRow)) && - ($this->startRow <= $this->endRow)) { - ++$this->startRow; - } - if ($this->startRow > $this->endRow) { - throw new PHPExcel_Exception('No cells exist within the specified range'); - } - while ((!$this->subject->cellExistsByColumnAndRow($this->columnIndex, $this->endRow)) && - ($this->endRow >= $this->startRow)) { - --$this->endRow; - } - if ($this->endRow < $this->startRow) { - throw new PHPExcel_Exception('No cells exist within the specified range'); - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnDimension.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnDimension.php deleted file mode 100644 index 405b825..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnDimension.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_ColumnDimension - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_ColumnDimension extends PHPExcel_Worksheet_Dimension -{ - /** - * Column index - * - * @var int - */ - private $columnIndex; - - /** - * Column width - * - * When this is set to a negative value, the column width should be ignored by IWriter - * - * @var double - */ - private $width = -1; - - /** - * Auto size? - * - * @var bool - */ - private $autoSize = false; - - /** - * Create a new PHPExcel_Worksheet_ColumnDimension - * - * @param string $pIndex Character column index - */ - public function __construct($pIndex = 'A') - { - // Initialise values - $this->columnIndex = $pIndex; - - // set dimension as unformatted by default - parent::__construct(0); - } - - /** - * Get ColumnIndex - * - * @return string - */ - public function getColumnIndex() - { - return $this->columnIndex; - } - - /** - * Set ColumnIndex - * - * @param string $pValue - * @return PHPExcel_Worksheet_ColumnDimension - */ - public function setColumnIndex($pValue) - { - $this->columnIndex = $pValue; - return $this; - } - - /** - * Get Width - * - * @return double - */ - public function getWidth() - { - return $this->width; - } - - /** - * Set Width - * - * @param double $pValue - * @return PHPExcel_Worksheet_ColumnDimension - */ - public function setWidth($pValue = -1) - { - $this->width = $pValue; - return $this; - } - - /** - * Get Auto Size - * - * @return bool - */ - public function getAutoSize() - { - return $this->autoSize; - } - - /** - * Set Auto Size - * - * @param bool $pValue - * @return PHPExcel_Worksheet_ColumnDimension - */ - public function setAutoSize($pValue = false) - { - $this->autoSize = $pValue; - return $this; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnIterator.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnIterator.php deleted file mode 100644 index 0db3e53..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/ColumnIterator.php +++ /dev/null @@ -1,201 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_ColumnIterator - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_ColumnIterator implements Iterator -{ - /** - * PHPExcel_Worksheet to iterate - * - * @var PHPExcel_Worksheet - */ - private $subject; - - /** - * Current iterator position - * - * @var int - */ - private $position = 0; - - /** - * Start position - * - * @var int - */ - private $startColumn = 0; - - - /** - * End position - * - * @var int - */ - private $endColumn = 0; - - - /** - * Create a new column iterator - * - * @param PHPExcel_Worksheet $subject The worksheet to iterate over - * @param string $startColumn The column address at which to start iterating - * @param string $endColumn Optionally, the column address at which to stop iterating - */ - public function __construct(PHPExcel_Worksheet $subject = null, $startColumn = 'A', $endColumn = null) - { - // Set subject - $this->subject = $subject; - $this->resetEnd($endColumn); - $this->resetStart($startColumn); - } - - /** - * Destructor - */ - public function __destruct() - { - unset($this->subject); - } - - /** - * (Re)Set the start column and the current column pointer - * - * @param integer $startColumn The column address at which to start iterating - * @return PHPExcel_Worksheet_ColumnIterator - * @throws PHPExcel_Exception - */ - public function resetStart($startColumn = 'A') - { - $startColumnIndex = PHPExcel_Cell::columnIndexFromString($startColumn) - 1; - if ($startColumnIndex > PHPExcel_Cell::columnIndexFromString($this->subject->getHighestColumn()) - 1) { - throw new PHPExcel_Exception("Start column ({$startColumn}) is beyond highest column ({$this->subject->getHighestColumn()})"); - } - - $this->startColumn = $startColumnIndex; - if ($this->endColumn < $this->startColumn) { - $this->endColumn = $this->startColumn; - } - $this->seek($startColumn); - - return $this; - } - - /** - * (Re)Set the end column - * - * @param string $endColumn The column address at which to stop iterating - * @return PHPExcel_Worksheet_ColumnIterator - */ - public function resetEnd($endColumn = null) - { - $endColumn = ($endColumn) ? $endColumn : $this->subject->getHighestColumn(); - $this->endColumn = PHPExcel_Cell::columnIndexFromString($endColumn) - 1; - - return $this; - } - - /** - * Set the column pointer to the selected column - * - * @param string $column The column address to set the current pointer at - * @return PHPExcel_Worksheet_ColumnIterator - * @throws PHPExcel_Exception - */ - public function seek($column = 'A') - { - $column = PHPExcel_Cell::columnIndexFromString($column) - 1; - if (($column < $this->startColumn) || ($column > $this->endColumn)) { - throw new PHPExcel_Exception("Column $column is out of range ({$this->startColumn} - {$this->endColumn})"); - } - $this->position = $column; - - return $this; - } - - /** - * Rewind the iterator to the starting column - */ - public function rewind() - { - $this->position = $this->startColumn; - } - - /** - * Return the current column in this worksheet - * - * @return PHPExcel_Worksheet_Column - */ - public function current() - { - return new PHPExcel_Worksheet_Column($this->subject, PHPExcel_Cell::stringFromColumnIndex($this->position)); - } - - /** - * Return the current iterator key - * - * @return string - */ - public function key() - { - return PHPExcel_Cell::stringFromColumnIndex($this->position); - } - - /** - * Set the iterator to its next value - */ - public function next() - { - ++$this->position; - } - - /** - * Set the iterator to its previous value - * - * @throws PHPExcel_Exception - */ - public function prev() - { - if ($this->position <= $this->startColumn) { - throw new PHPExcel_Exception( - "Column is already at the beginning of range (" . - PHPExcel_Cell::stringFromColumnIndex($this->endColumn) . " - " . - PHPExcel_Cell::stringFromColumnIndex($this->endColumn) . ")" - ); - } - - --$this->position; - } - - /** - * Indicate if more columns exist in the worksheet range of columns that we're iterating - * - * @return boolean - */ - public function valid() - { - return $this->position <= $this->endColumn; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Dimension.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Dimension.php deleted file mode 100644 index 84f692c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Dimension.php +++ /dev/null @@ -1,178 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_Dimension - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -abstract class PHPExcel_Worksheet_Dimension -{ - /** - * Visible? - * - * @var bool - */ - private $visible = true; - - /** - * Outline level - * - * @var int - */ - private $outlineLevel = 0; - - /** - * Collapsed - * - * @var bool - */ - private $collapsed = false; - - /** - * Index to cellXf. Null value means row has no explicit cellXf format. - * - * @var int|null - */ - private $xfIndex; - - /** - * Create a new PHPExcel_Worksheet_Dimension - * - * @param int $pIndex Numeric row index - */ - public function __construct($initialValue = null) - { - // set dimension as unformatted by default - $this->xfIndex = $initialValue; - } - - /** - * Get Visible - * - * @return bool - */ - public function getVisible() - { - return $this->visible; - } - - /** - * Set Visible - * - * @param bool $pValue - * @return PHPExcel_Worksheet_Dimension - */ - public function setVisible($pValue = true) - { - $this->visible = $pValue; - return $this; - } - - /** - * Get Outline Level - * - * @return int - */ - public function getOutlineLevel() - { - return $this->outlineLevel; - } - - /** - * Set Outline Level - * - * Value must be between 0 and 7 - * - * @param int $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_Dimension - */ - public function setOutlineLevel($pValue) - { - if ($pValue < 0 || $pValue > 7) { - throw new PHPExcel_Exception("Outline level must range between 0 and 7."); - } - - $this->outlineLevel = $pValue; - return $this; - } - - /** - * Get Collapsed - * - * @return bool - */ - public function getCollapsed() - { - return $this->collapsed; - } - - /** - * Set Collapsed - * - * @param bool $pValue - * @return PHPExcel_Worksheet_Dimension - */ - public function setCollapsed($pValue = true) - { - $this->collapsed = $pValue; - return $this; - } - - /** - * Get index to cellXf - * - * @return int - */ - public function getXfIndex() - { - return $this->xfIndex; - } - - /** - * Set index to cellXf - * - * @param int $pValue - * @return PHPExcel_Worksheet_Dimension - */ - public function setXfIndex($pValue = 0) - { - $this->xfIndex = $pValue; - return $this; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Drawing.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Drawing.php deleted file mode 100644 index e39d3eb..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Drawing.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_Drawing - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet_Drawing - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_Drawing extends PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable -{ - /** - * Path - * - * @var string - */ - private $path; - - /** - * Create a new PHPExcel_Worksheet_Drawing - */ - public function __construct() - { - // Initialise values - $this->path = ''; - - // Initialize parent - parent::__construct(); - } - - /** - * Get Filename - * - * @return string - */ - public function getFilename() - { - return basename($this->path); - } - - /** - * Get indexed filename (using image index) - * - * @return string - */ - public function getIndexedFilename() - { - $fileName = $this->getFilename(); - $fileName = str_replace(' ', '_', $fileName); - return str_replace('.' . $this->getExtension(), '', $fileName) . $this->getImageIndex() . '.' . $this->getExtension(); - } - - /** - * Get Extension - * - * @return string - */ - public function getExtension() - { - $exploded = explode(".", basename($this->path)); - return $exploded[count($exploded) - 1]; - } - - /** - * Get Path - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Set Path - * - * @param string $pValue File path - * @param boolean $pVerifyFile Verify file - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_Drawing - */ - public function setPath($pValue = '', $pVerifyFile = true) - { - if ($pVerifyFile) { - if (file_exists($pValue)) { - $this->path = $pValue; - - if ($this->width == 0 && $this->height == 0) { - // Get width/height - list($this->width, $this->height) = getimagesize($pValue); - } - } else { - throw new PHPExcel_Exception("File $pValue not found!"); - } - } else { - $this->path = $pValue; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->path . - parent::getHashCode() . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Drawing/Shadow.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Drawing/Shadow.php deleted file mode 100644 index 84db91d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Drawing/Shadow.php +++ /dev/null @@ -1,296 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_Drawing_Shadow - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet_Drawing - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_Drawing_Shadow implements PHPExcel_IComparable -{ - /* Shadow alignment */ - const SHADOW_BOTTOM = 'b'; - const SHADOW_BOTTOM_LEFT = 'bl'; - const SHADOW_BOTTOM_RIGHT = 'br'; - const SHADOW_CENTER = 'ctr'; - const SHADOW_LEFT = 'l'; - const SHADOW_TOP = 't'; - const SHADOW_TOP_LEFT = 'tl'; - const SHADOW_TOP_RIGHT = 'tr'; - - /** - * Visible - * - * @var boolean - */ - private $visible; - - /** - * Blur radius - * - * Defaults to 6 - * - * @var int - */ - private $blurRadius; - - /** - * Shadow distance - * - * Defaults to 2 - * - * @var int - */ - private $distance; - - /** - * Shadow direction (in degrees) - * - * @var int - */ - private $direction; - - /** - * Shadow alignment - * - * @var int - */ - private $alignment; - - /** - * Color - * - * @var PHPExcel_Style_Color - */ - private $color; - - /** - * Alpha - * - * @var int - */ - private $alpha; - - /** - * Create a new PHPExcel_Worksheet_Drawing_Shadow - */ - public function __construct() - { - // Initialise values - $this->visible = false; - $this->blurRadius = 6; - $this->distance = 2; - $this->direction = 0; - $this->alignment = PHPExcel_Worksheet_Drawing_Shadow::SHADOW_BOTTOM_RIGHT; - $this->color = new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_BLACK); - $this->alpha = 50; - } - - /** - * Get Visible - * - * @return boolean - */ - public function getVisible() - { - return $this->visible; - } - - /** - * Set Visible - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Drawing_Shadow - */ - public function setVisible($pValue = false) - { - $this->visible = $pValue; - return $this; - } - - /** - * Get Blur radius - * - * @return int - */ - public function getBlurRadius() - { - return $this->blurRadius; - } - - /** - * Set Blur radius - * - * @param int $pValue - * @return PHPExcel_Worksheet_Drawing_Shadow - */ - public function setBlurRadius($pValue = 6) - { - $this->blurRadius = $pValue; - return $this; - } - - /** - * Get Shadow distance - * - * @return int - */ - public function getDistance() - { - return $this->distance; - } - - /** - * Set Shadow distance - * - * @param int $pValue - * @return PHPExcel_Worksheet_Drawing_Shadow - */ - public function setDistance($pValue = 2) - { - $this->distance = $pValue; - return $this; - } - - /** - * Get Shadow direction (in degrees) - * - * @return int - */ - public function getDirection() - { - return $this->direction; - } - - /** - * Set Shadow direction (in degrees) - * - * @param int $pValue - * @return PHPExcel_Worksheet_Drawing_Shadow - */ - public function setDirection($pValue = 0) - { - $this->direction = $pValue; - return $this; - } - - /** - * Get Shadow alignment - * - * @return int - */ - public function getAlignment() - { - return $this->alignment; - } - - /** - * Set Shadow alignment - * - * @param int $pValue - * @return PHPExcel_Worksheet_Drawing_Shadow - */ - public function setAlignment($pValue = 0) - { - $this->alignment = $pValue; - return $this; - } - - /** - * Get Color - * - * @return PHPExcel_Style_Color - */ - public function getColor() - { - return $this->color; - } - - /** - * Set Color - * - * @param PHPExcel_Style_Color $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_Drawing_Shadow - */ - public function setColor(PHPExcel_Style_Color $pValue = null) - { - $this->color = $pValue; - return $this; - } - - /** - * Get Alpha - * - * @return int - */ - public function getAlpha() - { - return $this->alpha; - } - - /** - * Set Alpha - * - * @param int $pValue - * @return PHPExcel_Worksheet_Drawing_Shadow - */ - public function setAlpha($pValue = 0) - { - $this->alpha = $pValue; - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - ($this->visible ? 't' : 'f') . - $this->blurRadius . - $this->distance . - $this->direction . - $this->alignment . - $this->color->getHashCode() . - $this->alpha . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/HeaderFooter.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/HeaderFooter.php deleted file mode 100644 index 3a88923..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/HeaderFooter.php +++ /dev/null @@ -1,494 +0,0 @@ -<?php -/** - * PHPExcel_Worksheet_HeaderFooter - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not,241 write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - * - * <code> - * Header/Footer Formatting Syntax taken from Office Open XML Part 4 - Markup Language Reference, page 1970: - * - * There are a number of formatting codes that can be written inline with the actual header / footer text, which - * affect the formatting in the header or footer. - * - * Example: This example shows the text "Center Bold Header" on the first line (center section), and the date on - * the second line (center section). - * &CCenter &"-,Bold"Bold&"-,Regular"Header_x000A_&D - * - * General Rules: - * There is no required order in which these codes must appear. - * - * The first occurrence of the following codes turns the formatting ON, the second occurrence turns it OFF again: - * - strikethrough - * - superscript - * - subscript - * Superscript and subscript cannot both be ON at same time. Whichever comes first wins and the other is ignored, - * while the first is ON. - * &L - code for "left section" (there are three header / footer locations, "left", "center", and "right"). When - * two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the - * order of appearance, and placed into the left section. - * &P - code for "current page #" - * &N - code for "total pages" - * &font size - code for "text font size", where font size is a font size in points. - * &K - code for "text font color" - * RGB Color is specified as RRGGBB - * Theme Color is specifed as TTSNN where TT is the theme color Id, S is either "+" or "-" of the tint/shade - * value, NN is the tint/shade value. - * &S - code for "text strikethrough" on / off - * &X - code for "text super script" on / off - * &Y - code for "text subscript" on / off - * &C - code for "center section". When two or more occurrences of this section marker exist, the contents - * from all markers are concatenated, in the order of appearance, and placed into the center section. - * - * &D - code for "date" - * &T - code for "time" - * &G - code for "picture as background" - * &U - code for "text single underline" - * &E - code for "double underline" - * &R - code for "right section". When two or more occurrences of this section marker exist, the contents - * from all markers are concatenated, in the order of appearance, and placed into the right section. - * &Z - code for "this workbook's file path" - * &F - code for "this workbook's file name" - * &A - code for "sheet tab name" - * &+ - code for add to page #. - * &- - code for subtract from page #. - * &"font name,font type" - code for "text font name" and "text font type", where font name and font type - * are strings specifying the name and type of the font, separated by a comma. When a hyphen appears in font - * name, it means "none specified". Both of font name and font type can be localized values. - * &"-,Bold" - code for "bold font style" - * &B - also means "bold font style". - * &"-,Regular" - code for "regular font style" - * &"-,Italic" - code for "italic font style" - * &I - also means "italic font style" - * &"-,Bold Italic" code for "bold italic font style" - * &O - code for "outline style" - * &H - code for "shadow style" - * </code> - * - */ -class PHPExcel_Worksheet_HeaderFooter -{ - /* Header/footer image location */ - const IMAGE_HEADER_LEFT = 'LH'; - const IMAGE_HEADER_CENTER = 'CH'; - const IMAGE_HEADER_RIGHT = 'RH'; - const IMAGE_FOOTER_LEFT = 'LF'; - const IMAGE_FOOTER_CENTER = 'CF'; - const IMAGE_FOOTER_RIGHT = 'RF'; - - /** - * OddHeader - * - * @var string - */ - private $oddHeader = ''; - - /** - * OddFooter - * - * @var string - */ - private $oddFooter = ''; - - /** - * EvenHeader - * - * @var string - */ - private $evenHeader = ''; - - /** - * EvenFooter - * - * @var string - */ - private $evenFooter = ''; - - /** - * FirstHeader - * - * @var string - */ - private $firstHeader = ''; - - /** - * FirstFooter - * - * @var string - */ - private $firstFooter = ''; - - /** - * Different header for Odd/Even, defaults to false - * - * @var boolean - */ - private $differentOddEven = false; - - /** - * Different header for first page, defaults to false - * - * @var boolean - */ - private $differentFirst = false; - - /** - * Scale with document, defaults to true - * - * @var boolean - */ - private $scaleWithDocument = true; - - /** - * Align with margins, defaults to true - * - * @var boolean - */ - private $alignWithMargins = true; - - /** - * Header/footer images - * - * @var PHPExcel_Worksheet_HeaderFooterDrawing[] - */ - private $headerFooterImages = array(); - - /** - * Create a new PHPExcel_Worksheet_HeaderFooter - */ - public function __construct() - { - } - - /** - * Get OddHeader - * - * @return string - */ - public function getOddHeader() - { - return $this->oddHeader; - } - - /** - * Set OddHeader - * - * @param string $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setOddHeader($pValue) - { - $this->oddHeader = $pValue; - return $this; - } - - /** - * Get OddFooter - * - * @return string - */ - public function getOddFooter() - { - return $this->oddFooter; - } - - /** - * Set OddFooter - * - * @param string $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setOddFooter($pValue) - { - $this->oddFooter = $pValue; - return $this; - } - - /** - * Get EvenHeader - * - * @return string - */ - public function getEvenHeader() - { - return $this->evenHeader; - } - - /** - * Set EvenHeader - * - * @param string $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setEvenHeader($pValue) - { - $this->evenHeader = $pValue; - return $this; - } - - /** - * Get EvenFooter - * - * @return string - */ - public function getEvenFooter() - { - return $this->evenFooter; - } - - /** - * Set EvenFooter - * - * @param string $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setEvenFooter($pValue) - { - $this->evenFooter = $pValue; - return $this; - } - - /** - * Get FirstHeader - * - * @return string - */ - public function getFirstHeader() - { - return $this->firstHeader; - } - - /** - * Set FirstHeader - * - * @param string $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setFirstHeader($pValue) - { - $this->firstHeader = $pValue; - return $this; - } - - /** - * Get FirstFooter - * - * @return string - */ - public function getFirstFooter() - { - return $this->firstFooter; - } - - /** - * Set FirstFooter - * - * @param string $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setFirstFooter($pValue) - { - $this->firstFooter = $pValue; - return $this; - } - - /** - * Get DifferentOddEven - * - * @return boolean - */ - public function getDifferentOddEven() - { - return $this->differentOddEven; - } - - /** - * Set DifferentOddEven - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setDifferentOddEven($pValue = false) - { - $this->differentOddEven = $pValue; - return $this; - } - - /** - * Get DifferentFirst - * - * @return boolean - */ - public function getDifferentFirst() - { - return $this->differentFirst; - } - - /** - * Set DifferentFirst - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setDifferentFirst($pValue = false) - { - $this->differentFirst = $pValue; - return $this; - } - - /** - * Get ScaleWithDocument - * - * @return boolean - */ - public function getScaleWithDocument() - { - return $this->scaleWithDocument; - } - - /** - * Set ScaleWithDocument - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setScaleWithDocument($pValue = true) - { - $this->scaleWithDocument = $pValue; - return $this; - } - - /** - * Get AlignWithMargins - * - * @return boolean - */ - public function getAlignWithMargins() - { - return $this->alignWithMargins; - } - - /** - * Set AlignWithMargins - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setAlignWithMargins($pValue = true) - { - $this->alignWithMargins = $pValue; - return $this; - } - - /** - * Add header/footer image - * - * @param PHPExcel_Worksheet_HeaderFooterDrawing $image - * @param string $location - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function addImage(PHPExcel_Worksheet_HeaderFooterDrawing $image = null, $location = self::IMAGE_HEADER_LEFT) - { - $this->headerFooterImages[$location] = $image; - return $this; - } - - /** - * Remove header/footer image - * - * @param string $location - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function removeImage($location = self::IMAGE_HEADER_LEFT) - { - if (isset($this->headerFooterImages[$location])) { - unset($this->headerFooterImages[$location]); - } - return $this; - } - - /** - * Set header/footer images - * - * @param PHPExcel_Worksheet_HeaderFooterDrawing[] $images - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setImages($images) - { - if (!is_array($images)) { - throw new PHPExcel_Exception('Invalid parameter!'); - } - - $this->headerFooterImages = $images; - return $this; - } - - /** - * Get header/footer images - * - * @return PHPExcel_Worksheet_HeaderFooterDrawing[] - */ - public function getImages() - { - // Sort array - $images = array(); - if (isset($this->headerFooterImages[self::IMAGE_HEADER_LEFT])) { - $images[self::IMAGE_HEADER_LEFT] = $this->headerFooterImages[self::IMAGE_HEADER_LEFT]; - } - if (isset($this->headerFooterImages[self::IMAGE_HEADER_CENTER])) { - $images[self::IMAGE_HEADER_CENTER] = $this->headerFooterImages[self::IMAGE_HEADER_CENTER]; - } - if (isset($this->headerFooterImages[self::IMAGE_HEADER_RIGHT])) { - $images[self::IMAGE_HEADER_RIGHT] = $this->headerFooterImages[self::IMAGE_HEADER_RIGHT]; - } - if (isset($this->headerFooterImages[self::IMAGE_FOOTER_LEFT])) { - $images[self::IMAGE_FOOTER_LEFT] = $this->headerFooterImages[self::IMAGE_FOOTER_LEFT]; - } - if (isset($this->headerFooterImages[self::IMAGE_FOOTER_CENTER])) { - $images[self::IMAGE_FOOTER_CENTER] = $this->headerFooterImages[self::IMAGE_FOOTER_CENTER]; - } - if (isset($this->headerFooterImages[self::IMAGE_FOOTER_RIGHT])) { - $images[self::IMAGE_FOOTER_RIGHT] = $this->headerFooterImages[self::IMAGE_FOOTER_RIGHT]; - } - $this->headerFooterImages = $images; - - return $this->headerFooterImages; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php deleted file mode 100644 index a491f4b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php +++ /dev/null @@ -1,361 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_HeaderFooterDrawing - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_HeaderFooterDrawing extends PHPExcel_Worksheet_Drawing implements PHPExcel_IComparable -{ - /** - * Path - * - * @var string - */ - private $path; - - /** - * Name - * - * @var string - */ - protected $name; - - /** - * Offset X - * - * @var int - */ - protected $offsetX; - - /** - * Offset Y - * - * @var int - */ - protected $offsetY; - - /** - * Width - * - * @var int - */ - protected $width; - - /** - * Height - * - * @var int - */ - protected $height; - - /** - * Proportional resize - * - * @var boolean - */ - protected $resizeProportional; - - /** - * Create a new PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function __construct() - { - // Initialise values - $this->path = ''; - $this->name = ''; - $this->offsetX = 0; - $this->offsetY = 0; - $this->width = 0; - $this->height = 0; - $this->resizeProportional = true; - } - - /** - * Get Name - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Set Name - * - * @param string $pValue - * @return PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function setName($pValue = '') - { - $this->name = $pValue; - return $this; - } - - /** - * Get OffsetX - * - * @return int - */ - public function getOffsetX() - { - return $this->offsetX; - } - - /** - * Set OffsetX - * - * @param int $pValue - * @return PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function setOffsetX($pValue = 0) - { - $this->offsetX = $pValue; - return $this; - } - - /** - * Get OffsetY - * - * @return int - */ - public function getOffsetY() - { - return $this->offsetY; - } - - /** - * Set OffsetY - * - * @param int $pValue - * @return PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function setOffsetY($pValue = 0) - { - $this->offsetY = $pValue; - return $this; - } - - /** - * Get Width - * - * @return int - */ - public function getWidth() - { - return $this->width; - } - - /** - * Set Width - * - * @param int $pValue - * @return PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function setWidth($pValue = 0) - { - // Resize proportional? - if ($this->resizeProportional && $pValue != 0) { - $ratio = $this->width / $this->height; - $this->height = round($ratio * $pValue); - } - - // Set width - $this->width = $pValue; - - return $this; - } - - /** - * Get Height - * - * @return int - */ - public function getHeight() - { - return $this->height; - } - - /** - * Set Height - * - * @param int $pValue - * @return PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function setHeight($pValue = 0) - { - // Resize proportional? - if ($this->resizeProportional && $pValue != 0) { - $ratio = $this->width / $this->height; - $this->width = round($ratio * $pValue); - } - - // Set height - $this->height = $pValue; - - return $this; - } - - /** - * Set width and height with proportional resize - * Example: - * <code> - * $objDrawing->setResizeProportional(true); - * $objDrawing->setWidthAndHeight(160,120); - * </code> - * - * @author Vincent@luo MSN:kele_100@hotmail.com - * @param int $width - * @param int $height - * @return PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function setWidthAndHeight($width = 0, $height = 0) - { - $xratio = $width / $this->width; - $yratio = $height / $this->height; - if ($this->resizeProportional && !($width == 0 || $height == 0)) { - if (($xratio * $this->height) < $height) { - $this->height = ceil($xratio * $this->height); - $this->width = $width; - } else { - $this->width = ceil($yratio * $this->width); - $this->height = $height; - } - } - return $this; - } - - /** - * Get ResizeProportional - * - * @return boolean - */ - public function getResizeProportional() - { - return $this->resizeProportional; - } - - /** - * Set ResizeProportional - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function setResizeProportional($pValue = true) - { - $this->resizeProportional = $pValue; - return $this; - } - - /** - * Get Filename - * - * @return string - */ - public function getFilename() - { - return basename($this->path); - } - - /** - * Get Extension - * - * @return string - */ - public function getExtension() - { - $parts = explode(".", basename($this->path)); - return end($parts); - } - - /** - * Get Path - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Set Path - * - * @param string $pValue File path - * @param boolean $pVerifyFile Verify file - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_HeaderFooterDrawing - */ - public function setPath($pValue = '', $pVerifyFile = true) - { - if ($pVerifyFile) { - if (file_exists($pValue)) { - $this->path = $pValue; - - if ($this->width == 0 && $this->height == 0) { - // Get width/height - list($this->width, $this->height) = getimagesize($pValue); - } - } else { - throw new PHPExcel_Exception("File $pValue not found!"); - } - } else { - $this->path = $pValue; - } - return $this; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->path . - $this->name . - $this->offsetX . - $this->offsetY . - $this->width . - $this->height . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/MemoryDrawing.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/MemoryDrawing.php deleted file mode 100644 index 438ed2c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/MemoryDrawing.php +++ /dev/null @@ -1,201 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_MemoryDrawing - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_MemoryDrawing extends PHPExcel_Worksheet_BaseDrawing implements PHPExcel_IComparable -{ - /* Rendering functions */ - const RENDERING_DEFAULT = 'imagepng'; - const RENDERING_PNG = 'imagepng'; - const RENDERING_GIF = 'imagegif'; - const RENDERING_JPEG = 'imagejpeg'; - - /* MIME types */ - const MIMETYPE_DEFAULT = 'image/png'; - const MIMETYPE_PNG = 'image/png'; - const MIMETYPE_GIF = 'image/gif'; - const MIMETYPE_JPEG = 'image/jpeg'; - - /** - * Image resource - * - * @var resource - */ - private $imageResource; - - /** - * Rendering function - * - * @var string - */ - private $renderingFunction; - - /** - * Mime type - * - * @var string - */ - private $mimeType; - - /** - * Unique name - * - * @var string - */ - private $uniqueName; - - /** - * Create a new PHPExcel_Worksheet_MemoryDrawing - */ - public function __construct() - { - // Initialise values - $this->imageResource = null; - $this->renderingFunction = self::RENDERING_DEFAULT; - $this->mimeType = self::MIMETYPE_DEFAULT; - $this->uniqueName = md5(rand(0, 9999). time() . rand(0, 9999)); - - // Initialize parent - parent::__construct(); - } - - /** - * Get image resource - * - * @return resource - */ - public function getImageResource() - { - return $this->imageResource; - } - - /** - * Set image resource - * - * @param $value resource - * @return PHPExcel_Worksheet_MemoryDrawing - */ - public function setImageResource($value = null) - { - $this->imageResource = $value; - - if (!is_null($this->imageResource)) { - // Get width/height - $this->width = imagesx($this->imageResource); - $this->height = imagesy($this->imageResource); - } - return $this; - } - - /** - * Get rendering function - * - * @return string - */ - public function getRenderingFunction() - { - return $this->renderingFunction; - } - - /** - * Set rendering function - * - * @param string $value - * @return PHPExcel_Worksheet_MemoryDrawing - */ - public function setRenderingFunction($value = PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT) - { - $this->renderingFunction = $value; - return $this; - } - - /** - * Get mime type - * - * @return string - */ - public function getMimeType() - { - return $this->mimeType; - } - - /** - * Set mime type - * - * @param string $value - * @return PHPExcel_Worksheet_MemoryDrawing - */ - public function setMimeType($value = PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT) - { - $this->mimeType = $value; - return $this; - } - - /** - * Get indexed filename (using image index) - * - * @return string - */ - public function getIndexedFilename() - { - $extension = strtolower($this->getMimeType()); - $extension = explode('/', $extension); - $extension = $extension[1]; - - return $this->uniqueName . $this->getImageIndex() . '.' . $extension; - } - - /** - * Get hash code - * - * @return string Hash code - */ - public function getHashCode() - { - return md5( - $this->renderingFunction . - $this->mimeType . - $this->uniqueName . - parent::getHashCode() . - __CLASS__ - ); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/PageMargins.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/PageMargins.php deleted file mode 100644 index 70f5ee0..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/PageMargins.php +++ /dev/null @@ -1,233 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Worksheet_PageMargins - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Worksheet_PageMargins -{ - /** - * Left - * - * @var double - */ - private $left = 0.7; - - /** - * Right - * - * @var double - */ - private $right = 0.7; - - /** - * Top - * - * @var double - */ - private $top = 0.75; - - /** - * Bottom - * - * @var double - */ - private $bottom = 0.75; - - /** - * Header - * - * @var double - */ - private $header = 0.3; - - /** - * Footer - * - * @var double - */ - private $footer = 0.3; - - /** - * Create a new PHPExcel_Worksheet_PageMargins - */ - public function __construct() - { - } - - /** - * Get Left - * - * @return double - */ - public function getLeft() - { - return $this->left; - } - - /** - * Set Left - * - * @param double $pValue - * @return PHPExcel_Worksheet_PageMargins - */ - public function setLeft($pValue) - { - $this->left = $pValue; - return $this; - } - - /** - * Get Right - * - * @return double - */ - public function getRight() - { - return $this->right; - } - - /** - * Set Right - * - * @param double $pValue - * @return PHPExcel_Worksheet_PageMargins - */ - public function setRight($pValue) - { - $this->right = $pValue; - return $this; - } - - /** - * Get Top - * - * @return double - */ - public function getTop() - { - return $this->top; - } - - /** - * Set Top - * - * @param double $pValue - * @return PHPExcel_Worksheet_PageMargins - */ - public function setTop($pValue) - { - $this->top = $pValue; - return $this; - } - - /** - * Get Bottom - * - * @return double - */ - public function getBottom() - { - return $this->bottom; - } - - /** - * Set Bottom - * - * @param double $pValue - * @return PHPExcel_Worksheet_PageMargins - */ - public function setBottom($pValue) - { - $this->bottom = $pValue; - return $this; - } - - /** - * Get Header - * - * @return double - */ - public function getHeader() - { - return $this->header; - } - - /** - * Set Header - * - * @param double $pValue - * @return PHPExcel_Worksheet_PageMargins - */ - public function setHeader($pValue) - { - $this->header = $pValue; - return $this; - } - - /** - * Get Footer - * - * @return double - */ - public function getFooter() - { - return $this->footer; - } - - /** - * Set Footer - * - * @param double $pValue - * @return PHPExcel_Worksheet_PageMargins - */ - public function setFooter($pValue) - { - $this->footer = $pValue; - return $this; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/PageSetup.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/PageSetup.php deleted file mode 100644 index c67053e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/PageSetup.php +++ /dev/null @@ -1,839 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Worksheet_PageSetup - * - * <code> - * Paper size taken from Office Open XML Part 4 - Markup Language Reference, page 1988: - * - * 1 = Letter paper (8.5 in. by 11 in.) - * 2 = Letter small paper (8.5 in. by 11 in.) - * 3 = Tabloid paper (11 in. by 17 in.) - * 4 = Ledger paper (17 in. by 11 in.) - * 5 = Legal paper (8.5 in. by 14 in.) - * 6 = Statement paper (5.5 in. by 8.5 in.) - * 7 = Executive paper (7.25 in. by 10.5 in.) - * 8 = A3 paper (297 mm by 420 mm) - * 9 = A4 paper (210 mm by 297 mm) - * 10 = A4 small paper (210 mm by 297 mm) - * 11 = A5 paper (148 mm by 210 mm) - * 12 = B4 paper (250 mm by 353 mm) - * 13 = B5 paper (176 mm by 250 mm) - * 14 = Folio paper (8.5 in. by 13 in.) - * 15 = Quarto paper (215 mm by 275 mm) - * 16 = Standard paper (10 in. by 14 in.) - * 17 = Standard paper (11 in. by 17 in.) - * 18 = Note paper (8.5 in. by 11 in.) - * 19 = #9 envelope (3.875 in. by 8.875 in.) - * 20 = #10 envelope (4.125 in. by 9.5 in.) - * 21 = #11 envelope (4.5 in. by 10.375 in.) - * 22 = #12 envelope (4.75 in. by 11 in.) - * 23 = #14 envelope (5 in. by 11.5 in.) - * 24 = C paper (17 in. by 22 in.) - * 25 = D paper (22 in. by 34 in.) - * 26 = E paper (34 in. by 44 in.) - * 27 = DL envelope (110 mm by 220 mm) - * 28 = C5 envelope (162 mm by 229 mm) - * 29 = C3 envelope (324 mm by 458 mm) - * 30 = C4 envelope (229 mm by 324 mm) - * 31 = C6 envelope (114 mm by 162 mm) - * 32 = C65 envelope (114 mm by 229 mm) - * 33 = B4 envelope (250 mm by 353 mm) - * 34 = B5 envelope (176 mm by 250 mm) - * 35 = B6 envelope (176 mm by 125 mm) - * 36 = Italy envelope (110 mm by 230 mm) - * 37 = Monarch envelope (3.875 in. by 7.5 in.). - * 38 = 6 3/4 envelope (3.625 in. by 6.5 in.) - * 39 = US standard fanfold (14.875 in. by 11 in.) - * 40 = German standard fanfold (8.5 in. by 12 in.) - * 41 = German legal fanfold (8.5 in. by 13 in.) - * 42 = ISO B4 (250 mm by 353 mm) - * 43 = Japanese double postcard (200 mm by 148 mm) - * 44 = Standard paper (9 in. by 11 in.) - * 45 = Standard paper (10 in. by 11 in.) - * 46 = Standard paper (15 in. by 11 in.) - * 47 = Invite envelope (220 mm by 220 mm) - * 50 = Letter extra paper (9.275 in. by 12 in.) - * 51 = Legal extra paper (9.275 in. by 15 in.) - * 52 = Tabloid extra paper (11.69 in. by 18 in.) - * 53 = A4 extra paper (236 mm by 322 mm) - * 54 = Letter transverse paper (8.275 in. by 11 in.) - * 55 = A4 transverse paper (210 mm by 297 mm) - * 56 = Letter extra transverse paper (9.275 in. by 12 in.) - * 57 = SuperA/SuperA/A4 paper (227 mm by 356 mm) - * 58 = SuperB/SuperB/A3 paper (305 mm by 487 mm) - * 59 = Letter plus paper (8.5 in. by 12.69 in.) - * 60 = A4 plus paper (210 mm by 330 mm) - * 61 = A5 transverse paper (148 mm by 210 mm) - * 62 = JIS B5 transverse paper (182 mm by 257 mm) - * 63 = A3 extra paper (322 mm by 445 mm) - * 64 = A5 extra paper (174 mm by 235 mm) - * 65 = ISO B5 extra paper (201 mm by 276 mm) - * 66 = A2 paper (420 mm by 594 mm) - * 67 = A3 transverse paper (297 mm by 420 mm) - * 68 = A3 extra transverse paper (322 mm by 445 mm) - * </code> - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Worksheet_PageSetup -{ - /* Paper size */ - const PAPERSIZE_LETTER = 1; - const PAPERSIZE_LETTER_SMALL = 2; - const PAPERSIZE_TABLOID = 3; - const PAPERSIZE_LEDGER = 4; - const PAPERSIZE_LEGAL = 5; - const PAPERSIZE_STATEMENT = 6; - const PAPERSIZE_EXECUTIVE = 7; - const PAPERSIZE_A3 = 8; - const PAPERSIZE_A4 = 9; - const PAPERSIZE_A4_SMALL = 10; - const PAPERSIZE_A5 = 11; - const PAPERSIZE_B4 = 12; - const PAPERSIZE_B5 = 13; - const PAPERSIZE_FOLIO = 14; - const PAPERSIZE_QUARTO = 15; - const PAPERSIZE_STANDARD_1 = 16; - const PAPERSIZE_STANDARD_2 = 17; - const PAPERSIZE_NOTE = 18; - const PAPERSIZE_NO9_ENVELOPE = 19; - const PAPERSIZE_NO10_ENVELOPE = 20; - const PAPERSIZE_NO11_ENVELOPE = 21; - const PAPERSIZE_NO12_ENVELOPE = 22; - const PAPERSIZE_NO14_ENVELOPE = 23; - const PAPERSIZE_C = 24; - const PAPERSIZE_D = 25; - const PAPERSIZE_E = 26; - const PAPERSIZE_DL_ENVELOPE = 27; - const PAPERSIZE_C5_ENVELOPE = 28; - const PAPERSIZE_C3_ENVELOPE = 29; - const PAPERSIZE_C4_ENVELOPE = 30; - const PAPERSIZE_C6_ENVELOPE = 31; - const PAPERSIZE_C65_ENVELOPE = 32; - const PAPERSIZE_B4_ENVELOPE = 33; - const PAPERSIZE_B5_ENVELOPE = 34; - const PAPERSIZE_B6_ENVELOPE = 35; - const PAPERSIZE_ITALY_ENVELOPE = 36; - const PAPERSIZE_MONARCH_ENVELOPE = 37; - const PAPERSIZE_6_3_4_ENVELOPE = 38; - const PAPERSIZE_US_STANDARD_FANFOLD = 39; - const PAPERSIZE_GERMAN_STANDARD_FANFOLD = 40; - const PAPERSIZE_GERMAN_LEGAL_FANFOLD = 41; - const PAPERSIZE_ISO_B4 = 42; - const PAPERSIZE_JAPANESE_DOUBLE_POSTCARD = 43; - const PAPERSIZE_STANDARD_PAPER_1 = 44; - const PAPERSIZE_STANDARD_PAPER_2 = 45; - const PAPERSIZE_STANDARD_PAPER_3 = 46; - const PAPERSIZE_INVITE_ENVELOPE = 47; - const PAPERSIZE_LETTER_EXTRA_PAPER = 48; - const PAPERSIZE_LEGAL_EXTRA_PAPER = 49; - const PAPERSIZE_TABLOID_EXTRA_PAPER = 50; - const PAPERSIZE_A4_EXTRA_PAPER = 51; - const PAPERSIZE_LETTER_TRANSVERSE_PAPER = 52; - const PAPERSIZE_A4_TRANSVERSE_PAPER = 53; - const PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER = 54; - const PAPERSIZE_SUPERA_SUPERA_A4_PAPER = 55; - const PAPERSIZE_SUPERB_SUPERB_A3_PAPER = 56; - const PAPERSIZE_LETTER_PLUS_PAPER = 57; - const PAPERSIZE_A4_PLUS_PAPER = 58; - const PAPERSIZE_A5_TRANSVERSE_PAPER = 59; - const PAPERSIZE_JIS_B5_TRANSVERSE_PAPER = 60; - const PAPERSIZE_A3_EXTRA_PAPER = 61; - const PAPERSIZE_A5_EXTRA_PAPER = 62; - const PAPERSIZE_ISO_B5_EXTRA_PAPER = 63; - const PAPERSIZE_A2_PAPER = 64; - const PAPERSIZE_A3_TRANSVERSE_PAPER = 65; - const PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER = 66; - - /* Page orientation */ - const ORIENTATION_DEFAULT = 'default'; - const ORIENTATION_LANDSCAPE = 'landscape'; - const ORIENTATION_PORTRAIT = 'portrait'; - - /* Print Range Set Method */ - const SETPRINTRANGE_OVERWRITE = 'O'; - const SETPRINTRANGE_INSERT = 'I'; - - - /** - * Paper size - * - * @var int - */ - private $paperSize = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER; - - /** - * Orientation - * - * @var string - */ - private $orientation = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT; - - /** - * Scale (Print Scale) - * - * Print scaling. Valid values range from 10 to 400 - * This setting is overridden when fitToWidth and/or fitToHeight are in use - * - * @var int? - */ - private $scale = 100; - - /** - * Fit To Page - * Whether scale or fitToWith / fitToHeight applies - * - * @var boolean - */ - private $fitToPage = false; - - /** - * Fit To Height - * Number of vertical pages to fit on - * - * @var int? - */ - private $fitToHeight = 1; - - /** - * Fit To Width - * Number of horizontal pages to fit on - * - * @var int? - */ - private $fitToWidth = 1; - - /** - * Columns to repeat at left - * - * @var array Containing start column and end column, empty array if option unset - */ - private $columnsToRepeatAtLeft = array('', ''); - - /** - * Rows to repeat at top - * - * @var array Containing start row number and end row number, empty array if option unset - */ - private $rowsToRepeatAtTop = array(0, 0); - - /** - * Center page horizontally - * - * @var boolean - */ - private $horizontalCentered = false; - - /** - * Center page vertically - * - * @var boolean - */ - private $verticalCentered = false; - - /** - * Print area - * - * @var string - */ - private $printArea = null; - - /** - * First page number - * - * @var int - */ - private $firstPageNumber = null; - - /** - * Create a new PHPExcel_Worksheet_PageSetup - */ - public function __construct() - { - } - - /** - * Get Paper Size - * - * @return int - */ - public function getPaperSize() - { - return $this->paperSize; - } - - /** - * Set Paper Size - * - * @param int $pValue - * @return PHPExcel_Worksheet_PageSetup - */ - public function setPaperSize($pValue = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER) - { - $this->paperSize = $pValue; - return $this; - } - - /** - * Get Orientation - * - * @return string - */ - public function getOrientation() - { - return $this->orientation; - } - - /** - * Set Orientation - * - * @param string $pValue - * @return PHPExcel_Worksheet_PageSetup - */ - public function setOrientation($pValue = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) - { - $this->orientation = $pValue; - return $this; - } - - /** - * Get Scale - * - * @return int? - */ - public function getScale() - { - return $this->scale; - } - - /** - * Set Scale - * - * Print scaling. Valid values range from 10 to 400 - * This setting is overridden when fitToWidth and/or fitToHeight are in use - * - * @param int? $pValue - * @param boolean $pUpdate Update fitToPage so scaling applies rather than fitToHeight / fitToWidth - * @return PHPExcel_Worksheet_PageSetup - * @throws PHPExcel_Exception - */ - public function setScale($pValue = 100, $pUpdate = true) - { - // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, - // but it is apparently still able to handle any scale >= 0, where 0 results in 100 - if (($pValue >= 0) || is_null($pValue)) { - $this->scale = $pValue; - if ($pUpdate) { - $this->fitToPage = false; - } - } else { - throw new PHPExcel_Exception("Scale must not be negative"); - } - return $this; - } - - /** - * Get Fit To Page - * - * @return boolean - */ - public function getFitToPage() - { - return $this->fitToPage; - } - - /** - * Set Fit To Page - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_PageSetup - */ - public function setFitToPage($pValue = true) - { - $this->fitToPage = $pValue; - return $this; - } - - /** - * Get Fit To Height - * - * @return int? - */ - public function getFitToHeight() - { - return $this->fitToHeight; - } - - /** - * Set Fit To Height - * - * @param int? $pValue - * @param boolean $pUpdate Update fitToPage so it applies rather than scaling - * @return PHPExcel_Worksheet_PageSetup - */ - public function setFitToHeight($pValue = 1, $pUpdate = true) - { - $this->fitToHeight = $pValue; - if ($pUpdate) { - $this->fitToPage = true; - } - return $this; - } - - /** - * Get Fit To Width - * - * @return int? - */ - public function getFitToWidth() - { - return $this->fitToWidth; - } - - /** - * Set Fit To Width - * - * @param int? $pValue - * @param boolean $pUpdate Update fitToPage so it applies rather than scaling - * @return PHPExcel_Worksheet_PageSetup - */ - public function setFitToWidth($pValue = 1, $pUpdate = true) - { - $this->fitToWidth = $pValue; - if ($pUpdate) { - $this->fitToPage = true; - } - return $this; - } - - /** - * Is Columns to repeat at left set? - * - * @return boolean - */ - public function isColumnsToRepeatAtLeftSet() - { - if (is_array($this->columnsToRepeatAtLeft)) { - if ($this->columnsToRepeatAtLeft[0] != '' && $this->columnsToRepeatAtLeft[1] != '') { - return true; - } - } - - return false; - } - - /** - * Get Columns to repeat at left - * - * @return array Containing start column and end column, empty array if option unset - */ - public function getColumnsToRepeatAtLeft() - { - return $this->columnsToRepeatAtLeft; - } - - /** - * Set Columns to repeat at left - * - * @param array $pValue Containing start column and end column, empty array if option unset - * @return PHPExcel_Worksheet_PageSetup - */ - public function setColumnsToRepeatAtLeft($pValue = null) - { - if (is_array($pValue)) { - $this->columnsToRepeatAtLeft = $pValue; - } - return $this; - } - - /** - * Set Columns to repeat at left by start and end - * - * @param string $pStart - * @param string $pEnd - * @return PHPExcel_Worksheet_PageSetup - */ - public function setColumnsToRepeatAtLeftByStartAndEnd($pStart = 'A', $pEnd = 'A') - { - $this->columnsToRepeatAtLeft = array($pStart, $pEnd); - return $this; - } - - /** - * Is Rows to repeat at top set? - * - * @return boolean - */ - public function isRowsToRepeatAtTopSet() - { - if (is_array($this->rowsToRepeatAtTop)) { - if ($this->rowsToRepeatAtTop[0] != 0 && $this->rowsToRepeatAtTop[1] != 0) { - return true; - } - } - - return false; - } - - /** - * Get Rows to repeat at top - * - * @return array Containing start column and end column, empty array if option unset - */ - public function getRowsToRepeatAtTop() - { - return $this->rowsToRepeatAtTop; - } - - /** - * Set Rows to repeat at top - * - * @param array $pValue Containing start column and end column, empty array if option unset - * @return PHPExcel_Worksheet_PageSetup - */ - public function setRowsToRepeatAtTop($pValue = null) - { - if (is_array($pValue)) { - $this->rowsToRepeatAtTop = $pValue; - } - return $this; - } - - /** - * Set Rows to repeat at top by start and end - * - * @param int $pStart - * @param int $pEnd - * @return PHPExcel_Worksheet_PageSetup - */ - public function setRowsToRepeatAtTopByStartAndEnd($pStart = 1, $pEnd = 1) - { - $this->rowsToRepeatAtTop = array($pStart, $pEnd); - return $this; - } - - /** - * Get center page horizontally - * - * @return bool - */ - public function getHorizontalCentered() - { - return $this->horizontalCentered; - } - - /** - * Set center page horizontally - * - * @param bool $value - * @return PHPExcel_Worksheet_PageSetup - */ - public function setHorizontalCentered($value = false) - { - $this->horizontalCentered = $value; - return $this; - } - - /** - * Get center page vertically - * - * @return bool - */ - public function getVerticalCentered() - { - return $this->verticalCentered; - } - - /** - * Set center page vertically - * - * @param bool $value - * @return PHPExcel_Worksheet_PageSetup - */ - public function setVerticalCentered($value = false) - { - $this->verticalCentered = $value; - return $this; - } - - /** - * Get print area - * - * @param int $index Identifier for a specific print area range if several ranges have been set - * Default behaviour, or a index value of 0, will return all ranges as a comma-separated string - * Otherwise, the specific range identified by the value of $index will be returned - * Print areas are numbered from 1 - * @throws PHPExcel_Exception - * @return string - */ - public function getPrintArea($index = 0) - { - if ($index == 0) { - return $this->printArea; - } - $printAreas = explode(',', $this->printArea); - if (isset($printAreas[$index-1])) { - return $printAreas[$index-1]; - } - throw new PHPExcel_Exception("Requested Print Area does not exist"); - } - - /** - * Is print area set? - * - * @param int $index Identifier for a specific print area range if several ranges have been set - * Default behaviour, or an index value of 0, will identify whether any print range is set - * Otherwise, existence of the range identified by the value of $index will be returned - * Print areas are numbered from 1 - * @return boolean - */ - public function isPrintAreaSet($index = 0) - { - if ($index == 0) { - return !is_null($this->printArea); - } - $printAreas = explode(',', $this->printArea); - return isset($printAreas[$index-1]); - } - - /** - * Clear a print area - * - * @param int $index Identifier for a specific print area range if several ranges have been set - * Default behaviour, or an index value of 0, will clear all print ranges that are set - * Otherwise, the range identified by the value of $index will be removed from the series - * Print areas are numbered from 1 - * @return PHPExcel_Worksheet_PageSetup - */ - public function clearPrintArea($index = 0) - { - if ($index == 0) { - $this->printArea = null; - } else { - $printAreas = explode(',', $this->printArea); - if (isset($printAreas[$index-1])) { - unset($printAreas[$index-1]); - $this->printArea = implode(',', $printAreas); - } - } - - return $this; - } - - /** - * Set print area. e.g. 'A1:D10' or 'A1:D10,G5:M20' - * - * @param string $value - * @param int $index Identifier for a specific print area range allowing several ranges to be set - * When the method is "O"verwrite, then a positive integer index will overwrite that indexed - * entry in the print areas list; a negative index value will identify which entry to - * overwrite working bacward through the print area to the list, with the last entry as -1. - * Specifying an index value of 0, will overwrite <b>all</b> existing print ranges. - * When the method is "I"nsert, then a positive index will insert after that indexed entry in - * the print areas list, while a negative index will insert before the indexed entry. - * Specifying an index value of 0, will always append the new print range at the end of the - * list. - * Print areas are numbered from 1 - * @param string $method Determines the method used when setting multiple print areas - * Default behaviour, or the "O" method, overwrites existing print area - * The "I" method, inserts the new print area before any specified index, or at the end of the list - * @return PHPExcel_Worksheet_PageSetup - * @throws PHPExcel_Exception - */ - public function setPrintArea($value, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) - { - if (strpos($value, '!') !== false) { - throw new PHPExcel_Exception('Cell coordinate must not specify a worksheet.'); - } elseif (strpos($value, ':') === false) { - throw new PHPExcel_Exception('Cell coordinate must be a range of cells.'); - } elseif (strpos($value, '$') !== false) { - throw new PHPExcel_Exception('Cell coordinate must not be absolute.'); - } - $value = strtoupper($value); - - if ($method == self::SETPRINTRANGE_OVERWRITE) { - if ($index == 0) { - $this->printArea = $value; - } else { - $printAreas = explode(',', $this->printArea); - if ($index < 0) { - $index = count($printAreas) - abs($index) + 1; - } - if (($index <= 0) || ($index > count($printAreas))) { - throw new PHPExcel_Exception('Invalid index for setting print range.'); - } - $printAreas[$index-1] = $value; - $this->printArea = implode(',', $printAreas); - } - } elseif ($method == self::SETPRINTRANGE_INSERT) { - if ($index == 0) { - $this->printArea .= ($this->printArea == '') ? $value : ','.$value; - } else { - $printAreas = explode(',', $this->printArea); - if ($index < 0) { - $index = abs($index) - 1; - } - if ($index > count($printAreas)) { - throw new PHPExcel_Exception('Invalid index for setting print range.'); - } - $printAreas = array_merge(array_slice($printAreas, 0, $index), array($value), array_slice($printAreas, $index)); - $this->printArea = implode(',', $printAreas); - } - } else { - throw new PHPExcel_Exception('Invalid method for setting print range.'); - } - - return $this; - } - - /** - * Add a new print area (e.g. 'A1:D10' or 'A1:D10,G5:M20') to the list of print areas - * - * @param string $value - * @param int $index Identifier for a specific print area range allowing several ranges to be set - * A positive index will insert after that indexed entry in the print areas list, while a - * negative index will insert before the indexed entry. - * Specifying an index value of 0, will always append the new print range at the end of the - * list. - * Print areas are numbered from 1 - * @return PHPExcel_Worksheet_PageSetup - * @throws PHPExcel_Exception - */ - public function addPrintArea($value, $index = -1) - { - return $this->setPrintArea($value, $index, self::SETPRINTRANGE_INSERT); - } - - /** - * Set print area - * - * @param int $column1 Column 1 - * @param int $row1 Row 1 - * @param int $column2 Column 2 - * @param int $row2 Row 2 - * @param int $index Identifier for a specific print area range allowing several ranges to be set - * When the method is "O"verwrite, then a positive integer index will overwrite that indexed - * entry in the print areas list; a negative index value will identify which entry to - * overwrite working bacward through the print area to the list, with the last entry as -1. - * Specifying an index value of 0, will overwrite <b>all</b> existing print ranges. - * When the method is "I"nsert, then a positive index will insert after that indexed entry in - * the print areas list, while a negative index will insert before the indexed entry. - * Specifying an index value of 0, will always append the new print range at the end of the - * list. - * Print areas are numbered from 1 - * @param string $method Determines the method used when setting multiple print areas - * Default behaviour, or the "O" method, overwrites existing print area - * The "I" method, inserts the new print area before any specified index, or at the end of the list - * @return PHPExcel_Worksheet_PageSetup - * @throws PHPExcel_Exception - */ - public function setPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = 0, $method = self::SETPRINTRANGE_OVERWRITE) - { - return $this->setPrintArea( - PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, - $index, - $method - ); - } - - /** - * Add a new print area to the list of print areas - * - * @param int $column1 Start Column for the print area - * @param int $row1 Start Row for the print area - * @param int $column2 End Column for the print area - * @param int $row2 End Row for the print area - * @param int $index Identifier for a specific print area range allowing several ranges to be set - * A positive index will insert after that indexed entry in the print areas list, while a - * negative index will insert before the indexed entry. - * Specifying an index value of 0, will always append the new print range at the end of the - * list. - * Print areas are numbered from 1 - * @return PHPExcel_Worksheet_PageSetup - * @throws PHPExcel_Exception - */ - public function addPrintAreaByColumnAndRow($column1, $row1, $column2, $row2, $index = -1) - { - return $this->setPrintArea( - PHPExcel_Cell::stringFromColumnIndex($column1) . $row1 . ':' . PHPExcel_Cell::stringFromColumnIndex($column2) . $row2, - $index, - self::SETPRINTRANGE_INSERT - ); - } - - /** - * Get first page number - * - * @return int - */ - public function getFirstPageNumber() - { - return $this->firstPageNumber; - } - - /** - * Set first page number - * - * @param int $value - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function setFirstPageNumber($value = null) - { - $this->firstPageNumber = $value; - return $this; - } - - /** - * Reset first page number - * - * @return PHPExcel_Worksheet_HeaderFooter - */ - public function resetFirstPageNumber() - { - return $this->setFirstPageNumber(null); - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Protection.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Protection.php deleted file mode 100644 index 00633ee..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Protection.php +++ /dev/null @@ -1,581 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Worksheet_Protection - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Worksheet_Protection -{ - /** - * Sheet - * - * @var boolean - */ - private $sheet = false; - - /** - * Objects - * - * @var boolean - */ - private $objects = false; - - /** - * Scenarios - * - * @var boolean - */ - private $scenarios = false; - - /** - * Format cells - * - * @var boolean - */ - private $formatCells = false; - - /** - * Format columns - * - * @var boolean - */ - private $formatColumns = false; - - /** - * Format rows - * - * @var boolean - */ - private $formatRows = false; - - /** - * Insert columns - * - * @var boolean - */ - private $insertColumns = false; - - /** - * Insert rows - * - * @var boolean - */ - private $insertRows = false; - - /** - * Insert hyperlinks - * - * @var boolean - */ - private $insertHyperlinks = false; - - /** - * Delete columns - * - * @var boolean - */ - private $deleteColumns = false; - - /** - * Delete rows - * - * @var boolean - */ - private $deleteRows = false; - - /** - * Select locked cells - * - * @var boolean - */ - private $selectLockedCells = false; - - /** - * Sort - * - * @var boolean - */ - private $sort = false; - - /** - * AutoFilter - * - * @var boolean - */ - private $autoFilter = false; - - /** - * Pivot tables - * - * @var boolean - */ - private $pivotTables = false; - - /** - * Select unlocked cells - * - * @var boolean - */ - private $selectUnlockedCells = false; - - /** - * Password - * - * @var string - */ - private $password = ''; - - /** - * Create a new PHPExcel_Worksheet_Protection - */ - public function __construct() - { - } - - /** - * Is some sort of protection enabled? - * - * @return boolean - */ - public function isProtectionEnabled() - { - return $this->sheet || - $this->objects || - $this->scenarios || - $this->formatCells || - $this->formatColumns || - $this->formatRows || - $this->insertColumns || - $this->insertRows || - $this->insertHyperlinks || - $this->deleteColumns || - $this->deleteRows || - $this->selectLockedCells || - $this->sort || - $this->autoFilter || - $this->pivotTables || - $this->selectUnlockedCells; - } - - /** - * Get Sheet - * - * @return boolean - */ - public function getSheet() - { - return $this->sheet; - } - - /** - * Set Sheet - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setSheet($pValue = false) - { - $this->sheet = $pValue; - return $this; - } - - /** - * Get Objects - * - * @return boolean - */ - public function getObjects() - { - return $this->objects; - } - - /** - * Set Objects - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setObjects($pValue = false) - { - $this->objects = $pValue; - return $this; - } - - /** - * Get Scenarios - * - * @return boolean - */ - public function getScenarios() - { - return $this->scenarios; - } - - /** - * Set Scenarios - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setScenarios($pValue = false) - { - $this->scenarios = $pValue; - return $this; - } - - /** - * Get FormatCells - * - * @return boolean - */ - public function getFormatCells() - { - return $this->formatCells; - } - - /** - * Set FormatCells - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setFormatCells($pValue = false) - { - $this->formatCells = $pValue; - return $this; - } - - /** - * Get FormatColumns - * - * @return boolean - */ - public function getFormatColumns() - { - return $this->formatColumns; - } - - /** - * Set FormatColumns - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setFormatColumns($pValue = false) - { - $this->formatColumns = $pValue; - return $this; - } - - /** - * Get FormatRows - * - * @return boolean - */ - public function getFormatRows() - { - return $this->formatRows; - } - - /** - * Set FormatRows - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setFormatRows($pValue = false) - { - $this->formatRows = $pValue; - return $this; - } - - /** - * Get InsertColumns - * - * @return boolean - */ - public function getInsertColumns() - { - return $this->insertColumns; - } - - /** - * Set InsertColumns - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setInsertColumns($pValue = false) - { - $this->insertColumns = $pValue; - return $this; - } - - /** - * Get InsertRows - * - * @return boolean - */ - public function getInsertRows() - { - return $this->insertRows; - } - - /** - * Set InsertRows - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setInsertRows($pValue = false) - { - $this->insertRows = $pValue; - return $this; - } - - /** - * Get InsertHyperlinks - * - * @return boolean - */ - public function getInsertHyperlinks() - { - return $this->insertHyperlinks; - } - - /** - * Set InsertHyperlinks - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setInsertHyperlinks($pValue = false) - { - $this->insertHyperlinks = $pValue; - return $this; - } - - /** - * Get DeleteColumns - * - * @return boolean - */ - public function getDeleteColumns() - { - return $this->deleteColumns; - } - - /** - * Set DeleteColumns - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setDeleteColumns($pValue = false) - { - $this->deleteColumns = $pValue; - return $this; - } - - /** - * Get DeleteRows - * - * @return boolean - */ - public function getDeleteRows() - { - return $this->deleteRows; - } - - /** - * Set DeleteRows - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setDeleteRows($pValue = false) - { - $this->deleteRows = $pValue; - return $this; - } - - /** - * Get SelectLockedCells - * - * @return boolean - */ - public function getSelectLockedCells() - { - return $this->selectLockedCells; - } - - /** - * Set SelectLockedCells - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setSelectLockedCells($pValue = false) - { - $this->selectLockedCells = $pValue; - return $this; - } - - /** - * Get Sort - * - * @return boolean - */ - public function getSort() - { - return $this->sort; - } - - /** - * Set Sort - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setSort($pValue = false) - { - $this->sort = $pValue; - return $this; - } - - /** - * Get AutoFilter - * - * @return boolean - */ - public function getAutoFilter() - { - return $this->autoFilter; - } - - /** - * Set AutoFilter - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setAutoFilter($pValue = false) - { - $this->autoFilter = $pValue; - return $this; - } - - /** - * Get PivotTables - * - * @return boolean - */ - public function getPivotTables() - { - return $this->pivotTables; - } - - /** - * Set PivotTables - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setPivotTables($pValue = false) - { - $this->pivotTables = $pValue; - return $this; - } - - /** - * Get SelectUnlockedCells - * - * @return boolean - */ - public function getSelectUnlockedCells() - { - return $this->selectUnlockedCells; - } - - /** - * Set SelectUnlockedCells - * - * @param boolean $pValue - * @return PHPExcel_Worksheet_Protection - */ - public function setSelectUnlockedCells($pValue = false) - { - $this->selectUnlockedCells = $pValue; - return $this; - } - - /** - * Get Password (hashed) - * - * @return string - */ - public function getPassword() - { - return $this->password; - } - - /** - * Set Password - * - * @param string $pValue - * @param boolean $pAlreadyHashed If the password has already been hashed, set this to true - * @return PHPExcel_Worksheet_Protection - */ - public function setPassword($pValue = '', $pAlreadyHashed = false) - { - if (!$pAlreadyHashed) { - $pValue = PHPExcel_Shared_PasswordHasher::hashPassword($pValue); - } - $this->password = $pValue; - return $this; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Row.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Row.php deleted file mode 100644 index 4f6034f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/Row.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_Row - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_Row -{ - /** - * PHPExcel_Worksheet - * - * @var PHPExcel_Worksheet - */ - private $parent; - - /** - * Row index - * - * @var int - */ - private $rowIndex = 0; - - /** - * Create a new row - * - * @param PHPExcel_Worksheet $parent - * @param int $rowIndex - */ - public function __construct(PHPExcel_Worksheet $parent = null, $rowIndex = 1) - { - // Set parent and row index - $this->parent = $parent; - $this->rowIndex = $rowIndex; - } - - /** - * Destructor - */ - public function __destruct() - { - unset($this->parent); - } - - /** - * Get row index - * - * @return int - */ - public function getRowIndex() - { - return $this->rowIndex; - } - - /** - * Get cell iterator - * - * @param string $startColumn The column address at which to start iterating - * @param string $endColumn Optionally, the column address at which to stop iterating - * @return PHPExcel_Worksheet_CellIterator - */ - public function getCellIterator($startColumn = 'A', $endColumn = null) - { - return new PHPExcel_Worksheet_RowCellIterator($this->parent, $this->rowIndex, $startColumn, $endColumn); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowCellIterator.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowCellIterator.php deleted file mode 100644 index 90eb9c9..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowCellIterator.php +++ /dev/null @@ -1,225 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_RowCellIterator - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_RowCellIterator extends PHPExcel_Worksheet_CellIterator implements Iterator -{ - /** - * Row index - * - * @var int - */ - protected $rowIndex; - - /** - * Start position - * - * @var int - */ - protected $startColumn = 0; - - /** - * End position - * - * @var int - */ - protected $endColumn = 0; - - /** - * Create a new column iterator - * - * @param PHPExcel_Worksheet $subject The worksheet to iterate over - * @param integer $rowIndex The row that we want to iterate - * @param string $startColumn The column address at which to start iterating - * @param string $endColumn Optionally, the column address at which to stop iterating - */ - public function __construct(PHPExcel_Worksheet $subject = null, $rowIndex = 1, $startColumn = 'A', $endColumn = null) - { - // Set subject and row index - $this->subject = $subject; - $this->rowIndex = $rowIndex; - $this->resetEnd($endColumn); - $this->resetStart($startColumn); - } - - /** - * Destructor - */ - public function __destruct() - { - unset($this->subject); - } - - /** - * (Re)Set the start column and the current column pointer - * - * @param integer $startColumn The column address at which to start iterating - * @return PHPExcel_Worksheet_RowCellIterator - * @throws PHPExcel_Exception - */ - public function resetStart($startColumn = 'A') - { - $startColumnIndex = PHPExcel_Cell::columnIndexFromString($startColumn) - 1; - $this->startColumn = $startColumnIndex; - $this->adjustForExistingOnlyRange(); - $this->seek(PHPExcel_Cell::stringFromColumnIndex($this->startColumn)); - - return $this; - } - - /** - * (Re)Set the end column - * - * @param string $endColumn The column address at which to stop iterating - * @return PHPExcel_Worksheet_RowCellIterator - * @throws PHPExcel_Exception - */ - public function resetEnd($endColumn = null) - { - $endColumn = ($endColumn) ? $endColumn : $this->subject->getHighestColumn(); - $this->endColumn = PHPExcel_Cell::columnIndexFromString($endColumn) - 1; - $this->adjustForExistingOnlyRange(); - - return $this; - } - - /** - * Set the column pointer to the selected column - * - * @param string $column The column address to set the current pointer at - * @return PHPExcel_Worksheet_RowCellIterator - * @throws PHPExcel_Exception - */ - public function seek($column = 'A') - { - $column = PHPExcel_Cell::columnIndexFromString($column) - 1; - if (($column < $this->startColumn) || ($column > $this->endColumn)) { - throw new PHPExcel_Exception("Column $column is out of range ({$this->startColumn} - {$this->endColumn})"); - } elseif ($this->onlyExistingCells && !($this->subject->cellExistsByColumnAndRow($column, $this->rowIndex))) { - throw new PHPExcel_Exception('In "IterateOnlyExistingCells" mode and Cell does not exist'); - } - $this->position = $column; - - return $this; - } - - /** - * Rewind the iterator to the starting column - */ - public function rewind() - { - $this->position = $this->startColumn; - } - - /** - * Return the current cell in this worksheet row - * - * @return PHPExcel_Cell - */ - public function current() - { - return $this->subject->getCellByColumnAndRow($this->position, $this->rowIndex); - } - - /** - * Return the current iterator key - * - * @return string - */ - public function key() - { - return PHPExcel_Cell::stringFromColumnIndex($this->position); - } - - /** - * Set the iterator to its next value - */ - public function next() - { - do { - ++$this->position; - } while (($this->onlyExistingCells) && - (!$this->subject->cellExistsByColumnAndRow($this->position, $this->rowIndex)) && - ($this->position <= $this->endColumn)); - } - - /** - * Set the iterator to its previous value - * - * @throws PHPExcel_Exception - */ - public function prev() - { - if ($this->position <= $this->startColumn) { - throw new PHPExcel_Exception( - "Column is already at the beginning of range (" . - PHPExcel_Cell::stringFromColumnIndex($this->endColumn) . " - " . - PHPExcel_Cell::stringFromColumnIndex($this->endColumn) . ")" - ); - } - - do { - --$this->position; - } while (($this->onlyExistingCells) && - (!$this->subject->cellExistsByColumnAndRow($this->position, $this->rowIndex)) && - ($this->position >= $this->startColumn)); - } - - /** - * Indicate if more columns exist in the worksheet range of columns that we're iterating - * - * @return boolean - */ - public function valid() - { - return $this->position <= $this->endColumn; - } - - /** - * Validate start/end values for "IterateOnlyExistingCells" mode, and adjust if necessary - * - * @throws PHPExcel_Exception - */ - protected function adjustForExistingOnlyRange() - { - if ($this->onlyExistingCells) { - while ((!$this->subject->cellExistsByColumnAndRow($this->startColumn, $this->rowIndex)) && - ($this->startColumn <= $this->endColumn)) { - ++$this->startColumn; - } - if ($this->startColumn > $this->endColumn) { - throw new PHPExcel_Exception('No cells exist within the specified range'); - } - while ((!$this->subject->cellExistsByColumnAndRow($this->endColumn, $this->rowIndex)) && - ($this->endColumn >= $this->startColumn)) { - --$this->endColumn; - } - if ($this->endColumn < $this->startColumn) { - throw new PHPExcel_Exception('No cells exist within the specified range'); - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowDimension.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowDimension.php deleted file mode 100644 index c147486..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowDimension.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_RowDimension - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_RowDimension extends PHPExcel_Worksheet_Dimension -{ - /** - * Row index - * - * @var int - */ - private $rowIndex; - - /** - * Row height (in pt) - * - * When this is set to a negative value, the row height should be ignored by IWriter - * - * @var double - */ - private $height = -1; - - /** - * ZeroHeight for Row? - * - * @var bool - */ - private $zeroHeight = false; - - /** - * Create a new PHPExcel_Worksheet_RowDimension - * - * @param int $pIndex Numeric row index - */ - public function __construct($pIndex = 0) - { - // Initialise values - $this->rowIndex = $pIndex; - - // set dimension as unformatted by default - parent::__construct(null); - } - - /** - * Get Row Index - * - * @return int - */ - public function getRowIndex() - { - return $this->rowIndex; - } - - /** - * Set Row Index - * - * @param int $pValue - * @return PHPExcel_Worksheet_RowDimension - */ - public function setRowIndex($pValue) - { - $this->rowIndex = $pValue; - return $this; - } - - /** - * Get Row Height - * - * @return double - */ - public function getRowHeight() - { - return $this->height; - } - - /** - * Set Row Height - * - * @param double $pValue - * @return PHPExcel_Worksheet_RowDimension - */ - public function setRowHeight($pValue = -1) - { - $this->height = $pValue; - return $this; - } - - /** - * Get ZeroHeight - * - * @return bool - */ - public function getZeroHeight() - { - return $this->zeroHeight; - } - - /** - * Set ZeroHeight - * - * @param bool $pValue - * @return PHPExcel_Worksheet_RowDimension - */ - public function setZeroHeight($pValue = false) - { - $this->zeroHeight = $pValue; - return $this; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowIterator.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowIterator.php deleted file mode 100644 index 9ddb3e0..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/RowIterator.php +++ /dev/null @@ -1,192 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_RowIterator - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_RowIterator implements Iterator -{ - /** - * PHPExcel_Worksheet to iterate - * - * @var PHPExcel_Worksheet - */ - private $subject; - - /** - * Current iterator position - * - * @var int - */ - private $position = 1; - - /** - * Start position - * - * @var int - */ - private $startRow = 1; - - - /** - * End position - * - * @var int - */ - private $endRow = 1; - - - /** - * Create a new row iterator - * - * @param PHPExcel_Worksheet $subject The worksheet to iterate over - * @param integer $startRow The row number at which to start iterating - * @param integer $endRow Optionally, the row number at which to stop iterating - */ - public function __construct(PHPExcel_Worksheet $subject, $startRow = 1, $endRow = null) - { - // Set subject - $this->subject = $subject; - $this->resetEnd($endRow); - $this->resetStart($startRow); - } - - /** - * Destructor - */ - public function __destruct() - { - unset($this->subject); - } - - /** - * (Re)Set the start row and the current row pointer - * - * @param integer $startRow The row number at which to start iterating - * @return PHPExcel_Worksheet_RowIterator - * @throws PHPExcel_Exception - */ - public function resetStart($startRow = 1) - { - if ($startRow > $this->subject->getHighestRow()) { - throw new PHPExcel_Exception("Start row ({$startRow}) is beyond highest row ({$this->subject->getHighestRow()})"); - } - - $this->startRow = $startRow; - if ($this->endRow < $this->startRow) { - $this->endRow = $this->startRow; - } - $this->seek($startRow); - - return $this; - } - - /** - * (Re)Set the end row - * - * @param integer $endRow The row number at which to stop iterating - * @return PHPExcel_Worksheet_RowIterator - */ - public function resetEnd($endRow = null) - { - $this->endRow = ($endRow) ? $endRow : $this->subject->getHighestRow(); - - return $this; - } - - /** - * Set the row pointer to the selected row - * - * @param integer $row The row number to set the current pointer at - * @return PHPExcel_Worksheet_RowIterator - * @throws PHPExcel_Exception - */ - public function seek($row = 1) - { - if (($row < $this->startRow) || ($row > $this->endRow)) { - throw new PHPExcel_Exception("Row $row is out of range ({$this->startRow} - {$this->endRow})"); - } - $this->position = $row; - - return $this; - } - - /** - * Rewind the iterator to the starting row - */ - public function rewind() - { - $this->position = $this->startRow; - } - - /** - * Return the current row in this worksheet - * - * @return PHPExcel_Worksheet_Row - */ - public function current() - { - return new PHPExcel_Worksheet_Row($this->subject, $this->position); - } - - /** - * Return the current iterator key - * - * @return int - */ - public function key() - { - return $this->position; - } - - /** - * Set the iterator to its next value - */ - public function next() - { - ++$this->position; - } - - /** - * Set the iterator to its previous value - */ - public function prev() - { - if ($this->position <= $this->startRow) { - throw new PHPExcel_Exception("Row is already at the beginning of range ({$this->startRow} - {$this->endRow})"); - } - - --$this->position; - } - - /** - * Indicate if more rows exist in the worksheet range of rows that we're iterating - * - * @return boolean - */ - public function valid() - { - return $this->position <= $this->endRow; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/SheetView.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/SheetView.php deleted file mode 100644 index 5aaef3b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet/SheetView.php +++ /dev/null @@ -1,187 +0,0 @@ -<?php - -/** - * PHPExcel_Worksheet_SheetView - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Worksheet - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Worksheet_SheetView -{ - - /* Sheet View types */ - const SHEETVIEW_NORMAL = 'normal'; - const SHEETVIEW_PAGE_LAYOUT = 'pageLayout'; - const SHEETVIEW_PAGE_BREAK_PREVIEW = 'pageBreakPreview'; - - private static $sheetViewTypes = array( - self::SHEETVIEW_NORMAL, - self::SHEETVIEW_PAGE_LAYOUT, - self::SHEETVIEW_PAGE_BREAK_PREVIEW, - ); - - /** - * ZoomScale - * - * Valid values range from 10 to 400. - * - * @var int - */ - private $zoomScale = 100; - - /** - * ZoomScaleNormal - * - * Valid values range from 10 to 400. - * - * @var int - */ - private $zoomScaleNormal = 100; - - /** - * View - * - * Valid values range from 10 to 400. - * - * @var string - */ - private $sheetviewType = self::SHEETVIEW_NORMAL; - - /** - * Create a new PHPExcel_Worksheet_SheetView - */ - public function __construct() - { - } - - /** - * Get ZoomScale - * - * @return int - */ - public function getZoomScale() - { - return $this->zoomScale; - } - - /** - * Set ZoomScale - * - * Valid values range from 10 to 400. - * - * @param int $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_SheetView - */ - public function setZoomScale($pValue = 100) - { - // Microsoft Office Excel 2007 only allows setting a scale between 10 and 400 via the user interface, - // but it is apparently still able to handle any scale >= 1 - if (($pValue >= 1) || is_null($pValue)) { - $this->zoomScale = $pValue; - } else { - throw new PHPExcel_Exception("Scale must be greater than or equal to 1."); - } - return $this; - } - - /** - * Get ZoomScaleNormal - * - * @return int - */ - public function getZoomScaleNormal() - { - return $this->zoomScaleNormal; - } - - /** - * Set ZoomScale - * - * Valid values range from 10 to 400. - * - * @param int $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_SheetView - */ - public function setZoomScaleNormal($pValue = 100) - { - if (($pValue >= 1) || is_null($pValue)) { - $this->zoomScaleNormal = $pValue; - } else { - throw new PHPExcel_Exception("Scale must be greater than or equal to 1."); - } - return $this; - } - - /** - * Get View - * - * @return string - */ - public function getView() - { - return $this->sheetviewType; - } - - /** - * Set View - * - * Valid values are - * 'normal' self::SHEETVIEW_NORMAL - * 'pageLayout' self::SHEETVIEW_PAGE_LAYOUT - * 'pageBreakPreview' self::SHEETVIEW_PAGE_BREAK_PREVIEW - * - * @param string $pValue - * @throws PHPExcel_Exception - * @return PHPExcel_Worksheet_SheetView - */ - public function setView($pValue = null) - { - // MS Excel 2007 allows setting the view to 'normal', 'pageLayout' or 'pageBreakPreview' via the user interface - if ($pValue === null) { - $pValue = self::SHEETVIEW_NORMAL; - } - if (in_array($pValue, self::$sheetViewTypes)) { - $this->sheetviewType = $pValue; - } else { - throw new PHPExcel_Exception("Invalid sheetview layout type."); - } - - return $this; - } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/WorksheetIterator.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/WorksheetIterator.php deleted file mode 100644 index cb1b281..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/WorksheetIterator.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -/** - * PHPExcel_WorksheetIterator - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_WorksheetIterator implements Iterator -{ - /** - * Spreadsheet to iterate - * - * @var PHPExcel - */ - private $subject; - - /** - * Current iterator position - * - * @var int - */ - private $position = 0; - - /** - * Create a new worksheet iterator - * - * @param PHPExcel $subject - */ - public function __construct(PHPExcel $subject = null) - { - // Set subject - $this->subject = $subject; - } - - /** - * Destructor - */ - public function __destruct() - { - unset($this->subject); - } - - /** - * Rewind iterator - */ - public function rewind() - { - $this->position = 0; - } - - /** - * Current PHPExcel_Worksheet - * - * @return PHPExcel_Worksheet - */ - public function current() - { - return $this->subject->getSheet($this->position); - } - - /** - * Current key - * - * @return int - */ - public function key() - { - return $this->position; - } - - /** - * Next value - */ - public function next() - { - ++$this->position; - } - - /** - * More PHPExcel_Worksheet instances available? - * - * @return boolean - */ - public function valid() - { - return $this->position < $this->subject->getSheetCount(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Abstract.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Abstract.php deleted file mode 100644 index 2a797a9..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Abstract.php +++ /dev/null @@ -1,157 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Abstract - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -abstract class PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter -{ - /** - * Write charts that are defined in the workbook? - * Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object; - * - * @var boolean - */ - protected $includeCharts = false; - - /** - * Pre-calculate formulas - * Forces PHPExcel to recalculate all formulae in a workbook when saving, so that the pre-calculated values are - * immediately available to MS Excel or other office spreadsheet viewer when opening the file - * - * @var boolean - */ - protected $preCalculateFormulas = true; - - /** - * Use disk caching where possible? - * - * @var boolean - */ - protected $_useDiskCaching = false; - - /** - * Disk caching directory - * - * @var string - */ - protected $_diskCachingDirectory = './'; - - /** - * Write charts in workbook? - * If this is true, then the Writer will write definitions for any charts that exist in the PHPExcel object. - * If false (the default) it will ignore any charts defined in the PHPExcel object. - * - * @return boolean - */ - public function getIncludeCharts() - { - return $this->includeCharts; - } - - /** - * Set write charts in workbook - * Set to true, to advise the Writer to include any charts that exist in the PHPExcel object. - * Set to false (the default) to ignore charts. - * - * @param boolean $pValue - * @return PHPExcel_Writer_IWriter - */ - public function setIncludeCharts($pValue = false) - { - $this->includeCharts = (boolean) $pValue; - return $this; - } - - /** - * Get Pre-Calculate Formulas flag - * If this is true (the default), then the writer will recalculate all formulae in a workbook when saving, - * so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet - * viewer when opening the file - * If false, then formulae are not calculated on save. This is faster for saving in PHPExcel, but slower - * when opening the resulting file in MS Excel, because Excel has to recalculate the formulae itself - * - * @return boolean - */ - public function getPreCalculateFormulas() - { - return $this->preCalculateFormulas; - } - - /** - * Set Pre-Calculate Formulas - * Set to true (the default) to advise the Writer to calculate all formulae on save - * Set to false to prevent precalculation of formulae on save. - * - * @param boolean $pValue Pre-Calculate Formulas? - * @return PHPExcel_Writer_IWriter - */ - public function setPreCalculateFormulas($pValue = true) - { - $this->preCalculateFormulas = (boolean) $pValue; - return $this; - } - - /** - * Get use disk caching where possible? - * - * @return boolean - */ - public function getUseDiskCaching() - { - return $this->_useDiskCaching; - } - - /** - * Set use disk caching where possible? - * - * @param boolean $pValue - * @param string $pDirectory Disk caching directory - * @throws PHPExcel_Writer_Exception when directory does not exist - * @return PHPExcel_Writer_Excel2007 - */ - public function setUseDiskCaching($pValue = false, $pDirectory = null) - { - $this->_useDiskCaching = $pValue; - - if ($pDirectory !== null) { - if (is_dir($pDirectory)) { - $this->_diskCachingDirectory = $pDirectory; - } else { - throw new PHPExcel_Writer_Exception("Directory does not exist: $pDirectory"); - } - } - return $this; - } - - /** - * Get disk caching directory - * - * @return string - */ - public function getDiskCachingDirectory() - { - return $this->_diskCachingDirectory; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/CSV.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/CSV.php deleted file mode 100644 index e59c301..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/CSV.php +++ /dev/null @@ -1,352 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_CSV - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_CSV - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_CSV extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter -{ - /** - * PHPExcel object - * - * @var PHPExcel - */ - private $phpExcel; - - /** - * Delimiter - * - * @var string - */ - private $delimiter = ','; - - /** - * Enclosure - * - * @var string - */ - private $enclosure = '"'; - - /** - * Line ending - * - * @var string - */ - private $lineEnding = PHP_EOL; - - /** - * Sheet index to write - * - * @var int - */ - private $sheetIndex = 0; - - /** - * Whether to write a BOM (for UTF8). - * - * @var boolean - */ - private $useBOM = false; - - /** - * Whether to write a Separator line as the first line of the file - * sep=x - * - * @var boolean - */ - private $includeSeparatorLine = false; - - /** - * Whether to write a fully Excel compatible CSV file. - * - * @var boolean - */ - private $excelCompatibility = false; - - /** - * Create a new PHPExcel_Writer_CSV - * - * @param PHPExcel $phpExcel PHPExcel object - */ - public function __construct(PHPExcel $phpExcel) - { - $this->phpExcel = $phpExcel; - } - - /** - * Save PHPExcel to file - * - * @param string $pFilename - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null) - { - // Fetch sheet - $sheet = $this->phpExcel->getSheet($this->sheetIndex); - - $saveDebugLog = PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->getWriteDebugLog(); - PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog(false); - $saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType(); - PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE); - - // Open file - $fileHandle = fopen($pFilename, 'wb+'); - if ($fileHandle === false) { - throw new PHPExcel_Writer_Exception("Could not open file $pFilename for writing."); - } - - if ($this->excelCompatibility) { - $this->setUseBOM(true); // Enforce UTF-8 BOM Header - $this->setIncludeSeparatorLine(true); // Set separator line - $this->setEnclosure('"'); // Set enclosure to " - $this->setDelimiter(";"); // Set delimiter to a semi-colon - $this->setLineEnding("\r\n"); - } - if ($this->useBOM) { - // Write the UTF-8 BOM code if required - fwrite($fileHandle, "\xEF\xBB\xBF"); - } - if ($this->includeSeparatorLine) { - // Write the separator line if required - fwrite($fileHandle, 'sep=' . $this->getDelimiter() . $this->lineEnding); - } - - // Identify the range that we need to extract from the worksheet - $maxCol = $sheet->getHighestDataColumn(); - $maxRow = $sheet->getHighestDataRow(); - - // Write rows to file - for ($row = 1; $row <= $maxRow; ++$row) { - // Convert the row to an array... - $cellsArray = $sheet->rangeToArray('A'.$row.':'.$maxCol.$row, '', $this->preCalculateFormulas); - // ... and write to the file - $this->writeLine($fileHandle, $cellsArray[0]); - } - - // Close file - fclose($fileHandle); - - PHPExcel_Calculation::setArrayReturnType($saveArrayReturnType); - PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog($saveDebugLog); - } - - /** - * Get delimiter - * - * @return string - */ - public function getDelimiter() - { - return $this->delimiter; - } - - /** - * Set delimiter - * - * @param string $pValue Delimiter, defaults to , - * @return PHPExcel_Writer_CSV - */ - public function setDelimiter($pValue = ',') - { - $this->delimiter = $pValue; - return $this; - } - - /** - * Get enclosure - * - * @return string - */ - public function getEnclosure() - { - return $this->enclosure; - } - - /** - * Set enclosure - * - * @param string $pValue Enclosure, defaults to " - * @return PHPExcel_Writer_CSV - */ - public function setEnclosure($pValue = '"') - { - if ($pValue == '') { - $pValue = null; - } - $this->enclosure = $pValue; - return $this; - } - - /** - * Get line ending - * - * @return string - */ - public function getLineEnding() - { - return $this->lineEnding; - } - - /** - * Set line ending - * - * @param string $pValue Line ending, defaults to OS line ending (PHP_EOL) - * @return PHPExcel_Writer_CSV - */ - public function setLineEnding($pValue = PHP_EOL) - { - $this->lineEnding = $pValue; - return $this; - } - - /** - * Get whether BOM should be used - * - * @return boolean - */ - public function getUseBOM() - { - return $this->useBOM; - } - - /** - * Set whether BOM should be used - * - * @param boolean $pValue Use UTF-8 byte-order mark? Defaults to false - * @return PHPExcel_Writer_CSV - */ - public function setUseBOM($pValue = false) - { - $this->useBOM = $pValue; - return $this; - } - - /** - * Get whether a separator line should be included - * - * @return boolean - */ - public function getIncludeSeparatorLine() - { - return $this->includeSeparatorLine; - } - - /** - * Set whether a separator line should be included as the first line of the file - * - * @param boolean $pValue Use separator line? Defaults to false - * @return PHPExcel_Writer_CSV - */ - public function setIncludeSeparatorLine($pValue = false) - { - $this->includeSeparatorLine = $pValue; - return $this; - } - - /** - * Get whether the file should be saved with full Excel Compatibility - * - * @return boolean - */ - public function getExcelCompatibility() - { - return $this->excelCompatibility; - } - - /** - * Set whether the file should be saved with full Excel Compatibility - * - * @param boolean $pValue Set the file to be written as a fully Excel compatible csv file - * Note that this overrides other settings such as useBOM, enclosure and delimiter - * @return PHPExcel_Writer_CSV - */ - public function setExcelCompatibility($pValue = false) - { - $this->excelCompatibility = $pValue; - return $this; - } - - /** - * Get sheet index - * - * @return int - */ - public function getSheetIndex() - { - return $this->sheetIndex; - } - - /** - * Set sheet index - * - * @param int $pValue Sheet index - * @return PHPExcel_Writer_CSV - */ - public function setSheetIndex($pValue = 0) - { - $this->sheetIndex = $pValue; - return $this; - } - - /** - * Write line to CSV file - * - * @param mixed $pFileHandle PHP filehandle - * @param array $pValues Array containing values in a row - * @throws PHPExcel_Writer_Exception - */ - private function writeLine($pFileHandle = null, $pValues = null) - { - if (is_array($pValues)) { - // No leading delimiter - $writeDelimiter = false; - - // Build the line - $line = ''; - - foreach ($pValues as $element) { - // Escape enclosures - $element = str_replace($this->enclosure, $this->enclosure . $this->enclosure, $element); - - // Add delimiter - if ($writeDelimiter) { - $line .= $this->delimiter; - } else { - $writeDelimiter = true; - } - - // Add enclosed string - $line .= $this->enclosure . $element . $this->enclosure; - } - - // Add line ending - $line .= $this->lineEnding; - - // Write to file - fwrite($pFileHandle, $line); - } else { - throw new PHPExcel_Writer_Exception("Invalid data row passed to CSV writer."); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php deleted file mode 100644 index 11d354b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007.php +++ /dev/null @@ -1,533 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007 - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007 extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter -{ - /** - * Pre-calculate formulas - * Forces PHPExcel to recalculate all formulae in a workbook when saving, so that the pre-calculated values are - * immediately available to MS Excel or other office spreadsheet viewer when opening the file - * - * Overrides the default TRUE for this specific writer for performance reasons - * - * @var boolean - */ - protected $preCalculateFormulas = false; - - /** - * Office2003 compatibility - * - * @var boolean - */ - private $office2003compatibility = false; - - /** - * Private writer parts - * - * @var PHPExcel_Writer_Excel2007_WriterPart[] - */ - private $writerParts = array(); - - /** - * Private PHPExcel - * - * @var PHPExcel - */ - private $spreadSheet; - - /** - * Private string table - * - * @var string[] - */ - private $stringTable = array(); - - /** - * Private unique PHPExcel_Style_Conditional HashTable - * - * @var PHPExcel_HashTable - */ - private $stylesConditionalHashTable; - - /** - * Private unique PHPExcel_Style HashTable - * - * @var PHPExcel_HashTable - */ - private $styleHashTable; - - /** - * Private unique PHPExcel_Style_Fill HashTable - * - * @var PHPExcel_HashTable - */ - private $fillHashTable; - - /** - * Private unique PHPExcel_Style_Font HashTable - * - * @var PHPExcel_HashTable - */ - private $fontHashTable; - - /** - * Private unique PHPExcel_Style_Borders HashTable - * - * @var PHPExcel_HashTable - */ - private $bordersHashTable ; - - /** - * Private unique PHPExcel_Style_NumberFormat HashTable - * - * @var PHPExcel_HashTable - */ - private $numFmtHashTable; - - /** - * Private unique PHPExcel_Worksheet_BaseDrawing HashTable - * - * @var PHPExcel_HashTable - */ - private $drawingHashTable; - - /** - * Create a new PHPExcel_Writer_Excel2007 - * - * @param PHPExcel $pPHPExcel - */ - public function __construct(PHPExcel $pPHPExcel = null) - { - // Assign PHPExcel - $this->setPHPExcel($pPHPExcel); - - $writerPartsArray = array( 'stringtable' => 'PHPExcel_Writer_Excel2007_StringTable', - 'contenttypes' => 'PHPExcel_Writer_Excel2007_ContentTypes', - 'docprops' => 'PHPExcel_Writer_Excel2007_DocProps', - 'rels' => 'PHPExcel_Writer_Excel2007_Rels', - 'theme' => 'PHPExcel_Writer_Excel2007_Theme', - 'style' => 'PHPExcel_Writer_Excel2007_Style', - 'workbook' => 'PHPExcel_Writer_Excel2007_Workbook', - 'worksheet' => 'PHPExcel_Writer_Excel2007_Worksheet', - 'drawing' => 'PHPExcel_Writer_Excel2007_Drawing', - 'comments' => 'PHPExcel_Writer_Excel2007_Comments', - 'chart' => 'PHPExcel_Writer_Excel2007_Chart', - 'relsvba' => 'PHPExcel_Writer_Excel2007_RelsVBA', - 'relsribbonobjects' => 'PHPExcel_Writer_Excel2007_RelsRibbon' - ); - - // Initialise writer parts - // and Assign their parent IWriters - foreach ($writerPartsArray as $writer => $class) { - $this->writerParts[$writer] = new $class($this); - } - - $hashTablesArray = array( 'stylesConditionalHashTable', 'fillHashTable', 'fontHashTable', - 'bordersHashTable', 'numFmtHashTable', 'drawingHashTable', - 'styleHashTable' - ); - - // Set HashTable variables - foreach ($hashTablesArray as $tableName) { - $this->$tableName = new PHPExcel_HashTable(); - } - } - - /** - * Get writer part - * - * @param string $pPartName Writer part name - * @return PHPExcel_Writer_Excel2007_WriterPart - */ - public function getWriterPart($pPartName = '') - { - if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { - return $this->writerParts[strtolower($pPartName)]; - } else { - return null; - } - } - - /** - * Save PHPExcel to file - * - * @param string $pFilename - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null) - { - if ($this->spreadSheet !== null) { - // garbage collect - $this->spreadSheet->garbageCollect(); - - // If $pFilename is php://output or php://stdout, make it a temporary file... - $originalFilename = $pFilename; - if (strtolower($pFilename) == 'php://output' || strtolower($pFilename) == 'php://stdout') { - $pFilename = @tempnam(PHPExcel_Shared_File::sys_get_temp_dir(), 'phpxltmp'); - if ($pFilename == '') { - $pFilename = $originalFilename; - } - } - - $saveDebugLog = PHPExcel_Calculation::getInstance($this->spreadSheet)->getDebugLog()->getWriteDebugLog(); - PHPExcel_Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog(false); - $saveDateReturnType = PHPExcel_Calculation_Functions::getReturnDateType(); - PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL); - - // Create string lookup table - $this->stringTable = array(); - for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { - $this->stringTable = $this->getWriterPart('StringTable')->createStringTable($this->spreadSheet->getSheet($i), $this->stringTable); - } - - // Create styles dictionaries - $this->styleHashTable->addFromSource($this->getWriterPart('Style')->allStyles($this->spreadSheet)); - $this->stylesConditionalHashTable->addFromSource($this->getWriterPart('Style')->allConditionalStyles($this->spreadSheet)); - $this->fillHashTable->addFromSource($this->getWriterPart('Style')->allFills($this->spreadSheet)); - $this->fontHashTable->addFromSource($this->getWriterPart('Style')->allFonts($this->spreadSheet)); - $this->bordersHashTable->addFromSource($this->getWriterPart('Style')->allBorders($this->spreadSheet)); - $this->numFmtHashTable->addFromSource($this->getWriterPart('Style')->allNumberFormats($this->spreadSheet)); - - // Create drawing dictionary - $this->drawingHashTable->addFromSource($this->getWriterPart('Drawing')->allDrawings($this->spreadSheet)); - - // Create new ZIP file and open it for writing - $zipClass = PHPExcel_Settings::getZipClass(); - $objZip = new $zipClass(); - - // Retrieve OVERWRITE and CREATE constants from the instantiated zip class - // This method of accessing constant values from a dynamic class should work with all appropriate versions of PHP - $ro = new ReflectionObject($objZip); - $zipOverWrite = $ro->getConstant('OVERWRITE'); - $zipCreate = $ro->getConstant('CREATE'); - - if (file_exists($pFilename)) { - unlink($pFilename); - } - // Try opening the ZIP file - if ($objZip->open($pFilename, $zipOverWrite) !== true) { - if ($objZip->open($pFilename, $zipCreate) !== true) { - throw new PHPExcel_Writer_Exception("Could not open " . $pFilename . " for writing."); - } - } - - // Add [Content_Types].xml to ZIP file - $objZip->addFromString('[Content_Types].xml', $this->getWriterPart('ContentTypes')->writeContentTypes($this->spreadSheet, $this->includeCharts)); - - //if hasMacros, add the vbaProject.bin file, Certificate file(if exists) - if ($this->spreadSheet->hasMacros()) { - $macrosCode=$this->spreadSheet->getMacrosCode(); - if (!is_null($macrosCode)) {// we have the code ? - $objZip->addFromString('xl/vbaProject.bin', $macrosCode);//allways in 'xl', allways named vbaProject.bin - if ($this->spreadSheet->hasMacrosCertificate()) {//signed macros ? - // Yes : add the certificate file and the related rels file - $objZip->addFromString('xl/vbaProjectSignature.bin', $this->spreadSheet->getMacrosCertificate()); - $objZip->addFromString('xl/_rels/vbaProject.bin.rels', $this->getWriterPart('RelsVBA')->writeVBARelationships($this->spreadSheet)); - } - } - } - //a custom UI in this workbook ? add it ("base" xml and additional objects (pictures) and rels) - if ($this->spreadSheet->hasRibbon()) { - $tmpRibbonTarget=$this->spreadSheet->getRibbonXMLData('target'); - $objZip->addFromString($tmpRibbonTarget, $this->spreadSheet->getRibbonXMLData('data')); - if ($this->spreadSheet->hasRibbonBinObjects()) { - $tmpRootPath=dirname($tmpRibbonTarget).'/'; - $ribbonBinObjects=$this->spreadSheet->getRibbonBinObjects('data');//the files to write - foreach ($ribbonBinObjects as $aPath => $aContent) { - $objZip->addFromString($tmpRootPath.$aPath, $aContent); - } - //the rels for files - $objZip->addFromString($tmpRootPath.'_rels/'.basename($tmpRibbonTarget).'.rels', $this->getWriterPart('RelsRibbonObjects')->writeRibbonRelationships($this->spreadSheet)); - } - } - - // Add relationships to ZIP file - $objZip->addFromString('_rels/.rels', $this->getWriterPart('Rels')->writeRelationships($this->spreadSheet)); - $objZip->addFromString('xl/_rels/workbook.xml.rels', $this->getWriterPart('Rels')->writeWorkbookRelationships($this->spreadSheet)); - - // Add document properties to ZIP file - $objZip->addFromString('docProps/app.xml', $this->getWriterPart('DocProps')->writeDocPropsApp($this->spreadSheet)); - $objZip->addFromString('docProps/core.xml', $this->getWriterPart('DocProps')->writeDocPropsCore($this->spreadSheet)); - $customPropertiesPart = $this->getWriterPart('DocProps')->writeDocPropsCustom($this->spreadSheet); - if ($customPropertiesPart !== null) { - $objZip->addFromString('docProps/custom.xml', $customPropertiesPart); - } - - // Add theme to ZIP file - $objZip->addFromString('xl/theme/theme1.xml', $this->getWriterPart('Theme')->writeTheme($this->spreadSheet)); - - // Add string table to ZIP file - $objZip->addFromString('xl/sharedStrings.xml', $this->getWriterPart('StringTable')->writeStringTable($this->stringTable)); - - // Add styles to ZIP file - $objZip->addFromString('xl/styles.xml', $this->getWriterPart('Style')->writeStyles($this->spreadSheet)); - - // Add workbook to ZIP file - $objZip->addFromString('xl/workbook.xml', $this->getWriterPart('Workbook')->writeWorkbook($this->spreadSheet, $this->preCalculateFormulas)); - - $chartCount = 0; - // Add worksheets - for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { - $objZip->addFromString('xl/worksheets/sheet' . ($i + 1) . '.xml', $this->getWriterPart('Worksheet')->writeWorksheet($this->spreadSheet->getSheet($i), $this->stringTable, $this->includeCharts)); - if ($this->includeCharts) { - $charts = $this->spreadSheet->getSheet($i)->getChartCollection(); - if (count($charts) > 0) { - foreach ($charts as $chart) { - $objZip->addFromString('xl/charts/chart' . ($chartCount + 1) . '.xml', $this->getWriterPart('Chart')->writeChart($chart, $this->preCalculateFormulas)); - $chartCount++; - } - } - } - } - - $chartRef1 = $chartRef2 = 0; - // Add worksheet relationships (drawings, ...) - for ($i = 0; $i < $this->spreadSheet->getSheetCount(); ++$i) { - // Add relationships - $objZip->addFromString('xl/worksheets/_rels/sheet' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeWorksheetRelationships($this->spreadSheet->getSheet($i), ($i + 1), $this->includeCharts)); - - $drawings = $this->spreadSheet->getSheet($i)->getDrawingCollection(); - $drawingCount = count($drawings); - if ($this->includeCharts) { - $chartCount = $this->spreadSheet->getSheet($i)->getChartCount(); - } - - // Add drawing and image relationship parts - if (($drawingCount > 0) || ($chartCount > 0)) { - // Drawing relationships - $objZip->addFromString('xl/drawings/_rels/drawing' . ($i + 1) . '.xml.rels', $this->getWriterPart('Rels')->writeDrawingRelationships($this->spreadSheet->getSheet($i), $chartRef1, $this->includeCharts)); - - // Drawings - $objZip->addFromString('xl/drawings/drawing' . ($i + 1) . '.xml', $this->getWriterPart('Drawing')->writeDrawings($this->spreadSheet->getSheet($i), $chartRef2, $this->includeCharts)); - } - - // Add comment relationship parts - if (count($this->spreadSheet->getSheet($i)->getComments()) > 0) { - // VML Comments - $objZip->addFromString('xl/drawings/vmlDrawing' . ($i + 1) . '.vml', $this->getWriterPart('Comments')->writeVMLComments($this->spreadSheet->getSheet($i))); - - // Comments - $objZip->addFromString('xl/comments' . ($i + 1) . '.xml', $this->getWriterPart('Comments')->writeComments($this->spreadSheet->getSheet($i))); - } - - // Add header/footer relationship parts - if (count($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages()) > 0) { - // VML Drawings - $objZip->addFromString('xl/drawings/vmlDrawingHF' . ($i + 1) . '.vml', $this->getWriterPart('Drawing')->writeVMLHeaderFooterImages($this->spreadSheet->getSheet($i))); - - // VML Drawing relationships - $objZip->addFromString('xl/drawings/_rels/vmlDrawingHF' . ($i + 1) . '.vml.rels', $this->getWriterPart('Rels')->writeHeaderFooterDrawingRelationships($this->spreadSheet->getSheet($i))); - - // Media - foreach ($this->spreadSheet->getSheet($i)->getHeaderFooter()->getImages() as $image) { - $objZip->addFromString('xl/media/' . $image->getIndexedFilename(), file_get_contents($image->getPath())); - } - } - } - - // Add media - for ($i = 0; $i < $this->getDrawingHashTable()->count(); ++$i) { - if ($this->getDrawingHashTable()->getByIndex($i) instanceof PHPExcel_Worksheet_Drawing) { - $imageContents = null; - $imagePath = $this->getDrawingHashTable()->getByIndex($i)->getPath(); - if (strpos($imagePath, 'zip://') !== false) { - $imagePath = substr($imagePath, 6); - $imagePathSplitted = explode('#', $imagePath); - - $imageZip = new ZipArchive(); - $imageZip->open($imagePathSplitted[0]); - $imageContents = $imageZip->getFromName($imagePathSplitted[1]); - $imageZip->close(); - unset($imageZip); - } else { - $imageContents = file_get_contents($imagePath); - } - - $objZip->addFromString('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); - } elseif ($this->getDrawingHashTable()->getByIndex($i) instanceof PHPExcel_Worksheet_MemoryDrawing) { - ob_start(); - call_user_func( - $this->getDrawingHashTable()->getByIndex($i)->getRenderingFunction(), - $this->getDrawingHashTable()->getByIndex($i)->getImageResource() - ); - $imageContents = ob_get_contents(); - ob_end_clean(); - - $objZip->addFromString('xl/media/' . str_replace(' ', '_', $this->getDrawingHashTable()->getByIndex($i)->getIndexedFilename()), $imageContents); - } - } - - PHPExcel_Calculation_Functions::setReturnDateType($saveDateReturnType); - PHPExcel_Calculation::getInstance($this->spreadSheet)->getDebugLog()->setWriteDebugLog($saveDebugLog); - - // Close file - if ($objZip->close() === false) { - throw new PHPExcel_Writer_Exception("Could not close zip file $pFilename."); - } - - // If a temporary file was used, copy it to the correct file stream - if ($originalFilename != $pFilename) { - if (copy($pFilename, $originalFilename) === false) { - throw new PHPExcel_Writer_Exception("Could not copy temporary zip file $pFilename to $originalFilename."); - } - @unlink($pFilename); - } - } else { - throw new PHPExcel_Writer_Exception("PHPExcel object unassigned."); - } - } - - /** - * Get PHPExcel object - * - * @return PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function getPHPExcel() - { - if ($this->spreadSheet !== null) { - return $this->spreadSheet; - } else { - throw new PHPExcel_Writer_Exception("No PHPExcel object assigned."); - } - } - - /** - * Set PHPExcel object - * - * @param PHPExcel $pPHPExcel PHPExcel object - * @throws PHPExcel_Writer_Exception - * @return PHPExcel_Writer_Excel2007 - */ - public function setPHPExcel(PHPExcel $pPHPExcel = null) - { - $this->spreadSheet = $pPHPExcel; - return $this; - } - - /** - * Get string table - * - * @return string[] - */ - public function getStringTable() - { - return $this->stringTable; - } - - /** - * Get PHPExcel_Style HashTable - * - * @return PHPExcel_HashTable - */ - public function getStyleHashTable() - { - return $this->styleHashTable; - } - - /** - * Get PHPExcel_Style_Conditional HashTable - * - * @return PHPExcel_HashTable - */ - public function getStylesConditionalHashTable() - { - return $this->stylesConditionalHashTable; - } - - /** - * Get PHPExcel_Style_Fill HashTable - * - * @return PHPExcel_HashTable - */ - public function getFillHashTable() - { - return $this->fillHashTable; - } - - /** - * Get PHPExcel_Style_Font HashTable - * - * @return PHPExcel_HashTable - */ - public function getFontHashTable() - { - return $this->fontHashTable; - } - - /** - * Get PHPExcel_Style_Borders HashTable - * - * @return PHPExcel_HashTable - */ - public function getBordersHashTable() - { - return $this->bordersHashTable; - } - - /** - * Get PHPExcel_Style_NumberFormat HashTable - * - * @return PHPExcel_HashTable - */ - public function getNumFmtHashTable() - { - return $this->numFmtHashTable; - } - - /** - * Get PHPExcel_Worksheet_BaseDrawing HashTable - * - * @return PHPExcel_HashTable - */ - public function getDrawingHashTable() - { - return $this->drawingHashTable; - } - - /** - * Get Office2003 compatibility - * - * @return boolean - */ - public function getOffice2003Compatibility() - { - return $this->office2003compatibility; - } - - /** - * Set Office2003 compatibility - * - * @param boolean $pValue Office2003 compatibility? - * @return PHPExcel_Writer_Excel2007 - */ - public function setOffice2003Compatibility($pValue = false) - { - $this->office2003compatibility = $pValue; - return $this; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Chart.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Chart.php deleted file mode 100644 index 92fa215..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Chart.php +++ /dev/null @@ -1,1520 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_Chart - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_Chart extends PHPExcel_Writer_Excel2007_WriterPart -{ - protected $calculateCellValues; - - /** - * Write charts to XML format - * - * @param PHPExcel_Chart $pChart - * - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeChart(PHPExcel_Chart $pChart = null, $calculateCellValues = true) - { - $this->calculateCellValues = $calculateCellValues; - - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - // Ensure that data series values are up-to-date before we save - if ($this->calculateCellValues) { - $pChart->refresh(); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // c:chartSpace - $objWriter->startElement('c:chartSpace'); - $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); - $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); - $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - - $objWriter->startElement('c:date1904'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - $objWriter->startElement('c:lang'); - $objWriter->writeAttribute('val', "en-GB"); - $objWriter->endElement(); - $objWriter->startElement('c:roundedCorners'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $this->writeAlternateContent($objWriter); - - $objWriter->startElement('c:chart'); - - $this->writeTitle($pChart->getTitle(), $objWriter); - - $objWriter->startElement('c:autoTitleDeleted'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $this->writePlotArea($pChart->getPlotArea(), $pChart->getXAxisLabel(), $pChart->getYAxisLabel(), $objWriter, $pChart->getWorksheet(), $pChart->getChartAxisX(), $pChart->getChartAxisY(), $pChart->getMajorGridlines(), $pChart->getMinorGridlines()); - - $this->writeLegend($pChart->getLegend(), $objWriter); - - $objWriter->startElement('c:plotVisOnly'); - $objWriter->writeAttribute('val', 1); - $objWriter->endElement(); - - $objWriter->startElement('c:dispBlanksAs'); - $objWriter->writeAttribute('val', "gap"); - $objWriter->endElement(); - - $objWriter->startElement('c:showDLblsOverMax'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $objWriter->endElement(); - - $this->writePrintSettings($objWriter); - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write Chart Title - * - * @param PHPExcel_Chart_Title $title - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * - * @throws PHPExcel_Writer_Exception - */ - private function writeTitle(PHPExcel_Chart_Title $title = null, $objWriter) - { - if (is_null($title)) { - return; - } - - $objWriter->startElement('c:title'); - $objWriter->startElement('c:tx'); - $objWriter->startElement('c:rich'); - - $objWriter->startElement('a:bodyPr'); - $objWriter->endElement(); - - $objWriter->startElement('a:lstStyle'); - $objWriter->endElement(); - - $objWriter->startElement('a:p'); - - $caption = $title->getCaption(); - if ((is_array($caption)) && (count($caption) > 0)) { - $caption = $caption[0]; - } - $this->getParentWriter()->getWriterPart('stringtable')->writeRichTextForCharts($objWriter, $caption, 'a'); - - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - - $this->writeLayout($title->getLayout(), $objWriter); - - $objWriter->startElement('c:overlay'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write Chart Legend - * - * @param PHPExcel_Chart_Legend $legend - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * - * @throws PHPExcel_Writer_Exception - */ - private function writeLegend(PHPExcel_Chart_Legend $legend = null, $objWriter) - { - if (is_null($legend)) { - return; - } - - $objWriter->startElement('c:legend'); - - $objWriter->startElement('c:legendPos'); - $objWriter->writeAttribute('val', $legend->getPosition()); - $objWriter->endElement(); - - $this->writeLayout($legend->getLayout(), $objWriter); - - $objWriter->startElement('c:overlay'); - $objWriter->writeAttribute('val', ($legend->getOverlay()) ? '1' : '0'); - $objWriter->endElement(); - - $objWriter->startElement('c:txPr'); - $objWriter->startElement('a:bodyPr'); - $objWriter->endElement(); - - $objWriter->startElement('a:lstStyle'); - $objWriter->endElement(); - - $objWriter->startElement('a:p'); - $objWriter->startElement('a:pPr'); - $objWriter->writeAttribute('rtl', 0); - - $objWriter->startElement('a:defRPr'); - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->startElement('a:endParaRPr'); - $objWriter->writeAttribute('lang', "en-US"); - $objWriter->endElement(); - - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write Chart Plot Area - * - * @param PHPExcel_Chart_PlotArea $plotArea - * @param PHPExcel_Chart_Title $xAxisLabel - * @param PHPExcel_Chart_Title $yAxisLabel - * @param PHPExcel_Chart_Axis $xAxis - * @param PHPExcel_Chart_Axis $yAxis - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * - * @throws PHPExcel_Writer_Exception - */ - private function writePlotArea(PHPExcel_Chart_PlotArea $plotArea, PHPExcel_Chart_Title $xAxisLabel = null, PHPExcel_Chart_Title $yAxisLabel = null, $objWriter, PHPExcel_Worksheet $pSheet, PHPExcel_Chart_Axis $xAxis, PHPExcel_Chart_Axis $yAxis, PHPExcel_Chart_GridLines $majorGridlines, PHPExcel_Chart_GridLines $minorGridlines) - { - if (is_null($plotArea)) { - return; - } - - $id1 = $id2 = 0; - $this->_seriesIndex = 0; - $objWriter->startElement('c:plotArea'); - - $layout = $plotArea->getLayout(); - - $this->writeLayout($layout, $objWriter); - - $chartTypes = self::getChartType($plotArea); - $catIsMultiLevelSeries = $valIsMultiLevelSeries = false; - $plotGroupingType = ''; - foreach ($chartTypes as $chartType) { - $objWriter->startElement('c:' . $chartType); - - $groupCount = $plotArea->getPlotGroupCount(); - for ($i = 0; $i < $groupCount; ++$i) { - $plotGroup = $plotArea->getPlotGroupByIndex($i); - $groupType = $plotGroup->getPlotType(); - if ($groupType == $chartType) { - $plotStyle = $plotGroup->getPlotStyle(); - if ($groupType === PHPExcel_Chart_DataSeries::TYPE_RADARCHART) { - $objWriter->startElement('c:radarStyle'); - $objWriter->writeAttribute('val', $plotStyle); - $objWriter->endElement(); - } elseif ($groupType === PHPExcel_Chart_DataSeries::TYPE_SCATTERCHART) { - $objWriter->startElement('c:scatterStyle'); - $objWriter->writeAttribute('val', $plotStyle); - $objWriter->endElement(); - } - - $this->writePlotGroup($plotGroup, $chartType, $objWriter, $catIsMultiLevelSeries, $valIsMultiLevelSeries, $plotGroupingType, $pSheet); - } - } - - $this->writeDataLabels($objWriter, $layout); - - if ($chartType === PHPExcel_Chart_DataSeries::TYPE_LINECHART) { - // Line only, Line3D can't be smoothed - - $objWriter->startElement('c:smooth'); - $objWriter->writeAttribute('val', (integer) $plotGroup->getSmoothLine()); - $objWriter->endElement(); - } elseif (($chartType === PHPExcel_Chart_DataSeries::TYPE_BARCHART) ||($chartType === PHPExcel_Chart_DataSeries::TYPE_BARCHART_3D)) { - $objWriter->startElement('c:gapWidth'); - $objWriter->writeAttribute('val', 150); - $objWriter->endElement(); - - if ($plotGroupingType == 'percentStacked' || $plotGroupingType == 'stacked') { - $objWriter->startElement('c:overlap'); - $objWriter->writeAttribute('val', 100); - $objWriter->endElement(); - } - } elseif ($chartType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) { - $objWriter->startElement('c:bubbleScale'); - $objWriter->writeAttribute('val', 25); - $objWriter->endElement(); - - $objWriter->startElement('c:showNegBubbles'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - } elseif ($chartType === PHPExcel_Chart_DataSeries::TYPE_STOCKCHART) { - $objWriter->startElement('c:hiLowLines'); - $objWriter->endElement(); - - $objWriter->startElement('c:upDownBars'); - - $objWriter->startElement('c:gapWidth'); - $objWriter->writeAttribute('val', 300); - $objWriter->endElement(); - - $objWriter->startElement('c:upBars'); - $objWriter->endElement(); - - $objWriter->startElement('c:downBars'); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - // Generate 2 unique numbers to use for axId values - // $id1 = $id2 = rand(10000000,99999999); - // do { - // $id2 = rand(10000000,99999999); - // } while ($id1 == $id2); - $id1 = '75091328'; - $id2 = '75089408'; - - if (($chartType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART) && ($chartType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) && ($chartType !== PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) { - $objWriter->startElement('c:axId'); - $objWriter->writeAttribute('val', $id1); - $objWriter->endElement(); - $objWriter->startElement('c:axId'); - $objWriter->writeAttribute('val', $id2); - $objWriter->endElement(); - } else { - $objWriter->startElement('c:firstSliceAng'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - if ($chartType === PHPExcel_Chart_DataSeries::TYPE_DONUTCHART) { - $objWriter->startElement('c:holeSize'); - $objWriter->writeAttribute('val', 50); - $objWriter->endElement(); - } - } - - $objWriter->endElement(); - } - - if (($chartType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART) && ($chartType !== PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) && ($chartType !== PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) { - if ($chartType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) { - $this->writeValueAxis($objWriter, $plotArea, $xAxisLabel, $chartType, $id1, $id2, $catIsMultiLevelSeries, $xAxis, $yAxis, $majorGridlines, $minorGridlines); - } else { - $this->writeCategoryAxis($objWriter, $plotArea, $xAxisLabel, $chartType, $id1, $id2, $catIsMultiLevelSeries, $xAxis, $yAxis); - } - - $this->writeValueAxis($objWriter, $plotArea, $yAxisLabel, $chartType, $id1, $id2, $valIsMultiLevelSeries, $xAxis, $yAxis, $majorGridlines, $minorGridlines); - } - - $objWriter->endElement(); - } - - /** - * Write Data Labels - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Chart_Layout $chartLayout Chart layout - * - * @throws PHPExcel_Writer_Exception - */ - private function writeDataLabels($objWriter, $chartLayout) - { - $objWriter->startElement('c:dLbls'); - - $objWriter->startElement('c:showLegendKey'); - $showLegendKey = (empty($chartLayout)) ? 0 : $chartLayout->getShowLegendKey(); - $objWriter->writeAttribute('val', ((empty($showLegendKey)) ? 0 : 1)); - $objWriter->endElement(); - - $objWriter->startElement('c:showVal'); - $showVal = (empty($chartLayout)) ? 0 : $chartLayout->getShowVal(); - $objWriter->writeAttribute('val', ((empty($showVal)) ? 0 : 1)); - $objWriter->endElement(); - - $objWriter->startElement('c:showCatName'); - $showCatName = (empty($chartLayout)) ? 0 : $chartLayout->getShowCatName(); - $objWriter->writeAttribute('val', ((empty($showCatName)) ? 0 : 1)); - $objWriter->endElement(); - - $objWriter->startElement('c:showSerName'); - $showSerName = (empty($chartLayout)) ? 0 : $chartLayout->getShowSerName(); - $objWriter->writeAttribute('val', ((empty($showSerName)) ? 0 : 1)); - $objWriter->endElement(); - - $objWriter->startElement('c:showPercent'); - $showPercent = (empty($chartLayout)) ? 0 : $chartLayout->getShowPercent(); - $objWriter->writeAttribute('val', ((empty($showPercent)) ? 0 : 1)); - $objWriter->endElement(); - - $objWriter->startElement('c:showBubbleSize'); - $showBubbleSize = (empty($chartLayout)) ? 0 : $chartLayout->getShowBubbleSize(); - $objWriter->writeAttribute('val', ((empty($showBubbleSize)) ? 0 : 1)); - $objWriter->endElement(); - - $objWriter->startElement('c:showLeaderLines'); - $showLeaderLines = (empty($chartLayout)) ? 1 : $chartLayout->getShowLeaderLines(); - $objWriter->writeAttribute('val', ((empty($showLeaderLines)) ? 0 : 1)); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write Category Axis - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Chart_PlotArea $plotArea - * @param PHPExcel_Chart_Title $xAxisLabel - * @param string $groupType Chart type - * @param string $id1 - * @param string $id2 - * @param boolean $isMultiLevelSeries - * - * @throws PHPExcel_Writer_Exception - */ - private function writeCategoryAxis($objWriter, PHPExcel_Chart_PlotArea $plotArea, $xAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, $xAxis, $yAxis) - { - $objWriter->startElement('c:catAx'); - - if ($id1 > 0) { - $objWriter->startElement('c:axId'); - $objWriter->writeAttribute('val', $id1); - $objWriter->endElement(); - } - - $objWriter->startElement('c:scaling'); - $objWriter->startElement('c:orientation'); - $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('orientation')); - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->startElement('c:delete'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $objWriter->startElement('c:axPos'); - $objWriter->writeAttribute('val', "b"); - $objWriter->endElement(); - - if (!is_null($xAxisLabel)) { - $objWriter->startElement('c:title'); - $objWriter->startElement('c:tx'); - $objWriter->startElement('c:rich'); - - $objWriter->startElement('a:bodyPr'); - $objWriter->endElement(); - - $objWriter->startElement('a:lstStyle'); - $objWriter->endElement(); - - $objWriter->startElement('a:p'); - $objWriter->startElement('a:r'); - - $caption = $xAxisLabel->getCaption(); - if (is_array($caption)) { - $caption = $caption[0]; - } - $objWriter->startElement('a:t'); - // $objWriter->writeAttribute('xml:space', 'preserve'); - $objWriter->writeRawData(PHPExcel_Shared_String::ControlCharacterPHP2OOXML($caption)); - $objWriter->endElement(); - - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - - $layout = $xAxisLabel->getLayout(); - $this->writeLayout($layout, $objWriter); - - $objWriter->startElement('c:overlay'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - $objWriter->startElement('c:numFmt'); - $objWriter->writeAttribute('formatCode', $yAxis->getAxisNumberFormat()); - $objWriter->writeAttribute('sourceLinked', $yAxis->getAxisNumberSourceLinked()); - $objWriter->endElement(); - - $objWriter->startElement('c:majorTickMark'); - $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('major_tick_mark')); - $objWriter->endElement(); - - $objWriter->startElement('c:minorTickMark'); - $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('minor_tick_mark')); - $objWriter->endElement(); - - $objWriter->startElement('c:tickLblPos'); - $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('axis_labels')); - $objWriter->endElement(); - - if ($id2 > 0) { - $objWriter->startElement('c:crossAx'); - $objWriter->writeAttribute('val', $id2); - $objWriter->endElement(); - - $objWriter->startElement('c:crosses'); - $objWriter->writeAttribute('val', $yAxis->getAxisOptionsProperty('horizontal_crosses')); - $objWriter->endElement(); - } - - $objWriter->startElement('c:auto'); - $objWriter->writeAttribute('val', 1); - $objWriter->endElement(); - - $objWriter->startElement('c:lblAlgn'); - $objWriter->writeAttribute('val', "ctr"); - $objWriter->endElement(); - - $objWriter->startElement('c:lblOffset'); - $objWriter->writeAttribute('val', 100); - $objWriter->endElement(); - - if ($isMultiLevelSeries) { - $objWriter->startElement('c:noMultiLvlLbl'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - } - $objWriter->endElement(); - } - - /** - * Write Value Axis - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Chart_PlotArea $plotArea - * @param PHPExcel_Chart_Title $yAxisLabel - * @param string $groupType Chart type - * @param string $id1 - * @param string $id2 - * @param boolean $isMultiLevelSeries - * - * @throws PHPExcel_Writer_Exception - */ - private function writeValueAxis($objWriter, PHPExcel_Chart_PlotArea $plotArea, $yAxisLabel, $groupType, $id1, $id2, $isMultiLevelSeries, $xAxis, $yAxis, $majorGridlines, $minorGridlines) - { - $objWriter->startElement('c:valAx'); - - if ($id2 > 0) { - $objWriter->startElement('c:axId'); - $objWriter->writeAttribute('val', $id2); - $objWriter->endElement(); - } - - $objWriter->startElement('c:scaling'); - - if (!is_null($xAxis->getAxisOptionsProperty('maximum'))) { - $objWriter->startElement('c:max'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('maximum')); - $objWriter->endElement(); - } - - if (!is_null($xAxis->getAxisOptionsProperty('minimum'))) { - $objWriter->startElement('c:min'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minimum')); - $objWriter->endElement(); - } - - $objWriter->startElement('c:orientation'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('orientation')); - - - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->startElement('c:delete'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $objWriter->startElement('c:axPos'); - $objWriter->writeAttribute('val', "l"); - $objWriter->endElement(); - - $objWriter->startElement('c:majorGridlines'); - $objWriter->startElement('c:spPr'); - - if (!is_null($majorGridlines->getLineColorProperty('value'))) { - $objWriter->startElement('a:ln'); - $objWriter->writeAttribute('w', $majorGridlines->getLineStyleProperty('width')); - $objWriter->startElement('a:solidFill'); - $objWriter->startElement("a:{$majorGridlines->getLineColorProperty('type')}"); - $objWriter->writeAttribute('val', $majorGridlines->getLineColorProperty('value')); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $majorGridlines->getLineColorProperty('alpha')); - $objWriter->endElement(); //end alpha - $objWriter->endElement(); //end srgbClr - $objWriter->endElement(); //end solidFill - - $objWriter->startElement('a:prstDash'); - $objWriter->writeAttribute('val', $majorGridlines->getLineStyleProperty('dash')); - $objWriter->endElement(); - - if ($majorGridlines->getLineStyleProperty('join') == 'miter') { - $objWriter->startElement('a:miter'); - $objWriter->writeAttribute('lim', '800000'); - $objWriter->endElement(); - } else { - $objWriter->startElement('a:bevel'); - $objWriter->endElement(); - } - - if (!is_null($majorGridlines->getLineStyleProperty(array('arrow', 'head', 'type')))) { - $objWriter->startElement('a:headEnd'); - $objWriter->writeAttribute('type', $majorGridlines->getLineStyleProperty(array('arrow', 'head', 'type'))); - $objWriter->writeAttribute('w', $majorGridlines->getLineStyleArrowParameters('head', 'w')); - $objWriter->writeAttribute('len', $majorGridlines->getLineStyleArrowParameters('head', 'len')); - $objWriter->endElement(); - } - - if (!is_null($majorGridlines->getLineStyleProperty(array('arrow', 'end', 'type')))) { - $objWriter->startElement('a:tailEnd'); - $objWriter->writeAttribute('type', $majorGridlines->getLineStyleProperty(array('arrow', 'end', 'type'))); - $objWriter->writeAttribute('w', $majorGridlines->getLineStyleArrowParameters('end', 'w')); - $objWriter->writeAttribute('len', $majorGridlines->getLineStyleArrowParameters('end', 'len')); - $objWriter->endElement(); - } - $objWriter->endElement(); //end ln - } - $objWriter->startElement('a:effectLst'); - - if (!is_null($majorGridlines->getGlowSize())) { - $objWriter->startElement('a:glow'); - $objWriter->writeAttribute('rad', $majorGridlines->getGlowSize()); - $objWriter->startElement("a:{$majorGridlines->getGlowColor('type')}"); - $objWriter->writeAttribute('val', $majorGridlines->getGlowColor('value')); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $majorGridlines->getGlowColor('alpha')); - $objWriter->endElement(); //end alpha - $objWriter->endElement(); //end schemeClr - $objWriter->endElement(); //end glow - } - - if (!is_null($majorGridlines->getShadowProperty('presets'))) { - $objWriter->startElement("a:{$majorGridlines->getShadowProperty('effect')}"); - if (!is_null($majorGridlines->getShadowProperty('blur'))) { - $objWriter->writeAttribute('blurRad', $majorGridlines->getShadowProperty('blur')); - } - if (!is_null($majorGridlines->getShadowProperty('distance'))) { - $objWriter->writeAttribute('dist', $majorGridlines->getShadowProperty('distance')); - } - if (!is_null($majorGridlines->getShadowProperty('direction'))) { - $objWriter->writeAttribute('dir', $majorGridlines->getShadowProperty('direction')); - } - if (!is_null($majorGridlines->getShadowProperty('algn'))) { - $objWriter->writeAttribute('algn', $majorGridlines->getShadowProperty('algn')); - } - if (!is_null($majorGridlines->getShadowProperty(array('size', 'sx')))) { - $objWriter->writeAttribute('sx', $majorGridlines->getShadowProperty(array('size', 'sx'))); - } - if (!is_null($majorGridlines->getShadowProperty(array('size', 'sy')))) { - $objWriter->writeAttribute('sy', $majorGridlines->getShadowProperty(array('size', 'sy'))); - } - if (!is_null($majorGridlines->getShadowProperty(array('size', 'kx')))) { - $objWriter->writeAttribute('kx', $majorGridlines->getShadowProperty(array('size', 'kx'))); - } - if (!is_null($majorGridlines->getShadowProperty('rotWithShape'))) { - $objWriter->writeAttribute('rotWithShape', $majorGridlines->getShadowProperty('rotWithShape')); - } - $objWriter->startElement("a:{$majorGridlines->getShadowProperty(array('color', 'type'))}"); - $objWriter->writeAttribute('val', $majorGridlines->getShadowProperty(array('color', 'value'))); - - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $majorGridlines->getShadowProperty(array('color', 'alpha'))); - $objWriter->endElement(); //end alpha - - $objWriter->endElement(); //end color:type - $objWriter->endElement(); //end shadow - } - - if (!is_null($majorGridlines->getSoftEdgesSize())) { - $objWriter->startElement('a:softEdge'); - $objWriter->writeAttribute('rad', $majorGridlines->getSoftEdgesSize()); - $objWriter->endElement(); //end softEdge - } - - $objWriter->endElement(); //end effectLst - $objWriter->endElement(); //end spPr - $objWriter->endElement(); //end majorGridLines - - if ($minorGridlines->getObjectState()) { - $objWriter->startElement('c:minorGridlines'); - $objWriter->startElement('c:spPr'); - - if (!is_null($minorGridlines->getLineColorProperty('value'))) { - $objWriter->startElement('a:ln'); - $objWriter->writeAttribute('w', $minorGridlines->getLineStyleProperty('width')); - $objWriter->startElement('a:solidFill'); - $objWriter->startElement("a:{$minorGridlines->getLineColorProperty('type')}"); - $objWriter->writeAttribute('val', $minorGridlines->getLineColorProperty('value')); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $minorGridlines->getLineColorProperty('alpha')); - $objWriter->endElement(); //end alpha - $objWriter->endElement(); //end srgbClr - $objWriter->endElement(); //end solidFill - - $objWriter->startElement('a:prstDash'); - $objWriter->writeAttribute('val', $minorGridlines->getLineStyleProperty('dash')); - $objWriter->endElement(); - - if ($minorGridlines->getLineStyleProperty('join') == 'miter') { - $objWriter->startElement('a:miter'); - $objWriter->writeAttribute('lim', '800000'); - $objWriter->endElement(); - } else { - $objWriter->startElement('a:bevel'); - $objWriter->endElement(); - } - - if (!is_null($minorGridlines->getLineStyleProperty(array('arrow', 'head', 'type')))) { - $objWriter->startElement('a:headEnd'); - $objWriter->writeAttribute('type', $minorGridlines->getLineStyleProperty(array('arrow', 'head', 'type'))); - $objWriter->writeAttribute('w', $minorGridlines->getLineStyleArrowParameters('head', 'w')); - $objWriter->writeAttribute('len', $minorGridlines->getLineStyleArrowParameters('head', 'len')); - $objWriter->endElement(); - } - - if (!is_null($minorGridlines->getLineStyleProperty(array('arrow', 'end', 'type')))) { - $objWriter->startElement('a:tailEnd'); - $objWriter->writeAttribute('type', $minorGridlines->getLineStyleProperty(array('arrow', 'end', 'type'))); - $objWriter->writeAttribute('w', $minorGridlines->getLineStyleArrowParameters('end', 'w')); - $objWriter->writeAttribute('len', $minorGridlines->getLineStyleArrowParameters('end', 'len')); - $objWriter->endElement(); - } - $objWriter->endElement(); //end ln - } - - $objWriter->startElement('a:effectLst'); - - if (!is_null($minorGridlines->getGlowSize())) { - $objWriter->startElement('a:glow'); - $objWriter->writeAttribute('rad', $minorGridlines->getGlowSize()); - $objWriter->startElement("a:{$minorGridlines->getGlowColor('type')}"); - $objWriter->writeAttribute('val', $minorGridlines->getGlowColor('value')); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $minorGridlines->getGlowColor('alpha')); - $objWriter->endElement(); //end alpha - $objWriter->endElement(); //end schemeClr - $objWriter->endElement(); //end glow - } - - if (!is_null($minorGridlines->getShadowProperty('presets'))) { - $objWriter->startElement("a:{$minorGridlines->getShadowProperty('effect')}"); - if (!is_null($minorGridlines->getShadowProperty('blur'))) { - $objWriter->writeAttribute('blurRad', $minorGridlines->getShadowProperty('blur')); - } - if (!is_null($minorGridlines->getShadowProperty('distance'))) { - $objWriter->writeAttribute('dist', $minorGridlines->getShadowProperty('distance')); - } - if (!is_null($minorGridlines->getShadowProperty('direction'))) { - $objWriter->writeAttribute('dir', $minorGridlines->getShadowProperty('direction')); - } - if (!is_null($minorGridlines->getShadowProperty('algn'))) { - $objWriter->writeAttribute('algn', $minorGridlines->getShadowProperty('algn')); - } - if (!is_null($minorGridlines->getShadowProperty(array('size', 'sx')))) { - $objWriter->writeAttribute('sx', $minorGridlines->getShadowProperty(array('size', 'sx'))); - } - if (!is_null($minorGridlines->getShadowProperty(array('size', 'sy')))) { - $objWriter->writeAttribute('sy', $minorGridlines->getShadowProperty(array('size', 'sy'))); - } - if (!is_null($minorGridlines->getShadowProperty(array('size', 'kx')))) { - $objWriter->writeAttribute('kx', $minorGridlines->getShadowProperty(array('size', 'kx'))); - } - if (!is_null($minorGridlines->getShadowProperty('rotWithShape'))) { - $objWriter->writeAttribute('rotWithShape', $minorGridlines->getShadowProperty('rotWithShape')); - } - $objWriter->startElement("a:{$minorGridlines->getShadowProperty(array('color', 'type'))}"); - $objWriter->writeAttribute('val', $minorGridlines->getShadowProperty(array('color', 'value'))); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $minorGridlines->getShadowProperty(array('color', 'alpha'))); - $objWriter->endElement(); //end alpha - $objWriter->endElement(); //end color:type - $objWriter->endElement(); //end shadow - } - - if (!is_null($minorGridlines->getSoftEdgesSize())) { - $objWriter->startElement('a:softEdge'); - $objWriter->writeAttribute('rad', $minorGridlines->getSoftEdgesSize()); - $objWriter->endElement(); //end softEdge - } - - $objWriter->endElement(); //end effectLst - $objWriter->endElement(); //end spPr - $objWriter->endElement(); //end minorGridLines - } - - if (!is_null($yAxisLabel)) { - $objWriter->startElement('c:title'); - $objWriter->startElement('c:tx'); - $objWriter->startElement('c:rich'); - - $objWriter->startElement('a:bodyPr'); - $objWriter->endElement(); - - $objWriter->startElement('a:lstStyle'); - $objWriter->endElement(); - - $objWriter->startElement('a:p'); - $objWriter->startElement('a:r'); - - $caption = $yAxisLabel->getCaption(); - if (is_array($caption)) { - $caption = $caption[0]; - } - - $objWriter->startElement('a:t'); - // $objWriter->writeAttribute('xml:space', 'preserve'); - $objWriter->writeRawData(PHPExcel_Shared_String::ControlCharacterPHP2OOXML($caption)); - $objWriter->endElement(); - - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - - if ($groupType !== PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) { - $layout = $yAxisLabel->getLayout(); - $this->writeLayout($layout, $objWriter); - } - - $objWriter->startElement('c:overlay'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - $objWriter->startElement('c:numFmt'); - $objWriter->writeAttribute('formatCode', $xAxis->getAxisNumberFormat()); - $objWriter->writeAttribute('sourceLinked', $xAxis->getAxisNumberSourceLinked()); - $objWriter->endElement(); - - $objWriter->startElement('c:majorTickMark'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_tick_mark')); - $objWriter->endElement(); - - $objWriter->startElement('c:minorTickMark'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_tick_mark')); - $objWriter->endElement(); - - $objWriter->startElement('c:tickLblPos'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('axis_labels')); - $objWriter->endElement(); - - $objWriter->startElement('c:spPr'); - - if (!is_null($xAxis->getFillProperty('value'))) { - $objWriter->startElement('a:solidFill'); - $objWriter->startElement("a:" . $xAxis->getFillProperty('type')); - $objWriter->writeAttribute('val', $xAxis->getFillProperty('value')); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $xAxis->getFillProperty('alpha')); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - } - - $objWriter->startElement('a:ln'); - - $objWriter->writeAttribute('w', $xAxis->getLineStyleProperty('width')); - $objWriter->writeAttribute('cap', $xAxis->getLineStyleProperty('cap')); - $objWriter->writeAttribute('cmpd', $xAxis->getLineStyleProperty('compound')); - - if (!is_null($xAxis->getLineProperty('value'))) { - $objWriter->startElement('a:solidFill'); - $objWriter->startElement("a:" . $xAxis->getLineProperty('type')); - $objWriter->writeAttribute('val', $xAxis->getLineProperty('value')); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $xAxis->getLineProperty('alpha')); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - } - - $objWriter->startElement('a:prstDash'); - $objWriter->writeAttribute('val', $xAxis->getLineStyleProperty('dash')); - $objWriter->endElement(); - - if ($xAxis->getLineStyleProperty('join') == 'miter') { - $objWriter->startElement('a:miter'); - $objWriter->writeAttribute('lim', '800000'); - $objWriter->endElement(); - } else { - $objWriter->startElement('a:bevel'); - $objWriter->endElement(); - } - - if (!is_null($xAxis->getLineStyleProperty(array('arrow', 'head', 'type')))) { - $objWriter->startElement('a:headEnd'); - $objWriter->writeAttribute('type', $xAxis->getLineStyleProperty(array('arrow', 'head', 'type'))); - $objWriter->writeAttribute('w', $xAxis->getLineStyleArrowWidth('head')); - $objWriter->writeAttribute('len', $xAxis->getLineStyleArrowLength('head')); - $objWriter->endElement(); - } - - if (!is_null($xAxis->getLineStyleProperty(array('arrow', 'end', 'type')))) { - $objWriter->startElement('a:tailEnd'); - $objWriter->writeAttribute('type', $xAxis->getLineStyleProperty(array('arrow', 'end', 'type'))); - $objWriter->writeAttribute('w', $xAxis->getLineStyleArrowWidth('end')); - $objWriter->writeAttribute('len', $xAxis->getLineStyleArrowLength('end')); - $objWriter->endElement(); - } - - $objWriter->endElement(); - - $objWriter->startElement('a:effectLst'); - - if (!is_null($xAxis->getGlowProperty('size'))) { - $objWriter->startElement('a:glow'); - $objWriter->writeAttribute('rad', $xAxis->getGlowProperty('size')); - $objWriter->startElement("a:{$xAxis->getGlowProperty(array('color','type'))}"); - $objWriter->writeAttribute('val', $xAxis->getGlowProperty(array('color','value'))); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $xAxis->getGlowProperty(array('color','alpha'))); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - } - - if (!is_null($xAxis->getShadowProperty('presets'))) { - $objWriter->startElement("a:{$xAxis->getShadowProperty('effect')}"); - - if (!is_null($xAxis->getShadowProperty('blur'))) { - $objWriter->writeAttribute('blurRad', $xAxis->getShadowProperty('blur')); - } - if (!is_null($xAxis->getShadowProperty('distance'))) { - $objWriter->writeAttribute('dist', $xAxis->getShadowProperty('distance')); - } - if (!is_null($xAxis->getShadowProperty('direction'))) { - $objWriter->writeAttribute('dir', $xAxis->getShadowProperty('direction')); - } - if (!is_null($xAxis->getShadowProperty('algn'))) { - $objWriter->writeAttribute('algn', $xAxis->getShadowProperty('algn')); - } - if (!is_null($xAxis->getShadowProperty(array('size','sx')))) { - $objWriter->writeAttribute('sx', $xAxis->getShadowProperty(array('size','sx'))); - } - if (!is_null($xAxis->getShadowProperty(array('size','sy')))) { - $objWriter->writeAttribute('sy', $xAxis->getShadowProperty(array('size','sy'))); - } - if (!is_null($xAxis->getShadowProperty(array('size','kx')))) { - $objWriter->writeAttribute('kx', $xAxis->getShadowProperty(array('size','kx'))); - } - if (!is_null($xAxis->getShadowProperty('rotWithShape'))) { - $objWriter->writeAttribute('rotWithShape', $xAxis->getShadowProperty('rotWithShape')); - } - - $objWriter->startElement("a:{$xAxis->getShadowProperty(array('color','type'))}"); - $objWriter->writeAttribute('val', $xAxis->getShadowProperty(array('color','value'))); - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $xAxis->getShadowProperty(array('color','alpha'))); - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - if (!is_null($xAxis->getSoftEdgesSize())) { - $objWriter->startElement('a:softEdge'); - $objWriter->writeAttribute('rad', $xAxis->getSoftEdgesSize()); - $objWriter->endElement(); - } - - $objWriter->endElement(); //effectList - $objWriter->endElement(); //end spPr - - if ($id1 > 0) { - $objWriter->startElement('c:crossAx'); - $objWriter->writeAttribute('val', $id2); - $objWriter->endElement(); - - if (!is_null($xAxis->getAxisOptionsProperty('horizontal_crosses_value'))) { - $objWriter->startElement('c:crossesAt'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses_value')); - $objWriter->endElement(); - } else { - $objWriter->startElement('c:crosses'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('horizontal_crosses')); - $objWriter->endElement(); - } - - $objWriter->startElement('c:crossBetween'); - $objWriter->writeAttribute('val', "midCat"); - $objWriter->endElement(); - - if (!is_null($xAxis->getAxisOptionsProperty('major_unit'))) { - $objWriter->startElement('c:majorUnit'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('major_unit')); - $objWriter->endElement(); - } - - if (!is_null($xAxis->getAxisOptionsProperty('minor_unit'))) { - $objWriter->startElement('c:minorUnit'); - $objWriter->writeAttribute('val', $xAxis->getAxisOptionsProperty('minor_unit')); - $objWriter->endElement(); - } - } - - if ($isMultiLevelSeries) { - if ($groupType !== PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) { - $objWriter->startElement('c:noMultiLvlLbl'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - } - } - - $objWriter->endElement(); - } - - /** - * Get the data series type(s) for a chart plot series - * - * @param PHPExcel_Chart_PlotArea $plotArea - * - * @return string|array - * @throws PHPExcel_Writer_Exception - */ - private static function getChartType($plotArea) - { - $groupCount = $plotArea->getPlotGroupCount(); - - if ($groupCount == 1) { - $chartType = array($plotArea->getPlotGroupByIndex(0)->getPlotType()); - } else { - $chartTypes = array(); - for ($i = 0; $i < $groupCount; ++$i) { - $chartTypes[] = $plotArea->getPlotGroupByIndex($i)->getPlotType(); - } - $chartType = array_unique($chartTypes); - if (count($chartTypes) == 0) { - throw new PHPExcel_Writer_Exception('Chart is not yet implemented'); - } - } - - return $chartType; - } - - /** - * Write Plot Group (series of related plots) - * - * @param PHPExcel_Chart_DataSeries $plotGroup - * @param string $groupType Type of plot for dataseries - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param boolean &$catIsMultiLevelSeries Is category a multi-series category - * @param boolean &$valIsMultiLevelSeries Is value set a multi-series set - * @param string &$plotGroupingType Type of grouping for multi-series values - * @param PHPExcel_Worksheet $pSheet - * - * @throws PHPExcel_Writer_Exception - */ - private function writePlotGroup($plotGroup, $groupType, $objWriter, &$catIsMultiLevelSeries, &$valIsMultiLevelSeries, &$plotGroupingType, PHPExcel_Worksheet $pSheet) - { - if (is_null($plotGroup)) { - return; - } - - if (($groupType == PHPExcel_Chart_DataSeries::TYPE_BARCHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_BARCHART_3D)) { - $objWriter->startElement('c:barDir'); - $objWriter->writeAttribute('val', $plotGroup->getPlotDirection()); - $objWriter->endElement(); - } - - if (!is_null($plotGroup->getPlotGrouping())) { - $plotGroupingType = $plotGroup->getPlotGrouping(); - $objWriter->startElement('c:grouping'); - $objWriter->writeAttribute('val', $plotGroupingType); - $objWriter->endElement(); - } - - // Get these details before the loop, because we can use the count to check for varyColors - $plotSeriesOrder = $plotGroup->getPlotOrder(); - $plotSeriesCount = count($plotSeriesOrder); - - if (($groupType !== PHPExcel_Chart_DataSeries::TYPE_RADARCHART) && ($groupType !== PHPExcel_Chart_DataSeries::TYPE_STOCKCHART)) { - if ($groupType !== PHPExcel_Chart_DataSeries::TYPE_LINECHART) { - if (($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_DONUTCHART) || ($plotSeriesCount > 1)) { - $objWriter->startElement('c:varyColors'); - $objWriter->writeAttribute('val', 1); - $objWriter->endElement(); - } else { - $objWriter->startElement('c:varyColors'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - } - } - } - - foreach ($plotSeriesOrder as $plotSeriesIdx => $plotSeriesRef) { - $objWriter->startElement('c:ser'); - - $objWriter->startElement('c:idx'); - $objWriter->writeAttribute('val', $this->_seriesIndex + $plotSeriesIdx); - $objWriter->endElement(); - - $objWriter->startElement('c:order'); - $objWriter->writeAttribute('val', $this->_seriesIndex + $plotSeriesRef); - $objWriter->endElement(); - - if (($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) { - $objWriter->startElement('c:dPt'); - $objWriter->startElement('c:idx'); - $objWriter->writeAttribute('val', 3); - $objWriter->endElement(); - - $objWriter->startElement('c:bubble3D'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - - $objWriter->startElement('c:spPr'); - $objWriter->startElement('a:solidFill'); - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', 'FF9900'); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - } - - // Labels - $plotSeriesLabel = $plotGroup->getPlotLabelByIndex($plotSeriesRef); - if ($plotSeriesLabel && ($plotSeriesLabel->getPointCount() > 0)) { - $objWriter->startElement('c:tx'); - $objWriter->startElement('c:strRef'); - $this->writePlotSeriesLabel($plotSeriesLabel, $objWriter); - $objWriter->endElement(); - $objWriter->endElement(); - } - - // Formatting for the points - if (($groupType == PHPExcel_Chart_DataSeries::TYPE_LINECHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_STOCKCHART)) { - $objWriter->startElement('c:spPr'); - $objWriter->startElement('a:ln'); - $objWriter->writeAttribute('w', 12700); - if ($groupType == PHPExcel_Chart_DataSeries::TYPE_STOCKCHART) { - $objWriter->startElement('a:noFill'); - $objWriter->endElement(); - } - $objWriter->endElement(); - $objWriter->endElement(); - } - - $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesRef); - if ($plotSeriesValues) { - $plotSeriesMarker = $plotSeriesValues->getPointMarker(); - if ($plotSeriesMarker) { - $objWriter->startElement('c:marker'); - $objWriter->startElement('c:symbol'); - $objWriter->writeAttribute('val', $plotSeriesMarker); - $objWriter->endElement(); - - if ($plotSeriesMarker !== 'none') { - $objWriter->startElement('c:size'); - $objWriter->writeAttribute('val', 3); - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - } - - if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BARCHART) || ($groupType === PHPExcel_Chart_DataSeries::TYPE_BARCHART_3D) || ($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART)) { - $objWriter->startElement('c:invertIfNegative'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - } - - // Category Labels - $plotSeriesCategory = $plotGroup->getPlotCategoryByIndex($plotSeriesRef); - if ($plotSeriesCategory && ($plotSeriesCategory->getPointCount() > 0)) { - $catIsMultiLevelSeries = $catIsMultiLevelSeries || $plotSeriesCategory->isMultiLevelSeries(); - - if (($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) || ($groupType == PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) { - if (!is_null($plotGroup->getPlotStyle())) { - $plotStyle = $plotGroup->getPlotStyle(); - if ($plotStyle) { - $objWriter->startElement('c:explosion'); - $objWriter->writeAttribute('val', 25); - $objWriter->endElement(); - } - } - } - - if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) || ($groupType === PHPExcel_Chart_DataSeries::TYPE_SCATTERCHART)) { - $objWriter->startElement('c:xVal'); - } else { - $objWriter->startElement('c:cat'); - } - - $this->writePlotSeriesValues($plotSeriesCategory, $objWriter, $groupType, 'str', $pSheet); - $objWriter->endElement(); - } - - // Values - if ($plotSeriesValues) { - $valIsMultiLevelSeries = $valIsMultiLevelSeries || $plotSeriesValues->isMultiLevelSeries(); - - if (($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) || ($groupType === PHPExcel_Chart_DataSeries::TYPE_SCATTERCHART)) { - $objWriter->startElement('c:yVal'); - } else { - $objWriter->startElement('c:val'); - } - - $this->writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, 'num', $pSheet); - $objWriter->endElement(); - } - - if ($groupType === PHPExcel_Chart_DataSeries::TYPE_BUBBLECHART) { - $this->writeBubbles($plotSeriesValues, $objWriter, $pSheet); - } - - $objWriter->endElement(); - } - - $this->_seriesIndex += $plotSeriesIdx + 1; - } - - /** - * Write Plot Series Label - * - * @param PHPExcel_Chart_DataSeriesValues $plotSeriesLabel - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * - * @throws PHPExcel_Writer_Exception - */ - private function writePlotSeriesLabel($plotSeriesLabel, $objWriter) - { - if (is_null($plotSeriesLabel)) { - return; - } - - $objWriter->startElement('c:f'); - $objWriter->writeRawData($plotSeriesLabel->getDataSource()); - $objWriter->endElement(); - - $objWriter->startElement('c:strCache'); - $objWriter->startElement('c:ptCount'); - $objWriter->writeAttribute('val', $plotSeriesLabel->getPointCount()); - $objWriter->endElement(); - - foreach ($plotSeriesLabel->getDataValues() as $plotLabelKey => $plotLabelValue) { - $objWriter->startElement('c:pt'); - $objWriter->writeAttribute('idx', $plotLabelKey); - - $objWriter->startElement('c:v'); - $objWriter->writeRawData($plotLabelValue); - $objWriter->endElement(); - $objWriter->endElement(); - } - $objWriter->endElement(); - } - - /** - * Write Plot Series Values - * - * @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string $groupType Type of plot for dataseries - * @param string $dataType Datatype of series values - * @param PHPExcel_Worksheet $pSheet - * - * @throws PHPExcel_Writer_Exception - */ - private function writePlotSeriesValues($plotSeriesValues, $objWriter, $groupType, $dataType = 'str', PHPExcel_Worksheet $pSheet) - { - if (is_null($plotSeriesValues)) { - return; - } - - if ($plotSeriesValues->isMultiLevelSeries()) { - $levelCount = $plotSeriesValues->multiLevelCount(); - - $objWriter->startElement('c:multiLvlStrRef'); - - $objWriter->startElement('c:f'); - $objWriter->writeRawData($plotSeriesValues->getDataSource()); - $objWriter->endElement(); - - $objWriter->startElement('c:multiLvlStrCache'); - - $objWriter->startElement('c:ptCount'); - $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); - $objWriter->endElement(); - - for ($level = 0; $level < $levelCount; ++$level) { - $objWriter->startElement('c:lvl'); - - foreach ($plotSeriesValues->getDataValues() as $plotSeriesKey => $plotSeriesValue) { - if (isset($plotSeriesValue[$level])) { - $objWriter->startElement('c:pt'); - $objWriter->writeAttribute('idx', $plotSeriesKey); - - $objWriter->startElement('c:v'); - $objWriter->writeRawData($plotSeriesValue[$level]); - $objWriter->endElement(); - $objWriter->endElement(); - } - } - - $objWriter->endElement(); - } - - $objWriter->endElement(); - - $objWriter->endElement(); - } else { - $objWriter->startElement('c:' . $dataType . 'Ref'); - - $objWriter->startElement('c:f'); - $objWriter->writeRawData($plotSeriesValues->getDataSource()); - $objWriter->endElement(); - - $objWriter->startElement('c:' . $dataType . 'Cache'); - - if (($groupType != PHPExcel_Chart_DataSeries::TYPE_PIECHART) && ($groupType != PHPExcel_Chart_DataSeries::TYPE_PIECHART_3D) && ($groupType != PHPExcel_Chart_DataSeries::TYPE_DONUTCHART)) { - if (($plotSeriesValues->getFormatCode() !== null) && ($plotSeriesValues->getFormatCode() !== '')) { - $objWriter->startElement('c:formatCode'); - $objWriter->writeRawData($plotSeriesValues->getFormatCode()); - $objWriter->endElement(); - } - } - - $objWriter->startElement('c:ptCount'); - $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); - $objWriter->endElement(); - - $dataValues = $plotSeriesValues->getDataValues(); - if (!empty($dataValues)) { - if (is_array($dataValues)) { - foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) { - $objWriter->startElement('c:pt'); - $objWriter->writeAttribute('idx', $plotSeriesKey); - - $objWriter->startElement('c:v'); - $objWriter->writeRawData($plotSeriesValue); - $objWriter->endElement(); - $objWriter->endElement(); - } - } - } - - $objWriter->endElement(); - - $objWriter->endElement(); - } - } - - /** - * Write Bubble Chart Details - * - * @param PHPExcel_Chart_DataSeriesValues $plotSeriesValues - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * - * @throws PHPExcel_Writer_Exception - */ - private function writeBubbles($plotSeriesValues, $objWriter, PHPExcel_Worksheet $pSheet) - { - if (is_null($plotSeriesValues)) { - return; - } - - $objWriter->startElement('c:bubbleSize'); - $objWriter->startElement('c:numLit'); - - $objWriter->startElement('c:formatCode'); - $objWriter->writeRawData('General'); - $objWriter->endElement(); - - $objWriter->startElement('c:ptCount'); - $objWriter->writeAttribute('val', $plotSeriesValues->getPointCount()); - $objWriter->endElement(); - - $dataValues = $plotSeriesValues->getDataValues(); - if (!empty($dataValues)) { - if (is_array($dataValues)) { - foreach ($dataValues as $plotSeriesKey => $plotSeriesValue) { - $objWriter->startElement('c:pt'); - $objWriter->writeAttribute('idx', $plotSeriesKey); - $objWriter->startElement('c:v'); - $objWriter->writeRawData(1); - $objWriter->endElement(); - $objWriter->endElement(); - } - } - } - - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->startElement('c:bubble3D'); - $objWriter->writeAttribute('val', 0); - $objWriter->endElement(); - } - - /** - * Write Layout - * - * @param PHPExcel_Chart_Layout $layout - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * - * @throws PHPExcel_Writer_Exception - */ - private function writeLayout(PHPExcel_Chart_Layout $layout = null, $objWriter) - { - $objWriter->startElement('c:layout'); - - if (!is_null($layout)) { - $objWriter->startElement('c:manualLayout'); - - $layoutTarget = $layout->getLayoutTarget(); - if (!is_null($layoutTarget)) { - $objWriter->startElement('c:layoutTarget'); - $objWriter->writeAttribute('val', $layoutTarget); - $objWriter->endElement(); - } - - $xMode = $layout->getXMode(); - if (!is_null($xMode)) { - $objWriter->startElement('c:xMode'); - $objWriter->writeAttribute('val', $xMode); - $objWriter->endElement(); - } - - $yMode = $layout->getYMode(); - if (!is_null($yMode)) { - $objWriter->startElement('c:yMode'); - $objWriter->writeAttribute('val', $yMode); - $objWriter->endElement(); - } - - $x = $layout->getXPosition(); - if (!is_null($x)) { - $objWriter->startElement('c:x'); - $objWriter->writeAttribute('val', $x); - $objWriter->endElement(); - } - - $y = $layout->getYPosition(); - if (!is_null($y)) { - $objWriter->startElement('c:y'); - $objWriter->writeAttribute('val', $y); - $objWriter->endElement(); - } - - $w = $layout->getWidth(); - if (!is_null($w)) { - $objWriter->startElement('c:w'); - $objWriter->writeAttribute('val', $w); - $objWriter->endElement(); - } - - $h = $layout->getHeight(); - if (!is_null($h)) { - $objWriter->startElement('c:h'); - $objWriter->writeAttribute('val', $h); - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - - /** - * Write Alternate Content block - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * - * @throws PHPExcel_Writer_Exception - */ - private function writeAlternateContent($objWriter) - { - $objWriter->startElement('mc:AlternateContent'); - $objWriter->writeAttribute('xmlns:mc', 'http://schemas.openxmlformats.org/markup-compatibility/2006'); - - $objWriter->startElement('mc:Choice'); - $objWriter->writeAttribute('xmlns:c14', 'http://schemas.microsoft.com/office/drawing/2007/8/2/chart'); - $objWriter->writeAttribute('Requires', 'c14'); - - $objWriter->startElement('c14:style'); - $objWriter->writeAttribute('val', '102'); - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->startElement('mc:Fallback'); - $objWriter->startElement('c:style'); - $objWriter->writeAttribute('val', '2'); - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write Printer Settings - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * - * @throws PHPExcel_Writer_Exception - */ - private function writePrintSettings($objWriter) - { - $objWriter->startElement('c:printSettings'); - - $objWriter->startElement('c:headerFooter'); - $objWriter->endElement(); - - $objWriter->startElement('c:pageMargins'); - $objWriter->writeAttribute('footer', 0.3); - $objWriter->writeAttribute('header', 0.3); - $objWriter->writeAttribute('r', 0.7); - $objWriter->writeAttribute('l', 0.7); - $objWriter->writeAttribute('t', 0.75); - $objWriter->writeAttribute('b', 0.75); - $objWriter->endElement(); - - $objWriter->startElement('c:pageSetup'); - $objWriter->writeAttribute('orientation', "portrait"); - $objWriter->endElement(); - - $objWriter->endElement(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Comments.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Comments.php deleted file mode 100644 index 7139f6c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Comments.php +++ /dev/null @@ -1,260 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_Comments - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_Comments extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write comments to XML format - * - * @param PHPExcel_Worksheet $pWorksheet - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeComments(PHPExcel_Worksheet $pWorksheet = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Comments cache - $comments = $pWorksheet->getComments(); - - // Authors cache - $authors = array(); - $authorId = 0; - foreach ($comments as $comment) { - if (!isset($authors[$comment->getAuthor()])) { - $authors[$comment->getAuthor()] = $authorId++; - } - } - - // comments - $objWriter->startElement('comments'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); - - // Loop through authors - $objWriter->startElement('authors'); - foreach ($authors as $author => $index) { - $objWriter->writeElement('author', $author); - } - $objWriter->endElement(); - - // Loop through comments - $objWriter->startElement('commentList'); - foreach ($comments as $key => $value) { - $this->writeComment($objWriter, $key, $value, $authors); - } - $objWriter->endElement(); - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write comment to XML format - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string $pCellReference Cell reference - * @param PHPExcel_Comment $pComment Comment - * @param array $pAuthors Array of authors - * @throws PHPExcel_Writer_Exception - */ - private function writeComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null, $pAuthors = null) - { - // comment - $objWriter->startElement('comment'); - $objWriter->writeAttribute('ref', $pCellReference); - $objWriter->writeAttribute('authorId', $pAuthors[$pComment->getAuthor()]); - - // text - $objWriter->startElement('text'); - $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $pComment->getText()); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write VML comments to XML format - * - * @param PHPExcel_Worksheet $pWorksheet - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeVMLComments(PHPExcel_Worksheet $pWorksheet = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Comments cache - $comments = $pWorksheet->getComments(); - - // xml - $objWriter->startElement('xml'); - $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml'); - $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office'); - $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel'); - - // o:shapelayout - $objWriter->startElement('o:shapelayout'); - $objWriter->writeAttribute('v:ext', 'edit'); - - // o:idmap - $objWriter->startElement('o:idmap'); - $objWriter->writeAttribute('v:ext', 'edit'); - $objWriter->writeAttribute('data', '1'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // v:shapetype - $objWriter->startElement('v:shapetype'); - $objWriter->writeAttribute('id', '_x0000_t202'); - $objWriter->writeAttribute('coordsize', '21600,21600'); - $objWriter->writeAttribute('o:spt', '202'); - $objWriter->writeAttribute('path', 'm,l,21600r21600,l21600,xe'); - - // v:stroke - $objWriter->startElement('v:stroke'); - $objWriter->writeAttribute('joinstyle', 'miter'); - $objWriter->endElement(); - - // v:path - $objWriter->startElement('v:path'); - $objWriter->writeAttribute('gradientshapeok', 't'); - $objWriter->writeAttribute('o:connecttype', 'rect'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // Loop through comments - foreach ($comments as $key => $value) { - $this->writeVMLComment($objWriter, $key, $value); - } - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write VML comment to XML format - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string $pCellReference Cell reference - * @param PHPExcel_Comment $pComment Comment - * @throws PHPExcel_Writer_Exception - */ - private function writeVMLComment(PHPExcel_Shared_XMLWriter $objWriter = null, $pCellReference = 'A1', PHPExcel_Comment $pComment = null) - { - // Metadata - list($column, $row) = PHPExcel_Cell::coordinateFromString($pCellReference); - $column = PHPExcel_Cell::columnIndexFromString($column); - $id = 1024 + $column + $row; - $id = substr($id, 0, 4); - - // v:shape - $objWriter->startElement('v:shape'); - $objWriter->writeAttribute('id', '_x0000_s' . $id); - $objWriter->writeAttribute('type', '#_x0000_t202'); - $objWriter->writeAttribute('style', 'position:absolute;margin-left:' . $pComment->getMarginLeft() . ';margin-top:' . $pComment->getMarginTop() . ';width:' . $pComment->getWidth() . ';height:' . $pComment->getHeight() . ';z-index:1;visibility:' . ($pComment->getVisible() ? 'visible' : 'hidden')); - $objWriter->writeAttribute('fillcolor', '#' . $pComment->getFillColor()->getRGB()); - $objWriter->writeAttribute('o:insetmode', 'auto'); - - // v:fill - $objWriter->startElement('v:fill'); - $objWriter->writeAttribute('color2', '#' . $pComment->getFillColor()->getRGB()); - $objWriter->endElement(); - - // v:shadow - $objWriter->startElement('v:shadow'); - $objWriter->writeAttribute('on', 't'); - $objWriter->writeAttribute('color', 'black'); - $objWriter->writeAttribute('obscured', 't'); - $objWriter->endElement(); - - // v:path - $objWriter->startElement('v:path'); - $objWriter->writeAttribute('o:connecttype', 'none'); - $objWriter->endElement(); - - // v:textbox - $objWriter->startElement('v:textbox'); - $objWriter->writeAttribute('style', 'mso-direction-alt:auto'); - - // div - $objWriter->startElement('div'); - $objWriter->writeAttribute('style', 'text-align:left'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // x:ClientData - $objWriter->startElement('x:ClientData'); - $objWriter->writeAttribute('ObjectType', 'Note'); - - // x:MoveWithCells - $objWriter->writeElement('x:MoveWithCells', ''); - - // x:SizeWithCells - $objWriter->writeElement('x:SizeWithCells', ''); - - // x:Anchor - //$objWriter->writeElement('x:Anchor', $column . ', 15, ' . ($row - 2) . ', 10, ' . ($column + 4) . ', 15, ' . ($row + 5) . ', 18'); - - // x:AutoFill - $objWriter->writeElement('x:AutoFill', 'False'); - - // x:Row - $objWriter->writeElement('x:Row', ($row - 1)); - - // x:Column - $objWriter->writeElement('x:Column', ($column - 1)); - - $objWriter->endElement(); - - $objWriter->endElement(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/ContentTypes.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/ContentTypes.php deleted file mode 100644 index 0d91189..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/ContentTypes.php +++ /dev/null @@ -1,240 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_ContentTypes - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_ContentTypes extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write content types to XML format - * - * @param PHPExcel $pPHPExcel - * @param boolean $includeCharts Flag indicating if we should include drawing details for charts - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeContentTypes(PHPExcel $pPHPExcel = null, $includeCharts = false) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Types - $objWriter->startElement('Types'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/content-types'); - - // Theme - $this->writeOverrideContentType($objWriter, '/xl/theme/theme1.xml', 'application/vnd.openxmlformats-officedocument.theme+xml'); - - // Styles - $this->writeOverrideContentType($objWriter, '/xl/styles.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml'); - - // Rels - $this->writeDefaultContentType($objWriter, 'rels', 'application/vnd.openxmlformats-package.relationships+xml'); - - // XML - $this->writeDefaultContentType($objWriter, 'xml', 'application/xml'); - - // VML - $this->writeDefaultContentType($objWriter, 'vml', 'application/vnd.openxmlformats-officedocument.vmlDrawing'); - - // Workbook - if ($pPHPExcel->hasMacros()) { //Macros in workbook ? - // Yes : not standard content but "macroEnabled" - $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.ms-excel.sheet.macroEnabled.main+xml'); - //... and define a new type for the VBA project - $this->writeDefaultContentType($objWriter, 'bin', 'application/vnd.ms-office.vbaProject'); - if ($pPHPExcel->hasMacrosCertificate()) {// signed macros ? - // Yes : add needed information - $this->writeOverrideContentType($objWriter, '/xl/vbaProjectSignature.bin', 'application/vnd.ms-office.vbaProjectSignature'); - } - } else {// no macros in workbook, so standard type - $this->writeOverrideContentType($objWriter, '/xl/workbook.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'); - } - - // DocProps - $this->writeOverrideContentType($objWriter, '/docProps/app.xml', 'application/vnd.openxmlformats-officedocument.extended-properties+xml'); - - $this->writeOverrideContentType($objWriter, '/docProps/core.xml', 'application/vnd.openxmlformats-package.core-properties+xml'); - - $customPropertyList = $pPHPExcel->getProperties()->getCustomProperties(); - if (!empty($customPropertyList)) { - $this->writeOverrideContentType($objWriter, '/docProps/custom.xml', 'application/vnd.openxmlformats-officedocument.custom-properties+xml'); - } - - // Worksheets - $sheetCount = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheetCount; ++$i) { - $this->writeOverrideContentType($objWriter, '/xl/worksheets/sheet' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'); - } - - // Shared strings - $this->writeOverrideContentType($objWriter, '/xl/sharedStrings.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml'); - - // Add worksheet relationship content types - $chart = 1; - for ($i = 0; $i < $sheetCount; ++$i) { - $drawings = $pPHPExcel->getSheet($i)->getDrawingCollection(); - $drawingCount = count($drawings); - $chartCount = ($includeCharts) ? $pPHPExcel->getSheet($i)->getChartCount() : 0; - - // We need a drawing relationship for the worksheet if we have either drawings or charts - if (($drawingCount > 0) || ($chartCount > 0)) { - $this->writeOverrideContentType($objWriter, '/xl/drawings/drawing' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.drawing+xml'); - } - - // If we have charts, then we need a chart relationship for every individual chart - if ($chartCount > 0) { - for ($c = 0; $c < $chartCount; ++$c) { - $this->writeOverrideContentType($objWriter, '/xl/charts/chart' . $chart++ . '.xml', 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'); - } - } - } - - // Comments - for ($i = 0; $i < $sheetCount; ++$i) { - if (count($pPHPExcel->getSheet($i)->getComments()) > 0) { - $this->writeOverrideContentType($objWriter, '/xl/comments' . ($i + 1) . '.xml', 'application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml'); - } - } - - // Add media content-types - $aMediaContentTypes = array(); - $mediaCount = $this->getParentWriter()->getDrawingHashTable()->count(); - for ($i = 0; $i < $mediaCount; ++$i) { - $extension = ''; - $mimeType = ''; - - if ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof PHPExcel_Worksheet_Drawing) { - $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getExtension()); - $mimeType = $this->getImageMimeType($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getPath()); - } elseif ($this->getParentWriter()->getDrawingHashTable()->getByIndex($i) instanceof PHPExcel_Worksheet_MemoryDrawing) { - $extension = strtolower($this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType()); - $extension = explode('/', $extension); - $extension = $extension[1]; - - $mimeType = $this->getParentWriter()->getDrawingHashTable()->getByIndex($i)->getMimeType(); - } - - if (!isset( $aMediaContentTypes[$extension])) { - $aMediaContentTypes[$extension] = $mimeType; - - $this->writeDefaultContentType($objWriter, $extension, $mimeType); - } - } - if ($pPHPExcel->hasRibbonBinObjects()) { - // Some additional objects in the ribbon ? - // we need to write "Extension" but not already write for media content - $tabRibbonTypes=array_diff($pPHPExcel->getRibbonBinObjects('types'), array_keys($aMediaContentTypes)); - foreach ($tabRibbonTypes as $aRibbonType) { - $mimeType='image/.'.$aRibbonType;//we wrote $mimeType like customUI Editor - $this->writeDefaultContentType($objWriter, $aRibbonType, $mimeType); - } - } - $sheetCount = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheetCount; ++$i) { - if (count($pPHPExcel->getSheet()->getHeaderFooter()->getImages()) > 0) { - foreach ($pPHPExcel->getSheet()->getHeaderFooter()->getImages() as $image) { - if (!isset( $aMediaContentTypes[strtolower($image->getExtension())])) { - $aMediaContentTypes[strtolower($image->getExtension())] = $this->getImageMimeType($image->getPath()); - - $this->writeDefaultContentType($objWriter, strtolower($image->getExtension()), $aMediaContentTypes[strtolower($image->getExtension())]); - } - } - } - } - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Get image mime type - * - * @param string $pFile Filename - * @return string Mime Type - * @throws PHPExcel_Writer_Exception - */ - private function getImageMimeType($pFile = '') - { - if (PHPExcel_Shared_File::file_exists($pFile)) { - $image = getimagesize($pFile); - return image_type_to_mime_type($image[2]); - } else { - throw new PHPExcel_Writer_Exception("File $pFile does not exist"); - } - } - - /** - * Write Default content type - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string $pPartname Part name - * @param string $pContentType Content type - * @throws PHPExcel_Writer_Exception - */ - private function writeDefaultContentType(PHPExcel_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '') - { - if ($pPartname != '' && $pContentType != '') { - // Write content type - $objWriter->startElement('Default'); - $objWriter->writeAttribute('Extension', $pPartname); - $objWriter->writeAttribute('ContentType', $pContentType); - $objWriter->endElement(); - } else { - throw new PHPExcel_Writer_Exception("Invalid parameters passed."); - } - } - - /** - * Write Override content type - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string $pPartname Part name - * @param string $pContentType Content type - * @throws PHPExcel_Writer_Exception - */ - private function writeOverrideContentType(PHPExcel_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '') - { - if ($pPartname != '' && $pContentType != '') { - // Write content type - $objWriter->startElement('Override'); - $objWriter->writeAttribute('PartName', $pPartname); - $objWriter->writeAttribute('ContentType', $pContentType); - $objWriter->endElement(); - } else { - throw new PHPExcel_Writer_Exception("Invalid parameters passed."); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/DocProps.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/DocProps.php deleted file mode 100644 index fef3d93..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/DocProps.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_DocProps - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_DocProps extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write docProps/app.xml to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeDocPropsApp(PHPExcel $pPHPExcel = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Properties - $objWriter->startElement('Properties'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'); - $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); - - // Application - $objWriter->writeElement('Application', 'Microsoft Excel'); - - // DocSecurity - $objWriter->writeElement('DocSecurity', '0'); - - // ScaleCrop - $objWriter->writeElement('ScaleCrop', 'false'); - - // HeadingPairs - $objWriter->startElement('HeadingPairs'); - - // Vector - $objWriter->startElement('vt:vector'); - $objWriter->writeAttribute('size', '2'); - $objWriter->writeAttribute('baseType', 'variant'); - - // Variant - $objWriter->startElement('vt:variant'); - $objWriter->writeElement('vt:lpstr', 'Worksheets'); - $objWriter->endElement(); - - // Variant - $objWriter->startElement('vt:variant'); - $objWriter->writeElement('vt:i4', $pPHPExcel->getSheetCount()); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // TitlesOfParts - $objWriter->startElement('TitlesOfParts'); - - // Vector - $objWriter->startElement('vt:vector'); - $objWriter->writeAttribute('size', $pPHPExcel->getSheetCount()); - $objWriter->writeAttribute('baseType', 'lpstr'); - - $sheetCount = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheetCount; ++$i) { - $objWriter->writeElement('vt:lpstr', $pPHPExcel->getSheet($i)->getTitle()); - } - - $objWriter->endElement(); - - $objWriter->endElement(); - - // Company - $objWriter->writeElement('Company', $pPHPExcel->getProperties()->getCompany()); - - // Company - $objWriter->writeElement('Manager', $pPHPExcel->getProperties()->getManager()); - - // LinksUpToDate - $objWriter->writeElement('LinksUpToDate', 'false'); - - // SharedDoc - $objWriter->writeElement('SharedDoc', 'false'); - - // HyperlinksChanged - $objWriter->writeElement('HyperlinksChanged', 'false'); - - // AppVersion - $objWriter->writeElement('AppVersion', '12.0000'); - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write docProps/core.xml to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeDocPropsCore(PHPExcel $pPHPExcel = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // cp:coreProperties - $objWriter->startElement('cp:coreProperties'); - $objWriter->writeAttribute('xmlns:cp', 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties'); - $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); - $objWriter->writeAttribute('xmlns:dcterms', 'http://purl.org/dc/terms/'); - $objWriter->writeAttribute('xmlns:dcmitype', 'http://purl.org/dc/dcmitype/'); - $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); - - // dc:creator - $objWriter->writeElement('dc:creator', $pPHPExcel->getProperties()->getCreator()); - - // cp:lastModifiedBy - $objWriter->writeElement('cp:lastModifiedBy', $pPHPExcel->getProperties()->getLastModifiedBy()); - - // dcterms:created - $objWriter->startElement('dcterms:created'); - $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); - $objWriter->writeRawData(date(DATE_W3C, $pPHPExcel->getProperties()->getCreated())); - $objWriter->endElement(); - - // dcterms:modified - $objWriter->startElement('dcterms:modified'); - $objWriter->writeAttribute('xsi:type', 'dcterms:W3CDTF'); - $objWriter->writeRawData(date(DATE_W3C, $pPHPExcel->getProperties()->getModified())); - $objWriter->endElement(); - - // dc:title - $objWriter->writeElement('dc:title', $pPHPExcel->getProperties()->getTitle()); - - // dc:description - $objWriter->writeElement('dc:description', $pPHPExcel->getProperties()->getDescription()); - - // dc:subject - $objWriter->writeElement('dc:subject', $pPHPExcel->getProperties()->getSubject()); - - // cp:keywords - $objWriter->writeElement('cp:keywords', $pPHPExcel->getProperties()->getKeywords()); - - // cp:category - $objWriter->writeElement('cp:category', $pPHPExcel->getProperties()->getCategory()); - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write docProps/custom.xml to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeDocPropsCustom(PHPExcel $pPHPExcel = null) - { - $customPropertyList = $pPHPExcel->getProperties()->getCustomProperties(); - if (empty($customPropertyList)) { - return; - } - - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // cp:coreProperties - $objWriter->startElement('Properties'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties'); - $objWriter->writeAttribute('xmlns:vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes'); - - - foreach ($customPropertyList as $key => $customProperty) { - $propertyValue = $pPHPExcel->getProperties()->getCustomPropertyValue($customProperty); - $propertyType = $pPHPExcel->getProperties()->getCustomPropertyType($customProperty); - - $objWriter->startElement('property'); - $objWriter->writeAttribute('fmtid', '{D5CDD505-2E9C-101B-9397-08002B2CF9AE}'); - $objWriter->writeAttribute('pid', $key+2); - $objWriter->writeAttribute('name', $customProperty); - - switch ($propertyType) { - case 'i': - $objWriter->writeElement('vt:i4', $propertyValue); - break; - case 'f': - $objWriter->writeElement('vt:r8', $propertyValue); - break; - case 'b': - $objWriter->writeElement('vt:bool', ($propertyValue) ? 'true' : 'false'); - break; - case 'd': - $objWriter->startElement('vt:filetime'); - $objWriter->writeRawData(date(DATE_W3C, $propertyValue)); - $objWriter->endElement(); - break; - default: - $objWriter->writeElement('vt:lpwstr', $propertyValue); - break; - } - - $objWriter->endElement(); - } - - - $objWriter->endElement(); - - return $objWriter->getData(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Drawing.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Drawing.php deleted file mode 100644 index 2814388..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Drawing.php +++ /dev/null @@ -1,589 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_Drawing - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_Drawing extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write drawings to XML format - * - * @param PHPExcel_Worksheet $pWorksheet - * @param int &$chartRef Chart ID - * @param boolean $includeCharts Flag indicating if we should include drawing details for charts - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeDrawings(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = false) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // xdr:wsDr - $objWriter->startElement('xdr:wsDr'); - $objWriter->writeAttribute('xmlns:xdr', 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing'); - $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); - - // Loop through images and write drawings - $i = 1; - $iterator = $pWorksheet->getDrawingCollection()->getIterator(); - while ($iterator->valid()) { - $this->writeDrawing($objWriter, $iterator->current(), $i); - - $iterator->next(); - ++$i; - } - - if ($includeCharts) { - $chartCount = $pWorksheet->getChartCount(); - // Loop through charts and write the chart position - if ($chartCount > 0) { - for ($c = 0; $c < $chartCount; ++$c) { - $this->writeChart($objWriter, $pWorksheet->getChartByIndex($c), $c+$i); - } - } - } - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write drawings to XML format - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Chart $pChart - * @param int $pRelationId - * @throws PHPExcel_Writer_Exception - */ - public function writeChart(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Chart $pChart = null, $pRelationId = -1) - { - $tl = $pChart->getTopLeftPosition(); - $tl['colRow'] = PHPExcel_Cell::coordinateFromString($tl['cell']); - $br = $pChart->getBottomRightPosition(); - $br['colRow'] = PHPExcel_Cell::coordinateFromString($br['cell']); - - $objWriter->startElement('xdr:twoCellAnchor'); - - $objWriter->startElement('xdr:from'); - $objWriter->writeElement('xdr:col', PHPExcel_Cell::columnIndexFromString($tl['colRow'][0]) - 1); - $objWriter->writeElement('xdr:colOff', PHPExcel_Shared_Drawing::pixelsToEMU($tl['xOffset'])); - $objWriter->writeElement('xdr:row', $tl['colRow'][1] - 1); - $objWriter->writeElement('xdr:rowOff', PHPExcel_Shared_Drawing::pixelsToEMU($tl['yOffset'])); - $objWriter->endElement(); - $objWriter->startElement('xdr:to'); - $objWriter->writeElement('xdr:col', PHPExcel_Cell::columnIndexFromString($br['colRow'][0]) - 1); - $objWriter->writeElement('xdr:colOff', PHPExcel_Shared_Drawing::pixelsToEMU($br['xOffset'])); - $objWriter->writeElement('xdr:row', $br['colRow'][1] - 1); - $objWriter->writeElement('xdr:rowOff', PHPExcel_Shared_Drawing::pixelsToEMU($br['yOffset'])); - $objWriter->endElement(); - - $objWriter->startElement('xdr:graphicFrame'); - $objWriter->writeAttribute('macro', ''); - $objWriter->startElement('xdr:nvGraphicFramePr'); - $objWriter->startElement('xdr:cNvPr'); - $objWriter->writeAttribute('name', 'Chart '.$pRelationId); - $objWriter->writeAttribute('id', 1025 * $pRelationId); - $objWriter->endElement(); - $objWriter->startElement('xdr:cNvGraphicFramePr'); - $objWriter->startElement('a:graphicFrameLocks'); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->startElement('xdr:xfrm'); - $objWriter->startElement('a:off'); - $objWriter->writeAttribute('x', '0'); - $objWriter->writeAttribute('y', '0'); - $objWriter->endElement(); - $objWriter->startElement('a:ext'); - $objWriter->writeAttribute('cx', '0'); - $objWriter->writeAttribute('cy', '0'); - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->startElement('a:graphic'); - $objWriter->startElement('a:graphicData'); - $objWriter->writeAttribute('uri', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); - $objWriter->startElement('c:chart'); - $objWriter->writeAttribute('xmlns:c', 'http://schemas.openxmlformats.org/drawingml/2006/chart'); - $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - $objWriter->writeAttribute('r:id', 'rId'.$pRelationId); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - - $objWriter->startElement('xdr:clientData'); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write drawings to XML format - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet_BaseDrawing $pDrawing - * @param int $pRelationId - * @throws PHPExcel_Writer_Exception - */ - public function writeDrawing(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet_BaseDrawing $pDrawing = null, $pRelationId = -1) - { - if ($pRelationId >= 0) { - // xdr:oneCellAnchor - $objWriter->startElement('xdr:oneCellAnchor'); - // Image location - $aCoordinates = PHPExcel_Cell::coordinateFromString($pDrawing->getCoordinates()); - $aCoordinates[0] = PHPExcel_Cell::columnIndexFromString($aCoordinates[0]); - - // xdr:from - $objWriter->startElement('xdr:from'); - $objWriter->writeElement('xdr:col', $aCoordinates[0] - 1); - $objWriter->writeElement('xdr:colOff', PHPExcel_Shared_Drawing::pixelsToEMU($pDrawing->getOffsetX())); - $objWriter->writeElement('xdr:row', $aCoordinates[1] - 1); - $objWriter->writeElement('xdr:rowOff', PHPExcel_Shared_Drawing::pixelsToEMU($pDrawing->getOffsetY())); - $objWriter->endElement(); - - // xdr:ext - $objWriter->startElement('xdr:ext'); - $objWriter->writeAttribute('cx', PHPExcel_Shared_Drawing::pixelsToEMU($pDrawing->getWidth())); - $objWriter->writeAttribute('cy', PHPExcel_Shared_Drawing::pixelsToEMU($pDrawing->getHeight())); - $objWriter->endElement(); - - // xdr:pic - $objWriter->startElement('xdr:pic'); - - // xdr:nvPicPr - $objWriter->startElement('xdr:nvPicPr'); - - // xdr:cNvPr - $objWriter->startElement('xdr:cNvPr'); - $objWriter->writeAttribute('id', $pRelationId); - $objWriter->writeAttribute('name', $pDrawing->getName()); - $objWriter->writeAttribute('descr', $pDrawing->getDescription()); - $objWriter->endElement(); - - // xdr:cNvPicPr - $objWriter->startElement('xdr:cNvPicPr'); - - // a:picLocks - $objWriter->startElement('a:picLocks'); - $objWriter->writeAttribute('noChangeAspect', '1'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // xdr:blipFill - $objWriter->startElement('xdr:blipFill'); - - // a:blip - $objWriter->startElement('a:blip'); - $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - $objWriter->writeAttribute('r:embed', 'rId' . $pRelationId); - $objWriter->endElement(); - - // a:stretch - $objWriter->startElement('a:stretch'); - $objWriter->writeElement('a:fillRect', null); - $objWriter->endElement(); - - $objWriter->endElement(); - - // xdr:spPr - $objWriter->startElement('xdr:spPr'); - - // a:xfrm - $objWriter->startElement('a:xfrm'); - $objWriter->writeAttribute('rot', PHPExcel_Shared_Drawing::degreesToAngle($pDrawing->getRotation())); - $objWriter->endElement(); - - // a:prstGeom - $objWriter->startElement('a:prstGeom'); - $objWriter->writeAttribute('prst', 'rect'); - - // a:avLst - $objWriter->writeElement('a:avLst', null); - - $objWriter->endElement(); - -// // a:solidFill -// $objWriter->startElement('a:solidFill'); - -// // a:srgbClr -// $objWriter->startElement('a:srgbClr'); -// $objWriter->writeAttribute('val', 'FFFFFF'); - -///* SHADE -// // a:shade -// $objWriter->startElement('a:shade'); -// $objWriter->writeAttribute('val', '85000'); -// $objWriter->endElement(); -//*/ - -// $objWriter->endElement(); - -// $objWriter->endElement(); -/* - // a:ln - $objWriter->startElement('a:ln'); - $objWriter->writeAttribute('w', '88900'); - $objWriter->writeAttribute('cap', 'sq'); - - // a:solidFill - $objWriter->startElement('a:solidFill'); - - // a:srgbClr - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', 'FFFFFF'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:miter - $objWriter->startElement('a:miter'); - $objWriter->writeAttribute('lim', '800000'); - $objWriter->endElement(); - - $objWriter->endElement(); -*/ - - if ($pDrawing->getShadow()->getVisible()) { - // a:effectLst - $objWriter->startElement('a:effectLst'); - - // a:outerShdw - $objWriter->startElement('a:outerShdw'); - $objWriter->writeAttribute('blurRad', PHPExcel_Shared_Drawing::pixelsToEMU($pDrawing->getShadow()->getBlurRadius())); - $objWriter->writeAttribute('dist', PHPExcel_Shared_Drawing::pixelsToEMU($pDrawing->getShadow()->getDistance())); - $objWriter->writeAttribute('dir', PHPExcel_Shared_Drawing::degreesToAngle($pDrawing->getShadow()->getDirection())); - $objWriter->writeAttribute('algn', $pDrawing->getShadow()->getAlignment()); - $objWriter->writeAttribute('rotWithShape', '0'); - - // a:srgbClr - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', $pDrawing->getShadow()->getColor()->getRGB()); - - // a:alpha - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', $pDrawing->getShadow()->getAlpha() * 1000); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - } -/* - - // a:scene3d - $objWriter->startElement('a:scene3d'); - - // a:camera - $objWriter->startElement('a:camera'); - $objWriter->writeAttribute('prst', 'orthographicFront'); - $objWriter->endElement(); - - // a:lightRig - $objWriter->startElement('a:lightRig'); - $objWriter->writeAttribute('rig', 'twoPt'); - $objWriter->writeAttribute('dir', 't'); - - // a:rot - $objWriter->startElement('a:rot'); - $objWriter->writeAttribute('lat', '0'); - $objWriter->writeAttribute('lon', '0'); - $objWriter->writeAttribute('rev', '0'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); -*/ -/* - // a:sp3d - $objWriter->startElement('a:sp3d'); - - // a:bevelT - $objWriter->startElement('a:bevelT'); - $objWriter->writeAttribute('w', '25400'); - $objWriter->writeAttribute('h', '19050'); - $objWriter->endElement(); - - // a:contourClr - $objWriter->startElement('a:contourClr'); - - // a:srgbClr - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', 'FFFFFF'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); -*/ - $objWriter->endElement(); - - $objWriter->endElement(); - - // xdr:clientData - $objWriter->writeElement('xdr:clientData', null); - - $objWriter->endElement(); - } else { - throw new PHPExcel_Writer_Exception("Invalid parameters passed."); - } - } - - /** - * Write VML header/footer images to XML format - * - * @param PHPExcel_Worksheet $pWorksheet - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeVMLHeaderFooterImages(PHPExcel_Worksheet $pWorksheet = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Header/footer images - $images = $pWorksheet->getHeaderFooter()->getImages(); - - // xml - $objWriter->startElement('xml'); - $objWriter->writeAttribute('xmlns:v', 'urn:schemas-microsoft-com:vml'); - $objWriter->writeAttribute('xmlns:o', 'urn:schemas-microsoft-com:office:office'); - $objWriter->writeAttribute('xmlns:x', 'urn:schemas-microsoft-com:office:excel'); - - // o:shapelayout - $objWriter->startElement('o:shapelayout'); - $objWriter->writeAttribute('v:ext', 'edit'); - - // o:idmap - $objWriter->startElement('o:idmap'); - $objWriter->writeAttribute('v:ext', 'edit'); - $objWriter->writeAttribute('data', '1'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // v:shapetype - $objWriter->startElement('v:shapetype'); - $objWriter->writeAttribute('id', '_x0000_t75'); - $objWriter->writeAttribute('coordsize', '21600,21600'); - $objWriter->writeAttribute('o:spt', '75'); - $objWriter->writeAttribute('o:preferrelative', 't'); - $objWriter->writeAttribute('path', 'm@4@5l@4@11@9@11@9@5xe'); - $objWriter->writeAttribute('filled', 'f'); - $objWriter->writeAttribute('stroked', 'f'); - - // v:stroke - $objWriter->startElement('v:stroke'); - $objWriter->writeAttribute('joinstyle', 'miter'); - $objWriter->endElement(); - - // v:formulas - $objWriter->startElement('v:formulas'); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'if lineDrawn pixelLineWidth 0'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'sum @0 1 0'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'sum 0 0 @1'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'prod @2 1 2'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelWidth'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'prod @3 21600 pixelHeight'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'sum @0 0 1'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'prod @6 1 2'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelWidth'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'sum @8 21600 0'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'prod @7 21600 pixelHeight'); - $objWriter->endElement(); - - // v:f - $objWriter->startElement('v:f'); - $objWriter->writeAttribute('eqn', 'sum @10 21600 0'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // v:path - $objWriter->startElement('v:path'); - $objWriter->writeAttribute('o:extrusionok', 'f'); - $objWriter->writeAttribute('gradientshapeok', 't'); - $objWriter->writeAttribute('o:connecttype', 'rect'); - $objWriter->endElement(); - - // o:lock - $objWriter->startElement('o:lock'); - $objWriter->writeAttribute('v:ext', 'edit'); - $objWriter->writeAttribute('aspectratio', 't'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // Loop through images - foreach ($images as $key => $value) { - $this->writeVMLHeaderFooterImage($objWriter, $key, $value); - } - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write VML comment to XML format - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string $pReference Reference - * @param PHPExcel_Worksheet_HeaderFooterDrawing $pImage Image - * @throws PHPExcel_Writer_Exception - */ - private function writeVMLHeaderFooterImage(PHPExcel_Shared_XMLWriter $objWriter = null, $pReference = '', PHPExcel_Worksheet_HeaderFooterDrawing $pImage = null) - { - // Calculate object id - preg_match('{(\d+)}', md5($pReference), $m); - $id = 1500 + (substr($m[1], 0, 2) * 1); - - // Calculate offset - $width = $pImage->getWidth(); - $height = $pImage->getHeight(); - $marginLeft = $pImage->getOffsetX(); - $marginTop = $pImage->getOffsetY(); - - // v:shape - $objWriter->startElement('v:shape'); - $objWriter->writeAttribute('id', $pReference); - $objWriter->writeAttribute('o:spid', '_x0000_s' . $id); - $objWriter->writeAttribute('type', '#_x0000_t75'); - $objWriter->writeAttribute('style', "position:absolute;margin-left:{$marginLeft}px;margin-top:{$marginTop}px;width:{$width}px;height:{$height}px;z-index:1"); - - // v:imagedata - $objWriter->startElement('v:imagedata'); - $objWriter->writeAttribute('o:relid', 'rId' . $pReference); - $objWriter->writeAttribute('o:title', $pImage->getName()); - $objWriter->endElement(); - - // o:lock - $objWriter->startElement('o:lock'); - $objWriter->writeAttribute('v:ext', 'edit'); - $objWriter->writeAttribute('rotation', 't'); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - - /** - * Get an array of all drawings - * - * @param PHPExcel $pPHPExcel - * @return PHPExcel_Worksheet_Drawing[] All drawings in PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function allDrawings(PHPExcel $pPHPExcel = null) - { - // Get an array of all drawings - $aDrawings = array(); - - // Loop through PHPExcel - $sheetCount = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheetCount; ++$i) { - // Loop through images and add to array - $iterator = $pPHPExcel->getSheet($i)->getDrawingCollection()->getIterator(); - while ($iterator->valid()) { - $aDrawings[] = $iterator->current(); - - $iterator->next(); - } - } - - return $aDrawings; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Rels.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Rels.php deleted file mode 100644 index 14ff337..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Rels.php +++ /dev/null @@ -1,424 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_Rels - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_Rels extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write relationships to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeRelationships(PHPExcel $pPHPExcel = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Relationships - $objWriter->startElement('Relationships'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); - - $customPropertyList = $pPHPExcel->getProperties()->getCustomProperties(); - if (!empty($customPropertyList)) { - // Relationship docProps/app.xml - $this->writeRelationship( - $objWriter, - 4, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties', - 'docProps/custom.xml' - ); - - } - - // Relationship docProps/app.xml - $this->writeRelationship( - $objWriter, - 3, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties', - 'docProps/app.xml' - ); - - // Relationship docProps/core.xml - $this->writeRelationship( - $objWriter, - 2, - 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties', - 'docProps/core.xml' - ); - - // Relationship xl/workbook.xml - $this->writeRelationship( - $objWriter, - 1, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument', - 'xl/workbook.xml' - ); - // a custom UI in workbook ? - if ($pPHPExcel->hasRibbon()) { - $this->writeRelationShip( - $objWriter, - 5, - 'http://schemas.microsoft.com/office/2006/relationships/ui/extensibility', - $pPHPExcel->getRibbonXMLData('target') - ); - } - - $objWriter->endElement(); - - return $objWriter->getData(); - } - - /** - * Write workbook relationships to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeWorkbookRelationships(PHPExcel $pPHPExcel = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Relationships - $objWriter->startElement('Relationships'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); - - // Relationship styles.xml - $this->writeRelationship( - $objWriter, - 1, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles', - 'styles.xml' - ); - - // Relationship theme/theme1.xml - $this->writeRelationship( - $objWriter, - 2, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme', - 'theme/theme1.xml' - ); - - // Relationship sharedStrings.xml - $this->writeRelationship( - $objWriter, - 3, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings', - 'sharedStrings.xml' - ); - - // Relationships with sheets - $sheetCount = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheetCount; ++$i) { - $this->writeRelationship( - $objWriter, - ($i + 1 + 3), - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet', - 'worksheets/sheet' . ($i + 1) . '.xml' - ); - } - // Relationships for vbaProject if needed - // id : just after the last sheet - if ($pPHPExcel->hasMacros()) { - $this->writeRelationShip( - $objWriter, - ($i + 1 + 3), - 'http://schemas.microsoft.com/office/2006/relationships/vbaProject', - 'vbaProject.bin' - ); - ++$i;//increment i if needed for an another relation - } - - $objWriter->endElement(); - - return $objWriter->getData(); - } - - /** - * Write worksheet relationships to XML format - * - * Numbering is as follows: - * rId1 - Drawings - * rId_hyperlink_x - Hyperlinks - * - * @param PHPExcel_Worksheet $pWorksheet - * @param int $pWorksheetId - * @param boolean $includeCharts Flag indicating if we should write charts - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeWorksheetRelationships(PHPExcel_Worksheet $pWorksheet = null, $pWorksheetId = 1, $includeCharts = false) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Relationships - $objWriter->startElement('Relationships'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); - - // Write drawing relationships? - $d = 0; - if ($includeCharts) { - $charts = $pWorksheet->getChartCollection(); - } else { - $charts = array(); - } - if (($pWorksheet->getDrawingCollection()->count() > 0) || - (count($charts) > 0)) { - $this->writeRelationship( - $objWriter, - ++$d, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing', - '../drawings/drawing' . $pWorksheetId . '.xml' - ); - } - - // Write chart relationships? -// $chartCount = 0; -// $charts = $pWorksheet->getChartCollection(); -// echo 'Chart Rels: ' , count($charts) , '<br />'; -// if (count($charts) > 0) { -// foreach ($charts as $chart) { -// $this->writeRelationship( -// $objWriter, -// ++$d, -// 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', -// '../charts/chart' . ++$chartCount . '.xml' -// ); -// } -// } -// - // Write hyperlink relationships? - $i = 1; - foreach ($pWorksheet->getHyperlinkCollection() as $hyperlink) { - if (!$hyperlink->isInternal()) { - $this->writeRelationship( - $objWriter, - '_hyperlink_' . $i, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', - $hyperlink->getUrl(), - 'External' - ); - - ++$i; - } - } - - // Write comments relationship? - $i = 1; - if (count($pWorksheet->getComments()) > 0) { - $this->writeRelationship( - $objWriter, - '_comments_vml' . $i, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', - '../drawings/vmlDrawing' . $pWorksheetId . '.vml' - ); - - $this->writeRelationship( - $objWriter, - '_comments' . $i, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments', - '../comments' . $pWorksheetId . '.xml' - ); - } - - // Write header/footer relationship? - $i = 1; - if (count($pWorksheet->getHeaderFooter()->getImages()) > 0) { - $this->writeRelationship( - $objWriter, - '_headerfooter_vml' . $i, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing', - '../drawings/vmlDrawingHF' . $pWorksheetId . '.vml' - ); - } - - $objWriter->endElement(); - - return $objWriter->getData(); - } - - /** - * Write drawing relationships to XML format - * - * @param PHPExcel_Worksheet $pWorksheet - * @param int &$chartRef Chart ID - * @param boolean $includeCharts Flag indicating if we should write charts - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeDrawingRelationships(PHPExcel_Worksheet $pWorksheet = null, &$chartRef, $includeCharts = false) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Relationships - $objWriter->startElement('Relationships'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); - - // Loop through images and write relationships - $i = 1; - $iterator = $pWorksheet->getDrawingCollection()->getIterator(); - while ($iterator->valid()) { - if ($iterator->current() instanceof PHPExcel_Worksheet_Drawing - || $iterator->current() instanceof PHPExcel_Worksheet_MemoryDrawing) { - // Write relationship for image drawing - $this->writeRelationship( - $objWriter, - $i, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', - '../media/' . str_replace(' ', '', $iterator->current()->getIndexedFilename()) - ); - } - - $iterator->next(); - ++$i; - } - - if ($includeCharts) { - // Loop through charts and write relationships - $chartCount = $pWorksheet->getChartCount(); - if ($chartCount > 0) { - for ($c = 0; $c < $chartCount; ++$c) { - $this->writeRelationship( - $objWriter, - $i++, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', - '../charts/chart' . ++$chartRef . '.xml' - ); - } - } - } - - $objWriter->endElement(); - - return $objWriter->getData(); - } - - /** - * Write header/footer drawing relationships to XML format - * - * @param PHPExcel_Worksheet $pWorksheet - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeHeaderFooterDrawingRelationships(PHPExcel_Worksheet $pWorksheet = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Relationships - $objWriter->startElement('Relationships'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); - - // Loop through images and write relationships - foreach ($pWorksheet->getHeaderFooter()->getImages() as $key => $value) { - // Write relationship for image drawing - $this->writeRelationship( - $objWriter, - $key, - 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', - '../media/' . $value->getIndexedFilename() - ); - } - - $objWriter->endElement(); - - return $objWriter->getData(); - } - - /** - * Write Override content type - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param int $pId Relationship ID. rId will be prepended! - * @param string $pType Relationship type - * @param string $pTarget Relationship target - * @param string $pTargetMode Relationship target mode - * @throws PHPExcel_Writer_Exception - */ - private function writeRelationship(PHPExcel_Shared_XMLWriter $objWriter = null, $pId = 1, $pType = '', $pTarget = '', $pTargetMode = '') - { - if ($pType != '' && $pTarget != '') { - // Write relationship - $objWriter->startElement('Relationship'); - $objWriter->writeAttribute('Id', 'rId' . $pId); - $objWriter->writeAttribute('Type', $pType); - $objWriter->writeAttribute('Target', $pTarget); - - if ($pTargetMode != '') { - $objWriter->writeAttribute('TargetMode', $pTargetMode); - } - - $objWriter->endElement(); - } else { - throw new PHPExcel_Writer_Exception("Invalid parameters passed."); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/RelsRibbon.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/RelsRibbon.php deleted file mode 100644 index 5a4a9fc..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/RelsRibbon.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_RelsRibbon - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_RelsRibbon extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write relationships for additional objects of custom UI (ribbon) - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeRibbonRelationships(PHPExcel $pPHPExcel = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Relationships - $objWriter->startElement('Relationships'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); - $localRels = $pPHPExcel->getRibbonBinObjects('names'); - if (is_array($localRels)) { - foreach ($localRels as $aId => $aTarget) { - $objWriter->startElement('Relationship'); - $objWriter->writeAttribute('Id', $aId); - $objWriter->writeAttribute('Type', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'); - $objWriter->writeAttribute('Target', $aTarget); - $objWriter->endElement(); - } - } - $objWriter->endElement(); - - return $objWriter->getData(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/RelsVBA.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/RelsVBA.php deleted file mode 100644 index bee0e64..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/RelsVBA.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_RelsVBA - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_RelsVBA extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write relationships for a signed VBA Project - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeVBARelationships(PHPExcel $pPHPExcel = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Relationships - $objWriter->startElement('Relationships'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/package/2006/relationships'); - $objWriter->startElement('Relationship'); - $objWriter->writeAttribute('Id', 'rId1'); - $objWriter->writeAttribute('Type', 'http://schemas.microsoft.com/office/2006/relationships/vbaProjectSignature'); - $objWriter->writeAttribute('Target', 'vbaProjectSignature.bin'); - $objWriter->endElement(); - $objWriter->endElement(); - - return $objWriter->getData(); - - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/StringTable.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/StringTable.php deleted file mode 100644 index fccec66..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/StringTable.php +++ /dev/null @@ -1,313 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_StringTable - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_StringTable extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Create worksheet stringtable - * - * @param PHPExcel_Worksheet $pSheet Worksheet - * @param string[] $pExistingTable Existing table to eventually merge with - * @return string[] String table for worksheet - * @throws PHPExcel_Writer_Exception - */ - public function createStringTable($pSheet = null, $pExistingTable = null) - { - if ($pSheet !== null) { - // Create string lookup table - $aStringTable = array(); - $cellCollection = null; - $aFlippedStringTable = null; // For faster lookup - - // Is an existing table given? - if (($pExistingTable !== null) && is_array($pExistingTable)) { - $aStringTable = $pExistingTable; - } - - // Fill index array - $aFlippedStringTable = $this->flipStringTable($aStringTable); - - // Loop through cells - foreach ($pSheet->getCellCollection() as $cellID) { - $cell = $pSheet->getCell($cellID); - $cellValue = $cell->getValue(); - if (!is_object($cellValue) && - ($cellValue !== null) && - $cellValue !== '' && - !isset($aFlippedStringTable[$cellValue]) && - ($cell->getDataType() == PHPExcel_Cell_DataType::TYPE_STRING || $cell->getDataType() == PHPExcel_Cell_DataType::TYPE_STRING2 || $cell->getDataType() == PHPExcel_Cell_DataType::TYPE_NULL)) { - $aStringTable[] = $cellValue; - $aFlippedStringTable[$cellValue] = true; - } elseif ($cellValue instanceof PHPExcel_RichText && - ($cellValue !== null) && - !isset($aFlippedStringTable[$cellValue->getHashCode()])) { - $aStringTable[] = $cellValue; - $aFlippedStringTable[$cellValue->getHashCode()] = true; - } - } - - return $aStringTable; - } else { - throw new PHPExcel_Writer_Exception("Invalid PHPExcel_Worksheet object passed."); - } - } - - /** - * Write string table to XML format - * - * @param string[] $pStringTable - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeStringTable($pStringTable = null) - { - if ($pStringTable !== null) { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // String table - $objWriter->startElement('sst'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); - $objWriter->writeAttribute('uniqueCount', count($pStringTable)); - - // Loop through string table - foreach ($pStringTable as $textElement) { - $objWriter->startElement('si'); - - if (! $textElement instanceof PHPExcel_RichText) { - $textToWrite = PHPExcel_Shared_String::ControlCharacterPHP2OOXML($textElement); - $objWriter->startElement('t'); - if ($textToWrite !== trim($textToWrite)) { - $objWriter->writeAttribute('xml:space', 'preserve'); - } - $objWriter->writeRawData($textToWrite); - $objWriter->endElement(); - } elseif ($textElement instanceof PHPExcel_RichText) { - $this->writeRichText($objWriter, $textElement); - } - - $objWriter->endElement(); - } - - $objWriter->endElement(); - - return $objWriter->getData(); - } else { - throw new PHPExcel_Writer_Exception("Invalid string table array passed."); - } - } - - /** - * Write Rich Text - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_RichText $pRichText Rich text - * @param string $prefix Optional Namespace prefix - * @throws PHPExcel_Writer_Exception - */ - public function writeRichText(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_RichText $pRichText = null, $prefix = null) - { - if ($prefix !== null) { - $prefix .= ':'; - } - - // Loop through rich text elements - $elements = $pRichText->getRichTextElements(); - foreach ($elements as $element) { - // r - $objWriter->startElement($prefix.'r'); - - // rPr - if ($element instanceof PHPExcel_RichText_Run) { - // rPr - $objWriter->startElement($prefix.'rPr'); - - // rFont - $objWriter->startElement($prefix.'rFont'); - $objWriter->writeAttribute('val', $element->getFont()->getName()); - $objWriter->endElement(); - - // Bold - $objWriter->startElement($prefix.'b'); - $objWriter->writeAttribute('val', ($element->getFont()->getBold() ? 'true' : 'false')); - $objWriter->endElement(); - - // Italic - $objWriter->startElement($prefix.'i'); - $objWriter->writeAttribute('val', ($element->getFont()->getItalic() ? 'true' : 'false')); - $objWriter->endElement(); - - // Superscript / subscript - if ($element->getFont()->getSuperScript() || $element->getFont()->getSubScript()) { - $objWriter->startElement($prefix.'vertAlign'); - if ($element->getFont()->getSuperScript()) { - $objWriter->writeAttribute('val', 'superscript'); - } elseif ($element->getFont()->getSubScript()) { - $objWriter->writeAttribute('val', 'subscript'); - } - $objWriter->endElement(); - } - - // Strikethrough - $objWriter->startElement($prefix.'strike'); - $objWriter->writeAttribute('val', ($element->getFont()->getStrikethrough() ? 'true' : 'false')); - $objWriter->endElement(); - - // Color - $objWriter->startElement($prefix.'color'); - $objWriter->writeAttribute('rgb', $element->getFont()->getColor()->getARGB()); - $objWriter->endElement(); - - // Size - $objWriter->startElement($prefix.'sz'); - $objWriter->writeAttribute('val', $element->getFont()->getSize()); - $objWriter->endElement(); - - // Underline - $objWriter->startElement($prefix.'u'); - $objWriter->writeAttribute('val', $element->getFont()->getUnderline()); - $objWriter->endElement(); - - $objWriter->endElement(); - } - - // t - $objWriter->startElement($prefix.'t'); - $objWriter->writeAttribute('xml:space', 'preserve'); - $objWriter->writeRawData(PHPExcel_Shared_String::ControlCharacterPHP2OOXML($element->getText())); - $objWriter->endElement(); - - $objWriter->endElement(); - } - } - - /** - * Write Rich Text - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string|PHPExcel_RichText $pRichText text string or Rich text - * @param string $prefix Optional Namespace prefix - * @throws PHPExcel_Writer_Exception - */ - public function writeRichTextForCharts(PHPExcel_Shared_XMLWriter $objWriter = null, $pRichText = null, $prefix = null) - { - if (!$pRichText instanceof PHPExcel_RichText) { - $textRun = $pRichText; - $pRichText = new PHPExcel_RichText(); - $pRichText->createTextRun($textRun); - } - - if ($prefix !== null) { - $prefix .= ':'; - } - - // Loop through rich text elements - $elements = $pRichText->getRichTextElements(); - foreach ($elements as $element) { - // r - $objWriter->startElement($prefix.'r'); - - // rPr - $objWriter->startElement($prefix.'rPr'); - - // Bold - $objWriter->writeAttribute('b', ($element->getFont()->getBold() ? 1 : 0)); - // Italic - $objWriter->writeAttribute('i', ($element->getFont()->getItalic() ? 1 : 0)); - // Underline - $underlineType = $element->getFont()->getUnderline(); - switch ($underlineType) { - case 'single': - $underlineType = 'sng'; - break; - case 'double': - $underlineType = 'dbl'; - break; - } - $objWriter->writeAttribute('u', $underlineType); - // Strikethrough - $objWriter->writeAttribute('strike', ($element->getFont()->getStrikethrough() ? 'sngStrike' : 'noStrike')); - - // rFont - $objWriter->startElement($prefix.'latin'); - $objWriter->writeAttribute('typeface', $element->getFont()->getName()); - $objWriter->endElement(); - - // Superscript / subscript -// if ($element->getFont()->getSuperScript() || $element->getFont()->getSubScript()) { -// $objWriter->startElement($prefix.'vertAlign'); -// if ($element->getFont()->getSuperScript()) { -// $objWriter->writeAttribute('val', 'superscript'); -// } elseif ($element->getFont()->getSubScript()) { -// $objWriter->writeAttribute('val', 'subscript'); -// } -// $objWriter->endElement(); -// } -// - $objWriter->endElement(); - - // t - $objWriter->startElement($prefix.'t'); -// $objWriter->writeAttribute('xml:space', 'preserve'); // Excel2010 accepts, Excel2007 complains - $objWriter->writeRawData(PHPExcel_Shared_String::ControlCharacterPHP2OOXML($element->getText())); - $objWriter->endElement(); - - $objWriter->endElement(); - } - } - - /** - * Flip string table (for index searching) - * - * @param array $stringTable Stringtable - * @return array - */ - public function flipStringTable($stringTable = array()) - { - // Return value - $returnValue = array(); - - // Loop through stringtable and add flipped items to $returnValue - foreach ($stringTable as $key => $value) { - if (! $value instanceof PHPExcel_RichText) { - $returnValue[$value] = $key; - } elseif ($value instanceof PHPExcel_RichText) { - $returnValue[$value->getHashCode()] = $key; - } - } - - return $returnValue; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php deleted file mode 100644 index d3f0af7..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Style.php +++ /dev/null @@ -1,696 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_Style - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_Style extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write styles to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeStyles(PHPExcel $pPHPExcel = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // styleSheet - $objWriter->startElement('styleSheet'); - $objWriter->writeAttribute('xml:space', 'preserve'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); - - // numFmts - $objWriter->startElement('numFmts'); - $objWriter->writeAttribute('count', $this->getParentWriter()->getNumFmtHashTable()->count()); - - // numFmt - for ($i = 0; $i < $this->getParentWriter()->getNumFmtHashTable()->count(); ++$i) { - $this->writeNumFmt($objWriter, $this->getParentWriter()->getNumFmtHashTable()->getByIndex($i), $i); - } - - $objWriter->endElement(); - - // fonts - $objWriter->startElement('fonts'); - $objWriter->writeAttribute('count', $this->getParentWriter()->getFontHashTable()->count()); - - // font - for ($i = 0; $i < $this->getParentWriter()->getFontHashTable()->count(); ++$i) { - $this->writeFont($objWriter, $this->getParentWriter()->getFontHashTable()->getByIndex($i)); - } - - $objWriter->endElement(); - - // fills - $objWriter->startElement('fills'); - $objWriter->writeAttribute('count', $this->getParentWriter()->getFillHashTable()->count()); - - // fill - for ($i = 0; $i < $this->getParentWriter()->getFillHashTable()->count(); ++$i) { - $this->writeFill($objWriter, $this->getParentWriter()->getFillHashTable()->getByIndex($i)); - } - - $objWriter->endElement(); - - // borders - $objWriter->startElement('borders'); - $objWriter->writeAttribute('count', $this->getParentWriter()->getBordersHashTable()->count()); - - // border - for ($i = 0; $i < $this->getParentWriter()->getBordersHashTable()->count(); ++$i) { - $this->writeBorder($objWriter, $this->getParentWriter()->getBordersHashTable()->getByIndex($i)); - } - - $objWriter->endElement(); - - // cellStyleXfs - $objWriter->startElement('cellStyleXfs'); - $objWriter->writeAttribute('count', 1); - - // xf - $objWriter->startElement('xf'); - $objWriter->writeAttribute('numFmtId', 0); - $objWriter->writeAttribute('fontId', 0); - $objWriter->writeAttribute('fillId', 0); - $objWriter->writeAttribute('borderId', 0); - $objWriter->endElement(); - - $objWriter->endElement(); - - // cellXfs - $objWriter->startElement('cellXfs'); - $objWriter->writeAttribute('count', count($pPHPExcel->getCellXfCollection())); - - // xf - foreach ($pPHPExcel->getCellXfCollection() as $cellXf) { - $this->writeCellStyleXf($objWriter, $cellXf, $pPHPExcel); - } - - $objWriter->endElement(); - - // cellStyles - $objWriter->startElement('cellStyles'); - $objWriter->writeAttribute('count', 1); - - // cellStyle - $objWriter->startElement('cellStyle'); - $objWriter->writeAttribute('name', 'Normal'); - $objWriter->writeAttribute('xfId', 0); - $objWriter->writeAttribute('builtinId', 0); - $objWriter->endElement(); - - $objWriter->endElement(); - - // dxfs - $objWriter->startElement('dxfs'); - $objWriter->writeAttribute('count', $this->getParentWriter()->getStylesConditionalHashTable()->count()); - - // dxf - for ($i = 0; $i < $this->getParentWriter()->getStylesConditionalHashTable()->count(); ++$i) { - $this->writeCellStyleDxf($objWriter, $this->getParentWriter()->getStylesConditionalHashTable()->getByIndex($i)->getStyle()); - } - - $objWriter->endElement(); - - // tableStyles - $objWriter->startElement('tableStyles'); - $objWriter->writeAttribute('defaultTableStyle', 'TableStyleMedium9'); - $objWriter->writeAttribute('defaultPivotStyle', 'PivotTableStyle1'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write Fill - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Style_Fill $pFill Fill style - * @throws PHPExcel_Writer_Exception - */ - private function writeFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null) - { - // Check if this is a pattern type or gradient type - if ($pFill->getFillType() === PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR || - $pFill->getFillType() === PHPExcel_Style_Fill::FILL_GRADIENT_PATH) { - // Gradient fill - $this->writeGradientFill($objWriter, $pFill); - } elseif ($pFill->getFillType() !== null) { - // Pattern fill - $this->writePatternFill($objWriter, $pFill); - } - } - - /** - * Write Gradient Fill - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Style_Fill $pFill Fill style - * @throws PHPExcel_Writer_Exception - */ - private function writeGradientFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null) - { - // fill - $objWriter->startElement('fill'); - - // gradientFill - $objWriter->startElement('gradientFill'); - $objWriter->writeAttribute('type', $pFill->getFillType()); - $objWriter->writeAttribute('degree', $pFill->getRotation()); - - // stop - $objWriter->startElement('stop'); - $objWriter->writeAttribute('position', '0'); - - // color - $objWriter->startElement('color'); - $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB()); - $objWriter->endElement(); - - $objWriter->endElement(); - - // stop - $objWriter->startElement('stop'); - $objWriter->writeAttribute('position', '1'); - - // color - $objWriter->startElement('color'); - $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB()); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write Pattern Fill - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Style_Fill $pFill Fill style - * @throws PHPExcel_Writer_Exception - */ - private function writePatternFill(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Fill $pFill = null) - { - // fill - $objWriter->startElement('fill'); - - // patternFill - $objWriter->startElement('patternFill'); - $objWriter->writeAttribute('patternType', $pFill->getFillType()); - - if ($pFill->getFillType() !== PHPExcel_Style_Fill::FILL_NONE) { - // fgColor - if ($pFill->getStartColor()->getARGB()) { - $objWriter->startElement('fgColor'); - $objWriter->writeAttribute('rgb', $pFill->getStartColor()->getARGB()); - $objWriter->endElement(); - } - } - if ($pFill->getFillType() !== PHPExcel_Style_Fill::FILL_NONE) { - // bgColor - if ($pFill->getEndColor()->getARGB()) { - $objWriter->startElement('bgColor'); - $objWriter->writeAttribute('rgb', $pFill->getEndColor()->getARGB()); - $objWriter->endElement(); - } - } - - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write Font - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Style_Font $pFont Font style - * @throws PHPExcel_Writer_Exception - */ - private function writeFont(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Font $pFont = null) - { - // font - $objWriter->startElement('font'); - // Weird! The order of these elements actually makes a difference when opening Excel2007 - // files in Excel2003 with the compatibility pack. It's not documented behaviour, - // and makes for a real WTF! - - // Bold. We explicitly write this element also when false (like MS Office Excel 2007 does - // for conditional formatting). Otherwise it will apparently not be picked up in conditional - // formatting style dialog - if ($pFont->getBold() !== null) { - $objWriter->startElement('b'); - $objWriter->writeAttribute('val', $pFont->getBold() ? '1' : '0'); - $objWriter->endElement(); - } - - // Italic - if ($pFont->getItalic() !== null) { - $objWriter->startElement('i'); - $objWriter->writeAttribute('val', $pFont->getItalic() ? '1' : '0'); - $objWriter->endElement(); - } - - // Strikethrough - if ($pFont->getStrikethrough() !== null) { - $objWriter->startElement('strike'); - $objWriter->writeAttribute('val', $pFont->getStrikethrough() ? '1' : '0'); - $objWriter->endElement(); - } - - // Underline - if ($pFont->getUnderline() !== null) { - $objWriter->startElement('u'); - $objWriter->writeAttribute('val', $pFont->getUnderline()); - $objWriter->endElement(); - } - - // Superscript / subscript - if ($pFont->getSuperScript() === true || $pFont->getSubScript() === true) { - $objWriter->startElement('vertAlign'); - if ($pFont->getSuperScript() === true) { - $objWriter->writeAttribute('val', 'superscript'); - } elseif ($pFont->getSubScript() === true) { - $objWriter->writeAttribute('val', 'subscript'); - } - $objWriter->endElement(); - } - - // Size - if ($pFont->getSize() !== null) { - $objWriter->startElement('sz'); - $objWriter->writeAttribute('val', $pFont->getSize()); - $objWriter->endElement(); - } - - // Foreground color - if ($pFont->getColor()->getARGB() !== null) { - $objWriter->startElement('color'); - $objWriter->writeAttribute('rgb', $pFont->getColor()->getARGB()); - $objWriter->endElement(); - } - - // Name - if ($pFont->getName() !== null) { - $objWriter->startElement('name'); - $objWriter->writeAttribute('val', $pFont->getName()); - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - - /** - * Write Border - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Style_Borders $pBorders Borders style - * @throws PHPExcel_Writer_Exception - */ - private function writeBorder(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_Borders $pBorders = null) - { - // Write border - $objWriter->startElement('border'); - // Diagonal? - switch ($pBorders->getDiagonalDirection()) { - case PHPExcel_Style_Borders::DIAGONAL_UP: - $objWriter->writeAttribute('diagonalUp', 'true'); - $objWriter->writeAttribute('diagonalDown', 'false'); - break; - case PHPExcel_Style_Borders::DIAGONAL_DOWN: - $objWriter->writeAttribute('diagonalUp', 'false'); - $objWriter->writeAttribute('diagonalDown', 'true'); - break; - case PHPExcel_Style_Borders::DIAGONAL_BOTH: - $objWriter->writeAttribute('diagonalUp', 'true'); - $objWriter->writeAttribute('diagonalDown', 'true'); - break; - } - - // BorderPr - $this->writeBorderPr($objWriter, 'left', $pBorders->getLeft()); - $this->writeBorderPr($objWriter, 'right', $pBorders->getRight()); - $this->writeBorderPr($objWriter, 'top', $pBorders->getTop()); - $this->writeBorderPr($objWriter, 'bottom', $pBorders->getBottom()); - $this->writeBorderPr($objWriter, 'diagonal', $pBorders->getDiagonal()); - $objWriter->endElement(); - } - - /** - * Write Cell Style Xf - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Style $pStyle Style - * @param PHPExcel $pPHPExcel Workbook - * @throws PHPExcel_Writer_Exception - */ - private function writeCellStyleXf(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style $pStyle = null, PHPExcel $pPHPExcel = null) - { - // xf - $objWriter->startElement('xf'); - $objWriter->writeAttribute('xfId', 0); - $objWriter->writeAttribute('fontId', (int)$this->getParentWriter()->getFontHashTable()->getIndexForHashCode($pStyle->getFont()->getHashCode())); - if ($pStyle->getQuotePrefix()) { - $objWriter->writeAttribute('quotePrefix', 1); - } - - if ($pStyle->getNumberFormat()->getBuiltInFormatCode() === false) { - $objWriter->writeAttribute('numFmtId', (int)($this->getParentWriter()->getNumFmtHashTable()->getIndexForHashCode($pStyle->getNumberFormat()->getHashCode()) + 164)); - } else { - $objWriter->writeAttribute('numFmtId', (int)$pStyle->getNumberFormat()->getBuiltInFormatCode()); - } - - $objWriter->writeAttribute('fillId', (int)$this->getParentWriter()->getFillHashTable()->getIndexForHashCode($pStyle->getFill()->getHashCode())); - $objWriter->writeAttribute('borderId', (int)$this->getParentWriter()->getBordersHashTable()->getIndexForHashCode($pStyle->getBorders()->getHashCode())); - - // Apply styles? - $objWriter->writeAttribute('applyFont', ($pPHPExcel->getDefaultStyle()->getFont()->getHashCode() != $pStyle->getFont()->getHashCode()) ? '1' : '0'); - $objWriter->writeAttribute('applyNumberFormat', ($pPHPExcel->getDefaultStyle()->getNumberFormat()->getHashCode() != $pStyle->getNumberFormat()->getHashCode()) ? '1' : '0'); - $objWriter->writeAttribute('applyFill', ($pPHPExcel->getDefaultStyle()->getFill()->getHashCode() != $pStyle->getFill()->getHashCode()) ? '1' : '0'); - $objWriter->writeAttribute('applyBorder', ($pPHPExcel->getDefaultStyle()->getBorders()->getHashCode() != $pStyle->getBorders()->getHashCode()) ? '1' : '0'); - $objWriter->writeAttribute('applyAlignment', ($pPHPExcel->getDefaultStyle()->getAlignment()->getHashCode() != $pStyle->getAlignment()->getHashCode()) ? '1' : '0'); - if ($pStyle->getProtection()->getLocked() != PHPExcel_Style_Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != PHPExcel_Style_Protection::PROTECTION_INHERIT) { - $objWriter->writeAttribute('applyProtection', 'true'); - } - - // alignment - $objWriter->startElement('alignment'); - $objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal()); - $objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical()); - - $textRotation = 0; - if ($pStyle->getAlignment()->getTextRotation() >= 0) { - $textRotation = $pStyle->getAlignment()->getTextRotation(); - } elseif ($pStyle->getAlignment()->getTextRotation() < 0) { - $textRotation = 90 - $pStyle->getAlignment()->getTextRotation(); - } - $objWriter->writeAttribute('textRotation', $textRotation); - - $objWriter->writeAttribute('wrapText', ($pStyle->getAlignment()->getWrapText() ? 'true' : 'false')); - $objWriter->writeAttribute('shrinkToFit', ($pStyle->getAlignment()->getShrinkToFit() ? 'true' : 'false')); - - if ($pStyle->getAlignment()->getIndent() > 0) { - $objWriter->writeAttribute('indent', $pStyle->getAlignment()->getIndent()); - } - if ($pStyle->getAlignment()->getReadorder() > 0) { - $objWriter->writeAttribute('readingOrder', $pStyle->getAlignment()->getReadorder()); - } - $objWriter->endElement(); - - // protection - if ($pStyle->getProtection()->getLocked() != PHPExcel_Style_Protection::PROTECTION_INHERIT || $pStyle->getProtection()->getHidden() != PHPExcel_Style_Protection::PROTECTION_INHERIT) { - $objWriter->startElement('protection'); - if ($pStyle->getProtection()->getLocked() != PHPExcel_Style_Protection::PROTECTION_INHERIT) { - $objWriter->writeAttribute('locked', ($pStyle->getProtection()->getLocked() == PHPExcel_Style_Protection::PROTECTION_PROTECTED ? 'true' : 'false')); - } - if ($pStyle->getProtection()->getHidden() != PHPExcel_Style_Protection::PROTECTION_INHERIT) { - $objWriter->writeAttribute('hidden', ($pStyle->getProtection()->getHidden() == PHPExcel_Style_Protection::PROTECTION_PROTECTED ? 'true' : 'false')); - } - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - - /** - * Write Cell Style Dxf - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Style $pStyle Style - * @throws PHPExcel_Writer_Exception - */ - private function writeCellStyleDxf(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style $pStyle = null) - { - // dxf - $objWriter->startElement('dxf'); - - // font - $this->writeFont($objWriter, $pStyle->getFont()); - - // numFmt - $this->writeNumFmt($objWriter, $pStyle->getNumberFormat()); - - // fill - $this->writeFill($objWriter, $pStyle->getFill()); - - // alignment - $objWriter->startElement('alignment'); - if ($pStyle->getAlignment()->getHorizontal() !== null) { - $objWriter->writeAttribute('horizontal', $pStyle->getAlignment()->getHorizontal()); - } - if ($pStyle->getAlignment()->getVertical() !== null) { - $objWriter->writeAttribute('vertical', $pStyle->getAlignment()->getVertical()); - } - - if ($pStyle->getAlignment()->getTextRotation() !== null) { - $textRotation = 0; - if ($pStyle->getAlignment()->getTextRotation() >= 0) { - $textRotation = $pStyle->getAlignment()->getTextRotation(); - } elseif ($pStyle->getAlignment()->getTextRotation() < 0) { - $textRotation = 90 - $pStyle->getAlignment()->getTextRotation(); - } - $objWriter->writeAttribute('textRotation', $textRotation); - } - $objWriter->endElement(); - - // border - $this->writeBorder($objWriter, $pStyle->getBorders()); - - // protection - if (($pStyle->getProtection()->getLocked() !== null) || ($pStyle->getProtection()->getHidden() !== null)) { - if ($pStyle->getProtection()->getLocked() !== PHPExcel_Style_Protection::PROTECTION_INHERIT || - $pStyle->getProtection()->getHidden() !== PHPExcel_Style_Protection::PROTECTION_INHERIT) { - $objWriter->startElement('protection'); - if (($pStyle->getProtection()->getLocked() !== null) && - ($pStyle->getProtection()->getLocked() !== PHPExcel_Style_Protection::PROTECTION_INHERIT)) { - $objWriter->writeAttribute('locked', ($pStyle->getProtection()->getLocked() == PHPExcel_Style_Protection::PROTECTION_PROTECTED ? 'true' : 'false')); - } - if (($pStyle->getProtection()->getHidden() !== null) && - ($pStyle->getProtection()->getHidden() !== PHPExcel_Style_Protection::PROTECTION_INHERIT)) { - $objWriter->writeAttribute('hidden', ($pStyle->getProtection()->getHidden() == PHPExcel_Style_Protection::PROTECTION_PROTECTED ? 'true' : 'false')); - } - $objWriter->endElement(); - } - } - - $objWriter->endElement(); - } - - /** - * Write BorderPr - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string $pName Element name - * @param PHPExcel_Style_Border $pBorder Border style - * @throws PHPExcel_Writer_Exception - */ - private function writeBorderPr(PHPExcel_Shared_XMLWriter $objWriter = null, $pName = 'left', PHPExcel_Style_Border $pBorder = null) - { - // Write BorderPr - if ($pBorder->getBorderStyle() != PHPExcel_Style_Border::BORDER_NONE) { - $objWriter->startElement($pName); - $objWriter->writeAttribute('style', $pBorder->getBorderStyle()); - - // color - $objWriter->startElement('color'); - $objWriter->writeAttribute('rgb', $pBorder->getColor()->getARGB()); - $objWriter->endElement(); - - $objWriter->endElement(); - } - } - - /** - * Write NumberFormat - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Style_NumberFormat $pNumberFormat Number Format - * @param int $pId Number Format identifier - * @throws PHPExcel_Writer_Exception - */ - private function writeNumFmt(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Style_NumberFormat $pNumberFormat = null, $pId = 0) - { - // Translate formatcode - $formatCode = $pNumberFormat->getFormatCode(); - - // numFmt - if ($formatCode !== null) { - $objWriter->startElement('numFmt'); - $objWriter->writeAttribute('numFmtId', ($pId + 164)); - $objWriter->writeAttribute('formatCode', $formatCode); - $objWriter->endElement(); - } - } - - /** - * Get an array of all styles - * - * @param PHPExcel $pPHPExcel - * @return PHPExcel_Style[] All styles in PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function allStyles(PHPExcel $pPHPExcel = null) - { - return $pPHPExcel->getCellXfCollection(); - } - - /** - * Get an array of all conditional styles - * - * @param PHPExcel $pPHPExcel - * @return PHPExcel_Style_Conditional[] All conditional styles in PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function allConditionalStyles(PHPExcel $pPHPExcel = null) - { - // Get an array of all styles - $aStyles = array(); - - $sheetCount = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheetCount; ++$i) { - foreach ($pPHPExcel->getSheet($i)->getConditionalStylesCollection() as $conditionalStyles) { - foreach ($conditionalStyles as $conditionalStyle) { - $aStyles[] = $conditionalStyle; - } - } - } - - return $aStyles; - } - - /** - * Get an array of all fills - * - * @param PHPExcel $pPHPExcel - * @return PHPExcel_Style_Fill[] All fills in PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function allFills(PHPExcel $pPHPExcel = null) - { - // Get an array of unique fills - $aFills = array(); - - // Two first fills are predefined - $fill0 = new PHPExcel_Style_Fill(); - $fill0->setFillType(PHPExcel_Style_Fill::FILL_NONE); - $aFills[] = $fill0; - - $fill1 = new PHPExcel_Style_Fill(); - $fill1->setFillType(PHPExcel_Style_Fill::FILL_PATTERN_GRAY125); - $aFills[] = $fill1; - // The remaining fills - $aStyles = $this->allStyles($pPHPExcel); - foreach ($aStyles as $style) { - if (!array_key_exists($style->getFill()->getHashCode(), $aFills)) { - $aFills[ $style->getFill()->getHashCode() ] = $style->getFill(); - } - } - - return $aFills; - } - - /** - * Get an array of all fonts - * - * @param PHPExcel $pPHPExcel - * @return PHPExcel_Style_Font[] All fonts in PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function allFonts(PHPExcel $pPHPExcel = null) - { - // Get an array of unique fonts - $aFonts = array(); - $aStyles = $this->allStyles($pPHPExcel); - - foreach ($aStyles as $style) { - if (!array_key_exists($style->getFont()->getHashCode(), $aFonts)) { - $aFonts[ $style->getFont()->getHashCode() ] = $style->getFont(); - } - } - - return $aFonts; - } - - /** - * Get an array of all borders - * - * @param PHPExcel $pPHPExcel - * @return PHPExcel_Style_Borders[] All borders in PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function allBorders(PHPExcel $pPHPExcel = null) - { - // Get an array of unique borders - $aBorders = array(); - $aStyles = $this->allStyles($pPHPExcel); - - foreach ($aStyles as $style) { - if (!array_key_exists($style->getBorders()->getHashCode(), $aBorders)) { - $aBorders[ $style->getBorders()->getHashCode() ] = $style->getBorders(); - } - } - - return $aBorders; - } - - /** - * Get an array of all number formats - * - * @param PHPExcel $pPHPExcel - * @return PHPExcel_Style_NumberFormat[] All number formats in PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function allNumberFormats(PHPExcel $pPHPExcel = null) - { - // Get an array of unique number formats - $aNumFmts = array(); - $aStyles = $this->allStyles($pPHPExcel); - - foreach ($aStyles as $style) { - if ($style->getNumberFormat()->getBuiltInFormatCode() === false && !array_key_exists($style->getNumberFormat()->getHashCode(), $aNumFmts)) { - $aNumFmts[ $style->getNumberFormat()->getHashCode() ] = $style->getNumberFormat(); - } - } - - return $aNumFmts; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Theme.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Theme.php deleted file mode 100644 index 223e402..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Theme.php +++ /dev/null @@ -1,869 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Writer_Excel2007_Theme - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Writer_Excel2007_Theme extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Map of Major fonts to write - * @static array of string - * - */ - private static $majorFonts = array( - 'Jpan' => 'MS Pゴシック', - 'Hang' => '맑은 고딕', - 'Hans' => '宋体', - 'Hant' => '新細明體', - 'Arab' => 'Times New Roman', - 'Hebr' => 'Times New Roman', - 'Thai' => 'Tahoma', - 'Ethi' => 'Nyala', - 'Beng' => 'Vrinda', - 'Gujr' => 'Shruti', - 'Khmr' => 'MoolBoran', - 'Knda' => 'Tunga', - 'Guru' => 'Raavi', - 'Cans' => 'Euphemia', - 'Cher' => 'Plantagenet Cherokee', - 'Yiii' => 'Microsoft Yi Baiti', - 'Tibt' => 'Microsoft Himalaya', - 'Thaa' => 'MV Boli', - 'Deva' => 'Mangal', - 'Telu' => 'Gautami', - 'Taml' => 'Latha', - 'Syrc' => 'Estrangelo Edessa', - 'Orya' => 'Kalinga', - 'Mlym' => 'Kartika', - 'Laoo' => 'DokChampa', - 'Sinh' => 'Iskoola Pota', - 'Mong' => 'Mongolian Baiti', - 'Viet' => 'Times New Roman', - 'Uigh' => 'Microsoft Uighur', - 'Geor' => 'Sylfaen', - ); - - /** - * Map of Minor fonts to write - * @static array of string - * - */ - private static $minorFonts = array( - 'Jpan' => 'MS Pゴシック', - 'Hang' => '맑은 고딕', - 'Hans' => '宋体', - 'Hant' => '新細明體', - 'Arab' => 'Arial', - 'Hebr' => 'Arial', - 'Thai' => 'Tahoma', - 'Ethi' => 'Nyala', - 'Beng' => 'Vrinda', - 'Gujr' => 'Shruti', - 'Khmr' => 'DaunPenh', - 'Knda' => 'Tunga', - 'Guru' => 'Raavi', - 'Cans' => 'Euphemia', - 'Cher' => 'Plantagenet Cherokee', - 'Yiii' => 'Microsoft Yi Baiti', - 'Tibt' => 'Microsoft Himalaya', - 'Thaa' => 'MV Boli', - 'Deva' => 'Mangal', - 'Telu' => 'Gautami', - 'Taml' => 'Latha', - 'Syrc' => 'Estrangelo Edessa', - 'Orya' => 'Kalinga', - 'Mlym' => 'Kartika', - 'Laoo' => 'DokChampa', - 'Sinh' => 'Iskoola Pota', - 'Mong' => 'Mongolian Baiti', - 'Viet' => 'Arial', - 'Uigh' => 'Microsoft Uighur', - 'Geor' => 'Sylfaen', - ); - - /** - * Map of core colours - * @static array of string - * - */ - private static $colourScheme = array( - 'dk2' => '1F497D', - 'lt2' => 'EEECE1', - 'accent1' => '4F81BD', - 'accent2' => 'C0504D', - 'accent3' => '9BBB59', - 'accent4' => '8064A2', - 'accent5' => '4BACC6', - 'accent6' => 'F79646', - 'hlink' => '0000FF', - 'folHlink' => '800080', - ); - - /** - * Write theme to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeTheme(PHPExcel $pPHPExcel = null) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // a:theme - $objWriter->startElement('a:theme'); - $objWriter->writeAttribute('xmlns:a', 'http://schemas.openxmlformats.org/drawingml/2006/main'); - $objWriter->writeAttribute('name', 'Office Theme'); - - // a:themeElements - $objWriter->startElement('a:themeElements'); - - // a:clrScheme - $objWriter->startElement('a:clrScheme'); - $objWriter->writeAttribute('name', 'Office'); - - // a:dk1 - $objWriter->startElement('a:dk1'); - - // a:sysClr - $objWriter->startElement('a:sysClr'); - $objWriter->writeAttribute('val', 'windowText'); - $objWriter->writeAttribute('lastClr', '000000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:lt1 - $objWriter->startElement('a:lt1'); - - // a:sysClr - $objWriter->startElement('a:sysClr'); - $objWriter->writeAttribute('val', 'window'); - $objWriter->writeAttribute('lastClr', 'FFFFFF'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:dk2 - $this->writeColourScheme($objWriter); - - $objWriter->endElement(); - - // a:fontScheme - $objWriter->startElement('a:fontScheme'); - $objWriter->writeAttribute('name', 'Office'); - - // a:majorFont - $objWriter->startElement('a:majorFont'); - $this->writeFonts($objWriter, 'Cambria', self::$majorFonts); - $objWriter->endElement(); - - // a:minorFont - $objWriter->startElement('a:minorFont'); - $this->writeFonts($objWriter, 'Calibri', self::$minorFonts); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:fmtScheme - $objWriter->startElement('a:fmtScheme'); - $objWriter->writeAttribute('name', 'Office'); - - // a:fillStyleLst - $objWriter->startElement('a:fillStyleLst'); - - // a:solidFill - $objWriter->startElement('a:solidFill'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gradFill - $objWriter->startElement('a:gradFill'); - $objWriter->writeAttribute('rotWithShape', '1'); - - // a:gsLst - $objWriter->startElement('a:gsLst'); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '0'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:tint - $objWriter->startElement('a:tint'); - $objWriter->writeAttribute('val', '50000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '300000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '35000'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:tint - $objWriter->startElement('a:tint'); - $objWriter->writeAttribute('val', '37000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '300000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '100000'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:tint - $objWriter->startElement('a:tint'); - $objWriter->writeAttribute('val', '15000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '350000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:lin - $objWriter->startElement('a:lin'); - $objWriter->writeAttribute('ang', '16200000'); - $objWriter->writeAttribute('scaled', '1'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gradFill - $objWriter->startElement('a:gradFill'); - $objWriter->writeAttribute('rotWithShape', '1'); - - // a:gsLst - $objWriter->startElement('a:gsLst'); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '0'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:shade - $objWriter->startElement('a:shade'); - $objWriter->writeAttribute('val', '51000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '130000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '80000'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:shade - $objWriter->startElement('a:shade'); - $objWriter->writeAttribute('val', '93000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '130000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '100000'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:shade - $objWriter->startElement('a:shade'); - $objWriter->writeAttribute('val', '94000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '135000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:lin - $objWriter->startElement('a:lin'); - $objWriter->writeAttribute('ang', '16200000'); - $objWriter->writeAttribute('scaled', '0'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:lnStyleLst - $objWriter->startElement('a:lnStyleLst'); - - // a:ln - $objWriter->startElement('a:ln'); - $objWriter->writeAttribute('w', '9525'); - $objWriter->writeAttribute('cap', 'flat'); - $objWriter->writeAttribute('cmpd', 'sng'); - $objWriter->writeAttribute('algn', 'ctr'); - - // a:solidFill - $objWriter->startElement('a:solidFill'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:shade - $objWriter->startElement('a:shade'); - $objWriter->writeAttribute('val', '95000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '105000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:prstDash - $objWriter->startElement('a:prstDash'); - $objWriter->writeAttribute('val', 'solid'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:ln - $objWriter->startElement('a:ln'); - $objWriter->writeAttribute('w', '25400'); - $objWriter->writeAttribute('cap', 'flat'); - $objWriter->writeAttribute('cmpd', 'sng'); - $objWriter->writeAttribute('algn', 'ctr'); - - // a:solidFill - $objWriter->startElement('a:solidFill'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:prstDash - $objWriter->startElement('a:prstDash'); - $objWriter->writeAttribute('val', 'solid'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:ln - $objWriter->startElement('a:ln'); - $objWriter->writeAttribute('w', '38100'); - $objWriter->writeAttribute('cap', 'flat'); - $objWriter->writeAttribute('cmpd', 'sng'); - $objWriter->writeAttribute('algn', 'ctr'); - - // a:solidFill - $objWriter->startElement('a:solidFill'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:prstDash - $objWriter->startElement('a:prstDash'); - $objWriter->writeAttribute('val', 'solid'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - - - // a:effectStyleLst - $objWriter->startElement('a:effectStyleLst'); - - // a:effectStyle - $objWriter->startElement('a:effectStyle'); - - // a:effectLst - $objWriter->startElement('a:effectLst'); - - // a:outerShdw - $objWriter->startElement('a:outerShdw'); - $objWriter->writeAttribute('blurRad', '40000'); - $objWriter->writeAttribute('dist', '20000'); - $objWriter->writeAttribute('dir', '5400000'); - $objWriter->writeAttribute('rotWithShape', '0'); - - // a:srgbClr - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', '000000'); - - // a:alpha - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', '38000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:effectStyle - $objWriter->startElement('a:effectStyle'); - - // a:effectLst - $objWriter->startElement('a:effectLst'); - - // a:outerShdw - $objWriter->startElement('a:outerShdw'); - $objWriter->writeAttribute('blurRad', '40000'); - $objWriter->writeAttribute('dist', '23000'); - $objWriter->writeAttribute('dir', '5400000'); - $objWriter->writeAttribute('rotWithShape', '0'); - - // a:srgbClr - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', '000000'); - - // a:alpha - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', '35000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:effectStyle - $objWriter->startElement('a:effectStyle'); - - // a:effectLst - $objWriter->startElement('a:effectLst'); - - // a:outerShdw - $objWriter->startElement('a:outerShdw'); - $objWriter->writeAttribute('blurRad', '40000'); - $objWriter->writeAttribute('dist', '23000'); - $objWriter->writeAttribute('dir', '5400000'); - $objWriter->writeAttribute('rotWithShape', '0'); - - // a:srgbClr - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', '000000'); - - // a:alpha - $objWriter->startElement('a:alpha'); - $objWriter->writeAttribute('val', '35000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:scene3d - $objWriter->startElement('a:scene3d'); - - // a:camera - $objWriter->startElement('a:camera'); - $objWriter->writeAttribute('prst', 'orthographicFront'); - - // a:rot - $objWriter->startElement('a:rot'); - $objWriter->writeAttribute('lat', '0'); - $objWriter->writeAttribute('lon', '0'); - $objWriter->writeAttribute('rev', '0'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:lightRig - $objWriter->startElement('a:lightRig'); - $objWriter->writeAttribute('rig', 'threePt'); - $objWriter->writeAttribute('dir', 't'); - - // a:rot - $objWriter->startElement('a:rot'); - $objWriter->writeAttribute('lat', '0'); - $objWriter->writeAttribute('lon', '0'); - $objWriter->writeAttribute('rev', '1200000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:sp3d - $objWriter->startElement('a:sp3d'); - - // a:bevelT - $objWriter->startElement('a:bevelT'); - $objWriter->writeAttribute('w', '63500'); - $objWriter->writeAttribute('h', '25400'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:bgFillStyleLst - $objWriter->startElement('a:bgFillStyleLst'); - - // a:solidFill - $objWriter->startElement('a:solidFill'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gradFill - $objWriter->startElement('a:gradFill'); - $objWriter->writeAttribute('rotWithShape', '1'); - - // a:gsLst - $objWriter->startElement('a:gsLst'); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '0'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:tint - $objWriter->startElement('a:tint'); - $objWriter->writeAttribute('val', '40000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '350000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '40000'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:tint - $objWriter->startElement('a:tint'); - $objWriter->writeAttribute('val', '45000'); - $objWriter->endElement(); - - // a:shade - $objWriter->startElement('a:shade'); - $objWriter->writeAttribute('val', '99000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '350000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '100000'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:shade - $objWriter->startElement('a:shade'); - $objWriter->writeAttribute('val', '20000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '255000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:path - $objWriter->startElement('a:path'); - $objWriter->writeAttribute('path', 'circle'); - - // a:fillToRect - $objWriter->startElement('a:fillToRect'); - $objWriter->writeAttribute('l', '50000'); - $objWriter->writeAttribute('t', '-80000'); - $objWriter->writeAttribute('r', '50000'); - $objWriter->writeAttribute('b', '180000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gradFill - $objWriter->startElement('a:gradFill'); - $objWriter->writeAttribute('rotWithShape', '1'); - - // a:gsLst - $objWriter->startElement('a:gsLst'); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '0'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:tint - $objWriter->startElement('a:tint'); - $objWriter->writeAttribute('val', '80000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '300000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:gs - $objWriter->startElement('a:gs'); - $objWriter->writeAttribute('pos', '100000'); - - // a:schemeClr - $objWriter->startElement('a:schemeClr'); - $objWriter->writeAttribute('val', 'phClr'); - - // a:shade - $objWriter->startElement('a:shade'); - $objWriter->writeAttribute('val', '30000'); - $objWriter->endElement(); - - // a:satMod - $objWriter->startElement('a:satMod'); - $objWriter->writeAttribute('val', '200000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:path - $objWriter->startElement('a:path'); - $objWriter->writeAttribute('path', 'circle'); - - // a:fillToRect - $objWriter->startElement('a:fillToRect'); - $objWriter->writeAttribute('l', '50000'); - $objWriter->writeAttribute('t', '50000'); - $objWriter->writeAttribute('r', '50000'); - $objWriter->writeAttribute('b', '50000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:objectDefaults - $objWriter->writeElement('a:objectDefaults', null); - - // a:extraClrSchemeLst - $objWriter->writeElement('a:extraClrSchemeLst', null); - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write fonts to XML format - * - * @param PHPExcel_Shared_XMLWriter $objWriter - * @param string $latinFont - * @param array of string $fontSet - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - private function writeFonts($objWriter, $latinFont, $fontSet) - { - // a:latin - $objWriter->startElement('a:latin'); - $objWriter->writeAttribute('typeface', $latinFont); - $objWriter->endElement(); - - // a:ea - $objWriter->startElement('a:ea'); - $objWriter->writeAttribute('typeface', ''); - $objWriter->endElement(); - - // a:cs - $objWriter->startElement('a:cs'); - $objWriter->writeAttribute('typeface', ''); - $objWriter->endElement(); - - foreach ($fontSet as $fontScript => $typeface) { - $objWriter->startElement('a:font'); - $objWriter->writeAttribute('script', $fontScript); - $objWriter->writeAttribute('typeface', $typeface); - $objWriter->endElement(); - } - } - - /** - * Write colour scheme to XML format - * - * @param PHPExcel_Shared_XMLWriter $objWriter - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - private function writeColourScheme($objWriter) - { - foreach (self::$colourScheme as $colourName => $colourValue) { - $objWriter->startElement('a:'.$colourName); - - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', $colourValue); - $objWriter->endElement(); - - $objWriter->endElement(); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Workbook.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Workbook.php deleted file mode 100644 index 87c877e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Workbook.php +++ /dev/null @@ -1,448 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_Workbook - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write workbook to XML format - * - * @param PHPExcel $pPHPExcel - * @param boolean $recalcRequired Indicate whether formulas should be recalculated before writing - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeWorkbook(PHPExcel $pPHPExcel = null, $recalcRequired = false) - { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // workbook - $objWriter->startElement('workbook'); - $objWriter->writeAttribute('xml:space', 'preserve'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); - $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - - // fileVersion - $this->writeFileVersion($objWriter); - - // workbookPr - $this->writeWorkbookPr($objWriter); - - // workbookProtection - $this->writeWorkbookProtection($objWriter, $pPHPExcel); - - // bookViews - if ($this->getParentWriter()->getOffice2003Compatibility() === false) { - $this->writeBookViews($objWriter, $pPHPExcel); - } - - // sheets - $this->writeSheets($objWriter, $pPHPExcel); - - // definedNames - $this->writeDefinedNames($objWriter, $pPHPExcel); - - // calcPr - $this->writeCalcPr($objWriter, $recalcRequired); - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } - - /** - * Write file version - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @throws PHPExcel_Writer_Exception - */ - private function writeFileVersion(PHPExcel_Shared_XMLWriter $objWriter = null) - { - $objWriter->startElement('fileVersion'); - $objWriter->writeAttribute('appName', 'xl'); - $objWriter->writeAttribute('lastEdited', '4'); - $objWriter->writeAttribute('lowestEdited', '4'); - $objWriter->writeAttribute('rupBuild', '4505'); - $objWriter->endElement(); - } - - /** - * Write WorkbookPr - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @throws PHPExcel_Writer_Exception - */ - private function writeWorkbookPr(PHPExcel_Shared_XMLWriter $objWriter = null) - { - $objWriter->startElement('workbookPr'); - - if (PHPExcel_Shared_Date::getExcelCalendar() == PHPExcel_Shared_Date::CALENDAR_MAC_1904) { - $objWriter->writeAttribute('date1904', '1'); - } - - $objWriter->writeAttribute('codeName', 'ThisWorkbook'); - - $objWriter->endElement(); - } - - /** - * Write BookViews - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel $pPHPExcel - * @throws PHPExcel_Writer_Exception - */ - private function writeBookViews(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null) - { - // bookViews - $objWriter->startElement('bookViews'); - - // workbookView - $objWriter->startElement('workbookView'); - - $objWriter->writeAttribute('activeTab', $pPHPExcel->getActiveSheetIndex()); - $objWriter->writeAttribute('autoFilterDateGrouping', '1'); - $objWriter->writeAttribute('firstSheet', '0'); - $objWriter->writeAttribute('minimized', '0'); - $objWriter->writeAttribute('showHorizontalScroll', '1'); - $objWriter->writeAttribute('showSheetTabs', '1'); - $objWriter->writeAttribute('showVerticalScroll', '1'); - $objWriter->writeAttribute('tabRatio', '600'); - $objWriter->writeAttribute('visibility', 'visible'); - - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write WorkbookProtection - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel $pPHPExcel - * @throws PHPExcel_Writer_Exception - */ - private function writeWorkbookProtection(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null) - { - if ($pPHPExcel->getSecurity()->isSecurityEnabled()) { - $objWriter->startElement('workbookProtection'); - $objWriter->writeAttribute('lockRevision', ($pPHPExcel->getSecurity()->getLockRevision() ? 'true' : 'false')); - $objWriter->writeAttribute('lockStructure', ($pPHPExcel->getSecurity()->getLockStructure() ? 'true' : 'false')); - $objWriter->writeAttribute('lockWindows', ($pPHPExcel->getSecurity()->getLockWindows() ? 'true' : 'false')); - - if ($pPHPExcel->getSecurity()->getRevisionsPassword() != '') { - $objWriter->writeAttribute('revisionsPassword', $pPHPExcel->getSecurity()->getRevisionsPassword()); - } - - if ($pPHPExcel->getSecurity()->getWorkbookPassword() != '') { - $objWriter->writeAttribute('workbookPassword', $pPHPExcel->getSecurity()->getWorkbookPassword()); - } - - $objWriter->endElement(); - } - } - - /** - * Write calcPr - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param boolean $recalcRequired Indicate whether formulas should be recalculated before writing - * @throws PHPExcel_Writer_Exception - */ - private function writeCalcPr(PHPExcel_Shared_XMLWriter $objWriter = null, $recalcRequired = true) - { - $objWriter->startElement('calcPr'); - - // Set the calcid to a higher value than Excel itself will use, otherwise Excel will always recalc - // If MS Excel does do a recalc, then users opening a file in MS Excel will be prompted to save on exit - // because the file has changed - $objWriter->writeAttribute('calcId', '999999'); - $objWriter->writeAttribute('calcMode', 'auto'); - // fullCalcOnLoad isn't needed if we've recalculating for the save - $objWriter->writeAttribute('calcCompleted', ($recalcRequired) ? 1 : 0); - $objWriter->writeAttribute('fullCalcOnLoad', ($recalcRequired) ? 0 : 1); - - $objWriter->endElement(); - } - - /** - * Write sheets - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel $pPHPExcel - * @throws PHPExcel_Writer_Exception - */ - private function writeSheets(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null) - { - // Write sheets - $objWriter->startElement('sheets'); - $sheetCount = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheetCount; ++$i) { - // sheet - $this->writeSheet( - $objWriter, - $pPHPExcel->getSheet($i)->getTitle(), - ($i + 1), - ($i + 1 + 3), - $pPHPExcel->getSheet($i)->getSheetState() - ); - } - - $objWriter->endElement(); - } - - /** - * Write sheet - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param string $pSheetname Sheet name - * @param int $pSheetId Sheet id - * @param int $pRelId Relationship ID - * @param string $sheetState Sheet state (visible, hidden, veryHidden) - * @throws PHPExcel_Writer_Exception - */ - private function writeSheet(PHPExcel_Shared_XMLWriter $objWriter = null, $pSheetname = '', $pSheetId = 1, $pRelId = 1, $sheetState = 'visible') - { - if ($pSheetname != '') { - // Write sheet - $objWriter->startElement('sheet'); - $objWriter->writeAttribute('name', $pSheetname); - $objWriter->writeAttribute('sheetId', $pSheetId); - if ($sheetState != 'visible' && $sheetState != '') { - $objWriter->writeAttribute('state', $sheetState); - } - $objWriter->writeAttribute('r:id', 'rId' . $pRelId); - $objWriter->endElement(); - } else { - throw new PHPExcel_Writer_Exception("Invalid parameters passed."); - } - } - - /** - * Write Defined Names - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel $pPHPExcel - * @throws PHPExcel_Writer_Exception - */ - private function writeDefinedNames(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel = null) - { - // Write defined names - $objWriter->startElement('definedNames'); - - // Named ranges - if (count($pPHPExcel->getNamedRanges()) > 0) { - // Named ranges - $this->writeNamedRanges($objWriter, $pPHPExcel); - } - - // Other defined names - $sheetCount = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheetCount; ++$i) { - // definedName for autoFilter - $this->writeDefinedNameForAutofilter($objWriter, $pPHPExcel->getSheet($i), $i); - - // definedName for Print_Titles - $this->writeDefinedNameForPrintTitles($objWriter, $pPHPExcel->getSheet($i), $i); - - // definedName for Print_Area - $this->writeDefinedNameForPrintArea($objWriter, $pPHPExcel->getSheet($i), $i); - } - - $objWriter->endElement(); - } - - /** - * Write named ranges - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel $pPHPExcel - * @throws PHPExcel_Writer_Exception - */ - private function writeNamedRanges(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel $pPHPExcel) - { - // Loop named ranges - $namedRanges = $pPHPExcel->getNamedRanges(); - foreach ($namedRanges as $namedRange) { - $this->writeDefinedNameForNamedRange($objWriter, $namedRange); - } - } - - /** - * Write Defined Name for named range - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_NamedRange $pNamedRange - * @throws PHPExcel_Writer_Exception - */ - private function writeDefinedNameForNamedRange(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_NamedRange $pNamedRange) - { - // definedName for named range - $objWriter->startElement('definedName'); - $objWriter->writeAttribute('name', $pNamedRange->getName()); - if ($pNamedRange->getLocalOnly()) { - $objWriter->writeAttribute('localSheetId', $pNamedRange->getScope()->getParent()->getIndex($pNamedRange->getScope())); - } - - // Create absolute coordinate and write as raw text - $range = PHPExcel_Cell::splitRange($pNamedRange->getRange()); - for ($i = 0; $i < count($range); $i++) { - $range[$i][0] = '\'' . str_replace("'", "''", $pNamedRange->getWorksheet()->getTitle()) . '\'!' . PHPExcel_Cell::absoluteReference($range[$i][0]); - if (isset($range[$i][1])) { - $range[$i][1] = PHPExcel_Cell::absoluteReference($range[$i][1]); - } - } - $range = PHPExcel_Cell::buildRange($range); - - $objWriter->writeRawData($range); - - $objWriter->endElement(); - } - - /** - * Write Defined Name for autoFilter - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet - * @param int $pSheetId - * @throws PHPExcel_Writer_Exception - */ - private function writeDefinedNameForAutofilter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0) - { - // definedName for autoFilter - $autoFilterRange = $pSheet->getAutoFilter()->getRange(); - if (!empty($autoFilterRange)) { - $objWriter->startElement('definedName'); - $objWriter->writeAttribute('name', '_xlnm._FilterDatabase'); - $objWriter->writeAttribute('localSheetId', $pSheetId); - $objWriter->writeAttribute('hidden', '1'); - - // Create absolute coordinate and write as raw text - $range = PHPExcel_Cell::splitRange($autoFilterRange); - $range = $range[0]; - // Strip any worksheet ref so we can make the cell ref absolute - if (strpos($range[0], '!') !== false) { - list($ws, $range[0]) = explode('!', $range[0]); - } - - $range[0] = PHPExcel_Cell::absoluteCoordinate($range[0]); - $range[1] = PHPExcel_Cell::absoluteCoordinate($range[1]); - $range = implode(':', $range); - - $objWriter->writeRawData('\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . $range); - - $objWriter->endElement(); - } - } - - /** - * Write Defined Name for PrintTitles - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet - * @param int $pSheetId - * @throws PHPExcel_Writer_Exception - */ - private function writeDefinedNameForPrintTitles(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0) - { - // definedName for PrintTitles - if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet() || $pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) { - $objWriter->startElement('definedName'); - $objWriter->writeAttribute('name', '_xlnm.Print_Titles'); - $objWriter->writeAttribute('localSheetId', $pSheetId); - - // Setting string - $settingString = ''; - - // Columns to repeat - if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { - $repeat = $pSheet->getPageSetup()->getColumnsToRepeatAtLeft(); - - $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; - } - - // Rows to repeat - if ($pSheet->getPageSetup()->isRowsToRepeatAtTopSet()) { - if ($pSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) { - $settingString .= ','; - } - - $repeat = $pSheet->getPageSetup()->getRowsToRepeatAtTop(); - - $settingString .= '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!$' . $repeat[0] . ':$' . $repeat[1]; - } - - $objWriter->writeRawData($settingString); - - $objWriter->endElement(); - } - } - - /** - * Write Defined Name for PrintTitles - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet - * @param int $pSheetId - * @throws PHPExcel_Writer_Exception - */ - private function writeDefinedNameForPrintArea(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pSheetId = 0) - { - // definedName for PrintArea - if ($pSheet->getPageSetup()->isPrintAreaSet()) { - $objWriter->startElement('definedName'); - $objWriter->writeAttribute('name', '_xlnm.Print_Area'); - $objWriter->writeAttribute('localSheetId', $pSheetId); - - // Setting string - $settingString = ''; - - // Print area - $printArea = PHPExcel_Cell::splitRange($pSheet->getPageSetup()->getPrintArea()); - - $chunks = array(); - foreach ($printArea as $printAreaRect) { - $printAreaRect[0] = PHPExcel_Cell::absoluteReference($printAreaRect[0]); - $printAreaRect[1] = PHPExcel_Cell::absoluteReference($printAreaRect[1]); - $chunks[] = '\'' . str_replace("'", "''", $pSheet->getTitle()) . '\'!' . implode(':', $printAreaRect); - } - - $objWriter->writeRawData(implode(',', $chunks)); - - $objWriter->endElement(); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Worksheet.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Worksheet.php deleted file mode 100644 index c211403..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/Worksheet.php +++ /dev/null @@ -1,1219 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Writer_Excel2007_Worksheet - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Write worksheet to XML format - * - * @param PHPExcel_Worksheet $pSheet - * @param string[] $pStringTable - * @param boolean $includeCharts Flag indicating if we should write charts - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeWorksheet($pSheet = null, $pStringTable = null, $includeCharts = false) - { - if (!is_null($pSheet)) { - // Create XML writer - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8', 'yes'); - - // Worksheet - $objWriter->startElement('worksheet'); - $objWriter->writeAttribute('xml:space', 'preserve'); - $objWriter->writeAttribute('xmlns', 'http://schemas.openxmlformats.org/spreadsheetml/2006/main'); - $objWriter->writeAttribute('xmlns:r', 'http://schemas.openxmlformats.org/officeDocument/2006/relationships'); - - // sheetPr - $this->writeSheetPr($objWriter, $pSheet); - - // Dimension - $this->writeDimension($objWriter, $pSheet); - - // sheetViews - $this->writeSheetViews($objWriter, $pSheet); - - // sheetFormatPr - $this->writeSheetFormatPr($objWriter, $pSheet); - - // cols - $this->writeCols($objWriter, $pSheet); - - // sheetData - $this->writeSheetData($objWriter, $pSheet, $pStringTable); - - // sheetProtection - $this->writeSheetProtection($objWriter, $pSheet); - - // protectedRanges - $this->writeProtectedRanges($objWriter, $pSheet); - - // autoFilter - $this->writeAutoFilter($objWriter, $pSheet); - - // mergeCells - $this->writeMergeCells($objWriter, $pSheet); - - // conditionalFormatting - $this->writeConditionalFormatting($objWriter, $pSheet); - - // dataValidations - $this->writeDataValidations($objWriter, $pSheet); - - // hyperlinks - $this->writeHyperlinks($objWriter, $pSheet); - - // Print options - $this->writePrintOptions($objWriter, $pSheet); - - // Page margins - $this->writePageMargins($objWriter, $pSheet); - - // Page setup - $this->writePageSetup($objWriter, $pSheet); - - // Header / footer - $this->writeHeaderFooter($objWriter, $pSheet); - - // Breaks - $this->writeBreaks($objWriter, $pSheet); - - // Drawings and/or Charts - $this->writeDrawings($objWriter, $pSheet, $includeCharts); - - // LegacyDrawing - $this->writeLegacyDrawing($objWriter, $pSheet); - - // LegacyDrawingHF - $this->writeLegacyDrawingHF($objWriter, $pSheet); - - $objWriter->endElement(); - - // Return - return $objWriter->getData(); - } else { - throw new PHPExcel_Writer_Exception("Invalid PHPExcel_Worksheet object passed."); - } - } - - /** - * Write SheetPr - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeSheetPr(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // sheetPr - $objWriter->startElement('sheetPr'); - //$objWriter->writeAttribute('codeName', $pSheet->getTitle()); - if ($pSheet->getParent()->hasMacros()) {//if the workbook have macros, we need to have codeName for the sheet - if ($pSheet->hasCodeName()==false) { - $pSheet->setCodeName($pSheet->getTitle()); - } - $objWriter->writeAttribute('codeName', $pSheet->getCodeName()); - } - $autoFilterRange = $pSheet->getAutoFilter()->getRange(); - if (!empty($autoFilterRange)) { - $objWriter->writeAttribute('filterMode', 1); - $pSheet->getAutoFilter()->showHideRows(); - } - - // tabColor - if ($pSheet->isTabColorSet()) { - $objWriter->startElement('tabColor'); - $objWriter->writeAttribute('rgb', $pSheet->getTabColor()->getARGB()); - $objWriter->endElement(); - } - - // outlinePr - $objWriter->startElement('outlinePr'); - $objWriter->writeAttribute('summaryBelow', ($pSheet->getShowSummaryBelow() ? '1' : '0')); - $objWriter->writeAttribute('summaryRight', ($pSheet->getShowSummaryRight() ? '1' : '0')); - $objWriter->endElement(); - - // pageSetUpPr - if ($pSheet->getPageSetup()->getFitToPage()) { - $objWriter->startElement('pageSetUpPr'); - $objWriter->writeAttribute('fitToPage', '1'); - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - - /** - * Write Dimension - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeDimension(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // dimension - $objWriter->startElement('dimension'); - $objWriter->writeAttribute('ref', $pSheet->calculateWorksheetDimension()); - $objWriter->endElement(); - } - - /** - * Write SheetViews - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeSheetViews(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // sheetViews - $objWriter->startElement('sheetViews'); - - // Sheet selected? - $sheetSelected = false; - if ($this->getParentWriter()->getPHPExcel()->getIndex($pSheet) == $this->getParentWriter()->getPHPExcel()->getActiveSheetIndex()) { - $sheetSelected = true; - } - - // sheetView - $objWriter->startElement('sheetView'); - $objWriter->writeAttribute('tabSelected', $sheetSelected ? '1' : '0'); - $objWriter->writeAttribute('workbookViewId', '0'); - - // Zoom scales - if ($pSheet->getSheetView()->getZoomScale() != 100) { - $objWriter->writeAttribute('zoomScale', $pSheet->getSheetView()->getZoomScale()); - } - if ($pSheet->getSheetView()->getZoomScaleNormal() != 100) { - $objWriter->writeAttribute('zoomScaleNormal', $pSheet->getSheetView()->getZoomScaleNormal()); - } - - // View Layout Type - if ($pSheet->getSheetView()->getView() !== PHPExcel_Worksheet_SheetView::SHEETVIEW_NORMAL) { - $objWriter->writeAttribute('view', $pSheet->getSheetView()->getView()); - } - - // Gridlines - if ($pSheet->getShowGridlines()) { - $objWriter->writeAttribute('showGridLines', 'true'); - } else { - $objWriter->writeAttribute('showGridLines', 'false'); - } - - // Row and column headers - if ($pSheet->getShowRowColHeaders()) { - $objWriter->writeAttribute('showRowColHeaders', '1'); - } else { - $objWriter->writeAttribute('showRowColHeaders', '0'); - } - - // Right-to-left - if ($pSheet->getRightToLeft()) { - $objWriter->writeAttribute('rightToLeft', 'true'); - } - - $activeCell = $pSheet->getActiveCell(); - - // Pane - $pane = ''; - $topLeftCell = $pSheet->getFreezePane(); - if (($topLeftCell != '') && ($topLeftCell != 'A1')) { - $activeCell = empty($activeCell) ? $topLeftCell : $activeCell; - // Calculate freeze coordinates - $xSplit = $ySplit = 0; - - list($xSplit, $ySplit) = PHPExcel_Cell::coordinateFromString($topLeftCell); - $xSplit = PHPExcel_Cell::columnIndexFromString($xSplit); - - // pane - $pane = 'topRight'; - $objWriter->startElement('pane'); - if ($xSplit > 1) { - $objWriter->writeAttribute('xSplit', $xSplit - 1); - } - if ($ySplit > 1) { - $objWriter->writeAttribute('ySplit', $ySplit - 1); - $pane = ($xSplit > 1) ? 'bottomRight' : 'bottomLeft'; - } - $objWriter->writeAttribute('topLeftCell', $topLeftCell); - $objWriter->writeAttribute('activePane', $pane); - $objWriter->writeAttribute('state', 'frozen'); - $objWriter->endElement(); - - if (($xSplit > 1) && ($ySplit > 1)) { - // Write additional selections if more than two panes (ie both an X and a Y split) - $objWriter->startElement('selection'); - $objWriter->writeAttribute('pane', 'topRight'); - $objWriter->endElement(); - $objWriter->startElement('selection'); - $objWriter->writeAttribute('pane', 'bottomLeft'); - $objWriter->endElement(); - } - } - - // Selection -// if ($pane != '') { - // Only need to write selection element if we have a split pane - // We cheat a little by over-riding the active cell selection, setting it to the split cell - $objWriter->startElement('selection'); - if ($pane != '') { - $objWriter->writeAttribute('pane', $pane); - } - $objWriter->writeAttribute('activeCell', $activeCell); - $objWriter->writeAttribute('sqref', $activeCell); - $objWriter->endElement(); -// } - - $objWriter->endElement(); - - $objWriter->endElement(); - } - - /** - * Write SheetFormatPr - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeSheetFormatPr(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // sheetFormatPr - $objWriter->startElement('sheetFormatPr'); - - // Default row height - if ($pSheet->getDefaultRowDimension()->getRowHeight() >= 0) { - $objWriter->writeAttribute('customHeight', 'true'); - $objWriter->writeAttribute('defaultRowHeight', PHPExcel_Shared_String::FormatNumber($pSheet->getDefaultRowDimension()->getRowHeight())); - } else { - $objWriter->writeAttribute('defaultRowHeight', '14.4'); - } - - // Set Zero Height row - if ((string)$pSheet->getDefaultRowDimension()->getZeroHeight() == '1' || - strtolower((string)$pSheet->getDefaultRowDimension()->getZeroHeight()) == 'true') { - $objWriter->writeAttribute('zeroHeight', '1'); - } - - // Default column width - if ($pSheet->getDefaultColumnDimension()->getWidth() >= 0) { - $objWriter->writeAttribute('defaultColWidth', PHPExcel_Shared_String::FormatNumber($pSheet->getDefaultColumnDimension()->getWidth())); - } - - // Outline level - row - $outlineLevelRow = 0; - foreach ($pSheet->getRowDimensions() as $dimension) { - if ($dimension->getOutlineLevel() > $outlineLevelRow) { - $outlineLevelRow = $dimension->getOutlineLevel(); - } - } - $objWriter->writeAttribute('outlineLevelRow', (int)$outlineLevelRow); - - // Outline level - column - $outlineLevelCol = 0; - foreach ($pSheet->getColumnDimensions() as $dimension) { - if ($dimension->getOutlineLevel() > $outlineLevelCol) { - $outlineLevelCol = $dimension->getOutlineLevel(); - } - } - $objWriter->writeAttribute('outlineLevelCol', (int)$outlineLevelCol); - - $objWriter->endElement(); - } - - /** - * Write Cols - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeCols(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // cols - if (count($pSheet->getColumnDimensions()) > 0) { - $objWriter->startElement('cols'); - - $pSheet->calculateColumnWidths(); - - // Loop through column dimensions - foreach ($pSheet->getColumnDimensions() as $colDimension) { - // col - $objWriter->startElement('col'); - $objWriter->writeAttribute('min', PHPExcel_Cell::columnIndexFromString($colDimension->getColumnIndex())); - $objWriter->writeAttribute('max', PHPExcel_Cell::columnIndexFromString($colDimension->getColumnIndex())); - - if ($colDimension->getWidth() < 0) { - // No width set, apply default of 10 - $objWriter->writeAttribute('width', '9.10'); - } else { - // Width set - $objWriter->writeAttribute('width', PHPExcel_Shared_String::FormatNumber($colDimension->getWidth())); - } - - // Column visibility - if ($colDimension->getVisible() == false) { - $objWriter->writeAttribute('hidden', 'true'); - } - - // Auto size? - if ($colDimension->getAutoSize()) { - $objWriter->writeAttribute('bestFit', 'true'); - } - - // Custom width? - if ($colDimension->getWidth() != $pSheet->getDefaultColumnDimension()->getWidth()) { - $objWriter->writeAttribute('customWidth', 'true'); - } - - // Collapsed - if ($colDimension->getCollapsed() == true) { - $objWriter->writeAttribute('collapsed', 'true'); - } - - // Outline level - if ($colDimension->getOutlineLevel() > 0) { - $objWriter->writeAttribute('outlineLevel', $colDimension->getOutlineLevel()); - } - - // Style - $objWriter->writeAttribute('style', $colDimension->getXfIndex()); - - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - } - - /** - * Write SheetProtection - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeSheetProtection(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // sheetProtection - $objWriter->startElement('sheetProtection'); - - if ($pSheet->getProtection()->getPassword() != '') { - $objWriter->writeAttribute('password', $pSheet->getProtection()->getPassword()); - } - - $objWriter->writeAttribute('sheet', ($pSheet->getProtection()->getSheet() ? 'true' : 'false')); - $objWriter->writeAttribute('objects', ($pSheet->getProtection()->getObjects() ? 'true' : 'false')); - $objWriter->writeAttribute('scenarios', ($pSheet->getProtection()->getScenarios() ? 'true' : 'false')); - $objWriter->writeAttribute('formatCells', ($pSheet->getProtection()->getFormatCells() ? 'true' : 'false')); - $objWriter->writeAttribute('formatColumns', ($pSheet->getProtection()->getFormatColumns() ? 'true' : 'false')); - $objWriter->writeAttribute('formatRows', ($pSheet->getProtection()->getFormatRows() ? 'true' : 'false')); - $objWriter->writeAttribute('insertColumns', ($pSheet->getProtection()->getInsertColumns() ? 'true' : 'false')); - $objWriter->writeAttribute('insertRows', ($pSheet->getProtection()->getInsertRows() ? 'true' : 'false')); - $objWriter->writeAttribute('insertHyperlinks', ($pSheet->getProtection()->getInsertHyperlinks() ? 'true' : 'false')); - $objWriter->writeAttribute('deleteColumns', ($pSheet->getProtection()->getDeleteColumns() ? 'true' : 'false')); - $objWriter->writeAttribute('deleteRows', ($pSheet->getProtection()->getDeleteRows() ? 'true' : 'false')); - $objWriter->writeAttribute('selectLockedCells', ($pSheet->getProtection()->getSelectLockedCells() ? 'true' : 'false')); - $objWriter->writeAttribute('sort', ($pSheet->getProtection()->getSort() ? 'true' : 'false')); - $objWriter->writeAttribute('autoFilter', ($pSheet->getProtection()->getAutoFilter() ? 'true' : 'false')); - $objWriter->writeAttribute('pivotTables', ($pSheet->getProtection()->getPivotTables() ? 'true' : 'false')); - $objWriter->writeAttribute('selectUnlockedCells', ($pSheet->getProtection()->getSelectUnlockedCells() ? 'true' : 'false')); - $objWriter->endElement(); - } - - /** - * Write ConditionalFormatting - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeConditionalFormatting(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // Conditional id - $id = 1; - - // Loop through styles in the current worksheet - foreach ($pSheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) { - foreach ($conditionalStyles as $conditional) { - // WHY was this again? - // if ($this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode()) == '') { - // continue; - // } - if ($conditional->getConditionType() != PHPExcel_Style_Conditional::CONDITION_NONE) { - // conditionalFormatting - $objWriter->startElement('conditionalFormatting'); - $objWriter->writeAttribute('sqref', $cellCoordinate); - - // cfRule - $objWriter->startElement('cfRule'); - $objWriter->writeAttribute('type', $conditional->getConditionType()); - $objWriter->writeAttribute('dxfId', $this->getParentWriter()->getStylesConditionalHashTable()->getIndexForHashCode($conditional->getHashCode())); - $objWriter->writeAttribute('priority', $id++); - - if (($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CELLIS || $conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT) - && $conditional->getOperatorType() != PHPExcel_Style_Conditional::OPERATOR_NONE) { - $objWriter->writeAttribute('operator', $conditional->getOperatorType()); - } - - if ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT - && !is_null($conditional->getText())) { - $objWriter->writeAttribute('text', $conditional->getText()); - } - - if ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT - && $conditional->getOperatorType() == PHPExcel_Style_Conditional::OPERATOR_CONTAINSTEXT - && !is_null($conditional->getText())) { - $objWriter->writeElement('formula', 'NOT(ISERROR(SEARCH("' . $conditional->getText() . '",' . $cellCoordinate . ')))'); - } elseif ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT - && $conditional->getOperatorType() == PHPExcel_Style_Conditional::OPERATOR_BEGINSWITH - && !is_null($conditional->getText())) { - $objWriter->writeElement('formula', 'LEFT(' . $cellCoordinate . ',' . strlen($conditional->getText()) . ')="' . $conditional->getText() . '"'); - } elseif ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT - && $conditional->getOperatorType() == PHPExcel_Style_Conditional::OPERATOR_ENDSWITH - && !is_null($conditional->getText())) { - $objWriter->writeElement('formula', 'RIGHT(' . $cellCoordinate . ',' . strlen($conditional->getText()) . ')="' . $conditional->getText() . '"'); - } elseif ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT - && $conditional->getOperatorType() == PHPExcel_Style_Conditional::OPERATOR_NOTCONTAINS - && !is_null($conditional->getText())) { - $objWriter->writeElement('formula', 'ISERROR(SEARCH("' . $conditional->getText() . '",' . $cellCoordinate . '))'); - } elseif ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CELLIS - || $conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CONTAINSTEXT - || $conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_EXPRESSION) { - foreach ($conditional->getConditions() as $formula) { - // Formula - $objWriter->writeElement('formula', $formula); - } - } - - $objWriter->endElement(); - - $objWriter->endElement(); - } - } - } - } - - /** - * Write DataValidations - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeDataValidations(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // Datavalidation collection - $dataValidationCollection = $pSheet->getDataValidationCollection(); - - // Write data validations? - if (!empty($dataValidationCollection)) { - $objWriter->startElement('dataValidations'); - $objWriter->writeAttribute('count', count($dataValidationCollection)); - - foreach ($dataValidationCollection as $coordinate => $dv) { - $objWriter->startElement('dataValidation'); - - if ($dv->getType() != '') { - $objWriter->writeAttribute('type', $dv->getType()); - } - - if ($dv->getErrorStyle() != '') { - $objWriter->writeAttribute('errorStyle', $dv->getErrorStyle()); - } - - if ($dv->getOperator() != '') { - $objWriter->writeAttribute('operator', $dv->getOperator()); - } - - $objWriter->writeAttribute('allowBlank', ($dv->getAllowBlank() ? '1' : '0')); - $objWriter->writeAttribute('showDropDown', (!$dv->getShowDropDown() ? '1' : '0')); - $objWriter->writeAttribute('showInputMessage', ($dv->getShowInputMessage() ? '1' : '0')); - $objWriter->writeAttribute('showErrorMessage', ($dv->getShowErrorMessage() ? '1' : '0')); - - if ($dv->getErrorTitle() !== '') { - $objWriter->writeAttribute('errorTitle', $dv->getErrorTitle()); - } - if ($dv->getError() !== '') { - $objWriter->writeAttribute('error', $dv->getError()); - } - if ($dv->getPromptTitle() !== '') { - $objWriter->writeAttribute('promptTitle', $dv->getPromptTitle()); - } - if ($dv->getPrompt() !== '') { - $objWriter->writeAttribute('prompt', $dv->getPrompt()); - } - - $objWriter->writeAttribute('sqref', $coordinate); - - if ($dv->getFormula1() !== '') { - $objWriter->writeElement('formula1', $dv->getFormula1()); - } - if ($dv->getFormula2() !== '') { - $objWriter->writeElement('formula2', $dv->getFormula2()); - } - - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - } - - /** - * Write Hyperlinks - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeHyperlinks(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // Hyperlink collection - $hyperlinkCollection = $pSheet->getHyperlinkCollection(); - - // Relation ID - $relationId = 1; - - // Write hyperlinks? - if (!empty($hyperlinkCollection)) { - $objWriter->startElement('hyperlinks'); - - foreach ($hyperlinkCollection as $coordinate => $hyperlink) { - $objWriter->startElement('hyperlink'); - - $objWriter->writeAttribute('ref', $coordinate); - if (!$hyperlink->isInternal()) { - $objWriter->writeAttribute('r:id', 'rId_hyperlink_' . $relationId); - ++$relationId; - } else { - $objWriter->writeAttribute('location', str_replace('sheet://', '', $hyperlink->getUrl())); - } - - if ($hyperlink->getTooltip() != '') { - $objWriter->writeAttribute('tooltip', $hyperlink->getTooltip()); - } - - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - } - - /** - * Write ProtectedRanges - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeProtectedRanges(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - if (count($pSheet->getProtectedCells()) > 0) { - // protectedRanges - $objWriter->startElement('protectedRanges'); - - // Loop protectedRanges - foreach ($pSheet->getProtectedCells() as $protectedCell => $passwordHash) { - // protectedRange - $objWriter->startElement('protectedRange'); - $objWriter->writeAttribute('name', 'p' . md5($protectedCell)); - $objWriter->writeAttribute('sqref', $protectedCell); - if (!empty($passwordHash)) { - $objWriter->writeAttribute('password', $passwordHash); - } - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - } - - /** - * Write MergeCells - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeMergeCells(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - if (count($pSheet->getMergeCells()) > 0) { - // mergeCells - $objWriter->startElement('mergeCells'); - - // Loop mergeCells - foreach ($pSheet->getMergeCells() as $mergeCell) { - // mergeCell - $objWriter->startElement('mergeCell'); - $objWriter->writeAttribute('ref', $mergeCell); - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - } - - /** - * Write PrintOptions - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writePrintOptions(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // printOptions - $objWriter->startElement('printOptions'); - - $objWriter->writeAttribute('gridLines', ($pSheet->getPrintGridlines() ? 'true': 'false')); - $objWriter->writeAttribute('gridLinesSet', 'true'); - - if ($pSheet->getPageSetup()->getHorizontalCentered()) { - $objWriter->writeAttribute('horizontalCentered', 'true'); - } - - if ($pSheet->getPageSetup()->getVerticalCentered()) { - $objWriter->writeAttribute('verticalCentered', 'true'); - } - - $objWriter->endElement(); - } - - /** - * Write PageMargins - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writePageMargins(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // pageMargins - $objWriter->startElement('pageMargins'); - $objWriter->writeAttribute('left', PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getLeft())); - $objWriter->writeAttribute('right', PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getRight())); - $objWriter->writeAttribute('top', PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getTop())); - $objWriter->writeAttribute('bottom', PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getBottom())); - $objWriter->writeAttribute('header', PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getHeader())); - $objWriter->writeAttribute('footer', PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getFooter())); - $objWriter->endElement(); - } - - /** - * Write AutoFilter - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeAutoFilter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - $autoFilterRange = $pSheet->getAutoFilter()->getRange(); - if (!empty($autoFilterRange)) { - // autoFilter - $objWriter->startElement('autoFilter'); - - // Strip any worksheet reference from the filter coordinates - $range = PHPExcel_Cell::splitRange($autoFilterRange); - $range = $range[0]; - // Strip any worksheet ref - if (strpos($range[0], '!') !== false) { - list($ws, $range[0]) = explode('!', $range[0]); - } - $range = implode(':', $range); - - $objWriter->writeAttribute('ref', str_replace('$', '', $range)); - - $columns = $pSheet->getAutoFilter()->getColumns(); - if (count($columns > 0)) { - foreach ($columns as $columnID => $column) { - $rules = $column->getRules(); - if (count($rules) > 0) { - $objWriter->startElement('filterColumn'); - $objWriter->writeAttribute('colId', $pSheet->getAutoFilter()->getColumnOffset($columnID)); - - $objWriter->startElement($column->getFilterType()); - if ($column->getJoin() == PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_AND) { - $objWriter->writeAttribute('and', 1); - } - - foreach ($rules as $rule) { - if (($column->getFilterType() === PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER) && - ($rule->getOperator() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL) && - ($rule->getValue() === '')) { - // Filter rule for Blanks - $objWriter->writeAttribute('blank', 1); - } elseif ($rule->getRuleType() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER) { - // Dynamic Filter Rule - $objWriter->writeAttribute('type', $rule->getGrouping()); - $val = $column->getAttribute('val'); - if ($val !== null) { - $objWriter->writeAttribute('val', $val); - } - $maxVal = $column->getAttribute('maxVal'); - if ($maxVal !== null) { - $objWriter->writeAttribute('maxVal', $maxVal); - } - } elseif ($rule->getRuleType() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_TOPTENFILTER) { - // Top 10 Filter Rule - $objWriter->writeAttribute('val', $rule->getValue()); - $objWriter->writeAttribute('percent', (($rule->getOperator() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT) ? '1' : '0')); - $objWriter->writeAttribute('top', (($rule->getGrouping() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP) ? '1': '0')); - } else { - // Filter, DateGroupItem or CustomFilter - $objWriter->startElement($rule->getRuleType()); - - if ($rule->getOperator() !== PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL) { - $objWriter->writeAttribute('operator', $rule->getOperator()); - } - if ($rule->getRuleType() === PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP) { - // Date Group filters - foreach ($rule->getValue() as $key => $value) { - if ($value > '') { - $objWriter->writeAttribute($key, $value); - } - } - $objWriter->writeAttribute('dateTimeGrouping', $rule->getGrouping()); - } else { - $objWriter->writeAttribute('val', $rule->getValue()); - } - - $objWriter->endElement(); - } - } - - $objWriter->endElement(); - - $objWriter->endElement(); - } - } - } - $objWriter->endElement(); - } - } - - /** - * Write PageSetup - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writePageSetup(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // pageSetup - $objWriter->startElement('pageSetup'); - $objWriter->writeAttribute('paperSize', $pSheet->getPageSetup()->getPaperSize()); - $objWriter->writeAttribute('orientation', $pSheet->getPageSetup()->getOrientation()); - - if (!is_null($pSheet->getPageSetup()->getScale())) { - $objWriter->writeAttribute('scale', $pSheet->getPageSetup()->getScale()); - } - if (!is_null($pSheet->getPageSetup()->getFitToHeight())) { - $objWriter->writeAttribute('fitToHeight', $pSheet->getPageSetup()->getFitToHeight()); - } else { - $objWriter->writeAttribute('fitToHeight', '0'); - } - if (!is_null($pSheet->getPageSetup()->getFitToWidth())) { - $objWriter->writeAttribute('fitToWidth', $pSheet->getPageSetup()->getFitToWidth()); - } else { - $objWriter->writeAttribute('fitToWidth', '0'); - } - if (!is_null($pSheet->getPageSetup()->getFirstPageNumber())) { - $objWriter->writeAttribute('firstPageNumber', $pSheet->getPageSetup()->getFirstPageNumber()); - $objWriter->writeAttribute('useFirstPageNumber', '1'); - } - - $objWriter->endElement(); - } - - /** - * Write Header / Footer - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeHeaderFooter(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // headerFooter - $objWriter->startElement('headerFooter'); - $objWriter->writeAttribute('differentOddEven', ($pSheet->getHeaderFooter()->getDifferentOddEven() ? 'true' : 'false')); - $objWriter->writeAttribute('differentFirst', ($pSheet->getHeaderFooter()->getDifferentFirst() ? 'true' : 'false')); - $objWriter->writeAttribute('scaleWithDoc', ($pSheet->getHeaderFooter()->getScaleWithDocument() ? 'true' : 'false')); - $objWriter->writeAttribute('alignWithMargins', ($pSheet->getHeaderFooter()->getAlignWithMargins() ? 'true' : 'false')); - - $objWriter->writeElement('oddHeader', $pSheet->getHeaderFooter()->getOddHeader()); - $objWriter->writeElement('oddFooter', $pSheet->getHeaderFooter()->getOddFooter()); - $objWriter->writeElement('evenHeader', $pSheet->getHeaderFooter()->getEvenHeader()); - $objWriter->writeElement('evenFooter', $pSheet->getHeaderFooter()->getEvenFooter()); - $objWriter->writeElement('firstHeader', $pSheet->getHeaderFooter()->getFirstHeader()); - $objWriter->writeElement('firstFooter', $pSheet->getHeaderFooter()->getFirstFooter()); - $objWriter->endElement(); - } - - /** - * Write Breaks - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeBreaks(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // Get row and column breaks - $aRowBreaks = array(); - $aColumnBreaks = array(); - foreach ($pSheet->getBreaks() as $cell => $breakType) { - if ($breakType == PHPExcel_Worksheet::BREAK_ROW) { - $aRowBreaks[] = $cell; - } elseif ($breakType == PHPExcel_Worksheet::BREAK_COLUMN) { - $aColumnBreaks[] = $cell; - } - } - - // rowBreaks - if (!empty($aRowBreaks)) { - $objWriter->startElement('rowBreaks'); - $objWriter->writeAttribute('count', count($aRowBreaks)); - $objWriter->writeAttribute('manualBreakCount', count($aRowBreaks)); - - foreach ($aRowBreaks as $cell) { - $coords = PHPExcel_Cell::coordinateFromString($cell); - - $objWriter->startElement('brk'); - $objWriter->writeAttribute('id', $coords[1]); - $objWriter->writeAttribute('man', '1'); - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - - // Second, write column breaks - if (!empty($aColumnBreaks)) { - $objWriter->startElement('colBreaks'); - $objWriter->writeAttribute('count', count($aColumnBreaks)); - $objWriter->writeAttribute('manualBreakCount', count($aColumnBreaks)); - - foreach ($aColumnBreaks as $cell) { - $coords = PHPExcel_Cell::coordinateFromString($cell); - - $objWriter->startElement('brk'); - $objWriter->writeAttribute('id', PHPExcel_Cell::columnIndexFromString($coords[0]) - 1); - $objWriter->writeAttribute('man', '1'); - $objWriter->endElement(); - } - - $objWriter->endElement(); - } - } - - /** - * Write SheetData - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @param string[] $pStringTable String table - * @throws PHPExcel_Writer_Exception - */ - private function writeSheetData(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pStringTable = null) - { - if (is_array($pStringTable)) { - // Flipped stringtable, for faster index searching - $aFlippedStringTable = $this->getParentWriter()->getWriterPart('stringtable')->flipStringTable($pStringTable); - - // sheetData - $objWriter->startElement('sheetData'); - - // Get column count - $colCount = PHPExcel_Cell::columnIndexFromString($pSheet->getHighestColumn()); - - // Highest row number - $highestRow = $pSheet->getHighestRow(); - - // Loop through cells - $cellsByRow = array(); - foreach ($pSheet->getCellCollection() as $cellID) { - $cellAddress = PHPExcel_Cell::coordinateFromString($cellID); - $cellsByRow[$cellAddress[1]][] = $cellID; - } - - $currentRow = 0; - while ($currentRow++ < $highestRow) { - // Get row dimension - $rowDimension = $pSheet->getRowDimension($currentRow); - - // Write current row? - $writeCurrentRow = isset($cellsByRow[$currentRow]) || $rowDimension->getRowHeight() >= 0 || $rowDimension->getVisible() == false || $rowDimension->getCollapsed() == true || $rowDimension->getOutlineLevel() > 0 || $rowDimension->getXfIndex() !== null; - - if ($writeCurrentRow) { - // Start a new row - $objWriter->startElement('row'); - $objWriter->writeAttribute('r', $currentRow); - $objWriter->writeAttribute('spans', '1:' . $colCount); - - // Row dimensions - if ($rowDimension->getRowHeight() >= 0) { - $objWriter->writeAttribute('customHeight', '1'); - $objWriter->writeAttribute('ht', PHPExcel_Shared_String::FormatNumber($rowDimension->getRowHeight())); - } - - // Row visibility - if ($rowDimension->getVisible() == false) { - $objWriter->writeAttribute('hidden', 'true'); - } - - // Collapsed - if ($rowDimension->getCollapsed() == true) { - $objWriter->writeAttribute('collapsed', 'true'); - } - - // Outline level - if ($rowDimension->getOutlineLevel() > 0) { - $objWriter->writeAttribute('outlineLevel', $rowDimension->getOutlineLevel()); - } - - // Style - if ($rowDimension->getXfIndex() !== null) { - $objWriter->writeAttribute('s', $rowDimension->getXfIndex()); - $objWriter->writeAttribute('customFormat', '1'); - } - - // Write cells - if (isset($cellsByRow[$currentRow])) { - foreach ($cellsByRow[$currentRow] as $cellAddress) { - // Write cell - $this->writeCell($objWriter, $pSheet, $cellAddress, $pStringTable, $aFlippedStringTable); - } - } - - // End row - $objWriter->endElement(); - } - } - - $objWriter->endElement(); - } else { - throw new PHPExcel_Writer_Exception("Invalid parameters passed."); - } - } - - /** - * Write Cell - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @param PHPExcel_Cell $pCellAddress Cell Address - * @param string[] $pStringTable String table - * @param string[] $pFlippedStringTable String table (flipped), for faster index searching - * @throws PHPExcel_Writer_Exception - */ - private function writeCell(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $pCellAddress = null, $pStringTable = null, $pFlippedStringTable = null) - { - if (is_array($pStringTable) && is_array($pFlippedStringTable)) { - // Cell - $pCell = $pSheet->getCell($pCellAddress); - $objWriter->startElement('c'); - $objWriter->writeAttribute('r', $pCellAddress); - - // Sheet styles - if ($pCell->getXfIndex() != '') { - $objWriter->writeAttribute('s', $pCell->getXfIndex()); - } - - // If cell value is supplied, write cell value - $cellValue = $pCell->getValue(); - if (is_object($cellValue) || $cellValue !== '') { - // Map type - $mappedType = $pCell->getDataType(); - - // Write data type depending on its type - switch (strtolower($mappedType)) { - case 'inlinestr': // Inline string - case 's': // String - case 'b': // Boolean - $objWriter->writeAttribute('t', $mappedType); - break; - case 'f': // Formula - $calculatedValue = ($this->getParentWriter()->getPreCalculateFormulas()) ? - $pCell->getCalculatedValue() : - $cellValue; - if (is_string($calculatedValue)) { - $objWriter->writeAttribute('t', 'str'); - } - break; - case 'e': // Error - $objWriter->writeAttribute('t', $mappedType); - } - - // Write data depending on its type - switch (strtolower($mappedType)) { - case 'inlinestr': // Inline string - if (! $cellValue instanceof PHPExcel_RichText) { - $objWriter->writeElement('t', PHPExcel_Shared_String::ControlCharacterPHP2OOXML(htmlspecialchars($cellValue))); - } elseif ($cellValue instanceof PHPExcel_RichText) { - $objWriter->startElement('is'); - $this->getParentWriter()->getWriterPart('stringtable')->writeRichText($objWriter, $cellValue); - $objWriter->endElement(); - } - - break; - case 's': // String - if (! $cellValue instanceof PHPExcel_RichText) { - if (isset($pFlippedStringTable[$cellValue])) { - $objWriter->writeElement('v', $pFlippedStringTable[$cellValue]); - } - } elseif ($cellValue instanceof PHPExcel_RichText) { - $objWriter->writeElement('v', $pFlippedStringTable[$cellValue->getHashCode()]); - } - - break; - case 'f': // Formula - $attributes = $pCell->getFormulaAttributes(); - if ($attributes['t'] == 'array') { - $objWriter->startElement('f'); - $objWriter->writeAttribute('t', 'array'); - $objWriter->writeAttribute('ref', $pCellAddress); - $objWriter->writeAttribute('aca', '1'); - $objWriter->writeAttribute('ca', '1'); - $objWriter->text(substr($cellValue, 1)); - $objWriter->endElement(); - } else { - $objWriter->writeElement('f', substr($cellValue, 1)); - } - if ($this->getParentWriter()->getOffice2003Compatibility() === false) { - if ($this->getParentWriter()->getPreCalculateFormulas()) { -// $calculatedValue = $pCell->getCalculatedValue(); - if (!is_array($calculatedValue) && substr($calculatedValue, 0, 1) != '#') { - $objWriter->writeElement('v', PHPExcel_Shared_String::FormatNumber($calculatedValue)); - } else { - $objWriter->writeElement('v', '0'); - } - } else { - $objWriter->writeElement('v', '0'); - } - } - break; - case 'n': // Numeric - // force point as decimal separator in case current locale uses comma - $objWriter->writeElement('v', str_replace(',', '.', $cellValue)); - break; - case 'b': // Boolean - $objWriter->writeElement('v', ($cellValue ? '1' : '0')); - break; - case 'e': // Error - if (substr($cellValue, 0, 1) == '=') { - $objWriter->writeElement('f', substr($cellValue, 1)); - $objWriter->writeElement('v', substr($cellValue, 1)); - } else { - $objWriter->writeElement('v', $cellValue); - } - - break; - } - } - - $objWriter->endElement(); - } else { - throw new PHPExcel_Writer_Exception("Invalid parameters passed."); - } - } - - /** - * Write Drawings - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @param boolean $includeCharts Flag indicating if we should include drawing details for charts - * @throws PHPExcel_Writer_Exception - */ - private function writeDrawings(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null, $includeCharts = false) - { - $chartCount = ($includeCharts) ? $pSheet->getChartCollection()->count() : 0; - // If sheet contains drawings, add the relationships - if (($pSheet->getDrawingCollection()->count() > 0) || - ($chartCount > 0)) { - $objWriter->startElement('drawing'); - $objWriter->writeAttribute('r:id', 'rId1'); - $objWriter->endElement(); - } - } - - /** - * Write LegacyDrawing - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeLegacyDrawing(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // If sheet contains comments, add the relationships - if (count($pSheet->getComments()) > 0) { - $objWriter->startElement('legacyDrawing'); - $objWriter->writeAttribute('r:id', 'rId_comments_vml1'); - $objWriter->endElement(); - } - } - - /** - * Write LegacyDrawingHF - * - * @param PHPExcel_Shared_XMLWriter $objWriter XML Writer - * @param PHPExcel_Worksheet $pSheet Worksheet - * @throws PHPExcel_Writer_Exception - */ - private function writeLegacyDrawingHF(PHPExcel_Shared_XMLWriter $objWriter = null, PHPExcel_Worksheet $pSheet = null) - { - // If sheet contains images, add the relationships - if (count($pSheet->getHeaderFooter()->getImages()) > 0) { - $objWriter->startElement('legacyDrawingHF'); - $objWriter->writeAttribute('r:id', 'rId_headerfooter_vml1'); - $objWriter->endElement(); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/WriterPart.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/WriterPart.php deleted file mode 100644 index 806ebe5..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel2007/WriterPart.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel2007_WriterPart - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel2007 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -abstract class PHPExcel_Writer_Excel2007_WriterPart -{ - /** - * Parent IWriter object - * - * @var PHPExcel_Writer_IWriter - */ - private $parentWriter; - - /** - * Set parent IWriter object - * - * @param PHPExcel_Writer_IWriter $pWriter - * @throws PHPExcel_Writer_Exception - */ - public function setParentWriter(PHPExcel_Writer_IWriter $pWriter = null) - { - $this->parentWriter = $pWriter; - } - - /** - * Get parent IWriter object - * - * @return PHPExcel_Writer_IWriter - * @throws PHPExcel_Writer_Exception - */ - public function getParentWriter() - { - if (!is_null($this->parentWriter)) { - return $this->parentWriter; - } else { - throw new PHPExcel_Writer_Exception("No parent PHPExcel_Writer_IWriter assigned."); - } - } - - /** - * Set parent IWriter object - * - * @param PHPExcel_Writer_IWriter $pWriter - * @throws PHPExcel_Writer_Exception - */ - public function __construct(PHPExcel_Writer_IWriter $pWriter = null) - { - if (!is_null($pWriter)) { - $this->parentWriter = $pWriter; - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5.php deleted file mode 100644 index 2dede81..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5.php +++ /dev/null @@ -1,904 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel5 - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel5 extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter -{ - /** - * PHPExcel object - * - * @var PHPExcel - */ - private $phpExcel; - - /** - * Total number of shared strings in workbook - * - * @var int - */ - private $strTotal = 0; - - /** - * Number of unique shared strings in workbook - * - * @var int - */ - private $strUnique = 0; - - /** - * Array of unique shared strings in workbook - * - * @var array - */ - private $strTable = array(); - - /** - * Color cache. Mapping between RGB value and color index. - * - * @var array - */ - private $colors; - - /** - * Formula parser - * - * @var PHPExcel_Writer_Excel5_Parser - */ - private $parser; - - /** - * Identifier clusters for drawings. Used in MSODRAWINGGROUP record. - * - * @var array - */ - private $IDCLs; - - /** - * Basic OLE object summary information - * - * @var array - */ - private $summaryInformation; - - /** - * Extended OLE object document summary information - * - * @var array - */ - private $documentSummaryInformation; - - /** - * Create a new PHPExcel_Writer_Excel5 - * - * @param PHPExcel $phpExcel PHPExcel object - */ - public function __construct(PHPExcel $phpExcel) - { - $this->phpExcel = $phpExcel; - - $this->parser = new PHPExcel_Writer_Excel5_Parser(); - } - - /** - * Save PHPExcel to file - * - * @param string $pFilename - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null) - { - - // garbage collect - $this->phpExcel->garbageCollect(); - - $saveDebugLog = PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->getWriteDebugLog(); - PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog(false); - $saveDateReturnType = PHPExcel_Calculation_Functions::getReturnDateType(); - PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL); - - // initialize colors array - $this->colors = array(); - - // Initialise workbook writer - $this->writerWorkbook = new PHPExcel_Writer_Excel5_Workbook($this->phpExcel, $this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser); - - // Initialise worksheet writers - $countSheets = $this->phpExcel->getSheetCount(); - for ($i = 0; $i < $countSheets; ++$i) { - $this->writerWorksheets[$i] = new PHPExcel_Writer_Excel5_Worksheet($this->strTotal, $this->strUnique, $this->strTable, $this->colors, $this->parser, $this->preCalculateFormulas, $this->phpExcel->getSheet($i)); - } - - // build Escher objects. Escher objects for workbooks needs to be build before Escher object for workbook. - $this->buildWorksheetEschers(); - $this->buildWorkbookEscher(); - - // add 15 identical cell style Xfs - // for now, we use the first cellXf instead of cellStyleXf - $cellXfCollection = $this->phpExcel->getCellXfCollection(); - for ($i = 0; $i < 15; ++$i) { - $this->writerWorkbook->addXfWriter($cellXfCollection[0], true); - } - - // add all the cell Xfs - foreach ($this->phpExcel->getCellXfCollection() as $style) { - $this->writerWorkbook->addXfWriter($style, false); - } - - // add fonts from rich text eleemnts - for ($i = 0; $i < $countSheets; ++$i) { - foreach ($this->writerWorksheets[$i]->phpSheet->getCellCollection() as $cellID) { - $cell = $this->writerWorksheets[$i]->phpSheet->getCell($cellID); - $cVal = $cell->getValue(); - if ($cVal instanceof PHPExcel_RichText) { - $elements = $cVal->getRichTextElements(); - foreach ($elements as $element) { - if ($element instanceof PHPExcel_RichText_Run) { - $font = $element->getFont(); - $this->writerWorksheets[$i]->fontHashIndex[$font->getHashCode()] = $this->writerWorkbook->addFont($font); - } - } - } - } - } - - // initialize OLE file - $workbookStreamName = 'Workbook'; - $OLE = new PHPExcel_Shared_OLE_PPS_File(PHPExcel_Shared_OLE::Asc2Ucs($workbookStreamName)); - - // Write the worksheet streams before the global workbook stream, - // because the byte sizes of these are needed in the global workbook stream - $worksheetSizes = array(); - for ($i = 0; $i < $countSheets; ++$i) { - $this->writerWorksheets[$i]->close(); - $worksheetSizes[] = $this->writerWorksheets[$i]->_datasize; - } - - // add binary data for global workbook stream - $OLE->append($this->writerWorkbook->writeWorkbook($worksheetSizes)); - - // add binary data for sheet streams - for ($i = 0; $i < $countSheets; ++$i) { - $OLE->append($this->writerWorksheets[$i]->getData()); - } - - $this->documentSummaryInformation = $this->writeDocumentSummaryInformation(); - // initialize OLE Document Summary Information - if (isset($this->documentSummaryInformation) && !empty($this->documentSummaryInformation)) { - $OLE_DocumentSummaryInformation = new PHPExcel_Shared_OLE_PPS_File(PHPExcel_Shared_OLE::Asc2Ucs(chr(5) . 'DocumentSummaryInformation')); - $OLE_DocumentSummaryInformation->append($this->documentSummaryInformation); - } - - $this->summaryInformation = $this->writeSummaryInformation(); - // initialize OLE Summary Information - if (isset($this->summaryInformation) && !empty($this->summaryInformation)) { - $OLE_SummaryInformation = new PHPExcel_Shared_OLE_PPS_File(PHPExcel_Shared_OLE::Asc2Ucs(chr(5) . 'SummaryInformation')); - $OLE_SummaryInformation->append($this->summaryInformation); - } - - // define OLE Parts - $arrRootData = array($OLE); - // initialize OLE Properties file - if (isset($OLE_SummaryInformation)) { - $arrRootData[] = $OLE_SummaryInformation; - } - // initialize OLE Extended Properties file - if (isset($OLE_DocumentSummaryInformation)) { - $arrRootData[] = $OLE_DocumentSummaryInformation; - } - - $root = new PHPExcel_Shared_OLE_PPS_Root(time(), time(), $arrRootData); - // save the OLE file - $res = $root->save($pFilename); - - PHPExcel_Calculation_Functions::setReturnDateType($saveDateReturnType); - PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog($saveDebugLog); - } - - /** - * Set temporary storage directory - * - * @deprecated - * @param string $pValue Temporary storage directory - * @throws PHPExcel_Writer_Exception when directory does not exist - * @return PHPExcel_Writer_Excel5 - */ - public function setTempDir($pValue = '') - { - return $this; - } - - /** - * Build the Worksheet Escher objects - * - */ - private function buildWorksheetEschers() - { - // 1-based index to BstoreContainer - $blipIndex = 0; - $lastReducedSpId = 0; - $lastSpId = 0; - - foreach ($this->phpExcel->getAllsheets() as $sheet) { - // sheet index - $sheetIndex = $sheet->getParent()->getIndex($sheet); - - $escher = null; - - // check if there are any shapes for this sheet - $filterRange = $sheet->getAutoFilter()->getRange(); - if (count($sheet->getDrawingCollection()) == 0 && empty($filterRange)) { - continue; - } - - // create intermediate Escher object - $escher = new PHPExcel_Shared_Escher(); - - // dgContainer - $dgContainer = new PHPExcel_Shared_Escher_DgContainer(); - - // set the drawing index (we use sheet index + 1) - $dgId = $sheet->getParent()->getIndex($sheet) + 1; - $dgContainer->setDgId($dgId); - $escher->setDgContainer($dgContainer); - - // spgrContainer - $spgrContainer = new PHPExcel_Shared_Escher_DgContainer_SpgrContainer(); - $dgContainer->setSpgrContainer($spgrContainer); - - // add one shape which is the group shape - $spContainer = new PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer(); - $spContainer->setSpgr(true); - $spContainer->setSpType(0); - $spContainer->setSpId(($sheet->getParent()->getIndex($sheet) + 1) << 10); - $spgrContainer->addChild($spContainer); - - // add the shapes - - $countShapes[$sheetIndex] = 0; // count number of shapes (minus group shape), in sheet - - foreach ($sheet->getDrawingCollection() as $drawing) { - ++$blipIndex; - - ++$countShapes[$sheetIndex]; - - // add the shape - $spContainer = new PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer(); - - // set the shape type - $spContainer->setSpType(0x004B); - // set the shape flag - $spContainer->setSpFlag(0x02); - - // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index) - $reducedSpId = $countShapes[$sheetIndex]; - $spId = $reducedSpId - | ($sheet->getParent()->getIndex($sheet) + 1) << 10; - $spContainer->setSpId($spId); - - // keep track of last reducedSpId - $lastReducedSpId = $reducedSpId; - - // keep track of last spId - $lastSpId = $spId; - - // set the BLIP index - $spContainer->setOPT(0x4104, $blipIndex); - - // set coordinates and offsets, client anchor - $coordinates = $drawing->getCoordinates(); - $offsetX = $drawing->getOffsetX(); - $offsetY = $drawing->getOffsetY(); - $width = $drawing->getWidth(); - $height = $drawing->getHeight(); - - $twoAnchor = PHPExcel_Shared_Excel5::oneAnchor2twoAnchor($sheet, $coordinates, $offsetX, $offsetY, $width, $height); - - $spContainer->setStartCoordinates($twoAnchor['startCoordinates']); - $spContainer->setStartOffsetX($twoAnchor['startOffsetX']); - $spContainer->setStartOffsetY($twoAnchor['startOffsetY']); - $spContainer->setEndCoordinates($twoAnchor['endCoordinates']); - $spContainer->setEndOffsetX($twoAnchor['endOffsetX']); - $spContainer->setEndOffsetY($twoAnchor['endOffsetY']); - - $spgrContainer->addChild($spContainer); - } - - // AutoFilters - if (!empty($filterRange)) { - $rangeBounds = PHPExcel_Cell::rangeBoundaries($filterRange); - $iNumColStart = $rangeBounds[0][0]; - $iNumColEnd = $rangeBounds[1][0]; - - $iInc = $iNumColStart; - while ($iInc <= $iNumColEnd) { - ++$countShapes[$sheetIndex]; - - // create an Drawing Object for the dropdown - $oDrawing = new PHPExcel_Worksheet_BaseDrawing(); - // get the coordinates of drawing - $cDrawing = PHPExcel_Cell::stringFromColumnIndex($iInc - 1) . $rangeBounds[0][1]; - $oDrawing->setCoordinates($cDrawing); - $oDrawing->setWorksheet($sheet); - - // add the shape - $spContainer = new PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer(); - // set the shape type - $spContainer->setSpType(0x00C9); - // set the shape flag - $spContainer->setSpFlag(0x01); - - // set the shape index (we combine 1-based sheet index and $countShapes to create unique shape index) - $reducedSpId = $countShapes[$sheetIndex]; - $spId = $reducedSpId - | ($sheet->getParent()->getIndex($sheet) + 1) << 10; - $spContainer->setSpId($spId); - - // keep track of last reducedSpId - $lastReducedSpId = $reducedSpId; - - // keep track of last spId - $lastSpId = $spId; - - $spContainer->setOPT(0x007F, 0x01040104); // Protection -> fLockAgainstGrouping - $spContainer->setOPT(0x00BF, 0x00080008); // Text -> fFitTextToShape - $spContainer->setOPT(0x01BF, 0x00010000); // Fill Style -> fNoFillHitTest - $spContainer->setOPT(0x01FF, 0x00080000); // Line Style -> fNoLineDrawDash - $spContainer->setOPT(0x03BF, 0x000A0000); // Group Shape -> fPrint - - // set coordinates and offsets, client anchor - $endCoordinates = PHPExcel_Cell::stringFromColumnIndex(PHPExcel_Cell::stringFromColumnIndex($iInc - 1)); - $endCoordinates .= $rangeBounds[0][1] + 1; - - $spContainer->setStartCoordinates($cDrawing); - $spContainer->setStartOffsetX(0); - $spContainer->setStartOffsetY(0); - $spContainer->setEndCoordinates($endCoordinates); - $spContainer->setEndOffsetX(0); - $spContainer->setEndOffsetY(0); - - $spgrContainer->addChild($spContainer); - $iInc++; - } - } - - // identifier clusters, used for workbook Escher object - $this->IDCLs[$dgId] = $lastReducedSpId; - - // set last shape index - $dgContainer->setLastSpId($lastSpId); - - // set the Escher object - $this->writerWorksheets[$sheetIndex]->setEscher($escher); - } - } - - /** - * Build the Escher object corresponding to the MSODRAWINGGROUP record - */ - private function buildWorkbookEscher() - { - $escher = null; - - // any drawings in this workbook? - $found = false; - foreach ($this->phpExcel->getAllSheets() as $sheet) { - if (count($sheet->getDrawingCollection()) > 0) { - $found = true; - break; - } - } - - // nothing to do if there are no drawings - if (!$found) { - return; - } - - // if we reach here, then there are drawings in the workbook - $escher = new PHPExcel_Shared_Escher(); - - // dggContainer - $dggContainer = new PHPExcel_Shared_Escher_DggContainer(); - $escher->setDggContainer($dggContainer); - - // set IDCLs (identifier clusters) - $dggContainer->setIDCLs($this->IDCLs); - - // this loop is for determining maximum shape identifier of all drawing - $spIdMax = 0; - $totalCountShapes = 0; - $countDrawings = 0; - - foreach ($this->phpExcel->getAllsheets() as $sheet) { - $sheetCountShapes = 0; // count number of shapes (minus group shape), in sheet - - if (count($sheet->getDrawingCollection()) > 0) { - ++$countDrawings; - - foreach ($sheet->getDrawingCollection() as $drawing) { - ++$sheetCountShapes; - ++$totalCountShapes; - - $spId = $sheetCountShapes | ($this->phpExcel->getIndex($sheet) + 1) << 10; - $spIdMax = max($spId, $spIdMax); - } - } - } - - $dggContainer->setSpIdMax($spIdMax + 1); - $dggContainer->setCDgSaved($countDrawings); - $dggContainer->setCSpSaved($totalCountShapes + $countDrawings); // total number of shapes incl. one group shapes per drawing - - // bstoreContainer - $bstoreContainer = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer(); - $dggContainer->setBstoreContainer($bstoreContainer); - - // the BSE's (all the images) - foreach ($this->phpExcel->getAllsheets() as $sheet) { - foreach ($sheet->getDrawingCollection() as $drawing) { - if ($drawing instanceof PHPExcel_Worksheet_Drawing) { - $filename = $drawing->getPath(); - - list($imagesx, $imagesy, $imageFormat) = getimagesize($filename); - - switch ($imageFormat) { - case 1: // GIF, not supported by BIFF8, we convert to PNG - $blipType = PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG; - ob_start(); - imagepng(imagecreatefromgif($filename)); - $blipData = ob_get_contents(); - ob_end_clean(); - break; - case 2: // JPEG - $blipType = PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_JPEG; - $blipData = file_get_contents($filename); - break; - case 3: // PNG - $blipType = PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG; - $blipData = file_get_contents($filename); - break; - case 6: // Windows DIB (BMP), we convert to PNG - $blipType = PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG; - ob_start(); - imagepng(PHPExcel_Shared_Drawing::imagecreatefrombmp($filename)); - $blipData = ob_get_contents(); - ob_end_clean(); - break; - default: - continue 2; - } - - $blip = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip(); - $blip->setData($blipData); - - $BSE = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE(); - $BSE->setBlipType($blipType); - $BSE->setBlip($blip); - - $bstoreContainer->addBSE($BSE); - } elseif ($drawing instanceof PHPExcel_Worksheet_MemoryDrawing) { - switch ($drawing->getRenderingFunction()) { - case PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG: - $blipType = PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_JPEG; - $renderingFunction = 'imagejpeg'; - break; - case PHPExcel_Worksheet_MemoryDrawing::RENDERING_GIF: - case PHPExcel_Worksheet_MemoryDrawing::RENDERING_PNG: - case PHPExcel_Worksheet_MemoryDrawing::RENDERING_DEFAULT: - $blipType = PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG; - $renderingFunction = 'imagepng'; - break; - } - - ob_start(); - call_user_func($renderingFunction, $drawing->getImageResource()); - $blipData = ob_get_contents(); - ob_end_clean(); - - $blip = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip(); - $blip->setData($blipData); - - $BSE = new PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE(); - $BSE->setBlipType($blipType); - $BSE->setBlip($blip); - - $bstoreContainer->addBSE($BSE); - } - } - } - - // Set the Escher object - $this->writerWorkbook->setEscher($escher); - } - - /** - * Build the OLE Part for DocumentSummary Information - * @return string - */ - private function writeDocumentSummaryInformation() - { - // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) - $data = pack('v', 0xFFFE); - // offset: 2; size: 2; - $data .= pack('v', 0x0000); - // offset: 4; size: 2; OS version - $data .= pack('v', 0x0106); - // offset: 6; size: 2; OS indicator - $data .= pack('v', 0x0002); - // offset: 8; size: 16 - $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00); - // offset: 24; size: 4; section count - $data .= pack('V', 0x0001); - - // offset: 28; size: 16; first section's class id: 02 d5 cd d5 9c 2e 1b 10 93 97 08 00 2b 2c f9 ae - $data .= pack('vvvvvvvv', 0xD502, 0xD5CD, 0x2E9C, 0x101B, 0x9793, 0x0008, 0x2C2B, 0xAEF9); - // offset: 44; size: 4; offset of the start - $data .= pack('V', 0x30); - - // SECTION - $dataSection = array(); - $dataSection_NumProps = 0; - $dataSection_Summary = ''; - $dataSection_Content = ''; - - // GKPIDDSI_CODEPAGE: CodePage - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x01), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer - 'data' => array('data' => 1252)); - $dataSection_NumProps++; - - // GKPIDDSI_CATEGORY : Category - if ($this->phpExcel->getProperties()->getCategory()) { - $dataProp = $this->phpExcel->getProperties()->getCategory(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x02), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x1E), - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - } - // GKPIDDSI_VERSION :Version of the application that wrote the property storage - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x17), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x03), - 'data' => array('pack' => 'V', 'data' => 0x000C0000)); - $dataSection_NumProps++; - // GKPIDDSI_SCALE : FALSE - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0B), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x0B), - 'data' => array('data' => false)); - $dataSection_NumProps++; - // GKPIDDSI_LINKSDIRTY : True if any of the values for the linked properties have changed outside of the application - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x10), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x0B), - 'data' => array('data' => false)); - $dataSection_NumProps++; - // GKPIDDSI_SHAREDOC : FALSE - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x13), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x0B), - 'data' => array('data' => false)); - $dataSection_NumProps++; - // GKPIDDSI_HYPERLINKSCHANGED : True if any of the values for the _PID_LINKS (hyperlink text) have changed outside of the application - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x16), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x0B), - 'data' => array('data' => false)); - $dataSection_NumProps++; - - // GKPIDDSI_DOCSPARTS - // MS-OSHARED p75 (2.3.3.2.2.1) - // Structure is VtVecUnalignedLpstrValue (2.3.3.1.9) - // cElements - $dataProp = pack('v', 0x0001); - $dataProp .= pack('v', 0x0000); - // array of UnalignedLpstr - // cch - $dataProp .= pack('v', 0x000A); - $dataProp .= pack('v', 0x0000); - // value - $dataProp .= 'Worksheet'.chr(0); - - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0D), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x101E), - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - - // GKPIDDSI_HEADINGPAIR - // VtVecHeadingPairValue - // cElements - $dataProp = pack('v', 0x0002); - $dataProp .= pack('v', 0x0000); - // Array of vtHeadingPair - // vtUnalignedString - headingString - // stringType - $dataProp .= pack('v', 0x001E); - // padding - $dataProp .= pack('v', 0x0000); - // UnalignedLpstr - // cch - $dataProp .= pack('v', 0x0013); - $dataProp .= pack('v', 0x0000); - // value - $dataProp .= 'Feuilles de calcul'; - // vtUnalignedString - headingParts - // wType : 0x0003 = 32 bit signed integer - $dataProp .= pack('v', 0x0300); - // padding - $dataProp .= pack('v', 0x0000); - // value - $dataProp .= pack('v', 0x0100); - $dataProp .= pack('v', 0x0000); - $dataProp .= pack('v', 0x0000); - $dataProp .= pack('v', 0x0000); - - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0C), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x100C), - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - - // 4 Section Length - // 4 Property count - // 8 * $dataSection_NumProps (8 = ID (4) + OffSet(4)) - $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8; - foreach ($dataSection as $dataProp) { - // Summary - $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']); - // Offset - $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset); - // DataType - $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']); - // Data - if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer - $dataSection_Content .= pack('V', $dataProp['data']['data']); - - $dataSection_Content_Offset += 4 + 4; - } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer - $dataSection_Content .= pack('V', $dataProp['data']['data']); - - $dataSection_Content_Offset += 4 + 4; - } elseif ($dataProp['type']['data'] == 0x0B) { // Boolean - if ($dataProp['data']['data'] == false) { - $dataSection_Content .= pack('V', 0x0000); - } else { - $dataSection_Content .= pack('V', 0x0001); - } - $dataSection_Content_Offset += 4 + 4; - } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length - // Null-terminated string - $dataProp['data']['data'] .= chr(0); - $dataProp['data']['length'] += 1; - // Complete the string with null string for being a %4 - $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4)==4 ? 0 : (4 - $dataProp['data']['length'] % 4)); - $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); - - $dataSection_Content .= pack('V', $dataProp['data']['length']); - $dataSection_Content .= $dataProp['data']['data']; - - $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); - } elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) - $dataSection_Content .= $dataProp['data']['data']; - - $dataSection_Content_Offset += 4 + 8; - } else { - // Data Type Not Used at the moment - $dataSection_Content .= $dataProp['data']['data']; - - $dataSection_Content_Offset += 4 + $dataProp['data']['length']; - } - } - // Now $dataSection_Content_Offset contains the size of the content - - // section header - // offset: $secOffset; size: 4; section length - // + x Size of the content (summary + content) - $data .= pack('V', $dataSection_Content_Offset); - // offset: $secOffset+4; size: 4; property count - $data .= pack('V', $dataSection_NumProps); - // Section Summary - $data .= $dataSection_Summary; - // Section Content - $data .= $dataSection_Content; - - return $data; - } - - /** - * Build the OLE Part for Summary Information - * @return string - */ - private function writeSummaryInformation() - { - // offset: 0; size: 2; must be 0xFE 0xFF (UTF-16 LE byte order mark) - $data = pack('v', 0xFFFE); - // offset: 2; size: 2; - $data .= pack('v', 0x0000); - // offset: 4; size: 2; OS version - $data .= pack('v', 0x0106); - // offset: 6; size: 2; OS indicator - $data .= pack('v', 0x0002); - // offset: 8; size: 16 - $data .= pack('VVVV', 0x00, 0x00, 0x00, 0x00); - // offset: 24; size: 4; section count - $data .= pack('V', 0x0001); - - // offset: 28; size: 16; first section's class id: e0 85 9f f2 f9 4f 68 10 ab 91 08 00 2b 27 b3 d9 - $data .= pack('vvvvvvvv', 0x85E0, 0xF29F, 0x4FF9, 0x1068, 0x91AB, 0x0008, 0x272B, 0xD9B3); - // offset: 44; size: 4; offset of the start - $data .= pack('V', 0x30); - - // SECTION - $dataSection = array(); - $dataSection_NumProps = 0; - $dataSection_Summary = ''; - $dataSection_Content = ''; - - // CodePage : CP-1252 - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x01), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x02), // 2 byte signed integer - 'data' => array('data' => 1252)); - $dataSection_NumProps++; - - // Title - if ($this->phpExcel->getProperties()->getTitle()) { - $dataProp = $this->phpExcel->getProperties()->getTitle(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x02), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - } - // Subject - if ($this->phpExcel->getProperties()->getSubject()) { - $dataProp = $this->phpExcel->getProperties()->getSubject(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x03), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - } - // Author (Creator) - if ($this->phpExcel->getProperties()->getCreator()) { - $dataProp = $this->phpExcel->getProperties()->getCreator(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x04), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - } - // Keywords - if ($this->phpExcel->getProperties()->getKeywords()) { - $dataProp = $this->phpExcel->getProperties()->getKeywords(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x05), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - } - // Comments (Description) - if ($this->phpExcel->getProperties()->getDescription()) { - $dataProp = $this->phpExcel->getProperties()->getDescription(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x06), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - } - // Last Saved By (LastModifiedBy) - if ($this->phpExcel->getProperties()->getLastModifiedBy()) { - $dataProp = $this->phpExcel->getProperties()->getLastModifiedBy(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x08), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x1E), // null-terminated string prepended by dword string length - 'data' => array('data' => $dataProp, 'length' => strlen($dataProp))); - $dataSection_NumProps++; - } - // Created Date/Time - if ($this->phpExcel->getProperties()->getCreated()) { - $dataProp = $this->phpExcel->getProperties()->getCreated(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0C), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) - 'data' => array('data' => PHPExcel_Shared_OLE::LocalDate2OLE($dataProp))); - $dataSection_NumProps++; - } - // Modified Date/Time - if ($this->phpExcel->getProperties()->getModified()) { - $dataProp = $this->phpExcel->getProperties()->getModified(); - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x0D), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x40), // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) - 'data' => array('data' => PHPExcel_Shared_OLE::LocalDate2OLE($dataProp))); - $dataSection_NumProps++; - } - // Security - $dataSection[] = array('summary'=> array('pack' => 'V', 'data' => 0x13), - 'offset' => array('pack' => 'V'), - 'type' => array('pack' => 'V', 'data' => 0x03), // 4 byte signed integer - 'data' => array('data' => 0x00)); - $dataSection_NumProps++; - - - // 4 Section Length - // 4 Property count - // 8 * $dataSection_NumProps (8 = ID (4) + OffSet(4)) - $dataSection_Content_Offset = 8 + $dataSection_NumProps * 8; - foreach ($dataSection as $dataProp) { - // Summary - $dataSection_Summary .= pack($dataProp['summary']['pack'], $dataProp['summary']['data']); - // Offset - $dataSection_Summary .= pack($dataProp['offset']['pack'], $dataSection_Content_Offset); - // DataType - $dataSection_Content .= pack($dataProp['type']['pack'], $dataProp['type']['data']); - // Data - if ($dataProp['type']['data'] == 0x02) { // 2 byte signed integer - $dataSection_Content .= pack('V', $dataProp['data']['data']); - - $dataSection_Content_Offset += 4 + 4; - } elseif ($dataProp['type']['data'] == 0x03) { // 4 byte signed integer - $dataSection_Content .= pack('V', $dataProp['data']['data']); - - $dataSection_Content_Offset += 4 + 4; - } elseif ($dataProp['type']['data'] == 0x1E) { // null-terminated string prepended by dword string length - // Null-terminated string - $dataProp['data']['data'] .= chr(0); - $dataProp['data']['length'] += 1; - // Complete the string with null string for being a %4 - $dataProp['data']['length'] = $dataProp['data']['length'] + ((4 - $dataProp['data']['length'] % 4)==4 ? 0 : (4 - $dataProp['data']['length'] % 4)); - $dataProp['data']['data'] = str_pad($dataProp['data']['data'], $dataProp['data']['length'], chr(0), STR_PAD_RIGHT); - - $dataSection_Content .= pack('V', $dataProp['data']['length']); - $dataSection_Content .= $dataProp['data']['data']; - - $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); - } elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) - $dataSection_Content .= $dataProp['data']['data']; - - $dataSection_Content_Offset += 4 + 8; - } else { - // Data Type Not Used at the moment - } - } - // Now $dataSection_Content_Offset contains the size of the content - - // section header - // offset: $secOffset; size: 4; section length - // + x Size of the content (summary + content) - $data .= pack('V', $dataSection_Content_Offset); - // offset: $secOffset+4; size: 4; property count - $data .= pack('V', $dataSection_NumProps); - // Section Summary - $data .= $dataSection_Summary; - // Section Content - $data .= $dataSection_Content; - - return $data; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/BIFFwriter.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/BIFFwriter.php deleted file mode 100644 index a795752..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/BIFFwriter.php +++ /dev/null @@ -1,246 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel5_BIFFwriter - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -// Original file header of PEAR::Spreadsheet_Excel_Writer_BIFFwriter (used as the base for this class): -// ----------------------------------------------------------------------------------------- -// * Module written/ported by Xavier Noguer <xnoguer@rezebra.com> -// * -// * The majority of this is _NOT_ my code. I simply ported it from the -// * PERL Spreadsheet::WriteExcel module. -// * -// * The author of the Spreadsheet::WriteExcel module is John McNamara -// * <jmcnamara@cpan.org> -// * -// * I _DO_ maintain this code, and John McNamara has nothing to do with the -// * porting of this code to PHP. Any questions directly related to this -// * class library should be directed to me. -// * -// * License Information: -// * -// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets -// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com -// * -// * This library is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public -// * License as published by the Free Software Foundation; either -// * version 2.1 of the License, or (at your option) any later version. -// * -// * This library is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// * Lesser General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public -// * License along with this library; if not, write to the Free Software -// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// */ -class PHPExcel_Writer_Excel5_BIFFwriter -{ - /** - * The byte order of this architecture. 0 => little endian, 1 => big endian - * @var integer - */ - private static $byteOrder; - - /** - * The string containing the data of the BIFF stream - * @var string - */ - public $_data; - - /** - * The size of the data in bytes. Should be the same as strlen($this->_data) - * @var integer - */ - public $_datasize; - - /** - * The maximum length for a BIFF record (excluding record header and length field). See addContinue() - * @var integer - * @see addContinue() - */ - private $limit = 8224; - - /** - * Constructor - */ - public function __construct() - { - $this->_data = ''; - $this->_datasize = 0; -// $this->limit = 8224; - } - - /** - * Determine the byte order and store it as class data to avoid - * recalculating it for each call to new(). - * - * @return int - */ - public static function getByteOrder() - { - if (!isset(self::$byteOrder)) { - // Check if "pack" gives the required IEEE 64bit float - $teststr = pack("d", 1.2345); - $number = pack("C8", 0x8D, 0x97, 0x6E, 0x12, 0x83, 0xC0, 0xF3, 0x3F); - if ($number == $teststr) { - $byte_order = 0; // Little Endian - } elseif ($number == strrev($teststr)) { - $byte_order = 1; // Big Endian - } else { - // Give up. I'll fix this in a later version. - throw new PHPExcel_Writer_Exception("Required floating point format not supported on this platform."); - } - self::$byteOrder = $byte_order; - } - - return self::$byteOrder; - } - - /** - * General storage function - * - * @param string $data binary data to append - * @access private - */ - protected function append($data) - { - if (strlen($data) - 4 > $this->limit) { - $data = $this->addContinue($data); - } - $this->_data .= $data; - $this->_datasize += strlen($data); - } - - /** - * General storage function like append, but returns string instead of modifying $this->_data - * - * @param string $data binary data to write - * @return string - */ - public function writeData($data) - { - if (strlen($data) - 4 > $this->limit) { - $data = $this->addContinue($data); - } - $this->_datasize += strlen($data); - - return $data; - } - - /** - * Writes Excel BOF record to indicate the beginning of a stream or - * sub-stream in the BIFF file. - * - * @param integer $type Type of BIFF file to write: 0x0005 Workbook, - * 0x0010 Worksheet. - * @access private - */ - protected function storeBof($type) - { - $record = 0x0809; // Record identifier (BIFF5-BIFF8) - $length = 0x0010; - - // by inspection of real files, MS Office Excel 2007 writes the following - $unknown = pack("VV", 0x000100D1, 0x00000406); - - $build = 0x0DBB; // Excel 97 - $year = 0x07CC; // Excel 97 - - $version = 0x0600; // BIFF8 - - $header = pack("vv", $record, $length); - $data = pack("vvvv", $version, $type, $build, $year); - $this->append($header . $data . $unknown); - } - - /** - * Writes Excel EOF record to indicate the end of a BIFF stream. - * - * @access private - */ - protected function storeEof() - { - $record = 0x000A; // Record identifier - $length = 0x0000; // Number of bytes to follow - - $header = pack("vv", $record, $length); - $this->append($header); - } - - /** - * Writes Excel EOF record to indicate the end of a BIFF stream. - * - * @access private - */ - public function writeEof() - { - $record = 0x000A; // Record identifier - $length = 0x0000; // Number of bytes to follow - $header = pack("vv", $record, $length); - return $this->writeData($header); - } - - /** - * Excel limits the size of BIFF records. In Excel 5 the limit is 2084 bytes. In - * Excel 97 the limit is 8228 bytes. Records that are longer than these limits - * must be split up into CONTINUE blocks. - * - * This function takes a long BIFF record and inserts CONTINUE records as - * necessary. - * - * @param string $data The original binary data to be written - * @return string A very convenient string of continue blocks - * @access private - */ - private function addContinue($data) - { - $limit = $this->limit; - $record = 0x003C; // Record identifier - - // The first 2080/8224 bytes remain intact. However, we have to change - // the length field of the record. - $tmp = substr($data, 0, 2) . pack("v", $limit) . substr($data, 4, $limit); - - $header = pack("vv", $record, $limit); // Headers for continue records - - // Retrieve chunks of 2080/8224 bytes +4 for the header. - $data_length = strlen($data); - for ($i = $limit + 4; $i < ($data_length - $limit); $i += $limit) { - $tmp .= $header; - $tmp .= substr($data, $i, $limit); - } - - // Retrieve the last chunk of data - $header = pack("vv", $record, strlen($data) - $i); - $tmp .= $header; - $tmp .= substr($data, $i, strlen($data) - $i); - - return $tmp; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Escher.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Escher.php deleted file mode 100644 index c37fda9..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Escher.php +++ /dev/null @@ -1,523 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Shared_Escher_DggContainer_BstoreContainer - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - */ -class PHPExcel_Writer_Excel5_Escher -{ - /** - * The object we are writing - */ - private $object; - - /** - * The written binary data - */ - private $data; - - /** - * Shape offsets. Positions in binary stream where a new shape record begins - * - * @var array - */ - private $spOffsets; - - /** - * Shape types. - * - * @var array - */ - private $spTypes; - - /** - * Constructor - * - * @param mixed - */ - public function __construct($object) - { - $this->object = $object; - } - - /** - * Process the object to be written - */ - public function close() - { - // initialize - $this->data = ''; - - switch (get_class($this->object)) { - case 'PHPExcel_Shared_Escher': - if ($dggContainer = $this->object->getDggContainer()) { - $writer = new PHPExcel_Writer_Excel5_Escher($dggContainer); - $this->data = $writer->close(); - } elseif ($dgContainer = $this->object->getDgContainer()) { - $writer = new PHPExcel_Writer_Excel5_Escher($dgContainer); - $this->data = $writer->close(); - $this->spOffsets = $writer->getSpOffsets(); - $this->spTypes = $writer->getSpTypes(); - } - break; - case 'PHPExcel_Shared_Escher_DggContainer': - // this is a container record - - // initialize - $innerData = ''; - - // write the dgg - $recVer = 0x0; - $recInstance = 0x0000; - $recType = 0xF006; - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - // dgg data - $dggData = - pack( - 'VVVV', - $this->object->getSpIdMax(), // maximum shape identifier increased by one - $this->object->getCDgSaved() + 1, // number of file identifier clusters increased by one - $this->object->getCSpSaved(), - $this->object->getCDgSaved() // count total number of drawings saved - ); - - // add file identifier clusters (one per drawing) - $IDCLs = $this->object->getIDCLs(); - - foreach ($IDCLs as $dgId => $maxReducedSpId) { - $dggData .= pack('VV', $dgId, $maxReducedSpId + 1); - } - - $header = pack('vvV', $recVerInstance, $recType, strlen($dggData)); - $innerData .= $header . $dggData; - - // write the bstoreContainer - if ($bstoreContainer = $this->object->getBstoreContainer()) { - $writer = new PHPExcel_Writer_Excel5_Escher($bstoreContainer); - $innerData .= $writer->close(); - } - - // write the record - $recVer = 0xF; - $recInstance = 0x0000; - $recType = 0xF000; - $length = strlen($innerData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $this->data = $header . $innerData; - break; - case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer': - // this is a container record - - // initialize - $innerData = ''; - - // treat the inner data - if ($BSECollection = $this->object->getBSECollection()) { - foreach ($BSECollection as $BSE) { - $writer = new PHPExcel_Writer_Excel5_Escher($BSE); - $innerData .= $writer->close(); - } - } - - // write the record - $recVer = 0xF; - $recInstance = count($this->object->getBSECollection()); - $recType = 0xF001; - $length = strlen($innerData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $this->data = $header . $innerData; - break; - case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE': - // this is a semi-container record - - // initialize - $innerData = ''; - - // here we treat the inner data - if ($blip = $this->object->getBlip()) { - $writer = new PHPExcel_Writer_Excel5_Escher($blip); - $innerData .= $writer->close(); - } - - // initialize - $data = ''; - - $btWin32 = $this->object->getBlipType(); - $btMacOS = $this->object->getBlipType(); - $data .= pack('CC', $btWin32, $btMacOS); - - $rgbUid = pack('VVVV', 0, 0, 0, 0); // todo - $data .= $rgbUid; - - $tag = 0; - $size = strlen($innerData); - $cRef = 1; - $foDelay = 0; //todo - $unused1 = 0x0; - $cbName = 0x0; - $unused2 = 0x0; - $unused3 = 0x0; - $data .= pack('vVVVCCCC', $tag, $size, $cRef, $foDelay, $unused1, $cbName, $unused2, $unused3); - - $data .= $innerData; - - // write the record - $recVer = 0x2; - $recInstance = $this->object->getBlipType(); - $recType = 0xF007; - $length = strlen($data); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $this->data = $header; - - $this->data .= $data; - break; - case 'PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip': - // this is an atom record - - // write the record - switch ($this->object->getParent()->getBlipType()) { - case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_JPEG: - // initialize - $innerData = ''; - - $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo - $innerData .= $rgbUid1; - - $tag = 0xFF; // todo - $innerData .= pack('C', $tag); - - $innerData .= $this->object->getData(); - - $recVer = 0x0; - $recInstance = 0x46A; - $recType = 0xF01D; - $length = strlen($innerData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $this->data = $header; - - $this->data .= $innerData; - break; - - case PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE::BLIPTYPE_PNG: - // initialize - $innerData = ''; - - $rgbUid1 = pack('VVVV', 0, 0, 0, 0); // todo - $innerData .= $rgbUid1; - - $tag = 0xFF; // todo - $innerData .= pack('C', $tag); - - $innerData .= $this->object->getData(); - - $recVer = 0x0; - $recInstance = 0x6E0; - $recType = 0xF01E; - $length = strlen($innerData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $this->data = $header; - - $this->data .= $innerData; - break; - } - break; - case 'PHPExcel_Shared_Escher_DgContainer': - // this is a container record - - // initialize - $innerData = ''; - - // write the dg - $recVer = 0x0; - $recInstance = $this->object->getDgId(); - $recType = 0xF008; - $length = 8; - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - // number of shapes in this drawing (including group shape) - $countShapes = count($this->object->getSpgrContainer()->getChildren()); - $innerData .= $header . pack('VV', $countShapes, $this->object->getLastSpId()); - //$innerData .= $header . pack('VV', 0, 0); - - // write the spgrContainer - if ($spgrContainer = $this->object->getSpgrContainer()) { - $writer = new PHPExcel_Writer_Excel5_Escher($spgrContainer); - $innerData .= $writer->close(); - - // get the shape offsets relative to the spgrContainer record - $spOffsets = $writer->getSpOffsets(); - $spTypes = $writer->getSpTypes(); - - // save the shape offsets relative to dgContainer - foreach ($spOffsets as & $spOffset) { - $spOffset += 24; // add length of dgContainer header data (8 bytes) plus dg data (16 bytes) - } - - $this->spOffsets = $spOffsets; - $this->spTypes = $spTypes; - } - - // write the record - $recVer = 0xF; - $recInstance = 0x0000; - $recType = 0xF002; - $length = strlen($innerData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $this->data = $header . $innerData; - break; - case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer': - // this is a container record - - // initialize - $innerData = ''; - - // initialize spape offsets - $totalSize = 8; - $spOffsets = array(); - $spTypes = array(); - - // treat the inner data - foreach ($this->object->getChildren() as $spContainer) { - $writer = new PHPExcel_Writer_Excel5_Escher($spContainer); - $spData = $writer->close(); - $innerData .= $spData; - - // save the shape offsets (where new shape records begin) - $totalSize += strlen($spData); - $spOffsets[] = $totalSize; - - $spTypes = array_merge($spTypes, $writer->getSpTypes()); - } - - // write the record - $recVer = 0xF; - $recInstance = 0x0000; - $recType = 0xF003; - $length = strlen($innerData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $this->data = $header . $innerData; - $this->spOffsets = $spOffsets; - $this->spTypes = $spTypes; - break; - case 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer': - // initialize - $data = ''; - - // build the data - - // write group shape record, if necessary? - if ($this->object->getSpgr()) { - $recVer = 0x1; - $recInstance = 0x0000; - $recType = 0xF009; - $length = 0x00000010; - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $data .= $header . pack('VVVV', 0, 0, 0, 0); - } - $this->spTypes[] = ($this->object->getSpType()); - - // write the shape record - $recVer = 0x2; - $recInstance = $this->object->getSpType(); // shape type - $recType = 0xF00A; - $length = 0x00000008; - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $data .= $header . pack('VV', $this->object->getSpId(), $this->object->getSpgr() ? 0x0005 : 0x0A00); - - - // the options - if ($this->object->getOPTCollection()) { - $optData = ''; - - $recVer = 0x3; - $recInstance = count($this->object->getOPTCollection()); - $recType = 0xF00B; - foreach ($this->object->getOPTCollection() as $property => $value) { - $optData .= pack('vV', $property, $value); - } - $length = strlen($optData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - $data .= $header . $optData; - } - - // the client anchor - if ($this->object->getStartCoordinates()) { - $clientAnchorData = ''; - - $recVer = 0x0; - $recInstance = 0x0; - $recType = 0xF010; - - // start coordinates - list($column, $row) = PHPExcel_Cell::coordinateFromString($this->object->getStartCoordinates()); - $c1 = PHPExcel_Cell::columnIndexFromString($column) - 1; - $r1 = $row - 1; - - // start offsetX - $startOffsetX = $this->object->getStartOffsetX(); - - // start offsetY - $startOffsetY = $this->object->getStartOffsetY(); - - // end coordinates - list($column, $row) = PHPExcel_Cell::coordinateFromString($this->object->getEndCoordinates()); - $c2 = PHPExcel_Cell::columnIndexFromString($column) - 1; - $r2 = $row - 1; - - // end offsetX - $endOffsetX = $this->object->getEndOffsetX(); - - // end offsetY - $endOffsetY = $this->object->getEndOffsetY(); - - $clientAnchorData = pack('vvvvvvvvv', $this->object->getSpFlag(), $c1, $startOffsetX, $r1, $startOffsetY, $c2, $endOffsetX, $r2, $endOffsetY); - - $length = strlen($clientAnchorData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - $data .= $header . $clientAnchorData; - } - - // the client data, just empty for now - if (!$this->object->getSpgr()) { - $clientDataData = ''; - - $recVer = 0x0; - $recInstance = 0x0; - $recType = 0xF011; - - $length = strlen($clientDataData); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - $data .= $header . $clientDataData; - } - - // write the record - $recVer = 0xF; - $recInstance = 0x0000; - $recType = 0xF004; - $length = strlen($data); - - $recVerInstance = $recVer; - $recVerInstance |= $recInstance << 4; - - $header = pack('vvV', $recVerInstance, $recType, $length); - - $this->data = $header . $data; - break; - } - - return $this->data; - } - - /** - * Gets the shape offsets - * - * @return array - */ - public function getSpOffsets() - { - return $this->spOffsets; - } - - /** - * Gets the shape types - * - * @return array - */ - public function getSpTypes() - { - return $this->spTypes; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Font.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Font.php deleted file mode 100644 index ed85ff4..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Font.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel5_Font - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Excel5_Font -{ - /** - * Color index - * - * @var int - */ - private $colorIndex; - - /** - * Font - * - * @var PHPExcel_Style_Font - */ - private $font; - - /** - * Constructor - * - * @param PHPExcel_Style_Font $font - */ - public function __construct(PHPExcel_Style_Font $font = null) - { - $this->colorIndex = 0x7FFF; - $this->font = $font; - } - - /** - * Set the color index - * - * @param int $colorIndex - */ - public function setColorIndex($colorIndex) - { - $this->colorIndex = $colorIndex; - } - - /** - * Get font record data - * - * @return string - */ - public function writeFont() - { - $font_outline = 0; - $font_shadow = 0; - - $icv = $this->colorIndex; // Index to color palette - if ($this->font->getSuperScript()) { - $sss = 1; - } elseif ($this->font->getSubScript()) { - $sss = 2; - } else { - $sss = 0; - } - $bFamily = 0; // Font family - $bCharSet = PHPExcel_Shared_Font::getCharsetFromFontName($this->font->getName()); // Character set - - $record = 0x31; // Record identifier - $reserved = 0x00; // Reserved - $grbit = 0x00; // Font attributes - if ($this->font->getItalic()) { - $grbit |= 0x02; - } - if ($this->font->getStrikethrough()) { - $grbit |= 0x08; - } - if ($font_outline) { - $grbit |= 0x10; - } - if ($font_shadow) { - $grbit |= 0x20; - } - - $data = pack( - "vvvvvCCCC", - // Fontsize (in twips) - $this->font->getSize() * 20, - $grbit, - // Colour - $icv, - // Font weight - self::mapBold($this->font->getBold()), - // Superscript/Subscript - $sss, - self::mapUnderline($this->font->getUnderline()), - $bFamily, - $bCharSet, - $reserved - ); - $data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($this->font->getName()); - - $length = strlen($data); - $header = pack("vv", $record, $length); - - return($header . $data); - } - - /** - * Map to BIFF5-BIFF8 codes for bold - * - * @param boolean $bold - * @return int - */ - private static function mapBold($bold) - { - if ($bold) { - return 0x2BC; // 700 = Bold font weight - } - return 0x190; // 400 = Normal font weight - } - - /** - * Map of BIFF2-BIFF8 codes for underline styles - * @static array of int - * - */ - private static $mapUnderline = array( - PHPExcel_Style_Font::UNDERLINE_NONE => 0x00, - PHPExcel_Style_Font::UNDERLINE_SINGLE => 0x01, - PHPExcel_Style_Font::UNDERLINE_DOUBLE => 0x02, - PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING => 0x21, - PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING => 0x22, - ); - - /** - * Map underline - * - * @param string - * @return int - */ - private static function mapUnderline($underline) - { - if (isset(self::$mapUnderline[$underline])) { - return self::$mapUnderline[$underline]; - } - return 0x00; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php deleted file mode 100644 index 0cf1c1d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php +++ /dev/null @@ -1,1531 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel5_Parser - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -// Original file header of PEAR::Spreadsheet_Excel_Writer_Parser (used as the base for this class): -// ----------------------------------------------------------------------------------------- -// * Class for parsing Excel formulas -// * -// * License Information: -// * -// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets -// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com -// * -// * This library is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public -// * License as published by the Free Software Foundation; either -// * version 2.1 of the License, or (at your option) any later version. -// * -// * This library is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// * Lesser General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public -// * License along with this library; if not, write to the Free Software -// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// */ -class PHPExcel_Writer_Excel5_Parser -{ - /** Constants */ - // Sheet title in unquoted form - // Invalid sheet title characters cannot occur in the sheet title: - // *:/\?[] - // Moreover, there are valid sheet title characters that cannot occur in unquoted form (there may be more?) - // +-% '^&<>=,;#()"{} - const REGEX_SHEET_TITLE_UNQUOTED = '[^\*\:\/\\\\\?\[\]\+\-\% \\\'\^\&\<\>\=\,\;\#\(\)\"\{\}]+'; - - // Sheet title in quoted form (without surrounding quotes) - // Invalid sheet title characters cannot occur in the sheet title: - // *:/\?[] (usual invalid sheet title characters) - // Single quote is represented as a pair '' - const REGEX_SHEET_TITLE_QUOTED = '(([^\*\:\/\\\\\?\[\]\\\'])+|(\\\'\\\')+)+'; - - /** - * The index of the character we are currently looking at - * @var integer - */ - public $currentCharacter; - - /** - * The token we are working on. - * @var string - */ - public $currentToken; - - /** - * The formula to parse - * @var string - */ - private $formula; - - /** - * The character ahead of the current char - * @var string - */ - public $lookAhead; - - /** - * The parse tree to be generated - * @var string - */ - private $parseTree; - - /** - * Array of external sheets - * @var array - */ - private $externalSheets; - - /** - * Array of sheet references in the form of REF structures - * @var array - */ - public $references; - - /** - * The class constructor - * - */ - public function __construct() - { - $this->currentCharacter = 0; - $this->currentToken = ''; // The token we are working on. - $this->formula = ''; // The formula to parse. - $this->lookAhead = ''; // The character ahead of the current char. - $this->parseTree = ''; // The parse tree to be generated. - $this->initializeHashes(); // Initialize the hashes: ptg's and function's ptg's - $this->externalSheets = array(); - $this->references = array(); - } - - /** - * Initialize the ptg and function hashes. - * - * @access private - */ - private function initializeHashes() - { - // The Excel ptg indices - $this->ptg = array( - 'ptgExp' => 0x01, - 'ptgTbl' => 0x02, - 'ptgAdd' => 0x03, - 'ptgSub' => 0x04, - 'ptgMul' => 0x05, - 'ptgDiv' => 0x06, - 'ptgPower' => 0x07, - 'ptgConcat' => 0x08, - 'ptgLT' => 0x09, - 'ptgLE' => 0x0A, - 'ptgEQ' => 0x0B, - 'ptgGE' => 0x0C, - 'ptgGT' => 0x0D, - 'ptgNE' => 0x0E, - 'ptgIsect' => 0x0F, - 'ptgUnion' => 0x10, - 'ptgRange' => 0x11, - 'ptgUplus' => 0x12, - 'ptgUminus' => 0x13, - 'ptgPercent' => 0x14, - 'ptgParen' => 0x15, - 'ptgMissArg' => 0x16, - 'ptgStr' => 0x17, - 'ptgAttr' => 0x19, - 'ptgSheet' => 0x1A, - 'ptgEndSheet' => 0x1B, - 'ptgErr' => 0x1C, - 'ptgBool' => 0x1D, - 'ptgInt' => 0x1E, - 'ptgNum' => 0x1F, - 'ptgArray' => 0x20, - 'ptgFunc' => 0x21, - 'ptgFuncVar' => 0x22, - 'ptgName' => 0x23, - 'ptgRef' => 0x24, - 'ptgArea' => 0x25, - 'ptgMemArea' => 0x26, - 'ptgMemErr' => 0x27, - 'ptgMemNoMem' => 0x28, - 'ptgMemFunc' => 0x29, - 'ptgRefErr' => 0x2A, - 'ptgAreaErr' => 0x2B, - 'ptgRefN' => 0x2C, - 'ptgAreaN' => 0x2D, - 'ptgMemAreaN' => 0x2E, - 'ptgMemNoMemN' => 0x2F, - 'ptgNameX' => 0x39, - 'ptgRef3d' => 0x3A, - 'ptgArea3d' => 0x3B, - 'ptgRefErr3d' => 0x3C, - 'ptgAreaErr3d' => 0x3D, - 'ptgArrayV' => 0x40, - 'ptgFuncV' => 0x41, - 'ptgFuncVarV' => 0x42, - 'ptgNameV' => 0x43, - 'ptgRefV' => 0x44, - 'ptgAreaV' => 0x45, - 'ptgMemAreaV' => 0x46, - 'ptgMemErrV' => 0x47, - 'ptgMemNoMemV' => 0x48, - 'ptgMemFuncV' => 0x49, - 'ptgRefErrV' => 0x4A, - 'ptgAreaErrV' => 0x4B, - 'ptgRefNV' => 0x4C, - 'ptgAreaNV' => 0x4D, - 'ptgMemAreaNV' => 0x4E, - 'ptgMemNoMemN' => 0x4F, - 'ptgFuncCEV' => 0x58, - 'ptgNameXV' => 0x59, - 'ptgRef3dV' => 0x5A, - 'ptgArea3dV' => 0x5B, - 'ptgRefErr3dV' => 0x5C, - 'ptgAreaErr3d' => 0x5D, - 'ptgArrayA' => 0x60, - 'ptgFuncA' => 0x61, - 'ptgFuncVarA' => 0x62, - 'ptgNameA' => 0x63, - 'ptgRefA' => 0x64, - 'ptgAreaA' => 0x65, - 'ptgMemAreaA' => 0x66, - 'ptgMemErrA' => 0x67, - 'ptgMemNoMemA' => 0x68, - 'ptgMemFuncA' => 0x69, - 'ptgRefErrA' => 0x6A, - 'ptgAreaErrA' => 0x6B, - 'ptgRefNA' => 0x6C, - 'ptgAreaNA' => 0x6D, - 'ptgMemAreaNA' => 0x6E, - 'ptgMemNoMemN' => 0x6F, - 'ptgFuncCEA' => 0x78, - 'ptgNameXA' => 0x79, - 'ptgRef3dA' => 0x7A, - 'ptgArea3dA' => 0x7B, - 'ptgRefErr3dA' => 0x7C, - 'ptgAreaErr3d' => 0x7D - ); - - // Thanks to Michael Meeks and Gnumeric for the initial arg values. - // - // The following hash was generated by "function_locale.pl" in the distro. - // Refer to function_locale.pl for non-English function names. - // - // The array elements are as follow: - // ptg: The Excel function ptg code. - // args: The number of arguments that the function takes: - // >=0 is a fixed number of arguments. - // -1 is a variable number of arguments. - // class: The reference, value or array class of the function args. - // vol: The function is volatile. - // - $this->functions = array( - // function ptg args class vol - 'COUNT' => array( 0, -1, 0, 0 ), - 'IF' => array( 1, -1, 1, 0 ), - 'ISNA' => array( 2, 1, 1, 0 ), - 'ISERROR' => array( 3, 1, 1, 0 ), - 'SUM' => array( 4, -1, 0, 0 ), - 'AVERAGE' => array( 5, -1, 0, 0 ), - 'MIN' => array( 6, -1, 0, 0 ), - 'MAX' => array( 7, -1, 0, 0 ), - 'ROW' => array( 8, -1, 0, 0 ), - 'COLUMN' => array( 9, -1, 0, 0 ), - 'NA' => array( 10, 0, 0, 0 ), - 'NPV' => array( 11, -1, 1, 0 ), - 'STDEV' => array( 12, -1, 0, 0 ), - 'DOLLAR' => array( 13, -1, 1, 0 ), - 'FIXED' => array( 14, -1, 1, 0 ), - 'SIN' => array( 15, 1, 1, 0 ), - 'COS' => array( 16, 1, 1, 0 ), - 'TAN' => array( 17, 1, 1, 0 ), - 'ATAN' => array( 18, 1, 1, 0 ), - 'PI' => array( 19, 0, 1, 0 ), - 'SQRT' => array( 20, 1, 1, 0 ), - 'EXP' => array( 21, 1, 1, 0 ), - 'LN' => array( 22, 1, 1, 0 ), - 'LOG10' => array( 23, 1, 1, 0 ), - 'ABS' => array( 24, 1, 1, 0 ), - 'INT' => array( 25, 1, 1, 0 ), - 'SIGN' => array( 26, 1, 1, 0 ), - 'ROUND' => array( 27, 2, 1, 0 ), - 'LOOKUP' => array( 28, -1, 0, 0 ), - 'INDEX' => array( 29, -1, 0, 1 ), - 'REPT' => array( 30, 2, 1, 0 ), - 'MID' => array( 31, 3, 1, 0 ), - 'LEN' => array( 32, 1, 1, 0 ), - 'VALUE' => array( 33, 1, 1, 0 ), - 'TRUE' => array( 34, 0, 1, 0 ), - 'FALSE' => array( 35, 0, 1, 0 ), - 'AND' => array( 36, -1, 0, 0 ), - 'OR' => array( 37, -1, 0, 0 ), - 'NOT' => array( 38, 1, 1, 0 ), - 'MOD' => array( 39, 2, 1, 0 ), - 'DCOUNT' => array( 40, 3, 0, 0 ), - 'DSUM' => array( 41, 3, 0, 0 ), - 'DAVERAGE' => array( 42, 3, 0, 0 ), - 'DMIN' => array( 43, 3, 0, 0 ), - 'DMAX' => array( 44, 3, 0, 0 ), - 'DSTDEV' => array( 45, 3, 0, 0 ), - 'VAR' => array( 46, -1, 0, 0 ), - 'DVAR' => array( 47, 3, 0, 0 ), - 'TEXT' => array( 48, 2, 1, 0 ), - 'LINEST' => array( 49, -1, 0, 0 ), - 'TREND' => array( 50, -1, 0, 0 ), - 'LOGEST' => array( 51, -1, 0, 0 ), - 'GROWTH' => array( 52, -1, 0, 0 ), - 'PV' => array( 56, -1, 1, 0 ), - 'FV' => array( 57, -1, 1, 0 ), - 'NPER' => array( 58, -1, 1, 0 ), - 'PMT' => array( 59, -1, 1, 0 ), - 'RATE' => array( 60, -1, 1, 0 ), - 'MIRR' => array( 61, 3, 0, 0 ), - 'IRR' => array( 62, -1, 0, 0 ), - 'RAND' => array( 63, 0, 1, 1 ), - 'MATCH' => array( 64, -1, 0, 0 ), - 'DATE' => array( 65, 3, 1, 0 ), - 'TIME' => array( 66, 3, 1, 0 ), - 'DAY' => array( 67, 1, 1, 0 ), - 'MONTH' => array( 68, 1, 1, 0 ), - 'YEAR' => array( 69, 1, 1, 0 ), - 'WEEKDAY' => array( 70, -1, 1, 0 ), - 'HOUR' => array( 71, 1, 1, 0 ), - 'MINUTE' => array( 72, 1, 1, 0 ), - 'SECOND' => array( 73, 1, 1, 0 ), - 'NOW' => array( 74, 0, 1, 1 ), - 'AREAS' => array( 75, 1, 0, 1 ), - 'ROWS' => array( 76, 1, 0, 1 ), - 'COLUMNS' => array( 77, 1, 0, 1 ), - 'OFFSET' => array( 78, -1, 0, 1 ), - 'SEARCH' => array( 82, -1, 1, 0 ), - 'TRANSPOSE' => array( 83, 1, 1, 0 ), - 'TYPE' => array( 86, 1, 1, 0 ), - 'ATAN2' => array( 97, 2, 1, 0 ), - 'ASIN' => array( 98, 1, 1, 0 ), - 'ACOS' => array( 99, 1, 1, 0 ), - 'CHOOSE' => array( 100, -1, 1, 0 ), - 'HLOOKUP' => array( 101, -1, 0, 0 ), - 'VLOOKUP' => array( 102, -1, 0, 0 ), - 'ISREF' => array( 105, 1, 0, 0 ), - 'LOG' => array( 109, -1, 1, 0 ), - 'CHAR' => array( 111, 1, 1, 0 ), - 'LOWER' => array( 112, 1, 1, 0 ), - 'UPPER' => array( 113, 1, 1, 0 ), - 'PROPER' => array( 114, 1, 1, 0 ), - 'LEFT' => array( 115, -1, 1, 0 ), - 'RIGHT' => array( 116, -1, 1, 0 ), - 'EXACT' => array( 117, 2, 1, 0 ), - 'TRIM' => array( 118, 1, 1, 0 ), - 'REPLACE' => array( 119, 4, 1, 0 ), - 'SUBSTITUTE' => array( 120, -1, 1, 0 ), - 'CODE' => array( 121, 1, 1, 0 ), - 'FIND' => array( 124, -1, 1, 0 ), - 'CELL' => array( 125, -1, 0, 1 ), - 'ISERR' => array( 126, 1, 1, 0 ), - 'ISTEXT' => array( 127, 1, 1, 0 ), - 'ISNUMBER' => array( 128, 1, 1, 0 ), - 'ISBLANK' => array( 129, 1, 1, 0 ), - 'T' => array( 130, 1, 0, 0 ), - 'N' => array( 131, 1, 0, 0 ), - 'DATEVALUE' => array( 140, 1, 1, 0 ), - 'TIMEVALUE' => array( 141, 1, 1, 0 ), - 'SLN' => array( 142, 3, 1, 0 ), - 'SYD' => array( 143, 4, 1, 0 ), - 'DDB' => array( 144, -1, 1, 0 ), - 'INDIRECT' => array( 148, -1, 1, 1 ), - 'CALL' => array( 150, -1, 1, 0 ), - 'CLEAN' => array( 162, 1, 1, 0 ), - 'MDETERM' => array( 163, 1, 2, 0 ), - 'MINVERSE' => array( 164, 1, 2, 0 ), - 'MMULT' => array( 165, 2, 2, 0 ), - 'IPMT' => array( 167, -1, 1, 0 ), - 'PPMT' => array( 168, -1, 1, 0 ), - 'COUNTA' => array( 169, -1, 0, 0 ), - 'PRODUCT' => array( 183, -1, 0, 0 ), - 'FACT' => array( 184, 1, 1, 0 ), - 'DPRODUCT' => array( 189, 3, 0, 0 ), - 'ISNONTEXT' => array( 190, 1, 1, 0 ), - 'STDEVP' => array( 193, -1, 0, 0 ), - 'VARP' => array( 194, -1, 0, 0 ), - 'DSTDEVP' => array( 195, 3, 0, 0 ), - 'DVARP' => array( 196, 3, 0, 0 ), - 'TRUNC' => array( 197, -1, 1, 0 ), - 'ISLOGICAL' => array( 198, 1, 1, 0 ), - 'DCOUNTA' => array( 199, 3, 0, 0 ), - 'USDOLLAR' => array( 204, -1, 1, 0 ), - 'FINDB' => array( 205, -1, 1, 0 ), - 'SEARCHB' => array( 206, -1, 1, 0 ), - 'REPLACEB' => array( 207, 4, 1, 0 ), - 'LEFTB' => array( 208, -1, 1, 0 ), - 'RIGHTB' => array( 209, -1, 1, 0 ), - 'MIDB' => array( 210, 3, 1, 0 ), - 'LENB' => array( 211, 1, 1, 0 ), - 'ROUNDUP' => array( 212, 2, 1, 0 ), - 'ROUNDDOWN' => array( 213, 2, 1, 0 ), - 'ASC' => array( 214, 1, 1, 0 ), - 'DBCS' => array( 215, 1, 1, 0 ), - 'RANK' => array( 216, -1, 0, 0 ), - 'ADDRESS' => array( 219, -1, 1, 0 ), - 'DAYS360' => array( 220, -1, 1, 0 ), - 'TODAY' => array( 221, 0, 1, 1 ), - 'VDB' => array( 222, -1, 1, 0 ), - 'MEDIAN' => array( 227, -1, 0, 0 ), - 'SUMPRODUCT' => array( 228, -1, 2, 0 ), - 'SINH' => array( 229, 1, 1, 0 ), - 'COSH' => array( 230, 1, 1, 0 ), - 'TANH' => array( 231, 1, 1, 0 ), - 'ASINH' => array( 232, 1, 1, 0 ), - 'ACOSH' => array( 233, 1, 1, 0 ), - 'ATANH' => array( 234, 1, 1, 0 ), - 'DGET' => array( 235, 3, 0, 0 ), - 'INFO' => array( 244, 1, 1, 1 ), - 'DB' => array( 247, -1, 1, 0 ), - 'FREQUENCY' => array( 252, 2, 0, 0 ), - 'ERROR.TYPE' => array( 261, 1, 1, 0 ), - 'REGISTER.ID' => array( 267, -1, 1, 0 ), - 'AVEDEV' => array( 269, -1, 0, 0 ), - 'BETADIST' => array( 270, -1, 1, 0 ), - 'GAMMALN' => array( 271, 1, 1, 0 ), - 'BETAINV' => array( 272, -1, 1, 0 ), - 'BINOMDIST' => array( 273, 4, 1, 0 ), - 'CHIDIST' => array( 274, 2, 1, 0 ), - 'CHIINV' => array( 275, 2, 1, 0 ), - 'COMBIN' => array( 276, 2, 1, 0 ), - 'CONFIDENCE' => array( 277, 3, 1, 0 ), - 'CRITBINOM' => array( 278, 3, 1, 0 ), - 'EVEN' => array( 279, 1, 1, 0 ), - 'EXPONDIST' => array( 280, 3, 1, 0 ), - 'FDIST' => array( 281, 3, 1, 0 ), - 'FINV' => array( 282, 3, 1, 0 ), - 'FISHER' => array( 283, 1, 1, 0 ), - 'FISHERINV' => array( 284, 1, 1, 0 ), - 'FLOOR' => array( 285, 2, 1, 0 ), - 'GAMMADIST' => array( 286, 4, 1, 0 ), - 'GAMMAINV' => array( 287, 3, 1, 0 ), - 'CEILING' => array( 288, 2, 1, 0 ), - 'HYPGEOMDIST' => array( 289, 4, 1, 0 ), - 'LOGNORMDIST' => array( 290, 3, 1, 0 ), - 'LOGINV' => array( 291, 3, 1, 0 ), - 'NEGBINOMDIST' => array( 292, 3, 1, 0 ), - 'NORMDIST' => array( 293, 4, 1, 0 ), - 'NORMSDIST' => array( 294, 1, 1, 0 ), - 'NORMINV' => array( 295, 3, 1, 0 ), - 'NORMSINV' => array( 296, 1, 1, 0 ), - 'STANDARDIZE' => array( 297, 3, 1, 0 ), - 'ODD' => array( 298, 1, 1, 0 ), - 'PERMUT' => array( 299, 2, 1, 0 ), - 'POISSON' => array( 300, 3, 1, 0 ), - 'TDIST' => array( 301, 3, 1, 0 ), - 'WEIBULL' => array( 302, 4, 1, 0 ), - 'SUMXMY2' => array( 303, 2, 2, 0 ), - 'SUMX2MY2' => array( 304, 2, 2, 0 ), - 'SUMX2PY2' => array( 305, 2, 2, 0 ), - 'CHITEST' => array( 306, 2, 2, 0 ), - 'CORREL' => array( 307, 2, 2, 0 ), - 'COVAR' => array( 308, 2, 2, 0 ), - 'FORECAST' => array( 309, 3, 2, 0 ), - 'FTEST' => array( 310, 2, 2, 0 ), - 'INTERCEPT' => array( 311, 2, 2, 0 ), - 'PEARSON' => array( 312, 2, 2, 0 ), - 'RSQ' => array( 313, 2, 2, 0 ), - 'STEYX' => array( 314, 2, 2, 0 ), - 'SLOPE' => array( 315, 2, 2, 0 ), - 'TTEST' => array( 316, 4, 2, 0 ), - 'PROB' => array( 317, -1, 2, 0 ), - 'DEVSQ' => array( 318, -1, 0, 0 ), - 'GEOMEAN' => array( 319, -1, 0, 0 ), - 'HARMEAN' => array( 320, -1, 0, 0 ), - 'SUMSQ' => array( 321, -1, 0, 0 ), - 'KURT' => array( 322, -1, 0, 0 ), - 'SKEW' => array( 323, -1, 0, 0 ), - 'ZTEST' => array( 324, -1, 0, 0 ), - 'LARGE' => array( 325, 2, 0, 0 ), - 'SMALL' => array( 326, 2, 0, 0 ), - 'QUARTILE' => array( 327, 2, 0, 0 ), - 'PERCENTILE' => array( 328, 2, 0, 0 ), - 'PERCENTRANK' => array( 329, -1, 0, 0 ), - 'MODE' => array( 330, -1, 2, 0 ), - 'TRIMMEAN' => array( 331, 2, 0, 0 ), - 'TINV' => array( 332, 2, 1, 0 ), - 'CONCATENATE' => array( 336, -1, 1, 0 ), - 'POWER' => array( 337, 2, 1, 0 ), - 'RADIANS' => array( 342, 1, 1, 0 ), - 'DEGREES' => array( 343, 1, 1, 0 ), - 'SUBTOTAL' => array( 344, -1, 0, 0 ), - 'SUMIF' => array( 345, -1, 0, 0 ), - 'COUNTIF' => array( 346, 2, 0, 0 ), - 'COUNTBLANK' => array( 347, 1, 0, 0 ), - 'ISPMT' => array( 350, 4, 1, 0 ), - 'DATEDIF' => array( 351, 3, 1, 0 ), - 'DATESTRING' => array( 352, 1, 1, 0 ), - 'NUMBERSTRING' => array( 353, 2, 1, 0 ), - 'ROMAN' => array( 354, -1, 1, 0 ), - 'GETPIVOTDATA' => array( 358, -1, 0, 0 ), - 'HYPERLINK' => array( 359, -1, 1, 0 ), - 'PHONETIC' => array( 360, 1, 0, 0 ), - 'AVERAGEA' => array( 361, -1, 0, 0 ), - 'MAXA' => array( 362, -1, 0, 0 ), - 'MINA' => array( 363, -1, 0, 0 ), - 'STDEVPA' => array( 364, -1, 0, 0 ), - 'VARPA' => array( 365, -1, 0, 0 ), - 'STDEVA' => array( 366, -1, 0, 0 ), - 'VARA' => array( 367, -1, 0, 0 ), - 'BAHTTEXT' => array( 368, 1, 0, 0 ), - ); - } - - /** - * Convert a token to the proper ptg value. - * - * @access private - * @param mixed $token The token to convert. - * @return mixed the converted token on success - */ - private function convert($token) - { - if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $token)) { - return $this->convertString($token); - - } elseif (is_numeric($token)) { - return $this->convertNumber($token); - - // match references like A1 or $A$1 - } elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/', $token)) { - return $this->convertRef2d($token); - - // match external references like Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1 - } elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u", $token)) { - return $this->convertRef3d($token); - - // match external references like 'Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1 - } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?(\d+)$/u", $token)) { - return $this->convertRef3d($token); - - // match ranges like A1:B2 or $A$1:$B$2 - } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)\:(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $token)) { - return $this->convertRange2d($token); - - // match external ranges like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2 - } elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)$/u", $token)) { - return $this->convertRange3d($token); - - // match external ranges like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 - } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)\:\\$?([A-Ia-i]?[A-Za-z])?\\$?(\d+)$/u", $token)) { - return $this->convertRange3d($token); - - // operators (including parentheses) - } elseif (isset($this->ptg[$token])) { - return pack("C", $this->ptg[$token]); - - // match error codes - } elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $token) or $token == '#N/A') { - return $this->convertError($token); - - // commented so argument number can be processed correctly. See toReversePolish(). - /*elseif (preg_match("/[A-Z0-9\xc0-\xdc\.]+/", $token)) - { - return($this->convertFunction($token, $this->_func_args)); - }*/ - - // if it's an argument, ignore the token (the argument remains) - } elseif ($token == 'arg') { - return ''; - } - - // TODO: use real error codes - throw new PHPExcel_Writer_Exception("Unknown token $token"); - } - - /** - * Convert a number token to ptgInt or ptgNum - * - * @access private - * @param mixed $num an integer or double for conversion to its ptg value - */ - private function convertNumber($num) - { - // Integer in the range 0..2**16-1 - if ((preg_match("/^\d+$/", $num)) and ($num <= 65535)) { - return pack("Cv", $this->ptg['ptgInt'], $num); - } else { // A float - if (PHPExcel_Writer_Excel5_BIFFwriter::getByteOrder()) { // if it's Big Endian - $num = strrev($num); - } - return pack("Cd", $this->ptg['ptgNum'], $num); - } - } - - /** - * Convert a string token to ptgStr - * - * @access private - * @param string $string A string for conversion to its ptg value. - * @return mixed the converted token on success - */ - private function convertString($string) - { - // chop away beggining and ending quotes - $string = substr($string, 1, strlen($string) - 2); - if (strlen($string) > 255) { - throw new PHPExcel_Writer_Exception("String is too long"); - } - - return pack('C', $this->ptg['ptgStr']) . PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($string); - } - - /** - * Convert a function to a ptgFunc or ptgFuncVarV depending on the number of - * args that it takes. - * - * @access private - * @param string $token The name of the function for convertion to ptg value. - * @param integer $num_args The number of arguments the function receives. - * @return string The packed ptg for the function - */ - private function convertFunction($token, $num_args) - { - $args = $this->functions[$token][1]; -// $volatile = $this->functions[$token][3]; - - // Fixed number of args eg. TIME($i, $j, $k). - if ($args >= 0) { - return pack("Cv", $this->ptg['ptgFuncV'], $this->functions[$token][0]); - } - // Variable number of args eg. SUM($i, $j, $k, ..). - if ($args == -1) { - return pack("CCv", $this->ptg['ptgFuncVarV'], $num_args, $this->functions[$token][0]); - } - } - - /** - * Convert an Excel range such as A1:D4 to a ptgRefV. - * - * @access private - * @param string $range An Excel range in the A1:A2 - * @param int $class - */ - private function convertRange2d($range, $class = 0) - { - - // TODO: possible class value 0,1,2 check Formula.pm - // Split the range into 2 cell refs - if (preg_match('/^(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)\:(\$)?([A-Ia-i]?[A-Za-z])(\$)?(\d+)$/', $range)) { - list($cell1, $cell2) = explode(':', $range); - } else { - // TODO: use real error codes - throw new PHPExcel_Writer_Exception("Unknown range separator"); - } - - // Convert the cell references - list($row1, $col1) = $this->cellToPackedRowcol($cell1); - list($row2, $col2) = $this->cellToPackedRowcol($cell2); - - // The ptg value depends on the class of the ptg. - if ($class == 0) { - $ptgArea = pack("C", $this->ptg['ptgArea']); - } elseif ($class == 1) { - $ptgArea = pack("C", $this->ptg['ptgAreaV']); - } elseif ($class == 2) { - $ptgArea = pack("C", $this->ptg['ptgAreaA']); - } else { - // TODO: use real error codes - throw new PHPExcel_Writer_Exception("Unknown class $class"); - } - return $ptgArea . $row1 . $row2 . $col1. $col2; - } - - /** - * Convert an Excel 3d range such as "Sheet1!A1:D4" or "Sheet1:Sheet2!A1:D4" to - * a ptgArea3d. - * - * @access private - * @param string $token An Excel range in the Sheet1!A1:A2 format. - * @return mixed The packed ptgArea3d token on success. - */ - private function convertRange3d($token) - { -// $class = 0; // formulas like Sheet1!$A$1:$A$2 in list type data validation need this class (0x3B) - - // Split the ref at the ! symbol - list($ext_ref, $range) = explode('!', $token); - - // Convert the external reference part (different for BIFF8) - $ext_ref = $this->getRefIndex($ext_ref); - - // Split the range into 2 cell refs - list($cell1, $cell2) = explode(':', $range); - - // Convert the cell references - if (preg_match("/^(\\$)?[A-Ia-i]?[A-Za-z](\\$)?(\d+)$/", $cell1)) { - list($row1, $col1) = $this->cellToPackedRowcol($cell1); - list($row2, $col2) = $this->cellToPackedRowcol($cell2); - } else { // It's a rows range (like 26:27) - list($row1, $col1, $row2, $col2) = $this->rangeToPackedRange($cell1.':'.$cell2); - } - - // The ptg value depends on the class of the ptg. -// if ($class == 0) { - $ptgArea = pack("C", $this->ptg['ptgArea3d']); -// } elseif ($class == 1) { -// $ptgArea = pack("C", $this->ptg['ptgArea3dV']); -// } elseif ($class == 2) { -// $ptgArea = pack("C", $this->ptg['ptgArea3dA']); -// } else { -// throw new PHPExcel_Writer_Exception("Unknown class $class"); -// } - - return $ptgArea . $ext_ref . $row1 . $row2 . $col1. $col2; - } - - /** - * Convert an Excel reference such as A1, $B2, C$3 or $D$4 to a ptgRefV. - * - * @access private - * @param string $cell An Excel cell reference - * @return string The cell in packed() format with the corresponding ptg - */ - private function convertRef2d($cell) - { -// $class = 2; // as far as I know, this is magick. - - // Convert the cell reference - $cell_array = $this->cellToPackedRowcol($cell); - list($row, $col) = $cell_array; - - // The ptg value depends on the class of the ptg. -// if ($class == 0) { -// $ptgRef = pack("C", $this->ptg['ptgRef']); -// } elseif ($class == 1) { -// $ptgRef = pack("C", $this->ptg['ptgRefV']); -// } elseif ($class == 2) { - $ptgRef = pack("C", $this->ptg['ptgRefA']); -// } else { -// // TODO: use real error codes -// throw new PHPExcel_Writer_Exception("Unknown class $class"); -// } - return $ptgRef.$row.$col; - } - - /** - * Convert an Excel 3d reference such as "Sheet1!A1" or "Sheet1:Sheet2!A1" to a - * ptgRef3d. - * - * @access private - * @param string $cell An Excel cell reference - * @return mixed The packed ptgRef3d token on success. - */ - private function convertRef3d($cell) - { -// $class = 2; // as far as I know, this is magick. - - // Split the ref at the ! symbol - list($ext_ref, $cell) = explode('!', $cell); - - // Convert the external reference part (different for BIFF8) - $ext_ref = $this->getRefIndex($ext_ref); - - // Convert the cell reference part - list($row, $col) = $this->cellToPackedRowcol($cell); - - // The ptg value depends on the class of the ptg. -// if ($class == 0) { -// $ptgRef = pack("C", $this->ptg['ptgRef3d']); -// } elseif ($class == 1) { -// $ptgRef = pack("C", $this->ptg['ptgRef3dV']); -// } elseif ($class == 2) { - $ptgRef = pack("C", $this->ptg['ptgRef3dA']); -// } else { -// throw new PHPExcel_Writer_Exception("Unknown class $class"); -// } - - return $ptgRef . $ext_ref. $row . $col; - } - - /** - * Convert an error code to a ptgErr - * - * @access private - * @param string $errorCode The error code for conversion to its ptg value - * @return string The error code ptgErr - */ - private function convertError($errorCode) - { - switch ($errorCode) { - case '#NULL!': - return pack("C", 0x00); - case '#DIV/0!': - return pack("C", 0x07); - case '#VALUE!': - return pack("C", 0x0F); - case '#REF!': - return pack("C", 0x17); - case '#NAME?': - return pack("C", 0x1D); - case '#NUM!': - return pack("C", 0x24); - case '#N/A': - return pack("C", 0x2A); - } - return pack("C", 0xFF); - } - - /** - * Convert the sheet name part of an external reference, for example "Sheet1" or - * "Sheet1:Sheet2", to a packed structure. - * - * @access private - * @param string $ext_ref The name of the external reference - * @return string The reference index in packed() format - */ - private function packExtRef($ext_ref) - { - $ext_ref = preg_replace("/^'/", '', $ext_ref); // Remove leading ' if any. - $ext_ref = preg_replace("/'$/", '', $ext_ref); // Remove trailing ' if any. - - // Check if there is a sheet range eg., Sheet1:Sheet2. - if (preg_match("/:/", $ext_ref)) { - list($sheet_name1, $sheet_name2) = explode(':', $ext_ref); - - $sheet1 = $this->getSheetIndex($sheet_name1); - if ($sheet1 == -1) { - throw new PHPExcel_Writer_Exception("Unknown sheet name $sheet_name1 in formula"); - } - $sheet2 = $this->getSheetIndex($sheet_name2); - if ($sheet2 == -1) { - throw new PHPExcel_Writer_Exception("Unknown sheet name $sheet_name2 in formula"); - } - - // Reverse max and min sheet numbers if necessary - if ($sheet1 > $sheet2) { - list($sheet1, $sheet2) = array($sheet2, $sheet1); - } - } else { // Single sheet name only. - $sheet1 = $this->getSheetIndex($ext_ref); - if ($sheet1 == -1) { - throw new PHPExcel_Writer_Exception("Unknown sheet name $ext_ref in formula"); - } - $sheet2 = $sheet1; - } - - // References are stored relative to 0xFFFF. - $offset = -1 - $sheet1; - - return pack('vdvv', $offset, 0x00, $sheet1, $sheet2); - } - - /** - * Look up the REF index that corresponds to an external sheet name - * (or range). If it doesn't exist yet add it to the workbook's references - * array. It assumes all sheet names given must exist. - * - * @access private - * @param string $ext_ref The name of the external reference - * @return mixed The reference index in packed() format on success - */ - private function getRefIndex($ext_ref) - { - $ext_ref = preg_replace("/^'/", '', $ext_ref); // Remove leading ' if any. - $ext_ref = preg_replace("/'$/", '', $ext_ref); // Remove trailing ' if any. - $ext_ref = str_replace('\'\'', '\'', $ext_ref); // Replace escaped '' with ' - - // Check if there is a sheet range eg., Sheet1:Sheet2. - if (preg_match("/:/", $ext_ref)) { - list($sheet_name1, $sheet_name2) = explode(':', $ext_ref); - - $sheet1 = $this->getSheetIndex($sheet_name1); - if ($sheet1 == -1) { - throw new PHPExcel_Writer_Exception("Unknown sheet name $sheet_name1 in formula"); - } - $sheet2 = $this->getSheetIndex($sheet_name2); - if ($sheet2 == -1) { - throw new PHPExcel_Writer_Exception("Unknown sheet name $sheet_name2 in formula"); - } - - // Reverse max and min sheet numbers if necessary - if ($sheet1 > $sheet2) { - list($sheet1, $sheet2) = array($sheet2, $sheet1); - } - } else { // Single sheet name only. - $sheet1 = $this->getSheetIndex($ext_ref); - if ($sheet1 == -1) { - throw new PHPExcel_Writer_Exception("Unknown sheet name $ext_ref in formula"); - } - $sheet2 = $sheet1; - } - - // assume all references belong to this document - $supbook_index = 0x00; - $ref = pack('vvv', $supbook_index, $sheet1, $sheet2); - $totalreferences = count($this->references); - $index = -1; - for ($i = 0; $i < $totalreferences; ++$i) { - if ($ref == $this->references[$i]) { - $index = $i; - break; - } - } - // if REF was not found add it to references array - if ($index == -1) { - $this->references[$totalreferences] = $ref; - $index = $totalreferences; - } - - return pack('v', $index); - } - - /** - * Look up the index that corresponds to an external sheet name. The hash of - * sheet names is updated by the addworksheet() method of the - * PHPExcel_Writer_Excel5_Workbook class. - * - * @access private - * @param string $sheet_name Sheet name - * @return integer The sheet index, -1 if the sheet was not found - */ - private function getSheetIndex($sheet_name) - { - if (!isset($this->externalSheets[$sheet_name])) { - return -1; - } else { - return $this->externalSheets[$sheet_name]; - } - } - - /** - * This method is used to update the array of sheet names. It is - * called by the addWorksheet() method of the - * PHPExcel_Writer_Excel5_Workbook class. - * - * @access public - * @see PHPExcel_Writer_Excel5_Workbook::addWorksheet() - * @param string $name The name of the worksheet being added - * @param integer $index The index of the worksheet being added - */ - public function setExtSheet($name, $index) - { - $this->externalSheets[$name] = $index; - } - - /** - * pack() row and column into the required 3 or 4 byte format. - * - * @access private - * @param string $cell The Excel cell reference to be packed - * @return array Array containing the row and column in packed() format - */ - private function cellToPackedRowcol($cell) - { - $cell = strtoupper($cell); - list($row, $col, $row_rel, $col_rel) = $this->cellToRowcol($cell); - if ($col >= 256) { - throw new PHPExcel_Writer_Exception("Column in: $cell greater than 255"); - } - if ($row >= 65536) { - throw new PHPExcel_Writer_Exception("Row in: $cell greater than 65536 "); - } - - // Set the high bits to indicate if row or col are relative. - $col |= $col_rel << 14; - $col |= $row_rel << 15; - $col = pack('v', $col); - - $row = pack('v', $row); - - return array($row, $col); - } - - /** - * pack() row range into the required 3 or 4 byte format. - * Just using maximum col/rows, which is probably not the correct solution - * - * @access private - * @param string $range The Excel range to be packed - * @return array Array containing (row1,col1,row2,col2) in packed() format - */ - private function rangeToPackedRange($range) - { - preg_match('/(\$)?(\d+)\:(\$)?(\d+)/', $range, $match); - // return absolute rows if there is a $ in the ref - $row1_rel = empty($match[1]) ? 1 : 0; - $row1 = $match[2]; - $row2_rel = empty($match[3]) ? 1 : 0; - $row2 = $match[4]; - // Convert 1-index to zero-index - --$row1; - --$row2; - // Trick poor inocent Excel - $col1 = 0; - $col2 = 65535; // FIXME: maximum possible value for Excel 5 (change this!!!) - - // FIXME: this changes for BIFF8 - if (($row1 >= 65536) or ($row2 >= 65536)) { - throw new PHPExcel_Writer_Exception("Row in: $range greater than 65536 "); - } - - // Set the high bits to indicate if rows are relative. - $col1 |= $row1_rel << 15; - $col2 |= $row2_rel << 15; - $col1 = pack('v', $col1); - $col2 = pack('v', $col2); - - $row1 = pack('v', $row1); - $row2 = pack('v', $row2); - - return array($row1, $col1, $row2, $col2); - } - - /** - * Convert an Excel cell reference such as A1 or $B2 or C$3 or $D$4 to a zero - * indexed row and column number. Also returns two (0,1) values to indicate - * whether the row or column are relative references. - * - * @access private - * @param string $cell The Excel cell reference in A1 format. - * @return array - */ - private function cellToRowcol($cell) - { - preg_match('/(\$)?([A-I]?[A-Z])(\$)?(\d+)/', $cell, $match); - // return absolute column if there is a $ in the ref - $col_rel = empty($match[1]) ? 1 : 0; - $col_ref = $match[2]; - $row_rel = empty($match[3]) ? 1 : 0; - $row = $match[4]; - - // Convert base26 column string to a number. - $expn = strlen($col_ref) - 1; - $col = 0; - $col_ref_length = strlen($col_ref); - for ($i = 0; $i < $col_ref_length; ++$i) { - $col += (ord($col_ref{$i}) - 64) * pow(26, $expn); - --$expn; - } - - // Convert 1-index to zero-index - --$row; - --$col; - - return array($row, $col, $row_rel, $col_rel); - } - - /** - * Advance to the next valid token. - * - * @access private - */ - private function advance() - { - $i = $this->currentCharacter; - $formula_length = strlen($this->formula); - // eat up white spaces - if ($i < $formula_length) { - while ($this->formula{$i} == " ") { - ++$i; - } - - if ($i < ($formula_length - 1)) { - $this->lookAhead = $this->formula{$i+1}; - } - $token = ''; - } - - while ($i < $formula_length) { - $token .= $this->formula{$i}; - - if ($i < ($formula_length - 1)) { - $this->lookAhead = $this->formula{$i+1}; - } else { - $this->lookAhead = ''; - } - - if ($this->match($token) != '') { - //if ($i < strlen($this->formula) - 1) { - // $this->lookAhead = $this->formula{$i+1}; - //} - $this->currentCharacter = $i + 1; - $this->currentToken = $token; - return 1; - } - - if ($i < ($formula_length - 2)) { - $this->lookAhead = $this->formula{$i+2}; - } else { // if we run out of characters lookAhead becomes empty - $this->lookAhead = ''; - } - ++$i; - } - //die("Lexical error ".$this->currentCharacter); - } - - /** - * Checks if it's a valid token. - * - * @access private - * @param mixed $token The token to check. - * @return mixed The checked token or false on failure - */ - private function match($token) - { - switch ($token) { - case "+": - case "-": - case "*": - case "/": - case "(": - case ")": - case ",": - case ";": - case ">=": - case "<=": - case "=": - case "<>": - case "^": - case "&": - case "%": - return $token; - break; - case ">": - if ($this->lookAhead == '=') { // it's a GE token - break; - } - return $token; - break; - case "<": - // it's a LE or a NE token - if (($this->lookAhead == '=') or ($this->lookAhead == '>')) { - break; - } - return $token; - break; - default: - // if it's a reference A1 or $A$1 or $A1 or A$1 - if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/', $token) and !preg_match("/[0-9]/", $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.') and ($this->lookAhead != '!')) { - return $token; - } elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $token) and !preg_match("/[0-9]/", $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.')) { - // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) - return $token; - } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $token) and !preg_match("/[0-9]/", $this->lookAhead) and ($this->lookAhead != ':') and ($this->lookAhead != '.')) { - // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) - return $token; - } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+:(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/', $token) && !preg_match("/[0-9]/", $this->lookAhead)) { - // if it's a range A1:A2 or $A$1:$A$2 - return $token; - } elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $token) and !preg_match("/[0-9]/", $this->lookAhead)) { - // If it's an external range like Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2 - return $token; - } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $token) and !preg_match("/[0-9]/", $this->lookAhead)) { - // If it's an external range like 'Sheet1'!A1:B2 or 'Sheet1:Sheet2'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1:Sheet2'!$A$1:$B$2 - return $token; - } elseif (is_numeric($token) and (!is_numeric($token.$this->lookAhead) or ($this->lookAhead == '')) and ($this->lookAhead != '!') and ($this->lookAhead != ':')) { - // If it's a number (check that it's not a sheet name or range) - return $token; - } elseif (preg_match("/\"([^\"]|\"\"){0,255}\"/", $token) and $this->lookAhead != '"' and (substr_count($token, '"')%2 == 0)) { - // If it's a string (of maximum 255 characters) - return $token; - } elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $token) or $token == '#N/A') { - // If it's an error code - return $token; - } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i", $token) and ($this->lookAhead == "(")) { - // if it's a function call - return $token; - } elseif (substr($token, -1) == ')') { - // It's an argument of some description (e.g. a named range), - // precise nature yet to be determined - return $token; - } - return ''; - } - } - - /** - * The parsing method. It parses a formula. - * - * @access public - * @param string $formula The formula to parse, without the initial equal - * sign (=). - * @return mixed true on success - */ - public function parse($formula) - { - $this->currentCharacter = 0; - $this->formula = $formula; - $this->lookAhead = isset($formula{1}) ? $formula{1} : ''; - $this->advance(); - $this->parseTree = $this->condition(); - return true; - } - - /** - * It parses a condition. It assumes the following rule: - * Cond -> Expr [(">" | "<") Expr] - * - * @access private - * @return mixed The parsed ptg'd tree on success - */ - private function condition() - { - $result = $this->expression(); - if ($this->currentToken == "<") { - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgLT', $result, $result2); - } elseif ($this->currentToken == ">") { - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgGT', $result, $result2); - } elseif ($this->currentToken == "<=") { - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgLE', $result, $result2); - } elseif ($this->currentToken == ">=") { - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgGE', $result, $result2); - } elseif ($this->currentToken == "=") { - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgEQ', $result, $result2); - } elseif ($this->currentToken == "<>") { - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgNE', $result, $result2); - } elseif ($this->currentToken == "&") { - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgConcat', $result, $result2); - } - return $result; - } - - /** - * It parses a expression. It assumes the following rule: - * Expr -> Term [("+" | "-") Term] - * -> "string" - * -> "-" Term : Negative value - * -> "+" Term : Positive value - * -> Error code - * - * @access private - * @return mixed The parsed ptg'd tree on success - */ - private function expression() - { - // If it's a string return a string node - if (preg_match("/\"([^\"]|\"\"){0,255}\"/", $this->currentToken)) { - $tmp = str_replace('""', '"', $this->currentToken); - if (($tmp == '"') || ($tmp == '')) { - // Trap for "" that has been used for an empty string - $tmp = '""'; - } - $result = $this->createTree($tmp, '', ''); - $this->advance(); - return $result; - // If it's an error code - } elseif (preg_match("/^#[A-Z0\/]{3,5}[!?]{1}$/", $this->currentToken) or $this->currentToken == '#N/A') { - $result = $this->createTree($this->currentToken, 'ptgErr', ''); - $this->advance(); - return $result; - // If it's a negative value - } elseif ($this->currentToken == "-") { - // catch "-" Term - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgUminus', $result2, ''); - return $result; - // If it's a positive value - } elseif ($this->currentToken == "+") { - // catch "+" Term - $this->advance(); - $result2 = $this->expression(); - $result = $this->createTree('ptgUplus', $result2, ''); - return $result; - } - $result = $this->term(); - while (($this->currentToken == "+") or - ($this->currentToken == "-") or - ($this->currentToken == "^")) { - /**/ - if ($this->currentToken == "+") { - $this->advance(); - $result2 = $this->term(); - $result = $this->createTree('ptgAdd', $result, $result2); - } elseif ($this->currentToken == "-") { - $this->advance(); - $result2 = $this->term(); - $result = $this->createTree('ptgSub', $result, $result2); - } else { - $this->advance(); - $result2 = $this->term(); - $result = $this->createTree('ptgPower', $result, $result2); - } - } - return $result; - } - - /** - * This function just introduces a ptgParen element in the tree, so that Excel - * doesn't get confused when working with a parenthesized formula afterwards. - * - * @access private - * @see fact() - * @return array The parsed ptg'd tree - */ - private function parenthesizedExpression() - { - $result = $this->createTree('ptgParen', $this->expression(), ''); - return $result; - } - - /** - * It parses a term. It assumes the following rule: - * Term -> Fact [("*" | "/") Fact] - * - * @access private - * @return mixed The parsed ptg'd tree on success - */ - private function term() - { - $result = $this->fact(); - while (($this->currentToken == "*") or - ($this->currentToken == "/")) { - /**/ - if ($this->currentToken == "*") { - $this->advance(); - $result2 = $this->fact(); - $result = $this->createTree('ptgMul', $result, $result2); - } else { - $this->advance(); - $result2 = $this->fact(); - $result = $this->createTree('ptgDiv', $result, $result2); - } - } - return $result; - } - - /** - * It parses a factor. It assumes the following rule: - * Fact -> ( Expr ) - * | CellRef - * | CellRange - * | Number - * | Function - * - * @access private - * @return mixed The parsed ptg'd tree on success - */ - private function fact() - { - if ($this->currentToken == "(") { - $this->advance(); // eat the "(" - $result = $this->parenthesizedExpression(); - if ($this->currentToken != ")") { - throw new PHPExcel_Writer_Exception("')' token expected."); - } - $this->advance(); // eat the ")" - return $result; - } - // if it's a reference - if (preg_match('/^\$?[A-Ia-i]?[A-Za-z]\$?[0-9]+$/', $this->currentToken)) { - $result = $this->createTree($this->currentToken, '', ''); - $this->advance(); - return $result; - } elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $this->currentToken)) { - // If it's an external reference (Sheet1!A1 or Sheet1:Sheet2!A1 or Sheet1!$A$1 or Sheet1:Sheet2!$A$1) - $result = $this->createTree($this->currentToken, '', ''); - $this->advance(); - return $result; - } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?[A-Ia-i]?[A-Za-z]\\$?[0-9]+$/u", $this->currentToken)) { - // If it's an external reference ('Sheet1'!A1 or 'Sheet1:Sheet2'!A1 or 'Sheet1'!$A$1 or 'Sheet1:Sheet2'!$A$1) - $result = $this->createTree($this->currentToken, '', ''); - $this->advance(); - return $result; - } elseif (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+:(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/', $this->currentToken) or - preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+\.\.(\$)?[A-Ia-i]?[A-Za-z](\$)?[0-9]+$/', $this->currentToken)) { - // if it's a range A1:B2 or $A$1:$B$2 - // must be an error? - $result = $this->createTree($this->currentToken, '', ''); - $this->advance(); - return $result; - } elseif (preg_match("/^" . self::REGEX_SHEET_TITLE_UNQUOTED . "(\:" . self::REGEX_SHEET_TITLE_UNQUOTED . ")?\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $this->currentToken)) { - // If it's an external range (Sheet1!A1:B2 or Sheet1:Sheet2!A1:B2 or Sheet1!$A$1:$B$2 or Sheet1:Sheet2!$A$1:$B$2) - // must be an error? - //$result = $this->currentToken; - $result = $this->createTree($this->currentToken, '', ''); - $this->advance(); - return $result; - } elseif (preg_match("/^'" . self::REGEX_SHEET_TITLE_QUOTED . "(\:" . self::REGEX_SHEET_TITLE_QUOTED . ")?'\!\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+:\\$?([A-Ia-i]?[A-Za-z])?\\$?[0-9]+$/u", $this->currentToken)) { - // If it's an external range ('Sheet1'!A1:B2 or 'Sheet1'!A1:B2 or 'Sheet1'!$A$1:$B$2 or 'Sheet1'!$A$1:$B$2) - // must be an error? - //$result = $this->currentToken; - $result = $this->createTree($this->currentToken, '', ''); - $this->advance(); - return $result; - } elseif (is_numeric($this->currentToken)) { - // If it's a number or a percent - if ($this->lookAhead == '%') { - $result = $this->createTree('ptgPercent', $this->currentToken, ''); - $this->advance(); // Skip the percentage operator once we've pre-built that tree - } else { - $result = $this->createTree($this->currentToken, '', ''); - } - $this->advance(); - return $result; - } elseif (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/i", $this->currentToken)) { - // if it's a function call - $result = $this->func(); - return $result; - } - throw new PHPExcel_Writer_Exception("Syntax error: ".$this->currentToken.", lookahead: ".$this->lookAhead.", current char: ".$this->currentCharacter); - } - - /** - * It parses a function call. It assumes the following rule: - * Func -> ( Expr [,Expr]* ) - * - * @access private - * @return mixed The parsed ptg'd tree on success - */ - private function func() - { - $num_args = 0; // number of arguments received - $function = strtoupper($this->currentToken); - $result = ''; // initialize result - $this->advance(); - $this->advance(); // eat the "(" - while ($this->currentToken != ')') { - /**/ - if ($num_args > 0) { - if ($this->currentToken == "," || $this->currentToken == ";") { - $this->advance(); // eat the "," or ";" - } else { - throw new PHPExcel_Writer_Exception("Syntax error: comma expected in function $function, arg #{$num_args}"); - } - $result2 = $this->condition(); - $result = $this->createTree('arg', $result, $result2); - } else { // first argument - $result2 = $this->condition(); - $result = $this->createTree('arg', '', $result2); - } - ++$num_args; - } - if (!isset($this->functions[$function])) { - throw new PHPExcel_Writer_Exception("Function $function() doesn't exist"); - } - $args = $this->functions[$function][1]; - // If fixed number of args eg. TIME($i, $j, $k). Check that the number of args is valid. - if (($args >= 0) and ($args != $num_args)) { - throw new PHPExcel_Writer_Exception("Incorrect number of arguments in function $function() "); - } - - $result = $this->createTree($function, $result, $num_args); - $this->advance(); // eat the ")" - return $result; - } - - /** - * Creates a tree. In fact an array which may have one or two arrays (sub-trees) - * as elements. - * - * @access private - * @param mixed $value The value of this node. - * @param mixed $left The left array (sub-tree) or a final node. - * @param mixed $right The right array (sub-tree) or a final node. - * @return array A tree - */ - private function createTree($value, $left, $right) - { - return array('value' => $value, 'left' => $left, 'right' => $right); - } - - /** - * Builds a string containing the tree in reverse polish notation (What you - * would use in a HP calculator stack). - * The following tree: - * - * + - * / \ - * 2 3 - * - * produces: "23+" - * - * The following tree: - * - * + - * / \ - * 3 * - * / \ - * 6 A1 - * - * produces: "36A1*+" - * - * In fact all operands, functions, references, etc... are written as ptg's - * - * @access public - * @param array $tree The optional tree to convert. - * @return string The tree in reverse polish notation - */ - public function toReversePolish($tree = array()) - { - $polish = ""; // the string we are going to return - if (empty($tree)) { // If it's the first call use parseTree - $tree = $this->parseTree; - } - - if (is_array($tree['left'])) { - $converted_tree = $this->toReversePolish($tree['left']); - $polish .= $converted_tree; - } elseif ($tree['left'] != '') { // It's a final node - $converted_tree = $this->convert($tree['left']); - $polish .= $converted_tree; - } - if (is_array($tree['right'])) { - $converted_tree = $this->toReversePolish($tree['right']); - $polish .= $converted_tree; - } elseif ($tree['right'] != '') { // It's a final node - $converted_tree = $this->convert($tree['right']); - $polish .= $converted_tree; - } - // if it's a function convert it here (so we can set it's arguments) - if (preg_match("/^[A-Z0-9\xc0-\xdc\.]+$/", $tree['value']) and - !preg_match('/^([A-Ia-i]?[A-Za-z])(\d+)$/', $tree['value']) and - !preg_match("/^[A-Ia-i]?[A-Za-z](\d+)\.\.[A-Ia-i]?[A-Za-z](\d+)$/", $tree['value']) and - !is_numeric($tree['value']) and - !isset($this->ptg[$tree['value']])) { - // left subtree for a function is always an array. - if ($tree['left'] != '') { - $left_tree = $this->toReversePolish($tree['left']); - } else { - $left_tree = ''; - } - // add it's left subtree and return. - return $left_tree.$this->convertFunction($tree['value'], $tree['right']); - } else { - $converted_tree = $this->convert($tree['value']); - } - $polish .= $converted_tree; - return $polish; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Workbook.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Workbook.php deleted file mode 100644 index 8b06843..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Workbook.php +++ /dev/null @@ -1,1444 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel5_Workbook - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -// Original file header of PEAR::Spreadsheet_Excel_Writer_Workbook (used as the base for this class): -// ----------------------------------------------------------------------------------------- -// /* -// * Module written/ported by Xavier Noguer <xnoguer@rezebra.com> -// * -// * The majority of this is _NOT_ my code. I simply ported it from the -// * PERL Spreadsheet::WriteExcel module. -// * -// * The author of the Spreadsheet::WriteExcel module is John McNamara -// * <jmcnamara@cpan.org> -// * -// * I _DO_ maintain this code, and John McNamara has nothing to do with the -// * porting of this code to PHP. Any questions directly related to this -// * class library should be directed to me. -// * -// * License Information: -// * -// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets -// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com -// * -// * This library is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public -// * License as published by the Free Software Foundation; either -// * version 2.1 of the License, or (at your option) any later version. -// * -// * This library is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// * Lesser General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public -// * License along with this library; if not, write to the Free Software -// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// */ -class PHPExcel_Writer_Excel5_Workbook extends PHPExcel_Writer_Excel5_BIFFwriter -{ - /** - * Formula parser - * - * @var PHPExcel_Writer_Excel5_Parser - */ - private $parser; - - /** - * The BIFF file size for the workbook. - * @var integer - * @see calcSheetOffsets() - */ - private $biffSize; - - /** - * XF Writers - * @var PHPExcel_Writer_Excel5_Xf[] - */ - private $xfWriters = array(); - - /** - * Array containing the colour palette - * @var array - */ - private $palette; - - /** - * The codepage indicates the text encoding used for strings - * @var integer - */ - private $codepage; - - /** - * The country code used for localization - * @var integer - */ - private $countryCode; - - /** - * Workbook - * @var PHPExcel - */ - private $phpExcel; - - /** - * Fonts writers - * - * @var PHPExcel_Writer_Excel5_Font[] - */ - private $fontWriters = array(); - - /** - * Added fonts. Maps from font's hash => index in workbook - * - * @var array - */ - private $addedFonts = array(); - - /** - * Shared number formats - * - * @var array - */ - private $numberFormats = array(); - - /** - * Added number formats. Maps from numberFormat's hash => index in workbook - * - * @var array - */ - private $addedNumberFormats = array(); - - /** - * Sizes of the binary worksheet streams - * - * @var array - */ - private $worksheetSizes = array(); - - /** - * Offsets of the binary worksheet streams relative to the start of the global workbook stream - * - * @var array - */ - private $worksheetOffsets = array(); - - /** - * Total number of shared strings in workbook - * - * @var int - */ - private $stringTotal; - - /** - * Number of unique shared strings in workbook - * - * @var int - */ - private $stringUnique; - - /** - * Array of unique shared strings in workbook - * - * @var array - */ - private $stringTable; - - /** - * Color cache - */ - private $colors; - - /** - * Escher object corresponding to MSODRAWINGGROUP - * - * @var PHPExcel_Shared_Escher - */ - private $escher; - - - /** - * Class constructor - * - * @param PHPExcel $phpExcel The Workbook - * @param int &$str_total Total number of strings - * @param int &$str_unique Total number of unique strings - * @param array &$str_table String Table - * @param array &$colors Colour Table - * @param mixed $parser The formula parser created for the Workbook - */ - public function __construct(PHPExcel $phpExcel = null, &$str_total, &$str_unique, &$str_table, &$colors, $parser) - { - // It needs to call its parent's constructor explicitly - parent::__construct(); - - $this->parser = $parser; - $this->biffSize = 0; - $this->palette = array(); - $this->countryCode = -1; - - $this->stringTotal = &$str_total; - $this->stringUnique = &$str_unique; - $this->stringTable = &$str_table; - $this->colors = &$colors; - $this->setPaletteXl97(); - - $this->phpExcel = $phpExcel; - - // set BIFFwriter limit for CONTINUE records - // $this->_limit = 8224; - $this->codepage = 0x04B0; - - // Add empty sheets and Build color cache - $countSheets = $phpExcel->getSheetCount(); - for ($i = 0; $i < $countSheets; ++$i) { - $phpSheet = $phpExcel->getSheet($i); - - $this->parser->setExtSheet($phpSheet->getTitle(), $i); // Register worksheet name with parser - - $supbook_index = 0x00; - $ref = pack('vvv', $supbook_index, $i, $i); - $this->parser->references[] = $ref; // Register reference with parser - - // Sheet tab colors? - if ($phpSheet->isTabColorSet()) { - $this->addColor($phpSheet->getTabColor()->getRGB()); - } - } - - } - - /** - * Add a new XF writer - * - * @param PHPExcel_Style - * @param boolean Is it a style XF? - * @return int Index to XF record - */ - public function addXfWriter($style, $isStyleXf = false) - { - $xfWriter = new PHPExcel_Writer_Excel5_Xf($style); - $xfWriter->setIsStyleXf($isStyleXf); - - // Add the font if not already added - $fontIndex = $this->addFont($style->getFont()); - - // Assign the font index to the xf record - $xfWriter->setFontIndex($fontIndex); - - // Background colors, best to treat these after the font so black will come after white in custom palette - $xfWriter->setFgColor($this->addColor($style->getFill()->getStartColor()->getRGB())); - $xfWriter->setBgColor($this->addColor($style->getFill()->getEndColor()->getRGB())); - $xfWriter->setBottomColor($this->addColor($style->getBorders()->getBottom()->getColor()->getRGB())); - $xfWriter->setTopColor($this->addColor($style->getBorders()->getTop()->getColor()->getRGB())); - $xfWriter->setRightColor($this->addColor($style->getBorders()->getRight()->getColor()->getRGB())); - $xfWriter->setLeftColor($this->addColor($style->getBorders()->getLeft()->getColor()->getRGB())); - $xfWriter->setDiagColor($this->addColor($style->getBorders()->getDiagonal()->getColor()->getRGB())); - - // Add the number format if it is not a built-in one and not already added - if ($style->getNumberFormat()->getBuiltInFormatCode() === false) { - $numberFormatHashCode = $style->getNumberFormat()->getHashCode(); - - if (isset($this->addedNumberFormats[$numberFormatHashCode])) { - $numberFormatIndex = $this->addedNumberFormats[$numberFormatHashCode]; - } else { - $numberFormatIndex = 164 + count($this->numberFormats); - $this->numberFormats[$numberFormatIndex] = $style->getNumberFormat(); - $this->addedNumberFormats[$numberFormatHashCode] = $numberFormatIndex; - } - } else { - $numberFormatIndex = (int) $style->getNumberFormat()->getBuiltInFormatCode(); - } - - // Assign the number format index to xf record - $xfWriter->setNumberFormatIndex($numberFormatIndex); - - $this->xfWriters[] = $xfWriter; - - $xfIndex = count($this->xfWriters) - 1; - return $xfIndex; - } - - /** - * Add a font to added fonts - * - * @param PHPExcel_Style_Font $font - * @return int Index to FONT record - */ - public function addFont(PHPExcel_Style_Font $font) - { - $fontHashCode = $font->getHashCode(); - if (isset($this->addedFonts[$fontHashCode])) { - $fontIndex = $this->addedFonts[$fontHashCode]; - } else { - $countFonts = count($this->fontWriters); - $fontIndex = ($countFonts < 4) ? $countFonts : $countFonts + 1; - - $fontWriter = new PHPExcel_Writer_Excel5_Font($font); - $fontWriter->setColorIndex($this->addColor($font->getColor()->getRGB())); - $this->fontWriters[] = $fontWriter; - - $this->addedFonts[$fontHashCode] = $fontIndex; - } - return $fontIndex; - } - - /** - * Alter color palette adding a custom color - * - * @param string $rgb E.g. 'FF00AA' - * @return int Color index - */ - private function addColor($rgb) - { - if (!isset($this->colors[$rgb])) { - if (count($this->colors) < 57) { - // then we add a custom color altering the palette - $colorIndex = 8 + count($this->colors); - $this->palette[$colorIndex] = - array( - hexdec(substr($rgb, 0, 2)), - hexdec(substr($rgb, 2, 2)), - hexdec(substr($rgb, 4)), - 0 - ); - $this->colors[$rgb] = $colorIndex; - } else { - // no room for more custom colors, just map to black - $colorIndex = 0; - } - } else { - // fetch already added custom color - $colorIndex = $this->colors[$rgb]; - } - - return $colorIndex; - } - - /** - * Sets the colour palette to the Excel 97+ default. - * - * @access private - */ - private function setPaletteXl97() - { - $this->palette = array( - 0x08 => array(0x00, 0x00, 0x00, 0x00), - 0x09 => array(0xff, 0xff, 0xff, 0x00), - 0x0A => array(0xff, 0x00, 0x00, 0x00), - 0x0B => array(0x00, 0xff, 0x00, 0x00), - 0x0C => array(0x00, 0x00, 0xff, 0x00), - 0x0D => array(0xff, 0xff, 0x00, 0x00), - 0x0E => array(0xff, 0x00, 0xff, 0x00), - 0x0F => array(0x00, 0xff, 0xff, 0x00), - 0x10 => array(0x80, 0x00, 0x00, 0x00), - 0x11 => array(0x00, 0x80, 0x00, 0x00), - 0x12 => array(0x00, 0x00, 0x80, 0x00), - 0x13 => array(0x80, 0x80, 0x00, 0x00), - 0x14 => array(0x80, 0x00, 0x80, 0x00), - 0x15 => array(0x00, 0x80, 0x80, 0x00), - 0x16 => array(0xc0, 0xc0, 0xc0, 0x00), - 0x17 => array(0x80, 0x80, 0x80, 0x00), - 0x18 => array(0x99, 0x99, 0xff, 0x00), - 0x19 => array(0x99, 0x33, 0x66, 0x00), - 0x1A => array(0xff, 0xff, 0xcc, 0x00), - 0x1B => array(0xcc, 0xff, 0xff, 0x00), - 0x1C => array(0x66, 0x00, 0x66, 0x00), - 0x1D => array(0xff, 0x80, 0x80, 0x00), - 0x1E => array(0x00, 0x66, 0xcc, 0x00), - 0x1F => array(0xcc, 0xcc, 0xff, 0x00), - 0x20 => array(0x00, 0x00, 0x80, 0x00), - 0x21 => array(0xff, 0x00, 0xff, 0x00), - 0x22 => array(0xff, 0xff, 0x00, 0x00), - 0x23 => array(0x00, 0xff, 0xff, 0x00), - 0x24 => array(0x80, 0x00, 0x80, 0x00), - 0x25 => array(0x80, 0x00, 0x00, 0x00), - 0x26 => array(0x00, 0x80, 0x80, 0x00), - 0x27 => array(0x00, 0x00, 0xff, 0x00), - 0x28 => array(0x00, 0xcc, 0xff, 0x00), - 0x29 => array(0xcc, 0xff, 0xff, 0x00), - 0x2A => array(0xcc, 0xff, 0xcc, 0x00), - 0x2B => array(0xff, 0xff, 0x99, 0x00), - 0x2C => array(0x99, 0xcc, 0xff, 0x00), - 0x2D => array(0xff, 0x99, 0xcc, 0x00), - 0x2E => array(0xcc, 0x99, 0xff, 0x00), - 0x2F => array(0xff, 0xcc, 0x99, 0x00), - 0x30 => array(0x33, 0x66, 0xff, 0x00), - 0x31 => array(0x33, 0xcc, 0xcc, 0x00), - 0x32 => array(0x99, 0xcc, 0x00, 0x00), - 0x33 => array(0xff, 0xcc, 0x00, 0x00), - 0x34 => array(0xff, 0x99, 0x00, 0x00), - 0x35 => array(0xff, 0x66, 0x00, 0x00), - 0x36 => array(0x66, 0x66, 0x99, 0x00), - 0x37 => array(0x96, 0x96, 0x96, 0x00), - 0x38 => array(0x00, 0x33, 0x66, 0x00), - 0x39 => array(0x33, 0x99, 0x66, 0x00), - 0x3A => array(0x00, 0x33, 0x00, 0x00), - 0x3B => array(0x33, 0x33, 0x00, 0x00), - 0x3C => array(0x99, 0x33, 0x00, 0x00), - 0x3D => array(0x99, 0x33, 0x66, 0x00), - 0x3E => array(0x33, 0x33, 0x99, 0x00), - 0x3F => array(0x33, 0x33, 0x33, 0x00), - ); - } - - /** - * Assemble worksheets into a workbook and send the BIFF data to an OLE - * storage. - * - * @param array $pWorksheetSizes The sizes in bytes of the binary worksheet streams - * @return string Binary data for workbook stream - */ - public function writeWorkbook($pWorksheetSizes = null) - { - $this->worksheetSizes = $pWorksheetSizes; - - // Calculate the number of selected worksheet tabs and call the finalization - // methods for each worksheet - $total_worksheets = $this->phpExcel->getSheetCount(); - - // Add part 1 of the Workbook globals, what goes before the SHEET records - $this->storeBof(0x0005); - $this->writeCodepage(); - $this->writeWindow1(); - - $this->writeDateMode(); - $this->writeAllFonts(); - $this->writeAllNumberFormats(); - $this->writeAllXfs(); - $this->writeAllStyles(); - $this->writePalette(); - - // Prepare part 3 of the workbook global stream, what goes after the SHEET records - $part3 = ''; - if ($this->countryCode != -1) { - $part3 .= $this->writeCountry(); - } - $part3 .= $this->writeRecalcId(); - - $part3 .= $this->writeSupbookInternal(); - /* TODO: store external SUPBOOK records and XCT and CRN records - in case of external references for BIFF8 */ - $part3 .= $this->writeExternalsheetBiff8(); - $part3 .= $this->writeAllDefinedNamesBiff8(); - $part3 .= $this->writeMsoDrawingGroup(); - $part3 .= $this->writeSharedStringsTable(); - - $part3 .= $this->writeEof(); - - // Add part 2 of the Workbook globals, the SHEET records - $this->calcSheetOffsets(); - for ($i = 0; $i < $total_worksheets; ++$i) { - $this->writeBoundSheet($this->phpExcel->getSheet($i), $this->worksheetOffsets[$i]); - } - - // Add part 3 of the Workbook globals - $this->_data .= $part3; - - return $this->_data; - } - - /** - * Calculate offsets for Worksheet BOF records. - * - * @access private - */ - private function calcSheetOffsets() - { - $boundsheet_length = 10; // fixed length for a BOUNDSHEET record - - // size of Workbook globals part 1 + 3 - $offset = $this->_datasize; - - // add size of Workbook globals part 2, the length of the SHEET records - $total_worksheets = count($this->phpExcel->getAllSheets()); - foreach ($this->phpExcel->getWorksheetIterator() as $sheet) { - $offset += $boundsheet_length + strlen(PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($sheet->getTitle())); - } - - // add the sizes of each of the Sheet substreams, respectively - for ($i = 0; $i < $total_worksheets; ++$i) { - $this->worksheetOffsets[$i] = $offset; - $offset += $this->worksheetSizes[$i]; - } - $this->biffSize = $offset; - } - - /** - * Store the Excel FONT records. - */ - private function writeAllFonts() - { - foreach ($this->fontWriters as $fontWriter) { - $this->append($fontWriter->writeFont()); - } - } - - /** - * Store user defined numerical formats i.e. FORMAT records - */ - private function writeAllNumberFormats() - { - foreach ($this->numberFormats as $numberFormatIndex => $numberFormat) { - $this->writeNumberFormat($numberFormat->getFormatCode(), $numberFormatIndex); - } - } - - /** - * Write all XF records. - */ - private function writeAllXfs() - { - foreach ($this->xfWriters as $xfWriter) { - $this->append($xfWriter->writeXf()); - } - } - - /** - * Write all STYLE records. - */ - private function writeAllStyles() - { - $this->writeStyle(); - } - - /** - * Write the EXTERNCOUNT and EXTERNSHEET records. These are used as indexes for - * the NAME records. - */ - private function writeExternals() - { - $countSheets = $this->phpExcel->getSheetCount(); - // Create EXTERNCOUNT with number of worksheets - $this->writeExternalCount($countSheets); - - // Create EXTERNSHEET for each worksheet - for ($i = 0; $i < $countSheets; ++$i) { - $this->writeExternalSheet($this->phpExcel->getSheet($i)->getTitle()); - } - } - - /** - * Write the NAME record to define the print area and the repeat rows and cols. - */ - private function writeNames() - { - // total number of sheets - $total_worksheets = $this->phpExcel->getSheetCount(); - - // Create the print area NAME records - for ($i = 0; $i < $total_worksheets; ++$i) { - $sheetSetup = $this->phpExcel->getSheet($i)->getPageSetup(); - // Write a Name record if the print area has been defined - if ($sheetSetup->isPrintAreaSet()) { - // Print area - $printArea = PHPExcel_Cell::splitRange($sheetSetup->getPrintArea()); - $printArea = $printArea[0]; - $printArea[0] = PHPExcel_Cell::coordinateFromString($printArea[0]); - $printArea[1] = PHPExcel_Cell::coordinateFromString($printArea[1]); - - $print_rowmin = $printArea[0][1] - 1; - $print_rowmax = $printArea[1][1] - 1; - $print_colmin = PHPExcel_Cell::columnIndexFromString($printArea[0][0]) - 1; - $print_colmax = PHPExcel_Cell::columnIndexFromString($printArea[1][0]) - 1; - - $this->writeNameShort( - $i, // sheet index - 0x06, // NAME type - $print_rowmin, - $print_rowmax, - $print_colmin, - $print_colmax - ); - } - } - - // Create the print title NAME records - for ($i = 0; $i < $total_worksheets; ++$i) { - $sheetSetup = $this->phpExcel->getSheet($i)->getPageSetup(); - - // simultaneous repeatColumns repeatRows - if ($sheetSetup->isColumnsToRepeatAtLeftSet() && $sheetSetup->isRowsToRepeatAtTopSet()) { - $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); - $colmin = PHPExcel_Cell::columnIndexFromString($repeat[0]) - 1; - $colmax = PHPExcel_Cell::columnIndexFromString($repeat[1]) - 1; - - $repeat = $sheetSetup->getRowsToRepeatAtTop(); - $rowmin = $repeat[0] - 1; - $rowmax = $repeat[1] - 1; - - $this->writeNameLong( - $i, // sheet index - 0x07, // NAME type - $rowmin, - $rowmax, - $colmin, - $colmax - ); - - // (exclusive) either repeatColumns or repeatRows - } elseif ($sheetSetup->isColumnsToRepeatAtLeftSet() || $sheetSetup->isRowsToRepeatAtTopSet()) { - // Columns to repeat - if ($sheetSetup->isColumnsToRepeatAtLeftSet()) { - $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); - $colmin = PHPExcel_Cell::columnIndexFromString($repeat[0]) - 1; - $colmax = PHPExcel_Cell::columnIndexFromString($repeat[1]) - 1; - } else { - $colmin = 0; - $colmax = 255; - } - - // Rows to repeat - if ($sheetSetup->isRowsToRepeatAtTopSet()) { - $repeat = $sheetSetup->getRowsToRepeatAtTop(); - $rowmin = $repeat[0] - 1; - $rowmax = $repeat[1] - 1; - } else { - $rowmin = 0; - $rowmax = 65535; - } - - $this->writeNameShort( - $i, // sheet index - 0x07, // NAME type - $rowmin, - $rowmax, - $colmin, - $colmax - ); - } - } - } - - /** - * Writes all the DEFINEDNAME records (BIFF8). - * So far this is only used for repeating rows/columns (print titles) and print areas - */ - private function writeAllDefinedNamesBiff8() - { - $chunk = ''; - - // Named ranges - if (count($this->phpExcel->getNamedRanges()) > 0) { - // Loop named ranges - $namedRanges = $this->phpExcel->getNamedRanges(); - foreach ($namedRanges as $namedRange) { - // Create absolute coordinate - $range = PHPExcel_Cell::splitRange($namedRange->getRange()); - for ($i = 0; $i < count($range); $i++) { - $range[$i][0] = '\'' . str_replace("'", "''", $namedRange->getWorksheet()->getTitle()) . '\'!' . PHPExcel_Cell::absoluteCoordinate($range[$i][0]); - if (isset($range[$i][1])) { - $range[$i][1] = PHPExcel_Cell::absoluteCoordinate($range[$i][1]); - } - } - $range = PHPExcel_Cell::buildRange($range); // e.g. Sheet1!$A$1:$B$2 - - // parse formula - try { - $error = $this->parser->parse($range); - $formulaData = $this->parser->toReversePolish(); - - // make sure tRef3d is of type tRef3dR (0x3A) - if (isset($formulaData{0}) and ($formulaData{0} == "\x7A" or $formulaData{0} == "\x5A")) { - $formulaData = "\x3A" . substr($formulaData, 1); - } - - if ($namedRange->getLocalOnly()) { - // local scope - $scope = $this->phpExcel->getIndex($namedRange->getScope()) + 1; - } else { - // global scope - $scope = 0; - } - $chunk .= $this->writeData($this->writeDefinedNameBiff8($namedRange->getName(), $formulaData, $scope, false)); - - } catch (PHPExcel_Exception $e) { - // do nothing - } - } - } - - // total number of sheets - $total_worksheets = $this->phpExcel->getSheetCount(); - - // write the print titles (repeating rows, columns), if any - for ($i = 0; $i < $total_worksheets; ++$i) { - $sheetSetup = $this->phpExcel->getSheet($i)->getPageSetup(); - // simultaneous repeatColumns repeatRows - if ($sheetSetup->isColumnsToRepeatAtLeftSet() && $sheetSetup->isRowsToRepeatAtTopSet()) { - $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); - $colmin = PHPExcel_Cell::columnIndexFromString($repeat[0]) - 1; - $colmax = PHPExcel_Cell::columnIndexFromString($repeat[1]) - 1; - - $repeat = $sheetSetup->getRowsToRepeatAtTop(); - $rowmin = $repeat[0] - 1; - $rowmax = $repeat[1] - 1; - - // construct formula data manually - $formulaData = pack('Cv', 0x29, 0x17); // tMemFunc - $formulaData .= pack('Cvvvvv', 0x3B, $i, 0, 65535, $colmin, $colmax); // tArea3d - $formulaData .= pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, 0, 255); // tArea3d - $formulaData .= pack('C', 0x10); // tList - - // store the DEFINEDNAME record - $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); - - // (exclusive) either repeatColumns or repeatRows - } elseif ($sheetSetup->isColumnsToRepeatAtLeftSet() || $sheetSetup->isRowsToRepeatAtTopSet()) { - // Columns to repeat - if ($sheetSetup->isColumnsToRepeatAtLeftSet()) { - $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); - $colmin = PHPExcel_Cell::columnIndexFromString($repeat[0]) - 1; - $colmax = PHPExcel_Cell::columnIndexFromString($repeat[1]) - 1; - } else { - $colmin = 0; - $colmax = 255; - } - // Rows to repeat - if ($sheetSetup->isRowsToRepeatAtTopSet()) { - $repeat = $sheetSetup->getRowsToRepeatAtTop(); - $rowmin = $repeat[0] - 1; - $rowmax = $repeat[1] - 1; - } else { - $rowmin = 0; - $rowmax = 65535; - } - - // construct formula data manually because parser does not recognize absolute 3d cell references - $formulaData = pack('Cvvvvv', 0x3B, $i, $rowmin, $rowmax, $colmin, $colmax); - - // store the DEFINEDNAME record - $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); - } - } - - // write the print areas, if any - for ($i = 0; $i < $total_worksheets; ++$i) { - $sheetSetup = $this->phpExcel->getSheet($i)->getPageSetup(); - if ($sheetSetup->isPrintAreaSet()) { - // Print area, e.g. A3:J6,H1:X20 - $printArea = PHPExcel_Cell::splitRange($sheetSetup->getPrintArea()); - $countPrintArea = count($printArea); - - $formulaData = ''; - for ($j = 0; $j < $countPrintArea; ++$j) { - $printAreaRect = $printArea[$j]; // e.g. A3:J6 - $printAreaRect[0] = PHPExcel_Cell::coordinateFromString($printAreaRect[0]); - $printAreaRect[1] = PHPExcel_Cell::coordinateFromString($printAreaRect[1]); - - $print_rowmin = $printAreaRect[0][1] - 1; - $print_rowmax = $printAreaRect[1][1] - 1; - $print_colmin = PHPExcel_Cell::columnIndexFromString($printAreaRect[0][0]) - 1; - $print_colmax = PHPExcel_Cell::columnIndexFromString($printAreaRect[1][0]) - 1; - - // construct formula data manually because parser does not recognize absolute 3d cell references - $formulaData .= pack('Cvvvvv', 0x3B, $i, $print_rowmin, $print_rowmax, $print_colmin, $print_colmax); - - if ($j > 0) { - $formulaData .= pack('C', 0x10); // list operator token ',' - } - } - - // store the DEFINEDNAME record - $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x06), $formulaData, $i + 1, true)); - } - } - - // write autofilters, if any - for ($i = 0; $i < $total_worksheets; ++$i) { - $sheetAutoFilter = $this->phpExcel->getSheet($i)->getAutoFilter(); - $autoFilterRange = $sheetAutoFilter->getRange(); - if (!empty($autoFilterRange)) { - $rangeBounds = PHPExcel_Cell::rangeBoundaries($autoFilterRange); - - //Autofilter built in name - $name = pack('C', 0x0D); - - $chunk .= $this->writeData($this->writeShortNameBiff8($name, $i + 1, $rangeBounds, true)); - } - } - - return $chunk; - } - - /** - * Write a DEFINEDNAME record for BIFF8 using explicit binary formula data - * - * @param string $name The name in UTF-8 - * @param string $formulaData The binary formula data - * @param string $sheetIndex 1-based sheet index the defined name applies to. 0 = global - * @param boolean $isBuiltIn Built-in name? - * @return string Complete binary record data - */ - private function writeDefinedNameBiff8($name, $formulaData, $sheetIndex = 0, $isBuiltIn = false) - { - $record = 0x0018; - - // option flags - $options = $isBuiltIn ? 0x20 : 0x00; - - // length of the name, character count - $nlen = PHPExcel_Shared_String::CountCharacters($name); - - // name with stripped length field - $name = substr(PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($name), 2); - - // size of the formula (in bytes) - $sz = strlen($formulaData); - - // combine the parts - $data = pack('vCCvvvCCCC', $options, 0, $nlen, $sz, 0, $sheetIndex, 0, 0, 0, 0) - . $name . $formulaData; - $length = strlen($data); - - $header = pack('vv', $record, $length); - - return $header . $data; - } - - /** - * Write a short NAME record - * - * @param string $name - * @param string $sheetIndex 1-based sheet index the defined name applies to. 0 = global - * @param integer[][] $rangeBounds range boundaries - * @param boolean $isHidden - * @return string Complete binary record data - * */ - private function writeShortNameBiff8($name, $sheetIndex = 0, $rangeBounds, $isHidden = false) - { - $record = 0x0018; - - // option flags - $options = ($isHidden ? 0x21 : 0x00); - - $extra = pack( - 'Cvvvvv', - 0x3B, - $sheetIndex - 1, - $rangeBounds[0][1] - 1, - $rangeBounds[1][1] - 1, - $rangeBounds[0][0] - 1, - $rangeBounds[1][0] - 1 - ); - - // size of the formula (in bytes) - $sz = strlen($extra); - - // combine the parts - $data = pack('vCCvvvCCCCC', $options, 0, 1, $sz, 0, $sheetIndex, 0, 0, 0, 0, 0) - . $name . $extra; - $length = strlen($data); - - $header = pack('vv', $record, $length); - - return $header . $data; - } - - /** - * Stores the CODEPAGE biff record. - */ - private function writeCodepage() - { - $record = 0x0042; // Record identifier - $length = 0x0002; // Number of bytes to follow - $cv = $this->codepage; // The code page - - $header = pack('vv', $record, $length); - $data = pack('v', $cv); - - $this->append($header . $data); - } - - /** - * Write Excel BIFF WINDOW1 record. - */ - private function writeWindow1() - { - $record = 0x003D; // Record identifier - $length = 0x0012; // Number of bytes to follow - - $xWn = 0x0000; // Horizontal position of window - $yWn = 0x0000; // Vertical position of window - $dxWn = 0x25BC; // Width of window - $dyWn = 0x1572; // Height of window - - $grbit = 0x0038; // Option flags - - // not supported by PHPExcel, so there is only one selected sheet, the active - $ctabsel = 1; // Number of workbook tabs selected - - $wTabRatio = 0x0258; // Tab to scrollbar ratio - - // not supported by PHPExcel, set to 0 - $itabFirst = 0; // 1st displayed worksheet - $itabCur = $this->phpExcel->getActiveSheetIndex(); // Active worksheet - - $header = pack("vv", $record, $length); - $data = pack("vvvvvvvvv", $xWn, $yWn, $dxWn, $dyWn, $grbit, $itabCur, $itabFirst, $ctabsel, $wTabRatio); - $this->append($header . $data); - } - - /** - * Writes Excel BIFF BOUNDSHEET record. - * - * @param PHPExcel_Worksheet $sheet Worksheet name - * @param integer $offset Location of worksheet BOF - */ - private function writeBoundSheet($sheet, $offset) - { - $sheetname = $sheet->getTitle(); - $record = 0x0085; // Record identifier - - // sheet state - switch ($sheet->getSheetState()) { - case PHPExcel_Worksheet::SHEETSTATE_VISIBLE: - $ss = 0x00; - break; - case PHPExcel_Worksheet::SHEETSTATE_HIDDEN: - $ss = 0x01; - break; - case PHPExcel_Worksheet::SHEETSTATE_VERYHIDDEN: - $ss = 0x02; - break; - default: - $ss = 0x00; - break; - } - - // sheet type - $st = 0x00; - - $grbit = 0x0000; // Visibility and sheet type - - $data = pack("VCC", $offset, $ss, $st); - $data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($sheetname); - - $length = strlen($data); - $header = pack("vv", $record, $length); - $this->append($header . $data); - } - - /** - * Write Internal SUPBOOK record - */ - private function writeSupbookInternal() - { - $record = 0x01AE; // Record identifier - $length = 0x0004; // Bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("vv", $this->phpExcel->getSheetCount(), 0x0401); - return $this->writeData($header . $data); - } - - /** - * Writes the Excel BIFF EXTERNSHEET record. These references are used by - * formulas. - * - */ - private function writeExternalsheetBiff8() - { - $totalReferences = count($this->parser->references); - $record = 0x0017; // Record identifier - $length = 2 + 6 * $totalReferences; // Number of bytes to follow - - $supbook_index = 0; // FIXME: only using internal SUPBOOK record - $header = pack("vv", $record, $length); - $data = pack('v', $totalReferences); - for ($i = 0; $i < $totalReferences; ++$i) { - $data .= $this->parser->references[$i]; - } - return $this->writeData($header . $data); - } - - /** - * Write Excel BIFF STYLE records. - */ - private function writeStyle() - { - $record = 0x0293; // Record identifier - $length = 0x0004; // Bytes to follow - - $ixfe = 0x8000; // Index to cell style XF - $BuiltIn = 0x00; // Built-in style - $iLevel = 0xff; // Outline style level - - $header = pack("vv", $record, $length); - $data = pack("vCC", $ixfe, $BuiltIn, $iLevel); - $this->append($header . $data); - } - - /** - * Writes Excel FORMAT record for non "built-in" numerical formats. - * - * @param string $format Custom format string - * @param integer $ifmt Format index code - */ - private function writeNumberFormat($format, $ifmt) - { - $record = 0x041E; // Record identifier - - $numberFormatString = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($format); - $length = 2 + strlen($numberFormatString); // Number of bytes to follow - - - $header = pack("vv", $record, $length); - $data = pack("v", $ifmt) . $numberFormatString; - $this->append($header . $data); - } - - /** - * Write DATEMODE record to indicate the date system in use (1904 or 1900). - */ - private function writeDateMode() - { - $record = 0x0022; // Record identifier - $length = 0x0002; // Bytes to follow - - $f1904 = (PHPExcel_Shared_Date::getExcelCalendar() == PHPExcel_Shared_Date::CALENDAR_MAC_1904) - ? 1 - : 0; // Flag for 1904 date system - - $header = pack("vv", $record, $length); - $data = pack("v", $f1904); - $this->append($header . $data); - } - - /** - * Write BIFF record EXTERNCOUNT to indicate the number of external sheet - * references in the workbook. - * - * Excel only stores references to external sheets that are used in NAME. - * The workbook NAME record is required to define the print area and the repeat - * rows and columns. - * - * A similar method is used in Worksheet.php for a slightly different purpose. - * - * @param integer $cxals Number of external references - */ - private function writeExternalCount($cxals) - { - $record = 0x0016; // Record identifier - $length = 0x0002; // Number of bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("v", $cxals); - $this->append($header . $data); - } - - /** - * Writes the Excel BIFF EXTERNSHEET record. These references are used by - * formulas. NAME record is required to define the print area and the repeat - * rows and columns. - * - * A similar method is used in Worksheet.php for a slightly different purpose. - * - * @param string $sheetname Worksheet name - */ - private function writeExternalSheet($sheetname) - { - $record = 0x0017; // Record identifier - $length = 0x02 + strlen($sheetname); // Number of bytes to follow - - $cch = strlen($sheetname); // Length of sheet name - $rgch = 0x03; // Filename encoding - - $header = pack("vv", $record, $length); - $data = pack("CC", $cch, $rgch); - $this->append($header . $data . $sheetname); - } - - /** - * Store the NAME record in the short format that is used for storing the print - * area, repeat rows only and repeat columns only. - * - * @param integer $index Sheet index - * @param integer $type Built-in name type - * @param integer $rowmin Start row - * @param integer $rowmax End row - * @param integer $colmin Start colum - * @param integer $colmax End column - */ - private function writeNameShort($index, $type, $rowmin, $rowmax, $colmin, $colmax) - { - $record = 0x0018; // Record identifier - $length = 0x0024; // Number of bytes to follow - - $grbit = 0x0020; // Option flags - $chKey = 0x00; // Keyboard shortcut - $cch = 0x01; // Length of text name - $cce = 0x0015; // Length of text definition - $ixals = $index + 1; // Sheet index - $itab = $ixals; // Equal to ixals - $cchCustMenu = 0x00; // Length of cust menu text - $cchDescription = 0x00; // Length of description text - $cchHelptopic = 0x00; // Length of help topic text - $cchStatustext = 0x00; // Length of status bar text - $rgch = $type; // Built-in name type - - $unknown03 = 0x3b; - $unknown04 = 0xffff - $index; - $unknown05 = 0x0000; - $unknown06 = 0x0000; - $unknown07 = 0x1087; - $unknown08 = 0x8005; - - $header = pack("vv", $record, $length); - $data = pack("v", $grbit); - $data .= pack("C", $chKey); - $data .= pack("C", $cch); - $data .= pack("v", $cce); - $data .= pack("v", $ixals); - $data .= pack("v", $itab); - $data .= pack("C", $cchCustMenu); - $data .= pack("C", $cchDescription); - $data .= pack("C", $cchHelptopic); - $data .= pack("C", $cchStatustext); - $data .= pack("C", $rgch); - $data .= pack("C", $unknown03); - $data .= pack("v", $unknown04); - $data .= pack("v", $unknown05); - $data .= pack("v", $unknown06); - $data .= pack("v", $unknown07); - $data .= pack("v", $unknown08); - $data .= pack("v", $index); - $data .= pack("v", $index); - $data .= pack("v", $rowmin); - $data .= pack("v", $rowmax); - $data .= pack("C", $colmin); - $data .= pack("C", $colmax); - $this->append($header . $data); - } - - /** - * Store the NAME record in the long format that is used for storing the repeat - * rows and columns when both are specified. This shares a lot of code with - * writeNameShort() but we use a separate method to keep the code clean. - * Code abstraction for reuse can be carried too far, and I should know. ;-) - * - * @param integer $index Sheet index - * @param integer $type Built-in name type - * @param integer $rowmin Start row - * @param integer $rowmax End row - * @param integer $colmin Start colum - * @param integer $colmax End column - */ - private function writeNameLong($index, $type, $rowmin, $rowmax, $colmin, $colmax) - { - $record = 0x0018; // Record identifier - $length = 0x003d; // Number of bytes to follow - $grbit = 0x0020; // Option flags - $chKey = 0x00; // Keyboard shortcut - $cch = 0x01; // Length of text name - $cce = 0x002e; // Length of text definition - $ixals = $index + 1; // Sheet index - $itab = $ixals; // Equal to ixals - $cchCustMenu = 0x00; // Length of cust menu text - $cchDescription = 0x00; // Length of description text - $cchHelptopic = 0x00; // Length of help topic text - $cchStatustext = 0x00; // Length of status bar text - $rgch = $type; // Built-in name type - - $unknown01 = 0x29; - $unknown02 = 0x002b; - $unknown03 = 0x3b; - $unknown04 = 0xffff-$index; - $unknown05 = 0x0000; - $unknown06 = 0x0000; - $unknown07 = 0x1087; - $unknown08 = 0x8008; - - $header = pack("vv", $record, $length); - $data = pack("v", $grbit); - $data .= pack("C", $chKey); - $data .= pack("C", $cch); - $data .= pack("v", $cce); - $data .= pack("v", $ixals); - $data .= pack("v", $itab); - $data .= pack("C", $cchCustMenu); - $data .= pack("C", $cchDescription); - $data .= pack("C", $cchHelptopic); - $data .= pack("C", $cchStatustext); - $data .= pack("C", $rgch); - $data .= pack("C", $unknown01); - $data .= pack("v", $unknown02); - // Column definition - $data .= pack("C", $unknown03); - $data .= pack("v", $unknown04); - $data .= pack("v", $unknown05); - $data .= pack("v", $unknown06); - $data .= pack("v", $unknown07); - $data .= pack("v", $unknown08); - $data .= pack("v", $index); - $data .= pack("v", $index); - $data .= pack("v", 0x0000); - $data .= pack("v", 0x3fff); - $data .= pack("C", $colmin); - $data .= pack("C", $colmax); - // Row definition - $data .= pack("C", $unknown03); - $data .= pack("v", $unknown04); - $data .= pack("v", $unknown05); - $data .= pack("v", $unknown06); - $data .= pack("v", $unknown07); - $data .= pack("v", $unknown08); - $data .= pack("v", $index); - $data .= pack("v", $index); - $data .= pack("v", $rowmin); - $data .= pack("v", $rowmax); - $data .= pack("C", 0x00); - $data .= pack("C", 0xff); - // End of data - $data .= pack("C", 0x10); - $this->append($header . $data); - } - - /** - * Stores the COUNTRY record for localization - * - * @return string - */ - private function writeCountry() - { - $record = 0x008C; // Record identifier - $length = 4; // Number of bytes to follow - - $header = pack('vv', $record, $length); - /* using the same country code always for simplicity */ - $data = pack('vv', $this->countryCode, $this->countryCode); - //$this->append($header . $data); - return $this->writeData($header . $data); - } - - /** - * Write the RECALCID record - * - * @return string - */ - private function writeRecalcId() - { - $record = 0x01C1; // Record identifier - $length = 8; // Number of bytes to follow - - $header = pack('vv', $record, $length); - - // by inspection of real Excel files, MS Office Excel 2007 writes this - $data = pack('VV', 0x000001C1, 0x00001E667); - - return $this->writeData($header . $data); - } - - /** - * Stores the PALETTE biff record. - */ - private function writePalette() - { - $aref = $this->palette; - - $record = 0x0092; // Record identifier - $length = 2 + 4 * count($aref); // Number of bytes to follow - $ccv = count($aref); // Number of RGB values to follow - $data = ''; // The RGB data - - // Pack the RGB data - foreach ($aref as $color) { - foreach ($color as $byte) { - $data .= pack("C", $byte); - } - } - - $header = pack("vvv", $record, $length, $ccv); - $this->append($header . $data); - } - - /** - * Handling of the SST continue blocks is complicated by the need to include an - * additional continuation byte depending on whether the string is split between - * blocks or whether it starts at the beginning of the block. (There are also - * additional complications that will arise later when/if Rich Strings are - * supported). - * - * The Excel documentation says that the SST record should be followed by an - * EXTSST record. The EXTSST record is a hash table that is used to optimise - * access to SST. However, despite the documentation it doesn't seem to be - * required so we will ignore it. - * - * @return string Binary data - */ - private function writeSharedStringsTable() - { - // maximum size of record data (excluding record header) - $continue_limit = 8224; - - // initialize array of record data blocks - $recordDatas = array(); - - // start SST record data block with total number of strings, total number of unique strings - $recordData = pack("VV", $this->stringTotal, $this->stringUnique); - - // loop through all (unique) strings in shared strings table - foreach (array_keys($this->stringTable) as $string) { - // here $string is a BIFF8 encoded string - - // length = character count - $headerinfo = unpack("vlength/Cencoding", $string); - - // currently, this is always 1 = uncompressed - $encoding = $headerinfo["encoding"]; - - // initialize finished writing current $string - $finished = false; - - while ($finished === false) { - // normally, there will be only one cycle, but if string cannot immediately be written as is - // there will be need for more than one cylcle, if string longer than one record data block, there - // may be need for even more cycles - - if (strlen($recordData) + strlen($string) <= $continue_limit) { - // then we can write the string (or remainder of string) without any problems - $recordData .= $string; - - if (strlen($recordData) + strlen($string) == $continue_limit) { - // we close the record data block, and initialize a new one - $recordDatas[] = $recordData; - $recordData = ''; - } - - // we are finished writing this string - $finished = true; - } else { - // special treatment writing the string (or remainder of the string) - // If the string is very long it may need to be written in more than one CONTINUE record. - - // check how many bytes more there is room for in the current record - $space_remaining = $continue_limit - strlen($recordData); - - // minimum space needed - // uncompressed: 2 byte string length length field + 1 byte option flags + 2 byte character - // compressed: 2 byte string length length field + 1 byte option flags + 1 byte character - $min_space_needed = ($encoding == 1) ? 5 : 4; - - // We have two cases - // 1. space remaining is less than minimum space needed - // here we must waste the space remaining and move to next record data block - // 2. space remaining is greater than or equal to minimum space needed - // here we write as much as we can in the current block, then move to next record data block - - // 1. space remaining is less than minimum space needed - if ($space_remaining < $min_space_needed) { - // we close the block, store the block data - $recordDatas[] = $recordData; - - // and start new record data block where we start writing the string - $recordData = ''; - - // 2. space remaining is greater than or equal to minimum space needed - } else { - // initialize effective remaining space, for Unicode strings this may need to be reduced by 1, see below - $effective_space_remaining = $space_remaining; - - // for uncompressed strings, sometimes effective space remaining is reduced by 1 - if ($encoding == 1 && (strlen($string) - $space_remaining) % 2 == 1) { - --$effective_space_remaining; - } - - // one block fininshed, store the block data - $recordData .= substr($string, 0, $effective_space_remaining); - - $string = substr($string, $effective_space_remaining); // for next cycle in while loop - $recordDatas[] = $recordData; - - // start new record data block with the repeated option flags - $recordData = pack('C', $encoding); - } - } - } - } - - // Store the last record data block unless it is empty - // if there was no need for any continue records, this will be the for SST record data block itself - if (strlen($recordData) > 0) { - $recordDatas[] = $recordData; - } - - // combine into one chunk with all the blocks SST, CONTINUE,... - $chunk = ''; - foreach ($recordDatas as $i => $recordData) { - // first block should have the SST record header, remaing should have CONTINUE header - $record = ($i == 0) ? 0x00FC : 0x003C; - - $header = pack("vv", $record, strlen($recordData)); - $data = $header . $recordData; - - $chunk .= $this->writeData($data); - } - - return $chunk; - } - - /** - * Writes the MSODRAWINGGROUP record if needed. Possibly split using CONTINUE records. - */ - private function writeMsoDrawingGroup() - { - // write the Escher stream if necessary - if (isset($this->escher)) { - $writer = new PHPExcel_Writer_Excel5_Escher($this->escher); - $data = $writer->close(); - - $record = 0x00EB; - $length = strlen($data); - $header = pack("vv", $record, $length); - - return $this->writeData($header . $data); - } else { - return ''; - } - } - - /** - * Get Escher object - * - * @return PHPExcel_Shared_Escher - */ - public function getEscher() - { - return $this->escher; - } - - /** - * Set Escher object - * - * @param PHPExcel_Shared_Escher $pValue - */ - public function setEscher(PHPExcel_Shared_Escher $pValue = null) - { - $this->escher = $pValue; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php deleted file mode 100644 index be965e2..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Worksheet.php +++ /dev/null @@ -1,4240 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel5_Worksheet - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -// Original file header of PEAR::Spreadsheet_Excel_Writer_Worksheet (used as the base for this class): -// ----------------------------------------------------------------------------------------- -// /* -// * Module written/ported by Xavier Noguer <xnoguer@rezebra.com> -// * -// * The majority of this is _NOT_ my code. I simply ported it from the -// * PERL Spreadsheet::WriteExcel module. -// * -// * The author of the Spreadsheet::WriteExcel module is John McNamara -// * <jmcnamara@cpan.org> -// * -// * I _DO_ maintain this code, and John McNamara has nothing to do with the -// * porting of this code to PHP. Any questions directly related to this -// * class library should be directed to me. -// * -// * License Information: -// * -// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets -// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com -// * -// * This library is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public -// * License as published by the Free Software Foundation; either -// * version 2.1 of the License, or (at your option) any later version. -// * -// * This library is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// * Lesser General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public -// * License along with this library; if not, write to the Free Software -// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// */ -class PHPExcel_Writer_Excel5_Worksheet extends PHPExcel_Writer_Excel5_BIFFwriter -{ - /** - * Formula parser - * - * @var PHPExcel_Writer_Excel5_Parser - */ - private $parser; - - /** - * Maximum number of characters for a string (LABEL record in BIFF5) - * @var integer - */ - private $xlsStringMaxLength; - - /** - * Array containing format information for columns - * @var array - */ - private $columnInfo; - - /** - * Array containing the selected area for the worksheet - * @var array - */ - private $selection; - - /** - * The active pane for the worksheet - * @var integer - */ - private $activePane; - - /** - * Whether to use outline. - * @var integer - */ - private $outlineOn; - - /** - * Auto outline styles. - * @var bool - */ - private $outlineStyle; - - /** - * Whether to have outline summary below. - * @var bool - */ - private $outlineBelow; - - /** - * Whether to have outline summary at the right. - * @var bool - */ - private $outlineRight; - - /** - * Reference to the total number of strings in the workbook - * @var integer - */ - private $stringTotal; - - /** - * Reference to the number of unique strings in the workbook - * @var integer - */ - private $stringUnique; - - /** - * Reference to the array containing all the unique strings in the workbook - * @var array - */ - private $stringTable; - - /** - * Color cache - */ - private $colors; - - /** - * Index of first used row (at least 0) - * @var int - */ - private $firstRowIndex; - - /** - * Index of last used row. (no used rows means -1) - * @var int - */ - private $lastRowIndex; - - /** - * Index of first used column (at least 0) - * @var int - */ - private $firstColumnIndex; - - /** - * Index of last used column (no used columns means -1) - * @var int - */ - private $lastColumnIndex; - - /** - * Sheet object - * @var PHPExcel_Worksheet - */ - public $phpSheet; - - /** - * Count cell style Xfs - * - * @var int - */ - private $countCellStyleXfs; - - /** - * Escher object corresponding to MSODRAWING - * - * @var PHPExcel_Shared_Escher - */ - private $escher; - - /** - * Array of font hashes associated to FONT records index - * - * @var array - */ - public $fontHashIndex; - - /** - * Constructor - * - * @param int &$str_total Total number of strings - * @param int &$str_unique Total number of unique strings - * @param array &$str_table String Table - * @param array &$colors Colour Table - * @param mixed $parser The formula parser created for the Workbook - * @param boolean $preCalculateFormulas Flag indicating whether formulas should be calculated or just written - * @param string $phpSheet The worksheet to write - * @param PHPExcel_Worksheet $phpSheet - */ - public function __construct(&$str_total, &$str_unique, &$str_table, &$colors, $parser, $preCalculateFormulas, $phpSheet) - { - // It needs to call its parent's constructor explicitly - parent::__construct(); - - // change BIFFwriter limit for CONTINUE records -// $this->_limit = 8224; - - - $this->_preCalculateFormulas = $preCalculateFormulas; - $this->stringTotal = &$str_total; - $this->stringUnique = &$str_unique; - $this->stringTable = &$str_table; - $this->colors = &$colors; - $this->parser = $parser; - - $this->phpSheet = $phpSheet; - - //$this->ext_sheets = array(); - //$this->offset = 0; - $this->xlsStringMaxLength = 255; - $this->columnInfo = array(); - $this->selection = array(0,0,0,0); - $this->activePane = 3; - - $this->_print_headers = 0; - - $this->outlineStyle = 0; - $this->outlineBelow = 1; - $this->outlineRight = 1; - $this->outlineOn = 1; - - $this->fontHashIndex = array(); - - // calculate values for DIMENSIONS record - $minR = 1; - $minC = 'A'; - - $maxR = $this->phpSheet->getHighestRow(); - $maxC = $this->phpSheet->getHighestColumn(); - - // Determine lowest and highest column and row -// $this->firstRowIndex = ($minR > 65535) ? 65535 : $minR; - $this->lastRowIndex = ($maxR > 65535) ? 65535 : $maxR ; - - $this->firstColumnIndex = PHPExcel_Cell::columnIndexFromString($minC); - $this->lastColumnIndex = PHPExcel_Cell::columnIndexFromString($maxC); - -// if ($this->firstColumnIndex > 255) $this->firstColumnIndex = 255; - if ($this->lastColumnIndex > 255) { - $this->lastColumnIndex = 255; - } - - $this->countCellStyleXfs = count($phpSheet->getParent()->getCellStyleXfCollection()); - } - - /** - * Add data to the beginning of the workbook (note the reverse order) - * and to the end of the workbook. - * - * @access public - * @see PHPExcel_Writer_Excel5_Workbook::storeWorkbook() - */ - public function close() - { - $phpSheet = $this->phpSheet; - - $num_sheets = $phpSheet->getParent()->getSheetCount(); - - // Write BOF record - $this->storeBof(0x0010); - - // Write PRINTHEADERS - $this->writePrintHeaders(); - - // Write PRINTGRIDLINES - $this->writePrintGridlines(); - - // Write GRIDSET - $this->writeGridset(); - - // Calculate column widths - $phpSheet->calculateColumnWidths(); - - // Column dimensions - if (($defaultWidth = $phpSheet->getDefaultColumnDimension()->getWidth()) < 0) { - $defaultWidth = PHPExcel_Shared_Font::getDefaultColumnWidthByFont($phpSheet->getParent()->getDefaultStyle()->getFont()); - } - - $columnDimensions = $phpSheet->getColumnDimensions(); - $maxCol = $this->lastColumnIndex -1; - for ($i = 0; $i <= $maxCol; ++$i) { - $hidden = 0; - $level = 0; - $xfIndex = 15; // there are 15 cell style Xfs - - $width = $defaultWidth; - - $columnLetter = PHPExcel_Cell::stringFromColumnIndex($i); - if (isset($columnDimensions[$columnLetter])) { - $columnDimension = $columnDimensions[$columnLetter]; - if ($columnDimension->getWidth() >= 0) { - $width = $columnDimension->getWidth(); - } - $hidden = $columnDimension->getVisible() ? 0 : 1; - $level = $columnDimension->getOutlineLevel(); - $xfIndex = $columnDimension->getXfIndex() + 15; // there are 15 cell style Xfs - } - - // Components of columnInfo: - // $firstcol first column on the range - // $lastcol last column on the range - // $width width to set - // $xfIndex The optional cell style Xf index to apply to the columns - // $hidden The optional hidden atribute - // $level The optional outline level - $this->columnInfo[] = array($i, $i, $width, $xfIndex, $hidden, $level); - } - - // Write GUTS - $this->writeGuts(); - - // Write DEFAULTROWHEIGHT - $this->writeDefaultRowHeight(); - // Write WSBOOL - $this->writeWsbool(); - // Write horizontal and vertical page breaks - $this->writeBreaks(); - // Write page header - $this->writeHeader(); - // Write page footer - $this->writeFooter(); - // Write page horizontal centering - $this->writeHcenter(); - // Write page vertical centering - $this->writeVcenter(); - // Write left margin - $this->writeMarginLeft(); - // Write right margin - $this->writeMarginRight(); - // Write top margin - $this->writeMarginTop(); - // Write bottom margin - $this->writeMarginBottom(); - // Write page setup - $this->writeSetup(); - // Write sheet protection - $this->writeProtect(); - // Write SCENPROTECT - $this->writeScenProtect(); - // Write OBJECTPROTECT - $this->writeObjectProtect(); - // Write sheet password - $this->writePassword(); - // Write DEFCOLWIDTH record - $this->writeDefcol(); - - // Write the COLINFO records if they exist - if (!empty($this->columnInfo)) { - $colcount = count($this->columnInfo); - for ($i = 0; $i < $colcount; ++$i) { - $this->writeColinfo($this->columnInfo[$i]); - } - } - $autoFilterRange = $phpSheet->getAutoFilter()->getRange(); - if (!empty($autoFilterRange)) { - // Write AUTOFILTERINFO - $this->writeAutoFilterInfo(); - } - - // Write sheet dimensions - $this->writeDimensions(); - - // Row dimensions - foreach ($phpSheet->getRowDimensions() as $rowDimension) { - $xfIndex = $rowDimension->getXfIndex() + 15; // there are 15 cellXfs - $this->writeRow($rowDimension->getRowIndex() - 1, $rowDimension->getRowHeight(), $xfIndex, ($rowDimension->getVisible() ? '0' : '1'), $rowDimension->getOutlineLevel()); - } - - // Write Cells - foreach ($phpSheet->getCellCollection() as $cellID) { - $cell = $phpSheet->getCell($cellID); - $row = $cell->getRow() - 1; - $column = PHPExcel_Cell::columnIndexFromString($cell->getColumn()) - 1; - - // Don't break Excel! -// if ($row + 1 > 65536 or $column + 1 > 256) { - if ($row > 65535 || $column > 255) { - break; - } - - // Write cell value - $xfIndex = $cell->getXfIndex() + 15; // there are 15 cell style Xfs - - $cVal = $cell->getValue(); - if ($cVal instanceof PHPExcel_RichText) { - // $this->writeString($row, $column, $cVal->getPlainText(), $xfIndex); - $arrcRun = array(); - $str_len = PHPExcel_Shared_String::CountCharacters($cVal->getPlainText(), 'UTF-8'); - $str_pos = 0; - $elements = $cVal->getRichTextElements(); - foreach ($elements as $element) { - // FONT Index - if ($element instanceof PHPExcel_RichText_Run) { - $str_fontidx = $this->fontHashIndex[$element->getFont()->getHashCode()]; - } else { - $str_fontidx = 0; - } - $arrcRun[] = array('strlen' => $str_pos, 'fontidx' => $str_fontidx); - // Position FROM - $str_pos += PHPExcel_Shared_String::CountCharacters($element->getText(), 'UTF-8'); - } - $this->writeRichTextString($row, $column, $cVal->getPlainText(), $xfIndex, $arrcRun); - } else { - switch ($cell->getDatatype()) { - case PHPExcel_Cell_DataType::TYPE_STRING: - case PHPExcel_Cell_DataType::TYPE_NULL: - if ($cVal === '' || $cVal === null) { - $this->writeBlank($row, $column, $xfIndex); - } else { - $this->writeString($row, $column, $cVal, $xfIndex); - } - break; - - case PHPExcel_Cell_DataType::TYPE_NUMERIC: - $this->writeNumber($row, $column, $cVal, $xfIndex); - break; - - case PHPExcel_Cell_DataType::TYPE_FORMULA: - $calculatedValue = $this->_preCalculateFormulas ? - $cell->getCalculatedValue() : null; - $this->writeFormula($row, $column, $cVal, $xfIndex, $calculatedValue); - break; - - case PHPExcel_Cell_DataType::TYPE_BOOL: - $this->writeBoolErr($row, $column, $cVal, 0, $xfIndex); - break; - - case PHPExcel_Cell_DataType::TYPE_ERROR: - $this->writeBoolErr($row, $column, self::mapErrorCode($cVal), 1, $xfIndex); - break; - - } - } - } - - // Append - $this->writeMsoDrawing(); - - // Write WINDOW2 record - $this->writeWindow2(); - - // Write PLV record - $this->writePageLayoutView(); - - // Write ZOOM record - $this->writeZoom(); - if ($phpSheet->getFreezePane()) { - $this->writePanes(); - } - - // Write SELECTION record - $this->writeSelection(); - - // Write MergedCellsTable Record - $this->writeMergedCells(); - - // Hyperlinks - foreach ($phpSheet->getHyperLinkCollection() as $coordinate => $hyperlink) { - list($column, $row) = PHPExcel_Cell::coordinateFromString($coordinate); - - $url = $hyperlink->getUrl(); - - if (strpos($url, 'sheet://') !== false) { - // internal to current workbook - $url = str_replace('sheet://', 'internal:', $url); - - } elseif (preg_match('/^(http:|https:|ftp:|mailto:)/', $url)) { - // URL - // $url = $url; - - } else { - // external (local file) - $url = 'external:' . $url; - } - - $this->writeUrl($row - 1, PHPExcel_Cell::columnIndexFromString($column) - 1, $url); - } - - $this->writeDataValidity(); - $this->writeSheetLayout(); - - // Write SHEETPROTECTION record - $this->writeSheetProtection(); - $this->writeRangeProtection(); - - $arrConditionalStyles = $phpSheet->getConditionalStylesCollection(); - if (!empty($arrConditionalStyles)) { - $arrConditional = array(); - // @todo CFRule & CFHeader - // Write CFHEADER record - $this->writeCFHeader(); - // Write ConditionalFormattingTable records - foreach ($arrConditionalStyles as $cellCoordinate => $conditionalStyles) { - foreach ($conditionalStyles as $conditional) { - if ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_EXPRESSION - || $conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CELLIS) { - if (!in_array($conditional->getHashCode(), $arrConditional)) { - $arrConditional[] = $conditional->getHashCode(); - // Write CFRULE record - $this->writeCFRule($conditional); - } - } - } - } - } - - $this->storeEof(); - } - - /** - * Write a cell range address in BIFF8 - * always fixed range - * See section 2.5.14 in OpenOffice.org's Documentation of the Microsoft Excel File Format - * - * @param string $range E.g. 'A1' or 'A1:B6' - * @return string Binary data - */ - private function writeBIFF8CellRangeAddressFixed($range = 'A1') - { - $explodes = explode(':', $range); - - // extract first cell, e.g. 'A1' - $firstCell = $explodes[0]; - - // extract last cell, e.g. 'B6' - if (count($explodes) == 1) { - $lastCell = $firstCell; - } else { - $lastCell = $explodes[1]; - } - - $firstCellCoordinates = PHPExcel_Cell::coordinateFromString($firstCell); // e.g. array(0, 1) - $lastCellCoordinates = PHPExcel_Cell::coordinateFromString($lastCell); // e.g. array(1, 6) - - return pack('vvvv', $firstCellCoordinates[1] - 1, $lastCellCoordinates[1] - 1, PHPExcel_Cell::columnIndexFromString($firstCellCoordinates[0]) - 1, PHPExcel_Cell::columnIndexFromString($lastCellCoordinates[0]) - 1); - } - - /** - * Retrieves data from memory in one chunk, or from disk in $buffer - * sized chunks. - * - * @return string The data - */ - public function getData() - { - $buffer = 4096; - - // Return data stored in memory - if (isset($this->_data)) { - $tmp = $this->_data; - unset($this->_data); - return $tmp; - } - // No data to return - return false; - } - - /** - * Set the option to print the row and column headers on the printed page. - * - * @access public - * @param integer $print Whether to print the headers or not. Defaults to 1 (print). - */ - public function printRowColHeaders($print = 1) - { - $this->_print_headers = $print; - } - - /** - * This method sets the properties for outlining and grouping. The defaults - * correspond to Excel's defaults. - * - * @param bool $visible - * @param bool $symbols_below - * @param bool $symbols_right - * @param bool $auto_style - */ - public function setOutline($visible = true, $symbols_below = true, $symbols_right = true, $auto_style = false) - { - $this->outlineOn = $visible; - $this->outlineBelow = $symbols_below; - $this->outlineRight = $symbols_right; - $this->outlineStyle = $auto_style; - - // Ensure this is a boolean vale for Window2 - if ($this->outlineOn) { - $this->outlineOn = 1; - } - } - - /** - * Write a double to the specified row and column (zero indexed). - * An integer can be written as a double. Excel will display an - * integer. $format is optional. - * - * Returns 0 : normal termination - * -2 : row or column out of range - * - * @param integer $row Zero indexed row - * @param integer $col Zero indexed column - * @param float $num The number to write - * @param mixed $xfIndex The optional XF format - * @return integer - */ - private function writeNumber($row, $col, $num, $xfIndex) - { - $record = 0x0203; // Record identifier - $length = 0x000E; // Number of bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("vvv", $row, $col, $xfIndex); - $xl_double = pack("d", $num); - if (self::getByteOrder()) { // if it's Big Endian - $xl_double = strrev($xl_double); - } - - $this->append($header.$data.$xl_double); - return(0); - } - - /** - * Write a LABELSST record or a LABEL record. Which one depends on BIFF version - * - * @param int $row Row index (0-based) - * @param int $col Column index (0-based) - * @param string $str The string - * @param int $xfIndex Index to XF record - */ - private function writeString($row, $col, $str, $xfIndex) - { - $this->writeLabelSst($row, $col, $str, $xfIndex); - } - - /** - * Write a LABELSST record or a LABEL record. Which one depends on BIFF version - * It differs from writeString by the writing of rich text strings. - * @param int $row Row index (0-based) - * @param int $col Column index (0-based) - * @param string $str The string - * @param mixed $xfIndex The XF format index for the cell - * @param array $arrcRun Index to Font record and characters beginning - */ - private function writeRichTextString($row, $col, $str, $xfIndex, $arrcRun) - { - $record = 0x00FD; // Record identifier - $length = 0x000A; // Bytes to follow - $str = PHPExcel_Shared_String::UTF8toBIFF8UnicodeShort($str, $arrcRun); - - /* check if string is already present */ - if (!isset($this->stringTable[$str])) { - $this->stringTable[$str] = $this->stringUnique++; - } - $this->stringTotal++; - - $header = pack('vv', $record, $length); - $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); - $this->append($header.$data); - } - - /** - * Write a string to the specified row and column (zero indexed). - * NOTE: there is an Excel 5 defined limit of 255 characters. - * $format is optional. - * Returns 0 : normal termination - * -2 : row or column out of range - * -3 : long string truncated to 255 chars - * - * @access public - * @param integer $row Zero indexed row - * @param integer $col Zero indexed column - * @param string $str The string to write - * @param mixed $xfIndex The XF format index for the cell - * @return integer - */ - private function writeLabel($row, $col, $str, $xfIndex) - { - $strlen = strlen($str); - $record = 0x0204; // Record identifier - $length = 0x0008 + $strlen; // Bytes to follow - - $str_error = 0; - - if ($strlen > $this->xlsStringMaxLength) { // LABEL must be < 255 chars - $str = substr($str, 0, $this->xlsStringMaxLength); - $length = 0x0008 + $this->xlsStringMaxLength; - $strlen = $this->xlsStringMaxLength; - $str_error = -3; - } - - $header = pack("vv", $record, $length); - $data = pack("vvvv", $row, $col, $xfIndex, $strlen); - $this->append($header . $data . $str); - return($str_error); - } - - /** - * Write a string to the specified row and column (zero indexed). - * This is the BIFF8 version (no 255 chars limit). - * $format is optional. - * Returns 0 : normal termination - * -2 : row or column out of range - * -3 : long string truncated to 255 chars - * - * @access public - * @param integer $row Zero indexed row - * @param integer $col Zero indexed column - * @param string $str The string to write - * @param mixed $xfIndex The XF format index for the cell - * @return integer - */ - private function writeLabelSst($row, $col, $str, $xfIndex) - { - $record = 0x00FD; // Record identifier - $length = 0x000A; // Bytes to follow - - $str = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($str); - - /* check if string is already present */ - if (!isset($this->stringTable[$str])) { - $this->stringTable[$str] = $this->stringUnique++; - } - $this->stringTotal++; - - $header = pack('vv', $record, $length); - $data = pack('vvvV', $row, $col, $xfIndex, $this->stringTable[$str]); - $this->append($header.$data); - } - - /** - * Writes a note associated with the cell given by the row and column. - * NOTE records don't have a length limit. - * - * @param integer $row Zero indexed row - * @param integer $col Zero indexed column - * @param string $note The note to write - */ - private function writeNote($row, $col, $note) - { - $note_length = strlen($note); - $record = 0x001C; // Record identifier - $max_length = 2048; // Maximun length for a NOTE record - - // Length for this record is no more than 2048 + 6 - $length = 0x0006 + min($note_length, 2048); - $header = pack("vv", $record, $length); - $data = pack("vvv", $row, $col, $note_length); - $this->append($header . $data . substr($note, 0, 2048)); - - for ($i = $max_length; $i < $note_length; $i += $max_length) { - $chunk = substr($note, $i, $max_length); - $length = 0x0006 + strlen($chunk); - $header = pack("vv", $record, $length); - $data = pack("vvv", -1, 0, strlen($chunk)); - $this->append($header.$data.$chunk); - } - return(0); - } - - /** - * Write a blank cell to the specified row and column (zero indexed). - * A blank cell is used to specify formatting without adding a string - * or a number. - * - * A blank cell without a format serves no purpose. Therefore, we don't write - * a BLANK record unless a format is specified. - * - * Returns 0 : normal termination (including no format) - * -1 : insufficient number of arguments - * -2 : row or column out of range - * - * @param integer $row Zero indexed row - * @param integer $col Zero indexed column - * @param mixed $xfIndex The XF format index - */ - public function writeBlank($row, $col, $xfIndex) - { - $record = 0x0201; // Record identifier - $length = 0x0006; // Number of bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("vvv", $row, $col, $xfIndex); - $this->append($header . $data); - return 0; - } - - /** - * Write a boolean or an error type to the specified row and column (zero indexed) - * - * @param int $row Row index (0-based) - * @param int $col Column index (0-based) - * @param int $value - * @param boolean $isError Error or Boolean? - * @param int $xfIndex - */ - private function writeBoolErr($row, $col, $value, $isError, $xfIndex) - { - $record = 0x0205; - $length = 8; - - $header = pack("vv", $record, $length); - $data = pack("vvvCC", $row, $col, $xfIndex, $value, $isError); - $this->append($header . $data); - return 0; - } - - /** - * Write a formula to the specified row and column (zero indexed). - * The textual representation of the formula is passed to the parser in - * Parser.php which returns a packed binary string. - * - * Returns 0 : normal termination - * -1 : formula errors (bad formula) - * -2 : row or column out of range - * - * @param integer $row Zero indexed row - * @param integer $col Zero indexed column - * @param string $formula The formula text string - * @param mixed $xfIndex The XF format index - * @param mixed $calculatedValue Calculated value - * @return integer - */ - private function writeFormula($row, $col, $formula, $xfIndex, $calculatedValue) - { - $record = 0x0006; // Record identifier - - // Initialize possible additional value for STRING record that should be written after the FORMULA record? - $stringValue = null; - - // calculated value - if (isset($calculatedValue)) { - // Since we can't yet get the data type of the calculated value, - // we use best effort to determine data type - if (is_bool($calculatedValue)) { - // Boolean value - $num = pack('CCCvCv', 0x01, 0x00, (int)$calculatedValue, 0x00, 0x00, 0xFFFF); - } elseif (is_int($calculatedValue) || is_float($calculatedValue)) { - // Numeric value - $num = pack('d', $calculatedValue); - } elseif (is_string($calculatedValue)) { - if (array_key_exists($calculatedValue, PHPExcel_Cell_DataType::getErrorCodes())) { - // Error value - $num = pack('CCCvCv', 0x02, 0x00, self::mapErrorCode($calculatedValue), 0x00, 0x00, 0xFFFF); - } elseif ($calculatedValue === '') { - // Empty string (and BIFF8) - $num = pack('CCCvCv', 0x03, 0x00, 0x00, 0x00, 0x00, 0xFFFF); - } else { - // Non-empty string value (or empty string BIFF5) - $stringValue = $calculatedValue; - $num = pack('CCCvCv', 0x00, 0x00, 0x00, 0x00, 0x00, 0xFFFF); - } - } else { - // We are really not supposed to reach here - $num = pack('d', 0x00); - } - } else { - $num = pack('d', 0x00); - } - - $grbit = 0x03; // Option flags - $unknown = 0x0000; // Must be zero - - // Strip the '=' or '@' sign at the beginning of the formula string - if ($formula{0} == '=') { - $formula = substr($formula, 1); - } else { - // Error handling - $this->writeString($row, $col, 'Unrecognised character for formula'); - return -1; - } - - // Parse the formula using the parser in Parser.php - try { - $error = $this->parser->parse($formula); - $formula = $this->parser->toReversePolish(); - - $formlen = strlen($formula); // Length of the binary string - $length = 0x16 + $formlen; // Length of the record data - - $header = pack("vv", $record, $length); - - $data = pack("vvv", $row, $col, $xfIndex) - . $num - . pack("vVv", $grbit, $unknown, $formlen); - $this->append($header . $data . $formula); - - // Append also a STRING record if necessary - if ($stringValue !== null) { - $this->writeStringRecord($stringValue); - } - - return 0; - - } catch (PHPExcel_Exception $e) { - // do nothing - } - - } - - /** - * Write a STRING record. This - * - * @param string $stringValue - */ - private function writeStringRecord($stringValue) - { - $record = 0x0207; // Record identifier - $data = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($stringValue); - - $length = strlen($data); - $header = pack('vv', $record, $length); - - $this->append($header . $data); - } - - /** - * Write a hyperlink. - * This is comprised of two elements: the visible label and - * the invisible link. The visible label is the same as the link unless an - * alternative string is specified. The label is written using the - * writeString() method. Therefore the 255 characters string limit applies. - * $string and $format are optional. - * - * The hyperlink can be to a http, ftp, mail, internal sheet (not yet), or external - * directory url. - * - * Returns 0 : normal termination - * -2 : row or column out of range - * -3 : long string truncated to 255 chars - * - * @param integer $row Row - * @param integer $col Column - * @param string $url URL string - * @return integer - */ - private function writeUrl($row, $col, $url) - { - // Add start row and col to arg list - return($this->writeUrlRange($row, $col, $row, $col, $url)); - } - - /** - * This is the more general form of writeUrl(). It allows a hyperlink to be - * written to a range of cells. This function also decides the type of hyperlink - * to be written. These are either, Web (http, ftp, mailto), Internal - * (Sheet1!A1) or external ('c:\temp\foo.xls#Sheet1!A1'). - * - * @access private - * @see writeUrl() - * @param integer $row1 Start row - * @param integer $col1 Start column - * @param integer $row2 End row - * @param integer $col2 End column - * @param string $url URL string - * @return integer - */ - public function writeUrlRange($row1, $col1, $row2, $col2, $url) - { - // Check for internal/external sheet links or default to web link - if (preg_match('[^internal:]', $url)) { - return($this->writeUrlInternal($row1, $col1, $row2, $col2, $url)); - } - if (preg_match('[^external:]', $url)) { - return($this->writeUrlExternal($row1, $col1, $row2, $col2, $url)); - } - return($this->writeUrlWeb($row1, $col1, $row2, $col2, $url)); - } - - /** - * Used to write http, ftp and mailto hyperlinks. - * The link type ($options) is 0x03 is the same as absolute dir ref without - * sheet. However it is differentiated by the $unknown2 data stream. - * - * @access private - * @see writeUrl() - * @param integer $row1 Start row - * @param integer $col1 Start column - * @param integer $row2 End row - * @param integer $col2 End column - * @param string $url URL string - * @return integer - */ - public function writeUrlWeb($row1, $col1, $row2, $col2, $url) - { - $record = 0x01B8; // Record identifier - $length = 0x00000; // Bytes to follow - - // Pack the undocumented parts of the hyperlink stream - $unknown1 = pack("H*", "D0C9EA79F9BACE118C8200AA004BA90B02000000"); - $unknown2 = pack("H*", "E0C9EA79F9BACE118C8200AA004BA90B"); - - // Pack the option flags - $options = pack("V", 0x03); - - // Convert URL to a null terminated wchar string - $url = join("\0", preg_split("''", $url, -1, PREG_SPLIT_NO_EMPTY)); - $url = $url . "\0\0\0"; - - // Pack the length of the URL - $url_len = pack("V", strlen($url)); - - // Calculate the data length - $length = 0x34 + strlen($url); - - // Pack the header data - $header = pack("vv", $record, $length); - $data = pack("vvvv", $row1, $row2, $col1, $col2); - - // Write the packed data - $this->append($header . $data . - $unknown1 . $options . - $unknown2 . $url_len . $url); - return 0; - } - - /** - * Used to write internal reference hyperlinks such as "Sheet1!A1". - * - * @access private - * @see writeUrl() - * @param integer $row1 Start row - * @param integer $col1 Start column - * @param integer $row2 End row - * @param integer $col2 End column - * @param string $url URL string - * @return integer - */ - public function writeUrlInternal($row1, $col1, $row2, $col2, $url) - { - $record = 0x01B8; // Record identifier - $length = 0x00000; // Bytes to follow - - // Strip URL type - $url = preg_replace('/^internal:/', '', $url); - - // Pack the undocumented parts of the hyperlink stream - $unknown1 = pack("H*", "D0C9EA79F9BACE118C8200AA004BA90B02000000"); - - // Pack the option flags - $options = pack("V", 0x08); - - // Convert the URL type and to a null terminated wchar string - $url .= "\0"; - - // character count - $url_len = PHPExcel_Shared_String::CountCharacters($url); - $url_len = pack('V', $url_len); - - $url = PHPExcel_Shared_String::ConvertEncoding($url, 'UTF-16LE', 'UTF-8'); - - // Calculate the data length - $length = 0x24 + strlen($url); - - // Pack the header data - $header = pack("vv", $record, $length); - $data = pack("vvvv", $row1, $row2, $col1, $col2); - - // Write the packed data - $this->append($header . $data . - $unknown1 . $options . - $url_len . $url); - return 0; - } - - /** - * Write links to external directory names such as 'c:\foo.xls', - * c:\foo.xls#Sheet1!A1', '../../foo.xls'. and '../../foo.xls#Sheet1!A1'. - * - * Note: Excel writes some relative links with the $dir_long string. We ignore - * these cases for the sake of simpler code. - * - * @access private - * @see writeUrl() - * @param integer $row1 Start row - * @param integer $col1 Start column - * @param integer $row2 End row - * @param integer $col2 End column - * @param string $url URL string - * @return integer - */ - public function writeUrlExternal($row1, $col1, $row2, $col2, $url) - { - // Network drives are different. We will handle them separately - // MS/Novell network drives and shares start with \\ - if (preg_match('[^external:\\\\]', $url)) { - return; //($this->writeUrlExternal_net($row1, $col1, $row2, $col2, $url, $str, $format)); - } - - $record = 0x01B8; // Record identifier - $length = 0x00000; // Bytes to follow - - // Strip URL type and change Unix dir separator to Dos style (if needed) - // - $url = preg_replace('/^external:/', '', $url); - $url = preg_replace('/\//', "\\", $url); - - // Determine if the link is relative or absolute: - // relative if link contains no dir separator, "somefile.xls" - // relative if link starts with up-dir, "..\..\somefile.xls" - // otherwise, absolute - - $absolute = 0x00; // relative path - if (preg_match('/^[A-Z]:/', $url)) { - $absolute = 0x02; // absolute path on Windows, e.g. C:\... - } - $link_type = 0x01 | $absolute; - - // Determine if the link contains a sheet reference and change some of the - // parameters accordingly. - // Split the dir name and sheet name (if it exists) - $dir_long = $url; - if (preg_match("/\#/", $url)) { - $link_type |= 0x08; - } - - - // Pack the link type - $link_type = pack("V", $link_type); - - // Calculate the up-level dir count e.g.. (..\..\..\ == 3) - $up_count = preg_match_all("/\.\.\\\/", $dir_long, $useless); - $up_count = pack("v", $up_count); - - // Store the short dos dir name (null terminated) - $dir_short = preg_replace("/\.\.\\\/", '', $dir_long) . "\0"; - - // Store the long dir name as a wchar string (non-null terminated) - $dir_long = $dir_long . "\0"; - - // Pack the lengths of the dir strings - $dir_short_len = pack("V", strlen($dir_short)); - $dir_long_len = pack("V", strlen($dir_long)); - $stream_len = pack("V", 0); //strlen($dir_long) + 0x06); - - // Pack the undocumented parts of the hyperlink stream - $unknown1 = pack("H*", 'D0C9EA79F9BACE118C8200AA004BA90B02000000'); - $unknown2 = pack("H*", '0303000000000000C000000000000046'); - $unknown3 = pack("H*", 'FFFFADDE000000000000000000000000000000000000000'); - $unknown4 = pack("v", 0x03); - - // Pack the main data stream - $data = pack("vvvv", $row1, $row2, $col1, $col2) . - $unknown1 . - $link_type . - $unknown2 . - $up_count . - $dir_short_len. - $dir_short . - $unknown3 . - $stream_len ;/*. - $dir_long_len . - $unknown4 . - $dir_long . - $sheet_len . - $sheet ;*/ - - // Pack the header data - $length = strlen($data); - $header = pack("vv", $record, $length); - - // Write the packed data - $this->append($header. $data); - return 0; - } - - /** - * This method is used to set the height and format for a row. - * - * @param integer $row The row to set - * @param integer $height Height we are giving to the row. - * Use null to set XF without setting height - * @param integer $xfIndex The optional cell style Xf index to apply to the columns - * @param bool $hidden The optional hidden attribute - * @param integer $level The optional outline level for row, in range [0,7] - */ - private function writeRow($row, $height, $xfIndex, $hidden = false, $level = 0) - { - $record = 0x0208; // Record identifier - $length = 0x0010; // Number of bytes to follow - - $colMic = 0x0000; // First defined column - $colMac = 0x0000; // Last defined column - $irwMac = 0x0000; // Used by Excel to optimise loading - $reserved = 0x0000; // Reserved - $grbit = 0x0000; // Option flags - $ixfe = $xfIndex; - - if ($height < 0) { - $height = null; - } - - // Use writeRow($row, null, $XF) to set XF format without setting height - if ($height != null) { - $miyRw = $height * 20; // row height - } else { - $miyRw = 0xff; // default row height is 256 - } - - // Set the options flags. fUnsynced is used to show that the font and row - // heights are not compatible. This is usually the case for WriteExcel. - // The collapsed flag 0x10 doesn't seem to be used to indicate that a row - // is collapsed. Instead it is used to indicate that the previous row is - // collapsed. The zero height flag, 0x20, is used to collapse a row. - - $grbit |= $level; - if ($hidden) { - $grbit |= 0x0030; - } - if ($height !== null) { - $grbit |= 0x0040; // fUnsynced - } - if ($xfIndex !== 0xF) { - $grbit |= 0x0080; - } - $grbit |= 0x0100; - - $header = pack("vv", $record, $length); - $data = pack("vvvvvvvv", $row, $colMic, $colMac, $miyRw, $irwMac, $reserved, $grbit, $ixfe); - $this->append($header.$data); - } - - /** - * Writes Excel DIMENSIONS to define the area in which there is data. - */ - private function writeDimensions() - { - $record = 0x0200; // Record identifier - - $length = 0x000E; - $data = pack('VVvvv', $this->firstRowIndex, $this->lastRowIndex + 1, $this->firstColumnIndex, $this->lastColumnIndex + 1, 0x0000); // reserved - - $header = pack("vv", $record, $length); - $this->append($header.$data); - } - - /** - * Write BIFF record Window2. - */ - private function writeWindow2() - { - $record = 0x023E; // Record identifier - $length = 0x0012; - - $grbit = 0x00B6; // Option flags - $rwTop = 0x0000; // Top row visible in window - $colLeft = 0x0000; // Leftmost column visible in window - - - // The options flags that comprise $grbit - $fDspFmla = 0; // 0 - bit - $fDspGrid = $this->phpSheet->getShowGridlines() ? 1 : 0; // 1 - $fDspRwCol = $this->phpSheet->getShowRowColHeaders() ? 1 : 0; // 2 - $fFrozen = $this->phpSheet->getFreezePane() ? 1 : 0; // 3 - $fDspZeros = 1; // 4 - $fDefaultHdr = 1; // 5 - $fArabic = $this->phpSheet->getRightToLeft() ? 1 : 0; // 6 - $fDspGuts = $this->outlineOn; // 7 - $fFrozenNoSplit = 0; // 0 - bit - // no support in PHPExcel for selected sheet, therefore sheet is only selected if it is the active sheet - $fSelected = ($this->phpSheet === $this->phpSheet->getParent()->getActiveSheet()) ? 1 : 0; - $fPaged = 1; // 2 - $fPageBreakPreview = $this->phpSheet->getSheetView()->getView() === PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_BREAK_PREVIEW; - - $grbit = $fDspFmla; - $grbit |= $fDspGrid << 1; - $grbit |= $fDspRwCol << 2; - $grbit |= $fFrozen << 3; - $grbit |= $fDspZeros << 4; - $grbit |= $fDefaultHdr << 5; - $grbit |= $fArabic << 6; - $grbit |= $fDspGuts << 7; - $grbit |= $fFrozenNoSplit << 8; - $grbit |= $fSelected << 9; - $grbit |= $fPaged << 10; - $grbit |= $fPageBreakPreview << 11; - - $header = pack("vv", $record, $length); - $data = pack("vvv", $grbit, $rwTop, $colLeft); - - // FIXME !!! - $rgbHdr = 0x0040; // Row/column heading and gridline color index - $zoom_factor_page_break = ($fPageBreakPreview ? $this->phpSheet->getSheetView()->getZoomScale() : 0x0000); - $zoom_factor_normal = $this->phpSheet->getSheetView()->getZoomScaleNormal(); - - $data .= pack("vvvvV", $rgbHdr, 0x0000, $zoom_factor_page_break, $zoom_factor_normal, 0x00000000); - - $this->append($header.$data); - } - - /** - * Write BIFF record DEFAULTROWHEIGHT. - */ - private function writeDefaultRowHeight() - { - $defaultRowHeight = $this->phpSheet->getDefaultRowDimension()->getRowHeight(); - - if ($defaultRowHeight < 0) { - return; - } - - // convert to twips - $defaultRowHeight = (int) 20 * $defaultRowHeight; - - $record = 0x0225; // Record identifier - $length = 0x0004; // Number of bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("vv", 1, $defaultRowHeight); - $this->append($header . $data); - } - - /** - * Write BIFF record DEFCOLWIDTH if COLINFO records are in use. - */ - private function writeDefcol() - { - $defaultColWidth = 8; - - $record = 0x0055; // Record identifier - $length = 0x0002; // Number of bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("v", $defaultColWidth); - $this->append($header . $data); - } - - /** - * Write BIFF record COLINFO to define column widths - * - * Note: The SDK says the record length is 0x0B but Excel writes a 0x0C - * length record. - * - * @param array $col_array This is the only parameter received and is composed of the following: - * 0 => First formatted column, - * 1 => Last formatted column, - * 2 => Col width (8.43 is Excel default), - * 3 => The optional XF format of the column, - * 4 => Option flags. - * 5 => Optional outline level - */ - private function writeColinfo($col_array) - { - if (isset($col_array[0])) { - $colFirst = $col_array[0]; - } - if (isset($col_array[1])) { - $colLast = $col_array[1]; - } - if (isset($col_array[2])) { - $coldx = $col_array[2]; - } else { - $coldx = 8.43; - } - if (isset($col_array[3])) { - $xfIndex = $col_array[3]; - } else { - $xfIndex = 15; - } - if (isset($col_array[4])) { - $grbit = $col_array[4]; - } else { - $grbit = 0; - } - if (isset($col_array[5])) { - $level = $col_array[5]; - } else { - $level = 0; - } - $record = 0x007D; // Record identifier - $length = 0x000C; // Number of bytes to follow - - $coldx *= 256; // Convert to units of 1/256 of a char - - $ixfe = $xfIndex; - $reserved = 0x0000; // Reserved - - $level = max(0, min($level, 7)); - $grbit |= $level << 8; - - $header = pack("vv", $record, $length); - $data = pack("vvvvvv", $colFirst, $colLast, $coldx, $ixfe, $grbit, $reserved); - $this->append($header.$data); - } - - /** - * Write BIFF record SELECTION. - */ - private function writeSelection() - { - // look up the selected cell range - $selectedCells = $this->phpSheet->getSelectedCells(); - $selectedCells = PHPExcel_Cell::splitRange($this->phpSheet->getSelectedCells()); - $selectedCells = $selectedCells[0]; - if (count($selectedCells) == 2) { - list($first, $last) = $selectedCells; - } else { - $first = $selectedCells[0]; - $last = $selectedCells[0]; - } - - list($colFirst, $rwFirst) = PHPExcel_Cell::coordinateFromString($first); - $colFirst = PHPExcel_Cell::columnIndexFromString($colFirst) - 1; // base 0 column index - --$rwFirst; // base 0 row index - - list($colLast, $rwLast) = PHPExcel_Cell::coordinateFromString($last); - $colLast = PHPExcel_Cell::columnIndexFromString($colLast) - 1; // base 0 column index - --$rwLast; // base 0 row index - - // make sure we are not out of bounds - $colFirst = min($colFirst, 255); - $colLast = min($colLast, 255); - - $rwFirst = min($rwFirst, 65535); - $rwLast = min($rwLast, 65535); - - $record = 0x001D; // Record identifier - $length = 0x000F; // Number of bytes to follow - - $pnn = $this->activePane; // Pane position - $rwAct = $rwFirst; // Active row - $colAct = $colFirst; // Active column - $irefAct = 0; // Active cell ref - $cref = 1; // Number of refs - - if (!isset($rwLast)) { - $rwLast = $rwFirst; // Last row in reference - } - if (!isset($colLast)) { - $colLast = $colFirst; // Last col in reference - } - - // Swap last row/col for first row/col as necessary - if ($rwFirst > $rwLast) { - list($rwFirst, $rwLast) = array($rwLast, $rwFirst); - } - - if ($colFirst > $colLast) { - list($colFirst, $colLast) = array($colLast, $colFirst); - } - - $header = pack("vv", $record, $length); - $data = pack("CvvvvvvCC", $pnn, $rwAct, $colAct, $irefAct, $cref, $rwFirst, $rwLast, $colFirst, $colLast); - $this->append($header . $data); - } - - /** - * Store the MERGEDCELLS records for all ranges of merged cells - */ - private function writeMergedCells() - { - $mergeCells = $this->phpSheet->getMergeCells(); - $countMergeCells = count($mergeCells); - - if ($countMergeCells == 0) { - return; - } - - // maximum allowed number of merged cells per record - $maxCountMergeCellsPerRecord = 1027; - - // record identifier - $record = 0x00E5; - - // counter for total number of merged cells treated so far by the writer - $i = 0; - - // counter for number of merged cells written in record currently being written - $j = 0; - - // initialize record data - $recordData = ''; - - // loop through the merged cells - foreach ($mergeCells as $mergeCell) { - ++$i; - ++$j; - - // extract the row and column indexes - $range = PHPExcel_Cell::splitRange($mergeCell); - list($first, $last) = $range[0]; - list($firstColumn, $firstRow) = PHPExcel_Cell::coordinateFromString($first); - list($lastColumn, $lastRow) = PHPExcel_Cell::coordinateFromString($last); - - $recordData .= pack('vvvv', $firstRow - 1, $lastRow - 1, PHPExcel_Cell::columnIndexFromString($firstColumn) - 1, PHPExcel_Cell::columnIndexFromString($lastColumn) - 1); - - // flush record if we have reached limit for number of merged cells, or reached final merged cell - if ($j == $maxCountMergeCellsPerRecord or $i == $countMergeCells) { - $recordData = pack('v', $j) . $recordData; - $length = strlen($recordData); - $header = pack('vv', $record, $length); - $this->append($header . $recordData); - - // initialize for next record, if any - $recordData = ''; - $j = 0; - } - } - } - - /** - * Write SHEETLAYOUT record - */ - private function writeSheetLayout() - { - if (!$this->phpSheet->isTabColorSet()) { - return; - } - - $recordData = pack( - 'vvVVVvv', - 0x0862, - 0x0000, // unused - 0x00000000, // unused - 0x00000000, // unused - 0x00000014, // size of record data - $this->colors[$this->phpSheet->getTabColor()->getRGB()], // color index - 0x0000 // unused - ); - - $length = strlen($recordData); - - $record = 0x0862; // Record identifier - $header = pack('vv', $record, $length); - $this->append($header . $recordData); - } - - /** - * Write SHEETPROTECTION - */ - private function writeSheetProtection() - { - // record identifier - $record = 0x0867; - - // prepare options - $options = (int) !$this->phpSheet->getProtection()->getObjects() - | (int) !$this->phpSheet->getProtection()->getScenarios() << 1 - | (int) !$this->phpSheet->getProtection()->getFormatCells() << 2 - | (int) !$this->phpSheet->getProtection()->getFormatColumns() << 3 - | (int) !$this->phpSheet->getProtection()->getFormatRows() << 4 - | (int) !$this->phpSheet->getProtection()->getInsertColumns() << 5 - | (int) !$this->phpSheet->getProtection()->getInsertRows() << 6 - | (int) !$this->phpSheet->getProtection()->getInsertHyperlinks() << 7 - | (int) !$this->phpSheet->getProtection()->getDeleteColumns() << 8 - | (int) !$this->phpSheet->getProtection()->getDeleteRows() << 9 - | (int) !$this->phpSheet->getProtection()->getSelectLockedCells() << 10 - | (int) !$this->phpSheet->getProtection()->getSort() << 11 - | (int) !$this->phpSheet->getProtection()->getAutoFilter() << 12 - | (int) !$this->phpSheet->getProtection()->getPivotTables() << 13 - | (int) !$this->phpSheet->getProtection()->getSelectUnlockedCells() << 14 ; - - // record data - $recordData = pack( - 'vVVCVVvv', - 0x0867, // repeated record identifier - 0x0000, // not used - 0x0000, // not used - 0x00, // not used - 0x01000200, // unknown data - 0xFFFFFFFF, // unknown data - $options, // options - 0x0000 // not used - ); - - $length = strlen($recordData); - $header = pack('vv', $record, $length); - - $this->append($header . $recordData); - } - - /** - * Write BIFF record RANGEPROTECTION - * - * Openoffice.org's Documentaion of the Microsoft Excel File Format uses term RANGEPROTECTION for these records - * Microsoft Office Excel 97-2007 Binary File Format Specification uses term FEAT for these records - */ - private function writeRangeProtection() - { - foreach ($this->phpSheet->getProtectedCells() as $range => $password) { - // number of ranges, e.g. 'A1:B3 C20:D25' - $cellRanges = explode(' ', $range); - $cref = count($cellRanges); - - $recordData = pack( - 'vvVVvCVvVv', - 0x0868, - 0x00, - 0x0000, - 0x0000, - 0x02, - 0x0, - 0x0000, - $cref, - 0x0000, - 0x00 - ); - - foreach ($cellRanges as $cellRange) { - $recordData .= $this->writeBIFF8CellRangeAddressFixed($cellRange); - } - - // the rgbFeat structure - $recordData .= pack( - 'VV', - 0x0000, - hexdec($password) - ); - - $recordData .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong('p' . md5($recordData)); - - $length = strlen($recordData); - - $record = 0x0868; // Record identifier - $header = pack("vv", $record, $length); - $this->append($header . $recordData); - } - } - - /** - * Write BIFF record EXTERNCOUNT to indicate the number of external sheet - * references in a worksheet. - * - * Excel only stores references to external sheets that are used in formulas. - * For simplicity we store references to all the sheets in the workbook - * regardless of whether they are used or not. This reduces the overall - * complexity and eliminates the need for a two way dialogue between the formula - * parser the worksheet objects. - * - * @param integer $count The number of external sheet references in this worksheet - */ - private function writeExterncount($count) - { - $record = 0x0016; // Record identifier - $length = 0x0002; // Number of bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("v", $count); - $this->append($header . $data); - } - - /** - * Writes the Excel BIFF EXTERNSHEET record. These references are used by - * formulas. A formula references a sheet name via an index. Since we store a - * reference to all of the external worksheets the EXTERNSHEET index is the same - * as the worksheet index. - * - * @param string $sheetname The name of a external worksheet - */ - private function writeExternsheet($sheetname) - { - $record = 0x0017; // Record identifier - - // References to the current sheet are encoded differently to references to - // external sheets. - // - if ($this->phpSheet->getTitle() == $sheetname) { - $sheetname = ''; - $length = 0x02; // The following 2 bytes - $cch = 1; // The following byte - $rgch = 0x02; // Self reference - } else { - $length = 0x02 + strlen($sheetname); - $cch = strlen($sheetname); - $rgch = 0x03; // Reference to a sheet in the current workbook - } - - $header = pack("vv", $record, $length); - $data = pack("CC", $cch, $rgch); - $this->append($header . $data . $sheetname); - } - - /** - * Writes the Excel BIFF PANE record. - * The panes can either be frozen or thawed (unfrozen). - * Frozen panes are specified in terms of an integer number of rows and columns. - * Thawed panes are specified in terms of Excel's units for rows and columns. - */ - private function writePanes() - { - $panes = array(); - if ($freezePane = $this->phpSheet->getFreezePane()) { - list($column, $row) = PHPExcel_Cell::coordinateFromString($freezePane); - $panes[0] = $row - 1; - $panes[1] = PHPExcel_Cell::columnIndexFromString($column) - 1; - } else { - // thaw panes - return; - } - - $y = isset($panes[0]) ? $panes[0] : null; - $x = isset($panes[1]) ? $panes[1] : null; - $rwTop = isset($panes[2]) ? $panes[2] : null; - $colLeft = isset($panes[3]) ? $panes[3] : null; - if (count($panes) > 4) { // if Active pane was received - $pnnAct = $panes[4]; - } else { - $pnnAct = null; - } - $record = 0x0041; // Record identifier - $length = 0x000A; // Number of bytes to follow - - // Code specific to frozen or thawed panes. - if ($this->phpSheet->getFreezePane()) { - // Set default values for $rwTop and $colLeft - if (!isset($rwTop)) { - $rwTop = $y; - } - if (!isset($colLeft)) { - $colLeft = $x; - } - } else { - // Set default values for $rwTop and $colLeft - if (!isset($rwTop)) { - $rwTop = 0; - } - if (!isset($colLeft)) { - $colLeft = 0; - } - - // Convert Excel's row and column units to the internal units. - // The default row height is 12.75 - // The default column width is 8.43 - // The following slope and intersection values were interpolated. - // - $y = 20*$y + 255; - $x = 113.879*$x + 390; - } - - - // Determine which pane should be active. There is also the undocumented - // option to override this should it be necessary: may be removed later. - // - if (!isset($pnnAct)) { - if ($x != 0 && $y != 0) { - $pnnAct = 0; // Bottom right - } - if ($x != 0 && $y == 0) { - $pnnAct = 1; // Top right - } - if ($x == 0 && $y != 0) { - $pnnAct = 2; // Bottom left - } - if ($x == 0 && $y == 0) { - $pnnAct = 3; // Top left - } - } - - $this->activePane = $pnnAct; // Used in writeSelection - - $header = pack("vv", $record, $length); - $data = pack("vvvvv", $x, $y, $rwTop, $colLeft, $pnnAct); - $this->append($header . $data); - } - - /** - * Store the page setup SETUP BIFF record. - */ - private function writeSetup() - { - $record = 0x00A1; // Record identifier - $length = 0x0022; // Number of bytes to follow - - $iPaperSize = $this->phpSheet->getPageSetup()->getPaperSize(); // Paper size - - $iScale = $this->phpSheet->getPageSetup()->getScale() ? - $this->phpSheet->getPageSetup()->getScale() : 100; // Print scaling factor - - $iPageStart = 0x01; // Starting page number - $iFitWidth = (int) $this->phpSheet->getPageSetup()->getFitToWidth(); // Fit to number of pages wide - $iFitHeight = (int) $this->phpSheet->getPageSetup()->getFitToHeight(); // Fit to number of pages high - $grbit = 0x00; // Option flags - $iRes = 0x0258; // Print resolution - $iVRes = 0x0258; // Vertical print resolution - - $numHdr = $this->phpSheet->getPageMargins()->getHeader(); // Header Margin - - $numFtr = $this->phpSheet->getPageMargins()->getFooter(); // Footer Margin - $iCopies = 0x01; // Number of copies - - $fLeftToRight = 0x0; // Print over then down - - // Page orientation - $fLandscape = ($this->phpSheet->getPageSetup()->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? - 0x0 : 0x1; - - $fNoPls = 0x0; // Setup not read from printer - $fNoColor = 0x0; // Print black and white - $fDraft = 0x0; // Print draft quality - $fNotes = 0x0; // Print notes - $fNoOrient = 0x0; // Orientation not set - $fUsePage = 0x0; // Use custom starting page - - $grbit = $fLeftToRight; - $grbit |= $fLandscape << 1; - $grbit |= $fNoPls << 2; - $grbit |= $fNoColor << 3; - $grbit |= $fDraft << 4; - $grbit |= $fNotes << 5; - $grbit |= $fNoOrient << 6; - $grbit |= $fUsePage << 7; - - $numHdr = pack("d", $numHdr); - $numFtr = pack("d", $numFtr); - if (self::getByteOrder()) { // if it's Big Endian - $numHdr = strrev($numHdr); - $numFtr = strrev($numFtr); - } - - $header = pack("vv", $record, $length); - $data1 = pack("vvvvvvvv", $iPaperSize, $iScale, $iPageStart, $iFitWidth, $iFitHeight, $grbit, $iRes, $iVRes); - $data2 = $numHdr.$numFtr; - $data3 = pack("v", $iCopies); - $this->append($header . $data1 . $data2 . $data3); - } - - /** - * Store the header caption BIFF record. - */ - private function writeHeader() - { - $record = 0x0014; // Record identifier - - /* removing for now - // need to fix character count (multibyte!) - if (strlen($this->phpSheet->getHeaderFooter()->getOddHeader()) <= 255) { - $str = $this->phpSheet->getHeaderFooter()->getOddHeader(); // header string - } else { - $str = ''; - } - */ - - $recordData = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddHeader()); - $length = strlen($recordData); - - $header = pack("vv", $record, $length); - - $this->append($header . $recordData); - } - - /** - * Store the footer caption BIFF record. - */ - private function writeFooter() - { - $record = 0x0015; // Record identifier - - /* removing for now - // need to fix character count (multibyte!) - if (strlen($this->phpSheet->getHeaderFooter()->getOddFooter()) <= 255) { - $str = $this->phpSheet->getHeaderFooter()->getOddFooter(); - } else { - $str = ''; - } - */ - - $recordData = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($this->phpSheet->getHeaderFooter()->getOddFooter()); - $length = strlen($recordData); - - $header = pack("vv", $record, $length); - - $this->append($header . $recordData); - } - - /** - * Store the horizontal centering HCENTER BIFF record. - * - * @access private - */ - private function writeHcenter() - { - $record = 0x0083; // Record identifier - $length = 0x0002; // Bytes to follow - - $fHCenter = $this->phpSheet->getPageSetup()->getHorizontalCentered() ? 1 : 0; // Horizontal centering - - $header = pack("vv", $record, $length); - $data = pack("v", $fHCenter); - - $this->append($header.$data); - } - - /** - * Store the vertical centering VCENTER BIFF record. - */ - private function writeVcenter() - { - $record = 0x0084; // Record identifier - $length = 0x0002; // Bytes to follow - - $fVCenter = $this->phpSheet->getPageSetup()->getVerticalCentered() ? 1 : 0; // Horizontal centering - - $header = pack("vv", $record, $length); - $data = pack("v", $fVCenter); - $this->append($header . $data); - } - - /** - * Store the LEFTMARGIN BIFF record. - */ - private function writeMarginLeft() - { - $record = 0x0026; // Record identifier - $length = 0x0008; // Bytes to follow - - $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches - - $header = pack("vv", $record, $length); - $data = pack("d", $margin); - if (self::getByteOrder()) { // if it's Big Endian - $data = strrev($data); - } - - $this->append($header . $data); - } - - /** - * Store the RIGHTMARGIN BIFF record. - */ - private function writeMarginRight() - { - $record = 0x0027; // Record identifier - $length = 0x0008; // Bytes to follow - - $margin = $this->phpSheet->getPageMargins()->getRight(); // Margin in inches - - $header = pack("vv", $record, $length); - $data = pack("d", $margin); - if (self::getByteOrder()) { // if it's Big Endian - $data = strrev($data); - } - - $this->append($header . $data); - } - - /** - * Store the TOPMARGIN BIFF record. - */ - private function writeMarginTop() - { - $record = 0x0028; // Record identifier - $length = 0x0008; // Bytes to follow - - $margin = $this->phpSheet->getPageMargins()->getTop(); // Margin in inches - - $header = pack("vv", $record, $length); - $data = pack("d", $margin); - if (self::getByteOrder()) { // if it's Big Endian - $data = strrev($data); - } - - $this->append($header . $data); - } - - /** - * Store the BOTTOMMARGIN BIFF record. - */ - private function writeMarginBottom() - { - $record = 0x0029; // Record identifier - $length = 0x0008; // Bytes to follow - - $margin = $this->phpSheet->getPageMargins()->getBottom(); // Margin in inches - - $header = pack("vv", $record, $length); - $data = pack("d", $margin); - if (self::getByteOrder()) { // if it's Big Endian - $data = strrev($data); - } - - $this->append($header . $data); - } - - /** - * Write the PRINTHEADERS BIFF record. - */ - private function writePrintHeaders() - { - $record = 0x002a; // Record identifier - $length = 0x0002; // Bytes to follow - - $fPrintRwCol = $this->_print_headers; // Boolean flag - - $header = pack("vv", $record, $length); - $data = pack("v", $fPrintRwCol); - $this->append($header . $data); - } - - /** - * Write the PRINTGRIDLINES BIFF record. Must be used in conjunction with the - * GRIDSET record. - */ - private function writePrintGridlines() - { - $record = 0x002b; // Record identifier - $length = 0x0002; // Bytes to follow - - $fPrintGrid = $this->phpSheet->getPrintGridlines() ? 1 : 0; // Boolean flag - - $header = pack("vv", $record, $length); - $data = pack("v", $fPrintGrid); - $this->append($header . $data); - } - - /** - * Write the GRIDSET BIFF record. Must be used in conjunction with the - * PRINTGRIDLINES record. - */ - private function writeGridset() - { - $record = 0x0082; // Record identifier - $length = 0x0002; // Bytes to follow - - $fGridSet = !$this->phpSheet->getPrintGridlines(); // Boolean flag - - $header = pack("vv", $record, $length); - $data = pack("v", $fGridSet); - $this->append($header . $data); - } - - /** - * Write the AUTOFILTERINFO BIFF record. This is used to configure the number of autofilter select used in the sheet. - */ - private function writeAutoFilterInfo() - { - $record = 0x009D; // Record identifier - $length = 0x0002; // Bytes to follow - - $rangeBounds = PHPExcel_Cell::rangeBoundaries($this->phpSheet->getAutoFilter()->getRange()); - $iNumFilters = 1 + $rangeBounds[1][0] - $rangeBounds[0][0]; - - $header = pack("vv", $record, $length); - $data = pack("v", $iNumFilters); - $this->append($header . $data); - } - - /** - * Write the GUTS BIFF record. This is used to configure the gutter margins - * where Excel outline symbols are displayed. The visibility of the gutters is - * controlled by a flag in WSBOOL. - * - * @see writeWsbool() - */ - private function writeGuts() - { - $record = 0x0080; // Record identifier - $length = 0x0008; // Bytes to follow - - $dxRwGut = 0x0000; // Size of row gutter - $dxColGut = 0x0000; // Size of col gutter - - // determine maximum row outline level - $maxRowOutlineLevel = 0; - foreach ($this->phpSheet->getRowDimensions() as $rowDimension) { - $maxRowOutlineLevel = max($maxRowOutlineLevel, $rowDimension->getOutlineLevel()); - } - - $col_level = 0; - - // Calculate the maximum column outline level. The equivalent calculation - // for the row outline level is carried out in writeRow(). - $colcount = count($this->columnInfo); - for ($i = 0; $i < $colcount; ++$i) { - $col_level = max($this->columnInfo[$i][5], $col_level); - } - - // Set the limits for the outline levels (0 <= x <= 7). - $col_level = max(0, min($col_level, 7)); - - // The displayed level is one greater than the max outline levels - if ($maxRowOutlineLevel) { - ++$maxRowOutlineLevel; - } - if ($col_level) { - ++$col_level; - } - - $header = pack("vv", $record, $length); - $data = pack("vvvv", $dxRwGut, $dxColGut, $maxRowOutlineLevel, $col_level); - - $this->append($header.$data); - } - - /** - * Write the WSBOOL BIFF record, mainly for fit-to-page. Used in conjunction - * with the SETUP record. - */ - private function writeWsbool() - { - $record = 0x0081; // Record identifier - $length = 0x0002; // Bytes to follow - $grbit = 0x0000; - - // The only option that is of interest is the flag for fit to page. So we - // set all the options in one go. - // - // Set the option flags - $grbit |= 0x0001; // Auto page breaks visible - if ($this->outlineStyle) { - $grbit |= 0x0020; // Auto outline styles - } - if ($this->phpSheet->getShowSummaryBelow()) { - $grbit |= 0x0040; // Outline summary below - } - if ($this->phpSheet->getShowSummaryRight()) { - $grbit |= 0x0080; // Outline summary right - } - if ($this->phpSheet->getPageSetup()->getFitToPage()) { - $grbit |= 0x0100; // Page setup fit to page - } - if ($this->outlineOn) { - $grbit |= 0x0400; // Outline symbols displayed - } - - $header = pack("vv", $record, $length); - $data = pack("v", $grbit); - $this->append($header . $data); - } - - /** - * Write the HORIZONTALPAGEBREAKS and VERTICALPAGEBREAKS BIFF records. - */ - private function writeBreaks() - { - // initialize - $vbreaks = array(); - $hbreaks = array(); - - foreach ($this->phpSheet->getBreaks() as $cell => $breakType) { - // Fetch coordinates - $coordinates = PHPExcel_Cell::coordinateFromString($cell); - - // Decide what to do by the type of break - switch ($breakType) { - case PHPExcel_Worksheet::BREAK_COLUMN: - // Add to list of vertical breaks - $vbreaks[] = PHPExcel_Cell::columnIndexFromString($coordinates[0]) - 1; - break; - case PHPExcel_Worksheet::BREAK_ROW: - // Add to list of horizontal breaks - $hbreaks[] = $coordinates[1]; - break; - case PHPExcel_Worksheet::BREAK_NONE: - default: - // Nothing to do - break; - } - } - - //horizontal page breaks - if (!empty($hbreaks)) { - // Sort and filter array of page breaks - sort($hbreaks, SORT_NUMERIC); - if ($hbreaks[0] == 0) { // don't use first break if it's 0 - array_shift($hbreaks); - } - - $record = 0x001b; // Record identifier - $cbrk = count($hbreaks); // Number of page breaks - $length = 2 + 6 * $cbrk; // Bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("v", $cbrk); - - // Append each page break - foreach ($hbreaks as $hbreak) { - $data .= pack("vvv", $hbreak, 0x0000, 0x00ff); - } - - $this->append($header . $data); - } - - // vertical page breaks - if (!empty($vbreaks)) { - // 1000 vertical pagebreaks appears to be an internal Excel 5 limit. - // It is slightly higher in Excel 97/200, approx. 1026 - $vbreaks = array_slice($vbreaks, 0, 1000); - - // Sort and filter array of page breaks - sort($vbreaks, SORT_NUMERIC); - if ($vbreaks[0] == 0) { // don't use first break if it's 0 - array_shift($vbreaks); - } - - $record = 0x001a; // Record identifier - $cbrk = count($vbreaks); // Number of page breaks - $length = 2 + 6 * $cbrk; // Bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("v", $cbrk); - - // Append each page break - foreach ($vbreaks as $vbreak) { - $data .= pack("vvv", $vbreak, 0x0000, 0xffff); - } - - $this->append($header . $data); - } - } - - /** - * Set the Biff PROTECT record to indicate that the worksheet is protected. - */ - private function writeProtect() - { - // Exit unless sheet protection has been specified - if (!$this->phpSheet->getProtection()->getSheet()) { - return; - } - - $record = 0x0012; // Record identifier - $length = 0x0002; // Bytes to follow - - $fLock = 1; // Worksheet is protected - - $header = pack("vv", $record, $length); - $data = pack("v", $fLock); - - $this->append($header.$data); - } - - /** - * Write SCENPROTECT - */ - private function writeScenProtect() - { - // Exit if sheet protection is not active - if (!$this->phpSheet->getProtection()->getSheet()) { - return; - } - - // Exit if scenarios are not protected - if (!$this->phpSheet->getProtection()->getScenarios()) { - return; - } - - $record = 0x00DD; // Record identifier - $length = 0x0002; // Bytes to follow - - $header = pack('vv', $record, $length); - $data = pack('v', 1); - - $this->append($header . $data); - } - - /** - * Write OBJECTPROTECT - */ - private function writeObjectProtect() - { - // Exit if sheet protection is not active - if (!$this->phpSheet->getProtection()->getSheet()) { - return; - } - - // Exit if objects are not protected - if (!$this->phpSheet->getProtection()->getObjects()) { - return; - } - - $record = 0x0063; // Record identifier - $length = 0x0002; // Bytes to follow - - $header = pack('vv', $record, $length); - $data = pack('v', 1); - - $this->append($header . $data); - } - - /** - * Write the worksheet PASSWORD record. - */ - private function writePassword() - { - // Exit unless sheet protection and password have been specified - if (!$this->phpSheet->getProtection()->getSheet() || !$this->phpSheet->getProtection()->getPassword()) { - return; - } - - $record = 0x0013; // Record identifier - $length = 0x0002; // Bytes to follow - - $wPassword = hexdec($this->phpSheet->getProtection()->getPassword()); // Encoded password - - $header = pack("vv", $record, $length); - $data = pack("v", $wPassword); - - $this->append($header . $data); - } - - /** - * Insert a 24bit bitmap image in a worksheet. - * - * @access public - * @param integer $row The row we are going to insert the bitmap into - * @param integer $col The column we are going to insert the bitmap into - * @param mixed $bitmap The bitmap filename or GD-image resource - * @param integer $x The horizontal position (offset) of the image inside the cell. - * @param integer $y The vertical position (offset) of the image inside the cell. - * @param float $scale_x The horizontal scale - * @param float $scale_y The vertical scale - */ - public function insertBitmap($row, $col, $bitmap, $x = 0, $y = 0, $scale_x = 1, $scale_y = 1) - { - $bitmap_array = (is_resource($bitmap) ? $this->processBitmapGd($bitmap) : $this->processBitmap($bitmap)); - list($width, $height, $size, $data) = $bitmap_array; //$this->processBitmap($bitmap); - - // Scale the frame of the image. - $width *= $scale_x; - $height *= $scale_y; - - // Calculate the vertices of the image and write the OBJ record - $this->positionImage($col, $row, $x, $y, $width, $height); - - // Write the IMDATA record to store the bitmap data - $record = 0x007f; - $length = 8 + $size; - $cf = 0x09; - $env = 0x01; - $lcb = $size; - - $header = pack("vvvvV", $record, $length, $cf, $env, $lcb); - $this->append($header.$data); - } - - /** - * Calculate the vertices that define the position of the image as required by - * the OBJ record. - * - * +------------+------------+ - * | A | B | - * +-----+------------+------------+ - * | |(x1,y1) | | - * | 1 |(A1)._______|______ | - * | | | | | - * | | | | | - * +-----+----| BITMAP |-----+ - * | | | | | - * | 2 | |______________. | - * | | | (B2)| - * | | | (x2,y2)| - * +---- +------------+------------+ - * - * Example of a bitmap that covers some of the area from cell A1 to cell B2. - * - * Based on the width and height of the bitmap we need to calculate 8 vars: - * $col_start, $row_start, $col_end, $row_end, $x1, $y1, $x2, $y2. - * The width and height of the cells are also variable and have to be taken into - * account. - * The values of $col_start and $row_start are passed in from the calling - * function. The values of $col_end and $row_end are calculated by subtracting - * the width and height of the bitmap from the width and height of the - * underlying cells. - * The vertices are expressed as a percentage of the underlying cell width as - * follows (rhs values are in pixels): - * - * x1 = X / W *1024 - * y1 = Y / H *256 - * x2 = (X-1) / W *1024 - * y2 = (Y-1) / H *256 - * - * Where: X is distance from the left side of the underlying cell - * Y is distance from the top of the underlying cell - * W is the width of the cell - * H is the height of the cell - * The SDK incorrectly states that the height should be expressed as a - * percentage of 1024. - * - * @access private - * @param integer $col_start Col containing upper left corner of object - * @param integer $row_start Row containing top left corner of object - * @param integer $x1 Distance to left side of object - * @param integer $y1 Distance to top of object - * @param integer $width Width of image frame - * @param integer $height Height of image frame - */ - public function positionImage($col_start, $row_start, $x1, $y1, $width, $height) - { - // Initialise end cell to the same as the start cell - $col_end = $col_start; // Col containing lower right corner of object - $row_end = $row_start; // Row containing bottom right corner of object - - // Zero the specified offset if greater than the cell dimensions - if ($x1 >= PHPExcel_Shared_Excel5::sizeCol($this->phpSheet, PHPExcel_Cell::stringFromColumnIndex($col_start))) { - $x1 = 0; - } - if ($y1 >= PHPExcel_Shared_Excel5::sizeRow($this->phpSheet, $row_start + 1)) { - $y1 = 0; - } - - $width = $width + $x1 -1; - $height = $height + $y1 -1; - - // Subtract the underlying cell widths to find the end cell of the image - while ($width >= PHPExcel_Shared_Excel5::sizeCol($this->phpSheet, PHPExcel_Cell::stringFromColumnIndex($col_end))) { - $width -= PHPExcel_Shared_Excel5::sizeCol($this->phpSheet, PHPExcel_Cell::stringFromColumnIndex($col_end)); - ++$col_end; - } - - // Subtract the underlying cell heights to find the end cell of the image - while ($height >= PHPExcel_Shared_Excel5::sizeRow($this->phpSheet, $row_end + 1)) { - $height -= PHPExcel_Shared_Excel5::sizeRow($this->phpSheet, $row_end + 1); - ++$row_end; - } - - // Bitmap isn't allowed to start or finish in a hidden cell, i.e. a cell - // with zero eight or width. - // - if (PHPExcel_Shared_Excel5::sizeCol($this->phpSheet, PHPExcel_Cell::stringFromColumnIndex($col_start)) == 0) { - return; - } - if (PHPExcel_Shared_Excel5::sizeCol($this->phpSheet, PHPExcel_Cell::stringFromColumnIndex($col_end)) == 0) { - return; - } - if (PHPExcel_Shared_Excel5::sizeRow($this->phpSheet, $row_start + 1) == 0) { - return; - } - if (PHPExcel_Shared_Excel5::sizeRow($this->phpSheet, $row_end + 1) == 0) { - return; - } - - // Convert the pixel values to the percentage value expected by Excel - $x1 = $x1 / PHPExcel_Shared_Excel5::sizeCol($this->phpSheet, PHPExcel_Cell::stringFromColumnIndex($col_start)) * 1024; - $y1 = $y1 / PHPExcel_Shared_Excel5::sizeRow($this->phpSheet, $row_start + 1) * 256; - $x2 = $width / PHPExcel_Shared_Excel5::sizeCol($this->phpSheet, PHPExcel_Cell::stringFromColumnIndex($col_end)) * 1024; // Distance to right side of object - $y2 = $height / PHPExcel_Shared_Excel5::sizeRow($this->phpSheet, $row_end + 1) * 256; // Distance to bottom of object - - $this->writeObjPicture($col_start, $x1, $row_start, $y1, $col_end, $x2, $row_end, $y2); - } - - /** - * Store the OBJ record that precedes an IMDATA record. This could be generalise - * to support other Excel objects. - * - * @param integer $colL Column containing upper left corner of object - * @param integer $dxL Distance from left side of cell - * @param integer $rwT Row containing top left corner of object - * @param integer $dyT Distance from top of cell - * @param integer $colR Column containing lower right corner of object - * @param integer $dxR Distance from right of cell - * @param integer $rwB Row containing bottom right corner of object - * @param integer $dyB Distance from bottom of cell - */ - private function writeObjPicture($colL, $dxL, $rwT, $dyT, $colR, $dxR, $rwB, $dyB) - { - $record = 0x005d; // Record identifier - $length = 0x003c; // Bytes to follow - - $cObj = 0x0001; // Count of objects in file (set to 1) - $OT = 0x0008; // Object type. 8 = Picture - $id = 0x0001; // Object ID - $grbit = 0x0614; // Option flags - - $cbMacro = 0x0000; // Length of FMLA structure - $Reserved1 = 0x0000; // Reserved - $Reserved2 = 0x0000; // Reserved - - $icvBack = 0x09; // Background colour - $icvFore = 0x09; // Foreground colour - $fls = 0x00; // Fill pattern - $fAuto = 0x00; // Automatic fill - $icv = 0x08; // Line colour - $lns = 0xff; // Line style - $lnw = 0x01; // Line weight - $fAutoB = 0x00; // Automatic border - $frs = 0x0000; // Frame style - $cf = 0x0009; // Image format, 9 = bitmap - $Reserved3 = 0x0000; // Reserved - $cbPictFmla = 0x0000; // Length of FMLA structure - $Reserved4 = 0x0000; // Reserved - $grbit2 = 0x0001; // Option flags - $Reserved5 = 0x0000; // Reserved - - - $header = pack("vv", $record, $length); - $data = pack("V", $cObj); - $data .= pack("v", $OT); - $data .= pack("v", $id); - $data .= pack("v", $grbit); - $data .= pack("v", $colL); - $data .= pack("v", $dxL); - $data .= pack("v", $rwT); - $data .= pack("v", $dyT); - $data .= pack("v", $colR); - $data .= pack("v", $dxR); - $data .= pack("v", $rwB); - $data .= pack("v", $dyB); - $data .= pack("v", $cbMacro); - $data .= pack("V", $Reserved1); - $data .= pack("v", $Reserved2); - $data .= pack("C", $icvBack); - $data .= pack("C", $icvFore); - $data .= pack("C", $fls); - $data .= pack("C", $fAuto); - $data .= pack("C", $icv); - $data .= pack("C", $lns); - $data .= pack("C", $lnw); - $data .= pack("C", $fAutoB); - $data .= pack("v", $frs); - $data .= pack("V", $cf); - $data .= pack("v", $Reserved3); - $data .= pack("v", $cbPictFmla); - $data .= pack("v", $Reserved4); - $data .= pack("v", $grbit2); - $data .= pack("V", $Reserved5); - - $this->append($header . $data); - } - - /** - * Convert a GD-image into the internal format. - * - * @access private - * @param resource $image The image to process - * @return array Array with data and properties of the bitmap - */ - public function processBitmapGd($image) - { - $width = imagesx($image); - $height = imagesy($image); - - $data = pack("Vvvvv", 0x000c, $width, $height, 0x01, 0x18); - for ($j=$height; $j--;) { - for ($i=0; $i < $width; ++$i) { - $color = imagecolorsforindex($image, imagecolorat($image, $i, $j)); - foreach (array("red", "green", "blue") as $key) { - $color[$key] = $color[$key] + round((255 - $color[$key]) * $color["alpha"] / 127); - } - $data .= chr($color["blue"]) . chr($color["green"]) . chr($color["red"]); - } - if (3*$width % 4) { - $data .= str_repeat("\x00", 4 - 3*$width % 4); - } - } - - return array($width, $height, strlen($data), $data); - } - - /** - * Convert a 24 bit bitmap into the modified internal format used by Windows. - * This is described in BITMAPCOREHEADER and BITMAPCOREINFO structures in the - * MSDN library. - * - * @access private - * @param string $bitmap The bitmap to process - * @return array Array with data and properties of the bitmap - */ - public function processBitmap($bitmap) - { - // Open file. - $bmp_fd = @fopen($bitmap, "rb"); - if (!$bmp_fd) { - throw new PHPExcel_Writer_Exception("Couldn't import $bitmap"); - } - - // Slurp the file into a string. - $data = fread($bmp_fd, filesize($bitmap)); - - // Check that the file is big enough to be a bitmap. - if (strlen($data) <= 0x36) { - throw new PHPExcel_Writer_Exception("$bitmap doesn't contain enough data.\n"); - } - - // The first 2 bytes are used to identify the bitmap. - $identity = unpack("A2ident", $data); - if ($identity['ident'] != "BM") { - throw new PHPExcel_Writer_Exception("$bitmap doesn't appear to be a valid bitmap image.\n"); - } - - // Remove bitmap data: ID. - $data = substr($data, 2); - - // Read and remove the bitmap size. This is more reliable than reading - // the data size at offset 0x22. - // - $size_array = unpack("Vsa", substr($data, 0, 4)); - $size = $size_array['sa']; - $data = substr($data, 4); - $size -= 0x36; // Subtract size of bitmap header. - $size += 0x0C; // Add size of BIFF header. - - // Remove bitmap data: reserved, offset, header length. - $data = substr($data, 12); - - // Read and remove the bitmap width and height. Verify the sizes. - $width_and_height = unpack("V2", substr($data, 0, 8)); - $width = $width_and_height[1]; - $height = $width_and_height[2]; - $data = substr($data, 8); - if ($width > 0xFFFF) { - throw new PHPExcel_Writer_Exception("$bitmap: largest image width supported is 65k.\n"); - } - if ($height > 0xFFFF) { - throw new PHPExcel_Writer_Exception("$bitmap: largest image height supported is 65k.\n"); - } - - // Read and remove the bitmap planes and bpp data. Verify them. - $planes_and_bitcount = unpack("v2", substr($data, 0, 4)); - $data = substr($data, 4); - if ($planes_and_bitcount[2] != 24) { // Bitcount - throw new PHPExcel_Writer_Exception("$bitmap isn't a 24bit true color bitmap.\n"); - } - if ($planes_and_bitcount[1] != 1) { - throw new PHPExcel_Writer_Exception("$bitmap: only 1 plane supported in bitmap image.\n"); - } - - // Read and remove the bitmap compression. Verify compression. - $compression = unpack("Vcomp", substr($data, 0, 4)); - $data = substr($data, 4); - - //$compression = 0; - if ($compression['comp'] != 0) { - throw new PHPExcel_Writer_Exception("$bitmap: compression not supported in bitmap image.\n"); - } - - // Remove bitmap data: data size, hres, vres, colours, imp. colours. - $data = substr($data, 20); - - // Add the BITMAPCOREHEADER data - $header = pack("Vvvvv", 0x000c, $width, $height, 0x01, 0x18); - $data = $header . $data; - - return (array($width, $height, $size, $data)); - } - - /** - * Store the window zoom factor. This should be a reduced fraction but for - * simplicity we will store all fractions with a numerator of 100. - */ - private function writeZoom() - { - // If scale is 100 we don't need to write a record - if ($this->phpSheet->getSheetView()->getZoomScale() == 100) { - return; - } - - $record = 0x00A0; // Record identifier - $length = 0x0004; // Bytes to follow - - $header = pack("vv", $record, $length); - $data = pack("vv", $this->phpSheet->getSheetView()->getZoomScale(), 100); - $this->append($header . $data); - } - - /** - * Get Escher object - * - * @return PHPExcel_Shared_Escher - */ - public function getEscher() - { - return $this->escher; - } - - /** - * Set Escher object - * - * @param PHPExcel_Shared_Escher $pValue - */ - public function setEscher(PHPExcel_Shared_Escher $pValue = null) - { - $this->escher = $pValue; - } - - /** - * Write MSODRAWING record - */ - private function writeMsoDrawing() - { - // write the Escher stream if necessary - if (isset($this->escher)) { - $writer = new PHPExcel_Writer_Excel5_Escher($this->escher); - $data = $writer->close(); - $spOffsets = $writer->getSpOffsets(); - $spTypes = $writer->getSpTypes(); - // write the neccesary MSODRAWING, OBJ records - - // split the Escher stream - $spOffsets[0] = 0; - $nm = count($spOffsets) - 1; // number of shapes excluding first shape - for ($i = 1; $i <= $nm; ++$i) { - // MSODRAWING record - $record = 0x00EC; // Record identifier - - // chunk of Escher stream for one shape - $dataChunk = substr($data, $spOffsets[$i -1], $spOffsets[$i] - $spOffsets[$i - 1]); - - $length = strlen($dataChunk); - $header = pack("vv", $record, $length); - - $this->append($header . $dataChunk); - - // OBJ record - $record = 0x005D; // record identifier - $objData = ''; - - // ftCmo - if ($spTypes[$i] == 0x00C9) { - // Add ftCmo (common object data) subobject - $objData .= - pack( - 'vvvvvVVV', - 0x0015, // 0x0015 = ftCmo - 0x0012, // length of ftCmo data - 0x0014, // object type, 0x0014 = filter - $i, // object id number, Excel seems to use 1-based index, local for the sheet - 0x2101, // option flags, 0x2001 is what OpenOffice.org uses - 0, // reserved - 0, // reserved - 0 // reserved - ); - - // Add ftSbs Scroll bar subobject - $objData .= pack('vv', 0x00C, 0x0014); - $objData .= pack('H*', '0000000000000000640001000A00000010000100'); - // Add ftLbsData (List box data) subobject - $objData .= pack('vv', 0x0013, 0x1FEE); - $objData .= pack('H*', '00000000010001030000020008005700'); - } else { - // Add ftCmo (common object data) subobject - $objData .= - pack( - 'vvvvvVVV', - 0x0015, // 0x0015 = ftCmo - 0x0012, // length of ftCmo data - 0x0008, // object type, 0x0008 = picture - $i, // object id number, Excel seems to use 1-based index, local for the sheet - 0x6011, // option flags, 0x6011 is what OpenOffice.org uses - 0, // reserved - 0, // reserved - 0 // reserved - ); - } - - // ftEnd - $objData .= - pack( - 'vv', - 0x0000, // 0x0000 = ftEnd - 0x0000 // length of ftEnd data - ); - - $length = strlen($objData); - $header = pack('vv', $record, $length); - $this->append($header . $objData); - } - } - } - - /** - * Store the DATAVALIDATIONS and DATAVALIDATION records. - */ - private function writeDataValidity() - { - // Datavalidation collection - $dataValidationCollection = $this->phpSheet->getDataValidationCollection(); - - // Write data validations? - if (!empty($dataValidationCollection)) { - // DATAVALIDATIONS record - $record = 0x01B2; // Record identifier - $length = 0x0012; // Bytes to follow - - $grbit = 0x0000; // Prompt box at cell, no cached validity data at DV records - $horPos = 0x00000000; // Horizontal position of prompt box, if fixed position - $verPos = 0x00000000; // Vertical position of prompt box, if fixed position - $objId = 0xFFFFFFFF; // Object identifier of drop down arrow object, or -1 if not visible - - $header = pack('vv', $record, $length); - $data = pack('vVVVV', $grbit, $horPos, $verPos, $objId, count($dataValidationCollection)); - $this->append($header.$data); - - // DATAVALIDATION records - $record = 0x01BE; // Record identifier - - foreach ($dataValidationCollection as $cellCoordinate => $dataValidation) { - // initialize record data - $data = ''; - - // options - $options = 0x00000000; - - // data type - $type = $dataValidation->getType(); - switch ($type) { - case PHPExcel_Cell_DataValidation::TYPE_NONE: - $type = 0x00; - break; - case PHPExcel_Cell_DataValidation::TYPE_WHOLE: - $type = 0x01; - break; - case PHPExcel_Cell_DataValidation::TYPE_DECIMAL: - $type = 0x02; - break; - case PHPExcel_Cell_DataValidation::TYPE_LIST: - $type = 0x03; - break; - case PHPExcel_Cell_DataValidation::TYPE_DATE: - $type = 0x04; - break; - case PHPExcel_Cell_DataValidation::TYPE_TIME: - $type = 0x05; - break; - case PHPExcel_Cell_DataValidation::TYPE_TEXTLENGTH: - $type = 0x06; - break; - case PHPExcel_Cell_DataValidation::TYPE_CUSTOM: - $type = 0x07; - break; - } - $options |= $type << 0; - - // error style - $errorStyle = $dataValidation->getType(); - switch ($errorStyle) { - case PHPExcel_Cell_DataValidation::STYLE_STOP: - $errorStyle = 0x00; - break; - case PHPExcel_Cell_DataValidation::STYLE_WARNING: - $errorStyle = 0x01; - break; - case PHPExcel_Cell_DataValidation::STYLE_INFORMATION: - $errorStyle = 0x02; - break; - } - $options |= $errorStyle << 4; - - // explicit formula? - if ($type == 0x03 && preg_match('/^\".*\"$/', $dataValidation->getFormula1())) { - $options |= 0x01 << 7; - } - - // empty cells allowed - $options |= $dataValidation->getAllowBlank() << 8; - - // show drop down - $options |= (!$dataValidation->getShowDropDown()) << 9; - - // show input message - $options |= $dataValidation->getShowInputMessage() << 18; - - // show error message - $options |= $dataValidation->getShowErrorMessage() << 19; - - // condition operator - $operator = $dataValidation->getOperator(); - switch ($operator) { - case PHPExcel_Cell_DataValidation::OPERATOR_BETWEEN: - $operator = 0x00; - break; - case PHPExcel_Cell_DataValidation::OPERATOR_NOTBETWEEN: - $operator = 0x01; - break; - case PHPExcel_Cell_DataValidation::OPERATOR_EQUAL: - $operator = 0x02; - break; - case PHPExcel_Cell_DataValidation::OPERATOR_NOTEQUAL: - $operator = 0x03; - break; - case PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHAN: - $operator = 0x04; - break; - case PHPExcel_Cell_DataValidation::OPERATOR_LESSTHAN: - $operator = 0x05; - break; - case PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHANOREQUAL: - $operator = 0x06; - break; - case PHPExcel_Cell_DataValidation::OPERATOR_LESSTHANOREQUAL: - $operator = 0x07; - break; - } - $options |= $operator << 20; - - $data = pack('V', $options); - - // prompt title - $promptTitle = $dataValidation->getPromptTitle() !== '' ? - $dataValidation->getPromptTitle() : chr(0); - $data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($promptTitle); - - // error title - $errorTitle = $dataValidation->getErrorTitle() !== '' ? - $dataValidation->getErrorTitle() : chr(0); - $data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($errorTitle); - - // prompt text - $prompt = $dataValidation->getPrompt() !== '' ? - $dataValidation->getPrompt() : chr(0); - $data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($prompt); - - // error text - $error = $dataValidation->getError() !== '' ? - $dataValidation->getError() : chr(0); - $data .= PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($error); - - // formula 1 - try { - $formula1 = $dataValidation->getFormula1(); - if ($type == 0x03) { // list type - $formula1 = str_replace(',', chr(0), $formula1); - } - $this->parser->parse($formula1); - $formula1 = $this->parser->toReversePolish(); - $sz1 = strlen($formula1); - } catch (PHPExcel_Exception $e) { - $sz1 = 0; - $formula1 = ''; - } - $data .= pack('vv', $sz1, 0x0000); - $data .= $formula1; - - // formula 2 - try { - $formula2 = $dataValidation->getFormula2(); - if ($formula2 === '') { - throw new PHPExcel_Writer_Exception('No formula2'); - } - $this->parser->parse($formula2); - $formula2 = $this->parser->toReversePolish(); - $sz2 = strlen($formula2); - } catch (PHPExcel_Exception $e) { - $sz2 = 0; - $formula2 = ''; - } - $data .= pack('vv', $sz2, 0x0000); - $data .= $formula2; - - // cell range address list - $data .= pack('v', 0x0001); - $data .= $this->writeBIFF8CellRangeAddressFixed($cellCoordinate); - - $length = strlen($data); - $header = pack("vv", $record, $length); - - $this->append($header . $data); - } - } - } - - /** - * Map Error code - * - * @param string $errorCode - * @return int - */ - private static function mapErrorCode($errorCode) - { - switch ($errorCode) { - case '#NULL!': - return 0x00; - case '#DIV/0!': - return 0x07; - case '#VALUE!': - return 0x0F; - case '#REF!': - return 0x17; - case '#NAME?': - return 0x1D; - case '#NUM!': - return 0x24; - case '#N/A': - return 0x2A; - } - - return 0; - } - - /** - * Write PLV Record - */ - private function writePageLayoutView() - { - $record = 0x088B; // Record identifier - $length = 0x0010; // Bytes to follow - - $rt = 0x088B; // 2 - $grbitFrt = 0x0000; // 2 - $reserved = 0x0000000000000000; // 8 - $wScalvePLV = $this->phpSheet->getSheetView()->getZoomScale(); // 2 - - // The options flags that comprise $grbit - if ($this->phpSheet->getSheetView()->getView() == PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT) { - $fPageLayoutView = 1; - } else { - $fPageLayoutView = 0; - } - $fRulerVisible = 0; - $fWhitespaceHidden = 0; - - $grbit = $fPageLayoutView; // 2 - $grbit |= $fRulerVisible << 1; - $grbit |= $fWhitespaceHidden << 3; - - $header = pack("vv", $record, $length); - $data = pack("vvVVvv", $rt, $grbitFrt, 0x00000000, 0x00000000, $wScalvePLV, $grbit); - $this->append($header . $data); - } - - /** - * Write CFRule Record - * @param PHPExcel_Style_Conditional $conditional - */ - private function writeCFRule(PHPExcel_Style_Conditional $conditional) - { - $record = 0x01B1; // Record identifier - - // $type : Type of the CF - // $operatorType : Comparison operator - if ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_EXPRESSION) { - $type = 0x02; - $operatorType = 0x00; - } elseif ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CELLIS) { - $type = 0x01; - - switch ($conditional->getOperatorType()) { - case PHPExcel_Style_Conditional::OPERATOR_NONE: - $operatorType = 0x00; - break; - case PHPExcel_Style_Conditional::OPERATOR_EQUAL: - $operatorType = 0x03; - break; - case PHPExcel_Style_Conditional::OPERATOR_GREATERTHAN: - $operatorType = 0x05; - break; - case PHPExcel_Style_Conditional::OPERATOR_GREATERTHANOREQUAL: - $operatorType = 0x07; - break; - case PHPExcel_Style_Conditional::OPERATOR_LESSTHAN: - $operatorType = 0x06; - break; - case PHPExcel_Style_Conditional::OPERATOR_LESSTHANOREQUAL: - $operatorType = 0x08; - break; - case PHPExcel_Style_Conditional::OPERATOR_NOTEQUAL: - $operatorType = 0x04; - break; - case PHPExcel_Style_Conditional::OPERATOR_BETWEEN: - $operatorType = 0x01; - break; - // not OPERATOR_NOTBETWEEN 0x02 - } - } - - // $szValue1 : size of the formula data for first value or formula - // $szValue2 : size of the formula data for second value or formula - $arrConditions = $conditional->getConditions(); - $numConditions = sizeof($arrConditions); - if ($numConditions == 1) { - $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); - $szValue2 = 0x0000; - $operand1 = pack('Cv', 0x1E, $arrConditions[0]); - $operand2 = null; - } elseif ($numConditions == 2 && ($conditional->getOperatorType() == PHPExcel_Style_Conditional::OPERATOR_BETWEEN)) { - $szValue1 = ($arrConditions[0] <= 65535 ? 3 : 0x0000); - $szValue2 = ($arrConditions[1] <= 65535 ? 3 : 0x0000); - $operand1 = pack('Cv', 0x1E, $arrConditions[0]); - $operand2 = pack('Cv', 0x1E, $arrConditions[1]); - } else { - $szValue1 = 0x0000; - $szValue2 = 0x0000; - $operand1 = null; - $operand2 = null; - } - - // $flags : Option flags - // Alignment - $bAlignHz = ($conditional->getStyle()->getAlignment()->getHorizontal() == null ? 1 : 0); - $bAlignVt = ($conditional->getStyle()->getAlignment()->getVertical() == null ? 1 : 0); - $bAlignWrapTx = ($conditional->getStyle()->getAlignment()->getWrapText() == false ? 1 : 0); - $bTxRotation = ($conditional->getStyle()->getAlignment()->getTextRotation() == null ? 1 : 0); - $bIndent = ($conditional->getStyle()->getAlignment()->getIndent() == 0 ? 1 : 0); - $bShrinkToFit = ($conditional->getStyle()->getAlignment()->getShrinkToFit() == false ? 1 : 0); - if ($bAlignHz == 0 || $bAlignVt == 0 || $bAlignWrapTx == 0 || $bTxRotation == 0 || $bIndent == 0 || $bShrinkToFit == 0) { - $bFormatAlign = 1; - } else { - $bFormatAlign = 0; - } - // Protection - $bProtLocked = ($conditional->getStyle()->getProtection()->getLocked() == null ? 1 : 0); - $bProtHidden = ($conditional->getStyle()->getProtection()->getHidden() == null ? 1 : 0); - if ($bProtLocked == 0 || $bProtHidden == 0) { - $bFormatProt = 1; - } else { - $bFormatProt = 0; - } - // Border - $bBorderLeft = ($conditional->getStyle()->getBorders()->getLeft()->getColor()->getARGB() == PHPExcel_Style_Color::COLOR_BLACK - && $conditional->getStyle()->getBorders()->getLeft()->getBorderStyle() == PHPExcel_Style_Border::BORDER_NONE ? 1 : 0); - $bBorderRight = ($conditional->getStyle()->getBorders()->getRight()->getColor()->getARGB() == PHPExcel_Style_Color::COLOR_BLACK - && $conditional->getStyle()->getBorders()->getRight()->getBorderStyle() == PHPExcel_Style_Border::BORDER_NONE ? 1 : 0); - $bBorderTop = ($conditional->getStyle()->getBorders()->getTop()->getColor()->getARGB() == PHPExcel_Style_Color::COLOR_BLACK - && $conditional->getStyle()->getBorders()->getTop()->getBorderStyle() == PHPExcel_Style_Border::BORDER_NONE ? 1 : 0); - $bBorderBottom = ($conditional->getStyle()->getBorders()->getBottom()->getColor()->getARGB() == PHPExcel_Style_Color::COLOR_BLACK - && $conditional->getStyle()->getBorders()->getBottom()->getBorderStyle() == PHPExcel_Style_Border::BORDER_NONE ? 1 : 0); - if ($bBorderLeft == 0 || $bBorderRight == 0 || $bBorderTop == 0 || $bBorderBottom == 0) { - $bFormatBorder = 1; - } else { - $bFormatBorder = 0; - } - // Pattern - $bFillStyle = ($conditional->getStyle()->getFill()->getFillType() == null ? 0 : 1); - $bFillColor = ($conditional->getStyle()->getFill()->getStartColor()->getARGB() == null ? 0 : 1); - $bFillColorBg = ($conditional->getStyle()->getFill()->getEndColor()->getARGB() == null ? 0 : 1); - if ($bFillStyle == 0 || $bFillColor == 0 || $bFillColorBg == 0) { - $bFormatFill = 1; - } else { - $bFormatFill = 0; - } - // Font - if ($conditional->getStyle()->getFont()->getName() != null - || $conditional->getStyle()->getFont()->getSize() != null - || $conditional->getStyle()->getFont()->getBold() != null - || $conditional->getStyle()->getFont()->getItalic() != null - || $conditional->getStyle()->getFont()->getSuperScript() != null - || $conditional->getStyle()->getFont()->getSubScript() != null - || $conditional->getStyle()->getFont()->getUnderline() != null - || $conditional->getStyle()->getFont()->getStrikethrough() != null - || $conditional->getStyle()->getFont()->getColor()->getARGB() != null) { - $bFormatFont = 1; - } else { - $bFormatFont = 0; - } - // Alignment - $flags = 0; - $flags |= (1 == $bAlignHz ? 0x00000001 : 0); - $flags |= (1 == $bAlignVt ? 0x00000002 : 0); - $flags |= (1 == $bAlignWrapTx ? 0x00000004 : 0); - $flags |= (1 == $bTxRotation ? 0x00000008 : 0); - // Justify last line flag - $flags |= (1 == 1 ? 0x00000010 : 0); - $flags |= (1 == $bIndent ? 0x00000020 : 0); - $flags |= (1 == $bShrinkToFit ? 0x00000040 : 0); - // Default - $flags |= (1 == 1 ? 0x00000080 : 0); - // Protection - $flags |= (1 == $bProtLocked ? 0x00000100 : 0); - $flags |= (1 == $bProtHidden ? 0x00000200 : 0); - // Border - $flags |= (1 == $bBorderLeft ? 0x00000400 : 0); - $flags |= (1 == $bBorderRight ? 0x00000800 : 0); - $flags |= (1 == $bBorderTop ? 0x00001000 : 0); - $flags |= (1 == $bBorderBottom ? 0x00002000 : 0); - $flags |= (1 == 1 ? 0x00004000 : 0); // Top left to Bottom right border - $flags |= (1 == 1 ? 0x00008000 : 0); // Bottom left to Top right border - // Pattern - $flags |= (1 == $bFillStyle ? 0x00010000 : 0); - $flags |= (1 == $bFillColor ? 0x00020000 : 0); - $flags |= (1 == $bFillColorBg ? 0x00040000 : 0); - $flags |= (1 == 1 ? 0x00380000 : 0); - // Font - $flags |= (1 == $bFormatFont ? 0x04000000 : 0); - // Alignment: - $flags |= (1 == $bFormatAlign ? 0x08000000 : 0); - // Border - $flags |= (1 == $bFormatBorder ? 0x10000000 : 0); - // Pattern - $flags |= (1 == $bFormatFill ? 0x20000000 : 0); - // Protection - $flags |= (1 == $bFormatProt ? 0x40000000 : 0); - // Text direction - $flags |= (1 == 0 ? 0x80000000 : 0); - - // Data Blocks - if ($bFormatFont == 1) { - // Font Name - if ($conditional->getStyle()->getFont()->getName() == null) { - $dataBlockFont = pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000); - $dataBlockFont .= pack('VVVVVVVV', 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000); - } else { - $dataBlockFont = PHPExcel_Shared_String::UTF8toBIFF8UnicodeLong($conditional->getStyle()->getFont()->getName()); - } - // Font Size - if ($conditional->getStyle()->getFont()->getSize() == null) { - $dataBlockFont .= pack('V', 20 * 11); - } else { - $dataBlockFont .= pack('V', 20 * $conditional->getStyle()->getFont()->getSize()); - } - // Font Options - $dataBlockFont .= pack('V', 0); - // Font weight - if ($conditional->getStyle()->getFont()->getBold() == true) { - $dataBlockFont .= pack('v', 0x02BC); - } else { - $dataBlockFont .= pack('v', 0x0190); - } - // Escapement type - if ($conditional->getStyle()->getFont()->getSubScript() == true) { - $dataBlockFont .= pack('v', 0x02); - $fontEscapement = 0; - } elseif ($conditional->getStyle()->getFont()->getSuperScript() == true) { - $dataBlockFont .= pack('v', 0x01); - $fontEscapement = 0; - } else { - $dataBlockFont .= pack('v', 0x00); - $fontEscapement = 1; - } - // Underline type - switch ($conditional->getStyle()->getFont()->getUnderline()) { - case PHPExcel_Style_Font::UNDERLINE_NONE: - $dataBlockFont .= pack('C', 0x00); - $fontUnderline = 0; - break; - case PHPExcel_Style_Font::UNDERLINE_DOUBLE: - $dataBlockFont .= pack('C', 0x02); - $fontUnderline = 0; - break; - case PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING: - $dataBlockFont .= pack('C', 0x22); - $fontUnderline = 0; - break; - case PHPExcel_Style_Font::UNDERLINE_SINGLE: - $dataBlockFont .= pack('C', 0x01); - $fontUnderline = 0; - break; - case PHPExcel_Style_Font::UNDERLINE_SINGLEACCOUNTING: - $dataBlockFont .= pack('C', 0x21); - $fontUnderline = 0; - break; - default: $dataBlockFont .= pack('C', 0x00); - $fontUnderline = 1; - break; - } - // Not used (3) - $dataBlockFont .= pack('vC', 0x0000, 0x00); - // Font color index - switch ($conditional->getStyle()->getFont()->getColor()->getRGB()) { - case '000000': - $colorIdx = 0x08; - break; - case 'FFFFFF': - $colorIdx = 0x09; - break; - case 'FF0000': - $colorIdx = 0x0A; - break; - case '00FF00': - $colorIdx = 0x0B; - break; - case '0000FF': - $colorIdx = 0x0C; - break; - case 'FFFF00': - $colorIdx = 0x0D; - break; - case 'FF00FF': - $colorIdx = 0x0E; - break; - case '00FFFF': - $colorIdx = 0x0F; - break; - case '800000': - $colorIdx = 0x10; - break; - case '008000': - $colorIdx = 0x11; - break; - case '000080': - $colorIdx = 0x12; - break; - case '808000': - $colorIdx = 0x13; - break; - case '800080': - $colorIdx = 0x14; - break; - case '008080': - $colorIdx = 0x15; - break; - case 'C0C0C0': - $colorIdx = 0x16; - break; - case '808080': - $colorIdx = 0x17; - break; - case '9999FF': - $colorIdx = 0x18; - break; - case '993366': - $colorIdx = 0x19; - break; - case 'FFFFCC': - $colorIdx = 0x1A; - break; - case 'CCFFFF': - $colorIdx = 0x1B; - break; - case '660066': - $colorIdx = 0x1C; - break; - case 'FF8080': - $colorIdx = 0x1D; - break; - case '0066CC': - $colorIdx = 0x1E; - break; - case 'CCCCFF': - $colorIdx = 0x1F; - break; - case '000080': - $colorIdx = 0x20; - break; - case 'FF00FF': - $colorIdx = 0x21; - break; - case 'FFFF00': - $colorIdx = 0x22; - break; - case '00FFFF': - $colorIdx = 0x23; - break; - case '800080': - $colorIdx = 0x24; - break; - case '800000': - $colorIdx = 0x25; - break; - case '008080': - $colorIdx = 0x26; - break; - case '0000FF': - $colorIdx = 0x27; - break; - case '00CCFF': - $colorIdx = 0x28; - break; - case 'CCFFFF': - $colorIdx = 0x29; - break; - case 'CCFFCC': - $colorIdx = 0x2A; - break; - case 'FFFF99': - $colorIdx = 0x2B; - break; - case '99CCFF': - $colorIdx = 0x2C; - break; - case 'FF99CC': - $colorIdx = 0x2D; - break; - case 'CC99FF': - $colorIdx = 0x2E; - break; - case 'FFCC99': - $colorIdx = 0x2F; - break; - case '3366FF': - $colorIdx = 0x30; - break; - case '33CCCC': - $colorIdx = 0x31; - break; - case '99CC00': - $colorIdx = 0x32; - break; - case 'FFCC00': - $colorIdx = 0x33; - break; - case 'FF9900': - $colorIdx = 0x34; - break; - case 'FF6600': - $colorIdx = 0x35; - break; - case '666699': - $colorIdx = 0x36; - break; - case '969696': - $colorIdx = 0x37; - break; - case '003366': - $colorIdx = 0x38; - break; - case '339966': - $colorIdx = 0x39; - break; - case '003300': - $colorIdx = 0x3A; - break; - case '333300': - $colorIdx = 0x3B; - break; - case '993300': - $colorIdx = 0x3C; - break; - case '993366': - $colorIdx = 0x3D; - break; - case '333399': - $colorIdx = 0x3E; - break; - case '333333': - $colorIdx = 0x3F; - break; - default: - $colorIdx = 0x00; - break; - } - $dataBlockFont .= pack('V', $colorIdx); - // Not used (4) - $dataBlockFont .= pack('V', 0x00000000); - // Options flags for modified font attributes - $optionsFlags = 0; - $optionsFlagsBold = ($conditional->getStyle()->getFont()->getBold() == null ? 1 : 0); - $optionsFlags |= (1 == $optionsFlagsBold ? 0x00000002 : 0); - $optionsFlags |= (1 == 1 ? 0x00000008 : 0); - $optionsFlags |= (1 == 1 ? 0x00000010 : 0); - $optionsFlags |= (1 == 0 ? 0x00000020 : 0); - $optionsFlags |= (1 == 1 ? 0x00000080 : 0); - $dataBlockFont .= pack('V', $optionsFlags); - // Escapement type - $dataBlockFont .= pack('V', $fontEscapement); - // Underline type - $dataBlockFont .= pack('V', $fontUnderline); - // Always - $dataBlockFont .= pack('V', 0x00000000); - // Always - $dataBlockFont .= pack('V', 0x00000000); - // Not used (8) - $dataBlockFont .= pack('VV', 0x00000000, 0x00000000); - // Always - $dataBlockFont .= pack('v', 0x0001); - } - if ($bFormatAlign == 1) { - $blockAlign = 0; - // Alignment and text break - switch ($conditional->getStyle()->getAlignment()->getHorizontal()) { - case PHPExcel_Style_Alignment::HORIZONTAL_GENERAL: - $blockAlign = 0; - break; - case PHPExcel_Style_Alignment::HORIZONTAL_LEFT: - $blockAlign = 1; - break; - case PHPExcel_Style_Alignment::HORIZONTAL_RIGHT: - $blockAlign = 3; - break; - case PHPExcel_Style_Alignment::HORIZONTAL_CENTER: - $blockAlign = 2; - break; - case PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS: - $blockAlign = 6; - break; - case PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY: - $blockAlign = 5; - break; - } - if ($conditional->getStyle()->getAlignment()->getWrapText() == true) { - $blockAlign |= 1 << 3; - } else { - $blockAlign |= 0 << 3; - } - switch ($conditional->getStyle()->getAlignment()->getVertical()) { - case PHPExcel_Style_Alignment::VERTICAL_BOTTOM: - $blockAlign = 2 << 4; - break; - case PHPExcel_Style_Alignment::VERTICAL_TOP: - $blockAlign = 0 << 4; - break; - case PHPExcel_Style_Alignment::VERTICAL_CENTER: - $blockAlign = 1 << 4; - break; - case PHPExcel_Style_Alignment::VERTICAL_JUSTIFY: - $blockAlign = 3 << 4; - break; - } - $blockAlign |= 0 << 7; - - // Text rotation angle - $blockRotation = $conditional->getStyle()->getAlignment()->getTextRotation(); - - // Indentation - $blockIndent = $conditional->getStyle()->getAlignment()->getIndent(); - if ($conditional->getStyle()->getAlignment()->getShrinkToFit() == true) { - $blockIndent |= 1 << 4; - } else { - $blockIndent |= 0 << 4; - } - $blockIndent |= 0 << 6; - - // Relative indentation - $blockIndentRelative = 255; - - $dataBlockAlign = pack('CCvvv', $blockAlign, $blockRotation, $blockIndent, $blockIndentRelative, 0x0000); - } - if ($bFormatBorder == 1) { - $blockLineStyle = 0; - switch ($conditional->getStyle()->getBorders()->getLeft()->getBorderStyle()) { - case PHPExcel_Style_Border::BORDER_NONE: - $blockLineStyle |= 0x00; - break; - case PHPExcel_Style_Border::BORDER_THIN: - $blockLineStyle |= 0x01; - break; - case PHPExcel_Style_Border::BORDER_MEDIUM: - $blockLineStyle |= 0x02; - break; - case PHPExcel_Style_Border::BORDER_DASHED: - $blockLineStyle |= 0x03; - break; - case PHPExcel_Style_Border::BORDER_DOTTED: - $blockLineStyle |= 0x04; - break; - case PHPExcel_Style_Border::BORDER_THICK: - $blockLineStyle |= 0x05; - break; - case PHPExcel_Style_Border::BORDER_DOUBLE: - $blockLineStyle |= 0x06; - break; - case PHPExcel_Style_Border::BORDER_HAIR: - $blockLineStyle |= 0x07; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHED: - $blockLineStyle |= 0x08; - break; - case PHPExcel_Style_Border::BORDER_DASHDOT: - $blockLineStyle |= 0x09; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT: - $blockLineStyle |= 0x0A; - break; - case PHPExcel_Style_Border::BORDER_DASHDOTDOT: - $blockLineStyle |= 0x0B; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT: - $blockLineStyle |= 0x0C; - break; - case PHPExcel_Style_Border::BORDER_SLANTDASHDOT: - $blockLineStyle |= 0x0D; - break; - } - switch ($conditional->getStyle()->getBorders()->getRight()->getBorderStyle()) { - case PHPExcel_Style_Border::BORDER_NONE: - $blockLineStyle |= 0x00 << 4; - break; - case PHPExcel_Style_Border::BORDER_THIN: - $blockLineStyle |= 0x01 << 4; - break; - case PHPExcel_Style_Border::BORDER_MEDIUM: - $blockLineStyle |= 0x02 << 4; - break; - case PHPExcel_Style_Border::BORDER_DASHED: - $blockLineStyle |= 0x03 << 4; - break; - case PHPExcel_Style_Border::BORDER_DOTTED: - $blockLineStyle |= 0x04 << 4; - break; - case PHPExcel_Style_Border::BORDER_THICK: - $blockLineStyle |= 0x05 << 4; - break; - case PHPExcel_Style_Border::BORDER_DOUBLE: - $blockLineStyle |= 0x06 << 4; - break; - case PHPExcel_Style_Border::BORDER_HAIR: - $blockLineStyle |= 0x07 << 4; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHED: - $blockLineStyle |= 0x08 << 4; - break; - case PHPExcel_Style_Border::BORDER_DASHDOT: - $blockLineStyle |= 0x09 << 4; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT: - $blockLineStyle |= 0x0A << 4; - break; - case PHPExcel_Style_Border::BORDER_DASHDOTDOT: - $blockLineStyle |= 0x0B << 4; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT: - $blockLineStyle |= 0x0C << 4; - break; - case PHPExcel_Style_Border::BORDER_SLANTDASHDOT: - $blockLineStyle |= 0x0D << 4; - break; - } - switch ($conditional->getStyle()->getBorders()->getTop()->getBorderStyle()) { - case PHPExcel_Style_Border::BORDER_NONE: - $blockLineStyle |= 0x00 << 8; - break; - case PHPExcel_Style_Border::BORDER_THIN: - $blockLineStyle |= 0x01 << 8; - break; - case PHPExcel_Style_Border::BORDER_MEDIUM: - $blockLineStyle |= 0x02 << 8; - break; - case PHPExcel_Style_Border::BORDER_DASHED: - $blockLineStyle |= 0x03 << 8; - break; - case PHPExcel_Style_Border::BORDER_DOTTED: - $blockLineStyle |= 0x04 << 8; - break; - case PHPExcel_Style_Border::BORDER_THICK: - $blockLineStyle |= 0x05 << 8; - break; - case PHPExcel_Style_Border::BORDER_DOUBLE: - $blockLineStyle |= 0x06 << 8; - break; - case PHPExcel_Style_Border::BORDER_HAIR: - $blockLineStyle |= 0x07 << 8; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHED: - $blockLineStyle |= 0x08 << 8; - break; - case PHPExcel_Style_Border::BORDER_DASHDOT: - $blockLineStyle |= 0x09 << 8; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT: - $blockLineStyle |= 0x0A << 8; - break; - case PHPExcel_Style_Border::BORDER_DASHDOTDOT: - $blockLineStyle |= 0x0B << 8; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT: - $blockLineStyle |= 0x0C << 8; - break; - case PHPExcel_Style_Border::BORDER_SLANTDASHDOT: - $blockLineStyle |= 0x0D << 8; - break; - } - switch ($conditional->getStyle()->getBorders()->getBottom()->getBorderStyle()) { - case PHPExcel_Style_Border::BORDER_NONE: - $blockLineStyle |= 0x00 << 12; - break; - case PHPExcel_Style_Border::BORDER_THIN: - $blockLineStyle |= 0x01 << 12; - break; - case PHPExcel_Style_Border::BORDER_MEDIUM: - $blockLineStyle |= 0x02 << 12; - break; - case PHPExcel_Style_Border::BORDER_DASHED: - $blockLineStyle |= 0x03 << 12; - break; - case PHPExcel_Style_Border::BORDER_DOTTED: - $blockLineStyle |= 0x04 << 12; - break; - case PHPExcel_Style_Border::BORDER_THICK: - $blockLineStyle |= 0x05 << 12; - break; - case PHPExcel_Style_Border::BORDER_DOUBLE: - $blockLineStyle |= 0x06 << 12; - break; - case PHPExcel_Style_Border::BORDER_HAIR: - $blockLineStyle |= 0x07 << 12; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHED: - $blockLineStyle |= 0x08 << 12; - break; - case PHPExcel_Style_Border::BORDER_DASHDOT: - $blockLineStyle |= 0x09 << 12; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT: - $blockLineStyle |= 0x0A << 12; - break; - case PHPExcel_Style_Border::BORDER_DASHDOTDOT: - $blockLineStyle |= 0x0B << 12; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT: - $blockLineStyle |= 0x0C << 12; - break; - case PHPExcel_Style_Border::BORDER_SLANTDASHDOT: - $blockLineStyle |= 0x0D << 12; - break; - } - //@todo writeCFRule() => $blockLineStyle => Index Color for left line - //@todo writeCFRule() => $blockLineStyle => Index Color for right line - //@todo writeCFRule() => $blockLineStyle => Top-left to bottom-right on/off - //@todo writeCFRule() => $blockLineStyle => Bottom-left to top-right on/off - $blockColor = 0; - //@todo writeCFRule() => $blockColor => Index Color for top line - //@todo writeCFRule() => $blockColor => Index Color for bottom line - //@todo writeCFRule() => $blockColor => Index Color for diagonal line - switch ($conditional->getStyle()->getBorders()->getDiagonal()->getBorderStyle()) { - case PHPExcel_Style_Border::BORDER_NONE: - $blockColor |= 0x00 << 21; - break; - case PHPExcel_Style_Border::BORDER_THIN: - $blockColor |= 0x01 << 21; - break; - case PHPExcel_Style_Border::BORDER_MEDIUM: - $blockColor |= 0x02 << 21; - break; - case PHPExcel_Style_Border::BORDER_DASHED: - $blockColor |= 0x03 << 21; - break; - case PHPExcel_Style_Border::BORDER_DOTTED: - $blockColor |= 0x04 << 21; - break; - case PHPExcel_Style_Border::BORDER_THICK: - $blockColor |= 0x05 << 21; - break; - case PHPExcel_Style_Border::BORDER_DOUBLE: - $blockColor |= 0x06 << 21; - break; - case PHPExcel_Style_Border::BORDER_HAIR: - $blockColor |= 0x07 << 21; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHED: - $blockColor |= 0x08 << 21; - break; - case PHPExcel_Style_Border::BORDER_DASHDOT: - $blockColor |= 0x09 << 21; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT: - $blockColor |= 0x0A << 21; - break; - case PHPExcel_Style_Border::BORDER_DASHDOTDOT: - $blockColor |= 0x0B << 21; - break; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT: - $blockColor |= 0x0C << 21; - break; - case PHPExcel_Style_Border::BORDER_SLANTDASHDOT: - $blockColor |= 0x0D << 21; - break; - } - $dataBlockBorder = pack('vv', $blockLineStyle, $blockColor); - } - if ($bFormatFill == 1) { - // Fill Patern Style - $blockFillPatternStyle = 0; - switch ($conditional->getStyle()->getFill()->getFillType()) { - case PHPExcel_Style_Fill::FILL_NONE: - $blockFillPatternStyle = 0x00; - break; - case PHPExcel_Style_Fill::FILL_SOLID: - $blockFillPatternStyle = 0x01; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_MEDIUMGRAY: - $blockFillPatternStyle = 0x02; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_DARKGRAY: - $blockFillPatternStyle = 0x03; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRAY: - $blockFillPatternStyle = 0x04; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_DARKHORIZONTAL: - $blockFillPatternStyle = 0x05; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_DARKVERTICAL: - $blockFillPatternStyle = 0x06; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_DARKDOWN: - $blockFillPatternStyle = 0x07; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_DARKUP: - $blockFillPatternStyle = 0x08; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_DARKGRID: - $blockFillPatternStyle = 0x09; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_DARKTRELLIS: - $blockFillPatternStyle = 0x0A; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTHORIZONTAL: - $blockFillPatternStyle = 0x0B; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTVERTICAL: - $blockFillPatternStyle = 0x0C; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTDOWN: - $blockFillPatternStyle = 0x0D; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTUP: - $blockFillPatternStyle = 0x0E; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRID: - $blockFillPatternStyle = 0x0F; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTTRELLIS: - $blockFillPatternStyle = 0x10; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_GRAY125: - $blockFillPatternStyle = 0x11; - break; - case PHPExcel_Style_Fill::FILL_PATTERN_GRAY0625: - $blockFillPatternStyle = 0x12; - break; - case PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR: - $blockFillPatternStyle = 0x00; - break; // does not exist in BIFF8 - case PHPExcel_Style_Fill::FILL_GRADIENT_PATH: - $blockFillPatternStyle = 0x00; - break; // does not exist in BIFF8 - default: - $blockFillPatternStyle = 0x00; - break; - } - // Color - switch ($conditional->getStyle()->getFill()->getStartColor()->getRGB()) { - case '000000': - $colorIdxBg = 0x08; - break; - case 'FFFFFF': - $colorIdxBg = 0x09; - break; - case 'FF0000': - $colorIdxBg = 0x0A; - break; - case '00FF00': - $colorIdxBg = 0x0B; - break; - case '0000FF': - $colorIdxBg = 0x0C; - break; - case 'FFFF00': - $colorIdxBg = 0x0D; - break; - case 'FF00FF': - $colorIdxBg = 0x0E; - break; - case '00FFFF': - $colorIdxBg = 0x0F; - break; - case '800000': - $colorIdxBg = 0x10; - break; - case '008000': - $colorIdxBg = 0x11; - break; - case '000080': - $colorIdxBg = 0x12; - break; - case '808000': - $colorIdxBg = 0x13; - break; - case '800080': - $colorIdxBg = 0x14; - break; - case '008080': - $colorIdxBg = 0x15; - break; - case 'C0C0C0': - $colorIdxBg = 0x16; - break; - case '808080': - $colorIdxBg = 0x17; - break; - case '9999FF': - $colorIdxBg = 0x18; - break; - case '993366': - $colorIdxBg = 0x19; - break; - case 'FFFFCC': - $colorIdxBg = 0x1A; - break; - case 'CCFFFF': - $colorIdxBg = 0x1B; - break; - case '660066': - $colorIdxBg = 0x1C; - break; - case 'FF8080': - $colorIdxBg = 0x1D; - break; - case '0066CC': - $colorIdxBg = 0x1E; - break; - case 'CCCCFF': - $colorIdxBg = 0x1F; - break; - case '000080': - $colorIdxBg = 0x20; - break; - case 'FF00FF': - $colorIdxBg = 0x21; - break; - case 'FFFF00': - $colorIdxBg = 0x22; - break; - case '00FFFF': - $colorIdxBg = 0x23; - break; - case '800080': - $colorIdxBg = 0x24; - break; - case '800000': - $colorIdxBg = 0x25; - break; - case '008080': - $colorIdxBg = 0x26; - break; - case '0000FF': - $colorIdxBg = 0x27; - break; - case '00CCFF': - $colorIdxBg = 0x28; - break; - case 'CCFFFF': - $colorIdxBg = 0x29; - break; - case 'CCFFCC': - $colorIdxBg = 0x2A; - break; - case 'FFFF99': - $colorIdxBg = 0x2B; - break; - case '99CCFF': - $colorIdxBg = 0x2C; - break; - case 'FF99CC': - $colorIdxBg = 0x2D; - break; - case 'CC99FF': - $colorIdxBg = 0x2E; - break; - case 'FFCC99': - $colorIdxBg = 0x2F; - break; - case '3366FF': - $colorIdxBg = 0x30; - break; - case '33CCCC': - $colorIdxBg = 0x31; - break; - case '99CC00': - $colorIdxBg = 0x32; - break; - case 'FFCC00': - $colorIdxBg = 0x33; - break; - case 'FF9900': - $colorIdxBg = 0x34; - break; - case 'FF6600': - $colorIdxBg = 0x35; - break; - case '666699': - $colorIdxBg = 0x36; - break; - case '969696': - $colorIdxBg = 0x37; - break; - case '003366': - $colorIdxBg = 0x38; - break; - case '339966': - $colorIdxBg = 0x39; - break; - case '003300': - $colorIdxBg = 0x3A; - break; - case '333300': - $colorIdxBg = 0x3B; - break; - case '993300': - $colorIdxBg = 0x3C; - break; - case '993366': - $colorIdxBg = 0x3D; - break; - case '333399': - $colorIdxBg = 0x3E; - break; - case '333333': - $colorIdxBg = 0x3F; - break; - default: - $colorIdxBg = 0x41; - break; - } - // Fg Color - switch ($conditional->getStyle()->getFill()->getEndColor()->getRGB()) { - case '000000': - $colorIdxFg = 0x08; - break; - case 'FFFFFF': - $colorIdxFg = 0x09; - break; - case 'FF0000': - $colorIdxFg = 0x0A; - break; - case '00FF00': - $colorIdxFg = 0x0B; - break; - case '0000FF': - $colorIdxFg = 0x0C; - break; - case 'FFFF00': - $colorIdxFg = 0x0D; - break; - case 'FF00FF': - $colorIdxFg = 0x0E; - break; - case '00FFFF': - $colorIdxFg = 0x0F; - break; - case '800000': - $colorIdxFg = 0x10; - break; - case '008000': - $colorIdxFg = 0x11; - break; - case '000080': - $colorIdxFg = 0x12; - break; - case '808000': - $colorIdxFg = 0x13; - break; - case '800080': - $colorIdxFg = 0x14; - break; - case '008080': - $colorIdxFg = 0x15; - break; - case 'C0C0C0': - $colorIdxFg = 0x16; - break; - case '808080': - $colorIdxFg = 0x17; - break; - case '9999FF': - $colorIdxFg = 0x18; - break; - case '993366': - $colorIdxFg = 0x19; - break; - case 'FFFFCC': - $colorIdxFg = 0x1A; - break; - case 'CCFFFF': - $colorIdxFg = 0x1B; - break; - case '660066': - $colorIdxFg = 0x1C; - break; - case 'FF8080': - $colorIdxFg = 0x1D; - break; - case '0066CC': - $colorIdxFg = 0x1E; - break; - case 'CCCCFF': - $colorIdxFg = 0x1F; - break; - case '000080': - $colorIdxFg = 0x20; - break; - case 'FF00FF': - $colorIdxFg = 0x21; - break; - case 'FFFF00': - $colorIdxFg = 0x22; - break; - case '00FFFF': - $colorIdxFg = 0x23; - break; - case '800080': - $colorIdxFg = 0x24; - break; - case '800000': - $colorIdxFg = 0x25; - break; - case '008080': - $colorIdxFg = 0x26; - break; - case '0000FF': - $colorIdxFg = 0x27; - break; - case '00CCFF': - $colorIdxFg = 0x28; - break; - case 'CCFFFF': - $colorIdxFg = 0x29; - break; - case 'CCFFCC': - $colorIdxFg = 0x2A; - break; - case 'FFFF99': - $colorIdxFg = 0x2B; - break; - case '99CCFF': - $colorIdxFg = 0x2C; - break; - case 'FF99CC': - $colorIdxFg = 0x2D; - break; - case 'CC99FF': - $colorIdxFg = 0x2E; - break; - case 'FFCC99': - $colorIdxFg = 0x2F; - break; - case '3366FF': - $colorIdxFg = 0x30; - break; - case '33CCCC': - $colorIdxFg = 0x31; - break; - case '99CC00': - $colorIdxFg = 0x32; - break; - case 'FFCC00': - $colorIdxFg = 0x33; - break; - case 'FF9900': - $colorIdxFg = 0x34; - break; - case 'FF6600': - $colorIdxFg = 0x35; - break; - case '666699': - $colorIdxFg = 0x36; - break; - case '969696': - $colorIdxFg = 0x37; - break; - case '003366': - $colorIdxFg = 0x38; - break; - case '339966': - $colorIdxFg = 0x39; - break; - case '003300': - $colorIdxFg = 0x3A; - break; - case '333300': - $colorIdxFg = 0x3B; - break; - case '993300': - $colorIdxFg = 0x3C; - break; - case '993366': - $colorIdxFg = 0x3D; - break; - case '333399': - $colorIdxFg = 0x3E; - break; - case '333333': - $colorIdxFg = 0x3F; - break; - default: - $colorIdxFg = 0x40; - break; - } - $dataBlockFill = pack('v', $blockFillPatternStyle); - $dataBlockFill .= pack('v', $colorIdxFg | ($colorIdxBg << 7)); - } - if ($bFormatProt == 1) { - $dataBlockProtection = 0; - if ($conditional->getStyle()->getProtection()->getLocked() == PHPExcel_Style_Protection::PROTECTION_PROTECTED) { - $dataBlockProtection = 1; - } - if ($conditional->getStyle()->getProtection()->getHidden() == PHPExcel_Style_Protection::PROTECTION_PROTECTED) { - $dataBlockProtection = 1 << 1; - } - } - - $data = pack('CCvvVv', $type, $operatorType, $szValue1, $szValue2, $flags, 0x0000); - if ($bFormatFont == 1) { // Block Formatting : OK - $data .= $dataBlockFont; - } - if ($bFormatAlign == 1) { - $data .= $dataBlockAlign; - } - if ($bFormatBorder == 1) { - $data .= $dataBlockBorder; - } - if ($bFormatFill == 1) { // Block Formatting : OK - $data .= $dataBlockFill; - } - if ($bFormatProt == 1) { - $data .= $dataBlockProtection; - } - if (!is_null($operand1)) { - $data .= $operand1; - } - if (!is_null($operand2)) { - $data .= $operand2; - } - $header = pack('vv', $record, strlen($data)); - $this->append($header . $data); - } - - /** - * Write CFHeader record - */ - private function writeCFHeader() - { - $record = 0x01B0; // Record identifier - $length = 0x0016; // Bytes to follow - - $numColumnMin = null; - $numColumnMax = null; - $numRowMin = null; - $numRowMax = null; - $arrConditional = array(); - foreach ($this->phpSheet->getConditionalStylesCollection() as $cellCoordinate => $conditionalStyles) { - foreach ($conditionalStyles as $conditional) { - if ($conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_EXPRESSION - || $conditional->getConditionType() == PHPExcel_Style_Conditional::CONDITION_CELLIS) { - if (!in_array($conditional->getHashCode(), $arrConditional)) { - $arrConditional[] = $conditional->getHashCode(); - } - // Cells - $arrCoord = PHPExcel_Cell::coordinateFromString($cellCoordinate); - if (!is_numeric($arrCoord[0])) { - $arrCoord[0] = PHPExcel_Cell::columnIndexFromString($arrCoord[0]); - } - if (is_null($numColumnMin) || ($numColumnMin > $arrCoord[0])) { - $numColumnMin = $arrCoord[0]; - } - if (is_null($numColumnMax) || ($numColumnMax < $arrCoord[0])) { - $numColumnMax = $arrCoord[0]; - } - if (is_null($numRowMin) || ($numRowMin > $arrCoord[1])) { - $numRowMin = $arrCoord[1]; - } - if (is_null($numRowMax) || ($numRowMax < $arrCoord[1])) { - $numRowMax = $arrCoord[1]; - } - } - } - } - $needRedraw = 1; - $cellRange = pack('vvvv', $numRowMin-1, $numRowMax-1, $numColumnMin-1, $numColumnMax-1); - - $header = pack('vv', $record, $length); - $data = pack('vv', count($arrConditional), $needRedraw); - $data .= $cellRange; - $data .= pack('v', 0x0001); - $data .= $cellRange; - $this->append($header . $data); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Xf.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Xf.php deleted file mode 100644 index e41589a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Xf.php +++ /dev/null @@ -1,557 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Excel5_Xf - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_Excel5 - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -// Original file header of PEAR::Spreadsheet_Excel_Writer_Format (used as the base for this class): -// ----------------------------------------------------------------------------------------- -// /* -// * Module written/ported by Xavier Noguer <xnoguer@rezebra.com> -// * -// * The majority of this is _NOT_ my code. I simply ported it from the -// * PERL Spreadsheet::WriteExcel module. -// * -// * The author of the Spreadsheet::WriteExcel module is John McNamara -// * <jmcnamara@cpan.org> -// * -// * I _DO_ maintain this code, and John McNamara has nothing to do with the -// * porting of this code to PHP. Any questions directly related to this -// * class library should be directed to me. -// * -// * License Information: -// * -// * Spreadsheet_Excel_Writer: A library for generating Excel Spreadsheets -// * Copyright (c) 2002-2003 Xavier Noguer xnoguer@rezebra.com -// * -// * This library is free software; you can redistribute it and/or -// * modify it under the terms of the GNU Lesser General Public -// * License as published by the Free Software Foundation; either -// * version 2.1 of the License, or (at your option) any later version. -// * -// * This library is distributed in the hope that it will be useful, -// * but WITHOUT ANY WARRANTY; without even the implied warranty of -// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// * Lesser General Public License for more details. -// * -// * You should have received a copy of the GNU Lesser General Public -// * License along with this library; if not, write to the Free Software -// * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// */ -class PHPExcel_Writer_Excel5_Xf -{ - /** - * Style XF or a cell XF ? - * - * @var boolean - */ - private $isStyleXf; - - /** - * Index to the FONT record. Index 4 does not exist - * @var integer - */ - private $fontIndex; - - /** - * An index (2 bytes) to a FORMAT record (number format). - * @var integer - */ - private $numberFormatIndex; - - /** - * 1 bit, apparently not used. - * @var integer - */ - private $textJustLast; - - /** - * The cell's foreground color. - * @var integer - */ - private $foregroundColor; - - /** - * The cell's background color. - * @var integer - */ - private $backgroundColor; - - /** - * Color of the bottom border of the cell. - * @var integer - */ - private $bottomBorderColor; - - /** - * Color of the top border of the cell. - * @var integer - */ - private $topBorderColor; - - /** - * Color of the left border of the cell. - * @var integer - */ - private $leftBorderColor; - - /** - * Color of the right border of the cell. - * @var integer - */ - private $rightBorderColor; - - /** - * Constructor - * - * @access public - * @param PHPExcel_Style The XF format - */ - public function __construct(PHPExcel_Style $style = null) - { - $this->isStyleXf = false; - $this->fontIndex = 0; - - $this->numberFormatIndex = 0; - - $this->textJustLast = 0; - - $this->foregroundColor = 0x40; - $this->backgroundColor = 0x41; - - $this->_diag = 0; - - $this->bottomBorderColor = 0x40; - $this->topBorderColor = 0x40; - $this->leftBorderColor = 0x40; - $this->rightBorderColor = 0x40; - $this->_diag_color = 0x40; - $this->_style = $style; - - } - - - /** - * Generate an Excel BIFF XF record (style or cell). - * - * @return string The XF record - */ - public function writeXf() - { - // Set the type of the XF record and some of the attributes. - if ($this->isStyleXf) { - $style = 0xFFF5; - } else { - $style = self::mapLocked($this->_style->getProtection()->getLocked()); - $style |= self::mapHidden($this->_style->getProtection()->getHidden()) << 1; - } - - // Flags to indicate if attributes have been set. - $atr_num = ($this->numberFormatIndex != 0)?1:0; - $atr_fnt = ($this->fontIndex != 0)?1:0; - $atr_alc = ((int) $this->_style->getAlignment()->getWrapText()) ? 1 : 0; - $atr_bdr = (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) || - self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) || - self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) || - self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()))?1:0; - $atr_pat = (($this->foregroundColor != 0x40) || - ($this->backgroundColor != 0x41) || - self::mapFillType($this->_style->getFill()->getFillType()))?1:0; - $atr_prot = self::mapLocked($this->_style->getProtection()->getLocked()) - | self::mapHidden($this->_style->getProtection()->getHidden()); - - // Zero the default border colour if the border has not been set. - if (self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) == 0) { - $this->bottomBorderColor = 0; - } - if (self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) == 0) { - $this->topBorderColor = 0; - } - if (self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) == 0) { - $this->rightBorderColor = 0; - } - if (self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()) == 0) { - $this->leftBorderColor = 0; - } - if (self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) == 0) { - $this->_diag_color = 0; - } - - $record = 0x00E0; // Record identifier - $length = 0x0014; // Number of bytes to follow - - $ifnt = $this->fontIndex; // Index to FONT record - $ifmt = $this->numberFormatIndex; // Index to FORMAT record - - $align = $this->mapHAlign($this->_style->getAlignment()->getHorizontal()); // Alignment - $align |= (int) $this->_style->getAlignment()->getWrapText() << 3; - $align |= self::mapVAlign($this->_style->getAlignment()->getVertical()) << 4; - $align |= $this->textJustLast << 7; - - $used_attrib = $atr_num << 2; - $used_attrib |= $atr_fnt << 3; - $used_attrib |= $atr_alc << 4; - $used_attrib |= $atr_bdr << 5; - $used_attrib |= $atr_pat << 6; - $used_attrib |= $atr_prot << 7; - - $icv = $this->foregroundColor; // fg and bg pattern colors - $icv |= $this->backgroundColor << 7; - - $border1 = self::mapBorderStyle($this->_style->getBorders()->getLeft()->getBorderStyle()); // Border line style and color - $border1 |= self::mapBorderStyle($this->_style->getBorders()->getRight()->getBorderStyle()) << 4; - $border1 |= self::mapBorderStyle($this->_style->getBorders()->getTop()->getBorderStyle()) << 8; - $border1 |= self::mapBorderStyle($this->_style->getBorders()->getBottom()->getBorderStyle()) << 12; - $border1 |= $this->leftBorderColor << 16; - $border1 |= $this->rightBorderColor << 23; - - $diagonalDirection = $this->_style->getBorders()->getDiagonalDirection(); - $diag_tl_to_rb = $diagonalDirection == PHPExcel_Style_Borders::DIAGONAL_BOTH - || $diagonalDirection == PHPExcel_Style_Borders::DIAGONAL_DOWN; - $diag_tr_to_lb = $diagonalDirection == PHPExcel_Style_Borders::DIAGONAL_BOTH - || $diagonalDirection == PHPExcel_Style_Borders::DIAGONAL_UP; - $border1 |= $diag_tl_to_rb << 30; - $border1 |= $diag_tr_to_lb << 31; - - $border2 = $this->topBorderColor; // Border color - $border2 |= $this->bottomBorderColor << 7; - $border2 |= $this->_diag_color << 14; - $border2 |= self::mapBorderStyle($this->_style->getBorders()->getDiagonal()->getBorderStyle()) << 21; - $border2 |= self::mapFillType($this->_style->getFill()->getFillType()) << 26; - - $header = pack("vv", $record, $length); - - //BIFF8 options: identation, shrinkToFit and text direction - $biff8_options = $this->_style->getAlignment()->getIndent(); - $biff8_options |= (int) $this->_style->getAlignment()->getShrinkToFit() << 4; - - $data = pack("vvvC", $ifnt, $ifmt, $style, $align); - $data .= pack("CCC", self::mapTextRotation($this->_style->getAlignment()->getTextRotation()), $biff8_options, $used_attrib); - $data .= pack("VVv", $border1, $border2, $icv); - - return($header . $data); - } - - /** - * Is this a style XF ? - * - * @param boolean $value - */ - public function setIsStyleXf($value) - { - $this->isStyleXf = $value; - } - - /** - * Sets the cell's bottom border color - * - * @access public - * @param int $colorIndex Color index - */ - public function setBottomColor($colorIndex) - { - $this->bottomBorderColor = $colorIndex; - } - - /** - * Sets the cell's top border color - * - * @access public - * @param int $colorIndex Color index - */ - public function setTopColor($colorIndex) - { - $this->topBorderColor = $colorIndex; - } - - /** - * Sets the cell's left border color - * - * @access public - * @param int $colorIndex Color index - */ - public function setLeftColor($colorIndex) - { - $this->leftBorderColor = $colorIndex; - } - - /** - * Sets the cell's right border color - * - * @access public - * @param int $colorIndex Color index - */ - public function setRightColor($colorIndex) - { - $this->rightBorderColor = $colorIndex; - } - - /** - * Sets the cell's diagonal border color - * - * @access public - * @param int $colorIndex Color index - */ - public function setDiagColor($colorIndex) - { - $this->_diag_color = $colorIndex; - } - - - /** - * Sets the cell's foreground color - * - * @access public - * @param int $colorIndex Color index - */ - public function setFgColor($colorIndex) - { - $this->foregroundColor = $colorIndex; - } - - /** - * Sets the cell's background color - * - * @access public - * @param int $colorIndex Color index - */ - public function setBgColor($colorIndex) - { - $this->backgroundColor = $colorIndex; - } - - /** - * Sets the index to the number format record - * It can be date, time, currency, etc... - * - * @access public - * @param integer $numberFormatIndex Index to format record - */ - public function setNumberFormatIndex($numberFormatIndex) - { - $this->numberFormatIndex = $numberFormatIndex; - } - - /** - * Set the font index. - * - * @param int $value Font index, note that value 4 does not exist - */ - public function setFontIndex($value) - { - $this->fontIndex = $value; - } - - /** - * Map of BIFF2-BIFF8 codes for border styles - * @static array of int - * - */ - private static $mapBorderStyles = array( - PHPExcel_Style_Border::BORDER_NONE => 0x00, - PHPExcel_Style_Border::BORDER_THIN => 0x01, - PHPExcel_Style_Border::BORDER_MEDIUM => 0x02, - PHPExcel_Style_Border::BORDER_DASHED => 0x03, - PHPExcel_Style_Border::BORDER_DOTTED => 0x04, - PHPExcel_Style_Border::BORDER_THICK => 0x05, - PHPExcel_Style_Border::BORDER_DOUBLE => 0x06, - PHPExcel_Style_Border::BORDER_HAIR => 0x07, - PHPExcel_Style_Border::BORDER_MEDIUMDASHED => 0x08, - PHPExcel_Style_Border::BORDER_DASHDOT => 0x09, - PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT => 0x0A, - PHPExcel_Style_Border::BORDER_DASHDOTDOT => 0x0B, - PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT => 0x0C, - PHPExcel_Style_Border::BORDER_SLANTDASHDOT => 0x0D, - ); - - /** - * Map border style - * - * @param string $borderStyle - * @return int - */ - private static function mapBorderStyle($borderStyle) - { - if (isset(self::$mapBorderStyles[$borderStyle])) { - return self::$mapBorderStyles[$borderStyle]; - } - return 0x00; - } - - /** - * Map of BIFF2-BIFF8 codes for fill types - * @static array of int - * - */ - private static $mapFillTypes = array( - PHPExcel_Style_Fill::FILL_NONE => 0x00, - PHPExcel_Style_Fill::FILL_SOLID => 0x01, - PHPExcel_Style_Fill::FILL_PATTERN_MEDIUMGRAY => 0x02, - PHPExcel_Style_Fill::FILL_PATTERN_DARKGRAY => 0x03, - PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRAY => 0x04, - PHPExcel_Style_Fill::FILL_PATTERN_DARKHORIZONTAL => 0x05, - PHPExcel_Style_Fill::FILL_PATTERN_DARKVERTICAL => 0x06, - PHPExcel_Style_Fill::FILL_PATTERN_DARKDOWN => 0x07, - PHPExcel_Style_Fill::FILL_PATTERN_DARKUP => 0x08, - PHPExcel_Style_Fill::FILL_PATTERN_DARKGRID => 0x09, - PHPExcel_Style_Fill::FILL_PATTERN_DARKTRELLIS => 0x0A, - PHPExcel_Style_Fill::FILL_PATTERN_LIGHTHORIZONTAL => 0x0B, - PHPExcel_Style_Fill::FILL_PATTERN_LIGHTVERTICAL => 0x0C, - PHPExcel_Style_Fill::FILL_PATTERN_LIGHTDOWN => 0x0D, - PHPExcel_Style_Fill::FILL_PATTERN_LIGHTUP => 0x0E, - PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRID => 0x0F, - PHPExcel_Style_Fill::FILL_PATTERN_LIGHTTRELLIS => 0x10, - PHPExcel_Style_Fill::FILL_PATTERN_GRAY125 => 0x11, - PHPExcel_Style_Fill::FILL_PATTERN_GRAY0625 => 0x12, - PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR => 0x00, // does not exist in BIFF8 - PHPExcel_Style_Fill::FILL_GRADIENT_PATH => 0x00, // does not exist in BIFF8 - ); - - /** - * Map fill type - * - * @param string $fillType - * @return int - */ - private static function mapFillType($fillType) - { - if (isset(self::$mapFillTypes[$fillType])) { - return self::$mapFillTypes[$fillType]; - } - return 0x00; - } - - /** - * Map of BIFF2-BIFF8 codes for horizontal alignment - * @static array of int - * - */ - private static $mapHAlignments = array( - PHPExcel_Style_Alignment::HORIZONTAL_GENERAL => 0, - PHPExcel_Style_Alignment::HORIZONTAL_LEFT => 1, - PHPExcel_Style_Alignment::HORIZONTAL_CENTER => 2, - PHPExcel_Style_Alignment::HORIZONTAL_RIGHT => 3, - PHPExcel_Style_Alignment::HORIZONTAL_FILL => 4, - PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY => 5, - PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS => 6, - ); - - /** - * Map to BIFF2-BIFF8 codes for horizontal alignment - * - * @param string $hAlign - * @return int - */ - private function mapHAlign($hAlign) - { - if (isset(self::$mapHAlignments[$hAlign])) { - return self::$mapHAlignments[$hAlign]; - } - return 0; - } - - /** - * Map of BIFF2-BIFF8 codes for vertical alignment - * @static array of int - * - */ - private static $mapVAlignments = array( - PHPExcel_Style_Alignment::VERTICAL_TOP => 0, - PHPExcel_Style_Alignment::VERTICAL_CENTER => 1, - PHPExcel_Style_Alignment::VERTICAL_BOTTOM => 2, - PHPExcel_Style_Alignment::VERTICAL_JUSTIFY => 3, - ); - - /** - * Map to BIFF2-BIFF8 codes for vertical alignment - * - * @param string $vAlign - * @return int - */ - private static function mapVAlign($vAlign) - { - if (isset(self::$mapVAlignments[$vAlign])) { - return self::$mapVAlignments[$vAlign]; - } - return 2; - } - - /** - * Map to BIFF8 codes for text rotation angle - * - * @param int $textRotation - * @return int - */ - private static function mapTextRotation($textRotation) - { - if ($textRotation >= 0) { - return $textRotation; - } elseif ($textRotation == -165) { - return 255; - } elseif ($textRotation < 0) { - return 90 - $textRotation; - } - } - - /** - * Map locked - * - * @param string - * @return int - */ - private static function mapLocked($locked) - { - switch ($locked) { - case PHPExcel_Style_Protection::PROTECTION_INHERIT: - return 1; - case PHPExcel_Style_Protection::PROTECTION_PROTECTED: - return 1; - case PHPExcel_Style_Protection::PROTECTION_UNPROTECTED: - return 0; - default: - return 1; - } - } - - /** - * Map hidden - * - * @param string - * @return int - */ - private static function mapHidden($hidden) - { - switch ($hidden) { - case PHPExcel_Style_Protection::PROTECTION_INHERIT: - return 0; - case PHPExcel_Style_Protection::PROTECTION_PROTECTED: - return 1; - case PHPExcel_Style_Protection::PROTECTION_UNPROTECTED: - return 0; - default: - return 0; - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Exception.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Exception.php deleted file mode 100644 index bfa0056..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Exception.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_Exception - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_Exception extends PHPExcel_Exception -{ - /** - * Error handler callback - * - * @param mixed $code - * @param mixed $string - * @param mixed $file - * @param mixed $line - * @param mixed $context - */ - public static function errorHandlerCallback($code, $string, $file, $line, $context) - { - $e = new self($string, $code); - $e->line = $line; - $e->file = $file; - throw $e; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/HTML.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/HTML.php deleted file mode 100644 index 31d7c63..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/HTML.php +++ /dev/null @@ -1,1612 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_HTML - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_HTML - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_HTML extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter -{ - /** - * PHPExcel object - * - * @var PHPExcel - */ - protected $phpExcel; - - /** - * Sheet index to write - * - * @var int - */ - private $sheetIndex = 0; - - /** - * Images root - * - * @var string - */ - private $imagesRoot = '.'; - - /** - * embed images, or link to images - * - * @var boolean - */ - private $embedImages = false; - - /** - * Use inline CSS? - * - * @var boolean - */ - private $useInlineCss = false; - - /** - * Array of CSS styles - * - * @var array - */ - private $cssStyles; - - /** - * Array of column widths in points - * - * @var array - */ - private $columnWidths; - - /** - * Default font - * - * @var PHPExcel_Style_Font - */ - private $defaultFont; - - /** - * Flag whether spans have been calculated - * - * @var boolean - */ - private $spansAreCalculated = false; - - /** - * Excel cells that should not be written as HTML cells - * - * @var array - */ - private $isSpannedCell = array(); - - /** - * Excel cells that are upper-left corner in a cell merge - * - * @var array - */ - private $isBaseCell = array(); - - /** - * Excel rows that should not be written as HTML rows - * - * @var array - */ - private $isSpannedRow = array(); - - /** - * Is the current writer creating PDF? - * - * @var boolean - */ - protected $isPdf = false; - - /** - * Generate the Navigation block - * - * @var boolean - */ - private $generateSheetNavigationBlock = true; - - /** - * Create a new PHPExcel_Writer_HTML - * - * @param PHPExcel $phpExcel PHPExcel object - */ - public function __construct(PHPExcel $phpExcel) - { - $this->phpExcel = $phpExcel; - $this->defaultFont = $this->phpExcel->getDefaultStyle()->getFont(); - } - - /** - * Save PHPExcel to file - * - * @param string $pFilename - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null) - { - // garbage collect - $this->phpExcel->garbageCollect(); - - $saveDebugLog = PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->getWriteDebugLog(); - PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog(false); - $saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType(); - PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE); - - // Build CSS - $this->buildCSS(!$this->useInlineCss); - - // Open file - $fileHandle = fopen($pFilename, 'wb+'); - if ($fileHandle === false) { - throw new PHPExcel_Writer_Exception("Could not open file $pFilename for writing."); - } - - // Write headers - fwrite($fileHandle, $this->generateHTMLHeader(!$this->useInlineCss)); - - // Write navigation (tabs) - if ((!$this->isPdf) && ($this->generateSheetNavigationBlock)) { - fwrite($fileHandle, $this->generateNavigation()); - } - - // Write data - fwrite($fileHandle, $this->generateSheetData()); - - // Write footer - fwrite($fileHandle, $this->generateHTMLFooter()); - - // Close file - fclose($fileHandle); - - PHPExcel_Calculation::setArrayReturnType($saveArrayReturnType); - PHPExcel_Calculation::getInstance($this->phpExcel)->getDebugLog()->setWriteDebugLog($saveDebugLog); - } - - /** - * Map VAlign - * - * @param string $vAlign Vertical alignment - * @return string - */ - private function mapVAlign($vAlign) - { - switch ($vAlign) { - case PHPExcel_Style_Alignment::VERTICAL_BOTTOM: - return 'bottom'; - case PHPExcel_Style_Alignment::VERTICAL_TOP: - return 'top'; - case PHPExcel_Style_Alignment::VERTICAL_CENTER: - case PHPExcel_Style_Alignment::VERTICAL_JUSTIFY: - return 'middle'; - default: - return 'baseline'; - } - } - - /** - * Map HAlign - * - * @param string $hAlign Horizontal alignment - * @return string|false - */ - private function mapHAlign($hAlign) - { - switch ($hAlign) { - case PHPExcel_Style_Alignment::HORIZONTAL_GENERAL: - return false; - case PHPExcel_Style_Alignment::HORIZONTAL_LEFT: - return 'left'; - case PHPExcel_Style_Alignment::HORIZONTAL_RIGHT: - return 'right'; - case PHPExcel_Style_Alignment::HORIZONTAL_CENTER: - case PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS: - return 'center'; - case PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY: - return 'justify'; - default: - return false; - } - } - - /** - * Map border style - * - * @param int $borderStyle Sheet index - * @return string - */ - private function mapBorderStyle($borderStyle) - { - switch ($borderStyle) { - case PHPExcel_Style_Border::BORDER_NONE: - return 'none'; - case PHPExcel_Style_Border::BORDER_DASHDOT: - return '1px dashed'; - case PHPExcel_Style_Border::BORDER_DASHDOTDOT: - return '1px dotted'; - case PHPExcel_Style_Border::BORDER_DASHED: - return '1px dashed'; - case PHPExcel_Style_Border::BORDER_DOTTED: - return '1px dotted'; - case PHPExcel_Style_Border::BORDER_DOUBLE: - return '3px double'; - case PHPExcel_Style_Border::BORDER_HAIR: - return '1px solid'; - case PHPExcel_Style_Border::BORDER_MEDIUM: - return '2px solid'; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOT: - return '2px dashed'; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHDOTDOT: - return '2px dotted'; - case PHPExcel_Style_Border::BORDER_MEDIUMDASHED: - return '2px dashed'; - case PHPExcel_Style_Border::BORDER_SLANTDASHDOT: - return '2px dashed'; - case PHPExcel_Style_Border::BORDER_THICK: - return '3px solid'; - case PHPExcel_Style_Border::BORDER_THIN: - return '1px solid'; - default: - // map others to thin - return '1px solid'; - } - } - - /** - * Get sheet index - * - * @return int - */ - public function getSheetIndex() - { - return $this->sheetIndex; - } - - /** - * Set sheet index - * - * @param int $pValue Sheet index - * @return PHPExcel_Writer_HTML - */ - public function setSheetIndex($pValue = 0) - { - $this->sheetIndex = $pValue; - return $this; - } - - /** - * Get sheet index - * - * @return boolean - */ - public function getGenerateSheetNavigationBlock() - { - return $this->generateSheetNavigationBlock; - } - - /** - * Set sheet index - * - * @param boolean $pValue Flag indicating whether the sheet navigation block should be generated or not - * @return PHPExcel_Writer_HTML - */ - public function setGenerateSheetNavigationBlock($pValue = true) - { - $this->generateSheetNavigationBlock = (bool) $pValue; - return $this; - } - - /** - * Write all sheets (resets sheetIndex to NULL) - */ - public function writeAllSheets() - { - $this->sheetIndex = null; - return $this; - } - - /** - * Generate HTML header - * - * @param boolean $pIncludeStyles Include styles? - * @return string - * @throws PHPExcel_Writer_Exception - */ - public function generateHTMLHeader($pIncludeStyles = false) - { - // PHPExcel object known? - if (is_null($this->phpExcel)) { - throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.'); - } - - // Construct HTML - $properties = $this->phpExcel->getProperties(); - $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' . PHP_EOL; - $html .= '<!-- Generated by PHPExcel - http://www.phpexcel.net -->' . PHP_EOL; - $html .= '<html>' . PHP_EOL; - $html .= ' <head>' . PHP_EOL; - $html .= ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">' . PHP_EOL; - if ($properties->getTitle() > '') { - $html .= ' <title>' . htmlspecialchars($properties->getTitle()) . '</title>' . PHP_EOL; - } - if ($properties->getCreator() > '') { - $html .= ' <meta name="author" content="' . htmlspecialchars($properties->getCreator()) . '" />' . PHP_EOL; - } - if ($properties->getTitle() > '') { - $html .= ' <meta name="title" content="' . htmlspecialchars($properties->getTitle()) . '" />' . PHP_EOL; - } - if ($properties->getDescription() > '') { - $html .= ' <meta name="description" content="' . htmlspecialchars($properties->getDescription()) . '" />' . PHP_EOL; - } - if ($properties->getSubject() > '') { - $html .= ' <meta name="subject" content="' . htmlspecialchars($properties->getSubject()) . '" />' . PHP_EOL; - } - if ($properties->getKeywords() > '') { - $html .= ' <meta name="keywords" content="' . htmlspecialchars($properties->getKeywords()) . '" />' . PHP_EOL; - } - if ($properties->getCategory() > '') { - $html .= ' <meta name="category" content="' . htmlspecialchars($properties->getCategory()) . '" />' . PHP_EOL; - } - if ($properties->getCompany() > '') { - $html .= ' <meta name="company" content="' . htmlspecialchars($properties->getCompany()) . '" />' . PHP_EOL; - } - if ($properties->getManager() > '') { - $html .= ' <meta name="manager" content="' . htmlspecialchars($properties->getManager()) . '" />' . PHP_EOL; - } - - if ($pIncludeStyles) { - $html .= $this->generateStyles(true); - } - - $html .= ' </head>' . PHP_EOL; - $html .= '' . PHP_EOL; - $html .= ' <body>' . PHP_EOL; - - return $html; - } - - /** - * Generate sheet data - * - * @return string - * @throws PHPExcel_Writer_Exception - */ - public function generateSheetData() - { - // PHPExcel object known? - if (is_null($this->phpExcel)) { - throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.'); - } - - // Ensure that Spans have been calculated? - if ($this->sheetIndex !== null || !$this->spansAreCalculated) { - $this->calculateSpans(); - } - - // Fetch sheets - $sheets = array(); - if (is_null($this->sheetIndex)) { - $sheets = $this->phpExcel->getAllSheets(); - } else { - $sheets[] = $this->phpExcel->getSheet($this->sheetIndex); - } - - // Construct HTML - $html = ''; - - // Loop all sheets - $sheetId = 0; - foreach ($sheets as $sheet) { - // Write table header - $html .= $this->generateTableHeader($sheet); - - // Get worksheet dimension - $dimension = explode(':', $sheet->calculateWorksheetDimension()); - $dimension[0] = PHPExcel_Cell::coordinateFromString($dimension[0]); - $dimension[0][0] = PHPExcel_Cell::columnIndexFromString($dimension[0][0]) - 1; - $dimension[1] = PHPExcel_Cell::coordinateFromString($dimension[1]); - $dimension[1][0] = PHPExcel_Cell::columnIndexFromString($dimension[1][0]) - 1; - - // row min,max - $rowMin = $dimension[0][1]; - $rowMax = $dimension[1][1]; - - // calculate start of <tbody>, <thead> - $tbodyStart = $rowMin; - $theadStart = $theadEnd = 0; // default: no <thead> no </thead> - if ($sheet->getPageSetup()->isRowsToRepeatAtTopSet()) { - $rowsToRepeatAtTop = $sheet->getPageSetup()->getRowsToRepeatAtTop(); - - // we can only support repeating rows that start at top row - if ($rowsToRepeatAtTop[0] == 1) { - $theadStart = $rowsToRepeatAtTop[0]; - $theadEnd = $rowsToRepeatAtTop[1]; - $tbodyStart = $rowsToRepeatAtTop[1] + 1; - } - } - - // Loop through cells - $row = $rowMin-1; - while ($row++ < $rowMax) { - // <thead> ? - if ($row == $theadStart) { - $html .= ' <thead>' . PHP_EOL; - $cellType = 'th'; - } - - // <tbody> ? - if ($row == $tbodyStart) { - $html .= ' <tbody>' . PHP_EOL; - $cellType = 'td'; - } - - // Write row if there are HTML table cells in it - if (!isset($this->isSpannedRow[$sheet->getParent()->getIndex($sheet)][$row])) { - // Start a new rowData - $rowData = array(); - // Loop through columns - $column = $dimension[0][0] - 1; - while ($column++ < $dimension[1][0]) { - // Cell exists? - if ($sheet->cellExistsByColumnAndRow($column, $row)) { - $rowData[$column] = PHPExcel_Cell::stringFromColumnIndex($column) . $row; - } else { - $rowData[$column] = ''; - } - } - $html .= $this->generateRow($sheet, $rowData, $row - 1, $cellType); - } - - // </thead> ? - if ($row == $theadEnd) { - $html .= ' </thead>' . PHP_EOL; - } - } - $html .= $this->extendRowsForChartsAndImages($sheet, $row); - - // Close table body. - $html .= ' </tbody>' . PHP_EOL; - - // Write table footer - $html .= $this->generateTableFooter(); - - // Writing PDF? - if ($this->isPdf) { - if (is_null($this->sheetIndex) && $sheetId + 1 < $this->phpExcel->getSheetCount()) { - $html .= '<div style="page-break-before:always" />'; - } - } - - // Next sheet - ++$sheetId; - } - - return $html; - } - - /** - * Generate sheet tabs - * - * @return string - * @throws PHPExcel_Writer_Exception - */ - public function generateNavigation() - { - // PHPExcel object known? - if (is_null($this->phpExcel)) { - throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.'); - } - - // Fetch sheets - $sheets = array(); - if (is_null($this->sheetIndex)) { - $sheets = $this->phpExcel->getAllSheets(); - } else { - $sheets[] = $this->phpExcel->getSheet($this->sheetIndex); - } - - // Construct HTML - $html = ''; - - // Only if there are more than 1 sheets - if (count($sheets) > 1) { - // Loop all sheets - $sheetId = 0; - - $html .= '<ul class="navigation">' . PHP_EOL; - - foreach ($sheets as $sheet) { - $html .= ' <li class="sheet' . $sheetId . '"><a href="#sheet' . $sheetId . '">' . $sheet->getTitle() . '</a></li>' . PHP_EOL; - ++$sheetId; - } - - $html .= '</ul>' . PHP_EOL; - } - - return $html; - } - - private function extendRowsForChartsAndImages(PHPExcel_Worksheet $pSheet, $row) - { - $rowMax = $row; - $colMax = 'A'; - if ($this->includeCharts) { - foreach ($pSheet->getChartCollection() as $chart) { - if ($chart instanceof PHPExcel_Chart) { - $chartCoordinates = $chart->getTopLeftPosition(); - $chartTL = PHPExcel_Cell::coordinateFromString($chartCoordinates['cell']); - $chartCol = PHPExcel_Cell::columnIndexFromString($chartTL[0]); - if ($chartTL[1] > $rowMax) { - $rowMax = $chartTL[1]; - if ($chartCol > PHPExcel_Cell::columnIndexFromString($colMax)) { - $colMax = $chartTL[0]; - } - } - } - } - } - - foreach ($pSheet->getDrawingCollection() as $drawing) { - if ($drawing instanceof PHPExcel_Worksheet_Drawing) { - $imageTL = PHPExcel_Cell::coordinateFromString($drawing->getCoordinates()); - $imageCol = PHPExcel_Cell::columnIndexFromString($imageTL[0]); - if ($imageTL[1] > $rowMax) { - $rowMax = $imageTL[1]; - if ($imageCol > PHPExcel_Cell::columnIndexFromString($colMax)) { - $colMax = $imageTL[0]; - } - } - } - } - - $html = ''; - $colMax++; - while ($row <= $rowMax) { - $html .= '<tr>'; - for ($col = 'A'; $col != $colMax; ++$col) { - $html .= '<td>'; - $html .= $this->writeImageInCell($pSheet, $col.$row); - if ($this->includeCharts) { - $html .= $this->writeChartInCell($pSheet, $col.$row); - } - $html .= '</td>'; - } - ++$row; - $html .= '</tr>'; - } - return $html; - } - - - /** - * Generate image tag in cell - * - * @param PHPExcel_Worksheet $pSheet PHPExcel_Worksheet - * @param string $coordinates Cell coordinates - * @return string - * @throws PHPExcel_Writer_Exception - */ - private function writeImageInCell(PHPExcel_Worksheet $pSheet, $coordinates) - { - // Construct HTML - $html = ''; - - // Write images - foreach ($pSheet->getDrawingCollection() as $drawing) { - if ($drawing instanceof PHPExcel_Worksheet_Drawing) { - if ($drawing->getCoordinates() == $coordinates) { - $filename = $drawing->getPath(); - - // Strip off eventual '.' - if (substr($filename, 0, 1) == '.') { - $filename = substr($filename, 1); - } - - // Prepend images root - $filename = $this->getImagesRoot() . $filename; - - // Strip off eventual '.' - if (substr($filename, 0, 1) == '.' && substr($filename, 0, 2) != './') { - $filename = substr($filename, 1); - } - - // Convert UTF8 data to PCDATA - $filename = htmlspecialchars($filename); - - $html .= PHP_EOL; - if ((!$this->embedImages) || ($this->isPdf)) { - $imageData = $filename; - } else { - $imageDetails = getimagesize($filename); - if ($fp = fopen($filename, "rb", 0)) { - $picture = fread($fp, filesize($filename)); - fclose($fp); - // base64 encode the binary data, then break it - // into chunks according to RFC 2045 semantics - $base64 = chunk_split(base64_encode($picture)); - $imageData = 'data:'.$imageDetails['mime'].';base64,' . $base64; - } else { - $imageData = $filename; - } - } - - $html .= '<div style="position: relative;">'; - $html .= '<img style="position: absolute; z-index: 1; left: ' . - $drawing->getOffsetX() . 'px; top: ' . $drawing->getOffsetY() . 'px; width: ' . - $drawing->getWidth() . 'px; height: ' . $drawing->getHeight() . 'px;" src="' . - $imageData . '" border="0" />'; - $html .= '</div>'; - } - } elseif ($drawing instanceof PHPExcel_Worksheet_MemoryDrawing) { - if ($drawing->getCoordinates() != $coordinates) { - continue; - } - ob_start(); // Let's start output buffering. - imagepng($drawing->getImageResource()); // This will normally output the image, but because of ob_start(), it won't. - $contents = ob_get_contents(); // Instead, output above is saved to $contents - ob_end_clean(); // End the output buffer. - - $dataUri = "data:image/jpeg;base64," . base64_encode($contents); - - // Because of the nature of tables, width is more important than height. - // max-width: 100% ensures that image doesnt overflow containing cell - // width: X sets width of supplied image. - // As a result, images bigger than cell will be contained and images smaller will not get stretched - $html .= '<img src="'.$dataUri.'" style="max-width:100%;width:'.$drawing->getWidth().'px;" />'; - } - } - - return $html; - } - - /** - * Generate chart tag in cell - * - * @param PHPExcel_Worksheet $pSheet PHPExcel_Worksheet - * @param string $coordinates Cell coordinates - * @return string - * @throws PHPExcel_Writer_Exception - */ - private function writeChartInCell(PHPExcel_Worksheet $pSheet, $coordinates) - { - // Construct HTML - $html = ''; - - // Write charts - foreach ($pSheet->getChartCollection() as $chart) { - if ($chart instanceof PHPExcel_Chart) { - $chartCoordinates = $chart->getTopLeftPosition(); - if ($chartCoordinates['cell'] == $coordinates) { - $chartFileName = PHPExcel_Shared_File::sys_get_temp_dir().'/'.uniqid().'.png'; - if (!$chart->render($chartFileName)) { - return; - } - - $html .= PHP_EOL; - $imageDetails = getimagesize($chartFileName); - if ($fp = fopen($chartFileName, "rb", 0)) { - $picture = fread($fp, filesize($chartFileName)); - fclose($fp); - // base64 encode the binary data, then break it - // into chunks according to RFC 2045 semantics - $base64 = chunk_split(base64_encode($picture)); - $imageData = 'data:'.$imageDetails['mime'].';base64,' . $base64; - - $html .= '<div style="position: relative;">'; - $html .= '<img style="position: absolute; z-index: 1; left: ' . $chartCoordinates['xOffset'] . 'px; top: ' . $chartCoordinates['yOffset'] . 'px; width: ' . $imageDetails[0] . 'px; height: ' . $imageDetails[1] . 'px;" src="' . $imageData . '" border="0" />' . PHP_EOL; - $html .= '</div>'; - - unlink($chartFileName); - } - } - } - } - - // Return - return $html; - } - - /** - * Generate CSS styles - * - * @param boolean $generateSurroundingHTML Generate surrounding HTML tags? (&lt;style&gt; and &lt;/style&gt;) - * @return string - * @throws PHPExcel_Writer_Exception - */ - public function generateStyles($generateSurroundingHTML = true) - { - // PHPExcel object known? - if (is_null($this->phpExcel)) { - throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.'); - } - - // Build CSS - $css = $this->buildCSS($generateSurroundingHTML); - - // Construct HTML - $html = ''; - - // Start styles - if ($generateSurroundingHTML) { - $html .= ' <style type="text/css">' . PHP_EOL; - $html .= ' html { ' . $this->assembleCSS($css['html']) . ' }' . PHP_EOL; - } - - // Write all other styles - foreach ($css as $styleName => $styleDefinition) { - if ($styleName != 'html') { - $html .= ' ' . $styleName . ' { ' . $this->assembleCSS($styleDefinition) . ' }' . PHP_EOL; - } - } - - // End styles - if ($generateSurroundingHTML) { - $html .= ' </style>' . PHP_EOL; - } - - // Return - return $html; - } - - /** - * Build CSS styles - * - * @param boolean $generateSurroundingHTML Generate surrounding HTML style? (html { }) - * @return array - * @throws PHPExcel_Writer_Exception - */ - public function buildCSS($generateSurroundingHTML = true) - { - // PHPExcel object known? - if (is_null($this->phpExcel)) { - throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.'); - } - - // Cached? - if (!is_null($this->cssStyles)) { - return $this->cssStyles; - } - - // Ensure that spans have been calculated - if (!$this->spansAreCalculated) { - $this->calculateSpans(); - } - - // Construct CSS - $css = array(); - - // Start styles - if ($generateSurroundingHTML) { - // html { } - $css['html']['font-family'] = 'Calibri, Arial, Helvetica, sans-serif'; - $css['html']['font-size'] = '11pt'; - $css['html']['background-color'] = 'white'; - } - - - // table { } - $css['table']['border-collapse'] = 'collapse'; - if (!$this->isPdf) { - $css['table']['page-break-after'] = 'always'; - } - - // .gridlines td { } - $css['.gridlines td']['border'] = '1px dotted black'; - $css['.gridlines th']['border'] = '1px dotted black'; - - // .b {} - $css['.b']['text-align'] = 'center'; // BOOL - - // .e {} - $css['.e']['text-align'] = 'center'; // ERROR - - // .f {} - $css['.f']['text-align'] = 'right'; // FORMULA - - // .inlineStr {} - $css['.inlineStr']['text-align'] = 'left'; // INLINE - - // .n {} - $css['.n']['text-align'] = 'right'; // NUMERIC - - // .s {} - $css['.s']['text-align'] = 'left'; // STRING - - // Calculate cell style hashes - foreach ($this->phpExcel->getCellXfCollection() as $index => $style) { - $css['td.style' . $index] = $this->createCSSStyle($style); - $css['th.style' . $index] = $this->createCSSStyle($style); - } - - // Fetch sheets - $sheets = array(); - if (is_null($this->sheetIndex)) { - $sheets = $this->phpExcel->getAllSheets(); - } else { - $sheets[] = $this->phpExcel->getSheet($this->sheetIndex); - } - - // Build styles per sheet - foreach ($sheets as $sheet) { - // Calculate hash code - $sheetIndex = $sheet->getParent()->getIndex($sheet); - - // Build styles - // Calculate column widths - $sheet->calculateColumnWidths(); - - // col elements, initialize - $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($sheet->getHighestColumn()) - 1; - $column = -1; - while ($column++ < $highestColumnIndex) { - $this->columnWidths[$sheetIndex][$column] = 42; // approximation - $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = '42pt'; - } - - // col elements, loop through columnDimensions and set width - foreach ($sheet->getColumnDimensions() as $columnDimension) { - if (($width = PHPExcel_Shared_Drawing::cellDimensionToPixels($columnDimension->getWidth(), $this->defaultFont)) >= 0) { - $width = PHPExcel_Shared_Drawing::pixelsToPoints($width); - $column = PHPExcel_Cell::columnIndexFromString($columnDimension->getColumnIndex()) - 1; - $this->columnWidths[$sheetIndex][$column] = $width; - $css['table.sheet' . $sheetIndex . ' col.col' . $column]['width'] = $width . 'pt'; - - if ($columnDimension->getVisible() === false) { - $css['table.sheet' . $sheetIndex . ' col.col' . $column]['visibility'] = 'collapse'; - $css['table.sheet' . $sheetIndex . ' col.col' . $column]['*display'] = 'none'; // target IE6+7 - } - } - } - - // Default row height - $rowDimension = $sheet->getDefaultRowDimension(); - - // table.sheetN tr { } - $css['table.sheet' . $sheetIndex . ' tr'] = array(); - - if ($rowDimension->getRowHeight() == -1) { - $pt_height = PHPExcel_Shared_Font::getDefaultRowHeightByFont($this->phpExcel->getDefaultStyle()->getFont()); - } else { - $pt_height = $rowDimension->getRowHeight(); - } - $css['table.sheet' . $sheetIndex . ' tr']['height'] = $pt_height . 'pt'; - if ($rowDimension->getVisible() === false) { - $css['table.sheet' . $sheetIndex . ' tr']['display'] = 'none'; - $css['table.sheet' . $sheetIndex . ' tr']['visibility'] = 'hidden'; - } - - // Calculate row heights - foreach ($sheet->getRowDimensions() as $rowDimension) { - $row = $rowDimension->getRowIndex() - 1; - - // table.sheetN tr.rowYYYYYY { } - $css['table.sheet' . $sheetIndex . ' tr.row' . $row] = array(); - - if ($rowDimension->getRowHeight() == -1) { - $pt_height = PHPExcel_Shared_Font::getDefaultRowHeightByFont($this->phpExcel->getDefaultStyle()->getFont()); - } else { - $pt_height = $rowDimension->getRowHeight(); - } - $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['height'] = $pt_height . 'pt'; - if ($rowDimension->getVisible() === false) { - $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['display'] = 'none'; - $css['table.sheet' . $sheetIndex . ' tr.row' . $row]['visibility'] = 'hidden'; - } - } - } - - // Cache - if (is_null($this->cssStyles)) { - $this->cssStyles = $css; - } - - // Return - return $css; - } - - /** - * Create CSS style - * - * @param PHPExcel_Style $pStyle PHPExcel_Style - * @return array - */ - private function createCSSStyle(PHPExcel_Style $pStyle) - { - // Construct CSS - $css = ''; - - // Create CSS - $css = array_merge( - $this->createCSSStyleAlignment($pStyle->getAlignment()), - $this->createCSSStyleBorders($pStyle->getBorders()), - $this->createCSSStyleFont($pStyle->getFont()), - $this->createCSSStyleFill($pStyle->getFill()) - ); - - // Return - return $css; - } - - /** - * Create CSS style (PHPExcel_Style_Alignment) - * - * @param PHPExcel_Style_Alignment $pStyle PHPExcel_Style_Alignment - * @return array - */ - private function createCSSStyleAlignment(PHPExcel_Style_Alignment $pStyle) - { - // Construct CSS - $css = array(); - - // Create CSS - $css['vertical-align'] = $this->mapVAlign($pStyle->getVertical()); - if ($textAlign = $this->mapHAlign($pStyle->getHorizontal())) { - $css['text-align'] = $textAlign; - if (in_array($textAlign, array('left', 'right'))) { - $css['padding-'.$textAlign] = (string)((int)$pStyle->getIndent() * 9).'px'; - } - } - - return $css; - } - - /** - * Create CSS style (PHPExcel_Style_Font) - * - * @param PHPExcel_Style_Font $pStyle PHPExcel_Style_Font - * @return array - */ - private function createCSSStyleFont(PHPExcel_Style_Font $pStyle) - { - // Construct CSS - $css = array(); - - // Create CSS - if ($pStyle->getBold()) { - $css['font-weight'] = 'bold'; - } - if ($pStyle->getUnderline() != PHPExcel_Style_Font::UNDERLINE_NONE && $pStyle->getStrikethrough()) { - $css['text-decoration'] = 'underline line-through'; - } elseif ($pStyle->getUnderline() != PHPExcel_Style_Font::UNDERLINE_NONE) { - $css['text-decoration'] = 'underline'; - } elseif ($pStyle->getStrikethrough()) { - $css['text-decoration'] = 'line-through'; - } - if ($pStyle->getItalic()) { - $css['font-style'] = 'italic'; - } - - $css['color'] = '#' . $pStyle->getColor()->getRGB(); - $css['font-family'] = '\'' . $pStyle->getName() . '\''; - $css['font-size'] = $pStyle->getSize() . 'pt'; - - return $css; - } - - /** - * Create CSS style (PHPExcel_Style_Borders) - * - * @param PHPExcel_Style_Borders $pStyle PHPExcel_Style_Borders - * @return array - */ - private function createCSSStyleBorders(PHPExcel_Style_Borders $pStyle) - { - // Construct CSS - $css = array(); - - // Create CSS - $css['border-bottom'] = $this->createCSSStyleBorder($pStyle->getBottom()); - $css['border-top'] = $this->createCSSStyleBorder($pStyle->getTop()); - $css['border-left'] = $this->createCSSStyleBorder($pStyle->getLeft()); - $css['border-right'] = $this->createCSSStyleBorder($pStyle->getRight()); - - return $css; - } - - /** - * Create CSS style (PHPExcel_Style_Border) - * - * @param PHPExcel_Style_Border $pStyle PHPExcel_Style_Border - * @return string - */ - private function createCSSStyleBorder(PHPExcel_Style_Border $pStyle) - { - // Create CSS -// $css = $this->mapBorderStyle($pStyle->getBorderStyle()) . ' #' . $pStyle->getColor()->getRGB(); - // Create CSS - add !important to non-none border styles for merged cells - $borderStyle = $this->mapBorderStyle($pStyle->getBorderStyle()); - $css = $borderStyle . ' #' . $pStyle->getColor()->getRGB() . (($borderStyle == 'none') ? '' : ' !important'); - - return $css; - } - - /** - * Create CSS style (PHPExcel_Style_Fill) - * - * @param PHPExcel_Style_Fill $pStyle PHPExcel_Style_Fill - * @return array - */ - private function createCSSStyleFill(PHPExcel_Style_Fill $pStyle) - { - // Construct HTML - $css = array(); - - // Create CSS - $value = $pStyle->getFillType() == PHPExcel_Style_Fill::FILL_NONE ? - 'white' : '#' . $pStyle->getStartColor()->getRGB(); - $css['background-color'] = $value; - - return $css; - } - - /** - * Generate HTML footer - */ - public function generateHTMLFooter() - { - // Construct HTML - $html = ''; - $html .= ' </body>' . PHP_EOL; - $html .= '</html>' . PHP_EOL; - - return $html; - } - - /** - * Generate table header - * - * @param PHPExcel_Worksheet $pSheet The worksheet for the table we are writing - * @return string - * @throws PHPExcel_Writer_Exception - */ - private function generateTableHeader($pSheet) - { - $sheetIndex = $pSheet->getParent()->getIndex($pSheet); - - // Construct HTML - $html = ''; - $html .= $this->setMargins($pSheet); - - if (!$this->useInlineCss) { - $gridlines = $pSheet->getShowGridlines() ? ' gridlines' : ''; - $html .= ' <table border="0" cellpadding="0" cellspacing="0" id="sheet' . $sheetIndex . '" class="sheet' . $sheetIndex . $gridlines . '">' . PHP_EOL; - } else { - $style = isset($this->cssStyles['table']) ? - $this->assembleCSS($this->cssStyles['table']) : ''; - - if ($this->isPdf && $pSheet->getShowGridlines()) { - $html .= ' <table border="1" cellpadding="1" id="sheet' . $sheetIndex . '" cellspacing="1" style="' . $style . '">' . PHP_EOL; - } else { - $html .= ' <table border="0" cellpadding="1" id="sheet' . $sheetIndex . '" cellspacing="0" style="' . $style . '">' . PHP_EOL; - } - } - - // Write <col> elements - $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($pSheet->getHighestColumn()) - 1; - $i = -1; - while ($i++ < $highestColumnIndex) { - if (!$this->isPdf) { - if (!$this->useInlineCss) { - $html .= ' <col class="col' . $i . '">' . PHP_EOL; - } else { - $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) ? - $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) : ''; - $html .= ' <col style="' . $style . '">' . PHP_EOL; - } - } - } - - return $html; - } - - /** - * Generate table footer - * - * @throws PHPExcel_Writer_Exception - */ - private function generateTableFooter() - { - $html = ' </table>' . PHP_EOL; - - return $html; - } - - /** - * Generate row - * - * @param PHPExcel_Worksheet $pSheet PHPExcel_Worksheet - * @param array $pValues Array containing cells in a row - * @param int $pRow Row number (0-based) - * @return string - * @throws PHPExcel_Writer_Exception - */ - private function generateRow(PHPExcel_Worksheet $pSheet, $pValues = null, $pRow = 0, $cellType = 'td') - { - if (is_array($pValues)) { - // Construct HTML - $html = ''; - - // Sheet index - $sheetIndex = $pSheet->getParent()->getIndex($pSheet); - - // DomPDF and breaks - if ($this->isPdf && count($pSheet->getBreaks()) > 0) { - $breaks = $pSheet->getBreaks(); - - // check if a break is needed before this row - if (isset($breaks['A' . $pRow])) { - // close table: </table> - $html .= $this->generateTableFooter(); - - // insert page break - $html .= '<div style="page-break-before:always" />'; - - // open table again: <table> + <col> etc. - $html .= $this->generateTableHeader($pSheet); - } - } - - // Write row start - if (!$this->useInlineCss) { - $html .= ' <tr class="row' . $pRow . '">' . PHP_EOL; - } else { - $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) - ? $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) : ''; - - $html .= ' <tr style="' . $style . '">' . PHP_EOL; - } - - // Write cells - $colNum = 0; - foreach ($pValues as $cellAddress) { - $cell = ($cellAddress > '') ? $pSheet->getCell($cellAddress) : ''; - $coordinate = PHPExcel_Cell::stringFromColumnIndex($colNum) . ($pRow + 1); - if (!$this->useInlineCss) { - $cssClass = ''; - $cssClass = 'column' . $colNum; - } else { - $cssClass = array(); - if ($cellType == 'th') { - if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' th.column' . $colNum])) { - $this->cssStyles['table.sheet' . $sheetIndex . ' th.column' . $colNum]; - } - } else { - if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' td.column' . $colNum])) { - $this->cssStyles['table.sheet' . $sheetIndex . ' td.column' . $colNum]; - } - } - } - $colSpan = 1; - $rowSpan = 1; - - // initialize - $cellData = '&nbsp;'; - - // PHPExcel_Cell - if ($cell instanceof PHPExcel_Cell) { - $cellData = ''; - if (is_null($cell->getParent())) { - $cell->attach($pSheet); - } - // Value - if ($cell->getValue() instanceof PHPExcel_RichText) { - // Loop through rich text elements - $elements = $cell->getValue()->getRichTextElements(); - foreach ($elements as $element) { - // Rich text start? - if ($element instanceof PHPExcel_RichText_Run) { - $cellData .= '<span style="' . $this->assembleCSS($this->createCSSStyleFont($element->getFont())) . '">'; - - if ($element->getFont()->getSuperScript()) { - $cellData .= '<sup>'; - } elseif ($element->getFont()->getSubScript()) { - $cellData .= '<sub>'; - } - } - - // Convert UTF8 data to PCDATA - $cellText = $element->getText(); - $cellData .= htmlspecialchars($cellText); - - if ($element instanceof PHPExcel_RichText_Run) { - if ($element->getFont()->getSuperScript()) { - $cellData .= '</sup>'; - } elseif ($element->getFont()->getSubScript()) { - $cellData .= '</sub>'; - } - - $cellData .= '</span>'; - } - } - } else { - if ($this->preCalculateFormulas) { - $cellData = PHPExcel_Style_NumberFormat::toFormattedString( - $cell->getCalculatedValue(), - $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode(), - array($this, 'formatColor') - ); - } else { - $cellData = PHPExcel_Style_NumberFormat::toFormattedString( - $cell->getValue(), - $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getNumberFormat()->getFormatCode(), - array($this, 'formatColor') - ); - } - $cellData = htmlspecialchars($cellData); - if ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSuperScript()) { - $cellData = '<sup>'.$cellData.'</sup>'; - } elseif ($pSheet->getParent()->getCellXfByIndex($cell->getXfIndex())->getFont()->getSubScript()) { - $cellData = '<sub>'.$cellData.'</sub>'; - } - } - - // Converts the cell content so that spaces occuring at beginning of each new line are replaced by &nbsp; - // Example: " Hello\n to the world" is converted to "&nbsp;&nbsp;Hello\n&nbsp;to the world" - $cellData = preg_replace("/(?m)(?:^|\\G) /", '&nbsp;', $cellData); - - // convert newline "\n" to '<br>' - $cellData = nl2br($cellData); - - // Extend CSS class? - if (!$this->useInlineCss) { - $cssClass .= ' style' . $cell->getXfIndex(); - $cssClass .= ' ' . $cell->getDataType(); - } else { - if ($cellType == 'th') { - if (isset($this->cssStyles['th.style' . $cell->getXfIndex()])) { - $cssClass = array_merge($cssClass, $this->cssStyles['th.style' . $cell->getXfIndex()]); - } - } else { - if (isset($this->cssStyles['td.style' . $cell->getXfIndex()])) { - $cssClass = array_merge($cssClass, $this->cssStyles['td.style' . $cell->getXfIndex()]); - } - } - - // General horizontal alignment: Actual horizontal alignment depends on dataType - $sharedStyle = $pSheet->getParent()->getCellXfByIndex($cell->getXfIndex()); - if ($sharedStyle->getAlignment()->getHorizontal() == PHPExcel_Style_Alignment::HORIZONTAL_GENERAL - && isset($this->cssStyles['.' . $cell->getDataType()]['text-align'])) { - $cssClass['text-align'] = $this->cssStyles['.' . $cell->getDataType()]['text-align']; - } - } - } - - // Hyperlink? - if ($pSheet->hyperlinkExists($coordinate) && !$pSheet->getHyperlink($coordinate)->isInternal()) { - $cellData = '<a href="' . htmlspecialchars($pSheet->getHyperlink($coordinate)->getUrl()) . '" title="' . htmlspecialchars($pSheet->getHyperlink($coordinate)->getTooltip()) . '">' . $cellData . '</a>'; - } - - // Should the cell be written or is it swallowed by a rowspan or colspan? - $writeCell = !(isset($this->isSpannedCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]) - && $this->isSpannedCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]); - - // Colspan and Rowspan - $colspan = 1; - $rowspan = 1; - if (isset($this->isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum])) { - $spans = $this->isBaseCell[$pSheet->getParent()->getIndex($pSheet)][$pRow + 1][$colNum]; - $rowSpan = $spans['rowspan']; - $colSpan = $spans['colspan']; - - // Also apply style from last cell in merge to fix borders - - // relies on !important for non-none border declarations in createCSSStyleBorder - $endCellCoord = PHPExcel_Cell::stringFromColumnIndex($colNum + $colSpan - 1) . ($pRow + $rowSpan); - if (!$this->useInlineCss) { - $cssClass .= ' style' . $pSheet->getCell($endCellCoord)->getXfIndex(); - } - } - - // Write - if ($writeCell) { - // Column start - $html .= ' <' . $cellType; - if (!$this->useInlineCss) { - $html .= ' class="' . $cssClass . '"'; - } else { - //** Necessary redundant code for the sake of PHPExcel_Writer_PDF ** - // We must explicitly write the width of the <td> element because TCPDF - // does not recognize e.g. <col style="width:42pt"> - $width = 0; - $i = $colNum - 1; - $e = $colNum + $colSpan - 1; - while ($i++ < $e) { - if (isset($this->columnWidths[$sheetIndex][$i])) { - $width += $this->columnWidths[$sheetIndex][$i]; - } - } - $cssClass['width'] = $width . 'pt'; - - // We must also explicitly write the height of the <td> element because TCPDF - // does not recognize e.g. <tr style="height:50pt"> - if (isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]['height'])) { - $height = $this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]['height']; - $cssClass['height'] = $height; - } - //** end of redundant code ** - - $html .= ' style="' . $this->assembleCSS($cssClass) . '"'; - } - if ($colSpan > 1) { - $html .= ' colspan="' . $colSpan . '"'; - } - if ($rowSpan > 1) { - $html .= ' rowspan="' . $rowSpan . '"'; - } - $html .= '>'; - - // Image? - $html .= $this->writeImageInCell($pSheet, $coordinate); - - // Chart? - if ($this->includeCharts) { - $html .= $this->writeChartInCell($pSheet, $coordinate); - } - - // Cell data - $html .= $cellData; - - // Column end - $html .= '</'.$cellType.'>' . PHP_EOL; - } - - // Next column - ++$colNum; - } - - // Write row end - $html .= ' </tr>' . PHP_EOL; - - // Return - return $html; - } else { - throw new PHPExcel_Writer_Exception("Invalid parameters passed."); - } - } - - /** - * Takes array where of CSS properties / values and converts to CSS string - * - * @param array - * @return string - */ - private function assembleCSS($pValue = array()) - { - $pairs = array(); - foreach ($pValue as $property => $value) { - $pairs[] = $property . ':' . $value; - } - $string = implode('; ', $pairs); - - return $string; - } - - /** - * Get images root - * - * @return string - */ - public function getImagesRoot() - { - return $this->imagesRoot; - } - - /** - * Set images root - * - * @param string $pValue - * @return PHPExcel_Writer_HTML - */ - public function setImagesRoot($pValue = '.') - { - $this->imagesRoot = $pValue; - return $this; - } - - /** - * Get embed images - * - * @return boolean - */ - public function getEmbedImages() - { - return $this->embedImages; - } - - /** - * Set embed images - * - * @param boolean $pValue - * @return PHPExcel_Writer_HTML - */ - public function setEmbedImages($pValue = '.') - { - $this->embedImages = $pValue; - return $this; - } - - /** - * Get use inline CSS? - * - * @return boolean - */ - public function getUseInlineCss() - { - return $this->useInlineCss; - } - - /** - * Set use inline CSS? - * - * @param boolean $pValue - * @return PHPExcel_Writer_HTML - */ - public function setUseInlineCss($pValue = false) - { - $this->useInlineCss = $pValue; - return $this; - } - - /** - * Add color to formatted string as inline style - * - * @param string $pValue Plain formatted value without color - * @param string $pFormat Format code - * @return string - */ - public function formatColor($pValue, $pFormat) - { - // Color information, e.g. [Red] is always at the beginning - $color = null; // initialize - $matches = array(); - - $color_regex = '/^\\[[a-zA-Z]+\\]/'; - if (preg_match($color_regex, $pFormat, $matches)) { - $color = str_replace('[', '', $matches[0]); - $color = str_replace(']', '', $color); - $color = strtolower($color); - } - - // convert to PCDATA - $value = htmlspecialchars($pValue); - - // color span tag - if ($color !== null) { - $value = '<span style="color:' . $color . '">' . $value . '</span>'; - } - - return $value; - } - - /** - * Calculate information about HTML colspan and rowspan which is not always the same as Excel's - */ - private function calculateSpans() - { - // Identify all cells that should be omitted in HTML due to cell merge. - // In HTML only the upper-left cell should be written and it should have - // appropriate rowspan / colspan attribute - $sheetIndexes = $this->sheetIndex !== null ? - array($this->sheetIndex) : range(0, $this->phpExcel->getSheetCount() - 1); - - foreach ($sheetIndexes as $sheetIndex) { - $sheet = $this->phpExcel->getSheet($sheetIndex); - - $candidateSpannedRow = array(); - - // loop through all Excel merged cells - foreach ($sheet->getMergeCells() as $cells) { - list($cells,) = PHPExcel_Cell::splitRange($cells); - $first = $cells[0]; - $last = $cells[1]; - - list($fc, $fr) = PHPExcel_Cell::coordinateFromString($first); - $fc = PHPExcel_Cell::columnIndexFromString($fc) - 1; - - list($lc, $lr) = PHPExcel_Cell::coordinateFromString($last); - $lc = PHPExcel_Cell::columnIndexFromString($lc) - 1; - - // loop through the individual cells in the individual merge - $r = $fr - 1; - while ($r++ < $lr) { - // also, flag this row as a HTML row that is candidate to be omitted - $candidateSpannedRow[$r] = $r; - - $c = $fc - 1; - while ($c++ < $lc) { - if (!($c == $fc && $r == $fr)) { - // not the upper-left cell (should not be written in HTML) - $this->isSpannedCell[$sheetIndex][$r][$c] = array( - 'baseCell' => array($fr, $fc), - ); - } else { - // upper-left is the base cell that should hold the colspan/rowspan attribute - $this->isBaseCell[$sheetIndex][$r][$c] = array( - 'xlrowspan' => $lr - $fr + 1, // Excel rowspan - 'rowspan' => $lr - $fr + 1, // HTML rowspan, value may change - 'xlcolspan' => $lc - $fc + 1, // Excel colspan - 'colspan' => $lc - $fc + 1, // HTML colspan, value may change - ); - } - } - } - } - - // Identify which rows should be omitted in HTML. These are the rows where all the cells - // participate in a merge and the where base cells are somewhere above. - $countColumns = PHPExcel_Cell::columnIndexFromString($sheet->getHighestColumn()); - foreach ($candidateSpannedRow as $rowIndex) { - if (isset($this->isSpannedCell[$sheetIndex][$rowIndex])) { - if (count($this->isSpannedCell[$sheetIndex][$rowIndex]) == $countColumns) { - $this->isSpannedRow[$sheetIndex][$rowIndex] = $rowIndex; - }; - } - } - - // For each of the omitted rows we found above, the affected rowspans should be subtracted by 1 - if (isset($this->isSpannedRow[$sheetIndex])) { - foreach ($this->isSpannedRow[$sheetIndex] as $rowIndex) { - $adjustedBaseCells = array(); - $c = -1; - $e = $countColumns - 1; - while ($c++ < $e) { - $baseCell = $this->isSpannedCell[$sheetIndex][$rowIndex][$c]['baseCell']; - - if (!in_array($baseCell, $adjustedBaseCells)) { - // subtract rowspan by 1 - --$this->isBaseCell[$sheetIndex][ $baseCell[0] ][ $baseCell[1] ]['rowspan']; - $adjustedBaseCells[] = $baseCell; - } - } - } - } - - // TODO: Same for columns - } - - // We have calculated the spans - $this->spansAreCalculated = true; - } - - private function setMargins(PHPExcel_Worksheet $pSheet) - { - $htmlPage = '@page { '; - $htmlBody = 'body { '; - - $left = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getLeft()) . 'in; '; - $htmlPage .= 'margin-left: ' . $left; - $htmlBody .= 'margin-left: ' . $left; - $right = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getRight()) . 'in; '; - $htmlPage .= 'margin-right: ' . $right; - $htmlBody .= 'margin-right: ' . $right; - $top = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getTop()) . 'in; '; - $htmlPage .= 'margin-top: ' . $top; - $htmlBody .= 'margin-top: ' . $top; - $bottom = PHPExcel_Shared_String::FormatNumber($pSheet->getPageMargins()->getBottom()) . 'in; '; - $htmlPage .= 'margin-bottom: ' . $bottom; - $htmlBody .= 'margin-bottom: ' . $bottom; - - $htmlPage .= "}\n"; - $htmlBody .= "}\n"; - - return "<style>\n" . $htmlPage . $htmlBody . "</style>\n"; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/IWriter.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/IWriter.php deleted file mode 100644 index c7cfe74..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/IWriter.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_IWriter - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -interface PHPExcel_Writer_IWriter -{ - /** - * Save PHPExcel to file - * - * @param string $pFilename Name of the file to save - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null); -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument.php deleted file mode 100644 index 912ba9d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_OpenDocument - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_OpenDocument extends PHPExcel_Writer_Abstract implements PHPExcel_Writer_IWriter -{ - /** - * Private writer parts - * - * @var PHPExcel_Writer_OpenDocument_WriterPart[] - */ - private $writerParts = array(); - - /** - * Private PHPExcel - * - * @var PHPExcel - */ - private $spreadSheet; - - /** - * Create a new PHPExcel_Writer_OpenDocument - * - * @param PHPExcel $pPHPExcel - */ - public function __construct(PHPExcel $pPHPExcel = null) - { - $this->setPHPExcel($pPHPExcel); - - $writerPartsArray = array( - 'content' => 'PHPExcel_Writer_OpenDocument_Content', - 'meta' => 'PHPExcel_Writer_OpenDocument_Meta', - 'meta_inf' => 'PHPExcel_Writer_OpenDocument_MetaInf', - 'mimetype' => 'PHPExcel_Writer_OpenDocument_Mimetype', - 'settings' => 'PHPExcel_Writer_OpenDocument_Settings', - 'styles' => 'PHPExcel_Writer_OpenDocument_Styles', - 'thumbnails' => 'PHPExcel_Writer_OpenDocument_Thumbnails' - ); - - foreach ($writerPartsArray as $writer => $class) { - $this->writerParts[$writer] = new $class($this); - } - } - - /** - * Get writer part - * - * @param string $pPartName Writer part name - * @return PHPExcel_Writer_Excel2007_WriterPart - */ - public function getWriterPart($pPartName = '') - { - if ($pPartName != '' && isset($this->writerParts[strtolower($pPartName)])) { - return $this->writerParts[strtolower($pPartName)]; - } else { - return null; - } - } - - /** - * Save PHPExcel to file - * - * @param string $pFilename - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null) - { - if (!$this->spreadSheet) { - throw new PHPExcel_Writer_Exception('PHPExcel object unassigned.'); - } - - // garbage collect - $this->spreadSheet->garbageCollect(); - - // If $pFilename is php://output or php://stdout, make it a temporary file... - $originalFilename = $pFilename; - if (strtolower($pFilename) == 'php://output' || strtolower($pFilename) == 'php://stdout') { - $pFilename = @tempnam(PHPExcel_Shared_File::sys_get_temp_dir(), 'phpxltmp'); - if ($pFilename == '') { - $pFilename = $originalFilename; - } - } - - $objZip = $this->createZip($pFilename); - - $objZip->addFromString('META-INF/manifest.xml', $this->getWriterPart('meta_inf')->writeManifest()); - $objZip->addFromString('Thumbnails/thumbnail.png', $this->getWriterPart('thumbnails')->writeThumbnail()); - $objZip->addFromString('content.xml', $this->getWriterPart('content')->write()); - $objZip->addFromString('meta.xml', $this->getWriterPart('meta')->write()); - $objZip->addFromString('mimetype', $this->getWriterPart('mimetype')->write()); - $objZip->addFromString('settings.xml', $this->getWriterPart('settings')->write()); - $objZip->addFromString('styles.xml', $this->getWriterPart('styles')->write()); - - // Close file - if ($objZip->close() === false) { - throw new PHPExcel_Writer_Exception("Could not close zip file $pFilename."); - } - - // If a temporary file was used, copy it to the correct file stream - if ($originalFilename != $pFilename) { - if (copy($pFilename, $originalFilename) === false) { - throw new PHPExcel_Writer_Exception("Could not copy temporary zip file $pFilename to $originalFilename."); - } - @unlink($pFilename); - } - } - - /** - * Create zip object - * - * @param string $pFilename - * @throws PHPExcel_Writer_Exception - * @return ZipArchive - */ - private function createZip($pFilename) - { - // Create new ZIP file and open it for writing - $zipClass = PHPExcel_Settings::getZipClass(); - $objZip = new $zipClass(); - - // Retrieve OVERWRITE and CREATE constants from the instantiated zip class - // This method of accessing constant values from a dynamic class should work with all appropriate versions of PHP - $ro = new ReflectionObject($objZip); - $zipOverWrite = $ro->getConstant('OVERWRITE'); - $zipCreate = $ro->getConstant('CREATE'); - - if (file_exists($pFilename)) { - unlink($pFilename); - } - // Try opening the ZIP file - if ($objZip->open($pFilename, $zipOverWrite) !== true) { - if ($objZip->open($pFilename, $zipCreate) !== true) { - throw new PHPExcel_Writer_Exception("Could not open $pFilename for writing."); - } - } - - return $objZip; - } - - /** - * Get PHPExcel object - * - * @return PHPExcel - * @throws PHPExcel_Writer_Exception - */ - public function getPHPExcel() - { - if ($this->spreadSheet !== null) { - return $this->spreadSheet; - } else { - throw new PHPExcel_Writer_Exception('No PHPExcel assigned.'); - } - } - - /** - * Set PHPExcel object - * - * @param PHPExcel $pPHPExcel PHPExcel object - * @throws PHPExcel_Writer_Exception - * @return PHPExcel_Writer_Excel2007 - */ - public function setPHPExcel(PHPExcel $pPHPExcel = null) - { - $this->spreadSheet = $pPHPExcel; - return $this; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Cell/Comment.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Cell/Comment.php deleted file mode 100644 index f1e98a1..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Cell/Comment.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Writer_OpenDocument_Cell_Comment - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @author Alexander Pervakov <frost-nzcr4@jagmort.com> - */ -class PHPExcel_Writer_OpenDocument_Cell_Comment -{ - public static function write(PHPExcel_Shared_XMLWriter $objWriter, PHPExcel_Cell $cell) - { - $comments = $cell->getWorksheet()->getComments(); - if (!isset($comments[$cell->getCoordinate()])) { - return; - } - $comment = $comments[$cell->getCoordinate()]; - - $objWriter->startElement('office:annotation'); - //$objWriter->writeAttribute('draw:style-name', 'gr1'); - //$objWriter->writeAttribute('draw:text-style-name', 'P1'); - $objWriter->writeAttribute('svg:width', $comment->getWidth()); - $objWriter->writeAttribute('svg:height', $comment->getHeight()); - $objWriter->writeAttribute('svg:x', $comment->getMarginLeft()); - $objWriter->writeAttribute('svg:y', $comment->getMarginTop()); - //$objWriter->writeAttribute('draw:caption-point-x', $comment->getMarginLeft()); - //$objWriter->writeAttribute('draw:caption-point-y', $comment->getMarginTop()); - $objWriter->writeElement('dc:creator', $comment->getAuthor()); - // TODO: Not realized in PHPExcel_Comment yet. - //$objWriter->writeElement('dc:date', $comment->getDate()); - $objWriter->writeElement('text:p', $comment->getText()->getPlainText()); - //$objWriter->writeAttribute('draw:text-style-name', 'P1'); - $objWriter->endElement(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Content.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Content.php deleted file mode 100644 index a34b167..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Content.php +++ /dev/null @@ -1,272 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - - -/** - * PHPExcel_Writer_OpenDocument_Content - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @author Alexander Pervakov <frost-nzcr4@jagmort.com> - */ -class PHPExcel_Writer_OpenDocument_Content extends PHPExcel_Writer_OpenDocument_WriterPart -{ - const NUMBER_COLS_REPEATED_MAX = 1024; - const NUMBER_ROWS_REPEATED_MAX = 1048576; - - /** - * Write content.xml to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function write(PHPExcel $pPHPExcel = null) - { - if (!$pPHPExcel) { - $pPHPExcel = $this->getParentWriter()->getPHPExcel(); /* @var $pPHPExcel PHPExcel */ - } - - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8'); - - // Content - $objWriter->startElement('office:document-content'); - $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); - $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); - $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); - $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); - $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); - $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); - $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); - $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); - $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); - $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'); - $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); - $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); - $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); - $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); - $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); - $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); - $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); - $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); - $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); - $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); - $objWriter->writeAttribute('xmlns:xforms', 'http://www.w3.org/2002/xforms'); - $objWriter->writeAttribute('xmlns:xsd', 'http://www.w3.org/2001/XMLSchema'); - $objWriter->writeAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); - $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); - $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); - $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); - $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); - $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); - $objWriter->writeAttribute('xmlns:field', 'urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0'); - $objWriter->writeAttribute('xmlns:formx', 'urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0'); - $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); - $objWriter->writeAttribute('office:version', '1.2'); - - $objWriter->writeElement('office:scripts'); - $objWriter->writeElement('office:font-face-decls'); - $objWriter->writeElement('office:automatic-styles'); - - $objWriter->startElement('office:body'); - $objWriter->startElement('office:spreadsheet'); - $objWriter->writeElement('table:calculation-settings'); - $this->writeSheets($objWriter); - $objWriter->writeElement('table:named-expressions'); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - - return $objWriter->getData(); - } - - /** - * Write sheets - * - * @param PHPExcel_Shared_XMLWriter $objWriter - */ - private function writeSheets(PHPExcel_Shared_XMLWriter $objWriter) - { - $pPHPExcel = $this->getParentWriter()->getPHPExcel(); /* @var $pPHPExcel PHPExcel */ - - $sheet_count = $pPHPExcel->getSheetCount(); - for ($i = 0; $i < $sheet_count; $i++) { - //$this->getWriterPart('Worksheet')->writeWorksheet()); - $objWriter->startElement('table:table'); - $objWriter->writeAttribute('table:name', $pPHPExcel->getSheet($i)->getTitle()); - $objWriter->writeElement('office:forms'); - $objWriter->startElement('table:table-column'); - $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX); - $objWriter->endElement(); - $this->writeRows($objWriter, $pPHPExcel->getSheet($i)); - $objWriter->endElement(); - } - } - - /** - * Write rows of the specified sheet - * - * @param PHPExcel_Shared_XMLWriter $objWriter - * @param PHPExcel_Worksheet $sheet - */ - private function writeRows(PHPExcel_Shared_XMLWriter $objWriter, PHPExcel_Worksheet $sheet) - { - $number_rows_repeated = self::NUMBER_ROWS_REPEATED_MAX; - $span_row = 0; - $rows = $sheet->getRowIterator(); - while ($rows->valid()) { - $number_rows_repeated--; - $row = $rows->current(); - if ($row->getCellIterator()->valid()) { - if ($span_row) { - $objWriter->startElement('table:table-row'); - if ($span_row > 1) { - $objWriter->writeAttribute('table:number-rows-repeated', $span_row); - } - $objWriter->startElement('table:table-cell'); - $objWriter->writeAttribute('table:number-columns-repeated', self::NUMBER_COLS_REPEATED_MAX); - $objWriter->endElement(); - $objWriter->endElement(); - $span_row = 0; - } - $objWriter->startElement('table:table-row'); - $this->writeCells($objWriter, $row); - $objWriter->endElement(); - } else { - $span_row++; - } - $rows->next(); - } - } - - /** - * Write cells of the specified row - * - * @param PHPExcel_Shared_XMLWriter $objWriter - * @param PHPExcel_Worksheet_Row $row - * @throws PHPExcel_Writer_Exception - */ - private function writeCells(PHPExcel_Shared_XMLWriter $objWriter, PHPExcel_Worksheet_Row $row) - { - $number_cols_repeated = self::NUMBER_COLS_REPEATED_MAX; - $prev_column = -1; - $cells = $row->getCellIterator(); - while ($cells->valid()) { - $cell = $cells->current(); - $column = PHPExcel_Cell::columnIndexFromString($cell->getColumn()) - 1; - - $this->writeCellSpan($objWriter, $column, $prev_column); - $objWriter->startElement('table:table-cell'); - - switch ($cell->getDataType()) { - case PHPExcel_Cell_DataType::TYPE_BOOL: - $objWriter->writeAttribute('office:value-type', 'boolean'); - $objWriter->writeAttribute('office:value', $cell->getValue()); - $objWriter->writeElement('text:p', $cell->getValue()); - break; - - case PHPExcel_Cell_DataType::TYPE_ERROR: - throw new PHPExcel_Writer_Exception('Writing of error not implemented yet.'); - break; - - case PHPExcel_Cell_DataType::TYPE_FORMULA: - try { - $formula_value = $cell->getCalculatedValue(); - } catch (Exception $e) { - $formula_value = $cell->getValue(); - } - $objWriter->writeAttribute('table:formula', 'of:' . $cell->getValue()); - if (is_numeric($formula_value)) { - $objWriter->writeAttribute('office:value-type', 'float'); - } else { - $objWriter->writeAttribute('office:value-type', 'string'); - } - $objWriter->writeAttribute('office:value', $formula_value); - $objWriter->writeElement('text:p', $formula_value); - break; - - case PHPExcel_Cell_DataType::TYPE_INLINE: - throw new PHPExcel_Writer_Exception('Writing of inline not implemented yet.'); - break; - - case PHPExcel_Cell_DataType::TYPE_NUMERIC: - $objWriter->writeAttribute('office:value-type', 'float'); - $objWriter->writeAttribute('office:value', $cell->getValue()); - $objWriter->writeElement('text:p', $cell->getValue()); - break; - - case PHPExcel_Cell_DataType::TYPE_STRING: - $objWriter->writeAttribute('office:value-type', 'string'); - $objWriter->writeElement('text:p', $cell->getValue()); - break; - } - PHPExcel_Writer_OpenDocument_Cell_Comment::write($objWriter, $cell); - $objWriter->endElement(); - $prev_column = $column; - $cells->next(); - } - $number_cols_repeated = $number_cols_repeated - $prev_column - 1; - if ($number_cols_repeated > 0) { - if ($number_cols_repeated > 1) { - $objWriter->startElement('table:table-cell'); - $objWriter->writeAttribute('table:number-columns-repeated', $number_cols_repeated); - $objWriter->endElement(); - } else { - $objWriter->writeElement('table:table-cell'); - } - } - } - - /** - * Write span - * - * @param PHPExcel_Shared_XMLWriter $objWriter - * @param integer $curColumn - * @param integer $prevColumn - */ - private function writeCellSpan(PHPExcel_Shared_XMLWriter $objWriter, $curColumn, $prevColumn) - { - $diff = $curColumn - $prevColumn - 1; - if (1 === $diff) { - $objWriter->writeElement('table:table-cell'); - } elseif ($diff > 1) { - $objWriter->startElement('table:table-cell'); - $objWriter->writeAttribute('table:number-columns-repeated', $diff); - $objWriter->endElement(); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Meta.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Meta.php deleted file mode 100644 index 1a5c5fd..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Meta.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_OpenDocument_Meta - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_OpenDocument_Meta extends PHPExcel_Writer_OpenDocument_WriterPart -{ - /** - * Write meta.xml to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function write(PHPExcel $pPHPExcel = null) - { - if (!$pPHPExcel) { - $pPHPExcel = $this->getParentWriter()->getPHPExcel(); - } - - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8'); - - // Meta - $objWriter->startElement('office:document-meta'); - - $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); - $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); - $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); - $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); - $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); - $objWriter->writeAttribute('office:version', '1.2'); - - $objWriter->startElement('office:meta'); - - $objWriter->writeElement('meta:initial-creator', $pPHPExcel->getProperties()->getCreator()); - $objWriter->writeElement('dc:creator', $pPHPExcel->getProperties()->getCreator()); - $objWriter->writeElement('meta:creation-date', date(DATE_W3C, $pPHPExcel->getProperties()->getCreated())); - $objWriter->writeElement('dc:date', date(DATE_W3C, $pPHPExcel->getProperties()->getCreated())); - $objWriter->writeElement('dc:title', $pPHPExcel->getProperties()->getTitle()); - $objWriter->writeElement('dc:description', $pPHPExcel->getProperties()->getDescription()); - $objWriter->writeElement('dc:subject', $pPHPExcel->getProperties()->getSubject()); - $keywords = explode(' ', $pPHPExcel->getProperties()->getKeywords()); - foreach ($keywords as $keyword) { - $objWriter->writeElement('meta:keyword', $keyword); - } - - //<meta:document-statistic meta:table-count="XXX" meta:cell-count="XXX" meta:object-count="XXX"/> - $objWriter->startElement('meta:user-defined'); - $objWriter->writeAttribute('meta:name', 'Company'); - $objWriter->writeRaw($pPHPExcel->getProperties()->getCompany()); - $objWriter->endElement(); - - $objWriter->startElement('meta:user-defined'); - $objWriter->writeAttribute('meta:name', 'category'); - $objWriter->writeRaw($pPHPExcel->getProperties()->getCategory()); - $objWriter->endElement(); - - $objWriter->endElement(); - - $objWriter->endElement(); - - return $objWriter->getData(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/MetaInf.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/MetaInf.php deleted file mode 100644 index c43b723..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/MetaInf.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_OpenDocument_MetaInf - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_OpenDocument_MetaInf extends PHPExcel_Writer_OpenDocument_WriterPart -{ - /** - * Write META-INF/manifest.xml to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeManifest(PHPExcel $pPHPExcel = null) - { - if (!$pPHPExcel) { - $pPHPExcel = $this->getParentWriter()->getPHPExcel(); - } - - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8'); - - // Manifest - $objWriter->startElement('manifest:manifest'); - $objWriter->writeAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0'); - $objWriter->writeAttribute('manifest:version', '1.2'); - - $objWriter->startElement('manifest:file-entry'); - $objWriter->writeAttribute('manifest:full-path', '/'); - $objWriter->writeAttribute('manifest:version', '1.2'); - $objWriter->writeAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.spreadsheet'); - $objWriter->endElement(); - $objWriter->startElement('manifest:file-entry'); - $objWriter->writeAttribute('manifest:full-path', 'meta.xml'); - $objWriter->writeAttribute('manifest:media-type', 'text/xml'); - $objWriter->endElement(); - $objWriter->startElement('manifest:file-entry'); - $objWriter->writeAttribute('manifest:full-path', 'settings.xml'); - $objWriter->writeAttribute('manifest:media-type', 'text/xml'); - $objWriter->endElement(); - $objWriter->startElement('manifest:file-entry'); - $objWriter->writeAttribute('manifest:full-path', 'content.xml'); - $objWriter->writeAttribute('manifest:media-type', 'text/xml'); - $objWriter->endElement(); - $objWriter->startElement('manifest:file-entry'); - $objWriter->writeAttribute('manifest:full-path', 'Thumbnails/thumbnail.png'); - $objWriter->writeAttribute('manifest:media-type', 'image/png'); - $objWriter->endElement(); - $objWriter->startElement('manifest:file-entry'); - $objWriter->writeAttribute('manifest:full-path', 'styles.xml'); - $objWriter->writeAttribute('manifest:media-type', 'text/xml'); - $objWriter->endElement(); - $objWriter->endElement(); - - return $objWriter->getData(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Mimetype.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Mimetype.php deleted file mode 100644 index d51a8b9..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Mimetype.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * PHPExcel - * - * PHPExcel_Writer_OpenDocument_Mimetype - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_OpenDocument_Mimetype extends PHPExcel_Writer_OpenDocument_WriterPart -{ - /** - * Write mimetype to plain text format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function write(PHPExcel $pPHPExcel = null) - { - return 'application/vnd.oasis.opendocument.spreadsheet'; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Settings.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Settings.php deleted file mode 100644 index 84161b6..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Settings.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_OpenDocument_Settings - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_OpenDocument_Settings extends PHPExcel_Writer_OpenDocument_WriterPart -{ - /** - * Write settings.xml to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function write(PHPExcel $pPHPExcel = null) - { - if (!$pPHPExcel) { - $pPHPExcel = $this->getParentWriter()->getPHPExcel(); - } - - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8'); - - // Settings - $objWriter->startElement('office:document-settings'); - $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); - $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - $objWriter->writeAttribute('xmlns:config', 'urn:oasis:names:tc:opendocument:xmlns:config:1.0'); - $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); - $objWriter->writeAttribute('office:version', '1.2'); - - $objWriter->startElement('office:settings'); - $objWriter->startElement('config:config-item-set'); - $objWriter->writeAttribute('config:name', 'ooo:view-settings'); - $objWriter->startElement('config:config-item-map-indexed'); - $objWriter->writeAttribute('config:name', 'Views'); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->startElement('config:config-item-set'); - $objWriter->writeAttribute('config:name', 'ooo:configuration-settings'); - $objWriter->endElement(); - $objWriter->endElement(); - $objWriter->endElement(); - - return $objWriter->getData(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Styles.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Styles.php deleted file mode 100644 index cc6e25b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Styles.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_OpenDocument_Styles - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_OpenDocument_Styles extends PHPExcel_Writer_OpenDocument_WriterPart -{ - /** - * Write styles.xml to XML format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function write(PHPExcel $pPHPExcel = null) - { - if (!$pPHPExcel) { - $pPHPExcel = $this->getParentWriter()->getPHPExcel(); - } - - $objWriter = null; - if ($this->getParentWriter()->getUseDiskCaching()) { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_DISK, $this->getParentWriter()->getDiskCachingDirectory()); - } else { - $objWriter = new PHPExcel_Shared_XMLWriter(PHPExcel_Shared_XMLWriter::STORAGE_MEMORY); - } - - // XML header - $objWriter->startDocument('1.0', 'UTF-8'); - - // Content - $objWriter->startElement('office:document-styles'); - $objWriter->writeAttribute('xmlns:office', 'urn:oasis:names:tc:opendocument:xmlns:office:1.0'); - $objWriter->writeAttribute('xmlns:style', 'urn:oasis:names:tc:opendocument:xmlns:style:1.0'); - $objWriter->writeAttribute('xmlns:text', 'urn:oasis:names:tc:opendocument:xmlns:text:1.0'); - $objWriter->writeAttribute('xmlns:table', 'urn:oasis:names:tc:opendocument:xmlns:table:1.0'); - $objWriter->writeAttribute('xmlns:draw', 'urn:oasis:names:tc:opendocument:xmlns:drawing:1.0'); - $objWriter->writeAttribute('xmlns:fo', 'urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0'); - $objWriter->writeAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); - $objWriter->writeAttribute('xmlns:dc', 'http://purl.org/dc/elements/1.1/'); - $objWriter->writeAttribute('xmlns:meta', 'urn:oasis:names:tc:opendocument:xmlns:meta:1.0'); - $objWriter->writeAttribute('xmlns:number', 'urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0'); - $objWriter->writeAttribute('xmlns:presentation', 'urn:oasis:names:tc:opendocument:xmlns:presentation:1.0'); - $objWriter->writeAttribute('xmlns:svg', 'urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0'); - $objWriter->writeAttribute('xmlns:chart', 'urn:oasis:names:tc:opendocument:xmlns:chart:1.0'); - $objWriter->writeAttribute('xmlns:dr3d', 'urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0'); - $objWriter->writeAttribute('xmlns:math', 'http://www.w3.org/1998/Math/MathML'); - $objWriter->writeAttribute('xmlns:form', 'urn:oasis:names:tc:opendocument:xmlns:form:1.0'); - $objWriter->writeAttribute('xmlns:script', 'urn:oasis:names:tc:opendocument:xmlns:script:1.0'); - $objWriter->writeAttribute('xmlns:ooo', 'http://openoffice.org/2004/office'); - $objWriter->writeAttribute('xmlns:ooow', 'http://openoffice.org/2004/writer'); - $objWriter->writeAttribute('xmlns:oooc', 'http://openoffice.org/2004/calc'); - $objWriter->writeAttribute('xmlns:dom', 'http://www.w3.org/2001/xml-events'); - $objWriter->writeAttribute('xmlns:rpt', 'http://openoffice.org/2005/report'); - $objWriter->writeAttribute('xmlns:of', 'urn:oasis:names:tc:opendocument:xmlns:of:1.2'); - $objWriter->writeAttribute('xmlns:xhtml', 'http://www.w3.org/1999/xhtml'); - $objWriter->writeAttribute('xmlns:grddl', 'http://www.w3.org/2003/g/data-view#'); - $objWriter->writeAttribute('xmlns:tableooo', 'http://openoffice.org/2009/table'); - $objWriter->writeAttribute('xmlns:css3t', 'http://www.w3.org/TR/css3-text/'); - $objWriter->writeAttribute('office:version', '1.2'); - - $objWriter->writeElement('office:font-face-decls'); - $objWriter->writeElement('office:styles'); - $objWriter->writeElement('office:automatic-styles'); - $objWriter->writeElement('office:master-styles'); - $objWriter->endElement(); - - return $objWriter->getData(); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Thumbnails.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Thumbnails.php deleted file mode 100644 index 54247ae..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/Thumbnails.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_OpenDocument_Thumbnails - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_OpenDocument_Thumbnails extends PHPExcel_Writer_OpenDocument_WriterPart -{ - /** - * Write Thumbnails/thumbnail.png to PNG format - * - * @param PHPExcel $pPHPExcel - * @return string XML Output - * @throws PHPExcel_Writer_Exception - */ - public function writeThumbnail(PHPExcel $pPHPExcel = null) - { - return ''; - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/WriterPart.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/WriterPart.php deleted file mode 100644 index 562787a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/OpenDocument/WriterPart.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_OpenDocument_WriterPart - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_OpenDocument - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -abstract class PHPExcel_Writer_OpenDocument_WriterPart extends PHPExcel_Writer_Excel2007_WriterPart -{ -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF.php deleted file mode 100644 index 579edfa..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_PDF - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_PDF - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_PDF implements PHPExcel_Writer_IWriter -{ - - /** - * The wrapper for the requested PDF rendering engine - * - * @var PHPExcel_Writer_PDF_Core - */ - private $renderer = null; - - /** - * Instantiate a new renderer of the configured type within this container class - * - * @param PHPExcel $phpExcel PHPExcel object - * @throws PHPExcel_Writer_Exception when PDF library is not configured - */ - public function __construct(PHPExcel $phpExcel) - { - $pdfLibraryName = PHPExcel_Settings::getPdfRendererName(); - if (is_null($pdfLibraryName)) { - throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined."); - } - - $pdfLibraryPath = PHPExcel_Settings::getPdfRendererPath(); - if (is_null($pdfLibraryName)) { - throw new PHPExcel_Writer_Exception("PDF Rendering library path has not been defined."); - } - $includePath = str_replace('\\', '/', get_include_path()); - $rendererPath = str_replace('\\', '/', $pdfLibraryPath); - if (strpos($rendererPath, $includePath) === false) { - set_include_path(get_include_path() . PATH_SEPARATOR . $pdfLibraryPath); - } - - $rendererName = 'PHPExcel_Writer_PDF_' . $pdfLibraryName; - $this->renderer = new $rendererName($phpExcel); - } - - - /** - * Magic method to handle direct calls to the configured PDF renderer wrapper class. - * - * @param string $name Renderer library method name - * @param mixed[] $arguments Array of arguments to pass to the renderer method - * @return mixed Returned data from the PDF renderer wrapper method - */ - public function __call($name, $arguments) - { - if ($this->renderer === null) { - throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined."); - } - - return call_user_func_array(array($this->renderer, $name), $arguments); - } - - /** - * {@inheritdoc} - */ - public function save($pFilename = null) - { - $this->renderer->save($pFilename); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/Core.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/Core.php deleted file mode 100644 index 4fed84a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/Core.php +++ /dev/null @@ -1,355 +0,0 @@ -<?php - -/** - * PHPExcel_Writer_PDF_Core - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_PDF - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -abstract class PHPExcel_Writer_PDF_Core extends PHPExcel_Writer_HTML -{ - /** - * Temporary storage directory - * - * @var string - */ - protected $tempDir = ''; - - /** - * Font - * - * @var string - */ - protected $font = 'freesans'; - - /** - * Orientation (Over-ride) - * - * @var string - */ - protected $orientation; - - /** - * Paper size (Over-ride) - * - * @var int - */ - protected $paperSize; - - - /** - * Temporary storage for Save Array Return type - * - * @var string - */ - private $saveArrayReturnType; - - /** - * Paper Sizes xRef List - * - * @var array - */ - protected static $paperSizes = array( - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER - => 'LETTER', // (8.5 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_SMALL - => 'LETTER', // (8.5 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_TABLOID - => array(792.00, 1224.00), // (11 in. by 17 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEDGER - => array(1224.00, 792.00), // (17 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEGAL - => 'LEGAL', // (8.5 in. by 14 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_STATEMENT - => array(396.00, 612.00), // (5.5 in. by 8.5 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_EXECUTIVE - => 'EXECUTIVE', // (7.25 in. by 10.5 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3 - => 'A3', // (297 mm by 420 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4 - => 'A4', // (210 mm by 297 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_SMALL - => 'A4', // (210 mm by 297 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5 - => 'A5', // (148 mm by 210 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_B4 - => 'B4', // (250 mm by 353 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_B5 - => 'B5', // (176 mm by 250 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_FOLIO - => 'FOLIO', // (8.5 in. by 13 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_QUARTO - => array(609.45, 779.53), // (215 mm by 275 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_1 - => array(720.00, 1008.00), // (10 in. by 14 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_2 - => array(792.00, 1224.00), // (11 in. by 17 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_NOTE - => 'LETTER', // (8.5 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO9_ENVELOPE - => array(279.00, 639.00), // (3.875 in. by 8.875 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO10_ENVELOPE - => array(297.00, 684.00), // (4.125 in. by 9.5 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO11_ENVELOPE - => array(324.00, 747.00), // (4.5 in. by 10.375 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO12_ENVELOPE - => array(342.00, 792.00), // (4.75 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_NO14_ENVELOPE - => array(360.00, 828.00), // (5 in. by 11.5 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_C - => array(1224.00, 1584.00), // (17 in. by 22 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_D - => array(1584.00, 2448.00), // (22 in. by 34 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_E - => array(2448.00, 3168.00), // (34 in. by 44 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_DL_ENVELOPE - => array(311.81, 623.62), // (110 mm by 220 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_C5_ENVELOPE - => 'C5', // (162 mm by 229 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_C3_ENVELOPE - => 'C3', // (324 mm by 458 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_C4_ENVELOPE - => 'C4', // (229 mm by 324 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_C6_ENVELOPE - => 'C6', // (114 mm by 162 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_C65_ENVELOPE - => array(323.15, 649.13), // (114 mm by 229 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_B4_ENVELOPE - => 'B4', // (250 mm by 353 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_B5_ENVELOPE - => 'B5', // (176 mm by 250 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_B6_ENVELOPE - => array(498.90, 354.33), // (176 mm by 125 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_ITALY_ENVELOPE - => array(311.81, 651.97), // (110 mm by 230 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_MONARCH_ENVELOPE - => array(279.00, 540.00), // (3.875 in. by 7.5 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_6_3_4_ENVELOPE - => array(261.00, 468.00), // (3.625 in. by 6.5 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_US_STANDARD_FANFOLD - => array(1071.00, 792.00), // (14.875 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_GERMAN_STANDARD_FANFOLD - => array(612.00, 864.00), // (8.5 in. by 12 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_GERMAN_LEGAL_FANFOLD - => 'FOLIO', // (8.5 in. by 13 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_ISO_B4 - => 'B4', // (250 mm by 353 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_JAPANESE_DOUBLE_POSTCARD - => array(566.93, 419.53), // (200 mm by 148 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_1 - => array(648.00, 792.00), // (9 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_2 - => array(720.00, 792.00), // (10 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_STANDARD_PAPER_3 - => array(1080.00, 792.00), // (15 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_INVITE_ENVELOPE - => array(623.62, 623.62), // (220 mm by 220 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER - => array(667.80, 864.00), // (9.275 in. by 12 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER - => array(667.80, 1080.00), // (9.275 in. by 15 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER - => array(841.68, 1296.00), // (11.69 in. by 18 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_EXTRA_PAPER - => array(668.98, 912.76), // (236 mm by 322 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_TRANSVERSE_PAPER - => array(595.80, 792.00), // (8.275 in. by 11 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_TRANSVERSE_PAPER - => 'A4', // (210 mm by 297 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_EXTRA_TRANSVERSE_PAPER - => array(667.80, 864.00), // (9.275 in. by 12 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_SUPERA_SUPERA_A4_PAPER - => array(643.46, 1009.13), // (227 mm by 356 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_SUPERB_SUPERB_A3_PAPER - => array(864.57, 1380.47), // (305 mm by 487 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_PLUS_PAPER - => array(612.00, 913.68), // (8.5 in. by 12.69 in.) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4_PLUS_PAPER - => array(595.28, 935.43), // (210 mm by 330 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5_TRANSVERSE_PAPER - => 'A5', // (148 mm by 210 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_JIS_B5_TRANSVERSE_PAPER - => array(515.91, 728.50), // (182 mm by 257 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_EXTRA_PAPER - => array(912.76, 1261.42), // (322 mm by 445 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5_EXTRA_PAPER - => array(493.23, 666.14), // (174 mm by 235 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER - => array(569.76, 782.36), // (201 mm by 276 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A2_PAPER - => 'A2', // (420 mm by 594 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER - => 'A3', // (297 mm by 420 mm) - PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER - => array(912.76, 1261.42) // (322 mm by 445 mm) - ); - - /** - * Create a new PHPExcel_Writer_PDF - * - * @param PHPExcel $phpExcel PHPExcel object - */ - public function __construct(PHPExcel $phpExcel) - { - parent::__construct($phpExcel); - $this->setUseInlineCss(true); - $this->tempDir = PHPExcel_Shared_File::sys_get_temp_dir(); - } - - /** - * Get Font - * - * @return string - */ - public function getFont() - { - return $this->font; - } - - /** - * Set font. Examples: - * 'arialunicid0-chinese-simplified' - * 'arialunicid0-chinese-traditional' - * 'arialunicid0-korean' - * 'arialunicid0-japanese' - * - * @param string $fontName - */ - public function setFont($fontName) - { - $this->font = $fontName; - return $this; - } - - /** - * Get Paper Size - * - * @return int - */ - public function getPaperSize() - { - return $this->paperSize; - } - - /** - * Set Paper Size - * - * @param string $pValue Paper size - * @return PHPExcel_Writer_PDF - */ - public function setPaperSize($pValue = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER) - { - $this->paperSize = $pValue; - return $this; - } - - /** - * Get Orientation - * - * @return string - */ - public function getOrientation() - { - return $this->orientation; - } - - /** - * Set Orientation - * - * @param string $pValue Page orientation - * @return PHPExcel_Writer_PDF - */ - public function setOrientation($pValue = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) - { - $this->orientation = $pValue; - return $this; - } - - /** - * Get temporary storage directory - * - * @return string - */ - public function getTempDir() - { - return $this->tempDir; - } - - /** - * Set temporary storage directory - * - * @param string $pValue Temporary storage directory - * @throws PHPExcel_Writer_Exception when directory does not exist - * @return PHPExcel_Writer_PDF - */ - public function setTempDir($pValue = '') - { - if (is_dir($pValue)) { - $this->tempDir = $pValue; - } else { - throw new PHPExcel_Writer_Exception("Directory does not exist: $pValue"); - } - return $this; - } - - /** - * Save PHPExcel to PDF file, pre-save - * - * @param string $pFilename Name of the file to save as - * @throws PHPExcel_Writer_Exception - */ - protected function prepareForSave($pFilename = null) - { - // garbage collect - $this->phpExcel->garbageCollect(); - - $this->saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType(); - PHPExcel_Calculation::setArrayReturnType(PHPExcel_Calculation::RETURN_ARRAY_AS_VALUE); - - // Open file - $fileHandle = fopen($pFilename, 'w'); - if ($fileHandle === false) { - throw new PHPExcel_Writer_Exception("Could not open file $pFilename for writing."); - } - - // Set PDF - $this->isPdf = true; - // Build CSS - $this->buildCSS(true); - - return $fileHandle; - } - - /** - * Save PHPExcel to PDF file, post-save - * - * @param resource $fileHandle - * @throws PHPExcel_Writer_Exception - */ - protected function restoreStateAfterSave($fileHandle) - { - // Close file - fclose($fileHandle); - - PHPExcel_Calculation::setArrayReturnType($this->saveArrayReturnType); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/DomPDF.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/DomPDF.php deleted file mode 100644 index 83761ac..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/DomPDF.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -/** Require DomPDF library */ -$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/dompdf_config.inc.php'; -if (file_exists($pdfRendererClassFile)) { - require_once $pdfRendererClassFile; -} else { - throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library'); -} - -/** - * PHPExcel_Writer_PDF_DomPDF - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_PDF - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_PDF_DomPDF extends PHPExcel_Writer_PDF_Core implements PHPExcel_Writer_IWriter -{ - /** - * Create a new PHPExcel_Writer_PDF - * - * @param PHPExcel $phpExcel PHPExcel object - */ - public function __construct(PHPExcel $phpExcel) - { - parent::__construct($phpExcel); - } - - /** - * Save PHPExcel to file - * - * @param string $pFilename Name of the file to save as - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null) - { - $fileHandle = parent::prepareForSave($pFilename); - - // Default PDF paper size - $paperSize = 'LETTER'; // Letter (8.5 in. by 11 in.) - - // Check for paper size and page orientation - if (is_null($this->getSheetIndex())) { - $orientation = ($this->phpExcel->getSheet(0)->getPageSetup()->getOrientation() - == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; - $printPaperSize = $this->phpExcel->getSheet(0)->getPageSetup()->getPaperSize(); - $printMargins = $this->phpExcel->getSheet(0)->getPageMargins(); - } else { - $orientation = ($this->phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() - == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; - $printPaperSize = $this->phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); - $printMargins = $this->phpExcel->getSheet($this->getSheetIndex())->getPageMargins(); - } - - $orientation = ($orientation == 'L') ? 'landscape' : 'portrait'; - - // Override Page Orientation - if (!is_null($this->getOrientation())) { - $orientation = ($this->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) - ? PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT - : $this->getOrientation(); - } - // Override Paper Size - if (!is_null($this->getPaperSize())) { - $printPaperSize = $this->getPaperSize(); - } - - if (isset(self::$paperSizes[$printPaperSize])) { - $paperSize = self::$paperSizes[$printPaperSize]; - } - - - // Create PDF - $pdf = new DOMPDF(); - $pdf->set_paper(strtolower($paperSize), $orientation); - - $pdf->load_html( - $this->generateHTMLHeader(false) . - $this->generateSheetData() . - $this->generateHTMLFooter() - ); - $pdf->render(); - - // Write to file - fwrite($fileHandle, $pdf->output()); - - parent::restoreStateAfterSave($fileHandle); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/mPDF.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/mPDF.php deleted file mode 100644 index e4e6057..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/mPDF.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -/** Require mPDF library */ -$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/mpdf.php'; -if (file_exists($pdfRendererClassFile)) { - require_once $pdfRendererClassFile; -} else { - throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library'); -} - -/** - * PHPExcel_Writer_PDF_mPDF - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_PDF - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_PDF_mPDF extends PHPExcel_Writer_PDF_Core implements PHPExcel_Writer_IWriter -{ - /** - * Create a new PHPExcel_Writer_PDF - * - * @param PHPExcel $phpExcel PHPExcel object - */ - public function __construct(PHPExcel $phpExcel) - { - parent::__construct($phpExcel); - } - - /** - * Save PHPExcel to file - * - * @param string $pFilename Name of the file to save as - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null) - { - $fileHandle = parent::prepareForSave($pFilename); - - // Default PDF paper size - $paperSize = 'LETTER'; // Letter (8.5 in. by 11 in.) - - // Check for paper size and page orientation - if (is_null($this->getSheetIndex())) { - $orientation = ($this->phpExcel->getSheet(0)->getPageSetup()->getOrientation() - == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; - $printPaperSize = $this->phpExcel->getSheet(0)->getPageSetup()->getPaperSize(); - $printMargins = $this->phpExcel->getSheet(0)->getPageMargins(); - } else { - $orientation = ($this->phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() - == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; - $printPaperSize = $this->phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); - $printMargins = $this->phpExcel->getSheet($this->getSheetIndex())->getPageMargins(); - } - $this->setOrientation($orientation); - - // Override Page Orientation - if (!is_null($this->getOrientation())) { - $orientation = ($this->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) - ? PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT - : $this->getOrientation(); - } - $orientation = strtoupper($orientation); - - // Override Paper Size - if (!is_null($this->getPaperSize())) { - $printPaperSize = $this->getPaperSize(); - } - - if (isset(self::$paperSizes[$printPaperSize])) { - $paperSize = self::$paperSizes[$printPaperSize]; - } - - - // Create PDF - $pdf = new mpdf(); - $ortmp = $orientation; - $pdf->_setPageSize(strtoupper($paperSize), $ortmp); - $pdf->DefOrientation = $orientation; - $pdf->AddPage($orientation); - - // Document info - $pdf->SetTitle($this->phpExcel->getProperties()->getTitle()); - $pdf->SetAuthor($this->phpExcel->getProperties()->getCreator()); - $pdf->SetSubject($this->phpExcel->getProperties()->getSubject()); - $pdf->SetKeywords($this->phpExcel->getProperties()->getKeywords()); - $pdf->SetCreator($this->phpExcel->getProperties()->getCreator()); - - $pdf->WriteHTML( - $this->generateHTMLHeader(false) . - $this->generateSheetData() . - $this->generateHTMLFooter() - ); - - // Write to file - fwrite($fileHandle, $pdf->Output('', 'S')); - - parent::restoreStateAfterSave($fileHandle); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/tcPDF.php b/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/tcPDF.php deleted file mode 100644 index dea33a3..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/PDF/tcPDF.php +++ /dev/null @@ -1,123 +0,0 @@ -<?php - -/** Require tcPDF library */ -$pdfRendererClassFile = PHPExcel_Settings::getPdfRendererPath() . '/tcpdf.php'; -if (file_exists($pdfRendererClassFile)) { - $k_path_url = PHPExcel_Settings::getPdfRendererPath(); - require_once $pdfRendererClassFile; -} else { - throw new PHPExcel_Writer_Exception('Unable to load PDF Rendering library'); -} - -/** - * PHPExcel_Writer_PDF_tcPDF - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel_Writer_PDF - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ -class PHPExcel_Writer_PDF_tcPDF extends PHPExcel_Writer_PDF_Core implements PHPExcel_Writer_IWriter -{ - /** - * Create a new PHPExcel_Writer_PDF - * - * @param PHPExcel $phpExcel PHPExcel object - */ - public function __construct(PHPExcel $phpExcel) - { - parent::__construct($phpExcel); - } - - /** - * Save PHPExcel to file - * - * @param string $pFilename Name of the file to save as - * @throws PHPExcel_Writer_Exception - */ - public function save($pFilename = null) - { - $fileHandle = parent::prepareForSave($pFilename); - - // Default PDF paper size - $paperSize = 'LETTER'; // Letter (8.5 in. by 11 in.) - - // Check for paper size and page orientation - if (is_null($this->getSheetIndex())) { - $orientation = ($this->phpExcel->getSheet(0)->getPageSetup()->getOrientation() - == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; - $printPaperSize = $this->phpExcel->getSheet(0)->getPageSetup()->getPaperSize(); - $printMargins = $this->phpExcel->getSheet(0)->getPageMargins(); - } else { - $orientation = ($this->phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation() - == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P'; - $printPaperSize = $this->phpExcel->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize(); - $printMargins = $this->phpExcel->getSheet($this->getSheetIndex())->getPageMargins(); - } - - // Override Page Orientation - if (!is_null($this->getOrientation())) { - $orientation = ($this->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) - ? 'L' - : 'P'; - } - // Override Paper Size - if (!is_null($this->getPaperSize())) { - $printPaperSize = $this->getPaperSize(); - } - - if (isset(self::$paperSizes[$printPaperSize])) { - $paperSize = self::$paperSizes[$printPaperSize]; - } - - - // Create PDF - $pdf = new TCPDF($orientation, 'pt', $paperSize); - $pdf->setFontSubsetting(false); - // Set margins, converting inches to points (using 72 dpi) - $pdf->SetMargins($printMargins->getLeft() * 72, $printMargins->getTop() * 72, $printMargins->getRight() * 72); - $pdf->SetAutoPageBreak(true, $printMargins->getBottom() * 72); - - $pdf->setPrintHeader(false); - $pdf->setPrintFooter(false); - - $pdf->AddPage(); - - // Set the appropriate font - $pdf->SetFont($this->getFont()); - $pdf->writeHTML( - $this->generateHTMLHeader(false) . - $this->generateSheetData() . - $this->generateHTMLFooter() - ); - - // Document info - $pdf->SetTitle($this->phpExcel->getProperties()->getTitle()); - $pdf->SetAuthor($this->phpExcel->getProperties()->getCreator()); - $pdf->SetSubject($this->phpExcel->getProperties()->getSubject()); - $pdf->SetKeywords($this->phpExcel->getProperties()->getKeywords()); - $pdf->SetCreator($this->phpExcel->getProperties()->getCreator()); - - // Write to file - fwrite($fileHandle, $pdf->output($pFilename, 'S')); - - parent::restoreStateAfterSave($fileHandle); - } -} diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/bg/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/bg/config deleted file mode 100644 index 4cecddb..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/bg/config +++ /dev/null @@ -1,49 +0,0 @@ -## -## PHPExcel -## - -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = лв - - -## -## Excel Error Codes (For future use) - -## -NULL = #ПРАЗНО! -DIV0 = #ДЕЛ/0! -VALUE = #СТОЙНОСТ! -REF = #РЕФ! -NAME = #ИМЕ? -NUM = #ЧИСЛО! -NA = #Н/Д diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config deleted file mode 100644 index 42cdf32..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = Kč - - -## -## Excel Error Codes (For future use) -## -NULL = #NULL! -DIV0 = #DIV/0! -VALUE = #HODNOTA! -REF = #REF! -NAME = #NÁZEV? -NUM = #NUM! -NA = #N/A diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions deleted file mode 100644 index c0a3cbb..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Funkce doplňků a automatizace -## -GETPIVOTDATA = ZÍSKATKONTDATA ## Vrátí data uložená v kontingenční tabulce. Pomocí funkce ZÍSKATKONTDATA můžete načíst souhrnná data z kontingenční tabulky, pokud jsou tato data v kontingenční sestavě zobrazena. - - -## -## Cube functions Funkce pro práci s krychlemi -## -CUBEKPIMEMBER = CUBEKPIMEMBER ## Vrátí název, vlastnost a velikost klíčového ukazatele výkonu (KUV) a zobrazí v buňce název a vlastnost. Klíčový ukazatel výkonu je kvantifikovatelná veličina, například hrubý měsíční zisk nebo čtvrtletní obrat na zaměstnance, která se používá pro sledování výkonnosti organizace. -CUBEMEMBER = CUBEMEMBER ## Vrátí člen nebo n-tici v hierarchii krychle. Slouží k ověření, zda v krychli existuje člen nebo n-tice. -CUBEMEMBERPROPERTY = CUBEMEMBERPROPERTY ## Vrátí hodnotu vlastnosti člena v krychli. Slouží k ověření, zda v krychli existuje člen s daným názvem, a k vrácení konkrétní vlastnosti tohoto člena. -CUBERANKEDMEMBER = CUBERANKEDMEMBER ## Vrátí n-tý nebo pořadový člen sady. Použijte ji pro vrácení jednoho nebo více prvků sady, například obchodníka s nejvyšším obratem nebo deseti nejlepších studentů. -CUBESET = CUBESET ## Definuje vypočtenou sadu členů nebo n-tic odesláním výrazu sady do krychle na serveru, který vytvoří sadu a potom ji vrátí do aplikace Microsoft Office Excel. -CUBESETCOUNT = CUBESETCOUNT ## Vrátí počet položek v množině -CUBEVALUE = CUBEVALUE ## Vrátí úhrnnou hodnotu z krychle. - - -## -## Database functions Funkce databáze -## -DAVERAGE = DPRŮMĚR ## Vrátí průměr vybraných položek databáze. -DCOUNT = DPOČET ## Spočítá buňky databáze obsahující čísla. -DCOUNTA = DPOČET2 ## Spočítá buňky databáze, které nejsou prázdné. -DGET = DZÍSKAT ## Extrahuje z databáze jeden záznam splňující zadaná kritéria. -DMAX = DMAX ## Vrátí maximální hodnotu z vybraných položek databáze. -DMIN = DMIN ## Vrátí minimální hodnotu z vybraných položek databáze. -DPRODUCT = DSOUČIN ## Vynásobí hodnoty určitého pole záznamů v databázi, které splňují daná kritéria. -DSTDEV = DSMODCH.VÝBĚR ## Odhadne směrodatnou odchylku výběru vybraných položek databáze. -DSTDEVP = DSMODCH ## Vypočte směrodatnou odchylku základního souboru vybraných položek databáze. -DSUM = DSUMA ## Sečte čísla ve sloupcovém poli záznamů databáze, která splňují daná kritéria. -DVAR = DVAR.VÝBĚR ## Odhadne rozptyl výběru vybraných položek databáze. -DVARP = DVAR ## Vypočte rozptyl základního souboru vybraných položek databáze. - - -## -## Date and time functions Funkce data a času -## -DATE = DATUM ## Vrátí pořadové číslo určitého data. -DATEVALUE = DATUMHODN ## Převede datum ve formě textu na pořadové číslo. -DAY = DEN ## Převede pořadové číslo na den v měsíci. -DAYS360 = ROK360 ## Vrátí počet dní mezi dvěma daty na základě roku s 360 dny. -EDATE = EDATE ## Vrátí pořadové číslo data, které označuje určený počet měsíců před nebo po počátečním datu. -EOMONTH = EOMONTH ## Vrátí pořadové číslo posledního dne měsíce před nebo po zadaném počtu měsíců. -HOUR = HODINA ## Převede pořadové číslo na hodinu. -MINUTE = MINUTA ## Převede pořadové číslo na minutu. -MONTH = MĚSÍC ## Převede pořadové číslo na měsíc. -NETWORKDAYS = NETWORKDAYS ## Vrátí počet celých pracovních dní mezi dvěma daty. -NOW = NYNÍ ## Vrátí pořadové číslo aktuálního data a času. -SECOND = SEKUNDA ## Převede pořadové číslo na sekundu. -TIME = ČAS ## Vrátí pořadové číslo určitého času. -TIMEVALUE = ČASHODN ## Převede čas ve formě textu na pořadové číslo. -TODAY = DNES ## Vrátí pořadové číslo dnešního data. -WEEKDAY = DENTÝDNE ## Převede pořadové číslo na den v týdnu. -WEEKNUM = WEEKNUM ## Převede pořadové číslo na číslo představující číselnou pozici týdne v roce. -WORKDAY = WORKDAY ## Vrátí pořadové číslo data před nebo po zadaném počtu pracovních dní. -YEAR = ROK ## Převede pořadové číslo na rok. -YEARFRAC = YEARFRAC ## Vrátí část roku vyjádřenou zlomkem a představující počet celých dní mezi počátečním a koncovým datem. - - -## -## Engineering functions Inženýrské funkce (Technické funkce) -## -BESSELI = BESSELI ## Vrátí modifikovanou Besselovu funkci In(x). -BESSELJ = BESSELJ ## Vrátí modifikovanou Besselovu funkci Jn(x). -BESSELK = BESSELK ## Vrátí modifikovanou Besselovu funkci Kn(x). -BESSELY = BESSELY ## Vrátí Besselovu funkci Yn(x). -BIN2DEC = BIN2DEC ## Převede binární číslo na desítkové. -BIN2HEX = BIN2HEX ## Převede binární číslo na šestnáctkové. -BIN2OCT = BIN2OCT ## Převede binární číslo na osmičkové. -COMPLEX = COMPLEX ## Převede reálnou a imaginární část na komplexní číslo. -CONVERT = CONVERT ## Převede číslo do jiného jednotkového měrného systému. -DEC2BIN = DEC2BIN ## Převede desítkového čísla na dvojkové -DEC2HEX = DEC2HEX ## Převede desítkové číslo na šestnáctkové. -DEC2OCT = DEC2OCT ## Převede desítkové číslo na osmičkové. -DELTA = DELTA ## Testuje rovnost dvou hodnot. -ERF = ERF ## Vrátí chybovou funkci. -ERFC = ERFC ## Vrátí doplňkovou chybovou funkci. -GESTEP = GESTEP ## Testuje, zda je číslo větší než mezní hodnota. -HEX2BIN = HEX2BIN ## Převede šestnáctkové číslo na binární. -HEX2DEC = HEX2DEC ## Převede šestnáctkové číslo na desítkové. -HEX2OCT = HEX2OCT ## Převede šestnáctkové číslo na osmičkové. -IMABS = IMABS ## Vrátí absolutní hodnotu (modul) komplexního čísla. -IMAGINARY = IMAGINARY ## Vrátí imaginární část komplexního čísla. -IMARGUMENT = IMARGUMENT ## Vrátí argument théta, úhel vyjádřený v radiánech. -IMCONJUGATE = IMCONJUGATE ## Vrátí komplexně sdružené číslo ke komplexnímu číslu. -IMCOS = IMCOS ## Vrátí kosinus komplexního čísla. -IMDIV = IMDIV ## Vrátí podíl dvou komplexních čísel. -IMEXP = IMEXP ## Vrátí exponenciální tvar komplexního čísla. -IMLN = IMLN ## Vrátí přirozený logaritmus komplexního čísla. -IMLOG10 = IMLOG10 ## Vrátí dekadický logaritmus komplexního čísla. -IMLOG2 = IMLOG2 ## Vrátí logaritmus komplexního čísla při základu 2. -IMPOWER = IMPOWER ## Vrátí komplexní číslo umocněné na celé číslo. -IMPRODUCT = IMPRODUCT ## Vrátí součin komplexních čísel. -IMREAL = IMREAL ## Vrátí reálnou část komplexního čísla. -IMSIN = IMSIN ## Vrátí sinus komplexního čísla. -IMSQRT = IMSQRT ## Vrátí druhou odmocninu komplexního čísla. -IMSUB = IMSUB ## Vrátí rozdíl mezi dvěma komplexními čísly. -IMSUM = IMSUM ## Vrátí součet dvou komplexních čísel. -OCT2BIN = OCT2BIN ## Převede osmičkové číslo na binární. -OCT2DEC = OCT2DEC ## Převede osmičkové číslo na desítkové. -OCT2HEX = OCT2HEX ## Převede osmičkové číslo na šestnáctkové. - - -## -## Financial functions Finanční funkce -## -ACCRINT = ACCRINT ## Vrátí nahromaděný úrok z cenného papíru, ze kterého je úrok placen v pravidelných termínech. -ACCRINTM = ACCRINTM ## Vrátí nahromaděný úrok z cenného papíru, ze kterého je úrok placen k datu splatnosti. -AMORDEGRC = AMORDEGRC ## Vrátí lineární amortizaci v každém účetním období pomocí koeficientu amortizace. -AMORLINC = AMORLINC ## Vrátí lineární amortizaci v každém účetním období. -COUPDAYBS = COUPDAYBS ## Vrátí počet dnů od začátku období placení kupónů do data splatnosti. -COUPDAYS = COUPDAYS ## Vrátí počet dnů v období placení kupónů, které obsahuje den zúčtování. -COUPDAYSNC = COUPDAYSNC ## Vrátí počet dnů od data zúčtování do následujícího data placení kupónu. -COUPNCD = COUPNCD ## Vrátí následující datum placení kupónu po datu zúčtování. -COUPNUM = COUPNUM ## Vrátí počet kupónů splatných mezi datem zúčtování a datem splatnosti. -COUPPCD = COUPPCD ## Vrátí předchozí datum placení kupónu před datem zúčtování. -CUMIPMT = CUMIPMT ## Vrátí kumulativní úrok splacený mezi dvěma obdobími. -CUMPRINC = CUMPRINC ## Vrátí kumulativní jistinu splacenou mezi dvěma obdobími půjčky. -DB = ODPIS.ZRYCH ## Vrátí odpis aktiva za určité období pomocí degresivní metody odpisu s pevným zůstatkem. -DDB = ODPIS.ZRYCH2 ## Vrátí odpis aktiva za určité období pomocí dvojité degresivní metody odpisu nebo jiné metody, kterou zadáte. -DISC = DISC ## Vrátí diskontní sazbu cenného papíru. -DOLLARDE = DOLLARDE ## Převede částku v korunách vyjádřenou zlomkem na částku v korunách vyjádřenou desetinným číslem. -DOLLARFR = DOLLARFR ## Převede částku v korunách vyjádřenou desetinným číslem na částku v korunách vyjádřenou zlomkem. -DURATION = DURATION ## Vrátí roční dobu cenného papíru s pravidelnými úrokovými sazbami. -EFFECT = EFFECT ## Vrátí efektivní roční úrokovou sazbu. -FV = BUDHODNOTA ## Vrátí budoucí hodnotu investice. -FVSCHEDULE = FVSCHEDULE ## Vrátí budoucí hodnotu počáteční jistiny po použití série sazeb složitého úroku. -INTRATE = INTRATE ## Vrátí úrokovou sazbu plně investovaného cenného papíru. -IPMT = PLATBA.ÚROK ## Vrátí výšku úroku investice za dané období. -IRR = MÍRA.VÝNOSNOSTI ## Vrátí vnitřní výnosové procento série peněžních toků. -ISPMT = ISPMT ## Vypočte výši úroku z investice zaplaceného během určitého období. -MDURATION = MDURATION ## Vrátí Macauleyho modifikovanou dobu cenného papíru o nominální hodnotě 100 Kč. -MIRR = MOD.MÍRA.VÝNOSNOSTI ## Vrátí vnitřní sazbu výnosu, přičemž kladné a záporné hodnoty peněžních prostředků jsou financovány podle různých sazeb. -NOMINAL = NOMINAL ## Vrátí nominální roční úrokovou sazbu. -NPER = POČET.OBDOBÍ ## Vrátí počet období pro investici. -NPV = ČISTÁ.SOUČHODNOTA ## Vrátí čistou současnou hodnotu investice vypočítanou na základě série pravidelných peněžních toků a diskontní sazby. -ODDFPRICE = ODDFPRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč s odlišným prvním obdobím. -ODDFYIELD = ODDFYIELD ## Vrátí výnos cenného papíru s odlišným prvním obdobím. -ODDLPRICE = ODDLPRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč s odlišným posledním obdobím. -ODDLYIELD = ODDLYIELD ## Vrátí výnos cenného papíru s odlišným posledním obdobím. -PMT = PLATBA ## Vrátí hodnotu pravidelné splátky anuity. -PPMT = PLATBA.ZÁKLAD ## Vrátí hodnotu splátky jistiny pro zadanou investici za dané období. -PRICE = PRICE ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč, ze kterého je úrok placen v pravidelných termínech. -PRICEDISC = PRICEDISC ## Vrátí cenu diskontního cenného papíru o nominální hodnotě 100 Kč. -PRICEMAT = PRICEMAT ## Vrátí cenu cenného papíru o nominální hodnotě 100 Kč, ze kterého je úrok placen k datu splatnosti. -PV = SOUČHODNOTA ## Vrátí současnou hodnotu investice. -RATE = ÚROKOVÁ.MÍRA ## Vrátí úrokovou sazbu vztaženou na období anuity. -RECEIVED = RECEIVED ## Vrátí částku obdrženou k datu splatnosti plně investovaného cenného papíru. -SLN = ODPIS.LIN ## Vrátí přímé odpisy aktiva pro jedno období. -SYD = ODPIS.NELIN ## Vrátí směrné číslo ročních odpisů aktiva pro zadané období. -TBILLEQ = TBILLEQ ## Vrátí výnos směnky státní pokladny ekvivalentní výnosu obligace. -TBILLPRICE = TBILLPRICE ## Vrátí cenu směnky státní pokladny o nominální hodnotě 100 Kč. -TBILLYIELD = TBILLYIELD ## Vrátí výnos směnky státní pokladny. -VDB = ODPIS.ZA.INT ## Vrátí odpis aktiva pro určité období nebo část období pomocí degresivní metody odpisu. -XIRR = XIRR ## Vrátí vnitřní výnosnost pro harmonogram peněžních toků, který nemusí být nutně periodický. -XNPV = XNPV ## Vrátí čistou současnou hodnotu pro harmonogram peněžních toků, který nemusí být nutně periodický. -YIELD = YIELD ## Vrátí výnos cenného papíru, ze kterého je úrok placen v pravidelných termínech. -YIELDDISC = YIELDDISC ## Vrátí roční výnos diskontního cenného papíru, například směnky státní pokladny. -YIELDMAT = YIELDMAT ## Vrátí roční výnos cenného papíru, ze kterého je úrok placen k datu splatnosti. - - -## -## Information functions Informační funkce -## -CELL = POLÍČKO ## Vrátí informace o formátování, umístění nebo obsahu buňky. -ERROR.TYPE = CHYBA.TYP ## Vrátí číslo odpovídající typu chyby. -INFO = O.PROSTŘEDÍ ## Vrátí informace o aktuálním pracovním prostředí. -ISBLANK = JE.PRÁZDNÉ ## Vrátí hodnotu PRAVDA, pokud se argument hodnota odkazuje na prázdnou buňku. -ISERR = JE.CHYBA ## Vrátí hodnotu PRAVDA, pokud je argument hodnota libovolná chybová hodnota (kromě #N/A). -ISERROR = JE.CHYBHODN ## Vrátí hodnotu PRAVDA, pokud je argument hodnota libovolná chybová hodnota. -ISEVEN = ISEVEN ## Vrátí hodnotu PRAVDA, pokud je číslo sudé. -ISLOGICAL = JE.LOGHODN ## Vrátí hodnotu PRAVDA, pokud je argument hodnota logická hodnota. -ISNA = JE.NEDEF ## Vrátí hodnotu PRAVDA, pokud je argument hodnota chybová hodnota #N/A. -ISNONTEXT = JE.NETEXT ## Vrátí hodnotu PRAVDA, pokud argument hodnota není text. -ISNUMBER = JE.ČÍSLO ## Vrátí hodnotu PRAVDA, pokud je argument hodnota číslo. -ISODD = ISODD ## Vrátí hodnotu PRAVDA, pokud je číslo liché. -ISREF = JE.ODKAZ ## Vrátí hodnotu PRAVDA, pokud je argument hodnota odkaz. -ISTEXT = JE.TEXT ## Vrátí hodnotu PRAVDA, pokud je argument hodnota text. -N = N ## Vrátí hodnotu převedenou na číslo. -NA = NEDEF ## Vrátí chybovou hodnotu #N/A. -TYPE = TYP ## Vrátí číslo označující datový typ hodnoty. - - -## -## Logical functions Logické funkce -## -AND = A ## Vrátí hodnotu PRAVDA, mají-li všechny argumenty hodnotu PRAVDA. -FALSE = NEPRAVDA ## Vrátí logickou hodnotu NEPRAVDA. -IF = KDYŽ ## Určí, který logický test má proběhnout. -IFERROR = IFERROR ## Pokud je vzorec vyhodnocen jako chyba, vrátí zadanou hodnotu. V opačném případě vrátí výsledek vzorce. -NOT = NE ## Provede logickou negaci argumentu funkce. -OR = NEBO ## Vrátí hodnotu PRAVDA, je-li alespoň jeden argument roven hodnotě PRAVDA. -TRUE = PRAVDA ## Vrátí logickou hodnotu PRAVDA. - - -## -## Lookup and reference functions Vyhledávací funkce -## -ADDRESS = ODKAZ ## Vrátí textový odkaz na jednu buňku listu. -AREAS = POČET.BLOKŮ ## Vrátí počet oblastí v odkazu. -CHOOSE = ZVOLIT ## Zvolí hodnotu ze seznamu hodnot. -COLUMN = SLOUPEC ## Vrátí číslo sloupce odkazu. -COLUMNS = SLOUPCE ## Vrátí počet sloupců v odkazu. -HLOOKUP = VVYHLEDAT ## Prohledá horní řádek matice a vrátí hodnotu určené buňky. -HYPERLINK = HYPERTEXTOVÝ.ODKAZ ## Vytvoří zástupce nebo odkaz, který otevře dokument uložený na síťovém serveru, v síti intranet nebo Internet. -INDEX = INDEX ## Pomocí rejstříku zvolí hodnotu z odkazu nebo matice. -INDIRECT = NEPŘÍMÝ.ODKAZ ## Vrátí odkaz určený textovou hodnotou. -LOOKUP = VYHLEDAT ## Vyhledá hodnoty ve vektoru nebo matici. -MATCH = POZVYHLEDAT ## Vyhledá hodnoty v odkazu nebo matici. -OFFSET = POSUN ## Vrátí posun odkazu od zadaného odkazu. -ROW = ŘÁDEK ## Vrátí číslo řádku odkazu. -ROWS = ŘÁDKY ## Vrátí počet řádků v odkazu. -RTD = RTD ## Načte data reálného času z programu, který podporuje automatizaci modelu COM (Automatizace: Způsob práce s objekty určité aplikace z jiné aplikace nebo nástroje pro vývoj. Automatizace (dříve nazývaná automatizace OLE) je počítačovým standardem a je funkcí modelu COM (Component Object Model).). -TRANSPOSE = TRANSPOZICE ## Vrátí transponovanou matici. -VLOOKUP = SVYHLEDAT ## Prohledá první sloupec matice, přesune kurzor v řádku a vrátí hodnotu buňky. - - -## -## Math and trigonometry functions Matematické a trigonometrické funkce -## -ABS = ABS ## Vrátí absolutní hodnotu čísla. -ACOS = ARCCOS ## Vrátí arkuskosinus čísla. -ACOSH = ARCCOSH ## Vrátí hyperbolický arkuskosinus čísla. -ASIN = ARCSIN ## Vrátí arkussinus čísla. -ASINH = ARCSINH ## Vrátí hyperbolický arkussinus čísla. -ATAN = ARCTG ## Vrátí arkustangens čísla. -ATAN2 = ARCTG2 ## Vrátí arkustangens x-ové a y-ové souřadnice. -ATANH = ARCTGH ## Vrátí hyperbolický arkustangens čísla. -CEILING = ZAOKR.NAHORU ## Zaokrouhlí číslo na nejbližší celé číslo nebo na nejbližší násobek zadané hodnoty. -COMBIN = KOMBINACE ## Vrátí počet kombinací pro daný počet položek. -COS = COS ## Vrátí kosinus čísla. -COSH = COSH ## Vrátí hyperbolický kosinus čísla. -DEGREES = DEGREES ## Převede radiány na stupně. -EVEN = ZAOKROUHLIT.NA.SUDÉ ## Zaokrouhlí číslo nahoru na nejbližší celé sudé číslo. -EXP = EXP ## Vrátí základ přirozeného logaritmu e umocněný na zadané číslo. -FACT = FAKTORIÁL ## Vrátí faktoriál čísla. -FACTDOUBLE = FACTDOUBLE ## Vrátí dvojitý faktoriál čísla. -FLOOR = ZAOKR.DOLŮ ## Zaokrouhlí číslo dolů, směrem k nule. -GCD = GCD ## Vrátí největší společný dělitel. -INT = CELÁ.ČÁST ## Zaokrouhlí číslo dolů na nejbližší celé číslo. -LCM = LCM ## Vrátí nejmenší společný násobek. -LN = LN ## Vrátí přirozený logaritmus čísla. -LOG = LOGZ ## Vrátí logaritmus čísla při zadaném základu. -LOG10 = LOG ## Vrátí dekadický logaritmus čísla. -MDETERM = DETERMINANT ## Vrátí determinant matice. -MINVERSE = INVERZE ## Vrátí inverzní matici. -MMULT = SOUČIN.MATIC ## Vrátí součin dvou matic. -MOD = MOD ## Vrátí zbytek po dělení. -MROUND = MROUND ## Vrátí číslo zaokrouhlené na požadovaný násobek. -MULTINOMIAL = MULTINOMIAL ## Vrátí mnohočlen z množiny čísel. -ODD = ZAOKROUHLIT.NA.LICHÉ ## Zaokrouhlí číslo nahoru na nejbližší celé liché číslo. -PI = PI ## Vrátí hodnotu čísla pí. -POWER = POWER ## Umocní číslo na zadanou mocninu. -PRODUCT = SOUČIN ## Vynásobí argumenty funkce. -QUOTIENT = QUOTIENT ## Vrátí celou část dělení. -RADIANS = RADIANS ## Převede stupně na radiány. -RAND = NÁHČÍSLO ## Vrátí náhodné číslo mezi 0 a 1. -RANDBETWEEN = RANDBETWEEN ## Vrátí náhodné číslo mezi zadanými čísly. -ROMAN = ROMAN ## Převede arabskou číslici na římskou ve formátu textu. -ROUND = ZAOKROUHLIT ## Zaokrouhlí číslo na zadaný počet číslic. -ROUNDDOWN = ROUNDDOWN ## Zaokrouhlí číslo dolů, směrem k nule. -ROUNDUP = ROUNDUP ## Zaokrouhlí číslo nahoru, směrem od nuly. -SERIESSUM = SERIESSUM ## Vrátí součet mocninné řady určené podle vzorce. -SIGN = SIGN ## Vrátí znaménko čísla. -SIN = SIN ## Vrátí sinus daného úhlu. -SINH = SINH ## Vrátí hyperbolický sinus čísla. -SQRT = ODMOCNINA ## Vrátí kladnou druhou odmocninu. -SQRTPI = SQRTPI ## Vrátí druhou odmocninu výrazu (číslo * pí). -SUBTOTAL = SUBTOTAL ## Vrátí souhrn v seznamu nebo databázi. -SUM = SUMA ## Sečte argumenty funkce. -SUMIF = SUMIF ## Sečte buňky vybrané podle zadaných kritérií. -SUMIFS = SUMIFS ## Sečte buňky určené více zadanými podmínkami. -SUMPRODUCT = SOUČIN.SKALÁRNÍ ## Vrátí součet součinů odpovídajících prvků matic. -SUMSQ = SUMA.ČTVERCŮ ## Vrátí součet čtverců argumentů. -SUMX2MY2 = SUMX2MY2 ## Vrátí součet rozdílu čtverců odpovídajících hodnot ve dvou maticích. -SUMX2PY2 = SUMX2PY2 ## Vrátí součet součtu čtverců odpovídajících hodnot ve dvou maticích. -SUMXMY2 = SUMXMY2 ## Vrátí součet čtverců rozdílů odpovídajících hodnot ve dvou maticích. -TAN = TGTG ## Vrátí tangens čísla. -TANH = TGH ## Vrátí hyperbolický tangens čísla. -TRUNC = USEKNOUT ## Zkrátí číslo na celé číslo. - - -## -## Statistical functions Statistické funkce -## -AVEDEV = PRŮMODCHYLKA ## Vrátí průměrnou hodnotu absolutních odchylek datových bodů od jejich střední hodnoty. -AVERAGE = PRŮMĚR ## Vrátí průměrnou hodnotu argumentů. -AVERAGEA = AVERAGEA ## Vrátí průměrnou hodnotu argumentů včetně čísel, textu a logických hodnot. -AVERAGEIF = AVERAGEIF ## Vrátí průměrnou hodnotu (aritmetický průměr) všech buněk v oblasti, které vyhovují příslušné podmínce. -AVERAGEIFS = AVERAGEIFS ## Vrátí průměrnou hodnotu (aritmetický průměr) všech buněk vyhovujících několika podmínkám. -BETADIST = BETADIST ## Vrátí hodnotu součtového rozdělení beta. -BETAINV = BETAINV ## Vrátí inverzní hodnotu součtového rozdělení pro zadané rozdělení beta. -BINOMDIST = BINOMDIST ## Vrátí hodnotu binomického rozdělení pravděpodobnosti jednotlivých veličin. -CHIDIST = CHIDIST ## Vrátí jednostrannou pravděpodobnost rozdělení chí-kvadrát. -CHIINV = CHIINV ## Vrátí hodnotu funkce inverzní k distribuční funkci jednostranné pravděpodobnosti rozdělení chí-kvadrát. -CHITEST = CHITEST ## Vrátí test nezávislosti. -CONFIDENCE = CONFIDENCE ## Vrátí interval spolehlivosti pro střední hodnotu základního souboru. -CORREL = CORREL ## Vrátí korelační koeficient mezi dvěma množinami dat. -COUNT = POČET ## Vrátí počet čísel v seznamu argumentů. -COUNTA = POČET2 ## Vrátí počet hodnot v seznamu argumentů. -COUNTBLANK = COUNTBLANK ## Spočítá počet prázdných buněk v oblasti. -COUNTIF = COUNTIF ## Spočítá buňky v oblasti, které odpovídají zadaným kritériím. -COUNTIFS = COUNTIFS ## Spočítá buňky v oblasti, které odpovídají více kritériím. -COVAR = COVAR ## Vrátí hodnotu kovariance, průměrnou hodnotu součinů párových odchylek -CRITBINOM = CRITBINOM ## Vrátí nejmenší hodnotu, pro kterou má součtové binomické rozdělení hodnotu větší nebo rovnu hodnotě kritéria. -DEVSQ = DEVSQ ## Vrátí součet čtverců odchylek. -EXPONDIST = EXPONDIST ## Vrátí hodnotu exponenciálního rozdělení. -FDIST = FDIST ## Vrátí hodnotu rozdělení pravděpodobnosti F. -FINV = FINV ## Vrátí hodnotu inverzní funkce k distribuční funkci rozdělení F. -FISHER = FISHER ## Vrátí hodnotu Fisherovy transformace. -FISHERINV = FISHERINV ## Vrátí hodnotu inverzní funkce k Fisherově transformaci. -FORECAST = FORECAST ## Vrátí hodnotu lineárního trendu. -FREQUENCY = ČETNOSTI ## Vrátí četnost rozdělení jako svislou matici. -FTEST = FTEST ## Vrátí výsledek F-testu. -GAMMADIST = GAMMADIST ## Vrátí hodnotu rozdělení gama. -GAMMAINV = GAMMAINV ## Vrátí hodnotu inverzní funkce k distribuční funkci součtového rozdělení gama. -GAMMALN = GAMMALN ## Vrátí přirozený logaritmus funkce gama, Γ(x). -GEOMEAN = GEOMEAN ## Vrátí geometrický průměr. -GROWTH = LOGLINTREND ## Vrátí hodnoty exponenciálního trendu. -HARMEAN = HARMEAN ## Vrátí harmonický průměr. -HYPGEOMDIST = HYPGEOMDIST ## Vrátí hodnotu hypergeometrického rozdělení. -INTERCEPT = INTERCEPT ## Vrátí úsek lineární regresní čáry. -KURT = KURT ## Vrátí hodnotu excesu množiny dat. -LARGE = LARGE ## Vrátí k-tou největší hodnotu množiny dat. -LINEST = LINREGRESE ## Vrátí parametry lineárního trendu. -LOGEST = LOGLINREGRESE ## Vrátí parametry exponenciálního trendu. -LOGINV = LOGINV ## Vrátí inverzní funkci k distribuční funkci logaritmicko-normálního rozdělení. -LOGNORMDIST = LOGNORMDIST ## Vrátí hodnotu součtového logaritmicko-normálního rozdělení. -MAX = MAX ## Vrátí maximální hodnotu seznamu argumentů. -MAXA = MAXA ## Vrátí maximální hodnotu seznamu argumentů včetně čísel, textu a logických hodnot. -MEDIAN = MEDIAN ## Vrátí střední hodnotu zadaných čísel. -MIN = MIN ## Vrátí minimální hodnotu seznamu argumentů. -MINA = MINA ## Vrátí nejmenší hodnotu v seznamu argumentů včetně čísel, textu a logických hodnot. -MODE = MODE ## Vrátí hodnotu, která se v množině dat vyskytuje nejčastěji. -NEGBINOMDIST = NEGBINOMDIST ## Vrátí hodnotu negativního binomického rozdělení. -NORMDIST = NORMDIST ## Vrátí hodnotu normálního součtového rozdělení. -NORMINV = NORMINV ## Vrátí inverzní funkci k funkci normálního součtového rozdělení. -NORMSDIST = NORMSDIST ## Vrátí hodnotu standardního normálního součtového rozdělení. -NORMSINV = NORMSINV ## Vrátí inverzní funkci k funkci standardního normálního součtového rozdělení. -PEARSON = PEARSON ## Vrátí Pearsonův výsledný momentový korelační koeficient. -PERCENTILE = PERCENTIL ## Vrátí hodnotu k-tého percentilu hodnot v oblasti. -PERCENTRANK = PERCENTRANK ## Vrátí pořadí hodnoty v množině dat vyjádřené procentuální částí množiny dat. -PERMUT = PERMUTACE ## Vrátí počet permutací pro zadaný počet objektů. -POISSON = POISSON ## Vrátí hodnotu distribuční funkce Poissonova rozdělení. -PROB = PROB ## Vrátí pravděpodobnost výskytu hodnot v oblasti mezi dvěma mezními hodnotami. -QUARTILE = QUARTIL ## Vrátí hodnotu kvartilu množiny dat. -RANK = RANK ## Vrátí pořadí čísla v seznamu čísel. -RSQ = RKQ ## Vrátí druhou mocninu Pearsonova výsledného momentového korelačního koeficientu. -SKEW = SKEW ## Vrátí zešikmení rozdělení. -SLOPE = SLOPE ## Vrátí směrnici lineární regresní čáry. -SMALL = SMALL ## Vrátí k-tou nejmenší hodnotu množiny dat. -STANDARDIZE = STANDARDIZE ## Vrátí normalizovanou hodnotu. -STDEV = SMODCH.VÝBĚR ## Vypočte směrodatnou odchylku výběru. -STDEVA = STDEVA ## Vypočte směrodatnou odchylku výběru včetně čísel, textu a logických hodnot. -STDEVP = SMODCH ## Vypočte směrodatnou odchylku základního souboru. -STDEVPA = STDEVPA ## Vypočte směrodatnou odchylku základního souboru včetně čísel, textu a logických hodnot. -STEYX = STEYX ## Vrátí standardní chybu předpovězené hodnoty y pro každou hodnotu x v regresi. -TDIST = TDIST ## Vrátí hodnotu Studentova t-rozdělení. -TINV = TINV ## Vrátí inverzní funkci k distribuční funkci Studentova t-rozdělení. -TREND = LINTREND ## Vrátí hodnoty lineárního trendu. -TRIMMEAN = TRIMMEAN ## Vrátí střední hodnotu vnitřní části množiny dat. -TTEST = TTEST ## Vrátí pravděpodobnost spojenou se Studentovým t-testem. -VAR = VAR.VÝBĚR ## Vypočte rozptyl výběru. -VARA = VARA ## Vypočte rozptyl výběru včetně čísel, textu a logických hodnot. -VARP = VAR ## Vypočte rozptyl základního souboru. -VARPA = VARPA ## Vypočte rozptyl základního souboru včetně čísel, textu a logických hodnot. -WEIBULL = WEIBULL ## Vrátí hodnotu Weibullova rozdělení. -ZTEST = ZTEST ## Vrátí jednostrannou P-hodnotu z-testu. - - -## -## Text functions Textové funkce -## -ASC = ASC ## Změní znaky s plnou šířkou (dvoubajtové)v řetězci znaků na znaky s poloviční šířkou (jednobajtové). -BAHTTEXT = BAHTTEXT ## Převede číslo na text ve formátu, měny ß (baht). -CHAR = ZNAK ## Vrátí znak určený číslem kódu. -CLEAN = VYČISTIT ## Odebere z textu všechny netisknutelné znaky. -CODE = KÓD ## Vrátí číselný kód prvního znaku zadaného textového řetězce. -CONCATENATE = CONCATENATE ## Spojí několik textových položek do jedné. -DOLLAR = KČ ## Převede číslo na text ve formátu měny Kč (česká koruna). -EXACT = STEJNÉ ## Zkontroluje, zda jsou dvě textové hodnoty shodné. -FIND = NAJÍT ## Nalezne textovou hodnotu uvnitř jiné (rozlišuje malá a velká písmena). -FINDB = FINDB ## Nalezne textovou hodnotu uvnitř jiné (rozlišuje malá a velká písmena). -FIXED = ZAOKROUHLIT.NA.TEXT ## Zformátuje číslo jako text s pevným počtem desetinných míst. -JIS = JIS ## Změní znaky s poloviční šířkou (jednobajtové) v řetězci znaků na znaky s plnou šířkou (dvoubajtové). -LEFT = ZLEVA ## Vrátí první znaky textové hodnoty umístěné nejvíce vlevo. -LEFTB = LEFTB ## Vrátí první znaky textové hodnoty umístěné nejvíce vlevo. -LEN = DÉLKA ## Vrátí počet znaků textového řetězce. -LENB = LENB ## Vrátí počet znaků textového řetězce. -LOWER = MALÁ ## Převede text na malá písmena. -MID = ČÁST ## Vrátí určitý počet znaků textového řetězce počínaje zadaným místem. -MIDB = MIDB ## Vrátí určitý počet znaků textového řetězce počínaje zadaným místem. -PHONETIC = ZVUKOVÉ ## Extrahuje fonetické znaky (furigana) z textového řetězce. -PROPER = VELKÁ2 ## Převede první písmeno každého slova textové hodnoty na velké. -REPLACE = NAHRADIT ## Nahradí znaky uvnitř textu. -REPLACEB = NAHRADITB ## Nahradí znaky uvnitř textu. -REPT = OPAKOVAT ## Zopakuje text podle zadaného počtu opakování. -RIGHT = ZPRAVA ## Vrátí první znaky textové hodnoty umístěné nejvíce vpravo. -RIGHTB = RIGHTB ## Vrátí první znaky textové hodnoty umístěné nejvíce vpravo. -SEARCH = HLEDAT ## Nalezne textovou hodnotu uvnitř jiné (malá a velká písmena nejsou rozlišována). -SEARCHB = SEARCHB ## Nalezne textovou hodnotu uvnitř jiné (malá a velká písmena nejsou rozlišována). -SUBSTITUTE = DOSADIT ## V textovém řetězci nahradí starý text novým. -T = T ## Převede argumenty na text. -TEXT = HODNOTA.NA.TEXT ## Zformátuje číslo a převede ho na text. -TRIM = PROČISTIT ## Odstraní z textu mezery. -UPPER = VELKÁ ## Převede text na velká písmena. -VALUE = HODNOTA ## Převede textový argument na číslo. diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config deleted file mode 100644 index ae59003..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config +++ /dev/null @@ -1,48 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = kr - - - -## -## Excel Error Codes (For future use) -## -NULL = #NUL! -DIV0 = #DIVISION/0! -VALUE = #VÆRDI! -REF = #REFERENCE! -NAME = #NAVN? -NUM = #NUM! -NA = #I/T diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions deleted file mode 100644 index 26e0310..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Tilføjelsesprogram- og automatiseringsfunktioner -## -GETPIVOTDATA = HENTPIVOTDATA ## Returnerer data, der er lagret i en pivottabelrapport - - -## -## Cube functions Kubefunktioner -## -CUBEKPIMEMBER = KUBE.KPI.MEDLEM ## Returnerer navn, egenskab og mål for en KPI-indikator og viser navnet og egenskaben i cellen. En KPI-indikator er en målbar størrelse, f.eks. bruttooverskud pr. måned eller personaleudskiftning pr. kvartal, der bruges til at overvåge en organisations præstationer. -CUBEMEMBER = KUBE.MEDLEM ## Returnerer et medlem eller en tupel fra kubehierarkiet. Bruges til at validere, om et medlem eller en tupel findes i kuben. -CUBEMEMBERPROPERTY = KUBEMEDLEM.EGENSKAB ## Returnerer værdien af en egenskab for et medlem i kuben. Bruges til at validere, om et medlemsnavn findes i kuben, og returnere den angivne egenskab for medlemmet. -CUBERANKEDMEMBER = KUBEMEDLEM.RANG ## Returnerer det n'te eller rangordnede medlem i et sæt. Bruges til at returnere et eller flere elementer i et sæt, f.eks. topsælgere eller de 10 bedste elever. -CUBESET = KUBESÆT ## Definerer et beregnet sæt medlemmer eller tupler ved at sende et sætudtryk til kuben på serveren, som opretter sættet og returnerer det til Microsoft Office Excel. -CUBESETCOUNT = KUBESÆT.TÆL ## Returnerer antallet af elementer i et sæt. -CUBEVALUE = KUBEVÆRDI ## Returnerer en sammenlagt (aggregeret) værdi fra en kube. - - -## -## Database functions Databasefunktioner -## -DAVERAGE = DMIDDEL ## Returnerer gennemsnittet af markerede databaseposter -DCOUNT = DTÆL ## Tæller de celler, der indeholder tal, i en database -DCOUNTA = DTÆLV ## Tæller udfyldte celler i en database -DGET = DHENT ## Uddrager en enkelt post, der opfylder de angivne kriterier, fra en database -DMAX = DMAKS ## Returnerer den største værdi blandt markerede databaseposter -DMIN = DMIN ## Returnerer den mindste værdi blandt markerede databaseposter -DPRODUCT = DPRODUKT ## Ganger værdierne i et bestemt felt med poster, der opfylder kriterierne i en database -DSTDEV = DSTDAFV ## Beregner et skøn over standardafvigelsen baseret på en stikprøve af markerede databaseposter -DSTDEVP = DSTDAFVP ## Beregner standardafvigelsen baseret på hele populationen af markerede databaseposter -DSUM = DSUM ## Sammenlægger de tal i feltkolonnen i databasen, der opfylder kriterierne -DVAR = DVARIANS ## Beregner varians baseret på en stikprøve af markerede databaseposter -DVARP = DVARIANSP ## Beregner varians baseret på hele populationen af markerede databaseposter - - -## -## Date and time functions Dato- og klokkeslætsfunktioner -## -DATE = DATO ## Returnerer serienummeret for en bestemt dato -DATEVALUE = DATOVÆRDI ## Konverterer en dato i form af tekst til et serienummer -DAY = DAG ## Konverterer et serienummer til en dag i måneden -DAYS360 = DAGE360 ## Beregner antallet af dage mellem to datoer på grundlag af et år med 360 dage -EDATE = EDATO ## Returnerer serienummeret for den dato, der ligger det angivne antal måneder før eller efter startdatoen -EOMONTH = SLUT.PÅ.MÅNED ## Returnerer serienummeret på den sidste dag i måneden før eller efter et angivet antal måneder -HOUR = TIME ## Konverterer et serienummer til en time -MINUTE = MINUT ## Konverterer et serienummer til et minut -MONTH = MÅNED ## Konverterer et serienummer til en måned -NETWORKDAYS = ANTAL.ARBEJDSDAGE ## Returnerer antallet af hele arbejdsdage mellem to datoer -NOW = NU ## Returnerer serienummeret for den aktuelle dato eller det aktuelle klokkeslæt -SECOND = SEKUND ## Konverterer et serienummer til et sekund -TIME = KLOKKESLÆT ## Returnerer serienummeret for et bestemt klokkeslæt -TIMEVALUE = TIDSVÆRDI ## Konverterer et klokkeslæt i form af tekst til et serienummer -TODAY = IDAG ## Returnerer serienummeret for dags dato -WEEKDAY = UGEDAG ## Konverterer et serienummer til en ugedag -WEEKNUM = UGE.NR ## Konverterer et serienummer til et tal, der angiver ugenummeret i året -WORKDAY = ARBEJDSDAG ## Returnerer serienummeret for dagen før eller efter det angivne antal arbejdsdage -YEAR = ÅR ## Konverterer et serienummer til et år -YEARFRAC = ÅR.BRØK ## Returnerer årsbrøken, der repræsenterer antallet af hele dage mellem startdato og slutdato - - -## -## Engineering functions Tekniske funktioner -## -BESSELI = BESSELI ## Returnerer den modificerede Bessel-funktion In(x) -BESSELJ = BESSELJ ## Returnerer Bessel-funktionen Jn(x) -BESSELK = BESSELK ## Returnerer den modificerede Bessel-funktion Kn(x) -BESSELY = BESSELY ## Returnerer Bessel-funktionen Yn(x) -BIN2DEC = BIN.TIL.DEC ## Konverterer et binært tal til et decimaltal -BIN2HEX = BIN.TIL.HEX ## Konverterer et binært tal til et heksadecimalt tal -BIN2OCT = BIN.TIL.OKT ## Konverterer et binært tal til et oktaltal. -COMPLEX = KOMPLEKS ## Konverterer reelle og imaginære koefficienter til et komplekst tal -CONVERT = KONVERTER ## Konverterer et tal fra én måleenhed til en anden -DEC2BIN = DEC.TIL.BIN ## Konverterer et decimaltal til et binært tal -DEC2HEX = DEC.TIL.HEX ## Konverterer et decimaltal til et heksadecimalt tal -DEC2OCT = DEC.TIL.OKT ## Konverterer et decimaltal til et oktaltal -DELTA = DELTA ## Tester, om to værdier er ens -ERF = FEJLFUNK ## Returner fejlfunktionen -ERFC = FEJLFUNK.KOMP ## Returnerer den komplementære fejlfunktion -GESTEP = GETRIN ## Tester, om et tal er større end en grænseværdi -HEX2BIN = HEX.TIL.BIN ## Konverterer et heksadecimalt tal til et binært tal -HEX2DEC = HEX.TIL.DEC ## Konverterer et decimaltal til et heksadecimalt tal -HEX2OCT = HEX.TIL.OKT ## Konverterer et heksadecimalt tal til et oktaltal -IMABS = IMAGABS ## Returnerer den absolutte værdi (modulus) for et komplekst tal -IMAGINARY = IMAGINÆR ## Returnerer den imaginære koefficient for et komplekst tal -IMARGUMENT = IMAGARGUMENT ## Returnerer argumentet theta, en vinkel udtrykt i radianer -IMCONJUGATE = IMAGKONJUGERE ## Returnerer den komplekse konjugation af et komplekst tal -IMCOS = IMAGCOS ## Returnerer et komplekst tals cosinus -IMDIV = IMAGDIV ## Returnerer kvotienten for to komplekse tal -IMEXP = IMAGEKSP ## Returnerer et komplekst tals eksponentialfunktion -IMLN = IMAGLN ## Returnerer et komplekst tals naturlige logaritme -IMLOG10 = IMAGLOG10 ## Returnerer et komplekst tals sædvanlige logaritme (titalslogaritme) -IMLOG2 = IMAGLOG2 ## Returnerer et komplekst tals sædvanlige logaritme (totalslogaritme) -IMPOWER = IMAGPOTENS ## Returnerer et komplekst tal opløftet i en heltalspotens -IMPRODUCT = IMAGPRODUKT ## Returnerer produktet af komplekse tal -IMREAL = IMAGREELT ## Returnerer den reelle koefficient for et komplekst tal -IMSIN = IMAGSIN ## Returnerer et komplekst tals sinus -IMSQRT = IMAGKVROD ## Returnerer et komplekst tals kvadratrod -IMSUB = IMAGSUB ## Returnerer forskellen mellem to komplekse tal -IMSUM = IMAGSUM ## Returnerer summen af komplekse tal -OCT2BIN = OKT.TIL.BIN ## Konverterer et oktaltal til et binært tal -OCT2DEC = OKT.TIL.DEC ## Konverterer et oktaltal til et decimaltal -OCT2HEX = OKT.TIL.HEX ## Konverterer et oktaltal til et heksadecimalt tal - - -## -## Financial functions Finansielle funktioner -## -ACCRINT = PÅLØBRENTE ## Returnerer den påløbne rente for et værdipapir med periodiske renteudbetalinger -ACCRINTM = PÅLØBRENTE.UDLØB ## Returnerer den påløbne rente for et værdipapir, hvor renteudbetalingen finder sted ved papirets udløb -AMORDEGRC = AMORDEGRC ## Returnerer afskrivningsbeløbet for hver regnskabsperiode ved hjælp af en afskrivningskoefficient -AMORLINC = AMORLINC ## Returnerer afskrivningsbeløbet for hver regnskabsperiode -COUPDAYBS = KUPONDAGE.SA ## Returnerer antallet af dage fra starten af kuponperioden til afregningsdatoen -COUPDAYS = KUPONDAGE.A ## Returnerer antallet af dage fra begyndelsen af kuponperioden til afregningsdatoen -COUPDAYSNC = KUPONDAGE.ANK ## Returnerer antallet af dage i den kuponperiode, der indeholder afregningsdatoen -COUPNCD = KUPONDAG.NÆSTE ## Returnerer den næste kupondato efter afregningsdatoen -COUPNUM = KUPONBETALINGER ## Returnerer antallet af kuponudbetalinger mellem afregnings- og udløbsdatoen -COUPPCD = KUPONDAG.FORRIGE ## Returnerer den forrige kupondato før afregningsdatoen -CUMIPMT = AKKUM.RENTE ## Returnerer den akkumulerede rente, der betales på et lån mellem to perioder -CUMPRINC = AKKUM.HOVEDSTOL ## Returnerer den akkumulerede nedbringelse af hovedstol mellem to perioder -DB = DB ## Returnerer afskrivningen på et aktiv i en angivet periode ved anvendelse af saldometoden -DDB = DSA ## Returnerer afskrivningsbeløbet for et aktiv over en bestemt periode ved anvendelse af dobbeltsaldometoden eller en anden afskrivningsmetode, som du angiver -DISC = DISKONTO ## Returnerer et værdipapirs diskonto -DOLLARDE = KR.DECIMAL ## Konverterer en kronepris udtrykt som brøk til en kronepris udtrykt som decimaltal -DOLLARFR = KR.BRØK ## Konverterer en kronepris udtrykt som decimaltal til en kronepris udtrykt som brøk -DURATION = VARIGHED ## Returnerer den årlige løbetid for et værdipapir med periodiske renteudbetalinger -EFFECT = EFFEKTIV.RENTE ## Returnerer den årlige effektive rente -FV = FV ## Returnerer fremtidsværdien af en investering -FVSCHEDULE = FVTABEL ## Returnerer den fremtidige værdi af en hovedstol, når der er tilskrevet rente og rentes rente efter forskellige rentesatser -INTRATE = RENTEFOD ## Returnerer renten på et fuldt ud investeret værdipapir -IPMT = R.YDELSE ## Returnerer renten fra en investering for en given periode -IRR = IA ## Returnerer den interne rente for en række pengestrømme -ISPMT = ISPMT ## Beregner den betalte rente i løbet af en bestemt investeringsperiode -MDURATION = MVARIGHED ## Returnerer Macauleys modificerede løbetid for et værdipapir med en formodet pari på kr. 100 -MIRR = MIA ## Returnerer den interne forrentning, hvor positive og negative pengestrømme finansieres til forskellig rente -NOMINAL = NOMINEL ## Returnerer den årlige nominelle rente -NPER = NPER ## Returnerer antallet af perioder for en investering -NPV = NUTIDSVÆRDI ## Returnerer nettonutidsværdien for en investering baseret på en række periodiske pengestrømme og en diskonteringssats -ODDFPRICE = ULIGE.KURS.PÅLYDENDE ## Returnerer kursen pr. kr. 100 nominel værdi for et værdipapir med en ulige (kort eller lang) første periode -ODDFYIELD = ULIGE.FØRSTE.AFKAST ## Returnerer afkastet for et værdipapir med ulige første periode -ODDLPRICE = ULIGE.SIDSTE.KURS ## Returnerer kursen pr. kr. 100 nominel værdi for et værdipapir med ulige sidste periode -ODDLYIELD = ULIGE.SIDSTE.AFKAST ## Returnerer afkastet for et værdipapir med ulige sidste periode -PMT = YDELSE ## Returnerer renten fra en investering for en given periode -PPMT = H.YDELSE ## Returnerer ydelsen på hovedstolen for en investering i en given periode -PRICE = KURS ## Returnerer kursen pr. kr 100 nominel værdi for et værdipapir med periodiske renteudbetalinger -PRICEDISC = KURS.DISKONTO ## Returnerer kursen pr. kr 100 nominel værdi for et diskonteret værdipapir -PRICEMAT = KURS.UDLØB ## Returnerer kursen pr. kr 100 nominel værdi for et værdipapir, hvor renten udbetales ved papirets udløb -PV = NV ## Returnerer den nuværende værdi af en investering -RATE = RENTE ## Returnerer renten i hver periode for en annuitet -RECEIVED = MODTAGET.VED.UDLØB ## Returnerer det beløb, der modtages ved udløbet af et fuldt ud investeret værdipapir -SLN = LA ## Returnerer den lineære afskrivning for et aktiv i en enkelt periode -SYD = ÅRSAFSKRIVNING ## Returnerer den årlige afskrivning på et aktiv i en bestemt periode -TBILLEQ = STATSOBLIGATION ## Returnerer det obligationsækvivalente afkast for en statsobligation -TBILLPRICE = STATSOBLIGATION.KURS ## Returnerer kursen pr. kr 100 nominel værdi for en statsobligation -TBILLYIELD = STATSOBLIGATION.AFKAST ## Returnerer en afkastet på en statsobligation -VDB = VSA ## Returnerer afskrivningen på et aktiv i en angivet periode, herunder delperioder, ved brug af dobbeltsaldometoden -XIRR = INTERN.RENTE ## Returnerer den interne rente for en plan over pengestrømme, der ikke behøver at være periodiske -XNPV = NETTO.NUTIDSVÆRDI ## Returnerer nutidsværdien for en plan over pengestrømme, der ikke behøver at være periodiske -YIELD = AFKAST ## Returnerer afkastet for et værdipapir med periodiske renteudbetalinger -YIELDDISC = AFKAST.DISKONTO ## Returnerer det årlige afkast for et diskonteret værdipapir, f.eks. en statsobligation -YIELDMAT = AFKAST.UDLØBSDATO ## Returnerer det årlige afkast for et værdipapir, hvor renten udbetales ved papirets udløb - - -## -## Information functions Informationsfunktioner -## -CELL = CELLE ## Returnerer oplysninger om formatering, placering eller indhold af en celle -ERROR.TYPE = FEJLTYPE ## Returnerer et tal, der svarer til en fejltype -INFO = INFO ## Returnerer oplysninger om det aktuelle operativmiljø -ISBLANK = ER.TOM ## Returnerer SAND, hvis værdien er tom -ISERR = ER.FJL ## Returnerer SAND, hvis værdien er en fejlværdi undtagen #I/T -ISERROR = ER.FEJL ## Returnerer SAND, hvis værdien er en fejlværdi -ISEVEN = ER.LIGE ## Returnerer SAND, hvis tallet er lige -ISLOGICAL = ER.LOGISK ## Returnerer SAND, hvis værdien er en logisk værdi -ISNA = ER.IKKE.TILGÆNGELIG ## Returnerer SAND, hvis værdien er fejlværdien #I/T -ISNONTEXT = ER.IKKE.TEKST ## Returnerer SAND, hvis værdien ikke er tekst -ISNUMBER = ER.TAL ## Returnerer SAND, hvis værdien er et tal -ISODD = ER.ULIGE ## Returnerer SAND, hvis tallet er ulige -ISREF = ER.REFERENCE ## Returnerer SAND, hvis værdien er en reference -ISTEXT = ER.TEKST ## Returnerer SAND, hvis værdien er tekst -N = TAL ## Returnerer en værdi konverteret til et tal -NA = IKKE.TILGÆNGELIG ## Returnerer fejlværdien #I/T -TYPE = VÆRDITYPE ## Returnerer et tal, der angiver datatypen for en værdi - - -## -## Logical functions Logiske funktioner -## -AND = OG ## Returnerer SAND, hvis alle argumenterne er sande -FALSE = FALSK ## Returnerer den logiske værdi FALSK -IF = HVIS ## Angiver en logisk test, der skal udføres -IFERROR = HVIS.FEJL ## Returnerer en værdi, du angiver, hvis en formel evauleres som en fejl. Returnerer i modsat fald resultatet af formlen -NOT = IKKE ## Vender argumentets logik om -OR = ELLER ## Returneret værdien SAND, hvis mindst ét argument er sandt -TRUE = SAND ## Returnerer den logiske værdi SAND - - -## -## Lookup and reference functions Opslags- og referencefunktioner -## -ADDRESS = ADRESSE ## Returnerer en reference som tekst til en enkelt celle i et regneark -AREAS = OMRÅDER ## Returnerer antallet af områder i en reference -CHOOSE = VÆLG ## Vælger en værdi på en liste med værdier -COLUMN = KOLONNE ## Returnerer kolonnenummeret i en reference -COLUMNS = KOLONNER ## Returnerer antallet af kolonner i en reference -HLOOKUP = VOPSLAG ## Søger i den øverste række af en matrix og returnerer værdien af den angivne celle -HYPERLINK = HYPERLINK ## Opretter en genvej kaldet et hyperlink, der åbner et dokument, som er lagret på en netværksserver, på et intranet eller på internettet -INDEX = INDEKS ## Anvender et indeks til at vælge en værdi fra en reference eller en matrix -INDIRECT = INDIREKTE ## Returnerer en reference, der er angivet af en tekstværdi -LOOKUP = SLÅ.OP ## Søger værdier i en vektor eller en matrix -MATCH = SAMMENLIGN ## Søger værdier i en reference eller en matrix -OFFSET = FORSKYDNING ## Returnerer en reference forskudt i forhold til en given reference -ROW = RÆKKE ## Returnerer rækkenummeret for en reference -ROWS = RÆKKER ## Returnerer antallet af rækker i en reference -RTD = RTD ## Henter realtidsdata fra et program, der understøtter COM-automatisering (Automation: En metode til at arbejde med objekter fra et andet program eller udviklingsværktøj. Automation, som tidligere blev kaldt OLE Automation, er en industristandard og en funktion i COM (Component Object Model).) -TRANSPOSE = TRANSPONER ## Returnerer en transponeret matrix -VLOOKUP = LOPSLAG ## Søger i øverste række af en matrix og flytter på tværs af rækken for at returnere en celleværdi - - -## -## Math and trigonometry functions Matematiske og trigonometriske funktioner -## -ABS = ABS ## Returnerer den absolutte værdi af et tal -ACOS = ARCCOS ## Returnerer et tals arcus cosinus -ACOSH = ARCCOSH ## Returnerer den inverse hyperbolske cosinus af tal -ASIN = ARCSIN ## Returnerer et tals arcus sinus -ASINH = ARCSINH ## Returnerer den inverse hyperbolske sinus for tal -ATAN = ARCTAN ## Returnerer et tals arcus tangens -ATAN2 = ARCTAN2 ## Returnerer de angivne x- og y-koordinaters arcus tangens -ATANH = ARCTANH ## Returnerer et tals inverse hyperbolske tangens -CEILING = AFRUND.LOFT ## Afrunder et tal til nærmeste heltal eller til nærmeste multiplum af betydning -COMBIN = KOMBIN ## Returnerer antallet af kombinationer for et givet antal objekter -COS = COS ## Returnerer et tals cosinus -COSH = COSH ## Returnerer den inverse hyperbolske cosinus af et tal -DEGREES = GRADER ## Konverterer radianer til grader -EVEN = LIGE ## Runder et tal op til nærmeste lige heltal -EXP = EKSP ## Returnerer e opløftet til en potens af et angivet tal -FACT = FAKULTET ## Returnerer et tals fakultet -FACTDOUBLE = DOBBELT.FAKULTET ## Returnerer et tals dobbelte fakultet -FLOOR = AFRUND.GULV ## Runder et tal ned mod nul -GCD = STØRSTE.FÆLLES.DIVISOR ## Returnerer den største fælles divisor -INT = HELTAL ## Nedrunder et tal til det nærmeste heltal -LCM = MINDSTE.FÆLLES.MULTIPLUM ## Returnerer det mindste fælles multiplum -LN = LN ## Returnerer et tals naturlige logaritme -LOG = LOG ## Returnerer logaritmen for et tal på grundlag af et angivet grundtal -LOG10 = LOG10 ## Returnerer titalslogaritmen af et tal -MDETERM = MDETERM ## Returnerer determinanten for en matrix -MINVERSE = MINVERT ## Returnerer den inverse matrix for en matrix -MMULT = MPRODUKT ## Returnerer matrixproduktet af to matrixer -MOD = REST ## Returnerer restværdien fra division -MROUND = MAFRUND ## Returnerer et tal afrundet til det ønskede multiplum -MULTINOMIAL = MULTINOMIAL ## Returnerer et multinomialt talsæt -ODD = ULIGE ## Runder et tal op til nærmeste ulige heltal -PI = PI ## Returnerer værdien af pi -POWER = POTENS ## Returnerer resultatet af et tal opløftet til en potens -PRODUCT = PRODUKT ## Multiplicerer argumenterne -QUOTIENT = KVOTIENT ## Returnerer heltalsdelen ved division -RADIANS = RADIANER ## Konverterer grader til radianer -RAND = SLUMP ## Returnerer et tilfældigt tal mellem 0 og 1 -RANDBETWEEN = SLUMP.MELLEM ## Returnerer et tilfældigt tal mellem de tal, der angives -ROMAN = ROMERTAL ## Konverterer et arabertal til romertal som tekst -ROUND = AFRUND ## Afrunder et tal til et angivet antal decimaler -ROUNDDOWN = RUND.NED ## Runder et tal ned mod nul -ROUNDUP = RUND.OP ## Runder et tal op, væk fra 0 (nul) -SERIESSUM = SERIESUM ## Returnerer summen af en potensserie baseret på en formel -SIGN = FORTEGN ## Returnerer et tals fortegn -SIN = SIN ## Returnerer en given vinkels sinusværdi -SINH = SINH ## Returnerer den hyperbolske sinus af et tal -SQRT = KVROD ## Returnerer en positiv kvadratrod -SQRTPI = KVRODPI ## Returnerer kvadratroden af (tal * pi;) -SUBTOTAL = SUBTOTAL ## Returnerer en subtotal på en liste eller i en database -SUM = SUM ## Lægger argumenterne sammen -SUMIF = SUM.HVIS ## Lægger de celler sammen, der er specificeret af et givet kriterium. -SUMIFS = SUM.HVISER ## Lægger de celler i et område sammen, der opfylder flere kriterier. -SUMPRODUCT = SUMPRODUKT ## Returnerer summen af produkter af ens matrixkomponenter -SUMSQ = SUMKV ## Returnerer summen af argumenternes kvadrater -SUMX2MY2 = SUMX2MY2 ## Returnerer summen af differensen mellem kvadrater af ens værdier i to matrixer -SUMX2PY2 = SUMX2PY2 ## Returnerer summen af summen af kvadrater af tilsvarende værdier i to matrixer -SUMXMY2 = SUMXMY2 ## Returnerer summen af kvadrater af differenser mellem ens værdier i to matrixer -TAN = TAN ## Returnerer et tals tangens -TANH = TANH ## Returnerer et tals hyperbolske tangens -TRUNC = AFKORT ## Afkorter et tal til et heltal - - -## -## Statistical functions Statistiske funktioner -## -AVEDEV = MAD ## Returnerer den gennemsnitlige numeriske afvigelse fra stikprøvens middelværdi -AVERAGE = MIDDEL ## Returnerer middelværdien af argumenterne -AVERAGEA = MIDDELV ## Returnerer middelværdien af argumenterne og medtager tal, tekst og logiske værdier -AVERAGEIF = MIDDEL.HVIS ## Returnerer gennemsnittet (den aritmetiske middelværdi) af alle de celler, der opfylder et givet kriterium, i et område -AVERAGEIFS = MIDDEL.HVISER ## Returnerer gennemsnittet (den aritmetiske middelværdi) af alle de celler, der opfylder flere kriterier. -BETADIST = BETAFORDELING ## Returnerer den kumulative betafordelingsfunktion -BETAINV = BETAINV ## Returnerer den inverse kumulative fordelingsfunktion for en angivet betafordeling -BINOMDIST = BINOMIALFORDELING ## Returnerer punktsandsynligheden for binomialfordelingen -CHIDIST = CHIFORDELING ## Returnerer fraktilsandsynligheden for en chi2-fordeling -CHIINV = CHIINV ## Returnerer den inverse fraktilsandsynlighed for en chi2-fordeling -CHITEST = CHITEST ## Foretager en test for uafhængighed -CONFIDENCE = KONFIDENSINTERVAL ## Returnerer et konfidensinterval for en population -CORREL = KORRELATION ## Returnerer korrelationskoefficienten mellem to datasæt -COUNT = TÆL ## Tæller antallet af tal på en liste med argumenter -COUNTA = TÆLV ## Tæller antallet af værdier på en liste med argumenter -COUNTBLANK = ANTAL.BLANKE ## Tæller antallet af tomme celler i et område -COUNTIF = TÆLHVIS ## Tæller antallet af celler, som opfylder de givne kriterier, i et område -COUNTIFS = TÆL.HVISER ## Tæller antallet af de celler, som opfylder flere kriterier, i et område -COVAR = KOVARIANS ## Beregner kovariansen mellem to stokastiske variabler -CRITBINOM = KRITBINOM ## Returnerer den mindste værdi for x, for hvilken det gælder, at fordelingsfunktionen er mindre end eller lig med kriterieværdien. -DEVSQ = SAK ## Returnerer summen af de kvadrerede afvigelser fra middelværdien -EXPONDIST = EKSPFORDELING ## Returnerer eksponentialfordelingen -FDIST = FFORDELING ## Returnerer fraktilsandsynligheden for F-fordelingen -FINV = FINV ## Returnerer den inverse fraktilsandsynlighed for F-fordelingen -FISHER = FISHER ## Returnerer Fisher-transformationen -FISHERINV = FISHERINV ## Returnerer den inverse Fisher-transformation -FORECAST = PROGNOSE ## Returnerer en prognoseværdi baseret på lineær tendens -FREQUENCY = FREKVENS ## Returnerer en frekvensfordeling i en søjlevektor -FTEST = FTEST ## Returnerer resultatet af en F-test til sammenligning af varians -GAMMADIST = GAMMAFORDELING ## Returnerer fordelingsfunktionen for gammafordelingen -GAMMAINV = GAMMAINV ## Returnerer den inverse fordelingsfunktion for gammafordelingen -GAMMALN = GAMMALN ## Returnerer den naturlige logaritme til gammafordelingen, G(x) -GEOMEAN = GEOMIDDELVÆRDI ## Returnerer det geometriske gennemsnit -GROWTH = FORØGELSE ## Returnerer værdier langs en eksponentiel tendens -HARMEAN = HARMIDDELVÆRDI ## Returnerer det harmoniske gennemsnit -HYPGEOMDIST = HYPGEOFORDELING ## Returnerer punktsandsynligheden i en hypergeometrisk fordeling -INTERCEPT = SKÆRING ## Returnerer afskæringsværdien på y-aksen i en lineær regression -KURT = TOPSTEJL ## Returnerer kurtosisværdien for en stokastisk variabel -LARGE = STOR ## Returnerer den k'te største værdi i et datasæt -LINEST = LINREGR ## Returnerer parameterestimaterne for en lineær tendens -LOGEST = LOGREGR ## Returnerer parameterestimaterne for en eksponentiel tendens -LOGINV = LOGINV ## Returnerer den inverse fordelingsfunktion for lognormalfordelingen -LOGNORMDIST = LOGNORMFORDELING ## Returnerer fordelingsfunktionen for lognormalfordelingen -MAX = MAKS ## Returnerer den maksimale værdi på en liste med argumenter. -MAXA = MAKSV ## Returnerer den maksimale værdi på en liste med argumenter og medtager tal, tekst og logiske værdier -MEDIAN = MEDIAN ## Returnerer medianen for de angivne tal -MIN = MIN ## Returnerer den mindste værdi på en liste med argumenter. -MINA = MINV ## Returnerer den mindste værdi på en liste med argumenter og medtager tal, tekst og logiske værdier -MODE = HYPPIGST ## Returnerer den hyppigste værdi i et datasæt -NEGBINOMDIST = NEGBINOMFORDELING ## Returnerer den negative binomialfordeling -NORMDIST = NORMFORDELING ## Returnerer fordelingsfunktionen for normalfordelingen -NORMINV = NORMINV ## Returnerer den inverse fordelingsfunktion for normalfordelingen -NORMSDIST = STANDARDNORMFORDELING ## Returnerer fordelingsfunktionen for standardnormalfordelingen -NORMSINV = STANDARDNORMINV ## Returnerer den inverse fordelingsfunktion for standardnormalfordelingen -PEARSON = PEARSON ## Returnerer Pearsons korrelationskoefficient -PERCENTILE = FRAKTIL ## Returnerer den k'te fraktil for datasættet -PERCENTRANK = PROCENTPLADS ## Returnerer den procentuelle rang for en given værdi i et datasæt -PERMUT = PERMUT ## Returnerer antallet af permutationer for et givet sæt objekter -POISSON = POISSON ## Returnerer fordelingsfunktionen for en Poisson-fordeling -PROB = SANDSYNLIGHED ## Returnerer intervalsandsynligheden -QUARTILE = KVARTIL ## Returnerer kvartilen i et givet datasæt -RANK = PLADS ## Returnerer rangen for et tal på en liste med tal -RSQ = FORKLARINGSGRAD ## Returnerer R2-værdien fra en simpel lineær regression -SKEW = SKÆVHED ## Returnerer skævheden for en stokastisk variabel -SLOPE = HÆLDNING ## Returnerer estimatet på hældningen fra en simpel lineær regression -SMALL = MINDSTE ## Returnerer den k'te mindste værdi i datasættet -STANDARDIZE = STANDARDISER ## Returnerer en standardiseret værdi -STDEV = STDAFV ## Estimerer standardafvigelsen på basis af en stikprøve -STDEVA = STDAFVV ## Beregner standardafvigelsen på basis af en prøve og medtager tal, tekst og logiske værdier -STDEVP = STDAFVP ## Beregner standardafvigelsen på basis af en hel population -STDEVPA = STDAFVPV ## Beregner standardafvigelsen på basis af en hel population og medtager tal, tekst og logiske værdier -STEYX = STFYX ## Returnerer standardafvigelsen for de estimerede y-værdier i den simple lineære regression -TDIST = TFORDELING ## Returnerer fordelingsfunktionen for Student's t-fordeling -TINV = TINV ## Returnerer den inverse fordelingsfunktion for Student's t-fordeling -TREND = TENDENS ## Returnerer værdi under antagelse af en lineær tendens -TRIMMEAN = TRIMMIDDELVÆRDI ## Returnerer den trimmede middelværdi for datasættet -TTEST = TTEST ## Returnerer den sandsynlighed, der er forbundet med Student's t-test -VAR = VARIANS ## Beregner variansen på basis af en prøve -VARA = VARIANSV ## Beregner variansen på basis af en prøve og medtager tal, tekst og logiske værdier -VARP = VARIANSP ## Beregner variansen på basis af hele populationen -VARPA = VARIANSPV ## Beregner variansen på basis af hele populationen og medtager tal, tekst og logiske værdier -WEIBULL = WEIBULL ## Returnerer fordelingsfunktionen for Weibull-fordelingen -ZTEST = ZTEST ## Returnerer sandsynlighedsværdien ved en en-sidet z-test - - -## -## Text functions Tekstfunktioner -## -ASC = ASC ## Ændrer engelske tegn i fuld bredde (dobbelt-byte) eller katakana i en tegnstreng til tegn i halv bredde (enkelt-byte) -BAHTTEXT = BAHTTEKST ## Konverterer et tal til tekst ved hjælp af valutaformatet ß (baht) -CHAR = TEGN ## Returnerer det tegn, der svarer til kodenummeret -CLEAN = RENS ## Fjerner alle tegn, der ikke kan udskrives, fra tekst -CODE = KODE ## Returnerer en numerisk kode for det første tegn i en tekststreng -CONCATENATE = SAMMENKÆDNING ## Sammenkæder adskillige tekstelementer til ét tekstelement -DOLLAR = KR ## Konverterer et tal til tekst ved hjælp af valutaformatet kr. (kroner) -EXACT = EKSAKT ## Kontrollerer, om to tekstværdier er identiske -FIND = FIND ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes mellem store og små bogstaver) -FINDB = FINDB ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes mellem store og små bogstaver) -FIXED = FAST ## Formaterer et tal som tekst med et fast antal decimaler -JIS = JIS ## Ændrer engelske tegn i halv bredde (enkelt-byte) eller katakana i en tegnstreng til tegn i fuld bredde (dobbelt-byte) -LEFT = VENSTRE ## Returnerer tegnet længst til venstre i en tekstværdi -LEFTB = VENSTREB ## Returnerer tegnet længst til venstre i en tekstværdi -LEN = LÆNGDE ## Returnerer antallet af tegn i en tekststreng -LENB = LÆNGDEB ## Returnerer antallet af tegn i en tekststreng -LOWER = SMÅ.BOGSTAVER ## Konverterer tekst til små bogstaver -MID = MIDT ## Returnerer et bestemt antal tegn fra en tekststreng fra og med den angivne startposition -MIDB = MIDTB ## Returnerer et bestemt antal tegn fra en tekststreng fra og med den angivne startposition -PHONETIC = FONETISK ## Uddrager de fonetiske (furigana) tegn fra en tekststreng -PROPER = STORT.FORBOGSTAV ## Konverterer første bogstav i hvert ord i teksten til stort bogstav -REPLACE = ERSTAT ## Erstatter tegn i tekst -REPLACEB = ERSTATB ## Erstatter tegn i tekst -REPT = GENTAG ## Gentager tekst et givet antal gange -RIGHT = HØJRE ## Returnerer tegnet længste til højre i en tekstværdi -RIGHTB = HØJREB ## Returnerer tegnet længste til højre i en tekstværdi -SEARCH = SØG ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes ikke mellem store og små bogstaver) -SEARCHB = SØGB ## Søger efter en tekstværdi i en anden tekstværdi (der skelnes ikke mellem store og små bogstaver) -SUBSTITUTE = UDSKIFT ## Udskifter gammel tekst med ny tekst i en tekststreng -T = T ## Konverterer argumenterne til tekst -TEXT = TEKST ## Formaterer et tal og konverterer det til tekst -TRIM = FJERN.OVERFLØDIGE.BLANKE ## Fjerner mellemrum fra tekst -UPPER = STORE.BOGSTAVER ## Konverterer tekst til store bogstaver -VALUE = VÆRDI ## Konverterer et tekstargument til et tal diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config deleted file mode 100644 index aa0228e..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = € - - -## -## Excel Error Codes (For future use) -## -NULL = #NULL! -DIV0 = #DIV/0! -VALUE = #WERT! -REF = #BEZUG! -NAME = #NAME? -NUM = #ZAHL! -NA = #NV diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions deleted file mode 100644 index 3147f9c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Add-In- und Automatisierungsfunktionen -## -GETPIVOTDATA = PIVOTDATENZUORDNEN ## In einem PivotTable-Bericht gespeicherte Daten werden zurückgegeben. - - -## -## Cube functions Cubefunktionen -## -CUBEKPIMEMBER = CUBEKPIELEMENT ## Gibt Name, Eigenschaft und Measure eines Key Performance Indicators (KPI) zurück und zeigt den Namen und die Eigenschaft in der Zelle an. Ein KPI ist ein quantifizierbares Maß, wie z. B. der monatliche Bruttogewinn oder die vierteljährliche Mitarbeiterfluktuation, mit dessen Hilfe das Leistungsverhalten eines Unternehmens überwacht werden kann. -CUBEMEMBER = CUBEELEMENT ## Gibt ein Element oder ein Tuple in einer Cubehierarchie zurück. Wird verwendet, um zu überprüfen, ob das Element oder Tuple im Cube vorhanden ist. -CUBEMEMBERPROPERTY = CUBEELEMENTEIGENSCHAFT ## Gibt den Wert einer Elementeigenschaft im Cube zurück. Wird verwendet, um zu überprüfen, ob ein Elementname im Cube vorhanden ist, und um die für dieses Element angegebene Eigenschaft zurückzugeben. -CUBERANKEDMEMBER = CUBERANGELEMENT ## Gibt das n-te oder n-rangige Element in einer Menge zurück. Wird verwendet, um mindestens ein Element in einer Menge zurückzugeben, wie z. B. bester Vertriebsmitarbeiter oder 10 beste Kursteilnehmer. -CUBESET = CUBEMENGE ## Definiert eine berechnete Menge Elemente oder Tuples durch Senden eines Mengenausdrucks an den Cube auf dem Server, der die Menge erstellt und an Microsoft Office Excel zurückgibt. -CUBESETCOUNT = CUBEMENGENANZAHL ## Gibt die Anzahl der Elemente in einer Menge zurück. -CUBEVALUE = CUBEWERT ## Gibt einen Aggregatwert aus einem Cube zurück. - - -## -## Database functions Datenbankfunktionen -## -DAVERAGE = DBMITTELWERT ## Gibt den Mittelwert der ausgewählten Datenbankeinträge zurück -DCOUNT = DBANZAHL ## Zählt die Zellen mit Zahlen in einer Datenbank -DCOUNTA = DBANZAHL2 ## Zählt nicht leere Zellen in einer Datenbank -DGET = DBAUSZUG ## Extrahiert aus einer Datenbank einen einzelnen Datensatz, der den angegebenen Kriterien entspricht -DMAX = DBMAX ## Gibt den größten Wert aus ausgewählten Datenbankeinträgen zurück -DMIN = DBMIN ## Gibt den kleinsten Wert aus ausgewählten Datenbankeinträgen zurück -DPRODUCT = DBPRODUKT ## Multipliziert die Werte in einem bestimmten Feld mit Datensätzen, die den Kriterien in einer Datenbank entsprechen -DSTDEV = DBSTDABW ## Schätzt die Standardabweichung auf der Grundlage einer Stichprobe aus ausgewählten Datenbankeinträgen -DSTDEVP = DBSTDABWN ## Berechnet die Standardabweichung auf der Grundlage der Grundgesamtheit ausgewählter Datenbankeinträge -DSUM = DBSUMME ## Addiert die Zahlen in der Feldspalte mit Datensätzen in der Datenbank, die den Kriterien entsprechen -DVAR = DBVARIANZ ## Schätzt die Varianz auf der Grundlage ausgewählter Datenbankeinträge -DVARP = DBVARIANZEN ## Berechnet die Varianz auf der Grundlage der Grundgesamtheit ausgewählter Datenbankeinträge - - -## -## Date and time functions Datums- und Zeitfunktionen -## -DATE = DATUM ## Gibt die fortlaufende Zahl eines bestimmten Datums zurück -DATEVALUE = DATWERT ## Wandelt ein Datum in Form von Text in eine fortlaufende Zahl um -DAY = TAG ## Wandelt eine fortlaufende Zahl in den Tag des Monats um -DAYS360 = TAGE360 ## Berechnet die Anzahl der Tage zwischen zwei Datumsangaben ausgehend von einem Jahr, das 360 Tage hat -EDATE = EDATUM ## Gibt die fortlaufende Zahl des Datums zurück, bei dem es sich um die angegebene Anzahl von Monaten vor oder nach dem Anfangstermin handelt -EOMONTH = MONATSENDE ## Gibt die fortlaufende Zahl des letzten Tags des Monats vor oder nach einer festgelegten Anzahl von Monaten zurück -HOUR = STUNDE ## Wandelt eine fortlaufende Zahl in eine Stunde um -MINUTE = MINUTE ## Wandelt eine fortlaufende Zahl in eine Minute um -MONTH = MONAT ## Wandelt eine fortlaufende Zahl in einen Monat um -NETWORKDAYS = NETTOARBEITSTAGE ## Gibt die Anzahl von ganzen Arbeitstagen zwischen zwei Datumswerten zurück -NOW = JETZT ## Gibt die fortlaufende Zahl des aktuellen Datums und der aktuellen Uhrzeit zurück -SECOND = SEKUNDE ## Wandelt eine fortlaufende Zahl in eine Sekunde um -TIME = ZEIT ## Gibt die fortlaufende Zahl einer bestimmten Uhrzeit zurück -TIMEVALUE = ZEITWERT ## Wandelt eine Uhrzeit in Form von Text in eine fortlaufende Zahl um -TODAY = HEUTE ## Gibt die fortlaufende Zahl des heutigen Datums zurück -WEEKDAY = WOCHENTAG ## Wandelt eine fortlaufende Zahl in den Wochentag um -WEEKNUM = KALENDERWOCHE ## Wandelt eine fortlaufende Zahl in eine Zahl um, die angibt, in welche Woche eines Jahres das angegebene Datum fällt -WORKDAY = ARBEITSTAG ## Gibt die fortlaufende Zahl des Datums vor oder nach einer bestimmten Anzahl von Arbeitstagen zurück -YEAR = JAHR ## Wandelt eine fortlaufende Zahl in ein Jahr um -YEARFRAC = BRTEILJAHRE ## Gibt die Anzahl der ganzen Tage zwischen Ausgangsdatum und Enddatum in Bruchteilen von Jahren zurück - - -## -## Engineering functions Konstruktionsfunktionen -## -BESSELI = BESSELI ## Gibt die geänderte Besselfunktion In(x) zurück -BESSELJ = BESSELJ ## Gibt die Besselfunktion Jn(x) zurück -BESSELK = BESSELK ## Gibt die geänderte Besselfunktion Kn(x) zurück -BESSELY = BESSELY ## Gibt die Besselfunktion Yn(x) zurück -BIN2DEC = BININDEZ ## Wandelt eine binäre Zahl (Dualzahl) in eine dezimale Zahl um -BIN2HEX = BININHEX ## Wandelt eine binäre Zahl (Dualzahl) in eine hexadezimale Zahl um -BIN2OCT = BININOKT ## Wandelt eine binäre Zahl (Dualzahl) in eine oktale Zahl um -COMPLEX = KOMPLEXE ## Wandelt den Real- und Imaginärteil in eine komplexe Zahl um -CONVERT = UMWANDELN ## Wandelt eine Zahl von einem Maßsystem in ein anderes um -DEC2BIN = DEZINBIN ## Wandelt eine dezimale Zahl in eine binäre Zahl (Dualzahl) um -DEC2HEX = DEZINHEX ## Wandelt eine dezimale Zahl in eine hexadezimale Zahl um -DEC2OCT = DEZINOKT ## Wandelt eine dezimale Zahl in eine oktale Zahl um -DELTA = DELTA ## Überprüft, ob zwei Werte gleich sind -ERF = GAUSSFEHLER ## Gibt die Gauss'sche Fehlerfunktion zurück -ERFC = GAUSSFKOMPL ## Gibt das Komplement zur Gauss'schen Fehlerfunktion zurück -GESTEP = GGANZZAHL ## Überprüft, ob eine Zahl größer als ein gegebener Schwellenwert ist -HEX2BIN = HEXINBIN ## Wandelt eine hexadezimale Zahl in eine Binärzahl um -HEX2DEC = HEXINDEZ ## Wandelt eine hexadezimale Zahl in eine dezimale Zahl um -HEX2OCT = HEXINOKT ## Wandelt eine hexadezimale Zahl in eine Oktalzahl um -IMABS = IMABS ## Gibt den Absolutbetrag (Modulo) einer komplexen Zahl zurück -IMAGINARY = IMAGINÄRTEIL ## Gibt den Imaginärteil einer komplexen Zahl zurück -IMARGUMENT = IMARGUMENT ## Gibt das Argument Theta zurück, einen Winkel, der als Bogenmaß ausgedrückt wird -IMCONJUGATE = IMKONJUGIERTE ## Gibt die konjugierte komplexe Zahl zu einer komplexen Zahl zurück -IMCOS = IMCOS ## Gibt den Kosinus einer komplexen Zahl zurück -IMDIV = IMDIV ## Gibt den Quotienten zweier komplexer Zahlen zurück -IMEXP = IMEXP ## Gibt die algebraische Form einer in exponentieller Schreibweise vorliegenden komplexen Zahl zurück -IMLN = IMLN ## Gibt den natürlichen Logarithmus einer komplexen Zahl zurück -IMLOG10 = IMLOG10 ## Gibt den Logarithmus einer komplexen Zahl zur Basis 10 zurück -IMLOG2 = IMLOG2 ## Gibt den Logarithmus einer komplexen Zahl zur Basis 2 zurück -IMPOWER = IMAPOTENZ ## Potenziert eine komplexe Zahl mit einer ganzen Zahl -IMPRODUCT = IMPRODUKT ## Gibt das Produkt von komplexen Zahlen zurück -IMREAL = IMREALTEIL ## Gibt den Realteil einer komplexen Zahl zurück -IMSIN = IMSIN ## Gibt den Sinus einer komplexen Zahl zurück -IMSQRT = IMWURZEL ## Gibt die Quadratwurzel einer komplexen Zahl zurück -IMSUB = IMSUB ## Gibt die Differenz zwischen zwei komplexen Zahlen zurück -IMSUM = IMSUMME ## Gibt die Summe von komplexen Zahlen zurück -OCT2BIN = OKTINBIN ## Wandelt eine oktale Zahl in eine binäre Zahl (Dualzahl) um -OCT2DEC = OKTINDEZ ## Wandelt eine oktale Zahl in eine dezimale Zahl um -OCT2HEX = OKTINHEX ## Wandelt eine oktale Zahl in eine hexadezimale Zahl um - - -## -## Financial functions Finanzmathematische Funktionen -## -ACCRINT = AUFGELZINS ## Gibt die aufgelaufenen Zinsen (Stückzinsen) eines Wertpapiers mit periodischen Zinszahlungen zurück -ACCRINTM = AUFGELZINSF ## Gibt die aufgelaufenen Zinsen (Stückzinsen) eines Wertpapiers zurück, die bei Fälligkeit ausgezahlt werden -AMORDEGRC = AMORDEGRK ## Gibt die Abschreibung für die einzelnen Abschreibungszeiträume mithilfe eines Abschreibungskoeffizienten zurück -AMORLINC = AMORLINEARK ## Gibt die Abschreibung für die einzelnen Abschreibungszeiträume zurück -COUPDAYBS = ZINSTERMTAGVA ## Gibt die Anzahl der Tage vom Anfang des Zinstermins bis zum Abrechnungstermin zurück -COUPDAYS = ZINSTERMTAGE ## Gibt die Anzahl der Tage der Zinsperiode zurück, die den Abrechnungstermin einschließt -COUPDAYSNC = ZINSTERMTAGNZ ## Gibt die Anzahl der Tage vom Abrechnungstermin bis zum nächsten Zinstermin zurück -COUPNCD = ZINSTERMNZ ## Gibt das Datum des ersten Zinstermins nach dem Abrechnungstermin zurück -COUPNUM = ZINSTERMZAHL ## Gibt die Anzahl der Zinstermine zwischen Abrechnungs- und Fälligkeitsdatum zurück -COUPPCD = ZINSTERMVZ ## Gibt das Datum des letzten Zinstermins vor dem Abrechnungstermin zurück -CUMIPMT = KUMZINSZ ## Berechnet die kumulierten Zinsen, die zwischen zwei Perioden zu zahlen sind -CUMPRINC = KUMKAPITAL ## Berechnet die aufgelaufene Tilgung eines Darlehens, die zwischen zwei Perioden zu zahlen ist -DB = GDA2 ## Gibt die geometrisch-degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode zurück -DDB = GDA ## Gibt die Abschreibung eines Anlageguts für einen angegebenen Zeitraum unter Verwendung der degressiven Doppelraten-Abschreibung oder eines anderen von Ihnen angegebenen Abschreibungsverfahrens zurück -DISC = DISAGIO ## Gibt den in Prozent ausgedrückten Abzinsungssatz eines Wertpapiers zurück -DOLLARDE = NOTIERUNGDEZ ## Wandelt eine Notierung, die als Dezimalbruch ausgedrückt wurde, in eine Dezimalzahl um -DOLLARFR = NOTIERUNGBRU ## Wandelt eine Notierung, die als Dezimalzahl ausgedrückt wurde, in einen Dezimalbruch um -DURATION = DURATION ## Gibt die jährliche Duration eines Wertpapiers mit periodischen Zinszahlungen zurück -EFFECT = EFFEKTIV ## Gibt die jährliche Effektivverzinsung zurück -FV = ZW ## Gibt den zukünftigen Wert (Endwert) einer Investition zurück -FVSCHEDULE = ZW2 ## Gibt den aufgezinsten Wert des Anfangskapitals für eine Reihe periodisch unterschiedlicher Zinssätze zurück -INTRATE = ZINSSATZ ## Gibt den Zinssatz eines voll investierten Wertpapiers zurück -IPMT = ZINSZ ## Gibt die Zinszahlung einer Investition für die angegebene Periode zurück -IRR = IKV ## Gibt den internen Zinsfuß einer Investition ohne Finanzierungskosten oder Reinvestitionsgewinne zurück -ISPMT = ISPMT ## Berechnet die während eines bestimmten Zeitraums für eine Investition gezahlten Zinsen -MDURATION = MDURATION ## Gibt die geänderte Dauer für ein Wertpapier mit einem angenommenen Nennwert von 100 € zurück -MIRR = QIKV ## Gibt den internen Zinsfuß zurück, wobei positive und negative Zahlungen zu unterschiedlichen Sätzen finanziert werden -NOMINAL = NOMINAL ## Gibt die jährliche Nominalverzinsung zurück -NPER = ZZR ## Gibt die Anzahl der Zahlungsperioden einer Investition zurück -NPV = NBW ## Gibt den Nettobarwert einer Investition auf Basis periodisch anfallender Zahlungen und eines Abzinsungsfaktors zurück -ODDFPRICE = UNREGER.KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers mit einem unregelmäßigen ersten Zinstermin zurück -ODDFYIELD = UNREGER.REND ## Gibt die Rendite eines Wertpapiers mit einem unregelmäßigen ersten Zinstermin zurück -ODDLPRICE = UNREGLE.KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers mit einem unregelmäßigen letzten Zinstermin zurück -ODDLYIELD = UNREGLE.REND ## Gibt die Rendite eines Wertpapiers mit einem unregelmäßigen letzten Zinstermin zurück -PMT = RMZ ## Gibt die periodische Zahlung für eine Annuität zurück -PPMT = KAPZ ## Gibt die Kapitalrückzahlung einer Investition für eine angegebene Periode zurück -PRICE = KURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück, das periodisch Zinsen auszahlt -PRICEDISC = KURSDISAGIO ## Gibt den Kurs pro 100 € Nennwert eines unverzinslichen Wertpapiers zurück -PRICEMAT = KURSFÄLLIG ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück, das Zinsen am Fälligkeitsdatum auszahlt -PV = BW ## Gibt den Barwert einer Investition zurück -RATE = ZINS ## Gibt den Zinssatz pro Zeitraum einer Annuität zurück -RECEIVED = AUSZAHLUNG ## Gibt den Auszahlungsbetrag eines voll investierten Wertpapiers am Fälligkeitstermin zurück -SLN = LIA ## Gibt die lineare Abschreibung eines Wirtschaftsguts pro Periode zurück -SYD = DIA ## Gibt die arithmetisch-degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode zurück -TBILLEQ = TBILLÄQUIV ## Gibt die Rendite für ein Wertpapier zurück -TBILLPRICE = TBILLKURS ## Gibt den Kurs pro 100 € Nennwert eines Wertpapiers zurück -TBILLYIELD = TBILLRENDITE ## Gibt die Rendite für ein Wertpapier zurück -VDB = VDB ## Gibt die degressive Abschreibung eines Wirtschaftsguts für eine bestimmte Periode oder Teilperiode zurück -XIRR = XINTZINSFUSS ## Gibt den internen Zinsfuß einer Reihe nicht periodisch anfallender Zahlungen zurück -XNPV = XKAPITALWERT ## Gibt den Nettobarwert (Kapitalwert) einer Reihe nicht periodisch anfallender Zahlungen zurück -YIELD = RENDITE ## Gibt die Rendite eines Wertpapiers zurück, das periodisch Zinsen auszahlt -YIELDDISC = RENDITEDIS ## Gibt die jährliche Rendite eines unverzinslichen Wertpapiers zurück -YIELDMAT = RENDITEFÄLL ## Gibt die jährliche Rendite eines Wertpapiers zurück, das Zinsen am Fälligkeitsdatum auszahlt - - -## -## Information functions Informationsfunktionen -## -CELL = ZELLE ## Gibt Informationen zu Formatierung, Position oder Inhalt einer Zelle zurück -ERROR.TYPE = FEHLER.TYP ## Gibt eine Zahl zurück, die einem Fehlertyp entspricht -INFO = INFO ## Gibt Informationen zur aktuellen Betriebssystemumgebung zurück -ISBLANK = ISTLEER ## Gibt WAHR zurück, wenn der Wert leer ist -ISERR = ISTFEHL ## Gibt WAHR zurück, wenn der Wert ein beliebiger Fehlerwert außer #N/V ist -ISERROR = ISTFEHLER ## Gibt WAHR zurück, wenn der Wert ein beliebiger Fehlerwert ist -ISEVEN = ISTGERADE ## Gibt WAHR zurück, wenn es sich um eine gerade Zahl handelt -ISLOGICAL = ISTLOG ## Gibt WAHR zurück, wenn der Wert ein Wahrheitswert ist -ISNA = ISTNV ## Gibt WAHR zurück, wenn der Wert der Fehlerwert #N/V ist -ISNONTEXT = ISTKTEXT ## Gibt WAHR zurück, wenn der Wert ein Element ist, das keinen Text enthält -ISNUMBER = ISTZAHL ## Gibt WAHR zurück, wenn der Wert eine Zahl ist -ISODD = ISTUNGERADE ## Gibt WAHR zurück, wenn es sich um eine ungerade Zahl handelt -ISREF = ISTBEZUG ## Gibt WAHR zurück, wenn der Wert ein Bezug ist -ISTEXT = ISTTEXT ## Gibt WAHR zurück, wenn der Wert ein Element ist, das Text enthält -N = N ## Gibt den in eine Zahl umgewandelten Wert zurück -NA = NV ## Gibt den Fehlerwert #NV zurück -TYPE = TYP ## Gibt eine Zahl zurück, die den Datentyp des angegebenen Werts anzeigt - - -## -## Logical functions Logische Funktionen -## -AND = UND ## Gibt WAHR zurück, wenn alle zugehörigen Argumente WAHR sind -FALSE = FALSCH ## Gibt den Wahrheitswert FALSCH zurück -IF = WENN ## Gibt einen logischen Test zum Ausführen an -IFERROR = WENNFEHLER ## Gibt einen von Ihnen festgelegten Wert zurück, wenn die Auswertung der Formel zu einem Fehler führt; andernfalls wird das Ergebnis der Formel zurückgegeben -NOT = NICHT ## Kehrt den Wahrheitswert der zugehörigen Argumente um -OR = ODER ## Gibt WAHR zurück, wenn ein Argument WAHR ist -TRUE = WAHR ## Gibt den Wahrheitswert WAHR zurück - - -## -## Lookup and reference functions Nachschlage- und Verweisfunktionen -## -ADDRESS = ADRESSE ## Gibt einen Bezug auf eine einzelne Zelle in einem Tabellenblatt als Text zurück -AREAS = BEREICHE ## Gibt die Anzahl der innerhalb eines Bezugs aufgeführten Bereiche zurück -CHOOSE = WAHL ## Wählt einen Wert aus eine Liste mit Werten aus -COLUMN = SPALTE ## Gibt die Spaltennummer eines Bezugs zurück -COLUMNS = SPALTEN ## Gibt die Anzahl der Spalten in einem Bezug zurück -HLOOKUP = HVERWEIS ## Sucht in der obersten Zeile einer Matrix und gibt den Wert der angegebenen Zelle zurück -HYPERLINK = HYPERLINK ## Erstellt eine Verknüpfung, über die ein auf einem Netzwerkserver, in einem Intranet oder im Internet gespeichertes Dokument geöffnet wird -INDEX = INDEX ## Verwendet einen Index, um einen Wert aus einem Bezug oder einer Matrix auszuwählen -INDIRECT = INDIREKT ## Gibt einen Bezug zurück, der von einem Textwert angegeben wird -LOOKUP = LOOKUP ## Sucht Werte in einem Vektor oder einer Matrix -MATCH = VERGLEICH ## Sucht Werte in einem Bezug oder einer Matrix -OFFSET = BEREICH.VERSCHIEBEN ## Gibt einen Bezugoffset aus einem gegebenen Bezug zurück -ROW = ZEILE ## Gibt die Zeilennummer eines Bezugs zurück -ROWS = ZEILEN ## Gibt die Anzahl der Zeilen in einem Bezug zurück -RTD = RTD ## Ruft Echtzeitdaten von einem Programm ab, das die COM-Automatisierung (Automatisierung: Ein Verfahren, bei dem aus einer Anwendung oder einem Entwicklungstool heraus mit den Objekten einer anderen Anwendung gearbeitet wird. Die früher als OLE-Automatisierung bezeichnete Automatisierung ist ein Industriestandard und eine Funktion von COM (Component Object Model).) unterstützt -TRANSPOSE = MTRANS ## Gibt die transponierte Matrix einer Matrix zurück -VLOOKUP = SVERWEIS ## Sucht in der ersten Spalte einer Matrix und arbeitet sich durch die Zeile, um den Wert einer Zelle zurückzugeben - - -## -## Math and trigonometry functions Mathematische und trigonometrische Funktionen -## -ABS = ABS ## Gibt den Absolutwert einer Zahl zurück -ACOS = ARCCOS ## Gibt den Arkuskosinus einer Zahl zurück -ACOSH = ARCCOSHYP ## Gibt den umgekehrten hyperbolischen Kosinus einer Zahl zurück -ASIN = ARCSIN ## Gibt den Arkussinus einer Zahl zurück -ASINH = ARCSINHYP ## Gibt den umgekehrten hyperbolischen Sinus einer Zahl zurück -ATAN = ARCTAN ## Gibt den Arkustangens einer Zahl zurück -ATAN2 = ARCTAN2 ## Gibt den Arkustangens einer x- und einer y-Koordinate zurück -ATANH = ARCTANHYP ## Gibt den umgekehrten hyperbolischen Tangens einer Zahl zurück -CEILING = OBERGRENZE ## Rundet eine Zahl auf die nächste ganze Zahl oder das nächste Vielfache von Schritt -COMBIN = KOMBINATIONEN ## Gibt die Anzahl der Kombinationen für eine bestimmte Anzahl von Objekten zurück -COS = COS ## Gibt den Kosinus einer Zahl zurück -COSH = COSHYP ## Gibt den hyperbolischen Kosinus einer Zahl zurück -DEGREES = GRAD ## Wandelt Bogenmaß (Radiant) in Grad um -EVEN = GERADE ## Rundet eine Zahl auf die nächste gerade ganze Zahl auf -EXP = EXP ## Potenziert die Basis e mit der als Argument angegebenen Zahl -FACT = FAKULTÄT ## Gibt die Fakultät einer Zahl zurück -FACTDOUBLE = ZWEIFAKULTÄT ## Gibt die Fakultät zu Zahl mit Schrittlänge 2 zurück -FLOOR = UNTERGRENZE ## Rundet die Zahl auf Anzahl_Stellen ab -GCD = GGT ## Gibt den größten gemeinsamen Teiler zurück -INT = GANZZAHL ## Rundet eine Zahl auf die nächstkleinere ganze Zahl ab -LCM = KGV ## Gibt das kleinste gemeinsame Vielfache zurück -LN = LN ## Gibt den natürlichen Logarithmus einer Zahl zurück -LOG = LOG ## Gibt den Logarithmus einer Zahl zu der angegebenen Basis zurück -LOG10 = LOG10 ## Gibt den Logarithmus einer Zahl zur Basis 10 zurück -MDETERM = MDET ## Gibt die Determinante einer Matrix zurück -MINVERSE = MINV ## Gibt die inverse Matrix einer Matrix zurück -MMULT = MMULT ## Gibt das Produkt zweier Matrizen zurück -MOD = REST ## Gibt den Rest einer Division zurück -MROUND = VRUNDEN ## Gibt eine auf das gewünschte Vielfache gerundete Zahl zurück -MULTINOMIAL = POLYNOMIAL ## Gibt den Polynomialkoeffizienten einer Gruppe von Zahlen zurück -ODD = UNGERADE ## Rundet eine Zahl auf die nächste ungerade ganze Zahl auf -PI = PI ## Gibt den Wert Pi zurück -POWER = POTENZ ## Gibt als Ergebnis eine potenzierte Zahl zurück -PRODUCT = PRODUKT ## Multipliziert die zugehörigen Argumente -QUOTIENT = QUOTIENT ## Gibt den ganzzahligen Anteil einer Division zurück -RADIANS = BOGENMASS ## Wandelt Grad in Bogenmaß (Radiant) um -RAND = ZUFALLSZAHL ## Gibt eine Zufallszahl zwischen 0 und 1 zurück -RANDBETWEEN = ZUFALLSBEREICH ## Gibt eine Zufallszahl aus dem festgelegten Bereich zurück -ROMAN = RÖMISCH ## Wandelt eine arabische Zahl in eine römische Zahl als Text um -ROUND = RUNDEN ## Rundet eine Zahl auf eine bestimmte Anzahl von Dezimalstellen -ROUNDDOWN = ABRUNDEN ## Rundet die Zahl auf Anzahl_Stellen ab -ROUNDUP = AUFRUNDEN ## Rundet die Zahl auf Anzahl_Stellen auf -SERIESSUM = POTENZREIHE ## Gibt die Summe von Potenzen (zur Berechnung von Potenzreihen und dichotomen Wahrscheinlichkeiten) zurück -SIGN = VORZEICHEN ## Gibt das Vorzeichen einer Zahl zurück -SIN = SIN ## Gibt den Sinus einer Zahl zurück -SINH = SINHYP ## Gibt den hyperbolischen Sinus einer Zahl zurück -SQRT = WURZEL ## Gibt die Quadratwurzel einer Zahl zurück -SQRTPI = WURZELPI ## Gibt die Wurzel aus der mit Pi (pi) multiplizierten Zahl zurück -SUBTOTAL = TEILERGEBNIS ## Gibt ein Teilergebnis in einer Liste oder Datenbank zurück -SUM = SUMME ## Addiert die zugehörigen Argumente -SUMIF = SUMMEWENN ## Addiert Zahlen, die mit den Suchkriterien übereinstimmen -SUMIFS = SUMMEWENNS ## Die Zellen, die mehrere Kriterien erfüllen, werden in einem Bereich hinzugefügt -SUMPRODUCT = SUMMENPRODUKT ## Gibt die Summe der Produkte zusammengehöriger Matrixkomponenten zurück -SUMSQ = QUADRATESUMME ## Gibt die Summe der quadrierten Argumente zurück -SUMX2MY2 = SUMMEX2MY2 ## Gibt die Summe der Differenzen der Quadrate für zusammengehörige Komponenten zweier Matrizen zurück -SUMX2PY2 = SUMMEX2PY2 ## Gibt die Summe der Quadrate für zusammengehörige Komponenten zweier Matrizen zurück -SUMXMY2 = SUMMEXMY2 ## Gibt die Summe der quadrierten Differenzen für zusammengehörige Komponenten zweier Matrizen zurück -TAN = TAN ## Gibt den Tangens einer Zahl zurück -TANH = TANHYP ## Gibt den hyperbolischen Tangens einer Zahl zurück -TRUNC = KÜRZEN ## Schneidet die Kommastellen einer Zahl ab und gibt als Ergebnis eine ganze Zahl zurück - - -## -## Statistical functions Statistische Funktionen -## -AVEDEV = MITTELABW ## Gibt die durchschnittliche absolute Abweichung einer Reihe von Merkmalsausprägungen und ihrem Mittelwert zurück -AVERAGE = MITTELWERT ## Gibt den Mittelwert der zugehörigen Argumente zurück -AVERAGEA = MITTELWERTA ## Gibt den Mittelwert der zugehörigen Argumente, die Zahlen, Text und Wahrheitswerte enthalten, zurück -AVERAGEIF = MITTELWERTWENN ## Der Durchschnittswert (arithmetisches Mittel) für alle Zellen in einem Bereich, die einem angegebenen Kriterium entsprechen, wird zurückgegeben -AVERAGEIFS = MITTELWERTWENNS ## Gibt den Durchschnittswert (arithmetisches Mittel) aller Zellen zurück, die mehreren Kriterien entsprechen -BETADIST = BETAVERT ## Gibt die Werte der kumulierten Betaverteilungsfunktion zurück -BETAINV = BETAINV ## Gibt das Quantil der angegebenen Betaverteilung zurück -BINOMDIST = BINOMVERT ## Gibt Wahrscheinlichkeiten einer binomialverteilten Zufallsvariablen zurück -CHIDIST = CHIVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer Chi-Quadrat-verteilten Zufallsgröße zurück -CHIINV = CHIINV ## Gibt Quantile der Verteilungsfunktion (1-Alpha) der Chi-Quadrat-Verteilung zurück -CHITEST = CHITEST ## Gibt die Teststatistik eines Unabhängigkeitstests zurück -CONFIDENCE = KONFIDENZ ## Ermöglicht die Berechnung des 1-Alpha Konfidenzintervalls für den Erwartungswert einer Zufallsvariablen -CORREL = KORREL ## Gibt den Korrelationskoeffizienten zweier Reihen von Merkmalsausprägungen zurück -COUNT = ANZAHL ## Gibt die Anzahl der Zahlen in der Liste mit Argumenten an -COUNTA = ANZAHL2 ## Gibt die Anzahl der Werte in der Liste mit Argumenten an -COUNTBLANK = ANZAHLLEEREZELLEN ## Gibt die Anzahl der leeren Zellen in einem Bereich an -COUNTIF = ZÄHLENWENN ## Gibt die Anzahl der Zellen in einem Bereich an, deren Inhalte mit den Suchkriterien übereinstimmen -COUNTIFS = ZÄHLENWENNS ## Gibt die Anzahl der Zellen in einem Bereich an, deren Inhalte mit mehreren Suchkriterien übereinstimmen -COVAR = KOVAR ## Gibt die Kovarianz zurück, den Mittelwert der für alle Datenpunktpaare gebildeten Produkte der Abweichungen -CRITBINOM = KRITBINOM ## Gibt den kleinsten Wert zurück, für den die kumulierten Wahrscheinlichkeiten der Binomialverteilung kleiner oder gleich einer Grenzwahrscheinlichkeit sind -DEVSQ = SUMQUADABW ## Gibt die Summe der quadrierten Abweichungen der Datenpunkte von ihrem Stichprobenmittelwert zurück -EXPONDIST = EXPONVERT ## Gibt Wahrscheinlichkeiten einer exponential verteilten Zufallsvariablen zurück -FDIST = FVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer F-verteilten Zufallsvariablen zurück -FINV = FINV ## Gibt Quantile der F-Verteilung zurück -FISHER = FISHER ## Gibt die Fisher-Transformation zurück -FISHERINV = FISHERINV ## Gibt die Umkehrung der Fisher-Transformation zurück -FORECAST = PROGNOSE ## Gibt einen Wert zurück, der sich aus einem linearen Trend ergibt -FREQUENCY = HÄUFIGKEIT ## Gibt eine Häufigkeitsverteilung als vertikale Matrix zurück -FTEST = FTEST ## Gibt die Teststatistik eines F-Tests zurück -GAMMADIST = GAMMAVERT ## Gibt Wahrscheinlichkeiten einer gammaverteilten Zufallsvariablen zurück -GAMMAINV = GAMMAINV ## Gibt Quantile der Gammaverteilung zurück -GAMMALN = GAMMALN ## Gibt den natürlichen Logarithmus der Gammafunktion zurück, Γ(x) -GEOMEAN = GEOMITTEL ## Gibt das geometrische Mittel zurück -GROWTH = VARIATION ## Gibt Werte zurück, die sich aus einem exponentiellen Trend ergeben -HARMEAN = HARMITTEL ## Gibt das harmonische Mittel zurück -HYPGEOMDIST = HYPGEOMVERT ## Gibt Wahrscheinlichkeiten einer hypergeometrisch-verteilten Zufallsvariablen zurück -INTERCEPT = ACHSENABSCHNITT ## Gibt den Schnittpunkt der Regressionsgeraden zurück -KURT = KURT ## Gibt die Kurtosis (Exzess) einer Datengruppe zurück -LARGE = KGRÖSSTE ## Gibt den k-größten Wert einer Datengruppe zurück -LINEST = RGP ## Gibt die Parameter eines linearen Trends zurück -LOGEST = RKP ## Gibt die Parameter eines exponentiellen Trends zurück -LOGINV = LOGINV ## Gibt Quantile der Lognormalverteilung zurück -LOGNORMDIST = LOGNORMVERT ## Gibt Werte der Verteilungsfunktion einer lognormalverteilten Zufallsvariablen zurück -MAX = MAX ## Gibt den Maximalwert einer Liste mit Argumenten zurück -MAXA = MAXA ## Gibt den Maximalwert einer Liste mit Argumenten zurück, die Zahlen, Text und Wahrheitswerte enthalten -MEDIAN = MEDIAN ## Gibt den Median der angegebenen Zahlen zurück -MIN = MIN ## Gibt den Minimalwert einer Liste mit Argumenten zurück -MINA = MINA ## Gibt den kleinsten Wert einer Liste mit Argumenten zurück, die Zahlen, Text und Wahrheitswerte enthalten -MODE = MODALWERT ## Gibt den am häufigsten vorkommenden Wert in einer Datengruppe zurück -NEGBINOMDIST = NEGBINOMVERT ## Gibt Wahrscheinlichkeiten einer negativen, binominal verteilten Zufallsvariablen zurück -NORMDIST = NORMVERT ## Gibt Wahrscheinlichkeiten einer normal verteilten Zufallsvariablen zurück -NORMINV = NORMINV ## Gibt Quantile der Normalverteilung zurück -NORMSDIST = STANDNORMVERT ## Gibt Werte der Verteilungsfunktion einer standardnormalverteilten Zufallsvariablen zurück -NORMSINV = STANDNORMINV ## Gibt Quantile der Standardnormalverteilung zurück -PEARSON = PEARSON ## Gibt den Pearsonschen Korrelationskoeffizienten zurück -PERCENTILE = QUANTIL ## Gibt das Alpha-Quantil einer Gruppe von Daten zurück -PERCENTRANK = QUANTILSRANG ## Gibt den prozentualen Rang (Alpha) eines Werts in einer Datengruppe zurück -PERMUT = VARIATIONEN ## Gibt die Anzahl der Möglichkeiten zurück, um k Elemente aus einer Menge von n Elementen ohne Zurücklegen zu ziehen -POISSON = POISSON ## Gibt Wahrscheinlichkeiten einer poissonverteilten Zufallsvariablen zurück -PROB = WAHRSCHBEREICH ## Gibt die Wahrscheinlichkeit für ein von zwei Werten eingeschlossenes Intervall zurück -QUARTILE = QUARTILE ## Gibt die Quartile der Datengruppe zurück -RANK = RANG ## Gibt den Rang zurück, den eine Zahl innerhalb einer Liste von Zahlen einnimmt -RSQ = BESTIMMTHEITSMASS ## Gibt das Quadrat des Pearsonschen Korrelationskoeffizienten zurück -SKEW = SCHIEFE ## Gibt die Schiefe einer Verteilung zurück -SLOPE = STEIGUNG ## Gibt die Steigung der Regressionsgeraden zurück -SMALL = KKLEINSTE ## Gibt den k-kleinsten Wert einer Datengruppe zurück -STANDARDIZE = STANDARDISIERUNG ## Gibt den standardisierten Wert zurück -STDEV = STABW ## Schätzt die Standardabweichung ausgehend von einer Stichprobe -STDEVA = STABWA ## Schätzt die Standardabweichung ausgehend von einer Stichprobe, die Zahlen, Text und Wahrheitswerte enthält -STDEVP = STABWN ## Berechnet die Standardabweichung ausgehend von der Grundgesamtheit -STDEVPA = STABWNA ## Berechnet die Standardabweichung ausgehend von der Grundgesamtheit, die Zahlen, Text und Wahrheitswerte enthält -STEYX = STFEHLERYX ## Gibt den Standardfehler der geschätzten y-Werte für alle x-Werte der Regression zurück -TDIST = TVERT ## Gibt Werte der Verteilungsfunktion (1-Alpha) einer (Student) t-verteilten Zufallsvariablen zurück -TINV = TINV ## Gibt Quantile der t-Verteilung zurück -TREND = TREND ## Gibt Werte zurück, die sich aus einem linearen Trend ergeben -TRIMMEAN = GESTUTZTMITTEL ## Gibt den Mittelwert einer Datengruppe zurück, ohne die Randwerte zu berücksichtigen -TTEST = TTEST ## Gibt die Teststatistik eines Student'schen t-Tests zurück -VAR = VARIANZ ## Schätzt die Varianz ausgehend von einer Stichprobe -VARA = VARIANZA ## Schätzt die Varianz ausgehend von einer Stichprobe, die Zahlen, Text und Wahrheitswerte enthält -VARP = VARIANZEN ## Berechnet die Varianz ausgehend von der Grundgesamtheit -VARPA = VARIANZENA ## Berechnet die Varianz ausgehend von der Grundgesamtheit, die Zahlen, Text und Wahrheitswerte enthält -WEIBULL = WEIBULL ## Gibt Wahrscheinlichkeiten einer weibullverteilten Zufallsvariablen zurück -ZTEST = GTEST ## Gibt den einseitigen Wahrscheinlichkeitswert für einen Gausstest (Normalverteilung) zurück - - -## -## Text functions Textfunktionen -## -ASC = ASC ## Konvertiert DB-Text in einer Zeichenfolge (lateinische Buchstaben oder Katakana) in SB-Text -BAHTTEXT = BAHTTEXT ## Wandelt eine Zahl in Text im Währungsformat ß (Baht) um -CHAR = ZEICHEN ## Gibt das der Codezahl entsprechende Zeichen zurück -CLEAN = SÄUBERN ## Löscht alle nicht druckbaren Zeichen aus einem Text -CODE = CODE ## Gibt die Codezahl des ersten Zeichens in einem Text zurück -CONCATENATE = VERKETTEN ## Verknüpft mehrere Textelemente zu einem Textelement -DOLLAR = DM ## Wandelt eine Zahl in Text im Währungsformat € (Euro) um -EXACT = IDENTISCH ## Prüft, ob zwei Textwerte identisch sind -FIND = FINDEN ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird unterschieden) -FINDB = FINDENB ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird unterschieden) -FIXED = FEST ## Formatiert eine Zahl als Text mit einer festen Anzahl von Dezimalstellen -JIS = JIS ## Konvertiert SB-Text in einer Zeichenfolge (lateinische Buchstaben oder Katakana) in DB-Text -LEFT = LINKS ## Gibt die Zeichen ganz links in einem Textwert zurück -LEFTB = LINKSB ## Gibt die Zeichen ganz links in einem Textwert zurück -LEN = LÄNGE ## Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück -LENB = LÄNGEB ## Gibt die Anzahl der Zeichen in einer Zeichenfolge zurück -LOWER = KLEIN ## Wandelt Text in Kleinbuchstaben um -MID = TEIL ## Gibt eine bestimmte Anzahl Zeichen aus einer Zeichenfolge ab der von Ihnen angegebenen Stelle zurück -MIDB = TEILB ## Gibt eine bestimmte Anzahl Zeichen aus einer Zeichenfolge ab der von Ihnen angegebenen Stelle zurück -PHONETIC = PHONETIC ## Extrahiert die phonetischen (Furigana-)Zeichen aus einer Textzeichenfolge -PROPER = GROSS2 ## Wandelt den ersten Buchstaben aller Wörter eines Textwerts in Großbuchstaben um -REPLACE = ERSETZEN ## Ersetzt Zeichen in Text -REPLACEB = ERSETZENB ## Ersetzt Zeichen in Text -REPT = WIEDERHOLEN ## Wiederholt einen Text so oft wie angegeben -RIGHT = RECHTS ## Gibt die Zeichen ganz rechts in einem Textwert zurück -RIGHTB = RECHTSB ## Gibt die Zeichen ganz rechts in einem Textwert zurück -SEARCH = SUCHEN ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird nicht unterschieden) -SEARCHB = SUCHENB ## Sucht nach einem Textwert, der in einem anderen Textwert enthalten ist (Groß-/Kleinschreibung wird nicht unterschieden) -SUBSTITUTE = WECHSELN ## Ersetzt in einer Zeichenfolge neuen Text gegen alten -T = T ## Wandelt die zugehörigen Argumente in Text um -TEXT = TEXT ## Formatiert eine Zahl und wandelt sie in Text um -TRIM = GLÄTTEN ## Entfernt Leerzeichen aus Text -UPPER = GROSS ## Wandelt Text in Großbuchstaben um -VALUE = WERT ## Wandelt ein Textargument in eine Zahl um diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config deleted file mode 100644 index 532080b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config +++ /dev/null @@ -1,32 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -## -## (For future use) -## -currencySymbol = £ diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config deleted file mode 100644 index 96cfa69..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rather than € - - -## -## Excel Error Codes (For future use) -## -NULL = #¡NULO! -DIV0 = #¡DIV/0! -VALUE = #¡VALOR! -REF = #¡REF! -NAME = #¿NOMBRE? -NUM = #¡NÚM! -NA = #N/A diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions deleted file mode 100644 index 4876269..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Funciones de complementos y automatización -## -GETPIVOTDATA = IMPORTARDATOSDINAMICOS ## Devuelve los datos almacenados en un informe de tabla dinámica. - - -## -## Cube functions Funciones de cubo -## -CUBEKPIMEMBER = MIEMBROKPICUBO ## Devuelve un nombre, propiedad y medida de indicador de rendimiento clave (KPI) y muestra el nombre y la propiedad en la celda. Un KPI es una medida cuantificable, como los beneficios brutos mensuales o la facturación trimestral por empleado, que se usa para supervisar el rendimiento de una organización. -CUBEMEMBER = MIEMBROCUBO ## Devuelve un miembro o tupla en una jerarquía de cubo. Se usa para validar la existencia del miembro o la tupla en el cubo. -CUBEMEMBERPROPERTY = PROPIEDADMIEMBROCUBO ## Devuelve el valor de una propiedad de miembro del cubo Se usa para validar la existencia de un nombre de miembro en el cubo y para devolver la propiedad especificada para este miembro. -CUBERANKEDMEMBER = MIEMBRORANGOCUBO ## Devuelve el miembro n, o clasificado, de un conjunto. Se usa para devolver uno o más elementos de un conjunto, por ejemplo, el representante con mejores ventas o los diez mejores alumnos. -CUBESET = CONJUNTOCUBO ## Define un conjunto calculado de miembros o tuplas mediante el envío de una expresión de conjunto al cubo en el servidor, lo que crea el conjunto y, después, devuelve dicho conjunto a Microsoft Office Excel. -CUBESETCOUNT = RECUENTOCONJUNTOCUBO ## Devuelve el número de elementos de un conjunto. -CUBEVALUE = VALORCUBO ## Devuelve un valor agregado de un cubo. - - -## -## Database functions Funciones de base de datos -## -DAVERAGE = BDPROMEDIO ## Devuelve el promedio de las entradas seleccionadas en la base de datos. -DCOUNT = BDCONTAR ## Cuenta el número de celdas que contienen números en una base de datos. -DCOUNTA = BDCONTARA ## Cuenta el número de celdas no vacías en una base de datos. -DGET = BDEXTRAER ## Extrae de una base de datos un único registro que cumple los criterios especificados. -DMAX = BDMAX ## Devuelve el valor máximo de las entradas seleccionadas de la base de datos. -DMIN = BDMIN ## Devuelve el valor mínimo de las entradas seleccionadas de la base de datos. -DPRODUCT = BDPRODUCTO ## Multiplica los valores de un campo concreto de registros de una base de datos que cumplen los criterios especificados. -DSTDEV = BDDESVEST ## Calcula la desviación estándar a partir de una muestra de entradas seleccionadas en la base de datos. -DSTDEVP = BDDESVESTP ## Calcula la desviación estándar en función de la población total de las entradas seleccionadas de la base de datos. -DSUM = BDSUMA ## Suma los números de la columna de campo de los registros de la base de datos que cumplen los criterios. -DVAR = BDVAR ## Calcula la varianza a partir de una muestra de entradas seleccionadas de la base de datos. -DVARP = BDVARP ## Calcula la varianza a partir de la población total de entradas seleccionadas de la base de datos. - - -## -## Date and time functions Funciones de fecha y hora -## -DATE = FECHA ## Devuelve el número de serie correspondiente a una fecha determinada. -DATEVALUE = FECHANUMERO ## Convierte una fecha con formato de texto en un valor de número de serie. -DAY = DIA ## Convierte un número de serie en un valor de día del mes. -DAYS360 = DIAS360 ## Calcula el número de días entre dos fechas a partir de un año de 360 días. -EDATE = FECHA.MES ## Devuelve el número de serie de la fecha equivalente al número indicado de meses anteriores o posteriores a la fecha inicial. -EOMONTH = FIN.MES ## Devuelve el número de serie correspondiente al último día del mes anterior o posterior a un número de meses especificado. -HOUR = HORA ## Convierte un número de serie en un valor de hora. -MINUTE = MINUTO ## Convierte un número de serie en un valor de minuto. -MONTH = MES ## Convierte un número de serie en un valor de mes. -NETWORKDAYS = DIAS.LAB ## Devuelve el número de todos los días laborables existentes entre dos fechas. -NOW = AHORA ## Devuelve el número de serie correspondiente a la fecha y hora actuales. -SECOND = SEGUNDO ## Convierte un número de serie en un valor de segundo. -TIME = HORA ## Devuelve el número de serie correspondiente a una hora determinada. -TIMEVALUE = HORANUMERO ## Convierte una hora con formato de texto en un valor de número de serie. -TODAY = HOY ## Devuelve el número de serie correspondiente al día actual. -WEEKDAY = DIASEM ## Convierte un número de serie en un valor de día de la semana. -WEEKNUM = NUM.DE.SEMANA ## Convierte un número de serie en un número que representa el lugar numérico correspondiente a una semana de un año. -WORKDAY = DIA.LAB ## Devuelve el número de serie de la fecha que tiene lugar antes o después de un número determinado de días laborables. -YEAR = AÑO ## Convierte un número de serie en un valor de año. -YEARFRAC = FRAC.AÑO ## Devuelve la fracción de año que representa el número total de días existentes entre el valor de fecha_inicial y el de fecha_final. - - -## -## Engineering functions Funciones de ingeniería -## -BESSELI = BESSELI ## Devuelve la función Bessel In(x) modificada. -BESSELJ = BESSELJ ## Devuelve la función Bessel Jn(x). -BESSELK = BESSELK ## Devuelve la función Bessel Kn(x) modificada. -BESSELY = BESSELY ## Devuelve la función Bessel Yn(x). -BIN2DEC = BIN.A.DEC ## Convierte un número binario en decimal. -BIN2HEX = BIN.A.HEX ## Convierte un número binario en hexadecimal. -BIN2OCT = BIN.A.OCT ## Convierte un número binario en octal. -COMPLEX = COMPLEJO ## Convierte coeficientes reales e imaginarios en un número complejo. -CONVERT = CONVERTIR ## Convierte un número de un sistema de medida a otro. -DEC2BIN = DEC.A.BIN ## Convierte un número decimal en binario. -DEC2HEX = DEC.A.HEX ## Convierte un número decimal en hexadecimal. -DEC2OCT = DEC.A.OCT ## Convierte un número decimal en octal. -DELTA = DELTA ## Comprueba si dos valores son iguales. -ERF = FUN.ERROR ## Devuelve la función de error. -ERFC = FUN.ERROR.COMPL ## Devuelve la función de error complementario. -GESTEP = MAYOR.O.IGUAL ## Comprueba si un número es mayor que un valor de umbral. -HEX2BIN = HEX.A.BIN ## Convierte un número hexadecimal en binario. -HEX2DEC = HEX.A.DEC ## Convierte un número hexadecimal en decimal. -HEX2OCT = HEX.A.OCT ## Convierte un número hexadecimal en octal. -IMABS = IM.ABS ## Devuelve el valor absoluto (módulo) de un número complejo. -IMAGINARY = IMAGINARIO ## Devuelve el coeficiente imaginario de un número complejo. -IMARGUMENT = IM.ANGULO ## Devuelve el argumento theta, un ángulo expresado en radianes. -IMCONJUGATE = IM.CONJUGADA ## Devuelve la conjugada compleja de un número complejo. -IMCOS = IM.COS ## Devuelve el coseno de un número complejo. -IMDIV = IM.DIV ## Devuelve el cociente de dos números complejos. -IMEXP = IM.EXP ## Devuelve el valor exponencial de un número complejo. -IMLN = IM.LN ## Devuelve el logaritmo natural (neperiano) de un número complejo. -IMLOG10 = IM.LOG10 ## Devuelve el logaritmo en base 10 de un número complejo. -IMLOG2 = IM.LOG2 ## Devuelve el logaritmo en base 2 de un número complejo. -IMPOWER = IM.POT ## Devuelve un número complejo elevado a una potencia entera. -IMPRODUCT = IM.PRODUCT ## Devuelve el producto de números complejos. -IMREAL = IM.REAL ## Devuelve el coeficiente real de un número complejo. -IMSIN = IM.SENO ## Devuelve el seno de un número complejo. -IMSQRT = IM.RAIZ2 ## Devuelve la raíz cuadrada de un número complejo. -IMSUB = IM.SUSTR ## Devuelve la diferencia entre dos números complejos. -IMSUM = IM.SUM ## Devuelve la suma de números complejos. -OCT2BIN = OCT.A.BIN ## Convierte un número octal en binario. -OCT2DEC = OCT.A.DEC ## Convierte un número octal en decimal. -OCT2HEX = OCT.A.HEX ## Convierte un número octal en hexadecimal. - - -## -## Financial functions Funciones financieras -## -ACCRINT = INT.ACUM ## Devuelve el interés acumulado de un valor bursátil con pagos de interés periódicos. -ACCRINTM = INT.ACUM.V ## Devuelve el interés acumulado de un valor bursátil con pagos de interés al vencimiento. -AMORDEGRC = AMORTIZ.PROGRE ## Devuelve la amortización de cada período contable mediante el uso de un coeficiente de amortización. -AMORLINC = AMORTIZ.LIN ## Devuelve la amortización de cada uno de los períodos contables. -COUPDAYBS = CUPON.DIAS.L1 ## Devuelve el número de días desde el principio del período de un cupón hasta la fecha de liquidación. -COUPDAYS = CUPON.DIAS ## Devuelve el número de días del período (entre dos cupones) donde se encuentra la fecha de liquidación. -COUPDAYSNC = CUPON.DIAS.L2 ## Devuelve el número de días desde la fecha de liquidación hasta la fecha del próximo cupón. -COUPNCD = CUPON.FECHA.L2 ## Devuelve la fecha del próximo cupón después de la fecha de liquidación. -COUPNUM = CUPON.NUM ## Devuelve el número de pagos de cupón entre la fecha de liquidación y la fecha de vencimiento. -COUPPCD = CUPON.FECHA.L1 ## Devuelve la fecha de cupón anterior a la fecha de liquidación. -CUMIPMT = PAGO.INT.ENTRE ## Devuelve el interés acumulado pagado entre dos períodos. -CUMPRINC = PAGO.PRINC.ENTRE ## Devuelve el capital acumulado pagado de un préstamo entre dos períodos. -DB = DB ## Devuelve la amortización de un bien durante un período específico a través del método de amortización de saldo fijo. -DDB = DDB ## Devuelve la amortización de un bien durante un período específico a través del método de amortización por doble disminución de saldo u otro método que se especifique. -DISC = TASA.DESC ## Devuelve la tasa de descuento de un valor bursátil. -DOLLARDE = MONEDA.DEC ## Convierte una cotización de un valor bursátil expresada en forma fraccionaria en una cotización de un valor bursátil expresada en forma decimal. -DOLLARFR = MONEDA.FRAC ## Convierte una cotización de un valor bursátil expresada en forma decimal en una cotización de un valor bursátil expresada en forma fraccionaria. -DURATION = DURACION ## Devuelve la duración anual de un valor bursátil con pagos de interés periódico. -EFFECT = INT.EFECTIVO ## Devuelve la tasa de interés anual efectiva. -FV = VF ## Devuelve el valor futuro de una inversión. -FVSCHEDULE = VF.PLAN ## Devuelve el valor futuro de un capital inicial después de aplicar una serie de tasas de interés compuesto. -INTRATE = TASA.INT ## Devuelve la tasa de interés para la inversión total de un valor bursátil. -IPMT = PAGOINT ## Devuelve el pago de intereses de una inversión durante un período determinado. -IRR = TIR ## Devuelve la tasa interna de retorno para una serie de flujos de efectivo periódicos. -ISPMT = INT.PAGO.DIR ## Calcula el interés pagado durante un período específico de una inversión. -MDURATION = DURACION.MODIF ## Devuelve la duración de Macauley modificada de un valor bursátil con un valor nominal supuesto de 100 $. -MIRR = TIRM ## Devuelve la tasa interna de retorno donde se financian flujos de efectivo positivos y negativos a tasas diferentes. -NOMINAL = TASA.NOMINAL ## Devuelve la tasa nominal de interés anual. -NPER = NPER ## Devuelve el número de períodos de una inversión. -NPV = VNA ## Devuelve el valor neto actual de una inversión en función de una serie de flujos periódicos de efectivo y una tasa de descuento. -ODDFPRICE = PRECIO.PER.IRREGULAR.1 ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con un primer período impar. -ODDFYIELD = RENDTO.PER.IRREGULAR.1 ## Devuelve el rendimiento de un valor bursátil con un primer período impar. -ODDLPRICE = PRECIO.PER.IRREGULAR.2 ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con un último período impar. -ODDLYIELD = RENDTO.PER.IRREGULAR.2 ## Devuelve el rendimiento de un valor bursátil con un último período impar. -PMT = PAGO ## Devuelve el pago periódico de una anualidad. -PPMT = PAGOPRIN ## Devuelve el pago de capital de una inversión durante un período determinado. -PRICE = PRECIO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil que paga una tasa de interés periódico. -PRICEDISC = PRECIO.DESCUENTO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil con descuento. -PRICEMAT = PRECIO.VENCIMIENTO ## Devuelve el precio por un valor nominal de 100 $ de un valor bursátil que paga interés a su vencimiento. -PV = VALACT ## Devuelve el valor actual de una inversión. -RATE = TASA ## Devuelve la tasa de interés por período de una anualidad. -RECEIVED = CANTIDAD.RECIBIDA ## Devuelve la cantidad recibida al vencimiento de un valor bursátil completamente invertido. -SLN = SLN ## Devuelve la amortización por método directo de un bien en un período dado. -SYD = SYD ## Devuelve la amortización por suma de dígitos de los años de un bien durante un período especificado. -TBILLEQ = LETRA.DE.TES.EQV.A.BONO ## Devuelve el rendimiento de un bono equivalente a una letra del Tesoro (de EE.UU.) -TBILLPRICE = LETRA.DE.TES.PRECIO ## Devuelve el precio por un valor nominal de 100 $ de una letra del Tesoro (de EE.UU.) -TBILLYIELD = LETRA.DE.TES.RENDTO ## Devuelve el rendimiento de una letra del Tesoro (de EE.UU.) -VDB = DVS ## Devuelve la amortización de un bien durante un período específico o parcial a través del método de cálculo del saldo en disminución. -XIRR = TIR.NO.PER ## Devuelve la tasa interna de retorno para un flujo de efectivo que no es necesariamente periódico. -XNPV = VNA.NO.PER ## Devuelve el valor neto actual para un flujo de efectivo que no es necesariamente periódico. -YIELD = RENDTO ## Devuelve el rendimiento de un valor bursátil que paga intereses periódicos. -YIELDDISC = RENDTO.DESC ## Devuelve el rendimiento anual de un valor bursátil con descuento; por ejemplo, una letra del Tesoro (de EE.UU.) -YIELDMAT = RENDTO.VENCTO ## Devuelve el rendimiento anual de un valor bursátil que paga intereses al vencimiento. - - -## -## Information functions Funciones de información -## -CELL = CELDA ## Devuelve información acerca del formato, la ubicación o el contenido de una celda. -ERROR.TYPE = TIPO.DE.ERROR ## Devuelve un número que corresponde a un tipo de error. -INFO = INFO ## Devuelve información acerca del entorno operativo en uso. -ISBLANK = ESBLANCO ## Devuelve VERDADERO si el valor está en blanco. -ISERR = ESERR ## Devuelve VERDADERO si el valor es cualquier valor de error excepto #N/A. -ISERROR = ESERROR ## Devuelve VERDADERO si el valor es cualquier valor de error. -ISEVEN = ES.PAR ## Devuelve VERDADERO si el número es par. -ISLOGICAL = ESLOGICO ## Devuelve VERDADERO si el valor es un valor lógico. -ISNA = ESNOD ## Devuelve VERDADERO si el valor es el valor de error #N/A. -ISNONTEXT = ESNOTEXTO ## Devuelve VERDADERO si el valor no es texto. -ISNUMBER = ESNUMERO ## Devuelve VERDADERO si el valor es un número. -ISODD = ES.IMPAR ## Devuelve VERDADERO si el número es impar. -ISREF = ESREF ## Devuelve VERDADERO si el valor es una referencia. -ISTEXT = ESTEXTO ## Devuelve VERDADERO si el valor es texto. -N = N ## Devuelve un valor convertido en un número. -NA = ND ## Devuelve el valor de error #N/A. -TYPE = TIPO ## Devuelve un número que indica el tipo de datos de un valor. - - -## -## Logical functions Funciones lógicas -## -AND = Y ## Devuelve VERDADERO si todos sus argumentos son VERDADERO. -FALSE = FALSO ## Devuelve el valor lógico FALSO. -IF = SI ## Especifica una prueba lógica que realizar. -IFERROR = SI.ERROR ## Devuelve un valor que se especifica si una fórmula lo evalúa como un error; de lo contrario, devuelve el resultado de la fórmula. -NOT = NO ## Invierte el valor lógico del argumento. -OR = O ## Devuelve VERDADERO si cualquier argumento es VERDADERO. -TRUE = VERDADERO ## Devuelve el valor lógico VERDADERO. - - -## -## Lookup and reference functions Funciones de búsqueda y referencia -## -ADDRESS = DIRECCION ## Devuelve una referencia como texto a una sola celda de una hoja de cálculo. -AREAS = AREAS ## Devuelve el número de áreas de una referencia. -CHOOSE = ELEGIR ## Elige un valor de una lista de valores. -COLUMN = COLUMNA ## Devuelve el número de columna de una referencia. -COLUMNS = COLUMNAS ## Devuelve el número de columnas de una referencia. -HLOOKUP = BUSCARH ## Busca en la fila superior de una matriz y devuelve el valor de la celda indicada. -HYPERLINK = HIPERVINCULO ## Crea un acceso directo o un salto que abre un documento almacenado en un servidor de red, en una intranet o en Internet. -INDEX = INDICE ## Usa un índice para elegir un valor de una referencia o matriz. -INDIRECT = INDIRECTO ## Devuelve una referencia indicada por un valor de texto. -LOOKUP = BUSCAR ## Busca valores de un vector o una matriz. -MATCH = COINCIDIR ## Busca valores de una referencia o matriz. -OFFSET = DESREF ## Devuelve un desplazamiento de referencia respecto a una referencia dada. -ROW = FILA ## Devuelve el número de fila de una referencia. -ROWS = FILAS ## Devuelve el número de filas de una referencia. -RTD = RDTR ## Recupera datos en tiempo real desde un programa compatible con la automatización COM (automatización: modo de trabajar con los objetos de una aplicación desde otra aplicación o herramienta de entorno. La automatización, antes denominada automatización OLE, es un estándar de la industria y una función del Modelo de objetos componentes (COM).). -TRANSPOSE = TRANSPONER ## Devuelve la transposición de una matriz. -VLOOKUP = BUSCARV ## Busca en la primera columna de una matriz y se mueve en horizontal por la fila para devolver el valor de una celda. - - -## -## Math and trigonometry functions Funciones matemáticas y trigonométricas -## -ABS = ABS ## Devuelve el valor absoluto de un número. -ACOS = ACOS ## Devuelve el arcocoseno de un número. -ACOSH = ACOSH ## Devuelve el coseno hiperbólico inverso de un número. -ASIN = ASENO ## Devuelve el arcoseno de un número. -ASINH = ASENOH ## Devuelve el seno hiperbólico inverso de un número. -ATAN = ATAN ## Devuelve la arcotangente de un número. -ATAN2 = ATAN2 ## Devuelve la arcotangente de las coordenadas "x" e "y". -ATANH = ATANH ## Devuelve la tangente hiperbólica inversa de un número. -CEILING = MULTIPLO.SUPERIOR ## Redondea un número al entero más próximo o al múltiplo significativo más cercano. -COMBIN = COMBINAT ## Devuelve el número de combinaciones para un número determinado de objetos. -COS = COS ## Devuelve el coseno de un número. -COSH = COSH ## Devuelve el coseno hiperbólico de un número. -DEGREES = GRADOS ## Convierte radianes en grados. -EVEN = REDONDEA.PAR ## Redondea un número hasta el entero par más próximo. -EXP = EXP ## Devuelve e elevado a la potencia de un número dado. -FACT = FACT ## Devuelve el factorial de un número. -FACTDOUBLE = FACT.DOBLE ## Devuelve el factorial doble de un número. -FLOOR = MULTIPLO.INFERIOR ## Redondea un número hacia abajo, en dirección hacia cero. -GCD = M.C.D ## Devuelve el máximo común divisor. -INT = ENTERO ## Redondea un número hacia abajo hasta el entero más próximo. -LCM = M.C.M ## Devuelve el mínimo común múltiplo. -LN = LN ## Devuelve el logaritmo natural (neperiano) de un número. -LOG = LOG ## Devuelve el logaritmo de un número en una base especificada. -LOG10 = LOG10 ## Devuelve el logaritmo en base 10 de un número. -MDETERM = MDETERM ## Devuelve la determinante matricial de una matriz. -MINVERSE = MINVERSA ## Devuelve la matriz inversa de una matriz. -MMULT = MMULT ## Devuelve el producto de matriz de dos matrices. -MOD = RESIDUO ## Devuelve el resto de la división. -MROUND = REDOND.MULT ## Devuelve un número redondeado al múltiplo deseado. -MULTINOMIAL = MULTINOMIAL ## Devuelve el polinomio de un conjunto de números. -ODD = REDONDEA.IMPAR ## Redondea un número hacia arriba hasta el entero impar más próximo. -PI = PI ## Devuelve el valor de pi. -POWER = POTENCIA ## Devuelve el resultado de elevar un número a una potencia. -PRODUCT = PRODUCTO ## Multiplica sus argumentos. -QUOTIENT = COCIENTE ## Devuelve la parte entera de una división. -RADIANS = RADIANES ## Convierte grados en radianes. -RAND = ALEATORIO ## Devuelve un número aleatorio entre 0 y 1. -RANDBETWEEN = ALEATORIO.ENTRE ## Devuelve un número aleatorio entre los números que especifique. -ROMAN = NUMERO.ROMANO ## Convierte un número arábigo en número romano, con formato de texto. -ROUND = REDONDEAR ## Redondea un número al número de decimales especificado. -ROUNDDOWN = REDONDEAR.MENOS ## Redondea un número hacia abajo, en dirección hacia cero. -ROUNDUP = REDONDEAR.MAS ## Redondea un número hacia arriba, en dirección contraria a cero. -SERIESSUM = SUMA.SERIES ## Devuelve la suma de una serie de potencias en función de la fórmula. -SIGN = SIGNO ## Devuelve el signo de un número. -SIN = SENO ## Devuelve el seno de un ángulo determinado. -SINH = SENOH ## Devuelve el seno hiperbólico de un número. -SQRT = RAIZ ## Devuelve la raíz cuadrada positiva de un número. -SQRTPI = RAIZ2PI ## Devuelve la raíz cuadrada de un número multiplicado por PI (número * pi). -SUBTOTAL = SUBTOTALES ## Devuelve un subtotal en una lista o base de datos. -SUM = SUMA ## Suma sus argumentos. -SUMIF = SUMAR.SI ## Suma las celdas especificadas que cumplen unos criterios determinados. -SUMIFS = SUMAR.SI.CONJUNTO ## Suma las celdas de un rango que cumplen varios criterios. -SUMPRODUCT = SUMAPRODUCTO ## Devuelve la suma de los productos de los correspondientes componentes de matriz. -SUMSQ = SUMA.CUADRADOS ## Devuelve la suma de los cuadrados de los argumentos. -SUMX2MY2 = SUMAX2MENOSY2 ## Devuelve la suma de la diferencia de los cuadrados de los valores correspondientes de dos matrices. -SUMX2PY2 = SUMAX2MASY2 ## Devuelve la suma de la suma de los cuadrados de los valores correspondientes de dos matrices. -SUMXMY2 = SUMAXMENOSY2 ## Devuelve la suma de los cuadrados de las diferencias de los valores correspondientes de dos matrices. -TAN = TAN ## Devuelve la tangente de un número. -TANH = TANH ## Devuelve la tangente hiperbólica de un número. -TRUNC = TRUNCAR ## Trunca un número a un entero. - - -## -## Statistical functions Funciones estadísticas -## -AVEDEV = DESVPROM ## Devuelve el promedio de las desviaciones absolutas de la media de los puntos de datos. -AVERAGE = PROMEDIO ## Devuelve el promedio de sus argumentos. -AVERAGEA = PROMEDIOA ## Devuelve el promedio de sus argumentos, incluidos números, texto y valores lógicos. -AVERAGEIF = PROMEDIO.SI ## Devuelve el promedio (media aritmética) de todas las celdas de un rango que cumplen unos criterios determinados. -AVERAGEIFS = PROMEDIO.SI.CONJUNTO ## Devuelve el promedio (media aritmética) de todas las celdas que cumplen múltiples criterios. -BETADIST = DISTR.BETA ## Devuelve la función de distribución beta acumulativa. -BETAINV = DISTR.BETA.INV ## Devuelve la función inversa de la función de distribución acumulativa de una distribución beta especificada. -BINOMDIST = DISTR.BINOM ## Devuelve la probabilidad de una variable aleatoria discreta siguiendo una distribución binomial. -CHIDIST = DISTR.CHI ## Devuelve la probabilidad de una variable aleatoria continua siguiendo una distribución chi cuadrado de una sola cola. -CHIINV = PRUEBA.CHI.INV ## Devuelve la función inversa de la probabilidad de una variable aleatoria continua siguiendo una distribución chi cuadrado de una sola cola. -CHITEST = PRUEBA.CHI ## Devuelve la prueba de independencia. -CONFIDENCE = INTERVALO.CONFIANZA ## Devuelve el intervalo de confianza de la media de una población. -CORREL = COEF.DE.CORREL ## Devuelve el coeficiente de correlación entre dos conjuntos de datos. -COUNT = CONTAR ## Cuenta cuántos números hay en la lista de argumentos. -COUNTA = CONTARA ## Cuenta cuántos valores hay en la lista de argumentos. -COUNTBLANK = CONTAR.BLANCO ## Cuenta el número de celdas en blanco de un rango. -COUNTIF = CONTAR.SI ## Cuenta el número de celdas, dentro del rango, que cumplen el criterio especificado. -COUNTIFS = CONTAR.SI.CONJUNTO ## Cuenta el número de celdas, dentro del rango, que cumplen varios criterios. -COVAR = COVAR ## Devuelve la covarianza, que es el promedio de los productos de las desviaciones para cada pareja de puntos de datos. -CRITBINOM = BINOM.CRIT ## Devuelve el menor valor cuya distribución binomial acumulativa es menor o igual a un valor de criterio. -DEVSQ = DESVIA2 ## Devuelve la suma de los cuadrados de las desviaciones. -EXPONDIST = DISTR.EXP ## Devuelve la distribución exponencial. -FDIST = DISTR.F ## Devuelve la distribución de probabilidad F. -FINV = DISTR.F.INV ## Devuelve la función inversa de la distribución de probabilidad F. -FISHER = FISHER ## Devuelve la transformación Fisher. -FISHERINV = PRUEBA.FISHER.INV ## Devuelve la función inversa de la transformación Fisher. -FORECAST = PRONOSTICO ## Devuelve un valor en una tendencia lineal. -FREQUENCY = FRECUENCIA ## Devuelve una distribución de frecuencia como una matriz vertical. -FTEST = PRUEBA.F ## Devuelve el resultado de una prueba F. -GAMMADIST = DISTR.GAMMA ## Devuelve la distribución gamma. -GAMMAINV = DISTR.GAMMA.INV ## Devuelve la función inversa de la distribución gamma acumulativa. -GAMMALN = GAMMA.LN ## Devuelve el logaritmo natural de la función gamma, G(x). -GEOMEAN = MEDIA.GEOM ## Devuelve la media geométrica. -GROWTH = CRECIMIENTO ## Devuelve valores en una tendencia exponencial. -HARMEAN = MEDIA.ARMO ## Devuelve la media armónica. -HYPGEOMDIST = DISTR.HIPERGEOM ## Devuelve la distribución hipergeométrica. -INTERCEPT = INTERSECCION.EJE ## Devuelve la intersección de la línea de regresión lineal. -KURT = CURTOSIS ## Devuelve la curtosis de un conjunto de datos. -LARGE = K.ESIMO.MAYOR ## Devuelve el k-ésimo mayor valor de un conjunto de datos. -LINEST = ESTIMACION.LINEAL ## Devuelve los parámetros de una tendencia lineal. -LOGEST = ESTIMACION.LOGARITMICA ## Devuelve los parámetros de una tendencia exponencial. -LOGINV = DISTR.LOG.INV ## Devuelve la función inversa de la distribución logarítmico-normal. -LOGNORMDIST = DISTR.LOG.NORM ## Devuelve la distribución logarítmico-normal acumulativa. -MAX = MAX ## Devuelve el valor máximo de una lista de argumentos. -MAXA = MAXA ## Devuelve el valor máximo de una lista de argumentos, incluidos números, texto y valores lógicos. -MEDIAN = MEDIANA ## Devuelve la mediana de los números dados. -MIN = MIN ## Devuelve el valor mínimo de una lista de argumentos. -MINA = MINA ## Devuelve el valor mínimo de una lista de argumentos, incluidos números, texto y valores lógicos. -MODE = MODA ## Devuelve el valor más común de un conjunto de datos. -NEGBINOMDIST = NEGBINOMDIST ## Devuelve la distribución binomial negativa. -NORMDIST = DISTR.NORM ## Devuelve la distribución normal acumulativa. -NORMINV = DISTR.NORM.INV ## Devuelve la función inversa de la distribución normal acumulativa. -NORMSDIST = DISTR.NORM.ESTAND ## Devuelve la distribución normal estándar acumulativa. -NORMSINV = DISTR.NORM.ESTAND.INV ## Devuelve la función inversa de la distribución normal estándar acumulativa. -PEARSON = PEARSON ## Devuelve el coeficiente de momento de correlación de producto Pearson. -PERCENTILE = PERCENTIL ## Devuelve el k-ésimo percentil de los valores de un rango. -PERCENTRANK = RANGO.PERCENTIL ## Devuelve el rango porcentual de un valor de un conjunto de datos. -PERMUT = PERMUTACIONES ## Devuelve el número de permutaciones de un número determinado de objetos. -POISSON = POISSON ## Devuelve la distribución de Poisson. -PROB = PROBABILIDAD ## Devuelve la probabilidad de que los valores de un rango se encuentren entre dos límites. -QUARTILE = CUARTIL ## Devuelve el cuartil de un conjunto de datos. -RANK = JERARQUIA ## Devuelve la jerarquía de un número en una lista de números. -RSQ = COEFICIENTE.R2 ## Devuelve el cuadrado del coeficiente de momento de correlación de producto Pearson. -SKEW = COEFICIENTE.ASIMETRIA ## Devuelve la asimetría de una distribución. -SLOPE = PENDIENTE ## Devuelve la pendiente de la línea de regresión lineal. -SMALL = K.ESIMO.MENOR ## Devuelve el k-ésimo menor valor de un conjunto de datos. -STANDARDIZE = NORMALIZACION ## Devuelve un valor normalizado. -STDEV = DESVEST ## Calcula la desviación estándar a partir de una muestra. -STDEVA = DESVESTA ## Calcula la desviación estándar a partir de una muestra, incluidos números, texto y valores lógicos. -STDEVP = DESVESTP ## Calcula la desviación estándar en función de toda la población. -STDEVPA = DESVESTPA ## Calcula la desviación estándar en función de toda la población, incluidos números, texto y valores lógicos. -STEYX = ERROR.TIPICO.XY ## Devuelve el error estándar del valor de "y" previsto para cada "x" de la regresión. -TDIST = DISTR.T ## Devuelve la distribución de t de Student. -TINV = DISTR.T.INV ## Devuelve la función inversa de la distribución de t de Student. -TREND = TENDENCIA ## Devuelve valores en una tendencia lineal. -TRIMMEAN = MEDIA.ACOTADA ## Devuelve la media del interior de un conjunto de datos. -TTEST = PRUEBA.T ## Devuelve la probabilidad asociada a una prueba t de Student. -VAR = VAR ## Calcula la varianza en función de una muestra. -VARA = VARA ## Calcula la varianza en función de una muestra, incluidos números, texto y valores lógicos. -VARP = VARP ## Calcula la varianza en función de toda la población. -VARPA = VARPA ## Calcula la varianza en función de toda la población, incluidos números, texto y valores lógicos. -WEIBULL = DIST.WEIBULL ## Devuelve la distribución de Weibull. -ZTEST = PRUEBA.Z ## Devuelve el valor de una probabilidad de una cola de una prueba z. - - -## -## Text functions Funciones de texto -## -ASC = ASC ## Convierte las letras inglesas o katakana de ancho completo (de dos bytes) dentro de una cadena de caracteres en caracteres de ancho medio (de un byte). -BAHTTEXT = TEXTOBAHT ## Convierte un número en texto, con el formato de moneda ß (Baht). -CHAR = CARACTER ## Devuelve el carácter especificado por el número de código. -CLEAN = LIMPIAR ## Quita del texto todos los caracteres no imprimibles. -CODE = CODIGO ## Devuelve un código numérico del primer carácter de una cadena de texto. -CONCATENATE = CONCATENAR ## Concatena varios elementos de texto en uno solo. -DOLLAR = MONEDA ## Convierte un número en texto, con el formato de moneda $ (dólar). -EXACT = IGUAL ## Comprueba si dos valores de texto son idénticos. -FIND = ENCONTRAR ## Busca un valor de texto dentro de otro (distingue mayúsculas de minúsculas). -FINDB = ENCONTRARB ## Busca un valor de texto dentro de otro (distingue mayúsculas de minúsculas). -FIXED = DECIMAL ## Da formato a un número como texto con un número fijo de decimales. -JIS = JIS ## Convierte las letras inglesas o katakana de ancho medio (de un byte) dentro de una cadena de caracteres en caracteres de ancho completo (de dos bytes). -LEFT = IZQUIERDA ## Devuelve los caracteres del lado izquierdo de un valor de texto. -LEFTB = IZQUIERDAB ## Devuelve los caracteres del lado izquierdo de un valor de texto. -LEN = LARGO ## Devuelve el número de caracteres de una cadena de texto. -LENB = LARGOB ## Devuelve el número de caracteres de una cadena de texto. -LOWER = MINUSC ## Pone el texto en minúsculas. -MID = EXTRAE ## Devuelve un número específico de caracteres de una cadena de texto que comienza en la posición que se especifique. -MIDB = EXTRAEB ## Devuelve un número específico de caracteres de una cadena de texto que comienza en la posición que se especifique. -PHONETIC = FONETICO ## Extrae los caracteres fonéticos (furigana) de una cadena de texto. -PROPER = NOMPROPIO ## Pone en mayúscula la primera letra de cada palabra de un valor de texto. -REPLACE = REEMPLAZAR ## Reemplaza caracteres de texto. -REPLACEB = REEMPLAZARB ## Reemplaza caracteres de texto. -REPT = REPETIR ## Repite el texto un número determinado de veces. -RIGHT = DERECHA ## Devuelve los caracteres del lado derecho de un valor de texto. -RIGHTB = DERECHAB ## Devuelve los caracteres del lado derecho de un valor de texto. -SEARCH = HALLAR ## Busca un valor de texto dentro de otro (no distingue mayúsculas de minúsculas). -SEARCHB = HALLARB ## Busca un valor de texto dentro de otro (no distingue mayúsculas de minúsculas). -SUBSTITUTE = SUSTITUIR ## Sustituye texto nuevo por texto antiguo en una cadena de texto. -T = T ## Convierte sus argumentos a texto. -TEXT = TEXTO ## Da formato a un número y lo convierte en texto. -TRIM = ESPACIOS ## Quita los espacios del texto. -UPPER = MAYUSC ## Pone el texto en mayúsculas. -VALUE = VALOR ## Convierte un argumento de texto en un número. diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config deleted file mode 100644 index 498cf4c..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = $ # Symbol not known, should it be a € (Euro)? - - -## -## Excel Error Codes (For future use) -## -NULL = #TYHJÄ! -DIV0 = #JAKO/0! -VALUE = #ARVO! -REF = #VIITTAUS! -NAME = #NIMI? -NUM = #LUKU! -NA = #PUUTTUU diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions deleted file mode 100644 index 6a7c2b3..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Apuohjelma- ja automaatiofunktiot -## -GETPIVOTDATA = NOUDA.PIVOT.TIEDOT ## Palauttaa pivot-taulukkoraporttiin tallennettuja tietoja. - - -## -## Cube functions Kuutiofunktiot -## -CUBEKPIMEMBER = KUUTIOKPIJÄSEN ## Palauttaa suorituskykyilmaisimen (KPI) nimen, ominaisuuden sekä mitan ja näyttää nimen sekä ominaisuuden solussa. KPI on mitattavissa oleva suure, kuten kuukauden bruttotuotto tai vuosineljänneksen työntekijäkohtainen liikevaihto, joiden avulla tarkkaillaan organisaation suorituskykyä. -CUBEMEMBER = KUUTIONJÄSEN ## Palauttaa kuutiohierarkian jäsenen tai monikon. Tällä funktiolla voit tarkistaa, että jäsen tai monikko on olemassa kuutiossa. -CUBEMEMBERPROPERTY = KUUTIONJÄSENENOMINAISUUS ## Palauttaa kuution jäsenominaisuuden arvon. Tällä funktiolla voit tarkistaa, että nimi on olemassa kuutiossa, ja palauttaa tämän jäsenen määritetyn ominaisuuden. -CUBERANKEDMEMBER = KUUTIONLUOKITELTUJÄSEN ## Palauttaa joukon n:nnen jäsenen. Tällä funktiolla voit palauttaa joukosta elementtejä, kuten parhaan myyjän tai 10 parasta opiskelijaa. -CUBESET = KUUTIOJOUKKO ## Määrittää lasketun jäsen- tai monikkojoukon lähettämällä joukon lausekkeita palvelimessa olevalle kuutiolle. Palvelin luo joukon ja palauttaa sen Microsoft Office Excelille. -CUBESETCOUNT = KUUTIOJOUKKOJENMÄÄRÄ ## Palauttaa joukon kohteiden määrän. -CUBEVALUE = KUUTIONARVO ## Palauttaa koostetun arvon kuutiosta. - - -## -## Database functions Tietokantafunktiot -## -DAVERAGE = TKESKIARVO ## Palauttaa valittujen tietokantamerkintöjen keskiarvon. -DCOUNT = TLASKE ## Laskee tietokannan lukuja sisältävien solujen määrän. -DCOUNTA = TLASKEA ## Laskee tietokannan tietoja sisältävien solujen määrän. -DGET = TNOUDA ## Hakee määritettyjä ehtoja vastaavan tietueen tietokannasta. -DMAX = TMAKS ## Palauttaa suurimman arvon tietokannasta valittujen arvojen joukosta. -DMIN = TMIN ## Palauttaa pienimmän arvon tietokannasta valittujen arvojen joukosta. -DPRODUCT = TTULO ## Kertoo määritetyn ehdon täyttävien tietokannan tietueiden tietyssä kentässä olevat arvot. -DSTDEV = TKESKIHAJONTA ## Laskee keskihajonnan tietokannasta valituista arvoista muodostuvan otoksen perusteella. -DSTDEVP = TKESKIHAJONTAP ## Laskee keskihajonnan tietokannasta valittujen arvojen koko populaation perusteella. -DSUM = TSUMMA ## Lisää luvut määritetyn ehdon täyttävien tietokannan tietueiden kenttäsarakkeeseen. -DVAR = TVARIANSSI ## Laskee varianssin tietokannasta valittujen arvojen otoksen perusteella. -DVARP = TVARIANSSIP ## Laskee varianssin tietokannasta valittujen arvojen koko populaation perusteella. - - -## -## Date and time functions Päivämäärä- ja aikafunktiot -## -DATE = PÄIVÄYS ## Palauttaa annetun päivämäärän järjestysluvun. -DATEVALUE = PÄIVÄYSARVO ## Muuntaa tekstimuodossa olevan päivämäärän järjestysluvuksi. -DAY = PÄIVÄ ## Muuntaa järjestysluvun kuukauden päiväksi. -DAYS360 = PÄIVÄT360 ## Laskee kahden päivämäärän välisten päivien määrän käyttäen perustana 360-päiväistä vuotta. -EDATE = PÄIVÄ.KUUKAUSI ## Palauttaa järjestyslukuna päivämäärän, joka poikkeaa aloituspäivän päivämäärästä annetun kuukausimäärän verran joko eteen- tai taaksepäin. -EOMONTH = KUUKAUSI.LOPPU ## Palauttaa järjestyslukuna sen kuukauden viimeisen päivämäärän, joka poikkeaa annetun kuukausimäärän verran eteen- tai taaksepäin. -HOUR = TUNNIT ## Muuntaa järjestysluvun tunneiksi. -MINUTE = MINUUTIT ## Muuntaa järjestysluvun minuuteiksi. -MONTH = KUUKAUSI ## Muuntaa järjestysluvun kuukausiksi. -NETWORKDAYS = TYÖPÄIVÄT ## Palauttaa kahden päivämäärän välissä olevien täysien työpäivien määrän. -NOW = NYT ## Palauttaa kuluvan päivämäärän ja ajan järjestysnumeron. -SECOND = SEKUNNIT ## Muuntaa järjestysluvun sekunneiksi. -TIME = AIKA ## Palauttaa annetun kellonajan järjestysluvun. -TIMEVALUE = AIKA_ARVO ## Muuntaa tekstimuodossa olevan kellonajan järjestysluvuksi. -TODAY = TÄMÄ.PÄIVÄ ## Palauttaa kuluvan päivän päivämäärän järjestysluvun. -WEEKDAY = VIIKONPÄIVÄ ## Muuntaa järjestysluvun viikonpäiväksi. -WEEKNUM = VIIKKO.NRO ## Muuntaa järjestysluvun luvuksi, joka ilmaisee viikon järjestysluvun vuoden alusta laskettuna. -WORKDAY = TYÖPÄIVÄ ## Palauttaa järjestysluvun päivämäärälle, joka sijaitsee annettujen työpäivien verran eteen tai taaksepäin. -YEAR = VUOSI ## Muuntaa järjestysluvun vuosiksi. -YEARFRAC = VUOSI.OSA ## Palauttaa määritettyjen päivämäärien (aloituspäivä ja lopetuspäivä) välisen osan vuodesta. - - -## -## Engineering functions Tekniset funktiot -## -BESSELI = BESSELI ## Palauttaa muunnetun Bessel-funktion In(x). -BESSELJ = BESSELJ ## Palauttaa Bessel-funktion Jn(x). -BESSELK = BESSELK ## Palauttaa muunnetun Bessel-funktion Kn(x). -BESSELY = BESSELY ## Palauttaa Bessel-funktion Yn(x). -BIN2DEC = BINDES ## Muuntaa binaariluvun desimaaliluvuksi. -BIN2HEX = BINHEKSA ## Muuntaa binaariluvun heksadesimaaliluvuksi. -BIN2OCT = BINOKT ## Muuntaa binaariluvun oktaaliluvuksi. -COMPLEX = KOMPLEKSI ## Muuntaa reaali- ja imaginaariosien kertoimet kompleksiluvuksi. -CONVERT = MUUNNA ## Muuntaa luvun toisen mittajärjestelmän mukaiseksi. -DEC2BIN = DESBIN ## Muuntaa desimaaliluvun binaariluvuksi. -DEC2HEX = DESHEKSA ## Muuntaa kymmenjärjestelmän luvun heksadesimaaliluvuksi. -DEC2OCT = DESOKT ## Muuntaa kymmenjärjestelmän luvun oktaaliluvuksi. -DELTA = SAMA.ARVO ## Tarkistaa, ovatko kaksi arvoa yhtä suuria. -ERF = VIRHEFUNKTIO ## Palauttaa virhefunktion. -ERFC = VIRHEFUNKTIO.KOMPLEMENTTI ## Palauttaa komplementtivirhefunktion. -GESTEP = RAJA ## Testaa, onko luku suurempi kuin kynnysarvo. -HEX2BIN = HEKSABIN ## Muuntaa heksadesimaaliluvun binaariluvuksi. -HEX2DEC = HEKSADES ## Muuntaa heksadesimaaliluvun desimaaliluvuksi. -HEX2OCT = HEKSAOKT ## Muuntaa heksadesimaaliluvun oktaaliluvuksi. -IMABS = KOMPLEKSI.ITSEISARVO ## Palauttaa kompleksiluvun itseisarvon (moduluksen). -IMAGINARY = KOMPLEKSI.IMAG ## Palauttaa kompleksiluvun imaginaariosan kertoimen. -IMARGUMENT = KOMPLEKSI.ARG ## Palauttaa theeta-argumentin, joka on radiaaneina annettu kulma. -IMCONJUGATE = KOMPLEKSI.KONJ ## Palauttaa kompleksiluvun konjugaattiluvun. -IMCOS = KOMPLEKSI.COS ## Palauttaa kompleksiluvun kosinin. -IMDIV = KOMPLEKSI.OSAM ## Palauttaa kahden kompleksiluvun osamäärän. -IMEXP = KOMPLEKSI.EKSP ## Palauttaa kompleksiluvun eksponentin. -IMLN = KOMPLEKSI.LN ## Palauttaa kompleksiluvun luonnollisen logaritmin. -IMLOG10 = KOMPLEKSI.LOG10 ## Palauttaa kompleksiluvun kymmenkantaisen logaritmin. -IMLOG2 = KOMPLEKSI.LOG2 ## Palauttaa kompleksiluvun kaksikantaisen logaritmin. -IMPOWER = KOMPLEKSI.POT ## Palauttaa kokonaislukupotenssiin korotetun kompleksiluvun. -IMPRODUCT = KOMPLEKSI.TULO ## Palauttaa kompleksilukujen tulon. -IMREAL = KOMPLEKSI.REAALI ## Palauttaa kompleksiluvun reaaliosan kertoimen. -IMSIN = KOMPLEKSI.SIN ## Palauttaa kompleksiluvun sinin. -IMSQRT = KOMPLEKSI.NELIÖJ ## Palauttaa kompleksiluvun neliöjuuren. -IMSUB = KOMPLEKSI.EROTUS ## Palauttaa kahden kompleksiluvun erotuksen. -IMSUM = KOMPLEKSI.SUM ## Palauttaa kompleksilukujen summan. -OCT2BIN = OKTBIN ## Muuntaa oktaaliluvun binaariluvuksi. -OCT2DEC = OKTDES ## Muuntaa oktaaliluvun desimaaliluvuksi. -OCT2HEX = OKTHEKSA ## Muuntaa oktaaliluvun heksadesimaaliluvuksi. - - -## -## Financial functions Rahoitusfunktiot -## -ACCRINT = KERTYNYT.KORKO ## Laskee arvopaperille kertyneen koron, kun korko kertyy säännöllisin väliajoin. -ACCRINTM = KERTYNYT.KORKO.LOPUSSA ## Laskee arvopaperille kertyneen koron, kun korko maksetaan eräpäivänä. -AMORDEGRC = AMORDEGRC ## Laskee kunkin laskentakauden poiston poistokerrointa käyttämällä. -AMORLINC = AMORLINC ## Palauttaa kunkin laskentakauden poiston. -COUPDAYBS = KORKOPÄIVÄT.ALUSTA ## Palauttaa koronmaksukauden aloituspäivän ja tilityspäivän välisen ajanjakson päivien määrän. -COUPDAYS = KORKOPÄIVÄT ## Palauttaa päivien määrän koronmaksukaudelta, johon tilityspäivä kuuluu. -COUPDAYSNC = KORKOPÄIVÄT.SEURAAVA ## Palauttaa tilityspäivän ja seuraavan koronmaksupäivän välisen ajanjakson päivien määrän. -COUPNCD = KORKOMAKSU.SEURAAVA ## Palauttaa tilityspäivän jälkeisen seuraavan koronmaksupäivän. -COUPNUM = KORKOPÄIVÄJAKSOT ## Palauttaa arvopaperin ostopäivän ja erääntymispäivän välisten koronmaksupäivien määrän. -COUPPCD = KORKOPÄIVÄ.EDELLINEN ## Palauttaa tilityspäivää edeltävän koronmaksupäivän. -CUMIPMT = MAKSETTU.KORKO ## Palauttaa kahden jakson välisenä aikana kertyneen koron. -CUMPRINC = MAKSETTU.LYHENNYS ## Palauttaa lainalle kahden jakson välisenä aikana kertyneen lyhennyksen. -DB = DB ## Palauttaa kauden kirjanpidollisen poiston amerikkalaisen DB-menetelmän (Fixed-declining balance) mukaan. -DDB = DDB ## Palauttaa kauden kirjanpidollisen poiston amerikkalaisen DDB-menetelmän (Double-Declining Balance) tai jonkin muun määrittämäsi menetelmän mukaan. -DISC = DISKONTTOKORKO ## Palauttaa arvopaperin diskonttokoron. -DOLLARDE = VALUUTTA.DES ## Muuntaa murtolukuna ilmoitetun valuuttamäärän desimaaliluvuksi. -DOLLARFR = VALUUTTA.MURTO ## Muuntaa desimaalilukuna ilmaistun valuuttamäärän murtoluvuksi. -DURATION = KESTO ## Palauttaa keston arvopaperille, jonka koronmaksu tapahtuu säännöllisesti. -EFFECT = KORKO.EFEKT ## Palauttaa todellisen vuosikoron. -FV = TULEVA.ARVO ## Palauttaa sijoituksen tulevan arvon. -FVSCHEDULE = TULEVA.ARVO.ERIKORKO ## Palauttaa pääoman tulevan arvon, kun pääomalle on kertynyt korkoa vaihtelevasti. -INTRATE = KORKO.ARVOPAPERI ## Palauttaa arvopaperin korkokannan täysin sijoitetulle arvopaperille. -IPMT = IPMT ## Laskee sijoitukselle tai lainalle tiettynä ajanjaksona kertyvän koron. -IRR = SISÄINEN.KORKO ## Laskee sisäisen korkokannan kassavirrasta muodostuvalle sarjalle. -ISPMT = ONMAKSU ## Laskee sijoituksen maksetun koron tietyllä jaksolla. -MDURATION = KESTO.MUUNN ## Palauttaa muunnetun Macauley-keston arvopaperille, jonka oletettu nimellisarvo on 100 euroa. -MIRR = MSISÄINEN ## Palauttaa sisäisen korkokannan, kun positiivisten ja negatiivisten kassavirtojen rahoituskorko on erilainen. -NOMINAL = KORKO.VUOSI ## Palauttaa vuosittaisen nimelliskoron. -NPER = NJAKSO ## Palauttaa sijoituksen jaksojen määrän. -NPV = NNA ## Palauttaa sijoituksen nykyarvon toistuvista kassavirroista muodostuvan sarjan ja diskonttokoron perusteella. -ODDFPRICE = PARITON.ENS.NIMELLISARVO ## Palauttaa arvopaperin hinnan tilanteessa, jossa ensimmäinen jakso on pariton. -ODDFYIELD = PARITON.ENS.TUOTTO ## Palauttaa arvopaperin tuoton tilanteessa, jossa ensimmäinen jakso on pariton. -ODDLPRICE = PARITON.VIIM.NIMELLISARVO ## Palauttaa arvopaperin hinnan tilanteessa, jossa viimeinen jakso on pariton. -ODDLYIELD = PARITON.VIIM.TUOTTO ## Palauttaa arvopaperin tuoton tilanteessa, jossa viimeinen jakso on pariton. -PMT = MAKSU ## Palauttaa annuiteetin kausittaisen maksuerän. -PPMT = PPMT ## Laskee sijoitukselle tai lainalle tiettynä ajanjaksona maksettavan lyhennyksen. -PRICE = HINTA ## Palauttaa hinnan 100 euron nimellisarvoa kohden arvopaperille, jonka korko maksetaan säännöllisin väliajoin. -PRICEDISC = HINTA.DISK ## Palauttaa diskontatun arvopaperin hinnan 100 euron nimellisarvoa kohden. -PRICEMAT = HINTA.LUNASTUS ## Palauttaa hinnan 100 euron nimellisarvoa kohden arvopaperille, jonka korko maksetaan erääntymispäivänä. -PV = NA ## Palauttaa sijoituksen nykyarvon. -RATE = KORKO ## Palauttaa annuiteetin kausittaisen korkokannan. -RECEIVED = SAATU.HINTA ## Palauttaa arvopaperin tuoton erääntymispäivänä kokonaan maksetulle sijoitukselle. -SLN = STP ## Palauttaa sijoituksen tasapoiston yhdeltä jaksolta. -SYD = VUOSIPOISTO ## Palauttaa sijoituksen vuosipoiston annettuna kautena amerikkalaisen SYD-menetelmän (Sum-of-Year's Digits) avulla. -TBILLEQ = OBLIG.TUOTTOPROS ## Palauttaa valtion obligaation tuoton vastaavana joukkovelkakirjan tuottona. -TBILLPRICE = OBLIG.HINTA ## Palauttaa obligaation hinnan 100 euron nimellisarvoa kohden. -TBILLYIELD = OBLIG.TUOTTO ## Palauttaa obligaation tuoton. -VDB = VDB ## Palauttaa annetun kauden tai kauden osan kirjanpidollisen poiston amerikkalaisen DB-menetelmän (Fixed-declining balance) mukaan. -XIRR = SISÄINEN.KORKO.JAKSOTON ## Palauttaa sisäisen korkokannan kassavirtojen sarjoille, jotka eivät välttämättä ole säännöllisiä. -XNPV = NNA.JAKSOTON ## Palauttaa nettonykyarvon kassavirtasarjalle, joka ei välttämättä ole kausittainen. -YIELD = TUOTTO ## Palauttaa tuoton arvopaperille, jonka korko maksetaan säännöllisin väliajoin. -YIELDDISC = TUOTTO.DISK ## Palauttaa diskontatun arvopaperin, kuten obligaation, vuosittaisen tuoton. -YIELDMAT = TUOTTO.ERÄP ## Palauttaa erääntymispäivänään korkoa tuottavan arvopaperin vuosittaisen tuoton. - - -## -## Information functions Erikoisfunktiot -## -CELL = SOLU ## Palauttaa tietoja solun muotoilusta, sijainnista ja sisällöstä. -ERROR.TYPE = VIRHEEN.LAJI ## Palauttaa virhetyyppiä vastaavan luvun. -INFO = KUVAUS ## Palauttaa tietoja nykyisestä käyttöympäristöstä. -ISBLANK = ONTYHJÄ ## Palauttaa arvon TOSI, jos arvo on tyhjä. -ISERR = ONVIRH ## Palauttaa arvon TOSI, jos arvo on mikä tahansa virhearvo paitsi arvo #PUUTTUU!. -ISERROR = ONVIRHE ## Palauttaa arvon TOSI, jos arvo on mikä tahansa virhearvo. -ISEVEN = ONPARILLINEN ## Palauttaa arvon TOSI, jos arvo on parillinen. -ISLOGICAL = ONTOTUUS ## Palauttaa arvon TOSI, jos arvo on mikä tahansa looginen arvo. -ISNA = ONPUUTTUU ## Palauttaa arvon TOSI, jos virhearvo on #PUUTTUU!. -ISNONTEXT = ONEI_TEKSTI ## Palauttaa arvon TOSI, jos arvo ei ole teksti. -ISNUMBER = ONLUKU ## Palauttaa arvon TOSI, jos arvo on luku. -ISODD = ONPARITON ## Palauttaa arvon TOSI, jos arvo on pariton. -ISREF = ONVIITT ## Palauttaa arvon TOSI, jos arvo on viittaus. -ISTEXT = ONTEKSTI ## Palauttaa arvon TOSI, jos arvo on teksti. -N = N ## Palauttaa arvon luvuksi muunnettuna. -NA = PUUTTUU ## Palauttaa virhearvon #PUUTTUU!. -TYPE = TYYPPI ## Palauttaa luvun, joka ilmaisee arvon tietotyypin. - - -## -## Logical functions Loogiset funktiot -## -AND = JA ## Palauttaa arvon TOSI, jos kaikkien argumenttien arvo on TOSI. -FALSE = EPÄTOSI ## Palauttaa totuusarvon EPÄTOSI. -IF = JOS ## Määrittää suoritettavan loogisen testin. -IFERROR = JOSVIRHE ## Palauttaa määrittämäsi arvon, jos kaavan tulos on virhe; muussa tapauksessa palauttaa kaavan tuloksen. -NOT = EI ## Kääntää argumentin loogisen arvon. -OR = TAI ## Palauttaa arvon TOSI, jos minkä tahansa argumentin arvo on TOSI. -TRUE = TOSI ## Palauttaa totuusarvon TOSI. - - -## -## Lookup and reference functions Haku- ja viitefunktiot -## -ADDRESS = OSOITE ## Palauttaa laskentataulukon soluun osoittavan viittauksen tekstinä. -AREAS = ALUEET ## Palauttaa viittauksessa olevien alueiden määrän. -CHOOSE = VALITSE.INDEKSI ## Valitsee arvon arvoluettelosta. -COLUMN = SARAKE ## Palauttaa viittauksen sarakenumeron. -COLUMNS = SARAKKEET ## Palauttaa viittauksessa olevien sarakkeiden määrän. -HLOOKUP = VHAKU ## Suorittaa haun matriisin ylimmältä riviltä ja palauttaa määritetyn solun arvon. -HYPERLINK = HYPERLINKKI ## Luo pikakuvakkeen tai tekstin, joka avaa verkkopalvelimeen, intranetiin tai Internetiin tallennetun tiedoston. -INDEX = INDEKSI ## Valitsee arvon viittauksesta tai matriisista indeksin mukaan. -INDIRECT = EPÄSUORA ## Palauttaa tekstiarvona ilmaistun viittauksen. -LOOKUP = HAKU ## Etsii arvoja vektorista tai matriisista. -MATCH = VASTINE ## Etsii arvoja viittauksesta tai matriisista. -OFFSET = SIIRTYMÄ ## Palauttaa annetun viittauksen siirtymän. -ROW = RIVI ## Palauttaa viittauksen rivinumeron. -ROWS = RIVIT ## Palauttaa viittauksessa olevien rivien määrän. -RTD = RTD ## Noutaa COM-automaatiota (automaatio: Tapa käsitellä sovelluksen objekteja toisesta sovelluksesta tai kehitystyökalusta. Automaatio, jota aiemmin kutsuttiin OLE-automaatioksi, on teollisuusstandardi ja COM-mallin (Component Object Model) ominaisuus.) tukevasta ohjelmasta reaaliaikaisia tietoja. -TRANSPOSE = TRANSPONOI ## Palauttaa matriisin käänteismatriisin. -VLOOKUP = PHAKU ## Suorittaa haun matriisin ensimmäisestä sarakkeesta ja palauttaa rivillä olevan solun arvon. - - -## -## Math and trigonometry functions Matemaattiset ja trigonometriset funktiot -## -ABS = ITSEISARVO ## Palauttaa luvun itseisarvon. -ACOS = ACOS ## Palauttaa luvun arkuskosinin. -ACOSH = ACOSH ## Palauttaa luvun käänteisen hyperbolisen kosinin. -ASIN = ASIN ## Palauttaa luvun arkussinin. -ASINH = ASINH ## Palauttaa luvun käänteisen hyperbolisen sinin. -ATAN = ATAN ## Palauttaa luvun arkustangentin. -ATAN2 = ATAN2 ## Palauttaa arkustangentin x- ja y-koordinaatin perusteella. -ATANH = ATANH ## Palauttaa luvun käänteisen hyperbolisen tangentin. -CEILING = PYÖRISTÄ.KERR.YLÖS ## Pyöristää luvun lähimpään kokonaislukuun tai tarkkuusargumentin lähimpään kerrannaiseen. -COMBIN = KOMBINAATIO ## Palauttaa mahdollisten kombinaatioiden määrän annetulle objektien määrälle. -COS = COS ## Palauttaa luvun kosinin. -COSH = COSH ## Palauttaa luvun hyperbolisen kosinin. -DEGREES = ASTEET ## Muuntaa radiaanit asteiksi. -EVEN = PARILLINEN ## Pyöristää luvun ylöspäin lähimpään parilliseen kokonaislukuun. -EXP = EKSPONENTTI ## Palauttaa e:n korotettuna annetun luvun osoittamaan potenssiin. -FACT = KERTOMA ## Palauttaa luvun kertoman. -FACTDOUBLE = KERTOMA.OSA ## Palauttaa luvun osakertoman. -FLOOR = PYÖRISTÄ.KERR.ALAS ## Pyöristää luvun alaspäin (nollaa kohti). -GCD = SUURIN.YHT.TEKIJÄ ## Palauttaa suurimman yhteisen tekijän. -INT = KOKONAISLUKU ## Pyöristää luvun alaspäin lähimpään kokonaislukuun. -LCM = PIENIN.YHT.JAETTAVA ## Palauttaa pienimmän yhteisen tekijän. -LN = LUONNLOG ## Palauttaa luvun luonnollisen logaritmin. -LOG = LOG ## Laskee luvun logaritmin käyttämällä annettua kantalukua. -LOG10 = LOG10 ## Palauttaa luvun kymmenkantaisen logaritmin. -MDETERM = MDETERM ## Palauttaa matriisin matriisideterminantin. -MINVERSE = MKÄÄNTEINEN ## Palauttaa matriisin käänteismatriisin. -MMULT = MKERRO ## Palauttaa kahden matriisin tulon. -MOD = JAKOJ ## Palauttaa jakolaskun jäännöksen. -MROUND = PYÖRISTÄ.KERR ## Palauttaa luvun pyöristettynä annetun luvun kerrannaiseen. -MULTINOMIAL = MULTINOMI ## Palauttaa lukujoukon multinomin. -ODD = PARITON ## Pyöristää luvun ylöspäin lähimpään parittomaan kokonaislukuun. -PI = PII ## Palauttaa piin arvon. -POWER = POTENSSI ## Palauttaa luvun korotettuna haluttuun potenssiin. -PRODUCT = TULO ## Kertoo annetut argumentit. -QUOTIENT = OSAMÄÄRÄ ## Palauttaa osamäärän kokonaislukuosan. -RADIANS = RADIAANIT ## Muuntaa asteet radiaaneiksi. -RAND = SATUNNAISLUKU ## Palauttaa satunnaisluvun väliltä 0–1. -RANDBETWEEN = SATUNNAISLUKU.VÄLILTÄ ## Palauttaa satunnaisluvun määritettyjen lukujen väliltä. -ROMAN = ROMAN ## Muuntaa arabialaisen numeron tekstimuotoiseksi roomalaiseksi numeroksi. -ROUND = PYÖRISTÄ ## Pyöristää luvun annettuun määrään desimaaleja. -ROUNDDOWN = PYÖRISTÄ.DES.ALAS ## Pyöristää luvun alaspäin (nollaa kohti). -ROUNDUP = PYÖRISTÄ.DES.YLÖS ## Pyöristää luvun ylöspäin (poispäin nollasta). -SERIESSUM = SARJA.SUMMA ## Palauttaa kaavaan perustuvan potenssisarjan arvon. -SIGN = ETUMERKKI ## Palauttaa luvun etumerkin. -SIN = SIN ## Palauttaa annetun kulman sinin. -SINH = SINH ## Palauttaa luvun hyperbolisen sinin. -SQRT = NELIÖJUURI ## Palauttaa positiivisen neliöjuuren. -SQRTPI = NELIÖJUURI.PII ## Palauttaa tulon (luku * pii) neliöjuuren. -SUBTOTAL = VÄLISUMMA ## Palauttaa luettelon tai tietokannan välisumman. -SUM = SUMMA ## Laskee yhteen annetut argumentit. -SUMIF = SUMMA.JOS ## Laskee ehdot täyttävien solujen summan. -SUMIFS = SUMMA.JOS.JOUKKO ## Laskee yhteen solualueen useita ehtoja vastaavat solut. -SUMPRODUCT = TULOJEN.SUMMA ## Palauttaa matriisin toisiaan vastaavien osien tulojen summan. -SUMSQ = NELIÖSUMMA ## Palauttaa argumenttien neliöiden summan. -SUMX2MY2 = NELIÖSUMMIEN.EROTUS ## Palauttaa kahden matriisin toisiaan vastaavien arvojen laskettujen neliösummien erotuksen. -SUMX2PY2 = NELIÖSUMMIEN.SUMMA ## Palauttaa kahden matriisin toisiaan vastaavien arvojen neliösummien summan. -SUMXMY2 = EROTUSTEN.NELIÖSUMMA ## Palauttaa kahden matriisin toisiaan vastaavien arvojen erotusten neliösumman. -TAN = TAN ## Palauttaa luvun tangentin. -TANH = TANH ## Palauttaa luvun hyperbolisen tangentin. -TRUNC = KATKAISE ## Katkaisee luvun kokonaisluvuksi. - - -## -## Statistical functions Tilastolliset funktiot -## -AVEDEV = KESKIPOIKKEAMA ## Palauttaa hajontojen itseisarvojen keskiarvon. -AVERAGE = KESKIARVO ## Palauttaa argumenttien keskiarvon. -AVERAGEA = KESKIARVOA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, keskiarvon. -AVERAGEIF = KESKIARVO.JOS ## Palauttaa alueen niiden solujen keskiarvon (aritmeettisen keskiarvon), jotka täyttävät annetut ehdot. -AVERAGEIFS = KESKIARVO.JOS.JOUKKO ## Palauttaa niiden solujen keskiarvon (aritmeettisen keskiarvon), jotka vastaavat useita ehtoja. -BETADIST = BEETAJAKAUMA ## Palauttaa kumulatiivisen beetajakaumafunktion arvon. -BETAINV = BEETAJAKAUMA.KÄÄNT ## Palauttaa määritetyn beetajakauman käänteisen kumulatiivisen jakaumafunktion arvon. -BINOMDIST = BINOMIJAKAUMA ## Palauttaa yksittäisen termin binomijakaumatodennäköisyyden. -CHIDIST = CHIJAKAUMA ## Palauttaa yksisuuntaisen chi-neliön jakauman todennäköisyyden. -CHIINV = CHIJAKAUMA.KÄÄNT ## Palauttaa yksisuuntaisen chi-neliön jakauman todennäköisyyden käänteisarvon. -CHITEST = CHITESTI ## Palauttaa riippumattomuustestin tuloksen. -CONFIDENCE = LUOTTAMUSVÄLI ## Palauttaa luottamusvälin populaation keskiarvolle. -CORREL = KORRELAATIO ## Palauttaa kahden arvojoukon korrelaatiokertoimen. -COUNT = LASKE ## Laskee argumenttiluettelossa olevien lukujen määrän. -COUNTA = LASKE.A ## Laskee argumenttiluettelossa olevien arvojen määrän. -COUNTBLANK = LASKE.TYHJÄT ## Laskee alueella olevien tyhjien solujen määrän. -COUNTIF = LASKE.JOS ## Laskee alueella olevien sellaisten solujen määrän, joiden sisältö vastaa annettuja ehtoja. -COUNTIFS = LASKE.JOS.JOUKKO ## Laskee alueella olevien sellaisten solujen määrän, joiden sisältö vastaa useita ehtoja. -COVAR = KOVARIANSSI ## Palauttaa kovarianssin, joka on keskiarvo havaintoaineiston kunkin pisteparin poikkeamien tuloista. -CRITBINOM = BINOMIJAKAUMA.KRIT ## Palauttaa pienimmän arvon, jossa binomijakauman kertymäfunktion arvo on pienempi tai yhtä suuri kuin vertailuarvo. -DEVSQ = OIKAISTU.NELIÖSUMMA ## Palauttaa keskipoikkeamien neliösumman. -EXPONDIST = EKSPONENTIAALIJAKAUMA ## Palauttaa eksponentiaalijakauman. -FDIST = FJAKAUMA ## Palauttaa F-todennäköisyysjakauman. -FINV = FJAKAUMA.KÄÄNT ## Palauttaa F-todennäköisyysjakauman käänteisfunktion. -FISHER = FISHER ## Palauttaa Fisher-muunnoksen. -FISHERINV = FISHER.KÄÄNT ## Palauttaa käänteisen Fisher-muunnoksen. -FORECAST = ENNUSTE ## Palauttaa lineaarisen trendin arvon. -FREQUENCY = TAAJUUS ## Palauttaa frekvenssijakautuman pystysuuntaisena matriisina. -FTEST = FTESTI ## Palauttaa F-testin tuloksen. -GAMMADIST = GAMMAJAKAUMA ## Palauttaa gammajakauman. -GAMMAINV = GAMMAJAKAUMA.KÄÄNT ## Palauttaa käänteisen gammajakauman kertymäfunktion. -GAMMALN = GAMMALN ## Palauttaa gammafunktion luonnollisen logaritmin G(x). -GEOMEAN = KESKIARVO.GEOM ## Palauttaa geometrisen keskiarvon. -GROWTH = KASVU ## Palauttaa eksponentiaalisen trendin arvon. -HARMEAN = KESKIARVO.HARM ## Palauttaa harmonisen keskiarvon. -HYPGEOMDIST = HYPERGEOM.JAKAUMA ## Palauttaa hypergeometrisen jakauman. -INTERCEPT = LEIKKAUSPISTE ## Palauttaa lineaarisen regressiosuoran leikkauspisteen. -KURT = KURT ## Palauttaa tietoalueen vinous-arvon eli huipukkuuden. -LARGE = SUURI ## Palauttaa tietojoukon k:nneksi suurimman arvon. -LINEST = LINREGR ## Palauttaa lineaarisen trendin parametrit. -LOGEST = LOGREGR ## Palauttaa eksponentiaalisen trendin parametrit. -LOGINV = LOGNORM.JAKAUMA.KÄÄNT ## Palauttaa lognormeeratun jakauman käänteisfunktion. -LOGNORMDIST = LOGNORM.JAKAUMA ## Palauttaa lognormaalisen jakauman kertymäfunktion. -MAX = MAKS ## Palauttaa suurimman arvon argumenttiluettelosta. -MAXA = MAKSA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, suurimman arvon. -MEDIAN = MEDIAANI ## Palauttaa annettujen lukujen mediaanin. -MIN = MIN ## Palauttaa pienimmän arvon argumenttiluettelosta. -MINA = MINA ## Palauttaa argumenttien, mukaan lukien lukujen, tekstin ja loogisten arvojen, pienimmän arvon. -MODE = MOODI ## Palauttaa tietojoukossa useimmin esiintyvän arvon. -NEGBINOMDIST = BINOMIJAKAUMA.NEG ## Palauttaa negatiivisen binomijakauman. -NORMDIST = NORM.JAKAUMA ## Palauttaa normaalijakauman kertymäfunktion. -NORMINV = NORM.JAKAUMA.KÄÄNT ## Palauttaa käänteisen normaalijakauman kertymäfunktion. -NORMSDIST = NORM.JAKAUMA.NORMIT ## Palauttaa normitetun normaalijakauman kertymäfunktion. -NORMSINV = NORM.JAKAUMA.NORMIT.KÄÄNT ## Palauttaa normitetun normaalijakauman kertymäfunktion käänteisarvon. -PEARSON = PEARSON ## Palauttaa Pearsonin tulomomenttikorrelaatiokertoimen. -PERCENTILE = PROSENTTIPISTE ## Palauttaa alueen arvojen k:nnen prosenttipisteen. -PERCENTRANK = PROSENTTIJÄRJESTYS ## Palauttaa tietojoukon arvon prosentuaalisen järjestysluvun. -PERMUT = PERMUTAATIO ## Palauttaa mahdollisten permutaatioiden määrän annetulle objektien määrälle. -POISSON = POISSON ## Palauttaa Poissonin todennäköisyysjakauman. -PROB = TODENNÄKÖISYYS ## Palauttaa todennäköisyyden sille, että arvot ovat tietyltä väliltä. -QUARTILE = NELJÄNNES ## Palauttaa tietoalueen neljänneksen. -RANK = ARVON.MUKAAN ## Palauttaa luvun paikan lukuarvoluettelossa. -RSQ = PEARSON.NELIÖ ## Palauttaa Pearsonin tulomomenttikorrelaatiokertoimen neliön. -SKEW = JAKAUMAN.VINOUS ## Palauttaa jakauman vinouden. -SLOPE = KULMAKERROIN ## Palauttaa lineaarisen regressiosuoran kulmakertoimen. -SMALL = PIENI ## Palauttaa tietojoukon k:nneksi pienimmän arvon. -STANDARDIZE = NORMITA ## Palauttaa normitetun arvon. -STDEV = KESKIHAJONTA ## Laskee populaation keskihajonnan otoksen perusteella. -STDEVA = KESKIHAJONTAA ## Laskee populaation keskihajonnan otoksen perusteella, mukaan lukien luvut, tekstin ja loogiset arvot. -STDEVP = KESKIHAJONTAP ## Laskee normaalijakautuman koko populaation perusteella. -STDEVPA = KESKIHAJONTAPA ## Laskee populaation keskihajonnan koko populaation perusteella, mukaan lukien luvut, tekstin ja totuusarvot. -STEYX = KESKIVIRHE ## Palauttaa regression kutakin x-arvoa vastaavan ennustetun y-arvon keskivirheen. -TDIST = TJAKAUMA ## Palauttaa t-jakautuman. -TINV = TJAKAUMA.KÄÄNT ## Palauttaa käänteisen t-jakauman. -TREND = SUUNTAUS ## Palauttaa lineaarisen trendin arvoja. -TRIMMEAN = KESKIARVO.TASATTU ## Palauttaa tietojoukon tasatun keskiarvon. -TTEST = TTESTI ## Palauttaa t-testiin liittyvän todennäköisyyden. -VAR = VAR ## Arvioi populaation varianssia otoksen perusteella. -VARA = VARA ## Laskee populaation varianssin otoksen perusteella, mukaan lukien luvut, tekstin ja loogiset arvot. -VARP = VARP ## Laskee varianssin koko populaation perusteella. -VARPA = VARPA ## Laskee populaation varianssin koko populaation perusteella, mukaan lukien luvut, tekstin ja totuusarvot. -WEIBULL = WEIBULL ## Palauttaa Weibullin jakauman. -ZTEST = ZTESTI ## Palauttaa z-testin yksisuuntaisen todennäköisyysarvon. - - -## -## Text functions Tekstifunktiot -## -ASC = ASC ## Muuntaa merkkijonossa olevat englanninkieliset DBCS- tai katakana-merkit SBCS-merkeiksi. -BAHTTEXT = BAHTTEKSTI ## Muuntaa luvun tekstiksi ß (baht) -valuuttamuotoa käyttämällä. -CHAR = MERKKI ## Palauttaa koodin lukua vastaavan merkin. -CLEAN = SIIVOA ## Poistaa tekstistä kaikki tulostumattomat merkit. -CODE = KOODI ## Palauttaa tekstimerkkijonon ensimmäisen merkin numerokoodin. -CONCATENATE = KETJUTA ## Yhdistää useat merkkijonot yhdeksi merkkijonoksi. -DOLLAR = VALUUTTA ## Muuntaa luvun tekstiksi $ (dollari) -valuuttamuotoa käyttämällä. -EXACT = VERTAA ## Tarkistaa, ovatko kaksi tekstiarvoa samanlaiset. -FIND = ETSI ## Etsii tekstiarvon toisen tekstin sisältä (tunnistaa isot ja pienet kirjaimet). -FINDB = ETSIB ## Etsii tekstiarvon toisen tekstin sisältä (tunnistaa isot ja pienet kirjaimet). -FIXED = KIINTEÄ ## Muotoilee luvun tekstiksi, jossa on kiinteä määrä desimaaleja. -JIS = JIS ## Muuntaa merkkijonossa olevat englanninkieliset SBCS- tai katakana-merkit DBCS-merkeiksi. -LEFT = VASEN ## Palauttaa tekstiarvon vasemmanpuoliset merkit. -LEFTB = VASENB ## Palauttaa tekstiarvon vasemmanpuoliset merkit. -LEN = PITUUS ## Palauttaa tekstimerkkijonon merkkien määrän. -LENB = PITUUSB ## Palauttaa tekstimerkkijonon merkkien määrän. -LOWER = PIENET ## Muuntaa tekstin pieniksi kirjaimiksi. -MID = POIMI.TEKSTI ## Palauttaa määritetyn määrän merkkejä merkkijonosta alkaen annetusta kohdasta. -MIDB = POIMI.TEKSTIB ## Palauttaa määritetyn määrän merkkejä merkkijonosta alkaen annetusta kohdasta. -PHONETIC = FONEETTINEN ## Hakee foneettiset (furigana) merkit merkkijonosta. -PROPER = ERISNIMI ## Muuttaa merkkijonon kunkin sanan ensimmäisen kirjaimen isoksi. -REPLACE = KORVAA ## Korvaa tekstissä olevat merkit. -REPLACEB = KORVAAB ## Korvaa tekstissä olevat merkit. -REPT = TOISTA ## Toistaa tekstin annetun määrän kertoja. -RIGHT = OIKEA ## Palauttaa tekstiarvon oikeanpuoliset merkit. -RIGHTB = OIKEAB ## Palauttaa tekstiarvon oikeanpuoliset merkit. -SEARCH = KÄY.LÄPI ## Etsii tekstiarvon toisen tekstin sisältä (isot ja pienet kirjaimet tulkitaan samoiksi merkeiksi). -SEARCHB = KÄY.LÄPIB ## Etsii tekstiarvon toisen tekstin sisältä (isot ja pienet kirjaimet tulkitaan samoiksi merkeiksi). -SUBSTITUTE = VAIHDA ## Korvaa merkkijonossa olevan tekstin toisella. -T = T ## Muuntaa argumentit tekstiksi. -TEXT = TEKSTI ## Muotoilee luvun ja muuntaa sen tekstiksi. -TRIM = POISTA.VÄLIT ## Poistaa välilyönnit tekstistä. -UPPER = ISOT ## Muuntaa tekstin isoiksi kirjaimiksi. -VALUE = ARVO ## Muuntaa tekstiargumentin luvuksi. diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config deleted file mode 100644 index 1f5db88..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = € - - -## -## Excel Error Codes (For future use) -## -NULL = #NUL! -DIV0 = #DIV/0! -VALUE = #VALEUR! -REF = #REF! -NAME = #NOM? -NUM = #NOMBRE! -NA = #N/A diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions deleted file mode 100644 index 03b80e5..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Fonctions de complément et d’automatisation -## -GETPIVOTDATA = LIREDONNEESTABCROISDYNAMIQUE ## Renvoie les données stockées dans un rapport de tableau croisé dynamique. - - -## -## Cube functions Fonctions Cube -## -CUBEKPIMEMBER = MEMBREKPICUBE ## Renvoie un nom, une propriété et une mesure d’indicateur de performance clé et affiche le nom et la propriété dans la cellule. Un indicateur de performance clé est une mesure quantifiable, telle que la marge bénéficiaire brute mensuelle ou la rotation trimestrielle du personnel, utilisée pour évaluer les performances d’une entreprise. -CUBEMEMBER = MEMBRECUBE ## Renvoie un membre ou un uplet dans une hiérarchie de cubes. Utilisez cette fonction pour valider l’existence du membre ou de l’uplet dans le cube. -CUBEMEMBERPROPERTY = PROPRIETEMEMBRECUBE ## Renvoie la valeur d’une propriété de membre du cube. Utilisez cette fonction pour valider l’existence d’un nom de membre dans le cube et pour renvoyer la propriété spécifiée pour ce membre. -CUBERANKEDMEMBER = RANGMEMBRECUBE ## Renvoie le nième membre ou le membre placé à un certain rang dans un ensemble. Utilisez cette fonction pour renvoyer un ou plusieurs éléments d’un ensemble, tels que les meilleurs vendeurs ou les 10 meilleurs étudiants. -CUBESET = JEUCUBE ## Définit un ensemble calculé de membres ou d’uplets en envoyant une expression définie au cube sur le serveur qui crée l’ensemble et le renvoie à Microsoft Office Excel. -CUBESETCOUNT = NBJEUCUBE ## Renvoie le nombre d’éléments dans un jeu. -CUBEVALUE = VALEURCUBE ## Renvoie une valeur d’agrégation issue d’un cube. - - -## -## Database functions Fonctions de base de données -## -DAVERAGE = BDMOYENNE ## Renvoie la moyenne des entrées de base de données sélectionnées. -DCOUNT = BCOMPTE ## Compte le nombre de cellules d’une base de données qui contiennent des nombres. -DCOUNTA = BDNBVAL ## Compte les cellules non vides d’une base de données. -DGET = BDLIRE ## Extrait d’une base de données un enregistrement unique répondant aux critères spécifiés. -DMAX = BDMAX ## Renvoie la valeur maximale des entrées de base de données sélectionnées. -DMIN = BDMIN ## Renvoie la valeur minimale des entrées de base de données sélectionnées. -DPRODUCT = BDPRODUIT ## Multiplie les valeurs d’un champ particulier des enregistrements d’une base de données, qui répondent aux critères spécifiés. -DSTDEV = BDECARTYPE ## Calcule l’écart type pour un échantillon d’entrées de base de données sélectionnées. -DSTDEVP = BDECARTYPEP ## Calcule l’écart type pour l’ensemble d’une population d’entrées de base de données sélectionnées. -DSUM = BDSOMME ## Ajoute les nombres dans la colonne de champ des enregistrements de la base de données, qui répondent aux critères. -DVAR = BDVAR ## Calcule la variance pour un échantillon d’entrées de base de données sélectionnées. -DVARP = BDVARP ## Calcule la variance pour l’ensemble d’une population d’entrées de base de données sélectionnées. - - -## -## Date and time functions Fonctions de date et d’heure -## -DATE = DATE ## Renvoie le numéro de série d’une date précise. -DATEVALUE = DATEVAL ## Convertit une date représentée sous forme de texte en numéro de série. -DAY = JOUR ## Convertit un numéro de série en jour du mois. -DAYS360 = JOURS360 ## Calcule le nombre de jours qui séparent deux dates sur la base d’une année de 360 jours. -EDATE = MOIS.DECALER ## Renvoie le numéro séquentiel de la date qui représente une date spécifiée (l’argument date_départ), corrigée en plus ou en moins du nombre de mois indiqué. -EOMONTH = FIN.MOIS ## Renvoie le numéro séquentiel de la date du dernier jour du mois précédant ou suivant la date_départ du nombre de mois indiqué. -HOUR = HEURE ## Convertit un numéro de série en heure. -MINUTE = MINUTE ## Convertit un numéro de série en minute. -MONTH = MOIS ## Convertit un numéro de série en mois. -NETWORKDAYS = NB.JOURS.OUVRES ## Renvoie le nombre de jours ouvrés entiers compris entre deux dates. -NOW = MAINTENANT ## Renvoie le numéro de série de la date et de l’heure du jour. -SECOND = SECONDE ## Convertit un numéro de série en seconde. -TIME = TEMPS ## Renvoie le numéro de série d’une heure précise. -TIMEVALUE = TEMPSVAL ## Convertit une date représentée sous forme de texte en numéro de série. -TODAY = AUJOURDHUI ## Renvoie le numéro de série de la date du jour. -WEEKDAY = JOURSEM ## Convertit un numéro de série en jour de la semaine. -WEEKNUM = NO.SEMAINE ## Convertit un numéro de série en un numéro représentant l’ordre de la semaine dans l’année. -WORKDAY = SERIE.JOUR.OUVRE ## Renvoie le numéro de série de la date avant ou après le nombre de jours ouvrés spécifiés. -YEAR = ANNEE ## Convertit un numéro de série en année. -YEARFRAC = FRACTION.ANNEE ## Renvoie la fraction de l’année représentant le nombre de jours entre la date de début et la date de fin. - - -## -## Engineering functions Fonctions d’ingénierie -## -BESSELI = BESSELI ## Renvoie la fonction Bessel modifiée In(x). -BESSELJ = BESSELJ ## Renvoie la fonction Bessel Jn(x). -BESSELK = BESSELK ## Renvoie la fonction Bessel modifiée Kn(x). -BESSELY = BESSELY ## Renvoie la fonction Bessel Yn(x). -BIN2DEC = BINDEC ## Convertit un nombre binaire en nombre décimal. -BIN2HEX = BINHEX ## Convertit un nombre binaire en nombre hexadécimal. -BIN2OCT = BINOCT ## Convertit un nombre binaire en nombre octal. -COMPLEX = COMPLEXE ## Convertit des coefficients réel et imaginaire en un nombre complexe. -CONVERT = CONVERT ## Convertit un nombre d’une unité de mesure à une autre. -DEC2BIN = DECBIN ## Convertit un nombre décimal en nombre binaire. -DEC2HEX = DECHEX ## Convertit un nombre décimal en nombre hexadécimal. -DEC2OCT = DECOCT ## Convertit un nombre décimal en nombre octal. -DELTA = DELTA ## Teste l’égalité de deux nombres. -ERF = ERF ## Renvoie la valeur de la fonction d’erreur. -ERFC = ERFC ## Renvoie la valeur de la fonction d’erreur complémentaire. -GESTEP = SUP.SEUIL ## Teste si un nombre est supérieur à une valeur de seuil. -HEX2BIN = HEXBIN ## Convertit un nombre hexadécimal en nombre binaire. -HEX2DEC = HEXDEC ## Convertit un nombre hexadécimal en nombre décimal. -HEX2OCT = HEXOCT ## Convertit un nombre hexadécimal en nombre octal. -IMABS = COMPLEXE.MODULE ## Renvoie la valeur absolue (module) d’un nombre complexe. -IMAGINARY = COMPLEXE.IMAGINAIRE ## Renvoie le coefficient imaginaire d’un nombre complexe. -IMARGUMENT = COMPLEXE.ARGUMENT ## Renvoie l’argument thêta, un angle exprimé en radians. -IMCONJUGATE = COMPLEXE.CONJUGUE ## Renvoie le nombre complexe conjugué d’un nombre complexe. -IMCOS = IMCOS ## Renvoie le cosinus d’un nombre complexe. -IMDIV = COMPLEXE.DIV ## Renvoie le quotient de deux nombres complexes. -IMEXP = COMPLEXE.EXP ## Renvoie la fonction exponentielle d’un nombre complexe. -IMLN = COMPLEXE.LN ## Renvoie le logarithme népérien d’un nombre complexe. -IMLOG10 = COMPLEXE.LOG10 ## Calcule le logarithme en base 10 d’un nombre complexe. -IMLOG2 = COMPLEXE.LOG2 ## Calcule le logarithme en base 2 d’un nombre complexe. -IMPOWER = COMPLEXE.PUISSANCE ## Renvoie un nombre complexe élevé à une puissance entière. -IMPRODUCT = COMPLEXE.PRODUIT ## Renvoie le produit de plusieurs nombres complexes. -IMREAL = COMPLEXE.REEL ## Renvoie le coefficient réel d’un nombre complexe. -IMSIN = COMPLEXE.SIN ## Renvoie le sinus d’un nombre complexe. -IMSQRT = COMPLEXE.RACINE ## Renvoie la racine carrée d’un nombre complexe. -IMSUB = COMPLEXE.DIFFERENCE ## Renvoie la différence entre deux nombres complexes. -IMSUM = COMPLEXE.SOMME ## Renvoie la somme de plusieurs nombres complexes. -OCT2BIN = OCTBIN ## Convertit un nombre octal en nombre binaire. -OCT2DEC = OCTDEC ## Convertit un nombre octal en nombre décimal. -OCT2HEX = OCTHEX ## Convertit un nombre octal en nombre hexadécimal. - - -## -## Financial functions Fonctions financières -## -ACCRINT = INTERET.ACC ## Renvoie l’intérêt couru non échu d’un titre dont l’intérêt est perçu périodiquement. -ACCRINTM = INTERET.ACC.MAT ## Renvoie l’intérêt couru non échu d’un titre dont l’intérêt est perçu à l’échéance. -AMORDEGRC = AMORDEGRC ## Renvoie l’amortissement correspondant à chaque période comptable en utilisant un coefficient d’amortissement. -AMORLINC = AMORLINC ## Renvoie l’amortissement d’un bien à la fin d’une période fiscale donnée. -COUPDAYBS = NB.JOURS.COUPON.PREC ## Renvoie le nombre de jours entre le début de la période de coupon et la date de liquidation. -COUPDAYS = NB.JOURS.COUPONS ## Renvoie le nombre de jours pour la période du coupon contenant la date de liquidation. -COUPDAYSNC = NB.JOURS.COUPON.SUIV ## Renvoie le nombre de jours entre la date de liquidation et la date du coupon suivant la date de liquidation. -COUPNCD = DATE.COUPON.SUIV ## Renvoie la première date de coupon ultérieure à la date de règlement. -COUPNUM = NB.COUPONS ## Renvoie le nombre de coupons dus entre la date de règlement et la date d’échéance. -COUPPCD = DATE.COUPON.PREC ## Renvoie la date de coupon précédant la date de règlement. -CUMIPMT = CUMUL.INTER ## Renvoie l’intérêt cumulé payé sur un emprunt entre deux périodes. -CUMPRINC = CUMUL.PRINCPER ## Renvoie le montant cumulé des remboursements du capital d’un emprunt effectués entre deux périodes. -DB = DB ## Renvoie l’amortissement d’un bien pour une période spécifiée en utilisant la méthode de l’amortissement dégressif à taux fixe. -DDB = DDB ## Renvoie l’amortissement d’un bien pour toute période spécifiée, en utilisant la méthode de l’amortissement dégressif à taux double ou selon un coefficient à spécifier. -DISC = TAUX.ESCOMPTE ## Calcule le taux d’escompte d’une transaction. -DOLLARDE = PRIX.DEC ## Convertit un prix en euros, exprimé sous forme de fraction, en un prix en euros exprimé sous forme de nombre décimal. -DOLLARFR = PRIX.FRAC ## Convertit un prix en euros, exprimé sous forme de nombre décimal, en un prix en euros exprimé sous forme de fraction. -DURATION = DUREE ## Renvoie la durée, en années, d’un titre dont l’intérêt est perçu périodiquement. -EFFECT = TAUX.EFFECTIF ## Renvoie le taux d’intérêt annuel effectif. -FV = VC ## Renvoie la valeur future d’un investissement. -FVSCHEDULE = VC.PAIEMENTS ## Calcule la valeur future d’un investissement en appliquant une série de taux d’intérêt composites. -INTRATE = TAUX.INTERET ## Affiche le taux d’intérêt d’un titre totalement investi. -IPMT = INTPER ## Calcule le montant des intérêts d’un investissement pour une période donnée. -IRR = TRI ## Calcule le taux de rentabilité interne d’un investissement pour une succession de trésoreries. -ISPMT = ISPMT ## Calcule le montant des intérêts d’un investissement pour une période donnée. -MDURATION = DUREE.MODIFIEE ## Renvoie la durée de Macauley modifiée pour un titre ayant une valeur nominale hypothétique de 100_euros. -MIRR = TRIM ## Calcule le taux de rentabilité interne lorsque les paiements positifs et négatifs sont financés à des taux différents. -NOMINAL = TAUX.NOMINAL ## Calcule le taux d’intérêt nominal annuel. -NPER = NPM ## Renvoie le nombre de versements nécessaires pour rembourser un emprunt. -NPV = VAN ## Calcule la valeur actuelle nette d’un investissement basé sur une série de décaissements et un taux d’escompte. -ODDFPRICE = PRIX.PCOUPON.IRREG ## Renvoie le prix par tranche de valeur nominale de 100 euros d’un titre dont la première période de coupon est irrégulière. -ODDFYIELD = REND.PCOUPON.IRREG ## Renvoie le taux de rendement d’un titre dont la première période de coupon est irrégulière. -ODDLPRICE = PRIX.DCOUPON.IRREG ## Renvoie le prix par tranche de valeur nominale de 100 euros d’un titre dont la première période de coupon est irrégulière. -ODDLYIELD = REND.DCOUPON.IRREG ## Renvoie le taux de rendement d’un titre dont la dernière période de coupon est irrégulière. -PMT = VPM ## Calcule le paiement périodique d’un investissement donné. -PPMT = PRINCPER ## Calcule, pour une période donnée, la part de remboursement du principal d’un investissement. -PRICE = PRIX.TITRE ## Renvoie le prix d’un titre rapportant des intérêts périodiques, pour une valeur nominale de 100 euros. -PRICEDISC = VALEUR.ENCAISSEMENT ## Renvoie la valeur d’encaissement d’un escompte commercial, pour une valeur nominale de 100 euros. -PRICEMAT = PRIX.TITRE.ECHEANCE ## Renvoie le prix d’un titre dont la valeur nominale est 100 euros et qui rapporte des intérêts à l’échéance. -PV = PV ## Calcule la valeur actuelle d’un investissement. -RATE = TAUX ## Calcule le taux d’intérêt par période pour une annuité. -RECEIVED = VALEUR.NOMINALE ## Renvoie la valeur nominale à échéance d’un effet de commerce. -SLN = AMORLIN ## Calcule l’amortissement linéaire d’un bien pour une période donnée. -SYD = SYD ## Calcule l’amortissement d’un bien pour une période donnée sur la base de la méthode américaine Sum-of-Years Digits (amortissement dégressif à taux décroissant appliqué à une valeur constante). -TBILLEQ = TAUX.ESCOMPTE.R ## Renvoie le taux d’escompte rationnel d’un bon du Trésor. -TBILLPRICE = PRIX.BON.TRESOR ## Renvoie le prix d’un bon du Trésor d’une valeur nominale de 100 euros. -TBILLYIELD = RENDEMENT.BON.TRESOR ## Calcule le taux de rendement d’un bon du Trésor. -VDB = VDB ## Renvoie l’amortissement d’un bien pour une période spécifiée ou partielle en utilisant une méthode de l’amortissement dégressif à taux fixe. -XIRR = TRI.PAIEMENTS ## Calcule le taux de rentabilité interne d’un ensemble de paiements non périodiques. -XNPV = VAN.PAIEMENTS ## Renvoie la valeur actuelle nette d’un ensemble de paiements non périodiques. -YIELD = RENDEMENT.TITRE ## Calcule le rendement d’un titre rapportant des intérêts périodiquement. -YIELDDISC = RENDEMENT.SIMPLE ## Calcule le taux de rendement d’un emprunt à intérêt simple (par exemple, un bon du Trésor). -YIELDMAT = RENDEMENT.TITRE.ECHEANCE ## Renvoie le rendement annuel d’un titre qui rapporte des intérêts à l’échéance. - - -## -## Information functions Fonctions d’information -## -CELL = CELLULE ## Renvoie des informations sur la mise en forme, l’emplacement et le contenu d’une cellule. -ERROR.TYPE = TYPE.ERREUR ## Renvoie un nombre correspondant à un type d’erreur. -INFO = INFORMATIONS ## Renvoie des informations sur l’environnement d’exploitation actuel. -ISBLANK = ESTVIDE ## Renvoie VRAI si l’argument valeur est vide. -ISERR = ESTERR ## Renvoie VRAI si l’argument valeur fait référence à une valeur d’erreur, sauf #N/A. -ISERROR = ESTERREUR ## Renvoie VRAI si l’argument valeur fait référence à une valeur d’erreur. -ISEVEN = EST.PAIR ## Renvoie VRAI si le chiffre est pair. -ISLOGICAL = ESTLOGIQUE ## Renvoie VRAI si l’argument valeur fait référence à une valeur logique. -ISNA = ESTNA ## Renvoie VRAI si l’argument valeur fait référence à la valeur d’erreur #N/A. -ISNONTEXT = ESTNONTEXTE ## Renvoie VRAI si l’argument valeur ne se présente pas sous forme de texte. -ISNUMBER = ESTNUM ## Renvoie VRAI si l’argument valeur représente un nombre. -ISODD = EST.IMPAIR ## Renvoie VRAI si le chiffre est impair. -ISREF = ESTREF ## Renvoie VRAI si l’argument valeur est une référence. -ISTEXT = ESTTEXTE ## Renvoie VRAI si l’argument valeur se présente sous forme de texte. -N = N ## Renvoie une valeur convertie en nombre. -NA = NA ## Renvoie la valeur d’erreur #N/A. -TYPE = TYPE ## Renvoie un nombre indiquant le type de données d’une valeur. - - -## -## Logical functions Fonctions logiques -## -AND = ET ## Renvoie VRAI si tous ses arguments sont VRAI. -FALSE = FAUX ## Renvoie la valeur logique FAUX. -IF = SI ## Spécifie un test logique à effectuer. -IFERROR = SIERREUR ## Renvoie une valeur que vous spécifiez si une formule génère une erreur ; sinon, elle renvoie le résultat de la formule. -NOT = NON ## Inverse la logique de cet argument. -OR = OU ## Renvoie VRAI si un des arguments est VRAI. -TRUE = VRAI ## Renvoie la valeur logique VRAI. - - -## -## Lookup and reference functions Fonctions de recherche et de référence -## -ADDRESS = ADRESSE ## Renvoie une référence sous forme de texte à une seule cellule d’une feuille de calcul. -AREAS = ZONES ## Renvoie le nombre de zones dans une référence. -CHOOSE = CHOISIR ## Choisit une valeur dans une liste. -COLUMN = COLONNE ## Renvoie le numéro de colonne d’une référence. -COLUMNS = COLONNES ## Renvoie le nombre de colonnes dans une référence. -HLOOKUP = RECHERCHEH ## Effectue une recherche dans la première ligne d’une matrice et renvoie la valeur de la cellule indiquée. -HYPERLINK = LIEN_HYPERTEXTE ## Crée un raccourci ou un renvoi qui ouvre un document stocké sur un serveur réseau, sur un réseau Intranet ou sur Internet. -INDEX = INDEX ## Utilise un index pour choisir une valeur provenant d’une référence ou d’une matrice. -INDIRECT = INDIRECT ## Renvoie une référence indiquée par une valeur de texte. -LOOKUP = RECHERCHE ## Recherche des valeurs dans un vecteur ou une matrice. -MATCH = EQUIV ## Recherche des valeurs dans une référence ou une matrice. -OFFSET = DECALER ## Renvoie une référence décalée par rapport à une référence donnée. -ROW = LIGNE ## Renvoie le numéro de ligne d’une référence. -ROWS = LIGNES ## Renvoie le nombre de lignes dans une référence. -RTD = RTD ## Extrait les données en temps réel à partir d’un programme prenant en charge l’automation COM (Automation : utilisation des objets d'une application à partir d'une autre application ou d'un autre outil de développement. Autrefois appelée OLE Automation, Automation est une norme industrielle et une fonctionnalité du modèle d'objet COM (Component Object Model).). -TRANSPOSE = TRANSPOSE ## Renvoie la transposition d’une matrice. -VLOOKUP = RECHERCHEV ## Effectue une recherche dans la première colonne d’une matrice et se déplace sur la ligne pour renvoyer la valeur d’une cellule. - - -## -## Math and trigonometry functions Fonctions mathématiques et trigonométriques -## -ABS = ABS ## Renvoie la valeur absolue d’un nombre. -ACOS = ACOS ## Renvoie l’arccosinus d’un nombre. -ACOSH = ACOSH ## Renvoie le cosinus hyperbolique inverse d’un nombre. -ASIN = ASIN ## Renvoie l’arcsinus d’un nombre. -ASINH = ASINH ## Renvoie le sinus hyperbolique inverse d’un nombre. -ATAN = ATAN ## Renvoie l’arctangente d’un nombre. -ATAN2 = ATAN2 ## Renvoie l’arctangente des coordonnées x et y. -ATANH = ATANH ## Renvoie la tangente hyperbolique inverse d’un nombre. -CEILING = PLAFOND ## Arrondit un nombre au nombre entier le plus proche ou au multiple le plus proche de l’argument précision en s’éloignant de zéro. -COMBIN = COMBIN ## Renvoie le nombre de combinaisons que l’on peut former avec un nombre donné d’objets. -COS = COS ## Renvoie le cosinus d’un nombre. -COSH = COSH ## Renvoie le cosinus hyperbolique d’un nombre. -DEGREES = DEGRES ## Convertit des radians en degrés. -EVEN = PAIR ## Arrondit un nombre au nombre entier pair le plus proche en s’éloignant de zéro. -EXP = EXP ## Renvoie e élevé à la puissance d’un nombre donné. -FACT = FACT ## Renvoie la factorielle d’un nombre. -FACTDOUBLE = FACTDOUBLE ## Renvoie la factorielle double d’un nombre. -FLOOR = PLANCHER ## Arrondit un nombre en tendant vers 0 (zéro). -GCD = PGCD ## Renvoie le plus grand commun diviseur. -INT = ENT ## Arrondit un nombre à l’entier immédiatement inférieur. -LCM = PPCM ## Renvoie le plus petit commun multiple. -LN = LN ## Renvoie le logarithme népérien d’un nombre. -LOG = LOG ## Renvoie le logarithme d’un nombre dans la base spécifiée. -LOG10 = LOG10 ## Calcule le logarithme en base 10 d’un nombre. -MDETERM = DETERMAT ## Renvoie le déterminant d’une matrice. -MINVERSE = INVERSEMAT ## Renvoie la matrice inverse d’une matrice. -MMULT = PRODUITMAT ## Renvoie le produit de deux matrices. -MOD = MOD ## Renvoie le reste d’une division. -MROUND = ARRONDI.AU.MULTIPLE ## Donne l’arrondi d’un nombre au multiple spécifié. -MULTINOMIAL = MULTINOMIALE ## Calcule la multinomiale d’un ensemble de nombres. -ODD = IMPAIR ## Renvoie le nombre, arrondi à la valeur du nombre entier impair le plus proche en s’éloignant de zéro. -PI = PI ## Renvoie la valeur de pi. -POWER = PUISSANCE ## Renvoie la valeur du nombre élevé à une puissance. -PRODUCT = PRODUIT ## Multiplie ses arguments. -QUOTIENT = QUOTIENT ## Renvoie la partie entière du résultat d’une division. -RADIANS = RADIANS ## Convertit des degrés en radians. -RAND = ALEA ## Renvoie un nombre aléatoire compris entre 0 et 1. -RANDBETWEEN = ALEA.ENTRE.BORNES ## Renvoie un nombre aléatoire entre les nombres que vous spécifiez. -ROMAN = ROMAIN ## Convertit des chiffres arabes en chiffres romains, sous forme de texte. -ROUND = ARRONDI ## Arrondit un nombre au nombre de chiffres indiqué. -ROUNDDOWN = ARRONDI.INF ## Arrondit un nombre en tendant vers 0 (zéro). -ROUNDUP = ARRONDI.SUP ## Arrondit un nombre à l’entier supérieur, en s’éloignant de zéro. -SERIESSUM = SOMME.SERIES ## Renvoie la somme d’une série géométrique en s’appuyant sur la formule suivante : -SIGN = SIGNE ## Renvoie le signe d’un nombre. -SIN = SIN ## Renvoie le sinus d’un angle donné. -SINH = SINH ## Renvoie le sinus hyperbolique d’un nombre. -SQRT = RACINE ## Renvoie la racine carrée d’un nombre. -SQRTPI = RACINE.PI ## Renvoie la racine carrée de (nombre * pi). -SUBTOTAL = SOUS.TOTAL ## Renvoie un sous-total dans une liste ou une base de données. -SUM = SOMME ## Calcule la somme de ses arguments. -SUMIF = SOMME.SI ## Additionne les cellules spécifiées si elles répondent à un critère donné. -SUMIFS = SOMME.SI.ENS ## Ajoute les cellules d’une plage qui répondent à plusieurs critères. -SUMPRODUCT = SOMMEPROD ## Multiplie les valeurs correspondantes des matrices spécifiées et calcule la somme de ces produits. -SUMSQ = SOMME.CARRES ## Renvoie la somme des carrés des arguments. -SUMX2MY2 = SOMME.X2MY2 ## Renvoie la somme de la différence des carrés des valeurs correspondantes de deux matrices. -SUMX2PY2 = SOMME.X2PY2 ## Renvoie la somme de la somme des carrés des valeurs correspondantes de deux matrices. -SUMXMY2 = SOMME.XMY2 ## Renvoie la somme des carrés des différences entre les valeurs correspondantes de deux matrices. -TAN = TAN ## Renvoie la tangente d’un nombre. -TANH = TANH ## Renvoie la tangente hyperbolique d’un nombre. -TRUNC = TRONQUE ## Renvoie la partie entière d’un nombre. - - -## -## Statistical functions Fonctions statistiques -## -AVEDEV = ECART.MOYEN ## Renvoie la moyenne des écarts absolus observés dans la moyenne des points de données. -AVERAGE = MOYENNE ## Renvoie la moyenne de ses arguments. -AVERAGEA = AVERAGEA ## Renvoie la moyenne de ses arguments, nombres, texte et valeurs logiques inclus. -AVERAGEIF = MOYENNE.SI ## Renvoie la moyenne (arithmétique) de toutes les cellules d’une plage qui répondent à des critères donnés. -AVERAGEIFS = MOYENNE.SI.ENS ## Renvoie la moyenne (arithmétique) de toutes les cellules qui répondent à plusieurs critères. -BETADIST = LOI.BETA ## Renvoie la fonction de distribution cumulée. -BETAINV = BETA.INVERSE ## Renvoie l’inverse de la fonction de distribution cumulée pour une distribution bêta spécifiée. -BINOMDIST = LOI.BINOMIALE ## Renvoie la probabilité d’une variable aléatoire discrète suivant la loi binomiale. -CHIDIST = LOI.KHIDEUX ## Renvoie la probabilité unilatérale de la distribution khi-deux. -CHIINV = KHIDEUX.INVERSE ## Renvoie l’inverse de la probabilité unilatérale de la distribution khi-deux. -CHITEST = TEST.KHIDEUX ## Renvoie le test d’indépendance. -CONFIDENCE = INTERVALLE.CONFIANCE ## Renvoie l’intervalle de confiance pour une moyenne de population. -CORREL = COEFFICIENT.CORRELATION ## Renvoie le coefficient de corrélation entre deux séries de données. -COUNT = NB ## Détermine les nombres compris dans la liste des arguments. -COUNTA = NBVAL ## Détermine le nombre de valeurs comprises dans la liste des arguments. -COUNTBLANK = NB.VIDE ## Compte le nombre de cellules vides dans une plage. -COUNTIF = NB.SI ## Compte le nombre de cellules qui répondent à un critère donné dans une plage. -COUNTIFS = NB.SI.ENS ## Compte le nombre de cellules à l’intérieur d’une plage qui répondent à plusieurs critères. -COVAR = COVARIANCE ## Renvoie la covariance, moyenne des produits des écarts pour chaque série d’observations. -CRITBINOM = CRITERE.LOI.BINOMIALE ## Renvoie la plus petite valeur pour laquelle la distribution binomiale cumulée est inférieure ou égale à une valeur de critère. -DEVSQ = SOMME.CARRES.ECARTS ## Renvoie la somme des carrés des écarts. -EXPONDIST = LOI.EXPONENTIELLE ## Renvoie la distribution exponentielle. -FDIST = LOI.F ## Renvoie la distribution de probabilité F. -FINV = INVERSE.LOI.F ## Renvoie l’inverse de la distribution de probabilité F. -FISHER = FISHER ## Renvoie la transformation de Fisher. -FISHERINV = FISHER.INVERSE ## Renvoie l’inverse de la transformation de Fisher. -FORECAST = PREVISION ## Calcule une valeur par rapport à une tendance linéaire. -FREQUENCY = FREQUENCE ## Calcule la fréquence d’apparition des valeurs dans une plage de valeurs, puis renvoie des nombres sous forme de matrice verticale. -FTEST = TEST.F ## Renvoie le résultat d’un test F. -GAMMADIST = LOI.GAMMA ## Renvoie la probabilité d’une variable aléatoire suivant une loi Gamma. -GAMMAINV = LOI.GAMMA.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi Gamma. -GAMMALN = LNGAMMA ## Renvoie le logarithme népérien de la fonction Gamma, G(x) -GEOMEAN = MOYENNE.GEOMETRIQUE ## Renvoie la moyenne géométrique. -GROWTH = CROISSANCE ## Calcule des valeurs par rapport à une tendance exponentielle. -HARMEAN = MOYENNE.HARMONIQUE ## Renvoie la moyenne harmonique. -HYPGEOMDIST = LOI.HYPERGEOMETRIQUE ## Renvoie la probabilité d’une variable aléatoire discrète suivant une loi hypergéométrique. -INTERCEPT = ORDONNEE.ORIGINE ## Renvoie l’ordonnée à l’origine d’une droite de régression linéaire. -KURT = KURTOSIS ## Renvoie le kurtosis d’une série de données. -LARGE = GRANDE.VALEUR ## Renvoie la k-ième plus grande valeur d’une série de données. -LINEST = DROITEREG ## Renvoie les paramètres d’une tendance linéaire. -LOGEST = LOGREG ## Renvoie les paramètres d’une tendance exponentielle. -LOGINV = LOI.LOGNORMALE.INVERSE ## Renvoie l’inverse de la probabilité pour une variable aléatoire suivant la loi lognormale. -LOGNORMDIST = LOI.LOGNORMALE ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi lognormale. -MAX = MAX ## Renvoie la valeur maximale contenue dans une liste d’arguments. -MAXA = MAXA ## Renvoie la valeur maximale d’une liste d’arguments, nombres, texte et valeurs logiques inclus. -MEDIAN = MEDIANE ## Renvoie la valeur médiane des nombres donnés. -MIN = MIN ## Renvoie la valeur minimale contenue dans une liste d’arguments. -MINA = MINA ## Renvoie la plus petite valeur d’une liste d’arguments, nombres, texte et valeurs logiques inclus. -MODE = MODE ## Renvoie la valeur la plus courante d’une série de données. -NEGBINOMDIST = LOI.BINOMIALE.NEG ## Renvoie la probabilité d’une variable aléatoire discrète suivant une loi binomiale négative. -NORMDIST = LOI.NORMALE ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi normale. -NORMINV = LOI.NORMALE.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi normale standard. -NORMSDIST = LOI.NORMALE.STANDARD ## Renvoie la probabilité d’une variable aléatoire continue suivant une loi normale standard. -NORMSINV = LOI.NORMALE.STANDARD.INVERSE ## Renvoie l’inverse de la distribution cumulée normale standard. -PEARSON = PEARSON ## Renvoie le coefficient de corrélation d’échantillonnage de Pearson. -PERCENTILE = CENTILE ## Renvoie le k-ième centile des valeurs d’une plage. -PERCENTRANK = RANG.POURCENTAGE ## Renvoie le rang en pourcentage d’une valeur d’une série de données. -PERMUT = PERMUTATION ## Renvoie le nombre de permutations pour un nombre donné d’objets. -POISSON = LOI.POISSON ## Renvoie la probabilité d’une variable aléatoire suivant une loi de Poisson. -PROB = PROBABILITE ## Renvoie la probabilité que des valeurs d’une plage soient comprises entre deux limites. -QUARTILE = QUARTILE ## Renvoie le quartile d’une série de données. -RANK = RANG ## Renvoie le rang d’un nombre contenu dans une liste. -RSQ = COEFFICIENT.DETERMINATION ## Renvoie la valeur du coefficient de détermination R^2 d’une régression linéaire. -SKEW = COEFFICIENT.ASYMETRIE ## Renvoie l’asymétrie d’une distribution. -SLOPE = PENTE ## Renvoie la pente d’une droite de régression linéaire. -SMALL = PETITE.VALEUR ## Renvoie la k-ième plus petite valeur d’une série de données. -STANDARDIZE = CENTREE.REDUITE ## Renvoie une valeur centrée réduite. -STDEV = ECARTYPE ## Évalue l’écart type d’une population en se basant sur un échantillon de cette population. -STDEVA = STDEVA ## Évalue l’écart type d’une population en se basant sur un échantillon de cette population, nombres, texte et valeurs logiques inclus. -STDEVP = ECARTYPEP ## Calcule l’écart type d’une population à partir de la population entière. -STDEVPA = STDEVPA ## Calcule l’écart type d’une population à partir de l’ensemble de la population, nombres, texte et valeurs logiques inclus. -STEYX = ERREUR.TYPE.XY ## Renvoie l’erreur type de la valeur y prévue pour chaque x de la régression. -TDIST = LOI.STUDENT ## Renvoie la probabilité d’une variable aléatoire suivant une loi T de Student. -TINV = LOI.STUDENT.INVERSE ## Renvoie, pour une probabilité donnée, la valeur d’une variable aléatoire suivant une loi T de Student. -TREND = TENDANCE ## Renvoie des valeurs par rapport à une tendance linéaire. -TRIMMEAN = MOYENNE.REDUITE ## Renvoie la moyenne de l’intérieur d’une série de données. -TTEST = TEST.STUDENT ## Renvoie la probabilité associée à un test T de Student. -VAR = VAR ## Calcule la variance sur la base d’un échantillon. -VARA = VARA ## Estime la variance d’une population en se basant sur un échantillon de cette population, nombres, texte et valeurs logiques incluses. -VARP = VAR.P ## Calcule la variance sur la base de l’ensemble de la population. -VARPA = VARPA ## Calcule la variance d’une population en se basant sur la population entière, nombres, texte et valeurs logiques inclus. -WEIBULL = LOI.WEIBULL ## Renvoie la probabilité d’une variable aléatoire suivant une loi de Weibull. -ZTEST = TEST.Z ## Renvoie la valeur de probabilité unilatérale d’un test z. - - -## -## Text functions Fonctions de texte -## -ASC = ASC ## Change les caractères anglais ou katakana à pleine chasse (codés sur deux octets) à l’intérieur d’une chaîne de caractères en caractères à demi-chasse (codés sur un octet). -BAHTTEXT = BAHTTEXT ## Convertit un nombre en texte en utilisant le format monétaire ß (baht). -CHAR = CAR ## Renvoie le caractère spécifié par le code numérique. -CLEAN = EPURAGE ## Supprime tous les caractères de contrôle du texte. -CODE = CODE ## Renvoie le numéro de code du premier caractère du texte. -CONCATENATE = CONCATENER ## Assemble plusieurs éléments textuels de façon à n’en former qu’un seul. -DOLLAR = EURO ## Convertit un nombre en texte en utilisant le format monétaire € (euro). -EXACT = EXACT ## Vérifie si deux valeurs de texte sont identiques. -FIND = TROUVE ## Trouve un valeur textuelle dans une autre, en respectant la casse. -FINDB = TROUVERB ## Trouve un valeur textuelle dans une autre, en respectant la casse. -FIXED = CTXT ## Convertit un nombre au format texte avec un nombre de décimales spécifié. -JIS = JIS ## Change les caractères anglais ou katakana à demi-chasse (codés sur un octet) à l’intérieur d’une chaîne de caractères en caractères à à pleine chasse (codés sur deux octets). -LEFT = GAUCHE ## Renvoie des caractères situés à l’extrême gauche d’une chaîne de caractères. -LEFTB = GAUCHEB ## Renvoie des caractères situés à l’extrême gauche d’une chaîne de caractères. -LEN = NBCAR ## Renvoie le nombre de caractères contenus dans une chaîne de texte. -LENB = LENB ## Renvoie le nombre de caractères contenus dans une chaîne de texte. -LOWER = MINUSCULE ## Convertit le texte en minuscules. -MID = STXT ## Renvoie un nombre déterminé de caractères d’une chaîne de texte à partir de la position que vous indiquez. -MIDB = STXTB ## Renvoie un nombre déterminé de caractères d’une chaîne de texte à partir de la position que vous indiquez. -PHONETIC = PHONETIQUE ## Extrait les caractères phonétiques (furigana) d’une chaîne de texte. -PROPER = NOMPROPRE ## Met en majuscules la première lettre de chaque mot dans une chaîne textuelle. -REPLACE = REMPLACER ## Remplace des caractères dans un texte. -REPLACEB = REMPLACERB ## Remplace des caractères dans un texte. -REPT = REPT ## Répète un texte un certain nombre de fois. -RIGHT = DROITE ## Renvoie des caractères situés à l’extrême droite d’une chaîne de caractères. -RIGHTB = DROITEB ## Renvoie des caractères situés à l’extrême droite d’une chaîne de caractères. -SEARCH = CHERCHE ## Trouve un texte dans un autre texte (sans respecter la casse). -SEARCHB = CHERCHERB ## Trouve un texte dans un autre texte (sans respecter la casse). -SUBSTITUTE = SUBSTITUE ## Remplace l’ancien texte d’une chaîne de caractères par un nouveau. -T = T ## Convertit ses arguments en texte. -TEXT = TEXTE ## Convertit un nombre au format texte. -TRIM = SUPPRESPACE ## Supprime les espaces du texte. -UPPER = MAJUSCULE ## Convertit le texte en majuscules. -VALUE = CNUM ## Convertit un argument textuel en nombre diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config deleted file mode 100644 index 080b201..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = Ft - - -## -## Excel Error Codes (For future use) -## -NULL = #NULLA! -DIV0 = #ZÉRÓOSZTÓ! -VALUE = #ÉRTÉK! -REF = #HIV! -NAME = #NÉV? -NUM = #SZÁM! -NA = #HIÁNYZIK diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions deleted file mode 100644 index 200d3f7..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Bővítmények és automatizálási függvények -## -GETPIVOTDATA = KIMUTATÁSADATOT.VESZ ## A kimutatásokban tárolt adatok visszaadására használható. - - -## -## Cube functions Kockafüggvények -## -CUBEKPIMEMBER = KOCKA.FŐTELJMUT ## Egy fő teljesítménymutató (KPI) nevét, tulajdonságát és mértékegységét adja eredményül, a nevet és a tulajdonságot megjeleníti a cellában. A KPI-k számszerűsíthető mérési lehetőséget jelentenek – ilyen mutató például a havi bruttó nyereség vagy az egy alkalmazottra jutó negyedéves forgalom –, egy szervezet teljesítményének nyomonkövetésére használhatók. -CUBEMEMBER = KOCKA.TAG ## Kockahierachia tagját vagy rekordját adja eredményül. Ellenőrizhető vele, hogy szerepel-e a kockában az adott tag vagy rekord. -CUBEMEMBERPROPERTY = KOCKA.TAG.TUL ## A kocka egyik tagtulajdonságának értékét adja eredményül. Használatával ellenőrizhető, hogy szerepel-e egy tagnév a kockában, eredménye pedig az erre a tagra vonatkozó, megadott tulajdonság. -CUBERANKEDMEMBER = KOCKA.HALM.ELEM ## Egy halmaz rangsor szerinti n-edik tagját adja eredményül. Használatával egy halmaz egy vagy több elemét kaphatja meg, például a legnagyobb teljesítményű üzletkötőt vagy a 10 legjobb tanulót. -CUBESET = KOCKA.HALM ## Számított tagok vagy rekordok halmazát adja eredményül, ehhez egy beállított kifejezést elküld a kiszolgálón található kockának, majd ezt a halmazt adja vissza a Microsoft Office Excel alkalmazásnak. -CUBESETCOUNT = KOCKA.HALM.DB ## Egy halmaz elemszámát adja eredményül. -CUBEVALUE = KOCKA.ÉRTÉK ## Kockából összesített értéket ad eredményül. - - -## -## Database functions Adatbázis-kezelő függvények -## -DAVERAGE = AB.ÁTLAG ## A kijelölt adatbáziselemek átlagát számítja ki. -DCOUNT = AB.DARAB ## Megszámolja, hogy az adatbázisban hány cella tartalmaz számokat. -DCOUNTA = AB.DARAB2 ## Megszámolja az adatbázisban lévő nem üres cellákat. -DGET = AB.MEZŐ ## Egy adatbázisból egyetlen olyan rekordot ad vissza, amely megfelel a megadott feltételeknek. -DMAX = AB.MAX ## A kiválasztott adatbáziselemek közül a legnagyobb értéket adja eredményül. -DMIN = AB.MIN ## A kijelölt adatbáziselemek közül a legkisebb értéket adja eredményül. -DPRODUCT = AB.SZORZAT ## Az adatbázis megadott feltételeknek eleget tevő rekordjaira összeszorozza a megadott mezőben található számértékeket, és eredményül ezt a szorzatot adja. -DSTDEV = AB.SZÓRÁS ## A kijelölt adatbáziselemek egy mintája alapján megbecsüli a szórást. -DSTDEVP = AB.SZÓRÁS2 ## A kijelölt adatbáziselemek teljes sokasága alapján kiszámítja a szórást. -DSUM = AB.SZUM ## Összeadja a feltételnek megfelelő adatbázisrekordok mezőoszlopában a számokat. -DVAR = AB.VAR ## A kijelölt adatbáziselemek mintája alapján becslést ad a szórásnégyzetre. -DVARP = AB.VAR2 ## A kijelölt adatbáziselemek teljes sokasága alapján kiszámítja a szórásnégyzetet. - - -## -## Date and time functions Dátumfüggvények -## -DATE = DÁTUM ## Adott dátum dátumértékét adja eredményül. -DATEVALUE = DÁTUMÉRTÉK ## Szövegként megadott dátumot dátumértékké alakít át. -DAY = NAP ## Dátumértéket a hónap egy napjává (0-31) alakít. -DAYS360 = NAP360 ## Két dátum közé eső napok számát számítja ki a 360 napos év alapján. -EDATE = EDATE ## Adott dátumnál adott számú hónappal korábbi vagy későbbi dátum dátumértékét adja eredményül. -EOMONTH = EOMONTH ## Adott dátumnál adott számú hónappal korábbi vagy későbbi hónap utolsó napjának dátumértékét adja eredményül. -HOUR = ÓRA ## Időértéket órákká alakít. -MINUTE = PERC ## Időértéket percekké alakít. -MONTH = HÓNAP ## Időértéket hónapokká alakít. -NETWORKDAYS = NETWORKDAYS ## Két dátum között a teljes munkanapok számát adja meg. -NOW = MOST ## A napi dátum dátumértékét és a pontos idő időértékét adja eredményül. -SECOND = MPERC ## Időértéket másodpercekké alakít át. -TIME = IDŐ ## Adott időpont időértékét adja meg. -TIMEVALUE = IDŐÉRTÉK ## Szövegként megadott időpontot időértékké alakít át. -TODAY = MA ## A napi dátum dátumértékét adja eredményül. -WEEKDAY = HÉT.NAPJA ## Dátumértéket a hét napjává alakítja át. -WEEKNUM = WEEKNUM ## Visszatérési értéke egy szám, amely azt mutatja meg, hogy a megadott dátum az év hányadik hetére esik. -WORKDAY = WORKDAY ## Adott dátumnál adott munkanappal korábbi vagy későbbi dátum dátumértékét adja eredményül. -YEAR = ÉV ## Sorszámot évvé alakít át. -YEARFRAC = YEARFRAC ## Az adott dátumok közötti teljes napok számát törtévként adja meg. - - -## -## Engineering functions Mérnöki függvények -## -BESSELI = BESSELI ## Az In(x) módosított Bessel-függvény értékét adja eredményül. -BESSELJ = BESSELJ ## A Jn(x) Bessel-függvény értékét adja eredményül. -BESSELK = BESSELK ## A Kn(x) módosított Bessel-függvény értékét adja eredményül. -BESSELY = BESSELY ## Az Yn(x) módosított Bessel-függvény értékét adja eredményül. -BIN2DEC = BIN2DEC ## Bináris számot decimálissá alakít át. -BIN2HEX = BIN2HEX ## Bináris számot hexadecimálissá alakít át. -BIN2OCT = BIN2OCT ## Bináris számot oktálissá alakít át. -COMPLEX = COMPLEX ## Valós és képzetes részből komplex számot képez. -CONVERT = CONVERT ## Mértékegységeket vált át. -DEC2BIN = DEC2BIN ## Decimális számot binárissá alakít át. -DEC2HEX = DEC2HEX ## Decimális számot hexadecimálissá alakít át. -DEC2OCT = DEC2OCT ## Decimális számot oktálissá alakít át. -DELTA = DELTA ## Azt vizsgálja, hogy két érték egyenlő-e. -ERF = ERF ## A hibafüggvény értékét adja eredményül. -ERFC = ERFC ## A kiegészített hibafüggvény értékét adja eredményül. -GESTEP = GESTEP ## Azt vizsgálja, hogy egy szám nagyobb-e adott küszöbértéknél. -HEX2BIN = HEX2BIN ## Hexadecimális számot binárissá alakít át. -HEX2DEC = HEX2DEC ## Hexadecimális számot decimálissá alakít át. -HEX2OCT = HEX2OCT ## Hexadecimális számot oktálissá alakít át. -IMABS = IMABS ## Komplex szám abszolút értékét (modulusát) adja eredményül. -IMAGINARY = IMAGINARY ## Komplex szám képzetes részét adja eredményül. -IMARGUMENT = IMARGUMENT ## A komplex szám radiánban kifejezett théta argumentumát adja eredményül. -IMCONJUGATE = IMCONJUGATE ## Komplex szám komplex konjugáltját adja eredményül. -IMCOS = IMCOS ## Komplex szám koszinuszát adja eredményül. -IMDIV = IMDIV ## Két komplex szám hányadosát adja eredményül. -IMEXP = IMEXP ## Az e szám komplex kitevőjű hatványát adja eredményül. -IMLN = IMLN ## Komplex szám természetes logaritmusát adja eredményül. -IMLOG10 = IMLOG10 ## Komplex szám tízes alapú logaritmusát adja eredményül. -IMLOG2 = IMLOG2 ## Komplex szám kettes alapú logaritmusát adja eredményül. -IMPOWER = IMPOWER ## Komplex szám hatványát adja eredményül. -IMPRODUCT = IMPRODUCT ## Komplex számok szorzatát adja eredményül. -IMREAL = IMREAL ## Komplex szám valós részét adja eredményül. -IMSIN = IMSIN ## Komplex szám szinuszát adja eredményül. -IMSQRT = IMSQRT ## Komplex szám négyzetgyökét adja eredményül. -IMSUB = IMSUB ## Két komplex szám különbségét adja eredményül. -IMSUM = IMSUM ## Komplex számok összegét adja eredményül. -OCT2BIN = OCT2BIN ## Oktális számot binárissá alakít át. -OCT2DEC = OCT2DEC ## Oktális számot decimálissá alakít át. -OCT2HEX = OCT2HEX ## Oktális számot hexadecimálissá alakít át. - - -## -## Financial functions Pénzügyi függvények -## -ACCRINT = ACCRINT ## Periodikusan kamatozó értékpapír felszaporodott kamatát adja eredményül. -ACCRINTM = ACCRINTM ## Lejáratkor kamatozó értékpapír felszaporodott kamatát adja eredményül. -AMORDEGRC = AMORDEGRC ## Állóeszköz lineáris értékcsökkenését adja meg az egyes könyvelési időszakokra vonatkozóan. -AMORLINC = AMORLINC ## Az egyes könyvelési időszakokban az értékcsökkenést adja meg. -COUPDAYBS = COUPDAYBS ## A szelvényidőszak kezdetétől a kifizetés időpontjáig eltelt napokat adja vissza. -COUPDAYS = COUPDAYS ## A kifizetés időpontját magában foglaló szelvényperiódus hosszát adja meg napokban. -COUPDAYSNC = COUPDAYSNC ## A kifizetés időpontja és a legközelebbi szelvénydátum közötti napok számát adja meg. -COUPNCD = COUPNCD ## A kifizetést követő legelső szelvénydátumot adja eredményül. -COUPNUM = COUPNUM ## A kifizetés és a lejárat időpontja között kifizetendő szelvények számát adja eredményül. -COUPPCD = COUPPCD ## A kifizetés előtti utolsó szelvénydátumot adja eredményül. -CUMIPMT = CUMIPMT ## Két fizetési időszak között kifizetett kamat halmozott értékét adja eredményül. -CUMPRINC = CUMPRINC ## Két fizetési időszak között kifizetett részletek halmozott (kamatot nem tartalmazó) értékét adja eredményül. -DB = KCS2 ## Eszköz adott időszak alatti értékcsökkenését számítja ki a lineáris leírási modell alkalmazásával. -DDB = KCSA ## Eszköz értékcsökkenését számítja ki adott időszakra vonatkozóan a progresszív vagy egyéb megadott leírási modell alkalmazásával. -DISC = DISC ## Értékpapír leszámítolási kamatlábát adja eredményül. -DOLLARDE = DOLLARDE ## Egy közönséges törtként megadott számot tizedes törtté alakít át. -DOLLARFR = DOLLARFR ## Tizedes törtként megadott számot közönséges törtté alakít át. -DURATION = DURATION ## Periodikus kamatfizetésű értékpapír éves kamatérzékenységét adja eredményül. -EFFECT = EFFECT ## Az éves tényleges kamatláb értékét adja eredményül. -FV = JBÉ ## Befektetés jövőbeli értékét számítja ki. -FVSCHEDULE = FVSCHEDULE ## A kezdőtőke adott kamatlábak szerint megnövelt jövőbeli értékét adja eredményül. -INTRATE = INTRATE ## A lejáratig teljesen lekötött értékpapír kamatrátáját adja eredményül. -IPMT = RRÉSZLET ## Hiteltörlesztésen belül a tőketörlesztés nagyságát számítja ki adott időszakra. -IRR = BMR ## A befektetés belső megtérülési rátáját számítja ki pénzáramláshoz. -ISPMT = LRÉSZLETKAMAT ## A befektetés adott időszakára fizetett kamatot számítja ki. -MDURATION = MDURATION ## Egy 100 Ft névértékű értékpapír Macauley-féle módosított kamatérzékenységét adja eredményül. -MIRR = MEGTÉRÜLÉS ## A befektetés belső megtérülési rátáját számítja ki a költségek és a bevételek különböző kamatlába mellett. -NOMINAL = NOMINAL ## Az éves névleges kamatláb értékét adja eredményül. -NPER = PER.SZÁM ## A törlesztési időszakok számát adja meg. -NPV = NMÉ ## Befektetéshez kapcsolódó pénzáramlás nettó jelenértékét számítja ki ismert pénzáramlás és kamatláb mellett. -ODDFPRICE = ODDFPRICE ## Egy 100 Ft névértékű, a futamidő elején töredék-időszakos értékpapír árát adja eredményül. -ODDFYIELD = ODDFYIELD ## A futamidő elején töredék-időszakos értékpapír hozamát adja eredményül. -ODDLPRICE = ODDLPRICE ## Egy 100 Ft névértékű, a futamidő végén töredék-időszakos értékpapír árát adja eredményül. -ODDLYIELD = ODDLYIELD ## A futamidő végén töredék-időszakos értékpapír hozamát adja eredményül. -PMT = RÉSZLET ## A törlesztési időszakra vonatkozó törlesztési összeget számítja ki. -PPMT = PRÉSZLET ## Hiteltörlesztésen belül a tőketörlesztés nagyságát számítja ki adott időszakra. -PRICE = PRICE ## Egy 100 Ft névértékű, periodikusan kamatozó értékpapír árát adja eredményül. -PRICEDISC = PRICEDISC ## Egy 100 Ft névértékű leszámítolt értékpapír árát adja eredményül. -PRICEMAT = PRICEMAT ## Egy 100 Ft névértékű, a lejáratkor kamatozó értékpapír árát adja eredményül. -PV = MÉ ## Befektetés jelenlegi értékét számítja ki. -RATE = RÁTA ## Egy törlesztési időszakban az egy időszakra eső kamatláb nagyságát számítja ki. -RECEIVED = RECEIVED ## A lejáratig teljesen lekötött értékpapír lejáratakor kapott összegét adja eredményül. -SLN = LCSA ## Tárgyi eszköz egy időszakra eső amortizációját adja meg bruttó érték szerinti lineáris leírási kulcsot alkalmazva. -SYD = SYD ## Tárgyi eszköz értékcsökkenését számítja ki adott időszakra az évek számjegyösszegével dolgozó módszer alapján. -TBILLEQ = TBILLEQ ## Kincstárjegy kötvény-egyenértékű hozamát adja eredményül. -TBILLPRICE = TBILLPRICE ## Egy 100 Ft névértékű kincstárjegy árát adja eredményül. -TBILLYIELD = TBILLYIELD ## Kincstárjegy hozamát adja eredményül. -VDB = ÉCSRI ## Tárgyi eszköz amortizációját számítja ki megadott vagy részidőszakra a csökkenő egyenleg módszerének alkalmazásával. -XIRR = XIRR ## Ütemezett készpénzforgalom (cash flow) belső megtérülési kamatrátáját adja eredményül. -XNPV = XNPV ## Ütemezett készpénzforgalom (cash flow) nettó jelenlegi értékét adja eredményül. -YIELD = YIELD ## Periodikusan kamatozó értékpapír hozamát adja eredményül. -YIELDDISC = YIELDDISC ## Leszámítolt értékpapír (például kincstárjegy) éves hozamát adja eredményül. -YIELDMAT = YIELDMAT ## Lejáratkor kamatozó értékpapír éves hozamát adja eredményül. - - -## -## Information functions Információs függvények -## -CELL = CELLA ## Egy cella formátumára, elhelyezkedésére vagy tartalmára vonatkozó adatokat ad eredményül. -ERROR.TYPE = HIBA.TÍPUS ## Egy hibatípushoz tartozó számot ad eredményül. -INFO = INFÓ ## A rendszer- és munkakörnyezet pillanatnyi állapotáról ad felvilágosítást. -ISBLANK = ÜRES ## Eredménye IGAZ, ha az érték üres. -ISERR = HIBA ## Eredménye IGAZ, ha az érték valamelyik hibaérték a #HIÁNYZIK kivételével. -ISERROR = HIBÁS ## Eredménye IGAZ, ha az érték valamelyik hibaérték. -ISEVEN = ISEVEN ## Eredménye IGAZ, ha argumentuma páros szám. -ISLOGICAL = LOGIKAI ## Eredménye IGAZ, ha az érték logikai érték. -ISNA = NINCS ## Eredménye IGAZ, ha az érték a #HIÁNYZIK hibaérték. -ISNONTEXT = NEM.SZÖVEG ## Eredménye IGAZ, ha az érték nem szöveg. -ISNUMBER = SZÁM ## Eredménye IGAZ, ha az érték szám. -ISODD = ISODD ## Eredménye IGAZ, ha argumentuma páratlan szám. -ISREF = HIVATKOZÁS ## Eredménye IGAZ, ha az érték hivatkozás. -ISTEXT = SZÖVEG.E ## Eredménye IGAZ, ha az érték szöveg. -N = N ## Argumentumának értékét számmá alakítja. -NA = HIÁNYZIK ## Eredménye a #HIÁNYZIK hibaérték. -TYPE = TÍPUS ## Érték adattípusának azonosítószámát adja eredményül. - - -## -## Logical functions Logikai függvények -## -AND = ÉS ## Eredménye IGAZ, ha minden argumentuma IGAZ. -FALSE = HAMIS ## A HAMIS logikai értéket adja eredményül. -IF = HA ## Logikai vizsgálatot hajt végre. -IFERROR = HAHIBA ## A megadott értéket adja vissza, ha egy képlet hibához vezet; más esetben a képlet értékét adja eredményül. -NOT = NEM ## Argumentuma értékének ellentettjét adja eredményül. -OR = VAGY ## Eredménye IGAZ, ha bármely argumentuma IGAZ. -TRUE = IGAZ ## Az IGAZ logikai értéket adja eredményül. - - -## -## Lookup and reference functions Keresési és hivatkozási függvények -## -ADDRESS = CÍM ## A munkalap egy cellájára való hivatkozást adja szövegként eredményül. -AREAS = TERÜLET ## Hivatkozásban a területek számát adja eredményül. -CHOOSE = VÁLASZT ## Értékek listájából választ ki egy elemet. -COLUMN = OSZLOP ## Egy hivatkozás oszlopszámát adja eredményül. -COLUMNS = OSZLOPOK ## A hivatkozásban található oszlopok számát adja eredményül. -HLOOKUP = VKERES ## A megadott tömb felső sorában adott értékű elemet keres, és a megtalált elem oszlopából adott sorban elhelyezkedő értékkel tér vissza. -HYPERLINK = HIPERHIVATKOZÁS ## Hálózati kiszolgálón, intraneten vagy az interneten tárolt dokumentumot megnyitó parancsikont vagy hivatkozást hoz létre. -INDEX = INDEX ## Tömb- vagy hivatkozás indexszel megadott értékét adja vissza. -INDIRECT = INDIREKT ## Szöveg megadott hivatkozást ad eredményül. -LOOKUP = KERES ## Vektorban vagy tömbben keres meg értékeket. -MATCH = HOL.VAN ## Hivatkozásban vagy tömbben értékeket keres. -OFFSET = OFSZET ## Hivatkozás egy másik hivatkozástól számított távolságát adja meg. -ROW = SOR ## Egy hivatkozás sorának számát adja meg. -ROWS = SOROK ## Egy hivatkozás sorainak számát adja meg. -RTD = RTD ## Valós idejű adatokat keres vissza a COM automatizmust (automatizálás: Egy alkalmazás objektumaival való munka másik alkalmazásból vagy fejlesztőeszközből. A korábban OLE automatizmusnak nevezett automatizálás iparági szabvány, a Component Object Model (COM) szolgáltatása.) támogató programból. -TRANSPOSE = TRANSZPONÁLÁS ## Egy tömb transzponáltját adja eredményül. -VLOOKUP = FKERES ## A megadott tömb bal szélső oszlopában megkeres egy értéket, majd annak sora és a megadott oszlop metszéspontjában levő értéked adja eredményül. - - -## -## Math and trigonometry functions Matematikai és trigonometrikus függvények -## -ABS = ABS ## Egy szám abszolút értékét adja eredményül. -ACOS = ARCCOS ## Egy szám arkusz koszinuszát számítja ki. -ACOSH = ACOSH ## Egy szám inverz koszinusz hiperbolikuszát számítja ki. -ASIN = ARCSIN ## Egy szám arkusz szinuszát számítja ki. -ASINH = ASINH ## Egy szám inverz szinusz hiperbolikuszát számítja ki. -ATAN = ARCTAN ## Egy szám arkusz tangensét számítja ki. -ATAN2 = ARCTAN2 ## X és y koordináták alapján számítja ki az arkusz tangens értéket. -ATANH = ATANH ## A szám inverz tangens hiperbolikuszát számítja ki. -CEILING = PLAFON ## Egy számot a legközelebbi egészre vagy a pontosságként megadott érték legközelebb eső többszörösére kerekít. -COMBIN = KOMBINÁCIÓK ## Adott számú objektum összes lehetséges kombinációinak számát számítja ki. -COS = COS ## Egy szám koszinuszát számítja ki. -COSH = COSH ## Egy szám koszinusz hiperbolikuszát számítja ki. -DEGREES = FOK ## Radiánt fokká alakít át. -EVEN = PÁROS ## Egy számot a legközelebbi páros egész számra kerekít. -EXP = KITEVŐ ## Az e adott kitevőjű hatványát adja eredményül. -FACT = FAKT ## Egy szám faktoriálisát számítja ki. -FACTDOUBLE = FACTDOUBLE ## Egy szám dupla faktoriálisát adja eredményül. -FLOOR = PADLÓ ## Egy számot lefelé, a nulla felé kerekít. -GCD = GCD ## A legnagyobb közös osztót adja eredményül. -INT = INT ## Egy számot lefelé kerekít a legközelebbi egészre. -LCM = LCM ## A legkisebb közös többszöröst adja eredményül. -LN = LN ## Egy szám természetes logaritmusát számítja ki. -LOG = LOG ## Egy szám adott alapú logaritmusát számítja ki. -LOG10 = LOG10 ## Egy szám 10-es alapú logaritmusát számítja ki. -MDETERM = MDETERM ## Egy tömb mátrix-determinánsát számítja ki. -MINVERSE = INVERZ.MÁTRIX ## Egy tömb mátrix inverzét adja eredményül. -MMULT = MSZORZAT ## Két tömb mátrix-szorzatát adja meg. -MOD = MARADÉK ## Egy szám osztási maradékát adja eredményül. -MROUND = MROUND ## A kívánt többszörösére kerekített értéket ad eredményül. -MULTINOMIAL = MULTINOMIAL ## Számhalmaz multinomiálisát adja eredményül. -ODD = PÁRATLAN ## Egy számot a legközelebbi páratlan számra kerekít. -PI = PI ## A pi matematikai állandót adja vissza. -POWER = HATVÁNY ## Egy szám adott kitevőjű hatványát számítja ki. -PRODUCT = SZORZAT ## Argumentumai szorzatát számítja ki. -QUOTIENT = QUOTIENT ## Egy hányados egész részét adja eredményül. -RADIANS = RADIÁN ## Fokot radiánná alakít át. -RAND = VÉL ## Egy 0 és 1 közötti véletlen számot ad eredményül. -RANDBETWEEN = RANDBETWEEN ## Megadott számok közé eső véletlen számot állít elő. -ROMAN = RÓMAI ## Egy számot római számokkal kifejezve szövegként ad eredményül. -ROUND = KEREKÍTÉS ## Egy számot adott számú számjegyre kerekít. -ROUNDDOWN = KEREKÍTÉS.LE ## Egy számot lefelé, a nulla felé kerekít. -ROUNDUP = KEREKÍTÉS.FEL ## Egy számot felfelé, a nullától távolabbra kerekít. -SERIESSUM = SERIESSUM ## Hatványsor összegét adja eredményül. -SIGN = ELŐJEL ## Egy szám előjelét adja meg. -SIN = SIN ## Egy szög szinuszát számítja ki. -SINH = SINH ## Egy szám szinusz hiperbolikuszát számítja ki. -SQRT = GYÖK ## Egy szám pozitív négyzetgyökét számítja ki. -SQRTPI = SQRTPI ## A (szám*pi) négyzetgyökét adja eredményül. -SUBTOTAL = RÉSZÖSSZEG ## Lista vagy adatbázis részösszegét adja eredményül. -SUM = SZUM ## Összeadja az argumentumlistájában lévő számokat. -SUMIF = SZUMHA ## A megadott feltételeknek eleget tevő cellákban található értékeket adja össze. -SUMIFS = SZUMHATÖBB ## Több megadott feltételnek eleget tévő tartománycellák összegét adja eredményül. -SUMPRODUCT = SZORZATÖSSZEG ## A megfelelő tömbelemek szorzatának összegét számítja ki. -SUMSQ = NÉGYZETÖSSZEG ## Argumentumai négyzetének összegét számítja ki. -SUMX2MY2 = SZUMX2BŐLY2 ## Két tömb megfelelő elemei négyzetének különbségét összegzi. -SUMX2PY2 = SZUMX2MEGY2 ## Két tömb megfelelő elemei négyzetének összegét összegzi. -SUMXMY2 = SZUMXBŐLY2 ## Két tömb megfelelő elemei különbségének négyzetösszegét számítja ki. -TAN = TAN ## Egy szám tangensét számítja ki. -TANH = TANH ## Egy szám tangens hiperbolikuszát számítja ki. -TRUNC = CSONK ## Egy számot egésszé csonkít. - - -## -## Statistical functions Statisztikai függvények -## -AVEDEV = ÁTL.ELTÉRÉS ## Az adatpontoknak átlaguktól való átlagos abszolút eltérését számítja ki. -AVERAGE = ÁTLAG ## Argumentumai átlagát számítja ki. -AVERAGEA = ÁTLAGA ## Argumentumai átlagát számítja ki (beleértve a számokat, szöveget és logikai értékeket). -AVERAGEIF = ÁTLAGHA ## A megadott feltételnek eleget tévő tartomány celláinak átlagát (számtani közepét) adja eredményül. -AVERAGEIFS = ÁTLAGHATÖBB ## A megadott feltételeknek eleget tévő cellák átlagát (számtani közepét) adja eredményül. -BETADIST = BÉTA.ELOSZLÁS ## A béta-eloszlás függvényt számítja ki. -BETAINV = INVERZ.BÉTA ## Adott béta-eloszláshoz kiszámítja a béta eloszlásfüggvény inverzét. -BINOMDIST = BINOM.ELOSZLÁS ## A diszkrét binomiális eloszlás valószínűségértékét számítja ki. -CHIDIST = KHI.ELOSZLÁS ## A khi-négyzet-eloszlás egyszélű valószínűségértékét számítja ki. -CHIINV = INVERZ.KHI ## A khi-négyzet-eloszlás egyszélű valószínűségértékének inverzét számítja ki. -CHITEST = KHI.PRÓBA ## Függetlenségvizsgálatot hajt végre. -CONFIDENCE = MEGBÍZHATÓSÁG ## Egy statisztikai sokaság várható értékének megbízhatósági intervallumát adja eredményül. -CORREL = KORREL ## Két adathalmaz korrelációs együtthatóját számítja ki. -COUNT = DARAB ## Megszámolja, hogy argumentumlistájában hány szám található. -COUNTA = DARAB2 ## Megszámolja, hogy argumentumlistájában hány érték található. -COUNTBLANK = DARABÜRES ## Egy tartományban összeszámolja az üres cellákat. -COUNTIF = DARABTELI ## Egy tartományban összeszámolja azokat a cellákat, amelyek eleget tesznek a megadott feltételnek. -COUNTIFS = DARABHATÖBB ## Egy tartományban összeszámolja azokat a cellákat, amelyek eleget tesznek több feltételnek. -COVAR = KOVAR ## A kovarianciát, azaz a páronkénti eltérések szorzatának átlagát számítja ki. -CRITBINOM = KRITBINOM ## Azt a legkisebb számot adja eredményül, amelyre a binomiális eloszlásfüggvény értéke nem kisebb egy adott határértéknél. -DEVSQ = SQ ## Az átlagtól való eltérések négyzetének összegét számítja ki. -EXPONDIST = EXP.ELOSZLÁS ## Az exponenciális eloszlás értékét számítja ki. -FDIST = F.ELOSZLÁS ## Az F-eloszlás értékét számítja ki. -FINV = INVERZ.F ## Az F-eloszlás inverzének értékét számítja ki. -FISHER = FISHER ## Fisher-transzformációt hajt végre. -FISHERINV = INVERZ.FISHER ## A Fisher-transzformáció inverzét hajtja végre. -FORECAST = ELŐREJELZÉS ## Az ismert értékek alapján lineáris regresszióval becsült értéket ad eredményül. -FREQUENCY = GYAKORISÁG ## A gyakorisági vagy empirikus eloszlás értékét függőleges tömbként adja eredményül. -FTEST = F.PRÓBA ## Az F-próba értékét adja eredményül. -GAMMADIST = GAMMA.ELOSZLÁS ## A gamma-eloszlás értékét számítja ki. -GAMMAINV = INVERZ.GAMMA ## A gamma-eloszlás eloszlásfüggvénye inverzének értékét számítja ki. -GAMMALN = GAMMALN ## A gamma-függvény természetes logaritmusát számítja ki. -GEOMEAN = MÉRTANI.KÖZÉP ## Argumentumai mértani középértékét számítja ki. -GROWTH = NÖV ## Exponenciális regresszió alapján ad becslést. -HARMEAN = HARM.KÖZÉP ## Argumentumai harmonikus átlagát számítja ki. -HYPGEOMDIST = HIPERGEOM.ELOSZLÁS ## A hipergeometriai eloszlás értékét számítja ki. -INTERCEPT = METSZ ## A regressziós egyenes y tengellyel való metszéspontját határozza meg. -KURT = CSÚCSOSSÁG ## Egy adathalmaz csúcsosságát számítja ki. -LARGE = NAGY ## Egy adathalmaz k-adik legnagyobb elemét adja eredményül. -LINEST = LIN.ILL ## A legkisebb négyzetek módszerével az adatokra illesztett egyenes paramétereit határozza meg. -LOGEST = LOG.ILL ## Az adatokra illesztett exponenciális görbe paramétereit határozza meg. -LOGINV = INVERZ.LOG.ELOSZLÁS ## A lognormális eloszlás inverzét számítja ki. -LOGNORMDIST = LOG.ELOSZLÁS ## A lognormális eloszlásfüggvény értékét számítja ki. -MAX = MAX ## Az argumentumai között szereplő legnagyobb számot adja meg. -MAXA = MAX2 ## Az argumentumai között szereplő legnagyobb számot adja meg (beleértve a számokat, szöveget és logikai értékeket). -MEDIAN = MEDIÁN ## Adott számhalmaz mediánját számítja ki. -MIN = MIN ## Az argumentumai között szereplő legkisebb számot adja meg. -MINA = MIN2 ## Az argumentumai között szereplő legkisebb számot adja meg, beleértve a számokat, szöveget és logikai értékeket. -MODE = MÓDUSZ ## Egy adathalmazból kiválasztja a leggyakrabban előforduló számot. -NEGBINOMDIST = NEGBINOM.ELOSZL ## A negatív binomiális eloszlás értékét számítja ki. -NORMDIST = NORM.ELOSZL ## A normális eloszlás értékét számítja ki. -NORMINV = INVERZ.NORM ## A normális eloszlás eloszlásfüggvénye inverzének értékét számítja ki. -NORMSDIST = STNORMELOSZL ## A standard normális eloszlás eloszlásfüggvényének értékét számítja ki. -NORMSINV = INVERZ.STNORM ## A standard normális eloszlás eloszlásfüggvénye inverzének értékét számítja ki. -PEARSON = PEARSON ## A Pearson-féle korrelációs együtthatót számítja ki. -PERCENTILE = PERCENTILIS ## Egy tartományban található értékek k-adik percentilisét, azaz százalékosztályát adja eredményül. -PERCENTRANK = SZÁZALÉKRANG ## Egy értéknek egy adathalmazon belül vett százalékos rangját (elhelyezkedését) számítja ki. -PERMUT = VARIÁCIÓK ## Adott számú objektum k-ad osztályú ismétlés nélküli variációinak számát számítja ki. -POISSON = POISSON ## A Poisson-eloszlás értékét számítja ki. -PROB = VALÓSZÍNŰSÉG ## Annak valószínűségét számítja ki, hogy adott értékek két határérték közé esnek. -QUARTILE = KVARTILIS ## Egy adathalmaz kvartilisét (negyedszintjét) számítja ki. -RANK = SORSZÁM ## Kiszámítja, hogy egy szám hányadik egy számsorozatban. -RSQ = RNÉGYZET ## Kiszámítja a Pearson-féle szorzatmomentum korrelációs együtthatójának négyzetét. -SKEW = FERDESÉG ## Egy eloszlás ferdeségét határozza meg. -SLOPE = MEREDEKSÉG ## Egy lineáris regressziós egyenes meredekségét számítja ki. -SMALL = KICSI ## Egy adathalmaz k-adik legkisebb elemét adja meg. -STANDARDIZE = NORMALIZÁLÁS ## Normalizált értéket ad eredményül. -STDEV = SZÓRÁS ## Egy statisztikai sokaság mintájából kiszámítja annak szórását. -STDEVA = SZÓRÁSA ## Egy statisztikai sokaság mintájából kiszámítja annak szórását (beleértve a számokat, szöveget és logikai értékeket). -STDEVP = SZÓRÁSP ## Egy statisztikai sokaság egészéből kiszámítja annak szórását. -STDEVPA = SZÓRÁSPA ## Egy statisztikai sokaság egészéből kiszámítja annak szórását (beleértve számokat, szöveget és logikai értékeket). -STEYX = STHIBAYX ## Egy regresszió esetén az egyes x-értékek alapján meghatározott y-értékek standard hibáját számítja ki. -TDIST = T.ELOSZLÁS ## A Student-féle t-eloszlás értékét számítja ki. -TINV = INVERZ.T ## A Student-féle t-eloszlás inverzét számítja ki. -TREND = TREND ## Lineáris trend értékeit számítja ki. -TRIMMEAN = RÉSZÁTLAG ## Egy adathalmaz középső részének átlagát számítja ki. -TTEST = T.PRÓBA ## A Student-féle t-próbához tartozó valószínűséget számítja ki. -VAR = VAR ## Minta alapján becslést ad a varianciára. -VARA = VARA ## Minta alapján becslést ad a varianciára (beleértve számokat, szöveget és logikai értékeket). -VARP = VARP ## Egy statisztikai sokaság varianciáját számítja ki. -VARPA = VARPA ## Egy statisztikai sokaság varianciáját számítja ki (beleértve számokat, szöveget és logikai értékeket). -WEIBULL = WEIBULL ## A Weibull-féle eloszlás értékét számítja ki. -ZTEST = Z.PRÓBA ## Az egyszélű z-próbával kapott valószínűségértéket számítja ki. - - -## -## Text functions Szövegműveletekhez használható függvények -## -ASC = ASC ## Szöveg teljes szélességű (kétbájtos) latin és katakana karaktereit félszélességű (egybájtos) karakterekké alakítja. -BAHTTEXT = BAHTSZÖVEG ## Számot szöveggé alakít a ß (baht) pénznemformátum használatával. -CHAR = KARAKTER ## A kódszámmal meghatározott karaktert adja eredményül. -CLEAN = TISZTÍT ## A szövegből eltávolítja az összes nem nyomtatható karaktert. -CODE = KÓD ## Karaktersorozat első karakterének numerikus kódját adja eredményül. -CONCATENATE = ÖSSZEFŰZ ## Több szövegelemet egyetlen szöveges elemmé fűz össze. -DOLLAR = FORINT ## Számot pénznem formátumú szöveggé alakít át. -EXACT = AZONOS ## Megvizsgálja, hogy két érték azonos-e. -FIND = SZÖVEG.TALÁL ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk megkülönböztetésével). -FINDB = SZÖVEG.TALÁL2 ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk megkülönböztetésével). -FIXED = FIX ## Számot szöveges formátumúra alakít adott számú tizedesjegyre kerekítve. -JIS = JIS ## A félszélességű (egybájtos) latin és a katakana karaktereket teljes szélességű (kétbájtos) karakterekké alakítja. -LEFT = BAL ## Szöveg bal szélső karaktereit adja eredményül. -LEFTB = BAL2 ## Szöveg bal szélső karaktereit adja eredményül. -LEN = HOSSZ ## Szöveg karakterekben mért hosszát adja eredményül. -LENB = HOSSZ2 ## Szöveg karakterekben mért hosszát adja eredményül. -LOWER = KISBETŰ ## Szöveget kisbetűssé alakít át. -MID = KÖZÉP ## A szöveg adott pozíciójától kezdve megadott számú karaktert ad vissza eredményként. -MIDB = KÖZÉP2 ## A szöveg adott pozíciójától kezdve megadott számú karaktert ad vissza eredményként. -PHONETIC = PHONETIC ## Szöveg furigana (fonetikus) karaktereit adja vissza. -PROPER = TNÉV ## Szöveg minden szavának kezdőbetűjét nagybetűsre cseréli. -REPLACE = CSERE ## A szövegen belül karaktereket cserél. -REPLACEB = CSERE2 ## A szövegen belül karaktereket cserél. -REPT = SOKSZOR ## Megadott számú alkalommal megismétel egy szövegrészt. -RIGHT = JOBB ## Szövegrész jobb szélső karaktereit adja eredményül. -RIGHTB = JOBB2 ## Szövegrész jobb szélső karaktereit adja eredményül. -SEARCH = SZÖVEG.KERES ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk között nem tesz különbséget). -SEARCHB = SZÖVEG.KERES2 ## Karaktersorozatot keres egy másikban (a kis- és nagybetűk között nem tesz különbséget). -SUBSTITUTE = HELYETTE ## Szövegben adott karaktereket másikra cserél. -T = T ## Argumentumát szöveggé alakítja át. -TEXT = SZÖVEG ## Számértéket alakít át adott számformátumú szöveggé. -TRIM = TRIM ## A szövegből eltávolítja a szóközöket. -UPPER = NAGYBETŰS ## Szöveget nagybetűssé alakít át. -VALUE = ÉRTÉK ## Szöveget számmá alakít át. diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config deleted file mode 100644 index c3afa75..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = € - - -## -## Excel Error Codes (For future use) -## -NULL = #NULLO! -DIV0 = #DIV/0! -VALUE = #VALORE! -REF = #RIF! -NAME = #NOME? -NUM = #NUM! -NA = #N/D diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions deleted file mode 100644 index d371f3d..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Funzioni di automazione e dei componenti aggiuntivi -## -GETPIVOTDATA = INFO.DATI.TAB.PIVOT ## Restituisce i dati memorizzati in un rapporto di tabella pivot - - -## -## Cube functions Funzioni cubo -## -CUBEKPIMEMBER = MEMBRO.KPI.CUBO ## Restituisce il nome, la proprietà e la misura di un indicatore di prestazioni chiave (KPI) e visualizza il nome e la proprietà nella cella. Un KPI è una misura quantificabile, ad esempio l'utile lordo mensile o il fatturato trimestrale dei dipendenti, utilizzata per il monitoraggio delle prestazioni di un'organizzazione. -CUBEMEMBER = MEMBRO.CUBO ## Restituisce un membro o una tupla in una gerarchia di cubi. Consente di verificare l'esistenza del membro o della tupla nel cubo. -CUBEMEMBERPROPERTY = PROPRIETÀ.MEMBRO.CUBO ## Restituisce il valore di una proprietà di un membro del cubo. Consente di verificare l'esistenza di un nome di membro all'interno del cubo e di restituire la proprietà specificata per tale membro. -CUBERANKEDMEMBER = MEMBRO.CUBO.CON.RANGO ## Restituisce l'n-esimo membro o il membro ordinato di un insieme. Consente di restituire uno o più elementi in un insieme, ad esempio l'agente di vendita migliore o i primi 10 studenti. -CUBESET = SET.CUBO ## Definisce un insieme di tuple o membri calcolati mediante l'invio di un'espressione di insieme al cubo sul server. In questo modo l'insieme viene creato e restituito a Microsoft Office Excel. -CUBESETCOUNT = CONTA.SET.CUBO ## Restituisce il numero di elementi di un insieme. -CUBEVALUE = VALORE.CUBO ## Restituisce un valore aggregato da un cubo. - - -## -## Database functions Funzioni di database -## -DAVERAGE = DB.MEDIA ## Restituisce la media di voci del database selezionate -DCOUNT = DB.CONTA.NUMERI ## Conta le celle di un database contenenti numeri -DCOUNTA = DB.CONTA.VALORI ## Conta le celle non vuote in un database -DGET = DB.VALORI ## Estrae da un database un singolo record che soddisfa i criteri specificati -DMAX = DB.MAX ## Restituisce il valore massimo dalle voci selezionate in un database -DMIN = DB.MIN ## Restituisce il valore minimo dalle voci di un database selezionate -DPRODUCT = DB.PRODOTTO ## Moltiplica i valori in un determinato campo di record che soddisfano i criteri del database -DSTDEV = DB.DEV.ST ## Restituisce una stima della deviazione standard sulla base di un campione di voci di un database selezionate -DSTDEVP = DB.DEV.ST.POP ## Calcola la deviazione standard sulla base di tutte le voci di un database selezionate -DSUM = DB.SOMMA ## Aggiunge i numeri nel campo colonna di record del database che soddisfa determinati criteri -DVAR = DB.VAR ## Restituisce una stima della varianza sulla base di un campione da voci di un database selezionate -DVARP = DB.VAR.POP ## Calcola la varianza sulla base di tutte le voci di un database selezionate - - -## -## Date and time functions Funzioni data e ora -## -DATE = DATA ## Restituisce il numero seriale di una determinata data -DATEVALUE = DATA.VALORE ## Converte una data sotto forma di testo in un numero seriale -DAY = GIORNO ## Converte un numero seriale in un giorno del mese -DAYS360 = GIORNO360 ## Calcola il numero di giorni compreso tra due date basandosi su un anno di 360 giorni -EDATE = DATA.MESE ## Restituisce il numero seriale della data che rappresenta il numero di mesi prima o dopo la data di inizio -EOMONTH = FINE.MESE ## Restituisce il numero seriale dell'ultimo giorno del mese, prima o dopo un determinato numero di mesi -HOUR = ORA ## Converte un numero seriale in un'ora -MINUTE = MINUTO ## Converte un numero seriale in un minuto -MONTH = MESE ## Converte un numero seriale in un mese -NETWORKDAYS = GIORNI.LAVORATIVI.TOT ## Restituisce il numero di tutti i giorni lavorativi compresi fra due date -NOW = ADESSO ## Restituisce il numero seriale della data e dell'ora corrente -SECOND = SECONDO ## Converte un numero seriale in un secondo -TIME = ORARIO ## Restituisce il numero seriale di una determinata ora -TIMEVALUE = ORARIO.VALORE ## Converte un orario in forma di testo in un numero seriale -TODAY = OGGI ## Restituisce il numero seriale relativo alla data odierna -WEEKDAY = GIORNO.SETTIMANA ## Converte un numero seriale in un giorno della settimana -WEEKNUM = NUM.SETTIMANA ## Converte un numero seriale in un numero che rappresenta la posizione numerica di una settimana nell'anno -WORKDAY = GIORNO.LAVORATIVO ## Restituisce il numero della data prima o dopo un determinato numero di giorni lavorativi -YEAR = ANNO ## Converte un numero seriale in un anno -YEARFRAC = FRAZIONE.ANNO ## Restituisce la frazione dell'anno che rappresenta il numero dei giorni compresi tra una data_ iniziale e una data_finale - - -## -## Engineering functions Funzioni ingegneristiche -## -BESSELI = BESSEL.I ## Restituisce la funzione di Bessel modificata In(x) -BESSELJ = BESSEL.J ## Restituisce la funzione di Bessel Jn(x) -BESSELK = BESSEL.K ## Restituisce la funzione di Bessel modificata Kn(x) -BESSELY = BESSEL.Y ## Restituisce la funzione di Bessel Yn(x) -BIN2DEC = BINARIO.DECIMALE ## Converte un numero binario in decimale -BIN2HEX = BINARIO.HEX ## Converte un numero binario in esadecimale -BIN2OCT = BINARIO.OCT ## Converte un numero binario in ottale -COMPLEX = COMPLESSO ## Converte i coefficienti reali e immaginari in numeri complessi -CONVERT = CONVERTI ## Converte un numero da un sistema di misura in un altro -DEC2BIN = DECIMALE.BINARIO ## Converte un numero decimale in binario -DEC2HEX = DECIMALE.HEX ## Converte un numero decimale in esadecimale -DEC2OCT = DECIMALE.OCT ## Converte un numero decimale in ottale -DELTA = DELTA ## Verifica se due valori sono uguali -ERF = FUNZ.ERRORE ## Restituisce la funzione di errore -ERFC = FUNZ.ERRORE.COMP ## Restituisce la funzione di errore complementare -GESTEP = SOGLIA ## Verifica se un numero è maggiore del valore di soglia -HEX2BIN = HEX.BINARIO ## Converte un numero esadecimale in binario -HEX2DEC = HEX.DECIMALE ## Converte un numero esadecimale in decimale -HEX2OCT = HEX.OCT ## Converte un numero esadecimale in ottale -IMABS = COMP.MODULO ## Restituisce il valore assoluto (modulo) di un numero complesso -IMAGINARY = COMP.IMMAGINARIO ## Restituisce il coefficiente immaginario di un numero complesso -IMARGUMENT = COMP.ARGOMENTO ## Restituisce l'argomento theta, un angolo espresso in radianti -IMCONJUGATE = COMP.CONIUGATO ## Restituisce il complesso coniugato del numero complesso -IMCOS = COMP.COS ## Restituisce il coseno di un numero complesso -IMDIV = COMP.DIV ## Restituisce il quoziente di due numeri complessi -IMEXP = COMP.EXP ## Restituisce il valore esponenziale di un numero complesso -IMLN = COMP.LN ## Restituisce il logaritmo naturale di un numero complesso -IMLOG10 = COMP.LOG10 ## Restituisce il logaritmo in base 10 di un numero complesso -IMLOG2 = COMP.LOG2 ## Restituisce un logaritmo in base 2 di un numero complesso -IMPOWER = COMP.POTENZA ## Restituisce il numero complesso elevato a una potenza intera -IMPRODUCT = COMP.PRODOTTO ## Restituisce il prodotto di numeri complessi compresi tra 2 e 29 -IMREAL = COMP.PARTE.REALE ## Restituisce il coefficiente reale di un numero complesso -IMSIN = COMP.SEN ## Restituisce il seno di un numero complesso -IMSQRT = COMP.RADQ ## Restituisce la radice quadrata di un numero complesso -IMSUB = COMP.DIFF ## Restituisce la differenza fra due numeri complessi -IMSUM = COMP.SOMMA ## Restituisce la somma di numeri complessi -OCT2BIN = OCT.BINARIO ## Converte un numero ottale in binario -OCT2DEC = OCT.DECIMALE ## Converte un numero ottale in decimale -OCT2HEX = OCT.HEX ## Converte un numero ottale in esadecimale - - -## -## Financial functions Funzioni finanziarie -## -ACCRINT = INT.MATURATO.PER ## Restituisce l'interesse maturato di un titolo che paga interessi periodici -ACCRINTM = INT.MATURATO.SCAD ## Restituisce l'interesse maturato di un titolo che paga interessi alla scadenza -AMORDEGRC = AMMORT.DEGR ## Restituisce l'ammortamento per ogni periodo contabile utilizzando un coefficiente di ammortamento -AMORLINC = AMMORT.PER ## Restituisce l'ammortamento per ogni periodo contabile -COUPDAYBS = GIORNI.CED.INIZ.LIQ ## Restituisce il numero dei giorni che vanno dall'inizio del periodo di durata della cedola alla data di liquidazione -COUPDAYS = GIORNI.CED ## Restituisce il numero dei giorni relativi al periodo della cedola che contiene la data di liquidazione -COUPDAYSNC = GIORNI.CED.NUOVA ## Restituisce il numero di giorni che vanno dalla data di liquidazione alla data della cedola successiva -COUPNCD = DATA.CED.SUCC ## Restituisce un numero che rappresenta la data della cedola successiva alla data di liquidazione -COUPNUM = NUM.CED ## Restituisce il numero di cedole pagabili fra la data di liquidazione e la data di scadenza -COUPPCD = DATA.CED.PREC ## Restituisce un numero che rappresenta la data della cedola precedente alla data di liquidazione -CUMIPMT = INT.CUMUL ## Restituisce l'interesse cumulativo pagato fra due periodi -CUMPRINC = CAP.CUM ## Restituisce il capitale cumulativo pagato per estinguere un debito fra due periodi -DB = DB ## Restituisce l'ammortamento di un bene per un periodo specificato utilizzando il metodo di ammortamento a quote fisse decrescenti -DDB = AMMORT ## Restituisce l'ammortamento di un bene per un periodo specificato utilizzando il metodo di ammortamento a doppie quote decrescenti o altri metodi specificati -DISC = TASSO.SCONTO ## Restituisce il tasso di sconto per un titolo -DOLLARDE = VALUTA.DEC ## Converte un prezzo valuta, espresso come frazione, in prezzo valuta, espresso come numero decimale -DOLLARFR = VALUTA.FRAZ ## Converte un prezzo valuta, espresso come numero decimale, in prezzo valuta, espresso come frazione -DURATION = DURATA ## Restituisce la durata annuale di un titolo con i pagamenti di interesse periodico -EFFECT = EFFETTIVO ## Restituisce l'effettivo tasso di interesse annuo -FV = VAL.FUT ## Restituisce il valore futuro di un investimento -FVSCHEDULE = VAL.FUT.CAPITALE ## Restituisce il valore futuro di un capitale iniziale dopo aver applicato una serie di tassi di interesse composti -INTRATE = TASSO.INT ## Restituisce il tasso di interesse per un titolo interamente investito -IPMT = INTERESSI ## Restituisce il valore degli interessi per un investimento relativo a un periodo specifico -IRR = TIR.COST ## Restituisce il tasso di rendimento interno per una serie di flussi di cassa -ISPMT = INTERESSE.RATA ## Calcola l'interesse di un investimento pagato durante un periodo specifico -MDURATION = DURATA.M ## Restituisce la durata Macauley modificata per un titolo con un valore presunto di € 100 -MIRR = TIR.VAR ## Restituisce il tasso di rendimento interno in cui i flussi di cassa positivi e negativi sono finanziati a tassi differenti -NOMINAL = NOMINALE ## Restituisce il tasso di interesse nominale annuale -NPER = NUM.RATE ## Restituisce un numero di periodi relativi a un investimento -NPV = VAN ## Restituisce il valore attuale netto di un investimento basato su una serie di flussi di cassa periodici e sul tasso di sconto -ODDFPRICE = PREZZO.PRIMO.IRR ## Restituisce il prezzo di un titolo dal valore nominale di € 100 avente il primo periodo di durata irregolare -ODDFYIELD = REND.PRIMO.IRR ## Restituisce il rendimento di un titolo avente il primo periodo di durata irregolare -ODDLPRICE = PREZZO.ULTIMO.IRR ## Restituisce il prezzo di un titolo dal valore nominale di € 100 avente l'ultimo periodo di durata irregolare -ODDLYIELD = REND.ULTIMO.IRR ## Restituisce il rendimento di un titolo avente l'ultimo periodo di durata irregolare -PMT = RATA ## Restituisce il pagamento periodico di una rendita annua -PPMT = P.RATA ## Restituisce il pagamento sul capitale di un investimento per un dato periodo -PRICE = PREZZO ## Restituisce il prezzo di un titolo dal valore nominale di € 100 che paga interessi periodici -PRICEDISC = PREZZO.SCONT ## Restituisce il prezzo di un titolo scontato dal valore nominale di € 100 -PRICEMAT = PREZZO.SCAD ## Restituisce il prezzo di un titolo dal valore nominale di € 100 che paga gli interessi alla scadenza -PV = VA ## Restituisce il valore attuale di un investimento -RATE = TASSO ## Restituisce il tasso di interesse per un periodo di un'annualità -RECEIVED = RICEV.SCAD ## Restituisce l'ammontare ricevuto alla scadenza di un titolo interamente investito -SLN = AMMORT.COST ## Restituisce l'ammortamento a quote costanti di un bene per un singolo periodo -SYD = AMMORT.ANNUO ## Restituisce l'ammortamento a somma degli anni di un bene per un periodo specificato -TBILLEQ = BOT.EQUIV ## Restituisce il rendimento equivalente ad un'obbligazione per un Buono ordinario del Tesoro -TBILLPRICE = BOT.PREZZO ## Restituisce il prezzo di un Buono del Tesoro dal valore nominale di € 100 -TBILLYIELD = BOT.REND ## Restituisce il rendimento di un Buono del Tesoro -VDB = AMMORT.VAR ## Restituisce l'ammortamento di un bene per un periodo specificato o parziale utilizzando il metodo a doppie quote proporzionali ai valori residui -XIRR = TIR.X ## Restituisce il tasso di rendimento interno di un impiego di flussi di cassa -XNPV = VAN.X ## Restituisce il valore attuale netto di un impiego di flussi di cassa non necessariamente periodici -YIELD = REND ## Restituisce il rendimento di un titolo che frutta interessi periodici -YIELDDISC = REND.TITOLI.SCONT ## Restituisce il rendimento annuale di un titolo scontato, ad esempio un Buono del Tesoro -YIELDMAT = REND.SCAD ## Restituisce il rendimento annuo di un titolo che paga interessi alla scadenza - - -## -## Information functions Funzioni relative alle informazioni -## -CELL = CELLA ## Restituisce le informazioni sulla formattazione, la posizione o i contenuti di una cella -ERROR.TYPE = ERRORE.TIPO ## Restituisce un numero che corrisponde a un tipo di errore -INFO = INFO ## Restituisce le informazioni sull'ambiente operativo corrente -ISBLANK = VAL.VUOTO ## Restituisce VERO se il valore è vuoto -ISERR = VAL.ERR ## Restituisce VERO se il valore è un valore di errore qualsiasi tranne #N/D -ISERROR = VAL.ERRORE ## Restituisce VERO se il valore è un valore di errore qualsiasi -ISEVEN = VAL.PARI ## Restituisce VERO se il numero è pari -ISLOGICAL = VAL.LOGICO ## Restituisce VERO se il valore è un valore logico -ISNA = VAL.NON.DISP ## Restituisce VERO se il valore è un valore di errore #N/D -ISNONTEXT = VAL.NON.TESTO ## Restituisce VERO se il valore non è in formato testo -ISNUMBER = VAL.NUMERO ## Restituisce VERO se il valore è un numero -ISODD = VAL.DISPARI ## Restituisce VERO se il numero è dispari -ISREF = VAL.RIF ## Restituisce VERO se il valore è un riferimento -ISTEXT = VAL.TESTO ## Restituisce VERO se il valore è in formato testo -N = NUM ## Restituisce un valore convertito in numero -NA = NON.DISP ## Restituisce il valore di errore #N/D -TYPE = TIPO ## Restituisce un numero che indica il tipo di dati relativi a un valore - - -## -## Logical functions Funzioni logiche -## -AND = E ## Restituisce VERO se tutti gli argomenti sono VERO -FALSE = FALSO ## Restituisce il valore logico FALSO -IF = SE ## Specifica un test logico da eseguire -IFERROR = SE.ERRORE ## Restituisce un valore specificato se una formula fornisce un errore come risultato; in caso contrario, restituisce il risultato della formula -NOT = NON ## Inverte la logica degli argomenti -OR = O ## Restituisce VERO se un argomento qualsiasi è VERO -TRUE = VERO ## Restituisce il valore logico VERO - - -## -## Lookup and reference functions Funzioni di ricerca e di riferimento -## -ADDRESS = INDIRIZZO ## Restituisce un riferimento come testo in una singola cella di un foglio di lavoro -AREAS = AREE ## Restituisce il numero di aree in un riferimento -CHOOSE = SCEGLI ## Sceglie un valore da un elenco di valori -COLUMN = RIF.COLONNA ## Restituisce il numero di colonna di un riferimento -COLUMNS = COLONNE ## Restituisce il numero di colonne in un riferimento -HLOOKUP = CERCA.ORIZZ ## Effettua una ricerca nella riga superiore di una matrice e restituisce il valore della cella specificata -HYPERLINK = COLLEG.IPERTESTUALE ## Crea un collegamento che apre un documento memorizzato in un server di rete, una rete Intranet o Internet -INDEX = INDICE ## Utilizza un indice per scegliere un valore da un riferimento o da una matrice -INDIRECT = INDIRETTO ## Restituisce un riferimento specificato da un valore testo -LOOKUP = CERCA ## Ricerca i valori in un vettore o in una matrice -MATCH = CONFRONTA ## Ricerca i valori in un riferimento o in una matrice -OFFSET = SCARTO ## Restituisce uno scarto di riferimento da un riferimento dato -ROW = RIF.RIGA ## Restituisce il numero di riga di un riferimento -ROWS = RIGHE ## Restituisce il numero delle righe in un riferimento -RTD = DATITEMPOREALE ## Recupera dati in tempo reale da un programma che supporta l'automazione COM (automazione: Metodo per utilizzare gli oggetti di un'applicazione da un'altra applicazione o da un altro strumento di sviluppo. Precedentemente nota come automazione OLE, l'automazione è uno standard del settore e una caratteristica del modello COM (Component Object Model).) -TRANSPOSE = MATR.TRASPOSTA ## Restituisce la trasposizione di una matrice -VLOOKUP = CERCA.VERT ## Effettua una ricerca nella prima colonna di una matrice e si sposta attraverso la riga per restituire il valore di una cella - - -## -## Math and trigonometry functions Funzioni matematiche e trigonometriche -## -ABS = ASS ## Restituisce il valore assoluto di un numero. -ACOS = ARCCOS ## Restituisce l'arcocoseno di un numero -ACOSH = ARCCOSH ## Restituisce l'inverso del coseno iperbolico di un numero -ASIN = ARCSEN ## Restituisce l'arcoseno di un numero -ASINH = ARCSENH ## Restituisce l'inverso del seno iperbolico di un numero -ATAN = ARCTAN ## Restituisce l'arcotangente di un numero -ATAN2 = ARCTAN.2 ## Restituisce l'arcotangente delle coordinate x e y specificate -ATANH = ARCTANH ## Restituisce l'inverso della tangente iperbolica di un numero -CEILING = ARROTONDA.ECCESSO ## Arrotonda un numero per eccesso all'intero più vicino o al multiplo più vicino a peso -COMBIN = COMBINAZIONE ## Restituisce il numero di combinazioni possibili per un numero assegnato di elementi -COS = COS ## Restituisce il coseno dell'angolo specificato -COSH = COSH ## Restituisce il coseno iperbolico di un numero -DEGREES = GRADI ## Converte i radianti in gradi -EVEN = PARI ## Arrotonda il valore assoluto di un numero per eccesso al più vicino intero pari -EXP = ESP ## Restituisce il numero e elevato alla potenza di num -FACT = FATTORIALE ## Restituisce il fattoriale di un numero -FACTDOUBLE = FATT.DOPPIO ## Restituisce il fattoriale doppio di un numero -FLOOR = ARROTONDA.DIFETTO ## Arrotonda un numero per difetto al multiplo più vicino a zero -GCD = MCD ## Restituisce il massimo comune divisore -INT = INT ## Arrotonda un numero per difetto al numero intero più vicino -LCM = MCM ## Restituisce il minimo comune multiplo -LN = LN ## Restituisce il logaritmo naturale di un numero -LOG = LOG ## Restituisce il logaritmo di un numero in una specificata base -LOG10 = LOG10 ## Restituisce il logaritmo in base 10 di un numero -MDETERM = MATR.DETERM ## Restituisce il determinante di una matrice -MINVERSE = MATR.INVERSA ## Restituisce l'inverso di una matrice -MMULT = MATR.PRODOTTO ## Restituisce il prodotto di due matrici -MOD = RESTO ## Restituisce il resto della divisione -MROUND = ARROTONDA.MULTIPLO ## Restituisce un numero arrotondato al multiplo desiderato -MULTINOMIAL = MULTINOMIALE ## Restituisce il multinomiale di un insieme di numeri -ODD = DISPARI ## Arrotonda un numero per eccesso al più vicino intero dispari -PI = PI.GRECO ## Restituisce il valore di pi greco -POWER = POTENZA ## Restituisce il risultato di un numero elevato a potenza -PRODUCT = PRODOTTO ## Moltiplica i suoi argomenti -QUOTIENT = QUOZIENTE ## Restituisce la parte intera di una divisione -RADIANS = RADIANTI ## Converte i gradi in radianti -RAND = CASUALE ## Restituisce un numero casuale compreso tra 0 e 1 -RANDBETWEEN = CASUALE.TRA ## Restituisce un numero casuale compreso tra i numeri specificati -ROMAN = ROMANO ## Restituisce il numero come numero romano sotto forma di testo -ROUND = ARROTONDA ## Arrotonda il numero al numero di cifre specificato -ROUNDDOWN = ARROTONDA.PER.DIF ## Arrotonda il valore assoluto di un numero per difetto -ROUNDUP = ARROTONDA.PER.ECC ## Arrotonda il valore assoluto di un numero per eccesso -SERIESSUM = SOMMA.SERIE ## Restituisce la somma di una serie di potenze in base alla formula -SIGN = SEGNO ## Restituisce il segno di un numero -SIN = SEN ## Restituisce il seno di un dato angolo -SINH = SENH ## Restituisce il seno iperbolico di un numero -SQRT = RADQ ## Restituisce una radice quadrata -SQRTPI = RADQ.PI.GRECO ## Restituisce la radice quadrata di un numero (numero * pi greco) -SUBTOTAL = SUBTOTALE ## Restituisce un subtotale in un elenco o in un database -SUM = SOMMA ## Somma i suoi argomenti -SUMIF = SOMMA.SE ## Somma le celle specificate da un dato criterio -SUMIFS = SOMMA.PIÙ.SE ## Somma le celle in un intervallo che soddisfano più criteri -SUMPRODUCT = MATR.SOMMA.PRODOTTO ## Restituisce la somma dei prodotti dei componenti corrispondenti della matrice -SUMSQ = SOMMA.Q ## Restituisce la somma dei quadrati degli argomenti -SUMX2MY2 = SOMMA.DIFF.Q ## Restituisce la somma della differenza dei quadrati dei corrispondenti elementi in due matrici -SUMX2PY2 = SOMMA.SOMMA.Q ## Restituisce la somma della somma dei quadrati dei corrispondenti elementi in due matrici -SUMXMY2 = SOMMA.Q.DIFF ## Restituisce la somma dei quadrati delle differenze dei corrispondenti elementi in due matrici -TAN = TAN ## Restituisce la tangente di un numero -TANH = TANH ## Restituisce la tangente iperbolica di un numero -TRUNC = TRONCA ## Tronca la parte decimale di un numero - - -## -## Statistical functions Funzioni statistiche -## -AVEDEV = MEDIA.DEV ## Restituisce la media delle deviazioni assolute delle coordinate rispetto alla loro media -AVERAGE = MEDIA ## Restituisce la media degli argomenti -AVERAGEA = MEDIA.VALORI ## Restituisce la media degli argomenti, inclusi i numeri, il testo e i valori logici -AVERAGEIF = MEDIA.SE ## Restituisce la media aritmetica di tutte le celle in un intervallo che soddisfano un determinato criterio -AVERAGEIFS = MEDIA.PIÙ.SE ## Restituisce la media aritmetica di tutte le celle che soddisfano più criteri -BETADIST = DISTRIB.BETA ## Restituisce la funzione di distribuzione cumulativa beta -BETAINV = INV.BETA ## Restituisce l'inverso della funzione di distribuzione cumulativa per una distribuzione beta specificata -BINOMDIST = DISTRIB.BINOM ## Restituisce la distribuzione binomiale per il termine individuale -CHIDIST = DISTRIB.CHI ## Restituisce la probabilità a una coda per la distribuzione del chi quadrato -CHIINV = INV.CHI ## Restituisce l'inverso della probabilità ad una coda per la distribuzione del chi quadrato -CHITEST = TEST.CHI ## Restituisce il test per l'indipendenza -CONFIDENCE = CONFIDENZA ## Restituisce l'intervallo di confidenza per una popolazione -CORREL = CORRELAZIONE ## Restituisce il coefficiente di correlazione tra due insiemi di dati -COUNT = CONTA.NUMERI ## Conta la quantità di numeri nell'elenco di argomenti -COUNTA = CONTA.VALORI ## Conta il numero di valori nell'elenco di argomenti -COUNTBLANK = CONTA.VUOTE ## Conta il numero di celle vuote all'interno di un intervallo -COUNTIF = CONTA.SE ## Conta il numero di celle all'interno di un intervallo che soddisfa i criteri specificati -COUNTIFS = CONTA.PIÙ.SE ## Conta il numero di celle in un intervallo che soddisfano più criteri. -COVAR = COVARIANZA ## Calcola la covarianza, la media dei prodotti delle deviazioni accoppiate -CRITBINOM = CRIT.BINOM ## Restituisce il più piccolo valore per il quale la distribuzione cumulativa binomiale risulta maggiore o uguale ad un valore di criterio -DEVSQ = DEV.Q ## Restituisce la somma dei quadrati delle deviazioni -EXPONDIST = DISTRIB.EXP ## Restituisce la distribuzione esponenziale -FDIST = DISTRIB.F ## Restituisce la distribuzione di probabilità F -FINV = INV.F ## Restituisce l'inverso della distribuzione della probabilità F -FISHER = FISHER ## Restituisce la trasformazione di Fisher -FISHERINV = INV.FISHER ## Restituisce l'inverso della trasformazione di Fisher -FORECAST = PREVISIONE ## Restituisce i valori lungo una tendenza lineare -FREQUENCY = FREQUENZA ## Restituisce la distribuzione di frequenza come matrice verticale -FTEST = TEST.F ## Restituisce il risultato di un test F -GAMMADIST = DISTRIB.GAMMA ## Restituisce la distribuzione gamma -GAMMAINV = INV.GAMMA ## Restituisce l'inverso della distribuzione cumulativa gamma -GAMMALN = LN.GAMMA ## Restituisce il logaritmo naturale della funzione gamma, G(x) -GEOMEAN = MEDIA.GEOMETRICA ## Restituisce la media geometrica -GROWTH = CRESCITA ## Restituisce i valori lungo una linea di tendenza esponenziale -HARMEAN = MEDIA.ARMONICA ## Restituisce la media armonica -HYPGEOMDIST = DISTRIB.IPERGEOM ## Restituisce la distribuzione ipergeometrica -INTERCEPT = INTERCETTA ## Restituisce l'intercetta della retta di regressione lineare -KURT = CURTOSI ## Restituisce la curtosi di un insieme di dati -LARGE = GRANDE ## Restituisce il k-esimo valore più grande in un insieme di dati -LINEST = REGR.LIN ## Restituisce i parametri di una tendenza lineare -LOGEST = REGR.LOG ## Restituisce i parametri di una linea di tendenza esponenziale -LOGINV = INV.LOGNORM ## Restituisce l'inverso di una distribuzione lognormale -LOGNORMDIST = DISTRIB.LOGNORM ## Restituisce la distribuzione lognormale cumulativa -MAX = MAX ## Restituisce il valore massimo in un elenco di argomenti -MAXA = MAX.VALORI ## Restituisce il valore massimo in un elenco di argomenti, inclusi i numeri, il testo e i valori logici -MEDIAN = MEDIANA ## Restituisce la mediana dei numeri specificati -MIN = MIN ## Restituisce il valore minimo in un elenco di argomenti -MINA = MIN.VALORI ## Restituisce il più piccolo valore in un elenco di argomenti, inclusi i numeri, il testo e i valori logici -MODE = MODA ## Restituisce il valore più comune in un insieme di dati -NEGBINOMDIST = DISTRIB.BINOM.NEG ## Restituisce la distribuzione binomiale negativa -NORMDIST = DISTRIB.NORM ## Restituisce la distribuzione cumulativa normale -NORMINV = INV.NORM ## Restituisce l'inverso della distribuzione cumulativa normale standard -NORMSDIST = DISTRIB.NORM.ST ## Restituisce la distribuzione cumulativa normale standard -NORMSINV = INV.NORM.ST ## Restituisce l'inverso della distribuzione cumulativa normale -PEARSON = PEARSON ## Restituisce il coefficiente del momento di correlazione di Pearson -PERCENTILE = PERCENTILE ## Restituisce il k-esimo dato percentile di valori in un intervallo -PERCENTRANK = PERCENT.RANGO ## Restituisce il rango di un valore in un insieme di dati come percentuale -PERMUT = PERMUTAZIONE ## Restituisce il numero delle permutazioni per un determinato numero di oggetti -POISSON = POISSON ## Restituisce la distribuzione di Poisson -PROB = PROBABILITÀ ## Calcola la probabilità che dei valori in un intervallo siano compresi tra due limiti -QUARTILE = QUARTILE ## Restituisce il quartile di un insieme di dati -RANK = RANGO ## Restituisce il rango di un numero in un elenco di numeri -RSQ = RQ ## Restituisce la radice quadrata del coefficiente di momento di correlazione di Pearson -SKEW = ASIMMETRIA ## Restituisce il grado di asimmetria di una distribuzione -SLOPE = PENDENZA ## Restituisce la pendenza di una retta di regressione lineare -SMALL = PICCOLO ## Restituisce il k-esimo valore più piccolo in un insieme di dati -STANDARDIZE = NORMALIZZA ## Restituisce un valore normalizzato -STDEV = DEV.ST ## Restituisce una stima della deviazione standard sulla base di un campione -STDEVA = DEV.ST.VALORI ## Restituisce una stima della deviazione standard sulla base di un campione, inclusi i numeri, il testo e i valori logici -STDEVP = DEV.ST.POP ## Calcola la deviazione standard sulla base di un'intera popolazione -STDEVPA = DEV.ST.POP.VALORI ## Calcola la deviazione standard sulla base sull'intera popolazione, inclusi i numeri, il testo e i valori logici -STEYX = ERR.STD.YX ## Restituisce l'errore standard del valore previsto per y per ogni valore x nella regressione -TDIST = DISTRIB.T ## Restituisce la distribuzione t di Student -TINV = INV.T ## Restituisce l'inversa della distribuzione t di Student -TREND = TENDENZA ## Restituisce i valori lungo una linea di tendenza lineare -TRIMMEAN = MEDIA.TRONCATA ## Restituisce la media della parte interna di un insieme di dati -TTEST = TEST.T ## Restituisce la probabilità associata ad un test t di Student -VAR = VAR ## Stima la varianza sulla base di un campione -VARA = VAR.VALORI ## Stima la varianza sulla base di un campione, inclusi i numeri, il testo e i valori logici -VARP = VAR.POP ## Calcola la varianza sulla base dell'intera popolazione -VARPA = VAR.POP.VALORI ## Calcola la deviazione standard sulla base sull'intera popolazione, inclusi i numeri, il testo e i valori logici -WEIBULL = WEIBULL ## Restituisce la distribuzione di Weibull -ZTEST = TEST.Z ## Restituisce il valore di probabilità a una coda per un test z - - -## -## Text functions Funzioni di testo -## -ASC = ASC ## Modifica le lettere inglesi o il katakana a doppio byte all'interno di una stringa di caratteri in caratteri a singolo byte -BAHTTEXT = BAHTTESTO ## Converte un numero in testo, utilizzando il formato valuta ß (baht) -CHAR = CODICE.CARATT ## Restituisce il carattere specificato dal numero di codice -CLEAN = LIBERA ## Elimina dal testo tutti i caratteri che non è possibile stampare -CODE = CODICE ## Restituisce il codice numerico del primo carattere di una stringa di testo -CONCATENATE = CONCATENA ## Unisce diversi elementi di testo in un unico elemento di testo -DOLLAR = VALUTA ## Converte un numero in testo, utilizzando il formato valuta € (euro) -EXACT = IDENTICO ## Verifica se due valori di testo sono uguali -FIND = TROVA ## Rileva un valore di testo all'interno di un altro (distinzione tra maiuscole e minuscole) -FINDB = TROVA.B ## Rileva un valore di testo all'interno di un altro (distinzione tra maiuscole e minuscole) -FIXED = FISSO ## Formatta un numero come testo con un numero fisso di decimali -JIS = ORDINAMENTO.JIS ## Modifica le lettere inglesi o i caratteri katakana a byte singolo all'interno di una stringa di caratteri in caratteri a byte doppio. -LEFT = SINISTRA ## Restituisce il carattere più a sinistra di un valore di testo -LEFTB = SINISTRA.B ## Restituisce il carattere più a sinistra di un valore di testo -LEN = LUNGHEZZA ## Restituisce il numero di caratteri di una stringa di testo -LENB = LUNB ## Restituisce il numero di caratteri di una stringa di testo -LOWER = MINUSC ## Converte il testo in lettere minuscole -MID = MEDIA ## Restituisce un numero specifico di caratteri di una stringa di testo a partire dalla posizione specificata -MIDB = MEDIA.B ## Restituisce un numero specifico di caratteri di una stringa di testo a partire dalla posizione specificata -PHONETIC = FURIGANA ## Estrae i caratteri fonetici (furigana) da una stringa di testo. -PROPER = MAIUSC.INIZ ## Converte in maiuscolo la prima lettera di ogni parola di un valore di testo -REPLACE = RIMPIAZZA ## Sostituisce i caratteri all'interno di un testo -REPLACEB = SOSTITUISCI.B ## Sostituisce i caratteri all'interno di un testo -REPT = RIPETI ## Ripete un testo per un dato numero di volte -RIGHT = DESTRA ## Restituisce il carattere più a destra di un valore di testo -RIGHTB = DESTRA.B ## Restituisce il carattere più a destra di un valore di testo -SEARCH = RICERCA ## Rileva un valore di testo all'interno di un altro (non è sensibile alle maiuscole e minuscole) -SEARCHB = CERCA.B ## Rileva un valore di testo all'interno di un altro (non è sensibile alle maiuscole e minuscole) -SUBSTITUTE = SOSTITUISCI ## Sostituisce il nuovo testo al testo contenuto in una stringa -T = T ## Converte gli argomenti in testo -TEXT = TESTO ## Formatta un numero e lo converte in testo -TRIM = ANNULLA.SPAZI ## Elimina gli spazi dal testo -UPPER = MAIUSC ## Converte il testo in lettere maiuscole -VALUE = VALORE ## Converte un argomento di testo in numero diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config deleted file mode 100644 index 48dcc15..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = € - - -## -## Excel Error Codes (For future use) -## -NULL = #LEEG! -DIV0 = #DEEL/0! -VALUE = #WAARDE! -REF = #VERW! -NAME = #NAAM? -NUM = #GETAL! -NA = #N/B diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions deleted file mode 100644 index 573600a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Automatiseringsfuncties en functies in invoegtoepassingen -## -GETPIVOTDATA = DRAAITABEL.OPHALEN ## Geeft gegevens uit een draaitabelrapport als resultaat - - -## -## Cube functions Kubusfuncties -## -CUBEKPIMEMBER = KUBUSKPILID ## Retourneert de naam, eigenschap en waarde van een KPI (prestatie-indicator) en geeft de naam en de eigenschap in de cel weer. Een KPI is een meetbare waarde, zoals de maandelijkse brutowinst of de omzet per kwartaal per werknemer, die wordt gebruikt om de prestaties van een organisatie te bewaken -CUBEMEMBER = KUBUSLID ## Retourneert een lid of tupel in een kubushiërarchie. Wordt gebruikt om te controleren of het lid of de tupel in de kubus aanwezig is -CUBEMEMBERPROPERTY = KUBUSLIDEIGENSCHAP ## Retourneert de waarde van een lideigenschap in de kubus. Wordt gebruikt om te controleren of de lidnaam in de kubus bestaat en retourneert de opgegeven eigenschap voor dit lid -CUBERANKEDMEMBER = KUBUSGERANGCHIKTLID ## Retourneert het zoveelste, gerangschikte lid in een set. Wordt gebruikt om een of meer elementen in een set te retourneren, zoals de tien beste verkopers of de tien beste studenten -CUBESET = KUBUSSET ## Definieert een berekende set leden of tupels door een ingestelde expressie naar de kubus op de server te sturen, alwaar de set wordt gemaakt en vervolgens wordt geretourneerd naar Microsoft Office Excel -CUBESETCOUNT = KUBUSSETAANTAL ## Retourneert het aantal onderdelen in een set -CUBEVALUE = KUBUSWAARDE ## Retourneert een samengestelde waarde van een kubus - - -## -## Database functions Databasefuncties -## -DAVERAGE = DBGEMIDDELDE ## Berekent de gemiddelde waarde in geselecteerde databasegegevens -DCOUNT = DBAANTAL ## Telt de cellen met getallen in een database -DCOUNTA = DBAANTALC ## Telt de niet-lege cellen in een database -DGET = DBLEZEN ## Retourneert één record dat voldoet aan de opgegeven criteria uit een database -DMAX = DBMAX ## Retourneert de maximumwaarde in de geselecteerde databasegegevens -DMIN = DBMIN ## Retourneert de minimumwaarde in de geselecteerde databasegegevens -DPRODUCT = DBPRODUCT ## Vermenigvuldigt de waarden in een bepaald veld van de records die voldoen aan de criteria in een database -DSTDEV = DBSTDEV ## Maakt een schatting van de standaarddeviatie op basis van een steekproef uit geselecteerde databasegegevens -DSTDEVP = DBSTDEVP ## Berekent de standaarddeviatie op basis van de volledige populatie van geselecteerde databasegegevens -DSUM = DBSOM ## Telt de getallen uit een kolom records in de database op die voldoen aan de criteria -DVAR = DBVAR ## Maakt een schatting van de variantie op basis van een steekproef uit geselecteerde databasegegevens -DVARP = DBVARP ## Berekent de variantie op basis van de volledige populatie van geselecteerde databasegegevens - - -## -## Date and time functions Datum- en tijdfuncties -## -DATE = DATUM ## Geeft als resultaat het seriële getal van een opgegeven datum -DATEVALUE = DATUMWAARDE ## Converteert een datum in de vorm van tekst naar een serieel getal -DAY = DAG ## Converteert een serieel getal naar een dag van de maand -DAYS360 = DAGEN360 ## Berekent het aantal dagen tussen twee datums op basis van een jaar met 360 dagen -EDATE = ZELFDE.DAG ## Geeft als resultaat het seriële getal van een datum die het opgegeven aantal maanden voor of na de begindatum ligt -EOMONTH = LAATSTE.DAG ## Geeft als resultaat het seriële getal van de laatste dag van de maand voor of na het opgegeven aantal maanden -HOUR = UUR ## Converteert een serieel getal naar uren -MINUTE = MINUUT ## Converteert een serieel naar getal minuten -MONTH = MAAND ## Converteert een serieel getal naar een maand -NETWORKDAYS = NETTO.WERKDAGEN ## Geeft als resultaat het aantal hele werkdagen tussen twee datums -NOW = NU ## Geeft als resultaat het seriële getal van de huidige datum en tijd -SECOND = SECONDE ## Converteert een serieel getal naar seconden -TIME = TIJD ## Geeft als resultaat het seriële getal van een bepaald tijdstip -TIMEVALUE = TIJDWAARDE ## Converteert de tijd in de vorm van tekst naar een serieel getal -TODAY = VANDAAG ## Geeft als resultaat het seriële getal van de huidige datum -WEEKDAY = WEEKDAG ## Converteert een serieel getal naar een weekdag -WEEKNUM = WEEKNUMMER ## Converteert een serieel getal naar een weeknummer -WORKDAY = WERKDAG ## Geeft als resultaat het seriële getal van de datum voor of na een bepaald aantal werkdagen -YEAR = JAAR ## Converteert een serieel getal naar een jaar -YEARFRAC = JAAR.DEEL ## Geeft als resultaat het gedeelte van het jaar, uitgedrukt in het aantal hele dagen tussen begindatum en einddatum - - -## -## Engineering functions Technische functies -## -BESSELI = BESSEL.Y ## Geeft als resultaat de gewijzigde Bessel-functie In(x) -BESSELJ = BESSEL.J ## Geeft als resultaat de Bessel-functie Jn(x) -BESSELK = BESSEL.K ## Geeft als resultaat de gewijzigde Bessel-functie Kn(x) -BESSELY = BESSEL.Y ## Geeft als resultaat de gewijzigde Bessel-functie Yn(x) -BIN2DEC = BIN.N.DEC ## Converteert een binair getal naar een decimaal getal -BIN2HEX = BIN.N.HEX ## Converteert een binair getal naar een hexadecimaal getal -BIN2OCT = BIN.N.OCT ## Converteert een binair getal naar een octaal getal -COMPLEX = COMPLEX ## Converteert reële en imaginaire coëfficiënten naar een complex getal -CONVERT = CONVERTEREN ## Converteert een getal in de ene maateenheid naar een getal in een andere maateenheid -DEC2BIN = DEC.N.BIN ## Converteert een decimaal getal naar een binair getal -DEC2HEX = DEC.N.HEX ## Converteert een decimaal getal naar een hexadecimaal getal -DEC2OCT = DEC.N.OCT ## Converteert een decimaal getal naar een octaal getal -DELTA = DELTA ## Test of twee waarden gelijk zijn -ERF = FOUTFUNCTIE ## Geeft als resultaat de foutfunctie -ERFC = FOUT.COMPLEMENT ## Geeft als resultaat de complementaire foutfunctie -GESTEP = GROTER.DAN ## Test of een getal groter is dan de drempelwaarde -HEX2BIN = HEX.N.BIN ## Converteert een hexadecimaal getal naar een binair getal -HEX2DEC = HEX.N.DEC ## Converteert een hexadecimaal getal naar een decimaal getal -HEX2OCT = HEX.N.OCT ## Converteert een hexadecimaal getal naar een octaal getal -IMABS = C.ABS ## Geeft als resultaat de absolute waarde (modulus) van een complex getal -IMAGINARY = C.IM.DEEL ## Geeft als resultaat de imaginaire coëfficiënt van een complex getal -IMARGUMENT = C.ARGUMENT ## Geeft als resultaat het argument thèta, een hoek uitgedrukt in radialen -IMCONJUGATE = C.TOEGEVOEGD ## Geeft als resultaat het complexe toegevoegde getal van een complex getal -IMCOS = C.COS ## Geeft als resultaat de cosinus van een complex getal -IMDIV = C.QUOTIENT ## Geeft als resultaat het quotiënt van twee complexe getallen -IMEXP = C.EXP ## Geeft als resultaat de exponent van een complex getal -IMLN = C.LN ## Geeft als resultaat de natuurlijke logaritme van een complex getal -IMLOG10 = C.LOG10 ## Geeft als resultaat de logaritme met grondtal 10 van een complex getal -IMLOG2 = C.LOG2 ## Geeft als resultaat de logaritme met grondtal 2 van een complex getal -IMPOWER = C.MACHT ## Geeft als resultaat een complex getal dat is verheven tot de macht van een geheel getal -IMPRODUCT = C.PRODUCT ## Geeft als resultaat het product van complexe getallen -IMREAL = C.REEEL.DEEL ## Geeft als resultaat de reële coëfficiënt van een complex getal -IMSIN = C.SIN ## Geeft als resultaat de sinus van een complex getal -IMSQRT = C.WORTEL ## Geeft als resultaat de vierkantswortel van een complex getal -IMSUB = C.VERSCHIL ## Geeft als resultaat het verschil tussen twee complexe getallen -IMSUM = C.SOM ## Geeft als resultaat de som van complexe getallen -OCT2BIN = OCT.N.BIN ## Converteert een octaal getal naar een binair getal -OCT2DEC = OCT.N.DEC ## Converteert een octaal getal naar een decimaal getal -OCT2HEX = OCT.N.HEX ## Converteert een octaal getal naar een hexadecimaal getal - - -## -## Financial functions Financiële functies -## -ACCRINT = SAMENG.RENTE ## Berekent de opgelopen rente voor een waardepapier waarvan de rente periodiek wordt uitgekeerd -ACCRINTM = SAMENG.RENTE.V ## Berekent de opgelopen rente voor een waardepapier waarvan de rente op de vervaldatum wordt uitgekeerd -AMORDEGRC = AMORDEGRC ## Geeft als resultaat de afschrijving voor elke boekingsperiode door een afschrijvingscoëfficiënt toe te passen -AMORLINC = AMORLINC ## Berekent de afschrijving voor elke boekingsperiode -COUPDAYBS = COUP.DAGEN.BB ## Berekent het aantal dagen vanaf het begin van de coupontermijn tot de stortingsdatum -COUPDAYS = COUP.DAGEN ## Geeft als resultaat het aantal dagen in de coupontermijn waarin de stortingsdatum valt -COUPDAYSNC = COUP.DAGEN.VV ## Geeft als resultaat het aantal dagen vanaf de stortingsdatum tot de volgende couponvervaldatum -COUPNCD = COUP.DATUM.NB ## Geeft als resultaat de volgende coupondatum na de stortingsdatum -COUPNUM = COUP.AANTAL ## Geeft als resultaat het aantal coupons dat nog moet worden uitbetaald tussen de stortingsdatum en de vervaldatum -COUPPCD = COUP.DATUM.VB ## Geeft als resultaat de vorige couponvervaldatum vóór de stortingsdatum -CUMIPMT = CUM.RENTE ## Geeft als resultaat de cumulatieve rente die tussen twee termijnen is uitgekeerd -CUMPRINC = CUM.HOOFDSOM ## Geeft als resultaat de cumulatieve hoofdsom van een lening die tussen twee termijnen is terugbetaald -DB = DB ## Geeft als resultaat de afschrijving van activa voor een bepaalde periode met behulp van de 'fixed declining balance'-methode -DDB = DDB ## Geeft als resultaat de afschrijving van activa over een bepaalde termijn met behulp van de 'double declining balance'-methode of een andere methode die u opgeeft -DISC = DISCONTO ## Geeft als resultaat het discontopercentage voor een waardepapier -DOLLARDE = EURO.DE ## Converteert een prijs in euro's, uitgedrukt in een breuk, naar een prijs in euro's, uitgedrukt in een decimaal getal -DOLLARFR = EURO.BR ## Converteert een prijs in euro's, uitgedrukt in een decimaal getal, naar een prijs in euro's, uitgedrukt in een breuk -DURATION = DUUR ## Geeft als resultaat de gewogen gemiddelde looptijd voor een waardepapier met periodieke rentebetalingen -EFFECT = EFFECT.RENTE ## Geeft als resultaat het effectieve jaarlijkse rentepercentage -FV = TW ## Geeft als resultaat de toekomstige waarde van een investering -FVSCHEDULE = TOEK.WAARDE2 ## Geeft als resultaat de toekomstige waarde van een bepaalde hoofdsom na het toepassen van een reeks samengestelde rentepercentages -INTRATE = RENTEPERCENTAGE ## Geeft als resultaat het rentepercentage voor een volgestort waardepapier -IPMT = IBET ## Geeft als resultaat de te betalen rente voor een investering over een bepaalde termijn -IRR = IR ## Geeft als resultaat de interne rentabiliteit voor een reeks cashflows -ISPMT = ISBET ## Geeft als resultaat de rente die is betaald tijdens een bepaalde termijn van een investering -MDURATION = AANG.DUUR ## Geeft als resultaat de aangepaste Macauley-looptijd voor een waardepapier, aangenomen dat de nominale waarde € 100 bedraagt -MIRR = GIR ## Geeft als resultaat de interne rentabiliteit voor een serie cashflows, waarbij voor betalingen een ander rentepercentage geldt dan voor inkomsten -NOMINAL = NOMINALE.RENTE ## Geeft als resultaat het nominale jaarlijkse rentepercentage -NPER = NPER ## Geeft als resultaat het aantal termijnen van een investering -NPV = NHW ## Geeft als resultaat de netto huidige waarde van een investering op basis van een reeks periodieke cashflows en een discontopercentage -ODDFPRICE = AFW.ET.PRIJS ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier met een afwijkende eerste termijn -ODDFYIELD = AFW.ET.REND ## Geeft als resultaat het rendement voor een waardepapier met een afwijkende eerste termijn -ODDLPRICE = AFW.LT.PRIJS ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier met een afwijkende laatste termijn -ODDLYIELD = AFW.LT.REND ## Geeft als resultaat het rendement voor een waardepapier met een afwijkende laatste termijn -PMT = BET ## Geeft als resultaat de periodieke betaling voor een annuïteit -PPMT = PBET ## Geeft als resultaat de afbetaling op de hoofdsom voor een bepaalde termijn -PRICE = PRIJS.NOM ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier waarvan de rente periodiek wordt uitgekeerd -PRICEDISC = PRIJS.DISCONTO ## Geeft als resultaat de prijs per € 100 nominale waarde voor een verdisconteerd waardepapier -PRICEMAT = PRIJS.VERVALDAG ## Geeft als resultaat de prijs per € 100 nominale waarde voor een waardepapier waarvan de rente wordt uitgekeerd op de vervaldatum -PV = HW ## Geeft als resultaat de huidige waarde van een investering -RATE = RENTE ## Geeft als resultaat het periodieke rentepercentage voor een annuïteit -RECEIVED = OPBRENGST ## Geeft als resultaat het bedrag dat op de vervaldatum wordt uitgekeerd voor een volgestort waardepapier -SLN = LIN.AFSCHR ## Geeft als resultaat de lineaire afschrijving van activa over één termijn -SYD = SYD ## Geeft als resultaat de afschrijving van activa over een bepaalde termijn met behulp van de 'Sum-Of-Years-Digits'-methode -TBILLEQ = SCHATK.OBL ## Geeft als resultaat het rendement op schatkistpapier, dat op dezelfde manier wordt berekend als het rendement op obligaties -TBILLPRICE = SCHATK.PRIJS ## Bepaalt de prijs per € 100 nominale waarde voor schatkistpapier -TBILLYIELD = SCHATK.REND ## Berekent het rendement voor schatkistpapier -VDB = VDB ## Geeft als resultaat de afschrijving van activa over een gehele of gedeeltelijke termijn met behulp van de 'declining balance'-methode -XIRR = IR.SCHEMA ## Berekent de interne rentabiliteit voor een betalingsschema van cashflows -XNPV = NHW2 ## Berekent de huidige nettowaarde voor een betalingsschema van cashflows -YIELD = RENDEMENT ## Geeft als resultaat het rendement voor een waardepapier waarvan de rente periodiek wordt uitgekeerd -YIELDDISC = REND.DISCONTO ## Geeft als resultaat het jaarlijkse rendement voor een verdisconteerd waardepapier, bijvoorbeeld schatkistpapier -YIELDMAT = REND.VERVAL ## Geeft als resultaat het jaarlijkse rendement voor een waardepapier waarvan de rente wordt uitgekeerd op de vervaldatum - - -## -## Information functions Informatiefuncties -## -CELL = CEL ## Geeft als resultaat informatie over de opmaak, locatie of inhoud van een cel -ERROR.TYPE = TYPE.FOUT ## Geeft als resultaat een getal dat overeenkomt met een van de foutwaarden van Microsoft Excel -INFO = INFO ## Geeft als resultaat informatie over de huidige besturingsomgeving -ISBLANK = ISLEEG ## Geeft als resultaat WAAR als de waarde leeg is -ISERR = ISFOUT2 ## Geeft als resultaat WAAR als de waarde een foutwaarde is, met uitzondering van #N/B -ISERROR = ISFOUT ## Geeft als resultaat WAAR als de waarde een foutwaarde is -ISEVEN = IS.EVEN ## Geeft als resultaat WAAR als het getal even is -ISLOGICAL = ISLOGISCH ## Geeft als resultaat WAAR als de waarde een logische waarde is -ISNA = ISNB ## Geeft als resultaat WAAR als de waarde de foutwaarde #N/B is -ISNONTEXT = ISGEENTEKST ## Geeft als resultaat WAAR als de waarde geen tekst is -ISNUMBER = ISGETAL ## Geeft als resultaat WAAR als de waarde een getal is -ISODD = IS.ONEVEN ## Geeft als resultaat WAAR als het getal oneven is -ISREF = ISVERWIJZING ## Geeft als resultaat WAAR als de waarde een verwijzing is -ISTEXT = ISTEKST ## Geeft als resultaat WAAR als de waarde tekst is -N = N ## Geeft als resultaat een waarde die is geconverteerd naar een getal -NA = NB ## Geeft als resultaat de foutwaarde #N/B -TYPE = TYPE ## Geeft als resultaat een getal dat het gegevenstype van een waarde aangeeft - - -## -## Logical functions Logische functies -## -AND = EN ## Geeft als resultaat WAAR als alle argumenten WAAR zijn -FALSE = ONWAAR ## Geeft als resultaat de logische waarde ONWAAR -IF = ALS ## Geeft een logische test aan -IFERROR = ALS.FOUT ## Retourneert een waarde die u opgeeft als een formule een fout oplevert, anders wordt het resultaat van de formule geretourneerd -NOT = NIET ## Keert de logische waarde van het argument om -OR = OF ## Geeft als resultaat WAAR als minimaal een van de argumenten WAAR is -TRUE = WAAR ## Geeft als resultaat de logische waarde WAAR - - -## -## Lookup and reference functions Zoek- en verwijzingsfuncties -## -ADDRESS = ADRES ## Geeft als resultaat een verwijzing, in de vorm van tekst, naar één bepaalde cel in een werkblad -AREAS = BEREIKEN ## Geeft als resultaat het aantal bereiken in een verwijzing -CHOOSE = KIEZEN ## Kiest een waarde uit een lijst met waarden -COLUMN = KOLOM ## Geeft als resultaat het kolomnummer van een verwijzing -COLUMNS = KOLOMMEN ## Geeft als resultaat het aantal kolommen in een verwijzing -HLOOKUP = HORIZ.ZOEKEN ## Zoekt in de bovenste rij van een matrix naar een bepaalde waarde en geeft als resultaat de gevonden waarde in de opgegeven cel -HYPERLINK = HYPERLINK ## Maakt een snelkoppeling of een sprong waarmee een document wordt geopend dat is opgeslagen op een netwerkserver, een intranet of op internet -INDEX = INDEX ## Kiest met een index een waarde uit een verwijzing of een matrix -INDIRECT = INDIRECT ## Geeft als resultaat een verwijzing die wordt aangegeven met een tekstwaarde -LOOKUP = ZOEKEN ## Zoekt naar bepaalde waarden in een vector of een matrix -MATCH = VERGELIJKEN ## Zoekt naar bepaalde waarden in een verwijzing of een matrix -OFFSET = VERSCHUIVING ## Geeft als resultaat een nieuwe verwijzing die is verschoven ten opzichte van een bepaalde verwijzing -ROW = RIJ ## Geeft als resultaat het rijnummer van een verwijzing -ROWS = RIJEN ## Geeft als resultaat het aantal rijen in een verwijzing -RTD = RTG ## Haalt realtimegegevens op uit een programma dat COM-automatisering (automatisering: een methode waarmee de ene toepassing objecten van een andere toepassing of ontwikkelprogramma kan besturen. Automatisering werd vroeger OLE-automatisering genoemd. Automatisering is een industrienorm die deel uitmaakt van het Component Object Model (COM).) ondersteunt -TRANSPOSE = TRANSPONEREN ## Geeft als resultaat de getransponeerde van een matrix -VLOOKUP = VERT.ZOEKEN ## Zoekt in de meest linkse kolom van een matrix naar een bepaalde waarde en geeft als resultaat de waarde in de opgegeven cel - - -## -## Math and trigonometry functions Wiskundige en trigonometrische functies -## -ABS = ABS ## Geeft als resultaat de absolute waarde van een getal -ACOS = BOOGCOS ## Geeft als resultaat de boogcosinus van een getal -ACOSH = BOOGCOSH ## Geeft als resultaat de inverse cosinus hyperbolicus van een getal -ASIN = BOOGSIN ## Geeft als resultaat de boogsinus van een getal -ASINH = BOOGSINH ## Geeft als resultaat de inverse sinus hyperbolicus van een getal -ATAN = BOOGTAN ## Geeft als resultaat de boogtangens van een getal -ATAN2 = BOOGTAN2 ## Geeft als resultaat de boogtangens van de x- en y-coördinaten -ATANH = BOOGTANH ## Geeft als resultaat de inverse tangens hyperbolicus van een getal -CEILING = AFRONDEN.BOVEN ## Rondt de absolute waarde van een getal naar boven af op het dichtstbijzijnde gehele getal of het dichtstbijzijnde significante veelvoud -COMBIN = COMBINATIES ## Geeft als resultaat het aantal combinaties voor een bepaald aantal objecten -COS = COS ## Geeft als resultaat de cosinus van een getal -COSH = COSH ## Geeft als resultaat de cosinus hyperbolicus van een getal -DEGREES = GRADEN ## Converteert radialen naar graden -EVEN = EVEN ## Rondt het getal af op het dichtstbijzijnde gehele even getal -EXP = EXP ## Verheft e tot de macht van een bepaald getal -FACT = FACULTEIT ## Geeft als resultaat de faculteit van een getal -FACTDOUBLE = DUBBELE.FACULTEIT ## Geeft als resultaat de dubbele faculteit van een getal -FLOOR = AFRONDEN.BENEDEN ## Rondt de absolute waarde van een getal naar beneden af -GCD = GGD ## Geeft als resultaat de grootste gemene deler -INT = INTEGER ## Rondt een getal naar beneden af op het dichtstbijzijnde gehele getal -LCM = KGV ## Geeft als resultaat het kleinste gemene veelvoud -LN = LN ## Geeft als resultaat de natuurlijke logaritme van een getal -LOG = LOG ## Geeft als resultaat de logaritme met het opgegeven grondtal van een getal -LOG10 = LOG10 ## Geeft als resultaat de logaritme met grondtal 10 van een getal -MDETERM = DETERMINANTMAT ## Geeft als resultaat de determinant van een matrix -MINVERSE = INVERSEMAT ## Geeft als resultaat de inverse van een matrix -MMULT = PRODUCTMAT ## Geeft als resultaat het product van twee matrices -MOD = REST ## Geeft als resultaat het restgetal van een deling -MROUND = AFRONDEN.N.VEELVOUD ## Geeft als resultaat een getal afgerond op het gewenste veelvoud -MULTINOMIAL = MULTINOMIAAL ## Geeft als resultaat de multinomiaalcoëfficiënt van een reeks getallen -ODD = ONEVEN ## Rondt de absolute waarde van het getal naar boven af op het dichtstbijzijnde gehele oneven getal -PI = PI ## Geeft als resultaat de waarde van pi -POWER = MACHT ## Verheft een getal tot een macht -PRODUCT = PRODUCT ## Vermenigvuldigt de argumenten met elkaar -QUOTIENT = QUOTIENT ## Geeft als resultaat de uitkomst van een deling als geheel getal -RADIANS = RADIALEN ## Converteert graden naar radialen -RAND = ASELECT ## Geeft als resultaat een willekeurig getal tussen 0 en 1 -RANDBETWEEN = ASELECTTUSSEN ## Geeft een willekeurig getal tussen de getallen die u hebt opgegeven -ROMAN = ROMEINS ## Converteert een Arabisch getal naar een Romeins getal en geeft het resultaat weer in de vorm van tekst -ROUND = AFRONDEN ## Rondt een getal af op het opgegeven aantal decimalen -ROUNDDOWN = AFRONDEN.NAAR.BENEDEN ## Rondt de absolute waarde van een getal naar beneden af -ROUNDUP = AFRONDEN.NAAR.BOVEN ## Rondt de absolute waarde van een getal naar boven af -SERIESSUM = SOM.MACHTREEKS ## Geeft als resultaat de som van een machtreeks die is gebaseerd op de formule -SIGN = POS.NEG ## Geeft als resultaat het teken van een getal -SIN = SIN ## Geeft als resultaat de sinus van de opgegeven hoek -SINH = SINH ## Geeft als resultaat de sinus hyperbolicus van een getal -SQRT = WORTEL ## Geeft als resultaat de positieve vierkantswortel van een getal -SQRTPI = WORTEL.PI ## Geeft als resultaat de vierkantswortel van (getal * pi) -SUBTOTAL = SUBTOTAAL ## Geeft als resultaat een subtotaal voor een bereik -SUM = SOM ## Telt de argumenten op -SUMIF = SOM.ALS ## Telt de getallen bij elkaar op die voldoen aan een bepaald criterium -SUMIFS = SOMMEN.ALS ## Telt de cellen in een bereik op die aan meerdere criteria voldoen -SUMPRODUCT = SOMPRODUCT ## Geeft als resultaat de som van de producten van de corresponderende matrixelementen -SUMSQ = KWADRATENSOM ## Geeft als resultaat de som van de kwadraten van de argumenten -SUMX2MY2 = SOM.X2MINY2 ## Geeft als resultaat de som van het verschil tussen de kwadraten van corresponderende waarden in twee matrices -SUMX2PY2 = SOM.X2PLUSY2 ## Geeft als resultaat de som van de kwadratensom van corresponderende waarden in twee matrices -SUMXMY2 = SOM.XMINY.2 ## Geeft als resultaat de som van de kwadraten van de verschillen tussen de corresponderende waarden in twee matrices -TAN = TAN ## Geeft als resultaat de tangens van een getal -TANH = TANH ## Geeft als resultaat de tangens hyperbolicus van een getal -TRUNC = GEHEEL ## Kapt een getal af tot een geheel getal - - -## -## Statistical functions Statistische functies -## -AVEDEV = GEM.DEVIATIE ## Geeft als resultaat het gemiddelde van de absolute deviaties van gegevenspunten ten opzichte van hun gemiddelde waarde -AVERAGE = GEMIDDELDE ## Geeft als resultaat het gemiddelde van de argumenten -AVERAGEA = GEMIDDELDEA ## Geeft als resultaat het gemiddelde van de argumenten, inclusief getallen, tekst en logische waarden -AVERAGEIF = GEMIDDELDE.ALS ## Geeft het gemiddelde (rekenkundig gemiddelde) als resultaat van alle cellen in een bereik die voldoen aan de opgegeven criteria -AVERAGEIFS = GEMIDDELDEN.ALS ## Geeft het gemiddelde (rekenkundig gemiddelde) als resultaat van alle cellen die aan meerdere criteria voldoen -BETADIST = BETA.VERD ## Geeft als resultaat de cumulatieve bèta-verdelingsfunctie -BETAINV = BETA.INV ## Geeft als resultaat de inverse van de cumulatieve verdelingsfunctie voor een gegeven bèta-verdeling -BINOMDIST = BINOMIALE.VERD ## Geeft als resultaat de binomiale verdeling -CHIDIST = CHI.KWADRAAT ## Geeft als resultaat de eenzijdige kans van de chi-kwadraatverdeling -CHIINV = CHI.KWADRAAT.INV ## Geeft als resultaat de inverse van een eenzijdige kans van de chi-kwadraatverdeling -CHITEST = CHI.TOETS ## Geeft als resultaat de onafhankelijkheidstoets -CONFIDENCE = BETROUWBAARHEID ## Geeft als resultaat het betrouwbaarheidsinterval van een gemiddelde waarde voor de elementen van een populatie -CORREL = CORRELATIE ## Geeft als resultaat de correlatiecoëfficiënt van twee gegevensverzamelingen -COUNT = AANTAL ## Telt het aantal getallen in de argumentenlijst -COUNTA = AANTALARG ## Telt het aantal waarden in de argumentenlijst -COUNTBLANK = AANTAL.LEGE.CELLEN ## Telt het aantal lege cellen in een bereik -COUNTIF = AANTAL.ALS ## Telt in een bereik het aantal cellen die voldoen aan een bepaald criterium -COUNTIFS = AANTALLEN.ALS ## Telt in een bereik het aantal cellen die voldoen aan meerdere criteria -COVAR = COVARIANTIE ## Geeft als resultaat de covariantie, het gemiddelde van de producten van de gepaarde deviaties -CRITBINOM = CRIT.BINOM ## Geeft als resultaat de kleinste waarde waarvoor de binomiale verdeling kleiner is dan of gelijk is aan het criterium -DEVSQ = DEV.KWAD ## Geeft als resultaat de som van de deviaties in het kwadraat -EXPONDIST = EXPON.VERD ## Geeft als resultaat de exponentiële verdeling -FDIST = F.VERDELING ## Geeft als resultaat de F-verdeling -FINV = F.INVERSE ## Geeft als resultaat de inverse van de F-verdeling -FISHER = FISHER ## Geeft als resultaat de Fisher-transformatie -FISHERINV = FISHER.INV ## Geeft als resultaat de inverse van de Fisher-transformatie -FORECAST = VOORSPELLEN ## Geeft als resultaat een waarde op basis van een lineaire trend -FREQUENCY = FREQUENTIE ## Geeft als resultaat een frequentieverdeling in de vorm van een verticale matrix -FTEST = F.TOETS ## Geeft als resultaat een F-toets -GAMMADIST = GAMMA.VERD ## Geeft als resultaat de gamma-verdeling -GAMMAINV = GAMMA.INV ## Geeft als resultaat de inverse van de cumulatieve gamma-verdeling -GAMMALN = GAMMA.LN ## Geeft als resultaat de natuurlijke logaritme van de gamma-functie, G(x) -GEOMEAN = MEETK.GEM ## Geeft als resultaat het meetkundige gemiddelde -GROWTH = GROEI ## Geeft als resultaat de waarden voor een exponentiële trend -HARMEAN = HARM.GEM ## Geeft als resultaat het harmonische gemiddelde -HYPGEOMDIST = HYPERGEO.VERD ## Geeft als resultaat de hypergeometrische verdeling -INTERCEPT = SNIJPUNT ## Geeft als resultaat het snijpunt van de lineaire regressielijn met de y-as -KURT = KURTOSIS ## Geeft als resultaat de kurtosis van een gegevensverzameling -LARGE = GROOTSTE ## Geeft als resultaat de op k-1 na grootste waarde in een gegevensverzameling -LINEST = LIJNSCH ## Geeft als resultaat de parameters van een lineaire trend -LOGEST = LOGSCH ## Geeft als resultaat de parameters van een exponentiële trend -LOGINV = LOG.NORM.INV ## Geeft als resultaat de inverse van de logaritmische normale verdeling -LOGNORMDIST = LOG.NORM.VERD ## Geeft als resultaat de cumulatieve logaritmische normale verdeling -MAX = MAX ## Geeft als resultaat de maximumwaarde in een lijst met argumenten -MAXA = MAXA ## Geeft als resultaat de maximumwaarde in een lijst met argumenten, inclusief getallen, tekst en logische waarden -MEDIAN = MEDIAAN ## Geeft als resultaat de mediaan van de opgegeven getallen -MIN = MIN ## Geeft als resultaat de minimumwaarde in een lijst met argumenten -MINA = MINA ## Geeft als resultaat de minimumwaarde in een lijst met argumenten, inclusief getallen, tekst en logische waarden -MODE = MODUS ## Geeft als resultaat de meest voorkomende waarde in een gegevensverzameling -NEGBINOMDIST = NEG.BINOM.VERD ## Geeft als resultaat de negatieve binomiaalverdeling -NORMDIST = NORM.VERD ## Geeft als resultaat de cumulatieve normale verdeling -NORMINV = NORM.INV ## Geeft als resultaat de inverse van de cumulatieve standaardnormale verdeling -NORMSDIST = STAND.NORM.VERD ## Geeft als resultaat de cumulatieve standaardnormale verdeling -NORMSINV = STAND.NORM.INV ## Geeft als resultaat de inverse van de cumulatieve normale verdeling -PEARSON = PEARSON ## Geeft als resultaat de correlatiecoëfficiënt van Pearson -PERCENTILE = PERCENTIEL ## Geeft als resultaat het k-de percentiel van waarden in een bereik -PERCENTRANK = PERCENT.RANG ## Geeft als resultaat de positie, in procenten uitgedrukt, van een waarde in de rangorde van een gegevensverzameling -PERMUT = PERMUTATIES ## Geeft als resultaat het aantal permutaties voor een gegeven aantal objecten -POISSON = POISSON ## Geeft als resultaat de Poisson-verdeling -PROB = KANS ## Geeft als resultaat de kans dat waarden zich tussen twee grenzen bevinden -QUARTILE = KWARTIEL ## Geeft als resultaat het kwartiel van een gegevensverzameling -RANK = RANG ## Geeft als resultaat het rangnummer van een getal in een lijst getallen -RSQ = R.KWADRAAT ## Geeft als resultaat het kwadraat van de Pearson-correlatiecoëfficiënt -SKEW = SCHEEFHEID ## Geeft als resultaat de mate van asymmetrie van een verdeling -SLOPE = RICHTING ## Geeft als resultaat de richtingscoëfficiënt van een lineaire regressielijn -SMALL = KLEINSTE ## Geeft als resultaat de op k-1 na kleinste waarde in een gegevensverzameling -STANDARDIZE = NORMALISEREN ## Geeft als resultaat een genormaliseerde waarde -STDEV = STDEV ## Maakt een schatting van de standaarddeviatie op basis van een steekproef -STDEVA = STDEVA ## Maakt een schatting van de standaarddeviatie op basis van een steekproef, inclusief getallen, tekst en logische waarden -STDEVP = STDEVP ## Berekent de standaarddeviatie op basis van de volledige populatie -STDEVPA = STDEVPA ## Berekent de standaarddeviatie op basis van de volledige populatie, inclusief getallen, tekst en logische waarden -STEYX = STAND.FOUT.YX ## Geeft als resultaat de standaardfout in de voorspelde y-waarde voor elke x in een regressie -TDIST = T.VERD ## Geeft als resultaat de Student T-verdeling -TINV = T.INV ## Geeft als resultaat de inverse van de Student T-verdeling -TREND = TREND ## Geeft als resultaat de waarden voor een lineaire trend -TRIMMEAN = GETRIMD.GEM ## Geeft als resultaat het gemiddelde van waarden in een gegevensverzameling -TTEST = T.TOETS ## Geeft als resultaat de kans met behulp van de Student T-toets -VAR = VAR ## Maakt een schatting van de variantie op basis van een steekproef -VARA = VARA ## Maakt een schatting van de variantie op basis van een steekproef, inclusief getallen, tekst en logische waarden -VARP = VARP ## Berekent de variantie op basis van de volledige populatie -VARPA = VARPA ## Berekent de standaarddeviatie op basis van de volledige populatie, inclusief getallen, tekst en logische waarden -WEIBULL = WEIBULL ## Geeft als resultaat de Weibull-verdeling -ZTEST = Z.TOETS ## Geeft als resultaat de eenzijdige kanswaarde van een Z-toets - - -## -## Text functions Tekstfuncties -## -ASC = ASC ## Wijzigt Nederlandse letters of katakanatekens over de volle breedte (dubbel-bytetekens) binnen een tekenreeks in tekens over de halve breedte (enkel-bytetekens) -BAHTTEXT = BAHT.TEKST ## Converteert een getal naar tekst met de valutanotatie ß (baht) -CHAR = TEKEN ## Geeft als resultaat het teken dat hoort bij de opgegeven code -CLEAN = WISSEN.CONTROL ## Verwijdert alle niet-afdrukbare tekens uit een tekst -CODE = CODE ## Geeft als resultaat de numerieke code voor het eerste teken in een tekenreeks -CONCATENATE = TEKST.SAMENVOEGEN ## Voegt verschillende tekstfragmenten samen tot één tekstfragment -DOLLAR = EURO ## Converteert een getal naar tekst met de valutanotatie € (euro) -EXACT = GELIJK ## Controleert of twee tekenreeksen identiek zijn -FIND = VIND.ALLES ## Zoekt een bepaalde tekenreeks in een tekst (waarbij onderscheid wordt gemaakt tussen hoofdletters en kleine letters) -FINDB = VIND.ALLES.B ## Zoekt een bepaalde tekenreeks in een tekst (waarbij onderscheid wordt gemaakt tussen hoofdletters en kleine letters) -FIXED = VAST ## Maakt een getal als tekst met een vast aantal decimalen op -JIS = JIS ## Wijzigt Nederlandse letters of katakanatekens over de halve breedte (enkel-bytetekens) binnen een tekenreeks in tekens over de volle breedte (dubbel-bytetekens) -LEFT = LINKS ## Geeft als resultaat de meest linkse tekens in een tekenreeks -LEFTB = LINKSB ## Geeft als resultaat de meest linkse tekens in een tekenreeks -LEN = LENGTE ## Geeft als resultaat het aantal tekens in een tekenreeks -LENB = LENGTEB ## Geeft als resultaat het aantal tekens in een tekenreeks -LOWER = KLEINE.LETTERS ## Zet tekst om in kleine letters -MID = MIDDEN ## Geeft als resultaat een bepaald aantal tekens van een tekenreeks vanaf de positie die u opgeeft -MIDB = DEELB ## Geeft als resultaat een bepaald aantal tekens van een tekenreeks vanaf de positie die u opgeeft -PHONETIC = FONETISCH ## Haalt de fonetische tekens (furigana) uit een tekenreeks op -PROPER = BEGINLETTERS ## Zet de eerste letter van elk woord in een tekst om in een hoofdletter -REPLACE = VERVANG ## Vervangt tekens binnen een tekst -REPLACEB = VERVANGENB ## Vervangt tekens binnen een tekst -REPT = HERHALING ## Herhaalt een tekst een aantal malen -RIGHT = RECHTS ## Geeft als resultaat de meest rechtse tekens in een tekenreeks -RIGHTB = RECHTSB ## Geeft als resultaat de meest rechtse tekens in een tekenreeks -SEARCH = VIND.SPEC ## Zoekt een bepaalde tekenreeks in een tekst (waarbij geen onderscheid wordt gemaakt tussen hoofdletters en kleine letters) -SEARCHB = VIND.SPEC.B ## Zoekt een bepaalde tekenreeks in een tekst (waarbij geen onderscheid wordt gemaakt tussen hoofdletters en kleine letters) -SUBSTITUTE = SUBSTITUEREN ## Vervangt oude tekst door nieuwe tekst in een tekenreeks -T = T ## Converteert de argumenten naar tekst -TEXT = TEKST ## Maakt een getal op en converteert het getal naar tekst -TRIM = SPATIES.WISSEN ## Verwijdert de spaties uit een tekst -UPPER = HOOFDLETTERS ## Zet tekst om in hoofdletters -VALUE = WAARDE ## Converteert tekst naar een getal diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config deleted file mode 100644 index bf2d34a..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = kr - - -## -## Excel Error Codes (For future use) -## -NULL = #NULL! -DIV0 = #DIV/0! -VALUE = #VERDI! -REF = #REF! -NAME = #NAVN? -NUM = #NUM! -NA = #I/T diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions deleted file mode 100644 index 10d0a20..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Funksjonene Tillegg og Automatisering -## -GETPIVOTDATA = HENTPIVOTDATA ## Returnerer data som er lagret i en pivottabellrapport - - -## -## Cube functions Kubefunksjoner -## -CUBEKPIMEMBER = KUBEKPIMEDLEM ## Returnerer navnet, egenskapen og målet for en viktig ytelsesindikator (KPI), og viser navnet og egenskapen i cellen. En KPI er en målbar enhet, for eksempel månedlig bruttoinntjening eller kvartalsvis inntjening per ansatt, og brukes til å overvåke ytelsen i en organisasjon. -CUBEMEMBER = KUBEMEDLEM ## Returnerer et medlem eller en tuppel i et kubehierarki. Brukes til å validere at medlemmet eller tuppelen finnes i kuben. -CUBEMEMBERPROPERTY = KUBEMEDLEMEGENSKAP ## Returnerer verdien til en medlemsegenskap i kuben. Brukes til å validere at et medlemsnavn finnes i kuben, og til å returnere den angitte egenskapen for dette medlemmet. -CUBERANKEDMEMBER = KUBERANGERTMEDLEM ## Returnerer det n-te, eller rangerte, medlemmet i et sett. Brukes til å returnere ett eller flere elementer i et sett, for eksempel de 10 beste studentene. -CUBESET = KUBESETT ## Definerer et beregnet sett av medlemmer eller tuppeler ved å sende et settuttrykk til kuben på serveren, noe som oppretter settet og deretter returnerer dette settet til Microsoft Office Excel. -CUBESETCOUNT = KUBESETTANTALL ## Returnerer antallet elementer i et sett. -CUBEVALUE = KUBEVERDI ## Returnerer en aggregert verdi fra en kube. - - -## -## Database functions Databasefunksjoner -## -DAVERAGE = DGJENNOMSNITT ## Returnerer gjennomsnittet av merkede databaseposter -DCOUNT = DANTALL ## Teller celler som inneholder tall i en database -DCOUNTA = DANTALLA ## Teller celler som ikke er tomme i en database -DGET = DHENT ## Trekker ut fra en database en post som oppfyller angitte vilkår -DMAX = DMAKS ## Returnerer maksimumsverdien fra merkede databaseposter -DMIN = DMIN ## Returnerer minimumsverdien fra merkede databaseposter -DPRODUCT = DPRODUKT ## Multipliserer verdiene i et bestemt felt med poster som oppfyller vilkårene i en database -DSTDEV = DSTDAV ## Estimerer standardavviket basert på et utvalg av merkede databaseposter -DSTDEVP = DSTAVP ## Beregner standardavviket basert på at merkede databaseposter utgjør hele populasjonen -DSUM = DSUMMER ## Legger til tallene i feltkolonnen med poster, i databasen som oppfyller vilkårene -DVAR = DVARIANS ## Estimerer variansen basert på et utvalg av merkede databaseposter -DVARP = DVARIANSP ## Beregner variansen basert på at merkede databaseposter utgjør hele populasjonen - - -## -## Date and time functions Dato- og tidsfunksjoner -## -DATE = DATO ## Returnerer serienummeret som svarer til en bestemt dato -DATEVALUE = DATOVERDI ## Konverterer en dato med tekstformat til et serienummer -DAY = DAG ## Konverterer et serienummer til en dag i måneden -DAYS360 = DAGER360 ## Beregner antall dager mellom to datoer basert på et år med 360 dager -EDATE = DAG.ETTER ## Returnerer serienummeret som svarer til datoen som er det indikerte antall måneder før eller etter startdatoen -EOMONTH = MÅNEDSSLUTT ## Returnerer serienummeret som svarer til siste dag i måneden, før eller etter et angitt antall måneder -HOUR = TIME ## Konverterer et serienummer til en time -MINUTE = MINUTT ## Konverterer et serienummer til et minutt -MONTH = MÅNED ## Konverterer et serienummer til en måned -NETWORKDAYS = NETT.ARBEIDSDAGER ## Returnerer antall hele arbeidsdager mellom to datoer -NOW = NÅ ## Returnerer serienummeret som svarer til gjeldende dato og klokkeslett -SECOND = SEKUND ## Konverterer et serienummer til et sekund -TIME = TID ## Returnerer serienummeret som svarer til et bestemt klokkeslett -TIMEVALUE = TIDSVERDI ## Konverterer et klokkeslett i tekstformat til et serienummer -TODAY = IDAG ## Returnerer serienummeret som svarer til dagens dato -WEEKDAY = UKEDAG ## Konverterer et serienummer til en ukedag -WEEKNUM = UKENR ## Konverterer et serienummer til et tall som representerer hvilket nummer uken har i et år -WORKDAY = ARBEIDSDAG ## Returnerer serienummeret som svarer til datoen før eller etter et angitt antall arbeidsdager -YEAR = ÅR ## Konverterer et serienummer til et år -YEARFRAC = ÅRDEL ## Returnerer brøkdelen for året, som svarer til antall hele dager mellom startdato og sluttdato - - -## -## Engineering functions Tekniske funksjoner -## -BESSELI = BESSELI ## Returnerer den endrede Bessel-funksjonen In(x) -BESSELJ = BESSELJ ## Returnerer Bessel-funksjonen Jn(x) -BESSELK = BESSELK ## Returnerer den endrede Bessel-funksjonen Kn(x) -BESSELY = BESSELY ## Returnerer Bessel-funksjonen Yn(x) -BIN2DEC = BINTILDES ## Konverterer et binært tall til et desimaltall -BIN2HEX = BINTILHEKS ## Konverterer et binært tall til et heksadesimaltall -BIN2OCT = BINTILOKT ## Konverterer et binært tall til et oktaltall -COMPLEX = KOMPLEKS ## Konverterer reelle og imaginære koeffisienter til et komplekst tall -CONVERT = KONVERTER ## Konverterer et tall fra ett målsystem til et annet -DEC2BIN = DESTILBIN ## Konverterer et desimaltall til et binærtall -DEC2HEX = DESTILHEKS ## Konverterer et heltall i 10-tallsystemet til et heksadesimalt tall -DEC2OCT = DESTILOKT ## Konverterer et heltall i 10-tallsystemet til et oktaltall -DELTA = DELTA ## Undersøker om to verdier er like -ERF = FEILF ## Returnerer feilfunksjonen -ERFC = FEILFK ## Returnerer den komplementære feilfunksjonen -GESTEP = GRENSEVERDI ## Tester om et tall er større enn en terskelverdi -HEX2BIN = HEKSTILBIN ## Konverterer et heksadesimaltall til et binært tall -HEX2DEC = HEKSTILDES ## Konverterer et heksadesimalt tall til et heltall i 10-tallsystemet -HEX2OCT = HEKSTILOKT ## Konverterer et heksadesimalt tall til et oktaltall -IMABS = IMABS ## Returnerer absoluttverdien (koeffisienten) til et komplekst tall -IMAGINARY = IMAGINÆR ## Returnerer den imaginære koeffisienten til et komplekst tall -IMARGUMENT = IMARGUMENT ## Returnerer argumentet theta, som er en vinkel uttrykt i radianer -IMCONJUGATE = IMKONJUGERT ## Returnerer den komplekse konjugaten til et komplekst tall -IMCOS = IMCOS ## Returnerer cosinus til et komplekst tall -IMDIV = IMDIV ## Returnerer kvotienten til to komplekse tall -IMEXP = IMEKSP ## Returnerer eksponenten til et komplekst tall -IMLN = IMLN ## Returnerer den naturlige logaritmen for et komplekst tall -IMLOG10 = IMLOG10 ## Returnerer logaritmen med grunntall 10 for et komplekst tall -IMLOG2 = IMLOG2 ## Returnerer logaritmen med grunntall 2 for et komplekst tall -IMPOWER = IMOPPHØY ## Returnerer et komplekst tall opphøyd til en heltallspotens -IMPRODUCT = IMPRODUKT ## Returnerer produktet av komplekse tall -IMREAL = IMREELL ## Returnerer den reelle koeffisienten til et komplekst tall -IMSIN = IMSIN ## Returnerer sinus til et komplekst tall -IMSQRT = IMROT ## Returnerer kvadratroten av et komplekst tall -IMSUB = IMSUB ## Returnerer differansen mellom to komplekse tall -IMSUM = IMSUMMER ## Returnerer summen av komplekse tall -OCT2BIN = OKTTILBIN ## Konverterer et oktaltall til et binært tall -OCT2DEC = OKTTILDES ## Konverterer et oktaltall til et desimaltall -OCT2HEX = OKTTILHEKS ## Konverterer et oktaltall til et heksadesimaltall - - -## -## Financial functions Økonomiske funksjoner -## -ACCRINT = PÅLØPT.PERIODISK.RENTE ## Returnerer påløpte renter for et verdipapir som betaler periodisk rente -ACCRINTM = PÅLØPT.FORFALLSRENTE ## Returnerer den påløpte renten for et verdipapir som betaler rente ved forfall -AMORDEGRC = AMORDEGRC ## Returnerer avskrivningen for hver regnskapsperiode ved hjelp av en avskrivingskoeffisient -AMORLINC = AMORLINC ## Returnerer avskrivingen for hver regnskapsperiode -COUPDAYBS = OBLIG.DAGER.FF ## Returnerer antall dager fra begynnelsen av den rentebærende perioden til innløsningsdatoen -COUPDAYS = OBLIG.DAGER ## Returnerer antall dager i den rentebærende perioden som inneholder innløsningsdatoen -COUPDAYSNC = OBLIG.DAGER.NF ## Returnerer antall dager fra betalingsdato til neste renteinnbetalingsdato -COUPNCD = OBLIG.DAGER.EF ## Returnerer obligasjonsdatoen som kommer etter oppgjørsdatoen -COUPNUM = OBLIG.ANTALL ## Returnerer antall obligasjoner som skal betales mellom oppgjørsdatoen og forfallsdatoen -COUPPCD = OBLIG.DAG.FORRIGE ## Returnerer obligasjonsdatoen som kommer før oppgjørsdatoen -CUMIPMT = SAMLET.RENTE ## Returnerer den kumulative renten som er betalt mellom to perioder -CUMPRINC = SAMLET.HOVEDSTOL ## Returnerer den kumulative hovedstolen som er betalt for et lån mellom to perioder -DB = DAVSKR ## Returnerer avskrivningen for et aktivum i en angitt periode, foretatt med fast degressiv avskrivning -DDB = DEGRAVS ## Returnerer avskrivningen for et aktivum for en gitt periode, ved hjelp av dobbel degressiv avskrivning eller en metode som du selv angir -DISC = DISKONTERT ## Returnerer diskonteringsraten for et verdipapir -DOLLARDE = DOLLARDE ## Konverterer en valutapris uttrykt som en brøk, til en valutapris uttrykt som et desimaltall -DOLLARFR = DOLLARBR ## Konverterer en valutapris uttrykt som et desimaltall, til en valutapris uttrykt som en brøk -DURATION = VARIGHET ## Returnerer årlig varighet for et verdipapir med renter som betales periodisk -EFFECT = EFFEKTIV.RENTE ## Returnerer den effektive årlige rentesatsen -FV = SLUTTVERDI ## Returnerer fremtidig verdi for en investering -FVSCHEDULE = SVPLAN ## Returnerer den fremtidige verdien av en inngående hovedstol etter å ha anvendt en serie med sammensatte rentesatser -INTRATE = RENTESATS ## Returnerer rentefoten av et fullfinansiert verdipapir -IPMT = RAVDRAG ## Returnerer betalte renter på en investering for en gitt periode -IRR = IR ## Returnerer internrenten for en serie kontantstrømmer -ISPMT = ER.AVDRAG ## Beregner renten som er betalt for en investering i løpet av en bestemt periode -MDURATION = MVARIGHET ## Returnerer Macauleys modifiserte varighet for et verdipapir med en antatt pålydende verdi på kr 100,00 -MIRR = MODIR ## Returnerer internrenten der positive og negative kontantstrømmer finansieres med forskjellige satser -NOMINAL = NOMINELL ## Returnerer årlig nominell rentesats -NPER = PERIODER ## Returnerer antall perioder for en investering -NPV = NNV ## Returnerer netto nåverdi for en investering, basert på en serie periodiske kontantstrømmer og en rentesats -ODDFPRICE = AVVIKFP.PRIS ## Returnerer pris pålydende kr 100 for et verdipapir med en odde første periode -ODDFYIELD = AVVIKFP.AVKASTNING ## Returnerer avkastingen for et verdipapir med en odde første periode -ODDLPRICE = AVVIKSP.PRIS ## Returnerer pris pålydende kr 100 for et verdipapir med en odde siste periode -ODDLYIELD = AVVIKSP.AVKASTNING ## Returnerer avkastingen for et verdipapir med en odde siste periode -PMT = AVDRAG ## Returnerer periodisk betaling for en annuitet -PPMT = AMORT ## Returnerer betalingen på hovedstolen for en investering i en gitt periode -PRICE = PRIS ## Returnerer prisen per pålydende kr 100 for et verdipapir som gir periodisk avkastning -PRICEDISC = PRIS.DISKONTERT ## Returnerer prisen per pålydende kr 100 for et diskontert verdipapir -PRICEMAT = PRIS.FORFALL ## Returnerer prisen per pålydende kr 100 av et verdipapir som betaler rente ved forfall -PV = NÅVERDI ## Returnerer nåverdien av en investering -RATE = RENTE ## Returnerer rentesatsen per periode for en annuitet -RECEIVED = MOTTATT.AVKAST ## Returnerer summen som mottas ved forfallsdato for et fullinvestert verdipapir -SLN = LINAVS ## Returnerer den lineære avskrivningen for et aktivum i én periode -SYD = ÅRSAVS ## Returnerer årsavskrivningen for et aktivum i en angitt periode -TBILLEQ = TBILLEKV ## Returnerer den obligasjonsekvivalente avkastningen for en statsobligasjon -TBILLPRICE = TBILLPRIS ## Returnerer prisen per pålydende kr 100 for en statsobligasjon -TBILLYIELD = TBILLAVKASTNING ## Returnerer avkastningen til en statsobligasjon -VDB = VERDIAVS ## Returnerer avskrivningen for et aktivum i en angitt periode eller delperiode, ved hjelp av degressiv avskrivning -XIRR = XIR ## Returnerer internrenten for en serie kontantstrømmer som ikke nødvendigvis er periodiske -XNPV = XNNV ## Returnerer netto nåverdi for en serie kontantstrømmer som ikke nødvendigvis er periodiske -YIELD = AVKAST ## Returnerer avkastningen på et verdipapir som betaler periodisk rente -YIELDDISC = AVKAST.DISKONTERT ## Returnerer årlig avkastning for et diskontert verdipapir, for eksempel en statskasseveksel -YIELDMAT = AVKAST.FORFALL ## Returnerer den årlige avkastningen for et verdipapir som betaler rente ved forfallsdato - - -## -## Information functions Informasjonsfunksjoner -## -CELL = CELLE ## Returnerer informasjon om formatering, plassering eller innholdet til en celle -ERROR.TYPE = FEIL.TYPE ## Returnerer et tall som svarer til en feiltype -INFO = INFO ## Returnerer informasjon om gjeldende operativmiljø -ISBLANK = ERTOM ## Returnerer SANN hvis verdien er tom -ISERR = ERFEIL ## Returnerer SANN hvis verdien er en hvilken som helst annen feilverdi enn #I/T -ISERROR = ERFEIL ## Returnerer SANN hvis verdien er en hvilken som helst feilverdi -ISEVEN = ERPARTALL ## Returnerer SANN hvis tallet er et partall -ISLOGICAL = ERLOGISK ## Returnerer SANN hvis verdien er en logisk verdi -ISNA = ERIT ## Returnerer SANN hvis verdien er feilverdien #I/T -ISNONTEXT = ERIKKETEKST ## Returnerer SANN hvis verdien ikke er tekst -ISNUMBER = ERTALL ## Returnerer SANN hvis verdien er et tall -ISODD = ERODDETALL ## Returnerer SANN hvis tallet er et oddetall -ISREF = ERREF ## Returnerer SANN hvis verdien er en referanse -ISTEXT = ERTEKST ## Returnerer SANN hvis verdien er tekst -N = N ## Returnerer en verdi som er konvertert til et tall -NA = IT ## Returnerer feilverdien #I/T -TYPE = VERDITYPE ## Returnerer et tall som indikerer datatypen til en verdi - - -## -## Logical functions Logiske funksjoner -## -AND = OG ## Returnerer SANN hvis alle argumentene er lik SANN -FALSE = USANN ## Returnerer den logiske verdien USANN -IF = HVIS ## Angir en logisk test som skal utføres -IFERROR = HVISFEIL ## Returnerer en verdi du angir hvis en formel evaluerer til en feil. Ellers returnerer den resultatet av formelen. -NOT = IKKE ## Reverserer logikken til argumentet -OR = ELLER ## Returnerer SANN hvis ett eller flere argumenter er lik SANN -TRUE = SANN ## Returnerer den logiske verdien SANN - - -## -## Lookup and reference functions Oppslag- og referansefunksjoner -## -ADDRESS = ADRESSE ## Returnerer en referanse som tekst til en enkelt celle i et regneark -AREAS = OMRÅDER ## Returnerer antall områder i en referanse -CHOOSE = VELG ## Velger en verdi fra en liste med verdier -COLUMN = KOLONNE ## Returnerer kolonnenummeret for en referanse -COLUMNS = KOLONNER ## Returnerer antall kolonner i en referanse -HLOOKUP = FINN.KOLONNE ## Leter i den øverste raden i en matrise og returnerer verdien for den angitte cellen -HYPERLINK = HYPERKOBLING ## Oppretter en snarvei eller et hopp som åpner et dokument som er lagret på en nettverksserver, et intranett eller Internett -INDEX = INDEKS ## Bruker en indeks til å velge en verdi fra en referanse eller matrise -INDIRECT = INDIREKTE ## Returnerer en referanse angitt av en tekstverdi -LOOKUP = SLÅ.OPP ## Slår opp verdier i en vektor eller matrise -MATCH = SAMMENLIGNE ## Slår opp verdier i en referanse eller matrise -OFFSET = FORSKYVNING ## Returnerer en referanseforskyvning fra en gitt referanse -ROW = RAD ## Returnerer radnummeret for en referanse -ROWS = RADER ## Returnerer antall rader i en referanse -RTD = RTD ## Henter sanntidsdata fra et program som støtter COM-automatisering (automatisering: En måte å arbeide på med programobjekter fra et annet program- eller utviklingsverktøy. Tidligere kalt OLE-automatisering. Automatisering er en bransjestandard og en funksjon i Component Object Model (COM).) -TRANSPOSE = TRANSPONER ## Returnerer transponeringen av en matrise -VLOOKUP = FINN.RAD ## Leter i den første kolonnen i en matrise og flytter bortover raden for å returnere verdien til en celle - - -## -## Math and trigonometry functions Matematikk- og trigonometrifunksjoner -## -ABS = ABS ## Returnerer absoluttverdien til et tall -ACOS = ARCCOS ## Returnerer arcus cosinus til et tall -ACOSH = ARCCOSH ## Returnerer den inverse hyperbolske cosinus til et tall -ASIN = ARCSIN ## Returnerer arcus sinus til et tall -ASINH = ARCSINH ## Returnerer den inverse hyperbolske sinus til et tall -ATAN = ARCTAN ## Returnerer arcus tangens til et tall -ATAN2 = ARCTAN2 ## Returnerer arcus tangens fra x- og y-koordinater -ATANH = ARCTANH ## Returnerer den inverse hyperbolske tangens til et tall -CEILING = AVRUND.GJELDENDE.MULTIPLUM ## Runder av et tall til nærmeste heltall eller til nærmeste signifikante multiplum -COMBIN = KOMBINASJON ## Returnerer antall kombinasjoner for ett gitt antall objekter -COS = COS ## Returnerer cosinus til et tall -COSH = COSH ## Returnerer den hyperbolske cosinus til et tall -DEGREES = GRADER ## Konverterer radianer til grader -EVEN = AVRUND.TIL.PARTALL ## Runder av et tall oppover til nærmeste heltall som er et partall -EXP = EKSP ## Returnerer e opphøyd i en angitt potens -FACT = FAKULTET ## Returnerer fakultet til et tall -FACTDOUBLE = DOBBELFAKT ## Returnerer et talls doble fakultet -FLOOR = AVRUND.GJELDENDE.MULTIPLUM.NED ## Avrunder et tall nedover, mot null -GCD = SFF ## Returnerer høyeste felles divisor -INT = HELTALL ## Avrunder et tall nedover til nærmeste heltall -LCM = MFM ## Returnerer minste felles multiplum -LN = LN ## Returnerer den naturlige logaritmen til et tall -LOG = LOG ## Returnerer logaritmen for et tall til et angitt grunntall -LOG10 = LOG10 ## Returnerer logaritmen med grunntall 10 for et tall -MDETERM = MDETERM ## Returnerer matrisedeterminanten til en matrise -MINVERSE = MINVERS ## Returnerer den inverse matrisen til en matrise -MMULT = MMULT ## Returnerer matriseproduktet av to matriser -MOD = REST ## Returnerer resten fra en divisjon -MROUND = MRUND ## Returnerer et tall avrundet til det ønskede multiplum -MULTINOMIAL = MULTINOMINELL ## Returnerer det multinominelle for et sett med tall -ODD = AVRUND.TIL.ODDETALL ## Runder av et tall oppover til nærmeste heltall som er et oddetall -PI = PI ## Returnerer verdien av pi -POWER = OPPHØYD.I ## Returnerer resultatet av et tall opphøyd i en potens -PRODUCT = PRODUKT ## Multipliserer argumentene -QUOTIENT = KVOTIENT ## Returnerer heltallsdelen av en divisjon -RADIANS = RADIANER ## Konverterer grader til radianer -RAND = TILFELDIG ## Returnerer et tilfeldig tall mellom 0 og 1 -RANDBETWEEN = TILFELDIGMELLOM ## Returnerer et tilfeldig tall innenfor et angitt område -ROMAN = ROMERTALL ## Konverterer vanlige tall til romertall, som tekst -ROUND = AVRUND ## Avrunder et tall til et angitt antall sifre -ROUNDDOWN = AVRUND.NED ## Avrunder et tall nedover, mot null -ROUNDUP = AVRUND.OPP ## Runder av et tall oppover, bort fra null -SERIESSUM = SUMMER.REKKE ## Returnerer summen av en geometrisk rekke, basert på formelen -SIGN = FORTEGN ## Returnerer fortegnet for et tall -SIN = SIN ## Returnerer sinus til en gitt vinkel -SINH = SINH ## Returnerer den hyperbolske sinus til et tall -SQRT = ROT ## Returnerer en positiv kvadratrot -SQRTPI = ROTPI ## Returnerer kvadratroten av (tall * pi) -SUBTOTAL = DELSUM ## Returnerer en delsum i en liste eller database -SUM = SUMMER ## Legger sammen argumentene -SUMIF = SUMMERHVIS ## Legger sammen cellene angitt ved et gitt vilkår -SUMIFS = SUMMER.HVIS.SETT ## Legger sammen cellene i et område som oppfyller flere vilkår -SUMPRODUCT = SUMMERPRODUKT ## Returnerer summen av produktene av tilsvarende matrisekomponenter -SUMSQ = SUMMERKVADRAT ## Returnerer kvadratsummen av argumentene -SUMX2MY2 = SUMMERX2MY2 ## Returnerer summen av differansen av kvadratene for tilsvarende verdier i to matriser -SUMX2PY2 = SUMMERX2PY2 ## Returnerer summen av kvadratsummene for tilsvarende verdier i to matriser -SUMXMY2 = SUMMERXMY2 ## Returnerer summen av kvadratene av differansen for tilsvarende verdier i to matriser -TAN = TAN ## Returnerer tangens for et tall -TANH = TANH ## Returnerer den hyperbolske tangens for et tall -TRUNC = AVKORT ## Korter av et tall til et heltall - - -## -## Statistical functions Statistiske funksjoner -## -AVEDEV = GJENNOMSNITTSAVVIK ## Returnerer datapunktenes gjennomsnittlige absoluttavvik fra middelverdien -AVERAGE = GJENNOMSNITT ## Returnerer gjennomsnittet for argumentene -AVERAGEA = GJENNOMSNITTA ## Returnerer gjennomsnittet for argumentene, inkludert tall, tekst og logiske verdier -AVERAGEIF = GJENNOMSNITTHVIS ## Returnerer gjennomsnittet (aritmetisk gjennomsnitt) av alle cellene i et område som oppfyller et bestemt vilkår -AVERAGEIFS = GJENNOMSNITT.HVIS.SETT ## Returnerer gjennomsnittet (aritmetisk middelverdi) av alle celler som oppfyller flere vilkår. -BETADIST = BETA.FORDELING ## Returnerer den kumulative betafordelingsfunksjonen -BETAINV = INVERS.BETA.FORDELING ## Returnerer den inverse verdien til fordelingsfunksjonen for en angitt betafordeling -BINOMDIST = BINOM.FORDELING ## Returnerer den individuelle binomiske sannsynlighetsfordelingen -CHIDIST = KJI.FORDELING ## Returnerer den ensidige sannsynligheten for en kjikvadrert fordeling -CHIINV = INVERS.KJI.FORDELING ## Returnerer den inverse av den ensidige sannsynligheten for den kjikvadrerte fordelingen -CHITEST = KJI.TEST ## Utfører testen for uavhengighet -CONFIDENCE = KONFIDENS ## Returnerer konfidensintervallet til gjennomsnittet for en populasjon -CORREL = KORRELASJON ## Returnerer korrelasjonskoeffisienten mellom to datasett -COUNT = ANTALL ## Teller hvor mange tall som er i argumentlisten -COUNTA = ANTALLA ## Teller hvor mange verdier som er i argumentlisten -COUNTBLANK = TELLBLANKE ## Teller antall tomme celler i et område. -COUNTIF = ANTALL.HVIS ## Teller antall celler i et område som oppfyller gitte vilkår -COUNTIFS = ANTALL.HVIS.SETT ## Teller antallet ikke-tomme celler i et område som oppfyller flere vilkår -COVAR = KOVARIANS ## Returnerer kovariansen, gjennomsnittet av produktene av parvise avvik -CRITBINOM = GRENSE.BINOM ## Returnerer den minste verdien der den kumulative binomiske fordelingen er mindre enn eller lik en vilkårsverdi -DEVSQ = AVVIK.KVADRERT ## Returnerer summen av kvadrerte avvik -EXPONDIST = EKSP.FORDELING ## Returnerer eksponentialfordelingen -FDIST = FFORDELING ## Returnerer F-sannsynlighetsfordelingen -FINV = FFORDELING.INVERS ## Returnerer den inverse av den sannsynlige F-fordelingen -FISHER = FISHER ## Returnerer Fisher-transformasjonen -FISHERINV = FISHERINV ## Returnerer den inverse av Fisher-transformasjonen -FORECAST = PROGNOSE ## Returnerer en verdi langs en lineær trend -FREQUENCY = FREKVENS ## Returnerer en frekvensdistribusjon som en loddrett matrise -FTEST = FTEST ## Returnerer resultatet av en F-test -GAMMADIST = GAMMAFORDELING ## Returnerer gammafordelingen -GAMMAINV = GAMMAINV ## Returnerer den inverse av den gammakumulative fordelingen -GAMMALN = GAMMALN ## Returnerer den naturlige logaritmen til gammafunksjonen G(x) -GEOMEAN = GJENNOMSNITT.GEOMETRISK ## Returnerer den geometriske middelverdien -GROWTH = VEKST ## Returnerer verdier langs en eksponentiell trend -HARMEAN = GJENNOMSNITT.HARMONISK ## Returnerer den harmoniske middelverdien -HYPGEOMDIST = HYPGEOM.FORDELING ## Returnerer den hypergeometriske fordelingen -INTERCEPT = SKJÆRINGSPUNKT ## Returnerer skjæringspunktet til den lineære regresjonslinjen -KURT = KURT ## Returnerer kurtosen til et datasett -LARGE = N.STØRST ## Returnerer den n-te største verdien i et datasett -LINEST = RETTLINJE ## Returnerer parameterne til en lineær trend -LOGEST = KURVE ## Returnerer parameterne til en eksponentiell trend -LOGINV = LOGINV ## Returnerer den inverse lognormale fordelingen -LOGNORMDIST = LOGNORMFORD ## Returnerer den kumulative lognormale fordelingen -MAX = STØRST ## Returnerer maksimumsverdien i en argumentliste -MAXA = MAKSA ## Returnerer maksimumsverdien i en argumentliste, inkludert tall, tekst og logiske verdier -MEDIAN = MEDIAN ## Returnerer medianen til tallene som er gitt -MIN = MIN ## Returnerer minimumsverdien i en argumentliste -MINA = MINA ## Returnerer den minste verdien i en argumentliste, inkludert tall, tekst og logiske verdier -MODE = MODUS ## Returnerer den vanligste verdien i et datasett -NEGBINOMDIST = NEGBINOM.FORDELING ## Returnerer den negative binomiske fordelingen -NORMDIST = NORMALFORDELING ## Returnerer den kumulative normalfordelingen -NORMINV = NORMINV ## Returnerer den inverse kumulative normalfordelingen -NORMSDIST = NORMSFORDELING ## Returnerer standard kumulativ normalfordeling -NORMSINV = NORMSINV ## Returnerer den inverse av den den kumulative standard normalfordelingen -PEARSON = PEARSON ## Returnerer produktmomentkorrelasjonskoeffisienten, Pearson -PERCENTILE = PERSENTIL ## Returnerer den n-te persentil av verdiene i et område -PERCENTRANK = PROSENTDEL ## Returnerer prosentrangeringen av en verdi i et datasett -PERMUT = PERMUTER ## Returnerer antall permutasjoner for et gitt antall objekter -POISSON = POISSON ## Returnerer Poissons sannsynlighetsfordeling -PROB = SANNSYNLIG ## Returnerer sannsynligheten for at verdier i et område ligger mellom to grenser -QUARTILE = KVARTIL ## Returnerer kvartilen til et datasett -RANK = RANG ## Returnerer rangeringen av et tall, eller plassen tallet har i en rekke -RSQ = RKVADRAT ## Returnerer kvadratet av produktmomentkorrelasjonskoeffisienten (Pearsons r) -SKEW = SKJEVFORDELING ## Returnerer skjevheten i en fordeling -SLOPE = STIGNINGSTALL ## Returnerer stigningtallet for den lineære regresjonslinjen -SMALL = N.MINST ## Returnerer den n-te minste verdien i et datasett -STANDARDIZE = NORMALISER ## Returnerer en normalisert verdi -STDEV = STDAV ## Estimere standardavvik på grunnlag av et utvalg -STDEVA = STDAVVIKA ## Estimerer standardavvik basert på et utvalg, inkludert tall, tekst og logiske verdier -STDEVP = STDAVP ## Beregner standardavvik basert på hele populasjonen -STDEVPA = STDAVVIKPA ## Beregner standardavvik basert på hele populasjonen, inkludert tall, tekst og logiske verdier -STEYX = STANDARDFEIL ## Returnerer standardfeilen for den predikerte y-verdien for hver x i regresjonen -TDIST = TFORDELING ## Returnerer en Student t-fordeling -TINV = TINV ## Returnerer den inverse Student t-fordelingen -TREND = TREND ## Returnerer verdier langs en lineær trend -TRIMMEAN = TRIMMET.GJENNOMSNITT ## Returnerer den interne middelverdien til et datasett -TTEST = TTEST ## Returnerer sannsynligheten assosiert med en Student t-test -VAR = VARIANS ## Estimerer varians basert på et utvalg -VARA = VARIANSA ## Estimerer varians basert på et utvalg, inkludert tall, tekst og logiske verdier -VARP = VARIANSP ## Beregner varians basert på hele populasjonen -VARPA = VARIANSPA ## Beregner varians basert på hele populasjonen, inkludert tall, tekst og logiske verdier -WEIBULL = WEIBULL.FORDELING ## Returnerer Weibull-fordelingen -ZTEST = ZTEST ## Returnerer den ensidige sannsynlighetsverdien for en z-test - - -## -## Text functions Tekstfunksjoner -## -ASC = STIGENDE ## Endrer fullbreddes (dobbeltbyte) engelske bokstaver eller katakana i en tegnstreng, til halvbreddes (enkeltbyte) tegn -BAHTTEXT = BAHTTEKST ## Konverterer et tall til tekst, og bruker valutaformatet ß (baht) -CHAR = TEGNKODE ## Returnerer tegnet som svarer til kodenummeret -CLEAN = RENSK ## Fjerner alle tegn som ikke kan skrives ut, fra teksten -CODE = KODE ## Returnerer en numerisk kode for det første tegnet i en tekststreng -CONCATENATE = KJEDE.SAMMEN ## Slår sammen flere tekstelementer til ett tekstelement -DOLLAR = VALUTA ## Konverterer et tall til tekst, og bruker valutaformatet $ (dollar) -EXACT = EKSAKT ## Kontrollerer om to tekstverdier er like -FIND = FINN ## Finner en tekstverdi inne i en annen (skiller mellom store og små bokstaver) -FINDB = FINNB ## Finner en tekstverdi inne i en annen (skiller mellom store og små bokstaver) -FIXED = FASTSATT ## Formaterer et tall som tekst med et bestemt antall desimaler -JIS = JIS ## Endrer halvbreddes (enkeltbyte) engelske bokstaver eller katakana i en tegnstreng, til fullbreddes (dobbeltbyte) tegn -LEFT = VENSTRE ## Returnerer tegnene lengst til venstre i en tekstverdi -LEFTB = VENSTREB ## Returnerer tegnene lengst til venstre i en tekstverdi -LEN = LENGDE ## Returnerer antall tegn i en tekststreng -LENB = LENGDEB ## Returnerer antall tegn i en tekststreng -LOWER = SMÅ ## Konverterer tekst til små bokstaver -MID = DELTEKST ## Returnerer et angitt antall tegn fra en tekststreng, og begynner fra posisjonen du angir -MIDB = DELTEKSTB ## Returnerer et angitt antall tegn fra en tekststreng, og begynner fra posisjonen du angir -PHONETIC = FURIGANA ## Trekker ut fonetiske tegn (furigana) fra en tekststreng -PROPER = STOR.FORBOKSTAV ## Gir den første bokstaven i hvert ord i en tekstverdi stor forbokstav -REPLACE = ERSTATT ## Erstatter tegn i en tekst -REPLACEB = ERSTATTB ## Erstatter tegn i en tekst -REPT = GJENTA ## Gjentar tekst et gitt antall ganger -RIGHT = HØYRE ## Returnerer tegnene lengst til høyre i en tekstverdi -RIGHTB = HØYREB ## Returnerer tegnene lengst til høyre i en tekstverdi -SEARCH = SØK ## Finner en tekstverdi inne i en annen (skiller ikke mellom store og små bokstaver) -SEARCHB = SØKB ## Finner en tekstverdi inne i en annen (skiller ikke mellom store og små bokstaver) -SUBSTITUTE = BYTT.UT ## Bytter ut gammel tekst med ny tekst i en tekststreng -T = T ## Konverterer argumentene til tekst -TEXT = TEKST ## Formaterer et tall og konverterer det til tekst -TRIM = TRIMME ## Fjerner mellomrom fra tekst -UPPER = STORE ## Konverterer tekst til store bokstaver -VALUE = VERDI ## Konverterer et tekstargument til et tall diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config deleted file mode 100644 index 4dd75be..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = zł - - -## -## Excel Error Codes (For future use) -## -NULL = #ZERO! -DIV0 = #DZIEL/0! -VALUE = #ARG! -REF = #ADR! -NAME = #NAZWA? -NUM = #LICZBA! -NA = #N/D! diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions deleted file mode 100644 index 1881a71..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Funkcje dodatków i automatyzacji -## -GETPIVOTDATA = WEŹDANETABELI ## Zwraca dane przechowywane w raporcie tabeli przestawnej. - - -## -## Cube functions Funkcje modułów -## -CUBEKPIMEMBER = ELEMENT.KPI.MODUŁU ## Zwraca nazwę, właściwość i miarę kluczowego wskaźnika wydajności (KPI) oraz wyświetla nazwę i właściwość w komórce. Wskaźnik KPI jest miarą ilościową, taką jak miesięczny zysk brutto lub kwartalna fluktuacja pracowników, używaną do monitorowania wydajności organizacji. -CUBEMEMBER = ELEMENT.MODUŁU ## Zwraca element lub krotkę z hierarchii modułu. Służy do sprawdzania, czy element lub krotka istnieje w module. -CUBEMEMBERPROPERTY = WŁAŚCIWOŚĆ.ELEMENTU.MODUŁU ## Zwraca wartość właściwości elementu w module. Służy do sprawdzania, czy nazwa elementu istnieje w module, i zwracania określonej właściwości dla tego elementu. -CUBERANKEDMEMBER = USZEREGOWANY.ELEMENT.MODUŁU ## Zwraca n-ty (albo uszeregowany) element zestawu. Służy do zwracania elementu lub elementów zestawu, na przykład najlepszego sprzedawcy lub 10 najlepszych studentów. -CUBESET = ZESTAW.MODUŁÓW ## Definiuje obliczony zestaw elementów lub krotek, wysyłając wyrażenie zestawu do serwera modułu, który tworzy zestaw i zwraca go do programu Microsoft Office Excel. -CUBESETCOUNT = LICZNIK.MODUŁÓW.ZESTAWU ## Zwraca liczbę elementów zestawu. -CUBEVALUE = WARTOŚĆ.MODUŁU ## Zwraca zagregowaną wartość z modułu. - - -## -## Database functions Funkcje baz danych -## -DAVERAGE = BD.ŚREDNIA ## Zwraca wartość średniej wybranych wpisów bazy danych. -DCOUNT = BD.ILE.REKORDÓW ## Zlicza komórki zawierające liczby w bazie danych. -DCOUNTA = BD.ILE.REKORDÓW.A ## Zlicza niepuste komórki w bazie danych. -DGET = BD.POLE ## Wyodrębnia z bazy danych jeden rekord spełniający określone kryteria. -DMAX = BD.MAX ## Zwraca wartość maksymalną z wybranych wpisów bazy danych. -DMIN = BD.MIN ## Zwraca wartość minimalną z wybranych wpisów bazy danych. -DPRODUCT = BD.ILOCZYN ## Mnoży wartości w konkretnym, spełniającym kryteria polu rekordów bazy danych. -DSTDEV = BD.ODCH.STANDARD ## Szacuje odchylenie standardowe na podstawie próbki z wybranych wpisów bazy danych. -DSTDEVP = BD.ODCH.STANDARD.POPUL ## Oblicza odchylenie standardowe na podstawie całej populacji wybranych wpisów bazy danych. -DSUM = BD.SUMA ## Dodaje liczby w kolumnie pól rekordów bazy danych, które spełniają kryteria. -DVAR = BD.WARIANCJA ## Szacuje wariancję na podstawie próbki z wybranych wpisów bazy danych. -DVARP = BD.WARIANCJA.POPUL ## Oblicza wariancję na podstawie całej populacji wybranych wpisów bazy danych. - - -## -## Date and time functions Funkcje dat, godzin i czasu -## -DATE = DATA ## Zwraca liczbę seryjną dla wybranej daty. -DATEVALUE = DATA.WARTOŚĆ ## Konwertuje datę w formie tekstu na liczbę seryjną. -DAY = DZIEŃ ## Konwertuje liczbę seryjną na dzień miesiąca. -DAYS360 = DNI.360 ## Oblicza liczbę dni między dwiema datami na podstawie roku 360-dniowego. -EDATE = UPŁDNI ## Zwraca liczbę seryjną daty jako wskazaną liczbę miesięcy przed określoną datą początkową lub po niej. -EOMONTH = EOMONTH ## Zwraca liczbę seryjną ostatniego dnia miesiąca przed określoną liczbą miesięcy lub po niej. -HOUR = GODZINA ## Konwertuje liczbę seryjną na godzinę. -MINUTE = MINUTA ## Konwertuje liczbę seryjną na minutę. -MONTH = MIESIĄC ## Konwertuje liczbę seryjną na miesiąc. -NETWORKDAYS = NETWORKDAYS ## Zwraca liczbę pełnych dni roboczych między dwiema datami. -NOW = TERAZ ## Zwraca liczbę seryjną bieżącej daty i godziny. -SECOND = SEKUNDA ## Konwertuje liczbę seryjną na sekundę. -TIME = CZAS ## Zwraca liczbę seryjną określonego czasu. -TIMEVALUE = CZAS.WARTOŚĆ ## Konwertuje czas w formie tekstu na liczbę seryjną. -TODAY = DZIŚ ## Zwraca liczbę seryjną dla daty bieżącej. -WEEKDAY = DZIEŃ.TYG ## Konwertuje liczbę seryjną na dzień tygodnia. -WEEKNUM = WEEKNUM ## Konwertuje liczbę seryjną na liczbę reprezentującą numer tygodnia w roku. -WORKDAY = WORKDAY ## Zwraca liczbę seryjną dla daty przed określoną liczbą dni roboczych lub po niej. -YEAR = ROK ## Konwertuje liczbę seryjną na rok. -YEARFRAC = YEARFRAC ## Zwraca część roku reprezentowaną przez pełną liczbę dni między datą początkową a datą końcową. - - -## -## Engineering functions Funkcje inżynierskie -## -BESSELI = BESSELI ## Zwraca wartość zmodyfikowanej funkcji Bessela In(x). -BESSELJ = BESSELJ ## Zwraca wartość funkcji Bessela Jn(x). -BESSELK = BESSELK ## Zwraca wartość zmodyfikowanej funkcji Bessela Kn(x). -BESSELY = BESSELY ## Zwraca wartość funkcji Bessela Yn(x). -BIN2DEC = BIN2DEC ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci dziesiętnej. -BIN2HEX = BIN2HEX ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci szesnastkowej. -BIN2OCT = BIN2OCT ## Konwertuje liczbę w postaci dwójkowej na liczbę w postaci ósemkowej. -COMPLEX = COMPLEX ## Konwertuje część rzeczywistą i urojoną na liczbę zespoloną. -CONVERT = CONVERT ## Konwertuje liczbę z jednego systemu miar na inny. -DEC2BIN = DEC2BIN ## Konwertuje liczbę w postaci dziesiętnej na postać dwójkową. -DEC2HEX = DEC2HEX ## Konwertuje liczbę w postaci dziesiętnej na liczbę w postaci szesnastkowej. -DEC2OCT = DEC2OCT ## Konwertuje liczbę w postaci dziesiętnej na liczbę w postaci ósemkowej. -DELTA = DELTA ## Sprawdza, czy dwie wartości są równe. -ERF = ERF ## Zwraca wartość funkcji błędu. -ERFC = ERFC ## Zwraca wartość komplementarnej funkcji błędu. -GESTEP = GESTEP ## Sprawdza, czy liczba jest większa niż wartość progowa. -HEX2BIN = HEX2BIN ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci dwójkowej. -HEX2DEC = HEX2DEC ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci dziesiętnej. -HEX2OCT = HEX2OCT ## Konwertuje liczbę w postaci szesnastkowej na liczbę w postaci ósemkowej. -IMABS = IMABS ## Zwraca wartość bezwzględną (moduł) liczby zespolonej. -IMAGINARY = IMAGINARY ## Zwraca wartość części urojonej liczby zespolonej. -IMARGUMENT = IMARGUMENT ## Zwraca wartość argumentu liczby zespolonej, przy czym kąt wyrażony jest w radianach. -IMCONJUGATE = IMCONJUGATE ## Zwraca wartość liczby sprzężonej danej liczby zespolonej. -IMCOS = IMCOS ## Zwraca wartość cosinusa liczby zespolonej. -IMDIV = IMDIV ## Zwraca wartość ilorazu dwóch liczb zespolonych. -IMEXP = IMEXP ## Zwraca postać wykładniczą liczby zespolonej. -IMLN = IMLN ## Zwraca wartość logarytmu naturalnego liczby zespolonej. -IMLOG10 = IMLOG10 ## Zwraca wartość logarytmu dziesiętnego liczby zespolonej. -IMLOG2 = IMLOG2 ## Zwraca wartość logarytmu liczby zespolonej przy podstawie 2. -IMPOWER = IMPOWER ## Zwraca wartość liczby zespolonej podniesionej do potęgi całkowitej. -IMPRODUCT = IMPRODUCT ## Zwraca wartość iloczynu liczb zespolonych. -IMREAL = IMREAL ## Zwraca wartość części rzeczywistej liczby zespolonej. -IMSIN = IMSIN ## Zwraca wartość sinusa liczby zespolonej. -IMSQRT = IMSQRT ## Zwraca wartość pierwiastka kwadratowego z liczby zespolonej. -IMSUB = IMSUB ## Zwraca wartość różnicy dwóch liczb zespolonych. -IMSUM = IMSUM ## Zwraca wartość sumy liczb zespolonych. -OCT2BIN = OCT2BIN ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci dwójkowej. -OCT2DEC = OCT2DEC ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci dziesiętnej. -OCT2HEX = OCT2HEX ## Konwertuje liczbę w postaci ósemkowej na liczbę w postaci szesnastkowej. - - -## -## Financial functions Funkcje finansowe -## -ACCRINT = ACCRINT ## Zwraca narosłe odsetki dla papieru wartościowego z oprocentowaniem okresowym. -ACCRINTM = ACCRINTM ## Zwraca narosłe odsetki dla papieru wartościowego z oprocentowaniem w terminie wykupu. -AMORDEGRC = AMORDEGRC ## Zwraca amortyzację dla każdego okresu rozliczeniowego z wykorzystaniem współczynnika amortyzacji. -AMORLINC = AMORLINC ## Zwraca amortyzację dla każdego okresu rozliczeniowego. -COUPDAYBS = COUPDAYBS ## Zwraca liczbę dni od początku okresu dywidendy do dnia rozliczeniowego. -COUPDAYS = COUPDAYS ## Zwraca liczbę dni w okresie dywidendy, z uwzględnieniem dnia rozliczeniowego. -COUPDAYSNC = COUPDAYSNC ## Zwraca liczbę dni od dnia rozliczeniowego do daty następnego dnia dywidendy. -COUPNCD = COUPNCD ## Zwraca dzień następnej dywidendy po dniu rozliczeniowym. -COUPNUM = COUPNUM ## Zwraca liczbę dywidend płatnych między dniem rozliczeniowym a dniem wykupu. -COUPPCD = COUPPCD ## Zwraca dzień poprzedniej dywidendy przed dniem rozliczeniowym. -CUMIPMT = CUMIPMT ## Zwraca wartość procentu składanego płatnego między dwoma okresami. -CUMPRINC = CUMPRINC ## Zwraca wartość kapitału skumulowanego spłaty pożyczki między dwoma okresami. -DB = DB ## Zwraca amortyzację środka trwałego w danym okresie metodą degresywną z zastosowaniem stałej bazowej. -DDB = DDB ## Zwraca amortyzację środka trwałego za podany okres metodą degresywną z zastosowaniem podwójnej bazowej lub metodą określoną przez użytkownika. -DISC = DISC ## Zwraca wartość stopy dyskontowej papieru wartościowego. -DOLLARDE = DOLLARDE ## Konwertuje cenę w postaci ułamkowej na cenę wyrażoną w postaci dziesiętnej. -DOLLARFR = DOLLARFR ## Konwertuje cenę wyrażoną w postaci dziesiętnej na cenę wyrażoną w postaci ułamkowej. -DURATION = DURATION ## Zwraca wartość rocznego przychodu z papieru wartościowego o okresowych wypłatach oprocentowania. -EFFECT = EFFECT ## Zwraca wartość efektywnej rocznej stopy procentowej. -FV = FV ## Zwraca przyszłą wartość lokaty. -FVSCHEDULE = FVSCHEDULE ## Zwraca przyszłą wartość kapitału początkowego wraz z szeregiem procentów składanych. -INTRATE = INTRATE ## Zwraca wartość stopy procentowej papieru wartościowego całkowicie ulokowanego. -IPMT = IPMT ## Zwraca wysokość spłaty oprocentowania lokaty za dany okres. -IRR = IRR ## Zwraca wartość wewnętrznej stopy zwrotu dla serii przepływów gotówkowych. -ISPMT = ISPMT ## Oblicza wysokość spłaty oprocentowania za dany okres lokaty. -MDURATION = MDURATION ## Zwraca wartość zmodyfikowanego okresu Macauleya dla papieru wartościowego o założonej wartości nominalnej 100 zł. -MIRR = MIRR ## Zwraca wartość wewnętrznej stopy zwrotu dla przypadku, gdy dodatnie i ujemne przepływy gotówkowe mają różne stopy. -NOMINAL = NOMINAL ## Zwraca wysokość nominalnej rocznej stopy procentowej. -NPER = NPER ## Zwraca liczbę okresów dla lokaty. -NPV = NPV ## Zwraca wartość bieżącą netto lokaty na podstawie szeregu okresowych przepływów gotówkowych i stopy dyskontowej. -ODDFPRICE = ODDFPRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z nietypowym pierwszym okresem. -ODDFYIELD = ODDFYIELD ## Zwraca rentowność papieru wartościowego z nietypowym pierwszym okresem. -ODDLPRICE = ODDLPRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z nietypowym ostatnim okresem. -ODDLYIELD = ODDLYIELD ## Zwraca rentowność papieru wartościowego z nietypowym ostatnim okresem. -PMT = PMT ## Zwraca wartość okresowej płatności raty rocznej. -PPMT = PPMT ## Zwraca wysokość spłaty kapitału w przypadku lokaty dla danego okresu. -PRICE = PRICE ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z oprocentowaniem okresowym. -PRICEDISC = PRICEDISC ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego zdyskontowanego. -PRICEMAT = PRICEMAT ## Zwraca cenę za 100 zł wartości nominalnej papieru wartościowego z oprocentowaniem w terminie wykupu. -PV = PV ## Zwraca wartość bieżącą lokaty. -RATE = RATE ## Zwraca wysokość stopy procentowej w okresie raty rocznej. -RECEIVED = RECEIVED ## Zwraca wartość kapitału otrzymanego przy wykupie papieru wartościowego całkowicie ulokowanego. -SLN = SLN ## Zwraca amortyzację środka trwałego za jeden okres metodą liniową. -SYD = SYD ## Zwraca amortyzację środka trwałego za dany okres metodą sumy cyfr lat amortyzacji. -TBILLEQ = TBILLEQ ## Zwraca rentowność ekwiwalentu obligacji dla bonu skarbowego. -TBILLPRICE = TBILLPRICE ## Zwraca cenę za 100 zł wartości nominalnej bonu skarbowego. -TBILLYIELD = TBILLYIELD ## Zwraca rentowność bonu skarbowego. -VDB = VDB ## Oblicza amortyzację środka trwałego w danym okresie lub jego części metodą degresywną. -XIRR = XIRR ## Zwraca wartość wewnętrznej stopy zwrotu dla serii rozłożonych w czasie przepływów gotówkowych, niekoniecznie okresowych. -XNPV = XNPV ## Zwraca wartość bieżącą netto dla serii rozłożonych w czasie przepływów gotówkowych, niekoniecznie okresowych. -YIELD = YIELD ## Zwraca rentowność papieru wartościowego z oprocentowaniem okresowym. -YIELDDISC = YIELDDISC ## Zwraca roczną rentowność zdyskontowanego papieru wartościowego, na przykład bonu skarbowego. -YIELDMAT = YIELDMAT ## Zwraca roczną rentowność papieru wartościowego oprocentowanego przy wykupie. - - -## -## Information functions Funkcje informacyjne -## -CELL = KOMÓRKA ## Zwraca informacje o formacie, położeniu lub zawartości komórki. -ERROR.TYPE = NR.BŁĘDU ## Zwraca liczbę odpowiadającą typowi błędu. -INFO = INFO ## Zwraca informację o aktualnym środowisku pracy. -ISBLANK = CZY.PUSTA ## Zwraca wartość PRAWDA, jeśli wartość jest pusta. -ISERR = CZY.BŁ ## Zwraca wartość PRAWDA, jeśli wartość jest dowolną wartością błędu, z wyjątkiem #N/D!. -ISERROR = CZY.BŁĄD ## Zwraca wartość PRAWDA, jeśli wartość jest dowolną wartością błędu. -ISEVEN = ISEVEN ## Zwraca wartość PRAWDA, jeśli liczba jest parzysta. -ISLOGICAL = CZY.LOGICZNA ## Zwraca wartość PRAWDA, jeśli wartość jest wartością logiczną. -ISNA = CZY.BRAK ## Zwraca wartość PRAWDA, jeśli wartość jest wartością błędu #N/D!. -ISNONTEXT = CZY.NIE.TEKST ## Zwraca wartość PRAWDA, jeśli wartość nie jest tekstem. -ISNUMBER = CZY.LICZBA ## Zwraca wartość PRAWDA, jeśli wartość jest liczbą. -ISODD = ISODD ## Zwraca wartość PRAWDA, jeśli liczba jest nieparzysta. -ISREF = CZY.ADR ## Zwraca wartość PRAWDA, jeśli wartość jest odwołaniem. -ISTEXT = CZY.TEKST ## Zwraca wartość PRAWDA, jeśli wartość jest tekstem. -N = L ## Zwraca wartość przekonwertowaną na postać liczbową. -NA = BRAK ## Zwraca wartość błędu #N/D!. -TYPE = TYP ## Zwraca liczbę wskazującą typ danych wartości. - - -## -## Logical functions Funkcje logiczne -## -AND = ORAZ ## Zwraca wartość PRAWDA, jeśli wszystkie argumenty mają wartość PRAWDA. -FALSE = FAŁSZ ## Zwraca wartość logiczną FAŁSZ. -IF = JEŻELI ## Określa warunek logiczny do sprawdzenia. -IFERROR = JEŻELI.BŁĄD ## Zwraca określoną wartość, jeśli wynikiem obliczenia formuły jest błąd; w przeciwnym przypadku zwraca wynik formuły. -NOT = NIE ## Odwraca wartość logiczną argumentu. -OR = LUB ## Zwraca wartość PRAWDA, jeśli co najmniej jeden z argumentów ma wartość PRAWDA. -TRUE = PRAWDA ## Zwraca wartość logiczną PRAWDA. - - -## -## Lookup and reference functions Funkcje wyszukiwania i odwołań -## -ADDRESS = ADRES ## Zwraca odwołanie do jednej komórki w arkuszu jako wartość tekstową. -AREAS = OBSZARY ## Zwraca liczbę obszarów występujących w odwołaniu. -CHOOSE = WYBIERZ ## Wybiera wartość z listy wartości. -COLUMN = NR.KOLUMNY ## Zwraca numer kolumny z odwołania. -COLUMNS = LICZBA.KOLUMN ## Zwraca liczbę kolumn dla danego odwołania. -HLOOKUP = WYSZUKAJ.POZIOMO ## Przegląda górny wiersz tablicy i zwraca wartość wskazanej komórki. -HYPERLINK = HIPERŁĄCZE ## Tworzy skrót lub skok, który pozwala otwierać dokument przechowywany na serwerze sieciowym, w sieci intranet lub w Internecie. -INDEX = INDEKS ## Używa indeksu do wybierania wartości z odwołania lub tablicy. -INDIRECT = ADR.POŚR ## Zwraca odwołanie określone przez wartość tekstową. -LOOKUP = WYSZUKAJ ## Wyszukuje wartości w wektorze lub tablicy. -MATCH = PODAJ.POZYCJĘ ## Wyszukuje wartości w odwołaniu lub w tablicy. -OFFSET = PRZESUNIĘCIE ## Zwraca adres przesunięty od danego odwołania. -ROW = WIERSZ ## Zwraca numer wiersza odwołania. -ROWS = ILE.WIERSZY ## Zwraca liczbę wierszy dla danego odwołania. -RTD = RTD ## Pobiera dane w czasie rzeczywistym z programu obsługującego automatyzację COM (Automatyzacja: Sposób pracy z obiektami aplikacji pochodzącymi z innej aplikacji lub narzędzia projektowania. Nazywana wcześniej Automatyzacją OLE, Automatyzacja jest standardem przemysłowym i funkcją obiektowego modelu składników (COM, Component Object Model).). -TRANSPOSE = TRANSPONUJ ## Zwraca transponowaną tablicę. -VLOOKUP = WYSZUKAJ.PIONOWO ## Przeszukuje pierwszą kolumnę tablicy i przechodzi wzdłuż wiersza, aby zwrócić wartość komórki. - - -## -## Math and trigonometry functions Funkcje matematyczne i trygonometryczne -## -ABS = MODUŁ.LICZBY ## Zwraca wartość absolutną liczby. -ACOS = ACOS ## Zwraca arcus cosinus liczby. -ACOSH = ACOSH ## Zwraca arcus cosinus hiperboliczny liczby. -ASIN = ASIN ## Zwraca arcus sinus liczby. -ASINH = ASINH ## Zwraca arcus sinus hiperboliczny liczby. -ATAN = ATAN ## Zwraca arcus tangens liczby. -ATAN2 = ATAN2 ## Zwraca arcus tangens liczby na podstawie współrzędnych x i y. -ATANH = ATANH ## Zwraca arcus tangens hiperboliczny liczby. -CEILING = ZAOKR.W.GÓRĘ ## Zaokrągla liczbę do najbliższej liczby całkowitej lub do najbliższej wielokrotności dokładności. -COMBIN = KOMBINACJE ## Zwraca liczbę kombinacji dla danej liczby obiektów. -COS = COS ## Zwraca cosinus liczby. -COSH = COSH ## Zwraca cosinus hiperboliczny liczby. -DEGREES = STOPNIE ## Konwertuje radiany na stopnie. -EVEN = ZAOKR.DO.PARZ ## Zaokrągla liczbę w górę do najbliższej liczby parzystej. -EXP = EXP ## Zwraca wartość liczby e podniesionej do potęgi określonej przez podaną liczbę. -FACT = SILNIA ## Zwraca silnię liczby. -FACTDOUBLE = FACTDOUBLE ## Zwraca podwójną silnię liczby. -FLOOR = ZAOKR.W.DÓŁ ## Zaokrągla liczbę w dół, w kierunku zera. -GCD = GCD ## Zwraca największy wspólny dzielnik. -INT = ZAOKR.DO.CAŁK ## Zaokrągla liczbę w dół do najbliższej liczby całkowitej. -LCM = LCM ## Zwraca najmniejszą wspólną wielokrotność. -LN = LN ## Zwraca logarytm naturalny podanej liczby. -LOG = LOG ## Zwraca logarytm danej liczby przy zadanej podstawie. -LOG10 = LOG10 ## Zwraca logarytm dziesiętny liczby. -MDETERM = WYZNACZNIK.MACIERZY ## Zwraca wyznacznik macierzy tablicy. -MINVERSE = MACIERZ.ODW ## Zwraca odwrotność macierzy tablicy. -MMULT = MACIERZ.ILOCZYN ## Zwraca iloczyn macierzy dwóch tablic. -MOD = MOD ## Zwraca resztę z dzielenia. -MROUND = MROUND ## Zwraca liczbę zaokrągloną do żądanej wielokrotności. -MULTINOMIAL = MULTINOMIAL ## Zwraca wielomian dla zbioru liczb. -ODD = ZAOKR.DO.NPARZ ## Zaokrągla liczbę w górę do najbliższej liczby nieparzystej. -PI = PI ## Zwraca wartość liczby Pi. -POWER = POTĘGA ## Zwraca liczbę podniesioną do potęgi. -PRODUCT = ILOCZYN ## Mnoży argumenty. -QUOTIENT = QUOTIENT ## Zwraca iloraz (całkowity). -RADIANS = RADIANY ## Konwertuje stopnie na radiany. -RAND = LOS ## Zwraca liczbę pseudolosową z zakresu od 0 do 1. -RANDBETWEEN = RANDBETWEEN ## Zwraca liczbę pseudolosową z zakresu określonego przez podane argumenty. -ROMAN = RZYMSKIE ## Konwertuje liczbę arabską na rzymską jako tekst. -ROUND = ZAOKR ## Zaokrągla liczbę do określonej liczby cyfr. -ROUNDDOWN = ZAOKR.DÓŁ ## Zaokrągla liczbę w dół, w kierunku zera. -ROUNDUP = ZAOKR.GÓRA ## Zaokrągla liczbę w górę, w kierunku od zera. -SERIESSUM = SERIESSUM ## Zwraca sumę szeregu potęgowego na podstawie wzoru. -SIGN = ZNAK.LICZBY ## Zwraca znak liczby. -SIN = SIN ## Zwraca sinus danego kąta. -SINH = SINH ## Zwraca sinus hiperboliczny liczby. -SQRT = PIERWIASTEK ## Zwraca dodatni pierwiastek kwadratowy. -SQRTPI = SQRTPI ## Zwraca pierwiastek kwadratowy iloczynu (liczba * Pi). -SUBTOTAL = SUMY.POŚREDNIE ## Zwraca sumę częściową listy lub bazy danych. -SUM = SUMA ## Dodaje argumenty. -SUMIF = SUMA.JEŻELI ## Dodaje komórki określone przez podane kryterium. -SUMIFS = SUMA.WARUNKÓW ## Dodaje komórki w zakresie, które spełniają wiele kryteriów. -SUMPRODUCT = SUMA.ILOCZYNÓW ## Zwraca sumę iloczynów odpowiednich elementów tablicy. -SUMSQ = SUMA.KWADRATÓW ## Zwraca sumę kwadratów argumentów. -SUMX2MY2 = SUMA.X2.M.Y2 ## Zwraca sumę różnic kwadratów odpowiednich wartości w dwóch tablicach. -SUMX2PY2 = SUMA.X2.P.Y2 ## Zwraca sumę sum kwadratów odpowiednich wartości w dwóch tablicach. -SUMXMY2 = SUMA.XMY.2 ## Zwraca sumę kwadratów różnic odpowiednich wartości w dwóch tablicach. -TAN = TAN ## Zwraca tangens liczby. -TANH = TANH ## Zwraca tangens hiperboliczny liczby. -TRUNC = LICZBA.CAŁK ## Przycina liczbę do wartości całkowitej. - - -## -## Statistical functions Funkcje statystyczne -## -AVEDEV = ODCH.ŚREDNIE ## Zwraca średnią wartość odchyleń absolutnych punktów danych od ich wartości średniej. -AVERAGE = ŚREDNIA ## Zwraca wartość średnią argumentów. -AVERAGEA = ŚREDNIA.A ## Zwraca wartość średnią argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. -AVERAGEIF = ŚREDNIA.JEŻELI ## Zwraca średnią (średnią arytmetyczną) wszystkich komórek w zakresie, które spełniają podane kryteria. -AVERAGEIFS = ŚREDNIA.WARUNKÓW ## Zwraca średnią (średnią arytmetyczną) wszystkich komórek, które spełniają jedno lub więcej kryteriów. -BETADIST = ROZKŁAD.BETA ## Zwraca skumulowaną funkcję gęstości prawdopodobieństwa beta. -BETAINV = ROZKŁAD.BETA.ODW ## Zwraca odwrotność skumulowanej funkcji gęstości prawdopodobieństwa beta. -BINOMDIST = ROZKŁAD.DWUM ## Zwraca pojedynczy składnik dwumianowego rozkładu prawdopodobieństwa. -CHIDIST = ROZKŁAD.CHI ## Zwraca wartość jednostronnego prawdopodobieństwa rozkładu chi-kwadrat. -CHIINV = ROZKŁAD.CHI.ODW ## Zwraca odwrotność wartości jednostronnego prawdopodobieństwa rozkładu chi-kwadrat. -CHITEST = TEST.CHI ## Zwraca test niezależności. -CONFIDENCE = UFNOŚĆ ## Zwraca interwał ufności dla średniej populacji. -CORREL = WSP.KORELACJI ## Zwraca współczynnik korelacji dwóch zbiorów danych. -COUNT = ILE.LICZB ## Zlicza liczby znajdujące się na liście argumentów. -COUNTA = ILE.NIEPUSTYCH ## Zlicza wartości znajdujące się na liście argumentów. -COUNTBLANK = LICZ.PUSTE ## Zwraca liczbę pustych komórek w pewnym zakresie. -COUNTIF = LICZ.JEŻELI ## Zlicza komórki wewnątrz zakresu, które spełniają podane kryteria. -COUNTIFS = LICZ.WARUNKI ## Zlicza komórki wewnątrz zakresu, które spełniają wiele kryteriów. -COVAR = KOWARIANCJA ## Zwraca kowariancję, czyli średnią wartość iloczynów odpowiednich odchyleń. -CRITBINOM = PRÓG.ROZKŁAD.DWUM ## Zwraca najmniejszą wartość, dla której skumulowany rozkład dwumianowy jest mniejszy niż wartość kryterium lub równy jej. -DEVSQ = ODCH.KWADRATOWE ## Zwraca sumę kwadratów odchyleń. -EXPONDIST = ROZKŁAD.EXP ## Zwraca rozkład wykładniczy. -FDIST = ROZKŁAD.F ## Zwraca rozkład prawdopodobieństwa F. -FINV = ROZKŁAD.F.ODW ## Zwraca odwrotność rozkładu prawdopodobieństwa F. -FISHER = ROZKŁAD.FISHER ## Zwraca transformację Fishera. -FISHERINV = ROZKŁAD.FISHER.ODW ## Zwraca odwrotność transformacji Fishera. -FORECAST = REGLINX ## Zwraca wartość trendu liniowego. -FREQUENCY = CZĘSTOŚĆ ## Zwraca rozkład częstotliwości jako tablicę pionową. -FTEST = TEST.F ## Zwraca wynik testu F. -GAMMADIST = ROZKŁAD.GAMMA ## Zwraca rozkład gamma. -GAMMAINV = ROZKŁAD.GAMMA.ODW ## Zwraca odwrotność skumulowanego rozkładu gamma. -GAMMALN = ROZKŁAD.LIN.GAMMA ## Zwraca logarytm naturalny funkcji gamma, Γ(x). -GEOMEAN = ŚREDNIA.GEOMETRYCZNA ## Zwraca średnią geometryczną. -GROWTH = REGEXPW ## Zwraca wartości trendu wykładniczego. -HARMEAN = ŚREDNIA.HARMONICZNA ## Zwraca średnią harmoniczną. -HYPGEOMDIST = ROZKŁAD.HIPERGEOM ## Zwraca rozkład hipergeometryczny. -INTERCEPT = ODCIĘTA ## Zwraca punkt przecięcia osi pionowej z linią regresji liniowej. -KURT = KURTOZA ## Zwraca kurtozę zbioru danych. -LARGE = MAX.K ## Zwraca k-tą największą wartość ze zbioru danych. -LINEST = REGLINP ## Zwraca parametry trendu liniowego. -LOGEST = REGEXPP ## Zwraca parametry trendu wykładniczego. -LOGINV = ROZKŁAD.LOG.ODW ## Zwraca odwrotność rozkładu logarytmu naturalnego. -LOGNORMDIST = ROZKŁAD.LOG ## Zwraca skumulowany rozkład logarytmu naturalnego. -MAX = MAX ## Zwraca maksymalną wartość listy argumentów. -MAXA = MAX.A ## Zwraca maksymalną wartość listy argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. -MEDIAN = MEDIANA ## Zwraca medianę podanych liczb. -MIN = MIN ## Zwraca minimalną wartość listy argumentów. -MINA = MIN.A ## Zwraca najmniejszą wartość listy argumentów, z uwzględnieniem liczb, tekstów i wartości logicznych. -MODE = WYST.NAJCZĘŚCIEJ ## Zwraca wartość najczęściej występującą w zbiorze danych. -NEGBINOMDIST = ROZKŁAD.DWUM.PRZEC ## Zwraca ujemny rozkład dwumianowy. -NORMDIST = ROZKŁAD.NORMALNY ## Zwraca rozkład normalny skumulowany. -NORMINV = ROZKŁAD.NORMALNY.ODW ## Zwraca odwrotność rozkładu normalnego skumulowanego. -NORMSDIST = ROZKŁAD.NORMALNY.S ## Zwraca standardowy rozkład normalny skumulowany. -NORMSINV = ROZKŁAD.NORMALNY.S.ODW ## Zwraca odwrotność standardowego rozkładu normalnego skumulowanego. -PEARSON = PEARSON ## Zwraca współczynnik korelacji momentu iloczynu Pearsona. -PERCENTILE = PERCENTYL ## Wyznacza k-ty percentyl wartości w zakresie. -PERCENTRANK = PROCENT.POZYCJA ## Zwraca procentową pozycję wartości w zbiorze danych. -PERMUT = PERMUTACJE ## Zwraca liczbę permutacji dla danej liczby obiektów. -POISSON = ROZKŁAD.POISSON ## Zwraca rozkład Poissona. -PROB = PRAWDPD ## Zwraca prawdopodobieństwo, że wartości w zakresie leżą pomiędzy dwiema granicami. -QUARTILE = KWARTYL ## Wyznacza kwartyl zbioru danych. -RANK = POZYCJA ## Zwraca pozycję liczby na liście liczb. -RSQ = R.KWADRAT ## Zwraca kwadrat współczynnika korelacji momentu iloczynu Pearsona. -SKEW = SKOŚNOŚĆ ## Zwraca skośność rozkładu. -SLOPE = NACHYLENIE ## Zwraca nachylenie linii regresji liniowej. -SMALL = MIN.K ## Zwraca k-tą najmniejszą wartość ze zbioru danych. -STANDARDIZE = NORMALIZUJ ## Zwraca wartość znormalizowaną. -STDEV = ODCH.STANDARDOWE ## Szacuje odchylenie standardowe na podstawie próbki. -STDEVA = ODCH.STANDARDOWE.A ## Szacuje odchylenie standardowe na podstawie próbki, z uwzględnieniem liczb, tekstów i wartości logicznych. -STDEVP = ODCH.STANDARD.POPUL ## Oblicza odchylenie standardowe na podstawie całej populacji. -STDEVPA = ODCH.STANDARD.POPUL.A ## Oblicza odchylenie standardowe na podstawie całej populacji, z uwzględnieniem liczb, teksów i wartości logicznych. -STEYX = REGBŁSTD ## Zwraca błąd standardowy przewidzianej wartości y dla każdej wartości x w regresji. -TDIST = ROZKŁAD.T ## Zwraca rozkład t-Studenta. -TINV = ROZKŁAD.T.ODW ## Zwraca odwrotność rozkładu t-Studenta. -TREND = REGLINW ## Zwraca wartości trendu liniowego. -TRIMMEAN = ŚREDNIA.WEWN ## Zwraca średnią wartość dla wnętrza zbioru danych. -TTEST = TEST.T ## Zwraca prawdopodobieństwo związane z testem t-Studenta. -VAR = WARIANCJA ## Szacuje wariancję na podstawie próbki. -VARA = WARIANCJA.A ## Szacuje wariancję na podstawie próbki, z uwzględnieniem liczb, tekstów i wartości logicznych. -VARP = WARIANCJA.POPUL ## Oblicza wariancję na podstawie całej populacji. -VARPA = WARIANCJA.POPUL.A ## Oblicza wariancję na podstawie całej populacji, z uwzględnieniem liczb, tekstów i wartości logicznych. -WEIBULL = ROZKŁAD.WEIBULL ## Zwraca rozkład Weibulla. -ZTEST = TEST.Z ## Zwraca wartość jednostronnego prawdopodobieństwa testu z. - - -## -## Text functions Funkcje tekstowe -## -ASC = ASC ## Zamienia litery angielskie lub katakana o pełnej szerokości (dwubajtowe) w ciągu znaków na znaki o szerokości połówkowej (jednobajtowe). -BAHTTEXT = BAHTTEXT ## Konwertuje liczbę na tekst, stosując format walutowy ß (baht). -CHAR = ZNAK ## Zwraca znak o podanym numerze kodu. -CLEAN = OCZYŚĆ ## Usuwa z tekstu wszystkie znaki, które nie mogą być drukowane. -CODE = KOD ## Zwraca kod numeryczny pierwszego znaku w ciągu tekstowym. -CONCATENATE = ZŁĄCZ.TEKSTY ## Łączy kilka oddzielnych tekstów w jeden tekst. -DOLLAR = KWOTA ## Konwertuje liczbę na tekst, stosując format walutowy $ (dolar). -EXACT = PORÓWNAJ ## Sprawdza identyczność dwóch wartości tekstowych. -FIND = ZNAJDŹ ## Znajduje jedną wartość tekstową wewnątrz innej (z uwzględnieniem wielkich i małych liter). -FINDB = ZNAJDŹB ## Znajduje jedną wartość tekstową wewnątrz innej (z uwzględnieniem wielkich i małych liter). -FIXED = ZAOKR.DO.TEKST ## Formatuje liczbę jako tekst przy stałej liczbie miejsc dziesiętnych. -JIS = JIS ## Zmienia litery angielskie lub katakana o szerokości połówkowej (jednobajtowe) w ciągu znaków na znaki o pełnej szerokości (dwubajtowe). -LEFT = LEWY ## Zwraca skrajne lewe znaki z wartości tekstowej. -LEFTB = LEWYB ## Zwraca skrajne lewe znaki z wartości tekstowej. -LEN = DŁ ## Zwraca liczbę znaków ciągu tekstowego. -LENB = DŁ.B ## Zwraca liczbę znaków ciągu tekstowego. -LOWER = LITERY.MAŁE ## Konwertuje wielkie litery tekstu na małe litery. -MID = FRAGMENT.TEKSTU ## Zwraca określoną liczbę znaków z ciągu tekstowego, zaczynając od zadanej pozycji. -MIDB = FRAGMENT.TEKSTU.B ## Zwraca określoną liczbę znaków z ciągu tekstowego, zaczynając od zadanej pozycji. -PHONETIC = PHONETIC ## Wybiera znaki fonetyczne (furigana) z ciągu tekstowego. -PROPER = Z.WIELKIEJ.LITERY ## Zastępuje pierwszą literę każdego wyrazu tekstu wielką literą. -REPLACE = ZASTĄP ## Zastępuje znaki w tekście. -REPLACEB = ZASTĄP.B ## Zastępuje znaki w tekście. -REPT = POWT ## Powiela tekst daną liczbę razy. -RIGHT = PRAWY ## Zwraca skrajne prawe znaki z wartości tekstowej. -RIGHTB = PRAWYB ## Zwraca skrajne prawe znaki z wartości tekstowej. -SEARCH = SZUKAJ.TEKST ## Wyszukuje jedną wartość tekstową wewnątrz innej (bez uwzględniania wielkości liter). -SEARCHB = SZUKAJ.TEKST.B ## Wyszukuje jedną wartość tekstową wewnątrz innej (bez uwzględniania wielkości liter). -SUBSTITUTE = PODSTAW ## Podstawia nowy tekst w miejsce poprzedniego tekstu w ciągu tekstowym. -T = T ## Konwertuje argumenty na tekst. -TEXT = TEKST ## Formatuje liczbę i konwertuje ją na tekst. -TRIM = USUŃ.ZBĘDNE.ODSTĘPY ## Usuwa spacje z tekstu. -UPPER = LITERY.WIELKIE ## Konwertuje znaki tekstu na wielkie litery. -VALUE = WARTOŚĆ ## Konwertuje argument tekstowy na liczbę. diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config deleted file mode 100644 index 45b6fbd..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = R$ - - -## -## Excel Error Codes (For future use) -## -NULL = #NULO! -DIV0 = #DIV/0! -VALUE = #VALOR! -REF = #REF! -NAME = #NOME? -NUM = #NÚM! -NA = #N/D diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/functions deleted file mode 100644 index a062a7f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/functions +++ /dev/null @@ -1,408 +0,0 @@ -## -## Add-in and Automation functions Funções Suplemento e Automação -## -GETPIVOTDATA = INFODADOSTABELADINÂMICA ## Retorna os dados armazenados em um relatório de tabela dinâmica - - -## -## Cube functions Funções de Cubo -## -CUBEKPIMEMBER = MEMBROKPICUBO ## Retorna o nome de um KPI (indicador de desempenho-chave), uma propriedade e uma medida e exibe o nome e a propriedade na célula. Um KPI é uma medida quantificável, como o lucro bruto mensal ou a rotatividade trimestral dos funcionários, usada para monitorar o desempenho de uma organização. -CUBEMEMBER = MEMBROCUBO ## Retorna um membro ou tupla em uma hierarquia de cubo. Use para validar se o membro ou tupla existe no cubo. -CUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO ## Retorna o valor da propriedade de um membro no cubo. Usada para validar a existência do nome do membro no cubo e para retornar a propriedade especificada para esse membro. -CUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO ## Retorna o enésimo membro, ou o membro ordenado, em um conjunto. Use para retornar um ou mais elementos em um conjunto, assim como o melhor vendedor ou os dez melhores alunos. -CUBESET = CONJUNTOCUBO ## Define um conjunto calculado de membros ou tuplas enviando uma expressão do conjunto para o cubo no servidor, que cria o conjunto e o retorna para o Microsoft Office Excel. -CUBESETCOUNT = CONTAGEMCONJUNTOCUBO ## Retorna o número de itens em um conjunto. -CUBEVALUE = VALORCUBO ## Retorna um valor agregado de um cubo. - - -## -## Database functions Funções de banco de dados -## -DAVERAGE = BDMÉDIA ## Retorna a média das entradas selecionadas de um banco de dados -DCOUNT = BDCONTAR ## Conta as células que contêm números em um banco de dados -DCOUNTA = BDCONTARA ## Conta células não vazias em um banco de dados -DGET = BDEXTRAIR ## Extrai de um banco de dados um único registro que corresponde a um critério específico -DMAX = BDMÁX ## Retorna o valor máximo de entradas selecionadas de um banco de dados -DMIN = BDMÍN ## Retorna o valor mínimo de entradas selecionadas de um banco de dados -DPRODUCT = BDMULTIPL ## Multiplica os valores em um campo específico de registros que correspondem ao critério em um banco de dados -DSTDEV = BDEST ## Estima o desvio padrão com base em uma amostra de entradas selecionadas de um banco de dados -DSTDEVP = BDDESVPA ## Calcula o desvio padrão com base na população inteira de entradas selecionadas de um banco de dados -DSUM = BDSOMA ## Adiciona os números à coluna de campos de registros do banco de dados que correspondem ao critério -DVAR = BDVAREST ## Estima a variância com base em uma amostra de entradas selecionadas de um banco de dados -DVARP = BDVARP ## Calcula a variância com base na população inteira de entradas selecionadas de um banco de dados - - -## -## Date and time functions Funções de data e hora -## -DATE = DATA ## Retorna o número de série de uma data específica -DATEVALUE = DATA.VALOR ## Converte uma data na forma de texto para um número de série -DAY = DIA ## Converte um número de série em um dia do mês -DAYS360 = DIAS360 ## Calcula o número de dias entre duas datas com base em um ano de 360 dias -EDATE = DATAM ## Retorna o número de série da data que é o número indicado de meses antes ou depois da data inicial -EOMONTH = FIMMÊS ## Retorna o número de série do último dia do mês antes ou depois de um número especificado de meses -HOUR = HORA ## Converte um número de série em uma hora -MINUTE = MINUTO ## Converte um número de série em um minuto -MONTH = MÊS ## Converte um número de série em um mês -NETWORKDAYS = DIATRABALHOTOTAL ## Retorna o número de dias úteis inteiros entre duas datas -NOW = AGORA ## Retorna o número de série seqüencial da data e hora atuais -SECOND = SEGUNDO ## Converte um número de série em um segundo -TIME = HORA ## Retorna o número de série de uma hora específica -TIMEVALUE = VALOR.TEMPO ## Converte um horário na forma de texto para um número de série -TODAY = HOJE ## Retorna o número de série da data de hoje -WEEKDAY = DIA.DA.SEMANA ## Converte um número de série em um dia da semana -WEEKNUM = NÚMSEMANA ## Converte um número de série em um número que representa onde a semana cai numericamente em um ano -WORKDAY = DIATRABALHO ## Retorna o número de série da data antes ou depois de um número específico de dias úteis -YEAR = ANO ## Converte um número de série em um ano -YEARFRAC = FRAÇÃOANO ## Retorna a fração do ano que representa o número de dias entre data_inicial e data_final - - -## -## Engineering functions Funções de engenharia -## -BESSELI = BESSELI ## Retorna a função de Bessel In(x) modificada -BESSELJ = BESSELJ ## Retorna a função de Bessel Jn(x) -BESSELK = BESSELK ## Retorna a função de Bessel Kn(x) modificada -BESSELY = BESSELY ## Retorna a função de Bessel Yn(x) -BIN2DEC = BIN2DEC ## Converte um número binário em decimal -BIN2HEX = BIN2HEX ## Converte um número binário em hexadecimal -BIN2OCT = BIN2OCT ## Converte um número binário em octal -COMPLEX = COMPLEX ## Converte coeficientes reais e imaginários e um número complexo -CONVERT = CONVERTER ## Converte um número de um sistema de medida para outro -DEC2BIN = DECABIN ## Converte um número decimal em binário -DEC2HEX = DECAHEX ## Converte um número decimal em hexadecimal -DEC2OCT = DECAOCT ## Converte um número decimal em octal -DELTA = DELTA ## Testa se dois valores são iguais -ERF = FUNERRO ## Retorna a função de erro -ERFC = FUNERROCOMPL ## Retorna a função de erro complementar -GESTEP = DEGRAU ## Testa se um número é maior do que um valor limite -HEX2BIN = HEXABIN ## Converte um número hexadecimal em binário -HEX2DEC = HEXADEC ## Converte um número hexadecimal em decimal -HEX2OCT = HEXAOCT ## Converte um número hexadecimal em octal -IMABS = IMABS ## Retorna o valor absoluto (módulo) de um número complexo -IMAGINARY = IMAGINÁRIO ## Retorna o coeficiente imaginário de um número complexo -IMARGUMENT = IMARG ## Retorna o argumento teta, um ângulo expresso em radianos -IMCONJUGATE = IMCONJ ## Retorna o conjugado complexo de um número complexo -IMCOS = IMCOS ## Retorna o cosseno de um número complexo -IMDIV = IMDIV ## Retorna o quociente de dois números complexos -IMEXP = IMEXP ## Retorna o exponencial de um número complexo -IMLN = IMLN ## Retorna o logaritmo natural de um número complexo -IMLOG10 = IMLOG10 ## Retorna o logaritmo de base 10 de um número complexo -IMLOG2 = IMLOG2 ## Retorna o logaritmo de base 2 de um número complexo -IMPOWER = IMPOT ## Retorna um número complexo elevado a uma potência inteira -IMPRODUCT = IMPROD ## Retorna o produto de números complexos -IMREAL = IMREAL ## Retorna o coeficiente real de um número complexo -IMSIN = IMSENO ## Retorna o seno de um número complexo -IMSQRT = IMRAIZ ## Retorna a raiz quadrada de um número complexo -IMSUB = IMSUBTR ## Retorna a diferença entre dois números complexos -IMSUM = IMSOMA ## Retorna a soma de números complexos -OCT2BIN = OCTABIN ## Converte um número octal em binário -OCT2DEC = OCTADEC ## Converte um número octal em decimal -OCT2HEX = OCTAHEX ## Converte um número octal em hexadecimal - - -## -## Financial functions Funções financeiras -## -ACCRINT = JUROSACUM ## Retorna a taxa de juros acumulados de um título que paga uma taxa periódica de juros -ACCRINTM = JUROSACUMV ## Retorna os juros acumulados de um título que paga juros no vencimento -AMORDEGRC = AMORDEGRC ## Retorna a depreciação para cada período contábil usando o coeficiente de depreciação -AMORLINC = AMORLINC ## Retorna a depreciação para cada período contábil -COUPDAYBS = CUPDIASINLIQ ## Retorna o número de dias do início do período de cupom até a data de liquidação -COUPDAYS = CUPDIAS ## Retorna o número de dias no período de cupom que contém a data de quitação -COUPDAYSNC = CUPDIASPRÓX ## Retorna o número de dias da data de liquidação até a data do próximo cupom -COUPNCD = CUPDATAPRÓX ## Retorna a próxima data de cupom após a data de quitação -COUPNUM = CUPNÚM ## Retorna o número de cupons pagáveis entre as datas de quitação e vencimento -COUPPCD = CUPDATAANT ## Retorna a data de cupom anterior à data de quitação -CUMIPMT = PGTOJURACUM ## Retorna os juros acumulados pagos entre dois períodos -CUMPRINC = PGTOCAPACUM ## Retorna o capital acumulado pago sobre um empréstimo entre dois períodos -DB = BD ## Retorna a depreciação de um ativo para um período especificado, usando o método de balanço de declínio fixo -DDB = BDD ## Retorna a depreciação de um ativo com relação a um período especificado usando o método de saldos decrescentes duplos ou qualquer outro método especificado por você -DISC = DESC ## Retorna a taxa de desconto de um título -DOLLARDE = MOEDADEC ## Converte um preço em formato de moeda, na forma fracionária, em um preço na forma decimal -DOLLARFR = MOEDAFRA ## Converte um preço, apresentado na forma decimal, em um preço apresentado na forma fracionária -DURATION = DURAÇÃO ## Retorna a duração anual de um título com pagamentos de juros periódicos -EFFECT = EFETIVA ## Retorna a taxa de juros anual efetiva -FV = VF ## Retorna o valor futuro de um investimento -FVSCHEDULE = VFPLANO ## Retorna o valor futuro de um capital inicial após a aplicação de uma série de taxas de juros compostas -INTRATE = TAXAJUROS ## Retorna a taxa de juros de um título totalmente investido -IPMT = IPGTO ## Retorna o pagamento de juros para um investimento em um determinado período -IRR = TIR ## Retorna a taxa interna de retorno de uma série de fluxos de caixa -ISPMT = ÉPGTO ## Calcula os juros pagos durante um período específico de um investimento -MDURATION = MDURAÇÃO ## Retorna a duração de Macauley modificada para um título com um valor de paridade equivalente a R$ 100 -MIRR = MTIR ## Calcula a taxa interna de retorno em que fluxos de caixa positivos e negativos são financiados com diferentes taxas -NOMINAL = NOMINAL ## Retorna a taxa de juros nominal anual -NPER = NPER ## Retorna o número de períodos de um investimento -NPV = VPL ## Retorna o valor líquido atual de um investimento com base em uma série de fluxos de caixa periódicos e em uma taxa de desconto -ODDFPRICE = PREÇOPRIMINC ## Retorna o preço por R$ 100 de valor nominal de um título com um primeiro período indefinido -ODDFYIELD = LUCROPRIMINC ## Retorna o rendimento de um título com um primeiro período indefinido -ODDLPRICE = PREÇOÚLTINC ## Retorna o preço por R$ 100 de valor nominal de um título com um último período de cupom indefinido -ODDLYIELD = LUCROÚLTINC ## Retorna o rendimento de um título com um último período indefinido -PMT = PGTO ## Retorna o pagamento periódico de uma anuidade -PPMT = PPGTO ## Retorna o pagamento de capital para determinado período de investimento -PRICE = PREÇO ## Retorna a preço por R$ 100,00 de valor nominal de um título que paga juros periódicos -PRICEDISC = PREÇODESC ## Retorna o preço por R$ 100,00 de valor nominal de um título descontado -PRICEMAT = PREÇOVENC ## Retorna o preço por R$ 100,00 de valor nominal de um título que paga juros no vencimento -PV = VP ## Retorna o valor presente de um investimento -RATE = TAXA ## Retorna a taxa de juros por período de uma anuidade -RECEIVED = RECEBER ## Retorna a quantia recebida no vencimento de um título totalmente investido -SLN = DPD ## Retorna a depreciação em linha reta de um ativo durante um período -SYD = SDA ## Retorna a depreciação dos dígitos da soma dos anos de um ativo para um período especificado -TBILLEQ = OTN ## Retorna o rendimento de um título equivalente a uma obrigação do Tesouro -TBILLPRICE = OTNVALOR ## Retorna o preço por R$ 100,00 de valor nominal de uma obrigação do Tesouro -TBILLYIELD = OTNLUCRO ## Retorna o rendimento de uma obrigação do Tesouro -VDB = BDV ## Retorna a depreciação de um ativo para um período especificado ou parcial usando um método de balanço declinante -XIRR = XTIR ## Fornece a taxa interna de retorno para um programa de fluxos de caixa que não é necessariamente periódico -XNPV = XVPL ## Retorna o valor presente líquido de um programa de fluxos de caixa que não é necessariamente periódico -YIELD = LUCRO ## Retorna o lucro de um título que paga juros periódicos -YIELDDISC = LUCRODESC ## Retorna o rendimento anual de um título descontado. Por exemplo, uma obrigação do Tesouro -YIELDMAT = LUCROVENC ## Retorna o lucro anual de um título que paga juros no vencimento - - -## -## Information functions Funções de informação -## -CELL = CÉL ## Retorna informações sobre formatação, localização ou conteúdo de uma célula -ERROR.TYPE = TIPO.ERRO ## Retorna um número correspondente a um tipo de erro -INFO = INFORMAÇÃO ## Retorna informações sobre o ambiente operacional atual -ISBLANK = ÉCÉL.VAZIA ## Retorna VERDADEIRO se o valor for vazio -ISERR = ÉERRO ## Retorna VERDADEIRO se o valor for um valor de erro diferente de #N/D -ISERROR = ÉERROS ## Retorna VERDADEIRO se o valor for um valor de erro -ISEVEN = ÉPAR ## Retorna VERDADEIRO se o número for par -ISLOGICAL = ÉLÓGICO ## Retorna VERDADEIRO se o valor for um valor lógico -ISNA = É.NÃO.DISP ## Retorna VERDADEIRO se o valor for o valor de erro #N/D -ISNONTEXT = É.NÃO.TEXTO ## Retorna VERDADEIRO se o valor for diferente de texto -ISNUMBER = ÉNÚM ## Retorna VERDADEIRO se o valor for um número -ISODD = ÉIMPAR ## Retorna VERDADEIRO se o número for ímpar -ISREF = ÉREF ## Retorna VERDADEIRO se o valor for uma referência -ISTEXT = ÉTEXTO ## Retorna VERDADEIRO se o valor for texto -N = N ## Retorna um valor convertido em um número -NA = NÃO.DISP ## Retorna o valor de erro #N/D -TYPE = TIPO ## Retorna um número indicando o tipo de dados de um valor - - -## -## Logical functions Funções lógicas -## -AND = E ## Retorna VERDADEIRO se todos os seus argumentos forem VERDADEIROS -FALSE = FALSO ## Retorna o valor lógico FALSO -IF = SE ## Especifica um teste lógico a ser executado -IFERROR = SEERRO ## Retornará um valor que você especifica se uma fórmula for avaliada para um erro; do contrário, retornará o resultado da fórmula -NOT = NÃO ## Inverte o valor lógico do argumento -OR = OU ## Retorna VERDADEIRO se um dos argumentos for VERDADEIRO -TRUE = VERDADEIRO ## Retorna o valor lógico VERDADEIRO - - -## -## Lookup and reference functions Funções de pesquisa e referência -## -ADDRESS = ENDEREÇO ## Retorna uma referência como texto para uma única célula em uma planilha -AREAS = ÁREAS ## Retorna o número de áreas em uma referência -CHOOSE = ESCOLHER ## Escolhe um valor a partir de uma lista de valores -COLUMN = COL ## Retorna o número da coluna de uma referência -COLUMNS = COLS ## Retorna o número de colunas em uma referência -HLOOKUP = PROCH ## Procura na linha superior de uma matriz e retorna o valor da célula especificada -HYPERLINK = HYPERLINK ## Cria um atalho ou salto que abre um documento armazenado em um servidor de rede, uma intranet ou na Internet -INDEX = ÍNDICE ## Usa um índice para escolher um valor de uma referência ou matriz -INDIRECT = INDIRETO ## Retorna uma referência indicada por um valor de texto -LOOKUP = PROC ## Procura valores em um vetor ou em uma matriz -MATCH = CORRESP ## Procura valores em uma referência ou em uma matriz -OFFSET = DESLOC ## Retorna um deslocamento de referência com base em uma determinada referência -ROW = LIN ## Retorna o número da linha de uma referência -ROWS = LINS ## Retorna o número de linhas em uma referência -RTD = RTD ## Recupera dados em tempo real de um programa que ofereça suporte a automação COM (automação: uma forma de trabalhar com objetos de um aplicativo a partir de outro aplicativo ou ferramenta de desenvolvimento. Chamada inicialmente de automação OLE, a automação é um padrão industrial e um recurso do modelo de objeto componente (COM).) -TRANSPOSE = TRANSPOR ## Retorna a transposição de uma matriz -VLOOKUP = PROCV ## Procura na primeira coluna de uma matriz e move ao longo da linha para retornar o valor de uma célula - - -## -## Math and trigonometry functions Funções matemáticas e trigonométricas -## -ABS = ABS ## Retorna o valor absoluto de um número -ACOS = ACOS ## Retorna o arco cosseno de um número -ACOSH = ACOSH ## Retorna o cosseno hiperbólico inverso de um número -ASIN = ASEN ## Retorna o arco seno de um número -ASINH = ASENH ## Retorna o seno hiperbólico inverso de um número -ATAN = ATAN ## Retorna o arco tangente de um número -ATAN2 = ATAN2 ## Retorna o arco tangente das coordenadas x e y especificadas -ATANH = ATANH ## Retorna a tangente hiperbólica inversa de um número -CEILING = TETO ## Arredonda um número para o inteiro mais próximo ou para o múltiplo mais próximo de significância -COMBIN = COMBIN ## Retorna o número de combinações de um determinado número de objetos -COS = COS ## Retorna o cosseno de um número -COSH = COSH ## Retorna o cosseno hiperbólico de um número -DEGREES = GRAUS ## Converte radianos em graus -EVEN = PAR ## Arredonda um número para cima até o inteiro par mais próximo -EXP = EXP ## Retorna e elevado à potência de um número especificado -FACT = FATORIAL ## Retorna o fatorial de um número -FACTDOUBLE = FATDUPLO ## Retorna o fatorial duplo de um número -FLOOR = ARREDMULTB ## Arredonda um número para baixo até zero -GCD = MDC ## Retorna o máximo divisor comum -INT = INT ## Arredonda um número para baixo até o número inteiro mais próximo -LCM = MMC ## Retorna o mínimo múltiplo comum -LN = LN ## Retorna o logaritmo natural de um número -LOG = LOG ## Retorna o logaritmo de um número de uma base especificada -LOG10 = LOG10 ## Retorna o logaritmo de base 10 de um número -MDETERM = MATRIZ.DETERM ## Retorna o determinante de uma matriz de uma variável do tipo matriz -MINVERSE = MATRIZ.INVERSO ## Retorna a matriz inversa de uma matriz -MMULT = MATRIZ.MULT ## Retorna o produto de duas matrizes -MOD = RESTO ## Retorna o resto da divisão -MROUND = MARRED ## Retorna um número arredondado ao múltiplo desejado -MULTINOMIAL = MULTINOMIAL ## Retorna o multinomial de um conjunto de números -ODD = ÍMPAR ## Arredonda um número para cima até o inteiro ímpar mais próximo -PI = PI ## Retorna o valor de Pi -POWER = POTÊNCIA ## Fornece o resultado de um número elevado a uma potência -PRODUCT = MULT ## Multiplica seus argumentos -QUOTIENT = QUOCIENTE ## Retorna a parte inteira de uma divisão -RADIANS = RADIANOS ## Converte graus em radianos -RAND = ALEATÓRIO ## Retorna um número aleatório entre 0 e 1 -RANDBETWEEN = ALEATÓRIOENTRE ## Retorna um número aleatório entre os números especificados -ROMAN = ROMANO ## Converte um algarismo arábico em romano, como texto -ROUND = ARRED ## Arredonda um número até uma quantidade especificada de dígitos -ROUNDDOWN = ARREDONDAR.PARA.BAIXO ## Arredonda um número para baixo até zero -ROUNDUP = ARREDONDAR.PARA.CIMA ## Arredonda um número para cima, afastando-o de zero -SERIESSUM = SOMASEQÜÊNCIA ## Retorna a soma de uma série polinomial baseada na fórmula -SIGN = SINAL ## Retorna o sinal de um número -SIN = SEN ## Retorna o seno de um ângulo dado -SINH = SENH ## Retorna o seno hiperbólico de um número -SQRT = RAIZ ## Retorna uma raiz quadrada positiva -SQRTPI = RAIZPI ## Retorna a raiz quadrada de (núm* pi) -SUBTOTAL = SUBTOTAL ## Retorna um subtotal em uma lista ou em um banco de dados -SUM = SOMA ## Soma seus argumentos -SUMIF = SOMASE ## Adiciona as células especificadas por um determinado critério -SUMIFS = SOMASE ## Adiciona as células em um intervalo que atende a vários critérios -SUMPRODUCT = SOMARPRODUTO ## Retorna a soma dos produtos de componentes correspondentes de matrizes -SUMSQ = SOMAQUAD ## Retorna a soma dos quadrados dos argumentos -SUMX2MY2 = SOMAX2DY2 ## Retorna a soma da diferença dos quadrados dos valores correspondentes em duas matrizes -SUMX2PY2 = SOMAX2SY2 ## Retorna a soma da soma dos quadrados dos valores correspondentes em duas matrizes -SUMXMY2 = SOMAXMY2 ## Retorna a soma dos quadrados das diferenças dos valores correspondentes em duas matrizes -TAN = TAN ## Retorna a tangente de um número -TANH = TANH ## Retorna a tangente hiperbólica de um número -TRUNC = TRUNCAR ## Trunca um número para um inteiro - - -## -## Statistical functions Funções estatísticas -## -AVEDEV = DESV.MÉDIO ## Retorna a média aritmética dos desvios médios dos pontos de dados a partir de sua média -AVERAGE = MÉDIA ## Retorna a média dos argumentos -AVERAGEA = MÉDIAA ## Retorna a média dos argumentos, inclusive números, texto e valores lógicos -AVERAGEIF = MÉDIASE ## Retorna a média (média aritmética) de todas as células em um intervalo que atendem a um determinado critério -AVERAGEIFS = MÉDIASES ## Retorna a média (média aritmética) de todas as células que atendem a múltiplos critérios. -BETADIST = DISTBETA ## Retorna a função de distribuição cumulativa beta -BETAINV = BETA.ACUM.INV ## Retorna o inverso da função de distribuição cumulativa para uma distribuição beta especificada -BINOMDIST = DISTRBINOM ## Retorna a probabilidade de distribuição binomial do termo individual -CHIDIST = DIST.QUI ## Retorna a probabilidade unicaudal da distribuição qui-quadrada -CHIINV = INV.QUI ## Retorna o inverso da probabilidade uni-caudal da distribuição qui-quadrada -CHITEST = TESTE.QUI ## Retorna o teste para independência -CONFIDENCE = INT.CONFIANÇA ## Retorna o intervalo de confiança para uma média da população -CORREL = CORREL ## Retorna o coeficiente de correlação entre dois conjuntos de dados -COUNT = CONT.NÚM ## Calcula quantos números há na lista de argumentos -COUNTA = CONT.VALORES ## Calcula quantos valores há na lista de argumentos -COUNTBLANK = CONTAR.VAZIO ## Conta o número de células vazias no intervalo especificado -COUNTIF = CONT.SE ## Calcula o número de células não vazias em um intervalo que corresponde a determinados critérios -COUNTIFS = CONT.SES ## Conta o número de células dentro de um intervalo que atende a múltiplos critérios -COVAR = COVAR ## Retorna a covariância, a média dos produtos dos desvios pares -CRITBINOM = CRIT.BINOM ## Retorna o menor valor para o qual a distribuição binomial cumulativa é menor ou igual ao valor padrão -DEVSQ = DESVQ ## Retorna a soma dos quadrados dos desvios -EXPONDIST = DISTEXPON ## Retorna a distribuição exponencial -FDIST = DISTF ## Retorna a distribuição de probabilidade F -FINV = INVF ## Retorna o inverso da distribuição de probabilidades F -FISHER = FISHER ## Retorna a transformação Fisher -FISHERINV = FISHERINV ## Retorna o inverso da transformação Fisher -FORECAST = PREVISÃO ## Retorna um valor ao longo de uma linha reta -FREQUENCY = FREQÜÊNCIA ## Retorna uma distribuição de freqüência como uma matriz vertical -FTEST = TESTEF ## Retorna o resultado de um teste F -GAMMADIST = DISTGAMA ## Retorna a distribuição gama -GAMMAINV = INVGAMA ## Retorna o inverso da distribuição cumulativa gama -GAMMALN = LNGAMA ## Retorna o logaritmo natural da função gama, G(x) -GEOMEAN = MÉDIA.GEOMÉTRICA ## Retorna a média geométrica -GROWTH = CRESCIMENTO ## Retorna valores ao longo de uma tendência exponencial -HARMEAN = MÉDIA.HARMÔNICA ## Retorna a média harmônica -HYPGEOMDIST = DIST.HIPERGEOM ## Retorna a distribuição hipergeométrica -INTERCEPT = INTERCEPÇÃO ## Retorna a intercepção da linha de regressão linear -KURT = CURT ## Retorna a curtose de um conjunto de dados -LARGE = MAIOR ## Retorna o maior valor k-ésimo de um conjunto de dados -LINEST = PROJ.LIN ## Retorna os parâmetros de uma tendência linear -LOGEST = PROJ.LOG ## Retorna os parâmetros de uma tendência exponencial -LOGINV = INVLOG ## Retorna o inverso da distribuição lognormal -LOGNORMDIST = DIST.LOGNORMAL ## Retorna a distribuição lognormal cumulativa -MAX = MÁXIMO ## Retorna o valor máximo em uma lista de argumentos -MAXA = MÁXIMOA ## Retorna o maior valor em uma lista de argumentos, inclusive números, texto e valores lógicos -MEDIAN = MED ## Retorna a mediana dos números indicados -MIN = MÍNIMO ## Retorna o valor mínimo em uma lista de argumentos -MINA = MÍNIMOA ## Retorna o menor valor em uma lista de argumentos, inclusive números, texto e valores lógicos -MODE = MODO ## Retorna o valor mais comum em um conjunto de dados -NEGBINOMDIST = DIST.BIN.NEG ## Retorna a distribuição binomial negativa -NORMDIST = DIST.NORM ## Retorna a distribuição cumulativa normal -NORMINV = INV.NORM ## Retorna o inverso da distribuição cumulativa normal -NORMSDIST = DIST.NORMP ## Retorna a distribuição cumulativa normal padrão -NORMSINV = INV.NORMP ## Retorna o inverso da distribuição cumulativa normal padrão -PEARSON = PEARSON ## Retorna o coeficiente de correlação do momento do produto Pearson -PERCENTILE = PERCENTIL ## Retorna o k-ésimo percentil de valores em um intervalo -PERCENTRANK = ORDEM.PORCENTUAL ## Retorna a ordem percentual de um valor em um conjunto de dados -PERMUT = PERMUT ## Retorna o número de permutações de um determinado número de objetos -POISSON = POISSON ## Retorna a distribuição Poisson -PROB = PROB ## Retorna a probabilidade de valores em um intervalo estarem entre dois limites -QUARTILE = QUARTIL ## Retorna o quartil do conjunto de dados -RANK = ORDEM ## Retorna a posição de um número em uma lista de números -RSQ = RQUAD ## Retorna o quadrado do coeficiente de correlação do momento do produto de Pearson -SKEW = DISTORÇÃO ## Retorna a distorção de uma distribuição -SLOPE = INCLINAÇÃO ## Retorna a inclinação da linha de regressão linear -SMALL = MENOR ## Retorna o menor valor k-ésimo do conjunto de dados -STANDARDIZE = PADRONIZAR ## Retorna um valor normalizado -STDEV = DESVPAD ## Estima o desvio padrão com base em uma amostra -STDEVA = DESVPADA ## Estima o desvio padrão com base em uma amostra, inclusive números, texto e valores lógicos -STDEVP = DESVPADP ## Calcula o desvio padrão com base na população total -STDEVPA = DESVPADPA ## Calcula o desvio padrão com base na população total, inclusive números, texto e valores lógicos -STEYX = EPADYX ## Retorna o erro padrão do valor-y previsto para cada x da regressão -TDIST = DISTT ## Retorna a distribuição t de Student -TINV = INVT ## Retorna o inverso da distribuição t de Student -TREND = TENDÊNCIA ## Retorna valores ao longo de uma tendência linear -TRIMMEAN = MÉDIA.INTERNA ## Retorna a média do interior de um conjunto de dados -TTEST = TESTET ## Retorna a probabilidade associada ao teste t de Student -VAR = VAR ## Estima a variância com base em uma amostra -VARA = VARA ## Estima a variância com base em uma amostra, inclusive números, texto e valores lógicos -VARP = VARP ## Calcula a variância com base na população inteira -VARPA = VARPA ## Calcula a variância com base na população total, inclusive números, texto e valores lógicos -WEIBULL = WEIBULL ## Retorna a distribuição Weibull -ZTEST = TESTEZ ## Retorna o valor de probabilidade uni-caudal de um teste-z - - -## -## Text functions Funções de texto -## -ASC = ASC ## Altera letras do inglês ou katakana de largura total (bytes duplos) dentro de uma seqüência de caracteres para caracteres de meia largura (byte único) -BAHTTEXT = BAHTTEXT ## Converte um número em um texto, usando o formato de moeda ß (baht) -CHAR = CARACT ## Retorna o caractere especificado pelo número de código -CLEAN = TIRAR ## Remove todos os caracteres do texto que não podem ser impressos -CODE = CÓDIGO ## Retorna um código numérico para o primeiro caractere de uma seqüência de caracteres de texto -CONCATENATE = CONCATENAR ## Agrupa vários itens de texto em um único item de texto -DOLLAR = MOEDA ## Converte um número em texto, usando o formato de moeda $ (dólar) -EXACT = EXATO ## Verifica se dois valores de texto são idênticos -FIND = PROCURAR ## Procura um valor de texto dentro de outro (diferencia maiúsculas de minúsculas) -FINDB = PROCURARB ## Procura um valor de texto dentro de outro (diferencia maiúsculas de minúsculas) -FIXED = DEF.NÚM.DEC ## Formata um número como texto com um número fixo de decimais -JIS = JIS ## Altera letras do inglês ou katakana de meia largura (byte único) dentro de uma seqüência de caracteres para caracteres de largura total (bytes duplos) -LEFT = ESQUERDA ## Retorna os caracteres mais à esquerda de um valor de texto -LEFTB = ESQUERDAB ## Retorna os caracteres mais à esquerda de um valor de texto -LEN = NÚM.CARACT ## Retorna o número de caracteres em uma seqüência de texto -LENB = NÚM.CARACTB ## Retorna o número de caracteres em uma seqüência de texto -LOWER = MINÚSCULA ## Converte texto para minúsculas -MID = EXT.TEXTO ## Retorna um número específico de caracteres de uma seqüência de texto começando na posição especificada -MIDB = EXT.TEXTOB ## Retorna um número específico de caracteres de uma seqüência de texto começando na posição especificada -PHONETIC = FONÉTICA ## Extrai os caracteres fonéticos (furigana) de uma seqüência de caracteres de texto -PROPER = PRI.MAIÚSCULA ## Coloca a primeira letra de cada palavra em maiúscula em um valor de texto -REPLACE = MUDAR ## Muda os caracteres dentro do texto -REPLACEB = MUDARB ## Muda os caracteres dentro do texto -REPT = REPT ## Repete o texto um determinado número de vezes -RIGHT = DIREITA ## Retorna os caracteres mais à direita de um valor de texto -RIGHTB = DIREITAB ## Retorna os caracteres mais à direita de um valor de texto -SEARCH = LOCALIZAR ## Localiza um valor de texto dentro de outro (não diferencia maiúsculas de minúsculas) -SEARCHB = LOCALIZARB ## Localiza um valor de texto dentro de outro (não diferencia maiúsculas de minúsculas) -SUBSTITUTE = SUBSTITUIR ## Substitui um novo texto por um texto antigo em uma seqüência de texto -T = T ## Converte os argumentos em texto -TEXT = TEXTO ## Formata um número e o converte em texto -TRIM = ARRUMAR ## Remove espaços do texto -UPPER = MAIÚSCULA ## Converte o texto em maiúsculas -VALUE = VALOR ## Converte um argumento de texto em um número diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config deleted file mode 100644 index 8bb8d8b..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = € - - -## -## Excel Error Codes (For future use) -## -NULL = #NULO! -DIV0 = #DIV/0! -VALUE = #VALOR! -REF = #REF! -NAME = #NOME? -NUM = #NÚM! -NA = #N/D diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/functions deleted file mode 100644 index ba4eb47..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/functions +++ /dev/null @@ -1,408 +0,0 @@ -## -## Add-in and Automation functions Funções de Suplemento e Automatização -## -GETPIVOTDATA = OBTERDADOSDIN ## Devolve dados armazenados num relatório de Tabela Dinâmica - - -## -## Cube functions Funções de cubo -## -CUBEKPIMEMBER = MEMBROKPICUBO ## Devolve o nome, propriedade e medição de um KPI (key performance indicator) e apresenta o nome e a propriedade na célula. Um KPI é uma medida quantificável, como, por exemplo, o lucro mensal bruto ou a rotatividade trimestral de pessoal, utilizada para monitorizar o desempenho de uma organização. -CUBEMEMBER = MEMBROCUBO ## Devolve um membro ou cadeia de identificação numa hierarquia de cubo. Utilizada para validar a existência do membro ou cadeia de identificação no cubo. -CUBEMEMBERPROPERTY = PROPRIEDADEMEMBROCUBO ## Devolve o valor de uma propriedade de membro no cubo. Utilizada para validar a existência de um nome de membro no cubo e para devolver a propriedade especificada para esse membro. -CUBERANKEDMEMBER = MEMBROCLASSIFICADOCUBO ## Devolve o enésimo ou a classificação mais alta num conjunto. Utilizada para devolver um ou mais elementos num conjunto, tal como o melhor vendedor ou os 10 melhores alunos. -CUBESET = CONJUNTOCUBO ## Define um conjunto calculado de membros ou cadeias de identificação enviando uma expressão de conjunto para o cubo no servidor, que cria o conjunto e, em seguida, devolve o conjunto ao Microsoft Office Excel. -CUBESETCOUNT = CONTARCONJUNTOCUBO ## Devolve o número de itens num conjunto. -CUBEVALUE = VALORCUBO ## Devolve um valor agregado do cubo. - - -## -## Database functions Funções de base de dados -## -DAVERAGE = BDMÉDIA ## Devolve a média das entradas da base de dados seleccionadas -DCOUNT = BDCONTAR ## Conta as células que contêm números numa base de dados -DCOUNTA = BDCONTAR.VAL ## Conta as células que não estejam em branco numa base de dados -DGET = BDOBTER ## Extrai de uma base de dados um único registo que corresponde aos critérios especificados -DMAX = BDMÁX ## Devolve o valor máximo das entradas da base de dados seleccionadas -DMIN = BDMÍN ## Devolve o valor mínimo das entradas da base de dados seleccionadas -DPRODUCT = BDMULTIPL ## Multiplica os valores de um determinado campo de registos que correspondem aos critérios numa base de dados -DSTDEV = BDDESVPAD ## Calcula o desvio-padrão com base numa amostra de entradas da base de dados seleccionadas -DSTDEVP = BDDESVPADP ## Calcula o desvio-padrão com base na população total das entradas da base de dados seleccionadas -DSUM = BDSOMA ## Adiciona os números na coluna de campo dos registos de base de dados que correspondem aos critérios -DVAR = BDVAR ## Calcula a variância com base numa amostra das entradas de base de dados seleccionadas -DVARP = BDVARP ## Calcula a variância com base na população total das entradas de base de dados seleccionadas - - -## -## Date and time functions Funções de data e hora -## -DATE = DATA ## Devolve o número de série de uma determinada data -DATEVALUE = DATA.VALOR ## Converte uma data em forma de texto num número de série -DAY = DIA ## Converte um número de série num dia do mês -DAYS360 = DIAS360 ## Calcula o número de dias entre duas datas com base num ano com 360 dias -EDATE = DATAM ## Devolve um número de série de data que corresponde ao número de meses indicado antes ou depois da data de início -EOMONTH = FIMMÊS ## Devolve o número de série do último dia do mês antes ou depois de um número de meses especificado -HOUR = HORA ## Converte um número de série numa hora -MINUTE = MINUTO ## Converte um número de série num minuto -MONTH = MÊS ## Converte um número de série num mês -NETWORKDAYS = DIATRABALHOTOTAL ## Devolve o número total de dias úteis entre duas datas -NOW = AGORA ## Devolve o número de série da data e hora actuais -SECOND = SEGUNDO ## Converte um número de série num segundo -TIME = TEMPO ## Devolve o número de série de um determinado tempo -TIMEVALUE = VALOR.TEMPO ## Converte um tempo em forma de texto num número de série -TODAY = HOJE ## Devolve o número de série da data actual -WEEKDAY = DIA.SEMANA ## Converte um número de série num dia da semana -WEEKNUM = NÚMSEMANA ## Converte um número de série num número que representa o número da semana num determinado ano -WORKDAY = DIA.TRABALHO ## Devolve o número de série da data antes ou depois de um número de dias úteis especificado -YEAR = ANO ## Converte um número de série num ano -YEARFRAC = FRACÇÃOANO ## Devolve a fracção de ano que representa o número de dias inteiros entre a data_de_início e a data_de_fim - - -## -## Engineering functions Funções de engenharia -## -BESSELI = BESSELI ## Devolve a função de Bessel modificada In(x) -BESSELJ = BESSELJ ## Devolve a função de Bessel Jn(x) -BESSELK = BESSELK ## Devolve a função de Bessel modificada Kn(x) -BESSELY = BESSELY ## Devolve a função de Bessel Yn(x) -BIN2DEC = BINADEC ## Converte um número binário em decimal -BIN2HEX = BINAHEX ## Converte um número binário em hexadecimal -BIN2OCT = BINAOCT ## Converte um número binário em octal -COMPLEX = COMPLEXO ## Converte coeficientes reais e imaginários num número complexo -CONVERT = CONVERTER ## Converte um número de um sistema de medida noutro -DEC2BIN = DECABIN ## Converte um número decimal em binário -DEC2HEX = DECAHEX ## Converte um número decimal em hexadecimal -DEC2OCT = DECAOCT ## Converte um número decimal em octal -DELTA = DELTA ## Testa se dois valores são iguais -ERF = FUNCERRO ## Devolve a função de erro -ERFC = FUNCERROCOMPL ## Devolve a função de erro complementar -GESTEP = DEGRAU ## Testa se um número é maior do que um valor limite -HEX2BIN = HEXABIN ## Converte um número hexadecimal em binário -HEX2DEC = HEXADEC ## Converte um número hexadecimal em decimal -HEX2OCT = HEXAOCT ## Converte um número hexadecimal em octal -IMABS = IMABS ## Devolve o valor absoluto (módulo) de um número complexo -IMAGINARY = IMAGINÁRIO ## Devolve o coeficiente imaginário de um número complexo -IMARGUMENT = IMARG ## Devolve o argumento Teta, um ângulo expresso em radianos -IMCONJUGATE = IMCONJ ## Devolve o conjugado complexo de um número complexo -IMCOS = IMCOS ## Devolve o co-seno de um número complexo -IMDIV = IMDIV ## Devolve o quociente de dois números complexos -IMEXP = IMEXP ## Devolve o exponencial de um número complexo -IMLN = IMLN ## Devolve o logaritmo natural de um número complexo -IMLOG10 = IMLOG10 ## Devolve o logaritmo de base 10 de um número complexo -IMLOG2 = IMLOG2 ## Devolve o logaritmo de base 2 de um número complexo -IMPOWER = IMPOT ## Devolve um número complexo elevado a uma potência inteira -IMPRODUCT = IMPROD ## Devolve o produto de números complexos -IMREAL = IMREAL ## Devolve o coeficiente real de um número complexo -IMSIN = IMSENO ## Devolve o seno de um número complexo -IMSQRT = IMRAIZ ## Devolve a raiz quadrada de um número complexo -IMSUB = IMSUBTR ## Devolve a diferença entre dois números complexos -IMSUM = IMSOMA ## Devolve a soma de números complexos -OCT2BIN = OCTABIN ## Converte um número octal em binário -OCT2DEC = OCTADEC ## Converte um número octal em decimal -OCT2HEX = OCTAHEX ## Converte um número octal em hexadecimal - - -## -## Financial functions Funções financeiras -## -ACCRINT = JUROSACUM ## Devolve os juros acumulados de um título que paga juros periódicos -ACCRINTM = JUROSACUMV ## Devolve os juros acumulados de um título que paga juros no vencimento -AMORDEGRC = AMORDEGRC ## Devolve a depreciação correspondente a cada período contabilístico utilizando um coeficiente de depreciação -AMORLINC = AMORLINC ## Devolve a depreciação correspondente a cada período contabilístico -COUPDAYBS = CUPDIASINLIQ ## Devolve o número de dias entre o início do período do cupão e a data de regularização -COUPDAYS = CUPDIAS ## Devolve o número de dias no período do cupão que contém a data de regularização -COUPDAYSNC = CUPDIASPRÓX ## Devolve o número de dias entre a data de regularização e a data do cupão seguinte -COUPNCD = CUPDATAPRÓX ## Devolve a data do cupão seguinte após a data de regularização -COUPNUM = CUPNÚM ## Devolve o número de cupões a serem pagos entre a data de regularização e a data de vencimento -COUPPCD = CUPDATAANT ## Devolve a data do cupão anterior antes da data de regularização -CUMIPMT = PGTOJURACUM ## Devolve os juros cumulativos pagos entre dois períodos -CUMPRINC = PGTOCAPACUM ## Devolve o capital cumulativo pago a título de empréstimo entre dois períodos -DB = BD ## Devolve a depreciação de um activo relativo a um período especificado utilizando o método das quotas degressivas fixas -DDB = BDD ## Devolve a depreciação de um activo relativo a um período especificado utilizando o método das quotas degressivas duplas ou qualquer outro método especificado -DISC = DESC ## Devolve a taxa de desconto de um título -DOLLARDE = MOEDADEC ## Converte um preço em unidade monetária, expresso como uma fracção, num preço em unidade monetária, expresso como um número decimal -DOLLARFR = MOEDAFRA ## Converte um preço em unidade monetária, expresso como um número decimal, num preço em unidade monetária, expresso como uma fracção -DURATION = DURAÇÃO ## Devolve a duração anual de um título com pagamentos de juros periódicos -EFFECT = EFECTIVA ## Devolve a taxa de juros anual efectiva -FV = VF ## Devolve o valor futuro de um investimento -FVSCHEDULE = VFPLANO ## Devolve o valor futuro de um capital inicial após a aplicação de uma série de taxas de juro compostas -INTRATE = TAXAJUROS ## Devolve a taxa de juros de um título investido na totalidade -IPMT = IPGTO ## Devolve o pagamento dos juros de um investimento durante um determinado período -IRR = TIR ## Devolve a taxa de rentabilidade interna para uma série de fluxos monetários -ISPMT = É.PGTO ## Calcula os juros pagos durante um período específico de um investimento -MDURATION = MDURAÇÃO ## Devolve a duração modificada de Macauley de um título com um valor de paridade equivalente a € 100 -MIRR = MTIR ## Devolve a taxa interna de rentabilidade em que os fluxos monetários positivos e negativos são financiados com taxas diferentes -NOMINAL = NOMINAL ## Devolve a taxa de juros nominal anual -NPER = NPER ## Devolve o número de períodos de um investimento -NPV = VAL ## Devolve o valor actual líquido de um investimento com base numa série de fluxos monetários periódicos e numa taxa de desconto -ODDFPRICE = PREÇOPRIMINC ## Devolve o preço por € 100 do valor nominal de um título com um período inicial incompleto -ODDFYIELD = LUCROPRIMINC ## Devolve o lucro de um título com um período inicial incompleto -ODDLPRICE = PREÇOÚLTINC ## Devolve o preço por € 100 do valor nominal de um título com um período final incompleto -ODDLYIELD = LUCROÚLTINC ## Devolve o lucro de um título com um período final incompleto -PMT = PGTO ## Devolve o pagamento periódico de uma anuidade -PPMT = PPGTO ## Devolve o pagamento sobre o capital de um investimento num determinado período -PRICE = PREÇO ## Devolve o preço por € 100 do valor nominal de um título que paga juros periódicos -PRICEDISC = PREÇODESC ## Devolve o preço por € 100 do valor nominal de um título descontado -PRICEMAT = PREÇOVENC ## Devolve o preço por € 100 do valor nominal de um título que paga juros no vencimento -PV = VA ## Devolve o valor actual de um investimento -RATE = TAXA ## Devolve a taxa de juros por período de uma anuidade -RECEIVED = RECEBER ## Devolve o montante recebido no vencimento de um título investido na totalidade -SLN = AMORT ## Devolve uma depreciação linear de um activo durante um período -SYD = AMORTD ## Devolve a depreciação por algarismos da soma dos anos de um activo durante um período especificado -TBILLEQ = OTN ## Devolve o lucro de um título equivalente a uma Obrigação do Tesouro -TBILLPRICE = OTNVALOR ## Devolve o preço por € 100 de valor nominal de uma Obrigação do Tesouro -TBILLYIELD = OTNLUCRO ## Devolve o lucro de uma Obrigação do Tesouro -VDB = BDV ## Devolve a depreciação de um activo relativo a um período específico ou parcial utilizando um método de quotas degressivas -XIRR = XTIR ## Devolve a taxa interna de rentabilidade de um plano de fluxos monetários que não seja necessariamente periódica -XNPV = XVAL ## Devolve o valor actual líquido de um plano de fluxos monetários que não seja necessariamente periódico -YIELD = LUCRO ## Devolve o lucro de um título que paga juros periódicos -YIELDDISC = LUCRODESC ## Devolve o lucro anual de um título emitido abaixo do valor nominal, por exemplo, uma Obrigação do Tesouro -YIELDMAT = LUCROVENC ## Devolve o lucro anual de um título que paga juros na data de vencimento - - -## -## Information functions Funções de informação -## -CELL = CÉL ## Devolve informações sobre a formatação, localização ou conteúdo de uma célula -ERROR.TYPE = TIPO.ERRO ## Devolve um número correspondente a um tipo de erro -INFO = INFORMAÇÃO ## Devolve informações sobre o ambiente de funcionamento actual -ISBLANK = É.CÉL.VAZIA ## Devolve VERDADEIRO se o valor estiver em branco -ISERR = É.ERROS ## Devolve VERDADEIRO se o valor for um valor de erro diferente de #N/D -ISERROR = É.ERRO ## Devolve VERDADEIRO se o valor for um valor de erro -ISEVEN = ÉPAR ## Devolve VERDADEIRO se o número for par -ISLOGICAL = É.LÓGICO ## Devolve VERDADEIRO se o valor for lógico -ISNA = É.NÃO.DISP ## Devolve VERDADEIRO se o valor for o valor de erro #N/D -ISNONTEXT = É.NÃO.TEXTO ## Devolve VERDADEIRO se o valor não for texto -ISNUMBER = É.NÚM ## Devolve VERDADEIRO se o valor for um número -ISODD = ÉÍMPAR ## Devolve VERDADEIRO se o número for ímpar -ISREF = É.REF ## Devolve VERDADEIRO se o valor for uma referência -ISTEXT = É.TEXTO ## Devolve VERDADEIRO se o valor for texto -N = N ## Devolve um valor convertido num número -NA = NÃO.DISP ## Devolve o valor de erro #N/D -TYPE = TIPO ## Devolve um número que indica o tipo de dados de um valor - - -## -## Logical functions Funções lógicas -## -AND = E ## Devolve VERDADEIRO se todos os respectivos argumentos corresponderem a VERDADEIRO -FALSE = FALSO ## Devolve o valor lógico FALSO -IF = SE ## Especifica um teste lógico a ser executado -IFERROR = SE.ERRO ## Devolve um valor definido pelo utilizador se ocorrer um erro na fórmula, e devolve o resultado da fórmula se não ocorrer nenhum erro -NOT = NÃO ## Inverte a lógica do respectivo argumento -OR = OU ## Devolve VERDADEIRO se qualquer argumento for VERDADEIRO -TRUE = VERDADEIRO ## Devolve o valor lógico VERDADEIRO - - -## -## Lookup and reference functions Funções de pesquisa e referência -## -ADDRESS = ENDEREÇO ## Devolve uma referência a uma única célula numa folha de cálculo como texto -AREAS = ÁREAS ## Devolve o número de áreas numa referência -CHOOSE = SELECCIONAR ## Selecciona um valor a partir de uma lista de valores -COLUMN = COL ## Devolve o número da coluna de uma referência -COLUMNS = COLS ## Devolve o número de colunas numa referência -HLOOKUP = PROCH ## Procura na linha superior de uma matriz e devolve o valor da célula indicada -HYPERLINK = HIPERLIGAÇÃO ## Cria um atalho ou hiperligação que abre um documento armazenado num servidor de rede, numa intranet ou na Internet -INDEX = ÍNDICE ## Utiliza um índice para escolher um valor de uma referência ou de uma matriz -INDIRECT = INDIRECTO ## Devolve uma referência indicada por um valor de texto -LOOKUP = PROC ## Procura valores num vector ou numa matriz -MATCH = CORRESP ## Procura valores numa referência ou numa matriz -OFFSET = DESLOCAMENTO ## Devolve o deslocamento de referência de uma determinada referência -ROW = LIN ## Devolve o número da linha de uma referência -ROWS = LINS ## Devolve o número de linhas numa referência -RTD = RTD ## Obtém dados em tempo real a partir de um programa que suporte automatização COM (automatização: modo de trabalhar com objectos de uma aplicação a partir de outra aplicação ou ferramenta de desenvolvimento. Anteriormente conhecida como automatização OLE, a automatização é uma norma da indústria de software e uma funcionalidade COM (Component Object Model).) -TRANSPOSE = TRANSPOR ## Devolve a transposição de uma matriz -VLOOKUP = PROCV ## Procura na primeira coluna de uma matriz e percorre a linha para devolver o valor de uma célula - - -## -## Math and trigonometry functions Funções matemáticas e trigonométricas -## -ABS = ABS ## Devolve o valor absoluto de um número -ACOS = ACOS ## Devolve o arco de co-seno de um número -ACOSH = ACOSH ## Devolve o co-seno hiperbólico inverso de um número -ASIN = ASEN ## Devolve o arco de seno de um número -ASINH = ASENH ## Devolve o seno hiperbólico inverso de um número -ATAN = ATAN ## Devolve o arco de tangente de um número -ATAN2 = ATAN2 ## Devolve o arco de tangente das coordenadas x e y -ATANH = ATANH ## Devolve a tangente hiperbólica inversa de um número -CEILING = ARRED.EXCESSO ## Arredonda um número para o número inteiro mais próximo ou para o múltiplo de significância mais próximo -COMBIN = COMBIN ## Devolve o número de combinações de um determinado número de objectos -COS = COS ## Devolve o co-seno de um número -COSH = COSH ## Devolve o co-seno hiperbólico de um número -DEGREES = GRAUS ## Converte radianos em graus -EVEN = PAR ## Arredonda um número por excesso para o número inteiro mais próximo -EXP = EXP ## Devolve e elevado à potência de um determinado número -FACT = FACTORIAL ## Devolve o factorial de um número -FACTDOUBLE = FACTDUPLO ## Devolve o factorial duplo de um número -FLOOR = ARRED.DEFEITO ## Arredonda um número por defeito até zero -GCD = MDC ## Devolve o maior divisor comum -INT = INT ## Arredonda um número por defeito para o número inteiro mais próximo -LCM = MMC ## Devolve o mínimo múltiplo comum -LN = LN ## Devolve o logaritmo natural de um número -LOG = LOG ## Devolve o logaritmo de um número com uma base especificada -LOG10 = LOG10 ## Devolve o logaritmo de base 10 de um número -MDETERM = MATRIZ.DETERM ## Devolve o determinante matricial de uma matriz -MINVERSE = MATRIZ.INVERSA ## Devolve o inverso matricial de uma matriz -MMULT = MATRIZ.MULT ## Devolve o produto matricial de duas matrizes -MOD = RESTO ## Devolve o resto da divisão -MROUND = MARRED ## Devolve um número arredondado para o múltiplo pretendido -MULTINOMIAL = POLINOMIAL ## Devolve o polinomial de um conjunto de números -ODD = ÍMPAR ## Arredonda por excesso um número para o número inteiro ímpar mais próximo -PI = PI ## Devolve o valor de pi -POWER = POTÊNCIA ## Devolve o resultado de um número elevado a uma potência -PRODUCT = PRODUTO ## Multiplica os respectivos argumentos -QUOTIENT = QUOCIENTE ## Devolve a parte inteira de uma divisão -RADIANS = RADIANOS ## Converte graus em radianos -RAND = ALEATÓRIO ## Devolve um número aleatório entre 0 e 1 -RANDBETWEEN = ALEATÓRIOENTRE ## Devolve um número aleatório entre os números especificados -ROMAN = ROMANO ## Converte um número árabe em romano, como texto -ROUND = ARRED ## Arredonda um número para um número de dígitos especificado -ROUNDDOWN = ARRED.PARA.BAIXO ## Arredonda um número por defeito até zero -ROUNDUP = ARRED.PARA.CIMA ## Arredonda um número por excesso, afastando-o de zero -SERIESSUM = SOMASÉRIE ## Devolve a soma de uma série de potências baseada na fórmula -SIGN = SINAL ## Devolve o sinal de um número -SIN = SEN ## Devolve o seno de um determinado ângulo -SINH = SENH ## Devolve o seno hiperbólico de um número -SQRT = RAIZQ ## Devolve uma raiz quadrada positiva -SQRTPI = RAIZPI ## Devolve a raiz quadrada de (núm * pi) -SUBTOTAL = SUBTOTAL ## Devolve um subtotal numa lista ou base de dados -SUM = SOMA ## Adiciona os respectivos argumentos -SUMIF = SOMA.SE ## Adiciona as células especificadas por um determinado critério -SUMIFS = SOMA.SE.S ## Adiciona as células num intervalo que cumpre vários critérios -SUMPRODUCT = SOMARPRODUTO ## Devolve a soma dos produtos de componentes de matrizes correspondentes -SUMSQ = SOMARQUAD ## Devolve a soma dos quadrados dos argumentos -SUMX2MY2 = SOMAX2DY2 ## Devolve a soma da diferença dos quadrados dos valores correspondentes em duas matrizes -SUMX2PY2 = SOMAX2SY2 ## Devolve a soma da soma dos quadrados dos valores correspondentes em duas matrizes -SUMXMY2 = SOMAXMY2 ## Devolve a soma dos quadrados da diferença dos valores correspondentes em duas matrizes -TAN = TAN ## Devolve a tangente de um número -TANH = TANH ## Devolve a tangente hiperbólica de um número -TRUNC = TRUNCAR ## Trunca um número para um número inteiro - - -## -## Statistical functions Funções estatísticas -## -AVEDEV = DESV.MÉDIO ## Devolve a média aritmética dos desvios absolutos à média dos pontos de dados -AVERAGE = MÉDIA ## Devolve a média dos respectivos argumentos -AVERAGEA = MÉDIAA ## Devolve uma média dos respectivos argumentos, incluindo números, texto e valores lógicos -AVERAGEIF = MÉDIA.SE ## Devolve a média aritmética de todas as células num intervalo que cumprem determinado critério -AVERAGEIFS = MÉDIA.SE.S ## Devolve a média aritmética de todas as células que cumprem múltiplos critérios -BETADIST = DISTBETA ## Devolve a função de distribuição cumulativa beta -BETAINV = BETA.ACUM.INV ## Devolve o inverso da função de distribuição cumulativa relativamente a uma distribuição beta específica -BINOMDIST = DISTRBINOM ## Devolve a probabilidade de distribuição binomial de termo individual -CHIDIST = DIST.CHI ## Devolve a probabilidade unicaudal da distribuição qui-quadrada -CHIINV = INV.CHI ## Devolve o inverso da probabilidade unicaudal da distribuição qui-quadrada -CHITEST = TESTE.CHI ## Devolve o teste para independência -CONFIDENCE = INT.CONFIANÇA ## Devolve o intervalo de confiança correspondente a uma média de população -CORREL = CORREL ## Devolve o coeficiente de correlação entre dois conjuntos de dados -COUNT = CONTAR ## Conta os números que existem na lista de argumentos -COUNTA = CONTAR.VAL ## Conta os valores que existem na lista de argumentos -COUNTBLANK = CONTAR.VAZIO ## Conta o número de células em branco num intervalo -COUNTIF = CONTAR.SE ## Calcula o número de células num intervalo que corresponde aos critérios determinados -COUNTIFS = CONTAR.SE.S ## Conta o número de células num intervalo que cumprem múltiplos critérios -COVAR = COVAR ## Devolve a covariância, que é a média dos produtos de desvios de pares -CRITBINOM = CRIT.BINOM ## Devolve o menor valor em que a distribuição binomial cumulativa é inferior ou igual a um valor de critério -DEVSQ = DESVQ ## Devolve a soma dos quadrados dos desvios -EXPONDIST = DISTEXPON ## Devolve a distribuição exponencial -FDIST = DISTF ## Devolve a distribuição da probabilidade F -FINV = INVF ## Devolve o inverso da distribuição da probabilidade F -FISHER = FISHER ## Devolve a transformação Fisher -FISHERINV = FISHERINV ## Devolve o inverso da transformação Fisher -FORECAST = PREVISÃO ## Devolve um valor ao longo de uma tendência linear -FREQUENCY = FREQUÊNCIA ## Devolve uma distribuição de frequência como uma matriz vertical -FTEST = TESTEF ## Devolve o resultado de um teste F -GAMMADIST = DISTGAMA ## Devolve a distribuição gama -GAMMAINV = INVGAMA ## Devolve o inverso da distribuição gama cumulativa -GAMMALN = LNGAMA ## Devolve o logaritmo natural da função gama, Γ(x) -GEOMEAN = MÉDIA.GEOMÉTRICA ## Devolve a média geométrica -GROWTH = CRESCIMENTO ## Devolve valores ao longo de uma tendência exponencial -HARMEAN = MÉDIA.HARMÓNICA ## Devolve a média harmónica -HYPGEOMDIST = DIST.HIPERGEOM ## Devolve a distribuição hipergeométrica -INTERCEPT = INTERCEPTAR ## Devolve a intercepção da linha de regressão linear -KURT = CURT ## Devolve a curtose de um conjunto de dados -LARGE = MAIOR ## Devolve o maior valor k-ésimo de um conjunto de dados -LINEST = PROJ.LIN ## Devolve os parâmetros de uma tendência linear -LOGEST = PROJ.LOG ## Devolve os parâmetros de uma tendência exponencial -LOGINV = INVLOG ## Devolve o inverso da distribuição normal logarítmica -LOGNORMDIST = DIST.NORMALLOG ## Devolve a distribuição normal logarítmica cumulativa -MAX = MÁXIMO ## Devolve o valor máximo numa lista de argumentos -MAXA = MÁXIMOA ## Devolve o valor máximo numa lista de argumentos, incluindo números, texto e valores lógicos -MEDIAN = MED ## Devolve a mediana dos números indicados -MIN = MÍNIMO ## Devolve o valor mínimo numa lista de argumentos -MINA = MÍNIMOA ## Devolve o valor mínimo numa lista de argumentos, incluindo números, texto e valores lógicos -MODE = MODA ## Devolve o valor mais comum num conjunto de dados -NEGBINOMDIST = DIST.BIN.NEG ## Devolve a distribuição binominal negativa -NORMDIST = DIST.NORM ## Devolve a distribuição cumulativa normal -NORMINV = INV.NORM ## Devolve o inverso da distribuição cumulativa normal -NORMSDIST = DIST.NORMP ## Devolve a distribuição cumulativa normal padrão -NORMSINV = INV.NORMP ## Devolve o inverso da distribuição cumulativa normal padrão -PEARSON = PEARSON ## Devolve o coeficiente de correlação momento/produto de Pearson -PERCENTILE = PERCENTIL ## Devolve o k-ésimo percentil de valores num intervalo -PERCENTRANK = ORDEM.PERCENTUAL ## Devolve a ordem percentual de um valor num conjunto de dados -PERMUT = PERMUTAR ## Devolve o número de permutações de um determinado número de objectos -POISSON = POISSON ## Devolve a distribuição de Poisson -PROB = PROB ## Devolve a probabilidade dos valores num intervalo se encontrarem entre dois limites -QUARTILE = QUARTIL ## Devolve o quartil de um conjunto de dados -RANK = ORDEM ## Devolve a ordem de um número numa lista numérica -RSQ = RQUAD ## Devolve o quadrado do coeficiente de correlação momento/produto de Pearson -SKEW = DISTORÇÃO ## Devolve a distorção de uma distribuição -SLOPE = DECLIVE ## Devolve o declive da linha de regressão linear -SMALL = MENOR ## Devolve o menor valor de k-ésimo de um conjunto de dados -STANDARDIZE = NORMALIZAR ## Devolve um valor normalizado -STDEV = DESVPAD ## Calcula o desvio-padrão com base numa amostra -STDEVA = DESVPADA ## Calcula o desvio-padrão com base numa amostra, incluindo números, texto e valores lógicos -STDEVP = DESVPADP ## Calcula o desvio-padrão com base na população total -STDEVPA = DESVPADPA ## Calcula o desvio-padrão com base na população total, incluindo números, texto e valores lógicos -STEYX = EPADYX ## Devolve o erro-padrão do valor de y previsto para cada x na regressão -TDIST = DISTT ## Devolve a distribuição t de Student -TINV = INVT ## Devolve o inverso da distribuição t de Student -TREND = TENDÊNCIA ## Devolve valores ao longo de uma tendência linear -TRIMMEAN = MÉDIA.INTERNA ## Devolve a média do interior de um conjunto de dados -TTEST = TESTET ## Devolve a probabilidade associada ao teste t de Student -VAR = VAR ## Calcula a variância com base numa amostra -VARA = VARA ## Calcula a variância com base numa amostra, incluindo números, texto e valores lógicos -VARP = VARP ## Calcula a variância com base na população total -VARPA = VARPA ## Calcula a variância com base na população total, incluindo números, texto e valores lógicos -WEIBULL = WEIBULL ## Devolve a distribuição Weibull -ZTEST = TESTEZ ## Devolve o valor de probabilidade unicaudal de um teste-z - - -## -## Text functions Funções de texto -## -ASC = ASC ## Altera letras ou katakana de largura total (byte duplo) numa cadeia de caracteres para caracteres de largura média (byte único) -BAHTTEXT = TEXTO.BAHT ## Converte um número em texto, utilizando o formato monetário ß (baht) -CHAR = CARÁCT ## Devolve o carácter especificado pelo número de código -CLEAN = LIMPAR ## Remove do texto todos os caracteres não imprimíveis -CODE = CÓDIGO ## Devolve um código numérico correspondente ao primeiro carácter numa cadeia de texto -CONCATENATE = CONCATENAR ## Agrupa vários itens de texto num único item de texto -DOLLAR = MOEDA ## Converte um número em texto, utilizando o formato monetário € (Euro) -EXACT = EXACTO ## Verifica se dois valores de texto são idênticos -FIND = LOCALIZAR ## Localiza um valor de texto dentro de outro (sensível às maiúsculas e minúsculas) -FINDB = LOCALIZARB ## Localiza um valor de texto dentro de outro (sensível às maiúsculas e minúsculas) -FIXED = FIXA ## Formata um número como texto com um número fixo de decimais -JIS = JIS ## Altera letras ou katakana de largura média (byte único) numa cadeia de caracteres para caracteres de largura total (byte duplo) -LEFT = ESQUERDA ## Devolve os caracteres mais à esquerda de um valor de texto -LEFTB = ESQUERDAB ## Devolve os caracteres mais à esquerda de um valor de texto -LEN = NÚM.CARACT ## Devolve o número de caracteres de uma cadeia de texto -LENB = NÚM.CARACTB ## Devolve o número de caracteres de uma cadeia de texto -LOWER = MINÚSCULAS ## Converte o texto em minúsculas -MID = SEG.TEXTO ## Devolve um número específico de caracteres de uma cadeia de texto, a partir da posição especificada -MIDB = SEG.TEXTOB ## Devolve um número específico de caracteres de uma cadeia de texto, a partir da posição especificada -PHONETIC = FONÉTICA ## Retira os caracteres fonéticos (furigana) de uma cadeia de texto -PROPER = INICIAL.MAIÚSCULA ## Coloca em maiúsculas a primeira letra de cada palavra de um valor de texto -REPLACE = SUBSTITUIR ## Substitui caracteres no texto -REPLACEB = SUBSTITUIRB ## Substitui caracteres no texto -REPT = REPETIR ## Repete texto um determinado número de vezes -RIGHT = DIREITA ## Devolve os caracteres mais à direita de um valor de texto -RIGHTB = DIREITAB ## Devolve os caracteres mais à direita de um valor de texto -SEARCH = PROCURAR ## Localiza um valor de texto dentro de outro (não sensível a maiúsculas e minúsculas) -SEARCHB = PROCURARB ## Localiza um valor de texto dentro de outro (não sensível a maiúsculas e minúsculas) -SUBSTITUTE = SUBST ## Substitui texto novo por texto antigo numa cadeia de texto -T = T ## Converte os respectivos argumentos em texto -TEXT = TEXTO ## Formata um número e converte-o em texto -TRIM = COMPACTAR ## Remove espaços do texto -UPPER = MAIÚSCULAS ## Converte texto em maiúsculas -VALUE = VALOR ## Converte um argumento de texto num número diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config deleted file mode 100644 index 56e45bf..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = р - - -## -## Excel Error Codes (For future use) -## -NULL = #ПУСТО! -DIV0 = #ДЕЛ/0! -VALUE = #ЗНАЧ! -REF = #ССЫЛ! -NAME = #ИМЯ? -NUM = #ЧИСЛО! -NA = #Н/Д diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions deleted file mode 100644 index 5ff6d4f..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from information provided by web-junior (http://www.web-junior.net/) -## -## - - -## -## Add-in and Automation functions Функции надстроек и автоматизации -## -GETPIVOTDATA = ПОЛУЧИТЬ.ДАННЫЕ.СВОДНОЙ.ТАБЛИЦЫ ## Возвращает данные, хранящиеся в отчете сводной таблицы. - - -## -## Cube functions Функции Куб -## -CUBEKPIMEMBER = КУБЭЛЕМЕНТКИП ## Возвращает свойство ключевого индикатора производительности «(КИП)» и отображает имя «КИП» в ячейке. «КИП» представляет собой количественную величину, такую как ежемесячная валовая прибыль или ежеквартальная текучесть кадров, используемой для контроля эффективности работы организации. -CUBEMEMBER = КУБЭЛЕМЕНТ ## Возвращает элемент или кортеж из куба. Используется для проверки существования элемента или кортежа в кубе. -CUBEMEMBERPROPERTY = КУБСВОЙСТВОЭЛЕМЕНТА ## Возвращает значение свойства элемента из куба. Используется для проверки существования имени элемента в кубе и возвращает указанное свойство для этого элемента. -CUBERANKEDMEMBER = КУБПОРЭЛЕМЕНТ ## Возвращает n-ый или ранжированный элемент в множество. Используется для возвращения одного или нескольких элементов в множество, например, лучшего продавца или 10 лучших студентов. -CUBESET = КУБМНОЖ ## Определяет вычислительное множество элементов или кортежей, отправляя на сервер выражение, которое создает множество, а затем возвращает его в Microsoft Office Excel. -CUBESETCOUNT = КУБЧИСЛОЭЛМНОЖ ## Возвращает число элементов множества. -CUBEVALUE = КУБЗНАЧЕНИЕ ## Возвращает обобщенное значение из куба. - - -## -## Database functions Функции для работы с базами данных -## -DAVERAGE = ДСРЗНАЧ ## Возвращает среднее значение выбранных записей базы данных. -DCOUNT = БСЧЁТ ## Подсчитывает количество числовых ячеек в базе данных. -DCOUNTA = БСЧЁТА ## Подсчитывает количество непустых ячеек в базе данных. -DGET = БИЗВЛЕЧЬ ## Извлекает из базы данных одну запись, удовлетворяющую заданному условию. -DMAX = ДМАКС ## Возвращает максимальное значение среди выделенных записей базы данных. -DMIN = ДМИН ## Возвращает минимальное значение среди выделенных записей базы данных. -DPRODUCT = БДПРОИЗВЕД ## Перемножает значения определенного поля в записях базы данных, удовлетворяющих условию. -DSTDEV = ДСТАНДОТКЛ ## Оценивает стандартное отклонение по выборке для выделенных записей базы данных. -DSTDEVP = ДСТАНДОТКЛП ## Вычисляет стандартное отклонение по генеральной совокупности для выделенных записей базы данных -DSUM = БДСУММ ## Суммирует числа в поле для записей базы данных, удовлетворяющих условию. -DVAR = БДДИСП ## Оценивает дисперсию по выборке из выделенных записей базы данных -DVARP = БДДИСПП ## Вычисляет дисперсию по генеральной совокупности для выделенных записей базы данных - - -## -## Date and time functions Функции даты и времени -## -DATE = ДАТА ## Возвращает заданную дату в числовом формате. -DATEVALUE = ДАТАЗНАЧ ## Преобразует дату из текстового формата в числовой формат. -DAY = ДЕНЬ ## Преобразует дату в числовом формате в день месяца. -DAYS360 = ДНЕЙ360 ## Вычисляет количество дней между двумя датами на основе 360-дневного года. -EDATE = ДАТАМЕС ## Возвращает дату в числовом формате, отстоящую на заданное число месяцев вперед или назад от начальной даты. -EOMONTH = КОНМЕСЯЦА ## Возвращает дату в числовом формате для последнего дня месяца, отстоящего вперед или назад на заданное число месяцев. -HOUR = ЧАС ## Преобразует дату в числовом формате в часы. -MINUTE = МИНУТЫ ## Преобразует дату в числовом формате в минуты. -MONTH = МЕСЯЦ ## Преобразует дату в числовом формате в месяцы. -NETWORKDAYS = ЧИСТРАБДНИ ## Возвращает количество рабочих дней между двумя датами. -NOW = ТДАТА ## Возвращает текущую дату и время в числовом формате. -SECOND = СЕКУНДЫ ## Преобразует дату в числовом формате в секунды. -TIME = ВРЕМЯ ## Возвращает заданное время в числовом формате. -TIMEVALUE = ВРЕМЗНАЧ ## Преобразует время из текстового формата в числовой формат. -TODAY = СЕГОДНЯ ## Возвращает текущую дату в числовом формате. -WEEKDAY = ДЕНЬНЕД ## Преобразует дату в числовом формате в день недели. -WEEKNUM = НОМНЕДЕЛИ ## Преобразует числовое представление в число, которое указывает, на какую неделю года приходится указанная дата. -WORKDAY = РАБДЕНЬ ## Возвращает дату в числовом формате, отстоящую вперед или назад на заданное количество рабочих дней. -YEAR = ГОД ## Преобразует дату в числовом формате в год. -YEARFRAC = ДОЛЯГОДА ## Возвращает долю года, которую составляет количество дней между начальной и конечной датами. - - -## -## Engineering functions Инженерные функции -## -BESSELI = БЕССЕЛЬ.I ## Возвращает модифицированную функцию Бесселя In(x). -BESSELJ = БЕССЕЛЬ.J ## Возвращает функцию Бесселя Jn(x). -BESSELK = БЕССЕЛЬ.K ## Возвращает модифицированную функцию Бесселя Kn(x). -BESSELY = БЕССЕЛЬ.Y ## Возвращает функцию Бесселя Yn(x). -BIN2DEC = ДВ.В.ДЕС ## Преобразует двоичное число в десятичное. -BIN2HEX = ДВ.В.ШЕСТН ## Преобразует двоичное число в шестнадцатеричное. -BIN2OCT = ДВ.В.ВОСЬМ ## Преобразует двоичное число в восьмеричное. -COMPLEX = КОМПЛЕКСН ## Преобразует коэффициенты при вещественной и мнимой частях комплексного числа в комплексное число. -CONVERT = ПРЕОБР ## Преобразует число из одной системы единиц измерения в другую. -DEC2BIN = ДЕС.В.ДВ ## Преобразует десятичное число в двоичное. -DEC2HEX = ДЕС.В.ШЕСТН ## Преобразует десятичное число в шестнадцатеричное. -DEC2OCT = ДЕС.В.ВОСЬМ ## Преобразует десятичное число в восьмеричное. -DELTA = ДЕЛЬТА ## Проверяет равенство двух значений. -ERF = ФОШ ## Возвращает функцию ошибки. -ERFC = ДФОШ ## Возвращает дополнительную функцию ошибки. -GESTEP = ПОРОГ ## Проверяет, не превышает ли данное число порогового значения. -HEX2BIN = ШЕСТН.В.ДВ ## Преобразует шестнадцатеричное число в двоичное. -HEX2DEC = ШЕСТН.В.ДЕС ## Преобразует шестнадцатеричное число в десятичное. -HEX2OCT = ШЕСТН.В.ВОСЬМ ## Преобразует шестнадцатеричное число в восьмеричное. -IMABS = МНИМ.ABS ## Возвращает абсолютную величину (модуль) комплексного числа. -IMAGINARY = МНИМ.ЧАСТЬ ## Возвращает коэффициент при мнимой части комплексного числа. -IMARGUMENT = МНИМ.АРГУМЕНТ ## Возвращает значение аргумента комплексного числа (тета) — угол, выраженный в радианах. -IMCONJUGATE = МНИМ.СОПРЯЖ ## Возвращает комплексно-сопряженное комплексное число. -IMCOS = МНИМ.COS ## Возвращает косинус комплексного числа. -IMDIV = МНИМ.ДЕЛ ## Возвращает частное от деления двух комплексных чисел. -IMEXP = МНИМ.EXP ## Возвращает экспоненту комплексного числа. -IMLN = МНИМ.LN ## Возвращает натуральный логарифм комплексного числа. -IMLOG10 = МНИМ.LOG10 ## Возвращает обычный (десятичный) логарифм комплексного числа. -IMLOG2 = МНИМ.LOG2 ## Возвращает двоичный логарифм комплексного числа. -IMPOWER = МНИМ.СТЕПЕНЬ ## Возвращает комплексное число, возведенное в целую степень. -IMPRODUCT = МНИМ.ПРОИЗВЕД ## Возвращает произведение от 2 до 29 комплексных чисел. -IMREAL = МНИМ.ВЕЩ ## Возвращает коэффициент при вещественной части комплексного числа. -IMSIN = МНИМ.SIN ## Возвращает синус комплексного числа. -IMSQRT = МНИМ.КОРЕНЬ ## Возвращает значение квадратного корня из комплексного числа. -IMSUB = МНИМ.РАЗН ## Возвращает разность двух комплексных чисел. -IMSUM = МНИМ.СУММ ## Возвращает сумму комплексных чисел. -OCT2BIN = ВОСЬМ.В.ДВ ## Преобразует восьмеричное число в двоичное. -OCT2DEC = ВОСЬМ.В.ДЕС ## Преобразует восьмеричное число в десятичное. -OCT2HEX = ВОСЬМ.В.ШЕСТН ## Преобразует восьмеричное число в шестнадцатеричное. - - -## -## Financial functions Финансовые функции -## -ACCRINT = НАКОПДОХОД ## Возвращает накопленный процент по ценным бумагам с периодической выплатой процентов. -ACCRINTM = НАКОПДОХОДПОГАШ ## Возвращает накопленный процент по ценным бумагам, проценты по которым выплачиваются в срок погашения. -AMORDEGRC = АМОРУМ ## Возвращает величину амортизации для каждого периода, используя коэффициент амортизации. -AMORLINC = АМОРУВ ## Возвращает величину амортизации для каждого периода. -COUPDAYBS = ДНЕЙКУПОНДО ## Возвращает количество дней от начала действия купона до даты соглашения. -COUPDAYS = ДНЕЙКУПОН ## Возвращает число дней в периоде купона, содержащем дату соглашения. -COUPDAYSNC = ДНЕЙКУПОНПОСЛЕ ## Возвращает число дней от даты соглашения до срока следующего купона. -COUPNCD = ДАТАКУПОНПОСЛЕ ## Возвращает следующую дату купона после даты соглашения. -COUPNUM = ЧИСЛКУПОН ## Возвращает количество купонов, которые могут быть оплачены между датой соглашения и сроком вступления в силу. -COUPPCD = ДАТАКУПОНДО ## Возвращает предыдущую дату купона перед датой соглашения. -CUMIPMT = ОБЩПЛАТ ## Возвращает общую выплату, произведенную между двумя периодическими выплатами. -CUMPRINC = ОБЩДОХОД ## Возвращает общую выплату по займу между двумя периодами. -DB = ФУО ## Возвращает величину амортизации актива для заданного периода, рассчитанную методом фиксированного уменьшения остатка. -DDB = ДДОБ ## Возвращает величину амортизации актива за данный период, используя метод двойного уменьшения остатка или иной явно указанный метод. -DISC = СКИДКА ## Возвращает норму скидки для ценных бумаг. -DOLLARDE = РУБЛЬ.ДЕС ## Преобразует цену в рублях, выраженную в виде дроби, в цену в рублях, выраженную десятичным числом. -DOLLARFR = РУБЛЬ.ДРОБЬ ## Преобразует цену в рублях, выраженную десятичным числом, в цену в рублях, выраженную в виде дроби. -DURATION = ДЛИТ ## Возвращает ежегодную продолжительность действия ценных бумаг с периодическими выплатами по процентам. -EFFECT = ЭФФЕКТ ## Возвращает действующие ежегодные процентные ставки. -FV = БС ## Возвращает будущую стоимость инвестиции. -FVSCHEDULE = БЗРАСПИС ## Возвращает будущую стоимость первоначальной основной суммы после начисления ряда сложных процентов. -INTRATE = ИНОРМА ## Возвращает процентную ставку для полностью инвестированных ценных бумаг. -IPMT = ПРПЛТ ## Возвращает величину выплаты прибыли на вложения за данный период. -IRR = ВСД ## Возвращает внутреннюю ставку доходности для ряда потоков денежных средств. -ISPMT = ПРОЦПЛАТ ## Вычисляет выплаты за указанный период инвестиции. -MDURATION = МДЛИТ ## Возвращает модифицированную длительность Маколея для ценных бумаг с предполагаемой номинальной стоимостью 100 рублей. -MIRR = МВСД ## Возвращает внутреннюю ставку доходности, при которой положительные и отрицательные денежные потоки имеют разные значения ставки. -NOMINAL = НОМИНАЛ ## Возвращает номинальную годовую процентную ставку. -NPER = КПЕР ## Возвращает общее количество периодов выплаты для данного вклада. -NPV = ЧПС ## Возвращает чистую приведенную стоимость инвестиции, основанной на серии периодических денежных потоков и ставке дисконтирования. -ODDFPRICE = ЦЕНАПЕРВНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным первым периодом. -ODDFYIELD = ДОХОДПЕРВНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным первым периодом. -ODDLPRICE = ЦЕНАПОСЛНЕРЕГ ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг с нерегулярным последним периодом. -ODDLYIELD = ДОХОДПОСЛНЕРЕГ ## Возвращает доход по ценным бумагам с нерегулярным последним периодом. -PMT = ПЛТ ## Возвращает величину выплаты за один период аннуитета. -PPMT = ОСПЛТ ## Возвращает величину выплат в погашение основной суммы по инвестиции за заданный период. -PRICE = ЦЕНА ## Возвращает цену за 100 рублей нарицательной стоимости ценных бумаг, по которым производится периодическая выплата процентов. -PRICEDISC = ЦЕНАСКИДКА ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, на которые сделана скидка. -PRICEMAT = ЦЕНАПОГАШ ## Возвращает цену за 100 рублей номинальной стоимости ценных бумаг, проценты по которым выплачиваются в срок погашения. -PV = ПС ## Возвращает приведенную (к текущему моменту) стоимость инвестиции. -RATE = СТАВКА ## Возвращает процентную ставку по аннуитету за один период. -RECEIVED = ПОЛУЧЕНО ## Возвращает сумму, полученную к сроку погашения полностью обеспеченных ценных бумаг. -SLN = АПЛ ## Возвращает величину линейной амортизации актива за один период. -SYD = АСЧ ## Возвращает величину амортизации актива за данный период, рассчитанную методом суммы годовых чисел. -TBILLEQ = РАВНОКЧЕК ## Возвращает эквивалентный облигации доход по казначейскому чеку. -TBILLPRICE = ЦЕНАКЧЕК ## Возвращает цену за 100 рублей нарицательной стоимости для казначейского чека. -TBILLYIELD = ДОХОДКЧЕК ## Возвращает доход по казначейскому чеку. -VDB = ПУО ## Возвращает величину амортизации актива для указанного или частичного периода при использовании метода сокращающегося баланса. -XIRR = ЧИСТВНДОХ ## Возвращает внутреннюю ставку доходности для графика денежных потоков, которые не обязательно носят периодический характер. -XNPV = ЧИСТНЗ ## Возвращает чистую приведенную стоимость для денежных потоков, которые не обязательно являются периодическими. -YIELD = ДОХОД ## Возвращает доход от ценных бумаг, по которым производятся периодические выплаты процентов. -YIELDDISC = ДОХОДСКИДКА ## Возвращает годовой доход по ценным бумагам, на которые сделана скидка (пример — казначейские чеки). -YIELDMAT = ДОХОДПОГАШ ## Возвращает годовой доход от ценных бумаг, проценты по которым выплачиваются в срок погашения. - - -## -## Information functions Информационные функции -## -CELL = ЯЧЕЙКА ## Возвращает информацию о формате, расположении или содержимом ячейки. -ERROR.TYPE = ТИП.ОШИБКИ ## Возвращает числовой код, соответствующий типу ошибки. -INFO = ИНФОРМ ## Возвращает информацию о текущей операционной среде. -ISBLANK = ЕПУСТО ## Возвращает значение ИСТИНА, если аргумент является ссылкой на пустую ячейку. -ISERR = ЕОШ ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки, кроме #Н/Д. -ISERROR = ЕОШИБКА ## Возвращает значение ИСТИНА, если аргумент ссылается на любое значение ошибки. -ISEVEN = ЕЧЁТН ## Возвращает значение ИСТИНА, если значение аргумента является четным числом. -ISLOGICAL = ЕЛОГИЧ ## Возвращает значение ИСТИНА, если аргумент ссылается на логическое значение. -ISNA = ЕНД ## Возвращает значение ИСТИНА, если аргумент ссылается на значение ошибки #Н/Д. -ISNONTEXT = ЕНЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента не является текстом. -ISNUMBER = ЕЧИСЛО ## Возвращает значение ИСТИНА, если аргумент ссылается на число. -ISODD = ЕНЕЧЁТ ## Возвращает значение ИСТИНА, если значение аргумента является нечетным числом. -ISREF = ЕССЫЛКА ## Возвращает значение ИСТИНА, если значение аргумента является ссылкой. -ISTEXT = ЕТЕКСТ ## Возвращает значение ИСТИНА, если значение аргумента является текстом. -N = Ч ## Возвращает значение, преобразованное в число. -NA = НД ## Возвращает значение ошибки #Н/Д. -TYPE = ТИП ## Возвращает число, обозначающее тип данных значения. - - -## -## Logical functions Логические функции -## -AND = И ## Renvoie VRAI si tous ses arguments sont VRAI. -FALSE = ЛОЖЬ ## Возвращает логическое значение ЛОЖЬ. -IF = ЕСЛИ ## Выполняет проверку условия. -IFERROR = ЕСЛИОШИБКА ## Возвращает введённое значение, если вычисление по формуле вызывает ошибку; в противном случае функция возвращает результат вычисления. -NOT = НЕ ## Меняет логическое значение своего аргумента на противоположное. -OR = ИЛИ ## Возвращает значение ИСТИНА, если хотя бы один аргумент имеет значение ИСТИНА. -TRUE = ИСТИНА ## Возвращает логическое значение ИСТИНА. - - -## -## Lookup and reference functions Функции ссылки и поиска -## -ADDRESS = АДРЕС ## Возвращает ссылку на отдельную ячейку листа в виде текста. -AREAS = ОБЛАСТИ ## Возвращает количество областей в ссылке. -CHOOSE = ВЫБОР ## Выбирает значение из списка значений по индексу. -COLUMN = СТОЛБЕЦ ## Возвращает номер столбца, на который указывает ссылка. -COLUMNS = ЧИСЛСТОЛБ ## Возвращает количество столбцов в ссылке. -HLOOKUP = ГПР ## Ищет в первой строке массива и возвращает значение отмеченной ячейки -HYPERLINK = ГИПЕРССЫЛКА ## Создает ссылку, открывающую документ, который находится на сервере сети, в интрасети или в Интернете. -INDEX = ИНДЕКС ## Использует индекс для выбора значения из ссылки или массива. -INDIRECT = ДВССЫЛ ## Возвращает ссылку, заданную текстовым значением. -LOOKUP = ПРОСМОТР ## Ищет значения в векторе или массиве. -MATCH = ПОИСКПОЗ ## Ищет значения в ссылке или массиве. -OFFSET = СМЕЩ ## Возвращает смещение ссылки относительно заданной ссылки. -ROW = СТРОКА ## Возвращает номер строки, определяемой ссылкой. -ROWS = ЧСТРОК ## Возвращает количество строк в ссылке. -RTD = ДРВ ## Извлекает данные реального времени из программ, поддерживающих автоматизацию COM (Программирование объектов. Стандартное средство для работы с объектами некоторого приложения из другого приложения или средства разработки. Программирование объектов (ранее называемое программированием OLE) является функцией модели COM (Component Object Model, модель компонентных объектов).). -TRANSPOSE = ТРАНСП ## Возвращает транспонированный массив. -VLOOKUP = ВПР ## Ищет значение в первом столбце массива и возвращает значение из ячейки в найденной строке и указанном столбце. - - -## -## Math and trigonometry functions Математические и тригонометрические функции -## -ABS = ABS ## Возвращает модуль (абсолютную величину) числа. -ACOS = ACOS ## Возвращает арккосинус числа. -ACOSH = ACOSH ## Возвращает гиперболический арккосинус числа. -ASIN = ASIN ## Возвращает арксинус числа. -ASINH = ASINH ## Возвращает гиперболический арксинус числа. -ATAN = ATAN ## Возвращает арктангенс числа. -ATAN2 = ATAN2 ## Возвращает арктангенс для заданных координат x и y. -ATANH = ATANH ## Возвращает гиперболический арктангенс числа. -CEILING = ОКРВВЕРХ ## Округляет число до ближайшего целого или до ближайшего кратного указанному значению. -COMBIN = ЧИСЛКОМБ ## Возвращает количество комбинаций для заданного числа объектов. -COS = COS ## Возвращает косинус числа. -COSH = COSH ## Возвращает гиперболический косинус числа. -DEGREES = ГРАДУСЫ ## Преобразует радианы в градусы. -EVEN = ЧЁТН ## Округляет число до ближайшего четного целого. -EXP = EXP ## Возвращает число e, возведенное в указанную степень. -FACT = ФАКТР ## Возвращает факториал числа. -FACTDOUBLE = ДВФАКТР ## Возвращает двойной факториал числа. -FLOOR = ОКРВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. -GCD = НОД ## Возвращает наибольший общий делитель. -INT = ЦЕЛОЕ ## Округляет число до ближайшего меньшего целого. -LCM = НОК ## Возвращает наименьшее общее кратное. -LN = LN ## Возвращает натуральный логарифм числа. -LOG = LOG ## Возвращает логарифм числа по заданному основанию. -LOG10 = LOG10 ## Возвращает десятичный логарифм числа. -MDETERM = МОПРЕД ## Возвращает определитель матрицы массива. -MINVERSE = МОБР ## Возвращает обратную матрицу массива. -MMULT = МУМНОЖ ## Возвращает произведение матриц двух массивов. -MOD = ОСТАТ ## Возвращает остаток от деления. -MROUND = ОКРУГЛТ ## Возвращает число, округленное с требуемой точностью. -MULTINOMIAL = МУЛЬТИНОМ ## Возвращает мультиномиальный коэффициент множества чисел. -ODD = НЕЧЁТ ## Округляет число до ближайшего нечетного целого. -PI = ПИ ## Возвращает число пи. -POWER = СТЕПЕНЬ ## Возвращает результат возведения числа в степень. -PRODUCT = ПРОИЗВЕД ## Возвращает произведение аргументов. -QUOTIENT = ЧАСТНОЕ ## Возвращает целую часть частного при делении. -RADIANS = РАДИАНЫ ## Преобразует градусы в радианы. -RAND = СЛЧИС ## Возвращает случайное число в интервале от 0 до 1. -RANDBETWEEN = СЛУЧМЕЖДУ ## Возвращает случайное число в интервале между двумя заданными числами. -ROMAN = РИМСКОЕ ## Преобразует арабские цифры в римские в виде текста. -ROUND = ОКРУГЛ ## Округляет число до указанного количества десятичных разрядов. -ROUNDDOWN = ОКРУГЛВНИЗ ## Округляет число до ближайшего меньшего по модулю значения. -ROUNDUP = ОКРУГЛВВЕРХ ## Округляет число до ближайшего большего по модулю значения. -SERIESSUM = РЯД.СУММ ## Возвращает сумму степенного ряда, вычисленную по формуле. -SIGN = ЗНАК ## Возвращает знак числа. -SIN = SIN ## Возвращает синус заданного угла. -SINH = SINH ## Возвращает гиперболический синус числа. -SQRT = КОРЕНЬ ## Возвращает положительное значение квадратного корня. -SQRTPI = КОРЕНЬПИ ## Возвращает квадратный корень из значения выражения (число * ПИ). -SUBTOTAL = ПРОМЕЖУТОЧНЫЕ.ИТОГИ ## Возвращает промежуточный итог в списке или базе данных. -SUM = СУММ ## Суммирует аргументы. -SUMIF = СУММЕСЛИ ## Суммирует ячейки, удовлетворяющие заданному условию. -SUMIFS = СУММЕСЛИМН ## Суммирует диапазон ячеек, удовлетворяющих нескольким условиям. -SUMPRODUCT = СУММПРОИЗВ ## Возвращает сумму произведений соответствующих элементов массивов. -SUMSQ = СУММКВ ## Возвращает сумму квадратов аргументов. -SUMX2MY2 = СУММРАЗНКВ ## Возвращает сумму разностей квадратов соответствующих значений в двух массивах. -SUMX2PY2 = СУММСУММКВ ## Возвращает сумму сумм квадратов соответствующих элементов двух массивов. -SUMXMY2 = СУММКВРАЗН ## Возвращает сумму квадратов разностей соответствующих значений в двух массивах. -TAN = TAN ## Возвращает тангенс числа. -TANH = TANH ## Возвращает гиперболический тангенс числа. -TRUNC = ОТБР ## Отбрасывает дробную часть числа. - - -## -## Statistical functions Статистические функции -## -AVEDEV = СРОТКЛ ## Возвращает среднее арифметическое абсолютных значений отклонений точек данных от среднего. -AVERAGE = СРЗНАЧ ## Возвращает среднее арифметическое аргументов. -AVERAGEA = СРЗНАЧА ## Возвращает среднее арифметическое аргументов, включая числа, текст и логические значения. -AVERAGEIF = СРЗНАЧЕСЛИ ## Возвращает среднее значение (среднее арифметическое) всех ячеек в диапазоне, которые удовлетворяют данному условию. -AVERAGEIFS = СРЗНАЧЕСЛИМН ## Возвращает среднее значение (среднее арифметическое) всех ячеек, которые удовлетворяют нескольким условиям. -BETADIST = БЕТАРАСП ## Возвращает интегральную функцию бета-распределения. -BETAINV = БЕТАОБР ## Возвращает обратную интегральную функцию указанного бета-распределения. -BINOMDIST = БИНОМРАСП ## Возвращает отдельное значение биномиального распределения. -CHIDIST = ХИ2РАСП ## Возвращает одностороннюю вероятность распределения хи-квадрат. -CHIINV = ХИ2ОБР ## Возвращает обратное значение односторонней вероятности распределения хи-квадрат. -CHITEST = ХИ2ТЕСТ ## Возвращает тест на независимость. -CONFIDENCE = ДОВЕРИТ ## Возвращает доверительный интервал для среднего значения по генеральной совокупности. -CORREL = КОРРЕЛ ## Возвращает коэффициент корреляции между двумя множествами данных. -COUNT = СЧЁТ ## Подсчитывает количество чисел в списке аргументов. -COUNTA = СЧЁТЗ ## Подсчитывает количество значений в списке аргументов. -COUNTBLANK = СЧИТАТЬПУСТОТЫ ## Подсчитывает количество пустых ячеек в диапазоне -COUNTIF = СЧЁТЕСЛИ ## Подсчитывает количество ячеек в диапазоне, удовлетворяющих заданному условию -COUNTIFS = СЧЁТЕСЛИМН ## Подсчитывает количество ячеек внутри диапазона, удовлетворяющих нескольким условиям. -COVAR = КОВАР ## Возвращает ковариацию, среднее произведений парных отклонений -CRITBINOM = КРИТБИНОМ ## Возвращает наименьшее значение, для которого интегральное биномиальное распределение меньше или равно заданному критерию. -DEVSQ = КВАДРОТКЛ ## Возвращает сумму квадратов отклонений. -EXPONDIST = ЭКСПРАСП ## Возвращает экспоненциальное распределение. -FDIST = FРАСП ## Возвращает F-распределение вероятности. -FINV = FРАСПОБР ## Возвращает обратное значение для F-распределения вероятности. -FISHER = ФИШЕР ## Возвращает преобразование Фишера. -FISHERINV = ФИШЕРОБР ## Возвращает обратное преобразование Фишера. -FORECAST = ПРЕДСКАЗ ## Возвращает значение линейного тренда. -FREQUENCY = ЧАСТОТА ## Возвращает распределение частот в виде вертикального массива. -FTEST = ФТЕСТ ## Возвращает результат F-теста. -GAMMADIST = ГАММАРАСП ## Возвращает гамма-распределение. -GAMMAINV = ГАММАОБР ## Возвращает обратное гамма-распределение. -GAMMALN = ГАММАНЛОГ ## Возвращает натуральный логарифм гамма функции, Γ(x). -GEOMEAN = СРГЕОМ ## Возвращает среднее геометрическое. -GROWTH = РОСТ ## Возвращает значения в соответствии с экспоненциальным трендом. -HARMEAN = СРГАРМ ## Возвращает среднее гармоническое. -HYPGEOMDIST = ГИПЕРГЕОМЕТ ## Возвращает гипергеометрическое распределение. -INTERCEPT = ОТРЕЗОК ## Возвращает отрезок, отсекаемый на оси линией линейной регрессии. -KURT = ЭКСЦЕСС ## Возвращает эксцесс множества данных. -LARGE = НАИБОЛЬШИЙ ## Возвращает k-ое наибольшее значение в множестве данных. -LINEST = ЛИНЕЙН ## Возвращает параметры линейного тренда. -LOGEST = ЛГРФПРИБЛ ## Возвращает параметры экспоненциального тренда. -LOGINV = ЛОГНОРМОБР ## Возвращает обратное логарифмическое нормальное распределение. -LOGNORMDIST = ЛОГНОРМРАСП ## Возвращает интегральное логарифмическое нормальное распределение. -MAX = МАКС ## Возвращает наибольшее значение в списке аргументов. -MAXA = МАКСА ## Возвращает наибольшее значение в списке аргументов, включая числа, текст и логические значения. -MEDIAN = МЕДИАНА ## Возвращает медиану заданных чисел. -MIN = МИН ## Возвращает наименьшее значение в списке аргументов. -MINA = МИНА ## Возвращает наименьшее значение в списке аргументов, включая числа, текст и логические значения. -MODE = МОДА ## Возвращает значение моды множества данных. -NEGBINOMDIST = ОТРБИНОМРАСП ## Возвращает отрицательное биномиальное распределение. -NORMDIST = НОРМРАСП ## Возвращает нормальную функцию распределения. -NORMINV = НОРМОБР ## Возвращает обратное нормальное распределение. -NORMSDIST = НОРМСТРАСП ## Возвращает стандартное нормальное интегральное распределение. -NORMSINV = НОРМСТОБР ## Возвращает обратное значение стандартного нормального распределения. -PEARSON = ПИРСОН ## Возвращает коэффициент корреляции Пирсона. -PERCENTILE = ПЕРСЕНТИЛЬ ## Возвращает k-ую персентиль для значений диапазона. -PERCENTRANK = ПРОЦЕНТРАНГ ## Возвращает процентную норму значения в множестве данных. -PERMUT = ПЕРЕСТ ## Возвращает количество перестановок для заданного числа объектов. -POISSON = ПУАССОН ## Возвращает распределение Пуассона. -PROB = ВЕРОЯТНОСТЬ ## Возвращает вероятность того, что значение из диапазона находится внутри заданных пределов. -QUARTILE = КВАРТИЛЬ ## Возвращает квартиль множества данных. -RANK = РАНГ ## Возвращает ранг числа в списке чисел. -RSQ = КВПИРСОН ## Возвращает квадрат коэффициента корреляции Пирсона. -SKEW = СКОС ## Возвращает асимметрию распределения. -SLOPE = НАКЛОН ## Возвращает наклон линии линейной регрессии. -SMALL = НАИМЕНЬШИЙ ## Возвращает k-ое наименьшее значение в множестве данных. -STANDARDIZE = НОРМАЛИЗАЦИЯ ## Возвращает нормализованное значение. -STDEV = СТАНДОТКЛОН ## Оценивает стандартное отклонение по выборке. -STDEVA = СТАНДОТКЛОНА ## Оценивает стандартное отклонение по выборке, включая числа, текст и логические значения. -STDEVP = СТАНДОТКЛОНП ## Вычисляет стандартное отклонение по генеральной совокупности. -STDEVPA = СТАНДОТКЛОНПА ## Вычисляет стандартное отклонение по генеральной совокупности, включая числа, текст и логические значения. -STEYX = СТОШYX ## Возвращает стандартную ошибку предсказанных значений y для каждого значения x в регрессии. -TDIST = СТЬЮДРАСП ## Возвращает t-распределение Стьюдента. -TINV = СТЬЮДРАСПОБР ## Возвращает обратное t-распределение Стьюдента. -TREND = ТЕНДЕНЦИЯ ## Возвращает значения в соответствии с линейным трендом. -TRIMMEAN = УРЕЗСРЕДНЕЕ ## Возвращает среднее внутренности множества данных. -TTEST = ТТЕСТ ## Возвращает вероятность, соответствующую критерию Стьюдента. -VAR = ДИСП ## Оценивает дисперсию по выборке. -VARA = ДИСПА ## Оценивает дисперсию по выборке, включая числа, текст и логические значения. -VARP = ДИСПР ## Вычисляет дисперсию для генеральной совокупности. -VARPA = ДИСПРА ## Вычисляет дисперсию для генеральной совокупности, включая числа, текст и логические значения. -WEIBULL = ВЕЙБУЛЛ ## Возвращает распределение Вейбулла. -ZTEST = ZТЕСТ ## Возвращает двустороннее P-значение z-теста. - - -## -## Text functions Текстовые функции -## -ASC = ASC ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полноширинные (двухбайтовые) знаки в полуширинные (однобайтовые). -BAHTTEXT = БАТТЕКСТ ## Преобразует число в текст, используя денежный формат ß (БАТ). -CHAR = СИМВОЛ ## Возвращает знак с заданным кодом. -CLEAN = ПЕЧСИМВ ## Удаляет все непечатаемые знаки из текста. -CODE = КОДСИМВ ## Возвращает числовой код первого знака в текстовой строке. -CONCATENATE = СЦЕПИТЬ ## Объединяет несколько текстовых элементов в один. -DOLLAR = РУБЛЬ ## Преобразует число в текст, используя денежный формат. -EXACT = СОВПАД ## Проверяет идентичность двух текстовых значений. -FIND = НАЙТИ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). -FINDB = НАЙТИБ ## Ищет вхождения одного текстового значения в другом (с учетом регистра). -FIXED = ФИКСИРОВАННЫЙ ## Форматирует число и преобразует его в текст с заданным числом десятичных знаков. -JIS = JIS ## Для языков с двухбайтовыми наборами знаков (например, катакана) преобразует полуширинные (однобайтовые) знаки в текстовой строке в полноширинные (двухбайтовые). -LEFT = ЛЕВСИМВ ## Возвращает крайние слева знаки текстового значения. -LEFTB = ЛЕВБ ## Возвращает крайние слева знаки текстового значения. -LEN = ДЛСТР ## Возвращает количество знаков в текстовой строке. -LENB = ДЛИНБ ## Возвращает количество знаков в текстовой строке. -LOWER = СТРОЧН ## Преобразует все буквы текста в строчные. -MID = ПСТР ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. -MIDB = ПСТРБ ## Возвращает заданное число знаков из строки текста, начиная с указанной позиции. -PHONETIC = PHONETIC ## Извлекает фонетические (фуригана) знаки из текстовой строки. -PROPER = ПРОПНАЧ ## Преобразует первую букву в каждом слове текста в прописную. -REPLACE = ЗАМЕНИТЬ ## Заменяет знаки в тексте. -REPLACEB = ЗАМЕНИТЬБ ## Заменяет знаки в тексте. -REPT = ПОВТОР ## Повторяет текст заданное число раз. -RIGHT = ПРАВСИМВ ## Возвращает крайние справа знаки текстовой строки. -RIGHTB = ПРАВБ ## Возвращает крайние справа знаки текстовой строки. -SEARCH = ПОИСК ## Ищет вхождения одного текстового значения в другом (без учета регистра). -SEARCHB = ПОИСКБ ## Ищет вхождения одного текстового значения в другом (без учета регистра). -SUBSTITUTE = ПОДСТАВИТЬ ## Заменяет в текстовой строке старый текст новым. -T = Т ## Преобразует аргументы в текст. -TEXT = ТЕКСТ ## Форматирует число и преобразует его в текст. -TRIM = СЖПРОБЕЛЫ ## Удаляет из текста пробелы. -UPPER = ПРОПИСН ## Преобразует все буквы текста в прописные. -VALUE = ЗНАЧЕН ## Преобразует текстовый аргумент в число. diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config deleted file mode 100644 index 726f771..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = kr - - -## -## Excel Error Codes (For future use) -## -NULL = #Skärning! -DIV0 = #Division/0! -VALUE = #Värdefel! -REF = #Referens! -NAME = #Namn? -NUM = #Ogiltigt! -NA = #Saknas! diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/functions deleted file mode 100644 index 73b2deb..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/functions +++ /dev/null @@ -1,408 +0,0 @@ -## -## Add-in and Automation functions Tilläggs- och automatiseringsfunktioner -## -GETPIVOTDATA = HÄMTA.PIVOTDATA ## Returnerar data som lagrats i en pivottabellrapport - - -## -## Cube functions Kubfunktioner -## -CUBEKPIMEMBER = KUBKPIMEDLEM ## Returnerar namn, egenskap och mått för en KPI och visar namnet och egenskapen i cellen. En KPI, eller prestandaindikator, är ett kvantifierbart mått, t.ex. månatlig bruttovinst eller personalomsättning per kvartal, som används för att analysera ett företags resultat. -CUBEMEMBER = KUBMEDLEM ## Returnerar en medlem eller ett par i en kubhierarki. Används för att verifiera att medlemmen eller paret finns i kuben. -CUBEMEMBERPROPERTY = KUBMEDLEMSEGENSKAP ## Returnerar värdet för en medlemsegenskap i kuben. Används för att verifiera att ett medlemsnamn finns i kuben, samt för att returnera den angivna egenskapen för medlemmen. -CUBERANKEDMEMBER = KUBRANGORDNADMEDLEM ## Returnerar den n:te, eller rangordnade, medlemmen i en uppsättning. Används för att returnera ett eller flera element i en uppsättning, till exempelvis den bästa försäljaren eller de tio bästa eleverna. -CUBESET = KUBINSTÄLLNING ## Definierar en beräknad uppsättning medlemmar eller par genom att skicka ett bestämt uttryck till kuben på servern, som skapar uppsättningen och sedan returnerar den till Microsoft Office Excel. -CUBESETCOUNT = KUBINSTÄLLNINGANTAL ## Returnerar antalet objekt i en uppsättning. -CUBEVALUE = KUBVÄRDE ## Returnerar ett mängdvärde från en kub. - - -## -## Database functions Databasfunktioner -## -DAVERAGE = DMEDEL ## Returnerar medelvärdet av databasposterna -DCOUNT = DANTAL ## Räknar antalet celler som innehåller tal i en databas -DCOUNTA = DANTALV ## Räknar ifyllda celler i en databas -DGET = DHÄMTA ## Hämtar en enstaka post från en databas som uppfyller de angivna villkoren -DMAX = DMAX ## Returnerar det största värdet från databasposterna -DMIN = DMIN ## Returnerar det minsta värdet från databasposterna -DPRODUCT = DPRODUKT ## Multiplicerar värdena i ett visst fält i poster som uppfyller villkoret -DSTDEV = DSTDAV ## Uppskattar standardavvikelsen baserat på ett urval av databasposterna -DSTDEVP = DSTDAVP ## Beräknar standardavvikelsen utifrån hela populationen av valda databasposter -DSUM = DSUMMA ## Summerar talen i kolumnfält i databasposter som uppfyller villkoret -DVAR = DVARIANS ## Uppskattar variansen baserat på ett urval av databasposterna -DVARP = DVARIANSP ## Beräknar variansen utifrån hela populationen av valda databasposter - - -## -## Date and time functions Tid- och datumfunktioner -## -DATE = DATUM ## Returnerar ett serienummer för ett visst datum -DATEVALUE = DATUMVÄRDE ## Konverterar ett datum i textformat till ett serienummer -DAY = DAG ## Konverterar ett serienummer till dag i månaden -DAYS360 = DAGAR360 ## Beräknar antalet dagar mellan två datum baserat på ett 360-dagarsår -EDATE = EDATUM ## Returnerar serienumret för ett datum som infaller ett visst antal månader före eller efter startdatumet -EOMONTH = SLUTMÅNAD ## Returnerar serienumret för sista dagen i månaden ett visst antal månader tidigare eller senare -HOUR = TIMME ## Konverterar ett serienummer till en timme -MINUTE = MINUT ## Konverterar ett serienummer till en minut -MONTH = MÅNAD ## Konverterar ett serienummer till en månad -NETWORKDAYS = NETTOARBETSDAGAR ## Returnerar antalet hela arbetsdagar mellan två datum -NOW = NU ## Returnerar serienumret för dagens datum och aktuell tid -SECOND = SEKUND ## Konverterar ett serienummer till en sekund -TIME = KLOCKSLAG ## Returnerar serienumret för en viss tid -TIMEVALUE = TIDVÄRDE ## Konverterar en tid i textformat till ett serienummer -TODAY = IDAG ## Returnerar serienumret för dagens datum -WEEKDAY = VECKODAG ## Konverterar ett serienummer till en dag i veckan -WEEKNUM = VECKONR ## Konverterar ett serienummer till ett veckonummer -WORKDAY = ARBETSDAGAR ## Returnerar serienumret för ett datum ett visst antal arbetsdagar tidigare eller senare -YEAR = ÅR ## Konverterar ett serienummer till ett år -YEARFRAC = ÅRDEL ## Returnerar en del av ett år som representerar antalet hela dagar mellan start- och slutdatum - - -## -## Engineering functions Tekniska funktioner -## -BESSELI = BESSELI ## Returnerar den modifierade Bessel-funktionen In(x) -BESSELJ = BESSELJ ## Returnerar Bessel-funktionen Jn(x) -BESSELK = BESSELK ## Returnerar den modifierade Bessel-funktionen Kn(x) -BESSELY = BESSELY ## Returnerar Bessel-funktionen Yn(x) -BIN2DEC = BIN.TILL.DEC ## Omvandlar ett binärt tal till decimalt -BIN2HEX = BIN.TILL.HEX ## Omvandlar ett binärt tal till hexadecimalt -BIN2OCT = BIN.TILL.OKT ## Omvandlar ett binärt tal till oktalt -COMPLEX = KOMPLEX ## Omvandlar reella och imaginära koefficienter till ett komplext tal -CONVERT = KONVERTERA ## Omvandlar ett tal från ett måttsystem till ett annat -DEC2BIN = DEC.TILL.BIN ## Omvandlar ett decimalt tal till binärt -DEC2HEX = DEC.TILL.HEX ## Omvandlar ett decimalt tal till hexadecimalt -DEC2OCT = DEC.TILL.OKT ## Omvandlar ett decimalt tal till oktalt -DELTA = DELTA ## Testar om två värden är lika -ERF = FELF ## Returnerar felfunktionen -ERFC = FELFK ## Returnerar den komplementära felfunktionen -GESTEP = SLSTEG ## Testar om ett tal är större än ett tröskelvärde -HEX2BIN = HEX.TILL.BIN ## Omvandlar ett hexadecimalt tal till binärt -HEX2DEC = HEX.TILL.DEC ## Omvandlar ett hexadecimalt tal till decimalt -HEX2OCT = HEX.TILL.OKT ## Omvandlar ett hexadecimalt tal till oktalt -IMABS = IMABS ## Returnerar absolutvärdet (modulus) för ett komplext tal -IMAGINARY = IMAGINÄR ## Returnerar den imaginära koefficienten för ett komplext tal -IMARGUMENT = IMARGUMENT ## Returnerar det komplexa talets argument, en vinkel uttryckt i radianer -IMCONJUGATE = IMKONJUGAT ## Returnerar det komplexa talets konjugat -IMCOS = IMCOS ## Returnerar cosinus för ett komplext tal -IMDIV = IMDIV ## Returnerar kvoten för två komplexa tal -IMEXP = IMEUPPHÖJT ## Returnerar exponenten för ett komplext tal -IMLN = IMLN ## Returnerar den naturliga logaritmen för ett komplext tal -IMLOG10 = IMLOG10 ## Returnerar 10-logaritmen för ett komplext tal -IMLOG2 = IMLOG2 ## Returnerar 2-logaritmen för ett komplext tal -IMPOWER = IMUPPHÖJT ## Returnerar ett komplext tal upphöjt till en exponent -IMPRODUCT = IMPRODUKT ## Returnerar produkten av komplexa tal -IMREAL = IMREAL ## Returnerar den reella koefficienten för ett komplext tal -IMSIN = IMSIN ## Returnerar sinus för ett komplext tal -IMSQRT = IMROT ## Returnerar kvadratroten av ett komplext tal -IMSUB = IMDIFF ## Returnerar differensen mellan två komplexa tal -IMSUM = IMSUM ## Returnerar summan av komplexa tal -OCT2BIN = OKT.TILL.BIN ## Omvandlar ett oktalt tal till binärt -OCT2DEC = OKT.TILL.DEC ## Omvandlar ett oktalt tal till decimalt -OCT2HEX = OKT.TILL.HEX ## Omvandlar ett oktalt tal till hexadecimalt - - -## -## Financial functions Finansiella funktioner -## -ACCRINT = UPPLRÄNTA ## Returnerar den upplupna räntan för värdepapper med periodisk ränta -ACCRINTM = UPPLOBLRÄNTA ## Returnerar den upplupna räntan för ett värdepapper som ger avkastning på förfallodagen -AMORDEGRC = AMORDEGRC ## Returnerar avskrivningen för varje redovisningsperiod med hjälp av en avskrivningskoefficient -AMORLINC = AMORLINC ## Returnerar avskrivningen för varje redovisningsperiod -COUPDAYBS = KUPDAGBB ## Returnerar antal dagar från början av kupongperioden till likviddagen -COUPDAYS = KUPDAGARS ## Returnerar antalet dagar i kupongperioden som innehåller betalningsdatumet -COUPDAYSNC = KUPDAGNK ## Returnerar antalet dagar från betalningsdatumet till nästa kupongdatum -COUPNCD = KUPNKD ## Returnerar nästa kupongdatum efter likviddagen -COUPNUM = KUPANT ## Returnerar kuponger som förfaller till betalning mellan likviddagen och förfallodagen -COUPPCD = KUPFKD ## Returnerar föregående kupongdatum före likviddagen -CUMIPMT = KUMRÄNTA ## Returnerar den ackumulerade räntan som betalats mellan två perioder -CUMPRINC = KUMPRIS ## Returnerar det ackumulerade kapitalbeloppet som betalats på ett lån mellan två perioder -DB = DB ## Returnerar avskrivningen för en tillgång under en angiven tid enligt metoden för fast degressiv avskrivning -DDB = DEGAVSKR ## Returnerar en tillgångs värdeminskning under en viss period med hjälp av dubbel degressiv avskrivning eller någon annan metod som du anger -DISC = DISK ## Returnerar diskonteringsräntan för ett värdepapper -DOLLARDE = DECTAL ## Omvandlar ett pris uttryckt som ett bråk till ett decimaltal -DOLLARFR = BRÅK ## Omvandlar ett pris i kronor uttryckt som ett decimaltal till ett bråk -DURATION = LÖPTID ## Returnerar den årliga löptiden för en säkerhet med periodiska räntebetalningar -EFFECT = EFFRÄNTA ## Returnerar den årliga effektiva räntesatsen -FV = SLUTVÄRDE ## Returnerar det framtida värdet på en investering -FVSCHEDULE = FÖRRÄNTNING ## Returnerar det framtida värdet av ett begynnelsekapital beräknat på olika räntenivåer -INTRATE = ÅRSRÄNTA ## Returnerar räntesatsen för ett betalt värdepapper -IPMT = RBETALNING ## Returnerar räntedelen av en betalning för en given period -IRR = IR ## Returnerar internräntan för en serie betalningar -ISPMT = RALÅN ## Beräknar räntan som har betalats under en specifik betalningsperiod -MDURATION = MLÖPTID ## Returnerar den modifierade Macauley-löptiden för ett värdepapper med det antagna nominella värdet 100 kr -MIRR = MODIR ## Returnerar internräntan där positiva och negativa betalningar finansieras med olika räntor -NOMINAL = NOMRÄNTA ## Returnerar den årliga nominella räntesatsen -NPER = PERIODER ## Returnerar antalet perioder för en investering -NPV = NETNUVÄRDE ## Returnerar nuvärdet av en serie periodiska betalningar vid en given diskonteringsränta -ODDFPRICE = UDDAFPRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper med en udda första period -ODDFYIELD = UDDAFAVKASTNING ## Returnerar avkastningen för en säkerhet med en udda första period -ODDLPRICE = UDDASPRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper med en udda sista period -ODDLYIELD = UDDASAVKASTNING ## Returnerar avkastningen för en säkerhet med en udda sista period -PMT = BETALNING ## Returnerar den periodiska betalningen för en annuitet -PPMT = AMORT ## Returnerar amorteringsdelen av en annuitetsbetalning för en given period -PRICE = PRIS ## Returnerar priset per 100 kr nominellt värde för ett värdepapper som ger periodisk ränta -PRICEDISC = PRISDISK ## Returnerar priset per 100 kr nominellt värde för ett diskonterat värdepapper -PRICEMAT = PRISFÖRF ## Returnerar priset per 100 kr nominellt värde för ett värdepapper som ger ränta på förfallodagen -PV = PV ## Returnerar nuvärdet av en serie lika stora periodiska betalningar -RATE = RÄNTA ## Returnerar räntesatsen per period i en annuitet -RECEIVED = BELOPP ## Returnerar beloppet som utdelas på förfallodagen för ett betalat värdepapper -SLN = LINAVSKR ## Returnerar den linjära avskrivningen för en tillgång under en period -SYD = ÅRSAVSKR ## Returnerar den årliga avskrivningssumman för en tillgång under en angiven period -TBILLEQ = SSVXEKV ## Returnerar avkastningen motsvarande en obligation för en statsskuldväxel -TBILLPRICE = SSVXPRIS ## Returnerar priset per 100 kr nominellt värde för en statsskuldväxel -TBILLYIELD = SSVXRÄNTA ## Returnerar avkastningen för en statsskuldväxel -VDB = VDEGRAVSKR ## Returnerar avskrivningen för en tillgång under en angiven period (med degressiv avskrivning) -XIRR = XIRR ## Returnerar internräntan för en serie betalningar som inte nödvändigtvis är periodiska -XNPV = XNUVÄRDE ## Returnerar det nuvarande nettovärdet för en serie betalningar som inte nödvändigtvis är periodiska -YIELD = NOMAVK ## Returnerar avkastningen för ett värdepapper som ger periodisk ränta -YIELDDISC = NOMAVKDISK ## Returnerar den årliga avkastningen för diskonterade värdepapper, exempelvis en statsskuldväxel -YIELDMAT = NOMAVKFÖRF ## Returnerar den årliga avkastningen för ett värdepapper som ger ränta på förfallodagen - - -## -## Information functions Informationsfunktioner -## -CELL = CELL ## Returnerar information om formatering, plats och innehåll i en cell -ERROR.TYPE = FEL.TYP ## Returnerar ett tal som motsvarar ett felvärde -INFO = INFO ## Returnerar information om operativsystemet -ISBLANK = ÄRREF ## Returnerar SANT om värdet är tomt -ISERR = Ä ## Returnerar SANT om värdet är ett felvärde annat än #SAKNAS! -ISERROR = ÄRFEL ## Returnerar SANT om värdet är ett felvärde -ISEVEN = ÄRJÄMN ## Returnerar SANT om talet är jämnt -ISLOGICAL = ÄREJTEXT ## Returnerar SANT om värdet är ett logiskt värde -ISNA = ÄRLOGISK ## Returnerar SANT om värdet är felvärdet #SAKNAS! -ISNONTEXT = ÄRSAKNAD ## Returnerar SANT om värdet inte är text -ISNUMBER = ÄRTAL ## Returnerar SANT om värdet är ett tal -ISODD = ÄRUDDA ## Returnerar SANT om talet är udda -ISREF = ÄRTOM ## Returnerar SANT om värdet är en referens -ISTEXT = ÄRTEXT ## Returnerar SANT om värdet är text -N = N ## Returnerar ett värde omvandlat till ett tal -NA = SAKNAS ## Returnerar felvärdet #SAKNAS! -TYPE = VÄRDETYP ## Returnerar ett tal som anger värdets datatyp - - -## -## Logical functions Logiska funktioner -## -AND = OCH ## Returnerar SANT om alla argument är sanna -FALSE = FALSKT ## Returnerar det logiska värdet FALSKT -IF = OM ## Anger vilket logiskt test som ska utföras -IFERROR = OMFEL ## Returnerar ett värde som du anger om en formel utvärderar till ett fel; annars returneras resultatet av formeln -NOT = ICKE ## Inverterar logiken för argumenten -OR = ELLER ## Returnerar SANT om något argument är SANT -TRUE = SANT ## Returnerar det logiska värdet SANT - - -## -## Lookup and reference functions Sök- och referensfunktioner -## -ADDRESS = ADRESS ## Returnerar en referens som text till en enstaka cell i ett kalkylblad -AREAS = OMRÅDEN ## Returnerar antalet områden i en referens -CHOOSE = VÄLJ ## Väljer ett värde i en lista över värden -COLUMN = KOLUMN ## Returnerar kolumnnumret för en referens -COLUMNS = KOLUMNER ## Returnerar antalet kolumner i en referens -HLOOKUP = LETAKOLUMN ## Söker i den översta raden i en matris och returnerar värdet för angiven cell -HYPERLINK = HYPERLÄNK ## Skapar en genväg eller ett hopp till ett dokument i nätverket, i ett intranät eller på Internet -INDEX = INDEX ## Använder ett index för ett välja ett värde i en referens eller matris -INDIRECT = INDIREKT ## Returnerar en referens som anges av ett textvärde -LOOKUP = LETAUPP ## Letar upp värden i en vektor eller matris -MATCH = PASSA ## Letar upp värden i en referens eller matris -OFFSET = FÖRSKJUTNING ## Returnerar en referens förskjuten i förhållande till en given referens -ROW = RAD ## Returnerar radnumret för en referens -ROWS = RADER ## Returnerar antalet rader i en referens -RTD = RTD ## Hämtar realtidsdata från ett program som stöder COM-automation (Automation: Ett sätt att arbeta med ett programs objekt från ett annat program eller utvecklingsverktyg. Detta kallades tidigare för OLE Automation, och är en branschstandard och ingår i Component Object Model (COM).) -TRANSPOSE = TRANSPONERA ## Transponerar en matris -VLOOKUP = LETARAD ## Letar i den första kolumnen i en matris och flyttar över raden för att returnera värdet för en cell - - -## -## Math and trigonometry functions Matematiska och trigonometriska funktioner -## -ABS = ABS ## Returnerar absolutvärdet av ett tal -ACOS = ARCCOS ## Returnerar arcus cosinus för ett tal -ACOSH = ARCCOSH ## Returnerar inverterad hyperbolisk cosinus för ett tal -ASIN = ARCSIN ## Returnerar arcus cosinus för ett tal -ASINH = ARCSINH ## Returnerar hyperbolisk arcus sinus för ett tal -ATAN = ARCTAN ## Returnerar arcus tangens för ett tal -ATAN2 = ARCTAN2 ## Returnerar arcus tangens för en x- och en y- koordinat -ATANH = ARCTANH ## Returnerar hyperbolisk arcus tangens för ett tal -CEILING = RUNDA.UPP ## Avrundar ett tal till närmaste heltal eller närmaste signifikanta multipel -COMBIN = KOMBIN ## Returnerar antalet kombinationer för ett givet antal objekt -COS = COS ## Returnerar cosinus för ett tal -COSH = COSH ## Returnerar hyperboliskt cosinus för ett tal -DEGREES = GRADER ## Omvandlar radianer till grader -EVEN = JÄMN ## Avrundar ett tal uppåt till närmaste heltal -EXP = EXP ## Returnerar e upphöjt till ett givet tal -FACT = FAKULTET ## Returnerar fakulteten för ett tal -FACTDOUBLE = DUBBELFAKULTET ## Returnerar dubbelfakulteten för ett tal -FLOOR = RUNDA.NED ## Avrundar ett tal nedåt mot noll -GCD = SGD ## Returnerar den största gemensamma nämnaren -INT = HELTAL ## Avrundar ett tal nedåt till närmaste heltal -LCM = MGM ## Returnerar den minsta gemensamma multipeln -LN = LN ## Returnerar den naturliga logaritmen för ett tal -LOG = LOG ## Returnerar logaritmen för ett tal för en given bas -LOG10 = LOG10 ## Returnerar 10-logaritmen för ett tal -MDETERM = MDETERM ## Returnerar matrisen som är avgörandet av en matris -MINVERSE = MINVERT ## Returnerar matrisinversen av en matris -MMULT = MMULT ## Returnerar matrisprodukten av två matriser -MOD = REST ## Returnerar resten vid en division -MROUND = MAVRUNDA ## Returnerar ett tal avrundat till en given multipel -MULTINOMIAL = MULTINOMIAL ## Returnerar multinomialen för en uppsättning tal -ODD = UDDA ## Avrundar ett tal uppåt till närmaste udda heltal -PI = PI ## Returnerar värdet pi -POWER = UPPHÖJT.TILL ## Returnerar resultatet av ett tal upphöjt till en exponent -PRODUCT = PRODUKT ## Multiplicerar argumenten -QUOTIENT = KVOT ## Returnerar heltalsdelen av en division -RADIANS = RADIANER ## Omvandlar grader till radianer -RAND = SLUMP ## Returnerar ett slumptal mellan 0 och 1 -RANDBETWEEN = SLUMP.MELLAN ## Returnerar ett slumptal mellan de tal som du anger -ROMAN = ROMERSK ## Omvandlar vanliga (arabiska) siffror till romerska som text -ROUND = AVRUNDA ## Avrundar ett tal till ett angivet antal siffror -ROUNDDOWN = AVRUNDA.NEDÅT ## Avrundar ett tal nedåt mot noll -ROUNDUP = AVRUNDA.UPPÅT ## Avrundar ett tal uppåt, från noll -SERIESSUM = SERIESUMMA ## Returnerar summan av en potensserie baserat på formeln -SIGN = TECKEN ## Returnerar tecknet för ett tal -SIN = SIN ## Returnerar sinus för en given vinkel -SINH = SINH ## Returnerar hyperbolisk sinus för ett tal -SQRT = ROT ## Returnerar den positiva kvadratroten -SQRTPI = ROTPI ## Returnerar kvadratroten för (tal * pi) -SUBTOTAL = DELSUMMA ## Returnerar en delsumma i en lista eller databas -SUM = SUMMA ## Summerar argumenten -SUMIF = SUMMA.OM ## Summerar celler enligt ett angivet villkor -SUMIFS = SUMMA.OMF ## Lägger till cellerna i ett område som uppfyller flera kriterier -SUMPRODUCT = PRODUKTSUMMA ## Returnerar summan av produkterna i motsvarande matriskomponenter -SUMSQ = KVADRATSUMMA ## Returnerar summan av argumentens kvadrater -SUMX2MY2 = SUMMAX2MY2 ## Returnerar summan av differensen mellan kvadraterna för motsvarande värden i två matriser -SUMX2PY2 = SUMMAX2PY2 ## Returnerar summan av summan av kvadraterna av motsvarande värden i två matriser -SUMXMY2 = SUMMAXMY2 ## Returnerar summan av kvadraten av skillnaden mellan motsvarande värden i två matriser -TAN = TAN ## Returnerar tangens för ett tal -TANH = TANH ## Returnerar hyperbolisk tangens för ett tal -TRUNC = AVKORTA ## Avkortar ett tal till ett heltal - - -## -## Statistical functions Statistiska funktioner -## -AVEDEV = MEDELAVV ## Returnerar medelvärdet för datapunkters absoluta avvikelse från deras medelvärde -AVERAGE = MEDEL ## Returnerar medelvärdet av argumenten -AVERAGEA = AVERAGEA ## Returnerar medelvärdet av argumenten, inklusive tal, text och logiska värden -AVERAGEIF = MEDELOM ## Returnerar medelvärdet (aritmetiskt medelvärde) för alla celler i ett område som uppfyller ett givet kriterium -AVERAGEIFS = MEDELOMF ## Returnerar medelvärdet (det aritmetiska medelvärdet) för alla celler som uppfyller flera villkor. -BETADIST = BETAFÖRD ## Returnerar den kumulativa betafördelningsfunktionen -BETAINV = BETAINV ## Returnerar inversen till den kumulativa fördelningsfunktionen för en viss betafördelning -BINOMDIST = BINOMFÖRD ## Returnerar den individuella binomialfördelningen -CHIDIST = CHI2FÖRD ## Returnerar den ensidiga sannolikheten av c2-fördelningen -CHIINV = CHI2INV ## Returnerar inversen av chi2-fördelningen -CHITEST = CHI2TEST ## Returnerar oberoendetesten -CONFIDENCE = KONFIDENS ## Returnerar konfidensintervallet för en populations medelvärde -CORREL = KORREL ## Returnerar korrelationskoefficienten mellan två datamängder -COUNT = ANTAL ## Räknar hur många tal som finns bland argumenten -COUNTA = ANTALV ## Räknar hur många värden som finns bland argumenten -COUNTBLANK = ANTAL.TOMMA ## Räknar antalet tomma celler i ett område -COUNTIF = ANTAL.OM ## Räknar antalet celler i ett område som uppfyller angivna villkor. -COUNTIFS = ANTAL.OMF ## Räknar antalet celler i ett område som uppfyller flera villkor. -COVAR = KOVAR ## Returnerar kovariansen, d.v.s. medelvärdet av produkterna för parade avvikelser -CRITBINOM = KRITBINOM ## Returnerar det minsta värdet för vilket den kumulativa binomialfördelningen är mindre än eller lika med ett villkorsvärde -DEVSQ = KVADAVV ## Returnerar summan av kvadrater på avvikelser -EXPONDIST = EXPONFÖRD ## Returnerar exponentialfördelningen -FDIST = FFÖRD ## Returnerar F-sannolikhetsfördelningen -FINV = FINV ## Returnerar inversen till F-sannolikhetsfördelningen -FISHER = FISHER ## Returnerar Fisher-transformationen -FISHERINV = FISHERINV ## Returnerar inversen till Fisher-transformationen -FORECAST = PREDIKTION ## Returnerar ett värde längs en linjär trendlinje -FREQUENCY = FREKVENS ## Returnerar en frekvensfördelning som en lodrät matris -FTEST = FTEST ## Returnerar resultatet av en F-test -GAMMADIST = GAMMAFÖRD ## Returnerar gammafördelningen -GAMMAINV = GAMMAINV ## Returnerar inversen till den kumulativa gammafördelningen -GAMMALN = GAMMALN ## Returnerar den naturliga logaritmen för gammafunktionen, G(x) -GEOMEAN = GEOMEDEL ## Returnerar det geometriska medelvärdet -GROWTH = EXPTREND ## Returnerar värden längs en exponentiell trend -HARMEAN = HARMMEDEL ## Returnerar det harmoniska medelvärdet -HYPGEOMDIST = HYPGEOMFÖRD ## Returnerar den hypergeometriska fördelningen -INTERCEPT = SKÄRNINGSPUNKT ## Returnerar skärningspunkten för en linjär regressionslinje -KURT = TOPPIGHET ## Returnerar toppigheten av en mängd data -LARGE = STÖRSTA ## Returnerar det n:te största värdet i en mängd data -LINEST = REGR ## Returnerar parametrar till en linjär trendlinje -LOGEST = EXPREGR ## Returnerar parametrarna i en exponentiell trend -LOGINV = LOGINV ## Returnerar inversen till den lognormala fördelningen -LOGNORMDIST = LOGNORMFÖRD ## Returnerar den kumulativa lognormala fördelningen -MAX = MAX ## Returnerar det största värdet i en lista av argument -MAXA = MAXA ## Returnerar det största värdet i en lista av argument, inklusive tal, text och logiska värden -MEDIAN = MEDIAN ## Returnerar medianen för angivna tal -MIN = MIN ## Returnerar det minsta värdet i en lista med argument -MINA = MINA ## Returnerar det minsta värdet i en lista över argument, inklusive tal, text och logiska värden -MODE = TYPVÄRDE ## Returnerar det vanligaste värdet i en datamängd -NEGBINOMDIST = NEGBINOMFÖRD ## Returnerar den negativa binomialfördelningen -NORMDIST = NORMFÖRD ## Returnerar den kumulativa normalfördelningen -NORMINV = NORMINV ## Returnerar inversen till den kumulativa normalfördelningen -NORMSDIST = NORMSFÖRD ## Returnerar den kumulativa standardnormalfördelningen -NORMSINV = NORMSINV ## Returnerar inversen till den kumulativa standardnormalfördelningen -PEARSON = PEARSON ## Returnerar korrelationskoefficienten till Pearsons momentprodukt -PERCENTILE = PERCENTIL ## Returnerar den n:te percentilen av värden i ett område -PERCENTRANK = PROCENTRANG ## Returnerar procentrangen för ett värde i en datamängd -PERMUT = PERMUT ## Returnerar antal permutationer för ett givet antal objekt -POISSON = POISSON ## Returnerar Poisson-fördelningen -PROB = SANNOLIKHET ## Returnerar sannolikheten att värden i ett område ligger mellan två gränser -QUARTILE = KVARTIL ## Returnerar kvartilen av en mängd data -RANK = RANG ## Returnerar rangordningen för ett tal i en lista med tal -RSQ = RKV ## Returnerar kvadraten av Pearsons produktmomentkorrelationskoefficient -SKEW = SNEDHET ## Returnerar snedheten för en fördelning -SLOPE = LUTNING ## Returnerar lutningen på en linjär regressionslinje -SMALL = MINSTA ## Returnerar det n:te minsta värdet i en mängd data -STANDARDIZE = STANDARDISERA ## Returnerar ett normaliserat värde -STDEV = STDAV ## Uppskattar standardavvikelsen baserat på ett urval -STDEVA = STDEVA ## Uppskattar standardavvikelsen baserat på ett urval, inklusive tal, text och logiska värden -STDEVP = STDAVP ## Beräknar standardavvikelsen baserat på hela populationen -STDEVPA = STDEVPA ## Beräknar standardavvikelsen baserat på hela populationen, inklusive tal, text och logiska värden -STEYX = STDFELYX ## Returnerar standardfelet för ett förutspått y-värde för varje x-värde i regressionen -TDIST = TFÖRD ## Returnerar Students t-fördelning -TINV = TINV ## Returnerar inversen till Students t-fördelning -TREND = TREND ## Returnerar värden längs en linjär trend -TRIMMEAN = TRIMMEDEL ## Returnerar medelvärdet av mittpunkterna i en datamängd -TTEST = TTEST ## Returnerar sannolikheten beräknad ur Students t-test -VAR = VARIANS ## Uppskattar variansen baserat på ett urval -VARA = VARA ## Uppskattar variansen baserat på ett urval, inklusive tal, text och logiska värden -VARP = VARIANSP ## Beräknar variansen baserat på hela populationen -VARPA = VARPA ## Beräknar variansen baserat på hela populationen, inklusive tal, text och logiska värden -WEIBULL = WEIBULL ## Returnerar Weibull-fördelningen -ZTEST = ZTEST ## Returnerar det ensidiga sannolikhetsvärdet av ett z-test - - -## -## Text functions Textfunktioner -## -ASC = ASC ## Ändrar helbredds (dubbel byte) engelska bokstäver eller katakana inom en teckensträng till tecken med halvt breddsteg (enkel byte) -BAHTTEXT = BAHTTEXT ## Omvandlar ett tal till text med valutaformatet ß (baht) -CHAR = TECKENKOD ## Returnerar tecknet som anges av kod -CLEAN = STÄDA ## Tar bort alla icke utskrivbara tecken i en text -CODE = KOD ## Returnerar en numerisk kod för det första tecknet i en textsträng -CONCATENATE = SAMMANFOGA ## Sammanfogar flera textdelar till en textsträng -DOLLAR = VALUTA ## Omvandlar ett tal till text med valutaformat -EXACT = EXAKT ## Kontrollerar om två textvärden är identiska -FIND = HITTA ## Hittar en text i en annan (skiljer på gemener och versaler) -FINDB = HITTAB ## Hittar en text i en annan (skiljer på gemener och versaler) -FIXED = FASTTAL ## Formaterar ett tal som text med ett fast antal decimaler -JIS = JIS ## Ändrar halvbredds (enkel byte) engelska bokstäver eller katakana inom en teckensträng till tecken med helt breddsteg (dubbel byte) -LEFT = VÄNSTER ## Returnerar tecken längst till vänster i en sträng -LEFTB = VÄNSTERB ## Returnerar tecken längst till vänster i en sträng -LEN = LÄNGD ## Returnerar antalet tecken i en textsträng -LENB = LÄNGDB ## Returnerar antalet tecken i en textsträng -LOWER = GEMENER ## Omvandlar text till gemener -MID = EXTEXT ## Returnerar angivet antal tecken från en text med början vid den position som du anger -MIDB = EXTEXTB ## Returnerar angivet antal tecken från en text med början vid den position som du anger -PHONETIC = PHONETIC ## Returnerar de fonetiska (furigana) tecknen i en textsträng -PROPER = INITIAL ## Ändrar första bokstaven i varje ord i ett textvärde till versal -REPLACE = ERSÄTT ## Ersätter tecken i text -REPLACEB = ERSÄTTB ## Ersätter tecken i text -REPT = REP ## Upprepar en text ett bestämt antal gånger -RIGHT = HÖGER ## Returnerar tecken längst till höger i en sträng -RIGHTB = HÖGERB ## Returnerar tecken längst till höger i en sträng -SEARCH = SÖK ## Hittar ett textvärde i ett annat (skiljer inte på gemener och versaler) -SEARCHB = SÖKB ## Hittar ett textvärde i ett annat (skiljer inte på gemener och versaler) -SUBSTITUTE = BYT.UT ## Ersätter gammal text med ny text i en textsträng -T = T ## Omvandlar argumenten till text -TEXT = TEXT ## Formaterar ett tal och omvandlar det till text -TRIM = RENSA ## Tar bort blanksteg från text -UPPER = VERSALER ## Omvandlar text till versaler -VALUE = TEXTNUM ## Omvandlar ett textargument till ett tal diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config deleted file mode 100644 index b69d425..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config +++ /dev/null @@ -1,47 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Settings -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## - - -ArgumentSeparator = ; - - -## -## (For future use) -## -currencySymbol = YTL - - -## -## Excel Error Codes (For future use) -## -NULL = #BOŞ! -DIV0 = #SAYI/0! -VALUE = #DEĞER! -REF = #BAŞV! -NAME = #AD? -NUM = #SAYI! -NA = #YOK diff --git a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions b/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions deleted file mode 100644 index 45d7df1..0000000 --- a/vendor/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions +++ /dev/null @@ -1,438 +0,0 @@ -## -## PHPExcel -## -## Copyright (c) 2006 - 2013 PHPExcel -## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. -## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. -## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -## -## @category PHPExcel -## @package PHPExcel_Calculation -## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -## @version ##VERSION##, ##DATE## -## -## Data in this file derived from http://www.piuha.fi/excel-function-name-translation/ -## -## - - -## -## Add-in and Automation functions Eklenti ve Otomasyon fonksiyonları -## -GETPIVOTDATA = ÖZETVERİAL ## Bir Özet Tablo raporunda saklanan verileri verir. - - -## -## Cube functions Küp işlevleri -## -CUBEKPIMEMBER = KÜPKPIÜYE ## Kilit performans göstergesi (KPI-Key Performance Indicator) adını, özelliğini ve ölçüsünü verir ve hücredeki ad ve özelliği gösterir. KPI, bir kurumun performansını izlemek için kullanılan aylık brüt kâr ya da üç aylık çalışan giriş çıkışları gibi ölçülebilen bir birimdir. -CUBEMEMBER = KÜPÜYE ## Bir küp hiyerarşisinde bir üyeyi veya kaydı verir. Üye veya kaydın küpte varolduğunu doğrulamak için kullanılır. -CUBEMEMBERPROPERTY = KÜPÜYEÖZELLİĞİ ## Bir küpte bir üyenin özelliğinin değerini verir. Küp içinde üye adının varlığını doğrulamak ve bu üyenin belli özelliklerini getirmek için kullanılır. -CUBERANKEDMEMBER = KÜPÜYESIRASI ## Bir küme içindeki üyenin derecesini veya kaçıncı olduğunu verir. En iyi satış elemanı, veya en iyi on öğrenci gibi bir kümedeki bir veya daha fazla öğeyi getirmek için kullanılır. -CUBESET = KÜPKÜME ## Kümeyi oluşturan ve ardından bu kümeyi Microsoft Office Excel'e getiren sunucudaki küpe küme ifadelerini göndererek hesaplanan üye veya kayıt kümesini tanımlar. -CUBESETCOUNT = KÜPKÜMESAY ## Bir kümedeki öğelerin sayısını getirir. -CUBEVALUE = KÜPDEĞER ## Bir küpten toplam değeri getirir. - - -## -## Database functions Veritabanı işlevleri -## -DAVERAGE = VSEÇORT ## Seçili veritabanı girdilerinin ortalamasını verir. -DCOUNT = VSEÇSAY ## Veritabanında sayı içeren hücre sayısını hesaplar. -DCOUNTA = VSEÇSAYDOLU ## Veritabanındaki boş olmayan hücreleri sayar. -DGET = VAL ## Veritabanından, belirtilen ölçütlerle eşleşen tek bir rapor çıkarır. -DMAX = VSEÇMAK ## Seçili veritabanı girişlerinin en yüksek değerini verir. -DMIN = VSEÇMİN ## Seçili veritabanı girişlerinin en düşük değerini verir. -DPRODUCT = VSEÇÇARP ## Kayıtların belli bir alanında bulunan, bir veritabanındaki ölçütlerle eşleşen değerleri çarpar. -DSTDEV = VSEÇSTDSAPMA ## Seçili veritabanı girişlerinden oluşan bir örneğe dayanarak, standart sapmayı tahmin eder. -DSTDEVP = VSEÇSTDSAPMAS ## Standart sapmayı, seçili veritabanı girişlerinin tüm popülasyonunu esas alarak hesaplar. -DSUM = VSEÇTOPLA ## Kayıtların alan sütununda bulunan, ölçütle eşleşen sayıları toplar. -DVAR = VSEÇVAR ## Seçili veritabanı girişlerinden oluşan bir örneği esas alarak farkı tahmin eder. -DVARP = VSEÇVARS ## Seçili veritabanı girişlerinin tüm popülasyonunu esas alarak farkı hesaplar. - - -## -## Date and time functions Tarih ve saat işlevleri -## -DATE = TARİH ## Belirli bir tarihin seri numarasını verir. -DATEVALUE = TARİHSAYISI ## Metin biçimindeki bir tarihi seri numarasına dönüştürür. -DAY = GÜN ## Seri numarasını, ayın bir gününe dönüştürür. -DAYS360 = GÜN360 ## İki tarih arasındaki gün sayısını, 360 günlük yılı esas alarak hesaplar. -EDATE = SERİTARİH ## Başlangıç tarihinden itibaren, belirtilen ay sayısından önce veya sonraki tarihin seri numarasını verir. -EOMONTH = SERİAY ## Belirtilen sayıda ay önce veya sonraki ayın son gününün seri numarasını verir. -HOUR = SAAT ## Bir seri numarasını saate dönüştürür. -MINUTE = DAKİKA ## Bir seri numarasını dakikaya dönüştürür. -MONTH = AY ## Bir seri numarasını aya dönüştürür. -NETWORKDAYS = TAMİŞGÜNÜ ## İki tarih arasındaki tam çalışma günlerinin sayısını verir. -NOW = ŞİMDİ ## Geçerli tarihin ve saatin seri numarasını verir. -SECOND = SANİYE ## Bir seri numarasını saniyeye dönüştürür. -TIME = ZAMAN ## Belirli bir zamanın seri numarasını verir. -TIMEVALUE = ZAMANSAYISI ## Metin biçimindeki zamanı seri numarasına dönüştürür. -TODAY = BUGÜN ## Bugünün tarihini seri numarasına dönüştürür. -WEEKDAY = HAFTANINGÜNÜ ## Bir seri numarasını, haftanın gününe dönüştürür. -WEEKNUM = HAFTASAY ## Dizisel değerini, haftanın yıl içinde bulunduğu konumu sayısal olarak gösteren sayıya dönüştürür. -WORKDAY = İŞGÜNÜ ## Belirtilen sayıda çalışma günü öncesinin ya da sonrasının tarihinin seri numarasını verir. -YEAR = YIL ## Bir seri numarasını yıla dönüştürür. -YEARFRAC = YILORAN ## Başlangıç_tarihi ve bitiş_tarihi arasındaki tam günleri gösteren yıl kesrini verir. - - -## -## Engineering functions Mühendislik işlevleri -## -BESSELI = BESSELI ## Değiştirilmiş Bessel fonksiyonu In(x)'i verir. -BESSELJ = BESSELJ ## Bessel fonksiyonu Jn(x)'i verir. -BESSELK = BESSELK ## Değiştirilmiş Bessel fonksiyonu Kn(x)'i verir. -BESSELY = BESSELY ## Bessel fonksiyonu Yn(x)'i verir. -BIN2DEC = BIN2DEC ## İkili bir sayıyı, ondalık sayıya dönüştürür. -BIN2HEX = BIN2HEX ## İkili bir sayıyı, onaltılıya dönüştürür. -BIN2OCT = BIN2OCT ## İkili bir sayıyı, sekizliye dönüştürür. -COMPLEX = KARMAŞIK ## Gerçek ve sanal katsayıları, karmaşık sayıya dönüştürür. -CONVERT = ÇEVİR ## Bir sayıyı, bir ölçüm sisteminden bir başka ölçüm sistemine dönüştürür. -DEC2BIN = DEC2BIN ## Ondalık bir sayıyı, ikiliye dönüştürür. -DEC2HEX = DEC2HEX ## Ondalık bir sayıyı, onaltılıya dönüştürür. -DEC2OCT = DEC2OCT ## Ondalık bir sayıyı sekizliğe dönüştürür. -DELTA = DELTA ## İki değerin eşit olup olmadığını sınar. -ERF = HATAİŞLEV ## Hata işlevini verir. -ERFC = TÜMHATAİŞLEV ## Tümleyici hata işlevini verir. -GESTEP = BESINIR ## Bir sayının eşik değerinden büyük olup olmadığını sınar. -HEX2BIN = HEX2BIN ## Onaltılı bir sayıyı ikiliye dönüştürür. -HEX2DEC = HEX2DEC ## Onaltılı bir sayıyı ondalığa dönüştürür. -HEX2OCT = HEX2OCT ## Onaltılı bir sayıyı sekizliğe dönüştürür. -IMABS = SANMUTLAK ## Karmaşık bir sayının mutlak değerini (modül) verir. -IMAGINARY = SANAL ## Karmaşık bir sayının sanal katsayısını verir. -IMARGUMENT = SANBAĞ_DEĞİŞKEN ## Radyanlarla belirtilen bir açı olan teta bağımsız değişkenini verir. -IMCONJUGATE = SANEŞLENEK ## Karmaşık bir sayının karmaşık eşleniğini verir. -IMCOS = SANCOS ## Karmaşık bir sayının kosinüsünü verir. -IMDIV = SANBÖL ## İki karmaşık sayının bölümünü verir. -IMEXP = SANÜS ## Karmaşık bir sayının üssünü verir. -IMLN = SANLN ## Karmaşık bir sayının doğal logaritmasını verir. -IMLOG10 = SANLOG10 ## Karmaşık bir sayının, 10 tabanında logaritmasını verir. -IMLOG2 = SANLOG2 ## Karmaşık bir sayının 2 tabanında logaritmasını verir. -IMPOWER = SANÜSSÜ ## Karmaşık bir sayıyı, bir tamsayı üssüne yükseltilmiş olarak verir. -IMPRODUCT = SANÇARP ## Karmaşık sayıların çarpımını verir. -IMREAL = SANGERÇEK ## Karmaşık bir sayının, gerçek katsayısını verir. -IMSIN = SANSIN ## Karmaşık bir sayının sinüsünü verir. -IMSQRT = SANKAREKÖK ## Karmaşık bir sayının karekökünü verir. -IMSUB = SANÇIKAR ## İki karmaşık sayının farkını verir. -IMSUM = SANTOPLA ## Karmaşık sayıların toplamını verir. -OCT2BIN = OCT2BIN ## Sekizli bir sayıyı ikiliye dönüştürür. -OCT2DEC = OCT2DEC ## Sekizli bir sayıyı ondalığa dönüştürür. -OCT2HEX = OCT2HEX ## Sekizli bir sayıyı onaltılıya dönüştürür. - - -## -## Financial functions Finansal fonksiyonlar -## -ACCRINT = GERÇEKFAİZ ## Dönemsel faiz ödeyen hisse senedine ilişkin tahakkuk eden faizi getirir. -ACCRINTM = GERÇEKFAİZV ## Vadesinde ödeme yapan bir tahvilin tahakkuk etmiş faizini verir. -AMORDEGRC = AMORDEGRC ## Yıpranma katsayısı kullanarak her hesap döneminin değer kaybını verir. -AMORLINC = AMORLINC ## Her hesap dönemi içindeki yıpranmayı verir. -COUPDAYBS = KUPONGÜNBD ## Kupon süresinin başlangıcından alış tarihine kadar olan süredeki gün sayısını verir. -COUPDAYS = KUPONGÜN ## Kupon süresindeki, gün sayısını, alış tarihini de içermek üzere, verir. -COUPDAYSNC = KUPONGÜNDSK ## Alış tarihinden bir sonraki kupon tarihine kadar olan gün sayısını verir. -COUPNCD = KUPONGÜNSKT ## Alış tarihinden bir sonraki kupon tarihini verir. -COUPNUM = KUPONSAYI ## Alış tarihiyle vade tarihi arasında ödenecek kuponların sayısını verir. -COUPPCD = KUPONGÜNÖKT ## Alış tarihinden bir önceki kupon tarihini verir. -CUMIPMT = AİÇVERİMORANI ## İki dönem arasında ödenen kümülatif faizi verir. -CUMPRINC = ANA_PARA_ÖDEMESİ ## İki dönem arasında bir borç üzerine ödenen birikimli temeli verir. -DB = AZALANBAKİYE ## Bir malın belirtilen bir süre içindeki yıpranmasını, sabit azalan bakiye yöntemini kullanarak verir. -DDB = ÇİFTAZALANBAKİYE ## Bir malın belirtilen bir süre içindeki yıpranmasını, çift azalan bakiye yöntemi ya da sizin belirttiğiniz başka bir yöntemi kullanarak verir. -DISC = İNDİRİM ## Bir tahvilin indirim oranını verir. -DOLLARDE = LİRAON ## Kesir olarak tanımlanmış lira fiyatını, ondalık sayı olarak tanımlanmış lira fiyatına dönüştürür. -DOLLARFR = LİRAKES ## Ondalık sayı olarak tanımlanmış lira fiyatını, kesir olarak tanımlanmış lira fiyatına dönüştürür. -DURATION = SÜRE ## Belli aralıklarla faiz ödemesi yapan bir tahvilin yıllık süresini verir. -EFFECT = ETKİN ## Efektif yıllık faiz oranını verir. -FV = ANBD ## Bir yatırımın gelecekteki değerini verir. -FVSCHEDULE = GDPROGRAM ## Bir seri birleşik faiz oranı uyguladıktan sonra, bir başlangıçtaki anaparanın gelecekteki değerini verir. -INTRATE = FAİZORANI ## Tam olarak yatırım yapılmış bir tahvilin faiz oranını verir. -IPMT = FAİZTUTARI ## Bir yatırımın verilen bir süre için faiz ödemesini verir. -IRR = İÇ_VERİM_ORANI ## Bir para akışı serisi için, iç verim oranını verir. -ISPMT = ISPMT ## Yatırımın belirli bir dönemi boyunca ödenen faizi hesaplar. -MDURATION = MSÜRE ## Varsayılan par değeri 10.000.000 lira olan bir tahvil için Macauley değiştirilmiş süreyi verir. -MIRR = D_İÇ_VERİM_ORANI ## Pozitif ve negatif para akışlarının farklı oranlarda finanse edildiği durumlarda, iç verim oranını verir. -NOMINAL = NOMİNAL ## Yıllık nominal faiz oranını verir. -NPER = DÖNEM_SAYISI ## Bir yatırımın dönem sayısını verir. -NPV = NBD ## Bir yatırımın bugünkü net değerini, bir dönemsel para akışları serisine ve bir indirim oranına bağlı olarak verir. -ODDFPRICE = TEKYDEĞER ## Tek bir ilk dönemi olan bir tahvilin değerini, her 100.000.000 lirada bir verir. -ODDFYIELD = TEKYÖDEME ## Tek bir ilk dönemi olan bir tahvilin ödemesini verir. -ODDLPRICE = TEKSDEĞER ## Tek bir son dönemi olan bir tahvilin fiyatını her 10.000.000 lirada bir verir. -ODDLYIELD = TEKSÖDEME ## Tek bir son dönemi olan bir tahvilin ödemesini verir. -PMT = DEVRESEL_ÖDEME ## Bir yıllık dönemsel ödemeyi verir. -PPMT = ANA_PARA_ÖDEMESİ ## Verilen bir süre için, bir yatırımın anaparasına dayanan ödemeyi verir. -PRICE = DEĞER ## Dönemsel faiz ödeyen bir tahvilin fiyatını 10.000.00 liralık değer başına verir. -PRICEDISC = DEĞERİND ## İndirimli bir tahvilin fiyatını 10.000.000 liralık nominal değer başına verir. -PRICEMAT = DEĞERVADE ## Faizini vade sonunda ödeyen bir tahvilin fiyatını 10.000.000 nominal değer başına verir. -PV = BD ## Bir yatırımın bugünkü değerini verir. -RATE = FAİZ_ORANI ## Bir yıllık dönem başına düşen faiz oranını verir. -RECEIVED = GETİRİ ## Tam olarak yatırılmış bir tahvilin vadesinin bitiminde alınan miktarı verir. -SLN = DA ## Bir malın bir dönem içindeki doğrusal yıpranmasını verir. -SYD = YAT ## Bir malın belirli bir dönem için olan amortismanını verir. -TBILLEQ = HTAHEŞ ## Bir Hazine bonosunun bono eşdeğeri ödemesini verir. -TBILLPRICE = HTAHDEĞER ## Bir Hazine bonosunun değerini, 10.000.000 liralık nominal değer başına verir. -TBILLYIELD = HTAHÖDEME ## Bir Hazine bonosunun ödemesini verir. -VDB = DAB ## Bir malın amortismanını, belirlenmiş ya da kısmi bir dönem için, bir azalan bakiye yöntemi kullanarak verir. -XIRR = AİÇVERİMORANI ## Dönemsel olması gerekmeyen bir para akışları programı için, iç verim oranını verir. -XNPV = ANBD ## Dönemsel olması gerekmeyen bir para akışları programı için, bugünkü net değeri verir. -YIELD = ÖDEME ## Belirli aralıklarla faiz ödeyen bir tahvilin ödemesini verir. -YIELDDISC = ÖDEMEİND ## İndirimli bir tahvilin yıllık ödemesini verir; örneğin, bir Hazine bonosunun. -YIELDMAT = ÖDEMEVADE ## Vadesinin bitiminde faiz ödeyen bir tahvilin yıllık ödemesini verir. - - -## -## Information functions Bilgi fonksiyonları -## -CELL = HÜCRE ## Bir hücrenin biçimlendirmesi, konumu ya da içeriği hakkında bilgi verir. -ERROR.TYPE = HATA.TİPİ ## Bir hata türüne ilişkin sayıları verir. -INFO = BİLGİ ## Geçerli işletim ortamı hakkında bilgi verir. -ISBLANK = EBOŞSA ## Değer boşsa, DOĞRU verir. -ISERR = EHATA ## Değer, #YOK dışındaki bir hata değeriyse, DOĞRU verir. -ISERROR = EHATALIYSA ## Değer, herhangi bir hata değeriyse, DOĞRU verir. -ISEVEN = ÇİFTTİR ## Sayı çiftse, DOĞRU verir. -ISLOGICAL = EMANTIKSALSA ## Değer, mantıksal bir değerse, DOĞRU verir. -ISNA = EYOKSA ## Değer, #YOK hata değeriyse, DOĞRU verir. -ISNONTEXT = EMETİNDEĞİLSE ## Değer, metin değilse, DOĞRU verir. -ISNUMBER = ESAYIYSA ## Değer, bir sayıysa, DOĞRU verir. -ISODD = TEKTİR ## Sayı tekse, DOĞRU verir. -ISREF = EREFSE ## Değer bir başvuruysa, DOĞRU verir. -ISTEXT = EMETİNSE ## Değer bir metinse DOĞRU verir. -N = N ## Sayıya dönüştürülmüş bir değer verir. -NA = YOKSAY ## #YOK hata değerini verir. -TYPE = TİP ## Bir değerin veri türünü belirten bir sayı verir. - - -## -## Logical functions Mantıksal fonksiyonlar -## -AND = VE ## Bütün bağımsız değişkenleri DOĞRU ise, DOĞRU verir. -FALSE = YANLIŞ ## YANLIŞ mantıksal değerini verir. -IF = EĞER ## Gerçekleştirilecek bir mantıksal sınama belirtir. -IFERROR = EĞERHATA ## Formül hatalıysa belirttiğiniz değeri verir; bunun dışındaki durumlarda formülün sonucunu verir. -NOT = DEĞİL ## Bağımsız değişkeninin mantığını tersine çevirir. -OR = YADA ## Bağımsız değişkenlerden herhangi birisi DOĞRU ise, DOĞRU verir. -TRUE = DOĞRU ## DOĞRU mantıksal değerini verir. - - -## -## Lookup and reference functions Arama ve Başvuru fonksiyonları -## -ADDRESS = ADRES ## Bir başvuruyu, çalışma sayfasındaki tek bir hücreye metin olarak verir. -AREAS = ALANSAY ## Renvoie le nombre de zones dans une référence. -CHOOSE = ELEMAN ## Değerler listesinden bir değer seçer. -COLUMN = SÜTUN ## Bir başvurunun sütun sayısını verir. -COLUMNS = SÜTUNSAY ## Bir başvurudaki sütunların sayısını verir. -HLOOKUP = YATAYARA ## Bir dizinin en üst satırına bakar ve belirtilen hücrenin değerini verir. -HYPERLINK = KÖPRÜ ## Bir ağ sunucusunda, bir intranette ya da Internet'te depolanan bir belgeyi açan bir kısayol ya da atlama oluşturur. -INDEX = İNDİS ## Başvurudan veya diziden bir değer seçmek için, bir dizin kullanır. -INDIRECT = DOLAYLI ## Metin değeriyle belirtilen bir başvuru verir. -LOOKUP = ARA ## Bir vektördeki veya dizideki değerleri arar. -MATCH = KAÇINCI ## Bir başvurudaki veya dizideki değerleri arar. -OFFSET = KAYDIR ## Verilen bir başvurudan, bir başvuru kaydırmayı verir. -ROW = SATIR ## Bir başvurunun satır sayısını verir. -ROWS = SATIRSAY ## Bir başvurudaki satırların sayısını verir. -RTD = RTD ## COM otomasyonunu destekleyen programdan gerçek zaman verileri alır. -TRANSPOSE = DEVRİK_DÖNÜŞÜM ## Bir dizinin devrik dönüşümünü verir. -VLOOKUP = DÜŞEYARA ## Bir dizinin ilk sütununa bakar ve bir hücrenin değerini vermek için satır boyunca hareket eder. - - -## -## Math and trigonometry functions Matematik ve trigonometri fonksiyonları -## -ABS = MUTLAK ## Bir sayının mutlak değerini verir. -ACOS = ACOS ## Bir sayının ark kosinüsünü verir. -ACOSH = ACOSH ## Bir sayının ters hiperbolik kosinüsünü verir. -ASIN = ASİN ## Bir sayının ark sinüsünü verir. -ASINH = ASİNH ## Bir sayının ters hiperbolik sinüsünü verir. -ATAN = ATAN ## Bir sayının ark tanjantını verir. -ATAN2 = ATAN2 ## Ark tanjantı, x- ve y- koordinatlarından verir. -ATANH = ATANH ## Bir sayının ters hiperbolik tanjantını verir. -CEILING = TAVANAYUVARLA ## Bir sayıyı, en yakın tamsayıya ya da en yakın katına yuvarlar. -COMBIN = KOMBİNASYON ## Verilen sayıda öğenin kombinasyon sayısını verir. -COS = COS ## Bir sayının kosinüsünü verir. -COSH = COSH ## Bir sayının hiperbolik kosinüsünü verir. -DEGREES = DERECE ## Radyanları dereceye dönüştürür. -EVEN = ÇİFT ## Bir sayıyı, en yakın daha büyük çift tamsayıya yuvarlar. -EXP = ÜS ## e'yi, verilen bir sayının üssüne yükseltilmiş olarak verir. -FACT = ÇARPINIM ## Bir sayının faktörünü verir. -FACTDOUBLE = ÇİFTFAKTÖR ## Bir sayının çift çarpınımını verir. -FLOOR = TABANAYUVARLA ## Bir sayıyı, daha küçük sayıya, sıfıra yakınsayarak yuvarlar. -GCD = OBEB ## En büyük ortak böleni verir. -INT = TAMSAYI ## Bir sayıyı aşağıya doğru en yakın tamsayıya yuvarlar. -LCM = OKEK ## En küçük ortak katı verir. -LN = LN ## Bir sayının doğal logaritmasını verir. -LOG = LOG ## Bir sayının, belirtilen bir tabandaki logaritmasını verir. -LOG10 = LOG10 ## Bir sayının 10 tabanında logaritmasını verir. -MDETERM = DETERMİNANT ## Bir dizinin dizey determinantını verir. -MINVERSE = DİZEY_TERS ## Bir dizinin dizey tersini verir. -MMULT = DÇARP ## İki dizinin dizey çarpımını verir. -MOD = MODÜLO ## Bölmeden kalanı verir. -MROUND = KYUVARLA ## İstenen kata yuvarlanmış bir sayı verir. -MULTINOMIAL = ÇOKTERİMLİ ## Bir sayılar kümesinin çok terimlisini verir. -ODD = TEK ## Bir sayıyı en yakın daha büyük tek sayıya yuvarlar. -PI = Pİ ## Pi değerini verir. -POWER = KUVVET ## Bir üsse yükseltilmiş sayının sonucunu verir. -PRODUCT = ÇARPIM ## Bağımsız değişkenlerini çarpar. -QUOTIENT = BÖLÜM ## Bir bölme işleminin tamsayı kısmını verir. -RADIANS = RADYAN ## Dereceleri radyanlara dönüştürür. -RAND = S_SAYI_ÜRET ## 0 ile 1 arasında rastgele bir sayı verir. -RANDBETWEEN = RASTGELEARALIK ## Belirttiğiniz sayılar arasında rastgele bir sayı verir. -ROMAN = ROMEN ## Bir normal rakamı, metin olarak, romen rakamına çevirir. -ROUND = YUVARLA ## Bir sayıyı, belirtilen basamak sayısına yuvarlar. -ROUNDDOWN = AŞAĞIYUVARLA ## Bir sayıyı, daha küçük sayıya, sıfıra yakınsayarak yuvarlar. -ROUNDUP = YUKARIYUVARLA ## Bir sayıyı daha büyük sayıya, sıfırdan ıraksayarak yuvarlar. -SERIESSUM = SERİTOPLA ## Bir üs serisinin toplamını, formüle bağlı olarak verir. -SIGN = İŞARET ## Bir sayının işaretini verir. -SIN = SİN ## Verilen bir açının sinüsünü verir. -SINH = SİNH ## Bir sayının hiperbolik sinüsünü verir. -SQRT = KAREKÖK ## Pozitif bir karekök verir. -SQRTPI = KAREKÖKPİ ## (* Pi sayısının) kare kökünü verir. -SUBTOTAL = ALTTOPLAM ## Bir listedeki ya da veritabanındaki bir alt toplamı verir. -SUM = TOPLA ## Bağımsız değişkenlerini toplar. -SUMIF = ETOPLA ## Verilen ölçütle belirlenen hücreleri toplar. -SUMIFS = SUMIFS ## Bir aralıktaki, birden fazla ölçüte uyan hücreleri ekler. -SUMPRODUCT = TOPLA.ÇARPIM ## İlişkili dizi bileşenlerinin çarpımlarının toplamını verir. -SUMSQ = TOPKARE ## Bağımsız değişkenlerin karelerinin toplamını verir. -SUMX2MY2 = TOPX2EY2 ## İki dizideki ilişkili değerlerin farkının toplamını verir. -SUMX2PY2 = TOPX2AY2 ## İki dizideki ilişkili değerlerin karelerinin toplamının toplamını verir. -SUMXMY2 = TOPXEY2 ## İki dizideki ilişkili değerlerin farklarının karelerinin toplamını verir. -TAN = TAN ## Bir sayının tanjantını verir. -TANH = TANH ## Bir sayının hiperbolik tanjantını verir. -TRUNC = NSAT ## Bir sayının, tamsayı durumuna gelecek şekilde, fazlalıklarını atar. - - -## -## Statistical functions İstatistiksel fonksiyonlar -## -AVEDEV = ORTSAP ## Veri noktalarının ortalamalarından mutlak sapmalarının ortalamasını verir. -AVERAGE = ORTALAMA ## Bağımsız değişkenlerinin ortalamasını verir. -AVERAGEA = ORTALAMAA ## Bağımsız değişkenlerinin, sayılar, metin ve mantıksal değerleri içermek üzere ortalamasını verir. -AVERAGEIF = EĞERORTALAMA ## Verili ölçütü karşılayan bir aralıktaki bütün hücrelerin ortalamasını (aritmetik ortalama) hesaplar. -AVERAGEIFS = EĞERLERORTALAMA ## Birden çok ölçüte uyan tüm hücrelerin ortalamasını (aritmetik ortalama) hesaplar. -BETADIST = BETADAĞ ## Beta birikimli dağılım fonksiyonunu verir. -BETAINV = BETATERS ## Belirli bir beta dağılımı için birikimli dağılım fonksiyonunun tersini verir. -BINOMDIST = BİNOMDAĞ ## Tek terimli binom dağılımı olasılığını verir. -CHIDIST = KİKAREDAĞ ## Kikare dağılımın tek kuyruklu olasılığını verir. -CHIINV = KİKARETERS ## Kikare dağılımın kuyruklu olasılığının tersini verir. -CHITEST = KİKARETEST ## Bağımsızlık sınamalarını verir. -CONFIDENCE = GÜVENİRLİK ## Bir popülasyon ortalaması için güvenirlik aralığını verir. -CORREL = KORELASYON ## İki veri kümesi arasındaki bağlantı katsayısını verir. -COUNT = BAĞ_DEĞ_SAY ## Bağımsız değişkenler listesinde kaç tane sayı bulunduğunu sayar. -COUNTA = BAĞ_DEĞ_DOLU_SAY ## Bağımsız değişkenler listesinde kaç tane değer bulunduğunu sayar. -COUNTBLANK = BOŞLUKSAY ## Aralıktaki boş hücre sayısını hesaplar. -COUNTIF = EĞERSAY ## Verilen ölçütlere uyan bir aralık içindeki hücreleri sayar. -COUNTIFS = ÇOKEĞERSAY ## Birden çok ölçüte uyan bir aralık içindeki hücreleri sayar. -COVAR = KOVARYANS ## Eşleştirilmiş sapmaların ortalaması olan kovaryansı verir. -CRITBINOM = KRİTİKBİNOM ## Birikimli binom dağılımının bir ölçüt değerinden küçük veya ölçüt değerine eşit olduğu en küçük değeri verir. -DEVSQ = SAPKARE ## Sapmaların karelerinin toplamını verir. -EXPONDIST = ÜSTELDAĞ ## Üstel dağılımı verir. -FDIST = FDAĞ ## F olasılık dağılımını verir. -FINV = FTERS ## F olasılık dağılımının tersini verir. -FISHER = FISHER ## Fisher dönüşümünü verir. -FISHERINV = FISHERTERS ## Fisher dönüşümünün tersini verir. -FORECAST = TAHMİN ## Bir doğrusal eğilim boyunca bir değer verir. -FREQUENCY = SIKLIK ## Bir sıklık dağılımını, dikey bir dizi olarak verir. -FTEST = FTEST ## Bir F-test'in sonucunu verir. -GAMMADIST = GAMADAĞ ## Gama dağılımını verir. -GAMMAINV = GAMATERS ## Gama kümülatif dağılımının tersini verir. -GAMMALN = GAMALN ## Gama fonksiyonunun (?(x)) doğal logaritmasını verir. -GEOMEAN = GEOORT ## Geometrik ortayı verir. -GROWTH = BÜYÜME ## Üstel bir eğilim boyunca değerler verir. -HARMEAN = HARORT ## Harmonik ortayı verir. -HYPGEOMDIST = HİPERGEOMDAĞ ## Hipergeometrik dağılımı verir. -INTERCEPT = KESMENOKTASI ## Doğrusal çakıştırma çizgisinin kesişme noktasını verir. -KURT = BASIKLIK ## Bir veri kümesinin basıklığını verir. -LARGE = BÜYÜK ## Bir veri kümesinde k. en büyük değeri verir. -LINEST = DOT ## Doğrusal bir eğilimin parametrelerini verir. -LOGEST = LOT ## Üstel bir eğilimin parametrelerini verir. -LOGINV = LOGTERS ## Bir lognormal dağılımının tersini verir. -LOGNORMDIST = LOGNORMDAĞ ## Birikimli lognormal dağılımını verir. -MAX = MAK ## Bir bağımsız değişkenler listesindeki en büyük değeri verir. -MAXA = MAKA ## Bir bağımsız değişkenler listesindeki, sayılar, metin ve mantıksal değerleri içermek üzere, en büyük değeri verir. -MEDIAN = ORTANCA ## Belirtilen sayıların orta değerini verir. -MIN = MİN ## Bir bağımsız değişkenler listesindeki en küçük değeri verir. -MINA = MİNA ## Bir bağımsız değişkenler listesindeki, sayılar, metin ve mantıksal değerleri de içermek üzere, en küçük değeri verir. -MODE = ENÇOK_OLAN ## Bir veri kümesindeki en sık rastlanan değeri verir. -NEGBINOMDIST = NEGBİNOMDAĞ ## Negatif binom dağılımını verir. -NORMDIST = NORMDAĞ ## Normal birikimli dağılımı verir. -NORMINV = NORMTERS ## Normal kümülatif dağılımın tersini verir. -NORMSDIST = NORMSDAĞ ## Standart normal birikimli dağılımı verir. -NORMSINV = NORMSTERS ## Standart normal birikimli dağılımın tersini verir. -PEARSON = PEARSON ## Pearson çarpım moment korelasyon katsayısını verir. -PERCENTILE = YÜZDEBİRLİK ## Bir aralık içerisinde bulunan değerlerin k. frekans toplamını verir. -PERCENTRANK = YÜZDERANK ## Bir veri kümesindeki bir değerin yüzde mertebesini verir. -PERMUT = PERMÜTASYON ## Verilen sayıda nesne için permütasyon sayısını verir. -POISSON = POISSON ## Poisson dağılımını verir. -PROB = OLASILIK ## Bir aralıktaki değerlerin iki sınır arasında olması olasılığını verir. -QUARTILE = DÖRTTEBİRLİK ## Bir veri kümesinin dörtte birliğini verir. -RANK = RANK ## Bir sayılar listesinde bir sayının mertebesini verir. -RSQ = RKARE ## Pearson çarpım moment korelasyon katsayısının karesini verir. -SKEW = ÇARPIKLIK ## Bir dağılımın çarpıklığını verir. -SLOPE = EĞİM ## Doğrusal çakışma çizgisinin eğimini verir. -SMALL = KÜÇÜK ## Bir veri kümesinde k. en küçük değeri verir. -STANDARDIZE = STANDARTLAŞTIRMA ## Normalleştirilmiş bir değer verir. -STDEV = STDSAPMA ## Bir örneğe dayanarak standart sapmayı tahmin eder. -STDEVA = STDSAPMAA ## Standart sapmayı, sayılar, metin ve mantıksal değerleri içermek üzere, bir örneğe bağlı olarak tahmin eder. -STDEVP = STDSAPMAS ## Standart sapmayı, tüm popülasyona bağlı olarak hesaplar. -STDEVPA = STDSAPMASA ## Standart sapmayı, sayılar, metin ve mantıksal değerleri içermek üzere, tüm popülasyona bağlı olarak hesaplar. -STEYX = STHYX ## Regresyondaki her x için tahmini y değerinin standart hatasını verir. -TDIST = TDAĞ ## T-dağılımını verir. -TINV = TTERS ## T-dağılımının tersini verir. -TREND = EĞİLİM ## Doğrusal bir eğilim boyunca değerler verir. -TRIMMEAN = KIRPORTALAMA ## Bir veri kümesinin içinin ortalamasını verir. -TTEST = TTEST ## T-test'le ilişkilendirilmiş olasılığı verir. -VAR = VAR ## Varyansı, bir örneğe bağlı olarak tahmin eder. -VARA = VARA ## Varyansı, sayılar, metin ve mantıksal değerleri içermek üzere, bir örneğe bağlı olarak tahmin eder. -VARP = VARS ## Varyansı, tüm popülasyona dayanarak hesaplar. -VARPA = VARSA ## Varyansı, sayılar, metin ve mantıksal değerleri içermek üzere, tüm popülasyona bağlı olarak hesaplar. -WEIBULL = WEIBULL ## Weibull dağılımını hesaplar. -ZTEST = ZTEST ## Z-testinin tek kuyruklu olasılık değerini hesaplar. - - -## -## Text functions Metin fonksiyonları -## -ASC = ASC ## Bir karakter dizesindeki çift enli (iki bayt) İngilizce harfleri veya katakanayı yarım enli (tek bayt) karakterlerle değiştirir. -BAHTTEXT = BAHTTEXT ## Sayıyı, ß (baht) para birimi biçimini kullanarak metne dönüştürür. -CHAR = DAMGA ## Kod sayısıyla belirtilen karakteri verir. -CLEAN = TEMİZ ## Metindeki bütün yazdırılamaz karakterleri kaldırır. -CODE = KOD ## Bir metin dizesindeki ilk karakter için sayısal bir kod verir. -CONCATENATE = BİRLEŞTİR ## Pek çok metin öğesini bir metin öğesi olarak birleştirir. -DOLLAR = LİRA ## Bir sayıyı YTL (yeni Türk lirası) para birimi biçimini kullanarak metne dönüştürür. -EXACT = ÖZDEŞ ## İki metin değerinin özdeş olup olmadığını anlamak için, değerleri denetler. -FIND = BUL ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlıdır). -FINDB = BULB ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlıdır). -FIXED = SAYIDÜZENLE ## Bir sayıyı, sabit sayıda ondalıkla, metin olarak biçimlendirir. -JIS = JIS ## Bir karakter dizesindeki tek enli (tek bayt) İngilizce harfleri veya katakanayı çift enli (iki bayt) karakterlerle değiştirir. -LEFT = SOL ## Bir metin değerinden en soldaki karakterleri verir. -LEFTB = SOLB ## Bir metin değerinden en soldaki karakterleri verir. -LEN = UZUNLUK ## Bir metin dizesindeki karakter sayısını verir. -LENB = UZUNLUKB ## Bir metin dizesindeki karakter sayısını verir. -LOWER = KÜÇÜKHARF ## Metni küçük harfe çevirir. -MID = ORTA ## Bir metin dizesinden belirli sayıda karakteri, belirttiğiniz konumdan başlamak üzere verir. -MIDB = ORTAB ## Bir metin dizesinden belirli sayıda karakteri, belirttiğiniz konumdan başlamak üzere verir. -PHONETIC = SES ## Metin dizesinden ses (furigana) karakterlerini ayıklar. -PROPER = YAZIM.DÜZENİ ## Bir metin değerinin her bir sözcüğünün ilk harfini büyük harfe çevirir. -REPLACE = DEĞİŞTİR ## Metnin içindeki karakterleri değiştirir. -REPLACEB = DEĞİŞTİRB ## Metnin içindeki karakterleri değiştirir. -REPT = YİNELE ## Metni belirtilen sayıda yineler. -RIGHT = SAĞ ## Bir metin değerinden en sağdaki karakterleri verir. -RIGHTB = SAĞB ## Bir metin değerinden en sağdaki karakterleri verir. -SEARCH = BUL ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlı değildir). -SEARCHB = BULB ## Bir metin değerini, bir başkasının içinde bulur (büyük küçük harf duyarlı değildir). -SUBSTITUTE = YERİNEKOY ## Bir metin dizesinde, eski metnin yerine yeni metin koyar. -T = M ## Bağımsız değerlerini metne dönüştürür. -TEXT = METNEÇEVİR ## Bir sayıyı biçimlendirir ve metne dönüştürür. -TRIM = KIRP ## Metindeki boşlukları kaldırır. -UPPER = BÜYÜKHARF ## Metni büyük harfe çevirir. -VALUE = SAYIYAÇEVİR ## Bir metin bağımsız değişkenini sayıya dönüştürür. diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DAVERAGE.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DAVERAGE.php deleted file mode 100644 index 8bfe2c8..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DAVERAGE.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DAVERAGE</h1> -<h2>Returns the average of selected database entries.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The Average yield of Apple trees over 10\' in height'); -$worksheet->setCellValue('B12', '=DAVERAGE(A4:E10,"Yield",A1:B2)'); - -$worksheet->setCellValue('A13', 'The Average age of all Apple and Pear trees in the orchard'); -$worksheet->setCellValue('B13', '=DAVERAGE(A4:E10,3,A1:A3)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:B2',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DAVERAGE() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DAVERAGE() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DCOUNT.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DCOUNT.php deleted file mode 100644 index 13ad1fb..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DCOUNT.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DCOUNT</h1> -<h2>Counts the cells that contain numbers in a database.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The Number of Apple trees over 10\' in height'); -$worksheet->setCellValue('B12', '=DCOUNT(A4:E10,"Yield",A1:B2)'); - -$worksheet->setCellValue('A13', 'The Number of Apple and Pear trees in the orchard'); -$worksheet->setCellValue('B13', '=DCOUNT(A4:E10,3,A1:A3)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:B2',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DCOUNT() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DCOUNT() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DGET.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DGET.php deleted file mode 100644 index 9a2b22c..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DGET.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DGET</h1> -<h2>Extracts a single value from a column of a list or database that matches conditions that you specify.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The height of the Apple tree between 10\' and 16\' tall'); -$worksheet->setCellValue('B12', '=DGET(A4:E10,"Height",A1:F2)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -echo 'ALL' . '<br /><br />'; - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DMAX.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DMAX.php deleted file mode 100644 index 116d848..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DMAX.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DMAX</h1> -<h2>Returns the maximum value from selected database entries.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The tallest tree in the orchard'); -$worksheet->setCellValue('B12', '=DMAX(A4:E10,"Height",A4:E10)'); - -$worksheet->setCellValue('A13', 'The Oldest apple tree in the orchard'); -$worksheet->setCellValue('B13', '=DMAX(A4:E10,3,A1:A2)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -echo 'ALL' . '<br /><br />'; - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DMIN.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DMIN.php deleted file mode 100644 index 55207e8..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DMIN.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DMIN</h1> -<h2>Returns the minimum value from selected database entries.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The shortest tree in the orchard'); -$worksheet->setCellValue('B12', '=DMIN(A4:E10,"Height",A4:E10)'); - -$worksheet->setCellValue('A13', 'The Youngest apple tree in the orchard'); -$worksheet->setCellValue('B13', '=DMIN(A4:E10,3,A1:A2)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -echo 'ALL' . '<br /><br />'; - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DMIN() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DMIN() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DPRODUCT.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DPRODUCT.php deleted file mode 100644 index 8c08421..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DPRODUCT.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DPRODUCT</h1> -<h2>Multiplies the values in a column of a list or database that match conditions that you specify.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The product of the yields of all Apple trees over 10\' in the orchard'); -$worksheet->setCellValue('B12', '=DPRODUCT(A4:E10,"Yield",A1:B2)'); - - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -echo 'ALL' . '<br /><br />'; - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DMAX() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A2',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DMAX() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DSTDEV.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DSTDEV.php deleted file mode 100644 index 28896e6..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DSTDEV.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DSTDEV</h1> -<h2>Estimates the standard deviation based on a sample of selected database entries.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The estimated standard deviation in the yield of Apple and Pear trees'); -$worksheet->setCellValue('B12', '=DSTDEV(A4:E10,"Yield",A1:A3)'); - -$worksheet->setCellValue('A13', 'The estimated standard deviation in height of Apple and Pear trees'); -$worksheet->setCellValue('B13', '=DSTDEV(A4:E10,2,A1:A3)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DSTDEV() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DSTDEV() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DSTDEVP.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DSTDEVP.php deleted file mode 100644 index 6540f9a..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DSTDEVP.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DSTDEVP</h1> -<h2>Calculates the standard deviation based on the entire population of selected database entries.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The standard deviation in the yield of Apple and Pear trees'); -$worksheet->setCellValue('B12', '=DSTDEVP(A4:E10,"Yield",A1:A3)'); - -$worksheet->setCellValue('A13', 'The standard deviation in height of Apple and Pear trees'); -$worksheet->setCellValue('B13', '=DSTDEVP(A4:E10,2,A1:A3)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DSTDEVP() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DSTDEVP() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DVAR.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DVAR.php deleted file mode 100644 index 67a9cff..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DVAR.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DVAR</h1> -<h2>Estimates variance based on a sample from selected database entries.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The estimated variance in the yield of Apple and Pear trees'); -$worksheet->setCellValue('B12', '=DVAR(A4:E10,"Yield",A1:A3)'); - -$worksheet->setCellValue('A13', 'The estimated variance in height of Apple and Pear trees'); -$worksheet->setCellValue('B13', '=DVAR(A4:E10,2,A1:A3)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DVAR() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DVAR() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DVARP.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DVARP.php deleted file mode 100644 index fda6338..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/Database/DVARP.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DVARP</h1> -<h2>Calculates variance based on the entire population of selected database entries,</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$database = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), - ); -$criteria = array( array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ) - ); - -$worksheet->fromArray( $criteria, NULL, 'A1' ); -$worksheet->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', 'The variance in the yield of Apple and Pear trees'); -$worksheet->setCellValue('B12', '=DVARP(A4:E10,"Yield",A1:A3)'); - -$worksheet->setCellValue('A13', 'The variance in height of Apple and Pear trees'); -$worksheet->setCellValue('B13', '=DVARP(A4:E10,2,A1:A3)'); - - -echo '<hr />'; - - -echo '<h4>Database</h4>'; - -$databaseData = $worksheet->rangeToArray('A4:E10',null,true,true,true); -var_dump($databaseData); - - -echo '<hr />'; - - -// Test the formulae -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A12")->getValue() .'<br />'; -echo 'DVARP() Result is ' . $worksheet->getCell("B12")->getCalculatedValue() .'<br /><br />'; - -echo '<h4>Criteria</h4>'; - -$criteriaData = $worksheet->rangeToArray('A1:A3',null,true,true,true); -var_dump($criteriaData); - -echo $worksheet->getCell("A13")->getValue() .'<br />'; -echo 'DVARP() Result is ' . $worksheet->getCell("B13")->getCalculatedValue(); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/DATE.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/DATE.php deleted file mode 100644 index 979d1f5..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/DATE.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DATE</h1> -<h2>Returns the serial number of a particular date.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$testDates = array( array(2012,3,26), array(2012,2,29), array(2012,4,1), array(2012,12,25), - array(2012,10,31), array(2012,11,5), array(2012,1,1), array(2012,3,17), - array(2011,2,29), array(7,5,3), array(2012,13,1), array(2012,11,45), - array(2012,0,0), array(2012,1,0), array(2012,0,1), - array(2012,-2,2), array(2012,2,-2), array(2012,-2,-2), - ); -$testDateCount = count($testDates); - -$worksheet->fromArray($testDates,NULL,'A1',true); - -for ($row = 1; $row <= $testDateCount; ++$row) { - $worksheet->setCellValue('D'.$row, '=DATE(A'.$row.',B'.$row.',C'.$row.')'); - $worksheet->setCellValue('E'.$row, '=D'.$row); -} -$worksheet->getStyle('E1:E'.$testDateCount) - ->getNumberFormat() - ->setFormatCode('yyyy-mmm-dd'); - - -echo '<hr />'; - - -// Test the formulae -?> -<table border="1" cellspacing="0"> - <tr> - <th colspan="3">Date Value</th> - <th rowspan="2" valign="bottom">Formula</th> - <th rowspan="2" valign="bottom">Excel DateStamp</th> - <th rowspan="2" valign="bottom">Formatted DateStamp</th> - </tr> - <tr> - <th>Year</th> - <th>Month</th> - <th>Day</th> - <tr> - <?php - for ($row = 1; $row <= $testDateCount; ++$row) { - echo '<tr>'; - echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>'; - echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>'; - echo '</tr>'; - } - ?> -</table> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/DATEVALUE.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/DATEVALUE.php deleted file mode 100644 index 4d5d8c2..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/DATEVALUE.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>DATEVALUE</h1> -<h2>Converts a date in the form of text to a serial number.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$testDates = array( '26 March 2012', '29 Feb 2012', 'April 1, 2012', '25/12/2012', - '2012-Oct-31', '5th November', 'January 1st', 'April 2012', - '17-03', '03-2012', '29 Feb 2011', '03-05-07', - '03-MAY-07', '03-13-07', - ); -$testDateCount = count($testDates); - -for($row = 1; $row <= $testDateCount; ++$row) { - $worksheet->setCellValue('A'.$row, $testDates[$row-1]); - $worksheet->setCellValue('B'.$row, '=DATEVALUE(A'.$row.')'); - $worksheet->setCellValue('C'.$row, '=B'.$row); -} - -$worksheet->getStyle('C1:C'.$testDateCount) - ->getNumberFormat() - ->setFormatCode('yyyy-mmm-dd'); - - -echo '<hr />'; - - -// Test the formulae -?> -<p><strong>Warning: </strong>The PHPExcel DATEVALUE() function accepts a wider range of date formats than MS Excel's DATEFORMAT() function.</p> -<table border="1" cellspacing="0"> - <tr> - <th>Date String</th> - <th>Formula</th> - <th>Excel DateStamp</th> - <th>Formatted DateStamp</th> - </tr> - <?php - for ($row = 1; $row <= $testDateCount; ++$row) { - echo '<tr>'; - echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>'; - echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>'; - echo '</tr>'; - } - ?> -</table> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/TIME.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/TIME.php deleted file mode 100644 index f452276..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/TIME.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>TIME</h1> -<h2>Returns the serial number of a particular time.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$testDates = array( array(3,15), array(13,15), array(15,15,15), array(3,15,30), - array(15,15,15), array(5), array(9,15,0), array(9,15,-1), - array(13,-14,-15), array(0,0,-1) - ); -$testDateCount = count($testDates); - -$worksheet->fromArray($testDates,NULL,'A1',true); - -for ($row = 1; $row <= $testDateCount; ++$row) { - $worksheet->setCellValue('D'.$row, '=TIME(A'.$row.',B'.$row.',C'.$row.')'); - $worksheet->setCellValue('E'.$row, '=D'.$row); -} -$worksheet->getStyle('E1:E'.$testDateCount) - ->getNumberFormat() - ->setFormatCode('hh:mm:ss'); - - -echo '<hr />'; - - -// Test the formulae -?> -<table border="1" cellspacing="0"> - <tr> - <th colspan="3">Date Value</th> - <th rowspan="2" valign="bottom">Formula</th> - <th rowspan="2" valign="bottom">Excel TimeStamp</th> - <th rowspan="2" valign="bottom">Formatted TimeStamp</th> - </tr> - <tr> - <th>Hour</th> - <th>Minute</th> - <th>Second</th> - <tr> - <?php - for ($row = 1; $row <= $testDateCount; ++$row) { - echo '<tr>'; - echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('D'.$row)->getValue() , '</td>'; - echo '<td>' , $worksheet->getCell('D'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('E'.$row)->getFormattedValue() , '</td>'; - echo '</tr>'; - } - ?> -</table> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/TIMEVALUE.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/TIMEVALUE.php deleted file mode 100644 index 89e0ba4..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/DateTime/TIMEVALUE.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Examples</title> - -</head> -<body> - -<h1>TIMEVALUE</h1> -<h2>Converts a time in the form of text to a serial number.</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../../Classes/'); - -/** Include PHPExcel */ -include 'PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -// Add some data -$testDates = array( '3:15', '13:15', '15:15:15', '3:15 AM', '3:15 PM', '5PM', '9:15AM', '13:15AM' - ); -$testDateCount = count($testDates); - -for($row = 1; $row <= $testDateCount; ++$row) { - $worksheet->setCellValue('A'.$row, $testDates[$row-1]); - $worksheet->setCellValue('B'.$row, '=TIMEVALUE(A'.$row.')'); - $worksheet->setCellValue('C'.$row, '=B'.$row); -} - -$worksheet->getStyle('C1:C'.$testDateCount) - ->getNumberFormat() - ->setFormatCode('hh:mm:ss'); - - -echo '<hr />'; - - -// Test the formulae -?> -<table border="1" cellspacing="0"> - <tr> - <th>Time String</th> - <th>Formula</th> - <th>Excel TimeStamp</th> - <th>Formatted TimeStamp</th> - </tr> - <?php - for ($row = 1; $row <= $testDateCount; ++$row) { - echo '<tr>'; - echo '<td>' , $worksheet->getCell('A'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('B'.$row)->getValue() , '</td>'; - echo '<td>' , $worksheet->getCell('B'.$row)->getFormattedValue() , '</td>'; - echo '<td>' , $worksheet->getCell('C'.$row)->getFormattedValue() , '</td>'; - echo '</tr>'; - } - ?> -</table> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/index.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/index.php deleted file mode 100644 index 644e3af..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Calculations/index.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Calculation Function Examples</title> - -</head> -<body> - -<?php - -echo '<h1>PHPExcel Calculation Function Examples</h1>'; - -$exampleTypeList = glob('./*',GLOB_ONLYDIR); - -foreach($exampleTypeList as $exampleType) { - - echo '<h2>' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Function Examples</h2>'; - - $exampleList = glob('./'.$exampleType.'/*.php'); - - foreach($exampleList as $exampleFile) { - $fileData = file_get_contents($exampleFile); - - $h1Pattern = '#<h1>(.*?)</h1>#'; - $h2Pattern = '#<h2>(.*?)</h2>#'; - - if (preg_match($h1Pattern, $fileData, $out)) { - $h1Text = $out[1]; - $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : ''; - - echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />'; - if ($h2Text > '') { - echo $h2Text,'<br />'; - } - } - - } -} - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader01.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader01.php deleted file mode 100644 index 8883e12..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader01.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #01</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #01</h1> -<h2>Simple File Reader using PHPExcel_IOFactory::load()</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileName = './sampleData/example1.xls'; -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; -$objPHPExcel = PHPExcel_IOFactory::load($inputFileName); - - -echo '<hr />'; - -$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); -var_dump($sheetData); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader02.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader02.php deleted file mode 100644 index b2293c3..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader02.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #02</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #02</h1> -<h2>Simple File Reader using a Specified Reader</h2> -<?php - -$inputFileName = './sampleData/example1.xls'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using PHPExcel_Reader_Excel5<br />'; -$objReader = new PHPExcel_Reader_Excel5(); -// $objReader = new PHPExcel_Reader_Excel2007(); -// $objReader = new PHPExcel_Reader_Excel2003XML(); -// $objReader = new PHPExcel_Reader_OOCalc(); -// $objReader = new PHPExcel_Reader_SYLK(); -// $objReader = new PHPExcel_Reader_Gnumeric(); -// $objReader = new PHPExcel_Reader_CSV(); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); -var_dump($sheetData); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader03.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader03.php deleted file mode 100644 index b4ab256..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader03.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #03</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #03</h1> -<h2>Simple File Reader using the PHPExcel_IOFactory to Return a Reader</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'SYLK'; -// $inputFileType = 'Gnumeric'; -// $inputFileType = 'CSV'; -$inputFileName = './sampleData/example1.xls'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); -var_dump($sheetData); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader04.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader04.php deleted file mode 100644 index cf87b2b..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader04.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #04</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #04</h1> -<h2>Simple File Reader using the PHPExcel_IOFactory to Identify a Reader to Use</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileName = './sampleData/example1.xls'; - -$inputFileType = PHPExcel_IOFactory::identify($inputFileName); -echo 'File ',pathinfo($inputFileName,PATHINFO_BASENAME),' has been identified as an ',$inputFileType,' file<br />'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with the identified reader type<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); -var_dump($sheetData); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader05.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader05.php deleted file mode 100644 index 1317f07..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader05.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #05</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #05</h1> -<h2>Simple File Reader using the "Read Data Only" Option</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -echo 'Turning Formatting off for Load<br />'; -$objReader->setReadDataOnly(true); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); -var_dump($sheetData); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader06.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader06.php deleted file mode 100644 index 58c2d26..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader06.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #06</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #06</h1> -<h2>Simple File Reader Loading All WorkSheets</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -echo 'Loading all WorkSheets<br />'; -$objReader->setLoadAllSheets(); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; -$loadedSheetNames = $objPHPExcel->getSheetNames(); -foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) { - echo $sheetIndex,' -> ',$loadedSheetName,'<br />'; -} - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader07.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader07.php deleted file mode 100644 index 80acdf6..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader07.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #07</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #07</h1> -<h2>Simple File Reader Loading a Single Named WorkSheet</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; -$sheetname = 'Data Sheet #2'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -echo 'Loading Sheet "',$sheetname,'" only<br />'; -$objReader->setLoadSheetsOnly($sheetname); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; -$loadedSheetNames = $objPHPExcel->getSheetNames(); -foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) { - echo $sheetIndex,' -> ',$loadedSheetName,'<br />'; -} - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader08.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader08.php deleted file mode 100644 index 3c38e02..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader08.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #08</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #08</h1> -<h2>Simple File Reader Loading Several Named WorkSheets</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; -$sheetnames = array('Data Sheet #1','Data Sheet #3'); - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -echo 'Loading Sheet',((count($sheetnames) == 1) ? '' : 's'),' "',implode('" and "',$sheetnames),'" only<br />'; -$objReader->setLoadSheetsOnly($sheetnames); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; -$loadedSheetNames = $objPHPExcel->getSheetNames(); -foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) { - echo $sheetIndex,' -> ',$loadedSheetName,'<br />'; -} - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader09.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader09.php deleted file mode 100644 index 3bfa8f0..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader09.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #09</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #09</h1> -<h2>Simple File Reader Using a Read Filter</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; -$sheetname = 'Data Sheet #3'; - - -class MyReadFilter implements PHPExcel_Reader_IReadFilter -{ - public function readCell($column, $row, $worksheetName = '') { - // Read rows 1 to 7 and columns A to E only - if ($row >= 1 && $row <= 7) { - if (in_array($column,range('A','E'))) { - return true; - } - } - return false; - } -} - -$filterSubset = new MyReadFilter(); - - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -echo 'Loading Sheet "',$sheetname,'" only<br />'; -$objReader->setLoadSheetsOnly($sheetname); -echo 'Loading Sheet using filter<br />'; -$objReader->setReadFilter($filterSubset); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); -var_dump($sheetData); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader10.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader10.php deleted file mode 100644 index eb43ff8..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader10.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #10</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #10</h1> -<h2>Simple File Reader Using a Configurable Read Filter</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; -$sheetname = 'Data Sheet #3'; - - -class MyReadFilter implements PHPExcel_Reader_IReadFilter -{ - private $_startRow = 0; - - private $_endRow = 0; - - private $_columns = array(); - - public function __construct($startRow, $endRow, $columns) { - $this->_startRow = $startRow; - $this->_endRow = $endRow; - $this->_columns = $columns; - } - - public function readCell($column, $row, $worksheetName = '') { - if ($row >= $this->_startRow && $row <= $this->_endRow) { - if (in_array($column,$this->_columns)) { - return true; - } - } - return false; - } -} - -$filterSubset = new MyReadFilter(9,15,range('G','K')); - - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -echo 'Loading Sheet "',$sheetname,'" only<br />'; -$objReader->setLoadSheetsOnly($sheetname); -echo 'Loading Sheet using configurable filter<br />'; -$objReader->setReadFilter($filterSubset); -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); -var_dump($sheetData); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader11.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader11.php deleted file mode 100644 index 7bbd808..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader11.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #11</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #11</h1> -<h2>Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 1)</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example2.xls'; - - -/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */ -class chunkReadFilter implements PHPExcel_Reader_IReadFilter -{ - private $_startRow = 0; - - private $_endRow = 0; - - /** We expect a list of the rows that we want to read to be passed into the constructor */ - public function __construct($startRow, $chunkSize) { - $this->_startRow = $startRow; - $this->_endRow = $startRow + $chunkSize; - } - - public function readCell($column, $row, $worksheetName = '') { - // Only read the heading row, and the rows that were configured in the constructor - if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) { - return true; - } - return false; - } -} - - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - - -echo '<hr />'; - - -/** Define how many rows we want for each "chunk" **/ -$chunkSize = 20; - -/** Loop to read our worksheet in "chunk size" blocks **/ -for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) { - echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow+$chunkSize-1),'<br />'; - /** Create a new Instance of our Read Filter, passing in the limits on which rows we want to read **/ - $chunkFilter = new chunkReadFilter($startRow,$chunkSize); - /** Tell the Reader that we want to use the new Read Filter that we've just Instantiated **/ - $objReader->setReadFilter($chunkFilter); - /** Load only the rows that match our filter from $inputFileName to a PHPExcel Object **/ - $objPHPExcel = $objReader->load($inputFileName); - - // Do some processing here - - $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); - var_dump($sheetData); - echo '<br /><br />'; -} - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader12.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader12.php deleted file mode 100644 index e6789c2..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader12.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #12</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #12</h1> -<h2>Reading a Workbook in "Chunks" Using a Configurable Read Filter (Version 2)</h2> -<?php - -/** Set Include path to point at the PHPExcel Classes folder **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** Include PHPExcel_IOFactory **/ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example2.xls'; - - -/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */ -class chunkReadFilter implements PHPExcel_Reader_IReadFilter -{ - private $_startRow = 0; - - private $_endRow = 0; - - /** Set the list of rows that we want to read */ - public function setRows($startRow, $chunkSize) { - $this->_startRow = $startRow; - $this->_endRow = $startRow + $chunkSize; - } - - public function readCell($column, $row, $worksheetName = '') { - // Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow - if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) { - return true; - } - return false; - } -} - - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - - -echo '<hr />'; - - -/** Define how many rows we want to read for each "chunk" **/ -$chunkSize = 20; -/** Create a new Instance of our Read Filter **/ -$chunkFilter = new chunkReadFilter(); - -/** Tell the Reader that we want to use the Read Filter that we've Instantiated **/ -$objReader->setReadFilter($chunkFilter); - -/** Loop to read our worksheet in "chunk size" blocks **/ -for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) { - echo 'Loading WorkSheet using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow+$chunkSize-1),'<br />'; - /** Tell the Read Filter, the limits on which rows we want to read this iteration **/ - $chunkFilter->setRows($startRow,$chunkSize); - /** Load only the rows that match our filter from $inputFileName to a PHPExcel Object **/ - $objPHPExcel = $objReader->load($inputFileName); - - // Do some processing here - - $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); - var_dump($sheetData); - echo '<br /><br />'; -} - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader13.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader13.php deleted file mode 100644 index 3e11e8b..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader13.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #13</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #13</h1> -<h2>Simple File Reader for Multiple CSV Files</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'CSV'; -$inputFileNames = array('./sampleData/example1.csv','./sampleData/example2.csv'); - -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -$inputFileName = array_shift($inputFileNames); -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' into WorkSheet #1 using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objPHPExcel = $objReader->load($inputFileName); -$objPHPExcel->getActiveSheet()->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME)); -foreach($inputFileNames as $sheet => $inputFileName) { - echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' into WorkSheet #',($sheet+2),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; - $objReader->setSheetIndex($sheet+1); - $objReader->loadIntoExisting($inputFileName,$objPHPExcel); - $objPHPExcel->getActiveSheet()->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME)); -} - - -echo '<hr />'; - -echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; -$loadedSheetNames = $objPHPExcel->getSheetNames(); -foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) { - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'</b><br />'; - $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); - $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); - var_dump($sheetData); - echo '<br /><br />'; -} - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader14.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader14.php deleted file mode 100644 index 1cef710..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader14.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #15</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #14</h1> -<h2>Reading a Large CSV file in "Chunks" to split across multiple Worksheets</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'CSV'; -$inputFileName = './sampleData/example2.csv'; - -/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */ -class chunkReadFilter implements PHPExcel_Reader_IReadFilter -{ - private $_startRow = 0; - - private $_endRow = 0; - - /** Set the list of rows that we want to read */ - public function setRows($startRow, $chunkSize) { - $this->_startRow = $startRow; - $this->_endRow = $startRow + $chunkSize; - } - - public function readCell($column, $row, $worksheetName = '') { - // Only read the heading row, and the rows that are configured in $this->_startRow and $this->_endRow - if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) { - return true; - } - return false; - } -} - - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - - -echo '<hr />'; - - -/** Define how many rows we want to read for each "chunk" **/ -$chunkSize = 100; -/** Create a new Instance of our Read Filter **/ -$chunkFilter = new chunkReadFilter(); - -/** Tell the Reader that we want to use the Read Filter that we've Instantiated **/ -/** and that we want to store it in contiguous rows/columns **/ -$objReader->setReadFilter($chunkFilter) - ->setContiguous(true); - - -/** Instantiate a new PHPExcel object manually **/ -$objPHPExcel = new PHPExcel(); - -/** Set a sheet index **/ -$sheet = 0; -/** Loop to read our worksheet in "chunk size" blocks **/ -/** $startRow is set to 2 initially because we always read the headings in row #1 **/ -for ($startRow = 2; $startRow <= 240; $startRow += $chunkSize) { - echo 'Loading WorkSheet #',($sheet+1),' using configurable filter for headings row 1 and for rows ',$startRow,' to ',($startRow+$chunkSize-1),'<br />'; - /** Tell the Read Filter, the limits on which rows we want to read this iteration **/ - $chunkFilter->setRows($startRow,$chunkSize); - - /** Increment the worksheet index pointer for the Reader **/ - $objReader->setSheetIndex($sheet); - /** Load only the rows that match our filter into a new worksheet in the PHPExcel Object **/ - $objReader->loadIntoExisting($inputFileName,$objPHPExcel); - /** Set the worksheet title (to reference the "sheet" of data that we've loaded) **/ - /** and increment the sheet index as well **/ - $objPHPExcel->getActiveSheet()->setTitle('Country Data #'.(++$sheet)); -} - - -echo '<hr />'; - -echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; -$loadedSheetNames = $objPHPExcel->getSheetNames(); -foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) { - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,'</b><br />'; - $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); - $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,false,false,true); - var_dump($sheetData); - echo '<br />'; -} - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader15.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader15.php deleted file mode 100644 index 566c3c9..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader15.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #15</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #15</h1> -<h2>Simple File Reader for Tab-Separated Value File using the Advanced Value Binder</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() ); - - -$inputFileType = 'CSV'; -$inputFileName = './sampleData/example1.tsv'; - -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' into WorkSheet #1 using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader->setDelimiter("\t"); -$objPHPExcel = $objReader->load($inputFileName); -$objPHPExcel->getActiveSheet()->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME)); - - -echo '<hr />'; - -echo $objPHPExcel->getSheetCount(),' worksheet',(($objPHPExcel->getSheetCount() == 1) ? '' : 's'),' loaded<br /><br />'; -$loadedSheetNames = $objPHPExcel->getSheetNames(); -foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) { - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Formatted)</b><br />'; - $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); - $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); - var_dump($sheetData); - echo '<br />'; -} - -echo '<hr />'; - -foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) { - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Unformatted)</b><br />'; - $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); - $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,false,true); - var_dump($sheetData); - echo '<br />'; -} - -echo '<hr />'; - -foreach($loadedSheetNames as $sheetIndex => $loadedSheetName) { - echo '<b>Worksheet #',$sheetIndex,' -> ',$loadedSheetName,' (Raw)</b><br />'; - $objPHPExcel->setActiveSheetIndexByName($loadedSheetName); - $sheetData = $objPHPExcel->getActiveSheet()->toArray(null,false,false,true); - var_dump($sheetData); - echo '<br />'; -} - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader16.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader16.php deleted file mode 100644 index 9d9defa..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader16.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #16</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #16</h1> -<h2>Handling Loader Exceptions using Try/Catch</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileName = './sampleData/example_1.xls'; -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory to identify the format<br />'; -try { - $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); -} catch(PHPExcel_Reader_Exception $e) { - die('Error loading file "'.pathinfo($inputFileName,PATHINFO_BASENAME).'": '.$e->getMessage()); -} - - -echo '<hr />'; - -$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true); -var_dump($sheetData); - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader17.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader17.php deleted file mode 100644 index b0ef791..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader17.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #17</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #17</h1> -<h2>Simple File Reader Loading Several Named WorkSheets</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - - -/** Read the list of Worksheet Names from the Workbook file **/ -echo 'Read the list of Worksheets in the WorkBook<br />'; -$worksheetNames = $objReader->listWorksheetNames($inputFileName); - -echo 'There are ',count($worksheetNames),' worksheet',((count($worksheetNames) == 1) ? '' : 's'),' in the workbook<br /><br />'; -foreach($worksheetNames as $worksheetName) { - echo $worksheetName,'<br />'; -} - - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader18.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader18.php deleted file mode 100644 index 438d886..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader18.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #18</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #18</h1> -<h2>Reading list of WorkSheets without loading entire file</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />'; - -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -$worksheetNames = $objReader->listWorksheetNames($inputFileName); - -echo '<h3>Worksheet Names</h3>'; -echo '<ol>'; -foreach ($worksheetNames as $worksheetName) { - echo '<li>', $worksheetName, '</li>'; -} -echo '</ol>'; - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader19.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader19.php deleted file mode 100644 index 2f3eaaf..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/exampleReader19.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reader Example #19</title> - -</head> -<body> - -<h1>PHPExcel Reader Example #19</h1> -<h2>Reading WorkSheet information without loading entire file</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'Gnumeric'; -$inputFileName = './sampleData/example1.xls'; - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' information using IOFactory with a defined reader type of ',$inputFileType,'<br />'; - -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -$worksheetData = $objReader->listWorksheetInfo($inputFileName); - -echo '<h3>Worksheet Information</h3>'; -echo '<ol>'; -foreach ($worksheetData as $worksheet) { - echo '<li>', $worksheet['worksheetName'], '<br />'; - echo 'Rows: ', $worksheet['totalRows'], ' Columns: ', $worksheet['totalColumns'], '<br />'; - echo 'Cell Range: A1:', $worksheet['lastColumnLetter'], $worksheet['totalRows']; - echo '</li>'; -} -echo '</ol>'; - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.csv b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.csv deleted file mode 100644 index b8cdf18..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.csv +++ /dev/null @@ -1,4 +0,0 @@ -First Name,Last Name,Nationality,Gender,Date of Birth,Time of Birth,Date/Time,PHP Coder,Sanity %Age -Mark,Baker,British,M,19-Dec-1960,01:30,=E2+F2,TRUE,32% -Toni,Baker,British,F,24-Nov-1950,20:00,=E3+F3,FALSE,95% -Rachel,Baker,British,F,7-Dec-1982,00:15,=E4+F4,FALSE,100% \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.tsv b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.tsv deleted file mode 100644 index 29c9297..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.tsv +++ /dev/null @@ -1,4 +0,0 @@ -First Name Last Name Nationality Gender Date of Birth Time of Birth Date/Time PHP Coder Sanity %Age -Mark Baker British M 19-Dec-1960 01:30 =E2+F2 TRUE 32% -Toni Baker British F 24-Nov-1950 20:00 =E3+F3 FALSE 95% -Rachel Baker British F 7-Dec-1982 00:15 =E4+F4 FALSE 100% \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.xls b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.xls deleted file mode 100644 index bd9bb11..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example1.xls and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example2.csv b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example2.csv deleted file mode 100644 index 1750f1b..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example2.csv +++ /dev/null @@ -1,223 +0,0 @@ -"City","Country","Latitude","Longitude" -"Kabul","Afghanistan",34.528455,69.171703 -"Tirane","Albania",41.33,19.82 -"Algiers","Algeria",36.752887,3.042048 -"Pago Pago","American Samoa",-14.27933,-170.700897 -"Andorra la Vella","Andorra",42.507531,1.521816 -"Luanda","Angola",-8.838333,13.234444 -"Buenos Aires","Argentina",-34.608417,-58.373161 -"Yerevan","Armenia",40.183333,44.516667 -"Oranjestad","Aruba",12.52458,-70.026459 -"Canberra","Australia",-35.3075,149.124417 -"Vienna","Austria",48.208333,16.373056 -"Baku","Azerbaijan",40.379571,49.891233 -"Nassau","Bahamas",25.06,-77.345 -"Manama","Bahrain",26.216667,50.583333 -"Dhaka","Bangladesh",23.709921,90.407143 -"Bridgetown","Barbados",13.096111,-59.608333 -"Minsk","Belarus",53.9,27.566667 -"Brussels","Belgium",50.846281,4.354727 -"Belmopan","Belize",17.251389,-88.766944 -"Thimphu","Bhutan",27.466667,89.641667 -"La Paz","Bolivia",-16.49901,-68.146248 -"Sarajevo","Bosnia and Herzegovina",43.8476,18.3564 -"Gaborone","Botswana",-24.65411,25.908739 -"Brasilia","Brazil",-15.780148,-47.92917 -"Road Town","British Virgin Islands",18.433333,-64.616667 -"Bandar Seri Begawan","Brunei Darussalam",4.9431,114.9425 -"Sofia","Bulgaria",42.697626,23.322284 -"Ouagadougou","Burkina Faso",12.364637,-1.533864 -"Bujumbura","Burundi",-3.361378,29.359878 -"Phnom Penh","Cambodia",11.55,104.916667 -"Yaounde","Cameroon",3.866667,11.516667 -"Ottawa","Canada",45.423494,-75.697933 -"Praia","Cape Verde",14.920833,-23.508333 -"George Town","Cayman Islands",19.286932,-81.367439 -"Bangui","Central African Republic",4.361698,18.555975 -"N'Djamena","Chad",12.104797,15.044506 -"Santiago","Chile",-33.42536,-70.566466 -"Beijing","China",39.904667,116.408198 -"Bogota","Colombia",4.647302,-74.096268 -"Moroni","Comoros",-11.717216,43.247315 -"Brazzaville","Congo",-4.266667,15.283333 -"San Jose","Costa Rica",9.933333,-84.083333 -"Yamoussoukro","Cote d'Ivoire",6.816667,-5.283333 -"Zagreb","Croatia",45.814912,15.978515 -"Havana","Cuba",23.133333,-82.366667 -"Nicosia","Cyprus",35.166667,33.366667 -"Prague","Czech Republic",50.087811,14.42046 -"Kinshasa","Congo",-4.325,15.322222 -"Copenhagen","Denmark",55.676294,12.568116 -"Djibouti","Djibouti",11.588,43.145 -"Roseau","Dominica",15.301389,-61.388333 -"Santo Domingo","Dominican Republic",18.5,-69.983333 -"Dili","East Timor",-8.566667,125.566667 -"Quito","Ecuador",-0.229498,-78.524277 -"Cairo","Egypt",30.064742,31.249509 -"San Salvador","El Salvador",13.69,-89.190003 -"Malabo","Equatorial Guinea",3.75,8.783333 -"Asmara","Eritrea",15.33236,38.92617 -"Tallinn","Estonia",59.438862,24.754472 -"Addis Ababa","Ethiopia",9.022736,38.746799 -"Stanley","Falkland Islands",-51.700981,-57.84919 -"Torshavn","Faroe Islands",62.017707,-6.771879 -"Suva","Fiji",-18.1416,178.4419 -"Helsinki","Finland",60.169813,24.93824 -"Paris","France",48.856667,2.350987 -"Cayenne","French Guiana",4.9227,-52.3269 -"Papeete","French Polynesia",-17.535021,-149.569595 -"Libreville","Gabon",0.390841,9.453644 -"Banjul","Gambia",13.453056,-16.5775 -"T'bilisi","Georgia",41.716667,44.783333 -"Berlin","Germany",52.523405,13.4114 -"Accra","Ghana",5.555717,-0.196306 -"Athens","Greece",37.97918,23.716647 -"Nuuk","Greenland",64.18362,-51.721407 -"Basse-Terre","Guadeloupe",15.998503,-61.72202 -"Guatemala","Guatemala",14.641389,-90.513056 -"St. Peter Port","Guernsey",49.458858,-2.534752 -"Conakry","Guinea",9.537029,-13.67847 -"Bissau","Guinea-Bissau",11.866667,-15.6 -"Georgetown","Guyana",6.804611,-58.154831 -"Port-au-Prince","Haiti",18.539269,-72.336408 -"Tegucigalpa","Honduras",14.082054,-87.206285 -"Budapest","Hungary",47.498406,19.040758 -"Reykjavik","Iceland",64.135338,-21.89521 -"New Delhi","India",28.635308,77.22496 -"Jakarta","Indonesia",-6.211544,106.845172 -"Tehran","Iran",35.696216,51.422945 -"Baghdad","Iraq",33.3157,44.3922 -"Dublin","Ireland",53.344104,-6.267494 -"Jerusalem","Israel",31.7857,35.2007 -"Rome","Italy",41.895466,12.482324 -"Kingston","Jamaica",17.992731,-76.792009 -"St. Helier","Jersey",49.190278,-2.108611 -"Amman","Jordan",31.956578,35.945695 -"Astana","Kazakhstan",51.10,71.30 -"Nairobi","Kenya",-01.17,36.48 -"Tarawa","Kiribati",01.30,173.00 -"Seoul","South Korea",37.31,126.58 -"Kuwait City","Kuwait",29.30,48.00 -"Bishkek","Kyrgyzstan",42.54,74.46 -"Riga","Latvia",56.53,24.08 -"Beirut","Lebanon",33.53,35.31 -"Maseru","Lesotho",-29.18,27.30 -"Monrovia","Liberia",06.18,-10.47 -"Vaduz","Liechtenstein",47.08,09.31 -"Vilnius","Lithuania",54.38,25.19 -"Luxembourg","Luxembourg",49.37,06.09 -"Antananarivo","Madagascar",-18.55,47.31 -"Lilongwe","Malawi",-14.00,33.48 -"Kuala Lumpur","Malaysia",03.09,101.41 -"Male","Maldives",04.00,73.28 -"Bamako","Mali",12.34,-07.55 -"Valletta","Malta",35.54,14.31 -"Fort-de-France","Martinique",14.36,-61.02 -"Nouakchott","Mauritania",-20.10,57.30 -"Mamoudzou","Mayotte",-12.48,45.14 -"Mexico City","Mexico",19.20,-99.10 -"Palikir","Micronesia",06.55,158.09 -"Chisinau","Moldova",47.02,28.50 -"Maputo","Mozambique",-25.58,32.32 -"Yangon","Myanmar",16.45,96.20 -"Windhoek","Namibia",-22.35,17.04 -"Kathmandu","Nepal",27.45,85.20 -"Amsterdam","Netherlands",52.23,04.54 -"Willemstad","Netherlands Antilles",12.05,-69.00 -"Noumea","New Caledonia",-22.17,166.30 -"Wellington","New Zealand",-41.19,174.46 -"Managua","Nicaragua",12.06,-86.20 -"Niamey","Niger",13.27,02.06 -"Abuja","Nigeria",09.05,07.32 -"Kingston","Norfolk Island",-45.20,168.43 -"Saipan","Northern Mariana Islands",15.12,145.45 -"Oslo","Norway",59.55,10.45 -"Masqat","Oman",23.37,58.36 -"Islamabad","Pakistan",33.40,73.10 -"Koror","Palau",07.20,134.28 -"Panama City","Panama",09.00,-79.25 -"Port Moresby","Papua New Guinea",-09.24,147.08 -"Asuncion","Paraguay",-25.10,-57.30 -"Lima","Peru",-12.00,-77.00 -"Manila","Philippines",14.40,121.03 -"Warsaw","Poland",52.13,21.00 -"Lisbon","Portugal",38.42,-09.10 -"San Juan","Puerto Rico",18.28,-66.07 -"Doha","Qatar",25.15,51.35 -"Bucuresti","Romania",44.27,26.10 -"Moskva","Russian Federation",55.45,37.35 -"Kigali","Rawanda",-01.59,30.04 -"Basseterre","Saint Kitts and Nevis",17.17,-62.43 -"Castries","Saint Lucia",14.02,-60.58 -"Saint-Pierre","Saint Pierre and Miquelon",46.46,-56.12 -"Apia","Samoa",-13.50,-171.50 -"San Marino","San Marino",43.55,12.30 -"Sao Tome","Sao Tome and Principe",00.10,06.39 -"Riyadh","Saudi Arabia",24.41,46.42 -"Dakar","Senegal",14.34,-17.29 -"Freetown","Sierra Leone",08.30,-13.17 -"Bratislava","Slovakia",48.10,17.07 -"Ljubljana","Slovenia",46.04,14.33 -"Honiara","Solomon Islands",-09.27,159.57 -"Mogadishu","Somalia",02.02,45.25 -"Pretoria","South Africa",-25.44,28.12 -"Madrid","Spain",40.25,-03.45 -"Khartoum","Sudan",15.31,32.35 -"Paramaribo","Suriname",05.50,-55.10 -"Mbabane","Swaziland",-26.18,31.06 -"Stockholm","Sweden",59.20,18.03 -"Bern","Switzerland",46.57,07.28 -"Damascus","Syrian Arab Republic",33.30,36.18 -"Dushanbe","Tajikistan",38.33,68.48 -"Bangkok","Thailand",13.45,100.35 -"Lome","Togo",06.09,01.20 -"Nuku'alofa","Tonga",-21.10,-174.00 -"Tunis","Tunisia",36.50,10.11 -"Ankara","Turkey",39.57,32.54 -"Ashgabat","Turkmenistan",38.00,57.50 -"Funafuti","Tuvalu",-08.31,179.13 -"Kampala","Uganda",00.20,32.30 -"Kiev","Ukraine",50.30,30.28 -"Abu Dhabi","United Arab Emirates",24.28,54.22 -"London","United Kingdom",51.36,-00.05 -"Dodoma","Tanzania",-06.08,35.45 -"Washington DC","United States of America",39.91,-77.02 -"Montevideo","Uruguay",-34.50,-56.11 -"Tashkent","Uzbekistan",41.20,69.10 -"Port-Vila","Vanuatu",-17.45,168.18 -"Caracas","Venezuela",10.30,-66.55 -"Hanoi","Viet Nam",21.05,105.55 -"Belgrade","Yugoslavia",44.50,20.37 -"Lusaka","Zambia",-15.28,28.16 -"Harare","Zimbabwe",-17.43,31.02 -"St. John's","Antigua and Barbuda",17.08,-61.50 -"Porto Novo","Benin",06.30,02.47 -"Hamilton","Bermuda"","32.18,-64.48 -"Avarua","Cook Islands",-21.12,-159.46 -"St. George's","Grenada",12.04,-61.44 -"Agaa","Guam",13.28,144.45 -"Victoria","Hong Kong",22.16,114.13 -"Tokyo","Japan",35.40,139.45 -"Pyongyang","North Korea",39.00,125.47 -"Vientiane","Laos",17.59,102.38 -"Tripoli","Libya",32.54,013.11 -"Skopje","Macedonia",42.00,021.28 -"Majuro","Marshall Islands",07.05,171.08 -"Port Louis","Mauritius",-20.10,57.30 -"Monaco","Monaco",43.44,007.25 -"Ulan Bator","Mongolia",47.54,106.52 -"Plymouth","Montserrat",16.44,-62.14 -"Rabat","Morocco",34.02,-06.51 -"Alofi","Niue",-14.27,-178.05 -"Saint-Denis","Runion",-20.52,55.27 -"Victoria","Seychelles",-04.38,55.28 -"Singapore","Singapore",01.18,103.50 -"Colombo","Sri Lanka",06.55,79.52 -"Kingstown","St Vincent and the Grenadines",13.12,-61.14 -"Taipei","Taiwan",25.50,121.32 -"Port-of-Spain","Trinidad and Tobago",10.38,-61.31 -"Cockburn Harbour","Turks and Caicos Islands",21.30,-71.30 -"Charlotte Amalie","US Virgin Islands",18.22,-64.56 -"Vatican City","Vatican State",41.54,12.27 -"Layoune","Western Sahara",27.10,-13.11 -"San'a","Yemen",15.24,44.14 diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example2.xls b/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example2.xls deleted file mode 100644 index dd213ab..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/Examples/Reader/sampleData/example2.xls and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader01.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader01.php deleted file mode 100644 index 4f8dfdf..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader01.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reading WorkBook Data Example #01</title> - -</head> -<body> - -<h1>PHPExcel Reading WorkBook Data Example #01</h1> -<h2>Read the WorkBook Properties</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -$inputFileName = './sampleData/example1.xls'; - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -/** Read the document's creator property **/ -$creator = $objPHPExcel->getProperties()->getCreator(); -echo '<b>Document Creator: </b>',$creator,'<br />'; - -/** Read the Date when the workbook was created (as a PHP timestamp value) **/ -$creationDatestamp = $objPHPExcel->getProperties()->getCreated(); -/** Format the date and time using the standard PHP date() function **/ -$creationDate = date('l, d<\s\up>S</\s\up> F Y',$creationDatestamp); -$creationTime = date('g:i A',$creationDatestamp); -echo '<b>Created On: </b>',$creationDate,' at ',$creationTime,'<br />'; - -/** Read the name of the last person to modify this workbook **/ -$modifiedBy = $objPHPExcel->getProperties()->getLastModifiedBy(); -echo '<b>Last Modified By: </b>',$modifiedBy,'<br />'; - -/** Read the Date when the workbook was last modified (as a PHP timestamp value) **/ -$modifiedDatestamp = $objPHPExcel->getProperties()->getModified(); -/** Format the date and time using the standard PHP date() function **/ -$modifiedDate = date('l, d<\s\up>S</\s\up> F Y',$modifiedDatestamp); -$modifiedTime = date('g:i A',$modifiedDatestamp); -echo '<b>Last Modified On: </b>',$modifiedDate,' at ',$modifiedTime,'<br />'; - -/** Read the workbook title property **/ -$workbookTitle = $objPHPExcel->getProperties()->getTitle(); -echo '<b>Title: </b>',$workbookTitle,'<br />'; - -/** Read the workbook description property **/ -$description = $objPHPExcel->getProperties()->getDescription(); -echo '<b>Description: </b>',$description,'<br />'; - -/** Read the workbook subject property **/ -$subject = $objPHPExcel->getProperties()->getSubject(); -echo '<b>Subject: </b>',$subject,'<br />'; - -/** Read the workbook keywords property **/ -$keywords = $objPHPExcel->getProperties()->getKeywords(); -echo '<b>Keywords: </b>',$keywords,'<br />'; - -/** Read the workbook category property **/ -$category = $objPHPExcel->getProperties()->getCategory(); -echo '<b>Category: </b>',$category,'<br />'; - -/** Read the workbook company property **/ -$company = $objPHPExcel->getProperties()->getCompany(); -echo '<b>Company: </b>',$company,'<br />'; - -/** Read the workbook manager property **/ -$manager = $objPHPExcel->getProperties()->getManager(); -echo '<b>Manager: </b>',$manager,'<br />'; - - -?> -<body> -</html> diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader02.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader02.php deleted file mode 100644 index b8c359d..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader02.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reading WorkBook Data Example #02</title> - -</head> -<body> - -<h1>PHPExcel Reading WorkBook Data Example #02</h1> -<h2>Read a list of Custom Properties for a WorkBook</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel2007'; -$inputFileName = './sampleData/example1.xlsx'; - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -/** Read an array list of any custom properties for this document **/ -$customPropertyList = $objPHPExcel->getProperties()->getCustomProperties(); - -echo '<b>Custom Property names: </b><br />'; -foreach($customPropertyList as $customPropertyName) { - echo $customPropertyName,'<br />'; -} - - - -?> -<body> -</html> diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader03.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader03.php deleted file mode 100644 index 8fb350d..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader03.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reading WorkBook Data Example #03</title> - -</head> -<body> - -<h1>PHPExcel Reading WorkBook Data Example #03</h1> -<h2>Read Custom Property Values for a WorkBook</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel2007'; -$inputFileName = './sampleData/example1.xlsx'; - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -/** Read an array list of any custom properties for this document **/ -$customPropertyList = $objPHPExcel->getProperties()->getCustomProperties(); - -echo '<b>Custom Properties: </b><br />'; -/** Loop through the list of custom properties **/ -foreach($customPropertyList as $customPropertyName) { - echo '<b>',$customPropertyName,': </b>'; - /** Retrieve the property value **/ - $propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customPropertyName); - /** Retrieve the property type **/ - $propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customPropertyName); - - /** Manipulate properties as appropriate for display purposes **/ - switch($propertyType) { - case 'i' : // integer - $propertyType = 'integer number'; - break; - case 'f' : // float - $propertyType = 'floating point number'; - break; - case 's' : // string - $propertyType = 'string'; - break; - case 'd' : // date - $propertyValue = date('l, d<\s\up>S</\s\up> F Y g:i A',$propertyValue); - $propertyType = 'date'; - break; - case 'b' : // boolean - $propertyValue = ($propertyValue) ? 'TRUE' : 'FALSE'; - $propertyType = 'boolean'; - break; - } - - echo $propertyValue,' (',$propertyType,')<br />'; -} - - - -?> -<body> -</html> diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader04.php b/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader04.php deleted file mode 100644 index 05ff637..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/exampleWorkBookReader04.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Reading WorkBook Data Example #04</title> - -</head> -<body> - -<h1>PHPExcel Reading WorkBook Data Example #04</h1> -<h2>Get a List of the Worksheets in a WorkBook</h2> -<?php - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -$inputFileType = 'Excel5'; -$inputFileName = './sampleData/example2.xls'; - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); - - -echo '<hr />'; - -echo 'Reading the number of Worksheets in the WorkBook<br />'; -/** Use the PHPExcel object's getSheetCount() method to get a count of the number of WorkSheets in the WorkBook */ -$sheetCount = $objPHPExcel->getSheetCount(); -echo 'There ',(($sheetCount == 1) ? 'is' : 'are'),' ',$sheetCount,' WorkSheet',(($sheetCount == 1) ? '' : 's'),' in the WorkBook<br /><br />'; - -echo 'Reading the names of Worksheets in the WorkBook<br />'; -/** Use the PHPExcel object's getSheetNames() method to get an array listing the names/titles of the WorkSheets in the WorkBook */ -$sheetNames = $objPHPExcel->getSheetNames(); -foreach($sheetNames as $sheetIndex => $sheetName) { - echo 'WorkSheet #',$sheetIndex,' is named "',$sheetName,'"<br />'; -} - - -?> -<body> -</html> diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example1.xls b/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example1.xls deleted file mode 100644 index 0db0efd..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example1.xls and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example1.xlsx b/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example1.xlsx deleted file mode 100644 index 2224dd4..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example1.xlsx and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example2.xls b/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example2.xls deleted file mode 100644 index 18bfcf4..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/Examples/Reading WorkBook Data/sampleData/example2.xls and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/Examples/index.php b/vendor/phpoffice/phpexcel/Documentation/Examples/index.php deleted file mode 100644 index 8eb8574..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/Examples/index.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -error_reporting(E_ALL); -set_time_limit(0); - -date_default_timezone_set('Europe/London'); - -?> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - -<title>PHPExcel Examples</title> - -</head> -<body> - -<?php - -$exampleTypeList = glob('./*',GLOB_ONLYDIR); - -foreach($exampleTypeList as $exampleType) { - - echo '<h1>PHPExcel ' . pathinfo($exampleType,PATHINFO_BASENAME) . ' Examples</h1>'; - - $exampleList = glob('./'.$exampleType.'/*.php'); - - foreach($exampleList as $exampleFile) { - $fileData = file_get_contents($exampleFile); - - $h1Pattern = '#<h1>(.*?)</h1>#'; - $h2Pattern = '#<h2>(.*?)</h2>#'; - - if (preg_match($h1Pattern, $fileData, $out)) { - $h1Text = $out[1]; - $h2Text = (preg_match($h2Pattern, $fileData, $out)) ? $out[1] : ''; - - echo '<a href="',$exampleFile,'">',$h1Text,'</a><br />'; - if (($h2Text > '') && - (pathinfo($exampleType,PATHINFO_BASENAME) != 'Calculations')) { - echo $h2Text,'<br />'; - } - } - - } -} - -?> -<body> -</html> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/FunctionListByCategory.txt b/vendor/phpoffice/phpexcel/Documentation/FunctionListByCategory.txt deleted file mode 100644 index b23d9a1..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/FunctionListByCategory.txt +++ /dev/null @@ -1,377 +0,0 @@ -CATEGORY_CUBE - CUBEKPIMEMBER *** Not yet Implemented - CUBEMEMBER *** Not yet Implemented - CUBEMEMBERPROPERTY *** Not yet Implemented - CUBERANKEDMEMBER *** Not yet Implemented - CUBESET *** Not yet Implemented - CUBESETCOUNT *** Not yet Implemented - CUBEVALUE *** Not yet Implemented - -CATEGORY_DATABASE - DAVERAGE PHPExcel_Calculation_Database::DAVERAGE - DCOUNT PHPExcel_Calculation_Database::DCOUNT - DCOUNTA PHPExcel_Calculation_Database::DCOUNTA - DGET PHPExcel_Calculation_Database::DGET - DMAX PHPExcel_Calculation_Database::DMAX - DMIN PHPExcel_Calculation_Database::DMIN - DPRODUCT PHPExcel_Calculation_Database::DPRODUCT - DSTDEV PHPExcel_Calculation_Database::DSTDEV - DSTDEVP PHPExcel_Calculation_Database::DSTDEVP - DSUM PHPExcel_Calculation_Database::DSUM - DVAR PHPExcel_Calculation_Database::DVAR - DVARP PHPExcel_Calculation_Database::DVARP - -CATEGORY_DATE_AND_TIME - DATE PHPExcel_Calculation_DateTime::DATE - DATEDIF PHPExcel_Calculation_DateTime::DATEDIF - DATEVALUE PHPExcel_Calculation_DateTime::DATEVALUE - DAY PHPExcel_Calculation_DateTime::DAYOFMONTH - DAYS360 PHPExcel_Calculation_DateTime::DAYS360 - EDATE PHPExcel_Calculation_DateTime::EDATE - EOMONTH PHPExcel_Calculation_DateTime::EOMONTH - HOUR PHPExcel_Calculation_DateTime::HOUROFDAY - MINUTE PHPExcel_Calculation_DateTime::MINUTEOFHOUR - MONTH PHPExcel_Calculation_DateTime::MONTHOFYEAR - NETWORKDAYS PHPExcel_Calculation_DateTime::NETWORKDAYS - NOW PHPExcel_Calculation_DateTime::DATETIMENOW - SECOND PHPExcel_Calculation_DateTime::SECONDOFMINUTE - TIME PHPExcel_Calculation_DateTime::TIME - TIMEVALUE PHPExcel_Calculation_DateTime::TIMEVALUE - TODAY PHPExcel_Calculation_DateTime::DATENOW - WEEKDAY PHPExcel_Calculation_DateTime::DAYOFWEEK - WEEKNUM PHPExcel_Calculation_DateTime::WEEKOFYEAR - WORKDAY PHPExcel_Calculation_DateTime::WORKDAY - YEAR PHPExcel_Calculation_DateTime::YEAR - YEARFRAC PHPExcel_Calculation_DateTime::YEARFRAC - -CATEGORY_ENGINEERING - BESSELI PHPExcel_Calculation_Engineering::BESSELI - BESSELJ PHPExcel_Calculation_Engineering::BESSELJ - BESSELK PHPExcel_Calculation_Engineering::BESSELK - BESSELY PHPExcel_Calculation_Engineering::BESSELY - BIN2DEC PHPExcel_Calculation_Engineering::BINTODEC - BIN2HEX PHPExcel_Calculation_Engineering::BINTOHEX - BIN2OCT PHPExcel_Calculation_Engineering::BINTOOCT - COMPLEX PHPExcel_Calculation_Engineering::COMPLEX - CONVERT PHPExcel_Calculation_Engineering::CONVERTUOM - DEC2BIN PHPExcel_Calculation_Engineering::DECTOBIN - DEC2HEX PHPExcel_Calculation_Engineering::DECTOHEX - DEC2OCT PHPExcel_Calculation_Engineering::DECTOOCT - DELTA PHPExcel_Calculation_Engineering::DELTA - ERF PHPExcel_Calculation_Engineering::ERF - ERFC PHPExcel_Calculation_Engineering::ERFC - GESTEP PHPExcel_Calculation_Engineering::GESTEP - HEX2BIN PHPExcel_Calculation_Engineering::HEXTOBIN - HEX2DEC PHPExcel_Calculation_Engineering::HEXTODEC - HEX2OCT PHPExcel_Calculation_Engineering::HEXTOOCT - IMABS PHPExcel_Calculation_Engineering::IMABS - IMAGINARY PHPExcel_Calculation_Engineering::IMAGINARY - IMARGUMENT PHPExcel_Calculation_Engineering::IMARGUMENT - IMCONJUGATE PHPExcel_Calculation_Engineering::IMCONJUGATE - IMCOS PHPExcel_Calculation_Engineering::IMCOS - IMDIV PHPExcel_Calculation_Engineering::IMDIV - IMEXP PHPExcel_Calculation_Engineering::IMEXP - IMLN PHPExcel_Calculation_Engineering::IMLN - IMLOG10 PHPExcel_Calculation_Engineering::IMLOG10 - IMLOG2 PHPExcel_Calculation_Engineering::IMLOG2 - IMPOWER PHPExcel_Calculation_Engineering::IMPOWER - IMPRODUCT PHPExcel_Calculation_Engineering::IMPRODUCT - IMREAL PHPExcel_Calculation_Engineering::IMREAL - IMSIN PHPExcel_Calculation_Engineering::IMSIN - IMSQRT PHPExcel_Calculation_Engineering::IMSQRT - IMSUB PHPExcel_Calculation_Engineering::IMSUB - IMSUM PHPExcel_Calculation_Engineering::IMSUM - OCT2BIN PHPExcel_Calculation_Engineering::OCTTOBIN - OCT2DEC PHPExcel_Calculation_Engineering::OCTTODEC - OCT2HEX PHPExcel_Calculation_Engineering::OCTTOHEX - -CATEGORY_FINANCIAL - ACCRINT PHPExcel_Calculation_Financial::ACCRINT - ACCRINTM PHPExcel_Calculation_Financial::ACCRINTM - AMORDEGRC PHPExcel_Calculation_Financial::AMORDEGRC - AMORLINC PHPExcel_Calculation_Financial::AMORLINC - COUPDAYBS PHPExcel_Calculation_Financial::COUPDAYBS - COUPDAYS PHPExcel_Calculation_Financial::COUPDAYS - COUPDAYSNC PHPExcel_Calculation_Financial::COUPDAYSNC - COUPNCD PHPExcel_Calculation_Financial::COUPNCD - COUPNUM PHPExcel_Calculation_Financial::COUPNUM - COUPPCD PHPExcel_Calculation_Financial::COUPPCD - CUMIPMT PHPExcel_Calculation_Financial::CUMIPMT - CUMPRINC PHPExcel_Calculation_Financial::CUMPRINC - DB PHPExcel_Calculation_Financial::DB - DDB PHPExcel_Calculation_Financial::DDB - DISC PHPExcel_Calculation_Financial::DISC - DOLLARDE PHPExcel_Calculation_Financial::DOLLARDE - DOLLARFR PHPExcel_Calculation_Financial::DOLLARFR - DURATION *** Not yet Implemented - EFFECT PHPExcel_Calculation_Financial::EFFECT - FV PHPExcel_Calculation_Financial::FV - FVSCHEDULE PHPExcel_Calculation_Financial::FVSCHEDULE - INTRATE PHPExcel_Calculation_Financial::INTRATE - IPMT PHPExcel_Calculation_Financial::IPMT - IRR PHPExcel_Calculation_Financial::IRR - ISPMT PHPExcel_Calculation_Financial::ISPMT - MDURATION *** Not yet Implemented - MIRR PHPExcel_Calculation_Financial::MIRR - NOMINAL PHPExcel_Calculation_Financial::NOMINAL - NPER PHPExcel_Calculation_Financial::NPER - NPV PHPExcel_Calculation_Financial::NPV - ODDFPRICE *** Not yet Implemented - ODDFYIELD *** Not yet Implemented - ODDLPRICE *** Not yet Implemented - ODDLYIELD *** Not yet Implemented - PMT PHPExcel_Calculation_Financial::PMT - PPMT PHPExcel_Calculation_Financial::PPMT - PRICE PHPExcel_Calculation_Financial::PRICE - PRICEDISC PHPExcel_Calculation_Financial::PRICEDISC - PRICEMAT PHPExcel_Calculation_Financial::PRICEMAT - PV PHPExcel_Calculation_Financial::PV - RATE PHPExcel_Calculation_Financial::RATE - RECEIVED PHPExcel_Calculation_Financial::RECEIVED - SLN PHPExcel_Calculation_Financial::SLN - SYD PHPExcel_Calculation_Financial::SYD - TBILLEQ PHPExcel_Calculation_Financial::TBILLEQ - TBILLPRICE PHPExcel_Calculation_Financial::TBILLPRICE - TBILLYIELD PHPExcel_Calculation_Financial::TBILLYIELD - USDOLLAR *** Not yet Implemented - VDB *** Not yet Implemented - XIRR PHPExcel_Calculation_Financial::XIRR - XNPV PHPExcel_Calculation_Financial::XNPV - YIELD *** Not yet Implemented - YIELDDISC PHPExcel_Calculation_Financial::YIELDDISC - YIELDMAT PHPExcel_Calculation_Financial::YIELDMAT - -CATEGORY_INFORMATION - CELL *** Not yet Implemented - ERROR.TYPE PHPExcel_Calculation_Functions::ERROR_TYPE - INFO *** Not yet Implemented - ISBLANK PHPExcel_Calculation_Functions::IS_BLANK - ISERR PHPExcel_Calculation_Functions::IS_ERR - ISERROR PHPExcel_Calculation_Functions::IS_ERROR - ISEVEN PHPExcel_Calculation_Functions::IS_EVEN - ISLOGICAL PHPExcel_Calculation_Functions::IS_LOGICAL - ISNA PHPExcel_Calculation_Functions::IS_NA - ISNONTEXT PHPExcel_Calculation_Functions::IS_NONTEXT - ISNUMBER PHPExcel_Calculation_Functions::IS_NUMBER - ISODD PHPExcel_Calculation_Functions::IS_ODD - ISREF *** Not yet Implemented - ISTEXT PHPExcel_Calculation_Functions::IS_TEXT - N PHPExcel_Calculation_Functions::N - NA PHPExcel_Calculation_Functions::NA - TYPE PHPExcel_Calculation_Functions::TYPE - VERSION PHPExcel_Calculation_Functions::VERSION - -CATEGORY_LOGICAL - AND PHPExcel_Calculation_Logical::LOGICAL_AND - FALSE PHPExcel_Calculation_Logical::FALSE - IF PHPExcel_Calculation_Logical::STATEMENT_IF - IFERROR PHPExcel_Calculation_Logical::IFERROR - NOT PHPExcel_Calculation_Logical::NOT - OR PHPExcel_Calculation_Logical::LOGICAL_OR - TRUE PHPExcel_Calculation_Logical::TRUE - -CATEGORY_LOOKUP_AND_REFERENCE - ADDRESS PHPExcel_Calculation_LookupRef::CELL_ADDRESS - AREAS *** Not yet Implemented - CHOOSE PHPExcel_Calculation_LookupRef::CHOOSE - COLUMN PHPExcel_Calculation_LookupRef::COLUMN - COLUMNS PHPExcel_Calculation_LookupRef::COLUMNS - GETPIVOTDATA *** Not yet Implemented - HLOOKUP PHPExcel_Calculation_LookupRef::HLOOKUP - HYPERLINK PHPExcel_Calculation_LookupRef::HYPERLINK - INDEX PHPExcel_Calculation_LookupRef::INDEX - INDIRECT PHPExcel_Calculation_LookupRef::INDIRECT - LOOKUP PHPExcel_Calculation_LookupRef::LOOKUP - MATCH PHPExcel_Calculation_LookupRef::MATCH - OFFSET PHPExcel_Calculation_LookupRef::OFFSET - ROW PHPExcel_Calculation_LookupRef::ROW - ROWS PHPExcel_Calculation_LookupRef::ROWS - RTD *** Not yet Implemented - TRANSPOSE PHPExcel_Calculation_LookupRef::TRANSPOSE - VLOOKUP PHPExcel_Calculation_LookupRef::VLOOKUP - -CATEGORY_MATH_AND_TRIG - ABS abs - ACOS acos - ACOSH acosh - ASIN asin - ASINH asinh - ATAN atan - ATAN2 PHPExcel_Calculation_MathTrig::REVERSE_ATAN2 - ATANH atanh - CEILING PHPExcel_Calculation_MathTrig::CEILING - COMBIN PHPExcel_Calculation_MathTrig::COMBIN - COS cos - COSH cosh - DEGREES rad2deg - EVEN PHPExcel_Calculation_MathTrig::EVEN - EXP exp - FACT PHPExcel_Calculation_MathTrig::FACT - FACTDOUBLE PHPExcel_Calculation_MathTrig::FACTDOUBLE - FLOOR PHPExcel_Calculation_MathTrig::FLOOR - GCD PHPExcel_Calculation_MathTrig::GCD - INT PHPExcel_Calculation_MathTrig::INT - LCM PHPExcel_Calculation_MathTrig::LCM - LN log - LOG PHPExcel_Calculation_MathTrig::LOG_BASE - LOG10 log10 - MDETERM PHPExcel_Calculation_MathTrig::MDETERM - MINVERSE PHPExcel_Calculation_MathTrig::MINVERSE - MMULT PHPExcel_Calculation_MathTrig::MMULT - MOD PHPExcel_Calculation_MathTrig::MOD - MROUND PHPExcel_Calculation_MathTrig::MROUND - MULTINOMIAL PHPExcel_Calculation_MathTrig::MULTINOMIAL - ODD PHPExcel_Calculation_MathTrig::ODD - PI pi - POWER PHPExcel_Calculation_MathTrig::POWER - PRODUCT PHPExcel_Calculation_MathTrig::PRODUCT - QUOTIENT PHPExcel_Calculation_MathTrig::QUOTIENT - RADIANS deg2rad - RAND PHPExcel_Calculation_MathTrig::RAND - RANDBETWEEN PHPExcel_Calculation_MathTrig::RAND - ROMAN PHPExcel_Calculation_MathTrig::ROMAN - ROUND round - ROUNDDOWN PHPExcel_Calculation_MathTrig::ROUNDDOWN - ROUNDUP PHPExcel_Calculation_MathTrig::ROUNDUP - SERIESSUM PHPExcel_Calculation_MathTrig::SERIESSUM - SIGN PHPExcel_Calculation_MathTrig::SIGN - SIN sin - SINH sinh - SQRT sqrt - SQRTPI PHPExcel_Calculation_MathTrig::SQRTPI - SUBTOTAL PHPExcel_Calculation_MathTrig::SUBTOTAL - SUM PHPExcel_Calculation_MathTrig::SUM - SUMIF PHPExcel_Calculation_MathTrig::SUMIF - SUMIFS *** Not yet Implemented - SUMPRODUCT PHPExcel_Calculation_MathTrig::SUMPRODUCT - SUMSQ PHPExcel_Calculation_MathTrig::SUMSQ - SUMX2MY2 PHPExcel_Calculation_MathTrig::SUMX2MY2 - SUMX2PY2 PHPExcel_Calculation_MathTrig::SUMX2PY2 - SUMXMY2 PHPExcel_Calculation_MathTrig::SUMXMY2 - TAN tan - TANH tanh - TRUNC PHPExcel_Calculation_MathTrig::TRUNC - -CATEGORY_STATISTICAL - AVEDEV PHPExcel_Calculation_Statistical::AVEDEV - AVERAGE PHPExcel_Calculation_Statistical::AVERAGE - AVERAGEA PHPExcel_Calculation_Statistical::AVERAGEA - AVERAGEIF PHPExcel_Calculation_Statistical::AVERAGEIF - AVERAGEIFS *** Not yet Implemented - BETADIST PHPExcel_Calculation_Statistical::BETADIST - BETAINV PHPExcel_Calculation_Statistical::BETAINV - BINOMDIST PHPExcel_Calculation_Statistical::BINOMDIST - CHIDIST PHPExcel_Calculation_Statistical::CHIDIST - CHIINV PHPExcel_Calculation_Statistical::CHIINV - CHITEST *** Not yet Implemented - CONFIDENCE PHPExcel_Calculation_Statistical::CONFIDENCE - CORREL PHPExcel_Calculation_Statistical::CORREL - COUNT PHPExcel_Calculation_Statistical::COUNT - COUNTA PHPExcel_Calculation_Statistical::COUNTA - COUNTBLANK PHPExcel_Calculation_Statistical::COUNTBLANK - COUNTIF PHPExcel_Calculation_Statistical::COUNTIF - COUNTIFS *** Not yet Implemented - COVAR PHPExcel_Calculation_Statistical::COVAR - CRITBINOM PHPExcel_Calculation_Statistical::CRITBINOM - DEVSQ PHPExcel_Calculation_Statistical::DEVSQ - EXPONDIST PHPExcel_Calculation_Statistical::EXPONDIST - FDIST *** Not yet Implemented - FINV *** Not yet Implemented - FISHER PHPExcel_Calculation_Statistical::FISHER - FISHERINV PHPExcel_Calculation_Statistical::FISHERINV - FORECAST PHPExcel_Calculation_Statistical::FORECAST - FREQUENCY *** Not yet Implemented - FTEST *** Not yet Implemented - GAMMADIST PHPExcel_Calculation_Statistical::GAMMADIST - GAMMAINV PHPExcel_Calculation_Statistical::GAMMAINV - GAMMALN PHPExcel_Calculation_Statistical::GAMMALN - GEOMEAN PHPExcel_Calculation_Statistical::GEOMEAN - GROWTH PHPExcel_Calculation_Statistical::GROWTH - HARMEAN PHPExcel_Calculation_Statistical::HARMEAN - HYPGEOMDIST PHPExcel_Calculation_Statistical::HYPGEOMDIST - INTERCEPT PHPExcel_Calculation_Statistical::INTERCEPT - KURT PHPExcel_Calculation_Statistical::KURT - LARGE PHPExcel_Calculation_Statistical::LARGE - LINEST PHPExcel_Calculation_Statistical::LINEST - LOGEST PHPExcel_Calculation_Statistical::LOGEST - LOGINV PHPExcel_Calculation_Statistical::LOGINV - LOGNORMDIST PHPExcel_Calculation_Statistical::LOGNORMDIST - MAX PHPExcel_Calculation_Statistical::MAX - MAXA PHPExcel_Calculation_Statistical::MAXA - MAXIF PHPExcel_Calculation_Statistical::MAXIF - MEDIAN PHPExcel_Calculation_Statistical::MEDIAN - MEDIANIF *** Not yet Implemented - MIN PHPExcel_Calculation_Statistical::MIN - MINA PHPExcel_Calculation_Statistical::MINA - MINIF PHPExcel_Calculation_Statistical::MINIF - MODE PHPExcel_Calculation_Statistical::MODE - NEGBINOMDIST PHPExcel_Calculation_Statistical::NEGBINOMDIST - NORMDIST PHPExcel_Calculation_Statistical::NORMDIST - NORMINV PHPExcel_Calculation_Statistical::NORMINV - NORMSDIST PHPExcel_Calculation_Statistical::NORMSDIST - NORMSINV PHPExcel_Calculation_Statistical::NORMSINV - PEARSON PHPExcel_Calculation_Statistical::CORREL - PERCENTILE PHPExcel_Calculation_Statistical::PERCENTILE - PERCENTRANK PHPExcel_Calculation_Statistical::PERCENTRANK - PERMUT PHPExcel_Calculation_Statistical::PERMUT - POISSON PHPExcel_Calculation_Statistical::POISSON - PROB *** Not yet Implemented - QUARTILE PHPExcel_Calculation_Statistical::QUARTILE - RANK PHPExcel_Calculation_Statistical::RANK - RSQ PHPExcel_Calculation_Statistical::RSQ - SKEW PHPExcel_Calculation_Statistical::SKEW - SLOPE PHPExcel_Calculation_Statistical::SLOPE - SMALL PHPExcel_Calculation_Statistical::SMALL - STANDARDIZE PHPExcel_Calculation_Statistical::STANDARDIZE - STDEV PHPExcel_Calculation_Statistical::STDEV - STDEVA PHPExcel_Calculation_Statistical::STDEVA - STDEVP PHPExcel_Calculation_Statistical::STDEVP - STDEVPA PHPExcel_Calculation_Statistical::STDEVPA - STEYX PHPExcel_Calculation_Statistical::STEYX - TDIST PHPExcel_Calculation_Statistical::TDIST - TINV PHPExcel_Calculation_Statistical::TINV - TREND PHPExcel_Calculation_Statistical::TREND - TRIMMEAN PHPExcel_Calculation_Statistical::TRIMMEAN - TTEST *** Not yet Implemented - VAR PHPExcel_Calculation_Statistical::VARFunc - VARA PHPExcel_Calculation_Statistical::VARA - VARP PHPExcel_Calculation_Statistical::VARP - VARPA PHPExcel_Calculation_Statistical::VARPA - WEIBULL PHPExcel_Calculation_Statistical::WEIBULL - ZTEST PHPExcel_Calculation_Statistical::ZTEST - -CATEGORY_TEXT_AND_DATA - ASC *** Not yet Implemented - BAHTTEXT *** Not yet Implemented - CHAR PHPExcel_Calculation_TextData::CHARACTER - CLEAN PHPExcel_Calculation_TextData::TRIMNONPRINTABLE - CODE PHPExcel_Calculation_TextData::ASCIICODE - CONCATENATE PHPExcel_Calculation_TextData::CONCATENATE - DOLLAR PHPExcel_Calculation_TextData::DOLLAR - EXACT *** Not yet Implemented - FIND PHPExcel_Calculation_TextData::SEARCHSENSITIVE - FINDB PHPExcel_Calculation_TextData::SEARCHSENSITIVE - FIXED PHPExcel_Calculation_TextData::FIXEDFORMAT - JIS *** Not yet Implemented - LEFT PHPExcel_Calculation_TextData::LEFT - LEFTB PHPExcel_Calculation_TextData::LEFT - LEN PHPExcel_Calculation_TextData::STRINGLENGTH - LENB PHPExcel_Calculation_TextData::STRINGLENGTH - LOWER PHPExcel_Calculation_TextData::LOWERCASE - MID PHPExcel_Calculation_TextData::MID - MIDB PHPExcel_Calculation_TextData::MID - PHONETIC *** Not yet Implemented - PROPER PHPExcel_Calculation_TextData::PROPERCASE - REPLACE PHPExcel_Calculation_TextData::REPLACE - REPLACEB PHPExcel_Calculation_TextData::REPLACE - REPT str_repeat - RIGHT PHPExcel_Calculation_TextData::RIGHT - RIGHTB PHPExcel_Calculation_TextData::RIGHT - SEARCH PHPExcel_Calculation_TextData::SEARCHINSENSITIVE - SEARCHB PHPExcel_Calculation_TextData::SEARCHINSENSITIVE - SUBSTITUTE PHPExcel_Calculation_TextData::SUBSTITUTE - T PHPExcel_Calculation_TextData::RETURNSTRING - TEXT PHPExcel_Calculation_TextData::TEXTFORMAT - TRIM PHPExcel_Calculation_TextData::TRIMSPACES - UPPER PHPExcel_Calculation_TextData::UPPERCASE - VALUE PHPExcel_Calculation_TextData::VALUE diff --git a/vendor/phpoffice/phpexcel/Documentation/FunctionListByName.txt b/vendor/phpoffice/phpexcel/Documentation/FunctionListByName.txt deleted file mode 100644 index 45a9daf..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/FunctionListByName.txt +++ /dev/null @@ -1,381 +0,0 @@ -ABS CATEGORY_MATH_AND_TRIG abs -ACCRINT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::ACCRINT -ACCRINTM CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::ACCRINTM -ACOS CATEGORY_MATH_AND_TRIG acos -ACOSH CATEGORY_MATH_AND_TRIG acosh -ADDRESS CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::CELL_ADDRESS -AMORDEGRC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::AMORDEGRC -AMORLINC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::AMORLINC -AND CATEGORY_LOGICAL PHPExcel_Calculation_Logical::LOGICAL_AND -AREAS CATEGORY_LOOKUP_AND_REFERENCE *** Not yet Implemented -ASC CATEGORY_TEXT_AND_DATA *** Not yet Implemented -ASIN CATEGORY_MATH_AND_TRIG asin -ASINH CATEGORY_MATH_AND_TRIG asinh -ATAN CATEGORY_MATH_AND_TRIG atan -ATAN2 CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::REVERSE_ATAN2 -ATANH CATEGORY_MATH_AND_TRIG atanh -AVEDEV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::AVEDEV -AVERAGE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::AVERAGE -AVERAGEA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::AVERAGEA -AVERAGEIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::AVERAGEIF -AVERAGEIFS CATEGORY_STATISTICAL *** Not yet Implemented - -BAHTTEXT CATEGORY_TEXT_AND_DATA *** Not yet Implemented -BESSELI CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BESSELI -BESSELJ CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BESSELJ -BESSELK CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BESSELK -BESSELY CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BESSELY -BETADIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::BETADIST -BETAINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::BETAINV -BIN2DEC CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BINTODEC -BIN2HEX CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BINTOHEX -BIN2OCT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::BINTOOCT -BINOMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::BINOMDIST - -CEILING CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::CEILING -CELL CATEGORY_INFORMATION *** Not yet Implemented -CHAR CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::CHARACTER -CHIDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CHIDIST -CHIINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CHIINV -CHITEST CATEGORY_STATISTICAL *** Not yet Implemented -CHOOSE CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::CHOOSE -CLEAN CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::TRIMNONPRINTABLE -CODE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::ASCIICODE -COLUMN CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::COLUMN -COLUMNS CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::COLUMNS -COMBIN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::COMBIN -COMPLEX CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::COMPLEX -CONCATENATE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::CONCATENATE -CONFIDENCE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CONFIDENCE -CONVERT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::CONVERTUOM -CORREL CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CORREL -COS CATEGORY_MATH_AND_TRIG cos -COSH CATEGORY_MATH_AND_TRIG cosh -COUNT CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COUNT -COUNTA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COUNTA -COUNTBLANK CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COUNTBLANK -COUNTIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COUNTIF -COUNTIFS CATEGORY_STATISTICAL *** Not yet Implemented -COUPDAYBS CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPDAYBS -COUPDAYS CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPDAYS -COUPDAYSNC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPDAYSNC -COUPNCD CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPNCD -COUPNUM CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPNUM -COUPPCD CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::COUPPCD -COVAR CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::COVAR -CRITBINOM CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CRITBINOM -CUBEKPIMEMBER CATEGORY_CUBE *** Not yet Implemented -CUBEMEMBER CATEGORY_CUBE *** Not yet Implemented -CUBEMEMBERPROPERTY CATEGORY_CUBE *** Not yet Implemented -CUBERANKEDMEMBER CATEGORY_CUBE *** Not yet Implemented -CUBESET CATEGORY_CUBE *** Not yet Implemented -CUBESETCOUNT CATEGORY_CUBE *** Not yet Implemented -CUBEVALUE CATEGORY_CUBE *** Not yet Implemented -CUMIPMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::CUMIPMT -CUMPRINC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::CUMPRINC - -DATE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATE -DATEDIF CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATEDIF -DATEVALUE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATEVALUE -DAVERAGE CATEGORY_DATABASE PHPExcel_Calculation_Database::DAVERAGE -DAY CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DAYOFMONTH -DAYS360 CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DAYS360 -DB CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DB -DCOUNT CATEGORY_DATABASE PHPExcel_Calculation_Database::DCOUNT -DCOUNTA CATEGORY_DATABASE PHPExcel_Calculation_Database::DCOUNTA -DDB CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DDB -DEC2BIN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::DECTOBIN -DEC2HEX CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::DECTOHEX -DEC2OCT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::DECTOOCT -DEGREES CATEGORY_MATH_AND_TRIG rad2deg -DELTA CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::DELTA -DEVSQ CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::DEVSQ -DGET CATEGORY_DATABASE PHPExcel_Calculation_Database::DGET -DISC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DISC -DMAX CATEGORY_DATABASE PHPExcel_Calculation_Database::DMAX -DMIN CATEGORY_DATABASE PHPExcel_Calculation_Database::DMIN -DOLLAR CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::DOLLAR -DOLLARDE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DOLLARDE -DOLLARFR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::DOLLARFR -DPRODUCT CATEGORY_DATABASE PHPExcel_Calculation_Database::DPRODUCT -DSTDEV CATEGORY_DATABASE PHPExcel_Calculation_Database::DSTDEV -DSTDEVP CATEGORY_DATABASE PHPExcel_Calculation_Database::DSTDEVP -DSUM CATEGORY_DATABASE PHPExcel_Calculation_Database::DSUM -DURATION CATEGORY_FINANCIAL *** Not yet Implemented -DVAR CATEGORY_DATABASE PHPExcel_Calculation_Database::DVAR -DVARP CATEGORY_DATABASE PHPExcel_Calculation_Database::DVARP - -EDATE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::EDATE -EFFECT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::EFFECT -EOMONTH CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::EOMONTH -ERF CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::ERF -ERFC CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::ERFC -ERROR.TYPE CATEGORY_INFORMATION PHPExcel_Calculation_Functions::ERROR_TYPE -EVEN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::EVEN -EXACT CATEGORY_TEXT_AND_DATA *** Not yet Implemented -EXP CATEGORY_MATH_AND_TRIG exp -EXPONDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::EXPONDIST - -FACT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::FACT -FACTDOUBLE CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::FACTDOUBLE -FALSE CATEGORY_LOGICAL PHPExcel_Calculation_Logical::FALSE -FDIST CATEGORY_STATISTICAL *** Not yet Implemented -FIND CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHSENSITIVE -FINDB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHSENSITIVE -FINV CATEGORY_STATISTICAL *** Not yet Implemented -FISHER CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::FISHER -FISHERINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::FISHERINV -FIXED CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::FIXEDFORMAT -FLOOR CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::FLOOR -FORECAST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::FORECAST -FREQUENCY CATEGORY_STATISTICAL *** Not yet Implemented -FTEST CATEGORY_STATISTICAL *** Not yet Implemented -FV CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::FV -FVSCHEDULE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::FVSCHEDULE - -GAMMADIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GAMMADIST -GAMMAINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GAMMAINV -GAMMALN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GAMMALN -GCD CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::GCD -GEOMEAN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GEOMEAN -GESTEP CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::GESTEP -GETPIVOTDATA CATEGORY_LOOKUP_AND_REFERENCE *** Not yet Implemented -GROWTH CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::GROWTH - -HARMEAN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::HARMEAN -HEX2BIN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::HEXTOBIN -HEX2DEC CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::HEXTODEC -HEX2OCT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::HEXTOOCT -HLOOKUP CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::HLOOKUP -HOUR CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::HOUROFDAY -HYPERLINK CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::HYPERLINK -HYPGEOMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::HYPGEOMDIST - -IF CATEGORY_LOGICAL PHPExcel_Calculation_Logical::STATEMENT_IF -IFERROR CATEGORY_LOGICAL PHPExcel_Calculation_Logical::IFERROR -IMABS CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMABS -IMAGINARY CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMAGINARY -IMARGUMENT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMARGUMENT -IMCONJUGATE CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMCONJUGATE -IMCOS CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMCOS -IMDIV CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMDIV -IMEXP CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMEXP -IMLN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMLN -IMLOG10 CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMLOG10 -IMLOG2 CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMLOG2 -IMPOWER CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMPOWER -IMPRODUCT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMPRODUCT -IMREAL CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMREAL -IMSIN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMSIN -IMSQRT CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMSQRT -IMSUB CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMSUB -IMSUM CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::IMSUM -INDEX CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::INDEX -INDIRECT CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::INDIRECT -INFO CATEGORY_INFORMATION *** Not yet Implemented -INT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::INT -INTERCEPT CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::INTERCEPT -INTRATE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::INTRATE -IPMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::IPMT -IRR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::IRR -ISBLANK CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_BLANK -ISERR CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_ERR -ISERROR CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_ERROR -ISEVEN CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_EVEN -ISLOGICAL CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_LOGICAL -ISNA CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_NA -ISNONTEXT CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_NONTEXT -ISNUMBER CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_NUMBER -ISODD CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_ODD -ISPMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::ISPMT -ISREF CATEGORY_INFORMATION *** Not yet Implemented -ISTEXT CATEGORY_INFORMATION PHPExcel_Calculation_Functions::IS_TEXT - -JIS CATEGORY_TEXT_AND_DATA *** Not yet Implemented - -KURT CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::KURT - -LARGE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LARGE -LCM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::LCM -LEFT CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::LEFT -LEFTB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::LEFT -LEN CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::STRINGLENGTH -LENB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::STRINGLENGTH -LINEST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LINEST -LN CATEGORY_MATH_AND_TRIG log -LOG CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::LOG_BASE -LOG10 CATEGORY_MATH_AND_TRIG log10 -LOGEST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LOGEST -LOGINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LOGINV -LOGNORMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::LOGNORMDIST -LOOKUP CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::LOOKUP -LOWER CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::LOWERCASE - -MATCH CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::MATCH -MAX CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MAX -MAXA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MAXA -MAXIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MAXIF -MDETERM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MDETERM -MDURATION CATEGORY_FINANCIAL *** Not yet Implemented -MEDIAN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MEDIAN -MEDIANIF CATEGORY_STATISTICAL *** Not yet Implemented -MID CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::MID -MIDB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::MID -MIN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MIN -MINA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MINA -MINIF CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MINIF -MINUTE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::MINUTEOFHOUR -MINVERSE CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MINVERSE -MIRR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::MIRR -MMULT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MMULT -MOD CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MOD -MODE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::MODE -MONTH CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::MONTHOFYEAR -MROUND CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MROUND -MULTINOMIAL CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::MULTINOMIAL - -N CATEGORY_INFORMATION PHPExcel_Calculation_Functions::N -NA CATEGORY_INFORMATION PHPExcel_Calculation_Functions::NA -NEGBINOMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NEGBINOMDIST -NETWORKDAYS CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::NETWORKDAYS -NOMINAL CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::NOMINAL -NORMDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NORMDIST -NORMINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NORMINV -NORMSDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NORMSDIST -NORMSINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::NORMSINV -NOT CATEGORY_LOGICAL PHPExcel_Calculation_Logical::NOT -NOW CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATETIMENOW -NPER CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::NPER -NPV CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::NPV - -OCT2BIN CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::OCTTOBIN -OCT2DEC CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::OCTTODEC -OCT2HEX CATEGORY_ENGINEERING PHPExcel_Calculation_Engineering::OCTTOHEX -ODD CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::ODD -ODDFPRICE CATEGORY_FINANCIAL *** Not yet Implemented -ODDFYIELD CATEGORY_FINANCIAL *** Not yet Implemented -ODDLPRICE CATEGORY_FINANCIAL *** Not yet Implemented -ODDLYIELD CATEGORY_FINANCIAL *** Not yet Implemented -OFFSET CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::OFFSET -OR CATEGORY_LOGICAL PHPExcel_Calculation_Logical::LOGICAL_OR - -PEARSON CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::CORREL -PERCENTILE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::PERCENTILE -PERCENTRANK CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::PERCENTRANK -PERMUT CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::PERMUT -PHONETIC CATEGORY_TEXT_AND_DATA *** Not yet Implemented -PI CATEGORY_MATH_AND_TRIG pi -PMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PMT -POISSON CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::POISSON -POWER CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::POWER -PPMT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PPMT -PRICE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PRICE -PRICEDISC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PRICEDISC -PRICEMAT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PRICEMAT -PROB CATEGORY_STATISTICAL *** Not yet Implemented -PRODUCT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::PRODUCT -PROPER CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::PROPERCASE -PV CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::PV - -QUARTILE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::QUARTILE -QUOTIENT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::QUOTIENT - -RADIANS CATEGORY_MATH_AND_TRIG deg2rad -RAND CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::RAND -RANDBETWEEN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::RAND -RANK CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::RANK -RATE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::RATE -RECEIVED CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::RECEIVED -REPLACE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::REPLACE -REPLACEB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::REPLACE -REPT CATEGORY_TEXT_AND_DATA str_repeat -RIGHT CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::RIGHT -RIGHTB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::RIGHT -ROMAN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::ROMAN -ROUND CATEGORY_MATH_AND_TRIG round -ROUNDDOWN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::ROUNDDOWN -ROUNDUP CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::ROUNDUP -ROW CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::ROW -ROWS CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::ROWS -RSQ CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::RSQ -RTD CATEGORY_LOOKUP_AND_REFERENCE *** Not yet Implemented - -SEARCH CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHINSENSITIVE -SEARCHB CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SEARCHINSENSITIVE -SECOND CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::SECONDOFMINUTE -SERIESSUM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SERIESSUM -SIGN CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SIGN -SIN CATEGORY_MATH_AND_TRIG sin -SINH CATEGORY_MATH_AND_TRIG sinh -SKEW CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::SKEW -SLN CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::SLN -SLOPE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::SLOPE -SMALL CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::SMALL -SQRT CATEGORY_MATH_AND_TRIG sqrt -SQRTPI CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SQRTPI -STANDARDIZE CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STANDARDIZE -STDEV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STDEV -STDEVA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STDEVA -STDEVP CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STDEVP -STDEVPA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STDEVPA -STEYX CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::STEYX -SUBSTITUTE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::SUBSTITUTE -SUBTOTAL CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUBTOTAL -SUM CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUM -SUMIF CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMIF -SUMIFS CATEGORY_MATH_AND_TRIG *** Not yet Implemented -SUMPRODUCT CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMPRODUCT -SUMSQ CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMSQ -SUMX2MY2 CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMX2MY2 -SUMX2PY2 CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMX2PY2 -SUMXMY2 CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::SUMXMY2 -SYD CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::SYD - -T CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::RETURNSTRING -TAN CATEGORY_MATH_AND_TRIG tan -TANH CATEGORY_MATH_AND_TRIG tanh -TBILLEQ CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::TBILLEQ -TBILLPRICE CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::TBILLPRICE -TBILLYIELD CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::TBILLYIELD -TDIST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::TDIST -TEXT CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::TEXTFORMAT -TIME CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::TIME -TIMEVALUE CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::TIMEVALUE -TINV CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::TINV -TODAY CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DATENOW -TRANSPOSE CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::TRANSPOSE -TREND CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::TREND -TRIM CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::TRIMSPACES -TRIMMEAN CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::TRIMMEAN -TRUE CATEGORY_LOGICAL PHPExcel_Calculation_Logical::TRUE -TRUNC CATEGORY_MATH_AND_TRIG PHPExcel_Calculation_MathTrig::TRUNC -TTEST CATEGORY_STATISTICAL *** Not yet Implemented -TYPE CATEGORY_INFORMATION PHPExcel_Calculation_Functions::TYPE - -UPPER CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::UPPERCASE -USDOLLAR CATEGORY_FINANCIAL *** Not yet Implemented - -VALUE CATEGORY_TEXT_AND_DATA PHPExcel_Calculation_TextData::VALUE -VAR CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::VARFunc -VARA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::VARA -VARP CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::VARP -VARPA CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::VARPA -VDB CATEGORY_FINANCIAL *** Not yet Implemented -VERSION CATEGORY_INFORMATION PHPExcel_Calculation_Functions::VERSION -VLOOKUP CATEGORY_LOOKUP_AND_REFERENCE PHPExcel_Calculation_LookupRef::VLOOKUP - -WEEKDAY CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::DAYOFWEEK -WEEKNUM CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::WEEKOFYEAR -WEIBULL CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::WEIBULL -WORKDAY CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::WORKDAY - -XIRR CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::XIRR -XNPV CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::XNPV - -YEAR CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::YEAR -YEARFRAC CATEGORY_DATE_AND_TIME PHPExcel_Calculation_DateTime::YEARFRAC -YIELD CATEGORY_FINANCIAL *** Not yet Implemented -YIELDDISC CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::YIELDDISC -YIELDMAT CATEGORY_FINANCIAL PHPExcel_Calculation_Financial::YIELDMAT - -ZTEST CATEGORY_STATISTICAL PHPExcel_Calculation_Statistical::ZTEST diff --git a/vendor/phpoffice/phpexcel/Documentation/Functionality Cross-Reference.xls b/vendor/phpoffice/phpexcel/Documentation/Functionality Cross-Reference.xls deleted file mode 100644 index 227fd61..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/Functionality Cross-Reference.xls and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/PHPExcel AutoFilter Reference developer documentation.doc b/vendor/phpoffice/phpexcel/Documentation/PHPExcel AutoFilter Reference developer documentation.doc deleted file mode 100644 index 208b202..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/PHPExcel AutoFilter Reference developer documentation.doc and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/PHPExcel Function Reference developer documentation.doc b/vendor/phpoffice/phpexcel/Documentation/PHPExcel Function Reference developer documentation.doc deleted file mode 100644 index 57d218c..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/PHPExcel Function Reference developer documentation.doc and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/PHPExcel User Documentation - Reading Spreadsheet Files.doc b/vendor/phpoffice/phpexcel/Documentation/PHPExcel User Documentation - Reading Spreadsheet Files.doc deleted file mode 100644 index ef3954d..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/PHPExcel User Documentation - Reading Spreadsheet Files.doc and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/PHPExcel developer documentation.doc b/vendor/phpoffice/phpexcel/Documentation/PHPExcel developer documentation.doc deleted file mode 100644 index 52cc964..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/PHPExcel developer documentation.doc and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Architecture.cd b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Architecture.cd deleted file mode 100644 index afc1dbd..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Architecture.cd +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<ClassDiagram MajorVersion="1" MinorVersion="1"> - <Font Name="Tahoma" Size="8.25" /> - <Class Name="ClassDiagrams.PHPExcel" Collapsed="true"> - <Position X="3.5" Y="0.5" Width="1.5" /> - <TypeIdentifier> - <FileName>Classes\PHPExcel.cs</FileName> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAA=</HashCode> - </TypeIdentifier> - <ShowAsAssociation> - <Property Name="Worksheets" /> - </ShowAsAssociation> - </Class> - <Class Name="ClassDiagrams.Worksheet" Collapsed="true"> - <Position X="0.5" Y="0.5" Width="1.5" /> - <TypeIdentifier> - <FileName>Classes\Worksheet.cs</FileName> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - </TypeIdentifier> - </Class> - <Interface Name="ClassDiagrams.PHPExcel_Reader_IReader" Collapsed="true"> - <Position X="2.25" Y="2.5" Width="2" /> - <TypeIdentifier> - <FileName>Classes\IReader.cs</FileName> - <HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - </TypeIdentifier> - <ShowAsAssociation> - <Property Name="reads" /> - </ShowAsAssociation> - <AssociationLine Name="reads" Type="ClassDiagrams.PHPExcel"> - <MemberNameLabel ManuallyPlaced="true" ManuallySized="true"> - <Position X="0.152" Y="1.279" Height="0.16" Width="0.597" /> - </MemberNameLabel> - </AssociationLine> - </Interface> - <Interface Name="ClassDiagrams.PHPExcel_Writer_IWriter" Collapsed="true"> - <Position X="4.5" Y="2.5" Width="2" /> - <TypeIdentifier> - <FileName>Classes\IWriter.cs</FileName> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode> - </TypeIdentifier> - <ShowAsAssociation> - <Property Name="writes" /> - </ShowAsAssociation> - <AssociationLine Name="writes" Type="ClassDiagrams.PHPExcel"> - <MemberNameLabel ManuallyPlaced="true" ManuallySized="true"> - <Position X="-1.002" Y="1.298" Height="0.16" Width="0.764" /> - </MemberNameLabel> - </AssociationLine> - </Interface> -</ClassDiagram> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Architecture.png b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Architecture.png deleted file mode 100644 index 3fc7655..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Architecture.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.csproj b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.csproj deleted file mode 100644 index 5920f3d..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.csproj +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.50727</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}</ProjectGuid> - <OutputType>Exe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>ClassDiagrams</RootNamespace> - <AssemblyName>ClassDiagrams</AssemblyName> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>2.0</OldToolsVersion> - <UpgradeBackupLocation> - </UpgradeBackupLocation> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> - <ItemGroup> - <None Include="Architecture.cd" /> - <None Include="ReaderWriter.cd" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Classes\IReader.cs" /> - <Compile Include="Classes\IWriter.cs" /> - <Compile Include="Classes\PHPExcel_IOFactory.cs" /> - <Compile Include="Classes\Worksheet.cs" /> - <Compile Include="Classes\PHPExcel.cs" /> - <Compile Include="Classes\PHPExcel_Reader_Excel2007.cs" /> - <Compile Include="Classes\PHPExcel_Reader_Serialized.cs" /> - <Compile Include="Classes\PHPExcel_Writer_Excel2007.cs" /> - <Compile Include="Classes\PHPExcel_Writer_Serialized.cs" /> - <Compile Include="Classes\PHPExcel_Reader_Excel5.cs" /> - </ItemGroup> - <ItemGroup> - <Content Include="Exports\Architecture.png" /> - <Content Include="Exports\ReaderWriter.png" /> - </ItemGroup> -</Project> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.csproj.user b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.csproj.user deleted file mode 100644 index 6a34e7d..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.csproj.user +++ /dev/null @@ -1,5 +0,0 @@ -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <ProjectView>ShowAllFiles</ProjectView> - </PropertyGroup> -</Project> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.sln b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.sln deleted file mode 100644 index 3ed7732..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ClassDiagrams.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassDiagrams", "ClassDiagrams.csproj", "{CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CC8CD7D2-8EFF-48E5-A17A-C1C482744D31}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/IReader.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/IReader.cs deleted file mode 100644 index 96c11af..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/IReader.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public interface PHPExcel_Reader_IReader - { - PHPExcel reads - { - get; - set; - } - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/IWriter.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/IWriter.cs deleted file mode 100644 index d1d6642..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/IWriter.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public interface PHPExcel_Writer_IWriter - { - PHPExcel writes - { - get; - set; - } - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel.cs deleted file mode 100644 index 5efaa5b..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public class PHPExcel - { - /// <remarks></remarks> - public Worksheet Worksheets - { - get - { - throw new System.NotImplementedException(); - } - set - { - } - } - } - - public class PHPExcel_Writer_PDF : PHPExcel_Writer_IWriter - { - #region PHPExcel_Writer_IWriter Members - - public PHPExcel writes - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_IOFactory.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_IOFactory.cs deleted file mode 100644 index 444712c..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_IOFactory.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public class PHPExcel_IOFactory - { - public PHPExcel_Reader_IReader createsReader - { - get - { - throw new System.NotImplementedException(); - } - set - { - } - } - - public PHPExcel_Writer_IWriter createsWriter - { - get - { - throw new System.NotImplementedException(); - } - set - { - } - } - - public PHPExcel_Writer_IWriter createWriter() - { - throw new System.NotImplementedException(); - } - - public PHPExcel_Reader_IReader createReader() - { - throw new System.NotImplementedException(); - } - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Excel2007.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Excel2007.cs deleted file mode 100644 index 5cf6e3d..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Excel2007.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public class PHPExcel_Reader_Excel2007 : PHPExcel_Reader_IReader - { - #region IReader Members - - public PHPExcel reads - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Excel5.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Excel5.cs deleted file mode 100644 index e407212..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Excel5.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public class PHPExcel_Reader_Excel5 : PHPExcel_Reader_IReader - { - #region PHPExcel_Writer_IReader Members - - public PHPExcel reads - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } - - public class PHPExcel_Reader_Excel2003XML : PHPExcel_Reader_IReader - { - #region PHPExcel_Writer_IReader Members - - public PHPExcel reads - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } - - public class PHPExcel_Reader_SYLK : PHPExcel_Reader_IReader - { - #region PHPExcel_Writer_IReader Members - - public PHPExcel reads - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Serialized.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Serialized.cs deleted file mode 100644 index ea114c8..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Reader_Serialized.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public class PHPExcel_Reader_Serialized : PHPExcel_Reader_IReader - { - #region IReader Members - - public PHPExcel reads - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } - - public class PHPExcel_Reader_CSV : PHPExcel_Reader_IReader - { - #region IReader Members - - public PHPExcel reads - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Writer_Excel2007.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Writer_Excel2007.cs deleted file mode 100644 index 03edda9..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Writer_Excel2007.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public class PHPExcel_Writer_Excel2007 : PHPExcel_Writer_IWriter - { - #region IWriter Members - - public PHPExcel writes - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Writer_Serialized.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Writer_Serialized.cs deleted file mode 100644 index cf8af20..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/PHPExcel_Writer_Serialized.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public class PHPExcel_Writer_Serialized : PHPExcel_Writer_IWriter - { - #region IWriter Members - - public PHPExcel writes - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } - - public class PHPExcel_Writer_CSV : PHPExcel_Writer_IWriter - { - #region IWriter Members - - public PHPExcel writes - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } - - public class PHPExcel_Writer_Excel5 : PHPExcel_Writer_IWriter - { - #region IWriter Members - - public PHPExcel writes - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } - - public class PHPExcel_Writer_HTML : PHPExcel_Writer_IWriter - { - #region IWriter Members - - public PHPExcel writes - { - get - { - throw new Exception("The method or operation is not implemented."); - } - set - { - throw new Exception("The method or operation is not implemented."); - } - } - - #endregion - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/Worksheet.cs b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/Worksheet.cs deleted file mode 100644 index fdcf0ff..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Classes/Worksheet.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace ClassDiagrams -{ - public class Worksheet - { - } - - public class CopyOfWorksheet - { - } -} diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Exports/Architecture.png b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Exports/Architecture.png deleted file mode 100644 index 1324818..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Exports/Architecture.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Exports/ReaderWriter.png b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Exports/ReaderWriter.png deleted file mode 100644 index b915faa..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/Exports/ReaderWriter.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ReaderWriter.cd b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ReaderWriter.cd deleted file mode 100644 index bbaf291..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ReaderWriter.cd +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<ClassDiagram MajorVersion="1" MinorVersion="1"> - <Class Name="ClassDiagrams.PHPExcel_Reader_Excel2007" Collapsed="true" BaseTypeListCollapsed="true"> - <Position X="0.5" Y="3.5" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Reader_Excel2007.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Writer_Excel2007" Collapsed="true" BaseTypeListCollapsed="true"> - <Position X="3.5" Y="3.5" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Writer_Excel2007.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Reader_Serialized" Collapsed="true" BaseTypeListCollapsed="true"> - <Position X="0.5" Y="4.25" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Reader_Serialized.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Writer_Serialized" Collapsed="true" BaseTypeListCollapsed="true"> - <Position X="3.5" Y="4.25" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Reader_CSV" Collapsed="true" BaseTypeListCollapsed="true"> - <Position X="0.5" Y="5" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Reader_Serialized.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Writer_CSV" Collapsed="true" BaseTypeListCollapsed="true"> - <Position X="3.5" Y="5" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Writer_Excel5" Collapsed="true" BaseTypeListCollapsed="true"> - <Position X="3.5" Y="5.75" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Writer_HTML" Collapsed="true" BaseTypeListCollapsed="true"> - <Position X="3.5" Y="6.5" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Writer_Serialized.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Reader_Excel5" Collapsed="true"> - <Position X="0.5" Y="5.75" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Writer_PDF" Collapsed="true"> - <Position X="3.5" Y="7.25" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_IOFactory"> - <Position X="2" Y="0.5" Width="2.25" /> - <AssociationLine Name="createsReader" Type="ClassDiagrams.PHPExcel_Reader_IReader"> - <MemberNameLabel ManuallyPlaced="true"> - <Position X="0.11" Y="0.06" /> - </MemberNameLabel> - </AssociationLine> - <AssociationLine Name="createsWriter" Type="ClassDiagrams.PHPExcel_Writer_IWriter"> - <MemberNameLabel ManuallyPlaced="true"> - <Position X="-1.088" Y="0.081" /> - </MemberNameLabel> - </AssociationLine> - <TypeIdentifier> - <HashCode>AIAAAAAAAAEAAAAAAQAAAAAAAAAAAAAAAAABAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_IOFactory.cs</FileName> - </TypeIdentifier> - <ShowAsAssociation> - <Property Name="createsReader" /> - <Property Name="createsWriter" /> - </ShowAsAssociation> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Reader_Excel2003XML" Collapsed="true"> - <Position X="0.5" Y="6.5" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Class Name="ClassDiagrams.PHPExcel_Reader_SYLK" Collapsed="true"> - <Position X="0.5" Y="7.25" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - <FileName>Classes\PHPExcel_Reader_Excel5.cs</FileName> - </TypeIdentifier> - <Lollipop Position="0.2" /> - </Class> - <Interface Name="ClassDiagrams.PHPExcel_Writer_IWriter" Collapsed="true"> - <Position X="3.5" Y="2.5" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAA=</HashCode> - <FileName>Classes\IWriter.cs</FileName> - </TypeIdentifier> - </Interface> - <Interface Name="ClassDiagrams.PHPExcel_Reader_IReader" Collapsed="true"> - <Position X="0.5" Y="2.5" Width="2.25" /> - <TypeIdentifier> - <HashCode>AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAA=</HashCode> - <FileName>Classes\IReader.cs</FileName> - </TypeIdentifier> - </Interface> - <Font Name="Tahoma" Size="8.25" /> -</ClassDiagram> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ReaderWriter.png b/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ReaderWriter.png deleted file mode 100644 index d76c98d..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/assets/ClassDiagrams/ReaderWriter.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/01-Introduction.md b/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/01-Introduction.md deleted file mode 100644 index 2ea3a50..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/01-Introduction.md +++ /dev/null @@ -1,11 +0,0 @@ -# Calculation Engine - Formula Function Reference - -## Frequently asked questions - -The up-to-date F.A.Q. page for PHPExcel can be found on [http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=FAQ&referringTitle=Requirements][1]. - -### Formulas don’t seem to be calculated in Excel2003 using compatibility pack? - -This is normal behaviour of the compatibility pack, Excel2007 displays this correctly. Use PHPExcel_Writer_Excel5 if you really need calculated values, or force recalculation in Excel2003. - - [1]: http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=FAQ&referringTitle=Requirements diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/02-01-Date-and-Time-Handling.md b/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/02-01-Date-and-Time-Handling.md deleted file mode 100644 index 82993bb..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/02-01-Date-and-Time-Handling.md +++ /dev/null @@ -1,123 +0,0 @@ -# Calculation Engine - Formula Function Reference - -## Function Reference - -### Handling Date and Time Values - -#### Excel functions that return a Date and Time value - -Any of the Date and Time functions that return a date value in Excel can return either an Excel timestamp or a PHP timestamp or date object. - -It is possible for scripts to change the data type used for returning date values by calling the PHPExcel_Calculation_Functions::setReturnDateType() method: - -```php -PHPExcel_Calculation_Functions::setReturnDateType($returnDateType); -``` - -where the following constants can be used for $returnDateType - - - PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC - - PHPExcel_Calculation_Functions::RETURNDATE_PHP_OBJECT - - PHPExcel_Calculation_Functions::RETURNDATE_EXCEL - -The method will return a Boolean True on success, False on failure (e.g. if an invalid value is passed in for the return date type). - -The PHPExcel_Calculation_Functions::getReturnDateType() method can be used to determine the current value of this setting: - -```php -$returnDateType = PHPExcel_Calculation_Functions::getReturnDateType(); -``` - -The default is RETURNDATE_PHP_NUMERIC. - -##### PHP Timestamps - -If RETURNDATE_PHP_NUMERIC is set for the Return Date Type, then any date value returned to the calling script by any access to the Date and Time functions in Excel will be an integer value that represents the number of seconds from the PHP/Unix base date. The PHP/Unix base date (0) is 00:00 UST on 1st January 1970. This value can be positive or negative: so a value of -3600 would be 23:00 hrs on 31st December 1969; while a value of +3600 would be 01:00 hrs on 1st January 1970. This gives PHP a date range of between 14th December 1901 and 19th January 2038. - -##### PHP DateTime Objects - -If the Return Date Type is set for RETURNDATE_PHP_NUMERIC, then any date value returned to the calling script by any access to the Date and Time functions in Excel will be a PHP date/time object. - -##### Excel Timestamps - -If RETURNDATE_EXCEL is set for the Return Date Type, then the returned date value by any access to the Date and Time functions in Excel will be a floating point value that represents a number of days from the Excel base date. The Excel base date is determined by which calendar Excel uses: the Windows 1900 or the Mac 1904 calendar. 1st January 1900 is the base date for the Windows 1900 calendar while 1st January 1904 is the base date for the Mac 1904 calendar. - -It is possible for scripts to change the calendar used for calculating Excel date values by calling the PHPExcel_Shared_Date::setExcelCalendar() method: - -```php -PHPExcel_Shared_Date::setExcelCalendar($baseDate); -``` - -where the following constants can be used for $baseDate - - - PHPExcel_Shared_Date::CALENDAR_WINDOWS_1900 - - PHPExcel_Shared_Date::CALENDAR_MAC_1904 - -The method will return a Boolean True on success, False on failure (e.g. if an invalid value is passed in). - -The PHPExcel_Shared_Date::getExcelCalendar() method can be used to determine the current value of this setting: - -```php -$baseDate = PHPExcel_Shared_Date::getExcelCalendar(); -``` -The default is CALENDAR_WINDOWS_1900. - -##### Functions that return a Date/Time Value - - - DATE - - DATEVALUE - - EDATE - - EOMONTH - - NOW - - TIME - - TIMEVALUE - - TODAY - -#### Excel functions that accept Date and Time values as parameters - -Date values passed in as parameters to a function can be an Excel timestamp or a PHP timestamp; or date object; or a string containing a date value (e.g. '1-Jan-2009'). PHPExcel will attempt to identify their type based on the PHP datatype: - -An integer numeric value will be treated as a PHP/Unix timestamp. A real (floating point) numeric value will be treated as an Excel date/timestamp. Any PHP DateTime object will be treated as a DateTime object. Any string value (even one containing straight numeric data) will be converted to a date/time object for validation as a date value based on the server locale settings, so passing through an ambiguous value of '07/08/2008' will be treated as 7th August 2008 if your server settings are UK, but as 8th July 2008 if your server settings are US. However, if you pass through a value such as '31/12/2008' that would be considered an error by a US-based server, but which is not ambiguous, then PHPExcel will attempt to correct this to 31st December 2008. If the content of the string doesn’t match any of the formats recognised by the php date/time object implementation of strtotime() (which can handle a wider range of formats than the normal strtotime() function), then the function will return a '#VALUE' error. However, Excel recommends that you should always use date/timestamps for your date functions, and the recommendation for PHPExcel is the same: avoid strings because the result is not predictable. - -The same principle applies when data is being written to Excel. Cells containing date actual values (rather than Excel functions that return a date value) are always written as Excel dates, converting where necessary. If a cell formatted as a date contains an integer or date/time object value, then it is converted to an Excel value for writing: if a cell formatted as a date contains a real value, then no conversion is required. Note that string values are written as strings rather than converted to Excel date timestamp values. - -##### Functions that expect a Date/Time Value - - - DATEDIF - - DAY - - DAYS360 - - EDATE - - EOMONTH - - HOUR - - MINUTE - - MONTH - - NETWORKDAYS - - SECOND - - WEEKDAY - - WEEKNUM - - WORKDAY - - YEAR - - YEARFRAC - -#### Helper Methods - -In addition to the setExcelCalendar() and getExcelCalendar() methods, a number of other methods are available in the PHPExcel_Shared_Date class that can help when working with dates: - -##### PHPExcel_Shared_Date::ExcelToPHP($excelDate) - -Converts a date/time from an Excel date timestamp to return a PHP serialized date/timestamp. - -Note that this method does not trap for Excel dates that fall outside of the valid range for a PHP date timestamp. - -##### PHPExcel_Shared_Date::ExcelToPHPObject($excelDate) - -Converts a date from an Excel date/timestamp to return a PHP DateTime object. - -##### PHPExcel_Shared_Date::PHPToExcel($PHPDate) - -Converts a PHP serialized date/timestamp or a PHP DateTime object to return an Excel date timestamp. - -##### PHPExcel_Shared_Date::FormattedPHPToExcel($year, $month, $day, $hours=0, $minutes=0, $seconds=0) - -Takes year, month and day values (and optional hour, minute and second values) and returns an Excel date timestamp value. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/02-General-Introduction.md b/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/02-General-Introduction.md deleted file mode 100644 index b714d51..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/02-General-Introduction.md +++ /dev/null @@ -1,36 +0,0 @@ -# Calculation Engine - Formula Function Reference - -## General Introduction - -### Function that are not Supported in Excel5 - -Not all functions are supported by the Excel 5 Writer. Use of these functions within your workbooks will result in an error when trying to write to Excel5. - -The following is the list of those functions that are implemented within PHPExcel, but that cannot currently be written to Excel 5. - -#### Cube Functions - - Excel Function | Notes - --------------------|--------- - CUBEKPIMEMBER | Not yet Implemented - CUBEMEMBER | Not yet Implemented - CUBEMEMBERPROPERTY | Not yet Implemented - CUBERANKEDMEMBER | Not yet Implemented - CUBESET | Not yet Implemented - CUBESETCOUNT | Not yet Implemented - CUBEVALUE | Not yet Implemented - - -#### Database Functions - - Excel Function | Notes - ---------------|--------- - - -#### Date and Time Functions - - Excel Function | Notes - ---------------|--------- - EDATE | Not a standard function within Excel 5, but an add-in from the Analysis ToolPak. - EOMONTH | Not a standard function within Excel 5, but an add-in from the Analysis ToolPak. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-01-Cube-Functions.md b/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-01-Cube-Functions.md deleted file mode 100644 index 8c94632..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-01-Cube-Functions.md +++ /dev/null @@ -1,34 +0,0 @@ -# Calculation Engine - Formula Function Reference - -## Function Reference - -### Cube Functions - -#### CUBEKPIMEMBER - -Not yet implemented. - -#### CUBEMEMBER - -Not yet implemented. - -#### CUBEMEMBERPROPERTY - -Not yet implemented. - -#### CUBERANKEDMEMBER - -Not yet implemented. - -#### CUBESET - -Not yet implemented. - -#### CUBESETCOUNT - -Not yet implemented. - -#### CUBEVALUE - -Not yet implemented. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-02-Database-Functions.md b/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-02-Database-Functions.md deleted file mode 100644 index a50e1c8..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-02-Database-Functions.md +++ /dev/null @@ -1,618 +0,0 @@ -# Calculation Engine - Formula Function Reference - -## Function Reference - -### Database Functions - -#### DAVERAGE - -The DAVERAGE function returns the average value of the cells in a column of a list or database that match conditions you specify. - -##### Syntax - -``` -DAVERAGE (database, field, criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The average value of the matching cells. - -This is the statistical mean. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DAVERAGE(A4:E10,"Yield",A1:B2)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); -// $retVal = 12 -``` - -##### Notes - -There are no additional notes on this function - -#### DCOUNT - -The DCOUNT function returns the count of cells that contain a number in a column of a list or database matching conditions that you specify. - -##### Syntax - -``` -DCOUNT(database, [field], criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The count of the matching cells. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DCOUNT(A4:E10,"Height",A1:B3)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); - -// $retVal = 3 -``` - -##### Notes - -In MS Excel, The field argument is optional. If field is omitted, DCOUNT counts all records in the database that match the criteria. This logic has not yet been implemented in PHPExcel. - -#### DCOUNTA - -The DCOUNT function returns the count of cells that aren’t blank in a column of a list or database and that match conditions that you specify. - -##### Syntax - -``` -DCOUNTA(database, [field], criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The count of the matching cells. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DCOUNTA(A4:E10,"Yield",A1:A3)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); - -// $retVal = 5 -``` - -##### Notes - -In MS Excel, The field argument is optional. If field is omitted, DCOUNTA counts all records in the database that match the criteria. This logic has not yet been implemented in PHPExcel. - -#### DGET - -The DGET function extracts a single value from a column of a list or database that matches conditions that you specify. - -##### Syntax - -``` -DGET(database, field, criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**mixed** The value from the selected column of the matching row. - -#### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=GET(A4:E10,"Age",A1:F2)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); -// $retVal = 14 -``` - -##### Notes - -There are no additional notes on this function - -#### DMAX - -The DMAX function returns the largest number in a column of a list or database that matches conditions you specify. - -##### Syntax - -``` -DMAX(database, field, criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The maximum value of the matching cells. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DMAX(A4:E10,"Profit",A1:B2)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); -// $retVal = 105 -``` - -##### Notes - -There are no additional notes on this function - -#### DMIN - -The DMIN function returns the smallest number in a column of a list or database that matches conditions you specify. - -##### Syntax - -``` -DMIN(database, field, criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The minimum value of the matching cells. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DMIN(A4:E10,"Yield",A1:A3)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); -// $retVal = 6 -``` - -##### Notes - -There are no additional notes on this function - -#### DPRODUCT - -The DPRODUCT function multiplies the values in a column of a list or database that match conditions that you specify. - -##### Syntax - -``` -DPRODUCT(database, field, criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The product of the matching cells. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DPRODUCT(A4:E10,"Yield",A1:B2)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); -// $retVal = 140 -``` - -##### Notes - -There are no additional notes on this function - -#### DSTDEV - -The DSTDEV function estimates the standard deviation of a population based on a sample by using the numbers in a column of a list or database that match conditions that you specify. - -##### Syntax - -``` -DSTDEV(database, field, criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The estimated standard deviation of the matching cells. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DSTDEV(A4:E10,"Yield",A1:A3)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); -// $retVal = 2.97 -``` - -##### Notes - -There are no additional notes on this function - -#### DSTDEVP - -The DSTDEVP function calculates the standard deviation of a population based on the entire population by using the numbers in a column of a list or database that match conditions that you specify. - -##### Syntax - -``` -DSTDEVP(database, field, criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The estimated standard deviation of the matching cells. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DSTDEVP(A4:E10,"Yield",A1:A3)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); -// $retVal = 2.65 -``` - -##### Notes - -There are no additional notes on this function - -#### DSUM - -The DSUM function adds the numbers in a column of a list or database that matches conditions you specify. - -##### Syntax - -``` -DSUM(database, field, criteria) -``` - -##### Parameters - -**database** The range of cells that makes up the list or database. - -A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column. - -**field** Indicates which column of the database is used in the function. - -Enter the column label as a string (enclosed between double quotation marks), such as "Age" or "Yield," or as a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on. - -**criteria** The range of cells that contains the conditions you specify. - -You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column. - -##### Return Value - -**float** The total value of the matching cells. - -##### Examples - -```php -$database = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit' ), - array( 'Apple', 18, 20, 14, 105.00 ), - array( 'Pear', 12, 12, 10, 96.00 ), - array( 'Cherry', 13, 14, 9, 105.00 ), - array( 'Apple', 14, 15, 10, 75.00 ), - array( 'Pear', 9, 8, 8, 76.80 ), - array( 'Apple', 8, 9, 6, 45.00 ), -); - -$criteria = array( - array( 'Tree', 'Height', 'Age', 'Yield', 'Profit', 'Height' ), - array( '="=Apple"', '>10', NULL, NULL, NULL, '<16' ), - array( '="=Pear"', NULL, NULL, NULL, NULL, NULL ), -); - -$worksheet->fromArray( $criteria, NULL, 'A1' ) - ->fromArray( $database, NULL, 'A4' ); - -$worksheet->setCellValue('A12', '=DMIN(A4:E10,"Profit",A1:A2)'); - -$retVal = $worksheet->getCell('A12')->getCalculatedValue(); -// $retVal = 225 -``` - -##### Notes - -There are no additional notes on this function - -#### DVAR - -Not yet documented. - -#### DVARP - -Not yet documented. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-03-Date-and-Time-Functions.md b/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-03-Date-and-Time-Functions.md deleted file mode 100644 index d0cc568..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/CalculationEngine/FunctionReference/03-03-Date-and-Time-Functions.md +++ /dev/null @@ -1,1000 +0,0 @@ -# Calculation Engine - Formula Function Reference - -## Function Reference - -### Date and Time Functions - -Excel provides a number of functions for the manipulation of dates and times, and calculations based on date/time values. it is worth spending some time reading the section titled "Date and Time Values" on passing date parameters and returning date values to understand how PHPExcel reconciles the differences between dates and times in Excel and in PHP. - -#### DATE - -The DATE function returns an Excel timestamp or a PHP timestamp or date object representing the date that is referenced by the parameters. - -##### Syntax - -``` -DATE(year, month, day) -``` - -##### Parameters - -**year** The year number. - -If this value is between 0 (zero) and 1899 inclusive (for the Windows 1900 calendar), or between 4 and 1903 inclusive (for the Mac 1904), then PHPExcel adds it to the Calendar base year, so a value of 108 will interpret the year as 2008 when using the Windows 1900 calendar, or 2012 when using the Mac 1904 calendar. - -**month** The month number. - -If this value is greater than 12, the DATE function adds that number of months to the first month in the year specified. For example, DATE(2008,14,2) returns a value representing February 2, 2009. - -If the value of __month__ is less than 1, then that value will be adjusted by -1, and that will then be subtracted from the first month of the year specified. For example, DATE(2008,0,2) returns a value representing December 2, 2007; while DATE(2008,-1,2) returns a value representing November 2, 2007. - -**day** The day number. - -If this value is greater than the number of days in the month (and year) specified, the DATE function adds that number of days to the first day in the month. For example, DATE(2008,1,35) returns a value representing February 4, 2008. - -If the value of __day__ is less than 1, then that value will be adjusted by -1, and that will then be subtracted from the first month of the year specified. For example, DATE(2008,3,0) returns a value representing February 29, 2008; while DATE(2008,3,-2) returns a value representing February 27, 2008. - -##### Return Value - -**mixed** A date/time stamp that corresponds to the given date. - -This could be a PHP timestamp value (integer), a PHP date/time object, or an Excel timestamp value (real), depending on the value of PHPExcel_Calculation_Functions::getReturnDateType(). - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Year') - ->setCellValue('A2', 'Month') - ->setCellValue('A3', 'Day'); - -$worksheet->setCellValue('B1', 2008) - ->setCellValue('B2', 12) - ->setCellValue('B3', 31); - -$worksheet->setCellValue('D1', '=DATE(B1,B2,B3)'); - -$retVal = $worksheet->getCell('D1')->getCalculatedValue(); -// $retVal = 1230681600 -``` - -```php -// We're going to be calling the same cell calculation multiple times, -// and expecting different return values, so disable calculation cacheing -PHPExcel_Calculation::getInstance()->setCalculationCacheEnabled(FALSE); - -$saveFormat = PHPExcel_Calculation_Functions::getReturnDateType(); - -PHPExcel_Calculation_Functions::setReturnDateType( - PHPExcel_Calculation_Functions::RETURNDATE_EXCEL -); - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATE'), - array(2008, 12, 31) -); -// $retVal = 39813.0 - -PHPExcel_Calculation_Functions::setReturnDateType( - PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC -); - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATE'), - array(2008, 12, 31) -); -// $retVal = 1230681600 - -PHPExcel_Calculation_Functions::setReturnDateType($saveFormat); -``` - -##### Notes - -There are no additional notes on this function - -#### DATEDIF - -The DATEDIF function computes the difference between two dates in a variety of different intervals, such number of years, months, or days. - -##### Syntax - -``` -DATEDIF(date1, date2 [, unit]) -``` - -##### Parameters - -**date1** First Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**date2** Second Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**unit** The interval type to use for the calculation - -This is a string, comprising one of the values listed below: - -Unit | Meaning | Description ------|---------------------------------|-------------------------------- -m | Months | Complete calendar months between the dates. -d | Days | Number of days between the dates. -y | Years | Complete calendar years between the dates. -ym | Months Excluding Years | Complete calendar months between the dates as if they were of the same year. -yd | Days Excluding Years | Complete calendar days between the dates as if they were of the same year. -md | Days Excluding Years And Months | Complete calendar days between the dates as if they were of the same month and same year. - -The unit value is not case sensitive, and defaults to "d". - -##### Return Value - -**integer** An integer value that reflects the difference between the two dates. - -This could be the number of full days, months or years between the two dates, depending on the interval unit value passed into the function as the third parameter. - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Year') - ->setCellValue('A2', 'Month') - ->setCellValue('A3', 'Day'); - -$worksheet->setCellValue('B1', 2001) - ->setCellValue('C1', 2009) - ->setCellValue('B2', 7) - ->setCellValue('C2', 12) - ->setCellValue('B3', 1) - ->setCellValue('C3', 31); - -$worksheet->setCellValue('D1', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),"d")') - ->setCellValue('D2', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),"m")') - ->setCellValue('D3', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),"y")') - ->setCellValue('D4', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),"ym")') - ->setCellValue('D5', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),"yd")') - ->setCellValue('D6', '=DATEDIF(DATE(B1,B2,B3),DATE(C1,C2,C3),"md")'); - -$retVal = $worksheet->getCell('D1')->getCalculatedValue(); -// $retVal = 3105 - -$retVal = $worksheet->getCell('D2')->getCalculatedValue(); -// $retVal = 101 - -$retVal = $worksheet->getCell('D3')->getCalculatedValue(); -// $retVal = 8 - -$retVal = $worksheet->getCell('D4')->getCalculatedValue(); -// $retVal = 5 - -$retVal = $worksheet->getCell('D5')->getCalculatedValue(); -// $retVal = 183 - -$retVal = $worksheet->getCell('D6')->getCalculatedValue(); -// $retVal = 30 -``` - -```php -$date1 = 1193317015; // PHP timestamp for 25-Oct-2007 -$date2 = 1449579415; // PHP timestamp for 8-Dec-2015 - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATEDIF'), - array($date1, $date2, 'd') -); -// $retVal = 2966 - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATEDIF'), - array($date1, $date2, 'm') -); -// $retVal = 97 - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATEDIF'), - array($date1, $date2, 'y') -); -// $retVal = 8 - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATEDIF'), - array($date1, $date2, 'ym') -); -// $retVal = 1 - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATEDIF'), - array($date1, $date2, 'yd') -); -// $retVal = 44 - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATEDIF'), - array($date1, $date2, 'md') -); -// $retVal = 13 -``` - -##### Notes - -If Date1 is later than Date2, DATEDIF will return a #NUM! error. - -#### DATEVALUE - -The DATEVALUE function returns the date represented by a date formatted as a text string. Use DATEVALUE to convert a date represented by text to a serial number. - -##### Syntax - -``` -DATEVALUE(dateString) -``` - -##### Parameters - -**date** Date String. - -A string, representing a date value. - -##### Return Value - -**mixed** A date/time stamp that corresponds to the given date. - -This could be a PHP timestamp value (integer), a PHP date/time object, or an Excel timestamp value (real), depending on the value of PHPExcel_Calculation_Functions::getReturnDateType(). - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Date String'); - ->setCellValue('A2', '31-Dec-2008') - ->setCellValue('A3', '31/12/2008') - ->setCellValue('A4', '12-31-2008'); - -$worksheet->setCellValue('B2', '=DATEVALUE(A2)') - ->setCellValue('B3', '=DATEVALUE(A3)') - ->setCellValue('B4', '=DATEVALUE(A4)'); - -PHPExcel_Calculation_Functions::setReturnDateType( - PHPExcel_Calculation_Functions::RETURNDATE_EXCEL -); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); - -$retVal = $worksheet->getCell('B4')->getCalculatedValue(); -// $retVal = 39813.0 for all cases -``` - -```php -// We're going to be calling the same cell calculation multiple times, -// and expecting different return values, so disable calculation cacheing -PHPExcel_Calculation::getInstance()->setCalculationCacheEnabled(FALSE); - -$saveFormat = PHPExcel_Calculation_Functions::getReturnDateType(); - -PHPExcel_Calculation_Functions::setReturnDateType( - PHPExcel_Calculation_Functions::RETURNDATE_EXCEL -); - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATEVALUE'), - array('31-Dec-2008') -); -// $retVal = 39813.0 - -PHPExcel_Calculation_Functions::setReturnDateType( - PHPExcel_Calculation_Functions::RETURNDATE_PHP_NUMERIC -); - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DATEVALUE'), - array('31-Dec-2008') -); -// $retVal = 1230681600 - -PHPExcel_Calculation_Functions::setReturnDateType($saveFormat); -``` - -##### Notes - -DATEVALUE uses the php date/time object implementation of strtotime() (which can handle a wider range of formats than the normal strtotime() function), and it is also called for any date parameter passed to other date functions (such as DATEDIF) when the parameter value is a string. - -__WARNING:-__ PHPExcel accepts a wider range of date formats than MS Excel, so it is entirely possible that Excel will return a #VALUE! error when passed a date string that it can’t interpret, while PHPExcel is able to translate that same string into a correct date value. - -Care should be taken in workbooks that use string formatted dates in calculations when writing to Excel5 or Excel2007. - -#### DAY - -The DAY function returns the day of a date. The day is given as an integer ranging from 1 to 31. - -##### Syntax - -``` -DAY(datetime) -``` - -##### Parameters - -**datetime** Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -##### Return Value - -**integer** An integer value that reflects the day of the month. - -This is an integer ranging from 1 to 31. - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Date String') - ->setCellValue('A2', '31-Dec-2008') - ->setCellValue('A3', '14-Feb-2008'); - -$worksheet->setCellValue('B2', '=DAY(A2)') - ->setCellValue('B3', '=DAY(A3)'); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 31 - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 14 -``` - -```php -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DAYOFMONTH'), - array('25-Dec-2008') -); -// $retVal = 25 -``` - -##### Notes - -Note that the PHPExcel function is PHPExcel_Calculation_Functions::DAYOFMONTH() when the method is called statically. - -#### DAYS360 - -The DAYS360 function computes the difference between two dates based on a 360 day year (12 equal periods of 30 days each) used by some accounting systems. - -##### Syntax - -``` -DAYS360(date1, date2 [, method]) -``` - -#### Parameters - -**date1** First Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**date2** Second Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**method** A boolean flag (TRUE or FALSE) - -This is a flag that determines which method to use in the calculation, based on the values listed below: - - method | Description - -------|------------ - FALSE | U.S. (NASD) method. If the starting date is the last day of a month, it becomes equal to the 30th of the same month. If the ending date is the last day of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1st of the next month; otherwise the ending date becomes equal to the 30th of the same month. - TRUE | European method. Starting dates and ending dates that occur on the 31st of a month become equal to the 30th of the same month. - -The method value defaults to FALSE. - -##### Return Value - -**integer** An integer value that reflects the difference between the two dates. - -This is the number of full days between the two dates, based on a 360 day year. - -##### Examples - -```php -$worksheet->setCellValue('B1', 'Start Date') - ->setCellValue('C1', 'End Date') - ->setCellValue('A2', 'Year') - ->setCellValue('A3', 'Month') - ->setCellValue('A4', 'Day'); - -$worksheet->setCellValue('B2', 2003) - ->setCellValue('B3', 2) - ->setCellValue('B4', 3); - -$worksheet->setCellValue('C2', 2007) - ->setCellValue('C3', 5) - ->setCellValue('C4', 31); - -$worksheet->setCellValue('E2', '=DAYS360(DATE(B2,B3,B4),DATE(C2,C3,C4))') - ->setCellValue('E4', '=DAYS360(DATE(B2,B3,B4),DATE(C2,C3,C4),FALSE)'); - -$retVal = $worksheet->getCell('E2')->getCalculatedValue(); -// $retVal = 1558 - -$retVal = $worksheet->getCell('E4')->getCalculatedValue(); -// $retVal = 1557 -``` - -```php -$date1 = 37655.0; // Excel timestamp for 25-Oct-2007 -$date2 = 39233.0; // Excel timestamp for 8-Dec-2015 - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DAYS360'), - array($date1, $date2) -); -// $retVal = 1558 - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DAYS360'), - array($date1, $date2, TRUE) -); -// $retVal = 1557 -``` - -##### Notes - -__WARNING:-__ This function does not currently work with the Excel5 Writer when a PHP Boolean is used for the third (optional) parameter (as shown in the example above), and the writer will generate and error. It will work if a numeric 0 or 1 is used for the method parameter; or if the Excel TRUE() and FALSE() functions are used instead. - -#### EDATE - -The EDATE function returns an Excel timestamp or a PHP timestamp or date object representing the date that is the indicated number of months before or after a specified date (the start_date). Use EDATE to calculate maturity dates or due dates that fall on the same day of the month as the date of issue. - -##### Syntax - -``` -EDATE(baseDate, months) -``` - -##### Parameters - -**baseDate** Start Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**months** Number of months to add. - -An integer value indicating the number of months before or after baseDate. A positive value for months yields a future date; a negative value yields a past date. - -##### Return Value - -**mixed** A date/time stamp that corresponds to the basedate + months. - -This could be a PHP timestamp value (integer), a PHP date/time object, or an Excel timestamp value (real), depending on the value of PHPExcel_Calculation_Functions::getReturnDateType(). - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Date String') - ->setCellValue('A2', '1-Jan-2008') - ->setCellValue('A3', '29-Feb-2008'); - -$worksheet->setCellValue('B2', '=EDATE(A2,5)') - ->setCellValue('B3', '=EDATE(A3,-12)'); - -PHPExcel_Calculation_Functions::setReturnDateType( - PHPExcel_Calculation_Functions::RETURNDATE_EXCEL -); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 39600.0 (1-Jun-2008) - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 39141.0 (28-Feb-2007) -``` - -```php -PHPExcel_Calculation_Functions::setReturnDateType( - PHPExcel_Calculation_Functions::RETURNDATE_EXCEL -); - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'EDATE'), - array('31-Oct-2008',25) -); -// $retVal = 40512.0 (30-Nov-2010) -``` - -###### Notes - -__WARNING:-__ This function is currently not supported by the Excel5 Writer because it is not a standard function within Excel 5, but an add-in from the Analysis ToolPak. - -#### EOMONTH - -The EOMONTH function returns an Excel timestamp or a PHP timestamp or date object representing the date of the last day of the month that is the indicated number of months before or after a specified date (the start_date). Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month. - -##### Syntax - -``` -EOMONTH(baseDate, months) -``` - -##### Parameters - -**baseDate** Start Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**months** Number of months to add. - -An integer value indicating the number of months before or after baseDate. A positive value for months yields a future date; a negative value yields a past date. - -##### Return Value - -**mixed** A date/time stamp that corresponds to the last day of basedate + months. - -This could be a PHP timestamp value (integer), a PHP date/time object, or an Excel timestamp value (real), depending on the value of PHPExcel_Calculation_Functions::getReturnDateType(). - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Date String') - ->setCellValue('A2', '1-Jan-2000') - ->setCellValue('A3', '14-Feb-2009'); - -$worksheet->setCellValue('B2', '=EOMONTH(A2,5)') - ->setCellValue('B3', '=EOMONTH(A3,-12)'); - -PHPExcel_Calculation_Functions::setReturnDateType(PHPExcel_Calculation_Functions::RETURNDATE_EXCEL); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 39629.0 (30-Jun-2008) - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 39507.0 (29-Feb-2008) -``` - -```php -PHPExcel_Calculation_Functions::setReturnDateType( - PHPExcel_Calculation_Functions::RETURNDATE_EXCEL -); - -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'EOMONTH'), - array('31-Oct-2008',13) -); -// $retVal = 40147.0 (30-Nov-2010) -``` - -##### Notes - -__WARNING:-__ This function is currently not supported by the Excel5 Writer because it is not a standard function within Excel 5, but an add-in from the Analysis ToolPak. - -#### HOUR - -The HOUR function returns the hour of a time value. The hour is given as an integer, ranging from 0 (12:00 A.M.) to 23 (11:00 P.M.). - -##### Syntax - -``` -HOUR(datetime) -``` - -##### Parameters - -**datetime** Time. - -An Excel date/time value, PHP date timestamp, PHP date object, or a date/time represented as a string. - -##### Return Value - -**integer** An integer value that reflects the hour of the day. - -This is an integer ranging from 0 to 23. - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Time String') - ->setCellValue('A2', '31-Dec-2008 17:30') - ->setCellValue('A3', '14-Feb-2008 4:20 AM') - ->setCellValue('A4', '14-Feb-2008 4:20 PM'); - -$worksheet->setCellValue('B2', '=HOUR(A2)') - ->setCellValue('B3', '=HOUR(A3)') - ->setCellValue('B4', '=HOUR(A4)'); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 17 - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 4 - -$retVal = $worksheet->getCell('B4')->getCalculatedValue(); -// $retVal = 16 -``` - -```php -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'HOUROFDAY'), - array('09:30') -); -// $retVal = 9 -``` - -##### Notes - -Note that the PHPExcel function is PHPExcel_Calculation_Functions::HOUROFDAY() when the method is called statically. - -#### MINUTE - -The MINUTE function returns the minutes of a time value. The minute is given as an integer, ranging from 0 to 59. - -##### Syntax - -``` -MINUTE(datetime) -``` - -##### Parameters - -**datetime** Time. - -An Excel date/time value, PHP date timestamp, PHP date object, or a date/time represented as a string. - -##### Return Value - -**integer** An integer value that reflects the minutes within the hour. - -This is an integer ranging from 0 to 59. - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Time String') - ->setCellValue('A2', '31-Dec-2008 17:30') - ->setCellValue('A3', '14-Feb-2008 4:20 AM') - ->setCellValue('A4', '14-Feb-2008 4:45 PM'); - -$worksheet->setCellValue('B2', '=MINUTE(A2)') - ->setCellValue('B3', '=MINUTE(A3)') - ->setCellValue('B4', '=MINUTE(A4)'); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 30 - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 20 - -$retVal = $worksheet->getCell('B4')->getCalculatedValue(); -// $retVal = 45 -``` - -```php -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'MINUTEOFHOUR'), - array('09:30') -); -// $retVal = 30 -``` - -##### Notes - -Note that the PHPExcel function is PHPExcel_Calculation_Functions::MINUTEOFHOUR() when the method is called statically. - -#### MONTH - -The MONTH function returns the month of a date. The month is given as an integer ranging from 1 to 12. - -##### Syntax - -``` -MONTH(datetime) -``` - -##### Parameters - -**datetime** Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -##### Return Value - -**integer** An integer value that reflects the month of the year. - -This is an integer ranging from 1 to 12. - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Date String'); -$worksheet->setCellValue('A2', '31-Dec-2008'); -$worksheet->setCellValue('A3', '14-Feb-2008'); - -$worksheet->setCellValue('B2', '=MONTH(A2)'); -$worksheet->setCellValue('B3', '=MONTH(A3)'); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 12 - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 2 -``` - -```php -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'MONTHOFYEAR'), - array('14-July-2008') -); -// $retVal = 7 -``` - -#### Notes - -Note that the PHPExcel function is PHPExcel_Calculation_Functions::MONTHOFYEAR() when the method is called statically. - -#### NETWORKDAYS - -The NETWORKDAYS function returns the number of whole working days between a *start date* and an *end date*. Working days exclude weekends and any dates identified in *holidays*. Use NETWORKDAYS to calculate employee benefits that accrue based on the number of days worked during a specific term. - -##### Syntax - -``` -NETWORKDAYS(startDate, endDate [, holidays]) -``` - -##### Parameters - -**startDate** Start Date of the period. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**endDate** End Date of the period. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**holidays** Optional array of Holiday dates. - -An optional range of one or more dates to exclude from the working calendar, such as state and federal holidays and floating holidays. - -The list can be either a range of cells that contains the dates or an array constant of Excel date values, PHP date timestamps, PHP date objects, or dates represented as strings. - -##### Return Value - -**integer** Number of working days. - -The number of working days between startDate and endDate. - -##### Examples - -```php -``` - -```php -``` - -##### Notes - -There are no additional notes on this function - -#### NOW - -The NOW function returns the current date and time. - -##### Syntax - -``` -NOW() -``` - -##### Parameters - -There are now parameters for the NOW() function. - -##### Return Value - -**mixed** A date/time stamp that corresponds to the current date and time. - -This could be a PHP timestamp value (integer), a PHP date/time object, or an Excel timestamp value (real), depending on the value of PHPExcel_Calculation_Functions::getReturnDateType(). - -##### Examples - -```php -``` - -```php -``` - -##### Notes - -Note that the PHPExcel function is PHPExcel_Calculation_Functions::DATETIMENOW() when the method is called statically. - -#### SECOND - -The SECOND function returns the seconds of a time value. The second is given as an integer, ranging from 0 to 59. - -##### Syntax - -``` -SECOND(datetime) -``` - -##### Parameters - -**datetime** Time. - -An Excel date/time value, PHP date timestamp, PHP date object, or a date/time represented as a string. - -##### Return Value - -**integer** An integer value that reflects the seconds within the minute. - -This is an integer ranging from 0 to 59. - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Time String') - ->setCellValue('A2', '31-Dec-2008 17:30:20') - ->setCellValue('A3', '14-Feb-2008 4:20 AM') - ->setCellValue('A4', '14-Feb-2008 4:45:59 PM'); - -$worksheet->setCellValue('B2', '=SECOND(A2)') - ->setCellValue('B3', '=SECOND(A3)'); - ->setCellValue('B4', '=SECOND(A4)'); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 20 - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 0 - -$retVal = $worksheet->getCell('B4')->getCalculatedValue(); -// $retVal = 59 -``` - -```php -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'SECONDOFMINUTE'), - array('09:30:17') -); -// $retVal = 17 -``` - -##### Notes - -Note that the PHPExcel function is PHPExcel_Calculation_Functions::SECONDOFMINUTE() when the method is called statically. - -#### TIME - -Not yet documented. - -#### TIMEVALUE - -Not yet documented. - -#### TODAY - -Not yet documented. - -#### WEEKDAY - -The WEEKDAY function returns the day of the week for a given date. The day is given as an integer ranging from 1 to 7, although this can be modified to return a value between 0 and 6. - -##### Syntax - -``` -WEEKDAY(datetime [, method]) -``` - -##### Parameters - -**datetime** Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -**method** An integer flag (values 0, 1 or 2) - -This is a flag that determines which method to use in the calculation, based on the values listed below: - - method | Description - :-----:|------------------------------------------ - 0 | Returns 1 (Sunday) through 7 (Saturday). - 1 | Returns 1 (Monday) through 7 (Sunday). - 2 | Returns 0 (Monday) through 6 (Sunday). - -The method value defaults to 1. - -##### Return Value - -**integer** An integer value that reflects the day of the week. - -This is an integer ranging from 1 to 7, or 0 to 6, depending on the value of method. - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Date String') - ->setCellValue('A2', '31-Dec-2008') - ->setCellValue('A3', '14-Feb-2008'); - -$worksheet->setCellValue('B2', '=WEEKDAY(A2)') - ->setCellValue('B3', '=WEEKDAY(A3,0)') - ->setCellValue('B4', '=WEEKDAY(A3,2)'); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 12 - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 2 - -$retVal = $worksheet->getCell('B4')->getCalculatedValue(); -// $retVal = 2 -``` - -```php -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'DAYOFWEEK'), - array('14-July-2008') -); -// $retVal = 7 -``` - -##### Notes - -Note that the PHPExcel function is PHPExcel_Calculation_Functions::DAYOFWEEK() when the method is called statically. - -#### WEEKNUM - -Not yet documented. - -#### WORKDAY - -Not yet documented. - -#### YEAR - -The YEAR function returns the year of a date. - -##### Syntax - -``` -YEAR(datetime) -``` - -##### Parameters - -**datetime** Date. - -An Excel date value, PHP date timestamp, PHP date object, or a date represented as a string. - -##### Return Value - -**integer** An integer value that reflects the month of the year. - -This is an integer year value. - -##### Examples - -```php -$worksheet->setCellValue('A1', 'Date String') - ->setCellValue('A2', '17-Jul-1982') - ->setCellValue('A3', '16-Apr-2009'); - -$worksheet->setCellValue('B2', '=YEAR(A2)') - ->setCellValue('B3', '=YEAR(A3)'); - -$retVal = $worksheet->getCell('B2')->getCalculatedValue(); -// $retVal = 1982 - -$retVal = $worksheet->getCell('B3')->getCalculatedValue(); -// $retVal = 2009 -``` - -```php -$retVal = call_user_func_array( - array('PHPExcel_Calculation_Functions', 'YEAR'), - array('14-July-2001') -); -// $retVal = 2001 -``` - -##### Notes - -There are no additional notes on this function - -### YEARFRAC - -Not yet documented. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/01-Autofilters.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/01-Autofilters.md deleted file mode 100644 index c2fbd2f..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/01-Autofilters.md +++ /dev/null @@ -1,19 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## AutoFilters - -Each worksheet in an Excel Workbook can contain a single autoFilter range. Filtered data displays only the rows that meet criteria that you specify and hides rows that you do not want displayed. You can filter by more than one column: filters are additive, which means that each additional filter is based on the current filter and further reduces the subset of data. - -![01-01-autofilter.png](./images/01-01-autofilter.png "") - -When an AutoFilter is applied to a range of cells, the first row in an autofilter range will be the heading row, which displays the autoFilter dropdown icons. It is not part of the actual autoFiltered data. All subsequent rows are the autoFiltered data. So an AutoFilter range should always contain the heading row and one or more data rows (one data row is pretty meaningless), but PHPExcel won't actually stop you specifying a meaningless range: it's up to you as the developer to avoid such errors. - -To determine if a filter is applied, note the icon in the column heading. A drop-down arrow (![01-03-filter-icon-1.png](./images/01-03-filter-icon-1.png "")) means that filtering is enabled but not applied. In MS Excel, when you hover over the heading of a column with filtering enabled but not applied, a screen tip displays the cell text for the first row in that column, and the message "(Showing All)". - -![01-02-autofilter.png](./images/01-02-autofilter.png "") - - -A Filter button (![01-03-filter-icon-2.png](./images/01-03-filter-icon-2.png "")) means that a filter is applied. When you hover over the heading of a filtered column, a screen tip displays the filter that has been applied to that column, such as "Equals a red cell color" or "Larger than 150". - -![01-04-autofilter.png](./images/01-04-autofilter.png "") diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/02-Setting-an-Autofilter.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/02-Setting-an-Autofilter.md deleted file mode 100644 index 49c8fa4..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/02-Setting-an-Autofilter.md +++ /dev/null @@ -1,24 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## Setting an AutoFilter area on a worksheet - -To set an autoFilter on a range of cells. - -```php -$objPHPExcel->getActiveSheet()->setAutoFilter('A1:E20'); -``` - -The first row in an autofilter range will be the heading row, which displays the autoFilter dropdown icons. It is not part of the actual autoFiltered data. All subsequent rows are the autoFiltered data. So an AutoFilter range should always contain the heading row and one or more data rows (one data row is pretty meaningless, but PHPExcel won't actually stop you specifying a meaningless range: it's up to you as the developer to avoid such errors. - -If you want to set the whole worksheet as an autofilter region - -```php -$objPHPExcel->getActiveSheet()->setAutoFilter( - $objPHPExcel->getActiveSheet() - ->calculateWorksheetDimension() -); -``` - -This enables filtering, but does not actually apply any filters. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/03-Autofilter-Expressions.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/03-Autofilter-Expressions.md deleted file mode 100644 index fd65901..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/03-Autofilter-Expressions.md +++ /dev/null @@ -1,27 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## Autofilter Expressions - -PHPEXcel 1.7.8 introduced the ability to actually create, read and write filter expressions; initially only for Excel2007 files, but later releases will extend this to other formats. - -To apply a filter expression to an autoFilter range, you first need to identify which column you're going to be applying this filter to. - -```php -$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter(); -$columnFilter = $autoFilter->getColumn('C'); -``` - -This returns an autoFilter column object, and you can then apply filter expressions to that column. - -There are a number of different types of autofilter expressions. The most commonly used are: - - - Simple Filters - - DateGroup Filters - - Custom filters - - Dynamic Filters - - Top Ten Filters - -These different types are mutually exclusive within any single column. You should not mix the different types of filter in the same column. PHPExcel will not actively prevent you from doing this, but the results are unpredictable. - -Other filter expression types (such as cell colour filters) are not yet supported. diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-01-Autofilter-Expressions-Simple.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-01-Autofilter-Expressions-Simple.md deleted file mode 100644 index ca229b8..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-01-Autofilter-Expressions-Simple.md +++ /dev/null @@ -1,52 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## Autofilter Expressions - -### Simple filters - -In MS Excel, Simple Filters are a dropdown list of all values used in that column, and the user can select which ones they want to display and which ones they want to hide by ticking and unticking the checkboxes alongside each option. When the filter is applied, rows containing the checked entries will be displayed, rows that don't contain those values will be hidden. - -![04-01-simple-autofilter.png](./images/04-01-simple-autofilter.png "") - -To create a filter expression, we need to start by identifying the filter type. In this case, we're just going to specify that this filter is a standard filter. - -```php -$columnFilter->setFilterType( - PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER -); -``` - -Now we've identified the filter type, we can create a filter rule and set the filter values: - -When creating a simple filter in PHPExcel, you only need to specify the values for "checked" columns: you do this by creating a filter rule for each value. - -```php -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - 'France' - ); - -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - 'Germany' - ); -``` - -This creates two filter rules: the column will be filtered by values that match “France” OR “Germany”. For Simple Filters, you can create as many rules as you want - -Simple filters are always a comparison match of EQUALS, and multiple standard filters are always treated as being joined by an OR condition. - -#### Matching Blanks - -If you want to create a filter to select blank cells, you would use: - -```php -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - '' - ); -``` diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-02-Autofilter-Expressions-Dategroup.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-02-Autofilter-Expressions-Dategroup.md deleted file mode 100644 index 2b9015f..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-02-Autofilter-Expressions-Dategroup.md +++ /dev/null @@ -1,48 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## Autofilter Expressions - -### DateGroup Filters - -In MS Excel, DateGroup filters provide a series of dropdown filter selectors for date values, so you can specify entire years, or months within a year, or individual days within each month. - -![04-02-dategroup-autofilter.png](./images/04-02-dategroup-autofilter.png "") - -DateGroup filters are still applied as a Standard Filter type. - -```php -$columnFilter->setFilterType( - PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER -); -``` - -Creating a dateGroup filter in PHPExcel, you specify the values for "checked" columns as an associative array of year. month, day, hour minute and second. To select a year and month, you need to create a DateGroup rule identifying the selected year and month: - -```php -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - array( - 'year' => 2012, - 'month' => 1 - ) - ) - ->setRuleType( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP - ); -``` - -The key values for the associative array are: - - - year - - month - - day - - hour - - minute - - second - -Like Standard filters, DateGroup filters are always a match of EQUALS, and multiple standard filters are always treated as being joined by an OR condition. - -Note that we alse specify a ruleType: to differentiate this from a standard filter, we explicitly set the Rule's Type to AUTOFILTER_RULETYPE_DATEGROUP. As with standard filters, we can create any number of DateGroup Filters. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-03-Autofilter-Expressions-Custom.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-03-Autofilter-Expressions-Custom.md deleted file mode 100644 index 9ca3bd4..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-03-Autofilter-Expressions-Custom.md +++ /dev/null @@ -1,84 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## Autofilter Expressions - -### Custom filters - -In MS Excel, Custom filters allow us to select more complex conditions using an operator as well as a value. Typical examples might be values that fall within a range (e.g. between -20 and +20), or text values with wildcards (e.g. beginning with the letter U). To handle this, they - -![04-03-custom-autofilter-1.png](./images/04-03-custom-autofilter-1.png "") - -![04-03-custom-autofilter-2.png](./images/04-03-custom-autofilter-2.png "") - -Custom filters are limited to 2 rules, and these can be joined using either an AND or an OR. - -We start by specifying a Filter type, this time a CUSTOMFILTER. - -```php -$columnFilter->setFilterType( - PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER -); -``` - -And then define our rules. - -The following shows a simple wildcard filter to show all column entries beginning with the letter 'U'. - -```php -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - 'U*' - ) - ->setRuleType( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER - ); -``` - -MS Excel uses \* as a wildcard to match any number of characters, and ? as a wildcard to match a single character. 'U\*' equates to "begins with a 'U'"; '\*U' equates to "ends with a 'U'"; and '\*U\*' equates to "contains a 'U'" - -If you want to match explicitly against a \* or a ? character, you can escape it with a tilde (~), so ?~\*\* would explicitly match for a \* character as the second character in the cell value, followed by any number of other characters. The only other character that needs escaping is the ~ itself. - -To create a "between" condition, we need to define two rules: - -```php -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, - -20 - ) - ->setRuleType( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER - ); -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, - 20 - ) - ->setRuleType( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER - ); -``` - -We also set the rule type to CUSTOMFILTER. - -This defined two rules, filtering numbers that are >= -20 OR <= 20, so we also need to modify the join condition to reflect AND rather than OR. - -```php -$columnFilter->setAndOr( - PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_ANDOR_AND -); -``` - -The valid set of operators for Custom Filters are defined in the PHPExcel_Worksheet_AutoFilter_Column_Rule class, and comprise: - - Operator Constant | Value | - ------------------------------------------|----------------------| - AUTOFILTER_COLUMN_RULE_EQUAL | 'equal' | - AUTOFILTER_COLUMN_RULE_NOTEQUAL | 'notEqual' | - AUTOFILTER_COLUMN_RULE_GREATERTHAN | 'greaterThan' | - AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL | 'greaterThanOrEqual' | - AUTOFILTER_COLUMN_RULE_LESSTHAN | 'lessThan' | - AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL | 'lessThanOrEqual' | - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-04-Autofilter-Expressions-Dynamic.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-04-Autofilter-Expressions-Dynamic.md deleted file mode 100644 index f285e57..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-04-Autofilter-Expressions-Dynamic.md +++ /dev/null @@ -1,88 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## Autofilter Expressions - -### Dynamic Filters - -Dynamic Filters are based on a dynamic comparison condition, where the value we're comparing against the cell values is variable, such as 'today'; or when we're testing against an aggregate of the cell data (e.g. 'aboveAverage'). Only a single dynamic filter can be applied to a column at a time. - -![04-04-dynamic-autofilter.png](./images/04-04-dynamic-autofilter.png "") - -Again, we start by specifying a Filter type, this time a DYNAMICFILTER. - -```php -$columnFilter->setFilterType( - PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER -); -``` - -When defining the rule for a dynamic filter, we don't define a value (we can simply set that to NULL) but we do specify the dynamic filter category. - -```php -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - NULL, - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE - ) - ->setRuleType( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER - ); -``` - -We also set the rule type to DYNAMICFILTER. - -The valid set of dynamic filter categories is defined in the PHPExcel_Worksheet_AutoFilter_Column_Rule class, and comprises: - - Operator Constant | Value | - -----------------------------------------|----------------| - AUTOFILTER_RULETYPE_DYNAMIC_YESTERDAY | 'yesterday' | - AUTOFILTER_RULETYPE_DYNAMIC_TODAY | 'today' | - AUTOFILTER_RULETYPE_DYNAMIC_TOMORROW | 'tomorrow' | - AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE | 'yearToDate' | - AUTOFILTER_RULETYPE_DYNAMIC_THISYEAR | 'thisYear' | - AUTOFILTER_RULETYPE_DYNAMIC_THISQUARTER | 'thisQuarter' | - AUTOFILTER_RULETYPE_DYNAMIC_THISMONTH | 'thisMonth' | - AUTOFILTER_RULETYPE_DYNAMIC_THISWEEK | 'thisWeek' | - AUTOFILTER_RULETYPE_DYNAMIC_LASTYEAR | 'lastYear' | - AUTOFILTER_RULETYPE_DYNAMIC_LASTQUARTER | 'lastQuarter' | - AUTOFILTER_RULETYPE_DYNAMIC_LASTMONTH | 'lastMonth' | - AUTOFILTER_RULETYPE_DYNAMIC_LASTWEEK | 'lastWeek' | - AUTOFILTER_RULETYPE_DYNAMIC_NEXTYEAR | 'nextYear' | - AUTOFILTER_RULETYPE_DYNAMIC_NEXTQUARTER | 'nextQuarter' | - AUTOFILTER_RULETYPE_DYNAMIC_NEXTMONTH | 'nextMonth' | - AUTOFILTER_RULETYPE_DYNAMIC_NEXTWEEK | 'nextWeek' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_1 | 'M1' | - AUTOFILTER_RULETYPE_DYNAMIC_JANUARY | 'M1' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_2 | 'M2' | - AUTOFILTER_RULETYPE_DYNAMIC_FEBRUARY | 'M2' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_3 | 'M3' | - AUTOFILTER_RULETYPE_DYNAMIC_MARCH | 'M3' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_4 | 'M4' | - AUTOFILTER_RULETYPE_DYNAMIC_APRIL | 'M4' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_5 | 'M5' | - AUTOFILTER_RULETYPE_DYNAMIC_MAY | 'M5' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_6 | 'M6' | - AUTOFILTER_RULETYPE_DYNAMIC_JUNE | 'M6' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_7 | 'M7' | - AUTOFILTER_RULETYPE_DYNAMIC_JULY | 'M7' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_8 | 'M8' | - AUTOFILTER_RULETYPE_DYNAMIC_AUGUST | 'M8' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_9 | 'M9' | - AUTOFILTER_RULETYPE_DYNAMIC_SEPTEMBER | 'M9' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_10 | 'M10' | - AUTOFILTER_RULETYPE_DYNAMIC_OCTOBER | 'M10' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_11 | 'M11' | - AUTOFILTER_RULETYPE_DYNAMIC_NOVEMBER | 'M11' | - AUTOFILTER_RULETYPE_DYNAMIC_MONTH_12 | 'M12' | - AUTOFILTER_RULETYPE_DYNAMIC_DECEMBER | 'M12' | - AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_1 | 'Q1' | - AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_2 | 'Q2' | - AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_3 | 'Q3' | - AUTOFILTER_RULETYPE_DYNAMIC_QUARTER_4 | 'Q4' | - AUTOFILTER_RULETYPE_DYNAMIC_ABOVEAVERAGE | 'aboveAverage' | - AUTOFILTER_RULETYPE_DYNAMIC_BELOWAVERAGE | 'belowAverage' | - -We can only apply a single Dynamic Filter rule to a column at a time. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-05-Autofilter-Expressions-Topten.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-05-Autofilter-Expressions-Topten.md deleted file mode 100644 index ff36b0a..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/04-05-Autofilter-Expressions-Topten.md +++ /dev/null @@ -1,69 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## Autofilter Expressions - -### Top Ten Filters - -Top Ten Filters are similar to Dynamic Filters in that they are based on a summarisation of the actual data values in the cells. However, unlike Dynamic Filters where you can only select a single option, Top Ten Filters allow you to select based on a number of criteria: - -![04-05-custom-topten-1.png](./images/04-05-topten-autofilter-1.png "") - -![04-05-custom-topten-2.png](./images/04-05-topten-autofilter-2.png "") - -You can identify whether you want the top (highest) or bottom (lowest) values.You can identify how many values you wish to select in the filterYou can identify whether this should be a percentage or a number of items. - -Like Dynamic Filters, only a single Top Ten filter can be applied to a column at a time. - -We start by specifying a Filter type, this time a DYNAMICFILTER. - -```php -$columnFilter->setFilterType( - PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_TOPTENFILTER -); -``` - -Then we create the rule: - -```php -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT, - 5, - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_TOP - ) - ->setRuleType( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_TOPTENFILTER - ); -``` - -This will filter the Top 5 percent of values in the column. - -To specify the lowest (bottom 2 values), we would specify a rule of: - -```php -$columnFilter->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE, - 5, - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM - ) - ->setRuleType( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_TOPTENFILTER - ); -``` - -The option values for TopTen Filters top/bottom value/percent are all defined in the PHPExcel_Worksheet_AutoFilter_Column_Rule class, and comprise: - - Operator Constant | Value | - ---------------------------------------|-------------| - AUTOFILTER_COLUMN_RULE_TOPTEN_BY_VALUE | 'byValue' | - AUTOFILTER_COLUMN_RULE_TOPTEN_PERCENT | 'byPercent' | - -and - - Operator Constant | Value | - -------------------------------------|----------| - AUTOFILTER_COLUMN_RULE_TOPTEN_TOP | 'top' | - AUTOFILTER_COLUMN_RULE_TOPTEN_BOTTOM | 'bottom' | - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/05-Executing-Autofilters.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/05-Executing-Autofilters.md deleted file mode 100644 index 852e1f4..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/05-Executing-Autofilters.md +++ /dev/null @@ -1,42 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## Executing an AutoFilter - -When an autofilter is applied in MS Excel, it sets the row hidden/visible flags for each row of the autofilter area based on the selected criteria, so that only those rows that match the filter criteria are displayed. - -PHPExcel will not execute the equivalent function automatically when you set or change a filter expression, but only when the file is saved. - -### Applying the Filter - -If you wish to execute your filter from within a script, you need to do this manually. You can do this using the autofilters showHideRows() method. - -```php -$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter(); -$autoFilter->showHideRows(); -``` - -This will set all rows that match the filter criteria to visible, while hiding all other rows within the autofilter area. - -### Displaying Filtered Rows - -Simply looping through the rows in an autofilter area will still access ever row, whether it matches the filter criteria or not. To selectively access only the filtered rows, you need to test each row’s visibility settings. - -```php -foreach ($objPHPExcel->getActiveSheet()->getRowIterator() as $row) { - if ($objPHPExcel->getActiveSheet() - ->getRowDimension($row->getRowIndex())->getVisible()) { - echo ' Row number - ' , $row->getRowIndex() , ' '; - echo $objPHPExcel->getActiveSheet() - ->getCell( - 'C'.$row->getRowIndex() - ) - ->getValue(), ' '; - echo $objPHPExcel->getActiveSheet() - ->getCell( - 'D'.$row->getRowIndex() - )->getFormattedValue(), ' '; - echo EOL; - } -} -``` diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/06-Autofilter-Sorting.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/06-Autofilter-Sorting.md deleted file mode 100644 index 23133b8..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/06-Autofilter-Sorting.md +++ /dev/null @@ -1,7 +0,0 @@ -# PHPExcel AutoFilter Reference - - -## AutoFilter Sorting - -In MS Excel, Autofiltering also allows the rows to be sorted. This feature is ***not*** supported by PHPExcel. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-01-autofilter.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-01-autofilter.png deleted file mode 100644 index 8b5c4fa..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-01-autofilter.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-02-autofilter.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-02-autofilter.png deleted file mode 100644 index a2d6c9b..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-02-autofilter.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-03-filter-icon-1.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-03-filter-icon-1.png deleted file mode 100644 index e5a7e7d..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-03-filter-icon-1.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-03-filter-icon-2.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-03-filter-icon-2.png deleted file mode 100644 index 1567245..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-03-filter-icon-2.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-04-autofilter.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-04-autofilter.png deleted file mode 100644 index b88f4c4..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/01-04-autofilter.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-01-simple-autofilter.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-01-simple-autofilter.png deleted file mode 100644 index 5dcc6a4..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-01-simple-autofilter.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-02-dategroup-autofilter.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-02-dategroup-autofilter.png deleted file mode 100644 index da1f089..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-02-dategroup-autofilter.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-03-custom-autofilter-1.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-03-custom-autofilter-1.png deleted file mode 100644 index 0098d98..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-03-custom-autofilter-1.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-03-custom-autofilter-2.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-03-custom-autofilter-2.png deleted file mode 100644 index 96ff2cf..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-03-custom-autofilter-2.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-04-dynamic-autofilter.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-04-dynamic-autofilter.png deleted file mode 100644 index 6cb905d..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-04-dynamic-autofilter.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-05-topten-autofilter-1.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-05-topten-autofilter-1.png deleted file mode 100644 index 207e645..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-05-topten-autofilter-1.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-05-topten-autofilter-2.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-05-topten-autofilter-2.png deleted file mode 100644 index 4db5125..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Features/Autofilters/images/04-05-topten-autofilter-2.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Functions/FunctionListByCategory.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Functions/FunctionListByCategory.md deleted file mode 100644 index 4ceb1e4..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Functions/FunctionListByCategory.md +++ /dev/null @@ -1,411 +0,0 @@ -## CATEGORY_CUBE - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - CUBEKPIMEMBER | **\*\*\* Not yet Implemented** - CUBEMEMBER | **\*\*\* Not yet Implemented** - CUBEMEMBERPROPERTY | **\*\*\* Not yet Implemented** - CUBERANKEDMEMBER | **\*\*\* Not yet Implemented** - CUBESET | **\*\*\* Not yet Implemented** - CUBESETCOUNT | **\*\*\* Not yet Implemented** - CUBEVALUE | **\*\*\* Not yet Implemented** - -## CATEGORY_DATABASE - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - DAVERAGE | PHPExcel_Calculation_Database::DAVERAGE - DCOUNT | PHPExcel_Calculation_Database::DCOUNT - DCOUNTA | PHPExcel_Calculation_Database::DCOUNTA - DGET | PHPExcel_Calculation_Database::DGET - DMAX | PHPExcel_Calculation_Database::DMAX - DMIN | PHPExcel_Calculation_Database::DMIN - DPRODUCT | PHPExcel_Calculation_Database::DPRODUCT - DSTDEV | PHPExcel_Calculation_Database::DSTDEV - DSTDEVP | PHPExcel_Calculation_Database::DSTDEVP - DSUM | PHPExcel_Calculation_Database::DSUM - DVAR | PHPExcel_Calculation_Database::DVAR - DVARP | PHPExcel_Calculation_Database::DVARP - -## CATEGORY_DATE_AND_TIME - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - DATE | PHPExcel_Calculation_DateTime::DATE - DATEDIF | PHPExcel_Calculation_DateTime::DATEDIF - DATEVALUE | PHPExcel_Calculation_DateTime::DATEVALUE - DAY | PHPExcel_Calculation_DateTime::DAYOFMONTH - DAYS360 | PHPExcel_Calculation_DateTime::DAYS360 - EDATE | PHPExcel_Calculation_DateTime::EDATE - EOMONTH | PHPExcel_Calculation_DateTime::EOMONTH - HOUR | PHPExcel_Calculation_DateTime::HOUROFDAY - MINUTE | PHPExcel_Calculation_DateTime::MINUTEOFHOUR - MONTH | PHPExcel_Calculation_DateTime::MONTHOFYEAR - NETWORKDAYS | PHPExcel_Calculation_DateTime::NETWORKDAYS - NOW | PHPExcel_Calculation_DateTime::DATETIMENOW - SECOND | PHPExcel_Calculation_DateTime::SECONDOFMINUTE - TIME | PHPExcel_Calculation_DateTime::TIME - TIMEVALUE | PHPExcel_Calculation_DateTime::TIMEVALUE - TODAY | PHPExcel_Calculation_DateTime::DATENOW - WEEKDAY | PHPExcel_Calculation_DateTime::DAYOFWEEK - WEEKNUM | PHPExcel_Calculation_DateTime::WEEKOFYEAR - WORKDAY | PHPExcel_Calculation_DateTime::WORKDAY - YEAR | PHPExcel_Calculation_DateTime::YEAR - YEARFRAC | PHPExcel_Calculation_DateTime::YEARFRAC - -## CATEGORY_ENGINEERING - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - BESSELI | PHPExcel_Calculation_Engineering::BESSELI - BESSELJ | PHPExcel_Calculation_Engineering::BESSELJ - BESSELK | PHPExcel_Calculation_Engineering::BESSELK - BESSELY | PHPExcel_Calculation_Engineering::BESSELY - BIN2DEC | PHPExcel_Calculation_Engineering::BINTODEC - BIN2HEX | PHPExcel_Calculation_Engineering::BINTOHEX - BIN2OCT | PHPExcel_Calculation_Engineering::BINTOOCT - COMPLEX | PHPExcel_Calculation_Engineering::COMPLEX - CONVERT | PHPExcel_Calculation_Engineering::CONVERTUOM - DEC2BIN | PHPExcel_Calculation_Engineering::DECTOBIN - DEC2HEX | PHPExcel_Calculation_Engineering::DECTOHEX - DEC2OCT | PHPExcel_Calculation_Engineering::DECTOOCT - DELTA | PHPExcel_Calculation_Engineering::DELTA - ERF | PHPExcel_Calculation_Engineering::ERF - ERFC | PHPExcel_Calculation_Engineering::ERFC - GESTEP | PHPExcel_Calculation_Engineering::GESTEP - HEX2BIN | PHPExcel_Calculation_Engineering::HEXTOBIN - HEX2DEC | PHPExcel_Calculation_Engineering::HEXTODEC - HEX2OCT | PHPExcel_Calculation_Engineering::HEXTOOCT - IMABS | PHPExcel_Calculation_Engineering::IMABS - IMAGINARY | PHPExcel_Calculation_Engineering::IMAGINARY - IMARGUMENT | PHPExcel_Calculation_Engineering::IMARGUMENT - IMCONJUGATE | PHPExcel_Calculation_Engineering::IMCONJUGATE - IMCOS | PHPExcel_Calculation_Engineering::IMCOS - IMDIV | PHPExcel_Calculation_Engineering::IMDIV - IMEXP | PHPExcel_Calculation_Engineering::IMEXP - IMLN | PHPExcel_Calculation_Engineering::IMLN - IMLOG10 | PHPExcel_Calculation_Engineering::IMLOG10 - IMLOG2 | PHPExcel_Calculation_Engineering::IMLOG2 - IMPOWER | PHPExcel_Calculation_Engineering::IMPOWER - IMPRODUCT | PHPExcel_Calculation_Engineering::IMPRODUCT - IMREAL | PHPExcel_Calculation_Engineering::IMREAL - IMSIN | PHPExcel_Calculation_Engineering::IMSIN - IMSQRT | PHPExcel_Calculation_Engineering::IMSQRT - IMSUB | PHPExcel_Calculation_Engineering::IMSUB - IMSUM | PHPExcel_Calculation_Engineering::IMSUM - OCT2BIN | PHPExcel_Calculation_Engineering::OCTTOBIN - OCT2DEC | PHPExcel_Calculation_Engineering::OCTTODEC - OCT2HEX | PHPExcel_Calculation_Engineering::OCTTOHEX - -## CATEGORY_FINANCIAL - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - ACCRINT | PHPExcel_Calculation_Financial::ACCRINT - ACCRINTM | PHPExcel_Calculation_Financial::ACCRINTM - AMORDEGRC | PHPExcel_Calculation_Financial::AMORDEGRC - AMORLINC | PHPExcel_Calculation_Financial::AMORLINC - COUPDAYBS | PHPExcel_Calculation_Financial::COUPDAYBS - COUPDAYS | PHPExcel_Calculation_Financial::COUPDAYS - COUPDAYSNC | PHPExcel_Calculation_Financial::COUPDAYSNC - COUPNCD | PHPExcel_Calculation_Financial::COUPNCD - COUPNUM | PHPExcel_Calculation_Financial::COUPNUM - COUPPCD | PHPExcel_Calculation_Financial::COUPPCD - CUMIPMT | PHPExcel_Calculation_Financial::CUMIPMT - CUMPRINC | PHPExcel_Calculation_Financial::CUMPRINC - DB | PHPExcel_Calculation_Financial::DB - DDB | PHPExcel_Calculation_Financial::DDB - DISC | PHPExcel_Calculation_Financial::DISC - DOLLARDE | PHPExcel_Calculation_Financial::DOLLARDE - DOLLARFR | PHPExcel_Calculation_Financial::DOLLARFR - DURATION | **\*\*\* Not yet Implemented** - EFFECT | PHPExcel_Calculation_Financial::EFFECT - FV | PHPExcel_Calculation_Financial::FV - FVSCHEDULE | PHPExcel_Calculation_Financial::FVSCHEDULE - INTRATE | PHPExcel_Calculation_Financial::INTRATE - IPMT | PHPExcel_Calculation_Financial::IPMT - IRR | PHPExcel_Calculation_Financial::IRR - ISPMT | PHPExcel_Calculation_Financial::ISPMT - MDURATION | **\*\*\* Not yet Implemented** - MIRR | PHPExcel_Calculation_Financial::MIRR - NOMINAL | PHPExcel_Calculation_Financial::NOMINAL - NPER | PHPExcel_Calculation_Financial::NPER - NPV | PHPExcel_Calculation_Financial::NPV - ODDFPRICE | **\*\*\* Not yet Implemented** - ODDFYIELD | **\*\*\* Not yet Implemented** - ODDLPRICE | **\*\*\* Not yet Implemented** - ODDLYIELD | **\*\*\* Not yet Implemented** - PMT | PHPExcel_Calculation_Financial::PMT - PPMT | PHPExcel_Calculation_Financial::PPMT - PRICE | PHPExcel_Calculation_Financial::PRICE - PRICEDISC | PHPExcel_Calculation_Financial::PRICEDISC - PRICEMAT | PHPExcel_Calculation_Financial::PRICEMAT - PV | PHPExcel_Calculation_Financial::PV - RATE | PHPExcel_Calculation_Financial::RATE - RECEIVED | PHPExcel_Calculation_Financial::RECEIVED - SLN | PHPExcel_Calculation_Financial::SLN - SYD | PHPExcel_Calculation_Financial::SYD - TBILLEQ | PHPExcel_Calculation_Financial::TBILLEQ - TBILLPRICE | PHPExcel_Calculation_Financial::TBILLPRICE - TBILLYIELD | PHPExcel_Calculation_Financial::TBILLYIELD - USDOLLAR | **\*\*\* Not yet Implemented** - VDB | **\*\*\* Not yet Implemented** - XIRR | PHPExcel_Calculation_Financial::XIRR - XNPV | PHPExcel_Calculation_Financial::XNPV - YIELD | **\*\*\* Not yet Implemented** - YIELDDISC | PHPExcel_Calculation_Financial::YIELDDISC - YIELDMAT | PHPExcel_Calculation_Financial::YIELDMAT - -## CATEGORY_INFORMATION - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - CELL | **\*\*\* Not yet Implemented** - ERROR.TYPE | PHPExcel_Calculation_Functions::ERROR_TYPE - INFO | **\*\*\* Not yet Implemented** - ISBLANK | PHPExcel_Calculation_Functions::IS_BLANK - ISERR | PHPExcel_Calculation_Functions::IS_ERR - ISERROR | PHPExcel_Calculation_Functions::IS_ERROR - ISEVEN | PHPExcel_Calculation_Functions::IS_EVEN - ISLOGICAL | PHPExcel_Calculation_Functions::IS_LOGICAL - ISNA | PHPExcel_Calculation_Functions::IS_NA - ISNONTEXT | PHPExcel_Calculation_Functions::IS_NONTEXT - ISNUMBER | PHPExcel_Calculation_Functions::IS_NUMBER - ISODD | PHPExcel_Calculation_Functions::IS_ODD - ISREF | **\*\*\* Not yet Implemented** - ISTEXT | PHPExcel_Calculation_Functions::IS_TEXT - N | PHPExcel_Calculation_Functions::N - NA | PHPExcel_Calculation_Functions::NA - TYPE | PHPExcel_Calculation_Functions::TYPE - VERSION | PHPExcel_Calculation_Functions::VERSION - -## CATEGORY_LOGICAL - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - AND | PHPExcel_Calculation_Logical::LOGICAL_AND - FALSE | PHPExcel_Calculation_Logical::FALSE - IF | PHPExcel_Calculation_Logical::STATEMENT_IF - IFERROR | PHPExcel_Calculation_Logical::IFERROR - NOT | PHPExcel_Calculation_Logical::NOT - OR | PHPExcel_Calculation_Logical::LOGICAL_OR - TRUE | PHPExcel_Calculation_Logical::TRUE - -## CATEGORY_LOOKUP_AND_REFERENCE - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - ADDRESS | PHPExcel_Calculation_LookupRef::CELL_ADDRESS - AREAS | **\*\*\* Not yet Implemented** - CHOOSE | PHPExcel_Calculation_LookupRef::CHOOSE - COLUMN | PHPExcel_Calculation_LookupRef::COLUMN - COLUMNS | PHPExcel_Calculation_LookupRef::COLUMNS - GETPIVOTDATA | **\*\*\* Not yet Implemented** - HLOOKUP | **\*\*\* Not yet Implemented** - HYPERLINK | PHPExcel_Calculation_LookupRef::HYPERLINK - INDEX | PHPExcel_Calculation_LookupRef::INDEX - INDIRECT | PHPExcel_Calculation_LookupRef::INDIRECT - LOOKUP | PHPExcel_Calculation_LookupRef::LOOKUP - MATCH | PHPExcel_Calculation_LookupRef::MATCH - OFFSET | PHPExcel_Calculation_LookupRef::OFFSET - ROW | PHPExcel_Calculation_LookupRef::ROW - ROWS | PHPExcel_Calculation_LookupRef::ROWS - RTD | **\*\*\* Not yet Implemented** - TRANSPOSE | PHPExcel_Calculation_LookupRef::TRANSPOSE - VLOOKUP | PHPExcel_Calculation_LookupRef::VLOOKUP - -## CATEGORY_MATH_AND_TRIG - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - ABS | abs - ACOS | acos - ACOSH | acosh - ASIN | asin - ASINH | asinh - ATAN | atan - ATAN2 | PHPExcel_Calculation_MathTrig::REVERSE_ATAN2 - ATANH | atanh - CEILING | PHPExcel_Calculation_MathTrig::CEILING - COMBIN | PHPExcel_Calculation_MathTrig::COMBIN - COS | cos - COSH | cosh - DEGREES | rad2deg - EVEN | PHPExcel_Calculation_MathTrig::EVEN - EXP | exp - FACT | PHPExcel_Calculation_MathTrig::FACT - FACTDOUBLE | PHPExcel_Calculation_MathTrig::FACTDOUBLE - FLOOR | PHPExcel_Calculation_MathTrig::FLOOR - GCD | PHPExcel_Calculation_MathTrig::GCD - INT | PHPExcel_Calculation_MathTrig::INT - LCM | PHPExcel_Calculation_MathTrig::LCM - LN | log - LOG | PHPExcel_Calculation_MathTrig::LOG_BASE - LOG10 | log10 - MDETERM | PHPExcel_Calculation_MathTrig::MDETERM - MINVERSE | PHPExcel_Calculation_MathTrig::MINVERSE - MMULT | PHPExcel_Calculation_MathTrig::MMULT - MOD | PHPExcel_Calculation_MathTrig::MOD - MROUND | PHPExcel_Calculation_MathTrig::MROUND - MULTINOMIAL | PHPExcel_Calculation_MathTrig::MULTINOMIAL - ODD | PHPExcel_Calculation_MathTrig::ODD - PI | pi - POWER | PHPExcel_Calculation_MathTrig::POWER - PRODUCT | PHPExcel_Calculation_MathTrig::PRODUCT - QUOTIENT | PHPExcel_Calculation_MathTrig::QUOTIENT - RADIANS | deg2rad - RAND | PHPExcel_Calculation_MathTrig::RAND - RANDBETWEEN | PHPExcel_Calculation_MathTrig::RAND - ROMAN | PHPExcel_Calculation_MathTrig::ROMAN - ROUND | round - ROUNDDOWN | PHPExcel_Calculation_MathTrig::ROUNDDOWN - ROUNDUP | PHPExcel_Calculation_MathTrig::ROUNDUP - SERIESSUM | PHPExcel_Calculation_MathTrig::SERIESSUM - SIGN | PHPExcel_Calculation_MathTrig::SIGN - SIN | sin - SINH | sinh - SQRT | sqrt - SQRTPI | PHPExcel_Calculation_MathTrig::SQRTPI - SUBTOTAL | PHPExcel_Calculation_MathTrig::SUBTOTAL - SUM | PHPExcel_Calculation_MathTrig::SUM - SUMIF | PHPExcel_Calculation_MathTrig::SUMIF - SUMIFS | **\*\*\* Not yet Implemented** - SUMPRODUCT | PHPExcel_Calculation_MathTrig::SUMPRODUCT - SUMSQ | PHPExcel_Calculation_MathTrig::SUMSQ - SUMX2MY2 | PHPExcel_Calculation_MathTrig::SUMX2MY2 - SUMX2PY2 | PHPExcel_Calculation_MathTrig::SUMX2PY2 - SUMXMY2 | PHPExcel_Calculation_MathTrig::SUMXMY2 - TAN | tan - TANH | tanh - TRUNC | PHPExcel_Calculation_MathTrig::TRUNC - -## CATEGORY_STATISTICAL - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - AVEDEV | PHPExcel_Calculation_Statistical::AVEDEV - AVERAGE | PHPExcel_Calculation_Statistical::AVERAGE - AVERAGEA | PHPExcel_Calculation_Statistical::AVERAGEA - AVERAGEIF | PHPExcel_Calculation_Statistical::AVERAGEIF - AVERAGEIFS | **\*\*\* Not yet Implemented** - BETADIST | PHPExcel_Calculation_Statistical::BETADIST - BETAINV | PHPExcel_Calculation_Statistical::BETAINV - BINOMDIST | PHPExcel_Calculation_Statistical::BINOMDIST - CHIDIST | PHPExcel_Calculation_Statistical::CHIDIST - CHIINV | PHPExcel_Calculation_Statistical::CHIINV - CHITEST | **\*\*\* Not yet Implemented** - CONFIDENCE | PHPExcel_Calculation_Statistical::CONFIDENCE - CORREL | PHPExcel_Calculation_Statistical::CORREL - COUNT | PHPExcel_Calculation_Statistical::COUNT - COUNTA | PHPExcel_Calculation_Statistical::COUNTA - COUNTBLANK | PHPExcel_Calculation_Statistical::COUNTBLANK - COUNTIF | PHPExcel_Calculation_Statistical::COUNTIF - COUNTIFS | **\*\*\* Not yet Implemented** - COVAR | PHPExcel_Calculation_Statistical::COVAR - CRITBINOM | PHPExcel_Calculation_Statistical::CRITBINOM - DEVSQ | PHPExcel_Calculation_Statistical::DEVSQ - EXPONDIST | PHPExcel_Calculation_Statistical::EXPONDIST - FDIST | **\*\*\* Not yet Implemented** - FINV | **\*\*\* Not yet Implemented** - FISHER | PHPExcel_Calculation_Statistical::FISHER - FISHERINV | PHPExcel_Calculation_Statistical::FISHERINV - FORECAST | PHPExcel_Calculation_Statistical::FORECAST - FREQUENCY | **\*\*\* Not yet Implemented** - FTEST | **\*\*\* Not yet Implemented** - GAMMADIST | PHPExcel_Calculation_Statistical::GAMMADIST - GAMMAINV | PHPExcel_Calculation_Statistical::GAMMAINV - GAMMALN | PHPExcel_Calculation_Statistical::GAMMALN - GEOMEAN | PHPExcel_Calculation_Statistical::GEOMEAN - GROWTH | PHPExcel_Calculation_Statistical::GROWTH - HARMEAN | PHPExcel_Calculation_Statistical::HARMEAN - HYPGEOMDIST | PHPExcel_Calculation_Statistical::HYPGEOMDIST - INTERCEPT | PHPExcel_Calculation_Statistical::INTERCEPT - KURT | PHPExcel_Calculation_Statistical::KURT - LARGE | PHPExcel_Calculation_Statistical::LARGE - LINEST | PHPExcel_Calculation_Statistical::LINEST - LOGEST | PHPExcel_Calculation_Statistical::LOGEST - LOGINV | PHPExcel_Calculation_Statistical::LOGINV - LOGNORMDIST | PHPExcel_Calculation_Statistical::LOGNORMDIST - MAX | PHPExcel_Calculation_Statistical::MAX - MAXA | PHPExcel_Calculation_Statistical::MAXA - MAXIF | PHPExcel_Calculation_Statistical::MAXIF - MEDIAN | PHPExcel_Calculation_Statistical::MEDIAN - MEDIANIF | **\*\*\* Not yet Implemented** - MIN | PHPExcel_Calculation_Statistical::MIN - MINA | PHPExcel_Calculation_Statistical::MINA - MINIF | PHPExcel_Calculation_Statistical::MINIF - MODE | PHPExcel_Calculation_Statistical::MODE - NEGBINOMDIST | PHPExcel_Calculation_Statistical::NEGBINOMDIST - NORMDIST | PHPExcel_Calculation_Statistical::NORMDIST - NORMINV | PHPExcel_Calculation_Statistical::NORMINV - NORMSDIST | PHPExcel_Calculation_Statistical::NORMSDIST - NORMSINV | PHPExcel_Calculation_Statistical::NORMSINV - PEARSON | PHPExcel_Calculation_Statistical::CORREL - PERCENTILE | PHPExcel_Calculation_Statistical::PERCENTILE - PERCENTRANK | PHPExcel_Calculation_Statistical::PERCENTRANK - PERMUT | PHPExcel_Calculation_Statistical::PERMUT - POISSON | PHPExcel_Calculation_Statistical::POISSON - PROB | **\*\*\* Not yet Implemented** - QUARTILE | PHPExcel_Calculation_Statistical::QUARTILE - RANK | PHPExcel_Calculation_Statistical::RANK - RSQ | PHPExcel_Calculation_Statistical::RSQ - SKEW | PHPExcel_Calculation_Statistical::SKEW - SLOPE | PHPExcel_Calculation_Statistical::SLOPE - SMALL | PHPExcel_Calculation_Statistical::SMALL - STANDARDIZE | PHPExcel_Calculation_Statistical::STANDARDIZE - STDEV | PHPExcel_Calculation_Statistical::STDEV - STDEVA | PHPExcel_Calculation_Statistical::STDEVA - STDEVP | PHPExcel_Calculation_Statistical::STDEVP - STDEVPA | PHPExcel_Calculation_Statistical::STDEVPA - STEYX | PHPExcel_Calculation_Statistical::STEYX - TDIST | PHPExcel_Calculation_Statistical::TDIST - TINV | PHPExcel_Calculation_Statistical::TINV - TREND | PHPExcel_Calculation_Statistical::TREND - TRIMMEAN | PHPExcel_Calculation_Statistical::TRIMMEAN - TTEST | **\*\*\* Not yet Implemented** - VAR | PHPExcel_Calculation_Statistical::VARFunc - VARA | PHPExcel_Calculation_Statistical::VARA - VARP | PHPExcel_Calculation_Statistical::VARP - VARPA | PHPExcel_Calculation_Statistical::VARPA - WEIBULL | PHPExcel_Calculation_Statistical::WEIBULL - ZTEST | PHPExcel_Calculation_Statistical::ZTEST - -## CATEGORY_TEXT_AND_DATA - - Excel Function | PHPExcel Function - --------------------|------------------------------------------- - ASC | **\*\*\* Not yet Implemented** - BAHTTEXT | **\*\*\* Not yet Implemented** - CHAR | PHPExcel_Calculation_TextData::CHARACTER - CLEAN | PHPExcel_Calculation_TextData::TRIMNONPRINTABLE - CODE | PHPExcel_Calculation_TextData::ASCIICODE - CONCATENATE | PHPExcel_Calculation_TextData::CONCATENATE - DOLLAR | PHPExcel_Calculation_TextData::DOLLAR - EXACT | **\*\*\* Not yet Implemented** - FIND | PHPExcel_Calculation_TextData::SEARCHSENSITIVE - FINDB | PHPExcel_Calculation_TextData::SEARCHSENSITIVE - FIXED | PHPExcel_Calculation_TextData::FIXEDFORMAT - JIS | **\*\*\* Not yet Implemented** - LEFT | PHPExcel_Calculation_TextData::LEFT - LEFTB | PHPExcel_Calculation_TextData::LEFT - LEN | PHPExcel_Calculation_TextData::STRINGLENGTH - LENB | PHPExcel_Calculation_TextData::STRINGLENGTH - LOWER | PHPExcel_Calculation_TextData::LOWERCASE - MID | PHPExcel_Calculation_TextData::MID - MIDB | PHPExcel_Calculation_TextData::MID - PHONETIC | **\*\*\* Not yet Implemented** - PROPER | PHPExcel_Calculation_TextData::PROPERCASE - REPLACE | PHPExcel_Calculation_TextData::REPLACE - REPLACEB | PHPExcel_Calculation_TextData::REPLACE - REPT | str_repeat - RIGHT | PHPExcel_Calculation_TextData::RIGHT - RIGHTB | PHPExcel_Calculation_TextData::RIGHT - SEARCH | PHPExcel_Calculation_TextData::SEARCHINSENSITIVE - SEARCHB | PHPExcel_Calculation_TextData::SEARCHINSENSITIVE - SUBSTITUTE | PHPExcel_Calculation_TextData::SUBSTITUTE - T | PHPExcel_Calculation_TextData::RETURNSTRING - TEXT | PHPExcel_Calculation_TextData::TEXTFORMAT - TRIM | PHPExcel_Calculation_TextData::TRIMSPACES - UPPER | PHPExcel_Calculation_TextData::UPPERCASE - VALUE | **\*\*\* Not yet Implemented** - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Functions/FunctionListByName.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Functions/FunctionListByName.md deleted file mode 100644 index b69e454..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Functions/FunctionListByName.md +++ /dev/null @@ -1,485 +0,0 @@ -#A - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - ABS | CATEGORY_MATH_AND_TRIG | abs - ACCRINT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::ACCRINT - ACCRINTM | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::ACCRINTM - ACOS | CATEGORY_MATH_AND_TRIG | acos - ACOSH | CATEGORY_MATH_AND_TRIG | acosh - ADDRESS | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::CELL_ADDRESS - AMORDEGRC | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::AMORDEGRC - AMORLINC | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::AMORLINC - AND | CATEGORY_LOGICAL | PHPExcel_Calculation_Logical::LOGICAL_AND - AREAS | CATEGORY_LOOKUP_AND_REFERENCE | **\*\*\* Not yet Implemented** - ASC | CATEGORY_TEXT_AND_DATA | **\*\*\* Not yet Implemented** - ASIN | CATEGORY_MATH_AND_TRIG | asin - ASINH | CATEGORY_MATH_AND_TRIG | asinh - ATAN | CATEGORY_MATH_AND_TRIG | atan - ATAN2 | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::REVERSE_ATAN2 - ATANH | CATEGORY_MATH_AND_TRIG | atanh - AVEDEV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::AVEDEV - AVERAGE | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::AVERAGE - AVERAGEA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::AVERAGEA - AVERAGEIF | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::AVERAGEIF - AVERAGEIFS | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - -#B - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - BAHTTEXT | CATEGORY_TEXT_AND_DATA | **\*\*\* Not yet Implemented** - BESSELI | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::BESSELI - BESSELJ | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::BESSELJ - BESSELK | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::BESSELK - BESSELY | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::BESSELY - BETADIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::BETADIST - BETAINV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::BETAINV - BIN2DEC | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::BINTODEC - BIN2HEX | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::BINTOHEX - BIN2OCT | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::BINTOOCT - BINOMDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::BINOMDIST - -#C - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - CEILING | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::CEILING - CELL | CATEGORY_INFORMATION | **\*\*\* Not yet Implemented** - CHAR | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::CHARACTER - CHIDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::CHIDIST - CHIINV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::CHIINV - CHITEST | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - CHOOSE | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::CHOOSE - CLEAN | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::TRIMNONPRINTABLE - CODE | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::ASCIICODE - COLUMN | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::COLUMN - COLUMNS | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::COLUMNS - COMBIN | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::COMBIN - COMPLEX | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::COMPLEX - CONCATENATE | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::CONCATENATE - CONFIDENCE | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::CONFIDENCE - CONVERT | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::CONVERTUOM - CORREL | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::CORREL - COS | CATEGORY_MATH_AND_TRIG | cos - COSH | CATEGORY_MATH_AND_TRIG | cosh - COUNT | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::COUNT - COUNTA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::COUNTA - COUNTBLANK | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::COUNTBLANK - COUNTIF | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::COUNTIF - COUNTIFS | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - COUPDAYBS | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::COUPDAYBS - COUPDAYS | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::COUPDAYS - COUPDAYSNC | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::COUPDAYSNC - COUPNCD | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::COUPNCD - COUPNUM | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::COUPNUM - COUPPCD | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::COUPPCD - COVAR | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::COVAR - CRITBINOM | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::CRITBINOM - CUBEKPIMEMBER | CATEGORY_CUBE | **\*\*\* Not yet Implemented** - CUBEMEMBER | CATEGORY_CUBE | **\*\*\* Not yet Implemented** - CUBEMEMBERPROPERTY | CATEGORY_CUBE | **\*\*\* Not yet Implemented** - CUBERANKEDMEMBER | CATEGORY_CUBE | **\*\*\* Not yet Implemented** - CUBESET | CATEGORY_CUBE | **\*\*\* Not yet Implemented** - CUBESETCOUNT | CATEGORY_CUBE | **\*\*\* Not yet Implemented** - CUBEVALUE | CATEGORY_CUBE | **\*\*\* Not yet Implemented** - CUMIPMT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::CUMIPMT - CUMPRINC | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::CUMPRINC - -#D - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - DATE | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::DATE - DATEDIF | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::DATEDIF - DATEVALUE | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::DATEVALUE - DAVERAGE | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DAVERAGE - DAY | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::DAYOFMONTH - DAYS360 | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::DAYS360 - DB | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::DB - DCOUNT | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DCOUNT - DCOUNTA | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DCOUNTA - DDB | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::DDB - DEC2BIN | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::DECTOBIN - DEC2HEX | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::DECTOHEX - DEC2OCT | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::DECTOOCT - DEGREES | CATEGORY_MATH_AND_TRIG | rad2deg - DELTA | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::DELTA - DEVSQ | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::DEVSQ - DGET | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DGET - DISC | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::DISC - DMAX | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DMAX - DMIN | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DMIN - DOLLAR | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::DOLLAR - DOLLARDE | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::DOLLARDE - DOLLARFR | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::DOLLARFR - DPRODUCT | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DPRODUCT - DSTDEV | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DSTDEV - DSTDEVP | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DSTDEVP - DSUM | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DSUM - DURATION | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - DVAR | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DVAR - DVARP | CATEGORY_DATABASE | PHPExcel_Calculation_Database::DVARP - -#E - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - EDATE | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::EDATE - EFFECT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::EFFECT - EOMONTH | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::EOMONTH - ERF | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::ERF - ERFC | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::ERFC - ERROR.TYPE | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::ERROR_TYPE - EVEN | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::EVEN - EXACT | CATEGORY_TEXT_AND_DATA | **\*\*\* Not yet Implemented** - EXP | CATEGORY_MATH_AND_TRIG | exp - EXPONDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::EXPONDIST - -#F - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - FACT | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::FACT - FACTDOUBLE | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::FACTDOUBLE - FALSE | CATEGORY_LOGICAL | PHPExcel_Calculation_Logical::FALSE - FDIST | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - FIND | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::SEARCHSENSITIVE - FINDB | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::SEARCHSENSITIVE - FINV | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - FISHER | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::FISHER - FISHERINV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::FISHERINV - FIXED | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::FIXEDFORMAT - FLOOR | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::FLOOR - FORECAST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::FORECAST - FREQUENCY | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - FTEST | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - FV | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::FV - FVSCHEDULE | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::FVSCHEDULE - -#G - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - GAMMADIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::GAMMADIST - GAMMAINV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::GAMMAINV - GAMMALN | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::GAMMALN - GCD | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::GCD - GEOMEAN | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::GEOMEAN - GESTEP | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::GESTEP - GETPIVOTDATA | CATEGORY_LOOKUP_AND_REFERENCE | **\*\*\* Not yet Implemented** - GROWTH | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::GROWTH - -#H - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - HARMEAN | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::HARMEAN - HEX2BIN | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::HEXTOBIN - HEX2DEC | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::HEXTODEC - HEX2OCT | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::HEXTOOCT - HLOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | **\*\*\* Not yet Implemented** - HOUR | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::HOUROFDAY - HYPERLINK | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::HYPERLINK - HYPGEOMDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::HYPGEOMDIST - -#I - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - IF | CATEGORY_LOGICAL | PHPExcel_Calculation_Logical::STATEMENT_IF - IFERROR | CATEGORY_LOGICAL | PHPExcel_Calculation_Logical::IFERROR - IMABS | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMABS - IMAGINARY | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMAGINARY - IMARGUMENT | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMARGUMENT - IMCONJUGATE | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMCONJUGATE - IMCOS | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMCOS - IMDIV | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMDIV - IMEXP | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMEXP - IMLN | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMLN - IMLOG10 | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMLOG10 - IMLOG2 | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMLOG2 - IMPOWER | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMPOWER - IMPRODUCT | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMPRODUCT - IMREAL | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMREAL - IMSIN | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMSIN - IMSQRT | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMSQRT - IMSUB | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMSUB - IMSUM | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::IMSUM - INDEX | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::INDEX - INDIRECT | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::INDIRECT - INFO | CATEGORY_INFORMATION | **\*\*\* Not yet Implemented** - INT | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::INT - INTERCEPT | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::INTERCEPT - INTRATE | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::INTRATE - IPMT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::IPMT - IRR | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::IRR - ISBLANK | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_BLANK - ISERR | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_ERR - ISERROR | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_ERROR - ISEVEN | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_EVEN - ISLOGICAL | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_LOGICAL - ISNA | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_NA - ISNONTEXT | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_NONTEXT - ISNUMBER | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_NUMBER - ISODD | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_ODD - ISPMT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::ISPMT - ISREF | CATEGORY_INFORMATION | **\*\*\* Not yet Implemented** - ISTEXT | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::IS_TEXT - -#J - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - JIS | CATEGORY_TEXT_AND_DATA | **\*\*\* Not yet Implemented** - -#K - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - KURT | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::KURT - -#L - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - LARGE | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::LARGE - LCM | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::LCM - LEFT | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::LEFT - LEFTB | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::LEFT - LEN | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::STRINGLENGTH - LENB | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::STRINGLENGTH - LINEST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::LINEST - LN | CATEGORY_MATH_AND_TRIG | log - LOG | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::LOG_BASE - LOG10 | CATEGORY_MATH_AND_TRIG | log10 - LOGEST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::LOGEST - LOGINV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::LOGINV - LOGNORMDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::LOGNORMDIST - LOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::LOOKUP - LOWER | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::LOWERCASE - -#M - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - MATCH | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::MATCH - MAX | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MAX - MAXA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MAXA - MAXIF | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MAXIF - MDETERM | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::MDETERM - MDURATION | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - MEDIAN | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MEDIAN - MEDIANIF | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - MID | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::MID - MIDB | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::MID - MIN | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MIN - MINA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MINA - MINIF | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MINIF - MINUTE | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::MINUTEOFHOUR - MINVERSE | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::MINVERSE - MIRR | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::MIRR - MMULT | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::MMULT - MOD | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::MOD - MODE | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::MODE - MONTH | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::MONTHOFYEAR - MROUND | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::MROUND - MULTINOMIAL | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::MULTINOMIAL - -#N - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - N | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::N - NA | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::NA - NEGBINOMDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::NEGBINOMDIST - NETWORKDAYS | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::NETWORKDAYS - NOMINAL | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::NOMINAL - NORMDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::NORMDIST - NORMINV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::NORMINV - NORMSDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::NORMSDIST - NORMSINV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::NORMSINV - NOT | CATEGORY_LOGICAL | PHPExcel_Calculation_Logical::NOT - NOW | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::DATETIMENOW - NPER | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::NPER - NPV | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::NPV - -#O - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - OCT2BIN | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::OCTTOBIN - OCT2DEC | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::OCTTODEC - OCT2HEX | CATEGORY_ENGINEERING | PHPExcel_Calculation_Engineering::OCTTOHEX - ODD | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::ODD - ODDFPRICE | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - ODDFYIELD | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - ODDLPRICE | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - ODDLYIELD | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - OFFSET | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::OFFSET - OR | CATEGORY_LOGICAL | PHPExcel_Calculation_Logical::LOGICAL_OR - -#P - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - PEARSON | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::CORREL - PERCENTILE | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::PERCENTILE - PERCENTRANK | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::PERCENTRANK - PERMUT | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::PERMUT - PHONETIC | CATEGORY_TEXT_AND_DATA | **\*\*\* Not yet Implemented** - PI | CATEGORY_MATH_AND_TRIG | pi - PMT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::PMT - POISSON | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::POISSON - POWER | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::POWER - PPMT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::PPMT - PRICE | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::PRICE - PRICEDISC | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::PRICEDISC - PRICEMAT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::PRICEMAT - PROB | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - PRODUCT | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::PRODUCT - PROPER | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::PROPERCASE - PV | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::PV - -#Q - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - QUARTILE | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::QUARTILE - QUOTIENT | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::QUOTIENT - -#R - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - RADIANS | CATEGORY_MATH_AND_TRIG | deg2rad - RAND | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::RAND - RANDBETWEEN | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::RAND - RANK | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::RANK - RATE | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::RATE - RECEIVED | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::RECEIVED - REPLACE | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::REPLACE - REPLACEB | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::REPLACE - REPT | CATEGORY_TEXT_AND_DATA | str_repeat - RIGHT | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::RIGHT - RIGHTB | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::RIGHT - ROMAN | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::ROMAN - ROUND | CATEGORY_MATH_AND_TRIG | round - ROUNDDOWN | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::ROUNDDOWN - ROUNDUP | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::ROUNDUP - ROW | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::ROW - ROWS | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::ROWS - RSQ | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::RSQ - RTD | CATEGORY_LOOKUP_AND_REFERENCE | **\*\*\* Not yet Implemented** - -#S - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - SEARCH | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::SEARCHINSENSITIVE - SEARCHB | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::SEARCHINSENSITIVE - SECOND | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::SECONDOFMINUTE - SERIESSUM | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SERIESSUM - SIGN | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SIGN - SIN | CATEGORY_MATH_AND_TRIG | sin - SINH | CATEGORY_MATH_AND_TRIG | sinh - SKEW | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::SKEW - SLN | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::SLN - SLOPE | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::SLOPE - SMALL | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::SMALL - SQRT | CATEGORY_MATH_AND_TRIG | sqrt - SQRTPI | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SQRTPI - STANDARDIZE | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::STANDARDIZE - STDEV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::STDEV - STDEVA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::STDEVA - STDEVP | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::STDEVP - STDEVPA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::STDEVPA - STEYX | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::STEYX - SUBSTITUTE | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::SUBSTITUTE - SUBTOTAL | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SUBTOTAL - SUM | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SUM - SUMIF | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SUMIF - SUMIFS | CATEGORY_MATH_AND_TRIG | **\*\*\* Not yet Implemented** - SUMPRODUCT | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SUMPRODUCT - SUMSQ | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SUMSQ - SUMX2MY2 | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SUMX2MY2 - SUMX2PY2 | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SUMX2PY2 - SUMXMY2 | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::SUMXMY2 - SYD | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::SYD - -#T - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - T | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::RETURNSTRING - TAN | CATEGORY_MATH_AND_TRIG | tan - TANH | CATEGORY_MATH_AND_TRIG | tanh - TBILLEQ | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::TBILLEQ - TBILLPRICE | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::TBILLPRICE - TBILLYIELD | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::TBILLYIELD - TDIST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::TDIST - TEXT | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::TEXTFORMAT - TIME | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::TIME - TIMEVALUE | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::TIMEVALUE - TINV | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::TINV - TODAY | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::DATENOW - TRANSPOSE | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::TRANSPOSE - TREND | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::TREND - TRIM | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::TRIMSPACES - TRIMMEAN | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::TRIMMEAN - TRUE | CATEGORY_LOGICAL | PHPExcel_Calculation_Logical::TRUE - TRUNC | CATEGORY_MATH_AND_TRIG | PHPExcel_Calculation_MathTrig::TRUNC - TTEST | CATEGORY_STATISTICAL | **\*\*\* Not yet Implemented** - TYPE | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::TYPE - -#U - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - UPPER | CATEGORY_TEXT_AND_DATA | PHPExcel_Calculation_TextData::UPPERCASE - USDOLLAR | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - -#V - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - VALUE | CATEGORY_TEXT_AND_DATA | **\*\*\* Not yet Implemented** - VAR | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::VARFunc - VARA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::VARA - VARP | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::VARP - VARPA | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::VARPA - VDB | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - VERSION | CATEGORY_INFORMATION | PHPExcel_Calculation_Functions::VERSION - VLOOKUP | CATEGORY_LOOKUP_AND_REFERENCE | PHPExcel_Calculation_LookupRef::VLOOKUP - -#W - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - WEEKDAY | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::DAYOFWEEK - WEEKNUM | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::WEEKOFYEAR - WEIBULL | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::WEIBULL - WORKDAY | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::WORKDAY - -#X - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - XIRR | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::XIRR - XNPV | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::XNPV - -#Y - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - YEAR | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::YEAR - YEARFRAC | CATEGORY_DATE_AND_TIME | PHPExcel_Calculation_DateTime::YEARFRAC - YIELD | CATEGORY_FINANCIAL | **\*\*\* Not yet Implemented** - YIELDDISC | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::YIELDDISC - YIELDMAT | CATEGORY_FINANCIAL | PHPExcel_Calculation_Financial::YIELDMAT - -#Z - - Excel Function | Category | PHPExcel Function - --------------------|--------------------------------|------------------------------------------- - ZTEST | CATEGORY_STATISTICAL | PHPExcel_Calculation_Statistical::ZTEST diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/01-Getting-Started.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/01-Getting-Started.md deleted file mode 100644 index 262f1ea..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/01-Getting-Started.md +++ /dev/null @@ -1,179 +0,0 @@ -# PHPExcel Developer Documentation - - -## Prerequisites, Installation, FAQ and Links - -### Software requirements - -The following software is required to develop using PHPExcel: - - - PHP version 5.2.0 or newer - - PHP extension php_zip enabled [^phpzip_footnote] - - PHP extension php_xml enabled - - PHP extension php_gd2 enabled (if not compiled in) - - -### Installation instructions - -Installation is quite easy: copy the contents of the Classes folder to any location within your application source directories. - -*Example:* - -If your web root folder is /var/www/ you may want to create a subfolder called /var/www/Classes/ and copy the files into that folder so you end up with files: - - /var/www/Classes/PHPExcel.php - /var/www/Classes/PHPExcel/Calculation.php - /var/www/Classes/PHPExcel/Cell.php - ... - - -### Getting started - -A good way to get started is to run some of the tests included in the download. -Copy the "Examples" folder next to your "Classes" folder from above so you end up with: - - /var/www/Examples/01simple.php - /var/www/Examples/02types.php - ... - -Start running the tests by pointing your browser to the test scripts: - -http://example.com/Tests/01simple.php -http://example.com/Tests/02types.php -... - -**Note:** It may be necessary to modify the include/require statements at the beginning of each of the test scripts if your "Classes" folder from above is named differently. - - -### Useful links and tools - -There are some links and tools which are very useful when developing using PHPExcel. Please refer to the [PHPExcel CodePlex pages][2] for an update version of the list below. - -#### OpenXML / SpreadsheetML - - - __File format documentation__ -[http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm][3] - - __OpenXML Explained e-book__ -[http://openxmldeveloper.org/articles/1970.aspx][4] - - __Microsoft Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats__ -[http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en][5] - - __OpenXML Package Explorer__ -[http://www.codeplex.com/PackageExplorer/][6] - - -### Frequently asked questions - -The up-to-date F.A.Q. page for PHPExcel can be found on [http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=FAQ&referringTitle=Requirements][7]. - -##### There seems to be a problem with character encoding... - -It is necessary to use UTF-8 encoding for all texts in PHPExcel. If the script uses different encoding then you can convert those texts with PHP's iconv() or mb_convert_encoding() functions. - -##### PHP complains about ZipArchive not being found - -Make sure you meet all requirements, especially php_zip extension should be enabled. - -The ZipArchive class is only required when reading or writing formats that use Zip compression (Excel2007 and OOCalc). Since version 1.7.6 the PCLZip library has been bundled with PHPExcel as an alternative to the ZipArchive class. - -This can be enabled by calling: -```php -PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP); -``` -*before* calling the save method of the Excel2007 Writer. - -You can revert to using ZipArchive by calling: -```php -PHPExcel_Settings::setZipClass(PHPExcel_Settings::ZIPARCHIVE); -``` -At present, this only allows you to write Excel2007 files without the need for ZipArchive (not to read Excel2007 or OOCalc) - -##### Excel 2007 cannot open the file generated by PHPExcel_Writer_2007 on Windows - -"Excel found unreadable content in '*.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes." - -Some older versions of the 5.2.x php_zip extension on Windows contain an error when creating ZIP files. The version that can be found on [http://snaps.php.net/win32/php5.2-win32-latest.zip][8] should work at all times. - -Alternatively, upgrading to at least PHP 5.2.9 should solve the problem. - -If you can't locate a clean copy of ZipArchive, then you can use the PCLZip library as an alternative when writing Excel2007 files, as described above. - -##### Fatal error: Allowed memory size of xxx bytes exhausted (tried to allocate yyy bytes) in zzz on line aaa - -PHPExcel holds an "in memory" representation of a spreadsheet, so it is susceptible to PHP's memory limitations. The memory made available to PHP can be increased by editing the value of the memory_limit directive in your php.ini file, or by using ini_set('memory_limit', '128M') within your code (ISP permitting). - -Some Readers and Writers are faster than others, and they also use differing amounts of memory. You can find some indication of the relative performance and memory usage for the different Readers and Writers, over the different versions of PHPExcel, on the [discussion board][9]. - -If you've already increased memory to a maximum, or can't change your memory limit, then [this discussion][10] on the board describes some of the methods that can be applied to reduce the memory usage of your scripts using PHPExcel. - -##### Protection on my worksheet is not working? - -When you make use of any of the worksheet protection features (e.g. cell range protection, prohibiting deleting rows, ...), make sure you enable worksheet security. This can for example be done like this: -```php -$objPHPExcel->getActiveSheet()->getProtection()->setSheet(true); -``` - -##### Feature X is not working with PHPExcel_Reader_Y / PHPExcel_Writer_Z - -Not all features of PHPExcel are implemented in all of the Reader / Writer classes. This is mostly due to underlying libraries not supporting a specific feature or not having implemented a specific feature. - -For example autofilter is not implemented in PEAR Spreadsheet_Excel_writer, which is the base of our Excel5 writer. - -We are slowly building up a list of features, together with the different readers and writers that support them, in the "Functionality Cross-Reference.xls" file in the /Documentation folder. - -##### Formulas don't seem to be calculated in Excel2003 using compatibility pack? - -This is normal behaviour of the compatibility pack, Excel2007 displays this correctly. Use PHPExcel_Writer_Excel5 if you really need calculated values, or force recalculation in Excel2003. - -##### Setting column width is not 100% accurate - -Trying to set column width, I experience one problem. When I open the file in Excel, the actual width is 0.71 less than it should be. - -The short answer is that PHPExcel uses a measure where padding is included. See section: "Setting a column's width" for more details. - -##### How do I use PHPExcel with my framework - - - There are some instructions for using PHPExcel with Joomla on the [Joomla message board][11] - - A page of advice on using [PHPExcel in the Yii framework][12] - - [The Bakery][13] has some helper classes for reading and writing with PHPExcel within CakePHP - - Integrating [PHPExcel into Kohana 3][14] and [?????????? PHPExcel ? Kohana Framework][15] - - Using [PHPExcel with Typo3][16] - -##### Joomla Autoloader interferes with PHPExcel Autoloader - -Thanks to peterrlynch for the following advice on resolving issues between the [PHPExcel autoloader and Joomla Autoloader][17] - - -#### Tutorials - - - __English PHPExcel tutorial__ - [http://openxmldeveloper.org][18] - - __French PHPExcel tutorial__ - [http://g-ernaelsten.developpez.com/tutoriels/excel2007/][19] - - __A Japanese-language introduction to PHPExcel__ - [http://journal.mycom.co.jp/articles/2009/03/06/phpexcel/index.html][21] - - - [2]: http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=Documents&referringTitle=Home - [3]: http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm - [4]: http://openxmldeveloper.org/articles/1970.aspx - [5]: http://www.microsoft.com/downloads/details.aspx?familyid=941b3470-3ae9-4aee-8f43-c6bb74cd1466&displaylang=en - [6]: http://www.codeplex.com/PackageExplorer/ - [7]: http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=FAQ&referringTitle=Requirements - [8]: http://snaps.php.net/win32/php5.2-win32-latest.zip - [9]: http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=234150 - [10]: http://phpexcel.codeplex.com/Thread/View.aspx?ThreadId=242712 - [11]: http://http:/forum.joomla.org/viewtopic.php?f=304&t=433060 - [12]: http://www.yiiframework.com/wiki/101/how-to-use-phpexcel-external-library-with-yii/ - [13]: http://bakery.cakephp.org/articles/melgior/2010/01/26/simple-excel-spreadsheet-helper - [14]: http://www.flynsarmy.com/2010/07/phpexcel-module-for-kohana-3/ - [15]: http://szpargalki.blogspot.com/2011/02/phpexcel-kohana-framework.html - [16]: http://typo3.org/documentation/document-library/extension-manuals/phpexcel_library/1.1.1/view/toc/0/ - [17]: http://phpexcel.codeplex.com/discussions/211925 - [18]: http://openxmldeveloper.org - [19]: http://g-ernaelsten.developpez.com/tutoriels/excel2007/ - [20]: http://www.web-junior.net/sozdanie-excel-fajjlov-s-pomoshhyu-phpexcel/ - [21]: http://journal.mycom.co.jp/articles/2009/03/06/phpexcel/index.html - - -[^phpzip_footnote]: __php_zip__ is only needed by __PHPExcel_Reader_Excel2007__, __PHPExcel_Writer_Excel2007__ and __PHPExcel_Reader_OOCalc__. In other words, if you need PHPExcel to handle .xlsx or .ods files you will need the zip extension, but otherwise not.<br />You can remove this dependency for writing Excel2007 files (though not yet for reading) by using the PCLZip library that is bundled with PHPExcel. See the FAQ section of this document for details about this. PCLZip does have a dependency on PHP's zlib extension being enabled. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/02-Architecture.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/02-Architecture.md deleted file mode 100644 index 8ddb43e..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/02-Architecture.md +++ /dev/null @@ -1,76 +0,0 @@ -# PHPExcel Developer Documentation - - -## Architecture - -### Schematical - -![01-schematic.png](./images/01-schematic.png "Basic Architecture Schematic") - - -### Lazy Loader - -PHPExcel implements an autoloader or "lazy loader", which means that it is not necessary to include every file within PHPExcel. It is only necessary to include the initial PHPExcel class file, then the autoloader will include other class files as and when required, so only those files that are actually required by your script will be loaded into PHP memory. The main benefit of this is that it reduces the memory footprint of PHPExcel itself, so that it uses less PHP memory. - -If your own scripts already define an autoload function, then this may be overwritten by the PHPExcel autoload function. For example, if you have: -```php -function __autoload($class) { - ... -} -``` -Do this instead: -```php -function myAutoload($class) { - ... -} - -spl_autoload_register('myAutoload'); -``` -Your autoloader will then co-exist with the autoloader of PHPExcel. - - -### Spreadsheet in memory - -PHPExcel's architecture is built in a way that it can serve as an in-memory spreadsheet. This means that, if one would want to create a web based view of a spreadsheet which communicates with PHPExcel's object model, he would only have to write the front-end code. - -Just like desktop spreadsheet software, PHPExcel represents a spreadsheet containing one or more worksheets, which contain cells with data, formulas, images, ... - - -### Readers and writers - -On its own, PHPExcel does not provide the functionality to read from or write to a persisted spreadsheet (on disk or in a database). To provide that functionality, readers and writers can be used. - -By default, the PHPExcel package provides some readers and writers, including one for the Open XML spreadsheet format (a.k.a. Excel 2007 file format). You are not limited to the default readers and writers, as you are free to implement the PHPExcel_Reader_IReader and PHPExcel_Writer_IWriter interface in a custom class. - -![02-readers-writers.png](./images/02-readers-writers.png "Readers/Writers") - -### Fluent interfaces - -PHPExcel supports fluent interfaces in most locations. This means that you can easily "chain" calls to specific methods without requiring a new PHP statement. For example, take the following code: - -```php -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw"); -$objPHPExcel->getProperties()->setLastModifiedBy("Maarten Balliauw"); -$objPHPExcel->getProperties()->setTitle("Office 2007 XLSX Test Document"); -$objPHPExcel->getProperties()->setSubject("Office 2007 XLSX Test Document"); -$objPHPExcel->getProperties()->setDescription("Test document for Office 2007 XLSX, generated using PHP classes."); -$objPHPExcel->getProperties()->setKeywords("office 2007 openxml php"); -$objPHPExcel->getProperties()->setCategory("Test result file"); -``` - -This can be rewritten as: - -```php -$objPHPExcel->getProperties() - ->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); -``` - - > __Using fluent interfaces is not required__ - > Fluent interfaces have been implemented to provide a convenient programming API. Use of them is not required, but can make your code easier to read and maintain. - > It can also improve performance, as you are reducing the overall number of calls to PHPExcel methods: in the above example, the `getProperties()` method is being called only once rather than 7 times in the non-fluent version. diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/03-Creating-a-Spreadsheet.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/03-Creating-a-Spreadsheet.md deleted file mode 100644 index b65000b..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/03-Creating-a-Spreadsheet.md +++ /dev/null @@ -1,34 +0,0 @@ -# PHPExcel Developer Documentation - - -## Creating a spreadsheet - -### The PHPExcel class - -The PHPExcel class is the core of PHPExcel. It contains references to the contained worksheets, document security settings and document meta data. - -To simplify the PHPExcel concept: the PHPExcel class represents your workbook. - -Typically, you will create a workbook in one of two ways, either by loading it from a spreadsheet file, or creating it manually. A third option, though less commonly used, is cloning an existing workbook that has been created using one of the previous two methods. - -#### Loading a Workbook from a file - -Details of the different spreadsheet formats supported, and the options available to read them into a PHPExcel object are described fully in the PHPExcel User Documentation - Reading Spreadsheet Files document. - -```php -$inputFileName = './sampleData/example1.xls'; - -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = PHPExcel_IOFactory::load($inputFileName); -``` - -#### Creating a new workbook - -If you want to create a new workbook, rather than load one from file, then you simply need to instantiate it as a new PHPExcel object. - -```php -/** Create a new PHPExcel Object **/ -$objPHPExcel = new PHPExcel(); -``` - -A new workbook will always be created with a single worksheet. diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/04-Configuration-Settings.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/04-Configuration-Settings.md deleted file mode 100644 index 2024e80..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/04-Configuration-Settings.md +++ /dev/null @@ -1,140 +0,0 @@ -# PHPExcel Developer Documentation - - -## Configuration Settings - -Once you have included the PHPExcel files in your script, but before instantiating a PHPExcel object or loading a workbook file, there are a number of configuration options that can be set which will affect the subsequent behaviour of the script. - -### Cell Caching - -PHPExcel uses an average of about 1k/cell in your worksheets, so large workbooks can quickly use up available memory. Cell caching provides a mechanism that allows PHPExcel to maintain the cell objects in a smaller size of memory, on disk, or in APC, memcache or Wincache, rather than in PHP memory. This allows you to reduce the memory usage for large workbooks, although at a cost of speed to access cell data. - -By default, PHPExcel still holds all cell objects in memory, but you can specify alternatives. To enable cell caching, you must call the PHPExcel_Settings::setCacheStorageMethod() method, passing in the caching method that you wish to use. - -```php -$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_in_memory; - -PHPExcel_Settings::setCacheStorageMethod($cacheMethod); -``` - -setCacheStorageMethod() will return a boolean true on success, false on failure (for example if trying to cache to APC when APC is not enabled). - -A separate cache is maintained for each individual worksheet, and is automatically created when the worksheet is instantiated based on the caching method and settings that you have configured. You cannot change the configuration settings once you have started to read a workbook, or have created your first worksheet. - -Currently, the following caching methods are available. - -#### PHPExcel_CachedObjectStorageFactory::cache_in_memory - -The default. If you don't initialise any caching method, then this is the method that PHPExcel will use. Cell objects are maintained in PHP memory as at present. - -#### PHPExcel_CachedObjectStorageFactory::cache_in_memory_serialized - -Using this caching method, cells are held in PHP memory as an array of serialized objects, which reduces the memory footprint with minimal performance overhead. - -#### PHPExcel_CachedObjectStorageFactory::cache_in_memory_gzip - -Like cache_in_memory_serialized, this method holds cells in PHP memory as an array of serialized objects, but gzipped to reduce the memory usage still further, although access to read or write a cell is slightly slower. - -#### PHPExcel_CachedObjectStorageFactory::cache_igbinary - -Uses PHPs igbinary extension (if its available) to serialize cell objects in memory. This is normally faster and uses less memory than standard PHP serialization, but isnt available in most hosting environments. - -#### PHPExcel_CachedObjectStorageFactory::cache_to_discISAM - -When using cache_to_discISAM all cells are held in a temporary disk file, with only an index to their location in that file maintained in PHP memory. This is slower than any of the cache_in_memory methods, but significantly reduces the memory footprint. By default, PHPExcel will use PHP's temp directory for the cache file, but you can specify a different directory when initialising cache_to_discISAM. - -```php -$cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_discISAM; -$cacheSettings = array( - 'dir' => '/usr/local/tmp' -); -PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); -``` - -The temporary disk file is automatically deleted when your script terminates. - -#### PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp - -Like cache_to_discISAM, when using cache_to_phpTemp all cells are held in the php://temp I/O stream, with only an index to their location maintained in PHP memory. In PHP, the php://memory wrapper stores data in the memory: php://temp behaves similarly, but uses a temporary file for storing the data when a certain memory limit is reached. The default is 1 MB, but you can change this when initialising cache_to_phpTemp. - -```php -$cacheMethod = PHPExcel_CachedObjectStorageFactory:: cache_to_phpTemp; -$cacheSettings = array( - 'memoryCacheSize' => '8MB' -); -PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); -``` - -The php://temp file is automatically deleted when your script terminates. - -#### PHPExcel_CachedObjectStorageFactory::cache_to_apc - -When using cache_to_apc, cell objects are maintained in APC with only an index maintained in PHP memory to identify that the cell exists. By default, an APC cache timeout of 600 seconds is used, which should be enough for most applications: although it is possible to change this when initialising cache_to_APC. - -```php -$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_APC; -$cacheSettings = array( - 'cacheTime' => 600 -); -PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); -``` - -When your script terminates all entries will be cleared from APC, regardless of the cacheTime value, so it cannot be used for persistent storage using this mechanism. - -#### PHPExcel_CachedObjectStorageFactory::cache_to_memcache - -When using cache_to_memcache, cell objects are maintained in memcache with only an index maintained in PHP memory to identify that the cell exists. - -By default, PHPExcel looks for a memcache server on localhost at port 11211. It also sets a memcache timeout limit of 600 seconds. If you are running memcache on a different server or port, then you can change these defaults when you initialise cache_to_memcache: - -```php -$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_memcache; -$cacheSettings = array( - 'memcacheServer' => 'localhost', - 'memcachePort' => 11211, - 'cacheTime' => 600 -); -PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); -``` - -When your script terminates all entries will be cleared from memcache, regardless of the cacheTime value, so it cannot be used for persistent storage using this mechanism. - -#### PHPExcel_CachedObjectStorageFactory::cache_to_wincache - -When using cache_to_wincache, cell objects are maintained in Wincache with only an index maintained in PHP memory to identify that the cell exists. By default, a Wincache cache timeout of 600 seconds is used, which should be enough for most applications: although it is possible to change this when initialising cache_to_wincache. - -```php -$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_wincache; -$cacheSettings = array( - 'cacheTime' => 600 -); -PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); -``` - -When your script terminates all entries will be cleared from Wincache, regardless of the cacheTime value, so it cannot be used for persistent storage using this mechanism. - -#### PHPExcel_CachedObjectStorageFactory::cache_to_sqlite - -Uses an SQLite 2 "in-memory" database for caching cell data. Unlike other caching methods, neither cells nor an index are held in PHP memory - an indexed database table makes it unnecessary to hold any index in PHP memory, which makes this the most memory-efficient of the cell caching methods. - -#### PHPExcel_CachedObjectStorageFactory::cache_to_sqlite3; - -Uses an SQLite 3 "in-memory" database for caching cell data. Unlike other caching methods, neither cells nor an index are held in PHP memory - an indexed database table makes it unnecessary to hold any index in PHP memory, which makes this the most memory-efficient of the cell caching methods. - - -### Language/Locale - -Some localisation elements have been included in PHPExcel. You can set a locale by changing the settings. To set the locale to Brazilian Portuguese you would use: - -```php -$locale = 'pt_br'; -$validLocale = PHPExcel_Settings::setLocale($locale); -if (!$validLocale) { - echo 'Unable to set locale to ' . $locale . " - reverting to en_us" . PHP_EOL; -} -``` - -If Brazilian Portuguese language files aren't available, then Portuguese will be enabled instead: if Portuguese language files aren't available, then the setLocale() method will return an error, and American English (en_us) settings will be used throughout. - -More details of the features available once a locale has been set, including a list of the languages and locales currently supported, can be found in the section of this document entitled "Locale Settings for Formulae". - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/05-Deleting-a-Workbook.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/05-Deleting-a-Workbook.md deleted file mode 100644 index 0ea9171..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/05-Deleting-a-Workbook.md +++ /dev/null @@ -1,13 +0,0 @@ -# PHPExcel Developer Documentation - -## Clearing a Workbook from memory - -The PHPExcel object contains cyclic references (e.g. the workbook is linked to the worksheets, and the worksheets are linked to their parent workbook) which cause problems when PHP tries to clear the objects from memory when they are unset(), or at the end of a function when they are in local scope. The result of this is "memory leaks", which can easily use a large amount of PHP's limited memory. - -This can only be resolved manually: if you need to unset a workbook, then you also need to "break" these cyclic references before doing so. PHPExcel provides the disconnectWorksheets() method for this purpose. - -```php -$objPHPExcel->disconnectWorksheets(); - -unset($objPHPExcel); -``` diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/06-Worksheets.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/06-Worksheets.md deleted file mode 100644 index a6a231c..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/06-Worksheets.md +++ /dev/null @@ -1,94 +0,0 @@ -# PHPExcel Developer Documentation - -## Worksheets - -A worksheet is a collection of cells, formulae, images, graphs, etc. It holds all data necessary to represent a spreadsheet worksheet. - -When you load a workbook from a spreadsheet file, it will be loaded with all its existing worksheets (unless you specified that only certain sheets should be loaded). When you load from non-spreadsheet files (such as a CSV or HTML file) or from spreadsheet formats that don't identify worksheets by name (such as SYLK), then a single worksheet called "WorkSheet1" will be created containing the data from that file. - -When you instantiate a new workbook, PHPExcel will create it with a single worksheet called "WorkSheet1". - -The `getSheetCount()` method will tell you the number of worksheets in the workbook; while the `getSheetNames()` method will return a list of all worksheets in the workbook, indexed by the order in which their "tabs" would appear when opened in MS Excel (or other appropriate Spreadsheet program). - -Individual worksheets can be accessed by name, or by their index position in the workbook. The index position represents the order that each worksheet "tab" is shown when the workbook is opened in MS Excel (or other appropriate Spreadsheet program). To access a sheet by its index, use the `getSheet()` method. - -```php -// Get the second sheet in the workbook -// Note that sheets are indexed from 0 -$objPHPExcel->getSheet(1); -``` - -If you don't specify a sheet index, then the first worksheet will be returned. - -Methods also exist allowing you to reorder the worksheets in the workbook. - -To access a sheet by name, use the `getSheetByName()` method, specifying the name of the worksheet that you want to access. - -```php -// Retrieve the worksheet called 'Worksheet 1' -$objPHPExcel->getSheetByName('Worksheet 1'); -``` - -Alternatively, one worksheet is always the currently active worksheet, and you can access that directly. The currently active worksheet is the one that will be active when the workbook is opened in MS Excel (or other appropriate Spreadsheet program). - -```php -// Retrieve the current active worksheet -$objPHPExcel->getActiveSheet(); -``` - -You can change the currently active sheet by index or by name using the `setActiveSheetIndex()` and `setActiveSheetIndexByName()` methods. - -### Adding a new Worksheet - -You can add a new worksheet to the workbook using the `createSheet()` method of the PHPExcel object. By default, this will be created as a new "last" sheet; but you can also specify an index position as an argument, and the worksheet will be inserted at that position, shuffling all subsequent worksheets in the collection down a place. - -```php -$objPHPExcel->createSheet(); -``` - -A new worksheet created using this method will be called "Worksheet\<n\>" where "\<n\>" is the lowest number possible to guarantee that the title is unique. - -Alternatively, you can instantiate a new worksheet (setting the title to whatever you choose) and then insert it into your workbook using the addSheet() method. - -```php -// Create a new worksheet called "My Data" -$myWorkSheet = new PHPExcel_Worksheet($objPHPExcel, 'My Data'); - -// Attach the "My Data" worksheet as the first worksheet in the PHPExcel object -$objPHPExcel->addSheet($myWorkSheet, 0); -``` - -If you don't specify an index position as the second argument, then the new worksheet will be added after the last existing worksheet. - -### Copying Worksheets - -Sheets within the same workbook can be copied by creating a clone of the worksheet you wish to copy, and then using the addSheet() method to insert the clone into the workbook. - -```php -$objClonedWorksheet = clone $objPHPExcel->getSheetByName('Worksheet 1'); -$objClonedWorksheet->setTitle('Copy of Worksheet 1') -$objPHPExcel->addSheet($objClonedWorksheet); -``` - -You can also copy worksheets from one workbook to another, though this is more complex as PHPExcel also has to replicate the styling between the two workbooks. The addExternalSheet() method is provided for this purpose. - -``` -$objClonedWorksheet = clone $objPHPExcel1->getSheetByName('Worksheet 1'); -$objPHPExcel->addExternalSheet($objClonedWorksheet); -``` - -In both cases, it is the developer's responsibility to ensure that worksheet names are not duplicated. PHPExcel will throw an exception if you attempt to copy worksheets that will result in a duplicate name. - -### Removing a Worksheet - -You can delete a worksheet from a workbook, identified by its index position, using the removeSheetByIndex() method - -```php -$sheetIndex = $objPHPExcel->getIndex( - $objPHPExcel->getSheetByName('Worksheet 1') -); -$objPHPExcel->removeSheetByIndex($sheetIndex); -``` - -If the currently active worksheet is deleted, then the sheet at the previous index position will become the currently active sheet. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/07-Accessing-Cells.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/07-Accessing-Cells.md deleted file mode 100644 index e63b45b..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/07-Accessing-Cells.md +++ /dev/null @@ -1,390 +0,0 @@ -# PHPExcel Developer Documentation - -## Accessing cells - -Accessing cells in a PHPExcel worksheet should be pretty straightforward. This topic lists some of the options to access a cell. - -### Setting a cell value by coordinate - -Setting a cell value by coordinate can be done using the worksheet's `setCellValue()` method. - -```php -// Set cell A1 with a string value -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'PHPExcel'); - -// Set cell A2 with a numeric value -$objPHPExcel->getActiveSheet()->setCellValue('A2', 12345.6789); - -// Set cell A3 with a boolean value -$objPHPExcel->getActiveSheet()->setCellValue('A3', TRUE); - -// Set cell A4 with a formula -$objPHPExcel->getActiveSheet()->setCellValue( - 'A4', - '=IF(A3, CONCATENATE(A1, " ", A2), CONCATENATE(A2, " ", A1))' -); -``` - -Alternatively, you can retrieve the cell object, and then call the cell’s setValue() method: - -```php -$objPHPExcel->getActiveSheet() - ->getCell('B8') - ->setValue('Some value'); -``` - -**Excel DataTypes** - -MS Excel supports 7 basic datatypes - - string - - number - - boolean - - null - - formula - - error - - Inline (or rich text) string - -By default, when you call the worksheet's `setCellValue()` method or the cell's `setValue()` method, PHPExcel will use the appropriate datatype for PHP nulls, booleans, floats or integers; or cast any string data value that you pass to the method into the most appropriate datatype, so numeric strings will be cast to numbers, while string values beginning with “=” will be converted to a formula. Strings that aren't numeric, or that don't begin with a leading "=" will be treated as genuine string values. - -This "conversion" is handled by a cell "value binder", and you can write custom "value binders" to change the behaviour of these "conversions". The standard PHPExcel package also provides an "advanced value binder" that handles a number of more complex conversions, such as converting strings with a fractional format like "3/4" to a number value (0.75 in this case) and setting an appropriate "fraction" number format mask. Similarly, strings like "5%" will be converted to a value of 0.05, and a percentage number format mask applied, and strings containing values that look like dates will be converted to Excel serialized datetimestamp values, and a corresponding mask applied. This is particularly useful when loading data from csv files, or setting cell values from a database. - -Formats handled by the advanced value binder include - - TRUE or FALSE (dependent on locale settings) are converted to booleans. - - Numeric strings identified as scientific (exponential) format are converted to numbers. - - Fractions and vulgar fractions are converted to numbers, and an appropriate number format mask applied. - - Percentages are converted to numbers, divided by 100, and an appropriate number format mask applied. - - Dates and times are converted to Excel timestamp values (numbers), and an appropriate number format mask applied. - - When strings contain a newline character ("\n"), then the cell styling is set to wrap. - -You can read more about value binders later in this section of the documentation. - -#### Setting a date and/or time value in a cell - -Date or time values are held as timestamp in Excel (a simple floating point value), and a number format mask is used to show how that value should be formatted; so if we want to store a date in a cell, we need to calculate the correct Excel timestamp, and set a number format mask. - -```php -// Get the current date/time and convert to an Excel date/time -$dateTimeNow = time(); -$excelDateValue = PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow ); -// Set cell A6 with the Excel date/time value -$objPHPExcel->getActiveSheet()->setCellValue( - 'A6', - $excelDateValue -); -// Set the number format mask so that the excel timestamp will be displayed as a human-readable date/time -$objPHPExcel->getActiveSheet()->getStyle('A6') - ->getNumberFormat() - ->setFormatCode( - PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME - ); -``` - -#### Setting a number with leading zeroes - -By default, PHPExcel will automatically detect the value type and set it to the appropriate Excel numeric datatype. This type conversion is handled by a value binder, as described in the section of this document entitled "Using value binders to facilitate data entry". - -Numbers don't have leading zeroes, so if you try to set a numeric value that does have leading zeroes (such as a telephone number) then these will be normally be lost as the value is cast to a number, so "01513789642" will be displayed as 1513789642. - -There are two ways you can force PHPExcel to override this behaviour. - -Firstly, you can set the datatype explicitly as a string so that it is not converted to a number. - -```php -// Set cell A8 with a numeric value, but tell PHPExcel it should be treated as a string -$objPHPExcel->getActiveSheet()->setCellValueExplicit( - 'A8', - "01513789642", - PHPExcel_Cell_DataType::TYPE_STRING -); -``` - -Alternatively, you can use a number format mask to display the value with leading zeroes. - -```php -// Set cell A9 with a numeric value -$objPHPExcel->getActiveSheet()->setCellValue('A9', 1513789642); -// Set a number format mask to display the value as 11 digits with leading zeroes -$objPHPExcel->getActiveSheet()->getStyle('A9') - ->getNumberFormat() - ->setFormatCode( - '00000000000' - ); -``` - -With number format masking, you can even break up the digits into groups to make the value more easily readable. - -```php -// Set cell A10 with a numeric value -$objPHPExcel->getActiveSheet()->setCellValue('A10', 1513789642); -// Set a number format mask to display the value as 11 digits with leading zeroes -$objPHPExcel->getActiveSheet()->getStyle('A10') - ->getNumberFormat() - ->setFormatCode( - '0000-000-0000' - ); -``` - -![07-simple-example-1.png](./images/07-simple-example-1.png "") - - -**Note** that not all complex format masks such as this one will work when retrieving a formatted value to display "on screen", or for certain writers such as HTML or PDF, but it will work with the true spreadsheet writers (Excel2007 and Excel5). - -### Setting a range of cells from an array - -It is also possible to set a range of cell values in a single call by passing an array of values to the `fromArray()` method. - -```php -$arrayData = array( - array(NULL, 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), -); -$objPHPExcel->getActiveSheet() - ->fromArray( - $arrayData, // The data to set - NULL, // Array values with this value will not be set - 'C3' // Top left coordinate of the worksheet range where - // we want to set these values (default is A1) - ); -``` - -![07-simple-example-2.png](./images/07-simple-example-2.png "") - -If you pass a 2-d array, then this will be treated as a series of rows and columns. A 1-d array will be treated as a single row, which is particularly useful if you're fetching an array of data from a database. - -```php -$rowArray = array('Value1', 'Value2', 'Value3', 'Value4'); -$objPHPExcel->getActiveSheet() - ->fromArray( - $rowArray, // The data to set - NULL, // Array values with this value will not be set - 'C3' // Top left coordinate of the worksheet range where - // we want to set these values (default is A1) - ); -``` - -![07-simple-example-3.png](./images/07-simple-example-3.png "") - -If you have a simple 1-d array, and want to write it as a column, then the following will convert it into an appropriately structured 2-d array that can be fed to the `fromArray()` method: - -```php -$rowArray = array('Value1', 'Value2', 'Value3', 'Value4'); -$columnArray = array_chunk($rowArray, 1); -$objPHPExcel->getActiveSheet() - ->fromArray( - $columnArray, // The data to set - NULL, // Array values with this value will not be set - 'C3' // Top left coordinate of the worksheet range where - // we want to set these values (default is A1) - ); -``` - -![07-simple-example-4.png](./images/07-simple-example-4.png "") - -### Retrieving a cell value by coordinate - -To retrieve the value of a cell, the cell should first be retrieved from the worksheet using the `getCell()` method. A cell's value can be read using the `getValue()` method. - -```php -// Get the value fom cell A1 -$cellValue = $objPHPExcel->getActiveSheet()->getCell('A1') - ->getValue(); -``` - -This will retrieve the raw, unformatted value contained in the cell. - -If a cell contains a formula, and you need to retrieve the calculated value rather than the formula itself, then use the cell's `getCalculatedValue()` method. This is further explained in . - -```php -// Get the value fom cell A4 -$cellValue = $objPHPExcel->getActiveSheet()->getCell('A4') - ->getCalculatedValue(); -``` - -Alternatively, if you want to see the value with any cell formatting applied (e.g. for a human-readable date or time value), then you can use the cell's `getFormattedValue()` method. - -```php -// Get the value fom cell A6 -$cellValue = $objPHPExcel->getActiveSheet()->getCell('A6') - ->getFormattedValue(); -``` - - -### Setting a cell value by column and row - -Setting a cell value by coordinate can be done using the worksheet's `setCellValueByColumnAndRow()` method. - -```php -// Set cell B5 with a string value -$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow(1, 5, 'PHPExcel'); -``` - -**Note** that column references start with '0' for column 'A', rather than from '1'. - -### Retrieving a cell value by column and row - -To retrieve the value of a cell, the cell should first be retrieved from the worksheet using the getCellByColumnAndRow method. A cell’s value can be read again using the following line of code: - -```php -// Get the value fom cell B5 -$cellValue = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(1, 5) - ->getValue(); -``` -If you need the calculated value of a cell, use the following code. This is further explained in . - -```php -// Get the value fom cell A4 -$cellValue = $objPHPExcel->getActiveSheet()->getCellByColumnAndRow(0, 4) - ->getCalculatedValue(); -``` - -### Retrieving a range of cell values to an array - -It is also possible to retrieve a range of cell values to an array in a single call using the `toArray()`, `rangeToArray()` or `namedRangeToArray()` methods. - -```php -$dataArray = $objPHPExcel->getActiveSheet() - ->rangeToArray( - 'C3:E5', // The worksheet range that we want to retrieve - NULL, // Value that should be returned for empty cells - TRUE, // Should formulas be calculated (the equivalent of getCalculatedValue() for each cell) - TRUE, // Should values be formatted (the equivalent of getFormattedValue() for each cell) - TRUE // Should the array be indexed by cell row and cell column - ); -``` - -These methods will all return a 2-d array of rows and columns. The `toArray()` method will return the whole worksheet; `rangeToArray()` will return a specified range or cells; while `namedRangeToArray()` will return the cells within a defined `named range`. - -### Looping through cells - -#### Looping through cells using iterators - -The easiest way to loop cells is by using iterators. Using iterators, one can use foreach to loop worksheets, rows within a worksheet, and cells within a row. - -Below is an example where we read all the values in a worksheet and display them in a table. - -```php -$objReader = PHPExcel_IOFactory::createReader('Excel2007'); -$objReader->setReadDataOnly(TRUE); -$objPHPExcel = $objReader->load("test.xlsx"); - -$objWorksheet = $objPHPExcel->getActiveSheet(); - -echo '<table>' . PHP_EOL; -foreach ($objWorksheet->getRowIterator() as $row) { - echo '<tr>' . PHP_EOL; - $cellIterator = $row->getCellIterator(); - $cellIterator->setIterateOnlyExistingCells(FALSE); // This loops through all cells, - // even if a cell value is not set. - // By default, only cells that have a value - // set will be iterated. - foreach ($cellIterator as $cell) { - echo '<td>' . - $cell->getValue() . - '</td>' . PHP_EOL; - } - echo '</tr>' . PHP_EOL; -} -echo '</table>' . PHP_EOL; -``` - -Note that we have set the cell iterator's `setIterateOnlyExistingCells()` to FALSE. This makes the iterator loop all cells within the worksheet range, even if they have not been set. - -The cell iterator will return a __NULL__ as the cell value if it is not set in the worksheet. -Setting the cell iterator's setIterateOnlyExistingCells() to FALSE will loop all cells in the worksheet that can be available at that moment. This will create new cells if required and increase memory usage! Only use it if it is intended to loop all cells that are possibly available. - -#### Looping through cells using indexes - -One can use the possibility to access cell values by column and row index like (0,1) instead of 'A1' for reading and writing cell values in loops. - -Note: In PHPExcel column index is 0-based while row index is 1-based. That means 'A1' ~ (0,1) - -Below is an example where we read all the values in a worksheet and display them in a table. - -```php -$objReader = PHPExcel_IOFactory::createReader('Excel2007'); -$objReader->setReadDataOnly(TRUE); -$objPHPExcel = $objReader->load("test.xlsx"); - -$objWorksheet = $objPHPExcel->getActiveSheet(); -// Get the highest row and column numbers referenced in the worksheet -$highestRow = $objWorksheet->getHighestRow(); // e.g. 10 -$highestColumn = $objWorksheet->getHighestColumn(); // e.g 'F' -$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn); // e.g. 5 - -echo '<table>' . "\n"; -for ($row = 1; $row <= $highestRow; ++$row) { - echo '<tr>' . PHP_EOL; - for ($col = 0; $col <= $highestColumnIndex; ++$col) { - echo '<td>' . - $objWorksheet->getCellByColumnAndRow($col, $row) - ->getValue() . - '</td>' . PHP_EOL; - } - echo '</tr>' . PHP_EOL; -} -echo '</table>' . PHP_EOL; -``` - -Alternatively, you can take advantage of PHP's "Perl-style" character incrementors to loop through the cells by coordinate: - -```php -$objReader = PHPExcel_IOFactory::createReader('Excel2007'); -$objReader->setReadDataOnly(TRUE); -$objPHPExcel = $objReader->load("test.xlsx"); - -$objWorksheet = $objPHPExcel->getActiveSheet(); -// Get the highest row number and column letter referenced in the worksheet -$highestRow = $objWorksheet->getHighestRow(); // e.g. 10 -$highestColumn = $objWorksheet->getHighestColumn(); // e.g 'F' -// Increment the highest column letter -$highestColumn++; - -echo '<table>' . "\n"; -for ($row = 1; $row <= $highestRow; ++$row) { - echo '<tr>' . PHP_EOL; - for ($col = 'A'; $col != $highestColumn; ++$col) { - echo '<td>' . - $objWorksheet->getCell($col . $row) - ->getValue() . - '</td>' . PHP_EOL; - } - echo '</tr>' . PHP_EOL; -} -echo '</table>' . PHP_EOL; -``` - -Note that we can't use a <= comparison here, because 'AA' would match as <= 'B', so we increment the highest column letter and then loop while $col != the incremented highest column. - -### Using value binders to facilitate data entry - -Internally, PHPExcel uses a default PHPExcel_Cell_IValueBinder implementation (PHPExcel_Cell_DefaultValueBinder) to determine data types of entered data using a cell's `setValue()` method (the `setValueExplicit()` method bypasses this check). - -Optionally, the default behaviour of PHPExcel can be modified, allowing easier data entry. For example, a PHPExcel_Cell_AdvancedValueBinder class is available. It automatically converts percentages, number in scientific format, and dates entered as strings to the correct format, also setting the cell's style information. The following example demonstrates how to set the value binder in PHPExcel: - -```php -/** PHPExcel */ -require_once 'PHPExcel.php'; - -// Set value binder -PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() ); - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); - -// ... -// Add some data, resembling some different data types -$objPHPExcel->getActiveSheet()->setCellValue('A4', 'Percentage value:'); -// Converts the string value to 0.1 and sets percentage cell style -$objPHPExcel->getActiveSheet()->setCellValue('B4', '10%'); - -$objPHPExcel->getActiveSheet()->setCellValue('A5', 'Date/time value:'); -// Converts the string value to an Excel datestamp and sets the date format cell style -$objPHPExcel->getActiveSheet()->setCellValue('B5', '21 December 1983'); -``` - -__Creating your own value binder is easy.__ -When advanced value binding is required, you can implement the PHPExcel_Cell_IValueBinder interface or extend the PHPExcel_Cell_DefaultValueBinder or PHPExcel_Cell_AdvancedValueBinder classes. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/08-Recipes.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/08-Recipes.md deleted file mode 100644 index b8930a4..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/08-Recipes.md +++ /dev/null @@ -1,1214 +0,0 @@ -# PHPExcel Developer Documentation - -## PHPExcel recipes - -The following pages offer you some widely-used PHPExcel recipes. Please note that these do NOT offer complete documentation on specific PHPExcel API functions, but just a bump to get you started. If you need specific API functions, please refer to the API documentation. - -For example, REF _Ref191885321 \w \h 4.4.7 REF _Ref191885321 \h Setting a worksheet's page orientation and size covers setting a page orientation to A4. Other paper formats, like US Letter, are not covered in this document, but in the PHPExcel API documentation. - -### Setting a spreadsheet's metadata - -PHPExcel allows an easy way to set a spreadsheet's metadata, using document property accessors. Spreadsheet metadata can be useful for finding a specific document in a file repository or a document management system. For example Microsoft Sharepoint uses document metadata to search for a specific document in its document lists. - -Setting spreadsheet metadata is done as follows: - -```php -$objPHPExcel->getProperties() - ->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw"); - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription( - "Test document for Office 2007 XLSX, generated using PHP classes." - ) - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); -``` - -### Setting a spreadsheet's active sheet - -The following line of code sets the active sheet index to the first sheet: - -```php -$objPHPExcel->setActiveSheetIndex(0); -``` - -You can also set the active sheet by its name/title - -```php -$objPHPExcel->setActiveSheetIndexByName('DataSheet') -``` - -will change the currently active sheet to the worksheet called "DataSheet". - -### Write a date or time into a cell - -In Excel, dates and Times are stored as numeric values counting the number of days elapsed since 1900-01-01. For example, the date '2008-12-31' is represented as 39813. You can verify this in Microsoft Office Excel by entering that date in a cell and afterwards changing the number format to 'General' so the true numeric value is revealed. Likewise, '3:15 AM' is represented as 0.135417. - -PHPExcel works with UST (Universal Standard Time) date and Time values, but does no internal conversions; so it is up to the developer to ensure that values passed to the date/time conversion functions are UST. - -Writing a date value in a cell consists of 2 lines of code. Select the method that suits you the best. Here are some examples: - -```php -/* PHPExcel_Cell_AdvanceValueBinder required for this sample */ -require_once 'PHPExcel/Cell/AdvancedValueBinder.php'; - -// MySQL-like timestamp '2008-12-31' or date string -PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() ); - -$objPHPExcel->getActiveSheet() - ->setCellValue('D1', '2008-12-31'); - -$objPHPExcel->getActiveSheet()->getStyle('D1') - ->getNumberFormat() - ->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDDSLASH); - -// PHP-time (Unix time) -$time = gmmktime(0,0,0,12,31,2008); // int(1230681600) -$objPHPExcel->getActiveSheet() - ->setCellValue('D1', PHPExcel_Shared_Date::PHPToExcel($time)); -$objPHPExcel->getActiveSheet()->getStyle('D1') - ->getNumberFormat() - ->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDDSLASH); - -// Excel-date/time -$objPHPExcel->getActiveSheet()->setCellValue('D1', 39813) -$objPHPExcel->getActiveSheet()->getStyle('D1') - ->getNumberFormat() - ->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDDSLASH); -``` - -The above methods for entering a date all yield the same result. PHPExcel_Style_NumberFormat provides a lot of pre-defined date formats. - -The PHPExcel_Shared_Date::PHPToExcel() method will also work with a PHP DateTime object. - -Similarly, times (or date and time values) can be entered in the same fashion: just remember to use an appropriate format code. - -__Notes:__ - -See section "Using value binders to facilitate data entry" to learn more about the AdvancedValueBinder used in the first example. -In previous versions of PHPExcel up to and including 1.6.6, when a cell had a date-like number format code, it was possible to enter a date directly using an integer PHP-time without converting to Excel date format. Starting with PHPExcel 1.6.7 this is no longer supported. -Excel can also operate in a 1904-based calendar (default for workbooks saved on Mac). Normally, you do not have to worry about this when using PHPExcel. - -### Write a formula into a cell - -Inside the Excel file, formulas are always stored as they would appear in an English version of Microsoft Office Excel, and PHPExcel handles all formulae internally in this format. This means that the following rules hold: - - - Decimal separator is '.' (period) - - Function argument separator is ',' (comma) - - Matrix row separator is ';' (semicolon) - - English function names must be used - -This is regardless of which language version of Microsoft Office Excel may have been used to create the Excel file. - -When the final workbook is opened by the user, Microsoft Office Excel will take care of displaying the formula according the applications language. Translation is taken care of by the application! - -The following line of code writes the formula '=IF(C4>500,"profit","loss")' into the cell B8. Note that the formula must start with "=" to make PHPExcel recognise this as a formula. - -```php -$objPHPExcel->getActiveSheet()->setCellValue('B8','=IF(C4>500,"profit","loss")'); -``` - -If you want to write a string beginning with an "=" character to a cell, then you should use the setCellValueExplicit() method. - -```php -$objPHPExcel->getActiveSheet() - ->setCellValueExplicit( - 'B8', - '=IF(C4>500,"profit","loss")', - PHPExcel_Cell_DataType::TYPE_STRING - ); -``` - -A cell's formula can be read again using the following line of code: - -```php -$formula = $objPHPExcel->getActiveSheet()->getCell('B8')->getValue(); -``` - -If you need the calculated value of a cell, use the following code. This is further explained in REF _Ref191885372 \w \h \* MERGEFORMAT 4.4.35. - -```php -$value = $objPHPExcel->getActiveSheet()->getCell('B8')->getCalculatedValue(); -``` - -### Locale Settings for Formulae - -Some localisation elements have been included in PHPExcel. You can set a locale by changing the settings. To set the locale to Russian you would use: - -```php -$locale = 'ru'; -$validLocale = PHPExcel_Settings::setLocale($locale); -if (!$validLocale) { - echo 'Unable to set locale to '.$locale." - reverting to en_us<br />\n"; -} -``` - -If Russian language files aren't available, the `setLocale()` method will return an error, and English settings will be used throughout. - -Once you have set a locale, you can translate a formula from its internal English coding. - -```php -$formula = $objPHPExcel->getActiveSheet()->getCell('B8')->getValue(); -$translatedFormula = PHPExcel_Calculation::getInstance()->_translateFormulaToLocale($formula); -``` - -You can also create a formula using the function names and argument separators appropriate to the defined locale; then translate it to English before setting the cell value: - -```php -$formula = '=????360(????(2010;2;5);????(2010;12;31);??????)'; -$internalFormula = PHPExcel_Calculation::getInstance()->translateFormulaToEnglish($formula); -$objPHPExcel->getActiveSheet()->setCellValue('B8',$internalFormula); -``` - -Currently, formula translation only translates the function names, the constants TRUE and FALSE, and the function argument separators. - -At present, the following locale settings are supported: - - Language | | Locale Code - ---------------------|----------------------|------------- - Czech | Ceština | cs - Danish | Dansk | da - German | Deutsch | de - Spanish | Español | es - Finnish | Suomi | fi - French | Français | fr - Hungarian | Magyar | hu - Italian | Italiano | it - Dutch | Nederlands | nl - Norwegian | Norsk | no - Polish | Jezyk polski | pl - Portuguese | Português | pt - Brazilian Portuguese | Português Brasileiro | pt_br - Russian | ??????? ???? | ru - Swedish | Svenska | sv - Turkish | Türkçe | tr - -### Write a newline character "\n" in a cell (ALT+"Enter") - -In Microsoft Office Excel you get a line break in a cell by hitting ALT+"Enter". When you do that, it automatically turns on "wrap text" for the cell. - -Here is how to achieve this in PHPExcel: - -```php -$objPHPExcel->getActiveSheet()->getCell('A1')->setValue("hello\nworld"); -$objPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setWrapText(true); -``` - -__Tip__ - -Read more about formatting cells using getStyle() elsewhere. - -__Tip__ - -AdvancedValuebinder.php automatically turns on "wrap text" for the cell when it sees a newline character in a string that you are inserting in a cell. Just like Microsoft Office Excel. Try this: - -```php -require_once 'PHPExcel/Cell/AdvancedValueBinder.php'; -PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() ); - -$objPHPExcel->getActiveSheet()->getCell('A1')->setValue("hello\nworld"); -``` - -Read more about AdvancedValueBinder.php elsewhere. - -### Explicitly set a cell's datatype - -You can set a cell's datatype explicitly by using the cell's setValueExplicit method, or the setCellValueExplicit method of a worksheet. Here's an example: - -```php -$objPHPExcel->getActiveSheet()->getCell('A1') - ->setValueExplicit( - '25', - PHPExcel_Cell_DataType::TYPE_NUMERIC - ); -``` - -### Change a cell into a clickable URL - -You can make a cell a clickable URL by setting its hyperlink property: - -```php -$objPHPExcel->getActiveSheet()->setCellValue('E26', 'www.phpexcel.net'); -$objPHPExcel->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('http://www.phpexcel.net'); -``` - -If you want to make a hyperlink to another worksheet/cell, use the following code: - -```php -$objPHPExcel->getActiveSheet()->setCellValue('E26', 'www.phpexcel.net'); -$objPHPExcel->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl("sheet://'Sheetname'!A1"); -``` - -### Setting Printer Options for Excel files - -#### Setting a worksheet's page orientation and size - -Setting a worksheet's page orientation and size can be done using the following lines of code: - -```php -$objPHPExcel->getActiveSheet()->getPageSetup() - ->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE); -$objPHPExcel->getActiveSheet()->getPageSetup() - ->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4); -``` - -Note that there are additional page settings available. Please refer to the API documentation for all possible options. - -#### Page Setup: Scaling options - -The page setup scaling options in PHPExcel relate directly to the scaling options in the "Page Setup" dialog as shown in the illustration. - -Default values in PHPExcel correspond to default values in MS Office Excel as shown in illustration - -![08-page-setup-scaling-options.png](./images/08-page-setup-scaling-options.png "") - - method | initial value | calling method will trigger | Note - --------------------|:-------------:|-----------------------------|------ - setFitToPage(...) | FALSE | - | - setScale(...) | 100 | setFitToPage(FALSE) | - setFitToWidth(...) | 1 | setFitToPage(TRUE) | value 0 means do-not-fit-to-width - setFitToHeight(...) | 1 | setFitToPage(TRUE) | value 0 means do-not-fit-to-height - -##### Example - -Here is how to fit to 1 page wide by infinite pages tall: - -```php -$objPHPExcel->getActiveSheet()->getPageSetup()->setFitToWidth(1); -$objPHPExcel->getActiveSheet()->getPageSetup()->setFitToHeight(0); -``` - -As you can see, it is not necessary to call setFitToPage(TRUE) since setFitToWidth(...) and setFitToHeight(...) triggers this. - -If you use setFitToWidth() you should in general also specify setFitToHeight() explicitly like in the example. Be careful relying on the initial values. This is especially true if you are upgrading from PHPExcel 1.7.0 to 1.7.1 where the default values for fit-to-height and fit-to-width changed from 0 to 1. - -#### Page margins - -To set page margins for a worksheet, use this code: - -```php -$objPHPExcel->getActiveSheet()->getPageMargins()->setTop(1); -$objPHPExcel->getActiveSheet()->getPageMargins()->setRight(0.75); -$objPHPExcel->getActiveSheet()->getPageMargins()->setLeft(0.75); -$objPHPExcel->getActiveSheet()->getPageMargins()->setBottom(1); -``` - -Note that the margin values are specified in inches. - -![08-page-setup-margins.png](./images/08-page-setup-margins.png "") - -#### Center a page horizontally/vertically - -To center a page horizontally/vertically, you can use the following code: - -```php -$objPHPExcel->getActiveSheet()->getPageSetup()->setHorizontalCentered(true); -$objPHPExcel->getActiveSheet()->getPageSetup()->setVerticalCentered(false); -``` - -#### Setting the print header and footer of a worksheet - -Setting a worksheet's print header and footer can be done using the following lines of code: - -```php -$objPHPExcel->getActiveSheet()->getHeaderFooter() - ->setOddHeader('&C&HPlease treat this document as confidential!'); -$objPHPExcel->getActiveSheet()->getHeaderFooter() - ->setOddFooter('&L&B' . $objPHPExcel->getProperties()->getTitle() . '&RPage &P of &N'); -``` - -Substitution and formatting codes (starting with &) can be used inside headers and footers. There is no required order in which these codes must appear. - -The first occurrence of the following codes turns the formatting ON, the second occurrence turns it OFF again: - - - Strikethrough - - Superscript - - Subscript - -Superscript and subscript cannot both be ON at same time. Whichever comes first wins and the other is ignored, while the first is ON. - -The following codes are supported by Excel2007: - -Code | Meaning ------------------------|----------- -&L | Code for "left section" (there are three header / footer locations, "left", "center", and "right"). When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the left section. -&P | Code for "current page #" -&N | Code for "total pages" -&font size | Code for "text font size", where font size is a font size in points. -&K | Code for "text font color" - RGB Color is specified as RRGGBB Theme Color is specifed as TTSNN where TT is the theme color Id, S is either "+" or "-" of the tint/shade value, NN is the tint/shade value. -&S | Code for "text strikethrough" on / off -&X | Code for "text super script" on / off -&Y | Code for "text subscript" on / off -&C | Code for "center section". When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the center section. -&D | Code for "date" -&T | Code for "time" -&G | Code for "picture as background" - Please make sure to add the image to the header/footer[^print-footer-image-footnote] -&U | Code for "text single underline" -&E | Code for "double underline" -&R | Code for "right section". When two or more occurrences of this section marker exist, the contents from all markers are concatenated, in the order of appearance, and placed into the right section. -&Z | Code for "this workbook's file path" -&F | Code for "this workbook's file name" -&A | Code for "sheet tab name" -&+ | Code for add to page # -&- | Code for subtract from page # -&"font name,font type" | Code for "text font name" and "text font type", where font name and font type are strings specifying the name and type of the font, separated by a comma. When a hyphen appears in font name, it means "none specified". Both of font name and font type can be localized values. -&"-,Bold" | Code for "bold font style" -&B | Code for "bold font style" -&"-,Regular" | Code for "regular font style" -&"-,Italic" | Code for "italic font style" -&I | Code for "italic font style" -&"-,Bold Italic" | Code for "bold italic font style" -&O | Code for "outline style" -&H | Code for "shadow style" - - [^print-footer-image-footnote]: z -```php -$objDrawing = new PHPExcel_Worksheet_HeaderFooterDrawing(); -$objDrawing->setName('PHPExcel logo'); -$objDrawing->setPath('./images/phpexcel_logo.gif'); -$objDrawing->setHeight(36); -$objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_LEFT); -``` - -__Tip__ - -The above table of codes may seem overwhelming first time you are trying to figure out how to write some header or footer. Luckily, there is an easier way. Let Microsoft Office Excel do the work for you.For example, create in Microsoft Office Excel an xlsx file where you insert the header and footer as desired using the programs own interface. Save file as test.xlsx. Now, take that file and read off the values using PHPExcel as follows: - -```php -$objPHPexcel = PHPExcel_IOFactory::load('test.xlsx'); -$objWorksheet = $objPHPexcel->getActiveSheet(); - -var_dump($objWorksheet->getHeaderFooter()->getOddFooter()); -var_dump($objWorksheet->getHeaderFooter()->getEvenFooter()); -var_dump($objWorksheet->getHeaderFooter()->getOddHeader()); -var_dump($objWorksheet->getHeaderFooter()->getEvenHeader()); -``` - -That reveals the codes for the even/odd header and footer. Experienced users may find it easier to rename test.xlsx to test.zip, unzip it, and inspect directly the contents of the relevant xl/worksheets/sheetX.xml to find the codes for header/footer. - -#### Setting printing breaks on a row or column - -To set a print break, use the following code, which sets a row break on row 10. - -```php -$objPHPExcel->getActiveSheet()->setBreak( 'A10' , PHPExcel_Worksheet::BREAK_ROW ); -``` - -The following line of code sets a print break on column D: - -```php -$objPHPExcel->getActiveSheet()->setBreak( 'D10' , PHPExcel_Worksheet::BREAK_COLUMN ); -``` - -#### Show/hide gridlines when printing - -To show/hide gridlines when printing, use the following code: - -$objPHPExcel->getActiveSheet()->setShowGridlines(true); - -#### Setting rows/columns to repeat at top/left - -PHPExcel can repeat specific rows/cells at top/left of a page. The following code is an example of how to repeat row 1 to 5 on each printed page of a specific worksheet: - -```php -$objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 5); -``` - -#### Specify printing area - -To specify a worksheet's printing area, use the following code: - -```php -$objPHPExcel->getActiveSheet()->getPageSetup()->setPrintArea('A1:E5'); -``` - -There can also be multiple printing areas in a single worksheet: - -```php -$objPHPExcel->getActiveSheet()->getPageSetup()->setPrintArea('A1:E5,G4:M20'); -``` - -### Styles - -#### Formatting cells - -A cell can be formatted with font, border, fill, ... style information. For example, one can set the foreground colour of a cell to red, aligned to the right, and the border to black and thick border style. Let's do that on cell B2: - -```php -$objPHPExcel->getActiveSheet()->getStyle('B2') - ->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_RED); -$objPHPExcel->getActiveSheet()->getStyle('B2') - ->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT); -$objPHPExcel->getActiveSheet()->getStyle('B2') - ->getBorders()->getTop()->setBorderStyle(PHPExcel_Style_Border::BORDER_THICK); -$objPHPExcel->getActiveSheet()->getStyle('B2') - ->getBorders()->getBottom()->setBorderStyle(PHPExcel_Style_Border::BORDER_THICK); -$objPHPExcel->getActiveSheet()->getStyle('B2') - ->getBorders()->getLeft()->setBorderStyle(PHPExcel_Style_Border::BORDER_THICK); -$objPHPExcel->getActiveSheet()->getStyle('B2') - ->getBorders()->getRight()->setBorderStyle(PHPExcel_Style_Border::BORDER_THICK); -$objPHPExcel->getActiveSheet()->getStyle('B2') - ->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID); -$objPHPExcel->getActiveSheet()->getStyle('B2') - ->getFill()->getStartColor()->setARGB('FFFF0000'); -``` - -Starting with PHPExcel 1.7.0 getStyle() also accepts a cell range as a parameter. For example, you can set a red background color on a range of cells: - -```php -$objPHPExcel->getActiveSheet()->getStyle('B3:B7')->getFill() - ->setFillType(PHPExcel_Style_Fill::FILL_SOLID) - ->getStartColor()->setARGB('FFFF0000'); -``` - -__Tip__ -It is recommended to style many cells at once, using e.g. getStyle('A1:M500'), rather than styling the cells individually in a loop. This is much faster compared to looping through cells and styling them individually. - -There is also an alternative manner to set styles. The following code sets a cell's style to font bold, alignment right, top border thin and a gradient fill: - -```php -$styleArray = array( - 'font' => array( - 'bold' => true, - ), - 'alignment' => array( - 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_RIGHT, - ), - 'borders' => array( - 'top' => array( - 'style' => PHPExcel_Style_Border::BORDER_THIN, - ), - ), - 'fill' => array( - 'type' => PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR, - 'rotation' => 90, - 'startcolor' => array( - 'argb' => 'FFA0A0A0', - ), - 'endcolor' => array( - 'argb' => 'FFFFFFFF', - ), - ), -); - -$objPHPExcel->getActiveSheet()->getStyle('A3')->applyFromArray($styleArray); -``` - -Or with a range of cells: - -```php -$objPHPExcel->getActiveSheet()->getStyle('B3:B7')->applyFromArray($styleArray); -``` - -This alternative method using arrays should be faster in terms of execution whenever you are setting more than one style property. But the difference may barely be measurable unless you have many different styles in your workbook. - -Prior to PHPExcel 1.7.0 duplicateStyleArray() was the recommended method for styling a cell range, but this method has now been deprecated since getStyle() has started to accept a cell range. - -#### Number formats - -You often want to format numbers in Excel. For example you may want a thousands separator plus a fixed number of decimals after the decimal separator. Or perhaps you want some numbers to be zero-padded. - -In Microsoft Office Excel you may be familiar with selecting a number format from the "Format Cells" dialog. Here there are some predefined number formats available including some for dates. The dialog is designed in a way so you don't have to interact with the underlying raw number format code unless you need a custom number format. - -In PHPExcel, you can also apply various predefined number formats. Example: - -```php -$objPHPExcel->getActiveSheet()->getStyle('A1')->getNumberFormat() - ->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1); -``` - -This will format a number e.g. 1587.2 so it shows up as 1,587.20 when you open the workbook in MS Office Excel. (Depending on settings for decimal and thousands separators in Microsoft Office Excel it may show up as 1.587,20) - -You can achieve exactly the same as the above by using this: - -```php -$objPHPExcel->getActiveSheet()->getStyle('A1')->getNumberFormat() - ->setFormatCode('#,##0.00'); -``` - -In Microsoft Office Excel, as well as in PHPExcel, you will have to interact with raw number format codes whenever you need some special custom number format. Example: - -```php -$objPHPExcel->getActiveSheet()->getStyle('A1')->getNumberFormat() - ->setFormatCode('[Blue][>=3000]$#,##0;[Red][<0]$#,##0;$#,##0'); -``` - -Another example is when you want numbers zero-padded with leading zeros to a fixed length: - -```php -$objPHPExcel->getActiveSheet()->getCell('A1')->setValue(19); -$objPHPExcel->getActiveSheet()->getStyle('A1')->getNumberFormat() - ->setFormatCode('0000'); // will show as 0019 in Excel -``` - -__Tip__ -The rules for composing a number format code in Excel can be rather complicated. Sometimes you know how to create some number format in Microsoft Office Excel, but don't know what the underlying number format code looks like. How do you find it? - -The readers shipped with PHPExcel come to the rescue. Load your template workbook using e.g. Excel2007 reader to reveal the number format code. Example how read a number format code for cell A1: - -```php -$objReader = PHPExcel_IOFactory::createReader('Excel2007'); -$objPHPExcel = $objReader->load('template.xlsx'); -var_dump($objPHPExcel->getActiveSheet()->getStyle('A1')->getNumberFormat()->getFormatCode()); -``` - -Advanced users may find it faster to inspect the number format code directly by renaming template.xlsx to template.zip, unzipping, and looking for the relevant piece of XML code holding the number format code in *xl/styles.xml*. - -#### Alignment and wrap text - -Let's set vertical alignment to the top for cells A1:D4 - -```php -$objPHPExcel->getActiveSheet()->getStyle('A1:D4') - ->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP); -``` - -Here is how to achieve wrap text: - -```php -$objPHPExcel->getActiveSheet()->getStyle('A1:D4') - ->getAlignment()->setWrapText(true); -``` - -#### Setting the default style of a workbook - -It is possible to set the default style of a workbook. Let's set the default font to Arial size 8: - -```php -$objPHPExcel->getDefaultStyle()->getFont()->setName('Arial'); -$objPHPExcel->getDefaultStyle()->getFont()->setSize(8); -``` - -#### Styling cell borders - -In PHPExcel it is easy to apply various borders on a rectangular selection. Here is how to apply a thick red border outline around cells B2:G8. - -```php -$styleArray = array( - 'borders' => array( - 'outline' => array( - 'style' => PHPExcel_Style_Border::BORDER_THICK, - 'color' => array('argb' => 'FFFF0000'), - ), - ), -); - -$objWorksheet->getStyle('B2:G8')->applyFromArray($styleArray); -``` - -In Microsoft Office Excel, the above operation would correspond to selecting the cells B2:G8, launching the style dialog, choosing a thick red border, and clicking on the "Outline" border component. - -Note that the border outline is applied to the rectangular selection B2:G8 as a whole, not on each cell individually. - -You can achieve any border effect by using just the 5 basic borders and operating on a single cell at a time: - - Array key | Maps to property - ----------|------------------ - left | getLeft() - right | getRight() - top | getTop() - bottom | getBottom() - diagonal | getDiagonal() - -Additional shortcut borders come in handy like in the example above. These are the shortcut borders available: - - Array key | Maps to property - -----------|------------------ - allborders | getAllBorders() - outline | getOutline() - inside | getInside() - vertical | getVertical() - horizontal | getHorizontal() - - - -An overview of all border shortcuts can be seen in the following image: - -![08-styling-border-options.png](./images/08-styling-border-options.png "") - -If you simultaneously set e.g. allborders and vertical, then we have "overlapping" borders, and one of the components has to win over the other where there is border overlap. In PHPExcel, from weakest to strongest borders, the list is as follows: allborders, outline/inside, vertical/horizontal, left/right/top/bottom/diagonal. - -This border hierarchy can be utilized to achieve various effects in an easy manner. - -### Conditional formatting a cell - -A cell can be formatted conditionally, based on a specific rule. For example, one can set the foreground colour of a cell to red if its value is below zero, and to green if its value is zero or more. - -One can set a conditional style ruleset to a cell using the following code: - -```php -$objConditional1 = new PHPExcel_Style_Conditional(); -$objConditional1->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS); -$objConditional1->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_LESSTHAN); -$objConditional1->addCondition('0'); -$objConditional1->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_RED); -$objConditional1->getStyle()->getFont()->setBold(true); - -$objConditional2 = new PHPExcel_Style_Conditional(); -$objConditional2->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS); -$objConditional2->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_GREATERTHANOREQUAL); -$objConditional2->addCondition('0'); -$objConditional2->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_GREEN); -$objConditional2->getStyle()->getFont()->setBold(true); - -$conditionalStyles = $objPHPExcel->getActiveSheet()->getStyle('B2')->getConditionalStyles(); -array_push($conditionalStyles, $objConditional1); -array_push($conditionalStyles, $objConditional2); - -$objPHPExcel->getActiveSheet()->getStyle('B2')->setConditionalStyles($conditionalStyles); -``` - -If you want to copy the ruleset to other cells, you can duplicate the style object: - -```php -$objPHPExcel->getActiveSheet() - ->duplicateStyle( - $objPHPExcel->getActiveSheet()->getStyle('B2'), - 'B3:B7' - ); -``` - -### Add a comment to a cell - -To add a comment to a cell, use the following code. The example below adds a comment to cell E11: - -```php -$objPHPExcel->getActiveSheet() - ->getComment('E11') - ->setAuthor('Mark Baker'); -$objCommentRichText = $objPHPExcel->getActiveSheet() - ->getComment('E11') - ->getText()->createTextRun('PHPExcel:'); -$objCommentRichText->getFont()->setBold(true); -$objPHPExcel->getActiveSheet() - ->getComment('E11') - ->getText()->createTextRun("\r\n"); -$objPHPExcel->getActiveSheet() - ->getComment('E11') - ->getText()->createTextRun('Total amount on the current invoice, excluding VAT.'); -``` - -![08-cell-comment.png](./images/08-cell-comment.png "") - -### Apply autofilter to a range of cells - -To apply an autofilter to a range of cells, use the following code: - -```php -$objPHPExcel->getActiveSheet()->setAutoFilter('A1:C9'); -``` - -__Make sure that you always include the complete filter range!__ -Excel does support setting only the captionrow, but that's __not__ a best practice... - -### Setting security on a spreadsheet - -Excel offers 3 levels of "protection": document security, sheet security and cell security. - -Document security allows you to set a password on a complete spreadsheet, allowing changes to be made only when that password is entered.Worksheet security offers other security options: you can disallow inserting rows on a specific sheet, disallow sorting, ... Cell security offers the option to lock/unlock a cell as well as show/hide the internal formulaAn example on setting document security: - -```php -$objPHPExcel->getSecurity()->setLockWindows(true); -$objPHPExcel->getSecurity()->setLockStructure(true); -$objPHPExcel->getSecurity()->setWorkbookPassword("PHPExcel"); -``` - -An example on setting worksheet security: - -```php -$objPHPExcel->getActiveSheet() - ->getProtection()->setPassword('PHPExcel'); -$objPHPExcel->getActiveSheet() - ->getProtection()->setSheet(true); -$objPHPExcel->getActiveSheet() - ->getProtection()->setSort(true); -$objPHPExcel->getActiveSheet() - ->getProtection()->setInsertRows(true); -$objPHPExcel->getActiveSheet() - ->getProtection()->setFormatCells(true); -``` - -An example on setting cell security: - -```php -$objPHPExcel->getActiveSheet()->getStyle('B1') - ->getProtection() - ->setLocked(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED); -``` - -__Make sure you enable worksheet protection if you need any of the worksheet protection features!__ This can be done using the following code: - -```php -$objPHPExcel->getActiveSheet()->getProtection()->setSheet(true); -``` - -### Setting data validation on a cell - -Data validation is a powerful feature of Excel2007. It allows to specify an input filter on the data that can be inserted in a specific cell. This filter can be a range (i.e. value must be between 0 and 10), a list (i.e. value must be picked from a list), ... - -The following piece of code only allows numbers between 10 and 20 to be entered in cell B3: - -```php -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B3') - ->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_WHOLE ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP ); -$objValidation->setAllowBlank(true); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Number is not allowed!'); -$objValidation->setPromptTitle('Allowed input'); -$objValidation->setPrompt('Only numbers between 10 and 20 are allowed.'); -$objValidation->setFormula1(10); -$objValidation->setFormula2(20); -``` - -This validation will limit the length of text that can be entered in a cell to 6 characters. - -``` -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B9')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_TEXTLENGTH ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP ); -$objValidation->setAllowBlank(true); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Text exceeds maximum length'); -$objValidation->setPromptTitle('Allowed input'); -$objValidation->setPrompt('Maximum text length is 6 characters.'); -$objValidation->setFormula1(6); -``` - -The following piece of code only allows an item picked from a list of data to be entered in cell B3: - -```php -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B5') - ->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ); -$objValidation->setAllowBlank(false); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setShowDropDown(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Value is not in list.'); -$objValidation->setPromptTitle('Pick from list'); -$objValidation->setPrompt('Please pick a value from the drop-down list.'); -$objValidation->setFormula1('"Item A,Item B,Item C"'); -``` - -When using a data validation list like above, make sure you put the list between " and " and that you split the items with a comma (,). - -It is important to remember that any string participating in an Excel formula is allowed to be maximum 255 characters (not bytes). This sets a limit on how many items you can have in the string "Item A,Item B,Item C". Therefore it is normally a better idea to type the item values directly in some cell range, say A1:A3, and instead use, say, $objValidation->setFormula1('Sheet!$A$1:$A$3');. Another benefit is that the item values themselves can contain the comma "," character itself. - -If you need data validation on multiple cells, one can clone the ruleset: - -```php -$objPHPExcel->getActiveSheet()->getCell('B8')->setDataValidation(clone $objValidation); -``` - -### Setting a column's width - -A column's width can be set using the following code: - -```php -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(12); -``` - -If you want PHPExcel to perform an automatic width calculation, use the following code. PHPExcel will approximate the column with to the width of the widest column value. - -```php -$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); -``` - -![08-column-width.png](./images/08-column-width.png "") - -The measure for column width in PHPExcel does __not__ correspond exactly to the measure you may be used to in Microsoft Office Excel. Column widths are difficult to deal with in Excel, and there are several measures for the column width.1) __Inner width in character units__ (e.g. 8.43 this is probably what you are familiar with in Excel)2) __Full width in pixels__ (e.g. 64 pixels)3) __Full width in character units__ (e.g. 9.140625, value -1 indicates unset width)__PHPExcel always operates with 3) "Full width in character units"__ which is in fact the only value that is stored in any Excel file, hence the most reliable measure. Unfortunately, __Microsoft ____Office ____Excel does not present you with this ____measure__. Instead measures 1) and 2) are computed by the application when the file is opened and these values are presented in various dialogues and tool tips.The character width unit is the width of a '0' (zero) glyph in the workbooks default font. Therefore column widths measured in character units in two different workbooks can only be compared if they have the same default workbook font.If you have some Excel file and need to know the column widths in measure 3), you can read the Excel file with PHPExcel and echo the retrieved values. - -### Show/hide a column - -To set a worksheet's column visibility, you can use the following code. The first line explicitly shows the column C, the second line hides column D. - -```php -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(true); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false); -``` - -### Group/outline a column - -To group/outline a column, you can use the following code: - -```php -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1); -``` - -You can also collapse the column. Note that you should also set the column invisible, otherwise the collapse will not be visible in Excel 2007. - -```php -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setCollapsed(true); -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setVisible(false); -``` - -Please refer to the section "group/outline a row" for a complete example on collapsing. - -You can instruct PHPExcel to add a summary to the right (default), or to the left. The following code adds the summary to the left: - -```php -$objPHPExcel->getActiveSheet()->setShowSummaryRight(false); -``` - -### Setting a row's height - -A row's height can be set using the following code: - -```php -$objPHPExcel->getActiveSheet()->getRowDimension('10')->setRowHeight(100); -``` - -Excel measures row height in points, where 1 pt is 1/72 of an inch (or about 0.35mm). The default value is 12.75 pts; and the permitted range of values is between 0 and 409 pts, where 0 pts is a hidden row. - -### Show/hide a row - -To set a worksheet''s row visibility, you can use the following code. The following example hides row number 10. - -```php -$objPHPExcel->getActiveSheet()->getRowDimension('10')->setVisible(false); -``` - -Note that if you apply active filters using an AutoFilter, then this will override any rows that you hide or unhide manually within that AutoFilter range if you save the file. - -### Group/outline a row - -To group/outline a row, you can use the following code: - -```php -$objPHPExcel->getActiveSheet()->getRowDimension('5')->setOutlineLevel(1); -``` - -You can also collapse the row. Note that you should also set the row invisible, otherwise the collapse will not be visible in Excel 2007. - -```php -$objPHPExcel->getActiveSheet()->getRowDimension('5')->setCollapsed(true); -$objPHPExcel->getActiveSheet()->getRowDimension('5')->setVisible(false); -``` - -Here's an example which collapses rows 50 to 80: - -```php -for ($i = 51; $i <= 80; $i++) { - $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, "FName $i"); - $objPHPExcel->getActiveSheet()->setCellValue('B' . $i, "LName $i"); - $objPHPExcel->getActiveSheet()->setCellValue('C' . $i, "PhoneNo $i"); - $objPHPExcel->getActiveSheet()->setCellValue('D' . $i, "FaxNo $i"); - $objPHPExcel->getActiveSheet()->setCellValue('E' . $i, true); - $objPHPExcel->getActiveSheet()->getRowDimension($i)->setOutlineLevel(1); - $objPHPExcel->getActiveSheet()->getRowDimension($i)->setVisible(false); -} - -$objPHPExcel->getActiveSheet()->getRowDimension(81)->setCollapsed(true); -``` - -You can instruct PHPExcel to add a summary below the collapsible rows (default), or above. The following code adds the summary above: - -```php -$objPHPExcel->getActiveSheet()->setShowSummaryBelow(false); -``` - -### Merge/unmerge cells - -If you have a big piece of data you want to display in a worksheet, you can merge two or more cells together, to become one cell. This can be done using the following code: - -```php -$objPHPExcel->getActiveSheet()->mergeCells('A18:E22'); -``` - -Removing a merge can be done using the unmergeCells method: - -```php -$objPHPExcel->getActiveSheet()->unmergeCells('A18:E22'); -``` - -### Inserting rows/columns - -You can insert/remove rows/columns at a specific position. The following code inserts 2 new rows, right before row 7: - -```php -$objPHPExcel->getActiveSheet()->insertNewRowBefore(7, 2); -``` - -### Add a drawing to a worksheet - -A drawing is always represented as a separate object, which can be added to a worksheet. Therefore, you must first instantiate a new PHPExcel_Worksheet_Drawing, and assign its properties a meaningful value: - -```php -$objDrawing = new PHPExcel_Worksheet_Drawing(); -$objDrawing->setName('Logo'); -$objDrawing->setDescription('Logo'); -$objDrawing->setPath('./images/officelogo.jpg'); -$objDrawing->setHeight(36); -``` - -To add the above drawing to the worksheet, use the following snippet of code. PHPExcel creates the link between the drawing and the worksheet: - -```php -$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); -``` - -You can set numerous properties on a drawing, here are some examples: - -```php -$objDrawing->setName('Paid'); -$objDrawing->setDescription('Paid'); -$objDrawing->setPath('./images/paid.png'); -$objDrawing->setCoordinates('B15'); -$objDrawing->setOffsetX(110); -$objDrawing->setRotation(25); -$objDrawing->getShadow()->setVisible(true); -$objDrawing->getShadow()->setDirection(45); -``` - -You can also add images created using GD functions without needing to save them to disk first as In-Memory drawings. - -```php -// Use GD to create an in-memory image -$gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); -$textColor = imagecolorallocate($gdImage, 255, 255, 255); -imagestring($gdImage, 1, 5, 5, 'Created with PHPExcel', $textColor); - -// Add the In-Memory image to a worksheet -$objDrawing = new PHPExcel_Worksheet_MemoryDrawing(); -$objDrawing->setName('In-Memory image 1'); -$objDrawing->setDescription('In-Memory image 1'); -$objDrawing->setCoordinates('A1'); -$objDrawing->setImageResource($gdImage); -$objDrawing->setRenderingFunction( - PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG -); -$objDrawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT); -$objDrawing->setHeight(36); -$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); -``` - -### Reading Images from a worksheet - -A commonly asked question is how to retrieve the images from a workbook that has been loaded, and save them as individual image files to disk. - -The following code extracts images from the current active worksheet, and writes each as a separate file. - -```php -$i = 0; -foreach ($objPHPExcel->getActiveSheet()->getDrawingCollection() as $drawing) { - if ($drawing instanceof PHPExcel_Worksheet_MemoryDrawing) { - ob_start(); - call_user_func( - $drawing->getRenderingFunction(), - $drawing->getImageResource() - ); - $imageContents = ob_get_contents(); - ob_end_clean(); - switch ($drawing->getMimeType()) { - case PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_PNG : - $extension = 'png'; - break; - case PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_GIF: - $extension = 'gif'; - break; - case PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_JPEG : - $extension = 'jpg'; - break; - } - } else { - $zipReader = fopen($drawing->getPath(),'r'); - $imageContents = ''; - while (!feof($zipReader)) { - $imageContents .= fread($zipReader,1024); - } - fclose($zipReader); - $extension = $drawing->getExtension(); - } - $myFileName = '00_Image_'.++$i.'.'.$extension; - file_put_contents($myFileName,$imageContents); -} -``` - -### Add rich text to a cell - -Adding rich text to a cell can be done using PHPExcel_RichText instances. Here''s an example, which creates the following rich text string: - - > This invoice is *__payable within thirty days after the end of the month__* unless specified otherwise on the invoice. - -```php -$objRichText = new PHPExcel_RichText(); -$objRichText->createText('This invoice is '); -$objPayable = $objRichText->createTextRun('payable within thirty days after the end of the month'); -$objPayable->getFont()->setBold(true); -$objPayable->getFont()->setItalic(true); -$objPayable->getFont()->setColor( new PHPExcel_Style_Color( PHPExcel_Style_Color::COLOR_DARKGREEN ) ); -$objRichText->createText(', unless specified otherwise on the invoice.'); -$objPHPExcel->getActiveSheet()->getCell('A18')->setValue($objRichText); -``` - -### Define a named range - -PHPExcel supports the definition of named ranges. These can be defined using the following code: - -```php -// Add some data -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Firstname:'); -$objPHPExcel->getActiveSheet()->setCellValue('A2', 'Lastname:'); -$objPHPExcel->getActiveSheet()->setCellValue('B1', 'Maarten'); -$objPHPExcel->getActiveSheet()->setCellValue('B2', 'Balliauw'); - -// Define named ranges -$objPHPExcel->addNamedRange( new PHPExcel_NamedRange('PersonFN', $objPHPExcel->getActiveSheet(), 'B1') ); -$objPHPExcel->addNamedRange( new PHPExcel_NamedRange('PersonLN', $objPHPExcel->getActiveSheet(), 'B2') ); -``` - -Optionally, a fourth parameter can be passed defining the named range local (i.e. only usable on the current worksheet). Named ranges are global by default. - -### Redirect output to a client's web browser - -Sometimes, one really wants to output a file to a client''s browser, especially when creating spreadsheets on-the-fly. There are some easy steps that can be followed to do this: - - 1. Create your PHPExcel spreadsheet - 2. Output HTTP headers for the type of document you wish to output - 3. Use the PHPExcel_Writer_* of your choice, and save to "php://output" - -PHPExcel_Writer_Excel2007 uses temporary storage when writing to php://output. By default, temporary files are stored in the script's working directory. When there is no access, it falls back to the operating system's temporary files location. - -__This may not be safe for unauthorized viewing!__ -Depending on the configuration of your operating system, temporary storage can be read by anyone using the same temporary storage folder. When confidentiality of your document is needed, it is recommended not to use php://output. - -#### HTTP headers - -Example of a script redirecting an Excel 2007 file to the client's browser: - -```php -/* Here there will be some code where you create $objPHPExcel */ - -// redirect output to client browser -header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); -header('Content-Disposition: attachment;filename="myfile.xlsx"'); -header('Cache-Control: max-age=0'); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save('php://output'); -``` - -Example of a script redirecting an Excel5 file to the client's browser: - -```php -/* Here there will be some code where you create $objPHPExcel */ - -// redirect output to client browser -header('Content-Type: application/vnd.ms-excel'); -header('Content-Disposition: attachment;filename="myfile.xls"'); -header('Cache-Control: max-age=0'); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save('php://output'); -``` - -**Caution:** - -Make sure not to include any echo statements or output any other contents than the Excel file. There should be no whitespace before the opening <?php tag and at most one line break after the closing ?> tag (which can also be omitted to avoid problems). Make sure that your script is saved without a BOM (Byte-order mark) because this counts as echoing output. The same things apply to all included files. -Failing to follow the above guidelines may result in corrupt Excel files arriving at the client browser, and/or that headers cannot be set by PHP (resulting in warning messages). - -### Setting the default column width - -Default column width can be set using the following code: - -```php -$objPHPExcel->getActiveSheet()->getDefaultColumnDimension()->setWidth(12); -``` - -### Setting the default row height - -Default row height can be set using the following code: - -```php -$objPHPExcel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(15); -``` - -### Add a GD drawing to a worksheet - -There might be a situation where you want to generate an in-memory image using GD and add it to a PHPExcel worksheet without first having to save this file to a temporary location. - -Here''s an example which generates an image in memory and adds it to the active worksheet: - -```php -// Generate an image -$gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); -$textColor = imagecolorallocate($gdImage, 255, 255, 255); -imagestring($gdImage, 1, 5, 5, 'Created with PHPExcel', $textColor); - -// Add a drawing to the worksheet -$objDrawing = new PHPExcel_Worksheet_MemoryDrawing(); -$objDrawing->setName('Sample image'); -$objDrawing->setDescription('Sample image'); -$objDrawing->setImageResource($gdImage); -$objDrawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG); -$objDrawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT); -$objDrawing->setHeight(36); -$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); -``` - -### Setting worksheet zoom level - -To set a worksheet's zoom level, the following code can be used: - -```php -$objPHPExcel->getActiveSheet()->getSheetView()->setZoomScale(75); -``` - -Note that zoom level should be in range 10 – 400. - -### Sheet tab color - -Sometimes you want to set a color for sheet tab. For example you can have a red sheet tab: - -```php -$objWorksheet->getTabColor()->setRGB('FF0000'); -``` - -### Creating worksheets in a workbook - -If you need to create more worksheets in the workbook, here is how: - -```php -$objWorksheet1 = $objPHPExcel->createSheet(); -$objWorksheet1->setTitle('Another sheet'); -``` - -Think of createSheet() as the "Insert sheet" button in Excel. When you hit that button a new sheet is appended to the existing collection of worksheets in the workbook. - -### Hidden worksheets (Sheet states) - -Set a worksheet to be __hidden__ using this code: - -```php -$objPHPExcel->getActiveSheet() - ->setSheetState(PHPExcel_Worksheet::SHEETSTATE_HIDDEN); -``` - -Sometimes you may even want the worksheet to be __"very hidden"__. The available sheet states are : - - - PHPExcel_Worksheet::SHEETSTATE_VISIBLE - - PHPExcel_Worksheet::SHEETSTATE_HIDDEN - - PHPExcel_Worksheet::SHEETSTATE_VERYHIDDEN - -In Excel the sheet state "very hidden" can only be set programmatically, e.g. with Visual Basic Macro. It is not possible to make such a sheet visible via the user interface. - -### Right-to-left worksheet - -Worksheets can be set individually whether column "A" should start at left or right side. Default is left. Here is how to set columns from right-to-left. - -```php -// right-to-left worksheet -$objPHPExcel->getActiveSheet() - ->setRightToLeft(true); -``` - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/09-Calculation-Engine.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/09-Calculation-Engine.md deleted file mode 100644 index c13a18c..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/09-Calculation-Engine.md +++ /dev/null @@ -1,52 +0,0 @@ -# PHPExcel Developer Documentation - -## Using the PHPExcel calculation engine - -### Performing formula calculations - -As PHPExcel represents an in-memory spreadsheet, it also offers formula calculation capabilities. A cell can be of a value type (containing a number or text), or a formula type (containing a formula which can be evaluated). For example, the formula "=SUM(A1:A10)" evaluates to the sum of values in A1, A2, ..., A10. - -To calculate a formula, you can call the cell containing the formula’s method getCalculatedValue(), for example: - -```php -$objPHPExcel->getActiveSheet()->getCell('E11')->getCalculatedValue(); -``` -If you write the following line of code in the invoice demo included with PHPExcel, it evaluates to the value "64": - -![09-command-line-calculation.png](./images/09-command-line-calculation.png "") - -Another nice feature of PHPExcel's formula parser, is that it can automatically adjust a formula when inserting/removing rows/columns. Here's an example: - -![09-formula-in-cell-1.png](./images/09-formula-in-cell-1.png "") - -You see that the formula contained in cell E11 is "SUM(E4:E9)". Now, when I write the following line of code, two new product lines are added: - -```php -$objPHPExcel->getActiveSheet()->insertNewRowBefore(7, 2); -``` - -![09-formula-in-cell-2.png](./images/09-formula-in-cell-2.png "") - -Did you notice? The formula in the former cell E11 (now E13, as I inserted 2 new rows), changed to "SUM(E4:E11)". Also, the inserted cells duplicate style information of the previous cell, just like Excel's behaviour. Note that you can both insert rows and columns. - -### Known limitations - -There are some known limitations to the PHPExcel calculation engine. Most of them are due to the fact that an Excel formula is converted into PHP code before being executed. This means that Excel formula calculation is subject to PHP's language characteristics. - -#### Operator precedence - -In Excel '+' wins over '&', just like '*' wins over '+' in ordinary algebra. The former rule is not what one finds using the calculation engine shipped with PHPExcel. - -Reference for operator precedence in Excel: [http://support.microsoft.com/kb/25189][18] - -Reference for operator precedence in PHP: [http://www.php.net/operators][19] - -#### Formulas involving numbers and text - -Formulas involving numbers and text may produce unexpected results or even unreadable file contents. For example, the formula '=3+"Hello "' is expected to produce an error in Excel (#VALUE!). Due to the fact that PHP converts “Hello” to a numeric value (zero), the result of this formula is evaluated as 3 instead of evaluating as an error. This also causes the Excel document being generated as containing unreadable content. - -Reference for this behaviour in PHP: [http://be.php.net/manual/en/language.types.string.php#language.types.string.conversion][20] - - [18]: http://support.microsoft.com/kb/25189 - [19]: http://www.php.net/operators - [20]: http://be.php.net/manual/en/language.types.string.php#language.types.string.conversion diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/10-Reading-and-Writing.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/10-Reading-and-Writing.md deleted file mode 100644 index 1468abc..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/10-Reading-and-Writing.md +++ /dev/null @@ -1,714 +0,0 @@ -# PHPExcel Developer Documentation - -## Reading and writing to file - -As you already know from part REF _Ref191885438 \w \h 3.3 REF _Ref191885438 \h Readers and writers, reading and writing to a persisted storage is not possible using the base PHPExcel classes. For this purpose, PHPExcel provides readers and writers, which are implementations of PHPExcel_Writer_IReader and PHPExcel_Writer_IWriter. - -### PHPExcel_IOFactory - -The PHPExcel API offers multiple methods to create a PHPExcel_Writer_IReader or PHPExcel_Writer_IWriter instance: - -Direct creation via PHPExcel_IOFactory. All examples underneath demonstrate the direct creation method. Note that you can also use the PHPExcel_IOFactory class to do this. - -#### Creating PHPExcel_Reader_IReader using PHPExcel_IOFactory - -There are 2 methods for reading in a file into PHPExcel: using automatic file type resolving or explicitly. - -Automatic file type resolving checks the different PHPExcel_Reader_IReader distributed with PHPExcel. If one of them can load the specified file name, the file is loaded using that PHPExcel_Reader_IReader. Explicit mode requires you to specify which PHPExcel_Reader_IReader should be used. - -You can create a PHPExcel_Reader_IReader instance using PHPExcel_IOFactory in automatic file type resolving mode using the following code sample: - -```php -$objPHPExcel = PHPExcel_IOFactory::load("05featuredemo.xlsx"); -``` - -A typical use of this feature is when you need to read files uploaded by your users, and you don’t know whether they are uploading xls or xlsx files. - -If you need to set some properties on the reader, (e.g. to only read data, see more about this later), then you may instead want to use this variant: - -```php -$objReader = PHPExcel_IOFactory::createReaderForFile("05featuredemo.xlsx"); -$objReader->setReadDataOnly(true); -$objReader->load("05featuredemo.xlsx"); -``` - -You can create a PHPExcel_Reader_IReader instance using PHPExcel_IOFactory in explicit mode using the following code sample: - -```php -$objReader = PHPExcel_IOFactory::createReader("Excel2007"); -$objPHPExcel = $objReader->load("05featuredemo.xlsx"); -``` - -Note that automatic type resolving mode is slightly slower than explicit mode. - -#### Creating PHPExcel_Writer_IWriter using PHPExcel_IOFactory - -You can create a PHPExcel_Writer_Iwriter instance using PHPExcel_IOFactory: - -```php -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel2007"); -$objWriter->save("05featuredemo.xlsx"); -``` - -### Excel 2007 (SpreadsheetML) file format - -Excel2007 file format is the main file format of PHPExcel. It allows outputting the in-memory spreadsheet to a .xlsx file. - -#### PHPExcel_Reader_Excel2007 - -##### Reading a spreadsheet - -You can read an .xlsx file using the following code: - -```php -$objReader = new PHPExcel_Reader_Excel2007(); -$objPHPExcel = $objReader->load("05featuredemo.xlsx"); -``` - -##### Read data only - -You can set the option setReadDataOnly on the reader, to instruct the reader to ignore styling, data validation, … and just read cell data: - -```php -$objReader = new PHPExcel_Reader_Excel2007(); -$objReader->setReadDataOnly(true); -$objPHPExcel = $objReader->load("05featuredemo.xlsx"); -``` - -##### Read specific sheets only - -You can set the option setLoadSheetsOnly on the reader, to instruct the reader to only load the sheets with a given name: - -```php -$objReader = new PHPExcel_Reader_Excel2007(); -$objReader->setLoadSheetsOnly( array("Sheet 1", "My special sheet") ); -$objPHPExcel = $objReader->load("05featuredemo.xlsx"); -``` - -##### Read specific cells only - -You can set the option setReadFilter on the reader, to instruct the reader to only load the cells which match a given rule. A read filter can be any class which implements PHPExcel_Reader_IReadFilter. By default, all cells are read using the PHPExcel_Reader_DefaultReadFilter. - -The following code will only read row 1 and rows 20 – 30 of any sheet in the Excel file: - -```php -class MyReadFilter implements PHPExcel_Reader_IReadFilter { - - public function readCell($column, $row, $worksheetName = '') { - // Read title row and rows 20 - 30 - if ($row == 1 || ($row >= 20 && $row <= 30)) { - return true; - } - return false; - } -} - -$objReader = new PHPExcel_Reader_Excel2007(); -$objReader->setReadFilter( new MyReadFilter() ); -$objPHPExcel = $objReader->load("06largescale.xlsx"); -``` - -#### PHPExcel_Writer_Excel2007 - -##### Writing a spreadsheet - -You can write an .xlsx file using the following code: - -```php -$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); -$objWriter->save("05featuredemo.xlsx"); -``` - -##### Formula pre-calculation - -By default, this writer pre-calculates all formulas in the spreadsheet. This can be slow on large spreadsheets, and maybe even unwanted. You can however disable formula pre-calculation: - -```php -$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); -$objWriter->setPreCalculateFormulas(false); -$objWriter->save("05featuredemo.xlsx"); -``` - -##### Office 2003 compatibility pack - -Because of a bug in the Office2003 compatibility pack, there can be some small issues when opening Excel2007 spreadsheets (mostly related to formula calculation). You can enable Office2003 compatibility with the following code: - -``` -$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); -$objWriter->setOffice2003Compatibility(true); -$objWriter->save("05featuredemo.xlsx"); -``` - -__Office2003 compatibility should only be used when needed__ -Office2003 compatibility option should only be used when needed. This option disables several Office2007 file format options, resulting in a lower-featured Office2007 spreadsheet when this option is used. - -### Excel 5 (BIFF) file format - -Excel5 file format is the old Excel file format, implemented in PHPExcel to provide a uniform manner to create both .xlsx and .xls files. It is basically a modified version of [PEAR Spreadsheet_Excel_Writer][21], although it has been extended and has fewer limitations and more features than the old PEAR library. This can read all BIFF versions that use OLE2: BIFF5 (introduced with office 95) through BIFF8, but cannot read earlier versions. - -Excel5 file format will not be developed any further, it just provides an additional file format for PHPExcel. - -__Excel5 (BIFF) limitations__ -Please note that BIFF file format has some limits regarding to styling cells and handling large spreadsheets via PHP. - -#### PHPExcel_Reader_Excel5 - -##### Reading a spreadsheet - -You can read an .xls file using the following code: - -```php -$objReader = new PHPExcel_Reader_Excel5(); -$objPHPExcel = $objReader->load("05featuredemo.xls"); -``` - -##### Read data only - -You can set the option setReadDataOnly on the reader, to instruct the reader to ignore styling, data validation, … and just read cell data: - -```php -$objReader = new PHPExcel_Reader_Excel5(); -$objReader->setReadDataOnly(true); -$objPHPExcel = $objReader->load("05featuredemo.xls"); -``` - -##### Read specific sheets only - -You can set the option setLoadSheetsOnly on the reader, to instruct the reader to only load the sheets with a given name: - -```php -$objReader = new PHPExcel_Reader_Excel5(); -$objReader->setLoadSheetsOnly( array("Sheet 1", "My special sheet") ); -$objPHPExcel = $objReader->load("05featuredemo.xls"); -``` - -##### Read specific cells only - -You can set the option setReadFilter on the reader, to instruct the reader to only load the cells which match a given rule. A read filter can be any class which implements PHPExcel_Reader_IReadFilter. By default, all cells are read using the PHPExcel_Reader_DefaultReadFilter. - -The following code will only read row 1 and rows 20 to 30 of any sheet in the Excel file: - -```php -class MyReadFilter implements PHPExcel_Reader_IReadFilter { - - public function readCell($column, $row, $worksheetName = '') { - // Read title row and rows 20 - 30 - if ($row == 1 || ($row >= 20 && $row <= 30)) { - return true; - } - return false; - } -} - -$objReader = new PHPExcel_Reader_Excel5(); -$objReader->setReadFilter( new MyReadFilter() ); -$objPHPExcel = $objReader->load("06largescale.xls"); -``` - -#### PHPExcel_Writer_Excel5 - -##### Writing a spreadsheet - -You can write an .xls file using the following code: - -```php -$objWriter = new PHPExcel_Writer_Excel5($objPHPExcel); -$objWriter->save("05featuredemo.xls"); -``` - -### Excel 2003 XML file format - -Excel 2003 XML file format is a file format which can be used in older versions of Microsoft Excel. - -__Excel 2003 XML limitations__ -Please note that Excel 2003 XML format has some limits regarding to styling cells and handling large spreadsheets via PHP. - -#### PHPExcel_Reader_Excel2003XML - -##### Reading a spreadsheet - -You can read an Excel 2003 .xml file using the following code: - -```php -$objReader = new PHPExcel_Reader_Excel2003XML(); -$objPHPExcel = $objReader->load("05featuredemo.xml"); -``` - -##### Read specific cells only - -You can set the option setReadFilter on the reader, to instruct the reader to only load the cells which match a given rule. A read filter can be any class which implements PHPExcel_Reader_IReadFilter. By default, all cells are read using the PHPExcel_Reader_DefaultReadFilter. - -The following code will only read row 1 and rows 20 to 30 of any sheet in the Excel file: - -```php -class MyReadFilter implements PHPExcel_Reader_IReadFilter { - - public function readCell($column, $row, $worksheetName = '') { - // Read title row and rows 20 - 30 - if ($row == 1 || ($row >= 20 && $row <= 30)) { - return true; - } - return false; - } - -} - -$objReader = new PHPExcel_Reader_Excel2003XML(); -$objReader->setReadFilter( new MyReadFilter() ); -$objPHPExcel = $objReader->load("06largescale.xml"); -``` - -### Symbolic LinK (SYLK) - -Symbolic Link (SYLK) is a Microsoft file format typically used to exchange data between applications, specifically spreadsheets. SYLK files conventionally have a .slk suffix. Composed of only displayable ANSI characters, it can be easily created and processed by other applications, such as databases. - -__SYLK limitations__ -Please note that SYLK file format has some limits regarding to styling cells and handling large spreadsheets via PHP. - -#### PHPExcel_Reader_SYLK - -##### Reading a spreadsheet - -You can read an .slk file using the following code: - -```php -$objReader = new PHPExcel_Reader_SYLK(); -$objPHPExcel = $objReader->load("05featuredemo.slk"); -``` - -##### Read specific cells only - -You can set the option setReadFilter on the reader, to instruct the reader to only load the cells which match a given rule. A read filter can be any class which implements PHPExcel_Reader_IReadFilter. By default, all cells are read using the PHPExcel_Reader_DefaultReadFilter. - -The following code will only read row 1 and rows 20 to 30 of any sheet in the SYLK file: - -```php -class MyReadFilter implements PHPExcel_Reader_IReadFilter { - - public function readCell($column, $row, $worksheetName = '') { - // Read title row and rows 20 - 30 - if ($row == 1 || ($row >= 20 && $row <= 30)) { - return true; - } - return false; - } - -} - -$objReader = new PHPExcel_Reader_SYLK(); -$objReader->setReadFilter( new MyReadFilter() ); -$objPHPExcel = $objReader->load("06largescale.slk"); -``` - -### Open/Libre Office (.ods) - -Open Office or Libre Office .ods files are the standard file format for Open Office or Libre Office Calc files. - -#### PHPExcel_Reader_OOCalc - -##### Reading a spreadsheet - -You can read an .ods file using the following code: - -```php -$objReader = new PHPExcel_Reader_OOCalc(); -$objPHPExcel = $objReader->load("05featuredemo.ods"); -``` - -##### Read specific cells only - -You can set the option setReadFilter on the reader, to instruct the reader to only load the cells which match a given rule. A read filter can be any class which implements PHPExcel_Reader_IReadFilter. By default, all cells are read using the PHPExcel_Reader_DefaultReadFilter. - -The following code will only read row 1 and rows 20 to 30 of any sheet in the Calc file: - -```php -class MyReadFilter implements PHPExcel_Reader_IReadFilter { - - public function readCell($column, $row, $worksheetName = '') { - // Read title row and rows 20 - 30 - if ($row == 1 || ($row >= 20 && $row <= 30)) { - return true; - } - return false; - } - -} - -$objReader = new PHPExcel_Reader_OOcalc(); -$objReader->setReadFilter( new MyReadFilter() ); -$objPHPExcel = $objReader->load("06largescale.ods"); -``` - -### CSV (Comma Separated Values) - -CSV (Comma Separated Values) are often used as an import/export file format with other systems. PHPExcel allows reading and writing to CSV files. - -__CSV limitations__ -Please note that CSV file format has some limits regarding to styling cells, number formatting, ... - -#### PHPExcel_Reader_CSV - -##### Reading a CSV file - -You can read a .csv file using the following code: - -```php -$objReader = new PHPExcel_Reader_CSV(); -$objPHPExcel = $objReader->load("sample.csv"); -``` - -##### Setting CSV options - -Often, CSV files are not really “comma separated”, or use semicolon (;) as a separator. You can instruct PHPExcel_Reader_CSV some options before reading a CSV file. - -Note that PHPExcel_Reader_CSV by default assumes that the loaded CSV file is UTF-8 encoded. If you are reading CSV files that were created in Microsoft Office Excel the correct input encoding may rather be Windows-1252 (CP1252). Always make sure that the input encoding is set appropriately. - -```php -$objReader = new PHPExcel_Reader_CSV(); -$objReader->setInputEncoding('CP1252'); -$objReader->setDelimiter(';'); -$objReader->setEnclosure(''); -$objReader->setLineEnding("\r\n"); -$objReader->setSheetIndex(0); - -$objPHPExcel = $objReader->load("sample.csv"); -``` - -##### Read a specific worksheet - -CSV files can only contain one worksheet. Therefore, you can specify which sheet to read from CSV: - -```php -$objReader->setSheetIndex(0); -``` - -##### Read into existing spreadsheet - -When working with CSV files, it might occur that you want to import CSV data into an existing PHPExcel object. The following code loads a CSV file into an existing $objPHPExcel containing some sheets, and imports onto the 6th sheet: - -```php -$objReader = new PHPExcel_Reader_CSV(); -$objReader->setDelimiter(';'); -$objReader->setEnclosure(''); -$objReader->setLineEnding("\r\n"); -$objReader->setSheetIndex(5); - -$objReader->loadIntoExisting("05featuredemo.csv", $objPHPExcel); -``` - -#### PHPExcel_Writer_CSV - -##### Writing a CSV file - -You can write a .csv file using the following code: - -```php -$objWriter = new PHPExcel_Writer_CSV($objPHPExcel); -$objWriter->save("05featuredemo.csv"); -``` - -##### Setting CSV options - -Often, CSV files are not really “comma separated”, or use semicolon (;) as a separator. You can instruct PHPExcel_Writer_CSV some options before writing a CSV file: - -```php -$objWriter = new PHPExcel_Writer_CSV($objPHPExcel); -$objWriter->setDelimiter(';'); -$objWriter->setEnclosure(''); -$objWriter->setLineEnding("\r\n"); -$objWriter->setSheetIndex(0); - -$objWriter->save("05featuredemo.csv"); -``` - -##### Write a specific worksheet - -CSV files can only contain one worksheet. Therefore, you can specify which sheet to write to CSV: - -```php -$objWriter->setSheetIndex(0); -``` - -##### Formula pre-calculation - -By default, this writer pre-calculates all formulas in the spreadsheet. This can be slow on large spreadsheets, and maybe even unwanted. You can however disable formula pre-calculation: - -```php -$objWriter = new PHPExcel_Writer_CSV($objPHPExcel); -$objWriter->setPreCalculateFormulas(false); -$objWriter->save("05featuredemo.csv"); -``` - -##### Writing UTF-8 CSV files - -A CSV file can be marked as UTF-8 by writing a BOM file header. This can be enabled by using the following code: - -```php -$objWriter = new PHPExcel_Writer_CSV($objPHPExcel); -$objWriter->setUseBOM(true); -$objWriter->save("05featuredemo.csv"); -``` - -##### Decimal and thousands separators - -If the worksheet you are exporting contains numbers with decimal or thousands separators then you should think about what characters you want to use for those before doing the export. - -By default PHPExcel looks up in the server's locale settings to decide what characters to use. But to avoid problems it is recommended to set the characters explicitly as shown below. - -English users will want to use this before doing the export: - -```php -PHPExcel_Shared_String::setDecimalSeparator('.'); -PHPExcel_Shared_String::setThousandsSeparator(','); -``` - -German users will want to use the opposite values. - -```php -PHPExcel_Shared_String::setDecimalSeparator(','); -PHPExcel_Shared_String::setThousandsSeparator('.'); -``` - -Note that the above code sets decimal and thousand separators as global options. This also affects how HTML and PDF is exported. - -### HTML - -PHPExcel allows you to read or write a spreadsheet as HTML format, for quick representation of the data in it to anyone who does not have a spreadsheet application on their PC, or loading files saved by other scripts that simply create HTML markup and give it a .xls file extension. - -__HTML limitations__ -Please note that HTML file format has some limits regarding to styling cells, number formatting, ... - -#### PHPExcel_Reader_HTML - -##### Reading a spreadsheet - -You can read an .html or .htm file using the following code: - -```php -$objReader = new PHPExcel_Reader_HTML(); - -$objPHPExcel = $objReader->load("05featuredemo.html"); -``` - -__HTML limitations__ -Please note that HTML reader is still experimental and does not yet support merged cells or nested tables cleanly - -#### PHPExcel_Writer_HTML - -Please note that PHPExcel_Writer_HTML only outputs the first worksheet by default. - -##### Writing a spreadsheet - -You can write a .htm file using the following code: - -```php -$objWriter = new PHPExcel_Writer_HTML($objPHPExcel); - -$objWriter->save("05featuredemo.htm"); -``` - -##### Write all worksheets - -HTML files can contain one or more worksheets. If you want to write all sheets into a single HTML file, use the following code: - -```php -$objWriter->writeAllSheets(); -``` - -##### Write a specific worksheet - -HTML files can contain one or more worksheets. Therefore, you can specify which sheet to write to HTML: - -```php -$objWriter->setSheetIndex(0); -``` - -##### Setting the images root of the HTML file - -There might be situations where you want to explicitly set the included images root. For example, one might want to see -```html -<img style="position: relative; left: 0px; top: 0px; width: 140px; height: 78px;" src="http://www.domain.com/*images/logo.jpg" border="0"> -``` - -instead of - -```html -<img style="position: relative; left: 0px; top: 0px; width: 140px; height: 78px;" src="./images/logo.jpg" border="0">. -``` - -You can use the following code to achieve this result: - -```php -$objWriter->setImagesRoot('http://www.example.com'); -``` - -##### Formula pre-calculation - -By default, this writer pre-calculates all formulas in the spreadsheet. This can be slow on large spreadsheets, and maybe even unwanted. You can however disable formula pre-calculation: - -```php -$objWriter = new PHPExcel_Writer_HTML($objPHPExcel); -$objWriter->setPreCalculateFormulas(false); - -$objWriter->save("05featuredemo.htm"); -``` - -##### Embedding generated HTML in a web page - -There might be a situation where you want to embed the generated HTML in an existing website. PHPExcel_Writer_HTML provides support to generate only specific parts of the HTML code, which allows you to use these parts in your website. - -Supported methods: - - - generateHTMLHeader() - - generateStyles() - - generateSheetData() - - generateHTMLFooter() - -Here's an example which retrieves all parts independently and merges them into a resulting HTML page: - -```php -<?php -$objWriter = new PHPExcel_Writer_HTML($objPHPExcel); -echo $objWriter->generateHTMLHeader(); -?> - -<style> -<!-- -html { - font-family: Times New Roman; - font-size: 9pt; - background-color: white; -} - -<?php -echo $objWriter->generateStyles(false); // do not write <style> and </style> -?> - ---> -</style> - -<?php -echo $objWriter->generateSheetData(); -echo $objWriter->generateHTMLFooter(); -?> -``` - -##### Writing UTF-8 HTML files - -A HTML file can be marked as UTF-8 by writing a BOM file header. This can be enabled by using the following code: - -```php -$objWriter = new PHPExcel_Writer_HTML($objPHPExcel); -$objWriter->setUseBOM(true); - -$objWriter->save("05featuredemo.htm"); -``` - -##### Decimal and thousands separators - -See section PHPExcel_Writer_CSV how to control the appearance of these. - -### PDF - -PHPExcel allows you to write a spreadsheet into PDF format, for fast distribution of represented data. - -__PDF limitations__ -Please note that PDF file format has some limits regarding to styling cells, number formatting, ... - -#### PHPExcel_Writer_PDF - -PHPExcel’s PDF Writer is a wrapper for a 3rd-Party PDF Rendering library such as tcPDF, mPDF or DomPDF. Prior to version 1.7.8 of PHPExcel, the tcPDF library was bundled with PHPExcel; but from version 1.7.8 this was removed. Instead, you must now install a PDF Rendering library yourself; but PHPExcel will work with a number of different libraries. - -Currently, the following libraries are supported: - -Library | Version used for testing | Downloadable from | PHPExcel Internal Constant ---------|--------------------------|----------------------------------|---------------------------- -tcPDF | 5.9 | http://www.tcpdf.org/ | PDF_RENDERER_TCPDF -mPDF | 5.4 | http://www.mpdf1.com/mpdf/ | PDF_RENDERER_MPDF -domPDF | 0.6.0 beta 3 | http://code.google.com/p/dompdf/ | PDF_RENDERER_DOMPDF - -The different libraries have different strengths and weaknesses. Some generate better formatted output than others, some are faster or use less memory than others, while some generate smaller .pdf files. It is the developers choice which one they wish to use, appropriate to their own circumstances. - -Before instantiating a Writer to generate PDF output, you will need to indicate which Rendering library you are using, and where it is located. - -```php -$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF; -$rendererLibrary = 'mPDF5.4'; -$rendererLibraryPath = dirname(__FILE__).'/../../../libraries/PDF/' . $rendererLibrary; - -if (!PHPExcel_Settings::setPdfRenderer( - $rendererName, - $rendererLibraryPath - )) { - die( - 'Please set the $rendererName and $rendererLibraryPath values' . - PHP_EOL . - ' as appropriate for your directory structure' - ); -} -``` - -##### Writing a spreadsheet - -Once you have identified the Renderer that you wish to use for PDF generation, you can write a .pdf file using the following code: - -```php -$objWriter = new PHPExcel_Writer_PDF($objPHPExcel); -$objWriter->save("05featuredemo.pdf"); -``` - -Please note that PHPExcel_Writer_PDF only outputs the first worksheet by default. - -##### Write all worksheets - -PDF files can contain one or more worksheets. If you want to write all sheets into a single PDF file, use the following code: - -```php -$objWriter->writeAllSheets(); -``` - -##### Write a specific worksheet - -PDF files can contain one or more worksheets. Therefore, you can specify which sheet to write to PDF: - -```php -$objWriter->setSheetIndex(0); -``` - -##### Formula pre-calculation - -By default, this writer pre-calculates all formulas in the spreadsheet. This can be slow on large spreadsheets, and maybe even unwanted. You can however disable formula pre-calculation: - -```php -$objWriter = new PHPExcel_Writer_PDF($objPHPExcel); -$objWriter->setPreCalculateFormulas(false); - -$objWriter->save("05featuredemo.pdf"); -``` - -##### Decimal and thousands separators - -See section PHPExcel_Writer_CSV how to control the appearance of these. - -### Generating Excel files from templates (read, modify, write) - -Readers and writers are the tools that allow you to generate Excel files from templates. This requires less coding effort than generating the Excel file from scratch, especially if your template has many styles, page setup properties, headers etc. - -Here is an example how to open a template file, fill in a couple of fields and save it again: - -```php -$objPHPexcel = PHPExcel_IOFactory::load('template.xlsx'); - -$objWorksheet = $objPHPexcel->getActiveSheet(); - -$objWorksheet->getCell('A1')->setValue('John'); -$objWorksheet->getCell('A2')->setValue('Smith'); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPexcel, 'Excel5'); -$objWriter->save('write.xls'); -``` - -Notice that it is ok to load an xlsx file and generate an xls file. - - [21]: http://pear.php.net/package/Spreadsheet_Excel_Writer - [22]: http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=Credits&referringTitle=Home diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/11-Appendices.md b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/11-Appendices.md deleted file mode 100644 index 1302feb..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/11-Appendices.md +++ /dev/null @@ -1,100 +0,0 @@ -# PHPExcel Developer Documentation - -## Credits - -Please refer to the internet page [http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=Credits&referringTitle=Home][22] for up-to-date credits. - -## Valid array keys for style applyFromArray() - -The following table lists the valid array keys for PHPExcel_Style applyFromArray() classes. If the "Maps to property" column maps a key to a setter, the value provided for that key will be applied directly. If the "Maps to property" column maps a key to a getter, the value provided for that key will be applied as another style array. - -__PHPExcel_Style__ - - Array key | Maps to property - -------------|------------------- - fill | getFill() - font | getFont() - borders | getBorders() - alignment | getAlignment() - numberformat | getNumberFormat() - protection | getProtection() - - -__PHPExcel_Style_Fill__ - - Array key | Maps to property - -----------|------------------- - type | setFillType() - rotation | setRotation() - startcolor | getStartColor() - endcolor | getEndColor() - color | getStartColor() - - -__PHPExcel_Style_Font__ - - Array key | Maps to property - ------------|------------------- - name | setName() - bold | setBold() - italic | setItalic() - underline | setUnderline() - strike | setStrikethrough() - color | getColor() - size | setSize() - superScript | setSuperScript() - subScript | setSubScript() - - -__PHPExcel_Style_Borders__ - - Array key | Maps to property - ------------------|------------------- - allborders | getLeft(); getRight(); getTop(); getBottom() - left | getLeft() - right | getRight() - top | getTop() - bottom | getBottom() - diagonal | getDiagonal() - vertical | getVertical() - horizontal | getHorizontal() - diagonaldirection | setDiagonalDirection() - outline | setOutline() - - -__PHPExcel_Style_Border__ - - Array key | Maps to property - ----------|------------------- - style | setBorderStyle() - color | getColor() - - -__PHPExcel_Style_Alignment__ - - Array key | Maps to property - ------------|------------------- - horizontal | setHorizontal() - vertical | setVertical() - rotation | setTextRotation() - wrap | setWrapText() - shrinkToFit | setShrinkToFit() - indent | setIndent() - - -__PHPExcel_Style_NumberFormat__ - - Array key | Maps to property - ----------|------------------- - code | setFormatCode() - - -__PHPExcel_Style_Protection__ - - Array key | Maps to property - ----------|------------------- - locked | setLocked() - hidden | setHidden() - - - [22]: http://www.codeplex.com/PHPExcel/Wiki/View.aspx?title=Credits&referringTitle=Home diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/01-schematic.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/01-schematic.png deleted file mode 100644 index 8b67792..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/01-schematic.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/02-readers-writers.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/02-readers-writers.png deleted file mode 100644 index 0600788..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/02-readers-writers.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-1.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-1.png deleted file mode 100644 index 30d1936..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-1.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-2.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-2.png deleted file mode 100644 index e2b6850..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-2.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-3.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-3.png deleted file mode 100644 index 459261f..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-3.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-4.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-4.png deleted file mode 100644 index 7072545..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/07-simple-example-4.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-cell-comment.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-cell-comment.png deleted file mode 100644 index bd8f8e6..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-cell-comment.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-column-width.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-column-width.png deleted file mode 100644 index 1419943..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-column-width.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-page-setup-margins.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-page-setup-margins.png deleted file mode 100644 index 36e07a9..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-page-setup-margins.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-page-setup-scaling-options.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-page-setup-scaling-options.png deleted file mode 100644 index 80fb5f0..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-page-setup-scaling-options.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-styling-border-options.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-styling-border-options.png deleted file mode 100644 index 4ef5970..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/08-styling-border-options.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-command-line-calculation.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-command-line-calculation.png deleted file mode 100644 index ceb2b30..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-command-line-calculation.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-formula-in-cell-1.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-formula-in-cell-1.png deleted file mode 100644 index e50c6cc..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-formula-in-cell-1.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-formula-in-cell-2.png b/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-formula-in-cell-2.png deleted file mode 100644 index 46daf09..0000000 Binary files a/vendor/phpoffice/phpexcel/Documentation/markdown/Overview/images/09-formula-in-cell-2.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/01-File-Formats.md b/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/01-File-Formats.md deleted file mode 100644 index d891664..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/01-File-Formats.md +++ /dev/null @@ -1,60 +0,0 @@ -# PHPExcel User Documentation – Reading Spreadsheet Files - - -## Spreadsheet File Formats - -PHPExcel can read a number of different spreadsheet and file formats, although not all features are supported by all of the readers. Check the Functionality Cross-Reference document (Functionality Cross-Reference.xls) for a list that identifies which features are supported by which readers. - -Currently, PHPExcel supports the following File Types for Reading: - -### Excel5 - -The Microsoft Excel™ Binary file format (BIFF5 and BIFF8) is a binary file format that was used by Microsoft Excel™ between versions 95 and 2003. The format is supported (to various extents) by most spreadsheet programs. BIFF files normally have an extension of .xls. Documentation describing the format can be found online at [http://msdn.microsoft.com/en-us/library/cc313154(v=office.12).aspx][1] or from [http://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/[MS-XLS].pdf][2] (as a downloadable PDF). - -### Excel2003XML - -Microsoft Excel™ 2003 included options for a file format called SpreadsheetML. This file is a zipped XML document. It is not very common, but its core features are supported. Documentation for the format can be found at [http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx][3] though it’s sadly rather sparse in its detail. - -### Excel2007 - -Microsoft Excel™ 2007 shipped with a new file format, namely Microsoft Office Open XML SpreadsheetML, and Excel 2010 extended this still further with its new features such as sparklines. These files typically have an extension of .xlsx. This format is based around a zipped collection of eXtensible Markup Language (XML) files. Microsoft Office Open XML SpreadsheetML is mostly standardized in ECMA 376 ([http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm][4]) and ISO 29500. - -### OOCalc - -aka Open Document Format (ODF) or OASIS, this is the OpenOffice.org XML File Format for spreadsheets. It comprises a zip archive including several components all of which are text files, most of these with markup in the eXtensible Markup Language (XML). It is the standard file format for OpenOffice.org Calc and StarCalc, and files typically have an extension of .ods. The published specification for the file format is available from the OASIS Open Office XML Format Technical Committee web page ([http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office#technical][5]). Other information is available from the OpenOffice.org XML File Format web page ([http://xml.openoffice.org/general.html][6]), part of the OpenOffice.org project. - -### SYLK - -This is the Microsoft Multiplan Symbolic Link Interchange (SYLK) file format. Multiplan was a predecessor to Microsoft Excel™. Files normally have an extension of .slk. While not common, there are still a few applications that generate SYLK files as a cross-platform option, because (despite being limited to a single worksheet) it is a simple format to implement, and supports some basic data and cell formatting options (unlike CSV files). - -### Gnumeric - -The Gnumeric file format is used by the Gnome Gnumeric spreadsheet application, and typically files have an extension of .gnumeric. The file contents are stored using eXtensible Markup Language (XML) markup, and the file is then compressed using the GNU project's gzip compression library. [http://projects.gnome.org/gnumeric/doc/file-format-gnumeric.shtml][7] - -### CSV - -Comma Separated Value (CSV) file format is a common structuring strategy for text format files. In CSV flies, each line in the file represents a row of data and (within each line of the file) the different data fields (or columns) are separated from one another using a comma (","). If a data field contains a comma, then it should be enclosed (typically in quotation marks ("). Sometimes tabs "\t", or the pipe symbol ("|"), or a semi-colon (";") are used as separators instead of a comma, although other symbols can be used. Because CSV is a text-only format, it doesn't support any data formatting options. - -"CSV" is not a single, well-defined format (although see RFC 4180 for one definition that is commonly used). Rather, in practice the term "CSV" refers to any file that: - - is plain text using a character set such as ASCII, Unicode, EBCDIC, or Shift JIS, - - consists of records (typically one record per line), - - with the records divided into fields separated by delimiters (typically a single reserved character such as comma, semicolon, or tab, - - where every record has the same sequence of fields. - -Within these general constraints, many variations are in use. Therefore "CSV" files are not entirely portable. Nevertheless, the variations are fairly small, and many implementations allow users to glance at the file (which is feasible because it is plain text), and then specify the delimiter character(s), quoting rules, etc. - -**Warning:** Microsoft Excel™ will open .csv files, but depending on the system's regional settings, it may expect a semicolon as a separator instead of a comma, since in some languages the comma is used as the decimal separator. Also, many regional versions of Excel will not be able to deal with Unicode characters in a CSV file. - -### HTML - -HyperText Markup Language (HTML) is the main markup language for creating web pages and other information that can be displayed in a web browser. Files typically have an extension of .html or .htm. HTML markup provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. Since 1996, the HTML specifications have been maintained, with input from commercial software vendors, by the World Wide Web Consortium (W3C). However, in 2000, HTML also became an international standard (ISO/IEC 15445:2000). HTML 4.01 was published in late 1999, with further errata published through 2001. In 2004 development began on HTML5 in the Web Hypertext Application Technology Working Group (WHATWG), which became a joint deliverable with the W3C in 2008. - - - - [1]: http://msdn.microsoft.com/en-us/library/cc313154(v=office.12).aspx - [2]: http://download.microsoft.com/download/2/4/8/24862317-78F0-4C4B-B355-C7B2C1D997DB/%5bMS-XLS%5d.pdf - [3]: http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx - [4]: http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm - [5]: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office - [6]: http://xml.openoffice.org/general.html - [7]: http://projects.gnome.org/gnumeric/doc/file-format-gnumeric.shtml diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/02-Security.md b/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/02-Security.md deleted file mode 100644 index 12da958..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/02-Security.md +++ /dev/null @@ -1,13 +0,0 @@ -# PHPExcel User Documentation – Reading Spreadsheet Files - - -## Security - -XML-based formats such as OfficeOpen XML, Excel2003 XML, OASIS and Gnumeric are susceptible to XML External Entity Processing (XXE) injection attacks (for an explanation of XXE injection see http://websec.io/2012/08/27/Preventing-XEE-in-PHP.html) when reading spreadsheet files. This can lead to: - - - Disclosure whether a file is existent - - Server Side Request Forgery - - Command Execution (depending on the installed PHP wrappers) - - -To prevent this, PHPExcel sets `libxml_disable_entity_loader` to `true` for the XML-based Readers by default. \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/03-Loading-a-Spreadsheet.md b/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/03-Loading-a-Spreadsheet.md deleted file mode 100644 index afa674d..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/03-Loading-a-Spreadsheet.md +++ /dev/null @@ -1,21 +0,0 @@ -# PHPExcel User Documentation – Reading Spreadsheet Files - - -## Loading a Spreadsheet File - -The simplest way to load a workbook file is to let PHPExcel's IO Factory identify the file type and load it, calling the static load() method of the PHPExcel_IOFactory class. - -```php -$inputFileName = './sampleData/example1.xls'; - -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = PHPExcel_IOFactory::load($inputFileName); -``` - > See Examples/Reader/exampleReader01.php for a working example of this code. - -The load() method will attempt to identify the file type, and instantiate a loader for that file type; using it to load the file and store the data and any formatting in a PHPExcel object. - -The method makes an initial guess at the loader to instantiate based on the file extension; but will test the file before actually executing the load: so if (for example) the file is actually a CSV file or contains HTML markup, but that has been given a .xls extension (quite a common practise), it will reject the Excel5 loader that it would normally use for a .xls file; and test the file using the other loaders until it finds the appropriate loader, and then use that to read the file. - -While easy to implement in your code, and you don't need to worry about the file type; this isn't the most efficient method to load a file; and it lacks the flexibility to configure the loader in any way before actually reading the file into a PHPExcel object. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/04-Loading-with-a-Reader.md b/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/04-Loading-with-a-Reader.md deleted file mode 100644 index 94d07aa..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/04-Loading-with-a-Reader.md +++ /dev/null @@ -1,56 +0,0 @@ -# PHPExcel User Documentation – Reading Spreadsheet Files - - -## Creating a Reader and Loading a Spreadsheet File - -If you know the file type of the spreadsheet file that you need to load, you can instantiate a new reader object for that file type, then use the reader's load() method to read the file to a PHPExcel object. It is possible to instantiate the reader objects for each of the different supported filetype by name. However, you may get unpredictable results if the file isn't of the right type (e.g. it is a CSV with an extension of .xls), although this type of exception should normally be trapped. - -```php -$inputFileName = './sampleData/example1.xls'; - -/** Create a new Excel5 Reader **/ -$objReader = new PHPExcel_Reader_Excel5(); -// $objReader = new PHPExcel_Reader_Excel2007(); -// $objReader = new PHPExcel_Reader_Excel2003XML(); -// $objReader = new PHPExcel_Reader_OOCalc(); -// $objReader = new PHPExcel_Reader_SYLK(); -// $objReader = new PHPExcel_Reader_Gnumeric(); -// $objReader = new PHPExcel_Reader_CSV(); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader02.php for a working example of this code. - -Alternatively, you can use the IO Factory's createReader() method to instantiate the reader object for you, simply telling it the file type of the reader that you want instantiating. - -```php -$inputFileType = 'Excel5'; -// $inputFileType = 'Excel2007'; -// $inputFileType = 'Excel2003XML'; -// $inputFileType = 'OOCalc'; -// $inputFileType = 'SYLK'; -// $inputFileType = 'Gnumeric'; -// $inputFileType = 'CSV'; -$inputFileName = './sampleData/example1.xls'; - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader03.php for a working example of this code. - -If you're uncertain of the filetype, you can use the IO Factory's identify() method to identify the reader that you need, before using the createReader() method to instantiate the reader object. - -```php -$inputFileName = './sampleData/example1.xls'; - -/** Identify the type of $inputFileName **/ -$inputFileType = PHPExcel_IOFactory::identify($inputFileName); -/** Create a new Reader of the type that has been identified **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader04.php for a working example of this code. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/05-Reader-Options.md b/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/05-Reader-Options.md deleted file mode 100644 index 137fd1e..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/05-Reader-Options.md +++ /dev/null @@ -1,392 +0,0 @@ -# PHPExcel User Documentation – Reading Spreadsheet Files - -## Spreadsheet Reader Options - -Once you have created a reader object for the workbook that you want to load, you have the opportunity to set additional options before executing the load() method. - -### Reading Only Data from a Spreadsheet File - -If you're only interested in the cell values in a workbook, but don't need any of the cell formatting information, then you can set the reader to read only the data values and any formulae from each cell using the setReadDataOnly() method. - -```php -$inputFileType = 'Excel5'; -$inputFileName = './sampleData/example1.xls'; - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Advise the Reader that we only want to load cell data **/ -$objReader->setReadDataOnly(true); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader05.php for a working example of this code. - -It is important to note that Workbooks (and PHPExcel) store dates and times as simple numeric values: they can only be distinguished from other numeric values by the format mask that is applied to that cell. When setting read data only to true, PHPExcel doesn't read the cell format masks, so it is not possible to differentiate between dates/times and numbers. - -The Gnumeric loader has been written to read the format masks for date values even when read data only has been set to true, so it can differentiate between dates/times and numbers; but this change hasn't yet been implemented for the other readers. - -Reading Only Data from a Spreadsheet File applies to Readers: - -Reader | Y/N |Reader | Y/N |Reader | Y/N | -----------|:---:|--------|:---:|--------------|:---:| -Excel2007 | YES | Excel5 | YES | Excel2003XML | YES | -OOCalc | YES | SYLK | NO | Gnumeric | YES | -CSV | NO | HTML | NO - -### Reading Only Named WorkSheets from a File - -If your workbook contains a number of worksheets, but you are only interested in reading some of those, then you can use the setLoadSheetsOnly() method to identify those sheets you are interested in reading. - -To read a single sheet, you can pass that sheet name as a parameter to the setLoadSheetsOnly() method. - -```php -$inputFileType = 'Excel5'; -$inputFileName = './sampleData/example1.xls'; -$sheetname = 'Data Sheet #2'; - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Advise the Reader of which WorkSheets we want to load **/ -$objReader->setLoadSheetsOnly($sheetname); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader07.php for a working example of this code. - -If you want to read more than just a single sheet, you can pass a list of sheet names as an array parameter to the setLoadSheetsOnly() method. - -```php -$inputFileType = 'Excel5'; -$inputFileName = './sampleData/example1.xls'; -$sheetnames = array('Data Sheet #1','Data Sheet #3'); - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Advise the Reader of which WorkSheets we want to load **/ -$objReader->setLoadSheetsOnly($sheetnames); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader08.php for a working example of this code. - -To reset this option to the default, you can call the setLoadAllSheets() method. - -```php -$inputFileType = 'Excel5'; -$inputFileName = './sampleData/example1.xls'; - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Advise the Reader to load all Worksheets **/ -$objReader->setLoadAllSheets(); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader06.php for a working example of this code. - -Reading Only Named WorkSheets from a File applies to Readers: - -Reader | Y/N |Reader | Y/N |Reader | Y/N | -----------|:---:|--------|:---:|--------------|:---:| -Excel2007 | YES | Excel5 | YES | Excel2003XML | YES | -OOCalc | YES | SYLK | NO | Gnumeric | YES | -CSV | NO | HTML | NO - -### Reading Only Specific Columns and Rows from a File (Read Filters) - -If you are only interested in reading part of a worksheet, then you can write a filter class that identifies whether or not individual cells should be read by the loader. A read filter must implement the PHPExcel_Reader_IReadFilter interface, and contain a readCell() method that accepts arguments of $column, $row and $worksheetName, and return a boolean true or false that indicates whether a workbook cell identified by those arguments should be read or not. - -```php -$inputFileType = 'Excel5'; -$inputFileName = './sampleData/example1.xls'; -$sheetname = 'Data Sheet #3'; - - -/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */ -class MyReadFilter implements PHPExcel_Reader_IReadFilter -{ - public function readCell($column, $row, $worksheetName = '') { - // Read rows 1 to 7 and columns A to E only - if ($row >= 1 && $row <= 7) { - if (in_array($column,range('A','E'))) { - return true; - } - } - return false; - } -} - -/** Create an Instance of our Read Filter **/ -$filterSubset = new MyReadFilter(); - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Tell the Reader that we want to use the Read Filter **/ -$objReader->setReadFilter($filterSubset); -/** Load only the rows and columns that match our filter to PHPExcel **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader09.php for a working example of this code. - -This example is not particularly useful, because it can only be used in a very specific circumstance (when you only want cells in the range A1:E7 from your worksheet. A generic Read Filter would probably be more useful: - -```php -/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */ -class MyReadFilter implements PHPExcel_Reader_IReadFilter -{ - private $_startRow = 0; - private $_endRow = 0; - private $_columns = array(); - - /** Get the list of rows and columns to read */ - public function __construct($startRow, $endRow, $columns) { - $this->_startRow = $startRow; - $this->_endRow = $endRow; - $this->_columns = $columns; - } - - public function readCell($column, $row, $worksheetName = '') { - // Only read the rows and columns that were configured - if ($row >= $this->_startRow && $row <= $this->_endRow) { - if (in_array($column,$this->_columns)) { - return true; - } - } - return false; - } -} - -/** Create an Instance of our Read Filter, passing in the cell range **/ -$filterSubset = new MyReadFilter(9,15,range('G','K')); -``` - > See Examples/Reader/exampleReader10.php for a working example of this code. - -This can be particularly useful for conserving memory, by allowing you to read and process a large workbook in “chunks”: an example of this usage might be when transferring data from an Excel worksheet to a database. - -```php -$inputFileType = 'Excel5'; -$inputFileName = './sampleData/example2.xls'; - - -/** Define a Read Filter class implementing PHPExcel_Reader_IReadFilter */ -class chunkReadFilter implements PHPExcel_Reader_IReadFilter -{ - private $_startRow = 0; - private $_endRow = 0; - - /** Set the list of rows that we want to read */ - public function setRows($startRow, $chunkSize) { - $this->_startRow = $startRow; - $this->_endRow = $startRow + $chunkSize; - } - - public function readCell($column, $row, $worksheetName = '') { - // Only read the heading row, and the configured rows - if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) { - return true; - } - return false; - } -} - - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - - -/** Define how many rows we want to read for each "chunk" **/ -$chunkSize = 2048; -/** Create a new Instance of our Read Filter **/ -$chunkFilter = new chunkReadFilter(); - -/** Tell the Reader that we want to use the Read Filter **/ -$objReader->setReadFilter($chunkFilter); - -/** Loop to read our worksheet in "chunk size" blocks **/ -for ($startRow = 2; $startRow <= 65536; $startRow += $chunkSize) { - /** Tell the Read Filter which rows we want this iteration **/ - $chunkFilter->setRows($startRow,$chunkSize); - /** Load only the rows that match our filter **/ - $objPHPExcel = $objReader->load($inputFileName); - // Do some processing here -} -``` - > See Examples/Reader/exampleReader12.php for a working example of this code. - -Using Read Filters applies to: - -Reader | Y/N |Reader | Y/N |Reader | Y/N | -----------|:---:|--------|:---:|--------------|:---:| -Excel2007 | YES | Excel5 | YES | Excel2003XML | YES | -OOCalc | YES | SYLK | NO | Gnumeric | YES | -CSV | YES | HTML | NO - -### Combining Multiple Files into a Single PHPExcel Object - -While you can limit the number of worksheets that are read from a workbook file using the setLoadSheetsOnly() method, certain readers also allow you to combine several individual "sheets" from different files into a single PHPExcel object, where each individual file is a single worksheet within that workbook. For each file that you read, you need to indicate which worksheet index it should be loaded into using the setSheetIndex() method of the $objReader, then use the loadIntoExisting() method rather than the load() method to actually read the file into that worksheet. - -```php -$inputFileType = 'CSV'; -$inputFileNames = array('./sampleData/example1.csv', - './sampleData/example2.csv' - './sampleData/example3.csv' -); - -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - - -/** Extract the first named file from the array list **/ -$inputFileName = array_shift($inputFileNames); -/** Load the initial file to the first worksheet in a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -/** Set the worksheet title (to the filename that we've loaded) **/ -$objPHPExcel->getActiveSheet() - ->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME)); - - -/** Loop through all the remaining files in the list **/ -foreach($inputFileNames as $sheet => $inputFileName) { - /** Increment the worksheet index pointer for the Reader **/ - $objReader->setSheetIndex($sheet+1); - /** Load the current file into a new worksheet in PHPExcel **/ - $objReader->loadIntoExisting($inputFileName,$objPHPExcel); - /** Set the worksheet title (to the filename that we've loaded) **/ - $objPHPExcel->getActiveSheet() - ->setTitle(pathinfo($inputFileName,PATHINFO_BASENAME)); -} -``` - > See Examples/Reader/exampleReader13.php for a working example of this code. - -Note that using the same sheet index for multiple sheets won't append files into the same sheet, but overwrite the results of the previous load. You cannot load multiple CSV files into the same worksheet. - -Combining Multiple Files into a Single PHPExcel Object applies to: - -Reader | Y/N |Reader | Y/N |Reader | Y/N | -----------|:---:|--------|:---:|--------------|:---:| -Excel2007 | NO | Excel5 | NO | Excel2003XML | NO | -OOCalc | NO | SYLK | YES | Gnumeric | NO | -CSV | YES | HTML | NO - -### Combining Read Filters with the setSheetIndex() method to split a large CSV file across multiple Worksheets - -An Excel5 BIFF .xls file is limited to 65536 rows in a worksheet, while the Excel2007 Microsoft Office Open XML SpreadsheetML .xlsx file is limited to 1,048,576 rows in a worksheet; but a CSV file is not limited other than by available disk space. This means that we wouldn’t ordinarily be able to read all the rows from a very large CSV file that exceeded those limits, and save it as an Excel5 or Excel2007 file. However, by using Read Filters to read the CSV file in “chunks” (using the chunkReadFilter Class that we defined in section REF _Ref275604563 \r \p 5.3 above), and the setSheetIndex() method of the $objReader, we can split the CSV file across several individual worksheets. - -```php -$inputFileType = 'CSV'; -$inputFileName = './sampleData/example2.csv'; - - -echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory with a defined reader type of ',$inputFileType,'<br />'; -/** Create a new Reader of the type defined in $inputFileType **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - - -/** Define how many rows we want to read for each "chunk" **/ -$chunkSize = 65530; -/** Create a new Instance of our Read Filter **/ -$chunkFilter = new chunkReadFilter(); - -/** Tell the Reader that we want to use the Read Filter **/ -/** and that we want to store it in contiguous rows/columns **/ - -$objReader->setReadFilter($chunkFilter) - ->setContiguous(true); - -/** Instantiate a new PHPExcel object manually **/ -$objPHPExcel = new PHPExcel(); - -/** Set a sheet index **/ -$sheet = 0; -/** Loop to read our worksheet in "chunk size" blocks **/ -/** $startRow is set to 2 initially because we always read the headings in row #1 **/ -for ($startRow = 2; $startRow <= 1000000; $startRow += $chunkSize) { - /** Tell the Read Filter which rows we want to read this loop **/ - $chunkFilter->setRows($startRow,$chunkSize); - - /** Increment the worksheet index pointer for the Reader **/ - $objReader->setSheetIndex($sheet); - /** Load only the rows that match our filter into a new worksheet **/ - $objReader->loadIntoExisting($inputFileName,$objPHPExcel); - /** Set the worksheet title for the sheet that we've justloaded) **/ - /** and increment the sheet index as well **/ - $objPHPExcel->getActiveSheet()->setTitle('Country Data #'.(++$sheet)); -} -``` - > See Examples/Reader/exampleReader14.php for a working example of this code. - -This code will read 65,530 rows at a time from the CSV file that we’re loading, and store each "chunk" in a new worksheet. - -The setContiguous() method for the Reader is important here. It is applicable only when working with a Read Filter, and identifies whether or not the cells should be stored by their position within the CSV file, or their position relative to the filter. - -For example, if the filter returned true for cells in the range B2:C3, then with setContiguous set to false (the default) these would be loaded as B2:C3 in the PHPExcel object; but with setContiguous set to true, they would be loaded as A1:B2. - -Splitting a single loaded file across multiple worksheets applies to: - -Reader | Y/N |Reader | Y/N |Reader | Y/N | -----------|:---:|--------|:---:|--------------|:---:| -Excel2007 | NO | Excel5 | NO | Excel2003XML | NO | -OOCalc | NO | SYLK | NO | Gnumeric | NO | -CSV | YES | HTML | NO - -### Pipe or Tab Separated Value Files - -The CSV loader defaults to loading a file where comma is used as the separator, but you can modify this to load tab- or pipe-separated value files using the setDelimiter() method. - -```php -$inputFileType = 'CSV'; -$inputFileName = './sampleData/example1.tsv'; - -/** Create a new Reader of the type defined in $inputFileType **/ $objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Set the delimiter to a TAB character **/ -$objReader->setDelimiter("\t"); -// $objReader->setDelimiter('|'); - -/** Load the file to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader15.php for a working example of this code. - -In addition to the delimiter, you can also use the following methods to set other attributes for the data load: - -setEnclosure() | default is " -setLineEnding() | default is PHP_EOL -setInputEncoding() | default is UTF-8 - -Setting CSV delimiter applies to: - -Reader | Y/N |Reader | Y/N |Reader | Y/N | -----------|:---:|--------|:---:|--------------|:---:| -Excel2007 | NO | Excel5 | NO | Excel2003XML | NO | -OOCalc | NO | SYLK | NO | Gnumeric | NO | -CSV | YES | HTML | NO - -### A Brief Word about the Advanced Value Binder - -When loading data from a file that contains no formatting information, such as a CSV file, then data is read either as strings or numbers (float or integer). This means that PHPExcel does not automatically recognise dates/times (such as "16-Apr-2009" or "13:30"), booleans ("TRUE" or "FALSE"), percentages ("75%"), hyperlinks ("http://www.phpexcel.net"), etc as anything other than simple strings. However, you can apply additional processing that is executed against these values during the load process within a Value Binder. - -A Value Binder is a class that implement the PHPExcel_Cell_IValueBinder interface. It must contain a bindValue() method that accepts a PHPExcel_Cell and a value as arguments, and return a boolean true or false that indicates whether the workbook cell has been populated with the value or not. The Advanced Value Binder implements such a class: amongst other tests, it identifies a string comprising "TRUE" or "FALSE" (based on locale settings) and sets it to a boolean; or a number in scientific format (e.g. "1.234e-5") and converts it to a float; or dates and times, converting them to their Excel timestamp value – before storing the value in the cell object. It also sets formatting for strings that are identified as dates, times or percentages. It could easily be extended to provide additional handling (including text or cell formatting) when it encountered a hyperlink, or HTML markup within a CSV file. - -So using a Value Binder allows a great deal more flexibility in the loader logic when reading unformatted text files. - -```php -/** Tell PHPExcel that we want to use the Advanced Value Binder **/ -PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() ); - -$inputFileType = 'CSV'; -$inputFileName = './sampleData/example1.tsv'; - -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -$objReader->setDelimiter("\t"); -$objPHPExcel = $objReader->load($inputFileName); -``` - > See Examples/Reader/exampleReader15.php for a working example of this code. - -Loading using a Value Binder applies to: - -Reader | Y/N |Reader | Y/N |Reader | Y/N | -----------|:---:|--------|:---:|--------------|:---:| -Excel2007 | NO | Excel5 | NO | Excel2003XML | NO | -OOCalc | NO | SYLK | NO | Gnumeric | NO | -CSV | YES | HTML | YES - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/06-Error-Handling.md b/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/06-Error-Handling.md deleted file mode 100644 index d3e064f..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/06-Error-Handling.md +++ /dev/null @@ -1,20 +0,0 @@ -# PHPExcel User Documentation – Reading Spreadsheet Files - -## Error Handling - -Of course, you should always apply some error handling to your scripts as well. PHPExcel throws exceptions, so you can wrap all your code that accesses the library methods within Try/Catch blocks to trap for any problems that are encountered, and deal with them in an appropriate manner. - -The PHPExcel Readers throw a PHPExcel_Reader_Exception. - -```php -$inputFileName = './sampleData/example-1.xls'; - -try { - /** Load $inputFileName to a PHPExcel Object **/ - $objPHPExcel = PHPExcel_IOFactory::load($inputFileName); -} catch(PHPExcel_Reader_Exception $e) { - die('Error loading file: '.$e->getMessage()); -} -``` - > See Examples/Reader/exampleReader16.php for a working example of this code. - diff --git a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/07-Helper-Methods.md b/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/07-Helper-Methods.md deleted file mode 100644 index 57dbec7..0000000 --- a/vendor/phpoffice/phpexcel/Documentation/markdown/ReadingSpreadsheetFiles/07-Helper-Methods.md +++ /dev/null @@ -1,47 +0,0 @@ -# PHPExcel User Documentation – Reading Spreadsheet Files - - -## Helper Methods - -You can retrieve a list of worksheet names contained in a file without loading the whole file by using the Reader’s `listWorksheetNames()` method; similarly, a `listWorksheetInfo()` method will retrieve the dimensions of worksheet in a file without needing to load and parse the whole file. - -### listWorksheetNames - -The `listWorksheetNames()` method returns a simple array listing each worksheet name within the workbook: - -```php -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - -$worksheetNames = $objReader->listWorksheetNames($inputFileName); - -echo '<h3>Worksheet Names</h3>'; -echo '<ol>'; -foreach ($worksheetNames as $worksheetName) { - echo '<li>', $worksheetName, '</li>'; -} -echo '</ol>'; -``` - > See Examples/Reader/exampleReader18.php for a working example of this code. - -### listWorksheetInfo - -The `listWorksheetInfo()` method returns a nested array, with each entry listing the name and dimensions for a worksheet: - -```php -$objReader = PHPExcel_IOFactory::createReader($inputFileType); - -$worksheetData = $objReader->listWorksheetInfo($inputFileName); - -echo '<h3>Worksheet Information</h3>'; -echo '<ol>'; -foreach ($worksheetData as $worksheet) { - echo '<li>', $worksheet['worksheetName'], '<br />'; - echo 'Rows: ', $worksheet['totalRows'], - ' Columns: ', $worksheet['totalColumns'], '<br />'; - echo 'Cell Range: A1:', - $worksheet['lastColumnLetter'], $worksheet['totalRows']; - echo '</li>'; -} -echo '</ol>'; -``` - > See Examples/Reader/exampleReader19.php for a working example of this code. diff --git a/vendor/phpoffice/phpexcel/Examples/.gitignore b/vendor/phpoffice/phpexcel/Examples/.gitignore deleted file mode 100644 index d53fd7f..0000000 --- a/vendor/phpoffice/phpexcel/Examples/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.xls -*.xlsx -*.csv -*.jpg -*.pdf diff --git a/vendor/phpoffice/phpexcel/Examples/01pharSimple.php b/vendor/phpoffice/phpexcel/Examples/01pharSimple.php deleted file mode 100644 index 84b86cc..0000000 --- a/vendor/phpoffice/phpexcel/Examples/01pharSimple.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once '../Build/PHPExcel.phar'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("PHPExcel Test Document") - ->setSubject("PHPExcel Test Document") - ->setDescription("Test document for PHPExcel, generated using PHP classes.") - ->setKeywords("office PHPExcel php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!') - ->setCellValue('C1', 'Hello') - ->setCellValue('D2', 'world!'); - -// Miscellaneous glyphs, UTF-8 -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A4', 'Miscellaneous glyphs') - ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç'); - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel5 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/01simple-download-ods.php b/vendor/phpoffice/phpexcel/Examples/01simple-download-ods.php deleted file mode 100644 index 30dbd7e..0000000 --- a/vendor/phpoffice/phpexcel/Examples/01simple-download-ods.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -if (PHP_SAPI == 'cli') - die('This example should only be run from a Web Browser'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); - -// Set document properties -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!') - ->setCellValue('C1', 'Hello') - ->setCellValue('D2', 'world!'); - -// Miscellaneous glyphs, UTF-8 -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A4', 'Miscellaneous glyphs') - ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç'); - -// Rename worksheet -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Redirect output to a client’s web browser (OpenDocument) -header('Content-Type: application/vnd.oasis.opendocument.spreadsheet'); -header('Content-Disposition: attachment;filename="01simple.ods"'); -header('Cache-Control: max-age=0'); -// If you're serving to IE 9, then the following may be needed -header('Cache-Control: max-age=1'); - -// If you're serving to IE over SSL, then the following may be needed -header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past -header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified -header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1 -header ('Pragma: public'); // HTTP/1.0 - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'OpenDocument'); -$objWriter->save('php://output'); -exit; diff --git a/vendor/phpoffice/phpexcel/Examples/01simple-download-pdf.php b/vendor/phpoffice/phpexcel/Examples/01simple-download-pdf.php deleted file mode 100644 index 133af3a..0000000 --- a/vendor/phpoffice/phpexcel/Examples/01simple-download-pdf.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -if (PHP_SAPI == 'cli') - die('This example should only be run from a Web Browser'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Change these values to select the Rendering library that you wish to use -// and its directory location on your server -//$rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF; -$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF; -//$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF; -//$rendererLibrary = 'tcPDF5.9'; -$rendererLibrary = 'mPDF5.4'; -//$rendererLibrary = 'domPDF0.6.0beta3'; -$rendererLibraryPath = dirname(__FILE__).'/../../../libraries/PDF/' . $rendererLibrary; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); - -// Set document properties -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("PDF Test Document") - ->setSubject("PDF Test Document") - ->setDescription("Test document for PDF, generated using PHP classes.") - ->setKeywords("pdf php") - ->setCategory("Test result file"); - - -// Add some data -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!') - ->setCellValue('C1', 'Hello') - ->setCellValue('D2', 'world!'); - -// Miscellaneous glyphs, UTF-8 -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A4', 'Miscellaneous glyphs') - ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç'); - -// Rename worksheet -$objPHPExcel->getActiveSheet()->setTitle('Simple'); -$objPHPExcel->getActiveSheet()->setShowGridLines(false); - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -if (!PHPExcel_Settings::setPdfRenderer( - $rendererName, - $rendererLibraryPath - )) { - die( - 'NOTICE: Please set the $rendererName and $rendererLibraryPath values' . - '<br />' . - 'at the top of this script as appropriate for your directory structure' - ); -} - - -// Redirect output to a client’s web browser (PDF) -header('Content-Type: application/pdf'); -header('Content-Disposition: attachment;filename="01simple.pdf"'); -header('Cache-Control: max-age=0'); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF'); -$objWriter->save('php://output'); -exit; diff --git a/vendor/phpoffice/phpexcel/Examples/01simple-download-xls.php b/vendor/phpoffice/phpexcel/Examples/01simple-download-xls.php deleted file mode 100644 index 96bb780..0000000 --- a/vendor/phpoffice/phpexcel/Examples/01simple-download-xls.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -if (PHP_SAPI == 'cli') - die('This example should only be run from a Web Browser'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); - -// Set document properties -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!') - ->setCellValue('C1', 'Hello') - ->setCellValue('D2', 'world!'); - -// Miscellaneous glyphs, UTF-8 -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A4', 'Miscellaneous glyphs') - ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç'); - -// Rename worksheet -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Redirect output to a client’s web browser (Excel5) -header('Content-Type: application/vnd.ms-excel'); -header('Content-Disposition: attachment;filename="01simple.xls"'); -header('Cache-Control: max-age=0'); -// If you're serving to IE 9, then the following may be needed -header('Cache-Control: max-age=1'); - -// If you're serving to IE over SSL, then the following may be needed -header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past -header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified -header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1 -header ('Pragma: public'); // HTTP/1.0 - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save('php://output'); -exit; diff --git a/vendor/phpoffice/phpexcel/Examples/01simple-download-xlsx.php b/vendor/phpoffice/phpexcel/Examples/01simple-download-xlsx.php deleted file mode 100644 index d441f41..0000000 --- a/vendor/phpoffice/phpexcel/Examples/01simple-download-xlsx.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -if (PHP_SAPI == 'cli') - die('This example should only be run from a Web Browser'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -$objPHPExcel = new PHPExcel(); - -// Set document properties -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!') - ->setCellValue('C1', 'Hello') - ->setCellValue('D2', 'world!'); - -// Miscellaneous glyphs, UTF-8 -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A4', 'Miscellaneous glyphs') - ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç'); - -// Rename worksheet -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Redirect output to a client’s web browser (Excel2007) -header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); -header('Content-Disposition: attachment;filename="01simple.xlsx"'); -header('Cache-Control: max-age=0'); -// If you're serving to IE 9, then the following may be needed -header('Cache-Control: max-age=1'); - -// If you're serving to IE over SSL, then the following may be needed -header ('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past -header ('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified -header ('Cache-Control: cache, must-revalidate'); // HTTP/1.1 -header ('Pragma: public'); // HTTP/1.0 - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save('php://output'); -exit; diff --git a/vendor/phpoffice/phpexcel/Examples/01simple.php b/vendor/phpoffice/phpexcel/Examples/01simple.php deleted file mode 100644 index 13f8027..0000000 --- a/vendor/phpoffice/phpexcel/Examples/01simple.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("PHPExcel Test Document") - ->setSubject("PHPExcel Test Document") - ->setDescription("Test document for PHPExcel, generated using PHP classes.") - ->setKeywords("office PHPExcel php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!') - ->setCellValue('C1', 'Hello') - ->setCellValue('D2', 'world!'); - -// Miscellaneous glyphs, UTF-8 -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A4', 'Miscellaneous glyphs') - ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç'); - - -$objPHPExcel->getActiveSheet()->setCellValue('A8',"Hello\nWorld"); -$objPHPExcel->getActiveSheet()->getRowDimension(8)->setRowHeight(-1); -$objPHPExcel->getActiveSheet()->getStyle('A8')->getAlignment()->setWrapText(true); - - -$value = "-ValueA\n-Value B\n-Value C"; -$objPHPExcel->getActiveSheet()->setCellValue('A10', $value); -$objPHPExcel->getActiveSheet()->getRowDimension(10)->setRowHeight(-1); -$objPHPExcel->getActiveSheet()->getStyle('A10')->getAlignment()->setWrapText(true); -$objPHPExcel->getActiveSheet()->getStyle('A10')->setQuotePrefix(true); - - - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/01simplePCLZip.php b/vendor/phpoffice/phpexcel/Examples/01simplePCLZip.php deleted file mode 100644 index 0af4cbd..0000000 --- a/vendor/phpoffice/phpexcel/Examples/01simplePCLZip.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("PHPExcel Test Document") - ->setSubject("PHPExcel Test Document") - ->setDescription("Test document for PHPExcel, generated using PHP classes.") - ->setKeywords("office PHPExcel php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!') - ->setCellValue('C1', 'Hello') - ->setCellValue('D2', 'world!'); - -// Miscellaneous glyphs, UTF-8 -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A4', 'Miscellaneous glyphs') - ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç'); - - -$objPHPExcel->getActiveSheet()->setCellValue('A8',"Hello\nWorld"); -$objPHPExcel->getActiveSheet()->getRowDimension(8)->setRowHeight(-1); -$objPHPExcel->getActiveSheet()->getStyle('A8')->getAlignment()->setWrapText(true); - - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -// Use PCLZip rather than ZipArchive to create the Excel2007 OfficeOpenXML file -PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/02types-xls.php b/vendor/phpoffice/phpexcel/Examples/02types-xls.php deleted file mode 100644 index 93ce17e..0000000 --- a/vendor/phpoffice/phpexcel/Examples/02types-xls.php +++ /dev/null @@ -1,183 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - -// Set default font -echo date('H:i:s') , " Set default font" , EOL; -$objPHPExcel->getDefaultStyle()->getFont()->setName('Arial') - ->setSize(10); - -// Add some data, resembling some different data types -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'String') - ->setCellValue('B1', 'Simple') - ->setCellValue('C1', 'PHPExcel'); - -$objPHPExcel->getActiveSheet()->setCellValue('A2', 'String') - ->setCellValue('B2', 'Symbols') - ->setCellValue('C2', '!+&=()~§±æþ'); - -$objPHPExcel->getActiveSheet()->setCellValue('A3', 'String') - ->setCellValue('B3', 'UTF-8') - ->setCellValue('C3', 'Создать MS Excel Книги из PHP скриптов'); - -$objPHPExcel->getActiveSheet()->setCellValue('A4', 'Number') - ->setCellValue('B4', 'Integer') - ->setCellValue('C4', 12); - -$objPHPExcel->getActiveSheet()->setCellValue('A5', 'Number') - ->setCellValue('B5', 'Float') - ->setCellValue('C5', 34.56); - -$objPHPExcel->getActiveSheet()->setCellValue('A6', 'Number') - ->setCellValue('B6', 'Negative') - ->setCellValue('C6', -7.89); - -$objPHPExcel->getActiveSheet()->setCellValue('A7', 'Boolean') - ->setCellValue('B7', 'True') - ->setCellValue('C7', true); - -$objPHPExcel->getActiveSheet()->setCellValue('A8', 'Boolean') - ->setCellValue('B8', 'False') - ->setCellValue('C8', false); - -$dateTimeNow = time(); -$objPHPExcel->getActiveSheet()->setCellValue('A9', 'Date/Time') - ->setCellValue('B9', 'Date') - ->setCellValue('C9', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow )); -$objPHPExcel->getActiveSheet()->getStyle('C9')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2); - -$objPHPExcel->getActiveSheet()->setCellValue('A10', 'Date/Time') - ->setCellValue('B10', 'Time') - ->setCellValue('C10', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow )); -$objPHPExcel->getActiveSheet()->getStyle('C10')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4); - -$objPHPExcel->getActiveSheet()->setCellValue('A11', 'Date/Time') - ->setCellValue('B11', 'Date and Time') - ->setCellValue('C11', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow )); -$objPHPExcel->getActiveSheet()->getStyle('C11')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME); - -$objPHPExcel->getActiveSheet()->setCellValue('A12', 'NULL') - ->setCellValue('C12', NULL); - -$objRichText = new PHPExcel_RichText(); -$objRichText->createText('你好 '); -$objPayable = $objRichText->createTextRun('你 好 吗?'); -$objPayable->getFont()->setBold(true); -$objPayable->getFont()->setItalic(true); -$objPayable->getFont()->setColor( new PHPExcel_Style_Color( PHPExcel_Style_Color::COLOR_DARKGREEN ) ); - -$objRichText->createText(', unless specified otherwise on the invoice.'); - -$objPHPExcel->getActiveSheet()->setCellValue('A13', 'Rich Text') - ->setCellValue('C13', $objRichText); - - -$objRichText2 = new PHPExcel_RichText(); -$objRichText2->createText("black text\n"); - -$objRed = $objRichText2->createTextRun("red text"); -$objRed->getFont()->setColor( new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_RED ) ); - -$objPHPExcel->getActiveSheet()->getCell("C14")->setValue($objRichText2); -$objPHPExcel->getActiveSheet()->getStyle("C14")->getAlignment()->setWrapText(true); - - -$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true); - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Datatypes'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Reload workbook from saved file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcel = PHPExcel_IOFactory::load(str_replace('.php', '.xls', __FILE__)); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to reload Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -var_dump($objPHPExcel->getActiveSheet()->toArray()); - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done testing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/02types.php b/vendor/phpoffice/phpexcel/Examples/02types.php deleted file mode 100644 index 394a73d..0000000 --- a/vendor/phpoffice/phpexcel/Examples/02types.php +++ /dev/null @@ -1,204 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - -// Set default font -echo date('H:i:s') , " Set default font" , EOL; -$objPHPExcel->getDefaultStyle()->getFont()->setName('Arial') - ->setSize(10); - -// Add some data, resembling some different data types -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'String') - ->setCellValue('B1', 'Simple') - ->setCellValue('C1', 'PHPExcel'); - -$objPHPExcel->getActiveSheet()->setCellValue('A2', 'String') - ->setCellValue('B2', 'Symbols') - ->setCellValue('C2', '!+&=()~§±æþ'); - -$objPHPExcel->getActiveSheet()->setCellValue('A3', 'String') - ->setCellValue('B3', 'UTF-8') - ->setCellValue('C3', 'Создать MS Excel Книги из PHP скриптов'); - -$objPHPExcel->getActiveSheet()->setCellValue('A4', 'Number') - ->setCellValue('B4', 'Integer') - ->setCellValue('C4', 12); - -$objPHPExcel->getActiveSheet()->setCellValue('A5', 'Number') - ->setCellValue('B5', 'Float') - ->setCellValue('C5', 34.56); - -$objPHPExcel->getActiveSheet()->setCellValue('A6', 'Number') - ->setCellValue('B6', 'Negative') - ->setCellValue('C6', -7.89); - -$objPHPExcel->getActiveSheet()->setCellValue('A7', 'Boolean') - ->setCellValue('B7', 'True') - ->setCellValue('C7', true); - -$objPHPExcel->getActiveSheet()->setCellValue('A8', 'Boolean') - ->setCellValue('B8', 'False') - ->setCellValue('C8', false); - -$dateTimeNow = time(); -$objPHPExcel->getActiveSheet()->setCellValue('A9', 'Date/Time') - ->setCellValue('B9', 'Date') - ->setCellValue('C9', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow )); -$objPHPExcel->getActiveSheet()->getStyle('C9')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2); - -$objPHPExcel->getActiveSheet()->setCellValue('A10', 'Date/Time') - ->setCellValue('B10', 'Time') - ->setCellValue('C10', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow )); -$objPHPExcel->getActiveSheet()->getStyle('C10')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_TIME4); - -$objPHPExcel->getActiveSheet()->setCellValue('A11', 'Date/Time') - ->setCellValue('B11', 'Date and Time') - ->setCellValue('C11', PHPExcel_Shared_Date::PHPToExcel( $dateTimeNow )); -$objPHPExcel->getActiveSheet()->getStyle('C11')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DATETIME); - -$objPHPExcel->getActiveSheet()->setCellValue('A12', 'NULL') - ->setCellValue('C12', NULL); - -$objRichText = new PHPExcel_RichText(); -$objRichText->createText('你好 '); - -$objPayable = $objRichText->createTextRun('你 好 吗?'); -$objPayable->getFont()->setBold(true); -$objPayable->getFont()->setItalic(true); -$objPayable->getFont()->setColor( new PHPExcel_Style_Color( PHPExcel_Style_Color::COLOR_DARKGREEN ) ); - -$objRichText->createText(', unless specified otherwise on the invoice.'); - -$objPHPExcel->getActiveSheet()->setCellValue('A13', 'Rich Text') - ->setCellValue('C13', $objRichText); - - -$objRichText2 = new PHPExcel_RichText(); -$objRichText2->createText("black text\n"); - -$objRed = $objRichText2->createTextRun("red text"); -$objRed->getFont()->setColor( new PHPExcel_Style_Color(PHPExcel_Style_Color::COLOR_RED ) ); - -$objPHPExcel->getActiveSheet()->getCell("C14")->setValue($objRichText2); -$objPHPExcel->getActiveSheet()->getStyle("C14")->getAlignment()->setWrapText(true); - - -$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setAutoSize(true); - -$objRichText3 = new PHPExcel_RichText(); -$objRichText3->createText("Hello "); - -$objUnderlined = $objRichText3->createTextRun("underlined"); -$objUnderlined->getFont()->setUnderline(true); -$objRichText3->createText(' World.'); - -$objPHPExcel->getActiveSheet() - ->getCell("C15") - ->setValue($objRichText3); - - -$objPHPExcel->getActiveSheet()->setCellValue('A17', 'Hyperlink'); - -$objPHPExcel->getActiveSheet()->setCellValue('C17', 'www.phpexcel.net'); -$objPHPExcel->getActiveSheet()->getCell('C17')->getHyperlink()->setUrl('http://www.phpexcel.net'); -$objPHPExcel->getActiveSheet()->getCell('C17')->getHyperlink()->setTooltip('Navigate to website'); - -$objPHPExcel->getActiveSheet()->setCellValue('C18', '=HYPERLINK("mailto:abc@def.com","abc@def.com")'); - - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Datatypes'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Reload workbook from saved file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcel = PHPExcel_IOFactory::load(str_replace('.php', '.xlsx', __FILE__)); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to reload Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -var_dump($objPHPExcel->getActiveSheet()->toArray()); - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done testing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/03formulas.php b/vendor/phpoffice/phpexcel/Examples/03formulas.php deleted file mode 100644 index 6c5d1dd..0000000 --- a/vendor/phpoffice/phpexcel/Examples/03formulas.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data, we will use some formulas here -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->getActiveSheet()->setCellValue('A5', 'Sum:'); - -$objPHPExcel->getActiveSheet()->setCellValue('B1', 'Range #1') - ->setCellValue('B2', 3) - ->setCellValue('B3', 7) - ->setCellValue('B4', 13) - ->setCellValue('B5', '=SUM(B2:B4)'); -echo date('H:i:s') , " Sum of Range #1 is " , - $objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue() , EOL; - -$objPHPExcel->getActiveSheet()->setCellValue('C1', 'Range #2') - ->setCellValue('C2', 5) - ->setCellValue('C3', 11) - ->setCellValue('C4', 17) - ->setCellValue('C5', '=SUM(C2:C4)'); -echo date('H:i:s') , " Sum of Range #2 is " , - $objPHPExcel->getActiveSheet()->getCell('C5')->getCalculatedValue() , EOL; - -$objPHPExcel->getActiveSheet()->setCellValue('A7', 'Total of both ranges:'); -$objPHPExcel->getActiveSheet()->setCellValue('B7', '=SUM(B5:C5)'); -echo date('H:i:s') , " Sum of both Ranges is " , - $objPHPExcel->getActiveSheet()->getCell('B7')->getCalculatedValue() , EOL; - -$objPHPExcel->getActiveSheet()->setCellValue('A8', 'Minimum of both ranges:'); -$objPHPExcel->getActiveSheet()->setCellValue('B8', '=MIN(B2:C4)'); -echo date('H:i:s') , " Minimum value in either Range is " , - $objPHPExcel->getActiveSheet()->getCell('B8')->getCalculatedValue() , EOL; - -$objPHPExcel->getActiveSheet()->setCellValue('A9', 'Maximum of both ranges:'); -$objPHPExcel->getActiveSheet()->setCellValue('B9', '=MAX(B2:C4)'); -echo date('H:i:s') , " Maximum value in either Range is " , - $objPHPExcel->getActiveSheet()->getCell('B9')->getCalculatedValue() , EOL; - -$objPHPExcel->getActiveSheet()->setCellValue('A10', 'Average of both ranges:'); -$objPHPExcel->getActiveSheet()->setCellValue('B10', '=AVERAGE(B2:C4)'); -echo date('H:i:s') , " Average value of both Ranges is " , - $objPHPExcel->getActiveSheet()->getCell('B10')->getCalculatedValue() , EOL; - - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Formulas'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); - -// -// If we set Pre Calculated Formulas to true then PHPExcel will calculate all formulae in the -// workbook before saving. This adds time and memory overhead, and can cause some problems with formulae -// using functions or features (such as array formulae) that aren't yet supported by the calculation engine -// If the value is false (the default) for the Excel2007 Writer, then MS Excel (or the application used to -// open the file) will need to recalculate values itself to guarantee that the correct results are available. -// -//$objWriter->setPreCalculateFormulas(true); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/04printing.php b/vendor/phpoffice/phpexcel/Examples/04printing.php deleted file mode 100644 index 58d5f6a..0000000 --- a/vendor/phpoffice/phpexcel/Examples/04printing.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data, we will use printing features -echo date('H:i:s') , " Add some data" , EOL; -for ($i = 1; $i < 200; $i++) { - $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, $i); - $objPHPExcel->getActiveSheet()->setCellValue('B' . $i, 'Test value'); -} - -// Set header and footer. When no different headers for odd/even are used, odd header is assumed. -echo date('H:i:s') , " Set header/footer" , EOL; -$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&G&C&HPlease treat this document as confidential!'); -$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $objPHPExcel->getProperties()->getTitle() . '&RPage &P of &N'); - -// Add a drawing to the header -echo date('H:i:s') , " Add a drawing to the header" , EOL; -$objDrawing = new PHPExcel_Worksheet_HeaderFooterDrawing(); -$objDrawing->setName('PHPExcel logo'); -$objDrawing->setPath('./images/phpexcel_logo.gif'); -$objDrawing->setHeight(36); -$objPHPExcel->getActiveSheet()->getHeaderFooter()->addImage($objDrawing, PHPExcel_Worksheet_HeaderFooter::IMAGE_HEADER_LEFT); - -// Set page orientation and size -echo date('H:i:s') , " Set page orientation and size" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE); -$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4); - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Printing'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/05featuredemo.inc.php b/vendor/phpoffice/phpexcel/Examples/05featuredemo.inc.php deleted file mode 100644 index 003379c..0000000 --- a/vendor/phpoffice/phpexcel/Examples/05featuredemo.inc.php +++ /dev/null @@ -1,394 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet, representing sales data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('B1', 'Invoice'); -$objPHPExcel->getActiveSheet()->setCellValue('D1', PHPExcel_Shared_Date::PHPToExcel( gmmktime(0,0,0,date('m'),date('d'),date('Y')) )); -$objPHPExcel->getActiveSheet()->getStyle('D1')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_XLSX15); -$objPHPExcel->getActiveSheet()->setCellValue('E1', '#12566'); - -$objPHPExcel->getActiveSheet()->setCellValue('A3', 'Product Id'); -$objPHPExcel->getActiveSheet()->setCellValue('B3', 'Description'); -$objPHPExcel->getActiveSheet()->setCellValue('C3', 'Price'); -$objPHPExcel->getActiveSheet()->setCellValue('D3', 'Amount'); -$objPHPExcel->getActiveSheet()->setCellValue('E3', 'Total'); - -$objPHPExcel->getActiveSheet()->setCellValue('A4', '1001'); -$objPHPExcel->getActiveSheet()->setCellValue('B4', 'PHP for dummies'); -$objPHPExcel->getActiveSheet()->setCellValue('C4', '20'); -$objPHPExcel->getActiveSheet()->setCellValue('D4', '1'); -$objPHPExcel->getActiveSheet()->setCellValue('E4', '=IF(D4<>"",C4*D4,"")'); - -$objPHPExcel->getActiveSheet()->setCellValue('A5', '1012'); -$objPHPExcel->getActiveSheet()->setCellValue('B5', 'OpenXML for dummies'); -$objPHPExcel->getActiveSheet()->setCellValue('C5', '22'); -$objPHPExcel->getActiveSheet()->setCellValue('D5', '2'); -$objPHPExcel->getActiveSheet()->setCellValue('E5', '=IF(D5<>"",C5*D5,"")'); - -$objPHPExcel->getActiveSheet()->setCellValue('E6', '=IF(D6<>"",C6*D6,"")'); -$objPHPExcel->getActiveSheet()->setCellValue('E7', '=IF(D7<>"",C7*D7,"")'); -$objPHPExcel->getActiveSheet()->setCellValue('E8', '=IF(D8<>"",C8*D8,"")'); -$objPHPExcel->getActiveSheet()->setCellValue('E9', '=IF(D9<>"",C9*D9,"")'); - -$objPHPExcel->getActiveSheet()->setCellValue('D11', 'Total excl.:'); -$objPHPExcel->getActiveSheet()->setCellValue('E11', '=SUM(E4:E9)'); - -$objPHPExcel->getActiveSheet()->setCellValue('D12', 'VAT:'); -$objPHPExcel->getActiveSheet()->setCellValue('E12', '=E11*0.21'); - -$objPHPExcel->getActiveSheet()->setCellValue('D13', 'Total incl.:'); -$objPHPExcel->getActiveSheet()->setCellValue('E13', '=E11+E12'); - -// Add comment -echo date('H:i:s') , " Add comments" , EOL; - -$objPHPExcel->getActiveSheet()->getComment('E11')->setAuthor('PHPExcel'); -$objCommentRichText = $objPHPExcel->getActiveSheet()->getComment('E11')->getText()->createTextRun('PHPExcel:'); -$objCommentRichText->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getComment('E11')->getText()->createTextRun("\r\n"); -$objPHPExcel->getActiveSheet()->getComment('E11')->getText()->createTextRun('Total amount on the current invoice, excluding VAT.'); - -$objPHPExcel->getActiveSheet()->getComment('E12')->setAuthor('PHPExcel'); -$objCommentRichText = $objPHPExcel->getActiveSheet()->getComment('E12')->getText()->createTextRun('PHPExcel:'); -$objCommentRichText->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getComment('E12')->getText()->createTextRun("\r\n"); -$objPHPExcel->getActiveSheet()->getComment('E12')->getText()->createTextRun('Total amount of VAT on the current invoice.'); - -$objPHPExcel->getActiveSheet()->getComment('E13')->setAuthor('PHPExcel'); -$objCommentRichText = $objPHPExcel->getActiveSheet()->getComment('E13')->getText()->createTextRun('PHPExcel:'); -$objCommentRichText->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getComment('E13')->getText()->createTextRun("\r\n"); -$objPHPExcel->getActiveSheet()->getComment('E13')->getText()->createTextRun('Total amount on the current invoice, including VAT.'); -$objPHPExcel->getActiveSheet()->getComment('E13')->setWidth('100pt'); -$objPHPExcel->getActiveSheet()->getComment('E13')->setHeight('100pt'); -$objPHPExcel->getActiveSheet()->getComment('E13')->setMarginLeft('150pt'); -$objPHPExcel->getActiveSheet()->getComment('E13')->getFillColor()->setRGB('EEEEEE'); - - -// Add rich-text string -echo date('H:i:s') , " Add rich-text string" , EOL; -$objRichText = new PHPExcel_RichText(); -$objRichText->createText('This invoice is '); - -$objPayable = $objRichText->createTextRun('payable within thirty days after the end of the month'); -$objPayable->getFont()->setBold(true); -$objPayable->getFont()->setItalic(true); -$objPayable->getFont()->setColor( new PHPExcel_Style_Color( PHPExcel_Style_Color::COLOR_DARKGREEN ) ); - -$objRichText->createText(', unless specified otherwise on the invoice.'); - -$objPHPExcel->getActiveSheet()->getCell('A18')->setValue($objRichText); - -// Merge cells -echo date('H:i:s') , " Merge cells" , EOL; -$objPHPExcel->getActiveSheet()->mergeCells('A18:E22'); -$objPHPExcel->getActiveSheet()->mergeCells('A28:B28'); // Just to test... -$objPHPExcel->getActiveSheet()->unmergeCells('A28:B28'); // Just to test... - -// Protect cells -echo date('H:i:s') , " Protect cells" , EOL; -$objPHPExcel->getActiveSheet()->getProtection()->setSheet(true); // Needs to be set to true in order to enable any worksheet protection! -$objPHPExcel->getActiveSheet()->protectCells('A3:E13', 'PHPExcel'); - -// Set cell number formats -echo date('H:i:s') , " Set cell number formats" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('E4:E13')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE); - -// Set column widths -echo date('H:i:s') , " Set column widths" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setAutoSize(true); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(12); -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(12); - -// Set fonts -echo date('H:i:s') , " Set fonts" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setName('Candara'); -$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setSize(20); -$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE); -$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_WHITE); - -$objPHPExcel->getActiveSheet()->getStyle('D1')->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_WHITE); -$objPHPExcel->getActiveSheet()->getStyle('E1')->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_WHITE); - -$objPHPExcel->getActiveSheet()->getStyle('D13')->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getStyle('E13')->getFont()->setBold(true); - -// Set alignments -echo date('H:i:s') , " Set alignments" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('D11')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT); -$objPHPExcel->getActiveSheet()->getStyle('D12')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT); -$objPHPExcel->getActiveSheet()->getStyle('D13')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT); - -$objPHPExcel->getActiveSheet()->getStyle('A18')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY); -$objPHPExcel->getActiveSheet()->getStyle('A18')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER); - -$objPHPExcel->getActiveSheet()->getStyle('B5')->getAlignment()->setShrinkToFit(true); - -// Set thin black border outline around column -echo date('H:i:s') , " Set thin black border outline around column" , EOL; -$styleThinBlackBorderOutline = array( - 'borders' => array( - 'outline' => array( - 'style' => PHPExcel_Style_Border::BORDER_THIN, - 'color' => array('argb' => 'FF000000'), - ), - ), -); -$objPHPExcel->getActiveSheet()->getStyle('A4:E10')->applyFromArray($styleThinBlackBorderOutline); - - -// Set thick brown border outline around "Total" -echo date('H:i:s') , " Set thick brown border outline around Total" , EOL; -$styleThickBrownBorderOutline = array( - 'borders' => array( - 'outline' => array( - 'style' => PHPExcel_Style_Border::BORDER_THICK, - 'color' => array('argb' => 'FF993300'), - ), - ), -); -$objPHPExcel->getActiveSheet()->getStyle('D13:E13')->applyFromArray($styleThickBrownBorderOutline); - -// Set fills -echo date('H:i:s') , " Set fills" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('A1:E1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID); -$objPHPExcel->getActiveSheet()->getStyle('A1:E1')->getFill()->getStartColor()->setARGB('FF808080'); - -// Set style for header row using alternative method -echo date('H:i:s') , " Set style for header row using alternative method" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('A3:E3')->applyFromArray( - array( - 'font' => array( - 'bold' => true - ), - 'alignment' => array( - 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_RIGHT, - ), - 'borders' => array( - 'top' => array( - 'style' => PHPExcel_Style_Border::BORDER_THIN - ) - ), - 'fill' => array( - 'type' => PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR, - 'rotation' => 90, - 'startcolor' => array( - 'argb' => 'FFA0A0A0' - ), - 'endcolor' => array( - 'argb' => 'FFFFFFFF' - ) - ) - ) -); - -$objPHPExcel->getActiveSheet()->getStyle('A3')->applyFromArray( - array( - 'alignment' => array( - 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT, - ), - 'borders' => array( - 'left' => array( - 'style' => PHPExcel_Style_Border::BORDER_THIN - ) - ) - ) -); - -$objPHPExcel->getActiveSheet()->getStyle('B3')->applyFromArray( - array( - 'alignment' => array( - 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT, - ) - ) -); - -$objPHPExcel->getActiveSheet()->getStyle('E3')->applyFromArray( - array( - 'borders' => array( - 'right' => array( - 'style' => PHPExcel_Style_Border::BORDER_THIN - ) - ) - ) -); - -// Unprotect a cell -echo date('H:i:s') , " Unprotect a cell" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('B1')->getProtection()->setLocked(PHPExcel_Style_Protection::PROTECTION_UNPROTECTED); - -// Add a hyperlink to the sheet -echo date('H:i:s') , " Add a hyperlink to an external website" , EOL; -$objPHPExcel->getActiveSheet()->setCellValue('E26', 'www.phpexcel.net'); -$objPHPExcel->getActiveSheet()->getCell('E26')->getHyperlink()->setUrl('http://www.phpexcel.net'); -$objPHPExcel->getActiveSheet()->getCell('E26')->getHyperlink()->setTooltip('Navigate to website'); -$objPHPExcel->getActiveSheet()->getStyle('E26')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT); - -echo date('H:i:s') , " Add a hyperlink to another cell on a different worksheet within the workbook" , EOL; -$objPHPExcel->getActiveSheet()->setCellValue('E27', 'Terms and conditions'); -$objPHPExcel->getActiveSheet()->getCell('E27')->getHyperlink()->setUrl("sheet://'Terms and conditions'!A1"); -$objPHPExcel->getActiveSheet()->getCell('E27')->getHyperlink()->setTooltip('Review terms and conditions'); -$objPHPExcel->getActiveSheet()->getStyle('E27')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_RIGHT); - -// Add a drawing to the worksheet -echo date('H:i:s') , " Add a drawing to the worksheet" , EOL; -$objDrawing = new PHPExcel_Worksheet_Drawing(); -$objDrawing->setName('Logo'); -$objDrawing->setDescription('Logo'); -$objDrawing->setPath('./images/officelogo.jpg'); -$objDrawing->setHeight(36); -$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); - -// Add a drawing to the worksheet -echo date('H:i:s') , " Add a drawing to the worksheet" , EOL; -$objDrawing = new PHPExcel_Worksheet_Drawing(); -$objDrawing->setName('Paid'); -$objDrawing->setDescription('Paid'); -$objDrawing->setPath('./images/paid.png'); -$objDrawing->setCoordinates('B15'); -$objDrawing->setOffsetX(110); -$objDrawing->setRotation(25); -$objDrawing->getShadow()->setVisible(true); -$objDrawing->getShadow()->setDirection(45); -$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); - -// Add a drawing to the worksheet -echo date('H:i:s') , " Add a drawing to the worksheet" , EOL; -$objDrawing = new PHPExcel_Worksheet_Drawing(); -$objDrawing->setName('PHPExcel logo'); -$objDrawing->setDescription('PHPExcel logo'); -$objDrawing->setPath('./images/phpexcel_logo.gif'); -$objDrawing->setHeight(36); -$objDrawing->setCoordinates('D24'); -$objDrawing->setOffsetX(10); -$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); - -// Play around with inserting and removing rows and columns -echo date('H:i:s') , " Play around with inserting and removing rows and columns" , EOL; -$objPHPExcel->getActiveSheet()->insertNewRowBefore(6, 10); -$objPHPExcel->getActiveSheet()->removeRow(6, 10); -$objPHPExcel->getActiveSheet()->insertNewColumnBefore('E', 5); -$objPHPExcel->getActiveSheet()->removeColumn('E', 5); - -// Set header and footer. When no different headers for odd/even are used, odd header is assumed. -echo date('H:i:s') , " Set header/footer" , EOL; -$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&BInvoice&RPrinted on &D'); -$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $objPHPExcel->getProperties()->getTitle() . '&RPage &P of &N'); - -// Set page orientation and size -echo date('H:i:s') , " Set page orientation and size" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT); -$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4); - -// Rename first worksheet -echo date('H:i:s') , " Rename first worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Invoice'); - - -// Create a new worksheet, after the default sheet -echo date('H:i:s') , " Create a second Worksheet object" , EOL; -$objPHPExcel->createSheet(); - -// Llorem ipsum... -$sLloremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus eget ante. Sed cursus nunc semper tortor. Aliquam luctus purus non elit. Fusce vel elit commodo sapien dignissim dignissim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur accumsan magna sed massa. Nullam bibendum quam ac ipsum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin augue. Praesent malesuada justo sed orci. Pellentesque lacus ligula, sodales quis, ultricies a, ultricies vitae, elit. Sed luctus consectetuer dolor. Vivamus vel sem ut nisi sodales accumsan. Nunc et felis. Suspendisse semper viverra odio. Morbi at odio. Integer a orci a purus venenatis molestie. Nam mattis. Praesent rhoncus, nisi vel mattis auctor, neque nisi faucibus sem, non dapibus elit pede ac nisl. Cras turpis.'; - -// Add some data to the second sheet, resembling some different data types -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(1); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Terms and conditions'); -$objPHPExcel->getActiveSheet()->setCellValue('A3', $sLloremIpsum); -$objPHPExcel->getActiveSheet()->setCellValue('A4', $sLloremIpsum); -$objPHPExcel->getActiveSheet()->setCellValue('A5', $sLloremIpsum); -$objPHPExcel->getActiveSheet()->setCellValue('A6', $sLloremIpsum); - -// Set the worksheet tab color -echo date('H:i:s') , " Set the worksheet tab color" , EOL; -$objPHPExcel->getActiveSheet()->getTabColor()->setARGB('FF0094FF');; - -// Set alignments -echo date('H:i:s') , " Set alignments" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('A3:A6')->getAlignment()->setWrapText(true); - -// Set column widths -echo date('H:i:s') , " Set column widths" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(80); - -// Set fonts -echo date('H:i:s') , " Set fonts" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setName('Candara'); -$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setSize(20); -$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getStyle('A1')->getFont()->setUnderline(PHPExcel_Style_Font::UNDERLINE_SINGLE); - -$objPHPExcel->getActiveSheet()->getStyle('A3:A6')->getFont()->setSize(8); - -// Add a drawing to the worksheet -echo date('H:i:s') , " Add a drawing to the worksheet" , EOL; -$objDrawing = new PHPExcel_Worksheet_Drawing(); -$objDrawing->setName('Terms and conditions'); -$objDrawing->setDescription('Terms and conditions'); -$objDrawing->setPath('./images/termsconditions.jpg'); -$objDrawing->setCoordinates('B14'); -$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); - -// Set page orientation and size -echo date('H:i:s') , " Set page orientation and size" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE); -$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4); - -// Rename second worksheet -echo date('H:i:s') , " Rename second worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Terms and conditions'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); diff --git a/vendor/phpoffice/phpexcel/Examples/05featuredemo.php b/vendor/phpoffice/phpexcel/Examples/05featuredemo.php deleted file mode 100644 index 9e502ac..0000000 --- a/vendor/phpoffice/phpexcel/Examples/05featuredemo.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -include "05featuredemo.inc.php"; - -/** Include PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching-sqlite.php b/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching-sqlite.php deleted file mode 100644 index 8baa743..0000000 --- a/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching-sqlite.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - -$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_sqlite; -if (PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) { - echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" , EOL; -} else { - echo date('H:i:s') , " Unable to set Cell Caching using " , $cacheMethod , " method, reverting to memory" , EOL; -} - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet -echo date('H:i:s') , " Add data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', "Firstname"); -$objPHPExcel->getActiveSheet()->setCellValue('B1', "Lastname"); -$objPHPExcel->getActiveSheet()->setCellValue('C1', "Phone"); -$objPHPExcel->getActiveSheet()->setCellValue('D1', "Fax"); -$objPHPExcel->getActiveSheet()->setCellValue('E1', "Is Client ?"); - - -// Hide "Phone" and "fax" column -echo date('H:i:s') , " Hide 'Phone' and 'fax' columns" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false); - - -// Set outline levels -echo date('H:i:s') , " Set outline levels" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1) - ->setVisible(false) - ->setCollapsed(true); - -// Freeze panes -echo date('H:i:s') , " Freeze panes" , EOL; -$objPHPExcel->getActiveSheet()->freezePane('A2'); - - -// Rows to repeat at top -echo date('H:i:s') , " Rows to repeat at top" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 1); - - -// Add data -for ($i = 2; $i <= 5000; $i++) { - $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, "FName $i") - ->setCellValue('B' . $i, "LName $i") - ->setCellValue('C' . $i, "PhoneNo $i") - ->setCellValue('D' . $i, "FaxNo $i") - ->setCellValue('E' . $i, true); -} - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching-sqlite3.php b/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching-sqlite3.php deleted file mode 100644 index 1f480d1..0000000 --- a/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching-sqlite3.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - -$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_sqlite3; -if (PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) { - echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" , EOL; -} else { - echo date('H:i:s') , " Unable to set Cell Caching using " , $cacheMethod , " method, reverting to memory" , EOL; -} - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet -echo date('H:i:s') , " Add data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', "Firstname"); -$objPHPExcel->getActiveSheet()->setCellValue('B1', "Lastname"); -$objPHPExcel->getActiveSheet()->setCellValue('C1', "Phone"); -$objPHPExcel->getActiveSheet()->setCellValue('D1', "Fax"); -$objPHPExcel->getActiveSheet()->setCellValue('E1', "Is Client ?"); - - -// Hide "Phone" and "fax" column -echo date('H:i:s') , " Hide 'Phone' and 'fax' columns" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false); - - -// Set outline levels -echo date('H:i:s') , " Set outline levels" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1) - ->setVisible(false) - ->setCollapsed(true); - -// Freeze panes -echo date('H:i:s') , " Freeze panes" , EOL; -$objPHPExcel->getActiveSheet()->freezePane('A2'); - - -// Rows to repeat at top -echo date('H:i:s') , " Rows to repeat at top" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 1); - - -// Add data -for ($i = 2; $i <= 5000; $i++) { - $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, "FName $i") - ->setCellValue('B' . $i, "LName $i") - ->setCellValue('C' . $i, "PhoneNo $i") - ->setCellValue('D' . $i, "FaxNo $i") - ->setCellValue('E' . $i, true); -} - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching.php b/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching.php deleted file mode 100644 index d20b29f..0000000 --- a/vendor/phpoffice/phpexcel/Examples/06largescale-with-cellcaching.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - -$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_in_memory_gzip; -if (!PHPExcel_Settings::setCacheStorageMethod($cacheMethod)) { - die($cacheMethod . " caching method is not available" . EOL); -} -echo date('H:i:s') , " Enable Cell Caching using " , $cacheMethod , " method" , EOL; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet -echo date('H:i:s') , " Add data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', "Firstname"); -$objPHPExcel->getActiveSheet()->setCellValue('B1', "Lastname"); -$objPHPExcel->getActiveSheet()->setCellValue('C1', "Phone"); -$objPHPExcel->getActiveSheet()->setCellValue('D1', "Fax"); -$objPHPExcel->getActiveSheet()->setCellValue('E1', "Is Client ?"); - - -// Hide "Phone" and "fax" column -echo date('H:i:s') , " Hide 'Phone' and 'fax' columns" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false); - - -// Set outline levels -echo date('H:i:s') , " Set outline levels" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1) - ->setVisible(false) - ->setCollapsed(true); - -// Freeze panes -echo date('H:i:s') , " Freeze panes" , EOL; -$objPHPExcel->getActiveSheet()->freezePane('A2'); - - -// Rows to repeat at top -echo date('H:i:s') , " Rows to repeat at top" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 1); - - -// Add data -for ($i = 2; $i <= 5000; $i++) { - $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, "FName $i") - ->setCellValue('B' . $i, "LName $i") - ->setCellValue('C' . $i, "PhoneNo $i") - ->setCellValue('D' . $i, "FaxNo $i") - ->setCellValue('E' . $i, true); -} - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/06largescale-xls.php b/vendor/phpoffice/phpexcel/Examples/06largescale-xls.php deleted file mode 100644 index 5adc3d2..0000000 --- a/vendor/phpoffice/phpexcel/Examples/06largescale-xls.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -/* -After doing some test, I've got these results benchmarked -for writing to Excel2007: - - Number of rows Seconds to generate - 200 3 - 500 4 - 1000 6 - 2000 12 - 4000 36 - 8000 64 - 15000 465 -*/ - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet -echo date('H:i:s') , " Add data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', "Firstname"); -$objPHPExcel->getActiveSheet()->setCellValue('B1', "Lastname"); -$objPHPExcel->getActiveSheet()->setCellValue('C1', "Phone"); -$objPHPExcel->getActiveSheet()->setCellValue('D1', "Fax"); -$objPHPExcel->getActiveSheet()->setCellValue('E1', "Is Client ?"); - - -// Hide "Phone" and "fax" column -echo date('H:i:s') , " Hide 'Phone' and 'fax' columns" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false); - - -// Set outline levels -echo date('H:i:s') , " Set outline levels" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1) - ->setVisible(false) - ->setCollapsed(true); - -// Freeze panes -echo date('H:i:s') , " Freeze panes" , EOL; -$objPHPExcel->getActiveSheet()->freezePane('A2'); - - -// Rows to repeat at top -echo date('H:i:s') , " Rows to repeat at top" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 1); - - -// Add data -for ($i = 2; $i <= 5000; $i++) { - $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, "FName $i") - ->setCellValue('B' . $i, "LName $i") - ->setCellValue('C' . $i, "PhoneNo $i") - ->setCellValue('D' . $i, "FaxNo $i") - ->setCellValue('E' . $i, true); -} - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/06largescale.php b/vendor/phpoffice/phpexcel/Examples/06largescale.php deleted file mode 100644 index cb21caf..0000000 --- a/vendor/phpoffice/phpexcel/Examples/06largescale.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -/* -After doing some test, I've got these results benchmarked -for writing to Excel2007: - - Number of rows Seconds to generate - 200 3 - 500 4 - 1000 6 - 2000 12 - 4000 36 - 8000 64 - 15000 465 -*/ - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet -echo date('H:i:s') , " Add data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', "Firstname"); -$objPHPExcel->getActiveSheet()->setCellValue('B1', "Lastname"); -$objPHPExcel->getActiveSheet()->setCellValue('C1', "Phone"); -$objPHPExcel->getActiveSheet()->setCellValue('D1', "Fax"); -$objPHPExcel->getActiveSheet()->setCellValue('E1', "Is Client ?"); - - -// Hide "Phone" and "fax" column -echo date('H:i:s') , " Hide 'Phone' and 'fax' columns" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setVisible(false); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setVisible(false); - - -// Set outline levels -echo date('H:i:s') , " Set outline levels" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setOutlineLevel(1) - ->setVisible(false) - ->setCollapsed(true); - -// Freeze panes -echo date('H:i:s') , " Freeze panes" , EOL; -$objPHPExcel->getActiveSheet()->freezePane('A2'); - - -// Rows to repeat at top -echo date('H:i:s') , " Rows to repeat at top" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 1); - - -// Add data -for ($i = 2; $i <= 5000; $i++) { - $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, "FName $i") - ->setCellValue('B' . $i, "LName $i") - ->setCellValue('C' . $i, "PhoneNo $i") - ->setCellValue('D' . $i, "FaxNo $i") - ->setCellValue('E' . $i, true); -} - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/07reader.php b/vendor/phpoffice/phpexcel/Examples/07reader.php deleted file mode 100644 index 318ba18..0000000 --- a/vendor/phpoffice/phpexcel/Examples/07reader.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -if (!file_exists("05featuredemo.xlsx")) { - exit("Please run 05featuredemo.php first." . EOL); -} - -echo date('H:i:s') , " Load from Excel2007 file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcel = PHPExcel_IOFactory::load("05featuredemo.xlsx"); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/07readerPCLZip.php b/vendor/phpoffice/phpexcel/Examples/07readerPCLZip.php deleted file mode 100644 index f1da9c5..0000000 --- a/vendor/phpoffice/phpexcel/Examples/07readerPCLZip.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -if (!file_exists("05featuredemo.xlsx")) { - exit("Please run 05featuredemo.php first." . EOL); -} - -// Use PCLZip rather than ZipArchive to read the Excel2007 OfficeOpenXML file -PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP); - -echo date('H:i:s') , " Load from Excel2007 file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcel = PHPExcel_IOFactory::load("05featuredemo.xlsx"); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/08conditionalformatting.php b/vendor/phpoffice/phpexcel/Examples/08conditionalformatting.php deleted file mode 100644 index 514a8bb..0000000 --- a/vendor/phpoffice/phpexcel/Examples/08conditionalformatting.php +++ /dev/null @@ -1,189 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet, representing sales data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Description') - ->setCellValue('B1', 'Amount'); - -$objPHPExcel->getActiveSheet()->setCellValue('A2', 'Paycheck received') - ->setCellValue('B2', 100); - -$objPHPExcel->getActiveSheet()->setCellValue('A3', 'Cup of coffee bought') - ->setCellValue('B3', -1.5); - -$objPHPExcel->getActiveSheet()->setCellValue('A4', 'Cup of coffee bought') - ->setCellValue('B4', -1.5); - -$objPHPExcel->getActiveSheet()->setCellValue('A5', 'Cup of tea bought') - ->setCellValue('B5', -1.2); - -$objPHPExcel->getActiveSheet()->setCellValue('A6', 'Found some money') - ->setCellValue('B6', 8); - -$objPHPExcel->getActiveSheet()->setCellValue('A7', 'Total:') - ->setCellValue('B7', '=SUM(B2:B6)'); - - -// Set column widths -echo date('H:i:s') , " Set column widths" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(30); -$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(12); - - -// Add conditional formatting -echo date('H:i:s') , " Add conditional formatting" , EOL; -$objConditional1 = new PHPExcel_Style_Conditional(); -$objConditional1->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS) - ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_BETWEEN) - ->addCondition('200') - ->addCondition('400'); -$objConditional1->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_YELLOW); -$objConditional1->getStyle()->getFont()->setBold(true); -$objConditional1->getStyle()->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE); - -$objConditional2 = new PHPExcel_Style_Conditional(); -$objConditional2->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS) - ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_LESSTHAN) - ->addCondition('0'); -$objConditional2->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_RED); -$objConditional2->getStyle()->getFont()->setItalic(true); -$objConditional2->getStyle()->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE); - -$objConditional3 = new PHPExcel_Style_Conditional(); -$objConditional3->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS) - ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_GREATERTHANOREQUAL) - ->addCondition('0'); -$objConditional3->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_GREEN); -$objConditional3->getStyle()->getFont()->setItalic(true); -$objConditional3->getStyle()->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE); - -$conditionalStyles = $objPHPExcel->getActiveSheet()->getStyle('B2')->getConditionalStyles(); -array_push($conditionalStyles, $objConditional1); -array_push($conditionalStyles, $objConditional2); -array_push($conditionalStyles, $objConditional3); -$objPHPExcel->getActiveSheet()->getStyle('B2')->setConditionalStyles($conditionalStyles); - - -// duplicate the conditional styles across a range of cells -echo date('H:i:s') , " Duplicate the conditional formatting across a range of cells" , EOL; -$objPHPExcel->getActiveSheet()->duplicateConditionalStyle( - $objPHPExcel->getActiveSheet()->getStyle('B2')->getConditionalStyles(), - 'B3:B7' - ); - - -// Set fonts -echo date('H:i:s') , " Set fonts" , EOL; -$objPHPExcel->getActiveSheet()->getStyle('A1:B1')->getFont()->setBold(true); -//$objPHPExcel->getActiveSheet()->getStyle('B1')->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getStyle('A7:B7')->getFont()->setBold(true); -//$objPHPExcel->getActiveSheet()->getStyle('B7')->getFont()->setBold(true); - - -// Set header and footer. When no different headers for odd/even are used, odd header is assumed. -echo date('H:i:s') , " Set header/footer" , EOL; -$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddHeader('&L&BPersonal cash register&RPrinted on &D'); -$objPHPExcel->getActiveSheet()->getHeaderFooter()->setOddFooter('&L&B' . $objPHPExcel->getProperties()->getTitle() . '&RPage &P of &N'); - - -// Set page orientation and size -echo date('H:i:s') , " Set page orientation and size" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT); -$objPHPExcel->getActiveSheet()->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4); - - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Invoice'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Save Excel5 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/08conditionalformatting2.php b/vendor/phpoffice/phpexcel/Examples/08conditionalformatting2.php deleted file mode 100644 index aeb2a31..0000000 --- a/vendor/phpoffice/phpexcel/Examples/08conditionalformatting2.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet, representing sales data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet() - ->setCellValue('A1', '-0.5') - ->setCellValue('A2', '-0.25') - ->setCellValue('A3', '0.0') - ->setCellValue('A4', '0.25') - ->setCellValue('A5', '0.5') - ->setCellValue('A6', '0.75') - ->setCellValue('A7', '1.0') - ->setCellValue('A8', '1.25') -; - -$objPHPExcel->getActiveSheet()->getStyle('A1:A8') - ->getNumberFormat() - ->setFormatCode( - PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00 - ); - - -// Add conditional formatting -echo date('H:i:s') , " Add conditional formatting" , EOL; -$objConditional1 = new PHPExcel_Style_Conditional(); -$objConditional1->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS) - ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_LESSTHAN) - ->addCondition('0'); -$objConditional1->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_RED); - -$objConditional3 = new PHPExcel_Style_Conditional(); -$objConditional3->setConditionType(PHPExcel_Style_Conditional::CONDITION_CELLIS) - ->setOperatorType(PHPExcel_Style_Conditional::OPERATOR_GREATERTHANOREQUAL) - ->addCondition('1'); -$objConditional3->getStyle()->getFont()->getColor()->setARGB(PHPExcel_Style_Color::COLOR_GREEN); - -$conditionalStyles = $objPHPExcel->getActiveSheet()->getStyle('A1')->getConditionalStyles(); -array_push($conditionalStyles, $objConditional1); -array_push($conditionalStyles, $objConditional3); -$objPHPExcel->getActiveSheet()->getStyle('A1')->setConditionalStyles($conditionalStyles); - - -// duplicate the conditional styles across a range of cells -echo date('H:i:s') , " Duplicate the conditional formatting across a range of cells" , EOL; -$objPHPExcel->getActiveSheet()->duplicateConditionalStyle( - $objPHPExcel->getActiveSheet()->getStyle('A1')->getConditionalStyles(), - 'A2:A8' - ); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Save Excel5 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/09pagebreaks.php b/vendor/phpoffice/phpexcel/Examples/09pagebreaks.php deleted file mode 100644 index 36e21ae..0000000 --- a/vendor/phpoffice/phpexcel/Examples/09pagebreaks.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet -echo date('H:i:s') , " Add data and page breaks" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', "Firstname") - ->setCellValue('B1', "Lastname") - ->setCellValue('C1', "Phone") - ->setCellValue('D1', "Fax") - ->setCellValue('E1', "Is Client ?"); - - -// Add data -for ($i = 2; $i <= 50; $i++) { - $objPHPExcel->getActiveSheet()->setCellValue('A' . $i, "FName $i"); - $objPHPExcel->getActiveSheet()->setCellValue('B' . $i, "LName $i"); - $objPHPExcel->getActiveSheet()->setCellValue('C' . $i, "PhoneNo $i"); - $objPHPExcel->getActiveSheet()->setCellValue('D' . $i, "FaxNo $i"); - $objPHPExcel->getActiveSheet()->setCellValue('E' . $i, true); - - // Add page breaks every 10 rows - if ($i % 10 == 0) { - // Add a page break - $objPHPExcel->getActiveSheet()->setBreak( 'A' . $i, PHPExcel_Worksheet::BREAK_ROW ); - } -} - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setTitle('Printing Options'); - -// Set print headers -$objPHPExcel->getActiveSheet() - ->getHeaderFooter()->setOddHeader('&C&24&K0000FF&B&U&A'); -$objPHPExcel->getActiveSheet() - ->getHeaderFooter()->setEvenHeader('&C&24&K0000FF&B&U&A'); - -// Set print footers -$objPHPExcel->getActiveSheet() - ->getHeaderFooter()->setOddFooter('&R&D &T&C&F&LPage &P / &N'); -$objPHPExcel->getActiveSheet() - ->getHeaderFooter()->setEvenFooter('&L&D &T&C&F&RPage &P / &N'); - - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-1.php b/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-1.php deleted file mode 100644 index 8cdc0de..0000000 --- a/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-1.php +++ /dev/null @@ -1,221 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s').' Create new PHPExcel object'.EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s').' Set document properties'.EOL; -$objPHPExcel->getProperties()->setCreator('Maarten Balliauw') - ->setLastModifiedBy('Maarten Balliauw') - ->setTitle('PHPExcel Test Document') - ->setSubject('PHPExcel Test Document') - ->setDescription('Test document for PHPExcel, generated using PHP classes.') - ->setKeywords('office PHPExcel php') - ->setCategory('Test result file'); - -// Create the worksheet -echo date('H:i:s').' Add data'.EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Financial Year') - ->setCellValue('B1', 'Financial Period') - ->setCellValue('C1', 'Country') - ->setCellValue('D1', 'Date') - ->setCellValue('E1', 'Sales Value') - ->setCellValue('F1', 'Expenditure') - ; -$startYear = $endYear = $currentYear = date('Y'); -$startYear--; -$endYear++; - -$years = range($startYear,$endYear); -$periods = range(1,12); -$countries = array( 'United States', 'UK', 'France', 'Germany', - 'Italy', 'Spain', 'Portugal', 'Japan' - ); - -$row = 2; -foreach($years as $year) { - foreach($periods as $period) { - foreach($countries as $country) { - $endDays = date('t',mktime(0,0,0,$period,1,$year)); - for($i = 1; $i <= $endDays; ++$i) { - $eDate = PHPExcel_Shared_Date::FormattedPHPToExcel( - $year, - $period, - $i - ); - $value = rand(500,1000) * (1 + rand(-0.25,+0.25)); - $salesValue = $invoiceValue = NULL; - $incomeOrExpenditure = rand(-1,1); - if ($incomeOrExpenditure == -1) { - $expenditure = rand(-500,-1000) * (1 + rand(-0.25,+0.25)); - $income = NULL; - } elseif ($incomeOrExpenditure == 1) { - $expenditure = rand(-500,-1000) * (1 + rand(-0.25,+0.25)); - $income = rand(500,1000) * (1 + rand(-0.25,+0.25));; - } else { - $expenditure = NULL; - $income = rand(500,1000) * (1 + rand(-0.25,+0.25));; - } - $dataArray = array( $year, - $period, - $country, - $eDate, - $income, - $expenditure, - ); - $objPHPExcel->getActiveSheet()->fromArray($dataArray, NULL, 'A'.$row++); - } - } - } -} -$row--; - - -// Set styling -echo date('H:i:s').' Set styling'.EOL; -$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(TRUE); -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(12.5); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10.5); -$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2); -$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE); -$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(14); -$objPHPExcel->getActiveSheet()->freezePane('A2'); - - - -// Set autofilter range -echo date('H:i:s').' Set autofilter range'.EOL; -// Always include the complete filter range! -// Excel does support setting only the caption -// row, but that's not a best practise... -$objPHPExcel->getActiveSheet()->setAutoFilter($objPHPExcel->getActiveSheet()->calculateWorksheetDimension()); - -// Set active filters -$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter(); -echo date('H:i:s').' Set active filters'.EOL; -// Filter the Country column on a filter value of countries beginning with the letter U (or Japan) -// We use * as a wildcard, so specify as U* and using a wildcard requires customFilter -$autoFilter->getColumn('C') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - 'u*' - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); -$autoFilter->getColumn('C') - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - 'japan' - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); -// Filter the Date column on a filter value of the first day of every period of the current year -// We us a dateGroup ruletype for this, although it is still a standard filter -foreach($periods as $period) { - $endDate = date('t',mktime(0,0,0,$period,1,$currentYear)); - - $autoFilter->getColumn('D') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - array( - 'year' => $currentYear, - 'month' => $period, - 'day' => $endDate - ) - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP); -} -// Display only sales values that are blank -// Standard filter, operator equals, and value of NULL -$autoFilter->getColumn('E') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - '' - ); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s').' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB'.EOL; - -// Echo done -echo date('H:i:s').' Done writing files'.EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-2.php b/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-2.php deleted file mode 100644 index e2aea74..0000000 --- a/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-2.php +++ /dev/null @@ -1,213 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s').' Create new PHPExcel object'.EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s').' Set document properties'.EOL; -$objPHPExcel->getProperties()->setCreator('Maarten Balliauw') - ->setLastModifiedBy('Maarten Balliauw') - ->setTitle('PHPExcel Test Document') - ->setSubject('PHPExcel Test Document') - ->setDescription('Test document for PHPExcel, generated using PHP classes.') - ->setKeywords('office PHPExcel php') - ->setCategory('Test result file'); - -// Create the worksheet -echo date('H:i:s').' Add data'.EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Financial Year') - ->setCellValue('B1', 'Financial Period') - ->setCellValue('C1', 'Country') - ->setCellValue('D1', 'Date') - ->setCellValue('E1', 'Sales Value') - ->setCellValue('F1', 'Expenditure') - ; -$startYear = $endYear = $currentYear = date('Y'); -$startYear--; -$endYear++; - -$years = range($startYear,$endYear); -$periods = range(1,12); -$countries = array( 'United States', 'UK', 'France', 'Germany', - 'Italy', 'Spain', 'Portugal', 'Japan' - ); - -$row = 2; -foreach($years as $year) { - foreach($periods as $period) { - foreach($countries as $country) { - $endDays = date('t',mktime(0,0,0,$period,1,$year)); - for($i = 1; $i <= $endDays; ++$i) { - $eDate = PHPExcel_Shared_Date::FormattedPHPToExcel( - $year, - $period, - $i - ); - $value = rand(500,1000) * (1 + rand(-0.25,+0.25)); - $salesValue = $invoiceValue = NULL; - $incomeOrExpenditure = rand(-1,1); - if ($incomeOrExpenditure == -1) { - $expenditure = rand(-500,-1000) * (1 + rand(-0.25,+0.25)); - $income = NULL; - } elseif ($incomeOrExpenditure == 1) { - $expenditure = rand(-500,-1000) * (1 + rand(-0.25,+0.25)); - $income = rand(500,1000) * (1 + rand(-0.25,+0.25));; - } else { - $expenditure = NULL; - $income = rand(500,1000) * (1 + rand(-0.25,+0.25));; - } - $dataArray = array( $year, - $period, - $country, - $eDate, - $income, - $expenditure, - ); - $objPHPExcel->getActiveSheet()->fromArray($dataArray, NULL, 'A'.$row++); - } - } - } -} -$row--; - - -// Set styling -echo date('H:i:s').' Set styling'.EOL; -$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(TRUE); -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(12.5); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10.5); -$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2); -$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE); -$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(14); -$objPHPExcel->getActiveSheet()->freezePane('A2'); - - - -// Set autofilter range -echo date('H:i:s').' Set autofilter range'.EOL; -// Always include the complete filter range! -// Excel does support setting only the caption -// row, but that's not a best practise... -$objPHPExcel->getActiveSheet()->setAutoFilter($objPHPExcel->getActiveSheet()->calculateWorksheetDimension()); - -// Set active filters -$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter(); -echo date('H:i:s').' Set active filters'.EOL; -// Filter the Country column on a filter value of Germany -// As it's just a simple value filter, we can use FILTERTYPE_FILTER -$autoFilter->getColumn('C') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - 'Germany' - ); -// Filter the Date column on a filter value of the year to date -$autoFilter->getColumn('D') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_DYNAMICFILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - NULL, - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMIC_YEARTODATE - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DYNAMICFILTER); -// Display only sales values that are between 400 and 600 -$autoFilter->getColumn('E') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_GREATERTHANOREQUAL, - 400 - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); -$autoFilter->getColumn('E') - ->setJoin(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_COLUMN_JOIN_AND) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_LESSTHANOREQUAL, - 600 - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s').' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB'.EOL; - -// Echo done -echo date('H:i:s').' Done writing files'.EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-display.php b/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-display.php deleted file mode 100644 index ba3fed9..0000000 --- a/vendor/phpoffice/phpexcel/Examples/10autofilter-selection-display.php +++ /dev/null @@ -1,198 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s').' Create new PHPExcel object'.EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s').' Set document properties'.EOL; -$objPHPExcel->getProperties()->setCreator('Maarten Balliauw') - ->setLastModifiedBy('Maarten Balliauw') - ->setTitle('PHPExcel Test Document') - ->setSubject('PHPExcel Test Document') - ->setDescription('Test document for PHPExcel, generated using PHP classes.') - ->setKeywords('office PHPExcel php') - ->setCategory('Test result file'); - -// Create the worksheet -echo date('H:i:s').' Add data'.EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Financial Year') - ->setCellValue('B1', 'Financial Period') - ->setCellValue('C1', 'Country') - ->setCellValue('D1', 'Date') - ->setCellValue('E1', 'Sales Value') - ->setCellValue('F1', 'Expenditure') - ; -$startYear = $endYear = $currentYear = date('Y'); -$startYear--; -$endYear++; - -$years = range($startYear,$endYear); -$periods = range(1,12); -$countries = array( 'United States', 'UK', 'France', 'Germany', - 'Italy', 'Spain', 'Portugal', 'Japan' - ); - -$row = 2; -foreach($years as $year) { - foreach($periods as $period) { - foreach($countries as $country) { - $endDays = date('t',mktime(0,0,0,$period,1,$year)); - for($i = 1; $i <= $endDays; ++$i) { - $eDate = PHPExcel_Shared_Date::FormattedPHPToExcel( - $year, - $period, - $i - ); - $value = rand(500,1000) * (1 + rand(-0.25,+0.25)); - $salesValue = $invoiceValue = NULL; - $incomeOrExpenditure = rand(-1,1); - if ($incomeOrExpenditure == -1) { - $expenditure = rand(-500,-1000) * (1 + rand(-0.25,+0.25)); - $income = NULL; - } elseif ($incomeOrExpenditure == 1) { - $expenditure = rand(-500,-1000) * (1 + rand(-0.25,+0.25)); - $income = rand(500,1000) * (1 + rand(-0.25,+0.25));; - } else { - $expenditure = NULL; - $income = rand(500,1000) * (1 + rand(-0.25,+0.25));; - } - $dataArray = array( $year, - $period, - $country, - $eDate, - $income, - $expenditure, - ); - $objPHPExcel->getActiveSheet()->fromArray($dataArray, NULL, 'A'.$row++); - } - } - } -} -$row--; - - -// Set styling -echo date('H:i:s').' Set styling'.EOL; -$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true); -$objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getAlignment()->setWrapText(TRUE); -$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(12.5); -$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10.5); -$objPHPExcel->getActiveSheet()->getStyle('D2:D'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDD2); -$objPHPExcel->getActiveSheet()->getStyle('E2:F'.$row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE); -$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(14); -$objPHPExcel->getActiveSheet()->freezePane('A2'); - - - -// Set autofilter range -echo date('H:i:s').' Set autofilter range'.EOL; -// Always include the complete filter range! -// Excel does support setting only the caption -// row, but that's not a best practise... -$objPHPExcel->getActiveSheet()->setAutoFilter($objPHPExcel->getActiveSheet()->calculateWorksheetDimension()); - -// Set active filters -$autoFilter = $objPHPExcel->getActiveSheet()->getAutoFilter(); -echo date('H:i:s').' Set active filters'.EOL; -// Filter the Country column on a filter value of countries beginning with the letter U (or Japan) -// We use * as a wildcard, so specify as U* and using a wildcard requires customFilter -$autoFilter->getColumn('C') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_CUSTOMFILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - 'u*' - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); -$autoFilter->getColumn('C') - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - 'japan' - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER); -// Filter the Date column on a filter value of the first day of every period of the current year -// We us a dateGroup ruletype for this, although it is still a standard filter -foreach($periods as $period) { - $endDate = date('t',mktime(0,0,0,$period,1,$currentYear)); - - $autoFilter->getColumn('D') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - array( - 'year' => $currentYear, - 'month' => $period, - 'day' => $endDate - ) - ) - ->setRuleType(PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_RULETYPE_DATEGROUP); -} -// Display only sales values that are blank -// Standard filter, operator equals, and value of NULL -$autoFilter->getColumn('E') - ->setFilterType(PHPExcel_Worksheet_AutoFilter_Column::AUTOFILTER_FILTERTYPE_FILTER) - ->createRule() - ->setRule( - PHPExcel_Worksheet_AutoFilter_Column_Rule::AUTOFILTER_COLUMN_RULE_EQUAL, - '' - ); - -// Execute filtering -echo date('H:i:s').' Execute filtering'.EOL; -$autoFilter->showHideRows(); - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Display Results of filtering -echo date('H:i:s').' Display filtered rows'.EOL; -foreach ($objPHPExcel->getActiveSheet()->getRowIterator() as $row) { - if ($objPHPExcel->getActiveSheet()->getRowDimension($row->getRowIndex())->getVisible()) { - echo ' Row number - ' , $row->getRowIndex() , ' '; - echo $objPHPExcel->getActiveSheet()->getCell('C'.$row->getRowIndex())->getValue(), ' '; - echo $objPHPExcel->getActiveSheet()->getCell('D'.$row->getRowIndex())->getFormattedValue(), ' '; - echo EOL; - } -} diff --git a/vendor/phpoffice/phpexcel/Examples/10autofilter.php b/vendor/phpoffice/phpexcel/Examples/10autofilter.php deleted file mode 100644 index 015e9cf..0000000 --- a/vendor/phpoffice/phpexcel/Examples/10autofilter.php +++ /dev/null @@ -1,171 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - -// Create new PHPExcel object -echo date('H:i:s').' Create new PHPExcel object'.EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s').' Set document properties'.EOL; -$objPHPExcel->getProperties()->setCreator('Maarten Balliauw') - ->setLastModifiedBy('Maarten Balliauw') - ->setTitle('PHPExcel Test Document') - ->setSubject('PHPExcel Test Document') - ->setDescription('Test document for PHPExcel, generated using PHP classes.') - ->setKeywords('office PHPExcel php') - ->setCategory('Test result file'); - -// Create the worksheet -echo date('H:i:s').' Add data'.EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Year') - ->setCellValue('B1', 'Quarter') - ->setCellValue('C1', 'Country') - ->setCellValue('D1', 'Sales'); - -$dataArray = array(array('2010', 'Q1', 'United States', 790), - array('2010', 'Q2', 'United States', 730), - array('2010', 'Q3', 'United States', 860), - array('2010', 'Q4', 'United States', 850), - array('2011', 'Q1', 'United States', 800), - array('2011', 'Q2', 'United States', 700), - array('2011', 'Q3', 'United States', 900), - array('2011', 'Q4', 'United States', 950), - array('2010', 'Q1', 'Belgium', 380), - array('2010', 'Q2', 'Belgium', 390), - array('2010', 'Q3', 'Belgium', 420), - array('2010', 'Q4', 'Belgium', 460), - array('2011', 'Q1', 'Belgium', 400), - array('2011', 'Q2', 'Belgium', 350), - array('2011', 'Q3', 'Belgium', 450), - array('2011', 'Q4', 'Belgium', 500), - array('2010', 'Q1', 'UK', 690), - array('2010', 'Q2', 'UK', 610), - array('2010', 'Q3', 'UK', 620), - array('2010', 'Q4', 'UK', 600), - array('2011', 'Q1', 'UK', 720), - array('2011', 'Q2', 'UK', 650), - array('2011', 'Q3', 'UK', 580), - array('2011', 'Q4', 'UK', 510), - array('2010', 'Q1', 'France', 510), - array('2010', 'Q2', 'France', 490), - array('2010', 'Q3', 'France', 460), - array('2010', 'Q4', 'France', 590), - array('2011', 'Q1', 'France', 620), - array('2011', 'Q2', 'France', 650), - array('2011', 'Q3', 'France', 415), - array('2011', 'Q4', 'France', 570), - array('2010', 'Q1', 'Germany', 720), - array('2010', 'Q2', 'Germany', 680), - array('2010', 'Q3', 'Germany', 640), - array('2010', 'Q4', 'Germany', 660), - array('2011', 'Q1', 'Germany', 680), - array('2011', 'Q2', 'Germany', 620), - array('2011', 'Q3', 'Germany', 710), - array('2011', 'Q4', 'Germany', 690), - array('2010', 'Q1', 'Spain', 510), - array('2010', 'Q2', 'Spain', 490), - array('2010', 'Q3', 'Spain', 470), - array('2010', 'Q4', 'Spain', 420), - array('2011', 'Q1', 'Spain', 460), - array('2011', 'Q2', 'Spain', 390), - array('2011', 'Q3', 'Spain', 430), - array('2011', 'Q4', 'Spain', 415), - array('2010', 'Q1', 'Italy', 440), - array('2010', 'Q2', 'Italy', 410), - array('2010', 'Q3', 'Italy', 420), - array('2010', 'Q4', 'Italy', 450), - array('2011', 'Q1', 'Italy', 430), - array('2011', 'Q2', 'Italy', 370), - array('2011', 'Q3', 'Italy', 350), - array('2011', 'Q4', 'Italy', 335), - ); -$objPHPExcel->getActiveSheet()->fromArray($dataArray, NULL, 'A2'); - -// Set title row bold -echo date('H:i:s').' Set title row bold'.EOL; -$objPHPExcel->getActiveSheet()->getStyle('A1:D1')->getFont()->setBold(true); - -// Set autofilter -echo date('H:i:s').' Set autofilter'.EOL; -// Always include the complete filter range! -// Excel does support setting only the caption -// row, but that's not a best practise... -$objPHPExcel->getActiveSheet()->setAutoFilter($objPHPExcel->getActiveSheet()->calculateWorksheetDimension()); - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s').' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB'.EOL; - -// Echo done -echo date('H:i:s').' Done writing files'.EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/11documentsecurity-xls.php b/vendor/phpoffice/phpexcel/Examples/11documentsecurity-xls.php deleted file mode 100644 index 2348ce9..0000000 --- a/vendor/phpoffice/phpexcel/Examples/11documentsecurity-xls.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Hello'); -$objPHPExcel->getActiveSheet()->setCellValue('B2', 'world!'); -$objPHPExcel->getActiveSheet()->setCellValue('C1', 'Hello'); -$objPHPExcel->getActiveSheet()->setCellValue('D2', 'world!'); - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set document security -echo date('H:i:s') , " Set document security" , EOL; -$objPHPExcel->getSecurity()->setLockWindows(true); -$objPHPExcel->getSecurity()->setLockStructure(true); -$objPHPExcel->getSecurity()->setWorkbookPassword("PHPExcel"); - - -// Set sheet security -echo date('H:i:s') , " Set sheet security" , EOL; -$objPHPExcel->getActiveSheet()->getProtection()->setPassword('PHPExcel'); -$objPHPExcel->getActiveSheet()->getProtection()->setSheet(true); // This should be enabled in order to enable any of the following! -$objPHPExcel->getActiveSheet()->getProtection()->setSort(true); -$objPHPExcel->getActiveSheet()->getProtection()->setInsertRows(true); -$objPHPExcel->getActiveSheet()->getProtection()->setFormatCells(true); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/11documentsecurity.php b/vendor/phpoffice/phpexcel/Examples/11documentsecurity.php deleted file mode 100644 index 9fd4fb2..0000000 --- a/vendor/phpoffice/phpexcel/Examples/11documentsecurity.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Hello'); -$objPHPExcel->getActiveSheet()->setCellValue('B2', 'world!'); -$objPHPExcel->getActiveSheet()->setCellValue('C1', 'Hello'); -$objPHPExcel->getActiveSheet()->setCellValue('D2', 'world!'); - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set document security -echo date('H:i:s') , " Set document security" , EOL; -$objPHPExcel->getSecurity()->setLockWindows(true); -$objPHPExcel->getSecurity()->setLockStructure(true); -$objPHPExcel->getSecurity()->setWorkbookPassword("PHPExcel"); - - -// Set sheet security -echo date('H:i:s') , " Set sheet security" , EOL; -$objPHPExcel->getActiveSheet()->getProtection()->setPassword('PHPExcel'); -$objPHPExcel->getActiveSheet()->getProtection()->setSheet(true); // This should be enabled in order to enable any of the following! -$objPHPExcel->getActiveSheet()->getProtection()->setSort(true); -$objPHPExcel->getActiveSheet()->getProtection()->setInsertRows(true); -$objPHPExcel->getActiveSheet()->getProtection()->setFormatCells(true); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/12cellProtection.php b/vendor/phpoffice/phpexcel/Examples/12cellProtection.php deleted file mode 100644 index e12c9ae..0000000 --- a/vendor/phpoffice/phpexcel/Examples/12cellProtection.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Mark Baker") - ->setLastModifiedBy("Mark Baker") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Crouching'); -$objPHPExcel->getActiveSheet()->setCellValue('B1', 'Tiger'); -$objPHPExcel->getActiveSheet()->setCellValue('A2', 'Hidden'); -$objPHPExcel->getActiveSheet()->setCellValue('B2', 'Dragon'); - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set document security -echo date('H:i:s') , " Set cell protection" , EOL; - - -// Set sheet security -echo date('H:i:s') , " Set sheet security" , EOL; -$objPHPExcel->getActiveSheet()->getProtection()->setSheet(true); -$objPHPExcel->getActiveSheet() - ->getStyle('A2:B2') - ->getProtection()->setLocked( - PHPExcel_Style_Protection::PROTECTION_UNPROTECTED - ); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/13calculation.php b/vendor/phpoffice/phpexcel/Examples/13calculation.php deleted file mode 100644 index e255d11..0000000 --- a/vendor/phpoffice/phpexcel/Examples/13calculation.php +++ /dev/null @@ -1,235 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); -mt_srand(1234567890); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// List functions -echo date('H:i:s') , " List implemented functions" , EOL; -$objCalc = PHPExcel_Calculation::getInstance(); -print_r($objCalc->listFunctionNames()); - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Add some data, we will use some formulas here -echo date('H:i:s') , " Add some data and formulas" , EOL; -$objPHPExcel->getActiveSheet()->setCellValue('A14', 'Count:') - ->setCellValue('A15', 'Sum:') - ->setCellValue('A16', 'Max:') - ->setCellValue('A17', 'Min:') - ->setCellValue('A18', 'Average:') - ->setCellValue('A19', 'Median:') - ->setCellValue('A20', 'Mode:'); - -$objPHPExcel->getActiveSheet()->setCellValue('A22', 'CountA:') - ->setCellValue('A23', 'MaxA:') - ->setCellValue('A24', 'MinA:'); - -$objPHPExcel->getActiveSheet()->setCellValue('A26', 'StDev:') - ->setCellValue('A27', 'StDevA:') - ->setCellValue('A28', 'StDevP:') - ->setCellValue('A29', 'StDevPA:'); - -$objPHPExcel->getActiveSheet()->setCellValue('A31', 'DevSq:') - ->setCellValue('A32', 'Var:') - ->setCellValue('A33', 'VarA:') - ->setCellValue('A34', 'VarP:') - ->setCellValue('A35', 'VarPA:'); - -$objPHPExcel->getActiveSheet()->setCellValue('A37', 'Date:'); - - -$objPHPExcel->getActiveSheet()->setCellValue('B1', 'Range 1') - ->setCellValue('B2', 2) - ->setCellValue('B3', 8) - ->setCellValue('B4', 10) - ->setCellValue('B5', True) - ->setCellValue('B6', False) - ->setCellValue('B7', 'Text String') - ->setCellValue('B9', '22') - ->setCellValue('B10', 4) - ->setCellValue('B11', 6) - ->setCellValue('B12', 12); - -$objPHPExcel->getActiveSheet()->setCellValue('B14', '=COUNT(B2:B12)') - ->setCellValue('B15', '=SUM(B2:B12)') - ->setCellValue('B16', '=MAX(B2:B12)') - ->setCellValue('B17', '=MIN(B2:B12)') - ->setCellValue('B18', '=AVERAGE(B2:B12)') - ->setCellValue('B19', '=MEDIAN(B2:B12)') - ->setCellValue('B20', '=MODE(B2:B12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('B22', '=COUNTA(B2:B12)') - ->setCellValue('B23', '=MAXA(B2:B12)') - ->setCellValue('B24', '=MINA(B2:B12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('B26', '=STDEV(B2:B12)') - ->setCellValue('B27', '=STDEVA(B2:B12)') - ->setCellValue('B28', '=STDEVP(B2:B12)') - ->setCellValue('B29', '=STDEVPA(B2:B12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('B31', '=DEVSQ(B2:B12)') - ->setCellValue('B32', '=VAR(B2:B12)') - ->setCellValue('B33', '=VARA(B2:B12)') - ->setCellValue('B34', '=VARP(B2:B12)') - ->setCellValue('B35', '=VARPA(B2:B12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('B37', '=DATE(2007, 12, 21)') - ->setCellValue('B38', '=DATEDIF( DATE(2007, 12, 21), DATE(2007, 12, 22), "D" )') - ->setCellValue('B39', '=DATEVALUE("01-Feb-2006 10:06 AM")') - ->setCellValue('B40', '=DAY( DATE(2006, 1, 2) )') - ->setCellValue('B41', '=DAYS360( DATE(2002, 2, 3), DATE(2005, 5, 31) )'); - - -$objPHPExcel->getActiveSheet()->setCellValue('C1', 'Range 2') - ->setCellValue('C2', 1) - ->setCellValue('C3', 2) - ->setCellValue('C4', 2) - ->setCellValue('C5', 3) - ->setCellValue('C6', 3) - ->setCellValue('C7', 3) - ->setCellValue('C8', '0') - ->setCellValue('C9', 4) - ->setCellValue('C10', 4) - ->setCellValue('C11', 4) - ->setCellValue('C12', 4); - -$objPHPExcel->getActiveSheet()->setCellValue('C14', '=COUNT(C2:C12)') - ->setCellValue('C15', '=SUM(C2:C12)') - ->setCellValue('C16', '=MAX(C2:C12)') - ->setCellValue('C17', '=MIN(C2:C12)') - ->setCellValue('C18', '=AVERAGE(C2:C12)') - ->setCellValue('C19', '=MEDIAN(C2:C12)') - ->setCellValue('C20', '=MODE(C2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('C22', '=COUNTA(C2:C12)') - ->setCellValue('C23', '=MAXA(C2:C12)') - ->setCellValue('C24', '=MINA(C2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('C26', '=STDEV(C2:C12)') - ->setCellValue('C27', '=STDEVA(C2:C12)') - ->setCellValue('C28', '=STDEVP(C2:C12)') - ->setCellValue('C29', '=STDEVPA(C2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('C31', '=DEVSQ(C2:C12)') - ->setCellValue('C32', '=VAR(C2:C12)') - ->setCellValue('C33', '=VARA(C2:C12)') - ->setCellValue('C34', '=VARP(C2:C12)') - ->setCellValue('C35', '=VARPA(C2:C12)'); - - -$objPHPExcel->getActiveSheet()->setCellValue('D1', 'Range 3') - ->setCellValue('D2', 2) - ->setCellValue('D3', 3) - ->setCellValue('D4', 4); - -$objPHPExcel->getActiveSheet()->setCellValue('D14', '=((D2 * D3) + D4) & " should be 10"'); - -$objPHPExcel->getActiveSheet()->setCellValue('E12', 'Other functions') - ->setCellValue('E14', '=PI()') - ->setCellValue('E15', '=RAND()') - ->setCellValue('E16', '=RANDBETWEEN(5, 10)'); - -$objPHPExcel->getActiveSheet()->setCellValue('E17', 'Count of both ranges:') - ->setCellValue('F17', '=COUNT(B2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('E18', 'Total of both ranges:') - ->setCellValue('F18', '=SUM(B2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('E19', 'Maximum of both ranges:') - ->setCellValue('F19', '=MAX(B2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('E20', 'Minimum of both ranges:') - ->setCellValue('F20', '=MIN(B2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('E21', 'Average of both ranges:') - ->setCellValue('F21', '=AVERAGE(B2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('E22', 'Median of both ranges:') - ->setCellValue('F22', '=MEDIAN(B2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('E23', 'Mode of both ranges:') - ->setCellValue('F23', '=MODE(B2:C12)'); - - -// Calculated data -echo date('H:i:s') , " Calculated data" , EOL; -for ($col = 'B'; $col != 'G'; ++$col) { - for($row = 14; $row <= 41; ++$row) { - if ((!is_null($formula = $objPHPExcel->getActiveSheet()->getCell($col.$row)->getValue())) && - ($formula[0] == '=')) { - echo 'Value of ' , $col , $row , ' [' , $formula , ']: ' , - $objPHPExcel->getActiveSheet()->getCell($col.$row)->getCalculatedValue() . EOL; - } - } -} - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); - -// -// If we set Pre Calculated Formulas to true then PHPExcel will calculate all formulae in the -// workbook before saving. This adds time and memory overhead, and can cause some problems with formulae -// using functions or features (such as array formulae) that aren't yet supported by the calculation engine -// If the value is false (the default) for the Excel2007 Writer, then MS Excel (or the application used to -// open the file) will need to recalculate values itself to guarantee that the correct results are available. -// -//$objWriter->setPreCalculateFormulas(true); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/13calculationCyclicFormulae.php b/vendor/phpoffice/phpexcel/Examples/13calculationCyclicFormulae.php deleted file mode 100644 index 8512a3e..0000000 --- a/vendor/phpoffice/phpexcel/Examples/13calculationCyclicFormulae.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (C) 2006 - 2014 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Add some data, we will use some formulas here -echo date('H:i:s') , " Add some data and formulas" , EOL; -$objPHPExcel->getActiveSheet()->setCellValue('A1', '=B1') - ->setCellValue('A2', '=B2+1') - ->setCellValue('B1', '=A1+1') - ->setCellValue('B2', '=A2'); - -PHPExcel_Calculation::getInstance($objPHPExcel)->cyclicFormulaCount = 100; - -// Calculated data -echo date('H:i:s') , " Calculated data" , EOL; -for($row = 1; $row <= 2; ++$row) { - for ($col = 'A'; $col != 'C'; ++$col) { - if ((!is_null($formula = $objPHPExcel->getActiveSheet()->getCell($col.$row)->getValue())) && - ($formula[0] == '=')) { - echo 'Value of ' , $col , $row , ' [' , $formula , ']: ' , - $objPHPExcel->getActiveSheet()->getCell($col.$row)->getCalculatedValue() . EOL; - } - } -} - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); - -// -// If we set Pre Calculated Formulas to true then PHPExcel will calculate all formulae in the -// workbook before saving. This adds time and memory overhead, and can cause some problems with formulae -// using functions or features (such as array formulae) that aren't yet supported by the calculation engine -// If the value is false (the default) for the Excel2007 Writer, then MS Excel (or the application used to -// open the file) will need to recalculate values itself to guarantee that the correct results are available. -// -//$objWriter->setPreCalculateFormulas(true); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/14excel5.php b/vendor/phpoffice/phpexcel/Examples/14excel5.php deleted file mode 100644 index 7a9f685..0000000 --- a/vendor/phpoffice/phpexcel/Examples/14excel5.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -include "05featuredemo.inc.php"; - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/15datavalidation-xls.php b/vendor/phpoffice/phpexcel/Examples/15datavalidation-xls.php deleted file mode 100644 index 3f0afde..0000000 --- a/vendor/phpoffice/phpexcel/Examples/15datavalidation-xls.php +++ /dev/null @@ -1,155 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet -echo date('H:i:s') , " Add data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', "Cell B3 and B5 contain data validation...") - ->setCellValue('A3', "Number:") - ->setCellValue('B3', "10") - ->setCellValue('A5', "List:") - ->setCellValue('B5', "Item A") - ->setCellValue('A7', "List #2:") - ->setCellValue('B7', "Item #2") - ->setCellValue('D2', "Item #1") - ->setCellValue('D3', "Item #2") - ->setCellValue('D4', "Item #3") - ->setCellValue('D5', "Item #4") - ->setCellValue('D6', "Item #5") - ->setCellValue('A9', 'Text:') - ; - - -// Set data validation -echo date('H:i:s') , " Set data validation" , EOL; -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B3')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_WHOLE ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP ); -$objValidation->setAllowBlank(true); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Only numbers between 10 and 20 are allowed!'); -$objValidation->setPromptTitle('Allowed input'); -$objValidation->setPrompt('Only numbers between 10 and 20 are allowed.'); -$objValidation->setFormula1(10); -$objValidation->setFormula2(20); - -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B5')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ); -$objValidation->setAllowBlank(false); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setShowDropDown(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Value is not in list.'); -$objValidation->setPromptTitle('Pick from list'); -$objValidation->setPrompt('Please pick a value from the drop-down list.'); -$objValidation->setFormula1('"Item A,Item B,Item C"'); // Make sure to put the list items between " and " !!! - -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B7')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ); -$objValidation->setAllowBlank(false); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setShowDropDown(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Value is not in list.'); -$objValidation->setPromptTitle('Pick from list'); -$objValidation->setPrompt('Please pick a value from the drop-down list.'); -$objValidation->setFormula1('$D$2:$D$6'); // Make sure NOT to put a range of cells or a formula between " and " !!! - -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B9')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_TEXTLENGTH ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP ); -$objValidation->setAllowBlank(true); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Text exceeds maximum length'); -$objValidation->setPromptTitle('Allowed input'); -$objValidation->setPrompt('Maximum text length is 6 characters.'); -$objValidation->setFormula1(6); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/15datavalidation.php b/vendor/phpoffice/phpexcel/Examples/15datavalidation.php deleted file mode 100644 index 132063d..0000000 --- a/vendor/phpoffice/phpexcel/Examples/15datavalidation.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Create a first sheet -echo date('H:i:s') , " Add data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', "Cell B3 and B5 contain data validation...") - ->setCellValue('A3', "Number:") - ->setCellValue('B3', "10") - ->setCellValue('A5', "List:") - ->setCellValue('B5', "Item A") - ->setCellValue('A7', "List #2:") - ->setCellValue('B7', "Item #2") - ->setCellValue('D2', "Item #1") - ->setCellValue('D3', "Item #2") - ->setCellValue('D4', "Item #3") - ->setCellValue('D5', "Item #4") - ->setCellValue('D6', "Item #5") - ->setCellValue('A9', 'Text:') - ; - - -// Set data validation -echo date('H:i:s') , " Set data validation" , EOL; -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B3')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_WHOLE ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP ); -$objValidation->setAllowBlank(true); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Only numbers between 10 and 20 are allowed!'); -$objValidation->setPromptTitle('Allowed input'); -$objValidation->setPrompt('Only numbers between 10 and 20 are allowed.'); -$objValidation->setFormula1(10); -$objValidation->setFormula2(20); - -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B5')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ); -$objValidation->setAllowBlank(false); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setShowDropDown(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Value is not in list.'); -$objValidation->setPromptTitle('Pick from list'); -$objValidation->setPrompt('Please pick a value from the drop-down list.'); -$objValidation->setFormula1('"Item A,Item B,Item C"'); // Make sure to put the list items between " and " if your list is simply a comma-separated list of values !!! - - -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B7')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ); -$objValidation->setAllowBlank(false); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setShowDropDown(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Value is not in list.'); -$objValidation->setPromptTitle('Pick from list'); -$objValidation->setPrompt('Please pick a value from the drop-down list.'); -$objValidation->setFormula1('$D$2:$D$6'); // Make sure NOT to put a range of cells or a formula between " and " !!! - -$objValidation = $objPHPExcel->getActiveSheet()->getCell('B9')->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_TEXTLENGTH ); -$objValidation->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_STOP ); -$objValidation->setAllowBlank(true); -$objValidation->setShowInputMessage(true); -$objValidation->setShowErrorMessage(true); -$objValidation->setErrorTitle('Input error'); -$objValidation->setError('Text exceeds maximum length'); -$objValidation->setPromptTitle('Allowed input'); -$objValidation->setPrompt('Maximum text length is 6 characters.'); -$objValidation->setFormula1(6); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/16csv.php b/vendor/phpoffice/phpexcel/Examples/16csv.php deleted file mode 100644 index 8d42fcb..0000000 --- a/vendor/phpoffice/phpexcel/Examples/16csv.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -include "05featuredemo.inc.php"; - -/** PHPExcel_IOFactory */ -require_once '../Classes/PHPExcel/IOFactory.php'; - - -echo date('H:i:s') , " Write to CSV format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV')->setDelimiter(',') - ->setEnclosure('"') - ->setSheetIndex(0) - ->save(str_replace('.php', '.csv', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo date('H:i:s') , " File written to " , str_replace('.php', '.csv', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Read from CSV format" , EOL; -$callStartTime = microtime(true); -$objReader = PHPExcel_IOFactory::createReader('CSV')->setDelimiter(',') - ->setEnclosure('"') - ->setSheetIndex(0); -$objPHPExcelFromCSV = $objReader->load(str_replace('.php', '.csv', __FILE__)); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to reload Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter2007 = PHPExcel_IOFactory::createWriter($objPHPExcelFromCSV, 'Excel2007'); -$objWriter2007->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Write to CSV format" , EOL; -$callStartTime = microtime(true); - -$objWriterCSV = PHPExcel_IOFactory::createWriter($objPHPExcelFromCSV, 'CSV'); -$objWriterCSV->setExcelCompatibility(true); -$objWriterCSV->save(str_replace('.php', '_excel.csv', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo date('H:i:s') , " File written to " , str_replace('.php', '_excel.csv', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/17html.php b/vendor/phpoffice/phpexcel/Examples/17html.php deleted file mode 100644 index b84f8d4..0000000 --- a/vendor/phpoffice/phpexcel/Examples/17html.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -include "05featuredemo.inc.php"; - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -echo date('H:i:s') , " Write to HTML format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML'); -$objWriter->setSheetIndex(0); -//$objWriter->setImagesRoot('http://www.example.com'); -$objWriter->save(str_replace('.php', '.htm', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo date('H:i:s') , " File written to " , str_replace('.php', '.htm', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/18extendedcalculation.php b/vendor/phpoffice/phpexcel/Examples/18extendedcalculation.php deleted file mode 100644 index 59aeb30..0000000 --- a/vendor/phpoffice/phpexcel/Examples/18extendedcalculation.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// List functions -echo date('H:i:s') . " List implemented functions\n"; -$objCalc = PHPExcel_Calculation::getInstance(); -print_r($objCalc->listFunctionNames()); - -// Create new PHPExcel object -echo date('H:i:s') . " Create new PHPExcel object\n"; -$objPHPExcel = new PHPExcel(); - -// Add some data, we will use some formulas here -echo date('H:i:s') . " Add some data\n"; -$objPHPExcel->getActiveSheet()->setCellValue('A14', 'Count:'); - -$objPHPExcel->getActiveSheet()->setCellValue('B1', 'Range 1'); -$objPHPExcel->getActiveSheet()->setCellValue('B2', 2); -$objPHPExcel->getActiveSheet()->setCellValue('B3', 8); -$objPHPExcel->getActiveSheet()->setCellValue('B4', 10); -$objPHPExcel->getActiveSheet()->setCellValue('B5', True); -$objPHPExcel->getActiveSheet()->setCellValue('B6', False); -$objPHPExcel->getActiveSheet()->setCellValue('B7', 'Text String'); -$objPHPExcel->getActiveSheet()->setCellValue('B9', '22'); -$objPHPExcel->getActiveSheet()->setCellValue('B10', 4); -$objPHPExcel->getActiveSheet()->setCellValue('B11', 6); -$objPHPExcel->getActiveSheet()->setCellValue('B12', 12); - -$objPHPExcel->getActiveSheet()->setCellValue('B14', '=COUNT(B2:B12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('C1', 'Range 2'); -$objPHPExcel->getActiveSheet()->setCellValue('C2', 1); -$objPHPExcel->getActiveSheet()->setCellValue('C3', 2); -$objPHPExcel->getActiveSheet()->setCellValue('C4', 2); -$objPHPExcel->getActiveSheet()->setCellValue('C5', 3); -$objPHPExcel->getActiveSheet()->setCellValue('C6', 3); -$objPHPExcel->getActiveSheet()->setCellValue('C7', 3); -$objPHPExcel->getActiveSheet()->setCellValue('C8', '0'); -$objPHPExcel->getActiveSheet()->setCellValue('C9', 4); -$objPHPExcel->getActiveSheet()->setCellValue('C10', 4); -$objPHPExcel->getActiveSheet()->setCellValue('C11', 4); -$objPHPExcel->getActiveSheet()->setCellValue('C12', 4); - -$objPHPExcel->getActiveSheet()->setCellValue('C14', '=COUNT(C2:C12)'); - -$objPHPExcel->getActiveSheet()->setCellValue('D1', 'Range 3'); -$objPHPExcel->getActiveSheet()->setCellValue('D2', 2); -$objPHPExcel->getActiveSheet()->setCellValue('D3', 3); -$objPHPExcel->getActiveSheet()->setCellValue('D4', 4); - -$objPHPExcel->getActiveSheet()->setCellValue('D5', '=((D2 * D3) + D4) & " should be 10"'); - -$objPHPExcel->getActiveSheet()->setCellValue('E1', 'Other functions'); -$objPHPExcel->getActiveSheet()->setCellValue('E2', '=PI()'); -$objPHPExcel->getActiveSheet()->setCellValue('E3', '=RAND()'); -$objPHPExcel->getActiveSheet()->setCellValue('E4', '=RANDBETWEEN(5, 10)'); - -$objPHPExcel->getActiveSheet()->setCellValue('E14', 'Count of both ranges:'); -$objPHPExcel->getActiveSheet()->setCellValue('F14', '=COUNT(B2:C12)'); - -// Calculated data -echo date('H:i:s') . " Calculated data\n"; -echo 'Value of B14 [=COUNT(B2:B12)]: ' . $objPHPExcel->getActiveSheet()->getCell('B14')->getCalculatedValue() . "\r\n"; - - -// Echo memory peak usage -echo date('H:i:s') . " Peak memory usage: " . (memory_get_peak_usage(true) / 1024 / 1024) . " MB\r\n"; - -// Echo done -echo date('H:i:s') . " Done" , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/19namedrange.php b/vendor/phpoffice/phpexcel/Examples/19namedrange.php deleted file mode 100644 index 7876ea5..0000000 --- a/vendor/phpoffice/phpexcel/Examples/19namedrange.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Firstname:') - ->setCellValue('A2', 'Lastname:') - ->setCellValue('A3', 'Fullname:') - ->setCellValue('B1', 'Maarten') - ->setCellValue('B2', 'Balliauw') - ->setCellValue('B3', '=B1 & " " & B2'); - -// Define named ranges -echo date('H:i:s') , " Define named ranges" , EOL; -$objPHPExcel->addNamedRange( new PHPExcel_NamedRange('PersonName', $objPHPExcel->getActiveSheet(), 'B1') ); -$objPHPExcel->addNamedRange( new PHPExcel_NamedRange('PersonLN', $objPHPExcel->getActiveSheet(), 'B2') ); - -// Rename named ranges -echo date('H:i:s') , " Rename named ranges" , EOL; -$objPHPExcel->getNamedRange('PersonName')->setName('PersonFN'); - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Person'); - - -// Create a new worksheet, after the default sheet -echo date('H:i:s') , " Create new Worksheet object" , EOL; -$objPHPExcel->createSheet(); - -// Add some data to the second sheet, resembling some different data types -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(1); -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'Firstname:') - ->setCellValue('A2', 'Lastname:') - ->setCellValue('A3', 'Fullname:') - ->setCellValue('B1', '=PersonFN') - ->setCellValue('B2', '=PersonLN') - ->setCellValue('B3', '=PersonFN & " " & PersonLN'); - -// Resolve range -echo date('H:i:s') , " Resolve range" , EOL; -echo 'Cell B1 {=PersonFN}: ' , $objPHPExcel->getActiveSheet()->getCell('B1')->getCalculatedValue() , EOL; -echo 'Cell B3 {=PersonFN & " " & PersonLN}: ' , $objPHPExcel->getActiveSheet()->getCell('B3')->getCalculatedValue() , EOL; -echo 'Cell Person!B1: ' , $objPHPExcel->getActiveSheet()->getCell('Person!B1')->getCalculatedValue() , EOL; - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Person (cloned)'); - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/20readexcel5.php b/vendor/phpoffice/phpexcel/Examples/20readexcel5.php deleted file mode 100644 index e26fe7e..0000000 --- a/vendor/phpoffice/phpexcel/Examples/20readexcel5.php +++ /dev/null @@ -1,79 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -if (!file_exists("14excel5.xls")) { - exit("Please run 14excel5.php first.\n"); -} - -echo date('H:i:s') , " Load workbook from Excel5 file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcel = PHPExcel_IOFactory::load("14excel5.xls"); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo 'Call time to load Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done reading file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/21pdf.php b/vendor/phpoffice/phpexcel/Examples/21pdf.php deleted file mode 100644 index b26ddb8..0000000 --- a/vendor/phpoffice/phpexcel/Examples/21pdf.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -include "05featuredemo.inc.php"; - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -// Change these values to select the Rendering library that you wish to use -// and its directory location on your server -//$rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF; -//$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF; -$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF; -//$rendererLibrary = 'tcPDF5.9'; -//$rendererLibrary = 'mPDF5.4'; -$rendererLibrary = 'domPDF0.6.0beta3'; -$rendererLibraryPath = '/php/libraries/PDF/' . $rendererLibrary; - - -echo date('H:i:s') , " Hide grid lines" , EOL; -$objPHPExcel->getActiveSheet()->setShowGridLines(false); - -echo date('H:i:s') , " Set orientation to landscape" , EOL; -$objPHPExcel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE); - - -echo date('H:i:s') , " Write to PDF format using {$rendererName}" , EOL; - -if (!PHPExcel_Settings::setPdfRenderer( - $rendererName, - $rendererLibraryPath - )) { - die( - 'NOTICE: Please set the $rendererName and $rendererLibraryPath values' . - EOL . - 'at the top of this script as appropriate for your directory structure' - ); -} - - -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF'); -$objWriter->setSheetIndex(0); -$objWriter->save(str_replace('.php', '_'.$rendererName.'.pdf', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo date('H:i:s') , " File written to " , str_replace('.php', '_'.$rendererName.'.pdf', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/22heavilyformatted.php b/vendor/phpoffice/phpexcel/Examples/22heavilyformatted.php deleted file mode 100644 index 98c7d18..0000000 --- a/vendor/phpoffice/phpexcel/Examples/22heavilyformatted.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); - -$objPHPExcel->getActiveSheet()->getStyle('A1:T100')->applyFromArray( - array('fill' => array( - 'type' => PHPExcel_Style_Fill::FILL_SOLID, - 'color' => array('argb' => 'FFCCFFCC') - ), - 'borders' => array( - 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), - 'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM) - ) - ) - ); - -$objPHPExcel->getActiveSheet()->getStyle('C5:R95')->applyFromArray( - array('fill' => array( - 'type' => PHPExcel_Style_Fill::FILL_SOLID, - 'color' => array('argb' => 'FFFFFF00') - ), - ) - ); - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/23sharedstyles.php b/vendor/phpoffice/phpexcel/Examples/23sharedstyles.php deleted file mode 100644 index 22eadba..0000000 --- a/vendor/phpoffice/phpexcel/Examples/23sharedstyles.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0); - -$sharedStyle1 = new PHPExcel_Style(); -$sharedStyle2 = new PHPExcel_Style(); - -$sharedStyle1->applyFromArray( - array('fill' => array( - 'type' => PHPExcel_Style_Fill::FILL_SOLID, - 'color' => array('argb' => 'FFCCFFCC') - ), - 'borders' => array( - 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), - 'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM) - ) - )); - -$sharedStyle2->applyFromArray( - array('fill' => array( - 'type' => PHPExcel_Style_Fill::FILL_SOLID, - 'color' => array('argb' => 'FFFFFF00') - ), - 'borders' => array( - 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), - 'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM) - ) - )); - -$objPHPExcel->getActiveSheet()->setSharedStyle($sharedStyle1, "A1:T100"); -$objPHPExcel->getActiveSheet()->setSharedStyle($sharedStyle2, "C5:R95"); - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/24readfilter.php b/vendor/phpoffice/phpexcel/Examples/24readfilter.php deleted file mode 100644 index 000d180..0000000 --- a/vendor/phpoffice/phpexcel/Examples/24readfilter.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -// Check prerequisites -if (!file_exists("06largescale.xlsx")) { - exit("Please run 06largescale.php first.\n"); -} - -class MyReadFilter implements PHPExcel_Reader_IReadFilter -{ - public function readCell($column, $row, $worksheetName = '') { - // Read title row and rows 20 - 30 - if ($row == 1 || ($row >= 20 && $row <= 30)) { - return true; - } - - return false; - } -} - - -echo date('H:i:s') , " Load from Excel2007 file" , EOL; -$objReader = PHPExcel_IOFactory::createReader('Excel2007'); -$objReader->setReadFilter( new MyReadFilter() ); -$objPHPExcel = $objReader->load("06largescale.xlsx"); - -echo date('H:i:s') , " Remove unnecessary rows" , EOL; -$objPHPExcel->getActiveSheet()->removeRow(2, 18); - -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/25inmemoryimage.php b/vendor/phpoffice/phpexcel/Examples/25inmemoryimage.php deleted file mode 100644 index 6c3b0b8..0000000 --- a/vendor/phpoffice/phpexcel/Examples/25inmemoryimage.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - -// Generate an image -echo date('H:i:s') , " Generate an image" , EOL; -$gdImage = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); -$textColor = imagecolorallocate($gdImage, 255, 255, 255); -imagestring($gdImage, 1, 5, 5, 'Created with PHPExcel', $textColor); - -// Add a drawing to the worksheet -echo date('H:i:s') , " Add a drawing to the worksheet" , EOL; -$objDrawing = new PHPExcel_Worksheet_MemoryDrawing(); -$objDrawing->setName('Sample image'); -$objDrawing->setDescription('Sample image'); -$objDrawing->setImageResource($gdImage); -$objDrawing->setRenderingFunction(PHPExcel_Worksheet_MemoryDrawing::RENDERING_JPEG); -$objDrawing->setMimeType(PHPExcel_Worksheet_MemoryDrawing::MIMETYPE_DEFAULT); -$objDrawing->setHeight(36); -$objDrawing->setWorksheet($objPHPExcel->getActiveSheet()); - -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -echo date('H:i:s') , " Write to HTML format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML'); -$objWriter->save(str_replace('.php', '.html', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.html', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/26utf8.php b/vendor/phpoffice/phpexcel/Examples/26utf8.php deleted file mode 100644 index 112c5c7..0000000 --- a/vendor/phpoffice/phpexcel/Examples/26utf8.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Change these values to select the PDF Rendering library that you wish to use -// and its directory location on your server -//$rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF; -//$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF; -$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF; -//$rendererLibrary = 'tcPDF5.9'; -//$rendererLibrary = 'mPDF5.4'; -$rendererLibrary = 'domPDF0.6.0beta3'; -$rendererLibraryPath = '/php/libraries/PDF/' . $rendererLibrary; - - -// Read from Excel2007 (.xlsx) template -echo date('H:i:s') , " Load Excel2007 template file" , EOL; -$objReader = PHPExcel_IOFactory::createReader('Excel2007'); -$objPHPExcel = $objReader->load("templates/26template.xlsx"); - -/** at this point, we could do some manipulations with the template, but we skip this step */ - -// Export to Excel2007 (.xlsx) -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - -// Export to Excel5 (.xls) -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - -// Export to HTML (.html) -echo date('H:i:s') , " Write to HTML format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML'); -$objWriter->save(str_replace('.php', '.htm', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.htm', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - -// Export to PDF (.pdf) -echo date('H:i:s') , " Write to PDF format" , EOL; -try { - if (!PHPExcel_Settings::setPdfRenderer( - $rendererName, - $rendererLibraryPath - )) { - echo ( - 'NOTICE: Please set the $rendererName and $rendererLibraryPath values' . - EOL . - 'at the top of this script as appropriate for your directory structure' . - EOL - ); - } else { - $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF'); - $objWriter->save(str_replace('.php', '.pdf', __FILE__)); - echo date('H:i:s') , " File written to " , str_replace('.php', '.pdf', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - } -} catch (Exception $e) { - echo date('H:i:s') , ' EXCEPTION: ', $e->getMessage() , EOL; -} - -// Remove first two rows with field headers before exporting to CSV -echo date('H:i:s') , " Removing first two heading rows for CSV export" , EOL; -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->removeRow(1, 2); - -// Export to CSV (.csv) -echo date('H:i:s') , " Write to CSV format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'CSV'); -$objWriter->save(str_replace('.php', '.csv', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.csv', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - -// Export to CSV with BOM (.csv) -echo date('H:i:s') , " Write to CSV format (with BOM)" , EOL; -$objWriter->setUseBOM(true); -$objWriter->save(str_replace('.php', '-bom.csv', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '-bom.csv', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/27imagesexcel5.php b/vendor/phpoffice/phpexcel/Examples/27imagesexcel5.php deleted file mode 100644 index a4f6a9d..0000000 --- a/vendor/phpoffice/phpexcel/Examples/27imagesexcel5.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Read from Excel5 (.xls) template -echo date('H:i:s') , " Load Excel2007 template file" , EOL; -$objReader = PHPExcel_IOFactory::createReader('Excel5'); -$objPHPExcel = $objReader->load("templates/27template.xls"); - -// Export to Excel2007 (.xlsx) -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - -// Export to Excel5 (.xls) -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/28iterator.php b/vendor/phpoffice/phpexcel/Examples/28iterator.php deleted file mode 100644 index 1ba9cbe..0000000 --- a/vendor/phpoffice/phpexcel/Examples/28iterator.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -echo date('H:i:s') , " Load from Excel2007 file" , EOL; -$objReader = PHPExcel_IOFactory::createReader('Excel2007'); -$objPHPExcel = $objReader->load("./templates/28iterators.xlsx"); - -echo date('H:i:s') , " Iterate worksheets by Row" , EOL; -foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { - echo 'Worksheet - ' , $worksheet->getTitle() , EOL; - - foreach ($worksheet->getRowIterator() as $row) { - echo ' Row number - ' , $row->getRowIndex() , EOL; - - $cellIterator = $row->getCellIterator(); - $cellIterator->setIterateOnlyExistingCells(false); // Loop all cells, even if it is not set - foreach ($cellIterator as $cell) { - if (!is_null($cell)) { - echo ' Cell - ' , $cell->getCoordinate() , ' - ' , $cell->getCalculatedValue() , EOL; - } - } - } -} - - -echo date('H:i:s') , " Iterate worksheets by Column" , EOL; -foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { - echo 'Worksheet - ' , $worksheet->getTitle() , EOL; - - foreach ($worksheet->getColumnIterator() as $column) { - echo ' Column index - ' , $column->getColumnIndex() , EOL; - - $cellIterator = $column->getCellIterator(); - $cellIterator->setIterateOnlyExistingCells(true); // Loop all cells, even if it is not set - foreach ($cellIterator as $cell) { - if (!is_null($cell)) { - echo ' Cell - ' , $cell->getCoordinate() , ' - ' , $cell->getCalculatedValue() , EOL; - } - } - } -} - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/29advancedvaluebinder.php b/vendor/phpoffice/phpexcel/Examples/29advancedvaluebinder.php deleted file mode 100644 index a172c6c..0000000 --- a/vendor/phpoffice/phpexcel/Examples/29advancedvaluebinder.php +++ /dev/null @@ -1,183 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Set timezone -echo date('H:i:s') , " Set timezone" , EOL; -date_default_timezone_set('UTC'); - -// Set value binder -echo date('H:i:s') , " Set value binder" , EOL; -PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() ); - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.") - ->setKeywords("office 2007 openxml php") - ->setCategory("Test result file"); - -// Set default font -echo date('H:i:s') , " Set default font" , EOL; -$objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setName('Arial'); -$objPHPExcel->getActiveSheet()->getDefaultStyle()->getFont()->setSize(10); - -// Set column widths -echo date('H:i:s') , " Set column widths" , EOL; -$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setAutoSize(true); -$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(14); - -// Add some data, resembling some different data types -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->getActiveSheet()->setCellValue('A1', 'String value:') - ->setCellValue('B1', 'Mark Baker'); - -$objPHPExcel->getActiveSheet()->setCellValue('A2', 'Numeric value #1:') - ->setCellValue('B2', 12345); - -$objPHPExcel->getActiveSheet()->setCellValue('A3', 'Numeric value #2:') - ->setCellValue('B3', -12.345); - -$objPHPExcel->getActiveSheet()->setCellValue('A4', 'Numeric value #3:') - ->setCellValue('B4', .12345); - -$objPHPExcel->getActiveSheet()->setCellValue('A5', 'Numeric value #4:') - ->setCellValue('B5', '12345'); - -$objPHPExcel->getActiveSheet()->setCellValue('A6', 'Numeric value #5:') - ->setCellValue('B6', '1.2345'); - -$objPHPExcel->getActiveSheet()->setCellValue('A7', 'Numeric value #6:') - ->setCellValue('B7', '.12345'); - -$objPHPExcel->getActiveSheet()->setCellValue('A8', 'Numeric value #7:') - ->setCellValue('B8', '1.234e-5'); - -$objPHPExcel->getActiveSheet()->setCellValue('A9', 'Numeric value #8:') - ->setCellValue('B9', '-1.234e+5'); - -$objPHPExcel->getActiveSheet()->setCellValue('A10', 'Boolean value:') - ->setCellValue('B10', 'TRUE'); - -$objPHPExcel->getActiveSheet()->setCellValue('A11', 'Percentage value #1:') - ->setCellValue('B11', '10%'); - -$objPHPExcel->getActiveSheet()->setCellValue('A12', 'Percentage value #2:') - ->setCellValue('B12', '12.5%'); - -$objPHPExcel->getActiveSheet()->setCellValue('A13', 'Fraction value #1:') - ->setCellValue('B13', '-1/2'); - -$objPHPExcel->getActiveSheet()->setCellValue('A14', 'Fraction value #2:') - ->setCellValue('B14', '3 1/2'); - -$objPHPExcel->getActiveSheet()->setCellValue('A15', 'Fraction value #3:') - ->setCellValue('B15', '-12 3/4'); - -$objPHPExcel->getActiveSheet()->setCellValue('A16', 'Fraction value #4:') - ->setCellValue('B16', '13/4'); - -$objPHPExcel->getActiveSheet()->setCellValue('A17', 'Currency value #1:') - ->setCellValue('B17', '$12345'); - -$objPHPExcel->getActiveSheet()->setCellValue('A18', 'Currency value #2:') - ->setCellValue('B18', '$12345.67'); - -$objPHPExcel->getActiveSheet()->setCellValue('A19', 'Currency value #3:') - ->setCellValue('B19', '$12,345.67'); - -$objPHPExcel->getActiveSheet()->setCellValue('A20', 'Date value #1:') - ->setCellValue('B20', '21 December 1983'); - -$objPHPExcel->getActiveSheet()->setCellValue('A21', 'Date value #2:') - ->setCellValue('B21', '19-Dec-1960'); - -$objPHPExcel->getActiveSheet()->setCellValue('A22', 'Date value #3:') - ->setCellValue('B22', '07/12/1982'); - -$objPHPExcel->getActiveSheet()->setCellValue('A23', 'Date value #4:') - ->setCellValue('B23', '24-11-1950'); - -$objPHPExcel->getActiveSheet()->setCellValue('A24', 'Date value #5:') - ->setCellValue('B24', '17-Mar'); - -$objPHPExcel->getActiveSheet()->setCellValue('A25', 'Time value #1:') - ->setCellValue('B25', '01:30'); - -$objPHPExcel->getActiveSheet()->setCellValue('A26', 'Time value #2:') - ->setCellValue('B26', '01:30:15'); - -$objPHPExcel->getActiveSheet()->setCellValue('A27', 'Date/Time value:') - ->setCellValue('B27', '19-Dec-1960 01:30'); - -$objPHPExcel->getActiveSheet()->setCellValue('A28', 'Formula:') - ->setCellValue('B28', '=SUM(B2:B9)'); - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Advanced value binder'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -// Save Excel5 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/30template.php b/vendor/phpoffice/phpexcel/Examples/30template.php deleted file mode 100644 index 1d9847a..0000000 --- a/vendor/phpoffice/phpexcel/Examples/30template.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - - -echo date('H:i:s') , " Load from Excel5 template" , EOL; -$objReader = PHPExcel_IOFactory::createReader('Excel5'); -$objPHPExcel = $objReader->load("templates/30template.xls"); - - - - -echo date('H:i:s') , " Add new data to the template" , EOL; -$data = array(array('title' => 'Excel for dummies', - 'price' => 17.99, - 'quantity' => 2 - ), - array('title' => 'PHP for dummies', - 'price' => 15.99, - 'quantity' => 1 - ), - array('title' => 'Inside OOP', - 'price' => 12.95, - 'quantity' => 1 - ) - ); - -$objPHPExcel->getActiveSheet()->setCellValue('D1', PHPExcel_Shared_Date::PHPToExcel(time())); - -$baseRow = 5; -foreach($data as $r => $dataRow) { - $row = $baseRow + $r; - $objPHPExcel->getActiveSheet()->insertNewRowBefore($row,1); - - $objPHPExcel->getActiveSheet()->setCellValue('A'.$row, $r+1) - ->setCellValue('B'.$row, $dataRow['title']) - ->setCellValue('C'.$row, $dataRow['price']) - ->setCellValue('D'.$row, $dataRow['quantity']) - ->setCellValue('E'.$row, '=C'.$row.'*D'.$row); -} -$objPHPExcel->getActiveSheet()->removeRow($baseRow-1,1); - - -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/31docproperties_write-xls.php b/vendor/phpoffice/phpexcel/Examples/31docproperties_write-xls.php deleted file mode 100644 index 4494867..0000000 --- a/vendor/phpoffice/phpexcel/Examples/31docproperties_write-xls.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$inputFileType = 'Excel5'; -$inputFileName = 'templates/31docproperties.xls'; - - -echo date('H:i:s') , " Load Tests from $inputFileType file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcelReader = PHPExcel_IOFactory::createReader($inputFileType); -$objPHPExcel = $objPHPExcelReader->load($inputFileName); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Adjust properties" , EOL; -$objPHPExcel->getProperties()->setTitle("Office 95 XLS Test Document") - ->setSubject("Office 95 XLS Test Document") - ->setDescription("Test XLS document, generated using PHPExcel") - ->setKeywords("office 95 biff php"); - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " . (memory_get_peak_usage(true) / 1024 / 1024) . " MB" , EOL; - - -echo EOL; -// Reread File -echo date('H:i:s') , " Reread Excel5 file" , EOL; -$objPHPExcelRead = PHPExcel_IOFactory::load(str_replace('.php', '.xls', __FILE__)); - -// Set properties -echo date('H:i:s') , " Get properties" , EOL; - -echo 'Core Properties:' , EOL; -echo ' Created by - ' , $objPHPExcel->getProperties()->getCreator() , EOL; -echo ' Created on - ' , date('d-M-Y',$objPHPExcel->getProperties()->getCreated()) , ' at ' , - date('H:i:s',$objPHPExcel->getProperties()->getCreated()) , EOL; -echo ' Last Modified by - ' , $objPHPExcel->getProperties()->getLastModifiedBy() , EOL; -echo ' Last Modified on - ' , date('d-M-Y',$objPHPExcel->getProperties()->getModified()) , ' at ' , - date('H:i:s',$objPHPExcel->getProperties()->getModified()) , EOL; -echo ' Title - ' , $objPHPExcel->getProperties()->getTitle() , EOL; -echo ' Subject - ' , $objPHPExcel->getProperties()->getSubject() , EOL; -echo ' Description - ' , $objPHPExcel->getProperties()->getDescription() , EOL; -echo ' Keywords: - ' , $objPHPExcel->getProperties()->getKeywords() , EOL; - - -echo 'Extended (Application) Properties:' , EOL; -echo ' Category - ' , $objPHPExcel->getProperties()->getCategory() , EOL; -echo ' Company - ' , $objPHPExcel->getProperties()->getCompany() , EOL; -echo ' Manager - ' , $objPHPExcel->getProperties()->getManager() , EOL; - - -echo 'Custom Properties:' , EOL; -$customProperties = $objPHPExcel->getProperties()->getCustomProperties(); -foreach($customProperties as $customProperty) { - $propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customProperty); - $propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customProperty); - echo ' ' , $customProperty , ' - (' , $propertyType , ') - '; - if ($propertyType == PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE) { - echo date('d-M-Y H:i:s',$propertyValue) , EOL; - } elseif ($propertyType == PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN) { - echo (($propertyValue) ? 'TRUE' : 'FALSE') , EOL; - } else { - echo $propertyValue , EOL; - } -} - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) . " MB" , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/31docproperties_write.php b/vendor/phpoffice/phpexcel/Examples/31docproperties_write.php deleted file mode 100644 index a7c496a..0000000 --- a/vendor/phpoffice/phpexcel/Examples/31docproperties_write.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$inputFileType = 'Excel2007'; -$inputFileName = 'templates/31docproperties.xlsx'; - - -echo date('H:i:s') , " Load Tests from $inputFileType file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcelReader = PHPExcel_IOFactory::createReader($inputFileType); -$objPHPExcel = $objPHPExcelReader->load($inputFileName); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Adjust properties" , EOL; -$objPHPExcel->getProperties()->setTitle("Office 2007 XLSX Test Document") - ->setSubject("Office 2007 XLSX Test Document") - ->setDescription("Test XLSX document, generated using PHPExcel") - ->setKeywords("office 2007 openxml php"); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " . (memory_get_peak_usage(true) / 1024 / 1024) . " MB" , EOL; - - -echo EOL; -// Reread File -echo date('H:i:s') , " Reread Excel2007 file" , EOL; -$objPHPExcelRead = PHPExcel_IOFactory::load(str_replace('.php', '.xlsx', __FILE__)); - -// Set properties -echo date('H:i:s') , " Get properties" , EOL; - -echo 'Core Properties:' , EOL; -echo ' Created by - ' , $objPHPExcel->getProperties()->getCreator() , EOL; -echo ' Created on - ' , date('d-M-Y',$objPHPExcel->getProperties()->getCreated()) , ' at ' , - date('H:i:s',$objPHPExcel->getProperties()->getCreated()) , EOL; -echo ' Last Modified by - ' , $objPHPExcel->getProperties()->getLastModifiedBy() , EOL; -echo ' Last Modified on - ' , date('d-M-Y',$objPHPExcel->getProperties()->getModified()) , ' at ' , - date('H:i:s',$objPHPExcel->getProperties()->getModified()) , EOL; -echo ' Title - ' , $objPHPExcel->getProperties()->getTitle() , EOL; -echo ' Subject - ' , $objPHPExcel->getProperties()->getSubject() , EOL; -echo ' Description - ' , $objPHPExcel->getProperties()->getDescription() , EOL; -echo ' Keywords: - ' , $objPHPExcel->getProperties()->getKeywords() , EOL; - - -echo 'Extended (Application) Properties:' , EOL; -echo ' Category - ' , $objPHPExcel->getProperties()->getCategory() , EOL; -echo ' Company - ' , $objPHPExcel->getProperties()->getCompany() , EOL; -echo ' Manager - ' , $objPHPExcel->getProperties()->getManager() , EOL; - - -echo 'Custom Properties:' , EOL; -$customProperties = $objPHPExcel->getProperties()->getCustomProperties(); -foreach($customProperties as $customProperty) { - $propertyValue = $objPHPExcel->getProperties()->getCustomPropertyValue($customProperty); - $propertyType = $objPHPExcel->getProperties()->getCustomPropertyType($customProperty); - echo ' ' , $customProperty , ' - (' , $propertyType , ') - '; - if ($propertyType == PHPExcel_DocumentProperties::PROPERTY_TYPE_DATE) { - echo date('d-M-Y H:i:s',$propertyValue) , EOL; - } elseif ($propertyType == PHPExcel_DocumentProperties::PROPERTY_TYPE_BOOLEAN) { - echo (($propertyValue) ? 'TRUE' : 'FALSE') , EOL; - } else { - echo $propertyValue , EOL; - } -} - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) . " MB" , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/32chartreadwrite.php b/vendor/phpoffice/phpexcel/Examples/32chartreadwrite.php deleted file mode 100644 index 55521ec..0000000 --- a/vendor/phpoffice/phpexcel/Examples/32chartreadwrite.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - -$inputFileType = 'Excel2007'; -$inputFileNames = 'templates/32readwrite*[0-9].xlsx'; - -if ((isset($argc)) && ($argc > 1)) { - $inputFileNames = array(); - for($i = 1; $i < $argc; ++$i) { - $inputFileNames[] = dirname(__FILE__) . '/templates/' . $argv[$i]; - } -} else { - $inputFileNames = glob($inputFileNames); -} -foreach($inputFileNames as $inputFileName) { - $inputFileNameShort = basename($inputFileName); - - if (!file_exists($inputFileName)) { - echo date('H:i:s') , " File " , $inputFileNameShort , ' does not exist' , EOL; - continue; - } - - echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL; - - $objReader = PHPExcel_IOFactory::createReader($inputFileType); - $objReader->setIncludeCharts(TRUE); - $objPHPExcel = $objReader->load($inputFileName); - - - echo date('H:i:s') , " Iterate worksheets looking at the charts" , EOL; - foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { - $sheetName = $worksheet->getTitle(); - echo 'Worksheet: ' , $sheetName , EOL; - - $chartNames = $worksheet->getChartNames(); - if(empty($chartNames)) { - echo ' There are no charts in this worksheet' , EOL; - } else { - natsort($chartNames); - foreach($chartNames as $i => $chartName) { - $chart = $worksheet->getChartByName($chartName); - if (!is_null($chart->getTitle())) { - $caption = '"' . implode(' ',$chart->getTitle()->getCaption()) . '"'; - } else { - $caption = 'Untitled'; - } - echo ' ' , $chartName , ' - ' , $caption , EOL; - echo str_repeat(' ',strlen($chartName)+3); - $groupCount = $chart->getPlotArea()->getPlotGroupCount(); - if ($groupCount == 1) { - $chartType = $chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType(); - echo ' ' , $chartType , EOL; - } else { - $chartTypes = array(); - for($i = 0; $i < $groupCount; ++$i) { - $chartTypes[] = $chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); - } - $chartTypes = array_unique($chartTypes); - if (count($chartTypes) == 1) { - $chartType = 'Multiple Plot ' . array_pop($chartTypes); - echo ' ' , $chartType , EOL; - } elseif (count($chartTypes) == 0) { - echo ' *** Type not yet implemented' , EOL; - } else { - echo ' Combination Chart' , EOL; - } - } - } - } - } - - - $outputFileName = basename($inputFileName); - - echo date('H:i:s') , " Write Tests to Excel2007 file " , EOL; - $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); - $objWriter->setIncludeCharts(TRUE); - $objWriter->save($outputFileName); - echo date('H:i:s') , " File written to " , $outputFileName , EOL; - - $objPHPExcel->disconnectWorksheets(); - unset($objPHPExcel); -} - -// Echo memory peak usage -echo date('H:i:s') , ' Peak memory usage: ' , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-area.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-area.php deleted file mode 100644 index fac8ce9..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-area.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), - ) -); - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_AREACHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues // plotValues -); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_TOPRIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Test %age-Stacked Area Chart'); -$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - $yAxisLabel // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('A7'); -$chart->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-bar-stacked.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-bar-stacked.php deleted file mode 100644 index af9493f..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-bar-stacked.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), - ) -); - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_STACKED, // plotGrouping - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues // plotValues -); -// Set additional dataseries parameters -// Make it a horizontal bar rather than a vertical column graph -$series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_BAR); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Test Chart'); -$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - $yAxisLabel // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('A7'); -$chart->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-bar.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-bar.php deleted file mode 100644 index 653675d..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-bar.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), - ) -); - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_CLUSTERED, // plotGrouping - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues // plotValues -); -// Set additional dataseries parameters -// Make it a horizontal bar rather than a vertical column graph -$series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_BAR); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Test Bar Chart'); -$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - $yAxisLabel // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('A7'); -$chart->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-column-2.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-column-2.php deleted file mode 100644 index 0ade332..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-column-2.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', '', 'Budget', 'Forecast', 'Actual'), - array('2010', 'Q1', 47, 44, 43 ), - array('', 'Q2', 56, 53, 50 ), - array('', 'Q3', 52, 46, 45 ), - array('', 'Q4', 45, 40, 40 ), - array('2011', 'Q1', 51, 42, 46 ), - array('', 'Q2', 53, 58, 56 ), - array('', 'Q3', 64, 66, 69 ), - array('', 'Q4', 54, 55, 56 ), - array('2012', 'Q1', 49, 52, 58 ), - array('', 'Q2', 68, 73, 86 ), - array('', 'Q3', 72, 78, 0 ), - array('', 'Q4', 50, 60, 0 ), - ) -); - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 'Budget' - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 'Forecast' - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), // 'Actual' -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$B$13', NULL, 12), // Q1 to Q4 for 2010 to 2012 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$E$2:$E$13', NULL, 12), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_CLUSTERED, // plotGrouping - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues // plotValues -); -// Set additional dataseries parameters -// Make it a vertical column rather than a horizontal bar graph -$series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_BOTTOM, NULL, false); - -$title = new PHPExcel_Chart_Title('Test Grouped Column Chart'); -$xAxisLabel = new PHPExcel_Chart_Title('Financial Period'); -$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - $xAxisLabel, // xAxisLabel - $yAxisLabel // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('G2'); -$chart->setBottomRightPosition('P20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-column.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-column.php deleted file mode 100644 index 67f4178..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-column.php +++ /dev/null @@ -1,145 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), - ) -); - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues // plotValues -); -// Set additional dataseries parameters -// Make it a vertical column rather than a horizontal bar graph -$series->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Test Column Chart'); -$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - $yAxisLabel // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('A7'); -$chart->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-composite.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-composite.php deleted file mode 100644 index be7ad94..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-composite.php +++ /dev/null @@ -1,203 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 'Rainfall (mm)', 'Temperature (°F)', 'Humidity (%)'), - array('Jan', 78, 52, 61), - array('Feb', 64, 54, 62), - array('Mar', 62, 57, 63), - array('Apr', 21, 62, 59), - array('May', 11, 75, 60), - array('Jun', 1, 75, 57), - array('Jul', 1, 79, 56), - array('Aug', 1, 79, 59), - array('Sep', 10, 75, 60), - array('Oct', 40, 68, 63), - array('Nov', 69, 62, 64), - array('Dec', 89, 57, 66), - ) -); - - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels1 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // Temperature -); -$dataSeriesLabels2 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // Rainfall -); -$dataSeriesLabels3 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // Humidity -); - -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec -); - - -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues1 = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$13', NULL, 12), -); - -// Build the dataseries -$series1 = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_CLUSTERED, // plotGrouping - range(0, count($dataSeriesValues1)-1), // plotOrder - $dataSeriesLabels1, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues1 // plotValues -); -// Set additional dataseries parameters -// Make it a vertical column rather than a horizontal bar graph -$series1->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL); - - -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues2 = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12), -); - -// Build the dataseries -$series2 = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_LINECHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping - range(0, count($dataSeriesValues2)-1), // plotOrder - $dataSeriesLabels2, // plotLabel - NULL, // plotCategory - $dataSeriesValues2 // plotValues -); - - -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues3 = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12), -); - -// Build the dataseries -$series3 = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_AREACHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping - range(0, count($dataSeriesValues2)-1), // plotOrder - $dataSeriesLabels3, // plotLabel - NULL, // plotCategory - $dataSeriesValues3 // plotValues -); - - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series1, $series2, $series3)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Average Weather Chart for Crete'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - NULL // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('F2'); -$chart->setBottomRightPosition('O16'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-line.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-line.php deleted file mode 100644 index 90c2e60..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-line.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), - ) -); - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_LINECHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_STACKED, // plotGrouping - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues // plotValues -); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_TOPRIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Test Stacked Line Chart'); -$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - $yAxisLabel // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('A7'); -$chart->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-multiple-charts.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-multiple-charts.php deleted file mode 100644 index 0e5ac60..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-multiple-charts.php +++ /dev/null @@ -1,220 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), - ) -); - - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels1 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues1 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues1 = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4), -); - -// Build the dataseries -$series1 = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_AREACHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_PERCENT_STACKED, // plotGrouping - range(0, count($dataSeriesValues1)-1), // plotOrder - $dataSeriesLabels1, // plotLabel - $xAxisTickValues1, // plotCategory - $dataSeriesValues1 // plotValues -); - -// Set the series in the plot area -$plotArea1 = new PHPExcel_Chart_PlotArea(NULL, array($series1)); -// Set the chart legend -$legend1 = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_TOPRIGHT, NULL, false); - -$title1 = new PHPExcel_Chart_Title('Test %age-Stacked Area Chart'); -$yAxisLabel1 = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart1 = new PHPExcel_Chart( - 'chart1', // name - $title1, // title - $legend1, // legend - $plotArea1, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - $yAxisLabel1 // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart1->setTopLeftPosition('A7'); -$chart1->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart1); - - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels2 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues2 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues2 = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4), -); - -// Build the dataseries -$series2 = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_BARCHART, // plotType - PHPExcel_Chart_DataSeries::GROUPING_STANDARD, // plotGrouping - range(0, count($dataSeriesValues2)-1), // plotOrder - $dataSeriesLabels2, // plotLabel - $xAxisTickValues2, // plotCategory - $dataSeriesValues2 // plotValues -); -// Set additional dataseries parameters -// Make it a vertical column rather than a horizontal bar graph -$series2->setPlotDirection(PHPExcel_Chart_DataSeries::DIRECTION_COL); - -// Set the series in the plot area -$plotArea2 = new PHPExcel_Chart_PlotArea(NULL, array($series2)); -// Set the chart legend -$legend2 = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false); - -$title2 = new PHPExcel_Chart_Title('Test Column Chart'); -$yAxisLabel2 = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart2 = new PHPExcel_Chart( - 'chart2', // name - $title2, // title - $legend2, // legend - $plotArea2, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - $yAxisLabel2 // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart2->setTopLeftPosition('I7'); -$chart2->setBottomRightPosition('P20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart2); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-pie.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-pie.php deleted file mode 100644 index 78b6293..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-pie.php +++ /dev/null @@ -1,215 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), - ) -); - - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels1 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues1 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues1 = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), -); - -// Build the dataseries -$series1 = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_PIECHART, // plotType - NULL, // plotGrouping (Pie charts don't have any grouping) - range(0, count($dataSeriesValues1)-1), // plotOrder - $dataSeriesLabels1, // plotLabel - $xAxisTickValues1, // plotCategory - $dataSeriesValues1 // plotValues -); - -// Set up a layout object for the Pie chart -$layout1 = new PHPExcel_Chart_Layout(); -$layout1->setShowVal(TRUE); -$layout1->setShowPercent(TRUE); - -// Set the series in the plot area -$plotArea1 = new PHPExcel_Chart_PlotArea($layout1, array($series1)); -// Set the chart legend -$legend1 = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false); - -$title1 = new PHPExcel_Chart_Title('Test Pie Chart'); - - -// Create the chart -$chart1 = new PHPExcel_Chart( - 'chart1', // name - $title1, // title - $legend1, // legend - $plotArea1, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - NULL // yAxisLabel - Pie charts don't have a Y-Axis -); - -// Set the position where the chart should appear in the worksheet -$chart1->setTopLeftPosition('A7'); -$chart1->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart1); - - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels2 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues2 = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues2 = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), -); - -// Build the dataseries -$series2 = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_DONUTCHART, // plotType - NULL, // plotGrouping (Donut charts don't have any grouping) - range(0, count($dataSeriesValues2)-1), // plotOrder - $dataSeriesLabels2, // plotLabel - $xAxisTickValues2, // plotCategory - $dataSeriesValues2 // plotValues -); - -// Set up a layout object for the Pie chart -$layout2 = new PHPExcel_Chart_Layout(); -$layout2->setShowVal(TRUE); -$layout2->setShowCatName(TRUE); - -// Set the series in the plot area -$plotArea2 = new PHPExcel_Chart_PlotArea($layout2, array($series2)); - -$title2 = new PHPExcel_Chart_Title('Test Donut Chart'); - - -// Create the chart -$chart2 = new PHPExcel_Chart( - 'chart2', // name - $title2, // title - NULL, // legend - $plotArea2, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - NULL // yAxisLabel - Like Pie charts, Donut charts don't have a Y-Axis -); - -// Set the position where the chart should appear in the worksheet -$chart2->setTopLeftPosition('I7'); -$chart2->setBottomRightPosition('P20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart2); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-radar.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-radar.php deleted file mode 100644 index 7d1047a..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-radar.php +++ /dev/null @@ -1,155 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Jan', 47, 45, 71), - array('Feb', 56, 73, 86), - array('Mar', 52, 61, 69), - array('Apr', 40, 52, 60), - array('May', 42, 55, 71), - array('Jun', 58, 63, 76), - array('Jul', 53, 61, 89), - array('Aug', 46, 69, 85), - array('Sep', 62, 75, 81), - array('Oct', 51, 70, 96), - array('Nov', 55, 66, 89), - array('Dec', 68, 62, 0), - ) -); - - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$13', NULL, 12), // Jan to Dec -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$13', NULL, 12), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$13', NULL, 12), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_RADARCHART, // plotType - NULL, // plotGrouping (Radar charts don't have any grouping) - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues, // plotValues - NULL, // plotDirection - NULL, // smooth line - PHPExcel_Chart_DataSeries::STYLE_MARKER // plotStyle -); - -// Set up a layout object for the Pie chart -$layout = new PHPExcel_Chart_Layout(); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea($layout, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Test Radar Chart'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - NULL // yAxisLabel - Radar charts don't have a Y-Axis -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('F2'); -$chart->setBottomRightPosition('M15'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-scatter.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-scatter.php deleted file mode 100644 index a5fab82..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-scatter.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('', 2010, 2011, 2012), - array('Q1', 12, 15, 21), - array('Q2', 56, 73, 86), - array('Q3', 52, 61, 69), - array('Q4', 30, 32, 0), - ) -); - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), // 2010 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), // 2011 - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), // 2012 -); -// Set the X-Axis Labels -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$5', NULL, 4), // Q1 to Q4 -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$5', NULL, 4), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$5', NULL, 4), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_SCATTERCHART, // plotType - NULL, // plotGrouping (Scatter charts don't have any grouping) - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues, // plotValues - NULL, // plotDirection - NULL, // smooth line - PHPExcel_Chart_DataSeries::STYLE_LINEMARKER // plotStyle -); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_TOPRIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Test Scatter Chart'); -$yAxisLabel = new PHPExcel_Chart_Title('Value ($k)'); - - -// Create the chart -$chart = new PHPExcel_Chart( - 'chart1', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - NULL, // xAxisLabel - $yAxisLabel // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('A7'); -$chart->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/33chartcreate-stock.php b/vendor/phpoffice/phpexcel/Examples/33chartcreate-stock.php deleted file mode 100644 index 465107b..0000000 --- a/vendor/phpoffice/phpexcel/Examples/33chartcreate-stock.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -$objPHPExcel = new PHPExcel(); -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array('Counts', 'Max', 'Min', 'Min Threshold', 'Max Threshold' ), - array(10, 10, 5, 0, 50 ), - array(30, 20, 10, 0, 50 ), - array(20, 30, 15, 0, 50 ), - array(40, 10, 0, 0, 50 ), - array(100, 40, 5, 0, 50 ), - ), null, 'A1', true -); -$objWorksheet->getStyle('B2:E6')->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER_00); - - -// Set the Labels for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesLabels = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$B$1', NULL, 1), //Max / Open - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$C$1', NULL, 1), //Min / Close - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$D$1', NULL, 1), //Min Threshold / Min - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$E$1', NULL, 1), //Max Threshold / Max -); -// Set the X-Axis Labels -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$xAxisTickValues = array( - new PHPExcel_Chart_DataSeriesValues('String', 'Worksheet!$A$2:$A$6', NULL, 5), // Counts -); -// Set the Data values for each data series we want to plot -// Datatype -// Cell reference for data -// Format Code -// Number of datapoints in series -// Data values -// Data Marker -$dataSeriesValues = array( - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$B$2:$B$6', NULL, 5), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$C$2:$C$6', NULL, 5), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$D$2:$D$6', NULL, 5), - new PHPExcel_Chart_DataSeriesValues('Number', 'Worksheet!$E$2:$E$6', NULL, 5), -); - -// Build the dataseries -$series = new PHPExcel_Chart_DataSeries( - PHPExcel_Chart_DataSeries::TYPE_STOCKCHART, // plotType - null, // plotGrouping - if we set this to not null, then xlsx throws error - range(0, count($dataSeriesValues)-1), // plotOrder - $dataSeriesLabels, // plotLabel - $xAxisTickValues, // plotCategory - $dataSeriesValues // plotValues -); - -// Set the series in the plot area -$plotArea = new PHPExcel_Chart_PlotArea(NULL, array($series)); -// Set the chart legend -$legend = new PHPExcel_Chart_Legend(PHPExcel_Chart_Legend::POSITION_RIGHT, NULL, false); - -$title = new PHPExcel_Chart_Title('Test Stock Chart'); -$xAxisLabel = new PHPExcel_Chart_Title('Counts'); -$yAxisLabel = new PHPExcel_Chart_Title('Values'); - -// Create the chart -$chart = new PHPExcel_Chart( - 'stock-chart', // name - $title, // title - $legend, // legend - $plotArea, // plotArea - true, // plotVisibleOnly - 0, // displayBlanksAs - $xAxisLabel, // xAxisLabel - $yAxisLabel // yAxisLabel -); - -// Set the position where the chart should appear in the worksheet -$chart->setTopLeftPosition('A7'); -$chart->setBottomRightPosition('H20'); - -// Add the chart to the worksheet -$objWorksheet->addChart($chart); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$filename = str_replace('.php', '.xlsx', __FILE__); -if(file_exists($filename)) { - unlink($filename); -} -$objWriter->save($filename); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/34chartupdate.php b/vendor/phpoffice/phpexcel/Examples/34chartupdate.php deleted file mode 100644 index f4b36c6..0000000 --- a/vendor/phpoffice/phpexcel/Examples/34chartupdate.php +++ /dev/null @@ -1,78 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - -if (!file_exists("33chartcreate-bar.xlsx")) { - exit("Please run 33chartcreate-bar.php first." . EOL); -} - -echo date('H:i:s') , " Load from Excel2007 file" , EOL; -$objReader = PHPExcel_IOFactory::createReader("Excel2007"); -$objReader->setIncludeCharts(TRUE); -$objPHPExcel = $objReader->load("33chartcreate-bar.xlsx"); - - -echo date('H:i:s') , " Update cell data values that are displayed in the chart" , EOL; -$objWorksheet = $objPHPExcel->getActiveSheet(); -$objWorksheet->fromArray( - array( - array(50-12, 50-15, 50-21), - array(50-56, 50-73, 50-86), - array(50-52, 50-61, 50-69), - array(50-30, 50-32, 50), - ), - NULL, - 'B2' -); - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->setIncludeCharts(TRUE); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/35chartrender.php b/vendor/phpoffice/phpexcel/Examples/35chartrender.php deleted file mode 100644 index 62719e5..0000000 --- a/vendor/phpoffice/phpexcel/Examples/35chartrender.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -// Change these values to select the Rendering library that you wish to use -// and its directory location on your server -$rendererName = PHPExcel_Settings::CHART_RENDERER_JPGRAPH; -$rendererLibrary = 'jpgraph3.5.0b1/src/'; -$rendererLibraryPath = '/php/libraries/Charts/' . $rendererLibrary; - - -if (!PHPExcel_Settings::setChartRenderer( - $rendererName, - $rendererLibraryPath - )) { - die( - 'NOTICE: Please set the $rendererName and $rendererLibraryPath values' . - EOL . - 'at the top of this script as appropriate for your directory structure' - ); -} - - -$inputFileType = 'Excel2007'; -$inputFileNames = 'templates/32readwrite*[0-9].xlsx'; - - if ((isset($argc)) && ($argc > 1)) { - $inputFileNames = array(); - for($i = 1; $i < $argc; ++$i) { - $inputFileNames[] = dirname(__FILE__) . '/templates/' . $argv[$i]; - } -} else { - $inputFileNames = glob($inputFileNames); -} -foreach($inputFileNames as $inputFileName) { - $inputFileNameShort = basename($inputFileName); - - if (!file_exists($inputFileName)) { - echo date('H:i:s') , " File " , $inputFileNameShort , ' does not exist' , EOL; - continue; - } - - echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL; - - $objReader = PHPExcel_IOFactory::createReader($inputFileType); - $objReader->setIncludeCharts(TRUE); - $objPHPExcel = $objReader->load($inputFileName); - - - echo date('H:i:s') , " Iterate worksheets looking at the charts" , EOL; - foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { - $sheetName = $worksheet->getTitle(); - echo 'Worksheet: ' , $sheetName , EOL; - - $chartNames = $worksheet->getChartNames(); - if(empty($chartNames)) { - echo ' There are no charts in this worksheet' , EOL; - } else { - natsort($chartNames); - foreach($chartNames as $i => $chartName) { - $chart = $worksheet->getChartByName($chartName); - if (!is_null($chart->getTitle())) { - $caption = '"' . implode(' ',$chart->getTitle()->getCaption()) . '"'; - } else { - $caption = 'Untitled'; - } - echo ' ' , $chartName , ' - ' , $caption , EOL; - echo str_repeat(' ',strlen($chartName)+3); - - $jpegFile = '35'.str_replace('.xlsx', '.jpg', substr($inputFileNameShort,2)); - if (file_exists($jpegFile)) { - unlink($jpegFile); - } - try { - $chart->render($jpegFile); - } catch (Exception $e) { - echo 'Error rendering chart: ',$e->getMessage(); - } - } - } - } - - - $objPHPExcel->disconnectWorksheets(); - unset($objPHPExcel); -} - -// Echo memory peak usage -echo date('H:i:s') , ' Peak memory usage: ' , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done rendering charts as images" , EOL; -echo 'Image files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/36chartreadwriteHTML.php b/vendor/phpoffice/phpexcel/Examples/36chartreadwriteHTML.php deleted file mode 100644 index 7fc26fd..0000000 --- a/vendor/phpoffice/phpexcel/Examples/36chartreadwriteHTML.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -// Change these values to select the Rendering library that you wish to use -// and its directory location on your server -$rendererName = PHPExcel_Settings::CHART_RENDERER_JPGRAPH; -$rendererLibrary = 'jpgraph3.5.0b1/src/'; -$rendererLibraryPath = '/php/libraries/Charts/' . $rendererLibrary; - - -if (!PHPExcel_Settings::setChartRenderer( - $rendererName, - $rendererLibraryPath - )) { - die( - 'NOTICE: Please set the $rendererName and $rendererLibraryPath values' . - EOL . - 'at the top of this script as appropriate for your directory structure' - ); -} - - -$inputFileType = 'Excel2007'; -$inputFileNames = 'templates/36write*.xlsx'; - -if ((isset($argc)) && ($argc > 1)) { - $inputFileNames = array(); - for($i = 1; $i < $argc; ++$i) { - $inputFileNames[] = dirname(__FILE__) . '/templates/' . $argv[$i]; - } -} else { - $inputFileNames = glob($inputFileNames); -} -foreach($inputFileNames as $inputFileName) { - $inputFileNameShort = basename($inputFileName); - - if (!file_exists($inputFileName)) { - echo date('H:i:s') , " File " , $inputFileNameShort , ' does not exist' , EOL; - continue; - } - - echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL; - - $objReader = PHPExcel_IOFactory::createReader($inputFileType); - $objReader->setIncludeCharts(TRUE); - $objPHPExcel = $objReader->load($inputFileName); - - - echo date('H:i:s') , " Iterate worksheets looking at the charts" , EOL; - foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { - $sheetName = $worksheet->getTitle(); - echo 'Worksheet: ' , $sheetName , EOL; - - $chartNames = $worksheet->getChartNames(); - if(empty($chartNames)) { - echo ' There are no charts in this worksheet' , EOL; - } else { - natsort($chartNames); - foreach($chartNames as $i => $chartName) { - $chart = $worksheet->getChartByName($chartName); - if (!is_null($chart->getTitle())) { - $caption = '"' . implode(' ',$chart->getTitle()->getCaption()) . '"'; - } else { - $caption = 'Untitled'; - } - echo ' ' , $chartName , ' - ' , $caption , EOL; - echo str_repeat(' ',strlen($chartName)+3); - $groupCount = $chart->getPlotArea()->getPlotGroupCount(); - if ($groupCount == 1) { - $chartType = $chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType(); - echo ' ' , $chartType , EOL; - } else { - $chartTypes = array(); - for($i = 0; $i < $groupCount; ++$i) { - $chartTypes[] = $chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); - } - $chartTypes = array_unique($chartTypes); - if (count($chartTypes) == 1) { - $chartType = 'Multiple Plot ' . array_pop($chartTypes); - echo ' ' , $chartType , EOL; - } elseif (count($chartTypes) == 0) { - echo ' *** Type not yet implemented' , EOL; - } else { - echo ' Combination Chart' , EOL; - } - } - } - } - } - - - $outputFileName = str_replace('.xlsx', '.html', basename($inputFileName)); - - echo date('H:i:s') , " Write Tests to HTML file " , EOL; - $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML'); - $objWriter->setIncludeCharts(TRUE); - $objWriter->save($outputFileName); - echo date('H:i:s') , " File written to " , $outputFileName , EOL; - - $objPHPExcel->disconnectWorksheets(); - unset($objPHPExcel); -} - -// Echo memory peak usage -echo date('H:i:s') , ' Peak memory usage: ' , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/36chartreadwritePDF.php b/vendor/phpoffice/phpexcel/Examples/36chartreadwritePDF.php deleted file mode 100644 index 24d1c85..0000000 --- a/vendor/phpoffice/phpexcel/Examples/36chartreadwritePDF.php +++ /dev/null @@ -1,174 +0,0 @@ -<?php - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/'); - -/** PHPExcel_IOFactory */ -include 'PHPExcel/IOFactory.php'; - - -// Change these values to select the Rendering library that you wish to use -// for PDF files, and its directory location on your server -//$rendererName = PHPExcel_Settings::PDF_RENDERER_TCPDF; -$rendererName = PHPExcel_Settings::PDF_RENDERER_MPDF; -//$rendererName = PHPExcel_Settings::PDF_RENDERER_DOMPDF; -//$rendererLibrary = 'tcPDF5.9'; -$rendererLibrary = 'mPDF5.4'; -//$rendererLibrary = 'domPDF0.6.0beta3'; -$rendererLibraryPath = '/php/libraries/PDF/' . $rendererLibrary; - - -if (!PHPExcel_Settings::setPdfRenderer( - $rendererName, - $rendererLibraryPath - )) { - die( - 'NOTICE: Please set the $rendererName and $rendererLibraryPath values' . - EOL . - 'at the top of this script as appropriate for your directory structure' - ); -} - - -// Change these values to select the Rendering library that you wish to use -// for Chart images, and its directory location on your server -$rendererName = PHPExcel_Settings::CHART_RENDERER_JPGRAPH; -$rendererLibrary = 'jpgraph3.5.0b1/src/'; -$rendererLibraryPath = '/php/libraries/Charts/' . $rendererLibrary; - - -if (!PHPExcel_Settings::setChartRenderer( - $rendererName, - $rendererLibraryPath - )) { - die( - 'NOTICE: Please set the $rendererName and $rendererLibraryPath values' . - EOL . - 'at the top of this script as appropriate for your directory structure' - ); -} - - -$inputFileType = 'Excel2007'; -$inputFileNames = 'templates/36write*.xlsx'; - -if ((isset($argc)) && ($argc > 1)) { - $inputFileNames = array(); - for($i = 1; $i < $argc; ++$i) { - $inputFileNames[] = dirname(__FILE__) . '/templates/' . $argv[$i]; - } -} else { - $inputFileNames = glob($inputFileNames); -} -foreach($inputFileNames as $inputFileName) { - $inputFileNameShort = basename($inputFileName); - - if (!file_exists($inputFileName)) { - echo date('H:i:s') , " File " , $inputFileNameShort , ' does not exist' , EOL; - continue; - } - - echo date('H:i:s') , " Load Test from $inputFileType file " , $inputFileNameShort , EOL; - - $objReader = PHPExcel_IOFactory::createReader($inputFileType); - $objReader->setIncludeCharts(TRUE); - $objPHPExcel = $objReader->load($inputFileName); - - - echo date('H:i:s') , " Iterate worksheets looking at the charts" , EOL; - foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) { - $sheetName = $worksheet->getTitle(); - echo 'Worksheet: ' , $sheetName , EOL; - - $chartNames = $worksheet->getChartNames(); - if(empty($chartNames)) { - echo ' There are no charts in this worksheet' , EOL; - } else { - natsort($chartNames); - foreach($chartNames as $i => $chartName) { - $chart = $worksheet->getChartByName($chartName); - if (!is_null($chart->getTitle())) { - $caption = '"' . implode(' ',$chart->getTitle()->getCaption()) . '"'; - } else { - $caption = 'Untitled'; - } - echo ' ' , $chartName , ' - ' , $caption , EOL; - echo str_repeat(' ',strlen($chartName)+3); - $groupCount = $chart->getPlotArea()->getPlotGroupCount(); - if ($groupCount == 1) { - $chartType = $chart->getPlotArea()->getPlotGroupByIndex(0)->getPlotType(); - echo ' ' , $chartType , EOL; - } else { - $chartTypes = array(); - for($i = 0; $i < $groupCount; ++$i) { - $chartTypes[] = $chart->getPlotArea()->getPlotGroupByIndex($i)->getPlotType(); - } - $chartTypes = array_unique($chartTypes); - if (count($chartTypes) == 1) { - $chartType = 'Multiple Plot ' . array_pop($chartTypes); - echo ' ' , $chartType , EOL; - } elseif (count($chartTypes) == 0) { - echo ' *** Type not yet implemented' , EOL; - } else { - echo ' Combination Chart' , EOL; - } - } - } - } - } - - - $outputFileName = str_replace('.xlsx', '.pdf', basename($inputFileName)); - - echo date('H:i:s') , " Write Tests to HTML file " , EOL; - $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'PDF'); - $objWriter->setIncludeCharts(TRUE); - $objWriter->save($outputFileName); - echo date('H:i:s') , " File written to " , $outputFileName , EOL; - - $objPHPExcel->disconnectWorksheets(); - unset($objPHPExcel); -} - -// Echo memory peak usage -echo date('H:i:s') , ' Peak memory usage: ' , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/37page_layout_view.php b/vendor/phpoffice/phpexcel/Examples/37page_layout_view.php deleted file mode 100644 index 810ca3d..0000000 --- a/vendor/phpoffice/phpexcel/Examples/37page_layout_view.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("PHPOffice") - ->setLastModifiedBy("PHPOffice") - ->setTitle("PHPExcel Test Document") - ->setSubject("PHPExcel Test Document") - ->setDescription("Test document for PHPExcel, generated using PHP classes.") - ->setKeywords("Office PHPExcel php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!'); - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - -// Set the page layout view as page layout -$objPHPExcel->getActiveSheet()->getSheetView()->setView(PHPExcel_Worksheet_SheetView::SHEETVIEW_PAGE_LAYOUT); - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -// Save Excel5 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/38cloneWorksheet.php b/vendor/phpoffice/phpexcel/Examples/38cloneWorksheet.php deleted file mode 100644 index 245f7da..0000000 --- a/vendor/phpoffice/phpexcel/Examples/38cloneWorksheet.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("PHPExcel Test Document") - ->setSubject("PHPExcel Test Document") - ->setDescription("Test document for PHPExcel, generated using PHP classes.") - ->setKeywords("office PHPExcel php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', 'Hello') - ->setCellValue('B2', 'world!') - ->setCellValue('C1', 'Hello') - ->setCellValue('D2', 'world!'); - -// Miscellaneous glyphs, UTF-8 -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A4', 'Miscellaneous glyphs') - ->setCellValue('A5', 'éàèùâêîôûëïüÿäöüç'); - - -$objPHPExcel->getActiveSheet()->setCellValue('A8',"Hello\nWorld"); -$objPHPExcel->getActiveSheet()->getRowDimension(8)->setRowHeight(-1); -$objPHPExcel->getActiveSheet()->getStyle('A8')->getAlignment()->setWrapText(true); - - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Clone worksheet -echo date('H:i:s') , " Clone worksheet" , EOL; -$clonedSheet = clone $objPHPExcel->getActiveSheet(); -$clonedSheet - ->setCellValue('A1', 'Goodbye') - ->setCellValue('A2', 'cruel') - ->setCellValue('C1', 'Goodbye') - ->setCellValue('C2', 'cruel'); - -// Rename cloned worksheet -echo date('H:i:s') , " Rename cloned worksheet" , EOL; -$clonedSheet->setTitle('Simple Clone'); -$objPHPExcel->addSheet($clonedSheet); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/39dropdown.php b/vendor/phpoffice/phpexcel/Examples/39dropdown.php deleted file mode 100644 index c8dcff6..0000000 --- a/vendor/phpoffice/phpexcel/Examples/39dropdown.php +++ /dev/null @@ -1,175 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties() - ->setCreator("PHPOffice") - ->setLastModifiedBy("PHPOffice") - ->setTitle("PHPExcel Test Document") - ->setSubject("PHPExcel Test Document") - ->setDescription("Test document for PHPExcel, generated using PHP classes.") - ->setKeywords("Office PHPExcel php") - ->setCategory("Test result file"); - - -function transpose($value) { - return array($value); -} - -// Add some data -$continentColumn = 'D'; -$column = 'F'; - -// Set data for dropdowns -foreach(glob('./data/continents/*') as $key => $filename) { - $continent = pathinfo($filename, PATHINFO_FILENAME); - echo "Loading $continent", EOL; - $continent = str_replace(' ','_',$continent); - $countries = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - $countryCount = count($countries); - - // Transpose $countries from a row to a column array - $countries = array_map('transpose', $countries); - $objPHPExcel->getActiveSheet() - ->fromArray($countries, null, $column . '1'); - $objPHPExcel->addNamedRange( - new PHPExcel_NamedRange( - $continent, - $objPHPExcel->getActiveSheet(), $column . '1:' . $column . $countryCount - ) - ); - $objPHPExcel->getActiveSheet() - ->getColumnDimension($column) - ->setVisible(false); - - $objPHPExcel->getActiveSheet() - ->setCellValue($continentColumn . ($key+1), $continent); - - ++$column; -} - -// Hide the dropdown data -$objPHPExcel->getActiveSheet() - ->getColumnDimension($continentColumn) - ->setVisible(false); - -$objPHPExcel->addNamedRange( - new PHPExcel_NamedRange( - 'Continents', - $objPHPExcel->getActiveSheet(), $continentColumn . '1:' . $continentColumn . ($key+1) - ) -); - - -// Set selection cells -$objPHPExcel->getActiveSheet() - ->setCellValue('A1', 'Continent:'); -$objPHPExcel->getActiveSheet() - ->setCellValue('B1', 'Select continent'); -$objPHPExcel->getActiveSheet() - ->setCellValue('B3', '=' . $column . 1); -$objPHPExcel->getActiveSheet() - ->setCellValue('B3', 'Select country'); -$objPHPExcel->getActiveSheet() - ->getStyle('A1:A3') - ->getFont()->setBold(true); - -// Set linked validators -$objValidation = $objPHPExcel->getActiveSheet() - ->getCell('B1') - ->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ) - ->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ) - ->setAllowBlank(false) - ->setShowInputMessage(true) - ->setShowErrorMessage(true) - ->setShowDropDown(true) - ->setErrorTitle('Input error') - ->setError('Continent is not in the list.') - ->setPromptTitle('Pick from the list') - ->setPrompt('Please pick a continent from the drop-down list.') - ->setFormula1('=Continents'); - -$objPHPExcel->getActiveSheet() - ->setCellValue('A3', 'Country:'); -$objPHPExcel->getActiveSheet() - ->getStyle('A3') - ->getFont()->setBold(true); - -$objValidation = $objPHPExcel->getActiveSheet() - ->getCell('B3') - ->getDataValidation(); -$objValidation->setType( PHPExcel_Cell_DataValidation::TYPE_LIST ) - ->setErrorStyle( PHPExcel_Cell_DataValidation::STYLE_INFORMATION ) - ->setAllowBlank(false) - ->setShowInputMessage(true) - ->setShowErrorMessage(true) - ->setShowDropDown(true) - ->setErrorTitle('Input error') - ->setError('Country is not in the list.') - ->setPromptTitle('Pick from the list') - ->setPrompt('Please pick a country from the drop-down list.') - ->setFormula1('=INDIRECT($B$1)'); - - -$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(12); -$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - -// Save Excel 2007 file -// This linked validation list method only seems to work for Excel2007, not for Excel5 -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/40duplicateStyle.php b/vendor/phpoffice/phpexcel/Examples/40duplicateStyle.php deleted file mode 100644 index be31951..0000000 --- a/vendor/phpoffice/phpexcel/Examples/40duplicateStyle.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); -$worksheet = $objPHPExcel->getActiveSheet(); - -echo date('H:i:s') , " Create styles array" , EOL; -$styles = array(); -for ($i = 0; $i < 10; $i++) { - $style = new PHPExcel_Style(); - $style->getFont()->setSize($i + 4); - $styles[] = $style; -} - -echo date('H:i:s') , " Add data (begin)" , EOL; -$t = microtime(true); -for ($col = 0; $col < 50; $col++) { - for ($row = 0; $row < 100; $row++) { - $str = ($row + $col); - $style = $styles[$row % 10]; - $coord = PHPExcel_Cell::stringFromColumnIndex($col) . ($row + 1); - $worksheet->setCellValue($coord, $str); - $worksheet->duplicateStyle($style, $coord); - } -} -$d = microtime(true) - $t; -echo date('H:i:s') , " Add data (end), time: " . round($d, 2) . " s", EOL; - - -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; - - -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/41password.php b/vendor/phpoffice/phpexcel/Examples/41password.php deleted file mode 100644 index 15aea7b..0000000 --- a/vendor/phpoffice/phpexcel/Examples/41password.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -include "05featuredemo.inc.php"; - -/** Include PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -// Set password against the spreadsheet file -$objPHPExcel->getSecurity()->setLockWindows(true); -$objPHPExcel->getSecurity()->setLockStructure(true); -$objPHPExcel->getSecurity()->setWorkbookPassword('secret'); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/42richText.php b/vendor/phpoffice/phpexcel/Examples/42richText.php deleted file mode 100644 index 32bc401..0000000 --- a/vendor/phpoffice/phpexcel/Examples/42richText.php +++ /dev/null @@ -1,164 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (C) 2006 - 2014 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); -date_default_timezone_set('Europe/London'); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -/** Include PHPExcel */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel.php'; - - -// Create new PHPExcel object -echo date('H:i:s') , " Create new PHPExcel object" , EOL; -$objPHPExcel = new PHPExcel(); - -// Set document properties -echo date('H:i:s') , " Set document properties" , EOL; -$objPHPExcel->getProperties()->setCreator("Maarten Balliauw") - ->setLastModifiedBy("Maarten Balliauw") - ->setTitle("PHPExcel Test Document") - ->setSubject("PHPExcel Test Document") - ->setDescription("Test document for PHPExcel, generated using PHP classes.") - ->setKeywords("office PHPExcel php") - ->setCategory("Test result file"); - - -// Add some data -echo date('H:i:s') , " Add some data" , EOL; - -$html1 = '<font color="#0000ff"> -<h1 align="center">My very first example of rich text<br />generated from html markup</h1> -<p> -<font size="14" COLOR="rgb(0,255,128)"> -<b>This block</b> contains an <i>italicized</i> word; -while this block uses an <u>underline</u>. -</font> -</p> -<p align="right"><font size="9" color="red"> -I want to eat <ins><del>healthy food</del> <strong>pizza</strong></ins>. -</font> -'; - -$html2 = '<p> -<font color="#ff0000"> - 100&deg;C is a hot temperature -</font> -<br> -<font color="#0080ff"> - 10&deg;F is cold -</font> -</p>'; - -$html3 = '2<sup>3</sup> equals 8'; - -$html4 = 'H<sub>2</sub>SO<sub>4</sub> is the chemical formula for Sulphuric acid'; - -$html5 = '<strong>bold</strong>, <em>italic</em>, <strong><em>bold+italic</em></strong>'; - - -$wizard = new PHPExcel_Helper_HTML; -$richText = $wizard->toRichTextObject($html1); - -$objPHPExcel->setActiveSheetIndex(0) - ->setCellValue('A1', $richText); - -$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(48); -$objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(-1); -$objPHPExcel->getActiveSheet()->getStyle('A1') - ->getAlignment() - ->setWrapText(true); - -$richText = $wizard->toRichTextObject($html2); - -$objPHPExcel->getActiveSheet() - ->setCellValue('A2', $richText); - -$objPHPExcel->getActiveSheet()->getRowDimension(1)->setRowHeight(-1); -$objPHPExcel->getActiveSheet()->getStyle('A2') - ->getAlignment() - ->setWrapText(true); - -$objPHPExcel->getActiveSheet() - ->setCellValue('A3', $wizard->toRichTextObject($html3)); - -$objPHPExcel->getActiveSheet() - ->setCellValue('A4', $wizard->toRichTextObject($html4)); - -$objPHPExcel->getActiveSheet() - ->setCellValue('A5', $wizard->toRichTextObject($html5)); - - -// Rename worksheet -echo date('H:i:s') , " Rename worksheet" , EOL; -$objPHPExcel->getActiveSheet()->setTitle('Simple'); - - -// Set active sheet index to the first sheet, so Excel opens this as the first sheet -$objPHPExcel->setActiveSheetIndex(0); - - -// Save Excel 2007 file -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Save Excel 95 file -echo date('H:i:s') , " Write to Excel5 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing files" , EOL; -echo 'Files have been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/43mergeWorkbooks.php b/vendor/phpoffice/phpexcel/Examples/43mergeWorkbooks.php deleted file mode 100644 index 465b60a..0000000 --- a/vendor/phpoffice/phpexcel/Examples/43mergeWorkbooks.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -echo date('H:i:s') , " Load MergeBook1 from Excel2007 file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcel1 = PHPExcel_IOFactory::load(dirname(__FILE__) . "/templates/43mergeBook1.xlsx"); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Mergebook1 was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -echo date('H:i:s') , " Load MergeBook2 from Excel2007 file" , EOL; -$callStartTime = microtime(true); - -$objPHPExcel2 = PHPExcel_IOFactory::load(dirname(__FILE__) . "/templates/43mergeBook2.xlsx"); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Mergebook2 was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -foreach($objPHPExcel2->getSheetNames() as $sheetName) { - $sheet = $objPHPExcel2->getSheetByName($sheetName); - $sheet->setTitle($sheet->getTitle() . ' copied'); - $objPHPExcel1->addExternalSheet($sheet); -} - - -echo date('H:i:s') , " Write to Excel2007 format" , EOL; -$callStartTime = microtime(true); - -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel1, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; - -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL; -echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , EOL; -echo 'File has been created in ' , getcwd() , EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/44worksheetInfo.php b/vendor/phpoffice/phpexcel/Examples/44worksheetInfo.php deleted file mode 100644 index 5aeefcb..0000000 --- a/vendor/phpoffice/phpexcel/Examples/44worksheetInfo.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -error_reporting(E_ALL); -ini_set('display_errors', TRUE); -ini_set('display_startup_errors', TRUE); - -define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />'); - -date_default_timezone_set('Europe/London'); - -/** Include PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -if (!file_exists("05featuredemo.xlsx")) { - exit("Please run 05featuredemo.php first." . EOL); -} - -$inputFileName = "05featuredemo.xlsx"; -$inputFileType = PHPExcel_IOFactory::identify($inputFileName); -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -$sheetList = $objReader->listWorksheetNames($inputFileName); -$sheetInfo = $objReader->listWorksheetInfo($inputFileName); - -echo 'File Type:', PHP_EOL; -var_dump($inputFileType); - -echo 'Worksheet Names:', PHP_EOL; -var_dump($sheetList); - -echo 'Worksheet Names:', PHP_EOL; -var_dump($sheetInfo); - diff --git a/vendor/phpoffice/phpexcel/Examples/Excel2003XMLReader.php b/vendor/phpoffice/phpexcel/Examples/Excel2003XMLReader.php deleted file mode 100644 index 775c3d8..0000000 --- a/vendor/phpoffice/phpexcel/Examples/Excel2003XMLReader.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -echo date('H:i:s') , " Load from Excel2003XML file" , PHP_EOL; -$callStartTime = microtime(true); - -$objReader = PHPExcel_IOFactory::createReader('Excel2003XML'); -$objPHPExcel = $objReader->load("Excel2003XMLTest.xml"); - - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , PHP_EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - - -echo date('H:i:s') , " Write to Excel5 format" , PHP_EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); -$objWriter->save(str_replace('.php', '.xls', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xls', __FILE__) , PHP_EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , PHP_EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/Excel2003XMLTest.xml b/vendor/phpoffice/phpexcel/Examples/Excel2003XMLTest.xml deleted file mode 100644 index fb2d305..0000000 --- a/vendor/phpoffice/phpexcel/Examples/Excel2003XMLTest.xml +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><?mso-application progid="Excel.Sheet"?><Workbook xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:x="urn:schemas-microsoft-com:office:excel"><OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"><Colors><Color><Index>3</Index><RGB>#000000</RGB></Color><Color><Index>4</Index><RGB>#0000ff</RGB></Color><Color><Index>5</Index><RGB>#008000</RGB></Color><Color><Index>6</Index><RGB>#00ccff</RGB></Color><Color><Index>7</Index><RGB>#800080</RGB></Color><Color><Index>8</Index><RGB>#993366</RGB></Color><Color><Index>9</Index><RGB>#c0c0c0</RGB></Color><Color><Index>10</Index><RGB>#c47512</RGB></Color><Color><Index>11</Index><RGB>#ccffcc</RGB></Color><Color><Index>12</Index><RGB>#ddbc7d</RGB></Color><Color><Index>13</Index><RGB>#ff0000</RGB></Color><Color><Index>14</Index><RGB>#ff00ff</RGB></Color><Color><Index>15</Index><RGB>#ff6600</RGB></Color><Color><Index>16</Index><RGB>#ff9900</RGB></Color><Color><Index>17</Index><RGB>#ff99cc</RGB></Color><Color><Index>18</Index><RGB>#ffff00</RGB></Color></Colors></OfficeDocumentSettings><ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"><WindowHeight>9000</WindowHeight><WindowWidth>13860</WindowWidth><WindowTopX>240</WindowTopX><WindowTopY>75</WindowTopY><ProtectStructure>False</ProtectStructure><ProtectWindows>False</ProtectWindows></ExcelWorkbook><Styles><Style ss:ID="Default" ss:Name="Default"/><Style ss:ID="Result" ss:Name="Result"><Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/></Style><Style ss:ID="Result2" ss:Name="Result2"><Font ss:Bold="1" ss:Italic="1" ss:Underline="Single"/><NumberFormat ss:Format="Currency"/></Style><Style ss:ID="Heading" ss:Name="Heading"><Font ss:Bold="1" ss:Italic="1" ss:Size="16"/></Style><Style ss:ID="Heading1" ss:Name="Heading1"><Font ss:Bold="1" ss:Italic="1" ss:Size="16"/></Style><Style ss:ID="Gnumeric-default" ss:Name="Gnumeric-default"><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10"/></Style><Style ss:ID="co1"/><Style ss:ID="co2"/><Style ss:ID="co3"/><Style ss:ID="co4"/><Style ss:ID="co5"/><Style ss:ID="co6"/><Style ss:ID="co7"/><Style ss:ID="co8"/><Style ss:ID="co9"/><Style ss:ID="ta1"/><Style ss:ID="ce1"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Bold="1" ss:Color="#ff0000" ss:FontName="Arial1" ss:Size="11"/></Style><Style ss:ID="ce2"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Bold="1" ss:Color="#000000" ss:FontName="Arial1" ss:Italic="1" ss:Size="11"/></Style><Style ss:ID="ce3"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11" ss:Underline="Single"/></Style><Style ss:ID="ce4"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/></Style><Style ss:ID="ce5"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce6"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11" ss:Underline="Single"/></Style><Style ss:ID="ce7"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11" ss:Underline="Double"/></Style><Style ss:ID="ce8"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11" ss:StrikeThrough="1"/></Style><Style ss:ID="ce9"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/><NumberFormat ss:Format="Short Date"/></Style><Style ss:ID="ce10"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/><NumberFormat ss:Format="Fixed"/></Style><Style ss:ID="ce11"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><NumberFormat ss:Format="Short Time"/></Style><Style ss:ID="ce12"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><NumberFormat ss:Format="General Date"/></Style><Style ss:ID="ce13"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10"/></Style><Style ss:ID="ce14"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10" ss:Underline="Single"/></Style><Style ss:ID="ce15"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10" ss:Underline="Double"/></Style><Style ss:ID="ce16"><Alignment ss:Vertical="Bottom" ss:WrapText="1" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10"/></Style><Style ss:ID="ce17"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#0000ff" ss:FontName="Sans" ss:Size="10" ss:Underline="Single"/></Style><Style ss:ID="ce18"><Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="3" ss:Color="#00b050"/><Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="3" ss:Color="#0070c0"/><Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3" ss:Color="#ffff00"/><Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="3" ss:Color="#ff0000"/></Borders><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/></Style><Style ss:ID="ce19"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/></Style><Style ss:ID="ce20"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/></Style><Style ss:ID="ce21"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/></Style><Style ss:ID="ce22"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/></Style><Style ss:ID="ce23"><Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:Rotate="90"/><Borders/><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10"/></Style><Style ss:ID="ce24"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/><NumberFormat ss:Format="General"/></Style><Style ss:ID="ce25"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><NumberFormat ss:Format="General"/></Style><Style ss:ID="ce26"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Bold="1" ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/></Style><Style ss:ID="ce27"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Italic="1" ss:Size="11"/></Style><Style ss:ID="ce28"><Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:Rotate="45"/><Borders/><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10"/></Style><Style ss:ID="ce29"><Alignment ss:Vertical="Top" ss:WrapText="1" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce30"><Alignment ss:Vertical="Bottom" ss:WrapText="1" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce31"><Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:Rotate="-90"/><Borders/><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10"/></Style><Style ss:ID="ce32"><Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce33"><Alignment ss:Vertical="Bottom" ss:WrapText="1" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce34"><Alignment ss:Vertical="Bottom" ss:WrapText="1" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce35"><Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:Rotate="-45"/><Borders/><Font ss:Color="#000000" ss:FontName="Sans" ss:Size="10"/></Style><Style ss:ID="ce36"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce37"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#ff0000" ss:Pattern="Solid"/></Style><Style ss:ID="ce38"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#ff9900" ss:Pattern="Solid"/></Style><Style ss:ID="ce39"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#ffff00" ss:Pattern="Solid"/></Style><Style ss:ID="ce40"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#008000" ss:Pattern="Solid"/></Style><Style ss:ID="ce41"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#0000ff" ss:Pattern="Solid"/></Style><Style ss:ID="ce42"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#993366" ss:Pattern="Solid"/></Style><Style ss:ID="ce43"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#ff99cc" ss:Pattern="Solid"/></Style><Style ss:ID="ce44"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#ddbc7d" ss:Pattern="Solid"/></Style><Style ss:ID="ce45"><Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#00ccff" ss:Pattern="Solid"/></Style><Style ss:ID="ce46"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#ff0000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce47"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#ff6600" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce48"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#ffff00" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce49"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#008000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce50"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#0000ff" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce51"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#800080" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce52"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#ff00ff" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce53"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#c47512" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce54"><Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1" ss:Rotate="0"/><Borders/><Font ss:Color="#ccffcc" ss:FontName="Calibri" ss:Size="11"/><Interior ss:Color="#ff0000" ss:Pattern="Solid"/></Style><Style ss:ID="ce55"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce56"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce57"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce58"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce59"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce60"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce61"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce62"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce63"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce64"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="3" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce65"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders><Border ss:Position="Bottom" ss:LineStyle="Double" ss:Weight="3" ss:Color="#000000"/></Borders><Font ss:Color="#000000" ss:FontName="Calibri" ss:Size="11"/></Style><Style ss:ID="ce66"><Alignment ss:Horizontal="Center" ss:Vertical="Bottom" ss:WrapText="1" ss:Rotate="0"/><Borders/><Font ss:Bold="1" ss:Color="#000000" ss:FontName="Arial1" ss:Size="12"/></Style><Style ss:ID="ce67"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/><NumberFormat ss:Format="General"/></Style><Style ss:ID="ce68"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/><NumberFormat ss:Format="Medium Date"/></Style><Style ss:ID="ce69"><Alignment ss:Vertical="Bottom" ss:Rotate="0"/><Borders/><Font ss:Color="#000000" ss:FontName="Arial1" ss:Size="11"/><NumberFormat ss:Format="Medium Time"/></Style><Style ss:ID="gr1"/><Style ss:ID="gr2"/><Style ss:ID="ta_extref"/><Style ss:ID="P1"><Font ss:FontName="Sans" ss:Size="10"/></Style><Style ss:ID="T1"/></Styles><ss:Worksheet ss:Name="Sample Data"><Table ss:StyleID="ta1"><Column ss:Width="96.4913"/><Column ss:Span="1" ss:Width="48.3874"/><Column ss:Index="4" ss:Width="35.8866"/><Column ss:Span="6" ss:Width="48.3874"/><Column ss:Index="12" ss:Width="50.2583"/><Column ss:Span="1011" ss:Width="48.3874"/><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce1"><ss:Data xmlns="http://www.w3.org/TR/REC-html40" ss:Type="String">Test String 1</ss:Data><Comment><ss:Data xmlns="http://www.w3.org/TR/REC-html40"><Font html:Face="Sans" html:Size="10">Test for a simple colour-formatted string</Font></ss:Data></Comment></Cell><Cell ss:StyleID="ce4"><Data ss:Type="Number">1</Data></Cell><Cell ss:StyleID="ce4"><Data ss:Type="Number">5</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce2"><Data ss:Type="String">A</Data></Cell><Cell ss:StyleID="ce26"><Data ss:Type="String">E</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=[.B1]+[.C1]"><Data ss:Type="Number">6</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=[.E1]&amp;[.F1]"><Data ss:Type="String">AE</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce2"><Data ss:Type="String">Test - String 2</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">2</Data></Cell><Cell ss:StyleID="ce4"><Data ss:Type="Number">6</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">B</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="String">F</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=[.B2]+[.C2]"><Data ss:Type="Number">8</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=[.E2]&amp;[.F2]"><Data ss:Type="String">BF</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce55"><Data ss:Type="String">Dot</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce3"><Data ss:Type="String">Test #3</Data></Cell><Cell ss:StyleID="ce4"><Data ss:Type="Number">3</Data></Cell><Cell ss:StyleID="ce4"><Data ss:Type="Number">7</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce26"><Data ss:Type="String">C</Data></Cell><Cell ss:StyleID="ce2"><Data ss:Type="String">G</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=[.B3]+[.C3]"><Data ss:Type="Number">10</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=[.E3]&amp;[.F3]"><Data ss:Type="String">CG</Data></Cell><Cell ss:StyleID="ce37"><Data ss:Type="String">Red</Data></Cell><Cell ss:StyleID="ce46"><Data ss:Type="String">Red</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce56"><Data ss:Type="String">Dash</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce4"><Data ss:Type="String">Test with (") in string</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">4</Data></Cell><Cell ss:StyleID="ce4"><Data ss:Type="Number">8</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce27"><Data ss:Type="String">D</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="String">H</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=[.B4]+[.C4]"><Data ss:Type="Number">12</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=[.E4]&amp;[.F4]"><Data ss:Type="String">DH</Data></Cell><Cell ss:StyleID="ce38"><Data ss:Type="String">Orange</Data></Cell><Cell ss:StyleID="ce47"><Data ss:Type="String">Orange</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce57"><Data ss:Type="String">Dash/Dot/Dot</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=SUM([.B1:.B4])"><Data ss:Type="Number">10</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=SUM([.C1:.C4])"><Data ss:Type="Number">26</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=SUM([.B1:.C4])"><Data ss:Type="Number">36</Data></Cell><Cell ss:StyleID="ce39"><Data ss:Type="String">Yellow</Data></Cell><Cell ss:StyleID="ce48"><Data ss:Type="String">Yellow</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce58"><Data ss:Type="String">Dash/Dot</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce6"><Data ss:Type="String">Test #3</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">1.23</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=TRUE()"><Data ss:Type="Boolean">1</Data></Cell><Cell ss:StyleID="ce24"><Data ss:Type="Boolean">1</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce40"><Data ss:Type="String">Green</Data></Cell><Cell ss:StyleID="ce49"><Data ss:Type="String">Green</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce56"><Data ss:Type="String">Thin Line</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce7"><Data ss:Type="String">Test #3</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">2.34</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=FALSE()"><Data ss:Type="Boolean">0</Data></Cell><Cell ss:StyleID="ce25"><Data ss:Type="Boolean">0</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=SUM(marksrange)"><Data ss:Type="Number">0</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce41"><Data ss:Type="String">Blue</Data></Cell><Cell ss:StyleID="ce50"><Data ss:Type="String">Blue</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce59"><Data ss:Type="String">Thick Dash/Dot/Dot</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:Index="8" ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce8"><Data ss:Type="String">Test #3</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">3.45</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce42"><Data ss:Type="String">Purple</Data></Cell><Cell ss:StyleID="ce51"><Data ss:Type="String">Purple</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce60"><Data ss:Type="String">Variant Thick Dash/Dot/Dot</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="13.4929"><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce43"><Data ss:Type="String">Pink</Data></Cell><Cell ss:StyleID="ce52"><Data ss:Type="String">Pink</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce61"><Data ss:Type="String">Thick Dash/Dot</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce9"><Data ss:Type="DateTime">1960-12-19T00:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce19"><Data ss:Type="String">TOP</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="Number">0</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce44"><Data ss:Type="String">Brown</Data></Cell><Cell ss:StyleID="ce53"><Data ss:Type="String">Brown</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce62"><Data ss:Type="String">Thick Dash</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce10"><Data ss:Type="Number">1.5</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5" ss:Formula="of:=12/0"><Data ss:Type="Number">0</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce63"><Data ss:Type="String">Thick Line</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="13.4929"><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce20"><Data ss:Type="String">BOTTOM</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce64"><Data ss:Type="String">Extra Thick Line</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce11"><Data ss:Type="DateTime">1899-12-31T02:30:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><ss:Data xmlns="http://www.w3.org/TR/REC-html40" ss:Type="String">Мойва сушеная</ss:Data><Comment><ss:Data xmlns="http://www.w3.org/TR/REC-html40"><Font html:Face="Sans" html:Size="10">Tests for UTF-8 content</Font></ss:Data></Comment></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce65"><Data ss:Type="String">Double Line</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce21"><Data ss:Type="String">LEFT</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">Ärendetext</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce12"><Data ss:Type="DateTime">1960-12-19T01:30:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">Højde</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:Index="16" ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce22"><Data ss:Type="String">RIGHT</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="13.4929"><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:Height="41.7543"><Cell ss:StyleID="ce5"/><Cell ss:MergeAcross="1" ss:MergeDown="1" ss:StyleID="ce18"><Data ss:Type="String">BOX</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce29"><Data ss:Type="String">Test Column 1</Data></Cell><Cell ss:StyleID="ce30"/><Cell ss:StyleID="ce33"/><Cell ss:StyleID="ce36"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:Height="41.7543"><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce30"/><Cell ss:StyleID="ce32"><Data ss:Type="String">Test Column 2</Data></Cell><Cell ss:StyleID="ce30"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce45"><Data ss:Type="String">Patterned</Data></Cell><Cell ss:StyleID="ce54"><Data ss:Type="String">Patterned 2</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:Height="41.7543"><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce30"/><Cell ss:StyleID="ce30"/><Cell ss:StyleID="ce34"><Data ss:Type="String">Test Column 3</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:StyleID="ce13"><Data ss:Type="String">Underline None</Data></Cell><Cell ss:Index="3" ss:MergeAcross="1" ss:MergeDown="4" ss:StyleID="ce23"><Data ss:Type="String">Rotate 90</Data></Cell><Cell ss:MergeAcross="1" ss:MergeDown="4" ss:StyleID="ce28"><Data ss:Type="String">Rotate 45</Data></Cell><Cell ss:MergeAcross="1" ss:MergeDown="4" ss:StyleID="ce31"><Data ss:Type="String">Rotate -90</Data></Cell><Cell ss:MergeAcross="1" ss:MergeDown="4" ss:StyleID="ce35"><Data ss:Type="String">Rotate -45</Data></Cell><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:StyleID="ce14"><Data ss:Type="String">Underline 1</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="String">Subscript</Data></Cell><Cell ss:Index="1016" ss:StyleID="ce13"/></Row><Row ss:Index="24" ss:Height="12.8409"><Cell ss:StyleID="ce15"><Data ss:Type="String">Underline 2</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="String">Superscript</Data></Cell><Cell ss:Index="1016" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:StyleID="ce14"><Data ss:Type="String">Underline 3</Data></Cell><Cell ss:Index="1016" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:StyleID="ce15"><Data ss:Type="String">Underline 4</Data></Cell><Cell ss:Index="1016" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="49.2378"><Cell ss:MergeAcross="2" ss:StyleID="ce16"><ss:Data xmlns="http://www.w3.org/TR/REC-html40" ss:Type="String">I don't know if Gnumeric supports <B><Font html:Face="Sans" html:Color="#000000" html:Size="10">Rich Text</Font></B> in the same way as <B><Font html:Face="Sans" html:Color="#000000" html:Size="10">Excel</Font></B>, And this row should be autofit height with text wrap</ss:Data></Cell><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/><Cell ss:StyleID="ce16"/></Row><Row ss:Height="13.4079"><Cell ss:MergeAcross="2" ss:HRef="http://www.phpexcel.net/" ss:StyleID="ce17"><Data ss:Type="String">PHPExcel</Data></Cell><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Index="65536" ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row></Table><x:WorksheetOptions/></ss:Worksheet><ss:Worksheet ss:Name="Report Data"><Table ss:StyleID="ta1"><Column ss:Span="2" ss:Width="56.2394"/><Column ss:Index="4" ss:Width="78.7465"/><Column ss:Width="58.5071"/><Column ss:Width="27.4961"/><Column ss:Width="78.7465"/><Column ss:Width="68.5984"/><Column ss:Span="1015" ss:Width="48.3874"/><Column ss:Index="1025"/><Column ss:Span="1"/><Row ss:AutoFitHeight="0" ss:Height="31.4929"><Cell ss:StyleID="ce66"/><Cell ss:StyleID="ce66"/><Cell ss:StyleID="ce66"/><Cell ss:StyleID="ce66"/><Cell ss:StyleID="ce66"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce66"/><Cell ss:StyleID="ce66"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="31.4929"><Cell ss:StyleID="ce66"><Data ss:Type="String">Heading 1</Data></Cell><Cell ss:StyleID="ce66"><Data ss:Type="String">Heading 2</Data></Cell><Cell ss:StyleID="ce66"><Data ss:Type="String">Third Heading</Data></Cell><Cell ss:StyleID="ce66"><Data ss:Type="String">Date Heading</Data></Cell><Cell ss:StyleID="ce66"><Data ss:Type="String">Time Heading</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce66"><Data ss:Type="String">Adjusted Date</Data></Cell><Cell ss:StyleID="ce66"><Data ss:Type="String">Adjusted Number</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce13"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String"/></Cell><Cell ss:StyleID="ce13"><Data ss:Type="String">Adjusted Number</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="String">Third Heading</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">1</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">1.11</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">1.11</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">2</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">4.44</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">2.22</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">3</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">9.99</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">3.33</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">4</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">17.76</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">4.44</Data></Cell></Row><Row ss:Index="8"><Cell ss:StyleID="ce13"><Data ss:Type="String">5</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">27.75</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">5.55</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">6</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">39.96</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">6.66</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">7</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">54.39</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">7.77</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">8</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">71.04</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">8.88</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">9</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">89.91</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">9.99</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">10</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">111</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">11.1</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">11</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">134.31</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">12.21</Data></Cell></Row><Row><Cell ss:StyleID="ce13"><Data ss:Type="String">12</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">159.84</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">13.32</Data></Cell></Row><Row ss:Index="16"><Cell ss:StyleID="ce13"><Data ss:Type="String">13</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">1.11</Data></Cell><Cell ss:StyleID="ce13"><Data ss:Type="Number">-1.11</Data></Cell></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">ABC</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">1</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">1.11</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2001-01-01T00:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T01:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D3]-[.B3]"><Data ss:Type="DateTime">2000-12-31T00:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B3]*[.C3]"><Data ss:Type="Number">1.11</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">A</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B3]&amp;[.J3]"><Data ss:Type="String">1A</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">BCD</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">2</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">2.22</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2002-02-02T00:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T02:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D4]-[.B4]"><Data ss:Type="DateTime">2002-01-31T00:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B4]*[.C4]"><Data ss:Type="Number">4.44</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">B</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B4]&amp;[.J4]"><Data ss:Type="String">2B</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">CDE</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">3</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">3.33</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2003-03-03T00:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T03:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D5]-[.B5]"><Data ss:Type="DateTime">2003-02-28T00:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B5]*[.C5]"><Data ss:Type="Number">9.99</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">C</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B5]&amp;[.J5]"><Data ss:Type="String">3C</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">DEF</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">4</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">4.44</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2004-04-03T23:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T04:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D6]-[.B6]"><Data ss:Type="DateTime">2004-03-30T23:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B6]*[.C6]"><Data ss:Type="Number">17.76</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">D</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B6]&amp;[.J6]"><Data ss:Type="String">4D</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">EFG</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">5</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">5.55</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2005-05-04T23:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T05:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D7]-[.B7]"><Data ss:Type="DateTime">2005-04-29T23:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B7]*[.C7]"><Data ss:Type="Number">27.75</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">E</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B7]&amp;[.J7]"><Data ss:Type="String">5E</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">FGH</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">6</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">6.66</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2006-06-05T23:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T06:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D8]-[.B8]"><Data ss:Type="DateTime">2006-05-30T23:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B8]*[.C8]"><Data ss:Type="Number">39.96</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">F</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B8]&amp;[.J8]"><Data ss:Type="String">6F</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">GHI</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">7</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">7.77</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2007-07-06T23:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T07:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D9]-[.B9]"><Data ss:Type="DateTime">2007-06-29T23:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B9]*[.C9]"><Data ss:Type="Number">54.39</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">G</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B9]&amp;[.J9]"><Data ss:Type="String">7G</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:Index="24" ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">HIJ</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">8</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">8.88</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2008-08-07T23:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T08:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D10]-[.B10]"><Data ss:Type="DateTime">2008-07-30T23:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B10]*[.C10]"><Data ss:Type="Number">71.04</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">H</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B10]&amp;[.J10]"><Data ss:Type="String">8H</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">IJK</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">9</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">9.99</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2009-09-08T23:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T09:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D11]-[.B11]"><Data ss:Type="DateTime">2009-08-30T23:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B11]*[.C11]"><Data ss:Type="Number">89.91</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">I</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B11]&amp;[.J11]"><Data ss:Type="String">9I</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">JKL</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">10</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">11.1</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2010-10-09T23:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T10:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D12]-[.B12]"><Data ss:Type="DateTime">2010-09-29T23:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B12]*[.C12]"><Data ss:Type="Number">111</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">J</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B12]&amp;[.J12]"><Data ss:Type="String">10J</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">KLM</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">11</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">12.21</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2011-11-11T00:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T11:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D13]-[.B13]"><Data ss:Type="DateTime">2011-10-31T00:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B13]*[.C13]"><Data ss:Type="Number">134.31</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">K</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B13]&amp;[.J13]"><Data ss:Type="String">11K</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">LMN</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">12</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">13.32</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">2012-12-12T00:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T288:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D14]-[.B14]"><Data ss:Type="DateTime">2012-11-30T00:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B14]*[.C14]"><Data ss:Type="Number">159.84</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">L</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B14]&amp;[.J14]"><Data ss:Type="String">12L</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:StyleID="ce5"><Data ss:Type="String">ZYX</Data></Cell><Cell ss:StyleID="ce5"><Data ss:Type="Number">-1</Data></Cell><Cell ss:StyleID="ce67"><Data ss:Type="Number">-1.11</Data></Cell><Cell ss:StyleID="ce68"><Data ss:Type="DateTime">1999-12-01T00:00:00.000</Data></Cell><Cell ss:StyleID="ce69"><Data ss:Type="DateTime">1899-12-31T23:00:00.000</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce68" ss:Formula="of:=[.D15]-[.B15]"><Data ss:Type="DateTime">1999-12-02T00:00:00.000</Data></Cell><Cell ss:StyleID="ce67" ss:Formula="of:=[.B15]*[.C15]"><Data ss:Type="Number">1.11</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"><Data ss:Type="String">M</Data></Cell><Cell ss:StyleID="ce5" ss:Formula="of:=[.B15]&amp;[.J15]"><Data ss:Type="String">-1M</Data></Cell><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/><Cell ss:StyleID="ce5"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:AutoFitHeight="0" ss:Height="14.9953"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row><Row ss:Index="65550" ss:Height="12.8409"><Cell ss:Index="1024" ss:StyleID="ce13"/></Row></Table><x:WorksheetOptions/></ss:Worksheet></Workbook> \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/Examples/GnumericReader.php b/vendor/phpoffice/phpexcel/Examples/GnumericReader.php deleted file mode 100644 index 387c897..0000000 --- a/vendor/phpoffice/phpexcel/Examples/GnumericReader.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - -echo date('H:i:s') , " Load from Gnumeric file" , PHP_EOL; -$callStartTime = microtime(true); - -$objReader = PHPExcel_IOFactory::createReader('Gnumeric'); -$objPHPExcel = $objReader->load("GnumericTest.gnumeric"); - - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , PHP_EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - - -echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , PHP_EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/GnumericTest.gnumeric b/vendor/phpoffice/phpexcel/Examples/GnumericTest.gnumeric deleted file mode 100644 index ea2fac3..0000000 Binary files a/vendor/phpoffice/phpexcel/Examples/GnumericTest.gnumeric and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Examples/OOCalcReader.php b/vendor/phpoffice/phpexcel/Examples/OOCalcReader.php deleted file mode 100644 index 18771e8..0000000 --- a/vendor/phpoffice/phpexcel/Examples/OOCalcReader.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - -echo date('H:i:s') , " Load from OOCalc file" , PHP_EOL; -$callStartTime = microtime(true); - -$objReader = PHPExcel_IOFactory::createReader('OOCalc'); -$objPHPExcel = $objReader->load("OOCalcTest.ods"); - - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , PHP_EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - - -echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , PHP_EOL; - diff --git a/vendor/phpoffice/phpexcel/Examples/OOCalcReaderPCLZip.php b/vendor/phpoffice/phpexcel/Examples/OOCalcReaderPCLZip.php deleted file mode 100644 index 2fc771c..0000000 --- a/vendor/phpoffice/phpexcel/Examples/OOCalcReaderPCLZip.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - -// Use PCLZip rather than ZipArchive to read the Excel2007 OfficeOpenXML file -PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP); - -echo date('H:i:s') , " Load from OOCalc file" , PHP_EOL; -$callStartTime = microtime(true); - -$objReader = PHPExcel_IOFactory::createReader('OOCalc'); -$objPHPExcel = $objReader->load("OOCalcTest.ods"); - - -$callEndTime = microtime(true); -$callTime = $callEndTime - $callStartTime; -echo 'Call time to read Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , PHP_EOL; -// Echo memory usage -echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - - -echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , PHP_EOL; - diff --git a/vendor/phpoffice/phpexcel/Examples/OOCalcTest.ods b/vendor/phpoffice/phpexcel/Examples/OOCalcTest.ods deleted file mode 100644 index b29db76..0000000 Binary files a/vendor/phpoffice/phpexcel/Examples/OOCalcTest.ods and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Examples/Quadratic.php b/vendor/phpoffice/phpexcel/Examples/Quadratic.php deleted file mode 100644 index 8440c55..0000000 --- a/vendor/phpoffice/phpexcel/Examples/Quadratic.php +++ /dev/null @@ -1,68 +0,0 @@ -<html> -<head> -<title>Quadratic Equation Solver</title> -</head> -<body> -<?php - -/** Error reporting **/ -error_reporting(E_ALL); - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/'); - -?> -<h1>Quadratic Equation Solver</h1> -<form action="Quadratic.php" method="POST"> -Enter the coefficients for the Ax<sup>2</sup> + Bx + C = 0 -<table border="0" cellpadding="0" cellspacing="0"> - <tr><td><b>A&nbsp;</b></td> - <td><input name="A" type="text" size="8" value="<?php echo (isset($_POST['A'])) ? htmlentities($_POST['A']) : ''; ?>"></td> - </tr> - <tr><td><b>B&nbsp;</b></td> - <td><input name="B" type="text" size="8" value="<?php echo (isset($_POST['B'])) ? htmlentities($_POST['B']) : ''; ?>"></td> - </tr> - <tr><td><b>C&nbsp;</b></td> - <td><input name="C" type="text" size="8" value="<?php echo (isset($_POST['C'])) ? htmlentities($_POST['C']) : ''; ?>"></td> - </tr> -</table> -<input name="submit" type="submit" value="calculate"><br /> -If A=0, the equation is not quadratic. -</form> - -<?php -/** If the user has submitted the form, then we need to execute a calculation **/ -if (isset($_POST['submit'])) { - if ($_POST['A'] == 0) { - echo 'The equation is not quadratic'; - } else { - /** So we include PHPExcel to perform the calculations **/ - include 'PHPExcel/IOFactory.php'; - - /** Load the quadratic equation solver worksheet into memory **/ - $objPHPExcel = PHPExcel_IOFactory::load('./Quadratic.xlsx'); - - /** Set our A, B and C values **/ - $objPHPExcel->getActiveSheet()->setCellValue('A1', $_POST['A']); - $objPHPExcel->getActiveSheet()->setCellValue('B1', $_POST['B']); - $objPHPExcel->getActiveSheet()->setCellValue('C1', $_POST['C']); - - - /** Calculate and Display the results **/ - echo '<hr /><b>Roots:</b><br />'; - - $callStartTime = microtime(true); - echo $objPHPExcel->getActiveSheet()->getCell('B5')->getCalculatedValue().'<br />'; - echo $objPHPExcel->getActiveSheet()->getCell('B6')->getCalculatedValue().'<br />'; - $callEndTime = microtime(true); - $callTime = $callEndTime - $callStartTime; - - echo '<hr />Call time for Quadratic Equation Solution was '.sprintf('%.4f',$callTime).' seconds<br /><hr />'; - echo ' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB<br />'; - } -} - -?> - -</body> -<html> diff --git a/vendor/phpoffice/phpexcel/Examples/Quadratic2.php b/vendor/phpoffice/phpexcel/Examples/Quadratic2.php deleted file mode 100644 index 05cd5c1..0000000 --- a/vendor/phpoffice/phpexcel/Examples/Quadratic2.php +++ /dev/null @@ -1,65 +0,0 @@ -<html> -<head> -<title>Quadratic Equation Solver</title> -</head> -<body> -<?php - -/** Error reporting **/ -error_reporting(E_ALL); - -/** Include path **/ -set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../Classes/'); - -?> -<h1>Quadratic Equation Solver</h1> -<form action="Quadratic2.php" method="POST"> -Enter the coefficients for the Ax<sup>2</sup> + Bx + C = 0 -<table border="0" cellpadding="0" cellspacing="0"> - <tr><td><b>A&nbsp;</b></td> - <td><input name="A" type="text" size="8" value="<?php echo (isset($_POST['A'])) ? htmlentities($_POST['A']) : ''; ?>"></td> - </tr> - <tr><td><b>B&nbsp;</b></td> - <td><input name="B" type="text" size="8" value="<?php echo (isset($_POST['B'])) ? htmlentities($_POST['B']) : ''; ?>"></td> - </tr> - <tr><td><b>C&nbsp;</b></td> - <td><input name="C" type="text" size="8" value="<?php echo (isset($_POST['C'])) ? htmlentities($_POST['C']) : ''; ?>"></td> - </tr> -</table> -<input name="submit" type="submit" value="calculate"><br /> -If A=0, the equation is not quadratic. -</form> - -<?php -/** If the user has submitted the form, then we need to execute a calculation **/ -if (isset($_POST['submit'])) { - if ($_POST['A'] == 0) { - echo 'The equation is not quadratic'; - } else { - /** So we include PHPExcel to perform the calculations **/ - include 'PHPExcel/Calculation.php'; - - /** Calculate and Display the results **/ - echo '<hr /><b>Roots:</b><br />'; - - $callStartTime = microtime(true); - $discriminantFormula = '=POWER('.$_POST['B'].',2) - (4 * '.$_POST['A'].' * '.$_POST['C'].')'; - $discriminant = PHPExcel_Calculation::getInstance()->calculateFormula($discriminantFormula); - - $r1Formula = '=IMDIV(IMSUM(-'.$_POST['B'].',IMSQRT('.$discriminant.')),2 * '.$_POST['A'].')'; - $r2Formula = '=IF('.$discriminant.'=0,"Only one root",IMDIV(IMSUB(-'.$_POST['B'].',IMSQRT('.$discriminant.')),2 * '.$_POST['A'].'))'; - - echo PHPExcel_Calculation::getInstance()->calculateFormula($r1Formula).'<br />'; - echo PHPExcel_Calculation::getInstance()->calculateFormula($r2Formula).'<br />'; - $callEndTime = microtime(true); - $callTime = $callEndTime - $callStartTime; - - echo '<hr />Call time for Quadratic Equation Solution was '.sprintf('%.4f',$callTime).' seconds<br /><hr />'; - echo ' Peak memory usage: '.(memory_get_peak_usage(true) / 1024 / 1024).' MB<br />'; - } -} - -?> - -</body> -<html> diff --git a/vendor/phpoffice/phpexcel/Examples/SylkReader.php b/vendor/phpoffice/phpexcel/Examples/SylkReader.php deleted file mode 100644 index 1e77499..0000000 --- a/vendor/phpoffice/phpexcel/Examples/SylkReader.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -echo date('H:i:s') , " Load from SYLK file" , PHP_EOL; -$objPHPExcel = PHPExcel_IOFactory::load("SylkTest.slk"); - -echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , PHP_EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/SylkTest.slk b/vendor/phpoffice/phpexcel/Examples/SylkTest.slk deleted file mode 100644 index 329abe2..0000000 --- a/vendor/phpoffice/phpexcel/Examples/SylkTest.slk +++ /dev/null @@ -1,152 +0,0 @@ -ID;PWXL;N;E -P;PGeneral -P;P0 -P;P0.00 -P;P#,##0 -P;P#,##0.00 -P;P#,##0;;\-#,##0 -P;P#,##0;;[Red]\-#,##0 -P;P#,##0.00;;\-#,##0.00 -P;P#,##0.00;;[Red]\-#,##0.00 -P;P"$"#,##0;;\-"$"#,##0 -P;P"$"#,##0;;[Red]\-"$"#,##0 -P;P"$"#,##0.00;;\-"$"#,##0.00 -P;P"$"#,##0.00;;[Red]\-"$"#,##0.00 -P;P0% -P;P0.00% -P;P0.00E+00 -P;P##0.0E+0 -P;P#\ ?/? -P;P#\ ??/?? -P;Pdd/mm/yyyy -P;Pdd\-mmm\-yy -P;Pdd\-mmm -P;Pmmm\-yy -P;Ph:mm\ AM/PM -P;Ph:mm:ss\ AM/PM -P;Phh:mm -P;Phh:mm:ss -P;Pdd/mm/yyyy\ hh:mm -P;Pmm:ss -P;Pmm:ss.0 -P;P@ -P;P[h]:mm:ss -P;P_-"$"* #,##0_-;;\-"$"* #,##0_-;;_-"$"* "-"_-;;_-@_- -P;P_-* #,##0_-;;\-* #,##0_-;;_-* "-"_-;;_-@_- -P;P_-"$"* #,##0.00_-;;\-"$"* #,##0.00_-;;_-"$"* "-"??_-;;_-@_- -P;P_-* #,##0.00_-;;\-* #,##0.00_-;;_-* "-"??_-;;_-@_- -P;FArial;M200 -P;FArial;M200 -P;FArial;M200 -P;FArial;M200 -P;EArial;M200 -P;EArial;M200 -P;EArial;M200 -P;EArial;M200;SB -P;EArial;M200;SBI -P;EArial;M200;SI -P;EArial;M200;SU -P;EArial;M200;L11 -P;EArial;M200;SB -P;EArial;M200 -P;EArial;M200;SI -P;EArial;M200;SBI -P;EArial;M200;SBU -P;EArial;M200;SBIU -P;EArial;M200 -P;EArial;M200;SI -F;P0;DG0G8;M255 -B;Y18;X10;D0 0 17 9 -O;L;D;V0;K47;G100 0.001 -F;W1 1 17 -F;W4 6 6 -F;M270;R9 -F;M270;R12 -F;M270;R17 -F;M270;R18 -F;SM12;Y1;X1 -C;K"Test String 1" -F;SM19;X2 -C;K1 -F;SM19;X3 -C;K5 -F;SIDM18;X5 -C;K"A" -F;SDM17;X6 -C;K"E" -C;X8;K6;ERC[-6]+RC[-5] -C;X10;K"AE";ERC[-5]&RC[-4] -F;SSM0;Y2;X1 -C;K"Test - String 2" -C;X2;K2 -F;SM19;X3 -C;K6 -C;X5;K"B" -C;X6;K"F" -C;X8;K8;ERC[-6]+RC[-5] -C;X10;K"BF";ERC[-5]&RC[-4] -C;Y3;X1;K"Test #3" -F;SM19;X2 -C;K3 -F;SM19;X3 -C;K7 -F;SDM13;X5 -C;K"C" -F;SIDM16;X6 -C;K"G" -C;X8;K10;ERC[-6]+RC[-5] -C;X10;K"CG";ERC[-5]&RC[-4] -F;SM11;Y4;X1 -C;K"Test with (;;) in string" -C;X2;K4 -F;SM19;X3 -C;K8 -F;SIM15;X5 -C;K"D" -C;X6;K"H" -C;X8;K12;ERC[-6]+RC[-5] -C;X10;K"DH";ERC[-5]&RC[-4] -C;Y5;X8;K10;ESUM(R[-4]C[-6]:R[-1]C[-6]) -C;X9;K26;ESUM(R[-4]C[-6]:R[-1]C[-6]) -C;X10;K36;ESUM(R[-4]C[-8]:R[-1]C[-7]) -C;Y6;X2;K1.23 -C;X3;KTRUE -F;P19;FG0G;X4 -C;Y7;X2;K2.34 -C;X3;KFALSE -C;Y8;X2;K3.45 -F;Y9;X1 -F;X2 -F;X3 -F;X4 -F;X5 -F;X6 -F;X7 -F;X8 -F;X9 -F;X10 -F;P19;FG0G;Y10;X1 -C;K22269 -F;STM0;X3 -C;K"TOP" -F;P17;FG0G;Y11;X1 -C;K1.5 -F;Y12 -F;X2 -F;SBM0;X3 -C;K"BOTTOM" -F;X4 -F;X5 -F;X6 -F;X7 -F;X8 -F;X9 -F;X10 -F;SLM0;Y14;X3 -C;K"LEFT" -F;SRM0;Y16 -C;K"RIGHT" -F;Y17 -F;SLRTBM0;Y18 -C;K"BOX" -E diff --git a/vendor/phpoffice/phpexcel/Examples/XMLReader.php b/vendor/phpoffice/phpexcel/Examples/XMLReader.php deleted file mode 100644 index b5dfea8..0000000 --- a/vendor/phpoffice/phpexcel/Examples/XMLReader.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); - -date_default_timezone_set('Europe/London'); - -/** PHPExcel_IOFactory */ -require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php'; - - -echo date('H:i:s') , " Load from XML file" , PHP_EOL; -$inputFileName = "XMLTest.xml"; - -/** Identify the type of $inputFileName **/ -$inputFileType = PHPExcel_IOFactory::identify($inputFileName); -echo 'Loading ' , $inputFileName , ' using ' , $inputFileType , " Reader" , PHP_EOL; - -/** Create a new Reader of the type that has been identified **/ -$objReader = PHPExcel_IOFactory::createReader($inputFileType); -/** Load $inputFileName to a PHPExcel Object **/ -$objPHPExcel = $objReader->load($inputFileName); - - -echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL; -$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); -$objWriter->save(str_replace('.php', '.xlsx', __FILE__)); -echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL; - - -// Echo memory peak usage -echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL; - -// Echo done -echo date('H:i:s') , " Done writing file" , PHP_EOL; diff --git a/vendor/phpoffice/phpexcel/Examples/XMLTest.xml b/vendor/phpoffice/phpexcel/Examples/XMLTest.xml deleted file mode 100644 index 4159a94..0000000 --- a/vendor/phpoffice/phpexcel/Examples/XMLTest.xml +++ /dev/null @@ -1,450 +0,0 @@ -<?xml version="1.0"?> -<?mso-application progid="Excel.Sheet"?> -<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" - xmlns:o="urn:schemas-microsoft-com:office:office" - xmlns:x="urn:schemas-microsoft-com:office:excel" - xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" - xmlns:html="http://www.w3.org/TR/REC-html40"> - <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> - <Title>Excel 2003 XML Test Workbook</Title> - <Subject>This is a test workbook saved as Excel 2003 XML</Subject> - <Author>Mark Baker</Author> - <Keywords>PHPExcel Excel 2003 XML Reader</Keywords> - <Description>This is a test for the PHPExcel Reader for workbooks saved using Excel 2003's XML Format</Description> - <LastAuthor>Mark Baker</LastAuthor> - <Created>2009-09-11T08:26:08Z</Created> - <LastSaved>2009-09-17T22:53:09Z</LastSaved> - <Category>Reader</Category> - <Company>PHPExcel</Company> - <Version>14.00</Version> - </DocumentProperties> - <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"> - <AllowPNG/> - </OfficeDocumentSettings> - <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> - <WindowHeight>13176</WindowHeight> - <WindowWidth>28452</WindowWidth> - <WindowTopX>240</WindowTopX> - <WindowTopY>516</WindowTopY> - <ProtectStructure>False</ProtectStructure> - <ProtectWindows>False</ProtectWindows> - </ExcelWorkbook> - <Styles> - <Style ss:ID="Default" ss:Name="Normal"> - <Alignment ss:Vertical="Bottom"/> - <Borders/> - <Font ss:FontName="Calibri" ss:Size="11" ss:Color="#000000"/> - <Interior/> - <NumberFormat/> - <Protection/> - </Style> - <Style ss:ID="m42221568"> - <Alignment ss:Horizontal="Center" ss:Vertical="Center"/> - <Borders> - <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="3" - ss:Color="#00B050"/> - <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="3" - ss:Color="#0070C0"/> - <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3" - ss:Color="#FFFF00"/> - <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="3" - ss:Color="#FF0000"/> - </Borders> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - </Style> - <Style ss:ID="s62"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#FF0000" ss:Bold="1"/> - </Style> - <Style ss:ID="s63"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - </Style> - <Style ss:ID="s64"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000" ss:Bold="1" - ss:Italic="1" ss:Underline="Single"/> - </Style> - <Style ss:ID="s65"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000" ss:Bold="1" - ss:Underline="Single"/> - </Style> - <Style ss:ID="s66"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000" ss:Bold="1"/> - <Interior/> - </Style> - <Style ss:ID="s67"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - <Interior/> - </Style> - <Style ss:ID="s68"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000" ss:Bold="1"/> - </Style> - <Style ss:ID="s69"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000" ss:Bold="1" - ss:Italic="1"/> - </Style> - <Style ss:ID="s70"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000" ss:Underline="Single"/> - </Style> - <Style ss:ID="s71"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000" ss:Italic="1"/> - </Style> - <Style ss:ID="s72"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - <NumberFormat ss:Format="Short Date"/> - </Style> - <Style ss:ID="s73"> - <Borders> - <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2" - ss:Color="#000000"/> - </Borders> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - </Style> - <Style ss:ID="s74"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - <NumberFormat ss:Format="#\ ?/?"/> - </Style> - <Style ss:ID="s75"> - <Borders> - <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="2" - ss:Color="#000000"/> - </Borders> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - </Style> - <Style ss:ID="s76"> - <Borders> - <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2" - ss:Color="#000000"/> - </Borders> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - </Style> - <Style ss:ID="s77"> - <Borders> - <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2" - ss:Color="#000000"/> - </Borders> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - </Style> - <Style ss:ID="s85"> - <Borders> - <Border ss:Position="DiagonalLeft" ss:LineStyle="Double" ss:Weight="3" - ss:Color="#FF0000"/> - <Border ss:Position="DiagonalRight" ss:LineStyle="Double" ss:Weight="3" - ss:Color="#FF0000"/> - </Borders> - </Style> - <Style ss:ID="s86"> - <Alignment ss:Horizontal="Center" ss:Vertical="Bottom" ss:WrapText="1"/> - <Font ss:FontName="Arial" ss:Size="12" ss:Color="#000000" ss:Bold="1" - ss:Underline="Single"/> - </Style> - <Style ss:ID="s87"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - <NumberFormat ss:Format="0.00;[Red]0.00"/> - </Style> - <Style ss:ID="s88"> - <Font ss:FontName="Arial" ss:Size="11" ss:Color="#000000"/> - <NumberFormat ss:Format="dd\-mmm\-yyyy"/> - </Style> - </Styles> - <Worksheet ss:Name="Sample Data"> - <Table ss:ExpandedColumnCount="10" ss:ExpandedRowCount="20" x:FullColumns="1" - x:FullRows="1" ss:DefaultRowHeight="15"> - <Column ss:AutoFitWidth="0" ss:Width="90.6"/> - <Column ss:Index="4" ss:AutoFitWidth="0" ss:Width="33.6"/> - <Row ss:AutoFitHeight="0"> - <Cell ss:StyleID="s62"><Data ss:Type="String">Test String 1</Data></Cell> - <Cell ss:StyleID="s63"><Data ss:Type="Number">1</Data></Cell> - <Cell ss:StyleID="s63"><Data ss:Type="Number">5</Data></Cell> - <Cell ss:Index="5" ss:StyleID="s64"><Data ss:Type="String">A</Data></Cell> - <Cell ss:StyleID="s65"><Data ss:Type="String">E</Data></Cell> - <Cell ss:Index="8" ss:Formula="=RC[-6]+RC[-5]"><Data ss:Type="Number">6</Data></Cell> - <Cell ss:Index="10" ss:Formula="=RC[-5]&amp;RC[-4]"><Data ss:Type="String">AE</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:StyleID="s66"><Data ss:Type="String">Test - String 2</Data></Cell> - <Cell><Data ss:Type="Number">2</Data></Cell> - <Cell ss:StyleID="s63"><Data ss:Type="Number">6</Data></Cell> - <Cell ss:Index="5"><Data ss:Type="String">B</Data></Cell> - <Cell><Data ss:Type="String">F</Data></Cell> - <Cell ss:Index="8" ss:Formula="=RC[-6]+RC[-5]"><Data ss:Type="Number">8</Data></Cell> - <Cell ss:Index="10" ss:Formula="=RC[-5]&amp;RC[-4]"><Data ss:Type="String">BF</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:StyleID="s67"><Data ss:Type="String">Test #3</Data></Cell> - <Cell ss:StyleID="s63"><Data ss:Type="Number">3</Data></Cell> - <Cell ss:StyleID="s63"><Data ss:Type="Number">7</Data></Cell> - <Cell ss:Index="5" ss:StyleID="s68"><Data ss:Type="String">C</Data></Cell> - <Cell ss:StyleID="s69"><Data ss:Type="String">G</Data></Cell> - <Cell ss:Index="8" ss:Formula="=RC[-6]+RC[-5]"><Data ss:Type="Number">10</Data></Cell> - <Cell ss:Index="10" ss:Formula="=RC[-5]&amp;RC[-4]"><Data ss:Type="String">CG</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:StyleID="s70"><Data ss:Type="String">Test with (&quot;) in string</Data></Cell> - <Cell><Data ss:Type="Number">4</Data></Cell> - <Cell ss:StyleID="s63"><Data ss:Type="Number">8</Data></Cell> - <Cell ss:Index="5" ss:StyleID="s71"><Data ss:Type="String">D</Data></Cell> - <Cell><Data ss:Type="String">H</Data></Cell> - <Cell ss:Index="8" ss:Formula="=RC[-6]+RC[-5]"><Data ss:Type="Number">12</Data></Cell> - <Cell ss:Index="10" ss:Formula="=RC[-5]&amp;RC[-4]"><Data ss:Type="String">DH</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:Index="8" ss:Formula="=SUM(R[-4]C[-6]:R[-1]C[-6])"><Data - ss:Type="Number">10</Data></Cell> - <Cell ss:Formula="=SUM(R[-4]C[-6]:R[-1]C[-6])"><Data ss:Type="Number">26</Data></Cell> - <Cell ss:Formula="=SUM(R[-4]C[-8]:R[-1]C[-7])"><Data ss:Type="Number">36</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:Index="2"><Data ss:Type="Number">1.23</Data></Cell> - <Cell><Data ss:Type="Boolean">1</Data></Cell> - <Cell ss:StyleID="s72"/> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:Index="2"><Data ss:Type="Number">2.34</Data></Cell> - <Cell><Data ss:Type="Boolean">0</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:Index="2"><Data ss:Type="Number">3.45</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0" ss:Height="13.5"/> - <Row ss:AutoFitHeight="0"> - <Cell ss:StyleID="s72"><Data ss:Type="DateTime">1960-12-19T00:00:00.000</Data></Cell> - <Cell ss:Index="3" ss:StyleID="s73"><Data ss:Type="String">TOP</Data></Cell> - <Cell ss:Index="7" ss:Formula="=#N/A"><Data ss:Type="Error">#N/A</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:StyleID="s74"><Data ss:Type="Number">1.5</Data></Cell> - <Cell ss:Index="7" ss:Formula="=12/0"><Data ss:Type="Error">#DIV/0!</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0" ss:Height="13.5"> - <Cell ss:Index="3" ss:StyleID="s75"><Data ss:Type="String">BOTTOM</Data></Cell> - </Row> - <Row ss:Index="14" ss:AutoFitHeight="0"> - <Cell ss:Index="3" ss:StyleID="s76"><Data ss:Type="String">LEFT</Data></Cell> - </Row> - <Row ss:Index="16" ss:AutoFitHeight="0"> - <Cell ss:Index="3" ss:StyleID="s77"><Data ss:Type="String">RIGHT</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0" ss:Height="13.5"/> - <Row ss:AutoFitHeight="0" ss:Height="13.5"> - <Cell ss:Index="2" ss:MergeAcross="1" ss:MergeDown="1" ss:StyleID="m42221568"><Data - ss:Type="String">BOX</Data></Cell> - <Cell ss:Index="5" ss:StyleID="s85"/> - <Cell ss:Index="7"><Data ss:Type="String">Test Column 1</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:Index="8"><Data ss:Type="String">Test Column 2</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell ss:Index="9"><Data ss:Type="String">Test Column 3</Data></Cell> - </Row> - </Table> - <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> - <PageSetup> - <Header x:Margin="0.3"/> - <Footer x:Margin="0.3"/> - <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/> - </PageSetup> - <Unsynced/> - <Print> - <ValidPrinterInfo/> - <HorizontalResolution>600</HorizontalResolution> - <VerticalResolution>600</VerticalResolution> - </Print> - <Selected/> - <Panes> - <Pane> - <Number>3</Number> - <ActiveRow>17</ActiveRow> - <ActiveCol>4</ActiveCol> - </Pane> - </Panes> - <ProtectObjects>False</ProtectObjects> - <ProtectScenarios>False</ProtectScenarios> - <AllowFormatCells/> - <AllowSizeCols/> - <AllowSizeRows/> - <AllowInsertCols/> - <AllowInsertRows/> - <AllowInsertHyperlinks/> - <AllowDeleteCols/> - <AllowDeleteRows/> - <AllowSort/> - <AllowFilter/> - <AllowUsePivotTables/> - </WorksheetOptions> - </Worksheet> - <Worksheet ss:Name="Report Data"> - <Table ss:ExpandedColumnCount="7" ss:ExpandedRowCount="14" x:FullColumns="1" - x:FullRows="1" ss:DefaultRowHeight="15"> - <Column ss:AutoFitWidth="0" ss:Width="66.600000000000009"/> - <Column ss:AutoFitWidth="0" ss:Width="68.399999999999991"/> - <Column ss:AutoFitWidth="0" ss:Width="62.400000000000006"/> - <Column ss:Width="69.599999999999994"/> - <Column ss:Index="6" ss:Width="69.599999999999994"/> - <Column ss:AutoFitWidth="0" ss:Width="64.8"/> - <Row ss:AutoFitHeight="0" ss:Height="31.5"> - <Cell ss:StyleID="s86"><Data ss:Type="String">Heading 1</Data></Cell> - <Cell ss:StyleID="s86"><Data ss:Type="String">Heading 2</Data></Cell> - <Cell ss:StyleID="s86"><Data ss:Type="String">Third Heading</Data></Cell> - <Cell ss:StyleID="s86"><Data ss:Type="String">Date Heading</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s86"><Data ss:Type="String">Adjusted Date</Data></Cell> - <Cell ss:StyleID="s86"><Data ss:Type="String">Adjusted Number</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">ABC</Data></Cell> - <Cell><Data ss:Type="Number">1</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">1.1100000000000001</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2001-01-01T00:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2000-12-31T00:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">1.1100000000000001</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">BCD</Data></Cell> - <Cell><Data ss:Type="Number">2</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">2.2200000000000002</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2002-02-02T00:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2002-01-31T00:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">4.4400000000000004</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">CDE</Data></Cell> - <Cell><Data ss:Type="Number">3</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">3.33</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2003-03-03T00:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2003-02-28T00:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">9.99</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">DEF</Data></Cell> - <Cell><Data ss:Type="Number">4</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">4.4400000000000004</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2004-04-03T23:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2004-03-30T23:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">17.760000000000002</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">EFG</Data></Cell> - <Cell><Data ss:Type="Number">5</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">5.55</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2005-05-04T23:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2005-04-29T23:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">27.75</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">FGH</Data></Cell> - <Cell><Data ss:Type="Number">6</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">6.66</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2006-06-05T23:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2006-05-30T23:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">39.96</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">GHI</Data></Cell> - <Cell><Data ss:Type="Number">7</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">7.77</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2007-07-06T23:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2007-06-29T23:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">54.39</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">HIJ</Data></Cell> - <Cell><Data ss:Type="Number">8</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">8.8800000000000008</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2008-08-07T23:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2008-07-30T23:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">71.040000000000006</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">IJK</Data></Cell> - <Cell><Data ss:Type="Number">9</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">9.99</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2009-09-08T23:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2009-08-30T23:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">89.91</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">JKL</Data></Cell> - <Cell><Data ss:Type="Number">10</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">11.1</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2010-10-09T23:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2010-09-29T23:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">111</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">KLM</Data></Cell> - <Cell><Data ss:Type="Number">11</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">12.21</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2011-11-11T00:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2011-10-31T00:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">134.31</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">LMN</Data></Cell> - <Cell><Data ss:Type="Number">12</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">13.32</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">2012-12-12T00:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">2012-11-30T00:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">159.84</Data></Cell> - </Row> - <Row ss:AutoFitHeight="0"> - <Cell><Data ss:Type="String">ZYX</Data></Cell> - <Cell><Data ss:Type="Number">-1</Data></Cell> - <Cell ss:StyleID="s87"><Data ss:Type="Number">-1.1100000000000001</Data></Cell> - <Cell ss:StyleID="s88"><Data ss:Type="DateTime">1999-12-01T00:00:00.000</Data></Cell> - <Cell ss:Index="6" ss:StyleID="s88" ss:Formula="=RC[-2]-RC[-4]"><Data - ss:Type="DateTime">1999-12-02T00:00:00.000</Data></Cell> - <Cell ss:StyleID="s87" ss:Formula="=RC[-5]*RC[-4]"><Data ss:Type="Number">1.1100000000000001</Data></Cell> - </Row> - </Table> - <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> - <PageSetup> - <Header x:Margin="0.3"/> - <Footer x:Margin="0.3"/> - <PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/> - </PageSetup> - <Unsynced/> - <Print> - <ValidPrinterInfo/> - <HorizontalResolution>600</HorizontalResolution> - <VerticalResolution>600</VerticalResolution> - </Print> - <ProtectObjects>False</ProtectObjects> - <ProtectScenarios>False</ProtectScenarios> - <AllowFormatCells/> - <AllowSizeCols/> - <AllowSizeRows/> - <AllowInsertCols/> - <AllowInsertRows/> - <AllowInsertHyperlinks/> - <AllowDeleteCols/> - <AllowDeleteRows/> - <AllowSort/> - <AllowFilter/> - <AllowUsePivotTables/> - </WorksheetOptions> - <ConditionalFormatting xmlns="urn:schemas-microsoft-com:office:excel"> - <Range>R2C3:R14C3</Range> - <Condition> - <Qualifier>Greater</Qualifier> - <Value1>0</Value1> - <Format Style='color:#006100;background:#C6EFCE'/> - </Condition> - <Condition> - <Qualifier>Less</Qualifier> - <Value1>0</Value1> - <Format Style='color:#9C0006;background:#FFC7CE'/> - </Condition> - </ConditionalFormatting> - </Worksheet> -</Workbook> diff --git a/vendor/phpoffice/phpexcel/Examples/data/continents/Africa.txt b/vendor/phpoffice/phpexcel/Examples/data/continents/Africa.txt deleted file mode 100644 index 407fa76..0000000 --- a/vendor/phpoffice/phpexcel/Examples/data/continents/Africa.txt +++ /dev/null @@ -1,54 +0,0 @@ -Algeria -Angola -Benin -Botswana -Burkina -Burundi -Cameroon -Cape Verde -Central African Republic -Chad -Comoros -Congo -Congo, Democratic Republic of -Djibouti -Egypt -Equatorial Guinea -Eritrea -Ethiopia -Gabon -Gambia -Ghana -Guinea -Guinea-Bissau -Ivory Coast -Kenya -Lesotho -Liberia -Libya -Madagascar -Malawi -Mali -Mauritania -Mauritius -Morocco -Mozambique -Namibia -Niger -Nigeria -Rwanda -Sao Tome and Principe -Senegal -Seychelles -Sierra Leone -Somalia -South Africa -South Sudan -Sudan -Swaziland -Tanzania -Togo -Tunisia -Uganda -Zambia -Zimbabwe diff --git a/vendor/phpoffice/phpexcel/Examples/data/continents/Asia.txt b/vendor/phpoffice/phpexcel/Examples/data/continents/Asia.txt deleted file mode 100644 index 9ce006c..0000000 --- a/vendor/phpoffice/phpexcel/Examples/data/continents/Asia.txt +++ /dev/null @@ -1,44 +0,0 @@ -Afghanistan -Bahrain -Bangladesh -Bhutan -Brunei -Burma (Myanmar) -Cambodia -China -East Timor -India -Indonesia -Iran -Iraq -Israel -Japan -Jordan -Kazakhstan -Korea, North -Korea, South -Kuwait -Kyrgyzstan -Laos -Lebanon -Malaysia -Maldives -Mongolia -Nepal -Oman -Pakistan -Philippines -Qatar -Russian Federation -Saudi Arabia -Singapore -Sri Lanka -Syria -Tajikistan -Thailand -Turkey -Turkmenistan -United Arab Emirates -Uzbekistan -Vietnam -Yemen diff --git a/vendor/phpoffice/phpexcel/Examples/data/continents/Europe.txt b/vendor/phpoffice/phpexcel/Examples/data/continents/Europe.txt deleted file mode 100644 index 70c1160..0000000 --- a/vendor/phpoffice/phpexcel/Examples/data/continents/Europe.txt +++ /dev/null @@ -1,47 +0,0 @@ -Albania -Andorra -Armenia -Austria -Azerbaijan -Belarus -Belgium -Bosnia and Herzegovina -Bulgaria -Croatia -Cyprus -Czech Republic -Denmark -Estonia -Finland -France -Georgia -Germany -Greece -Hungary -Iceland -Ireland -Italy -Latvia -Liechtenstein -Lithuania -Luxembourg -Macedonia -Malta -Moldova -Monaco -Montenegro -Netherlands -Norway -Poland -Portugal -Romania -San Marino -Serbia -Slovakia -Slovenia -Spain -Sweden -Switzerland -Ukraine -United Kingdom -Vatican City diff --git a/vendor/phpoffice/phpexcel/Examples/data/continents/North America.txt b/vendor/phpoffice/phpexcel/Examples/data/continents/North America.txt deleted file mode 100644 index 5881ae1..0000000 --- a/vendor/phpoffice/phpexcel/Examples/data/continents/North America.txt +++ /dev/null @@ -1,23 +0,0 @@ -Antigua and Barbuda -Bahamas -Barbados -Belize -Canada -Costa Rica -Cuba -Dominica -Dominican Republic -El Salvador -Grenada -Guatemala -Haiti -Honduras -Jamaica -Mexico -Nicaragua -Panama -Saint Kitts and Nevis -Saint Lucia -Saint Vincent and the Grenadines -Trinidad and Tobago -United States diff --git a/vendor/phpoffice/phpexcel/Examples/data/continents/Oceania.txt b/vendor/phpoffice/phpexcel/Examples/data/continents/Oceania.txt deleted file mode 100644 index cbdc896..0000000 --- a/vendor/phpoffice/phpexcel/Examples/data/continents/Oceania.txt +++ /dev/null @@ -1,14 +0,0 @@ -Australia -Fiji -Kiribati -Marshall Islands -Micronesia -Nauru -New Zealand -Palau -Papua New Guinea -Samoa -Solomon Islands -Tonga -Tuvalu -Vanuatu diff --git a/vendor/phpoffice/phpexcel/Examples/data/continents/South America.txt b/vendor/phpoffice/phpexcel/Examples/data/continents/South America.txt deleted file mode 100644 index 777ffbf..0000000 --- a/vendor/phpoffice/phpexcel/Examples/data/continents/South America.txt +++ /dev/null @@ -1,12 +0,0 @@ -Argentina -Bolivia -Brazil -Chile -Colombia -Ecuador -Guyana -Paraguay -Peru -Suriname -Uruguay -Venezuela diff --git a/vendor/phpoffice/phpexcel/Examples/images/paid.png b/vendor/phpoffice/phpexcel/Examples/images/paid.png deleted file mode 100644 index a4355bd..0000000 Binary files a/vendor/phpoffice/phpexcel/Examples/images/paid.png and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Examples/images/phpexcel_logo.gif b/vendor/phpoffice/phpexcel/Examples/images/phpexcel_logo.gif deleted file mode 100644 index 6e1b5ee..0000000 Binary files a/vendor/phpoffice/phpexcel/Examples/images/phpexcel_logo.gif and /dev/null differ diff --git a/vendor/phpoffice/phpexcel/Examples/runall.php b/vendor/phpoffice/phpexcel/Examples/runall.php deleted file mode 100644 index 153cb76..0000000 --- a/vendor/phpoffice/phpexcel/Examples/runall.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php -/** - * PHPExcel - * - * Copyright (c) 2006 - 2015 PHPExcel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * @category PHPExcel - * @package PHPExcel - * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel) - * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL - * @version ##VERSION##, ##DATE## - */ - -/** Error reporting */ -error_reporting(E_ALL); - -if (PHP_SAPI != 'cli') { - die ('This script executes all tests, and should only be run from the command line'); -} - -// List of tests -$aTests = array( - '01simple.php' - , '01simplePCLZip.php' - , '02types.php' - , '02types-xls.php' - , '03formulas.php' - , '04printing.php' - , '05featuredemo.php' - , '06largescale.php' - , '06largescale-with-cellcaching.php' - , '06largescale-with-cellcaching-sqlite.php' - , '06largescale-with-cellcaching-sqlite3.php' - , '06largescale-xls.php' - , '07reader.php' - , '07readerPCLZip.php' - , '08conditionalformatting.php' - , '08conditionalformatting2.php' - , '09pagebreaks.php' - , '10autofilter.php' - , '10autofilter-selection-1.php' - , '10autofilter-selection-2.php' - , '10autofilter-selection-display.php' - , '11documentsecurity.php' - , '11documentsecurity-xls.php' - , '12cellProtection.php' - , '13calculation.php' - , '13calculationCyclicFormulae.php' - , '14excel5.php' - , '15datavalidation.php' - , '15datavalidation-xls.php' - , '16csv.php' - , '17html.php' - , '18extendedcalculation.php' - , '19namedrange.php' - , '20readexcel5.php' - , '21pdf.php' - , '22heavilyformatted.php' - , '23sharedstyles.php' - , '24readfilter.php' - , '25inmemoryimage.php' - , '26utf8.php' - , '27imagesexcel5.php' - , '28iterator.php' - , '29advancedvaluebinder.php' - , '30template.php' - , '31docproperties_write.php' - , '31docproperties_write-xls.php' - , '32chartreadwrite.php' - , '33chartcreate-area.php' - , '33chartcreate-bar.php' - , '33chartcreate-bar-stacked.php' - , '33chartcreate-column.php' - , '33chartcreate-column-2.php' - , '33chartcreate-line.php' - , '33chartcreate-pie.php' - , '33chartcreate-radar.php' - , '33chartcreate-stock.php' - , '33chartcreate-multiple-charts.php' - , '33chartcreate-composite.php' - , '34chartupdate.php' - , '35chartrender.php' - , '36chartreadwriteHTML.php' - , '36chartreadwritePDF.php' - , '37page_layout_view.php' - , '38cloneWorksheet.php' - , '39dropdown.php' - , '40duplicateStyle.php' - , '41password.php' - , '42richText.php' - , '43mergeWorkbooks.php' - , '44worksheetInfo.php' - , 'OOCalcReader.php' - , 'OOCalcReaderPCLZip.php' - , 'SylkReader.php' - , 'Excel2003XMLReader.php' - , 'XMLReader.php' - , 'GnumericReader.php' -); - -// First, clear all previous run results -foreach ($aTests as $sTest) { - @unlink( str_replace('.php', '.xls', $sTest) ); - @unlink( str_replace('.php', '.xlsx', $sTest) ); - @unlink( str_replace('.php', '.csv', $sTest) ); - @unlink( str_replace('.php', '.htm', $sTest) ); - @unlink( str_replace('.php', '.pdf', $sTest) ); -} - -// Run all tests -foreach ($aTests as $sTest) { - echo '============== TEST ==============' . "\r\n"; - echo 'Test name: ' . $sTest . "\r\n"; - echo "\r\n"; - echo shell_exec('php ' . $sTest); - echo "\r\n"; - echo "\r\n"; -} \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/changelog.txt b/vendor/phpoffice/phpexcel/changelog.txt deleted file mode 100644 index d929232..0000000 --- a/vendor/phpoffice/phpexcel/changelog.txt +++ /dev/null @@ -1,1445 +0,0 @@ -************************************************************************************** -* PHPExcel -* -* Copyright (c) 2006 - 2014 PHPExcel -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; either -* version 2.1 of the License, or (at your option) any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) -* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -* @version ##VERSION##, ##DATE## -************************************************************************************** - - -2018-11-22 (v1.8.2): -- Security (MBaker) - Fix and improve XXE security scanning for XML-based Readers -- Bugfix: (MBaker) - Fix to getCell() method when cell reference includes a worksheet reference -- Bugfix: (ncrypthic) Work Item GH-570 - Ignore inlineStr type if formula element exists -- Bugfix: (hernst42) Work Item GH-709 - Fixed missing renames of writeRelationShip (from _writeRelationShip) -- General: (umpirsky) Work Item GH-548 - Optimize vlookup() sort -- Bugfix: (MBaker) Work Item GH-554 - Whitespace after toRichTextObject() -- Feature: (MBaker) - Initial implementation of SUMIFS() function -- Feature: (MBaker) - Additional codepages -- Feature: (Tomino2112) Work Item GH-808 - MemoryDrawing not working in HTML writer -- General: (rentalhost) Work Item GH-575 - Excel 2007 Reader freezes because of conditional formatting -- Bugfix: (vitalyrepin) Pull Request 869 - c:max and c:min elements shall NOT be inside c:orientation elements -- General: (sim642) Pull Request 489 - Implement actual timezone adjustment into PHPExcel_Shared_Date::PHPToExcel - - -2015-04-30 (v1.8.1): -- Bugfix: (goncons) Work Item GH-397 - Fix for Writing an Open Document cell with non-numeric formula -- Bugfix: (sarciszewski) Work Item GH-329 - Avoid potential divide by zero in basedrawing -- Bugfix: (ymaerschalck) Work Item GH-405 - XML External Entity (XXE) Processing, different behaviour between simplexml_load_string() and simplexml_load_file(). -- Bugfix: (MBaker) - Fix to ensure that current cell is maintained when executing formula calculations -- Bugfix: (MBaker) Work Item GH-350 - Keep/set the value on Reader _loadSheetsOnly as NULL, courtesy of Restless-ET -- Bugfix: (MBaker) Work Item CP18105 - Loading an Excel 2007 spreadsheet throws an "Autofilter must be set on a range of cells" exception -- Bugfix: (MBaker) Work Item GH-388 - Fix to autoloader registration for backward compatibility with PHP 5.2.0 not accepting the prepend flag -- Bugfix: (MBaker) Work Item GH-384 - DOM loadHTMLFile() failing with options flags when using PHP < 5.4.0 -- Bugfix: (MBaker) - Fix for percentage operator in formulae for BIFF Writer -- Bugfix: (MBaker) - Fix to getStyle() call for cell object -- Bugfix: (MBaker) - Discard Autofilters in Excel2007 Reader when filter range isn't a valid range -- Bugfix: (frozenstupidity) Work Item GH-423 - Fix invalid NA return in VLOOKUP -- Bugfix: (wiseloren) Work Item CP21454 - "No Impact" conditional formatting fix for NumberFormat -- Bugfix: (bobwitlox) Work Item GH-467 - Bug in Excel2003XML reader, parsing merged cells -- Bugfix: (MBaker) Work Item GH-302 - Fix for CEIL() and FLOOR() when number argument is zero -- Bugfix: (MBaker) - Remove cells cleanly when calling RemoveRow() or RemoveColumn() -- General: (MBaker) - Small performance improvement for autosize columns -- General: (frost-nzcr4) Work Item GH-379 - Change the getter/setter for zeroHeight to camel case -- General: (MBaker) Work Item GH-394 - DefaultValueBinder is too much aggressive when converting string to numeric -- General: (MBaker) - Default precalculate formulas to false for writers -- General: (MBaker) - Set default Cyclic Reference behaviour to 1 to eliminate exception when using a single cyclic iteration in formulae -- General: (MBaker) Work Item GH-396 - Some Excel writer libraries erroneously use Codepage 21010 for UTF-16LE -- Feature: (WiktrzGE) Work Item GH-404 - Methods to manage most of the existing options for Chart Axis, Major Grid-lines and Minor Grid-lines -- Feature: (frost-nzcr4) Work Item GH-403 - ODS read/write comments in the cell -- Feature: (CQD) Work Item GH-389 - Additional Mac CJK codepage definitions -- Feature: (bolovincev) Work Item GH-269 - Update Worksheet.php getStyleByColumnAndRow() to allow a range of cells rather than just a single cell -- Feature: (MBaker) - New methods added for testing cell status within merge groups -- Feature: (cifren/MBaker) Work Item GH-205 - Handling merge cells in HTML Reader -- Feature: (MBaker) - Helper to convert basic HTML markup to a Rich Text object -- Feature: (MBaker) - Improved Iterators - New Column Iterator - Support for row and column ranges - Improved handling for next/prev -- Security: (MBaker) - XML filescan in XML-based Readers to prevent XML Entity Expansion (XEE) - (see http://projects.webappsec.org/w/page/13247002/XML%20Entity%20Expansion for an explanation of XEE injection) attacks - Reference CVE-2015-3542 - Identification of problem courtesy of Dawid Golunski (Pentest Ltd.) - -2014-03-02 (v1.8.0): -- Bugfix: (MBaker) Work item CP19830 - Undefined variable: fileHandle in CSV Reader -- Bugfix: (MBaker) Work item CP19968 - Out of memory in style/supervisor.php -- Bugfix: (MBaker) - Style error with merged cells in PDF Writer -- Bugfix: (MBaker) - Problem with cloning worksheets -- Bugfix: (tavoarcila) Work Item GH-259 - Bug fix reading Open Office files -- Bugfix: (MBaker) Work item CP20397 - Serious bug in absolute cell reference used in shared formula - Would also have affected insert/delete column/row -- Bugfix: (RomanSyroeshko) Work Item GH-267 - CHOOSE() returns "#VALUE!" if the 1st entry is chosen -- Bugfix: (Gemorroj) Work Item GH-268 - When duplicating styles, styles shifted by one column to the right - Fix also applied to duplicating conditional styles -- Bugfix: (IndrekHaav) Work Item GH-212 - Fix for formulae that reference a sheet whose name begins with a digit: - these were erroneously identified as numeric values, causing the parser to throw an undefined variable error. -- Bugfix: (IndrekHaav) Work Item CP16208 - Fixed undefined variable error due to $styleArray being used before it's initialised -- Bugfix: (PowerKiKi) Work Item GH-273 - ISTEXT() return wrong result if referencing an empty but formatted cell -- Bugfix: (PowerKiKi) Work Item GH-270/GH-31 - Binary comparison of strings are case insensitive -- Bugfix: (MBaker) Work Item GH-275 - Insert New Row/Column Before is not correctly updating formula references -- Bugfix: (MBaker) Work Item GH-257 - Passing an array of cells to _generateRow() in the HTML/PDF Writer causes caching problems with last cell in the range -- Bugfix: (MBaker) Work Item GH-193 - Fix to empty worksheet garbage collection when using cell caching -- Bugfix: (Jazzo) Work Item GH-248 - Excel2007 does not correctly mark rows as hidden -- Bugfix: (Roy Shahbazian) Work Item GH-299 - Fixed typo in Chart/Layout set/getYMode() -- Bugfix: (EliuFlorez) Work item GH-279 - Fatal error: Call to a member function cellExists() line: 3327 in calculation.php if referenced worksheet doesn't exist -- Bugfix: (MBaker) Work Item GH-290 - AdvancedValueBinder "Division by zero"-error -- Bugfix: (MBaker) Work Item CP20604 - Adding Sheet to Workbook Bug -- Bugfix: (MBaker) Work item CP20703 - Calculation engine incorrectly evaluates empty cells as #VALUE -- Bugfix: (MBaker) Work item CP20760 - Formula references to cell on another sheet in ODS files -- Bugfix: (MBaker) Work item GH321,GH158,CP17824 - LibreOffice created XLSX files results in an empty file. -- Feature: (amerov) - Implementation of the Excel HLOOKUP() function -- Feature: (MBaker) - Added "Quote Prefix" to style settings (Excel2007 Reader and Writer only) -- Feature: (MBaker) - Added Horizontal FILL alignment for Excel5 and Excel2007 Readers/Writers, and Horizontal DISTRIBUTED alignment for Excel2007 Reader/Writer -- Feature: (trvrnrth) Work Item GH-261 - Add support for reading protected (RC4 encrypted) .xls files -- Feature: (LWol) Work Item GH-252 - Adding support for macros, Ribbon in Excel 2007 -- General: (cdhutch) Work item CP20055 - Remove array_shift in ReferenceHelper::insertNewBefore improves column or row delete speed -- General: (MBaker) - Improve stock chart handling and rendering, with help from Swashata Ghosh -- General: (MBaker) - Fix to calculation properties for Excel2007 so that the opening application will only recalculate on load if it's actually required -- General: (MBaker) - Modified Excel2007 Writer to default preCalculateFormulas to false - Note that autosize columns will still recalculate affected formulae internally -- General: (dresenhista) Work Item GH-242 - Functionality to getHighestRow() for a specified column, and getHighestColumn() for a specified row -- General: (adamriyadi) Work Item GH-247 - Modify PHPExcel_Reader_Excel2007 to use zipClass from PHPExcel_Settings::getZipClass() - This allows the use of PCLZip when reading for people that don't have access to ZipArchive -- General: (infojunkie) Work Item GH-276 - Convert properties to string in OOCalc reader -- Security: (maartenba) Work Item GH-322 - Disable libxml external entity loading by default. - This is to prevent XML External Entity Processing (XXE) injection attacks (see http://websec.io/2012/08/27/Preventing-XEE-in-PHP.html for an explanation of XXE injection). - Reference CVE-2014-2054 - - -2013-06-02 (v1.7.9): -- Feature: (MBaker) Include charts option for HTML Writer -- Feature: (MBaker) Added composer file -- Feature: (MBaker) Added getStyle() method to Cell object -- Bugfix: (Asker) Work item 18777 - Error in PHPEXCEL/Calculation.php script on line 2976 (stack pop check) -- Bugfix: (MBaker) Work item 18794 - CSV files without a file extension being identified as HTML -- Bugfix: (AndreKR) Work item GH-66 - Wrong check for maximum number of rows in Excel5 Writer -- Bugfix: (MBaker) Work item GH-67 - Cache directory for DiscISAM cache storage cannot be set -- Bugfix: (MBaker) Work item 17976 - Fix to Excel2007 Reader for hyperlinks with an anchor fragment (following a #), otherwise they were treated as sheet references -- Bugfix: (MBaker) Work item 18963 - getSheetNames() fails on numeric (floating point style) names with trailing zeroes -- Bugfix: (MBaker) Work item GH-130 - Single cell print area -- General: (kea) Work item GH-69 - Improved AdvancedValueBinder for currency -- General: (MBaker) Work items 17936 and 17840 - Fix for environments where there is no access to /tmp but to upload_tmp_dir - Provided an option to set the sys_get_temp_dir() call to use the upload_tmp_dir; though by default the standard temp directory will still be used -- General: (amironov ) Work item GH-84 - Search style by identity in PHPExcel_Worksheet::duplicateStyle() -- General: (karak) Work item GH-85 - Fill SheetView IO in Excel5 -- General: (cfhay) Work item 18958 - Memory and Speed improvements in PHPExcel_Reader_Excel5 -- General: (MBaker) Work item GH-78 - Modify listWorksheetNames() and listWorksheetInfo to use XMLReader with streamed XML rather than SimpleXML -- General: (dbonsch) Restructuring of PHPExcel Exceptions -- General: (MBaker) Work items 16926 and 15145 - Refactor Calculation Engine from singleton to a Multiton - Ensures that calculation cache is maintained independently for different workbooks -- General: (MBaker) Modify cell's getCalculatedValue() method to return the content of RichText objects rather than the RichText object itself -- Bugfix: (techhead) Work item GH-70 - Fixed formula/formatting bug when removing rows -- Bugfix: (alexgann) Work item GH-63 - Fix to cellExists for non-existent namedRanges -- Bugfix: (MBaker) Work item 18844 - cache_in_memory_gzip "eats" last worksheet line, cache_in_memory doesn't -- Feature: (Progi1984) Work item GH-22 - Sheet View in Excel5 Writer -- Bugfix: (amironov) Work item GH-82 - PHPExcel_Worksheet::getCellCollection() may not return last cached cell -- Bugfix: (teso) Work item 18551 - Rich Text containing UTF-8 characters creating unreadable content with Excel5 Writer -- Bugfix: (MBaker) Work item GH-104 - echo statements in HTML.php -- Feature: (Progi1984) Work item GH-8/CP11704 : Conditional formatting in Excel 5 Writer -- Bugfix: (MBaker) Work item GH-113 - canRead() Error for GoogleDocs ODS files: in ODS files from Google Docs there is no mimetype file -- Bugfix: (MBaker) Work item GH-80 - "Sheet index is out of bounds." Exception -- Bugfix: (ccorliss) Work item GH-105 - Fixed number format fatal error -- Bugfix: (MBaker) - Add DROP TABLE in destructor for SQLite and SQLite3 cache controllers -- Bugfix: (alexgann) Work item GH-154 - Fix merged-cell borders on HTML/PDF output -- Bugfix: (Shanto) Work item GH-161 - Fix: Hyperlinks break when removing rows -- Bugfix: (neclimdul) Work item GH-166 - Fix Extra Table Row From Images and Charts - - -2012-10-12 (v1.7.8): -- Special: (kkamkou) Phar builder script to add phar file as a distribution option -- Feature: (MBaker) Refactor PDF Writer to allow use with a choice of PDF Rendering library - rather than restricting to tcPDF - Current options are tcPDF, mPDF, DomPDF - tcPDF Library has now been removed from the deployment bundle -- Feature: (MBaker) Initial version of HTML Reader -- Feature: (Progi1984) & (blazzy) Work items 9605 - Implement support for AutoFilter in PHPExcel_Writer_Excel5 -- Feature: (MBaker) Modified ERF and ERFC Engineering functions to accept Excel 2010's modified acceptance of negative arguments -- Feature: (k1LoW) Support SheetView `view` attribute (Excel2007) -- Feature: (MBaker) Excel compatibility option added for writing CSV files - While Excel 2010 can read CSV files with a simple UTF-8 BOM, Excel2007 and earlier require UTF-16LE encoded tab-separated files. - The new setExcelCompatibility(TRUE) option for the CSV Writer will generate files with this formatting for easy import into Excel2007 and below. -- Feature: (MBaker) Language implementations for Turkish (tr) -- Feature: (MBaker) Added fraction tests to advanced value binder -- Feature: (MBaker) Allow call to font setUnderline() for underline format to specify a simple boolean for UNDERLINE_NONE or UNDERLINE_SINGLE -- General: (alexgann) Add Currency detection to the Advanced Value Binder -- General: (MBaker) Work item 18404 - setCellValueExplicitByColumnAndRow() do not return PHPExcel_Worksheet -- General: (MBaker) Work item 18324 - Reader factory doesn't read anymore XLTX and XLT files -- General: (MBaker) Magic __toString() method added to Cell object to return raw data value as a string -- General: (alexgann) Add cell indent to html rendering -- General: (Raghav1981) ZeroHeight for rows in sheet format -- Bugfix: (cyberconte) Patch 12318 - OOCalc cells containing <text:span> inside the <text:p> tag -- Bugfix: (schir1964) Fix to listWorksheetInfo() method for OOCalc Reader -- Bugfix: (MBaker) Support for "e" (epoch) date format mask - Rendered as a 4-digit CE year in non-Excel outputs -- Bugfix: (MBaker) Work items 15799 and 18278 - Background color cell is always black when editing cell -- Bugfix: (MBaker) Work items 15905 and 18183 - Allow "no impact" to formats on Conditional Formatting -- Bugfix: (wackonline) OOCalc Reader fix for NULL cells -- Bugfix: (seltzlab) Fix to excel2007 Chart Writer when a $plotSeriesValues is empty -- Bugfix: (MBaker) Various fixes to Chart handling -- Bugfix: (MBaker) Work item 18370 - Error loading xlsx file with column breaks -- Bugfix: (MBaker) OOCalc Reader now handles percentage and currency data types -- Bugfix: (MBaker) Work Item 18415 - mb_stripos empty delimiter -- Bugfix: (takaakik) Work Item 15455 - getNestingLevel() Error on Excel5 Read -- Bugfix: (MBaker) Fix to Excel5 Reader when cell annotations are defined before their referenced text objects -- Bugfix: (MBaker) OOCalc Reader modified to process number-rows-repeated -- Bugfix: (MBaker) Work item 18377 - Chart Title compatibility on Excel 2007 -- Bugfix: (MBaker) Work item 18146 - Chart Refresh returning cell reference rather than values -- Bugfix: (MBaker) Work item 18145 - Autoshape being identified in twoCellAnchor when includeCharts is TRUE triggering load error -- Bugfix: (MBaker) Work item 18325 - v-type texts for series labels now recognised and parsed correctly -- Bugfix: (wolf5x) Work item 18492 - load file failed if the file has no extensionType -- Bugfix: (dverspui) Pattern fill colours in Excel2007 Style Writer -- Bugfix: (MBaker) Excel2007 Writer order of font style elements to conform with Excel2003 using compatibility pack -- Bugfix: (MBaker) Work item 18425 - Problems with $_activeSheetIndex when decreased below 0. -- Bugfix: (MBaker) Work item 18597 - PHPExcel_CachedObjectStorage_SQLite3::cacheMethodIsAvailable() uses class_exists - autoloader throws error -- Bugfix: (MBaker) Work item 18598 - Cannot access private property PHPExcel_CachedObjectStorageFactory::$_cacheStorageMethod -- Bugfix: (MBaker) Work item 18397 - Data titles for charts - PHPExcel_Chart_Layout now has methods for getting/setting switches for displaying/hiding chart data labels -- Bugfix: (MBaker) Discard single cell merge ranges when reading (stupid that Excel allows them in the first place) -- Bugfix: (MBaker) Discard hidden autoFilter named ranges - - -2012-05-19 (v1.7.7): -- Bugfix: (Progi1984) Work item 8916 - Support for Rich-Text in PHPExcel_Writer_Excel5 -- Bugfix: (cyberconte) Work item 17471 - OOCalc cells contain same data bug? -- Feature: (schir1964) listWorksheetInfo() method added to Readers... courtesy of Christopher Mullins -- Feature: (MBaker) Options for cell caching using Igbinary and SQLite/SQlite3. -- Feature: (MBaker) Additional row iterator options: allow a start row to be defined in the constructor; seek(), and prev() methods added. -- Feature: (Progi1984) Work item 9759 - Implement document properties in Excel5 writer -- Feature: (MBaker) Work item 16 - Implement chart functionality (EXPERIMENTAL) - Initial definition of chart objects. - Reading Chart definitions through the Excel2007 Reader - Facility to render charts to images using the 3rd-party jpgraph library - Writing Charts using the Excel2007 Writer -- General: (MBaker) Fix to build to ensure that Examples are included with the documentation -- General: (MBaker) Reduce cell caching overhead using dirty flag to ensure that cells are only rewritten to the cache if they have actually been changed -- General: (MBaker) Improved memory usage in CSV Writer -- General: (MBaker) Improved speed and memory usage in Excel5 Writer -- General: (MBaker) Experimental - - Added getHighestDataColumn(), getHighestDataRow(), getHighestRowAndColumn() and calculateWorksheetDataDimension() methods for the worksheet that return the highest row and column that have cell records -- General: (MBaker) Change iterators to implement Iterator rather than extend CachingIterator, as a fix for PHP 5.4. changes in SPL -- Bugfix: (MBaker) Work item 15459 - Invalid cell coordinate in Autofilter for Excel2007 Writer -- Bugfix: (MBaker) Work item 15518 - PCLZip library issue -- Bugfix: (MBaker) Work item 15537 - Excel2007 Reader canRead function bug -- Bugfix: (MBaker) Support for Excel functions whose return can be used as either a value or as a cell reference depending on its context within a formula -- Bugfix: (gilles06) Work item 15707 - ini_set() call in Calculation class destructor -- Bugfix: (MBaker) Work item 15786 - RangeToArray strange array keys -- Bugfix: (MBaker) Work item 15762 - INDIRECT() function doesn't work with named ranges -- Bugfix: (MBaker) Locale-specific fix to text functions when passing a boolean argument instead of a string -- Bugfix: (MBaker) Work item 16246 - reader/CSV fails on this file - auto_detect_line_endings now set in CSV reader -- Bugfix: (MBaker) Work item 16212 - $arguments improperly used in CachedObjectStorage/PHPTemp.php -- Bugfix: (MBaker) Work item 16643 - Bug In Cache System (cell reference when throwing caching errors) -- Bugfix: (MBaker) Work item 16895 - PHP Invalid index notice on writing excel file when active sheet has been deleted -- Bugfix: (MBaker) Work item 16956 - External links in Excel2010 files cause Fatal error -- Bugfix: (MBaker) Work item 16960 - Previous calculation engine error conditions trigger cyclic reference errors -- Bugfix: (mkopinsky) Work item 16266 - PHPExcel_Style::applyFromArray() returns null rather than style object in advanced mode -- Bugfix: (fauvel) Work item 16958 - Cell::getFormattedValue returns RichText object instead of string -- Bugfix: (MBaker) Work item 17166 - Indexed colors do not refer to Excel's indexed colors? -- Bugfix: (MBaker) Work item 17199 - Indexed colors should be consistent with Excel and start from 1 (current index starts at 0) -- Bugfix: (MBaker) Work item 17262 - Named Range definition in .xls when sheet reeference is quote wrapped -- Bugfix: (MBaker) Work item 17403 - duplicateStyle() method doesn't duplicate conditional formats - Added an equivalent duplicateConditionalStyle() method for duplicating conditional styles -- Bugfix: (bnr) Work item 17501 - =sumproduct(A,B) <> =sumproduct(B,A) in xlsx -- Bugfix: (Progi1984) Work item 8916 - Support for Rich-Text in PHPExcel_Writer_Excel5 -- General: (MBaker) Work item 15405 - Two easy to fix Issues concerning PHPExcel_Token_Stack (l10n/UC) -- General: (MBaker) Work item 15461 - Locale file paths not fit for windows -- General: (MBaker) Work item 16643 - Add file directory as a cache option for cache_to_discISAM -- General: (MBaker) Work item 16923 - Datatype.php & constant TYPE_NULL -- General: (MBaker) Ensure use of system temp directory for all temporary work files, unless explicitly specified -- General: (char101) Work item 16359 - [Patch] faster stringFromColumnIndex() -- General: (whit1206) Work item 16028 - Fix for projects that still use old autoloaders -- General: (atz) Work item 17024 - Unknown codepage: 10007 - Additional Mac codepages - - -2011-02-27 (v1.7.6): -- Feature: (MBaker) Provide option to use PCLZip as an alternative to ZipArchive. - This allows the writing of Excel2007 files, even without ZipArchive enabled (it does require zlib), or when php_zip is one of the buggy PHP 5.2.6 or 5.2.8 versions - It can be enabled using PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP); - Note that it is not yet implemented as an alternative to ZipArchive for those Readers that are extracting from zips -- Feature: (MBaker) Work item 14979 - Added listWorksheetNames() method to Readers that support multiple worksheets in a workbook, allowing a user to extract a list of all the worksheet names from a file without parsing/loading the whole file. -- Feature: (MBaker) Speed boost and memory reduction in the Worksheet toArray() method. -- Feature: (MBaker) Added new rangeToArray() and namedRangeToArray() methods to the PHPExcel_Worksheet object. - Functionally, these are identical to the toArray() method, except that they take an additional first parameter of a Range (e.g. 'B2:C3') or a Named Range name. - Modified the toArray() method so that it actually uses rangeToArray(). -- Feature: (MBaker) Added support for cell comments in the OOCalc, Gnumeric and Excel2003XML Readers, and in the Excel5 Reader -- Feature: (MBaker) Improved toFormattedString() handling for Currency and Accounting formats to render currency symbols -- Feature: (MBaker) Work Item 2346 - Implement more Excel calculation functions - Implemented the DAVERAGE(), DCOUNT(), DCOUNTA(), DGET(), DMAX(), DMIN(), DPRODUCT(), DSTDEV(), DSTDEVP(), DSUM(), DVAR() and DVARP() Database functions -- Bugfix: (MBaker) Work item 14888 - Simple =IF() formula disappears -- Bugfix: (MBaker) Work item 14898 - PHP Warning: preg_match(): Compilation failed: PCRE does not support \\L, \\l, \\N, \\P, \\p, \\U, \\u, or \\X -- Bugfix: (MBaker) Work item 14901 - VLOOKUP choking on parameters in PHPExcel.1.7.5/PHPExcel_Writer_Excel2007 -- Bugfix: (MBaker) Work item 14973 - PHPExcel_Cell::isInRange() incorrect results - offset by one column -- Bugfix: (MBaker) Treat CodePage of 0 as CP1251 (for .xls files written by applications that don't set the CodePage correctly, such as Apple Numbers) -- Bugfix: (MB) Work item 11583 - Need method for removing autoFilter -- Bugfix: (MBaker) Work item 15029 - coordinateFromString throws exception for rows greater than 99,999 -- Bugfix: (MBaker) Work item 14999 - PHPExcel Excel2007 Reader colour problems with solidfill -- Bugfix: (MBaker) Work item 13215 - Formatting get lost and edit a template XLSX file -- Bugfix: (MBaker) Work item 14029 - Excel 2007 Reader /writer lost fontcolor -- Bugfix: (MBaker) Work item 13374 - file that makes cells go black -- Bugfix: (MBaker) Minor patchfix for Excel2003XML Reader when XML is defined with a charset attribute -- Bugfix: (MBaker) Work item 15089 - PHPExcel_Worksheet->toArray() index problem -- Bugfix: (MBaker) Work item 15094 - Merge cells 'un-merge' when using an existing spreadsheet -- Bugfix: (MBaker) Work item 15129 - Worksheet fromArray() only working with 2-D arrays -- Bugfix: (xkeshav) Work item 15172 - rangeToarray function modified for non-existent cells -- Bugfix: (MBaker) Work item 14980 - Images not getting copyied with the ->clone function -- Bugfix: (MBaker) Work item 11576 - AdvancedValueBinder.php: String sometimes becomes a date when it shouldn't -- Bugfix: (MBaker) Fix Excel5 Writer so that it only writes column dimensions for columns that are actually used rather than the full range (A to IV) -- Bugfix: (MBaker) Work item 15198 - FreezePane causing damaged or modified error - The freezePaneByColumnAndRow() method row argument should default to 1 rather than 0. - Default row argument for all __ByColumnAndRow() methods should be 1 -- Bugfix: (MBaker) Work item 15121 - Column reference rather than cell reference in Print Area definition - Fix Excel2007 Writer to handle print areas that are defined as row or column ranges rather than just as cell ranges -- Bugfix: (MBaker) Reduced false positives from isDateTimeFormatCode() method by suppressing testing within quoted strings -- Bugfix: (MBaker) Work item 15312 - Caching and tmp partition exhaustion -- Bugfix: (MBaker) Work item 15308 - Writing to Variable No Longer Works. $_tmp_dir Missing in PHPExcel\PHPExcel\Shared\OLE\PPS\Root.php -- Bugfix: (MBaker) Work item 15379 - Named ranges with dot don't get parsed properly -- Bugfix: (MBaker) Work item 15096 - insertNewRowBefore fails to consistently update references -- Bugfix: (MBaker) "i" is not a valid character for Excel date format masks (in isDateTimeFormatCode() method) -- Bugfix: (MKunert) Work item 15421 - PHPExcel_ReferenceHelper::insertNewBefore() is missing an 'Update worksheet: comments' section -- Bugfix: (MBaker) Work item 15409 - Full column/row references in named ranges not supported by updateCellReference() -- General: (MBaker) Improved performance (speed), for building the Shared Strings table in the Excel2007 Writer. -- General: (MBaker) Improved performance (speed), for PHP to Excel date conversions -- General: (MBaker) Enhanced SheetViews element structures in the Excel2007 Writer for frozen panes. -- General: (MBaker) Removed Serialized Reader/Writer as these no longer work. - - -2010-12-10 (v1.7.5): -- Feature: (MBaker) Work item 8769 - Implement Gnumeric File Format - Initial work on Gnumeric Reader (Worksheet Data, Document Properties and basic Formatting) -- Feature: (MBaker) (incorporating part of Workitem 9759) - Support for Extended Workbook Properties in Excel2007, Excel5 and OOCalc Readers; support for User-defined Workbook Properties in Excel2007 and OOCalc Readers -- Feature: (MBaker) Support for Extended and User-defined Workbook Properties in Excel2007 Writer -- Feature: (MBaker) Provided a setGenerateSheetNavigationBlock(false); option to suppress generation of the sheet navigation block when writing multiple worksheets to HTML -- Feature: (MBaker) Advanced Value Binder now recognises TRUE/FALSE strings (locale-specific) and converts to boolean -- Feature: (MBaker) Work item 14301 - PHPExcel_Worksheet->toArray() is returning truncated values -- Feature: (MBaker) Configure PDF Writer margins based on Excel Worksheet Margin Settings value -- Feature: (MBaker) Added Contiguous flag for the CSV Reader, when working with Read Filters -- Feature: (MBaker) Added getFormattedValue() method for cell object -- Feature: (MBaker) Added strictNullComparison argument to the worksheet fromArray() method -- Feature: (MBaker) Fix to toFormattedString() method in PHPExcel_Style_NumberFormat to handle fractions with a # code for the integer part -- Bugfix: (MB) Work item 14143 - NA() doesn't propagate in matrix calc - quick fix in JAMA/Matrix.php -- Bugfix: (Progi1984) Work item 7895 - Excel5 : Formula : String constant containing double quotation mark -- Bugfix: (Progi1984) Work item 7895 - Excel5 : Formula : Percent -- Bugfix: (Progi1984) Work item 7895 - Excel5 : Formula : Error constant -- Bugfix: (Progi1984) Work item 7895 - Excel5 : Formula : Concatenation operator -- Bugfix: (MBaker) Work item 14146 - Worksheet clone broken for CachedObjectStorage_Memory -- Bugfix: (MBaker) Work item 12998 - PHPExcel_Reader_Excel2007 fails when gradient fill without type is present in a file -- Bugfix: (MBaker) Work item 14176 - @ format for numeric strings in XLSX to CSV conversion -- Bugfix: (MBaker) Work item 14223 - Advanced Value Binder Not Working? -- Bugfix: (MBaker) Work item 14226 - unassigned object variable in PHPExcel->removeCellXfByIndex -- Bugfix: (MBaker) Work item 14236 - problem with getting cell values from another worksheet... (if cell doesn't exist) -- Bugfix: (MBaker) Work items 14260 & 14233 - Setting cell values to one char strings & Trouble reading one character string (thanks gorfou) -- Bugfix: (MBaker) Work item 14256 - Worksheet title exception when duplicate worksheet is being renamed but exceeds the 31 character limit -- Bugfix: (MBaker) Work item 14086 - Named range with sheet name that contains the $ throws exception when getting the cell -- Bugfix: (MBaker) Added autoloader to DefaultValueBinder and AdvancedValueBinder -- Bugfix: (MBaker) Modified PHPExcel_Shared_Date::isDateTimeFormatCode() to return false if format code begins with "_" or with "0 " to prevent false positives - These leading characters are most commonly associated with number, currency or accounting (or occasionally fraction) formats -- Bugfix: (MBaker) Work item 14374 - BUG : Excel5 and setReadFilter ? -- Bugfix: (MBaker) Work item 14425 - Wrong exception message while deleting column -- Bugfix: (MBaker) Work item 14679 - Formula evaluation fails with Japanese sheet refs -- Bugfix: (MBaker) Work item 13559 - PHPExcel_Writer_PDF does not handle cell borders correctly -- Bugfix: (MBaker) Work item 14831 - Style : applyFromArray() for 'allborders' not working -- Bugfix: (MBaker) Work item 14837 - Using $this when not in object context in Excel5 Reader -- General: (MBaker) Applied patch 6609 - Removes a unnecessary loop through each cell when applying conditional formatting to a range. -- General: (MBaker) Applied patch 7169 - Removed spurious PHP end tags (?>) -- General: (MBaker) Improved performance (speed) and reduced memory overheads, particularly for the Writers, but across the whole library. - - -2010-08-26 (v1.7.4): -- Bugfix: (Progi1984) Work item 7895 - Excel5 : Formula : Power -- Bugfix: (Progi1984) Work item 7895 - Excel5 : Formula : Unary plus -- Bugfix: (Progi1984) Excel5 : Just write the Escher stream if necessary in Worksheet -- Bugfix: (MBaker) Work item 13433 - Syntax errors in memcache.php 1.7.3c -- Bugfix: (MBaker) Work item 13450 - Standard Deviation functions returning DIV/0 Error when Standard Deviation is zero -- Feature: (MBaker) Support for print area with several ranges in the Excel2007 reader, and improved features for editing print area with several ranges -- Feature: (MBaker) Work item 13769 - Improved Cell Exception Reporting -- Feature: (MBaker) Support for row or column ranges in the calculation engine, e.g. =SUM(C:C) or =SUM(1:2) - Also support in the calculation engine for absolute row or column ranges e.g. =SUM($C:$E) or =SUM($3:5) -- Bugfix: (ET) Work item 13455 - Picture problem with Excel 2003 -- Bugfix: (MBaker) Work item 13484 - Wrong variable used in addExternalSheet in PHPExcel.php -- Bugfix: (MBaker) Work item 13515 - "Invalid cell coordinate" error when formula access data from an other sheet -- Bugfix: (MBaker) (related to Work item 13515) Calculation engine confusing cell range worksheet when referencing cells in a different worksheet to the formula -- Bugfix: (MBaker) Work item 13752 - Wrong var naming in Worksheet->garbageCollect() -- Bugfix: (MBaker) Work item 13764 - PHPExcel_Style_*::__clone() methods cause cloning loops? -- Bugfix: (MBaker) Work item 11488 - Recent builds causing problems loading xlsx files? (ZipArchive issue?) -- Bugfix: (MBaker) Work item 13856 - cache_to_apc causes fatal error when processing large data sets -- Bugfix: (MBaker) Work item 13880 - OOCalc reader misses first line if it's a 'table-header-row' -- Bugfix: (MBaker) Work item 14011 - using cache with copy or clone bug? - Fixed $worksheet->copy() or clone $worksheet when using cache_in_memory, cache_in_memory_gzip, cache_in_memory_serialized, cache_to_discISAM, cache_to_phpTemp, cache_to_apc and cache_to_memcache; - Fixed but untested when using cache_to_wincache. -- Bugfix: (MBaker) Fixed problems with reading Excel2007 Properties -- General: (MB) Applied patch 6324 - PHP Strict Standards: Non-static method PHPExcel_Shared_String::utf16_decode() should not be called statically -- General: (MBaker) Applied patch 6360 - Array functions were ignored when loading an existing file containing them, and as a result, they would lose their 'cse' status. -- General: (MBaker) Minor memory tweaks to Excel2007 Writer -- General: (MBaker) Modified ReferenceHelper updateFormulaReferences() method to handle updates to row and column cell ranges (including absolute references e.g. =SUM(A:$E) or =SUM($5:5), and range/cell references that reference a worksheet by name), and to provide both performance and memory improvements. -- General: (MBaker) Modified Excel2007 Reader so that ReferenceHelper class is instantiated only once rather than for every shared formula in a workbook. -- General: (MBaker) Correct handling for additional (synonym) formula tokens in Excel5 Reader -- General: (MBaker) Additional reading of some Excel2007 Extended Properties (Company, Manager) - - -2010-06-01 (v1.7.3c): -- Bugfix: (MB) Work item 13012 - Fatal error: Class 'ZipArchive' not found... ...Reader/Excel2007.php on line 217 -- Bugfix: (MBaker) Work item 13398 - PHPExcel_Writer_Excel2007 error after 1.7.3b - - -2010-05-31 (v1.7.3b): -- Bugfix: (MBaker) Work item 12903 - Infinite loop when reading -- Bugfix: (MB) Work item 13381 - Wrong method chaining on PHPExcel_Worksheet class - - -2010-05-17 (v1.7.3): -- General: (ET) Applied patch 4990 (modified) -- General: (MB) Applied patch 5568 (modified) -- General: (MB) Applied patch 5943 -- General: (MB) Work item 13042 - Upgrade build script to use Phing -- General: (ET) Work item 11586 - Replacing var with public/private -- General: (MBaker) Applied Anthony's Sterling's Class Autoloader to reduce memory overhead by "Lazy Loading" of classes -- General: (MBaker) Modification to functions that accept a date parameter to support string values containing ordinals as per Excel (English language only) -- General: (MBaker) Modify PHPExcel_Style_NumberFormat::toFormattedString() to handle dates that fall outside of PHP's 32-bit date range -- General: (MBaker) Applied patch 5207 -- General: (ET) Work item 11970 - PHPExcel developer documentation: Set page margins -- Feature: (ET) Work item 11038 - Special characters and accents in SYLK reader -- Feature: (MBaker) Work Item 2346 - Implement more Excel calculation functions - - Implemented the COUPDAYS(), COUPDAYBS(), COUPDAYSNC(), COUPNCD(), COUPPCD() and PRICE() Financial functions - - Implemented the N() and TYPE() Information functions - - Implemented the HYPERLINK() Lookup and Reference function -- Feature: (ET) Work item 11526 - Horizontal page break support in PHPExcel_Writer_PDF -- Feature: (ET) Work item 11529 - Introduce method setActiveSheetIndexByName() -- Feature: (ET) Work item 11550 - AdvancedValueBinder.php: Automatically wrap text when there is new line in string (ALT+"Enter") -- Feature: (ET) Work item 10300 - Data validation support in PHPExcel_Reader_Excel5 and PHPExcel_Writer_Excel5 -- Feature: (MB) Work item 11616 - Improve autosize calculation -- Feature: (MBaker) Methods to translate locale-specific function names in formulae - - Language implementations for Czech (cs), Danish (da), German (de), English (uk), Spanish (es), Finnish (fi), French (fr), Hungarian (hu), Italian (it), Dutch (nl), Norwegian (no), Polish (pl), Portuguese (pt), Brazilian Portuguese (pt_br), Russian (ru) and Swedish (sv) -- Feature: (ET) Work item 9759 - Implement document properties in Excel5 reader/writer - - Fixed so far for PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 11849 - Show/hide row and column headers in worksheet -- Feature: (ET) Work item 11919 - Can't set font on writing PDF (by key) -- Feature: (ET) Work item 12096 - Thousands scale (1000^n) support in PHPExcel_Style_NumberFormat::toFormattedString -- Feature: (ET) Work item 6911 - Implement repeating rows in PDF and HTML writer -- Feature: (ET) Work item 12289 - Sheet tabs in PHPExcel_Writer_HTML -- Feature: (MB) Work item 13041 - Add Wincache CachedObjectProvider -- Feature: (MBaker) Configure PDF Writer paper size based on Excel Page Settings value, and provided methods to override paper size and page orientation with the writer - - Note PHPExcel defaults to Letter size, while the previous PDF writer enforced A4 size, so PDF writer will now default to Letter -- Feature: (MBaker) Initial implementation of cell caching: allowing larger workbooks to be managed, but at a cost in speed -- Feature: (MBaker) Added an identify() method to the IO Factory that identifies the reader which will be used to load a particular file without actually loading it. -- Bugfix: (MBaker) Work item 10979 - Warning messages with INDEX function having 2 arguments -- Bugfix: (ET) Work item 11473 - setValue('=') should result in string instead of formula -- Bugfix: (MBaker) Work item 11471 - method _raiseFormulaError should no be private -- Bugfix: (ET) Work item 11485 - Fatal error: Call to undefined function mb_substr() in ...Classes\PHPExcel\Reader\Excel5.php on line 2903 -- Bugfix: (ET) Work item 11487 - getBold(), getItallic(), getStrikeThrough() not always working with PHPExcel_Reader_Excel2007 -- Bugfix: (ET) Work item 11492 - AdvancedValueBinder.php not working correctly for $cell->setValue('hh:mm:ss') -- Bugfix: (MBaker) Fixed leap year handling for the YEARFRAC() Date/Time function when basis ia 1 (Actual/actual) -- Bugfix: (MBaker) Work item 11490 - Warning messages - - Calculation Engine code modified to enforce strict standards for pass by reference -- Bugfix: (ET) Work item 11483 - PHPExcel_Cell_AdvancedValueBinder doesnt work for dates in far future -- Bugfix: (ET) Work item 11528 - MSODRAWING bug with long CONTINUE record in PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 11571 - PHPExcel_Reader_Excel2007 reads print titles as named range when there is more than one sheet -- Bugfix: (ET) Work item 11561 - missing @return in phpdocblock in reader classes -- Bugfix: (ET) Work item 11576 - AdvancedValueBinder.php: String sometimes becomes a date when it shouldn't -- Bugfix: (ET) Work item 11588 - Small numbers escape treatment in PHPExcel_Style_NumberFormat::toFormattedString() -- Bugfix: (ET) Work item 11590 - Blank styled cells are not blank in output by HTML writer due to &nbsp; -- Bugfix: (MBaker) Work item 11587 - Calculation engine bug: Existing, blank cell + number gives #NUM -- Bugfix: (ET) Work item 11608 - AutoSize only measures length of first line in cell with multiple lines (ALT+Enter) -- Bugfix: (ET) Work item 11608 - Fatal error running Tests/12serializedfileformat.php (PHPExcel 1.7.2) -- Bugfix: (MBaker) Fixed various errors in the WORKDAY() and NETWORKDAYS() Date/Time functions (particularly related to holidays) -- Bugfix: (ET) Work item 11660 - Uncaught exception 'Exception' with message 'Valid scale is between 10 and 400.' in Classes/PHPExcel/Worksheet/SheetView.php:115 -- Bugfix: (ET) Work item 11551 - "Unrecognized token 39 in formula" with PHPExcel_Reader_Excel5 (occuring with add-in functions) -- Bugfix: (ET) Work item 11668 - Excel2007 reader not reading PHPExcel_Style_Conditional::CONDITION_EXPRESSION -- Bugfix: (MBaker) Fix to the BESSELI(), BESSELJ(), BESSELK(), BESSELY() and COMPLEX() Engineering functions to use correct default values for parameters -- Bugfix: (MBaker) Work item 11525 - DATEVALUE function not working for pure time values + allow DATEVALUE() function to handle partial dates (e.g. "1-Jun" or "12/2010") -- Bugfix: (MBaker) Fix for empty quoted strings in formulae -- Bugfix: (MBaker) Trap for division by zero in Bessel functions -- Bugfix: (MBaker) Fix to OOCalc Reader to convert semi-colon (;) argument separator in formulae to a comma (,) -- Bugfix: (ET) Work item 11693 - PHPExcel_Writer_Excel5_Parser cannot parse formula like =SUM(C$5:C5) -- Bugfix: (MBaker) Fix to OOCalc Reader to handle dates that fall outside 32-bit PHP's date range -- Bugfix: (ET) Work item 11692 - File->sys_get_temp_dir() can fail in safe mode -- Bugfix: (ET) Work item 11727 - Sheet references in Excel5 writer do not work when referenced sheet title contains non-Latin symbols -- Bugfix: (ET) Work item 11743 - Bug in HTML writer can result in missing rows in output -- Bugfix: (ET) Work item 11674 - setShowGridLines(true) not working with PHPExcel_Writer_PDF -- Bugfix: (ET) Work item 11836 - PHPExcel_Worksheet_RowIterator initial position incorrect -- Bugfix: (ET) Work item 11835 - PHPExcel_Worksheet_HeaderFooterDrawing Strict Exception thrown (by jshaw86) -- Bugfix: (ET) Work item 11850 - Parts of worksheet lost when there are embedded charts (Excel5 reader) -- Bugfix: (MBaker) VLOOKUP() function error when lookup value is passed as a cell reference rather than an absolute value -- Bugfix: (ET) Work item 12041 - First segment of Rich-Text not read correctly by PHPExcel_Reader_Excel2007 -- Bugfix: (MBaker) Work item 12048 - Fatal Error with getCell('name') when name matches the pattern for a cell reference -- Bugfix: (ET) Work item 12039 - excel5 writer appears to be swapping image locations -- Bugfix: (ET) Work item 11954 - Undefined index: host in ZipStreamWrapper.php, line 94 and line 101 -- Bugfix: (ET) Work item 11672 - BIFF8 File Format problem (too short COLINFO record) -- Bugfix: (ET) Work item 12121 - Column width sometimes changed after read/write with Excel2007 reader/writer -- Bugfix: (ET) Work item 11964 - Worksheet.php throws a fatal error when styling is turned off via setReadDataOnly on the reader -- Bugfix: (MBaker) Work item 11851 - Checking for Circular References in Formulae - - Calculation Engine code now traps for cyclic references, raising an error or throwing an exception, or allows 1 or more iterations through cyclic references, based on a configuration setting -- Bugfix: (ET) Work item 12244 - PNG transparency using Excel2007 writer -- Bugfix: (ET) Work item 12221 - Custom readfilter error when cell formulas reference excluded cells (Excel5 reader) -- Bugfix: (ET) Work item 12288 - Protection problem in XLS -- Bugfix: (ET) Work item 12300 - getColumnDimension()->setAutoSize() incorrect on cells with Number Formatting -- Bugfix: (ET) Work item 12378 - Notices reading Excel file with Add-in funcitons (PHPExcel_Reader_Excel5) -- Bugfix: (ET) Work item 12380 - Excel5 reader not reading formulas with deleted sheet references -- Bugfix: (ET) Work item 12404 - Named range (defined name) scope problems for in PHPExcel -- Bugfix: (ET) Work item 12423 - PHP Parse error: syntax error, unexpected T_PUBLIC in PHPExcel/Calculation.php on line 3482 -- Bugfix: (ET) Work item 12505 - Named ranges don't appear in name box using Excel5 writer -- Bugfix: (ET) Work item 12509 - Many merged cells + autoSize column -> slows down the writer -- Bugfix: (ET) Work item 12539 - Incorrect fallback order comment in Shared/Strings.php ConvertEncoding() -- Bugfix: (ET) Work item 12538 - IBM AIX iconv() will not work, should revert to mbstring etc. instead -- Bugfix: (ET) Work item 12568 - Excel5 writer and mbstring functions overload -- Bugfix: (MBaker) Work item 12672 - OFFSET needs to flattenSingleValue the $rows and $columns args -- Bugfix: (MBaker) Work item 12546 - Formula with DMAX(): Notice: Undefined offset: 2 in ...\PHPExcel\Calculation.php on line 2365 - - Note that the Database functions have not yet been implemented -- Bugfix: (MBaker) Work item 12839 - Call to a member function getParent() on a non-object in Classes\\PHPExcel\\Calculation.php Title is required -- Bugfix: (MBaker) Work item 12935 - Cyclic Reference in Formula -- Bugfix: (MBaker) Work item 13025 - Memory error...data validation? - - -2010/01/11 (v1.7.2): -- General: (ET) Applied patch 4362 -- General: (ET) Applied patch 4363 (modified) -- General: (MBaker) Work item 10874 - 1.7.1 Extremely Slow - Refactored PHPExcel_Calculation_Functions::flattenArray() method and set calculation cache timer default to 2.5 seconds -- General: (MBaker) Allow formulae to contain line breaks -- General: (ET) Work item 10910 - split() function deprecated in PHP 5.3.0 -- General: (ET) sys_get_temp_dir() requires PHP 5.2.1, not PHP 5.2 [provide fallback function for PHP 5.2.0] -- General: (MBaker) Applied patch 4640 - Implementation of the ISPMT() Financial function by Matt Groves -- General: (MBaker) Work item 11052 - Put the example of formula with more arguments in documentation -- General: (MBaker) Improved accuracy for the GAMMAINV() Statistical Function -- Feature: (ET) Work item 10409 - XFEXT record support to fix colors change from Excel5 reader, and copy/paste color change with Excel5 writer - - Excel5 reader reads RGB color information in XFEXT records for borders, font color and fill color -- Feature: (MBaker) Work Item 2346 - Implement more Excel calculation functions - - Implemented the FVSCHEDULE(), XNPV(), IRR(), MIRR(), XIRR() and RATE() Financial functions - - Implemented the SUMPRODUCT() Mathematical function - - Implemented the ZTEST() Statistical Function -- Feature: (ET) Work item 10919 - Multiple print areas in one sheet -- Feature: (ET) Work item 10930 - Store calculated values in output by PHPExcel_Writer_Excel5 -- Feature: (ET) Work item 10939 - Sheet protection options in Excel5 reader/writer -- Feature: (MBaker) Modification of the COUNT(), AVERAGE(), AVERAGEA(), DEVSQ, AVEDEV(), STDEV(), STDEVA(), STDEVP(), STDEVPA(), VARA() and VARPA() SKEW() and KURT() functions to correctly handle boolean values depending on whether they're passed in as values, values within a matrix or values within a range of cells. -- Feature: (ET) Work item 9932 - Cell range selection -- Feature: (MB) Work item 10266 - Root-relative path handling -- Feature: (ET) Work item 11315 - Named Ranges not working with PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 11206 - Excel2007 Reader fails to load Apache POI generated Excel -- Bugfix: (MB) Work item 11154 - Number format is broken when system's thousands separator is empty -- Bugfix: (MB) Work item 11401 - ReferenceHelper::updateNamedFormulas throws errors if oldName is empty -- Bugfix: (MB) Work item 11296 - parse_url() fails to parse path to an image in xlsx -- Bugfix: (ET) Work item 10876 - Workaround for iconv_substr() bug in PHP 5.2.0 -- Bugfix: (ET) Work item 10877 - 1 pixel error for image width and height with PHPExcel_Writer_Excel5 -- Bugfix: (MBaker) Fix to GEOMEAN() Statistical function -- Bugfix: (ET) Work item 10884 - setValue('-') and setValue('.') sets numeric 0 instead of 1-character string -- Bugfix: (ET) Work item 10885 - Row height sometimes much too low after read with PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 10888 - Diagonal border. Miscellaneous missing support. - - Constant PHPExcel_Style_Borders::DIAGONAL_BOTH added to support double-diagonal (cross) - - PHPExcel_Reader_Excel2007 not always reading diagonal borders (only recognizes 'true' and not '1') - - PHPExcel_Reader_Excel5 support for diagonal borders - - PHPExcel_Writer_Excel5 support for diagonal borders -- Bugfix: (ET) Work item 10894 - Session bug: Fatal error: Call to a member function bindValue() on a non-object in ...\Classes\PHPExcel\Cell.php on line 217 -- Bugfix: (ET) Work item 10896 - Colors messed up saving twice with same instance of PHPExcel_Writer_Excel5 (regression since 1.7.0) -- Bugfix: (ET) Work item 10917 - Method PHPExcel_Worksheet::setDefaultStyle is not working -- Bugfix: (ET) Work item 10897 - PHPExcel_Reader_CSV::canRead() sometimes says false when it shouldn't -- Bugfix: (ET) Work item 10922 - Changes in workbook not picked up between two saves with PHPExcel_Writer_Excel2007 -- Bugfix: (ET) Work item 10913 - Decimal and thousands separators missing in HTML and PDF output -- Bugfix: (ET) Work item 10936 - Notices with PHPExcel_Reader_Excel5 and named array constants -- Bugfix: (MBaker) Work item 10938 - Calculation engine limitation on 32-bit platform with integers > 2147483647 -- Bugfix: (ET) Work item 10959 - Shared(?) formulae containing absolute cell references not read correctly using Excel5 Reader -- Bugfix: (MBaker) Work item 10962 - Warning messages with intersection operator involving single cell -- Bugfix: (ET) Work item 10980 - Infinite loop in Excel5 reader caused by zero-length string in SST -- Bugfix: (ET) Work item 10983 - Remove unnecessary cell sorting to improve speed by approx. 18% in HTML and PDF writers -- Bugfix: (MBaker) Work item 10977 - Cannot read A1 cell content - OO_Reader -- Bugfix: (ET) Work item 11000 - Transliteration failed, invalid encoding - - -2009/11/02 (v1.7.1): -- General: (ET) Work item 10687 - ereg() function deprecated in PHP 5.3.0 -- General: (MB) Work item 10739 - Writer Interface Inconsequence - setTempDir and setUseDiskCaching -- General: (ET) Upgrade to TCPDF 4.8.009 -- Feature: (ET) Work item 7333 - Support for row and column styles (feature request) - - Basic implementation for Excel2007/Excel5 reader/writer -- Feature: (ET) Work item 10459 - Hyperlink to local file in Excel5 reader/writer -- Feature: (MB) Work item 10472 - Color Tab (Color Sheet's name) -- Feature: (ET) Work item 10488 - Border style "double" support in PHPExcel_Writer_HTML -- Feature: (ET) Work item 10492 - Multi-section number format support in HTML/PDF/CSV writers -- Feature: (MBaker) - Some additional performance tweaks in the calculation engine -- Feature: (MBaker) - Fix result of DB() and DDB() Financial functions to 2dp when in Gnumeric Compatibility mode -- Feature: (MBaker) - Added AMORDEGRC(), AMORLINC() and COUPNUM() Financial function (no validation of parameters yet) -- Feature: (MBaker) - Improved accuracy of TBILLEQ(), TBILLPRICE() and TBILLYIELD() Financial functions when in Excel or Gnumeric mode -- Feature: (MBaker) - Added INDIRECT() Lookup/Reference function (only supports full addresses at the moment) -- Feature: (MB) Work item 10498 - PHPExcel_Reader_CSV::canRead() improvements -- Feature: (ET) Work item 10500 - Input encoding option for PHPExcel_Reader_CSV -- Feature: (ET) Work item 10493 - Colored number format support, e.g. [Red], in HTML/PDF output -- Feature: (ET) Work item 10559 - Color Tab (Color Sheet's name) [Excel5 reader/writer support] -- Feature: (MBaker) Initial version of SYLK (slk) and Excel 2003 XML Readers (Cell data and basic cell formatting) -- Feature: (MBaker) Initial version of Open Office Calc (ods) Reader (Cell data only) -- Feature: (MBaker) Initial use of "pass by reference" in the calculation engine for ROW() and COLUMN() Lookup/Reference functions -- Feature: (MBaker) Work item 2346 - COLUMNS() and ROWS() Lookup/Reference functions, and SUBSTITUTE() Text function -- Feature: (ET) Work item 10502 - AdvancedValueBinder(): Re-enable zero-padded string-to-number conversion, e.g '0004' -> 4 -- Feature: (ET) Work item 10600 - Make PHP type match Excel datatype -- Feature: (MB) Work item 10630 - Change first page number on header -- Feature: (MB) Applied patch 3941 -- Feature: (MB,ET) Work item 10745 - Hidden sheets -- Feature: (ET) Work item 10761 - mbstring fallback when iconv is broken -- Feature: (MBaker) Added support for matrix/value comparisons (e.g. ={1,2;3,4}>=3 or 2<>{1,2;3,4}) - Note, can't yet handle comparison of two matrices -- Feature: (MBaker) Improved handling for validation and error trapping in a number of functions -- Feature: (MBaker) Improved support for fraction number formatting -- Feature: (ET) Work item 10455 - Support Reading CSV with Byte Order Mark (BOM) -- Feature: (ET) Work item 10860 - addExternalSheet() at specified index -- Bugfix: (MBaker) Work item 10684 - Named range can no longer be passed to worksheet->getCell() -- Bugfix: (ET) Work item 10455 - RichText HTML entities no longer working in PHPExcel 1.7.0 -- Bugfix: (ET) Work item 7610 - Fit-to-width value of 1 is lost after read/write of Excel2007 spreadsheet [+ support for simultaneous scale/fitToPage] -- Bugfix: (MB) Work item 10469 - Performance issue identified by profiling -- Bugfix: (ET) Work item 10473 - setSelectedCell is wrong -- Bugfix: (ET) Work item 10481 - Images get squeezed/stretched with (Mac) Verdana 10 Excel files using Excel5 reader/writer -- Bugfix: (MBaker) Work item 10482 - Error in argument count for DATEDIF() function -- Bugfix: (MBaker) Work item 10452 - updateFormulaReferences is buggy -- Bugfix: (MB) Work item 10485 - CellIterator returns null Cell if onlyExistingCells is set and key() is in use -- Bugfix: (MBaker) Work item 10453 - Wrong RegEx for parsing cell references in formulas -- Bugfix: (MB) Work item 10486 - Optimisation subverted to devastating effect if IterateOnlyExistingCells is clear -- Bugfix: (ET) Work item 10494 - Fatal error: Uncaught exception 'Exception' with message 'Unrecognized token 6C in formula'... with PHPExcel_Reader_Excel5 -- Bugfix: (MBaker) Work item 10490 - Fractions stored as text are not treated as numbers by PHPExcel's calculation engine -- Bugfix: (ET) Work item 10503 - AutoFit (autosize) row height not working in PHPExcel_Writer_Excel5 -- Bugfix: (MBaker) Fixed problem with null values breaking the calculation stack -- Bugfix: (ET) Work item 10524 - Date number formats sometimes fail with PHPExcel_Style_NumberFormat::toFormattedString, e.g. [$-40047]mmmm d yyyy -- Bugfix: (MBaker) Fixed minor problem with DATEDIFF YM calculation -- Bugfix: (MB) Applied patch 3695 -- Bugfix: (ET) Work item 10536 - setAutosize() and Date cells not working properly -- Bugfix: (ET) Work item 10556 - Time value hour offset in output by HTML/PDF/CSV writers (system timezone problem) -- Bugfix: (ET) Work item 10558 - Control characters 0x14-0x1F are not treated by PHPExcel -- Bugfix: (ET) Work item 10560 - PHPExcel_Writer_Excel5 not working when open_basedir restriction is in effect -- Bugfix: (MBaker) Work item 10563 - IF formula calculation problem in PHPExcel 1.7.0 (string comparisons) -- Bugfix: (MBaker) Improved CODE() Text function result for UTF-8 characters -- Bugfix: (ET) Work item 10568 - Empty rows are collapsed with HTML/PDF writer -- Bugfix: (ET) Work item 10569 - Gaps between rows in output by PHPExcel_Writer_PDF (Upgrading to TCPDF 4.7.003) -- Bugfix: (ET) Work item 10575 - Problem reading formulas (Excel5 reader problem with "fake" shared formulas) -- Bugfix: (MBaker) Work item 10588 - Error type in formula: "_raiseFormulaError message is Formula Error: An unexpected error occured" -- Bugfix: (ET) Work item 10599 - Miscellaneous column width problems in Excel5/Excel2007 writer -- Bugfix: (ET) Work item 10615 - Reader/Excel5 'Unrecognized token 2D in formula' in latest version -- Bugfix: (ET) Work item 10623 - on php 5.3 PHPExcel 1.7 Excel 5 reader fails in _getNextToken, token = 2C, throws exception -- Bugfix: (ET) Work item 10617 - Fatal error when altering styles after workbook has been saved -- Bugfix: (ET) Work item 10661 - Images vertically stretched or squeezed when default font size is changed (PHPExcel_Writer_Excel5) -- Bugfix: (ET) Work item 10676 - Styles not read in "manipulated" Excel2007 workbook -- Bugfix: (ET) Work item 10059 - Windows 7 says corrupt file by PHPExcel_Writer_Excel5 when opening in Excel -- Bugfix: (MBaker) Work item 10708 - Calculations sometimes not working with cell references to other sheets -- Bugfix: (ET) Work item 10706 - Problem with merged cells after insertNewRowBefore() -- Bugfix: (MBaker) Applied patch 4023 -- Bugfix: (MBaker) Fix to SUMIF() and COUNTIF() Statistical functions for when condition is a match against a string value -- Bugfix: (ET) Work item 10721 - PHPExcel_Cell::coordinateFromString should throw exception for bad string parameter -- Bugfix: (ET) Work item 10723 - EucrosiaUPC (Thai font) not working with PHPExcel_Writer_Excel5 -- Bugfix: (MBaker) Improved the return of calculated results when the result value is an array -- Bugfix: (MBaker) Allow calculation engine to support Functions prefixed with @ within formulae -- Bugfix: (MBaker) Work item 10632 - Intersection operator (space operator) fatal error with calculation engine -- Bugfix: (ET) Work item 10742 - Chinese, Japanese, Korean characters show as squares in PDF -- Bugfix: (ET) Work item 10756 - sheet title allows invalid characters -- Bugfix: (ET) Work item 10757 - Sheet!$A$1 as function argument in formula causes infinite loop in Excel5 writer -- Bugfix: (MBaker) Work item 10740 - Cell range involving name not working with calculation engine - Modified calculation parser to handle range operator (:), but doesn't currently handle worksheet references with spaces or other non-alphameric characters, or trap erroneous references -- Bugfix: (MBaker) Work item 10798 - DATE function problem with calculation engine (says too few arguments given) -- Bugfix: (MBaker) Work item 10799 - Blank cell can cause wrong calculated value -- Bugfix: (MBaker) Modified ROW() and COLUMN() Lookup/Reference Functions to return an array when passed a cell range, plus some additional work on INDEX() -- Bugfix: (ET) Work item 10817 - Images not showing in Excel 97 using PHPExcel_Writer_Excel5 (patch by Jordi Gutiérrez Hermoso) -- Bugfix: (ET) Work item 10785 - When figures are contained in the excel sheet, Reader was stopped -- Bugfix: (MBaker) Work item 10818 - Formulas changed after insertNewRowBefore() -- Bugfix: (ET) Work item 10825 - Cell range row offset problem with shared formulas using PHPExcel_Reader_Excel5 -- Bugfix: (MBaker) Work item 10832 - Warning: Call-time pass-by-reference has been deprecated -- Bugfix: (ET) Work item 10849 - Image should "Move but don't size with cells" instead of "Move and size with cells" with PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 10856 - Opening a Excel5 generated XLS in Excel 2007 results in header/footer entry not showing on input -- Bugfix: (ET) Work item 10859 - addExternalSheet() not returning worksheet -- Bugfix: (MBaker) Work item 10629 - Invalid results in formulas with named ranges - - -2009/08/10 (v1.7.0): -- General: (ET) Work item 9893 - Expand documentation: Number formats -- General: (ET) Work item 9941 - Class 'PHPExcel_Cell_AdvancedValueBinder' not found -- General: (MB) Work item 9960 - Change return type of date functions to PHPExcel_Calculation_Functions::RETURNDATE_EXCEL -- Feature: (MBaker) - New RPN and stack-based calculation engine for improved performance of formula calculation - - Faster (anything between 2 and 12 times faster than the old parser, depending on the complexity and nature of the formula) - - Significantly more memory efficient when formulae reference cells across worksheets - - Correct behaviour when referencing Named Ranges that exist on several worksheets - - Support for Excel ^ (Exponential) and % (Percentage) operators - - Support for matrices within basic arithmetic formulae (e.g. ={1,2,3;4,5,6;7,8,9}/2) - - Better trapping/handling of NaN and infinity results (return #NUM! error) - - Improved handling of empty parameters for Excel functions - - Optional logging of calculation steps -- Feature: (MBaker) - New calculation engine can be accessed independently of workbooks (for use as a standalone calculator) -- Feature: (MBaker) Work Item 2346 - Implement more Excel calculation functions - - Initial implementation of the COUNTIF() and SUMIF() Statistical functions - - Added ACCRINT() Financial function -- Feature: (MBaker) - Modifications to number format handling for dddd and ddd masks in dates, use of thousand separators even when locale only implements it for money, and basic fraction masks (0 ?/? and ?/?) -- Feature: (ET) Work item 9794 - Support arbitrary fixed number of decimals in PHPExcel_Style_NumberFormat::toFormattedString() -- Feature: (ET) Work item 6857 - Improving performance and memory on data dumps - - Various style optimizations (merging from branch wi6857-memory) - - Moving hyperlink and dataValidation properties from cell to worksheet for lower PHP memory usage -- Feature: (MB) Work item 9869 - Provide fluent interfaces where possible -- Feature: (ET) Work item 9899 - Make easy way to apply a border to a rectangular selection -- Feature: (ET) Work item 9906 - Support for system window colors in PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 9911 - Horizontal center across selection -- Feature: (ET) Work item 9919 - Merged cells record, write to full record size in PHPExcel_Writer_Excel5 -- Feature: (MB) Work item 9895 - Add page break between sheets in exported PDF -- Feature: (ET) Work item 9902 - Sanitization of UTF-8 input for cell values -- Feature: (ET) Work item 9930 - Read cached calculated value with PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 9896 - Miscellaneous CSS improvements for PHPExcel_Writer_HTML -- Feature: (ET) Work item 9947 - getProperties: setCompany feature request -- Feature: (MB) Patch 2981 - Insert worksheet at a specified index -- Feature: (MB) Patch 3018 - Change worksheet index -- Feature: (MB) Patch 3039 - Readfilter for CSV reader -- Feature: (ET) Work item 10172 - Check value of mbstring.func_overload when saving with PHPExcel_Writer_Excel5 -- Feature: (ET) Work item 10251 - Eliminate dependency of an include path pointing to class directory -- Feature: (ET) Work item 10292 - Method for getting the correct reader for a certain file (contribution) -- Feature: (ET) Work item 10287 - Choosing specific row in fromArray method -- Feature: (ET) Work item 10319 - Shared formula support in PHPExcel_Reader_Excel5 -- Feature: (MB,ET) Work item 10345 - Right-to-left column direction in worksheet -- Bugfix: (ET) Work item 9824 - PHPExcel_Reader_Excel5 not reading PHPExcel_Style_NumberFormat::FORMAT_NUMBER ('0') -- Bugfix: (ET) Work item 9858 - Fractional row height in locale other than English results in corrupt output using PHPExcel_Writer_Excel2007 -- Bugfix: (ET) Work item 9846 - Fractional (decimal) numbers not inserted correctly when locale is other than English -- Bugfix: (ET) Work item 9863 - Fractional calculated value in locale other than English results in corrupt output using PHPExcel_Writer_Excel2007 -- Bugfix: (ET) Work item 9830 - Locale aware decimal and thousands separator in exported formats HTML, CSV, PDF -- Bugfix: (MB) Work item 9819 - Cannot Add Image with Space on its Name -- Bugfix: (ET) Work item 9884 - Black line at top of every page in output by PHPExcel_Writer_PDF -- Bugfix: (ET) Work item 9885 - Border styles and border colors not showing in HTML output (regression since 1.6.4) -- Bugfix: (ET) Work item 9888 - Hidden screen gridlines setting in worksheet not read by PHPExcel_Reader_Excel2007 -- Bugfix: (MB) Work item 9913 - Some valid sheet names causes corrupt output using PHPExcel_Writer_Excel2007 -- Bugfix: (ET) Work item 9934 - More than 32,767 characters in a cell gives corrupt Excel file -- Bugfix: (ET) Work item 9937 - Images not getting copyied with the ->copy() function -- Bugfix: (ET) Work item 9940 - Bad calculation of column width setAutoSize(true) function -- Bugfix: (ET) Work item 9968 - Dates are sometimes offset by 1 day in output by HTML and PDF writers depending on system timezone setting -- Bugfix: (ET) Work item 10003 - Wingdings symbol fonts not working with PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 10010 - White space string prefix stripped by PHPExcel_Writer_Excel2007 -- Bugfix: (ET) Work item 10023 - The name of the Workbook stream MUST be "Workbook", not "Book" -- Bugfix: (ET) Work item 10030 - Avoid message "Microsoft Excel recalculates formulas..." when closing xls file from Excel -- Bugfix: (ET) Work item 10031 - Non-unique newline representation causes problems with LEN formula -- Bugfix: (ET) Work item 10033 - Newline in cell not showing with PHPExcel_Writer_HTML and PHPExcel_Writer_PDF -- Bugfix: (ET) Work item 10046 - Rich-Text strings get prefixed by &nbsp; when output by HTML writer -- Bugfix: (ET) Work item 10052 - Leading spaces do not appear in output by HTML/PDF writers -- Bugfix: (MB) Work item 10061 - Empty Apache POI-generated file can not be read -- Bugfix: (ET) Work item 10068 - Column width not scaling correctly with font size in HTML and PDF writers -- Bugfix: (ET) Work item 10069 - Inaccurate row heights with HTML writer -- Bugfix: (MB) Patch 2992 - Reference helper -- Bugfix: (MBaker) - Excel 5 Named ranges should not be local to the worksheet, but accessible from all worksheets -- Bugfix: (ET) Work item 10088 - Row heights are ignored by PHPExcel_Writer_PDF -- Bugfix: (MB) Patch 3003 - Write raw XML -- Bugfix: (ET) Work item 10098 - removeRow(), removeColumn() not always clearing cell values -- Bugfix: (ET) Work item 10142 - Problem reading certain hyperlink records with PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 10143 - Hyperlink cell range read failure with PHPExcel_Reader_Excel2007 -- Bugfix: (MB) Work item 10149 - 'Column string index can not be empty.' -- Bugfix: (ET) Work item 10204 - getHighestColumn() sometimes says there are 256 columns with PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 10220 - extractSheetTitle fails when sheet title contains exclamation mark (!) -- Bugfix: (ET) Work item 10221 - setTitle() sometimes erroneously appends integer to sheet name -- Bugfix: (ET) Work item 10229 - Mac BIFF5 Excel file read failure (missing support for Mac OS Roman character set) -- Bugfix: (ET) Work item 10230 - BIFF5 header and footer incorrectly read by PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 10259 - iconv notices when reading hyperlinks with PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 10252 - Excel5 reader OLE read failure with small Mac BIFF5 Excel files -- Bugfix: (ET) Work item 10272 - Problem in reading formula : IF( IF ) with PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 10274 - Error reading formulas referencing external sheets with PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 10291 - Image horizontally stretched when default font size is increased (PHPExcel_Writer_Excel5) -- Bugfix: (ET) Work item 10333 - Undefined offset in Reader\Excel5.php on line 3572 -- Bugfix: (MB) Work item 10340 - PDF output different then XLS (copied data) -- Bugfix: (ET) Work item 10352 - Internal hyperlinks with UTF-8 sheet names not working in PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 10361 - String shared formula result read error with PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 10363 - Uncaught exception 'Exception' with message 'Valid scale is between 10 and 400.' in Classes/PHPExcel/Worksheet/PageSetup.php:338 -- Bugfix: (ET) Work item 10355 - Using setLoadSheetsOnly fails if you do not use setReadDataOnly(true) and sheet is not the first sheet -- Bugfix: (MB) Work item 10362 - getCalculatedValue() sometimes incorrect with IF formula and 0-values -- Bugfix: (MBaker) Work Item 10198 - Excel Reader 2007 problem with "shared" formulae when "master" is an error -- Bugfix: (MBaker) Work Item 10106 - Named Range Bug, using the same range name on different worksheets -- Bugfix: (MBaker) Work Item 10004 - Java code in JAMA classes -- Bugfix: (MBaker) Work Item 9659 - getCalculatedValue() not working with some formulas involving error types -- Bugfix: (MBaker) Work Item 9447 - evaluation of both return values in an IF() statement returning an error if either result was an error, irrespective of the IF evaluation -- Bugfix: (MBaker) Work Item 6203 - Power in formulas: new calculation engine no longer treats ^ as a bitwise XOR operator -- Bugfix: (MBaker) - Bugfixes and improvements to many of the Excel functions in PHPExcel - - Added optional "places" parameter in the BIN2HEX(), BIN2OCT, DEC2BIN(), DEC2OCT(), DEC2HEX(), HEX2BIN(), HEX2OCT(), OCT2BIN() and OCT2HEX() Engineering Functions - - Trap for unbalanced matrix sizes in MDETERM() and MINVERSE() Mathematic and Trigonometric functions - - Fix for default characters parameter value for LEFT() and RIGHT() Text functions - - Fix for GCD() and LCB() Mathematical functions when the parameters include a zero (0) value - - Fix for BIN2OCT() Engineering Function for 2s complement values (which were returning hex values) - - Fix for BESSELK() and BESSELY() Engineering functions - - Fix for IMDIV() Engineering Function when result imaginary component is positive (wasn't setting the sign) - - Fix for ERF() Engineering Function when called with an upper limit value for the integration - - Fix to DATE() Date/Time Function for year value of 0 - - Set ISPMT() function as category FINANCIAL - - Fix for DOLLARDE() and DOLLARFR() Financial functions - - Fix to EFFECT() Financial function (treating $nominal_rate value as a variable name rather than a value) - - Fix to CRITBINOM() Statistical function (CurrentValue and EssentiallyZero treated as constants rather than variables) - Note that an Error in the function logic can still lead to a permanent loop - - Fix to MOD() Mathematical function to work with floating point results - - Fix for QUOTIENT() Mathematical function - - Fix to HOUR(), MINUTE() and SECOND() Date/Time functions to return an error when passing in a floating point value of 1.0 or greater, or less than 0 - - LOG() Function now correctly returns base-10 log when called with only one parameter, rather than the natural log as the default base - - Modified text functions to handle multibyte character set (UTF-8). - - -2009/04/22 (v1.6.7): -- General: (MB) Work item 9416 - Deprecate misspelled setStriketrough() and getStriketrough() methods -- General: (MB) Work item 9526 - Performance improvement when saving file -- Feature: (MB) Work item 9598 - Check that sheet title has maximum 31 characters -- Feature: (MB, ET) Work item 9631 - True support for Excel built-in number format codes -- Feature: (ET) Work item 9683 - Ability to read defect BIFF5 Excel file without CODEPAGE record -- Feature: (MB) Work item 9701 - Auto-detect which reader to invoke -- Feature: (ET) Work item 9214 - Deprecate insertion of dates using PHP-time (Unix time) [request for removal of feature] -- Feature: (ET) Work item 9747 - Support for entering time values like '9:45', '09:45' using AdvancedValueBinder -- Feature: (ET) Work item 9797 - DataType dependent horizontal alignment in HTML and PDF writer -- Bugfix: (MB) Work item 9375 - Cloning data validation object causes script to stop -- Bugfix: (ET) Work item 9400 - Simultaneous repeating rows and repeating columns not working with PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 9399 - Simultaneous repeating rows and repeating columns not working with PHPExcel_Writer_Excel2007 -- Bugfix: (ET) Work item 9437 - Row outline level not working with PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 9452 - Occasional notices with PHPExcel_Reader_Excel5 when Excel file contains drawing elements -- Bugfix: (ET) Work item 9453 - PHPExcel_Reader_Excel5 fails as a whole when workbook contains images other than JPEG/PNG -- Bugfix: (ET) Work item 9444 - Excel5 writer checks for iconv but does not necessarily use it -- Bugfix: (ET) Work item 9463 - Altering a style on copied worksheet alters also the original -- Bugfix: (MB) Work item 9480 - Formulas are incorrectly updated when a sheet is renamed -- Bugfix: (MB) Work item 9513 - PHPExcel_Worksheet::extractSheetTitle not treating single quotes correctly -- Bugfix: (MB) Work item 9477 - PHP Warning raised in function array_key_exists -- Bugfix: (MB) Work item 9599 - getAlignWithMargins() gives wrong value when using PHPExcel_Reader_Excel2007 -- Bugfix: (MB) Work item 9600 - getScaleWithDocument() gives wrong value when using PHPExcel_Reader_Excel2007 -- Bugfix: (MB) Work item 9630 - PHPExcel_Reader_Excel2007 not reading the first user-defined number format -- Bugfix: (MB) Work item 9647 - Print area converted to uppercase after read with PHPExcel_Reader_Excel2007 -- Bugfix: (MB) Work item 9661 - Incorrect reading of scope for named range using PHPExcel_Reader_Excel2007 -- Bugfix: (MB) Work item 9690 - Error with pattern (getFillType) and rbg (getRGB) -- Bugfix: (ET) Work item 9712 - AdvancedValueBinder affected by system timezone setting when inserting date values -- Bugfix: (ET) Work item 9743 - PHPExcel_Reader_Excel2007 not reading value of active sheet index -- Bugfix: (ET) Work item 9742 - getARGB() sometimes returns SimpleXMLElement object instead of string with PHPExcel_Reader_Excel2007 -- Bugfix: (ET) Work item 9731 - Negative image offset causes defects in 14excel5.xls and 20readexcel5.xlsx -- Bugfix: (ET) Work item 9758 - HTML & PDF Writer not working with mergeCells (regression since 1.6.5) -- Bugfix: (ET) Work item 9774 - Too wide columns with HTML and PDF writer -- Bugfix: (MB) Work item 9775 - PDF and cyrillic fonts -- Bugfix: (ET) Work item 9793 - Percentages not working correctly with HTML and PDF writers (shows 0.25% instead of 25%) -- Bugfix: (ET) Work item 9791 - PHPExcel_Writer_HTML creates extra borders around cell contents using setUseInlineCss(true) -- Bugfix: (ET) Work item 9784 - Problem with text wrap + merged cells in HTML and PDF writer -- Bugfix: (ET) Work item 9814 - Adjacent path separators in include_path causing IOFactory to violate open_basedir restriction - - --------------------------------------------------------------------------------- -BREAKING CHANGE! In previous versions of PHPExcel up to and including 1.6.6, -when a cell had a date-like number format code, it was possible to enter a date -directly using an integer PHP-time without converting to Excel date format. - -Starting with PHPExcel 1.6.7 this is no longer supported. Refer to the developer -documentation for more information on entering dates into a cell. --------------------------------------------------------------------------------- - - -2009/03/02 (v1.6.6): -- General: (MB) Work item 9102 - Improve support for built-in number formats in PHPExcel_Reader_Excel2007 -- General: (ET) Work item 9281 - Source files are in both UNIX and DOS formats - changed to UNIX -- General: (MB) Work item 9338 - Update documentation: Which language to write formulas in? -- Feature: (ET) Work item 8817 - Ignore DEFCOLWIDTH records with value 8 in PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 8847 - Support for width, height, offsetX, offsetY for images in PHPExcel_Reader_Excel5 -- Feature: (MB) Work item 8870 - Disk Caching in specific folder -- Feature: (MBaker) Work item 2346 - Added SUMX2MY2, SUMX2PY2, SUMXMY2, MDETERM and MINVERSE Mathematical and Trigonometric Functions -- Feature: (MBaker) Work item 2346 - Added CONVERT Engineering Function -- Feature: (MBaker) Work item 2346 - Added DB, DDB, DISC, DOLLARDE, DOLLARFR, INTRATE, IPMT, PPMT, PRICEDISC, PRICEMAT and RECEIVED Financial Functions -- Feature: (MBaker) Work item 2346 - Added ACCRINTM, CUMIPMT, CUMPRINC, TBILLEQ, TBILLPRICE, TBILLYIELD, YIELDDISC and YIELDMAT Financial Functions -- Feature: (MBaker) Work item 2346 - Added DOLLAR Text Function -- Feature: (MBaker) Work item 2346 - Added CORREL, COVAR, FORECAST, INTERCEPT, RSQ, SLOPE and STEYX Statistical Functions -- Feature: (MBaker) Work item 2346 - Added PEARSON Statistical Functions as a synonym for CORREL -- Feature: (MBaker) Work item 2346 - Added LINEST, LOGEST (currently only valid for stats = false), TREND and GROWTH Statistical Functions -- Feature: (MBaker) Work item 2346 - Added RANK and PERCENTRANK Statistical Functions -- Feature: (MBaker) Work item 2346 - Added ROMAN Mathematical Function (Classic form only) -- Feature: (MB) Work item 8931 - Update documentation to show example of getCellByColumnAndRow($col, $row) -- Feature: (MB) Work item 8770 - Implement worksheet, row and cell iterators -- Feature: (MB) Work item 9001 - Support for arbitrary defined names (named range) -- Feature: (MB, ET) Work item 9016 - Update formulas when sheet title / named range title changes -- Feature: (MB) Work item 9103 - Ability to read cached calculated value -- Feature: (MBaker, ET) Work item 8483 - Support for Excel 1904 calendar date mode (Mac) -- Feature: (ET) Work item 9194 - PHPExcel_Writer_Excel5 improvements writing shared strings table -- Feature: (ET) Work item 9248 - PHPExcel_Writer_Excel5 iconv fallback when mbstring extension is not enabled -- Feature: (ET) Work item 9253 - UTF-8 support in font names in PHPExcel_Writer_Excel5 -- Feature: (MB) Work item 9215 - Implement value binding architecture -- Feature: (MB) Work item 6742 - PDF writer not working with UTF-8 -- Feature: (ET) Work item 9355 - Eliminate duplicate style entries in multisheet workbook written by PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8810 - Redirect to client browser fails due to trailing white space in class definitions -- Bugfix: (MB) Work item 8816 - Spurious column dimension element introduced in blank worksheet after using PHPExcel_Writer_Excel2007 -- Bugfix: (ET) Work item 8830 - Image gets slightly narrower than expected when using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8831 - Image laid over non-visible row gets squeezed in height when using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8860 - PHPExcel_Reader_Excel5 fails when there are 10 or more images in the workbook -- Bugfix: (MB) Work item 8909 - Different header/footer images in different sheets not working with PHPExcel_Writer_Excel2007 -- Bugfix: (MB, ET) Work item 8924 - Fractional seconds disappear when using PHPExcel_Reader_Excel2007 and PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 7994 - Images not showing in OpenOffice when using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 9047 - Images not showing on print using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 9085 - PHPExcel_Writer_Excel5 maximum allowed record size 4 bytes too short -- Bugfix: (MB) Work item 9119 - Not numeric strings are formatted as dates and numbers using worksheet's toArray method -- Bugfix: (ET) Work item 9132 - Excel5 simple formula parsing error -- Bugfix: (ET) Work item 9206 - Problems writing dates with CSV -- Bugfix: (ET) Work item 9203 - PHPExcel_Reader_Excel5 reader fails with fatal error when reading group shapes -- Bugfix: (ET) Work item 9231 - PHPExcel_Writer_Excel5 fails completely when workbook contains more than 57 colors -- Bugfix: (ET) Work item 9244 - PHPExcel_Writer_PDF not compatible with autoload -- Bugfix: (ET) Work item 9250 - Fatal error: Call to a member function getNestingLevel() on a non-object in PHPExcel/Reader/Excel5.php on line 690 -- Bugfix: (MB) Work item 9246 - Notices when running test 04printing.php on PHP 5.2.8 -- Bugfix: (MB) Work item 9294 - insertColumn() spawns creation of spurious RowDimension -- BugFix: (MBaker) Work item 9296 - Fix declarations for methods in extended Trend classes -- Bugfix: (MBaker) Work item 2346 - Fix to parameters for the FORECAST Statistical Function -- Bugfix: (MB) Work item 7083 - PDF writer problems with cell height and text wrapping -- Bugfix: (MBaker) Work Item 9337 - Fix test for calculated value in case the returned result is an array -- Bugfix: (ET) Work Item 9354 - Column greater than 256 results in corrupt Excel file using PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 9351 - Excel Numberformat 0.00 results in non internal decimal places values in toArray() Method -- Bugfix: (MB,ET) Work item 9356 - setAutoSize not taking into account text rotation -- Bugfix: (ET) Work item 9372 - Call to undefined method PHPExcel_Worksheet_MemoryDrawing::getPath() in PHPExcel/Writer/HTML.php - - -2009/01/05 (v1.6.5): -- General: (MB) Applied patch 2063 -- General: (MB) Applied patch from work item 8073 - Optimise Shared Strings -- General: (MB) Applied patch from work item 8074 - Optimise Cell Sorting -- General: (MB) Applied patch from work item 8075 - Optimise Style Hashing -- General: (ET) Applied patch from work item 8245 - UTF-8 enhancements -- General: (ET) Applied patch from work item 8283 - PHPExcel_Writer_HTML validation errors against strict HTML 4.01 / CSS 2.1 -- General: (MB) Documented work items 6203 and 8110 in manual -- General: (ET) Restructure package hierachy so classes can be found more easily in auto-generated API (from work item 8468) -- General: (MB) Work item 8806 - Redirect output to a client's browser: Update recommendation in documentation -- Feature: (ET) Work item 7897 - PHPExcel_Reader_Excel5 support for print gridlines -- Feature: (ET) Work item 7899 - Screen gridlines support in Excel5 reader/writer -- Feature: (MB, ET) Work item 7552 - Option for adding image to spreadsheet from image resource in memory -- Feature: (ET) Work item 7862 - PHPExcel_Reader_Excel5 style support for BIFF5 files (Excel 5.0 - Excel 95) -- Feature: (ET) Work item 7918 - PHPExcel_Reader_Excel5 support for user-defined colors and special built-in colors -- Feature: (ET) Work item 7992 - Support for freeze panes in PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 7996 - Support for header and footer margins in PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 7997 - Support for active sheet index in Excel5 reader/writer -- Feature: (MB) Work item 7991 - Freeze panes not read by PHPExcel_Reader_Excel2007 -- Feature: (MB, ET) Work item 7993 - Support for screen zoom level (feature request) -- Feature: (ET) Work item 8012 - Support for default style in PHPExcel_Reader_Excel5 -- Feature: (MB) Work item 8094 - Apple iWork / Numbers.app incompatibility -- Feature: (MB) Work item 7931 - Support "between rule" in conditional formatting -- Feature: (MB) Work item 8308 - Comment size, width and height control (feature request) -- Feature: (ET) Work item 8418 - Improve method for storing MERGEDCELLS records in PHPExcel_Writer_Excel5 -- Feature: (ET) Work item 8435 - Support for protectCells() in Excel5 reader/writer -- Feature: (ET) Work item 8472 - Support for fitToWidth and fitToHeight pagesetup properties in PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 8489 - Support for setShowSummaryBelow() and setShowSummaryRight() in PHPExcel_Writer_Excel5 -- Feature: (MB) Work item 8483 - Support for Excel 1904 calendar date mode (Mac) -- Feature: (ET) Work item 7538 - Excel5 reader: Support for reading images (bitmaps) -- Feature: (ET) Work item 8787 - Support for default style in PHPExcel_Writer_Excel5 -- Feature: (MBaker) Modified calculate() method to return either an array or the first value from the array for those functions that return arrays rather than single values (e.g the MMULT and TRANSPOSE function). This performance can be modified based on the $returnArrayAsType which can be set/retrieved by calling the setArrayReturnType() and getArrayReturnType() methods of the PHPExcel_Calculation class. -- Feature: (MBaker) Work item 2346 - Added ERROR.TYPE Information Function, MMULT Mathematical and Trigonometry Function, and TRANSPOSE Lookup and Reference Function -- Bugfix: (ET) Work item 7896 - setPrintGridlines(true) not working with PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7907 - Incorrect mapping of fill patterns in PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 7898 - setShowGridlines(false) not working with PHPExcel_Writer_Excel2007 -- Bugfix: (MB) Work item 7905 - getShowGridlines() gives inverted value when reading sheet with PHPExcel_Reader_Excel2007 -- Bugfix: (ET) Work item 7944 - User-defined column width becomes slightly larger after read/write with Excel5 -- Bugfix: (ET) Work item 7949 - Incomplete border style support in PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 7928 - Conditional formatting "containsText" read/write results in MS Office Excel 2007 crash -- Bugfix: (MB) Work item 7995 - All sheets are always selected in output when using PHPExcel_Writer_Excel2007 -- Bugfix: (MB) Work item 8013 - COLUMN function warning message during plain read/write -- Bugfix: (MB) Work item 8155 - setValue(0) results in string data type '0' -- Bugfix: (MB) Work item 8226 - Styles not removed when removing rows from sheet -- Bugfix: (MB) Work item 8301 - =IF formula causes fatal error during $objWriter->save() in Excel2007 format -- Bugfix: (ET) Work item 8333 - Exception thrown reading valid xls file: "Excel file is corrupt. Didn't find CONTINUE record while reading shared strings" -- Bugfix: (ET) Work item 8320 - MS Outlook corrupts files generated by PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 8351 - Undefined method PHPExcel_Worksheet::setFreezePane() in ReferenceHelper.php on line 271 -- Bugfix: (MB) Work item 8401 - Ampersands (&), left and right angles (<, >) in Rich-Text strings leads to corrupt output using PHPExcel_Writer_Excel2007 -- Bugfix: (ET) Work item 8408 - Print header and footer not supporting UTF-8 in PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8463 - Vertical page breaks not working with PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8476 - Missing support for accounting underline types in PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8482 - Infinite loops when reading corrupt xls file using PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 8566 - Sheet protection password not working with PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8596 - PHPExcel_Style_NumberFormat::FORMAT_NUMBER ignored by PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8781 - PHPExcel_Reader_Excel5 fails a whole when workbook contains a chart -- Bugfix: (ET) Work item 8788 - Occasional loss of column widths using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 8795 - Notices while reading formulas with deleted sheet references using PHPExcel_Reader_Excel5 -- Bugfix: (MB) Work item 8807 - Default style not read by PHPExcel_Reader_Excel2007 -- Bugfix: (MB) Work item 9341 - Blank rows occupy too much space in file generated by PHPExcel_Writer_Excel2007 - - -2008/10/27 (v1.6.4): -- General: (ET) Work item 7882 - RK record number error in MS developer documentation: 0x007E should be 0x027E -- Feature: (MBaker) Work item 7878 - getHighestColumn() returning "@" for blank worksheet causes corrupt output -- Feature: (MBaker) Work item 2346 - Implement ROW and COLUMN Lookup/Reference Functions (when specified with a parameter) -- Feature: (MBaker) Work item 2346 - Implement initial work on OFFSET Lookup/Reference Function (returning address rather than value at address) -- Feature: (ET) Work item 7416 - Excel5 reader: Page margins -- Feature: (ET) Work item 7417 - Excel5 reader: Header & Footer -- Feature: (ET) Work item 7449 - Excel5 reader support for page setup (paper size etc.) -- Feature: (MB) Work item 7445 - Improve speed and memory consumption of PHPExcel_Writer_CSV -- Feature: (MB) Work item 7432 - Better recognition of number format in HTML, CSV, and PDF writer -- Feature: (MB) Work item 7485 - Font support: Superscript and Subscript -- Feature: (ET) Work item 7509 - Excel5 reader font support: Super- and subscript -- Feature: (ET) Work item 7521 - Excel5 reader style support: Text rotation and stacked text -- Feature: (ET) Work item 7530 - Excel5 reader: Support for hyperlinks -- Feature: (MB, ET) Work item 7557 - Import sheet by request -- Feature: (ET) Work item 7607 - PHPExcel_Reader_Excel5 support for page breaks -- Feature: (ET) Work item 7622 - PHPExcel_Reader_Excel5 support for shrink-to-fit -- Feature: (MB, ET) Work item 7675 - Support for error types -- Feature: (ET) Work item 7388 - Excel5 reader true formula support -- Feature: (ET) Work item 7701 - Support for named ranges (defined names) in PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 7781 - Support for repeating rows and repeating columns (print titles) in PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 7783 - Support for print area in PHPExcel_Reader_Excel5 -- Feature: (ET) Work item 7795 - Excel5 reader and writer support for horizontal and vertical centering of page -- Feature: (MB) Applied patch 1962 -- Feature: (ET) Work item 7866 - Excel5 reader and writer support for hidden cells (formulas) -- Feature: (MB, ET) Work item 7612 - Support for indentation in cells (feature request) -- Feature: (MB, ET) Work item 7828 - Option for reading only specified interval of rows in a sheet -- Bugfix: (MBaker) Work item 7367 - PHPExcel_Calculation_Functions::DATETIMENOW() and PHPExcel_Calculation_Functions::DATENOW() to force UTC -- Bugfix: (MBaker) Work item 7395 - Modified PHPExcel_Shared_Date::FormattedPHPToExcel() and PHPExcel_Shared_Date::ExcelToPHP to force datatype for return values -- Bugfix: (ET) Work item 7450 - Excel5 reader not producing UTF-8 strings with BIFF5 files -- Bugfix: (MB) Work item 7470 - Array constant in formula gives run-time notice with Excel2007 writer -- Bugfix: (MB) Work item 7494 - PHPExcel_Reader_Excel2007 setReadDataOnly(true) returns Rich-Text -- Bugfix: (ET) Work item 7496 - PHPExcel_Reader_Excel5 setReadDataOnly(true) returns Rich-Text -- Bugfix: (MB) Work item 7497 - Characters before superscript or subscript losing style -- Bugfix: (MB) Work item 7507 - Subscript not working with HTML writer -- Bugfix: (MB) Work item 7508 - DefaultColumnDimension not working on first column (A) -- Bugfix: (MB) Work item 7527 - Negative numbers are stored as text in PHPExcel_Writer_2007 -- Bugfix: (ET) Work item 7531 - Text rotation and stacked text not working with PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 7536 - PHPExcel_Shared_Date::isDateTimeFormatCode erroneously says true -- Bugfix: (MB) Work item 7559 - Different images with same filename in separate directories become duplicates -- Bugfix: (ET) Work item 7568 - PHPExcel_Reader_Excel5 not returning sheet names as UTF-8 using for Excel 95 files -- Bugfix: (MB) Work item 7575 - setAutoSize(true) on empty column gives column width of 10 using PHPExcel_Writer_Excel2007 -- Bugfix: (MB, ET) Work item 7573 - setAutoSize(true) on empty column gives column width of 255 using PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 7514 - Worksheet_Drawing bug -- Bugfix: (MB) Work item 7593 - getCalculatedValue() with REPT function causes script to stop -- Bugfix: (MB) Work item 7594 - getCalculatedValue() with LEN function causes script to stop -- Bugfix: (MB) Work item 7600 - Explicit fit-to-width (page setup) results in fit-to-height becoming 1 -- Bugfix: (MB) Work item 7610 - Fit-to-width value of 1 is lost after read/write of Excel2007 spreadsheet -- Bugfix: (MB) Work item 7516 - Conditional styles not read properly using PHPExcel_Reader_Excel2007 -- Bugfix: (MB) Work item 7611 - PHPExcel_Writer_2007: Default worksheet style works only for first sheet -- Bugfix: (ET) Work item 6940 - Cannot Lock Cells using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7621 - Incorrect cell protection values found when using Excel5 reader -- Bugfix: (ET) Work item 7623 - Default row height not working above highest row using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7637 - Default column width does not get applied when using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7642 - Broken support for UTF-8 string formula results in PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 7643 - UTF-8 sheet names not working with PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 7631 - getCalculatedValue() with ISNONTEXT function causes script to stop -- Bugfix: (ET) Work item 7652 - Missing BIFF3 functions in PHPExcel_Writer_Excel5: USDOLLAR (YEN), FINDB, SEARCHB, REPLACEB, LEFTB, RIGHTB, MIDB, LENB, ASC, DBCS (JIS) -- Bugfix: (ET) Work item 7663 - Excel5 reader doesn't read numbers correctly in 64-bit systems -- Bugfix: (ET) Work item 7667 - Missing BIFF5 functions in PHPExcel_Writer_Excel5: ISPMT, DATEDIF, DATESTRING, NUMBERSTRING -- Bugfix: (ET) Work item 7668 - Missing BIFF8 functions in PHPExcel_Writer_Excel5: GETPIVOTDATA, HYPERLINK, PHONETIC, AVERAGEA, MAXA, MINA, STDEVPA, VARPA, STDEVA, VARA -- Bugfix: (MB) Work item 7657 - Wrong host value in PHPExcel_Shared_ZipStreamWrapper::stream_open() -- Bugfix: (ET) Work item 7676 - PHPExcel_Reader_Excel5 not reading explicitly entered error types in cells -- Bugfix: (ET) Work item 7678 - Boolean and error data types not preserved for formula results in PHPExcel_Reader_Excel5 -- Bugfix: (MB) Work item 7695 - PHPExcel_Reader_Excel2007 ignores cell data type -- Bugfix: (ET) Work item 7712 - PHPExcel_Reader_Excel5 ignores cell data type -- Bugfix: (ET) Work item 7587 - PHPExcel_Writer_Excel5 not aware of data type -- Bugfix: (ET) Work item 7713 - Long strings sometimes truncated when using PHPExcel_Reader_Excel5 -- Bugfix: (ET) Work item 7727 - Direct entry of boolean or error type in cell not supported by PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 7714 - PHPExcel_Reader_Excel2007: Error reading cell with data type string, date number format, and numeric-like cell value -- Bugfix: (ET) Work item 7735 - Row and column outlines (group indent level) not showing after using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7737 - Missing UTF-8 support in number format codes for PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7750 - Missing UTF-8 support with PHPExcel_Writer_Excel5 for explicit string in formula -- Bugfix: (MB) Work item 7726 - Problem with class constants in PHPExcel_Style_NumberFormat -- Bugfix: (ET) Work item 7758 - Sometimes errors with PHPExcel_Reader_Excel5 reading hyperlinks -- Bugfix: (ET) Work item 7759 - Hyperlink in cell always results in string data type when using PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7771 - Excel file with blank sheet seen as broken in MS Office Excel 2007 when created by PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7785 - PHPExcel_Reader_Excel5: Incorrect reading of formula with explicit string containing (escaped) double-quote -- Bugfix: (MB) Work item 7787 - getCalculatedValue() fails on formula with sheet name containing (escaped) single-quote -- Bugfix: (MB) Work item 7786 - getCalculatedValue() fails on formula with explicit string containing (escaped) double-quote -- Bugfix: (MB) Work item 7780 - Problems with simultaneous repeatRowsAtTop and repeatColumnsAtLeft using Excel2007 reader and writer -- Bugfix: (ET) Work item 7802 - PHPExcel_Reader_Excel5: Error reading formulas with sheet reference containing special characters -- Bugfix: (ET) Work item 7831 - Off-sheet references sheet!A1 not working with PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7834 - Repeating rows/columns (print titles), print area not working with PHPExcel_Writer_Excel5 -- Bugfix: (ET) Work item 7849 - Formula having datetime number format shows as text when using PHPExcel_Writer_Excel5 -- Bugfix: (MBaker) Work item 7863 - Cannot set formula to hidden using applyFromArray() -- Bugfix: (MBaker) Work item 7805 - HTML/PDF Writers limited to 26 columns by calculateWorksheetDimension (erroneous comparison in getHighestColumn() method) -- Bugfix: (MB) Work item 7873 - Formula returning error type is lost when read by PHPExcel_Reader_Excel2007 -- Bugfix: (ET) Work item 7883 - PHPExcel_Reader_Excel5: Cell style lost for last column in group of blank cells -- Bugfix: (MB) Work item 7886 - Column width sometimes collapses to auto size using Excel2007 reader/writer -- Bugfix: (MB) Work item 9343 - Data Validation Formula = 0 crashes Excel - - -2008/08/25 (v1.6.3): -- Bugfix: (MBaker) Work item 7367 - Modified PHPExcel_Shared_Date::PHPToExcel() to force UTC -- General: (MB) Applied patch 1629 -- General: (MB) Applied patch 1644 -- General: (MB) Work item 6485 - Implement repeatRow and repeatColumn in Excel5 writer -- General: (MB) Work item 6838 - Remove scene3d filter in Excel2007 drawing -- Feature: (MBaker) Work item 2346 - Implement CHOOSE and INDEX Lookup/Reference Functions -- Feature: (MBaker) Work item 2346 - Implement CLEAN Text Functions -- Feature: (MBaker) Work item 2346 - Implement YEARFRAC Date/Time Functions -- Feature: (MB) Work item 6508 - Implement 2 options for print/show gridlines -- Feature: (MB) Work item 7270 - Add VLOOKUP function (contribution) -- Feature: (MB) Work item 7182 - Implemented: ShrinkToFit -- Feature: (MB) Work item 7218 - Row heights not updated correctly when inserting new rows -- Feature: (MB) Work item 7157 - Copy worksheets within the same workbook -- Feature: (ET) Work item 7290 - Excel5 reader style support: horizontal and vertical alignment plus text wrap -- Feature: (ET) Work item 7294 - Excel5 reader support for merged cells -- Feature: (ET) Work item 7296 - Excel5 reader: Sheet Protection -- Feature: (ET) Work item 7297 - Excel5 reader: Password for sheet protection -- Feature: (ET) Work item 7299 - Excel5 reader: Column width -- Feature: (ET) Work item 7301 - Excel5 reader: Row height -- Feature: (ET) Work item 7304 - Excel5 reader: Font support -- Feature: (ET) Work item 7324 - Excel5 reader: support for locked cells -- Feature: (ET) Work item 7330 - Excel5 reader style support: Fill (background colors and patterns) -- Feature: (ET) Work item 7332 - Excel5 reader style support: Borders (style and color) -- Feature: (ET) Work item 7346 - Excel5 reader: Rich-Text support -- Feature: (MB) Work item 7313 - Read Excel built-in number formats with Excel 2007 reader -- Feature: (ET) Work item 7317 - Excel5 reader: Number format support -- Feature: (MB) Work item 7362 - Creating a copy of PHPExcel object -- Feature: (ET) Work item 7373 - Excel5 reader: support for row / column outline (group) -- Feature: (MB) Work item 7380 - Implement default row/column sizes -- Feature: (MB) Work item 7364 - Writer HTML - option to return styles and table separately -- Feature: (ET) Work item 7393 - Excel5 reader: Support for remaining built-in number formats -- Bugfix: (MBaker) Fixed rounding in HOUR MINUTE and SECOND Time functions, and improved performance for these -- Bugfix: (MBaker) Fix to TRIM function -- Bugfix: (MBaker) Fixed range validation in TIME Functions.php -- Bugfix: (MBaker) EDATE and EOMONTH functions now return date values based on the returnDateType flag -- Bugfix: (MBaker) Write date values that are the result of a calculation function correctly as Excel serialized dates rather than PHP serialized date values -- Bugfix: (MB) Work item 6690 - Excel2007 reader not always reading boolean correctly -- Bugfix: (MB) Work item 6275 - Columns above IZ -- Bugfix: (MB) Work item 6853 - Other locale than English causes Excel2007 writer to produce broken xlsx -- Bugfix: (MB) Work item 7061 - Typo: Number_fromat in NumberFormat.php -- Bugfix: (MB) Work item 6865 - Bug in Worksheet_BaseDrawing setWidth() -- Bugfix: (MB) Work item 6891 - PDF writer collapses column width for merged cells -- Bugfix: (MB) Work item 6867 - Issues with drawings filenames -- Bugfix: (MB) Work item 7073 - fromArray() local variable isn't defined -- Bugfix: (MB) Work item 7276 - PHPExcel_Writer_Excel5->setTempDir() not passed to all classes involved in writing to a file -- Bugfix: (MB) Work item 7277 - Excel5 reader not handling UTF-8 properly -- Bugfix: (MB) Work item 7327 - If you write a 0 value in cell, cell shows as empty -- Bugfix: (MB) Work item 7302 - Excel2007 writer: Row height ignored for empty rows -- Bugfix: (MB) Work item 7281 - Excel2007 (comments related error) -- Bugfix: (MB) Work item 7345 - Column width in other locale -- Bugfix: (MB) Work item 7347 - Excel2007 reader not reading underlined Rich-Text -- Bugfix: (ET) Work item 7357 - Excel5 reader converting booleans to strings -- Bugfix: (MB) Work item 7365 - Recursive Object Memory Leak -- Bugfix: (MB) Work item 7372 - Excel2007 writer ignoring row dimensions without cells -- Bugfix: (ET) Work item 7382 - Excel5 reader is converting formatted numbers / dates to strings - - -2008/06/23 (v1.6.2): -- General: (MB) Work item 6088 - Document style array values -- General: (MB) Applied patch 1195 -- General: (MB) Work item 6178 - Redirecting output to a client’s web browser - http headers -- General: (MB) Work item 6187 - Improve worksheet garbage collection -- General: (MBaker) Functions that return date values can now be configured to return as Excel serialized date/time, PHP serialized date/time, or a PHP date/time object. -- General: (MBaker) Functions that explicitly accept dates as parameters now permit values as Excel serialized date/time, PHP serialized date/time, a valid date string, or a PHP date/time object. -- General: (MBaker) Implement ACOSH, ASINH and ATANH functions for those operating platforms/PHP versions that don't include these functions -- General: (MBaker) Implement ATAN2 logic reversing the arguments as per Excel -- General: (MBaker) Additional validation of parameters for COMBIN -- General: (MBaker) Fixed validation for CEILING and FLOOR when the value and significance parameters have different signs; and allowed default value of 1 or -1 for significance when in GNUMERIC compatibility mode -- Feature: (MBaker) Work item 2346 - Implement ADDRESS, ISLOGICAL, ISTEXT and ISNONTEXT functions -- Feature: (MBaker) Work item 2346 - Implement COMPLEX, IMAGINARY, IMREAL, IMARGUMENT, IMCONJUGATE, IMABS, IMSUB, IMDIV, IMSUM, IMPRODUCT, IMSQRT, IMEXP, IMLN, IMLOG10, IMLOG2, IMPOWER IMCOS and IMSIN Engineering functions -- Feature: (MBaker) Work item 2346 - Implement NETWORKDAYS and WORKDAY Date/Time functions -- Feature: (MB) Work item 6100 - Make cell column AAA available -- Feature: (MB) Work item 6095 - Mark particular cell as selected when opening Excel -- Feature: (MB) Work item 6120 - Multiple sheets in PDF and HTML -- Feature: (MB) Work item 6227 - Implement PHPExcel_ReaderFactory and PHPExcel_WriterFactory -- Feature: (MB) Work item 6249 - Set image root of PHPExcel_Writer_HTML -- Feature: (MB) Work item 6264 - Enable/disable calculation cache -- Feature: (MB) Work item 6259 - PDF writer and multi-line text -- Feature: (MB) Work item 6350 - Feature request - setCacheExpirationTime() -- Feature: (JB) Work item 6370 - Implement late-binding mechanisms to reduce memory footprint -- Feature: (JB) Work item 6430 - Implement shared styles -- Feature: (MB) Work item 6391 - Copy sheet from external Workbook to active Workbook -- Feature: (MB) Work item 6428 - Functions in Conditional Formatting -- Bugfix: (MB) Work item 6096 - Default Style in Excel5 -- Bugfix: (MB) Work item 6150 - Numbers starting with '+' cause Excel 2007 errors -- Bugfix: (MB) Work item 6092 - ExcelWriter5 is not PHP5 compatible, using it with E_STRICT results in a bunch of errors (applied patches) -- Bugfix: (MB) Work item 6179 - Error Reader Excel2007 line 653 foreach ($relsDrawing->Relationship as $ele) -- Bugfix: (MB) Work item 6229 - Worksheet toArray() screws up DATE -- Bugfix: (MB) Work item 6253 - References to a Richtext cell in a formula -- Bugfix: (MB) Work item 6285 - insertNewColumnBefore Bug -- Bugfix: (MB) Work item 6319 - Error reading Excel2007 file with shapes -- Bugfix: (MBaker) Work item 6302 - Determine whether date values need conversion from PHP dates to Excel dates before writing to file, based on the data type (float or integer) -- Bugfix: (MBaker) Fixes to DATE function when it is given negative input parameters -- Bugfix: (MB) Work item 6347 - PHPExcel handles empty cells other than Excel -- Bugfix: (MB) Work item 6348 - PHPExcel handles 0 and "" as being the same -- Bugfix: (MB) Work item 6357 - Problem Using Excel2007 Reader for Spreadsheets containing images -- Bugfix: (MB) Work item 6359 - ShowGridLines ignored when reading/writing Excel 2007 -- Bugfix: (MB) Work item 6426 - Bug With Word Wrap in Excel 2007 Reader - - -2008/04/28 (v1.6.1): -- General: (MB) Work item 5532 - Fix documentation printing -- General: (MB) Work item 5586 - Memory usage improvements -- General: (MB) Applied patch 990 -- General: (MB) Applied patch 991 -- Feature: (BM) Work item 2841 - Implement PHPExcel_Reader_Excel5 -- Feature: (MB) Work item 5564 - Implement "toArray" and "fromArray" method -- Feature: (MB) Work item 5665 - Read shared formula -- Feature: (MB) Work item 5681 - Read image twoCellAnchor -- Feature: (MB) Work item 4446 - &G Image as bg for headerfooter -- Feature: (MB) Work item 5834 - Implement page layout functionality for Excel5 format -- Feature: (MB) Work item 6039 - Feature request: PHPExcel_Writer_PDF -- Bugfix: (MB) Work item 5517 - DefinedNames null check -- Bugfix: (MB) Work item 5463 - Hyperlinks should not always have trailing slash -- Bugfix: (MB) Work item 5592 - Saving Error - Uncaught exception (#REF! named range) -- Bugfix: (MB) Work item 5634 - Error when creating Zip file on Linux System (Not Windows) -- Bugfix: (MB) Work item 5876 - Time incorrecly formated -- Bugfix: (MB) Work item 5914 - Conditional formatting - second rule not applied -- Bugfix: (MB) Work item 5978 - PHPExcel_Reader_Excel2007 cannot load PHPExcel_Shared_File -- Bugfix: (MB) Work item 6020 - Output redirection to web browser - - -2008/02/14 (v1.6.0): -- General: (MB) Work item 3156 - Use PHPExcel datatypes in formula calculation -- Feature: (MB) Work item 5019 - Center on page when printing -- Feature: (MB) Work item 5099 - Hyperlink to other spreadsheet -- Feature: (MB) Work item 5104 - Set the print area of a worksheet -- Feature: (MB) Work item 5118 - Read "definedNames" property of worksheet -- Feature: (MB) Work item 5338 - Set default style for all cells -- Feature: (MB) Work item 4216 - Named Ranges -- Feature: (MB) Work item 5398 - Implement worksheet references (Sheet1!A1) -- Bugfix: (MB) Work item 4967 - Redirect output to a client's web browser -- Bugfix: (MB) Work item 5008 - "File Error: data may have been lost." seen in Excel 2007 and Excel 2003 SP3 when opening XLS file -- Bugfix: (MB) Work item 5165 - Bug in style's getHashCode() -- Bugfix: (MB) Work item 5165 - PHPExcel_Reader not correctly reading numeric values -- Bugfix: (MB) Work item 5324 - Text rotation is read incorrectly -- Bugfix: (MB) Work item 5326 - Enclosure " and data " result a bad data : \" instead of "" -- Bugfix: (MB) Work item 5332 - Formula parser - IF statement returning array instead of scalar -- Bugfix: (MB) Work item 5351 - setFitToWidth(nbpage) & setFitToWidth(nbpage) work partially -- Bugfix: (MB) Work item 5361 - Worksheet::setTitle() causes unwanted renaming -- Bugfix: (MB) Work item 5407 - Hyperlinks not working. Results in broken xlsx file. - - -2007/12/24 (v1.5.5): -- General: (MB) Work item 4135 - Grouping Rows -- General: (MB) Work item 4427 - Semi-nightly builds -- Feature: (MB) Work item 3155 - Implement "date" datatype -- Feature: (MB) Work item 4150 - Date format not honored in CSV writer -- Feature: (MB) Work item 4199 - RichText and sharedStrings -- Feature: (MB) Work item 2346 - Implement more Excel calculation functions - - Addition of DATE, DATEDIF, DATEVALUE, DAY, DAYS360 -- Feature: (MBaker) Work item 2346 - Implement more Excel calculation functions - - Addition of AVEDEV, HARMEAN and GEOMEAN - - Addition of the BINOMDIST (Non-cumulative only), COUNTBLANK, EXPONDIST, FISHER, FISHERINV, NORMDIST, NORMSDIST, PERMUT, POISSON (Non-cumulative only) and STANDARDIZE Statistical Functions - - Addition of the CEILING, COMBIN, EVEN, FACT, FACTDOUBLE, FLOOR, MULTINOMIAL, ODD, ROUNDDOWN, ROUNDUP, SIGN, SQRTPI and SUMSQ Mathematical Functions - - Addition of the NORMINV, NORMSINV, CONFIDENCE and SKEW Statistical Functions - - Addition of the CRITBINOM, HYPGEOMDIST, KURT, LOGINV, LOGNORMDIST, NEGBINOMDIST and WEIBULL Statistical Functions - - Addition of the LARGE, PERCENTILE, QUARTILE, SMALL and TRIMMEAN Statistical Functions - - Addition of the BIN2HEX, BIN2OCT, DELTA, ERF, ERFC, GESTEP, HEX2BIN, HEX2DEC, HEX2OCT, OCT2BIN and OCT2HEX Engineering Functions - - Addition of the CHIDIST, GAMMADIST and GAMMALN Statistical Functions - - Addition of the GCD, LCM, MROUND and SUBTOTAL Mathematical Functions - - Addition of the LOWER, PROPER and UPPER Text Functions - - Addition of the BETADIST and BETAINV Statistical Functions - - Addition of the CHIINV and GAMMAINV Statistical Functions - - Addition of the SERIESSUM Mathematical Function - - Addition of the CHAR, CODE, FIND, LEN, REPT, SEARCH, T, TRIM Text Functions - - Addition of the FALSE and TRUE Boolean Functions - - Addition of the TDIST and TINV Statistical Functions - - Addition of the EDATE, EOMONTH, YEAR, MONTH, TIME, TIMEVALUE, HOUR, MINUTE, SECOND, WEEKDAY, WEEKNUM, NOW, TODAY and Date/Time Function - - Addition of the BESSELI, BESSELJ, BESSELK and BESSELY Engineering Functions - - Addition of the SLN and SYD Financial Functions - - reworked MODE calculation to handle floating point numbers - - Improved error trapping for invalid input values - - Fix to SMALL, LARGE, PERCENTILE and TRIMMEAN to eliminate non-numeric values - - Added CDF to BINOMDIST and POISSON - - Fix to a potential endless loop in CRITBINOM, together with other bugfixes to the algorithm - - Fix to SQRTPI so that it will work with a real value parameter rather than just integers - - Trap for passing negative values to FACT - - Improved accuracy of the NORMDIST cumulative function, and of the ERF and ERFC functions - - Replicated Excel data-type and error handling for BIN, DEC, OCT and HEX conversion functions - - Replicated Excel data-type and error handling for AND and OR Boolean functions - - Bugfix to MROUND - - Rework of the DATE, DATEVALUE, DAY, DAYS360 and DATEDIF date/Time functions to use Excel dates rather than straight PHP dates - - Rework of the AND, OR Boolean functions to ignore string values - - Rework of the BIN2DEC, BIN2HEX, BIN2OCT, DEC2BIN, DEC2HEX, DEC2OCT Engineering functions to handle two's complement - - Excel, Gnumeric and OpenOffice Calc compatibility flag for functions - Note, not all functions have yet been written to work with the Gnumeric and OpenOffice Calc compatibility flags - - 1900 or 1904 Calendar flag for date functions - - Reworked ExcelToPHP date method to handle the Excel 1900 leap year - Note that this will not correctly return values prior to 13-Dec-1901 20:45:52 as this is the minimum value that PHP date serial values can handle. If you need to work with dates prior to this, then an ExcelToPHPObject method has been added which will work correctly with values between Excel's 1900 calendar base date of 1-Jan-1900, and 13-Dec-1901 - - Addition of ExcelToPHPObject date method to return a PHP DateTime object from an Excel date serial value - - PHPToExcel method modified to accept either PHP date serial numbers or PHP DateTime objects - - Addition of FormattedPHPToExcel which will accept a date and time broken to into year, month, day, hour, minute, second and return an Excel date serial value -- Feature: (MB) Work item 4485 - Control characters in Excel 2007 -- Feature: (MB) Work item 4796 - BaseDrawing::setWidthAndHeight method request -- Feature: (MB) Work item 4798 - Page Setup -> Print Titles -> Sheet -> 'Rows to repeat at top' -- Feature: (MB) Work item 4433 - Comment functionality -- Bugfix: (MB) Work item 4124 - Undefined variable in PHPExcel_Writer_Serialized -- Bugfix: (MB) Work item 4125 - Notice: Object of class PHPExcel_RichText could not be converted to int -- Bugfix: (MB) Work item 4126 - Excel5Writer: utf8 string not converted to utf16 -- Bugfix: (MB) Work item 4180 - PHPExcel_RichText and autosize -- Bugfix: (MB) Work item 4574 - Excel5Writer produces broken xls files after change mentioned in work item 4126 -- Bugfix: (MB) Work item 4797 - Small bug in PHPExcel_Reader_Excel2007 function _readStyle - - -2007/10/23 (v 1.5.0): -- General: (MB) Work item 3265 - Refactor PHPExcel Drawing -- Feature: (CS) Work item 3079 - Update Shared/OLE.php to latest version from PEAR -- Feature: (MB) Work item 3217 - Excel2007 vs Excel2003 compatibility pack -- Feature: (MB) Work item 3234 - Cell protection (lock/unlock) -- Feature: (MB) Work item 3543 - Create clickable links (hyperlinks) -- Feature: (MB) Work item 3241 - Additional page setup parameters -- Feature: (MB) Work item 3300 - Make temporary file path configurable (Excel5) -- Feature: (MB) Work item 3306 - Small addition to applyFromArray for font -- Feature: (MB) Work item 3373 - Better feedback when save of file is not possible -- Bugfix: (MB) Work item 3181 - Text Rotation -- Bugfix: (MB) Work item 3237 - Small bug in Page Orientation -- Bugfix: (MB) Work item 3812 - insertNewColumnBeforeByColumn undefined -- Bugfix: (MB) Work item 3893 - Sheet references not working in formula (Excel5 Writer) - - -2007/08/23 (v 1.4.5): -- General: (MB) Work item 3003 - Class file endings -- General: (MB) Work item 3081 - Different calculation engine improvements -- General: (MB) Work item 3082 - Different improvements in PHPExcel_Reader_Excel2007 -- General: (MB) Work item 3146 - Set XML indentation in PHPExcel_Writer_Excel2007 -- Feature: (MB) Work item 3159 - Optionally store temporary Excel2007 writer data in file instead of memory -- Feature: (MB) Work item 3063 - Implement show/hide gridlines -- Feature: (MB) Work item 3064 - Implement option to read only data -- Feature: (MB) Work item 3080 - Optionally disable formula precalculation -- Feature: (MB) Work item 3154 - Explicitly set cell datatype -- Feature: (MBaker) Work item 2346 - Implement more Excel calculation functions - - Addition of MINA, MAXA, COUNTA, AVERAGEA, MEDIAN, MODE, DEVSQ, STDEV, STDEVA, STDEVP, STDEVPA, VAR, VARA, VARP and VARPA Excel Functions - - Fix to SUM, PRODUCT, QUOTIENT, MIN, MAX, COUNT and AVERAGE functions when cell contains a numeric value in a string datatype, bringing it in line with MS Excel behaviour -- Bugfix: (MB) Work item 2881 - File_exists on ZIP fails on some installations -- Bugfix: (MB) Work item 2879 - Argument in textRotation should be -90..90 -- Bugfix: (MB) Work item 2883 - Excel2007 reader/writer not implementing OpenXML/SpreadsheetML styles 100% correct -- Bugfix: (MB) Work item 2513 - Active sheet index not read/saved -- Bugfix: (MB) Work item 2935 - Print and print preview of generated XLSX causes Excel2007 to crash -- Bugfix: (MB) Work item 2952 - Error in Calculations - COUNT() function -- Bugfix: (MB) Work item 3002 - HTML and CSV writer not writing last row -- Bugfix: (MB) Work item 3017 - Memory leak in Excel5 writer -- Bugfix: (MB) Work item 3044 - Printing (PHPExcel_Writer_Excel5) -- Bugfix: (MB) Work item 3046 - Problems reading zip:// -- Bugfix: (MB) Work item 3047 - Error reading conditional formatting -- Bugfix: (MB) Work item 3067 - Bug in Excel5 writer (storePanes) -- Bugfix: (MB) Work item 3077 - Memory leak in PHPExcel_Style_Color - - -2007/07/23 (v 1.4.0): -- General: (MB) Work item 2687 - Coding convention / code cleanup -- General: (MB) Work item 2717 - Use set_include_path in tests -- General: (MB) Work item 2812 - Move PHPExcel_Writer_Excel5 OLE to PHPExcel_Shared_OLE -- Feature: (MB) Work item 2679 - Hide/Unhide Column or Row -- Feature: (MB) Work item 2271 - Implement multi-cell styling -- Feature: (MB) Work item 2720 - Implement CSV file format (reader/writer) -- Feature: (MB) Work item 2845 - Implement HTML file format -- Bugfix: (MB) Work item 2513 - Active sheet index not read/saved -- Bugfix: (MB) Work item 2678 - Freeze Panes with PHPExcel_Writer_Excel5 -- Bugfix: (MB) Work item 2680 - OLE.php -- Bugfix: (MB) Work item 2736 - Copy and pasting multiple drop-down list cells breaks reader -- Bugfix: (MB) Work item 2775 - Function setAutoFilterByColumnAndRow takes wrong arguments -- Bugfix: (MB) Work item 2858 - Simplexml_load_file fails on ZipArchive - - -2007/06/27 (v 1.3.5): -- General: (MB) Work item 15 - Documentation -- Feature: (JV) PHPExcel_Writer_Excel5 -- Feature: (JV) PHPExcel_Reader_Excel2007: Image shadows -- Feature: (MB) Work item 2385 - Data validation -- Feature: (MB) Work item 187 - Implement richtext strings -- Bugfix: (MB) Work item 2443 - Empty relations when adding image to any sheet but the first one -- Bugfix: (MB) Work item 2536 - Excel2007 crashes on print preview - - -2007/06/05 (v 1.3.0): -- General: (MB) Work item 1942 - Create PEAR package -- General: (MB) Work item 2331 - Replace *->duplicate() by __clone() -- Feature: (JV) PHPExcel_Reader_Excel2007: Column auto-size, Protection, Merged cells, Wrap text, Page breaks, Auto filter, Images -- Feature: (MB) Work item 245 - Implement "freezing" panes -- Feature: (MB) Work item 2273 - Cell addressing alternative -- Feature: (MB) Work item 2270 - Implement cell word-wrap attribute -- Feature: (MB) Work item 2282 - Auto-size column -- Feature: (MB) Work item 241 - Implement formula calculation -- Feature: (MB) Work item 2375 - Insert/remove row/column -- Bugfix: (MB) Work item 1931 - PHPExcel_Worksheet::getCell() should not accept absolute coordinates -- Bugfix: (MB) Work item 2272 - Cell reference without row number -- Bugfix: (MB) Work item 2276 - Styles with same coordinate but different worksheet -- Bugfix: (MB) Work item 2290 - PHPExcel_Worksheet->getCellCollection() usort error -- Bugfix: (SS) Work item 2353 - Bug in PHPExcel_Cell::stringFromColumnIndex -- Bugfix: (JV) Work item 2353 - Reader: numFmts can be missing, use cellStyleXfs instead of cellXfs in styles - - -2007/04/26 (v 1.2.0): -- General: (MB) Stringtable attribute "count" not necessary, provides wrong info to Excel sometimes... -- General: (MB) Updated tests to address more document properties -- General: (MB) Some refactoring in PHPExcel_Writer_Excel2007_Workbook -- General: (MB) New package: PHPExcel_Shared -- General: (MB) Password hashing algorithm implemented in PHPExcel_Shared_PasswordHasher -- General: (MB) Moved pixel conversion functions to PHPExcel_Shared_Drawing -- General: (MB) Work item 244 - Switch over to LGPL license -- General: (MB) Work item 5 - Include PHPExcel version in file headers -- Feature: (MB) Work item 6 - Autofilter -- Feature: (MB) Work item 7 - Extra document property: keywords -- Feature: (MB) Work item 8 - Extra document property: category -- Feature: (MB) Work item 9 - Document security -- Feature: (MB) Work item 10 - PHPExcel_Writer_Serialized and PHPExcel_Reader_Serialized -- Feature: (MB) Work item 11 - Alternative syntax: Addressing a cell -- Feature: (MB) Work item 12 - Merge cells -- Feature: (MB) Work item 13 - Protect ranges of cells with a password -- Bugfix: (JV) Work item 14 - (style/fill/patternFill/fgColor or bgColor can be empty) - - -2007/03/26 (v 1.1.1): -- Bugfix: (MB) Work item 1250 - Syntax error in "Classes/PHPExcel/Writer/Excel2007.php" on line 243 -- General: (MB) Work item 1282 - Reader should check if file exists and throws an exception when it doesn't - - -2007/03/22 (v 1.1.0): -- Changed filenames of tests -- Bugfix: (MB) Work item 836 - Style information lost after passing trough Excel2007_Reader -- Bugfix: (MB) Work item 913 - Number of columns > AZ fails fixed in PHPExcel_Cell::columnIndexFromString -- General: (MB) Added a brief file with installation instructions -- Feature: (MB) Page breaks (horizontal and vertical) -- Feature: (MB) Image shadows - - - -2007/02/22 (v 1.0.0): -- Changelog now includes developer initials -- Bugfix: (JV) PHPExcel->removeSheetByIndex now re-orders sheets after deletion, so no array indexes are lost -- Bugfix: (JV) PHPExcel_Writer_Excel2007_Worksheet::_writeCols() used direct assignment to $pSheet->getColumnDimension('A')->Width instead of $pSheet->getColumnDimension('A')->setWidth() -- Bugfix: (JV) DocumentProperties used $this->LastModifiedBy instead of $this->_lastModifiedBy. -- Bugfix: (JV) Only first = should be removed when writing formula in PHPExcel_Writer_Excel2007_Worksheet. -- General: (JV) Consistency of method names to camelCase -- General: (JV) Updated tests to match consistency changes -- General: (JV) Detection of mime-types now with image_type_to_mime_type() -- General: (JV) Constants now hold string value used in Excel 2007 -- General: (MB) Fixed folder name case (WorkSheet -> Worksheet) -- Feature: (MB) PHPExcel classes (not the Writer classes) can be duplicated, using a duplicate() method. -- Feature: (MB) Cell styles can now be duplicated to a range of cells using PHPExcel_Worksheet->duplicateStyle() -- Feature: (MB) Conditional formatting -- Feature: (JV) Reader for Excel 2007 (not supporting full specification yet!) - - - -2007/01/31 (v 1.0.0 RC): -- Project name has been changed to PHPExcel -- Project homepage is now http://www.codeplex.com/PHPExcel -- Started versioning at number: PHPExcel 1.0.0 RC - - - -2007/01/22: -- Fixed some performance issues on large-scale worksheets (mainly loops vs. indexed arrays) -- Performance on creating StringTable has been increased -- Performance on writing Excel2007 worksheet has been increased - - - -2007/01/18: -- Images can now be rotated -- Fixed bug: When drawings have full path specified, no mime type can be deducted -- Fixed bug: Only one drawing can be added to a worksheet - - - -2007/01/12: -- Refactoring of some classes to use ArrayObject instead of array() -- Cell style now has support for number format (i.e. #,##0) -- Implemented embedding images - - - -2007/01/02: -- Cell style now has support for fills, including gradient fills -- Cell style now has support for fonts -- Cell style now has support for border colors -- Cell style now has support for font colors -- Cell style now has support for alignment - - - -2006/12/21: -- Support for cell style borders -- Support for cell styles -- Refactoring of Excel2007 Writer into multiple classes in package SpreadSheet_Writer_Excel2007 -- Refactoring of all classes, changed public members to public properties using getter/setter -- Worksheet names are now unique. On duplicate worksheet names, a number is appended. -- Worksheet now has parent SpreadSheet object -- Worksheet now has support for page header and footer -- Worksheet now has support for page margins -- Worksheet now has support for page setup (only Paper size and Orientation) -- Worksheet properties now accessible by using getProperties() -- Worksheet now has support for row and column dimensions (height / width) -- Exceptions thrown have a more clear description - - - -Initial version: -- Create a Spreadsheet object -- Add one or more Worksheet objects -- Add cells to Worksheet objects -- Export Spreadsheet object to Excel 2007 OpenXML format -- Each cell supports the following data formats: string, number, formula, boolean. \ No newline at end of file diff --git a/vendor/phpoffice/phpexcel/composer.json b/vendor/phpoffice/phpexcel/composer.json deleted file mode 100644 index 8aa4480..0000000 --- a/vendor/phpoffice/phpexcel/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "phpoffice/phpexcel", - "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", - "keywords": ["PHP","Excel","OpenXML","xlsx","xls","spreadsheet"], - "homepage": "https://github.com/PHPOffice/PHPExcel", - "type": "library", - "license": "LGPL-2.1", - "authors": [ - { - "name": "Maarten Balliauw", - "homepage": "http://blog.maartenballiauw.be" - }, - { - "name": "Mark Baker", - "homepage": "http://markbakeruk.net" - }, - { - "name": "Franck Lefevre", - "homepage": "http://rootslabs.net" - }, - { - "name": "Erik Tilt" - } - ], - "require": { - "php": "^5.2|^7.0", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*" - }, - "require-dev": { - "squizlabs/php_codesniffer": "2.*" - }, - "recommend": { - "ext-zip": "*", - "ext-gd": "*" - }, - "autoload": { - "psr-0": { - "PHPExcel": "Classes/" - } - } -} diff --git a/vendor/phpoffice/phpexcel/install.txt b/vendor/phpoffice/phpexcel/install.txt deleted file mode 100644 index 1a999d2..0000000 --- a/vendor/phpoffice/phpexcel/install.txt +++ /dev/null @@ -1,75 +0,0 @@ -************************************************************************************** -* PHPExcel -* -* Copyright (c) 2006 - 2011 PHPExcel -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU Lesser General Public -* License as published by the Free Software Foundation; either -* version 2.1 of the License, or (at your option) any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* Lesser General Public License for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -* -* @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) -* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL -* @version ##VERSION##, ##DATE## -************************************************************************************** - -Requirements ------------- - -The following requirements should be met prior to using PHPExcel: -* PHP version 5.2.0 or higher -* PHP extension php_zip enabled *) -* PHP extension php_xml enabled -* PHP extension php_gd2 enabled (if not compiled in) - -*) php_zip is only needed by PHPExcel_Reader_Excel2007, PHPExcel_Writer_Excel2007, - PHPExcel_Reader_OOCalc. In other words, if you need PHPExcel to handle .xlsx or .ods - files you will need the zip extension, but otherwise not. - - - -Installation instructions -------------------------- - -Installation is quite easy: copy the contents of the Classes folder to any location -in your application required. - -Example: - -If your web root folder is /var/www/ you may want to create a subfolder called -/var/www/Classes/ and copy the files into that folder so you end up with files: - -/var/www/Classes/PHPExcel.php -/var/www/Classes/PHPExcel/Calculation.php -/var/www/Classes/PHPExcel/Cell.php -... - - - -Getting started ---------------- - -A good way to get started is to run some of the tests included in the download. -Copy the "Examples" folder next to your "Classes" folder from above so you end up with: - -/var/www/Examples/01simple.php -/var/www/Examples/02types.php -... - -Start running the test by pointing your browser to the test scripts: - -http://example.com/Examples/01simple.php -http://example.com/Examples/02types.php -... - -Note: It may be necessary to modify the include/require statements at the beginning of -each of the test scripts if your "Classes" folder from above is named differently. diff --git a/vendor/phpoffice/phpexcel/license.md b/vendor/phpoffice/phpexcel/license.md deleted file mode 100644 index 57b74d4..0000000 --- a/vendor/phpoffice/phpexcel/license.md +++ /dev/null @@ -1,345 +0,0 @@ -GNU LESSER GENERAL PUBLIC LICENSE - - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - -NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - -END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/vendor/pimple/pimple/.github/workflows/tests.yml b/vendor/pimple/pimple/.github/workflows/tests.yml deleted file mode 100644 index 09b6760..0000000 --- a/vendor/pimple/pimple/.github/workflows/tests.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "Tests" - -on: - - pull_request - - push - -jobs: - test: - name: PHP ${{ matrix.php }} - ${{ matrix.dependencies }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - php: - - "7.2" - - "7.3" - - "7.4" - - "8.0" - - "8.1" - dependencies: - - "psr/container:^1.1" - - "psr/container:^2.0" - - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Setup PHP ${{ matrix.php }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - ini-values: display_errors=off, log_errors=on - extensions: :xdebug - env: - # https://github.com/shivammathur/setup-php/issues/407#issuecomment-773675741 - fail-fast: true - - - name: Validate composer.json - run: composer validate --strict --no-check-lock - - - name: Install dependencies +${{ matrix.dependencies }} - run: | - composer require --no-update ${{ matrix.dependencies }} - composer update --prefer-dist --no-progress - - - name: Run PHPUnit tests - run: vendor/bin/simple-phpunit --verbose diff --git a/vendor/pimple/pimple/.gitignore b/vendor/pimple/pimple/.gitignore deleted file mode 100644 index a5c7ed6..0000000 --- a/vendor/pimple/pimple/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -phpunit.xml -.phpunit.result.cache -composer.lock -/vendor/ diff --git a/vendor/pimple/pimple/.php_cs.dist b/vendor/pimple/pimple/.php_cs.dist deleted file mode 100644 index 2787bb4..0000000 --- a/vendor/pimple/pimple/.php_cs.dist +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -return PhpCsFixer\Config::create() - ->setRules([ - '@Symfony' => true, - '@Symfony:risky' => true, - '@PHPUnit75Migration:risky' => true, - 'php_unit_dedicate_assert' => true, - 'array_syntax' => ['syntax' => 'short'], - 'php_unit_fqcn_annotation' => true, - 'no_unreachable_default_argument_value' => false, - 'braces' => ['allow_single_line_closure' => true], - 'heredoc_to_nowdoc' => false, - 'ordered_imports' => true, - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], - 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'], - ]) - ->setRiskyAllowed(true) - ->setFinder(PhpCsFixer\Finder::create()->in(__DIR__.'/src')) -; diff --git a/vendor/pimple/pimple/CHANGELOG b/vendor/pimple/pimple/CHANGELOG deleted file mode 100644 index 08059e5..0000000 --- a/vendor/pimple/pimple/CHANGELOG +++ /dev/null @@ -1,72 +0,0 @@ -* 3.4.0 (2021-03-06) - - * Implement version 1.1 of PSR-11 - -* 3.3.1 (2020-11-24) - - * Add support for PHP 8 - -* 3.3.0 (2020-03-03) - - * Drop PHP extension - * Bump min PHP version to 7.2.5 - -* 3.2.3 (2018-01-21) - - * prefixed all function calls with \ for extra speed - -* 3.2.2 (2017-07-23) - - * reverted extending a protected closure throws an exception (deprecated it instead) - -* 3.2.1 (2017-07-17) - - * fixed PHP error - -* 3.2.0 (2017-07-17) - - * added a PSR-11 service locator - * added a PSR-11 wrapper - * added ServiceIterator - * fixed extending a protected closure (now throws InvalidServiceIdentifierException) - -* 3.1.0 (2017-07-03) - - * deprecated the C extension - * added support for PSR-11 exceptions - -* 3.0.2 (2015-09-11) - - * refactored the C extension - * minor non-significant changes - -* 3.0.1 (2015-07-30) - - * simplified some code - * fixed a segfault in the C extension - -* 3.0.0 (2014-07-24) - - * removed the Pimple class alias (use Pimple\Container instead) - -* 2.1.1 (2014-07-24) - - * fixed compiler warnings for the C extension - * fixed code when dealing with circular references - -* 2.1.0 (2014-06-24) - - * moved the Pimple to Pimple\Container (with a BC layer -- Pimple is now a - deprecated alias which will be removed in Pimple 3.0) - * added Pimple\ServiceProviderInterface (and Pimple::register()) - -* 2.0.0 (2014-02-10) - - * changed extend to automatically re-assign the extended service and keep it as shared or factory - (to keep BC, extend still returns the extended service) - * changed services to be shared by default (use factory() for factory - services) - -* 1.0.0 - - * initial version diff --git a/vendor/pimple/pimple/LICENSE b/vendor/pimple/pimple/LICENSE deleted file mode 100644 index 3e2a9e1..0000000 --- a/vendor/pimple/pimple/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2009-2020 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/pimple/pimple/README.rst b/vendor/pimple/pimple/README.rst deleted file mode 100644 index 7081839..0000000 --- a/vendor/pimple/pimple/README.rst +++ /dev/null @@ -1,332 +0,0 @@ -Pimple -====== - -.. caution:: - - Pimple is now closed for changes. No new features will be added and no - cosmetic changes will be accepted either. The only accepted changes are - compatibility with newer PHP versions and security issue fixes. - -.. caution:: - - This is the documentation for Pimple 3.x. If you are using Pimple 1.x, read - the `Pimple 1.x documentation`_. Reading the Pimple 1.x code is also a good - way to learn more about how to create a simple Dependency Injection - Container (recent versions of Pimple are more focused on performance). - -Pimple is a small Dependency Injection Container for PHP. - -Installation ------------- - -Before using Pimple in your project, add it to your ``composer.json`` file: - -.. code-block:: bash - - $ ./composer.phar require pimple/pimple "^3.0" - -Usage ------ - -Creating a container is a matter of creating a ``Container`` instance: - -.. code-block:: php - - use Pimple\Container; - - $container = new Container(); - -As many other dependency injection containers, Pimple manages two different -kind of data: **services** and **parameters**. - -Defining Services -~~~~~~~~~~~~~~~~~ - -A service is an object that does something as part of a larger system. Examples -of services: a database connection, a templating engine, or a mailer. Almost -any **global** object can be a service. - -Services are defined by **anonymous functions** that return an instance of an -object: - -.. code-block:: php - - // define some services - $container['session_storage'] = function ($c) { - return new SessionStorage('SESSION_ID'); - }; - - $container['session'] = function ($c) { - return new Session($c['session_storage']); - }; - -Notice that the anonymous function has access to the current container -instance, allowing references to other services or parameters. - -As objects are only created when you get them, the order of the definitions -does not matter. - -Using the defined services is also very easy: - -.. code-block:: php - - // get the session object - $session = $container['session']; - - // the above call is roughly equivalent to the following code: - // $storage = new SessionStorage('SESSION_ID'); - // $session = new Session($storage); - -Defining Factory Services -~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default, each time you get a service, Pimple returns the **same instance** -of it. If you want a different instance to be returned for all calls, wrap your -anonymous function with the ``factory()`` method - -.. code-block:: php - - $container['session'] = $container->factory(function ($c) { - return new Session($c['session_storage']); - }); - -Now, each call to ``$container['session']`` returns a new instance of the -session. - -Defining Parameters -~~~~~~~~~~~~~~~~~~~ - -Defining a parameter allows to ease the configuration of your container from -the outside and to store global values: - -.. code-block:: php - - // define some parameters - $container['cookie_name'] = 'SESSION_ID'; - $container['session_storage_class'] = 'SessionStorage'; - -If you change the ``session_storage`` service definition like below: - -.. code-block:: php - - $container['session_storage'] = function ($c) { - return new $c['session_storage_class']($c['cookie_name']); - }; - -You can now easily change the cookie name by overriding the -``cookie_name`` parameter instead of redefining the service -definition. - -Protecting Parameters -~~~~~~~~~~~~~~~~~~~~~ - -Because Pimple sees anonymous functions as service definitions, you need to -wrap anonymous functions with the ``protect()`` method to store them as -parameters: - -.. code-block:: php - - $container['random_func'] = $container->protect(function () { - return rand(); - }); - -Modifying Services after Definition -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In some cases you may want to modify a service definition after it has been -defined. You can use the ``extend()`` method to define additional code to be -run on your service just after it is created: - -.. code-block:: php - - $container['session_storage'] = function ($c) { - return new $c['session_storage_class']($c['cookie_name']); - }; - - $container->extend('session_storage', function ($storage, $c) { - $storage->...(); - - return $storage; - }); - -The first argument is the name of the service to extend, the second a function -that gets access to the object instance and the container. - -Extending a Container -~~~~~~~~~~~~~~~~~~~~~ - -If you use the same libraries over and over, you might want to reuse some -services from one project to the next one; package your services into a -**provider** by implementing ``Pimple\ServiceProviderInterface``: - -.. code-block:: php - - use Pimple\Container; - - class FooProvider implements Pimple\ServiceProviderInterface - { - public function register(Container $pimple) - { - // register some services and parameters - // on $pimple - } - } - -Then, register the provider on a Container: - -.. code-block:: php - - $pimple->register(new FooProvider()); - -Fetching the Service Creation Function -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you access an object, Pimple automatically calls the anonymous function -that you defined, which creates the service object for you. If you want to get -raw access to this function, you can use the ``raw()`` method: - -.. code-block:: php - - $container['session'] = function ($c) { - return new Session($c['session_storage']); - }; - - $sessionFunction = $container->raw('session'); - -PSR-11 compatibility --------------------- - -For historical reasons, the ``Container`` class does not implement the PSR-11 -``ContainerInterface``. However, Pimple provides a helper class that will let -you decouple your code from the Pimple container class. - -The PSR-11 container class -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``Pimple\Psr11\Container`` class lets you access the content of an -underlying Pimple container using ``Psr\Container\ContainerInterface`` -methods: - -.. code-block:: php - - use Pimple\Container; - use Pimple\Psr11\Container as PsrContainer; - - $container = new Container(); - $container['service'] = function ($c) { - return new Service(); - }; - $psr11 = new PsrContainer($container); - - $controller = function (PsrContainer $container) { - $service = $container->get('service'); - }; - $controller($psr11); - -Using the PSR-11 ServiceLocator -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Sometimes, a service needs access to several other services without being sure -that all of them will actually be used. In those cases, you may want the -instantiation of the services to be lazy. - -The traditional solution is to inject the entire service container to get only -the services really needed. However, this is not recommended because it gives -services a too broad access to the rest of the application and it hides their -actual dependencies. - -The ``ServiceLocator`` is intended to solve this problem by giving access to a -set of predefined services while instantiating them only when actually needed. - -It also allows you to make your services available under a different name than -the one used to register them. For instance, you may want to use an object -that expects an instance of ``EventDispatcherInterface`` to be available under -the name ``event_dispatcher`` while your event dispatcher has been -registered under the name ``dispatcher``: - -.. code-block:: php - - use Monolog\Logger; - use Pimple\Psr11\ServiceLocator; - use Psr\Container\ContainerInterface; - use Symfony\Component\EventDispatcher\EventDispatcher; - - class MyService - { - /** - * "logger" must be an instance of Psr\Log\LoggerInterface - * "event_dispatcher" must be an instance of Symfony\Component\EventDispatcher\EventDispatcherInterface - */ - private $services; - - public function __construct(ContainerInterface $services) - { - $this->services = $services; - } - } - - $container['logger'] = function ($c) { - return new Monolog\Logger(); - }; - $container['dispatcher'] = function () { - return new EventDispatcher(); - }; - - $container['service'] = function ($c) { - $locator = new ServiceLocator($c, array('logger', 'event_dispatcher' => 'dispatcher')); - - return new MyService($locator); - }; - -Referencing a Collection of Services Lazily -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Passing a collection of services instances in an array may prove inefficient -if the class that consumes the collection only needs to iterate over it at a -later stage, when one of its method is called. It can also lead to problems -if there is a circular dependency between one of the services stored in the -collection and the class that consumes it. - -The ``ServiceIterator`` class helps you solve these issues. It receives a -list of service names during instantiation and will retrieve the services -when iterated over: - -.. code-block:: php - - use Pimple\Container; - use Pimple\ServiceIterator; - - class AuthorizationService - { - private $voters; - - public function __construct($voters) - { - $this->voters = $voters; - } - - public function canAccess($resource) - { - foreach ($this->voters as $voter) { - if (true === $voter->canAccess($resource)) { - return true; - } - } - - return false; - } - } - - $container = new Container(); - - $container['voter1'] = function ($c) { - return new SomeVoter(); - } - $container['voter2'] = function ($c) { - return new SomeOtherVoter($c['auth']); - } - $container['auth'] = function ($c) { - return new AuthorizationService(new ServiceIterator($c, array('voter1', 'voter2')); - } - -.. _Pimple 1.x documentation: https://github.com/silexphp/Pimple/tree/1.1 diff --git a/vendor/pimple/pimple/composer.json b/vendor/pimple/pimple/composer.json deleted file mode 100644 index ca6a581..0000000 --- a/vendor/pimple/pimple/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "pimple/pimple", - "type": "library", - "description": "Pimple, a simple Dependency Injection Container", - "keywords": ["dependency injection", "container"], - "homepage": "https://pimple.symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1 || ^2.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^5.4@dev" - }, - "autoload": { - "psr-0": { "Pimple": "src/" } - }, - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev" - } - } -} diff --git a/vendor/pimple/pimple/phpunit.xml.dist b/vendor/pimple/pimple/phpunit.xml.dist deleted file mode 100644 index 8990202..0000000 --- a/vendor/pimple/pimple/phpunit.xml.dist +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd" - backupGlobals="false" - colors="true" - bootstrap="vendor/autoload.php" -> - <testsuites> - <testsuite name="Pimple Test Suite"> - <directory>./src/Pimple/Tests</directory> - </testsuite> - </testsuites> - - <listeners> - <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" /> - </listeners> -</phpunit> diff --git a/vendor/pimple/pimple/src/Pimple/Container.php b/vendor/pimple/pimple/src/Pimple/Container.php deleted file mode 100644 index 586a0b7..0000000 --- a/vendor/pimple/pimple/src/Pimple/Container.php +++ /dev/null @@ -1,305 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple; - -use Pimple\Exception\ExpectedInvokableException; -use Pimple\Exception\FrozenServiceException; -use Pimple\Exception\InvalidServiceIdentifierException; -use Pimple\Exception\UnknownIdentifierException; - -/** - * Container main class. - * - * @author Fabien Potencier - */ -class Container implements \ArrayAccess -{ - private $values = []; - private $factories; - private $protected; - private $frozen = []; - private $raw = []; - private $keys = []; - - /** - * Instantiates the container. - * - * Objects and parameters can be passed as argument to the constructor. - * - * @param array $values The parameters or objects - */ - public function __construct(array $values = []) - { - $this->factories = new \SplObjectStorage(); - $this->protected = new \SplObjectStorage(); - - foreach ($values as $key => $value) { - $this->offsetSet($key, $value); - } - } - - /** - * Sets a parameter or an object. - * - * Objects must be defined as Closures. - * - * Allowing any PHP callable leads to difficult to debug problems - * as function names (strings) are callable (creating a function with - * the same name as an existing parameter would break your container). - * - * @param string $id The unique identifier for the parameter or object - * @param mixed $value The value of the parameter or a closure to define an object - * - * @return void - * - * @throws FrozenServiceException Prevent override of a frozen service - */ - #[\ReturnTypeWillChange] - public function offsetSet($id, $value) - { - if (isset($this->frozen[$id])) { - throw new FrozenServiceException($id); - } - - $this->values[$id] = $value; - $this->keys[$id] = true; - } - - /** - * Gets a parameter or an object. - * - * @param string $id The unique identifier for the parameter or object - * - * @return mixed The value of the parameter or an object - * - * @throws UnknownIdentifierException If the identifier is not defined - */ - #[\ReturnTypeWillChange] - public function offsetGet($id) - { - if (!isset($this->keys[$id])) { - throw new UnknownIdentifierException($id); - } - - if ( - isset($this->raw[$id]) - || !\is_object($this->values[$id]) - || isset($this->protected[$this->values[$id]]) - || !\method_exists($this->values[$id], '__invoke') - ) { - return $this->values[$id]; - } - - if (isset($this->factories[$this->values[$id]])) { - return $this->values[$id]($this); - } - - $raw = $this->values[$id]; - $val = $this->values[$id] = $raw($this); - $this->raw[$id] = $raw; - - $this->frozen[$id] = true; - - return $val; - } - - /** - * Checks if a parameter or an object is set. - * - * @param string $id The unique identifier for the parameter or object - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($id) - { - return isset($this->keys[$id]); - } - - /** - * Unsets a parameter or an object. - * - * @param string $id The unique identifier for the parameter or object - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($id) - { - if (isset($this->keys[$id])) { - if (\is_object($this->values[$id])) { - unset($this->factories[$this->values[$id]], $this->protected[$this->values[$id]]); - } - - unset($this->values[$id], $this->frozen[$id], $this->raw[$id], $this->keys[$id]); - } - } - - /** - * Marks a callable as being a factory service. - * - * @param callable $callable A service definition to be used as a factory - * - * @return callable The passed callable - * - * @throws ExpectedInvokableException Service definition has to be a closure or an invokable object - */ - public function factory($callable) - { - if (!\is_object($callable) || !\method_exists($callable, '__invoke')) { - throw new ExpectedInvokableException('Service definition is not a Closure or invokable object.'); - } - - $this->factories->attach($callable); - - return $callable; - } - - /** - * Protects a callable from being interpreted as a service. - * - * This is useful when you want to store a callable as a parameter. - * - * @param callable $callable A callable to protect from being evaluated - * - * @return callable The passed callable - * - * @throws ExpectedInvokableException Service definition has to be a closure or an invokable object - */ - public function protect($callable) - { - if (!\is_object($callable) || !\method_exists($callable, '__invoke')) { - throw new ExpectedInvokableException('Callable is not a Closure or invokable object.'); - } - - $this->protected->attach($callable); - - return $callable; - } - - /** - * Gets a parameter or the closure defining an object. - * - * @param string $id The unique identifier for the parameter or object - * - * @return mixed The value of the parameter or the closure defining an object - * - * @throws UnknownIdentifierException If the identifier is not defined - */ - public function raw($id) - { - if (!isset($this->keys[$id])) { - throw new UnknownIdentifierException($id); - } - - if (isset($this->raw[$id])) { - return $this->raw[$id]; - } - - return $this->values[$id]; - } - - /** - * Extends an object definition. - * - * Useful when you want to extend an existing object definition, - * without necessarily loading that object. - * - * @param string $id The unique identifier for the object - * @param callable $callable A service definition to extend the original - * - * @return callable The wrapped callable - * - * @throws UnknownIdentifierException If the identifier is not defined - * @throws FrozenServiceException If the service is frozen - * @throws InvalidServiceIdentifierException If the identifier belongs to a parameter - * @throws ExpectedInvokableException If the extension callable is not a closure or an invokable object - */ - public function extend($id, $callable) - { - if (!isset($this->keys[$id])) { - throw new UnknownIdentifierException($id); - } - - if (isset($this->frozen[$id])) { - throw new FrozenServiceException($id); - } - - if (!\is_object($this->values[$id]) || !\method_exists($this->values[$id], '__invoke')) { - throw new InvalidServiceIdentifierException($id); - } - - if (isset($this->protected[$this->values[$id]])) { - @\trigger_error(\sprintf('How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "%s" should be protected?', $id), E_USER_DEPRECATED); - } - - if (!\is_object($callable) || !\method_exists($callable, '__invoke')) { - throw new ExpectedInvokableException('Extension service definition is not a Closure or invokable object.'); - } - - $factory = $this->values[$id]; - - $extended = function ($c) use ($callable, $factory) { - return $callable($factory($c), $c); - }; - - if (isset($this->factories[$factory])) { - $this->factories->detach($factory); - $this->factories->attach($extended); - } - - return $this[$id] = $extended; - } - - /** - * Returns all defined value names. - * - * @return array An array of value names - */ - public function keys() - { - return \array_keys($this->values); - } - - /** - * Registers a service provider. - * - * @param array $values An array of values that customizes the provider - * - * @return static - */ - public function register(ServiceProviderInterface $provider, array $values = []) - { - $provider->register($this); - - foreach ($values as $key => $value) { - $this[$key] = $value; - } - - return $this; - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php b/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php deleted file mode 100644 index 7228421..0000000 --- a/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Exception; - -use Psr\Container\ContainerExceptionInterface; - -/** - * A closure or invokable object was expected. - * - * @author Pascal Luna <skalpa@zetareticuli.org> - */ -class ExpectedInvokableException extends \InvalidArgumentException implements ContainerExceptionInterface -{ -} diff --git a/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php b/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php deleted file mode 100644 index e4d2f6d..0000000 --- a/vendor/pimple/pimple/src/Pimple/Exception/FrozenServiceException.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Exception; - -use Psr\Container\ContainerExceptionInterface; - -/** - * An attempt to modify a frozen service was made. - * - * @author Pascal Luna <skalpa@zetareticuli.org> - */ -class FrozenServiceException extends \RuntimeException implements ContainerExceptionInterface -{ - /** - * @param string $id Identifier of the frozen service - */ - public function __construct($id) - { - parent::__construct(\sprintf('Cannot override frozen service "%s".', $id)); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php b/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php deleted file mode 100644 index 91e82f9..0000000 --- a/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Exception; - -use Psr\Container\NotFoundExceptionInterface; - -/** - * An attempt to perform an operation that requires a service identifier was made. - * - * @author Pascal Luna <skalpa@zetareticuli.org> - */ -class InvalidServiceIdentifierException extends \InvalidArgumentException implements NotFoundExceptionInterface -{ - /** - * @param string $id The invalid identifier - */ - public function __construct($id) - { - parent::__construct(\sprintf('Identifier "%s" does not contain an object definition.', $id)); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php b/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php deleted file mode 100644 index fb6b626..0000000 --- a/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Exception; - -use Psr\Container\NotFoundExceptionInterface; - -/** - * The identifier of a valid service or parameter was expected. - * - * @author Pascal Luna <skalpa@zetareticuli.org> - */ -class UnknownIdentifierException extends \InvalidArgumentException implements NotFoundExceptionInterface -{ - /** - * @param string $id The unknown identifier - */ - public function __construct($id) - { - parent::__construct(\sprintf('Identifier "%s" is not defined.', $id)); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Psr11/Container.php b/vendor/pimple/pimple/src/Pimple/Psr11/Container.php deleted file mode 100644 index e18592e..0000000 --- a/vendor/pimple/pimple/src/Pimple/Psr11/Container.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009-2017 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Psr11; - -use Pimple\Container as PimpleContainer; -use Psr\Container\ContainerInterface; - -/** - * PSR-11 compliant wrapper. - * - * @author Pascal Luna <skalpa@zetareticuli.org> - */ -final class Container implements ContainerInterface -{ - private $pimple; - - public function __construct(PimpleContainer $pimple) - { - $this->pimple = $pimple; - } - - public function get(string $id) - { - return $this->pimple[$id]; - } - - public function has(string $id): bool - { - return isset($this->pimple[$id]); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php b/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php deleted file mode 100644 index 714b882..0000000 --- a/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Psr11; - -use Pimple\Container as PimpleContainer; -use Pimple\Exception\UnknownIdentifierException; -use Psr\Container\ContainerInterface; - -/** - * Pimple PSR-11 service locator. - * - * @author Pascal Luna <skalpa@zetareticuli.org> - */ -class ServiceLocator implements ContainerInterface -{ - private $container; - private $aliases = []; - - /** - * @param PimpleContainer $container The Container instance used to locate services - * @param array $ids Array of service ids that can be located. String keys can be used to define aliases - */ - public function __construct(PimpleContainer $container, array $ids) - { - $this->container = $container; - - foreach ($ids as $key => $id) { - $this->aliases[\is_int($key) ? $id : $key] = $id; - } - } - - /** - * {@inheritdoc} - */ - public function get(string $id) - { - if (!isset($this->aliases[$id])) { - throw new UnknownIdentifierException($id); - } - - return $this->container[$this->aliases[$id]]; - } - - /** - * {@inheritdoc} - */ - public function has(string $id): bool - { - return isset($this->aliases[$id]) && isset($this->container[$this->aliases[$id]]); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/ServiceIterator.php b/vendor/pimple/pimple/src/Pimple/ServiceIterator.php deleted file mode 100644 index ebafac1..0000000 --- a/vendor/pimple/pimple/src/Pimple/ServiceIterator.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple; - -/** - * Lazy service iterator. - * - * @author Pascal Luna <skalpa@zetareticuli.org> - */ -final class ServiceIterator implements \Iterator -{ - private $container; - private $ids; - - public function __construct(Container $container, array $ids) - { - $this->container = $container; - $this->ids = $ids; - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function rewind() - { - \reset($this->ids); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function current() - { - return $this->container[\current($this->ids)]; - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function key() - { - return \current($this->ids); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function next() - { - \next($this->ids); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function valid() - { - return null !== \key($this->ids); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/ServiceProviderInterface.php b/vendor/pimple/pimple/src/Pimple/ServiceProviderInterface.php deleted file mode 100644 index abf90d8..0000000 --- a/vendor/pimple/pimple/src/Pimple/ServiceProviderInterface.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple; - -/** - * Pimple service provider interface. - * - * @author Fabien Potencier - * @author Dominik Zogg - */ -interface ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - */ - public function register(Container $pimple); -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php b/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php deleted file mode 100644 index aba453b..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/Invokable.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests\Fixtures; - -class Invokable -{ - public function __invoke($value = null) - { - $service = new Service(); - $service->value = $value; - - return $service; - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php b/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php deleted file mode 100644 index 33cd4e5..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/NonInvokable.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests\Fixtures; - -class NonInvokable -{ - public function __call($a, $b) - { - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php b/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php deleted file mode 100644 index f6ca0a8..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests\Fixtures; - -use Pimple\Container; -use Pimple\ServiceProviderInterface; - -class PimpleServiceProvider implements ServiceProviderInterface -{ - /** - * Registers services on the given container. - * - * This method should only be used to configure services and parameters. - * It should not get services. - */ - public function register(Container $pimple) - { - $pimple['param'] = 'value'; - - $pimple['service'] = function () { - return new Service(); - }; - - $pimple['factory'] = $pimple->factory(function () { - return new Service(); - }); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php b/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php deleted file mode 100644 index d71b184..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/Service.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests\Fixtures; - -/** - * @author Igor Wiedler <igor@wiedler.ch> - */ -class Service -{ - public $value; -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php b/vendor/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php deleted file mode 100644 index 097a7fd..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/PimpleServiceProviderInterfaceTest.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests; - -use PHPUnit\Framework\TestCase; -use Pimple\Container; - -/** - * @author Dominik Zogg <dominik.zogg@gmail.com> - */ -class PimpleServiceProviderInterfaceTest extends TestCase -{ - public function testProvider() - { - $pimple = new Container(); - - $pimpleServiceProvider = new Fixtures\PimpleServiceProvider(); - $pimpleServiceProvider->register($pimple); - - $this->assertEquals('value', $pimple['param']); - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $pimple['service']); - - $serviceOne = $pimple['factory']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceOne); - - $serviceTwo = $pimple['factory']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceTwo); - - $this->assertNotSame($serviceOne, $serviceTwo); - } - - public function testProviderWithRegisterMethod() - { - $pimple = new Container(); - - $pimple->register(new Fixtures\PimpleServiceProvider(), [ - 'anotherParameter' => 'anotherValue', - ]); - - $this->assertEquals('value', $pimple['param']); - $this->assertEquals('anotherValue', $pimple['anotherParameter']); - - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $pimple['service']); - - $serviceOne = $pimple['factory']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceOne); - - $serviceTwo = $pimple['factory']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceTwo); - - $this->assertNotSame($serviceOne, $serviceTwo); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php b/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php deleted file mode 100644 index ffa50a6..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php +++ /dev/null @@ -1,610 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests; - -use PHPUnit\Framework\TestCase; -use Pimple\Container; - -/** - * @author Igor Wiedler <igor@wiedler.ch> - */ -class PimpleTest extends TestCase -{ - public function testWithString() - { - $pimple = new Container(); - $pimple['param'] = 'value'; - - $this->assertEquals('value', $pimple['param']); - } - - public function testWithClosure() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $pimple['service']); - } - - public function testServicesShouldBeDifferent() - { - $pimple = new Container(); - $pimple['service'] = $pimple->factory(function () { - return new Fixtures\Service(); - }); - - $serviceOne = $pimple['service']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceOne); - - $serviceTwo = $pimple['service']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceTwo); - - $this->assertNotSame($serviceOne, $serviceTwo); - } - - public function testShouldPassContainerAsParameter() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - $pimple['container'] = function ($container) { - return $container; - }; - - $this->assertNotSame($pimple, $pimple['service']); - $this->assertSame($pimple, $pimple['container']); - } - - public function testIsset() - { - $pimple = new Container(); - $pimple['param'] = 'value'; - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - - $pimple['null'] = null; - - $this->assertTrue(isset($pimple['param'])); - $this->assertTrue(isset($pimple['service'])); - $this->assertTrue(isset($pimple['null'])); - $this->assertFalse(isset($pimple['non_existent'])); - } - - public function testConstructorInjection() - { - $params = ['param' => 'value']; - $pimple = new Container($params); - - $this->assertSame($params['param'], $pimple['param']); - } - - public function testOffsetGetValidatesKeyIsPresent() - { - $this->expectException(\Pimple\Exception\UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - echo $pimple['foo']; - } - - /** - * @group legacy - */ - public function testLegacyOffsetGetValidatesKeyIsPresent() - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - echo $pimple['foo']; - } - - public function testOffsetGetHonorsNullValues() - { - $pimple = new Container(); - $pimple['foo'] = null; - $this->assertNull($pimple['foo']); - } - - public function testUnset() - { - $pimple = new Container(); - $pimple['param'] = 'value'; - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - - unset($pimple['param'], $pimple['service']); - $this->assertFalse(isset($pimple['param'])); - $this->assertFalse(isset($pimple['service'])); - } - - /** - * @dataProvider serviceDefinitionProvider - */ - public function testShare($service) - { - $pimple = new Container(); - $pimple['shared_service'] = $service; - - $serviceOne = $pimple['shared_service']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceOne); - - $serviceTwo = $pimple['shared_service']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceTwo); - - $this->assertSame($serviceOne, $serviceTwo); - } - - /** - * @dataProvider serviceDefinitionProvider - */ - public function testProtect($service) - { - $pimple = new Container(); - $pimple['protected'] = $pimple->protect($service); - - $this->assertSame($service, $pimple['protected']); - } - - public function testGlobalFunctionNameAsParameterValue() - { - $pimple = new Container(); - $pimple['global_function'] = 'strlen'; - $this->assertSame('strlen', $pimple['global_function']); - } - - public function testRaw() - { - $pimple = new Container(); - $pimple['service'] = $definition = $pimple->factory(function () { - return 'foo'; - }); - $this->assertSame($definition, $pimple->raw('service')); - } - - public function testRawHonorsNullValues() - { - $pimple = new Container(); - $pimple['foo'] = null; - $this->assertNull($pimple->raw('foo')); - } - - public function testFluentRegister() - { - $pimple = new Container(); - $this->assertSame($pimple, $pimple->register($this->getMockBuilder('Pimple\ServiceProviderInterface')->getMock())); - } - - public function testRawValidatesKeyIsPresent() - { - $this->expectException(\Pimple\Exception\UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple->raw('foo'); - } - - /** - * @group legacy - */ - public function testLegacyRawValidatesKeyIsPresent() - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple->raw('foo'); - } - - /** - * @dataProvider serviceDefinitionProvider - */ - public function testExtend($service) - { - $pimple = new Container(); - $pimple['shared_service'] = function () { - return new Fixtures\Service(); - }; - $pimple['factory_service'] = $pimple->factory(function () { - return new Fixtures\Service(); - }); - - $pimple->extend('shared_service', $service); - $serviceOne = $pimple['shared_service']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceOne); - $serviceTwo = $pimple['shared_service']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceTwo); - $this->assertSame($serviceOne, $serviceTwo); - $this->assertSame($serviceOne->value, $serviceTwo->value); - - $pimple->extend('factory_service', $service); - $serviceOne = $pimple['factory_service']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceOne); - $serviceTwo = $pimple['factory_service']; - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $serviceTwo); - $this->assertNotSame($serviceOne, $serviceTwo); - $this->assertNotSame($serviceOne->value, $serviceTwo->value); - } - - public function testExtendDoesNotLeakWithFactories() - { - if (\extension_loaded('pimple')) { - $this->markTestSkipped('Pimple extension does not support this test'); - } - $pimple = new Container(); - - $pimple['foo'] = $pimple->factory(function () { - return; - }); - $pimple['foo'] = $pimple->extend('foo', function ($foo, $pimple) { - return; - }); - unset($pimple['foo']); - - $p = new \ReflectionProperty($pimple, 'values'); - $p->setAccessible(true); - $this->assertEmpty($p->getValue($pimple)); - - $p = new \ReflectionProperty($pimple, 'factories'); - $p->setAccessible(true); - $this->assertCount(0, $p->getValue($pimple)); - } - - public function testExtendValidatesKeyIsPresent() - { - $this->expectException(\Pimple\Exception\UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple->extend('foo', function () { - }); - } - - /** - * @group legacy - */ - public function testLegacyExtendValidatesKeyIsPresent() - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple->extend('foo', function () { - }); - } - - public function testKeys() - { - $pimple = new Container(); - $pimple['foo'] = 123; - $pimple['bar'] = 123; - - $this->assertEquals(['foo', 'bar'], $pimple->keys()); - } - - /** @test */ - public function settingAnInvokableObjectShouldTreatItAsFactory() - { - $pimple = new Container(); - $pimple['invokable'] = new Fixtures\Invokable(); - - $this->assertInstanceOf('Pimple\Tests\Fixtures\Service', $pimple['invokable']); - } - - /** @test */ - public function settingNonInvokableObjectShouldTreatItAsParameter() - { - $pimple = new Container(); - $pimple['non_invokable'] = new Fixtures\NonInvokable(); - - $this->assertInstanceOf('Pimple\Tests\Fixtures\NonInvokable', $pimple['non_invokable']); - } - - /** - * @dataProvider badServiceDefinitionProvider - */ - public function testFactoryFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\Pimple\Exception\ExpectedInvokableException::class); - $this->expectExceptionMessage('Service definition is not a Closure or invokable object.'); - - $pimple = new Container(); - $pimple->factory($service); - } - - /** - * @group legacy - * @dataProvider badServiceDefinitionProvider - */ - public function testLegacyFactoryFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Service definition is not a Closure or invokable object.'); - - $pimple = new Container(); - $pimple->factory($service); - } - - /** - * @dataProvider badServiceDefinitionProvider - */ - public function testProtectFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\Pimple\Exception\ExpectedInvokableException::class); - $this->expectExceptionMessage('Callable is not a Closure or invokable object.'); - - $pimple = new Container(); - $pimple->protect($service); - } - - /** - * @group legacy - * @dataProvider badServiceDefinitionProvider - */ - public function testLegacyProtectFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Callable is not a Closure or invokable object.'); - - $pimple = new Container(); - $pimple->protect($service); - } - - /** - * @dataProvider badServiceDefinitionProvider - */ - public function testExtendFailsForKeysNotContainingServiceDefinitions($service) - { - $this->expectException(\Pimple\Exception\InvalidServiceIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" does not contain an object definition.'); - - $pimple = new Container(); - $pimple['foo'] = $service; - $pimple->extend('foo', function () { - }); - } - - /** - * @group legacy - * @dataProvider badServiceDefinitionProvider - */ - public function testLegacyExtendFailsForKeysNotContainingServiceDefinitions($service) - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Identifier "foo" does not contain an object definition.'); - - $pimple = new Container(); - $pimple['foo'] = $service; - $pimple->extend('foo', function () { - }); - } - - /** - * @group legacy - * @expectedDeprecation How Pimple behaves when extending protected closures will be fixed in Pimple 4. Are you sure "foo" should be protected? - */ - public function testExtendingProtectedClosureDeprecation() - { - $pimple = new Container(); - $pimple['foo'] = $pimple->protect(function () { - return 'bar'; - }); - - $pimple->extend('foo', function ($value) { - return $value.'-baz'; - }); - - $this->assertSame('bar-baz', $pimple['foo']); - } - - /** - * @dataProvider badServiceDefinitionProvider - */ - public function testExtendFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\Pimple\Exception\ExpectedInvokableException::class); - $this->expectExceptionMessage('Extension service definition is not a Closure or invokable object.'); - - $pimple = new Container(); - $pimple['foo'] = function () { - }; - $pimple->extend('foo', $service); - } - - /** - * @group legacy - * @dataProvider badServiceDefinitionProvider - */ - public function testLegacyExtendFailsForInvalidServiceDefinitions($service) - { - $this->expectException(\InvalidArgumentException::class); - $this->expectExceptionMessage('Extension service definition is not a Closure or invokable object.'); - - $pimple = new Container(); - $pimple['foo'] = function () { - }; - $pimple->extend('foo', $service); - } - - public function testExtendFailsIfFrozenServiceIsNonInvokable() - { - $this->expectException(\Pimple\Exception\FrozenServiceException::class); - $this->expectExceptionMessage('Cannot override frozen service "foo".'); - - $pimple = new Container(); - $pimple['foo'] = function () { - return new Fixtures\NonInvokable(); - }; - $foo = $pimple['foo']; - - $pimple->extend('foo', function () { - }); - } - - public function testExtendFailsIfFrozenServiceIsInvokable() - { - $this->expectException(\Pimple\Exception\FrozenServiceException::class); - $this->expectExceptionMessage('Cannot override frozen service "foo".'); - - $pimple = new Container(); - $pimple['foo'] = function () { - return new Fixtures\Invokable(); - }; - $foo = $pimple['foo']; - - $pimple->extend('foo', function () { - }); - } - - /** - * Provider for invalid service definitions. - */ - public function badServiceDefinitionProvider() - { - return [ - [123], - [new Fixtures\NonInvokable()], - ]; - } - - /** - * Provider for service definitions. - */ - public function serviceDefinitionProvider() - { - return [ - [function ($value) { - $service = new Fixtures\Service(); - $service->value = $value; - - return $service; - }], - [new Fixtures\Invokable()], - ]; - } - - public function testDefiningNewServiceAfterFreeze() - { - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $foo = $pimple['foo']; - - $pimple['bar'] = function () { - return 'bar'; - }; - $this->assertSame('bar', $pimple['bar']); - } - - public function testOverridingServiceAfterFreeze() - { - $this->expectException(\Pimple\Exception\FrozenServiceException::class); - $this->expectExceptionMessage('Cannot override frozen service "foo".'); - - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $foo = $pimple['foo']; - - $pimple['foo'] = function () { - return 'bar'; - }; - } - - /** - * @group legacy - */ - public function testLegacyOverridingServiceAfterFreeze() - { - $this->expectException(\RuntimeException::class); - $this->expectExceptionMessage('Cannot override frozen service "foo".'); - - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $foo = $pimple['foo']; - - $pimple['foo'] = function () { - return 'bar'; - }; - } - - public function testRemovingServiceAfterFreeze() - { - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $foo = $pimple['foo']; - - unset($pimple['foo']); - $pimple['foo'] = function () { - return 'bar'; - }; - $this->assertSame('bar', $pimple['foo']); - } - - public function testExtendingService() - { - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $pimple['foo'] = $pimple->extend('foo', function ($foo, $app) { - return "$foo.bar"; - }); - $pimple['foo'] = $pimple->extend('foo', function ($foo, $app) { - return "$foo.baz"; - }); - $this->assertSame('foo.bar.baz', $pimple['foo']); - } - - public function testExtendingServiceAfterOtherServiceFreeze() - { - $pimple = new Container(); - $pimple['foo'] = function () { - return 'foo'; - }; - $pimple['bar'] = function () { - return 'bar'; - }; - $foo = $pimple['foo']; - - $pimple['bar'] = $pimple->extend('bar', function ($bar, $app) { - return "$bar.baz"; - }); - $this->assertSame('bar.baz', $pimple['bar']); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php b/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php deleted file mode 100644 index d47b9c3..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ContainerTest.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009-2017 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests\Psr11; - -use PHPUnit\Framework\TestCase; -use Pimple\Container; -use Pimple\Psr11\Container as PsrContainer; -use Pimple\Tests\Fixtures\Service; - -class ContainerTest extends TestCase -{ - public function testGetReturnsExistingService() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Service(); - }; - $psr = new PsrContainer($pimple); - - $this->assertSame($pimple['service'], $psr->get('service')); - } - - public function testGetThrowsExceptionIfServiceIsNotFound() - { - $this->expectException(\Psr\Container\NotFoundExceptionInterface::class); - $this->expectExceptionMessage('Identifier "service" is not defined.'); - - $pimple = new Container(); - $psr = new PsrContainer($pimple); - - $psr->get('service'); - } - - public function testHasReturnsTrueIfServiceExists() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Service(); - }; - $psr = new PsrContainer($pimple); - - $this->assertTrue($psr->has('service')); - } - - public function testHasReturnsFalseIfServiceDoesNotExist() - { - $pimple = new Container(); - $psr = new PsrContainer($pimple); - - $this->assertFalse($psr->has('service')); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php b/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php deleted file mode 100644 index bd2d335..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/Psr11/ServiceLocatorTest.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests\Psr11; - -use PHPUnit\Framework\TestCase; -use Pimple\Container; -use Pimple\Psr11\ServiceLocator; -use Pimple\Tests\Fixtures; - -/** - * ServiceLocator test case. - * - * @author Pascal Luna <skalpa@zetareticuli.org> - */ -class ServiceLocatorTest extends TestCase -{ - public function testCanAccessServices() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - $locator = new ServiceLocator($pimple, ['service']); - - $this->assertSame($pimple['service'], $locator->get('service')); - } - - public function testCanAccessAliasedServices() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - $locator = new ServiceLocator($pimple, ['alias' => 'service']); - - $this->assertSame($pimple['service'], $locator->get('alias')); - } - - public function testCannotAccessAliasedServiceUsingRealIdentifier() - { - $this->expectException(\Pimple\Exception\UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "service" is not defined.'); - - $pimple = new Container(); - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - $locator = new ServiceLocator($pimple, ['alias' => 'service']); - - $service = $locator->get('service'); - } - - public function testGetValidatesServiceCanBeLocated() - { - $this->expectException(\Pimple\Exception\UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "foo" is not defined.'); - - $pimple = new Container(); - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - $locator = new ServiceLocator($pimple, ['alias' => 'service']); - - $service = $locator->get('foo'); - } - - public function testGetValidatesTargetServiceExists() - { - $this->expectException(\Pimple\Exception\UnknownIdentifierException::class); - $this->expectExceptionMessage('Identifier "invalid" is not defined.'); - - $pimple = new Container(); - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - $locator = new ServiceLocator($pimple, ['alias' => 'invalid']); - - $service = $locator->get('alias'); - } - - public function testHasValidatesServiceCanBeLocated() - { - $pimple = new Container(); - $pimple['service1'] = function () { - return new Fixtures\Service(); - }; - $pimple['service2'] = function () { - return new Fixtures\Service(); - }; - $locator = new ServiceLocator($pimple, ['service1']); - - $this->assertTrue($locator->has('service1')); - $this->assertFalse($locator->has('service2')); - } - - public function testHasChecksIfTargetServiceExists() - { - $pimple = new Container(); - $pimple['service'] = function () { - return new Fixtures\Service(); - }; - $locator = new ServiceLocator($pimple, ['foo' => 'service', 'bar' => 'invalid']); - - $this->assertTrue($locator->has('foo')); - $this->assertFalse($locator->has('bar')); - } -} diff --git a/vendor/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php b/vendor/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php deleted file mode 100644 index 2bb935f..0000000 --- a/vendor/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -/* - * This file is part of Pimple. - * - * Copyright (c) 2009 Fabien Potencier - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -namespace Pimple\Tests; - -use PHPUnit\Framework\TestCase; -use Pimple\Container; -use Pimple\ServiceIterator; -use Pimple\Tests\Fixtures\Service; - -class ServiceIteratorTest extends TestCase -{ - public function testIsIterable() - { - $pimple = new Container(); - $pimple['service1'] = function () { - return new Service(); - }; - $pimple['service2'] = function () { - return new Service(); - }; - $pimple['service3'] = function () { - return new Service(); - }; - $iterator = new ServiceIterator($pimple, ['service1', 'service2']); - - $this->assertSame(['service1' => $pimple['service1'], 'service2' => $pimple['service2']], iterator_to_array($iterator)); - } -} diff --git a/vendor/psr/cache/CHANGELOG.md b/vendor/psr/cache/CHANGELOG.md deleted file mode 100644 index 58ddab0..0000000 --- a/vendor/psr/cache/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.1 - 2016-08-06 - -### Fixed - -- Make spacing consistent in phpdoc annotations php-fig/cache#9 - chalasr -- Fix grammar in phpdoc annotations php-fig/cache#10 - chalasr -- Be more specific in docblocks that `getItems()` and `deleteItems()` take an array of strings (`string[]`) compared to just `array` php-fig/cache#8 - GrahamCampbell -- For `expiresAt()` and `expiresAfter()` in CacheItemInterface fix docblock to specify null as a valid parameters as well as an implementation of DateTimeInterface php-fig/cache#7 - GrahamCampbell - -## 1.0.0 - 2015-12-11 - -Initial stable release; reflects accepted PSR-6 specification diff --git a/vendor/psr/cache/LICENSE.txt b/vendor/psr/cache/LICENSE.txt deleted file mode 100644 index b1c2c97..0000000 --- a/vendor/psr/cache/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/psr/cache/README.md b/vendor/psr/cache/README.md deleted file mode 100644 index c8706ce..0000000 --- a/vendor/psr/cache/README.md +++ /dev/null @@ -1,9 +0,0 @@ -PSR Cache -========= - -This repository holds all interfaces defined by -[PSR-6](http://www.php-fig.org/psr/psr-6/). - -Note that this is not a Cache implementation of its own. It is merely an -interface that describes a Cache implementation. See the specification for more -details. diff --git a/vendor/psr/cache/composer.json b/vendor/psr/cache/composer.json deleted file mode 100644 index e828fec..0000000 --- a/vendor/psr/cache/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "psr/cache", - "description": "Common interface for caching libraries", - "keywords": ["psr", "psr-6", "cache"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/cache/src/CacheException.php b/vendor/psr/cache/src/CacheException.php deleted file mode 100644 index e27f22f..0000000 --- a/vendor/psr/cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -namespace Psr\Cache; - -/** - * Exception interface for all exceptions thrown by an Implementing Library. - */ -interface CacheException -{ -} diff --git a/vendor/psr/cache/src/CacheItemInterface.php b/vendor/psr/cache/src/CacheItemInterface.php deleted file mode 100644 index 63d05dd..0000000 --- a/vendor/psr/cache/src/CacheItemInterface.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php - -namespace Psr\Cache; - -/** - * CacheItemInterface defines an interface for interacting with objects inside a cache. - * - * Each Item object MUST be associated with a specific key, which can be set - * according to the implementing system and is typically passed by the - * Cache\CacheItemPoolInterface object. - * - * The Cache\CacheItemInterface object encapsulates the storage and retrieval of - * cache items. Each Cache\CacheItemInterface is generated by a - * Cache\CacheItemPoolInterface object, which is responsible for any required - * setup as well as associating the object with a unique Key. - * Cache\CacheItemInterface objects MUST be able to store and retrieve any type - * of PHP value defined in the Data section of the specification. - * - * Calling Libraries MUST NOT instantiate Item objects themselves. They may only - * be requested from a Pool object via the getItem() method. Calling Libraries - * SHOULD NOT assume that an Item created by one Implementing Library is - * compatible with a Pool from another Implementing Library. - */ -interface CacheItemInterface -{ - /** - * Returns the key for the current cache item. - * - * The key is loaded by the Implementing Library, but should be available to - * the higher level callers when needed. - * - * @return string - * The key string for this cache item. - */ - public function getKey(); - - /** - * Retrieves the value of the item from the cache associated with this object's key. - * - * The value returned must be identical to the value originally stored by set(). - * - * If isHit() returns false, this method MUST return null. Note that null - * is a legitimate cached value, so the isHit() method SHOULD be used to - * differentiate between "null value was found" and "no value was found." - * - * @return mixed - * The value corresponding to this cache item's key, or null if not found. - */ - public function get(); - - /** - * Confirms if the cache item lookup resulted in a cache hit. - * - * Note: This method MUST NOT have a race condition between calling isHit() - * and calling get(). - * - * @return bool - * True if the request resulted in a cache hit. False otherwise. - */ - public function isHit(); - - /** - * Sets the value represented by this cache item. - * - * The $value argument may be any item that can be serialized by PHP, - * although the method of serialization is left up to the Implementing - * Library. - * - * @param mixed $value - * The serializable value to be stored. - * - * @return static - * The invoked object. - */ - public function set($value); - - /** - * Sets the expiration time for this cache item. - * - * @param \DateTimeInterface|null $expiration - * The point in time after which the item MUST be considered expired. - * If null is passed explicitly, a default value MAY be used. If none is set, - * the value should be stored permanently or for as long as the - * implementation allows. - * - * @return static - * The called object. - */ - public function expiresAt($expiration); - - /** - * Sets the expiration time for this cache item. - * - * @param int|\DateInterval|null $time - * The period of time from the present after which the item MUST be considered - * expired. An integer parameter is understood to be the time in seconds until - * expiration. If null is passed explicitly, a default value MAY be used. - * If none is set, the value should be stored permanently or for as long as the - * implementation allows. - * - * @return static - * The called object. - */ - public function expiresAfter($time); -} diff --git a/vendor/psr/cache/src/CacheItemPoolInterface.php b/vendor/psr/cache/src/CacheItemPoolInterface.php deleted file mode 100644 index 0351419..0000000 --- a/vendor/psr/cache/src/CacheItemPoolInterface.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -namespace Psr\Cache; - -/** - * CacheItemPoolInterface generates CacheItemInterface objects. - * - * The primary purpose of Cache\CacheItemPoolInterface is to accept a key from - * the Calling Library and return the associated Cache\CacheItemInterface object. - * It is also the primary point of interaction with the entire cache collection. - * All configuration and initialization of the Pool is left up to an - * Implementing Library. - */ -interface CacheItemPoolInterface -{ - /** - * Returns a Cache Item representing the specified key. - * - * This method must always return a CacheItemInterface object, even in case of - * a cache miss. It MUST NOT return null. - * - * @param string $key - * The key for which to return the corresponding Cache Item. - * - * @throws InvalidArgumentException - * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException - * MUST be thrown. - * - * @return CacheItemInterface - * The corresponding Cache Item. - */ - public function getItem($key); - - /** - * Returns a traversable set of cache items. - * - * @param string[] $keys - * An indexed array of keys of items to retrieve. - * - * @throws InvalidArgumentException - * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException - * MUST be thrown. - * - * @return array|\Traversable - * A traversable collection of Cache Items keyed by the cache keys of - * each item. A Cache item will be returned for each key, even if that - * key is not found. However, if no keys are specified then an empty - * traversable MUST be returned instead. - */ - public function getItems(array $keys = array()); - - /** - * Confirms if the cache contains specified cache item. - * - * Note: This method MAY avoid retrieving the cached value for performance reasons. - * This could result in a race condition with CacheItemInterface::get(). To avoid - * such situation use CacheItemInterface::isHit() instead. - * - * @param string $key - * The key for which to check existence. - * - * @throws InvalidArgumentException - * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException - * MUST be thrown. - * - * @return bool - * True if item exists in the cache, false otherwise. - */ - public function hasItem($key); - - /** - * Deletes all items in the pool. - * - * @return bool - * True if the pool was successfully cleared. False if there was an error. - */ - public function clear(); - - /** - * Removes the item from the pool. - * - * @param string $key - * The key to delete. - * - * @throws InvalidArgumentException - * If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException - * MUST be thrown. - * - * @return bool - * True if the item was successfully removed. False if there was an error. - */ - public function deleteItem($key); - - /** - * Removes multiple items from the pool. - * - * @param string[] $keys - * An array of keys that should be removed from the pool. - - * @throws InvalidArgumentException - * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException - * MUST be thrown. - * - * @return bool - * True if the items were successfully removed. False if there was an error. - */ - public function deleteItems(array $keys); - - /** - * Persists a cache item immediately. - * - * @param CacheItemInterface $item - * The cache item to save. - * - * @return bool - * True if the item was successfully persisted. False if there was an error. - */ - public function save(CacheItemInterface $item); - - /** - * Sets a cache item to be persisted later. - * - * @param CacheItemInterface $item - * The cache item to save. - * - * @return bool - * False if the item could not be queued or if a commit was attempted and failed. True otherwise. - */ - public function saveDeferred(CacheItemInterface $item); - - /** - * Persists any deferred cache items. - * - * @return bool - * True if all not-yet-saved items were successfully saved or there were none. False otherwise. - */ - public function commit(); -} diff --git a/vendor/psr/cache/src/InvalidArgumentException.php b/vendor/psr/cache/src/InvalidArgumentException.php deleted file mode 100644 index be7c6fa..0000000 --- a/vendor/psr/cache/src/InvalidArgumentException.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -namespace Psr\Cache; - -/** - * Exception interface for invalid cache arguments. - * - * Any time an invalid argument is passed into a method it must throw an - * exception class which implements Psr\Cache\InvalidArgumentException. - */ -interface InvalidArgumentException extends CacheException -{ -} diff --git a/vendor/psr/clock/CHANGELOG.md b/vendor/psr/clock/CHANGELOG.md deleted file mode 100644 index 3cd6b9b..0000000 --- a/vendor/psr/clock/CHANGELOG.md +++ /dev/null @@ -1,11 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.0 - -First stable release after PSR-20 acceptance - -## 0.1.0 - -First release diff --git a/vendor/psr/clock/LICENSE b/vendor/psr/clock/LICENSE deleted file mode 100644 index be68342..0000000 --- a/vendor/psr/clock/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/psr/clock/README.md b/vendor/psr/clock/README.md deleted file mode 100644 index 6ca877e..0000000 --- a/vendor/psr/clock/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# PSR Clock - -This repository holds the interface for [PSR-20][psr-url]. - -Note that this is not a clock of its own. It is merely an interface that -describes a clock. See the specification for more details. - -## Installation - -```bash -composer require psr/clock -``` - -## Usage - -If you need a clock, you can use the interface like this: - -```php -<?php - -use Psr\Clock\ClockInterface; - -class Foo -{ - private ClockInterface $clock; - - public function __construct(ClockInterface $clock) - { - $this->clock = $clock; - } - - public function doSomething() - { - /** @var DateTimeImmutable $currentDateAndTime */ - $currentDateAndTime = $this->clock->now(); - // do something useful with that information - } -} -``` - -You can then pick one of the [implementations][implementation-url] of the interface to get a clock. - -If you want to implement the interface, you can require this package and -implement `Psr\Clock\ClockInterface` in your code. - -Don't forget to add `psr/clock-implementation` to your `composer.json`s `provides`-section like this: - -```json -{ - "provides": { - "psr/clock-implementation": "1.0" - } -} -``` - -And please read the [specification text][specification-url] for details on the interface. - -[psr-url]: https://www.php-fig.org/psr/psr-20 -[package-url]: https://packagist.org/packages/psr/clock -[implementation-url]: https://packagist.org/providers/psr/clock-implementation -[specification-url]: https://github.com/php-fig/fig-standards/blob/master/proposed/clock.md diff --git a/vendor/psr/clock/composer.json b/vendor/psr/clock/composer.json deleted file mode 100644 index 77992ed..0000000 --- a/vendor/psr/clock/composer.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "psr/clock", - "description": "Common interface for reading the clock.", - "keywords": ["psr", "psr-20", "time", "clock", "now"], - "homepage": "https://github.com/php-fig/clock", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": "^7.0 || ^8.0" - }, - "autoload": { - "psr-4": { - "Psr\\Clock\\": "src/" - } - } -} diff --git a/vendor/psr/clock/src/ClockInterface.php b/vendor/psr/clock/src/ClockInterface.php deleted file mode 100644 index 7b6d8d8..0000000 --- a/vendor/psr/clock/src/ClockInterface.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -namespace Psr\Clock; - -use DateTimeImmutable; - -interface ClockInterface -{ - /** - * Returns the current time as a DateTimeImmutable Object - */ - public function now(): DateTimeImmutable; -} diff --git a/vendor/psr/container/.gitignore b/vendor/psr/container/.gitignore deleted file mode 100644 index b2395aa..0000000 --- a/vendor/psr/container/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -composer.lock -composer.phar -/vendor/ diff --git a/vendor/psr/container/LICENSE b/vendor/psr/container/LICENSE deleted file mode 100644 index 2877a48..0000000 --- a/vendor/psr/container/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2016 container-interop -Copyright (c) 2016 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/psr/container/README.md b/vendor/psr/container/README.md deleted file mode 100644 index 1b9d9e5..0000000 --- a/vendor/psr/container/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Container interface -============== - -This repository holds all interfaces related to [PSR-11 (Container Interface)][psr-url]. - -Note that this is not a Container implementation of its own. It is merely abstractions that describe the components of a Dependency Injection Container. - -The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. - -[psr-url]: https://www.php-fig.org/psr/psr-11/ -[package-url]: https://packagist.org/packages/psr/container -[implementation-url]: https://packagist.org/providers/psr/container-implementation - diff --git a/vendor/psr/container/composer.json b/vendor/psr/container/composer.json deleted file mode 100644 index 3797a25..0000000 --- a/vendor/psr/container/composer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "psr/container", - "type": "library", - "description": "Common Container Interface (PHP FIG PSR-11)", - "keywords": ["psr", "psr-11", "container", "container-interop", "container-interface"], - "homepage": "https://github.com/php-fig/container", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=7.2.0" - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - } -} diff --git a/vendor/psr/container/src/ContainerExceptionInterface.php b/vendor/psr/container/src/ContainerExceptionInterface.php deleted file mode 100644 index cf10b8b..0000000 --- a/vendor/psr/container/src/ContainerExceptionInterface.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -namespace Psr\Container; - -/** - * Base interface representing a generic exception in a container. - */ -interface ContainerExceptionInterface -{ -} diff --git a/vendor/psr/container/src/ContainerInterface.php b/vendor/psr/container/src/ContainerInterface.php deleted file mode 100644 index cf8e7fd..0000000 --- a/vendor/psr/container/src/ContainerInterface.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Psr\Container; - -/** - * Describes the interface of a container that exposes methods to read its entries. - */ -interface ContainerInterface -{ - /** - * Finds an entry of the container by its identifier and returns it. - * - * @param string $id Identifier of the entry to look for. - * - * @throws NotFoundExceptionInterface No entry was found for **this** identifier. - * @throws ContainerExceptionInterface Error while retrieving the entry. - * - * @return mixed Entry. - */ - public function get(string $id); - - /** - * Returns true if the container can return an entry for the given identifier. - * Returns false otherwise. - * - * `has($id)` returning true does not mean that `get($id)` will not throw an exception. - * It does however mean that `get($id)` will not throw a `NotFoundExceptionInterface`. - * - * @param string $id Identifier of the entry to look for. - * - * @return bool - */ - public function has(string $id); -} diff --git a/vendor/psr/container/src/NotFoundExceptionInterface.php b/vendor/psr/container/src/NotFoundExceptionInterface.php deleted file mode 100644 index 650bf46..0000000 --- a/vendor/psr/container/src/NotFoundExceptionInterface.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -namespace Psr\Container; - -/** - * No entry was found in the container. - */ -interface NotFoundExceptionInterface extends ContainerExceptionInterface -{ -} diff --git a/vendor/psr/event-dispatcher/.editorconfig b/vendor/psr/event-dispatcher/.editorconfig deleted file mode 100644 index 164f092..0000000 --- a/vendor/psr/event-dispatcher/.editorconfig +++ /dev/null @@ -1,15 +0,0 @@ -; This file is for unifying the coding style for different editors and IDEs. -; More information at http://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_size = 4 -indent_style = space -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[Makefile] -indent_style = tab diff --git a/vendor/psr/event-dispatcher/.gitignore b/vendor/psr/event-dispatcher/.gitignore deleted file mode 100644 index 3a9875b..0000000 --- a/vendor/psr/event-dispatcher/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/vendor/ -composer.lock diff --git a/vendor/psr/event-dispatcher/LICENSE b/vendor/psr/event-dispatcher/LICENSE deleted file mode 100644 index 3f1559b..0000000 --- a/vendor/psr/event-dispatcher/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 PHP-FIG - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/psr/event-dispatcher/README.md b/vendor/psr/event-dispatcher/README.md deleted file mode 100644 index 294214a..0000000 --- a/vendor/psr/event-dispatcher/README.md +++ /dev/null @@ -1,6 +0,0 @@ -PSR Event Dispatcher -==================== - -This repository holds the interfaces related to [PSR-14](http://www.php-fig.org/psr/psr-14/). - -Note that this is not an Event Dispatcher implementation of its own. It is merely interfaces that describe the components of an Event Dispatcher. See the specification for more details. diff --git a/vendor/psr/event-dispatcher/composer.json b/vendor/psr/event-dispatcher/composer.json deleted file mode 100644 index 667a714..0000000 --- a/vendor/psr/event-dispatcher/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "psr/event-dispatcher", - "description": "Standard interfaces for event handling.", - "type": "library", - "keywords": ["psr", "psr-14", "events"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": ">=7.2.0" - }, - "autoload": { - "psr-4": { - "Psr\\EventDispatcher\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php b/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php deleted file mode 100644 index 4306fa9..0000000 --- a/vendor/psr/event-dispatcher/src/EventDispatcherInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Psr\EventDispatcher; - -/** - * Defines a dispatcher for events. - */ -interface EventDispatcherInterface -{ - /** - * Provide all relevant listeners with an event to process. - * - * @param object $event - * The object to process. - * - * @return object - * The Event that was passed, now modified by listeners. - */ - public function dispatch(object $event); -} diff --git a/vendor/psr/event-dispatcher/src/ListenerProviderInterface.php b/vendor/psr/event-dispatcher/src/ListenerProviderInterface.php deleted file mode 100644 index bdacb6e..0000000 --- a/vendor/psr/event-dispatcher/src/ListenerProviderInterface.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Psr\EventDispatcher; - -/** - * Mapper from an event to the listeners that are applicable to that event. - */ -interface ListenerProviderInterface -{ - /** - * @param object $event - * An event for which to return the relevant listeners. - * @return iterable[callable] - * An iterable (array, iterator, or generator) of callables. Each - * callable MUST be type-compatible with $event. - */ - public function getListenersForEvent(object $event) : iterable; -} diff --git a/vendor/psr/event-dispatcher/src/StoppableEventInterface.php b/vendor/psr/event-dispatcher/src/StoppableEventInterface.php deleted file mode 100644 index 5955081..0000000 --- a/vendor/psr/event-dispatcher/src/StoppableEventInterface.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Psr\EventDispatcher; - -/** - * An Event whose processing may be interrupted when the event has been handled. - * - * A Dispatcher implementation MUST check to determine if an Event - * is marked as stopped after each listener is called. If it is then it should - * return immediately without calling any further Listeners. - */ -interface StoppableEventInterface -{ - /** - * Is propagation stopped? - * - * This will typically only be used by the Dispatcher to determine if the - * previous listener halted propagation. - * - * @return bool - * True if the Event is complete and no further listeners should be called. - * False to continue calling listeners. - */ - public function isPropagationStopped() : bool; -} diff --git a/vendor/psr/http-client/CHANGELOG.md b/vendor/psr/http-client/CHANGELOG.md deleted file mode 100644 index babba7c..0000000 --- a/vendor/psr/http-client/CHANGELOG.md +++ /dev/null @@ -1,31 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.3 - -Add `source` link in composer.json. No code changes. - -## 1.0.2 - -Allow PSR-7 (psr/http-message) 2.0. No code changes. - -## 1.0.1 - -Allow installation with PHP 8. No code changes. - -## 1.0.0 - -First stable release. No changes since 0.3.0. - -## 0.3.0 - -Added Interface suffix on exceptions - -## 0.2.0 - -All exceptions are in `Psr\Http\Client` namespace - -## 0.1.0 - -First release diff --git a/vendor/psr/http-client/LICENSE b/vendor/psr/http-client/LICENSE deleted file mode 100644 index cd5e002..0000000 --- a/vendor/psr/http-client/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2017 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/psr/http-client/README.md b/vendor/psr/http-client/README.md deleted file mode 100644 index 84af5c5..0000000 --- a/vendor/psr/http-client/README.md +++ /dev/null @@ -1,12 +0,0 @@ -HTTP Client -=========== - -This repository holds all the common code related to [PSR-18 (HTTP Client)][psr-url]. - -Note that this is not a HTTP Client implementation of its own. It is merely abstractions that describe the components of a HTTP Client. - -The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. - -[psr-url]: https://www.php-fig.org/psr/psr-18 -[package-url]: https://packagist.org/packages/psr/http-client -[implementation-url]: https://packagist.org/providers/psr/http-client-implementation diff --git a/vendor/psr/http-client/composer.json b/vendor/psr/http-client/composer.json deleted file mode 100644 index 6fed350..0000000 --- a/vendor/psr/http-client/composer.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "psr/http-client", - "description": "Common interface for HTTP clients", - "keywords": ["psr", "psr-18", "http", "http-client"], - "homepage": "https://github.com/php-fig/http-client", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "support": { - "source": "https://github.com/php-fig/http-client" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/http-client/src/ClientExceptionInterface.php b/vendor/psr/http-client/src/ClientExceptionInterface.php deleted file mode 100644 index aa0b9cf..0000000 --- a/vendor/psr/http-client/src/ClientExceptionInterface.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -namespace Psr\Http\Client; - -/** - * Every HTTP client related exception MUST implement this interface. - */ -interface ClientExceptionInterface extends \Throwable -{ -} diff --git a/vendor/psr/http-client/src/ClientInterface.php b/vendor/psr/http-client/src/ClientInterface.php deleted file mode 100644 index ad99fd4..0000000 --- a/vendor/psr/http-client/src/ClientInterface.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace Psr\Http\Client; - -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; - -interface ClientInterface -{ - /** - * Sends a PSR-7 request and returns a PSR-7 response. - * - * @param RequestInterface $request - * - * @return ResponseInterface - * - * @throws \Psr\Http\Client\ClientExceptionInterface If an error happens while processing the request. - */ - public function sendRequest(RequestInterface $request): ResponseInterface; -} diff --git a/vendor/psr/http-client/src/NetworkExceptionInterface.php b/vendor/psr/http-client/src/NetworkExceptionInterface.php deleted file mode 100644 index 4a11627..0000000 --- a/vendor/psr/http-client/src/NetworkExceptionInterface.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace Psr\Http\Client; - -use Psr\Http\Message\RequestInterface; - -/** - * Thrown when the request cannot be completed because of network issues. - * - * There is no response object as this exception is thrown when no response has been received. - * - * Example: the target host name can not be resolved or the connection failed. - */ -interface NetworkExceptionInterface extends ClientExceptionInterface -{ - /** - * Returns the request. - * - * The request object MAY be a different object from the one passed to ClientInterface::sendRequest() - * - * @return RequestInterface - */ - public function getRequest(): RequestInterface; -} diff --git a/vendor/psr/http-client/src/RequestExceptionInterface.php b/vendor/psr/http-client/src/RequestExceptionInterface.php deleted file mode 100644 index b17fc34..0000000 --- a/vendor/psr/http-client/src/RequestExceptionInterface.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace Psr\Http\Client; - -use Psr\Http\Message\RequestInterface; - -/** - * Exception for when a request failed. - * - * Examples: - * - Request is invalid (e.g. method is missing) - * - Runtime request errors (e.g. the body stream is not seekable) - */ -interface RequestExceptionInterface extends ClientExceptionInterface -{ - /** - * Returns the request. - * - * The request object MAY be a different object from the one passed to ClientInterface::sendRequest() - * - * @return RequestInterface - */ - public function getRequest(): RequestInterface; -} diff --git a/vendor/psr/http-factory/LICENSE b/vendor/psr/http-factory/LICENSE deleted file mode 100644 index 3f1559b..0000000 --- a/vendor/psr/http-factory/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 PHP-FIG - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/psr/http-factory/README.md b/vendor/psr/http-factory/README.md deleted file mode 100644 index bf8913b..0000000 --- a/vendor/psr/http-factory/README.md +++ /dev/null @@ -1,12 +0,0 @@ -HTTP Factories -============== - -This repository holds all interfaces related to [PSR-17 (HTTP Factories)][psr-url]. - -Note that this is not a HTTP Factory implementation of its own. It is merely interfaces that describe the components of a HTTP Factory. - -The installable [package][package-url] and [implementations][implementation-url] are listed on Packagist. - -[psr-url]: https://www.php-fig.org/psr/psr-17/ -[package-url]: https://packagist.org/packages/psr/http-factory -[implementation-url]: https://packagist.org/providers/psr/http-factory-implementation diff --git a/vendor/psr/http-factory/composer.json b/vendor/psr/http-factory/composer.json deleted file mode 100644 index d1bbdde..0000000 --- a/vendor/psr/http-factory/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "psr/http-factory", - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "psr", - "psr-7", - "psr-17", - "http", - "factory", - "message", - "request", - "response" - ], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/http-factory/src/RequestFactoryInterface.php b/vendor/psr/http-factory/src/RequestFactoryInterface.php deleted file mode 100644 index cb39a08..0000000 --- a/vendor/psr/http-factory/src/RequestFactoryInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Psr\Http\Message; - -interface RequestFactoryInterface -{ - /** - * Create a new request. - * - * @param string $method The HTTP method associated with the request. - * @param UriInterface|string $uri The URI associated with the request. If - * the value is a string, the factory MUST create a UriInterface - * instance based on it. - * - * @return RequestInterface - */ - public function createRequest(string $method, $uri): RequestInterface; -} diff --git a/vendor/psr/http-factory/src/ResponseFactoryInterface.php b/vendor/psr/http-factory/src/ResponseFactoryInterface.php deleted file mode 100644 index 212562f..0000000 --- a/vendor/psr/http-factory/src/ResponseFactoryInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Psr\Http\Message; - -interface ResponseFactoryInterface -{ - /** - * Create a new response. - * - * @param int $code HTTP status code; defaults to 200 - * @param string $reasonPhrase Reason phrase to associate with status code - * in generated response; if none is provided implementations MAY use - * the defaults as suggested in the HTTP specification. - * - * @return ResponseInterface - */ - public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface; -} diff --git a/vendor/psr/http-factory/src/ServerRequestFactoryInterface.php b/vendor/psr/http-factory/src/ServerRequestFactoryInterface.php deleted file mode 100644 index 9fe031a..0000000 --- a/vendor/psr/http-factory/src/ServerRequestFactoryInterface.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace Psr\Http\Message; - -interface ServerRequestFactoryInterface -{ - /** - * Create a new server request. - * - * Note that server-params are taken precisely as given - no parsing/processing - * of the given values is performed, and, in particular, no attempt is made to - * determine the HTTP method or URI, which must be provided explicitly. - * - * @param string $method The HTTP method associated with the request. - * @param UriInterface|string $uri The URI associated with the request. If - * the value is a string, the factory MUST create a UriInterface - * instance based on it. - * @param array $serverParams Array of SAPI parameters with which to seed - * the generated request instance. - * - * @return ServerRequestInterface - */ - public function createServerRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface; -} diff --git a/vendor/psr/http-factory/src/StreamFactoryInterface.php b/vendor/psr/http-factory/src/StreamFactoryInterface.php deleted file mode 100644 index 90e3240..0000000 --- a/vendor/psr/http-factory/src/StreamFactoryInterface.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -namespace Psr\Http\Message; - -interface StreamFactoryInterface -{ - /** - * Create a new stream from a string. - * - * The stream SHOULD be created with a temporary resource. - * - * @param string $content String content with which to populate the stream. - * - * @return StreamInterface - */ - public function createStream(string $content = ''): StreamInterface; - - /** - * Create a stream from an existing file. - * - * The file MUST be opened using the given mode, which may be any mode - * supported by the `fopen` function. - * - * The `$filename` MAY be any string supported by `fopen()`. - * - * @param string $filename Filename or stream URI to use as basis of stream. - * @param string $mode Mode with which to open the underlying filename/stream. - * - * @return StreamInterface - * @throws \RuntimeException If the file cannot be opened. - * @throws \InvalidArgumentException If the mode is invalid. - */ - public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface; - - /** - * Create a new stream from an existing resource. - * - * The stream MUST be readable and may be writable. - * - * @param resource $resource PHP resource to use as basis of stream. - * - * @return StreamInterface - */ - public function createStreamFromResource($resource): StreamInterface; -} diff --git a/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php b/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php deleted file mode 100644 index 7db4e30..0000000 --- a/vendor/psr/http-factory/src/UploadedFileFactoryInterface.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -namespace Psr\Http\Message; - -interface UploadedFileFactoryInterface -{ - /** - * Create a new uploaded file. - * - * If a size is not provided it will be determined by checking the size of - * the file. - * - * @see http://php.net/manual/features.file-upload.post-method.php - * @see http://php.net/manual/features.file-upload.errors.php - * - * @param StreamInterface $stream Underlying stream representing the - * uploaded file content. - * @param int $size in bytes - * @param int $error PHP file upload error - * @param string $clientFilename Filename as provided by the client, if any. - * @param string $clientMediaType Media type as provided by the client, if any. - * - * @return UploadedFileInterface - * - * @throws \InvalidArgumentException If the file resource is not readable. - */ - public function createUploadedFile( - StreamInterface $stream, - int $size = null, - int $error = \UPLOAD_ERR_OK, - string $clientFilename = null, - string $clientMediaType = null - ): UploadedFileInterface; -} diff --git a/vendor/psr/http-factory/src/UriFactoryInterface.php b/vendor/psr/http-factory/src/UriFactoryInterface.php deleted file mode 100644 index 06df0b4..0000000 --- a/vendor/psr/http-factory/src/UriFactoryInterface.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace Psr\Http\Message; - -interface UriFactoryInterface -{ - /** - * Create a new URI. - * - * @param string $uri - * - * @return UriInterface - * - * @throws \InvalidArgumentException If the given URI cannot be parsed. - */ - public function createUri(string $uri = ''): UriInterface; -} diff --git a/vendor/psr/http-message/CHANGELOG.md b/vendor/psr/http-message/CHANGELOG.md deleted file mode 100644 index 74b1ef9..0000000 --- a/vendor/psr/http-message/CHANGELOG.md +++ /dev/null @@ -1,36 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file, in reverse chronological order by release. - -## 1.0.1 - 2016-08-06 - -### Added - -- Nothing. - -### Deprecated - -- Nothing. - -### Removed - -- Nothing. - -### Fixed - -- Updated all `@return self` annotation references in interfaces to use - `@return static`, which more closelly follows the semantics of the - specification. -- Updated the `MessageInterface::getHeaders()` return annotation to use the - value `string[][]`, indicating the format is a nested array of strings. -- Updated the `@link` annotation for `RequestInterface::withRequestTarget()` - to point to the correct section of RFC 7230. -- Updated the `ServerRequestInterface::withUploadedFiles()` parameter annotation - to add the parameter name (`$uploadedFiles`). -- Updated a `@throws` annotation for the `UploadedFileInterface::moveTo()` - method to correctly reference the method parameter (it was referencing an - incorrect parameter name previously). - -## 1.0.0 - 2016-05-18 - -Initial stable release; reflects accepted PSR-7 specification. diff --git a/vendor/psr/http-message/LICENSE b/vendor/psr/http-message/LICENSE deleted file mode 100644 index c2d8e45..0000000 --- a/vendor/psr/http-message/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/psr/http-message/README.md b/vendor/psr/http-message/README.md deleted file mode 100644 index 2668be6..0000000 --- a/vendor/psr/http-message/README.md +++ /dev/null @@ -1,16 +0,0 @@ -PSR Http Message -================ - -This repository holds all interfaces/classes/traits related to -[PSR-7](http://www.php-fig.org/psr/psr-7/). - -Note that this is not a HTTP message implementation of its own. It is merely an -interface that describes a HTTP message. See the specification for more details. - -Usage ------ - -Before reading the usage guide we recommend reading the PSR-7 interfaces method list: - -* [`PSR-7 Interfaces Method List`](docs/PSR7-Interfaces.md) -* [`PSR-7 Usage Guide`](docs/PSR7-Usage.md) \ No newline at end of file diff --git a/vendor/psr/http-message/composer.json b/vendor/psr/http-message/composer.json deleted file mode 100644 index 56e8c0a..0000000 --- a/vendor/psr/http-message/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "psr/http-message", - "description": "Common interface for HTTP messages", - "keywords": ["psr", "psr-7", "http", "http-message", "request", "response"], - "homepage": "https://github.com/php-fig/http-message", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": "^7.2 || ^8.0" - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - } -} diff --git a/vendor/psr/http-message/docs/PSR7-Interfaces.md b/vendor/psr/http-message/docs/PSR7-Interfaces.md deleted file mode 100644 index 3a7e7dd..0000000 --- a/vendor/psr/http-message/docs/PSR7-Interfaces.md +++ /dev/null @@ -1,130 +0,0 @@ -# Interfaces - -The purpose of this list is to help in finding the methods when working with PSR-7. This can be considered as a cheatsheet for PSR-7 interfaces. - -The interfaces defined in PSR-7 are the following: - -| Class Name | Description | -|---|---| -| [Psr\Http\Message\MessageInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagemessageinterface) | Representation of a HTTP message | -| [Psr\Http\Message\RequestInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagerequestinterface) | Representation of an outgoing, client-side request. | -| [Psr\Http\Message\ServerRequestInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageserverrequestinterface) | Representation of an incoming, server-side HTTP request. | -| [Psr\Http\Message\ResponseInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageresponseinterface) | Representation of an outgoing, server-side response. | -| [Psr\Http\Message\StreamInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessagestreaminterface) | Describes a data stream | -| [Psr\Http\Message\UriInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageuriinterface) | Value object representing a URI. | -| [Psr\Http\Message\UploadedFileInterface](http://www.php-fig.org/psr/psr-7/#psrhttpmessageuploadedfileinterface) | Value object representing a file uploaded through an HTTP request. | - -## `Psr\Http\Message\MessageInterface` Methods - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getProtocolVersion()` | Retrieve HTTP protocol version | 1.0 or 1.1 | -| `withProtocolVersion($version)` | Returns new message instance with given HTTP protocol version | | -| `getHeaders()` | Retrieve all HTTP Headers | [Request Header List](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields), [Response Header List](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Response_fields) | -| `hasHeader($name)` | Checks if HTTP Header with given name exists | | -| `getHeader($name)` | Retrieves a array with the values for a single header | | -| `getHeaderLine($name)` | Retrieves a comma-separated string of the values for a single header | | -| `withHeader($name, $value)` | Returns new message instance with given HTTP Header | if the header existed in the original instance, replaces the header value from the original message with the value provided when creating the new instance. | -| `withAddedHeader($name, $value)` | Returns new message instance with appended value to given header | If header already exists value will be appended, if not a new header will be created | -| `withoutHeader($name)` | Removes HTTP Header with given name| | -| `getBody()` | Retrieves the HTTP Message Body | Returns object implementing `StreamInterface`| -| `withBody(StreamInterface $body)` | Returns new message instance with given HTTP Message Body | | - - -## `Psr\Http\Message\RequestInterface` Methods - -Same methods as `Psr\Http\Message\MessageInterface` + the following methods: - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getRequestTarget()` | Retrieves the message's request target | origin-form, absolute-form, authority-form, asterisk-form ([RFC7230](https://www.rfc-editor.org/rfc/rfc7230.txt)) | -| `withRequestTarget($requestTarget)` | Return a new message instance with the specific request-target | | -| `getMethod()` | Retrieves the HTTP method of the request. | GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE (defined in [RFC7231](https://tools.ietf.org/html/rfc7231)), PATCH (defined in [RFC5789](https://tools.ietf.org/html/rfc5789)) | -| `withMethod($method)` | Returns a new message instance with the provided HTTP method | | -| `getUri()` | Retrieves the URI instance | | -| `withUri(UriInterface $uri, $preserveHost = false)` | Returns a new message instance with the provided URI | | - - -## `Psr\Http\Message\ServerRequestInterface` Methods - -Same methods as `Psr\Http\Message\RequestInterface` + the following methods: - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getServerParams() ` | Retrieve server parameters | Typically derived from `$_SERVER` | -| `getCookieParams()` | Retrieves cookies sent by the client to the server. | Typically derived from `$_COOKIES` | -| `withCookieParams(array $cookies)` | Returns a new request instance with the specified cookies | | -| `withQueryParams(array $query)` | Returns a new request instance with the specified query string arguments | | -| `getUploadedFiles()` | Retrieve normalized file upload data | | -| `withUploadedFiles(array $uploadedFiles)` | Returns a new request instance with the specified uploaded files | | -| `getParsedBody()` | Retrieve any parameters provided in the request body | | -| `withParsedBody($data)` | Returns a new request instance with the specified body parameters | | -| `getAttributes()` | Retrieve attributes derived from the request | | -| `getAttribute($name, $default = null)` | Retrieve a single derived request attribute | | -| `withAttribute($name, $value)` | Returns a new request instance with the specified derived request attribute | | -| `withoutAttribute($name)` | Returns a new request instance that without the specified derived request attribute | | - -## `Psr\Http\Message\ResponseInterface` Methods: - -Same methods as `Psr\Http\Message\MessageInterface` + the following methods: - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getStatusCode()` | Gets the response status code. | | -| `withStatus($code, $reasonPhrase = '')` | Returns a new response instance with the specified status code and, optionally, reason phrase. | | -| `getReasonPhrase()` | Gets the response reason phrase associated with the status code. | | - -## `Psr\Http\Message\StreamInterface` Methods - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `__toString()` | Reads all data from the stream into a string, from the beginning to end. | | -| `close()` | Closes the stream and any underlying resources. | | -| `detach()` | Separates any underlying resources from the stream. | | -| `getSize()` | Get the size of the stream if known. | | -| `eof()` | Returns true if the stream is at the end of the stream.| | -| `isSeekable()` | Returns whether or not the stream is seekable. | | -| `seek($offset, $whence = SEEK_SET)` | Seek to a position in the stream. | | -| `rewind()` | Seek to the beginning of the stream. | | -| `isWritable()` | Returns whether or not the stream is writable. | | -| `write($string)` | Write data to the stream. | | -| `isReadable()` | Returns whether or not the stream is readable. | | -| `read($length)` | Read data from the stream. | | -| `getContents()` | Returns the remaining contents in a string | | -| `getMetadata($key = null)()` | Get stream metadata as an associative array or retrieve a specific key. | | - -## `Psr\Http\Message\UriInterface` Methods - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getScheme()` | Retrieve the scheme component of the URI. | | -| `getAuthority()` | Retrieve the authority component of the URI. | | -| `getUserInfo()` | Retrieve the user information component of the URI. | | -| `getHost()` | Retrieve the host component of the URI. | | -| `getPort()` | Retrieve the port component of the URI. | | -| `getPath()` | Retrieve the path component of the URI. | | -| `getQuery()` | Retrieve the query string of the URI. | | -| `getFragment()` | Retrieve the fragment component of the URI. | | -| `withScheme($scheme)` | Return an instance with the specified scheme. | | -| `withUserInfo($user, $password = null)` | Return an instance with the specified user information. | | -| `withHost($host)` | Return an instance with the specified host. | | -| `withPort($port)` | Return an instance with the specified port. | | -| `withPath($path)` | Return an instance with the specified path. | | -| `withQuery($query)` | Return an instance with the specified query string. | | -| `withFragment($fragment)` | Return an instance with the specified URI fragment. | | -| `__toString()` | Return the string representation as a URI reference. | | - -## `Psr\Http\Message\UploadedFileInterface` Methods - -| Method Name | Description | Notes | -|------------------------------------| ----------- | ----- | -| `getStream()` | Retrieve a stream representing the uploaded file. | | -| `moveTo($targetPath)` | Move the uploaded file to a new location. | | -| `getSize()` | Retrieve the file size. | | -| `getError()` | Retrieve the error associated with the uploaded file. | | -| `getClientFilename()` | Retrieve the filename sent by the client. | | -| `getClientMediaType()` | Retrieve the media type sent by the client. | | - -> `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. -> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. - diff --git a/vendor/psr/http-message/docs/PSR7-Usage.md b/vendor/psr/http-message/docs/PSR7-Usage.md deleted file mode 100644 index b6d048a..0000000 --- a/vendor/psr/http-message/docs/PSR7-Usage.md +++ /dev/null @@ -1,159 +0,0 @@ -### PSR-7 Usage - -All PSR-7 applications comply with these interfaces -They were created to establish a standard between middleware implementations. - -> `RequestInterface`, `ServerRequestInterface`, `ResponseInterface` extend `MessageInterface` because the `Request` and the `Response` are `HTTP Messages`. -> When using `ServerRequestInterface`, both `RequestInterface` and `Psr\Http\Message\MessageInterface` methods are considered. - - -The following examples will illustrate how basic operations are done in PSR-7. - -##### Examples - - -For this examples to work (at least) a PSR-7 implementation package is required. (eg: zendframework/zend-diactoros, guzzlehttp/psr7, slim/slim, etc) -All PSR-7 implementations should have the same behaviour. - -The following will be assumed: -`$request` is an object of `Psr\Http\Message\RequestInterface` and - -`$response` is an object implementing `Psr\Http\Message\RequestInterface` - - -### Working with HTTP Headers - -#### Adding headers to response: - -```php -$response->withHeader('My-Custom-Header', 'My Custom Message'); -``` - -#### Appending values to headers - -```php -$response->withAddedHeader('My-Custom-Header', 'The second message'); -``` - -#### Checking if header exists: - -```php -$request->hasHeader('My-Custom-Header'); // will return false -$response->hasHeader('My-Custom-Header'); // will return true -``` - -> Note: My-Custom-Header was only added in the Response - -#### Getting comma-separated values from a header (also applies to request) - -```php -// getting value from request headers -$request->getHeaderLine('Content-Type'); // will return: "text/html; charset=UTF-8" -// getting value from response headers -$response->getHeaderLine('My-Custom-Header'); // will return: "My Custom Message; The second message" -``` - -#### Getting array of value from a header (also applies to request) -```php -// getting value from request headers -$request->getHeader('Content-Type'); // will return: ["text/html", "charset=UTF-8"] -// getting value from response headers -$response->getHeader('My-Custom-Header'); // will return: ["My Custom Message", "The second message"] -``` - -#### Removing headers from HTTP Messages -```php -// removing a header from Request, removing deprecated "Content-MD5" header -$request->withoutHeader('Content-MD5'); - -// removing a header from Response -// effect: the browser won't know the size of the stream -// the browser will download the stream till it ends -$response->withoutHeader('Content-Length'); -``` - -### Working with HTTP Message Body - -When working with the PSR-7 there are two methods of implementation: -#### 1. Getting the body separately - -> This method makes the body handling easier to understand and is useful when repeatedly calling body methods. (You only call `getBody()` once). Using this method mistakes like `$response->write()` are also prevented. - -```php -$body = $response->getBody(); -// operations on body, eg. read, write, seek -// ... -// replacing the old body -$response->withBody($body); -// this last statement is optional as we working with objects -// in this case the "new" body is same with the "old" one -// the $body variable has the same value as the one in $request, only the reference is passed -``` - -#### 2. Working directly on response - -> This method is useful when only performing few operations as the `$request->getBody()` statement fragment is required - -```php -$response->getBody()->write('hello'); -``` - -### Getting the body contents - -The following snippet gets the contents of a stream contents. -> Note: Streams must be rewinded, if content was written into streams, it will be ignored when calling `getContents()` because the stream pointer is set to the last character, which is `\0` - meaning end of stream. -```php -$body = $response->getBody(); -$body->rewind(); // or $body->seek(0); -$bodyText = $body->getContents(); -``` -> Note: If `$body->seek(1)` is called before `$body->getContents()`, the first character will be ommited as the starting pointer is set to `1`, not `0`. This is why using `$body->rewind()` is recommended. - -### Append to body - -```php -$response->getBody()->write('Hello'); // writing directly -$body = $request->getBody(); // which is a `StreamInterface` -$body->write('xxxxx'); -``` - -### Prepend to body -Prepending is different when it comes to streams. The content must be copied before writing the content to be prepended. -The following example will explain the behaviour of streams. - -```php -// assuming our response is initially empty -$body = $repsonse->getBody(); -// writing the string "abcd" -$body->write('abcd'); - -// seeking to start of stream -$body->seek(0); -// writing 'ef' -$body->write('ef'); // at this point the stream contains "efcd" -``` - -#### Prepending by rewriting separately - -```php -// assuming our response body stream only contains: "abcd" -$body = $response->getBody(); -$body->rewind(); -$contents = $body->getContents(); // abcd -// seeking the stream to beginning -$body->rewind(); -$body->write('ef'); // stream contains "efcd" -$body->write($contents); // stream contains "efabcd" -``` - -> Note: `getContents()` seeks the stream while reading it, therefore if the second `rewind()` method call was not present the stream would have resulted in `abcdefabcd` because the `write()` method appends to stream if not preceeded by `rewind()` or `seek(0)`. - -#### Prepending by using contents as a string -```php -$body = $response->getBody(); -$body->rewind(); -$contents = $body->getContents(); // efabcd -$contents = 'ef'.$contents; -$body->rewind(); -$body->write($contents); -``` diff --git a/vendor/psr/http-message/src/MessageInterface.php b/vendor/psr/http-message/src/MessageInterface.php deleted file mode 100644 index 8cdb4ed..0000000 --- a/vendor/psr/http-message/src/MessageInterface.php +++ /dev/null @@ -1,189 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Psr\Http\Message; - -/** - * HTTP messages consist of requests from a client to a server and responses - * from a server to a client. This interface defines the methods common to - * each. - * - * Messages are considered immutable; all methods that might change state MUST - * be implemented such that they retain the internal state of the current - * message and return an instance that contains the changed state. - * - * @link http://www.ietf.org/rfc/rfc7230.txt - * @link http://www.ietf.org/rfc/rfc7231.txt - */ -interface MessageInterface -{ - /** - * Retrieves the HTTP protocol version as a string. - * - * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0"). - * - * @return string HTTP protocol version. - */ - public function getProtocolVersion(); - - /** - * Return an instance with the specified HTTP protocol version. - * - * The version string MUST contain only the HTTP version number (e.g., - * "1.1", "1.0"). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new protocol version. - * - * @param string $version HTTP protocol version - * @return static - */ - public function withProtocolVersion(string $version); - - /** - * Retrieves all message header values. - * - * The keys represent the header name as it will be sent over the wire, and - * each value is an array of strings associated with the header. - * - * // Represent the headers as a string - * foreach ($message->getHeaders() as $name => $values) { - * echo $name . ": " . implode(", ", $values); - * } - * - * // Emit headers iteratively: - * foreach ($message->getHeaders() as $name => $values) { - * foreach ($values as $value) { - * header(sprintf('%s: %s', $name, $value), false); - * } - * } - * - * While header names are not case-sensitive, getHeaders() will preserve the - * exact case in which headers were originally specified. - * - * @return string[][] Returns an associative array of the message's headers. Each - * key MUST be a header name, and each value MUST be an array of strings - * for that header. - */ - public function getHeaders(); - - /** - * Checks if a header exists by the given case-insensitive name. - * - * @param string $name Case-insensitive header field name. - * @return bool Returns true if any header names match the given header - * name using a case-insensitive string comparison. Returns false if - * no matching header name is found in the message. - */ - public function hasHeader(string $name); - - /** - * Retrieves a message header value by the given case-insensitive name. - * - * This method returns an array of all the header values of the given - * case-insensitive header name. - * - * If the header does not appear in the message, this method MUST return an - * empty array. - * - * @param string $name Case-insensitive header field name. - * @return string[] An array of string values as provided for the given - * header. If the header does not appear in the message, this method MUST - * return an empty array. - */ - public function getHeader(string $name); - - /** - * Retrieves a comma-separated string of the values for a single header. - * - * This method returns all of the header values of the given - * case-insensitive header name as a string concatenated together using - * a comma. - * - * NOTE: Not all header values may be appropriately represented using - * comma concatenation. For such headers, use getHeader() instead - * and supply your own delimiter when concatenating. - * - * If the header does not appear in the message, this method MUST return - * an empty string. - * - * @param string $name Case-insensitive header field name. - * @return string A string of values as provided for the given header - * concatenated together using a comma. If the header does not appear in - * the message, this method MUST return an empty string. - */ - public function getHeaderLine(string $name); - - /** - * Return an instance with the provided value replacing the specified header. - * - * While header names are case-insensitive, the casing of the header will - * be preserved by this function, and returned from getHeaders(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new and/or updated header and value. - * - * @param string $name Case-insensitive header field name. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withHeader(string $name, $value); - - /** - * Return an instance with the specified header appended with the given value. - * - * Existing values for the specified header will be maintained. The new - * value(s) will be appended to the existing list. If the header did not - * exist previously, it will be added. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new header and/or value. - * - * @param string $name Case-insensitive header field name to add. - * @param string|string[] $value Header value(s). - * @return static - * @throws \InvalidArgumentException for invalid header names or values. - */ - public function withAddedHeader(string $name, $value); - - /** - * Return an instance without the specified header. - * - * Header resolution MUST be done without case-sensitivity. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the named header. - * - * @param string $name Case-insensitive header field name to remove. - * @return static - */ - public function withoutHeader(string $name); - - /** - * Gets the body of the message. - * - * @return StreamInterface Returns the body as a stream. - */ - public function getBody(); - - /** - * Return an instance with the specified message body. - * - * The body MUST be a StreamInterface object. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return a new instance that has the - * new body stream. - * - * @param StreamInterface $body Body. - * @return static - * @throws \InvalidArgumentException When the body is not valid. - */ - public function withBody(StreamInterface $body); -} diff --git a/vendor/psr/http-message/src/RequestInterface.php b/vendor/psr/http-message/src/RequestInterface.php deleted file mode 100644 index 38066df..0000000 --- a/vendor/psr/http-message/src/RequestInterface.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Psr\Http\Message; - -/** - * Representation of an outgoing, client-side request. - * - * Per the HTTP specification, this interface includes properties for - * each of the following: - * - * - Protocol version - * - HTTP method - * - URI - * - Headers - * - Message body - * - * During construction, implementations MUST attempt to set the Host header from - * a provided URI if no Host header is provided. - * - * Requests are considered immutable; all methods that might change state MUST - * be implemented such that they retain the internal state of the current - * message and return an instance that contains the changed state. - */ -interface RequestInterface extends MessageInterface -{ - /** - * Retrieves the message's request target. - * - * Retrieves the message's request-target either as it will appear (for - * clients), as it appeared at request (for servers), or as it was - * specified for the instance (see withRequestTarget()). - * - * In most cases, this will be the origin-form of the composed URI, - * unless a value was provided to the concrete implementation (see - * withRequestTarget() below). - * - * If no URI is available, and no request-target has been specifically - * provided, this method MUST return the string "/". - * - * @return string - */ - public function getRequestTarget(); - - /** - * Return an instance with the specific request-target. - * - * If the request needs a non-origin-form request-target — e.g., for - * specifying an absolute-form, authority-form, or asterisk-form — - * this method may be used to create an instance with the specified - * request-target, verbatim. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * changed request target. - * - * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various - * request-target forms allowed in request messages) - * @param string $requestTarget - * @return static - */ - public function withRequestTarget(string $requestTarget); - - /** - * Retrieves the HTTP method of the request. - * - * @return string Returns the request method. - */ - public function getMethod(); - - /** - * Return an instance with the provided HTTP method. - * - * While HTTP method names are typically all uppercase characters, HTTP - * method names are case-sensitive and thus implementations SHOULD NOT - * modify the given string. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * changed request method. - * - * @param string $method Case-sensitive method. - * @return static - * @throws \InvalidArgumentException for invalid HTTP methods. - */ - public function withMethod(string $method); - - /** - * Retrieves the URI instance. - * - * This method MUST return a UriInterface instance. - * - * @link http://tools.ietf.org/html/rfc3986#section-4.3 - * @return UriInterface Returns a UriInterface instance - * representing the URI of the request. - */ - public function getUri(); - - /** - * Returns an instance with the provided URI. - * - * This method MUST update the Host header of the returned request by - * default if the URI contains a host component. If the URI does not - * contain a host component, any pre-existing Host header MUST be carried - * over to the returned request. - * - * You can opt-in to preserving the original state of the Host header by - * setting `$preserveHost` to `true`. When `$preserveHost` is set to - * `true`, this method interacts with the Host header in the following ways: - * - * - If the Host header is missing or empty, and the new URI contains - * a host component, this method MUST update the Host header in the returned - * request. - * - If the Host header is missing or empty, and the new URI does not contain a - * host component, this method MUST NOT update the Host header in the returned - * request. - * - If a Host header is present and non-empty, this method MUST NOT update - * the Host header in the returned request. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * new UriInterface instance. - * - * @link http://tools.ietf.org/html/rfc3986#section-4.3 - * @param UriInterface $uri New request URI to use. - * @param bool $preserveHost Preserve the original state of the Host header. - * @return static - */ - public function withUri(UriInterface $uri, bool $preserveHost = false); -} diff --git a/vendor/psr/http-message/src/ResponseInterface.php b/vendor/psr/http-message/src/ResponseInterface.php deleted file mode 100644 index f85ca48..0000000 --- a/vendor/psr/http-message/src/ResponseInterface.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Psr\Http\Message; - -/** - * Representation of an outgoing, server-side response. - * - * Per the HTTP specification, this interface includes properties for - * each of the following: - * - * - Protocol version - * - Status code and reason phrase - * - Headers - * - Message body - * - * Responses are considered immutable; all methods that might change state MUST - * be implemented such that they retain the internal state of the current - * message and return an instance that contains the changed state. - */ -interface ResponseInterface extends MessageInterface -{ - /** - * Gets the response status code. - * - * The status code is a 3-digit integer result code of the server's attempt - * to understand and satisfy the request. - * - * @return int Status code. - */ - public function getStatusCode(); - - /** - * Return an instance with the specified status code and, optionally, reason phrase. - * - * If no reason phrase is specified, implementations MAY choose to default - * to the RFC 7231 or IANA recommended reason phrase for the response's - * status code. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated status and reason phrase. - * - * @link http://tools.ietf.org/html/rfc7231#section-6 - * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml - * @param int $code The 3-digit integer result code to set. - * @param string $reasonPhrase The reason phrase to use with the - * provided status code; if none is provided, implementations MAY - * use the defaults as suggested in the HTTP specification. - * @return static - * @throws \InvalidArgumentException For invalid status code arguments. - */ - public function withStatus(int $code, string $reasonPhrase = ''); - - /** - * Gets the response reason phrase associated with the status code. - * - * Because a reason phrase is not a required element in a response - * status line, the reason phrase value MAY be null. Implementations MAY - * choose to return the default RFC 7231 recommended reason phrase (or those - * listed in the IANA HTTP Status Code Registry) for the response's - * status code. - * - * @link http://tools.ietf.org/html/rfc7231#section-6 - * @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml - * @return string Reason phrase; must return an empty string if none present. - */ - public function getReasonPhrase(); -} diff --git a/vendor/psr/http-message/src/ServerRequestInterface.php b/vendor/psr/http-message/src/ServerRequestInterface.php deleted file mode 100644 index 5e6d964..0000000 --- a/vendor/psr/http-message/src/ServerRequestInterface.php +++ /dev/null @@ -1,263 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Psr\Http\Message; - -/** - * Representation of an incoming, server-side HTTP request. - * - * Per the HTTP specification, this interface includes properties for - * each of the following: - * - * - Protocol version - * - HTTP method - * - URI - * - Headers - * - Message body - * - * Additionally, it encapsulates all data as it has arrived to the - * application from the CGI and/or PHP environment, including: - * - * - The values represented in $_SERVER. - * - Any cookies provided (generally via $_COOKIE) - * - Query string arguments (generally via $_GET, or as parsed via parse_str()) - * - Upload files, if any (as represented by $_FILES) - * - Deserialized body parameters (generally from $_POST) - * - * $_SERVER values MUST be treated as immutable, as they represent application - * state at the time of request; as such, no methods are provided to allow - * modification of those values. The other values provide such methods, as they - * can be restored from $_SERVER or the request body, and may need treatment - * during the application (e.g., body parameters may be deserialized based on - * content type). - * - * Additionally, this interface recognizes the utility of introspecting a - * request to derive and match additional parameters (e.g., via URI path - * matching, decrypting cookie values, deserializing non-form-encoded body - * content, matching authorization headers to users, etc). These parameters - * are stored in an "attributes" property. - * - * Requests are considered immutable; all methods that might change state MUST - * be implemented such that they retain the internal state of the current - * message and return an instance that contains the changed state. - */ -interface ServerRequestInterface extends RequestInterface -{ - /** - * Retrieve server parameters. - * - * Retrieves data related to the incoming request environment, - * typically derived from PHP's $_SERVER superglobal. The data IS NOT - * REQUIRED to originate from $_SERVER. - * - * @return array - */ - public function getServerParams(); - - /** - * Retrieve cookies. - * - * Retrieves cookies sent by the client to the server. - * - * The data MUST be compatible with the structure of the $_COOKIE - * superglobal. - * - * @return array - */ - public function getCookieParams(); - - /** - * Return an instance with the specified cookies. - * - * The data IS NOT REQUIRED to come from the $_COOKIE superglobal, but MUST - * be compatible with the structure of $_COOKIE. Typically, this data will - * be injected at instantiation. - * - * This method MUST NOT update the related Cookie header of the request - * instance, nor related values in the server params. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated cookie values. - * - * @param array $cookies Array of key/value pairs representing cookies. - * @return static - */ - public function withCookieParams(array $cookies); - - /** - * Retrieve query string arguments. - * - * Retrieves the deserialized query string arguments, if any. - * - * Note: the query params might not be in sync with the URI or server - * params. If you need to ensure you are only getting the original - * values, you may need to parse the query string from `getUri()->getQuery()` - * or from the `QUERY_STRING` server param. - * - * @return array - */ - public function getQueryParams(); - - /** - * Return an instance with the specified query string arguments. - * - * These values SHOULD remain immutable over the course of the incoming - * request. They MAY be injected during instantiation, such as from PHP's - * $_GET superglobal, or MAY be derived from some other value such as the - * URI. In cases where the arguments are parsed from the URI, the data - * MUST be compatible with what PHP's parse_str() would return for - * purposes of how duplicate query parameters are handled, and how nested - * sets are handled. - * - * Setting query string arguments MUST NOT change the URI stored by the - * request, nor the values in the server params. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated query string arguments. - * - * @param array $query Array of query string arguments, typically from - * $_GET. - * @return static - */ - public function withQueryParams(array $query); - - /** - * Retrieve normalized file upload data. - * - * This method returns upload metadata in a normalized tree, with each leaf - * an instance of Psr\Http\Message\UploadedFileInterface. - * - * These values MAY be prepared from $_FILES or the message body during - * instantiation, or MAY be injected via withUploadedFiles(). - * - * @return array An array tree of UploadedFileInterface instances; an empty - * array MUST be returned if no data is present. - */ - public function getUploadedFiles(); - - /** - * Create a new instance with the specified uploaded files. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param array $uploadedFiles An array tree of UploadedFileInterface instances. - * @return static - * @throws \InvalidArgumentException if an invalid structure is provided. - */ - public function withUploadedFiles(array $uploadedFiles); - - /** - * Retrieve any parameters provided in the request body. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, this method MUST - * return the contents of $_POST. - * - * Otherwise, this method may return any results of deserializing - * the request body content; as parsing returns structured content, the - * potential types MUST be arrays or objects only. A null value indicates - * the absence of body content. - * - * @return null|array|object The deserialized body parameters, if any. - * These will typically be an array or object. - */ - public function getParsedBody(); - - /** - * Return an instance with the specified body parameters. - * - * These MAY be injected during instantiation. - * - * If the request Content-Type is either application/x-www-form-urlencoded - * or multipart/form-data, and the request method is POST, use this method - * ONLY to inject the contents of $_POST. - * - * The data IS NOT REQUIRED to come from $_POST, but MUST be the results of - * deserializing the request body content. Deserialization/parsing returns - * structured data, and, as such, this method ONLY accepts arrays or objects, - * or a null value if nothing was available to parse. - * - * As an example, if content negotiation determines that the request data - * is a JSON payload, this method could be used to create a request - * instance with the deserialized parameters. - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated body parameters. - * - * @param null|array|object $data The deserialized body data. This will - * typically be in an array or object. - * @return static - * @throws \InvalidArgumentException if an unsupported argument type is - * provided. - */ - public function withParsedBody($data); - - /** - * Retrieve attributes derived from the request. - * - * The request "attributes" may be used to allow injection of any - * parameters derived from the request: e.g., the results of path - * match operations; the results of decrypting cookies; the results of - * deserializing non-form-encoded message bodies; etc. Attributes - * will be application and request specific, and CAN be mutable. - * - * @return array Attributes derived from the request. - */ - public function getAttributes(); - - /** - * Retrieve a single derived request attribute. - * - * Retrieves a single derived request attribute as described in - * getAttributes(). If the attribute has not been previously set, returns - * the default value as provided. - * - * This method obviates the need for a hasAttribute() method, as it allows - * specifying a default value to return if the attribute is not found. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $default Default value to return if the attribute does not exist. - * @return mixed - */ - public function getAttribute(string $name, $default = null); - - /** - * Return an instance with the specified derived request attribute. - * - * This method allows setting a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that has the - * updated attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @param mixed $value The value of the attribute. - * @return static - */ - public function withAttribute(string $name, $value); - - /** - * Return an instance that removes the specified derived request attribute. - * - * This method allows removing a single derived request attribute as - * described in getAttributes(). - * - * This method MUST be implemented in such a way as to retain the - * immutability of the message, and MUST return an instance that removes - * the attribute. - * - * @see getAttributes() - * @param string $name The attribute name. - * @return static - */ - public function withoutAttribute(string $name); -} diff --git a/vendor/psr/http-message/src/StreamInterface.php b/vendor/psr/http-message/src/StreamInterface.php deleted file mode 100644 index 5924663..0000000 --- a/vendor/psr/http-message/src/StreamInterface.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Psr\Http\Message; - -/** - * Describes a data stream. - * - * Typically, an instance will wrap a PHP stream; this interface provides - * a wrapper around the most common operations, including serialization of - * the entire stream to a string. - */ -interface StreamInterface -{ - /** - * Reads all data from the stream into a string, from the beginning to end. - * - * This method MUST attempt to seek to the beginning of the stream before - * reading data and read the stream until the end is reached. - * - * Warning: This could attempt to load a large amount of data into memory. - * - * This method MUST NOT raise an exception in order to conform with PHP's - * string casting operations. - * - * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring - * @return string - */ - public function __toString(); - - /** - * Closes the stream and any underlying resources. - * - * @return void - */ - public function close(); - - /** - * Separates any underlying resources from the stream. - * - * After the stream has been detached, the stream is in an unusable state. - * - * @return resource|null Underlying PHP stream, if any - */ - public function detach(); - - /** - * Get the size of the stream if known. - * - * @return int|null Returns the size in bytes if known, or null if unknown. - */ - public function getSize(); - - /** - * Returns the current position of the file read/write pointer - * - * @return int Position of the file pointer - * @throws \RuntimeException on error. - */ - public function tell(); - - /** - * Returns true if the stream is at the end of the stream. - * - * @return bool - */ - public function eof(); - - /** - * Returns whether or not the stream is seekable. - * - * @return bool - */ - public function isSeekable(); - - /** - * Seek to a position in the stream. - * - * @link http://www.php.net/manual/en/function.fseek.php - * @param int $offset Stream offset - * @param int $whence Specifies how the cursor position will be calculated - * based on the seek offset. Valid values are identical to the built-in - * PHP $whence values for `fseek()`. SEEK_SET: Set position equal to - * offset bytes SEEK_CUR: Set position to current location plus offset - * SEEK_END: Set position to end-of-stream plus offset. - * @throws \RuntimeException on failure. - */ - public function seek(int $offset, int $whence = SEEK_SET); - - /** - * Seek to the beginning of the stream. - * - * If the stream is not seekable, this method will raise an exception; - * otherwise, it will perform a seek(0). - * - * @see seek() - * @link http://www.php.net/manual/en/function.fseek.php - * @throws \RuntimeException on failure. - */ - public function rewind(); - - /** - * Returns whether or not the stream is writable. - * - * @return bool - */ - public function isWritable(); - - /** - * Write data to the stream. - * - * @param string $string The string that is to be written. - * @return int Returns the number of bytes written to the stream. - * @throws \RuntimeException on failure. - */ - public function write(string $string); - - /** - * Returns whether or not the stream is readable. - * - * @return bool - */ - public function isReadable(); - - /** - * Read data from the stream. - * - * @param int $length Read up to $length bytes from the object and return - * them. Fewer than $length bytes may be returned if underlying stream - * call returns fewer bytes. - * @return string Returns the data read from the stream, or an empty string - * if no bytes are available. - * @throws \RuntimeException if an error occurs. - */ - public function read(int $length); - - /** - * Returns the remaining contents in a string - * - * @return string - * @throws \RuntimeException if unable to read or an error occurs while - * reading. - */ - public function getContents(); - - /** - * Get stream metadata as an associative array or retrieve a specific key. - * - * The keys returned are identical to the keys returned from PHP's - * stream_get_meta_data() function. - * - * @link http://php.net/manual/en/function.stream-get-meta-data.php - * @param string|null $key Specific metadata to retrieve. - * @return array|mixed|null Returns an associative array if no key is - * provided. Returns a specific key value if a key is provided and the - * value is found, or null if the key is not found. - */ - public function getMetadata(?string $key = null); -} diff --git a/vendor/psr/http-message/src/UploadedFileInterface.php b/vendor/psr/http-message/src/UploadedFileInterface.php deleted file mode 100644 index aba6321..0000000 --- a/vendor/psr/http-message/src/UploadedFileInterface.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Psr\Http\Message; - -/** - * Value object representing a file uploaded through an HTTP request. - * - * Instances of this interface are considered immutable; all methods that - * might change state MUST be implemented such that they retain the internal - * state of the current instance and return an instance that contains the - * changed state. - */ -interface UploadedFileInterface -{ - /** - * Retrieve a stream representing the uploaded file. - * - * This method MUST return a StreamInterface instance, representing the - * uploaded file. The purpose of this method is to allow utilizing native PHP - * stream functionality to manipulate the file upload, such as - * stream_copy_to_stream() (though the result will need to be decorated in a - * native PHP stream wrapper to work with such functions). - * - * If the moveTo() method has been called previously, this method MUST raise - * an exception. - * - * @return StreamInterface Stream representation of the uploaded file. - * @throws \RuntimeException in cases when no stream is available or can be - * created. - */ - public function getStream(); - - /** - * Move the uploaded file to a new location. - * - * Use this method as an alternative to move_uploaded_file(). This method is - * guaranteed to work in both SAPI and non-SAPI environments. - * Implementations must determine which environment they are in, and use the - * appropriate method (move_uploaded_file(), rename(), or a stream - * operation) to perform the operation. - * - * $targetPath may be an absolute path, or a relative path. If it is a - * relative path, resolution should be the same as used by PHP's rename() - * function. - * - * The original file or stream MUST be removed on completion. - * - * If this method is called more than once, any subsequent calls MUST raise - * an exception. - * - * When used in an SAPI environment where $_FILES is populated, when writing - * files via moveTo(), is_uploaded_file() and move_uploaded_file() SHOULD be - * used to ensure permissions and upload status are verified correctly. - * - * If you wish to move to a stream, use getStream(), as SAPI operations - * cannot guarantee writing to stream destinations. - * - * @see http://php.net/is_uploaded_file - * @see http://php.net/move_uploaded_file - * @param string $targetPath Path to which to move the uploaded file. - * @throws \InvalidArgumentException if the $targetPath specified is invalid. - * @throws \RuntimeException on any error during the move operation, or on - * the second or subsequent call to the method. - */ - public function moveTo(string $targetPath); - - /** - * Retrieve the file size. - * - * Implementations SHOULD return the value stored in the "size" key of - * the file in the $_FILES array if available, as PHP calculates this based - * on the actual size transmitted. - * - * @return int|null The file size in bytes or null if unknown. - */ - public function getSize(); - - /** - * Retrieve the error associated with the uploaded file. - * - * The return value MUST be one of PHP's UPLOAD_ERR_XXX constants. - * - * If the file was uploaded successfully, this method MUST return - * UPLOAD_ERR_OK. - * - * Implementations SHOULD return the value stored in the "error" key of - * the file in the $_FILES array. - * - * @see http://php.net/manual/en/features.file-upload.errors.php - * @return int One of PHP's UPLOAD_ERR_XXX constants. - */ - public function getError(); - - /** - * Retrieve the filename sent by the client. - * - * Do not trust the value returned by this method. A client could send - * a malicious filename with the intention to corrupt or hack your - * application. - * - * Implementations SHOULD return the value stored in the "name" key of - * the file in the $_FILES array. - * - * @return string|null The filename sent by the client or null if none - * was provided. - */ - public function getClientFilename(); - - /** - * Retrieve the media type sent by the client. - * - * Do not trust the value returned by this method. A client could send - * a malicious media type with the intention to corrupt or hack your - * application. - * - * Implementations SHOULD return the value stored in the "type" key of - * the file in the $_FILES array. - * - * @return string|null The media type sent by the client or null if none - * was provided. - */ - public function getClientMediaType(); -} diff --git a/vendor/psr/http-message/src/UriInterface.php b/vendor/psr/http-message/src/UriInterface.php deleted file mode 100644 index d974de0..0000000 --- a/vendor/psr/http-message/src/UriInterface.php +++ /dev/null @@ -1,326 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Psr\Http\Message; - -/** - * Value object representing a URI. - * - * This interface is meant to represent URIs according to RFC 3986 and to - * provide methods for most common operations. Additional functionality for - * working with URIs can be provided on top of the interface or externally. - * Its primary use is for HTTP requests, but may also be used in other - * contexts. - * - * Instances of this interface are considered immutable; all methods that - * might change state MUST be implemented such that they retain the internal - * state of the current instance and return an instance that contains the - * changed state. - * - * Typically the Host header will be also be present in the request message. - * For server-side requests, the scheme will typically be discoverable in the - * server parameters. - * - * @link http://tools.ietf.org/html/rfc3986 (the URI specification) - */ -interface UriInterface -{ - /** - * Retrieve the scheme component of the URI. - * - * If no scheme is present, this method MUST return an empty string. - * - * The value returned MUST be normalized to lowercase, per RFC 3986 - * Section 3.1. - * - * The trailing ":" character is not part of the scheme and MUST NOT be - * added. - * - * @see https://tools.ietf.org/html/rfc3986#section-3.1 - * @return string The URI scheme. - */ - public function getScheme(); - - /** - * Retrieve the authority component of the URI. - * - * If no authority information is present, this method MUST return an empty - * string. - * - * The authority syntax of the URI is: - * - * <pre> - * [user-info@]host[:port] - * </pre> - * - * If the port component is not set or is the standard port for the current - * scheme, it SHOULD NOT be included. - * - * @see https://tools.ietf.org/html/rfc3986#section-3.2 - * @return string The URI authority, in "[user-info@]host[:port]" format. - */ - public function getAuthority(); - - /** - * Retrieve the user information component of the URI. - * - * If no user information is present, this method MUST return an empty - * string. - * - * If a user is present in the URI, this will return that value; - * additionally, if the password is also present, it will be appended to the - * user value, with a colon (":") separating the values. - * - * The trailing "@" character is not part of the user information and MUST - * NOT be added. - * - * @return string The URI user information, in "username[:password]" format. - */ - public function getUserInfo(); - - /** - * Retrieve the host component of the URI. - * - * If no host is present, this method MUST return an empty string. - * - * The value returned MUST be normalized to lowercase, per RFC 3986 - * Section 3.2.2. - * - * @see http://tools.ietf.org/html/rfc3986#section-3.2.2 - * @return string The URI host. - */ - public function getHost(); - - /** - * Retrieve the port component of the URI. - * - * If a port is present, and it is non-standard for the current scheme, - * this method MUST return it as an integer. If the port is the standard port - * used with the current scheme, this method SHOULD return null. - * - * If no port is present, and no scheme is present, this method MUST return - * a null value. - * - * If no port is present, but a scheme is present, this method MAY return - * the standard port for that scheme, but SHOULD return null. - * - * @return null|int The URI port. - */ - public function getPort(); - - /** - * Retrieve the path component of the URI. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * Normally, the empty path "" and absolute path "/" are considered equal as - * defined in RFC 7230 Section 2.7.3. But this method MUST NOT automatically - * do this normalization because in contexts with a trimmed base path, e.g. - * the front controller, this difference becomes significant. It's the task - * of the user to handle both "" and "/". - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.3. - * - * As an example, if the value should include a slash ("/") not intended as - * delimiter between path segments, that value MUST be passed in encoded - * form (e.g., "%2F") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.3 - * @return string The URI path. - */ - public function getPath(); - - /** - * Retrieve the query string of the URI. - * - * If no query string is present, this method MUST return an empty string. - * - * The leading "?" character is not part of the query and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.4. - * - * As an example, if a value in a key/value pair of the query string should - * include an ampersand ("&") not intended as a delimiter between values, - * that value MUST be passed in encoded form (e.g., "%26") to the instance. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.4 - * @return string The URI query string. - */ - public function getQuery(); - - /** - * Retrieve the fragment component of the URI. - * - * If no fragment is present, this method MUST return an empty string. - * - * The leading "#" character is not part of the fragment and MUST NOT be - * added. - * - * The value returned MUST be percent-encoded, but MUST NOT double-encode - * any characters. To determine what characters to encode, please refer to - * RFC 3986, Sections 2 and 3.5. - * - * @see https://tools.ietf.org/html/rfc3986#section-2 - * @see https://tools.ietf.org/html/rfc3986#section-3.5 - * @return string The URI fragment. - */ - public function getFragment(); - - /** - * Return an instance with the specified scheme. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified scheme. - * - * Implementations MUST support the schemes "http" and "https" case - * insensitively, and MAY accommodate other schemes if required. - * - * An empty scheme is equivalent to removing the scheme. - * - * @param string $scheme The scheme to use with the new instance. - * @return static A new instance with the specified scheme. - * @throws \InvalidArgumentException for invalid or unsupported schemes. - */ - public function withScheme(string $scheme); - - /** - * Return an instance with the specified user information. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified user information. - * - * Password is optional, but the user information MUST include the - * user; an empty string for the user is equivalent to removing user - * information. - * - * @param string $user The user name to use for authority. - * @param null|string $password The password associated with $user. - * @return static A new instance with the specified user information. - */ - public function withUserInfo(string $user, ?string $password = null); - - /** - * Return an instance with the specified host. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified host. - * - * An empty host value is equivalent to removing the host. - * - * @param string $host The hostname to use with the new instance. - * @return static A new instance with the specified host. - * @throws \InvalidArgumentException for invalid hostnames. - */ - public function withHost(string $host); - - /** - * Return an instance with the specified port. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified port. - * - * Implementations MUST raise an exception for ports outside the - * established TCP and UDP port ranges. - * - * A null value provided for the port is equivalent to removing the port - * information. - * - * @param null|int $port The port to use with the new instance; a null value - * removes the port information. - * @return static A new instance with the specified port. - * @throws \InvalidArgumentException for invalid ports. - */ - public function withPort(?int $port); - - /** - * Return an instance with the specified path. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified path. - * - * The path can either be empty or absolute (starting with a slash) or - * rootless (not starting with a slash). Implementations MUST support all - * three syntaxes. - * - * If the path is intended to be domain-relative rather than path relative then - * it must begin with a slash ("/"). Paths not starting with a slash ("/") - * are assumed to be relative to some base path known to the application or - * consumer. - * - * Users can provide both encoded and decoded path characters. - * Implementations ensure the correct encoding as outlined in getPath(). - * - * @param string $path The path to use with the new instance. - * @return static A new instance with the specified path. - * @throws \InvalidArgumentException for invalid paths. - */ - public function withPath(string $path); - - /** - * Return an instance with the specified query string. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified query string. - * - * Users can provide both encoded and decoded query characters. - * Implementations ensure the correct encoding as outlined in getQuery(). - * - * An empty query string value is equivalent to removing the query string. - * - * @param string $query The query string to use with the new instance. - * @return static A new instance with the specified query string. - * @throws \InvalidArgumentException for invalid query strings. - */ - public function withQuery(string $query); - - /** - * Return an instance with the specified URI fragment. - * - * This method MUST retain the state of the current instance, and return - * an instance that contains the specified URI fragment. - * - * Users can provide both encoded and decoded fragment characters. - * Implementations ensure the correct encoding as outlined in getFragment(). - * - * An empty fragment value is equivalent to removing the fragment. - * - * @param string $fragment The fragment to use with the new instance. - * @return static A new instance with the specified fragment. - */ - public function withFragment(string $fragment); - - /** - * Return the string representation as a URI reference. - * - * Depending on which components of the URI are present, the resulting - * string is either a full URI or relative reference according to RFC 3986, - * Section 4.1. The method concatenates the various components of the URI, - * using the appropriate delimiters: - * - * - If a scheme is present, it MUST be suffixed by ":". - * - If an authority is present, it MUST be prefixed by "//". - * - The path can be concatenated without delimiters. But there are two - * cases where the path has to be adjusted to make the URI reference - * valid as PHP does not allow to throw an exception in __toString(): - * - If the path is rootless and an authority is present, the path MUST - * be prefixed by "/". - * - If the path is starting with more than one "/" and no authority is - * present, the starting slashes MUST be reduced to one. - * - If a query is present, it MUST be prefixed by "?". - * - If a fragment is present, it MUST be prefixed by "#". - * - * @see http://tools.ietf.org/html/rfc3986#section-4.1 - * @return string - */ - public function __toString(); -} diff --git a/vendor/psr/log/LICENSE b/vendor/psr/log/LICENSE deleted file mode 100644 index 474c952..0000000 --- a/vendor/psr/log/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012 PHP Framework Interoperability Group - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/psr/log/Psr/Log/AbstractLogger.php b/vendor/psr/log/Psr/Log/AbstractLogger.php deleted file mode 100644 index e02f9da..0000000 --- a/vendor/psr/log/Psr/Log/AbstractLogger.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * This is a simple Logger implementation that other Loggers can inherit from. - * - * It simply delegates all log-level-specific methods to the `log` method to - * reduce boilerplate code that a simple Logger that does the same thing with - * messages regardless of the error level has to implement. - */ -abstract class AbstractLogger implements LoggerInterface -{ - /** - * System is unusable. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function emergency($message, array $context = array()) - { - $this->log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } -} diff --git a/vendor/psr/log/Psr/Log/InvalidArgumentException.php b/vendor/psr/log/Psr/Log/InvalidArgumentException.php deleted file mode 100644 index 67f852d..0000000 --- a/vendor/psr/log/Psr/Log/InvalidArgumentException.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -namespace Psr\Log; - -class InvalidArgumentException extends \InvalidArgumentException -{ -} diff --git a/vendor/psr/log/Psr/Log/LogLevel.php b/vendor/psr/log/Psr/Log/LogLevel.php deleted file mode 100644 index 9cebcac..0000000 --- a/vendor/psr/log/Psr/Log/LogLevel.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * Describes log levels. - */ -class LogLevel -{ - const EMERGENCY = 'emergency'; - const ALERT = 'alert'; - const CRITICAL = 'critical'; - const ERROR = 'error'; - const WARNING = 'warning'; - const NOTICE = 'notice'; - const INFO = 'info'; - const DEBUG = 'debug'; -} diff --git a/vendor/psr/log/Psr/Log/LoggerAwareInterface.php b/vendor/psr/log/Psr/Log/LoggerAwareInterface.php deleted file mode 100644 index 4d64f47..0000000 --- a/vendor/psr/log/Psr/Log/LoggerAwareInterface.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * Describes a logger-aware instance. - */ -interface LoggerAwareInterface -{ - /** - * Sets a logger instance on the object. - * - * @param LoggerInterface $logger - * - * @return void - */ - public function setLogger(LoggerInterface $logger); -} diff --git a/vendor/psr/log/Psr/Log/LoggerAwareTrait.php b/vendor/psr/log/Psr/Log/LoggerAwareTrait.php deleted file mode 100644 index 82bf45c..0000000 --- a/vendor/psr/log/Psr/Log/LoggerAwareTrait.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * Basic Implementation of LoggerAwareInterface. - */ -trait LoggerAwareTrait -{ - /** - * The logger instance. - * - * @var LoggerInterface|null - */ - protected $logger; - - /** - * Sets a logger. - * - * @param LoggerInterface $logger - */ - public function setLogger(LoggerInterface $logger) - { - $this->logger = $logger; - } -} diff --git a/vendor/psr/log/Psr/Log/LoggerInterface.php b/vendor/psr/log/Psr/Log/LoggerInterface.php deleted file mode 100644 index 2206cfd..0000000 --- a/vendor/psr/log/Psr/Log/LoggerInterface.php +++ /dev/null @@ -1,125 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * Describes a logger instance. - * - * The message MUST be a string or object implementing __toString(). - * - * The message MAY contain placeholders in the form: {foo} where foo - * will be replaced by the context data in key "foo". - * - * The context array can contain arbitrary data. The only assumption that - * can be made by implementors is that if an Exception instance is given - * to produce a stack trace, it MUST be in a key named "exception". - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md - * for the full interface specification. - */ -interface LoggerInterface -{ - /** - * System is unusable. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function emergency($message, array $context = array()); - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function alert($message, array $context = array()); - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function critical($message, array $context = array()); - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function error($message, array $context = array()); - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function warning($message, array $context = array()); - - /** - * Normal but significant events. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function notice($message, array $context = array()); - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function info($message, array $context = array()); - - /** - * Detailed debug information. - * - * @param string $message - * @param mixed[] $context - * - * @return void - */ - public function debug($message, array $context = array()); - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param mixed[] $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - public function log($level, $message, array $context = array()); -} diff --git a/vendor/psr/log/Psr/Log/LoggerTrait.php b/vendor/psr/log/Psr/Log/LoggerTrait.php deleted file mode 100644 index e392fef..0000000 --- a/vendor/psr/log/Psr/Log/LoggerTrait.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * This is a simple Logger trait that classes unable to extend AbstractLogger - * (because they extend another class, etc) can include. - * - * It simply delegates all log-level-specific methods to the `log` method to - * reduce boilerplate code that a simple Logger that does the same thing with - * messages regardless of the error level has to implement. - */ -trait LoggerTrait -{ - /** - * System is unusable. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function emergency($message, array $context = array()) - { - $this->log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = array()) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = array()) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = array()) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = array()) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = array()) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = array()) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = array()) - { - $this->log(LogLevel::DEBUG, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - abstract public function log($level, $message, array $context = array()); -} diff --git a/vendor/psr/log/Psr/Log/NullLogger.php b/vendor/psr/log/Psr/Log/NullLogger.php deleted file mode 100644 index c8f7293..0000000 --- a/vendor/psr/log/Psr/Log/NullLogger.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace Psr\Log; - -/** - * This Logger can be used to avoid conditional log calls. - * - * Logging should always be optional, and if no logger is provided to your - * library creating a NullLogger instance to have something to throw logs at - * is a good way to avoid littering your code with `if ($this->logger) { }` - * blocks. - */ -class NullLogger extends AbstractLogger -{ - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - * - * @throws \Psr\Log\InvalidArgumentException - */ - public function log($level, $message, array $context = array()) - { - // noop - } -} diff --git a/vendor/psr/log/Psr/Log/Test/DummyTest.php b/vendor/psr/log/Psr/Log/Test/DummyTest.php deleted file mode 100644 index 9638c11..0000000 --- a/vendor/psr/log/Psr/Log/Test/DummyTest.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace Psr\Log\Test; - -/** - * This class is internal and does not follow the BC promise. - * - * Do NOT use this class in any way. - * - * @internal - */ -class DummyTest -{ - public function __toString() - { - return 'DummyTest'; - } -} diff --git a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php deleted file mode 100644 index e1e5354..0000000 --- a/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -namespace Psr\Log\Test; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use PHPUnit\Framework\TestCase; - -/** - * Provides a base test class for ensuring compliance with the LoggerInterface. - * - * Implementors can extend the class and implement abstract methods to run this - * as part of their test suite. - */ -abstract class LoggerInterfaceTest extends TestCase -{ - /** - * @return LoggerInterface - */ - abstract public function getLogger(); - - /** - * This must return the log messages in order. - * - * The simple formatting of the messages is: "<LOG LEVEL> <MESSAGE>". - * - * Example ->error('Foo') would yield "error Foo". - * - * @return string[] - */ - abstract public function getLogs(); - - public function testImplements() - { - $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); - } - - /** - * @dataProvider provideLevelsAndMessages - */ - public function testLogsAtAllLevels($level, $message) - { - $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); - - $expected = array( - $level.' message of level '.$level.' with context: Bob', - $level.' message of level '.$level.' with context: Bob', - ); - $this->assertEquals($expected, $this->getLogs()); - } - - public function provideLevelsAndMessages() - { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); - } - - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ - public function testThrowsOnInvalidLevel() - { - $logger = $this->getLogger(); - $logger->log('invalid level', 'Foo'); - } - - public function testContextReplacement() - { - $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); - - $expected = array('info {Message {nothing} Bob Bar a}'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testObjectCastToString() - { - if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString')); - } else { - $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); - } - $dummy->expects($this->once()) - ->method('__toString') - ->will($this->returnValue('DUMMY')); - - $this->getLogger()->warning($dummy); - - $expected = array('warning DUMMY'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextCanContainAnything() - { - $closed = fopen('php://memory', 'r'); - fclose($closed); - - $context = array( - 'bool' => true, - 'null' => null, - 'string' => 'Foo', - 'int' => 0, - 'float' => 0.5, - 'nested' => array('with object' => new DummyTest), - 'object' => new \DateTime, - 'resource' => fopen('php://memory', 'r'), - 'closed' => $closed, - ); - - $this->getLogger()->warning('Crazy context data', $context); - - $expected = array('warning Crazy context data'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextExceptionKeyCanBeExceptionOrOtherValues() - { - $logger = $this->getLogger(); - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); - - $expected = array( - 'warning Random message', - 'critical Uncaught Exception!' - ); - $this->assertEquals($expected, $this->getLogs()); - } -} diff --git a/vendor/psr/log/Psr/Log/Test/TestLogger.php b/vendor/psr/log/Psr/Log/Test/TestLogger.php deleted file mode 100644 index 1be3230..0000000 --- a/vendor/psr/log/Psr/Log/Test/TestLogger.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php - -namespace Psr\Log\Test; - -use Psr\Log\AbstractLogger; - -/** - * Used for testing purposes. - * - * It records all records and gives you access to them for verification. - * - * @method bool hasEmergency($record) - * @method bool hasAlert($record) - * @method bool hasCritical($record) - * @method bool hasError($record) - * @method bool hasWarning($record) - * @method bool hasNotice($record) - * @method bool hasInfo($record) - * @method bool hasDebug($record) - * - * @method bool hasEmergencyRecords() - * @method bool hasAlertRecords() - * @method bool hasCriticalRecords() - * @method bool hasErrorRecords() - * @method bool hasWarningRecords() - * @method bool hasNoticeRecords() - * @method bool hasInfoRecords() - * @method bool hasDebugRecords() - * - * @method bool hasEmergencyThatContains($message) - * @method bool hasAlertThatContains($message) - * @method bool hasCriticalThatContains($message) - * @method bool hasErrorThatContains($message) - * @method bool hasWarningThatContains($message) - * @method bool hasNoticeThatContains($message) - * @method bool hasInfoThatContains($message) - * @method bool hasDebugThatContains($message) - * - * @method bool hasEmergencyThatMatches($message) - * @method bool hasAlertThatMatches($message) - * @method bool hasCriticalThatMatches($message) - * @method bool hasErrorThatMatches($message) - * @method bool hasWarningThatMatches($message) - * @method bool hasNoticeThatMatches($message) - * @method bool hasInfoThatMatches($message) - * @method bool hasDebugThatMatches($message) - * - * @method bool hasEmergencyThatPasses($message) - * @method bool hasAlertThatPasses($message) - * @method bool hasCriticalThatPasses($message) - * @method bool hasErrorThatPasses($message) - * @method bool hasWarningThatPasses($message) - * @method bool hasNoticeThatPasses($message) - * @method bool hasInfoThatPasses($message) - * @method bool hasDebugThatPasses($message) - */ -class TestLogger extends AbstractLogger -{ - /** - * @var array - */ - public $records = []; - - public $recordsByLevel = []; - - /** - * @inheritdoc - */ - public function log($level, $message, array $context = []) - { - $record = [ - 'level' => $level, - 'message' => $message, - 'context' => $context, - ]; - - $this->recordsByLevel[$record['level']][] = $record; - $this->records[] = $record; - } - - public function hasRecords($level) - { - return isset($this->recordsByLevel[$level]); - } - - public function hasRecord($record, $level) - { - if (is_string($record)) { - $record = ['message' => $record]; - } - return $this->hasRecordThatPasses(function ($rec) use ($record) { - if ($rec['message'] !== $record['message']) { - return false; - } - if (isset($record['context']) && $rec['context'] !== $record['context']) { - return false; - } - return true; - }, $level); - } - - public function hasRecordThatContains($message, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($message) { - return strpos($rec['message'], $message) !== false; - }, $level); - } - - public function hasRecordThatMatches($regex, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($regex) { - return preg_match($regex, $rec['message']) > 0; - }, $level); - } - - public function hasRecordThatPasses(callable $predicate, $level) - { - if (!isset($this->recordsByLevel[$level])) { - return false; - } - foreach ($this->recordsByLevel[$level] as $i => $rec) { - if (call_user_func($predicate, $rec, $i)) { - return true; - } - } - return false; - } - - public function __call($method, $args) - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = strtolower($matches[2]); - if (method_exists($this, $genericMethod)) { - $args[] = $level; - return call_user_func_array([$this, $genericMethod], $args); - } - } - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); - } - - public function reset() - { - $this->records = []; - $this->recordsByLevel = []; - } -} diff --git a/vendor/psr/log/README.md b/vendor/psr/log/README.md deleted file mode 100644 index a9f20c4..0000000 --- a/vendor/psr/log/README.md +++ /dev/null @@ -1,58 +0,0 @@ -PSR Log -======= - -This repository holds all interfaces/classes/traits related to -[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md). - -Note that this is not a logger of its own. It is merely an interface that -describes a logger. See the specification for more details. - -Installation ------------- - -```bash -composer require psr/log -``` - -Usage ------ - -If you need a logger, you can use the interface like this: - -```php -<?php - -use Psr\Log\LoggerInterface; - -class Foo -{ - private $logger; - - public function __construct(LoggerInterface $logger = null) - { - $this->logger = $logger; - } - - public function doSomething() - { - if ($this->logger) { - $this->logger->info('Doing work'); - } - - try { - $this->doSomethingElse(); - } catch (Exception $exception) { - $this->logger->error('Oh no!', array('exception' => $exception)); - } - - // do something useful - } -} -``` - -You can then pick one of the implementations of the interface to get a logger. - -If you want to implement the interface, you can require this package and -implement `Psr\Log\LoggerInterface` in your code. Please read the -[specification text](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -for details. diff --git a/vendor/psr/log/composer.json b/vendor/psr/log/composer.json deleted file mode 100644 index ca05695..0000000 --- a/vendor/psr/log/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "psr/log", - "description": "Common interface for logging libraries", - "keywords": ["psr", "psr-3", "log"], - "homepage": "https://github.com/php-fig/log", - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - } -} diff --git a/vendor/psr/simple-cache/.editorconfig b/vendor/psr/simple-cache/.editorconfig deleted file mode 100644 index 48542cb..0000000 --- a/vendor/psr/simple-cache/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -; This file is for unifying the coding style for different editors and IDEs. -; More information at http://editorconfig.org - -root = true - -[*] -charset = utf-8 -indent_size = 4 -indent_style = space -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true diff --git a/vendor/psr/simple-cache/LICENSE.md b/vendor/psr/simple-cache/LICENSE.md deleted file mode 100644 index e49a7c8..0000000 --- a/vendor/psr/simple-cache/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# The MIT License (MIT) - -Copyright (c) 2016 PHP Framework Interoperability Group - -> Permission is hereby granted, free of charge, to any person obtaining a copy -> of this software and associated documentation files (the "Software"), to deal -> in the Software without restriction, including without limitation the rights -> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -> copies of the Software, and to permit persons to whom the Software is -> furnished to do so, subject to the following conditions: -> -> The above copyright notice and this permission notice shall be included in -> all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -> THE SOFTWARE. diff --git a/vendor/psr/simple-cache/README.md b/vendor/psr/simple-cache/README.md deleted file mode 100644 index 43641d1..0000000 --- a/vendor/psr/simple-cache/README.md +++ /dev/null @@ -1,8 +0,0 @@ -PHP FIG Simple Cache PSR -======================== - -This repository holds all interfaces related to PSR-16. - -Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details. - -You can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package. diff --git a/vendor/psr/simple-cache/composer.json b/vendor/psr/simple-cache/composer.json deleted file mode 100644 index 2978fa5..0000000 --- a/vendor/psr/simple-cache/composer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "psr/simple-cache", - "description": "Common interfaces for simple caching", - "keywords": ["psr", "psr-16", "cache", "simple-cache", "caching"], - "license": "MIT", - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "require": { - "php": ">=5.3.0" - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/vendor/psr/simple-cache/src/CacheException.php b/vendor/psr/simple-cache/src/CacheException.php deleted file mode 100644 index eba5381..0000000 --- a/vendor/psr/simple-cache/src/CacheException.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -namespace Psr\SimpleCache; - -/** - * Interface used for all types of exceptions thrown by the implementing library. - */ -interface CacheException -{ -} diff --git a/vendor/psr/simple-cache/src/CacheInterface.php b/vendor/psr/simple-cache/src/CacheInterface.php deleted file mode 100644 index 99e8d95..0000000 --- a/vendor/psr/simple-cache/src/CacheInterface.php +++ /dev/null @@ -1,114 +0,0 @@ -<?php - -namespace Psr\SimpleCache; - -interface CacheInterface -{ - /** - * Fetches a value from the cache. - * - * @param string $key The unique key of this item in the cache. - * @param mixed $default Default value to return if the key does not exist. - * - * @return mixed The value of the item from the cache, or $default in case of cache miss. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if the $key string is not a legal value. - */ - public function get($key, $default = null); - - /** - * Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. - * - * @param string $key The key of the item to store. - * @param mixed $value The value of the item to store, must be serializable. - * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and - * the driver supports TTL then the library may set a default value - * for it or let the driver take care of that. - * - * @return bool True on success and false on failure. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if the $key string is not a legal value. - */ - public function set($key, $value, $ttl = null); - - /** - * Delete an item from the cache by its unique key. - * - * @param string $key The unique cache key of the item to delete. - * - * @return bool True if the item was successfully removed. False if there was an error. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if the $key string is not a legal value. - */ - public function delete($key); - - /** - * Wipes clean the entire cache's keys. - * - * @return bool True on success and false on failure. - */ - public function clear(); - - /** - * Obtains multiple cache items by their unique keys. - * - * @param iterable $keys A list of keys that can obtained in a single operation. - * @param mixed $default Default value to return for keys that do not exist. - * - * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $keys is neither an array nor a Traversable, - * or if any of the $keys are not a legal value. - */ - public function getMultiple($keys, $default = null); - - /** - * Persists a set of key => value pairs in the cache, with an optional TTL. - * - * @param iterable $values A list of key => value pairs for a multiple-set operation. - * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and - * the driver supports TTL then the library may set a default value - * for it or let the driver take care of that. - * - * @return bool True on success and false on failure. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $values is neither an array nor a Traversable, - * or if any of the $values are not a legal value. - */ - public function setMultiple($values, $ttl = null); - - /** - * Deletes multiple cache items in a single operation. - * - * @param iterable $keys A list of string-based keys to be deleted. - * - * @return bool True if the items were successfully removed. False if there was an error. - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if $keys is neither an array nor a Traversable, - * or if any of the $keys are not a legal value. - */ - public function deleteMultiple($keys); - - /** - * Determines whether an item is present in the cache. - * - * NOTE: It is recommended that has() is only to be used for cache warming type purposes - * and not to be used within your live applications operations for get/set, as this method - * is subject to a race condition where your has() will return true and immediately after, - * another script can remove it making the state of your app out of date. - * - * @param string $key The cache item key. - * - * @return bool - * - * @throws \Psr\SimpleCache\InvalidArgumentException - * MUST be thrown if the $key string is not a legal value. - */ - public function has($key); -} diff --git a/vendor/psr/simple-cache/src/InvalidArgumentException.php b/vendor/psr/simple-cache/src/InvalidArgumentException.php deleted file mode 100644 index 6a9524a..0000000 --- a/vendor/psr/simple-cache/src/InvalidArgumentException.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -namespace Psr\SimpleCache; - -/** - * Exception interface for invalid cache arguments. - * - * When an invalid argument is passed it must throw an exception which implements - * this interface - */ -interface InvalidArgumentException extends CacheException -{ -} diff --git a/vendor/ralouphie/getallheaders/LICENSE b/vendor/ralouphie/getallheaders/LICENSE deleted file mode 100644 index be5540c..0000000 --- a/vendor/ralouphie/getallheaders/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Ralph Khattar - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/ralouphie/getallheaders/README.md b/vendor/ralouphie/getallheaders/README.md deleted file mode 100644 index 9430d76..0000000 --- a/vendor/ralouphie/getallheaders/README.md +++ /dev/null @@ -1,27 +0,0 @@ -getallheaders -============= - -PHP `getallheaders()` polyfill. Compatible with PHP >= 5.3. - -[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) -[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) -[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) -[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) -[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) - - -This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). - -## Install - -For PHP version **`>= 5.6`**: - -``` -composer require ralouphie/getallheaders -``` - -For PHP version **`< 5.6`**: - -``` -composer require ralouphie/getallheaders "^2" -``` diff --git a/vendor/ralouphie/getallheaders/composer.json b/vendor/ralouphie/getallheaders/composer.json deleted file mode 100644 index de8ce62..0000000 --- a/vendor/ralouphie/getallheaders/composer.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "ralouphie/getallheaders", - "description": "A polyfill for getallheaders.", - "license": "MIT", - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "^5 || ^6.5", - "php-coveralls/php-coveralls": "^2.1" - }, - "autoload": { - "files": ["src/getallheaders.php"] - }, - "autoload-dev": { - "psr-4": { - "getallheaders\\Tests\\": "tests/" - } - } -} diff --git a/vendor/ralouphie/getallheaders/src/getallheaders.php b/vendor/ralouphie/getallheaders/src/getallheaders.php deleted file mode 100644 index c7285a5..0000000 --- a/vendor/ralouphie/getallheaders/src/getallheaders.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -if (!function_exists('getallheaders')) { - - /** - * Get all HTTP header key/values as an associative array for the current request. - * - * @return string[string] The HTTP header key/value pairs. - */ - function getallheaders() - { - $headers = array(); - - $copy_server = array( - 'CONTENT_TYPE' => 'Content-Type', - 'CONTENT_LENGTH' => 'Content-Length', - 'CONTENT_MD5' => 'Content-Md5', - ); - - foreach ($_SERVER as $key => $value) { - if (substr($key, 0, 5) === 'HTTP_') { - $key = substr($key, 5); - if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { - $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); - $headers[$key] = $value; - } - } elseif (isset($copy_server[$key])) { - $headers[$copy_server[$key]] = $value; - } - } - - if (!isset($headers['Authorization'])) { - if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { - $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; - } elseif (isset($_SERVER['PHP_AUTH_USER'])) { - $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; - $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); - } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { - $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; - } - } - - return $headers; - } - -} diff --git a/vendor/services.php b/vendor/services.php deleted file mode 100644 index 19d052d..0000000 --- a/vendor/services.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -// This file is automatically generated at:2024-04-05 12:46:10 -declare (strict_types = 1); -return array ( - 0 => 'think\\app\\Service', - 1 => 'think\\queue\\Service', - 2 => 'think\\trace\\Service', -); \ No newline at end of file diff --git a/vendor/symfony/cache-contracts/.gitignore b/vendor/symfony/cache-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/cache-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/cache-contracts/CHANGELOG.md b/vendor/symfony/cache-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/cache-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/cache-contracts/CacheInterface.php b/vendor/symfony/cache-contracts/CacheInterface.php deleted file mode 100644 index 70cb0d5..0000000 --- a/vendor/symfony/cache-contracts/CacheInterface.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Covers most simple to advanced caching needs. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface CacheInterface -{ - /** - * Fetches a value from the pool or computes it if not found. - * - * On cache misses, a callback is called that should return the missing value. - * This callback is given a PSR-6 CacheItemInterface instance corresponding to the - * requested key, that could be used e.g. for expiration control. It could also - * be an ItemInterface instance when its additional features are needed. - * - * @param string $key The key of the item to retrieve from the cache - * @param callable|CallbackInterface $callback Should return the computed value for the given key/item - * @param float|null $beta A float that, as it grows, controls the likeliness of triggering - * early expiration. 0 disables it, INF forces immediate expiration. - * The default (or providing null) is implementation dependent but should - * typically be 1.0, which should provide optimal stampede protection. - * See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration - * @param array &$metadata The metadata of the cached item {@see ItemInterface::getMetadata()} - * - * @return mixed - * - * @throws InvalidArgumentException When $key is not valid or when $beta is negative - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null); - - /** - * Removes an item from the pool. - * - * @param string $key The key to delete - * - * @return bool True if the item was successfully removed, false if there was any error - * - * @throws InvalidArgumentException When $key is not valid - */ - public function delete(string $key): bool; -} diff --git a/vendor/symfony/cache-contracts/CacheTrait.php b/vendor/symfony/cache-contracts/CacheTrait.php deleted file mode 100644 index b9feafb..0000000 --- a/vendor/symfony/cache-contracts/CacheTrait.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemPoolInterface; -use Psr\Cache\InvalidArgumentException; -use Psr\Log\LoggerInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(InvalidArgumentException::class); - -/** - * An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -trait CacheTrait -{ - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null) - { - return $this->doGet($this, $key, $callback, $beta, $metadata); - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - private function doGet(CacheItemPoolInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null, ?LoggerInterface $logger = null) - { - if (0 > $beta = $beta ?? 1.0) { - throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)) extends \InvalidArgumentException implements InvalidArgumentException { }; - } - - $item = $pool->getItem($key); - $recompute = !$item->isHit() || \INF === $beta; - $metadata = $item instanceof ItemInterface ? $item->getMetadata() : []; - - if (!$recompute && $metadata) { - $expiry = $metadata[ItemInterface::METADATA_EXPIRY] ?? false; - $ctime = $metadata[ItemInterface::METADATA_CTIME] ?? false; - - if ($recompute = $ctime && $expiry && $expiry <= ($now = microtime(true)) - $ctime / 1000 * $beta * log(random_int(1, \PHP_INT_MAX) / \PHP_INT_MAX)) { - // force applying defaultLifetime to expiry - $item->expiresAt(null); - $logger && $logger->info('Item "{key}" elected for early recomputation {delta}s before its expiration', [ - 'key' => $key, - 'delta' => sprintf('%.1f', $expiry - $now), - ]); - } - } - - if ($recompute) { - $save = true; - $item->set($callback($item, $save)); - if ($save) { - $pool->save($item); - } - } - - return $item->get(); - } -} diff --git a/vendor/symfony/cache-contracts/CallbackInterface.php b/vendor/symfony/cache-contracts/CallbackInterface.php deleted file mode 100644 index 7dae2aa..0000000 --- a/vendor/symfony/cache-contracts/CallbackInterface.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheItemInterface; - -/** - * Computes and returns the cached value of an item. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface CallbackInterface -{ - /** - * @param CacheItemInterface|ItemInterface $item The item to compute the value for - * @param bool &$save Should be set to false when the value should not be saved in the pool - * - * @return mixed The computed value for the passed item - */ - public function __invoke(CacheItemInterface $item, bool &$save); -} diff --git a/vendor/symfony/cache-contracts/ItemInterface.php b/vendor/symfony/cache-contracts/ItemInterface.php deleted file mode 100644 index 10c0488..0000000 --- a/vendor/symfony/cache-contracts/ItemInterface.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\CacheException; -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; - -/** - * Augments PSR-6's CacheItemInterface with support for tags and metadata. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface ItemInterface extends CacheItemInterface -{ - /** - * References the Unix timestamp stating when the item will expire. - */ - public const METADATA_EXPIRY = 'expiry'; - - /** - * References the time the item took to be created, in milliseconds. - */ - public const METADATA_CTIME = 'ctime'; - - /** - * References the list of tags that were assigned to the item, as string[]. - */ - public const METADATA_TAGS = 'tags'; - - /** - * Reserved characters that cannot be used in a key or tag. - */ - public const RESERVED_CHARACTERS = '{}()/\@:'; - - /** - * Adds a tag to a cache item. - * - * Tags are strings that follow the same validation rules as keys. - * - * @param string|string[] $tags A tag or array of tags - * - * @return $this - * - * @throws InvalidArgumentException When $tag is not valid - * @throws CacheException When the item comes from a pool that is not tag-aware - */ - public function tag($tags): self; - - /** - * Returns a list of metadata info that were saved alongside with the cached value. - * - * See ItemInterface::METADATA_* consts for keys potentially found in the returned array. - */ - public function getMetadata(): array; -} diff --git a/vendor/symfony/cache-contracts/LICENSE b/vendor/symfony/cache-contracts/LICENSE deleted file mode 100644 index 7536cae..0000000 --- a/vendor/symfony/cache-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/cache-contracts/README.md b/vendor/symfony/cache-contracts/README.md deleted file mode 100644 index 7085a69..0000000 --- a/vendor/symfony/cache-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Cache Contracts -======================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/cache-contracts/TagAwareCacheInterface.php b/vendor/symfony/cache-contracts/TagAwareCacheInterface.php deleted file mode 100644 index 7c4cf11..0000000 --- a/vendor/symfony/cache-contracts/TagAwareCacheInterface.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Cache; - -use Psr\Cache\InvalidArgumentException; - -/** - * Allows invalidating cached items using tags. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface TagAwareCacheInterface extends CacheInterface -{ - /** - * Invalidates cached items using tags. - * - * When implemented on a PSR-6 pool, invalidation should not apply - * to deferred items. Instead, they should be committed as usual. - * This allows replacing old tagged values by new ones without - * race conditions. - * - * @param string[] $tags An array of tags to invalidate - * - * @return bool True on success - * - * @throws InvalidArgumentException When $tags is not valid - */ - public function invalidateTags(array $tags); -} diff --git a/vendor/symfony/cache-contracts/composer.json b/vendor/symfony/cache-contracts/composer.json deleted file mode 100644 index 9f45e17..0000000 --- a/vendor/symfony/cache-contracts/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/cache-contracts", - "type": "library", - "description": "Generic abstractions related to caching", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "suggest": { - "symfony/cache-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Cache\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/cache/Adapter/AbstractAdapter.php b/vendor/symfony/cache/Adapter/AbstractAdapter.php deleted file mode 100644 index de5af17..0000000 --- a/vendor/symfony/cache/Adapter/AbstractAdapter.php +++ /dev/null @@ -1,208 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\AbstractAdapterTrait; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -abstract class AbstractAdapter implements AdapterInterface, CacheInterface, LoggerAwareInterface, ResettableInterface -{ - use AbstractAdapterTrait; - use ContractsTrait; - - /** - * @internal - */ - protected const NS_SEPARATOR = ':'; - - private static $apcuSupported; - private static $phpFilesSupported; - - protected function __construct(string $namespace = '', int $defaultLifetime = 0) - { - $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).static::NS_SEPARATOR; - $this->defaultLifetime = $defaultLifetime; - if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) { - throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); - } - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $v = $value; - $item->isHit = $isHit; - // Detect wrapped values that encode for their expiry and creation duration - // For compactness, these values are packed in the key of an array using - // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (\is_array($v) && 1 === \count($v) && 10 === \strlen($k = (string) array_key_first($v)) && "\x9D" === $k[0] && "\0" === $k[5] && "\x5F" === $k[9]) { - $item->value = $v[$k]; - $v = unpack('Ve/Nc', substr($k, 1, -1)); - $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET; - $item->metadata[CacheItem::METADATA_CTIME] = $v['c']; - } - - return $item; - }, - null, - CacheItem::class - ); - self::$mergeByLifetime ?? self::$mergeByLifetime = \Closure::bind( - static function ($deferred, $namespace, &$expiredIds, $getId, $defaultLifetime) { - $byLifetime = []; - $now = microtime(true); - $expiredIds = []; - - foreach ($deferred as $key => $item) { - $key = (string) $key; - if (null === $item->expiry) { - $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0; - } elseif (!$item->expiry) { - $ttl = 0; - } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) { - $expiredIds[] = $getId($key); - continue; - } - if (isset(($metadata = $item->newMetadata)[CacheItem::METADATA_TAGS])) { - unset($metadata[CacheItem::METADATA_TAGS]); - } - // For compactness, expiry and creation duration are packed in the key of an array, using magic numbers as separators - $byLifetime[$ttl][$getId($key)] = $metadata ? ["\x9D".pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME])."\x5F" => $item->value] : $item->value; - } - - return $byLifetime; - }, - null, - CacheItem::class - ); - } - - /** - * Returns the best possible adapter that your runtime supports. - * - * Using ApcuAdapter makes system caches compatible with read-only filesystems. - * - * @return AdapterInterface - */ - public static function createSystemCache(string $namespace, int $defaultLifetime, string $version, string $directory, ?LoggerInterface $logger = null) - { - $opcache = new PhpFilesAdapter($namespace, $defaultLifetime, $directory, true); - if (null !== $logger) { - $opcache->setLogger($logger); - } - - if (!self::$apcuSupported = self::$apcuSupported ?? ApcuAdapter::isSupported()) { - return $opcache; - } - - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { - return $opcache; - } - - $apcu = new ApcuAdapter($namespace, intdiv($defaultLifetime, 5), $version); - if (null !== $logger) { - $apcu->setLogger($logger); - } - - return new ChainAdapter([$apcu, $opcache]); - } - - public static function createConnection(string $dsn, array $options = []) - { - if (str_starts_with($dsn, 'redis:') || str_starts_with($dsn, 'rediss:')) { - return RedisAdapter::createConnection($dsn, $options); - } - if (str_starts_with($dsn, 'memcached:')) { - return MemcachedAdapter::createConnection($dsn, $options); - } - if (0 === strpos($dsn, 'couchbase:')) { - if (CouchbaseBucketAdapter::isSupported()) { - return CouchbaseBucketAdapter::createConnection($dsn, $options); - } - - return CouchbaseCollectionAdapter::createConnection($dsn, $options); - } - - throw new InvalidArgumentException('Unsupported DSN: it does not start with "redis[s]:", "memcached:" nor "couchbase:".'); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - $ok = true; - $byLifetime = (self::$mergeByLifetime)($this->deferred, $this->namespace, $expiredIds, \Closure::fromCallable([$this, 'getId']), $this->defaultLifetime); - $retry = $this->deferred = []; - - if ($expiredIds) { - try { - $this->doDelete($expiredIds); - } catch (\Exception $e) { - $ok = false; - CacheItem::log($this->logger, 'Failed to delete expired items: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - } - foreach ($byLifetime as $lifetime => $values) { - try { - $e = $this->doSave($values, $lifetime); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - if (\is_array($e) || 1 === \count($values)) { - foreach (\is_array($e) ? $e : array_keys($values) as $id) { - $ok = false; - $v = $values[$id]; - $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } else { - foreach ($values as $id => $v) { - $retry[$lifetime][] = $id; - } - } - } - - // When bulk-save failed, retry each item individually - foreach ($retry as $lifetime => $ids) { - foreach ($ids as $id) { - try { - $v = $byLifetime[$lifetime][$id]; - $e = $this->doSave([$id => $v], $lifetime); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - $ok = false; - $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } - - return $ok; - } -} diff --git a/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php b/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php deleted file mode 100644 index a384b16..0000000 --- a/vendor/symfony/cache/Adapter/AbstractTagAwareAdapter.php +++ /dev/null @@ -1,330 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Log\LoggerAwareInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\AbstractAdapterTrait; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * Abstract for native TagAware adapters. - * - * To keep info on tags, the tags are both serialized as part of cache value and provided as tag ids - * to Adapters on operations when needed for storage to doSave(), doDelete() & doInvalidate(). - * - * @author Nicolas Grekas <p@tchwork.com> - * @author André Rømcke <andre.romcke+symfony@gmail.com> - * - * @internal - */ -abstract class AbstractTagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, LoggerAwareInterface, ResettableInterface -{ - use AbstractAdapterTrait; - use ContractsTrait; - - private const TAGS_PREFIX = "\0tags\0"; - - protected function __construct(string $namespace = '', int $defaultLifetime = 0) - { - $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':'; - $this->defaultLifetime = $defaultLifetime; - if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) { - throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace)); - } - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->isTaggable = true; - // If structure does not match what we expect return item as is (no value and not a hit) - if (!\is_array($value) || !\array_key_exists('value', $value)) { - return $item; - } - $item->isHit = $isHit; - // Extract value, tags and meta data from the cache value - $item->value = $value['value']; - $item->metadata[CacheItem::METADATA_TAGS] = $value['tags'] ?? []; - if (isset($value['meta'])) { - // For compactness these values are packed, & expiry is offset to reduce size - $v = unpack('Ve/Nc', $value['meta']); - $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET; - $item->metadata[CacheItem::METADATA_CTIME] = $v['c']; - } - - return $item; - }, - null, - CacheItem::class - ); - self::$mergeByLifetime ?? self::$mergeByLifetime = \Closure::bind( - static function ($deferred, &$expiredIds, $getId, $tagPrefix, $defaultLifetime) { - $byLifetime = []; - $now = microtime(true); - $expiredIds = []; - - foreach ($deferred as $key => $item) { - $key = (string) $key; - if (null === $item->expiry) { - $ttl = 0 < $defaultLifetime ? $defaultLifetime : 0; - } elseif (!$item->expiry) { - $ttl = 0; - } elseif (0 >= $ttl = (int) (0.1 + $item->expiry - $now)) { - $expiredIds[] = $getId($key); - continue; - } - // Store Value and Tags on the cache value - if (isset(($metadata = $item->newMetadata)[CacheItem::METADATA_TAGS])) { - $value = ['value' => $item->value, 'tags' => $metadata[CacheItem::METADATA_TAGS]]; - unset($metadata[CacheItem::METADATA_TAGS]); - } else { - $value = ['value' => $item->value, 'tags' => []]; - } - - if ($metadata) { - // For compactness, expiry and creation duration are packed, using magic numbers as separators - $value['meta'] = pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME]); - } - - // Extract tag changes, these should be removed from values in doSave() - $value['tag-operations'] = ['add' => [], 'remove' => []]; - $oldTags = $item->metadata[CacheItem::METADATA_TAGS] ?? []; - foreach (array_diff($value['tags'], $oldTags) as $addedTag) { - $value['tag-operations']['add'][] = $getId($tagPrefix.$addedTag); - } - foreach (array_diff($oldTags, $value['tags']) as $removedTag) { - $value['tag-operations']['remove'][] = $getId($tagPrefix.$removedTag); - } - - $byLifetime[$ttl][$getId($key)] = $value; - $item->metadata = $item->newMetadata; - } - - return $byLifetime; - }, - null, - CacheItem::class - ); - } - - /** - * Persists several cache items immediately. - * - * @param array $values The values to cache, indexed by their cache identifier - * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning - * @param array[] $addTagData Hash where key is tag id, and array value is list of cache id's to add to tag - * @param array[] $removeTagData Hash where key is tag id, and array value is list of cache id's to remove to tag - * - * @return array The identifiers that failed to be cached or a boolean stating if caching succeeded or not - */ - abstract protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array; - - /** - * Removes multiple items from the pool and their corresponding tags. - * - * @param array $ids An array of identifiers that should be removed from the pool - * - * @return bool - */ - abstract protected function doDelete(array $ids); - - /** - * Removes relations between tags and deleted items. - * - * @param array $tagData Array of tag => key identifiers that should be removed from the pool - */ - abstract protected function doDeleteTagRelations(array $tagData): bool; - - /** - * Invalidates cached items using tags. - * - * @param string[] $tagIds An array of tags to invalidate, key is tag and value is tag id - */ - abstract protected function doInvalidate(array $tagIds): bool; - - /** - * Delete items and yields the tags they were bound to. - */ - protected function doDeleteYieldTags(array $ids): iterable - { - foreach ($this->doFetch($ids) as $id => $value) { - yield $id => \is_array($value) && \is_array($value['tags'] ?? null) ? $value['tags'] : []; - } - - $this->doDelete($ids); - } - - /** - * {@inheritdoc} - */ - public function commit(): bool - { - $ok = true; - $byLifetime = (self::$mergeByLifetime)($this->deferred, $expiredIds, \Closure::fromCallable([$this, 'getId']), self::TAGS_PREFIX, $this->defaultLifetime); - $retry = $this->deferred = []; - - if ($expiredIds) { - // Tags are not cleaned up in this case, however that is done on invalidateTags(). - try { - $this->doDelete($expiredIds); - } catch (\Exception $e) { - $ok = false; - CacheItem::log($this->logger, 'Failed to delete expired items: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - } - foreach ($byLifetime as $lifetime => $values) { - try { - $values = $this->extractTagData($values, $addTagData, $removeTagData); - $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - if (\is_array($e) || 1 === \count($values)) { - foreach (\is_array($e) ? $e : array_keys($values) as $id) { - $ok = false; - $v = $values[$id]; - $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } else { - foreach ($values as $id => $v) { - $retry[$lifetime][] = $id; - } - } - } - - // When bulk-save failed, retry each item individually - foreach ($retry as $lifetime => $ids) { - foreach ($ids as $id) { - try { - $v = $byLifetime[$lifetime][$id]; - $values = $this->extractTagData([$id => $v], $addTagData, $removeTagData); - $e = $this->doSave($values, $lifetime, $addTagData, $removeTagData); - } catch (\Exception $e) { - } - if (true === $e || [] === $e) { - continue; - } - $ok = false; - $type = get_debug_type($v); - $message = sprintf('Failed to save key "{key}" of type %s%s', $type, $e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => substr($id, \strlen($this->namespace)), 'exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - public function deleteItems(array $keys): bool - { - if (!$keys) { - return true; - } - - $ok = true; - $ids = []; - $tagData = []; - - foreach ($keys as $key) { - $ids[$key] = $this->getId($key); - unset($this->deferred[$key]); - } - - try { - foreach ($this->doDeleteYieldTags(array_values($ids)) as $id => $tags) { - foreach ($tags as $tag) { - $tagData[$this->getId(self::TAGS_PREFIX.$tag)][] = $id; - } - } - } catch (\Exception $e) { - $ok = false; - } - - try { - if ((!$tagData || $this->doDeleteTagRelations($tagData)) && $ok) { - return true; - } - } catch (\Exception $e) { - } - - // When bulk-delete failed, retry each item individually - foreach ($ids as $key => $id) { - try { - $e = null; - if ($this->doDelete([$id])) { - continue; - } - } catch (\Exception $e) { - } - $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $ok = false; - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - public function invalidateTags(array $tags) - { - if (empty($tags)) { - return false; - } - - $tagIds = []; - foreach (array_unique($tags) as $tag) { - $tagIds[] = $this->getId(self::TAGS_PREFIX.$tag); - } - - try { - if ($this->doInvalidate($tagIds)) { - return true; - } - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to invalidate tags: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - return false; - } - - /** - * Extracts tags operation data from $values set in mergeByLifetime, and returns values without it. - */ - private function extractTagData(array $values, ?array &$addTagData, ?array &$removeTagData): array - { - $addTagData = $removeTagData = []; - foreach ($values as $id => $value) { - foreach ($value['tag-operations']['add'] as $tag => $tagId) { - $addTagData[$tagId][] = $id; - } - - foreach ($value['tag-operations']['remove'] as $tag => $tagId) { - $removeTagData[$tagId][] = $id; - } - - unset($values[$id]['tag-operations']); - } - - return $values; - } -} diff --git a/vendor/symfony/cache/Adapter/AdapterInterface.php b/vendor/symfony/cache/Adapter/AdapterInterface.php deleted file mode 100644 index f8dce86..0000000 --- a/vendor/symfony/cache/Adapter/AdapterInterface.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; - -// Help opcache.preload discover always-needed symbols -class_exists(CacheItem::class); - -/** - * Interface for adapters managing instances of Symfony's CacheItem. - * - * @author Kévin Dunglas <dunglas@gmail.com> - */ -interface AdapterInterface extends CacheItemPoolInterface -{ - /** - * {@inheritdoc} - * - * @return CacheItem - */ - public function getItem($key); - - /** - * {@inheritdoc} - * - * @return \Traversable<string, CacheItem> - */ - public function getItems(array $keys = []); - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = ''); -} diff --git a/vendor/symfony/cache/Adapter/ApcuAdapter.php b/vendor/symfony/cache/Adapter/ApcuAdapter.php deleted file mode 100644 index 639e314..0000000 --- a/vendor/symfony/cache/Adapter/ApcuAdapter.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class ApcuAdapter extends AbstractAdapter -{ - private $marshaller; - - /** - * @throws CacheException if APCu is not enabled - */ - public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $version = null, ?MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('APCu is not enabled.'); - } - if ('cli' === \PHP_SAPI) { - ini_set('apc.use_request_time', 0); - } - parent::__construct($namespace, $defaultLifetime); - - if (null !== $version) { - CacheItem::validateKey($version); - - if (!apcu_exists($version.'@'.$namespace)) { - $this->doClear($namespace); - apcu_add($version.'@'.$namespace, null); - } - } - - $this->marshaller = $marshaller; - } - - public static function isSupported() - { - return \function_exists('apcu_fetch') && filter_var(\ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN); - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); - try { - $values = []; - $ids = array_flip($ids); - foreach (apcu_fetch(array_keys($ids), $ok) ?: [] as $k => $v) { - if (!isset($ids[$k])) { - // work around https://github.com/krakjoe/apcu/issues/247 - $k = key($ids); - } - unset($ids[$k]); - - if (null !== $v || $ok) { - $values[$k] = null !== $this->marshaller ? $this->marshaller->unmarshall($v) : $v; - } - } - - return $values; - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } finally { - ini_set('unserialize_callback_func', $unserializeCallbackHandler); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return apcu_exists($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - return isset($namespace[0]) && class_exists(\APCUIterator::class, false) && ('cli' !== \PHP_SAPI || filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) - ? apcu_delete(new \APCUIterator(sprintf('/^%s/', preg_quote($namespace, '/')), \APC_ITER_KEY)) - : apcu_clear_cache(); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - foreach ($ids as $id) { - apcu_delete($id); - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (null !== $this->marshaller && (!$values = $this->marshaller->marshall($values, $failed))) { - return $failed; - } - - try { - if (false === $failures = apcu_store($values, null, $lifetime)) { - $failures = $values; - } - - return array_keys($failures); - } catch (\Throwable $e) { - if (1 === \count($values)) { - // Workaround https://github.com/krakjoe/apcu/issues/170 - apcu_delete(array_key_first($values)); - } - - throw $e; - } - } -} diff --git a/vendor/symfony/cache/Adapter/ArrayAdapter.php b/vendor/symfony/cache/Adapter/ArrayAdapter.php deleted file mode 100644 index b251814..0000000 --- a/vendor/symfony/cache/Adapter/ArrayAdapter.php +++ /dev/null @@ -1,407 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * An in-memory cache storage. - * - * Acts as a least-recently-used (LRU) storage when configured with a maximum number of items. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class ArrayAdapter implements AdapterInterface, CacheInterface, LoggerAwareInterface, ResettableInterface -{ - use LoggerAwareTrait; - - private $storeSerialized; - private $values = []; - private $expiries = []; - private $defaultLifetime; - private $maxLifetime; - private $maxItems; - - private static $createCacheItem; - - /** - * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise - */ - public function __construct(int $defaultLifetime = 0, bool $storeSerialized = true, float $maxLifetime = 0, int $maxItems = 0) - { - if (0 > $maxLifetime) { - throw new InvalidArgumentException(sprintf('Argument $maxLifetime must be positive, %F passed.', $maxLifetime)); - } - - if (0 > $maxItems) { - throw new InvalidArgumentException(sprintf('Argument $maxItems must be a positive integer, %d passed.', $maxItems)); - } - - $this->defaultLifetime = $defaultLifetime; - $this->storeSerialized = $storeSerialized; - $this->maxLifetime = $maxLifetime; - $this->maxItems = $maxItems; - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->isHit = $isHit; - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null) - { - $item = $this->getItem($key); - $metadata = $item->getMetadata(); - - // ArrayAdapter works in memory, we don't care about stampede protection - if (\INF === $beta || !$item->isHit()) { - $save = true; - $item->set($callback($item, $save)); - if ($save) { - $this->save($item); - } - } - - return $item->get(); - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - if (\is_string($key) && isset($this->expiries[$key]) && $this->expiries[$key] > microtime(true)) { - if ($this->maxItems) { - // Move the item last in the storage - $value = $this->values[$key]; - unset($this->values[$key]); - $this->values[$key] = $value; - } - - return true; - } - \assert('' !== CacheItem::validateKey($key)); - - return isset($this->expiries[$key]) && !$this->deleteItem($key); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - if (!$isHit = $this->hasItem($key)) { - $value = null; - - if (!$this->maxItems) { - // Track misses in non-LRU mode only - $this->values[$key] = null; - } - } else { - $value = $this->storeSerialized ? $this->unfreeze($key, $isHit) : $this->values[$key]; - } - - return (self::$createCacheItem)($key, $value, $isHit); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - \assert(self::validateKeys($keys)); - - return $this->generateItems($keys, microtime(true), self::$createCacheItem); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - \assert('' !== CacheItem::validateKey($key)); - unset($this->values[$key], $this->expiries[$key]); - - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - foreach ($keys as $key) { - $this->deleteItem($key); - } - - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $item = (array) $item; - $key = $item["\0*\0key"]; - $value = $item["\0*\0value"]; - $expiry = $item["\0*\0expiry"]; - - $now = microtime(true); - - if (null !== $expiry) { - if (!$expiry) { - $expiry = \PHP_INT_MAX; - } elseif ($expiry <= $now) { - $this->deleteItem($key); - - return true; - } - } - if ($this->storeSerialized && null === $value = $this->freeze($value, $key)) { - return false; - } - if (null === $expiry && 0 < $this->defaultLifetime) { - $expiry = $this->defaultLifetime; - $expiry = $now + ($expiry > ($this->maxLifetime ?: $expiry) ? $this->maxLifetime : $expiry); - } elseif ($this->maxLifetime && (null === $expiry || $expiry > $now + $this->maxLifetime)) { - $expiry = $now + $this->maxLifetime; - } - - if ($this->maxItems) { - unset($this->values[$key]); - - // Iterate items and vacuum expired ones while we are at it - foreach ($this->values as $k => $v) { - if ($this->expiries[$k] > $now && \count($this->values) < $this->maxItems) { - break; - } - - unset($this->values[$k], $this->expiries[$k]); - } - } - - $this->values[$key] = $value; - $this->expiries[$key] = $expiry ?? \PHP_INT_MAX; - - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - return $this->save($item); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - if ('' !== $prefix) { - $now = microtime(true); - - foreach ($this->values as $key => $value) { - if (!isset($this->expiries[$key]) || $this->expiries[$key] <= $now || 0 === strpos($key, $prefix)) { - unset($this->values[$key], $this->expiries[$key]); - } - } - - if ($this->values) { - return true; - } - } - - $this->values = $this->expiries = []; - - return true; - } - - /** - * Returns all cached values, with cache miss as null. - * - * @return array - */ - public function getValues() - { - if (!$this->storeSerialized) { - return $this->values; - } - - $values = $this->values; - foreach ($values as $k => $v) { - if (null === $v || 'N;' === $v) { - continue; - } - if (!\is_string($v) || !isset($v[2]) || ':' !== $v[1]) { - $values[$k] = serialize($v); - } - } - - return $values; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->clear(); - } - - private function generateItems(array $keys, float $now, \Closure $f): \Generator - { - foreach ($keys as $i => $key) { - if (!$isHit = isset($this->expiries[$key]) && ($this->expiries[$key] > $now || !$this->deleteItem($key))) { - $value = null; - - if (!$this->maxItems) { - // Track misses in non-LRU mode only - $this->values[$key] = null; - } - } else { - if ($this->maxItems) { - // Move the item last in the storage - $value = $this->values[$key]; - unset($this->values[$key]); - $this->values[$key] = $value; - } - - $value = $this->storeSerialized ? $this->unfreeze($key, $isHit) : $this->values[$key]; - } - unset($keys[$i]); - - yield $key => $f($key, $value, $isHit); - } - - foreach ($keys as $key) { - yield $key => $f($key, null, false); - } - } - - private function freeze($value, string $key) - { - if (null === $value) { - return 'N;'; - } - if (\is_string($value)) { - // Serialize strings if they could be confused with serialized objects or arrays - if ('N;' === $value || (isset($value[2]) && ':' === $value[1])) { - return serialize($value); - } - } elseif (!\is_scalar($value)) { - try { - $serialized = serialize($value); - } catch (\Exception $e) { - unset($this->values[$key]); - $type = get_debug_type($value); - $message = sprintf('Failed to save key "{key}" of type %s: %s', $type, $e->getMessage()); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return; - } - // Keep value serialized if it contains any objects or any internal references - if ('C' === $serialized[0] || 'O' === $serialized[0] || preg_match('/;[OCRr]:[1-9]/', $serialized)) { - return $serialized; - } - } - - return $value; - } - - private function unfreeze(string $key, bool &$isHit) - { - if ('N;' === $value = $this->values[$key]) { - return null; - } - if (\is_string($value) && isset($value[2]) && ':' === $value[1]) { - try { - $value = unserialize($value); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to unserialize key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $value = false; - } - if (false === $value) { - $value = null; - $isHit = false; - - if (!$this->maxItems) { - $this->values[$key] = null; - } - } - } - - return $value; - } - - private function validateKeys(array $keys): bool - { - foreach ($keys as $key) { - if (!\is_string($key) || !isset($this->expiries[$key])) { - CacheItem::validateKey($key); - } - } - - return true; - } -} diff --git a/vendor/symfony/cache/Adapter/ChainAdapter.php b/vendor/symfony/cache/Adapter/ChainAdapter.php deleted file mode 100644 index 7d95528..0000000 --- a/vendor/symfony/cache/Adapter/ChainAdapter.php +++ /dev/null @@ -1,342 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Chains several adapters together. - * - * Cached items are fetched from the first adapter having them in its data store. - * They are saved and deleted in all adapters at once. - * - * @author Kévin Dunglas <dunglas@gmail.com> - */ -class ChainAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - - private $adapters = []; - private $adapterCount; - private $defaultLifetime; - - private static $syncItem; - - /** - * @param CacheItemPoolInterface[] $adapters The ordered list of adapters used to fetch cached items - * @param int $defaultLifetime The default lifetime of items propagated from lower adapters to upper ones - */ - public function __construct(array $adapters, int $defaultLifetime = 0) - { - if (!$adapters) { - throw new InvalidArgumentException('At least one adapter must be specified.'); - } - - foreach ($adapters as $adapter) { - if (!$adapter instanceof CacheItemPoolInterface) { - throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', get_debug_type($adapter), CacheItemPoolInterface::class)); - } - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && $adapter instanceof ApcuAdapter && !filter_var(\ini_get('apc.enable_cli'), \FILTER_VALIDATE_BOOLEAN)) { - continue; // skip putting APCu in the chain when the backend is disabled - } - - if ($adapter instanceof AdapterInterface) { - $this->adapters[] = $adapter; - } else { - $this->adapters[] = new ProxyAdapter($adapter); - } - } - $this->adapterCount = \count($this->adapters); - $this->defaultLifetime = $defaultLifetime; - - self::$syncItem ?? self::$syncItem = \Closure::bind( - static function ($sourceItem, $item, $defaultLifetime, $sourceMetadata = null) { - $sourceItem->isTaggable = false; - $sourceMetadata = $sourceMetadata ?? $sourceItem->metadata; - unset($sourceMetadata[CacheItem::METADATA_TAGS]); - - $item->value = $sourceItem->value; - $item->isHit = $sourceItem->isHit; - $item->metadata = $item->newMetadata = $sourceItem->metadata = $sourceMetadata; - - if (isset($item->metadata[CacheItem::METADATA_EXPIRY])) { - $item->expiresAt(\DateTime::createFromFormat('U.u', sprintf('%.6F', $item->metadata[CacheItem::METADATA_EXPIRY]))); - } elseif (0 < $defaultLifetime) { - $item->expiresAfter($defaultLifetime); - } - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null) - { - $doSave = true; - $callback = static function (CacheItem $item, bool &$save) use ($callback, &$doSave) { - $value = $callback($item, $save); - $doSave = $save; - - return $value; - }; - - $lastItem = null; - $i = 0; - $wrap = function (?CacheItem $item = null, bool &$save = true) use ($key, $callback, $beta, &$wrap, &$i, &$doSave, &$lastItem, &$metadata) { - $adapter = $this->adapters[$i]; - if (isset($this->adapters[++$i])) { - $callback = $wrap; - $beta = \INF === $beta ? \INF : 0; - } - if ($adapter instanceof CacheInterface) { - $value = $adapter->get($key, $callback, $beta, $metadata); - } else { - $value = $this->doGet($adapter, $key, $callback, $beta, $metadata); - } - if (null !== $item) { - (self::$syncItem)($lastItem = $lastItem ?? $item, $item, $this->defaultLifetime, $metadata); - } - $save = $doSave; - - return $value; - }; - - return $wrap(); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $syncItem = self::$syncItem; - $misses = []; - - foreach ($this->adapters as $i => $adapter) { - $item = $adapter->getItem($key); - - if ($item->isHit()) { - while (0 <= --$i) { - $this->adapters[$i]->save($syncItem($item, $misses[$i], $this->defaultLifetime)); - } - - return $item; - } - - $misses[$i] = $item; - } - - return $item; - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - return $this->generateItems($this->adapters[0]->getItems($keys), 0); - } - - private function generateItems(iterable $items, int $adapterIndex): \Generator - { - $missing = []; - $misses = []; - $nextAdapterIndex = $adapterIndex + 1; - $nextAdapter = $this->adapters[$nextAdapterIndex] ?? null; - - foreach ($items as $k => $item) { - if (!$nextAdapter || $item->isHit()) { - yield $k => $item; - } else { - $missing[] = $k; - $misses[$k] = $item; - } - } - - if ($missing) { - $syncItem = self::$syncItem; - $adapter = $this->adapters[$adapterIndex]; - $items = $this->generateItems($nextAdapter->getItems($missing), $nextAdapterIndex); - - foreach ($items as $k => $item) { - if ($item->isHit()) { - $adapter->save($syncItem($item, $misses[$k], $this->defaultLifetime)); - } - - yield $k => $item; - } - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - foreach ($this->adapters as $adapter) { - if ($adapter->hasItem($key)) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - $cleared = true; - $i = $this->adapterCount; - - while ($i--) { - if ($this->adapters[$i] instanceof AdapterInterface) { - $cleared = $this->adapters[$i]->clear($prefix) && $cleared; - } else { - $cleared = $this->adapters[$i]->clear() && $cleared; - } - } - - return $cleared; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - $deleted = true; - $i = $this->adapterCount; - - while ($i--) { - $deleted = $this->adapters[$i]->deleteItem($key) && $deleted; - } - - return $deleted; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - $deleted = true; - $i = $this->adapterCount; - - while ($i--) { - $deleted = $this->adapters[$i]->deleteItems($keys) && $deleted; - } - - return $deleted; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - $saved = true; - $i = $this->adapterCount; - - while ($i--) { - $saved = $this->adapters[$i]->save($item) && $saved; - } - - return $saved; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - $saved = true; - $i = $this->adapterCount; - - while ($i--) { - $saved = $this->adapters[$i]->saveDeferred($item) && $saved; - } - - return $saved; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - $committed = true; - $i = $this->adapterCount; - - while ($i--) { - $committed = $this->adapters[$i]->commit() && $committed; - } - - return $committed; - } - - /** - * {@inheritdoc} - */ - public function prune() - { - $pruned = true; - - foreach ($this->adapters as $adapter) { - if ($adapter instanceof PruneableInterface) { - $pruned = $adapter->prune() && $pruned; - } - } - - return $pruned; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - foreach ($this->adapters as $adapter) { - if ($adapter instanceof ResetInterface) { - $adapter->reset(); - } - } - } -} diff --git a/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php b/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php deleted file mode 100644 index 84ab281..0000000 --- a/vendor/symfony/cache/Adapter/CouchbaseBucketAdapter.php +++ /dev/null @@ -1,252 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Antonio Jose Cerezo Aranda <aj.cerezo@gmail.com> - */ -class CouchbaseBucketAdapter extends AbstractAdapter -{ - private const THIRTY_DAYS_IN_SECONDS = 2592000; - private const MAX_KEY_LENGTH = 250; - private const KEY_NOT_FOUND = 13; - private const VALID_DSN_OPTIONS = [ - 'operationTimeout', - 'configTimeout', - 'configNodeTimeout', - 'n1qlTimeout', - 'httpTimeout', - 'configDelay', - 'htconfigIdleTimeout', - 'durabilityInterval', - 'durabilityTimeout', - ]; - - private $bucket; - private $marshaller; - - public function __construct(\CouchbaseBucket $bucket, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 2.6.0 < 3.0.0 is required.'); - } - - $this->maxIdLength = static::MAX_KEY_LENGTH; - - $this->bucket = $bucket; - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * @param array|string $servers - */ - public static function createConnection($servers, array $options = []): \CouchbaseBucket - { - if (\is_string($servers)) { - $servers = [$servers]; - } elseif (!\is_array($servers)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be array or string, "%s" given.', __METHOD__, get_debug_type($servers))); - } - - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 2.6.0 < 3.0.0 is required.'); - } - - set_error_handler(function ($type, $msg, $file, $line) { throw new \ErrorException($msg, 0, $type, $file, $line); }); - - $dsnPattern = '/^(?<protocol>couchbase(?:s)?)\:\/\/(?:(?<username>[^\:]+)\:(?<password>[^\@]{6,})@)?' - .'(?<host>[^\:]+(?:\:\d+)?)(?:\/(?<bucketName>[^\?]+))(?:\?(?<options>.*))?$/i'; - - $newServers = []; - $protocol = 'couchbase'; - try { - $options = self::initOptions($options); - $username = $options['username']; - $password = $options['password']; - - foreach ($servers as $dsn) { - if (0 !== strpos($dsn, 'couchbase:')) { - throw new InvalidArgumentException('Invalid Couchbase DSN: it does not start with "couchbase:".'); - } - - preg_match($dsnPattern, $dsn, $matches); - - $username = $matches['username'] ?: $username; - $password = $matches['password'] ?: $password; - $protocol = $matches['protocol'] ?: $protocol; - - if (isset($matches['options'])) { - $optionsInDsn = self::getOptions($matches['options']); - - foreach ($optionsInDsn as $parameter => $value) { - $options[$parameter] = $value; - } - } - - $newServers[] = $matches['host']; - } - - $connectionString = $protocol.'://'.implode(',', $newServers); - - $client = new \CouchbaseCluster($connectionString); - $client->authenticateAs($username, $password); - - $bucket = $client->openBucket($matches['bucketName']); - - unset($options['username'], $options['password']); - foreach ($options as $option => $value) { - if (!empty($value)) { - $bucket->$option = $value; - } - } - - return $bucket; - } finally { - restore_error_handler(); - } - } - - public static function isSupported(): bool - { - return \extension_loaded('couchbase') && version_compare(phpversion('couchbase'), '2.6.0', '>=') && version_compare(phpversion('couchbase'), '3.0', '<'); - } - - private static function getOptions(string $options): array - { - $results = []; - $optionsInArray = explode('&', $options); - - foreach ($optionsInArray as $option) { - [$key, $value] = explode('=', $option); - - if (\in_array($key, static::VALID_DSN_OPTIONS, true)) { - $results[$key] = $value; - } - } - - return $results; - } - - private static function initOptions(array $options): array - { - $options['username'] = $options['username'] ?? ''; - $options['password'] = $options['password'] ?? ''; - $options['operationTimeout'] = $options['operationTimeout'] ?? 0; - $options['configTimeout'] = $options['configTimeout'] ?? 0; - $options['configNodeTimeout'] = $options['configNodeTimeout'] ?? 0; - $options['n1qlTimeout'] = $options['n1qlTimeout'] ?? 0; - $options['httpTimeout'] = $options['httpTimeout'] ?? 0; - $options['configDelay'] = $options['configDelay'] ?? 0; - $options['htconfigIdleTimeout'] = $options['htconfigIdleTimeout'] ?? 0; - $options['durabilityInterval'] = $options['durabilityInterval'] ?? 0; - $options['durabilityTimeout'] = $options['durabilityTimeout'] ?? 0; - - return $options; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $resultsCouchbase = $this->bucket->get($ids); - - $results = []; - foreach ($resultsCouchbase as $key => $value) { - if (null !== $value->error) { - continue; - } - $results[$key] = $this->marshaller->unmarshall($value->value); - } - - return $results; - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id): bool - { - return false !== $this->bucket->get($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace): bool - { - if ('' === $namespace) { - $this->bucket->manager()->flush(); - - return true; - } - - return false; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids): bool - { - $results = $this->bucket->remove(array_values($ids)); - - foreach ($results as $key => $result) { - if (null !== $result->error && static::KEY_NOT_FOUND !== $result->error->getCode()) { - continue; - } - unset($results[$key]); - } - - return 0 === \count($results); - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $lifetime = $this->normalizeExpiry($lifetime); - - $ko = []; - foreach ($values as $key => $value) { - $result = $this->bucket->upsert($key, $value, ['expiry' => $lifetime]); - - if (null !== $result->error) { - $ko[$key] = $result; - } - } - - return [] === $ko ? true : $ko; - } - - private function normalizeExpiry(int $expiry): int - { - if ($expiry && $expiry > static::THIRTY_DAYS_IN_SECONDS) { - $expiry += time(); - } - - return $expiry; - } -} diff --git a/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php b/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php deleted file mode 100644 index c0a1317..0000000 --- a/vendor/symfony/cache/Adapter/CouchbaseCollectionAdapter.php +++ /dev/null @@ -1,222 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Couchbase\Bucket; -use Couchbase\Cluster; -use Couchbase\ClusterOptions; -use Couchbase\Collection; -use Couchbase\DocumentNotFoundException; -use Couchbase\UpsertOptions; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Antonio Jose Cerezo Aranda <aj.cerezo@gmail.com> - */ -class CouchbaseCollectionAdapter extends AbstractAdapter -{ - private const MAX_KEY_LENGTH = 250; - - /** @var Collection */ - private $connection; - private $marshaller; - - public function __construct(Collection $connection, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 3.0.0 < 4.0.0 is required.'); - } - - $this->maxIdLength = static::MAX_KEY_LENGTH; - - $this->connection = $connection; - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * @param array|string $dsn - * - * @return Bucket|Collection - */ - public static function createConnection($dsn, array $options = []) - { - if (\is_string($dsn)) { - $dsn = [$dsn]; - } elseif (!\is_array($dsn)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be array or string, "%s" given.', __METHOD__, get_debug_type($dsn))); - } - - if (!static::isSupported()) { - throw new CacheException('Couchbase >= 3.0.0 < 4.0.0 is required.'); - } - - set_error_handler(function ($type, $msg, $file, $line): bool { throw new \ErrorException($msg, 0, $type, $file, $line); }); - - $dsnPattern = '/^(?<protocol>couchbase(?:s)?)\:\/\/(?:(?<username>[^\:]+)\:(?<password>[^\@]{6,})@)?' - .'(?<host>[^\:]+(?:\:\d+)?)(?:\/(?<bucketName>[^\/\?]+))(?:(?:\/(?<scopeName>[^\/]+))' - .'(?:\/(?<collectionName>[^\/\?]+)))?(?:\/)?(?:\?(?<options>.*))?$/i'; - - $newServers = []; - $protocol = 'couchbase'; - try { - $username = $options['username'] ?? ''; - $password = $options['password'] ?? ''; - - foreach ($dsn as $server) { - if (0 !== strpos($server, 'couchbase:')) { - throw new InvalidArgumentException('Invalid Couchbase DSN: it does not start with "couchbase:".'); - } - - preg_match($dsnPattern, $server, $matches); - - $username = $matches['username'] ?: $username; - $password = $matches['password'] ?: $password; - $protocol = $matches['protocol'] ?: $protocol; - - if (isset($matches['options'])) { - $optionsInDsn = self::getOptions($matches['options']); - - foreach ($optionsInDsn as $parameter => $value) { - $options[$parameter] = $value; - } - } - - $newServers[] = $matches['host']; - } - - $option = isset($matches['options']) ? '?'.$matches['options'] : ''; - $connectionString = $protocol.'://'.implode(',', $newServers).$option; - - $clusterOptions = new ClusterOptions(); - $clusterOptions->credentials($username, $password); - - $client = new Cluster($connectionString, $clusterOptions); - - $bucket = $client->bucket($matches['bucketName']); - $collection = $bucket->defaultCollection(); - if (!empty($matches['scopeName'])) { - $scope = $bucket->scope($matches['scopeName']); - $collection = $scope->collection($matches['collectionName']); - } - - return $collection; - } finally { - restore_error_handler(); - } - } - - public static function isSupported(): bool - { - return \extension_loaded('couchbase') && version_compare(phpversion('couchbase'), '3.0.5', '>=') && version_compare(phpversion('couchbase'), '4.0', '<'); - } - - private static function getOptions(string $options): array - { - $results = []; - $optionsInArray = explode('&', $options); - - foreach ($optionsInArray as $option) { - [$key, $value] = explode('=', $option); - - $results[$key] = $value; - } - - return $results; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids): array - { - $results = []; - foreach ($ids as $id) { - try { - $resultCouchbase = $this->connection->get($id); - } catch (DocumentNotFoundException $exception) { - continue; - } - - $content = $resultCouchbase->value ?? $resultCouchbase->content(); - - $results[$id] = $this->marshaller->unmarshall($content); - } - - return $results; - } - - /** - * {@inheritdoc} - */ - protected function doHave($id): bool - { - return $this->connection->exists($id)->exists(); - } - - /** - * {@inheritdoc} - */ - protected function doClear($namespace): bool - { - return false; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids): bool - { - $idsErrors = []; - foreach ($ids as $id) { - try { - $result = $this->connection->remove($id); - - if (null === $result->mutationToken()) { - $idsErrors[] = $id; - } - } catch (DocumentNotFoundException $exception) { - } - } - - return 0 === \count($idsErrors); - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $upsertOptions = new UpsertOptions(); - $upsertOptions->expiry($lifetime); - - $ko = []; - foreach ($values as $key => $value) { - try { - $this->connection->upsert($key, $value, $upsertOptions); - } catch (\Exception $exception) { - $ko[$key] = ''; - } - } - - return [] === $ko ? true : $ko; - } -} diff --git a/vendor/symfony/cache/Adapter/DoctrineAdapter.php b/vendor/symfony/cache/Adapter/DoctrineAdapter.php deleted file mode 100644 index efa30c8..0000000 --- a/vendor/symfony/cache/Adapter/DoctrineAdapter.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Doctrine\Common\Cache\CacheProvider; -use Doctrine\Common\Cache\Psr6\CacheAdapter; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @deprecated Since Symfony 5.4, use Doctrine\Common\Cache\Psr6\CacheAdapter instead - */ -class DoctrineAdapter extends AbstractAdapter -{ - private $provider; - - public function __construct(CacheProvider $provider, string $namespace = '', int $defaultLifetime = 0) - { - trigger_deprecation('symfony/cache', '5.4', '"%s" is deprecated, use "%s" instead.', __CLASS__, CacheAdapter::class); - - parent::__construct('', $defaultLifetime); - $this->provider = $provider; - $provider->setNamespace($namespace); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - parent::reset(); - $this->provider->setNamespace($this->provider->getNamespace()); - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $unserializeCallbackHandler = ini_set('unserialize_callback_func', parent::class.'::handleUnserializeCallback'); - try { - return $this->provider->fetchMultiple($ids); - } catch (\Error $e) { - $trace = $e->getTrace(); - - if (isset($trace[0]['function']) && !isset($trace[0]['class'])) { - switch ($trace[0]['function']) { - case 'unserialize': - case 'apcu_fetch': - case 'apc_fetch': - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } - } - - throw $e; - } finally { - ini_set('unserialize_callback_func', $unserializeCallbackHandler); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return $this->provider->contains($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $namespace = $this->provider->getNamespace(); - - return isset($namespace[0]) - ? $this->provider->deleteAll() - : $this->provider->flushAll(); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - $ok = true; - foreach ($ids as $id) { - $ok = $this->provider->delete($id) && $ok; - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - return $this->provider->saveMultiple($values, $lifetime); - } -} diff --git a/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php b/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php deleted file mode 100644 index c126824..0000000 --- a/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php +++ /dev/null @@ -1,448 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Doctrine\DBAL\ArrayParameterType; -use Doctrine\DBAL\Configuration; -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Driver\ServerInfoAwareConnection; -use Doctrine\DBAL\DriverManager; -use Doctrine\DBAL\Exception as DBALException; -use Doctrine\DBAL\Exception\TableNotFoundException; -use Doctrine\DBAL\ParameterType; -use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; -use Doctrine\DBAL\Schema\Schema; -use Doctrine\DBAL\ServerVersionProvider; -use Doctrine\DBAL\Tools\DsnParser; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; - -class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface -{ - protected $maxIdLength = 255; - - private $marshaller; - private $conn; - private $platformName; - private $serverVersion; - private $table = 'cache_items'; - private $idCol = 'item_id'; - private $dataCol = 'item_data'; - private $lifetimeCol = 'item_lifetime'; - private $timeCol = 'item_time'; - private $namespace; - - /** - * You can either pass an existing database Doctrine DBAL Connection or - * a DSN string that will be used to connect to the database. - * - * The cache table is created automatically when possible. - * Otherwise, use the createTable() method. - * - * List of available options: - * * db_table: The name of the table [default: cache_items] - * * db_id_col: The column where to store the cache id [default: item_id] - * * db_data_col: The column where to store the cache data [default: item_data] - * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime] - * * db_time_col: The column where to store the timestamp [default: item_time] - * - * @param Connection|string $connOrDsn - * - * @throws InvalidArgumentException When namespace contains invalid characters - */ - public function __construct($connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], ?MarshallerInterface $marshaller = null) - { - if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); - } - - if ($connOrDsn instanceof Connection) { - $this->conn = $connOrDsn; - } elseif (\is_string($connOrDsn)) { - if (!class_exists(DriverManager::class)) { - throw new InvalidArgumentException('Failed to parse DSN. Try running "composer require doctrine/dbal".'); - } - if (class_exists(DsnParser::class)) { - $params = (new DsnParser([ - 'db2' => 'ibm_db2', - 'mssql' => 'pdo_sqlsrv', - 'mysql' => 'pdo_mysql', - 'mysql2' => 'pdo_mysql', - 'postgres' => 'pdo_pgsql', - 'postgresql' => 'pdo_pgsql', - 'pgsql' => 'pdo_pgsql', - 'sqlite' => 'pdo_sqlite', - 'sqlite3' => 'pdo_sqlite', - ]))->parse($connOrDsn); - } else { - $params = ['url' => $connOrDsn]; - } - - $config = new Configuration(); - if (class_exists(DefaultSchemaManagerFactory::class)) { - $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); - } - - $this->conn = DriverManager::getConnection($params, $config); - } else { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', __METHOD__, Connection::class, get_debug_type($connOrDsn))); - } - - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->namespace = $namespace; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - - parent::__construct($namespace, $defaultLifetime); - } - - /** - * Creates the table to store cache items which can be called once for setup. - * - * Cache ID are saved in a column of maximum length 255. Cache data is - * saved in a BLOB. - * - * @throws DBALException When the table already exists - */ - public function createTable() - { - $schema = new Schema(); - $this->addTableToSchema($schema); - - foreach ($schema->toSql($this->conn->getDatabasePlatform()) as $sql) { - $this->conn->executeStatement($sql); - } - } - - /** - * {@inheritdoc} - */ - public function configureSchema(Schema $schema, Connection $forConnection): void - { - // only update the schema for this connection - if ($forConnection !== $this->conn) { - return; - } - - if ($schema->hasTable($this->table)) { - return; - } - - $this->addTableToSchema($schema); - } - - /** - * {@inheritdoc} - */ - public function prune(): bool - { - $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ?"; - $params = [time()]; - $paramTypes = [ParameterType::INTEGER]; - - if ('' !== $this->namespace) { - $deleteSql .= " AND $this->idCol LIKE ?"; - $params[] = sprintf('%s%%', $this->namespace); - $paramTypes[] = ParameterType::STRING; - } - - try { - $this->conn->executeStatement($deleteSql, $params, $paramTypes); - } catch (TableNotFoundException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids): iterable - { - $now = time(); - $expired = []; - - $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN (?)"; - $result = $this->conn->executeQuery($sql, [ - $now, - $ids, - ], [ - ParameterType::INTEGER, - class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY, - ])->iterateNumeric(); - - foreach ($result as $row) { - if (null === $row[1]) { - $expired[] = $row[0]; - } else { - yield $row[0] => $this->marshaller->unmarshall(\is_resource($row[1]) ? stream_get_contents($row[1]) : $row[1]); - } - } - - if ($expired) { - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ? AND $this->idCol IN (?)"; - $this->conn->executeStatement($sql, [ - $now, - $expired, - ], [ - ParameterType::INTEGER, - class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY, - ]); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id): bool - { - $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = ? AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ?)"; - $result = $this->conn->executeQuery($sql, [ - $id, - time(), - ], [ - ParameterType::STRING, - ParameterType::INTEGER, - ]); - - return (bool) $result->fetchOne(); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace): bool - { - if ('' === $namespace) { - if ('sqlite' === $this->getPlatformName()) { - $sql = "DELETE FROM $this->table"; - } else { - $sql = "TRUNCATE TABLE $this->table"; - } - } else { - $sql = "DELETE FROM $this->table WHERE $this->idCol LIKE '$namespace%'"; - } - - try { - $this->conn->executeStatement($sql); - } catch (TableNotFoundException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids): bool - { - $sql = "DELETE FROM $this->table WHERE $this->idCol IN (?)"; - try { - $this->conn->executeStatement($sql, [array_values($ids)], [class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY]); - } catch (TableNotFoundException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $platformName = $this->getPlatformName(); - $insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?)"; - - switch (true) { - case 'mysql' === $platformName: - $sql = $insertSql." ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'oci' === $platformName: - // DUAL is Oracle specific dummy table - $sql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; - break; - case 'sqlsrv' === $platformName && version_compare($this->getServerVersion(), '10', '>='): - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx - $sql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite' === $platformName: - $sql = 'INSERT OR REPLACE'.substr($insertSql, 6); - break; - case 'pgsql' === $platformName && version_compare($this->getServerVersion(), '9.5', '>='): - $sql = $insertSql." ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - $platformName = null; - $sql = "UPDATE $this->table SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ? WHERE $this->idCol = ?"; - break; - } - - $now = time(); - $lifetime = $lifetime ?: null; - try { - $stmt = $this->conn->prepare($sql); - } catch (TableNotFoundException $e) { - if (!$this->conn->isTransactionActive() || \in_array($platformName, ['pgsql', 'sqlite', 'sqlsrv'], true)) { - $this->createTable(); - } - $stmt = $this->conn->prepare($sql); - } - - if ('sqlsrv' === $platformName || 'oci' === $platformName) { - $bind = static function ($id, $data) use ($stmt) { - $stmt->bindValue(1, $id); - $stmt->bindValue(2, $id); - $stmt->bindValue(3, $data, ParameterType::LARGE_OBJECT); - $stmt->bindValue(6, $data, ParameterType::LARGE_OBJECT); - }; - $stmt->bindValue(4, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(5, $now, ParameterType::INTEGER); - $stmt->bindValue(7, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(8, $now, ParameterType::INTEGER); - } elseif (null !== $platformName) { - $bind = static function ($id, $data) use ($stmt) { - $stmt->bindValue(1, $id); - $stmt->bindValue(2, $data, ParameterType::LARGE_OBJECT); - }; - $stmt->bindValue(3, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(4, $now, ParameterType::INTEGER); - } else { - $stmt->bindValue(2, $lifetime, ParameterType::INTEGER); - $stmt->bindValue(3, $now, ParameterType::INTEGER); - - $insertStmt = $this->conn->prepare($insertSql); - $insertStmt->bindValue(3, $lifetime, ParameterType::INTEGER); - $insertStmt->bindValue(4, $now, ParameterType::INTEGER); - - $bind = static function ($id, $data) use ($stmt, $insertStmt) { - $stmt->bindValue(1, $data, ParameterType::LARGE_OBJECT); - $stmt->bindValue(4, $id); - $insertStmt->bindValue(1, $id); - $insertStmt->bindValue(2, $data, ParameterType::LARGE_OBJECT); - }; - } - - foreach ($values as $id => $data) { - $bind($id, $data); - try { - $rowCount = $stmt->executeStatement(); - } catch (TableNotFoundException $e) { - if (!$this->conn->isTransactionActive() || \in_array($platformName, ['pgsql', 'sqlite', 'sqlsrv'], true)) { - $this->createTable(); - } - $rowCount = $stmt->executeStatement(); - } - if (null === $platformName && 0 === $rowCount) { - try { - $insertStmt->executeStatement(); - } catch (DBALException $e) { - // A concurrent write won, let it be - } - } - } - - return $failed; - } - - /** - * @internal - */ - protected function getId($key) - { - if ('pgsql' !== $this->getPlatformName()) { - return parent::getId($key); - } - - if (str_contains($key, "\0") || str_contains($key, '%') || !preg_match('//u', $key)) { - $key = rawurlencode($key); - } - - return parent::getId($key); - } - - private function getPlatformName(): string - { - if (isset($this->platformName)) { - return $this->platformName; - } - - $platform = $this->conn->getDatabasePlatform(); - - switch (true) { - case $platform instanceof \Doctrine\DBAL\Platforms\MySQLPlatform: - case $platform instanceof \Doctrine\DBAL\Platforms\MySQL57Platform: - return $this->platformName = 'mysql'; - - case $platform instanceof \Doctrine\DBAL\Platforms\SqlitePlatform: - return $this->platformName = 'sqlite'; - - case $platform instanceof \Doctrine\DBAL\Platforms\PostgreSQLPlatform: - case $platform instanceof \Doctrine\DBAL\Platforms\PostgreSQL94Platform: - return $this->platformName = 'pgsql'; - - case $platform instanceof \Doctrine\DBAL\Platforms\OraclePlatform: - return $this->platformName = 'oci'; - - case $platform instanceof \Doctrine\DBAL\Platforms\SQLServerPlatform: - case $platform instanceof \Doctrine\DBAL\Platforms\SQLServer2012Platform: - return $this->platformName = 'sqlsrv'; - - default: - return $this->platformName = \get_class($platform); - } - } - - private function getServerVersion(): string - { - if (isset($this->serverVersion)) { - return $this->serverVersion; - } - - if ($this->conn instanceof ServerVersionProvider || $this->conn instanceof ServerInfoAwareConnection) { - return $this->serverVersion = $this->conn->getServerVersion(); - } - - // The condition should be removed once support for DBAL <3.3 is dropped - $conn = method_exists($this->conn, 'getNativeConnection') ? $this->conn->getNativeConnection() : $this->conn->getWrappedConnection(); - - return $this->serverVersion = $conn->getAttribute(\PDO::ATTR_SERVER_VERSION); - } - - private function addTableToSchema(Schema $schema): void - { - $types = [ - 'mysql' => 'binary', - 'sqlite' => 'text', - ]; - - $table = $schema->createTable($this->table); - $table->addColumn($this->idCol, $types[$this->getPlatformName()] ?? 'string', ['length' => 255]); - $table->addColumn($this->dataCol, 'blob', ['length' => 16777215]); - $table->addColumn($this->lifetimeCol, 'integer', ['unsigned' => true, 'notnull' => false]); - $table->addColumn($this->timeCol, 'integer', ['unsigned' => true]); - $table->setPrimaryKey([$this->idCol]); - } -} diff --git a/vendor/symfony/cache/Adapter/FilesystemAdapter.php b/vendor/symfony/cache/Adapter/FilesystemAdapter.php deleted file mode 100644 index 13daa56..0000000 --- a/vendor/symfony/cache/Adapter/FilesystemAdapter.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\FilesystemTrait; - -class FilesystemAdapter extends AbstractAdapter implements PruneableInterface -{ - use FilesystemTrait; - - public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $directory = null, ?MarshallerInterface $marshaller = null) - { - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - } -} diff --git a/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php b/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php deleted file mode 100644 index 440a37a..0000000 --- a/vendor/symfony/cache/Adapter/FilesystemTagAwareAdapter.php +++ /dev/null @@ -1,239 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Marshaller\TagAwareMarshaller; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\FilesystemTrait; - -/** - * Stores tag id <> cache id relationship as a symlink, and lookup on invalidation calls. - * - * @author Nicolas Grekas <p@tchwork.com> - * @author André Rømcke <andre.romcke+symfony@gmail.com> - */ -class FilesystemTagAwareAdapter extends AbstractTagAwareAdapter implements PruneableInterface -{ - use FilesystemTrait { - doClear as private doClearCache; - doSave as private doSaveCache; - } - - /** - * Folder used for tag symlinks. - */ - private const TAG_FOLDER = 'tags'; - - public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $directory = null, ?MarshallerInterface $marshaller = null) - { - $this->marshaller = new TagAwareMarshaller($marshaller); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $ok = $this->doClearCache($namespace); - - if ('' !== $namespace) { - return $ok; - } - - set_error_handler(static function () {}); - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - try { - foreach ($this->scanHashDir($this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR) as $dir) { - if (rename($dir, $renamed = substr_replace($dir, bin2hex(random_bytes(4)), -8))) { - $dir = $renamed.\DIRECTORY_SEPARATOR; - } else { - $dir .= \DIRECTORY_SEPARATOR; - $renamed = null; - } - - for ($i = 0; $i < 38; ++$i) { - if (!is_dir($dir.$chars[$i])) { - continue; - } - for ($j = 0; $j < 38; ++$j) { - if (!is_dir($d = $dir.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) { - continue; - } - foreach (scandir($d, \SCANDIR_SORT_NONE) ?: [] as $link) { - if ('.' !== $link && '..' !== $link && (null !== $renamed || !realpath($d.\DIRECTORY_SEPARATOR.$link))) { - unlink($d.\DIRECTORY_SEPARATOR.$link); - } - } - null === $renamed ?: rmdir($d); - } - null === $renamed ?: rmdir($dir.$chars[$i]); - } - null === $renamed ?: rmdir($renamed); - } - } finally { - restore_error_handler(); - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime, array $addTagData = [], array $removeTagData = []): array - { - $failed = $this->doSaveCache($values, $lifetime); - - // Add Tags as symlinks - foreach ($addTagData as $tagId => $ids) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($ids as $id) { - if ($failed && \in_array($id, $failed, true)) { - continue; - } - - $file = $this->getFile($id); - - if (!@symlink($file, $tagLink = $this->getFile($id, true, $tagFolder)) && !is_link($tagLink)) { - @unlink($file); - $failed[] = $id; - } - } - } - - // Unlink removed Tags - foreach ($removeTagData as $tagId => $ids) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($ids as $id) { - if ($failed && \in_array($id, $failed, true)) { - continue; - } - - @unlink($this->getFile($id, false, $tagFolder)); - } - } - - return $failed; - } - - /** - * {@inheritdoc} - */ - protected function doDeleteYieldTags(array $ids): iterable - { - foreach ($ids as $id) { - $file = $this->getFile($id); - if (!is_file($file) || !$h = @fopen($file, 'r')) { - continue; - } - - if ((\PHP_VERSION_ID >= 70300 || '\\' !== \DIRECTORY_SEPARATOR) && !@unlink($file)) { - fclose($h); - continue; - } - - $meta = explode("\n", fread($h, 4096), 3)[2] ?? ''; - - // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (13 < \strlen($meta) && "\x9D" === $meta[0] && "\0" === $meta[5] && "\x5F" === $meta[9]) { - $meta[9] = "\0"; - $tagLen = unpack('Nlen', $meta, 9)['len']; - $meta = substr($meta, 13, $tagLen); - - if (0 < $tagLen -= \strlen($meta)) { - $meta .= fread($h, $tagLen); - } - - try { - yield $id => '' === $meta ? [] : $this->marshaller->unmarshall($meta); - } catch (\Exception $e) { - yield $id => []; - } - } - - fclose($h); - - if (\PHP_VERSION_ID < 70300 && '\\' === \DIRECTORY_SEPARATOR) { - @unlink($file); - } - } - } - - /** - * {@inheritdoc} - */ - protected function doDeleteTagRelations(array $tagData): bool - { - foreach ($tagData as $tagId => $idList) { - $tagFolder = $this->getTagFolder($tagId); - foreach ($idList as $id) { - @unlink($this->getFile($id, false, $tagFolder)); - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doInvalidate(array $tagIds): bool - { - foreach ($tagIds as $tagId) { - if (!is_dir($tagFolder = $this->getTagFolder($tagId))) { - continue; - } - - set_error_handler(static function () {}); - - try { - if (rename($tagFolder, $renamed = substr_replace($tagFolder, bin2hex(random_bytes(4)), -9))) { - $tagFolder = $renamed.\DIRECTORY_SEPARATOR; - } else { - $renamed = null; - } - - foreach ($this->scanHashDir($tagFolder) as $itemLink) { - unlink(realpath($itemLink) ?: $itemLink); - unlink($itemLink); - } - - if (null === $renamed) { - continue; - } - - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - for ($i = 0; $i < 38; ++$i) { - for ($j = 0; $j < 38; ++$j) { - rmdir($tagFolder.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j]); - } - rmdir($tagFolder.$chars[$i]); - } - rmdir($renamed); - } finally { - restore_error_handler(); - } - } - - return true; - } - - private function getTagFolder(string $tagId): string - { - return $this->getFile($tagId, false, $this->directory.self::TAG_FOLDER.\DIRECTORY_SEPARATOR).\DIRECTORY_SEPARATOR; - } -} diff --git a/vendor/symfony/cache/Adapter/MemcachedAdapter.php b/vendor/symfony/cache/Adapter/MemcachedAdapter.php deleted file mode 100644 index 0bc20d4..0000000 --- a/vendor/symfony/cache/Adapter/MemcachedAdapter.php +++ /dev/null @@ -1,347 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Rob Frawley 2nd <rmf@src.run> - * @author Nicolas Grekas <p@tchwork.com> - */ -class MemcachedAdapter extends AbstractAdapter -{ - /** - * We are replacing characters that are illegal in Memcached keys with reserved characters from - * {@see \Symfony\Contracts\Cache\ItemInterface::RESERVED_CHARACTERS} that are legal in Memcached. - * Note: don’t use {@see \Symfony\Component\Cache\Adapter\AbstractAdapter::NS_SEPARATOR}. - */ - private const RESERVED_MEMCACHED = " \n\r\t\v\f\0"; - private const RESERVED_PSR6 = '@()\{}/'; - - protected $maxIdLength = 250; - - private $marshaller; - private $client; - private $lazyClient; - - /** - * Using a MemcachedAdapter with a TagAwareAdapter for storing tags is discouraged. - * Using a RedisAdapter is recommended instead. If you cannot do otherwise, be aware that: - * - the Memcached::OPT_BINARY_PROTOCOL must be enabled - * (that's the default when using MemcachedAdapter::createConnection()); - * - tags eviction by Memcached's LRU algorithm will break by-tags invalidation; - * your Memcached memory should be large enough to never trigger LRU. - * - * Using a MemcachedAdapter as a pure items store is fine. - */ - public function __construct(\Memcached $client, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null) - { - if (!static::isSupported()) { - throw new CacheException('Memcached '.(\PHP_VERSION_ID >= 80100 ? '> 3.1.5' : '>= 2.2.0').' is required.'); - } - if ('Memcached' === \get_class($client)) { - $opt = $client->getOption(\Memcached::OPT_SERIALIZER); - if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) { - throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); - } - $this->maxIdLength -= \strlen($client->getOption(\Memcached::OPT_PREFIX_KEY)); - $this->client = $client; - } else { - $this->lazyClient = $client; - } - - parent::__construct($namespace, $defaultLifetime); - $this->enableVersioning(); - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - public static function isSupported() - { - return \extension_loaded('memcached') && version_compare(phpversion('memcached'), \PHP_VERSION_ID >= 80100 ? '3.1.6' : '2.2.0', '>='); - } - - /** - * Creates a Memcached instance. - * - * By default, the binary protocol, no block, and libketama compatible options are enabled. - * - * Examples for servers: - * - 'memcached://user:pass@localhost?weight=33' - * - [['localhost', 11211, 33]] - * - * @param array[]|string|string[] $servers An array of servers, a DSN, or an array of DSNs - * - * @return \Memcached - * - * @throws \ErrorException When invalid options or servers are provided - */ - public static function createConnection($servers, array $options = []) - { - if (\is_string($servers)) { - $servers = [$servers]; - } elseif (!\is_array($servers)) { - throw new InvalidArgumentException(sprintf('MemcachedAdapter::createClient() expects array or string as first argument, "%s" given.', get_debug_type($servers))); - } - if (!static::isSupported()) { - throw new CacheException('Memcached '.(\PHP_VERSION_ID >= 80100 ? '> 3.1.5' : '>= 2.2.0').' is required.'); - } - set_error_handler(function ($type, $msg, $file, $line) { throw new \ErrorException($msg, 0, $type, $file, $line); }); - try { - $client = new \Memcached($options['persistent_id'] ?? null); - $username = $options['username'] ?? null; - $password = $options['password'] ?? null; - - // parse any DSN in $servers - foreach ($servers as $i => $dsn) { - if (\is_array($dsn)) { - continue; - } - if (!str_starts_with($dsn, 'memcached:')) { - throw new InvalidArgumentException('Invalid Memcached DSN: it does not start with "memcached:".'); - } - $params = preg_replace_callback('#^memcached:(//)?(?:([^@]*+)@)?#', function ($m) use (&$username, &$password) { - if (!empty($m[2])) { - [$username, $password] = explode(':', $m[2], 2) + [1 => null]; - $username = rawurldecode($username); - $password = null !== $password ? rawurldecode($password) : null; - } - - return 'file:'.($m[1] ?? ''); - }, $dsn); - if (false === $params = parse_url($params)) { - throw new InvalidArgumentException('Invalid Memcached DSN.'); - } - $query = $hosts = []; - if (isset($params['query'])) { - parse_str($params['query'], $query); - - if (isset($query['host'])) { - if (!\is_array($hosts = $query['host'])) { - throw new InvalidArgumentException('Invalid Memcached DSN: query parameter "host" must be an array.'); - } - foreach ($hosts as $host => $weight) { - if (false === $port = strrpos($host, ':')) { - $hosts[$host] = [$host, 11211, (int) $weight]; - } else { - $hosts[$host] = [substr($host, 0, $port), (int) substr($host, 1 + $port), (int) $weight]; - } - } - $hosts = array_values($hosts); - unset($query['host']); - } - if ($hosts && !isset($params['host']) && !isset($params['path'])) { - unset($servers[$i]); - $servers = array_merge($servers, $hosts); - continue; - } - } - if (!isset($params['host']) && !isset($params['path'])) { - throw new InvalidArgumentException('Invalid Memcached DSN: missing host or path.'); - } - if (isset($params['path']) && preg_match('#/(\d+)$#', $params['path'], $m)) { - $params['weight'] = $m[1]; - $params['path'] = substr($params['path'], 0, -\strlen($m[0])); - } - $params += [ - 'host' => $params['host'] ?? $params['path'], - 'port' => isset($params['host']) ? 11211 : null, - 'weight' => 0, - ]; - if ($query) { - $params += $query; - $options = $query + $options; - } - - $servers[$i] = [$params['host'], $params['port'], $params['weight']]; - - if ($hosts) { - $servers = array_merge($servers, $hosts); - } - } - - // set client's options - unset($options['persistent_id'], $options['username'], $options['password'], $options['weight'], $options['lazy']); - $options = array_change_key_case($options, \CASE_UPPER); - $client->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); - $client->setOption(\Memcached::OPT_NO_BLOCK, true); - $client->setOption(\Memcached::OPT_TCP_NODELAY, true); - if (!\array_key_exists('LIBKETAMA_COMPATIBLE', $options) && !\array_key_exists(\Memcached::OPT_LIBKETAMA_COMPATIBLE, $options)) { - $client->setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true); - } - foreach ($options as $name => $value) { - if (\is_int($name)) { - continue; - } - if ('HASH' === $name || 'SERIALIZER' === $name || 'DISTRIBUTION' === $name) { - $value = \constant('Memcached::'.$name.'_'.strtoupper($value)); - } - unset($options[$name]); - - if (\defined('Memcached::OPT_'.$name)) { - $options[\constant('Memcached::OPT_'.$name)] = $value; - } - } - $client->setOptions($options + [\Memcached::OPT_SERIALIZER => \Memcached::SERIALIZER_PHP]); - - // set client's servers, taking care of persistent connections - if (!$client->isPristine()) { - $oldServers = []; - foreach ($client->getServerList() as $server) { - $oldServers[] = [$server['host'], $server['port']]; - } - - $newServers = []; - foreach ($servers as $server) { - if (1 < \count($server)) { - $server = array_values($server); - unset($server[2]); - $server[1] = (int) $server[1]; - } - $newServers[] = $server; - } - - if ($oldServers !== $newServers) { - $client->resetServerList(); - $client->addServers($servers); - } - } else { - $client->addServers($servers); - } - - if (null !== $username || null !== $password) { - if (!method_exists($client, 'setSaslAuthData')) { - trigger_error('Missing SASL support: the memcached extension must be compiled with --enable-memcached-sasl.'); - } - $client->setSaslAuthData($username, $password); - } - - return $client; - } finally { - restore_error_handler(); - } - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - if ($lifetime && $lifetime > 30 * 86400) { - $lifetime += time(); - } - - $encodedValues = []; - foreach ($values as $key => $value) { - $encodedValues[self::encodeKey($key)] = $value; - } - - return $this->checkResultCode($this->getClient()->setMulti($encodedValues, $lifetime)) ? $failed : false; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - try { - $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids); - - $encodedResult = $this->checkResultCode($this->getClient()->getMulti($encodedIds)); - - $result = []; - foreach ($encodedResult as $key => $value) { - $result[self::decodeKey($key)] = $this->marshaller->unmarshall($value); - } - - return $result; - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return false !== $this->getClient()->get(self::encodeKey($id)) || $this->checkResultCode(\Memcached::RES_SUCCESS === $this->client->getResultCode()); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - $ok = true; - $encodedIds = array_map([__CLASS__, 'encodeKey'], $ids); - foreach ($this->checkResultCode($this->getClient()->deleteMulti($encodedIds)) as $result) { - if (\Memcached::RES_SUCCESS !== $result && \Memcached::RES_NOTFOUND !== $result) { - $ok = false; - } - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - return '' === $namespace && $this->getClient()->flush(); - } - - private function checkResultCode($result) - { - $code = $this->client->getResultCode(); - - if (\Memcached::RES_SUCCESS === $code || \Memcached::RES_NOTFOUND === $code) { - return $result; - } - - throw new CacheException('MemcachedAdapter client error: '.strtolower($this->client->getResultMessage())); - } - - private function getClient(): \Memcached - { - if ($this->client) { - return $this->client; - } - - $opt = $this->lazyClient->getOption(\Memcached::OPT_SERIALIZER); - if (\Memcached::SERIALIZER_PHP !== $opt && \Memcached::SERIALIZER_IGBINARY !== $opt) { - throw new CacheException('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); - } - if ('' !== $prefix = (string) $this->lazyClient->getOption(\Memcached::OPT_PREFIX_KEY)) { - throw new CacheException(sprintf('MemcachedAdapter: "prefix_key" option must be empty when using proxified connections, "%s" given.', $prefix)); - } - - return $this->client = $this->lazyClient; - } - - private static function encodeKey(string $key): string - { - return strtr($key, self::RESERVED_MEMCACHED, self::RESERVED_PSR6); - } - - private static function decodeKey(string $key): string - { - return strtr($key, self::RESERVED_PSR6, self::RESERVED_MEMCACHED); - } -} diff --git a/vendor/symfony/cache/Adapter/NullAdapter.php b/vendor/symfony/cache/Adapter/NullAdapter.php deleted file mode 100644 index bf5382f..0000000 --- a/vendor/symfony/cache/Adapter/NullAdapter.php +++ /dev/null @@ -1,152 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * @author Titouan Galopin <galopintitouan@gmail.com> - */ -class NullAdapter implements AdapterInterface, CacheInterface -{ - private static $createCacheItem; - - public function __construct() - { - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key) { - $item = new CacheItem(); - $item->key = $key; - $item->isHit = false; - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null) - { - $save = true; - - return $callback((self::$createCacheItem)($key), $save); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - return (self::$createCacheItem)($key); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - return $this->generateItems($keys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - return false; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - return true; - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - return $this->deleteItem($key); - } - - private function generateItems(array $keys): \Generator - { - $f = self::$createCacheItem; - - foreach ($keys as $key) { - yield $key => $f($key); - } - } -} diff --git a/vendor/symfony/cache/Adapter/ParameterNormalizer.php b/vendor/symfony/cache/Adapter/ParameterNormalizer.php deleted file mode 100644 index e33ae9f..0000000 --- a/vendor/symfony/cache/Adapter/ParameterNormalizer.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -/** - * @author Lars Strojny <lars@strojny.net> - */ -final class ParameterNormalizer -{ - public static function normalizeDuration(string $duration): int - { - if (is_numeric($duration)) { - return $duration; - } - - if (false !== $time = strtotime($duration, 0)) { - return $time; - } - - try { - return \DateTime::createFromFormat('U', 0)->add(new \DateInterval($duration))->getTimestamp(); - } catch (\Exception $e) { - throw new \InvalidArgumentException(sprintf('Cannot parse date interval "%s".', $duration), 0, $e); - } - } -} diff --git a/vendor/symfony/cache/Adapter/PdoAdapter.php b/vendor/symfony/cache/Adapter/PdoAdapter.php deleted file mode 100644 index a2a275b..0000000 --- a/vendor/symfony/cache/Adapter/PdoAdapter.php +++ /dev/null @@ -1,616 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Schema\Schema; -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\PruneableInterface; - -class PdoAdapter extends AbstractAdapter implements PruneableInterface -{ - protected $maxIdLength = 255; - - private $marshaller; - private $conn; - private $dsn; - private $driver; - private $serverVersion; - private $table = 'cache_items'; - private $idCol = 'item_id'; - private $dataCol = 'item_data'; - private $lifetimeCol = 'item_lifetime'; - private $timeCol = 'item_time'; - private $username = null; - private $password = null; - private $connectionOptions = []; - private $namespace; - - private $dbalAdapter; - - /** - * You can either pass an existing database connection as PDO instance or - * a DSN string that will be used to lazy-connect to the database when the - * cache is actually used. - * - * List of available options: - * * db_table: The name of the table [default: cache_items] - * * db_id_col: The column where to store the cache id [default: item_id] - * * db_data_col: The column where to store the cache data [default: item_data] - * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime] - * * db_time_col: The column where to store the timestamp [default: item_time] - * * db_username: The username when lazy-connect [default: ''] - * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: []] - * - * @param \PDO|string $connOrDsn - * - * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string - * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION - * @throws InvalidArgumentException When namespace contains invalid characters - */ - public function __construct($connOrDsn, string $namespace = '', int $defaultLifetime = 0, array $options = [], ?MarshallerInterface $marshaller = null) - { - if ($connOrDsn instanceof Connection || (\is_string($connOrDsn) && str_contains($connOrDsn, '://'))) { - trigger_deprecation('symfony/cache', '5.4', 'Usage of a DBAL Connection with "%s" is deprecated and will be removed in symfony 6.0. Use "%s" instead.', __CLASS__, DoctrineDbalAdapter::class); - $this->dbalAdapter = new DoctrineDbalAdapter($connOrDsn, $namespace, $defaultLifetime, $options, $marshaller); - - return; - } - - if (isset($namespace[0]) && preg_match('#[^-+.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+.A-Za-z0-9] are allowed.', $match[0])); - } - - if ($connOrDsn instanceof \PDO) { - if (\PDO::ERRMODE_EXCEPTION !== $connOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { - throw new InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); - } - - $this->conn = $connOrDsn; - } elseif (\is_string($connOrDsn)) { - $this->dsn = $connOrDsn; - } else { - throw new InvalidArgumentException(sprintf('"%s" requires PDO or Doctrine\DBAL\Connection instance or DSN string as first argument, "%s" given.', __CLASS__, get_debug_type($connOrDsn))); - } - - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->username = $options['db_username'] ?? $this->username; - $this->password = $options['db_password'] ?? $this->password; - $this->connectionOptions = $options['db_connection_options'] ?? $this->connectionOptions; - $this->namespace = $namespace; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - - parent::__construct($namespace, $defaultLifetime); - } - - /** - * {@inheritDoc} - */ - public function getItem($key) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->getItem($key); - } - - return parent::getItem($key); - } - - /** - * {@inheritDoc} - */ - public function getItems(array $keys = []) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->getItems($keys); - } - - return parent::getItems($keys); - } - - /** - * {@inheritDoc} - */ - public function hasItem($key) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->hasItem($key); - } - - return parent::hasItem($key); - } - - /** - * {@inheritDoc} - */ - public function deleteItem($key) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->deleteItem($key); - } - - return parent::deleteItem($key); - } - - /** - * {@inheritDoc} - */ - public function deleteItems(array $keys) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->deleteItems($keys); - } - - return parent::deleteItems($keys); - } - - /** - * {@inheritDoc} - */ - public function clear(string $prefix = '') - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->clear($prefix); - } - - return parent::clear($prefix); - } - - /** - * {@inheritDoc} - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->get($key, $callback, $beta, $metadata); - } - - return parent::get($key, $callback, $beta, $metadata); - } - - /** - * {@inheritDoc} - */ - public function delete(string $key): bool - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->delete($key); - } - - return parent::delete($key); - } - - /** - * {@inheritDoc} - */ - public function save(CacheItemInterface $item) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->save($item); - } - - return parent::save($item); - } - - /** - * {@inheritDoc} - */ - public function saveDeferred(CacheItemInterface $item) - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->saveDeferred($item); - } - - return parent::saveDeferred($item); - } - - /** - * {@inheritDoc} - */ - public function setLogger(LoggerInterface $logger): void - { - if (isset($this->dbalAdapter)) { - $this->dbalAdapter->setLogger($logger); - - return; - } - - parent::setLogger($logger); - } - - /** - * {@inheritDoc} - */ - public function commit() - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->commit(); - } - - return parent::commit(); - } - - /** - * {@inheritDoc} - */ - public function reset() - { - if (isset($this->dbalAdapter)) { - $this->dbalAdapter->reset(); - - return; - } - - parent::reset(); - } - - /** - * Creates the table to store cache items which can be called once for setup. - * - * Cache ID are saved in a column of maximum length 255. Cache data is - * saved in a BLOB. - * - * @throws \PDOException When the table already exists - * @throws \DomainException When an unsupported PDO driver is used - */ - public function createTable() - { - if (isset($this->dbalAdapter)) { - $this->dbalAdapter->createTable(); - - return; - } - - // connect if we are not yet - $conn = $this->getConnection(); - - switch ($this->driver) { - case 'mysql': - // We use varbinary for the ID column because it prevents unwanted conversions: - // - character set conversions between server and client - // - trailing space removal - // - case-insensitivity - // - language processing like é == e - $sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(255) NOT NULL PRIMARY KEY, $this->dataCol MEDIUMBLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8mb4_bin, ENGINE = InnoDB"; - break; - case 'sqlite': - $sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; - break; - case 'pgsql': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; - break; - case 'oci': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR2(255) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; - break; - case 'sqlsrv': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(255) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER, $this->timeCol INTEGER NOT NULL)"; - break; - default: - throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver)); - } - - $conn->exec($sql); - } - - /** - * Adds the Table to the Schema if the adapter uses this Connection. - * - * @deprecated since symfony/cache 5.4 use DoctrineDbalAdapter instead - */ - public function configureSchema(Schema $schema, Connection $forConnection): void - { - if (isset($this->dbalAdapter)) { - $this->dbalAdapter->configureSchema($schema, $forConnection); - } - } - - /** - * {@inheritdoc} - */ - public function prune() - { - if (isset($this->dbalAdapter)) { - return $this->dbalAdapter->prune(); - } - - $deleteSql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= :time"; - - if ('' !== $this->namespace) { - $deleteSql .= " AND $this->idCol LIKE :namespace"; - } - - $connection = $this->getConnection(); - - try { - $delete = $connection->prepare($deleteSql); - } catch (\PDOException $e) { - return true; - } - $delete->bindValue(':time', time(), \PDO::PARAM_INT); - - if ('' !== $this->namespace) { - $delete->bindValue(':namespace', sprintf('%s%%', $this->namespace), \PDO::PARAM_STR); - } - try { - return $delete->execute(); - } catch (\PDOException $e) { - return true; - } - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $connection = $this->getConnection(); - - $now = time(); - $expired = []; - - $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); - $sql = "SELECT $this->idCol, CASE WHEN $this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > ? THEN $this->dataCol ELSE NULL END FROM $this->table WHERE $this->idCol IN ($sql)"; - $stmt = $connection->prepare($sql); - $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT); - foreach ($ids as $id) { - $stmt->bindValue(++$i, $id); - } - $result = $stmt->execute(); - - if (\is_object($result)) { - $result = $result->iterateNumeric(); - } else { - $stmt->setFetchMode(\PDO::FETCH_NUM); - $result = $stmt; - } - - foreach ($result as $row) { - if (null === $row[1]) { - $expired[] = $row[0]; - } else { - yield $row[0] => $this->marshaller->unmarshall(\is_resource($row[1]) ? stream_get_contents($row[1]) : $row[1]); - } - } - - if ($expired) { - $sql = str_pad('', (\count($expired) << 1) - 1, '?,'); - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol + $this->timeCol <= ? AND $this->idCol IN ($sql)"; - $stmt = $connection->prepare($sql); - $stmt->bindValue($i = 1, $now, \PDO::PARAM_INT); - foreach ($expired as $id) { - $stmt->bindValue(++$i, $id); - } - $stmt->execute(); - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - $connection = $this->getConnection(); - - $sql = "SELECT 1 FROM $this->table WHERE $this->idCol = :id AND ($this->lifetimeCol IS NULL OR $this->lifetimeCol + $this->timeCol > :time)"; - $stmt = $connection->prepare($sql); - - $stmt->bindValue(':id', $id); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->execute(); - - return (bool) $stmt->fetchColumn(); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $conn = $this->getConnection(); - - if ('' === $namespace) { - if ('sqlite' === $this->driver) { - $sql = "DELETE FROM $this->table"; - } else { - $sql = "TRUNCATE TABLE $this->table"; - } - } else { - $sql = "DELETE FROM $this->table WHERE $this->idCol LIKE '$namespace%'"; - } - - try { - $conn->exec($sql); - } catch (\PDOException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - $sql = str_pad('', (\count($ids) << 1) - 1, '?,'); - $sql = "DELETE FROM $this->table WHERE $this->idCol IN ($sql)"; - try { - $stmt = $this->getConnection()->prepare($sql); - $stmt->execute(array_values($ids)); - } catch (\PDOException $e) { - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $conn = $this->getConnection(); - - $driver = $this->driver; - $insertSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :lifetime, :time)"; - - switch (true) { - case 'mysql' === $driver: - $sql = $insertSql." ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'oci' === $driver: - // DUAL is Oracle specific dummy table - $sql = "MERGE INTO $this->table USING DUAL ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?"; - break; - case 'sqlsrv' === $driver && version_compare($this->getServerVersion(), '10', '>='): - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx - $sql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite' === $driver: - $sql = 'INSERT OR REPLACE'.substr($insertSql, 6); - break; - case 'pgsql' === $driver && version_compare($this->getServerVersion(), '9.5', '>='): - $sql = $insertSql." ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - $driver = null; - $sql = "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :lifetime, $this->timeCol = :time WHERE $this->idCol = :id"; - break; - } - - $now = time(); - $lifetime = $lifetime ?: null; - try { - $stmt = $conn->prepare($sql); - } catch (\PDOException $e) { - if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) { - $this->createTable(); - } - $stmt = $conn->prepare($sql); - } - - // $id and $data are defined later in the loop. Binding is done by reference, values are read on execution. - if ('sqlsrv' === $driver || 'oci' === $driver) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $id); - $stmt->bindParam(3, $data, \PDO::PARAM_LOB); - $stmt->bindValue(4, $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(5, $now, \PDO::PARAM_INT); - $stmt->bindParam(6, $data, \PDO::PARAM_LOB); - $stmt->bindValue(7, $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(8, $now, \PDO::PARAM_INT); - } else { - $stmt->bindParam(':id', $id); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', $now, \PDO::PARAM_INT); - } - if (null === $driver) { - $insertStmt = $conn->prepare($insertSql); - - $insertStmt->bindParam(':id', $id); - $insertStmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $insertStmt->bindValue(':lifetime', $lifetime, \PDO::PARAM_INT); - $insertStmt->bindValue(':time', $now, \PDO::PARAM_INT); - } - - foreach ($values as $id => $data) { - try { - $stmt->execute(); - } catch (\PDOException $e) { - if ($this->isTableMissing($e) && (!$conn->inTransaction() || \in_array($this->driver, ['pgsql', 'sqlite', 'sqlsrv'], true))) { - $this->createTable(); - } - $stmt->execute(); - } - if (null === $driver && !$stmt->rowCount()) { - try { - $insertStmt->execute(); - } catch (\PDOException $e) { - // A concurrent write won, let it be - } - } - } - - return $failed; - } - - /** - * @internal - */ - protected function getId($key) - { - if ('pgsql' !== $this->driver ?? ($this->getConnection() ? $this->driver : null)) { - return parent::getId($key); - } - - if (str_contains($key, "\0") || str_contains($key, '%') || !preg_match('//u', $key)) { - $key = rawurlencode($key); - } - - return parent::getId($key); - } - - private function getConnection(): \PDO - { - if (null === $this->conn) { - $this->conn = new \PDO($this->dsn, $this->username, $this->password, $this->connectionOptions); - $this->conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - } - if (null === $this->driver) { - $this->driver = $this->conn->getAttribute(\PDO::ATTR_DRIVER_NAME); - } - - return $this->conn; - } - - private function getServerVersion(): string - { - if (null === $this->serverVersion) { - $this->serverVersion = $this->conn->getAttribute(\PDO::ATTR_SERVER_VERSION); - } - - return $this->serverVersion; - } - - private function isTableMissing(\PDOException $exception): bool - { - $driver = $this->driver; - [$sqlState, $code] = $exception->errorInfo ?? [null, $exception->getCode()]; - - switch (true) { - case 'pgsql' === $driver && '42P01' === $sqlState: - case 'sqlite' === $driver && str_contains($exception->getMessage(), 'no such table:'): - case 'oci' === $driver && 942 === $code: - case 'sqlsrv' === $driver && 208 === $code: - case 'mysql' === $driver && 1146 === $code: - return true; - default: - return false; - } - } -} diff --git a/vendor/symfony/cache/Adapter/PhpArrayAdapter.php b/vendor/symfony/cache/Adapter/PhpArrayAdapter.php deleted file mode 100644 index 43e000a..0000000 --- a/vendor/symfony/cache/Adapter/PhpArrayAdapter.php +++ /dev/null @@ -1,435 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Component\Cache\Traits\ProxyTrait; -use Symfony\Component\VarExporter\VarExporter; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0. - * Warmed up items are read-only and run-time discovered items are cached using a fallback adapter. - * - * @author Titouan Galopin <galopintitouan@gmail.com> - * @author Nicolas Grekas <p@tchwork.com> - */ -class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - use ProxyTrait; - - private $file; - private $keys; - private $values; - - private static $createCacheItem; - private static $valuesCache = []; - - /** - * @param string $file The PHP file were values are cached - * @param AdapterInterface $fallbackPool A pool to fallback on when an item is not hit - */ - public function __construct(string $file, AdapterInterface $fallbackPool) - { - $this->file = $file; - $this->pool = $fallbackPool; - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, $isHit) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->isHit = $isHit; - - return $item; - }, - null, - CacheItem::class - ); - } - - /** - * This adapter takes advantage of how PHP stores arrays in its latest versions. - * - * @param string $file The PHP file were values are cached - * @param CacheItemPoolInterface $fallbackPool A pool to fallback on when an item is not hit - * - * @return CacheItemPoolInterface - */ - public static function create(string $file, CacheItemPoolInterface $fallbackPool) - { - if (!$fallbackPool instanceof AdapterInterface) { - $fallbackPool = new ProxyAdapter($fallbackPool); - } - - return new static($file, $fallbackPool); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null) - { - if (null === $this->values) { - $this->initialize(); - } - if (!isset($this->keys[$key])) { - get_from_pool: - if ($this->pool instanceof CacheInterface) { - return $this->pool->get($key, $callback, $beta, $metadata); - } - - return $this->doGet($this->pool, $key, $callback, $beta, $metadata); - } - $value = $this->values[$this->keys[$key]]; - - if ('N;' === $value) { - return null; - } - try { - if ($value instanceof \Closure) { - return $value(); - } - } catch (\Throwable $e) { - unset($this->keys[$key]); - goto get_from_pool; - } - - return $value; - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (null === $this->values) { - $this->initialize(); - } - if (!isset($this->keys[$key])) { - return $this->pool->getItem($key); - } - - $value = $this->values[$this->keys[$key]]; - $isHit = true; - - if ('N;' === $value) { - $value = null; - } elseif ($value instanceof \Closure) { - try { - $value = $value(); - } catch (\Throwable $e) { - $value = null; - $isHit = false; - } - } - - return (self::$createCacheItem)($key, $value, $isHit); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - foreach ($keys as $key) { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - } - if (null === $this->values) { - $this->initialize(); - } - - return $this->generateItems($keys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (null === $this->values) { - $this->initialize(); - } - - return isset($this->keys[$key]) || $this->pool->hasItem($key); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if (null === $this->values) { - $this->initialize(); - } - - return !isset($this->keys[$key]) && $this->pool->deleteItem($key); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - $deleted = true; - $fallbackKeys = []; - - foreach ($keys as $key) { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - - if (isset($this->keys[$key])) { - $deleted = false; - } else { - $fallbackKeys[] = $key; - } - } - if (null === $this->values) { - $this->initialize(); - } - - if ($fallbackKeys) { - $deleted = $this->pool->deleteItems($fallbackKeys) && $deleted; - } - - return $deleted; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - if (null === $this->values) { - $this->initialize(); - } - - return !isset($this->keys[$item->getKey()]) && $this->pool->save($item); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - if (null === $this->values) { - $this->initialize(); - } - - return !isset($this->keys[$item->getKey()]) && $this->pool->saveDeferred($item); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - return $this->pool->commit(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - $this->keys = $this->values = []; - - $cleared = @unlink($this->file) || !file_exists($this->file); - unset(self::$valuesCache[$this->file]); - - if ($this->pool instanceof AdapterInterface) { - return $this->pool->clear($prefix) && $cleared; - } - - return $this->pool->clear() && $cleared; - } - - /** - * Store an array of cached values. - * - * @param array $values The cached values - * - * @return string[] A list of classes to preload on PHP 7.4+ - */ - public function warmUp(array $values) - { - if (file_exists($this->file)) { - if (!is_file($this->file)) { - throw new InvalidArgumentException(sprintf('Cache path exists and is not a file: "%s".', $this->file)); - } - - if (!is_writable($this->file)) { - throw new InvalidArgumentException(sprintf('Cache file is not writable: "%s".', $this->file)); - } - } else { - $directory = \dirname($this->file); - - if (!is_dir($directory) && !@mkdir($directory, 0777, true)) { - throw new InvalidArgumentException(sprintf('Cache directory does not exist and cannot be created: "%s".', $directory)); - } - - if (!is_writable($directory)) { - throw new InvalidArgumentException(sprintf('Cache directory is not writable: "%s".', $directory)); - } - } - - $preload = []; - $dumpedValues = ''; - $dumpedMap = []; - $dump = <<<'EOF' -<?php - -// This file has been auto-generated by the Symfony Cache Component. - -return [[ - - -EOF; - - foreach ($values as $key => $value) { - CacheItem::validateKey(\is_int($key) ? (string) $key : $key); - $isStaticValue = true; - - if (null === $value) { - $value = "'N;'"; - } elseif (\is_object($value) || \is_array($value)) { - try { - $value = VarExporter::export($value, $isStaticValue, $preload); - } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); - } - } elseif (\is_string($value)) { - // Wrap "N;" in a closure to not confuse it with an encoded `null` - if ('N;' === $value) { - $isStaticValue = false; - } - $value = var_export($value, true); - } elseif (!\is_scalar($value)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); - } else { - $value = var_export($value, true); - } - - if (!$isStaticValue) { - $value = str_replace("\n", "\n ", $value); - $value = "static function () {\n return {$value};\n}"; - } - $hash = hash('md5', $value); - - if (null === $id = $dumpedMap[$hash] ?? null) { - $id = $dumpedMap[$hash] = \count($dumpedMap); - $dumpedValues .= "{$id} => {$value},\n"; - } - - $dump .= var_export($key, true)." => {$id},\n"; - } - - $dump .= "\n], [\n\n{$dumpedValues}\n]];\n"; - - $tmpFile = uniqid($this->file, true); - - file_put_contents($tmpFile, $dump); - @chmod($tmpFile, 0666 & ~umask()); - unset($serialized, $value, $dump); - - @rename($tmpFile, $this->file); - unset(self::$valuesCache[$this->file]); - - $this->initialize(); - - return $preload; - } - - /** - * Load the cache file. - */ - private function initialize() - { - if (isset(self::$valuesCache[$this->file])) { - $values = self::$valuesCache[$this->file]; - } elseif (!is_file($this->file)) { - $this->keys = $this->values = []; - - return; - } else { - $values = self::$valuesCache[$this->file] = (include $this->file) ?: [[], []]; - } - - if (2 !== \count($values) || !isset($values[0], $values[1])) { - $this->keys = $this->values = []; - } else { - [$this->keys, $this->values] = $values; - } - } - - private function generateItems(array $keys): \Generator - { - $f = self::$createCacheItem; - $fallbackKeys = []; - - foreach ($keys as $key) { - if (isset($this->keys[$key])) { - $value = $this->values[$this->keys[$key]]; - - if ('N;' === $value) { - yield $key => $f($key, null, true); - } elseif ($value instanceof \Closure) { - try { - yield $key => $f($key, $value(), true); - } catch (\Throwable $e) { - yield $key => $f($key, null, false); - } - } else { - yield $key => $f($key, $value, true); - } - } else { - $fallbackKeys[] = $key; - } - } - - if ($fallbackKeys) { - yield from $this->pool->getItems($fallbackKeys); - } - } -} diff --git a/vendor/symfony/cache/Adapter/PhpFilesAdapter.php b/vendor/symfony/cache/Adapter/PhpFilesAdapter.php deleted file mode 100644 index 8dcd79c..0000000 --- a/vendor/symfony/cache/Adapter/PhpFilesAdapter.php +++ /dev/null @@ -1,330 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Traits\FilesystemCommonTrait; -use Symfony\Component\VarExporter\VarExporter; - -/** - * @author Piotr Stankowski <git@trakos.pl> - * @author Nicolas Grekas <p@tchwork.com> - * @author Rob Frawley 2nd <rmf@src.run> - */ -class PhpFilesAdapter extends AbstractAdapter implements PruneableInterface -{ - use FilesystemCommonTrait { - doClear as private doCommonClear; - doDelete as private doCommonDelete; - } - - private $includeHandler; - private $appendOnly; - private $values = []; - private $files = []; - - private static $startTime; - private static $valuesCache = []; - - /** - * @param $appendOnly Set to `true` to gain extra performance when the items stored in this pool never expire. - * Doing so is encouraged because it fits perfectly OPcache's memory model. - * - * @throws CacheException if OPcache is not enabled - */ - public function __construct(string $namespace = '', int $defaultLifetime = 0, ?string $directory = null, bool $appendOnly = false) - { - $this->appendOnly = $appendOnly; - self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time(); - parent::__construct('', $defaultLifetime); - $this->init($namespace, $directory); - $this->includeHandler = static function ($type, $msg, $file, $line) { - throw new \ErrorException($msg, 0, $type, $file, $line); - }; - } - - public static function isSupported() - { - self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time(); - - return \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN)); - } - - /** - * @return bool - */ - public function prune() - { - $time = time(); - $pruned = true; - $getExpiry = true; - - set_error_handler($this->includeHandler); - try { - foreach ($this->scanHashDir($this->directory) as $file) { - try { - if (\is_array($expiresAt = include $file)) { - $expiresAt = $expiresAt[0]; - } - } catch (\ErrorException $e) { - $expiresAt = $time; - } - - if ($time >= $expiresAt) { - $pruned = ($this->doUnlink($file) || !file_exists($file)) && $pruned; - } - } - } finally { - restore_error_handler(); - } - - return $pruned; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - if ($this->appendOnly) { - $now = 0; - $missingIds = []; - } else { - $now = time(); - $missingIds = $ids; - $ids = []; - } - $values = []; - - begin: - $getExpiry = false; - - foreach ($ids as $id) { - if (null === $value = $this->values[$id] ?? null) { - $missingIds[] = $id; - } elseif ('N;' === $value) { - $values[$id] = null; - } elseif (!\is_object($value)) { - $values[$id] = $value; - } elseif (!$value instanceof LazyValue) { - $values[$id] = $value(); - } elseif (false === $values[$id] = include $value->file) { - unset($values[$id], $this->values[$id]); - $missingIds[] = $id; - } - if (!$this->appendOnly) { - unset($this->values[$id]); - } - } - - if (!$missingIds) { - return $values; - } - - set_error_handler($this->includeHandler); - try { - $getExpiry = true; - - foreach ($missingIds as $k => $id) { - try { - $file = $this->files[$id] ?? $this->files[$id] = $this->getFile($id); - - if (isset(self::$valuesCache[$file])) { - [$expiresAt, $this->values[$id]] = self::$valuesCache[$file]; - } elseif (\is_array($expiresAt = include $file)) { - if ($this->appendOnly) { - self::$valuesCache[$file] = $expiresAt; - } - - [$expiresAt, $this->values[$id]] = $expiresAt; - } elseif ($now < $expiresAt) { - $this->values[$id] = new LazyValue($file); - } - - if ($now >= $expiresAt) { - unset($this->values[$id], $missingIds[$k], self::$valuesCache[$file]); - } - } catch (\ErrorException $e) { - unset($missingIds[$k]); - } - } - } finally { - restore_error_handler(); - } - - $ids = $missingIds; - $missingIds = []; - goto begin; - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - if ($this->appendOnly && isset($this->values[$id])) { - return true; - } - - set_error_handler($this->includeHandler); - try { - $file = $this->files[$id] ?? $this->files[$id] = $this->getFile($id); - $getExpiry = true; - - if (isset(self::$valuesCache[$file])) { - [$expiresAt, $value] = self::$valuesCache[$file]; - } elseif (\is_array($expiresAt = include $file)) { - if ($this->appendOnly) { - self::$valuesCache[$file] = $expiresAt; - } - - [$expiresAt, $value] = $expiresAt; - } elseif ($this->appendOnly) { - $value = new LazyValue($file); - } - } catch (\ErrorException $e) { - return false; - } finally { - restore_error_handler(); - } - if ($this->appendOnly) { - $now = 0; - $this->values[$id] = $value; - } else { - $now = time(); - } - - return $now < $expiresAt; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - $ok = true; - $expiry = $lifetime ? time() + $lifetime : 'PHP_INT_MAX'; - $allowCompile = self::isSupported(); - - foreach ($values as $key => $value) { - unset($this->values[$key]); - $isStaticValue = true; - if (null === $value) { - $value = "'N;'"; - } elseif (\is_object($value) || \is_array($value)) { - try { - $value = VarExporter::export($value, $isStaticValue); - } catch (\Exception $e) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value)), 0, $e); - } - } elseif (\is_string($value)) { - // Wrap "N;" in a closure to not confuse it with an encoded `null` - if ('N;' === $value) { - $isStaticValue = false; - } - $value = var_export($value, true); - } elseif (!\is_scalar($value)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, get_debug_type($value))); - } else { - $value = var_export($value, true); - } - - $encodedKey = rawurlencode($key); - - if ($isStaticValue) { - $value = "return [{$expiry}, {$value}];"; - } elseif ($this->appendOnly) { - $value = "return [{$expiry}, static function () { return {$value}; }];"; - } else { - // We cannot use a closure here because of https://bugs.php.net/76982 - $value = str_replace('\Symfony\Component\VarExporter\Internal\\', '', $value); - $value = "namespace Symfony\Component\VarExporter\Internal;\n\nreturn \$getExpiry ? {$expiry} : {$value};"; - } - - $file = $this->files[$key] = $this->getFile($key, true); - // Since OPcache only compiles files older than the script execution start, set the file's mtime in the past - $ok = $this->write($file, "<?php //{$encodedKey}\n\n{$value}\n", self::$startTime - 10) && $ok; - - if ($allowCompile) { - @opcache_invalidate($file, true); - @opcache_compile_file($file); - } - unset(self::$valuesCache[$file]); - } - - if (!$ok && !is_writable($this->directory)) { - throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory)); - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $this->values = []; - - return $this->doCommonClear($namespace); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - foreach ($ids as $id) { - unset($this->values[$id]); - } - - return $this->doCommonDelete($ids); - } - - protected function doUnlink(string $file) - { - unset(self::$valuesCache[$file]); - - if (self::isSupported()) { - @opcache_invalidate($file, true); - } - - return @unlink($file); - } - - private function getFileKey(string $file): string - { - if (!$h = @fopen($file, 'r')) { - return ''; - } - - $encodedKey = substr(fgets($h), 8); - fclose($h); - - return rawurldecode(rtrim($encodedKey)); - } -} - -/** - * @internal - */ -class LazyValue -{ - public $file; - - public function __construct(string $file) - { - $this->file = $file; - } -} diff --git a/vendor/symfony/cache/Adapter/ProxyAdapter.php b/vendor/symfony/cache/Adapter/ProxyAdapter.php deleted file mode 100644 index 317018e..0000000 --- a/vendor/symfony/cache/Adapter/ProxyAdapter.php +++ /dev/null @@ -1,268 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Component\Cache\Traits\ProxyTrait; -use Symfony\Contracts\Cache\CacheInterface; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class ProxyAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - use ContractsTrait; - use ProxyTrait; - - private $namespace = ''; - private $namespaceLen; - private $poolHash; - private $defaultLifetime; - - private static $createCacheItem; - private static $setInnerItem; - - public function __construct(CacheItemPoolInterface $pool, string $namespace = '', int $defaultLifetime = 0) - { - $this->pool = $pool; - $this->poolHash = $poolHash = spl_object_hash($pool); - if ('' !== $namespace) { - \assert('' !== CacheItem::validateKey($namespace)); - $this->namespace = $namespace; - } - $this->namespaceLen = \strlen($namespace); - $this->defaultLifetime = $defaultLifetime; - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $innerItem, $poolHash) { - $item = new CacheItem(); - $item->key = $key; - - if (null === $innerItem) { - return $item; - } - - $item->value = $v = $innerItem->get(); - $item->isHit = $innerItem->isHit(); - $item->innerItem = $innerItem; - $item->poolHash = $poolHash; - - // Detect wrapped values that encode for their expiry and creation duration - // For compactness, these values are packed in the key of an array using - // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (\is_array($v) && 1 === \count($v) && 10 === \strlen($k = (string) array_key_first($v)) && "\x9D" === $k[0] && "\0" === $k[5] && "\x5F" === $k[9]) { - $item->value = $v[$k]; - $v = unpack('Ve/Nc', substr($k, 1, -1)); - $item->metadata[CacheItem::METADATA_EXPIRY] = $v['e'] + CacheItem::METADATA_EXPIRY_OFFSET; - $item->metadata[CacheItem::METADATA_CTIME] = $v['c']; - } elseif ($innerItem instanceof CacheItem) { - $item->metadata = $innerItem->metadata; - } - $innerItem->set(null); - - return $item; - }, - null, - CacheItem::class - ); - self::$setInnerItem ?? self::$setInnerItem = \Closure::bind( - /** - * @param array $item A CacheItem cast to (array); accessing protected properties requires adding the "\0*\0" PHP prefix - */ - static function (CacheItemInterface $innerItem, array $item) { - // Tags are stored separately, no need to account for them when considering this item's newly set metadata - if (isset(($metadata = $item["\0*\0newMetadata"])[CacheItem::METADATA_TAGS])) { - unset($metadata[CacheItem::METADATA_TAGS]); - } - if ($metadata) { - // For compactness, expiry and creation duration are packed in the key of an array, using magic numbers as separators - $item["\0*\0value"] = ["\x9D".pack('VN', (int) (0.1 + $metadata[self::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[self::METADATA_CTIME])."\x5F" => $item["\0*\0value"]]; - } - $innerItem->set($item["\0*\0value"]); - $innerItem->expiresAt(null !== $item["\0*\0expiry"] ? \DateTime::createFromFormat('U.u', sprintf('%.6F', $item["\0*\0expiry"])) : null); - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null) - { - if (!$this->pool instanceof CacheInterface) { - return $this->doGet($this, $key, $callback, $beta, $metadata); - } - - return $this->pool->get($this->getId($key), function ($innerItem, bool &$save) use ($key, $callback) { - $item = (self::$createCacheItem)($key, $innerItem, $this->poolHash); - $item->set($value = $callback($item, $save)); - (self::$setInnerItem)($innerItem, (array) $item); - - return $value; - }, $beta, $metadata); - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $item = $this->pool->getItem($this->getId($key)); - - return (self::$createCacheItem)($key, $item, $this->poolHash); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - if ($this->namespaceLen) { - foreach ($keys as $i => $key) { - $keys[$i] = $this->getId($key); - } - } - - return $this->generateItems($this->pool->getItems($keys)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - return $this->pool->hasItem($this->getId($key)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - if ($this->pool instanceof AdapterInterface) { - return $this->pool->clear($this->namespace.$prefix); - } - - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - return $this->pool->deleteItem($this->getId($key)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - if ($this->namespaceLen) { - foreach ($keys as $i => $key) { - $keys[$i] = $this->getId($key); - } - } - - return $this->pool->deleteItems($keys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - return $this->doSave($item, __FUNCTION__); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - return $this->doSave($item, __FUNCTION__); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - return $this->pool->commit(); - } - - private function doSave(CacheItemInterface $item, string $method) - { - if (!$item instanceof CacheItem) { - return false; - } - $item = (array) $item; - if (null === $item["\0*\0expiry"] && 0 < $this->defaultLifetime) { - $item["\0*\0expiry"] = microtime(true) + $this->defaultLifetime; - } - - if ($item["\0*\0poolHash"] === $this->poolHash && $item["\0*\0innerItem"]) { - $innerItem = $item["\0*\0innerItem"]; - } elseif ($this->pool instanceof AdapterInterface) { - // this is an optimization specific for AdapterInterface implementations - // so we can save a round-trip to the backend by just creating a new item - $innerItem = (self::$createCacheItem)($this->namespace.$item["\0*\0key"], null, $this->poolHash); - } else { - $innerItem = $this->pool->getItem($this->namespace.$item["\0*\0key"]); - } - - (self::$setInnerItem)($innerItem, $item); - - return $this->pool->$method($innerItem); - } - - private function generateItems(iterable $items): \Generator - { - $f = self::$createCacheItem; - - foreach ($items as $key => $item) { - if ($this->namespaceLen) { - $key = substr($key, $this->namespaceLen); - } - - yield $key => $f($key, $item, $this->poolHash); - } - } - - private function getId($key): string - { - \assert('' !== CacheItem::validateKey($key)); - - return $this->namespace.$key; - } -} diff --git a/vendor/symfony/cache/Adapter/Psr16Adapter.php b/vendor/symfony/cache/Adapter/Psr16Adapter.php deleted file mode 100644 index a56aa39..0000000 --- a/vendor/symfony/cache/Adapter/Psr16Adapter.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ProxyTrait; - -/** - * Turns a PSR-16 cache into a PSR-6 one. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class Psr16Adapter extends AbstractAdapter implements PruneableInterface, ResettableInterface -{ - use ProxyTrait; - - /** - * @internal - */ - protected const NS_SEPARATOR = '_'; - - private $miss; - - public function __construct(CacheInterface $pool, string $namespace = '', int $defaultLifetime = 0) - { - parent::__construct($namespace, $defaultLifetime); - - $this->pool = $pool; - $this->miss = new \stdClass(); - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - foreach ($this->pool->getMultiple($ids, $this->miss) as $key => $value) { - if ($this->miss !== $value) { - yield $key => $value; - } - } - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return $this->pool->has($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - return $this->pool->deleteMultiple($ids); - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - return $this->pool->setMultiple($values, 0 === $lifetime ? null : $lifetime); - } -} diff --git a/vendor/symfony/cache/Adapter/RedisAdapter.php b/vendor/symfony/cache/Adapter/RedisAdapter.php deleted file mode 100644 index 86714ae..0000000 --- a/vendor/symfony/cache/Adapter/RedisAdapter.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; -use Symfony\Component\Cache\Traits\RedisTrait; - -class RedisAdapter extends AbstractAdapter -{ - use RedisTrait; - - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis The redis client - * @param string $namespace The default namespace - * @param int $defaultLifetime The default lifetime - */ - public function __construct($redis, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null) - { - $this->init($redis, $namespace, $defaultLifetime, $marshaller); - } -} diff --git a/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php b/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php deleted file mode 100644 index 958486e..0000000 --- a/vendor/symfony/cache/Adapter/RedisTagAwareAdapter.php +++ /dev/null @@ -1,325 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Predis\Connection\Aggregate\ClusterInterface; -use Predis\Connection\Aggregate\PredisCluster; -use Predis\Connection\Aggregate\ReplicationInterface; -use Predis\Response\ErrorInterface; -use Predis\Response\Status; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Exception\LogicException; -use Symfony\Component\Cache\Marshaller\DeflateMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; -use Symfony\Component\Cache\Marshaller\TagAwareMarshaller; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; -use Symfony\Component\Cache\Traits\RedisTrait; - -/** - * Stores tag id <> cache id relationship as a Redis Set. - * - * Set (tag relation info) is stored without expiry (non-volatile), while cache always gets an expiry (volatile) even - * if not set by caller. Thus if you configure redis with the right eviction policy you can be safe this tag <> cache - * relationship survives eviction (cache cleanup when Redis runs out of memory). - * - * Redis server 2.8+ with any `volatile-*` eviction policy, OR `noeviction` if you're sure memory will NEVER fill up - * - * Design limitations: - * - Max 4 billion cache keys per cache tag as limited by Redis Set datatype. - * E.g. If you use a "all" items tag for expiry instead of clear(), that limits you to 4 billion cache items also. - * - * @see https://redis.io/topics/lru-cache#eviction-policies Documentation for Redis eviction policies. - * @see https://redis.io/topics/data-types#sets Documentation for Redis Set datatype. - * - * @author Nicolas Grekas <p@tchwork.com> - * @author André Rømcke <andre.romcke+symfony@gmail.com> - */ -class RedisTagAwareAdapter extends AbstractTagAwareAdapter -{ - use RedisTrait; - - /** - * On cache items without a lifetime set, we set it to 100 days. This is to make sure cache items are - * preferred to be evicted over tag Sets, if eviction policy is configured according to requirements. - */ - private const DEFAULT_CACHE_TTL = 8640000; - - /** - * @var string|null detected eviction policy used on Redis server - */ - private $redisEvictionPolicy; - private $namespace; - - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis The redis client - * @param string $namespace The default namespace - * @param int $defaultLifetime The default lifetime - */ - public function __construct($redis, string $namespace = '', int $defaultLifetime = 0, ?MarshallerInterface $marshaller = null) - { - if ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof ClusterInterface && !$redis->getConnection() instanceof PredisCluster) { - throw new InvalidArgumentException(sprintf('Unsupported Predis cluster connection: only "%s" is, "%s" given.', PredisCluster::class, get_debug_type($redis->getConnection()))); - } - - if (\defined('Redis::OPT_COMPRESSION') && ($redis instanceof \Redis || $redis instanceof \RedisArray || $redis instanceof \RedisCluster)) { - $compression = $redis->getOption(\Redis::OPT_COMPRESSION); - - foreach (\is_array($compression) ? $compression : [$compression] as $c) { - if (\Redis::COMPRESSION_NONE !== $c) { - throw new InvalidArgumentException(sprintf('phpredis compression must be disabled when using "%s", use "%s" instead.', static::class, DeflateMarshaller::class)); - } - } - } - - $this->init($redis, $namespace, $defaultLifetime, new TagAwareMarshaller($marshaller)); - $this->namespace = $namespace; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime, array $addTagData = [], array $delTagData = []): array - { - $eviction = $this->getRedisEvictionPolicy(); - if ('noeviction' !== $eviction && !str_starts_with($eviction, 'volatile-')) { - throw new LogicException(sprintf('Redis maxmemory-policy setting "%s" is *not* supported by RedisTagAwareAdapter, use "noeviction" or "volatile-*" eviction policies.', $eviction)); - } - - // serialize values - if (!$serialized = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - // While pipeline isn't supported on RedisCluster, other setups will at least benefit from doing this in one op - $results = $this->pipeline(static function () use ($serialized, $lifetime, $addTagData, $delTagData, $failed) { - // Store cache items, force a ttl if none is set, as there is no MSETEX we need to set each one - foreach ($serialized as $id => $value) { - yield 'setEx' => [ - $id, - 0 >= $lifetime ? self::DEFAULT_CACHE_TTL : $lifetime, - $value, - ]; - } - - // Add and Remove Tags - foreach ($addTagData as $tagId => $ids) { - if (!$failed || $ids = array_diff($ids, $failed)) { - yield 'sAdd' => array_merge([$tagId], $ids); - } - } - - foreach ($delTagData as $tagId => $ids) { - if (!$failed || $ids = array_diff($ids, $failed)) { - yield 'sRem' => array_merge([$tagId], $ids); - } - } - }); - - foreach ($results as $id => $result) { - // Skip results of SADD/SREM operations, they'll be 1 or 0 depending on if set value already existed or not - if (is_numeric($result)) { - continue; - } - // setEx results - if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) { - $failed[] = $id; - } - } - - return $failed; - } - - /** - * {@inheritdoc} - */ - protected function doDeleteYieldTags(array $ids): iterable - { - $lua = <<<'EOLUA' - local v = redis.call('GET', KEYS[1]) - local e = redis.pcall('UNLINK', KEYS[1]) - - if type(e) ~= 'number' then - redis.call('DEL', KEYS[1]) - end - - if not v or v:len() <= 13 or v:byte(1) ~= 0x9D or v:byte(6) ~= 0 or v:byte(10) ~= 0x5F then - return '' - end - - return v:sub(14, 13 + v:byte(13) + v:byte(12) * 256 + v:byte(11) * 65536) -EOLUA; - - $results = $this->pipeline(function () use ($ids, $lua) { - foreach ($ids as $id) { - yield 'eval' => $this->redis instanceof \Predis\ClientInterface ? [$lua, 1, $id] : [$lua, [$id], 1]; - } - }); - - foreach ($results as $id => $result) { - if ($result instanceof \RedisException || $result instanceof ErrorInterface) { - CacheItem::log($this->logger, 'Failed to delete key "{key}": '.$result->getMessage(), ['key' => substr($id, \strlen($this->namespace)), 'exception' => $result]); - - continue; - } - - try { - yield $id => !\is_string($result) || '' === $result ? [] : $this->marshaller->unmarshall($result); - } catch (\Exception $e) { - yield $id => []; - } - } - } - - /** - * {@inheritdoc} - */ - protected function doDeleteTagRelations(array $tagData): bool - { - $results = $this->pipeline(static function () use ($tagData) { - foreach ($tagData as $tagId => $idList) { - array_unshift($idList, $tagId); - yield 'sRem' => $idList; - } - }); - foreach ($results as $result) { - // no-op - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doInvalidate(array $tagIds): bool - { - // This script scans the set of items linked to tag: it empties the set - // and removes the linked items. When the set is still not empty after - // the scan, it means we're in cluster mode and that the linked items - // are on other nodes: we move the links to a temporary set and we - // garbage collect that set from the client side. - - $lua = <<<'EOLUA' - redis.replicate_commands() - - local cursor = '0' - local id = KEYS[1] - repeat - local result = redis.call('SSCAN', id, cursor, 'COUNT', 5000); - cursor = result[1]; - local rems = {} - - for _, v in ipairs(result[2]) do - local ok, _ = pcall(redis.call, 'DEL', ARGV[1]..v) - if ok then - table.insert(rems, v) - end - end - if 0 < #rems then - redis.call('SREM', id, unpack(rems)) - end - until '0' == cursor; - - redis.call('SUNIONSTORE', '{'..id..'}'..id, id) - redis.call('DEL', id) - - return redis.call('SSCAN', '{'..id..'}'..id, '0', 'COUNT', 5000) -EOLUA; - - $results = $this->pipeline(function () use ($tagIds, $lua) { - if ($this->redis instanceof \Predis\ClientInterface) { - $prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : ''; - } elseif (\is_array($prefix = $this->redis->getOption(\Redis::OPT_PREFIX) ?? '')) { - $prefix = current($prefix); - } - - foreach ($tagIds as $id) { - yield 'eval' => $this->redis instanceof \Predis\ClientInterface ? [$lua, 1, $id, $prefix] : [$lua, [$id, $prefix], 1]; - } - }); - - $lua = <<<'EOLUA' - redis.replicate_commands() - - local id = KEYS[1] - local cursor = table.remove(ARGV) - redis.call('SREM', '{'..id..'}'..id, unpack(ARGV)) - - return redis.call('SSCAN', '{'..id..'}'..id, cursor, 'COUNT', 5000) -EOLUA; - - $success = true; - foreach ($results as $id => $values) { - if ($values instanceof \RedisException || $values instanceof ErrorInterface) { - CacheItem::log($this->logger, 'Failed to invalidate key "{key}": '.$values->getMessage(), ['key' => substr($id, \strlen($this->namespace)), 'exception' => $values]); - $success = false; - - continue; - } - - [$cursor, $ids] = $values; - - while ($ids || '0' !== $cursor) { - $this->doDelete($ids); - - $evalArgs = [$id, $cursor]; - array_splice($evalArgs, 1, 0, $ids); - - if ($this->redis instanceof \Predis\ClientInterface) { - array_unshift($evalArgs, $lua, 1); - } else { - $evalArgs = [$lua, $evalArgs, 1]; - } - - $results = $this->pipeline(function () use ($evalArgs) { - yield 'eval' => $evalArgs; - }); - - foreach ($results as [$cursor, $ids]) { - // no-op - } - } - } - - return $success; - } - - private function getRedisEvictionPolicy(): string - { - if (null !== $this->redisEvictionPolicy) { - return $this->redisEvictionPolicy; - } - - $hosts = $this->getHosts(); - $host = reset($hosts); - if ($host instanceof \Predis\Client && $host->getConnection() instanceof ReplicationInterface) { - // Predis supports info command only on the master in replication environments - $hosts = [$host->getClientFor('master')]; - } - - foreach ($hosts as $host) { - $info = $host->info('Memory'); - - if ($info instanceof ErrorInterface) { - continue; - } - - $info = $info['Memory'] ?? $info; - - return $this->redisEvictionPolicy = $info['maxmemory_policy']; - } - - return $this->redisEvictionPolicy = ''; - } -} diff --git a/vendor/symfony/cache/Adapter/TagAwareAdapter.php b/vendor/symfony/cache/Adapter/TagAwareAdapter.php deleted file mode 100644 index fb59599..0000000 --- a/vendor/symfony/cache/Adapter/TagAwareAdapter.php +++ /dev/null @@ -1,428 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\InvalidArgumentException; -use Psr\Log\LoggerAwareInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Component\Cache\Traits\ContractsTrait; -use Symfony\Component\Cache\Traits\ProxyTrait; -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class TagAwareAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface, PruneableInterface, ResettableInterface, LoggerAwareInterface -{ - use ContractsTrait; - use LoggerAwareTrait; - use ProxyTrait; - - public const TAGS_PREFIX = "\0tags\0"; - - private $deferred = []; - private $tags; - private $knownTagVersions = []; - private $knownTagVersionsTtl; - - private static $createCacheItem; - private static $setCacheItemTags; - private static $getTagsByKey; - private static $saveTags; - - public function __construct(AdapterInterface $itemsPool, ?AdapterInterface $tagsPool = null, float $knownTagVersionsTtl = 0.15) - { - $this->pool = $itemsPool; - $this->tags = $tagsPool ?: $itemsPool; - $this->knownTagVersionsTtl = $knownTagVersionsTtl; - self::$createCacheItem ?? self::$createCacheItem = \Closure::bind( - static function ($key, $value, CacheItem $protoItem) { - $item = new CacheItem(); - $item->key = $key; - $item->value = $value; - $item->expiry = $protoItem->expiry; - $item->poolHash = $protoItem->poolHash; - - return $item; - }, - null, - CacheItem::class - ); - self::$setCacheItemTags ?? self::$setCacheItemTags = \Closure::bind( - static function (CacheItem $item, $key, array &$itemTags) { - $item->isTaggable = true; - if (!$item->isHit) { - return $item; - } - if (isset($itemTags[$key])) { - foreach ($itemTags[$key] as $tag => $version) { - $item->metadata[CacheItem::METADATA_TAGS][$tag] = $tag; - } - unset($itemTags[$key]); - } else { - $item->value = null; - $item->isHit = false; - } - - return $item; - }, - null, - CacheItem::class - ); - self::$getTagsByKey ?? self::$getTagsByKey = \Closure::bind( - static function ($deferred) { - $tagsByKey = []; - foreach ($deferred as $key => $item) { - $tagsByKey[$key] = $item->newMetadata[CacheItem::METADATA_TAGS] ?? []; - $item->metadata = $item->newMetadata; - } - - return $tagsByKey; - }, - null, - CacheItem::class - ); - self::$saveTags ?? self::$saveTags = \Closure::bind( - static function (AdapterInterface $tagsAdapter, array $tags) { - ksort($tags); - - foreach ($tags as $v) { - $v->expiry = 0; - $tagsAdapter->saveDeferred($v); - } - - return $tagsAdapter->commit(); - }, - null, - CacheItem::class - ); - } - - /** - * {@inheritdoc} - */ - public function invalidateTags(array $tags) - { - $ids = []; - foreach ($tags as $tag) { - \assert('' !== CacheItem::validateKey($tag)); - unset($this->knownTagVersions[$tag]); - $ids[] = $tag.static::TAGS_PREFIX; - } - - return !$tags || $this->tags->deleteItems($ids); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - if (\is_string($key) && isset($this->deferred[$key])) { - $this->commit(); - } - - if (!$this->pool->hasItem($key)) { - return false; - } - - $itemTags = $this->pool->getItem(static::TAGS_PREFIX.$key); - - if (!$itemTags->isHit()) { - return false; - } - - if (!$itemTags = $itemTags->get()) { - return true; - } - - foreach ($this->getTagVersions([$itemTags]) as $tag => $version) { - if ($itemTags[$tag] !== $version) { - return false; - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - foreach ($this->getItems([$key]) as $item) { - return $item; - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - $tagKeys = []; - $commit = false; - - foreach ($keys as $key) { - if ('' !== $key && \is_string($key)) { - $commit = $commit || isset($this->deferred[$key]); - $key = static::TAGS_PREFIX.$key; - $tagKeys[$key] = $key; - } - } - - if ($commit) { - $this->commit(); - } - - try { - $items = $this->pool->getItems($tagKeys + $keys); - } catch (InvalidArgumentException $e) { - $this->pool->getItems($keys); // Should throw an exception - - throw $e; - } - - return $this->generateItems($items, $tagKeys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - if ('' !== $prefix) { - foreach ($this->deferred as $key => $item) { - if (str_starts_with($key, $prefix)) { - unset($this->deferred[$key]); - } - } - } else { - $this->deferred = []; - } - - if ($this->pool instanceof AdapterInterface) { - return $this->pool->clear($prefix); - } - - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - return $this->deleteItems([$key]); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - foreach ($keys as $key) { - if ('' !== $key && \is_string($key)) { - $keys[] = static::TAGS_PREFIX.$key; - } - } - - return $this->pool->deleteItems($keys); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return $this->commit(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return true; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - if (!$this->deferred) { - return true; - } - - $ok = true; - foreach ($this->deferred as $key => $item) { - if (!$this->pool->saveDeferred($item)) { - unset($this->deferred[$key]); - $ok = false; - } - } - - $items = $this->deferred; - $tagsByKey = (self::$getTagsByKey)($items); - $this->deferred = []; - - $tagVersions = $this->getTagVersions($tagsByKey); - $f = self::$createCacheItem; - - foreach ($tagsByKey as $key => $tags) { - $this->pool->saveDeferred($f(static::TAGS_PREFIX.$key, array_intersect_key($tagVersions, $tags), $items[$key])); - } - - return $this->pool->commit() && $ok; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->commit(); - } - - private function generateItems(iterable $items, array $tagKeys): \Generator - { - $bufferedItems = $itemTags = []; - $f = self::$setCacheItemTags; - - foreach ($items as $key => $item) { - if (!$tagKeys) { - yield $key => $f($item, static::TAGS_PREFIX.$key, $itemTags); - continue; - } - if (!isset($tagKeys[$key])) { - $bufferedItems[$key] = $item; - continue; - } - - unset($tagKeys[$key]); - - if ($item->isHit()) { - $itemTags[$key] = $item->get() ?: []; - } - - if (!$tagKeys) { - $tagVersions = $this->getTagVersions($itemTags); - - foreach ($itemTags as $key => $tags) { - foreach ($tags as $tag => $version) { - if ($tagVersions[$tag] !== $version) { - unset($itemTags[$key]); - continue 2; - } - } - } - $tagVersions = $tagKeys = null; - - foreach ($bufferedItems as $key => $item) { - yield $key => $f($item, static::TAGS_PREFIX.$key, $itemTags); - } - $bufferedItems = null; - } - } - } - - private function getTagVersions(array $tagsByKey) - { - $tagVersions = []; - $fetchTagVersions = false; - - foreach ($tagsByKey as $tags) { - $tagVersions += $tags; - - foreach ($tags as $tag => $version) { - if ($tagVersions[$tag] !== $version) { - unset($this->knownTagVersions[$tag]); - } - } - } - - if (!$tagVersions) { - return []; - } - - $now = microtime(true); - $tags = []; - foreach ($tagVersions as $tag => $version) { - $tags[$tag.static::TAGS_PREFIX] = $tag; - if ($fetchTagVersions || ($this->knownTagVersions[$tag][1] ?? null) !== $version || $now - $this->knownTagVersions[$tag][0] >= $this->knownTagVersionsTtl) { - // reuse previously fetched tag versions up to the ttl - $fetchTagVersions = true; - } - } - - if (!$fetchTagVersions) { - return $tagVersions; - } - - $newTags = []; - $newVersion = null; - foreach ($this->tags->getItems(array_keys($tags)) as $tag => $version) { - if (!$version->isHit()) { - $newTags[$tag] = $version->set($newVersion ?? $newVersion = random_int(\PHP_INT_MIN, \PHP_INT_MAX)); - } - $tagVersions[$tag = $tags[$tag]] = $version->get(); - $this->knownTagVersions[$tag] = [$now, $tagVersions[$tag]]; - } - - if ($newTags) { - (self::$saveTags)($this->tags, $newTags); - } - - return $tagVersions; - } -} diff --git a/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php b/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php deleted file mode 100644 index afa18d3..0000000 --- a/vendor/symfony/cache/Adapter/TagAwareAdapterInterface.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\InvalidArgumentException; - -/** - * Interface for invalidating cached items using tags. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface TagAwareAdapterInterface extends AdapterInterface -{ - /** - * Invalidates cached items using tags. - * - * @param string[] $tags An array of tags to invalidate - * - * @return bool - * - * @throws InvalidArgumentException When $tags is not valid - */ - public function invalidateTags(array $tags); -} diff --git a/vendor/symfony/cache/Adapter/TraceableAdapter.php b/vendor/symfony/cache/Adapter/TraceableAdapter.php deleted file mode 100644 index 06951db..0000000 --- a/vendor/symfony/cache/Adapter/TraceableAdapter.php +++ /dev/null @@ -1,295 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\ResettableInterface; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * An adapter that collects data about all cache calls. - * - * @author Aaron Scherer <aequasi@gmail.com> - * @author Tobias Nyholm <tobias.nyholm@gmail.com> - * @author Nicolas Grekas <p@tchwork.com> - */ -class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface -{ - protected $pool; - private $calls = []; - - public function __construct(AdapterInterface $pool) - { - $this->pool = $pool; - } - - /** - * {@inheritdoc} - */ - public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null) - { - if (!$this->pool instanceof CacheInterface) { - throw new \BadMethodCallException(sprintf('Cannot call "%s::get()": this class doesn\'t implement "%s".', get_debug_type($this->pool), CacheInterface::class)); - } - - $isHit = true; - $callback = function (CacheItem $item, bool &$save) use ($callback, &$isHit) { - $isHit = $item->isHit(); - - return $callback($item, $save); - }; - - $event = $this->start(__FUNCTION__); - try { - $value = $this->pool->get($key, $callback, $beta, $metadata); - $event->result[$key] = get_debug_type($value); - } finally { - $event->end = microtime(true); - } - if ($isHit) { - ++$event->hits; - } else { - ++$event->misses; - } - - return $value; - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $event = $this->start(__FUNCTION__); - try { - $item = $this->pool->getItem($key); - } finally { - $event->end = microtime(true); - } - if ($event->result[$key] = $item->isHit()) { - ++$event->hits; - } else { - ++$event->misses; - } - - return $item; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->hasItem($key); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->deleteItem($key); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$item->getKey()] = $this->pool->save($item); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$item->getKey()] = $this->pool->saveDeferred($item); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - $event = $this->start(__FUNCTION__); - try { - $result = $this->pool->getItems($keys); - } finally { - $event->end = microtime(true); - } - $f = function () use ($result, $event) { - $event->result = []; - foreach ($result as $key => $item) { - if ($event->result[$key] = $item->isHit()) { - ++$event->hits; - } else { - ++$event->misses; - } - yield $key => $item; - } - }; - - return $f(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - $event = $this->start(__FUNCTION__); - try { - if ($this->pool instanceof AdapterInterface) { - return $event->result = $this->pool->clear($prefix); - } - - return $event->result = $this->pool->clear(); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - $event = $this->start(__FUNCTION__); - $event->result['keys'] = $keys; - try { - return $event->result['result'] = $this->pool->deleteItems($keys); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function commit() - { - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->commit(); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - */ - public function prune() - { - if (!$this->pool instanceof PruneableInterface) { - return false; - } - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->prune(); - } finally { - $event->end = microtime(true); - } - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - - $this->clearCalls(); - } - - /** - * {@inheritdoc} - */ - public function delete(string $key): bool - { - $event = $this->start(__FUNCTION__); - try { - return $event->result[$key] = $this->pool->deleteItem($key); - } finally { - $event->end = microtime(true); - } - } - - public function getCalls() - { - return $this->calls; - } - - public function clearCalls() - { - $this->calls = []; - } - - protected function start(string $name) - { - $this->calls[] = $event = new TraceableAdapterEvent(); - $event->name = $name; - $event->start = microtime(true); - - return $event; - } -} - -class TraceableAdapterEvent -{ - public $name; - public $start; - public $end; - public $result; - public $hits = 0; - public $misses = 0; -} diff --git a/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php b/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php deleted file mode 100644 index 69461b8..0000000 --- a/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Adapter; - -use Symfony\Contracts\Cache\TagAwareCacheInterface; - -/** - * @author Robin Chalas <robin.chalas@gmail.com> - */ -class TraceableTagAwareAdapter extends TraceableAdapter implements TagAwareAdapterInterface, TagAwareCacheInterface -{ - public function __construct(TagAwareAdapterInterface $pool) - { - parent::__construct($pool); - } - - /** - * {@inheritdoc} - */ - public function invalidateTags(array $tags) - { - $event = $this->start(__FUNCTION__); - try { - return $event->result = $this->pool->invalidateTags($tags); - } finally { - $event->end = microtime(true); - } - } -} diff --git a/vendor/symfony/cache/CHANGELOG.md b/vendor/symfony/cache/CHANGELOG.md deleted file mode 100644 index 60a8627..0000000 --- a/vendor/symfony/cache/CHANGELOG.md +++ /dev/null @@ -1,108 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate `DoctrineProvider` and `DoctrineAdapter` because these classes have been added to the `doctrine/cache` package - * Add `DoctrineDbalAdapter` identical to `PdoAdapter` for `Doctrine\DBAL\Connection` or DBAL URL - * Deprecate usage of `PdoAdapter` with `Doctrine\DBAL\Connection` or DBAL URL - -5.3 ---- - - * added support for connecting to Redis Sentinel clusters when using the Redis PHP extension - * add support for a custom serializer to the `ApcuAdapter` class - -5.2.0 ------ - - * added integration with Messenger to allow computing cached values in a worker - * allow ISO 8601 time intervals to specify default lifetime - -5.1.0 ------ - - * added max-items + LRU + max-lifetime capabilities to `ArrayCache` - * added `CouchbaseBucketAdapter` - * added context `cache-adapter` to log messages - -5.0.0 ------ - - * removed all PSR-16 implementations in the `Simple` namespace - * removed `SimpleCacheAdapter` - * removed `AbstractAdapter::unserialize()` - * removed `CacheItem::getPreviousTags()` - -4.4.0 ------ - - * added support for connecting to Redis Sentinel clusters - * added argument `$prefix` to `AdapterInterface::clear()` - * improved `RedisTagAwareAdapter` to support Redis server >= 2.8 and up to 4B items per tag - * added `TagAwareMarshaller` for optimized data storage when using `AbstractTagAwareAdapter` - * added `DeflateMarshaller` to compress serialized values - * removed support for phpredis 4 `compression` - * [BC BREAK] `RedisTagAwareAdapter` is not compatible with `RedisCluster` from `Predis` anymore, use `phpredis` instead - * Marked the `CacheDataCollector` class as `@final`. - * added `SodiumMarshaller` to encrypt/decrypt values using libsodium - -4.3.0 ------ - - * removed `psr/simple-cache` dependency, run `composer require psr/simple-cache` if you need it - * deprecated all PSR-16 adapters, use `Psr16Cache` or `Symfony\Contracts\Cache\CacheInterface` implementations instead - * deprecated `SimpleCacheAdapter`, use `Psr16Adapter` instead - -4.2.0 ------ - - * added support for connecting to Redis clusters via DSN - * added support for configuring multiple Memcached servers via DSN - * added `MarshallerInterface` and `DefaultMarshaller` to allow changing the serializer and provide one that automatically uses igbinary when available - * implemented `CacheInterface`, which provides stampede protection via probabilistic early expiration and should become the preferred way to use a cache - * added sub-second expiry accuracy for backends that support it - * added support for phpredis 4 `compression` and `tcp_keepalive` options - * added automatic table creation when using Doctrine DBAL with PDO-based backends - * throw `LogicException` when `CacheItem::tag()` is called on an item coming from a non tag-aware pool - * deprecated `CacheItem::getPreviousTags()`, use `CacheItem::getMetadata()` instead - * deprecated the `AbstractAdapter::unserialize()` and `AbstractCache::unserialize()` methods - * added `CacheCollectorPass` (originally in `FrameworkBundle`) - * added `CachePoolClearerPass` (originally in `FrameworkBundle`) - * added `CachePoolPass` (originally in `FrameworkBundle`) - * added `CachePoolPrunerPass` (originally in `FrameworkBundle`) - -3.4.0 ------ - - * added using options from Memcached DSN - * added PruneableInterface so PSR-6 or PSR-16 cache implementations can declare support for manual stale cache pruning - * added prune logic to FilesystemTrait, PhpFilesTrait, PdoTrait, TagAwareAdapter and ChainTrait - * now FilesystemAdapter, PhpFilesAdapter, FilesystemCache, PhpFilesCache, PdoAdapter, PdoCache, ChainAdapter, and - ChainCache implement PruneableInterface and support manual stale cache pruning - -3.3.0 ------ - - * added CacheItem::getPreviousTags() to get bound tags coming from the pool storage if any - * added PSR-16 "Simple Cache" implementations for all existing PSR-6 adapters - * added Psr6Cache and SimpleCacheAdapter for bidirectional interoperability between PSR-6 and PSR-16 - * added MemcachedAdapter (PSR-6) and MemcachedCache (PSR-16) - * added TraceableAdapter (PSR-6) and TraceableCache (PSR-16) - -3.2.0 ------ - - * added TagAwareAdapter for tags-based invalidation - * added PdoAdapter with PDO and Doctrine DBAL support - * added PhpArrayAdapter and PhpFilesAdapter for OPcache-backed shared memory storage (PHP 7+ only) - * added NullAdapter - -3.1.0 ------ - - * added the component with strict PSR-6 implementations - * added ApcuAdapter, ArrayAdapter, FilesystemAdapter and RedisAdapter - * added AbstractAdapter, ChainAdapter and ProxyAdapter - * added DoctrineAdapter and DoctrineProvider for bidirectional interoperability with Doctrine Cache diff --git a/vendor/symfony/cache/CacheItem.php b/vendor/symfony/cache/CacheItem.php deleted file mode 100644 index 091d9e9..0000000 --- a/vendor/symfony/cache/CacheItem.php +++ /dev/null @@ -1,192 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Exception\LogicException; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -final class CacheItem implements ItemInterface -{ - private const METADATA_EXPIRY_OFFSET = 1527506807; - - protected $key; - protected $value; - protected $isHit = false; - protected $expiry; - protected $metadata = []; - protected $newMetadata = []; - protected $innerItem; - protected $poolHash; - protected $isTaggable = false; - - /** - * {@inheritdoc} - */ - public function getKey(): string - { - return $this->key; - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get() - { - return $this->value; - } - - /** - * {@inheritdoc} - */ - public function isHit(): bool - { - return $this->isHit; - } - - /** - * {@inheritdoc} - * - * @return $this - */ - public function set($value): self - { - $this->value = $value; - - return $this; - } - - /** - * {@inheritdoc} - * - * @return $this - */ - public function expiresAt($expiration): self - { - if (null === $expiration) { - $this->expiry = null; - } elseif ($expiration instanceof \DateTimeInterface) { - $this->expiry = (float) $expiration->format('U.u'); - } else { - throw new InvalidArgumentException(sprintf('Expiration date must implement DateTimeInterface or be null, "%s" given.', get_debug_type($expiration))); - } - - return $this; - } - - /** - * {@inheritdoc} - * - * @return $this - */ - public function expiresAfter($time): self - { - if (null === $time) { - $this->expiry = null; - } elseif ($time instanceof \DateInterval) { - $this->expiry = microtime(true) + \DateTime::createFromFormat('U', 0)->add($time)->format('U.u'); - } elseif (\is_int($time)) { - $this->expiry = $time + microtime(true); - } else { - throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', get_debug_type($time))); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function tag($tags): ItemInterface - { - if (!$this->isTaggable) { - throw new LogicException(sprintf('Cache item "%s" comes from a non tag-aware pool: you cannot tag it.', $this->key)); - } - if (!is_iterable($tags)) { - $tags = [$tags]; - } - foreach ($tags as $tag) { - if (!\is_string($tag) && !(\is_object($tag) && method_exists($tag, '__toString'))) { - throw new InvalidArgumentException(sprintf('Cache tag must be string or object that implements __toString(), "%s" given.', \is_object($tag) ? \get_class($tag) : \gettype($tag))); - } - $tag = (string) $tag; - if (isset($this->newMetadata[self::METADATA_TAGS][$tag])) { - continue; - } - if ('' === $tag) { - throw new InvalidArgumentException('Cache tag length must be greater than zero.'); - } - if (false !== strpbrk($tag, self::RESERVED_CHARACTERS)) { - throw new InvalidArgumentException(sprintf('Cache tag "%s" contains reserved characters "%s".', $tag, self::RESERVED_CHARACTERS)); - } - $this->newMetadata[self::METADATA_TAGS][$tag] = $tag; - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getMetadata(): array - { - return $this->metadata; - } - - /** - * Validates a cache key according to PSR-6. - * - * @param mixed $key The key to validate - * - * @throws InvalidArgumentException When $key is not valid - */ - public static function validateKey($key): string - { - if (!\is_string($key)) { - throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', get_debug_type($key))); - } - if ('' === $key) { - throw new InvalidArgumentException('Cache key length must be greater than zero.'); - } - if (false !== strpbrk($key, self::RESERVED_CHARACTERS)) { - throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters "%s".', $key, self::RESERVED_CHARACTERS)); - } - - return $key; - } - - /** - * Internal logging helper. - * - * @internal - */ - public static function log(?LoggerInterface $logger, string $message, array $context = []) - { - if ($logger) { - $logger->warning($message, $context); - } else { - $replace = []; - foreach ($context as $k => $v) { - if (\is_scalar($v)) { - $replace['{'.$k.'}'] = $v; - } - } - @trigger_error(strtr($message, $replace), \E_USER_WARNING); - } - } -} diff --git a/vendor/symfony/cache/DataCollector/CacheDataCollector.php b/vendor/symfony/cache/DataCollector/CacheDataCollector.php deleted file mode 100644 index 0479580..0000000 --- a/vendor/symfony/cache/DataCollector/CacheDataCollector.php +++ /dev/null @@ -1,183 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DataCollector; - -use Symfony\Component\Cache\Adapter\TraceableAdapter; -use Symfony\Component\Cache\Adapter\TraceableAdapterEvent; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; - -/** - * @author Aaron Scherer <aequasi@gmail.com> - * @author Tobias Nyholm <tobias.nyholm@gmail.com> - * - * @final - */ -class CacheDataCollector extends DataCollector implements LateDataCollectorInterface -{ - /** - * @var TraceableAdapter[] - */ - private $instances = []; - - public function addInstance(string $name, TraceableAdapter $instance) - { - $this->instances[$name] = $instance; - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, ?\Throwable $exception = null) - { - $empty = ['calls' => [], 'config' => [], 'options' => [], 'statistics' => []]; - $this->data = ['instances' => $empty, 'total' => $empty]; - foreach ($this->instances as $name => $instance) { - $this->data['instances']['calls'][$name] = $instance->getCalls(); - } - - $this->data['instances']['statistics'] = $this->calculateStatistics(); - $this->data['total']['statistics'] = $this->calculateTotalStatistics(); - } - - public function reset() - { - $this->data = []; - foreach ($this->instances as $instance) { - $instance->clearCalls(); - } - } - - public function lateCollect() - { - $this->data['instances']['calls'] = $this->cloneVar($this->data['instances']['calls']); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'cache'; - } - - /** - * Method returns amount of logged Cache reads: "get" calls. - */ - public function getStatistics(): array - { - return $this->data['instances']['statistics']; - } - - /** - * Method returns the statistic totals. - */ - public function getTotals(): array - { - return $this->data['total']['statistics']; - } - - /** - * Method returns all logged Cache call objects. - * - * @return mixed - */ - public function getCalls() - { - return $this->data['instances']['calls']; - } - - private function calculateStatistics(): array - { - $statistics = []; - foreach ($this->data['instances']['calls'] as $name => $calls) { - $statistics[$name] = [ - 'calls' => 0, - 'time' => 0, - 'reads' => 0, - 'writes' => 0, - 'deletes' => 0, - 'hits' => 0, - 'misses' => 0, - ]; - /** @var TraceableAdapterEvent $call */ - foreach ($calls as $call) { - ++$statistics[$name]['calls']; - $statistics[$name]['time'] += ($call->end ?? microtime(true)) - $call->start; - if ('get' === $call->name) { - ++$statistics[$name]['reads']; - if ($call->hits) { - ++$statistics[$name]['hits']; - } else { - ++$statistics[$name]['misses']; - ++$statistics[$name]['writes']; - } - } elseif ('getItem' === $call->name) { - ++$statistics[$name]['reads']; - if ($call->hits) { - ++$statistics[$name]['hits']; - } else { - ++$statistics[$name]['misses']; - } - } elseif ('getItems' === $call->name) { - $statistics[$name]['reads'] += $call->hits + $call->misses; - $statistics[$name]['hits'] += $call->hits; - $statistics[$name]['misses'] += $call->misses; - } elseif ('hasItem' === $call->name) { - ++$statistics[$name]['reads']; - foreach ($call->result ?? [] as $result) { - ++$statistics[$name][$result ? 'hits' : 'misses']; - } - } elseif ('save' === $call->name) { - ++$statistics[$name]['writes']; - } elseif ('deleteItem' === $call->name) { - ++$statistics[$name]['deletes']; - } - } - if ($statistics[$name]['reads']) { - $statistics[$name]['hit_read_ratio'] = round(100 * $statistics[$name]['hits'] / $statistics[$name]['reads'], 2); - } else { - $statistics[$name]['hit_read_ratio'] = null; - } - } - - return $statistics; - } - - private function calculateTotalStatistics(): array - { - $statistics = $this->getStatistics(); - $totals = [ - 'calls' => 0, - 'time' => 0, - 'reads' => 0, - 'writes' => 0, - 'deletes' => 0, - 'hits' => 0, - 'misses' => 0, - ]; - foreach ($statistics as $name => $values) { - foreach ($totals as $key => $value) { - $totals[$key] += $statistics[$name][$key]; - } - } - if ($totals['reads']) { - $totals['hit_read_ratio'] = round(100 * $totals['hits'] / $totals['reads'], 2); - } else { - $totals['hit_read_ratio'] = null; - } - - return $totals; - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php b/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php deleted file mode 100644 index 843232e..0000000 --- a/vendor/symfony/cache/DependencyInjection/CacheCollectorPass.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\Adapter\TagAwareAdapterInterface; -use Symfony\Component\Cache\Adapter\TraceableAdapter; -use Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Inject a data collector to all the cache services to be able to get detailed statistics. - * - * @author Tobias Nyholm <tobias.nyholm@gmail.com> - */ -class CacheCollectorPass implements CompilerPassInterface -{ - private $dataCollectorCacheId; - private $cachePoolTag; - private $cachePoolRecorderInnerSuffix; - - public function __construct(string $dataCollectorCacheId = 'data_collector.cache', string $cachePoolTag = 'cache.pool', string $cachePoolRecorderInnerSuffix = '.recorder_inner') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->dataCollectorCacheId = $dataCollectorCacheId; - $this->cachePoolTag = $cachePoolTag; - $this->cachePoolRecorderInnerSuffix = $cachePoolRecorderInnerSuffix; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->dataCollectorCacheId)) { - return; - } - - foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $attributes) { - $poolName = $attributes[0]['name'] ?? $id; - - $this->addToCollector($id, $poolName, $container); - } - } - - private function addToCollector(string $id, string $name, ContainerBuilder $container) - { - $definition = $container->getDefinition($id); - if ($definition->isAbstract()) { - return; - } - - $collectorDefinition = $container->getDefinition($this->dataCollectorCacheId); - $recorder = new Definition(is_subclass_of($definition->getClass(), TagAwareAdapterInterface::class) ? TraceableTagAwareAdapter::class : TraceableAdapter::class); - $recorder->setTags($definition->getTags()); - if (!$definition->isPublic() || !$definition->isPrivate()) { - $recorder->setPublic($definition->isPublic()); - } - $recorder->setArguments([new Reference($innerId = $id.$this->cachePoolRecorderInnerSuffix)]); - - foreach ($definition->getMethodCalls() as [$method, $args]) { - if ('setCallbackWrapper' !== $method || !$args[0] instanceof Definition || !($args[0]->getArguments()[2] ?? null) instanceof Definition) { - continue; - } - if ([new Reference($id), 'setCallbackWrapper'] == $args[0]->getArguments()[2]->getFactory()) { - $args[0]->getArguments()[2]->setFactory([new Reference($innerId), 'setCallbackWrapper']); - } - } - - $definition->setTags([]); - $definition->setPublic(false); - - $container->setDefinition($innerId, $definition); - $container->setDefinition($id, $recorder); - - // Tell the collector to add the new instance - $collectorDefinition->addMethodCall('addInstance', [$name, new Reference($id)]); - $collectorDefinition->setPublic(false); - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php deleted file mode 100644 index c9b04ad..0000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolClearerPass.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class CachePoolClearerPass implements CompilerPassInterface -{ - private $cachePoolClearerTag; - - public function __construct(string $cachePoolClearerTag = 'cache.pool.clearer') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->cachePoolClearerTag = $cachePoolClearerTag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - $container->getParameterBag()->remove('cache.prefix.seed'); - - foreach ($container->findTaggedServiceIds($this->cachePoolClearerTag) as $id => $attr) { - $clearer = $container->getDefinition($id); - $pools = []; - foreach ($clearer->getArgument(0) as $name => $ref) { - if ($container->hasDefinition($ref)) { - $pools[$name] = new Reference($ref); - } - } - $clearer->replaceArgument(0, $pools); - } - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolPass.php deleted file mode 100644 index ee539af..0000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolPass.php +++ /dev/null @@ -1,274 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; -use Symfony\Component\Cache\Adapter\NullAdapter; -use Symfony\Component\Cache\Adapter\ParameterNormalizer; -use Symfony\Component\Cache\Messenger\EarlyExpirationDispatcher; -use Symfony\Component\DependencyInjection\ChildDefinition; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class CachePoolPass implements CompilerPassInterface -{ - private $cachePoolTag; - private $kernelResetTag; - private $cacheClearerId; - private $cachePoolClearerTag; - private $cacheSystemClearerId; - private $cacheSystemClearerTag; - private $reverseContainerId; - private $reversibleTag; - private $messageHandlerId; - - public function __construct(string $cachePoolTag = 'cache.pool', string $kernelResetTag = 'kernel.reset', string $cacheClearerId = 'cache.global_clearer', string $cachePoolClearerTag = 'cache.pool.clearer', string $cacheSystemClearerId = 'cache.system_clearer', string $cacheSystemClearerTag = 'kernel.cache_clearer', string $reverseContainerId = 'reverse_container', string $reversibleTag = 'container.reversible', string $messageHandlerId = 'cache.early_expiration_handler') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->cachePoolTag = $cachePoolTag; - $this->kernelResetTag = $kernelResetTag; - $this->cacheClearerId = $cacheClearerId; - $this->cachePoolClearerTag = $cachePoolClearerTag; - $this->cacheSystemClearerId = $cacheSystemClearerId; - $this->cacheSystemClearerTag = $cacheSystemClearerTag; - $this->reverseContainerId = $reverseContainerId; - $this->reversibleTag = $reversibleTag; - $this->messageHandlerId = $messageHandlerId; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if ($container->hasParameter('cache.prefix.seed')) { - $seed = $container->getParameterBag()->resolveValue($container->getParameter('cache.prefix.seed')); - } else { - $seed = '_'.$container->getParameter('kernel.project_dir'); - $seed .= '.'.$container->getParameter('kernel.container_class'); - } - - $needsMessageHandler = false; - $allPools = []; - $clearers = []; - $attributes = [ - 'provider', - 'name', - 'namespace', - 'default_lifetime', - 'early_expiration_message_bus', - 'reset', - ]; - foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $tags) { - $adapter = $pool = $container->getDefinition($id); - if ($pool->isAbstract()) { - continue; - } - $class = $adapter->getClass(); - while ($adapter instanceof ChildDefinition) { - $adapter = $container->findDefinition($adapter->getParent()); - $class = $class ?: $adapter->getClass(); - if ($t = $adapter->getTag($this->cachePoolTag)) { - $tags[0] += $t[0]; - } - } - $name = $tags[0]['name'] ?? $id; - if (!isset($tags[0]['namespace'])) { - $namespaceSeed = $seed; - if (null !== $class) { - $namespaceSeed .= '.'.$class; - } - - $tags[0]['namespace'] = $this->getNamespace($namespaceSeed, $name); - } - if (isset($tags[0]['clearer'])) { - $clearer = $tags[0]['clearer']; - while ($container->hasAlias($clearer)) { - $clearer = (string) $container->getAlias($clearer); - } - } else { - $clearer = null; - } - unset($tags[0]['clearer'], $tags[0]['name']); - - if (isset($tags[0]['provider'])) { - $tags[0]['provider'] = new Reference(static::getServiceProvider($container, $tags[0]['provider'])); - } - - if (ChainAdapter::class === $class) { - $adapters = []; - foreach ($adapter->getArgument(0) as $provider => $adapter) { - if ($adapter instanceof ChildDefinition) { - $chainedPool = $adapter; - } else { - $chainedPool = $adapter = new ChildDefinition($adapter); - } - - $chainedTags = [\is_int($provider) ? [] : ['provider' => $provider]]; - $chainedClass = ''; - - while ($adapter instanceof ChildDefinition) { - $adapter = $container->findDefinition($adapter->getParent()); - $chainedClass = $chainedClass ?: $adapter->getClass(); - if ($t = $adapter->getTag($this->cachePoolTag)) { - $chainedTags[0] += $t[0]; - } - } - - if (ChainAdapter::class === $chainedClass) { - throw new InvalidArgumentException(sprintf('Invalid service "%s": chain of adapters cannot reference another chain, found "%s".', $id, $chainedPool->getParent())); - } - - $i = 0; - - if (isset($chainedTags[0]['provider'])) { - $chainedPool->replaceArgument($i++, new Reference(static::getServiceProvider($container, $chainedTags[0]['provider']))); - } - - if (isset($tags[0]['namespace']) && !\in_array($adapter->getClass(), [ArrayAdapter::class, NullAdapter::class], true)) { - $chainedPool->replaceArgument($i++, $tags[0]['namespace']); - } - - if (isset($tags[0]['default_lifetime'])) { - $chainedPool->replaceArgument($i++, $tags[0]['default_lifetime']); - } - - $adapters[] = $chainedPool; - } - - $pool->replaceArgument(0, $adapters); - unset($tags[0]['provider'], $tags[0]['namespace']); - $i = 1; - } else { - $i = 0; - } - - foreach ($attributes as $attr) { - if (!isset($tags[0][$attr])) { - // no-op - } elseif ('reset' === $attr) { - if ($tags[0][$attr]) { - $pool->addTag($this->kernelResetTag, ['method' => $tags[0][$attr]]); - } - } elseif ('early_expiration_message_bus' === $attr) { - $needsMessageHandler = true; - $pool->addMethodCall('setCallbackWrapper', [(new Definition(EarlyExpirationDispatcher::class)) - ->addArgument(new Reference($tags[0]['early_expiration_message_bus'])) - ->addArgument(new Reference($this->reverseContainerId)) - ->addArgument((new Definition('callable')) - ->setFactory([new Reference($id), 'setCallbackWrapper']) - ->addArgument(null) - ), - ]); - $pool->addTag($this->reversibleTag); - } elseif ('namespace' !== $attr || !\in_array($class, [ArrayAdapter::class, NullAdapter::class], true)) { - $argument = $tags[0][$attr]; - - if ('default_lifetime' === $attr && !is_numeric($argument)) { - $argument = (new Definition('int', [$argument])) - ->setFactory([ParameterNormalizer::class, 'normalizeDuration']); - } - - $pool->replaceArgument($i++, $argument); - } - unset($tags[0][$attr]); - } - if (!empty($tags[0])) { - throw new InvalidArgumentException(sprintf('Invalid "%s" tag for service "%s": accepted attributes are "clearer", "provider", "name", "namespace", "default_lifetime", "early_expiration_message_bus" and "reset", found "%s".', $this->cachePoolTag, $id, implode('", "', array_keys($tags[0])))); - } - - if (null !== $clearer) { - $clearers[$clearer][$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - - $allPools[$name] = new Reference($id, $container::IGNORE_ON_UNINITIALIZED_REFERENCE); - } - - if (!$needsMessageHandler) { - $container->removeDefinition($this->messageHandlerId); - } - - $notAliasedCacheClearerId = $this->cacheClearerId; - while ($container->hasAlias($notAliasedCacheClearerId)) { - $notAliasedCacheClearerId = (string) $container->getAlias($notAliasedCacheClearerId); - } - if ($container->hasDefinition($notAliasedCacheClearerId)) { - $clearers[$notAliasedCacheClearerId] = $allPools; - } - - foreach ($clearers as $id => $pools) { - $clearer = $container->getDefinition($id); - if ($clearer instanceof ChildDefinition) { - $clearer->replaceArgument(0, $pools); - } else { - $clearer->setArgument(0, $pools); - } - $clearer->addTag($this->cachePoolClearerTag); - - if ($this->cacheSystemClearerId === $id) { - $clearer->addTag($this->cacheSystemClearerTag); - } - } - - $allPoolsKeys = array_keys($allPools); - - if ($container->hasDefinition('console.command.cache_pool_list')) { - $container->getDefinition('console.command.cache_pool_list')->replaceArgument(0, $allPoolsKeys); - } - - if ($container->hasDefinition('console.command.cache_pool_clear')) { - $container->getDefinition('console.command.cache_pool_clear')->addArgument($allPoolsKeys); - } - - if ($container->hasDefinition('console.command.cache_pool_delete')) { - $container->getDefinition('console.command.cache_pool_delete')->addArgument($allPoolsKeys); - } - } - - private function getNamespace(string $seed, string $id) - { - return substr(str_replace('/', '-', base64_encode(hash('sha256', $id.$seed, true))), 0, 10); - } - - /** - * @internal - */ - public static function getServiceProvider(ContainerBuilder $container, string $name) - { - $container->resolveEnvPlaceholders($name, null, $usedEnvs); - - if ($usedEnvs || preg_match('#^[a-z]++:#', $name)) { - $dsn = $name; - - if (!$container->hasDefinition($name = '.cache_connection.'.ContainerBuilder::hash($dsn))) { - $definition = new Definition(AbstractAdapter::class); - $definition->setPublic(false); - $definition->setFactory([AbstractAdapter::class, 'createConnection']); - $definition->setArguments([$dsn, ['lazy' => true]]); - $container->setDefinition($name, $definition); - } - } - - return $name; - } -} diff --git a/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php b/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php deleted file mode 100644 index 86a1906..0000000 --- a/vendor/symfony/cache/DependencyInjection/CachePoolPrunerPass.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\DependencyInjection; - -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @author Rob Frawley 2nd <rmf@src.run> - */ -class CachePoolPrunerPass implements CompilerPassInterface -{ - private $cacheCommandServiceId; - private $cachePoolTag; - - public function __construct(string $cacheCommandServiceId = 'console.command.cache_pool_prune', string $cachePoolTag = 'cache.pool') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/cache', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->cacheCommandServiceId = $cacheCommandServiceId; - $this->cachePoolTag = $cachePoolTag; - } - - /** - * {@inheritdoc} - */ - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->cacheCommandServiceId)) { - return; - } - - $services = []; - - foreach ($container->findTaggedServiceIds($this->cachePoolTag) as $id => $tags) { - $class = $container->getParameterBag()->resolveValue($container->getDefinition($id)->getClass()); - - if (!$reflection = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - - if ($reflection->implementsInterface(PruneableInterface::class)) { - $services[$id] = new Reference($id); - } - } - - $container->getDefinition($this->cacheCommandServiceId)->replaceArgument(0, new IteratorArgument($services)); - } -} diff --git a/vendor/symfony/cache/DoctrineProvider.php b/vendor/symfony/cache/DoctrineProvider.php deleted file mode 100644 index 7b55aae..0000000 --- a/vendor/symfony/cache/DoctrineProvider.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Doctrine\Common\Cache\CacheProvider; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Contracts\Service\ResetInterface; - -if (!class_exists(CacheProvider::class)) { - return; -} - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @deprecated Use Doctrine\Common\Cache\Psr6\DoctrineProvider instead - */ -class DoctrineProvider extends CacheProvider implements PruneableInterface, ResettableInterface -{ - private $pool; - - public function __construct(CacheItemPoolInterface $pool) - { - trigger_deprecation('symfony/cache', '5.4', '"%s" is deprecated, use "Doctrine\Common\Cache\Psr6\DoctrineProvider" instead.', __CLASS__); - - $this->pool = $pool; - } - - /** - * {@inheritdoc} - */ - public function prune() - { - return $this->pool instanceof PruneableInterface && $this->pool->prune(); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - $this->setNamespace($this->getNamespace()); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - protected function doFetch($id) - { - $item = $this->pool->getItem(rawurlencode($id)); - - return $item->isHit() ? $item->get() : false; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doContains($id) - { - return $this->pool->hasItem(rawurlencode($id)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doSave($id, $data, $lifeTime = 0) - { - $item = $this->pool->getItem(rawurlencode($id)); - - if (0 < $lifeTime) { - $item->expiresAfter($lifeTime); - } - - return $this->pool->save($item->set($data)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doDelete($id) - { - return $this->pool->deleteItem(rawurlencode($id)); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - protected function doFlush() - { - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return array|null - */ - protected function doGetStats() - { - return null; - } -} diff --git a/vendor/symfony/cache/Exception/CacheException.php b/vendor/symfony/cache/Exception/CacheException.php deleted file mode 100644 index d2e975b..0000000 --- a/vendor/symfony/cache/Exception/CacheException.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\CacheException as Psr6CacheInterface; -use Psr\SimpleCache\CacheException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class CacheException extends \Exception implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class CacheException extends \Exception implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/Exception/InvalidArgumentException.php b/vendor/symfony/cache/Exception/InvalidArgumentException.php deleted file mode 100644 index 7f9584a..0000000 --- a/vendor/symfony/cache/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\InvalidArgumentException as Psr6CacheInterface; -use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/Exception/LogicException.php b/vendor/symfony/cache/Exception/LogicException.php deleted file mode 100644 index 9ffa7ed..0000000 --- a/vendor/symfony/cache/Exception/LogicException.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Exception; - -use Psr\Cache\CacheException as Psr6CacheInterface; -use Psr\SimpleCache\CacheException as SimpleCacheInterface; - -if (interface_exists(SimpleCacheInterface::class)) { - class LogicException extends \LogicException implements Psr6CacheInterface, SimpleCacheInterface - { - } -} else { - class LogicException extends \LogicException implements Psr6CacheInterface - { - } -} diff --git a/vendor/symfony/cache/LICENSE b/vendor/symfony/cache/LICENSE deleted file mode 100644 index 0223acd..0000000 --- a/vendor/symfony/cache/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/cache/LockRegistry.php b/vendor/symfony/cache/LockRegistry.php deleted file mode 100644 index d0c5fc5..0000000 --- a/vendor/symfony/cache/LockRegistry.php +++ /dev/null @@ -1,165 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Log\LoggerInterface; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * LockRegistry is used internally by existing adapters to protect against cache stampede. - * - * It does so by wrapping the computation of items in a pool of locks. - * Foreach each apps, there can be at most 20 concurrent processes that - * compute items at the same time and only one per cache-key. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -final class LockRegistry -{ - private static $openedFiles = []; - private static $lockedFiles; - private static $signalingException; - private static $signalingCallback; - - /** - * The number of items in this list controls the max number of concurrent processes. - */ - private static $files = [ - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AbstractAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AbstractTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'AdapterInterface.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ApcuAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ArrayAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ChainAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'CouchbaseBucketAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'CouchbaseCollectionAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'DoctrineAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'DoctrineDbalAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'MemcachedAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'NullAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ParameterNormalizer.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PdoAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PhpArrayAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'PhpFilesAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ProxyAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'Psr16Adapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'RedisAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'RedisTagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TagAwareAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TagAwareAdapterInterface.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TraceableAdapter.php', - __DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'TraceableTagAwareAdapter.php', - ]; - - /** - * Defines a set of existing files that will be used as keys to acquire locks. - * - * @return array The previously defined set of files - */ - public static function setFiles(array $files): array - { - $previousFiles = self::$files; - self::$files = $files; - - foreach (self::$openedFiles as $file) { - if ($file) { - flock($file, \LOCK_UN); - fclose($file); - } - } - self::$openedFiles = self::$lockedFiles = []; - - return $previousFiles; - } - - public static function compute(callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, ?\Closure $setMetadata = null, ?LoggerInterface $logger = null) - { - if ('\\' === \DIRECTORY_SEPARATOR && null === self::$lockedFiles) { - // disable locking on Windows by default - self::$files = self::$lockedFiles = []; - } - - $key = self::$files ? abs(crc32($item->getKey())) % \count(self::$files) : -1; - - if ($key < 0 || self::$lockedFiles || !$lock = self::open($key)) { - return $callback($item, $save); - } - - self::$signalingException ?? self::$signalingException = unserialize("O:9:\"Exception\":1:{s:16:\"\0Exception\0trace\";a:0:{}}"); - self::$signalingCallback ?? self::$signalingCallback = function () { throw self::$signalingException; }; - - while (true) { - try { - $locked = false; - // race to get the lock in non-blocking mode - $locked = flock($lock, \LOCK_EX | \LOCK_NB, $wouldBlock); - - if ($locked || !$wouldBlock) { - $logger && $logger->info(sprintf('Lock %s, now computing item "{key}"', $locked ? 'acquired' : 'not supported'), ['key' => $item->getKey()]); - self::$lockedFiles[$key] = true; - - $value = $callback($item, $save); - - if ($save) { - if ($setMetadata) { - $setMetadata($item); - } - - $pool->save($item->set($value)); - $save = false; - } - - return $value; - } - // if we failed the race, retry locking in blocking mode to wait for the winner - $logger && $logger->info('Item "{key}" is locked, waiting for it to be released', ['key' => $item->getKey()]); - flock($lock, \LOCK_SH); - } finally { - flock($lock, \LOCK_UN); - unset(self::$lockedFiles[$key]); - } - - try { - $value = $pool->get($item->getKey(), self::$signalingCallback, 0); - $logger && $logger->info('Item "{key}" retrieved after lock was released', ['key' => $item->getKey()]); - $save = false; - - return $value; - } catch (\Exception $e) { - if (self::$signalingException !== $e) { - throw $e; - } - $logger && $logger->info('Item "{key}" not found while lock was released, now retrying', ['key' => $item->getKey()]); - } - } - - return null; - } - - private static function open(int $key) - { - if (null !== $h = self::$openedFiles[$key] ?? null) { - return $h; - } - set_error_handler(function () {}); - try { - $h = fopen(self::$files[$key], 'r+'); - } finally { - restore_error_handler(); - } - - return self::$openedFiles[$key] = $h ?: @fopen(self::$files[$key], 'r'); - } -} diff --git a/vendor/symfony/cache/Marshaller/DefaultMarshaller.php b/vendor/symfony/cache/Marshaller/DefaultMarshaller.php deleted file mode 100644 index 43f7e7e..0000000 --- a/vendor/symfony/cache/Marshaller/DefaultMarshaller.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; - -/** - * Serializes/unserializes values using igbinary_serialize() if available, serialize() otherwise. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class DefaultMarshaller implements MarshallerInterface -{ - private $useIgbinarySerialize = true; - private $throwOnSerializationFailure; - - public function __construct(?bool $useIgbinarySerialize = null, bool $throwOnSerializationFailure = false) - { - if (null === $useIgbinarySerialize) { - $useIgbinarySerialize = \extension_loaded('igbinary') && (\PHP_VERSION_ID < 70400 || version_compare('3.1.6', phpversion('igbinary'), '<=')); - } elseif ($useIgbinarySerialize && (!\extension_loaded('igbinary') || (\PHP_VERSION_ID >= 70400 && version_compare('3.1.6', phpversion('igbinary'), '>')))) { - throw new CacheException(\extension_loaded('igbinary') && \PHP_VERSION_ID >= 70400 ? 'Please upgrade the "igbinary" PHP extension to v3.1.6 or higher.' : 'The "igbinary" PHP extension is not loaded.'); - } - $this->useIgbinarySerialize = $useIgbinarySerialize; - $this->throwOnSerializationFailure = $throwOnSerializationFailure; - } - - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - $serialized = $failed = []; - - foreach ($values as $id => $value) { - try { - if ($this->useIgbinarySerialize) { - $serialized[$id] = igbinary_serialize($value); - } else { - $serialized[$id] = serialize($value); - } - } catch (\Exception $e) { - if ($this->throwOnSerializationFailure) { - throw new \ValueError($e->getMessage(), 0, $e); - } - $failed[] = $id; - } - } - - return $serialized; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value) - { - if ('b:0;' === $value) { - return false; - } - if ('N;' === $value) { - return null; - } - static $igbinaryNull; - if ($value === ($igbinaryNull ?? $igbinaryNull = \extension_loaded('igbinary') ? igbinary_serialize(null) : false)) { - return null; - } - $unserializeCallbackHandler = ini_set('unserialize_callback_func', __CLASS__.'::handleUnserializeCallback'); - try { - if (':' === ($value[1] ?? ':')) { - if (false !== $value = unserialize($value)) { - return $value; - } - } elseif (false === $igbinaryNull) { - throw new \RuntimeException('Failed to unserialize values, did you forget to install the "igbinary" extension?'); - } elseif (null !== $value = igbinary_unserialize($value)) { - return $value; - } - - throw new \DomainException(error_get_last() ? error_get_last()['message'] : 'Failed to unserialize values.'); - } catch (\Error $e) { - throw new \ErrorException($e->getMessage(), $e->getCode(), \E_ERROR, $e->getFile(), $e->getLine()); - } finally { - ini_set('unserialize_callback_func', $unserializeCallbackHandler); - } - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class) - { - throw new \DomainException('Class not found: '.$class); - } -} diff --git a/vendor/symfony/cache/Marshaller/DeflateMarshaller.php b/vendor/symfony/cache/Marshaller/DeflateMarshaller.php deleted file mode 100644 index 5544806..0000000 --- a/vendor/symfony/cache/Marshaller/DeflateMarshaller.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; - -/** - * Compresses values using gzdeflate(). - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class DeflateMarshaller implements MarshallerInterface -{ - private $marshaller; - - public function __construct(MarshallerInterface $marshaller) - { - if (!\function_exists('gzdeflate')) { - throw new CacheException('The "zlib" PHP extension is not loaded.'); - } - - $this->marshaller = $marshaller; - } - - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - return array_map('gzdeflate', $this->marshaller->marshall($values, $failed)); - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value) - { - if (false !== $inflatedValue = @gzinflate($value)) { - $value = $inflatedValue; - } - - return $this->marshaller->unmarshall($value); - } -} diff --git a/vendor/symfony/cache/Marshaller/MarshallerInterface.php b/vendor/symfony/cache/Marshaller/MarshallerInterface.php deleted file mode 100644 index cdd6c40..0000000 --- a/vendor/symfony/cache/Marshaller/MarshallerInterface.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -/** - * Serializes/unserializes PHP values. - * - * Implementations of this interface MUST deal with errors carefully. They MUST - * also deal with forward and backward compatibility at the storage format level. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface MarshallerInterface -{ - /** - * Serializes a list of values. - * - * When serialization fails for a specific value, no exception should be - * thrown. Instead, its key should be listed in $failed. - */ - public function marshall(array $values, ?array &$failed): array; - - /** - * Unserializes a single value and throws an exception if anything goes wrong. - * - * @return mixed - * - * @throws \Exception Whenever unserialization fails - */ - public function unmarshall(string $value); -} diff --git a/vendor/symfony/cache/Marshaller/SodiumMarshaller.php b/vendor/symfony/cache/Marshaller/SodiumMarshaller.php deleted file mode 100644 index 7895ef5..0000000 --- a/vendor/symfony/cache/Marshaller/SodiumMarshaller.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * Encrypt/decrypt values using Libsodium. - * - * @author Ahmed TAILOULOUTE <ahmed.tailouloute@gmail.com> - */ -class SodiumMarshaller implements MarshallerInterface -{ - private $marshaller; - private $decryptionKeys; - - /** - * @param string[] $decryptionKeys The key at index "0" is required and is used to decrypt and encrypt values; - * more rotating keys can be provided to decrypt values; - * each key must be generated using sodium_crypto_box_keypair() - */ - public function __construct(array $decryptionKeys, ?MarshallerInterface $marshaller = null) - { - if (!self::isSupported()) { - throw new CacheException('The "sodium" PHP extension is not loaded.'); - } - - if (!isset($decryptionKeys[0])) { - throw new InvalidArgumentException('At least one decryption key must be provided at index "0".'); - } - - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - $this->decryptionKeys = $decryptionKeys; - } - - public static function isSupported(): bool - { - return \function_exists('sodium_crypto_box_seal'); - } - - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - $encryptionKey = sodium_crypto_box_publickey($this->decryptionKeys[0]); - - $encryptedValues = []; - foreach ($this->marshaller->marshall($values, $failed) as $k => $v) { - $encryptedValues[$k] = sodium_crypto_box_seal($v, $encryptionKey); - } - - return $encryptedValues; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value) - { - foreach ($this->decryptionKeys as $k) { - if (false !== $decryptedValue = @sodium_crypto_box_seal_open($value, $k)) { - $value = $decryptedValue; - break; - } - } - - return $this->marshaller->unmarshall($value); - } -} diff --git a/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php b/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php deleted file mode 100644 index f2f26ab..0000000 --- a/vendor/symfony/cache/Marshaller/TagAwareMarshaller.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Marshaller; - -/** - * A marshaller optimized for data structures generated by AbstractTagAwareAdapter. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class TagAwareMarshaller implements MarshallerInterface -{ - private $marshaller; - - public function __construct(?MarshallerInterface $marshaller = null) - { - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - $failed = $notSerialized = $serialized = []; - - foreach ($values as $id => $value) { - if (\is_array($value) && \is_array($value['tags'] ?? null) && \array_key_exists('value', $value) && \count($value) === 2 + (\is_string($value['meta'] ?? null) && 8 === \strlen($value['meta']))) { - // if the value is an array with keys "tags", "value" and "meta", use a compact serialization format - // magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F allow detecting this format quickly in unmarshall() - - $v = $this->marshaller->marshall($value, $f); - - if ($f) { - $f = []; - $failed[] = $id; - } else { - if ([] === $value['tags']) { - $v['tags'] = ''; - } - - $serialized[$id] = "\x9D".($value['meta'] ?? "\0\0\0\0\0\0\0\0").pack('N', \strlen($v['tags'])).$v['tags'].$v['value']; - $serialized[$id][9] = "\x5F"; - } - } else { - // other arbitrary values are serialized using the decorated marshaller below - $notSerialized[$id] = $value; - } - } - - if ($notSerialized) { - $serialized += $this->marshaller->marshall($notSerialized, $f); - $failed = array_merge($failed, $f); - } - - return $serialized; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value) - { - // detect the compact format used in marshall() using magic numbers in the form 9D-..-..-..-..-00-..-..-..-5F - if (13 >= \strlen($value) || "\x9D" !== $value[0] || "\0" !== $value[5] || "\x5F" !== $value[9]) { - return $this->marshaller->unmarshall($value); - } - - // data consists of value, tags and metadata which we need to unpack - $meta = substr($value, 1, 12); - $meta[8] = "\0"; - $tagLen = unpack('Nlen', $meta, 8)['len']; - $meta = substr($meta, 0, 8); - - return [ - 'value' => $this->marshaller->unmarshall(substr($value, 13 + $tagLen)), - 'tags' => $tagLen ? $this->marshaller->unmarshall(substr($value, 13, $tagLen)) : [], - 'meta' => "\0\0\0\0\0\0\0\0" === $meta ? null : $meta, - ]; - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php b/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php deleted file mode 100644 index e09e282..0000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationDispatcher.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; -use Symfony\Component\Messenger\MessageBusInterface; -use Symfony\Component\Messenger\Stamp\HandledStamp; - -/** - * Sends the computation of cached values to a message bus. - */ -class EarlyExpirationDispatcher -{ - private $bus; - private $reverseContainer; - private $callbackWrapper; - - public function __construct(MessageBusInterface $bus, ReverseContainer $reverseContainer, ?callable $callbackWrapper = null) - { - $this->bus = $bus; - $this->reverseContainer = $reverseContainer; - $this->callbackWrapper = $callbackWrapper; - } - - public function __invoke(callable $callback, CacheItem $item, bool &$save, AdapterInterface $pool, \Closure $setMetadata, ?LoggerInterface $logger = null) - { - if (!$item->isHit() || null === $message = EarlyExpirationMessage::create($this->reverseContainer, $callback, $item, $pool)) { - // The item is stale or the callback cannot be reversed: we must compute the value now - $logger && $logger->info('Computing item "{key}" online: '.($item->isHit() ? 'callback cannot be reversed' : 'item is stale'), ['key' => $item->getKey()]); - - return null !== $this->callbackWrapper ? ($this->callbackWrapper)($callback, $item, $save, $pool, $setMetadata, $logger) : $callback($item, $save); - } - - $envelope = $this->bus->dispatch($message); - - if ($logger) { - if ($envelope->last(HandledStamp::class)) { - $logger->info('Item "{key}" was computed online', ['key' => $item->getKey()]); - } else { - $logger->info('Item "{key}" sent for recomputation', ['key' => $item->getKey()]); - } - } - - // The item's value is not stale, no need to write it to the backend - $save = false; - - return $message->getItem()->get() ?? $item->get(); - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php b/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php deleted file mode 100644 index 9e53f5d..0000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationHandler.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; -use Symfony\Component\Messenger\Handler\MessageHandlerInterface; - -/** - * Computes cached values sent to a message bus. - */ -class EarlyExpirationHandler implements MessageHandlerInterface -{ - private $reverseContainer; - private $processedNonces = []; - - public function __construct(ReverseContainer $reverseContainer) - { - $this->reverseContainer = $reverseContainer; - } - - public function __invoke(EarlyExpirationMessage $message) - { - $item = $message->getItem(); - $metadata = $item->getMetadata(); - $expiry = $metadata[CacheItem::METADATA_EXPIRY] ?? 0; - $ctime = $metadata[CacheItem::METADATA_CTIME] ?? 0; - - if ($expiry && $ctime) { - // skip duplicate or expired messages - - $processingNonce = [$expiry, $ctime]; - $pool = $message->getPool(); - $key = $item->getKey(); - - if (($this->processedNonces[$pool][$key] ?? null) === $processingNonce) { - return; - } - - if (microtime(true) >= $expiry) { - return; - } - - $this->processedNonces[$pool] = [$key => $processingNonce] + ($this->processedNonces[$pool] ?? []); - - if (\count($this->processedNonces[$pool]) > 100) { - array_pop($this->processedNonces[$pool]); - } - } - - static $setMetadata; - - $setMetadata ?? $setMetadata = \Closure::bind( - function (CacheItem $item, float $startTime) { - if ($item->expiry > $endTime = microtime(true)) { - $item->newMetadata[CacheItem::METADATA_EXPIRY] = $item->expiry; - $item->newMetadata[CacheItem::METADATA_CTIME] = (int) ceil(1000 * ($endTime - $startTime)); - } - }, - null, - CacheItem::class - ); - - $startTime = microtime(true); - $pool = $message->findPool($this->reverseContainer); - $callback = $message->findCallback($this->reverseContainer); - $save = true; - $value = $callback($item, $save); - $setMetadata($item, $startTime); - $pool->save($item->set($value)); - } -} diff --git a/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php b/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php deleted file mode 100644 index e25c07e..0000000 --- a/vendor/symfony/cache/Messenger/EarlyExpirationMessage.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Messenger; - -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\DependencyInjection\ReverseContainer; - -/** - * Conveys a cached value that needs to be computed. - */ -final class EarlyExpirationMessage -{ - private $item; - private $pool; - private $callback; - - public static function create(ReverseContainer $reverseContainer, callable $callback, CacheItem $item, AdapterInterface $pool): ?self - { - try { - $item = clone $item; - $item->set(null); - } catch (\Exception $e) { - return null; - } - - $pool = $reverseContainer->getId($pool); - - if (\is_object($callback)) { - if (null === $id = $reverseContainer->getId($callback)) { - return null; - } - - $callback = '@'.$id; - } elseif (!\is_array($callback)) { - $callback = (string) $callback; - } elseif (!\is_object($callback[0])) { - $callback = [(string) $callback[0], (string) $callback[1]]; - } else { - if (null === $id = $reverseContainer->getId($callback[0])) { - return null; - } - - $callback = ['@'.$id, (string) $callback[1]]; - } - - return new self($item, $pool, $callback); - } - - public function getItem(): CacheItem - { - return $this->item; - } - - public function getPool(): string - { - return $this->pool; - } - - public function getCallback() - { - return $this->callback; - } - - public function findPool(ReverseContainer $reverseContainer): AdapterInterface - { - return $reverseContainer->getService($this->pool); - } - - public function findCallback(ReverseContainer $reverseContainer): callable - { - if (\is_string($callback = $this->callback)) { - return '@' === $callback[0] ? $reverseContainer->getService(substr($callback, 1)) : $callback; - } - if ('@' === $callback[0][0]) { - $callback[0] = $reverseContainer->getService(substr($callback[0], 1)); - } - - return $callback; - } - - private function __construct(CacheItem $item, string $pool, $callback) - { - $this->item = $item; - $this->pool = $pool; - $this->callback = $callback; - } -} diff --git a/vendor/symfony/cache/PruneableInterface.php b/vendor/symfony/cache/PruneableInterface.php deleted file mode 100644 index 4261525..0000000 --- a/vendor/symfony/cache/PruneableInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -/** - * Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items. - */ -interface PruneableInterface -{ - /** - * @return bool - */ - public function prune(); -} diff --git a/vendor/symfony/cache/Psr16Cache.php b/vendor/symfony/cache/Psr16Cache.php deleted file mode 100644 index 28c7de6..0000000 --- a/vendor/symfony/cache/Psr16Cache.php +++ /dev/null @@ -1,289 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Psr\Cache\CacheException as Psr6CacheException; -use Psr\Cache\CacheItemPoolInterface; -use Psr\SimpleCache\CacheException as SimpleCacheException; -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Traits\ProxyTrait; - -if (null !== (new \ReflectionMethod(CacheInterface::class, 'get'))->getReturnType()) { - throw new \LogicException('psr/simple-cache 3.0+ is not compatible with this version of symfony/cache. Please upgrade symfony/cache to 6.0+ or downgrade psr/simple-cache to 1.x or 2.x.'); -} - -/** - * Turns a PSR-6 cache into a PSR-16 one. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class Psr16Cache implements CacheInterface, PruneableInterface, ResettableInterface -{ - use ProxyTrait; - - private const METADATA_EXPIRY_OFFSET = 1527506807; - - private $createCacheItem; - private $cacheItemPrototype; - - public function __construct(CacheItemPoolInterface $pool) - { - $this->pool = $pool; - - if (!$pool instanceof AdapterInterface) { - return; - } - $cacheItemPrototype = &$this->cacheItemPrototype; - $createCacheItem = \Closure::bind( - static function ($key, $value, $allowInt = false) use (&$cacheItemPrototype) { - $item = clone $cacheItemPrototype; - $item->poolHash = $item->innerItem = null; - if ($allowInt && \is_int($key)) { - $item->key = (string) $key; - } else { - \assert('' !== CacheItem::validateKey($key)); - $item->key = $key; - } - $item->value = $value; - $item->isHit = false; - - return $item; - }, - null, - CacheItem::class - ); - $this->createCacheItem = function ($key, $value, $allowInt = false) use ($createCacheItem) { - if (null === $this->cacheItemPrototype) { - $this->get($allowInt && \is_int($key) ? (string) $key : $key); - } - $this->createCacheItem = $createCacheItem; - - return $createCacheItem($key, null, $allowInt)->set($value); - }; - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get($key, $default = null) - { - try { - $item = $this->pool->getItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - if (null === $this->cacheItemPrototype) { - $this->cacheItemPrototype = clone $item; - $this->cacheItemPrototype->set(null); - } - - return $item->isHit() ? $item->get() : $default; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function set($key, $value, $ttl = null) - { - try { - if (null !== $f = $this->createCacheItem) { - $item = $f($key, $value); - } else { - $item = $this->pool->getItem($key)->set($value); - } - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - if (null !== $ttl) { - $item->expiresAfter($ttl); - } - - return $this->pool->save($item); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function delete($key) - { - try { - return $this->pool->deleteItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear() - { - return $this->pool->clear(); - } - - /** - * {@inheritdoc} - * - * @return iterable - */ - public function getMultiple($keys, $default = null) - { - if ($keys instanceof \Traversable) { - $keys = iterator_to_array($keys, false); - } elseif (!\is_array($keys)) { - throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); - } - - try { - $items = $this->pool->getItems($keys); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - $values = []; - - if (!$this->pool instanceof AdapterInterface) { - foreach ($items as $key => $item) { - $values[$key] = $item->isHit() ? $item->get() : $default; - } - - return $values; - } - - foreach ($items as $key => $item) { - if (!$item->isHit()) { - $values[$key] = $default; - continue; - } - $values[$key] = $item->get(); - - if (!$metadata = $item->getMetadata()) { - continue; - } - unset($metadata[CacheItem::METADATA_TAGS]); - - if ($metadata) { - $values[$key] = ["\x9D".pack('VN', (int) (0.1 + $metadata[CacheItem::METADATA_EXPIRY] - self::METADATA_EXPIRY_OFFSET), $metadata[CacheItem::METADATA_CTIME])."\x5F" => $values[$key]]; - } - } - - return $values; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function setMultiple($values, $ttl = null) - { - $valuesIsArray = \is_array($values); - if (!$valuesIsArray && !$values instanceof \Traversable) { - throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given.', get_debug_type($values))); - } - $items = []; - - try { - if (null !== $f = $this->createCacheItem) { - $valuesIsArray = false; - foreach ($values as $key => $value) { - $items[$key] = $f($key, $value, true); - } - } elseif ($valuesIsArray) { - $items = []; - foreach ($values as $key => $value) { - $items[] = (string) $key; - } - $items = $this->pool->getItems($items); - } else { - foreach ($values as $key => $value) { - if (\is_int($key)) { - $key = (string) $key; - } - $items[$key] = $this->pool->getItem($key)->set($value); - } - } - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - $ok = true; - - foreach ($items as $key => $item) { - if ($valuesIsArray) { - $item->set($values[$key]); - } - if (null !== $ttl) { - $item->expiresAfter($ttl); - } - $ok = $this->pool->saveDeferred($item) && $ok; - } - - return $this->pool->commit() && $ok; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteMultiple($keys) - { - if ($keys instanceof \Traversable) { - $keys = iterator_to_array($keys, false); - } elseif (!\is_array($keys)) { - throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', get_debug_type($keys))); - } - - try { - return $this->pool->deleteItems($keys); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function has($key) - { - try { - return $this->pool->hasItem($key); - } catch (SimpleCacheException $e) { - throw $e; - } catch (Psr6CacheException $e) { - throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); - } - } -} diff --git a/vendor/symfony/cache/README.md b/vendor/symfony/cache/README.md deleted file mode 100644 index c466d57..0000000 --- a/vendor/symfony/cache/README.md +++ /dev/null @@ -1,19 +0,0 @@ -Symfony PSR-6 implementation for caching -======================================== - -The Cache component provides extended -[PSR-6](https://www.php-fig.org/psr/psr-6/) implementations for adding cache to -your applications. It is designed to have a low overhead so that caching is -fastest. It ships with adapters for the most widespread caching backends. -It also provides a [PSR-16](https://www.php-fig.org/psr/psr-16/) adapter, -and implementations for [symfony/cache-contracts](https://github.com/symfony/cache-contracts)' -`CacheInterface` and `TagAwareCacheInterface`. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/cache.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/cache/ResettableInterface.php b/vendor/symfony/cache/ResettableInterface.php deleted file mode 100644 index 7b0a853..0000000 --- a/vendor/symfony/cache/ResettableInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache; - -use Symfony\Contracts\Service\ResetInterface; - -/** - * Resets a pool's local state. - */ -interface ResettableInterface extends ResetInterface -{ -} diff --git a/vendor/symfony/cache/Traits/AbstractAdapterTrait.php b/vendor/symfony/cache/Traits/AbstractAdapterTrait.php deleted file mode 100644 index 32d78b1..0000000 --- a/vendor/symfony/cache/Traits/AbstractAdapterTrait.php +++ /dev/null @@ -1,427 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Psr\Cache\CacheItemInterface; -use Psr\Log\LoggerAwareTrait; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -trait AbstractAdapterTrait -{ - use LoggerAwareTrait; - - /** - * @var \Closure needs to be set by class, signature is function(string <key>, mixed <value>, bool <isHit>) - */ - private static $createCacheItem; - - /** - * @var \Closure needs to be set by class, signature is function(array <deferred>, string <namespace>, array <&expiredIds>) - */ - private static $mergeByLifetime; - - private $namespace = ''; - private $defaultLifetime; - private $namespaceVersion = ''; - private $versioningIsEnabled = false; - private $deferred = []; - private $ids = []; - - /** - * @var int|null The maximum length to enforce for identifiers or null when no limit applies - */ - protected $maxIdLength; - - /** - * Fetches several cache items. - * - * @param array $ids The cache identifiers to fetch - * - * @return array|\Traversable - */ - abstract protected function doFetch(array $ids); - - /** - * Confirms if the cache contains specified cache item. - * - * @param string $id The identifier for which to check existence - * - * @return bool - */ - abstract protected function doHave(string $id); - - /** - * Deletes all items in the pool. - * - * @param string $namespace The prefix used for all identifiers managed by this pool - * - * @return bool - */ - abstract protected function doClear(string $namespace); - - /** - * Removes multiple items from the pool. - * - * @param array $ids An array of identifiers that should be removed from the pool - * - * @return bool - */ - abstract protected function doDelete(array $ids); - - /** - * Persists several cache items immediately. - * - * @param array $values The values to cache, indexed by their cache identifier - * @param int $lifetime The lifetime of the cached values, 0 for persisting until manual cleaning - * - * @return array|bool The identifiers that failed to be cached or a boolean stating if caching succeeded or not - */ - abstract protected function doSave(array $values, int $lifetime); - - /** - * {@inheritdoc} - * - * @return bool - */ - public function hasItem($key) - { - $id = $this->getId($key); - - if (isset($this->deferred[$key])) { - $this->commit(); - } - - try { - return $this->doHave($id); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to check if key "{key}" is cached: '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return false; - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function clear(string $prefix = '') - { - $this->deferred = []; - if ($cleared = $this->versioningIsEnabled) { - if ('' === $namespaceVersionToClear = $this->namespaceVersion) { - foreach ($this->doFetch([static::NS_SEPARATOR.$this->namespace]) as $v) { - $namespaceVersionToClear = $v; - } - } - $namespaceToClear = $this->namespace.$namespaceVersionToClear; - $namespaceVersion = self::formatNamespaceVersion(mt_rand()); - try { - $e = $this->doSave([static::NS_SEPARATOR.$this->namespace => $namespaceVersion], 0); - } catch (\Exception $e) { - } - if (true !== $e && [] !== $e) { - $cleared = false; - $message = 'Failed to save the new namespace'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } else { - $this->namespaceVersion = $namespaceVersion; - $this->ids = []; - } - } else { - $namespaceToClear = $this->namespace.$prefix; - } - - try { - return $this->doClear($namespaceToClear) || $cleared; - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to clear the cache: '.$e->getMessage(), ['exception' => $e, 'cache-adapter' => get_debug_type($this)]); - - return false; - } - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItem($key) - { - return $this->deleteItems([$key]); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function deleteItems(array $keys) - { - $ids = []; - - foreach ($keys as $key) { - $ids[$key] = $this->getId($key); - unset($this->deferred[$key]); - } - - try { - if ($this->doDelete($ids)) { - return true; - } - } catch (\Exception $e) { - } - - $ok = true; - - // When bulk-delete failed, retry each item individually - foreach ($ids as $key => $id) { - try { - $e = null; - if ($this->doDelete([$id])) { - continue; - } - } catch (\Exception $e) { - } - $message = 'Failed to delete key "{key}"'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $ok = false; - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - public function getItem($key) - { - $id = $this->getId($key); - - if (isset($this->deferred[$key])) { - $this->commit(); - } - - $isHit = false; - $value = null; - - try { - foreach ($this->doFetch([$id]) as $value) { - $isHit = true; - } - - return (self::$createCacheItem)($key, $value, $isHit); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch key "{key}": '.$e->getMessage(), ['key' => $key, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - return (self::$createCacheItem)($key, null, false); - } - - /** - * {@inheritdoc} - */ - public function getItems(array $keys = []) - { - $ids = []; - $commit = false; - - foreach ($keys as $key) { - $ids[] = $this->getId($key); - $commit = $commit || isset($this->deferred[$key]); - } - - if ($commit) { - $this->commit(); - } - - try { - $items = $this->doFetch($ids); - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => $keys, 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - $items = []; - } - $ids = array_combine($ids, $keys); - - return $this->generateItems($items, $ids); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function save(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return $this->commit(); - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function saveDeferred(CacheItemInterface $item) - { - if (!$item instanceof CacheItem) { - return false; - } - $this->deferred[$item->getKey()] = $item; - - return true; - } - - /** - * Enables/disables versioning of items. - * - * When versioning is enabled, clearing the cache is atomic and doesn't require listing existing keys to proceed, - * but old keys may need garbage collection and extra round-trips to the back-end are required. - * - * Calling this method also clears the memoized namespace version and thus forces a resynchronization of it. - * - * @return bool the previous state of versioning - */ - public function enableVersioning(bool $enable = true) - { - $wasEnabled = $this->versioningIsEnabled; - $this->versioningIsEnabled = $enable; - $this->namespaceVersion = ''; - $this->ids = []; - - return $wasEnabled; - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->deferred) { - $this->commit(); - } - $this->namespaceVersion = ''; - $this->ids = []; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if ($this->deferred) { - $this->commit(); - } - } - - private function generateItems(iterable $items, array &$keys): \Generator - { - $f = self::$createCacheItem; - - try { - foreach ($items as $id => $value) { - if (!isset($keys[$id])) { - throw new InvalidArgumentException(sprintf('Could not match value id "%s" to keys "%s".', $id, implode('", "', $keys))); - } - $key = $keys[$id]; - unset($keys[$id]); - yield $key => $f($key, $value, true); - } - } catch (\Exception $e) { - CacheItem::log($this->logger, 'Failed to fetch items: '.$e->getMessage(), ['keys' => array_values($keys), 'exception' => $e, 'cache-adapter' => get_debug_type($this)]); - } - - foreach ($keys as $key) { - yield $key => $f($key, null, false); - } - } - - /** - * @internal - */ - protected function getId($key) - { - if ($this->versioningIsEnabled && '' === $this->namespaceVersion) { - $this->ids = []; - $this->namespaceVersion = '1'.static::NS_SEPARATOR; - try { - foreach ($this->doFetch([static::NS_SEPARATOR.$this->namespace]) as $v) { - $this->namespaceVersion = $v; - } - $e = true; - if ('1'.static::NS_SEPARATOR === $this->namespaceVersion) { - $this->namespaceVersion = self::formatNamespaceVersion(time()); - $e = $this->doSave([static::NS_SEPARATOR.$this->namespace => $this->namespaceVersion], 0); - } - } catch (\Exception $e) { - } - if (true !== $e && [] !== $e) { - $message = 'Failed to save the new namespace'.($e instanceof \Exception ? ': '.$e->getMessage() : '.'); - CacheItem::log($this->logger, $message, ['exception' => $e instanceof \Exception ? $e : null, 'cache-adapter' => get_debug_type($this)]); - } - } - - if (\is_string($key) && isset($this->ids[$key])) { - return $this->namespace.$this->namespaceVersion.$this->ids[$key]; - } - \assert('' !== CacheItem::validateKey($key)); - $this->ids[$key] = $key; - - if (\count($this->ids) > 1000) { - $this->ids = \array_slice($this->ids, 500, null, true); // stop memory leak if there are many keys - } - - if (null === $this->maxIdLength) { - return $this->namespace.$this->namespaceVersion.$key; - } - if (\strlen($id = $this->namespace.$this->namespaceVersion.$key) > $this->maxIdLength) { - // Use MD5 to favor speed over security, which is not an issue here - $this->ids[$key] = $id = substr_replace(base64_encode(hash('md5', $key, true)), static::NS_SEPARATOR, -(\strlen($this->namespaceVersion) + 2)); - $id = $this->namespace.$this->namespaceVersion.$id; - } - - return $id; - } - - /** - * @internal - */ - public static function handleUnserializeCallback(string $class) - { - throw new \DomainException('Class not found: '.$class); - } - - private static function formatNamespaceVersion(int $value): string - { - return strtr(substr_replace(base64_encode(pack('V', $value)), static::NS_SEPARATOR, 5), '/', '_'); - } -} diff --git a/vendor/symfony/cache/Traits/ContractsTrait.php b/vendor/symfony/cache/Traits/ContractsTrait.php deleted file mode 100644 index c22e75f..0000000 --- a/vendor/symfony/cache/Traits/ContractsTrait.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\CacheItem; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\LockRegistry; -use Symfony\Contracts\Cache\CacheInterface; -use Symfony\Contracts\Cache\CacheTrait; -use Symfony\Contracts\Cache\ItemInterface; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -trait ContractsTrait -{ - use CacheTrait { - doGet as private contractsGet; - } - - private $callbackWrapper; - private $computing = []; - - /** - * Wraps the callback passed to ->get() in a callable. - * - * @return callable the previous callback wrapper - */ - public function setCallbackWrapper(?callable $callbackWrapper): callable - { - if (!isset($this->callbackWrapper)) { - $this->callbackWrapper = \Closure::fromCallable([LockRegistry::class, 'compute']); - - if (\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - $this->setCallbackWrapper(null); - } - } - - $previousWrapper = $this->callbackWrapper; - $this->callbackWrapper = $callbackWrapper ?? static function (callable $callback, ItemInterface $item, bool &$save, CacheInterface $pool, \Closure $setMetadata, ?LoggerInterface $logger) { - return $callback($item, $save); - }; - - return $previousWrapper; - } - - private function doGet(AdapterInterface $pool, string $key, callable $callback, ?float $beta, ?array &$metadata = null) - { - if (0 > $beta = $beta ?? 1.0) { - throw new InvalidArgumentException(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.', static::class, $beta)); - } - - static $setMetadata; - - $setMetadata ?? $setMetadata = \Closure::bind( - static function (CacheItem $item, float $startTime, ?array &$metadata) { - if ($item->expiry > $endTime = microtime(true)) { - $item->newMetadata[CacheItem::METADATA_EXPIRY] = $metadata[CacheItem::METADATA_EXPIRY] = $item->expiry; - $item->newMetadata[CacheItem::METADATA_CTIME] = $metadata[CacheItem::METADATA_CTIME] = (int) ceil(1000 * ($endTime - $startTime)); - } else { - unset($metadata[CacheItem::METADATA_EXPIRY], $metadata[CacheItem::METADATA_CTIME]); - } - }, - null, - CacheItem::class - ); - - return $this->contractsGet($pool, $key, function (CacheItem $item, bool &$save) use ($pool, $callback, $setMetadata, &$metadata, $key) { - // don't wrap nor save recursive calls - if (isset($this->computing[$key])) { - $value = $callback($item, $save); - $save = false; - - return $value; - } - - $this->computing[$key] = $key; - $startTime = microtime(true); - - if (!isset($this->callbackWrapper)) { - $this->setCallbackWrapper($this->setCallbackWrapper(null)); - } - - try { - $value = ($this->callbackWrapper)($callback, $item, $save, $pool, function (CacheItem $item) use ($setMetadata, $startTime, &$metadata) { - $setMetadata($item, $startTime, $metadata); - }, $this->logger ?? null); - $setMetadata($item, $startTime, $metadata); - - return $value; - } finally { - unset($this->computing[$key]); - } - }, $beta, $metadata, $this->logger ?? null); - } -} diff --git a/vendor/symfony/cache/Traits/FilesystemCommonTrait.php b/vendor/symfony/cache/Traits/FilesystemCommonTrait.php deleted file mode 100644 index 0455093..0000000 --- a/vendor/symfony/cache/Traits/FilesystemCommonTrait.php +++ /dev/null @@ -1,205 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\Exception\InvalidArgumentException; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -trait FilesystemCommonTrait -{ - private $directory; - private $tmp; - - private function init(string $namespace, ?string $directory) - { - if (!isset($directory[0])) { - $directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfony-cache'; - } else { - $directory = realpath($directory) ?: $directory; - } - if (isset($namespace[0])) { - if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('Namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); - } - $directory .= \DIRECTORY_SEPARATOR.$namespace; - } else { - $directory .= \DIRECTORY_SEPARATOR.'@'; - } - if (!is_dir($directory)) { - @mkdir($directory, 0777, true); - } - $directory .= \DIRECTORY_SEPARATOR; - // On Windows the whole path is limited to 258 chars - if ('\\' === \DIRECTORY_SEPARATOR && \strlen($directory) > 234) { - throw new InvalidArgumentException(sprintf('Cache directory too long (%s).', $directory)); - } - - $this->directory = $directory; - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - $ok = true; - - foreach ($this->scanHashDir($this->directory) as $file) { - if ('' !== $namespace && !str_starts_with($this->getFileKey($file), $namespace)) { - continue; - } - - $ok = ($this->doUnlink($file) || !file_exists($file)) && $ok; - } - - return $ok; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - $ok = true; - - foreach ($ids as $id) { - $file = $this->getFile($id); - $ok = (!is_file($file) || $this->doUnlink($file) || !file_exists($file)) && $ok; - } - - return $ok; - } - - protected function doUnlink(string $file) - { - return @unlink($file); - } - - private function write(string $file, string $data, ?int $expiresAt = null) - { - $unlink = false; - set_error_handler(__CLASS__.'::throwError'); - try { - if (null === $this->tmp) { - $this->tmp = $this->directory.bin2hex(random_bytes(6)); - } - try { - $h = fopen($this->tmp, 'x'); - } catch (\ErrorException $e) { - if (!str_contains($e->getMessage(), 'File exists')) { - throw $e; - } - - $this->tmp = $this->directory.bin2hex(random_bytes(6)); - $h = fopen($this->tmp, 'x'); - } - fwrite($h, $data); - fclose($h); - $unlink = true; - - if (null !== $expiresAt) { - touch($this->tmp, $expiresAt ?: time() + 31556952); // 1 year in seconds - } - - $success = rename($this->tmp, $file); - $unlink = !$success; - - return $success; - } finally { - restore_error_handler(); - - if ($unlink) { - @unlink($this->tmp); - } - } - } - - private function getFile(string $id, bool $mkdir = false, ?string $directory = null) - { - // Use MD5 to favor speed over security, which is not an issue here - $hash = str_replace('/', '-', base64_encode(hash('md5', static::class.$id, true))); - $dir = ($directory ?? $this->directory).strtoupper($hash[0].\DIRECTORY_SEPARATOR.$hash[1].\DIRECTORY_SEPARATOR); - - if ($mkdir && !is_dir($dir)) { - @mkdir($dir, 0777, true); - } - - return $dir.substr($hash, 2, 20); - } - - private function getFileKey(string $file): string - { - return ''; - } - - private function scanHashDir(string $directory): \Generator - { - if (!is_dir($directory)) { - return; - } - - $chars = '+-ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; - - for ($i = 0; $i < 38; ++$i) { - if (!is_dir($directory.$chars[$i])) { - continue; - } - - for ($j = 0; $j < 38; ++$j) { - if (!is_dir($dir = $directory.$chars[$i].\DIRECTORY_SEPARATOR.$chars[$j])) { - continue; - } - - foreach (@scandir($dir, \SCANDIR_SORT_NONE) ?: [] as $file) { - if ('.' !== $file && '..' !== $file) { - yield $dir.\DIRECTORY_SEPARATOR.$file; - } - } - } - } - } - - /** - * @internal - */ - public static function throwError(int $type, string $message, string $file, int $line) - { - throw new \ErrorException($message, 0, $type, $file, $line); - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - if (method_exists(parent::class, '__destruct')) { - parent::__destruct(); - } - if (null !== $this->tmp && is_file($this->tmp)) { - unlink($this->tmp); - } - } -} diff --git a/vendor/symfony/cache/Traits/FilesystemTrait.php b/vendor/symfony/cache/Traits/FilesystemTrait.php deleted file mode 100644 index f2873d9..0000000 --- a/vendor/symfony/cache/Traits/FilesystemTrait.php +++ /dev/null @@ -1,124 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\Exception\CacheException; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * @author Rob Frawley 2nd <rmf@src.run> - * - * @internal - */ -trait FilesystemTrait -{ - use FilesystemCommonTrait; - - private $marshaller; - - /** - * @return bool - */ - public function prune() - { - $time = time(); - $pruned = true; - - foreach ($this->scanHashDir($this->directory) as $file) { - if (!$h = @fopen($file, 'r')) { - continue; - } - - if (($expiresAt = (int) fgets($h)) && $time >= $expiresAt) { - fclose($h); - $pruned = (@unlink($file) || !file_exists($file)) && $pruned; - } else { - fclose($h); - } - } - - return $pruned; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - $values = []; - $now = time(); - - foreach ($ids as $id) { - $file = $this->getFile($id); - if (!is_file($file) || !$h = @fopen($file, 'r')) { - continue; - } - if (($expiresAt = (int) fgets($h)) && $now >= $expiresAt) { - fclose($h); - @unlink($file); - } else { - $i = rawurldecode(rtrim(fgets($h))); - $value = stream_get_contents($h); - fclose($h); - if ($i === $id) { - $values[$id] = $this->marshaller->unmarshall($value); - } - } - } - - return $values; - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - $file = $this->getFile($id); - - return is_file($file) && (@filemtime($file) > time() || $this->doFetch([$id])); - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - $expiresAt = $lifetime ? (time() + $lifetime) : 0; - $values = $this->marshaller->marshall($values, $failed); - - foreach ($values as $id => $value) { - if (!$this->write($this->getFile($id, true), $expiresAt."\n".rawurlencode($id)."\n".$value, $expiresAt)) { - $failed[] = $id; - } - } - - if ($failed && !is_writable($this->directory)) { - throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory)); - } - - return $failed; - } - - private function getFileKey(string $file): string - { - if (!$h = @fopen($file, 'r')) { - return ''; - } - - fgets($h); // expiry - $encodedKey = fgets($h); - fclose($h); - - return rawurldecode(rtrim($encodedKey)); - } -} diff --git a/vendor/symfony/cache/Traits/ProxyTrait.php b/vendor/symfony/cache/Traits/ProxyTrait.php deleted file mode 100644 index c86f360..0000000 --- a/vendor/symfony/cache/Traits/ProxyTrait.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Contracts\Service\ResetInterface; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -trait ProxyTrait -{ - private $pool; - - /** - * {@inheritdoc} - */ - public function prune() - { - return $this->pool instanceof PruneableInterface && $this->pool->prune(); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - if ($this->pool instanceof ResetInterface) { - $this->pool->reset(); - } - } -} diff --git a/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php b/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php deleted file mode 100644 index deba74f..0000000 --- a/vendor/symfony/cache/Traits/RedisClusterNodeProxy.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * This file acts as a wrapper to the \RedisCluster implementation so it can accept the same type of calls as - * individual \Redis objects. - * - * Calls are made to individual nodes via: RedisCluster->{method}($host, ...args)' - * according to https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#directed-node-commands - * - * @author Jack Thomas <jack.thomas@solidalpha.com> - * - * @internal - */ -class RedisClusterNodeProxy -{ - private $host; - private $redis; - - /** - * @param \RedisCluster|RedisClusterProxy $redis - */ - public function __construct(array $host, $redis) - { - $this->host = $host; - $this->redis = $redis; - } - - public function __call(string $method, array $args) - { - return $this->redis->{$method}($this->host, ...$args); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - return $this->redis->scan($iIterator, $this->host, $strPattern, $iCount); - } - - public function getOption($name) - { - return $this->redis->getOption($name); - } -} diff --git a/vendor/symfony/cache/Traits/RedisClusterProxy.php b/vendor/symfony/cache/Traits/RedisClusterProxy.php deleted file mode 100644 index 73c6a4f..0000000 --- a/vendor/symfony/cache/Traits/RedisClusterProxy.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * @author Alessandro Chitolina <alekitto@gmail.com> - * - * @internal - */ -class RedisClusterProxy -{ - private $redis; - private $initializer; - - public function __construct(\Closure $initializer) - { - $this->initializer = $initializer; - } - - public function __call(string $method, array $args) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->{$method}(...$args); - } - - public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->hscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->scan($iIterator, $strPattern, $iCount); - } - - public function sscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->sscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function zscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->redis ?: $this->redis = $this->initializer->__invoke(); - - return $this->redis->zscan($strKey, $iIterator, $strPattern, $iCount); - } -} diff --git a/vendor/symfony/cache/Traits/RedisProxy.php b/vendor/symfony/cache/Traits/RedisProxy.php deleted file mode 100644 index ec5cfab..0000000 --- a/vendor/symfony/cache/Traits/RedisProxy.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -class RedisProxy -{ - private $redis; - private $initializer; - private $ready = false; - - public function __construct(\Redis $redis, \Closure $initializer) - { - $this->redis = $redis; - $this->initializer = $initializer; - } - - public function __call(string $method, array $args) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->{$method}(...$args); - } - - public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->hscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function scan(&$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->scan($iIterator, $strPattern, $iCount); - } - - public function sscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->sscan($strKey, $iIterator, $strPattern, $iCount); - } - - public function zscan($strKey, &$iIterator, $strPattern = null, $iCount = null) - { - $this->ready ?: $this->ready = $this->initializer->__invoke($this->redis); - - return $this->redis->zscan($strKey, $iIterator, $strPattern, $iCount); - } -} diff --git a/vendor/symfony/cache/Traits/RedisTrait.php b/vendor/symfony/cache/Traits/RedisTrait.php deleted file mode 100644 index 8fcd7ba..0000000 --- a/vendor/symfony/cache/Traits/RedisTrait.php +++ /dev/null @@ -1,666 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Traits; - -use Predis\Command\Redis\UNLINK; -use Predis\Connection\Aggregate\ClusterInterface; -use Predis\Connection\Aggregate\RedisCluster; -use Predis\Connection\Aggregate\ReplicationInterface; -use Predis\Response\ErrorInterface; -use Predis\Response\Status; -use Symfony\Component\Cache\Exception\CacheException; -use Symfony\Component\Cache\Exception\InvalidArgumentException; -use Symfony\Component\Cache\Marshaller\DefaultMarshaller; -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Aurimas Niekis <aurimas@niekis.lt> - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -trait RedisTrait -{ - private static $defaultConnectionOptions = [ - 'class' => null, - 'persistent' => 0, - 'persistent_id' => null, - 'timeout' => 30, - 'read_timeout' => 0, - 'retry_interval' => 0, - 'tcp_keepalive' => 0, - 'lazy' => null, - 'redis_cluster' => false, - 'redis_sentinel' => null, - 'dbindex' => 0, - 'failover' => 'none', - 'ssl' => null, // see https://php.net/context.ssl - ]; - private $redis; - private $marshaller; - - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis - */ - private function init($redis, string $namespace, int $defaultLifetime, ?MarshallerInterface $marshaller) - { - parent::__construct($namespace, $defaultLifetime); - - if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) { - throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0])); - } - - if (!$redis instanceof \Redis && !$redis instanceof \RedisArray && !$redis instanceof \RedisCluster && !$redis instanceof \Predis\ClientInterface && !$redis instanceof RedisProxy && !$redis instanceof RedisClusterProxy) { - throw new InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redis))); - } - - if ($redis instanceof \Predis\ClientInterface && $redis->getOptions()->exceptions) { - $options = clone $redis->getOptions(); - \Closure::bind(function () { $this->options['exceptions'] = false; }, $options, $options)(); - $redis = new $redis($redis->getConnection(), $options); - } - - $this->redis = $redis; - $this->marshaller = $marshaller ?? new DefaultMarshaller(); - } - - /** - * Creates a Redis connection using a DSN configuration. - * - * Example DSN: - * - redis://localhost - * - redis://example.com:1234 - * - redis://secret@example.com/13 - * - redis:///var/run/redis.sock - * - redis://secret@/var/run/redis.sock/13 - * - * @param array $options See self::$defaultConnectionOptions - * - * @return \Redis|\RedisArray|\RedisCluster|RedisClusterProxy|RedisProxy|\Predis\ClientInterface According to the "class" option - * - * @throws InvalidArgumentException when the DSN is invalid - */ - public static function createConnection(string $dsn, array $options = []) - { - if (str_starts_with($dsn, 'redis:')) { - $scheme = 'redis'; - } elseif (str_starts_with($dsn, 'rediss:')) { - $scheme = 'rediss'; - } else { - throw new InvalidArgumentException('Invalid Redis DSN: it does not start with "redis[s]:".'); - } - - if (!\extension_loaded('redis') && !class_exists(\Predis\Client::class)) { - throw new CacheException('Cannot find the "redis" extension nor the "predis/predis" package.'); - } - - $params = preg_replace_callback('#^'.$scheme.':(//)?(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use (&$auth) { - if (isset($m[2])) { - $auth = rawurldecode($m[2]); - - if ('' === $auth) { - $auth = null; - } - } - - return 'file:'.($m[1] ?? ''); - }, $dsn); - - if (false === $params = parse_url($params)) { - throw new InvalidArgumentException('Invalid Redis DSN.'); - } - - $query = $hosts = []; - - $tls = 'rediss' === $scheme; - $tcpScheme = $tls ? 'tls' : 'tcp'; - - if (isset($params['query'])) { - parse_str($params['query'], $query); - - if (isset($query['host'])) { - if (!\is_array($hosts = $query['host'])) { - throw new InvalidArgumentException('Invalid Redis DSN: query parameter "host" must be an array.'); - } - foreach ($hosts as $host => $parameters) { - if (\is_string($parameters)) { - parse_str($parameters, $parameters); - } - if (false === $i = strrpos($host, ':')) { - $hosts[$host] = ['scheme' => $tcpScheme, 'host' => $host, 'port' => 6379] + $parameters; - } elseif ($port = (int) substr($host, 1 + $i)) { - $hosts[$host] = ['scheme' => $tcpScheme, 'host' => substr($host, 0, $i), 'port' => $port] + $parameters; - } else { - $hosts[$host] = ['scheme' => 'unix', 'path' => substr($host, 0, $i)] + $parameters; - } - } - $hosts = array_values($hosts); - } - } - - if (isset($params['host']) || isset($params['path'])) { - if (!isset($params['dbindex']) && isset($params['path'])) { - if (preg_match('#/(\d+)?$#', $params['path'], $m)) { - $params['dbindex'] = $m[1] ?? '0'; - $params['path'] = substr($params['path'], 0, -\strlen($m[0])); - } elseif (isset($params['host'])) { - throw new InvalidArgumentException('Invalid Redis DSN: query parameter "dbindex" must be a number.'); - } - } - - if (isset($params['host'])) { - array_unshift($hosts, ['scheme' => $tcpScheme, 'host' => $params['host'], 'port' => $params['port'] ?? 6379]); - } else { - array_unshift($hosts, ['scheme' => 'unix', 'path' => $params['path']]); - } - } - - if (!$hosts) { - throw new InvalidArgumentException('Invalid Redis DSN: missing host.'); - } - - $params += $query + $options + self::$defaultConnectionOptions; - - if (isset($params['redis_sentinel']) && !class_exists(\Predis\Client::class) && !class_exists(\RedisSentinel::class)) { - throw new CacheException('Redis Sentinel support requires the "predis/predis" package or the "redis" extension v5.2 or higher.'); - } - - if (isset($params['lazy'])) { - $params['lazy'] = filter_var($params['lazy'], \FILTER_VALIDATE_BOOLEAN); - } - $params['redis_cluster'] = filter_var($params['redis_cluster'], \FILTER_VALIDATE_BOOLEAN); - - if ($params['redis_cluster'] && isset($params['redis_sentinel'])) { - throw new InvalidArgumentException('Cannot use both "redis_cluster" and "redis_sentinel" at the same time.'); - } - - if (null === $params['class'] && \extension_loaded('redis')) { - $class = $params['redis_cluster'] ? \RedisCluster::class : (1 < \count($hosts) && !isset($params['redis_sentinel']) ? \RedisArray::class : \Redis::class); - } else { - $class = $params['class'] ?? \Predis\Client::class; - - if (isset($params['redis_sentinel']) && !is_a($class, \Predis\Client::class, true) && !class_exists(\RedisSentinel::class)) { - throw new CacheException(sprintf('Cannot use Redis Sentinel: class "%s" does not extend "Predis\Client" and ext-redis >= 5.2 not found.', $class)); - } - } - - if (is_a($class, \Redis::class, true)) { - $connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect'; - $redis = new $class(); - - $initializer = static function ($redis) use ($connect, $params, $auth, $hosts, $tls) { - $hostIndex = 0; - do { - $host = $hosts[$hostIndex]['host'] ?? $hosts[$hostIndex]['path']; - $port = $hosts[$hostIndex]['port'] ?? 0; - $passAuth = \defined('Redis::OPT_NULL_MULTIBULK_AS_NULL') && isset($params['auth']); - $address = false; - - if (isset($hosts[$hostIndex]['host']) && $tls) { - $host = 'tls://'.$host; - } - - if (!isset($params['redis_sentinel'])) { - break; - } - - if (version_compare(phpversion('redis'), '6.0.0', '>=')) { - $options = [ - 'host' => $host, - 'port' => $port, - 'connectTimeout' => $params['timeout'], - 'persistent' => $params['persistent_id'], - 'retryInterval' => $params['retry_interval'], - 'readTimeout' => $params['read_timeout'], - ]; - - if ($passAuth) { - $options['auth'] = $params['auth']; - } - - $sentinel = new \RedisSentinel($options); - } else { - $extra = $passAuth ? [$params['auth']] : []; - - $sentinel = new \RedisSentinel($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra); - } - - try { - if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) { - [$host, $port] = $address; - } - } catch (\RedisException $e) { - } - } while (++$hostIndex < \count($hosts) && !$address); - - if (isset($params['redis_sentinel']) && !$address) { - throw new InvalidArgumentException(sprintf('Failed to retrieve master information from sentinel "%s".', $params['redis_sentinel'])); - } - - try { - $extra = [ - 'stream' => $params['ssl'] ?? null, - ]; - $booleanStreamOptions = [ - 'allow_self_signed', - 'capture_peer_cert', - 'capture_peer_cert_chain', - 'disable_compression', - 'SNI_enabled', - 'verify_peer', - 'verify_peer_name', - ]; - - foreach ($extra['stream'] ?? [] as $streamOption => $value) { - if (\in_array($streamOption, $booleanStreamOptions, true) && \is_string($value)) { - $extra['stream'][$streamOption] = filter_var($value, \FILTER_VALIDATE_BOOL); - } - } - - if (isset($params['auth'])) { - $extra['auth'] = $params['auth']; - } - @$redis->{$connect}($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...\defined('Redis::SCAN_PREFIX') ? [$extra] : []); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $isConnected = $redis->isConnected(); - } finally { - restore_error_handler(); - } - if (!$isConnected) { - $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error ?? $redis->getLastError() ?? '', $error) ? sprintf(' (%s)', $error[1]) : ''; - throw new InvalidArgumentException('Redis connection failed: '.$error.'.'); - } - - if ((null !== $auth && !$redis->auth($auth)) - || ($params['dbindex'] && !$redis->select($params['dbindex'])) - ) { - $e = preg_replace('/^ERR /', '', $redis->getLastError()); - throw new InvalidArgumentException('Redis connection failed: '.$e.'.'); - } - - if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) { - $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - } catch (\RedisException $e) { - throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); - } - - return true; - }; - - if ($params['lazy']) { - $redis = new RedisProxy($redis, $initializer); - } else { - $initializer($redis); - } - } elseif (is_a($class, \RedisArray::class, true)) { - foreach ($hosts as $i => $host) { - switch ($host['scheme']) { - case 'tcp': $hosts[$i] = $host['host'].':'.$host['port']; break; - case 'tls': $hosts[$i] = 'tls://'.$host['host'].':'.$host['port']; break; - default: $hosts[$i] = $host['path']; - } - } - $params['lazy_connect'] = $params['lazy'] ?? true; - $params['connect_timeout'] = $params['timeout']; - - try { - $redis = new $class($hosts, $params); - } catch (\RedisClusterException $e) { - throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); - } - - if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) { - $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - } elseif (is_a($class, \RedisCluster::class, true)) { - $initializer = static function () use ($class, $params, $hosts) { - foreach ($hosts as $i => $host) { - switch ($host['scheme']) { - case 'tcp': $hosts[$i] = $host['host'].':'.$host['port']; break; - case 'tls': $hosts[$i] = 'tls://'.$host['host'].':'.$host['port']; break; - default: $hosts[$i] = $host['path']; - } - } - - try { - $redis = new $class(null, $hosts, $params['timeout'], $params['read_timeout'], (bool) $params['persistent'], $params['auth'] ?? '', ...\defined('Redis::SCAN_PREFIX') ? [$params['ssl'] ?? null] : []); - } catch (\RedisClusterException $e) { - throw new InvalidArgumentException('Redis connection failed: '.$e->getMessage()); - } - - if (0 < $params['tcp_keepalive'] && \defined('Redis::OPT_TCP_KEEPALIVE')) { - $redis->setOption(\Redis::OPT_TCP_KEEPALIVE, $params['tcp_keepalive']); - } - switch ($params['failover']) { - case 'error': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_ERROR); break; - case 'distribute': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE); break; - case 'slaves': $redis->setOption(\RedisCluster::OPT_SLAVE_FAILOVER, \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES); break; - } - - return $redis; - }; - - $redis = $params['lazy'] ? new RedisClusterProxy($initializer) : $initializer(); - } elseif (is_a($class, \Predis\ClientInterface::class, true)) { - if ($params['redis_cluster']) { - $params['cluster'] = 'redis'; - } elseif (isset($params['redis_sentinel'])) { - $params['replication'] = 'sentinel'; - $params['service'] = $params['redis_sentinel']; - } - $params += ['parameters' => []]; - $params['parameters'] += [ - 'persistent' => $params['persistent'], - 'timeout' => $params['timeout'], - 'read_write_timeout' => $params['read_timeout'], - 'tcp_nodelay' => true, - ]; - if ($params['dbindex']) { - $params['parameters']['database'] = $params['dbindex']; - } - if (null !== $auth) { - $params['parameters']['password'] = $auth; - } - - if (isset($params['ssl'])) { - foreach ($hosts as $i => $host) { - if (!isset($host['ssl'])) { - $hosts[$i]['ssl'] = $params['ssl']; - } - } - } - - if (1 === \count($hosts) && !($params['redis_cluster'] || $params['redis_sentinel'])) { - $hosts = $hosts[0]; - } elseif (\in_array($params['failover'], ['slaves', 'distribute'], true) && !isset($params['replication'])) { - $params['replication'] = true; - $hosts[0] += ['alias' => 'master']; - } - $params['exceptions'] = false; - - $redis = new $class($hosts, array_diff_key($params, self::$defaultConnectionOptions)); - if (isset($params['redis_sentinel'])) { - $redis->getConnection()->setSentinelTimeout($params['timeout']); - } - } elseif (class_exists($class, false)) { - throw new InvalidArgumentException(sprintf('"%s" is not a subclass of "Redis", "RedisArray", "RedisCluster" nor "Predis\ClientInterface".', $class)); - } else { - throw new InvalidArgumentException(sprintf('Class "%s" does not exist.', $class)); - } - - return $redis; - } - - /** - * {@inheritdoc} - */ - protected function doFetch(array $ids) - { - if (!$ids) { - return []; - } - - $result = []; - - if ($this->redis instanceof \Predis\ClientInterface && $this->redis->getConnection() instanceof ClusterInterface) { - $values = $this->pipeline(function () use ($ids) { - foreach ($ids as $id) { - yield 'get' => [$id]; - } - }); - } else { - $values = $this->redis->mget($ids); - - if (!\is_array($values) || \count($values) !== \count($ids)) { - return []; - } - - $values = array_combine($ids, $values); - } - - foreach ($values as $id => $v) { - if ($v) { - $result[$id] = $this->marshaller->unmarshall($v); - } - } - - return $result; - } - - /** - * {@inheritdoc} - */ - protected function doHave(string $id) - { - return (bool) $this->redis->exists($id); - } - - /** - * {@inheritdoc} - */ - protected function doClear(string $namespace) - { - if ($this->redis instanceof \Predis\ClientInterface) { - $prefix = $this->redis->getOptions()->prefix ? $this->redis->getOptions()->prefix->getPrefix() : ''; - $prefixLen = \strlen($prefix ?? ''); - } - - $cleared = true; - $hosts = $this->getHosts(); - $host = reset($hosts); - if ($host instanceof \Predis\Client && $host->getConnection() instanceof ReplicationInterface) { - // Predis supports info command only on the master in replication environments - $hosts = [$host->getClientFor('master')]; - } - - foreach ($hosts as $host) { - if (!isset($namespace[0])) { - $cleared = $host->flushDb() && $cleared; - continue; - } - - $info = $host->info('Server'); - $info = !$info instanceof ErrorInterface ? $info['Server'] ?? $info : ['redis_version' => '2.0']; - - if (!$host instanceof \Predis\ClientInterface) { - $prefix = \defined('Redis::SCAN_PREFIX') && (\Redis::SCAN_PREFIX & $host->getOption(\Redis::OPT_SCAN)) ? '' : $host->getOption(\Redis::OPT_PREFIX); - $prefixLen = \strlen($host->getOption(\Redis::OPT_PREFIX) ?? ''); - } - $pattern = $prefix.$namespace.'*'; - - if (!version_compare($info['redis_version'], '2.8', '>=')) { - // As documented in Redis documentation (http://redis.io/commands/keys) using KEYS - // can hang your server when it is executed against large databases (millions of items). - // Whenever you hit this scale, you should really consider upgrading to Redis 2.8 or above. - $unlink = version_compare($info['redis_version'], '4.0', '>=') ? 'UNLINK' : 'DEL'; - $args = $this->redis instanceof \Predis\ClientInterface ? [0, $pattern] : [[$pattern], 0]; - $cleared = $host->eval("local keys=redis.call('KEYS',ARGV[1]) for i=1,#keys,5000 do redis.call('$unlink',unpack(keys,i,math.min(i+4999,#keys))) end return 1", $args[0], $args[1]) && $cleared; - continue; - } - - $cursor = null; - do { - $keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor, 'MATCH', $pattern, 'COUNT', 1000) : $host->scan($cursor, $pattern, 1000); - if (isset($keys[1]) && \is_array($keys[1])) { - $cursor = $keys[0]; - $keys = $keys[1]; - } - if ($keys) { - if ($prefixLen) { - foreach ($keys as $i => $key) { - $keys[$i] = substr($key, $prefixLen); - } - } - $this->doDelete($keys); - } - } while ($cursor = (int) $cursor); - } - - return $cleared; - } - - /** - * {@inheritdoc} - */ - protected function doDelete(array $ids) - { - if (!$ids) { - return true; - } - - if ($this->redis instanceof \Predis\ClientInterface && $this->redis->getConnection() instanceof ClusterInterface) { - static $del; - $del = $del ?? (class_exists(UNLINK::class) ? 'unlink' : 'del'); - - $this->pipeline(function () use ($ids, $del) { - foreach ($ids as $id) { - yield $del => [$id]; - } - })->rewind(); - } else { - static $unlink = true; - - if ($unlink) { - try { - $unlink = false !== $this->redis->unlink($ids); - } catch (\Throwable $e) { - $unlink = false; - } - } - - if (!$unlink) { - $this->redis->del($ids); - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doSave(array $values, int $lifetime) - { - if (!$values = $this->marshaller->marshall($values, $failed)) { - return $failed; - } - - $results = $this->pipeline(function () use ($values, $lifetime) { - foreach ($values as $id => $value) { - if (0 >= $lifetime) { - yield 'set' => [$id, $value]; - } else { - yield 'setEx' => [$id, $lifetime, $value]; - } - } - }); - - foreach ($results as $id => $result) { - if (true !== $result && (!$result instanceof Status || Status::get('OK') !== $result)) { - $failed[] = $id; - } - } - - return $failed; - } - - private function pipeline(\Closure $generator, ?object $redis = null): \Generator - { - $ids = []; - $redis = $redis ?? $this->redis; - - if ($redis instanceof RedisClusterProxy || $redis instanceof \RedisCluster || ($redis instanceof \Predis\ClientInterface && $redis->getConnection() instanceof RedisCluster)) { - // phpredis & predis don't support pipelining with RedisCluster - // see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining - // see https://github.com/nrk/predis/issues/267#issuecomment-123781423 - $results = []; - foreach ($generator() as $command => $args) { - $results[] = $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? ($redis instanceof \Predis\ClientInterface ? $args[2] : $args[1][0]) : $args[0]; - } - } elseif ($redis instanceof \Predis\ClientInterface) { - $results = $redis->pipeline(static function ($redis) use ($generator, &$ids) { - foreach ($generator() as $command => $args) { - $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? $args[2] : $args[0]; - } - }); - } elseif ($redis instanceof \RedisArray) { - $connections = $results = $ids = []; - foreach ($generator() as $command => $args) { - $id = 'eval' === $command ? $args[1][0] : $args[0]; - if (!isset($connections[$h = $redis->_target($id)])) { - $connections[$h] = [$redis->_instance($h), -1]; - $connections[$h][0]->multi(\Redis::PIPELINE); - } - $connections[$h][0]->{$command}(...$args); - $results[] = [$h, ++$connections[$h][1]]; - $ids[] = $id; - } - foreach ($connections as $h => $c) { - $connections[$h] = $c[0]->exec(); - } - foreach ($results as $k => [$h, $c]) { - $results[$k] = $connections[$h][$c]; - } - } else { - $redis->multi(\Redis::PIPELINE); - foreach ($generator() as $command => $args) { - $redis->{$command}(...$args); - $ids[] = 'eval' === $command ? $args[1][0] : $args[0]; - } - $results = $redis->exec(); - } - - if (!$redis instanceof \Predis\ClientInterface && 'eval' === $command && $redis->getLastError()) { - $e = new \RedisException($redis->getLastError()); - $results = array_map(function ($v) use ($e) { return false === $v ? $e : $v; }, (array) $results); - } - - if (\is_bool($results)) { - return; - } - - foreach ($ids as $k => $id) { - yield $id => $results[$k]; - } - } - - private function getHosts(): array - { - $hosts = [$this->redis]; - if ($this->redis instanceof \Predis\ClientInterface) { - $connection = $this->redis->getConnection(); - if ($connection instanceof ClusterInterface && $connection instanceof \Traversable) { - $hosts = []; - foreach ($connection as $c) { - $hosts[] = new \Predis\Client($c); - } - } - } elseif ($this->redis instanceof \RedisArray) { - $hosts = []; - foreach ($this->redis->_hosts() as $host) { - $hosts[] = $this->redis->_instance($host); - } - } elseif ($this->redis instanceof RedisClusterProxy || $this->redis instanceof \RedisCluster) { - $hosts = []; - foreach ($this->redis->_masters() as $host) { - $hosts[] = new RedisClusterNodeProxy($host, $this->redis); - } - } - - return $hosts; - } -} diff --git a/vendor/symfony/cache/composer.json b/vendor/symfony/cache/composer.json deleted file mode 100644 index e3526bb..0000000 --- a/vendor/symfony/cache/composer.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "symfony/cache", - "type": "library", - "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", - "keywords": ["caching", "psr6"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "provide": { - "psr/cache-implementation": "1.0|2.0", - "psr/simple-cache-implementation": "1.0|2.0", - "symfony/cache-implementation": "1.0|2.0" - }, - "require": { - "php": ">=7.2.5", - "psr/cache": "^1.0|^2.0", - "psr/log": "^1.1|^2|^3", - "symfony/cache-contracts": "^1.1.7|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/var-exporter": "^4.4|^5.0|^6.0" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/cache": "^1.6|^2.0", - "doctrine/dbal": "^2.13.1|^3|^4", - "predis/predis": "^1.1", - "psr/simple-cache": "^1.0|^2.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/filesystem": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/messenger": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" - }, - "conflict": { - "doctrine/dbal": "<2.13.1", - "symfony/dependency-injection": "<4.4", - "symfony/http-kernel": "<4.4", - "symfony/var-dumper": "<4.4" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Cache\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/deprecation-contracts/.gitignore b/vendor/symfony/deprecation-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/deprecation-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/deprecation-contracts/CHANGELOG.md b/vendor/symfony/deprecation-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/deprecation-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/deprecation-contracts/LICENSE b/vendor/symfony/deprecation-contracts/LICENSE deleted file mode 100644 index 0ed3a24..0000000 --- a/vendor/symfony/deprecation-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2020-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/deprecation-contracts/README.md b/vendor/symfony/deprecation-contracts/README.md deleted file mode 100644 index 4957933..0000000 --- a/vendor/symfony/deprecation-contracts/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Symfony Deprecation Contracts -============================= - -A generic function and convention to trigger deprecation notices. - -This package provides a single global function named `trigger_deprecation()` that triggers silenced deprecation notices. - -By using a custom PHP error handler such as the one provided by the Symfony ErrorHandler component, -the triggered deprecations can be caught and logged for later discovery, both on dev and prod environments. - -The function requires at least 3 arguments: - - the name of the Composer package that is triggering the deprecation - - the version of the package that introduced the deprecation - - the message of the deprecation - - more arguments can be provided: they will be inserted in the message using `printf()` formatting - -Example: -```php -trigger_deprecation('symfony/blockchain', '8.9', 'Using "%s" is deprecated, use "%s" instead.', 'bitcoin', 'fabcoin'); -``` - -This will generate the following message: -`Since symfony/blockchain 8.9: Using "bitcoin" is deprecated, use "fabcoin" instead.` - -While not necessarily recommended, the deprecation notices can be completely ignored by declaring an empty -`function trigger_deprecation() {}` in your application. diff --git a/vendor/symfony/deprecation-contracts/composer.json b/vendor/symfony/deprecation-contracts/composer.json deleted file mode 100644 index cc7cc12..0000000 --- a/vendor/symfony/deprecation-contracts/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "symfony/deprecation-contracts", - "type": "library", - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/deprecation-contracts/function.php b/vendor/symfony/deprecation-contracts/function.php deleted file mode 100644 index d437150..0000000 --- a/vendor/symfony/deprecation-contracts/function.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (!function_exists('trigger_deprecation')) { - /** - * Triggers a silenced deprecation notice. - * - * @param string $package The name of the Composer package that is triggering the deprecation - * @param string $version The version of the package that introduced the deprecation - * @param string $message The message of the deprecation - * @param mixed ...$args Values to insert in the message using printf() formatting - * - * @author Nicolas Grekas <p@tchwork.com> - */ - function trigger_deprecation(string $package, string $version, string $message, ...$args): void - { - @trigger_error(($package || $version ? "Since $package $version: " : '').($args ? vsprintf($message, $args) : $message), \E_USER_DEPRECATED); - } -} diff --git a/vendor/symfony/event-dispatcher-contracts/.gitignore b/vendor/symfony/event-dispatcher-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/event-dispatcher-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md b/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/event-dispatcher-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/event-dispatcher-contracts/Event.php b/vendor/symfony/event-dispatcher-contracts/Event.php deleted file mode 100644 index 46dcb2b..0000000 --- a/vendor/symfony/event-dispatcher-contracts/Event.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; - -/** - * Event is the base class for classes containing event data. - * - * This class contains no event data. It is used by events that do not pass - * state information to an event handler when an event is raised. - * - * You can call the method stopPropagation() to abort the execution of - * further listeners in your event listener. - * - * @author Guilherme Blanco <guilhermeblanco@hotmail.com> - * @author Jonathan Wage <jonwage@gmail.com> - * @author Roman Borschel <roman@code-factory.org> - * @author Bernhard Schussek <bschussek@gmail.com> - * @author Nicolas Grekas <p@tchwork.com> - */ -class Event implements StoppableEventInterface -{ - private $propagationStopped = false; - - /** - * {@inheritdoc} - */ - public function isPropagationStopped(): bool - { - return $this->propagationStopped; - } - - /** - * Stops the propagation of the event to further event listeners. - * - * If multiple event listeners are connected to the same event, no - * further event listener will be triggered once any trigger calls - * stopPropagation(). - */ - public function stopPropagation(): void - { - $this->propagationStopped = true; - } -} diff --git a/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php deleted file mode 100644 index 81f4e89..0000000 --- a/vendor/symfony/event-dispatcher-contracts/EventDispatcherInterface.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\EventDispatcher; - -use Psr\EventDispatcher\EventDispatcherInterface as PsrEventDispatcherInterface; - -/** - * Allows providing hooks on domain-specific lifecycles by dispatching events. - */ -interface EventDispatcherInterface extends PsrEventDispatcherInterface -{ - /** - * Dispatches an event to all registered listeners. - * - * @param object $event The event to pass to the event handlers/listeners - * @param string|null $eventName The name of the event to dispatch. If not supplied, - * the class of $event should be used instead. - * - * @return object The passed $event MUST be returned - */ - public function dispatch(object $event, ?string $eventName = null): object; -} diff --git a/vendor/symfony/event-dispatcher-contracts/LICENSE b/vendor/symfony/event-dispatcher-contracts/LICENSE deleted file mode 100644 index 7536cae..0000000 --- a/vendor/symfony/event-dispatcher-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/event-dispatcher-contracts/README.md b/vendor/symfony/event-dispatcher-contracts/README.md deleted file mode 100644 index b1ab4c0..0000000 --- a/vendor/symfony/event-dispatcher-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony EventDispatcher Contracts -================================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/event-dispatcher-contracts/composer.json b/vendor/symfony/event-dispatcher-contracts/composer.json deleted file mode 100644 index 660df81..0000000 --- a/vendor/symfony/event-dispatcher-contracts/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/event-dispatcher-contracts", - "type": "library", - "description": "Generic abstractions related to dispatching event", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/event-dispatcher": "^1" - }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\EventDispatcher\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php b/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php deleted file mode 100644 index bb931b8..0000000 --- a/vendor/symfony/event-dispatcher/Attribute/AsEventListener.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Attribute; - -/** - * Service tag to autoconfigure event listeners. - * - * @author Alexander M. Turek <me@derrabus.de> - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class AsEventListener -{ - public function __construct( - public ?string $event = null, - public ?string $method = null, - public int $priority = 0, - public ?string $dispatcher = null, - ) { - } -} diff --git a/vendor/symfony/event-dispatcher/CHANGELOG.md b/vendor/symfony/event-dispatcher/CHANGELOG.md deleted file mode 100644 index 0f98598..0000000 --- a/vendor/symfony/event-dispatcher/CHANGELOG.md +++ /dev/null @@ -1,91 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Allow `#[AsEventListener]` attribute on methods - -5.3 ---- - - * Add `#[AsEventListener]` attribute for declaring listeners on PHP 8 - -5.1.0 ------ - - * The `LegacyEventDispatcherProxy` class has been deprecated. - * Added an optional `dispatcher` attribute to the listener and subscriber tags in `RegisterListenerPass`. - -5.0.0 ------ - - * The signature of the `EventDispatcherInterface::dispatch()` method has been changed to `dispatch($event, string $eventName = null): object`. - * The `Event` class has been removed in favor of `Symfony\Contracts\EventDispatcher\Event`. - * The `TraceableEventDispatcherInterface` has been removed. - * The `WrappedListener` class is now final. - -4.4.0 ------ - - * `AddEventAliasesPass` has been added, allowing applications and bundles to extend the event alias mapping used by `RegisterListenersPass`. - * Made the `event` attribute of the `kernel.event_listener` tag optional for FQCN events. - -4.3.0 ------ - - * The signature of the `EventDispatcherInterface::dispatch()` method should be updated to `dispatch($event, string $eventName = null)`, not doing so is deprecated - * deprecated the `Event` class, use `Symfony\Contracts\EventDispatcher\Event` instead - -4.1.0 ------ - - * added support for invokable event listeners tagged with `kernel.event_listener` by default - * The `TraceableEventDispatcher::getOrphanedEvents()` method has been added. - * The `TraceableEventDispatcherInterface` has been deprecated. - -4.0.0 ------ - - * removed the `ContainerAwareEventDispatcher` class - * added the `reset()` method to the `TraceableEventDispatcherInterface` - -3.4.0 ------ - - * Implementing `TraceableEventDispatcherInterface` without the `reset()` method has been deprecated. - -3.3.0 ------ - - * The ContainerAwareEventDispatcher class has been deprecated. Use EventDispatcher with closure factories instead. - -3.0.0 ------ - - * The method `getListenerPriority($eventName, $listener)` has been added to the - `EventDispatcherInterface`. - * The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()` - and `Event::getName()` have been removed. - The event dispatcher and the event name are passed to the listener call. - -2.5.0 ------ - - * added Debug\TraceableEventDispatcher (originally in HttpKernel) - * changed Debug\TraceableEventDispatcherInterface to extend EventDispatcherInterface - * added RegisterListenersPass (originally in HttpKernel) - -2.1.0 ------ - - * added TraceableEventDispatcherInterface - * added ContainerAwareEventDispatcher - * added a reference to the EventDispatcher on the Event - * added a reference to the Event name on the event - * added fluid interface to the dispatch() method which now returns the Event - object - * added GenericEvent event class - * added the possibility for subscribers to subscribe several times for the - same event - * added ImmutableEventDispatcher diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php deleted file mode 100644 index 84d6a08..0000000 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ /dev/null @@ -1,366 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Psr\EventDispatcher\StoppableEventInterface; -use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Contracts\Service\ResetInterface; - -/** - * Collects some data about event listeners. - * - * This event dispatcher delegates the dispatching to another one. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class TraceableEventDispatcher implements EventDispatcherInterface, ResetInterface -{ - protected $logger; - protected $stopwatch; - - /** - * @var \SplObjectStorage<WrappedListener, array{string, string}> - */ - private $callStack; - private $dispatcher; - private $wrappedListeners; - private $orphanedEvents; - private $requestStack; - private $currentRequestHash = ''; - - public function __construct(EventDispatcherInterface $dispatcher, Stopwatch $stopwatch, ?LoggerInterface $logger = null, ?RequestStack $requestStack = null) - { - $this->dispatcher = $dispatcher; - $this->stopwatch = $stopwatch; - $this->logger = $logger; - $this->wrappedListeners = []; - $this->orphanedEvents = []; - $this->requestStack = $requestStack; - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->dispatcher->addListener($eventName, $listener, $priority); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - $this->dispatcher->addSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $index => $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) { - $listener = $wrappedListener; - unset($this->wrappedListeners[$eventName][$index]); - break; - } - } - } - - return $this->dispatcher->removeListener($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - return $this->dispatcher->removeSubscriber($subscriber); - } - - /** - * {@inheritdoc} - */ - public function getListeners(?string $eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - // we might have wrapped listeners for the event (if called while dispatching) - // in that case get the priority by wrapper - if (isset($this->wrappedListeners[$eventName])) { - foreach ($this->wrappedListeners[$eventName] as $wrappedListener) { - if ($wrappedListener->getWrappedListener() === $listener || ($listener instanceof \Closure && $wrappedListener->getWrappedListener() == $listener)) { - return $this->dispatcher->getListenerPriority($eventName, $wrappedListener); - } - } - } - - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners(?string $eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, ?string $eventName = null): object - { - $eventName = $eventName ?? \get_class($event); - - if (null === $this->callStack) { - $this->callStack = new \SplObjectStorage(); - } - - $currentRequestHash = $this->currentRequestHash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : ''; - - if (null !== $this->logger && $event instanceof StoppableEventInterface && $event->isPropagationStopped()) { - $this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName)); - } - - $this->preProcess($eventName); - try { - $this->beforeDispatch($eventName, $event); - try { - $e = $this->stopwatch->start($eventName, 'section'); - try { - $this->dispatcher->dispatch($event, $eventName); - } finally { - if ($e->isStarted()) { - $e->stop(); - } - } - } finally { - $this->afterDispatch($eventName, $event); - } - } finally { - $this->currentRequestHash = $currentRequestHash; - $this->postProcess($eventName); - } - - return $event; - } - - /** - * @return array - */ - public function getCalledListeners(?Request $request = null) - { - if (null === $this->callStack) { - return []; - } - - $hash = $request ? spl_object_hash($request) : null; - $called = []; - foreach ($this->callStack as $listener) { - [$eventName, $requestHash] = $this->callStack->getInfo(); - if (null === $hash || $hash === $requestHash) { - $called[] = $listener->getInfo($eventName); - } - } - - return $called; - } - - /** - * @return array - */ - public function getNotCalledListeners(?Request $request = null) - { - try { - $allListeners = $this->getListeners(); - } catch (\Exception $e) { - if (null !== $this->logger) { - $this->logger->info('An exception was thrown while getting the uncalled listeners.', ['exception' => $e]); - } - - // unable to retrieve the uncalled listeners - return []; - } - - $hash = $request ? spl_object_hash($request) : null; - $calledListeners = []; - - if (null !== $this->callStack) { - foreach ($this->callStack as $calledListener) { - [, $requestHash] = $this->callStack->getInfo(); - - if (null === $hash || $hash === $requestHash) { - $calledListeners[] = $calledListener->getWrappedListener(); - } - } - } - - $notCalled = []; - foreach ($allListeners as $eventName => $listeners) { - foreach ($listeners as $listener) { - if (!\in_array($listener, $calledListeners, true)) { - if (!$listener instanceof WrappedListener) { - $listener = new WrappedListener($listener, null, $this->stopwatch, $this); - } - $notCalled[] = $listener->getInfo($eventName); - } - } - } - - uasort($notCalled, [$this, 'sortNotCalledListeners']); - - return $notCalled; - } - - public function getOrphanedEvents(?Request $request = null): array - { - if ($request) { - return $this->orphanedEvents[spl_object_hash($request)] ?? []; - } - - if (!$this->orphanedEvents) { - return []; - } - - return array_merge(...array_values($this->orphanedEvents)); - } - - public function reset() - { - $this->callStack = null; - $this->orphanedEvents = []; - $this->currentRequestHash = ''; - } - - /** - * Proxies all method calls to the original event dispatcher. - * - * @param string $method The method name - * @param array $arguments The method arguments - * - * @return mixed - */ - public function __call(string $method, array $arguments) - { - return $this->dispatcher->{$method}(...$arguments); - } - - /** - * Called before dispatching the event. - */ - protected function beforeDispatch(string $eventName, object $event) - { - } - - /** - * Called after dispatching the event. - */ - protected function afterDispatch(string $eventName, object $event) - { - } - - private function preProcess(string $eventName): void - { - if (!$this->dispatcher->hasListeners($eventName)) { - $this->orphanedEvents[$this->currentRequestHash][] = $eventName; - - return; - } - - foreach ($this->dispatcher->getListeners($eventName) as $listener) { - $priority = $this->getListenerPriority($eventName, $listener); - $wrappedListener = new WrappedListener($listener instanceof WrappedListener ? $listener->getWrappedListener() : $listener, null, $this->stopwatch, $this); - $this->wrappedListeners[$eventName][] = $wrappedListener; - $this->dispatcher->removeListener($eventName, $listener); - $this->dispatcher->addListener($eventName, $wrappedListener, $priority); - $this->callStack->attach($wrappedListener, [$eventName, $this->currentRequestHash]); - } - } - - private function postProcess(string $eventName): void - { - unset($this->wrappedListeners[$eventName]); - $skipped = false; - foreach ($this->dispatcher->getListeners($eventName) as $listener) { - if (!$listener instanceof WrappedListener) { // #12845: a new listener was added during dispatch. - continue; - } - // Unwrap listener - $priority = $this->getListenerPriority($eventName, $listener); - $this->dispatcher->removeListener($eventName, $listener); - $this->dispatcher->addListener($eventName, $listener->getWrappedListener(), $priority); - - if (null !== $this->logger) { - $context = ['event' => $eventName, 'listener' => $listener->getPretty()]; - } - - if ($listener->wasCalled()) { - if (null !== $this->logger) { - $this->logger->debug('Notified event "{event}" to listener "{listener}".', $context); - } - } else { - $this->callStack->detach($listener); - } - - if (null !== $this->logger && $skipped) { - $this->logger->debug('Listener "{listener}" was not called for event "{event}".', $context); - } - - if ($listener->stoppedPropagation()) { - if (null !== $this->logger) { - $this->logger->debug('Listener "{listener}" stopped propagation of the event "{event}".', $context); - } - - $skipped = true; - } - } - } - - private function sortNotCalledListeners(array $a, array $b) - { - if (0 !== $cmp = strcmp($a['event'], $b['event'])) { - return $cmp; - } - - if (\is_int($a['priority']) && !\is_int($b['priority'])) { - return 1; - } - - if (!\is_int($a['priority']) && \is_int($b['priority'])) { - return -1; - } - - if ($a['priority'] === $b['priority']) { - return 0; - } - - if ($a['priority'] > $b['priority']) { - return -1; - } - - return 1; - } -} diff --git a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php deleted file mode 100644 index 80d49a1..0000000 --- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\Debug; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\VarDumper\Caster\ClassStub; - -/** - * @author Fabien Potencier <fabien@symfony.com> - */ -final class WrappedListener -{ - private $listener; - private $optimizedListener; - private $name; - private $called; - private $stoppedPropagation; - private $stopwatch; - private $dispatcher; - private $pretty; - private $stub; - private $priority; - private static $hasClassStub; - - public function __construct($listener, ?string $name, Stopwatch $stopwatch, ?EventDispatcherInterface $dispatcher = null) - { - $this->listener = $listener; - $this->optimizedListener = $listener instanceof \Closure ? $listener : (\is_callable($listener) ? \Closure::fromCallable($listener) : null); - $this->stopwatch = $stopwatch; - $this->dispatcher = $dispatcher; - $this->called = false; - $this->stoppedPropagation = false; - - if (\is_array($listener)) { - $this->name = \is_object($listener[0]) ? get_debug_type($listener[0]) : $listener[0]; - $this->pretty = $this->name.'::'.$listener[1]; - } elseif ($listener instanceof \Closure) { - $r = new \ReflectionFunction($listener); - if (str_contains($r->name, '{closure}')) { - $this->pretty = $this->name = 'closure'; - } elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) { - $this->name = $class->name; - $this->pretty = $this->name.'::'.$r->name; - } else { - $this->pretty = $this->name = $r->name; - } - } elseif (\is_string($listener)) { - $this->pretty = $this->name = $listener; - } else { - $this->name = get_debug_type($listener); - $this->pretty = $this->name.'::__invoke'; - } - - if (null !== $name) { - $this->name = $name; - } - - if (null === self::$hasClassStub) { - self::$hasClassStub = class_exists(ClassStub::class); - } - } - - public function getWrappedListener() - { - return $this->listener; - } - - public function wasCalled(): bool - { - return $this->called; - } - - public function stoppedPropagation(): bool - { - return $this->stoppedPropagation; - } - - public function getPretty(): string - { - return $this->pretty; - } - - public function getInfo(string $eventName): array - { - if (null === $this->stub) { - $this->stub = self::$hasClassStub ? new ClassStub($this->pretty.'()', $this->listener) : $this->pretty.'()'; - } - - return [ - 'event' => $eventName, - 'priority' => null !== $this->priority ? $this->priority : (null !== $this->dispatcher ? $this->dispatcher->getListenerPriority($eventName, $this->listener) : null), - 'pretty' => $this->pretty, - 'stub' => $this->stub, - ]; - } - - public function __invoke(object $event, string $eventName, EventDispatcherInterface $dispatcher): void - { - $dispatcher = $this->dispatcher ?: $dispatcher; - - $this->called = true; - $this->priority = $dispatcher->getListenerPriority($eventName, $this->listener); - - $e = $this->stopwatch->start($this->name, 'event_listener'); - - try { - ($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher); - } finally { - if ($e->isStarted()) { - $e->stop(); - } - } - - if ($event instanceof StoppableEventInterface && $event->isPropagationStopped()) { - $this->stoppedPropagation = true; - } - } -} diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php deleted file mode 100644 index 6e7292b..0000000 --- a/vendor/symfony/event-dispatcher/DependencyInjection/AddEventAliasesPass.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; - -/** - * This pass allows bundles to extend the list of event aliases. - * - * @author Alexander M. Turek <me@derrabus.de> - */ -class AddEventAliasesPass implements CompilerPassInterface -{ - private $eventAliases; - private $eventAliasesParameter; - - public function __construct(array $eventAliases, string $eventAliasesParameter = 'event_dispatcher.event_aliases') - { - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->eventAliases = $eventAliases; - $this->eventAliasesParameter = $eventAliasesParameter; - } - - public function process(ContainerBuilder $container): void - { - $eventAliases = $container->hasParameter($this->eventAliasesParameter) ? $container->getParameter($this->eventAliasesParameter) : []; - - $container->setParameter( - $this->eventAliasesParameter, - array_merge($eventAliases, $this->eventAliases) - ); - } -} diff --git a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php b/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php deleted file mode 100644 index 5f44ff0..0000000 --- a/vendor/symfony/event-dispatcher/DependencyInjection/RegisterListenersPass.php +++ /dev/null @@ -1,242 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher\DependencyInjection; - -use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\EventDispatcher\EventDispatcher; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Compiler pass to register tagged services for an event dispatcher. - */ -class RegisterListenersPass implements CompilerPassInterface -{ - protected $dispatcherService; - protected $listenerTag; - protected $subscriberTag; - protected $eventAliasesParameter; - - private $hotPathEvents = []; - private $hotPathTagName = 'container.hot_path'; - private $noPreloadEvents = []; - private $noPreloadTagName = 'container.no_preload'; - - public function __construct(string $dispatcherService = 'event_dispatcher', string $listenerTag = 'kernel.event_listener', string $subscriberTag = 'kernel.event_subscriber', string $eventAliasesParameter = 'event_dispatcher.event_aliases') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->dispatcherService = $dispatcherService; - $this->listenerTag = $listenerTag; - $this->subscriberTag = $subscriberTag; - $this->eventAliasesParameter = $eventAliasesParameter; - } - - /** - * @return $this - */ - public function setHotPathEvents(array $hotPathEvents) - { - $this->hotPathEvents = array_flip($hotPathEvents); - - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.4', 'Configuring "$tagName" in "%s" is deprecated.', __METHOD__); - $this->hotPathTagName = func_get_arg(1); - } - - return $this; - } - - /** - * @return $this - */ - public function setNoPreloadEvents(array $noPreloadEvents): self - { - $this->noPreloadEvents = array_flip($noPreloadEvents); - - if (1 < \func_num_args()) { - trigger_deprecation('symfony/event-dispatcher', '5.4', 'Configuring "$tagName" in "%s" is deprecated.', __METHOD__); - $this->noPreloadTagName = func_get_arg(1); - } - - return $this; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->dispatcherService) && !$container->hasAlias($this->dispatcherService)) { - return; - } - - $aliases = []; - - if ($container->hasParameter($this->eventAliasesParameter)) { - $aliases = $container->getParameter($this->eventAliasesParameter); - } - - $globalDispatcherDefinition = $container->findDefinition($this->dispatcherService); - - foreach ($container->findTaggedServiceIds($this->listenerTag, true) as $id => $events) { - $noPreload = 0; - - foreach ($events as $event) { - $priority = $event['priority'] ?? 0; - - if (!isset($event['event'])) { - if ($container->getDefinition($id)->hasTag($this->subscriberTag)) { - continue; - } - - $event['method'] = $event['method'] ?? '__invoke'; - $event['event'] = $this->getEventFromTypeDeclaration($container, $id, $event['method']); - } - - $event['event'] = $aliases[$event['event']] ?? $event['event']; - - if (!isset($event['method'])) { - $event['method'] = 'on'.preg_replace_callback([ - '/(?<=\b|_)[a-z]/i', - '/[^a-z0-9]/i', - ], function ($matches) { return strtoupper($matches[0]); }, $event['event']); - $event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); - - if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method'])) { - if (!$r->hasMethod('__invoke')) { - throw new InvalidArgumentException(sprintf('None of the "%s" or "__invoke" methods exist for the service "%s". Please define the "method" attribute on "%s" tags.', $event['method'], $id, $this->listenerTag)); - } - - $event['method'] = '__invoke'; - } - } - - $dispatcherDefinition = $globalDispatcherDefinition; - if (isset($event['dispatcher'])) { - $dispatcherDefinition = $container->findDefinition($event['dispatcher']); - } - - $dispatcherDefinition->addMethodCall('addListener', [$event['event'], [new ServiceClosureArgument(new Reference($id)), $event['method']], $priority]); - - if (isset($this->hotPathEvents[$event['event']])) { - $container->getDefinition($id)->addTag($this->hotPathTagName); - } elseif (isset($this->noPreloadEvents[$event['event']])) { - ++$noPreload; - } - } - - if ($noPreload && \count($events) === $noPreload) { - $container->getDefinition($id)->addTag($this->noPreloadTagName); - } - } - - $extractingDispatcher = new ExtractingEventDispatcher(); - - foreach ($container->findTaggedServiceIds($this->subscriberTag, true) as $id => $tags) { - $def = $container->getDefinition($id); - - // We must assume that the class value has been correctly filled, even if the service is created by a factory - $class = $def->getClass(); - - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(EventSubscriberInterface::class)) { - throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EventSubscriberInterface::class)); - } - $class = $r->name; - - $dispatcherDefinitions = []; - foreach ($tags as $attributes) { - if (!isset($attributes['dispatcher']) || isset($dispatcherDefinitions[$attributes['dispatcher']])) { - continue; - } - - $dispatcherDefinitions[$attributes['dispatcher']] = $container->findDefinition($attributes['dispatcher']); - } - - if (!$dispatcherDefinitions) { - $dispatcherDefinitions = [$globalDispatcherDefinition]; - } - - $noPreload = 0; - ExtractingEventDispatcher::$aliases = $aliases; - ExtractingEventDispatcher::$subscriber = $class; - $extractingDispatcher->addSubscriber($extractingDispatcher); - foreach ($extractingDispatcher->listeners as $args) { - $args[1] = [new ServiceClosureArgument(new Reference($id)), $args[1]]; - foreach ($dispatcherDefinitions as $dispatcherDefinition) { - $dispatcherDefinition->addMethodCall('addListener', $args); - } - - if (isset($this->hotPathEvents[$args[0]])) { - $container->getDefinition($id)->addTag($this->hotPathTagName); - } elseif (isset($this->noPreloadEvents[$args[0]])) { - ++$noPreload; - } - } - if ($noPreload && \count($extractingDispatcher->listeners) === $noPreload) { - $container->getDefinition($id)->addTag($this->noPreloadTagName); - } - $extractingDispatcher->listeners = []; - ExtractingEventDispatcher::$aliases = []; - } - } - - private function getEventFromTypeDeclaration(ContainerBuilder $container, string $id, string $method): string - { - if ( - null === ($class = $container->getDefinition($id)->getClass()) - || !($r = $container->getReflectionClass($class, false)) - || !$r->hasMethod($method) - || 1 > ($m = $r->getMethod($method))->getNumberOfParameters() - || !($type = $m->getParameters()[0]->getType()) instanceof \ReflectionNamedType - || $type->isBuiltin() - || Event::class === ($name = $type->getName()) - ) { - throw new InvalidArgumentException(sprintf('Service "%s" must define the "event" attribute on "%s" tags.', $id, $this->listenerTag)); - } - - return $name; - } -} - -/** - * @internal - */ -class ExtractingEventDispatcher extends EventDispatcher implements EventSubscriberInterface -{ - public $listeners = []; - - public static $aliases = []; - public static $subscriber; - - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->listeners[] = [$eventName, $listener[1], $priority]; - } - - public static function getSubscribedEvents(): array - { - $events = []; - - foreach ([self::$subscriber, 'getSubscribedEvents']() as $eventName => $params) { - $events[self::$aliases[$eventName] ?? $eventName] = $params; - } - - return $events; - } -} diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php deleted file mode 100644 index 9c86bd9..0000000 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ /dev/null @@ -1,280 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Psr\EventDispatcher\StoppableEventInterface; -use Symfony\Component\EventDispatcher\Debug\WrappedListener; - -/** - * The EventDispatcherInterface is the central point of Symfony's event listener system. - * - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @author Guilherme Blanco <guilhermeblanco@hotmail.com> - * @author Jonathan Wage <jonwage@gmail.com> - * @author Roman Borschel <roman@code-factory.org> - * @author Bernhard Schussek <bschussek@gmail.com> - * @author Fabien Potencier <fabien@symfony.com> - * @author Jordi Boggiano <j.boggiano@seld.be> - * @author Jordan Alliot <jordan.alliot@gmail.com> - * @author Nicolas Grekas <p@tchwork.com> - */ -class EventDispatcher implements EventDispatcherInterface -{ - private $listeners = []; - private $sorted = []; - private $optimized; - - public function __construct() - { - if (__CLASS__ === static::class) { - $this->optimized = []; - } - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, ?string $eventName = null): object - { - $eventName = $eventName ?? \get_class($event); - - if (null !== $this->optimized) { - $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName)); - } else { - $listeners = $this->getListeners($eventName); - } - - if ($listeners) { - $this->callListeners($listeners, $eventName, $event); - } - - return $event; - } - - /** - * {@inheritdoc} - */ - public function getListeners(?string $eventName = null) - { - if (null !== $eventName) { - if (empty($this->listeners[$eventName])) { - return []; - } - - if (!isset($this->sorted[$eventName])) { - $this->sortListeners($eventName); - } - - return $this->sorted[$eventName]; - } - - foreach ($this->listeners as $eventName => $eventListeners) { - if (!isset($this->sorted[$eventName])) { - $this->sortListeners($eventName); - } - } - - return array_filter($this->sorted); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - if (empty($this->listeners[$eventName])) { - return null; - } - - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - - foreach ($this->listeners[$eventName] as $priority => &$listeners) { - foreach ($listeners as &$v) { - if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { - $v[0] = $v[0](); - $v[1] = $v[1] ?? '__invoke'; - } - if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) { - return $priority; - } - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function hasListeners(?string $eventName = null) - { - if (null !== $eventName) { - return !empty($this->listeners[$eventName]); - } - - foreach ($this->listeners as $eventListeners) { - if ($eventListeners) { - return true; - } - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - $this->listeners[$eventName][$priority][] = $listener; - unset($this->sorted[$eventName], $this->optimized[$eventName]); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - if (empty($this->listeners[$eventName])) { - return; - } - - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - - foreach ($this->listeners[$eventName] as $priority => &$listeners) { - foreach ($listeners as $k => &$v) { - if ($v !== $listener && \is_array($v) && isset($v[0]) && $v[0] instanceof \Closure && 2 >= \count($v)) { - $v[0] = $v[0](); - $v[1] = $v[1] ?? '__invoke'; - } - if ($v === $listener || ($listener instanceof \Closure && $v == $listener)) { - unset($listeners[$k], $this->sorted[$eventName], $this->optimized[$eventName]); - } - } - - if (!$listeners) { - unset($this->listeners[$eventName][$priority]); - } - } - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (\is_string($params)) { - $this->addListener($eventName, [$subscriber, $params]); - } elseif (\is_string($params[0])) { - $this->addListener($eventName, [$subscriber, $params[0]], $params[1] ?? 0); - } else { - foreach ($params as $listener) { - $this->addListener($eventName, [$subscriber, $listener[0]], $listener[1] ?? 0); - } - } - } - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - foreach ($subscriber->getSubscribedEvents() as $eventName => $params) { - if (\is_array($params) && \is_array($params[0])) { - foreach ($params as $listener) { - $this->removeListener($eventName, [$subscriber, $listener[0]]); - } - } else { - $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]); - } - } - } - - /** - * Triggers the listeners of an event. - * - * This method can be overridden to add functionality that is executed - * for each listener. - * - * @param callable[] $listeners The event listeners - * @param string $eventName The name of the event to dispatch - * @param object $event The event object to pass to the event handlers/listeners - */ - protected function callListeners(iterable $listeners, string $eventName, object $event) - { - $stoppable = $event instanceof StoppableEventInterface; - - foreach ($listeners as $listener) { - if ($stoppable && $event->isPropagationStopped()) { - break; - } - $listener($event, $eventName, $this); - } - } - - /** - * Sorts the internal list of listeners for the given event by priority. - */ - private function sortListeners(string $eventName) - { - krsort($this->listeners[$eventName]); - $this->sorted[$eventName] = []; - - foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as $k => &$listener) { - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - $this->sorted[$eventName][] = $listener; - } - } - } - - /** - * Optimizes the internal list of listeners for the given event by priority. - */ - private function optimizeListeners(string $eventName): array - { - krsort($this->listeners[$eventName]); - $this->optimized[$eventName] = []; - - foreach ($this->listeners[$eventName] as &$listeners) { - foreach ($listeners as &$listener) { - $closure = &$this->optimized[$eventName][]; - if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) { - $closure = static function (...$args) use (&$listener, &$closure) { - if ($listener[0] instanceof \Closure) { - $listener[0] = $listener[0](); - $listener[1] = $listener[1] ?? '__invoke'; - } - ($closure = \Closure::fromCallable($listener))(...$args); - }; - } else { - $closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener); - } - } - } - - return $this->optimized[$eventName]; - } -} diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php deleted file mode 100644 index 4b65e5a..0000000 --- a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface; - -/** - * The EventDispatcherInterface is the central point of Symfony's event listener system. - * Listeners are registered on the manager and events are dispatched through the - * manager. - * - * @author Bernhard Schussek <bschussek@gmail.com> - */ -interface EventDispatcherInterface extends ContractsEventDispatcherInterface -{ - /** - * Adds an event listener that listens on the specified events. - * - * @param int $priority The higher this value, the earlier an event - * listener will be triggered in the chain (defaults to 0) - */ - public function addListener(string $eventName, callable $listener, int $priority = 0); - - /** - * Adds an event subscriber. - * - * The subscriber is asked for all the events it is - * interested in and added as a listener for these events. - */ - public function addSubscriber(EventSubscriberInterface $subscriber); - - /** - * Removes an event listener from the specified events. - */ - public function removeListener(string $eventName, callable $listener); - - public function removeSubscriber(EventSubscriberInterface $subscriber); - - /** - * Gets the listeners of a specific event or all listeners sorted by descending priority. - * - * @return array<callable[]|callable> - */ - public function getListeners(?string $eventName = null); - - /** - * Gets the listener priority for a specific event. - * - * Returns null if the event or the listener does not exist. - * - * @return int|null - */ - public function getListenerPriority(string $eventName, callable $listener); - - /** - * Checks whether an event has any registered listeners. - * - * @return bool - */ - public function hasListeners(?string $eventName = null); -} diff --git a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php deleted file mode 100644 index 2085e42..0000000 --- a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * An EventSubscriber knows itself what events it is interested in. - * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes - * {@link getSubscribedEvents} and registers the subscriber as a listener for all - * returned events. - * - * @author Guilherme Blanco <guilhermeblanco@hotmail.com> - * @author Jonathan Wage <jonwage@gmail.com> - * @author Roman Borschel <roman@code-factory.org> - * @author Bernhard Schussek <bschussek@gmail.com> - */ -interface EventSubscriberInterface -{ - /** - * Returns an array of event names this subscriber wants to listen to. - * - * The array keys are event names and the value can be: - * - * * The method name to call (priority defaults to 0) - * * An array composed of the method name to call and the priority - * * An array of arrays composed of the method names to call and respective - * priorities, or 0 if unset - * - * For instance: - * - * * ['eventName' => 'methodName'] - * * ['eventName' => ['methodName', $priority]] - * * ['eventName' => [['methodName1', $priority], ['methodName2']]] - * - * The code must not depend on runtime state as it will only be called at compile time. - * All logic depending on runtime state must be put into the individual methods handling the events. - * - * @return array<string, string|array{0: string, 1: int}|list<array{0: string, 1?: int}>> - */ - public static function getSubscribedEvents(); -} diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php deleted file mode 100644 index 4ecd29e..0000000 --- a/vendor/symfony/event-dispatcher/GenericEvent.php +++ /dev/null @@ -1,182 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\Event; - -/** - * Event encapsulation class. - * - * Encapsulates events thus decoupling the observer from the subject they encapsulate. - * - * @author Drak <drak@zikula.org> - * - * @implements \ArrayAccess<string, mixed> - * @implements \IteratorAggregate<string, mixed> - */ -class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate -{ - protected $subject; - protected $arguments; - - /** - * Encapsulate an event with $subject and $arguments. - * - * @param mixed $subject The subject of the event, usually an object or a callable - * @param array $arguments Arguments to store in the event - */ - public function __construct($subject = null, array $arguments = []) - { - $this->subject = $subject; - $this->arguments = $arguments; - } - - /** - * Getter for subject property. - * - * @return mixed - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Get argument by key. - * - * @return mixed - * - * @throws \InvalidArgumentException if key is not found - */ - public function getArgument(string $key) - { - if ($this->hasArgument($key)) { - return $this->arguments[$key]; - } - - throw new \InvalidArgumentException(sprintf('Argument "%s" not found.', $key)); - } - - /** - * Add argument to event. - * - * @param mixed $value Value - * - * @return $this - */ - public function setArgument(string $key, $value) - { - $this->arguments[$key] = $value; - - return $this; - } - - /** - * Getter for all arguments. - * - * @return array - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Set args property. - * - * @return $this - */ - public function setArguments(array $args = []) - { - $this->arguments = $args; - - return $this; - } - - /** - * Has argument. - * - * @return bool - */ - public function hasArgument(string $key) - { - return \array_key_exists($key, $this->arguments); - } - - /** - * ArrayAccess for argument getter. - * - * @param string $key Array key - * - * @return mixed - * - * @throws \InvalidArgumentException if key does not exist in $this->args - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->getArgument($key); - } - - /** - * ArrayAccess for argument setter. - * - * @param string $key Array key to set - * @param mixed $value Value - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - $this->setArgument($key, $value); - } - - /** - * ArrayAccess for unset argument. - * - * @param string $key Array key - * - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - if ($this->hasArgument($key)) { - unset($this->arguments[$key]); - } - } - - /** - * ArrayAccess has argument. - * - * @param string $key Array key - * - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return $this->hasArgument($key); - } - - /** - * IteratorAggregate for iterating over the object like an array. - * - * @return \ArrayIterator<string, mixed> - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->arguments); - } -} diff --git a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php deleted file mode 100644 index 4e00bfa..0000000 --- a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -/** - * A read-only proxy for an event dispatcher. - * - * @author Bernhard Schussek <bschussek@gmail.com> - */ -class ImmutableEventDispatcher implements EventDispatcherInterface -{ - private $dispatcher; - - public function __construct(EventDispatcherInterface $dispatcher) - { - $this->dispatcher = $dispatcher; - } - - /** - * {@inheritdoc} - */ - public function dispatch(object $event, ?string $eventName = null): object - { - return $this->dispatcher->dispatch($event, $eventName); - } - - /** - * {@inheritdoc} - */ - public function addListener(string $eventName, $listener, int $priority = 0) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function addSubscriber(EventSubscriberInterface $subscriber) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function removeListener(string $eventName, $listener) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function removeSubscriber(EventSubscriberInterface $subscriber) - { - throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.'); - } - - /** - * {@inheritdoc} - */ - public function getListeners(?string $eventName = null) - { - return $this->dispatcher->getListeners($eventName); - } - - /** - * {@inheritdoc} - */ - public function getListenerPriority(string $eventName, $listener) - { - return $this->dispatcher->getListenerPriority($eventName, $listener); - } - - /** - * {@inheritdoc} - */ - public function hasListeners(?string $eventName = null) - { - return $this->dispatcher->hasListeners($eventName); - } -} diff --git a/vendor/symfony/event-dispatcher/LICENSE b/vendor/symfony/event-dispatcher/LICENSE deleted file mode 100644 index 0138f8f..0000000 --- a/vendor/symfony/event-dispatcher/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php b/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php deleted file mode 100644 index 6e17c8f..0000000 --- a/vendor/symfony/event-dispatcher/LegacyEventDispatcherProxy.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\EventDispatcher; - -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - -trigger_deprecation('symfony/event-dispatcher', '5.1', '%s is deprecated, use the event dispatcher without the proxy.', LegacyEventDispatcherProxy::class); - -/** - * A helper class to provide BC/FC with the legacy signature of EventDispatcherInterface::dispatch(). - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @deprecated since Symfony 5.1 - */ -final class LegacyEventDispatcherProxy -{ - public static function decorate(?EventDispatcherInterface $dispatcher): ?EventDispatcherInterface - { - return $dispatcher; - } -} diff --git a/vendor/symfony/event-dispatcher/README.md b/vendor/symfony/event-dispatcher/README.md deleted file mode 100644 index dcdb68d..0000000 --- a/vendor/symfony/event-dispatcher/README.md +++ /dev/null @@ -1,15 +0,0 @@ -EventDispatcher Component -========================= - -The EventDispatcher component provides tools that allow your application -components to communicate with each other by dispatching events and listening to -them. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/event_dispatcher.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json deleted file mode 100644 index 32b42e4..0000000 --- a/vendor/symfony/event-dispatcher/composer.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "symfony/event-dispatcher", - "type": "library", - "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/dependency-injection": "<4.4" - }, - "provide": { - "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/http-foundation/AcceptHeader.php b/vendor/symfony/http-foundation/AcceptHeader.php deleted file mode 100644 index 057c6b5..0000000 --- a/vendor/symfony/http-foundation/AcceptHeader.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -// Help opcache.preload discover always-needed symbols -class_exists(AcceptHeaderItem::class); - -/** - * Represents an Accept-* header. - * - * An accept header is compound with a list of items, - * sorted by descending quality. - * - * @author Jean-François Simon <contact@jfsimon.fr> - */ -class AcceptHeader -{ - /** - * @var AcceptHeaderItem[] - */ - private $items = []; - - /** - * @var bool - */ - private $sorted = true; - - /** - * @param AcceptHeaderItem[] $items - */ - public function __construct(array $items) - { - foreach ($items as $item) { - $this->add($item); - } - } - - /** - * Builds an AcceptHeader instance from a string. - * - * @return self - */ - public static function fromString(?string $headerValue) - { - $index = 0; - - $parts = HeaderUtils::split($headerValue ?? '', ',;='); - - return new self(array_map(function ($subParts) use (&$index) { - $part = array_shift($subParts); - $attributes = HeaderUtils::combine($subParts); - - $item = new AcceptHeaderItem($part[0], $attributes); - $item->setIndex($index++); - - return $item; - }, $parts)); - } - - /** - * Returns header value's string representation. - * - * @return string - */ - public function __toString() - { - return implode(',', $this->items); - } - - /** - * Tests if header has given value. - * - * @return bool - */ - public function has(string $value) - { - return isset($this->items[$value]); - } - - /** - * Returns given value's item, if exists. - * - * @return AcceptHeaderItem|null - */ - public function get(string $value) - { - return $this->items[$value] ?? $this->items[explode('/', $value)[0].'/*'] ?? $this->items['*/*'] ?? $this->items['*'] ?? null; - } - - /** - * Adds an item. - * - * @return $this - */ - public function add(AcceptHeaderItem $item) - { - $this->items[$item->getValue()] = $item; - $this->sorted = false; - - return $this; - } - - /** - * Returns all items. - * - * @return AcceptHeaderItem[] - */ - public function all() - { - $this->sort(); - - return $this->items; - } - - /** - * Filters items on their value using given regex. - * - * @return self - */ - public function filter(string $pattern) - { - return new self(array_filter($this->items, function (AcceptHeaderItem $item) use ($pattern) { - return preg_match($pattern, $item->getValue()); - })); - } - - /** - * Returns first item. - * - * @return AcceptHeaderItem|null - */ - public function first() - { - $this->sort(); - - return !empty($this->items) ? reset($this->items) : null; - } - - /** - * Sorts items by descending quality. - */ - private function sort(): void - { - if (!$this->sorted) { - uasort($this->items, function (AcceptHeaderItem $a, AcceptHeaderItem $b) { - $qA = $a->getQuality(); - $qB = $b->getQuality(); - - if ($qA === $qB) { - return $a->getIndex() > $b->getIndex() ? 1 : -1; - } - - return $qA > $qB ? -1 : 1; - }); - - $this->sorted = true; - } - } -} diff --git a/vendor/symfony/http-foundation/AcceptHeaderItem.php b/vendor/symfony/http-foundation/AcceptHeaderItem.php deleted file mode 100644 index 8b86eee..0000000 --- a/vendor/symfony/http-foundation/AcceptHeaderItem.php +++ /dev/null @@ -1,177 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Represents an Accept-* header item. - * - * @author Jean-François Simon <contact@jfsimon.fr> - */ -class AcceptHeaderItem -{ - private $value; - private $quality = 1.0; - private $index = 0; - private $attributes = []; - - public function __construct(string $value, array $attributes = []) - { - $this->value = $value; - foreach ($attributes as $name => $value) { - $this->setAttribute($name, $value); - } - } - - /** - * Builds an AcceptHeaderInstance instance from a string. - * - * @return self - */ - public static function fromString(?string $itemValue) - { - $parts = HeaderUtils::split($itemValue ?? '', ';='); - - $part = array_shift($parts); - $attributes = HeaderUtils::combine($parts); - - return new self($part[0], $attributes); - } - - /** - * Returns header value's string representation. - * - * @return string - */ - public function __toString() - { - $string = $this->value.($this->quality < 1 ? ';q='.$this->quality : ''); - if (\count($this->attributes) > 0) { - $string .= '; '.HeaderUtils::toString($this->attributes, ';'); - } - - return $string; - } - - /** - * Set the item value. - * - * @return $this - */ - public function setValue(string $value) - { - $this->value = $value; - - return $this; - } - - /** - * Returns the item value. - * - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Set the item quality. - * - * @return $this - */ - public function setQuality(float $quality) - { - $this->quality = $quality; - - return $this; - } - - /** - * Returns the item quality. - * - * @return float - */ - public function getQuality() - { - return $this->quality; - } - - /** - * Set the item index. - * - * @return $this - */ - public function setIndex(int $index) - { - $this->index = $index; - - return $this; - } - - /** - * Returns the item index. - * - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * Tests if an attribute exists. - * - * @return bool - */ - public function hasAttribute(string $name) - { - return isset($this->attributes[$name]); - } - - /** - * Returns an attribute by its name. - * - * @param mixed $default - * - * @return mixed - */ - public function getAttribute(string $name, $default = null) - { - return $this->attributes[$name] ?? $default; - } - - /** - * Returns all attributes. - * - * @return array - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Set an attribute. - * - * @return $this - */ - public function setAttribute(string $name, string $value) - { - if ('q' === $name) { - $this->quality = (float) $value; - } else { - $this->attributes[$name] = $value; - } - - return $this; - } -} diff --git a/vendor/symfony/http-foundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/BinaryFileResponse.php deleted file mode 100644 index 1878caa..0000000 --- a/vendor/symfony/http-foundation/BinaryFileResponse.php +++ /dev/null @@ -1,414 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\File; - -/** - * BinaryFileResponse represents an HTTP response delivering a file. - * - * @author Niklas Fiekas <niklas.fiekas@tu-clausthal.de> - * @author stealth35 <stealth35-php@live.fr> - * @author Igor Wiedler <igor@wiedler.ch> - * @author Jordan Alliot <jordan.alliot@gmail.com> - * @author Sergey Linnik <linniksa@gmail.com> - */ -class BinaryFileResponse extends Response -{ - protected static $trustXSendfileTypeHeader = false; - - /** - * @var File - */ - protected $file; - protected $offset = 0; - protected $maxlen = -1; - protected $deleteFileAfterSend = false; - protected $chunkSize = 16 * 1024; - - /** - * @param \SplFileInfo|string $file The file to stream - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $public Files are public by default - * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename - * @param bool $autoEtag Whether the ETag header should be automatically set - * @param bool $autoLastModified Whether the Last-Modified header should be automatically set - */ - public function __construct($file, int $status = 200, array $headers = [], bool $public = true, ?string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - parent::__construct(null, $status, $headers); - - $this->setFile($file, $contentDisposition, $autoEtag, $autoLastModified); - - if ($public) { - $this->setPublic(); - } - } - - /** - * @param \SplFileInfo|string $file The file to stream - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $public Files are public by default - * @param string|null $contentDisposition The type of Content-Disposition to set automatically with the filename - * @param bool $autoEtag Whether the ETag header should be automatically set - * @param bool $autoLastModified Whether the Last-Modified header should be automatically set - * - * @return static - * - * @deprecated since Symfony 5.2, use __construct() instead. - */ - public static function create($file = null, int $status = 200, array $headers = [], bool $public = true, ?string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - trigger_deprecation('symfony/http-foundation', '5.2', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($file, $status, $headers, $public, $contentDisposition, $autoEtag, $autoLastModified); - } - - /** - * Sets the file to stream. - * - * @param \SplFileInfo|string $file The file to stream - * - * @return $this - * - * @throws FileException - */ - public function setFile($file, ?string $contentDisposition = null, bool $autoEtag = false, bool $autoLastModified = true) - { - if (!$file instanceof File) { - if ($file instanceof \SplFileInfo) { - $file = new File($file->getPathname()); - } else { - $file = new File((string) $file); - } - } - - if (!$file->isReadable()) { - throw new FileException('File must be readable.'); - } - - $this->file = $file; - - if ($autoEtag) { - $this->setAutoEtag(); - } - - if ($autoLastModified) { - $this->setAutoLastModified(); - } - - if ($contentDisposition) { - $this->setContentDisposition($contentDisposition); - } - - return $this; - } - - /** - * Gets the file. - * - * @return File - */ - public function getFile() - { - return $this->file; - } - - /** - * Sets the response stream chunk size. - * - * @return $this - */ - public function setChunkSize(int $chunkSize): self - { - if ($chunkSize < 1 || $chunkSize > \PHP_INT_MAX) { - throw new \LogicException('The chunk size of a BinaryFileResponse cannot be less than 1 or greater than PHP_INT_MAX.'); - } - - $this->chunkSize = $chunkSize; - - return $this; - } - - /** - * Automatically sets the Last-Modified header according the file modification date. - * - * @return $this - */ - public function setAutoLastModified() - { - $this->setLastModified(\DateTime::createFromFormat('U', $this->file->getMTime())); - - return $this; - } - - /** - * Automatically sets the ETag header according to the checksum of the file. - * - * @return $this - */ - public function setAutoEtag() - { - $this->setEtag(base64_encode(hash_file('sha256', $this->file->getPathname(), true))); - - return $this; - } - - /** - * Sets the Content-Disposition header with the given filename. - * - * @param string $disposition ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT - * @param string $filename Optionally use this UTF-8 encoded filename instead of the real name of the file - * @param string $filenameFallback A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename - * - * @return $this - */ - public function setContentDisposition(string $disposition, string $filename = '', string $filenameFallback = '') - { - if ('' === $filename) { - $filename = $this->file->getFilename(); - } - - if ('' === $filenameFallback && (!preg_match('/^[\x20-\x7e]*$/', $filename) || str_contains($filename, '%'))) { - $encoding = mb_detect_encoding($filename, null, true) ?: '8bit'; - - for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) { - $char = mb_substr($filename, $i, 1, $encoding); - - if ('%' === $char || \ord($char) < 32 || \ord($char) > 126) { - $filenameFallback .= '_'; - } else { - $filenameFallback .= $char; - } - } - } - - $dispositionHeader = $this->headers->makeDisposition($disposition, $filename, $filenameFallback); - $this->headers->set('Content-Disposition', $dispositionHeader); - - return $this; - } - - /** - * {@inheritdoc} - */ - public function prepare(Request $request) - { - if ($this->isInformational() || $this->isEmpty()) { - parent::prepare($request); - - $this->maxlen = 0; - - return $this; - } - - if (!$this->headers->has('Content-Type')) { - $this->headers->set('Content-Type', $this->file->getMimeType() ?: 'application/octet-stream'); - } - - parent::prepare($request); - - $this->offset = 0; - $this->maxlen = -1; - - if (false === $fileSize = $this->file->getSize()) { - return $this; - } - $this->headers->remove('Transfer-Encoding'); - $this->headers->set('Content-Length', $fileSize); - - if (!$this->headers->has('Accept-Ranges')) { - // Only accept ranges on safe HTTP methods - $this->headers->set('Accept-Ranges', $request->isMethodSafe() ? 'bytes' : 'none'); - } - - if (self::$trustXSendfileTypeHeader && $request->headers->has('X-Sendfile-Type')) { - // Use X-Sendfile, do not send any content. - $type = $request->headers->get('X-Sendfile-Type'); - $path = $this->file->getRealPath(); - // Fall back to scheme://path for stream wrapped locations. - if (false === $path) { - $path = $this->file->getPathname(); - } - if ('x-accel-redirect' === strtolower($type)) { - // Do X-Accel-Mapping substitutions. - // @link https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/#x-accel-redirect - $parts = HeaderUtils::split($request->headers->get('X-Accel-Mapping', ''), ',='); - foreach ($parts as $part) { - [$pathPrefix, $location] = $part; - if (substr($path, 0, \strlen($pathPrefix)) === $pathPrefix) { - $path = $location.substr($path, \strlen($pathPrefix)); - // Only set X-Accel-Redirect header if a valid URI can be produced - // as nginx does not serve arbitrary file paths. - $this->headers->set($type, $path); - $this->maxlen = 0; - break; - } - } - } else { - $this->headers->set($type, $path); - $this->maxlen = 0; - } - } elseif ($request->headers->has('Range') && $request->isMethod('GET')) { - // Process the range headers. - if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) { - $range = $request->headers->get('Range'); - - if (str_starts_with($range, 'bytes=')) { - [$start, $end] = explode('-', substr($range, 6), 2) + [1 => 0]; - - $end = ('' === $end) ? $fileSize - 1 : (int) $end; - - if ('' === $start) { - $start = $fileSize - $end; - $end = $fileSize - 1; - } else { - $start = (int) $start; - } - - if ($start <= $end) { - $end = min($end, $fileSize - 1); - if ($start < 0 || $start > $end) { - $this->setStatusCode(416); - $this->headers->set('Content-Range', sprintf('bytes */%s', $fileSize)); - } elseif ($end - $start < $fileSize - 1) { - $this->maxlen = $end < $fileSize ? $end - $start + 1 : -1; - $this->offset = $start; - - $this->setStatusCode(206); - $this->headers->set('Content-Range', sprintf('bytes %s-%s/%s', $start, $end, $fileSize)); - $this->headers->set('Content-Length', $end - $start + 1); - } - } - } - } - } - - if ($request->isMethod('HEAD')) { - $this->maxlen = 0; - } - - return $this; - } - - private function hasValidIfRangeHeader(?string $header): bool - { - if ($this->getEtag() === $header) { - return true; - } - - if (null === $lastModified = $this->getLastModified()) { - return false; - } - - return $lastModified->format('D, d M Y H:i:s').' GMT' === $header; - } - - /** - * {@inheritdoc} - */ - public function sendContent() - { - try { - if (!$this->isSuccessful()) { - return parent::sendContent(); - } - - if (0 === $this->maxlen) { - return $this; - } - - $out = fopen('php://output', 'w'); - $file = fopen($this->file->getPathname(), 'r'); - - ignore_user_abort(true); - - if (0 !== $this->offset) { - fseek($file, $this->offset); - } - - $length = $this->maxlen; - while ($length && !feof($file)) { - $read = $length > $this->chunkSize || 0 > $length ? $this->chunkSize : $length; - - if (false === $data = fread($file, $read)) { - break; - } - while ('' !== $data) { - $read = fwrite($out, $data); - if (false === $read || connection_aborted()) { - break 2; - } - if (0 < $length) { - $length -= $read; - } - $data = substr($data, $read); - } - } - - fclose($out); - fclose($file); - } finally { - if ($this->deleteFileAfterSend && is_file($this->file->getPathname())) { - unlink($this->file->getPathname()); - } - } - - return $this; - } - - /** - * {@inheritdoc} - * - * @throws \LogicException when the content is not null - */ - public function setContent(?string $content) - { - if (null !== $content) { - throw new \LogicException('The content cannot be set on a BinaryFileResponse instance.'); - } - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getContent() - { - return false; - } - - /** - * Trust X-Sendfile-Type header. - */ - public static function trustXSendfileTypeHeader() - { - self::$trustXSendfileTypeHeader = true; - } - - /** - * If this is set to true, the file will be unlinked after the request is sent - * Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used. - * - * @return $this - */ - public function deleteFileAfterSend(bool $shouldDelete = true) - { - $this->deleteFileAfterSend = $shouldDelete; - - return $this; - } -} diff --git a/vendor/symfony/http-foundation/CHANGELOG.md b/vendor/symfony/http-foundation/CHANGELOG.md deleted file mode 100644 index ad7607a..0000000 --- a/vendor/symfony/http-foundation/CHANGELOG.md +++ /dev/null @@ -1,296 +0,0 @@ -CHANGELOG -========= - -5.4 ---- - - * Deprecate passing `null` as `$requestIp` to `IpUtils::__checkIp()`, `IpUtils::__checkIp4()` or `IpUtils::__checkIp6()`, pass an empty string instead. - * Add the `litespeed_finish_request` method to work with Litespeed - * Deprecate `upload_progress.*` and `url_rewriter.tags` session options - * Allow setting session options via DSN - -5.3 ---- - - * Add the `SessionFactory`, `NativeSessionStorageFactory`, `PhpBridgeSessionStorageFactory` and `MockFileSessionStorageFactory` classes - * Calling `Request::getSession()` when there is no available session throws a `SessionNotFoundException` - * Add the `RequestStack::getSession` method - * Deprecate the `NamespacedAttributeBag` class - * Add `ResponseFormatSame` PHPUnit constraint - * Deprecate the `RequestStack::getMasterRequest()` method and add `getMainRequest()` as replacement - -5.2.0 ------ - - * added support for `X-Forwarded-Prefix` header - * added `HeaderUtils::parseQuery()`: it does the same as `parse_str()` but preserves dots in variable names - * added `File::getContent()` - * added ability to use comma separated ip addresses for `RequestMatcher::matchIps()` - * added `Request::toArray()` to parse a JSON request body to an array - * added `RateLimiter\RequestRateLimiterInterface` and `RateLimiter\AbstractRequestRateLimiter` - * deprecated not passing a `Closure` together with `FILTER_CALLBACK` to `ParameterBag::filter()`; wrap your filter in a closure instead. - * Deprecated the `Request::HEADER_X_FORWARDED_ALL` constant, use either `HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO` or `HEADER_X_FORWARDED_AWS_ELB` or `HEADER_X_FORWARDED_TRAEFIK` constants instead. - * Deprecated `BinaryFileResponse::create()`, use `__construct()` instead - -5.1.0 ------ - - * added `Cookie::withValue`, `Cookie::withDomain`, `Cookie::withExpires`, - `Cookie::withPath`, `Cookie::withSecure`, `Cookie::withHttpOnly`, - `Cookie::withRaw`, `Cookie::withSameSite` - * Deprecate `Response::create()`, `JsonResponse::create()`, - `RedirectResponse::create()`, and `StreamedResponse::create()` methods (use - `__construct()` instead) - * added `Request::preferSafeContent()` and `Response::setContentSafe()` to handle "safe" HTTP preference - according to [RFC 8674](https://tools.ietf.org/html/rfc8674) - * made the Mime component an optional dependency - * added `MarshallingSessionHandler`, `IdentityMarshaller` - * made `Session` accept a callback to report when the session is being used - * Add support for all core cache control directives - * Added `Symfony\Component\HttpFoundation\InputBag` - * Deprecated retrieving non-string values using `InputBag::get()`, use `InputBag::all()` if you need access to the collection of values - -5.0.0 ------ - - * made `Cookie` auto-secure and lax by default - * removed classes in the `MimeType` namespace, use the Symfony Mime component instead - * removed method `UploadedFile::getClientSize()` and the related constructor argument - * made `Request::getSession()` throw if the session has not been set before - * removed `Response::HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL` - * passing a null url when instantiating a `RedirectResponse` is not allowed - -4.4.0 ------ - - * passing arguments to `Request::isMethodSafe()` is deprecated. - * `ApacheRequest` is deprecated, use the `Request` class instead. - * passing a third argument to `HeaderBag::get()` is deprecated, use method `all()` instead - * [BC BREAK] `PdoSessionHandler` with MySQL changed the type of the lifetime column, - make sure to run `ALTER TABLE sessions MODIFY sess_lifetime INTEGER UNSIGNED NOT NULL` to - update your database. - * `PdoSessionHandler` now precalculates the expiry timestamp in the lifetime column, - make sure to run `CREATE INDEX EXPIRY ON sessions (sess_lifetime)` to update your database - to speed up garbage collection of expired sessions. - * added `SessionHandlerFactory` to create session handlers with a DSN - * added `IpUtils::anonymize()` to help with GDPR compliance. - -4.3.0 ------ - - * added PHPUnit constraints: `RequestAttributeValueSame`, `ResponseCookieValueSame`, `ResponseHasCookie`, - `ResponseHasHeader`, `ResponseHeaderSame`, `ResponseIsRedirected`, `ResponseIsSuccessful`, and `ResponseStatusCodeSame` - * deprecated `MimeTypeGuesserInterface` and `ExtensionGuesserInterface` in favor of `Symfony\Component\Mime\MimeTypesInterface`. - * deprecated `MimeType` and `MimeTypeExtensionGuesser` in favor of `Symfony\Component\Mime\MimeTypes`. - * deprecated `FileBinaryMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileBinaryMimeTypeGuesser`. - * deprecated `FileinfoMimeTypeGuesser` in favor of `Symfony\Component\Mime\FileinfoMimeTypeGuesser`. - * added `UrlHelper` that allows to get an absolute URL and a relative path for a given path - -4.2.0 ------ - - * the default value of the "$secure" and "$samesite" arguments of Cookie's constructor - will respectively change from "false" to "null" and from "null" to "lax" in Symfony - 5.0, you should define their values explicitly or use "Cookie::create()" instead. - * added `matchPort()` in RequestMatcher - -4.1.3 ------ - - * [BC BREAK] Support for the IIS-only `X_ORIGINAL_URL` and `X_REWRITE_URL` - HTTP headers has been dropped for security reasons. - -4.1.0 ------ - - * Query string normalization uses `parse_str()` instead of custom parsing logic. - * Passing the file size to the constructor of the `UploadedFile` class is deprecated. - * The `getClientSize()` method of the `UploadedFile` class is deprecated. Use `getSize()` instead. - * added `RedisSessionHandler` to use Redis as a session storage - * The `get()` method of the `AcceptHeader` class now takes into account the - `*` and `*/*` default values (if they are present in the Accept HTTP header) - when looking for items. - * deprecated `Request::getSession()` when no session has been set. Use `Request::hasSession()` instead. - * added `CannotWriteFileException`, `ExtensionFileException`, `FormSizeFileException`, - `IniSizeFileException`, `NoFileException`, `NoTmpDirFileException`, `PartialFileException` to - handle failed `UploadedFile`. - * added `MigratingSessionHandler` for migrating between two session handlers without losing sessions - * added `HeaderUtils`. - -4.0.0 ------ - - * the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` - methods have been removed - * the `Request::HEADER_CLIENT_IP` constant has been removed, use - `Request::HEADER_X_FORWARDED_FOR` instead - * the `Request::HEADER_CLIENT_HOST` constant has been removed, use - `Request::HEADER_X_FORWARDED_HOST` instead - * the `Request::HEADER_CLIENT_PROTO` constant has been removed, use - `Request::HEADER_X_FORWARDED_PROTO` instead - * the `Request::HEADER_CLIENT_PORT` constant has been removed, use - `Request::HEADER_X_FORWARDED_PORT` instead - * checking for cacheable HTTP methods using the `Request::isMethodSafe()` - method (by not passing `false` as its argument) is not supported anymore and - throws a `\BadMethodCallException` - * the `WriteCheckSessionHandler`, `NativeSessionHandler` and `NativeProxy` classes have been removed - * setting session save handlers that do not implement `\SessionHandlerInterface` in - `NativeSessionStorage::setSaveHandler()` is not supported anymore and throws a - `\TypeError` - -3.4.0 ------ - - * implemented PHP 7.0's `SessionUpdateTimestampHandlerInterface` with a new - `AbstractSessionHandler` base class and a new `StrictSessionHandler` wrapper - * deprecated the `WriteCheckSessionHandler`, `NativeSessionHandler` and `NativeProxy` classes - * deprecated setting session save handlers that do not implement `\SessionHandlerInterface` in `NativeSessionStorage::setSaveHandler()` - * deprecated using `MongoDbSessionHandler` with the legacy mongo extension; use it with the mongodb/mongodb package and ext-mongodb instead - * deprecated `MemcacheSessionHandler`; use `MemcachedSessionHandler` instead - -3.3.0 ------ - - * the `Request::setTrustedProxies()` method takes a new `$trustedHeaderSet` argument, - see https://symfony.com/doc/current/deployment/proxies.html for more info, - * deprecated the `Request::setTrustedHeaderName()` and `Request::getTrustedHeaderName()` methods, - * added `File\Stream`, to be passed to `BinaryFileResponse` when the size of the served file is unknown, - disabling `Range` and `Content-Length` handling, switching to chunked encoding instead - * added the `Cookie::fromString()` method that allows to create a cookie from a - raw header string - -3.1.0 ------ - - * Added support for creating `JsonResponse` with a string of JSON data - -3.0.0 ------ - - * The precedence of parameters returned from `Request::get()` changed from "GET, PATH, BODY" to "PATH, GET, BODY" - -2.8.0 ------ - - * Finding deep items in `ParameterBag::get()` is deprecated since version 2.8 and - will be removed in 3.0. - -2.6.0 ------ - - * PdoSessionHandler changes - - implemented different session locking strategies to prevent loss of data by concurrent access to the same session - - [BC BREAK] save session data in a binary column without base64_encode - - [BC BREAK] added lifetime column to the session table which allows to have different lifetimes for each session - - implemented lazy connections that are only opened when a session is used by either passing a dsn string - explicitly or falling back to session.save_path ini setting - - added a createTable method that initializes a correctly defined table depending on the database vendor - -2.5.0 ------ - - * added `JsonResponse::setEncodingOptions()` & `JsonResponse::getEncodingOptions()` for easier manipulation - of the options used while encoding data to JSON format. - -2.4.0 ------ - - * added RequestStack - * added Request::getEncodings() - * added accessors methods to session handlers - -2.3.0 ------ - - * added support for ranges of IPs in trusted proxies - * `UploadedFile::isValid` now returns false if the file was not uploaded via HTTP (in a non-test mode) - * Improved error-handling of `\Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler` - to ensure the supplied PDO handler throws Exceptions on error (as the class expects). Added related test cases - to verify that Exceptions are properly thrown when the PDO queries fail. - -2.2.0 ------ - - * fixed the Request::create() precedence (URI information always take precedence now) - * added Request::getTrustedProxies() - * deprecated Request::isProxyTrusted() - * [BC BREAK] JsonResponse does not turn a top level empty array to an object anymore, use an ArrayObject to enforce objects - * added a IpUtils class to check if an IP belongs to a CIDR - * added Request::getRealMethod() to get the "real" HTTP method (getMethod() returns the "intended" HTTP method) - * disabled _method request parameter support by default (call Request::enableHttpMethodParameterOverride() to - enable it, and Request::getHttpMethodParameterOverride() to check if it is supported) - * Request::splitHttpAcceptHeader() method is deprecated and will be removed in 2.3 - * Deprecated Flashbag::count() and \Countable interface, will be removed in 2.3 - -2.1.0 ------ - - * added Request::getSchemeAndHttpHost() and Request::getUserInfo() - * added a fluent interface to the Response class - * added Request::isProxyTrusted() - * added JsonResponse - * added a getTargetUrl method to RedirectResponse - * added support for streamed responses - * made Response::prepare() method the place to enforce HTTP specification - * [BC BREAK] moved management of the locale from the Session class to the Request class - * added a generic access to the PHP built-in filter mechanism: ParameterBag::filter() - * made FileBinaryMimeTypeGuesser command configurable - * added Request::getUser() and Request::getPassword() - * added support for the PATCH method in Request - * removed the ContentTypeMimeTypeGuesser class as it is deprecated and never used on PHP 5.3 - * added ResponseHeaderBag::makeDisposition() (implements RFC 6266) - * made mimetype to extension conversion configurable - * [BC BREAK] Moved all session related classes and interfaces into own namespace, as - `Symfony\Component\HttpFoundation\Session` and renamed classes accordingly. - Session handlers are located in the subnamespace `Symfony\Component\HttpFoundation\Session\Handler`. - * SessionHandlers must implement `\SessionHandlerInterface` or extend from the - `Symfony\Component\HttpFoundation\Storage\Handler\NativeSessionHandler` base class. - * Added internal storage driver proxy mechanism for forward compatibility with - PHP 5.4 `\SessionHandler` class. - * Added session handlers for custom Memcache, Memcached and Null session save handlers. - * [BC BREAK] Removed `NativeSessionStorage` and replaced with `NativeFileSessionHandler`. - * [BC BREAK] `SessionStorageInterface` methods removed: `write()`, `read()` and - `remove()`. Added `getBag()`, `registerBag()`. The `NativeSessionStorage` class - is a mediator for the session storage internals including the session handlers - which do the real work of participating in the internal PHP session workflow. - * [BC BREAK] Introduced mock implementations of `SessionStorage` to enable unit - and functional testing without starting real PHP sessions. Removed - `ArraySessionStorage`, and replaced with `MockArraySessionStorage` for unit - tests; removed `FilesystemSessionStorage`, and replaced with`MockFileSessionStorage` - for functional tests. These do not interact with global session ini - configuration values, session functions or `$_SESSION` superglobal. This means - they can be configured directly allowing multiple instances to work without - conflicting in the same PHP process. - * [BC BREAK] Removed the `close()` method from the `Session` class, as this is - now redundant. - * Deprecated the following methods from the Session class: `setFlash()`, `setFlashes()` - `getFlash()`, `hasFlash()`, and `removeFlash()`. Use `getFlashBag()` instead - which returns a `FlashBagInterface`. - * `Session->clear()` now only clears session attributes as before it cleared - flash messages and attributes. `Session->getFlashBag()->all()` clears flashes now. - * Session data is now managed by `SessionBagInterface` to better encapsulate - session data. - * Refactored session attribute and flash messages system to their own - `SessionBagInterface` implementations. - * Added `FlashBag`. Flashes expire when retrieved by `get()` or `all()`. This - implementation is ESI compatible. - * Added `AutoExpireFlashBag` (default) to replicate Symfony 2.0.x auto expire - behavior of messages auto expiring after one page page load. Messages must - be retrieved by `get()` or `all()`. - * Added `Symfony\Component\HttpFoundation\Attribute\AttributeBag` to replicate - attributes storage behavior from 2.0.x (default). - * Added `Symfony\Component\HttpFoundation\Attribute\NamespacedAttributeBag` for - namespace session attributes. - * Flash API can stores messages in an array so there may be multiple messages - per flash type. The old `Session` class API remains without BC break as it - will allow single messages as before. - * Added basic session meta-data to the session to record session create time, - last updated time, and the lifetime of the session cookie that was provided - to the client. - * Request::getClientIp() method doesn't take a parameter anymore but bases - itself on the trustProxy parameter. - * Added isMethod() to Request object. - * [BC BREAK] The methods `getPathInfo()`, `getBaseUrl()` and `getBasePath()` of - a `Request` now all return a raw value (vs a urldecoded value before). Any call - to one of these methods must be checked and wrapped in a `rawurldecode()` if - needed. diff --git a/vendor/symfony/http-foundation/Cookie.php b/vendor/symfony/http-foundation/Cookie.php deleted file mode 100644 index 3ff93b9..0000000 --- a/vendor/symfony/http-foundation/Cookie.php +++ /dev/null @@ -1,422 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Represents a cookie. - * - * @author Johannes M. Schmitt <schmittjoh@gmail.com> - */ -class Cookie -{ - public const SAMESITE_NONE = 'none'; - public const SAMESITE_LAX = 'lax'; - public const SAMESITE_STRICT = 'strict'; - - protected $name; - protected $value; - protected $domain; - protected $expire; - protected $path; - protected $secure; - protected $httpOnly; - - private $raw; - private $sameSite; - private $secureDefault = false; - - private const RESERVED_CHARS_LIST = "=,; \t\r\n\v\f"; - private const RESERVED_CHARS_FROM = ['=', ',', ';', ' ', "\t", "\r", "\n", "\v", "\f"]; - private const RESERVED_CHARS_TO = ['%3D', '%2C', '%3B', '%20', '%09', '%0D', '%0A', '%0B', '%0C']; - - /** - * Creates cookie from raw header string. - * - * @return static - */ - public static function fromString(string $cookie, bool $decode = false) - { - $data = [ - 'expires' => 0, - 'path' => '/', - 'domain' => null, - 'secure' => false, - 'httponly' => false, - 'raw' => !$decode, - 'samesite' => null, - ]; - - $parts = HeaderUtils::split($cookie, ';='); - $part = array_shift($parts); - - $name = $decode ? urldecode($part[0]) : $part[0]; - $value = isset($part[1]) ? ($decode ? urldecode($part[1]) : $part[1]) : null; - - $data = HeaderUtils::combine($parts) + $data; - $data['expires'] = self::expiresTimestamp($data['expires']); - - if (isset($data['max-age']) && ($data['max-age'] > 0 || $data['expires'] > time())) { - $data['expires'] = time() + (int) $data['max-age']; - } - - return new static($name, $value, $data['expires'], $data['path'], $data['domain'], $data['secure'], $data['httponly'], $data['raw'], $data['samesite']); - } - - public static function create(string $name, ?string $value = null, $expire = 0, ?string $path = '/', ?string $domain = null, ?bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = self::SAMESITE_LAX): self - { - return new self($name, $value, $expire, $path, $domain, $secure, $httpOnly, $raw, $sameSite); - } - - /** - * @param string $name The name of the cookie - * @param string|null $value The value of the cookie - * @param int|string|\DateTimeInterface $expire The time the cookie expires - * @param string|null $path The path on the server in which the cookie will be available on - * @param string|null $domain The domain that the cookie is available to - * @param bool|null $secure Whether the client should send back the cookie only over HTTPS or null to auto-enable this when the request is already using HTTPS - * @param bool $httpOnly Whether the cookie will be made accessible only through the HTTP protocol - * @param bool $raw Whether the cookie value should be sent with no url encoding - * @param string|null $sameSite Whether the cookie will be available for cross-site requests - * - * @throws \InvalidArgumentException - */ - public function __construct(string $name, ?string $value = null, $expire = 0, ?string $path = '/', ?string $domain = null, ?bool $secure = null, bool $httpOnly = true, bool $raw = false, ?string $sameSite = 'lax') - { - // from PHP source code - if ($raw && false !== strpbrk($name, self::RESERVED_CHARS_LIST)) { - throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $name)); - } - - if (empty($name)) { - throw new \InvalidArgumentException('The cookie name cannot be empty.'); - } - - $this->name = $name; - $this->value = $value; - $this->domain = $domain; - $this->expire = self::expiresTimestamp($expire); - $this->path = empty($path) ? '/' : $path; - $this->secure = $secure; - $this->httpOnly = $httpOnly; - $this->raw = $raw; - $this->sameSite = $this->withSameSite($sameSite)->sameSite; - } - - /** - * Creates a cookie copy with a new value. - * - * @return static - */ - public function withValue(?string $value): self - { - $cookie = clone $this; - $cookie->value = $value; - - return $cookie; - } - - /** - * Creates a cookie copy with a new domain that the cookie is available to. - * - * @return static - */ - public function withDomain(?string $domain): self - { - $cookie = clone $this; - $cookie->domain = $domain; - - return $cookie; - } - - /** - * Creates a cookie copy with a new time the cookie expires. - * - * @param int|string|\DateTimeInterface $expire - * - * @return static - */ - public function withExpires($expire = 0): self - { - $cookie = clone $this; - $cookie->expire = self::expiresTimestamp($expire); - - return $cookie; - } - - /** - * Converts expires formats to a unix timestamp. - * - * @param int|string|\DateTimeInterface $expire - */ - private static function expiresTimestamp($expire = 0): int - { - // convert expiration time to a Unix timestamp - if ($expire instanceof \DateTimeInterface) { - $expire = $expire->format('U'); - } elseif (!is_numeric($expire)) { - $expire = strtotime($expire); - - if (false === $expire) { - throw new \InvalidArgumentException('The cookie expiration time is not valid.'); - } - } - - return 0 < $expire ? (int) $expire : 0; - } - - /** - * Creates a cookie copy with a new path on the server in which the cookie will be available on. - * - * @return static - */ - public function withPath(string $path): self - { - $cookie = clone $this; - $cookie->path = '' === $path ? '/' : $path; - - return $cookie; - } - - /** - * Creates a cookie copy that only be transmitted over a secure HTTPS connection from the client. - * - * @return static - */ - public function withSecure(bool $secure = true): self - { - $cookie = clone $this; - $cookie->secure = $secure; - - return $cookie; - } - - /** - * Creates a cookie copy that be accessible only through the HTTP protocol. - * - * @return static - */ - public function withHttpOnly(bool $httpOnly = true): self - { - $cookie = clone $this; - $cookie->httpOnly = $httpOnly; - - return $cookie; - } - - /** - * Creates a cookie copy that uses no url encoding. - * - * @return static - */ - public function withRaw(bool $raw = true): self - { - if ($raw && false !== strpbrk($this->name, self::RESERVED_CHARS_LIST)) { - throw new \InvalidArgumentException(sprintf('The cookie name "%s" contains invalid characters.', $this->name)); - } - - $cookie = clone $this; - $cookie->raw = $raw; - - return $cookie; - } - - /** - * Creates a cookie copy with SameSite attribute. - * - * @return static - */ - public function withSameSite(?string $sameSite): self - { - if ('' === $sameSite) { - $sameSite = null; - } elseif (null !== $sameSite) { - $sameSite = strtolower($sameSite); - } - - if (!\in_array($sameSite, [self::SAMESITE_LAX, self::SAMESITE_STRICT, self::SAMESITE_NONE, null], true)) { - throw new \InvalidArgumentException('The "sameSite" parameter value is not valid.'); - } - - $cookie = clone $this; - $cookie->sameSite = $sameSite; - - return $cookie; - } - - /** - * Returns the cookie as a string. - * - * @return string - */ - public function __toString() - { - if ($this->isRaw()) { - $str = $this->getName(); - } else { - $str = str_replace(self::RESERVED_CHARS_FROM, self::RESERVED_CHARS_TO, $this->getName()); - } - - $str .= '='; - - if ('' === (string) $this->getValue()) { - $str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; Max-Age=0'; - } else { - $str .= $this->isRaw() ? $this->getValue() : rawurlencode($this->getValue()); - - if (0 !== $this->getExpiresTime()) { - $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()).'; Max-Age='.$this->getMaxAge(); - } - } - - if ($this->getPath()) { - $str .= '; path='.$this->getPath(); - } - - if ($this->getDomain()) { - $str .= '; domain='.$this->getDomain(); - } - - if (true === $this->isSecure()) { - $str .= '; secure'; - } - - if (true === $this->isHttpOnly()) { - $str .= '; httponly'; - } - - if (null !== $this->getSameSite()) { - $str .= '; samesite='.$this->getSameSite(); - } - - return $str; - } - - /** - * Gets the name of the cookie. - * - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Gets the value of the cookie. - * - * @return string|null - */ - public function getValue() - { - return $this->value; - } - - /** - * Gets the domain that the cookie is available to. - * - * @return string|null - */ - public function getDomain() - { - return $this->domain; - } - - /** - * Gets the time the cookie expires. - * - * @return int - */ - public function getExpiresTime() - { - return $this->expire; - } - - /** - * Gets the max-age attribute. - * - * @return int - */ - public function getMaxAge() - { - $maxAge = $this->expire - time(); - - return 0 >= $maxAge ? 0 : $maxAge; - } - - /** - * Gets the path on the server in which the cookie will be available on. - * - * @return string - */ - public function getPath() - { - return $this->path; - } - - /** - * Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client. - * - * @return bool - */ - public function isSecure() - { - return $this->secure ?? $this->secureDefault; - } - - /** - * Checks whether the cookie will be made accessible only through the HTTP protocol. - * - * @return bool - */ - public function isHttpOnly() - { - return $this->httpOnly; - } - - /** - * Whether this cookie is about to be cleared. - * - * @return bool - */ - public function isCleared() - { - return 0 !== $this->expire && $this->expire < time(); - } - - /** - * Checks if the cookie value should be sent with no url encoding. - * - * @return bool - */ - public function isRaw() - { - return $this->raw; - } - - /** - * Gets the SameSite attribute. - * - * @return string|null - */ - public function getSameSite() - { - return $this->sameSite; - } - - /** - * @param bool $default The default value of the "secure" flag when it is set to null - */ - public function setSecureDefault(bool $default): void - { - $this->secureDefault = $default; - } -} diff --git a/vendor/symfony/http-foundation/Exception/BadRequestException.php b/vendor/symfony/http-foundation/Exception/BadRequestException.php deleted file mode 100644 index e4bb309..0000000 --- a/vendor/symfony/http-foundation/Exception/BadRequestException.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a user sends a malformed request. - */ -class BadRequestException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php b/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php deleted file mode 100644 index 5fcf5b4..0000000 --- a/vendor/symfony/http-foundation/Exception/ConflictingHeadersException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * The HTTP request contains headers with conflicting information. - * - * @author Magnus Nordlander <magnus@fervo.se> - */ -class ConflictingHeadersException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/Exception/JsonException.php b/vendor/symfony/http-foundation/Exception/JsonException.php deleted file mode 100644 index 5990e76..0000000 --- a/vendor/symfony/http-foundation/Exception/JsonException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Thrown by Request::toArray() when the content cannot be JSON-decoded. - * - * @author Tobias Nyholm <tobias.nyholm@gmail.com> - */ -final class JsonException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/Exception/RequestExceptionInterface.php b/vendor/symfony/http-foundation/Exception/RequestExceptionInterface.php deleted file mode 100644 index 478d0dc..0000000 --- a/vendor/symfony/http-foundation/Exception/RequestExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Interface for Request exceptions. - * - * Exceptions implementing this interface should trigger an HTTP 400 response in the application code. - */ -interface RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php b/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php deleted file mode 100644 index 80a21bf..0000000 --- a/vendor/symfony/http-foundation/Exception/SessionNotFoundException.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a session does not exist. This happens in the following cases: - * - the session is not enabled - * - attempt to read a session outside a request context (ie. cli script). - * - * @author Jérémy Derussé <jeremy@derusse.com> - */ -class SessionNotFoundException extends \LogicException implements RequestExceptionInterface -{ - public function __construct(string $message = 'There is currently no session available.', int $code = 0, ?\Throwable $previous = null) - { - parent::__construct($message, $code, $previous); - } -} diff --git a/vendor/symfony/http-foundation/Exception/SuspiciousOperationException.php b/vendor/symfony/http-foundation/Exception/SuspiciousOperationException.php deleted file mode 100644 index ae7a5f1..0000000 --- a/vendor/symfony/http-foundation/Exception/SuspiciousOperationException.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Exception; - -/** - * Raised when a user has performed an operation that should be considered - * suspicious from a security perspective. - */ -class SuspiciousOperationException extends \UnexpectedValueException implements RequestExceptionInterface -{ -} diff --git a/vendor/symfony/http-foundation/ExpressionRequestMatcher.php b/vendor/symfony/http-foundation/ExpressionRequestMatcher.php deleted file mode 100644 index 26bed7d..0000000 --- a/vendor/symfony/http-foundation/ExpressionRequestMatcher.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\ExpressionLanguage\ExpressionLanguage; - -/** - * ExpressionRequestMatcher uses an expression to match a Request. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class ExpressionRequestMatcher extends RequestMatcher -{ - private $language; - private $expression; - - public function setExpression(ExpressionLanguage $language, $expression) - { - $this->language = $language; - $this->expression = $expression; - } - - public function matches(Request $request) - { - if (!$this->language) { - throw new \LogicException('Unable to match the request as the expression language is not available.'); - } - - return $this->language->evaluate($this->expression, [ - 'request' => $request, - 'method' => $request->getMethod(), - 'path' => rawurldecode($request->getPathInfo()), - 'host' => $request->getHost(), - 'ip' => $request->getClientIp(), - 'attributes' => $request->attributes->all(), - ]) && parent::matches($request); - } -} diff --git a/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php b/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php deleted file mode 100644 index 136d2a9..0000000 --- a/vendor/symfony/http-foundation/File/Exception/AccessDeniedException.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when the access on a file was denied. - * - * @author Bernhard Schussek <bschussek@gmail.com> - */ -class AccessDeniedException extends FileException -{ - public function __construct(string $path) - { - parent::__construct(sprintf('The file %s could not be accessed', $path)); - } -} diff --git a/vendor/symfony/http-foundation/File/Exception/CannotWriteFileException.php b/vendor/symfony/http-foundation/File/Exception/CannotWriteFileException.php deleted file mode 100644 index c49f53a..0000000 --- a/vendor/symfony/http-foundation/File/Exception/CannotWriteFileException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_CANT_WRITE error occurred with UploadedFile. - * - * @author Florent Mata <florentmata@gmail.com> - */ -class CannotWriteFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/ExtensionFileException.php b/vendor/symfony/http-foundation/File/Exception/ExtensionFileException.php deleted file mode 100644 index ed83499..0000000 --- a/vendor/symfony/http-foundation/File/Exception/ExtensionFileException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_EXTENSION error occurred with UploadedFile. - * - * @author Florent Mata <florentmata@gmail.com> - */ -class ExtensionFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/FileException.php b/vendor/symfony/http-foundation/File/Exception/FileException.php deleted file mode 100644 index fad5133..0000000 --- a/vendor/symfony/http-foundation/File/Exception/FileException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an error occurred in the component File. - * - * @author Bernhard Schussek <bschussek@gmail.com> - */ -class FileException extends \RuntimeException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php b/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php deleted file mode 100644 index 31bdf68..0000000 --- a/vendor/symfony/http-foundation/File/Exception/FileNotFoundException.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when a file was not found. - * - * @author Bernhard Schussek <bschussek@gmail.com> - */ -class FileNotFoundException extends FileException -{ - public function __construct(string $path) - { - parent::__construct(sprintf('The file "%s" does not exist', $path)); - } -} diff --git a/vendor/symfony/http-foundation/File/Exception/FormSizeFileException.php b/vendor/symfony/http-foundation/File/Exception/FormSizeFileException.php deleted file mode 100644 index 8741be0..0000000 --- a/vendor/symfony/http-foundation/File/Exception/FormSizeFileException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_FORM_SIZE error occurred with UploadedFile. - * - * @author Florent Mata <florentmata@gmail.com> - */ -class FormSizeFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/IniSizeFileException.php b/vendor/symfony/http-foundation/File/Exception/IniSizeFileException.php deleted file mode 100644 index c8fde61..0000000 --- a/vendor/symfony/http-foundation/File/Exception/IniSizeFileException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_INI_SIZE error occurred with UploadedFile. - * - * @author Florent Mata <florentmata@gmail.com> - */ -class IniSizeFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/NoFileException.php b/vendor/symfony/http-foundation/File/Exception/NoFileException.php deleted file mode 100644 index 4b48cc7..0000000 --- a/vendor/symfony/http-foundation/File/Exception/NoFileException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_NO_FILE error occurred with UploadedFile. - * - * @author Florent Mata <florentmata@gmail.com> - */ -class NoFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/NoTmpDirFileException.php b/vendor/symfony/http-foundation/File/Exception/NoTmpDirFileException.php deleted file mode 100644 index bdead2d..0000000 --- a/vendor/symfony/http-foundation/File/Exception/NoTmpDirFileException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_NO_TMP_DIR error occurred with UploadedFile. - * - * @author Florent Mata <florentmata@gmail.com> - */ -class NoTmpDirFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/PartialFileException.php b/vendor/symfony/http-foundation/File/Exception/PartialFileException.php deleted file mode 100644 index 4641efb..0000000 --- a/vendor/symfony/http-foundation/File/Exception/PartialFileException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an UPLOAD_ERR_PARTIAL error occurred with UploadedFile. - * - * @author Florent Mata <florentmata@gmail.com> - */ -class PartialFileException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php b/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php deleted file mode 100644 index 8533f99..0000000 --- a/vendor/symfony/http-foundation/File/Exception/UnexpectedTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -class UnexpectedTypeException extends FileException -{ - public function __construct($value, string $expectedType) - { - parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, get_debug_type($value))); - } -} diff --git a/vendor/symfony/http-foundation/File/Exception/UploadException.php b/vendor/symfony/http-foundation/File/Exception/UploadException.php deleted file mode 100644 index 7074e76..0000000 --- a/vendor/symfony/http-foundation/File/Exception/UploadException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File\Exception; - -/** - * Thrown when an error occurred during file upload. - * - * @author Bernhard Schussek <bschussek@gmail.com> - */ -class UploadException extends FileException -{ -} diff --git a/vendor/symfony/http-foundation/File/File.php b/vendor/symfony/http-foundation/File/File.php deleted file mode 100644 index 2deb53d..0000000 --- a/vendor/symfony/http-foundation/File/File.php +++ /dev/null @@ -1,152 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; -use Symfony\Component\Mime\MimeTypes; - -/** - * A file in the file system. - * - * @author Bernhard Schussek <bschussek@gmail.com> - */ -class File extends \SplFileInfo -{ - /** - * Constructs a new file from the given path. - * - * @param string $path The path to the file - * @param bool $checkPath Whether to check the path or not - * - * @throws FileNotFoundException If the given path is not a file - */ - public function __construct(string $path, bool $checkPath = true) - { - if ($checkPath && !is_file($path)) { - throw new FileNotFoundException($path); - } - - parent::__construct($path); - } - - /** - * Returns the extension based on the mime type. - * - * If the mime type is unknown, returns null. - * - * This method uses the mime type as guessed by getMimeType() - * to guess the file extension. - * - * @return string|null - * - * @see MimeTypes - * @see getMimeType() - */ - public function guessExtension() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the extension as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->getExtensions($this->getMimeType())[0] ?? null; - } - - /** - * Returns the mime type of the file. - * - * The mime type is guessed using a MimeTypeGuesserInterface instance, - * which uses finfo_file() then the "file" system binary, - * depending on which of those are available. - * - * @return string|null - * - * @see MimeTypes - */ - public function getMimeType() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the mime type as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->guessMimeType($this->getPathname()); - } - - /** - * Moves the file to a new location. - * - * @return self - * - * @throws FileException if the target file could not be created - */ - public function move(string $directory, ?string $name = null) - { - $target = $this->getTargetFile($directory, $name); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $renamed = rename($this->getPathname(), $target); - } finally { - restore_error_handler(); - } - if (!$renamed) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error))); - } - - @chmod($target, 0666 & ~umask()); - - return $target; - } - - public function getContent(): string - { - $content = file_get_contents($this->getPathname()); - - if (false === $content) { - throw new FileException(sprintf('Could not get the content of the file "%s".', $this->getPathname())); - } - - return $content; - } - - /** - * @return self - */ - protected function getTargetFile(string $directory, ?string $name = null) - { - if (!is_dir($directory)) { - if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) { - throw new FileException(sprintf('Unable to create the "%s" directory.', $directory)); - } - } elseif (!is_writable($directory)) { - throw new FileException(sprintf('Unable to write in the "%s" directory.', $directory)); - } - - $target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name)); - - return new self($target, false); - } - - /** - * Returns locale independent base name of the given path. - * - * @return string - */ - protected function getName(string $name) - { - $originalName = str_replace('\\', '/', $name); - $pos = strrpos($originalName, '/'); - $originalName = false === $pos ? $originalName : substr($originalName, $pos + 1); - - return $originalName; - } -} diff --git a/vendor/symfony/http-foundation/File/Stream.php b/vendor/symfony/http-foundation/File/Stream.php deleted file mode 100644 index cef3e03..0000000 --- a/vendor/symfony/http-foundation/File/Stream.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -/** - * A PHP stream of unknown size. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class Stream extends File -{ - /** - * {@inheritdoc} - * - * @return int|false - */ - #[\ReturnTypeWillChange] - public function getSize() - { - return false; - } -} diff --git a/vendor/symfony/http-foundation/File/UploadedFile.php b/vendor/symfony/http-foundation/File/UploadedFile.php deleted file mode 100644 index 6ff6e51..0000000 --- a/vendor/symfony/http-foundation/File/UploadedFile.php +++ /dev/null @@ -1,290 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\File; - -use Symfony\Component\HttpFoundation\File\Exception\CannotWriteFileException; -use Symfony\Component\HttpFoundation\File\Exception\ExtensionFileException; -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; -use Symfony\Component\HttpFoundation\File\Exception\FormSizeFileException; -use Symfony\Component\HttpFoundation\File\Exception\IniSizeFileException; -use Symfony\Component\HttpFoundation\File\Exception\NoFileException; -use Symfony\Component\HttpFoundation\File\Exception\NoTmpDirFileException; -use Symfony\Component\HttpFoundation\File\Exception\PartialFileException; -use Symfony\Component\Mime\MimeTypes; - -/** - * A file uploaded through a form. - * - * @author Bernhard Schussek <bschussek@gmail.com> - * @author Florian Eckerstorfer <florian@eckerstorfer.org> - * @author Fabien Potencier <fabien@symfony.com> - */ -class UploadedFile extends File -{ - private $test; - private $originalName; - private $mimeType; - private $error; - - /** - * Accepts the information of the uploaded file as provided by the PHP global $_FILES. - * - * The file object is only created when the uploaded file is valid (i.e. when the - * isValid() method returns true). Otherwise the only methods that could be called - * on an UploadedFile instance are: - * - * * getClientOriginalName, - * * getClientMimeType, - * * isValid, - * * getError. - * - * Calling any other method on an non-valid instance will cause an unpredictable result. - * - * @param string $path The full temporary path to the file - * @param string $originalName The original file name of the uploaded file - * @param string|null $mimeType The type of the file as provided by PHP; null defaults to application/octet-stream - * @param int|null $error The error constant of the upload (one of PHP's UPLOAD_ERR_XXX constants); null defaults to UPLOAD_ERR_OK - * @param bool $test Whether the test mode is active - * Local files are used in test mode hence the code should not enforce HTTP uploads - * - * @throws FileException If file_uploads is disabled - * @throws FileNotFoundException If the file does not exist - */ - public function __construct(string $path, string $originalName, ?string $mimeType = null, ?int $error = null, bool $test = false) - { - $this->originalName = $this->getName($originalName); - $this->mimeType = $mimeType ?: 'application/octet-stream'; - $this->error = $error ?: \UPLOAD_ERR_OK; - $this->test = $test; - - parent::__construct($path, \UPLOAD_ERR_OK === $this->error); - } - - /** - * Returns the original file name. - * - * It is extracted from the request from which the file has been uploaded. - * This should not be considered as a safe value to use for a file name on your servers. - * - * @return string - */ - public function getClientOriginalName() - { - return $this->originalName; - } - - /** - * Returns the original file extension. - * - * It is extracted from the original file name that was uploaded. - * This should not be considered as a safe value to use for a file name on your servers. - * - * @return string - */ - public function getClientOriginalExtension() - { - return pathinfo($this->originalName, \PATHINFO_EXTENSION); - } - - /** - * Returns the file mime type. - * - * The client mime type is extracted from the request from which the file - * was uploaded, so it should not be considered as a safe value. - * - * For a trusted mime type, use getMimeType() instead (which guesses the mime - * type based on the file content). - * - * @return string - * - * @see getMimeType() - */ - public function getClientMimeType() - { - return $this->mimeType; - } - - /** - * Returns the extension based on the client mime type. - * - * If the mime type is unknown, returns null. - * - * This method uses the mime type as guessed by getClientMimeType() - * to guess the file extension. As such, the extension returned - * by this method cannot be trusted. - * - * For a trusted extension, use guessExtension() instead (which guesses - * the extension based on the guessed mime type for the file). - * - * @return string|null - * - * @see guessExtension() - * @see getClientMimeType() - */ - public function guessClientExtension() - { - if (!class_exists(MimeTypes::class)) { - throw new \LogicException('You cannot guess the extension as the Mime component is not installed. Try running "composer require symfony/mime".'); - } - - return MimeTypes::getDefault()->getExtensions($this->getClientMimeType())[0] ?? null; - } - - /** - * Returns the upload error. - * - * If the upload was successful, the constant UPLOAD_ERR_OK is returned. - * Otherwise one of the other UPLOAD_ERR_XXX constants is returned. - * - * @return int - */ - public function getError() - { - return $this->error; - } - - /** - * Returns whether the file has been uploaded with HTTP and no error occurred. - * - * @return bool - */ - public function isValid() - { - $isOk = \UPLOAD_ERR_OK === $this->error; - - return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname()); - } - - /** - * Moves the file to a new location. - * - * @return File - * - * @throws FileException if, for any reason, the file could not have been moved - */ - public function move(string $directory, ?string $name = null) - { - if ($this->isValid()) { - if ($this->test) { - return parent::move($directory, $name); - } - - $target = $this->getTargetFile($directory, $name); - - set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); - try { - $moved = move_uploaded_file($this->getPathname(), $target); - } finally { - restore_error_handler(); - } - if (!$moved) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s).', $this->getPathname(), $target, strip_tags($error))); - } - - @chmod($target, 0666 & ~umask()); - - return $target; - } - - switch ($this->error) { - case \UPLOAD_ERR_INI_SIZE: - throw new IniSizeFileException($this->getErrorMessage()); - case \UPLOAD_ERR_FORM_SIZE: - throw new FormSizeFileException($this->getErrorMessage()); - case \UPLOAD_ERR_PARTIAL: - throw new PartialFileException($this->getErrorMessage()); - case \UPLOAD_ERR_NO_FILE: - throw new NoFileException($this->getErrorMessage()); - case \UPLOAD_ERR_CANT_WRITE: - throw new CannotWriteFileException($this->getErrorMessage()); - case \UPLOAD_ERR_NO_TMP_DIR: - throw new NoTmpDirFileException($this->getErrorMessage()); - case \UPLOAD_ERR_EXTENSION: - throw new ExtensionFileException($this->getErrorMessage()); - } - - throw new FileException($this->getErrorMessage()); - } - - /** - * Returns the maximum size of an uploaded file as configured in php.ini. - * - * @return int|float The maximum size of an uploaded file in bytes (returns float if size > PHP_INT_MAX) - */ - public static function getMaxFilesize() - { - $sizePostMax = self::parseFilesize(\ini_get('post_max_size')); - $sizeUploadMax = self::parseFilesize(\ini_get('upload_max_filesize')); - - return min($sizePostMax ?: \PHP_INT_MAX, $sizeUploadMax ?: \PHP_INT_MAX); - } - - /** - * Returns the given size from an ini value in bytes. - * - * @return int|float Returns float if size > PHP_INT_MAX - */ - private static function parseFilesize(string $size) - { - if ('' === $size) { - return 0; - } - - $size = strtolower($size); - - $max = ltrim($size, '+'); - if (str_starts_with($max, '0x')) { - $max = \intval($max, 16); - } elseif (str_starts_with($max, '0')) { - $max = \intval($max, 8); - } else { - $max = (int) $max; - } - - switch (substr($size, -1)) { - case 't': $max *= 1024; - // no break - case 'g': $max *= 1024; - // no break - case 'm': $max *= 1024; - // no break - case 'k': $max *= 1024; - } - - return $max; - } - - /** - * Returns an informative upload error message. - * - * @return string - */ - public function getErrorMessage() - { - static $errors = [ - \UPLOAD_ERR_INI_SIZE => 'The file "%s" exceeds your upload_max_filesize ini directive (limit is %d KiB).', - \UPLOAD_ERR_FORM_SIZE => 'The file "%s" exceeds the upload limit defined in your form.', - \UPLOAD_ERR_PARTIAL => 'The file "%s" was only partially uploaded.', - \UPLOAD_ERR_NO_FILE => 'No file was uploaded.', - \UPLOAD_ERR_CANT_WRITE => 'The file "%s" could not be written on disk.', - \UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.', - \UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.', - ]; - - $errorCode = $this->error; - $maxFilesize = \UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0; - $message = $errors[$errorCode] ?? 'The file "%s" was not uploaded due to an unknown error.'; - - return sprintf($message, $this->getClientOriginalName(), $maxFilesize); - } -} diff --git a/vendor/symfony/http-foundation/FileBag.php b/vendor/symfony/http-foundation/FileBag.php deleted file mode 100644 index ff5ab77..0000000 --- a/vendor/symfony/http-foundation/FileBag.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\File\UploadedFile; - -/** - * FileBag is a container for uploaded files. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Bulat Shakirzyanov <mallluhuct@gmail.com> - */ -class FileBag extends ParameterBag -{ - private const FILE_KEYS = ['error', 'name', 'size', 'tmp_name', 'type']; - - /** - * @param array|UploadedFile[] $parameters An array of HTTP files - */ - public function __construct(array $parameters = []) - { - $this->replace($parameters); - } - - /** - * {@inheritdoc} - */ - public function replace(array $files = []) - { - $this->parameters = []; - $this->add($files); - } - - /** - * {@inheritdoc} - */ - public function set(string $key, $value) - { - if (!\is_array($value) && !$value instanceof UploadedFile) { - throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.'); - } - - parent::set($key, $this->convertFileInformation($value)); - } - - /** - * {@inheritdoc} - */ - public function add(array $files = []) - { - foreach ($files as $key => $file) { - $this->set($key, $file); - } - } - - /** - * Converts uploaded files to UploadedFile instances. - * - * @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information - * - * @return UploadedFile[]|UploadedFile|null - */ - protected function convertFileInformation($file) - { - if ($file instanceof UploadedFile) { - return $file; - } - - $file = $this->fixPhpFilesArray($file); - $keys = array_keys($file); - sort($keys); - - if (self::FILE_KEYS == $keys) { - if (\UPLOAD_ERR_NO_FILE == $file['error']) { - $file = null; - } else { - $file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['error'], false); - } - } else { - $file = array_map(function ($v) { return $v instanceof UploadedFile || \is_array($v) ? $this->convertFileInformation($v) : $v; }, $file); - if (array_keys($keys) === $keys) { - $file = array_filter($file); - } - } - - return $file; - } - - /** - * Fixes a malformed PHP $_FILES array. - * - * PHP has a bug that the format of the $_FILES array differs, depending on - * whether the uploaded file fields had normal field names or array-like - * field names ("normal" vs. "parent[child]"). - * - * This method fixes the array to look like the "normal" $_FILES array. - * - * It's safe to pass an already converted array, in which case this method - * just returns the original array unmodified. - * - * @return array - */ - protected function fixPhpFilesArray(array $data) - { - // Remove extra key added by PHP 8.1. - unset($data['full_path']); - $keys = array_keys($data); - sort($keys); - - if (self::FILE_KEYS != $keys || !isset($data['name']) || !\is_array($data['name'])) { - return $data; - } - - $files = $data; - foreach (self::FILE_KEYS as $k) { - unset($files[$k]); - } - - foreach ($data['name'] as $key => $name) { - $files[$key] = $this->fixPhpFilesArray([ - 'error' => $data['error'][$key], - 'name' => $name, - 'type' => $data['type'][$key], - 'tmp_name' => $data['tmp_name'][$key], - 'size' => $data['size'][$key], - ]); - } - - return $files; - } -} diff --git a/vendor/symfony/http-foundation/HeaderBag.php b/vendor/symfony/http-foundation/HeaderBag.php deleted file mode 100644 index 43d5f63..0000000 --- a/vendor/symfony/http-foundation/HeaderBag.php +++ /dev/null @@ -1,295 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * HeaderBag is a container for HTTP headers. - * - * @author Fabien Potencier <fabien@symfony.com> - * - * @implements \IteratorAggregate<string, list<string|null>> - */ -class HeaderBag implements \IteratorAggregate, \Countable -{ - protected const UPPER = '_ABCDEFGHIJKLMNOPQRSTUVWXYZ'; - protected const LOWER = '-abcdefghijklmnopqrstuvwxyz'; - - /** - * @var array<string, list<string|null>> - */ - protected $headers = []; - protected $cacheControl = []; - - public function __construct(array $headers = []) - { - foreach ($headers as $key => $values) { - $this->set($key, $values); - } - } - - /** - * Returns the headers as a string. - * - * @return string - */ - public function __toString() - { - if (!$headers = $this->all()) { - return ''; - } - - ksort($headers); - $max = max(array_map('strlen', array_keys($headers))) + 1; - $content = ''; - foreach ($headers as $name => $values) { - $name = ucwords($name, '-'); - foreach ($values as $value) { - $content .= sprintf("%-{$max}s %s\r\n", $name.':', $value); - } - } - - return $content; - } - - /** - * Returns the headers. - * - * @param string|null $key The name of the headers to return or null to get them all - * - * @return array<string, array<int, string|null>>|array<int, string|null> - */ - public function all(?string $key = null) - { - if (null !== $key) { - return $this->headers[strtr($key, self::UPPER, self::LOWER)] ?? []; - } - - return $this->headers; - } - - /** - * Returns the parameter keys. - * - * @return string[] - */ - public function keys() - { - return array_keys($this->all()); - } - - /** - * Replaces the current HTTP headers by a new set. - */ - public function replace(array $headers = []) - { - $this->headers = []; - $this->add($headers); - } - - /** - * Adds new headers the current HTTP headers set. - */ - public function add(array $headers) - { - foreach ($headers as $key => $values) { - $this->set($key, $values); - } - } - - /** - * Returns the first header by name or the default one. - * - * @return string|null - */ - public function get(string $key, ?string $default = null) - { - $headers = $this->all($key); - - if (!$headers) { - return $default; - } - - if (null === $headers[0]) { - return null; - } - - return (string) $headers[0]; - } - - /** - * Sets a header by name. - * - * @param string|string[]|null $values The value or an array of values - * @param bool $replace Whether to replace the actual value or not (true by default) - */ - public function set(string $key, $values, bool $replace = true) - { - $key = strtr($key, self::UPPER, self::LOWER); - - if (\is_array($values)) { - $values = array_values($values); - - if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = $values; - } else { - $this->headers[$key] = array_merge($this->headers[$key], $values); - } - } else { - if (true === $replace || !isset($this->headers[$key])) { - $this->headers[$key] = [$values]; - } else { - $this->headers[$key][] = $values; - } - } - - if ('cache-control' === $key) { - $this->cacheControl = $this->parseCacheControl(implode(', ', $this->headers[$key])); - } - } - - /** - * Returns true if the HTTP header is defined. - * - * @return bool - */ - public function has(string $key) - { - return \array_key_exists(strtr($key, self::UPPER, self::LOWER), $this->all()); - } - - /** - * Returns true if the given HTTP header contains the given value. - * - * @return bool - */ - public function contains(string $key, string $value) - { - return \in_array($value, $this->all($key)); - } - - /** - * Removes a header. - */ - public function remove(string $key) - { - $key = strtr($key, self::UPPER, self::LOWER); - - unset($this->headers[$key]); - - if ('cache-control' === $key) { - $this->cacheControl = []; - } - } - - /** - * Returns the HTTP header value converted to a date. - * - * @return \DateTimeInterface|null - * - * @throws \RuntimeException When the HTTP header is not parseable - */ - public function getDate(string $key, ?\DateTime $default = null) - { - if (null === $value = $this->get($key)) { - return $default; - } - - if (false === $date = \DateTime::createFromFormat(\DATE_RFC2822, $value)) { - throw new \RuntimeException(sprintf('The "%s" HTTP header is not parseable (%s).', $key, $value)); - } - - return $date; - } - - /** - * Adds a custom Cache-Control directive. - * - * @param bool|string $value The Cache-Control directive value - */ - public function addCacheControlDirective(string $key, $value = true) - { - $this->cacheControl[$key] = $value; - - $this->set('Cache-Control', $this->getCacheControlHeader()); - } - - /** - * Returns true if the Cache-Control directive is defined. - * - * @return bool - */ - public function hasCacheControlDirective(string $key) - { - return \array_key_exists($key, $this->cacheControl); - } - - /** - * Returns a Cache-Control directive value by name. - * - * @return bool|string|null - */ - public function getCacheControlDirective(string $key) - { - return $this->cacheControl[$key] ?? null; - } - - /** - * Removes a Cache-Control directive. - */ - public function removeCacheControlDirective(string $key) - { - unset($this->cacheControl[$key]); - - $this->set('Cache-Control', $this->getCacheControlHeader()); - } - - /** - * Returns an iterator for headers. - * - * @return \ArrayIterator<string, list<string|null>> - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->headers); - } - - /** - * Returns the number of headers. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->headers); - } - - protected function getCacheControlHeader() - { - ksort($this->cacheControl); - - return HeaderUtils::toString($this->cacheControl, ','); - } - - /** - * Parses a Cache-Control HTTP header. - * - * @return array - */ - protected function parseCacheControl(string $header) - { - $parts = HeaderUtils::split($header, ',='); - - return HeaderUtils::combine($parts); - } -} diff --git a/vendor/symfony/http-foundation/HeaderUtils.php b/vendor/symfony/http-foundation/HeaderUtils.php deleted file mode 100644 index 3456eda..0000000 --- a/vendor/symfony/http-foundation/HeaderUtils.php +++ /dev/null @@ -1,294 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * HTTP header utility functions. - * - * @author Christian Schmidt <github@chsc.dk> - */ -class HeaderUtils -{ - public const DISPOSITION_ATTACHMENT = 'attachment'; - public const DISPOSITION_INLINE = 'inline'; - - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Splits an HTTP header by one or more separators. - * - * Example: - * - * HeaderUtils::split('da, en-gb;q=0.8', ',;') - * // => ['da'], ['en-gb', 'q=0.8']] - * - * @param string $separators List of characters to split on, ordered by - * precedence, e.g. ',', ';=', or ',;=' - * - * @return array Nested array with as many levels as there are characters in - * $separators - */ - public static function split(string $header, string $separators): array - { - if ('' === $separators) { - throw new \InvalidArgumentException('At least one separator must be specified.'); - } - - $quotedSeparators = preg_quote($separators, '/'); - - preg_match_all(' - / - (?!\s) - (?: - # quoted-string - "(?:[^"\\\\]|\\\\.)*(?:"|\\\\|$) - | - # token - [^"'.$quotedSeparators.']+ - )+ - (?<!\s) - | - # separator - \s* - (?<separator>['.$quotedSeparators.']) - \s* - /x', trim($header), $matches, \PREG_SET_ORDER); - - return self::groupParts($matches, $separators); - } - - /** - * Combines an array of arrays into one associative array. - * - * Each of the nested arrays should have one or two elements. The first - * value will be used as the keys in the associative array, and the second - * will be used as the values, or true if the nested array only contains one - * element. Array keys are lowercased. - * - * Example: - * - * HeaderUtils::combine([['foo', 'abc'], ['bar']]) - * // => ['foo' => 'abc', 'bar' => true] - */ - public static function combine(array $parts): array - { - $assoc = []; - foreach ($parts as $part) { - $name = strtolower($part[0]); - $value = $part[1] ?? true; - $assoc[$name] = $value; - } - - return $assoc; - } - - /** - * Joins an associative array into a string for use in an HTTP header. - * - * The key and value of each entry are joined with '=', and all entries - * are joined with the specified separator and an additional space (for - * readability). Values are quoted if necessary. - * - * Example: - * - * HeaderUtils::toString(['foo' => 'abc', 'bar' => true, 'baz' => 'a b c'], ',') - * // => 'foo=abc, bar, baz="a b c"' - */ - public static function toString(array $assoc, string $separator): string - { - $parts = []; - foreach ($assoc as $name => $value) { - if (true === $value) { - $parts[] = $name; - } else { - $parts[] = $name.'='.self::quote($value); - } - } - - return implode($separator.' ', $parts); - } - - /** - * Encodes a string as a quoted string, if necessary. - * - * If a string contains characters not allowed by the "token" construct in - * the HTTP specification, it is backslash-escaped and enclosed in quotes - * to match the "quoted-string" construct. - */ - public static function quote(string $s): string - { - if (preg_match('/^[a-z0-9!#$%&\'*.^_`|~-]+$/i', $s)) { - return $s; - } - - return '"'.addcslashes($s, '"\\"').'"'; - } - - /** - * Decodes a quoted string. - * - * If passed an unquoted string that matches the "token" construct (as - * defined in the HTTP specification), it is passed through verbatim. - */ - public static function unquote(string $s): string - { - return preg_replace('/\\\\(.)|"/', '$1', $s); - } - - /** - * Generates an HTTP Content-Disposition field-value. - * - * @param string $disposition One of "inline" or "attachment" - * @param string $filename A unicode string - * @param string $filenameFallback A string containing only ASCII characters that - * is semantically equivalent to $filename. If the filename is already ASCII, - * it can be omitted, or just copied from $filename - * - * @throws \InvalidArgumentException - * - * @see RFC 6266 - */ - public static function makeDisposition(string $disposition, string $filename, string $filenameFallback = ''): string - { - if (!\in_array($disposition, [self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE])) { - throw new \InvalidArgumentException(sprintf('The disposition must be either "%s" or "%s".', self::DISPOSITION_ATTACHMENT, self::DISPOSITION_INLINE)); - } - - if ('' === $filenameFallback) { - $filenameFallback = $filename; - } - - // filenameFallback is not ASCII. - if (!preg_match('/^[\x20-\x7e]*$/', $filenameFallback)) { - throw new \InvalidArgumentException('The filename fallback must only contain ASCII characters.'); - } - - // percent characters aren't safe in fallback. - if (str_contains($filenameFallback, '%')) { - throw new \InvalidArgumentException('The filename fallback cannot contain the "%" character.'); - } - - // path separators aren't allowed in either. - if (str_contains($filename, '/') || str_contains($filename, '\\') || str_contains($filenameFallback, '/') || str_contains($filenameFallback, '\\')) { - throw new \InvalidArgumentException('The filename and the fallback cannot contain the "/" and "\\" characters.'); - } - - $params = ['filename' => $filenameFallback]; - if ($filename !== $filenameFallback) { - $params['filename*'] = "utf-8''".rawurlencode($filename); - } - - return $disposition.'; '.self::toString($params, ';'); - } - - /** - * Like parse_str(), but preserves dots in variable names. - */ - public static function parseQuery(string $query, bool $ignoreBrackets = false, string $separator = '&'): array - { - $q = []; - - foreach (explode($separator, $query) as $v) { - if (false !== $i = strpos($v, "\0")) { - $v = substr($v, 0, $i); - } - - if (false === $i = strpos($v, '=')) { - $k = urldecode($v); - $v = ''; - } else { - $k = urldecode(substr($v, 0, $i)); - $v = substr($v, $i); - } - - if (false !== $i = strpos($k, "\0")) { - $k = substr($k, 0, $i); - } - - $k = ltrim($k, ' '); - - if ($ignoreBrackets) { - $q[$k][] = urldecode(substr($v, 1)); - - continue; - } - - if (false === $i = strpos($k, '[')) { - $q[] = bin2hex($k).$v; - } else { - $q[] = bin2hex(substr($k, 0, $i)).rawurlencode(substr($k, $i)).$v; - } - } - - if ($ignoreBrackets) { - return $q; - } - - parse_str(implode('&', $q), $q); - - $query = []; - - foreach ($q as $k => $v) { - if (false !== $i = strpos($k, '_')) { - $query[substr_replace($k, hex2bin(substr($k, 0, $i)).'[', 0, 1 + $i)] = $v; - } else { - $query[hex2bin($k)] = $v; - } - } - - return $query; - } - - private static function groupParts(array $matches, string $separators, bool $first = true): array - { - $separator = $separators[0]; - $separators = substr($separators, 1) ?: ''; - $i = 0; - - if ('' === $separators && !$first) { - $parts = ['']; - - foreach ($matches as $match) { - if (!$i && isset($match['separator'])) { - $i = 1; - $parts[1] = ''; - } else { - $parts[$i] .= self::unquote($match[0]); - } - } - - return $parts; - } - - $parts = []; - $partMatches = []; - - foreach ($matches as $match) { - if (($match['separator'] ?? null) === $separator) { - ++$i; - } else { - $partMatches[$i][] = $match; - } - } - - foreach ($partMatches as $matches) { - $parts[] = '' === $separators ? self::unquote($matches[0][0]) : self::groupParts($matches, $separators, false); - } - - return $parts; - } -} diff --git a/vendor/symfony/http-foundation/InputBag.php b/vendor/symfony/http-foundation/InputBag.php deleted file mode 100644 index 356fbbc..0000000 --- a/vendor/symfony/http-foundation/InputBag.php +++ /dev/null @@ -1,113 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\BadRequestException; - -/** - * InputBag is a container for user input values such as $_GET, $_POST, $_REQUEST, and $_COOKIE. - * - * @author Saif Eddin Gmati <azjezz@protonmail.com> - */ -final class InputBag extends ParameterBag -{ - /** - * Returns a scalar input value by name. - * - * @param string|int|float|bool|null $default The default value if the input key does not exist - * - * @return string|int|float|bool|null - */ - public function get(string $key, $default = null) - { - if (null !== $default && !\is_scalar($default) && !(\is_object($default) && method_exists($default, '__toString'))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Passing a non-scalar value as 2nd argument to "%s()" is deprecated, pass a scalar or null instead.', __METHOD__); - } - - $value = parent::get($key, $this); - - if (null !== $value && $this !== $value && !\is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Retrieving a non-scalar value from "%s()" is deprecated, and will throw a "%s" exception in Symfony 6.0, use "%s::all($key)" instead.', __METHOD__, BadRequestException::class, __CLASS__); - } - - return $this === $value ? $default : $value; - } - - /** - * {@inheritdoc} - */ - public function all(?string $key = null): array - { - return parent::all($key); - } - - /** - * Replaces the current input values by a new set. - */ - public function replace(array $inputs = []) - { - $this->parameters = []; - $this->add($inputs); - } - - /** - * Adds input values. - */ - public function add(array $inputs = []) - { - foreach ($inputs as $input => $value) { - $this->set($input, $value); - } - } - - /** - * Sets an input by name. - * - * @param string|int|float|bool|array|null $value - */ - public function set(string $key, $value) - { - if (null !== $value && !\is_scalar($value) && !\is_array($value) && !method_exists($value, '__toString')) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Passing "%s" as a 2nd Argument to "%s()" is deprecated, pass a scalar, array, or null instead.', get_debug_type($value), __METHOD__); - } - - $this->parameters[$key] = $value; - } - - /** - * {@inheritdoc} - */ - public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = []) - { - $value = $this->has($key) ? $this->all()[$key] : $default; - - // Always turn $options into an array - this allows filter_var option shortcuts. - if (!\is_array($options) && $options) { - $options = ['flags' => $options]; - } - - if (\is_array($value) && !(($options['flags'] ?? 0) & (\FILTER_REQUIRE_ARRAY | \FILTER_FORCE_ARRAY))) { - trigger_deprecation('symfony/http-foundation', '5.1', 'Filtering an array value with "%s()" without passing the FILTER_REQUIRE_ARRAY or FILTER_FORCE_ARRAY flag is deprecated', __METHOD__); - - if (!isset($options['flags'])) { - $options['flags'] = \FILTER_REQUIRE_ARRAY; - } - } - - if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) { - trigger_deprecation('symfony/http-foundation', '5.2', 'Not passing a Closure together with FILTER_CALLBACK to "%s()" is deprecated. Wrap your filter in a closure instead.', __METHOD__); - // throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null))); - } - - return filter_var($value, $filter, $options); - } -} diff --git a/vendor/symfony/http-foundation/IpUtils.php b/vendor/symfony/http-foundation/IpUtils.php deleted file mode 100644 index 49d9a9d..0000000 --- a/vendor/symfony/http-foundation/IpUtils.php +++ /dev/null @@ -1,216 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Http utility functions. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class IpUtils -{ - private static $checkedIps = []; - - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Checks if an IPv4 or IPv6 address is contained in the list of given IPs or subnets. - * - * @param string|array $ips List of IPs or subnets (can be a string if only a single one) - * - * @return bool - */ - public static function checkIp(?string $requestIp, $ips) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - if (!\is_array($ips)) { - $ips = [$ips]; - } - - $method = substr_count($requestIp, ':') > 1 ? 'checkIp6' : 'checkIp4'; - - foreach ($ips as $ip) { - if (self::$method($requestIp, $ip)) { - return true; - } - } - - return false; - } - - /** - * Compares two IPv4 addresses. - * In case a subnet is given, it checks if it contains the request IP. - * - * @param string $ip IPv4 address or subnet in CIDR notation - * - * @return bool Whether the request IP matches the IP, or whether the request IP is within the CIDR subnet - */ - public static function checkIp4(?string $requestIp, string $ip) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - $cacheKey = $requestIp.'-'.$ip.'-v4'; - if (isset(self::$checkedIps[$cacheKey])) { - return self::$checkedIps[$cacheKey]; - } - - if (!filter_var($requestIp, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) { - return self::$checkedIps[$cacheKey] = false; - } - - if (str_contains($ip, '/')) { - [$address, $netmask] = explode('/', $ip, 2); - - if ('0' === $netmask) { - return self::$checkedIps[$cacheKey] = false !== filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4); - } - - if ($netmask < 0 || $netmask > 32) { - return self::$checkedIps[$cacheKey] = false; - } - } else { - $address = $ip; - $netmask = 32; - } - - if (false === ip2long($address)) { - return self::$checkedIps[$cacheKey] = false; - } - - return self::$checkedIps[$cacheKey] = 0 === substr_compare(sprintf('%032b', ip2long($requestIp)), sprintf('%032b', ip2long($address)), 0, $netmask); - } - - /** - * Compares two IPv6 addresses. - * In case a subnet is given, it checks if it contains the request IP. - * - * @author David Soria Parra <dsp at php dot net> - * - * @see https://github.com/dsp/v6tools - * - * @param string $ip IPv6 address or subnet in CIDR notation - * - * @return bool - * - * @throws \RuntimeException When IPV6 support is not enabled - */ - public static function checkIp6(?string $requestIp, string $ip) - { - if (null === $requestIp) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Passing null as $requestIp to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - return false; - } - - $cacheKey = $requestIp.'-'.$ip.'-v6'; - if (isset(self::$checkedIps[$cacheKey])) { - return self::$checkedIps[$cacheKey]; - } - - if (!((\extension_loaded('sockets') && \defined('AF_INET6')) || @inet_pton('::1'))) { - throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".'); - } - - // Check to see if we were given a IP4 $requestIp or $ip by mistake - if (!filter_var($requestIp, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - return self::$checkedIps[$cacheKey] = false; - } - - if (str_contains($ip, '/')) { - [$address, $netmask] = explode('/', $ip, 2); - - if (!filter_var($address, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - return self::$checkedIps[$cacheKey] = false; - } - - if ('0' === $netmask) { - return (bool) unpack('n*', @inet_pton($address)); - } - - if ($netmask < 1 || $netmask > 128) { - return self::$checkedIps[$cacheKey] = false; - } - } else { - if (!filter_var($ip, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) { - return self::$checkedIps[$cacheKey] = false; - } - - $address = $ip; - $netmask = 128; - } - - $bytesAddr = unpack('n*', @inet_pton($address)); - $bytesTest = unpack('n*', @inet_pton($requestIp)); - - if (!$bytesAddr || !$bytesTest) { - return self::$checkedIps[$cacheKey] = false; - } - - for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) { - $left = $netmask - 16 * ($i - 1); - $left = ($left <= 16) ? $left : 16; - $mask = ~(0xFFFF >> $left) & 0xFFFF; - if (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) { - return self::$checkedIps[$cacheKey] = false; - } - } - - return self::$checkedIps[$cacheKey] = true; - } - - /** - * Anonymizes an IP/IPv6. - * - * Removes the last byte for v4 and the last 8 bytes for v6 IPs - */ - public static function anonymize(string $ip): string - { - $wrappedIPv6 = false; - if ('[' === substr($ip, 0, 1) && ']' === substr($ip, -1, 1)) { - $wrappedIPv6 = true; - $ip = substr($ip, 1, -1); - } - - $packedAddress = inet_pton($ip); - if (4 === \strlen($packedAddress)) { - $mask = '255.255.255.0'; - } elseif ($ip === inet_ntop($packedAddress & inet_pton('::ffff:ffff:ffff'))) { - $mask = '::ffff:ffff:ff00'; - } elseif ($ip === inet_ntop($packedAddress & inet_pton('::ffff:ffff'))) { - $mask = '::ffff:ff00'; - } else { - $mask = 'ffff:ffff:ffff:ffff:0000:0000:0000:0000'; - } - $ip = inet_ntop($packedAddress & inet_pton($mask)); - - if ($wrappedIPv6) { - $ip = '['.$ip.']'; - } - - return $ip; - } -} diff --git a/vendor/symfony/http-foundation/JsonResponse.php b/vendor/symfony/http-foundation/JsonResponse.php deleted file mode 100644 index 51bdf19..0000000 --- a/vendor/symfony/http-foundation/JsonResponse.php +++ /dev/null @@ -1,221 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * Response represents an HTTP response in JSON format. - * - * Note that this class does not force the returned JSON content to be an - * object. It is however recommended that you do return an object as it - * protects yourself against XSSI and JSON-JavaScript Hijacking. - * - * @see https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/AJAX_Security_Cheat_Sheet.md#always-return-json-with-an-object-on-the-outside - * - * @author Igor Wiedler <igor@wiedler.ch> - */ -class JsonResponse extends Response -{ - protected $data; - protected $callback; - - // Encode <, >, ', &, and " characters in the JSON, making it also safe to be embedded into HTML. - // 15 === JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT - public const DEFAULT_ENCODING_OPTIONS = 15; - - protected $encodingOptions = self::DEFAULT_ENCODING_OPTIONS; - - /** - * @param mixed $data The response data - * @param int $status The response status code - * @param array $headers An array of response headers - * @param bool $json If the data is already a JSON string - */ - public function __construct($data = null, int $status = 200, array $headers = [], bool $json = false) - { - parent::__construct('', $status, $headers); - - if ($json && !\is_string($data) && !is_numeric($data) && !\is_callable([$data, '__toString'])) { - throw new \TypeError(sprintf('"%s": If $json is set to true, argument $data must be a string or object implementing __toString(), "%s" given.', __METHOD__, get_debug_type($data))); - } - - if (null === $data) { - $data = new \ArrayObject(); - } - - $json ? $this->setJson($data) : $this->setData($data); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return JsonResponse::create(['key' => 'value']) - * ->setSharedMaxAge(300); - * - * @param mixed $data The JSON response data - * @param int $status The response status code - * @param array $headers An array of response headers - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($data = null, int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($data, $status, $headers); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return JsonResponse::fromJsonString('{"key": "value"}') - * ->setSharedMaxAge(300); - * - * @param string $data The JSON response string - * @param int $status The response status code - * @param array $headers An array of response headers - * - * @return static - */ - public static function fromJsonString(string $data, int $status = 200, array $headers = []) - { - return new static($data, $status, $headers, true); - } - - /** - * Sets the JSONP callback. - * - * @param string|null $callback The JSONP callback or null to use none - * - * @return $this - * - * @throws \InvalidArgumentException When the callback name is not valid - */ - public function setCallback(?string $callback = null) - { - if (null !== $callback) { - // partially taken from https://geekality.net/2011/08/03/valid-javascript-identifier/ - // partially taken from https://github.com/willdurand/JsonpCallbackValidator - // JsonpCallbackValidator is released under the MIT License. See https://github.com/willdurand/JsonpCallbackValidator/blob/v1.1.0/LICENSE for details. - // (c) William Durand <william.durand1@gmail.com> - $pattern = '/^[$_\p{L}][$_\p{L}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\x{200C}\x{200D}]*(?:\[(?:"(?:\\\.|[^"\\\])*"|\'(?:\\\.|[^\'\\\])*\'|\d+)\])*?$/u'; - $reserved = [ - 'break', 'do', 'instanceof', 'typeof', 'case', 'else', 'new', 'var', 'catch', 'finally', 'return', 'void', 'continue', 'for', 'switch', 'while', - 'debugger', 'function', 'this', 'with', 'default', 'if', 'throw', 'delete', 'in', 'try', 'class', 'enum', 'extends', 'super', 'const', 'export', - 'import', 'implements', 'let', 'private', 'public', 'yield', 'interface', 'package', 'protected', 'static', 'null', 'true', 'false', - ]; - $parts = explode('.', $callback); - foreach ($parts as $part) { - if (!preg_match($pattern, $part) || \in_array($part, $reserved, true)) { - throw new \InvalidArgumentException('The callback name is not valid.'); - } - } - } - - $this->callback = $callback; - - return $this->update(); - } - - /** - * Sets a raw string containing a JSON document to be sent. - * - * @return $this - */ - public function setJson(string $json) - { - $this->data = $json; - - return $this->update(); - } - - /** - * Sets the data to be sent as JSON. - * - * @param mixed $data - * - * @return $this - * - * @throws \InvalidArgumentException - */ - public function setData($data = []) - { - try { - $data = json_encode($data, $this->encodingOptions); - } catch (\Exception $e) { - if ('Exception' === \get_class($e) && str_starts_with($e->getMessage(), 'Failed calling ')) { - throw $e->getPrevious() ?: $e; - } - throw $e; - } - - if (\PHP_VERSION_ID >= 70300 && (\JSON_THROW_ON_ERROR & $this->encodingOptions)) { - return $this->setJson($data); - } - - if (\JSON_ERROR_NONE !== json_last_error()) { - throw new \InvalidArgumentException(json_last_error_msg()); - } - - return $this->setJson($data); - } - - /** - * Returns options used while encoding data to JSON. - * - * @return int - */ - public function getEncodingOptions() - { - return $this->encodingOptions; - } - - /** - * Sets options used while encoding data to JSON. - * - * @return $this - */ - public function setEncodingOptions(int $encodingOptions) - { - $this->encodingOptions = $encodingOptions; - - return $this->setData(json_decode($this->data)); - } - - /** - * Updates the content and headers according to the JSON data and callback. - * - * @return $this - */ - protected function update() - { - if (null !== $this->callback) { - // Not using application/javascript for compatibility reasons with older browsers. - $this->headers->set('Content-Type', 'text/javascript'); - - return $this->setContent(sprintf('/**/%s(%s);', $this->callback, $this->data)); - } - - // Only set the header when there is none or when it equals 'text/javascript' (from a previous update with callback) - // in order to not overwrite a custom definition. - if (!$this->headers->has('Content-Type') || 'text/javascript' === $this->headers->get('Content-Type')) { - $this->headers->set('Content-Type', 'application/json'); - } - - return $this->setContent($this->data); - } -} diff --git a/vendor/symfony/http-foundation/LICENSE b/vendor/symfony/http-foundation/LICENSE deleted file mode 100644 index 0138f8f..0000000 --- a/vendor/symfony/http-foundation/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php deleted file mode 100644 index b542292..0000000 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ /dev/null @@ -1,228 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\BadRequestException; - -/** - * ParameterBag is a container for key/value pairs. - * - * @author Fabien Potencier <fabien@symfony.com> - * - * @implements \IteratorAggregate<string, mixed> - */ -class ParameterBag implements \IteratorAggregate, \Countable -{ - /** - * Parameter storage. - */ - protected $parameters; - - public function __construct(array $parameters = []) - { - $this->parameters = $parameters; - } - - /** - * Returns the parameters. - * - * @param string|null $key The name of the parameter to return or null to get them all - * - * @return array - */ - public function all(/* ?string $key = null */) - { - $key = \func_num_args() > 0 ? func_get_arg(0) : null; - - if (null === $key) { - return $this->parameters; - } - - if (!\is_array($value = $this->parameters[$key] ?? [])) { - throw new BadRequestException(sprintf('Unexpected value for parameter "%s": expecting "array", got "%s".', $key, get_debug_type($value))); - } - - return $value; - } - - /** - * Returns the parameter keys. - * - * @return array - */ - public function keys() - { - return array_keys($this->parameters); - } - - /** - * Replaces the current parameters by a new set. - */ - public function replace(array $parameters = []) - { - $this->parameters = $parameters; - } - - /** - * Adds parameters. - */ - public function add(array $parameters = []) - { - $this->parameters = array_replace($this->parameters, $parameters); - } - - /** - * Returns a parameter by name. - * - * @param mixed $default The default value if the parameter key does not exist - * - * @return mixed - */ - public function get(string $key, $default = null) - { - return \array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; - } - - /** - * Sets a parameter by name. - * - * @param mixed $value The value - */ - public function set(string $key, $value) - { - $this->parameters[$key] = $value; - } - - /** - * Returns true if the parameter is defined. - * - * @return bool - */ - public function has(string $key) - { - return \array_key_exists($key, $this->parameters); - } - - /** - * Removes a parameter. - */ - public function remove(string $key) - { - unset($this->parameters[$key]); - } - - /** - * Returns the alphabetic characters of the parameter value. - * - * @return string - */ - public function getAlpha(string $key, string $default = '') - { - return preg_replace('/[^[:alpha:]]/', '', $this->get($key, $default)); - } - - /** - * Returns the alphabetic characters and digits of the parameter value. - * - * @return string - */ - public function getAlnum(string $key, string $default = '') - { - return preg_replace('/[^[:alnum:]]/', '', $this->get($key, $default)); - } - - /** - * Returns the digits of the parameter value. - * - * @return string - */ - public function getDigits(string $key, string $default = '') - { - // we need to remove - and + because they're allowed in the filter - return str_replace(['-', '+'], '', $this->filter($key, $default, \FILTER_SANITIZE_NUMBER_INT)); - } - - /** - * Returns the parameter value converted to integer. - * - * @return int - */ - public function getInt(string $key, int $default = 0) - { - return (int) $this->get($key, $default); - } - - /** - * Returns the parameter value converted to boolean. - * - * @return bool - */ - public function getBoolean(string $key, bool $default = false) - { - return $this->filter($key, $default, \FILTER_VALIDATE_BOOLEAN); - } - - /** - * Filter key. - * - * @param mixed $default Default = null - * @param int $filter FILTER_* constant - * @param mixed $options Filter options - * - * @see https://php.net/filter-var - * - * @return mixed - */ - public function filter(string $key, $default = null, int $filter = \FILTER_DEFAULT, $options = []) - { - $value = $this->get($key, $default); - - // Always turn $options into an array - this allows filter_var option shortcuts. - if (!\is_array($options) && $options) { - $options = ['flags' => $options]; - } - - // Add a convenience check for arrays. - if (\is_array($value) && !isset($options['flags'])) { - $options['flags'] = \FILTER_REQUIRE_ARRAY; - } - - if ((\FILTER_CALLBACK & $filter) && !(($options['options'] ?? null) instanceof \Closure)) { - trigger_deprecation('symfony/http-foundation', '5.2', 'Not passing a Closure together with FILTER_CALLBACK to "%s()" is deprecated. Wrap your filter in a closure instead.', __METHOD__); - // throw new \InvalidArgumentException(sprintf('A Closure must be passed to "%s()" when FILTER_CALLBACK is used, "%s" given.', __METHOD__, get_debug_type($options['options'] ?? null))); - } - - return filter_var($value, $filter, $options); - } - - /** - * Returns an iterator for parameters. - * - * @return \ArrayIterator<string, mixed> - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->parameters); - } - - /** - * Returns the number of parameters. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->parameters); - } -} diff --git a/vendor/symfony/http-foundation/README.md b/vendor/symfony/http-foundation/README.md deleted file mode 100644 index 424f2c4..0000000 --- a/vendor/symfony/http-foundation/README.md +++ /dev/null @@ -1,28 +0,0 @@ -HttpFoundation Component -======================== - -The HttpFoundation component defines an object-oriented layer for the HTTP -specification. - -Sponsor -------- - -The HttpFoundation component for Symfony 5.4/6.0 is [backed][1] by [Laravel][2]. - -Laravel is a PHP web development framework that is passionate about maximum developer -happiness. Laravel is built using a variety of bespoke and Symfony based components. - -Help Symfony by [sponsoring][3] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/http_foundation.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://laravel.com/ -[3]: https://symfony.com/sponsor diff --git a/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php b/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php deleted file mode 100644 index a6dd993..0000000 --- a/vendor/symfony/http-foundation/RateLimiter/AbstractRequestRateLimiter.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\RateLimiter; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\RateLimiter\LimiterInterface; -use Symfony\Component\RateLimiter\Policy\NoLimiter; -use Symfony\Component\RateLimiter\RateLimit; - -/** - * An implementation of RequestRateLimiterInterface that - * fits most use-cases. - * - * @author Wouter de Jong <wouter@wouterj.nl> - */ -abstract class AbstractRequestRateLimiter implements RequestRateLimiterInterface -{ - public function consume(Request $request): RateLimit - { - $limiters = $this->getLimiters($request); - if (0 === \count($limiters)) { - $limiters = [new NoLimiter()]; - } - - $minimalRateLimit = null; - foreach ($limiters as $limiter) { - $rateLimit = $limiter->consume(1); - - $minimalRateLimit = $minimalRateLimit ? self::getMinimalRateLimit($minimalRateLimit, $rateLimit) : $rateLimit; - } - - return $minimalRateLimit; - } - - public function reset(Request $request): void - { - foreach ($this->getLimiters($request) as $limiter) { - $limiter->reset(); - } - } - - /** - * @return LimiterInterface[] a set of limiters using keys extracted from the request - */ - abstract protected function getLimiters(Request $request): array; - - private static function getMinimalRateLimit(RateLimit $first, RateLimit $second): RateLimit - { - if ($first->isAccepted() !== $second->isAccepted()) { - return $first->isAccepted() ? $second : $first; - } - - $firstRemainingTokens = $first->getRemainingTokens(); - $secondRemainingTokens = $second->getRemainingTokens(); - - if ($firstRemainingTokens === $secondRemainingTokens) { - return $first->getRetryAfter() < $second->getRetryAfter() ? $second : $first; - } - - return $firstRemainingTokens > $secondRemainingTokens ? $second : $first; - } -} diff --git a/vendor/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php b/vendor/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php deleted file mode 100644 index 4c87a40..0000000 --- a/vendor/symfony/http-foundation/RateLimiter/RequestRateLimiterInterface.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\RateLimiter; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\RateLimiter\RateLimit; - -/** - * A special type of limiter that deals with requests. - * - * This allows to limit on different types of information - * from the requests. - * - * @author Wouter de Jong <wouter@wouterj.nl> - */ -interface RequestRateLimiterInterface -{ - public function consume(Request $request): RateLimit; - - public function reset(Request $request): void; -} diff --git a/vendor/symfony/http-foundation/RedirectResponse.php b/vendor/symfony/http-foundation/RedirectResponse.php deleted file mode 100644 index 2103280..0000000 --- a/vendor/symfony/http-foundation/RedirectResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RedirectResponse represents an HTTP response doing a redirect. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class RedirectResponse extends Response -{ - protected $targetUrl; - - /** - * Creates a redirect response so that it conforms to the rules defined for a redirect status code. - * - * @param string $url The URL to redirect to. The URL should be a full URL, with schema etc., - * but practically every browser redirects on paths only as well - * @param int $status The status code (302 by default) - * @param array $headers The headers (Location is always set to the given URL) - * - * @throws \InvalidArgumentException - * - * @see https://tools.ietf.org/html/rfc2616#section-10.3 - */ - public function __construct(string $url, int $status = 302, array $headers = []) - { - parent::__construct('', $status, $headers); - - $this->setTargetUrl($url); - - if (!$this->isRedirect()) { - throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status)); - } - - if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) { - $this->headers->remove('cache-control'); - } - } - - /** - * Factory method for chainability. - * - * @param string $url The URL to redirect to - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($url = '', int $status = 302, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($url, $status, $headers); - } - - /** - * Returns the target URL. - * - * @return string - */ - public function getTargetUrl() - { - return $this->targetUrl; - } - - /** - * Sets the redirect target of this response. - * - * @return $this - * - * @throws \InvalidArgumentException - */ - public function setTargetUrl(string $url) - { - if ('' === $url) { - throw new \InvalidArgumentException('Cannot redirect to an empty URL.'); - } - - $this->targetUrl = $url; - - $this->setContent( - sprintf('<!DOCTYPE html> -<html> - <head> - <meta charset="UTF-8" /> - <meta http-equiv="refresh" content="0;url=\'%1$s\'" /> - - <title>Redirecting to %1$s</title> - </head> - <body> - Redirecting to <a href="%1$s">%1$s</a>. - </body> -</html>', htmlspecialchars($url, \ENT_QUOTES, 'UTF-8'))); - - $this->headers->set('Location', $url); - - return $this; - } -} diff --git a/vendor/symfony/http-foundation/Request.php b/vendor/symfony/http-foundation/Request.php deleted file mode 100644 index 75db030..0000000 --- a/vendor/symfony/http-foundation/Request.php +++ /dev/null @@ -1,2172 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException; -use Symfony\Component\HttpFoundation\Exception\JsonException; -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(AcceptHeader::class); -class_exists(FileBag::class); -class_exists(HeaderBag::class); -class_exists(HeaderUtils::class); -class_exists(InputBag::class); -class_exists(ParameterBag::class); -class_exists(ServerBag::class); - -/** - * Request represents an HTTP request. - * - * The methods dealing with URL accept / return a raw path (% encoded): - * * getBasePath - * * getBaseUrl - * * getPathInfo - * * getRequestUri - * * getUri - * * getUriForPath - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class Request -{ - public const HEADER_FORWARDED = 0b000001; // When using RFC 7239 - public const HEADER_X_FORWARDED_FOR = 0b000010; - public const HEADER_X_FORWARDED_HOST = 0b000100; - public const HEADER_X_FORWARDED_PROTO = 0b001000; - public const HEADER_X_FORWARDED_PORT = 0b010000; - public const HEADER_X_FORWARDED_PREFIX = 0b100000; - - /** @deprecated since Symfony 5.2, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead. */ - public const HEADER_X_FORWARDED_ALL = 0b1011110; // All "X-Forwarded-*" headers sent by "usual" reverse proxy - public const HEADER_X_FORWARDED_AWS_ELB = 0b0011010; // AWS ELB doesn't send X-Forwarded-Host - public const HEADER_X_FORWARDED_TRAEFIK = 0b0111110; // All "X-Forwarded-*" headers sent by Traefik reverse proxy - - public const METHOD_HEAD = 'HEAD'; - public const METHOD_GET = 'GET'; - public const METHOD_POST = 'POST'; - public const METHOD_PUT = 'PUT'; - public const METHOD_PATCH = 'PATCH'; - public const METHOD_DELETE = 'DELETE'; - public const METHOD_PURGE = 'PURGE'; - public const METHOD_OPTIONS = 'OPTIONS'; - public const METHOD_TRACE = 'TRACE'; - public const METHOD_CONNECT = 'CONNECT'; - - /** - * @var string[] - */ - protected static $trustedProxies = []; - - /** - * @var string[] - */ - protected static $trustedHostPatterns = []; - - /** - * @var string[] - */ - protected static $trustedHosts = []; - - protected static $httpMethodParameterOverride = false; - - /** - * Custom parameters. - * - * @var ParameterBag - */ - public $attributes; - - /** - * Request body parameters ($_POST). - * - * @var InputBag - */ - public $request; - - /** - * Query string parameters ($_GET). - * - * @var InputBag - */ - public $query; - - /** - * Server and execution environment parameters ($_SERVER). - * - * @var ServerBag - */ - public $server; - - /** - * Uploaded files ($_FILES). - * - * @var FileBag - */ - public $files; - - /** - * Cookies ($_COOKIE). - * - * @var InputBag - */ - public $cookies; - - /** - * Headers (taken from the $_SERVER). - * - * @var HeaderBag - */ - public $headers; - - /** - * @var string|resource|false|null - */ - protected $content; - - /** - * @var array - */ - protected $languages; - - /** - * @var array - */ - protected $charsets; - - /** - * @var array - */ - protected $encodings; - - /** - * @var array - */ - protected $acceptableContentTypes; - - /** - * @var string - */ - protected $pathInfo; - - /** - * @var string - */ - protected $requestUri; - - /** - * @var string - */ - protected $baseUrl; - - /** - * @var string - */ - protected $basePath; - - /** - * @var string - */ - protected $method; - - /** - * @var string - */ - protected $format; - - /** - * @var SessionInterface|callable(): SessionInterface - */ - protected $session; - - /** - * @var string|null - */ - protected $locale; - - /** - * @var string - */ - protected $defaultLocale = 'en'; - - /** - * @var array - */ - protected static $formats; - - protected static $requestFactory; - - /** - * @var string|null - */ - private $preferredFormat; - private $isHostValid = true; - private $isForwardedValid = true; - - /** - * @var bool|null - */ - private $isSafeContentPreferred; - - private static $trustedHeaderSet = -1; - - private const FORWARDED_PARAMS = [ - self::HEADER_X_FORWARDED_FOR => 'for', - self::HEADER_X_FORWARDED_HOST => 'host', - self::HEADER_X_FORWARDED_PROTO => 'proto', - self::HEADER_X_FORWARDED_PORT => 'host', - ]; - - /** - * Names for headers that can be trusted when - * using trusted proxies. - * - * The FORWARDED header is the standard as of rfc7239. - * - * The other headers are non-standard, but widely used - * by popular reverse proxies (like Apache mod_proxy or Amazon EC2). - */ - private const TRUSTED_HEADERS = [ - self::HEADER_FORWARDED => 'FORWARDED', - self::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR', - self::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST', - self::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO', - self::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT', - self::HEADER_X_FORWARDED_PREFIX => 'X_FORWARDED_PREFIX', - ]; - - /** @var bool */ - private $isIisRewrite = false; - - /** - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string|resource|null $content The raw body data - */ - public function __construct(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $this->initialize($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Sets the parameters for this request. - * - * This method also re-initializes all properties. - * - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters - * @param string|resource|null $content The raw body data - */ - public function initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $this->request = new InputBag($request); - $this->query = new InputBag($query); - $this->attributes = new ParameterBag($attributes); - $this->cookies = new InputBag($cookies); - $this->files = new FileBag($files); - $this->server = new ServerBag($server); - $this->headers = new HeaderBag($this->server->getHeaders()); - - $this->content = $content; - $this->languages = null; - $this->charsets = null; - $this->encodings = null; - $this->acceptableContentTypes = null; - $this->pathInfo = null; - $this->requestUri = null; - $this->baseUrl = null; - $this->basePath = null; - $this->method = null; - $this->format = null; - } - - /** - * Creates a new request with values from PHP's super globals. - * - * @return static - */ - public static function createFromGlobals() - { - $request = self::createRequestFromFactory($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER); - - if (str_starts_with($request->headers->get('CONTENT_TYPE', ''), 'application/x-www-form-urlencoded') - && \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH']) - ) { - parse_str($request->getContent(), $data); - $request->request = new InputBag($data); - } - - return $request; - } - - /** - * Creates a Request based on a given URI and configuration. - * - * The information contained in the URI always take precedence - * over the other information (server and parameters). - * - * @param string $uri The URI - * @param string $method The HTTP method - * @param array $parameters The query (GET) or request (POST) parameters - * @param array $cookies The request cookies ($_COOKIE) - * @param array $files The request files ($_FILES) - * @param array $server The server parameters ($_SERVER) - * @param string|resource|null $content The raw body data - * - * @return static - */ - public static function create(string $uri, string $method = 'GET', array $parameters = [], array $cookies = [], array $files = [], array $server = [], $content = null) - { - $server = array_replace([ - 'SERVER_NAME' => 'localhost', - 'SERVER_PORT' => 80, - 'HTTP_HOST' => 'localhost', - 'HTTP_USER_AGENT' => 'Symfony', - 'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', - 'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5', - 'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', - 'REMOTE_ADDR' => '127.0.0.1', - 'SCRIPT_NAME' => '', - 'SCRIPT_FILENAME' => '', - 'SERVER_PROTOCOL' => 'HTTP/1.1', - 'REQUEST_TIME' => time(), - 'REQUEST_TIME_FLOAT' => microtime(true), - ], $server); - - $server['PATH_INFO'] = ''; - $server['REQUEST_METHOD'] = strtoupper($method); - - $components = parse_url($uri); - if (isset($components['host'])) { - $server['SERVER_NAME'] = $components['host']; - $server['HTTP_HOST'] = $components['host']; - } - - if (isset($components['scheme'])) { - if ('https' === $components['scheme']) { - $server['HTTPS'] = 'on'; - $server['SERVER_PORT'] = 443; - } else { - unset($server['HTTPS']); - $server['SERVER_PORT'] = 80; - } - } - - if (isset($components['port'])) { - $server['SERVER_PORT'] = $components['port']; - $server['HTTP_HOST'] .= ':'.$components['port']; - } - - if (isset($components['user'])) { - $server['PHP_AUTH_USER'] = $components['user']; - } - - if (isset($components['pass'])) { - $server['PHP_AUTH_PW'] = $components['pass']; - } - - if (!isset($components['path'])) { - $components['path'] = '/'; - } - - switch (strtoupper($method)) { - case 'POST': - case 'PUT': - case 'DELETE': - if (!isset($server['CONTENT_TYPE'])) { - $server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; - } - // no break - case 'PATCH': - $request = $parameters; - $query = []; - break; - default: - $request = []; - $query = $parameters; - break; - } - - $queryString = ''; - if (isset($components['query'])) { - parse_str(html_entity_decode($components['query']), $qs); - - if ($query) { - $query = array_replace($qs, $query); - $queryString = http_build_query($query, '', '&'); - } else { - $query = $qs; - $queryString = $components['query']; - } - } elseif ($query) { - $queryString = http_build_query($query, '', '&'); - } - - $server['REQUEST_URI'] = $components['path'].('' !== $queryString ? '?'.$queryString : ''); - $server['QUERY_STRING'] = $queryString; - - return self::createRequestFromFactory($query, $request, [], $cookies, $files, $server, $content); - } - - /** - * Sets a callable able to create a Request instance. - * - * This is mainly useful when you need to override the Request class - * to keep BC with an existing system. It should not be used for any - * other purpose. - */ - public static function setFactory(?callable $callable) - { - self::$requestFactory = $callable; - } - - /** - * Clones a request and overrides some of its parameters. - * - * @param array|null $query The GET parameters - * @param array|null $request The POST parameters - * @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array|null $cookies The COOKIE parameters - * @param array|null $files The FILES parameters - * @param array|null $server The SERVER parameters - * - * @return static - */ - public function duplicate(?array $query = null, ?array $request = null, ?array $attributes = null, ?array $cookies = null, ?array $files = null, ?array $server = null) - { - $dup = clone $this; - if (null !== $query) { - $dup->query = new InputBag($query); - } - if (null !== $request) { - $dup->request = new InputBag($request); - } - if (null !== $attributes) { - $dup->attributes = new ParameterBag($attributes); - } - if (null !== $cookies) { - $dup->cookies = new InputBag($cookies); - } - if (null !== $files) { - $dup->files = new FileBag($files); - } - if (null !== $server) { - $dup->server = new ServerBag($server); - $dup->headers = new HeaderBag($dup->server->getHeaders()); - } - $dup->languages = null; - $dup->charsets = null; - $dup->encodings = null; - $dup->acceptableContentTypes = null; - $dup->pathInfo = null; - $dup->requestUri = null; - $dup->baseUrl = null; - $dup->basePath = null; - $dup->method = null; - $dup->format = null; - - if (!$dup->get('_format') && $this->get('_format')) { - $dup->attributes->set('_format', $this->get('_format')); - } - - if (!$dup->getRequestFormat(null)) { - $dup->setRequestFormat($this->getRequestFormat(null)); - } - - return $dup; - } - - /** - * Clones the current request. - * - * Note that the session is not cloned as duplicated requests - * are most of the time sub-requests of the main one. - */ - public function __clone() - { - $this->query = clone $this->query; - $this->request = clone $this->request; - $this->attributes = clone $this->attributes; - $this->cookies = clone $this->cookies; - $this->files = clone $this->files; - $this->server = clone $this->server; - $this->headers = clone $this->headers; - } - - /** - * Returns the request as a string. - * - * @return string - */ - public function __toString() - { - $content = $this->getContent(); - - $cookieHeader = ''; - $cookies = []; - - foreach ($this->cookies as $k => $v) { - $cookies[] = \is_array($v) ? http_build_query([$k => $v], '', '; ', \PHP_QUERY_RFC3986) : "$k=$v"; - } - - if ($cookies) { - $cookieHeader = 'Cookie: '.implode('; ', $cookies)."\r\n"; - } - - return - sprintf('%s %s %s', $this->getMethod(), $this->getRequestUri(), $this->server->get('SERVER_PROTOCOL'))."\r\n". - $this->headers. - $cookieHeader."\r\n". - $content; - } - - /** - * Overrides the PHP global variables according to this request instance. - * - * It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. - * $_FILES is never overridden, see rfc1867 - */ - public function overrideGlobals() - { - $this->server->set('QUERY_STRING', static::normalizeQueryString(http_build_query($this->query->all(), '', '&'))); - - $_GET = $this->query->all(); - $_POST = $this->request->all(); - $_SERVER = $this->server->all(); - $_COOKIE = $this->cookies->all(); - - foreach ($this->headers->all() as $key => $value) { - $key = strtoupper(str_replace('-', '_', $key)); - if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) { - $_SERVER[$key] = implode(', ', $value); - } else { - $_SERVER['HTTP_'.$key] = implode(', ', $value); - } - } - - $request = ['g' => $_GET, 'p' => $_POST, 'c' => $_COOKIE]; - - $requestOrder = \ini_get('request_order') ?: \ini_get('variables_order'); - $requestOrder = preg_replace('#[^cgp]#', '', strtolower($requestOrder)) ?: 'gp'; - - $_REQUEST = [[]]; - - foreach (str_split($requestOrder) as $order) { - $_REQUEST[] = $request[$order]; - } - - $_REQUEST = array_merge(...$_REQUEST); - } - - /** - * Sets a list of trusted proxies. - * - * You should only list the reverse proxies that you manage directly. - * - * @param array $proxies A list of trusted proxies, the string 'REMOTE_ADDR' will be replaced with $_SERVER['REMOTE_ADDR'] - * @param int $trustedHeaderSet A bit field of Request::HEADER_*, to set which headers to trust from your proxies - */ - public static function setTrustedProxies(array $proxies, int $trustedHeaderSet) - { - if (self::HEADER_X_FORWARDED_ALL === $trustedHeaderSet) { - trigger_deprecation('symfony/http-foundation', '5.2', 'The "HEADER_X_FORWARDED_ALL" constant is deprecated, use either "HEADER_X_FORWARDED_FOR | HEADER_X_FORWARDED_HOST | HEADER_X_FORWARDED_PORT | HEADER_X_FORWARDED_PROTO" or "HEADER_X_FORWARDED_AWS_ELB" or "HEADER_X_FORWARDED_TRAEFIK" constants instead.'); - } - self::$trustedProxies = array_reduce($proxies, function ($proxies, $proxy) { - if ('REMOTE_ADDR' !== $proxy) { - $proxies[] = $proxy; - } elseif (isset($_SERVER['REMOTE_ADDR'])) { - $proxies[] = $_SERVER['REMOTE_ADDR']; - } - - return $proxies; - }, []); - self::$trustedHeaderSet = $trustedHeaderSet; - } - - /** - * Gets the list of trusted proxies. - * - * @return array - */ - public static function getTrustedProxies() - { - return self::$trustedProxies; - } - - /** - * Gets the set of trusted headers from trusted proxies. - * - * @return int A bit field of Request::HEADER_* that defines which headers are trusted from your proxies - */ - public static function getTrustedHeaderSet() - { - return self::$trustedHeaderSet; - } - - /** - * Sets a list of trusted host patterns. - * - * You should only list the hosts you manage using regexs. - * - * @param array $hostPatterns A list of trusted host patterns - */ - public static function setTrustedHosts(array $hostPatterns) - { - self::$trustedHostPatterns = array_map(function ($hostPattern) { - return sprintf('{%s}i', $hostPattern); - }, $hostPatterns); - // we need to reset trusted hosts on trusted host patterns change - self::$trustedHosts = []; - } - - /** - * Gets the list of trusted host patterns. - * - * @return array - */ - public static function getTrustedHosts() - { - return self::$trustedHostPatterns; - } - - /** - * Normalizes a query string. - * - * It builds a normalized query string, where keys/value pairs are alphabetized, - * have consistent escaping and unneeded delimiters are removed. - * - * @return string - */ - public static function normalizeQueryString(?string $qs) - { - if ('' === ($qs ?? '')) { - return ''; - } - - $qs = HeaderUtils::parseQuery($qs); - ksort($qs); - - return http_build_query($qs, '', '&', \PHP_QUERY_RFC3986); - } - - /** - * Enables support for the _method request parameter to determine the intended HTTP method. - * - * Be warned that enabling this feature might lead to CSRF issues in your code. - * Check that you are using CSRF tokens when required. - * If the HTTP method parameter override is enabled, an html-form with method "POST" can be altered - * and used to send a "PUT" or "DELETE" request via the _method request parameter. - * If these methods are not protected against CSRF, this presents a possible vulnerability. - * - * The HTTP method can only be overridden when the real HTTP method is POST. - */ - public static function enableHttpMethodParameterOverride() - { - self::$httpMethodParameterOverride = true; - } - - /** - * Checks whether support for the _method request parameter is enabled. - * - * @return bool - */ - public static function getHttpMethodParameterOverride() - { - return self::$httpMethodParameterOverride; - } - - /** - * Gets a "parameter" value from any bag. - * - * This method is mainly useful for libraries that want to provide some flexibility. If you don't need the - * flexibility in controllers, it is better to explicitly get request parameters from the appropriate - * public property instead (attributes, query, request). - * - * Order of precedence: PATH (routing placeholders or custom attributes), GET, POST - * - * @param mixed $default The default value if the parameter key does not exist - * - * @return mixed - * - * @internal since Symfony 5.4, use explicit input sources instead - */ - public function get(string $key, $default = null) - { - if ($this !== $result = $this->attributes->get($key, $this)) { - return $result; - } - - if ($this->query->has($key)) { - return $this->query->all()[$key]; - } - - if ($this->request->has($key)) { - return $this->request->all()[$key]; - } - - return $default; - } - - /** - * Gets the Session. - * - * @return SessionInterface - */ - public function getSession() - { - $session = $this->session; - if (!$session instanceof SessionInterface && null !== $session) { - $this->setSession($session = $session()); - } - - if (null === $session) { - throw new SessionNotFoundException('Session has not been set.'); - } - - return $session; - } - - /** - * Whether the request contains a Session which was started in one of the - * previous requests. - * - * @return bool - */ - public function hasPreviousSession() - { - // the check for $this->session avoids malicious users trying to fake a session cookie with proper name - return $this->hasSession() && $this->cookies->has($this->getSession()->getName()); - } - - /** - * Whether the request contains a Session object. - * - * This method does not give any information about the state of the session object, - * like whether the session is started or not. It is just a way to check if this Request - * is associated with a Session instance. - * - * @param bool $skipIfUninitialized When true, ignores factories injected by `setSessionFactory` - * - * @return bool - */ - public function hasSession(/* bool $skipIfUninitialized = false */) - { - $skipIfUninitialized = \func_num_args() > 0 ? func_get_arg(0) : false; - - return null !== $this->session && (!$skipIfUninitialized || $this->session instanceof SessionInterface); - } - - public function setSession(SessionInterface $session) - { - $this->session = $session; - } - - /** - * @internal - * - * @param callable(): SessionInterface $factory - */ - public function setSessionFactory(callable $factory) - { - $this->session = $factory; - } - - /** - * Returns the client IP addresses. - * - * In the returned array the most trusted IP address is first, and the - * least trusted one last. The "real" client IP address is the last one, - * but this is also the least trusted one. Trusted proxies are stripped. - * - * Use this method carefully; you should use getClientIp() instead. - * - * @return array - * - * @see getClientIp() - */ - public function getClientIps() - { - $ip = $this->server->get('REMOTE_ADDR'); - - if (!$this->isFromTrustedProxy()) { - return [$ip]; - } - - return $this->getTrustedValues(self::HEADER_X_FORWARDED_FOR, $ip) ?: [$ip]; - } - - /** - * Returns the client IP address. - * - * This method can read the client IP address from the "X-Forwarded-For" header - * when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" - * header value is a comma+space separated list of IP addresses, the left-most - * being the original client, and each successive proxy that passed the request - * adding the IP address where it received the request from. - * - * If your reverse proxy uses a different header name than "X-Forwarded-For", - * ("Client-Ip" for instance), configure it via the $trustedHeaderSet - * argument of the Request::setTrustedProxies() method instead. - * - * @return string|null - * - * @see getClientIps() - * @see https://wikipedia.org/wiki/X-Forwarded-For - */ - public function getClientIp() - { - $ipAddresses = $this->getClientIps(); - - return $ipAddresses[0]; - } - - /** - * Returns current script name. - * - * @return string - */ - public function getScriptName() - { - return $this->server->get('SCRIPT_NAME', $this->server->get('ORIG_SCRIPT_NAME', '')); - } - - /** - * Returns the path being requested relative to the executed script. - * - * The path info always starts with a /. - * - * Suppose this request is instantiated from /mysite on localhost: - * - * * http://localhost/mysite returns an empty string - * * http://localhost/mysite/about returns '/about' - * * http://localhost/mysite/enco%20ded returns '/enco%20ded' - * * http://localhost/mysite/about?var=1 returns '/about' - * - * @return string The raw path (i.e. not urldecoded) - */ - public function getPathInfo() - { - if (null === $this->pathInfo) { - $this->pathInfo = $this->preparePathInfo(); - } - - return $this->pathInfo; - } - - /** - * Returns the root path from which this request is executed. - * - * Suppose that an index.php file instantiates this request object: - * - * * http://localhost/index.php returns an empty string - * * http://localhost/index.php/page returns an empty string - * * http://localhost/web/index.php returns '/web' - * * http://localhost/we%20b/index.php returns '/we%20b' - * - * @return string The raw path (i.e. not urldecoded) - */ - public function getBasePath() - { - if (null === $this->basePath) { - $this->basePath = $this->prepareBasePath(); - } - - return $this->basePath; - } - - /** - * Returns the root URL from which this request is executed. - * - * The base URL never ends with a /. - * - * This is similar to getBasePath(), except that it also includes the - * script filename (e.g. index.php) if one exists. - * - * @return string The raw URL (i.e. not urldecoded) - */ - public function getBaseUrl() - { - $trustedPrefix = ''; - - // the proxy prefix must be prepended to any prefix being needed at the webserver level - if ($this->isFromTrustedProxy() && $trustedPrefixValues = $this->getTrustedValues(self::HEADER_X_FORWARDED_PREFIX)) { - $trustedPrefix = rtrim($trustedPrefixValues[0], '/'); - } - - return $trustedPrefix.$this->getBaseUrlReal(); - } - - /** - * Returns the real base URL received by the webserver from which this request is executed. - * The URL does not include trusted reverse proxy prefix. - * - * @return string The raw URL (i.e. not urldecoded) - */ - private function getBaseUrlReal(): string - { - if (null === $this->baseUrl) { - $this->baseUrl = $this->prepareBaseUrl(); - } - - return $this->baseUrl; - } - - /** - * Gets the request's scheme. - * - * @return string - */ - public function getScheme() - { - return $this->isSecure() ? 'https' : 'http'; - } - - /** - * Returns the port on which the request is made. - * - * This method can read the client port from the "X-Forwarded-Port" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Port" header must contain the client port. - * - * @return int|string|null Can be a string if fetched from the server bag - */ - public function getPort() - { - if ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_PORT)) { - $host = $host[0]; - } elseif ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_HOST)) { - $host = $host[0]; - } elseif (!$host = $this->headers->get('HOST')) { - return $this->server->get('SERVER_PORT'); - } - - if ('[' === $host[0]) { - $pos = strpos($host, ':', strrpos($host, ']')); - } else { - $pos = strrpos($host, ':'); - } - - if (false !== $pos && $port = substr($host, $pos + 1)) { - return (int) $port; - } - - return 'https' === $this->getScheme() ? 443 : 80; - } - - /** - * Returns the user. - * - * @return string|null - */ - public function getUser() - { - return $this->headers->get('PHP_AUTH_USER'); - } - - /** - * Returns the password. - * - * @return string|null - */ - public function getPassword() - { - return $this->headers->get('PHP_AUTH_PW'); - } - - /** - * Gets the user info. - * - * @return string|null A user name if any and, optionally, scheme-specific information about how to gain authorization to access the server - */ - public function getUserInfo() - { - $userinfo = $this->getUser(); - - $pass = $this->getPassword(); - if ('' != $pass) { - $userinfo .= ":$pass"; - } - - return $userinfo; - } - - /** - * Returns the HTTP host being requested. - * - * The port name will be appended to the host if it's non-standard. - * - * @return string - */ - public function getHttpHost() - { - $scheme = $this->getScheme(); - $port = $this->getPort(); - - if (('http' == $scheme && 80 == $port) || ('https' == $scheme && 443 == $port)) { - return $this->getHost(); - } - - return $this->getHost().':'.$port; - } - - /** - * Returns the requested URI (path and query string). - * - * @return string The raw URI (i.e. not URI decoded) - */ - public function getRequestUri() - { - if (null === $this->requestUri) { - $this->requestUri = $this->prepareRequestUri(); - } - - return $this->requestUri; - } - - /** - * Gets the scheme and HTTP host. - * - * If the URL was called with basic authentication, the user - * and the password are not added to the generated string. - * - * @return string - */ - public function getSchemeAndHttpHost() - { - return $this->getScheme().'://'.$this->getHttpHost(); - } - - /** - * Generates a normalized URI (URL) for the Request. - * - * @return string - * - * @see getQueryString() - */ - public function getUri() - { - if (null !== $qs = $this->getQueryString()) { - $qs = '?'.$qs; - } - - return $this->getSchemeAndHttpHost().$this->getBaseUrl().$this->getPathInfo().$qs; - } - - /** - * Generates a normalized URI for the given path. - * - * @param string $path A path to use instead of the current one - * - * @return string - */ - public function getUriForPath(string $path) - { - return $this->getSchemeAndHttpHost().$this->getBaseUrl().$path; - } - - /** - * Returns the path as relative reference from the current Request path. - * - * Only the URIs path component (no schema, host etc.) is relevant and must be given. - * Both paths must be absolute and not contain relative parts. - * Relative URLs from one resource to another are useful when generating self-contained downloadable document archives. - * Furthermore, they can be used to reduce the link size in documents. - * - * Example target paths, given a base path of "/a/b/c/d": - * - "/a/b/c/d" -> "" - * - "/a/b/c/" -> "./" - * - "/a/b/" -> "../" - * - "/a/b/c/other" -> "other" - * - "/a/x/y" -> "../../x/y" - * - * @return string - */ - public function getRelativeUriForPath(string $path) - { - // be sure that we are dealing with an absolute path - if (!isset($path[0]) || '/' !== $path[0]) { - return $path; - } - - if ($path === $basePath = $this->getPathInfo()) { - return ''; - } - - $sourceDirs = explode('/', isset($basePath[0]) && '/' === $basePath[0] ? substr($basePath, 1) : $basePath); - $targetDirs = explode('/', substr($path, 1)); - array_pop($sourceDirs); - $targetFile = array_pop($targetDirs); - - foreach ($sourceDirs as $i => $dir) { - if (isset($targetDirs[$i]) && $dir === $targetDirs[$i]) { - unset($sourceDirs[$i], $targetDirs[$i]); - } else { - break; - } - } - - $targetDirs[] = $targetFile; - $path = str_repeat('../', \count($sourceDirs)).implode('/', $targetDirs); - - // A reference to the same base directory or an empty subdirectory must be prefixed with "./". - // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used - // as the first segment of a relative-path reference, as it would be mistaken for a scheme name - // (see https://tools.ietf.org/html/rfc3986#section-4.2). - return !isset($path[0]) || '/' === $path[0] - || false !== ($colonPos = strpos($path, ':')) && ($colonPos < ($slashPos = strpos($path, '/')) || false === $slashPos) - ? "./$path" : $path; - } - - /** - * Generates the normalized query string for the Request. - * - * It builds a normalized query string, where keys/value pairs are alphabetized - * and have consistent escaping. - * - * @return string|null - */ - public function getQueryString() - { - $qs = static::normalizeQueryString($this->server->get('QUERY_STRING')); - - return '' === $qs ? null : $qs; - } - - /** - * Checks whether the request is secure or not. - * - * This method can read the client protocol from the "X-Forwarded-Proto" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". - * - * @return bool - */ - public function isSecure() - { - if ($this->isFromTrustedProxy() && $proto = $this->getTrustedValues(self::HEADER_X_FORWARDED_PROTO)) { - return \in_array(strtolower($proto[0]), ['https', 'on', 'ssl', '1'], true); - } - - $https = $this->server->get('HTTPS'); - - return !empty($https) && 'off' !== strtolower($https); - } - - /** - * Returns the host name. - * - * This method can read the client host name from the "X-Forwarded-Host" header - * when trusted proxies were set via "setTrustedProxies()". - * - * The "X-Forwarded-Host" header must contain the client host name. - * - * @return string - * - * @throws SuspiciousOperationException when the host name is invalid or not trusted - */ - public function getHost() - { - if ($this->isFromTrustedProxy() && $host = $this->getTrustedValues(self::HEADER_X_FORWARDED_HOST)) { - $host = $host[0]; - } elseif (!$host = $this->headers->get('HOST')) { - if (!$host = $this->server->get('SERVER_NAME')) { - $host = $this->server->get('SERVER_ADDR', ''); - } - } - - // trim and remove port number from host - // host is lowercase as per RFC 952/2181 - $host = strtolower(preg_replace('/:\d+$/', '', trim($host))); - - // as the host can come from the user (HTTP_HOST and depending on the configuration, SERVER_NAME too can come from the user) - // check that it does not contain forbidden characters (see RFC 952 and RFC 2181) - // use preg_replace() instead of preg_match() to prevent DoS attacks with long host names - if ($host && '' !== preg_replace('/(?:^\[)?[a-zA-Z0-9-:\]_]+\.?/', '', $host)) { - if (!$this->isHostValid) { - return ''; - } - $this->isHostValid = false; - - throw new SuspiciousOperationException(sprintf('Invalid Host "%s".', $host)); - } - - if (\count(self::$trustedHostPatterns) > 0) { - // to avoid host header injection attacks, you should provide a list of trusted host patterns - - if (\in_array($host, self::$trustedHosts)) { - return $host; - } - - foreach (self::$trustedHostPatterns as $pattern) { - if (preg_match($pattern, $host)) { - self::$trustedHosts[] = $host; - - return $host; - } - } - - if (!$this->isHostValid) { - return ''; - } - $this->isHostValid = false; - - throw new SuspiciousOperationException(sprintf('Untrusted Host "%s".', $host)); - } - - return $host; - } - - /** - * Sets the request method. - */ - public function setMethod(string $method) - { - $this->method = null; - $this->server->set('REQUEST_METHOD', $method); - } - - /** - * Gets the request "intended" method. - * - * If the X-HTTP-Method-Override header is set, and if the method is a POST, - * then it is used to determine the "real" intended HTTP method. - * - * The _method request parameter can also be used to determine the HTTP method, - * but only if enableHttpMethodParameterOverride() has been called. - * - * The method is always an uppercased string. - * - * @return string - * - * @see getRealMethod() - */ - public function getMethod() - { - if (null !== $this->method) { - return $this->method; - } - - $this->method = strtoupper($this->server->get('REQUEST_METHOD', 'GET')); - - if ('POST' !== $this->method) { - return $this->method; - } - - $method = $this->headers->get('X-HTTP-METHOD-OVERRIDE'); - - if (!$method && self::$httpMethodParameterOverride) { - $method = $this->request->get('_method', $this->query->get('_method', 'POST')); - } - - if (!\is_string($method)) { - return $this->method; - } - - $method = strtoupper($method); - - if (\in_array($method, ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'PATCH', 'PURGE', 'TRACE'], true)) { - return $this->method = $method; - } - - if (!preg_match('/^[A-Z]++$/D', $method)) { - throw new SuspiciousOperationException(sprintf('Invalid method override "%s".', $method)); - } - - return $this->method = $method; - } - - /** - * Gets the "real" request method. - * - * @return string - * - * @see getMethod() - */ - public function getRealMethod() - { - return strtoupper($this->server->get('REQUEST_METHOD', 'GET')); - } - - /** - * Gets the mime type associated with the format. - * - * @return string|null - */ - public function getMimeType(string $format) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - return isset(static::$formats[$format]) ? static::$formats[$format][0] : null; - } - - /** - * Gets the mime types associated with the format. - * - * @return array - */ - public static function getMimeTypes(string $format) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - return static::$formats[$format] ?? []; - } - - /** - * Gets the format associated with the mime type. - * - * @return string|null - */ - public function getFormat(?string $mimeType) - { - $canonicalMimeType = null; - if ($mimeType && false !== $pos = strpos($mimeType, ';')) { - $canonicalMimeType = trim(substr($mimeType, 0, $pos)); - } - - if (null === static::$formats) { - static::initializeFormats(); - } - - foreach (static::$formats as $format => $mimeTypes) { - if (\in_array($mimeType, (array) $mimeTypes)) { - return $format; - } - if (null !== $canonicalMimeType && \in_array($canonicalMimeType, (array) $mimeTypes)) { - return $format; - } - } - - return null; - } - - /** - * Associates a format with mime types. - * - * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) - */ - public function setFormat(?string $format, $mimeTypes) - { - if (null === static::$formats) { - static::initializeFormats(); - } - - static::$formats[$format] = \is_array($mimeTypes) ? $mimeTypes : [$mimeTypes]; - } - - /** - * Gets the request format. - * - * Here is the process to determine the format: - * - * * format defined by the user (with setRequestFormat()) - * * _format request attribute - * * $default - * - * @see getPreferredFormat - * - * @return string|null - */ - public function getRequestFormat(?string $default = 'html') - { - if (null === $this->format) { - $this->format = $this->attributes->get('_format'); - } - - return $this->format ?? $default; - } - - /** - * Sets the request format. - */ - public function setRequestFormat(?string $format) - { - $this->format = $format; - } - - /** - * Gets the format associated with the request. - * - * @return string|null - */ - public function getContentType() - { - return $this->getFormat($this->headers->get('CONTENT_TYPE', '')); - } - - /** - * Sets the default locale. - */ - public function setDefaultLocale(string $locale) - { - $this->defaultLocale = $locale; - - if (null === $this->locale) { - $this->setPhpDefaultLocale($locale); - } - } - - /** - * Get the default locale. - * - * @return string - */ - public function getDefaultLocale() - { - return $this->defaultLocale; - } - - /** - * Sets the locale. - */ - public function setLocale(string $locale) - { - $this->setPhpDefaultLocale($this->locale = $locale); - } - - /** - * Get the locale. - * - * @return string - */ - public function getLocale() - { - return $this->locale ?? $this->defaultLocale; - } - - /** - * Checks if the request method is of specified type. - * - * @param string $method Uppercase request method (GET, POST etc) - * - * @return bool - */ - public function isMethod(string $method) - { - return $this->getMethod() === strtoupper($method); - } - - /** - * Checks whether or not the method is safe. - * - * @see https://tools.ietf.org/html/rfc7231#section-4.2.1 - * - * @return bool - */ - public function isMethodSafe() - { - return \in_array($this->getMethod(), ['GET', 'HEAD', 'OPTIONS', 'TRACE']); - } - - /** - * Checks whether or not the method is idempotent. - * - * @return bool - */ - public function isMethodIdempotent() - { - return \in_array($this->getMethod(), ['HEAD', 'GET', 'PUT', 'DELETE', 'TRACE', 'OPTIONS', 'PURGE']); - } - - /** - * Checks whether the method is cacheable or not. - * - * @see https://tools.ietf.org/html/rfc7231#section-4.2.3 - * - * @return bool - */ - public function isMethodCacheable() - { - return \in_array($this->getMethod(), ['GET', 'HEAD']); - } - - /** - * Returns the protocol version. - * - * If the application is behind a proxy, the protocol version used in the - * requests between the client and the proxy and between the proxy and the - * server might be different. This returns the former (from the "Via" header) - * if the proxy is trusted (see "setTrustedProxies()"), otherwise it returns - * the latter (from the "SERVER_PROTOCOL" server parameter). - * - * @return string|null - */ - public function getProtocolVersion() - { - if ($this->isFromTrustedProxy()) { - preg_match('~^(HTTP/)?([1-9]\.[0-9]) ~', $this->headers->get('Via') ?? '', $matches); - - if ($matches) { - return 'HTTP/'.$matches[2]; - } - } - - return $this->server->get('SERVER_PROTOCOL'); - } - - /** - * Returns the request body content. - * - * @param bool $asResource If true, a resource will be returned - * - * @return string|resource - */ - public function getContent(bool $asResource = false) - { - $currentContentIsResource = \is_resource($this->content); - - if (true === $asResource) { - if ($currentContentIsResource) { - rewind($this->content); - - return $this->content; - } - - // Content passed in parameter (test) - if (\is_string($this->content)) { - $resource = fopen('php://temp', 'r+'); - fwrite($resource, $this->content); - rewind($resource); - - return $resource; - } - - $this->content = false; - - return fopen('php://input', 'r'); - } - - if ($currentContentIsResource) { - rewind($this->content); - - return stream_get_contents($this->content); - } - - if (null === $this->content || false === $this->content) { - $this->content = file_get_contents('php://input'); - } - - return $this->content; - } - - /** - * Gets the request body decoded as array, typically from a JSON payload. - * - * @return array - * - * @throws JsonException When the body cannot be decoded to an array - */ - public function toArray() - { - if ('' === $content = $this->getContent()) { - throw new JsonException('Request body is empty.'); - } - - try { - $content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0)); - } catch (\JsonException $e) { - throw new JsonException('Could not decode request body.', $e->getCode(), $e); - } - - if (\PHP_VERSION_ID < 70300 && \JSON_ERROR_NONE !== json_last_error()) { - throw new JsonException('Could not decode request body: '.json_last_error_msg(), json_last_error()); - } - - if (!\is_array($content)) { - throw new JsonException(sprintf('JSON content was expected to decode to an array, "%s" returned.', get_debug_type($content))); - } - - return $content; - } - - /** - * Gets the Etags. - * - * @return array - */ - public function getETags() - { - return preg_split('/\s*,\s*/', $this->headers->get('If-None-Match', ''), -1, \PREG_SPLIT_NO_EMPTY); - } - - /** - * @return bool - */ - public function isNoCache() - { - return $this->headers->hasCacheControlDirective('no-cache') || 'no-cache' == $this->headers->get('Pragma'); - } - - /** - * Gets the preferred format for the response by inspecting, in the following order: - * * the request format set using setRequestFormat; - * * the values of the Accept HTTP header. - * - * Note that if you use this method, you should send the "Vary: Accept" header - * in the response to prevent any issues with intermediary HTTP caches. - */ - public function getPreferredFormat(?string $default = 'html'): ?string - { - if (null !== $this->preferredFormat || null !== $this->preferredFormat = $this->getRequestFormat(null)) { - return $this->preferredFormat; - } - - foreach ($this->getAcceptableContentTypes() as $mimeType) { - if ($this->preferredFormat = $this->getFormat($mimeType)) { - return $this->preferredFormat; - } - } - - return $default; - } - - /** - * Returns the preferred language. - * - * @param string[] $locales An array of ordered available locales - * - * @return string|null - */ - public function getPreferredLanguage(?array $locales = null) - { - $preferredLanguages = $this->getLanguages(); - - if (empty($locales)) { - return $preferredLanguages[0] ?? null; - } - - if (!$preferredLanguages) { - return $locales[0]; - } - - $extendedPreferredLanguages = []; - foreach ($preferredLanguages as $language) { - $extendedPreferredLanguages[] = $language; - if (false !== $position = strpos($language, '_')) { - $superLanguage = substr($language, 0, $position); - if (!\in_array($superLanguage, $preferredLanguages)) { - $extendedPreferredLanguages[] = $superLanguage; - } - } - } - - $preferredLanguages = array_values(array_intersect($extendedPreferredLanguages, $locales)); - - return $preferredLanguages[0] ?? $locales[0]; - } - - /** - * Gets a list of languages acceptable by the client browser ordered in the user browser preferences. - * - * @return array - */ - public function getLanguages() - { - if (null !== $this->languages) { - return $this->languages; - } - - $languages = AcceptHeader::fromString($this->headers->get('Accept-Language'))->all(); - $this->languages = []; - foreach ($languages as $acceptHeaderItem) { - $lang = $acceptHeaderItem->getValue(); - if (str_contains($lang, '-')) { - $codes = explode('-', $lang); - if ('i' === $codes[0]) { - // Language not listed in ISO 639 that are not variants - // of any listed language, which can be registered with the - // i-prefix, such as i-cherokee - if (\count($codes) > 1) { - $lang = $codes[1]; - } - } else { - for ($i = 0, $max = \count($codes); $i < $max; ++$i) { - if (0 === $i) { - $lang = strtolower($codes[0]); - } else { - $lang .= '_'.strtoupper($codes[$i]); - } - } - } - } - - $this->languages[] = $lang; - } - - return $this->languages; - } - - /** - * Gets a list of charsets acceptable by the client browser in preferable order. - * - * @return array - */ - public function getCharsets() - { - if (null !== $this->charsets) { - return $this->charsets; - } - - return $this->charsets = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Charset'))->all())); - } - - /** - * Gets a list of encodings acceptable by the client browser in preferable order. - * - * @return array - */ - public function getEncodings() - { - if (null !== $this->encodings) { - return $this->encodings; - } - - return $this->encodings = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept-Encoding'))->all())); - } - - /** - * Gets a list of content types acceptable by the client browser in preferable order. - * - * @return array - */ - public function getAcceptableContentTypes() - { - if (null !== $this->acceptableContentTypes) { - return $this->acceptableContentTypes; - } - - return $this->acceptableContentTypes = array_map('strval', array_keys(AcceptHeader::fromString($this->headers->get('Accept'))->all())); - } - - /** - * Returns true if the request is an XMLHttpRequest. - * - * It works if your JavaScript library sets an X-Requested-With HTTP header. - * It is known to work with common JavaScript frameworks: - * - * @see https://wikipedia.org/wiki/List_of_Ajax_frameworks#JavaScript - * - * @return bool - */ - public function isXmlHttpRequest() - { - return 'XMLHttpRequest' == $this->headers->get('X-Requested-With'); - } - - /** - * Checks whether the client browser prefers safe content or not according to RFC8674. - * - * @see https://tools.ietf.org/html/rfc8674 - */ - public function preferSafeContent(): bool - { - if (null !== $this->isSafeContentPreferred) { - return $this->isSafeContentPreferred; - } - - if (!$this->isSecure()) { - // see https://tools.ietf.org/html/rfc8674#section-3 - return $this->isSafeContentPreferred = false; - } - - return $this->isSafeContentPreferred = AcceptHeader::fromString($this->headers->get('Prefer'))->has('safe'); - } - - /* - * The following methods are derived from code of the Zend Framework (1.10dev - 2010-01-24) - * - * Code subject to the new BSD license (https://framework.zend.com/license). - * - * Copyright (c) 2005-2010 Zend Technologies USA Inc. (https://www.zend.com/) - */ - - protected function prepareRequestUri() - { - $requestUri = ''; - - if ($this->isIisRewrite() && '' != $this->server->get('UNENCODED_URL')) { - // IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem) - $requestUri = $this->server->get('UNENCODED_URL'); - $this->server->remove('UNENCODED_URL'); - } elseif ($this->server->has('REQUEST_URI')) { - $requestUri = $this->server->get('REQUEST_URI'); - - if ('' !== $requestUri && '/' === $requestUri[0]) { - // To only use path and query remove the fragment. - if (false !== $pos = strpos($requestUri, '#')) { - $requestUri = substr($requestUri, 0, $pos); - } - } else { - // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, - // only use URL path. - $uriComponents = parse_url($requestUri); - - if (isset($uriComponents['path'])) { - $requestUri = $uriComponents['path']; - } - - if (isset($uriComponents['query'])) { - $requestUri .= '?'.$uriComponents['query']; - } - } - } elseif ($this->server->has('ORIG_PATH_INFO')) { - // IIS 5.0, PHP as CGI - $requestUri = $this->server->get('ORIG_PATH_INFO'); - if ('' != $this->server->get('QUERY_STRING')) { - $requestUri .= '?'.$this->server->get('QUERY_STRING'); - } - $this->server->remove('ORIG_PATH_INFO'); - } - - // normalize the request URI to ease creating sub-requests from this request - $this->server->set('REQUEST_URI', $requestUri); - - return $requestUri; - } - - /** - * Prepares the base URL. - * - * @return string - */ - protected function prepareBaseUrl() - { - $filename = basename($this->server->get('SCRIPT_FILENAME', '')); - - if (basename($this->server->get('SCRIPT_NAME', '')) === $filename) { - $baseUrl = $this->server->get('SCRIPT_NAME'); - } elseif (basename($this->server->get('PHP_SELF', '')) === $filename) { - $baseUrl = $this->server->get('PHP_SELF'); - } elseif (basename($this->server->get('ORIG_SCRIPT_NAME', '')) === $filename) { - $baseUrl = $this->server->get('ORIG_SCRIPT_NAME'); // 1and1 shared hosting compatibility - } else { - // Backtrack up the script_filename to find the portion matching - // php_self - $path = $this->server->get('PHP_SELF', ''); - $file = $this->server->get('SCRIPT_FILENAME', ''); - $segs = explode('/', trim($file, '/')); - $segs = array_reverse($segs); - $index = 0; - $last = \count($segs); - $baseUrl = ''; - do { - $seg = $segs[$index]; - $baseUrl = '/'.$seg.$baseUrl; - ++$index; - } while ($last > $index && (false !== $pos = strpos($path, $baseUrl)) && 0 != $pos); - } - - // Does the baseUrl have anything in common with the request_uri? - $requestUri = $this->getRequestUri(); - if ('' !== $requestUri && '/' !== $requestUri[0]) { - $requestUri = '/'.$requestUri; - } - - if ($baseUrl && null !== $prefix = $this->getUrlencodedPrefix($requestUri, $baseUrl)) { - // full $baseUrl matches - return $prefix; - } - - if ($baseUrl && null !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(\dirname($baseUrl), '/'.\DIRECTORY_SEPARATOR).'/')) { - // directory portion of $baseUrl matches - return rtrim($prefix, '/'.\DIRECTORY_SEPARATOR); - } - - $truncatedRequestUri = $requestUri; - if (false !== $pos = strpos($requestUri, '?')) { - $truncatedRequestUri = substr($requestUri, 0, $pos); - } - - $basename = basename($baseUrl ?? ''); - if (empty($basename) || !strpos(rawurldecode($truncatedRequestUri), $basename)) { - // no match whatsoever; set it blank - return ''; - } - - // If using mod_rewrite or ISAPI_Rewrite strip the script filename - // out of baseUrl. $pos !== 0 makes sure it is not matching a value - // from PATH_INFO or QUERY_STRING - if (\strlen($requestUri) >= \strlen($baseUrl) && (false !== $pos = strpos($requestUri, $baseUrl)) && 0 !== $pos) { - $baseUrl = substr($requestUri, 0, $pos + \strlen($baseUrl)); - } - - return rtrim($baseUrl, '/'.\DIRECTORY_SEPARATOR); - } - - /** - * Prepares the base path. - * - * @return string - */ - protected function prepareBasePath() - { - $baseUrl = $this->getBaseUrl(); - if (empty($baseUrl)) { - return ''; - } - - $filename = basename($this->server->get('SCRIPT_FILENAME')); - if (basename($baseUrl) === $filename) { - $basePath = \dirname($baseUrl); - } else { - $basePath = $baseUrl; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - $basePath = str_replace('\\', '/', $basePath); - } - - return rtrim($basePath, '/'); - } - - /** - * Prepares the path info. - * - * @return string - */ - protected function preparePathInfo() - { - if (null === ($requestUri = $this->getRequestUri())) { - return '/'; - } - - // Remove the query string from REQUEST_URI - if (false !== $pos = strpos($requestUri, '?')) { - $requestUri = substr($requestUri, 0, $pos); - } - if ('' !== $requestUri && '/' !== $requestUri[0]) { - $requestUri = '/'.$requestUri; - } - - if (null === ($baseUrl = $this->getBaseUrlReal())) { - return $requestUri; - } - - $pathInfo = substr($requestUri, \strlen($baseUrl)); - if (false === $pathInfo || '' === $pathInfo) { - // If substr() returns false then PATH_INFO is set to an empty string - return '/'; - } - - return $pathInfo; - } - - /** - * Initializes HTTP request formats. - */ - protected static function initializeFormats() - { - static::$formats = [ - 'html' => ['text/html', 'application/xhtml+xml'], - 'txt' => ['text/plain'], - 'js' => ['application/javascript', 'application/x-javascript', 'text/javascript'], - 'css' => ['text/css'], - 'json' => ['application/json', 'application/x-json'], - 'jsonld' => ['application/ld+json'], - 'xml' => ['text/xml', 'application/xml', 'application/x-xml'], - 'rdf' => ['application/rdf+xml'], - 'atom' => ['application/atom+xml'], - 'rss' => ['application/rss+xml'], - 'form' => ['application/x-www-form-urlencoded', 'multipart/form-data'], - ]; - } - - private function setPhpDefaultLocale(string $locale): void - { - // if either the class Locale doesn't exist, or an exception is thrown when - // setting the default locale, the intl module is not installed, and - // the call can be ignored: - try { - if (class_exists(\Locale::class, false)) { - \Locale::setDefault($locale); - } - } catch (\Exception $e) { - } - } - - /** - * Returns the prefix as encoded in the string when the string starts with - * the given prefix, null otherwise. - */ - private function getUrlencodedPrefix(string $string, string $prefix): ?string - { - if ($this->isIisRewrite()) { - // ISS with UrlRewriteModule might report SCRIPT_NAME/PHP_SELF with wrong case - // see https://github.com/php/php-src/issues/11981 - if (0 !== stripos(rawurldecode($string), $prefix)) { - return null; - } - } elseif (!str_starts_with(rawurldecode($string), $prefix)) { - return null; - } - - $len = \strlen($prefix); - - if (preg_match(sprintf('#^(%%[[:xdigit:]]{2}|.){%d}#', $len), $string, $match)) { - return $match[0]; - } - - return null; - } - - private static function createRequestFromFactory(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], $content = null): self - { - if (self::$requestFactory) { - $request = (self::$requestFactory)($query, $request, $attributes, $cookies, $files, $server, $content); - - if (!$request instanceof self) { - throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.'); - } - - return $request; - } - - return new static($query, $request, $attributes, $cookies, $files, $server, $content); - } - - /** - * Indicates whether this request originated from a trusted proxy. - * - * This can be useful to determine whether or not to trust the - * contents of a proxy-specific header. - * - * @return bool - */ - public function isFromTrustedProxy() - { - return self::$trustedProxies && IpUtils::checkIp($this->server->get('REMOTE_ADDR', ''), self::$trustedProxies); - } - - private function getTrustedValues(int $type, ?string $ip = null): array - { - $clientValues = []; - $forwardedValues = []; - - if ((self::$trustedHeaderSet & $type) && $this->headers->has(self::TRUSTED_HEADERS[$type])) { - foreach (explode(',', $this->headers->get(self::TRUSTED_HEADERS[$type])) as $v) { - $clientValues[] = (self::HEADER_X_FORWARDED_PORT === $type ? '0.0.0.0:' : '').trim($v); - } - } - - if ((self::$trustedHeaderSet & self::HEADER_FORWARDED) && (isset(self::FORWARDED_PARAMS[$type])) && $this->headers->has(self::TRUSTED_HEADERS[self::HEADER_FORWARDED])) { - $forwarded = $this->headers->get(self::TRUSTED_HEADERS[self::HEADER_FORWARDED]); - $parts = HeaderUtils::split($forwarded, ',;='); - $forwardedValues = []; - $param = self::FORWARDED_PARAMS[$type]; - foreach ($parts as $subParts) { - if (null === $v = HeaderUtils::combine($subParts)[$param] ?? null) { - continue; - } - if (self::HEADER_X_FORWARDED_PORT === $type) { - if (str_ends_with($v, ']') || false === $v = strrchr($v, ':')) { - $v = $this->isSecure() ? ':443' : ':80'; - } - $v = '0.0.0.0'.$v; - } - $forwardedValues[] = $v; - } - } - - if (null !== $ip) { - $clientValues = $this->normalizeAndFilterClientIps($clientValues, $ip); - $forwardedValues = $this->normalizeAndFilterClientIps($forwardedValues, $ip); - } - - if ($forwardedValues === $clientValues || !$clientValues) { - return $forwardedValues; - } - - if (!$forwardedValues) { - return $clientValues; - } - - if (!$this->isForwardedValid) { - return null !== $ip ? ['0.0.0.0', $ip] : []; - } - $this->isForwardedValid = false; - - throw new ConflictingHeadersException(sprintf('The request has both a trusted "%s" header and a trusted "%s" header, conflicting with each other. You should either configure your proxy to remove one of them, or configure your project to distrust the offending one.', self::TRUSTED_HEADERS[self::HEADER_FORWARDED], self::TRUSTED_HEADERS[$type])); - } - - private function normalizeAndFilterClientIps(array $clientIps, string $ip): array - { - if (!$clientIps) { - return []; - } - $clientIps[] = $ip; // Complete the IP chain with the IP the request actually came from - $firstTrustedIp = null; - - foreach ($clientIps as $key => $clientIp) { - if (strpos($clientIp, '.')) { - // Strip :port from IPv4 addresses. This is allowed in Forwarded - // and may occur in X-Forwarded-For. - $i = strpos($clientIp, ':'); - if ($i) { - $clientIps[$key] = $clientIp = substr($clientIp, 0, $i); - } - } elseif (str_starts_with($clientIp, '[')) { - // Strip brackets and :port from IPv6 addresses. - $i = strpos($clientIp, ']', 1); - $clientIps[$key] = $clientIp = substr($clientIp, 1, $i - 1); - } - - if (!filter_var($clientIp, \FILTER_VALIDATE_IP)) { - unset($clientIps[$key]); - - continue; - } - - if (IpUtils::checkIp($clientIp, self::$trustedProxies)) { - unset($clientIps[$key]); - - // Fallback to this when the client IP falls into the range of trusted proxies - if (null === $firstTrustedIp) { - $firstTrustedIp = $clientIp; - } - } - } - - // Now the IP chain contains only untrusted proxies and the client IP - return $clientIps ? array_reverse($clientIps) : [$firstTrustedIp]; - } - - /** - * Is this IIS with UrlRewriteModule? - * - * This method consumes, caches and removed the IIS_WasUrlRewritten env var, - * so we don't inherit it to sub-requests. - */ - private function isIisRewrite(): bool - { - if (1 === $this->server->getInt('IIS_WasUrlRewritten')) { - $this->isIisRewrite = true; - $this->server->remove('IIS_WasUrlRewritten'); - } - - return $this->isIisRewrite; - } -} diff --git a/vendor/symfony/http-foundation/RequestMatcher.php b/vendor/symfony/http-foundation/RequestMatcher.php deleted file mode 100644 index 03ccee9..0000000 --- a/vendor/symfony/http-foundation/RequestMatcher.php +++ /dev/null @@ -1,196 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RequestMatcher compares a pre-defined set of checks against a Request instance. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class RequestMatcher implements RequestMatcherInterface -{ - /** - * @var string|null - */ - private $path; - - /** - * @var string|null - */ - private $host; - - /** - * @var int|null - */ - private $port; - - /** - * @var string[] - */ - private $methods = []; - - /** - * @var string[] - */ - private $ips = []; - - /** - * @var array - */ - private $attributes = []; - - /** - * @var string[] - */ - private $schemes = []; - - /** - * @param string|string[]|null $methods - * @param string|string[]|null $ips - * @param string|string[]|null $schemes - */ - public function __construct(?string $path = null, ?string $host = null, $methods = null, $ips = null, array $attributes = [], $schemes = null, ?int $port = null) - { - $this->matchPath($path); - $this->matchHost($host); - $this->matchMethod($methods); - $this->matchIps($ips); - $this->matchScheme($schemes); - $this->matchPort($port); - - foreach ($attributes as $k => $v) { - $this->matchAttribute($k, $v); - } - } - - /** - * Adds a check for the HTTP scheme. - * - * @param string|string[]|null $scheme An HTTP scheme or an array of HTTP schemes - */ - public function matchScheme($scheme) - { - $this->schemes = null !== $scheme ? array_map('strtolower', (array) $scheme) : []; - } - - /** - * Adds a check for the URL host name. - */ - public function matchHost(?string $regexp) - { - $this->host = $regexp; - } - - /** - * Adds a check for the URL port. - * - * @param int|null $port The port number to connect to - */ - public function matchPort(?int $port) - { - $this->port = $port; - } - - /** - * Adds a check for the URL path info. - */ - public function matchPath(?string $regexp) - { - $this->path = $regexp; - } - - /** - * Adds a check for the client IP. - * - * @param string $ip A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 - */ - public function matchIp(string $ip) - { - $this->matchIps($ip); - } - - /** - * Adds a check for the client IP. - * - * @param string|string[]|null $ips A specific IP address or a range specified using IP/netmask like 192.168.1.0/24 - */ - public function matchIps($ips) - { - $ips = null !== $ips ? (array) $ips : []; - - $this->ips = array_reduce($ips, static function (array $ips, string $ip) { - return array_merge($ips, preg_split('/\s*,\s*/', $ip)); - }, []); - } - - /** - * Adds a check for the HTTP method. - * - * @param string|string[]|null $method An HTTP method or an array of HTTP methods - */ - public function matchMethod($method) - { - $this->methods = null !== $method ? array_map('strtoupper', (array) $method) : []; - } - - /** - * Adds a check for request attribute. - */ - public function matchAttribute(string $key, string $regexp) - { - $this->attributes[$key] = $regexp; - } - - /** - * {@inheritdoc} - */ - public function matches(Request $request) - { - if ($this->schemes && !\in_array($request->getScheme(), $this->schemes, true)) { - return false; - } - - if ($this->methods && !\in_array($request->getMethod(), $this->methods, true)) { - return false; - } - - foreach ($this->attributes as $key => $pattern) { - $requestAttribute = $request->attributes->get($key); - if (!\is_string($requestAttribute)) { - return false; - } - if (!preg_match('{'.$pattern.'}', $requestAttribute)) { - return false; - } - } - - if (null !== $this->path && !preg_match('{'.$this->path.'}', rawurldecode($request->getPathInfo()))) { - return false; - } - - if (null !== $this->host && !preg_match('{'.$this->host.'}i', $request->getHost())) { - return false; - } - - if (null !== $this->port && 0 < $this->port && $request->getPort() !== $this->port) { - return false; - } - - if (IpUtils::checkIp($request->getClientIp() ?? '', $this->ips)) { - return true; - } - - // Note to future implementors: add additional checks above the - // foreach above or else your check might not be run! - return 0 === \count($this->ips); - } -} diff --git a/vendor/symfony/http-foundation/RequestMatcherInterface.php b/vendor/symfony/http-foundation/RequestMatcherInterface.php deleted file mode 100644 index c2e1478..0000000 --- a/vendor/symfony/http-foundation/RequestMatcherInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * RequestMatcherInterface is an interface for strategies to match a Request. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -interface RequestMatcherInterface -{ - /** - * Decides whether the rule(s) implemented by the strategy matches the supplied request. - * - * @return bool - */ - public function matches(Request $request); -} diff --git a/vendor/symfony/http-foundation/RequestStack.php b/vendor/symfony/http-foundation/RequestStack.php deleted file mode 100644 index 855b518..0000000 --- a/vendor/symfony/http-foundation/RequestStack.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException; -use Symfony\Component\HttpFoundation\Session\SessionInterface; - -/** - * Request stack that controls the lifecycle of requests. - * - * @author Benjamin Eberlei <kontakt@beberlei.de> - */ -class RequestStack -{ - /** - * @var Request[] - */ - private $requests = []; - - /** - * Pushes a Request on the stack. - * - * This method should generally not be called directly as the stack - * management should be taken care of by the application itself. - */ - public function push(Request $request) - { - $this->requests[] = $request; - } - - /** - * Pops the current request from the stack. - * - * This operation lets the current request go out of scope. - * - * This method should generally not be called directly as the stack - * management should be taken care of by the application itself. - * - * @return Request|null - */ - public function pop() - { - if (!$this->requests) { - return null; - } - - return array_pop($this->requests); - } - - /** - * @return Request|null - */ - public function getCurrentRequest() - { - return end($this->requests) ?: null; - } - - /** - * Gets the main request. - * - * Be warned that making your code aware of the main request - * might make it un-compatible with other features of your framework - * like ESI support. - */ - public function getMainRequest(): ?Request - { - if (!$this->requests) { - return null; - } - - return $this->requests[0]; - } - - /** - * Gets the master request. - * - * @return Request|null - * - * @deprecated since symfony/http-foundation 5.3, use getMainRequest() instead - */ - public function getMasterRequest() - { - trigger_deprecation('symfony/http-foundation', '5.3', '"%s()" is deprecated, use "getMainRequest()" instead.', __METHOD__); - - return $this->getMainRequest(); - } - - /** - * Returns the parent request of the current. - * - * Be warned that making your code aware of the parent request - * might make it un-compatible with other features of your framework - * like ESI support. - * - * If current Request is the main request, it returns null. - * - * @return Request|null - */ - public function getParentRequest() - { - $pos = \count($this->requests) - 2; - - return $this->requests[$pos] ?? null; - } - - /** - * Gets the current session. - * - * @throws SessionNotFoundException - */ - public function getSession(): SessionInterface - { - if ((null !== $request = end($this->requests) ?: null) && $request->hasSession()) { - return $request->getSession(); - } - - throw new SessionNotFoundException(); - } -} diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php deleted file mode 100644 index 6798a04..0000000 --- a/vendor/symfony/http-foundation/Response.php +++ /dev/null @@ -1,1288 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -// Help opcache.preload discover always-needed symbols -class_exists(ResponseHeaderBag::class); - -/** - * Response represents an HTTP response. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class Response -{ - public const HTTP_CONTINUE = 100; - public const HTTP_SWITCHING_PROTOCOLS = 101; - public const HTTP_PROCESSING = 102; // RFC2518 - public const HTTP_EARLY_HINTS = 103; // RFC8297 - public const HTTP_OK = 200; - public const HTTP_CREATED = 201; - public const HTTP_ACCEPTED = 202; - public const HTTP_NON_AUTHORITATIVE_INFORMATION = 203; - public const HTTP_NO_CONTENT = 204; - public const HTTP_RESET_CONTENT = 205; - public const HTTP_PARTIAL_CONTENT = 206; - public const HTTP_MULTI_STATUS = 207; // RFC4918 - public const HTTP_ALREADY_REPORTED = 208; // RFC5842 - public const HTTP_IM_USED = 226; // RFC3229 - public const HTTP_MULTIPLE_CHOICES = 300; - public const HTTP_MOVED_PERMANENTLY = 301; - public const HTTP_FOUND = 302; - public const HTTP_SEE_OTHER = 303; - public const HTTP_NOT_MODIFIED = 304; - public const HTTP_USE_PROXY = 305; - public const HTTP_RESERVED = 306; - public const HTTP_TEMPORARY_REDIRECT = 307; - public const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238 - public const HTTP_BAD_REQUEST = 400; - public const HTTP_UNAUTHORIZED = 401; - public const HTTP_PAYMENT_REQUIRED = 402; - public const HTTP_FORBIDDEN = 403; - public const HTTP_NOT_FOUND = 404; - public const HTTP_METHOD_NOT_ALLOWED = 405; - public const HTTP_NOT_ACCEPTABLE = 406; - public const HTTP_PROXY_AUTHENTICATION_REQUIRED = 407; - public const HTTP_REQUEST_TIMEOUT = 408; - public const HTTP_CONFLICT = 409; - public const HTTP_GONE = 410; - public const HTTP_LENGTH_REQUIRED = 411; - public const HTTP_PRECONDITION_FAILED = 412; - public const HTTP_REQUEST_ENTITY_TOO_LARGE = 413; - public const HTTP_REQUEST_URI_TOO_LONG = 414; - public const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; - public const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; - public const HTTP_EXPECTATION_FAILED = 417; - public const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 - public const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 - public const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 - public const HTTP_LOCKED = 423; // RFC4918 - public const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 - public const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04 - public const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 - public const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 - public const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 - public const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 - public const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; // RFC7725 - public const HTTP_INTERNAL_SERVER_ERROR = 500; - public const HTTP_NOT_IMPLEMENTED = 501; - public const HTTP_BAD_GATEWAY = 502; - public const HTTP_SERVICE_UNAVAILABLE = 503; - public const HTTP_GATEWAY_TIMEOUT = 504; - public const HTTP_VERSION_NOT_SUPPORTED = 505; - public const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295 - public const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918 - public const HTTP_LOOP_DETECTED = 508; // RFC5842 - public const HTTP_NOT_EXTENDED = 510; // RFC2774 - public const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; // RFC6585 - - /** - * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control - */ - private const HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES = [ - 'must_revalidate' => false, - 'no_cache' => false, - 'no_store' => false, - 'no_transform' => false, - 'public' => false, - 'private' => false, - 'proxy_revalidate' => false, - 'max_age' => true, - 's_maxage' => true, - 'immutable' => false, - 'last_modified' => true, - 'etag' => true, - ]; - - /** - * @var ResponseHeaderBag - */ - public $headers; - - /** - * @var string - */ - protected $content; - - /** - * @var string - */ - protected $version; - - /** - * @var int - */ - protected $statusCode; - - /** - * @var string - */ - protected $statusText; - - /** - * @var string - */ - protected $charset; - - /** - * Status codes translation table. - * - * The list of codes is complete according to the - * {@link https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml Hypertext Transfer Protocol (HTTP) Status Code Registry} - * (last updated 2021-10-01). - * - * Unless otherwise noted, the status code is defined in RFC2616. - * - * @var array - */ - public static $statusTexts = [ - 100 => 'Continue', - 101 => 'Switching Protocols', - 102 => 'Processing', // RFC2518 - 103 => 'Early Hints', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 207 => 'Multi-Status', // RFC4918 - 208 => 'Already Reported', // RFC5842 - 226 => 'IM Used', // RFC3229 - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - 308 => 'Permanent Redirect', // RFC7238 - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Content Too Large', // RFC-ietf-httpbis-semantics - 414 => 'URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Range Not Satisfiable', - 417 => 'Expectation Failed', - 418 => 'I\'m a teapot', // RFC2324 - 421 => 'Misdirected Request', // RFC7540 - 422 => 'Unprocessable Content', // RFC-ietf-httpbis-semantics - 423 => 'Locked', // RFC4918 - 424 => 'Failed Dependency', // RFC4918 - 425 => 'Too Early', // RFC-ietf-httpbis-replay-04 - 426 => 'Upgrade Required', // RFC2817 - 428 => 'Precondition Required', // RFC6585 - 429 => 'Too Many Requests', // RFC6585 - 431 => 'Request Header Fields Too Large', // RFC6585 - 451 => 'Unavailable For Legal Reasons', // RFC7725 - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - 506 => 'Variant Also Negotiates', // RFC2295 - 507 => 'Insufficient Storage', // RFC4918 - 508 => 'Loop Detected', // RFC5842 - 510 => 'Not Extended', // RFC2774 - 511 => 'Network Authentication Required', // RFC6585 - ]; - - /** - * @throws \InvalidArgumentException When the HTTP status code is not valid - */ - public function __construct(?string $content = '', int $status = 200, array $headers = []) - { - $this->headers = new ResponseHeaderBag($headers); - $this->setContent($content); - $this->setStatusCode($status); - $this->setProtocolVersion('1.0'); - } - - /** - * Factory method for chainability. - * - * Example: - * - * return Response::create($body, 200) - * ->setSharedMaxAge(300); - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create(?string $content = '', int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($content, $status, $headers); - } - - /** - * Returns the Response as an HTTP string. - * - * The string representation of the Response is the same as the - * one that will be sent to the client only if the prepare() method - * has been called before. - * - * @return string - * - * @see prepare() - */ - public function __toString() - { - return - sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText)."\r\n". - $this->headers."\r\n". - $this->getContent(); - } - - /** - * Clones the current Response instance. - */ - public function __clone() - { - $this->headers = clone $this->headers; - } - - /** - * Prepares the Response before it is sent to the client. - * - * This method tweaks the Response to ensure that it is - * compliant with RFC 2616. Most of the changes are based on - * the Request that is "associated" with this Response. - * - * @return $this - */ - public function prepare(Request $request) - { - $headers = $this->headers; - - if ($this->isInformational() || $this->isEmpty()) { - $this->setContent(null); - $headers->remove('Content-Type'); - $headers->remove('Content-Length'); - // prevent PHP from sending the Content-Type header based on default_mimetype - ini_set('default_mimetype', ''); - } else { - // Content-type based on the Request - if (!$headers->has('Content-Type')) { - $format = $request->getRequestFormat(null); - if (null !== $format && $mimeType = $request->getMimeType($format)) { - $headers->set('Content-Type', $mimeType); - } - } - - // Fix Content-Type - $charset = $this->charset ?: 'UTF-8'; - if (!$headers->has('Content-Type')) { - $headers->set('Content-Type', 'text/html; charset='.$charset); - } elseif (0 === stripos($headers->get('Content-Type') ?? '', 'text/') && false === stripos($headers->get('Content-Type') ?? '', 'charset')) { - // add the charset - $headers->set('Content-Type', $headers->get('Content-Type').'; charset='.$charset); - } - - // Fix Content-Length - if ($headers->has('Transfer-Encoding')) { - $headers->remove('Content-Length'); - } - - if ($request->isMethod('HEAD')) { - // cf. RFC2616 14.13 - $length = $headers->get('Content-Length'); - $this->setContent(null); - if ($length) { - $headers->set('Content-Length', $length); - } - } - } - - // Fix protocol - if ('HTTP/1.0' != $request->server->get('SERVER_PROTOCOL')) { - $this->setProtocolVersion('1.1'); - } - - // Check if we need to send extra expire info headers - if ('1.0' == $this->getProtocolVersion() && str_contains($headers->get('Cache-Control', ''), 'no-cache')) { - $headers->set('pragma', 'no-cache'); - $headers->set('expires', -1); - } - - $this->ensureIEOverSSLCompatibility($request); - - if ($request->isSecure()) { - foreach ($headers->getCookies() as $cookie) { - $cookie->setSecureDefault(true); - } - } - - return $this; - } - - /** - * Sends HTTP headers. - * - * @return $this - */ - public function sendHeaders() - { - // headers have already been sent by the developer - if (headers_sent()) { - return $this; - } - - // headers - foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) { - $replace = 0 === strcasecmp($name, 'Content-Type'); - foreach ($values as $value) { - header($name.': '.$value, $replace, $this->statusCode); - } - } - - // cookies - foreach ($this->headers->getCookies() as $cookie) { - header('Set-Cookie: '.$cookie, false, $this->statusCode); - } - - // status - header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); - - return $this; - } - - /** - * Sends content for the current web response. - * - * @return $this - */ - public function sendContent() - { - echo $this->content; - - return $this; - } - - /** - * Sends HTTP headers and content. - * - * @return $this - */ - public function send() - { - $this->sendHeaders(); - $this->sendContent(); - - if (\function_exists('fastcgi_finish_request')) { - fastcgi_finish_request(); - } elseif (\function_exists('litespeed_finish_request')) { - litespeed_finish_request(); - } elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) { - static::closeOutputBuffers(0, true); - flush(); - } - - return $this; - } - - /** - * Sets the response content. - * - * @return $this - */ - public function setContent(?string $content) - { - $this->content = $content ?? ''; - - return $this; - } - - /** - * Gets the current response content. - * - * @return string|false - */ - public function getContent() - { - return $this->content; - } - - /** - * Sets the HTTP protocol version (1.0 or 1.1). - * - * @return $this - * - * @final - */ - public function setProtocolVersion(string $version): object - { - $this->version = $version; - - return $this; - } - - /** - * Gets the HTTP protocol version. - * - * @final - */ - public function getProtocolVersion(): string - { - return $this->version; - } - - /** - * Sets the response status code. - * - * If the status text is null it will be automatically populated for the known - * status codes and left empty otherwise. - * - * @return $this - * - * @throws \InvalidArgumentException When the HTTP status code is not valid - * - * @final - */ - public function setStatusCode(int $code, ?string $text = null): object - { - $this->statusCode = $code; - if ($this->isInvalid()) { - throw new \InvalidArgumentException(sprintf('The HTTP status code "%s" is not valid.', $code)); - } - - if (null === $text) { - $this->statusText = self::$statusTexts[$code] ?? 'unknown status'; - - return $this; - } - - if (false === $text) { - $this->statusText = ''; - - return $this; - } - - $this->statusText = $text; - - return $this; - } - - /** - * Retrieves the status code for the current web response. - * - * @final - */ - public function getStatusCode(): int - { - return $this->statusCode; - } - - /** - * Sets the response charset. - * - * @return $this - * - * @final - */ - public function setCharset(string $charset): object - { - $this->charset = $charset; - - return $this; - } - - /** - * Retrieves the response charset. - * - * @final - */ - public function getCharset(): ?string - { - return $this->charset; - } - - /** - * Returns true if the response may safely be kept in a shared (surrogate) cache. - * - * Responses marked "private" with an explicit Cache-Control directive are - * considered uncacheable. - * - * Responses with neither a freshness lifetime (Expires, max-age) nor cache - * validator (Last-Modified, ETag) are considered uncacheable because there is - * no way to tell when or how to remove them from the cache. - * - * Note that RFC 7231 and RFC 7234 possibly allow for a more permissive implementation, - * for example "status codes that are defined as cacheable by default [...] - * can be reused by a cache with heuristic expiration unless otherwise indicated" - * (https://tools.ietf.org/html/rfc7231#section-6.1) - * - * @final - */ - public function isCacheable(): bool - { - if (!\in_array($this->statusCode, [200, 203, 300, 301, 302, 404, 410])) { - return false; - } - - if ($this->headers->hasCacheControlDirective('no-store') || $this->headers->getCacheControlDirective('private')) { - return false; - } - - return $this->isValidateable() || $this->isFresh(); - } - - /** - * Returns true if the response is "fresh". - * - * Fresh responses may be served from cache without any interaction with the - * origin. A response is considered fresh when it includes a Cache-Control/max-age - * indicator or Expires header and the calculated age is less than the freshness lifetime. - * - * @final - */ - public function isFresh(): bool - { - return $this->getTtl() > 0; - } - - /** - * Returns true if the response includes headers that can be used to validate - * the response with the origin server using a conditional GET request. - * - * @final - */ - public function isValidateable(): bool - { - return $this->headers->has('Last-Modified') || $this->headers->has('ETag'); - } - - /** - * Marks the response as "private". - * - * It makes the response ineligible for serving other clients. - * - * @return $this - * - * @final - */ - public function setPrivate(): object - { - $this->headers->removeCacheControlDirective('public'); - $this->headers->addCacheControlDirective('private'); - - return $this; - } - - /** - * Marks the response as "public". - * - * It makes the response eligible for serving other clients. - * - * @return $this - * - * @final - */ - public function setPublic(): object - { - $this->headers->addCacheControlDirective('public'); - $this->headers->removeCacheControlDirective('private'); - - return $this; - } - - /** - * Marks the response as "immutable". - * - * @return $this - * - * @final - */ - public function setImmutable(bool $immutable = true): object - { - if ($immutable) { - $this->headers->addCacheControlDirective('immutable'); - } else { - $this->headers->removeCacheControlDirective('immutable'); - } - - return $this; - } - - /** - * Returns true if the response is marked as "immutable". - * - * @final - */ - public function isImmutable(): bool - { - return $this->headers->hasCacheControlDirective('immutable'); - } - - /** - * Returns true if the response must be revalidated by shared caches once it has become stale. - * - * This method indicates that the response must not be served stale by a - * cache in any circumstance without first revalidating with the origin. - * When present, the TTL of the response should not be overridden to be - * greater than the value provided by the origin. - * - * @final - */ - public function mustRevalidate(): bool - { - return $this->headers->hasCacheControlDirective('must-revalidate') || $this->headers->hasCacheControlDirective('proxy-revalidate'); - } - - /** - * Returns the Date header as a DateTime instance. - * - * @throws \RuntimeException When the header is not parseable - * - * @final - */ - public function getDate(): ?\DateTimeInterface - { - return $this->headers->getDate('Date'); - } - - /** - * Sets the Date header. - * - * @return $this - * - * @final - */ - public function setDate(\DateTimeInterface $date): object - { - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Date', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the age of the response in seconds. - * - * @final - */ - public function getAge(): int - { - if (null !== $age = $this->headers->get('Age')) { - return (int) $age; - } - - return max(time() - (int) $this->getDate()->format('U'), 0); - } - - /** - * Marks the response stale by setting the Age header to be equal to the maximum age of the response. - * - * @return $this - */ - public function expire() - { - if ($this->isFresh()) { - $this->headers->set('Age', $this->getMaxAge()); - $this->headers->remove('Expires'); - } - - return $this; - } - - /** - * Returns the value of the Expires header as a DateTime instance. - * - * @final - */ - public function getExpires(): ?\DateTimeInterface - { - try { - return $this->headers->getDate('Expires'); - } catch (\RuntimeException $e) { - // according to RFC 2616 invalid date formats (e.g. "0" and "-1") must be treated as in the past - return \DateTime::createFromFormat('U', time() - 172800); - } - } - - /** - * Sets the Expires HTTP header with a DateTime instance. - * - * Passing null as value will remove the header. - * - * @return $this - * - * @final - */ - public function setExpires(?\DateTimeInterface $date = null): object - { - if (null === $date) { - $this->headers->remove('Expires'); - - return $this; - } - - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Expires', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the number of seconds after the time specified in the response's Date - * header when the response should no longer be considered fresh. - * - * First, it checks for a s-maxage directive, then a max-age directive, and then it falls - * back on an expires header. It returns null when no maximum age can be established. - * - * @final - */ - public function getMaxAge(): ?int - { - if ($this->headers->hasCacheControlDirective('s-maxage')) { - return (int) $this->headers->getCacheControlDirective('s-maxage'); - } - - if ($this->headers->hasCacheControlDirective('max-age')) { - return (int) $this->headers->getCacheControlDirective('max-age'); - } - - if (null !== $expires = $this->getExpires()) { - $maxAge = (int) $expires->format('U') - (int) $this->getDate()->format('U'); - - return max($maxAge, 0); - } - - return null; - } - - /** - * Sets the number of seconds after which the response should no longer be considered fresh. - * - * This methods sets the Cache-Control max-age directive. - * - * @return $this - * - * @final - */ - public function setMaxAge(int $value): object - { - $this->headers->addCacheControlDirective('max-age', $value); - - return $this; - } - - /** - * Sets the number of seconds after which the response should no longer be considered fresh by shared caches. - * - * This methods sets the Cache-Control s-maxage directive. - * - * @return $this - * - * @final - */ - public function setSharedMaxAge(int $value): object - { - $this->setPublic(); - $this->headers->addCacheControlDirective('s-maxage', $value); - - return $this; - } - - /** - * Returns the response's time-to-live in seconds. - * - * It returns null when no freshness information is present in the response. - * - * When the response's TTL is 0, the response may not be served from cache without first - * revalidating with the origin. - * - * @final - */ - public function getTtl(): ?int - { - $maxAge = $this->getMaxAge(); - - return null !== $maxAge ? max($maxAge - $this->getAge(), 0) : null; - } - - /** - * Sets the response's time-to-live for shared caches in seconds. - * - * This method adjusts the Cache-Control/s-maxage directive. - * - * @return $this - * - * @final - */ - public function setTtl(int $seconds): object - { - $this->setSharedMaxAge($this->getAge() + $seconds); - - return $this; - } - - /** - * Sets the response's time-to-live for private/client caches in seconds. - * - * This method adjusts the Cache-Control/max-age directive. - * - * @return $this - * - * @final - */ - public function setClientTtl(int $seconds): object - { - $this->setMaxAge($this->getAge() + $seconds); - - return $this; - } - - /** - * Returns the Last-Modified HTTP header as a DateTime instance. - * - * @throws \RuntimeException When the HTTP header is not parseable - * - * @final - */ - public function getLastModified(): ?\DateTimeInterface - { - return $this->headers->getDate('Last-Modified'); - } - - /** - * Sets the Last-Modified HTTP header with a DateTime instance. - * - * Passing null as value will remove the header. - * - * @return $this - * - * @final - */ - public function setLastModified(?\DateTimeInterface $date = null): object - { - if (null === $date) { - $this->headers->remove('Last-Modified'); - - return $this; - } - - if ($date instanceof \DateTime) { - $date = \DateTimeImmutable::createFromMutable($date); - } - - $date = $date->setTimezone(new \DateTimeZone('UTC')); - $this->headers->set('Last-Modified', $date->format('D, d M Y H:i:s').' GMT'); - - return $this; - } - - /** - * Returns the literal value of the ETag HTTP header. - * - * @final - */ - public function getEtag(): ?string - { - return $this->headers->get('ETag'); - } - - /** - * Sets the ETag value. - * - * @param string|null $etag The ETag unique identifier or null to remove the header - * @param bool $weak Whether you want a weak ETag or not - * - * @return $this - * - * @final - */ - public function setEtag(?string $etag = null, bool $weak = false): object - { - if (null === $etag) { - $this->headers->remove('Etag'); - } else { - if (!str_starts_with($etag, '"')) { - $etag = '"'.$etag.'"'; - } - - $this->headers->set('ETag', (true === $weak ? 'W/' : '').$etag); - } - - return $this; - } - - /** - * Sets the response's cache headers (validation and/or expiration). - * - * Available options are: must_revalidate, no_cache, no_store, no_transform, public, private, proxy_revalidate, max_age, s_maxage, immutable, last_modified and etag. - * - * @return $this - * - * @throws \InvalidArgumentException - * - * @final - */ - public function setCache(array $options): object - { - if ($diff = array_diff(array_keys($options), array_keys(self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES))) { - throw new \InvalidArgumentException(sprintf('Response does not support the following options: "%s".', implode('", "', $diff))); - } - - if (isset($options['etag'])) { - $this->setEtag($options['etag']); - } - - if (isset($options['last_modified'])) { - $this->setLastModified($options['last_modified']); - } - - if (isset($options['max_age'])) { - $this->setMaxAge($options['max_age']); - } - - if (isset($options['s_maxage'])) { - $this->setSharedMaxAge($options['s_maxage']); - } - - foreach (self::HTTP_RESPONSE_CACHE_CONTROL_DIRECTIVES as $directive => $hasValue) { - if (!$hasValue && isset($options[$directive])) { - if ($options[$directive]) { - $this->headers->addCacheControlDirective(str_replace('_', '-', $directive)); - } else { - $this->headers->removeCacheControlDirective(str_replace('_', '-', $directive)); - } - } - } - - if (isset($options['public'])) { - if ($options['public']) { - $this->setPublic(); - } else { - $this->setPrivate(); - } - } - - if (isset($options['private'])) { - if ($options['private']) { - $this->setPrivate(); - } else { - $this->setPublic(); - } - } - - return $this; - } - - /** - * Modifies the response so that it conforms to the rules defined for a 304 status code. - * - * This sets the status, removes the body, and discards any headers - * that MUST NOT be included in 304 responses. - * - * @return $this - * - * @see https://tools.ietf.org/html/rfc2616#section-10.3.5 - * - * @final - */ - public function setNotModified(): object - { - $this->setStatusCode(304); - $this->setContent(null); - - // remove headers that MUST NOT be included with 304 Not Modified responses - foreach (['Allow', 'Content-Encoding', 'Content-Language', 'Content-Length', 'Content-MD5', 'Content-Type', 'Last-Modified'] as $header) { - $this->headers->remove($header); - } - - return $this; - } - - /** - * Returns true if the response includes a Vary header. - * - * @final - */ - public function hasVary(): bool - { - return null !== $this->headers->get('Vary'); - } - - /** - * Returns an array of header names given in the Vary header. - * - * @final - */ - public function getVary(): array - { - if (!$vary = $this->headers->all('Vary')) { - return []; - } - - $ret = []; - foreach ($vary as $item) { - $ret[] = preg_split('/[\s,]+/', $item); - } - - return array_merge([], ...$ret); - } - - /** - * Sets the Vary header. - * - * @param string|array $headers - * @param bool $replace Whether to replace the actual value or not (true by default) - * - * @return $this - * - * @final - */ - public function setVary($headers, bool $replace = true): object - { - $this->headers->set('Vary', $headers, $replace); - - return $this; - } - - /** - * Determines if the Response validators (ETag, Last-Modified) match - * a conditional value specified in the Request. - * - * If the Response is not modified, it sets the status code to 304 and - * removes the actual content by calling the setNotModified() method. - * - * @final - */ - public function isNotModified(Request $request): bool - { - if (!$request->isMethodCacheable()) { - return false; - } - - $notModified = false; - $lastModified = $this->headers->get('Last-Modified'); - $modifiedSince = $request->headers->get('If-Modified-Since'); - - if (($ifNoneMatchEtags = $request->getETags()) && (null !== $etag = $this->getEtag())) { - if (0 == strncmp($etag, 'W/', 2)) { - $etag = substr($etag, 2); - } - - // Use weak comparison as per https://tools.ietf.org/html/rfc7232#section-3.2. - foreach ($ifNoneMatchEtags as $ifNoneMatchEtag) { - if (0 == strncmp($ifNoneMatchEtag, 'W/', 2)) { - $ifNoneMatchEtag = substr($ifNoneMatchEtag, 2); - } - - if ($ifNoneMatchEtag === $etag || '*' === $ifNoneMatchEtag) { - $notModified = true; - break; - } - } - } - // Only do If-Modified-Since date comparison when If-None-Match is not present as per https://tools.ietf.org/html/rfc7232#section-3.3. - elseif ($modifiedSince && $lastModified) { - $notModified = strtotime($modifiedSince) >= strtotime($lastModified); - } - - if ($notModified) { - $this->setNotModified(); - } - - return $notModified; - } - - /** - * Is response invalid? - * - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html - * - * @final - */ - public function isInvalid(): bool - { - return $this->statusCode < 100 || $this->statusCode >= 600; - } - - /** - * Is response informative? - * - * @final - */ - public function isInformational(): bool - { - return $this->statusCode >= 100 && $this->statusCode < 200; - } - - /** - * Is response successful? - * - * @final - */ - public function isSuccessful(): bool - { - return $this->statusCode >= 200 && $this->statusCode < 300; - } - - /** - * Is the response a redirect? - * - * @final - */ - public function isRedirection(): bool - { - return $this->statusCode >= 300 && $this->statusCode < 400; - } - - /** - * Is there a client error? - * - * @final - */ - public function isClientError(): bool - { - return $this->statusCode >= 400 && $this->statusCode < 500; - } - - /** - * Was there a server side error? - * - * @final - */ - public function isServerError(): bool - { - return $this->statusCode >= 500 && $this->statusCode < 600; - } - - /** - * Is the response OK? - * - * @final - */ - public function isOk(): bool - { - return 200 === $this->statusCode; - } - - /** - * Is the response forbidden? - * - * @final - */ - public function isForbidden(): bool - { - return 403 === $this->statusCode; - } - - /** - * Is the response a not found error? - * - * @final - */ - public function isNotFound(): bool - { - return 404 === $this->statusCode; - } - - /** - * Is the response a redirect of some form? - * - * @final - */ - public function isRedirect(?string $location = null): bool - { - return \in_array($this->statusCode, [201, 301, 302, 303, 307, 308]) && (null === $location ?: $location == $this->headers->get('Location')); - } - - /** - * Is the response empty? - * - * @final - */ - public function isEmpty(): bool - { - return \in_array($this->statusCode, [204, 304]); - } - - /** - * Cleans or flushes output buffers up to target level. - * - * Resulting level can be greater than target level if a non-removable buffer has been encountered. - * - * @final - */ - public static function closeOutputBuffers(int $targetLevel, bool $flush): void - { - $status = ob_get_status(true); - $level = \count($status); - $flags = \PHP_OUTPUT_HANDLER_REMOVABLE | ($flush ? \PHP_OUTPUT_HANDLER_FLUSHABLE : \PHP_OUTPUT_HANDLER_CLEANABLE); - - while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) { - if ($flush) { - ob_end_flush(); - } else { - ob_end_clean(); - } - } - } - - /** - * Marks a response as safe according to RFC8674. - * - * @see https://tools.ietf.org/html/rfc8674 - */ - public function setContentSafe(bool $safe = true): void - { - if ($safe) { - $this->headers->set('Preference-Applied', 'safe'); - } elseif ('safe' === $this->headers->get('Preference-Applied')) { - $this->headers->remove('Preference-Applied'); - } - - $this->setVary('Prefer', false); - } - - /** - * Checks if we need to remove Cache-Control for SSL encrypted downloads when using IE < 9. - * - * @see http://support.microsoft.com/kb/323308 - * - * @final - */ - protected function ensureIEOverSSLCompatibility(Request $request): void - { - if (false !== stripos($this->headers->get('Content-Disposition') ?? '', 'attachment') && 1 == preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT') ?? '', $match) && true === $request->isSecure()) { - if ((int) preg_replace('/(MSIE )(.*?);/', '$2', $match[0]) < 9) { - $this->headers->remove('Cache-Control'); - } - } - } -} diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php deleted file mode 100644 index d4c4f39..0000000 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ /dev/null @@ -1,291 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * ResponseHeaderBag is a container for Response HTTP headers. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class ResponseHeaderBag extends HeaderBag -{ - public const COOKIES_FLAT = 'flat'; - public const COOKIES_ARRAY = 'array'; - - public const DISPOSITION_ATTACHMENT = 'attachment'; - public const DISPOSITION_INLINE = 'inline'; - - protected $computedCacheControl = []; - protected $cookies = []; - protected $headerNames = []; - - public function __construct(array $headers = []) - { - parent::__construct($headers); - - if (!isset($this->headers['cache-control'])) { - $this->set('Cache-Control', ''); - } - - /* RFC2616 - 14.18 says all Responses need to have a Date */ - if (!isset($this->headers['date'])) { - $this->initDate(); - } - } - - /** - * Returns the headers, with original capitalizations. - * - * @return array - */ - public function allPreserveCase() - { - $headers = []; - foreach ($this->all() as $name => $value) { - $headers[$this->headerNames[$name] ?? $name] = $value; - } - - return $headers; - } - - public function allPreserveCaseWithoutCookies() - { - $headers = $this->allPreserveCase(); - if (isset($this->headerNames['set-cookie'])) { - unset($headers[$this->headerNames['set-cookie']]); - } - - return $headers; - } - - /** - * {@inheritdoc} - */ - public function replace(array $headers = []) - { - $this->headerNames = []; - - parent::replace($headers); - - if (!isset($this->headers['cache-control'])) { - $this->set('Cache-Control', ''); - } - - if (!isset($this->headers['date'])) { - $this->initDate(); - } - } - - /** - * {@inheritdoc} - */ - public function all(?string $key = null) - { - $headers = parent::all(); - - if (null !== $key) { - $key = strtr($key, self::UPPER, self::LOWER); - - return 'set-cookie' !== $key ? $headers[$key] ?? [] : array_map('strval', $this->getCookies()); - } - - foreach ($this->getCookies() as $cookie) { - $headers['set-cookie'][] = (string) $cookie; - } - - return $headers; - } - - /** - * {@inheritdoc} - */ - public function set(string $key, $values, bool $replace = true) - { - $uniqueKey = strtr($key, self::UPPER, self::LOWER); - - if ('set-cookie' === $uniqueKey) { - if ($replace) { - $this->cookies = []; - } - foreach ((array) $values as $cookie) { - $this->setCookie(Cookie::fromString($cookie)); - } - $this->headerNames[$uniqueKey] = $key; - - return; - } - - $this->headerNames[$uniqueKey] = $key; - - parent::set($key, $values, $replace); - - // ensure the cache-control header has sensible defaults - if (\in_array($uniqueKey, ['cache-control', 'etag', 'last-modified', 'expires'], true) && '' !== $computed = $this->computeCacheControlValue()) { - $this->headers['cache-control'] = [$computed]; - $this->headerNames['cache-control'] = 'Cache-Control'; - $this->computedCacheControl = $this->parseCacheControl($computed); - } - } - - /** - * {@inheritdoc} - */ - public function remove(string $key) - { - $uniqueKey = strtr($key, self::UPPER, self::LOWER); - unset($this->headerNames[$uniqueKey]); - - if ('set-cookie' === $uniqueKey) { - $this->cookies = []; - - return; - } - - parent::remove($key); - - if ('cache-control' === $uniqueKey) { - $this->computedCacheControl = []; - } - - if ('date' === $uniqueKey) { - $this->initDate(); - } - } - - /** - * {@inheritdoc} - */ - public function hasCacheControlDirective(string $key) - { - return \array_key_exists($key, $this->computedCacheControl); - } - - /** - * {@inheritdoc} - */ - public function getCacheControlDirective(string $key) - { - return $this->computedCacheControl[$key] ?? null; - } - - public function setCookie(Cookie $cookie) - { - $this->cookies[$cookie->getDomain()][$cookie->getPath()][$cookie->getName()] = $cookie; - $this->headerNames['set-cookie'] = 'Set-Cookie'; - } - - /** - * Removes a cookie from the array, but does not unset it in the browser. - */ - public function removeCookie(string $name, ?string $path = '/', ?string $domain = null) - { - if (null === $path) { - $path = '/'; - } - - unset($this->cookies[$domain][$path][$name]); - - if (empty($this->cookies[$domain][$path])) { - unset($this->cookies[$domain][$path]); - - if (empty($this->cookies[$domain])) { - unset($this->cookies[$domain]); - } - } - - if (empty($this->cookies)) { - unset($this->headerNames['set-cookie']); - } - } - - /** - * Returns an array with all cookies. - * - * @return Cookie[] - * - * @throws \InvalidArgumentException When the $format is invalid - */ - public function getCookies(string $format = self::COOKIES_FLAT) - { - if (!\in_array($format, [self::COOKIES_FLAT, self::COOKIES_ARRAY])) { - throw new \InvalidArgumentException(sprintf('Format "%s" invalid (%s).', $format, implode(', ', [self::COOKIES_FLAT, self::COOKIES_ARRAY]))); - } - - if (self::COOKIES_ARRAY === $format) { - return $this->cookies; - } - - $flattenedCookies = []; - foreach ($this->cookies as $path) { - foreach ($path as $cookies) { - foreach ($cookies as $cookie) { - $flattenedCookies[] = $cookie; - } - } - } - - return $flattenedCookies; - } - - /** - * Clears a cookie in the browser. - */ - public function clearCookie(string $name, ?string $path = '/', ?string $domain = null, bool $secure = false, bool $httpOnly = true, ?string $sameSite = null) - { - $this->setCookie(new Cookie($name, null, 1, $path, $domain, $secure, $httpOnly, false, $sameSite)); - } - - /** - * @see HeaderUtils::makeDisposition() - */ - public function makeDisposition(string $disposition, string $filename, string $filenameFallback = '') - { - return HeaderUtils::makeDisposition($disposition, $filename, $filenameFallback); - } - - /** - * Returns the calculated value of the cache-control header. - * - * This considers several other headers and calculates or modifies the - * cache-control header to a sensible, conservative value. - * - * @return string - */ - protected function computeCacheControlValue() - { - if (!$this->cacheControl) { - if ($this->has('Last-Modified') || $this->has('Expires')) { - return 'private, must-revalidate'; // allows for heuristic expiration (RFC 7234 Section 4.2.2) in the case of "Last-Modified" - } - - // conservative by default - return 'no-cache, private'; - } - - $header = $this->getCacheControlHeader(); - if (isset($this->cacheControl['public']) || isset($this->cacheControl['private'])) { - return $header; - } - - // public if s-maxage is defined, private otherwise - if (!isset($this->cacheControl['s-maxage'])) { - return $header.', private'; - } - - return $header; - } - - private function initDate(): void - { - $this->set('Date', gmdate('D, d M Y H:i:s').' GMT'); - } -} diff --git a/vendor/symfony/http-foundation/ServerBag.php b/vendor/symfony/http-foundation/ServerBag.php deleted file mode 100644 index 831caa6..0000000 --- a/vendor/symfony/http-foundation/ServerBag.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * ServerBag is a container for HTTP headers from the $_SERVER variable. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Bulat Shakirzyanov <mallluhuct@gmail.com> - * @author Robert Kiss <kepten@gmail.com> - */ -class ServerBag extends ParameterBag -{ - /** - * Gets the HTTP headers. - * - * @return array - */ - public function getHeaders() - { - $headers = []; - foreach ($this->parameters as $key => $value) { - if (str_starts_with($key, 'HTTP_')) { - $headers[substr($key, 5)] = $value; - } elseif (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true) && '' !== $value) { - $headers[$key] = $value; - } - } - - if (isset($this->parameters['PHP_AUTH_USER'])) { - $headers['PHP_AUTH_USER'] = $this->parameters['PHP_AUTH_USER']; - $headers['PHP_AUTH_PW'] = $this->parameters['PHP_AUTH_PW'] ?? ''; - } else { - /* - * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default - * For this workaround to work, add these lines to your .htaccess file: - * RewriteCond %{HTTP:Authorization} .+ - * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0] - * - * A sample .htaccess file: - * RewriteEngine On - * RewriteCond %{HTTP:Authorization} .+ - * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0] - * RewriteCond %{REQUEST_FILENAME} !-f - * RewriteRule ^(.*)$ index.php [QSA,L] - */ - - $authorizationHeader = null; - if (isset($this->parameters['HTTP_AUTHORIZATION'])) { - $authorizationHeader = $this->parameters['HTTP_AUTHORIZATION']; - } elseif (isset($this->parameters['REDIRECT_HTTP_AUTHORIZATION'])) { - $authorizationHeader = $this->parameters['REDIRECT_HTTP_AUTHORIZATION']; - } - - if (null !== $authorizationHeader) { - if (0 === stripos($authorizationHeader, 'basic ')) { - // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic - $exploded = explode(':', base64_decode(substr($authorizationHeader, 6)), 2); - if (2 == \count($exploded)) { - [$headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']] = $exploded; - } - } elseif (empty($this->parameters['PHP_AUTH_DIGEST']) && (0 === stripos($authorizationHeader, 'digest '))) { - // In some circumstances PHP_AUTH_DIGEST needs to be set - $headers['PHP_AUTH_DIGEST'] = $authorizationHeader; - $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader; - } elseif (0 === stripos($authorizationHeader, 'bearer ')) { - /* - * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables, - * I'll just set $headers['AUTHORIZATION'] here. - * https://php.net/reserved.variables.server - */ - $headers['AUTHORIZATION'] = $authorizationHeader; - } - } - } - - if (isset($headers['AUTHORIZATION'])) { - return $headers; - } - - // PHP_AUTH_USER/PHP_AUTH_PW - if (isset($headers['PHP_AUTH_USER'])) { - $headers['AUTHORIZATION'] = 'Basic '.base64_encode($headers['PHP_AUTH_USER'].':'.($headers['PHP_AUTH_PW'] ?? '')); - } elseif (isset($headers['PHP_AUTH_DIGEST'])) { - $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST']; - } - - return $headers; - } -} diff --git a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php deleted file mode 100644 index f4f051c..0000000 --- a/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php +++ /dev/null @@ -1,152 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -/** - * This class relates to session attribute storage. - * - * @implements \IteratorAggregate<string, mixed> - */ -class AttributeBag implements AttributeBagInterface, \IteratorAggregate, \Countable -{ - private $name = 'attributes'; - private $storageKey; - - protected $attributes = []; - - /** - * @param string $storageKey The key used to store attributes in the session - */ - public function __construct(string $storageKey = '_sf2_attributes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$attributes) - { - $this->attributes = &$attributes; - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return \array_key_exists($name, $this->attributes); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - return \array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $this->attributes[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function all() - { - return $this->attributes; - } - - /** - * {@inheritdoc} - */ - public function replace(array $attributes) - { - $this->attributes = []; - foreach ($attributes as $key => $value) { - $this->set($key, $value); - } - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - $retval = null; - if (\array_key_exists($name, $this->attributes)) { - $retval = $this->attributes[$name]; - unset($this->attributes[$name]); - } - - return $retval; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $return = $this->attributes; - $this->attributes = []; - - return $return; - } - - /** - * Returns an iterator for attributes. - * - * @return \ArrayIterator<string, mixed> - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->attributes); - } - - /** - * Returns the number of attributes. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->attributes); - } -} diff --git a/vendor/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php b/vendor/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php deleted file mode 100644 index cb50696..0000000 --- a/vendor/symfony/http-foundation/Session/Attribute/AttributeBagInterface.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * Attributes store. - * - * @author Drak <drak@zikula.org> - */ -interface AttributeBagInterface extends SessionBagInterface -{ - /** - * Checks if an attribute is defined. - * - * @return bool - */ - public function has(string $name); - - /** - * Returns an attribute. - * - * @param mixed $default The default value if not found - * - * @return mixed - */ - public function get(string $name, $default = null); - - /** - * Sets an attribute. - * - * @param mixed $value - */ - public function set(string $name, $value); - - /** - * Returns attributes. - * - * @return array<string, mixed> - */ - public function all(); - - public function replace(array $attributes); - - /** - * Removes an attribute. - * - * @return mixed The removed value or null when it does not exist - */ - public function remove(string $name); -} diff --git a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php deleted file mode 100644 index 864b35f..0000000 --- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Attribute; - -trigger_deprecation('symfony/http-foundation', '5.3', 'The "%s" class is deprecated.', NamespacedAttributeBag::class); - -/** - * This class provides structured storage of session attributes using - * a name spacing character in the key. - * - * @author Drak <drak@zikula.org> - * - * @deprecated since Symfony 5.3 - */ -class NamespacedAttributeBag extends AttributeBag -{ - private $namespaceCharacter; - - /** - * @param string $storageKey Session storage key - * @param string $namespaceCharacter Namespace character to use in keys - */ - public function __construct(string $storageKey = '_sf2_attributes', string $namespaceCharacter = '/') - { - $this->namespaceCharacter = $namespaceCharacter; - parent::__construct($storageKey); - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - // reference mismatch: if fixed, re-introduced in array_key_exists; keep as it is - $attributes = $this->resolveAttributePath($name); - $name = $this->resolveKey($name); - - if (null === $attributes) { - return false; - } - - return \array_key_exists($name, $attributes); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - // reference mismatch: if fixed, re-introduced in array_key_exists; keep as it is - $attributes = $this->resolveAttributePath($name); - $name = $this->resolveKey($name); - - if (null === $attributes) { - return $default; - } - - return \array_key_exists($name, $attributes) ? $attributes[$name] : $default; - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $attributes = &$this->resolveAttributePath($name, true); - $name = $this->resolveKey($name); - $attributes[$name] = $value; - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - $retval = null; - $attributes = &$this->resolveAttributePath($name); - $name = $this->resolveKey($name); - if (null !== $attributes && \array_key_exists($name, $attributes)) { - $retval = $attributes[$name]; - unset($attributes[$name]); - } - - return $retval; - } - - /** - * Resolves a path in attributes property and returns it as a reference. - * - * This method allows structured namespacing of session attributes. - * - * @param string $name Key name - * @param bool $writeContext Write context, default false - * - * @return array|null - */ - protected function &resolveAttributePath(string $name, bool $writeContext = false) - { - $array = &$this->attributes; - $name = (str_starts_with($name, $this->namespaceCharacter)) ? substr($name, 1) : $name; - - // Check if there is anything to do, else return - if (!$name) { - return $array; - } - - $parts = explode($this->namespaceCharacter, $name); - if (\count($parts) < 2) { - if (!$writeContext) { - return $array; - } - - $array[$parts[0]] = []; - - return $array; - } - - unset($parts[\count($parts) - 1]); - - foreach ($parts as $part) { - if (null !== $array && !\array_key_exists($part, $array)) { - if (!$writeContext) { - $null = null; - - return $null; - } - - $array[$part] = []; - } - - $array = &$array[$part]; - } - - return $array; - } - - /** - * Resolves the key from the name. - * - * This is the last part in a dot separated string. - * - * @return string - */ - protected function resolveKey(string $name) - { - if (false !== $pos = strrpos($name, $this->namespaceCharacter)) { - $name = substr($name, $pos + 1); - } - - return $name; - } -} diff --git a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php b/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php deleted file mode 100644 index 8aab3a1..0000000 --- a/vendor/symfony/http-foundation/Session/Flash/AutoExpireFlashBag.php +++ /dev/null @@ -1,161 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -/** - * AutoExpireFlashBag flash message container. - * - * @author Drak <drak@zikula.org> - */ -class AutoExpireFlashBag implements FlashBagInterface -{ - private $name = 'flashes'; - private $flashes = ['display' => [], 'new' => []]; - private $storageKey; - - /** - * @param string $storageKey The key used to store flashes in the session - */ - public function __construct(string $storageKey = '_symfony_flashes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$flashes) - { - $this->flashes = &$flashes; - - // The logic: messages from the last request will be stored in new, so we move them to previous - // This request we will show what is in 'display'. What is placed into 'new' this time round will - // be moved to display next time round. - $this->flashes['display'] = \array_key_exists('new', $this->flashes) ? $this->flashes['new'] : []; - $this->flashes['new'] = []; - } - - /** - * {@inheritdoc} - */ - public function add(string $type, $message) - { - $this->flashes['new'][$type][] = $message; - } - - /** - * {@inheritdoc} - */ - public function peek(string $type, array $default = []) - { - return $this->has($type) ? $this->flashes['display'][$type] : $default; - } - - /** - * {@inheritdoc} - */ - public function peekAll() - { - return \array_key_exists('display', $this->flashes) ? $this->flashes['display'] : []; - } - - /** - * {@inheritdoc} - */ - public function get(string $type, array $default = []) - { - $return = $default; - - if (!$this->has($type)) { - return $return; - } - - if (isset($this->flashes['display'][$type])) { - $return = $this->flashes['display'][$type]; - unset($this->flashes['display'][$type]); - } - - return $return; - } - - /** - * {@inheritdoc} - */ - public function all() - { - $return = $this->flashes['display']; - $this->flashes['display'] = []; - - return $return; - } - - /** - * {@inheritdoc} - */ - public function setAll(array $messages) - { - $this->flashes['new'] = $messages; - } - - /** - * {@inheritdoc} - */ - public function set(string $type, $messages) - { - $this->flashes['new'][$type] = (array) $messages; - } - - /** - * {@inheritdoc} - */ - public function has(string $type) - { - return \array_key_exists($type, $this->flashes['display']) && $this->flashes['display'][$type]; - } - - /** - * {@inheritdoc} - */ - public function keys() - { - return array_keys($this->flashes['display']); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->all(); - } -} diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php b/vendor/symfony/http-foundation/Session/Flash/FlashBag.php deleted file mode 100644 index 88df750..0000000 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBag.php +++ /dev/null @@ -1,152 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -/** - * FlashBag flash message container. - * - * @author Drak <drak@zikula.org> - */ -class FlashBag implements FlashBagInterface -{ - private $name = 'flashes'; - private $flashes = []; - private $storageKey; - - /** - * @param string $storageKey The key used to store flashes in the session - */ - public function __construct(string $storageKey = '_symfony_flashes') - { - $this->storageKey = $storageKey; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$flashes) - { - $this->flashes = &$flashes; - } - - /** - * {@inheritdoc} - */ - public function add(string $type, $message) - { - $this->flashes[$type][] = $message; - } - - /** - * {@inheritdoc} - */ - public function peek(string $type, array $default = []) - { - return $this->has($type) ? $this->flashes[$type] : $default; - } - - /** - * {@inheritdoc} - */ - public function peekAll() - { - return $this->flashes; - } - - /** - * {@inheritdoc} - */ - public function get(string $type, array $default = []) - { - if (!$this->has($type)) { - return $default; - } - - $return = $this->flashes[$type]; - - unset($this->flashes[$type]); - - return $return; - } - - /** - * {@inheritdoc} - */ - public function all() - { - $return = $this->peekAll(); - $this->flashes = []; - - return $return; - } - - /** - * {@inheritdoc} - */ - public function set(string $type, $messages) - { - $this->flashes[$type] = (array) $messages; - } - - /** - * {@inheritdoc} - */ - public function setAll(array $messages) - { - $this->flashes = $messages; - } - - /** - * {@inheritdoc} - */ - public function has(string $type) - { - return \array_key_exists($type, $this->flashes) && $this->flashes[$type]; - } - - /** - * {@inheritdoc} - */ - public function keys() - { - return array_keys($this->flashes); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->all(); - } -} diff --git a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php b/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php deleted file mode 100644 index 8713e71..0000000 --- a/vendor/symfony/http-foundation/Session/Flash/FlashBagInterface.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Flash; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * FlashBagInterface. - * - * @author Drak <drak@zikula.org> - */ -interface FlashBagInterface extends SessionBagInterface -{ - /** - * Adds a flash message for the given type. - * - * @param mixed $message - */ - public function add(string $type, $message); - - /** - * Registers one or more messages for a given type. - * - * @param string|array $messages - */ - public function set(string $type, $messages); - - /** - * Gets flash messages for a given type. - * - * @param string $type Message category type - * @param array $default Default value if $type does not exist - * - * @return array - */ - public function peek(string $type, array $default = []); - - /** - * Gets all flash messages. - * - * @return array - */ - public function peekAll(); - - /** - * Gets and clears flash from the stack. - * - * @param array $default Default value if $type does not exist - * - * @return array - */ - public function get(string $type, array $default = []); - - /** - * Gets and clears flashes from the stack. - * - * @return array - */ - public function all(); - - /** - * Sets all flash messages. - */ - public function setAll(array $messages); - - /** - * Has flash messages for a given type? - * - * @return bool - */ - public function has(string $type); - - /** - * Returns a list of all defined types. - * - * @return array - */ - public function keys(); -} diff --git a/vendor/symfony/http-foundation/Session/Session.php b/vendor/symfony/http-foundation/Session/Session.php deleted file mode 100644 index 917920a..0000000 --- a/vendor/symfony/http-foundation/Session/Session.php +++ /dev/null @@ -1,285 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag; -use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBag; -use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface; -use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(AttributeBag::class); -class_exists(FlashBag::class); -class_exists(SessionBagProxy::class); - -/** - * @author Fabien Potencier <fabien@symfony.com> - * @author Drak <drak@zikula.org> - * - * @implements \IteratorAggregate<string, mixed> - */ -class Session implements SessionInterface, \IteratorAggregate, \Countable -{ - protected $storage; - - private $flashName; - private $attributeName; - private $data = []; - private $usageIndex = 0; - private $usageReporter; - - public function __construct(?SessionStorageInterface $storage = null, ?AttributeBagInterface $attributes = null, ?FlashBagInterface $flashes = null, ?callable $usageReporter = null) - { - $this->storage = $storage ?? new NativeSessionStorage(); - $this->usageReporter = $usageReporter; - - $attributes = $attributes ?? new AttributeBag(); - $this->attributeName = $attributes->getName(); - $this->registerBag($attributes); - - $flashes = $flashes ?? new FlashBag(); - $this->flashName = $flashes->getName(); - $this->registerBag($flashes); - } - - /** - * {@inheritdoc} - */ - public function start() - { - return $this->storage->start(); - } - - /** - * {@inheritdoc} - */ - public function has(string $name) - { - return $this->getAttributeBag()->has($name); - } - - /** - * {@inheritdoc} - */ - public function get(string $name, $default = null) - { - return $this->getAttributeBag()->get($name, $default); - } - - /** - * {@inheritdoc} - */ - public function set(string $name, $value) - { - $this->getAttributeBag()->set($name, $value); - } - - /** - * {@inheritdoc} - */ - public function all() - { - return $this->getAttributeBag()->all(); - } - - /** - * {@inheritdoc} - */ - public function replace(array $attributes) - { - $this->getAttributeBag()->replace($attributes); - } - - /** - * {@inheritdoc} - */ - public function remove(string $name) - { - return $this->getAttributeBag()->remove($name); - } - - /** - * {@inheritdoc} - */ - public function clear() - { - $this->getAttributeBag()->clear(); - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->storage->isStarted(); - } - - /** - * Returns an iterator for attributes. - * - * @return \ArrayIterator<string, mixed> - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new \ArrayIterator($this->getAttributeBag()->all()); - } - - /** - * Returns the number of attributes. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->getAttributeBag()->all()); - } - - public function &getUsageIndex(): int - { - return $this->usageIndex; - } - - /** - * @internal - */ - public function isEmpty(): bool - { - if ($this->isStarted()) { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - } - foreach ($this->data as &$data) { - if (!empty($data)) { - return false; - } - } - - return true; - } - - /** - * {@inheritdoc} - */ - public function invalidate(?int $lifetime = null) - { - $this->storage->clear(); - - return $this->migrate(true, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function migrate(bool $destroy = false, ?int $lifetime = null) - { - return $this->storage->regenerate($destroy, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function save() - { - $this->storage->save(); - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->storage->getId(); - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - if ($this->storage->getId() !== $id) { - $this->storage->setId($id); - } - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->storage->getName(); - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->storage->setName($name); - } - - /** - * {@inheritdoc} - */ - public function getMetadataBag() - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return $this->storage->getMetadataBag(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - $this->storage->registerBag(new SessionBagProxy($bag, $this->data, $this->usageIndex, $this->usageReporter)); - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - $bag = $this->storage->getBag($name); - - return method_exists($bag, 'getBag') ? $bag->getBag() : $bag; - } - - /** - * Gets the flashbag interface. - * - * @return FlashBagInterface - */ - public function getFlashBag() - { - return $this->getBag($this->flashName); - } - - /** - * Gets the attributebag interface. - * - * Note that this method was added to help with IDE autocompletion. - */ - private function getAttributeBag(): AttributeBagInterface - { - return $this->getBag($this->attributeName); - } -} diff --git a/vendor/symfony/http-foundation/Session/SessionBagInterface.php b/vendor/symfony/http-foundation/Session/SessionBagInterface.php deleted file mode 100644 index 8e37d06..0000000 --- a/vendor/symfony/http-foundation/Session/SessionBagInterface.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * Session Bag store. - * - * @author Drak <drak@zikula.org> - */ -interface SessionBagInterface -{ - /** - * Gets this bag's name. - * - * @return string - */ - public function getName(); - - /** - * Initializes the Bag. - */ - public function initialize(array &$array); - - /** - * Gets the storage key for this bag. - * - * @return string - */ - public function getStorageKey(); - - /** - * Clears out data from bag. - * - * @return mixed Whatever data was contained - */ - public function clear(); -} diff --git a/vendor/symfony/http-foundation/Session/SessionBagProxy.php b/vendor/symfony/http-foundation/Session/SessionBagProxy.php deleted file mode 100644 index 90aa010..0000000 --- a/vendor/symfony/http-foundation/Session/SessionBagProxy.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -final class SessionBagProxy implements SessionBagInterface -{ - private $bag; - private $data; - private $usageIndex; - private $usageReporter; - - public function __construct(SessionBagInterface $bag, array &$data, ?int &$usageIndex, ?callable $usageReporter) - { - $this->bag = $bag; - $this->data = &$data; - $this->usageIndex = &$usageIndex; - $this->usageReporter = $usageReporter; - } - - public function getBag(): SessionBagInterface - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return $this->bag; - } - - public function isEmpty(): bool - { - if (!isset($this->data[$this->bag->getStorageKey()])) { - return true; - } - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - return empty($this->data[$this->bag->getStorageKey()]); - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return $this->bag->getName(); - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$array): void - { - ++$this->usageIndex; - if ($this->usageReporter && 0 <= $this->usageIndex) { - ($this->usageReporter)(); - } - - $this->data[$this->bag->getStorageKey()] = &$array; - - $this->bag->initialize($array); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey(): string - { - return $this->bag->getStorageKey(); - } - - /** - * {@inheritdoc} - */ - public function clear() - { - return $this->bag->clear(); - } -} diff --git a/vendor/symfony/http-foundation/Session/SessionFactory.php b/vendor/symfony/http-foundation/Session/SessionFactory.php deleted file mode 100644 index bd79282..0000000 --- a/vendor/symfony/http-foundation/Session/SessionFactory.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageFactoryInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(Session::class); - -/** - * @author Jérémy Derussé <jeremy@derusse.com> - */ -class SessionFactory implements SessionFactoryInterface -{ - private $requestStack; - private $storageFactory; - private $usageReporter; - - public function __construct(RequestStack $requestStack, SessionStorageFactoryInterface $storageFactory, ?callable $usageReporter = null) - { - $this->requestStack = $requestStack; - $this->storageFactory = $storageFactory; - $this->usageReporter = $usageReporter; - } - - public function createSession(): SessionInterface - { - return new Session($this->storageFactory->createStorage($this->requestStack->getMainRequest()), null, null, $this->usageReporter); - } -} diff --git a/vendor/symfony/http-foundation/Session/SessionFactoryInterface.php b/vendor/symfony/http-foundation/Session/SessionFactoryInterface.php deleted file mode 100644 index b24fdc4..0000000 --- a/vendor/symfony/http-foundation/Session/SessionFactoryInterface.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * @author Kevin Bond <kevinbond@gmail.com> - */ -interface SessionFactoryInterface -{ - public function createSession(): SessionInterface; -} diff --git a/vendor/symfony/http-foundation/Session/SessionInterface.php b/vendor/symfony/http-foundation/Session/SessionInterface.php deleted file mode 100644 index b73dfd0..0000000 --- a/vendor/symfony/http-foundation/Session/SessionInterface.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -use Symfony\Component\HttpFoundation\Session\Storage\MetadataBag; - -/** - * Interface for the session. - * - * @author Drak <drak@zikula.org> - */ -interface SessionInterface -{ - /** - * Starts the session storage. - * - * @return bool - * - * @throws \RuntimeException if session fails to start - */ - public function start(); - - /** - * Returns the session ID. - * - * @return string - */ - public function getId(); - - /** - * Sets the session ID. - */ - public function setId(string $id); - - /** - * Returns the session name. - * - * @return string - */ - public function getName(); - - /** - * Sets the session name. - */ - public function setName(string $name); - - /** - * Invalidates the current session. - * - * Clears all session attributes and flashes and regenerates the - * session and deletes the old session from persistence. - * - * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - */ - public function invalidate(?int $lifetime = null); - - /** - * Migrates the current session to a new session id while maintaining all - * session attributes. - * - * @param bool $destroy Whether to delete the old session or leave it to garbage collection - * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - */ - public function migrate(bool $destroy = false, ?int $lifetime = null); - - /** - * Force the session to be saved and closed. - * - * This method is generally not required for real sessions as - * the session will be automatically saved at the end of - * code execution. - */ - public function save(); - - /** - * Checks if an attribute is defined. - * - * @return bool - */ - public function has(string $name); - - /** - * Returns an attribute. - * - * @param mixed $default The default value if not found - * - * @return mixed - */ - public function get(string $name, $default = null); - - /** - * Sets an attribute. - * - * @param mixed $value - */ - public function set(string $name, $value); - - /** - * Returns attributes. - * - * @return array - */ - public function all(); - - /** - * Sets attributes. - */ - public function replace(array $attributes); - - /** - * Removes an attribute. - * - * @return mixed The removed value or null when it does not exist - */ - public function remove(string $name); - - /** - * Clears all attributes. - */ - public function clear(); - - /** - * Checks if the session was started. - * - * @return bool - */ - public function isStarted(); - - /** - * Registers a SessionBagInterface with the session. - */ - public function registerBag(SessionBagInterface $bag); - - /** - * Gets a bag instance by name. - * - * @return SessionBagInterface - */ - public function getBag(string $name); - - /** - * Gets session meta. - * - * @return MetadataBag - */ - public function getMetadataBag(); -} diff --git a/vendor/symfony/http-foundation/Session/SessionUtils.php b/vendor/symfony/http-foundation/Session/SessionUtils.php deleted file mode 100644 index b5bce4a..0000000 --- a/vendor/symfony/http-foundation/Session/SessionUtils.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session; - -/** - * Session utility functions. - * - * @author Nicolas Grekas <p@tchwork.com> - * @author Rémon van de Kamp <rpkamp@gmail.com> - * - * @internal - */ -final class SessionUtils -{ - /** - * Finds the session header amongst the headers that are to be sent, removes it, and returns - * it so the caller can process it further. - */ - public static function popSessionCookie(string $sessionName, string $sessionId): ?string - { - $sessionCookie = null; - $sessionCookiePrefix = sprintf(' %s=', urlencode($sessionName)); - $sessionCookieWithId = sprintf('%s%s;', $sessionCookiePrefix, urlencode($sessionId)); - $otherCookies = []; - foreach (headers_list() as $h) { - if (0 !== stripos($h, 'Set-Cookie:')) { - continue; - } - if (11 === strpos($h, $sessionCookiePrefix, 11)) { - $sessionCookie = $h; - - if (11 !== strpos($h, $sessionCookieWithId, 11)) { - $otherCookies[] = $h; - } - } else { - $otherCookies[] = $h; - } - } - if (null === $sessionCookie) { - return null; - } - - header_remove('Set-Cookie'); - foreach ($otherCookies as $h) { - header($h, false); - } - - return $sessionCookie; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php deleted file mode 100644 index 35d7b4b..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php +++ /dev/null @@ -1,155 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\HttpFoundation\Session\SessionUtils; - -/** - * This abstract session handler provides a generic implementation - * of the PHP 7.0 SessionUpdateTimestampHandlerInterface, - * enabling strict and lazy session handling. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -abstract class AbstractSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - private $sessionName; - private $prefetchId; - private $prefetchData; - private $newSessionId; - private $igbinaryEmptyData; - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $this->sessionName = $sessionName; - if (!headers_sent() && !\ini_get('session.cache_limiter') && '0' !== \ini_get('session.cache_limiter')) { - header(sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) \ini_get('session.cache_expire'))); - } - - return true; - } - - /** - * @return string - */ - abstract protected function doRead(string $sessionId); - - /** - * @return bool - */ - abstract protected function doWrite(string $sessionId, string $data); - - /** - * @return bool - */ - abstract protected function doDestroy(string $sessionId); - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - $this->prefetchData = $this->read($sessionId); - $this->prefetchId = $sessionId; - - if (\PHP_VERSION_ID < 70317 || (70400 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70405)) { - // work around https://bugs.php.net/79413 - foreach (debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { - if (!isset($frame['class']) && isset($frame['function']) && \in_array($frame['function'], ['session_regenerate_id', 'session_create_id'], true)) { - return '' === $this->prefetchData; - } - } - } - - return '' !== $this->prefetchData; - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - if (null !== $this->prefetchId) { - $prefetchId = $this->prefetchId; - $prefetchData = $this->prefetchData; - $this->prefetchId = $this->prefetchData = null; - - if ($prefetchId === $sessionId || '' === $prefetchData) { - $this->newSessionId = '' === $prefetchData ? $sessionId : null; - - return $prefetchData; - } - } - - $data = $this->doRead($sessionId); - $this->newSessionId = '' === $data ? $sessionId : null; - - return $data; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - if (null === $this->igbinaryEmptyData) { - // see https://github.com/igbinary/igbinary/issues/146 - $this->igbinaryEmptyData = \function_exists('igbinary_serialize') ? igbinary_serialize([]) : ''; - } - if ('' === $data || $this->igbinaryEmptyData === $data) { - return $this->destroy($sessionId); - } - $this->newSessionId = null; - - return $this->doWrite($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - if (!headers_sent() && filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN)) { - if (!$this->sessionName) { - throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', static::class)); - } - $cookie = SessionUtils::popSessionCookie($this->sessionName, $sessionId); - - /* - * We send an invalidation Set-Cookie header (zero lifetime) - * when either the session was started or a cookie with - * the session name was sent by the client (in which case - * we know it's invalid as a valid session cookie would've - * started the session). - */ - if (null === $cookie || isset($_COOKIE[$this->sessionName])) { - if (\PHP_VERSION_ID < 70300) { - setcookie($this->sessionName, '', 0, \ini_get('session.cookie_path'), \ini_get('session.cookie_domain'), filter_var(\ini_get('session.cookie_secure'), \FILTER_VALIDATE_BOOLEAN), filter_var(\ini_get('session.cookie_httponly'), \FILTER_VALIDATE_BOOLEAN)); - } else { - $params = session_get_cookie_params(); - unset($params['lifetime']); - setcookie($this->sessionName, '', $params); - } - } - } - - return $this->newSessionId === $sessionId || $this->doDestroy($sessionId); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php b/vendor/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php deleted file mode 100644 index bea3a32..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/IdentityMarshaller.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Ahmed TAILOULOUTE <ahmed.tailouloute@gmail.com> - */ -class IdentityMarshaller implements MarshallerInterface -{ - /** - * {@inheritdoc} - */ - public function marshall(array $values, ?array &$failed): array - { - foreach ($values as $key => $value) { - if (!\is_string($value)) { - throw new \LogicException(sprintf('%s accepts only string as data.', __METHOD__)); - } - } - - return $values; - } - - /** - * {@inheritdoc} - */ - public function unmarshall(string $value): string - { - return $value; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php deleted file mode 100644 index c321c8c..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MarshallingSessionHandler.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Symfony\Component\Cache\Marshaller\MarshallerInterface; - -/** - * @author Ahmed TAILOULOUTE <ahmed.tailouloute@gmail.com> - */ -class MarshallingSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - private $handler; - private $marshaller; - - public function __construct(AbstractSessionHandler $handler, MarshallerInterface $marshaller) - { - $this->handler = $handler; - $this->marshaller = $marshaller; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $name) - { - return $this->handler->open($savePath, $name); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - return $this->handler->destroy($sessionId); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - return $this->marshaller->unmarshall($this->handler->read($sessionId)); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - $failed = []; - $marshalledData = $this->marshaller->marshall(['data' => $data], $failed); - - if (isset($failed['data'])) { - return false; - } - - return $this->handler->write($sessionId, $marshalledData['data']); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return $this->handler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->handler->updateTimestamp($sessionId, $data); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php deleted file mode 100644 index e0ec4d2..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Memcached based session storage handler based on the Memcached class - * provided by the PHP memcached extension. - * - * @see https://php.net/memcached - * - * @author Drak <drak@zikula.org> - */ -class MemcachedSessionHandler extends AbstractSessionHandler -{ - private $memcached; - - /** - * @var int Time to live in seconds - */ - private $ttl; - - /** - * @var string Key prefix for shared environments - */ - private $prefix; - - /** - * Constructor. - * - * List of available options: - * * prefix: The prefix to use for the memcached keys in order to avoid collision - * * ttl: The time to live in seconds. - * - * @throws \InvalidArgumentException When unsupported options are passed - */ - public function __construct(\Memcached $memcached, array $options = []) - { - $this->memcached = $memcached; - - if ($diff = array_diff(array_keys($options), ['prefix', 'expiretime', 'ttl'])) { - throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff))); - } - - $this->ttl = $options['expiretime'] ?? $options['ttl'] ?? null; - $this->prefix = $options['prefix'] ?? 'sf2s'; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->memcached->quit(); - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return $this->memcached->get($this->prefix.$sessionId) ?: ''; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $this->memcached->touch($this->prefix.$sessionId, $this->getCompatibleTtl()); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return $this->memcached->set($this->prefix.$sessionId, $data, $this->getCompatibleTtl()); - } - - private function getCompatibleTtl(): int - { - $ttl = (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime')); - - // If the relative TTL that is used exceeds 30 days, memcached will treat the value as Unix time. - // We have to convert it to an absolute Unix time at this point, to make sure the TTL is correct. - if ($ttl > 60 * 60 * 24 * 30) { - $ttl += time(); - } - - return $ttl; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $result = $this->memcached->delete($this->prefix.$sessionId); - - return $result || \Memcached::RES_NOTFOUND == $this->memcached->getResultCode(); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - // not required here because memcached will auto expire the records anyhow. - return 0; - } - - /** - * Return a Memcached instance. - * - * @return \Memcached - */ - protected function getMemcached() - { - return $this->memcached; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php deleted file mode 100644 index bf27ca6..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MigratingSessionHandler.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Migrating session handler for migrating from one handler to another. It reads - * from the current handler and writes both the current and new ones. - * - * It ignores errors from the new handler. - * - * @author Ross Motley <ross.motley@amara.com> - * @author Oliver Radwell <oliver.radwell@amara.com> - */ -class MigratingSessionHandler implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - /** - * @var \SessionHandlerInterface&\SessionUpdateTimestampHandlerInterface - */ - private $currentHandler; - - /** - * @var \SessionHandlerInterface&\SessionUpdateTimestampHandlerInterface - */ - private $writeOnlyHandler; - - public function __construct(\SessionHandlerInterface $currentHandler, \SessionHandlerInterface $writeOnlyHandler) - { - if (!$currentHandler instanceof \SessionUpdateTimestampHandlerInterface) { - $currentHandler = new StrictSessionHandler($currentHandler); - } - if (!$writeOnlyHandler instanceof \SessionUpdateTimestampHandlerInterface) { - $writeOnlyHandler = new StrictSessionHandler($writeOnlyHandler); - } - - $this->currentHandler = $currentHandler; - $this->writeOnlyHandler = $writeOnlyHandler; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - $result = $this->currentHandler->close(); - $this->writeOnlyHandler->close(); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - $result = $this->currentHandler->destroy($sessionId); - $this->writeOnlyHandler->destroy($sessionId); - - return $result; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - $result = $this->currentHandler->gc($maxlifetime); - $this->writeOnlyHandler->gc($maxlifetime); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $result = $this->currentHandler->open($savePath, $sessionName); - $this->writeOnlyHandler->open($savePath, $sessionName); - - return $result; - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - // No reading from new handler until switch-over - return $this->currentHandler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $sessionData) - { - $result = $this->currentHandler->write($sessionId, $sessionData); - $this->writeOnlyHandler->write($sessionId, $sessionData); - - return $result; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - // No reading from new handler until switch-over - return $this->currentHandler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $sessionData) - { - $result = $this->currentHandler->updateTimestamp($sessionId, $sessionData); - $this->writeOnlyHandler->updateTimestamp($sessionId, $sessionData); - - return $result; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php deleted file mode 100644 index ef8f719..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ /dev/null @@ -1,193 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use MongoDB\BSON\Binary; -use MongoDB\BSON\UTCDateTime; -use MongoDB\Client; -use MongoDB\Collection; - -/** - * Session handler using the mongodb/mongodb package and MongoDB driver extension. - * - * @author Markus Bachmann <markus.bachmann@bachi.biz> - * - * @see https://packagist.org/packages/mongodb/mongodb - * @see https://php.net/mongodb - */ -class MongoDbSessionHandler extends AbstractSessionHandler -{ - private $mongo; - - /** - * @var Collection - */ - private $collection; - - /** - * @var array - */ - private $options; - - /** - * Constructor. - * - * List of available options: - * * database: The name of the database [required] - * * collection: The name of the collection [required] - * * id_field: The field name for storing the session id [default: _id] - * * data_field: The field name for storing the session data [default: data] - * * time_field: The field name for storing the timestamp [default: time] - * * expiry_field: The field name for storing the expiry-timestamp [default: expires_at]. - * - * It is strongly recommended to put an index on the `expiry_field` for - * garbage-collection. Alternatively it's possible to automatically expire - * the sessions in the database as described below: - * - * A TTL collections can be used on MongoDB 2.2+ to cleanup expired sessions - * automatically. Such an index can for example look like this: - * - * db.<session-collection>.createIndex( - * { "<expiry-field>": 1 }, - * { "expireAfterSeconds": 0 } - * ) - * - * More details on: https://docs.mongodb.org/manual/tutorial/expire-data/ - * - * If you use such an index, you can drop `gc_probability` to 0 since - * no garbage-collection is required. - * - * @throws \InvalidArgumentException When "database" or "collection" not provided - */ - public function __construct(Client $mongo, array $options) - { - if (!isset($options['database']) || !isset($options['collection'])) { - throw new \InvalidArgumentException('You must provide the "database" and "collection" option for MongoDBSessionHandler.'); - } - - $this->mongo = $mongo; - - $this->options = array_merge([ - 'id_field' => '_id', - 'data_field' => 'data', - 'time_field' => 'time', - 'expiry_field' => 'expires_at', - ], $options); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $this->getCollection()->deleteOne([ - $this->options['id_field'] => $sessionId, - ]); - - return true; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->getCollection()->deleteMany([ - $this->options['expiry_field'] => ['$lt' => new UTCDateTime()], - ])->getDeletedCount(); - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - $expiry = new UTCDateTime((time() + (int) \ini_get('session.gc_maxlifetime')) * 1000); - - $fields = [ - $this->options['time_field'] => new UTCDateTime(), - $this->options['expiry_field'] => $expiry, - $this->options['data_field'] => new Binary($data, Binary::TYPE_OLD_BINARY), - ]; - - $this->getCollection()->updateOne( - [$this->options['id_field'] => $sessionId], - ['$set' => $fields], - ['upsert' => true] - ); - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $expiry = new UTCDateTime((time() + (int) \ini_get('session.gc_maxlifetime')) * 1000); - - $this->getCollection()->updateOne( - [$this->options['id_field'] => $sessionId], - ['$set' => [ - $this->options['time_field'] => new UTCDateTime(), - $this->options['expiry_field'] => $expiry, - ]] - ); - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - $dbData = $this->getCollection()->findOne([ - $this->options['id_field'] => $sessionId, - $this->options['expiry_field'] => ['$gte' => new UTCDateTime()], - ]); - - if (null === $dbData) { - return ''; - } - - return $dbData[$this->options['data_field']]->getData(); - } - - private function getCollection(): Collection - { - if (null === $this->collection) { - $this->collection = $this->mongo->selectCollection($this->options['database'], $this->options['collection']); - } - - return $this->collection; - } - - /** - * @return Client - */ - protected function getMongo() - { - return $this->mongo; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php deleted file mode 100644 index 570d4f4..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Native session handler using PHP's built in file storage. - * - * @author Drak <drak@zikula.org> - */ -class NativeFileSessionHandler extends \SessionHandler -{ - /** - * @param string|null $savePath Path of directory to save session files - * Default null will leave setting as defined by PHP. - * '/path', 'N;/path', or 'N;octal-mode;/path - * - * @see https://php.net/session.configuration#ini.session.save-path for further details. - * - * @throws \InvalidArgumentException On invalid $savePath - * @throws \RuntimeException When failing to create the save directory - */ - public function __construct(?string $savePath = null) - { - if (null === $savePath) { - $savePath = \ini_get('session.save_path'); - } - - $baseDir = $savePath; - - if ($count = substr_count($savePath, ';')) { - if ($count > 2) { - throw new \InvalidArgumentException(sprintf('Invalid argument $savePath \'%s\'.', $savePath)); - } - - // characters after last ';' are the path - $baseDir = ltrim(strrchr($savePath, ';'), ';'); - } - - if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir, 0777, true) && !is_dir($baseDir)) { - throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $baseDir)); - } - - if ($savePath !== \ini_get('session.save_path')) { - ini_set('session.save_path', $savePath); - } - if ('files' !== \ini_get('session.save_handler')) { - ini_set('session.save_handler', 'files'); - } - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php deleted file mode 100644 index 4331dbe..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/NullSessionHandler.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Can be used in unit testing or in a situations where persisted sessions are not desired. - * - * @author Drak <drak@zikula.org> - */ -class NullSessionHandler extends AbstractSessionHandler -{ - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return ''; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return true; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - return true; - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return 0; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php deleted file mode 100644 index f9c5d9b..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ /dev/null @@ -1,943 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Session handler using a PDO connection to read and write data. - * - * It works with MySQL, PostgreSQL, Oracle, SQL Server and SQLite and implements - * different locking strategies to handle concurrent access to the same session. - * Locking is necessary to prevent loss of data due to race conditions and to keep - * the session data consistent between read() and write(). With locking, requests - * for the same session will wait until the other one finished writing. For this - * reason it's best practice to close a session as early as possible to improve - * concurrency. PHPs internal files session handler also implements locking. - * - * Attention: Since SQLite does not support row level locks but locks the whole database, - * it means only one session can be accessed at a time. Even different sessions would wait - * for another to finish. So saving session in SQLite should only be considered for - * development or prototypes. - * - * Session data is a binary string that can contain non-printable characters like the null byte. - * For this reason it must be saved in a binary column in the database like BLOB in MySQL. - * Saving it in a character column could corrupt the data. You can use createTable() - * to initialize a correctly defined table. - * - * @see https://php.net/sessionhandlerinterface - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Michael Williams <michael.williams@funsational.com> - * @author Tobias Schultze <http://tobion.de> - */ -class PdoSessionHandler extends AbstractSessionHandler -{ - /** - * No locking is done. This means sessions are prone to loss of data due to - * race conditions of concurrent requests to the same session. The last session - * write will win in this case. It might be useful when you implement your own - * logic to deal with this like an optimistic approach. - */ - public const LOCK_NONE = 0; - - /** - * Creates an application-level lock on a session. The disadvantage is that the - * lock is not enforced by the database and thus other, unaware parts of the - * application could still concurrently modify the session. The advantage is it - * does not require a transaction. - * This mode is not available for SQLite and not yet implemented for oci and sqlsrv. - */ - public const LOCK_ADVISORY = 1; - - /** - * Issues a real row lock. Since it uses a transaction between opening and - * closing a session, you have to be careful when you use same database connection - * that you also use for your application logic. This mode is the default because - * it's the only reliable solution across DBMSs. - */ - public const LOCK_TRANSACTIONAL = 2; - - private const MAX_LIFETIME = 315576000; - - /** - * @var \PDO|null PDO instance or null when not connected yet - */ - private $pdo; - - /** - * DSN string or null for session.save_path or false when lazy connection disabled. - * - * @var string|false|null - */ - private $dsn = false; - - /** - * @var string|null - */ - private $driver; - - /** - * @var string - */ - private $table = 'sessions'; - - /** - * @var string - */ - private $idCol = 'sess_id'; - - /** - * @var string - */ - private $dataCol = 'sess_data'; - - /** - * @var string - */ - private $lifetimeCol = 'sess_lifetime'; - - /** - * @var string - */ - private $timeCol = 'sess_time'; - - /** - * Username when lazy-connect. - * - * @var string|null - */ - private $username = null; - - /** - * Password when lazy-connect. - * - * @var string|null - */ - private $password = null; - - /** - * Connection options when lazy-connect. - * - * @var array - */ - private $connectionOptions = []; - - /** - * The strategy for locking, see constants. - * - * @var int - */ - private $lockMode = self::LOCK_TRANSACTIONAL; - - /** - * It's an array to support multiple reads before closing which is manual, non-standard usage. - * - * @var \PDOStatement[] An array of statements to release advisory locks - */ - private $unlockStatements = []; - - /** - * True when the current session exists but expired according to session.gc_maxlifetime. - * - * @var bool - */ - private $sessionExpired = false; - - /** - * Whether a transaction is active. - * - * @var bool - */ - private $inTransaction = false; - - /** - * Whether gc() has been called. - * - * @var bool - */ - private $gcCalled = false; - - /** - * You can either pass an existing database connection as PDO instance or - * pass a DSN string that will be used to lazy-connect to the database - * when the session is actually used. Furthermore it's possible to pass null - * which will then use the session.save_path ini setting as PDO DSN parameter. - * - * List of available options: - * * db_table: The name of the table [default: sessions] - * * db_id_col: The column where to store the session id [default: sess_id] - * * db_data_col: The column where to store the session data [default: sess_data] - * * db_lifetime_col: The column where to store the lifetime [default: sess_lifetime] - * * db_time_col: The column where to store the timestamp [default: sess_time] - * * db_username: The username when lazy-connect [default: ''] - * * db_password: The password when lazy-connect [default: ''] - * * db_connection_options: An array of driver-specific connection options [default: []] - * * lock_mode: The strategy for locking, see constants [default: LOCK_TRANSACTIONAL] - * - * @param \PDO|string|null $pdoOrDsn A \PDO instance or DSN string or URL string or null - * - * @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION - */ - public function __construct($pdoOrDsn = null, array $options = []) - { - if ($pdoOrDsn instanceof \PDO) { - if (\PDO::ERRMODE_EXCEPTION !== $pdoOrDsn->getAttribute(\PDO::ATTR_ERRMODE)) { - throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)).', __CLASS__)); - } - - $this->pdo = $pdoOrDsn; - $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); - } elseif (\is_string($pdoOrDsn) && str_contains($pdoOrDsn, '://')) { - $this->dsn = $this->buildDsnFromUrl($pdoOrDsn); - } else { - $this->dsn = $pdoOrDsn; - } - - $this->table = $options['db_table'] ?? $this->table; - $this->idCol = $options['db_id_col'] ?? $this->idCol; - $this->dataCol = $options['db_data_col'] ?? $this->dataCol; - $this->lifetimeCol = $options['db_lifetime_col'] ?? $this->lifetimeCol; - $this->timeCol = $options['db_time_col'] ?? $this->timeCol; - $this->username = $options['db_username'] ?? $this->username; - $this->password = $options['db_password'] ?? $this->password; - $this->connectionOptions = $options['db_connection_options'] ?? $this->connectionOptions; - $this->lockMode = $options['lock_mode'] ?? $this->lockMode; - } - - /** - * Creates the table to store sessions which can be called once for setup. - * - * Session ID is saved in a column of maximum length 128 because that is enough even - * for a 512 bit configured session.hash_function like Whirlpool. Session data is - * saved in a BLOB. One could also use a shorter inlined varbinary column - * if one was sure the data fits into it. - * - * @throws \PDOException When the table already exists - * @throws \DomainException When an unsupported PDO driver is used - */ - public function createTable() - { - // connect if we are not yet - $this->getConnection(); - - switch ($this->driver) { - case 'mysql': - // We use varbinary for the ID column because it prevents unwanted conversions: - // - character set conversions between server and client - // - trailing space removal - // - case-insensitivity - // - language processing like é == e - $sql = "CREATE TABLE $this->table ($this->idCol VARBINARY(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER UNSIGNED NOT NULL, $this->timeCol INTEGER UNSIGNED NOT NULL) COLLATE utf8mb4_bin, ENGINE = InnoDB"; - break; - case 'sqlite': - $sql = "CREATE TABLE $this->table ($this->idCol TEXT NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'pgsql': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol BYTEA NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'oci': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR2(128) NOT NULL PRIMARY KEY, $this->dataCol BLOB NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - case 'sqlsrv': - $sql = "CREATE TABLE $this->table ($this->idCol VARCHAR(128) NOT NULL PRIMARY KEY, $this->dataCol VARBINARY(MAX) NOT NULL, $this->lifetimeCol INTEGER NOT NULL, $this->timeCol INTEGER NOT NULL)"; - break; - default: - throw new \DomainException(sprintf('Creating the session table is currently not implemented for PDO driver "%s".', $this->driver)); - } - - try { - $this->pdo->exec($sql); - $this->pdo->exec("CREATE INDEX EXPIRY ON $this->table ($this->lifetimeCol)"); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - - /** - * Returns true when the current session exists but expired according to session.gc_maxlifetime. - * - * Can be used to distinguish between a new session and one that expired due to inactivity. - * - * @return bool - */ - public function isSessionExpired() - { - return $this->sessionExpired; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - $this->sessionExpired = false; - - if (null === $this->pdo) { - $this->connect($this->dsn ?: $savePath); - } - - return parent::open($savePath, $sessionName); - } - - /** - * @return string - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - try { - return parent::read($sessionId); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - // We delay gc() to close() so that it is executed outside the transactional and blocking read-write process. - // This way, pruning expired sessions does not block them from being started while the current session is used. - $this->gcCalled = true; - - return 0; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - // delete the record associated with this id - $sql = "DELETE FROM $this->table WHERE $this->idCol = :id"; - - try { - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->execute(); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - $maxlifetime = (int) \ini_get('session.gc_maxlifetime'); - - try { - // We use a single MERGE SQL query when supported by the database. - $mergeStmt = $this->getMergeStatement($sessionId, $data, $maxlifetime); - if (null !== $mergeStmt) { - $mergeStmt->execute(); - - return true; - } - - $updateStmt = $this->getUpdateStatement($sessionId, $data, $maxlifetime); - $updateStmt->execute(); - - // When MERGE is not supported, like in Postgres < 9.5, we have to use this approach that can result in - // duplicate key errors when the same session is written simultaneously (given the LOCK_NONE behavior). - // We can just catch such an error and re-execute the update. This is similar to a serializable - // transaction with retry logic on serialization failures but without the overhead and without possible - // false positives due to longer gap locking. - if (!$updateStmt->rowCount()) { - try { - $insertStmt = $this->getInsertStatement($sessionId, $data, $maxlifetime); - $insertStmt->execute(); - } catch (\PDOException $e) { - // Handle integrity violation SQLSTATE 23000 (or a subclass like 23505 in Postgres) for duplicate keys - if (str_starts_with($e->getCode(), '23')) { - $updateStmt->execute(); - } else { - throw $e; - } - } - } - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - $expiry = time() + (int) \ini_get('session.gc_maxlifetime'); - - try { - $updateStmt = $this->pdo->prepare( - "UPDATE $this->table SET $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id" - ); - $updateStmt->bindValue(':id', $sessionId, \PDO::PARAM_STR); - $updateStmt->bindValue(':expiry', $expiry, \PDO::PARAM_INT); - $updateStmt->bindValue(':time', time(), \PDO::PARAM_INT); - $updateStmt->execute(); - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - - return true; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - $this->commit(); - - while ($unlockStmt = array_shift($this->unlockStatements)) { - $unlockStmt->execute(); - } - - if ($this->gcCalled) { - $this->gcCalled = false; - - // delete the session records that have expired - $sql = "DELETE FROM $this->table WHERE $this->lifetimeCol < :time AND $this->lifetimeCol > :min"; - $stmt = $this->pdo->prepare($sql); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->bindValue(':min', self::MAX_LIFETIME, \PDO::PARAM_INT); - $stmt->execute(); - // to be removed in 6.0 - if ('mysql' === $this->driver) { - $legacySql = "DELETE FROM $this->table WHERE $this->lifetimeCol <= :min AND $this->lifetimeCol + $this->timeCol < :time"; - } else { - $legacySql = "DELETE FROM $this->table WHERE $this->lifetimeCol <= :min AND $this->lifetimeCol < :time - $this->timeCol"; - } - - $stmt = $this->pdo->prepare($legacySql); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - $stmt->bindValue(':min', self::MAX_LIFETIME, \PDO::PARAM_INT); - $stmt->execute(); - } - - if (false !== $this->dsn) { - $this->pdo = null; // only close lazy-connection - $this->driver = null; - } - - return true; - } - - /** - * Lazy-connects to the database. - */ - private function connect(string $dsn): void - { - $this->pdo = new \PDO($dsn, $this->username, $this->password, $this->connectionOptions); - $this->pdo->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - $this->driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); - } - - /** - * Builds a PDO DSN from a URL-like connection string. - * - * @todo implement missing support for oci DSN (which look totally different from other PDO ones) - */ - private function buildDsnFromUrl(string $dsnOrUrl): string - { - // (pdo_)?sqlite3?:///... => (pdo_)?sqlite3?://localhost/... or else the URL will be invalid - $url = preg_replace('#^((?:pdo_)?sqlite3?):///#', '$1://localhost/', $dsnOrUrl); - - $params = parse_url($url); - - if (false === $params) { - return $dsnOrUrl; // If the URL is not valid, let's assume it might be a DSN already. - } - - $params = array_map('rawurldecode', $params); - - // Override the default username and password. Values passed through options will still win over these in the constructor. - if (isset($params['user'])) { - $this->username = $params['user']; - } - - if (isset($params['pass'])) { - $this->password = $params['pass']; - } - - if (!isset($params['scheme'])) { - throw new \InvalidArgumentException('URLs without scheme are not supported to configure the PdoSessionHandler.'); - } - - $driverAliasMap = [ - 'mssql' => 'sqlsrv', - 'mysql2' => 'mysql', // Amazon RDS, for some weird reason - 'postgres' => 'pgsql', - 'postgresql' => 'pgsql', - 'sqlite3' => 'sqlite', - ]; - - $driver = $driverAliasMap[$params['scheme']] ?? $params['scheme']; - - // Doctrine DBAL supports passing its internal pdo_* driver names directly too (allowing both dashes and underscores). This allows supporting the same here. - if (str_starts_with($driver, 'pdo_') || str_starts_with($driver, 'pdo-')) { - $driver = substr($driver, 4); - } - - $dsn = null; - switch ($driver) { - case 'mysql': - $dsn = 'mysql:'; - if ('' !== ($params['query'] ?? '')) { - $queryParams = []; - parse_str($params['query'], $queryParams); - if ('' !== ($queryParams['charset'] ?? '')) { - $dsn .= 'charset='.$queryParams['charset'].';'; - } - - if ('' !== ($queryParams['unix_socket'] ?? '')) { - $dsn .= 'unix_socket='.$queryParams['unix_socket'].';'; - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= 'dbname='.$dbName.';'; - } - - return $dsn; - } - } - // If "unix_socket" is not in the query, we continue with the same process as pgsql - // no break - case 'pgsql': - $dsn ?? $dsn = 'pgsql:'; - - if (isset($params['host']) && '' !== $params['host']) { - $dsn .= 'host='.$params['host'].';'; - } - - if (isset($params['port']) && '' !== $params['port']) { - $dsn .= 'port='.$params['port'].';'; - } - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= 'dbname='.$dbName.';'; - } - - return $dsn; - - case 'sqlite': - return 'sqlite:'.substr($params['path'], 1); - - case 'sqlsrv': - $dsn = 'sqlsrv:server='; - - if (isset($params['host'])) { - $dsn .= $params['host']; - } - - if (isset($params['port']) && '' !== $params['port']) { - $dsn .= ','.$params['port']; - } - - if (isset($params['path'])) { - $dbName = substr($params['path'], 1); // Remove the leading slash - $dsn .= ';Database='.$dbName; - } - - return $dsn; - - default: - throw new \InvalidArgumentException(sprintf('The scheme "%s" is not supported by the PdoSessionHandler URL configuration. Pass a PDO DSN directly.', $params['scheme'])); - } - } - - /** - * Helper method to begin a transaction. - * - * Since SQLite does not support row level locks, we have to acquire a reserved lock - * on the database immediately. Because of https://bugs.php.net/42766 we have to create - * such a transaction manually which also means we cannot use PDO::commit or - * PDO::rollback or PDO::inTransaction for SQLite. - * - * Also MySQLs default isolation, REPEATABLE READ, causes deadlock for different sessions - * due to https://percona.com/blog/2013/12/12/one-more-innodb-gap-lock-to-avoid/ . - * So we change it to READ COMMITTED. - */ - private function beginTransaction(): void - { - if (!$this->inTransaction) { - if ('sqlite' === $this->driver) { - $this->pdo->exec('BEGIN IMMEDIATE TRANSACTION'); - } else { - if ('mysql' === $this->driver) { - $this->pdo->exec('SET TRANSACTION ISOLATION LEVEL READ COMMITTED'); - } - $this->pdo->beginTransaction(); - } - $this->inTransaction = true; - } - } - - /** - * Helper method to commit a transaction. - */ - private function commit(): void - { - if ($this->inTransaction) { - try { - // commit read-write transaction which also releases the lock - if ('sqlite' === $this->driver) { - $this->pdo->exec('COMMIT'); - } else { - $this->pdo->commit(); - } - $this->inTransaction = false; - } catch (\PDOException $e) { - $this->rollback(); - - throw $e; - } - } - } - - /** - * Helper method to rollback a transaction. - */ - private function rollback(): void - { - // We only need to rollback if we are in a transaction. Otherwise the resulting - // error would hide the real problem why rollback was called. We might not be - // in a transaction when not using the transactional locking behavior or when - // two callbacks (e.g. destroy and write) are invoked that both fail. - if ($this->inTransaction) { - if ('sqlite' === $this->driver) { - $this->pdo->exec('ROLLBACK'); - } else { - $this->pdo->rollBack(); - } - $this->inTransaction = false; - } - } - - /** - * Reads the session data in respect to the different locking strategies. - * - * We need to make sure we do not return session data that is already considered garbage according - * to the session.gc_maxlifetime setting because gc() is called after read() and only sometimes. - * - * @return string - */ - protected function doRead(string $sessionId) - { - if (self::LOCK_ADVISORY === $this->lockMode) { - $this->unlockStatements[] = $this->doAdvisoryLock($sessionId); - } - - $selectSql = $this->getSelectSql(); - $selectStmt = $this->pdo->prepare($selectSql); - $selectStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $insertStmt = null; - - while (true) { - $selectStmt->execute(); - $sessionRows = $selectStmt->fetchAll(\PDO::FETCH_NUM); - - if ($sessionRows) { - $expiry = (int) $sessionRows[0][1]; - if ($expiry <= self::MAX_LIFETIME) { - $expiry += $sessionRows[0][2]; - } - - if ($expiry < time()) { - $this->sessionExpired = true; - - return ''; - } - - return \is_resource($sessionRows[0][0]) ? stream_get_contents($sessionRows[0][0]) : $sessionRows[0][0]; - } - - if (null !== $insertStmt) { - $this->rollback(); - throw new \RuntimeException('Failed to read session: INSERT reported a duplicate id but next SELECT did not return any data.'); - } - - if (!filter_var(\ini_get('session.use_strict_mode'), \FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { - // In strict mode, session fixation is not possible: new sessions always start with a unique - // random id, so that concurrency is not possible and this code path can be skipped. - // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block - // until other connections to the session are committed. - try { - $insertStmt = $this->getInsertStatement($sessionId, '', 0); - $insertStmt->execute(); - } catch (\PDOException $e) { - // Catch duplicate key error because other connection created the session already. - // It would only not be the case when the other connection destroyed the session. - if (str_starts_with($e->getCode(), '23')) { - // Retrieve finished session data written by concurrent connection by restarting the loop. - // We have to start a new transaction as a failed query will mark the current transaction as - // aborted in PostgreSQL and disallow further queries within it. - $this->rollback(); - $this->beginTransaction(); - continue; - } - - throw $e; - } - } - - return ''; - } - } - - /** - * Executes an application-level lock on the database. - * - * @return \PDOStatement The statement that needs to be executed later to release the lock - * - * @throws \DomainException When an unsupported PDO driver is used - * - * @todo implement missing advisory locks - * - for oci using DBMS_LOCK.REQUEST - * - for sqlsrv using sp_getapplock with LockOwner = Session - */ - private function doAdvisoryLock(string $sessionId): \PDOStatement - { - switch ($this->driver) { - case 'mysql': - // MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced. - $lockId = substr($sessionId, 0, 64); - // should we handle the return value? 0 on timeout, null on error - // we use a timeout of 50 seconds which is also the default for innodb_lock_wait_timeout - $stmt = $this->pdo->prepare('SELECT GET_LOCK(:key, 50)'); - $stmt->bindValue(':key', $lockId, \PDO::PARAM_STR); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('DO RELEASE_LOCK(:key)'); - $releaseStmt->bindValue(':key', $lockId, \PDO::PARAM_STR); - - return $releaseStmt; - case 'pgsql': - // Obtaining an exclusive session level advisory lock requires an integer key. - // When session.sid_bits_per_character > 4, the session id can contain non-hex-characters. - // So we cannot just use hexdec(). - if (4 === \PHP_INT_SIZE) { - $sessionInt1 = $this->convertStringToInt($sessionId); - $sessionInt2 = $this->convertStringToInt(substr($sessionId, 4, 4)); - - $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key1, :key2)'); - $stmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); - $stmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('SELECT pg_advisory_unlock(:key1, :key2)'); - $releaseStmt->bindValue(':key1', $sessionInt1, \PDO::PARAM_INT); - $releaseStmt->bindValue(':key2', $sessionInt2, \PDO::PARAM_INT); - } else { - $sessionBigInt = $this->convertStringToInt($sessionId); - - $stmt = $this->pdo->prepare('SELECT pg_advisory_lock(:key)'); - $stmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); - $stmt->execute(); - - $releaseStmt = $this->pdo->prepare('SELECT pg_advisory_unlock(:key)'); - $releaseStmt->bindValue(':key', $sessionBigInt, \PDO::PARAM_INT); - } - - return $releaseStmt; - case 'sqlite': - throw new \DomainException('SQLite does not support advisory locks.'); - default: - throw new \DomainException(sprintf('Advisory locks are currently not implemented for PDO driver "%s".', $this->driver)); - } - } - - /** - * Encodes the first 4 (when PHP_INT_SIZE == 4) or 8 characters of the string as an integer. - * - * Keep in mind, PHP integers are signed. - */ - private function convertStringToInt(string $string): int - { - if (4 === \PHP_INT_SIZE) { - return (\ord($string[3]) << 24) + (\ord($string[2]) << 16) + (\ord($string[1]) << 8) + \ord($string[0]); - } - - $int1 = (\ord($string[7]) << 24) + (\ord($string[6]) << 16) + (\ord($string[5]) << 8) + \ord($string[4]); - $int2 = (\ord($string[3]) << 24) + (\ord($string[2]) << 16) + (\ord($string[1]) << 8) + \ord($string[0]); - - return $int2 + ($int1 << 32); - } - - /** - * Return a locking or nonlocking SQL query to read session information. - * - * @throws \DomainException When an unsupported PDO driver is used - */ - private function getSelectSql(): string - { - if (self::LOCK_TRANSACTIONAL === $this->lockMode) { - $this->beginTransaction(); - - // selecting the time column should be removed in 6.0 - switch ($this->driver) { - case 'mysql': - case 'oci': - case 'pgsql': - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WHERE $this->idCol = :id FOR UPDATE"; - case 'sqlsrv': - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WITH (UPDLOCK, ROWLOCK) WHERE $this->idCol = :id"; - case 'sqlite': - // we already locked when starting transaction - break; - default: - throw new \DomainException(sprintf('Transactional locks are currently not implemented for PDO driver "%s".', $this->driver)); - } - } - - return "SELECT $this->dataCol, $this->lifetimeCol, $this->timeCol FROM $this->table WHERE $this->idCol = :id"; - } - - /** - * Returns an insert statement supported by the database for writing session data. - */ - private function getInsertStatement(string $sessionId, string $sessionData, int $maxlifetime): \PDOStatement - { - switch ($this->driver) { - case 'oci': - $data = fopen('php://memory', 'r+'); - fwrite($data, $sessionData); - rewind($data); - $sql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, EMPTY_BLOB(), :expiry, :time) RETURNING $this->dataCol into :data"; - break; - default: - $data = $sessionData; - $sql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time)"; - break; - } - - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - - return $stmt; - } - - /** - * Returns an update statement supported by the database for writing session data. - */ - private function getUpdateStatement(string $sessionId, string $sessionData, int $maxlifetime): \PDOStatement - { - switch ($this->driver) { - case 'oci': - $data = fopen('php://memory', 'r+'); - fwrite($data, $sessionData); - rewind($data); - $sql = "UPDATE $this->table SET $this->dataCol = EMPTY_BLOB(), $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id RETURNING $this->dataCol into :data"; - break; - default: - $data = $sessionData; - $sql = "UPDATE $this->table SET $this->dataCol = :data, $this->lifetimeCol = :expiry, $this->timeCol = :time WHERE $this->idCol = :id"; - break; - } - - $stmt = $this->pdo->prepare($sql); - $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $stmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $stmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $stmt->bindValue(':time', time(), \PDO::PARAM_INT); - - return $stmt; - } - - /** - * Returns a merge/upsert (i.e. insert or update) statement when supported by the database for writing session data. - */ - private function getMergeStatement(string $sessionId, string $data, int $maxlifetime): ?\PDOStatement - { - switch (true) { - case 'mysql' === $this->driver: - $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time) ". - "ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->lifetimeCol = VALUES($this->lifetimeCol), $this->timeCol = VALUES($this->timeCol)"; - break; - case 'sqlsrv' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>='): - // MERGE is only available since SQL Server 2008 and must be terminated by semicolon - // It also requires HOLDLOCK according to https://weblogs.sqlteam.com/dang/2009/01/31/upsert-race-condition-with-merge/ - $mergeSql = "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = ?) ". - "WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (?, ?, ?, ?) ". - "WHEN MATCHED THEN UPDATE SET $this->dataCol = ?, $this->lifetimeCol = ?, $this->timeCol = ?;"; - break; - case 'sqlite' === $this->driver: - $mergeSql = "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time)"; - break; - case 'pgsql' === $this->driver && version_compare($this->pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), '9.5', '>='): - $mergeSql = "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->lifetimeCol, $this->timeCol) VALUES (:id, :data, :expiry, :time) ". - "ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->lifetimeCol, $this->timeCol) = (EXCLUDED.$this->dataCol, EXCLUDED.$this->lifetimeCol, EXCLUDED.$this->timeCol)"; - break; - default: - // MERGE is not supported with LOBs: https://oracle.com/technetwork/articles/fuecks-lobs-095315.html - return null; - } - - $mergeStmt = $this->pdo->prepare($mergeSql); - - if ('sqlsrv' === $this->driver) { - $mergeStmt->bindParam(1, $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(2, $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(3, $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(4, time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(5, time(), \PDO::PARAM_INT); - $mergeStmt->bindParam(6, $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(7, time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(8, time(), \PDO::PARAM_INT); - } else { - $mergeStmt->bindParam(':id', $sessionId, \PDO::PARAM_STR); - $mergeStmt->bindParam(':data', $data, \PDO::PARAM_LOB); - $mergeStmt->bindValue(':expiry', time() + $maxlifetime, \PDO::PARAM_INT); - $mergeStmt->bindValue(':time', time(), \PDO::PARAM_INT); - } - - return $mergeStmt; - } - - /** - * Return a PDO instance. - * - * @return \PDO - */ - protected function getConnection() - { - if (null === $this->pdo) { - $this->connect($this->dsn ?: \ini_get('session.save_path')); - } - - return $this->pdo; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php deleted file mode 100644 index 31954e6..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/RedisSessionHandler.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Predis\Response\ErrorInterface; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; - -/** - * Redis based session storage handler based on the Redis class - * provided by the PHP redis extension. - * - * @author Dalibor Karlović <dalibor@flexolabs.io> - */ -class RedisSessionHandler extends AbstractSessionHandler -{ - private $redis; - - /** - * @var string Key prefix for shared environments - */ - private $prefix; - - /** - * @var int Time to live in seconds - */ - private $ttl; - - /** - * List of available options: - * * prefix: The prefix to use for the keys in order to avoid collision on the Redis server - * * ttl: The time to live in seconds. - * - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy $redis - * - * @throws \InvalidArgumentException When unsupported client or options are passed - */ - public function __construct($redis, array $options = []) - { - if ( - !$redis instanceof \Redis && - !$redis instanceof \RedisArray && - !$redis instanceof \RedisCluster && - !$redis instanceof \Predis\ClientInterface && - !$redis instanceof RedisProxy && - !$redis instanceof RedisClusterProxy - ) { - throw new \InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\ClientInterface, "%s" given.', __METHOD__, get_debug_type($redis))); - } - - if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) { - throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff))); - } - - $this->redis = $redis; - $this->prefix = $options['prefix'] ?? 'sf_s'; - $this->ttl = $options['ttl'] ?? null; - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId): string - { - return $this->redis->get($this->prefix.$sessionId) ?: ''; - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data): bool - { - $result = $this->redis->setEx($this->prefix.$sessionId, (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime')), $data); - - return $result && !$result instanceof ErrorInterface; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId): bool - { - static $unlink = true; - - if ($unlink) { - try { - $unlink = false !== $this->redis->unlink($this->prefix.$sessionId); - } catch (\Throwable $e) { - $unlink = false; - } - } - - if (!$unlink) { - $this->redis->del($this->prefix.$sessionId); - } - - return true; - } - - /** - * {@inheritdoc} - */ - #[\ReturnTypeWillChange] - public function close(): bool - { - return true; - } - - /** - * {@inheritdoc} - * - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return 0; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return (bool) $this->redis->expire($this->prefix.$sessionId, (int) ($this->ttl ?? \ini_get('session.gc_maxlifetime'))); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php b/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php deleted file mode 100644 index 76e4373..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/SessionHandlerFactory.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -use Doctrine\DBAL\Configuration; -use Doctrine\DBAL\DriverManager; -use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; -use Doctrine\DBAL\Tools\DsnParser; -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Traits\RedisClusterProxy; -use Symfony\Component\Cache\Traits\RedisProxy; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class SessionHandlerFactory -{ - /** - * @param \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|RedisProxy|RedisClusterProxy|\Memcached|\PDO|string $connection Connection or DSN - */ - public static function createHandler($connection): AbstractSessionHandler - { - if (!\is_string($connection) && !\is_object($connection)) { - throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be a string or a connection object, "%s" given.', __METHOD__, get_debug_type($connection))); - } - - if ($options = \is_string($connection) ? parse_url($connection) : false) { - parse_str($options['query'] ?? '', $options); - } - - switch (true) { - case $connection instanceof \Redis: - case $connection instanceof \RedisArray: - case $connection instanceof \RedisCluster: - case $connection instanceof \Predis\ClientInterface: - case $connection instanceof RedisProxy: - case $connection instanceof RedisClusterProxy: - return new RedisSessionHandler($connection); - - case $connection instanceof \Memcached: - return new MemcachedSessionHandler($connection); - - case $connection instanceof \PDO: - return new PdoSessionHandler($connection); - - case !\is_string($connection): - throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', get_debug_type($connection))); - case str_starts_with($connection, 'file://'): - $savePath = substr($connection, 7); - - return new StrictSessionHandler(new NativeFileSessionHandler('' === $savePath ? null : $savePath)); - - case str_starts_with($connection, 'redis:'): - case str_starts_with($connection, 'rediss:'): - case str_starts_with($connection, 'memcached:'): - if (!class_exists(AbstractAdapter::class)) { - throw new \InvalidArgumentException('Unsupported Redis or Memcached DSN. Try running "composer require symfony/cache".'); - } - $handlerClass = str_starts_with($connection, 'memcached:') ? MemcachedSessionHandler::class : RedisSessionHandler::class; - $connection = AbstractAdapter::createConnection($connection, ['lazy' => true]); - - return new $handlerClass($connection, array_intersect_key($options ?: [], ['prefix' => 1, 'ttl' => 1])); - - case str_starts_with($connection, 'pdo_oci://'): - if (!class_exists(DriverManager::class)) { - throw new \InvalidArgumentException('Unsupported PDO OCI DSN. Try running "composer require doctrine/dbal".'); - } - $connection[3] = '-'; - $params = class_exists(DsnParser::class) ? (new DsnParser())->parse($connection) : ['url' => $connection]; - $config = new Configuration(); - if (class_exists(DefaultSchemaManagerFactory::class)) { - $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); - } - - $connection = DriverManager::getConnection($params, $config); - // The condition should be removed once support for DBAL <3.3 is dropped - $connection = method_exists($connection, 'getNativeConnection') ? $connection->getNativeConnection() : $connection->getWrappedConnection(); - // no break; - - case str_starts_with($connection, 'mssql://'): - case str_starts_with($connection, 'mysql://'): - case str_starts_with($connection, 'mysql2://'): - case str_starts_with($connection, 'pgsql://'): - case str_starts_with($connection, 'postgres://'): - case str_starts_with($connection, 'postgresql://'): - case str_starts_with($connection, 'sqlsrv://'): - case str_starts_with($connection, 'sqlite://'): - case str_starts_with($connection, 'sqlite3://'): - return new PdoSessionHandler($connection, $options ?: []); - } - - throw new \InvalidArgumentException(sprintf('Unsupported Connection: "%s".', $connection)); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php deleted file mode 100644 index f7c385f..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/StrictSessionHandler.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; - -/** - * Adds basic `SessionUpdateTimestampHandlerInterface` behaviors to another `SessionHandlerInterface`. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class StrictSessionHandler extends AbstractSessionHandler -{ - private $handler; - private $doDestroy; - - public function __construct(\SessionHandlerInterface $handler) - { - if ($handler instanceof \SessionUpdateTimestampHandlerInterface) { - throw new \LogicException(sprintf('"%s" is already an instance of "SessionUpdateTimestampHandlerInterface", you cannot wrap it with "%s".', get_debug_type($handler), self::class)); - } - - $this->handler = $handler; - } - - /** - * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. - * - * @internal - */ - public function isWrapper(): bool - { - return $this->handler instanceof \SessionHandler; - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - parent::open($savePath, $sessionName); - - return $this->handler->open($savePath, $sessionName); - } - - /** - * {@inheritdoc} - */ - protected function doRead(string $sessionId) - { - return $this->handler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->write($sessionId, $data); - } - - /** - * {@inheritdoc} - */ - protected function doWrite(string $sessionId, string $data) - { - return $this->handler->write($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - $this->doDestroy = true; - $destroyed = parent::destroy($sessionId); - - return $this->doDestroy ? $this->doDestroy($sessionId) : $destroyed; - } - - /** - * {@inheritdoc} - */ - protected function doDestroy(string $sessionId) - { - $this->doDestroy = false; - - return $this->handler->destroy($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php b/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php deleted file mode 100644 index 3e10f6d..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/MetadataBag.php +++ /dev/null @@ -1,167 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * Metadata container. - * - * Adds metadata to the session. - * - * @author Drak <drak@zikula.org> - */ -class MetadataBag implements SessionBagInterface -{ - public const CREATED = 'c'; - public const UPDATED = 'u'; - public const LIFETIME = 'l'; - - /** - * @var string - */ - private $name = '__metadata'; - - /** - * @var string - */ - private $storageKey; - - /** - * @var array - */ - protected $meta = [self::CREATED => 0, self::UPDATED => 0, self::LIFETIME => 0]; - - /** - * Unix timestamp. - * - * @var int - */ - private $lastUsed; - - /** - * @var int - */ - private $updateThreshold; - - /** - * @param string $storageKey The key used to store bag in the session - * @param int $updateThreshold The time to wait between two UPDATED updates - */ - public function __construct(string $storageKey = '_sf2_meta', int $updateThreshold = 0) - { - $this->storageKey = $storageKey; - $this->updateThreshold = $updateThreshold; - } - - /** - * {@inheritdoc} - */ - public function initialize(array &$array) - { - $this->meta = &$array; - - if (isset($array[self::CREATED])) { - $this->lastUsed = $this->meta[self::UPDATED]; - - $timeStamp = time(); - if ($timeStamp - $array[self::UPDATED] >= $this->updateThreshold) { - $this->meta[self::UPDATED] = $timeStamp; - } - } else { - $this->stampCreated(); - } - } - - /** - * Gets the lifetime that the session cookie was set with. - * - * @return int - */ - public function getLifetime() - { - return $this->meta[self::LIFETIME]; - } - - /** - * Stamps a new session's metadata. - * - * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - */ - public function stampNew(?int $lifetime = null) - { - $this->stampCreated($lifetime); - } - - /** - * {@inheritdoc} - */ - public function getStorageKey() - { - return $this->storageKey; - } - - /** - * Gets the created timestamp metadata. - * - * @return int Unix timestamp - */ - public function getCreated() - { - return $this->meta[self::CREATED]; - } - - /** - * Gets the last used metadata. - * - * @return int Unix timestamp - */ - public function getLastUsed() - { - return $this->lastUsed; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // nothing to do - return null; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * Sets name. - */ - public function setName(string $name) - { - $this->name = $name; - } - - private function stampCreated(?int $lifetime = null): void - { - $timeStamp = time(); - $this->meta[self::CREATED] = $this->meta[self::UPDATED] = $this->lastUsed = $timeStamp; - $this->meta[self::LIFETIME] = $lifetime ?? (int) \ini_get('session.cookie_lifetime'); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php deleted file mode 100644 index 77bb38f..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php +++ /dev/null @@ -1,252 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * MockArraySessionStorage mocks the session for unit tests. - * - * No PHP session is actually started since a session can be initialized - * and shutdown only once per PHP execution cycle. - * - * When doing functional testing, you should use MockFileSessionStorage instead. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Bulat Shakirzyanov <mallluhuct@gmail.com> - * @author Drak <drak@zikula.org> - */ -class MockArraySessionStorage implements SessionStorageInterface -{ - /** - * @var string - */ - protected $id = ''; - - /** - * @var string - */ - protected $name; - - /** - * @var bool - */ - protected $started = false; - - /** - * @var bool - */ - protected $closed = false; - - /** - * @var array - */ - protected $data = []; - - /** - * @var MetadataBag - */ - protected $metadataBag; - - /** - * @var array|SessionBagInterface[] - */ - protected $bags = []; - - public function __construct(string $name = 'MOCKSESSID', ?MetadataBag $metaBag = null) - { - $this->name = $name; - $this->setMetadataBag($metaBag); - } - - public function setSessionData(array $array) - { - $this->data = $array; - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (empty($this->id)) { - $this->id = $this->generateId(); - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, ?int $lifetime = null) - { - if (!$this->started) { - $this->start(); - } - - $this->metadataBag->stampNew($lifetime); - $this->id = $this->generateId(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->id; - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - if ($this->started) { - throw new \LogicException('Cannot set session ID after the session has started.'); - } - - $this->id = $id; - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->name; - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->name = $name; - } - - /** - * {@inheritdoc} - */ - public function save() - { - if (!$this->started || $this->closed) { - throw new \RuntimeException('Trying to save a session that was not started yet or was already closed.'); - } - // nothing to do since we don't persist the session data - $this->closed = false; - $this->started = false; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // clear out the session - $this->data = []; - - // reconnect the bags to the session - $this->loadSession(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - $this->bags[$bag->getName()] = $bag; - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - if (!isset($this->bags[$name])) { - throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name)); - } - - if (!$this->started) { - $this->start(); - } - - return $this->bags[$name]; - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->started; - } - - public function setMetadataBag(?MetadataBag $bag = null) - { - if (null === $bag) { - $bag = new MetadataBag(); - } - - $this->metadataBag = $bag; - } - - /** - * Gets the MetadataBag. - * - * @return MetadataBag - */ - public function getMetadataBag() - { - return $this->metadataBag; - } - - /** - * Generates a session ID. - * - * This doesn't need to be particularly cryptographically secure since this is just - * a mock. - * - * @return string - */ - protected function generateId() - { - return hash('sha256', uniqid('ss_mock_', true)); - } - - protected function loadSession() - { - $bags = array_merge($this->bags, [$this->metadataBag]); - - foreach ($bags as $bag) { - $key = $bag->getStorageKey(); - $this->data[$key] = $this->data[$key] ?? []; - $bag->initialize($this->data[$key]); - } - - $this->started = true; - $this->closed = false; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php deleted file mode 100644 index 8aeb972..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -/** - * MockFileSessionStorage is used to mock sessions for - * functional testing where you may need to persist session data - * across separate PHP processes. - * - * No PHP session is actually started since a session can be initialized - * and shutdown only once per PHP execution cycle and this class does - * not pollute any session related globals, including session_*() functions - * or session.* PHP ini directives. - * - * @author Drak <drak@zikula.org> - */ -class MockFileSessionStorage extends MockArraySessionStorage -{ - private $savePath; - - /** - * @param string|null $savePath Path of directory to save session files - */ - public function __construct(?string $savePath = null, string $name = 'MOCKSESSID', ?MetadataBag $metaBag = null) - { - if (null === $savePath) { - $savePath = sys_get_temp_dir(); - } - - if (!is_dir($savePath) && !@mkdir($savePath, 0777, true) && !is_dir($savePath)) { - throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s".', $savePath)); - } - - $this->savePath = $savePath; - - parent::__construct($name, $metaBag); - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (!$this->id) { - $this->id = $this->generateId(); - } - - $this->read(); - - $this->started = true; - - return true; - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, ?int $lifetime = null) - { - if (!$this->started) { - $this->start(); - } - - if ($destroy) { - $this->destroy(); - } - - return parent::regenerate($destroy, $lifetime); - } - - /** - * {@inheritdoc} - */ - public function save() - { - if (!$this->started) { - throw new \RuntimeException('Trying to save a session that was not started yet or was already closed.'); - } - - $data = $this->data; - - foreach ($this->bags as $bag) { - if (empty($data[$key = $bag->getStorageKey()])) { - unset($data[$key]); - } - } - if ([$key = $this->metadataBag->getStorageKey()] === array_keys($data)) { - unset($data[$key]); - } - - try { - if ($data) { - $path = $this->getFilePath(); - $tmp = $path.bin2hex(random_bytes(6)); - file_put_contents($tmp, serialize($data)); - rename($tmp, $path); - } else { - $this->destroy(); - } - } finally { - $this->data = $data; - } - - // this is needed when the session object is re-used across multiple requests - // in functional tests. - $this->started = false; - } - - /** - * Deletes a session from persistent storage. - * Deliberately leaves session data in memory intact. - */ - private function destroy(): void - { - set_error_handler(static function () {}); - try { - unlink($this->getFilePath()); - } finally { - restore_error_handler(); - } - } - - /** - * Calculate path to file. - */ - private function getFilePath(): string - { - return $this->savePath.'/'.$this->id.'.mocksess'; - } - - /** - * Reads session from storage and loads session. - */ - private function read(): void - { - set_error_handler(static function () {}); - try { - $data = file_get_contents($this->getFilePath()); - } finally { - restore_error_handler(); - } - - $this->data = $data ? unserialize($data) : []; - - $this->loadSession(); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php deleted file mode 100644 index 900fa7c..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorageFactory.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(MockFileSessionStorage::class); - -/** - * @author Jérémy Derussé <jeremy@derusse.com> - */ -class MockFileSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $savePath; - private $name; - private $metaBag; - - /** - * @see MockFileSessionStorage constructor. - */ - public function __construct(?string $savePath = null, string $name = 'MOCKSESSID', ?MetadataBag $metaBag = null) - { - $this->savePath = $savePath; - $this->name = $name; - $this->metaBag = $metaBag; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - return new MockFileSessionStorage($this->savePath, $this->name, $this->metaBag); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php deleted file mode 100644 index e7b42ed..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ /dev/null @@ -1,507 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; -use Symfony\Component\HttpFoundation\Session\SessionUtils; -use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; - -// Help opcache.preload discover always-needed symbols -class_exists(MetadataBag::class); -class_exists(StrictSessionHandler::class); -class_exists(SessionHandlerProxy::class); - -/** - * This provides a base class for session attribute storage. - * - * @author Drak <drak@zikula.org> - */ -class NativeSessionStorage implements SessionStorageInterface -{ - /** - * @var SessionBagInterface[] - */ - protected $bags = []; - - /** - * @var bool - */ - protected $started = false; - - /** - * @var bool - */ - protected $closed = false; - - /** - * @var AbstractProxy|\SessionHandlerInterface - */ - protected $saveHandler; - - /** - * @var MetadataBag - */ - protected $metadataBag; - - /** - * @var string|null - */ - private $emulateSameSite; - - /** - * Depending on how you want the storage driver to behave you probably - * want to override this constructor entirely. - * - * List of options for $options array with their defaults. - * - * @see https://php.net/session.configuration for options - * but we omit 'session.' from the beginning of the keys for convenience. - * - * ("auto_start", is not supported as it tells PHP to start a session before - * PHP starts to execute user-land code. Setting during runtime has no effect). - * - * cache_limiter, "" (use "0" to prevent headers from being sent entirely). - * cache_expire, "0" - * cookie_domain, "" - * cookie_httponly, "" - * cookie_lifetime, "0" - * cookie_path, "/" - * cookie_secure, "" - * cookie_samesite, null - * gc_divisor, "100" - * gc_maxlifetime, "1440" - * gc_probability, "1" - * lazy_write, "1" - * name, "PHPSESSID" - * referer_check, "" - * serialize_handler, "php" - * use_strict_mode, "1" - * use_cookies, "1" - * use_only_cookies, "1" - * use_trans_sid, "0" - * sid_length, "32" - * sid_bits_per_character, "5" - * trans_sid_hosts, $_SERVER['HTTP_HOST'] - * trans_sid_tags, "a=href,area=href,frame=src,form=" - * - * @param AbstractProxy|\SessionHandlerInterface|null $handler - */ - public function __construct(array $options = [], $handler = null, ?MetadataBag $metaBag = null) - { - if (!\extension_loaded('session')) { - throw new \LogicException('PHP extension "session" is required.'); - } - - $options += [ - 'cache_limiter' => '', - 'cache_expire' => 0, - 'use_cookies' => 1, - 'lazy_write' => 1, - 'use_strict_mode' => 1, - ]; - - session_register_shutdown(); - - $this->setMetadataBag($metaBag); - $this->setOptions($options); - $this->setSaveHandler($handler); - } - - /** - * Gets the save handler instance. - * - * @return AbstractProxy|\SessionHandlerInterface - */ - public function getSaveHandler() - { - return $this->saveHandler; - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - if (\PHP_SESSION_ACTIVE === session_status()) { - throw new \RuntimeException('Failed to start the session: already started by PHP.'); - } - - if (filter_var(\ini_get('session.use_cookies'), \FILTER_VALIDATE_BOOLEAN) && headers_sent($file, $line)) { - throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); - } - - $sessionId = $_COOKIE[session_name()] ?? null; - /* - * Explanation of the session ID regular expression: `/^[a-zA-Z0-9,-]{22,250}$/`. - * - * ---------- Part 1 - * - * The part `[a-zA-Z0-9,-]` is related to the PHP ini directive `session.sid_bits_per_character` defined as 6. - * See https://www.php.net/manual/en/session.configuration.php#ini.session.sid-bits-per-character. - * Allowed values are integers such as: - * - 4 for range `a-f0-9` - * - 5 for range `a-v0-9` - * - 6 for range `a-zA-Z0-9,-` - * - * ---------- Part 2 - * - * The part `{22,250}` is related to the PHP ini directive `session.sid_length`. - * See https://www.php.net/manual/en/session.configuration.php#ini.session.sid-length. - * Allowed values are integers between 22 and 256, but we use 250 for the max. - * - * Where does the 250 come from? - * - The length of Windows and Linux filenames is limited to 255 bytes. Then the max must not exceed 255. - * - The session filename prefix is `sess_`, a 5 bytes string. Then the max must not exceed 255 - 5 = 250. - * - * ---------- Conclusion - * - * The parts 1 and 2 prevent the warning below: - * `PHP Warning: SessionHandler::read(): Session ID is too long or contains illegal characters. Only the A-Z, a-z, 0-9, "-", and "," characters are allowed.` - * - * The part 2 prevents the warning below: - * `PHP Warning: SessionHandler::read(): open(filepath, O_RDWR) failed: No such file or directory (2).` - */ - if ($sessionId && $this->saveHandler instanceof AbstractProxy && 'files' === $this->saveHandler->getSaveHandlerName() && !preg_match('/^[a-zA-Z0-9,-]{22,250}$/', $sessionId)) { - // the session ID in the header is invalid, create a new one - session_id(session_create_id()); - } - - // ok to try and start the session - if (!session_start()) { - throw new \RuntimeException('Failed to start the session.'); - } - - if (null !== $this->emulateSameSite) { - $originalCookie = SessionUtils::popSessionCookie(session_name(), session_id()); - if (null !== $originalCookie) { - header(sprintf('%s; SameSite=%s', $originalCookie, $this->emulateSameSite), false); - } - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function getId() - { - return $this->saveHandler->getId(); - } - - /** - * {@inheritdoc} - */ - public function setId(string $id) - { - $this->saveHandler->setId($id); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return $this->saveHandler->getName(); - } - - /** - * {@inheritdoc} - */ - public function setName(string $name) - { - $this->saveHandler->setName($name); - } - - /** - * {@inheritdoc} - */ - public function regenerate(bool $destroy = false, ?int $lifetime = null) - { - // Cannot regenerate the session ID for non-active sessions. - if (\PHP_SESSION_ACTIVE !== session_status()) { - return false; - } - - if (headers_sent()) { - return false; - } - - if (null !== $lifetime && $lifetime != \ini_get('session.cookie_lifetime')) { - $this->save(); - ini_set('session.cookie_lifetime', $lifetime); - $this->start(); - } - - if ($destroy) { - $this->metadataBag->stampNew(); - } - - $isRegenerated = session_regenerate_id($destroy); - - if (null !== $this->emulateSameSite) { - $originalCookie = SessionUtils::popSessionCookie(session_name(), session_id()); - if (null !== $originalCookie) { - header(sprintf('%s; SameSite=%s', $originalCookie, $this->emulateSameSite), false); - } - } - - return $isRegenerated; - } - - /** - * {@inheritdoc} - */ - public function save() - { - // Store a copy so we can restore the bags in case the session was not left empty - $session = $_SESSION; - - foreach ($this->bags as $bag) { - if (empty($_SESSION[$key = $bag->getStorageKey()])) { - unset($_SESSION[$key]); - } - } - if ($_SESSION && [$key = $this->metadataBag->getStorageKey()] === array_keys($_SESSION)) { - unset($_SESSION[$key]); - } - - // Register error handler to add information about the current save handler - $previousHandler = set_error_handler(function ($type, $msg, $file, $line) use (&$previousHandler) { - if (\E_WARNING === $type && str_starts_with($msg, 'session_write_close():')) { - $handler = $this->saveHandler instanceof SessionHandlerProxy ? $this->saveHandler->getHandler() : $this->saveHandler; - $msg = sprintf('session_write_close(): Failed to write session data with "%s" handler', \get_class($handler)); - } - - return $previousHandler ? $previousHandler($type, $msg, $file, $line) : false; - }); - - try { - session_write_close(); - } finally { - restore_error_handler(); - - // Restore only if not empty - if ($_SESSION) { - $_SESSION = $session; - } - } - - $this->closed = true; - $this->started = false; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // clear out the session - $_SESSION = []; - - // reconnect the bags to the session - $this->loadSession(); - } - - /** - * {@inheritdoc} - */ - public function registerBag(SessionBagInterface $bag) - { - if ($this->started) { - throw new \LogicException('Cannot register a bag when the session is already started.'); - } - - $this->bags[$bag->getName()] = $bag; - } - - /** - * {@inheritdoc} - */ - public function getBag(string $name) - { - if (!isset($this->bags[$name])) { - throw new \InvalidArgumentException(sprintf('The SessionBagInterface "%s" is not registered.', $name)); - } - - if (!$this->started && $this->saveHandler->isActive()) { - $this->loadSession(); - } elseif (!$this->started) { - $this->start(); - } - - return $this->bags[$name]; - } - - public function setMetadataBag(?MetadataBag $metaBag = null) - { - if (null === $metaBag) { - $metaBag = new MetadataBag(); - } - - $this->metadataBag = $metaBag; - } - - /** - * Gets the MetadataBag. - * - * @return MetadataBag - */ - public function getMetadataBag() - { - return $this->metadataBag; - } - - /** - * {@inheritdoc} - */ - public function isStarted() - { - return $this->started; - } - - /** - * Sets session.* ini variables. - * - * For convenience we omit 'session.' from the beginning of the keys. - * Explicitly ignores other ini keys. - * - * @param array $options Session ini directives [key => value] - * - * @see https://php.net/session.configuration - */ - public function setOptions(array $options) - { - if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) { - return; - } - - $validOptions = array_flip([ - 'cache_expire', 'cache_limiter', 'cookie_domain', 'cookie_httponly', - 'cookie_lifetime', 'cookie_path', 'cookie_secure', 'cookie_samesite', - 'gc_divisor', 'gc_maxlifetime', 'gc_probability', - 'lazy_write', 'name', 'referer_check', - 'serialize_handler', 'use_strict_mode', 'use_cookies', - 'use_only_cookies', 'use_trans_sid', 'upload_progress.enabled', - 'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name', - 'upload_progress.freq', 'upload_progress.min_freq', 'url_rewriter.tags', - 'sid_length', 'sid_bits_per_character', 'trans_sid_hosts', 'trans_sid_tags', - ]); - - foreach ($options as $key => $value) { - if (isset($validOptions[$key])) { - if (str_starts_with($key, 'upload_progress.')) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Support for the "%s" session option is deprecated. The settings prefixed with "session.upload_progress." can not be changed at runtime.', $key); - continue; - } - if ('url_rewriter.tags' === $key) { - trigger_deprecation('symfony/http-foundation', '5.4', 'Support for the "%s" session option is deprecated. Use "trans_sid_tags" instead.', $key); - } - if ('cookie_samesite' === $key && \PHP_VERSION_ID < 70300) { - // PHP < 7.3 does not support same_site cookies. We will emulate it in - // the start() method instead. - $this->emulateSameSite = $value; - continue; - } - if ('cookie_secure' === $key && 'auto' === $value) { - continue; - } - ini_set('url_rewriter.tags' !== $key ? 'session.'.$key : $key, $value); - } - } - } - - /** - * Registers session save handler as a PHP session handler. - * - * To use internal PHP session save handlers, override this method using ini_set with - * session.save_handler and session.save_path e.g. - * - * ini_set('session.save_handler', 'files'); - * ini_set('session.save_path', '/tmp'); - * - * or pass in a \SessionHandler instance which configures session.save_handler in the - * constructor, for a template see NativeFileSessionHandler. - * - * @see https://php.net/session-set-save-handler - * @see https://php.net/sessionhandlerinterface - * @see https://php.net/sessionhandler - * - * @param AbstractProxy|\SessionHandlerInterface|null $saveHandler - * - * @throws \InvalidArgumentException - */ - public function setSaveHandler($saveHandler = null) - { - if (!$saveHandler instanceof AbstractProxy - && !$saveHandler instanceof \SessionHandlerInterface - && null !== $saveHandler - ) { - throw new \InvalidArgumentException('Must be instance of AbstractProxy; implement \SessionHandlerInterface; or be null.'); - } - - // Wrap $saveHandler in proxy and prevent double wrapping of proxy - if (!$saveHandler instanceof AbstractProxy && $saveHandler instanceof \SessionHandlerInterface) { - $saveHandler = new SessionHandlerProxy($saveHandler); - } elseif (!$saveHandler instanceof AbstractProxy) { - $saveHandler = new SessionHandlerProxy(new StrictSessionHandler(new \SessionHandler())); - } - $this->saveHandler = $saveHandler; - - if (headers_sent() || \PHP_SESSION_ACTIVE === session_status()) { - return; - } - - if ($this->saveHandler instanceof SessionHandlerProxy) { - session_set_save_handler($this->saveHandler, false); - } - } - - /** - * Load the session with attributes. - * - * After starting the session, PHP retrieves the session from whatever handlers - * are set to (either PHP's internal, or a custom save handler set with session_set_save_handler()). - * PHP takes the return value from the read() handler, unserializes it - * and populates $_SESSION with the result automatically. - */ - protected function loadSession(?array &$session = null) - { - if (null === $session) { - $session = &$_SESSION; - } - - $bags = array_merge($this->bags, [$this->metadataBag]); - - foreach ($bags as $bag) { - $key = $bag->getStorageKey(); - $session[$key] = isset($session[$key]) && \is_array($session[$key]) ? $session[$key] : []; - $bag->initialize($session[$key]); - } - - $this->started = true; - $this->closed = false; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php deleted file mode 100644 index 48e6526..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorageFactory.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(NativeSessionStorage::class); - -/** - * @author Jérémy Derussé <jeremy@derusse.com> - */ -class NativeSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $options; - private $handler; - private $metaBag; - private $secure; - - /** - * @see NativeSessionStorage constructor. - */ - public function __construct(array $options = [], $handler = null, ?MetadataBag $metaBag = null, bool $secure = false) - { - $this->options = $options; - $this->handler = $handler; - $this->metaBag = $metaBag; - $this->secure = $secure; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - $storage = new NativeSessionStorage($this->options, $this->handler, $this->metaBag); - if ($this->secure && $request && $request->isSecure()) { - $storage->setOptions(['cookie_secure' => true]); - } - - return $storage; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php deleted file mode 100644 index 855d5e1..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorage.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; - -/** - * Allows session to be started by PHP and managed by Symfony. - * - * @author Drak <drak@zikula.org> - */ -class PhpBridgeSessionStorage extends NativeSessionStorage -{ - /** - * @param AbstractProxy|\SessionHandlerInterface|null $handler - */ - public function __construct($handler = null, ?MetadataBag $metaBag = null) - { - if (!\extension_loaded('session')) { - throw new \LogicException('PHP extension "session" is required.'); - } - - $this->setMetadataBag($metaBag); - $this->setSaveHandler($handler); - } - - /** - * {@inheritdoc} - */ - public function start() - { - if ($this->started) { - return true; - } - - $this->loadSession(); - - return true; - } - - /** - * {@inheritdoc} - */ - public function clear() - { - // clear out the bags and nothing else that may be set - // since the purpose of this driver is to share a handler - foreach ($this->bags as $bag) { - $bag->clear(); - } - - // reconnect the bags to the session - $this->loadSession(); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php b/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php deleted file mode 100644 index aa93263..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/PhpBridgeSessionStorageFactory.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -// Help opcache.preload discover always-needed symbols -class_exists(PhpBridgeSessionStorage::class); - -/** - * @author Jérémy Derussé <jeremy@derusse.com> - */ -class PhpBridgeSessionStorageFactory implements SessionStorageFactoryInterface -{ - private $handler; - private $metaBag; - private $secure; - - /** - * @see PhpBridgeSessionStorage constructor. - */ - public function __construct($handler = null, ?MetadataBag $metaBag = null, bool $secure = false) - { - $this->handler = $handler; - $this->metaBag = $metaBag; - $this->secure = $secure; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - $storage = new PhpBridgeSessionStorage($this->handler, $this->metaBag); - if ($this->secure && $request && $request->isSecure()) { - $storage->setOptions(['cookie_secure' => true]); - } - - return $storage; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php deleted file mode 100644 index edd04df..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; - -/** - * @author Drak <drak@zikula.org> - */ -abstract class AbstractProxy -{ - /** - * Flag if handler wraps an internal PHP session handler (using \SessionHandler). - * - * @var bool - */ - protected $wrapper = false; - - /** - * @var string - */ - protected $saveHandlerName; - - /** - * Gets the session.save_handler name. - * - * @return string|null - */ - public function getSaveHandlerName() - { - return $this->saveHandlerName; - } - - /** - * Is this proxy handler and instance of \SessionHandlerInterface. - * - * @return bool - */ - public function isSessionHandlerInterface() - { - return $this instanceof \SessionHandlerInterface; - } - - /** - * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. - * - * @return bool - */ - public function isWrapper() - { - return $this->wrapper; - } - - /** - * Has a session started? - * - * @return bool - */ - public function isActive() - { - return \PHP_SESSION_ACTIVE === session_status(); - } - - /** - * Gets the session ID. - * - * @return string - */ - public function getId() - { - return session_id(); - } - - /** - * Sets the session ID. - * - * @throws \LogicException - */ - public function setId(string $id) - { - if ($this->isActive()) { - throw new \LogicException('Cannot change the ID of an active session.'); - } - - session_id($id); - } - - /** - * Gets the session name. - * - * @return string - */ - public function getName() - { - return session_name(); - } - - /** - * Sets the session name. - * - * @throws \LogicException - */ - public function setName(string $name) - { - if ($this->isActive()) { - throw new \LogicException('Cannot change the name of an active session.'); - } - - session_name($name); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php deleted file mode 100644 index 0defa4a..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/SessionHandlerProxy.php +++ /dev/null @@ -1,111 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; - -use Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler; - -/** - * @author Drak <drak@zikula.org> - */ -class SessionHandlerProxy extends AbstractProxy implements \SessionHandlerInterface, \SessionUpdateTimestampHandlerInterface -{ - protected $handler; - - public function __construct(\SessionHandlerInterface $handler) - { - $this->handler = $handler; - $this->wrapper = $handler instanceof \SessionHandler; - $this->saveHandlerName = $this->wrapper || ($handler instanceof StrictSessionHandler && $handler->isWrapper()) ? \ini_get('session.save_handler') : 'user'; - } - - /** - * @return \SessionHandlerInterface - */ - public function getHandler() - { - return $this->handler; - } - - // \SessionHandlerInterface - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function open($savePath, $sessionName) - { - return $this->handler->open($savePath, $sessionName); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function close() - { - return $this->handler->close(); - } - - /** - * @return string|false - */ - #[\ReturnTypeWillChange] - public function read($sessionId) - { - return $this->handler->read($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function write($sessionId, $data) - { - return $this->handler->write($sessionId, $data); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function destroy($sessionId) - { - return $this->handler->destroy($sessionId); - } - - /** - * @return int|false - */ - #[\ReturnTypeWillChange] - public function gc($maxlifetime) - { - return $this->handler->gc($maxlifetime); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function validateId($sessionId) - { - return !$this->handler instanceof \SessionUpdateTimestampHandlerInterface || $this->handler->validateId($sessionId); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function updateTimestamp($sessionId, $data) - { - return $this->handler instanceof \SessionUpdateTimestampHandlerInterface ? $this->handler->updateTimestamp($sessionId, $data) : $this->write($sessionId, $data); - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php b/vendor/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php deleted file mode 100644 index d17c60a..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/ServiceSessionFactory.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -/** - * @author Jérémy Derussé <jeremy@derusse.com> - * - * @internal to be removed in Symfony 6 - */ -final class ServiceSessionFactory implements SessionStorageFactoryInterface -{ - private $storage; - - public function __construct(SessionStorageInterface $storage) - { - $this->storage = $storage; - } - - public function createStorage(?Request $request): SessionStorageInterface - { - if ($this->storage instanceof NativeSessionStorage && $request && $request->isSecure()) { - $this->storage->setOptions(['cookie_secure' => true]); - } - - return $this->storage; - } -} diff --git a/vendor/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php b/vendor/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php deleted file mode 100644 index d03f0da..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/SessionStorageFactoryInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Request; - -/** - * @author Jérémy Derussé <jeremy@derusse.com> - */ -interface SessionStorageFactoryInterface -{ - /** - * Creates a new instance of SessionStorageInterface. - */ - public function createStorage(?Request $request): SessionStorageInterface; -} diff --git a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php b/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php deleted file mode 100644 index 70b7c6a..0000000 --- a/vendor/symfony/http-foundation/Session/Storage/SessionStorageInterface.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Session\Storage; - -use Symfony\Component\HttpFoundation\Session\SessionBagInterface; - -/** - * StorageInterface. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Drak <drak@zikula.org> - */ -interface SessionStorageInterface -{ - /** - * Starts the session. - * - * @return bool - * - * @throws \RuntimeException if something goes wrong starting the session - */ - public function start(); - - /** - * Checks if the session is started. - * - * @return bool - */ - public function isStarted(); - - /** - * Returns the session ID. - * - * @return string - */ - public function getId(); - - /** - * Sets the session ID. - */ - public function setId(string $id); - - /** - * Returns the session name. - * - * @return string - */ - public function getName(); - - /** - * Sets the session name. - */ - public function setName(string $name); - - /** - * Regenerates id that represents this storage. - * - * This method must invoke session_regenerate_id($destroy) unless - * this interface is used for a storage object designed for unit - * or functional testing where a real PHP session would interfere - * with testing. - * - * Note regenerate+destroy should not clear the session data in memory - * only delete the session data from persistent storage. - * - * Care: When regenerating the session ID no locking is involved in PHP's - * session design. See https://bugs.php.net/61470 for a discussion. - * So you must make sure the regenerated session is saved BEFORE sending the - * headers with the new ID. Symfony's HttpKernel offers a listener for this. - * See Symfony\Component\HttpKernel\EventListener\SaveSessionListener. - * Otherwise session data could get lost again for concurrent requests with the - * new ID. One result could be that you get logged out after just logging in. - * - * @param bool $destroy Destroy session when regenerating? - * @param int|null $lifetime Sets the cookie lifetime for the session cookie. A null value - * will leave the system settings unchanged, 0 sets the cookie - * to expire with browser session. Time is in seconds, and is - * not a Unix timestamp. - * - * @return bool - * - * @throws \RuntimeException If an error occurs while regenerating this storage - */ - public function regenerate(bool $destroy = false, ?int $lifetime = null); - - /** - * Force the session to be saved and closed. - * - * This method must invoke session_write_close() unless this interface is - * used for a storage object design for unit or functional testing where - * a real PHP session would interfere with testing, in which case - * it should actually persist the session data if required. - * - * @throws \RuntimeException if the session is saved without being started, or if the session - * is already closed - */ - public function save(); - - /** - * Clear all session data in memory. - */ - public function clear(); - - /** - * Gets a SessionBagInterface by name. - * - * @return SessionBagInterface - * - * @throws \InvalidArgumentException If the bag does not exist - */ - public function getBag(string $name); - - /** - * Registers a SessionBagInterface for use. - */ - public function registerBag(SessionBagInterface $bag); - - /** - * @return MetadataBag - */ - public function getMetadataBag(); -} diff --git a/vendor/symfony/http-foundation/StreamedResponse.php b/vendor/symfony/http-foundation/StreamedResponse.php deleted file mode 100644 index b42330d..0000000 --- a/vendor/symfony/http-foundation/StreamedResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -/** - * StreamedResponse represents a streamed HTTP response. - * - * A StreamedResponse uses a callback for its content. - * - * The callback should use the standard PHP functions like echo - * to stream the response back to the client. The flush() function - * can also be used if needed. - * - * @see flush() - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class StreamedResponse extends Response -{ - protected $callback; - protected $streamed; - private $headersSent; - - public function __construct(?callable $callback = null, int $status = 200, array $headers = []) - { - parent::__construct(null, $status, $headers); - - if (null !== $callback) { - $this->setCallback($callback); - } - $this->streamed = false; - $this->headersSent = false; - } - - /** - * Factory method for chainability. - * - * @param callable|null $callback A valid PHP callback or null to set it later - * - * @return static - * - * @deprecated since Symfony 5.1, use __construct() instead. - */ - public static function create($callback = null, int $status = 200, array $headers = []) - { - trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class); - - return new static($callback, $status, $headers); - } - - /** - * Sets the PHP callback associated with this Response. - * - * @return $this - */ - public function setCallback(callable $callback) - { - $this->callback = $callback; - - return $this; - } - - /** - * {@inheritdoc} - * - * This method only sends the headers once. - * - * @return $this - */ - public function sendHeaders() - { - if ($this->headersSent) { - return $this; - } - - $this->headersSent = true; - - return parent::sendHeaders(); - } - - /** - * {@inheritdoc} - * - * This method only sends the content once. - * - * @return $this - */ - public function sendContent() - { - if ($this->streamed) { - return $this; - } - - $this->streamed = true; - - if (null === $this->callback) { - throw new \LogicException('The Response callback must not be null.'); - } - - ($this->callback)(); - - return $this; - } - - /** - * {@inheritdoc} - * - * @return $this - * - * @throws \LogicException when the content is not null - */ - public function setContent(?string $content) - { - if (null !== $content) { - throw new \LogicException('The content cannot be set on a StreamedResponse instance.'); - } - - $this->streamed = true; - - return $this; - } - - /** - * {@inheritdoc} - */ - public function getContent() - { - return false; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php b/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php deleted file mode 100644 index cb216ea..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/RequestAttributeValueSame.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Request; - -final class RequestAttributeValueSame extends Constraint -{ - private $name; - private $value; - - public function __construct(string $name, string $value) - { - $this->name = $name; - $this->value = $value; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return sprintf('has attribute "%s" with value "%s"', $this->name, $this->value); - } - - /** - * @param Request $request - * - * {@inheritdoc} - */ - protected function matches($request): bool - { - return $this->value === $request->attributes->get($this->name); - } - - /** - * @param Request $request - * - * {@inheritdoc} - */ - protected function failureDescription($request): string - { - return 'the Request '.$this->toString(); - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php deleted file mode 100644 index 939925b..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseCookieValueSame.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseCookieValueSame extends Constraint -{ - private $name; - private $value; - private $path; - private $domain; - - public function __construct(string $name, string $value, string $path = '/', ?string $domain = null) - { - $this->name = $name; - $this->value = $value; - $this->path = $path; - $this->domain = $domain; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - $str = sprintf('has cookie "%s"', $this->name); - if ('/' !== $this->path) { - $str .= sprintf(' with path "%s"', $this->path); - } - if ($this->domain) { - $str .= sprintf(' for domain "%s"', $this->domain); - } - $str .= sprintf(' with value "%s"', $this->value); - - return $str; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - $cookie = $this->getCookie($response); - if (!$cookie) { - return false; - } - - return $this->value === (string) $cookie->getValue(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - protected function getCookie(Response $response): ?Cookie - { - $cookies = $response->headers->getCookies(); - - $filteredCookies = array_filter($cookies, function (Cookie $cookie) { - return $cookie->getName() === $this->name && $cookie->getPath() === $this->path && $cookie->getDomain() === $this->domain; - }); - - return reset($filteredCookies) ?: null; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php deleted file mode 100644 index f73aedf..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseFormatSame.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Asserts that the response is in the given format. - * - * @author Kévin Dunglas <dunglas@gmail.com> - */ -final class ResponseFormatSame extends Constraint -{ - private $request; - private $format; - - public function __construct(Request $request, ?string $format) - { - $this->request = $request; - $this->format = $format; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'format is '.($this->format ?? 'null'); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $this->format === $this->request->getFormat($response->headers->get('Content-Type')); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($response): string - { - return (string) $response; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php deleted file mode 100644 index 9d6e58c..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasCookie.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseHasCookie extends Constraint -{ - private $name; - private $path; - private $domain; - - public function __construct(string $name, string $path = '/', ?string $domain = null) - { - $this->name = $name; - $this->path = $path; - $this->domain = $domain; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - $str = sprintf('has cookie "%s"', $this->name); - if ('/' !== $this->path) { - $str .= sprintf(' with path "%s"', $this->path); - } - if ($this->domain) { - $str .= sprintf(' for domain "%s"', $this->domain); - } - - return $str; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return null !== $this->getCookie($response); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - private function getCookie(Response $response): ?Cookie - { - $cookies = $response->headers->getCookies(); - - $filteredCookies = array_filter($cookies, function (Cookie $cookie) { - return $cookie->getName() === $this->name && $cookie->getPath() === $this->path && $cookie->getDomain() === $this->domain; - }); - - return reset($filteredCookies) ?: null; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php deleted file mode 100644 index 68ad827..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseHasHeader.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseHasHeader extends Constraint -{ - private $headerName; - - public function __construct(string $headerName) - { - $this->headerName = $headerName; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return sprintf('has header "%s"', $this->headerName); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $response->headers->has($this->headerName); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php deleted file mode 100644 index a27d0c7..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseHeaderSame.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseHeaderSame extends Constraint -{ - private $headerName; - private $expectedValue; - - public function __construct(string $headerName, string $expectedValue) - { - $this->headerName = $headerName; - $this->expectedValue = $expectedValue; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return sprintf('has header "%s" with value "%s"', $this->headerName, $this->expectedValue); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $this->expectedValue === $response->headers->get($this->headerName, null); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php deleted file mode 100644 index 8c4b883..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsRedirected.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseIsRedirected extends Constraint -{ - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'is redirected'; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $response->isRedirect(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($response): string - { - return (string) $response; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php deleted file mode 100644 index 9c66558..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsSuccessful.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseIsSuccessful extends Constraint -{ - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'is successful'; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $response->isSuccessful(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($response): string - { - return (string) $response; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php deleted file mode 100644 index 880c781..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseIsUnprocessable.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseIsUnprocessable extends Constraint -{ - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'is unprocessable'; - } - - /** - * @param Response $other - * - * {@inheritdoc} - */ - protected function matches($other): bool - { - return Response::HTTP_UNPROCESSABLE_ENTITY === $other->getStatusCode(); - } - - /** - * @param Response $other - * - * {@inheritdoc} - */ - protected function failureDescription($other): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $other - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($other): string - { - return (string) $other; - } -} diff --git a/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php b/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php deleted file mode 100644 index 72bb000..0000000 --- a/vendor/symfony/http-foundation/Test/Constraint/ResponseStatusCodeSame.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation\Test\Constraint; - -use PHPUnit\Framework\Constraint\Constraint; -use Symfony\Component\HttpFoundation\Response; - -final class ResponseStatusCodeSame extends Constraint -{ - private $statusCode; - - public function __construct(int $statusCode) - { - $this->statusCode = $statusCode; - } - - /** - * {@inheritdoc} - */ - public function toString(): string - { - return 'status code is '.$this->statusCode; - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function matches($response): bool - { - return $this->statusCode === $response->getStatusCode(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function failureDescription($response): string - { - return 'the Response '.$this->toString(); - } - - /** - * @param Response $response - * - * {@inheritdoc} - */ - protected function additionalFailureDescription($response): string - { - return (string) $response; - } -} diff --git a/vendor/symfony/http-foundation/UrlHelper.php b/vendor/symfony/http-foundation/UrlHelper.php deleted file mode 100644 index 9065994..0000000 --- a/vendor/symfony/http-foundation/UrlHelper.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\HttpFoundation; - -use Symfony\Component\Routing\RequestContext; -use Symfony\Component\Routing\RequestContextAwareInterface; - -/** - * A helper service for manipulating URLs within and outside the request scope. - * - * @author Valentin Udaltsov <udaltsov.valentin@gmail.com> - */ -final class UrlHelper -{ - private $requestStack; - private $requestContext; - - /** - * @param RequestContextAwareInterface|RequestContext|null $requestContext - */ - public function __construct(RequestStack $requestStack, $requestContext = null) - { - if (null !== $requestContext && !$requestContext instanceof RequestContext && !$requestContext instanceof RequestContextAwareInterface) { - throw new \TypeError(__METHOD__.': Argument #2 ($requestContext) must of type Symfony\Component\Routing\RequestContextAwareInterface|Symfony\Component\Routing\RequestContext|null, '.get_debug_type($requestContext).' given.'); - } - - $this->requestStack = $requestStack; - $this->requestContext = $requestContext; - } - - public function getAbsoluteUrl(string $path): string - { - if (str_contains($path, '://') || '//' === substr($path, 0, 2)) { - return $path; - } - - if (null === $request = $this->requestStack->getMainRequest()) { - return $this->getAbsoluteUrlFromContext($path); - } - - if ('#' === $path[0]) { - $path = $request->getRequestUri().$path; - } elseif ('?' === $path[0]) { - $path = $request->getPathInfo().$path; - } - - if (!$path || '/' !== $path[0]) { - $prefix = $request->getPathInfo(); - $last = \strlen($prefix) - 1; - if ($last !== $pos = strrpos($prefix, '/')) { - $prefix = substr($prefix, 0, $pos).'/'; - } - - return $request->getUriForPath($prefix.$path); - } - - return $request->getSchemeAndHttpHost().$path; - } - - public function getRelativePath(string $path): string - { - if (str_contains($path, '://') || '//' === substr($path, 0, 2)) { - return $path; - } - - if (null === $request = $this->requestStack->getMainRequest()) { - return $path; - } - - return $request->getRelativeUriForPath($path); - } - - private function getAbsoluteUrlFromContext(string $path): string - { - if (null === $context = $this->requestContext) { - return $path; - } - - if ($context instanceof RequestContextAwareInterface) { - $context = $context->getContext(); - } - - if ('' === $host = $context->getHost()) { - return $path; - } - - $scheme = $context->getScheme(); - $port = ''; - - if ('http' === $scheme && 80 !== $context->getHttpPort()) { - $port = ':'.$context->getHttpPort(); - } elseif ('https' === $scheme && 443 !== $context->getHttpsPort()) { - $port = ':'.$context->getHttpsPort(); - } - - if ('#' === $path[0]) { - $queryString = $context->getQueryString(); - $path = $context->getPathInfo().($queryString ? '?'.$queryString : '').$path; - } elseif ('?' === $path[0]) { - $path = $context->getPathInfo().$path; - } - - if ('/' !== $path[0]) { - $path = rtrim($context->getBaseUrl(), '/').'/'.$path; - } - - return $scheme.'://'.$host.$port.$path; - } -} diff --git a/vendor/symfony/http-foundation/composer.json b/vendor/symfony/http-foundation/composer.json deleted file mode 100644 index cb8d59f..0000000 --- a/vendor/symfony/http-foundation/composer.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "symfony/http-foundation", - "type": "library", - "description": "Defines an object-oriented layer for the HTTP specification", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", - "symfony/mime": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/rate-limiter": "^5.2|^6.0" - }, - "suggest" : { - "symfony/mime": "To use the file extension guesser" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/polyfill-mbstring/LICENSE b/vendor/symfony/polyfill-mbstring/LICENSE deleted file mode 100644 index 6e3afce..0000000 --- a/vendor/symfony/polyfill-mbstring/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php deleted file mode 100644 index 2e0b969..0000000 --- a/vendor/symfony/polyfill-mbstring/Mbstring.php +++ /dev/null @@ -1,947 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Mbstring; - -/** - * Partial mbstring implementation in PHP, iconv based, UTF-8 centric. - * - * Implemented: - * - mb_chr - Returns a specific character from its Unicode code point - * - mb_convert_encoding - Convert character encoding - * - mb_convert_variables - Convert character code in variable(s) - * - mb_decode_mimeheader - Decode string in MIME header field - * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED - * - mb_decode_numericentity - Decode HTML numeric string reference to character - * - mb_encode_numericentity - Encode character to HTML numeric string reference - * - mb_convert_case - Perform case folding on a string - * - mb_detect_encoding - Detect character encoding - * - mb_get_info - Get internal settings of mbstring - * - mb_http_input - Detect HTTP input character encoding - * - mb_http_output - Set/Get HTTP output character encoding - * - mb_internal_encoding - Set/Get internal character encoding - * - mb_list_encodings - Returns an array of all supported encodings - * - mb_ord - Returns the Unicode code point of a character - * - mb_output_handler - Callback function converts character encoding in output buffer - * - mb_scrub - Replaces ill-formed byte sequences with substitute characters - * - mb_strlen - Get string length - * - mb_strpos - Find position of first occurrence of string in a string - * - mb_strrpos - Find position of last occurrence of a string in a string - * - mb_str_split - Convert a string to an array - * - mb_strtolower - Make a string lowercase - * - mb_strtoupper - Make a string uppercase - * - mb_substitute_character - Set/Get substitution character - * - mb_substr - Get part of string - * - mb_stripos - Finds position of first occurrence of a string within another, case insensitive - * - mb_stristr - Finds first occurrence of a string within another, case insensitive - * - mb_strrchr - Finds the last occurrence of a character in a string within another - * - mb_strrichr - Finds the last occurrence of a character in a string within another, case insensitive - * - mb_strripos - Finds position of last occurrence of a string within another, case insensitive - * - mb_strstr - Finds first occurrence of a string within another - * - mb_strwidth - Return width of string - * - mb_substr_count - Count the number of substring occurrences - * - * Not implemented: - * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) - * - mb_ereg_* - Regular expression with multibyte support - * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable - * - mb_preferred_mime_name - Get MIME charset string - * - mb_regex_encoding - Returns current encoding for multibyte regex as string - * - mb_regex_set_options - Set/Get the default options for mbregex functions - * - mb_send_mail - Send encoded mail - * - mb_split - Split multibyte string using regular expression - * - mb_strcut - Get part of string - * - mb_strimwidth - Get truncated string with specified width - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -final class Mbstring -{ - public const MB_CASE_FOLD = \PHP_INT_MAX; - - private const SIMPLE_CASE_FOLD = [ - ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], - ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], - ]; - - private static $encodingList = ['ASCII', 'UTF-8']; - private static $language = 'neutral'; - private static $internalEncoding = 'UTF-8'; - - public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) - { - if (\is_array($fromEncoding) || (null !== $fromEncoding && false !== strpos($fromEncoding, ','))) { - $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); - } else { - $fromEncoding = self::getEncoding($fromEncoding); - } - - $toEncoding = self::getEncoding($toEncoding); - - if ('BASE64' === $fromEncoding) { - $s = base64_decode($s); - $fromEncoding = $toEncoding; - } - - if ('BASE64' === $toEncoding) { - return base64_encode($s); - } - - if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) { - if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) { - $fromEncoding = 'Windows-1252'; - } - if ('UTF-8' !== $fromEncoding) { - $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s); - } - - return preg_replace_callback('/[\x80-\xFF]+/', [__CLASS__, 'html_encoding_callback'], $s); - } - - if ('HTML-ENTITIES' === $fromEncoding) { - $s = html_entity_decode($s, \ENT_COMPAT, 'UTF-8'); - $fromEncoding = 'UTF-8'; - } - - return iconv($fromEncoding, $toEncoding.'//IGNORE', $s); - } - - public static function mb_convert_variables($toEncoding, $fromEncoding, &...$vars) - { - $ok = true; - array_walk_recursive($vars, function (&$v) use (&$ok, $toEncoding, $fromEncoding) { - if (false === $v = self::mb_convert_encoding($v, $toEncoding, $fromEncoding)) { - $ok = false; - } - }); - - return $ok ? $fromEncoding : false; - } - - public static function mb_decode_mimeheader($s) - { - return iconv_mime_decode($s, 2, self::$internalEncoding); - } - - public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null) - { - trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING); - } - - public static function mb_decode_numericentity($s, $convmap, $encoding = null) - { - if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { - trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { - return false; - } - - if (null !== $encoding && !\is_scalar($encoding)) { - trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return ''; // Instead of null (cf. mb_encode_numericentity). - } - - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = iconv($encoding, 'UTF-8//IGNORE', $s); - } - - $cnt = floor(\count($convmap) / 4) * 4; - - for ($i = 0; $i < $cnt; $i += 4) { - // collector_decode_htmlnumericentity ignores $convmap[$i + 3] - $convmap[$i] += $convmap[$i + 2]; - $convmap[$i + 1] += $convmap[$i + 2]; - } - - $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { - $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; - for ($i = 0; $i < $cnt; $i += 4) { - if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { - return self::mb_chr($c - $convmap[$i + 2]); - } - } - - return $m[0]; - }, $s); - - if (null === $encoding) { - return $s; - } - - return iconv('UTF-8', $encoding.'//IGNORE', $s); - } - - public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) - { - if (null !== $s && !\is_scalar($s) && !(\is_object($s) && method_exists($s, '__toString'))) { - trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - if (!\is_array($convmap) || (80000 > \PHP_VERSION_ID && !$convmap)) { - return false; - } - - if (null !== $encoding && !\is_scalar($encoding)) { - trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.\gettype($s).' given', \E_USER_WARNING); - - return null; // Instead of '' (cf. mb_decode_numericentity). - } - - if (null !== $is_hex && !\is_scalar($is_hex)) { - trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.\gettype($s).' given', \E_USER_WARNING); - - return null; - } - - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = iconv($encoding, 'UTF-8//IGNORE', $s); - } - - static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - - $cnt = floor(\count($convmap) / 4) * 4; - $i = 0; - $len = \strlen($s); - $result = ''; - - while ($i < $len) { - $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - $c = self::mb_ord($uchr); - - for ($j = 0; $j < $cnt; $j += 4) { - if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { - $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; - $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; - continue 2; - } - } - $result .= $uchr; - } - - if (null === $encoding) { - return $result; - } - - return iconv('UTF-8', $encoding.'//IGNORE', $result); - } - - public static function mb_convert_case($s, $mode, $encoding = null) - { - $s = (string) $s; - if ('' === $s) { - return ''; - } - - $encoding = self::getEncoding($encoding); - - if ('UTF-8' === $encoding) { - $encoding = null; - if (!preg_match('//u', $s)) { - $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); - } - } else { - $s = iconv($encoding, 'UTF-8//IGNORE', $s); - } - - if (\MB_CASE_TITLE == $mode) { - static $titleRegexp = null; - if (null === $titleRegexp) { - $titleRegexp = self::getData('titleCaseRegexp'); - } - $s = preg_replace_callback($titleRegexp, [__CLASS__, 'title_case'], $s); - } else { - if (\MB_CASE_UPPER == $mode) { - static $upper = null; - if (null === $upper) { - $upper = self::getData('upperCase'); - } - $map = $upper; - } else { - if (self::MB_CASE_FOLD === $mode) { - static $caseFolding = null; - if (null === $caseFolding) { - $caseFolding = self::getData('caseFolding'); - } - $s = strtr($s, $caseFolding); - } - - static $lower = null; - if (null === $lower) { - $lower = self::getData('lowerCase'); - } - $map = $lower; - } - - static $ulenMask = ["\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4]; - - $i = 0; - $len = \strlen($s); - - while ($i < $len) { - $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; - $uchr = substr($s, $i, $ulen); - $i += $ulen; - - if (isset($map[$uchr])) { - $uchr = $map[$uchr]; - $nlen = \strlen($uchr); - - if ($nlen == $ulen) { - $nlen = $i; - do { - $s[--$nlen] = $uchr[--$ulen]; - } while ($ulen); - } else { - $s = substr_replace($s, $uchr, $i - $ulen, $ulen); - $len += $nlen - $ulen; - $i += $nlen - $ulen; - } - } - } - } - - if (null === $encoding) { - return $s; - } - - return iconv('UTF-8', $encoding.'//IGNORE', $s); - } - - public static function mb_internal_encoding($encoding = null) - { - if (null === $encoding) { - return self::$internalEncoding; - } - - $normalizedEncoding = self::getEncoding($encoding); - - if ('UTF-8' === $normalizedEncoding || false !== @iconv($normalizedEncoding, $normalizedEncoding, ' ')) { - self::$internalEncoding = $normalizedEncoding; - - return true; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError(sprintf('Argument #1 ($encoding) must be a valid encoding, "%s" given', $encoding)); - } - - public static function mb_language($lang = null) - { - if (null === $lang) { - return self::$language; - } - - switch ($normalizedLang = strtolower($lang)) { - case 'uni': - case 'neutral': - self::$language = $normalizedLang; - - return true; - } - - if (80000 > \PHP_VERSION_ID) { - return false; - } - - throw new \ValueError(sprintf('Argument #1 ($language) must be a valid language, "%s" given', $lang)); - } - - public static function mb_list_encodings() - { - return ['UTF-8']; - } - - public static function mb_encoding_aliases($encoding) - { - switch (strtoupper($encoding)) { - case 'UTF8': - case 'UTF-8': - return ['utf8']; - } - - return false; - } - - public static function mb_check_encoding($var = null, $encoding = null) - { - if (PHP_VERSION_ID < 70200 && \is_array($var)) { - trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); - - return null; - } - - if (null === $encoding) { - if (null === $var) { - return false; - } - $encoding = self::$internalEncoding; - } - - if (!\is_array($var)) { - return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var); - } - - foreach ($var as $key => $value) { - if (!self::mb_check_encoding($key, $encoding)) { - return false; - } - if (!self::mb_check_encoding($value, $encoding)) { - return false; - } - } - - return true; - - } - - public static function mb_detect_encoding($str, $encodingList = null, $strict = false) - { - if (null === $encodingList) { - $encodingList = self::$encodingList; - } else { - if (!\is_array($encodingList)) { - $encodingList = array_map('trim', explode(',', $encodingList)); - } - $encodingList = array_map('strtoupper', $encodingList); - } - - foreach ($encodingList as $enc) { - switch ($enc) { - case 'ASCII': - if (!preg_match('/[\x80-\xFF]/', $str)) { - return $enc; - } - break; - - case 'UTF8': - case 'UTF-8': - if (preg_match('//u', $str)) { - return 'UTF-8'; - } - break; - - default: - if (0 === strncmp($enc, 'ISO-8859-', 9)) { - return $enc; - } - } - } - - return false; - } - - public static function mb_detect_order($encodingList = null) - { - if (null === $encodingList) { - return self::$encodingList; - } - - if (!\is_array($encodingList)) { - $encodingList = array_map('trim', explode(',', $encodingList)); - } - $encodingList = array_map('strtoupper', $encodingList); - - foreach ($encodingList as $enc) { - switch ($enc) { - default: - if (strncmp($enc, 'ISO-8859-', 9)) { - return false; - } - // no break - case 'ASCII': - case 'UTF8': - case 'UTF-8': - } - } - - self::$encodingList = $encodingList; - - return true; - } - - public static function mb_strlen($s, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return \strlen($s); - } - - return @iconv_strlen($s, $encoding); - } - - public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strpos($haystack, $needle, $offset); - } - - $needle = (string) $needle; - if ('' === $needle) { - if (80000 > \PHP_VERSION_ID) { - trigger_error(__METHOD__.': Empty delimiter', \E_USER_WARNING); - - return false; - } - - return 0; - } - - return iconv_strpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strrpos($haystack, $needle, $offset); - } - - if ($offset != (int) $offset) { - $offset = 0; - } elseif ($offset = (int) $offset) { - if ($offset < 0) { - if (0 > $offset += self::mb_strlen($needle)) { - $haystack = self::mb_substr($haystack, 0, $offset, $encoding); - } - $offset = 0; - } else { - $haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding); - } - } - - $pos = '' !== $needle || 80000 > \PHP_VERSION_ID - ? iconv_strrpos($haystack, $needle, $encoding) - : self::mb_strlen($haystack, $encoding); - - return false !== $pos ? $offset + $pos : false; - } - - public static function mb_str_split($string, $split_length = 1, $encoding = null) - { - if (null !== $string && !\is_scalar($string) && !(\is_object($string) && method_exists($string, '__toString'))) { - trigger_error('mb_str_split() expects parameter 1 to be string, '.\gettype($string).' given', \E_USER_WARNING); - - return null; - } - - if (1 > $split_length = (int) $split_length) { - if (80000 > \PHP_VERSION_ID) { - trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING); - - return false; - } - - throw new \ValueError('Argument #2 ($length) must be greater than 0'); - } - - if (null === $encoding) { - $encoding = mb_internal_encoding(); - } - - if ('UTF-8' === $encoding = self::getEncoding($encoding)) { - $rx = '/('; - while (65535 < $split_length) { - $rx .= '.{65535}'; - $split_length -= 65535; - } - $rx .= '.{'.$split_length.'})/us'; - - return preg_split($rx, $string, -1, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY); - } - - $result = []; - $length = mb_strlen($string, $encoding); - - for ($i = 0; $i < $length; $i += $split_length) { - $result[] = mb_substr($string, $i, $split_length, $encoding); - } - - return $result; - } - - public static function mb_strtolower($s, $encoding = null) - { - return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding); - } - - public static function mb_strtoupper($s, $encoding = null) - { - return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding); - } - - public static function mb_substitute_character($c = null) - { - if (null === $c) { - return 'none'; - } - if (0 === strcasecmp($c, 'none')) { - return true; - } - if (80000 > \PHP_VERSION_ID) { - return false; - } - if (\is_int($c) || 'long' === $c || 'entity' === $c) { - return false; - } - - throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); - } - - public static function mb_substr($s, $start, $length = null, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - return (string) substr($s, $start, null === $length ? 2147483647 : $length); - } - - if ($start < 0) { - $start = iconv_strlen($s, $encoding) + $start; - if ($start < 0) { - $start = 0; - } - } - - if (null === $length) { - $length = 2147483647; - } elseif ($length < 0) { - $length = iconv_strlen($s, $encoding) + $length - $start; - if ($length < 0) { - return ''; - } - } - - return (string) iconv_substr($s, $start, $length, $encoding); - } - - public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) - { - [$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [ - self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding), - self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding), - ]); - - return self::mb_strpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_stristr($haystack, $needle, $part = false, $encoding = null) - { - $pos = self::mb_stripos($haystack, $needle, 0, $encoding); - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null) - { - $encoding = self::getEncoding($encoding); - if ('CP850' === $encoding || 'ASCII' === $encoding) { - $pos = strrpos($haystack, $needle); - } else { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = iconv_strrpos($haystack, $needle, $encoding); - } - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null) - { - $needle = self::mb_substr($needle, 0, 1, $encoding); - $pos = self::mb_strripos($haystack, $needle, $encoding); - - return self::getSubpart($pos, $part, $haystack, $encoding); - } - - public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) - { - $haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding); - $needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding); - - $haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack); - $needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle); - - return self::mb_strrpos($haystack, $needle, $offset, $encoding); - } - - public static function mb_strstr($haystack, $needle, $part = false, $encoding = null) - { - $pos = strpos($haystack, $needle); - if (false === $pos) { - return false; - } - if ($part) { - return substr($haystack, 0, $pos); - } - - return substr($haystack, $pos); - } - - public static function mb_get_info($type = 'all') - { - $info = [ - 'internal_encoding' => self::$internalEncoding, - 'http_output' => 'pass', - 'http_output_conv_mimetypes' => '^(text/|application/xhtml\+xml)', - 'func_overload' => 0, - 'func_overload_list' => 'no overload', - 'mail_charset' => 'UTF-8', - 'mail_header_encoding' => 'BASE64', - 'mail_body_encoding' => 'BASE64', - 'illegal_chars' => 0, - 'encoding_translation' => 'Off', - 'language' => self::$language, - 'detect_order' => self::$encodingList, - 'substitute_character' => 'none', - 'strict_detection' => 'Off', - ]; - - if ('all' === $type) { - return $info; - } - if (isset($info[$type])) { - return $info[$type]; - } - - return false; - } - - public static function mb_http_input($type = '') - { - return false; - } - - public static function mb_http_output($encoding = null) - { - return null !== $encoding ? 'pass' === $encoding : 'pass'; - } - - public static function mb_strwidth($s, $encoding = null) - { - $encoding = self::getEncoding($encoding); - - if ('UTF-8' !== $encoding) { - $s = iconv($encoding, 'UTF-8//IGNORE', $s); - } - - $s = preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $s, -1, $wide); - - return ($wide << 1) + iconv_strlen($s, 'UTF-8'); - } - - public static function mb_substr_count($haystack, $needle, $encoding = null) - { - return substr_count($haystack, $needle); - } - - public static function mb_output_handler($contents, $status) - { - return $contents; - } - - public static function mb_chr($code, $encoding = null) - { - if (0x80 > $code %= 0x200000) { - $s = \chr($code); - } elseif (0x800 > $code) { - $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - - if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { - $s = mb_convert_encoding($s, $encoding, 'UTF-8'); - } - - return $s; - } - - public static function mb_ord($s, $encoding = null) - { - if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { - $s = mb_convert_encoding($s, 'UTF-8', $encoding); - } - - if (1 === \strlen($s)) { - return \ord($s); - } - - $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $code) { - return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; - } - if (0xE0 <= $code) { - return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; - } - if (0xC0 <= $code) { - return (($code - 0xC0) << 6) + $s[2] - 0x80; - } - - return $code; - } - - public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string - { - if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) { - throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH'); - } - - if (null === $encoding) { - $encoding = self::mb_internal_encoding(); - } - - try { - $validEncoding = @self::mb_check_encoding('', $encoding); - } catch (\ValueError $e) { - throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); - } - - // BC for PHP 7.3 and lower - if (!$validEncoding) { - throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); - } - - if (self::mb_strlen($pad_string, $encoding) <= 0) { - throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string'); - } - - $paddingRequired = $length - self::mb_strlen($string, $encoding); - - if ($paddingRequired < 1) { - return $string; - } - - switch ($pad_type) { - case \STR_PAD_LEFT: - return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string; - case \STR_PAD_RIGHT: - return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); - default: - $leftPaddingLength = floor($paddingRequired / 2); - $rightPaddingLength = $paddingRequired - $leftPaddingLength; - - return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); - } - } - - private static function getSubpart($pos, $part, $haystack, $encoding) - { - if (false === $pos) { - return false; - } - if ($part) { - return self::mb_substr($haystack, 0, $pos, $encoding); - } - - return self::mb_substr($haystack, $pos, null, $encoding); - } - - private static function html_encoding_callback(array $m) - { - $i = 1; - $entities = ''; - $m = unpack('C*', htmlentities($m[0], \ENT_COMPAT, 'UTF-8')); - - while (isset($m[$i])) { - if (0x80 > $m[$i]) { - $entities .= \chr($m[$i++]); - continue; - } - if (0xF0 <= $m[$i]) { - $c = (($m[$i++] - 0xF0) << 18) + (($m[$i++] - 0x80) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; - } elseif (0xE0 <= $m[$i]) { - $c = (($m[$i++] - 0xE0) << 12) + (($m[$i++] - 0x80) << 6) + $m[$i++] - 0x80; - } else { - $c = (($m[$i++] - 0xC0) << 6) + $m[$i++] - 0x80; - } - - $entities .= '&#'.$c.';'; - } - - return $entities; - } - - private static function title_case(array $s) - { - return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8'); - } - - private static function getData($file) - { - if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { - return require $file; - } - - return false; - } - - private static function getEncoding($encoding) - { - if (null === $encoding) { - return self::$internalEncoding; - } - - if ('UTF-8' === $encoding) { - return 'UTF-8'; - } - - $encoding = strtoupper($encoding); - - if ('8BIT' === $encoding || 'BINARY' === $encoding) { - return 'CP850'; - } - - if ('UTF8' === $encoding) { - return 'UTF-8'; - } - - return $encoding; - } -} diff --git a/vendor/symfony/polyfill-mbstring/README.md b/vendor/symfony/polyfill-mbstring/README.md deleted file mode 100644 index 478b40d..0000000 --- a/vendor/symfony/polyfill-mbstring/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Symfony Polyfill / Mbstring -=========================== - -This component provides a partial, native PHP implementation for the -[Mbstring](https://php.net/mbstring) extension. - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php deleted file mode 100644 index 512bba0..0000000 --- a/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php - -return [ - 'İ' => 'i̇', - 'µ' => 'μ', - 'ſ' => 's', - 'ͅ' => 'ι', - 'ς' => 'σ', - 'ϐ' => 'β', - 'ϑ' => 'θ', - 'ϕ' => 'φ', - 'ϖ' => 'π', - 'ϰ' => 'κ', - 'ϱ' => 'ρ', - 'ϵ' => 'ε', - 'ẛ' => 'ṡ', - 'ι' => 'ι', - 'ß' => 'ss', - 'ʼn' => 'ʼn', - 'ǰ' => 'ǰ', - 'ΐ' => 'ΐ', - 'ΰ' => 'ΰ', - 'և' => 'եւ', - 'ẖ' => 'ẖ', - 'ẗ' => 'ẗ', - 'ẘ' => 'ẘ', - 'ẙ' => 'ẙ', - 'ẚ' => 'aʾ', - 'ẞ' => 'ss', - 'ὐ' => 'ὐ', - 'ὒ' => 'ὒ', - 'ὔ' => 'ὔ', - 'ὖ' => 'ὖ', - 'ᾀ' => 'ἀι', - 'ᾁ' => 'ἁι', - 'ᾂ' => 'ἂι', - 'ᾃ' => 'ἃι', - 'ᾄ' => 'ἄι', - 'ᾅ' => 'ἅι', - 'ᾆ' => 'ἆι', - 'ᾇ' => 'ἇι', - 'ᾈ' => 'ἀι', - 'ᾉ' => 'ἁι', - 'ᾊ' => 'ἂι', - 'ᾋ' => 'ἃι', - 'ᾌ' => 'ἄι', - 'ᾍ' => 'ἅι', - 'ᾎ' => 'ἆι', - 'ᾏ' => 'ἇι', - 'ᾐ' => 'ἠι', - 'ᾑ' => 'ἡι', - 'ᾒ' => 'ἢι', - 'ᾓ' => 'ἣι', - 'ᾔ' => 'ἤι', - 'ᾕ' => 'ἥι', - 'ᾖ' => 'ἦι', - 'ᾗ' => 'ἧι', - 'ᾘ' => 'ἠι', - 'ᾙ' => 'ἡι', - 'ᾚ' => 'ἢι', - 'ᾛ' => 'ἣι', - 'ᾜ' => 'ἤι', - 'ᾝ' => 'ἥι', - 'ᾞ' => 'ἦι', - 'ᾟ' => 'ἧι', - 'ᾠ' => 'ὠι', - 'ᾡ' => 'ὡι', - 'ᾢ' => 'ὢι', - 'ᾣ' => 'ὣι', - 'ᾤ' => 'ὤι', - 'ᾥ' => 'ὥι', - 'ᾦ' => 'ὦι', - 'ᾧ' => 'ὧι', - 'ᾨ' => 'ὠι', - 'ᾩ' => 'ὡι', - 'ᾪ' => 'ὢι', - 'ᾫ' => 'ὣι', - 'ᾬ' => 'ὤι', - 'ᾭ' => 'ὥι', - 'ᾮ' => 'ὦι', - 'ᾯ' => 'ὧι', - 'ᾲ' => 'ὰι', - 'ᾳ' => 'αι', - 'ᾴ' => 'άι', - 'ᾶ' => 'ᾶ', - 'ᾷ' => 'ᾶι', - 'ᾼ' => 'αι', - 'ῂ' => 'ὴι', - 'ῃ' => 'ηι', - 'ῄ' => 'ήι', - 'ῆ' => 'ῆ', - 'ῇ' => 'ῆι', - 'ῌ' => 'ηι', - 'ῒ' => 'ῒ', - 'ῖ' => 'ῖ', - 'ῗ' => 'ῗ', - 'ῢ' => 'ῢ', - 'ῤ' => 'ῤ', - 'ῦ' => 'ῦ', - 'ῧ' => 'ῧ', - 'ῲ' => 'ὼι', - 'ῳ' => 'ωι', - 'ῴ' => 'ώι', - 'ῶ' => 'ῶ', - 'ῷ' => 'ῶι', - 'ῼ' => 'ωι', - 'ff' => 'ff', - 'fi' => 'fi', - 'fl' => 'fl', - 'ffi' => 'ffi', - 'ffl' => 'ffl', - 'ſt' => 'st', - 'st' => 'st', - 'ﬓ' => 'մն', - 'ﬔ' => 'մե', - 'ﬕ' => 'մի', - 'ﬖ' => 'վն', - 'ﬗ' => 'մխ', -]; diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php deleted file mode 100644 index fac60b0..0000000 --- a/vendor/symfony/polyfill-mbstring/Resources/unidata/lowerCase.php +++ /dev/null @@ -1,1397 +0,0 @@ -<?php - -return array ( - 'A' => 'a', - 'B' => 'b', - 'C' => 'c', - 'D' => 'd', - 'E' => 'e', - 'F' => 'f', - 'G' => 'g', - 'H' => 'h', - 'I' => 'i', - 'J' => 'j', - 'K' => 'k', - 'L' => 'l', - 'M' => 'm', - 'N' => 'n', - 'O' => 'o', - 'P' => 'p', - 'Q' => 'q', - 'R' => 'r', - 'S' => 's', - 'T' => 't', - 'U' => 'u', - 'V' => 'v', - 'W' => 'w', - 'X' => 'x', - 'Y' => 'y', - 'Z' => 'z', - 'À' => 'à', - 'Á' => 'á', - 'Â' => 'â', - 'Ã' => 'ã', - 'Ä' => 'ä', - 'Å' => 'å', - 'Æ' => 'æ', - 'Ç' => 'ç', - 'È' => 'è', - 'É' => 'é', - 'Ê' => 'ê', - 'Ë' => 'ë', - 'Ì' => 'ì', - 'Í' => 'í', - 'Î' => 'î', - 'Ï' => 'ï', - 'Ð' => 'ð', - 'Ñ' => 'ñ', - 'Ò' => 'ò', - 'Ó' => 'ó', - 'Ô' => 'ô', - 'Õ' => 'õ', - 'Ö' => 'ö', - 'Ø' => 'ø', - 'Ù' => 'ù', - 'Ú' => 'ú', - 'Û' => 'û', - 'Ü' => 'ü', - 'Ý' => 'ý', - 'Þ' => 'þ', - 'Ā' => 'ā', - 'Ă' => 'ă', - 'Ą' => 'ą', - 'Ć' => 'ć', - 'Ĉ' => 'ĉ', - 'Ċ' => 'ċ', - 'Č' => 'č', - 'Ď' => 'ď', - 'Đ' => 'đ', - 'Ē' => 'ē', - 'Ĕ' => 'ĕ', - 'Ė' => 'ė', - 'Ę' => 'ę', - 'Ě' => 'ě', - 'Ĝ' => 'ĝ', - 'Ğ' => 'ğ', - 'Ġ' => 'ġ', - 'Ģ' => 'ģ', - 'Ĥ' => 'ĥ', - 'Ħ' => 'ħ', - 'Ĩ' => 'ĩ', - 'Ī' => 'ī', - 'Ĭ' => 'ĭ', - 'Į' => 'į', - 'İ' => 'i̇', - 'IJ' => 'ij', - 'Ĵ' => 'ĵ', - 'Ķ' => 'ķ', - 'Ĺ' => 'ĺ', - 'Ļ' => 'ļ', - 'Ľ' => 'ľ', - 'Ŀ' => 'ŀ', - 'Ł' => 'ł', - 'Ń' => 'ń', - 'Ņ' => 'ņ', - 'Ň' => 'ň', - 'Ŋ' => 'ŋ', - 'Ō' => 'ō', - 'Ŏ' => 'ŏ', - 'Ő' => 'ő', - 'Œ' => 'œ', - 'Ŕ' => 'ŕ', - 'Ŗ' => 'ŗ', - 'Ř' => 'ř', - 'Ś' => 'ś', - 'Ŝ' => 'ŝ', - 'Ş' => 'ş', - 'Š' => 'š', - 'Ţ' => 'ţ', - 'Ť' => 'ť', - 'Ŧ' => 'ŧ', - 'Ũ' => 'ũ', - 'Ū' => 'ū', - 'Ŭ' => 'ŭ', - 'Ů' => 'ů', - 'Ű' => 'ű', - 'Ų' => 'ų', - 'Ŵ' => 'ŵ', - 'Ŷ' => 'ŷ', - 'Ÿ' => 'ÿ', - 'Ź' => 'ź', - 'Ż' => 'ż', - 'Ž' => 'ž', - 'Ɓ' => 'ɓ', - 'Ƃ' => 'ƃ', - 'Ƅ' => 'ƅ', - 'Ɔ' => 'ɔ', - 'Ƈ' => 'ƈ', - 'Ɖ' => 'ɖ', - 'Ɗ' => 'ɗ', - 'Ƌ' => 'ƌ', - 'Ǝ' => 'ǝ', - 'Ə' => 'ə', - 'Ɛ' => 'ɛ', - 'Ƒ' => 'ƒ', - 'Ɠ' => 'ɠ', - 'Ɣ' => 'ɣ', - 'Ɩ' => 'ɩ', - 'Ɨ' => 'ɨ', - 'Ƙ' => 'ƙ', - 'Ɯ' => 'ɯ', - 'Ɲ' => 'ɲ', - 'Ɵ' => 'ɵ', - 'Ơ' => 'ơ', - 'Ƣ' => 'ƣ', - 'Ƥ' => 'ƥ', - 'Ʀ' => 'ʀ', - 'Ƨ' => 'ƨ', - 'Ʃ' => 'ʃ', - 'Ƭ' => 'ƭ', - 'Ʈ' => 'ʈ', - 'Ư' => 'ư', - 'Ʊ' => 'ʊ', - 'Ʋ' => 'ʋ', - 'Ƴ' => 'ƴ', - 'Ƶ' => 'ƶ', - 'Ʒ' => 'ʒ', - 'Ƹ' => 'ƹ', - 'Ƽ' => 'ƽ', - 'DŽ' => 'dž', - 'Dž' => 'dž', - 'LJ' => 'lj', - 'Lj' => 'lj', - 'NJ' => 'nj', - 'Nj' => 'nj', - 'Ǎ' => 'ǎ', - 'Ǐ' => 'ǐ', - 'Ǒ' => 'ǒ', - 'Ǔ' => 'ǔ', - 'Ǖ' => 'ǖ', - 'Ǘ' => 'ǘ', - 'Ǚ' => 'ǚ', - 'Ǜ' => 'ǜ', - 'Ǟ' => 'ǟ', - 'Ǡ' => 'ǡ', - 'Ǣ' => 'ǣ', - 'Ǥ' => 'ǥ', - 'Ǧ' => 'ǧ', - 'Ǩ' => 'ǩ', - 'Ǫ' => 'ǫ', - 'Ǭ' => 'ǭ', - 'Ǯ' => 'ǯ', - 'DZ' => 'dz', - 'Dz' => 'dz', - 'Ǵ' => 'ǵ', - 'Ƕ' => 'ƕ', - 'Ƿ' => 'ƿ', - 'Ǹ' => 'ǹ', - 'Ǻ' => 'ǻ', - 'Ǽ' => 'ǽ', - 'Ǿ' => 'ǿ', - 'Ȁ' => 'ȁ', - 'Ȃ' => 'ȃ', - 'Ȅ' => 'ȅ', - 'Ȇ' => 'ȇ', - 'Ȉ' => 'ȉ', - 'Ȋ' => 'ȋ', - 'Ȍ' => 'ȍ', - 'Ȏ' => 'ȏ', - 'Ȑ' => 'ȑ', - 'Ȓ' => 'ȓ', - 'Ȕ' => 'ȕ', - 'Ȗ' => 'ȗ', - 'Ș' => 'ș', - 'Ț' => 'ț', - 'Ȝ' => 'ȝ', - 'Ȟ' => 'ȟ', - 'Ƞ' => 'ƞ', - 'Ȣ' => 'ȣ', - 'Ȥ' => 'ȥ', - 'Ȧ' => 'ȧ', - 'Ȩ' => 'ȩ', - 'Ȫ' => 'ȫ', - 'Ȭ' => 'ȭ', - 'Ȯ' => 'ȯ', - 'Ȱ' => 'ȱ', - 'Ȳ' => 'ȳ', - 'Ⱥ' => 'ⱥ', - 'Ȼ' => 'ȼ', - 'Ƚ' => 'ƚ', - 'Ⱦ' => 'ⱦ', - 'Ɂ' => 'ɂ', - 'Ƀ' => 'ƀ', - 'Ʉ' => 'ʉ', - 'Ʌ' => 'ʌ', - 'Ɇ' => 'ɇ', - 'Ɉ' => 'ɉ', - 'Ɋ' => 'ɋ', - 'Ɍ' => 'ɍ', - 'Ɏ' => 'ɏ', - 'Ͱ' => 'ͱ', - 'Ͳ' => 'ͳ', - 'Ͷ' => 'ͷ', - 'Ϳ' => 'ϳ', - 'Ά' => 'ά', - 'Έ' => 'έ', - 'Ή' => 'ή', - 'Ί' => 'ί', - 'Ό' => 'ό', - 'Ύ' => 'ύ', - 'Ώ' => 'ώ', - 'Α' => 'α', - 'Β' => 'β', - 'Γ' => 'γ', - 'Δ' => 'δ', - 'Ε' => 'ε', - 'Ζ' => 'ζ', - 'Η' => 'η', - 'Θ' => 'θ', - 'Ι' => 'ι', - 'Κ' => 'κ', - 'Λ' => 'λ', - 'Μ' => 'μ', - 'Ν' => 'ν', - 'Ξ' => 'ξ', - 'Ο' => 'ο', - 'Π' => 'π', - 'Ρ' => 'ρ', - 'Σ' => 'σ', - 'Τ' => 'τ', - 'Υ' => 'υ', - 'Φ' => 'φ', - 'Χ' => 'χ', - 'Ψ' => 'ψ', - 'Ω' => 'ω', - 'Ϊ' => 'ϊ', - 'Ϋ' => 'ϋ', - 'Ϗ' => 'ϗ', - 'Ϙ' => 'ϙ', - 'Ϛ' => 'ϛ', - 'Ϝ' => 'ϝ', - 'Ϟ' => 'ϟ', - 'Ϡ' => 'ϡ', - 'Ϣ' => 'ϣ', - 'Ϥ' => 'ϥ', - 'Ϧ' => 'ϧ', - 'Ϩ' => 'ϩ', - 'Ϫ' => 'ϫ', - 'Ϭ' => 'ϭ', - 'Ϯ' => 'ϯ', - 'ϴ' => 'θ', - 'Ϸ' => 'ϸ', - 'Ϲ' => 'ϲ', - 'Ϻ' => 'ϻ', - 'Ͻ' => 'ͻ', - 'Ͼ' => 'ͼ', - 'Ͽ' => 'ͽ', - 'Ѐ' => 'ѐ', - 'Ё' => 'ё', - 'Ђ' => 'ђ', - 'Ѓ' => 'ѓ', - 'Є' => 'є', - 'Ѕ' => 'ѕ', - 'І' => 'і', - 'Ї' => 'ї', - 'Ј' => 'ј', - 'Љ' => 'љ', - 'Њ' => 'њ', - 'Ћ' => 'ћ', - 'Ќ' => 'ќ', - 'Ѝ' => 'ѝ', - 'Ў' => 'ў', - 'Џ' => 'џ', - 'А' => 'а', - 'Б' => 'б', - 'В' => 'в', - 'Г' => 'г', - 'Д' => 'д', - 'Е' => 'е', - 'Ж' => 'ж', - 'З' => 'з', - 'И' => 'и', - 'Й' => 'й', - 'К' => 'к', - 'Л' => 'л', - 'М' => 'м', - 'Н' => 'н', - 'О' => 'о', - 'П' => 'п', - 'Р' => 'р', - 'С' => 'с', - 'Т' => 'т', - 'У' => 'у', - 'Ф' => 'ф', - 'Х' => 'х', - 'Ц' => 'ц', - 'Ч' => 'ч', - 'Ш' => 'ш', - 'Щ' => 'щ', - 'Ъ' => 'ъ', - 'Ы' => 'ы', - 'Ь' => 'ь', - 'Э' => 'э', - 'Ю' => 'ю', - 'Я' => 'я', - 'Ѡ' => 'ѡ', - 'Ѣ' => 'ѣ', - 'Ѥ' => 'ѥ', - 'Ѧ' => 'ѧ', - 'Ѩ' => 'ѩ', - 'Ѫ' => 'ѫ', - 'Ѭ' => 'ѭ', - 'Ѯ' => 'ѯ', - 'Ѱ' => 'ѱ', - 'Ѳ' => 'ѳ', - 'Ѵ' => 'ѵ', - 'Ѷ' => 'ѷ', - 'Ѹ' => 'ѹ', - 'Ѻ' => 'ѻ', - 'Ѽ' => 'ѽ', - 'Ѿ' => 'ѿ', - 'Ҁ' => 'ҁ', - 'Ҋ' => 'ҋ', - 'Ҍ' => 'ҍ', - 'Ҏ' => 'ҏ', - 'Ґ' => 'ґ', - 'Ғ' => 'ғ', - 'Ҕ' => 'ҕ', - 'Җ' => 'җ', - 'Ҙ' => 'ҙ', - 'Қ' => 'қ', - 'Ҝ' => 'ҝ', - 'Ҟ' => 'ҟ', - 'Ҡ' => 'ҡ', - 'Ң' => 'ң', - 'Ҥ' => 'ҥ', - 'Ҧ' => 'ҧ', - 'Ҩ' => 'ҩ', - 'Ҫ' => 'ҫ', - 'Ҭ' => 'ҭ', - 'Ү' => 'ү', - 'Ұ' => 'ұ', - 'Ҳ' => 'ҳ', - 'Ҵ' => 'ҵ', - 'Ҷ' => 'ҷ', - 'Ҹ' => 'ҹ', - 'Һ' => 'һ', - 'Ҽ' => 'ҽ', - 'Ҿ' => 'ҿ', - 'Ӏ' => 'ӏ', - 'Ӂ' => 'ӂ', - 'Ӄ' => 'ӄ', - 'Ӆ' => 'ӆ', - 'Ӈ' => 'ӈ', - 'Ӊ' => 'ӊ', - 'Ӌ' => 'ӌ', - 'Ӎ' => 'ӎ', - 'Ӑ' => 'ӑ', - 'Ӓ' => 'ӓ', - 'Ӕ' => 'ӕ', - 'Ӗ' => 'ӗ', - 'Ә' => 'ә', - 'Ӛ' => 'ӛ', - 'Ӝ' => 'ӝ', - 'Ӟ' => 'ӟ', - 'Ӡ' => 'ӡ', - 'Ӣ' => 'ӣ', - 'Ӥ' => 'ӥ', - 'Ӧ' => 'ӧ', - 'Ө' => 'ө', - 'Ӫ' => 'ӫ', - 'Ӭ' => 'ӭ', - 'Ӯ' => 'ӯ', - 'Ӱ' => 'ӱ', - 'Ӳ' => 'ӳ', - 'Ӵ' => 'ӵ', - 'Ӷ' => 'ӷ', - 'Ӹ' => 'ӹ', - 'Ӻ' => 'ӻ', - 'Ӽ' => 'ӽ', - 'Ӿ' => 'ӿ', - 'Ԁ' => 'ԁ', - 'Ԃ' => 'ԃ', - 'Ԅ' => 'ԅ', - 'Ԇ' => 'ԇ', - 'Ԉ' => 'ԉ', - 'Ԋ' => 'ԋ', - 'Ԍ' => 'ԍ', - 'Ԏ' => 'ԏ', - 'Ԑ' => 'ԑ', - 'Ԓ' => 'ԓ', - 'Ԕ' => 'ԕ', - 'Ԗ' => 'ԗ', - 'Ԙ' => 'ԙ', - 'Ԛ' => 'ԛ', - 'Ԝ' => 'ԝ', - 'Ԟ' => 'ԟ', - 'Ԡ' => 'ԡ', - 'Ԣ' => 'ԣ', - 'Ԥ' => 'ԥ', - 'Ԧ' => 'ԧ', - 'Ԩ' => 'ԩ', - 'Ԫ' => 'ԫ', - 'Ԭ' => 'ԭ', - 'Ԯ' => 'ԯ', - 'Ա' => 'ա', - 'Բ' => 'բ', - 'Գ' => 'գ', - 'Դ' => 'դ', - 'Ե' => 'ե', - 'Զ' => 'զ', - 'Է' => 'է', - 'Ը' => 'ը', - 'Թ' => 'թ', - 'Ժ' => 'ժ', - 'Ի' => 'ի', - 'Լ' => 'լ', - 'Խ' => 'խ', - 'Ծ' => 'ծ', - 'Կ' => 'կ', - 'Հ' => 'հ', - 'Ձ' => 'ձ', - 'Ղ' => 'ղ', - 'Ճ' => 'ճ', - 'Մ' => 'մ', - 'Յ' => 'յ', - 'Ն' => 'ն', - 'Շ' => 'շ', - 'Ո' => 'ո', - 'Չ' => 'չ', - 'Պ' => 'պ', - 'Ջ' => 'ջ', - 'Ռ' => 'ռ', - 'Ս' => 'ս', - 'Վ' => 'վ', - 'Տ' => 'տ', - 'Ր' => 'ր', - 'Ց' => 'ց', - 'Ւ' => 'ւ', - 'Փ' => 'փ', - 'Ք' => 'ք', - 'Օ' => 'օ', - 'Ֆ' => 'ֆ', - 'Ⴀ' => 'ⴀ', - 'Ⴁ' => 'ⴁ', - 'Ⴂ' => 'ⴂ', - 'Ⴃ' => 'ⴃ', - 'Ⴄ' => 'ⴄ', - 'Ⴅ' => 'ⴅ', - 'Ⴆ' => 'ⴆ', - 'Ⴇ' => 'ⴇ', - 'Ⴈ' => 'ⴈ', - 'Ⴉ' => 'ⴉ', - 'Ⴊ' => 'ⴊ', - 'Ⴋ' => 'ⴋ', - 'Ⴌ' => 'ⴌ', - 'Ⴍ' => 'ⴍ', - 'Ⴎ' => 'ⴎ', - 'Ⴏ' => 'ⴏ', - 'Ⴐ' => 'ⴐ', - 'Ⴑ' => 'ⴑ', - 'Ⴒ' => 'ⴒ', - 'Ⴓ' => 'ⴓ', - 'Ⴔ' => 'ⴔ', - 'Ⴕ' => 'ⴕ', - 'Ⴖ' => 'ⴖ', - 'Ⴗ' => 'ⴗ', - 'Ⴘ' => 'ⴘ', - 'Ⴙ' => 'ⴙ', - 'Ⴚ' => 'ⴚ', - 'Ⴛ' => 'ⴛ', - 'Ⴜ' => 'ⴜ', - 'Ⴝ' => 'ⴝ', - 'Ⴞ' => 'ⴞ', - 'Ⴟ' => 'ⴟ', - 'Ⴠ' => 'ⴠ', - 'Ⴡ' => 'ⴡ', - 'Ⴢ' => 'ⴢ', - 'Ⴣ' => 'ⴣ', - 'Ⴤ' => 'ⴤ', - 'Ⴥ' => 'ⴥ', - 'Ⴧ' => 'ⴧ', - 'Ⴭ' => 'ⴭ', - 'Ꭰ' => 'ꭰ', - 'Ꭱ' => 'ꭱ', - 'Ꭲ' => 'ꭲ', - 'Ꭳ' => 'ꭳ', - 'Ꭴ' => 'ꭴ', - 'Ꭵ' => 'ꭵ', - 'Ꭶ' => 'ꭶ', - 'Ꭷ' => 'ꭷ', - 'Ꭸ' => 'ꭸ', - 'Ꭹ' => 'ꭹ', - 'Ꭺ' => 'ꭺ', - 'Ꭻ' => 'ꭻ', - 'Ꭼ' => 'ꭼ', - 'Ꭽ' => 'ꭽ', - 'Ꭾ' => 'ꭾ', - 'Ꭿ' => 'ꭿ', - 'Ꮀ' => 'ꮀ', - 'Ꮁ' => 'ꮁ', - 'Ꮂ' => 'ꮂ', - 'Ꮃ' => 'ꮃ', - 'Ꮄ' => 'ꮄ', - 'Ꮅ' => 'ꮅ', - 'Ꮆ' => 'ꮆ', - 'Ꮇ' => 'ꮇ', - 'Ꮈ' => 'ꮈ', - 'Ꮉ' => 'ꮉ', - 'Ꮊ' => 'ꮊ', - 'Ꮋ' => 'ꮋ', - 'Ꮌ' => 'ꮌ', - 'Ꮍ' => 'ꮍ', - 'Ꮎ' => 'ꮎ', - 'Ꮏ' => 'ꮏ', - 'Ꮐ' => 'ꮐ', - 'Ꮑ' => 'ꮑ', - 'Ꮒ' => 'ꮒ', - 'Ꮓ' => 'ꮓ', - 'Ꮔ' => 'ꮔ', - 'Ꮕ' => 'ꮕ', - 'Ꮖ' => 'ꮖ', - 'Ꮗ' => 'ꮗ', - 'Ꮘ' => 'ꮘ', - 'Ꮙ' => 'ꮙ', - 'Ꮚ' => 'ꮚ', - 'Ꮛ' => 'ꮛ', - 'Ꮜ' => 'ꮜ', - 'Ꮝ' => 'ꮝ', - 'Ꮞ' => 'ꮞ', - 'Ꮟ' => 'ꮟ', - 'Ꮠ' => 'ꮠ', - 'Ꮡ' => 'ꮡ', - 'Ꮢ' => 'ꮢ', - 'Ꮣ' => 'ꮣ', - 'Ꮤ' => 'ꮤ', - 'Ꮥ' => 'ꮥ', - 'Ꮦ' => 'ꮦ', - 'Ꮧ' => 'ꮧ', - 'Ꮨ' => 'ꮨ', - 'Ꮩ' => 'ꮩ', - 'Ꮪ' => 'ꮪ', - 'Ꮫ' => 'ꮫ', - 'Ꮬ' => 'ꮬ', - 'Ꮭ' => 'ꮭ', - 'Ꮮ' => 'ꮮ', - 'Ꮯ' => 'ꮯ', - 'Ꮰ' => 'ꮰ', - 'Ꮱ' => 'ꮱ', - 'Ꮲ' => 'ꮲ', - 'Ꮳ' => 'ꮳ', - 'Ꮴ' => 'ꮴ', - 'Ꮵ' => 'ꮵ', - 'Ꮶ' => 'ꮶ', - 'Ꮷ' => 'ꮷ', - 'Ꮸ' => 'ꮸ', - 'Ꮹ' => 'ꮹ', - 'Ꮺ' => 'ꮺ', - 'Ꮻ' => 'ꮻ', - 'Ꮼ' => 'ꮼ', - 'Ꮽ' => 'ꮽ', - 'Ꮾ' => 'ꮾ', - 'Ꮿ' => 'ꮿ', - 'Ᏸ' => 'ᏸ', - 'Ᏹ' => 'ᏹ', - 'Ᏺ' => 'ᏺ', - 'Ᏻ' => 'ᏻ', - 'Ᏼ' => 'ᏼ', - 'Ᏽ' => 'ᏽ', - 'Ა' => 'ა', - 'Ბ' => 'ბ', - 'Გ' => 'გ', - 'Დ' => 'დ', - 'Ე' => 'ე', - 'Ვ' => 'ვ', - 'Ზ' => 'ზ', - 'Თ' => 'თ', - 'Ი' => 'ი', - 'Კ' => 'კ', - 'Ლ' => 'ლ', - 'Მ' => 'მ', - 'Ნ' => 'ნ', - 'Ო' => 'ო', - 'Პ' => 'პ', - 'Ჟ' => 'ჟ', - 'Რ' => 'რ', - 'Ს' => 'ს', - 'Ტ' => 'ტ', - 'Უ' => 'უ', - 'Ფ' => 'ფ', - 'Ქ' => 'ქ', - 'Ღ' => 'ღ', - 'Ყ' => 'ყ', - 'Შ' => 'შ', - 'Ჩ' => 'ჩ', - 'Ც' => 'ც', - 'Ძ' => 'ძ', - 'Წ' => 'წ', - 'Ჭ' => 'ჭ', - 'Ხ' => 'ხ', - 'Ჯ' => 'ჯ', - 'Ჰ' => 'ჰ', - 'Ჱ' => 'ჱ', - 'Ჲ' => 'ჲ', - 'Ჳ' => 'ჳ', - 'Ჴ' => 'ჴ', - 'Ჵ' => 'ჵ', - 'Ჶ' => 'ჶ', - 'Ჷ' => 'ჷ', - 'Ჸ' => 'ჸ', - 'Ჹ' => 'ჹ', - 'Ჺ' => 'ჺ', - 'Ჽ' => 'ჽ', - 'Ჾ' => 'ჾ', - 'Ჿ' => 'ჿ', - 'Ḁ' => 'ḁ', - 'Ḃ' => 'ḃ', - 'Ḅ' => 'ḅ', - 'Ḇ' => 'ḇ', - 'Ḉ' => 'ḉ', - 'Ḋ' => 'ḋ', - 'Ḍ' => 'ḍ', - 'Ḏ' => 'ḏ', - 'Ḑ' => 'ḑ', - 'Ḓ' => 'ḓ', - 'Ḕ' => 'ḕ', - 'Ḗ' => 'ḗ', - 'Ḙ' => 'ḙ', - 'Ḛ' => 'ḛ', - 'Ḝ' => 'ḝ', - 'Ḟ' => 'ḟ', - 'Ḡ' => 'ḡ', - 'Ḣ' => 'ḣ', - 'Ḥ' => 'ḥ', - 'Ḧ' => 'ḧ', - 'Ḩ' => 'ḩ', - 'Ḫ' => 'ḫ', - 'Ḭ' => 'ḭ', - 'Ḯ' => 'ḯ', - 'Ḱ' => 'ḱ', - 'Ḳ' => 'ḳ', - 'Ḵ' => 'ḵ', - 'Ḷ' => 'ḷ', - 'Ḹ' => 'ḹ', - 'Ḻ' => 'ḻ', - 'Ḽ' => 'ḽ', - 'Ḿ' => 'ḿ', - 'Ṁ' => 'ṁ', - 'Ṃ' => 'ṃ', - 'Ṅ' => 'ṅ', - 'Ṇ' => 'ṇ', - 'Ṉ' => 'ṉ', - 'Ṋ' => 'ṋ', - 'Ṍ' => 'ṍ', - 'Ṏ' => 'ṏ', - 'Ṑ' => 'ṑ', - 'Ṓ' => 'ṓ', - 'Ṕ' => 'ṕ', - 'Ṗ' => 'ṗ', - 'Ṙ' => 'ṙ', - 'Ṛ' => 'ṛ', - 'Ṝ' => 'ṝ', - 'Ṟ' => 'ṟ', - 'Ṡ' => 'ṡ', - 'Ṣ' => 'ṣ', - 'Ṥ' => 'ṥ', - 'Ṧ' => 'ṧ', - 'Ṩ' => 'ṩ', - 'Ṫ' => 'ṫ', - 'Ṭ' => 'ṭ', - 'Ṯ' => 'ṯ', - 'Ṱ' => 'ṱ', - 'Ṳ' => 'ṳ', - 'Ṵ' => 'ṵ', - 'Ṷ' => 'ṷ', - 'Ṹ' => 'ṹ', - 'Ṻ' => 'ṻ', - 'Ṽ' => 'ṽ', - 'Ṿ' => 'ṿ', - 'Ẁ' => 'ẁ', - 'Ẃ' => 'ẃ', - 'Ẅ' => 'ẅ', - 'Ẇ' => 'ẇ', - 'Ẉ' => 'ẉ', - 'Ẋ' => 'ẋ', - 'Ẍ' => 'ẍ', - 'Ẏ' => 'ẏ', - 'Ẑ' => 'ẑ', - 'Ẓ' => 'ẓ', - 'Ẕ' => 'ẕ', - 'ẞ' => 'ß', - 'Ạ' => 'ạ', - 'Ả' => 'ả', - 'Ấ' => 'ấ', - 'Ầ' => 'ầ', - 'Ẩ' => 'ẩ', - 'Ẫ' => 'ẫ', - 'Ậ' => 'ậ', - 'Ắ' => 'ắ', - 'Ằ' => 'ằ', - 'Ẳ' => 'ẳ', - 'Ẵ' => 'ẵ', - 'Ặ' => 'ặ', - 'Ẹ' => 'ẹ', - 'Ẻ' => 'ẻ', - 'Ẽ' => 'ẽ', - 'Ế' => 'ế', - 'Ề' => 'ề', - 'Ể' => 'ể', - 'Ễ' => 'ễ', - 'Ệ' => 'ệ', - 'Ỉ' => 'ỉ', - 'Ị' => 'ị', - 'Ọ' => 'ọ', - 'Ỏ' => 'ỏ', - 'Ố' => 'ố', - 'Ồ' => 'ồ', - 'Ổ' => 'ổ', - 'Ỗ' => 'ỗ', - 'Ộ' => 'ộ', - 'Ớ' => 'ớ', - 'Ờ' => 'ờ', - 'Ở' => 'ở', - 'Ỡ' => 'ỡ', - 'Ợ' => 'ợ', - 'Ụ' => 'ụ', - 'Ủ' => 'ủ', - 'Ứ' => 'ứ', - 'Ừ' => 'ừ', - 'Ử' => 'ử', - 'Ữ' => 'ữ', - 'Ự' => 'ự', - 'Ỳ' => 'ỳ', - 'Ỵ' => 'ỵ', - 'Ỷ' => 'ỷ', - 'Ỹ' => 'ỹ', - 'Ỻ' => 'ỻ', - 'Ỽ' => 'ỽ', - 'Ỿ' => 'ỿ', - 'Ἀ' => 'ἀ', - 'Ἁ' => 'ἁ', - 'Ἂ' => 'ἂ', - 'Ἃ' => 'ἃ', - 'Ἄ' => 'ἄ', - 'Ἅ' => 'ἅ', - 'Ἆ' => 'ἆ', - 'Ἇ' => 'ἇ', - 'Ἐ' => 'ἐ', - 'Ἑ' => 'ἑ', - 'Ἒ' => 'ἒ', - 'Ἓ' => 'ἓ', - 'Ἔ' => 'ἔ', - 'Ἕ' => 'ἕ', - 'Ἠ' => 'ἠ', - 'Ἡ' => 'ἡ', - 'Ἢ' => 'ἢ', - 'Ἣ' => 'ἣ', - 'Ἤ' => 'ἤ', - 'Ἥ' => 'ἥ', - 'Ἦ' => 'ἦ', - 'Ἧ' => 'ἧ', - 'Ἰ' => 'ἰ', - 'Ἱ' => 'ἱ', - 'Ἲ' => 'ἲ', - 'Ἳ' => 'ἳ', - 'Ἴ' => 'ἴ', - 'Ἵ' => 'ἵ', - 'Ἶ' => 'ἶ', - 'Ἷ' => 'ἷ', - 'Ὀ' => 'ὀ', - 'Ὁ' => 'ὁ', - 'Ὂ' => 'ὂ', - 'Ὃ' => 'ὃ', - 'Ὄ' => 'ὄ', - 'Ὅ' => 'ὅ', - 'Ὑ' => 'ὑ', - 'Ὓ' => 'ὓ', - 'Ὕ' => 'ὕ', - 'Ὗ' => 'ὗ', - 'Ὠ' => 'ὠ', - 'Ὡ' => 'ὡ', - 'Ὢ' => 'ὢ', - 'Ὣ' => 'ὣ', - 'Ὤ' => 'ὤ', - 'Ὥ' => 'ὥ', - 'Ὦ' => 'ὦ', - 'Ὧ' => 'ὧ', - 'ᾈ' => 'ᾀ', - 'ᾉ' => 'ᾁ', - 'ᾊ' => 'ᾂ', - 'ᾋ' => 'ᾃ', - 'ᾌ' => 'ᾄ', - 'ᾍ' => 'ᾅ', - 'ᾎ' => 'ᾆ', - 'ᾏ' => 'ᾇ', - 'ᾘ' => 'ᾐ', - 'ᾙ' => 'ᾑ', - 'ᾚ' => 'ᾒ', - 'ᾛ' => 'ᾓ', - 'ᾜ' => 'ᾔ', - 'ᾝ' => 'ᾕ', - 'ᾞ' => 'ᾖ', - 'ᾟ' => 'ᾗ', - 'ᾨ' => 'ᾠ', - 'ᾩ' => 'ᾡ', - 'ᾪ' => 'ᾢ', - 'ᾫ' => 'ᾣ', - 'ᾬ' => 'ᾤ', - 'ᾭ' => 'ᾥ', - 'ᾮ' => 'ᾦ', - 'ᾯ' => 'ᾧ', - 'Ᾰ' => 'ᾰ', - 'Ᾱ' => 'ᾱ', - 'Ὰ' => 'ὰ', - 'Ά' => 'ά', - 'ᾼ' => 'ᾳ', - 'Ὲ' => 'ὲ', - 'Έ' => 'έ', - 'Ὴ' => 'ὴ', - 'Ή' => 'ή', - 'ῌ' => 'ῃ', - 'Ῐ' => 'ῐ', - 'Ῑ' => 'ῑ', - 'Ὶ' => 'ὶ', - 'Ί' => 'ί', - 'Ῠ' => 'ῠ', - 'Ῡ' => 'ῡ', - 'Ὺ' => 'ὺ', - 'Ύ' => 'ύ', - 'Ῥ' => 'ῥ', - 'Ὸ' => 'ὸ', - 'Ό' => 'ό', - 'Ὼ' => 'ὼ', - 'Ώ' => 'ώ', - 'ῼ' => 'ῳ', - 'Ω' => 'ω', - 'K' => 'k', - 'Å' => 'å', - 'Ⅎ' => 'ⅎ', - 'Ⅰ' => 'ⅰ', - 'Ⅱ' => 'ⅱ', - 'Ⅲ' => 'ⅲ', - 'Ⅳ' => 'ⅳ', - 'Ⅴ' => 'ⅴ', - 'Ⅵ' => 'ⅵ', - 'Ⅶ' => 'ⅶ', - 'Ⅷ' => 'ⅷ', - 'Ⅸ' => 'ⅸ', - 'Ⅹ' => 'ⅹ', - 'Ⅺ' => 'ⅺ', - 'Ⅻ' => 'ⅻ', - 'Ⅼ' => 'ⅼ', - 'Ⅽ' => 'ⅽ', - 'Ⅾ' => 'ⅾ', - 'Ⅿ' => 'ⅿ', - 'Ↄ' => 'ↄ', - 'Ⓐ' => 'ⓐ', - 'Ⓑ' => 'ⓑ', - 'Ⓒ' => 'ⓒ', - 'Ⓓ' => 'ⓓ', - 'Ⓔ' => 'ⓔ', - 'Ⓕ' => 'ⓕ', - 'Ⓖ' => 'ⓖ', - 'Ⓗ' => 'ⓗ', - 'Ⓘ' => 'ⓘ', - 'Ⓙ' => 'ⓙ', - 'Ⓚ' => 'ⓚ', - 'Ⓛ' => 'ⓛ', - 'Ⓜ' => 'ⓜ', - 'Ⓝ' => 'ⓝ', - 'Ⓞ' => 'ⓞ', - 'Ⓟ' => 'ⓟ', - 'Ⓠ' => 'ⓠ', - 'Ⓡ' => 'ⓡ', - 'Ⓢ' => 'ⓢ', - 'Ⓣ' => 'ⓣ', - 'Ⓤ' => 'ⓤ', - 'Ⓥ' => 'ⓥ', - 'Ⓦ' => 'ⓦ', - 'Ⓧ' => 'ⓧ', - 'Ⓨ' => 'ⓨ', - 'Ⓩ' => 'ⓩ', - 'Ⰰ' => 'ⰰ', - 'Ⰱ' => 'ⰱ', - 'Ⰲ' => 'ⰲ', - 'Ⰳ' => 'ⰳ', - 'Ⰴ' => 'ⰴ', - 'Ⰵ' => 'ⰵ', - 'Ⰶ' => 'ⰶ', - 'Ⰷ' => 'ⰷ', - 'Ⰸ' => 'ⰸ', - 'Ⰹ' => 'ⰹ', - 'Ⰺ' => 'ⰺ', - 'Ⰻ' => 'ⰻ', - 'Ⰼ' => 'ⰼ', - 'Ⰽ' => 'ⰽ', - 'Ⰾ' => 'ⰾ', - 'Ⰿ' => 'ⰿ', - 'Ⱀ' => 'ⱀ', - 'Ⱁ' => 'ⱁ', - 'Ⱂ' => 'ⱂ', - 'Ⱃ' => 'ⱃ', - 'Ⱄ' => 'ⱄ', - 'Ⱅ' => 'ⱅ', - 'Ⱆ' => 'ⱆ', - 'Ⱇ' => 'ⱇ', - 'Ⱈ' => 'ⱈ', - 'Ⱉ' => 'ⱉ', - 'Ⱊ' => 'ⱊ', - 'Ⱋ' => 'ⱋ', - 'Ⱌ' => 'ⱌ', - 'Ⱍ' => 'ⱍ', - 'Ⱎ' => 'ⱎ', - 'Ⱏ' => 'ⱏ', - 'Ⱐ' => 'ⱐ', - 'Ⱑ' => 'ⱑ', - 'Ⱒ' => 'ⱒ', - 'Ⱓ' => 'ⱓ', - 'Ⱔ' => 'ⱔ', - 'Ⱕ' => 'ⱕ', - 'Ⱖ' => 'ⱖ', - 'Ⱗ' => 'ⱗ', - 'Ⱘ' => 'ⱘ', - 'Ⱙ' => 'ⱙ', - 'Ⱚ' => 'ⱚ', - 'Ⱛ' => 'ⱛ', - 'Ⱜ' => 'ⱜ', - 'Ⱝ' => 'ⱝ', - 'Ⱞ' => 'ⱞ', - 'Ⱡ' => 'ⱡ', - 'Ɫ' => 'ɫ', - 'Ᵽ' => 'ᵽ', - 'Ɽ' => 'ɽ', - 'Ⱨ' => 'ⱨ', - 'Ⱪ' => 'ⱪ', - 'Ⱬ' => 'ⱬ', - 'Ɑ' => 'ɑ', - 'Ɱ' => 'ɱ', - 'Ɐ' => 'ɐ', - 'Ɒ' => 'ɒ', - 'Ⱳ' => 'ⱳ', - 'Ⱶ' => 'ⱶ', - 'Ȿ' => 'ȿ', - 'Ɀ' => 'ɀ', - 'Ⲁ' => 'ⲁ', - 'Ⲃ' => 'ⲃ', - 'Ⲅ' => 'ⲅ', - 'Ⲇ' => 'ⲇ', - 'Ⲉ' => 'ⲉ', - 'Ⲋ' => 'ⲋ', - 'Ⲍ' => 'ⲍ', - 'Ⲏ' => 'ⲏ', - 'Ⲑ' => 'ⲑ', - 'Ⲓ' => 'ⲓ', - 'Ⲕ' => 'ⲕ', - 'Ⲗ' => 'ⲗ', - 'Ⲙ' => 'ⲙ', - 'Ⲛ' => 'ⲛ', - 'Ⲝ' => 'ⲝ', - 'Ⲟ' => 'ⲟ', - 'Ⲡ' => 'ⲡ', - 'Ⲣ' => 'ⲣ', - 'Ⲥ' => 'ⲥ', - 'Ⲧ' => 'ⲧ', - 'Ⲩ' => 'ⲩ', - 'Ⲫ' => 'ⲫ', - 'Ⲭ' => 'ⲭ', - 'Ⲯ' => 'ⲯ', - 'Ⲱ' => 'ⲱ', - 'Ⲳ' => 'ⲳ', - 'Ⲵ' => 'ⲵ', - 'Ⲷ' => 'ⲷ', - 'Ⲹ' => 'ⲹ', - 'Ⲻ' => 'ⲻ', - 'Ⲽ' => 'ⲽ', - 'Ⲿ' => 'ⲿ', - 'Ⳁ' => 'ⳁ', - 'Ⳃ' => 'ⳃ', - 'Ⳅ' => 'ⳅ', - 'Ⳇ' => 'ⳇ', - 'Ⳉ' => 'ⳉ', - 'Ⳋ' => 'ⳋ', - 'Ⳍ' => 'ⳍ', - 'Ⳏ' => 'ⳏ', - 'Ⳑ' => 'ⳑ', - 'Ⳓ' => 'ⳓ', - 'Ⳕ' => 'ⳕ', - 'Ⳗ' => 'ⳗ', - 'Ⳙ' => 'ⳙ', - 'Ⳛ' => 'ⳛ', - 'Ⳝ' => 'ⳝ', - 'Ⳟ' => 'ⳟ', - 'Ⳡ' => 'ⳡ', - 'Ⳣ' => 'ⳣ', - 'Ⳬ' => 'ⳬ', - 'Ⳮ' => 'ⳮ', - 'Ⳳ' => 'ⳳ', - 'Ꙁ' => 'ꙁ', - 'Ꙃ' => 'ꙃ', - 'Ꙅ' => 'ꙅ', - 'Ꙇ' => 'ꙇ', - 'Ꙉ' => 'ꙉ', - 'Ꙋ' => 'ꙋ', - 'Ꙍ' => 'ꙍ', - 'Ꙏ' => 'ꙏ', - 'Ꙑ' => 'ꙑ', - 'Ꙓ' => 'ꙓ', - 'Ꙕ' => 'ꙕ', - 'Ꙗ' => 'ꙗ', - 'Ꙙ' => 'ꙙ', - 'Ꙛ' => 'ꙛ', - 'Ꙝ' => 'ꙝ', - 'Ꙟ' => 'ꙟ', - 'Ꙡ' => 'ꙡ', - 'Ꙣ' => 'ꙣ', - 'Ꙥ' => 'ꙥ', - 'Ꙧ' => 'ꙧ', - 'Ꙩ' => 'ꙩ', - 'Ꙫ' => 'ꙫ', - 'Ꙭ' => 'ꙭ', - 'Ꚁ' => 'ꚁ', - 'Ꚃ' => 'ꚃ', - 'Ꚅ' => 'ꚅ', - 'Ꚇ' => 'ꚇ', - 'Ꚉ' => 'ꚉ', - 'Ꚋ' => 'ꚋ', - 'Ꚍ' => 'ꚍ', - 'Ꚏ' => 'ꚏ', - 'Ꚑ' => 'ꚑ', - 'Ꚓ' => 'ꚓ', - 'Ꚕ' => 'ꚕ', - 'Ꚗ' => 'ꚗ', - 'Ꚙ' => 'ꚙ', - 'Ꚛ' => 'ꚛ', - 'Ꜣ' => 'ꜣ', - 'Ꜥ' => 'ꜥ', - 'Ꜧ' => 'ꜧ', - 'Ꜩ' => 'ꜩ', - 'Ꜫ' => 'ꜫ', - 'Ꜭ' => 'ꜭ', - 'Ꜯ' => 'ꜯ', - 'Ꜳ' => 'ꜳ', - 'Ꜵ' => 'ꜵ', - 'Ꜷ' => 'ꜷ', - 'Ꜹ' => 'ꜹ', - 'Ꜻ' => 'ꜻ', - 'Ꜽ' => 'ꜽ', - 'Ꜿ' => 'ꜿ', - 'Ꝁ' => 'ꝁ', - 'Ꝃ' => 'ꝃ', - 'Ꝅ' => 'ꝅ', - 'Ꝇ' => 'ꝇ', - 'Ꝉ' => 'ꝉ', - 'Ꝋ' => 'ꝋ', - 'Ꝍ' => 'ꝍ', - 'Ꝏ' => 'ꝏ', - 'Ꝑ' => 'ꝑ', - 'Ꝓ' => 'ꝓ', - 'Ꝕ' => 'ꝕ', - 'Ꝗ' => 'ꝗ', - 'Ꝙ' => 'ꝙ', - 'Ꝛ' => 'ꝛ', - 'Ꝝ' => 'ꝝ', - 'Ꝟ' => 'ꝟ', - 'Ꝡ' => 'ꝡ', - 'Ꝣ' => 'ꝣ', - 'Ꝥ' => 'ꝥ', - 'Ꝧ' => 'ꝧ', - 'Ꝩ' => 'ꝩ', - 'Ꝫ' => 'ꝫ', - 'Ꝭ' => 'ꝭ', - 'Ꝯ' => 'ꝯ', - 'Ꝺ' => 'ꝺ', - 'Ꝼ' => 'ꝼ', - 'Ᵹ' => 'ᵹ', - 'Ꝿ' => 'ꝿ', - 'Ꞁ' => 'ꞁ', - 'Ꞃ' => 'ꞃ', - 'Ꞅ' => 'ꞅ', - 'Ꞇ' => 'ꞇ', - 'Ꞌ' => 'ꞌ', - 'Ɥ' => 'ɥ', - 'Ꞑ' => 'ꞑ', - 'Ꞓ' => 'ꞓ', - 'Ꞗ' => 'ꞗ', - 'Ꞙ' => 'ꞙ', - 'Ꞛ' => 'ꞛ', - 'Ꞝ' => 'ꞝ', - 'Ꞟ' => 'ꞟ', - 'Ꞡ' => 'ꞡ', - 'Ꞣ' => 'ꞣ', - 'Ꞥ' => 'ꞥ', - 'Ꞧ' => 'ꞧ', - 'Ꞩ' => 'ꞩ', - 'Ɦ' => 'ɦ', - 'Ɜ' => 'ɜ', - 'Ɡ' => 'ɡ', - 'Ɬ' => 'ɬ', - 'Ɪ' => 'ɪ', - 'Ʞ' => 'ʞ', - 'Ʇ' => 'ʇ', - 'Ʝ' => 'ʝ', - 'Ꭓ' => 'ꭓ', - 'Ꞵ' => 'ꞵ', - 'Ꞷ' => 'ꞷ', - 'Ꞹ' => 'ꞹ', - 'Ꞻ' => 'ꞻ', - 'Ꞽ' => 'ꞽ', - 'Ꞿ' => 'ꞿ', - 'Ꟃ' => 'ꟃ', - 'Ꞔ' => 'ꞔ', - 'Ʂ' => 'ʂ', - 'Ᶎ' => 'ᶎ', - 'Ꟈ' => 'ꟈ', - 'Ꟊ' => 'ꟊ', - 'Ꟶ' => 'ꟶ', - 'A' => 'a', - 'B' => 'b', - 'C' => 'c', - 'D' => 'd', - 'E' => 'e', - 'F' => 'f', - 'G' => 'g', - 'H' => 'h', - 'I' => 'i', - 'J' => 'j', - 'K' => 'k', - 'L' => 'l', - 'M' => 'm', - 'N' => 'n', - 'O' => 'o', - 'P' => 'p', - 'Q' => 'q', - 'R' => 'r', - 'S' => 's', - 'T' => 't', - 'U' => 'u', - 'V' => 'v', - 'W' => 'w', - 'X' => 'x', - 'Y' => 'y', - 'Z' => 'z', - '𐐀' => '𐐨', - '𐐁' => '𐐩', - '𐐂' => '𐐪', - '𐐃' => '𐐫', - '𐐄' => '𐐬', - '𐐅' => '𐐭', - '𐐆' => '𐐮', - '𐐇' => '𐐯', - '𐐈' => '𐐰', - '𐐉' => '𐐱', - '𐐊' => '𐐲', - '𐐋' => '𐐳', - '𐐌' => '𐐴', - '𐐍' => '𐐵', - '𐐎' => '𐐶', - '𐐏' => '𐐷', - '𐐐' => '𐐸', - '𐐑' => '𐐹', - '𐐒' => '𐐺', - '𐐓' => '𐐻', - '𐐔' => '𐐼', - '𐐕' => '𐐽', - '𐐖' => '𐐾', - '𐐗' => '𐐿', - '𐐘' => '𐑀', - '𐐙' => '𐑁', - '𐐚' => '𐑂', - '𐐛' => '𐑃', - '𐐜' => '𐑄', - '𐐝' => '𐑅', - '𐐞' => '𐑆', - '𐐟' => '𐑇', - '𐐠' => '𐑈', - '𐐡' => '𐑉', - '𐐢' => '𐑊', - '𐐣' => '𐑋', - '𐐤' => '𐑌', - '𐐥' => '𐑍', - '𐐦' => '𐑎', - '𐐧' => '𐑏', - '𐒰' => '𐓘', - '𐒱' => '𐓙', - '𐒲' => '𐓚', - '𐒳' => '𐓛', - '𐒴' => '𐓜', - '𐒵' => '𐓝', - '𐒶' => '𐓞', - '𐒷' => '𐓟', - '𐒸' => '𐓠', - '𐒹' => '𐓡', - '𐒺' => '𐓢', - '𐒻' => '𐓣', - '𐒼' => '𐓤', - '𐒽' => '𐓥', - '𐒾' => '𐓦', - '𐒿' => '𐓧', - '𐓀' => '𐓨', - '𐓁' => '𐓩', - '𐓂' => '𐓪', - '𐓃' => '𐓫', - '𐓄' => '𐓬', - '𐓅' => '𐓭', - '𐓆' => '𐓮', - '𐓇' => '𐓯', - '𐓈' => '𐓰', - '𐓉' => '𐓱', - '𐓊' => '𐓲', - '𐓋' => '𐓳', - '𐓌' => '𐓴', - '𐓍' => '𐓵', - '𐓎' => '𐓶', - '𐓏' => '𐓷', - '𐓐' => '𐓸', - '𐓑' => '𐓹', - '𐓒' => '𐓺', - '𐓓' => '𐓻', - '𐲀' => '𐳀', - '𐲁' => '𐳁', - '𐲂' => '𐳂', - '𐲃' => '𐳃', - '𐲄' => '𐳄', - '𐲅' => '𐳅', - '𐲆' => '𐳆', - '𐲇' => '𐳇', - '𐲈' => '𐳈', - '𐲉' => '𐳉', - '𐲊' => '𐳊', - '𐲋' => '𐳋', - '𐲌' => '𐳌', - '𐲍' => '𐳍', - '𐲎' => '𐳎', - '𐲏' => '𐳏', - '𐲐' => '𐳐', - '𐲑' => '𐳑', - '𐲒' => '𐳒', - '𐲓' => '𐳓', - '𐲔' => '𐳔', - '𐲕' => '𐳕', - '𐲖' => '𐳖', - '𐲗' => '𐳗', - '𐲘' => '𐳘', - '𐲙' => '𐳙', - '𐲚' => '𐳚', - '𐲛' => '𐳛', - '𐲜' => '𐳜', - '𐲝' => '𐳝', - '𐲞' => '𐳞', - '𐲟' => '𐳟', - '𐲠' => '𐳠', - '𐲡' => '𐳡', - '𐲢' => '𐳢', - '𐲣' => '𐳣', - '𐲤' => '𐳤', - '𐲥' => '𐳥', - '𐲦' => '𐳦', - '𐲧' => '𐳧', - '𐲨' => '𐳨', - '𐲩' => '𐳩', - '𐲪' => '𐳪', - '𐲫' => '𐳫', - '𐲬' => '𐳬', - '𐲭' => '𐳭', - '𐲮' => '𐳮', - '𐲯' => '𐳯', - '𐲰' => '𐳰', - '𐲱' => '𐳱', - '𐲲' => '𐳲', - '𑢠' => '𑣀', - '𑢡' => '𑣁', - '𑢢' => '𑣂', - '𑢣' => '𑣃', - '𑢤' => '𑣄', - '𑢥' => '𑣅', - '𑢦' => '𑣆', - '𑢧' => '𑣇', - '𑢨' => '𑣈', - '𑢩' => '𑣉', - '𑢪' => '𑣊', - '𑢫' => '𑣋', - '𑢬' => '𑣌', - '𑢭' => '𑣍', - '𑢮' => '𑣎', - '𑢯' => '𑣏', - '𑢰' => '𑣐', - '𑢱' => '𑣑', - '𑢲' => '𑣒', - '𑢳' => '𑣓', - '𑢴' => '𑣔', - '𑢵' => '𑣕', - '𑢶' => '𑣖', - '𑢷' => '𑣗', - '𑢸' => '𑣘', - '𑢹' => '𑣙', - '𑢺' => '𑣚', - '𑢻' => '𑣛', - '𑢼' => '𑣜', - '𑢽' => '𑣝', - '𑢾' => '𑣞', - '𑢿' => '𑣟', - '𖹀' => '𖹠', - '𖹁' => '𖹡', - '𖹂' => '𖹢', - '𖹃' => '𖹣', - '𖹄' => '𖹤', - '𖹅' => '𖹥', - '𖹆' => '𖹦', - '𖹇' => '𖹧', - '𖹈' => '𖹨', - '𖹉' => '𖹩', - '𖹊' => '𖹪', - '𖹋' => '𖹫', - '𖹌' => '𖹬', - '𖹍' => '𖹭', - '𖹎' => '𖹮', - '𖹏' => '𖹯', - '𖹐' => '𖹰', - '𖹑' => '𖹱', - '𖹒' => '𖹲', - '𖹓' => '𖹳', - '𖹔' => '𖹴', - '𖹕' => '𖹵', - '𖹖' => '𖹶', - '𖹗' => '𖹷', - '𖹘' => '𖹸', - '𖹙' => '𖹹', - '𖹚' => '𖹺', - '𖹛' => '𖹻', - '𖹜' => '𖹼', - '𖹝' => '𖹽', - '𖹞' => '𖹾', - '𖹟' => '𖹿', - '𞤀' => '𞤢', - '𞤁' => '𞤣', - '𞤂' => '𞤤', - '𞤃' => '𞤥', - '𞤄' => '𞤦', - '𞤅' => '𞤧', - '𞤆' => '𞤨', - '𞤇' => '𞤩', - '𞤈' => '𞤪', - '𞤉' => '𞤫', - '𞤊' => '𞤬', - '𞤋' => '𞤭', - '𞤌' => '𞤮', - '𞤍' => '𞤯', - '𞤎' => '𞤰', - '𞤏' => '𞤱', - '𞤐' => '𞤲', - '𞤑' => '𞤳', - '𞤒' => '𞤴', - '𞤓' => '𞤵', - '𞤔' => '𞤶', - '𞤕' => '𞤷', - '𞤖' => '𞤸', - '𞤗' => '𞤹', - '𞤘' => '𞤺', - '𞤙' => '𞤻', - '𞤚' => '𞤼', - '𞤛' => '𞤽', - '𞤜' => '𞤾', - '𞤝' => '𞤿', - '𞤞' => '𞥀', - '𞤟' => '𞥁', - '𞤠' => '𞥂', - '𞤡' => '𞥃', -); diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php deleted file mode 100644 index 2a8f6e7..0000000 --- a/vendor/symfony/polyfill-mbstring/Resources/unidata/titleCaseRegexp.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -// from Case_Ignorable in https://unicode.org/Public/UNIDATA/DerivedCoreProperties.txt - -return '/(?<![\x{0027}\x{002E}\x{003A}\x{005E}\x{0060}\x{00A8}\x{00AD}\x{00AF}\x{00B4}\x{00B7}\x{00B8}\x{02B0}-\x{02C1}\x{02C2}-\x{02C5}\x{02C6}-\x{02D1}\x{02D2}-\x{02DF}\x{02E0}-\x{02E4}\x{02E5}-\x{02EB}\x{02EC}\x{02ED}\x{02EE}\x{02EF}-\x{02FF}\x{0300}-\x{036F}\x{0374}\x{0375}\x{037A}\x{0384}-\x{0385}\x{0387}\x{0483}-\x{0487}\x{0488}-\x{0489}\x{0559}\x{0591}-\x{05BD}\x{05BF}\x{05C1}-\x{05C2}\x{05C4}-\x{05C5}\x{05C7}\x{05F4}\x{0600}-\x{0605}\x{0610}-\x{061A}\x{061C}\x{0640}\x{064B}-\x{065F}\x{0670}\x{06D6}-\x{06DC}\x{06DD}\x{06DF}-\x{06E4}\x{06E5}-\x{06E6}\x{06E7}-\x{06E8}\x{06EA}-\x{06ED}\x{070F}\x{0711}\x{0730}-\x{074A}\x{07A6}-\x{07B0}\x{07EB}-\x{07F3}\x{07F4}-\x{07F5}\x{07FA}\x{07FD}\x{0816}-\x{0819}\x{081A}\x{081B}-\x{0823}\x{0824}\x{0825}-\x{0827}\x{0828}\x{0829}-\x{082D}\x{0859}-\x{085B}\x{08D3}-\x{08E1}\x{08E2}\x{08E3}-\x{0902}\x{093A}\x{093C}\x{0941}-\x{0948}\x{094D}\x{0951}-\x{0957}\x{0962}-\x{0963}\x{0971}\x{0981}\x{09BC}\x{09C1}-\x{09C4}\x{09CD}\x{09E2}-\x{09E3}\x{09FE}\x{0A01}-\x{0A02}\x{0A3C}\x{0A41}-\x{0A42}\x{0A47}-\x{0A48}\x{0A4B}-\x{0A4D}\x{0A51}\x{0A70}-\x{0A71}\x{0A75}\x{0A81}-\x{0A82}\x{0ABC}\x{0AC1}-\x{0AC5}\x{0AC7}-\x{0AC8}\x{0ACD}\x{0AE2}-\x{0AE3}\x{0AFA}-\x{0AFF}\x{0B01}\x{0B3C}\x{0B3F}\x{0B41}-\x{0B44}\x{0B4D}\x{0B56}\x{0B62}-\x{0B63}\x{0B82}\x{0BC0}\x{0BCD}\x{0C00}\x{0C04}\x{0C3E}-\x{0C40}\x{0C46}-\x{0C48}\x{0C4A}-\x{0C4D}\x{0C55}-\x{0C56}\x{0C62}-\x{0C63}\x{0C81}\x{0CBC}\x{0CBF}\x{0CC6}\x{0CCC}-\x{0CCD}\x{0CE2}-\x{0CE3}\x{0D00}-\x{0D01}\x{0D3B}-\x{0D3C}\x{0D41}-\x{0D44}\x{0D4D}\x{0D62}-\x{0D63}\x{0DCA}\x{0DD2}-\x{0DD4}\x{0DD6}\x{0E31}\x{0E34}-\x{0E3A}\x{0E46}\x{0E47}-\x{0E4E}\x{0EB1}\x{0EB4}-\x{0EB9}\x{0EBB}-\x{0EBC}\x{0EC6}\x{0EC8}-\x{0ECD}\x{0F18}-\x{0F19}\x{0F35}\x{0F37}\x{0F39}\x{0F71}-\x{0F7E}\x{0F80}-\x{0F84}\x{0F86}-\x{0F87}\x{0F8D}-\x{0F97}\x{0F99}-\x{0FBC}\x{0FC6}\x{102D}-\x{1030}\x{1032}-\x{1037}\x{1039}-\x{103A}\x{103D}-\x{103E}\x{1058}-\x{1059}\x{105E}-\x{1060}\x{1071}-\x{1074}\x{1082}\x{1085}-\x{1086}\x{108D}\x{109D}\x{10FC}\x{135D}-\x{135F}\x{1712}-\x{1714}\x{1732}-\x{1734}\x{1752}-\x{1753}\x{1772}-\x{1773}\x{17B4}-\x{17B5}\x{17B7}-\x{17BD}\x{17C6}\x{17C9}-\x{17D3}\x{17D7}\x{17DD}\x{180B}-\x{180D}\x{180E}\x{1843}\x{1885}-\x{1886}\x{18A9}\x{1920}-\x{1922}\x{1927}-\x{1928}\x{1932}\x{1939}-\x{193B}\x{1A17}-\x{1A18}\x{1A1B}\x{1A56}\x{1A58}-\x{1A5E}\x{1A60}\x{1A62}\x{1A65}-\x{1A6C}\x{1A73}-\x{1A7C}\x{1A7F}\x{1AA7}\x{1AB0}-\x{1ABD}\x{1ABE}\x{1B00}-\x{1B03}\x{1B34}\x{1B36}-\x{1B3A}\x{1B3C}\x{1B42}\x{1B6B}-\x{1B73}\x{1B80}-\x{1B81}\x{1BA2}-\x{1BA5}\x{1BA8}-\x{1BA9}\x{1BAB}-\x{1BAD}\x{1BE6}\x{1BE8}-\x{1BE9}\x{1BED}\x{1BEF}-\x{1BF1}\x{1C2C}-\x{1C33}\x{1C36}-\x{1C37}\x{1C78}-\x{1C7D}\x{1CD0}-\x{1CD2}\x{1CD4}-\x{1CE0}\x{1CE2}-\x{1CE8}\x{1CED}\x{1CF4}\x{1CF8}-\x{1CF9}\x{1D2C}-\x{1D6A}\x{1D78}\x{1D9B}-\x{1DBF}\x{1DC0}-\x{1DF9}\x{1DFB}-\x{1DFF}\x{1FBD}\x{1FBF}-\x{1FC1}\x{1FCD}-\x{1FCF}\x{1FDD}-\x{1FDF}\x{1FED}-\x{1FEF}\x{1FFD}-\x{1FFE}\x{200B}-\x{200F}\x{2018}\x{2019}\x{2024}\x{2027}\x{202A}-\x{202E}\x{2060}-\x{2064}\x{2066}-\x{206F}\x{2071}\x{207F}\x{2090}-\x{209C}\x{20D0}-\x{20DC}\x{20DD}-\x{20E0}\x{20E1}\x{20E2}-\x{20E4}\x{20E5}-\x{20F0}\x{2C7C}-\x{2C7D}\x{2CEF}-\x{2CF1}\x{2D6F}\x{2D7F}\x{2DE0}-\x{2DFF}\x{2E2F}\x{3005}\x{302A}-\x{302D}\x{3031}-\x{3035}\x{303B}\x{3099}-\x{309A}\x{309B}-\x{309C}\x{309D}-\x{309E}\x{30FC}-\x{30FE}\x{A015}\x{A4F8}-\x{A4FD}\x{A60C}\x{A66F}\x{A670}-\x{A672}\x{A674}-\x{A67D}\x{A67F}\x{A69C}-\x{A69D}\x{A69E}-\x{A69F}\x{A6F0}-\x{A6F1}\x{A700}-\x{A716}\x{A717}-\x{A71F}\x{A720}-\x{A721}\x{A770}\x{A788}\x{A789}-\x{A78A}\x{A7F8}-\x{A7F9}\x{A802}\x{A806}\x{A80B}\x{A825}-\x{A826}\x{A8C4}-\x{A8C5}\x{A8E0}-\x{A8F1}\x{A8FF}\x{A926}-\x{A92D}\x{A947}-\x{A951}\x{A980}-\x{A982}\x{A9B3}\x{A9B6}-\x{A9B9}\x{A9BC}\x{A9CF}\x{A9E5}\x{A9E6}\x{AA29}-\x{AA2E}\x{AA31}-\x{AA32}\x{AA35}-\x{AA36}\x{AA43}\x{AA4C}\x{AA70}\x{AA7C}\x{AAB0}\x{AAB2}-\x{AAB4}\x{AAB7}-\x{AAB8}\x{AABE}-\x{AABF}\x{AAC1}\x{AADD}\x{AAEC}-\x{AAED}\x{AAF3}-\x{AAF4}\x{AAF6}\x{AB5B}\x{AB5C}-\x{AB5F}\x{ABE5}\x{ABE8}\x{ABED}\x{FB1E}\x{FBB2}-\x{FBC1}\x{FE00}-\x{FE0F}\x{FE13}\x{FE20}-\x{FE2F}\x{FE52}\x{FE55}\x{FEFF}\x{FF07}\x{FF0E}\x{FF1A}\x{FF3E}\x{FF40}\x{FF70}\x{FF9E}-\x{FF9F}\x{FFE3}\x{FFF9}-\x{FFFB}\x{101FD}\x{102E0}\x{10376}-\x{1037A}\x{10A01}-\x{10A03}\x{10A05}-\x{10A06}\x{10A0C}-\x{10A0F}\x{10A38}-\x{10A3A}\x{10A3F}\x{10AE5}-\x{10AE6}\x{10D24}-\x{10D27}\x{10F46}-\x{10F50}\x{11001}\x{11038}-\x{11046}\x{1107F}-\x{11081}\x{110B3}-\x{110B6}\x{110B9}-\x{110BA}\x{110BD}\x{110CD}\x{11100}-\x{11102}\x{11127}-\x{1112B}\x{1112D}-\x{11134}\x{11173}\x{11180}-\x{11181}\x{111B6}-\x{111BE}\x{111C9}-\x{111CC}\x{1122F}-\x{11231}\x{11234}\x{11236}-\x{11237}\x{1123E}\x{112DF}\x{112E3}-\x{112EA}\x{11300}-\x{11301}\x{1133B}-\x{1133C}\x{11340}\x{11366}-\x{1136C}\x{11370}-\x{11374}\x{11438}-\x{1143F}\x{11442}-\x{11444}\x{11446}\x{1145E}\x{114B3}-\x{114B8}\x{114BA}\x{114BF}-\x{114C0}\x{114C2}-\x{114C3}\x{115B2}-\x{115B5}\x{115BC}-\x{115BD}\x{115BF}-\x{115C0}\x{115DC}-\x{115DD}\x{11633}-\x{1163A}\x{1163D}\x{1163F}-\x{11640}\x{116AB}\x{116AD}\x{116B0}-\x{116B5}\x{116B7}\x{1171D}-\x{1171F}\x{11722}-\x{11725}\x{11727}-\x{1172B}\x{1182F}-\x{11837}\x{11839}-\x{1183A}\x{11A01}-\x{11A0A}\x{11A33}-\x{11A38}\x{11A3B}-\x{11A3E}\x{11A47}\x{11A51}-\x{11A56}\x{11A59}-\x{11A5B}\x{11A8A}-\x{11A96}\x{11A98}-\x{11A99}\x{11C30}-\x{11C36}\x{11C38}-\x{11C3D}\x{11C3F}\x{11C92}-\x{11CA7}\x{11CAA}-\x{11CB0}\x{11CB2}-\x{11CB3}\x{11CB5}-\x{11CB6}\x{11D31}-\x{11D36}\x{11D3A}\x{11D3C}-\x{11D3D}\x{11D3F}-\x{11D45}\x{11D47}\x{11D90}-\x{11D91}\x{11D95}\x{11D97}\x{11EF3}-\x{11EF4}\x{16AF0}-\x{16AF4}\x{16B30}-\x{16B36}\x{16B40}-\x{16B43}\x{16F8F}-\x{16F92}\x{16F93}-\x{16F9F}\x{16FE0}-\x{16FE1}\x{1BC9D}-\x{1BC9E}\x{1BCA0}-\x{1BCA3}\x{1D167}-\x{1D169}\x{1D173}-\x{1D17A}\x{1D17B}-\x{1D182}\x{1D185}-\x{1D18B}\x{1D1AA}-\x{1D1AD}\x{1D242}-\x{1D244}\x{1DA00}-\x{1DA36}\x{1DA3B}-\x{1DA6C}\x{1DA75}\x{1DA84}\x{1DA9B}-\x{1DA9F}\x{1DAA1}-\x{1DAAF}\x{1E000}-\x{1E006}\x{1E008}-\x{1E018}\x{1E01B}-\x{1E021}\x{1E023}-\x{1E024}\x{1E026}-\x{1E02A}\x{1E8D0}-\x{1E8D6}\x{1E944}-\x{1E94A}\x{1F3FB}-\x{1F3FF}\x{E0001}\x{E0020}-\x{E007F}\x{E0100}-\x{E01EF}])(\pL)(\pL*+)/u'; diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php deleted file mode 100644 index 56b9cb8..0000000 --- a/vendor/symfony/polyfill-mbstring/Resources/unidata/upperCase.php +++ /dev/null @@ -1,1489 +0,0 @@ -<?php - -return array ( - 'a' => 'A', - 'b' => 'B', - 'c' => 'C', - 'd' => 'D', - 'e' => 'E', - 'f' => 'F', - 'g' => 'G', - 'h' => 'H', - 'i' => 'I', - 'j' => 'J', - 'k' => 'K', - 'l' => 'L', - 'm' => 'M', - 'n' => 'N', - 'o' => 'O', - 'p' => 'P', - 'q' => 'Q', - 'r' => 'R', - 's' => 'S', - 't' => 'T', - 'u' => 'U', - 'v' => 'V', - 'w' => 'W', - 'x' => 'X', - 'y' => 'Y', - 'z' => 'Z', - 'µ' => 'Μ', - 'à' => 'À', - 'á' => 'Á', - 'â' => 'Â', - 'ã' => 'Ã', - 'ä' => 'Ä', - 'å' => 'Å', - 'æ' => 'Æ', - 'ç' => 'Ç', - 'è' => 'È', - 'é' => 'É', - 'ê' => 'Ê', - 'ë' => 'Ë', - 'ì' => 'Ì', - 'í' => 'Í', - 'î' => 'Î', - 'ï' => 'Ï', - 'ð' => 'Ð', - 'ñ' => 'Ñ', - 'ò' => 'Ò', - 'ó' => 'Ó', - 'ô' => 'Ô', - 'õ' => 'Õ', - 'ö' => 'Ö', - 'ø' => 'Ø', - 'ù' => 'Ù', - 'ú' => 'Ú', - 'û' => 'Û', - 'ü' => 'Ü', - 'ý' => 'Ý', - 'þ' => 'Þ', - 'ÿ' => 'Ÿ', - 'ā' => 'Ā', - 'ă' => 'Ă', - 'ą' => 'Ą', - 'ć' => 'Ć', - 'ĉ' => 'Ĉ', - 'ċ' => 'Ċ', - 'č' => 'Č', - 'ď' => 'Ď', - 'đ' => 'Đ', - 'ē' => 'Ē', - 'ĕ' => 'Ĕ', - 'ė' => 'Ė', - 'ę' => 'Ę', - 'ě' => 'Ě', - 'ĝ' => 'Ĝ', - 'ğ' => 'Ğ', - 'ġ' => 'Ġ', - 'ģ' => 'Ģ', - 'ĥ' => 'Ĥ', - 'ħ' => 'Ħ', - 'ĩ' => 'Ĩ', - 'ī' => 'Ī', - 'ĭ' => 'Ĭ', - 'į' => 'Į', - 'ı' => 'I', - 'ij' => 'IJ', - 'ĵ' => 'Ĵ', - 'ķ' => 'Ķ', - 'ĺ' => 'Ĺ', - 'ļ' => 'Ļ', - 'ľ' => 'Ľ', - 'ŀ' => 'Ŀ', - 'ł' => 'Ł', - 'ń' => 'Ń', - 'ņ' => 'Ņ', - 'ň' => 'Ň', - 'ŋ' => 'Ŋ', - 'ō' => 'Ō', - 'ŏ' => 'Ŏ', - 'ő' => 'Ő', - 'œ' => 'Œ', - 'ŕ' => 'Ŕ', - 'ŗ' => 'Ŗ', - 'ř' => 'Ř', - 'ś' => 'Ś', - 'ŝ' => 'Ŝ', - 'ş' => 'Ş', - 'š' => 'Š', - 'ţ' => 'Ţ', - 'ť' => 'Ť', - 'ŧ' => 'Ŧ', - 'ũ' => 'Ũ', - 'ū' => 'Ū', - 'ŭ' => 'Ŭ', - 'ů' => 'Ů', - 'ű' => 'Ű', - 'ų' => 'Ų', - 'ŵ' => 'Ŵ', - 'ŷ' => 'Ŷ', - 'ź' => 'Ź', - 'ż' => 'Ż', - 'ž' => 'Ž', - 'ſ' => 'S', - 'ƀ' => 'Ƀ', - 'ƃ' => 'Ƃ', - 'ƅ' => 'Ƅ', - 'ƈ' => 'Ƈ', - 'ƌ' => 'Ƌ', - 'ƒ' => 'Ƒ', - 'ƕ' => 'Ƕ', - 'ƙ' => 'Ƙ', - 'ƚ' => 'Ƚ', - 'ƞ' => 'Ƞ', - 'ơ' => 'Ơ', - 'ƣ' => 'Ƣ', - 'ƥ' => 'Ƥ', - 'ƨ' => 'Ƨ', - 'ƭ' => 'Ƭ', - 'ư' => 'Ư', - 'ƴ' => 'Ƴ', - 'ƶ' => 'Ƶ', - 'ƹ' => 'Ƹ', - 'ƽ' => 'Ƽ', - 'ƿ' => 'Ƿ', - 'Dž' => 'DŽ', - 'dž' => 'DŽ', - 'Lj' => 'LJ', - 'lj' => 'LJ', - 'Nj' => 'NJ', - 'nj' => 'NJ', - 'ǎ' => 'Ǎ', - 'ǐ' => 'Ǐ', - 'ǒ' => 'Ǒ', - 'ǔ' => 'Ǔ', - 'ǖ' => 'Ǖ', - 'ǘ' => 'Ǘ', - 'ǚ' => 'Ǚ', - 'ǜ' => 'Ǜ', - 'ǝ' => 'Ǝ', - 'ǟ' => 'Ǟ', - 'ǡ' => 'Ǡ', - 'ǣ' => 'Ǣ', - 'ǥ' => 'Ǥ', - 'ǧ' => 'Ǧ', - 'ǩ' => 'Ǩ', - 'ǫ' => 'Ǫ', - 'ǭ' => 'Ǭ', - 'ǯ' => 'Ǯ', - 'Dz' => 'DZ', - 'dz' => 'DZ', - 'ǵ' => 'Ǵ', - 'ǹ' => 'Ǹ', - 'ǻ' => 'Ǻ', - 'ǽ' => 'Ǽ', - 'ǿ' => 'Ǿ', - 'ȁ' => 'Ȁ', - 'ȃ' => 'Ȃ', - 'ȅ' => 'Ȅ', - 'ȇ' => 'Ȇ', - 'ȉ' => 'Ȉ', - 'ȋ' => 'Ȋ', - 'ȍ' => 'Ȍ', - 'ȏ' => 'Ȏ', - 'ȑ' => 'Ȑ', - 'ȓ' => 'Ȓ', - 'ȕ' => 'Ȕ', - 'ȗ' => 'Ȗ', - 'ș' => 'Ș', - 'ț' => 'Ț', - 'ȝ' => 'Ȝ', - 'ȟ' => 'Ȟ', - 'ȣ' => 'Ȣ', - 'ȥ' => 'Ȥ', - 'ȧ' => 'Ȧ', - 'ȩ' => 'Ȩ', - 'ȫ' => 'Ȫ', - 'ȭ' => 'Ȭ', - 'ȯ' => 'Ȯ', - 'ȱ' => 'Ȱ', - 'ȳ' => 'Ȳ', - 'ȼ' => 'Ȼ', - 'ȿ' => 'Ȿ', - 'ɀ' => 'Ɀ', - 'ɂ' => 'Ɂ', - 'ɇ' => 'Ɇ', - 'ɉ' => 'Ɉ', - 'ɋ' => 'Ɋ', - 'ɍ' => 'Ɍ', - 'ɏ' => 'Ɏ', - 'ɐ' => 'Ɐ', - 'ɑ' => 'Ɑ', - 'ɒ' => 'Ɒ', - 'ɓ' => 'Ɓ', - 'ɔ' => 'Ɔ', - 'ɖ' => 'Ɖ', - 'ɗ' => 'Ɗ', - 'ə' => 'Ə', - 'ɛ' => 'Ɛ', - 'ɜ' => 'Ɜ', - 'ɠ' => 'Ɠ', - 'ɡ' => 'Ɡ', - 'ɣ' => 'Ɣ', - 'ɥ' => 'Ɥ', - 'ɦ' => 'Ɦ', - 'ɨ' => 'Ɨ', - 'ɩ' => 'Ɩ', - 'ɪ' => 'Ɪ', - 'ɫ' => 'Ɫ', - 'ɬ' => 'Ɬ', - 'ɯ' => 'Ɯ', - 'ɱ' => 'Ɱ', - 'ɲ' => 'Ɲ', - 'ɵ' => 'Ɵ', - 'ɽ' => 'Ɽ', - 'ʀ' => 'Ʀ', - 'ʂ' => 'Ʂ', - 'ʃ' => 'Ʃ', - 'ʇ' => 'Ʇ', - 'ʈ' => 'Ʈ', - 'ʉ' => 'Ʉ', - 'ʊ' => 'Ʊ', - 'ʋ' => 'Ʋ', - 'ʌ' => 'Ʌ', - 'ʒ' => 'Ʒ', - 'ʝ' => 'Ʝ', - 'ʞ' => 'Ʞ', - 'ͅ' => 'Ι', - 'ͱ' => 'Ͱ', - 'ͳ' => 'Ͳ', - 'ͷ' => 'Ͷ', - 'ͻ' => 'Ͻ', - 'ͼ' => 'Ͼ', - 'ͽ' => 'Ͽ', - 'ά' => 'Ά', - 'έ' => 'Έ', - 'ή' => 'Ή', - 'ί' => 'Ί', - 'α' => 'Α', - 'β' => 'Β', - 'γ' => 'Γ', - 'δ' => 'Δ', - 'ε' => 'Ε', - 'ζ' => 'Ζ', - 'η' => 'Η', - 'θ' => 'Θ', - 'ι' => 'Ι', - 'κ' => 'Κ', - 'λ' => 'Λ', - 'μ' => 'Μ', - 'ν' => 'Ν', - 'ξ' => 'Ξ', - 'ο' => 'Ο', - 'π' => 'Π', - 'ρ' => 'Ρ', - 'ς' => 'Σ', - 'σ' => 'Σ', - 'τ' => 'Τ', - 'υ' => 'Υ', - 'φ' => 'Φ', - 'χ' => 'Χ', - 'ψ' => 'Ψ', - 'ω' => 'Ω', - 'ϊ' => 'Ϊ', - 'ϋ' => 'Ϋ', - 'ό' => 'Ό', - 'ύ' => 'Ύ', - 'ώ' => 'Ώ', - 'ϐ' => 'Β', - 'ϑ' => 'Θ', - 'ϕ' => 'Φ', - 'ϖ' => 'Π', - 'ϗ' => 'Ϗ', - 'ϙ' => 'Ϙ', - 'ϛ' => 'Ϛ', - 'ϝ' => 'Ϝ', - 'ϟ' => 'Ϟ', - 'ϡ' => 'Ϡ', - 'ϣ' => 'Ϣ', - 'ϥ' => 'Ϥ', - 'ϧ' => 'Ϧ', - 'ϩ' => 'Ϩ', - 'ϫ' => 'Ϫ', - 'ϭ' => 'Ϭ', - 'ϯ' => 'Ϯ', - 'ϰ' => 'Κ', - 'ϱ' => 'Ρ', - 'ϲ' => 'Ϲ', - 'ϳ' => 'Ϳ', - 'ϵ' => 'Ε', - 'ϸ' => 'Ϸ', - 'ϻ' => 'Ϻ', - 'а' => 'А', - 'б' => 'Б', - 'в' => 'В', - 'г' => 'Г', - 'д' => 'Д', - 'е' => 'Е', - 'ж' => 'Ж', - 'з' => 'З', - 'и' => 'И', - 'й' => 'Й', - 'к' => 'К', - 'л' => 'Л', - 'м' => 'М', - 'н' => 'Н', - 'о' => 'О', - 'п' => 'П', - 'р' => 'Р', - 'с' => 'С', - 'т' => 'Т', - 'у' => 'У', - 'ф' => 'Ф', - 'х' => 'Х', - 'ц' => 'Ц', - 'ч' => 'Ч', - 'ш' => 'Ш', - 'щ' => 'Щ', - 'ъ' => 'Ъ', - 'ы' => 'Ы', - 'ь' => 'Ь', - 'э' => 'Э', - 'ю' => 'Ю', - 'я' => 'Я', - 'ѐ' => 'Ѐ', - 'ё' => 'Ё', - 'ђ' => 'Ђ', - 'ѓ' => 'Ѓ', - 'є' => 'Є', - 'ѕ' => 'Ѕ', - 'і' => 'І', - 'ї' => 'Ї', - 'ј' => 'Ј', - 'љ' => 'Љ', - 'њ' => 'Њ', - 'ћ' => 'Ћ', - 'ќ' => 'Ќ', - 'ѝ' => 'Ѝ', - 'ў' => 'Ў', - 'џ' => 'Џ', - 'ѡ' => 'Ѡ', - 'ѣ' => 'Ѣ', - 'ѥ' => 'Ѥ', - 'ѧ' => 'Ѧ', - 'ѩ' => 'Ѩ', - 'ѫ' => 'Ѫ', - 'ѭ' => 'Ѭ', - 'ѯ' => 'Ѯ', - 'ѱ' => 'Ѱ', - 'ѳ' => 'Ѳ', - 'ѵ' => 'Ѵ', - 'ѷ' => 'Ѷ', - 'ѹ' => 'Ѹ', - 'ѻ' => 'Ѻ', - 'ѽ' => 'Ѽ', - 'ѿ' => 'Ѿ', - 'ҁ' => 'Ҁ', - 'ҋ' => 'Ҋ', - 'ҍ' => 'Ҍ', - 'ҏ' => 'Ҏ', - 'ґ' => 'Ґ', - 'ғ' => 'Ғ', - 'ҕ' => 'Ҕ', - 'җ' => 'Җ', - 'ҙ' => 'Ҙ', - 'қ' => 'Қ', - 'ҝ' => 'Ҝ', - 'ҟ' => 'Ҟ', - 'ҡ' => 'Ҡ', - 'ң' => 'Ң', - 'ҥ' => 'Ҥ', - 'ҧ' => 'Ҧ', - 'ҩ' => 'Ҩ', - 'ҫ' => 'Ҫ', - 'ҭ' => 'Ҭ', - 'ү' => 'Ү', - 'ұ' => 'Ұ', - 'ҳ' => 'Ҳ', - 'ҵ' => 'Ҵ', - 'ҷ' => 'Ҷ', - 'ҹ' => 'Ҹ', - 'һ' => 'Һ', - 'ҽ' => 'Ҽ', - 'ҿ' => 'Ҿ', - 'ӂ' => 'Ӂ', - 'ӄ' => 'Ӄ', - 'ӆ' => 'Ӆ', - 'ӈ' => 'Ӈ', - 'ӊ' => 'Ӊ', - 'ӌ' => 'Ӌ', - 'ӎ' => 'Ӎ', - 'ӏ' => 'Ӏ', - 'ӑ' => 'Ӑ', - 'ӓ' => 'Ӓ', - 'ӕ' => 'Ӕ', - 'ӗ' => 'Ӗ', - 'ә' => 'Ә', - 'ӛ' => 'Ӛ', - 'ӝ' => 'Ӝ', - 'ӟ' => 'Ӟ', - 'ӡ' => 'Ӡ', - 'ӣ' => 'Ӣ', - 'ӥ' => 'Ӥ', - 'ӧ' => 'Ӧ', - 'ө' => 'Ө', - 'ӫ' => 'Ӫ', - 'ӭ' => 'Ӭ', - 'ӯ' => 'Ӯ', - 'ӱ' => 'Ӱ', - 'ӳ' => 'Ӳ', - 'ӵ' => 'Ӵ', - 'ӷ' => 'Ӷ', - 'ӹ' => 'Ӹ', - 'ӻ' => 'Ӻ', - 'ӽ' => 'Ӽ', - 'ӿ' => 'Ӿ', - 'ԁ' => 'Ԁ', - 'ԃ' => 'Ԃ', - 'ԅ' => 'Ԅ', - 'ԇ' => 'Ԇ', - 'ԉ' => 'Ԉ', - 'ԋ' => 'Ԋ', - 'ԍ' => 'Ԍ', - 'ԏ' => 'Ԏ', - 'ԑ' => 'Ԑ', - 'ԓ' => 'Ԓ', - 'ԕ' => 'Ԕ', - 'ԗ' => 'Ԗ', - 'ԙ' => 'Ԙ', - 'ԛ' => 'Ԛ', - 'ԝ' => 'Ԝ', - 'ԟ' => 'Ԟ', - 'ԡ' => 'Ԡ', - 'ԣ' => 'Ԣ', - 'ԥ' => 'Ԥ', - 'ԧ' => 'Ԧ', - 'ԩ' => 'Ԩ', - 'ԫ' => 'Ԫ', - 'ԭ' => 'Ԭ', - 'ԯ' => 'Ԯ', - 'ա' => 'Ա', - 'բ' => 'Բ', - 'գ' => 'Գ', - 'դ' => 'Դ', - 'ե' => 'Ե', - 'զ' => 'Զ', - 'է' => 'Է', - 'ը' => 'Ը', - 'թ' => 'Թ', - 'ժ' => 'Ժ', - 'ի' => 'Ի', - 'լ' => 'Լ', - 'խ' => 'Խ', - 'ծ' => 'Ծ', - 'կ' => 'Կ', - 'հ' => 'Հ', - 'ձ' => 'Ձ', - 'ղ' => 'Ղ', - 'ճ' => 'Ճ', - 'մ' => 'Մ', - 'յ' => 'Յ', - 'ն' => 'Ն', - 'շ' => 'Շ', - 'ո' => 'Ո', - 'չ' => 'Չ', - 'պ' => 'Պ', - 'ջ' => 'Ջ', - 'ռ' => 'Ռ', - 'ս' => 'Ս', - 'վ' => 'Վ', - 'տ' => 'Տ', - 'ր' => 'Ր', - 'ց' => 'Ց', - 'ւ' => 'Ւ', - 'փ' => 'Փ', - 'ք' => 'Ք', - 'օ' => 'Օ', - 'ֆ' => 'Ֆ', - 'ა' => 'Ა', - 'ბ' => 'Ბ', - 'გ' => 'Გ', - 'დ' => 'Დ', - 'ე' => 'Ე', - 'ვ' => 'Ვ', - 'ზ' => 'Ზ', - 'თ' => 'Თ', - 'ი' => 'Ი', - 'კ' => 'Კ', - 'ლ' => 'Ლ', - 'მ' => 'Მ', - 'ნ' => 'Ნ', - 'ო' => 'Ო', - 'პ' => 'Პ', - 'ჟ' => 'Ჟ', - 'რ' => 'Რ', - 'ს' => 'Ს', - 'ტ' => 'Ტ', - 'უ' => 'Უ', - 'ფ' => 'Ფ', - 'ქ' => 'Ქ', - 'ღ' => 'Ღ', - 'ყ' => 'Ყ', - 'შ' => 'Შ', - 'ჩ' => 'Ჩ', - 'ც' => 'Ც', - 'ძ' => 'Ძ', - 'წ' => 'Წ', - 'ჭ' => 'Ჭ', - 'ხ' => 'Ხ', - 'ჯ' => 'Ჯ', - 'ჰ' => 'Ჰ', - 'ჱ' => 'Ჱ', - 'ჲ' => 'Ჲ', - 'ჳ' => 'Ჳ', - 'ჴ' => 'Ჴ', - 'ჵ' => 'Ჵ', - 'ჶ' => 'Ჶ', - 'ჷ' => 'Ჷ', - 'ჸ' => 'Ჸ', - 'ჹ' => 'Ჹ', - 'ჺ' => 'Ჺ', - 'ჽ' => 'Ჽ', - 'ჾ' => 'Ჾ', - 'ჿ' => 'Ჿ', - 'ᏸ' => 'Ᏸ', - 'ᏹ' => 'Ᏹ', - 'ᏺ' => 'Ᏺ', - 'ᏻ' => 'Ᏻ', - 'ᏼ' => 'Ᏼ', - 'ᏽ' => 'Ᏽ', - 'ᲀ' => 'В', - 'ᲁ' => 'Д', - 'ᲂ' => 'О', - 'ᲃ' => 'С', - 'ᲄ' => 'Т', - 'ᲅ' => 'Т', - 'ᲆ' => 'Ъ', - 'ᲇ' => 'Ѣ', - 'ᲈ' => 'Ꙋ', - 'ᵹ' => 'Ᵹ', - 'ᵽ' => 'Ᵽ', - 'ᶎ' => 'Ᶎ', - 'ḁ' => 'Ḁ', - 'ḃ' => 'Ḃ', - 'ḅ' => 'Ḅ', - 'ḇ' => 'Ḇ', - 'ḉ' => 'Ḉ', - 'ḋ' => 'Ḋ', - 'ḍ' => 'Ḍ', - 'ḏ' => 'Ḏ', - 'ḑ' => 'Ḑ', - 'ḓ' => 'Ḓ', - 'ḕ' => 'Ḕ', - 'ḗ' => 'Ḗ', - 'ḙ' => 'Ḙ', - 'ḛ' => 'Ḛ', - 'ḝ' => 'Ḝ', - 'ḟ' => 'Ḟ', - 'ḡ' => 'Ḡ', - 'ḣ' => 'Ḣ', - 'ḥ' => 'Ḥ', - 'ḧ' => 'Ḧ', - 'ḩ' => 'Ḩ', - 'ḫ' => 'Ḫ', - 'ḭ' => 'Ḭ', - 'ḯ' => 'Ḯ', - 'ḱ' => 'Ḱ', - 'ḳ' => 'Ḳ', - 'ḵ' => 'Ḵ', - 'ḷ' => 'Ḷ', - 'ḹ' => 'Ḹ', - 'ḻ' => 'Ḻ', - 'ḽ' => 'Ḽ', - 'ḿ' => 'Ḿ', - 'ṁ' => 'Ṁ', - 'ṃ' => 'Ṃ', - 'ṅ' => 'Ṅ', - 'ṇ' => 'Ṇ', - 'ṉ' => 'Ṉ', - 'ṋ' => 'Ṋ', - 'ṍ' => 'Ṍ', - 'ṏ' => 'Ṏ', - 'ṑ' => 'Ṑ', - 'ṓ' => 'Ṓ', - 'ṕ' => 'Ṕ', - 'ṗ' => 'Ṗ', - 'ṙ' => 'Ṙ', - 'ṛ' => 'Ṛ', - 'ṝ' => 'Ṝ', - 'ṟ' => 'Ṟ', - 'ṡ' => 'Ṡ', - 'ṣ' => 'Ṣ', - 'ṥ' => 'Ṥ', - 'ṧ' => 'Ṧ', - 'ṩ' => 'Ṩ', - 'ṫ' => 'Ṫ', - 'ṭ' => 'Ṭ', - 'ṯ' => 'Ṯ', - 'ṱ' => 'Ṱ', - 'ṳ' => 'Ṳ', - 'ṵ' => 'Ṵ', - 'ṷ' => 'Ṷ', - 'ṹ' => 'Ṹ', - 'ṻ' => 'Ṻ', - 'ṽ' => 'Ṽ', - 'ṿ' => 'Ṿ', - 'ẁ' => 'Ẁ', - 'ẃ' => 'Ẃ', - 'ẅ' => 'Ẅ', - 'ẇ' => 'Ẇ', - 'ẉ' => 'Ẉ', - 'ẋ' => 'Ẋ', - 'ẍ' => 'Ẍ', - 'ẏ' => 'Ẏ', - 'ẑ' => 'Ẑ', - 'ẓ' => 'Ẓ', - 'ẕ' => 'Ẕ', - 'ẛ' => 'Ṡ', - 'ạ' => 'Ạ', - 'ả' => 'Ả', - 'ấ' => 'Ấ', - 'ầ' => 'Ầ', - 'ẩ' => 'Ẩ', - 'ẫ' => 'Ẫ', - 'ậ' => 'Ậ', - 'ắ' => 'Ắ', - 'ằ' => 'Ằ', - 'ẳ' => 'Ẳ', - 'ẵ' => 'Ẵ', - 'ặ' => 'Ặ', - 'ẹ' => 'Ẹ', - 'ẻ' => 'Ẻ', - 'ẽ' => 'Ẽ', - 'ế' => 'Ế', - 'ề' => 'Ề', - 'ể' => 'Ể', - 'ễ' => 'Ễ', - 'ệ' => 'Ệ', - 'ỉ' => 'Ỉ', - 'ị' => 'Ị', - 'ọ' => 'Ọ', - 'ỏ' => 'Ỏ', - 'ố' => 'Ố', - 'ồ' => 'Ồ', - 'ổ' => 'Ổ', - 'ỗ' => 'Ỗ', - 'ộ' => 'Ộ', - 'ớ' => 'Ớ', - 'ờ' => 'Ờ', - 'ở' => 'Ở', - 'ỡ' => 'Ỡ', - 'ợ' => 'Ợ', - 'ụ' => 'Ụ', - 'ủ' => 'Ủ', - 'ứ' => 'Ứ', - 'ừ' => 'Ừ', - 'ử' => 'Ử', - 'ữ' => 'Ữ', - 'ự' => 'Ự', - 'ỳ' => 'Ỳ', - 'ỵ' => 'Ỵ', - 'ỷ' => 'Ỷ', - 'ỹ' => 'Ỹ', - 'ỻ' => 'Ỻ', - 'ỽ' => 'Ỽ', - 'ỿ' => 'Ỿ', - 'ἀ' => 'Ἀ', - 'ἁ' => 'Ἁ', - 'ἂ' => 'Ἂ', - 'ἃ' => 'Ἃ', - 'ἄ' => 'Ἄ', - 'ἅ' => 'Ἅ', - 'ἆ' => 'Ἆ', - 'ἇ' => 'Ἇ', - 'ἐ' => 'Ἐ', - 'ἑ' => 'Ἑ', - 'ἒ' => 'Ἒ', - 'ἓ' => 'Ἓ', - 'ἔ' => 'Ἔ', - 'ἕ' => 'Ἕ', - 'ἠ' => 'Ἠ', - 'ἡ' => 'Ἡ', - 'ἢ' => 'Ἢ', - 'ἣ' => 'Ἣ', - 'ἤ' => 'Ἤ', - 'ἥ' => 'Ἥ', - 'ἦ' => 'Ἦ', - 'ἧ' => 'Ἧ', - 'ἰ' => 'Ἰ', - 'ἱ' => 'Ἱ', - 'ἲ' => 'Ἲ', - 'ἳ' => 'Ἳ', - 'ἴ' => 'Ἴ', - 'ἵ' => 'Ἵ', - 'ἶ' => 'Ἶ', - 'ἷ' => 'Ἷ', - 'ὀ' => 'Ὀ', - 'ὁ' => 'Ὁ', - 'ὂ' => 'Ὂ', - 'ὃ' => 'Ὃ', - 'ὄ' => 'Ὄ', - 'ὅ' => 'Ὅ', - 'ὑ' => 'Ὑ', - 'ὓ' => 'Ὓ', - 'ὕ' => 'Ὕ', - 'ὗ' => 'Ὗ', - 'ὠ' => 'Ὠ', - 'ὡ' => 'Ὡ', - 'ὢ' => 'Ὢ', - 'ὣ' => 'Ὣ', - 'ὤ' => 'Ὤ', - 'ὥ' => 'Ὥ', - 'ὦ' => 'Ὦ', - 'ὧ' => 'Ὧ', - 'ὰ' => 'Ὰ', - 'ά' => 'Ά', - 'ὲ' => 'Ὲ', - 'έ' => 'Έ', - 'ὴ' => 'Ὴ', - 'ή' => 'Ή', - 'ὶ' => 'Ὶ', - 'ί' => 'Ί', - 'ὸ' => 'Ὸ', - 'ό' => 'Ό', - 'ὺ' => 'Ὺ', - 'ύ' => 'Ύ', - 'ὼ' => 'Ὼ', - 'ώ' => 'Ώ', - 'ᾀ' => 'ἈΙ', - 'ᾁ' => 'ἉΙ', - 'ᾂ' => 'ἊΙ', - 'ᾃ' => 'ἋΙ', - 'ᾄ' => 'ἌΙ', - 'ᾅ' => 'ἍΙ', - 'ᾆ' => 'ἎΙ', - 'ᾇ' => 'ἏΙ', - 'ᾐ' => 'ἨΙ', - 'ᾑ' => 'ἩΙ', - 'ᾒ' => 'ἪΙ', - 'ᾓ' => 'ἫΙ', - 'ᾔ' => 'ἬΙ', - 'ᾕ' => 'ἭΙ', - 'ᾖ' => 'ἮΙ', - 'ᾗ' => 'ἯΙ', - 'ᾠ' => 'ὨΙ', - 'ᾡ' => 'ὩΙ', - 'ᾢ' => 'ὪΙ', - 'ᾣ' => 'ὫΙ', - 'ᾤ' => 'ὬΙ', - 'ᾥ' => 'ὭΙ', - 'ᾦ' => 'ὮΙ', - 'ᾧ' => 'ὯΙ', - 'ᾰ' => 'Ᾰ', - 'ᾱ' => 'Ᾱ', - 'ᾳ' => 'ΑΙ', - 'ι' => 'Ι', - 'ῃ' => 'ΗΙ', - 'ῐ' => 'Ῐ', - 'ῑ' => 'Ῑ', - 'ῠ' => 'Ῠ', - 'ῡ' => 'Ῡ', - 'ῥ' => 'Ῥ', - 'ῳ' => 'ΩΙ', - 'ⅎ' => 'Ⅎ', - 'ⅰ' => 'Ⅰ', - 'ⅱ' => 'Ⅱ', - 'ⅲ' => 'Ⅲ', - 'ⅳ' => 'Ⅳ', - 'ⅴ' => 'Ⅴ', - 'ⅵ' => 'Ⅵ', - 'ⅶ' => 'Ⅶ', - 'ⅷ' => 'Ⅷ', - 'ⅸ' => 'Ⅸ', - 'ⅹ' => 'Ⅹ', - 'ⅺ' => 'Ⅺ', - 'ⅻ' => 'Ⅻ', - 'ⅼ' => 'Ⅼ', - 'ⅽ' => 'Ⅽ', - 'ⅾ' => 'Ⅾ', - 'ⅿ' => 'Ⅿ', - 'ↄ' => 'Ↄ', - 'ⓐ' => 'Ⓐ', - 'ⓑ' => 'Ⓑ', - 'ⓒ' => 'Ⓒ', - 'ⓓ' => 'Ⓓ', - 'ⓔ' => 'Ⓔ', - 'ⓕ' => 'Ⓕ', - 'ⓖ' => 'Ⓖ', - 'ⓗ' => 'Ⓗ', - 'ⓘ' => 'Ⓘ', - 'ⓙ' => 'Ⓙ', - 'ⓚ' => 'Ⓚ', - 'ⓛ' => 'Ⓛ', - 'ⓜ' => 'Ⓜ', - 'ⓝ' => 'Ⓝ', - 'ⓞ' => 'Ⓞ', - 'ⓟ' => 'Ⓟ', - 'ⓠ' => 'Ⓠ', - 'ⓡ' => 'Ⓡ', - 'ⓢ' => 'Ⓢ', - 'ⓣ' => 'Ⓣ', - 'ⓤ' => 'Ⓤ', - 'ⓥ' => 'Ⓥ', - 'ⓦ' => 'Ⓦ', - 'ⓧ' => 'Ⓧ', - 'ⓨ' => 'Ⓨ', - 'ⓩ' => 'Ⓩ', - 'ⰰ' => 'Ⰰ', - 'ⰱ' => 'Ⰱ', - 'ⰲ' => 'Ⰲ', - 'ⰳ' => 'Ⰳ', - 'ⰴ' => 'Ⰴ', - 'ⰵ' => 'Ⰵ', - 'ⰶ' => 'Ⰶ', - 'ⰷ' => 'Ⰷ', - 'ⰸ' => 'Ⰸ', - 'ⰹ' => 'Ⰹ', - 'ⰺ' => 'Ⰺ', - 'ⰻ' => 'Ⰻ', - 'ⰼ' => 'Ⰼ', - 'ⰽ' => 'Ⰽ', - 'ⰾ' => 'Ⰾ', - 'ⰿ' => 'Ⰿ', - 'ⱀ' => 'Ⱀ', - 'ⱁ' => 'Ⱁ', - 'ⱂ' => 'Ⱂ', - 'ⱃ' => 'Ⱃ', - 'ⱄ' => 'Ⱄ', - 'ⱅ' => 'Ⱅ', - 'ⱆ' => 'Ⱆ', - 'ⱇ' => 'Ⱇ', - 'ⱈ' => 'Ⱈ', - 'ⱉ' => 'Ⱉ', - 'ⱊ' => 'Ⱊ', - 'ⱋ' => 'Ⱋ', - 'ⱌ' => 'Ⱌ', - 'ⱍ' => 'Ⱍ', - 'ⱎ' => 'Ⱎ', - 'ⱏ' => 'Ⱏ', - 'ⱐ' => 'Ⱐ', - 'ⱑ' => 'Ⱑ', - 'ⱒ' => 'Ⱒ', - 'ⱓ' => 'Ⱓ', - 'ⱔ' => 'Ⱔ', - 'ⱕ' => 'Ⱕ', - 'ⱖ' => 'Ⱖ', - 'ⱗ' => 'Ⱗ', - 'ⱘ' => 'Ⱘ', - 'ⱙ' => 'Ⱙ', - 'ⱚ' => 'Ⱚ', - 'ⱛ' => 'Ⱛ', - 'ⱜ' => 'Ⱜ', - 'ⱝ' => 'Ⱝ', - 'ⱞ' => 'Ⱞ', - 'ⱡ' => 'Ⱡ', - 'ⱥ' => 'Ⱥ', - 'ⱦ' => 'Ⱦ', - 'ⱨ' => 'Ⱨ', - 'ⱪ' => 'Ⱪ', - 'ⱬ' => 'Ⱬ', - 'ⱳ' => 'Ⱳ', - 'ⱶ' => 'Ⱶ', - 'ⲁ' => 'Ⲁ', - 'ⲃ' => 'Ⲃ', - 'ⲅ' => 'Ⲅ', - 'ⲇ' => 'Ⲇ', - 'ⲉ' => 'Ⲉ', - 'ⲋ' => 'Ⲋ', - 'ⲍ' => 'Ⲍ', - 'ⲏ' => 'Ⲏ', - 'ⲑ' => 'Ⲑ', - 'ⲓ' => 'Ⲓ', - 'ⲕ' => 'Ⲕ', - 'ⲗ' => 'Ⲗ', - 'ⲙ' => 'Ⲙ', - 'ⲛ' => 'Ⲛ', - 'ⲝ' => 'Ⲝ', - 'ⲟ' => 'Ⲟ', - 'ⲡ' => 'Ⲡ', - 'ⲣ' => 'Ⲣ', - 'ⲥ' => 'Ⲥ', - 'ⲧ' => 'Ⲧ', - 'ⲩ' => 'Ⲩ', - 'ⲫ' => 'Ⲫ', - 'ⲭ' => 'Ⲭ', - 'ⲯ' => 'Ⲯ', - 'ⲱ' => 'Ⲱ', - 'ⲳ' => 'Ⲳ', - 'ⲵ' => 'Ⲵ', - 'ⲷ' => 'Ⲷ', - 'ⲹ' => 'Ⲹ', - 'ⲻ' => 'Ⲻ', - 'ⲽ' => 'Ⲽ', - 'ⲿ' => 'Ⲿ', - 'ⳁ' => 'Ⳁ', - 'ⳃ' => 'Ⳃ', - 'ⳅ' => 'Ⳅ', - 'ⳇ' => 'Ⳇ', - 'ⳉ' => 'Ⳉ', - 'ⳋ' => 'Ⳋ', - 'ⳍ' => 'Ⳍ', - 'ⳏ' => 'Ⳏ', - 'ⳑ' => 'Ⳑ', - 'ⳓ' => 'Ⳓ', - 'ⳕ' => 'Ⳕ', - 'ⳗ' => 'Ⳗ', - 'ⳙ' => 'Ⳙ', - 'ⳛ' => 'Ⳛ', - 'ⳝ' => 'Ⳝ', - 'ⳟ' => 'Ⳟ', - 'ⳡ' => 'Ⳡ', - 'ⳣ' => 'Ⳣ', - 'ⳬ' => 'Ⳬ', - 'ⳮ' => 'Ⳮ', - 'ⳳ' => 'Ⳳ', - 'ⴀ' => 'Ⴀ', - 'ⴁ' => 'Ⴁ', - 'ⴂ' => 'Ⴂ', - 'ⴃ' => 'Ⴃ', - 'ⴄ' => 'Ⴄ', - 'ⴅ' => 'Ⴅ', - 'ⴆ' => 'Ⴆ', - 'ⴇ' => 'Ⴇ', - 'ⴈ' => 'Ⴈ', - 'ⴉ' => 'Ⴉ', - 'ⴊ' => 'Ⴊ', - 'ⴋ' => 'Ⴋ', - 'ⴌ' => 'Ⴌ', - 'ⴍ' => 'Ⴍ', - 'ⴎ' => 'Ⴎ', - 'ⴏ' => 'Ⴏ', - 'ⴐ' => 'Ⴐ', - 'ⴑ' => 'Ⴑ', - 'ⴒ' => 'Ⴒ', - 'ⴓ' => 'Ⴓ', - 'ⴔ' => 'Ⴔ', - 'ⴕ' => 'Ⴕ', - 'ⴖ' => 'Ⴖ', - 'ⴗ' => 'Ⴗ', - 'ⴘ' => 'Ⴘ', - 'ⴙ' => 'Ⴙ', - 'ⴚ' => 'Ⴚ', - 'ⴛ' => 'Ⴛ', - 'ⴜ' => 'Ⴜ', - 'ⴝ' => 'Ⴝ', - 'ⴞ' => 'Ⴞ', - 'ⴟ' => 'Ⴟ', - 'ⴠ' => 'Ⴠ', - 'ⴡ' => 'Ⴡ', - 'ⴢ' => 'Ⴢ', - 'ⴣ' => 'Ⴣ', - 'ⴤ' => 'Ⴤ', - 'ⴥ' => 'Ⴥ', - 'ⴧ' => 'Ⴧ', - 'ⴭ' => 'Ⴭ', - 'ꙁ' => 'Ꙁ', - 'ꙃ' => 'Ꙃ', - 'ꙅ' => 'Ꙅ', - 'ꙇ' => 'Ꙇ', - 'ꙉ' => 'Ꙉ', - 'ꙋ' => 'Ꙋ', - 'ꙍ' => 'Ꙍ', - 'ꙏ' => 'Ꙏ', - 'ꙑ' => 'Ꙑ', - 'ꙓ' => 'Ꙓ', - 'ꙕ' => 'Ꙕ', - 'ꙗ' => 'Ꙗ', - 'ꙙ' => 'Ꙙ', - 'ꙛ' => 'Ꙛ', - 'ꙝ' => 'Ꙝ', - 'ꙟ' => 'Ꙟ', - 'ꙡ' => 'Ꙡ', - 'ꙣ' => 'Ꙣ', - 'ꙥ' => 'Ꙥ', - 'ꙧ' => 'Ꙧ', - 'ꙩ' => 'Ꙩ', - 'ꙫ' => 'Ꙫ', - 'ꙭ' => 'Ꙭ', - 'ꚁ' => 'Ꚁ', - 'ꚃ' => 'Ꚃ', - 'ꚅ' => 'Ꚅ', - 'ꚇ' => 'Ꚇ', - 'ꚉ' => 'Ꚉ', - 'ꚋ' => 'Ꚋ', - 'ꚍ' => 'Ꚍ', - 'ꚏ' => 'Ꚏ', - 'ꚑ' => 'Ꚑ', - 'ꚓ' => 'Ꚓ', - 'ꚕ' => 'Ꚕ', - 'ꚗ' => 'Ꚗ', - 'ꚙ' => 'Ꚙ', - 'ꚛ' => 'Ꚛ', - 'ꜣ' => 'Ꜣ', - 'ꜥ' => 'Ꜥ', - 'ꜧ' => 'Ꜧ', - 'ꜩ' => 'Ꜩ', - 'ꜫ' => 'Ꜫ', - 'ꜭ' => 'Ꜭ', - 'ꜯ' => 'Ꜯ', - 'ꜳ' => 'Ꜳ', - 'ꜵ' => 'Ꜵ', - 'ꜷ' => 'Ꜷ', - 'ꜹ' => 'Ꜹ', - 'ꜻ' => 'Ꜻ', - 'ꜽ' => 'Ꜽ', - 'ꜿ' => 'Ꜿ', - 'ꝁ' => 'Ꝁ', - 'ꝃ' => 'Ꝃ', - 'ꝅ' => 'Ꝅ', - 'ꝇ' => 'Ꝇ', - 'ꝉ' => 'Ꝉ', - 'ꝋ' => 'Ꝋ', - 'ꝍ' => 'Ꝍ', - 'ꝏ' => 'Ꝏ', - 'ꝑ' => 'Ꝑ', - 'ꝓ' => 'Ꝓ', - 'ꝕ' => 'Ꝕ', - 'ꝗ' => 'Ꝗ', - 'ꝙ' => 'Ꝙ', - 'ꝛ' => 'Ꝛ', - 'ꝝ' => 'Ꝝ', - 'ꝟ' => 'Ꝟ', - 'ꝡ' => 'Ꝡ', - 'ꝣ' => 'Ꝣ', - 'ꝥ' => 'Ꝥ', - 'ꝧ' => 'Ꝧ', - 'ꝩ' => 'Ꝩ', - 'ꝫ' => 'Ꝫ', - 'ꝭ' => 'Ꝭ', - 'ꝯ' => 'Ꝯ', - 'ꝺ' => 'Ꝺ', - 'ꝼ' => 'Ꝼ', - 'ꝿ' => 'Ꝿ', - 'ꞁ' => 'Ꞁ', - 'ꞃ' => 'Ꞃ', - 'ꞅ' => 'Ꞅ', - 'ꞇ' => 'Ꞇ', - 'ꞌ' => 'Ꞌ', - 'ꞑ' => 'Ꞑ', - 'ꞓ' => 'Ꞓ', - 'ꞔ' => 'Ꞔ', - 'ꞗ' => 'Ꞗ', - 'ꞙ' => 'Ꞙ', - 'ꞛ' => 'Ꞛ', - 'ꞝ' => 'Ꞝ', - 'ꞟ' => 'Ꞟ', - 'ꞡ' => 'Ꞡ', - 'ꞣ' => 'Ꞣ', - 'ꞥ' => 'Ꞥ', - 'ꞧ' => 'Ꞧ', - 'ꞩ' => 'Ꞩ', - 'ꞵ' => 'Ꞵ', - 'ꞷ' => 'Ꞷ', - 'ꞹ' => 'Ꞹ', - 'ꞻ' => 'Ꞻ', - 'ꞽ' => 'Ꞽ', - 'ꞿ' => 'Ꞿ', - 'ꟃ' => 'Ꟃ', - 'ꟈ' => 'Ꟈ', - 'ꟊ' => 'Ꟊ', - 'ꟶ' => 'Ꟶ', - 'ꭓ' => 'Ꭓ', - 'ꭰ' => 'Ꭰ', - 'ꭱ' => 'Ꭱ', - 'ꭲ' => 'Ꭲ', - 'ꭳ' => 'Ꭳ', - 'ꭴ' => 'Ꭴ', - 'ꭵ' => 'Ꭵ', - 'ꭶ' => 'Ꭶ', - 'ꭷ' => 'Ꭷ', - 'ꭸ' => 'Ꭸ', - 'ꭹ' => 'Ꭹ', - 'ꭺ' => 'Ꭺ', - 'ꭻ' => 'Ꭻ', - 'ꭼ' => 'Ꭼ', - 'ꭽ' => 'Ꭽ', - 'ꭾ' => 'Ꭾ', - 'ꭿ' => 'Ꭿ', - 'ꮀ' => 'Ꮀ', - 'ꮁ' => 'Ꮁ', - 'ꮂ' => 'Ꮂ', - 'ꮃ' => 'Ꮃ', - 'ꮄ' => 'Ꮄ', - 'ꮅ' => 'Ꮅ', - 'ꮆ' => 'Ꮆ', - 'ꮇ' => 'Ꮇ', - 'ꮈ' => 'Ꮈ', - 'ꮉ' => 'Ꮉ', - 'ꮊ' => 'Ꮊ', - 'ꮋ' => 'Ꮋ', - 'ꮌ' => 'Ꮌ', - 'ꮍ' => 'Ꮍ', - 'ꮎ' => 'Ꮎ', - 'ꮏ' => 'Ꮏ', - 'ꮐ' => 'Ꮐ', - 'ꮑ' => 'Ꮑ', - 'ꮒ' => 'Ꮒ', - 'ꮓ' => 'Ꮓ', - 'ꮔ' => 'Ꮔ', - 'ꮕ' => 'Ꮕ', - 'ꮖ' => 'Ꮖ', - 'ꮗ' => 'Ꮗ', - 'ꮘ' => 'Ꮘ', - 'ꮙ' => 'Ꮙ', - 'ꮚ' => 'Ꮚ', - 'ꮛ' => 'Ꮛ', - 'ꮜ' => 'Ꮜ', - 'ꮝ' => 'Ꮝ', - 'ꮞ' => 'Ꮞ', - 'ꮟ' => 'Ꮟ', - 'ꮠ' => 'Ꮠ', - 'ꮡ' => 'Ꮡ', - 'ꮢ' => 'Ꮢ', - 'ꮣ' => 'Ꮣ', - 'ꮤ' => 'Ꮤ', - 'ꮥ' => 'Ꮥ', - 'ꮦ' => 'Ꮦ', - 'ꮧ' => 'Ꮧ', - 'ꮨ' => 'Ꮨ', - 'ꮩ' => 'Ꮩ', - 'ꮪ' => 'Ꮪ', - 'ꮫ' => 'Ꮫ', - 'ꮬ' => 'Ꮬ', - 'ꮭ' => 'Ꮭ', - 'ꮮ' => 'Ꮮ', - 'ꮯ' => 'Ꮯ', - 'ꮰ' => 'Ꮰ', - 'ꮱ' => 'Ꮱ', - 'ꮲ' => 'Ꮲ', - 'ꮳ' => 'Ꮳ', - 'ꮴ' => 'Ꮴ', - 'ꮵ' => 'Ꮵ', - 'ꮶ' => 'Ꮶ', - 'ꮷ' => 'Ꮷ', - 'ꮸ' => 'Ꮸ', - 'ꮹ' => 'Ꮹ', - 'ꮺ' => 'Ꮺ', - 'ꮻ' => 'Ꮻ', - 'ꮼ' => 'Ꮼ', - 'ꮽ' => 'Ꮽ', - 'ꮾ' => 'Ꮾ', - 'ꮿ' => 'Ꮿ', - 'a' => 'A', - 'b' => 'B', - 'c' => 'C', - 'd' => 'D', - 'e' => 'E', - 'f' => 'F', - 'g' => 'G', - 'h' => 'H', - 'i' => 'I', - 'j' => 'J', - 'k' => 'K', - 'l' => 'L', - 'm' => 'M', - 'n' => 'N', - 'o' => 'O', - 'p' => 'P', - 'q' => 'Q', - 'r' => 'R', - 's' => 'S', - 't' => 'T', - 'u' => 'U', - 'v' => 'V', - 'w' => 'W', - 'x' => 'X', - 'y' => 'Y', - 'z' => 'Z', - '𐐨' => '𐐀', - '𐐩' => '𐐁', - '𐐪' => '𐐂', - '𐐫' => '𐐃', - '𐐬' => '𐐄', - '𐐭' => '𐐅', - '𐐮' => '𐐆', - '𐐯' => '𐐇', - '𐐰' => '𐐈', - '𐐱' => '𐐉', - '𐐲' => '𐐊', - '𐐳' => '𐐋', - '𐐴' => '𐐌', - '𐐵' => '𐐍', - '𐐶' => '𐐎', - '𐐷' => '𐐏', - '𐐸' => '𐐐', - '𐐹' => '𐐑', - '𐐺' => '𐐒', - '𐐻' => '𐐓', - '𐐼' => '𐐔', - '𐐽' => '𐐕', - '𐐾' => '𐐖', - '𐐿' => '𐐗', - '𐑀' => '𐐘', - '𐑁' => '𐐙', - '𐑂' => '𐐚', - '𐑃' => '𐐛', - '𐑄' => '𐐜', - '𐑅' => '𐐝', - '𐑆' => '𐐞', - '𐑇' => '𐐟', - '𐑈' => '𐐠', - '𐑉' => '𐐡', - '𐑊' => '𐐢', - '𐑋' => '𐐣', - '𐑌' => '𐐤', - '𐑍' => '𐐥', - '𐑎' => '𐐦', - '𐑏' => '𐐧', - '𐓘' => '𐒰', - '𐓙' => '𐒱', - '𐓚' => '𐒲', - '𐓛' => '𐒳', - '𐓜' => '𐒴', - '𐓝' => '𐒵', - '𐓞' => '𐒶', - '𐓟' => '𐒷', - '𐓠' => '𐒸', - '𐓡' => '𐒹', - '𐓢' => '𐒺', - '𐓣' => '𐒻', - '𐓤' => '𐒼', - '𐓥' => '𐒽', - '𐓦' => '𐒾', - '𐓧' => '𐒿', - '𐓨' => '𐓀', - '𐓩' => '𐓁', - '𐓪' => '𐓂', - '𐓫' => '𐓃', - '𐓬' => '𐓄', - '𐓭' => '𐓅', - '𐓮' => '𐓆', - '𐓯' => '𐓇', - '𐓰' => '𐓈', - '𐓱' => '𐓉', - '𐓲' => '𐓊', - '𐓳' => '𐓋', - '𐓴' => '𐓌', - '𐓵' => '𐓍', - '𐓶' => '𐓎', - '𐓷' => '𐓏', - '𐓸' => '𐓐', - '𐓹' => '𐓑', - '𐓺' => '𐓒', - '𐓻' => '𐓓', - '𐳀' => '𐲀', - '𐳁' => '𐲁', - '𐳂' => '𐲂', - '𐳃' => '𐲃', - '𐳄' => '𐲄', - '𐳅' => '𐲅', - '𐳆' => '𐲆', - '𐳇' => '𐲇', - '𐳈' => '𐲈', - '𐳉' => '𐲉', - '𐳊' => '𐲊', - '𐳋' => '𐲋', - '𐳌' => '𐲌', - '𐳍' => '𐲍', - '𐳎' => '𐲎', - '𐳏' => '𐲏', - '𐳐' => '𐲐', - '𐳑' => '𐲑', - '𐳒' => '𐲒', - '𐳓' => '𐲓', - '𐳔' => '𐲔', - '𐳕' => '𐲕', - '𐳖' => '𐲖', - '𐳗' => '𐲗', - '𐳘' => '𐲘', - '𐳙' => '𐲙', - '𐳚' => '𐲚', - '𐳛' => '𐲛', - '𐳜' => '𐲜', - '𐳝' => '𐲝', - '𐳞' => '𐲞', - '𐳟' => '𐲟', - '𐳠' => '𐲠', - '𐳡' => '𐲡', - '𐳢' => '𐲢', - '𐳣' => '𐲣', - '𐳤' => '𐲤', - '𐳥' => '𐲥', - '𐳦' => '𐲦', - '𐳧' => '𐲧', - '𐳨' => '𐲨', - '𐳩' => '𐲩', - '𐳪' => '𐲪', - '𐳫' => '𐲫', - '𐳬' => '𐲬', - '𐳭' => '𐲭', - '𐳮' => '𐲮', - '𐳯' => '𐲯', - '𐳰' => '𐲰', - '𐳱' => '𐲱', - '𐳲' => '𐲲', - '𑣀' => '𑢠', - '𑣁' => '𑢡', - '𑣂' => '𑢢', - '𑣃' => '𑢣', - '𑣄' => '𑢤', - '𑣅' => '𑢥', - '𑣆' => '𑢦', - '𑣇' => '𑢧', - '𑣈' => '𑢨', - '𑣉' => '𑢩', - '𑣊' => '𑢪', - '𑣋' => '𑢫', - '𑣌' => '𑢬', - '𑣍' => '𑢭', - '𑣎' => '𑢮', - '𑣏' => '𑢯', - '𑣐' => '𑢰', - '𑣑' => '𑢱', - '𑣒' => '𑢲', - '𑣓' => '𑢳', - '𑣔' => '𑢴', - '𑣕' => '𑢵', - '𑣖' => '𑢶', - '𑣗' => '𑢷', - '𑣘' => '𑢸', - '𑣙' => '𑢹', - '𑣚' => '𑢺', - '𑣛' => '𑢻', - '𑣜' => '𑢼', - '𑣝' => '𑢽', - '𑣞' => '𑢾', - '𑣟' => '𑢿', - '𖹠' => '𖹀', - '𖹡' => '𖹁', - '𖹢' => '𖹂', - '𖹣' => '𖹃', - '𖹤' => '𖹄', - '𖹥' => '𖹅', - '𖹦' => '𖹆', - '𖹧' => '𖹇', - '𖹨' => '𖹈', - '𖹩' => '𖹉', - '𖹪' => '𖹊', - '𖹫' => '𖹋', - '𖹬' => '𖹌', - '𖹭' => '𖹍', - '𖹮' => '𖹎', - '𖹯' => '𖹏', - '𖹰' => '𖹐', - '𖹱' => '𖹑', - '𖹲' => '𖹒', - '𖹳' => '𖹓', - '𖹴' => '𖹔', - '𖹵' => '𖹕', - '𖹶' => '𖹖', - '𖹷' => '𖹗', - '𖹸' => '𖹘', - '𖹹' => '𖹙', - '𖹺' => '𖹚', - '𖹻' => '𖹛', - '𖹼' => '𖹜', - '𖹽' => '𖹝', - '𖹾' => '𖹞', - '𖹿' => '𖹟', - '𞤢' => '𞤀', - '𞤣' => '𞤁', - '𞤤' => '𞤂', - '𞤥' => '𞤃', - '𞤦' => '𞤄', - '𞤧' => '𞤅', - '𞤨' => '𞤆', - '𞤩' => '𞤇', - '𞤪' => '𞤈', - '𞤫' => '𞤉', - '𞤬' => '𞤊', - '𞤭' => '𞤋', - '𞤮' => '𞤌', - '𞤯' => '𞤍', - '𞤰' => '𞤎', - '𞤱' => '𞤏', - '𞤲' => '𞤐', - '𞤳' => '𞤑', - '𞤴' => '𞤒', - '𞤵' => '𞤓', - '𞤶' => '𞤔', - '𞤷' => '𞤕', - '𞤸' => '𞤖', - '𞤹' => '𞤗', - '𞤺' => '𞤘', - '𞤻' => '𞤙', - '𞤼' => '𞤚', - '𞤽' => '𞤛', - '𞤾' => '𞤜', - '𞤿' => '𞤝', - '𞥀' => '𞤞', - '𞥁' => '𞤟', - '𞥂' => '𞤠', - '𞥃' => '𞤡', - 'ß' => 'SS', - 'ff' => 'FF', - 'fi' => 'FI', - 'fl' => 'FL', - 'ffi' => 'FFI', - 'ffl' => 'FFL', - 'ſt' => 'ST', - 'st' => 'ST', - 'և' => 'ԵՒ', - 'ﬓ' => 'ՄՆ', - 'ﬔ' => 'ՄԵ', - 'ﬕ' => 'ՄԻ', - 'ﬖ' => 'ՎՆ', - 'ﬗ' => 'ՄԽ', - 'ʼn' => 'ʼN', - 'ΐ' => 'Ϊ́', - 'ΰ' => 'Ϋ́', - 'ǰ' => 'J̌', - 'ẖ' => 'H̱', - 'ẗ' => 'T̈', - 'ẘ' => 'W̊', - 'ẙ' => 'Y̊', - 'ẚ' => 'Aʾ', - 'ὐ' => 'Υ̓', - 'ὒ' => 'Υ̓̀', - 'ὔ' => 'Υ̓́', - 'ὖ' => 'Υ̓͂', - 'ᾶ' => 'Α͂', - 'ῆ' => 'Η͂', - 'ῒ' => 'Ϊ̀', - 'ΐ' => 'Ϊ́', - 'ῖ' => 'Ι͂', - 'ῗ' => 'Ϊ͂', - 'ῢ' => 'Ϋ̀', - 'ΰ' => 'Ϋ́', - 'ῤ' => 'Ρ̓', - 'ῦ' => 'Υ͂', - 'ῧ' => 'Ϋ͂', - 'ῶ' => 'Ω͂', - 'ᾈ' => 'ἈΙ', - 'ᾉ' => 'ἉΙ', - 'ᾊ' => 'ἊΙ', - 'ᾋ' => 'ἋΙ', - 'ᾌ' => 'ἌΙ', - 'ᾍ' => 'ἍΙ', - 'ᾎ' => 'ἎΙ', - 'ᾏ' => 'ἏΙ', - 'ᾘ' => 'ἨΙ', - 'ᾙ' => 'ἩΙ', - 'ᾚ' => 'ἪΙ', - 'ᾛ' => 'ἫΙ', - 'ᾜ' => 'ἬΙ', - 'ᾝ' => 'ἭΙ', - 'ᾞ' => 'ἮΙ', - 'ᾟ' => 'ἯΙ', - 'ᾨ' => 'ὨΙ', - 'ᾩ' => 'ὩΙ', - 'ᾪ' => 'ὪΙ', - 'ᾫ' => 'ὫΙ', - 'ᾬ' => 'ὬΙ', - 'ᾭ' => 'ὭΙ', - 'ᾮ' => 'ὮΙ', - 'ᾯ' => 'ὯΙ', - 'ᾼ' => 'ΑΙ', - 'ῌ' => 'ΗΙ', - 'ῼ' => 'ΩΙ', - 'ᾲ' => 'ᾺΙ', - 'ᾴ' => 'ΆΙ', - 'ῂ' => 'ῊΙ', - 'ῄ' => 'ΉΙ', - 'ῲ' => 'ῺΙ', - 'ῴ' => 'ΏΙ', - 'ᾷ' => 'Α͂Ι', - 'ῇ' => 'Η͂Ι', - 'ῷ' => 'Ω͂Ι', -); diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php deleted file mode 100644 index ecf1a03..0000000 --- a/vendor/symfony/polyfill-mbstring/bootstrap.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Mbstring as p; - -if (\PHP_VERSION_ID >= 80000) { - return require __DIR__.'/bootstrap80.php'; -} - -if (!function_exists('mb_convert_encoding')) { - function mb_convert_encoding($string, $to_encoding, $from_encoding = null) { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); } -} -if (!function_exists('mb_decode_mimeheader')) { - function mb_decode_mimeheader($string) { return p\Mbstring::mb_decode_mimeheader($string); } -} -if (!function_exists('mb_encode_mimeheader')) { - function mb_encode_mimeheader($string, $charset = null, $transfer_encoding = null, $newline = "\r\n", $indent = 0) { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); } -} -if (!function_exists('mb_decode_numericentity')) { - function mb_decode_numericentity($string, $map, $encoding = null) { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); } -} -if (!function_exists('mb_encode_numericentity')) { - function mb_encode_numericentity($string, $map, $encoding = null, $hex = false) { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); } -} -if (!function_exists('mb_convert_case')) { - function mb_convert_case($string, $mode, $encoding = null) { return p\Mbstring::mb_convert_case($string, $mode, $encoding); } -} -if (!function_exists('mb_internal_encoding')) { - function mb_internal_encoding($encoding = null) { return p\Mbstring::mb_internal_encoding($encoding); } -} -if (!function_exists('mb_language')) { - function mb_language($language = null) { return p\Mbstring::mb_language($language); } -} -if (!function_exists('mb_list_encodings')) { - function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } -} -if (!function_exists('mb_encoding_aliases')) { - function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } -} -if (!function_exists('mb_check_encoding')) { - function mb_check_encoding($value = null, $encoding = null) { return p\Mbstring::mb_check_encoding($value, $encoding); } -} -if (!function_exists('mb_detect_encoding')) { - function mb_detect_encoding($string, $encodings = null, $strict = false) { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); } -} -if (!function_exists('mb_detect_order')) { - function mb_detect_order($encoding = null) { return p\Mbstring::mb_detect_order($encoding); } -} -if (!function_exists('mb_parse_str')) { - function mb_parse_str($string, &$result = []) { parse_str($string, $result); return (bool) $result; } -} -if (!function_exists('mb_strlen')) { - function mb_strlen($string, $encoding = null) { return p\Mbstring::mb_strlen($string, $encoding); } -} -if (!function_exists('mb_strpos')) { - function mb_strpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strtolower')) { - function mb_strtolower($string, $encoding = null) { return p\Mbstring::mb_strtolower($string, $encoding); } -} -if (!function_exists('mb_strtoupper')) { - function mb_strtoupper($string, $encoding = null) { return p\Mbstring::mb_strtoupper($string, $encoding); } -} -if (!function_exists('mb_substitute_character')) { - function mb_substitute_character($substitute_character = null) { return p\Mbstring::mb_substitute_character($substitute_character); } -} -if (!function_exists('mb_substr')) { - function mb_substr($string, $start, $length = 2147483647, $encoding = null) { return p\Mbstring::mb_substr($string, $start, $length, $encoding); } -} -if (!function_exists('mb_stripos')) { - function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_stristr')) { - function mb_stristr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strrchr')) { - function mb_strrchr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strrichr')) { - function mb_strrichr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_strripos')) { - function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strrpos')) { - function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null) { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); } -} -if (!function_exists('mb_strstr')) { - function mb_strstr($haystack, $needle, $before_needle = false, $encoding = null) { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); } -} -if (!function_exists('mb_get_info')) { - function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } -} -if (!function_exists('mb_http_output')) { - function mb_http_output($encoding = null) { return p\Mbstring::mb_http_output($encoding); } -} -if (!function_exists('mb_strwidth')) { - function mb_strwidth($string, $encoding = null) { return p\Mbstring::mb_strwidth($string, $encoding); } -} -if (!function_exists('mb_substr_count')) { - function mb_substr_count($haystack, $needle, $encoding = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); } -} -if (!function_exists('mb_output_handler')) { - function mb_output_handler($string, $status) { return p\Mbstring::mb_output_handler($string, $status); } -} -if (!function_exists('mb_http_input')) { - function mb_http_input($type = null) { return p\Mbstring::mb_http_input($type); } -} - -if (!function_exists('mb_convert_variables')) { - function mb_convert_variables($to_encoding, $from_encoding, &...$vars) { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, ...$vars); } -} - -if (!function_exists('mb_ord')) { - function mb_ord($string, $encoding = null) { return p\Mbstring::mb_ord($string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr($codepoint, $encoding = null) { return p\Mbstring::mb_chr($codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } -} -if (!function_exists('mb_str_split')) { - function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } -} - -if (!function_exists('mb_str_pad')) { - function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } -} - -if (extension_loaded('mbstring')) { - return; -} - -if (!defined('MB_CASE_UPPER')) { - define('MB_CASE_UPPER', 0); -} -if (!defined('MB_CASE_LOWER')) { - define('MB_CASE_LOWER', 1); -} -if (!defined('MB_CASE_TITLE')) { - define('MB_CASE_TITLE', 2); -} diff --git a/vendor/symfony/polyfill-mbstring/bootstrap80.php b/vendor/symfony/polyfill-mbstring/bootstrap80.php deleted file mode 100644 index 2f9fb5b..0000000 --- a/vendor/symfony/polyfill-mbstring/bootstrap80.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Mbstring as p; - -if (!function_exists('mb_convert_encoding')) { - function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); } -} -if (!function_exists('mb_decode_mimeheader')) { - function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); } -} -if (!function_exists('mb_encode_mimeheader')) { - function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); } -} -if (!function_exists('mb_decode_numericentity')) { - function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); } -} -if (!function_exists('mb_encode_numericentity')) { - function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); } -} -if (!function_exists('mb_convert_case')) { - function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); } -} -if (!function_exists('mb_internal_encoding')) { - function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); } -} -if (!function_exists('mb_language')) { - function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); } -} -if (!function_exists('mb_list_encodings')) { - function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); } -} -if (!function_exists('mb_encoding_aliases')) { - function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); } -} -if (!function_exists('mb_check_encoding')) { - function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); } -} -if (!function_exists('mb_detect_encoding')) { - function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); } -} -if (!function_exists('mb_detect_order')) { - function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); } -} -if (!function_exists('mb_parse_str')) { - function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); return (bool) $result; } -} -if (!function_exists('mb_strlen')) { - function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); } -} -if (!function_exists('mb_strpos')) { - function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strtolower')) { - function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); } -} -if (!function_exists('mb_strtoupper')) { - function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); } -} -if (!function_exists('mb_substitute_character')) { - function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); } -} -if (!function_exists('mb_substr')) { - function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); } -} -if (!function_exists('mb_stripos')) { - function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_stristr')) { - function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strrchr')) { - function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strrichr')) { - function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_strripos')) { - function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strrpos')) { - function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); } -} -if (!function_exists('mb_strstr')) { - function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); } -} -if (!function_exists('mb_get_info')) { - function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); } -} -if (!function_exists('mb_http_output')) { - function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); } -} -if (!function_exists('mb_strwidth')) { - function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); } -} -if (!function_exists('mb_substr_count')) { - function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); } -} -if (!function_exists('mb_output_handler')) { - function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); } -} -if (!function_exists('mb_http_input')) { - function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); } -} - -if (!function_exists('mb_convert_variables')) { - function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); } -} - -if (!function_exists('mb_ord')) { - function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); } -} -if (!function_exists('mb_str_split')) { - function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } -} - -if (!function_exists('mb_str_pad')) { - function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } -} - -if (extension_loaded('mbstring')) { - return; -} - -if (!defined('MB_CASE_UPPER')) { - define('MB_CASE_UPPER', 0); -} -if (!defined('MB_CASE_LOWER')) { - define('MB_CASE_LOWER', 1); -} -if (!defined('MB_CASE_TITLE')) { - define('MB_CASE_TITLE', 2); -} diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json deleted file mode 100644 index bd99d4b..0000000 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "symfony/polyfill-mbstring", - "type": "library", - "description": "Symfony polyfill for the Mbstring extension", - "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" }, - "files": [ "bootstrap.php" ] - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "minimum-stability": "dev", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-php72/LICENSE b/vendor/symfony/polyfill-php72/LICENSE deleted file mode 100644 index 6e3afce..0000000 --- a/vendor/symfony/polyfill-php72/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-php72/Php72.php b/vendor/symfony/polyfill-php72/Php72.php deleted file mode 100644 index 7bf96c9..0000000 --- a/vendor/symfony/polyfill-php72/Php72.php +++ /dev/null @@ -1,217 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php72; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * @author Dariusz Rumiński <dariusz.ruminski@gmail.com> - * - * @internal - */ -final class Php72 -{ - private static $hashMask; - - public static function utf8_encode($s) - { - $s .= $s; - $len = \strlen($s); - - for ($i = $len >> 1, $j = 0; $i < $len; ++$i, ++$j) { - switch (true) { - case $s[$i] < "\x80": $s[$j] = $s[$i]; break; - case $s[$i] < "\xC0": $s[$j] = "\xC2"; $s[++$j] = $s[$i]; break; - default: $s[$j] = "\xC3"; $s[++$j] = \chr(\ord($s[$i]) - 64); break; - } - } - - return substr($s, 0, $j); - } - - public static function utf8_decode($s) - { - $s = (string) $s; - $len = \strlen($s); - - for ($i = 0, $j = 0; $i < $len; ++$i, ++$j) { - switch ($s[$i] & "\xF0") { - case "\xC0": - case "\xD0": - $c = (\ord($s[$i] & "\x1F") << 6) | \ord($s[++$i] & "\x3F"); - $s[$j] = $c < 256 ? \chr($c) : '?'; - break; - - case "\xF0": - ++$i; - // no break - - case "\xE0": - $s[$j] = '?'; - $i += 2; - break; - - default: - $s[$j] = $s[$i]; - } - } - - return substr($s, 0, $j); - } - - public static function php_os_family() - { - if ('\\' === \DIRECTORY_SEPARATOR) { - return 'Windows'; - } - - $map = [ - 'Darwin' => 'Darwin', - 'DragonFly' => 'BSD', - 'FreeBSD' => 'BSD', - 'NetBSD' => 'BSD', - 'OpenBSD' => 'BSD', - 'Linux' => 'Linux', - 'SunOS' => 'Solaris', - ]; - - return $map[\PHP_OS] ?? 'Unknown'; - } - - public static function spl_object_id($object) - { - if (null === self::$hashMask) { - self::initHashMask(); - } - if (null === $hash = spl_object_hash($object)) { - return; - } - - // On 32-bit systems, PHP_INT_SIZE is 4, - return self::$hashMask ^ hexdec(substr($hash, 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1)); - } - - public static function sapi_windows_vt100_support($stream, $enable = null) - { - if (!\is_resource($stream)) { - trigger_error('sapi_windows_vt100_support() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); - - return false; - } - - $meta = stream_get_meta_data($stream); - - if ('STDIO' !== $meta['stream_type']) { - trigger_error('sapi_windows_vt100_support() was not able to analyze the specified stream', \E_USER_WARNING); - - return false; - } - - // We cannot actually disable vt100 support if it is set - if (false === $enable || !self::stream_isatty($stream)) { - return false; - } - - // The native function does not apply to stdin - $meta = array_map('strtolower', $meta); - $stdin = 'php://stdin' === $meta['uri'] || 'php://fd/0' === $meta['uri']; - - return !$stdin - && (false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM') - || 'Hyper' === getenv('TERM_PROGRAM')); - } - - public static function stream_isatty($stream) - { - if (!\is_resource($stream)) { - trigger_error('stream_isatty() expects parameter 1 to be resource, '.\gettype($stream).' given', \E_USER_WARNING); - - return false; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - $stat = @fstat($stream); - // Check if formatted mode is S_IFCHR - return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; - } - - return \function_exists('posix_isatty') && @posix_isatty($stream); - } - - private static function initHashMask() - { - $obj = (object) []; - self::$hashMask = -1; - - // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below - $obFuncs = ['ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush']; - foreach (debug_backtrace(\PHP_VERSION_ID >= 50400 ? \DEBUG_BACKTRACE_IGNORE_ARGS : false) as $frame) { - if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && \in_array($frame['function'], $obFuncs)) { - $frame['line'] = 0; - break; - } - } - if (!empty($frame['line'])) { - ob_start(); - debug_zval_dump($obj); - self::$hashMask = (int) substr(ob_get_clean(), 17); - } - - self::$hashMask ^= hexdec(substr(spl_object_hash($obj), 16 - (\PHP_INT_SIZE * 2 - 1), \PHP_INT_SIZE * 2 - 1)); - } - - public static function mb_chr($code, $encoding = null) - { - if (0x80 > $code %= 0x200000) { - $s = \chr($code); - } elseif (0x800 > $code) { - $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); - } elseif (0x10000 > $code) { - $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } else { - $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); - } - - if ('UTF-8' !== $encoding = $encoding ?? mb_internal_encoding()) { - $s = mb_convert_encoding($s, $encoding, 'UTF-8'); - } - - return $s; - } - - public static function mb_ord($s, $encoding = null) - { - if (null === $encoding) { - $s = mb_convert_encoding($s, 'UTF-8'); - } elseif ('UTF-8' !== $encoding) { - $s = mb_convert_encoding($s, 'UTF-8', $encoding); - } - - if (1 === \strlen($s)) { - return \ord($s); - } - - $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0; - if (0xF0 <= $code) { - return (($code - 0xF0) << 18) + (($s[2] - 0x80) << 12) + (($s[3] - 0x80) << 6) + $s[4] - 0x80; - } - if (0xE0 <= $code) { - return (($code - 0xE0) << 12) + (($s[2] - 0x80) << 6) + $s[3] - 0x80; - } - if (0xC0 <= $code) { - return (($code - 0xC0) << 6) + $s[2] - 0x80; - } - - return $code; - } -} diff --git a/vendor/symfony/polyfill-php72/README.md b/vendor/symfony/polyfill-php72/README.md deleted file mode 100644 index ed19050..0000000 --- a/vendor/symfony/polyfill-php72/README.md +++ /dev/null @@ -1,35 +0,0 @@ -Symfony Polyfill / Php72 -======================== - -This component provides functions added to PHP 7.2 core: - -- [`spl_object_id`](https://php.net/spl_object_id) -- [`stream_isatty`](https://php.net/stream_isatty) - -And also functions added to PHP 7.2 mbstring: - -- [`mb_ord`](https://php.net/mb_ord) -- [`mb_chr`](https://php.net/mb_chr) -- [`mb_scrub`](https://php.net/mb_scrub) - -On Windows only: - -- [`sapi_windows_vt100_support`](https://php.net/sapi_windows_vt100_support) - -Moved to core since 7.2 (was in the optional XML extension earlier): - -- [`utf8_encode`](https://php.net/utf8_encode) -- [`utf8_decode`](https://php.net/utf8_decode) - -Also, it provides constants added to PHP 7.2: - -- [`PHP_FLOAT_*`](https://php.net/reserved.constants#constant.php-float-dig) -- [`PHP_OS_FAMILY`](https://php.net/reserved.constants#constant.php-os-family) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php72/bootstrap.php b/vendor/symfony/polyfill-php72/bootstrap.php deleted file mode 100644 index b5c92d4..0000000 --- a/vendor/symfony/polyfill-php72/bootstrap.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php72 as p; - -if (\PHP_VERSION_ID >= 70200) { - return; -} - -if (!defined('PHP_FLOAT_DIG')) { - define('PHP_FLOAT_DIG', 15); -} -if (!defined('PHP_FLOAT_EPSILON')) { - define('PHP_FLOAT_EPSILON', 2.2204460492503E-16); -} -if (!defined('PHP_FLOAT_MIN')) { - define('PHP_FLOAT_MIN', 2.2250738585072E-308); -} -if (!defined('PHP_FLOAT_MAX')) { - define('PHP_FLOAT_MAX', 1.7976931348623157E+308); -} -if (!defined('PHP_OS_FAMILY')) { - define('PHP_OS_FAMILY', p\Php72::php_os_family()); -} - -if ('\\' === \DIRECTORY_SEPARATOR && !function_exists('sapi_windows_vt100_support')) { - function sapi_windows_vt100_support($stream, $enable = null) { return p\Php72::sapi_windows_vt100_support($stream, $enable); } -} -if (!function_exists('stream_isatty')) { - function stream_isatty($stream) { return p\Php72::stream_isatty($stream); } -} -if (!function_exists('utf8_encode')) { - function utf8_encode($string) { return p\Php72::utf8_encode($string); } -} -if (!function_exists('utf8_decode')) { - function utf8_decode($string) { return p\Php72::utf8_decode($string); } -} -if (!function_exists('spl_object_id')) { - function spl_object_id($object) { return p\Php72::spl_object_id($object); } -} -if (!function_exists('mb_ord')) { - function mb_ord($string, $encoding = null) { return p\Php72::mb_ord($string, $encoding); } -} -if (!function_exists('mb_chr')) { - function mb_chr($codepoint, $encoding = null) { return p\Php72::mb_chr($codepoint, $encoding); } -} -if (!function_exists('mb_scrub')) { - function mb_scrub($string, $encoding = null) { $encoding = null === $encoding ? mb_internal_encoding() : $encoding; return mb_convert_encoding($string, $encoding, $encoding); } -} diff --git a/vendor/symfony/polyfill-php72/composer.json b/vendor/symfony/polyfill-php72/composer.json deleted file mode 100644 index 1882576..0000000 --- a/vendor/symfony/polyfill-php72/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "symfony/polyfill-php72", - "type": "library", - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php72\\": "" }, - "files": [ "bootstrap.php" ] - }, - "minimum-stability": "dev", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-php73/LICENSE b/vendor/symfony/polyfill-php73/LICENSE deleted file mode 100644 index 7536cae..0000000 --- a/vendor/symfony/polyfill-php73/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-php73/Php73.php b/vendor/symfony/polyfill-php73/Php73.php deleted file mode 100644 index 65c35a6..0000000 --- a/vendor/symfony/polyfill-php73/Php73.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php73; - -/** - * @author Gabriel Caruso <carusogabriel34@gmail.com> - * @author Ion Bazan <ion.bazan@gmail.com> - * - * @internal - */ -final class Php73 -{ - public static $startAt = 1533462603; - - /** - * @param bool $asNum - * - * @return array|float|int - */ - public static function hrtime($asNum = false) - { - $ns = microtime(false); - $s = substr($ns, 11) - self::$startAt; - $ns = 1E9 * (float) $ns; - - if ($asNum) { - $ns += $s * 1E9; - - return \PHP_INT_SIZE === 4 ? $ns : (int) $ns; - } - - return [$s, (int) $ns]; - } -} diff --git a/vendor/symfony/polyfill-php73/README.md b/vendor/symfony/polyfill-php73/README.md deleted file mode 100644 index 032fafb..0000000 --- a/vendor/symfony/polyfill-php73/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Symfony Polyfill / Php73 -======================== - -This component provides functions added to PHP 7.3 core: - -- [`array_key_first`](https://php.net/array_key_first) -- [`array_key_last`](https://php.net/array_key_last) -- [`hrtime`](https://php.net/function.hrtime) -- [`is_countable`](https://php.net/is_countable) -- [`JsonException`](https://php.net/JsonException) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php b/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php deleted file mode 100644 index f06d6c2..0000000 --- a/vendor/symfony/polyfill-php73/Resources/stubs/JsonException.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\PHP_VERSION_ID < 70300) { - class JsonException extends Exception - { - } -} diff --git a/vendor/symfony/polyfill-php73/bootstrap.php b/vendor/symfony/polyfill-php73/bootstrap.php deleted file mode 100644 index d6b2153..0000000 --- a/vendor/symfony/polyfill-php73/bootstrap.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php73 as p; - -if (\PHP_VERSION_ID >= 70300) { - return; -} - -if (!function_exists('is_countable')) { - function is_countable($value) { return is_array($value) || $value instanceof Countable || $value instanceof ResourceBundle || $value instanceof SimpleXmlElement; } -} -if (!function_exists('hrtime')) { - require_once __DIR__.'/Php73.php'; - p\Php73::$startAt = (int) microtime(true); - function hrtime($as_number = false) { return p\Php73::hrtime($as_number); } -} -if (!function_exists('array_key_first')) { - function array_key_first(array $array) { foreach ($array as $key => $value) { return $key; } } -} -if (!function_exists('array_key_last')) { - function array_key_last(array $array) { return key(array_slice($array, -1, 1, true)); } -} diff --git a/vendor/symfony/polyfill-php73/composer.json b/vendor/symfony/polyfill-php73/composer.json deleted file mode 100644 index 3d47d15..0000000 --- a/vendor/symfony/polyfill-php73/composer.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "symfony/polyfill-php73", - "type": "library", - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php73\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/polyfill-php80/LICENSE b/vendor/symfony/polyfill-php80/LICENSE deleted file mode 100644 index 0ed3a24..0000000 --- a/vendor/symfony/polyfill-php80/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2020-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/polyfill-php80/Php80.php b/vendor/symfony/polyfill-php80/Php80.php deleted file mode 100644 index 362dd1a..0000000 --- a/vendor/symfony/polyfill-php80/Php80.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php80; - -/** - * @author Ion Bazan <ion.bazan@gmail.com> - * @author Nico Oelgart <nicoswd@gmail.com> - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -final class Php80 -{ - public static function fdiv(float $dividend, float $divisor): float - { - return @($dividend / $divisor); - } - - public static function get_debug_type($value): string - { - switch (true) { - case null === $value: return 'null'; - case \is_bool($value): return 'bool'; - case \is_string($value): return 'string'; - case \is_array($value): return 'array'; - case \is_int($value): return 'int'; - case \is_float($value): return 'float'; - case \is_object($value): break; - case $value instanceof \__PHP_Incomplete_Class: return '__PHP_Incomplete_Class'; - default: - if (null === $type = @get_resource_type($value)) { - return 'unknown'; - } - - if ('Unknown' === $type) { - $type = 'closed'; - } - - return "resource ($type)"; - } - - $class = \get_class($value); - - if (false === strpos($class, '@')) { - return $class; - } - - return (get_parent_class($class) ?: key(class_implements($class)) ?: 'class').'@anonymous'; - } - - public static function get_resource_id($res): int - { - if (!\is_resource($res) && null === @get_resource_type($res)) { - throw new \TypeError(sprintf('Argument 1 passed to get_resource_id() must be of the type resource, %s given', get_debug_type($res))); - } - - return (int) $res; - } - - public static function preg_last_error_msg(): string - { - switch (preg_last_error()) { - case \PREG_INTERNAL_ERROR: - return 'Internal error'; - case \PREG_BAD_UTF8_ERROR: - return 'Malformed UTF-8 characters, possibly incorrectly encoded'; - case \PREG_BAD_UTF8_OFFSET_ERROR: - return 'The offset did not correspond to the beginning of a valid UTF-8 code point'; - case \PREG_BACKTRACK_LIMIT_ERROR: - return 'Backtrack limit exhausted'; - case \PREG_RECURSION_LIMIT_ERROR: - return 'Recursion limit exhausted'; - case \PREG_JIT_STACKLIMIT_ERROR: - return 'JIT stack limit exhausted'; - case \PREG_NO_ERROR: - return 'No error'; - default: - return 'Unknown error'; - } - } - - public static function str_contains(string $haystack, string $needle): bool - { - return '' === $needle || false !== strpos($haystack, $needle); - } - - public static function str_starts_with(string $haystack, string $needle): bool - { - return 0 === strncmp($haystack, $needle, \strlen($needle)); - } - - public static function str_ends_with(string $haystack, string $needle): bool - { - if ('' === $needle || $needle === $haystack) { - return true; - } - - if ('' === $haystack) { - return false; - } - - $needleLength = \strlen($needle); - - return $needleLength <= \strlen($haystack) && 0 === substr_compare($haystack, $needle, -$needleLength); - } -} diff --git a/vendor/symfony/polyfill-php80/PhpToken.php b/vendor/symfony/polyfill-php80/PhpToken.php deleted file mode 100644 index fe6e691..0000000 --- a/vendor/symfony/polyfill-php80/PhpToken.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Polyfill\Php80; - -/** - * @author Fedonyuk Anton <info@ensostudio.ru> - * - * @internal - */ -class PhpToken implements \Stringable -{ - /** - * @var int - */ - public $id; - - /** - * @var string - */ - public $text; - - /** - * @var int - */ - public $line; - - /** - * @var int - */ - public $pos; - - public function __construct(int $id, string $text, int $line = -1, int $position = -1) - { - $this->id = $id; - $this->text = $text; - $this->line = $line; - $this->pos = $position; - } - - public function getTokenName(): ?string - { - if ('UNKNOWN' === $name = token_name($this->id)) { - $name = \strlen($this->text) > 1 || \ord($this->text) < 32 ? null : $this->text; - } - - return $name; - } - - /** - * @param int|string|array $kind - */ - public function is($kind): bool - { - foreach ((array) $kind as $value) { - if (\in_array($value, [$this->id, $this->text], true)) { - return true; - } - } - - return false; - } - - public function isIgnorable(): bool - { - return \in_array($this->id, [\T_WHITESPACE, \T_COMMENT, \T_DOC_COMMENT, \T_OPEN_TAG], true); - } - - public function __toString(): string - { - return (string) $this->text; - } - - /** - * @return static[] - */ - public static function tokenize(string $code, int $flags = 0): array - { - $line = 1; - $position = 0; - $tokens = token_get_all($code, $flags); - foreach ($tokens as $index => $token) { - if (\is_string($token)) { - $id = \ord($token); - $text = $token; - } else { - [$id, $text, $line] = $token; - } - $tokens[$index] = new static($id, $text, $line, $position); - $position += \strlen($text); - } - - return $tokens; - } -} diff --git a/vendor/symfony/polyfill-php80/README.md b/vendor/symfony/polyfill-php80/README.md deleted file mode 100644 index 3816c55..0000000 --- a/vendor/symfony/polyfill-php80/README.md +++ /dev/null @@ -1,25 +0,0 @@ -Symfony Polyfill / Php80 -======================== - -This component provides features added to PHP 8.0 core: - -- [`Stringable`](https://php.net/stringable) interface -- [`fdiv`](https://php.net/fdiv) -- [`ValueError`](https://php.net/valueerror) class -- [`UnhandledMatchError`](https://php.net/unhandledmatcherror) class -- `FILTER_VALIDATE_BOOL` constant -- [`get_debug_type`](https://php.net/get_debug_type) -- [`PhpToken`](https://php.net/phptoken) class -- [`preg_last_error_msg`](https://php.net/preg_last_error_msg) -- [`str_contains`](https://php.net/str_contains) -- [`str_starts_with`](https://php.net/str_starts_with) -- [`str_ends_with`](https://php.net/str_ends_with) -- [`get_resource_id`](https://php.net/get_resource_id) - -More information can be found in the -[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). - -License -======= - -This library is released under the [MIT license](LICENSE). diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php b/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php deleted file mode 100644 index 2b95542..0000000 --- a/vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -#[Attribute(Attribute::TARGET_CLASS)] -final class Attribute -{ - public const TARGET_CLASS = 1; - public const TARGET_FUNCTION = 2; - public const TARGET_METHOD = 4; - public const TARGET_PROPERTY = 8; - public const TARGET_CLASS_CONSTANT = 16; - public const TARGET_PARAMETER = 32; - public const TARGET_ALL = 63; - public const IS_REPEATABLE = 64; - - /** @var int */ - public $flags; - - public function __construct(int $flags = self::TARGET_ALL) - { - $this->flags = $flags; - } -} diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php b/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php deleted file mode 100644 index bd1212f..0000000 --- a/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\PHP_VERSION_ID < 80000 && extension_loaded('tokenizer')) { - class PhpToken extends Symfony\Polyfill\Php80\PhpToken - { - } -} diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php b/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php deleted file mode 100644 index 7c62d75..0000000 --- a/vendor/symfony/polyfill-php80/Resources/stubs/Stringable.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\PHP_VERSION_ID < 80000) { - interface Stringable - { - /** - * @return string - */ - public function __toString(); - } -} diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php b/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php deleted file mode 100644 index 01c6c6c..0000000 --- a/vendor/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\PHP_VERSION_ID < 80000) { - class UnhandledMatchError extends Error - { - } -} diff --git a/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php b/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php deleted file mode 100644 index 783dbc2..0000000 --- a/vendor/symfony/polyfill-php80/Resources/stubs/ValueError.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if (\PHP_VERSION_ID < 80000) { - class ValueError extends Error - { - } -} diff --git a/vendor/symfony/polyfill-php80/bootstrap.php b/vendor/symfony/polyfill-php80/bootstrap.php deleted file mode 100644 index e5f7dbc..0000000 --- a/vendor/symfony/polyfill-php80/bootstrap.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Polyfill\Php80 as p; - -if (\PHP_VERSION_ID >= 80000) { - return; -} - -if (!defined('FILTER_VALIDATE_BOOL') && defined('FILTER_VALIDATE_BOOLEAN')) { - define('FILTER_VALIDATE_BOOL', \FILTER_VALIDATE_BOOLEAN); -} - -if (!function_exists('fdiv')) { - function fdiv(float $num1, float $num2): float { return p\Php80::fdiv($num1, $num2); } -} -if (!function_exists('preg_last_error_msg')) { - function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); } -} -if (!function_exists('str_contains')) { - function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('str_starts_with')) { - function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('str_ends_with')) { - function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); } -} -if (!function_exists('get_debug_type')) { - function get_debug_type($value): string { return p\Php80::get_debug_type($value); } -} -if (!function_exists('get_resource_id')) { - function get_resource_id($resource): int { return p\Php80::get_resource_id($resource); } -} diff --git a/vendor/symfony/polyfill-php80/composer.json b/vendor/symfony/polyfill-php80/composer.json deleted file mode 100644 index 46ccde2..0000000 --- a/vendor/symfony/polyfill-php80/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "symfony/polyfill-php80", - "type": "library", - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "keywords": ["polyfill", "shim", "compatibility", "portable"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1" - }, - "autoload": { - "psr-4": { "Symfony\\Polyfill\\Php80\\": "" }, - "files": [ "bootstrap.php" ], - "classmap": [ "Resources/stubs" ] - }, - "minimum-stability": "dev", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - } -} diff --git a/vendor/symfony/process/CHANGELOG.md b/vendor/symfony/process/CHANGELOG.md deleted file mode 100644 index 69d4cbd..0000000 --- a/vendor/symfony/process/CHANGELOG.md +++ /dev/null @@ -1,96 +0,0 @@ -CHANGELOG -========= - -4.4.0 ------ - - * deprecated `Process::inheritEnvironmentVariables()`: env variables are always inherited. - * added `Process::getLastOutputTime()` method - -4.2.0 ------ - - * added the `Process::fromShellCommandline()` to run commands in a shell wrapper - * deprecated passing a command as string when creating a `Process` instance - * deprecated the `Process::setCommandline()` and the `PhpProcess::setPhpBinary()` methods - * added the `Process::waitUntil()` method to wait for the process only for a - specific output, then continue the normal execution of your application - -4.1.0 ------ - - * added the `Process::isTtySupported()` method that allows to check for TTY support - * made `PhpExecutableFinder` look for the `PHP_BINARY` env var when searching the php binary - * added the `ProcessSignaledException` class to properly catch signaled process errors - -4.0.0 ------ - - * environment variables will always be inherited - * added a second `array $env = []` argument to the `start()`, `run()`, - `mustRun()`, and `restart()` methods of the `Process` class - * added a second `array $env = []` argument to the `start()` method of the - `PhpProcess` class - * the `ProcessUtils::escapeArgument()` method has been removed - * the `areEnvironmentVariablesInherited()`, `getOptions()`, and `setOptions()` - methods of the `Process` class have been removed - * support for passing `proc_open()` options has been removed - * removed the `ProcessBuilder` class, use the `Process` class instead - * removed the `getEnhanceWindowsCompatibility()` and `setEnhanceWindowsCompatibility()` methods of the `Process` class - * passing a not existing working directory to the constructor of the `Symfony\Component\Process\Process` class is not - supported anymore - -3.4.0 ------ - - * deprecated the ProcessBuilder class - * deprecated calling `Process::start()` without setting a valid working directory beforehand (via `setWorkingDirectory()` or constructor) - -3.3.0 ------ - - * added command line arrays in the `Process` class - * added `$env` argument to `Process::start()`, `run()`, `mustRun()` and `restart()` methods - * deprecated the `ProcessUtils::escapeArgument()` method - * deprecated not inheriting environment variables - * deprecated configuring `proc_open()` options - * deprecated configuring enhanced Windows compatibility - * deprecated configuring enhanced sigchild compatibility - -2.5.0 ------ - - * added support for PTY mode - * added the convenience method "mustRun" - * deprecation: Process::setStdin() is deprecated in favor of Process::setInput() - * deprecation: Process::getStdin() is deprecated in favor of Process::getInput() - * deprecation: Process::setInput() and ProcessBuilder::setInput() do not accept non-scalar types - -2.4.0 ------ - - * added the ability to define an idle timeout - -2.3.0 ------ - - * added ProcessUtils::escapeArgument() to fix the bug in escapeshellarg() function on Windows - * added Process::signal() - * added Process::getPid() - * added support for a TTY mode - -2.2.0 ------ - - * added ProcessBuilder::setArguments() to reset the arguments on a builder - * added a way to retrieve the standard and error output incrementally - * added Process:restart() - -2.1.0 ------ - - * added support for non-blocking processes (start(), wait(), isRunning(), stop()) - * enhanced Windows compatibility - * added Process::getExitCodeText() that returns a string representation for - the exit code returned by the process - * added ProcessBuilder diff --git a/vendor/symfony/process/Exception/ExceptionInterface.php b/vendor/symfony/process/Exception/ExceptionInterface.php deleted file mode 100644 index bd4a604..0000000 --- a/vendor/symfony/process/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -/** - * Marker Interface for the Process Component. - * - * @author Johannes M. Schmitt <schmittjoh@gmail.com> - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/process/Exception/InvalidArgumentException.php b/vendor/symfony/process/Exception/InvalidArgumentException.php deleted file mode 100644 index 926ee21..0000000 --- a/vendor/symfony/process/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -/** - * InvalidArgumentException for the Process Component. - * - * @author Romain Neutron <imprec@gmail.com> - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/process/Exception/LogicException.php b/vendor/symfony/process/Exception/LogicException.php deleted file mode 100644 index be3d490..0000000 --- a/vendor/symfony/process/Exception/LogicException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -/** - * LogicException for the Process Component. - * - * @author Romain Neutron <imprec@gmail.com> - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/process/Exception/ProcessFailedException.php b/vendor/symfony/process/Exception/ProcessFailedException.php deleted file mode 100644 index 328acfd..0000000 --- a/vendor/symfony/process/Exception/ProcessFailedException.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -use Symfony\Component\Process\Process; - -/** - * Exception for failed processes. - * - * @author Johannes M. Schmitt <schmittjoh@gmail.com> - */ -class ProcessFailedException extends RuntimeException -{ - private $process; - - public function __construct(Process $process) - { - if ($process->isSuccessful()) { - throw new InvalidArgumentException('Expected a failed process, but the given process was successful.'); - } - - $error = sprintf('The command "%s" failed.'."\n\nExit Code: %s(%s)\n\nWorking directory: %s", - $process->getCommandLine(), - $process->getExitCode(), - $process->getExitCodeText(), - $process->getWorkingDirectory() - ); - - if (!$process->isOutputDisabled()) { - $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", - $process->getOutput(), - $process->getErrorOutput() - ); - } - - parent::__construct($error); - - $this->process = $process; - } - - public function getProcess() - { - return $this->process; - } -} diff --git a/vendor/symfony/process/Exception/ProcessSignaledException.php b/vendor/symfony/process/Exception/ProcessSignaledException.php deleted file mode 100644 index d4d3227..0000000 --- a/vendor/symfony/process/Exception/ProcessSignaledException.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -use Symfony\Component\Process\Process; - -/** - * Exception that is thrown when a process has been signaled. - * - * @author Sullivan Senechal <soullivaneuh@gmail.com> - */ -final class ProcessSignaledException extends RuntimeException -{ - private $process; - - public function __construct(Process $process) - { - $this->process = $process; - - parent::__construct(sprintf('The process has been signaled with signal "%s".', $process->getTermSignal())); - } - - public function getProcess(): Process - { - return $this->process; - } - - public function getSignal(): int - { - return $this->getProcess()->getTermSignal(); - } -} diff --git a/vendor/symfony/process/Exception/ProcessTimedOutException.php b/vendor/symfony/process/Exception/ProcessTimedOutException.php deleted file mode 100644 index 94391a4..0000000 --- a/vendor/symfony/process/Exception/ProcessTimedOutException.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -use Symfony\Component\Process\Process; - -/** - * Exception that is thrown when a process times out. - * - * @author Johannes M. Schmitt <schmittjoh@gmail.com> - */ -class ProcessTimedOutException extends RuntimeException -{ - public const TYPE_GENERAL = 1; - public const TYPE_IDLE = 2; - - private $process; - private $timeoutType; - - public function __construct(Process $process, int $timeoutType) - { - $this->process = $process; - $this->timeoutType = $timeoutType; - - parent::__construct(sprintf( - 'The process "%s" exceeded the timeout of %s seconds.', - $process->getCommandLine(), - $this->getExceededTimeout() - )); - } - - public function getProcess() - { - return $this->process; - } - - public function isGeneralTimeout() - { - return self::TYPE_GENERAL === $this->timeoutType; - } - - public function isIdleTimeout() - { - return self::TYPE_IDLE === $this->timeoutType; - } - - public function getExceededTimeout() - { - switch ($this->timeoutType) { - case self::TYPE_GENERAL: - return $this->process->getTimeout(); - - case self::TYPE_IDLE: - return $this->process->getIdleTimeout(); - - default: - throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)); - } - } -} diff --git a/vendor/symfony/process/Exception/RuntimeException.php b/vendor/symfony/process/Exception/RuntimeException.php deleted file mode 100644 index adead25..0000000 --- a/vendor/symfony/process/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Exception; - -/** - * RuntimeException for the Process Component. - * - * @author Johannes M. Schmitt <schmittjoh@gmail.com> - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/process/ExecutableFinder.php b/vendor/symfony/process/ExecutableFinder.php deleted file mode 100644 index e2dd064..0000000 --- a/vendor/symfony/process/ExecutableFinder.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -/** - * Generic executable finder. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Johannes M. Schmitt <schmittjoh@gmail.com> - */ -class ExecutableFinder -{ - private $suffixes = ['.exe', '.bat', '.cmd', '.com']; - - /** - * Replaces default suffixes of executable. - */ - public function setSuffixes(array $suffixes) - { - $this->suffixes = $suffixes; - } - - /** - * Adds new possible suffix to check for executable. - * - * @param string $suffix - */ - public function addSuffix($suffix) - { - $this->suffixes[] = $suffix; - } - - /** - * Finds an executable by name. - * - * @param string $name The executable name (without the extension) - * @param string|null $default The default to return if no executable is found - * @param array $extraDirs Additional dirs to check into - * - * @return string|null The executable path or default value - */ - public function find($name, $default = null, array $extraDirs = []) - { - if (\ini_get('open_basedir')) { - $searchPath = array_merge(explode(\PATH_SEPARATOR, \ini_get('open_basedir')), $extraDirs); - $dirs = []; - foreach ($searchPath as $path) { - // Silencing against https://bugs.php.net/69240 - if (@is_dir($path)) { - $dirs[] = $path; - } else { - if (basename($path) == $name && @is_executable($path)) { - return $path; - } - } - } - } else { - $dirs = array_merge( - explode(\PATH_SEPARATOR, getenv('PATH') ?: getenv('Path')), - $extraDirs - ); - } - - $suffixes = ['']; - if ('\\' === \DIRECTORY_SEPARATOR) { - $pathExt = getenv('PATHEXT'); - $suffixes = array_merge($pathExt ? explode(\PATH_SEPARATOR, $pathExt) : $this->suffixes, $suffixes); - } - foreach ($suffixes as $suffix) { - foreach ($dirs as $dir) { - if (@is_file($file = $dir.\DIRECTORY_SEPARATOR.$name.$suffix) && ('\\' === \DIRECTORY_SEPARATOR || @is_executable($file))) { - return $file; - } - } - } - - return $default; - } -} diff --git a/vendor/symfony/process/InputStream.php b/vendor/symfony/process/InputStream.php deleted file mode 100644 index 4f8f713..0000000 --- a/vendor/symfony/process/InputStream.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -use Symfony\Component\Process\Exception\RuntimeException; - -/** - * Provides a way to continuously write to the input of a Process until the InputStream is closed. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class InputStream implements \IteratorAggregate -{ - /** @var callable|null */ - private $onEmpty = null; - private $input = []; - private $open = true; - - /** - * Sets a callback that is called when the write buffer becomes empty. - */ - public function onEmpty(callable $onEmpty = null) - { - $this->onEmpty = $onEmpty; - } - - /** - * Appends an input to the write buffer. - * - * @param resource|string|int|float|bool|\Traversable|null $input The input to append as scalar, - * stream resource or \Traversable - */ - public function write($input) - { - if (null === $input) { - return; - } - if ($this->isClosed()) { - throw new RuntimeException(sprintf('"%s" is closed.', static::class)); - } - $this->input[] = ProcessUtils::validateInput(__METHOD__, $input); - } - - /** - * Closes the write buffer. - */ - public function close() - { - $this->open = false; - } - - /** - * Tells whether the write buffer is closed or not. - */ - public function isClosed() - { - return !$this->open; - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - $this->open = true; - - while ($this->open || $this->input) { - if (!$this->input) { - yield ''; - continue; - } - $current = array_shift($this->input); - - if ($current instanceof \Iterator) { - yield from $current; - } else { - yield $current; - } - if (!$this->input && $this->open && null !== $onEmpty = $this->onEmpty) { - $this->write($onEmpty($this)); - } - } - } -} diff --git a/vendor/symfony/process/LICENSE b/vendor/symfony/process/LICENSE deleted file mode 100644 index 88bf75b..0000000 --- a/vendor/symfony/process/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/process/PhpExecutableFinder.php b/vendor/symfony/process/PhpExecutableFinder.php deleted file mode 100644 index 92e0262..0000000 --- a/vendor/symfony/process/PhpExecutableFinder.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -/** - * An executable finder specifically designed for the PHP executable. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Johannes M. Schmitt <schmittjoh@gmail.com> - */ -class PhpExecutableFinder -{ - private $executableFinder; - - public function __construct() - { - $this->executableFinder = new ExecutableFinder(); - } - - /** - * Finds The PHP executable. - * - * @param bool $includeArgs Whether or not include command arguments - * - * @return string|false The PHP executable path or false if it cannot be found - */ - public function find($includeArgs = true) - { - if ($php = getenv('PHP_BINARY')) { - if (!is_executable($php)) { - $command = '\\' === \DIRECTORY_SEPARATOR ? 'where' : 'command -v'; - if ($php = strtok(exec($command.' '.escapeshellarg($php)), \PHP_EOL)) { - if (!is_executable($php)) { - return false; - } - } else { - return false; - } - } - - if (@is_dir($php)) { - return false; - } - - return $php; - } - - $args = $this->findArguments(); - $args = $includeArgs && $args ? ' '.implode(' ', $args) : ''; - - // PHP_BINARY return the current sapi executable - if (\PHP_BINARY && \in_array(\PHP_SAPI, ['cgi-fcgi', 'cli', 'cli-server', 'phpdbg'], true)) { - return \PHP_BINARY.$args; - } - - if ($php = getenv('PHP_PATH')) { - if (!@is_executable($php) || @is_dir($php)) { - return false; - } - - return $php; - } - - if ($php = getenv('PHP_PEAR_PHP_BIN')) { - if (@is_executable($php) && !@is_dir($php)) { - return $php; - } - } - - if (@is_executable($php = \PHP_BINDIR.('\\' === \DIRECTORY_SEPARATOR ? '\\php.exe' : '/php')) && !@is_dir($php)) { - return $php; - } - - $dirs = [\PHP_BINDIR]; - if ('\\' === \DIRECTORY_SEPARATOR) { - $dirs[] = 'C:\xampp\php\\'; - } - - return $this->executableFinder->find('php', false, $dirs); - } - - /** - * Finds the PHP executable arguments. - * - * @return array The PHP executable arguments - */ - public function findArguments() - { - $arguments = []; - if ('phpdbg' === \PHP_SAPI) { - $arguments[] = '-qrr'; - } - - return $arguments; - } -} diff --git a/vendor/symfony/process/PhpProcess.php b/vendor/symfony/process/PhpProcess.php deleted file mode 100644 index dc064e0..0000000 --- a/vendor/symfony/process/PhpProcess.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -use Symfony\Component\Process\Exception\LogicException; -use Symfony\Component\Process\Exception\RuntimeException; - -/** - * PhpProcess runs a PHP script in an independent process. - * - * $p = new PhpProcess('<?php echo "foo"; ?>'); - * $p->run(); - * print $p->getOutput()."\n"; - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class PhpProcess extends Process -{ - /** - * @param string $script The PHP script to run (as a string) - * @param string|null $cwd The working directory or null to use the working dir of the current PHP process - * @param array|null $env The environment variables or null to use the same environment as the current PHP process - * @param int $timeout The timeout in seconds - * @param array|null $php Path to the PHP binary to use with any additional arguments - */ - public function __construct(string $script, string $cwd = null, array $env = null, int $timeout = 60, array $php = null) - { - if (null === $php) { - $executableFinder = new PhpExecutableFinder(); - $php = $executableFinder->find(false); - $php = false === $php ? null : array_merge([$php], $executableFinder->findArguments()); - } - if ('phpdbg' === \PHP_SAPI) { - $file = tempnam(sys_get_temp_dir(), 'dbg'); - file_put_contents($file, $script); - register_shutdown_function('unlink', $file); - $php[] = $file; - $script = null; - } - - parent::__construct($php, $cwd, $env, $script, $timeout); - } - - /** - * {@inheritdoc} - */ - public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) - { - throw new LogicException(sprintf('The "%s()" method cannot be called when using "%s".', __METHOD__, self::class)); - } - - /** - * Sets the path to the PHP binary to use. - * - * @deprecated since Symfony 4.2, use the $php argument of the constructor instead. - */ - public function setPhpBinary($php) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the $php argument of the constructor instead.', __METHOD__), \E_USER_DEPRECATED); - - $this->setCommandLine($php); - } - - /** - * {@inheritdoc} - */ - public function start(callable $callback = null, array $env = []) - { - if (null === $this->getCommandLine()) { - throw new RuntimeException('Unable to find the PHP executable.'); - } - - parent::start($callback, $env); - } -} diff --git a/vendor/symfony/process/Pipes/AbstractPipes.php b/vendor/symfony/process/Pipes/AbstractPipes.php deleted file mode 100644 index 9532e3e..0000000 --- a/vendor/symfony/process/Pipes/AbstractPipes.php +++ /dev/null @@ -1,180 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Pipes; - -use Symfony\Component\Process\Exception\InvalidArgumentException; - -/** - * @author Romain Neutron <imprec@gmail.com> - * - * @internal - */ -abstract class AbstractPipes implements PipesInterface -{ - public $pipes = []; - - private $inputBuffer = ''; - private $input; - private $blocked = true; - private $lastError; - - /** - * @param resource|string|int|float|bool|\Iterator|null $input - */ - public function __construct($input) - { - if (\is_resource($input) || $input instanceof \Iterator) { - $this->input = $input; - } elseif (\is_string($input)) { - $this->inputBuffer = $input; - } else { - $this->inputBuffer = (string) $input; - } - } - - /** - * {@inheritdoc} - */ - public function close() - { - foreach ($this->pipes as $pipe) { - if (\is_resource($pipe)) { - fclose($pipe); - } - } - $this->pipes = []; - } - - /** - * Returns true if a system call has been interrupted. - */ - protected function hasSystemCallBeenInterrupted(): bool - { - $lastError = $this->lastError; - $this->lastError = null; - - // stream_select returns false when the `select` system call is interrupted by an incoming signal - return null !== $lastError && false !== stripos($lastError, 'interrupted system call'); - } - - /** - * Unblocks streams. - */ - protected function unblock() - { - if (!$this->blocked) { - return; - } - - foreach ($this->pipes as $pipe) { - stream_set_blocking($pipe, 0); - } - if (\is_resource($this->input)) { - stream_set_blocking($this->input, 0); - } - - $this->blocked = false; - } - - /** - * Writes input to stdin. - * - * @throws InvalidArgumentException When an input iterator yields a non supported value - */ - protected function write(): ?array - { - if (!isset($this->pipes[0])) { - return null; - } - $input = $this->input; - - if ($input instanceof \Iterator) { - if (!$input->valid()) { - $input = null; - } elseif (\is_resource($input = $input->current())) { - stream_set_blocking($input, 0); - } elseif (!isset($this->inputBuffer[0])) { - if (!\is_string($input)) { - if (!\is_scalar($input)) { - throw new InvalidArgumentException(sprintf('"%s" yielded a value of type "%s", but only scalars and stream resources are supported.', \get_class($this->input), \gettype($input))); - } - $input = (string) $input; - } - $this->inputBuffer = $input; - $this->input->next(); - $input = null; - } else { - $input = null; - } - } - - $r = $e = []; - $w = [$this->pipes[0]]; - - // let's have a look if something changed in streams - if (false === @stream_select($r, $w, $e, 0, 0)) { - return null; - } - - foreach ($w as $stdin) { - if (isset($this->inputBuffer[0])) { - $written = fwrite($stdin, $this->inputBuffer); - $this->inputBuffer = substr($this->inputBuffer, $written); - if (isset($this->inputBuffer[0])) { - return [$this->pipes[0]]; - } - } - - if ($input) { - while (true) { - $data = fread($input, self::CHUNK_SIZE); - if (!isset($data[0])) { - break; - } - $written = fwrite($stdin, $data); - $data = substr($data, $written); - if (isset($data[0])) { - $this->inputBuffer = $data; - - return [$this->pipes[0]]; - } - } - if (feof($input)) { - if ($this->input instanceof \Iterator) { - $this->input->next(); - } else { - $this->input = null; - } - } - } - } - - // no input to read on resource, buffer is empty - if (!isset($this->inputBuffer[0]) && !($this->input instanceof \Iterator ? $this->input->valid() : $this->input)) { - $this->input = null; - fclose($this->pipes[0]); - unset($this->pipes[0]); - } elseif (!$w) { - return [$this->pipes[0]]; - } - - return null; - } - - /** - * @internal - */ - public function handleError(int $type, string $msg) - { - $this->lastError = $msg; - } -} diff --git a/vendor/symfony/process/Pipes/PipesInterface.php b/vendor/symfony/process/Pipes/PipesInterface.php deleted file mode 100644 index 50eb5c4..0000000 --- a/vendor/symfony/process/Pipes/PipesInterface.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Pipes; - -/** - * PipesInterface manages descriptors and pipes for the use of proc_open. - * - * @author Romain Neutron <imprec@gmail.com> - * - * @internal - */ -interface PipesInterface -{ - public const CHUNK_SIZE = 16384; - - /** - * Returns an array of descriptors for the use of proc_open. - */ - public function getDescriptors(): array; - - /** - * Returns an array of filenames indexed by their related stream in case these pipes use temporary files. - * - * @return string[] - */ - public function getFiles(): array; - - /** - * Reads data in file handles and pipes. - * - * @param bool $blocking Whether to use blocking calls or not - * @param bool $close Whether to close pipes if they've reached EOF - * - * @return string[] An array of read data indexed by their fd - */ - public function readAndWrite(bool $blocking, bool $close = false): array; - - /** - * Returns if the current state has open file handles or pipes. - */ - public function areOpen(): bool; - - /** - * Returns if pipes are able to read output. - */ - public function haveReadSupport(): bool; - - /** - * Closes file handles and pipes. - */ - public function close(); -} diff --git a/vendor/symfony/process/Pipes/UnixPipes.php b/vendor/symfony/process/Pipes/UnixPipes.php deleted file mode 100644 index 58a8da0..0000000 --- a/vendor/symfony/process/Pipes/UnixPipes.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Pipes; - -use Symfony\Component\Process\Process; - -/** - * UnixPipes implementation uses unix pipes as handles. - * - * @author Romain Neutron <imprec@gmail.com> - * - * @internal - */ -class UnixPipes extends AbstractPipes -{ - private $ttyMode; - private $ptyMode; - private $haveReadSupport; - - public function __construct(?bool $ttyMode, bool $ptyMode, $input, bool $haveReadSupport) - { - $this->ttyMode = $ttyMode; - $this->ptyMode = $ptyMode; - $this->haveReadSupport = $haveReadSupport; - - parent::__construct($input); - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->close(); - } - - /** - * {@inheritdoc} - */ - public function getDescriptors(): array - { - if (!$this->haveReadSupport) { - $nullstream = fopen('/dev/null', 'c'); - - return [ - ['pipe', 'r'], - $nullstream, - $nullstream, - ]; - } - - if ($this->ttyMode) { - return [ - ['file', '/dev/tty', 'r'], - ['file', '/dev/tty', 'w'], - ['file', '/dev/tty', 'w'], - ]; - } - - if ($this->ptyMode && Process::isPtySupported()) { - return [ - ['pty'], - ['pty'], - ['pty'], - ]; - } - - return [ - ['pipe', 'r'], - ['pipe', 'w'], // stdout - ['pipe', 'w'], // stderr - ]; - } - - /** - * {@inheritdoc} - */ - public function getFiles(): array - { - return []; - } - - /** - * {@inheritdoc} - */ - public function readAndWrite(bool $blocking, bool $close = false): array - { - $this->unblock(); - $w = $this->write(); - - $read = $e = []; - $r = $this->pipes; - unset($r[0]); - - // let's have a look if something changed in streams - set_error_handler([$this, 'handleError']); - if (($r || $w) && false === stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { - restore_error_handler(); - // if a system call has been interrupted, forget about it, let's try again - // otherwise, an error occurred, let's reset pipes - if (!$this->hasSystemCallBeenInterrupted()) { - $this->pipes = []; - } - - return $read; - } - restore_error_handler(); - - foreach ($r as $pipe) { - // prior PHP 5.4 the array passed to stream_select is modified and - // lose key association, we have to find back the key - $read[$type = array_search($pipe, $this->pipes, true)] = ''; - - do { - $data = @fread($pipe, self::CHUNK_SIZE); - $read[$type] .= $data; - } while (isset($data[0]) && ($close || isset($data[self::CHUNK_SIZE - 1]))); - - if (!isset($read[$type][0])) { - unset($read[$type]); - } - - if ($close && feof($pipe)) { - fclose($pipe); - unset($this->pipes[$type]); - } - } - - return $read; - } - - /** - * {@inheritdoc} - */ - public function haveReadSupport(): bool - { - return $this->haveReadSupport; - } - - /** - * {@inheritdoc} - */ - public function areOpen(): bool - { - return (bool) $this->pipes; - } -} diff --git a/vendor/symfony/process/Pipes/WindowsPipes.php b/vendor/symfony/process/Pipes/WindowsPipes.php deleted file mode 100644 index 69768f3..0000000 --- a/vendor/symfony/process/Pipes/WindowsPipes.php +++ /dev/null @@ -1,207 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Pipes; - -use Symfony\Component\Process\Exception\RuntimeException; -use Symfony\Component\Process\Process; - -/** - * WindowsPipes implementation uses temporary files as handles. - * - * @see https://bugs.php.net/51800 - * @see https://bugs.php.net/65650 - * - * @author Romain Neutron <imprec@gmail.com> - * - * @internal - */ -class WindowsPipes extends AbstractPipes -{ - private $files = []; - private $fileHandles = []; - private $lockHandles = []; - private $readBytes = [ - Process::STDOUT => 0, - Process::STDERR => 0, - ]; - private $haveReadSupport; - - public function __construct($input, bool $haveReadSupport) - { - $this->haveReadSupport = $haveReadSupport; - - if ($this->haveReadSupport) { - // Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big. - // Workaround for this problem is to use temporary files instead of pipes on Windows platform. - // - // @see https://bugs.php.net/51800 - $pipes = [ - Process::STDOUT => Process::OUT, - Process::STDERR => Process::ERR, - ]; - $tmpDir = sys_get_temp_dir(); - $lastError = 'unknown reason'; - set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; }); - for ($i = 0;; ++$i) { - foreach ($pipes as $pipe => $name) { - $file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name); - - if (!$h = fopen($file.'.lock', 'w')) { - if (file_exists($file.'.lock')) { - continue 2; - } - restore_error_handler(); - throw new RuntimeException('A temporary file could not be opened to write the process output: '.$lastError); - } - if (!flock($h, \LOCK_EX | \LOCK_NB)) { - continue 2; - } - if (isset($this->lockHandles[$pipe])) { - flock($this->lockHandles[$pipe], \LOCK_UN); - fclose($this->lockHandles[$pipe]); - } - $this->lockHandles[$pipe] = $h; - - if (!($h = fopen($file, 'w')) || !fclose($h) || !$h = fopen($file, 'r')) { - flock($this->lockHandles[$pipe], \LOCK_UN); - fclose($this->lockHandles[$pipe]); - unset($this->lockHandles[$pipe]); - continue 2; - } - $this->fileHandles[$pipe] = $h; - $this->files[$pipe] = $file; - } - break; - } - restore_error_handler(); - } - - parent::__construct($input); - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->close(); - } - - /** - * {@inheritdoc} - */ - public function getDescriptors(): array - { - if (!$this->haveReadSupport) { - $nullstream = fopen('NUL', 'c'); - - return [ - ['pipe', 'r'], - $nullstream, - $nullstream, - ]; - } - - // We're not using pipe on Windows platform as it hangs (https://bugs.php.net/51800) - // We're not using file handles as it can produce corrupted output https://bugs.php.net/65650 - // So we redirect output within the commandline and pass the nul device to the process - return [ - ['pipe', 'r'], - ['file', 'NUL', 'w'], - ['file', 'NUL', 'w'], - ]; - } - - /** - * {@inheritdoc} - */ - public function getFiles(): array - { - return $this->files; - } - - /** - * {@inheritdoc} - */ - public function readAndWrite(bool $blocking, bool $close = false): array - { - $this->unblock(); - $w = $this->write(); - $read = $r = $e = []; - - if ($blocking) { - if ($w) { - @stream_select($r, $w, $e, 0, Process::TIMEOUT_PRECISION * 1E6); - } elseif ($this->fileHandles) { - usleep(Process::TIMEOUT_PRECISION * 1E6); - } - } - foreach ($this->fileHandles as $type => $fileHandle) { - $data = stream_get_contents($fileHandle, -1, $this->readBytes[$type]); - - if (isset($data[0])) { - $this->readBytes[$type] += \strlen($data); - $read[$type] = $data; - } - if ($close) { - ftruncate($fileHandle, 0); - fclose($fileHandle); - flock($this->lockHandles[$type], \LOCK_UN); - fclose($this->lockHandles[$type]); - unset($this->fileHandles[$type], $this->lockHandles[$type]); - } - } - - return $read; - } - - /** - * {@inheritdoc} - */ - public function haveReadSupport(): bool - { - return $this->haveReadSupport; - } - - /** - * {@inheritdoc} - */ - public function areOpen(): bool - { - return $this->pipes && $this->fileHandles; - } - - /** - * {@inheritdoc} - */ - public function close() - { - parent::close(); - foreach ($this->fileHandles as $type => $handle) { - ftruncate($handle, 0); - fclose($handle); - flock($this->lockHandles[$type], \LOCK_UN); - fclose($this->lockHandles[$type]); - } - $this->fileHandles = $this->lockHandles = []; - } -} diff --git a/vendor/symfony/process/Process.php b/vendor/symfony/process/Process.php deleted file mode 100644 index 09cd960..0000000 --- a/vendor/symfony/process/Process.php +++ /dev/null @@ -1,1662 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -use Symfony\Component\Process\Exception\InvalidArgumentException; -use Symfony\Component\Process\Exception\LogicException; -use Symfony\Component\Process\Exception\ProcessFailedException; -use Symfony\Component\Process\Exception\ProcessSignaledException; -use Symfony\Component\Process\Exception\ProcessTimedOutException; -use Symfony\Component\Process\Exception\RuntimeException; -use Symfony\Component\Process\Pipes\PipesInterface; -use Symfony\Component\Process\Pipes\UnixPipes; -use Symfony\Component\Process\Pipes\WindowsPipes; - -/** - * Process is a thin wrapper around proc_* functions to easily - * start independent PHP processes. - * - * @author Fabien Potencier <fabien@symfony.com> - * @author Romain Neutron <imprec@gmail.com> - */ -class Process implements \IteratorAggregate -{ - public const ERR = 'err'; - public const OUT = 'out'; - - public const STATUS_READY = 'ready'; - public const STATUS_STARTED = 'started'; - public const STATUS_TERMINATED = 'terminated'; - - public const STDIN = 0; - public const STDOUT = 1; - public const STDERR = 2; - - // Timeout Precision in seconds. - public const TIMEOUT_PRECISION = 0.2; - - public const ITER_NON_BLOCKING = 1; // By default, iterating over outputs is a blocking call, use this flag to make it non-blocking - public const ITER_KEEP_OUTPUT = 2; // By default, outputs are cleared while iterating, use this flag to keep them in memory - public const ITER_SKIP_OUT = 4; // Use this flag to skip STDOUT while iterating - public const ITER_SKIP_ERR = 8; // Use this flag to skip STDERR while iterating - - private $callback; - private $hasCallback = false; - private $commandline; - private $cwd; - private $env = []; - private $input; - private $starttime; - private $lastOutputTime; - private $timeout; - private $idleTimeout; - private $exitcode; - private $fallbackStatus = []; - private $processInformation; - private $outputDisabled = false; - private $stdout; - private $stderr; - private $process; - private $status = self::STATUS_READY; - private $incrementalOutputOffset = 0; - private $incrementalErrorOutputOffset = 0; - private $tty = false; - private $pty; - - private $useFileHandles = false; - /** @var PipesInterface */ - private $processPipes; - - private $latestSignal; - - private static $sigchild; - - /** - * Exit codes translation table. - * - * User-defined errors must use exit codes in the 64-113 range. - */ - public static $exitCodes = [ - 0 => 'OK', - 1 => 'General error', - 2 => 'Misuse of shell builtins', - - 126 => 'Invoked command cannot execute', - 127 => 'Command not found', - 128 => 'Invalid exit argument', - - // signals - 129 => 'Hangup', - 130 => 'Interrupt', - 131 => 'Quit and dump core', - 132 => 'Illegal instruction', - 133 => 'Trace/breakpoint trap', - 134 => 'Process aborted', - 135 => 'Bus error: "access to undefined portion of memory object"', - 136 => 'Floating point exception: "erroneous arithmetic operation"', - 137 => 'Kill (terminate immediately)', - 138 => 'User-defined 1', - 139 => 'Segmentation violation', - 140 => 'User-defined 2', - 141 => 'Write to pipe with no one reading', - 142 => 'Signal raised by alarm', - 143 => 'Termination (request to terminate)', - // 144 - not defined - 145 => 'Child process terminated, stopped (or continued*)', - 146 => 'Continue if stopped', - 147 => 'Stop executing temporarily', - 148 => 'Terminal stop signal', - 149 => 'Background process attempting to read from tty ("in")', - 150 => 'Background process attempting to write to tty ("out")', - 151 => 'Urgent data available on socket', - 152 => 'CPU time limit exceeded', - 153 => 'File size limit exceeded', - 154 => 'Signal raised by timer counting virtual time: "virtual timer expired"', - 155 => 'Profiling timer expired', - // 156 - not defined - 157 => 'Pollable event', - // 158 - not defined - 159 => 'Bad syscall', - ]; - - /** - * @param array $command The command to run and its arguments listed as separate entries - * @param string|null $cwd The working directory or null to use the working dir of the current PHP process - * @param array|null $env The environment variables or null to use the same environment as the current PHP process - * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input - * @param int|float|null $timeout The timeout in seconds or null to disable - * - * @throws LogicException When proc_open is not installed - */ - public function __construct($command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) - { - if (!\function_exists('proc_open')) { - throw new LogicException('The Process class relies on proc_open, which is not available on your PHP installation.'); - } - - if (!\is_array($command)) { - @trigger_error(sprintf('Passing a command as string when creating a "%s" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell.', __CLASS__), \E_USER_DEPRECATED); - } - - $this->commandline = $command; - $this->cwd = $cwd; - - // on Windows, if the cwd changed via chdir(), proc_open defaults to the dir where PHP was started - // on Gnu/Linux, PHP builds with --enable-maintainer-zts are also affected - // @see : https://bugs.php.net/51800 - // @see : https://bugs.php.net/50524 - if (null === $this->cwd && (\defined('ZEND_THREAD_SAFE') || '\\' === \DIRECTORY_SEPARATOR)) { - $this->cwd = getcwd(); - } - if (null !== $env) { - $this->setEnv($env); - } - - $this->setInput($input); - $this->setTimeout($timeout); - $this->useFileHandles = '\\' === \DIRECTORY_SEPARATOR; - $this->pty = false; - } - - /** - * Creates a Process instance as a command-line to be run in a shell wrapper. - * - * Command-lines are parsed by the shell of your OS (/bin/sh on Unix-like, cmd.exe on Windows.) - * This allows using e.g. pipes or conditional execution. In this mode, signals are sent to the - * shell wrapper and not to your commands. - * - * In order to inject dynamic values into command-lines, we strongly recommend using placeholders. - * This will save escaping values, which is not portable nor secure anyway: - * - * $process = Process::fromShellCommandline('my_command "${:MY_VAR}"'); - * $process->run(null, ['MY_VAR' => $theValue]); - * - * @param string $command The command line to pass to the shell of the OS - * @param string|null $cwd The working directory or null to use the working dir of the current PHP process - * @param array|null $env The environment variables or null to use the same environment as the current PHP process - * @param mixed $input The input as stream resource, scalar or \Traversable, or null for no input - * @param int|float|null $timeout The timeout in seconds or null to disable - * - * @return static - * - * @throws LogicException When proc_open is not installed - */ - public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60) - { - $process = new static([], $cwd, $env, $input, $timeout); - $process->commandline = $command; - - return $process; - } - - /** - * @return array - */ - public function __sleep() - { - throw new \BadMethodCallException('Cannot serialize '.__CLASS__); - } - - public function __wakeup() - { - throw new \BadMethodCallException('Cannot unserialize '.__CLASS__); - } - - public function __destruct() - { - $this->stop(0); - } - - public function __clone() - { - $this->resetProcessData(); - } - - /** - * Runs the process. - * - * The callback receives the type of output (out or err) and - * some bytes from the output in real-time. It allows to have feedback - * from the independent process during execution. - * - * The STDOUT and STDERR are also available after the process is finished - * via the getOutput() and getErrorOutput() methods. - * - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @return int The exit status code - * - * @throws RuntimeException When process can't be launched - * @throws RuntimeException When process is already running - * @throws ProcessTimedOutException When process timed out - * @throws ProcessSignaledException When process stopped after receiving signal - * @throws LogicException In case a callback is provided and output has been disabled - * - * @final - */ - public function run(callable $callback = null, array $env = []): int - { - $this->start($callback, $env); - - return $this->wait(); - } - - /** - * Runs the process. - * - * This is identical to run() except that an exception is thrown if the process - * exits with a non-zero exit code. - * - * @return $this - * - * @throws ProcessFailedException if the process didn't terminate successfully - * - * @final - */ - public function mustRun(callable $callback = null, array $env = []): self - { - if (0 !== $this->run($callback, $env)) { - throw new ProcessFailedException($this); - } - - return $this; - } - - /** - * Starts the process and returns after writing the input to STDIN. - * - * This method blocks until all STDIN data is sent to the process then it - * returns while the process runs in the background. - * - * The termination of the process can be awaited with wait(). - * - * The callback receives the type of output (out or err) and some bytes from - * the output in real-time while writing the standard input to the process. - * It allows to have feedback from the independent process during execution. - * - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @throws RuntimeException When process can't be launched - * @throws RuntimeException When process is already running - * @throws LogicException In case a callback is provided and output has been disabled - */ - public function start(callable $callback = null, array $env = []) - { - if ($this->isRunning()) { - throw new RuntimeException('Process is already running.'); - } - - $this->resetProcessData(); - $this->starttime = $this->lastOutputTime = microtime(true); - $this->callback = $this->buildCallback($callback); - $this->hasCallback = null !== $callback; - $descriptors = $this->getDescriptors(); - - if ($this->env) { - $env += '\\' === \DIRECTORY_SEPARATOR ? array_diff_ukey($this->env, $env, 'strcasecmp') : $this->env; - } - - $env += '\\' === \DIRECTORY_SEPARATOR ? array_diff_ukey($this->getDefaultEnv(), $env, 'strcasecmp') : $this->getDefaultEnv(); - - if (\is_array($commandline = $this->commandline)) { - $commandline = implode(' ', array_map([$this, 'escapeArgument'], $commandline)); - - if ('\\' !== \DIRECTORY_SEPARATOR) { - // exec is mandatory to deal with sending a signal to the process - $commandline = 'exec '.$commandline; - } - } else { - $commandline = $this->replacePlaceholders($commandline, $env); - } - - $options = ['suppress_errors' => true]; - - if ('\\' === \DIRECTORY_SEPARATOR) { - $options['bypass_shell'] = true; - $commandline = $this->prepareWindowsCommandLine($commandline, $env); - } elseif (!$this->useFileHandles && $this->isSigchildEnabled()) { - // last exit code is output on the fourth pipe and caught to work around --enable-sigchild - $descriptors[3] = ['pipe', 'w']; - - // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input - $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;'; - $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code'; - - // Workaround for the bug, when PTS functionality is enabled. - // @see : https://bugs.php.net/69442 - $ptsWorkaround = fopen(__FILE__, 'r'); - } - - $envPairs = []; - foreach ($env as $k => $v) { - if (false !== $v && false === \in_array($k, ['argc', 'argv', 'ARGC', 'ARGV'], true)) { - $envPairs[] = $k.'='.$v; - } - } - - if (!is_dir($this->cwd)) { - throw new RuntimeException(sprintf('The provided cwd "%s" does not exist.', $this->cwd)); - } - - $this->process = @proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $options); - - if (!\is_resource($this->process)) { - throw new RuntimeException('Unable to launch a new process.'); - } - $this->status = self::STATUS_STARTED; - - if (isset($descriptors[3])) { - $this->fallbackStatus['pid'] = (int) fgets($this->processPipes->pipes[3]); - } - - if ($this->tty) { - return; - } - - $this->updateStatus(false); - $this->checkTimeout(); - } - - /** - * Restarts the process. - * - * Be warned that the process is cloned before being started. - * - * @param callable|null $callback A PHP callback to run whenever there is some - * output available on STDOUT or STDERR - * - * @return static - * - * @throws RuntimeException When process can't be launched - * @throws RuntimeException When process is already running - * - * @see start() - * - * @final - */ - public function restart(callable $callback = null, array $env = []): self - { - if ($this->isRunning()) { - throw new RuntimeException('Process is already running.'); - } - - $process = clone $this; - $process->start($callback, $env); - - return $process; - } - - /** - * Waits for the process to terminate. - * - * The callback receives the type of output (out or err) and some bytes - * from the output in real-time while writing the standard input to the process. - * It allows to have feedback from the independent process during execution. - * - * @param callable|null $callback A valid PHP callback - * - * @return int The exitcode of the process - * - * @throws ProcessTimedOutException When process timed out - * @throws ProcessSignaledException When process stopped after receiving signal - * @throws LogicException When process is not yet started - */ - public function wait(callable $callback = null) - { - $this->requireProcessIsStarted(__FUNCTION__); - - $this->updateStatus(false); - - if (null !== $callback) { - if (!$this->processPipes->haveReadSupport()) { - $this->stop(0); - throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::wait".'); - } - $this->callback = $this->buildCallback($callback); - } - - do { - $this->checkTimeout(); - $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); - $this->readPipes($running, '\\' !== \DIRECTORY_SEPARATOR || !$running); - } while ($running); - - while ($this->isRunning()) { - $this->checkTimeout(); - usleep(1000); - } - - if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) { - throw new ProcessSignaledException($this); - } - - return $this->exitcode; - } - - /** - * Waits until the callback returns true. - * - * The callback receives the type of output (out or err) and some bytes - * from the output in real-time while writing the standard input to the process. - * It allows to have feedback from the independent process during execution. - * - * @throws RuntimeException When process timed out - * @throws LogicException When process is not yet started - * @throws ProcessTimedOutException In case the timeout was reached - */ - public function waitUntil(callable $callback): bool - { - $this->requireProcessIsStarted(__FUNCTION__); - $this->updateStatus(false); - - if (!$this->processPipes->haveReadSupport()) { - $this->stop(0); - throw new LogicException('Pass the callback to the "Process::start" method or call enableOutput to use a callback with "Process::waitUntil".'); - } - $callback = $this->buildCallback($callback); - - $ready = false; - while (true) { - $this->checkTimeout(); - $running = '\\' === \DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); - $output = $this->processPipes->readAndWrite($running, '\\' !== \DIRECTORY_SEPARATOR || !$running); - - foreach ($output as $type => $data) { - if (3 !== $type) { - $ready = $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data) || $ready; - } elseif (!isset($this->fallbackStatus['signaled'])) { - $this->fallbackStatus['exitcode'] = (int) $data; - } - } - if ($ready) { - return true; - } - if (!$running) { - return false; - } - - usleep(1000); - } - } - - /** - * Returns the Pid (process identifier), if applicable. - * - * @return int|null The process id if running, null otherwise - */ - public function getPid() - { - return $this->isRunning() ? $this->processInformation['pid'] : null; - } - - /** - * Sends a POSIX signal to the process. - * - * @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants) - * - * @return $this - * - * @throws LogicException In case the process is not running - * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed - * @throws RuntimeException In case of failure - */ - public function signal($signal) - { - $this->doSignal($signal, true); - - return $this; - } - - /** - * Disables fetching output and error output from the underlying process. - * - * @return $this - * - * @throws RuntimeException In case the process is already running - * @throws LogicException if an idle timeout is set - */ - public function disableOutput() - { - if ($this->isRunning()) { - throw new RuntimeException('Disabling output while the process is running is not possible.'); - } - if (null !== $this->idleTimeout) { - throw new LogicException('Output can not be disabled while an idle timeout is set.'); - } - - $this->outputDisabled = true; - - return $this; - } - - /** - * Enables fetching output and error output from the underlying process. - * - * @return $this - * - * @throws RuntimeException In case the process is already running - */ - public function enableOutput() - { - if ($this->isRunning()) { - throw new RuntimeException('Enabling output while the process is running is not possible.'); - } - - $this->outputDisabled = false; - - return $this; - } - - /** - * Returns true in case the output is disabled, false otherwise. - * - * @return bool - */ - public function isOutputDisabled() - { - return $this->outputDisabled; - } - - /** - * Returns the current output of the process (STDOUT). - * - * @return string The process output - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - */ - public function getOutput() - { - $this->readPipesForOutput(__FUNCTION__); - - if (false === $ret = stream_get_contents($this->stdout, -1, 0)) { - return ''; - } - - return $ret; - } - - /** - * Returns the output incrementally. - * - * In comparison with the getOutput method which always return the whole - * output, this one returns the new output since the last call. - * - * @return string The process output since the last call - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - */ - public function getIncrementalOutput() - { - $this->readPipesForOutput(__FUNCTION__); - - $latest = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); - $this->incrementalOutputOffset = ftell($this->stdout); - - if (false === $latest) { - return ''; - } - - return $latest; - } - - /** - * Returns an iterator to the output of the process, with the output type as keys (Process::OUT/ERR). - * - * @param int $flags A bit field of Process::ITER_* flags - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - * - * @return \Generator - */ - #[\ReturnTypeWillChange] - public function getIterator($flags = 0) - { - $this->readPipesForOutput(__FUNCTION__, false); - - $clearOutput = !(self::ITER_KEEP_OUTPUT & $flags); - $blocking = !(self::ITER_NON_BLOCKING & $flags); - $yieldOut = !(self::ITER_SKIP_OUT & $flags); - $yieldErr = !(self::ITER_SKIP_ERR & $flags); - - while (null !== $this->callback || ($yieldOut && !feof($this->stdout)) || ($yieldErr && !feof($this->stderr))) { - if ($yieldOut) { - $out = stream_get_contents($this->stdout, -1, $this->incrementalOutputOffset); - - if (isset($out[0])) { - if ($clearOutput) { - $this->clearOutput(); - } else { - $this->incrementalOutputOffset = ftell($this->stdout); - } - - yield self::OUT => $out; - } - } - - if ($yieldErr) { - $err = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset); - - if (isset($err[0])) { - if ($clearOutput) { - $this->clearErrorOutput(); - } else { - $this->incrementalErrorOutputOffset = ftell($this->stderr); - } - - yield self::ERR => $err; - } - } - - if (!$blocking && !isset($out[0]) && !isset($err[0])) { - yield self::OUT => ''; - } - - $this->checkTimeout(); - $this->readPipesForOutput(__FUNCTION__, $blocking); - } - } - - /** - * Clears the process output. - * - * @return $this - */ - public function clearOutput() - { - ftruncate($this->stdout, 0); - fseek($this->stdout, 0); - $this->incrementalOutputOffset = 0; - - return $this; - } - - /** - * Returns the current error output of the process (STDERR). - * - * @return string The process error output - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - */ - public function getErrorOutput() - { - $this->readPipesForOutput(__FUNCTION__); - - if (false === $ret = stream_get_contents($this->stderr, -1, 0)) { - return ''; - } - - return $ret; - } - - /** - * Returns the errorOutput incrementally. - * - * In comparison with the getErrorOutput method which always return the - * whole error output, this one returns the new error output since the last - * call. - * - * @return string The process error output since the last call - * - * @throws LogicException in case the output has been disabled - * @throws LogicException In case the process is not started - */ - public function getIncrementalErrorOutput() - { - $this->readPipesForOutput(__FUNCTION__); - - $latest = stream_get_contents($this->stderr, -1, $this->incrementalErrorOutputOffset); - $this->incrementalErrorOutputOffset = ftell($this->stderr); - - if (false === $latest) { - return ''; - } - - return $latest; - } - - /** - * Clears the process output. - * - * @return $this - */ - public function clearErrorOutput() - { - ftruncate($this->stderr, 0); - fseek($this->stderr, 0); - $this->incrementalErrorOutputOffset = 0; - - return $this; - } - - /** - * Returns the exit code returned by the process. - * - * @return int|null The exit status code, null if the Process is not terminated - */ - public function getExitCode() - { - $this->updateStatus(false); - - return $this->exitcode; - } - - /** - * Returns a string representation for the exit code returned by the process. - * - * This method relies on the Unix exit code status standardization - * and might not be relevant for other operating systems. - * - * @return string|null A string representation for the exit status code, null if the Process is not terminated - * - * @see http://tldp.org/LDP/abs/html/exitcodes.html - * @see http://en.wikipedia.org/wiki/Unix_signal - */ - public function getExitCodeText() - { - if (null === $exitcode = $this->getExitCode()) { - return null; - } - - return self::$exitCodes[$exitcode] ?? 'Unknown error'; - } - - /** - * Checks if the process ended successfully. - * - * @return bool true if the process ended successfully, false otherwise - */ - public function isSuccessful() - { - return 0 === $this->getExitCode(); - } - - /** - * Returns true if the child process has been terminated by an uncaught signal. - * - * It always returns false on Windows. - * - * @return bool - * - * @throws LogicException In case the process is not terminated - */ - public function hasBeenSignaled() - { - $this->requireProcessIsTerminated(__FUNCTION__); - - return $this->processInformation['signaled']; - } - - /** - * Returns the number of the signal that caused the child process to terminate its execution. - * - * It is only meaningful if hasBeenSignaled() returns true. - * - * @return int - * - * @throws RuntimeException In case --enable-sigchild is activated - * @throws LogicException In case the process is not terminated - */ - public function getTermSignal() - { - $this->requireProcessIsTerminated(__FUNCTION__); - - if ($this->isSigchildEnabled() && -1 === $this->processInformation['termsig']) { - throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.'); - } - - return $this->processInformation['termsig']; - } - - /** - * Returns true if the child process has been stopped by a signal. - * - * It always returns false on Windows. - * - * @return bool - * - * @throws LogicException In case the process is not terminated - */ - public function hasBeenStopped() - { - $this->requireProcessIsTerminated(__FUNCTION__); - - return $this->processInformation['stopped']; - } - - /** - * Returns the number of the signal that caused the child process to stop its execution. - * - * It is only meaningful if hasBeenStopped() returns true. - * - * @return int - * - * @throws LogicException In case the process is not terminated - */ - public function getStopSignal() - { - $this->requireProcessIsTerminated(__FUNCTION__); - - return $this->processInformation['stopsig']; - } - - /** - * Checks if the process is currently running. - * - * @return bool true if the process is currently running, false otherwise - */ - public function isRunning() - { - if (self::STATUS_STARTED !== $this->status) { - return false; - } - - $this->updateStatus(false); - - return $this->processInformation['running']; - } - - /** - * Checks if the process has been started with no regard to the current state. - * - * @return bool true if status is ready, false otherwise - */ - public function isStarted() - { - return self::STATUS_READY != $this->status; - } - - /** - * Checks if the process is terminated. - * - * @return bool true if process is terminated, false otherwise - */ - public function isTerminated() - { - $this->updateStatus(false); - - return self::STATUS_TERMINATED == $this->status; - } - - /** - * Gets the process status. - * - * The status is one of: ready, started, terminated. - * - * @return string The current process status - */ - public function getStatus() - { - $this->updateStatus(false); - - return $this->status; - } - - /** - * Stops the process. - * - * @param int|float $timeout The timeout in seconds - * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9) - * - * @return int|null The exit-code of the process or null if it's not running - */ - public function stop($timeout = 10, $signal = null) - { - $timeoutMicro = microtime(true) + $timeout; - if ($this->isRunning()) { - // given SIGTERM may not be defined and that "proc_terminate" uses the constant value and not the constant itself, we use the same here - $this->doSignal(15, false); - do { - usleep(1000); - } while ($this->isRunning() && microtime(true) < $timeoutMicro); - - if ($this->isRunning()) { - // Avoid exception here: process is supposed to be running, but it might have stopped just - // after this line. In any case, let's silently discard the error, we cannot do anything. - $this->doSignal($signal ?: 9, false); - } - } - - if ($this->isRunning()) { - if (isset($this->fallbackStatus['pid'])) { - unset($this->fallbackStatus['pid']); - - return $this->stop(0, $signal); - } - $this->close(); - } - - return $this->exitcode; - } - - /** - * Adds a line to the STDOUT stream. - * - * @internal - */ - public function addOutput(string $line) - { - $this->lastOutputTime = microtime(true); - - fseek($this->stdout, 0, \SEEK_END); - fwrite($this->stdout, $line); - fseek($this->stdout, $this->incrementalOutputOffset); - } - - /** - * Adds a line to the STDERR stream. - * - * @internal - */ - public function addErrorOutput(string $line) - { - $this->lastOutputTime = microtime(true); - - fseek($this->stderr, 0, \SEEK_END); - fwrite($this->stderr, $line); - fseek($this->stderr, $this->incrementalErrorOutputOffset); - } - - /** - * Gets the last output time in seconds. - */ - public function getLastOutputTime(): ?float - { - return $this->lastOutputTime; - } - - /** - * Gets the command line to be executed. - * - * @return string The command to execute - */ - public function getCommandLine() - { - return \is_array($this->commandline) ? implode(' ', array_map([$this, 'escapeArgument'], $this->commandline)) : $this->commandline; - } - - /** - * Sets the command line to be executed. - * - * @param string|array $commandline The command to execute - * - * @return $this - * - * @deprecated since Symfony 4.2. - */ - public function setCommandLine($commandline) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2.', __METHOD__), \E_USER_DEPRECATED); - - $this->commandline = $commandline; - - return $this; - } - - /** - * Gets the process timeout (max. runtime). - * - * @return float|null The timeout in seconds or null if it's disabled - */ - public function getTimeout() - { - return $this->timeout; - } - - /** - * Gets the process idle timeout (max. time since last output). - * - * @return float|null The timeout in seconds or null if it's disabled - */ - public function getIdleTimeout() - { - return $this->idleTimeout; - } - - /** - * Sets the process timeout (max. runtime) in seconds. - * - * To disable the timeout, set this value to null. - * - * @param int|float|null $timeout The timeout in seconds - * - * @return $this - * - * @throws InvalidArgumentException if the timeout is negative - */ - public function setTimeout($timeout) - { - $this->timeout = $this->validateTimeout($timeout); - - return $this; - } - - /** - * Sets the process idle timeout (max. time since last output). - * - * To disable the timeout, set this value to null. - * - * @param int|float|null $timeout The timeout in seconds - * - * @return $this - * - * @throws LogicException if the output is disabled - * @throws InvalidArgumentException if the timeout is negative - */ - public function setIdleTimeout($timeout) - { - if (null !== $timeout && $this->outputDisabled) { - throw new LogicException('Idle timeout can not be set while the output is disabled.'); - } - - $this->idleTimeout = $this->validateTimeout($timeout); - - return $this; - } - - /** - * Enables or disables the TTY mode. - * - * @param bool $tty True to enabled and false to disable - * - * @return $this - * - * @throws RuntimeException In case the TTY mode is not supported - */ - public function setTty($tty) - { - if ('\\' === \DIRECTORY_SEPARATOR && $tty) { - throw new RuntimeException('TTY mode is not supported on Windows platform.'); - } - - if ($tty && !self::isTtySupported()) { - throw new RuntimeException('TTY mode requires /dev/tty to be read/writable.'); - } - - $this->tty = (bool) $tty; - - return $this; - } - - /** - * Checks if the TTY mode is enabled. - * - * @return bool true if the TTY mode is enabled, false otherwise - */ - public function isTty() - { - return $this->tty; - } - - /** - * Sets PTY mode. - * - * @param bool $bool - * - * @return $this - */ - public function setPty($bool) - { - $this->pty = (bool) $bool; - - return $this; - } - - /** - * Returns PTY state. - * - * @return bool - */ - public function isPty() - { - return $this->pty; - } - - /** - * Gets the working directory. - * - * @return string|null The current working directory or null on failure - */ - public function getWorkingDirectory() - { - if (null === $this->cwd) { - // getcwd() will return false if any one of the parent directories does not have - // the readable or search mode set, even if the current directory does - return getcwd() ?: null; - } - - return $this->cwd; - } - - /** - * Sets the current working directory. - * - * @param string $cwd The new working directory - * - * @return $this - */ - public function setWorkingDirectory($cwd) - { - $this->cwd = $cwd; - - return $this; - } - - /** - * Gets the environment variables. - * - * @return array The current environment variables - */ - public function getEnv() - { - return $this->env; - } - - /** - * Sets the environment variables. - * - * @param array<string|\Stringable> $env The new environment variables - * - * @return $this - */ - public function setEnv(array $env) - { - $this->env = $env; - - return $this; - } - - /** - * Gets the Process input. - * - * @return resource|string|\Iterator|null The Process input - */ - public function getInput() - { - return $this->input; - } - - /** - * Sets the input. - * - * This content will be passed to the underlying process standard input. - * - * @param string|int|float|bool|resource|\Traversable|null $input The content - * - * @return $this - * - * @throws LogicException In case the process is running - */ - public function setInput($input) - { - if ($this->isRunning()) { - throw new LogicException('Input can not be set while the process is running.'); - } - - $this->input = ProcessUtils::validateInput(__METHOD__, $input); - - return $this; - } - - /** - * Sets whether environment variables will be inherited or not. - * - * @param bool $inheritEnv - * - * @return $this - * - * @deprecated since Symfony 4.4, env variables are always inherited - */ - public function inheritEnvironmentVariables($inheritEnv = true) - { - @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.4, env variables are always inherited.', __METHOD__), \E_USER_DEPRECATED); - - if (!$inheritEnv) { - throw new InvalidArgumentException('Not inheriting environment variables is not supported.'); - } - - return $this; - } - - /** - * Performs a check between the timeout definition and the time the process started. - * - * In case you run a background process (with the start method), you should - * trigger this method regularly to ensure the process timeout - * - * @throws ProcessTimedOutException In case the timeout was reached - */ - public function checkTimeout() - { - if (self::STATUS_STARTED !== $this->status) { - return; - } - - if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) { - $this->stop(0); - - throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_GENERAL); - } - - if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) { - $this->stop(0); - - throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_IDLE); - } - } - - /** - * Returns whether TTY is supported on the current operating system. - */ - public static function isTtySupported(): bool - { - static $isTtySupported; - - if (null === $isTtySupported) { - $isTtySupported = (bool) @proc_open('echo 1 >/dev/null', [['file', '/dev/tty', 'r'], ['file', '/dev/tty', 'w'], ['file', '/dev/tty', 'w']], $pipes); - } - - return $isTtySupported; - } - - /** - * Returns whether PTY is supported on the current operating system. - * - * @return bool - */ - public static function isPtySupported() - { - static $result; - - if (null !== $result) { - return $result; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - return $result = false; - } - - return $result = (bool) @proc_open('echo 1 >/dev/null', [['pty'], ['pty'], ['pty']], $pipes); - } - - /** - * Creates the descriptors needed by the proc_open. - */ - private function getDescriptors(): array - { - if ($this->input instanceof \Iterator) { - $this->input->rewind(); - } - if ('\\' === \DIRECTORY_SEPARATOR) { - $this->processPipes = new WindowsPipes($this->input, !$this->outputDisabled || $this->hasCallback); - } else { - $this->processPipes = new UnixPipes($this->isTty(), $this->isPty(), $this->input, !$this->outputDisabled || $this->hasCallback); - } - - return $this->processPipes->getDescriptors(); - } - - /** - * Builds up the callback used by wait(). - * - * The callbacks adds all occurred output to the specific buffer and calls - * the user callback (if present) with the received output. - * - * @param callable|null $callback The user defined PHP callback - * - * @return \Closure A PHP closure - */ - protected function buildCallback(callable $callback = null) - { - if ($this->outputDisabled) { - return function ($type, $data) use ($callback): bool { - return null !== $callback && $callback($type, $data); - }; - } - - $out = self::OUT; - - return function ($type, $data) use ($callback, $out): bool { - if ($out == $type) { - $this->addOutput($data); - } else { - $this->addErrorOutput($data); - } - - return null !== $callback && $callback($type, $data); - }; - } - - /** - * Updates the status of the process, reads pipes. - * - * @param bool $blocking Whether to use a blocking read call - */ - protected function updateStatus($blocking) - { - if (self::STATUS_STARTED !== $this->status) { - return; - } - - $this->processInformation = proc_get_status($this->process); - $running = $this->processInformation['running']; - - $this->readPipes($running && $blocking, '\\' !== \DIRECTORY_SEPARATOR || !$running); - - if ($this->fallbackStatus && $this->isSigchildEnabled()) { - $this->processInformation = $this->fallbackStatus + $this->processInformation; - } - - if (!$running) { - $this->close(); - } - } - - /** - * Returns whether PHP has been compiled with the '--enable-sigchild' option or not. - * - * @return bool - */ - protected function isSigchildEnabled() - { - if (null !== self::$sigchild) { - return self::$sigchild; - } - - if (!\function_exists('phpinfo')) { - return self::$sigchild = false; - } - - ob_start(); - phpinfo(\INFO_GENERAL); - - return self::$sigchild = str_contains(ob_get_clean(), '--enable-sigchild'); - } - - /** - * Reads pipes for the freshest output. - * - * @param string $caller The name of the method that needs fresh outputs - * @param bool $blocking Whether to use blocking calls or not - * - * @throws LogicException in case output has been disabled or process is not started - */ - private function readPipesForOutput(string $caller, bool $blocking = false) - { - if ($this->outputDisabled) { - throw new LogicException('Output has been disabled.'); - } - - $this->requireProcessIsStarted($caller); - - $this->updateStatus($blocking); - } - - /** - * Validates and returns the filtered timeout. - * - * @throws InvalidArgumentException if the given timeout is a negative number - */ - private function validateTimeout(?float $timeout): ?float - { - $timeout = (float) $timeout; - - if (0.0 === $timeout) { - $timeout = null; - } elseif ($timeout < 0) { - throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.'); - } - - return $timeout; - } - - /** - * Reads pipes, executes callback. - * - * @param bool $blocking Whether to use blocking calls or not - * @param bool $close Whether to close file handles or not - */ - private function readPipes(bool $blocking, bool $close) - { - $result = $this->processPipes->readAndWrite($blocking, $close); - - $callback = $this->callback; - foreach ($result as $type => $data) { - if (3 !== $type) { - $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data); - } elseif (!isset($this->fallbackStatus['signaled'])) { - $this->fallbackStatus['exitcode'] = (int) $data; - } - } - } - - /** - * Closes process resource, closes file handles, sets the exitcode. - * - * @return int The exitcode - */ - private function close(): int - { - $this->processPipes->close(); - if (\is_resource($this->process)) { - proc_close($this->process); - } - $this->exitcode = $this->processInformation['exitcode']; - $this->status = self::STATUS_TERMINATED; - - if (-1 === $this->exitcode) { - if ($this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) { - // if process has been signaled, no exitcode but a valid termsig, apply Unix convention - $this->exitcode = 128 + $this->processInformation['termsig']; - } elseif ($this->isSigchildEnabled()) { - $this->processInformation['signaled'] = true; - $this->processInformation['termsig'] = -1; - } - } - - // Free memory from self-reference callback created by buildCallback - // Doing so in other contexts like __destruct or by garbage collector is ineffective - // Now pipes are closed, so the callback is no longer necessary - $this->callback = null; - - return $this->exitcode; - } - - /** - * Resets data related to the latest run of the process. - */ - private function resetProcessData() - { - $this->starttime = null; - $this->callback = null; - $this->exitcode = null; - $this->fallbackStatus = []; - $this->processInformation = null; - $this->stdout = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+'); - $this->stderr = fopen('php://temp/maxmemory:'.(1024 * 1024), 'w+'); - $this->process = null; - $this->latestSignal = null; - $this->status = self::STATUS_READY; - $this->incrementalOutputOffset = 0; - $this->incrementalErrorOutputOffset = 0; - } - - /** - * Sends a POSIX signal to the process. - * - * @param int $signal A valid POSIX signal (see https://php.net/pcntl.constants) - * @param bool $throwException Whether to throw exception in case signal failed - * - * @throws LogicException In case the process is not running - * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed - * @throws RuntimeException In case of failure - */ - private function doSignal(int $signal, bool $throwException): bool - { - if (null === $pid = $this->getPid()) { - if ($throwException) { - throw new LogicException('Can not send signal on a non running process.'); - } - - return false; - } - - if ('\\' === \DIRECTORY_SEPARATOR) { - exec(sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode); - if ($exitCode && $this->isRunning()) { - if ($throwException) { - throw new RuntimeException(sprintf('Unable to kill the process (%s).', implode(' ', $output))); - } - - return false; - } - } else { - if (!$this->isSigchildEnabled()) { - $ok = @proc_terminate($this->process, $signal); - } elseif (\function_exists('posix_kill')) { - $ok = @posix_kill($pid, $signal); - } elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), [2 => ['pipe', 'w']], $pipes)) { - $ok = false === fgets($pipes[2]); - } - if (!$ok) { - if ($throwException) { - throw new RuntimeException(sprintf('Error while sending signal "%s".', $signal)); - } - - return false; - } - } - - $this->latestSignal = $signal; - $this->fallbackStatus['signaled'] = true; - $this->fallbackStatus['exitcode'] = -1; - $this->fallbackStatus['termsig'] = $this->latestSignal; - - return true; - } - - private function prepareWindowsCommandLine(string $cmd, array &$env): string - { - $uid = uniqid('', true); - $varCount = 0; - $varCache = []; - $cmd = preg_replace_callback( - '/"(?:( - [^"%!^]*+ - (?: - (?: !LF! | "(?:\^[%!^])?+" ) - [^"%!^]*+ - )++ - ) | [^"]*+ )"/x', - function ($m) use (&$env, &$varCache, &$varCount, $uid) { - if (!isset($m[1])) { - return $m[0]; - } - if (isset($varCache[$m[0]])) { - return $varCache[$m[0]]; - } - if (str_contains($value = $m[1], "\0")) { - $value = str_replace("\0", '?', $value); - } - if (false === strpbrk($value, "\"%!\n")) { - return '"'.$value.'"'; - } - - $value = str_replace(['!LF!', '"^!"', '"^%"', '"^^"', '""'], ["\n", '!', '%', '^', '"'], $value); - $value = '"'.preg_replace('/(\\\\*)"/', '$1$1\\"', $value).'"'; - $var = $uid.++$varCount; - - $env[$var] = $value; - - return $varCache[$m[0]] = '!'.$var.'!'; - }, - $cmd - ); - - $cmd = 'cmd /V:ON /E:ON /D /C ('.str_replace("\n", ' ', $cmd).')'; - foreach ($this->processPipes->getFiles() as $offset => $filename) { - $cmd .= ' '.$offset.'>"'.$filename.'"'; - } - - return $cmd; - } - - /** - * Ensures the process is running or terminated, throws a LogicException if the process has a not started. - * - * @throws LogicException if the process has not run - */ - private function requireProcessIsStarted(string $functionName) - { - if (!$this->isStarted()) { - throw new LogicException(sprintf('Process must be started before calling "%s()".', $functionName)); - } - } - - /** - * Ensures the process is terminated, throws a LogicException if the process has a status different than "terminated". - * - * @throws LogicException if the process is not yet terminated - */ - private function requireProcessIsTerminated(string $functionName) - { - if (!$this->isTerminated()) { - throw new LogicException(sprintf('Process must be terminated before calling "%s()".', $functionName)); - } - } - - /** - * Escapes a string to be used as a shell argument. - */ - private function escapeArgument(?string $argument): string - { - if ('' === $argument || null === $argument) { - return '""'; - } - if ('\\' !== \DIRECTORY_SEPARATOR) { - return "'".str_replace("'", "'\\''", $argument)."'"; - } - if (str_contains($argument, "\0")) { - $argument = str_replace("\0", '?', $argument); - } - if (!preg_match('/[\/()%!^"<>&|\s]/', $argument)) { - return $argument; - } - $argument = preg_replace('/(\\\\+)$/', '$1$1', $argument); - - return '"'.str_replace(['"', '^', '%', '!', "\n"], ['""', '"^^"', '"^%"', '"^!"', '!LF!'], $argument).'"'; - } - - private function replacePlaceholders(string $commandline, array $env) - { - return preg_replace_callback('/"\$\{:([_a-zA-Z]++[_a-zA-Z0-9]*+)\}"/', function ($matches) use ($commandline, $env) { - if (!isset($env[$matches[1]]) || false === $env[$matches[1]]) { - throw new InvalidArgumentException(sprintf('Command line is missing a value for parameter "%s": ', $matches[1]).$commandline); - } - - return $this->escapeArgument($env[$matches[1]]); - }, $commandline); - } - - private function getDefaultEnv(): array - { - $env = getenv(); - $env = ('\\' === \DIRECTORY_SEPARATOR ? array_intersect_ukey($env, $_SERVER, 'strcasecmp') : array_intersect_key($env, $_SERVER)) ?: $env; - - return $_ENV + ('\\' === \DIRECTORY_SEPARATOR ? array_diff_ukey($env, $_ENV, 'strcasecmp') : $env); - } -} diff --git a/vendor/symfony/process/ProcessUtils.php b/vendor/symfony/process/ProcessUtils.php deleted file mode 100644 index 121693b..0000000 --- a/vendor/symfony/process/ProcessUtils.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process; - -use Symfony\Component\Process\Exception\InvalidArgumentException; - -/** - * ProcessUtils is a bunch of utility methods. - * - * This class contains static methods only and is not meant to be instantiated. - * - * @author Martin Hasoň <martin.hason@gmail.com> - */ -class ProcessUtils -{ - /** - * This class should not be instantiated. - */ - private function __construct() - { - } - - /** - * Validates and normalizes a Process input. - * - * @param string $caller The name of method call that validates the input - * @param mixed $input The input to validate - * - * @return mixed The validated input - * - * @throws InvalidArgumentException In case the input is not valid - */ - public static function validateInput($caller, $input) - { - if (null !== $input) { - if (\is_resource($input)) { - return $input; - } - if (\is_string($input)) { - return $input; - } - if (\is_scalar($input)) { - return (string) $input; - } - if ($input instanceof Process) { - return $input->getIterator($input::ITER_SKIP_ERR); - } - if ($input instanceof \Iterator) { - return $input; - } - if ($input instanceof \Traversable) { - return new \IteratorIterator($input); - } - - throw new InvalidArgumentException(sprintf('"%s" only accepts strings, Traversable objects or stream resources.', $caller)); - } - - return $input; - } -} diff --git a/vendor/symfony/process/README.md b/vendor/symfony/process/README.md deleted file mode 100644 index afce5e4..0000000 --- a/vendor/symfony/process/README.md +++ /dev/null @@ -1,13 +0,0 @@ -Process Component -================= - -The Process component executes commands in sub-processes. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/process.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/process/composer.json b/vendor/symfony/process/composer.json deleted file mode 100644 index c0f7599..0000000 --- a/vendor/symfony/process/composer.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "symfony/process", - "type": "library", - "description": "Executes commands in sub-processes", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1.3", - "symfony/polyfill-php80": "^1.16" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\Process\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/psr-http-message-bridge/.php-cs-fixer.dist.php b/vendor/symfony/psr-http-message-bridge/.php-cs-fixer.dist.php deleted file mode 100644 index e9b256a..0000000 --- a/vendor/symfony/psr-http-message-bridge/.php-cs-fixer.dist.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -return (new PhpCsFixer\Config()) - ->setRules([ - '@Symfony' => true, - '@Symfony:risky' => true, - '@PHPUnit48Migration:risky' => true, - 'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice - 'array_syntax' => ['syntax' => 'short'], - 'fopen_flags' => false, - 'ordered_imports' => true, - 'protected_to_private' => false, - // Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading - 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'], - // Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], - ]) - ->setRiskyAllowed(true) - ->setFinder( - (new PhpCsFixer\Finder()) - ->in(__DIR__) - ->exclude('vendor') - ->name('*.php') - ) -; diff --git a/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php b/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php deleted file mode 100644 index 61cd8c5..0000000 --- a/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\PsrHttpMessage\ArgumentValueResolver; - -use Psr\Http\Message\MessageInterface; -use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ServerRequestInterface; -use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; -use Symfony\Component\HttpKernel\Controller\ValueResolverInterface as BaseValueResolverInterface; -use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; - -/** - * Injects the RequestInterface, MessageInterface or ServerRequestInterface when requested. - * - * @author Iltar van der Berg <kjarli@gmail.com> - * @author Alexander M. Turek <me@derrabus.de> - */ -final class PsrServerRequestResolver implements ArgumentValueResolverInterface, ValueResolverInterface -{ - private const SUPPORTED_TYPES = [ - ServerRequestInterface::class => true, - RequestInterface::class => true, - MessageInterface::class => true, - ]; - - private $httpMessageFactory; - - public function __construct(HttpMessageFactoryInterface $httpMessageFactory) - { - $this->httpMessageFactory = $httpMessageFactory; - } - - /** - * {@inheritdoc} - */ - public function supports(Request $request, ArgumentMetadata $argument): bool - { - if ($this instanceof BaseValueResolverInterface) { - trigger_deprecation('symfony/psr-http-message-bridge', '2.3', 'Method "%s" is deprecated, call "resolve()" without calling "supports()" first.', __METHOD__); - } - - return self::SUPPORTED_TYPES[$argument->getType()] ?? false; - } - - /** - * {@inheritdoc} - */ - public function resolve(Request $request, ArgumentMetadata $argument): \Traversable - { - if (!isset(self::SUPPORTED_TYPES[$argument->getType()])) { - return; - } - - yield $this->httpMessageFactory->createRequest($request); - } -} diff --git a/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php b/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php deleted file mode 100644 index 83a321a..0000000 --- a/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\PsrHttpMessage\ArgumentValueResolver; - -use Symfony\Component\HttpKernel\Controller\ValueResolverInterface as BaseValueResolverInterface; - -if (interface_exists(BaseValueResolverInterface::class)) { - /** @internal */ - interface ValueResolverInterface extends BaseValueResolverInterface - { - } -} else { - /** @internal */ - interface ValueResolverInterface - { - } -} diff --git a/vendor/symfony/psr-http-message-bridge/CHANGELOG.md b/vendor/symfony/psr-http-message-bridge/CHANGELOG.md deleted file mode 100644 index f32c06f..0000000 --- a/vendor/symfony/psr-http-message-bridge/CHANGELOG.md +++ /dev/null @@ -1,85 +0,0 @@ -CHANGELOG -========= - -# 2.3.1 (2023-07-26) - -* Don't rely on `Request::getPayload()` to populate the parsed body - -# 2.3.0 (2023-07-25) - -* Leverage `Request::getPayload()` to populate the parsed body of PSR-7 requests -* Implement `ValueResolverInterface` introduced with Symfony 6.2 - -# 2.2.0 (2023-04-21) - -* Drop support for Symfony 4 -* Bump minimum version of PHP to 7.2 -* Support version 2 of the psr/http-message contracts - -# 2.1.3 (2022-09-05) - -* Ignore invalid HTTP headers when creating PSR7 objects -* Fix for wrong type passed to `moveTo()` - -# 2.1.2 (2021-11-05) - -* Allow Symfony 6 - -# 2.1.0 (2021-02-17) - - * Added a `PsrResponseListener` to automatically convert PSR-7 responses returned by controllers - * Added a `PsrServerRequestResolver` that allows injecting PSR-7 request objects into controllers - -# 2.0.2 (2020-09-29) - - * Fix populating server params from URI in HttpFoundationFactory - * Create cookies as raw in HttpFoundationFactory - * Fix BinaryFileResponse with Content-Range PsrHttpFactory - -# 2.0.1 (2020-06-25) - - * Don't normalize query string in PsrHttpFactory - * Fix conversion for HTTPS requests - * Fix populating default port and headers in HttpFoundationFactory - -# 2.0.0 (2020-01-02) - - * Remove DiactorosFactory - -# 1.3.0 (2019-11-25) - - * Added support for streamed requests - * Added support for Symfony 5.0+ - * Fixed bridging UploadedFile objects - * Bumped minimum version of Symfony to 4.4 - -# 1.2.0 (2019-03-11) - - * Added new documentation links - * Bumped minimum version of PHP to 7.1 - * Added support for streamed responses - -# 1.1.2 (2019-04-03) - - * Fixed createResponse - -# 1.1.1 (2019-03-11) - - * Deprecated DiactorosFactory, use PsrHttpFactory instead - * Removed triggering of deprecation - -# 1.1.0 (2018-08-30) - - * Added support for creating PSR-7 messages using PSR-17 factories - -# 1.0.2 (2017-12-19) - - * Fixed request target in PSR7 Request (mtibben) - -# 1.0.1 (2017-12-04) - - * Added support for Symfony 4 (dunglas) - -# 1.0.0 (2016-09-14) - - * Initial release diff --git a/vendor/symfony/psr-http-message-bridge/EventListener/PsrResponseListener.php b/vendor/symfony/psr-http-message-bridge/EventListener/PsrResponseListener.php deleted file mode 100644 index ee0e047..0000000 --- a/vendor/symfony/psr-http-message-bridge/EventListener/PsrResponseListener.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace Symfony\Bridge\PsrHttpMessage\EventListener; - -use Psr\Http\Message\ResponseInterface; -use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory; -use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; -use Symfony\Component\HttpKernel\Event\ViewEvent; -use Symfony\Component\HttpKernel\KernelEvents; - -/** - * Converts PSR-7 Response to HttpFoundation Response using the bridge. - * - * @author Kévin Dunglas <dunglas@gmail.com> - * @author Alexander M. Turek <me@derrabus.de> - */ -final class PsrResponseListener implements EventSubscriberInterface -{ - private $httpFoundationFactory; - - public function __construct(HttpFoundationFactoryInterface $httpFoundationFactory = null) - { - $this->httpFoundationFactory = $httpFoundationFactory ?? new HttpFoundationFactory(); - } - - /** - * Do the conversion if applicable and update the response of the event. - */ - public function onKernelView(ViewEvent $event): void - { - $controllerResult = $event->getControllerResult(); - - if (!$controllerResult instanceof ResponseInterface) { - return; - } - - $event->setResponse($this->httpFoundationFactory->createResponse($controllerResult)); - } - - /** - * {@inheritdoc} - */ - public static function getSubscribedEvents(): array - { - return [ - KernelEvents::VIEW => 'onKernelView', - ]; - } -} diff --git a/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php b/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php deleted file mode 100644 index a69e8ff..0000000 --- a/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php +++ /dev/null @@ -1,252 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\PsrHttpMessage\Factory; - -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Message\StreamInterface; -use Psr\Http\Message\UploadedFileInterface; -use Psr\Http\Message\UriInterface; -use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface; -use Symfony\Component\HttpFoundation\Cookie; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\StreamedResponse; - -/** - * {@inheritdoc} - * - * @author Kévin Dunglas <dunglas@gmail.com> - */ -class HttpFoundationFactory implements HttpFoundationFactoryInterface -{ - /** - * @var int The maximum output buffering size for each iteration when sending the response - */ - private $responseBufferMaxLength; - - public function __construct(int $responseBufferMaxLength = 16372) - { - $this->responseBufferMaxLength = $responseBufferMaxLength; - } - - /** - * {@inheritdoc} - * - * @return Request - */ - public function createRequest(ServerRequestInterface $psrRequest, bool $streamed = false) - { - $server = []; - $uri = $psrRequest->getUri(); - - if ($uri instanceof UriInterface) { - $server['SERVER_NAME'] = $uri->getHost(); - $server['SERVER_PORT'] = $uri->getPort() ?: ('https' === $uri->getScheme() ? 443 : 80); - $server['REQUEST_URI'] = $uri->getPath(); - $server['QUERY_STRING'] = $uri->getQuery(); - - if ('' !== $server['QUERY_STRING']) { - $server['REQUEST_URI'] .= '?'.$server['QUERY_STRING']; - } - - if ('https' === $uri->getScheme()) { - $server['HTTPS'] = 'on'; - } - } - - $server['REQUEST_METHOD'] = $psrRequest->getMethod(); - - $server = array_replace($psrRequest->getServerParams(), $server); - - $parsedBody = $psrRequest->getParsedBody(); - $parsedBody = \is_array($parsedBody) ? $parsedBody : []; - - $request = new Request( - $psrRequest->getQueryParams(), - $parsedBody, - $psrRequest->getAttributes(), - $psrRequest->getCookieParams(), - $this->getFiles($psrRequest->getUploadedFiles()), - $server, - $streamed ? $psrRequest->getBody()->detach() : $psrRequest->getBody()->__toString() - ); - $request->headers->add($psrRequest->getHeaders()); - - return $request; - } - - /** - * Converts to the input array to $_FILES structure. - */ - private function getFiles(array $uploadedFiles): array - { - $files = []; - - foreach ($uploadedFiles as $key => $value) { - if ($value instanceof UploadedFileInterface) { - $files[$key] = $this->createUploadedFile($value); - } else { - $files[$key] = $this->getFiles($value); - } - } - - return $files; - } - - /** - * Creates Symfony UploadedFile instance from PSR-7 ones. - */ - private function createUploadedFile(UploadedFileInterface $psrUploadedFile): UploadedFile - { - return new UploadedFile($psrUploadedFile, function () { return $this->getTemporaryPath(); }); - } - - /** - * Gets a temporary file path. - * - * @return string - */ - protected function getTemporaryPath() - { - return tempnam(sys_get_temp_dir(), uniqid('symfony', true)); - } - - /** - * {@inheritdoc} - * - * @return Response - */ - public function createResponse(ResponseInterface $psrResponse, bool $streamed = false) - { - $cookies = $psrResponse->getHeader('Set-Cookie'); - $psrResponse = $psrResponse->withoutHeader('Set-Cookie'); - - if ($streamed) { - $response = new StreamedResponse( - $this->createStreamedResponseCallback($psrResponse->getBody()), - $psrResponse->getStatusCode(), - $psrResponse->getHeaders() - ); - } else { - $response = new Response( - $psrResponse->getBody()->__toString(), - $psrResponse->getStatusCode(), - $psrResponse->getHeaders() - ); - } - - $response->setProtocolVersion($psrResponse->getProtocolVersion()); - - foreach ($cookies as $cookie) { - $response->headers->setCookie($this->createCookie($cookie)); - } - - return $response; - } - - /** - * Creates a Cookie instance from a cookie string. - * - * Some snippets have been taken from the Guzzle project: https://github.com/guzzle/guzzle/blob/5.3/src/Cookie/SetCookie.php#L34 - * - * @throws \InvalidArgumentException - */ - private function createCookie(string $cookie): Cookie - { - foreach (explode(';', $cookie) as $part) { - $part = trim($part); - - $data = explode('=', $part, 2); - $name = $data[0]; - $value = isset($data[1]) ? trim($data[1], " \n\r\t\0\x0B\"") : null; - - if (!isset($cookieName)) { - $cookieName = $name; - $cookieValue = $value; - - continue; - } - - if ('expires' === strtolower($name) && null !== $value) { - $cookieExpire = new \DateTime($value); - - continue; - } - - if ('path' === strtolower($name) && null !== $value) { - $cookiePath = $value; - - continue; - } - - if ('domain' === strtolower($name) && null !== $value) { - $cookieDomain = $value; - - continue; - } - - if ('secure' === strtolower($name)) { - $cookieSecure = true; - - continue; - } - - if ('httponly' === strtolower($name)) { - $cookieHttpOnly = true; - - continue; - } - - if ('samesite' === strtolower($name) && null !== $value) { - $samesite = $value; - - continue; - } - } - - if (!isset($cookieName)) { - throw new \InvalidArgumentException('The value of the Set-Cookie header is malformed.'); - } - - return new Cookie( - $cookieName, - $cookieValue, - $cookieExpire ?? 0, - $cookiePath ?? '/', - $cookieDomain ?? null, - isset($cookieSecure), - isset($cookieHttpOnly), - true, - $samesite ?? null - ); - } - - private function createStreamedResponseCallback(StreamInterface $body): callable - { - return function () use ($body) { - if ($body->isSeekable()) { - $body->rewind(); - } - - if (!$body->isReadable()) { - echo $body; - - return; - } - - while (!$body->eof()) { - echo $body->read($this->responseBufferMaxLength); - } - }; - } -} diff --git a/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php b/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php deleted file mode 100644 index 09c4360..0000000 --- a/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php +++ /dev/null @@ -1,198 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\PsrHttpMessage\Factory; - -use Psr\Http\Message\ResponseFactoryInterface; -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\ServerRequestFactoryInterface; -use Psr\Http\Message\ServerRequestInterface; -use Psr\Http\Message\StreamFactoryInterface; -use Psr\Http\Message\UploadedFileFactoryInterface; -use Psr\Http\Message\UploadedFileInterface; -use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface; -use Symfony\Component\HttpFoundation\BinaryFileResponse; -use Symfony\Component\HttpFoundation\File\UploadedFile; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpFoundation\StreamedResponse; - -/** - * Builds Psr\HttpMessage instances using a PSR-17 implementation. - * - * @author Antonio J. García Lagar <aj@garcialagar.es> - * @author Aurélien Pillevesse <aurelienpillevesse@hotmail.fr> - */ -class PsrHttpFactory implements HttpMessageFactoryInterface -{ - private $serverRequestFactory; - private $streamFactory; - private $uploadedFileFactory; - private $responseFactory; - - public function __construct(ServerRequestFactoryInterface $serverRequestFactory, StreamFactoryInterface $streamFactory, UploadedFileFactoryInterface $uploadedFileFactory, ResponseFactoryInterface $responseFactory) - { - $this->serverRequestFactory = $serverRequestFactory; - $this->streamFactory = $streamFactory; - $this->uploadedFileFactory = $uploadedFileFactory; - $this->responseFactory = $responseFactory; - } - - /** - * {@inheritdoc} - * - * @return ServerRequestInterface - */ - public function createRequest(Request $symfonyRequest) - { - $uri = $symfonyRequest->server->get('QUERY_STRING', ''); - $uri = $symfonyRequest->getSchemeAndHttpHost().$symfonyRequest->getBaseUrl().$symfonyRequest->getPathInfo().('' !== $uri ? '?'.$uri : ''); - - $request = $this->serverRequestFactory->createServerRequest( - $symfonyRequest->getMethod(), - $uri, - $symfonyRequest->server->all() - ); - - foreach ($symfonyRequest->headers->all() as $name => $value) { - try { - $request = $request->withHeader($name, $value); - } catch (\InvalidArgumentException $e) { - // ignore invalid header - } - } - - $body = $this->streamFactory->createStreamFromResource($symfonyRequest->getContent(true)); - - if (method_exists(Request::class, 'getContentTypeFormat')) { - $format = $symfonyRequest->getContentTypeFormat(); - } else { - $format = $symfonyRequest->getContentType(); - } - - if ('json' === $format) { - $parsedBody = json_decode($symfonyRequest->getContent(), true, 512, \JSON_BIGINT_AS_STRING); - - if (!\is_array($parsedBody)) { - $parsedBody = null; - } - } else { - $parsedBody = $symfonyRequest->request->all(); - } - - $request = $request - ->withBody($body) - ->withUploadedFiles($this->getFiles($symfonyRequest->files->all())) - ->withCookieParams($symfonyRequest->cookies->all()) - ->withQueryParams($symfonyRequest->query->all()) - ->withParsedBody($parsedBody) - ; - - foreach ($symfonyRequest->attributes->all() as $key => $value) { - $request = $request->withAttribute($key, $value); - } - - return $request; - } - - /** - * Converts Symfony uploaded files array to the PSR one. - */ - private function getFiles(array $uploadedFiles): array - { - $files = []; - - foreach ($uploadedFiles as $key => $value) { - if (null === $value) { - $files[$key] = $this->uploadedFileFactory->createUploadedFile($this->streamFactory->createStream(), 0, \UPLOAD_ERR_NO_FILE); - continue; - } - if ($value instanceof UploadedFile) { - $files[$key] = $this->createUploadedFile($value); - } else { - $files[$key] = $this->getFiles($value); - } - } - - return $files; - } - - /** - * Creates a PSR-7 UploadedFile instance from a Symfony one. - */ - private function createUploadedFile(UploadedFile $symfonyUploadedFile): UploadedFileInterface - { - return $this->uploadedFileFactory->createUploadedFile( - $this->streamFactory->createStreamFromFile( - $symfonyUploadedFile->getRealPath() - ), - (int) $symfonyUploadedFile->getSize(), - $symfonyUploadedFile->getError(), - $symfonyUploadedFile->getClientOriginalName(), - $symfonyUploadedFile->getClientMimeType() - ); - } - - /** - * {@inheritdoc} - * - * @return ResponseInterface - */ - public function createResponse(Response $symfonyResponse) - { - $response = $this->responseFactory->createResponse($symfonyResponse->getStatusCode(), Response::$statusTexts[$symfonyResponse->getStatusCode()] ?? ''); - - if ($symfonyResponse instanceof BinaryFileResponse && !$symfonyResponse->headers->has('Content-Range')) { - $stream = $this->streamFactory->createStreamFromFile( - $symfonyResponse->getFile()->getPathname() - ); - } else { - $stream = $this->streamFactory->createStreamFromFile('php://temp', 'wb+'); - if ($symfonyResponse instanceof StreamedResponse || $symfonyResponse instanceof BinaryFileResponse) { - ob_start(function ($buffer) use ($stream) { - $stream->write($buffer); - - return ''; - }, 1); - - $symfonyResponse->sendContent(); - ob_end_clean(); - } else { - $stream->write($symfonyResponse->getContent()); - } - } - - $response = $response->withBody($stream); - - $headers = $symfonyResponse->headers->all(); - $cookies = $symfonyResponse->headers->getCookies(); - if (!empty($cookies)) { - $headers['Set-Cookie'] = []; - - foreach ($cookies as $cookie) { - $headers['Set-Cookie'][] = $cookie->__toString(); - } - } - - foreach ($headers as $name => $value) { - try { - $response = $response->withHeader($name, $value); - } catch (\InvalidArgumentException $e) { - // ignore invalid header - } - } - - $protocolVersion = $symfonyResponse->getProtocolVersion(); - $response = $response->withProtocolVersion($protocolVersion); - - return $response; - } -} diff --git a/vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php b/vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php deleted file mode 100644 index 4d38a1f..0000000 --- a/vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\PsrHttpMessage\Factory; - -use Psr\Http\Message\UploadedFileInterface; -use Symfony\Component\HttpFoundation\File\Exception\FileException; -use Symfony\Component\HttpFoundation\File\File; -use Symfony\Component\HttpFoundation\File\UploadedFile as BaseUploadedFile; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class UploadedFile extends BaseUploadedFile -{ - private $psrUploadedFile; - private $test = false; - - public function __construct(UploadedFileInterface $psrUploadedFile, callable $getTemporaryPath) - { - $error = $psrUploadedFile->getError(); - $path = ''; - - if (\UPLOAD_ERR_NO_FILE !== $error) { - $path = $psrUploadedFile->getStream()->getMetadata('uri') ?? ''; - - if ($this->test = !\is_string($path) || !is_uploaded_file($path)) { - $path = $getTemporaryPath(); - $psrUploadedFile->moveTo($path); - } - } - - parent::__construct( - $path, - (string) $psrUploadedFile->getClientFilename(), - $psrUploadedFile->getClientMediaType(), - $psrUploadedFile->getError(), - $this->test - ); - - $this->psrUploadedFile = $psrUploadedFile; - } - - /** - * {@inheritdoc} - */ - public function move(string $directory, string $name = null): File - { - if (!$this->isValid() || $this->test) { - return parent::move($directory, $name); - } - - $target = $this->getTargetFile($directory, $name); - - try { - $this->psrUploadedFile->moveTo((string) $target); - } catch (\RuntimeException $e) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, $e->getMessage()), 0, $e); - } - - @chmod($target, 0666 & ~umask()); - - return $target; - } -} diff --git a/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php b/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php deleted file mode 100644 index a3f9043..0000000 --- a/vendor/symfony/psr-http-message-bridge/HttpFoundationFactoryInterface.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\PsrHttpMessage; - -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\ServerRequestInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Creates Symfony Request and Response instances from PSR-7 ones. - * - * @author Kévin Dunglas <dunglas@gmail.com> - */ -interface HttpFoundationFactoryInterface -{ - /** - * Creates a Symfony Request instance from a PSR-7 one. - * - * @return Request - */ - public function createRequest(ServerRequestInterface $psrRequest, bool $streamed = false); - - /** - * Creates a Symfony Response instance from a PSR-7 one. - * - * @return Response - */ - public function createResponse(ResponseInterface $psrResponse, bool $streamed = false); -} diff --git a/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php b/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php deleted file mode 100644 index f7b964e..0000000 --- a/vendor/symfony/psr-http-message-bridge/HttpMessageFactoryInterface.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bridge\PsrHttpMessage; - -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\ServerRequestInterface; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; - -/** - * Creates PSR HTTP Request and Response instances from Symfony ones. - * - * @author Kévin Dunglas <dunglas@gmail.com> - */ -interface HttpMessageFactoryInterface -{ - /** - * Creates a PSR-7 Request instance from a Symfony one. - * - * @return ServerRequestInterface - */ - public function createRequest(Request $symfonyRequest); - - /** - * Creates a PSR-7 Response instance from a Symfony one. - * - * @return ResponseInterface - */ - public function createResponse(Response $symfonyResponse); -} diff --git a/vendor/symfony/psr-http-message-bridge/LICENSE b/vendor/symfony/psr-http-message-bridge/LICENSE deleted file mode 100644 index 9ff2d0d..0000000 --- a/vendor/symfony/psr-http-message-bridge/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2021 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/psr-http-message-bridge/README.md b/vendor/symfony/psr-http-message-bridge/README.md deleted file mode 100644 index dcbc09a..0000000 --- a/vendor/symfony/psr-http-message-bridge/README.md +++ /dev/null @@ -1,19 +0,0 @@ -PSR-7 Bridge -============ - -Provides integration for PSR7. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/psr7.html) - -Running the tests ------------------ - -If you want to run the unit tests, install dev dependencies before -running PHPUnit: - - $ cd path/to/Symfony/Bridge/PsrHttpMessage/ - $ composer.phar install - $ phpunit diff --git a/vendor/symfony/psr-http-message-bridge/composer.json b/vendor/symfony/psr-http-message-bridge/composer.json deleted file mode 100644 index b705eb2..0000000 --- a/vendor/symfony/psr-http-message-bridge/composer.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "symfony/psr-http-message-bridge", - "type": "symfony-bridge", - "description": "PSR HTTP message bridge", - "keywords": ["http", "psr-7", "psr-17", "http-message"], - "homepage": "http://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/http-message": "^1.0 || ^2.0", - "symfony/deprecation-contracts": "^2.5 || ^3.0", - "symfony/http-foundation": "^5.4 || ^6.0" - }, - "require-dev": { - "symfony/browser-kit": "^5.4 || ^6.0", - "symfony/config": "^5.4 || ^6.0", - "symfony/event-dispatcher": "^5.4 || ^6.0", - "symfony/framework-bundle": "^5.4 || ^6.0", - "symfony/http-kernel": "^5.4 || ^6.0", - "symfony/phpunit-bridge": "^6.2", - "nyholm/psr7": "^1.1", - "psr/log": "^1.1 || ^2 || ^3" - }, - "suggest": { - "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" - }, - "autoload": { - "psr-4": { "Symfony\\Bridge\\PsrHttpMessage\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "extra": { - "branch-alias": { - "dev-main": "2.3-dev" - } - } -} diff --git a/vendor/symfony/service-contracts/.gitignore b/vendor/symfony/service-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/service-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/service-contracts/Attribute/Required.php b/vendor/symfony/service-contracts/Attribute/Required.php deleted file mode 100644 index 9df8511..0000000 --- a/vendor/symfony/service-contracts/Attribute/Required.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Attribute; - -/** - * A required dependency. - * - * This attribute indicates that a property holds a required dependency. The annotated property or method should be - * considered during the instantiation process of the containing class. - * - * @author Alexander M. Turek <me@derrabus.de> - */ -#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::TARGET_PROPERTY)] -final class Required -{ -} diff --git a/vendor/symfony/service-contracts/Attribute/SubscribedService.php b/vendor/symfony/service-contracts/Attribute/SubscribedService.php deleted file mode 100644 index 10d1bc3..0000000 --- a/vendor/symfony/service-contracts/Attribute/SubscribedService.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Attribute; - -use Symfony\Contracts\Service\ServiceSubscriberTrait; - -/** - * Use with {@see ServiceSubscriberTrait} to mark a method's return type - * as a subscribed service. - * - * @author Kevin Bond <kevinbond@gmail.com> - */ -#[\Attribute(\Attribute::TARGET_METHOD)] -final class SubscribedService -{ - /** - * @param string|null $key The key to use for the service - * If null, use "ClassName::methodName" - */ - public function __construct( - public ?string $key = null - ) { - } -} diff --git a/vendor/symfony/service-contracts/CHANGELOG.md b/vendor/symfony/service-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/service-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/service-contracts/LICENSE b/vendor/symfony/service-contracts/LICENSE deleted file mode 100644 index 7536cae..0000000 --- a/vendor/symfony/service-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/service-contracts/README.md b/vendor/symfony/service-contracts/README.md deleted file mode 100644 index 41e054a..0000000 --- a/vendor/symfony/service-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Service Contracts -========================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/service-contracts/ResetInterface.php b/vendor/symfony/service-contracts/ResetInterface.php deleted file mode 100644 index 1af1075..0000000 --- a/vendor/symfony/service-contracts/ResetInterface.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -/** - * Provides a way to reset an object to its initial state. - * - * When calling the "reset()" method on an object, it should be put back to its - * initial state. This usually means clearing any internal buffers and forwarding - * the call to internal dependencies. All properties of the object should be put - * back to the same state it had when it was first ready to use. - * - * This method could be called, for example, to recycle objects that are used as - * services, so that they can be used to handle several requests in the same - * process loop (note that we advise making your services stateless instead of - * implementing this interface when possible.) - */ -interface ResetInterface -{ - public function reset(); -} diff --git a/vendor/symfony/service-contracts/ServiceLocatorTrait.php b/vendor/symfony/service-contracts/ServiceLocatorTrait.php deleted file mode 100644 index 74dfa43..0000000 --- a/vendor/symfony/service-contracts/ServiceLocatorTrait.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerExceptionInterface; -use Psr\Container\NotFoundExceptionInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(ContainerExceptionInterface::class); -class_exists(NotFoundExceptionInterface::class); - -/** - * A trait to help implement ServiceProviderInterface. - * - * @author Robin Chalas <robin.chalas@gmail.com> - * @author Nicolas Grekas <p@tchwork.com> - */ -trait ServiceLocatorTrait -{ - private $factories; - private $loading = []; - private $providedTypes; - - /** - * @param callable[] $factories - */ - public function __construct(array $factories) - { - $this->factories = $factories; - } - - /** - * {@inheritdoc} - * - * @return bool - */ - public function has(string $id) - { - return isset($this->factories[$id]); - } - - /** - * {@inheritdoc} - * - * @return mixed - */ - public function get(string $id) - { - if (!isset($this->factories[$id])) { - throw $this->createNotFoundException($id); - } - - if (isset($this->loading[$id])) { - $ids = array_values($this->loading); - $ids = \array_slice($this->loading, array_search($id, $ids)); - $ids[] = $id; - - throw $this->createCircularReferenceException($id, $ids); - } - - $this->loading[$id] = $id; - try { - return $this->factories[$id]($this); - } finally { - unset($this->loading[$id]); - } - } - - /** - * {@inheritdoc} - */ - public function getProvidedServices(): array - { - if (null === $this->providedTypes) { - $this->providedTypes = []; - - foreach ($this->factories as $name => $factory) { - if (!\is_callable($factory)) { - $this->providedTypes[$name] = '?'; - } else { - $type = (new \ReflectionFunction($factory))->getReturnType(); - - $this->providedTypes[$name] = $type ? ($type->allowsNull() ? '?' : '').($type instanceof \ReflectionNamedType ? $type->getName() : $type) : '?'; - } - } - } - - return $this->providedTypes; - } - - private function createNotFoundException(string $id): NotFoundExceptionInterface - { - if (!$alternatives = array_keys($this->factories)) { - $message = 'is empty...'; - } else { - $last = array_pop($alternatives); - if ($alternatives) { - $message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last); - } else { - $message = sprintf('only knows about the "%s" service.', $last); - } - } - - if ($this->loading) { - $message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message); - } else { - $message = sprintf('Service "%s" not found: the current service locator %s', $id, $message); - } - - return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface { - }; - } - - private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface - { - return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface { - }; - } -} diff --git a/vendor/symfony/service-contracts/ServiceProviderInterface.php b/vendor/symfony/service-contracts/ServiceProviderInterface.php deleted file mode 100644 index c60ad0b..0000000 --- a/vendor/symfony/service-contracts/ServiceProviderInterface.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerInterface; - -/** - * A ServiceProviderInterface exposes the identifiers and the types of services provided by a container. - * - * @author Nicolas Grekas <p@tchwork.com> - * @author Mateusz Sip <mateusz.sip@gmail.com> - */ -interface ServiceProviderInterface extends ContainerInterface -{ - /** - * Returns an associative array of service types keyed by the identifiers provided by the current container. - * - * Examples: - * - * * ['logger' => 'Psr\Log\LoggerInterface'] means the object provides a service named "logger" that implements Psr\Log\LoggerInterface - * * ['foo' => '?'] means the container provides service name "foo" of unspecified type - * * ['bar' => '?Bar\Baz'] means the container provides a service "bar" of type Bar\Baz|null - * - * @return string[] The provided service types, keyed by service names - */ - public function getProvidedServices(): array; -} diff --git a/vendor/symfony/service-contracts/ServiceSubscriberInterface.php b/vendor/symfony/service-contracts/ServiceSubscriberInterface.php deleted file mode 100644 index 098ab90..0000000 --- a/vendor/symfony/service-contracts/ServiceSubscriberInterface.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -/** - * A ServiceSubscriber exposes its dependencies via the static {@link getSubscribedServices} method. - * - * The getSubscribedServices method returns an array of service types required by such instances, - * optionally keyed by the service names used internally. Service types that start with an interrogation - * mark "?" are optional, while the other ones are mandatory service dependencies. - * - * The injected service locators SHOULD NOT allow access to any other services not specified by the method. - * - * It is expected that ServiceSubscriber instances consume PSR-11-based service locators internally. - * This interface does not dictate any injection method for these service locators, although constructor - * injection is recommended. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface ServiceSubscriberInterface -{ - /** - * Returns an array of service types required by such instances, optionally keyed by the service names used internally. - * - * For mandatory dependencies: - * - * * ['logger' => 'Psr\Log\LoggerInterface'] means the objects use the "logger" name - * internally to fetch a service which must implement Psr\Log\LoggerInterface. - * * ['loggers' => 'Psr\Log\LoggerInterface[]'] means the objects use the "loggers" name - * internally to fetch an iterable of Psr\Log\LoggerInterface instances. - * * ['Psr\Log\LoggerInterface'] is a shortcut for - * * ['Psr\Log\LoggerInterface' => 'Psr\Log\LoggerInterface'] - * - * otherwise: - * - * * ['logger' => '?Psr\Log\LoggerInterface'] denotes an optional dependency - * * ['loggers' => '?Psr\Log\LoggerInterface[]'] denotes an optional iterable dependency - * * ['?Psr\Log\LoggerInterface'] is a shortcut for - * * ['Psr\Log\LoggerInterface' => '?Psr\Log\LoggerInterface'] - * - * @return string[] The required service types, optionally keyed by service names - */ - public static function getSubscribedServices(); -} diff --git a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php b/vendor/symfony/service-contracts/ServiceSubscriberTrait.php deleted file mode 100644 index 6c560a4..0000000 --- a/vendor/symfony/service-contracts/ServiceSubscriberTrait.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service; - -use Psr\Container\ContainerInterface; -use Symfony\Contracts\Service\Attribute\SubscribedService; - -/** - * Implementation of ServiceSubscriberInterface that determines subscribed services from - * method return types. Service ids are available as "ClassName::methodName". - * - * @author Kevin Bond <kevinbond@gmail.com> - */ -trait ServiceSubscriberTrait -{ - /** @var ContainerInterface */ - protected $container; - - /** - * {@inheritdoc} - */ - public static function getSubscribedServices(): array - { - $services = method_exists(get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : []; - $attributeOptIn = false; - - if (\PHP_VERSION_ID >= 80000) { - foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { - if (self::class !== $method->getDeclaringClass()->name) { - continue; - } - - if (!$attribute = $method->getAttributes(SubscribedService::class)[0] ?? null) { - continue; - } - - if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { - throw new \LogicException(sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name)); - } - - if (!$returnType = $method->getReturnType()) { - throw new \LogicException(sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class)); - } - - $serviceId = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; - - if ($returnType->allowsNull()) { - $serviceId = '?'.$serviceId; - } - - $services[$attribute->newInstance()->key ?? self::class.'::'.$method->name] = $serviceId; - $attributeOptIn = true; - } - } - - if (!$attributeOptIn) { - foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { - if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { - continue; - } - - if (self::class !== $method->getDeclaringClass()->name) { - continue; - } - - if (!($returnType = $method->getReturnType()) instanceof \ReflectionNamedType) { - continue; - } - - if ($returnType->isBuiltin()) { - continue; - } - - if (\PHP_VERSION_ID >= 80000) { - trigger_deprecation('symfony/service-contracts', '2.5', 'Using "%s" in "%s" without using the "%s" attribute on any method is deprecated.', ServiceSubscriberTrait::class, self::class, SubscribedService::class); - } - - $services[self::class.'::'.$method->name] = '?'.($returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType); - } - } - - return $services; - } - - /** - * @required - * - * @return ContainerInterface|null - */ - public function setContainer(ContainerInterface $container) - { - $ret = null; - if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) { - $ret = parent::setContainer($container); - } - - $this->container = $container; - - return $ret; - } -} diff --git a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php b/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php deleted file mode 100644 index 07d12b4..0000000 --- a/vendor/symfony/service-contracts/Test/ServiceLocatorTest.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Test; - -class_alias(ServiceLocatorTestCase::class, ServiceLocatorTest::class); - -if (false) { - /** - * @deprecated since PHPUnit 9.6 - */ - class ServiceLocatorTest - { - } -} diff --git a/vendor/symfony/service-contracts/Test/ServiceLocatorTestCase.php b/vendor/symfony/service-contracts/Test/ServiceLocatorTestCase.php deleted file mode 100644 index 8696db7..0000000 --- a/vendor/symfony/service-contracts/Test/ServiceLocatorTestCase.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Service\Test; - -use PHPUnit\Framework\TestCase; -use Psr\Container\ContainerInterface; -use Symfony\Contracts\Service\ServiceLocatorTrait; - -abstract class ServiceLocatorTestCase extends TestCase -{ - /** - * @return ContainerInterface - */ - protected function getServiceLocator(array $factories) - { - return new class($factories) implements ContainerInterface { - use ServiceLocatorTrait; - }; - } - - public function testHas() - { - $locator = $this->getServiceLocator([ - 'foo' => function () { return 'bar'; }, - 'bar' => function () { return 'baz'; }, - function () { return 'dummy'; }, - ]); - - $this->assertTrue($locator->has('foo')); - $this->assertTrue($locator->has('bar')); - $this->assertFalse($locator->has('dummy')); - } - - public function testGet() - { - $locator = $this->getServiceLocator([ - 'foo' => function () { return 'bar'; }, - 'bar' => function () { return 'baz'; }, - ]); - - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame('baz', $locator->get('bar')); - } - - public function testGetDoesNotMemoize() - { - $i = 0; - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$i) { - ++$i; - - return 'bar'; - }, - ]); - - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame('bar', $locator->get('foo')); - $this->assertSame(2, $i); - } - - public function testThrowsOnUndefinedInternalService() - { - if (!$this->getExpectedException()) { - $this->expectException(\Psr\Container\NotFoundExceptionInterface::class); - $this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.'); - } - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$locator) { return $locator->get('bar'); }, - ]); - - $locator->get('foo'); - } - - public function testThrowsOnCircularReference() - { - $this->expectException(\Psr\Container\ContainerExceptionInterface::class); - $this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".'); - $locator = $this->getServiceLocator([ - 'foo' => function () use (&$locator) { return $locator->get('bar'); }, - 'bar' => function () use (&$locator) { return $locator->get('baz'); }, - 'baz' => function () use (&$locator) { return $locator->get('bar'); }, - ]); - - $locator->get('foo'); - } -} diff --git a/vendor/symfony/service-contracts/composer.json b/vendor/symfony/service-contracts/composer.json deleted file mode 100644 index f058637..0000000 --- a/vendor/symfony/service-contracts/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "symfony/service-contracts", - "type": "library", - "description": "Generic abstractions related to writing services", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "suggest": { - "symfony/service-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Service\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/translation-contracts/.gitignore b/vendor/symfony/translation-contracts/.gitignore deleted file mode 100644 index c49a5d8..0000000 --- a/vendor/symfony/translation-contracts/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -vendor/ -composer.lock -phpunit.xml diff --git a/vendor/symfony/translation-contracts/CHANGELOG.md b/vendor/symfony/translation-contracts/CHANGELOG.md deleted file mode 100644 index 7932e26..0000000 --- a/vendor/symfony/translation-contracts/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -CHANGELOG -========= - -The changelog is maintained for all Symfony contracts at the following URL: -https://github.com/symfony/contracts/blob/main/CHANGELOG.md diff --git a/vendor/symfony/translation-contracts/LICENSE b/vendor/symfony/translation-contracts/LICENSE deleted file mode 100644 index 7536cae..0000000 --- a/vendor/symfony/translation-contracts/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/translation-contracts/LocaleAwareInterface.php b/vendor/symfony/translation-contracts/LocaleAwareInterface.php deleted file mode 100644 index 693f92b..0000000 --- a/vendor/symfony/translation-contracts/LocaleAwareInterface.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -interface LocaleAwareInterface -{ - /** - * Sets the current locale. - * - * @param string $locale The locale - * - * @throws \InvalidArgumentException If the locale contains invalid characters - */ - public function setLocale(string $locale); - - /** - * Returns the current locale. - * - * @return string - */ - public function getLocale(); -} diff --git a/vendor/symfony/translation-contracts/README.md b/vendor/symfony/translation-contracts/README.md deleted file mode 100644 index 42e5c51..0000000 --- a/vendor/symfony/translation-contracts/README.md +++ /dev/null @@ -1,9 +0,0 @@ -Symfony Translation Contracts -============================= - -A set of abstractions extracted out of the Symfony components. - -Can be used to build on semantics that the Symfony components proved useful - and -that already have battle tested implementations. - -See https://github.com/symfony/contracts/blob/main/README.md for more information. diff --git a/vendor/symfony/translation-contracts/Test/TranslatorTest.php b/vendor/symfony/translation-contracts/Test/TranslatorTest.php deleted file mode 100644 index dff86dd..0000000 --- a/vendor/symfony/translation-contracts/Test/TranslatorTest.php +++ /dev/null @@ -1,390 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation\Test; - -use PHPUnit\Framework\TestCase; -use Symfony\Contracts\Translation\TranslatorInterface; -use Symfony\Contracts\Translation\TranslatorTrait; - -/** - * Test should cover all languages mentioned on http://translate.sourceforge.net/wiki/l10n/pluralforms - * and Plural forms mentioned on http://www.gnu.org/software/gettext/manual/gettext.html#Plural-forms. - * - * See also https://developer.mozilla.org/en/Localization_and_Plurals which mentions 15 rules having a maximum of 6 forms. - * The mozilla code is also interesting to check for. - * - * As mentioned by chx http://drupal.org/node/1273968 we can cover all by testing number from 0 to 199 - * - * The goal to cover all languages is to far fetched so this test case is smaller. - * - * @author Clemens Tolboom clemens@build2be.nl - */ -class TranslatorTest extends TestCase -{ - private $defaultLocale; - - protected function setUp(): void - { - $this->defaultLocale = \Locale::getDefault(); - \Locale::setDefault('en'); - } - - protected function tearDown(): void - { - \Locale::setDefault($this->defaultLocale); - } - - /** - * @return TranslatorInterface - */ - public function getTranslator() - { - return new class() implements TranslatorInterface { - use TranslatorTrait; - }; - } - - /** - * @dataProvider getTransTests - */ - public function testTrans($expected, $id, $parameters) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($id, $parameters)); - } - - /** - * @dataProvider getTransChoiceTests - */ - public function testTransChoiceWithExplicitLocale($expected, $id, $number) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number])); - } - - /** - * @requires extension intl - * - * @dataProvider getTransChoiceTests - */ - public function testTransChoiceWithDefaultLocale($expected, $id, $number) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number])); - } - - /** - * @dataProvider getTransChoiceTests - */ - public function testTransChoiceWithEnUsPosix($expected, $id, $number) - { - $translator = $this->getTranslator(); - $translator->setLocale('en_US_POSIX'); - - $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number])); - } - - public function testGetSetLocale() - { - $translator = $this->getTranslator(); - - $this->assertEquals('en', $translator->getLocale()); - } - - /** - * @requires extension intl - */ - public function testGetLocaleReturnsDefaultLocaleIfNotSet() - { - $translator = $this->getTranslator(); - - \Locale::setDefault('pt_BR'); - $this->assertEquals('pt_BR', $translator->getLocale()); - - \Locale::setDefault('en'); - $this->assertEquals('en', $translator->getLocale()); - } - - public static function getTransTests() - { - return [ - ['Symfony is great!', 'Symfony is great!', []], - ['Symfony is awesome!', 'Symfony is %what%!', ['%what%' => 'awesome']], - ]; - } - - public static function getTransChoiceTests() - { - return [ - ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1], - ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10], - ['There are 0 apples', 'There is 1 apple|There are %count% apples', 0], - ['There is 1 apple', 'There is 1 apple|There are %count% apples', 1], - ['There are 10 apples', 'There is 1 apple|There are %count% apples', 10], - // custom validation messages may be coded with a fixed value - ['There are 2 apples', 'There are 2 apples', 2], - ]; - } - - /** - * @dataProvider getInterval - */ - public function testInterval($expected, $number, $interval) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($interval.' foo|[1,Inf[ bar', ['%count%' => $number])); - } - - public static function getInterval() - { - return [ - ['foo', 3, '{1,2, 3 ,4}'], - ['bar', 10, '{1,2, 3 ,4}'], - ['bar', 3, '[1,2]'], - ['foo', 1, '[1,2]'], - ['foo', 2, '[1,2]'], - ['bar', 1, ']1,2['], - ['bar', 2, ']1,2['], - ['foo', log(0), '[-Inf,2['], - ['foo', -log(0), '[-2,+Inf]'], - ]; - } - - /** - * @dataProvider getChooseTests - */ - public function testChoose($expected, $id, $number, $locale = null) - { - $translator = $this->getTranslator(); - - $this->assertEquals($expected, $translator->trans($id, ['%count%' => $number], null, $locale)); - } - - public function testReturnMessageIfExactlyOneStandardRuleIsGiven() - { - $translator = $this->getTranslator(); - - $this->assertEquals('There are two apples', $translator->trans('There are two apples', ['%count%' => 2])); - } - - /** - * @dataProvider getNonMatchingMessages - */ - public function testThrowExceptionIfMatchingMessageCannotBeFound($id, $number) - { - $this->expectException(\InvalidArgumentException::class); - $translator = $this->getTranslator(); - - $translator->trans($id, ['%count%' => $number]); - } - - public static function getNonMatchingMessages() - { - return [ - ['{0} There are no apples|{1} There is one apple', 2], - ['{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['{1} There is one apple|]2,Inf] There are %count% apples', 2], - ['{0} There are no apples|There is one apple', 2], - ]; - } - - public static function getChooseTests() - { - return [ - ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['There are no apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['There are no apples', '{0}There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 0], - - ['There is one apple', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 1], - - ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10], - ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf]There are %count% apples', 10], - ['There are 10 apples', '{0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples', 10], - - ['There are 0 apples', 'There is one apple|There are %count% apples', 0], - ['There is one apple', 'There is one apple|There are %count% apples', 1], - ['There are 10 apples', 'There is one apple|There are %count% apples', 10], - - ['There are 0 apples', 'one: There is one apple|more: There are %count% apples', 0], - ['There is one apple', 'one: There is one apple|more: There are %count% apples', 1], - ['There are 10 apples', 'one: There is one apple|more: There are %count% apples', 10], - - ['There are no apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 0], - ['There is one apple', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 1], - ['There are 10 apples', '{0} There are no apples|one: There is one apple|more: There are %count% apples', 10], - - ['', '{0}|{1} There is one apple|]1,Inf] There are %count% apples', 0], - ['', '{0} There are no apples|{1}|]1,Inf] There are %count% apples', 1], - - // Indexed only tests which are Gettext PoFile* compatible strings. - ['There are 0 apples', 'There is one apple|There are %count% apples', 0], - ['There is one apple', 'There is one apple|There are %count% apples', 1], - ['There are 2 apples', 'There is one apple|There are %count% apples', 2], - - // Tests for float numbers - ['There is almost one apple', '{0} There are no apples|]0,1[ There is almost one apple|{1} There is one apple|[1,Inf] There is more than one apple', 0.7], - ['There is one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1], - ['There is more than one apple', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 1.7], - ['There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0], - ['There are no apples', '{0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0.0], - ['There are no apples', '{0.0} There are no apples|]0,1[There are %count% apples|{1} There is one apple|[1,Inf] There is more than one apple', 0], - - // Test texts with new-lines - // with double-quotes and \n in id & double-quotes and actual newlines in text - ["This is a text with a\n new-line in it. Selector = 0.", '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 0], - // with double-quotes and \n in id and single-quotes and actual newlines in text - ["This is a text with a\n new-line in it. Selector = 1.", '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 1], - ["This is a text with a\n new-line in it. Selector > 1.", '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 5], - // with double-quotes and id split across lines - ['This is a text with a - new-line in it. Selector = 1.', '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 1], - // with single-quotes and id split across lines - ['This is a text with a - new-line in it. Selector > 1.', '{0}This is a text with a - new-line in it. Selector = 0.|{1}This is a text with a - new-line in it. Selector = 1.|[1,Inf]This is a text with a - new-line in it. Selector > 1.', 5], - // with single-quotes and \n in text - ['This is a text with a\nnew-line in it. Selector = 0.', '{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.', 0], - // with double-quotes and id split across lines - ["This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1], - // escape pipe - ['This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0], - // Empty plural set (2 plural forms) from a .PO file - ['', '|', 1], - // Empty plural set (3 plural forms) from a .PO file - ['', '||', 1], - - // Floating values - ['1.5 liters', '%count% liter|%count% liters', 1.5], - ['1.5 litre', '%count% litre|%count% litres', 1.5, 'fr'], - - // Negative values - ['-1 degree', '%count% degree|%count% degrees', -1], - ['-1 degré', '%count% degré|%count% degrés', -1], - ['-1.5 degrees', '%count% degree|%count% degrees', -1.5], - ['-1.5 degré', '%count% degré|%count% degrés', -1.5, 'fr'], - ['-2 degrees', '%count% degree|%count% degrees', -2], - ['-2 degrés', '%count% degré|%count% degrés', -2], - ]; - } - - /** - * @dataProvider failingLangcodes - */ - public function testFailedLangcodes($nplural, $langCodes) - { - $matrix = $this->generateTestData($langCodes); - $this->validateMatrix($nplural, $matrix, false); - } - - /** - * @dataProvider successLangcodes - */ - public function testLangcodes($nplural, $langCodes) - { - $matrix = $this->generateTestData($langCodes); - $this->validateMatrix($nplural, $matrix); - } - - /** - * This array should contain all currently known langcodes. - * - * As it is impossible to have this ever complete we should try as hard as possible to have it almost complete. - * - * @return array - */ - public static function successLangcodes() - { - return [ - ['1', ['ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky']], - ['2', ['nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM', 'en_US_POSIX']], - ['3', ['be', 'bs', 'cs', 'hr']], - ['4', ['cy', 'mt', 'sl']], - ['6', ['ar']], - ]; - } - - /** - * This array should be at least empty within the near future. - * - * This both depends on a complete list trying to add above as understanding - * the plural rules of the current failing languages. - * - * @return array with nplural together with langcodes - */ - public static function failingLangcodes() - { - return [ - ['1', ['fa']], - ['2', ['jbo']], - ['3', ['cbs']], - ['4', ['gd', 'kw']], - ['5', ['ga']], - ]; - } - - /** - * We validate only on the plural coverage. Thus the real rules is not tested. - * - * @param string $nplural Plural expected - * @param array $matrix Containing langcodes and their plural index values - * @param bool $expectSuccess - */ - protected function validateMatrix($nplural, $matrix, $expectSuccess = true) - { - foreach ($matrix as $langCode => $data) { - $indexes = array_flip($data); - if ($expectSuccess) { - $this->assertCount($nplural, $indexes, "Langcode '$langCode' has '$nplural' plural forms."); - } else { - $this->assertNotEquals((int) $nplural, \count($indexes), "Langcode '$langCode' has '$nplural' plural forms."); - } - } - } - - protected function generateTestData($langCodes) - { - $translator = new class() { - use TranslatorTrait { - getPluralizationRule as public; - } - }; - - $matrix = []; - foreach ($langCodes as $langCode) { - for ($count = 0; $count < 200; ++$count) { - $plural = $translator->getPluralizationRule($count, $langCode); - $matrix[$langCode][$count] = $plural; - } - } - - return $matrix; - } -} diff --git a/vendor/symfony/translation-contracts/TranslatableInterface.php b/vendor/symfony/translation-contracts/TranslatableInterface.php deleted file mode 100644 index 8554697..0000000 --- a/vendor/symfony/translation-contracts/TranslatableInterface.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -interface TranslatableInterface -{ - public function trans(TranslatorInterface $translator, ?string $locale = null): string; -} diff --git a/vendor/symfony/translation-contracts/TranslatorInterface.php b/vendor/symfony/translation-contracts/TranslatorInterface.php deleted file mode 100644 index 85ca166..0000000 --- a/vendor/symfony/translation-contracts/TranslatorInterface.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -/** - * @author Fabien Potencier <fabien@symfony.com> - * - * @method string getLocale() Returns the default locale - */ -interface TranslatorInterface -{ - /** - * Translates the given message. - * - * When a number is provided as a parameter named "%count%", the message is parsed for plural - * forms and a translation is chosen according to this number using the following rules: - * - * Given a message with different plural translations separated by a - * pipe (|), this method returns the correct portion of the message based - * on the given number, locale and the pluralization rules in the message - * itself. - * - * The message supports two different types of pluralization rules: - * - * interval: {0} There are no apples|{1} There is one apple|]1,Inf] There are %count% apples - * indexed: There is one apple|There are %count% apples - * - * The indexed solution can also contain labels (e.g. one: There is one apple). - * This is purely for making the translations more clear - it does not - * affect the functionality. - * - * The two methods can also be mixed: - * {0} There are no apples|one: There is one apple|more: There are %count% apples - * - * An interval can represent a finite set of numbers: - * {1,2,3,4} - * - * An interval can represent numbers between two numbers: - * [1, +Inf] - * ]-1,2[ - * - * The left delimiter can be [ (inclusive) or ] (exclusive). - * The right delimiter can be [ (exclusive) or ] (inclusive). - * Beside numbers, you can use -Inf and +Inf for the infinite. - * - * @see https://en.wikipedia.org/wiki/ISO_31-11 - * - * @param string $id The message id (may also be an object that can be cast to string) - * @param array $parameters An array of parameters for the message - * @param string|null $domain The domain for the message or null to use the default - * @param string|null $locale The locale or null to use the default - * - * @return string - * - * @throws \InvalidArgumentException If the locale contains invalid characters - */ - public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null); -} diff --git a/vendor/symfony/translation-contracts/TranslatorTrait.php b/vendor/symfony/translation-contracts/TranslatorTrait.php deleted file mode 100644 index ac01d73..0000000 --- a/vendor/symfony/translation-contracts/TranslatorTrait.php +++ /dev/null @@ -1,262 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Contracts\Translation; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; - -/** - * A trait to help implement TranslatorInterface and LocaleAwareInterface. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -trait TranslatorTrait -{ - private $locale; - - /** - * {@inheritdoc} - */ - public function setLocale(string $locale) - { - $this->locale = $locale; - } - - /** - * {@inheritdoc} - * - * @return string - */ - public function getLocale() - { - return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); - } - - /** - * {@inheritdoc} - */ - public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string - { - if (null === $id || '' === $id) { - return ''; - } - - if (!isset($parameters['%count%']) || !is_numeric($parameters['%count%'])) { - return strtr($id, $parameters); - } - - $number = (float) $parameters['%count%']; - $locale = $locale ?: $this->getLocale(); - - $parts = []; - if (preg_match('/^\|++$/', $id)) { - $parts = explode('|', $id); - } elseif (preg_match_all('/(?:\|\||[^\|])++/', $id, $matches)) { - $parts = $matches[0]; - } - - $intervalRegexp = <<<'EOF' -/^(?P<interval> - ({\s* - (\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*) - \s*}) - - | - - (?P<left_delimiter>[\[\]]) - \s* - (?P<left>-Inf|\-?\d+(\.\d+)?) - \s*,\s* - (?P<right>\+?Inf|\-?\d+(\.\d+)?) - \s* - (?P<right_delimiter>[\[\]]) -)\s*(?P<message>.*?)$/xs -EOF; - - $standardRules = []; - foreach ($parts as $part) { - $part = trim(str_replace('||', '|', $part)); - - // try to match an explicit rule, then fallback to the standard ones - if (preg_match($intervalRegexp, $part, $matches)) { - if ($matches[2]) { - foreach (explode(',', $matches[3]) as $n) { - if ($number == $n) { - return strtr($matches['message'], $parameters); - } - } - } else { - $leftNumber = '-Inf' === $matches['left'] ? -\INF : (float) $matches['left']; - $rightNumber = is_numeric($matches['right']) ? (float) $matches['right'] : \INF; - - if (('[' === $matches['left_delimiter'] ? $number >= $leftNumber : $number > $leftNumber) - && (']' === $matches['right_delimiter'] ? $number <= $rightNumber : $number < $rightNumber) - ) { - return strtr($matches['message'], $parameters); - } - } - } elseif (preg_match('/^\w+\:\s*(.*?)$/', $part, $matches)) { - $standardRules[] = $matches[1]; - } else { - $standardRules[] = $part; - } - } - - $position = $this->getPluralizationRule($number, $locale); - - if (!isset($standardRules[$position])) { - // when there's exactly one rule given, and that rule is a standard - // rule, use this rule - if (1 === \count($parts) && isset($standardRules[0])) { - return strtr($standardRules[0], $parameters); - } - - $message = sprintf('Unable to choose a translation for "%s" with locale "%s" for value "%d". Double check that this translation has the correct plural options (e.g. "There is one apple|There are %%count%% apples").', $id, $locale, $number); - - if (class_exists(InvalidArgumentException::class)) { - throw new InvalidArgumentException($message); - } - - throw new \InvalidArgumentException($message); - } - - return strtr($standardRules[$position], $parameters); - } - - /** - * Returns the plural position to use for the given locale and number. - * - * The plural rules are derived from code of the Zend Framework (2010-09-25), - * which is subject to the new BSD license (http://framework.zend.com/license/new-bsd). - * Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) - */ - private function getPluralizationRule(float $number, string $locale): int - { - $number = abs($number); - - switch ('pt_BR' !== $locale && 'en_US_POSIX' !== $locale && \strlen($locale) > 3 ? substr($locale, 0, strrpos($locale, '_')) : $locale) { - case 'af': - case 'bn': - case 'bg': - case 'ca': - case 'da': - case 'de': - case 'el': - case 'en': - case 'en_US_POSIX': - case 'eo': - case 'es': - case 'et': - case 'eu': - case 'fa': - case 'fi': - case 'fo': - case 'fur': - case 'fy': - case 'gl': - case 'gu': - case 'ha': - case 'he': - case 'hu': - case 'is': - case 'it': - case 'ku': - case 'lb': - case 'ml': - case 'mn': - case 'mr': - case 'nah': - case 'nb': - case 'ne': - case 'nl': - case 'nn': - case 'no': - case 'oc': - case 'om': - case 'or': - case 'pa': - case 'pap': - case 'ps': - case 'pt': - case 'so': - case 'sq': - case 'sv': - case 'sw': - case 'ta': - case 'te': - case 'tk': - case 'ur': - case 'zu': - return (1 == $number) ? 0 : 1; - - case 'am': - case 'bh': - case 'fil': - case 'fr': - case 'gun': - case 'hi': - case 'hy': - case 'ln': - case 'mg': - case 'nso': - case 'pt_BR': - case 'ti': - case 'wa': - return ($number < 2) ? 0 : 1; - - case 'be': - case 'bs': - case 'hr': - case 'ru': - case 'sh': - case 'sr': - case 'uk': - return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - - case 'cs': - case 'sk': - return (1 == $number) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); - - case 'ga': - return (1 == $number) ? 0 : ((2 == $number) ? 1 : 2); - - case 'lt': - return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); - - case 'sl': - return (1 == $number % 100) ? 0 : ((2 == $number % 100) ? 1 : (((3 == $number % 100) || (4 == $number % 100)) ? 2 : 3)); - - case 'mk': - return (1 == $number % 10) ? 0 : 1; - - case 'mt': - return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); - - case 'lv': - return (0 == $number) ? 0 : (((1 == $number % 10) && (11 != $number % 100)) ? 1 : 2); - - case 'pl': - return (1 == $number) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); - - case 'cy': - return (1 == $number) ? 0 : ((2 == $number) ? 1 : (((8 == $number) || (11 == $number)) ? 2 : 3)); - - case 'ro': - return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); - - case 'ar': - return (0 == $number) ? 0 : ((1 == $number) ? 1 : ((2 == $number) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); - - default: - return 0; - } - } -} diff --git a/vendor/symfony/translation-contracts/composer.json b/vendor/symfony/translation-contracts/composer.json deleted file mode 100644 index 65fe243..0000000 --- a/vendor/symfony/translation-contracts/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "symfony/translation-contracts", - "type": "library", - "description": "Generic abstractions related to translation", - "keywords": ["abstractions", "contracts", "decoupling", "interfaces", "interoperability", "standards"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5" - }, - "suggest": { - "symfony/translation-implementation": "" - }, - "autoload": { - "psr-4": { "Symfony\\Contracts\\Translation\\": "" } - }, - "minimum-stability": "dev", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - } -} diff --git a/vendor/symfony/translation/CHANGELOG.md b/vendor/symfony/translation/CHANGELOG.md deleted file mode 100644 index 93615dc..0000000 --- a/vendor/symfony/translation/CHANGELOG.md +++ /dev/null @@ -1,183 +0,0 @@ -CHANGELOG -========= - -5.4.21 ------- - - * [BC BREAK] The following data providers for `ProviderFactoryTestCase` are now static: - `supportsProvider()`, `createProvider()`, `unsupportedSchemeProvider()`and `incompleteDsnProvider()` - * [BC BREAK] `ProviderTestCase::toStringProvider()` is now static - -5.4 ---- - - * Add `github` format & autodetection to render errors as annotations when - running the XLIFF linter command in a Github Actions environment. - * Translation providers are not experimental anymore - -5.3 ---- - - * Add `translation:pull` and `translation:push` commands to manage translations with third-party providers - * Add `TranslatorBagInterface::getCatalogues` method - * Add support to load XLIFF string in `XliffFileLoader` - -5.2.0 ------ - - * added support for calling `trans` with ICU formatted messages - * added `PseudoLocalizationTranslator` - * added `TranslatableMessage` objects that represent a message that can be translated - * added the `t()` function to easily create `TranslatableMessage` objects - * Added support for extracting messages from `TranslatableMessage` objects - -5.1.0 ------ - - * added support for `name` attribute on `unit` element from xliff2 to be used as a translation key instead of always the `source` element - -5.0.0 ------ - - * removed support for using `null` as the locale in `Translator` - * removed `TranslatorInterface` - * removed `MessageSelector` - * removed `ChoiceMessageFormatterInterface` - * removed `PluralizationRule` - * removed `Interval` - * removed `transChoice()` methods, use the trans() method instead with a %count% parameter - * removed `FileDumper::setBackup()` and `TranslationWriter::disableBackup()` - * removed `MessageFormatter::choiceFormat()` - * added argument `$filename` to `PhpExtractor::parseTokens()` - * removed support for implicit STDIN usage in the `lint:xliff` command, use `lint:xliff -` (append a dash) instead to make it explicit. - -4.4.0 ------ - - * deprecated support for using `null` as the locale in `Translator` - * deprecated accepting STDIN implicitly when using the `lint:xliff` command, use `lint:xliff -` (append a dash) instead to make it explicit. - * Marked the `TranslationDataCollector` class as `@final`. - -4.3.0 ------ - - * Improved Xliff 1.2 loader to load the original file's metadata - * Added `TranslatorPathsPass` - -4.2.0 ------ - - * Started using ICU parent locales as fallback locales. - * allow using the ICU message format using domains with the "+intl-icu" suffix - * deprecated `Translator::transChoice()` in favor of using `Translator::trans()` with a `%count%` parameter - * deprecated `TranslatorInterface` in favor of `Symfony\Contracts\Translation\TranslatorInterface` - * deprecated `MessageSelector`, `Interval` and `PluralizationRules`; use `IdentityTranslator` instead - * Added `IntlFormatter` and `IntlFormatterInterface` - * added support for multiple files and directories in `XliffLintCommand` - * Marked `Translator::getFallbackLocales()` and `TranslationDataCollector::getFallbackLocales()` as internal - -4.1.0 ------ - - * The `FileDumper::setBackup()` method is deprecated. - * The `TranslationWriter::disableBackup()` method is deprecated. - * The `XliffFileDumper` will write "name" on the "unit" node when dumping XLIFF 2.0. - -4.0.0 ------ - - * removed the backup feature of the `FileDumper` class - * removed `TranslationWriter::writeTranslations()` method - * removed support for passing `MessageSelector` instances to the constructor of the `Translator` class - -3.4.0 ------ - - * Added `TranslationDumperPass` - * Added `TranslationExtractorPass` - * Added `TranslatorPass` - * Added `TranslationReader` and `TranslationReaderInterface` - * Added `<notes>` section to the Xliff 2.0 dumper. - * Improved Xliff 2.0 loader to load `<notes>` section. - * Added `TranslationWriterInterface` - * Deprecated `TranslationWriter::writeTranslations` in favor of `TranslationWriter::write` - * added support for adding custom message formatter and decoupling the default one. - * Added `PhpExtractor` - * Added `PhpStringTokenParser` - -3.2.0 ------ - - * Added support for escaping `|` in plural translations with double pipe. - -3.1.0 ------ - - * Deprecated the backup feature of the file dumper classes. - -3.0.0 ------ - - * removed `FileDumper::format()` method. - * Changed the visibility of the locale property in `Translator` from protected to private. - -2.8.0 ------ - - * deprecated FileDumper::format(), overwrite FileDumper::formatCatalogue() instead. - * deprecated Translator::getMessages(), rely on TranslatorBagInterface::getCatalogue() instead. - * added `FileDumper::formatCatalogue` which allows format the catalogue without dumping it into file. - * added option `json_encoding` to JsonFileDumper - * added options `as_tree`, `inline` to YamlFileDumper - * added support for XLIFF 2.0. - * added support for XLIFF target and tool attributes. - * added message parameters to DataCollectorTranslator. - * [DEPRECATION] The `DiffOperation` class has been deprecated and - will be removed in Symfony 3.0, since its operation has nothing to do with 'diff', - so the class name is misleading. The `TargetOperation` class should be used for - this use-case instead. - -2.7.0 ------ - - * added DataCollectorTranslator for collecting the translated messages. - -2.6.0 ------ - - * added possibility to cache catalogues - * added TranslatorBagInterface - * added LoggingTranslator - * added Translator::getMessages() for retrieving the message catalogue as an array - -2.5.0 ------ - - * added relative file path template to the file dumpers - * added optional backup to the file dumpers - * changed IcuResFileDumper to extend FileDumper - -2.3.0 ------ - - * added classes to make operations on catalogues (like making a diff or a merge on 2 catalogues) - * added Translator::getFallbackLocales() - * deprecated Translator::setFallbackLocale() in favor of the new Translator::setFallbackLocales() method - -2.2.0 ------ - - * QtTranslationsLoader class renamed to QtFileLoader. QtTranslationsLoader is deprecated and will be removed in 2.3. - * [BC BREAK] uniformized the exception thrown by the load() method when an error occurs. The load() method now - throws Symfony\Component\Translation\Exception\NotFoundResourceException when a resource cannot be found - and Symfony\Component\Translation\Exception\InvalidResourceException when a resource is invalid. - * changed the exception class thrown by some load() methods from \RuntimeException to \InvalidArgumentException - (IcuDatFileLoader, IcuResFileLoader and QtFileLoader) - -2.1.0 ------ - - * added support for more than one fallback locale - * added support for extracting translation messages from templates (Twig and PHP) - * added dumpers for translation catalogs - * added support for QT, gettext, and ResourceBundles diff --git a/vendor/symfony/translation/Catalogue/AbstractOperation.php b/vendor/symfony/translation/Catalogue/AbstractOperation.php deleted file mode 100644 index 98d42e5..0000000 --- a/vendor/symfony/translation/Catalogue/AbstractOperation.php +++ /dev/null @@ -1,203 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Catalogue; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Exception\LogicException; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageCatalogueInterface; - -/** - * Base catalogues binary operation class. - * - * A catalogue binary operation performs operation on - * source (the left argument) and target (the right argument) catalogues. - * - * @author Jean-François Simon <contact@jfsimon.fr> - */ -abstract class AbstractOperation implements OperationInterface -{ - public const OBSOLETE_BATCH = 'obsolete'; - public const NEW_BATCH = 'new'; - public const ALL_BATCH = 'all'; - - protected $source; - protected $target; - protected $result; - - /** - * @var array|null The domains affected by this operation - */ - private $domains; - - /** - * This array stores 'all', 'new' and 'obsolete' messages for all valid domains. - * - * The data structure of this array is as follows: - * - * [ - * 'domain 1' => [ - * 'all' => [...], - * 'new' => [...], - * 'obsolete' => [...] - * ], - * 'domain 2' => [ - * 'all' => [...], - * 'new' => [...], - * 'obsolete' => [...] - * ], - * ... - * ] - * - * @var array The array that stores 'all', 'new' and 'obsolete' messages - */ - protected $messages; - - /** - * @throws LogicException - */ - public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) - { - if ($source->getLocale() !== $target->getLocale()) { - throw new LogicException('Operated catalogues must belong to the same locale.'); - } - - $this->source = $source; - $this->target = $target; - $this->result = new MessageCatalogue($source->getLocale()); - $this->messages = []; - } - - /** - * {@inheritdoc} - */ - public function getDomains() - { - if (null === $this->domains) { - $domains = []; - foreach ([$this->source, $this->target] as $catalogue) { - foreach ($catalogue->getDomains() as $domain) { - $domains[$domain] = $domain; - - if ($catalogue->all($domainIcu = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX)) { - $domains[$domainIcu] = $domainIcu; - } - } - } - - $this->domains = array_values($domains); - } - - return $this->domains; - } - - /** - * {@inheritdoc} - */ - public function getMessages(string $domain) - { - if (!\in_array($domain, $this->getDomains())) { - throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain)); - } - - if (!isset($this->messages[$domain][self::ALL_BATCH])) { - $this->processDomain($domain); - } - - return $this->messages[$domain][self::ALL_BATCH]; - } - - /** - * {@inheritdoc} - */ - public function getNewMessages(string $domain) - { - if (!\in_array($domain, $this->getDomains())) { - throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain)); - } - - if (!isset($this->messages[$domain][self::NEW_BATCH])) { - $this->processDomain($domain); - } - - return $this->messages[$domain][self::NEW_BATCH]; - } - - /** - * {@inheritdoc} - */ - public function getObsoleteMessages(string $domain) - { - if (!\in_array($domain, $this->getDomains())) { - throw new InvalidArgumentException(sprintf('Invalid domain: "%s".', $domain)); - } - - if (!isset($this->messages[$domain][self::OBSOLETE_BATCH])) { - $this->processDomain($domain); - } - - return $this->messages[$domain][self::OBSOLETE_BATCH]; - } - - /** - * {@inheritdoc} - */ - public function getResult() - { - foreach ($this->getDomains() as $domain) { - if (!isset($this->messages[$domain])) { - $this->processDomain($domain); - } - } - - return $this->result; - } - - /** - * @param self::*_BATCH $batch - */ - public function moveMessagesToIntlDomainsIfPossible(string $batch = self::ALL_BATCH): void - { - // If MessageFormatter class does not exists, intl domains are not supported. - if (!class_exists(\MessageFormatter::class)) { - return; - } - - foreach ($this->getDomains() as $domain) { - $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX; - switch ($batch) { - case self::OBSOLETE_BATCH: $messages = $this->getObsoleteMessages($domain); break; - case self::NEW_BATCH: $messages = $this->getNewMessages($domain); break; - case self::ALL_BATCH: $messages = $this->getMessages($domain); break; - default: throw new \InvalidArgumentException(sprintf('$batch argument must be one of ["%s", "%s", "%s"].', self::ALL_BATCH, self::NEW_BATCH, self::OBSOLETE_BATCH)); - } - - if (!$messages || (!$this->source->all($intlDomain) && $this->source->all($domain))) { - continue; - } - - $result = $this->getResult(); - $allIntlMessages = $result->all($intlDomain); - $currentMessages = array_diff_key($messages, $result->all($domain)); - $result->replace($currentMessages, $domain); - $result->replace($allIntlMessages + $messages, $intlDomain); - } - } - - /** - * Performs operation on source and target catalogues for the given domain and - * stores the results. - * - * @param string $domain The domain which the operation will be performed for - */ - abstract protected function processDomain(string $domain); -} diff --git a/vendor/symfony/translation/Catalogue/MergeOperation.php b/vendor/symfony/translation/Catalogue/MergeOperation.php deleted file mode 100644 index 87db2fb..0000000 --- a/vendor/symfony/translation/Catalogue/MergeOperation.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Catalogue; - -use Symfony\Component\Translation\MessageCatalogueInterface; - -/** - * Merge operation between two catalogues as follows: - * all = source ∪ target = {x: x ∈ source ∨ x ∈ target} - * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} - * obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ source ∧ x ∉ target} = ∅ - * Basically, the result contains messages from both catalogues. - * - * @author Jean-François Simon <contact@jfsimon.fr> - */ -class MergeOperation extends AbstractOperation -{ - /** - * {@inheritdoc} - */ - protected function processDomain(string $domain) - { - $this->messages[$domain] = [ - 'all' => [], - 'new' => [], - 'obsolete' => [], - ]; - $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX; - - foreach ($this->source->all($domain) as $id => $message) { - $this->messages[$domain]['all'][$id] = $message; - $d = $this->source->defines($id, $intlDomain) ? $intlDomain : $domain; - $this->result->add([$id => $message], $d); - if (null !== $keyMetadata = $this->source->getMetadata($id, $d)) { - $this->result->setMetadata($id, $keyMetadata, $d); - } - } - - foreach ($this->target->all($domain) as $id => $message) { - if (!$this->source->has($id, $domain)) { - $this->messages[$domain]['all'][$id] = $message; - $this->messages[$domain]['new'][$id] = $message; - $d = $this->target->defines($id, $intlDomain) ? $intlDomain : $domain; - $this->result->add([$id => $message], $d); - if (null !== $keyMetadata = $this->target->getMetadata($id, $d)) { - $this->result->setMetadata($id, $keyMetadata, $d); - } - } - } - } -} diff --git a/vendor/symfony/translation/Catalogue/OperationInterface.php b/vendor/symfony/translation/Catalogue/OperationInterface.php deleted file mode 100644 index 9ffac88..0000000 --- a/vendor/symfony/translation/Catalogue/OperationInterface.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Catalogue; - -use Symfony\Component\Translation\MessageCatalogueInterface; - -/** - * Represents an operation on catalogue(s). - * - * An instance of this interface performs an operation on one or more catalogues and - * stores intermediate and final results of the operation. - * - * The first catalogue in its argument(s) is called the 'source catalogue' or 'source' and - * the following results are stored: - * - * Messages: also called 'all', are valid messages for the given domain after the operation is performed. - * - * New Messages: also called 'new' (new = all ∖ source = {x: x ∈ all ∧ x ∉ source}). - * - * Obsolete Messages: also called 'obsolete' (obsolete = source ∖ all = {x: x ∈ source ∧ x ∉ all}). - * - * Result: also called 'result', is the resulting catalogue for the given domain that holds the same messages as 'all'. - * - * @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com> - */ -interface OperationInterface -{ - /** - * Returns domains affected by operation. - * - * @return array - */ - public function getDomains(); - - /** - * Returns all valid messages ('all') after operation. - * - * @return array - */ - public function getMessages(string $domain); - - /** - * Returns new messages ('new') after operation. - * - * @return array - */ - public function getNewMessages(string $domain); - - /** - * Returns obsolete messages ('obsolete') after operation. - * - * @return array - */ - public function getObsoleteMessages(string $domain); - - /** - * Returns resulting catalogue ('result'). - * - * @return MessageCatalogueInterface - */ - public function getResult(); -} diff --git a/vendor/symfony/translation/Catalogue/TargetOperation.php b/vendor/symfony/translation/Catalogue/TargetOperation.php deleted file mode 100644 index 682b575..0000000 --- a/vendor/symfony/translation/Catalogue/TargetOperation.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Catalogue; - -use Symfony\Component\Translation\MessageCatalogueInterface; - -/** - * Target operation between two catalogues: - * intersection = source ∩ target = {x: x ∈ source ∧ x ∈ target} - * all = intersection ∪ (target ∖ intersection) = target - * new = all ∖ source = {x: x ∈ target ∧ x ∉ source} - * obsolete = source ∖ all = source ∖ target = {x: x ∈ source ∧ x ∉ target} - * Basically, the result contains messages from the target catalogue. - * - * @author Michael Lee <michael.lee@zerustech.com> - */ -class TargetOperation extends AbstractOperation -{ - /** - * {@inheritdoc} - */ - protected function processDomain(string $domain) - { - $this->messages[$domain] = [ - 'all' => [], - 'new' => [], - 'obsolete' => [], - ]; - $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX; - - // For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``, - // because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} - // - // For 'new' messages, the code can't be simplified as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` - // because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback} - // - // For 'obsolete' messages, the code can't be simplified as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` - // because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} - - foreach ($this->source->all($domain) as $id => $message) { - if ($this->target->has($id, $domain)) { - $this->messages[$domain]['all'][$id] = $message; - $d = $this->source->defines($id, $intlDomain) ? $intlDomain : $domain; - $this->result->add([$id => $message], $d); - if (null !== $keyMetadata = $this->source->getMetadata($id, $d)) { - $this->result->setMetadata($id, $keyMetadata, $d); - } - } else { - $this->messages[$domain]['obsolete'][$id] = $message; - } - } - - foreach ($this->target->all($domain) as $id => $message) { - if (!$this->source->has($id, $domain)) { - $this->messages[$domain]['all'][$id] = $message; - $this->messages[$domain]['new'][$id] = $message; - $d = $this->target->defines($id, $intlDomain) ? $intlDomain : $domain; - $this->result->add([$id => $message], $d); - if (null !== $keyMetadata = $this->target->getMetadata($id, $d)) { - $this->result->setMetadata($id, $keyMetadata, $d); - } - } - } - } -} diff --git a/vendor/symfony/translation/Command/TranslationPullCommand.php b/vendor/symfony/translation/Command/TranslationPullCommand.php deleted file mode 100644 index e2e7c00..0000000 --- a/vendor/symfony/translation/Command/TranslationPullCommand.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Translation\Catalogue\TargetOperation; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Provider\TranslationProviderCollection; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\Writer\TranslationWriterInterface; - -/** - * @author Mathieu Santostefano <msantostefano@protonmail.com> - */ -final class TranslationPullCommand extends Command -{ - use TranslationTrait; - - protected static $defaultName = 'translation:pull'; - protected static $defaultDescription = 'Pull translations from a given provider.'; - - private $providerCollection; - private $writer; - private $reader; - private $defaultLocale; - private $transPaths; - private $enabledLocales; - - public function __construct(TranslationProviderCollection $providerCollection, TranslationWriterInterface $writer, TranslationReaderInterface $reader, string $defaultLocale, array $transPaths = [], array $enabledLocales = []) - { - $this->providerCollection = $providerCollection; - $this->writer = $writer; - $this->reader = $reader; - $this->defaultLocale = $defaultLocale; - $this->transPaths = $transPaths; - $this->enabledLocales = $enabledLocales; - - parent::__construct(); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('provider')) { - $suggestions->suggestValues($this->providerCollection->keys()); - - return; - } - - if ($input->mustSuggestOptionValuesFor('domains')) { - $provider = $this->providerCollection->get($input->getArgument('provider')); - - if ($provider && method_exists($provider, 'getDomains')) { - $domains = $provider->getDomains(); - $suggestions->suggestValues($domains); - } - - return; - } - - if ($input->mustSuggestOptionValuesFor('locales')) { - $suggestions->suggestValues($this->enabledLocales); - - return; - } - - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['php', 'xlf', 'xlf12', 'xlf20', 'po', 'mo', 'yml', 'yaml', 'ts', 'csv', 'json', 'ini', 'res']); - } - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $keys = $this->providerCollection->keys(); - $defaultProvider = 1 === \count($keys) ? $keys[0] : null; - - $this - ->setDefinition([ - new InputArgument('provider', null !== $defaultProvider ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'The provider to pull translations from.', $defaultProvider), - new InputOption('force', null, InputOption::VALUE_NONE, 'Override existing translations with provider ones (it will delete not synchronized messages).'), - new InputOption('intl-icu', null, InputOption::VALUE_NONE, 'Associated to --force option, it will write messages in "%domain%+intl-icu.%locale%.xlf" files.'), - new InputOption('domains', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the domains to pull.'), - new InputOption('locales', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the locales to pull.'), - new InputOption('format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format.', 'xlf12'), - ]) - ->setHelp(<<<'EOF' -The <info>%command.name%</> command pulls translations from the given provider. Only -new translations are pulled, existing ones are not overwritten. - -You can overwrite existing translations (and remove the missing ones on local side) by using the <comment>--force</> flag: - - <info>php %command.full_name% --force provider</> - -Full example: - - <info>php %command.full_name% provider --force --domains=messages --domains=validators --locales=en</> - -This command pulls all translations associated with the <comment>messages</> and <comment>validators</> domains for the <comment>en</> locale. -Local translations for the specified domains and locale are deleted if they're not present on the provider and overwritten if it's the case. -Local translations for others domains and locales are ignored. -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - - $provider = $this->providerCollection->get($input->getArgument('provider')); - $force = $input->getOption('force'); - $intlIcu = $input->getOption('intl-icu'); - $locales = $input->getOption('locales') ?: $this->enabledLocales; - $domains = $input->getOption('domains'); - $format = $input->getOption('format'); - $xliffVersion = '1.2'; - - if ($intlIcu && !$force) { - $io->note('--intl-icu option only has an effect when used with --force. Here, it will be ignored.'); - } - - switch ($format) { - case 'xlf20': $xliffVersion = '2.0'; - // no break - case 'xlf12': $format = 'xlf'; - } - - $writeOptions = [ - 'path' => end($this->transPaths), - 'xliff_version' => $xliffVersion, - 'default_locale' => $this->defaultLocale, - ]; - - if (!$domains) { - $domains = $provider->getDomains(); - } - - $providerTranslations = $provider->read($domains, $locales); - - if ($force) { - foreach ($providerTranslations->getCatalogues() as $catalogue) { - $operation = new TargetOperation(new MessageCatalogue($catalogue->getLocale()), $catalogue); - if ($intlIcu) { - $operation->moveMessagesToIntlDomainsIfPossible(); - } - $this->writer->write($operation->getResult(), $format, $writeOptions); - } - - $io->success(sprintf('Local translations has been updated from "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); - - return 0; - } - - $localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths); - - // Append pulled translations to local ones. - $localTranslations->addBag($providerTranslations->diff($localTranslations)); - - foreach ($localTranslations->getCatalogues() as $catalogue) { - $this->writer->write($catalogue, $format, $writeOptions); - } - - $io->success(sprintf('New translations from "%s" has been written locally (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); - - return 0; - } -} diff --git a/vendor/symfony/translation/Command/TranslationPushCommand.php b/vendor/symfony/translation/Command/TranslationPushCommand.php deleted file mode 100644 index bf6e8c9..0000000 --- a/vendor/symfony/translation/Command/TranslationPushCommand.php +++ /dev/null @@ -1,189 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Translation\Provider\FilteringProvider; -use Symfony\Component\Translation\Provider\TranslationProviderCollection; -use Symfony\Component\Translation\Reader\TranslationReaderInterface; -use Symfony\Component\Translation\TranslatorBag; - -/** - * @author Mathieu Santostefano <msantostefano@protonmail.com> - */ -final class TranslationPushCommand extends Command -{ - use TranslationTrait; - - protected static $defaultName = 'translation:push'; - protected static $defaultDescription = 'Push translations to a given provider.'; - - private $providers; - private $reader; - private $transPaths; - private $enabledLocales; - - public function __construct(TranslationProviderCollection $providers, TranslationReaderInterface $reader, array $transPaths = [], array $enabledLocales = []) - { - $this->providers = $providers; - $this->reader = $reader; - $this->transPaths = $transPaths; - $this->enabledLocales = $enabledLocales; - - parent::__construct(); - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestArgumentValuesFor('provider')) { - $suggestions->suggestValues($this->providers->keys()); - - return; - } - - if ($input->mustSuggestOptionValuesFor('domains')) { - $provider = $this->providers->get($input->getArgument('provider')); - - if ($provider && method_exists($provider, 'getDomains')) { - $domains = $provider->getDomains(); - $suggestions->suggestValues($domains); - } - - return; - } - - if ($input->mustSuggestOptionValuesFor('locales')) { - $suggestions->suggestValues($this->enabledLocales); - } - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $keys = $this->providers->keys(); - $defaultProvider = 1 === \count($keys) ? $keys[0] : null; - - $this - ->setDefinition([ - new InputArgument('provider', null !== $defaultProvider ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'The provider to push translations to.', $defaultProvider), - new InputOption('force', null, InputOption::VALUE_NONE, 'Override existing translations with local ones (it will delete not synchronized messages).'), - new InputOption('delete-missing', null, InputOption::VALUE_NONE, 'Delete translations available on provider but not locally.'), - new InputOption('domains', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the domains to push.'), - new InputOption('locales', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Specify the locales to push.', $this->enabledLocales), - ]) - ->setHelp(<<<'EOF' -The <info>%command.name%</> command pushes translations to the given provider. Only new -translations are pushed, existing ones are not overwritten. - -You can overwrite existing translations by using the <comment>--force</> flag: - - <info>php %command.full_name% --force provider</> - -You can delete provider translations which are not present locally by using the <comment>--delete-missing</> flag: - - <info>php %command.full_name% --delete-missing provider</> - -Full example: - - <info>php %command.full_name% provider --force --delete-missing --domains=messages --domains=validators --locales=en</> - -This command pushes all translations associated with the <comment>messages</> and <comment>validators</> domains for the <comment>en</> locale. -Provider translations for the specified domains and locale are deleted if they're not present locally and overwritten if it's the case. -Provider translations for others domains and locales are ignored. -EOF - ) - ; - } - - /** - * {@inheritdoc} - */ - protected function execute(InputInterface $input, OutputInterface $output): int - { - $provider = $this->providers->get($input->getArgument('provider')); - - if (!$this->enabledLocales) { - throw new InvalidArgumentException(sprintf('You must define "framework.translator.enabled_locales" or "framework.translator.providers.%s.locales" config key in order to work with translation providers.', parse_url($provider, \PHP_URL_SCHEME))); - } - - $io = new SymfonyStyle($input, $output); - $domains = $input->getOption('domains'); - $locales = $input->getOption('locales'); - $force = $input->getOption('force'); - $deleteMissing = $input->getOption('delete-missing'); - - if (!$domains && $provider instanceof FilteringProvider) { - $domains = $provider->getDomains(); - } - - // Reading local translations must be done after retrieving the domains from the provider - // in order to manage only translations from configured domains - $localTranslations = $this->readLocalTranslations($locales, $domains, $this->transPaths); - - if (!$domains) { - $domains = $this->getDomainsFromTranslatorBag($localTranslations); - } - - if (!$deleteMissing && $force) { - $provider->write($localTranslations); - - $io->success(sprintf('All local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); - - return 0; - } - - $providerTranslations = $provider->read($domains, $locales); - - if ($deleteMissing) { - $provider->delete($providerTranslations->diff($localTranslations)); - - $io->success(sprintf('Missing translations on "%s" has been deleted (for "%s" locale(s), and "%s" domain(s)).', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); - - // Read provider translations again, after missing translations deletion, - // to avoid push freshly deleted translations. - $providerTranslations = $provider->read($domains, $locales); - } - - $translationsToWrite = $localTranslations->diff($providerTranslations); - - if ($force) { - $translationsToWrite->addBag($localTranslations->intersect($providerTranslations)); - } - - $provider->write($translationsToWrite); - - $io->success(sprintf('%s local translations has been sent to "%s" (for "%s" locale(s), and "%s" domain(s)).', $force ? 'All' : 'New', parse_url($provider, \PHP_URL_SCHEME), implode(', ', $locales), implode(', ', $domains))); - - return 0; - } - - private function getDomainsFromTranslatorBag(TranslatorBag $translatorBag): array - { - $domains = []; - - foreach ($translatorBag->getCatalogues() as $catalogue) { - $domains += $catalogue->getDomains(); - } - - return array_unique($domains); - } -} diff --git a/vendor/symfony/translation/Command/TranslationTrait.php b/vendor/symfony/translation/Command/TranslationTrait.php deleted file mode 100644 index eafaffd..0000000 --- a/vendor/symfony/translation/Command/TranslationTrait.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Command; - -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\MessageCatalogueInterface; -use Symfony\Component\Translation\TranslatorBag; - -/** - * @internal - */ -trait TranslationTrait -{ - private function readLocalTranslations(array $locales, array $domains, array $transPaths): TranslatorBag - { - $bag = new TranslatorBag(); - - foreach ($locales as $locale) { - $catalogue = new MessageCatalogue($locale); - foreach ($transPaths as $path) { - $this->reader->read($path, $catalogue); - } - - if ($domains) { - foreach ($domains as $domain) { - $bag->addCatalogue($this->filterCatalogue($catalogue, $domain)); - } - } else { - $bag->addCatalogue($catalogue); - } - } - - return $bag; - } - - private function filterCatalogue(MessageCatalogue $catalogue, string $domain): MessageCatalogue - { - $filteredCatalogue = new MessageCatalogue($catalogue->getLocale()); - - // extract intl-icu messages only - $intlDomain = $domain.MessageCatalogueInterface::INTL_DOMAIN_SUFFIX; - if ($intlMessages = $catalogue->all($intlDomain)) { - $filteredCatalogue->add($intlMessages, $intlDomain); - } - - // extract all messages and subtract intl-icu messages - if ($messages = array_diff($catalogue->all($domain), $intlMessages)) { - $filteredCatalogue->add($messages, $domain); - } - foreach ($catalogue->getResources() as $resource) { - $filteredCatalogue->addResource($resource); - } - - if ($metadata = $catalogue->getMetadata('', $intlDomain)) { - foreach ($metadata as $k => $v) { - $filteredCatalogue->setMetadata($k, $v, $intlDomain); - } - } - - if ($metadata = $catalogue->getMetadata('', $domain)) { - foreach ($metadata as $k => $v) { - $filteredCatalogue->setMetadata($k, $v, $domain); - } - } - - return $filteredCatalogue; - } -} diff --git a/vendor/symfony/translation/Command/XliffLintCommand.php b/vendor/symfony/translation/Command/XliffLintCommand.php deleted file mode 100644 index 0a0bc0e..0000000 --- a/vendor/symfony/translation/Command/XliffLintCommand.php +++ /dev/null @@ -1,286 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Command; - -use Symfony\Component\Console\CI\GithubActionReporter; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Completion\CompletionInput; -use Symfony\Component\Console\Completion\CompletionSuggestions; -use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Util\XliffUtils; - -/** - * Validates XLIFF files syntax and outputs encountered errors. - * - * @author Grégoire Pineau <lyrixx@lyrixx.info> - * @author Robin Chalas <robin.chalas@gmail.com> - * @author Javier Eguiluz <javier.eguiluz@gmail.com> - */ -class XliffLintCommand extends Command -{ - protected static $defaultName = 'lint:xliff'; - protected static $defaultDescription = 'Lint an XLIFF file and outputs encountered errors'; - - private $format; - private $displayCorrectFiles; - private $directoryIteratorProvider; - private $isReadableProvider; - private $requireStrictFileNames; - - public function __construct(?string $name = null, ?callable $directoryIteratorProvider = null, ?callable $isReadableProvider = null, bool $requireStrictFileNames = true) - { - parent::__construct($name); - - $this->directoryIteratorProvider = $directoryIteratorProvider; - $this->isReadableProvider = $isReadableProvider; - $this->requireStrictFileNames = $requireStrictFileNames; - } - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this - ->setDescription(self::$defaultDescription) - ->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN') - ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format') - ->setHelp(<<<EOF -The <info>%command.name%</info> command lints an XLIFF file and outputs to STDOUT -the first encountered syntax error. - -You can validates XLIFF contents passed from STDIN: - - <info>cat filename | php %command.full_name% -</info> - -You can also validate the syntax of a file: - - <info>php %command.full_name% filename</info> - -Or of a whole directory: - - <info>php %command.full_name% dirname</info> - <info>php %command.full_name% dirname --format=json</info> - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - $io = new SymfonyStyle($input, $output); - $filenames = (array) $input->getArgument('filename'); - $this->format = $input->getOption('format') ?? (GithubActionReporter::isGithubActionEnvironment() ? 'github' : 'txt'); - $this->displayCorrectFiles = $output->isVerbose(); - - if (['-'] === $filenames) { - return $this->display($io, [$this->validate(file_get_contents('php://stdin'))]); - } - - if (!$filenames) { - throw new RuntimeException('Please provide a filename or pipe file content to STDIN.'); - } - - $filesInfo = []; - foreach ($filenames as $filename) { - if (!$this->isReadable($filename)) { - throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); - } - - foreach ($this->getFiles($filename) as $file) { - $filesInfo[] = $this->validate(file_get_contents($file), $file); - } - } - - return $this->display($io, $filesInfo); - } - - private function validate(string $content, ?string $file = null): array - { - $errors = []; - - // Avoid: Warning DOMDocument::loadXML(): Empty string supplied as input - if ('' === trim($content)) { - return ['file' => $file, 'valid' => true]; - } - - $internal = libxml_use_internal_errors(true); - - $document = new \DOMDocument(); - $document->loadXML($content); - - if (null !== $targetLanguage = $this->getTargetLanguageFromFile($document)) { - $normalizedLocalePattern = sprintf('(%s|%s)', preg_quote($targetLanguage, '/'), preg_quote(str_replace('-', '_', $targetLanguage), '/')); - // strict file names require translation files to be named '____.locale.xlf' - // otherwise, both '____.locale.xlf' and 'locale.____.xlf' are allowed - // also, the regexp matching must be case-insensitive, as defined for 'target-language' values - // http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language - $expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.(?i:%s)\.(?:xlf|xliff)/', $normalizedLocalePattern) : sprintf('/^(?:.*\.(?i:%s)|(?i:%s)\..*)\.(?:xlf|xliff)/', $normalizedLocalePattern, $normalizedLocalePattern); - - if (0 === preg_match($expectedFilenamePattern, basename($file))) { - $errors[] = [ - 'line' => -1, - 'column' => -1, - 'message' => sprintf('There is a mismatch between the language included in the file name ("%s") and the "%s" value used in the "target-language" attribute of the file.', basename($file), $targetLanguage), - ]; - } - } - - foreach (XliffUtils::validateSchema($document) as $xmlError) { - $errors[] = [ - 'line' => $xmlError['line'], - 'column' => $xmlError['column'], - 'message' => $xmlError['message'], - ]; - } - - libxml_clear_errors(); - libxml_use_internal_errors($internal); - - return ['file' => $file, 'valid' => 0 === \count($errors), 'messages' => $errors]; - } - - private function display(SymfonyStyle $io, array $files) - { - switch ($this->format) { - case 'txt': - return $this->displayTxt($io, $files); - case 'json': - return $this->displayJson($io, $files); - case 'github': - return $this->displayTxt($io, $files, true); - default: - throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format)); - } - } - - private function displayTxt(SymfonyStyle $io, array $filesInfo, bool $errorAsGithubAnnotations = false) - { - $countFiles = \count($filesInfo); - $erroredFiles = 0; - $githubReporter = $errorAsGithubAnnotations ? new GithubActionReporter($io) : null; - - foreach ($filesInfo as $info) { - if ($info['valid'] && $this->displayCorrectFiles) { - $io->comment('<info>OK</info>'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - } elseif (!$info['valid']) { - ++$erroredFiles; - $io->text('<error> ERROR </error>'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); - $io->listing(array_map(function ($error) use ($info, $githubReporter) { - // general document errors have a '-1' line number - $line = -1 === $error['line'] ? null : $error['line']; - - if ($githubReporter) { - $githubReporter->error($error['message'], $info['file'], $line, null !== $line ? $error['column'] : null); - } - - return null === $line ? $error['message'] : sprintf('Line %d, Column %d: %s', $line, $error['column'], $error['message']); - }, $info['messages'])); - } - } - - if (0 === $erroredFiles) { - $io->success(sprintf('All %d XLIFF files contain valid syntax.', $countFiles)); - } else { - $io->warning(sprintf('%d XLIFF files have valid syntax and %d contain errors.', $countFiles - $erroredFiles, $erroredFiles)); - } - - return min($erroredFiles, 1); - } - - private function displayJson(SymfonyStyle $io, array $filesInfo) - { - $errors = 0; - - array_walk($filesInfo, function (&$v) use (&$errors) { - $v['file'] = (string) $v['file']; - if (!$v['valid']) { - ++$errors; - } - }); - - $io->writeln(json_encode($filesInfo, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES)); - - return min($errors, 1); - } - - private function getFiles(string $fileOrDirectory) - { - if (is_file($fileOrDirectory)) { - yield new \SplFileInfo($fileOrDirectory); - - return; - } - - foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { - if (!\in_array($file->getExtension(), ['xlf', 'xliff'])) { - continue; - } - - yield $file; - } - } - - private function getDirectoryIterator(string $directory) - { - $default = function ($directory) { - return new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - }; - - if (null !== $this->directoryIteratorProvider) { - return ($this->directoryIteratorProvider)($directory, $default); - } - - return $default($directory); - } - - private function isReadable(string $fileOrDirectory) - { - $default = function ($fileOrDirectory) { - return is_readable($fileOrDirectory); - }; - - if (null !== $this->isReadableProvider) { - return ($this->isReadableProvider)($fileOrDirectory, $default); - } - - return $default($fileOrDirectory); - } - - private function getTargetLanguageFromFile(\DOMDocument $xliffContents): ?string - { - foreach ($xliffContents->getElementsByTagName('file')[0]->attributes ?? [] as $attribute) { - if ('target-language' === $attribute->nodeName) { - return $attribute->nodeValue; - } - } - - return null; - } - - public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void - { - if ($input->mustSuggestOptionValuesFor('format')) { - $suggestions->suggestValues(['txt', 'json', 'github']); - } - } -} diff --git a/vendor/symfony/translation/DataCollector/TranslationDataCollector.php b/vendor/symfony/translation/DataCollector/TranslationDataCollector.php deleted file mode 100644 index 12c1d04..0000000 --- a/vendor/symfony/translation/DataCollector/TranslationDataCollector.php +++ /dev/null @@ -1,163 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\DataCollector; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\DataCollector\DataCollector; -use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface; -use Symfony\Component\Translation\DataCollectorTranslator; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - * - * @final - */ -class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface -{ - private $translator; - - public function __construct(DataCollectorTranslator $translator) - { - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function lateCollect() - { - $messages = $this->sanitizeCollectedMessages($this->translator->getCollectedMessages()); - - $this->data += $this->computeCount($messages); - $this->data['messages'] = $messages; - - $this->data = $this->cloneVar($this->data); - } - - /** - * {@inheritdoc} - */ - public function collect(Request $request, Response $response, ?\Throwable $exception = null) - { - $this->data['locale'] = $this->translator->getLocale(); - $this->data['fallback_locales'] = $this->translator->getFallbackLocales(); - } - - /** - * {@inheritdoc} - */ - public function reset() - { - $this->data = []; - } - - /** - * @return array|Data - */ - public function getMessages() - { - return $this->data['messages'] ?? []; - } - - public function getCountMissings(): int - { - return $this->data[DataCollectorTranslator::MESSAGE_MISSING] ?? 0; - } - - public function getCountFallbacks(): int - { - return $this->data[DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK] ?? 0; - } - - public function getCountDefines(): int - { - return $this->data[DataCollectorTranslator::MESSAGE_DEFINED] ?? 0; - } - - public function getLocale() - { - return !empty($this->data['locale']) ? $this->data['locale'] : null; - } - - /** - * @internal - */ - public function getFallbackLocales() - { - return (isset($this->data['fallback_locales']) && \count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : []; - } - - /** - * {@inheritdoc} - */ - public function getName(): string - { - return 'translation'; - } - - private function sanitizeCollectedMessages(array $messages) - { - $result = []; - foreach ($messages as $key => $message) { - $messageId = $message['locale'].$message['domain'].$message['id']; - - if (!isset($result[$messageId])) { - $message['count'] = 1; - $message['parameters'] = !empty($message['parameters']) ? [$message['parameters']] : []; - $messages[$key]['translation'] = $this->sanitizeString($message['translation']); - $result[$messageId] = $message; - } else { - if (!empty($message['parameters'])) { - $result[$messageId]['parameters'][] = $message['parameters']; - } - - ++$result[$messageId]['count']; - } - - unset($messages[$key]); - } - - return $result; - } - - private function computeCount(array $messages) - { - $count = [ - DataCollectorTranslator::MESSAGE_DEFINED => 0, - DataCollectorTranslator::MESSAGE_MISSING => 0, - DataCollectorTranslator::MESSAGE_EQUALS_FALLBACK => 0, - ]; - - foreach ($messages as $message) { - ++$count[$message['state']]; - } - - return $count; - } - - private function sanitizeString(string $string, int $length = 80) - { - $string = trim(preg_replace('/\s+/', ' ', $string)); - - if (false !== $encoding = mb_detect_encoding($string, null, true)) { - if (mb_strlen($string, $encoding) > $length) { - return mb_substr($string, 0, $length - 3, $encoding).'...'; - } - } elseif (\strlen($string) > $length) { - return substr($string, 0, $length - 3).'...'; - } - - return $string; - } -} diff --git a/vendor/symfony/translation/DataCollectorTranslator.php b/vendor/symfony/translation/DataCollectorTranslator.php deleted file mode 100644 index 6de5e22..0000000 --- a/vendor/symfony/translation/DataCollectorTranslator.php +++ /dev/null @@ -1,167 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Contracts\Translation\LocaleAwareInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInterface, LocaleAwareInterface, WarmableInterface -{ - public const MESSAGE_DEFINED = 0; - public const MESSAGE_MISSING = 1; - public const MESSAGE_EQUALS_FALLBACK = 2; - - private $translator; - private $messages = []; - - /** - * @param TranslatorInterface&TranslatorBagInterface&LocaleAwareInterface $translator - */ - public function __construct(TranslatorInterface $translator) - { - if (!$translator instanceof TranslatorBagInterface || !$translator instanceof LocaleAwareInterface) { - throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator))); - } - - $this->translator = $translator; - } - - /** - * {@inheritdoc} - */ - public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) - { - $trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale); - $this->collectMessage($locale, $domain, $id, $trans, $parameters); - - return $trans; - } - - /** - * {@inheritdoc} - */ - public function setLocale(string $locale) - { - $this->translator->setLocale($locale); - } - - /** - * {@inheritdoc} - */ - public function getLocale() - { - return $this->translator->getLocale(); - } - - /** - * {@inheritdoc} - */ - public function getCatalogue(?string $locale = null) - { - return $this->translator->getCatalogue($locale); - } - - /** - * {@inheritdoc} - */ - public function getCatalogues(): array - { - return $this->translator->getCatalogues(); - } - - /** - * {@inheritdoc} - * - * @return string[] - */ - public function warmUp(string $cacheDir) - { - if ($this->translator instanceof WarmableInterface) { - return (array) $this->translator->warmUp($cacheDir); - } - - return []; - } - - /** - * Gets the fallback locales. - * - * @return array - */ - public function getFallbackLocales() - { - if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) { - return $this->translator->getFallbackLocales(); - } - - return []; - } - - /** - * Passes through all unknown calls onto the translator object. - */ - public function __call(string $method, array $args) - { - return $this->translator->{$method}(...$args); - } - - /** - * @return array - */ - public function getCollectedMessages() - { - return $this->messages; - } - - private function collectMessage(?string $locale, ?string $domain, string $id, string $translation, ?array $parameters = []) - { - if (null === $domain) { - $domain = 'messages'; - } - - $catalogue = $this->translator->getCatalogue($locale); - $locale = $catalogue->getLocale(); - $fallbackLocale = null; - if ($catalogue->defines($id, $domain)) { - $state = self::MESSAGE_DEFINED; - } elseif ($catalogue->has($id, $domain)) { - $state = self::MESSAGE_EQUALS_FALLBACK; - - $fallbackCatalogue = $catalogue->getFallbackCatalogue(); - while ($fallbackCatalogue) { - if ($fallbackCatalogue->defines($id, $domain)) { - $fallbackLocale = $fallbackCatalogue->getLocale(); - break; - } - $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); - } - } else { - $state = self::MESSAGE_MISSING; - } - - $this->messages[] = [ - 'locale' => $locale, - 'fallbackLocale' => $fallbackLocale, - 'domain' => $domain, - 'id' => $id, - 'translation' => $translation, - 'parameters' => $parameters, - 'state' => $state, - 'transChoiceNumber' => isset($parameters['%count%']) && is_numeric($parameters['%count%']) ? $parameters['%count%'] : null, - ]; - } -} diff --git a/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php b/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php deleted file mode 100644 index 6d78342..0000000 --- a/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds tagged translation.formatter services to translation writer. - */ -class TranslationDumperPass implements CompilerPassInterface -{ - private $writerServiceId; - private $dumperTag; - - public function __construct(string $writerServiceId = 'translation.writer', string $dumperTag = 'translation.dumper') - { - if (1 < \func_num_args()) { - trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->writerServiceId = $writerServiceId; - $this->dumperTag = $dumperTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->writerServiceId)) { - return; - } - - $definition = $container->getDefinition($this->writerServiceId); - - foreach ($container->findTaggedServiceIds($this->dumperTag, true) as $id => $attributes) { - $definition->addMethodCall('addDumper', [$attributes[0]['alias'], new Reference($id)]); - } - } -} diff --git a/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php b/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php deleted file mode 100644 index fab6b20..0000000 --- a/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Exception\RuntimeException; -use Symfony\Component\DependencyInjection\Reference; - -/** - * Adds tagged translation.extractor services to translation extractor. - */ -class TranslationExtractorPass implements CompilerPassInterface -{ - private $extractorServiceId; - private $extractorTag; - - public function __construct(string $extractorServiceId = 'translation.extractor', string $extractorTag = 'translation.extractor') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->extractorServiceId = $extractorServiceId; - $this->extractorTag = $extractorTag; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->extractorServiceId)) { - return; - } - - $definition = $container->getDefinition($this->extractorServiceId); - - foreach ($container->findTaggedServiceIds($this->extractorTag, true) as $id => $attributes) { - if (!isset($attributes[0]['alias'])) { - throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id)); - } - - $definition->addMethodCall('addExtractor', [$attributes[0]['alias'], new Reference($id)]); - } - } -} diff --git a/vendor/symfony/translation/DependencyInjection/TranslatorPass.php b/vendor/symfony/translation/DependencyInjection/TranslatorPass.php deleted file mode 100644 index e6a4b36..0000000 --- a/vendor/symfony/translation/DependencyInjection/TranslatorPass.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; -use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -class TranslatorPass implements CompilerPassInterface -{ - private $translatorServiceId; - private $readerServiceId; - private $loaderTag; - private $debugCommandServiceId; - private $updateCommandServiceId; - - public function __construct(string $translatorServiceId = 'translator.default', string $readerServiceId = 'translation.reader', string $loaderTag = 'translation.loader', string $debugCommandServiceId = 'console.command.translation_debug', string $updateCommandServiceId = 'console.command.translation_extract') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->translatorServiceId = $translatorServiceId; - $this->readerServiceId = $readerServiceId; - $this->loaderTag = $loaderTag; - $this->debugCommandServiceId = $debugCommandServiceId; - $this->updateCommandServiceId = $updateCommandServiceId; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->translatorServiceId)) { - return; - } - - $loaders = []; - $loaderRefs = []; - foreach ($container->findTaggedServiceIds($this->loaderTag, true) as $id => $attributes) { - $loaderRefs[$id] = new Reference($id); - $loaders[$id][] = $attributes[0]['alias']; - if (isset($attributes[0]['legacy-alias'])) { - $loaders[$id][] = $attributes[0]['legacy-alias']; - } - } - - if ($container->hasDefinition($this->readerServiceId)) { - $definition = $container->getDefinition($this->readerServiceId); - foreach ($loaders as $id => $formats) { - foreach ($formats as $format) { - $definition->addMethodCall('addLoader', [$format, $loaderRefs[$id]]); - } - } - } - - $container - ->findDefinition($this->translatorServiceId) - ->replaceArgument(0, ServiceLocatorTagPass::register($container, $loaderRefs)) - ->replaceArgument(3, $loaders) - ; - - if (!$container->hasParameter('twig.default_path')) { - return; - } - - $paths = array_keys($container->getDefinition('twig.template_iterator')->getArgument(1)); - if ($container->hasDefinition($this->debugCommandServiceId)) { - $definition = $container->getDefinition($this->debugCommandServiceId); - $definition->replaceArgument(4, $container->getParameter('twig.default_path')); - - if (\count($definition->getArguments()) > 6) { - $definition->replaceArgument(6, $paths); - } - } - if ($container->hasDefinition($this->updateCommandServiceId)) { - $definition = $container->getDefinition($this->updateCommandServiceId); - $definition->replaceArgument(5, $container->getParameter('twig.default_path')); - - if (\count($definition->getArguments()) > 7) { - $definition->replaceArgument(7, $paths); - } - } - } -} diff --git a/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php b/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php deleted file mode 100644 index 2ee1364..0000000 --- a/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\DependencyInjection; - -use Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\DependencyInjection\Reference; -use Symfony\Component\DependencyInjection\ServiceLocator; -use Symfony\Component\HttpKernel\Controller\ArgumentResolver\TraceableValueResolver; - -/** - * @author Yonel Ceruto <yonelceruto@gmail.com> - */ -class TranslatorPathsPass extends AbstractRecursivePass -{ - private $translatorServiceId; - private $debugCommandServiceId; - private $updateCommandServiceId; - private $resolverServiceId; - private $level = 0; - - /** - * @var array<string, bool> - */ - private $paths = []; - - /** - * @var array<int, Definition> - */ - private $definitions = []; - - /** - * @var array<string, array<string, bool>> - */ - private $controllers = []; - - public function __construct(string $translatorServiceId = 'translator', string $debugCommandServiceId = 'console.command.translation_debug', string $updateCommandServiceId = 'console.command.translation_extract', string $resolverServiceId = 'argument_resolver.service') - { - if (0 < \func_num_args()) { - trigger_deprecation('symfony/translation', '5.3', 'Configuring "%s" is deprecated.', __CLASS__); - } - - $this->translatorServiceId = $translatorServiceId; - $this->debugCommandServiceId = $debugCommandServiceId; - $this->updateCommandServiceId = $updateCommandServiceId; - $this->resolverServiceId = $resolverServiceId; - } - - public function process(ContainerBuilder $container) - { - if (!$container->hasDefinition($this->translatorServiceId)) { - return; - } - - foreach ($this->findControllerArguments($container) as $controller => $argument) { - $id = substr($controller, 0, strpos($controller, ':') ?: \strlen($controller)); - if ($container->hasDefinition($id)) { - [$locatorRef] = $argument->getValues(); - $this->controllers[(string) $locatorRef][$container->getDefinition($id)->getClass()] = true; - } - } - - try { - parent::process($container); - - $paths = []; - foreach ($this->paths as $class => $_) { - if (($r = $container->getReflectionClass($class)) && !$r->isInterface()) { - $paths[] = $r->getFileName(); - foreach ($r->getTraits() as $trait) { - $paths[] = $trait->getFileName(); - } - } - } - if ($paths) { - if ($container->hasDefinition($this->debugCommandServiceId)) { - $definition = $container->getDefinition($this->debugCommandServiceId); - $definition->replaceArgument(6, array_merge($definition->getArgument(6), $paths)); - } - if ($container->hasDefinition($this->updateCommandServiceId)) { - $definition = $container->getDefinition($this->updateCommandServiceId); - $definition->replaceArgument(7, array_merge($definition->getArgument(7), $paths)); - } - } - } finally { - $this->level = 0; - $this->paths = []; - $this->definitions = []; - } - } - - protected function processValue($value, bool $isRoot = false) - { - if ($value instanceof Reference) { - if ((string) $value === $this->translatorServiceId) { - for ($i = $this->level - 1; $i >= 0; --$i) { - $class = $this->definitions[$i]->getClass(); - - if (ServiceLocator::class === $class) { - if (!isset($this->controllers[$this->currentId])) { - continue; - } - foreach ($this->controllers[$this->currentId] as $class => $_) { - $this->paths[$class] = true; - } - } else { - $this->paths[$class] = true; - } - - break; - } - } - - return $value; - } - - if ($value instanceof Definition) { - $this->definitions[$this->level++] = $value; - $value = parent::processValue($value, $isRoot); - unset($this->definitions[--$this->level]); - - return $value; - } - - return parent::processValue($value, $isRoot); - } - - private function findControllerArguments(ContainerBuilder $container): array - { - if (!$container->has($this->resolverServiceId)) { - return []; - } - $resolverDef = $container->findDefinition($this->resolverServiceId); - - if (TraceableValueResolver::class === $resolverDef->getClass()) { - $resolverDef = $container->getDefinition($resolverDef->getArgument(0)); - } - - $argument = $resolverDef->getArgument(0); - if ($argument instanceof Reference) { - $argument = $container->getDefinition($argument); - } - - return $argument->getArgument(0); - } -} diff --git a/vendor/symfony/translation/Dumper/CsvFileDumper.php b/vendor/symfony/translation/Dumper/CsvFileDumper.php deleted file mode 100644 index 0c8589a..0000000 --- a/vendor/symfony/translation/Dumper/CsvFileDumper.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * CsvFileDumper generates a csv formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class CsvFileDumper extends FileDumper -{ - private $delimiter = ';'; - private $enclosure = '"'; - - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - $handle = fopen('php://memory', 'r+'); - - foreach ($messages->all($domain) as $source => $target) { - fputcsv($handle, [$source, $target], $this->delimiter, $this->enclosure); - } - - rewind($handle); - $output = stream_get_contents($handle); - fclose($handle); - - return $output; - } - - /** - * Sets the delimiter and escape character for CSV. - */ - public function setCsvControl(string $delimiter = ';', string $enclosure = '"') - { - $this->delimiter = $delimiter; - $this->enclosure = $enclosure; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'csv'; - } -} diff --git a/vendor/symfony/translation/Dumper/DumperInterface.php b/vendor/symfony/translation/Dumper/DumperInterface.php deleted file mode 100644 index 7cdaef5..0000000 --- a/vendor/symfony/translation/Dumper/DumperInterface.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * DumperInterface is the interface implemented by all translation dumpers. - * There is no common option. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -interface DumperInterface -{ - /** - * Dumps the message catalogue. - * - * @param array $options Options that are used by the dumper - */ - public function dump(MessageCatalogue $messages, array $options = []); -} diff --git a/vendor/symfony/translation/Dumper/FileDumper.php b/vendor/symfony/translation/Dumper/FileDumper.php deleted file mode 100644 index 0e10845..0000000 --- a/vendor/symfony/translation/Dumper/FileDumper.php +++ /dev/null @@ -1,112 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Exception\RuntimeException; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * FileDumper is an implementation of DumperInterface that dump a message catalogue to file(s). - * - * Options: - * - path (mandatory): the directory where the files should be saved - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -abstract class FileDumper implements DumperInterface -{ - /** - * A template for the relative paths to files. - * - * @var string - */ - protected $relativePathTemplate = '%domain%.%locale%.%extension%'; - - /** - * Sets the template for the relative paths to files. - * - * @param string $relativePathTemplate A template for the relative paths to files - */ - public function setRelativePathTemplate(string $relativePathTemplate) - { - $this->relativePathTemplate = $relativePathTemplate; - } - - /** - * {@inheritdoc} - */ - public function dump(MessageCatalogue $messages, array $options = []) - { - if (!\array_key_exists('path', $options)) { - throw new InvalidArgumentException('The file dumper needs a path option.'); - } - - // save a file for each domain - foreach ($messages->getDomains() as $domain) { - $fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale()); - if (!file_exists($fullpath)) { - $directory = \dirname($fullpath); - if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { - throw new RuntimeException(sprintf('Unable to create directory "%s".', $directory)); - } - } - - $intlDomain = $domain.MessageCatalogue::INTL_DOMAIN_SUFFIX; - $intlMessages = $messages->all($intlDomain); - - if ($intlMessages) { - $intlPath = $options['path'].'/'.$this->getRelativePath($intlDomain, $messages->getLocale()); - file_put_contents($intlPath, $this->formatCatalogue($messages, $intlDomain, $options)); - - $messages->replace([], $intlDomain); - - try { - if ($messages->all($domain)) { - file_put_contents($fullpath, $this->formatCatalogue($messages, $domain, $options)); - } - continue; - } finally { - $messages->replace($intlMessages, $intlDomain); - } - } - - file_put_contents($fullpath, $this->formatCatalogue($messages, $domain, $options)); - } - } - - /** - * Transforms a domain of a message catalogue to its string representation. - * - * @return string - */ - abstract public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []); - - /** - * Gets the file extension of the dumper. - * - * @return string - */ - abstract protected function getExtension(); - - /** - * Gets the relative file path using the template. - */ - private function getRelativePath(string $domain, string $locale): string - { - return strtr($this->relativePathTemplate, [ - '%domain%' => $domain, - '%locale%' => $locale, - '%extension%' => $this->getExtension(), - ]); - } -} diff --git a/vendor/symfony/translation/Dumper/IcuResFileDumper.php b/vendor/symfony/translation/Dumper/IcuResFileDumper.php deleted file mode 100644 index 12a7a8c..0000000 --- a/vendor/symfony/translation/Dumper/IcuResFileDumper.php +++ /dev/null @@ -1,104 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * IcuResDumper generates an ICU ResourceBundle formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class IcuResFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - protected $relativePathTemplate = '%domain%/%locale%.%extension%'; - - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - $data = $indexes = $resources = ''; - - foreach ($messages->all($domain) as $source => $target) { - $indexes .= pack('v', \strlen($data) + 28); - $data .= $source."\0"; - } - - $data .= $this->writePadding($data); - - $keyTop = $this->getPosition($data); - - foreach ($messages->all($domain) as $source => $target) { - $resources .= pack('V', $this->getPosition($data)); - - $data .= pack('V', \strlen($target)) - .mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8') - .$this->writePadding($data) - ; - } - - $resOffset = $this->getPosition($data); - - $data .= pack('v', \count($messages->all($domain))) - .$indexes - .$this->writePadding($data) - .$resources - ; - - $bundleTop = $this->getPosition($data); - - $root = pack('V7', - $resOffset + (2 << 28), // Resource Offset + Resource Type - 6, // Index length - $keyTop, // Index keys top - $bundleTop, // Index resources top - $bundleTop, // Index bundle top - \count($messages->all($domain)), // Index max table length - 0 // Index attributes - ); - - $header = pack('vC2v4C12@32', - 32, // Header size - 0xDA, 0x27, // Magic number 1 and 2 - 20, 0, 0, 2, // Rest of the header, ..., Size of a char - 0x52, 0x65, 0x73, 0x42, // Data format identifier - 1, 2, 0, 0, // Data version - 1, 4, 0, 0 // Unicode version - ); - - return $header.$root.$data; - } - - private function writePadding(string $data): ?string - { - $padding = \strlen($data) % 4; - - return $padding ? str_repeat("\xAA", 4 - $padding) : null; - } - - private function getPosition(string $data) - { - return (\strlen($data) + 28) / 4; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'res'; - } -} diff --git a/vendor/symfony/translation/Dumper/IniFileDumper.php b/vendor/symfony/translation/Dumper/IniFileDumper.php deleted file mode 100644 index 93c900a..0000000 --- a/vendor/symfony/translation/Dumper/IniFileDumper.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * IniFileDumper generates an ini formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class IniFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - $output = ''; - - foreach ($messages->all($domain) as $source => $target) { - $escapeTarget = str_replace('"', '\"', $target); - $output .= $source.'="'.$escapeTarget."\"\n"; - } - - return $output; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'ini'; - } -} diff --git a/vendor/symfony/translation/Dumper/JsonFileDumper.php b/vendor/symfony/translation/Dumper/JsonFileDumper.php deleted file mode 100644 index 34c0b56..0000000 --- a/vendor/symfony/translation/Dumper/JsonFileDumper.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * JsonFileDumper generates an json formatted string representation of a message catalogue. - * - * @author singles - */ -class JsonFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - $flags = $options['json_encoding'] ?? \JSON_PRETTY_PRINT; - - return json_encode($messages->all($domain), $flags); - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'json'; - } -} diff --git a/vendor/symfony/translation/Dumper/MoFileDumper.php b/vendor/symfony/translation/Dumper/MoFileDumper.php deleted file mode 100644 index f52206e..0000000 --- a/vendor/symfony/translation/Dumper/MoFileDumper.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\Loader\MoFileLoader; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * MoFileDumper generates a gettext formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class MoFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - $sources = $targets = $sourceOffsets = $targetOffsets = ''; - $offsets = []; - $size = 0; - - foreach ($messages->all($domain) as $source => $target) { - $offsets[] = array_map('strlen', [$sources, $source, $targets, $target]); - $sources .= "\0".$source; - $targets .= "\0".$target; - ++$size; - } - - $header = [ - 'magicNumber' => MoFileLoader::MO_LITTLE_ENDIAN_MAGIC, - 'formatRevision' => 0, - 'count' => $size, - 'offsetId' => MoFileLoader::MO_HEADER_SIZE, - 'offsetTranslated' => MoFileLoader::MO_HEADER_SIZE + (8 * $size), - 'sizeHashes' => 0, - 'offsetHashes' => MoFileLoader::MO_HEADER_SIZE + (16 * $size), - ]; - - $sourcesSize = \strlen($sources); - $sourcesStart = $header['offsetHashes'] + 1; - - foreach ($offsets as $offset) { - $sourceOffsets .= $this->writeLong($offset[1]) - .$this->writeLong($offset[0] + $sourcesStart); - $targetOffsets .= $this->writeLong($offset[3]) - .$this->writeLong($offset[2] + $sourcesStart + $sourcesSize); - } - - $output = implode('', array_map([$this, 'writeLong'], $header)) - .$sourceOffsets - .$targetOffsets - .$sources - .$targets - ; - - return $output; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'mo'; - } - - private function writeLong($str): string - { - return pack('V*', $str); - } -} diff --git a/vendor/symfony/translation/Dumper/PhpFileDumper.php b/vendor/symfony/translation/Dumper/PhpFileDumper.php deleted file mode 100644 index 6163b52..0000000 --- a/vendor/symfony/translation/Dumper/PhpFileDumper.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * PhpFileDumper generates PHP files from a message catalogue. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class PhpFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - return "<?php\n\nreturn ".var_export($messages->all($domain), true).";\n"; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'php'; - } -} diff --git a/vendor/symfony/translation/Dumper/PoFileDumper.php b/vendor/symfony/translation/Dumper/PoFileDumper.php deleted file mode 100644 index 0d82281..0000000 --- a/vendor/symfony/translation/Dumper/PoFileDumper.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * PoFileDumper generates a gettext formatted string representation of a message catalogue. - * - * @author Stealth35 - */ -class PoFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - $output = 'msgid ""'."\n"; - $output .= 'msgstr ""'."\n"; - $output .= '"Content-Type: text/plain; charset=UTF-8\n"'."\n"; - $output .= '"Content-Transfer-Encoding: 8bit\n"'."\n"; - $output .= '"Language: '.$messages->getLocale().'\n"'."\n"; - $output .= "\n"; - - $newLine = false; - foreach ($messages->all($domain) as $source => $target) { - if ($newLine) { - $output .= "\n"; - } else { - $newLine = true; - } - $metadata = $messages->getMetadata($source, $domain); - - if (isset($metadata['comments'])) { - $output .= $this->formatComments($metadata['comments']); - } - if (isset($metadata['flags'])) { - $output .= $this->formatComments(implode(',', (array) $metadata['flags']), ','); - } - if (isset($metadata['sources'])) { - $output .= $this->formatComments(implode(' ', (array) $metadata['sources']), ':'); - } - - $sourceRules = $this->getStandardRules($source); - $targetRules = $this->getStandardRules($target); - if (2 == \count($sourceRules) && [] !== $targetRules) { - $output .= sprintf('msgid "%s"'."\n", $this->escape($sourceRules[0])); - $output .= sprintf('msgid_plural "%s"'."\n", $this->escape($sourceRules[1])); - foreach ($targetRules as $i => $targetRule) { - $output .= sprintf('msgstr[%d] "%s"'."\n", $i, $this->escape($targetRule)); - } - } else { - $output .= sprintf('msgid "%s"'."\n", $this->escape($source)); - $output .= sprintf('msgstr "%s"'."\n", $this->escape($target)); - } - } - - return $output; - } - - private function getStandardRules(string $id) - { - // Partly copied from TranslatorTrait::trans. - $parts = []; - if (preg_match('/^\|++$/', $id)) { - $parts = explode('|', $id); - } elseif (preg_match_all('/(?:\|\||[^\|])++/', $id, $matches)) { - $parts = $matches[0]; - } - - $intervalRegexp = <<<'EOF' -/^(?P<interval> - ({\s* - (\-?\d+(\.\d+)?[\s*,\s*\-?\d+(\.\d+)?]*) - \s*}) - - | - - (?P<left_delimiter>[\[\]]) - \s* - (?P<left>-Inf|\-?\d+(\.\d+)?) - \s*,\s* - (?P<right>\+?Inf|\-?\d+(\.\d+)?) - \s* - (?P<right_delimiter>[\[\]]) -)\s*(?P<message>.*?)$/xs -EOF; - - $standardRules = []; - foreach ($parts as $part) { - $part = trim(str_replace('||', '|', $part)); - - if (preg_match($intervalRegexp, $part)) { - // Explicit rule is not a standard rule. - return []; - } else { - $standardRules[] = $part; - } - } - - return $standardRules; - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'po'; - } - - private function escape(string $str): string - { - return addcslashes($str, "\0..\37\42\134"); - } - - private function formatComments($comments, string $prefix = ''): ?string - { - $output = null; - - foreach ((array) $comments as $comment) { - $output .= sprintf('#%s %s'."\n", $prefix, $comment); - } - - return $output; - } -} diff --git a/vendor/symfony/translation/Dumper/QtFileDumper.php b/vendor/symfony/translation/Dumper/QtFileDumper.php deleted file mode 100644 index 406e9f0..0000000 --- a/vendor/symfony/translation/Dumper/QtFileDumper.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * QtFileDumper generates ts files from a message catalogue. - * - * @author Benjamin Eberlei <kontakt@beberlei.de> - */ -class QtFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - $dom = new \DOMDocument('1.0', 'utf-8'); - $dom->formatOutput = true; - $ts = $dom->appendChild($dom->createElement('TS')); - $context = $ts->appendChild($dom->createElement('context')); - $context->appendChild($dom->createElement('name', $domain)); - - foreach ($messages->all($domain) as $source => $target) { - $message = $context->appendChild($dom->createElement('message')); - $metadata = $messages->getMetadata($source, $domain); - if (isset($metadata['sources'])) { - foreach ((array) $metadata['sources'] as $location) { - $loc = explode(':', $location, 2); - $location = $message->appendChild($dom->createElement('location')); - $location->setAttribute('filename', $loc[0]); - if (isset($loc[1])) { - $location->setAttribute('line', $loc[1]); - } - } - } - $message->appendChild($dom->createElement('source', $source)); - $message->appendChild($dom->createElement('translation', $target)); - } - - return $dom->saveXML(); - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'ts'; - } -} diff --git a/vendor/symfony/translation/Dumper/XliffFileDumper.php b/vendor/symfony/translation/Dumper/XliffFileDumper.php deleted file mode 100644 index a480b3f..0000000 --- a/vendor/symfony/translation/Dumper/XliffFileDumper.php +++ /dev/null @@ -1,203 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * XliffFileDumper generates xliff files from a message catalogue. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class XliffFileDumper extends FileDumper -{ - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - $xliffVersion = '1.2'; - if (\array_key_exists('xliff_version', $options)) { - $xliffVersion = $options['xliff_version']; - } - - if (\array_key_exists('default_locale', $options)) { - $defaultLocale = $options['default_locale']; - } else { - $defaultLocale = \Locale::getDefault(); - } - - if ('1.2' === $xliffVersion) { - return $this->dumpXliff1($defaultLocale, $messages, $domain, $options); - } - if ('2.0' === $xliffVersion) { - return $this->dumpXliff2($defaultLocale, $messages, $domain); - } - - throw new InvalidArgumentException(sprintf('No support implemented for dumping XLIFF version "%s".', $xliffVersion)); - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return 'xlf'; - } - - private function dumpXliff1(string $defaultLocale, MessageCatalogue $messages, ?string $domain, array $options = []) - { - $toolInfo = ['tool-id' => 'symfony', 'tool-name' => 'Symfony']; - if (\array_key_exists('tool_info', $options)) { - $toolInfo = array_merge($toolInfo, $options['tool_info']); - } - - $dom = new \DOMDocument('1.0', 'utf-8'); - $dom->formatOutput = true; - - $xliff = $dom->appendChild($dom->createElement('xliff')); - $xliff->setAttribute('version', '1.2'); - $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:1.2'); - - $xliffFile = $xliff->appendChild($dom->createElement('file')); - $xliffFile->setAttribute('source-language', str_replace('_', '-', $defaultLocale)); - $xliffFile->setAttribute('target-language', str_replace('_', '-', $messages->getLocale())); - $xliffFile->setAttribute('datatype', 'plaintext'); - $xliffFile->setAttribute('original', 'file.ext'); - - $xliffHead = $xliffFile->appendChild($dom->createElement('header')); - $xliffTool = $xliffHead->appendChild($dom->createElement('tool')); - foreach ($toolInfo as $id => $value) { - $xliffTool->setAttribute($id, $value); - } - - $xliffBody = $xliffFile->appendChild($dom->createElement('body')); - foreach ($messages->all($domain) as $source => $target) { - $translation = $dom->createElement('trans-unit'); - - $translation->setAttribute('id', strtr(substr(base64_encode(hash('sha256', $source, true)), 0, 7), '/+', '._')); - $translation->setAttribute('resname', $source); - - $s = $translation->appendChild($dom->createElement('source')); - $s->appendChild($dom->createTextNode($source)); - - // Does the target contain characters requiring a CDATA section? - $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); - - $targetElement = $dom->createElement('target'); - $metadata = $messages->getMetadata($source, $domain); - if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { - foreach ($metadata['target-attributes'] as $name => $value) { - $targetElement->setAttribute($name, $value); - } - } - $t = $translation->appendChild($targetElement); - $t->appendChild($text); - - if ($this->hasMetadataArrayInfo('notes', $metadata)) { - foreach ($metadata['notes'] as $note) { - if (!isset($note['content'])) { - continue; - } - - $n = $translation->appendChild($dom->createElement('note')); - $n->appendChild($dom->createTextNode($note['content'])); - - if (isset($note['priority'])) { - $n->setAttribute('priority', $note['priority']); - } - - if (isset($note['from'])) { - $n->setAttribute('from', $note['from']); - } - } - } - - $xliffBody->appendChild($translation); - } - - return $dom->saveXML(); - } - - private function dumpXliff2(string $defaultLocale, MessageCatalogue $messages, ?string $domain) - { - $dom = new \DOMDocument('1.0', 'utf-8'); - $dom->formatOutput = true; - - $xliff = $dom->appendChild($dom->createElement('xliff')); - $xliff->setAttribute('xmlns', 'urn:oasis:names:tc:xliff:document:2.0'); - $xliff->setAttribute('version', '2.0'); - $xliff->setAttribute('srcLang', str_replace('_', '-', $defaultLocale)); - $xliff->setAttribute('trgLang', str_replace('_', '-', $messages->getLocale())); - - $xliffFile = $xliff->appendChild($dom->createElement('file')); - if (str_ends_with($domain, MessageCatalogue::INTL_DOMAIN_SUFFIX)) { - $xliffFile->setAttribute('id', substr($domain, 0, -\strlen(MessageCatalogue::INTL_DOMAIN_SUFFIX)).'.'.$messages->getLocale()); - } else { - $xliffFile->setAttribute('id', $domain.'.'.$messages->getLocale()); - } - - foreach ($messages->all($domain) as $source => $target) { - $translation = $dom->createElement('unit'); - $translation->setAttribute('id', strtr(substr(base64_encode(hash('sha256', $source, true)), 0, 7), '/+', '._')); - - if (\strlen($source) <= 80) { - $translation->setAttribute('name', $source); - } - - $metadata = $messages->getMetadata($source, $domain); - - // Add notes section - if ($this->hasMetadataArrayInfo('notes', $metadata)) { - $notesElement = $dom->createElement('notes'); - foreach ($metadata['notes'] as $note) { - $n = $dom->createElement('note'); - $n->appendChild($dom->createTextNode($note['content'] ?? '')); - unset($note['content']); - - foreach ($note as $name => $value) { - $n->setAttribute($name, $value); - } - $notesElement->appendChild($n); - } - $translation->appendChild($notesElement); - } - - $segment = $translation->appendChild($dom->createElement('segment')); - - $s = $segment->appendChild($dom->createElement('source')); - $s->appendChild($dom->createTextNode($source)); - - // Does the target contain characters requiring a CDATA section? - $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); - - $targetElement = $dom->createElement('target'); - if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { - foreach ($metadata['target-attributes'] as $name => $value) { - $targetElement->setAttribute($name, $value); - } - } - $t = $segment->appendChild($targetElement); - $t->appendChild($text); - - $xliffFile->appendChild($translation); - } - - return $dom->saveXML(); - } - - private function hasMetadataArrayInfo(string $key, ?array $metadata = null): bool - { - return is_iterable($metadata[$key] ?? null); - } -} diff --git a/vendor/symfony/translation/Dumper/YamlFileDumper.php b/vendor/symfony/translation/Dumper/YamlFileDumper.php deleted file mode 100644 index 0b21e8c..0000000 --- a/vendor/symfony/translation/Dumper/YamlFileDumper.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Dumper; - -use Symfony\Component\Translation\Exception\LogicException; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Util\ArrayConverter; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlFileDumper generates yaml files from a message catalogue. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class YamlFileDumper extends FileDumper -{ - private $extension; - - public function __construct(string $extension = 'yml') - { - $this->extension = $extension; - } - - /** - * {@inheritdoc} - */ - public function formatCatalogue(MessageCatalogue $messages, string $domain, array $options = []) - { - if (!class_exists(Yaml::class)) { - throw new LogicException('Dumping translations in the YAML format requires the Symfony Yaml component.'); - } - - $data = $messages->all($domain); - - if (isset($options['as_tree']) && $options['as_tree']) { - $data = ArrayConverter::expandToTree($data); - } - - if (isset($options['inline']) && ($inline = (int) $options['inline']) > 0) { - return Yaml::dump($data, $inline); - } - - return Yaml::dump($data); - } - - /** - * {@inheritdoc} - */ - protected function getExtension() - { - return $this->extension; - } -} diff --git a/vendor/symfony/translation/Exception/ExceptionInterface.php b/vendor/symfony/translation/Exception/ExceptionInterface.php deleted file mode 100644 index 8f9c54e..0000000 --- a/vendor/symfony/translation/Exception/ExceptionInterface.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -/** - * Exception interface for all exceptions thrown by the component. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/translation/Exception/IncompleteDsnException.php b/vendor/symfony/translation/Exception/IncompleteDsnException.php deleted file mode 100644 index b304bde..0000000 --- a/vendor/symfony/translation/Exception/IncompleteDsnException.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -class IncompleteDsnException extends InvalidArgumentException -{ - public function __construct(string $message, ?string $dsn = null, ?\Throwable $previous = null) - { - if ($dsn) { - $message = sprintf('Invalid "%s" provider DSN: ', $dsn).$message; - } - - parent::__construct($message, 0, $previous); - } -} diff --git a/vendor/symfony/translation/Exception/InvalidArgumentException.php b/vendor/symfony/translation/Exception/InvalidArgumentException.php deleted file mode 100644 index 90d0669..0000000 --- a/vendor/symfony/translation/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -/** - * Base InvalidArgumentException for the Translation component. - * - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/translation/Exception/InvalidResourceException.php b/vendor/symfony/translation/Exception/InvalidResourceException.php deleted file mode 100644 index cf07943..0000000 --- a/vendor/symfony/translation/Exception/InvalidResourceException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -/** - * Thrown when a resource cannot be loaded. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class InvalidResourceException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/translation/Exception/LogicException.php b/vendor/symfony/translation/Exception/LogicException.php deleted file mode 100644 index 9019c7e..0000000 --- a/vendor/symfony/translation/Exception/LogicException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -/** - * Base LogicException for Translation component. - * - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -class LogicException extends \LogicException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/translation/Exception/MissingRequiredOptionException.php b/vendor/symfony/translation/Exception/MissingRequiredOptionException.php deleted file mode 100644 index 46152e2..0000000 --- a/vendor/symfony/translation/Exception/MissingRequiredOptionException.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -/** - * @author Oskar Stark <oskarstark@googlemail.com> - */ -class MissingRequiredOptionException extends IncompleteDsnException -{ - public function __construct(string $option, ?string $dsn = null, ?\Throwable $previous = null) - { - $message = sprintf('The option "%s" is required but missing.', $option); - - parent::__construct($message, $dsn, $previous); - } -} diff --git a/vendor/symfony/translation/Exception/NotFoundResourceException.php b/vendor/symfony/translation/Exception/NotFoundResourceException.php deleted file mode 100644 index cff73ae..0000000 --- a/vendor/symfony/translation/Exception/NotFoundResourceException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -/** - * Thrown when a resource does not exist. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class NotFoundResourceException extends \InvalidArgumentException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/translation/Exception/ProviderException.php b/vendor/symfony/translation/Exception/ProviderException.php deleted file mode 100644 index 8b909fe..0000000 --- a/vendor/symfony/translation/Exception/ProviderException.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @author Fabien Potencier <fabien@symfony.com> - */ -class ProviderException extends RuntimeException implements ProviderExceptionInterface -{ - private $response; - private $debug; - - public function __construct(string $message, ResponseInterface $response, int $code = 0, ?\Exception $previous = null) - { - $this->response = $response; - $this->debug = $response->getInfo('debug') ?? ''; - - parent::__construct($message, $code, $previous); - } - - public function getResponse(): ResponseInterface - { - return $this->response; - } - - public function getDebug(): string - { - return $this->debug; - } -} diff --git a/vendor/symfony/translation/Exception/ProviderExceptionInterface.php b/vendor/symfony/translation/Exception/ProviderExceptionInterface.php deleted file mode 100644 index 922e827..0000000 --- a/vendor/symfony/translation/Exception/ProviderExceptionInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -/** - * @author Fabien Potencier <fabien@symfony.com> - */ -interface ProviderExceptionInterface extends ExceptionInterface -{ - /* - * Returns debug info coming from the Symfony\Contracts\HttpClient\ResponseInterface - */ - public function getDebug(): string; -} diff --git a/vendor/symfony/translation/Exception/RuntimeException.php b/vendor/symfony/translation/Exception/RuntimeException.php deleted file mode 100644 index dcd7940..0000000 --- a/vendor/symfony/translation/Exception/RuntimeException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -/** - * Base RuntimeException for the Translation component. - * - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -class RuntimeException extends \RuntimeException implements ExceptionInterface -{ -} diff --git a/vendor/symfony/translation/Exception/UnsupportedSchemeException.php b/vendor/symfony/translation/Exception/UnsupportedSchemeException.php deleted file mode 100644 index 800c4cd..0000000 --- a/vendor/symfony/translation/Exception/UnsupportedSchemeException.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Exception; - -use Symfony\Component\Translation\Bridge; -use Symfony\Component\Translation\Provider\Dsn; - -class UnsupportedSchemeException extends LogicException -{ - private const SCHEME_TO_PACKAGE_MAP = [ - 'crowdin' => [ - 'class' => Bridge\Crowdin\CrowdinProviderFactory::class, - 'package' => 'symfony/crowdin-translation-provider', - ], - 'loco' => [ - 'class' => Bridge\Loco\LocoProviderFactory::class, - 'package' => 'symfony/loco-translation-provider', - ], - 'lokalise' => [ - 'class' => Bridge\Lokalise\LokaliseProviderFactory::class, - 'package' => 'symfony/lokalise-translation-provider', - ], - ]; - - public function __construct(Dsn $dsn, ?string $name = null, array $supported = []) - { - $provider = $dsn->getScheme(); - if (false !== $pos = strpos($provider, '+')) { - $provider = substr($provider, 0, $pos); - } - $package = self::SCHEME_TO_PACKAGE_MAP[$provider] ?? null; - if ($package && !class_exists($package['class'])) { - parent::__construct(sprintf('Unable to synchronize translations via "%s" as the provider is not installed; try running "composer require %s".', $provider, $package['package'])); - - return; - } - - $message = sprintf('The "%s" scheme is not supported', $dsn->getScheme()); - if ($name && $supported) { - $message .= sprintf('; supported schemes for translation provider "%s" are: "%s"', $name, implode('", "', $supported)); - } - - parent::__construct($message.'.'); - } -} diff --git a/vendor/symfony/translation/Extractor/AbstractFileExtractor.php b/vendor/symfony/translation/Extractor/AbstractFileExtractor.php deleted file mode 100644 index 3bc8783..0000000 --- a/vendor/symfony/translation/Extractor/AbstractFileExtractor.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Extractor; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; - -/** - * Base class used by classes that extract translation messages from files. - * - * @author Marcos D. Sánchez <marcosdsanchez@gmail.com> - */ -abstract class AbstractFileExtractor -{ - /** - * @param string|iterable $resource Files, a file or a directory - * - * @return iterable - */ - protected function extractFiles($resource) - { - if (is_iterable($resource)) { - $files = []; - foreach ($resource as $file) { - if ($this->canBeExtracted($file)) { - $files[] = $this->toSplFileInfo($file); - } - } - } elseif (is_file($resource)) { - $files = $this->canBeExtracted($resource) ? [$this->toSplFileInfo($resource)] : []; - } else { - $files = $this->extractFromDirectory($resource); - } - - return $files; - } - - private function toSplFileInfo(string $file): \SplFileInfo - { - return new \SplFileInfo($file); - } - - /** - * @return bool - * - * @throws InvalidArgumentException - */ - protected function isFile(string $file) - { - if (!is_file($file)) { - throw new InvalidArgumentException(sprintf('The "%s" file does not exist.', $file)); - } - - return true; - } - - /** - * @return bool - */ - abstract protected function canBeExtracted(string $file); - - /** - * @param string|array $resource Files, a file or a directory - * - * @return iterable - */ - abstract protected function extractFromDirectory($resource); -} diff --git a/vendor/symfony/translation/Extractor/ChainExtractor.php b/vendor/symfony/translation/Extractor/ChainExtractor.php deleted file mode 100644 index 95dcf15..0000000 --- a/vendor/symfony/translation/Extractor/ChainExtractor.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Extractor; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * ChainExtractor extracts translation messages from template files. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class ChainExtractor implements ExtractorInterface -{ - /** - * The extractors. - * - * @var ExtractorInterface[] - */ - private $extractors = []; - - /** - * Adds a loader to the translation extractor. - */ - public function addExtractor(string $format, ExtractorInterface $extractor) - { - $this->extractors[$format] = $extractor; - } - - /** - * {@inheritdoc} - */ - public function setPrefix(string $prefix) - { - foreach ($this->extractors as $extractor) { - $extractor->setPrefix($prefix); - } - } - - /** - * {@inheritdoc} - */ - public function extract($directory, MessageCatalogue $catalogue) - { - foreach ($this->extractors as $extractor) { - $extractor->extract($directory, $catalogue); - } - } -} diff --git a/vendor/symfony/translation/Extractor/ExtractorInterface.php b/vendor/symfony/translation/Extractor/ExtractorInterface.php deleted file mode 100644 index e1db8a9..0000000 --- a/vendor/symfony/translation/Extractor/ExtractorInterface.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Extractor; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * Extracts translation messages from a directory or files to the catalogue. - * New found messages are injected to the catalogue using the prefix. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -interface ExtractorInterface -{ - /** - * Extracts translation messages from files, a file or a directory to the catalogue. - * - * @param string|iterable<string> $resource Files, a file or a directory - */ - public function extract($resource, MessageCatalogue $catalogue); - - /** - * Sets the prefix that should be used for new found messages. - */ - public function setPrefix(string $prefix); -} diff --git a/vendor/symfony/translation/Extractor/PhpExtractor.php b/vendor/symfony/translation/Extractor/PhpExtractor.php deleted file mode 100644 index 38c08d5..0000000 --- a/vendor/symfony/translation/Extractor/PhpExtractor.php +++ /dev/null @@ -1,336 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Extractor; - -use Symfony\Component\Finder\Finder; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * PhpExtractor extracts translation messages from a PHP template. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface -{ - public const MESSAGE_TOKEN = 300; - public const METHOD_ARGUMENTS_TOKEN = 1000; - public const DOMAIN_TOKEN = 1001; - - /** - * Prefix for new found message. - */ - private $prefix = ''; - - /** - * The sequence that captures translation messages. - */ - protected $sequences = [ - [ - '->', - 'trans', - '(', - self::MESSAGE_TOKEN, - ',', - self::METHOD_ARGUMENTS_TOKEN, - ',', - self::DOMAIN_TOKEN, - ], - [ - '->', - 'trans', - '(', - self::MESSAGE_TOKEN, - ], - [ - 'new', - 'TranslatableMessage', - '(', - self::MESSAGE_TOKEN, - ',', - self::METHOD_ARGUMENTS_TOKEN, - ',', - self::DOMAIN_TOKEN, - ], - [ - 'new', - 'TranslatableMessage', - '(', - self::MESSAGE_TOKEN, - ], - [ - 'new', - '\\', - 'Symfony', - '\\', - 'Component', - '\\', - 'Translation', - '\\', - 'TranslatableMessage', - '(', - self::MESSAGE_TOKEN, - ',', - self::METHOD_ARGUMENTS_TOKEN, - ',', - self::DOMAIN_TOKEN, - ], - [ - 'new', - '\Symfony\Component\Translation\TranslatableMessage', - '(', - self::MESSAGE_TOKEN, - ',', - self::METHOD_ARGUMENTS_TOKEN, - ',', - self::DOMAIN_TOKEN, - ], - [ - 'new', - '\\', - 'Symfony', - '\\', - 'Component', - '\\', - 'Translation', - '\\', - 'TranslatableMessage', - '(', - self::MESSAGE_TOKEN, - ], - [ - 'new', - '\Symfony\Component\Translation\TranslatableMessage', - '(', - self::MESSAGE_TOKEN, - ], - [ - 't', - '(', - self::MESSAGE_TOKEN, - ',', - self::METHOD_ARGUMENTS_TOKEN, - ',', - self::DOMAIN_TOKEN, - ], - [ - 't', - '(', - self::MESSAGE_TOKEN, - ], - ]; - - /** - * {@inheritdoc} - */ - public function extract($resource, MessageCatalogue $catalog) - { - $files = $this->extractFiles($resource); - foreach ($files as $file) { - $this->parseTokens(token_get_all(file_get_contents($file)), $catalog, $file); - - gc_mem_caches(); - } - } - - /** - * {@inheritdoc} - */ - public function setPrefix(string $prefix) - { - $this->prefix = $prefix; - } - - /** - * Normalizes a token. - * - * @param mixed $token - * - * @return string|null - */ - protected function normalizeToken($token) - { - if (isset($token[1]) && 'b"' !== $token) { - return $token[1]; - } - - return $token; - } - - /** - * Seeks to a non-whitespace token. - */ - private function seekToNextRelevantToken(\Iterator $tokenIterator) - { - for (; $tokenIterator->valid(); $tokenIterator->next()) { - $t = $tokenIterator->current(); - if (\T_WHITESPACE !== $t[0]) { - break; - } - } - } - - private function skipMethodArgument(\Iterator $tokenIterator) - { - $openBraces = 0; - - for (; $tokenIterator->valid(); $tokenIterator->next()) { - $t = $tokenIterator->current(); - - if ('[' === $t[0] || '(' === $t[0]) { - ++$openBraces; - } - - if (']' === $t[0] || ')' === $t[0]) { - --$openBraces; - } - - if ((0 === $openBraces && ',' === $t[0]) || (-1 === $openBraces && ')' === $t[0])) { - break; - } - } - } - - /** - * Extracts the message from the iterator while the tokens - * match allowed message tokens. - */ - private function getValue(\Iterator $tokenIterator) - { - $message = ''; - $docToken = ''; - $docPart = ''; - - for (; $tokenIterator->valid(); $tokenIterator->next()) { - $t = $tokenIterator->current(); - if ('.' === $t) { - // Concatenate with next token - continue; - } - if (!isset($t[1])) { - break; - } - - switch ($t[0]) { - case \T_START_HEREDOC: - $docToken = $t[1]; - break; - case \T_ENCAPSED_AND_WHITESPACE: - case \T_CONSTANT_ENCAPSED_STRING: - if ('' === $docToken) { - $message .= PhpStringTokenParser::parse($t[1]); - } else { - $docPart = $t[1]; - } - break; - case \T_END_HEREDOC: - if ($indentation = strspn($t[1], ' ')) { - $docPartWithLineBreaks = $docPart; - $docPart = ''; - - foreach (preg_split('~(\r\n|\n|\r)~', $docPartWithLineBreaks, -1, \PREG_SPLIT_DELIM_CAPTURE) as $str) { - if (\in_array($str, ["\r\n", "\n", "\r"], true)) { - $docPart .= $str; - } else { - $docPart .= substr($str, $indentation); - } - } - } - - $message .= PhpStringTokenParser::parseDocString($docToken, $docPart); - $docToken = ''; - $docPart = ''; - break; - case \T_WHITESPACE: - break; - default: - break 2; - } - } - - return $message; - } - - /** - * Extracts trans message from PHP tokens. - */ - protected function parseTokens(array $tokens, MessageCatalogue $catalog, string $filename) - { - $tokenIterator = new \ArrayIterator($tokens); - - for ($key = 0; $key < $tokenIterator->count(); ++$key) { - foreach ($this->sequences as $sequence) { - $message = ''; - $domain = 'messages'; - $tokenIterator->seek($key); - - foreach ($sequence as $sequenceKey => $item) { - $this->seekToNextRelevantToken($tokenIterator); - - if ($this->normalizeToken($tokenIterator->current()) === $item) { - $tokenIterator->next(); - continue; - } elseif (self::MESSAGE_TOKEN === $item) { - $message = $this->getValue($tokenIterator); - - if (\count($sequence) === ($sequenceKey + 1)) { - break; - } - } elseif (self::METHOD_ARGUMENTS_TOKEN === $item) { - $this->skipMethodArgument($tokenIterator); - } elseif (self::DOMAIN_TOKEN === $item) { - $domainToken = $this->getValue($tokenIterator); - if ('' !== $domainToken) { - $domain = $domainToken; - } - - break; - } else { - break; - } - } - - if ($message) { - $catalog->set($message, $this->prefix.$message, $domain); - $metadata = $catalog->getMetadata($message, $domain) ?? []; - $normalizedFilename = preg_replace('{[\\\\/]+}', '/', $filename); - $metadata['sources'][] = $normalizedFilename.':'.$tokens[$key][2]; - $catalog->setMetadata($message, $metadata, $domain); - break; - } - } - } - } - - /** - * @return bool - * - * @throws \InvalidArgumentException - */ - protected function canBeExtracted(string $file) - { - return $this->isFile($file) && 'php' === pathinfo($file, \PATHINFO_EXTENSION); - } - - /** - * {@inheritdoc} - */ - protected function extractFromDirectory($directory) - { - if (!class_exists(Finder::class)) { - throw new \LogicException(sprintf('You cannot use "%s" as the "symfony/finder" package is not installed. Try running "composer require symfony/finder".', static::class)); - } - - $finder = new Finder(); - - return $finder->files()->name('*.php')->in($directory); - } -} diff --git a/vendor/symfony/translation/Extractor/PhpStringTokenParser.php b/vendor/symfony/translation/Extractor/PhpStringTokenParser.php deleted file mode 100644 index c069946..0000000 --- a/vendor/symfony/translation/Extractor/PhpStringTokenParser.php +++ /dev/null @@ -1,142 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Extractor; - -/* - * The following is derived from code at http://github.com/nikic/PHP-Parser - * - * Copyright (c) 2011 by Nikita Popov - * - * Some rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * - * * The names of the contributors may not be used to endorse or - * promote products derived from this software without specific - * prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -class PhpStringTokenParser -{ - protected static $replacements = [ - '\\' => '\\', - '$' => '$', - 'n' => "\n", - 'r' => "\r", - 't' => "\t", - 'f' => "\f", - 'v' => "\v", - 'e' => "\x1B", - ]; - - /** - * Parses a string token. - * - * @param string $str String token content - * - * @return string - */ - public static function parse(string $str) - { - $bLength = 0; - if ('b' === $str[0]) { - $bLength = 1; - } - - if ('\'' === $str[$bLength]) { - return str_replace( - ['\\\\', '\\\''], - ['\\', '\''], - substr($str, $bLength + 1, -1) - ); - } else { - return self::parseEscapeSequences(substr($str, $bLength + 1, -1), '"'); - } - } - - /** - * Parses escape sequences in strings (all string types apart from single quoted). - * - * @param string $str String without quotes - * @param string|null $quote Quote type - * - * @return string - */ - public static function parseEscapeSequences(string $str, ?string $quote = null) - { - if (null !== $quote) { - $str = str_replace('\\'.$quote, $quote, $str); - } - - return preg_replace_callback( - '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3})~', - [__CLASS__, 'parseCallback'], - $str - ); - } - - private static function parseCallback(array $matches): string - { - $str = $matches[1]; - - if (isset(self::$replacements[$str])) { - return self::$replacements[$str]; - } elseif ('x' === $str[0] || 'X' === $str[0]) { - return \chr(hexdec($str)); - } else { - return \chr(octdec($str)); - } - } - - /** - * Parses a constant doc string. - * - * @param string $startToken Doc string start token content (<<<SMTHG) - * @param string $str String token content - * - * @return string - */ - public static function parseDocString(string $startToken, string $str) - { - // strip last newline (thanks tokenizer for sticking it into the string!) - $str = preg_replace('~(\r\n|\n|\r)$~', '', $str); - - // nowdoc string - if (str_contains($startToken, '\'')) { - return $str; - } - - return self::parseEscapeSequences($str, null); - } -} diff --git a/vendor/symfony/translation/Formatter/IntlFormatter.php b/vendor/symfony/translation/Formatter/IntlFormatter.php deleted file mode 100644 index f7f1c36..0000000 --- a/vendor/symfony/translation/Formatter/IntlFormatter.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Formatter; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Exception\LogicException; - -/** - * @author Guilherme Blanco <guilhermeblanco@hotmail.com> - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -class IntlFormatter implements IntlFormatterInterface -{ - private $hasMessageFormatter; - private $cache = []; - - /** - * {@inheritdoc} - */ - public function formatIntl(string $message, string $locale, array $parameters = []): string - { - // MessageFormatter constructor throws an exception if the message is empty - if ('' === $message) { - return ''; - } - - if (!$formatter = $this->cache[$locale][$message] ?? null) { - if (!($this->hasMessageFormatter ?? $this->hasMessageFormatter = class_exists(\MessageFormatter::class))) { - throw new LogicException('Cannot parse message translation: please install the "intl" PHP extension or the "symfony/polyfill-intl-messageformatter" package.'); - } - try { - $this->cache[$locale][$message] = $formatter = new \MessageFormatter($locale, $message); - } catch (\IntlException $e) { - throw new InvalidArgumentException(sprintf('Invalid message format (error #%d): ', intl_get_error_code()).intl_get_error_message(), 0, $e); - } - } - - foreach ($parameters as $key => $value) { - if (\in_array($key[0] ?? null, ['%', '{'], true)) { - unset($parameters[$key]); - $parameters[trim($key, '%{ }')] = $value; - } - } - - if (false === $message = $formatter->format($parameters)) { - throw new InvalidArgumentException(sprintf('Unable to format message (error #%s): ', $formatter->getErrorCode()).$formatter->getErrorMessage()); - } - - return $message; - } -} diff --git a/vendor/symfony/translation/Formatter/IntlFormatterInterface.php b/vendor/symfony/translation/Formatter/IntlFormatterInterface.php deleted file mode 100644 index 02fc6ac..0000000 --- a/vendor/symfony/translation/Formatter/IntlFormatterInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Formatter; - -/** - * Formats ICU message patterns. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface IntlFormatterInterface -{ - /** - * Formats a localized message using rules defined by ICU MessageFormat. - * - * @see http://icu-project.org/apiref/icu4c/classMessageFormat.html#details - */ - public function formatIntl(string $message, string $locale, array $parameters = []): string; -} diff --git a/vendor/symfony/translation/Formatter/MessageFormatter.php b/vendor/symfony/translation/Formatter/MessageFormatter.php deleted file mode 100644 index 3449a84..0000000 --- a/vendor/symfony/translation/Formatter/MessageFormatter.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Formatter; - -use Symfony\Component\Translation\IdentityTranslator; -use Symfony\Contracts\Translation\TranslatorInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(IntlFormatter::class); - -/** - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -class MessageFormatter implements MessageFormatterInterface, IntlFormatterInterface -{ - private $translator; - private $intlFormatter; - - /** - * @param TranslatorInterface|null $translator An identity translator to use as selector for pluralization - */ - public function __construct(?TranslatorInterface $translator = null, ?IntlFormatterInterface $intlFormatter = null) - { - $this->translator = $translator ?? new IdentityTranslator(); - $this->intlFormatter = $intlFormatter ?? new IntlFormatter(); - } - - /** - * {@inheritdoc} - */ - public function format(string $message, string $locale, array $parameters = []) - { - if ($this->translator instanceof TranslatorInterface) { - return $this->translator->trans($message, $parameters, null, $locale); - } - - return strtr($message, $parameters); - } - - /** - * {@inheritdoc} - */ - public function formatIntl(string $message, string $locale, array $parameters = []): string - { - return $this->intlFormatter->formatIntl($message, $locale, $parameters); - } -} diff --git a/vendor/symfony/translation/Formatter/MessageFormatterInterface.php b/vendor/symfony/translation/Formatter/MessageFormatterInterface.php deleted file mode 100644 index b85dbfd..0000000 --- a/vendor/symfony/translation/Formatter/MessageFormatterInterface.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Formatter; - -/** - * @author Guilherme Blanco <guilhermeblanco@hotmail.com> - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -interface MessageFormatterInterface -{ - /** - * Formats a localized message pattern with given arguments. - * - * @param string $message The message (may also be an object that can be cast to string) - * @param string $locale The message locale - * @param array $parameters An array of parameters for the message - * - * @return string - */ - public function format(string $message, string $locale, array $parameters = []); -} diff --git a/vendor/symfony/translation/IdentityTranslator.php b/vendor/symfony/translation/IdentityTranslator.php deleted file mode 100644 index 46875ed..0000000 --- a/vendor/symfony/translation/IdentityTranslator.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Contracts\Translation\LocaleAwareInterface; -use Symfony\Contracts\Translation\TranslatorInterface; -use Symfony\Contracts\Translation\TranslatorTrait; - -/** - * IdentityTranslator does not translate anything. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class IdentityTranslator implements TranslatorInterface, LocaleAwareInterface -{ - use TranslatorTrait; -} diff --git a/vendor/symfony/translation/LICENSE b/vendor/symfony/translation/LICENSE deleted file mode 100644 index 0138f8f..0000000 --- a/vendor/symfony/translation/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/translation/Loader/ArrayLoader.php b/vendor/symfony/translation/Loader/ArrayLoader.php deleted file mode 100644 index feed0de..0000000 --- a/vendor/symfony/translation/Loader/ArrayLoader.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * ArrayLoader loads translations from a PHP array. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class ArrayLoader implements LoaderInterface -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $locale, string $domain = 'messages') - { - $resource = $this->flatten($resource); - $catalogue = new MessageCatalogue($locale); - $catalogue->add($resource, $domain); - - return $catalogue; - } - - /** - * Flattens an nested array of translations. - * - * The scheme used is: - * 'key' => ['key2' => ['key3' => 'value']] - * Becomes: - * 'key.key2.key3' => 'value' - */ - private function flatten(array $messages): array - { - $result = []; - foreach ($messages as $key => $value) { - if (\is_array($value)) { - foreach ($this->flatten($value) as $k => $v) { - if (null !== $v) { - $result[$key.'.'.$k] = $v; - } - } - } elseif (null !== $value) { - $result[$key] = $value; - } - } - - return $result; - } -} diff --git a/vendor/symfony/translation/Loader/CsvFileLoader.php b/vendor/symfony/translation/Loader/CsvFileLoader.php deleted file mode 100644 index 8d5d4db..0000000 --- a/vendor/symfony/translation/Loader/CsvFileLoader.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Translation\Exception\NotFoundResourceException; - -/** - * CsvFileLoader loads translations from CSV files. - * - * @author Saša Stamenković <umpirsky@gmail.com> - */ -class CsvFileLoader extends FileLoader -{ - private $delimiter = ';'; - private $enclosure = '"'; - private $escape = '\\'; - - /** - * {@inheritdoc} - */ - protected function loadResource(string $resource) - { - $messages = []; - - try { - $file = new \SplFileObject($resource, 'rb'); - } catch (\RuntimeException $e) { - throw new NotFoundResourceException(sprintf('Error opening file "%s".', $resource), 0, $e); - } - - $file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY); - $file->setCsvControl($this->delimiter, $this->enclosure, $this->escape); - - foreach ($file as $data) { - if (false === $data) { - continue; - } - - if ('#' !== substr($data[0], 0, 1) && isset($data[1]) && 2 === \count($data)) { - $messages[$data[0]] = $data[1]; - } - } - - return $messages; - } - - /** - * Sets the delimiter, enclosure, and escape character for CSV. - */ - public function setCsvControl(string $delimiter = ';', string $enclosure = '"', string $escape = '\\') - { - $this->delimiter = $delimiter; - $this->enclosure = $enclosure; - $this->escape = $escape; - } -} diff --git a/vendor/symfony/translation/Loader/FileLoader.php b/vendor/symfony/translation/Loader/FileLoader.php deleted file mode 100644 index 4725ea6..0000000 --- a/vendor/symfony/translation/Loader/FileLoader.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; - -/** - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -abstract class FileLoader extends ArrayLoader -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $locale, string $domain = 'messages') - { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - $messages = $this->loadResource($resource); - - // empty resource - if (null === $messages) { - $messages = []; - } - - // not an array - if (!\is_array($messages)) { - throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); - } - - $catalogue = parent::load($messages, $locale, $domain); - - if (class_exists(FileResource::class)) { - $catalogue->addResource(new FileResource($resource)); - } - - return $catalogue; - } - - /** - * @return array - * - * @throws InvalidResourceException if stream content has an invalid format - */ - abstract protected function loadResource(string $resource); -} diff --git a/vendor/symfony/translation/Loader/IcuDatFileLoader.php b/vendor/symfony/translation/Loader/IcuDatFileLoader.php deleted file mode 100644 index 2a1aecc..0000000 --- a/vendor/symfony/translation/Loader/IcuDatFileLoader.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * IcuResFileLoader loads translations from a resource bundle. - * - * @author stealth35 - */ -class IcuDatFileLoader extends IcuResFileLoader -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $locale, string $domain = 'messages') - { - if (!stream_is_local($resource.'.dat')) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource.'.dat')) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - try { - $rb = new \ResourceBundle($locale, $resource); - } catch (\Exception $e) { - $rb = null; - } - - if (!$rb) { - throw new InvalidResourceException(sprintf('Cannot load resource "%s".', $resource)); - } elseif (intl_is_failure($rb->getErrorCode())) { - throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); - } - - $messages = $this->flatten($rb); - $catalogue = new MessageCatalogue($locale); - $catalogue->add($messages, $domain); - - if (class_exists(FileResource::class)) { - $catalogue->addResource(new FileResource($resource.'.dat')); - } - - return $catalogue; - } -} diff --git a/vendor/symfony/translation/Loader/IcuResFileLoader.php b/vendor/symfony/translation/Loader/IcuResFileLoader.php deleted file mode 100644 index 88e1337..0000000 --- a/vendor/symfony/translation/Loader/IcuResFileLoader.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Config\Resource\DirectoryResource; -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * IcuResFileLoader loads translations from a resource bundle. - * - * @author stealth35 - */ -class IcuResFileLoader implements LoaderInterface -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $locale, string $domain = 'messages') - { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!is_dir($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - try { - $rb = new \ResourceBundle($locale, $resource); - } catch (\Exception $e) { - $rb = null; - } - - if (!$rb) { - throw new InvalidResourceException(sprintf('Cannot load resource "%s".', $resource)); - } elseif (intl_is_failure($rb->getErrorCode())) { - throw new InvalidResourceException($rb->getErrorMessage(), $rb->getErrorCode()); - } - - $messages = $this->flatten($rb); - $catalogue = new MessageCatalogue($locale); - $catalogue->add($messages, $domain); - - if (class_exists(DirectoryResource::class)) { - $catalogue->addResource(new DirectoryResource($resource)); - } - - return $catalogue; - } - - /** - * Flattens an ResourceBundle. - * - * The scheme used is: - * key { key2 { key3 { "value" } } } - * Becomes: - * 'key.key2.key3' => 'value' - * - * This function takes an array by reference and will modify it - * - * @param \ResourceBundle $rb The ResourceBundle that will be flattened - * @param array $messages Used internally for recursive calls - * @param string|null $path Current path being parsed, used internally for recursive calls - * - * @return array - */ - protected function flatten(\ResourceBundle $rb, array &$messages = [], ?string $path = null) - { - foreach ($rb as $key => $value) { - $nodePath = $path ? $path.'.'.$key : $key; - if ($value instanceof \ResourceBundle) { - $this->flatten($value, $messages, $nodePath); - } else { - $messages[$nodePath] = $value; - } - } - - return $messages; - } -} diff --git a/vendor/symfony/translation/Loader/IniFileLoader.php b/vendor/symfony/translation/Loader/IniFileLoader.php deleted file mode 100644 index 7398f77..0000000 --- a/vendor/symfony/translation/Loader/IniFileLoader.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -/** - * IniFileLoader loads translations from an ini file. - * - * @author stealth35 - */ -class IniFileLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - protected function loadResource(string $resource) - { - return parse_ini_file($resource, true); - } -} diff --git a/vendor/symfony/translation/Loader/JsonFileLoader.php b/vendor/symfony/translation/Loader/JsonFileLoader.php deleted file mode 100644 index 5aefba0..0000000 --- a/vendor/symfony/translation/Loader/JsonFileLoader.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Translation\Exception\InvalidResourceException; - -/** - * JsonFileLoader loads translations from an json file. - * - * @author singles - */ -class JsonFileLoader extends FileLoader -{ - /** - * {@inheritdoc} - */ - protected function loadResource(string $resource) - { - $messages = []; - if ($data = file_get_contents($resource)) { - $messages = json_decode($data, true); - - if (0 < $errorCode = json_last_error()) { - throw new InvalidResourceException('Error parsing JSON: '.$this->getJSONErrorMessage($errorCode)); - } - } - - return $messages; - } - - /** - * Translates JSON_ERROR_* constant into meaningful message. - */ - private function getJSONErrorMessage(int $errorCode): string - { - switch ($errorCode) { - case \JSON_ERROR_DEPTH: - return 'Maximum stack depth exceeded'; - case \JSON_ERROR_STATE_MISMATCH: - return 'Underflow or the modes mismatch'; - case \JSON_ERROR_CTRL_CHAR: - return 'Unexpected control character found'; - case \JSON_ERROR_SYNTAX: - return 'Syntax error, malformed JSON'; - case \JSON_ERROR_UTF8: - return 'Malformed UTF-8 characters, possibly incorrectly encoded'; - default: - return 'Unknown error'; - } - } -} diff --git a/vendor/symfony/translation/Loader/LoaderInterface.php b/vendor/symfony/translation/Loader/LoaderInterface.php deleted file mode 100644 index 96b0c0d..0000000 --- a/vendor/symfony/translation/Loader/LoaderInterface.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * LoaderInterface is the interface implemented by all translation loaders. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -interface LoaderInterface -{ - /** - * Loads a locale. - * - * @param mixed $resource A resource - * @param string $locale A locale - * @param string $domain The domain - * - * @return MessageCatalogue - * - * @throws NotFoundResourceException when the resource cannot be found - * @throws InvalidResourceException when the resource cannot be loaded - */ - public function load($resource, string $locale, string $domain = 'messages'); -} diff --git a/vendor/symfony/translation/Loader/MoFileLoader.php b/vendor/symfony/translation/Loader/MoFileLoader.php deleted file mode 100644 index 7fa2f2d..0000000 --- a/vendor/symfony/translation/Loader/MoFileLoader.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Translation\Exception\InvalidResourceException; - -/** - * @copyright Copyright (c) 2010, Union of RAD http://union-of-rad.org (http://lithify.me/) - */ -class MoFileLoader extends FileLoader -{ - /** - * Magic used for validating the format of an MO file as well as - * detecting if the machine used to create that file was little endian. - */ - public const MO_LITTLE_ENDIAN_MAGIC = 0x950412DE; - - /** - * Magic used for validating the format of an MO file as well as - * detecting if the machine used to create that file was big endian. - */ - public const MO_BIG_ENDIAN_MAGIC = 0xDE120495; - - /** - * The size of the header of an MO file in bytes. - */ - public const MO_HEADER_SIZE = 28; - - /** - * Parses machine object (MO) format, independent of the machine's endian it - * was created on. Both 32bit and 64bit systems are supported. - * - * {@inheritdoc} - */ - protected function loadResource(string $resource) - { - $stream = fopen($resource, 'r'); - - $stat = fstat($stream); - - if ($stat['size'] < self::MO_HEADER_SIZE) { - throw new InvalidResourceException('MO stream content has an invalid format.'); - } - $magic = unpack('V1', fread($stream, 4)); - $magic = hexdec(substr(dechex(current($magic)), -8)); - - if (self::MO_LITTLE_ENDIAN_MAGIC == $magic) { - $isBigEndian = false; - } elseif (self::MO_BIG_ENDIAN_MAGIC == $magic) { - $isBigEndian = true; - } else { - throw new InvalidResourceException('MO stream content has an invalid format.'); - } - - // formatRevision - $this->readLong($stream, $isBigEndian); - $count = $this->readLong($stream, $isBigEndian); - $offsetId = $this->readLong($stream, $isBigEndian); - $offsetTranslated = $this->readLong($stream, $isBigEndian); - // sizeHashes - $this->readLong($stream, $isBigEndian); - // offsetHashes - $this->readLong($stream, $isBigEndian); - - $messages = []; - - for ($i = 0; $i < $count; ++$i) { - $pluralId = null; - $translated = null; - - fseek($stream, $offsetId + $i * 8); - - $length = $this->readLong($stream, $isBigEndian); - $offset = $this->readLong($stream, $isBigEndian); - - if ($length < 1) { - continue; - } - - fseek($stream, $offset); - $singularId = fread($stream, $length); - - if (str_contains($singularId, "\000")) { - [$singularId, $pluralId] = explode("\000", $singularId); - } - - fseek($stream, $offsetTranslated + $i * 8); - $length = $this->readLong($stream, $isBigEndian); - $offset = $this->readLong($stream, $isBigEndian); - - if ($length < 1) { - continue; - } - - fseek($stream, $offset); - $translated = fread($stream, $length); - - if (str_contains($translated, "\000")) { - $translated = explode("\000", $translated); - } - - $ids = ['singular' => $singularId, 'plural' => $pluralId]; - $item = compact('ids', 'translated'); - - if (!empty($item['ids']['singular'])) { - $id = $item['ids']['singular']; - if (isset($item['ids']['plural'])) { - $id .= '|'.$item['ids']['plural']; - } - $messages[$id] = stripcslashes(implode('|', (array) $item['translated'])); - } - } - - fclose($stream); - - return array_filter($messages); - } - - /** - * Reads an unsigned long from stream respecting endianness. - * - * @param resource $stream - */ - private function readLong($stream, bool $isBigEndian): int - { - $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4)); - $result = current($result); - - return (int) substr($result, -8); - } -} diff --git a/vendor/symfony/translation/Loader/PhpFileLoader.php b/vendor/symfony/translation/Loader/PhpFileLoader.php deleted file mode 100644 index 40f64db..0000000 --- a/vendor/symfony/translation/Loader/PhpFileLoader.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -/** - * PhpFileLoader loads translations from PHP files returning an array of translations. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class PhpFileLoader extends FileLoader -{ - private static $cache = []; - - /** - * {@inheritdoc} - */ - protected function loadResource(string $resource) - { - if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN))) { - self::$cache = null; - } - - if (null === self::$cache) { - return require $resource; - } - - if (isset(self::$cache[$resource])) { - return self::$cache[$resource]; - } - - return self::$cache[$resource] = require $resource; - } -} diff --git a/vendor/symfony/translation/Loader/PoFileLoader.php b/vendor/symfony/translation/Loader/PoFileLoader.php deleted file mode 100644 index ee143e2..0000000 --- a/vendor/symfony/translation/Loader/PoFileLoader.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -/** - * @copyright Copyright (c) 2010, Union of RAD https://github.com/UnionOfRAD/lithium - * @copyright Copyright (c) 2012, Clemens Tolboom - */ -class PoFileLoader extends FileLoader -{ - /** - * Parses portable object (PO) format. - * - * From https://www.gnu.org/software/gettext/manual/gettext.html#PO-Files - * we should be able to parse files having: - * - * white-space - * # translator-comments - * #. extracted-comments - * #: reference... - * #, flag... - * #| msgid previous-untranslated-string - * msgid untranslated-string - * msgstr translated-string - * - * extra or different lines are: - * - * #| msgctxt previous-context - * #| msgid previous-untranslated-string - * msgctxt context - * - * #| msgid previous-untranslated-string-singular - * #| msgid_plural previous-untranslated-string-plural - * msgid untranslated-string-singular - * msgid_plural untranslated-string-plural - * msgstr[0] translated-string-case-0 - * ... - * msgstr[N] translated-string-case-n - * - * The definition states: - * - white-space and comments are optional. - * - msgid "" that an empty singleline defines a header. - * - * This parser sacrifices some features of the reference implementation the - * differences to that implementation are as follows. - * - No support for comments spanning multiple lines. - * - Translator and extracted comments are treated as being the same type. - * - Message IDs are allowed to have other encodings as just US-ASCII. - * - * Items with an empty id are ignored. - * - * {@inheritdoc} - */ - protected function loadResource(string $resource) - { - $stream = fopen($resource, 'r'); - - $defaults = [ - 'ids' => [], - 'translated' => null, - ]; - - $messages = []; - $item = $defaults; - $flags = []; - - while ($line = fgets($stream)) { - $line = trim($line); - - if ('' === $line) { - // Whitespace indicated current item is done - if (!\in_array('fuzzy', $flags)) { - $this->addMessage($messages, $item); - } - $item = $defaults; - $flags = []; - } elseif ('#,' === substr($line, 0, 2)) { - $flags = array_map('trim', explode(',', substr($line, 2))); - } elseif ('msgid "' === substr($line, 0, 7)) { - // We start a new msg so save previous - // TODO: this fails when comments or contexts are added - $this->addMessage($messages, $item); - $item = $defaults; - $item['ids']['singular'] = substr($line, 7, -1); - } elseif ('msgstr "' === substr($line, 0, 8)) { - $item['translated'] = substr($line, 8, -1); - } elseif ('"' === $line[0]) { - $continues = isset($item['translated']) ? 'translated' : 'ids'; - - if (\is_array($item[$continues])) { - end($item[$continues]); - $item[$continues][key($item[$continues])] .= substr($line, 1, -1); - } else { - $item[$continues] .= substr($line, 1, -1); - } - } elseif ('msgid_plural "' === substr($line, 0, 14)) { - $item['ids']['plural'] = substr($line, 14, -1); - } elseif ('msgstr[' === substr($line, 0, 7)) { - $size = strpos($line, ']'); - $item['translated'][(int) substr($line, 7, 1)] = substr($line, $size + 3, -1); - } - } - // save last item - if (!\in_array('fuzzy', $flags)) { - $this->addMessage($messages, $item); - } - fclose($stream); - - return $messages; - } - - /** - * Save a translation item to the messages. - * - * A .po file could contain by error missing plural indexes. We need to - * fix these before saving them. - */ - private function addMessage(array &$messages, array $item) - { - if (!empty($item['ids']['singular'])) { - $id = stripcslashes($item['ids']['singular']); - if (isset($item['ids']['plural'])) { - $id .= '|'.stripcslashes($item['ids']['plural']); - } - - $translated = (array) $item['translated']; - // PO are by definition indexed so sort by index. - ksort($translated); - // Make sure every index is filled. - end($translated); - $count = key($translated); - // Fill missing spots with '-'. - $empties = array_fill(0, $count + 1, '-'); - $translated += $empties; - ksort($translated); - - $messages[$id] = stripcslashes(implode('|', $translated)); - } - } -} diff --git a/vendor/symfony/translation/Loader/QtFileLoader.php b/vendor/symfony/translation/Loader/QtFileLoader.php deleted file mode 100644 index 9cf2fe9..0000000 --- a/vendor/symfony/translation/Loader/QtFileLoader.php +++ /dev/null @@ -1,82 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Translation\Exception\RuntimeException; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * QtFileLoader loads translations from QT Translations XML files. - * - * @author Benjamin Eberlei <kontakt@beberlei.de> - */ -class QtFileLoader implements LoaderInterface -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $locale, string $domain = 'messages') - { - if (!class_exists(XmlUtils::class)) { - throw new RuntimeException('Loading translations from the QT format requires the Symfony Config component.'); - } - - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - try { - $dom = XmlUtils::loadFile($resource); - } catch (\InvalidArgumentException $e) { - throw new InvalidResourceException(sprintf('Unable to load "%s".', $resource), $e->getCode(), $e); - } - - $internalErrors = libxml_use_internal_errors(true); - libxml_clear_errors(); - - $xpath = new \DOMXPath($dom); - $nodes = $xpath->evaluate('//TS/context/name[text()="'.$domain.'"]'); - - $catalogue = new MessageCatalogue($locale); - if (1 == $nodes->length) { - $translations = $nodes->item(0)->nextSibling->parentNode->parentNode->getElementsByTagName('message'); - foreach ($translations as $translation) { - $translationValue = (string) $translation->getElementsByTagName('translation')->item(0)->nodeValue; - - if (!empty($translationValue)) { - $catalogue->set( - (string) $translation->getElementsByTagName('source')->item(0)->nodeValue, - $translationValue, - $domain - ); - } - $translation = $translation->nextSibling; - } - - if (class_exists(FileResource::class)) { - $catalogue->addResource(new FileResource($resource)); - } - } - - libxml_use_internal_errors($internalErrors); - - return $catalogue; - } -} diff --git a/vendor/symfony/translation/Loader/XliffFileLoader.php b/vendor/symfony/translation/Loader/XliffFileLoader.php deleted file mode 100644 index fae07db..0000000 --- a/vendor/symfony/translation/Loader/XliffFileLoader.php +++ /dev/null @@ -1,236 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Config\Util\Exception\InvalidXmlException; -use Symfony\Component\Config\Util\Exception\XmlParsingException; -use Symfony\Component\Config\Util\XmlUtils; -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Translation\Exception\RuntimeException; -use Symfony\Component\Translation\MessageCatalogue; -use Symfony\Component\Translation\Util\XliffUtils; - -/** - * XliffFileLoader loads translations from XLIFF files. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class XliffFileLoader implements LoaderInterface -{ - /** - * {@inheritdoc} - */ - public function load($resource, string $locale, string $domain = 'messages') - { - if (!class_exists(XmlUtils::class)) { - throw new RuntimeException('Loading translations from the Xliff format requires the Symfony Config component.'); - } - - if (!$this->isXmlString($resource)) { - if (!stream_is_local($resource)) { - throw new InvalidResourceException(sprintf('This is not a local file "%s".', $resource)); - } - - if (!file_exists($resource)) { - throw new NotFoundResourceException(sprintf('File "%s" not found.', $resource)); - } - - if (!is_file($resource)) { - throw new InvalidResourceException(sprintf('This is neither a file nor an XLIFF string "%s".', $resource)); - } - } - - try { - if ($this->isXmlString($resource)) { - $dom = XmlUtils::parse($resource); - } else { - $dom = XmlUtils::loadFile($resource); - } - } catch (\InvalidArgumentException|XmlParsingException|InvalidXmlException $e) { - throw new InvalidResourceException(sprintf('Unable to load "%s": ', $resource).$e->getMessage(), $e->getCode(), $e); - } - - if ($errors = XliffUtils::validateSchema($dom)) { - throw new InvalidResourceException(sprintf('Invalid resource provided: "%s"; Errors: ', $resource).XliffUtils::getErrorsAsString($errors)); - } - - $catalogue = new MessageCatalogue($locale); - $this->extract($dom, $catalogue, $domain); - - if (is_file($resource) && class_exists(FileResource::class)) { - $catalogue->addResource(new FileResource($resource)); - } - - return $catalogue; - } - - private function extract(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain) - { - $xliffVersion = XliffUtils::getVersionNumber($dom); - - if ('1.2' === $xliffVersion) { - $this->extractXliff1($dom, $catalogue, $domain); - } - - if ('2.0' === $xliffVersion) { - $this->extractXliff2($dom, $catalogue, $domain); - } - } - - /** - * Extract messages and metadata from DOMDocument into a MessageCatalogue. - */ - private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain) - { - $xml = simplexml_import_dom($dom); - $encoding = $dom->encoding ? strtoupper($dom->encoding) : null; - - $namespace = 'urn:oasis:names:tc:xliff:document:1.2'; - $xml->registerXPathNamespace('xliff', $namespace); - - foreach ($xml->xpath('//xliff:file') as $file) { - $fileAttributes = $file->attributes(); - - $file->registerXPathNamespace('xliff', $namespace); - - foreach ($file->xpath('.//xliff:trans-unit') as $translation) { - $attributes = $translation->attributes(); - - if (!(isset($attributes['resname']) || isset($translation->source))) { - continue; - } - - if (isset($translation->target) && 'needs-translation' === (string) $translation->target->attributes()['state']) { - continue; - } - - $source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source; - // If the xlf file has another encoding specified, try to convert it because - // simple_xml will always return utf-8 encoded values - $target = $this->utf8ToCharset((string) ($translation->target ?? $translation->source), $encoding); - - $catalogue->set((string) $source, $target, $domain); - - $metadata = [ - 'source' => (string) $translation->source, - 'file' => [ - 'original' => (string) $fileAttributes['original'], - ], - ]; - if ($notes = $this->parseNotesMetadata($translation->note, $encoding)) { - $metadata['notes'] = $notes; - } - - if (isset($translation->target) && $translation->target->attributes()) { - $metadata['target-attributes'] = []; - foreach ($translation->target->attributes() as $key => $value) { - $metadata['target-attributes'][$key] = (string) $value; - } - } - - if (isset($attributes['id'])) { - $metadata['id'] = (string) $attributes['id']; - } - - $catalogue->setMetadata((string) $source, $metadata, $domain); - } - } - } - - private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain) - { - $xml = simplexml_import_dom($dom); - $encoding = $dom->encoding ? strtoupper($dom->encoding) : null; - - $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:2.0'); - - foreach ($xml->xpath('//xliff:unit') as $unit) { - foreach ($unit->segment as $segment) { - $attributes = $unit->attributes(); - $source = $attributes['name'] ?? $segment->source; - - // If the xlf file has another encoding specified, try to convert it because - // simple_xml will always return utf-8 encoded values - $target = $this->utf8ToCharset((string) ($segment->target ?? $segment->source), $encoding); - - $catalogue->set((string) $source, $target, $domain); - - $metadata = []; - if (isset($segment->target) && $segment->target->attributes()) { - $metadata['target-attributes'] = []; - foreach ($segment->target->attributes() as $key => $value) { - $metadata['target-attributes'][$key] = (string) $value; - } - } - - if (isset($unit->notes)) { - $metadata['notes'] = []; - foreach ($unit->notes->note as $noteNode) { - $note = []; - foreach ($noteNode->attributes() as $key => $value) { - $note[$key] = (string) $value; - } - $note['content'] = (string) $noteNode; - $metadata['notes'][] = $note; - } - } - - $catalogue->setMetadata((string) $source, $metadata, $domain); - } - } - } - - /** - * Convert a UTF8 string to the specified encoding. - */ - private function utf8ToCharset(string $content, ?string $encoding = null): string - { - if ('UTF-8' !== $encoding && !empty($encoding)) { - return mb_convert_encoding($content, $encoding, 'UTF-8'); - } - - return $content; - } - - private function parseNotesMetadata(?\SimpleXMLElement $noteElement = null, ?string $encoding = null): array - { - $notes = []; - - if (null === $noteElement) { - return $notes; - } - - /** @var \SimpleXMLElement $xmlNote */ - foreach ($noteElement as $xmlNote) { - $noteAttributes = $xmlNote->attributes(); - $note = ['content' => $this->utf8ToCharset((string) $xmlNote, $encoding)]; - if (isset($noteAttributes['priority'])) { - $note['priority'] = (int) $noteAttributes['priority']; - } - - if (isset($noteAttributes['from'])) { - $note['from'] = (string) $noteAttributes['from']; - } - - $notes[] = $note; - } - - return $notes; - } - - private function isXmlString(string $resource): bool - { - return 0 === strpos($resource, '<?xml'); - } -} diff --git a/vendor/symfony/translation/Loader/YamlFileLoader.php b/vendor/symfony/translation/Loader/YamlFileLoader.php deleted file mode 100644 index 8588e18..0000000 --- a/vendor/symfony/translation/Loader/YamlFileLoader.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Loader; - -use Symfony\Component\Translation\Exception\InvalidResourceException; -use Symfony\Component\Translation\Exception\LogicException; -use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Parser as YamlParser; -use Symfony\Component\Yaml\Yaml; - -/** - * YamlFileLoader loads translations from Yaml files. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class YamlFileLoader extends FileLoader -{ - private $yamlParser; - - /** - * {@inheritdoc} - */ - protected function loadResource(string $resource) - { - if (null === $this->yamlParser) { - if (!class_exists(\Symfony\Component\Yaml\Parser::class)) { - throw new LogicException('Loading translations from the YAML format requires the Symfony Yaml component.'); - } - - $this->yamlParser = new YamlParser(); - } - - try { - $messages = $this->yamlParser->parseFile($resource, Yaml::PARSE_CONSTANT); - } catch (ParseException $e) { - throw new InvalidResourceException(sprintf('The file "%s" does not contain valid YAML: ', $resource).$e->getMessage(), 0, $e); - } - - if (null !== $messages && !\is_array($messages)) { - throw new InvalidResourceException(sprintf('Unable to load file "%s".', $resource)); - } - - return $messages ?: []; - } -} diff --git a/vendor/symfony/translation/LoggingTranslator.php b/vendor/symfony/translation/LoggingTranslator.php deleted file mode 100644 index d0932b6..0000000 --- a/vendor/symfony/translation/LoggingTranslator.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Contracts\Translation\LocaleAwareInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface, LocaleAwareInterface -{ - private $translator; - private $logger; - - /** - * @param TranslatorInterface&TranslatorBagInterface&LocaleAwareInterface $translator The translator must implement TranslatorBagInterface - */ - public function __construct(TranslatorInterface $translator, LoggerInterface $logger) - { - if (!$translator instanceof TranslatorBagInterface || !$translator instanceof LocaleAwareInterface) { - throw new InvalidArgumentException(sprintf('The Translator "%s" must implement TranslatorInterface, TranslatorBagInterface and LocaleAwareInterface.', get_debug_type($translator))); - } - - $this->translator = $translator; - $this->logger = $logger; - } - - /** - * {@inheritdoc} - */ - public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) - { - $trans = $this->translator->trans($id = (string) $id, $parameters, $domain, $locale); - $this->log($id, $domain, $locale); - - return $trans; - } - - /** - * {@inheritdoc} - */ - public function setLocale(string $locale) - { - $prev = $this->translator->getLocale(); - $this->translator->setLocale($locale); - if ($prev === $locale) { - return; - } - - $this->logger->debug(sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale)); - } - - /** - * {@inheritdoc} - */ - public function getLocale() - { - return $this->translator->getLocale(); - } - - /** - * {@inheritdoc} - */ - public function getCatalogue(?string $locale = null) - { - return $this->translator->getCatalogue($locale); - } - - /** - * {@inheritdoc} - */ - public function getCatalogues(): array - { - return $this->translator->getCatalogues(); - } - - /** - * Gets the fallback locales. - * - * @return array - */ - public function getFallbackLocales() - { - if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) { - return $this->translator->getFallbackLocales(); - } - - return []; - } - - /** - * Passes through all unknown calls onto the translator object. - */ - public function __call(string $method, array $args) - { - return $this->translator->{$method}(...$args); - } - - /** - * Logs for missing translations. - */ - private function log(string $id, ?string $domain, ?string $locale) - { - if (null === $domain) { - $domain = 'messages'; - } - - $catalogue = $this->translator->getCatalogue($locale); - if ($catalogue->defines($id, $domain)) { - return; - } - - if ($catalogue->has($id, $domain)) { - $this->logger->debug('Translation use fallback catalogue.', ['id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale()]); - } else { - $this->logger->warning('Translation not found.', ['id' => $id, 'domain' => $domain, 'locale' => $catalogue->getLocale()]); - } - } -} diff --git a/vendor/symfony/translation/MessageCatalogue.php b/vendor/symfony/translation/MessageCatalogue.php deleted file mode 100644 index 2e00b64..0000000 --- a/vendor/symfony/translation/MessageCatalogue.php +++ /dev/null @@ -1,309 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Component\Config\Resource\ResourceInterface; -use Symfony\Component\Translation\Exception\LogicException; - -/** - * @author Fabien Potencier <fabien@symfony.com> - */ -class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterface -{ - private $messages = []; - private $metadata = []; - private $resources = []; - private $locale; - private $fallbackCatalogue; - private $parent; - - /** - * @param array $messages An array of messages classified by domain - */ - public function __construct(string $locale, array $messages = []) - { - $this->locale = $locale; - $this->messages = $messages; - } - - /** - * {@inheritdoc} - */ - public function getLocale() - { - return $this->locale; - } - - /** - * {@inheritdoc} - */ - public function getDomains() - { - $domains = []; - - foreach ($this->messages as $domain => $messages) { - if (str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { - $domain = substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)); - } - $domains[$domain] = $domain; - } - - return array_values($domains); - } - - /** - * {@inheritdoc} - */ - public function all(?string $domain = null) - { - if (null !== $domain) { - // skip messages merge if intl-icu requested explicitly - if (str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { - return $this->messages[$domain] ?? []; - } - - return ($this->messages[$domain.self::INTL_DOMAIN_SUFFIX] ?? []) + ($this->messages[$domain] ?? []); - } - - $allMessages = []; - - foreach ($this->messages as $domain => $messages) { - if (str_ends_with($domain, self::INTL_DOMAIN_SUFFIX)) { - $domain = substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)); - $allMessages[$domain] = $messages + ($allMessages[$domain] ?? []); - } else { - $allMessages[$domain] = ($allMessages[$domain] ?? []) + $messages; - } - } - - return $allMessages; - } - - /** - * {@inheritdoc} - */ - public function set(string $id, string $translation, string $domain = 'messages') - { - $this->add([$id => $translation], $domain); - } - - /** - * {@inheritdoc} - */ - public function has(string $id, string $domain = 'messages') - { - if (isset($this->messages[$domain][$id]) || isset($this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id])) { - return true; - } - - if (null !== $this->fallbackCatalogue) { - return $this->fallbackCatalogue->has($id, $domain); - } - - return false; - } - - /** - * {@inheritdoc} - */ - public function defines(string $id, string $domain = 'messages') - { - return isset($this->messages[$domain][$id]) || isset($this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id]); - } - - /** - * {@inheritdoc} - */ - public function get(string $id, string $domain = 'messages') - { - if (isset($this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id])) { - return $this->messages[$domain.self::INTL_DOMAIN_SUFFIX][$id]; - } - - if (isset($this->messages[$domain][$id])) { - return $this->messages[$domain][$id]; - } - - if (null !== $this->fallbackCatalogue) { - return $this->fallbackCatalogue->get($id, $domain); - } - - return $id; - } - - /** - * {@inheritdoc} - */ - public function replace(array $messages, string $domain = 'messages') - { - unset($this->messages[$domain], $this->messages[$domain.self::INTL_DOMAIN_SUFFIX]); - - $this->add($messages, $domain); - } - - /** - * {@inheritdoc} - */ - public function add(array $messages, string $domain = 'messages') - { - $altDomain = str_ends_with($domain, self::INTL_DOMAIN_SUFFIX) ? substr($domain, 0, -\strlen(self::INTL_DOMAIN_SUFFIX)) : $domain.self::INTL_DOMAIN_SUFFIX; - foreach ($messages as $id => $message) { - unset($this->messages[$altDomain][$id]); - $this->messages[$domain][$id] = $message; - } - - if ([] === ($this->messages[$altDomain] ?? null)) { - unset($this->messages[$altDomain]); - } - } - - /** - * {@inheritdoc} - */ - public function addCatalogue(MessageCatalogueInterface $catalogue) - { - if ($catalogue->getLocale() !== $this->locale) { - throw new LogicException(sprintf('Cannot add a catalogue for locale "%s" as the current locale for this catalogue is "%s".', $catalogue->getLocale(), $this->locale)); - } - - foreach ($catalogue->all() as $domain => $messages) { - if ($intlMessages = $catalogue->all($domain.self::INTL_DOMAIN_SUFFIX)) { - $this->add($intlMessages, $domain.self::INTL_DOMAIN_SUFFIX); - $messages = array_diff_key($messages, $intlMessages); - } - $this->add($messages, $domain); - } - - foreach ($catalogue->getResources() as $resource) { - $this->addResource($resource); - } - - if ($catalogue instanceof MetadataAwareInterface) { - $metadata = $catalogue->getMetadata('', ''); - $this->addMetadata($metadata); - } - } - - /** - * {@inheritdoc} - */ - public function addFallbackCatalogue(MessageCatalogueInterface $catalogue) - { - // detect circular references - $c = $catalogue; - while ($c = $c->getFallbackCatalogue()) { - if ($c->getLocale() === $this->getLocale()) { - throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); - } - } - - $c = $this; - do { - if ($c->getLocale() === $catalogue->getLocale()) { - throw new LogicException(sprintf('Circular reference detected when adding a fallback catalogue for locale "%s".', $catalogue->getLocale())); - } - - foreach ($catalogue->getResources() as $resource) { - $c->addResource($resource); - } - } while ($c = $c->parent); - - $catalogue->parent = $this; - $this->fallbackCatalogue = $catalogue; - - foreach ($catalogue->getResources() as $resource) { - $this->addResource($resource); - } - } - - /** - * {@inheritdoc} - */ - public function getFallbackCatalogue() - { - return $this->fallbackCatalogue; - } - - /** - * {@inheritdoc} - */ - public function getResources() - { - return array_values($this->resources); - } - - /** - * {@inheritdoc} - */ - public function addResource(ResourceInterface $resource) - { - $this->resources[$resource->__toString()] = $resource; - } - - /** - * {@inheritdoc} - */ - public function getMetadata(string $key = '', string $domain = 'messages') - { - if ('' == $domain) { - return $this->metadata; - } - - if (isset($this->metadata[$domain])) { - if ('' == $key) { - return $this->metadata[$domain]; - } - - if (isset($this->metadata[$domain][$key])) { - return $this->metadata[$domain][$key]; - } - } - - return null; - } - - /** - * {@inheritdoc} - */ - public function setMetadata(string $key, $value, string $domain = 'messages') - { - $this->metadata[$domain][$key] = $value; - } - - /** - * {@inheritdoc} - */ - public function deleteMetadata(string $key = '', string $domain = 'messages') - { - if ('' == $domain) { - $this->metadata = []; - } elseif ('' == $key) { - unset($this->metadata[$domain]); - } else { - unset($this->metadata[$domain][$key]); - } - } - - /** - * Adds current values with the new values. - * - * @param array $values Values to add - */ - private function addMetadata(array $values) - { - foreach ($values as $domain => $keys) { - foreach ($keys as $key => $value) { - $this->setMetadata($key, $value, $domain); - } - } - } -} diff --git a/vendor/symfony/translation/MessageCatalogueInterface.php b/vendor/symfony/translation/MessageCatalogueInterface.php deleted file mode 100644 index d532a1e..0000000 --- a/vendor/symfony/translation/MessageCatalogueInterface.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Component\Config\Resource\ResourceInterface; - -/** - * MessageCatalogueInterface. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -interface MessageCatalogueInterface -{ - public const INTL_DOMAIN_SUFFIX = '+intl-icu'; - - /** - * Gets the catalogue locale. - * - * @return string - */ - public function getLocale(); - - /** - * Gets the domains. - * - * @return array - */ - public function getDomains(); - - /** - * Gets the messages within a given domain. - * - * If $domain is null, it returns all messages. - * - * @param string|null $domain The domain name - * - * @return array - */ - public function all(?string $domain = null); - - /** - * Sets a message translation. - * - * @param string $id The message id - * @param string $translation The messages translation - * @param string $domain The domain name - */ - public function set(string $id, string $translation, string $domain = 'messages'); - - /** - * Checks if a message has a translation. - * - * @param string $id The message id - * @param string $domain The domain name - * - * @return bool - */ - public function has(string $id, string $domain = 'messages'); - - /** - * Checks if a message has a translation (it does not take into account the fallback mechanism). - * - * @param string $id The message id - * @param string $domain The domain name - * - * @return bool - */ - public function defines(string $id, string $domain = 'messages'); - - /** - * Gets a message translation. - * - * @param string $id The message id - * @param string $domain The domain name - * - * @return string - */ - public function get(string $id, string $domain = 'messages'); - - /** - * Sets translations for a given domain. - * - * @param array $messages An array of translations - * @param string $domain The domain name - */ - public function replace(array $messages, string $domain = 'messages'); - - /** - * Adds translations for a given domain. - * - * @param array $messages An array of translations - * @param string $domain The domain name - */ - public function add(array $messages, string $domain = 'messages'); - - /** - * Merges translations from the given Catalogue into the current one. - * - * The two catalogues must have the same locale. - */ - public function addCatalogue(self $catalogue); - - /** - * Merges translations from the given Catalogue into the current one - * only when the translation does not exist. - * - * This is used to provide default translations when they do not exist for the current locale. - */ - public function addFallbackCatalogue(self $catalogue); - - /** - * Gets the fallback catalogue. - * - * @return self|null - */ - public function getFallbackCatalogue(); - - /** - * Returns an array of resources loaded to build this collection. - * - * @return ResourceInterface[] - */ - public function getResources(); - - /** - * Adds a resource for this collection. - */ - public function addResource(ResourceInterface $resource); -} diff --git a/vendor/symfony/translation/MetadataAwareInterface.php b/vendor/symfony/translation/MetadataAwareInterface.php deleted file mode 100644 index 2216eed..0000000 --- a/vendor/symfony/translation/MetadataAwareInterface.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -/** - * MetadataAwareInterface. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -interface MetadataAwareInterface -{ - /** - * Gets metadata for the given domain and key. - * - * Passing an empty domain will return an array with all metadata indexed by - * domain and then by key. Passing an empty key will return an array with all - * metadata for the given domain. - * - * @return mixed The value that was set or an array with the domains/keys or null - */ - public function getMetadata(string $key = '', string $domain = 'messages'); - - /** - * Adds metadata to a message domain. - * - * @param mixed $value - */ - public function setMetadata(string $key, $value, string $domain = 'messages'); - - /** - * Deletes metadata for the given key and domain. - * - * Passing an empty domain will delete all metadata. Passing an empty key will - * delete all metadata for the given domain. - */ - public function deleteMetadata(string $key = '', string $domain = 'messages'); -} diff --git a/vendor/symfony/translation/Provider/AbstractProviderFactory.php b/vendor/symfony/translation/Provider/AbstractProviderFactory.php deleted file mode 100644 index fdfeb8c..0000000 --- a/vendor/symfony/translation/Provider/AbstractProviderFactory.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\Exception\IncompleteDsnException; - -abstract class AbstractProviderFactory implements ProviderFactoryInterface -{ - public function supports(Dsn $dsn): bool - { - return \in_array($dsn->getScheme(), $this->getSupportedSchemes(), true); - } - - /** - * @return string[] - */ - abstract protected function getSupportedSchemes(): array; - - protected function getUser(Dsn $dsn): string - { - if (null === $user = $dsn->getUser()) { - throw new IncompleteDsnException('User is not set.', $dsn->getScheme().'://'.$dsn->getHost()); - } - - return $user; - } - - protected function getPassword(Dsn $dsn): string - { - if (null === $password = $dsn->getPassword()) { - throw new IncompleteDsnException('Password is not set.', $dsn->getOriginalDsn()); - } - - return $password; - } -} diff --git a/vendor/symfony/translation/Provider/Dsn.php b/vendor/symfony/translation/Provider/Dsn.php deleted file mode 100644 index d29b202..0000000 --- a/vendor/symfony/translation/Provider/Dsn.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Exception\MissingRequiredOptionException; - -/** - * @author Fabien Potencier <fabien@symfony.com> - * @author Oskar Stark <oskarstark@googlemail.com> - */ -final class Dsn -{ - private $scheme; - private $host; - private $user; - private $password; - private $port; - private $path; - private $options; - private $originalDsn; - - public function __construct(string $dsn) - { - $this->originalDsn = $dsn; - - if (false === $params = parse_url($dsn)) { - throw new InvalidArgumentException('The translation provider DSN is invalid.'); - } - - if (!isset($params['scheme'])) { - throw new InvalidArgumentException('The translation provider DSN must contain a scheme.'); - } - $this->scheme = $params['scheme']; - - if (!isset($params['host'])) { - throw new InvalidArgumentException('The translation provider DSN must contain a host (use "default" by default).'); - } - $this->host = $params['host']; - - $this->user = '' !== ($params['user'] ?? '') ? rawurldecode($params['user']) : null; - $this->password = '' !== ($params['pass'] ?? '') ? rawurldecode($params['pass']) : null; - $this->port = $params['port'] ?? null; - $this->path = $params['path'] ?? null; - parse_str($params['query'] ?? '', $this->options); - } - - public function getScheme(): string - { - return $this->scheme; - } - - public function getHost(): string - { - return $this->host; - } - - public function getUser(): ?string - { - return $this->user; - } - - public function getPassword(): ?string - { - return $this->password; - } - - public function getPort(?int $default = null): ?int - { - return $this->port ?? $default; - } - - public function getOption(string $key, $default = null) - { - return $this->options[$key] ?? $default; - } - - public function getRequiredOption(string $key) - { - if (!\array_key_exists($key, $this->options) || '' === trim($this->options[$key])) { - throw new MissingRequiredOptionException($key); - } - - return $this->options[$key]; - } - - public function getOptions(): array - { - return $this->options; - } - - public function getPath(): ?string - { - return $this->path; - } - - public function getOriginalDsn(): string - { - return $this->originalDsn; - } -} diff --git a/vendor/symfony/translation/Provider/FilteringProvider.php b/vendor/symfony/translation/Provider/FilteringProvider.php deleted file mode 100644 index 5f970a2..0000000 --- a/vendor/symfony/translation/Provider/FilteringProvider.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\TranslatorBag; -use Symfony\Component\Translation\TranslatorBagInterface; - -/** - * Filters domains and locales between the Translator config values and those specific to each provider. - * - * @author Mathieu Santostefano <msantostefano@protonmail.com> - */ -class FilteringProvider implements ProviderInterface -{ - private $provider; - private $locales; - private $domains; - - public function __construct(ProviderInterface $provider, array $locales, array $domains = []) - { - $this->provider = $provider; - $this->locales = $locales; - $this->domains = $domains; - } - - public function __toString(): string - { - return (string) $this->provider; - } - - /** - * {@inheritdoc} - */ - public function write(TranslatorBagInterface $translatorBag): void - { - $this->provider->write($translatorBag); - } - - public function read(array $domains, array $locales): TranslatorBag - { - $domains = !$this->domains ? $domains : array_intersect($this->domains, $domains); - $locales = array_intersect($this->locales, $locales); - - return $this->provider->read($domains, $locales); - } - - public function delete(TranslatorBagInterface $translatorBag): void - { - $this->provider->delete($translatorBag); - } - - public function getDomains(): array - { - return $this->domains; - } -} diff --git a/vendor/symfony/translation/Provider/NullProvider.php b/vendor/symfony/translation/Provider/NullProvider.php deleted file mode 100644 index f00392e..0000000 --- a/vendor/symfony/translation/Provider/NullProvider.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\TranslatorBag; -use Symfony\Component\Translation\TranslatorBagInterface; - -/** - * @author Mathieu Santostefano <msantostefano@protonmail.com> - */ -class NullProvider implements ProviderInterface -{ - public function __toString(): string - { - return 'null'; - } - - public function write(TranslatorBagInterface $translatorBag, bool $override = false): void - { - } - - public function read(array $domains, array $locales): TranslatorBag - { - return new TranslatorBag(); - } - - public function delete(TranslatorBagInterface $translatorBag): void - { - } -} diff --git a/vendor/symfony/translation/Provider/NullProviderFactory.php b/vendor/symfony/translation/Provider/NullProviderFactory.php deleted file mode 100644 index f350f16..0000000 --- a/vendor/symfony/translation/Provider/NullProviderFactory.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\Exception\UnsupportedSchemeException; - -/** - * @author Mathieu Santostefano <msantostefano@protonmail.com> - */ -final class NullProviderFactory extends AbstractProviderFactory -{ - public function create(Dsn $dsn): ProviderInterface - { - if ('null' === $dsn->getScheme()) { - return new NullProvider(); - } - - throw new UnsupportedSchemeException($dsn, 'null', $this->getSupportedSchemes()); - } - - protected function getSupportedSchemes(): array - { - return ['null']; - } -} diff --git a/vendor/symfony/translation/Provider/ProviderFactoryInterface.php b/vendor/symfony/translation/Provider/ProviderFactoryInterface.php deleted file mode 100644 index 3fd4494..0000000 --- a/vendor/symfony/translation/Provider/ProviderFactoryInterface.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\Exception\IncompleteDsnException; -use Symfony\Component\Translation\Exception\UnsupportedSchemeException; - -interface ProviderFactoryInterface -{ - /** - * @throws UnsupportedSchemeException - * @throws IncompleteDsnException - */ - public function create(Dsn $dsn): ProviderInterface; - - public function supports(Dsn $dsn): bool; -} diff --git a/vendor/symfony/translation/Provider/ProviderInterface.php b/vendor/symfony/translation/Provider/ProviderInterface.php deleted file mode 100644 index a32193f..0000000 --- a/vendor/symfony/translation/Provider/ProviderInterface.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\TranslatorBag; -use Symfony\Component\Translation\TranslatorBagInterface; - -interface ProviderInterface -{ - public function __toString(): string; - - /** - * Translations available in the TranslatorBag only must be created. - * Translations available in both the TranslatorBag and on the provider - * must be overwritten. - * Translations available on the provider only must be kept. - */ - public function write(TranslatorBagInterface $translatorBag): void; - - public function read(array $domains, array $locales): TranslatorBag; - - public function delete(TranslatorBagInterface $translatorBag): void; -} diff --git a/vendor/symfony/translation/Provider/TranslationProviderCollection.php b/vendor/symfony/translation/Provider/TranslationProviderCollection.php deleted file mode 100644 index 61ac641..0000000 --- a/vendor/symfony/translation/Provider/TranslationProviderCollection.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; - -/** - * @author Mathieu Santostefano <msantostefano@protonmail.com> - */ -final class TranslationProviderCollection -{ - /** - * @var array<string, ProviderInterface> - */ - private $providers; - - /** - * @param array<string, ProviderInterface> $providers - */ - public function __construct(iterable $providers) - { - $this->providers = \is_array($providers) ? $providers : iterator_to_array($providers); - } - - public function __toString(): string - { - return '['.implode(',', array_keys($this->providers)).']'; - } - - public function has(string $name): bool - { - return isset($this->providers[$name]); - } - - public function get(string $name): ProviderInterface - { - if (!$this->has($name)) { - throw new InvalidArgumentException(sprintf('Provider "%s" not found. Available: "%s".', $name, (string) $this)); - } - - return $this->providers[$name]; - } - - public function keys(): array - { - return array_keys($this->providers); - } -} diff --git a/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php b/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php deleted file mode 100644 index 81db3a5..0000000 --- a/vendor/symfony/translation/Provider/TranslationProviderCollectionFactory.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Provider; - -use Symfony\Component\Translation\Exception\UnsupportedSchemeException; - -/** - * @author Mathieu Santostefano <msantostefano@protonmail.com> - */ -class TranslationProviderCollectionFactory -{ - private $factories; - private $enabledLocales; - - /** - * @param iterable<mixed, ProviderFactoryInterface> $factories - */ - public function __construct(iterable $factories, array $enabledLocales) - { - $this->factories = $factories; - $this->enabledLocales = $enabledLocales; - } - - public function fromConfig(array $config): TranslationProviderCollection - { - $providers = []; - foreach ($config as $name => $currentConfig) { - $providers[$name] = $this->fromDsnObject( - new Dsn($currentConfig['dsn']), - !$currentConfig['locales'] ? $this->enabledLocales : $currentConfig['locales'], - !$currentConfig['domains'] ? [] : $currentConfig['domains'] - ); - } - - return new TranslationProviderCollection($providers); - } - - public function fromDsnObject(Dsn $dsn, array $locales, array $domains = []): ProviderInterface - { - foreach ($this->factories as $factory) { - if ($factory->supports($dsn)) { - return new FilteringProvider($factory->create($dsn), $locales, $domains); - } - } - - throw new UnsupportedSchemeException($dsn); - } -} diff --git a/vendor/symfony/translation/PseudoLocalizationTranslator.php b/vendor/symfony/translation/PseudoLocalizationTranslator.php deleted file mode 100644 index 5396eb5..0000000 --- a/vendor/symfony/translation/PseudoLocalizationTranslator.php +++ /dev/null @@ -1,368 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * This translator should only be used in a development environment. - */ -final class PseudoLocalizationTranslator implements TranslatorInterface -{ - private const EXPANSION_CHARACTER = '~'; - - private $translator; - private $accents; - private $expansionFactor; - private $brackets; - private $parseHTML; - - /** - * @var string[] - */ - private $localizableHTMLAttributes; - - /** - * Available options: - * * accents: - * type: boolean - * default: true - * description: replace ASCII characters of the translated string with accented versions or similar characters - * example: if true, "foo" => "ƒöö". - * - * * expansion_factor: - * type: float - * default: 1 - * validation: it must be greater than or equal to 1 - * description: expand the translated string by the given factor with spaces and tildes - * example: if 2, "foo" => "~foo ~" - * - * * brackets: - * type: boolean - * default: true - * description: wrap the translated string with brackets - * example: if true, "foo" => "[foo]" - * - * * parse_html: - * type: boolean - * default: false - * description: parse the translated string as HTML - looking for HTML tags has a performance impact but allows to preserve them from alterations - it also allows to compute the visible translated string length which is useful to correctly expand ot when it contains HTML - * warning: unclosed tags are unsupported, they will be fixed (closed) by the parser - eg, "foo <div>bar" => "foo <div>bar</div>" - * - * * localizable_html_attributes: - * type: string[] - * default: [] - * description: the list of HTML attributes whose values can be altered - it is only useful when the "parse_html" option is set to true - * example: if ["title"], and with the "accents" option set to true, "<a href="#" title="Go to your profile">Profile</a>" => "<a href="#" title="Ĝö ţö ýöûŕ þŕöƒîļé">Þŕöƒîļé</a>" - if "title" was not in the "localizable_html_attributes" list, the title attribute data would be left unchanged. - */ - public function __construct(TranslatorInterface $translator, array $options = []) - { - $this->translator = $translator; - $this->accents = $options['accents'] ?? true; - - if (1.0 > ($this->expansionFactor = $options['expansion_factor'] ?? 1.0)) { - throw new \InvalidArgumentException('The expansion factor must be greater than or equal to 1.'); - } - - $this->brackets = $options['brackets'] ?? true; - - $this->parseHTML = $options['parse_html'] ?? false; - if ($this->parseHTML && !$this->accents && 1.0 === $this->expansionFactor) { - $this->parseHTML = false; - } - - $this->localizableHTMLAttributes = $options['localizable_html_attributes'] ?? []; - } - - /** - * {@inheritdoc} - */ - public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string - { - $trans = ''; - $visibleText = ''; - - foreach ($this->getParts($this->translator->trans($id, $parameters, $domain, $locale)) as [$visible, $localizable, $text]) { - if ($visible) { - $visibleText .= $text; - } - - if (!$localizable) { - $trans .= $text; - - continue; - } - - $this->addAccents($trans, $text); - } - - $this->expand($trans, $visibleText); - - $this->addBrackets($trans); - - return $trans; - } - - public function getLocale(): string - { - return $this->translator->getLocale(); - } - - private function getParts(string $originalTrans): array - { - if (!$this->parseHTML) { - return [[true, true, $originalTrans]]; - } - - $html = mb_encode_numericentity($originalTrans, [0x80, 0x10FFFF, 0, 0x1FFFFF], mb_detect_encoding($originalTrans, null, true) ?: 'UTF-8'); - - $useInternalErrors = libxml_use_internal_errors(true); - - $dom = new \DOMDocument(); - $dom->loadHTML('<trans>'.$html.'</trans>'); - - libxml_clear_errors(); - libxml_use_internal_errors($useInternalErrors); - - return $this->parseNode($dom->childNodes->item(1)->childNodes->item(0)->childNodes->item(0)); - } - - private function parseNode(\DOMNode $node): array - { - $parts = []; - - foreach ($node->childNodes as $childNode) { - if (!$childNode instanceof \DOMElement) { - $parts[] = [true, true, $childNode->nodeValue]; - - continue; - } - - $parts[] = [false, false, '<'.$childNode->tagName]; - - /** @var \DOMAttr $attribute */ - foreach ($childNode->attributes as $attribute) { - $parts[] = [false, false, ' '.$attribute->nodeName.'="']; - - $localizableAttribute = \in_array($attribute->nodeName, $this->localizableHTMLAttributes, true); - foreach (preg_split('/(&(?:amp|quot|#039|lt|gt);+)/', htmlspecialchars($attribute->nodeValue, \ENT_QUOTES, 'UTF-8'), -1, \PREG_SPLIT_DELIM_CAPTURE) as $i => $match) { - if ('' === $match) { - continue; - } - - $parts[] = [false, $localizableAttribute && 0 === $i % 2, $match]; - } - - $parts[] = [false, false, '"']; - } - - $parts[] = [false, false, '>']; - - $parts = array_merge($parts, $this->parseNode($childNode, $parts)); - - $parts[] = [false, false, '</'.$childNode->tagName.'>']; - } - - return $parts; - } - - private function addAccents(string &$trans, string $text): void - { - $trans .= $this->accents ? strtr($text, [ - ' ' => ' ', - '!' => '¡', - '"' => '″', - '#' => '♯', - '$' => '€', - '%' => '‰', - '&' => '⅋', - '\'' => '´', - '(' => '{', - ')' => '}', - '*' => '⁎', - '+' => '⁺', - ',' => '،', - '-' => '‐', - '.' => '·', - '/' => '⁄', - '0' => '⓪', - '1' => '①', - '2' => '②', - '3' => '③', - '4' => '④', - '5' => '⑤', - '6' => '⑥', - '7' => '⑦', - '8' => '⑧', - '9' => '⑨', - ':' => '∶', - ';' => '⁏', - '<' => '≤', - '=' => '≂', - '>' => '≥', - '?' => '¿', - '@' => '՞', - 'A' => 'Å', - 'B' => 'Ɓ', - 'C' => 'Ç', - 'D' => 'Ð', - 'E' => 'É', - 'F' => 'Ƒ', - 'G' => 'Ĝ', - 'H' => 'Ĥ', - 'I' => 'Î', - 'J' => 'Ĵ', - 'K' => 'Ķ', - 'L' => 'Ļ', - 'M' => 'Ṁ', - 'N' => 'Ñ', - 'O' => 'Ö', - 'P' => 'Þ', - 'Q' => 'Ǫ', - 'R' => 'Ŕ', - 'S' => 'Š', - 'T' => 'Ţ', - 'U' => 'Û', - 'V' => 'Ṽ', - 'W' => 'Ŵ', - 'X' => 'Ẋ', - 'Y' => 'Ý', - 'Z' => 'Ž', - '[' => '⁅', - '\\' => '∖', - ']' => '⁆', - '^' => '˄', - '_' => '‿', - '`' => '‵', - 'a' => 'å', - 'b' => 'ƀ', - 'c' => 'ç', - 'd' => 'ð', - 'e' => 'é', - 'f' => 'ƒ', - 'g' => 'ĝ', - 'h' => 'ĥ', - 'i' => 'î', - 'j' => 'ĵ', - 'k' => 'ķ', - 'l' => 'ļ', - 'm' => 'ɱ', - 'n' => 'ñ', - 'o' => 'ö', - 'p' => 'þ', - 'q' => 'ǫ', - 'r' => 'ŕ', - 's' => 'š', - 't' => 'ţ', - 'u' => 'û', - 'v' => 'ṽ', - 'w' => 'ŵ', - 'x' => 'ẋ', - 'y' => 'ý', - 'z' => 'ž', - '{' => '(', - '|' => '¦', - '}' => ')', - '~' => '˞', - ]) : $text; - } - - private function expand(string &$trans, string $visibleText): void - { - if (1.0 >= $this->expansionFactor) { - return; - } - - $visibleLength = $this->strlen($visibleText); - $missingLength = (int) ceil($visibleLength * $this->expansionFactor) - $visibleLength; - if ($this->brackets) { - $missingLength -= 2; - } - - if (0 >= $missingLength) { - return; - } - - $words = []; - $wordsCount = 0; - foreach (preg_split('/ +/', $visibleText, -1, \PREG_SPLIT_NO_EMPTY) as $word) { - $wordLength = $this->strlen($word); - - if ($wordLength >= $missingLength) { - continue; - } - - if (!isset($words[$wordLength])) { - $words[$wordLength] = 0; - } - - ++$words[$wordLength]; - ++$wordsCount; - } - - if (!$words) { - $trans .= 1 === $missingLength ? self::EXPANSION_CHARACTER : ' '.str_repeat(self::EXPANSION_CHARACTER, $missingLength - 1); - - return; - } - - arsort($words, \SORT_NUMERIC); - - $longestWordLength = max(array_keys($words)); - - while (true) { - $r = mt_rand(1, $wordsCount); - - foreach ($words as $length => $count) { - $r -= $count; - if ($r <= 0) { - break; - } - } - - $trans .= ' '.str_repeat(self::EXPANSION_CHARACTER, $length); - - $missingLength -= $length + 1; - - if (0 === $missingLength) { - return; - } - - while ($longestWordLength >= $missingLength) { - $wordsCount -= $words[$longestWordLength]; - unset($words[$longestWordLength]); - - if (!$words) { - $trans .= 1 === $missingLength ? self::EXPANSION_CHARACTER : ' '.str_repeat(self::EXPANSION_CHARACTER, $missingLength - 1); - - return; - } - - $longestWordLength = max(array_keys($words)); - } - } - } - - private function addBrackets(string &$trans): void - { - if (!$this->brackets) { - return; - } - - $trans = '['.$trans.']'; - } - - private function strlen(string $s): int - { - return false === ($encoding = mb_detect_encoding($s, null, true)) ? \strlen($s) : mb_strlen($s, $encoding); - } -} diff --git a/vendor/symfony/translation/README.md b/vendor/symfony/translation/README.md deleted file mode 100644 index adda9a5..0000000 --- a/vendor/symfony/translation/README.md +++ /dev/null @@ -1,48 +0,0 @@ -Translation Component -===================== - -The Translation component provides tools to internationalize your application. - -Getting Started ---------------- - -``` -$ composer require symfony/translation -``` - -```php -use Symfony\Component\Translation\Translator; -use Symfony\Component\Translation\Loader\ArrayLoader; - -$translator = new Translator('fr_FR'); -$translator->addLoader('array', new ArrayLoader()); -$translator->addResource('array', [ - 'Hello World!' => 'Bonjour !', -], 'fr_FR'); - -echo $translator->trans('Hello World!'); // outputs « Bonjour ! » -``` - -Sponsor -------- - -The Translation component for Symfony 5.4/6.0 is [backed][1] by: - - * [Crowdin][2], a cloud-based localization management software helping teams to go global and stay agile. - * [Lokalise][3], a continuous localization and translation management platform that integrates into your development workflow so you can ship localized products, faster. - -Help Symfony by [sponsoring][4] its development! - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/translation.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) - -[1]: https://symfony.com/backers -[2]: https://crowdin.com -[3]: https://lokalise.com -[4]: https://symfony.com/sponsor diff --git a/vendor/symfony/translation/Reader/TranslationReader.php b/vendor/symfony/translation/Reader/TranslationReader.php deleted file mode 100644 index e8e8638..0000000 --- a/vendor/symfony/translation/Reader/TranslationReader.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Reader; - -use Symfony\Component\Finder\Finder; -use Symfony\Component\Translation\Loader\LoaderInterface; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * TranslationReader reads translation messages from translation files. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class TranslationReader implements TranslationReaderInterface -{ - /** - * Loaders used for import. - * - * @var array<string, LoaderInterface> - */ - private $loaders = []; - - /** - * Adds a loader to the translation extractor. - * - * @param string $format The format of the loader - */ - public function addLoader(string $format, LoaderInterface $loader) - { - $this->loaders[$format] = $loader; - } - - /** - * {@inheritdoc} - */ - public function read(string $directory, MessageCatalogue $catalogue) - { - if (!is_dir($directory)) { - return; - } - - foreach ($this->loaders as $format => $loader) { - // load any existing translation files - $finder = new Finder(); - $extension = $catalogue->getLocale().'.'.$format; - $files = $finder->files()->name('*.'.$extension)->in($directory); - foreach ($files as $file) { - $domain = substr($file->getFilename(), 0, -1 * \strlen($extension) - 1); - $catalogue->addCatalogue($loader->load($file->getPathname(), $catalogue->getLocale(), $domain)); - } - } - } -} diff --git a/vendor/symfony/translation/Reader/TranslationReaderInterface.php b/vendor/symfony/translation/Reader/TranslationReaderInterface.php deleted file mode 100644 index bc37204..0000000 --- a/vendor/symfony/translation/Reader/TranslationReaderInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Reader; - -use Symfony\Component\Translation\MessageCatalogue; - -/** - * TranslationReader reads translation messages from translation files. - * - * @author Tobias Nyholm <tobias.nyholm@gmail.com> - */ -interface TranslationReaderInterface -{ - /** - * Reads translation messages from a directory to the catalogue. - */ - public function read(string $directory, MessageCatalogue $catalogue); -} diff --git a/vendor/symfony/translation/Resources/bin/translation-status.php b/vendor/symfony/translation/Resources/bin/translation-status.php deleted file mode 100644 index 53e642c..0000000 --- a/vendor/symfony/translation/Resources/bin/translation-status.php +++ /dev/null @@ -1,278 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if ('cli' !== \PHP_SAPI) { - throw new Exception('This script must be run from the command line.'); -} - -$usageInstructions = <<<END - - Usage instructions - ------------------------------------------------------------------------------- - - $ cd symfony-code-root-directory/ - - # show the translation status of all locales - $ php translation-status.php - - # only show the translation status of incomplete or erroneous locales - $ php translation-status.php --incomplete - - # show the translation status of all locales, all their missing translations and mismatches between trans-unit id and source - $ php translation-status.php -v - - # show the status of a single locale - $ php translation-status.php fr - - # show the status of a single locale, missing translations and mismatches between trans-unit id and source - $ php translation-status.php fr -v - -END; - -$config = [ - // if TRUE, the full list of missing translations is displayed - 'verbose_output' => false, - // NULL = analyze all locales - 'locale_to_analyze' => null, - // append --incomplete to only show incomplete languages - 'include_completed_languages' => true, - // the reference files all the other translations are compared to - 'original_files' => [ - 'src/Symfony/Component/Form/Resources/translations/validators.en.xlf', - 'src/Symfony/Component/Security/Core/Resources/translations/security.en.xlf', - 'src/Symfony/Component/Validator/Resources/translations/validators.en.xlf', - ], -]; - -$argc = $_SERVER['argc']; -$argv = $_SERVER['argv']; - -if ($argc > 4) { - echo str_replace('translation-status.php', $argv[0], $usageInstructions); - exit(1); -} - -foreach (array_slice($argv, 1) as $argumentOrOption) { - if ('--incomplete' === $argumentOrOption) { - $config['include_completed_languages'] = false; - continue; - } - - if (0 === strpos($argumentOrOption, '-')) { - $config['verbose_output'] = true; - } else { - $config['locale_to_analyze'] = $argumentOrOption; - } -} - -foreach ($config['original_files'] as $originalFilePath) { - if (!file_exists($originalFilePath)) { - echo sprintf('The following file does not exist. Make sure that you execute this command at the root dir of the Symfony code repository.%s %s', \PHP_EOL, $originalFilePath); - exit(1); - } -} - -$totalMissingTranslations = 0; -$totalTranslationMismatches = 0; - -foreach ($config['original_files'] as $originalFilePath) { - $translationFilePaths = findTranslationFiles($originalFilePath, $config['locale_to_analyze']); - $translationStatus = calculateTranslationStatus($originalFilePath, $translationFilePaths); - - $totalMissingTranslations += array_sum(array_map(function ($translation) { - return count($translation['missingKeys']); - }, array_values($translationStatus))); - $totalTranslationMismatches += array_sum(array_map(function ($translation) { - return count($translation['mismatches']); - }, array_values($translationStatus))); - - printTranslationStatus($originalFilePath, $translationStatus, $config['verbose_output'], $config['include_completed_languages']); -} - -exit($totalTranslationMismatches > 0 ? 1 : 0); - -function findTranslationFiles($originalFilePath, $localeToAnalyze) -{ - $translations = []; - - $translationsDir = dirname($originalFilePath); - $originalFileName = basename($originalFilePath); - $translationFileNamePattern = str_replace('.en.', '.*.', $originalFileName); - - $translationFiles = glob($translationsDir.'/'.$translationFileNamePattern, \GLOB_NOSORT); - sort($translationFiles); - foreach ($translationFiles as $filePath) { - $locale = extractLocaleFromFilePath($filePath); - - if (null !== $localeToAnalyze && $locale !== $localeToAnalyze) { - continue; - } - - $translations[$locale] = $filePath; - } - - return $translations; -} - -function calculateTranslationStatus($originalFilePath, $translationFilePaths) -{ - $translationStatus = []; - $allTranslationKeys = extractTranslationKeys($originalFilePath); - - foreach ($translationFilePaths as $locale => $translationPath) { - $translatedKeys = extractTranslationKeys($translationPath); - $missingKeys = array_diff_key($allTranslationKeys, $translatedKeys); - $mismatches = findTransUnitMismatches($allTranslationKeys, $translatedKeys); - - $translationStatus[$locale] = [ - 'total' => count($allTranslationKeys), - 'translated' => count($translatedKeys), - 'missingKeys' => $missingKeys, - 'mismatches' => $mismatches, - ]; - $translationStatus[$locale]['is_completed'] = isTranslationCompleted($translationStatus[$locale]); - } - - return $translationStatus; -} - -function isTranslationCompleted(array $translationStatus): bool -{ - return $translationStatus['total'] === $translationStatus['translated'] && 0 === count($translationStatus['mismatches']); -} - -function printTranslationStatus($originalFilePath, $translationStatus, $verboseOutput, $includeCompletedLanguages) -{ - printTitle($originalFilePath); - printTable($translationStatus, $verboseOutput, $includeCompletedLanguages); - echo \PHP_EOL.\PHP_EOL; -} - -function extractLocaleFromFilePath($filePath) -{ - $parts = explode('.', $filePath); - - return $parts[count($parts) - 2]; -} - -function extractTranslationKeys($filePath) -{ - $translationKeys = []; - $contents = new \SimpleXMLElement(file_get_contents($filePath)); - - foreach ($contents->file->body->{'trans-unit'} as $translationKey) { - $translationId = (string) $translationKey['id']; - $translationKey = (string) $translationKey->source; - - $translationKeys[$translationId] = $translationKey; - } - - return $translationKeys; -} - -/** - * Check whether the trans-unit id and source match with the base translation. - */ -function findTransUnitMismatches(array $baseTranslationKeys, array $translatedKeys): array -{ - $mismatches = []; - - foreach ($baseTranslationKeys as $translationId => $translationKey) { - if (!isset($translatedKeys[$translationId])) { - continue; - } - if ($translatedKeys[$translationId] !== $translationKey) { - $mismatches[$translationId] = [ - 'found' => $translatedKeys[$translationId], - 'expected' => $translationKey, - ]; - } - } - - return $mismatches; -} - -function printTitle($title) -{ - echo $title.\PHP_EOL; - echo str_repeat('=', strlen($title)).\PHP_EOL.\PHP_EOL; -} - -function printTable($translations, $verboseOutput, bool $includeCompletedLanguages) -{ - if (0 === count($translations)) { - echo 'No translations found'; - - return; - } - $longestLocaleNameLength = max(array_map('strlen', array_keys($translations))); - - foreach ($translations as $locale => $translation) { - if (!$includeCompletedLanguages && $translation['is_completed']) { - continue; - } - - if ($translation['translated'] > $translation['total']) { - textColorRed(); - } elseif (count($translation['mismatches']) > 0) { - textColorRed(); - } elseif ($translation['is_completed']) { - textColorGreen(); - } - - echo sprintf( - '| Locale: %-'.$longestLocaleNameLength.'s | Translated: %2d/%2d | Mismatches: %d |', - $locale, - $translation['translated'], - $translation['total'], - count($translation['mismatches']) - ).\PHP_EOL; - - textColorNormal(); - - $shouldBeClosed = false; - if (true === $verboseOutput && count($translation['missingKeys']) > 0) { - echo '| Missing Translations:'.\PHP_EOL; - - foreach ($translation['missingKeys'] as $id => $content) { - echo sprintf('| (id=%s) %s', $id, $content).\PHP_EOL; - } - $shouldBeClosed = true; - } - if (true === $verboseOutput && count($translation['mismatches']) > 0) { - echo '| Mismatches between trans-unit id and source:'.\PHP_EOL; - - foreach ($translation['mismatches'] as $id => $content) { - echo sprintf('| (id=%s) Expected: %s', $id, $content['expected']).\PHP_EOL; - echo sprintf('| Found: %s', $content['found']).\PHP_EOL; - } - $shouldBeClosed = true; - } - if ($shouldBeClosed) { - echo str_repeat('-', 80).\PHP_EOL; - } - } -} - -function textColorGreen() -{ - echo "\033[32m"; -} - -function textColorRed() -{ - echo "\033[31m"; -} - -function textColorNormal() -{ - echo "\033[0m"; -} diff --git a/vendor/symfony/translation/Resources/data/parents.json b/vendor/symfony/translation/Resources/data/parents.json deleted file mode 100644 index 24d4d11..0000000 --- a/vendor/symfony/translation/Resources/data/parents.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "az_Cyrl": "root", - "bs_Cyrl": "root", - "en_150": "en_001", - "en_AG": "en_001", - "en_AI": "en_001", - "en_AT": "en_150", - "en_AU": "en_001", - "en_BB": "en_001", - "en_BE": "en_150", - "en_BM": "en_001", - "en_BS": "en_001", - "en_BW": "en_001", - "en_BZ": "en_001", - "en_CC": "en_001", - "en_CH": "en_150", - "en_CK": "en_001", - "en_CM": "en_001", - "en_CX": "en_001", - "en_CY": "en_001", - "en_DE": "en_150", - "en_DG": "en_001", - "en_DK": "en_150", - "en_DM": "en_001", - "en_ER": "en_001", - "en_FI": "en_150", - "en_FJ": "en_001", - "en_FK": "en_001", - "en_FM": "en_001", - "en_GB": "en_001", - "en_GD": "en_001", - "en_GG": "en_001", - "en_GH": "en_001", - "en_GI": "en_001", - "en_GM": "en_001", - "en_GY": "en_001", - "en_HK": "en_001", - "en_ID": "en_001", - "en_IE": "en_001", - "en_IL": "en_001", - "en_IM": "en_001", - "en_IN": "en_001", - "en_IO": "en_001", - "en_JE": "en_001", - "en_JM": "en_001", - "en_KE": "en_001", - "en_KI": "en_001", - "en_KN": "en_001", - "en_KY": "en_001", - "en_LC": "en_001", - "en_LR": "en_001", - "en_LS": "en_001", - "en_MG": "en_001", - "en_MO": "en_001", - "en_MS": "en_001", - "en_MT": "en_001", - "en_MU": "en_001", - "en_MV": "en_001", - "en_MW": "en_001", - "en_MY": "en_001", - "en_NA": "en_001", - "en_NF": "en_001", - "en_NG": "en_001", - "en_NL": "en_150", - "en_NR": "en_001", - "en_NU": "en_001", - "en_NZ": "en_001", - "en_PG": "en_001", - "en_PK": "en_001", - "en_PN": "en_001", - "en_PW": "en_001", - "en_RW": "en_001", - "en_SB": "en_001", - "en_SC": "en_001", - "en_SD": "en_001", - "en_SE": "en_150", - "en_SG": "en_001", - "en_SH": "en_001", - "en_SI": "en_150", - "en_SL": "en_001", - "en_SS": "en_001", - "en_SX": "en_001", - "en_SZ": "en_001", - "en_TC": "en_001", - "en_TK": "en_001", - "en_TO": "en_001", - "en_TT": "en_001", - "en_TV": "en_001", - "en_TZ": "en_001", - "en_UG": "en_001", - "en_VC": "en_001", - "en_VG": "en_001", - "en_VU": "en_001", - "en_WS": "en_001", - "en_ZA": "en_001", - "en_ZM": "en_001", - "en_ZW": "en_001", - "es_AR": "es_419", - "es_BO": "es_419", - "es_BR": "es_419", - "es_BZ": "es_419", - "es_CL": "es_419", - "es_CO": "es_419", - "es_CR": "es_419", - "es_CU": "es_419", - "es_DO": "es_419", - "es_EC": "es_419", - "es_GT": "es_419", - "es_HN": "es_419", - "es_MX": "es_419", - "es_NI": "es_419", - "es_PA": "es_419", - "es_PE": "es_419", - "es_PR": "es_419", - "es_PY": "es_419", - "es_SV": "es_419", - "es_US": "es_419", - "es_UY": "es_419", - "es_VE": "es_419", - "ff_Adlm": "root", - "hi_Latn": "en_IN", - "ks_Deva": "root", - "nb": "no", - "nn": "no", - "pa_Arab": "root", - "pt_AO": "pt_PT", - "pt_CH": "pt_PT", - "pt_CV": "pt_PT", - "pt_GQ": "pt_PT", - "pt_GW": "pt_PT", - "pt_LU": "pt_PT", - "pt_MO": "pt_PT", - "pt_MZ": "pt_PT", - "pt_ST": "pt_PT", - "pt_TL": "pt_PT", - "sd_Deva": "root", - "sr_Latn": "root", - "uz_Arab": "root", - "uz_Cyrl": "root", - "zh_Hant": "root", - "zh_Hant_MO": "zh_Hant_HK" -} diff --git a/vendor/symfony/translation/Resources/functions.php b/vendor/symfony/translation/Resources/functions.php deleted file mode 100644 index 0d2a037..0000000 --- a/vendor/symfony/translation/Resources/functions.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -if (!\function_exists(t::class)) { - /** - * @author Nate Wiebe <nate@northern.co> - */ - function t(string $message, array $parameters = [], ?string $domain = null): TranslatableMessage - { - return new TranslatableMessage($message, $parameters, $domain); - } -} diff --git a/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd b/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd deleted file mode 100644 index dface62..0000000 --- a/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd +++ /dev/null @@ -1,2223 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - -May-19-2004: -- Changed the <choice> for ElemType_header, moving minOccurs="0" maxOccurs="unbounded" from its elements -to <choice> itself. -- Added <choice> for ElemType_trans-unit to allow "any order" for <context-group>, <count-group>, <prop-group>, <note>, and -<alt-trans>. - -Oct-2005 -- updated version info to 1.2 -- equiv-trans attribute to <trans-unit> element -- merged-trans attribute for <group> element -- Add the <seg-source> element as optional in the <trans-unit> and <alt-trans> content models, at the same level as <source> -- Create a new value "seg" for the mtype attribute of the <mrk> element -- Add mid as an optional attribute for the <alt-trans> element - -Nov-14-2005 -- Changed name attribute for <context-group> from required to optional -- Added extension point at <xliff> - -Jan-9-2006 -- Added alttranstype type attribute to <alt-trans>, and values - -Jan-10-2006 -- Corrected error with overwritten purposeValueList -- Corrected name="AttrType_Version", attribute should have been "name" - ---> -<xsd:schema xmlns:xlf="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:oasis:names:tc:xliff:document:1.2" xml:lang="en"> - <!-- Import for xml:lang and xml:space --> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/> - <!-- Attributes Lists --> - <xsd:simpleType name="XTend"> - <xsd:restriction base="xsd:string"> - <xsd:pattern value="x-[^\s]+"/> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="context-typeValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'context-type'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="database"> - <xsd:annotation> - <xsd:documentation>Indicates a database content.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="element"> - <xsd:annotation> - <xsd:documentation>Indicates the content of an element within an XML document.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="elementtitle"> - <xsd:annotation> - <xsd:documentation>Indicates the name of an element within an XML document.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="linenumber"> - <xsd:annotation> - <xsd:documentation>Indicates the line number from the sourcefile (see context-type="sourcefile") where the &lt;source&gt; is found.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="numparams"> - <xsd:annotation> - <xsd:documentation>Indicates a the number of parameters contained within the &lt;source&gt;.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="paramnotes"> - <xsd:annotation> - <xsd:documentation>Indicates notes pertaining to the parameters in the &lt;source&gt;.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="record"> - <xsd:annotation> - <xsd:documentation>Indicates the content of a record within a database.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="recordtitle"> - <xsd:annotation> - <xsd:documentation>Indicates the name of a record within a database.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="sourcefile"> - <xsd:annotation> - <xsd:documentation>Indicates the original source file in the case that multiple files are merged to form the original file from which the XLIFF file is created. This differs from the original &lt;file&gt; attribute in that this sourcefile is one of many that make up that file.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="count-typeValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'count-type'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="num-usages"> - <xsd:annotation> - <xsd:documentation>Indicates the count units are items that are used X times in a certain context; example: this is a reusable text unit which is used 42 times in other texts.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="repetition"> - <xsd:annotation> - <xsd:documentation>Indicates the count units are translation units existing already in the same document.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="total"> - <xsd:annotation> - <xsd:documentation>Indicates a total count.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="InlineDelimitersValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'ctype' when used other elements than &lt;ph&gt; or &lt;x&gt;.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="bold"> - <xsd:annotation> - <xsd:documentation>Indicates a run of bolded text.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="italic"> - <xsd:annotation> - <xsd:documentation>Indicates a run of text in italics.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="underlined"> - <xsd:annotation> - <xsd:documentation>Indicates a run of underlined text.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="link"> - <xsd:annotation> - <xsd:documentation>Indicates a run of hyper-text.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="InlinePlaceholdersValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'ctype' when used with &lt;ph&gt; or &lt;x&gt;.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="image"> - <xsd:annotation> - <xsd:documentation>Indicates a inline image.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="pb"> - <xsd:annotation> - <xsd:documentation>Indicates a page break.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="lb"> - <xsd:annotation> - <xsd:documentation>Indicates a line break.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="mime-typeValueList"> - <xsd:restriction base="xsd:string"> - <xsd:pattern value="(text|multipart|message|application|image|audio|video|model)(/.+)*"/> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="datatypeValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'datatype'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="asp"> - <xsd:annotation> - <xsd:documentation>Indicates Active Server Page data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="c"> - <xsd:annotation> - <xsd:documentation>Indicates C source file data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="cdf"> - <xsd:annotation> - <xsd:documentation>Indicates Channel Definition Format (CDF) data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="cfm"> - <xsd:annotation> - <xsd:documentation>Indicates ColdFusion data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="cpp"> - <xsd:annotation> - <xsd:documentation>Indicates C++ source file data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="csharp"> - <xsd:annotation> - <xsd:documentation>Indicates C-Sharp data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="cstring"> - <xsd:annotation> - <xsd:documentation>Indicates strings from C, ASM, and driver files data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="csv"> - <xsd:annotation> - <xsd:documentation>Indicates comma-separated values data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="database"> - <xsd:annotation> - <xsd:documentation>Indicates database data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="documentfooter"> - <xsd:annotation> - <xsd:documentation>Indicates portions of document that follows data and contains metadata.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="documentheader"> - <xsd:annotation> - <xsd:documentation>Indicates portions of document that precedes data and contains metadata.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="filedialog"> - <xsd:annotation> - <xsd:documentation>Indicates data from standard UI file operations dialogs (e.g., Open, Save, Save As, Export, Import).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="form"> - <xsd:annotation> - <xsd:documentation>Indicates standard user input screen data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="html"> - <xsd:annotation> - <xsd:documentation>Indicates HyperText Markup Language (HTML) data - document instance.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="htmlbody"> - <xsd:annotation> - <xsd:documentation>Indicates content within an HTML document’s &lt;body&gt; element.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="ini"> - <xsd:annotation> - <xsd:documentation>Indicates Windows INI file data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="interleaf"> - <xsd:annotation> - <xsd:documentation>Indicates Interleaf data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="javaclass"> - <xsd:annotation> - <xsd:documentation>Indicates Java source file data (extension '.java').</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="javapropertyresourcebundle"> - <xsd:annotation> - <xsd:documentation>Indicates Java property resource bundle data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="javalistresourcebundle"> - <xsd:annotation> - <xsd:documentation>Indicates Java list resource bundle data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="javascript"> - <xsd:annotation> - <xsd:documentation>Indicates JavaScript source file data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="jscript"> - <xsd:annotation> - <xsd:documentation>Indicates JScript source file data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="layout"> - <xsd:annotation> - <xsd:documentation>Indicates information relating to formatting.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="lisp"> - <xsd:annotation> - <xsd:documentation>Indicates LISP source file data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="margin"> - <xsd:annotation> - <xsd:documentation>Indicates information relating to margin formats.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="menufile"> - <xsd:annotation> - <xsd:documentation>Indicates a file containing menu.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="messagefile"> - <xsd:annotation> - <xsd:documentation>Indicates numerically identified string table.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="mif"> - <xsd:annotation> - <xsd:documentation>Indicates Maker Interchange Format (MIF) data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="mimetype"> - <xsd:annotation> - <xsd:documentation>Indicates that the datatype attribute value is a MIME Type value and is defined in the mime-type attribute.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="mo"> - <xsd:annotation> - <xsd:documentation>Indicates GNU Machine Object data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="msglib"> - <xsd:annotation> - <xsd:documentation>Indicates Message Librarian strings created by Novell's Message Librarian Tool.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="pagefooter"> - <xsd:annotation> - <xsd:documentation>Indicates information to be displayed at the bottom of each page of a document.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="pageheader"> - <xsd:annotation> - <xsd:documentation>Indicates information to be displayed at the top of each page of a document.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="parameters"> - <xsd:annotation> - <xsd:documentation>Indicates a list of property values (e.g., settings within INI files or preferences dialog).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="pascal"> - <xsd:annotation> - <xsd:documentation>Indicates Pascal source file data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="php"> - <xsd:annotation> - <xsd:documentation>Indicates Hypertext Preprocessor data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="plaintext"> - <xsd:annotation> - <xsd:documentation>Indicates plain text file (no formatting other than, possibly, wrapping).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="po"> - <xsd:annotation> - <xsd:documentation>Indicates GNU Portable Object file.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="report"> - <xsd:annotation> - <xsd:documentation>Indicates dynamically generated user defined document. e.g. Oracle Report, Crystal Report, etc.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="resources"> - <xsd:annotation> - <xsd:documentation>Indicates Windows .NET binary resources.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="resx"> - <xsd:annotation> - <xsd:documentation>Indicates Windows .NET Resources.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="rtf"> - <xsd:annotation> - <xsd:documentation>Indicates Rich Text Format (RTF) data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="sgml"> - <xsd:annotation> - <xsd:documentation>Indicates Standard Generalized Markup Language (SGML) data - document instance.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="sgmldtd"> - <xsd:annotation> - <xsd:documentation>Indicates Standard Generalized Markup Language (SGML) data - Document Type Definition (DTD).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="svg"> - <xsd:annotation> - <xsd:documentation>Indicates Scalable Vector Graphic (SVG) data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="vbscript"> - <xsd:annotation> - <xsd:documentation>Indicates VisualBasic Script source file.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="warning"> - <xsd:annotation> - <xsd:documentation>Indicates warning message.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="winres"> - <xsd:annotation> - <xsd:documentation>Indicates Windows (Win32) resources (i.e. resources extracted from an RC script, a message file, or a compiled file).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="xhtml"> - <xsd:annotation> - <xsd:documentation>Indicates Extensible HyperText Markup Language (XHTML) data - document instance.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="xml"> - <xsd:annotation> - <xsd:documentation>Indicates Extensible Markup Language (XML) data - document instance.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="xmldtd"> - <xsd:annotation> - <xsd:documentation>Indicates Extensible Markup Language (XML) data - Document Type Definition (DTD).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="xsl"> - <xsd:annotation> - <xsd:documentation>Indicates Extensible Stylesheet Language (XSL) data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="xul"> - <xsd:annotation> - <xsd:documentation>Indicates XUL elements.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="mtypeValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'mtype'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="abbrev"> - <xsd:annotation> - <xsd:documentation>Indicates the marked text is an abbreviation.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="abbreviated-form"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.8: A term resulting from the omission of any part of the full term while designating the same concept.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="abbreviation"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.8.1: An abbreviated form of a simple term resulting from the omission of some of its letters (e.g. 'adj.' for 'adjective').</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="acronym"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.8.4: An abbreviated form of a term made up of letters from the full form of a multiword term strung together into a sequence pronounced only syllabically (e.g. 'radar' for 'radio detecting and ranging').</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="appellation"> - <xsd:annotation> - <xsd:documentation>ISO-12620: A proper-name term, such as the name of an agency or other proper entity.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="collocation"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.18.1: A recurrent word combination characterized by cohesion in that the components of the collocation must co-occur within an utterance or series of utterances, even though they do not necessarily have to maintain immediate proximity to one another.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="common-name"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.5: A synonym for an international scientific term that is used in general discourse in a given language.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="datetime"> - <xsd:annotation> - <xsd:documentation>Indicates the marked text is a date and/or time.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="equation"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.15: An expression used to represent a concept based on a statement that two mathematical expressions are, for instance, equal as identified by the equal sign (=), or assigned to one another by a similar sign.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="expanded-form"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.7: The complete representation of a term for which there is an abbreviated form.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="formula"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.14: Figures, symbols or the like used to express a concept briefly, such as a mathematical or chemical formula.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="head-term"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.1: The concept designation that has been chosen to head a terminological record.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="initialism"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.8.3: An abbreviated form of a term consisting of some of the initial letters of the words making up a multiword term or the term elements making up a compound term when these letters are pronounced individually (e.g. 'BSE' for 'bovine spongiform encephalopathy').</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="international-scientific-term"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.4: A term that is part of an international scientific nomenclature as adopted by an appropriate scientific body.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="internationalism"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.6: A term that has the same or nearly identical orthographic or phonemic form in many languages.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="logical-expression"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.16: An expression used to represent a concept based on mathematical or logical relations, such as statements of inequality, set relationships, Boolean operations, and the like.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="materials-management-unit"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.17: A unit to track object.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="name"> - <xsd:annotation> - <xsd:documentation>Indicates the marked text is a name.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="near-synonym"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.3: A term that represents the same or a very similar concept as another term in the same language, but for which interchangeability is limited to some contexts and inapplicable in others.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="part-number"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.17.2: A unique alphanumeric designation assigned to an object in a manufacturing system.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="phrase"> - <xsd:annotation> - <xsd:documentation>Indicates the marked text is a phrase.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="phraseological-unit"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.18: Any group of two or more words that form a unit, the meaning of which frequently cannot be deduced based on the combined sense of the words making up the phrase.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="protected"> - <xsd:annotation> - <xsd:documentation>Indicates the marked text should not be translated.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="romanized-form"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.12: A form of a term resulting from an operation whereby non-Latin writing systems are converted to the Latin alphabet.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="seg"> - <xsd:annotation> - <xsd:documentation>Indicates that the marked text represents a segment.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="set-phrase"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.18.2: A fixed, lexicalized phrase.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="short-form"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.8.2: A variant of a multiword term that includes fewer words than the full form of the term (e.g. 'Group of Twenty-four' for 'Intergovernmental Group of Twenty-four on International Monetary Affairs').</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="sku"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.17.1: Stock keeping unit, an inventory item identified by a unique alphanumeric designation assigned to an object in an inventory control system.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="standard-text"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.19: A fixed chunk of recurring text.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="symbol"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.13: A designation of a concept by letters, numerals, pictograms or any combination thereof.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="synonym"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.2: Any term that represents the same or a very similar concept as the main entry term in a term entry.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="synonymous-phrase"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.18.3: Phraseological unit in a language that expresses the same semantic content as another phrase in that same language.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="term"> - <xsd:annotation> - <xsd:documentation>Indicates the marked text is a term.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="transcribed-form"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.11: A form of a term resulting from an operation whereby the characters of one writing system are represented by characters from another writing system, taking into account the pronunciation of the characters converted.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="transliterated-form"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.10: A form of a term resulting from an operation whereby the characters of an alphabetic writing system are represented by characters from another alphabetic writing system.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="truncated-term"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.8.5: An abbreviated form of a term resulting from the omission of one or more term elements or syllables (e.g. 'flu' for 'influenza').</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="variant"> - <xsd:annotation> - <xsd:documentation>ISO-12620 2.1.9: One of the alternate forms of a term.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="restypeValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'restype'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="auto3state"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC AUTO3STATE control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="autocheckbox"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC AUTOCHECKBOX control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="autoradiobutton"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC AUTORADIOBUTTON control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="bedit"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC BEDIT control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="bitmap"> - <xsd:annotation> - <xsd:documentation>Indicates a bitmap, for example a BITMAP resource in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="button"> - <xsd:annotation> - <xsd:documentation>Indicates a button object, for example a BUTTON control Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="caption"> - <xsd:annotation> - <xsd:documentation>Indicates a caption, such as the caption of a dialog box.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="cell"> - <xsd:annotation> - <xsd:documentation>Indicates the cell in a table, for example the content of the &lt;td&gt; element in HTML.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="checkbox"> - <xsd:annotation> - <xsd:documentation>Indicates check box object, for example a CHECKBOX control in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="checkboxmenuitem"> - <xsd:annotation> - <xsd:documentation>Indicates a menu item with an associated checkbox.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="checkedlistbox"> - <xsd:annotation> - <xsd:documentation>Indicates a list box, but with a check-box for each item.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="colorchooser"> - <xsd:annotation> - <xsd:documentation>Indicates a color selection dialog.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="combobox"> - <xsd:annotation> - <xsd:documentation>Indicates a combination of edit box and listbox object, for example a COMBOBOX control in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="comboboxexitem"> - <xsd:annotation> - <xsd:documentation>Indicates an initialization entry of an extended combobox DLGINIT resource block. (code 0x1234).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="comboboxitem"> - <xsd:annotation> - <xsd:documentation>Indicates an initialization entry of a combobox DLGINIT resource block (code 0x0403).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="component"> - <xsd:annotation> - <xsd:documentation>Indicates a UI base class element that cannot be represented by any other element.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="contextmenu"> - <xsd:annotation> - <xsd:documentation>Indicates a context menu.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="ctext"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC CTEXT control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="cursor"> - <xsd:annotation> - <xsd:documentation>Indicates a cursor, for example a CURSOR resource in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="datetimepicker"> - <xsd:annotation> - <xsd:documentation>Indicates a date/time picker.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="defpushbutton"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC DEFPUSHBUTTON control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="dialog"> - <xsd:annotation> - <xsd:documentation>Indicates a dialog box.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="dlginit"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC DLGINIT resource block.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="edit"> - <xsd:annotation> - <xsd:documentation>Indicates an edit box object, for example an EDIT control in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="file"> - <xsd:annotation> - <xsd:documentation>Indicates a filename.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="filechooser"> - <xsd:annotation> - <xsd:documentation>Indicates a file dialog.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="fn"> - <xsd:annotation> - <xsd:documentation>Indicates a footnote.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="font"> - <xsd:annotation> - <xsd:documentation>Indicates a font name.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="footer"> - <xsd:annotation> - <xsd:documentation>Indicates a footer.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="frame"> - <xsd:annotation> - <xsd:documentation>Indicates a frame object.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="grid"> - <xsd:annotation> - <xsd:documentation>Indicates a XUL grid element.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="groupbox"> - <xsd:annotation> - <xsd:documentation>Indicates a groupbox object, for example a GROUPBOX control in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="header"> - <xsd:annotation> - <xsd:documentation>Indicates a header item.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="heading"> - <xsd:annotation> - <xsd:documentation>Indicates a heading, such has the content of &lt;h1&gt;, &lt;h2&gt;, etc. in HTML.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="hedit"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC HEDIT control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="hscrollbar"> - <xsd:annotation> - <xsd:documentation>Indicates a horizontal scrollbar.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="icon"> - <xsd:annotation> - <xsd:documentation>Indicates an icon, for example an ICON resource in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="iedit"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC IEDIT control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="keywords"> - <xsd:annotation> - <xsd:documentation>Indicates keyword list, such as the content of the Keywords meta-data in HTML, or a K footnote in WinHelp RTF.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="label"> - <xsd:annotation> - <xsd:documentation>Indicates a label object.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="linklabel"> - <xsd:annotation> - <xsd:documentation>Indicates a label that is also a HTML link (not necessarily a URL).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="list"> - <xsd:annotation> - <xsd:documentation>Indicates a list (a group of list-items, for example an &lt;ol&gt; or &lt;ul&gt; element in HTML).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="listbox"> - <xsd:annotation> - <xsd:documentation>Indicates a listbox object, for example an LISTBOX control in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="listitem"> - <xsd:annotation> - <xsd:documentation>Indicates an list item (an entry in a list).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="ltext"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC LTEXT control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="menu"> - <xsd:annotation> - <xsd:documentation>Indicates a menu (a group of menu-items).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="menubar"> - <xsd:annotation> - <xsd:documentation>Indicates a toolbar containing one or more tope level menus.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="menuitem"> - <xsd:annotation> - <xsd:documentation>Indicates a menu item (an entry in a menu).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="menuseparator"> - <xsd:annotation> - <xsd:documentation>Indicates a XUL menuseparator element.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="message"> - <xsd:annotation> - <xsd:documentation>Indicates a message, for example an entry in a MESSAGETABLE resource in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="monthcalendar"> - <xsd:annotation> - <xsd:documentation>Indicates a calendar control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="numericupdown"> - <xsd:annotation> - <xsd:documentation>Indicates an edit box beside a spin control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="panel"> - <xsd:annotation> - <xsd:documentation>Indicates a catch all for rectangular areas.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="popupmenu"> - <xsd:annotation> - <xsd:documentation>Indicates a standalone menu not necessarily associated with a menubar.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="pushbox"> - <xsd:annotation> - <xsd:documentation>Indicates a pushbox object, for example a PUSHBOX control in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="pushbutton"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC PUSHBUTTON control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="radio"> - <xsd:annotation> - <xsd:documentation>Indicates a radio button object.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="radiobuttonmenuitem"> - <xsd:annotation> - <xsd:documentation>Indicates a menuitem with associated radio button.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="rcdata"> - <xsd:annotation> - <xsd:documentation>Indicates raw data resources for an application.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="row"> - <xsd:annotation> - <xsd:documentation>Indicates a row in a table.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="rtext"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC RTEXT control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="scrollpane"> - <xsd:annotation> - <xsd:documentation>Indicates a user navigable container used to show a portion of a document.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="separator"> - <xsd:annotation> - <xsd:documentation>Indicates a generic divider object (e.g. menu group separator).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="shortcut"> - <xsd:annotation> - <xsd:documentation>Windows accelerators, shortcuts in resource or property files.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="spinner"> - <xsd:annotation> - <xsd:documentation>Indicates a UI control to indicate process activity but not progress.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="splitter"> - <xsd:annotation> - <xsd:documentation>Indicates a splitter bar.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="state3"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC STATE3 control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="statusbar"> - <xsd:annotation> - <xsd:documentation>Indicates a window for providing feedback to the users, like 'read-only', etc.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="string"> - <xsd:annotation> - <xsd:documentation>Indicates a string, for example an entry in a STRINGTABLE resource in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="tabcontrol"> - <xsd:annotation> - <xsd:documentation>Indicates a layers of controls with a tab to select layers.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="table"> - <xsd:annotation> - <xsd:documentation>Indicates a display and edits regular two-dimensional tables of cells.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="textbox"> - <xsd:annotation> - <xsd:documentation>Indicates a XUL textbox element.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="togglebutton"> - <xsd:annotation> - <xsd:documentation>Indicates a UI button that can be toggled to on or off state.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="toolbar"> - <xsd:annotation> - <xsd:documentation>Indicates an array of controls, usually buttons.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="tooltip"> - <xsd:annotation> - <xsd:documentation>Indicates a pop up tool tip text.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="trackbar"> - <xsd:annotation> - <xsd:documentation>Indicates a bar with a pointer indicating a position within a certain range.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="tree"> - <xsd:annotation> - <xsd:documentation>Indicates a control that displays a set of hierarchical data.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="uri"> - <xsd:annotation> - <xsd:documentation>Indicates a URI (URN or URL).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="userbutton"> - <xsd:annotation> - <xsd:documentation>Indicates a Windows RC USERBUTTON control.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="usercontrol"> - <xsd:annotation> - <xsd:documentation>Indicates a user-defined control like CONTROL control in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="var"> - <xsd:annotation> - <xsd:documentation>Indicates the text of a variable.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="versioninfo"> - <xsd:annotation> - <xsd:documentation>Indicates version information about a resource like VERSIONINFO in Windows.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="vscrollbar"> - <xsd:annotation> - <xsd:documentation>Indicates a vertical scrollbar.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="window"> - <xsd:annotation> - <xsd:documentation>Indicates a graphical window.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="size-unitValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'size-unit'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="byte"> - <xsd:annotation> - <xsd:documentation>Indicates a size in 8-bit bytes.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="char"> - <xsd:annotation> - <xsd:documentation>Indicates a size in Unicode characters.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="col"> - <xsd:annotation> - <xsd:documentation>Indicates a size in columns. Used for HTML text area.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="cm"> - <xsd:annotation> - <xsd:documentation>Indicates a size in centimeters.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="dlgunit"> - <xsd:annotation> - <xsd:documentation>Indicates a size in dialog units, as defined in Windows resources.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="em"> - <xsd:annotation> - <xsd:documentation>Indicates a size in 'font-size' units (as defined in CSS).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="ex"> - <xsd:annotation> - <xsd:documentation>Indicates a size in 'x-height' units (as defined in CSS).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="glyph"> - <xsd:annotation> - <xsd:documentation>Indicates a size in glyphs. A glyph is considered to be one or more combined Unicode characters that represent a single displayable text character. Sometimes referred to as a 'grapheme cluster'</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="in"> - <xsd:annotation> - <xsd:documentation>Indicates a size in inches.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="mm"> - <xsd:annotation> - <xsd:documentation>Indicates a size in millimeters.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="percent"> - <xsd:annotation> - <xsd:documentation>Indicates a size in percentage.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="pixel"> - <xsd:annotation> - <xsd:documentation>Indicates a size in pixels.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="point"> - <xsd:annotation> - <xsd:documentation>Indicates a size in point.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="row"> - <xsd:annotation> - <xsd:documentation>Indicates a size in rows. Used for HTML text area.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="stateValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'state'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="final"> - <xsd:annotation> - <xsd:documentation>Indicates the terminating state.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="needs-adaptation"> - <xsd:annotation> - <xsd:documentation>Indicates only non-textual information needs adaptation.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="needs-l10n"> - <xsd:annotation> - <xsd:documentation>Indicates both text and non-textual information needs adaptation.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="needs-review-adaptation"> - <xsd:annotation> - <xsd:documentation>Indicates only non-textual information needs review.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="needs-review-l10n"> - <xsd:annotation> - <xsd:documentation>Indicates both text and non-textual information needs review.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="needs-review-translation"> - <xsd:annotation> - <xsd:documentation>Indicates that only the text of the item needs to be reviewed.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="needs-translation"> - <xsd:annotation> - <xsd:documentation>Indicates that the item needs to be translated.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="new"> - <xsd:annotation> - <xsd:documentation>Indicates that the item is new. For example, translation units that were not in a previous version of the document.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="signed-off"> - <xsd:annotation> - <xsd:documentation>Indicates that changes are reviewed and approved.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="translated"> - <xsd:annotation> - <xsd:documentation>Indicates that the item has been translated.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="state-qualifierValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'state-qualifier'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="exact-match"> - <xsd:annotation> - <xsd:documentation>Indicates an exact match. An exact match occurs when a source text of a segment is exactly the same as the source text of a segment that was translated previously.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="fuzzy-match"> - <xsd:annotation> - <xsd:documentation>Indicates a fuzzy match. A fuzzy match occurs when a source text of a segment is very similar to the source text of a segment that was translated previously (e.g. when the difference is casing, a few changed words, white-space discripancy, etc.).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="id-match"> - <xsd:annotation> - <xsd:documentation>Indicates a match based on matching IDs (in addition to matching text).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="leveraged-glossary"> - <xsd:annotation> - <xsd:documentation>Indicates a translation derived from a glossary.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="leveraged-inherited"> - <xsd:annotation> - <xsd:documentation>Indicates a translation derived from existing translation.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="leveraged-mt"> - <xsd:annotation> - <xsd:documentation>Indicates a translation derived from machine translation.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="leveraged-repository"> - <xsd:annotation> - <xsd:documentation>Indicates a translation derived from a translation repository.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="leveraged-tm"> - <xsd:annotation> - <xsd:documentation>Indicates a translation derived from a translation memory.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="mt-suggestion"> - <xsd:annotation> - <xsd:documentation>Indicates the translation is suggested by machine translation.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="rejected-grammar"> - <xsd:annotation> - <xsd:documentation>Indicates that the item has been rejected because of incorrect grammar.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="rejected-inaccurate"> - <xsd:annotation> - <xsd:documentation>Indicates that the item has been rejected because it is incorrect.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="rejected-length"> - <xsd:annotation> - <xsd:documentation>Indicates that the item has been rejected because it is too long or too short.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="rejected-spelling"> - <xsd:annotation> - <xsd:documentation>Indicates that the item has been rejected because of incorrect spelling.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="tm-suggestion"> - <xsd:annotation> - <xsd:documentation>Indicates the translation is suggested by translation memory.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="unitValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'unit'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="word"> - <xsd:annotation> - <xsd:documentation>Refers to words.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="page"> - <xsd:annotation> - <xsd:documentation>Refers to pages.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="trans-unit"> - <xsd:annotation> - <xsd:documentation>Refers to &lt;trans-unit&gt; elements.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="bin-unit"> - <xsd:annotation> - <xsd:documentation>Refers to &lt;bin-unit&gt; elements.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="glyph"> - <xsd:annotation> - <xsd:documentation>Refers to glyphs.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="item"> - <xsd:annotation> - <xsd:documentation>Refers to &lt;trans-unit&gt; and/or &lt;bin-unit&gt; elements.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="instance"> - <xsd:annotation> - <xsd:documentation>Refers to the occurrences of instances defined by the count-type value.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="character"> - <xsd:annotation> - <xsd:documentation>Refers to characters.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="line"> - <xsd:annotation> - <xsd:documentation>Refers to lines.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="sentence"> - <xsd:annotation> - <xsd:documentation>Refers to sentences.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="paragraph"> - <xsd:annotation> - <xsd:documentation>Refers to paragraphs.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="segment"> - <xsd:annotation> - <xsd:documentation>Refers to segments.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="placeable"> - <xsd:annotation> - <xsd:documentation>Refers to placeables (inline elements).</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="priorityValueList"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'priority'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:positiveInteger"> - <xsd:enumeration value="1"> - <xsd:annotation> - <xsd:documentation>Highest priority.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="2"> - <xsd:annotation> - <xsd:documentation>High priority.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="3"> - <xsd:annotation> - <xsd:documentation>High priority, but not as important as 2.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="4"> - <xsd:annotation> - <xsd:documentation>High priority, but not as important as 3.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="5"> - <xsd:annotation> - <xsd:documentation>Medium priority, but more important than 6.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="6"> - <xsd:annotation> - <xsd:documentation>Medium priority, but less important than 5.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="7"> - <xsd:annotation> - <xsd:documentation>Low priority, but more important than 8.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="8"> - <xsd:annotation> - <xsd:documentation>Low priority, but more important than 9.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="9"> - <xsd:annotation> - <xsd:documentation>Low priority.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="10"> - <xsd:annotation> - <xsd:documentation>Lowest priority.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="reformatValueYesNo"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="yes"> - <xsd:annotation> - <xsd:documentation>This value indicates that all properties can be reformatted. This value must be used alone.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="no"> - <xsd:annotation> - <xsd:documentation>This value indicates that no properties should be reformatted. This value must be used alone.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="reformatValueList"> - <xsd:list> - <xsd:simpleType> - <xsd:union memberTypes="xlf:XTend"> - <xsd:simpleType> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="coord"> - <xsd:annotation> - <xsd:documentation>This value indicates that all information in the coord attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="coord-x"> - <xsd:annotation> - <xsd:documentation>This value indicates that the x information in the coord attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="coord-y"> - <xsd:annotation> - <xsd:documentation>This value indicates that the y information in the coord attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="coord-cx"> - <xsd:annotation> - <xsd:documentation>This value indicates that the cx information in the coord attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="coord-cy"> - <xsd:annotation> - <xsd:documentation>This value indicates that the cy information in the coord attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="font"> - <xsd:annotation> - <xsd:documentation>This value indicates that all the information in the font attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="font-name"> - <xsd:annotation> - <xsd:documentation>This value indicates that the name information in the font attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="font-size"> - <xsd:annotation> - <xsd:documentation>This value indicates that the size information in the font attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="font-weight"> - <xsd:annotation> - <xsd:documentation>This value indicates that the weight information in the font attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="css-style"> - <xsd:annotation> - <xsd:documentation>This value indicates that the information in the css-style attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="style"> - <xsd:annotation> - <xsd:documentation>This value indicates that the information in the style attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="ex-style"> - <xsd:annotation> - <xsd:documentation>This value indicates that the information in the exstyle attribute can be modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - </xsd:union> - </xsd:simpleType> - </xsd:list> - </xsd:simpleType> - <xsd:simpleType name="purposeValueList"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="information"> - <xsd:annotation> - <xsd:documentation>Indicates that the context is informational in nature, specifying for example, how a term should be translated. Thus, should be displayed to anyone editing the XLIFF document.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="location"> - <xsd:annotation> - <xsd:documentation>Indicates that the context-group is used to specify where the term was found in the translatable source. Thus, it is not displayed.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="match"> - <xsd:annotation> - <xsd:documentation>Indicates that the context information should be used during translation memory lookups. Thus, it is not displayed.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="alttranstypeValueList"> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="proposal"> - <xsd:annotation> - <xsd:documentation>Represents a translation proposal from a translation memory or other resource.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="previous-version"> - <xsd:annotation> - <xsd:documentation>Represents a previous version of the target element.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="rejected"> - <xsd:annotation> - <xsd:documentation>Represents a rejected version of the target element.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="reference"> - <xsd:annotation> - <xsd:documentation>Represents a translation to be used for reference purposes only, for example from a related product or a different language.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - <xsd:enumeration value="accepted"> - <xsd:annotation> - <xsd:documentation>Represents a proposed translation that was used for the translation of the trans-unit, possibly modified.</xsd:documentation> - </xsd:annotation> - </xsd:enumeration> - </xsd:restriction> - </xsd:simpleType> - <!-- Other Types --> - <xsd:complexType name="ElemType_ExternalReference"> - <xsd:choice> - <xsd:element ref="xlf:internal-file"/> - <xsd:element ref="xlf:external-file"/> - </xsd:choice> - </xsd:complexType> - <xsd:simpleType name="AttrType_purpose"> - <xsd:list> - <xsd:simpleType> - <xsd:union memberTypes="xlf:purposeValueList xlf:XTend"/> - </xsd:simpleType> - </xsd:list> - </xsd:simpleType> - <xsd:simpleType name="AttrType_datatype"> - <xsd:union memberTypes="xlf:datatypeValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_restype"> - <xsd:union memberTypes="xlf:restypeValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_alttranstype"> - <xsd:union memberTypes="xlf:alttranstypeValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_context-type"> - <xsd:union memberTypes="xlf:context-typeValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_state"> - <xsd:union memberTypes="xlf:stateValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_state-qualifier"> - <xsd:union memberTypes="xlf:state-qualifierValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_count-type"> - <xsd:union memberTypes="xlf:restypeValueList xlf:count-typeValueList xlf:datatypeValueList xlf:stateValueList xlf:state-qualifierValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_InlineDelimiters"> - <xsd:union memberTypes="xlf:InlineDelimitersValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_InlinePlaceholders"> - <xsd:union memberTypes="xlf:InlinePlaceholdersValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_size-unit"> - <xsd:union memberTypes="xlf:size-unitValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_mtype"> - <xsd:union memberTypes="xlf:mtypeValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_unit"> - <xsd:union memberTypes="xlf:unitValueList xlf:XTend"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_priority"> - <xsd:union memberTypes="xlf:priorityValueList"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_reformat"> - <xsd:union memberTypes="xlf:reformatValueYesNo xlf:reformatValueList"/> - </xsd:simpleType> - <xsd:simpleType name="AttrType_YesNo"> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="yes"/> - <xsd:enumeration value="no"/> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="AttrType_Position"> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="open"/> - <xsd:enumeration value="close"/> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="AttrType_assoc"> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="preceding"/> - <xsd:enumeration value="following"/> - <xsd:enumeration value="both"/> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="AttrType_annotates"> - <xsd:restriction base="xsd:NMTOKEN"> - <xsd:enumeration value="source"/> - <xsd:enumeration value="target"/> - <xsd:enumeration value="general"/> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="AttrType_Coordinates"> - <xsd:annotation> - <xsd:documentation>Values for the attribute 'coord'.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:pattern value="(-?\d+|#);(-?\d+|#);(-?\d+|#);(-?\d+|#)"/> - </xsd:restriction> - </xsd:simpleType> - <xsd:simpleType name="AttrType_Version"> - <xsd:annotation> - <xsd:documentation>Version values: 1.0 and 1.1 are allowed for backward compatibility.</xsd:documentation> - </xsd:annotation> - <xsd:restriction base="xsd:string"> - <xsd:enumeration value="1.2"/> - <xsd:enumeration value="1.1"/> - <xsd:enumeration value="1.0"/> - </xsd:restriction> - </xsd:simpleType> - <!-- Groups --> - <xsd:group name="ElemGroup_TextContent"> - <xsd:choice> - <xsd:element ref="xlf:g"/> - <xsd:element ref="xlf:bpt"/> - <xsd:element ref="xlf:ept"/> - <xsd:element ref="xlf:ph"/> - <xsd:element ref="xlf:it"/> - <xsd:element ref="xlf:mrk"/> - <xsd:element ref="xlf:x"/> - <xsd:element ref="xlf:bx"/> - <xsd:element ref="xlf:ex"/> - </xsd:choice> - </xsd:group> - <xsd:attributeGroup name="AttrGroup_TextContent"> - <xsd:attribute name="id" type="xsd:string" use="required"/> - <xsd:attribute name="xid" type="xsd:string" use="optional"/> - <xsd:attribute name="equiv-text" type="xsd:string" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:attributeGroup> - <!-- XLIFF Structure --> - <xsd:element name="xliff"> - <xsd:complexType> - <xsd:sequence maxOccurs="unbounded"> - <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> - <xsd:element ref="xlf:file"/> - </xsd:sequence> - <xsd:attribute name="version" type="xlf:AttrType_Version" use="required"/> - <xsd:attribute ref="xml:lang" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="file"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="0" ref="xlf:header"/> - <xsd:element ref="xlf:body"/> - </xsd:sequence> - <xsd:attribute name="original" type="xsd:string" use="required"/> - <xsd:attribute name="source-language" type="xsd:language" use="required"/> - <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="required"/> - <xsd:attribute name="tool-id" type="xsd:string" use="optional"/> - <xsd:attribute name="date" type="xsd:dateTime" use="optional"/> - <xsd:attribute ref="xml:space" use="optional"/> - <xsd:attribute name="category" type="xsd:string" use="optional"/> - <xsd:attribute name="target-language" type="xsd:language" use="optional"/> - <xsd:attribute name="product-name" type="xsd:string" use="optional"/> - <xsd:attribute name="product-version" type="xsd:string" use="optional"/> - <xsd:attribute name="build-num" type="xsd:string" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - <xsd:unique name="U_group_id"> - <xsd:selector xpath=".//xlf:group"/> - <xsd:field xpath="@id"/> - </xsd:unique> - <xsd:key name="K_unit_id"> - <xsd:selector xpath=".//xlf:trans-unit|.//xlf:bin-unit"/> - <xsd:field xpath="@id"/> - </xsd:key> - <xsd:keyref name="KR_unit_id" refer="xlf:K_unit_id"> - <xsd:selector xpath=".//bpt|.//ept|.//it|.//ph|.//g|.//x|.//bx|.//ex|.//sub"/> - <xsd:field xpath="@xid"/> - </xsd:keyref> - <xsd:key name="K_tool-id"> - <xsd:selector xpath="xlf:header/xlf:tool"/> - <xsd:field xpath="@tool-id"/> - </xsd:key> - <xsd:keyref name="KR_file_tool-id" refer="xlf:K_tool-id"> - <xsd:selector xpath="."/> - <xsd:field xpath="@tool-id"/> - </xsd:keyref> - <xsd:keyref name="KR_phase_tool-id" refer="xlf:K_tool-id"> - <xsd:selector xpath="xlf:header/xlf:phase-group/xlf:phase"/> - <xsd:field xpath="@tool-id"/> - </xsd:keyref> - <xsd:keyref name="KR_alt-trans_tool-id" refer="xlf:K_tool-id"> - <xsd:selector xpath=".//xlf:trans-unit/xlf:alt-trans"/> - <xsd:field xpath="@tool-id"/> - </xsd:keyref> - <xsd:key name="K_count-group_name"> - <xsd:selector xpath=".//xlf:count-group"/> - <xsd:field xpath="@name"/> - </xsd:key> - <xsd:unique name="U_context-group_name"> - <xsd:selector xpath=".//xlf:context-group"/> - <xsd:field xpath="@name"/> - </xsd:unique> - <xsd:key name="K_phase-name"> - <xsd:selector xpath="xlf:header/xlf:phase-group/xlf:phase"/> - <xsd:field xpath="@phase-name"/> - </xsd:key> - <xsd:keyref name="KR_phase-name" refer="xlf:K_phase-name"> - <xsd:selector xpath=".//xlf:count|.//xlf:trans-unit|.//xlf:target|.//bin-unit|.//bin-target"/> - <xsd:field xpath="@phase-name"/> - </xsd:keyref> - <xsd:unique name="U_uid"> - <xsd:selector xpath=".//xlf:external-file"/> - <xsd:field xpath="@uid"/> - </xsd:unique> - </xsd:element> - <xsd:element name="header"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="0" name="skl" type="xlf:ElemType_ExternalReference"/> - <xsd:element minOccurs="0" ref="xlf:phase-group"/> - <xsd:choice maxOccurs="unbounded" minOccurs="0"> - <xsd:element name="glossary" type="xlf:ElemType_ExternalReference"/> - <xsd:element name="reference" type="xlf:ElemType_ExternalReference"/> - <xsd:element ref="xlf:count-group"/> - <xsd:element ref="xlf:note"/> - <xsd:element ref="xlf:tool"/> - </xsd:choice> - <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="internal-file"> - <xsd:complexType> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> - <xsd:attribute name="form" type="xsd:string"/> - <xsd:attribute name="crc" type="xsd:NMTOKEN"/> - </xsd:extension> - </xsd:simpleContent> - </xsd:complexType> - </xsd:element> - <xsd:element name="external-file"> - <xsd:complexType> - <xsd:attribute name="href" type="xsd:string" use="required"/> - <xsd:attribute name="crc" type="xsd:NMTOKEN"/> - <xsd:attribute name="uid" type="xsd:NMTOKEN"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="note"> - <xsd:complexType> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> - <xsd:attribute ref="xml:lang" use="optional"/> - <xsd:attribute default="1" name="priority" type="xlf:AttrType_priority" use="optional"/> - <xsd:attribute name="from" type="xsd:string" use="optional"/> - <xsd:attribute default="general" name="annotates" type="xlf:AttrType_annotates" use="optional"/> - </xsd:extension> - </xsd:simpleContent> - </xsd:complexType> - </xsd:element> - <xsd:element name="phase-group"> - <xsd:complexType> - <xsd:sequence maxOccurs="unbounded"> - <xsd:element ref="xlf:phase"/> - </xsd:sequence> - </xsd:complexType> - </xsd:element> - <xsd:element name="phase"> - <xsd:complexType> - <xsd:sequence maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="xlf:note"/> - </xsd:sequence> - <xsd:attribute name="phase-name" type="xsd:string" use="required"/> - <xsd:attribute name="process-name" type="xsd:string" use="required"/> - <xsd:attribute name="company-name" type="xsd:string" use="optional"/> - <xsd:attribute name="tool-id" type="xsd:string" use="optional"/> - <xsd:attribute name="date" type="xsd:dateTime" use="optional"/> - <xsd:attribute name="job-id" type="xsd:string" use="optional"/> - <xsd:attribute name="contact-name" type="xsd:string" use="optional"/> - <xsd:attribute name="contact-email" type="xsd:string" use="optional"/> - <xsd:attribute name="contact-phone" type="xsd:string" use="optional"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="count-group"> - <xsd:complexType> - <xsd:sequence maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="xlf:count"/> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="count"> - <xsd:complexType> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> - <xsd:attribute name="count-type" type="xlf:AttrType_count-type" use="optional"/> - <xsd:attribute name="phase-name" type="xsd:string" use="optional"/> - <xsd:attribute default="word" name="unit" type="xlf:AttrType_unit" use="optional"/> - </xsd:extension> - </xsd:simpleContent> - </xsd:complexType> - </xsd:element> - <xsd:element name="context-group"> - <xsd:complexType> - <xsd:sequence maxOccurs="unbounded"> - <xsd:element ref="xlf:context"/> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="optional"/> - <xsd:attribute name="crc" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="purpose" type="xlf:AttrType_purpose" use="optional"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="context"> - <xsd:complexType> - <xsd:simpleContent> - <xsd:extension base="xsd:string"> - <xsd:attribute name="context-type" type="xlf:AttrType_context-type" use="required"/> - <xsd:attribute default="no" name="match-mandatory" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attribute name="crc" type="xsd:NMTOKEN" use="optional"/> - </xsd:extension> - </xsd:simpleContent> - </xsd:complexType> - </xsd:element> - <xsd:element name="tool"> - <xsd:complexType mixed="true"> - <xsd:sequence> - <xsd:any namespace="##any" processContents="strict" minOccurs="0" maxOccurs="unbounded"/> - </xsd:sequence> - <xsd:attribute name="tool-id" type="xsd:string" use="required"/> - <xsd:attribute name="tool-name" type="xsd:string" use="required"/> - <xsd:attribute name="tool-version" type="xsd:string" use="optional"/> - <xsd:attribute name="tool-company" type="xsd:string" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="body"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded" minOccurs="0"> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:group"/> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:trans-unit"/> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:bin-unit"/> - </xsd:choice> - </xsd:complexType> - </xsd:element> - <xsd:element name="group"> - <xsd:complexType> - <xsd:sequence> - <xsd:sequence> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:context-group"/> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:count-group"/> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:note"/> - <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> - </xsd:sequence> - <xsd:choice maxOccurs="unbounded"> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:group"/> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:trans-unit"/> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:bin-unit"/> - </xsd:choice> - </xsd:sequence> - <xsd:attribute name="id" type="xsd:string" use="optional"/> - <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="optional"/> - <xsd:attribute default="default" ref="xml:space" use="optional"/> - <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> - <xsd:attribute name="resname" type="xsd:string" use="optional"/> - <xsd:attribute name="extradata" type="xsd:string" use="optional"/> - <xsd:attribute name="extype" type="xsd:string" use="optional"/> - <xsd:attribute name="help-id" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="menu" type="xsd:string" use="optional"/> - <xsd:attribute name="menu-option" type="xsd:string" use="optional"/> - <xsd:attribute name="menu-name" type="xsd:string" use="optional"/> - <xsd:attribute name="coord" type="xlf:AttrType_Coordinates" use="optional"/> - <xsd:attribute name="font" type="xsd:string" use="optional"/> - <xsd:attribute name="css-style" type="xsd:string" use="optional"/> - <xsd:attribute name="style" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="exstyle" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute default="yes" name="translate" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attribute default="yes" name="reformat" type="xlf:AttrType_reformat" use="optional"/> - <xsd:attribute default="pixel" name="size-unit" type="xlf:AttrType_size-unit" use="optional"/> - <xsd:attribute name="maxwidth" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="minwidth" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="maxheight" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="minheight" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="maxbytes" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="minbytes" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="charclass" type="xsd:string" use="optional"/> - <xsd:attribute default="no" name="merged-trans" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="trans-unit"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="xlf:source"/> - <xsd:element minOccurs="0" ref="xlf:seg-source"/> - <xsd:element minOccurs="0" ref="xlf:target"/> - <xsd:choice maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="xlf:context-group"/> - <xsd:element ref="xlf:count-group"/> - <xsd:element ref="xlf:note"/> - <xsd:element ref="xlf:alt-trans"/> - </xsd:choice> - <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> - </xsd:sequence> - <xsd:attribute name="id" type="xsd:string" use="required"/> - <xsd:attribute name="approved" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attribute default="yes" name="translate" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attribute default="yes" name="reformat" type="xlf:AttrType_reformat" use="optional"/> - <xsd:attribute default="default" ref="xml:space" use="optional"/> - <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="optional"/> - <xsd:attribute name="phase-name" type="xsd:string" use="optional"/> - <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> - <xsd:attribute name="resname" type="xsd:string" use="optional"/> - <xsd:attribute name="extradata" type="xsd:string" use="optional"/> - <xsd:attribute name="extype" type="xsd:string" use="optional"/> - <xsd:attribute name="help-id" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="menu" type="xsd:string" use="optional"/> - <xsd:attribute name="menu-option" type="xsd:string" use="optional"/> - <xsd:attribute name="menu-name" type="xsd:string" use="optional"/> - <xsd:attribute name="coord" type="xlf:AttrType_Coordinates" use="optional"/> - <xsd:attribute name="font" type="xsd:string" use="optional"/> - <xsd:attribute name="css-style" type="xsd:string" use="optional"/> - <xsd:attribute name="style" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="exstyle" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute default="pixel" name="size-unit" type="xlf:AttrType_size-unit" use="optional"/> - <xsd:attribute name="maxwidth" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="minwidth" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="maxheight" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="minheight" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="maxbytes" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="minbytes" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="charclass" type="xsd:string" use="optional"/> - <xsd:attribute default="yes" name="merged-trans" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - <xsd:unique name="U_tu_segsrc_mid"> - <xsd:selector xpath="./xlf:seg-source/xlf:mrk"/> - <xsd:field xpath="@mid"/> - </xsd:unique> - <xsd:keyref name="KR_tu_segsrc_mid" refer="xlf:U_tu_segsrc_mid"> - <xsd:selector xpath="./xlf:target/xlf:mrk|./xlf:alt-trans"/> - <xsd:field xpath="@mid"/> - </xsd:keyref> - </xsd:element> - <xsd:element name="source"> - <xsd:complexType mixed="true"> - <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> - <xsd:attribute ref="xml:lang" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - <xsd:unique name="U_source_bpt_rid"> - <xsd:selector xpath=".//xlf:bpt"/> - <xsd:field xpath="@rid"/> - </xsd:unique> - <xsd:keyref name="KR_source_ept_rid" refer="xlf:U_source_bpt_rid"> - <xsd:selector xpath=".//xlf:ept"/> - <xsd:field xpath="@rid"/> - </xsd:keyref> - <xsd:unique name="U_source_bx_rid"> - <xsd:selector xpath=".//xlf:bx"/> - <xsd:field xpath="@rid"/> - </xsd:unique> - <xsd:keyref name="KR_source_ex_rid" refer="xlf:U_source_bx_rid"> - <xsd:selector xpath=".//xlf:ex"/> - <xsd:field xpath="@rid"/> - </xsd:keyref> - </xsd:element> - <xsd:element name="seg-source"> - <xsd:complexType mixed="true"> - <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> - <xsd:attribute ref="xml:lang" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - <xsd:unique name="U_segsrc_bpt_rid"> - <xsd:selector xpath=".//xlf:bpt"/> - <xsd:field xpath="@rid"/> - </xsd:unique> - <xsd:keyref name="KR_segsrc_ept_rid" refer="xlf:U_segsrc_bpt_rid"> - <xsd:selector xpath=".//xlf:ept"/> - <xsd:field xpath="@rid"/> - </xsd:keyref> - <xsd:unique name="U_segsrc_bx_rid"> - <xsd:selector xpath=".//xlf:bx"/> - <xsd:field xpath="@rid"/> - </xsd:unique> - <xsd:keyref name="KR_segsrc_ex_rid" refer="xlf:U_segsrc_bx_rid"> - <xsd:selector xpath=".//xlf:ex"/> - <xsd:field xpath="@rid"/> - </xsd:keyref> - </xsd:element> - <xsd:element name="target"> - <xsd:complexType mixed="true"> - <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> - <xsd:attribute name="state" type="xlf:AttrType_state" use="optional"/> - <xsd:attribute name="state-qualifier" type="xlf:AttrType_state-qualifier" use="optional"/> - <xsd:attribute name="phase-name" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute ref="xml:lang" use="optional"/> - <xsd:attribute name="resname" type="xsd:string" use="optional"/> - <xsd:attribute name="coord" type="xlf:AttrType_Coordinates" use="optional"/> - <xsd:attribute name="font" type="xsd:string" use="optional"/> - <xsd:attribute name="css-style" type="xsd:string" use="optional"/> - <xsd:attribute name="style" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="exstyle" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute default="yes" name="equiv-trans" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - <xsd:unique name="U_target_bpt_rid"> - <xsd:selector xpath=".//xlf:bpt"/> - <xsd:field xpath="@rid"/> - </xsd:unique> - <xsd:keyref name="KR_target_ept_rid" refer="xlf:U_target_bpt_rid"> - <xsd:selector xpath=".//xlf:ept"/> - <xsd:field xpath="@rid"/> - </xsd:keyref> - <xsd:unique name="U_target_bx_rid"> - <xsd:selector xpath=".//xlf:bx"/> - <xsd:field xpath="@rid"/> - </xsd:unique> - <xsd:keyref name="KR_target_ex_rid" refer="xlf:U_target_bx_rid"> - <xsd:selector xpath=".//xlf:ex"/> - <xsd:field xpath="@rid"/> - </xsd:keyref> - </xsd:element> - <xsd:element name="alt-trans"> - <xsd:complexType> - <xsd:sequence> - <xsd:element minOccurs="0" ref="xlf:source"/> - <xsd:element minOccurs="0" ref="xlf:seg-source"/> - <xsd:element maxOccurs="1" ref="xlf:target"/> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:context-group"/> - <xsd:element maxOccurs="unbounded" minOccurs="0" ref="xlf:note"/> - <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> - </xsd:sequence> - <xsd:attribute name="match-quality" type="xsd:string" use="optional"/> - <xsd:attribute name="tool-id" type="xsd:string" use="optional"/> - <xsd:attribute name="crc" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute ref="xml:lang" use="optional"/> - <xsd:attribute name="origin" type="xsd:string" use="optional"/> - <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="optional"/> - <xsd:attribute default="default" ref="xml:space" use="optional"/> - <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> - <xsd:attribute name="resname" type="xsd:string" use="optional"/> - <xsd:attribute name="extradata" type="xsd:string" use="optional"/> - <xsd:attribute name="extype" type="xsd:string" use="optional"/> - <xsd:attribute name="help-id" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="menu" type="xsd:string" use="optional"/> - <xsd:attribute name="menu-option" type="xsd:string" use="optional"/> - <xsd:attribute name="menu-name" type="xsd:string" use="optional"/> - <xsd:attribute name="mid" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="coord" type="xlf:AttrType_Coordinates" use="optional"/> - <xsd:attribute name="font" type="xsd:string" use="optional"/> - <xsd:attribute name="css-style" type="xsd:string" use="optional"/> - <xsd:attribute name="style" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="exstyle" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="phase-name" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute default="proposal" name="alttranstype" type="xlf:AttrType_alttranstype" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - <xsd:unique name="U_at_segsrc_mid"> - <xsd:selector xpath="./xlf:seg-source/xlf:mrk"/> - <xsd:field xpath="@mid"/> - </xsd:unique> - <xsd:keyref name="KR_at_segsrc_mid" refer="xlf:U_at_segsrc_mid"> - <xsd:selector xpath="./xlf:target/xlf:mrk"/> - <xsd:field xpath="@mid"/> - </xsd:keyref> - </xsd:element> - <xsd:element name="bin-unit"> - <xsd:complexType> - <xsd:sequence> - <xsd:element ref="xlf:bin-source"/> - <xsd:element minOccurs="0" ref="xlf:bin-target"/> - <xsd:choice maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="xlf:context-group"/> - <xsd:element ref="xlf:count-group"/> - <xsd:element ref="xlf:note"/> - <xsd:element ref="xlf:trans-unit"/> - </xsd:choice> - <xsd:any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="strict"/> - </xsd:sequence> - <xsd:attribute name="id" type="xsd:string" use="required"/> - <xsd:attribute name="mime-type" type="xlf:mime-typeValueList" use="required"/> - <xsd:attribute name="approved" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attribute default="yes" name="translate" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attribute default="yes" name="reformat" type="xlf:AttrType_reformat" use="optional"/> - <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> - <xsd:attribute name="resname" type="xsd:string" use="optional"/> - <xsd:attribute name="phase-name" type="xsd:string" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="bin-source"> - <xsd:complexType> - <xsd:choice> - <xsd:element ref="xlf:internal-file"/> - <xsd:element ref="xlf:external-file"/> - </xsd:choice> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="bin-target"> - <xsd:complexType> - <xsd:choice> - <xsd:element ref="xlf:internal-file"/> - <xsd:element ref="xlf:external-file"/> - </xsd:choice> - <xsd:attribute name="mime-type" type="xlf:mime-typeValueList" use="optional"/> - <xsd:attribute name="state" type="xlf:AttrType_state" use="optional"/> - <xsd:attribute name="state-qualifier" type="xlf:AttrType_state-qualifier" use="optional"/> - <xsd:attribute name="phase-name" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="restype" type="xlf:AttrType_restype" use="optional"/> - <xsd:attribute name="resname" type="xsd:string" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - </xsd:element> - <!-- Element for inline codes --> - <xsd:element name="g"> - <xsd:complexType mixed="true"> - <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> - <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> - <xsd:attribute default="yes" name="clone" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="x"> - <xsd:complexType> - <xsd:attribute name="ctype" type="xlf:AttrType_InlinePlaceholders" use="optional"/> - <xsd:attribute default="yes" name="clone" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="bx"> - <xsd:complexType> - <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> - <xsd:attribute default="yes" name="clone" type="xlf:AttrType_YesNo" use="optional"/> - <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="ex"> - <xsd:complexType> - <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> - <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="ph"> - <xsd:complexType mixed="true"> - <xsd:sequence maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="xlf:sub"/> - </xsd:sequence> - <xsd:attribute name="ctype" type="xlf:AttrType_InlinePlaceholders" use="optional"/> - <xsd:attribute name="crc" type="xsd:string" use="optional"/> - <xsd:attribute name="assoc" type="xlf:AttrType_assoc" use="optional"/> - <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="bpt"> - <xsd:complexType mixed="true"> - <xsd:sequence maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="xlf:sub"/> - </xsd:sequence> - <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> - <xsd:attribute name="crc" type="xsd:string" use="optional"/> - <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="ept"> - <xsd:complexType mixed="true"> - <xsd:sequence maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="xlf:sub"/> - </xsd:sequence> - <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="crc" type="xsd:string" use="optional"/> - <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="it"> - <xsd:complexType mixed="true"> - <xsd:sequence maxOccurs="unbounded" minOccurs="0"> - <xsd:element ref="xlf:sub"/> - </xsd:sequence> - <xsd:attribute name="pos" type="xlf:AttrType_Position" use="required"/> - <xsd:attribute name="rid" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> - <xsd:attribute name="crc" type="xsd:string" use="optional"/> - <xsd:attributeGroup ref="xlf:AttrGroup_TextContent"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="sub"> - <xsd:complexType mixed="true"> - <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> - <xsd:attribute name="datatype" type="xlf:AttrType_datatype" use="optional"/> - <xsd:attribute name="ctype" type="xlf:AttrType_InlineDelimiters" use="optional"/> - <xsd:attribute name="xid" type="xsd:string" use="optional"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="mrk"> - <xsd:complexType mixed="true"> - <xsd:group maxOccurs="unbounded" minOccurs="0" ref="xlf:ElemGroup_TextContent"/> - <xsd:attribute name="mtype" type="xlf:AttrType_mtype" use="required"/> - <xsd:attribute name="mid" type="xsd:NMTOKEN" use="optional"/> - <xsd:attribute name="comment" type="xsd:string" use="optional"/> - <xsd:anyAttribute namespace="##other" processContents="strict"/> - </xsd:complexType> - </xsd:element> -</xsd:schema> diff --git a/vendor/symfony/translation/Resources/schemas/xliff-core-2.0.xsd b/vendor/symfony/translation/Resources/schemas/xliff-core-2.0.xsd deleted file mode 100644 index 963232f..0000000 --- a/vendor/symfony/translation/Resources/schemas/xliff-core-2.0.xsd +++ /dev/null @@ -1,411 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - XLIFF Version 2.0 - OASIS Standard - 05 August 2014 - Copyright (c) OASIS Open 2014. All rights reserved. - Source: http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/schemas/ - --> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - elementFormDefault="qualified" - xmlns:xlf="urn:oasis:names:tc:xliff:document:2.0" - targetNamespace="urn:oasis:names:tc:xliff:document:2.0"> - - <!-- Import --> - - <xs:import namespace="http://www.w3.org/XML/1998/namespace" - schemaLocation="informativeCopiesOf3rdPartySchemas/w3c/xml.xsd"/> - - <!-- Element Group --> - - <xs:group name="inline"> - <xs:choice> - <xs:element ref="xlf:cp"/> - <xs:element ref="xlf:ph"/> - <xs:element ref="xlf:pc"/> - <xs:element ref="xlf:sc"/> - <xs:element ref="xlf:ec"/> - <xs:element ref="xlf:mrk"/> - <xs:element ref="xlf:sm"/> - <xs:element ref="xlf:em"/> - </xs:choice> - </xs:group> - - <!-- Attribute Types --> - - <xs:simpleType name="yesNo"> - <xs:restriction base="xs:string"> - <xs:enumeration value="yes"/> - <xs:enumeration value="no"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="yesNoFirstNo"> - <xs:restriction base="xs:string"> - <xs:enumeration value="yes"/> - <xs:enumeration value="firstNo"/> - <xs:enumeration value="no"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="dirValue"> - <xs:restriction base="xs:string"> - <xs:enumeration value="ltr"/> - <xs:enumeration value="rtl"/> - <xs:enumeration value="auto"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="appliesTo"> - <xs:restriction base="xs:string"> - <xs:enumeration value="source"/> - <xs:enumeration value="target"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="userDefinedValue"> - <xs:restriction base="xs:string"> - <xs:pattern value="[^\s:]+:[^\s:]+"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="attrType_type"> - <xs:restriction base="xs:string"> - <xs:enumeration value="fmt"/> - <xs:enumeration value="ui"/> - <xs:enumeration value="quote"/> - <xs:enumeration value="link"/> - <xs:enumeration value="image"/> - <xs:enumeration value="other"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="typeForMrkValues"> - <xs:restriction base="xs:NMTOKEN"> - <xs:enumeration value="generic"/> - <xs:enumeration value="comment"/> - <xs:enumeration value="term"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="attrType_typeForMrk"> - <xs:union memberTypes="xlf:typeForMrkValues xlf:userDefinedValue"/> - </xs:simpleType> - - <xs:simpleType name="priorityValue"> - <xs:restriction base="xs:positiveInteger"> - <xs:minInclusive value="1"/> - <xs:maxInclusive value="10"/> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType name="stateType"> - <xs:restriction base="xs:string"> - <xs:enumeration value="initial"/> - <xs:enumeration value="translated"/> - <xs:enumeration value="reviewed"/> - <xs:enumeration value="final"/> - </xs:restriction> - </xs:simpleType> - - <!-- Structural Elements --> - - <xs:element name="xliff"> - <xs:complexType mixed="false"> - <xs:sequence> - <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:file"/> - </xs:sequence> - <xs:attribute name="version" use="required"/> - <xs:attribute name="srcLang" use="required"/> - <xs:attribute name="trgLang" use="optional"/> - <xs:attribute ref="xml:space" use="optional" default="default"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="file"> - <xs:complexType mixed="false"> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="1" ref="xlf:skeleton"/> - <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" - processContents="lax"/> - <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/> - <xs:choice minOccurs="1" maxOccurs="unbounded"> - <xs:element ref="xlf:unit"/> - <xs:element ref="xlf:group"/> - </xs:choice> - </xs:sequence> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="canResegment" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="original" use="optional"/> - <xs:attribute name="translate" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="srcDir" use="optional" type="xlf:dirValue" default="auto"/> - <xs:attribute name="trgDir" use="optional" type="xlf:dirValue" default="auto"/> - <xs:attribute ref="xml:space" use="optional"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="skeleton"> - <xs:complexType mixed="true"> - <xs:sequence> - <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" - processContents="lax"/> - </xs:sequence> - <xs:attribute name="href" use="optional"/> - </xs:complexType> - </xs:element> - - <xs:element name="group"> - <xs:complexType mixed="false"> - <xs:sequence> - <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" - processContents="lax"/> - <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element ref="xlf:unit"/> - <xs:element ref="xlf:group"/> - </xs:choice> - </xs:sequence> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="name" use="optional"/> - <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/> - <xs:attribute name="translate" use="optional" type="xlf:yesNo"/> - <xs:attribute name="srcDir" use="optional" type="xlf:dirValue"/> - <xs:attribute name="trgDir" use="optional" type="xlf:dirValue"/> - <xs:attribute name="type" use="optional" type="xlf:userDefinedValue"/> - <xs:attribute ref="xml:space" use="optional"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="unit"> - <xs:complexType mixed="false"> - <xs:sequence> - <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" - processContents="lax"/> - <xs:element minOccurs="0" maxOccurs="1" ref="xlf:notes"/> - <xs:element minOccurs="0" maxOccurs="1" ref="xlf:originalData"/> - <xs:choice minOccurs="1" maxOccurs="unbounded"> - <xs:element ref="xlf:segment"/> - <xs:element ref="xlf:ignorable"/> - </xs:choice> - </xs:sequence> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="name" use="optional"/> - <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/> - <xs:attribute name="translate" use="optional" type="xlf:yesNo"/> - <xs:attribute name="srcDir" use="optional" type="xlf:dirValue"/> - <xs:attribute name="trgDir" use="optional" type="xlf:dirValue"/> - <xs:attribute ref="xml:space" use="optional"/> - <xs:attribute name="type" use="optional" type="xlf:userDefinedValue"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="segment"> - <xs:complexType mixed="false"> - <xs:sequence> - <xs:element minOccurs="1" maxOccurs="1" ref="xlf:source"/> - <xs:element minOccurs="0" maxOccurs="1" ref="xlf:target"/> - </xs:sequence> - <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="canResegment" use="optional" type="xlf:yesNo"/> - <xs:attribute name="state" use="optional" type="xlf:stateType" default="initial"/> - <xs:attribute name="subState" use="optional"/> - </xs:complexType> - </xs:element> - - <xs:element name="ignorable"> - <xs:complexType mixed="false"> - <xs:sequence> - <xs:element minOccurs="1" maxOccurs="1" ref="xlf:source"/> - <xs:element minOccurs="0" maxOccurs="1" ref="xlf:target"/> - </xs:sequence> - <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/> - </xs:complexType> - </xs:element> - - <xs:element name="notes"> - <xs:complexType mixed="false"> - <xs:sequence> - <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:note"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="note"> - <xs:complexType mixed="true"> - <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="appliesTo" use="optional" type="xlf:appliesTo"/> - <xs:attribute name="category" use="optional"/> - <xs:attribute name="priority" use="optional" type="xlf:priorityValue" default="1"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="originalData"> - <xs:complexType mixed="false"> - <xs:sequence> - <xs:element minOccurs="1" maxOccurs="unbounded" ref="xlf:data"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="data"> - <xs:complexType mixed="true"> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" ref="xlf:cp"/> - </xs:sequence> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="dir" use="optional" type="xlf:dirValue" default="auto"/> - <xs:attribute ref="xml:space" use="optional" fixed="preserve"/> - </xs:complexType> - </xs:element> - - <xs:element name="source"> - <xs:complexType mixed="true"> - <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/> - <xs:attribute ref="xml:lang" use="optional"/> - <xs:attribute ref="xml:space" use="optional"/> - </xs:complexType> - </xs:element> - - <xs:element name="target"> - <xs:complexType mixed="true"> - <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/> - <xs:attribute ref="xml:lang" use="optional"/> - <xs:attribute ref="xml:space" use="optional"/> - <xs:attribute name="order" use="optional" type="xs:positiveInteger"/> - </xs:complexType> - </xs:element> - - <!-- Inline Elements --> - - <xs:element name="cp"> - <!-- Code Point --> - <xs:complexType mixed="false"> - <xs:attribute name="hex" use="required" type="xs:hexBinary"/> - </xs:complexType> - </xs:element> - - <xs:element name="ph"> - <!-- Placeholder --> - <xs:complexType mixed="false"> - <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/> - <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="disp" use="optional"/> - <xs:attribute name="equiv" use="optional"/> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/> - <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/> - <xs:attribute name="type" use="optional" type="xlf:attrType_type"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="pc"> - <!-- Paired Code --> - <xs:complexType mixed="true"> - <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/> - <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo"/> - <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/> - <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="dispEnd" use="optional"/> - <xs:attribute name="dispStart" use="optional"/> - <xs:attribute name="equivEnd" use="optional"/> - <xs:attribute name="equivStart" use="optional"/> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="dataRefEnd" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="dataRefStart" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="subFlowsEnd" use="optional" type="xs:NMTOKENS"/> - <xs:attribute name="subFlowsStart" use="optional" type="xs:NMTOKENS"/> - <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/> - <xs:attribute name="type" use="optional" type="xlf:attrType_type"/> - <xs:attribute name="dir" use="optional" type="xlf:dirValue"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="sc"> - <!-- Start Code --> - <xs:complexType mixed="false"> - <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/> - <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="dir" use="optional" type="xlf:dirValue"/> - <xs:attribute name="disp" use="optional"/> - <xs:attribute name="equiv" use="optional"/> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="isolated" use="optional" type="xlf:yesNo" default="no"/> - <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/> - <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/> - <xs:attribute name="type" use="optional" type="xlf:attrType_type"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="ec"> - <!-- End Code --> - <xs:complexType mixed="false"> - <xs:attribute name="canCopy" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canDelete" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canOverlap" use="optional" type="xlf:yesNo" default="yes"/> - <xs:attribute name="canReorder" use="optional" type="xlf:yesNoFirstNo" default="yes"/> - <xs:attribute name="copyOf" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="dataRef" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="dir" use="optional" type="xlf:dirValue"/> - <xs:attribute name="disp" use="optional"/> - <xs:attribute name="equiv" use="optional"/> - <xs:attribute name="id" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="isolated" use="optional" type="xlf:yesNo" default="no"/> - <xs:attribute name="startRef" use="optional" type="xs:NMTOKEN"/> - <xs:attribute name="subFlows" use="optional" type="xs:NMTOKENS"/> - <xs:attribute name="subType" use="optional" type="xlf:userDefinedValue"/> - <xs:attribute name="type" use="optional" type="xlf:attrType_type"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="mrk"> - <!-- Annotation Marker --> - <xs:complexType mixed="true"> - <xs:group ref="xlf:inline" minOccurs="0" maxOccurs="unbounded"/> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="translate" use="optional" type="xlf:yesNo"/> - <xs:attribute name="type" use="optional" type="xlf:attrType_typeForMrk"/> - <xs:attribute name="ref" use="optional" type="xs:anyURI"/> - <xs:attribute name="value" use="optional"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="sm"> - <!-- Start Annotation Marker --> - <xs:complexType mixed="false"> - <xs:attribute name="id" use="required" type="xs:NMTOKEN"/> - <xs:attribute name="translate" use="optional" type="xlf:yesNo"/> - <xs:attribute name="type" use="optional" type="xlf:attrType_typeForMrk"/> - <xs:attribute name="ref" use="optional" type="xs:anyURI"/> - <xs:attribute name="value" use="optional"/> - <xs:anyAttribute namespace="##other" processContents="lax"/> - </xs:complexType> - </xs:element> - - <xs:element name="em"> - <!-- End Annotation Marker --> - <xs:complexType mixed="false"> - <xs:attribute name="startRef" use="required" type="xs:NMTOKEN"/> - </xs:complexType> - </xs:element> - -</xs:schema> diff --git a/vendor/symfony/translation/Resources/schemas/xml.xsd b/vendor/symfony/translation/Resources/schemas/xml.xsd deleted file mode 100644 index a46162a..0000000 --- a/vendor/symfony/translation/Resources/schemas/xml.xsd +++ /dev/null @@ -1,309 +0,0 @@ -<?xml version='1.0'?> -<?xml-stylesheet href="../2008/09/xsd.xsl" type="text/xsl"?> -<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns ="http://www.w3.org/1999/xhtml" - xml:lang="en"> - - <xs:annotation> - <xs:documentation> - <div> - <h1>About the XML namespace</h1> - - <div class="bodytext"> - <p> - - This schema document describes the XML namespace, in a form - suitable for import by other schema documents. - </p> - <p> - See <a href="http://www.w3.org/XML/1998/namespace.html"> - http://www.w3.org/XML/1998/namespace.html</a> and - <a href="http://www.w3.org/TR/REC-xml"> - http://www.w3.org/TR/REC-xml</a> for information - about this namespace. - </p> - - <p> - Note that local names in this namespace are intended to be - defined only by the World Wide Web Consortium or its subgroups. - The names currently defined in this namespace are listed below. - They should not be used with conflicting semantics by any Working - Group, specification, or document instance. - </p> - <p> - See further below in this document for more information about <a - href="#usage">how to refer to this schema document from your own - XSD schema documents</a> and about <a href="#nsversioning">the - namespace-versioning policy governing this schema document</a>. - </p> - </div> - </div> - - </xs:documentation> - </xs:annotation> - - <xs:attribute name="lang"> - <xs:annotation> - <xs:documentation> - <div> - - <h3>lang (as an attribute name)</h3> - <p> - - denotes an attribute whose value - is a language code for the natural language of the content of - any element; its value is inherited. This name is reserved - by virtue of its definition in the XML specification.</p> - - </div> - <div> - <h4>Notes</h4> - <p> - Attempting to install the relevant ISO 2- and 3-letter - codes as the enumerated possible values is probably never - going to be a realistic possibility. - </p> - <p> - - See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"> - http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a> - and the IANA language subtag registry at - <a href="http://www.iana.org/assignments/language-subtag-registry"> - http://www.iana.org/assignments/language-subtag-registry</a> - for further information. - </p> - <p> - - The union allows for the 'un-declaration' of xml:lang with - the empty string. - </p> - </div> - </xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:union memberTypes="xs:language"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:enumeration value=""/> - - </xs:restriction> - </xs:simpleType> - </xs:union> - </xs:simpleType> - </xs:attribute> - - <xs:attribute name="space"> - <xs:annotation> - <xs:documentation> - - <div> - - <h3>space (as an attribute name)</h3> - <p> - denotes an attribute whose - value is a keyword indicating what whitespace processing - discipline is intended for the content of the element; its - value is inherited. This name is reserved by virtue of its - definition in the XML specification.</p> - - </div> - </xs:documentation> - </xs:annotation> - <xs:simpleType> - - <xs:restriction base="xs:NCName"> - <xs:enumeration value="default"/> - <xs:enumeration value="preserve"/> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - - <xs:attribute name="base" type="xs:anyURI"> <xs:annotation> - <xs:documentation> - - <div> - - <h3>base (as an attribute name)</h3> - <p> - denotes an attribute whose value - provides a URI to be used as the base for interpreting any - relative URIs in the scope of the element on which it - appears; its value is inherited. This name is reserved - by virtue of its definition in the XML Base specification.</p> - - <p> - See <a - href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a> - for information about this attribute. - </p> - - </div> - </xs:documentation> - </xs:annotation> - </xs:attribute> - - <xs:attribute name="id" type="xs:ID"> - <xs:annotation> - <xs:documentation> - <div> - - <h3>id (as an attribute name)</h3> - <p> - - denotes an attribute whose value - should be interpreted as if declared to be of type ID. - This name is reserved by virtue of its definition in the - xml:id specification.</p> - - <p> - See <a - href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a> - for information about this attribute. - </p> - </div> - </xs:documentation> - </xs:annotation> - - </xs:attribute> - - <xs:attributeGroup name="specialAttrs"> - <xs:attribute ref="xml:base"/> - <xs:attribute ref="xml:lang"/> - <xs:attribute ref="xml:space"/> - <xs:attribute ref="xml:id"/> - </xs:attributeGroup> - - <xs:annotation> - - <xs:documentation> - <div> - - <h3>Father (in any context at all)</h3> - - <div class="bodytext"> - <p> - denotes Jon Bosak, the chair of - the original XML Working Group. This name is reserved by - the following decision of the W3C XML Plenary and - XML Coordination groups: - </p> - <blockquote> - <p> - - In appreciation for his vision, leadership and - dedication the W3C XML Plenary on this 10th day of - February, 2000, reserves for Jon Bosak in perpetuity - the XML name "xml:Father". - </p> - </blockquote> - </div> - </div> - </xs:documentation> - </xs:annotation> - - <xs:annotation> - <xs:documentation> - - <div xml:id="usage" id="usage"> - <h2><a name="usage">About this schema document</a></h2> - - <div class="bodytext"> - <p> - This schema defines attributes and an attribute group suitable - for use by schemas wishing to allow <code>xml:base</code>, - <code>xml:lang</code>, <code>xml:space</code> or - <code>xml:id</code> attributes on elements they define. - </p> - - <p> - To enable this, such a schema must import this schema for - the XML namespace, e.g. as follows: - </p> - <pre> - &lt;schema.. .> - .. . - &lt;import namespace="http://www.w3.org/XML/1998/namespace" - schemaLocation="http://www.w3.org/2001/xml.xsd"/> - </pre> - <p> - or - </p> - <pre> - - &lt;import namespace="http://www.w3.org/XML/1998/namespace" - schemaLocation="http://www.w3.org/2009/01/xml.xsd"/> - </pre> - <p> - Subsequently, qualified reference to any of the attributes or the - group defined below will have the desired effect, e.g. - </p> - <pre> - &lt;type.. .> - .. . - &lt;attributeGroup ref="xml:specialAttrs"/> - </pre> - <p> - will define a type which will schema-validate an instance element - with any of those attributes. - </p> - - </div> - </div> - </xs:documentation> - </xs:annotation> - - <xs:annotation> - <xs:documentation> - <div id="nsversioning" xml:id="nsversioning"> - <h2><a name="nsversioning">Versioning policy for this schema document</a></h2> - - <div class="bodytext"> - <p> - In keeping with the XML Schema WG's standard versioning - policy, this schema document will persist at - <a href="http://www.w3.org/2009/01/xml.xsd"> - http://www.w3.org/2009/01/xml.xsd</a>. - </p> - <p> - At the date of issue it can also be found at - <a href="http://www.w3.org/2001/xml.xsd"> - http://www.w3.org/2001/xml.xsd</a>. - </p> - - <p> - The schema document at that URI may however change in the future, - in order to remain compatible with the latest version of XML - Schema itself, or with the XML namespace itself. In other words, - if the XML Schema or XML namespaces change, the version of this - document at <a href="http://www.w3.org/2001/xml.xsd"> - http://www.w3.org/2001/xml.xsd - </a> - will change accordingly; the version at - <a href="http://www.w3.org/2009/01/xml.xsd"> - http://www.w3.org/2009/01/xml.xsd - </a> - will not change. - </p> - <p> - - Previous dated (and unchanging) versions of this schema - document are at: - </p> - <ul> - <li><a href="http://www.w3.org/2009/01/xml.xsd"> - http://www.w3.org/2009/01/xml.xsd</a></li> - <li><a href="http://www.w3.org/2007/08/xml.xsd"> - http://www.w3.org/2007/08/xml.xsd</a></li> - <li><a href="http://www.w3.org/2004/10/xml.xsd"> - - http://www.w3.org/2004/10/xml.xsd</a></li> - <li><a href="http://www.w3.org/2001/03/xml.xsd"> - http://www.w3.org/2001/03/xml.xsd</a></li> - </ul> - </div> - </div> - </xs:documentation> - </xs:annotation> - -</xs:schema> diff --git a/vendor/symfony/translation/Test/ProviderFactoryTestCase.php b/vendor/symfony/translation/Test/ProviderFactoryTestCase.php deleted file mode 100644 index b843814..0000000 --- a/vendor/symfony/translation/Test/ProviderFactoryTestCase.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Test; - -use PHPUnit\Framework\TestCase; -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\MockHttpClient; -use Symfony\Component\Translation\Dumper\XliffFileDumper; -use Symfony\Component\Translation\Exception\IncompleteDsnException; -use Symfony\Component\Translation\Exception\UnsupportedSchemeException; -use Symfony\Component\Translation\Loader\LoaderInterface; -use Symfony\Component\Translation\Provider\Dsn; -use Symfony\Component\Translation\Provider\ProviderFactoryInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * A test case to ease testing a translation provider factory. - * - * @author Mathieu Santostefano <msantostefano@protonmail.com> - * - * @internal - */ -abstract class ProviderFactoryTestCase extends TestCase -{ - protected $client; - protected $logger; - protected $defaultLocale; - protected $loader; - protected $xliffFileDumper; - - abstract public function createFactory(): ProviderFactoryInterface; - - /** - * @return iterable<array{0: bool, 1: string}> - */ - abstract public static function supportsProvider(): iterable; - - /** - * @return iterable<array{0: string, 1: string}> - */ - abstract public static function createProvider(): iterable; - - /** - * @return iterable<array{0: string, 1: string|null}> - */ - public static function unsupportedSchemeProvider(): iterable - { - return []; - } - - /** - * @return iterable<array{0: string, 1: string|null}> - */ - public static function incompleteDsnProvider(): iterable - { - return []; - } - - /** - * @dataProvider supportsProvider - */ - public function testSupports(bool $expected, string $dsn) - { - $factory = $this->createFactory(); - - $this->assertSame($expected, $factory->supports(new Dsn($dsn))); - } - - /** - * @dataProvider createProvider - */ - public function testCreate(string $expected, string $dsn) - { - $factory = $this->createFactory(); - $provider = $factory->create(new Dsn($dsn)); - - $this->assertSame($expected, (string) $provider); - } - - /** - * @dataProvider unsupportedSchemeProvider - */ - public function testUnsupportedSchemeException(string $dsn, ?string $message = null) - { - $factory = $this->createFactory(); - - $dsn = new Dsn($dsn); - - $this->expectException(UnsupportedSchemeException::class); - if (null !== $message) { - $this->expectExceptionMessage($message); - } - - $factory->create($dsn); - } - - /** - * @dataProvider incompleteDsnProvider - */ - public function testIncompleteDsnException(string $dsn, ?string $message = null) - { - $factory = $this->createFactory(); - - $dsn = new Dsn($dsn); - - $this->expectException(IncompleteDsnException::class); - if (null !== $message) { - $this->expectExceptionMessage($message); - } - - $factory->create($dsn); - } - - protected function getClient(): HttpClientInterface - { - return $this->client ?? $this->client = new MockHttpClient(); - } - - protected function getLogger(): LoggerInterface - { - return $this->logger ?? $this->logger = $this->createMock(LoggerInterface::class); - } - - protected function getDefaultLocale(): string - { - return $this->defaultLocale ?? $this->defaultLocale = 'en'; - } - - protected function getLoader(): LoaderInterface - { - return $this->loader ?? $this->loader = $this->createMock(LoaderInterface::class); - } - - protected function getXliffFileDumper(): XliffFileDumper - { - return $this->xliffFileDumper ?? $this->xliffFileDumper = $this->createMock(XliffFileDumper::class); - } -} diff --git a/vendor/symfony/translation/Test/ProviderTestCase.php b/vendor/symfony/translation/Test/ProviderTestCase.php deleted file mode 100644 index cb8a03f..0000000 --- a/vendor/symfony/translation/Test/ProviderTestCase.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Test; - -use PHPUnit\Framework\TestCase; -use Psr\Log\LoggerInterface; -use Symfony\Component\HttpClient\MockHttpClient; -use Symfony\Component\Translation\Dumper\XliffFileDumper; -use Symfony\Component\Translation\Loader\LoaderInterface; -use Symfony\Component\Translation\Provider\ProviderInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; - -/** - * A test case to ease testing a translation provider. - * - * @author Mathieu Santostefano <msantostefano@protonmail.com> - * - * @internal - */ -abstract class ProviderTestCase extends TestCase -{ - protected $client; - protected $logger; - protected $defaultLocale; - protected $loader; - protected $xliffFileDumper; - - abstract public static function createProvider(HttpClientInterface $client, LoaderInterface $loader, LoggerInterface $logger, string $defaultLocale, string $endpoint): ProviderInterface; - - /** - * @return iterable<array{0: ProviderInterface, 1: string}> - */ - abstract public static function toStringProvider(): iterable; - - /** - * @dataProvider toStringProvider - */ - public function testToString(ProviderInterface $provider, string $expected) - { - $this->assertSame($expected, (string) $provider); - } - - protected function getClient(): MockHttpClient - { - return $this->client ?? $this->client = new MockHttpClient(); - } - - protected function getLoader(): LoaderInterface - { - return $this->loader ?? $this->loader = $this->createMock(LoaderInterface::class); - } - - protected function getLogger(): LoggerInterface - { - return $this->logger ?? $this->logger = $this->createMock(LoggerInterface::class); - } - - protected function getDefaultLocale(): string - { - return $this->defaultLocale ?? $this->defaultLocale = 'en'; - } - - protected function getXliffFileDumper(): XliffFileDumper - { - return $this->xliffFileDumper ?? $this->xliffFileDumper = $this->createMock(XliffFileDumper::class); - } -} diff --git a/vendor/symfony/translation/TranslatableMessage.php b/vendor/symfony/translation/TranslatableMessage.php deleted file mode 100644 index 4e53d60..0000000 --- a/vendor/symfony/translation/TranslatableMessage.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Contracts\Translation\TranslatableInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -/** - * @author Nate Wiebe <nate@northern.co> - */ -class TranslatableMessage implements TranslatableInterface -{ - private $message; - private $parameters; - private $domain; - - public function __construct(string $message, array $parameters = [], ?string $domain = null) - { - $this->message = $message; - $this->parameters = $parameters; - $this->domain = $domain; - } - - public function __toString(): string - { - return $this->getMessage(); - } - - public function getMessage(): string - { - return $this->message; - } - - public function getParameters(): array - { - return $this->parameters; - } - - public function getDomain(): ?string - { - return $this->domain; - } - - public function trans(TranslatorInterface $translator, ?string $locale = null): string - { - return $translator->trans($this->getMessage(), array_map( - static function ($parameter) use ($translator, $locale) { - return $parameter instanceof TranslatableInterface ? $parameter->trans($translator, $locale) : $parameter; - }, - $this->getParameters() - ), $this->getDomain(), $locale); - } -} diff --git a/vendor/symfony/translation/Translator.php b/vendor/symfony/translation/Translator.php deleted file mode 100644 index 9270e51..0000000 --- a/vendor/symfony/translation/Translator.php +++ /dev/null @@ -1,494 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Component\Config\ConfigCacheFactory; -use Symfony\Component\Config\ConfigCacheFactoryInterface; -use Symfony\Component\Config\ConfigCacheInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Exception\NotFoundResourceException; -use Symfony\Component\Translation\Exception\RuntimeException; -use Symfony\Component\Translation\Formatter\IntlFormatterInterface; -use Symfony\Component\Translation\Formatter\MessageFormatter; -use Symfony\Component\Translation\Formatter\MessageFormatterInterface; -use Symfony\Component\Translation\Loader\LoaderInterface; -use Symfony\Contracts\Translation\LocaleAwareInterface; -use Symfony\Contracts\Translation\TranslatorInterface; - -// Help opcache.preload discover always-needed symbols -class_exists(MessageCatalogue::class); - -/** - * @author Fabien Potencier <fabien@symfony.com> - */ -class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleAwareInterface -{ - /** - * @var MessageCatalogueInterface[] - */ - protected $catalogues = []; - - /** - * @var string - */ - private $locale; - - /** - * @var string[] - */ - private $fallbackLocales = []; - - /** - * @var LoaderInterface[] - */ - private $loaders = []; - - /** - * @var array - */ - private $resources = []; - - /** - * @var MessageFormatterInterface - */ - private $formatter; - - /** - * @var string - */ - private $cacheDir; - - /** - * @var bool - */ - private $debug; - - private $cacheVary; - - /** - * @var ConfigCacheFactoryInterface|null - */ - private $configCacheFactory; - - /** - * @var array|null - */ - private $parentLocales; - - private $hasIntlFormatter; - - /** - * @throws InvalidArgumentException If a locale contains invalid characters - */ - public function __construct(string $locale, ?MessageFormatterInterface $formatter = null, ?string $cacheDir = null, bool $debug = false, array $cacheVary = []) - { - $this->setLocale($locale); - - if (null === $formatter) { - $formatter = new MessageFormatter(); - } - - $this->formatter = $formatter; - $this->cacheDir = $cacheDir; - $this->debug = $debug; - $this->cacheVary = $cacheVary; - $this->hasIntlFormatter = $formatter instanceof IntlFormatterInterface; - } - - public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) - { - $this->configCacheFactory = $configCacheFactory; - } - - /** - * Adds a Loader. - * - * @param string $format The name of the loader (@see addResource()) - */ - public function addLoader(string $format, LoaderInterface $loader) - { - $this->loaders[$format] = $loader; - } - - /** - * Adds a Resource. - * - * @param string $format The name of the loader (@see addLoader()) - * @param mixed $resource The resource name - * - * @throws InvalidArgumentException If the locale contains invalid characters - */ - public function addResource(string $format, $resource, string $locale, ?string $domain = null) - { - if (null === $domain) { - $domain = 'messages'; - } - - $this->assertValidLocale($locale); - $locale ?: $locale = class_exists(\Locale::class) ? \Locale::getDefault() : 'en'; - - $this->resources[$locale][] = [$format, $resource, $domain]; - - if (\in_array($locale, $this->fallbackLocales)) { - $this->catalogues = []; - } else { - unset($this->catalogues[$locale]); - } - } - - /** - * {@inheritdoc} - */ - public function setLocale(string $locale) - { - $this->assertValidLocale($locale); - $this->locale = $locale; - } - - /** - * {@inheritdoc} - */ - public function getLocale() - { - return $this->locale ?: (class_exists(\Locale::class) ? \Locale::getDefault() : 'en'); - } - - /** - * Sets the fallback locales. - * - * @param string[] $locales - * - * @throws InvalidArgumentException If a locale contains invalid characters - */ - public function setFallbackLocales(array $locales) - { - // needed as the fallback locales are linked to the already loaded catalogues - $this->catalogues = []; - - foreach ($locales as $locale) { - $this->assertValidLocale($locale); - } - - $this->fallbackLocales = $this->cacheVary['fallback_locales'] = $locales; - } - - /** - * Gets the fallback locales. - * - * @internal - */ - public function getFallbackLocales(): array - { - return $this->fallbackLocales; - } - - /** - * {@inheritdoc} - */ - public function trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) - { - if (null === $id || '' === $id) { - return ''; - } - - if (null === $domain) { - $domain = 'messages'; - } - - $catalogue = $this->getCatalogue($locale); - $locale = $catalogue->getLocale(); - while (!$catalogue->defines($id, $domain)) { - if ($cat = $catalogue->getFallbackCatalogue()) { - $catalogue = $cat; - $locale = $catalogue->getLocale(); - } else { - break; - } - } - - $len = \strlen(MessageCatalogue::INTL_DOMAIN_SUFFIX); - if ($this->hasIntlFormatter - && ($catalogue->defines($id, $domain.MessageCatalogue::INTL_DOMAIN_SUFFIX) - || (\strlen($domain) > $len && 0 === substr_compare($domain, MessageCatalogue::INTL_DOMAIN_SUFFIX, -$len, $len))) - ) { - return $this->formatter->formatIntl($catalogue->get($id, $domain), $locale, $parameters); - } - - return $this->formatter->format($catalogue->get($id, $domain), $locale, $parameters); - } - - /** - * {@inheritdoc} - */ - public function getCatalogue(?string $locale = null) - { - if (!$locale) { - $locale = $this->getLocale(); - } else { - $this->assertValidLocale($locale); - } - - if (!isset($this->catalogues[$locale])) { - $this->loadCatalogue($locale); - } - - return $this->catalogues[$locale]; - } - - /** - * {@inheritdoc} - */ - public function getCatalogues(): array - { - return array_values($this->catalogues); - } - - /** - * Gets the loaders. - * - * @return LoaderInterface[] - */ - protected function getLoaders() - { - return $this->loaders; - } - - protected function loadCatalogue(string $locale) - { - if (null === $this->cacheDir) { - $this->initializeCatalogue($locale); - } else { - $this->initializeCacheCatalogue($locale); - } - } - - protected function initializeCatalogue(string $locale) - { - $this->assertValidLocale($locale); - - try { - $this->doLoadCatalogue($locale); - } catch (NotFoundResourceException $e) { - if (!$this->computeFallbackLocales($locale)) { - throw $e; - } - } - $this->loadFallbackCatalogues($locale); - } - - private function initializeCacheCatalogue(string $locale): void - { - if (isset($this->catalogues[$locale])) { - /* Catalogue already initialized. */ - return; - } - - $this->assertValidLocale($locale); - $cache = $this->getConfigCacheFactory()->cache($this->getCatalogueCachePath($locale), - function (ConfigCacheInterface $cache) use ($locale) { - $this->dumpCatalogue($locale, $cache); - } - ); - - if (isset($this->catalogues[$locale])) { - /* Catalogue has been initialized as it was written out to cache. */ - return; - } - - /* Read catalogue from cache. */ - $this->catalogues[$locale] = include $cache->getPath(); - } - - private function dumpCatalogue(string $locale, ConfigCacheInterface $cache): void - { - $this->initializeCatalogue($locale); - $fallbackContent = $this->getFallbackContent($this->catalogues[$locale]); - - $content = sprintf(<<<EOF -<?php - -use Symfony\Component\Translation\MessageCatalogue; - -\$catalogue = new MessageCatalogue('%s', %s); - -%s -return \$catalogue; - -EOF - , - $locale, - var_export($this->getAllMessages($this->catalogues[$locale]), true), - $fallbackContent - ); - - $cache->write($content, $this->catalogues[$locale]->getResources()); - } - - private function getFallbackContent(MessageCatalogue $catalogue): string - { - $fallbackContent = ''; - $current = ''; - $replacementPattern = '/[^a-z0-9_]/i'; - $fallbackCatalogue = $catalogue->getFallbackCatalogue(); - while ($fallbackCatalogue) { - $fallback = $fallbackCatalogue->getLocale(); - $fallbackSuffix = ucfirst(preg_replace($replacementPattern, '_', $fallback)); - $currentSuffix = ucfirst(preg_replace($replacementPattern, '_', $current)); - - $fallbackContent .= sprintf(<<<'EOF' -$catalogue%s = new MessageCatalogue('%s', %s); -$catalogue%s->addFallbackCatalogue($catalogue%s); - -EOF - , - $fallbackSuffix, - $fallback, - var_export($this->getAllMessages($fallbackCatalogue), true), - $currentSuffix, - $fallbackSuffix - ); - $current = $fallbackCatalogue->getLocale(); - $fallbackCatalogue = $fallbackCatalogue->getFallbackCatalogue(); - } - - return $fallbackContent; - } - - private function getCatalogueCachePath(string $locale): string - { - return $this->cacheDir.'/catalogue.'.$locale.'.'.strtr(substr(base64_encode(hash('sha256', serialize($this->cacheVary), true)), 0, 7), '/', '_').'.php'; - } - - /** - * @internal - */ - protected function doLoadCatalogue(string $locale): void - { - $this->catalogues[$locale] = new MessageCatalogue($locale); - - if (isset($this->resources[$locale])) { - foreach ($this->resources[$locale] as $resource) { - if (!isset($this->loaders[$resource[0]])) { - if (\is_string($resource[1])) { - throw new RuntimeException(sprintf('No loader is registered for the "%s" format when loading the "%s" resource.', $resource[0], $resource[1])); - } - - throw new RuntimeException(sprintf('No loader is registered for the "%s" format.', $resource[0])); - } - $this->catalogues[$locale]->addCatalogue($this->loaders[$resource[0]]->load($resource[1], $locale, $resource[2])); - } - } - } - - private function loadFallbackCatalogues(string $locale): void - { - $current = $this->catalogues[$locale]; - - foreach ($this->computeFallbackLocales($locale) as $fallback) { - if (!isset($this->catalogues[$fallback])) { - $this->initializeCatalogue($fallback); - } - - $fallbackCatalogue = new MessageCatalogue($fallback, $this->getAllMessages($this->catalogues[$fallback])); - foreach ($this->catalogues[$fallback]->getResources() as $resource) { - $fallbackCatalogue->addResource($resource); - } - $current->addFallbackCatalogue($fallbackCatalogue); - $current = $fallbackCatalogue; - } - } - - protected function computeFallbackLocales(string $locale) - { - if (null === $this->parentLocales) { - $this->parentLocales = json_decode(file_get_contents(__DIR__.'/Resources/data/parents.json'), true); - } - - $originLocale = $locale; - $locales = []; - - while ($locale) { - $parent = $this->parentLocales[$locale] ?? null; - - if ($parent) { - $locale = 'root' !== $parent ? $parent : null; - } elseif (\function_exists('locale_parse')) { - $localeSubTags = locale_parse($locale); - $locale = null; - if (1 < \count($localeSubTags)) { - array_pop($localeSubTags); - $locale = locale_compose($localeSubTags) ?: null; - } - } elseif ($i = strrpos($locale, '_') ?: strrpos($locale, '-')) { - $locale = substr($locale, 0, $i); - } else { - $locale = null; - } - - if (null !== $locale) { - $locales[] = $locale; - } - } - - foreach ($this->fallbackLocales as $fallback) { - if ($fallback === $originLocale) { - continue; - } - - $locales[] = $fallback; - } - - return array_unique($locales); - } - - /** - * Asserts that the locale is valid, throws an Exception if not. - * - * @throws InvalidArgumentException If the locale contains invalid characters - */ - protected function assertValidLocale(string $locale) - { - if (!preg_match('/^[a-z0-9@_\\.\\-]*$/i', $locale)) { - throw new InvalidArgumentException(sprintf('Invalid "%s" locale.', $locale)); - } - } - - /** - * Provides the ConfigCache factory implementation, falling back to a - * default implementation if necessary. - */ - private function getConfigCacheFactory(): ConfigCacheFactoryInterface - { - if (!$this->configCacheFactory) { - $this->configCacheFactory = new ConfigCacheFactory($this->debug); - } - - return $this->configCacheFactory; - } - - private function getAllMessages(MessageCatalogueInterface $catalogue): array - { - $allMessages = []; - - foreach ($catalogue->all() as $domain => $messages) { - if ($intlMessages = $catalogue->all($domain.MessageCatalogue::INTL_DOMAIN_SUFFIX)) { - $allMessages[$domain.MessageCatalogue::INTL_DOMAIN_SUFFIX] = $intlMessages; - $messages = array_diff_key($messages, $intlMessages); - } - if ($messages) { - $allMessages[$domain] = $messages; - } - } - - return $allMessages; - } -} diff --git a/vendor/symfony/translation/TranslatorBag.php b/vendor/symfony/translation/TranslatorBag.php deleted file mode 100644 index c8ae1a2..0000000 --- a/vendor/symfony/translation/TranslatorBag.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Component\Translation\Catalogue\AbstractOperation; -use Symfony\Component\Translation\Catalogue\TargetOperation; - -final class TranslatorBag implements TranslatorBagInterface -{ - /** @var MessageCatalogue[] */ - private $catalogues = []; - - public function addCatalogue(MessageCatalogue $catalogue): void - { - if (null !== $existingCatalogue = $this->getCatalogue($catalogue->getLocale())) { - $catalogue->addCatalogue($existingCatalogue); - } - - $this->catalogues[$catalogue->getLocale()] = $catalogue; - } - - public function addBag(TranslatorBagInterface $bag): void - { - foreach ($bag->getCatalogues() as $catalogue) { - $this->addCatalogue($catalogue); - } - } - - /** - * {@inheritdoc} - */ - public function getCatalogue(?string $locale = null): MessageCatalogueInterface - { - if (null === $locale || !isset($this->catalogues[$locale])) { - $this->catalogues[$locale] = new MessageCatalogue($locale); - } - - return $this->catalogues[$locale]; - } - - /** - * {@inheritdoc} - */ - public function getCatalogues(): array - { - return array_values($this->catalogues); - } - - public function diff(TranslatorBagInterface $diffBag): self - { - $diff = new self(); - - foreach ($this->catalogues as $locale => $catalogue) { - if (null === $diffCatalogue = $diffBag->getCatalogue($locale)) { - $diff->addCatalogue($catalogue); - - continue; - } - - $operation = new TargetOperation($diffCatalogue, $catalogue); - $operation->moveMessagesToIntlDomainsIfPossible(AbstractOperation::NEW_BATCH); - $newCatalogue = new MessageCatalogue($locale); - - foreach ($catalogue->getDomains() as $domain) { - $newCatalogue->add($operation->getNewMessages($domain), $domain); - } - - $diff->addCatalogue($newCatalogue); - } - - return $diff; - } - - public function intersect(TranslatorBagInterface $intersectBag): self - { - $diff = new self(); - - foreach ($this->catalogues as $locale => $catalogue) { - if (null === $intersectCatalogue = $intersectBag->getCatalogue($locale)) { - continue; - } - - $operation = new TargetOperation($catalogue, $intersectCatalogue); - $operation->moveMessagesToIntlDomainsIfPossible(AbstractOperation::OBSOLETE_BATCH); - $obsoleteCatalogue = new MessageCatalogue($locale); - - foreach ($operation->getDomains() as $domain) { - $obsoleteCatalogue->add( - array_diff($operation->getMessages($domain), $operation->getNewMessages($domain)), - $domain - ); - } - - $diff->addCatalogue($obsoleteCatalogue); - } - - return $diff; - } -} diff --git a/vendor/symfony/translation/TranslatorBagInterface.php b/vendor/symfony/translation/TranslatorBagInterface.php deleted file mode 100644 index 3fc3bda..0000000 --- a/vendor/symfony/translation/TranslatorBagInterface.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; - -/** - * TranslatorBagInterface. - * - * @method MessageCatalogueInterface[] getCatalogues() Returns all catalogues of the instance - * - * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> - */ -interface TranslatorBagInterface -{ - /** - * Gets the catalogue by locale. - * - * @param string|null $locale The locale or null to use the default - * - * @return MessageCatalogueInterface - * - * @throws InvalidArgumentException If the locale contains invalid characters - */ - public function getCatalogue(?string $locale = null); -} diff --git a/vendor/symfony/translation/Util/ArrayConverter.php b/vendor/symfony/translation/Util/ArrayConverter.php deleted file mode 100644 index cbab0c5..0000000 --- a/vendor/symfony/translation/Util/ArrayConverter.php +++ /dev/null @@ -1,144 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Util; - -/** - * ArrayConverter generates tree like structure from a message catalogue. - * e.g. this - * 'foo.bar1' => 'test1', - * 'foo.bar2' => 'test2' - * converts to follows: - * foo: - * bar1: test1 - * bar2: test2. - * - * @author Gennady Telegin <gtelegin@gmail.com> - */ -class ArrayConverter -{ - /** - * Converts linear messages array to tree-like array. - * For example this array('foo.bar' => 'value') will be converted to ['foo' => ['bar' => 'value']]. - * - * @param array $messages Linear messages array - * - * @return array - */ - public static function expandToTree(array $messages) - { - $tree = []; - - foreach ($messages as $id => $value) { - $referenceToElement = &self::getElementByPath($tree, self::getKeyParts($id)); - - $referenceToElement = $value; - - unset($referenceToElement); - } - - return $tree; - } - - private static function &getElementByPath(array &$tree, array $parts) - { - $elem = &$tree; - $parentOfElem = null; - - foreach ($parts as $i => $part) { - if (isset($elem[$part]) && \is_string($elem[$part])) { - /* Process next case: - * 'foo': 'test1', - * 'foo.bar': 'test2' - * - * $tree['foo'] was string before we found array {bar: test2}. - * Treat new element as string too, e.g. add $tree['foo.bar'] = 'test2'; - */ - $elem = &$elem[implode('.', \array_slice($parts, $i))]; - break; - } - - $parentOfElem = &$elem; - $elem = &$elem[$part]; - } - - if ($elem && \is_array($elem) && $parentOfElem) { - /* Process next case: - * 'foo.bar': 'test1' - * 'foo': 'test2' - * - * $tree['foo'] was array = {bar: 'test1'} before we found string constant `foo`. - * Cancel treating $tree['foo'] as array and cancel back it expansion, - * e.g. make it $tree['foo.bar'] = 'test1' again. - */ - self::cancelExpand($parentOfElem, $part, $elem); - } - - return $elem; - } - - private static function cancelExpand(array &$tree, string $prefix, array $node) - { - $prefix .= '.'; - - foreach ($node as $id => $value) { - if (\is_string($value)) { - $tree[$prefix.$id] = $value; - } else { - self::cancelExpand($tree, $prefix.$id, $value); - } - } - } - - /** - * @return string[] - */ - private static function getKeyParts(string $key): array - { - $parts = explode('.', $key); - $partsCount = \count($parts); - - $result = []; - $buffer = ''; - - foreach ($parts as $index => $part) { - if (0 === $index && '' === $part) { - $buffer = '.'; - - continue; - } - - if ($index === $partsCount - 1 && '' === $part) { - $buffer .= '.'; - $result[] = $buffer; - - continue; - } - - if (isset($parts[$index + 1]) && '' === $parts[$index + 1]) { - $buffer .= $part; - - continue; - } - - if ($buffer) { - $result[] = $buffer.$part; - $buffer = ''; - - continue; - } - - $result[] = $part; - } - - return $result; - } -} diff --git a/vendor/symfony/translation/Util/XliffUtils.php b/vendor/symfony/translation/Util/XliffUtils.php deleted file mode 100644 index e4373a7..0000000 --- a/vendor/symfony/translation/Util/XliffUtils.php +++ /dev/null @@ -1,196 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Util; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Exception\InvalidResourceException; - -/** - * Provides some utility methods for XLIFF translation files, such as validating - * their contents according to the XSD schema. - * - * @author Fabien Potencier <fabien@symfony.com> - */ -class XliffUtils -{ - /** - * Gets xliff file version based on the root "version" attribute. - * - * Defaults to 1.2 for backwards compatibility. - * - * @throws InvalidArgumentException - */ - public static function getVersionNumber(\DOMDocument $dom): string - { - /** @var \DOMNode $xliff */ - foreach ($dom->getElementsByTagName('xliff') as $xliff) { - $version = $xliff->attributes->getNamedItem('version'); - if ($version) { - return $version->nodeValue; - } - - $namespace = $xliff->attributes->getNamedItem('xmlns'); - if ($namespace) { - if (0 !== substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34)) { - throw new InvalidArgumentException(sprintf('Not a valid XLIFF namespace "%s".', $namespace)); - } - - return substr($namespace, 34); - } - } - - // Falls back to v1.2 - return '1.2'; - } - - /** - * Validates and parses the given file into a DOMDocument. - * - * @throws InvalidResourceException - */ - public static function validateSchema(\DOMDocument $dom): array - { - $xliffVersion = static::getVersionNumber($dom); - $internalErrors = libxml_use_internal_errors(true); - if ($shouldEnable = self::shouldEnableEntityLoader()) { - $disableEntities = libxml_disable_entity_loader(false); - } - try { - $isValid = @$dom->schemaValidateSource(self::getSchema($xliffVersion)); - if (!$isValid) { - return self::getXmlErrors($internalErrors); - } - } finally { - if ($shouldEnable) { - libxml_disable_entity_loader($disableEntities); - } - } - - $dom->normalizeDocument(); - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - - return []; - } - - private static function shouldEnableEntityLoader(): bool - { - // Version prior to 8.0 can be enabled without deprecation - if (\PHP_VERSION_ID < 80000) { - return true; - } - - static $dom, $schema; - if (null === $dom) { - $dom = new \DOMDocument(); - $dom->loadXML('<?xml version="1.0"?><test/>'); - - $tmpfile = tempnam(sys_get_temp_dir(), 'symfony'); - register_shutdown_function(static function () use ($tmpfile) { - @unlink($tmpfile); - }); - $schema = '<?xml version="1.0" encoding="utf-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <xsd:include schemaLocation="file:///'.str_replace('\\', '/', $tmpfile).'" /> -</xsd:schema>'; - file_put_contents($tmpfile, '<?xml version="1.0" encoding="utf-8"?> -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <xsd:element name="test" type="testType" /> - <xsd:complexType name="testType"/> -</xsd:schema>'); - } - - return !@$dom->schemaValidateSource($schema); - } - - public static function getErrorsAsString(array $xmlErrors): string - { - $errorsAsString = ''; - - foreach ($xmlErrors as $error) { - $errorsAsString .= sprintf("[%s %s] %s (in %s - line %d, column %d)\n", - \LIBXML_ERR_WARNING === $error['level'] ? 'WARNING' : 'ERROR', - $error['code'], - $error['message'], - $error['file'], - $error['line'], - $error['column'] - ); - } - - return $errorsAsString; - } - - private static function getSchema(string $xliffVersion): string - { - if ('1.2' === $xliffVersion) { - $schemaSource = file_get_contents(__DIR__.'/../Resources/schemas/xliff-core-1.2-strict.xsd'); - $xmlUri = 'http://www.w3.org/2001/xml.xsd'; - } elseif ('2.0' === $xliffVersion) { - $schemaSource = file_get_contents(__DIR__.'/../Resources/schemas/xliff-core-2.0.xsd'); - $xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd'; - } else { - throw new InvalidArgumentException(sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion)); - } - - return self::fixXmlLocation($schemaSource, $xmlUri); - } - - /** - * Internally changes the URI of a dependent xsd to be loaded locally. - */ - private static function fixXmlLocation(string $schemaSource, string $xmlUri): string - { - $newPath = str_replace('\\', '/', __DIR__).'/../Resources/schemas/xml.xsd'; - $parts = explode('/', $newPath); - $locationstart = 'file:///'; - if (0 === stripos($newPath, 'phar://')) { - $tmpfile = tempnam(sys_get_temp_dir(), 'symfony'); - if ($tmpfile) { - copy($newPath, $tmpfile); - $parts = explode('/', str_replace('\\', '/', $tmpfile)); - } else { - array_shift($parts); - $locationstart = 'phar:///'; - } - } - - $drive = '\\' === \DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; - $newPath = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts)); - - return str_replace($xmlUri, $newPath, $schemaSource); - } - - /** - * Returns the XML errors of the internal XML parser. - */ - private static function getXmlErrors(bool $internalErrors): array - { - $errors = []; - foreach (libxml_get_errors() as $error) { - $errors[] = [ - 'level' => \LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', - 'code' => $error->code, - 'message' => trim($error->message), - 'file' => $error->file ?: 'n/a', - 'line' => $error->line, - 'column' => $error->column, - ]; - } - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - - return $errors; - } -} diff --git a/vendor/symfony/translation/Writer/TranslationWriter.php b/vendor/symfony/translation/Writer/TranslationWriter.php deleted file mode 100644 index 96d608f..0000000 --- a/vendor/symfony/translation/Writer/TranslationWriter.php +++ /dev/null @@ -1,73 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Writer; - -use Symfony\Component\Translation\Dumper\DumperInterface; -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\Exception\RuntimeException; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * TranslationWriter writes translation messages. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -class TranslationWriter implements TranslationWriterInterface -{ - /** - * @var array<string, DumperInterface> - */ - private $dumpers = []; - - /** - * Adds a dumper to the writer. - */ - public function addDumper(string $format, DumperInterface $dumper) - { - $this->dumpers[$format] = $dumper; - } - - /** - * Obtains the list of supported formats. - * - * @return array - */ - public function getFormats() - { - return array_keys($this->dumpers); - } - - /** - * Writes translation from the catalogue according to the selected format. - * - * @param string $format The format to use to dump the messages - * @param array $options Options that are passed to the dumper - * - * @throws InvalidArgumentException - */ - public function write(MessageCatalogue $catalogue, string $format, array $options = []) - { - if (!isset($this->dumpers[$format])) { - throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format)); - } - - // get the right dumper - $dumper = $this->dumpers[$format]; - - if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) { - throw new RuntimeException(sprintf('Translation Writer was not able to create directory "%s".', $options['path'])); - } - - // save - $dumper->dump($catalogue, $options); - } -} diff --git a/vendor/symfony/translation/Writer/TranslationWriterInterface.php b/vendor/symfony/translation/Writer/TranslationWriterInterface.php deleted file mode 100644 index 4321309..0000000 --- a/vendor/symfony/translation/Writer/TranslationWriterInterface.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Writer; - -use Symfony\Component\Translation\Exception\InvalidArgumentException; -use Symfony\Component\Translation\MessageCatalogue; - -/** - * TranslationWriter writes translation messages. - * - * @author Michel Salib <michelsalib@hotmail.com> - */ -interface TranslationWriterInterface -{ - /** - * Writes translation from the catalogue according to the selected format. - * - * @param string $format The format to use to dump the messages - * @param array $options Options that are passed to the dumper - * - * @throws InvalidArgumentException - */ - public function write(MessageCatalogue $catalogue, string $format, array $options = []); -} diff --git a/vendor/symfony/translation/composer.json b/vendor/symfony/translation/composer.json deleted file mode 100644 index 5c9266b..0000000 --- a/vendor/symfony/translation/composer.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "symfony/translation", - "type": "library", - "description": "Provides tools to internationalize your application", - "keywords": [], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16", - "symfony/translation-contracts": "^2.3" - }, - "require-dev": { - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2.0|^3.0", - "symfony/http-kernel": "^5.0|^6.0", - "symfony/intl": "^4.4|^5.0|^6.0", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/service-contracts": "^1.1.2|^2|^3", - "symfony/yaml": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "psr/log": "^1|^2|^3" - }, - "conflict": { - "symfony/config": "<4.4", - "symfony/dependency-injection": "<5.0", - "symfony/http-kernel": "<5.0", - "symfony/twig-bundle": "<5.0", - "symfony/yaml": "<4.4", - "symfony/console": "<5.3" - }, - "provide": { - "symfony/translation-implementation": "2.3" - }, - "suggest": { - "symfony/config": "", - "symfony/yaml": "", - "psr/log-implementation": "To use logging capability in translator" - }, - "autoload": { - "files": [ "Resources/functions.php" ], - "psr-4": { "Symfony\\Component\\Translation\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/symfony/var-dumper/CHANGELOG.md b/vendor/symfony/var-dumper/CHANGELOG.md deleted file mode 100644 index 94b1c17..0000000 --- a/vendor/symfony/var-dumper/CHANGELOG.md +++ /dev/null @@ -1,53 +0,0 @@ -CHANGELOG -========= - -4.4.0 ------ - - * added `VarDumperTestTrait::setUpVarDumper()` and `VarDumperTestTrait::tearDownVarDumper()` - to configure casters & flags to use in tests - * added `ImagineCaster` and infrastructure to dump images - * added the stamps of a message after it is dispatched in `TraceableMessageBus` and `MessengerDataCollector` collected data - * added `UuidCaster` - * made all casters final - * added support for the `NO_COLOR` env var (https://no-color.org/) - -4.3.0 ------ - - * added `DsCaster` to support dumping the contents of data structures from the Ds extension - -4.2.0 ------ - - * support selecting the format to use by setting the environment variable `VAR_DUMPER_FORMAT` to `html` or `cli` - -4.1.0 ------ - - * added a `ServerDumper` to send serialized Data clones to a server - * added a `ServerDumpCommand` and `DumpServer` to run a server collecting - and displaying dumps on a single place with multiple formats support - * added `CliDescriptor` and `HtmlDescriptor` descriptors for `server:dump` CLI and HTML formats support - -4.0.0 ------ - - * support for passing `\ReflectionClass` instances to the `Caster::castObject()` - method has been dropped, pass class names as strings instead - * the `Data::getRawData()` method has been removed - * the `VarDumperTestTrait::assertDumpEquals()` method expects a 3rd `$filter = 0` - argument and moves `$message = ''` argument at 4th position. - * the `VarDumperTestTrait::assertDumpMatchesFormat()` method expects a 3rd `$filter = 0` - argument and moves `$message = ''` argument at 4th position. - -3.4.0 ------ - - * added `AbstractCloner::setMinDepth()` function to ensure minimum tree depth - * deprecated `MongoCaster` - -2.7.0 ------ - - * deprecated `Cloner\Data::getLimitedClone()`. Use `withMaxDepth`, `withMaxItemsPerDepth` or `withRefHandles` instead. diff --git a/vendor/symfony/var-dumper/Caster/AmqpCaster.php b/vendor/symfony/var-dumper/Caster/AmqpCaster.php deleted file mode 100644 index 60045ff..0000000 --- a/vendor/symfony/var-dumper/Caster/AmqpCaster.php +++ /dev/null @@ -1,212 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Amqp related classes to array representation. - * - * @author Grégoire Pineau <lyrixx@lyrixx.info> - * - * @final since Symfony 4.4 - */ -class AmqpCaster -{ - private const FLAGS = [ - \AMQP_DURABLE => 'AMQP_DURABLE', - \AMQP_PASSIVE => 'AMQP_PASSIVE', - \AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', - \AMQP_AUTODELETE => 'AMQP_AUTODELETE', - \AMQP_INTERNAL => 'AMQP_INTERNAL', - \AMQP_NOLOCAL => 'AMQP_NOLOCAL', - \AMQP_AUTOACK => 'AMQP_AUTOACK', - \AMQP_IFEMPTY => 'AMQP_IFEMPTY', - \AMQP_IFUNUSED => 'AMQP_IFUNUSED', - \AMQP_MANDATORY => 'AMQP_MANDATORY', - \AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', - \AMQP_MULTIPLE => 'AMQP_MULTIPLE', - \AMQP_NOWAIT => 'AMQP_NOWAIT', - \AMQP_REQUEUE => 'AMQP_REQUEUE', - ]; - - private const EXCHANGE_TYPES = [ - \AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', - \AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', - \AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', - \AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', - ]; - - public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPConnection\x00login"])) { - return $a; - } - - // BC layer in the amqp lib - if (method_exists($c, 'getReadTimeout')) { - $timeout = $c->getReadTimeout(); - } else { - $timeout = $c->getTimeout(); - } - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - $prefix.'login' => $c->getLogin(), - $prefix.'password' => $c->getPassword(), - $prefix.'host' => $c->getHost(), - $prefix.'vhost' => $c->getVhost(), - $prefix.'port' => $c->getPort(), - $prefix.'read_timeout' => $timeout, - ]; - - return $a; - } - - public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'is_connected' => $c->isConnected(), - $prefix.'channel_id' => $c->getChannelId(), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPChannel\x00connection"])) { - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'prefetch_size' => $c->getPrefetchSize(), - $prefix.'prefetch_count' => $c->getPrefetchCount(), - ]; - - return $a; - } - - public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'flags' => self::extractFlags($c->getFlags()), - ]; - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPQueue\x00name"])) { - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - $prefix.'name' => $c->getName(), - $prefix.'arguments' => $c->getArguments(), - ]; - - return $a; - } - - public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $a += [ - $prefix.'flags' => self::extractFlags($c->getFlags()), - ]; - - $type = isset(self::EXCHANGE_TYPES[$c->getType()]) ? new ConstStub(self::EXCHANGE_TYPES[$c->getType()], $c->getType()) : $c->getType(); - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPExchange\x00name"])) { - $a["\x00AMQPExchange\x00type"] = $type; - - return $a; - } - - $a += [ - $prefix.'connection' => $c->getConnection(), - $prefix.'channel' => $c->getChannel(), - $prefix.'name' => $c->getName(), - $prefix.'type' => $type, - $prefix.'arguments' => $c->getArguments(), - ]; - - return $a; - } - - public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - $deliveryMode = new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()); - - // Recent version of the extension already expose private properties - if (isset($a["\x00AMQPEnvelope\x00body"])) { - $a["\0AMQPEnvelope\0delivery_mode"] = $deliveryMode; - - return $a; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $a += [$prefix.'body' => $c->getBody()]; - } - - $a += [ - $prefix.'delivery_tag' => $c->getDeliveryTag(), - $prefix.'is_redelivery' => $c->isRedelivery(), - $prefix.'exchange_name' => $c->getExchangeName(), - $prefix.'routing_key' => $c->getRoutingKey(), - $prefix.'content_type' => $c->getContentType(), - $prefix.'content_encoding' => $c->getContentEncoding(), - $prefix.'headers' => $c->getHeaders(), - $prefix.'delivery_mode' => $deliveryMode, - $prefix.'priority' => $c->getPriority(), - $prefix.'correlation_id' => $c->getCorrelationId(), - $prefix.'reply_to' => $c->getReplyTo(), - $prefix.'expiration' => $c->getExpiration(), - $prefix.'message_id' => $c->getMessageId(), - $prefix.'timestamp' => $c->getTimeStamp(), - $prefix.'type' => $c->getType(), - $prefix.'user_id' => $c->getUserId(), - $prefix.'app_id' => $c->getAppId(), - ]; - - return $a; - } - - private static function extractFlags(int $flags): ConstStub - { - $flagsArray = []; - - foreach (self::FLAGS as $value => $name) { - if ($flags & $value) { - $flagsArray[] = $name; - } - } - - if (!$flagsArray) { - $flagsArray = ['AMQP_NOPARAM']; - } - - return new ConstStub(implode('|', $flagsArray), $flags); - } -} diff --git a/vendor/symfony/var-dumper/Caster/ArgsStub.php b/vendor/symfony/var-dumper/Caster/ArgsStub.php deleted file mode 100644 index b3f7bbe..0000000 --- a/vendor/symfony/var-dumper/Caster/ArgsStub.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a list of function arguments. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class ArgsStub extends EnumStub -{ - private static $parameters = []; - - public function __construct(array $args, string $function, ?string $class) - { - [$variadic, $params] = self::getParameters($function, $class); - - $values = []; - foreach ($args as $k => $v) { - $values[$k] = !\is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; - } - if (null === $params) { - parent::__construct($values, false); - - return; - } - if (\count($values) < \count($params)) { - $params = \array_slice($params, 0, \count($values)); - } elseif (\count($values) > \count($params)) { - $values[] = new EnumStub(array_splice($values, \count($params)), false); - $params[] = $variadic; - } - if (['...'] === $params) { - $this->dumpKeys = false; - $this->value = $values[0]->value; - } else { - $this->value = array_combine($params, $values); - } - } - - private static function getParameters(string $function, ?string $class): array - { - if (isset(self::$parameters[$k = $class.'::'.$function])) { - return self::$parameters[$k]; - } - - try { - $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); - } catch (\ReflectionException $e) { - return [null, null]; - } - - $variadic = '...'; - $params = []; - foreach ($r->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - if ($v->isVariadic()) { - $variadic .= $k; - } else { - $params[] = $k; - } - } - - return self::$parameters[$k] = [$variadic, $params]; - } -} diff --git a/vendor/symfony/var-dumper/Caster/Caster.php b/vendor/symfony/var-dumper/Caster/Caster.php deleted file mode 100644 index d35f323..0000000 --- a/vendor/symfony/var-dumper/Caster/Caster.php +++ /dev/null @@ -1,175 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Helper for filtering out properties in casters. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final - */ -class Caster -{ - public const EXCLUDE_VERBOSE = 1; - public const EXCLUDE_VIRTUAL = 2; - public const EXCLUDE_DYNAMIC = 4; - public const EXCLUDE_PUBLIC = 8; - public const EXCLUDE_PROTECTED = 16; - public const EXCLUDE_PRIVATE = 32; - public const EXCLUDE_NULL = 64; - public const EXCLUDE_EMPTY = 128; - public const EXCLUDE_NOT_IMPORTANT = 256; - public const EXCLUDE_STRICT = 512; - - public const PREFIX_VIRTUAL = "\0~\0"; - public const PREFIX_DYNAMIC = "\0+\0"; - public const PREFIX_PROTECTED = "\0*\0"; - - /** - * Casts objects to arrays and adds the dynamic property prefix. - * - * @param object $obj The object to cast - * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not - * - * @return array The array-cast of the object, with prefixed dynamic properties - */ - public static function castObject($obj, string $class, bool $hasDebugInfo = false, string $debugClass = null): array - { - if ($hasDebugInfo) { - try { - $debugInfo = $obj->__debugInfo(); - } catch (\Exception $e) { - // ignore failing __debugInfo() - $hasDebugInfo = false; - } - } - - $a = $obj instanceof \Closure ? [] : (array) $obj; - - if ($obj instanceof \__PHP_Incomplete_Class) { - return $a; - } - - if ($a) { - static $publicProperties = []; - $debugClass = $debugClass ?? get_debug_type($obj); - - $i = 0; - $prefixedKeys = []; - foreach ($a as $k => $v) { - if (isset($k[0]) ? "\0" !== $k[0] : \PHP_VERSION_ID >= 70200) { - if (!isset($publicProperties[$class])) { - foreach ((new \ReflectionClass($class))->getProperties(\ReflectionProperty::IS_PUBLIC) as $prop) { - $publicProperties[$class][$prop->name] = true; - } - } - if (!isset($publicProperties[$class][$k])) { - $prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k; - } - } elseif ($debugClass !== $class && 1 === strpos($k, $class)) { - $prefixedKeys[$i] = "\0".$debugClass.strrchr($k, "\0"); - } - ++$i; - } - if ($prefixedKeys) { - $keys = array_keys($a); - foreach ($prefixedKeys as $i => $k) { - $keys[$i] = $k; - } - $a = array_combine($keys, $a); - } - } - - if ($hasDebugInfo && \is_array($debugInfo)) { - foreach ($debugInfo as $k => $v) { - if (!isset($k[0]) || "\0" !== $k[0]) { - if (\array_key_exists(self::PREFIX_DYNAMIC.$k, $a)) { - continue; - } - $k = self::PREFIX_VIRTUAL.$k; - } - - unset($a[$k]); - $a[$k] = $v; - } - } - - return $a; - } - - /** - * Filters out the specified properties. - * - * By default, a single match in the $filter bit field filters properties out, following an "or" logic. - * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. - * - * @param array $a The array containing the properties to filter - * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out - * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set - * @param int &$count Set to the number of removed properties - * - * @return array The filtered array - */ - public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array - { - $count = 0; - - foreach ($a as $k => $v) { - $type = self::EXCLUDE_STRICT & $filter; - - if (null === $v) { - $type |= self::EXCLUDE_NULL & $filter; - $type |= self::EXCLUDE_EMPTY & $filter; - } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { - $type |= self::EXCLUDE_EMPTY & $filter; - } - if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_NOT_IMPORTANT; - } - if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) { - $type |= self::EXCLUDE_VERBOSE; - } - - if (!isset($k[1]) || "\0" !== $k[0]) { - $type |= self::EXCLUDE_PUBLIC & $filter; - } elseif ('~' === $k[1]) { - $type |= self::EXCLUDE_VIRTUAL & $filter; - } elseif ('+' === $k[1]) { - $type |= self::EXCLUDE_DYNAMIC & $filter; - } elseif ('*' === $k[1]) { - $type |= self::EXCLUDE_PROTECTED & $filter; - } else { - $type |= self::EXCLUDE_PRIVATE & $filter; - } - - if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { - unset($a[$k]); - ++$count; - } - } - - return $a; - } - - public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, Stub $stub, bool $isNested): array - { - if (isset($a['__PHP_Incomplete_Class_Name'])) { - $stub->class .= '('.$a['__PHP_Incomplete_Class_Name'].')'; - unset($a['__PHP_Incomplete_Class_Name']); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ClassStub.php b/vendor/symfony/var-dumper/Caster/ClassStub.php deleted file mode 100644 index 48f8483..0000000 --- a/vendor/symfony/var-dumper/Caster/ClassStub.php +++ /dev/null @@ -1,106 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a PHP class identifier. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class ClassStub extends ConstStub -{ - /** - * @param string $identifier A PHP identifier, e.g. a class, method, interface, etc. name - * @param callable $callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier - */ - public function __construct(string $identifier, $callable = null) - { - $this->value = $identifier; - - try { - if (null !== $callable) { - if ($callable instanceof \Closure) { - $r = new \ReflectionFunction($callable); - } elseif (\is_object($callable)) { - $r = [$callable, '__invoke']; - } elseif (\is_array($callable)) { - $r = $callable; - } elseif (false !== $i = strpos($callable, '::')) { - $r = [substr($callable, 0, $i), substr($callable, 2 + $i)]; - } else { - $r = new \ReflectionFunction($callable); - } - } elseif (0 < $i = strpos($identifier, '::') ?: strpos($identifier, '->')) { - $r = [substr($identifier, 0, $i), substr($identifier, 2 + $i)]; - } else { - $r = new \ReflectionClass($identifier); - } - - if (\is_array($r)) { - try { - $r = new \ReflectionMethod($r[0], $r[1]); - } catch (\ReflectionException $e) { - $r = new \ReflectionClass($r[0]); - } - } - - if (str_contains($identifier, "@anonymous\0")) { - $this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $identifier); - } - - if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) { - $s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true, Caster::EXCLUDE_VERBOSE); - $s = ReflectionCaster::getSignature($s); - - if (str_ends_with($identifier, '()')) { - $this->value = substr_replace($identifier, $s, -2); - } else { - $this->value .= $s; - } - } - } catch (\ReflectionException $e) { - return; - } finally { - if (0 < $i = strrpos($this->value, '\\')) { - $this->attr['ellipsis'] = \strlen($this->value) - $i; - $this->attr['ellipsis-type'] = 'class'; - $this->attr['ellipsis-tail'] = 1; - } - } - - if ($f = $r->getFileName()) { - $this->attr['file'] = $f; - $this->attr['line'] = $r->getStartLine(); - } - } - - public static function wrapCallable($callable) - { - if (\is_object($callable) || !\is_callable($callable)) { - return $callable; - } - - if (!\is_array($callable)) { - $callable = new static($callable, $callable); - } elseif (\is_string($callable[0])) { - $callable[0] = new static($callable[0], $callable); - } else { - $callable[1] = new static($callable[1], $callable); - } - - return $callable; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ConstStub.php b/vendor/symfony/var-dumper/Caster/ConstStub.php deleted file mode 100644 index 8b01797..0000000 --- a/vendor/symfony/var-dumper/Caster/ConstStub.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a PHP constant and its value. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class ConstStub extends Stub -{ - public function __construct(string $name, $value = null) - { - $this->class = $name; - $this->value = 1 < \func_num_args() ? $value : $name; - } - - /** - * @return string - */ - public function __toString() - { - return (string) $this->value; - } -} diff --git a/vendor/symfony/var-dumper/Caster/CutArrayStub.php b/vendor/symfony/var-dumper/Caster/CutArrayStub.php deleted file mode 100644 index 0e4fb36..0000000 --- a/vendor/symfony/var-dumper/Caster/CutArrayStub.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a cut array. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class CutArrayStub extends CutStub -{ - public $preservedSubset; - - public function __construct(array $value, array $preservedKeys) - { - parent::__construct($value); - - $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); - $this->cut -= \count($this->preservedSubset); - } -} diff --git a/vendor/symfony/var-dumper/Caster/CutStub.php b/vendor/symfony/var-dumper/Caster/CutStub.php deleted file mode 100644 index 464c6db..0000000 --- a/vendor/symfony/var-dumper/Caster/CutStub.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents the main properties of a PHP variable, pre-casted by a caster. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class CutStub extends Stub -{ - public function __construct($value) - { - $this->value = $value; - - switch (\gettype($value)) { - case 'object': - $this->type = self::TYPE_OBJECT; - $this->class = \get_class($value); - - if ($value instanceof \Closure) { - ReflectionCaster::castClosure($value, [], $this, true, Caster::EXCLUDE_VERBOSE); - } - - $this->cut = -1; - break; - - case 'array': - $this->type = self::TYPE_ARRAY; - $this->class = self::ARRAY_ASSOC; - $this->cut = $this->value = \count($value); - break; - - case 'resource': - case 'unknown type': - case 'resource (closed)': - $this->type = self::TYPE_RESOURCE; - $this->handle = (int) $value; - if ('Unknown' === $this->class = @get_resource_type($value)) { - $this->class = 'Closed'; - } - $this->cut = -1; - break; - - case 'string': - $this->type = self::TYPE_STRING; - $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; - $this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : mb_strlen($value, 'UTF-8'); - $this->value = ''; - break; - } - } -} diff --git a/vendor/symfony/var-dumper/Caster/DOMCaster.php b/vendor/symfony/var-dumper/Caster/DOMCaster.php deleted file mode 100644 index 5f2b9cd..0000000 --- a/vendor/symfony/var-dumper/Caster/DOMCaster.php +++ /dev/null @@ -1,304 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts DOM related classes to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class DOMCaster -{ - private const ERROR_CODES = [ - \DOM_PHP_ERR => 'DOM_PHP_ERR', - \DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', - \DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', - \DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', - \DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', - \DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', - \DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', - \DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', - \DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', - \DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', - \DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', - \DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', - \DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', - \DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', - \DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', - \DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', - \DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', - ]; - - private const NODE_TYPES = [ - \XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', - \XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', - \XML_TEXT_NODE => 'XML_TEXT_NODE', - \XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', - \XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', - \XML_ENTITY_NODE => 'XML_ENTITY_NODE', - \XML_PI_NODE => 'XML_PI_NODE', - \XML_COMMENT_NODE => 'XML_COMMENT_NODE', - \XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', - \XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', - \XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', - \XML_NOTATION_NODE => 'XML_NOTATION_NODE', - \XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', - \XML_DTD_NODE => 'XML_DTD_NODE', - \XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', - \XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', - \XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', - \XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', - ]; - - public static function castException(\DOMException $e, array $a, Stub $stub, $isNested) - { - $k = Caster::PREFIX_PROTECTED.'code'; - if (isset($a[$k], self::ERROR_CODES[$a[$k]])) { - $a[$k] = new ConstStub(self::ERROR_CODES[$a[$k]], $a[$k]); - } - - return $a; - } - - public static function castLength($dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'length' => $dom->length, - ]; - - return $a; - } - - public static function castImplementation($dom, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'Core' => '1.0', - Caster::PREFIX_VIRTUAL.'XML' => '2.0', - ]; - - return $a; - } - - public static function castNode(\DOMNode $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), - 'parentNode' => new CutStub($dom->parentNode), - 'childNodes' => $dom->childNodes, - 'firstChild' => new CutStub($dom->firstChild), - 'lastChild' => new CutStub($dom->lastChild), - 'previousSibling' => new CutStub($dom->previousSibling), - 'nextSibling' => new CutStub($dom->nextSibling), - 'attributes' => $dom->attributes, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'namespaceURI' => $dom->namespaceURI, - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'baseURI' => $dom->baseURI ? new LinkStub($dom->baseURI) : $dom->baseURI, - 'textContent' => new CutStub($dom->textContent), - ]; - - return $a; - } - - public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'nodeName' => $dom->nodeName, - 'nodeValue' => new CutStub($dom->nodeValue), - 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), - 'prefix' => $dom->prefix, - 'localName' => $dom->localName, - 'namespaceURI' => $dom->namespaceURI, - 'ownerDocument' => new CutStub($dom->ownerDocument), - 'parentNode' => new CutStub($dom->parentNode), - ]; - - return $a; - } - - public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += [ - 'doctype' => $dom->doctype, - 'implementation' => $dom->implementation, - 'documentElement' => new CutStub($dom->documentElement), - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'xmlEncoding' => $dom->xmlEncoding, - 'standalone' => $dom->standalone, - 'xmlStandalone' => $dom->xmlStandalone, - 'version' => $dom->version, - 'xmlVersion' => $dom->xmlVersion, - 'strictErrorChecking' => $dom->strictErrorChecking, - 'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI, - 'config' => $dom->config, - 'formatOutput' => $dom->formatOutput, - 'validateOnParse' => $dom->validateOnParse, - 'resolveExternals' => $dom->resolveExternals, - 'preserveWhiteSpace' => $dom->preserveWhiteSpace, - 'recover' => $dom->recover, - 'substituteEntities' => $dom->substituteEntities, - ]; - - if (!($filter & Caster::EXCLUDE_VERBOSE)) { - $formatOutput = $dom->formatOutput; - $dom->formatOutput = true; - $a += [Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()]; - $dom->formatOutput = $formatOutput; - } - - return $a; - } - - public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'data' => $dom->data, - 'length' => $dom->length, - ]; - - return $a; - } - - public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'name' => $dom->name, - 'specified' => $dom->specified, - 'value' => $dom->value, - 'ownerElement' => $dom->ownerElement, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ]; - - return $a; - } - - public static function castElement(\DOMElement $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'tagName' => $dom->tagName, - 'schemaTypeInfo' => $dom->schemaTypeInfo, - ]; - - return $a; - } - - public static function castText(\DOMText $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'wholeText' => $dom->wholeText, - ]; - - return $a; - } - - public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'typeName' => $dom->typeName, - 'typeNamespace' => $dom->typeNamespace, - ]; - - return $a; - } - - public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'severity' => $dom->severity, - 'message' => $dom->message, - 'type' => $dom->type, - 'relatedException' => $dom->relatedException, - 'related_data' => $dom->related_data, - 'location' => $dom->location, - ]; - - return $a; - } - - public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'lineNumber' => $dom->lineNumber, - 'columnNumber' => $dom->columnNumber, - 'offset' => $dom->offset, - 'relatedNode' => $dom->relatedNode, - 'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri, - ]; - - return $a; - } - - public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'name' => $dom->name, - 'entities' => $dom->entities, - 'notations' => $dom->notations, - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'internalSubset' => $dom->internalSubset, - ]; - - return $a; - } - - public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - ]; - - return $a; - } - - public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'publicId' => $dom->publicId, - 'systemId' => $dom->systemId, - 'notationName' => $dom->notationName, - 'actualEncoding' => $dom->actualEncoding, - 'encoding' => $dom->encoding, - 'version' => $dom->version, - ]; - - return $a; - } - - public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'target' => $dom->target, - 'data' => $dom->data, - ]; - - return $a; - } - - public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, $isNested) - { - $a += [ - 'document' => $dom->document, - ]; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/DateCaster.php b/vendor/symfony/var-dumper/Caster/DateCaster.php deleted file mode 100644 index e0309bc..0000000 --- a/vendor/symfony/var-dumper/Caster/DateCaster.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts DateTimeInterface related classes to array representation. - * - * @author Dany Maillard <danymaillard93b@gmail.com> - * - * @final since Symfony 4.4 - */ -class DateCaster -{ - private const PERIOD_LIMIT = 3; - - public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, $isNested, $filter) - { - $prefix = Caster::PREFIX_VIRTUAL; - $location = $d->getTimezone()->getLocation(); - $fromNow = (new \DateTime())->diff($d); - - $title = $d->format('l, F j, Y') - ."\n".self::formatInterval($fromNow).' from now' - .($location ? ($d->format('I') ? "\nDST On" : "\nDST Off") : '') - ; - - unset( - $a[Caster::PREFIX_DYNAMIC.'date'], - $a[Caster::PREFIX_DYNAMIC.'timezone'], - $a[Caster::PREFIX_DYNAMIC.'timezone_type'] - ); - $a[$prefix.'date'] = new ConstStub(self::formatDateTime($d, $location ? ' e (P)' : ' P'), $title); - - $stub->class .= $d->format(' @U'); - - return $a; - } - - public static function castInterval(\DateInterval $interval, array $a, Stub $stub, $isNested, $filter) - { - $now = new \DateTimeImmutable('@0', new \DateTimeZone('UTC')); - $numberOfSeconds = $now->add($interval)->getTimestamp() - $now->getTimestamp(); - $title = number_format($numberOfSeconds, 0, '.', ' ').'s'; - - $i = [Caster::PREFIX_VIRTUAL.'interval' => new ConstStub(self::formatInterval($interval), $title)]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $i : $i + $a; - } - - private static function formatInterval(\DateInterval $i): string - { - $format = '%R '; - - if (0 === $i->y && 0 === $i->m && ($i->h >= 24 || $i->i >= 60 || $i->s >= 60)) { - $d = new \DateTimeImmutable('@0', new \DateTimeZone('UTC')); - $i = $d->diff($d->add($i)); // recalculate carry over points - $format .= 0 < $i->days ? '%ad ' : ''; - } else { - $format .= ($i->y ? '%yy ' : '').($i->m ? '%mm ' : '').($i->d ? '%dd ' : ''); - } - - $format .= $i->h || $i->i || $i->s || $i->f ? '%H:%I:'.self::formatSeconds($i->s, substr($i->f, 2)) : ''; - $format = '%R ' === $format ? '0s' : $format; - - return $i->format(rtrim($format)); - } - - public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stub, $isNested, $filter) - { - $location = $timeZone->getLocation(); - $formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P'); - $title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : ''; - - $z = [Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title)]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $z : $z + $a; - } - - public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, $isNested, $filter) - { - $dates = []; - if (\PHP_VERSION_ID >= 70107) { // see https://bugs.php.net/74639 - foreach (clone $p as $i => $d) { - if (self::PERIOD_LIMIT === $i) { - $now = new \DateTimeImmutable('now', new \DateTimeZone('UTC')); - $dates[] = sprintf('%s more', ($end = $p->getEndDate()) - ? ceil(($end->format('U.u') - $d->format('U.u')) / ((int) $now->add($p->getDateInterval())->format('U.u') - (int) $now->format('U.u'))) - : $p->recurrences - $i - ); - break; - } - $dates[] = sprintf('%s) %s', $i + 1, self::formatDateTime($d)); - } - } - - $period = sprintf( - 'every %s, from %s%s %s', - self::formatInterval($p->getDateInterval()), - $p->include_start_date ? '[' : ']', - self::formatDateTime($p->getStartDate()), - ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end).(\PHP_VERSION_ID >= 80200 && $p->include_end_date ? ']' : '[') : 'recurring '.$p->recurrences.' time/s' - ); - - $p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))]; - - return $filter & Caster::EXCLUDE_VERBOSE ? $p : $p + $a; - } - - private static function formatDateTime(\DateTimeInterface $d, string $extra = ''): string - { - return $d->format('Y-m-d H:i:'.self::formatSeconds($d->format('s'), $d->format('u')).$extra); - } - - private static function formatSeconds(string $s, string $us): string - { - return sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us)); - } -} diff --git a/vendor/symfony/var-dumper/Caster/DoctrineCaster.php b/vendor/symfony/var-dumper/Caster/DoctrineCaster.php deleted file mode 100644 index 7409508..0000000 --- a/vendor/symfony/var-dumper/Caster/DoctrineCaster.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Doctrine\Common\Proxy\Proxy as CommonProxy; -use Doctrine\ORM\PersistentCollection; -use Doctrine\ORM\Proxy\Proxy as OrmProxy; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Doctrine related classes to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class DoctrineCaster -{ - public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, $isNested) - { - foreach (['__cloner__', '__initializer__'] as $k) { - if (\array_key_exists($k, $a)) { - unset($a[$k]); - ++$stub->cut; - } - } - - return $a; - } - - public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, $isNested) - { - foreach (['_entityPersister', '_identifier'] as $k) { - if (\array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { - unset($a[$k]); - ++$stub->cut; - } - } - - return $a; - } - - public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, $isNested) - { - foreach (['snapshot', 'association', 'typeClass'] as $k) { - if (\array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { - $a[$k] = new CutStub($a[$k]); - } - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/DsCaster.php b/vendor/symfony/var-dumper/Caster/DsCaster.php deleted file mode 100644 index 11423c9..0000000 --- a/vendor/symfony/var-dumper/Caster/DsCaster.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Ds\Collection; -use Ds\Map; -use Ds\Pair; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Ds extension classes to array representation. - * - * @author Jáchym Toušek <enumag@gmail.com> - * - * @final since Symfony 4.4 - */ -class DsCaster -{ - public static function castCollection(Collection $c, array $a, Stub $stub, bool $isNested): array - { - $a[Caster::PREFIX_VIRTUAL.'count'] = $c->count(); - $a[Caster::PREFIX_VIRTUAL.'capacity'] = $c->capacity(); - - if (!$c instanceof Map) { - $a += $c->toArray(); - } - - return $a; - } - - public static function castMap(Map $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($c as $k => $v) { - $a[] = new DsPairStub($k, $v); - } - - return $a; - } - - public static function castPair(Pair $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($c->toArray() as $k => $v) { - $a[Caster::PREFIX_VIRTUAL.$k] = $v; - } - - return $a; - } - - public static function castPairStub(DsPairStub $c, array $a, Stub $stub, bool $isNested): array - { - if ($isNested) { - $stub->class = Pair::class; - $stub->value = null; - $stub->handle = 0; - - $a = $c->value; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/DsPairStub.php b/vendor/symfony/var-dumper/Caster/DsPairStub.php deleted file mode 100644 index a1dcc15..0000000 --- a/vendor/symfony/var-dumper/Caster/DsPairStub.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class DsPairStub extends Stub -{ - public function __construct($key, $value) - { - $this->value = [ - Caster::PREFIX_VIRTUAL.'key' => $key, - Caster::PREFIX_VIRTUAL.'value' => $value, - ]; - } -} diff --git a/vendor/symfony/var-dumper/Caster/EnumStub.php b/vendor/symfony/var-dumper/Caster/EnumStub.php deleted file mode 100644 index 7a4e98a..0000000 --- a/vendor/symfony/var-dumper/Caster/EnumStub.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents an enumeration of values. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class EnumStub extends Stub -{ - public $dumpKeys = true; - - public function __construct(array $values, bool $dumpKeys = true) - { - $this->value = $values; - $this->dumpKeys = $dumpKeys; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php b/vendor/symfony/var-dumper/Caster/ExceptionCaster.php deleted file mode 100644 index f2c0f96..0000000 --- a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php +++ /dev/null @@ -1,388 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; -use Symfony\Component\VarDumper\Cloner\Stub; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; - -/** - * Casts common Exception classes to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class ExceptionCaster -{ - public static $srcContext = 1; - public static $traceArgs = true; - public static $errorTypes = [ - \E_DEPRECATED => 'E_DEPRECATED', - \E_USER_DEPRECATED => 'E_USER_DEPRECATED', - \E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', - \E_ERROR => 'E_ERROR', - \E_WARNING => 'E_WARNING', - \E_PARSE => 'E_PARSE', - \E_NOTICE => 'E_NOTICE', - \E_CORE_ERROR => 'E_CORE_ERROR', - \E_CORE_WARNING => 'E_CORE_WARNING', - \E_COMPILE_ERROR => 'E_COMPILE_ERROR', - \E_COMPILE_WARNING => 'E_COMPILE_WARNING', - \E_USER_ERROR => 'E_USER_ERROR', - \E_USER_WARNING => 'E_USER_WARNING', - \E_USER_NOTICE => 'E_USER_NOTICE', - \E_STRICT => 'E_STRICT', - ]; - - private static $framesCache = []; - - public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); - } - - public static function castException(\Exception $e, array $a, Stub $stub, $isNested, $filter = 0) - { - return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); - } - - public static function castErrorException(\ErrorException $e, array $a, Stub $stub, $isNested) - { - if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } - - return $a; - } - - public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, $isNested) - { - $trace = Caster::PREFIX_VIRTUAL.'trace'; - $prefix = Caster::PREFIX_PROTECTED; - $xPrefix = "\0Exception\0"; - - if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) { - $b = (array) $a[$xPrefix.'previous']; - $class = get_debug_type($a[$xPrefix.'previous']); - self::traceUnshift($b[$xPrefix.'trace'], $class, $b[$prefix.'file'], $b[$prefix.'line']); - $a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value)); - } - - unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); - - return $a; - } - - public static function castSilencedErrorContext(SilencedErrorContext $e, array $a, Stub $stub, $isNested) - { - $sPrefix = "\0".SilencedErrorContext::class."\0"; - - if (!isset($a[$s = $sPrefix.'severity'])) { - return $a; - } - - if (isset(self::$errorTypes[$a[$s]])) { - $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); - } - - $trace = [[ - 'file' => $a[$sPrefix.'file'], - 'line' => $a[$sPrefix.'line'], - ]]; - - if (isset($a[$sPrefix.'trace'])) { - $trace = array_merge($trace, $a[$sPrefix.'trace']); - } - - unset($a[$sPrefix.'file'], $a[$sPrefix.'line'], $a[$sPrefix.'trace']); - $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); - - return $a; - } - - public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, $isNested) - { - if (!$isNested) { - return $a; - } - $stub->class = ''; - $stub->handle = 0; - $frames = $trace->value; - $prefix = Caster::PREFIX_VIRTUAL; - - $a = []; - $j = \count($frames); - if (0 > $i = $trace->sliceOffset) { - $i = max(0, $j + $i); - } - if (!isset($trace->value[$i])) { - return []; - } - $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; - $frames[] = ['function' => '']; - $collapse = false; - - for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { - $f = $frames[$i]; - $call = isset($f['function']) ? (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'] : '???'; - - $frame = new FrameStub( - [ - 'object' => $f['object'] ?? null, - 'class' => $f['class'] ?? null, - 'type' => $f['type'] ?? null, - 'function' => $f['function'] ?? null, - ] + $frames[$i - 1], - false, - true - ); - $f = self::castFrameStub($frame, [], $frame, true); - if (isset($f[$prefix.'src'])) { - foreach ($f[$prefix.'src']->value as $label => $frame) { - if (str_starts_with($label, "\0~collapse=0")) { - if ($collapse) { - $label = substr_replace($label, '1', 11, 1); - } else { - $collapse = true; - } - } - $label = substr_replace($label, "title=Stack level $j.&", 2, 0); - } - $f = $frames[$i - 1]; - if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) { - $frame->value['arguments'] = new ArgsStub($f['args'], $f['function'] ?? null, $f['class'] ?? null); - } - } elseif ('???' !== $lastCall) { - $label = new ClassStub($lastCall); - if (isset($label->attr['ellipsis'])) { - $label->attr['ellipsis'] += 2; - $label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()'; - } else { - $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()'; - } - } else { - $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall; - } - $a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame; - - $lastCall = $call; - } - if (null !== $trace->sliceLength) { - $a = \array_slice($a, 0, $trace->sliceLength, true); - } - - return $a; - } - - public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, $isNested) - { - if (!$isNested) { - return $a; - } - $f = $frame->value; - $prefix = Caster::PREFIX_VIRTUAL; - - if (isset($f['file'], $f['line'])) { - $cacheKey = $f; - unset($cacheKey['object'], $cacheKey['args']); - $cacheKey[] = self::$srcContext; - $cacheKey = implode('-', $cacheKey); - - if (isset(self::$framesCache[$cacheKey])) { - $a[$prefix.'src'] = self::$framesCache[$cacheKey]; - } else { - if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { - $f['file'] = substr($f['file'], 0, -\strlen($match[0])); - $f['line'] = (int) $match[1]; - } - $src = $f['line']; - $srcKey = $f['file']; - $ellipsis = new LinkStub($srcKey, 0); - $srcAttr = 'collapse='.(int) $ellipsis->inVendor; - $ellipsisTail = $ellipsis->attr['ellipsis-tail'] ?? 0; - $ellipsis = $ellipsis->attr['ellipsis'] ?? 0; - - if (file_exists($f['file']) && 0 <= self::$srcContext) { - if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) { - $template = null; - if (isset($f['object'])) { - $template = $f['object']; - } elseif ((new \ReflectionClass($f['class']))->isInstantiable()) { - $template = unserialize(sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class'])); - } - if (null !== $template) { - $ellipsis = 0; - $templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : ''); - $templateInfo = $template->getDebugInfo(); - if (isset($templateInfo[$f['line']])) { - if (!method_exists($template, 'getSourceContext') || !file_exists($templatePath = $template->getSourceContext()->getPath())) { - $templatePath = null; - } - if ($templateSrc) { - $src = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext, 'twig', $templatePath, $f); - $srcKey = ($templatePath ?: $template->getTemplateName()).':'.$templateInfo[$f['line']]; - } - } - } - } - if ($srcKey == $f['file']) { - $src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, 'php', $f['file'], $f); - $srcKey .= ':'.$f['line']; - if ($ellipsis) { - $ellipsis += 1 + \strlen($f['line']); - } - } - $srcAttr .= sprintf('&separator= &file=%s&line=%d', rawurlencode($f['file']), $f['line']); - } else { - $srcAttr .= '&separator=:'; - } - $srcAttr .= $ellipsis ? '&ellipsis-type=path&ellipsis='.$ellipsis.'&ellipsis-tail='.$ellipsisTail : ''; - self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(["\0~$srcAttr\0$srcKey" => $src]); - } - } - - unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); - if ($frame->inTraceStub) { - unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); - } - foreach ($a as $k => $v) { - if (!$v) { - unset($a[$k]); - } - } - if ($frame->keepArgs && !empty($f['args'])) { - $a[$prefix.'arguments'] = new ArgsStub($f['args'], $f['function'], $f['class']); - } - - return $a; - } - - private static function filterExceptionArray(string $xClass, array $a, string $xPrefix, int $filter): array - { - if (isset($a[$xPrefix.'trace'])) { - $trace = $a[$xPrefix.'trace']; - unset($a[$xPrefix.'trace']); // Ensures the trace is always last - } else { - $trace = []; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && $trace) { - if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { - self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); - } - $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); - } - if (empty($a[$xPrefix.'previous'])) { - unset($a[$xPrefix.'previous']); - } - unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); - - if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) { - $a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { - return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; - }, $a[Caster::PREFIX_PROTECTED.'message']); - } - - if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { - $a[Caster::PREFIX_PROTECTED.'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); - } - - return $a; - } - - private static function traceUnshift(array &$trace, ?string $class, string $file, int $line): void - { - if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { - return; - } - array_unshift($trace, [ - 'function' => $class ? 'new '.$class : null, - 'file' => $file, - 'line' => $line, - ]); - } - - private static function extractSource(string $srcLines, int $line, int $srcContext, string $lang, ?string $file, array $frame): EnumStub - { - $srcLines = explode("\n", $srcLines); - $src = []; - - for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { - $src[] = ($srcLines[$i] ?? '')."\n"; - } - - if ($frame['function'] ?? false) { - $stub = new CutStub(new \stdClass()); - $stub->class = (isset($frame['class']) ? $frame['class'].$frame['type'] : '').$frame['function']; - $stub->type = Stub::TYPE_OBJECT; - $stub->attr['cut_hash'] = true; - $stub->attr['file'] = $frame['file']; - $stub->attr['line'] = $frame['line']; - - try { - $caller = isset($frame['class']) ? new \ReflectionMethod($frame['class'], $frame['function']) : new \ReflectionFunction($frame['function']); - $stub->class .= ReflectionCaster::getSignature(ReflectionCaster::castFunctionAbstract($caller, [], $stub, true, Caster::EXCLUDE_VERBOSE)); - - if ($f = $caller->getFileName()) { - $stub->attr['file'] = $f; - $stub->attr['line'] = $caller->getStartLine(); - } - } catch (\ReflectionException $e) { - // ignore fake class/function - } - - $srcLines = ["\0~separator=\0" => $stub]; - } else { - $stub = null; - $srcLines = []; - } - - $ltrim = 0; - do { - $pad = null; - for ($i = $srcContext << 1; $i >= 0; --$i) { - if (isset($src[$i][$ltrim]) && "\r" !== ($c = $src[$i][$ltrim]) && "\n" !== $c) { - if (null === $pad) { - $pad = $c; - } - if ((' ' !== $c && "\t" !== $c) || $pad !== $c) { - break; - } - } - } - ++$ltrim; - } while (0 > $i && null !== $pad); - - --$ltrim; - - foreach ($src as $i => $c) { - if ($ltrim) { - $c = isset($c[$ltrim]) && "\r" !== $c[$ltrim] ? substr($c, $ltrim) : ltrim($c, " \t"); - } - $c = substr($c, 0, -1); - if ($i !== $srcContext) { - $c = new ConstStub('default', $c); - } else { - $c = new ConstStub($c, $stub ? 'in '.$stub->class : ''); - if (null !== $file) { - $c->attr['file'] = $file; - $c->attr['line'] = $line; - } - } - $c->attr['lang'] = $lang; - $srcLines[sprintf("\0~separator=› &%d\0", $i + $line - $srcContext)] = $c; - } - - return new EnumStub($srcLines); - } -} diff --git a/vendor/symfony/var-dumper/Caster/FrameStub.php b/vendor/symfony/var-dumper/Caster/FrameStub.php deleted file mode 100644 index 8786755..0000000 --- a/vendor/symfony/var-dumper/Caster/FrameStub.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class FrameStub extends EnumStub -{ - public $keepArgs; - public $inTraceStub; - - public function __construct(array $frame, bool $keepArgs = true, bool $inTraceStub = false) - { - $this->value = $frame; - $this->keepArgs = $keepArgs; - $this->inTraceStub = $inTraceStub; - } -} diff --git a/vendor/symfony/var-dumper/Caster/GmpCaster.php b/vendor/symfony/var-dumper/Caster/GmpCaster.php deleted file mode 100644 index 2b20e15..0000000 --- a/vendor/symfony/var-dumper/Caster/GmpCaster.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts GMP objects to array representation. - * - * @author Hamza Amrouche <hamza.simperfit@gmail.com> - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class GmpCaster -{ - public static function castGmp(\GMP $gmp, array $a, Stub $stub, $isNested, $filter): array - { - $a[Caster::PREFIX_VIRTUAL.'value'] = new ConstStub(gmp_strval($gmp), gmp_strval($gmp)); - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ImagineCaster.php b/vendor/symfony/var-dumper/Caster/ImagineCaster.php deleted file mode 100644 index d1289da..0000000 --- a/vendor/symfony/var-dumper/Caster/ImagineCaster.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Imagine\Image\ImageInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Grégoire Pineau <lyrixx@lyrixx.info> - */ -final class ImagineCaster -{ - public static function castImage(ImageInterface $c, array $a, Stub $stub, bool $isNested): array - { - $imgData = $c->get('png'); - if (\strlen($imgData) > 1 * 1000 * 1000) { - $a += [ - Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()), - ]; - } else { - $a += [ - Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/png', $c->getSize()), - ]; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ImgStub.php b/vendor/symfony/var-dumper/Caster/ImgStub.php deleted file mode 100644 index 05789fe..0000000 --- a/vendor/symfony/var-dumper/Caster/ImgStub.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * @author Grégoire Pineau <lyrixx@lyrixx.info> - */ -class ImgStub extends ConstStub -{ - public function __construct(string $data, string $contentType, string $size) - { - $this->value = ''; - $this->attr['img-data'] = $data; - $this->attr['img-size'] = $size; - $this->attr['content-type'] = $contentType; - } -} diff --git a/vendor/symfony/var-dumper/Caster/IntlCaster.php b/vendor/symfony/var-dumper/Caster/IntlCaster.php deleted file mode 100644 index 581324d..0000000 --- a/vendor/symfony/var-dumper/Caster/IntlCaster.php +++ /dev/null @@ -1,172 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * @author Jan Schädlich <jan.schaedlich@sensiolabs.de> - * - * @final since Symfony 4.4 - */ -class IntlCaster -{ - public static function castMessageFormatter(\MessageFormatter $c, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - ]; - - return self::castError($c, $a); - } - - public static function castNumberFormatter(\NumberFormatter $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - ]; - - if ($filter & Caster::EXCLUDE_VERBOSE) { - $stub->cut += 3; - - return self::castError($c, $a); - } - - $a += [ - Caster::PREFIX_VIRTUAL.'attributes' => new EnumStub( - [ - 'PARSE_INT_ONLY' => $c->getAttribute(\NumberFormatter::PARSE_INT_ONLY), - 'GROUPING_USED' => $c->getAttribute(\NumberFormatter::GROUPING_USED), - 'DECIMAL_ALWAYS_SHOWN' => $c->getAttribute(\NumberFormatter::DECIMAL_ALWAYS_SHOWN), - 'MAX_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_INTEGER_DIGITS), - 'MIN_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_INTEGER_DIGITS), - 'INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::INTEGER_DIGITS), - 'MAX_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_FRACTION_DIGITS), - 'MIN_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_FRACTION_DIGITS), - 'FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::FRACTION_DIGITS), - 'MULTIPLIER' => $c->getAttribute(\NumberFormatter::MULTIPLIER), - 'GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::GROUPING_SIZE), - 'ROUNDING_MODE' => $c->getAttribute(\NumberFormatter::ROUNDING_MODE), - 'ROUNDING_INCREMENT' => $c->getAttribute(\NumberFormatter::ROUNDING_INCREMENT), - 'FORMAT_WIDTH' => $c->getAttribute(\NumberFormatter::FORMAT_WIDTH), - 'PADDING_POSITION' => $c->getAttribute(\NumberFormatter::PADDING_POSITION), - 'SECONDARY_GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::SECONDARY_GROUPING_SIZE), - 'SIGNIFICANT_DIGITS_USED' => $c->getAttribute(\NumberFormatter::SIGNIFICANT_DIGITS_USED), - 'MIN_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_SIGNIFICANT_DIGITS), - 'MAX_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS), - 'LENIENT_PARSE' => $c->getAttribute(\NumberFormatter::LENIENT_PARSE), - ] - ), - Caster::PREFIX_VIRTUAL.'text_attributes' => new EnumStub( - [ - 'POSITIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_PREFIX), - 'POSITIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_SUFFIX), - 'NEGATIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_PREFIX), - 'NEGATIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_SUFFIX), - 'PADDING_CHARACTER' => $c->getTextAttribute(\NumberFormatter::PADDING_CHARACTER), - 'CURRENCY_CODE' => $c->getTextAttribute(\NumberFormatter::CURRENCY_CODE), - 'DEFAULT_RULESET' => $c->getTextAttribute(\NumberFormatter::DEFAULT_RULESET), - 'PUBLIC_RULESETS' => $c->getTextAttribute(\NumberFormatter::PUBLIC_RULESETS), - ] - ), - Caster::PREFIX_VIRTUAL.'symbols' => new EnumStub( - [ - 'DECIMAL_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL), - 'GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL), - 'PATTERN_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::PATTERN_SEPARATOR_SYMBOL), - 'PERCENT_SYMBOL' => $c->getSymbol(\NumberFormatter::PERCENT_SYMBOL), - 'ZERO_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL), - 'DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::DIGIT_SYMBOL), - 'MINUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::MINUS_SIGN_SYMBOL), - 'PLUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::PLUS_SIGN_SYMBOL), - 'CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::CURRENCY_SYMBOL), - 'INTL_CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::INTL_CURRENCY_SYMBOL), - 'MONETARY_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL), - 'EXPONENTIAL_SYMBOL' => $c->getSymbol(\NumberFormatter::EXPONENTIAL_SYMBOL), - 'PERMILL_SYMBOL' => $c->getSymbol(\NumberFormatter::PERMILL_SYMBOL), - 'PAD_ESCAPE_SYMBOL' => $c->getSymbol(\NumberFormatter::PAD_ESCAPE_SYMBOL), - 'INFINITY_SYMBOL' => $c->getSymbol(\NumberFormatter::INFINITY_SYMBOL), - 'NAN_SYMBOL' => $c->getSymbol(\NumberFormatter::NAN_SYMBOL), - 'SIGNIFICANT_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL), - 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL), - ] - ), - ]; - - return self::castError($c, $a); - } - - public static function castIntlTimeZone(\IntlTimeZone $c, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'display_name' => $c->getDisplayName(), - Caster::PREFIX_VIRTUAL.'id' => $c->getID(), - Caster::PREFIX_VIRTUAL.'raw_offset' => $c->getRawOffset(), - ]; - - if ($c->useDaylightTime()) { - $a += [ - Caster::PREFIX_VIRTUAL.'dst_savings' => $c->getDSTSavings(), - ]; - } - - return self::castError($c, $a); - } - - public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'type' => $c->getType(), - Caster::PREFIX_VIRTUAL.'first_day_of_week' => $c->getFirstDayOfWeek(), - Caster::PREFIX_VIRTUAL.'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(), - Caster::PREFIX_VIRTUAL.'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(), - Caster::PREFIX_VIRTUAL.'skipped_wall_time_option' => $c->getSkippedWallTimeOption(), - Caster::PREFIX_VIRTUAL.'time' => $c->getTime(), - Caster::PREFIX_VIRTUAL.'in_daylight_time' => $c->inDaylightTime(), - Caster::PREFIX_VIRTUAL.'is_lenient' => $c->isLenient(), - Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), - ]; - - return self::castError($c, $a); - } - - public static function castIntlDateFormatter(\IntlDateFormatter $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $a += [ - Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), - Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), - Caster::PREFIX_VIRTUAL.'calendar' => $c->getCalendar(), - Caster::PREFIX_VIRTUAL.'time_zone_id' => $c->getTimeZoneId(), - Caster::PREFIX_VIRTUAL.'time_type' => $c->getTimeType(), - Caster::PREFIX_VIRTUAL.'date_type' => $c->getDateType(), - Caster::PREFIX_VIRTUAL.'calendar_object' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getCalendarObject()) : $c->getCalendarObject(), - Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), - ]; - - return self::castError($c, $a); - } - - private static function castError($c, array $a): array - { - if ($errorCode = $c->getErrorCode()) { - $a += [ - Caster::PREFIX_VIRTUAL.'error_code' => $errorCode, - Caster::PREFIX_VIRTUAL.'error_message' => $c->getErrorMessage(), - ]; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/LinkStub.php b/vendor/symfony/var-dumper/Caster/LinkStub.php deleted file mode 100644 index c619d9d..0000000 --- a/vendor/symfony/var-dumper/Caster/LinkStub.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -/** - * Represents a file or a URL. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class LinkStub extends ConstStub -{ - public $inVendor = false; - - private static $vendorRoots; - private static $composerRoots; - - public function __construct(string $label, int $line = 0, string $href = null) - { - $this->value = $label; - - if (null === $href) { - $href = $label; - } - if (!\is_string($href)) { - return; - } - if (str_starts_with($href, 'file://')) { - if ($href === $label) { - $label = substr($label, 7); - } - $href = substr($href, 7); - } elseif (str_contains($href, '://')) { - $this->attr['href'] = $href; - - return; - } - if (!file_exists($href)) { - return; - } - if ($line) { - $this->attr['line'] = $line; - } - if ($label !== $this->attr['file'] = realpath($href) ?: $href) { - return; - } - if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) { - $this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1; - $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode('', \array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0); - } elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) { - $this->attr['ellipsis'] = 2 + \strlen(implode('', \array_slice($ellipsis, -2))); - $this->attr['ellipsis-type'] = 'path'; - $this->attr['ellipsis-tail'] = 1; - } - } - - private function getComposerRoot(string $file, bool &$inVendor) - { - if (null === self::$vendorRoots) { - self::$vendorRoots = []; - - foreach (get_declared_classes() as $class) { - if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) { - $r = new \ReflectionClass($class); - $v = \dirname($r->getFileName(), 2); - if (file_exists($v.'/composer/installed.json')) { - self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR; - } - } - } - } - $inVendor = false; - - if (isset(self::$composerRoots[$dir = \dirname($file)])) { - return self::$composerRoots[$dir]; - } - - foreach (self::$vendorRoots as $root) { - if ($inVendor = str_starts_with($file, $root)) { - return $root; - } - } - - $parent = $dir; - while (!@file_exists($parent.'/composer.json')) { - if (!@file_exists($parent)) { - // open_basedir restriction in effect - break; - } - if ($parent === \dirname($parent)) { - return self::$composerRoots[$dir] = false; - } - - $parent = \dirname($parent); - } - - return self::$composerRoots[$dir] = $parent.\DIRECTORY_SEPARATOR; - } -} diff --git a/vendor/symfony/var-dumper/Caster/MemcachedCaster.php b/vendor/symfony/var-dumper/Caster/MemcachedCaster.php deleted file mode 100644 index 696cef1..0000000 --- a/vendor/symfony/var-dumper/Caster/MemcachedCaster.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Jan Schädlich <jan.schaedlich@sensiolabs.de> - * - * @final since Symfony 4.4 - */ -class MemcachedCaster -{ - private static $optionConstants; - private static $defaultOptions; - - public static function castMemcached(\Memcached $c, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'servers' => $c->getServerList(), - Caster::PREFIX_VIRTUAL.'options' => new EnumStub( - self::getNonDefaultOptions($c) - ), - ]; - - return $a; - } - - private static function getNonDefaultOptions(\Memcached $c): array - { - self::$defaultOptions = self::$defaultOptions ?? self::discoverDefaultOptions(); - self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); - - $nonDefaultOptions = []; - foreach (self::$optionConstants as $constantKey => $value) { - if (self::$defaultOptions[$constantKey] !== $option = $c->getOption($value)) { - $nonDefaultOptions[$constantKey] = $option; - } - } - - return $nonDefaultOptions; - } - - private static function discoverDefaultOptions(): array - { - $defaultMemcached = new \Memcached(); - $defaultMemcached->addServer('127.0.0.1', 11211); - - $defaultOptions = []; - self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); - - foreach (self::$optionConstants as $constantKey => $value) { - $defaultOptions[$constantKey] = $defaultMemcached->getOption($value); - } - - return $defaultOptions; - } - - private static function getOptionConstants(): array - { - $reflectedMemcached = new \ReflectionClass(\Memcached::class); - - $optionConstants = []; - foreach ($reflectedMemcached->getConstants() as $constantKey => $value) { - if (str_starts_with($constantKey, 'OPT_')) { - $optionConstants[$constantKey] = $value; - } - } - - return $optionConstants; - } -} diff --git a/vendor/symfony/var-dumper/Caster/MysqliCaster.php b/vendor/symfony/var-dumper/Caster/MysqliCaster.php deleted file mode 100644 index bfe6f08..0000000 --- a/vendor/symfony/var-dumper/Caster/MysqliCaster.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -final class MysqliCaster -{ - public static function castMysqliDriver(\mysqli_driver $c, array $a, Stub $stub, bool $isNested): array - { - foreach ($a as $k => $v) { - if (isset($c->$k)) { - $a[$k] = $c->$k; - } - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/PdoCaster.php b/vendor/symfony/var-dumper/Caster/PdoCaster.php deleted file mode 100644 index 47b0a62..0000000 --- a/vendor/symfony/var-dumper/Caster/PdoCaster.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts PDO related classes to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class PdoCaster -{ - private const PDO_ATTRIBUTES = [ - 'CASE' => [ - \PDO::CASE_LOWER => 'LOWER', - \PDO::CASE_NATURAL => 'NATURAL', - \PDO::CASE_UPPER => 'UPPER', - ], - 'ERRMODE' => [ - \PDO::ERRMODE_SILENT => 'SILENT', - \PDO::ERRMODE_WARNING => 'WARNING', - \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', - ], - 'TIMEOUT', - 'PREFETCH', - 'AUTOCOMMIT', - 'PERSISTENT', - 'DRIVER_NAME', - 'SERVER_INFO', - 'ORACLE_NULLS' => [ - \PDO::NULL_NATURAL => 'NATURAL', - \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', - \PDO::NULL_TO_STRING => 'TO_STRING', - ], - 'CLIENT_VERSION', - 'SERVER_VERSION', - 'STATEMENT_CLASS', - 'EMULATE_PREPARES', - 'CONNECTION_STATUS', - 'STRINGIFY_FETCHES', - 'DEFAULT_FETCH_MODE' => [ - \PDO::FETCH_ASSOC => 'ASSOC', - \PDO::FETCH_BOTH => 'BOTH', - \PDO::FETCH_LAZY => 'LAZY', - \PDO::FETCH_NUM => 'NUM', - \PDO::FETCH_OBJ => 'OBJ', - ], - ]; - - public static function castPdo(\PDO $c, array $a, Stub $stub, $isNested) - { - $attr = []; - $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); - $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); - - foreach (self::PDO_ATTRIBUTES as $k => $v) { - if (!isset($k[0])) { - $k = $v; - $v = []; - } - - try { - $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_'.$k)); - if ($v && isset($v[$attr[$k]])) { - $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); - } - } catch (\Exception $e) { - } - } - if (isset($attr[$k = 'STATEMENT_CLASS'][1])) { - if ($attr[$k][1]) { - $attr[$k][1] = new ArgsStub($attr[$k][1], '__construct', $attr[$k][0]); - } - $attr[$k][0] = new ClassStub($attr[$k][0]); - } - - $prefix = Caster::PREFIX_VIRTUAL; - $a += [ - $prefix.'inTransaction' => method_exists($c, 'inTransaction'), - $prefix.'errorInfo' => $c->errorInfo(), - $prefix.'attributes' => new EnumStub($attr), - ]; - - if ($a[$prefix.'inTransaction']) { - $a[$prefix.'inTransaction'] = $c->inTransaction(); - } else { - unset($a[$prefix.'inTransaction']); - } - - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } - - $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); - - return $a; - } - - public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $a[$prefix.'errorInfo'] = $c->errorInfo(); - - if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { - unset($a[$prefix.'errorInfo']); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/PgSqlCaster.php b/vendor/symfony/var-dumper/Caster/PgSqlCaster.php deleted file mode 100644 index 3097c51..0000000 --- a/vendor/symfony/var-dumper/Caster/PgSqlCaster.php +++ /dev/null @@ -1,156 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts pqsql resources to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class PgSqlCaster -{ - private const PARAM_CODES = [ - 'server_encoding', - 'client_encoding', - 'is_superuser', - 'session_authorization', - 'DateStyle', - 'TimeZone', - 'IntervalStyle', - 'integer_datetimes', - 'application_name', - 'standard_conforming_strings', - ]; - - private const TRANSACTION_STATUS = [ - \PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', - \PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', - \PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', - \PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', - \PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN', - ]; - - private const RESULT_STATUS = [ - \PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', - \PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', - \PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', - \PGSQL_COPY_OUT => 'PGSQL_COPY_OUT', - \PGSQL_COPY_IN => 'PGSQL_COPY_IN', - \PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', - \PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', - \PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR', - ]; - - private const DIAG_CODES = [ - 'severity' => \PGSQL_DIAG_SEVERITY, - 'sqlstate' => \PGSQL_DIAG_SQLSTATE, - 'message' => \PGSQL_DIAG_MESSAGE_PRIMARY, - 'detail' => \PGSQL_DIAG_MESSAGE_DETAIL, - 'hint' => \PGSQL_DIAG_MESSAGE_HINT, - 'statement position' => \PGSQL_DIAG_STATEMENT_POSITION, - 'internal position' => \PGSQL_DIAG_INTERNAL_POSITION, - 'internal query' => \PGSQL_DIAG_INTERNAL_QUERY, - 'context' => \PGSQL_DIAG_CONTEXT, - 'file' => \PGSQL_DIAG_SOURCE_FILE, - 'line' => \PGSQL_DIAG_SOURCE_LINE, - 'function' => \PGSQL_DIAG_SOURCE_FUNCTION, - ]; - - public static function castLargeObject($lo, array $a, Stub $stub, $isNested) - { - $a['seek position'] = pg_lo_tell($lo); - - return $a; - } - - public static function castLink($link, array $a, Stub $stub, $isNested) - { - $a['status'] = pg_connection_status($link); - $a['status'] = new ConstStub(\PGSQL_CONNECTION_OK === $a['status'] ? 'PGSQL_CONNECTION_OK' : 'PGSQL_CONNECTION_BAD', $a['status']); - $a['busy'] = pg_connection_busy($link); - - $a['transaction'] = pg_transaction_status($link); - if (isset(self::TRANSACTION_STATUS[$a['transaction']])) { - $a['transaction'] = new ConstStub(self::TRANSACTION_STATUS[$a['transaction']], $a['transaction']); - } - - $a['pid'] = pg_get_pid($link); - $a['last error'] = pg_last_error($link); - $a['last notice'] = pg_last_notice($link); - $a['host'] = pg_host($link); - $a['port'] = pg_port($link); - $a['dbname'] = pg_dbname($link); - $a['options'] = pg_options($link); - $a['version'] = pg_version($link); - - foreach (self::PARAM_CODES as $v) { - if (false !== $s = pg_parameter_status($link, $v)) { - $a['param'][$v] = $s; - } - } - - $a['param']['client_encoding'] = pg_client_encoding($link); - $a['param'] = new EnumStub($a['param']); - - return $a; - } - - public static function castResult($result, array $a, Stub $stub, $isNested) - { - $a['num rows'] = pg_num_rows($result); - $a['status'] = pg_result_status($result); - if (isset(self::RESULT_STATUS[$a['status']])) { - $a['status'] = new ConstStub(self::RESULT_STATUS[$a['status']], $a['status']); - } - $a['command-completion tag'] = pg_result_status($result, \PGSQL_STATUS_STRING); - - if (-1 === $a['num rows']) { - foreach (self::DIAG_CODES as $k => $v) { - $a['error'][$k] = pg_result_error_field($result, $v); - } - } - - $a['affected rows'] = pg_affected_rows($result); - $a['last OID'] = pg_last_oid($result); - - $fields = pg_num_fields($result); - - for ($i = 0; $i < $fields; ++$i) { - $field = [ - 'name' => pg_field_name($result, $i), - 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)), - 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)), - 'nullable' => (bool) pg_field_is_null($result, $i), - 'storage' => pg_field_size($result, $i).' bytes', - 'display' => pg_field_prtlen($result, $i).' chars', - ]; - if (' (OID: )' === $field['table']) { - $field['table'] = null; - } - if ('-1 bytes' === $field['storage']) { - $field['storage'] = 'variable size'; - } elseif ('1 bytes' === $field['storage']) { - $field['storage'] = '1 byte'; - } - if ('1 chars' === $field['display']) { - $field['display'] = '1 char'; - } - $a['fields'][] = new EnumStub($field); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php b/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php deleted file mode 100644 index ec02f81..0000000 --- a/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use ProxyManager\Proxy\ProxyInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class ProxyManagerCaster -{ - public static function castProxy(ProxyInterface $c, array $a, Stub $stub, $isNested) - { - if ($parent = get_parent_class($c)) { - $stub->class .= ' - '.$parent; - } - $stub->class .= '@proxy'; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/RedisCaster.php b/vendor/symfony/var-dumper/Caster/RedisCaster.php deleted file mode 100644 index bd877cb..0000000 --- a/vendor/symfony/var-dumper/Caster/RedisCaster.php +++ /dev/null @@ -1,152 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Redis class from ext-redis to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class RedisCaster -{ - private const SERIALIZERS = [ - \Redis::SERIALIZER_NONE => 'NONE', - \Redis::SERIALIZER_PHP => 'PHP', - 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY - ]; - - private const MODES = [ - \Redis::ATOMIC => 'ATOMIC', - \Redis::MULTI => 'MULTI', - \Redis::PIPELINE => 'PIPELINE', - ]; - - private const COMPRESSION_MODES = [ - 0 => 'NONE', // Redis::COMPRESSION_NONE - 1 => 'LZF', // Redis::COMPRESSION_LZF - ]; - - private const FAILOVER_OPTIONS = [ - \RedisCluster::FAILOVER_NONE => 'NONE', - \RedisCluster::FAILOVER_ERROR => 'ERROR', - \RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', - \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES', - ]; - - public static function castRedis(\Redis $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if (!$connected = $c->isConnected()) { - return $a + [ - $prefix.'isConnected' => $connected, - ]; - } - - $mode = $c->getMode(); - - return $a + [ - $prefix.'isConnected' => $connected, - $prefix.'host' => $c->getHost(), - $prefix.'port' => $c->getPort(), - $prefix.'auth' => $c->getAuth(), - $prefix.'mode' => isset(self::MODES[$mode]) ? new ConstStub(self::MODES[$mode], $mode) : $mode, - $prefix.'dbNum' => $c->getDbNum(), - $prefix.'timeout' => $c->getTimeout(), - $prefix.'lastError' => $c->getLastError(), - $prefix.'persistentId' => $c->getPersistentID(), - $prefix.'options' => self::getRedisOptions($c), - ]; - } - - public static function castRedisArray(\RedisArray $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - return $a + [ - $prefix.'hosts' => $c->_hosts(), - $prefix.'function' => ClassStub::wrapCallable($c->_function()), - $prefix.'lastError' => $c->getLastError(), - $prefix.'options' => self::getRedisOptions($c), - ]; - } - - public static function castRedisCluster(\RedisCluster $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $failover = $c->getOption(\RedisCluster::OPT_SLAVE_FAILOVER); - - $a += [ - $prefix.'_masters' => $c->_masters(), - $prefix.'_redir' => $c->_redir(), - $prefix.'mode' => new ConstStub($c->getMode() ? 'MULTI' : 'ATOMIC', $c->getMode()), - $prefix.'lastError' => $c->getLastError(), - $prefix.'options' => self::getRedisOptions($c, [ - 'SLAVE_FAILOVER' => isset(self::FAILOVER_OPTIONS[$failover]) ? new ConstStub(self::FAILOVER_OPTIONS[$failover], $failover) : $failover, - ]), - ]; - - return $a; - } - - /** - * @param \Redis|\RedisArray|\RedisCluster $redis - */ - private static function getRedisOptions($redis, array $options = []): EnumStub - { - $serializer = $redis->getOption(\Redis::OPT_SERIALIZER); - if (\is_array($serializer)) { - foreach ($serializer as &$v) { - if (isset(self::SERIALIZERS[$v])) { - $v = new ConstStub(self::SERIALIZERS[$v], $v); - } - } - } elseif (isset(self::SERIALIZERS[$serializer])) { - $serializer = new ConstStub(self::SERIALIZERS[$serializer], $serializer); - } - - $compression = \defined('Redis::OPT_COMPRESSION') ? $redis->getOption(\Redis::OPT_COMPRESSION) : 0; - if (\is_array($compression)) { - foreach ($compression as &$v) { - if (isset(self::COMPRESSION_MODES[$v])) { - $v = new ConstStub(self::COMPRESSION_MODES[$v], $v); - } - } - } elseif (isset(self::COMPRESSION_MODES[$compression])) { - $compression = new ConstStub(self::COMPRESSION_MODES[$compression], $compression); - } - - $retry = \defined('Redis::OPT_SCAN') ? $redis->getOption(\Redis::OPT_SCAN) : 0; - if (\is_array($retry)) { - foreach ($retry as &$v) { - $v = new ConstStub($v ? 'RETRY' : 'NORETRY', $v); - } - } else { - $retry = new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry); - } - - $options += [ - 'TCP_KEEPALIVE' => \defined('Redis::OPT_TCP_KEEPALIVE') ? $redis->getOption(\Redis::OPT_TCP_KEEPALIVE) : 0, - 'READ_TIMEOUT' => $redis->getOption(\Redis::OPT_READ_TIMEOUT), - 'COMPRESSION' => $compression, - 'SERIALIZER' => $serializer, - 'PREFIX' => $redis->getOption(\Redis::OPT_PREFIX), - 'SCAN' => $retry, - ]; - - return new EnumStub($options); - } -} diff --git a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php deleted file mode 100644 index 2a74b25..0000000 --- a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php +++ /dev/null @@ -1,405 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts Reflector related classes to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class ReflectionCaster -{ - public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo']; - - private const EXTRA_MAP = [ - 'docComment' => 'getDocComment', - 'extension' => 'getExtensionName', - 'isDisabled' => 'isDisabled', - 'isDeprecated' => 'isDeprecated', - 'isInternal' => 'isInternal', - 'isUserDefined' => 'isUserDefined', - 'isGenerator' => 'isGenerator', - 'isVariadic' => 'isVariadic', - ]; - - public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - $c = new \ReflectionFunction($c); - - $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); - - if (!str_contains($c->name, '{closure}')) { - $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; - unset($a[$prefix.'class']); - } - unset($a[$prefix.'extra']); - - $stub->class .= self::getSignature($a); - - if ($f = $c->getFileName()) { - $stub->attr['file'] = $f; - $stub->attr['line'] = $c->getStartLine(); - } - - unset($a[$prefix.'parameters']); - - if ($filter & Caster::EXCLUDE_VERBOSE) { - $stub->cut += ($c->getFileName() ? 2 : 0) + \count($a); - - return []; - } - - if ($f) { - $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); - $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); - } - - return $a; - } - - public static function unsetClosureFileInfo(\Closure $c, array $a) - { - unset($a[Caster::PREFIX_VIRTUAL.'file'], $a[Caster::PREFIX_VIRTUAL.'line']); - - return $a; - } - - public static function castGenerator(\Generator $c, array $a, Stub $stub, $isNested) - { - // Cannot create ReflectionGenerator based on a terminated Generator - try { - $reflectionGenerator = new \ReflectionGenerator($c); - } catch (\Exception $e) { - $a[Caster::PREFIX_VIRTUAL.'closed'] = true; - - return $a; - } - - return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested); - } - - public static function castType(\ReflectionType $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($c instanceof \ReflectionNamedType || \PHP_VERSION_ID < 80000) { - $a += [ - $prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : (string) $c, - $prefix.'allowsNull' => $c->allowsNull(), - $prefix.'isBuiltin' => $c->isBuiltin(), - ]; - } elseif ($c instanceof \ReflectionUnionType || $c instanceof \ReflectionIntersectionType) { - $a[$prefix.'allowsNull'] = $c->allowsNull(); - self::addMap($a, $c, [ - 'types' => 'getTypes', - ]); - } else { - $a[$prefix.'allowsNull'] = $c->allowsNull(); - } - - return $a; - } - - public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($c->getThis()) { - $a[$prefix.'this'] = new CutStub($c->getThis()); - } - $function = $c->getFunction(); - $frame = [ - 'class' => $function->class ?? null, - 'type' => isset($function->class) ? ($function->isStatic() ? '::' : '->') : null, - 'function' => $function->name, - 'file' => $c->getExecutingFile(), - 'line' => $c->getExecutingLine(), - ]; - if ($trace = $c->getTrace(\DEBUG_BACKTRACE_IGNORE_ARGS)) { - $function = new \ReflectionGenerator($c->getExecutingGenerator()); - array_unshift($trace, [ - 'function' => 'yield', - 'file' => $function->getExecutingFile(), - 'line' => $function->getExecutingLine() - (int) (\PHP_VERSION_ID < 80100), - ]); - $trace[] = $frame; - $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); - } else { - $function = new FrameStub($frame, false, true); - $function = ExceptionCaster::castFrameStub($function, [], $function, true); - $a[$prefix.'executing'] = $function[$prefix.'src']; - } - - $a[Caster::PREFIX_VIRTUAL.'closed'] = false; - - return $a; - } - - public static function castClass(\ReflectionClass $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - if ($n = \Reflection::getModifierNames($c->getModifiers())) { - $a[$prefix.'modifiers'] = implode(' ', $n); - } - - self::addMap($a, $c, [ - 'extends' => 'getParentClass', - 'implements' => 'getInterfaceNames', - 'constants' => 'getConstants', - ]); - - foreach ($c->getProperties() as $n) { - $a[$prefix.'properties'][$n->name] = $n; - } - - foreach ($c->getMethods() as $n) { - $a[$prefix.'methods'][$n->name] = $n; - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } - - return $a; - } - - public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, $isNested, $filter = 0) - { - $prefix = Caster::PREFIX_VIRTUAL; - - self::addMap($a, $c, [ - 'returnsReference' => 'returnsReference', - 'returnType' => 'getReturnType', - 'class' => 'getClosureScopeClass', - 'this' => 'getClosureThis', - ]); - - if (isset($a[$prefix.'returnType'])) { - $v = $a[$prefix.'returnType']; - $v = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; - $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType'] instanceof \ReflectionNamedType && $a[$prefix.'returnType']->allowsNull() && 'mixed' !== $v ? '?'.$v : $v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); - } - if (isset($a[$prefix.'class'])) { - $a[$prefix.'class'] = new ClassStub($a[$prefix.'class']); - } - if (isset($a[$prefix.'this'])) { - $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); - } - - foreach ($c->getParameters() as $v) { - $k = '$'.$v->name; - if ($v->isVariadic()) { - $k = '...'.$k; - } - if ($v->isPassedByReference()) { - $k = '&'.$k; - } - $a[$prefix.'parameters'][$k] = $v; - } - if (isset($a[$prefix.'parameters'])) { - $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && $v = $c->getStaticVariables()) { - foreach ($v as $k => &$v) { - if (\is_object($v)) { - $a[$prefix.'use']['$'.$k] = new CutStub($v); - } else { - $a[$prefix.'use']['$'.$k] = &$v; - } - } - unset($v); - $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); - } - - if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { - self::addExtra($a, $c); - } - - return $a; - } - - public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - - return $a; - } - - public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - - self::addMap($a, $c, [ - 'position' => 'getPosition', - 'isVariadic' => 'isVariadic', - 'byReference' => 'isPassedByReference', - 'allowsNull' => 'allowsNull', - ]); - - if ($v = $c->getType()) { - $a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; - } - - if (isset($a[$prefix.'typeHint'])) { - $v = $a[$prefix.'typeHint']; - $a[$prefix.'typeHint'] = new ClassStub($v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); - } else { - unset($a[$prefix.'allowsNull']); - } - - if ($c->isOptional()) { - try { - $a[$prefix.'default'] = $v = $c->getDefaultValue(); - if ($c->isDefaultValueConstant()) { - $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); - } - if (null === $v) { - unset($a[$prefix.'allowsNull']); - } - } catch (\ReflectionException $e) { - } - } - - return $a; - } - - public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); - self::addExtra($a, $c); - - return $a; - } - - public static function castReference(\ReflectionReference $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'id'] = $c->getId(); - - return $a; - } - - public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, $isNested) - { - self::addMap($a, $c, [ - 'version' => 'getVersion', - 'dependencies' => 'getDependencies', - 'iniEntries' => 'getIniEntries', - 'isPersistent' => 'isPersistent', - 'isTemporary' => 'isTemporary', - 'constants' => 'getConstants', - 'functions' => 'getFunctions', - 'classes' => 'getClasses', - ]); - - return $a; - } - - public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, $isNested) - { - self::addMap($a, $c, [ - 'version' => 'getVersion', - 'author' => 'getAuthor', - 'copyright' => 'getCopyright', - 'url' => 'getURL', - ]); - - return $a; - } - - public static function getSignature(array $a) - { - $prefix = Caster::PREFIX_VIRTUAL; - $signature = ''; - - if (isset($a[$prefix.'parameters'])) { - foreach ($a[$prefix.'parameters']->value as $k => $param) { - $signature .= ', '; - if ($type = $param->getType()) { - if (!$type instanceof \ReflectionNamedType) { - $signature .= $type.' '; - } else { - if (!$param->isOptional() && $param->allowsNull() && 'mixed' !== $type->getName()) { - $signature .= '?'; - } - $signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' '; - } - } - $signature .= $k; - - if (!$param->isDefaultValueAvailable()) { - continue; - } - $v = $param->getDefaultValue(); - $signature .= ' = '; - - if ($param->isDefaultValueConstant()) { - $signature .= substr(strrchr('\\'.$param->getDefaultValueConstantName(), '\\'), 1); - } elseif (null === $v) { - $signature .= 'null'; - } elseif (\is_array($v)) { - $signature .= $v ? '[…'.\count($v).']' : '[]'; - } elseif (\is_string($v)) { - $signature .= 10 > \strlen($v) && !str_contains($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'"; - } elseif (\is_bool($v)) { - $signature .= $v ? 'true' : 'false'; - } elseif (\is_object($v)) { - $signature .= 'new '.substr(strrchr('\\'.get_debug_type($v), '\\'), 1); - } else { - $signature .= $v; - } - } - } - $signature = (empty($a[$prefix.'returnsReference']) ? '' : '&').'('.substr($signature, 2).')'; - - if (isset($a[$prefix.'returnType'])) { - $signature .= ': '.substr(strrchr('\\'.$a[$prefix.'returnType'], '\\'), 1); - } - - return $signature; - } - - private static function addExtra(array &$a, \Reflector $c) - { - $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : []; - - if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { - $x['file'] = new LinkStub($m, $c->getStartLine()); - $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); - } - - self::addMap($x, $c, self::EXTRA_MAP, ''); - - if ($x) { - $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); - } - } - - private static function addMap(array &$a, $c, array $map, string $prefix = Caster::PREFIX_VIRTUAL) - { - foreach ($map as $k => $m) { - if (\PHP_VERSION_ID >= 80000 && 'isDisabled' === $k) { - continue; - } - - if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { - $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; - } - } - } -} diff --git a/vendor/symfony/var-dumper/Caster/ResourceCaster.php b/vendor/symfony/var-dumper/Caster/ResourceCaster.php deleted file mode 100644 index a3278a8..0000000 --- a/vendor/symfony/var-dumper/Caster/ResourceCaster.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts common resource types to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class ResourceCaster -{ - /** - * @param \CurlHandle|resource $h - * - * @return array - */ - public static function castCurl($h, array $a, Stub $stub, $isNested) - { - return curl_getinfo($h); - } - - public static function castDba($dba, array $a, Stub $stub, $isNested) - { - $list = dba_list(); - $a['file'] = $list[(int) $dba]; - - return $a; - } - - public static function castProcess($process, array $a, Stub $stub, $isNested) - { - return proc_get_status($process); - } - - public static function castStream($stream, array $a, Stub $stub, $isNested) - { - $a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); - if ($a['uri'] ?? false) { - $a['uri'] = new LinkStub($a['uri']); - } - - return $a; - } - - public static function castStreamContext($stream, array $a, Stub $stub, $isNested) - { - return @stream_context_get_params($stream) ?: $a; - } - - public static function castGd($gd, array $a, Stub $stub, $isNested) - { - $a['size'] = imagesx($gd).'x'.imagesy($gd); - $a['trueColor'] = imageistruecolor($gd); - - return $a; - } - - public static function castMysqlLink($h, array $a, Stub $stub, $isNested) - { - $a['host'] = mysql_get_host_info($h); - $a['protocol'] = mysql_get_proto_info($h); - $a['server'] = mysql_get_server_info($h); - - return $a; - } - - public static function castOpensslX509($h, array $a, Stub $stub, $isNested) - { - $stub->cut = -1; - $info = openssl_x509_parse($h, false); - - $pin = openssl_pkey_get_public($h); - $pin = openssl_pkey_get_details($pin)['key']; - $pin = \array_slice(explode("\n", $pin), 1, -2); - $pin = base64_decode(implode('', $pin)); - $pin = base64_encode(hash('sha256', $pin, true)); - - $a += [ - 'subject' => new EnumStub(array_intersect_key($info['subject'], ['organizationName' => true, 'commonName' => true])), - 'issuer' => new EnumStub(array_intersect_key($info['issuer'], ['organizationName' => true, 'commonName' => true])), - 'expiry' => new ConstStub(date(\DateTime::ISO8601, $info['validTo_time_t']), $info['validTo_time_t']), - 'fingerprint' => new EnumStub([ - 'md5' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'md5')), 2, ':', true)), - 'sha1' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha1')), 2, ':', true)), - 'sha256' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha256')), 2, ':', true)), - 'pin-sha256' => new ConstStub($pin), - ]), - ]; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/SplCaster.php b/vendor/symfony/var-dumper/Caster/SplCaster.php deleted file mode 100644 index be9d66b..0000000 --- a/vendor/symfony/var-dumper/Caster/SplCaster.php +++ /dev/null @@ -1,245 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts SPL related classes to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class SplCaster -{ - private const SPL_FILE_OBJECT_FLAGS = [ - \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', - \SplFileObject::READ_AHEAD => 'READ_AHEAD', - \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', - \SplFileObject::READ_CSV => 'READ_CSV', - ]; - - public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested) - { - return self::castSplArray($c, $a, $stub, $isNested); - } - - public static function castArrayIterator(\ArrayIterator $c, array $a, Stub $stub, $isNested) - { - return self::castSplArray($c, $a, $stub, $isNested); - } - - public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested) - { - $a += [ - Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), - ]; - - return $a; - } - - public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, $isNested) - { - $prefix = Caster::PREFIX_VIRTUAL; - $mode = $c->getIteratorMode(); - $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); - - $a += [ - $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_DELETE) ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), - $prefix.'dllist' => iterator_to_array($c), - ]; - $c->setIteratorMode($mode); - - return $a; - } - - public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNested) - { - static $map = [ - 'path' => 'getPath', - 'filename' => 'getFilename', - 'basename' => 'getBasename', - 'pathname' => 'getPathname', - 'extension' => 'getExtension', - 'realPath' => 'getRealPath', - 'aTime' => 'getATime', - 'mTime' => 'getMTime', - 'cTime' => 'getCTime', - 'inode' => 'getInode', - 'size' => 'getSize', - 'perms' => 'getPerms', - 'owner' => 'getOwner', - 'group' => 'getGroup', - 'type' => 'getType', - 'writable' => 'isWritable', - 'readable' => 'isReadable', - 'executable' => 'isExecutable', - 'file' => 'isFile', - 'dir' => 'isDir', - 'link' => 'isLink', - 'linkTarget' => 'getLinkTarget', - ]; - - $prefix = Caster::PREFIX_VIRTUAL; - unset($a["\0SplFileInfo\0fileName"]); - unset($a["\0SplFileInfo\0pathName"]); - - if (\PHP_VERSION_ID < 80000) { - if (false === $c->getPathname()) { - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } - } else { - try { - $c->isReadable(); - } catch (\RuntimeException $e) { - if ('Object not initialized' !== $e->getMessage()) { - throw $e; - } - - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } catch (\Error $e) { - if ('Object not initialized' !== $e->getMessage()) { - throw $e; - } - - $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; - - return $a; - } - } - - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } - - if ($a[$prefix.'realPath'] ?? false) { - $a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']); - } - - if (isset($a[$prefix.'perms'])) { - $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); - } - - static $mapDate = ['aTime', 'mTime', 'cTime']; - foreach ($mapDate as $key) { - if (isset($a[$prefix.$key])) { - $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); - } - } - - return $a; - } - - public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $isNested) - { - static $map = [ - 'csvControl' => 'getCsvControl', - 'flags' => 'getFlags', - 'maxLineLen' => 'getMaxLineLen', - 'fstat' => 'fstat', - 'eof' => 'eof', - 'key' => 'key', - ]; - - $prefix = Caster::PREFIX_VIRTUAL; - - foreach ($map as $key => $accessor) { - try { - $a[$prefix.$key] = $c->$accessor(); - } catch (\Exception $e) { - } - } - - if (isset($a[$prefix.'flags'])) { - $flagsArray = []; - foreach (self::SPL_FILE_OBJECT_FLAGS as $value => $name) { - if ($a[$prefix.'flags'] & $value) { - $flagsArray[] = $name; - } - } - $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); - } - - if (isset($a[$prefix.'fstat'])) { - $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], ['dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks']); - } - - return $a; - } - - public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, $isNested) - { - $storage = []; - unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 - unset($a["\0SplObjectStorage\0storage"]); - - $clone = clone $c; - foreach ($clone as $obj) { - $storage[] = [ - 'object' => $obj, - 'info' => $clone->getInfo(), - ]; - } - - $a += [ - Caster::PREFIX_VIRTUAL.'storage' => $storage, - ]; - - return $a; - } - - public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); - - return $a; - } - - public static function castWeakReference(\WeakReference $c, array $a, Stub $stub, $isNested) - { - $a[Caster::PREFIX_VIRTUAL.'object'] = $c->get(); - - return $a; - } - - private static function castSplArray($c, array $a, Stub $stub, bool $isNested): array - { - $prefix = Caster::PREFIX_VIRTUAL; - $flags = $c->getFlags(); - - if (!($flags & \ArrayObject::STD_PROP_LIST)) { - $c->setFlags(\ArrayObject::STD_PROP_LIST); - $a = Caster::castObject($c, \get_class($c), method_exists($c, '__debugInfo'), $stub->class); - $c->setFlags($flags); - } - if (\PHP_VERSION_ID < 70400) { - $a[$prefix.'storage'] = $c->getArrayCopy(); - } - $a += [ - $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), - $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), - ]; - if ($c instanceof \ArrayObject) { - $a[$prefix.'iteratorClass'] = new ClassStub($c->getIteratorClass()); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/StubCaster.php b/vendor/symfony/var-dumper/Caster/StubCaster.php deleted file mode 100644 index b6332fb..0000000 --- a/vendor/symfony/var-dumper/Caster/StubCaster.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts a caster's Stub. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class StubCaster -{ - public static function castStub(Stub $c, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->type = $c->type; - $stub->class = $c->class; - $stub->value = $c->value; - $stub->handle = $c->handle; - $stub->cut = $c->cut; - $stub->attr = $c->attr; - - if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) { - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - } - - $a = []; - } - - return $a; - } - - public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, $isNested) - { - return $isNested ? $c->preservedSubset : $a; - } - - public static function cutInternals($obj, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->cut += \count($a); - - return []; - } - - return $a; - } - - public static function castEnum(EnumStub $c, array $a, Stub $stub, $isNested) - { - if ($isNested) { - $stub->class = $c->dumpKeys ? '' : null; - $stub->handle = 0; - $stub->value = null; - $stub->cut = $c->cut; - $stub->attr = $c->attr; - - $a = []; - - if ($c->value) { - foreach (array_keys($c->value) as $k) { - $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k; - } - // Preserve references with array_combine() - $a = array_combine($keys, $c->value); - } - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/SymfonyCaster.php b/vendor/symfony/var-dumper/Caster/SymfonyCaster.php deleted file mode 100644 index 06f213e..0000000 --- a/vendor/symfony/var-dumper/Caster/SymfonyCaster.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @final since Symfony 4.4 - */ -class SymfonyCaster -{ - private const REQUEST_GETTERS = [ - 'pathInfo' => 'getPathInfo', - 'requestUri' => 'getRequestUri', - 'baseUrl' => 'getBaseUrl', - 'basePath' => 'getBasePath', - 'method' => 'getMethod', - 'format' => 'getRequestFormat', - ]; - - public static function castRequest(Request $request, array $a, Stub $stub, $isNested) - { - $clone = null; - - foreach (self::REQUEST_GETTERS as $prop => $getter) { - $key = Caster::PREFIX_PROTECTED.$prop; - if (\array_key_exists($key, $a) && null === $a[$key]) { - if (null === $clone) { - $clone = clone $request; - } - $a[Caster::PREFIX_VIRTUAL.$prop] = $clone->{$getter}(); - } - } - - return $a; - } - - public static function castHttpClient($client, array $a, Stub $stub, $isNested) - { - $multiKey = sprintf("\0%s\0multi", \get_class($client)); - if (isset($a[$multiKey])) { - $a[$multiKey] = new CutStub($a[$multiKey]); - } - - return $a; - } - - public static function castHttpClientResponse($response, array $a, Stub $stub, $isNested) - { - $stub->cut += \count($a); - $a = []; - - foreach ($response->getInfo() as $k => $v) { - $a[Caster::PREFIX_VIRTUAL.$k] = $v; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/TraceStub.php b/vendor/symfony/var-dumper/Caster/TraceStub.php deleted file mode 100644 index 5eea1c8..0000000 --- a/vendor/symfony/var-dumper/Caster/TraceStub.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class TraceStub extends Stub -{ - public $keepArgs; - public $sliceOffset; - public $sliceLength; - public $numberingOffset; - - public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0) - { - $this->value = $trace; - $this->keepArgs = $keepArgs; - $this->sliceOffset = $sliceOffset; - $this->sliceLength = $sliceLength; - $this->numberingOffset = $numberingOffset; - } -} diff --git a/vendor/symfony/var-dumper/Caster/UuidCaster.php b/vendor/symfony/var-dumper/Caster/UuidCaster.php deleted file mode 100644 index b102774..0000000 --- a/vendor/symfony/var-dumper/Caster/UuidCaster.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Ramsey\Uuid\UuidInterface; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * @author Grégoire Pineau <lyrixx@lyrixx.info> - */ -final class UuidCaster -{ - public static function castRamseyUuid(UuidInterface $c, array $a, Stub $stub, bool $isNested): array - { - $a += [ - Caster::PREFIX_VIRTUAL.'uuid' => (string) $c, - ]; - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php b/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php deleted file mode 100644 index 9f5a375..0000000 --- a/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts XmlReader class to array representation. - * - * @author Baptiste Clavié <clavie.b@gmail.com> - * - * @final since Symfony 4.4 - */ -class XmlReaderCaster -{ - private const NODE_TYPES = [ - \XMLReader::NONE => 'NONE', - \XMLReader::ELEMENT => 'ELEMENT', - \XMLReader::ATTRIBUTE => 'ATTRIBUTE', - \XMLReader::TEXT => 'TEXT', - \XMLReader::CDATA => 'CDATA', - \XMLReader::ENTITY_REF => 'ENTITY_REF', - \XMLReader::ENTITY => 'ENTITY', - \XMLReader::PI => 'PI (Processing Instruction)', - \XMLReader::COMMENT => 'COMMENT', - \XMLReader::DOC => 'DOC', - \XMLReader::DOC_TYPE => 'DOC_TYPE', - \XMLReader::DOC_FRAGMENT => 'DOC_FRAGMENT', - \XMLReader::NOTATION => 'NOTATION', - \XMLReader::WHITESPACE => 'WHITESPACE', - \XMLReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE', - \XMLReader::END_ELEMENT => 'END_ELEMENT', - \XMLReader::END_ENTITY => 'END_ENTITY', - \XMLReader::XML_DECLARATION => 'XML_DECLARATION', - ]; - - public static function castXmlReader(\XMLReader $reader, array $a, Stub $stub, $isNested) - { - try { - $properties = [ - 'LOADDTD' => @$reader->getParserProperty(\XMLReader::LOADDTD), - 'DEFAULTATTRS' => @$reader->getParserProperty(\XMLReader::DEFAULTATTRS), - 'VALIDATE' => @$reader->getParserProperty(\XMLReader::VALIDATE), - 'SUBST_ENTITIES' => @$reader->getParserProperty(\XMLReader::SUBST_ENTITIES), - ]; - } catch (\Error $e) { - $properties = [ - 'LOADDTD' => false, - 'DEFAULTATTRS' => false, - 'VALIDATE' => false, - 'SUBST_ENTITIES' => false, - ]; - } - - $props = Caster::PREFIX_VIRTUAL.'parserProperties'; - $info = [ - 'localName' => $reader->localName, - 'prefix' => $reader->prefix, - 'nodeType' => new ConstStub(self::NODE_TYPES[$reader->nodeType], $reader->nodeType), - 'depth' => $reader->depth, - 'isDefault' => $reader->isDefault, - 'isEmptyElement' => \XMLReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement, - 'xmlLang' => $reader->xmlLang, - 'attributeCount' => $reader->attributeCount, - 'value' => $reader->value, - 'namespaceURI' => $reader->namespaceURI, - 'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI, - $props => $properties, - ]; - - if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, [], $count)) { - $info[$props] = new EnumStub($info[$props]); - $info[$props]->cut = $count; - } - - $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, [], $count); - // +2 because hasValue and hasAttributes are always filtered - $stub->cut += $count + 2; - - return $a + $info; - } -} diff --git a/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php b/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php deleted file mode 100644 index 455fc06..0000000 --- a/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Caster; - -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * Casts XML resources to array representation. - * - * @author Nicolas Grekas <p@tchwork.com> - * - * @final since Symfony 4.4 - */ -class XmlResourceCaster -{ - private const XML_ERRORS = [ - \XML_ERROR_NONE => 'XML_ERROR_NONE', - \XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', - \XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', - \XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS', - \XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN', - \XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN', - \XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR', - \XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH', - \XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBUTE', - \XML_ERROR_JUNK_AFTER_DOC_ELEMENT => 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT', - \XML_ERROR_PARAM_ENTITY_REF => 'XML_ERROR_PARAM_ENTITY_REF', - \XML_ERROR_UNDEFINED_ENTITY => 'XML_ERROR_UNDEFINED_ENTITY', - \XML_ERROR_RECURSIVE_ENTITY_REF => 'XML_ERROR_RECURSIVE_ENTITY_REF', - \XML_ERROR_ASYNC_ENTITY => 'XML_ERROR_ASYNC_ENTITY', - \XML_ERROR_BAD_CHAR_REF => 'XML_ERROR_BAD_CHAR_REF', - \XML_ERROR_BINARY_ENTITY_REF => 'XML_ERROR_BINARY_ENTITY_REF', - \XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF => 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', - \XML_ERROR_MISPLACED_XML_PI => 'XML_ERROR_MISPLACED_XML_PI', - \XML_ERROR_UNKNOWN_ENCODING => 'XML_ERROR_UNKNOWN_ENCODING', - \XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', - \XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', - \XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING', - ]; - - public static function castXml($h, array $a, Stub $stub, $isNested) - { - $a['current_byte_index'] = xml_get_current_byte_index($h); - $a['current_column_number'] = xml_get_current_column_number($h); - $a['current_line_number'] = xml_get_current_line_number($h); - $a['error_code'] = xml_get_error_code($h); - - if (isset(self::XML_ERRORS[$a['error_code']])) { - $a['error_code'] = new ConstStub(self::XML_ERRORS[$a['error_code']], $a['error_code']); - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php deleted file mode 100644 index d2e5039..0000000 --- a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php +++ /dev/null @@ -1,377 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Exception\ThrowingCasterException; - -/** - * AbstractCloner implements a generic caster mechanism for objects and resources. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -abstract class AbstractCloner implements ClonerInterface -{ - public static $defaultCasters = [ - '__PHP_Incomplete_Class' => ['Symfony\Component\VarDumper\Caster\Caster', 'castPhpIncompleteClass'], - - 'Symfony\Component\VarDumper\Caster\CutStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], - 'Symfony\Component\VarDumper\Caster\CutArrayStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castCutArray'], - 'Symfony\Component\VarDumper\Caster\ConstStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], - 'Symfony\Component\VarDumper\Caster\EnumStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castEnum'], - - 'Closure' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClosure'], - 'Generator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castGenerator'], - 'ReflectionType' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castType'], - 'ReflectionGenerator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReflectionGenerator'], - 'ReflectionClass' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClass'], - 'ReflectionFunctionAbstract' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castFunctionAbstract'], - 'ReflectionMethod' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castMethod'], - 'ReflectionParameter' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castParameter'], - 'ReflectionProperty' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castProperty'], - 'ReflectionReference' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReference'], - 'ReflectionExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castExtension'], - 'ReflectionZendExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castZendExtension'], - - 'Doctrine\Common\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Doctrine\Common\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castCommonProxy'], - 'Doctrine\ORM\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castOrmProxy'], - 'Doctrine\ORM\PersistentCollection' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castPersistentCollection'], - 'Doctrine\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - - 'DOMException' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castException'], - 'DOMStringList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNameList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMImplementation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castImplementation'], - 'DOMImplementationList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNode'], - 'DOMNameSpaceNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNameSpaceNode'], - 'DOMDocument' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocument'], - 'DOMNodeList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMNamedNodeMap' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], - 'DOMCharacterData' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castCharacterData'], - 'DOMAttr' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castAttr'], - 'DOMElement' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castElement'], - 'DOMText' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castText'], - 'DOMTypeinfo' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castTypeinfo'], - 'DOMDomError' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDomError'], - 'DOMLocator' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLocator'], - 'DOMDocumentType' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocumentType'], - 'DOMNotation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNotation'], - 'DOMEntity' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castEntity'], - 'DOMProcessingInstruction' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castProcessingInstruction'], - 'DOMXPath' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castXPath'], - - 'XMLReader' => ['Symfony\Component\VarDumper\Caster\XmlReaderCaster', 'castXmlReader'], - - 'ErrorException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castErrorException'], - 'Exception' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castException'], - 'Error' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castError'], - 'Symfony\Component\DependencyInjection\ContainerInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\EventDispatcher\EventDispatcherInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\HttpClient\CurlHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\NativeHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], - 'Symfony\Component\HttpClient\Response\CurlResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpClient\Response\NativeResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], - 'Symfony\Component\HttpFoundation\Request' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'], - 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'], - 'Symfony\Component\VarDumper\Caster\TraceStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'], - 'Symfony\Component\VarDumper\Caster\FrameStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'], - 'Symfony\Component\VarDumper\Cloner\AbstractCloner' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Symfony\Component\ErrorHandler\Exception\SilencedErrorContext' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'], - - 'Imagine\Image\ImageInterface' => ['Symfony\Component\VarDumper\Caster\ImagineCaster', 'castImage'], - - 'Ramsey\Uuid\UuidInterface' => ['Symfony\Component\VarDumper\Caster\UuidCaster', 'castRamseyUuid'], - - 'ProxyManager\Proxy\ProxyInterface' => ['Symfony\Component\VarDumper\Caster\ProxyManagerCaster', 'castProxy'], - 'PHPUnit_Framework_MockObject_MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PHPUnit\Framework\MockObject\MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'PHPUnit\Framework\MockObject\Stub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Prophecy\Prophecy\ProphecySubjectInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - 'Mockery\MockInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], - - 'PDO' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdo'], - 'PDOStatement' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdoStatement'], - - 'AMQPConnection' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castConnection'], - 'AMQPChannel' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castChannel'], - 'AMQPQueue' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castQueue'], - 'AMQPExchange' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castExchange'], - 'AMQPEnvelope' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castEnvelope'], - - 'ArrayObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayObject'], - 'ArrayIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayIterator'], - 'SplDoublyLinkedList' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castDoublyLinkedList'], - 'SplFileInfo' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileInfo'], - 'SplFileObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileObject'], - 'SplHeap' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], - 'SplObjectStorage' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castObjectStorage'], - 'SplPriorityQueue' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], - 'OuterIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castOuterIterator'], - 'WeakReference' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castWeakReference'], - - 'Redis' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedis'], - 'RedisArray' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisArray'], - 'RedisCluster' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisCluster'], - - 'DateTimeInterface' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castDateTime'], - 'DateInterval' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castInterval'], - 'DateTimeZone' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castTimeZone'], - 'DatePeriod' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castPeriod'], - - 'GMP' => ['Symfony\Component\VarDumper\Caster\GmpCaster', 'castGmp'], - - 'MessageFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castMessageFormatter'], - 'NumberFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castNumberFormatter'], - 'IntlTimeZone' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlTimeZone'], - 'IntlCalendar' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlCalendar'], - 'IntlDateFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlDateFormatter'], - - 'Memcached' => ['Symfony\Component\VarDumper\Caster\MemcachedCaster', 'castMemcached'], - - 'Ds\Collection' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castCollection'], - 'Ds\Map' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castMap'], - 'Ds\Pair' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPair'], - 'Symfony\Component\VarDumper\Caster\DsPairStub' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPairStub'], - - 'mysqli_driver' => ['Symfony\Component\VarDumper\Caster\MysqliCaster', 'castMysqliDriver'], - - 'CurlHandle' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], - ':curl' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], - - ':dba' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - ':dba persistent' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], - - 'GdImage' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], - ':gd' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], - - ':mysql link' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castMysqlLink'], - ':pgsql large object' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLargeObject'], - ':pgsql link' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], - ':pgsql link persistent' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], - ':pgsql result' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castResult'], - ':process' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castProcess'], - ':stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], - - 'OpenSSLCertificate' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], - ':OpenSSL X.509' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], - - ':persistent stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], - ':stream-context' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStreamContext'], - - 'XmlParser' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], - ':xml' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], - ]; - - protected $maxItems = 2500; - protected $maxString = -1; - protected $minDepth = 1; - - private $casters = []; - private $prevErrorHandler; - private $classInfo = []; - private $filter = 0; - - /** - * @param callable[]|null $casters A map of casters - * - * @see addCasters - */ - public function __construct(array $casters = null) - { - if (null === $casters) { - $casters = static::$defaultCasters; - } - $this->addCasters($casters); - } - - /** - * Adds casters for resources and objects. - * - * Maps resources or objects types to a callback. - * Types are in the key, with a callable caster for value. - * Resource types are to be prefixed with a `:`, - * see e.g. static::$defaultCasters. - * - * @param callable[] $casters A map of casters - */ - public function addCasters(array $casters) - { - foreach ($casters as $type => $callback) { - $this->casters[$type][] = $callback; - } - } - - /** - * Sets the maximum number of items to clone past the minimum depth in nested structures. - * - * @param int $maxItems - */ - public function setMaxItems($maxItems) - { - $this->maxItems = (int) $maxItems; - } - - /** - * Sets the maximum cloned length for strings. - * - * @param int $maxString - */ - public function setMaxString($maxString) - { - $this->maxString = (int) $maxString; - } - - /** - * Sets the minimum tree depth where we are guaranteed to clone all the items. After this - * depth is reached, only setMaxItems items will be cloned. - * - * @param int $minDepth - */ - public function setMinDepth($minDepth) - { - $this->minDepth = (int) $minDepth; - } - - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable - * @param int $filter A bit field of Caster::EXCLUDE_* constants - * - * @return Data The cloned variable represented by a Data object - */ - public function cloneVar($var, $filter = 0) - { - $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) { - if (\E_RECOVERABLE_ERROR === $type || \E_USER_ERROR === $type) { - // Cloner never dies - throw new \ErrorException($msg, 0, $type, $file, $line); - } - - if ($this->prevErrorHandler) { - return ($this->prevErrorHandler)($type, $msg, $file, $line, $context); - } - - return false; - }); - $this->filter = $filter; - - if ($gc = gc_enabled()) { - gc_disable(); - } - try { - return new Data($this->doClone($var)); - } finally { - if ($gc) { - gc_enable(); - } - restore_error_handler(); - $this->prevErrorHandler = null; - } - } - - /** - * Effectively clones the PHP variable. - * - * @param mixed $var Any PHP variable - * - * @return array The cloned variable represented in an array - */ - abstract protected function doClone($var); - - /** - * Casts an object to an array representation. - * - * @param bool $isNested True if the object is nested in the dumped structure - * - * @return array The object casted as array - */ - protected function castObject(Stub $stub, $isNested) - { - $obj = $stub->value; - $class = $stub->class; - - if (\PHP_VERSION_ID < 80000 ? "\0" === ($class[15] ?? null) : str_contains($class, "@anonymous\0")) { - $stub->class = get_debug_type($obj); - } - if (isset($this->classInfo[$class])) { - [$i, $parents, $hasDebugInfo, $fileInfo] = $this->classInfo[$class]; - } else { - $i = 2; - $parents = [$class]; - $hasDebugInfo = method_exists($class, '__debugInfo'); - - foreach (class_parents($class) as $p) { - $parents[] = $p; - ++$i; - } - foreach (class_implements($class) as $p) { - $parents[] = $p; - ++$i; - } - $parents[] = '*'; - - $r = new \ReflectionClass($class); - $fileInfo = $r->isInternal() || $r->isSubclassOf(Stub::class) ? [] : [ - 'file' => $r->getFileName(), - 'line' => $r->getStartLine(), - ]; - - $this->classInfo[$class] = [$i, $parents, $hasDebugInfo, $fileInfo]; - } - - $stub->attr += $fileInfo; - $a = Caster::castObject($obj, $class, $hasDebugInfo, $stub->class); - - try { - while ($i--) { - if (!empty($this->casters[$p = $parents[$i]])) { - foreach ($this->casters[$p] as $callback) { - $a = $callback($obj, $a, $stub, $isNested, $this->filter); - } - } - } - } catch (\Exception $e) { - $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; - } - - return $a; - } - - /** - * Casts a resource to an array representation. - * - * @param bool $isNested True if the object is nested in the dumped structure - * - * @return array The resource casted as array - */ - protected function castResource(Stub $stub, $isNested) - { - $a = []; - $res = $stub->value; - $type = $stub->class; - - try { - if (!empty($this->casters[':'.$type])) { - foreach ($this->casters[':'.$type] as $callback) { - $a = $callback($res, $a, $stub, $isNested, $this->filter); - } - } - } catch (\Exception $e) { - $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; - } - - return $a; - } -} diff --git a/vendor/symfony/var-dumper/Cloner/ClonerInterface.php b/vendor/symfony/var-dumper/Cloner/ClonerInterface.php deleted file mode 100644 index 7ed287a..0000000 --- a/vendor/symfony/var-dumper/Cloner/ClonerInterface.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -interface ClonerInterface -{ - /** - * Clones a PHP variable. - * - * @param mixed $var Any PHP variable - * - * @return Data The cloned variable represented by a Data object - */ - public function cloneVar($var); -} diff --git a/vendor/symfony/var-dumper/Cloner/Cursor.php b/vendor/symfony/var-dumper/Cloner/Cursor.php deleted file mode 100644 index 1fd796d..0000000 --- a/vendor/symfony/var-dumper/Cloner/Cursor.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * Represents the current state of a dumper while dumping. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class Cursor -{ - public const HASH_INDEXED = Stub::ARRAY_INDEXED; - public const HASH_ASSOC = Stub::ARRAY_ASSOC; - public const HASH_OBJECT = Stub::TYPE_OBJECT; - public const HASH_RESOURCE = Stub::TYPE_RESOURCE; - - public $depth = 0; - public $refIndex = 0; - public $softRefTo = 0; - public $softRefCount = 0; - public $softRefHandle = 0; - public $hardRefTo = 0; - public $hardRefCount = 0; - public $hardRefHandle = 0; - public $hashType; - public $hashKey; - public $hashKeyIsBinary; - public $hashIndex = 0; - public $hashLength = 0; - public $hashCut = 0; - public $stop = false; - public $attr = []; - public $skipChildren = false; -} diff --git a/vendor/symfony/var-dumper/Cloner/Data.php b/vendor/symfony/var-dumper/Cloner/Data.php deleted file mode 100644 index 8f621b1..0000000 --- a/vendor/symfony/var-dumper/Cloner/Data.php +++ /dev/null @@ -1,470 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class Data implements \ArrayAccess, \Countable, \IteratorAggregate -{ - private $data; - private $position = 0; - private $key = 0; - private $maxDepth = 20; - private $maxItemsPerDepth = -1; - private $useRefHandles = -1; - private $context = []; - - /** - * @param array $data An array as returned by ClonerInterface::cloneVar() - */ - public function __construct(array $data) - { - $this->data = $data; - } - - /** - * @return string|null The type of the value - */ - public function getType() - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!$item instanceof Stub) { - return \gettype($item); - } - if (Stub::TYPE_STRING === $item->type) { - return 'string'; - } - if (Stub::TYPE_ARRAY === $item->type) { - return 'array'; - } - if (Stub::TYPE_OBJECT === $item->type) { - return $item->class; - } - if (Stub::TYPE_RESOURCE === $item->type) { - return $item->class.' resource'; - } - - return null; - } - - /** - * @param array|bool $recursive Whether values should be resolved recursively or not - * - * @return string|int|float|bool|array|Data[]|null A native representation of the original value - */ - public function getValue($recursive = false) - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!($item = $this->getStub($item)) instanceof Stub) { - return $item; - } - if (Stub::TYPE_STRING === $item->type) { - return $item->value; - } - - $children = $item->position ? $this->data[$item->position] : []; - - foreach ($children as $k => $v) { - if ($recursive && !($v = $this->getStub($v)) instanceof Stub) { - continue; - } - $children[$k] = clone $this; - $children[$k]->key = $k; - $children[$k]->position = $item->position; - - if ($recursive) { - if (Stub::TYPE_REF === $v->type && ($v = $this->getStub($v->value)) instanceof Stub) { - $recursive = (array) $recursive; - if (isset($recursive[$v->position])) { - continue; - } - $recursive[$v->position] = true; - } - $children[$k] = $children[$k]->getValue($recursive); - } - } - - return $children; - } - - /** - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return \count($this->getValue()); - } - - /** - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - if (!\is_array($value = $this->getValue())) { - throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, \gettype($value))); - } - - yield from $value; - } - - public function __get($key) - { - if (null !== $data = $this->seek($key)) { - $item = $this->getStub($data->data[$data->position][$data->key]); - - return $item instanceof Stub || [] === $item ? $data : $item; - } - - return null; - } - - /** - * @return bool - */ - public function __isset($key) - { - return null !== $this->seek($key); - } - - /** - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return $this->__isset($key); - } - - /** - * @return mixed - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->__get($key); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - throw new \BadMethodCallException(self::class.' objects are immutable.'); - } - - /** - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - throw new \BadMethodCallException(self::class.' objects are immutable.'); - } - - /** - * @return string - */ - public function __toString() - { - $value = $this->getValue(); - - if (!\is_array($value)) { - return (string) $value; - } - - return sprintf('%s (count=%d)', $this->getType(), \count($value)); - } - - /** - * Returns a depth limited clone of $this. - * - * @param int $maxDepth The max dumped depth level - * - * @return static - */ - public function withMaxDepth($maxDepth) - { - $data = clone $this; - $data->maxDepth = (int) $maxDepth; - - return $data; - } - - /** - * Limits the number of elements per depth level. - * - * @param int $maxItemsPerDepth The max number of items dumped per depth level - * - * @return static - */ - public function withMaxItemsPerDepth($maxItemsPerDepth) - { - $data = clone $this; - $data->maxItemsPerDepth = (int) $maxItemsPerDepth; - - return $data; - } - - /** - * Enables/disables objects' identifiers tracking. - * - * @param bool $useRefHandles False to hide global ref. handles - * - * @return static - */ - public function withRefHandles($useRefHandles) - { - $data = clone $this; - $data->useRefHandles = $useRefHandles ? -1 : 0; - - return $data; - } - - /** - * @return static - */ - public function withContext(array $context) - { - $data = clone $this; - $data->context = $context; - - return $data; - } - - /** - * Seeks to a specific key in nested data structures. - * - * @param string|int $key The key to seek to - * - * @return static|null Null if the key is not set - */ - public function seek($key) - { - $item = $this->data[$this->position][$this->key]; - - if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { - $item = $item->value; - } - if (!($item = $this->getStub($item)) instanceof Stub || !$item->position) { - return null; - } - $keys = [$key]; - - switch ($item->type) { - case Stub::TYPE_OBJECT: - $keys[] = Caster::PREFIX_DYNAMIC.$key; - $keys[] = Caster::PREFIX_PROTECTED.$key; - $keys[] = Caster::PREFIX_VIRTUAL.$key; - $keys[] = "\0$item->class\0$key"; - // no break - case Stub::TYPE_ARRAY: - case Stub::TYPE_RESOURCE: - break; - default: - return null; - } - - $data = null; - $children = $this->data[$item->position]; - - foreach ($keys as $key) { - if (isset($children[$key]) || \array_key_exists($key, $children)) { - $data = clone $this; - $data->key = $key; - $data->position = $item->position; - break; - } - } - - return $data; - } - - /** - * Dumps data with a DumperInterface dumper. - */ - public function dump(DumperInterface $dumper) - { - $refs = [0]; - $cursor = new Cursor(); - - if ($cursor->attr = $this->context[SourceContextProvider::class] ?? []) { - $cursor->attr['if_links'] = true; - $cursor->hashType = -1; - $dumper->dumpScalar($cursor, 'default', '^'); - $cursor->attr = ['if_links' => true]; - $dumper->dumpScalar($cursor, 'default', ' '); - $cursor->hashType = 0; - } - - $this->dumpItem($dumper, $cursor, $refs, $this->data[$this->position][$this->key]); - } - - /** - * Depth-first dumping of items. - * - * @param mixed $item A Stub object or the original value being dumped - */ - private function dumpItem(DumperInterface $dumper, Cursor $cursor, array &$refs, $item) - { - $cursor->refIndex = 0; - $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; - $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; - $firstSeen = true; - - if (!$item instanceof Stub) { - $cursor->attr = []; - $type = \gettype($item); - if ($item && 'array' === $type) { - $item = $this->getStub($item); - } - } elseif (Stub::TYPE_REF === $item->type) { - if ($item->handle) { - if (!isset($refs[$r = $item->handle - (\PHP_INT_MAX >> 1)])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->hardRefTo = $refs[$r]; - $cursor->hardRefHandle = $this->useRefHandles & $item->handle; - $cursor->hardRefCount = 0 < $item->handle ? $item->refCount : 0; - } - $cursor->attr = $item->attr; - $type = $item->class ?: \gettype($item->value); - $item = $this->getStub($item->value); - } - if ($item instanceof Stub) { - if ($item->refCount) { - if (!isset($refs[$r = $item->handle])) { - $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; - } else { - $firstSeen = false; - } - $cursor->softRefTo = $refs[$r]; - } - $cursor->softRefHandle = $this->useRefHandles & $item->handle; - $cursor->softRefCount = $item->refCount; - $cursor->attr = $item->attr; - $cut = $item->cut; - - if ($item->position && $firstSeen) { - $children = $this->data[$item->position]; - - if ($cursor->stop) { - if ($cut >= 0) { - $cut += \count($children); - } - $children = []; - } - } else { - $children = []; - } - switch ($item->type) { - case Stub::TYPE_STRING: - $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); - break; - - case Stub::TYPE_ARRAY: - $item = clone $item; - $item->type = $item->class; - $item->class = $item->value; - // no break - case Stub::TYPE_OBJECT: - case Stub::TYPE_RESOURCE: - $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; - $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); - if ($withChildren) { - if ($cursor->skipChildren) { - $withChildren = false; - $cut = -1; - } else { - $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); - } - } elseif ($children && 0 <= $cut) { - $cut += \count($children); - } - $cursor->skipChildren = false; - $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); - break; - - default: - throw new \RuntimeException(sprintf('Unexpected Stub type: "%s".', $item->type)); - } - } elseif ('array' === $type) { - $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); - $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); - } elseif ('string' === $type) { - $dumper->dumpString($cursor, $item, false, 0); - } else { - $dumper->dumpScalar($cursor, $type, $item); - } - } - - /** - * Dumps children of hash structures. - * - * @return int The final number of removed items - */ - private function dumpChildren(DumperInterface $dumper, Cursor $parentCursor, array &$refs, array $children, int $hashCut, int $hashType, bool $dumpKeys): int - { - $cursor = clone $parentCursor; - ++$cursor->depth; - $cursor->hashType = $hashType; - $cursor->hashIndex = 0; - $cursor->hashLength = \count($children); - $cursor->hashCut = $hashCut; - foreach ($children as $key => $child) { - $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); - $cursor->hashKey = $dumpKeys ? $key : null; - $this->dumpItem($dumper, $cursor, $refs, $child); - if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { - $parentCursor->stop = true; - - return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; - } - } - - return $hashCut; - } - - private function getStub($item) - { - if (!$item || !\is_array($item)) { - return $item; - } - - $stub = new Stub(); - $stub->type = Stub::TYPE_ARRAY; - foreach ($item as $stub->class => $stub->position) { - } - if (isset($item[0])) { - $stub->cut = $item[0]; - } - $stub->value = $stub->cut + ($stub->position ? \count($this->data[$stub->position]) : 0); - - return $stub; - } -} diff --git a/vendor/symfony/var-dumper/Cloner/DumperInterface.php b/vendor/symfony/var-dumper/Cloner/DumperInterface.php deleted file mode 100644 index ec8ef27..0000000 --- a/vendor/symfony/var-dumper/Cloner/DumperInterface.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * DumperInterface used by Data objects. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface DumperInterface -{ - /** - * Dumps a scalar value. - * - * @param string $type The PHP type of the value being dumped - * @param string|int|float|bool $value The scalar value being dumped - */ - public function dumpScalar(Cursor $cursor, $type, $value); - - /** - * Dumps a string. - * - * @param string $str The string being dumped - * @param bool $bin Whether $str is UTF-8 or binary encoded - * @param int $cut The number of characters $str has been cut by - */ - public function dumpString(Cursor $cursor, $str, $bin, $cut); - - /** - * Dumps while entering an hash. - * - * @param int $type A Cursor::HASH_* const for the type of hash - * @param string|int $class The object class, resource type or array count - * @param bool $hasChild When the dump of the hash has child item - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild); - - /** - * Dumps while leaving an hash. - * - * @param int $type A Cursor::HASH_* const for the type of hash - * @param string|int $class The object class, resource type or array count - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut); -} diff --git a/vendor/symfony/var-dumper/Cloner/Stub.php b/vendor/symfony/var-dumper/Cloner/Stub.php deleted file mode 100644 index 073c56e..0000000 --- a/vendor/symfony/var-dumper/Cloner/Stub.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * Represents the main properties of a PHP variable. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class Stub -{ - public const TYPE_REF = 1; - public const TYPE_STRING = 2; - public const TYPE_ARRAY = 3; - public const TYPE_OBJECT = 4; - public const TYPE_RESOURCE = 5; - - public const STRING_BINARY = 1; - public const STRING_UTF8 = 2; - - public const ARRAY_ASSOC = 1; - public const ARRAY_INDEXED = 2; - - public $type = self::TYPE_REF; - public $class = ''; - public $value; - public $cut = 0; - public $handle = 0; - public $refCount = 0; - public $position = 0; - public $attr = []; - - private static $defaultProperties = []; - - /** - * @internal - */ - public function __sleep(): array - { - $properties = []; - - if (!isset(self::$defaultProperties[$c = static::class])) { - self::$defaultProperties[$c] = get_class_vars($c); - - foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { - unset(self::$defaultProperties[$c][$k]); - } - } - - foreach (self::$defaultProperties[$c] as $k => $v) { - if ($this->$k !== $v) { - $properties[] = $k; - } - } - - return $properties; - } -} diff --git a/vendor/symfony/var-dumper/Cloner/VarCloner.php b/vendor/symfony/var-dumper/Cloner/VarCloner.php deleted file mode 100644 index cd6e7dc..0000000 --- a/vendor/symfony/var-dumper/Cloner/VarCloner.php +++ /dev/null @@ -1,324 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Cloner; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class VarCloner extends AbstractCloner -{ - private static $gid; - private static $arrayCache = []; - - /** - * {@inheritdoc} - */ - protected function doClone($var) - { - $len = 1; // Length of $queue - $pos = 0; // Number of cloned items past the minimum depth - $refsCounter = 0; // Hard references counter - $queue = [[$var]]; // This breadth-first queue is the return value - $indexedArrays = []; // Map of queue indexes that hold numerically indexed arrays - $hardRefs = []; // Map of original zval ids to stub objects - $objRefs = []; // Map of original object handles to their stub object counterpart - $objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning - $resRefs = []; // Map of original resource handles to their stub object counterpart - $values = []; // Map of stub objects' ids to original values - $maxItems = $this->maxItems; - $maxString = $this->maxString; - $minDepth = $this->minDepth; - $currentDepth = 0; // Current tree depth - $currentDepthFinalIndex = 0; // Final $queue index for current tree depth - $minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached - $cookie = (object) []; // Unique object used to detect hard references - $a = null; // Array cast for nested structures - $stub = null; // Stub capturing the main properties of an original item value - // or null if the original value is used directly - - if (!$gid = self::$gid) { - $gid = self::$gid = md5(random_bytes(6)); // Unique string used to detect the special $GLOBALS variable - } - $arrayStub = new Stub(); - $arrayStub->type = Stub::TYPE_ARRAY; - $fromObjCast = false; - - for ($i = 0; $i < $len; ++$i) { - // Detect when we move on to the next tree depth - if ($i > $currentDepthFinalIndex) { - ++$currentDepth; - $currentDepthFinalIndex = $len - 1; - if ($currentDepth >= $minDepth) { - $minimumDepthReached = true; - } - } - - $refs = $vals = $queue[$i]; - if (\PHP_VERSION_ID < 70200 && empty($indexedArrays[$i])) { - // see https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts - foreach ($vals as $k => $v) { - if (\is_int($k)) { - continue; - } - foreach ([$k => true] as $gk => $gv) { - } - if ($gk !== $k) { - $fromObjCast = true; - $refs = $vals = array_values($queue[$i]); - break; - } - } - } - foreach ($vals as $k => $v) { - // $v is the original value or a stub object in case of hard references - - if (\PHP_VERSION_ID >= 70400) { - $zvalRef = ($r = \ReflectionReference::fromArrayElement($vals, $k)) ? $r->getId() : null; - } else { - $refs[$k] = $cookie; - $zvalRef = $vals[$k] === $cookie; - } - - if ($zvalRef) { - $vals[$k] = &$stub; // Break hard references to make $queue completely - unset($stub); // independent from the original structure - if (\PHP_VERSION_ID >= 70400 ? null !== $vals[$k] = $hardRefs[$zvalRef] ?? null : $v instanceof Stub && isset($hardRefs[spl_object_id($v)])) { - if (\PHP_VERSION_ID >= 70400) { - $v = $vals[$k]; - } else { - $refs[$k] = $vals[$k] = $v; - } - if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { - ++$v->value->refCount; - } - ++$v->refCount; - continue; - } - $vals[$k] = new Stub(); - $vals[$k]->value = $v; - $vals[$k]->handle = ++$refsCounter; - - if (\PHP_VERSION_ID >= 70400) { - $hardRefs[$zvalRef] = $vals[$k]; - } else { - $refs[$k] = $vals[$k]; - $h = spl_object_id($refs[$k]); - $hardRefs[$h] = &$refs[$k]; - $values[$h] = $v; - } - } - // Create $stub when the original value $v can not be used directly - // If $v is a nested structure, put that structure in array $a - switch (true) { - case null === $v: - case \is_bool($v): - case \is_int($v): - case \is_float($v): - continue 2; - case \is_string($v): - if ('' === $v) { - continue 2; - } - if (!preg_match('//u', $v)) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_BINARY; - if (0 <= $maxString && 0 < $cut = \strlen($v) - $maxString) { - $stub->cut = $cut; - $stub->value = substr($v, 0, -$cut); - } else { - $stub->value = $v; - } - } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = mb_strlen($v, 'UTF-8') - $maxString) { - $stub = new Stub(); - $stub->type = Stub::TYPE_STRING; - $stub->class = Stub::STRING_UTF8; - $stub->cut = $cut; - $stub->value = mb_substr($v, 0, $maxString, 'UTF-8'); - } else { - continue 2; - } - $a = null; - break; - - case \is_array($v): - if (!$v) { - continue 2; - } - $stub = $arrayStub; - $stub->class = Stub::ARRAY_INDEXED; - - $j = -1; - foreach ($v as $gk => $gv) { - if ($gk !== ++$j) { - $stub->class = Stub::ARRAY_ASSOC; - break; - } - } - $a = $v; - - if (Stub::ARRAY_ASSOC === $stub->class) { - // Copies of $GLOBALS have very strange behavior, - // let's detect them with some black magic - if (\PHP_VERSION_ID < 80100 && ($a[$gid] = true) && isset($v[$gid])) { - unset($v[$gid]); - $a = []; - foreach ($v as $gk => &$gv) { - if ($v === $gv && (\PHP_VERSION_ID < 70400 || !isset($hardRefs[\ReflectionReference::fromArrayElement($v, $gk)->getId()]))) { - unset($v); - $v = new Stub(); - $v->value = [$v->cut = \count($gv), Stub::TYPE_ARRAY => 0]; - $v->handle = -1; - if (\PHP_VERSION_ID >= 70400) { - $gv = &$a[$gk]; - $hardRefs[\ReflectionReference::fromArrayElement($a, $gk)->getId()] = &$gv; - } else { - $gv = &$hardRefs[spl_object_id($v)]; - } - $gv = $v; - } - - $a[$gk] = &$gv; - } - unset($gv); - } else { - $a = $v; - } - } elseif (\PHP_VERSION_ID < 70200) { - $indexedArrays[$len] = true; - } - break; - - case \is_object($v): - case $v instanceof \__PHP_Incomplete_Class: - if (empty($objRefs[$h = spl_object_id($v)])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_OBJECT; - $stub->class = \get_class($v); - $stub->value = $v; - $stub->handle = $h; - $a = $this->castObject($stub, 0 < $i); - if ($v !== $stub->value) { - if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { - break; - } - $stub->handle = $h = spl_object_id($stub->value); - } - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { - $stub->cut = \count($a); - $a = null; - } - } - if (empty($objRefs[$h])) { - $objRefs[$h] = $stub; - $objects[] = $v; - } else { - $stub = $objRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - - default: // resource - if (empty($resRefs[$h = (int) $v])) { - $stub = new Stub(); - $stub->type = Stub::TYPE_RESOURCE; - if ('Unknown' === $stub->class = @get_resource_type($v)) { - $stub->class = 'Closed'; - } - $stub->value = $v; - $stub->handle = $h; - $a = $this->castResource($stub, 0 < $i); - $stub->value = null; - if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { - $stub->cut = \count($a); - $a = null; - } - } - if (empty($resRefs[$h])) { - $resRefs[$h] = $stub; - } else { - $stub = $resRefs[$h]; - ++$stub->refCount; - $a = null; - } - break; - } - - if ($a) { - if (!$minimumDepthReached || 0 > $maxItems) { - $queue[$len] = $a; - $stub->position = $len++; - } elseif ($pos < $maxItems) { - if ($maxItems < $pos += \count($a)) { - $a = \array_slice($a, 0, $maxItems - $pos, true); - if ($stub->cut >= 0) { - $stub->cut += $pos - $maxItems; - } - } - $queue[$len] = $a; - $stub->position = $len++; - } elseif ($stub->cut >= 0) { - $stub->cut += \count($a); - $stub->position = 0; - } - } - - if ($arrayStub === $stub) { - if ($arrayStub->cut) { - $stub = [$arrayStub->cut, $arrayStub->class => $arrayStub->position]; - $arrayStub->cut = 0; - } elseif (isset(self::$arrayCache[$arrayStub->class][$arrayStub->position])) { - $stub = self::$arrayCache[$arrayStub->class][$arrayStub->position]; - } else { - self::$arrayCache[$arrayStub->class][$arrayStub->position] = $stub = [$arrayStub->class => $arrayStub->position]; - } - } - - if (!$zvalRef) { - $vals[$k] = $stub; - } elseif (\PHP_VERSION_ID >= 70400) { - $hardRefs[$zvalRef]->value = $stub; - } else { - $refs[$k]->value = $stub; - } - } - - if ($fromObjCast) { - $fromObjCast = false; - $refs = $vals; - $vals = []; - $j = -1; - foreach ($queue[$i] as $k => $v) { - foreach ([$k => true] as $gk => $gv) { - } - if ($gk !== $k) { - $vals = (object) $vals; - $vals->{$k} = $refs[++$j]; - $vals = (array) $vals; - } else { - $vals[$k] = $refs[++$j]; - } - } - } - - $queue[$i] = $vals; - } - - foreach ($values as $h => $v) { - $hardRefs[$h] = $v; - } - - return $queue; - } -} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php b/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php deleted file mode 100644 index 7d9ec0e..0000000 --- a/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Formatter\OutputFormatterStyle; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * Describe collected data clones for cli output. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - * - * @final - */ -class CliDescriptor implements DumpDescriptorInterface -{ - private $dumper; - private $lastIdentifier; - private $supportsHref; - - public function __construct(CliDumper $dumper) - { - $this->dumper = $dumper; - $this->supportsHref = method_exists(OutputFormatterStyle::class, 'setHref'); - } - - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void - { - $io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); - $this->dumper->setColors($output->isDecorated()); - - $rows = [['date', date('r', (int) $context['timestamp'])]]; - $lastIdentifier = $this->lastIdentifier; - $this->lastIdentifier = $clientId; - - $section = "Received from client #$clientId"; - if (isset($context['request'])) { - $request = $context['request']; - $this->lastIdentifier = $request['identifier']; - $section = sprintf('%s %s', $request['method'], $request['uri']); - if ($controller = $request['controller']) { - $rows[] = ['controller', rtrim($this->dumper->dump($controller, true), "\n")]; - } - } elseif (isset($context['cli'])) { - $this->lastIdentifier = $context['cli']['identifier']; - $section = '$ '.$context['cli']['command_line']; - } - - if ($this->lastIdentifier !== $lastIdentifier) { - $io->section($section); - } - - if (isset($context['source'])) { - $source = $context['source']; - $sourceInfo = sprintf('%s on line %d', $source['name'], $source['line']); - $fileLink = $source['file_link'] ?? null; - if ($this->supportsHref && $fileLink) { - $sourceInfo = sprintf('<href=%s>%s</>', $fileLink, $sourceInfo); - } - $rows[] = ['source', $sourceInfo]; - $file = $source['file_relative'] ?? $source['file']; - $rows[] = ['file', $file]; - } - - $io->table([], $rows); - - if (!$this->supportsHref && isset($fileLink)) { - $io->writeln(['<info>Open source in your IDE/browser:</info>', $fileLink]); - $io->newLine(); - } - - $this->dumper->dump($data); - $io->newLine(); - } -} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php b/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php deleted file mode 100644 index 267d27b..0000000 --- a/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - */ -interface DumpDescriptorInterface -{ - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void; -} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php b/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php deleted file mode 100644 index 636b618..0000000 --- a/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command\Descriptor; - -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -/** - * Describe collected data clones for html output. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - * - * @final - */ -class HtmlDescriptor implements DumpDescriptorInterface -{ - private $dumper; - private $initialized = false; - - public function __construct(HtmlDumper $dumper) - { - $this->dumper = $dumper; - } - - public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void - { - if (!$this->initialized) { - $styles = file_get_contents(__DIR__.'/../../Resources/css/htmlDescriptor.css'); - $scripts = file_get_contents(__DIR__.'/../../Resources/js/htmlDescriptor.js'); - $output->writeln("<style>$styles</style><script>$scripts</script>"); - $this->initialized = true; - } - - $title = '-'; - if (isset($context['request'])) { - $request = $context['request']; - $controller = "<span class='dumped-tag'>{$this->dumper->dump($request['controller'], true, ['maxDepth' => 0])}</span>"; - $title = sprintf('<code>%s</code> <a href="%s">%s</a>', $request['method'], $uri = $request['uri'], $uri); - $dedupIdentifier = $request['identifier']; - } elseif (isset($context['cli'])) { - $title = '<code>$ </code>'.$context['cli']['command_line']; - $dedupIdentifier = $context['cli']['identifier']; - } else { - $dedupIdentifier = uniqid('', true); - } - - $sourceDescription = ''; - if (isset($context['source'])) { - $source = $context['source']; - $projectDir = $source['project_dir'] ?? null; - $sourceDescription = sprintf('%s on line %d', $source['name'], $source['line']); - if (isset($source['file_link'])) { - $sourceDescription = sprintf('<a href="%s">%s</a>', $source['file_link'], $sourceDescription); - } - } - - $isoDate = $this->extractDate($context, 'c'); - $tags = array_filter([ - 'controller' => $controller ?? null, - 'project dir' => $projectDir ?? null, - ]); - - $output->writeln(<<<HTML -<article data-dedup-id="$dedupIdentifier"> - <header> - <div class="row"> - <h2 class="col">$title</h2> - <time class="col text-small" title="$isoDate" datetime="$isoDate"> - {$this->extractDate($context)} - </time> - </div> - {$this->renderTags($tags)} - </header> - <section class="body"> - <p class="text-small"> - $sourceDescription - </p> - {$this->dumper->dump($data, true)} - </section> -</article> -HTML - ); - } - - private function extractDate(array $context, string $format = 'r'): string - { - return date($format, (int) $context['timestamp']); - } - - private function renderTags(array $tags): string - { - if (!$tags) { - return ''; - } - - $renderedTags = ''; - foreach ($tags as $key => $value) { - $renderedTags .= sprintf('<li><span class="badge">%s</span>%s</li>', $key, $value); - } - - return <<<HTML -<div class="row"> - <ul class="tags"> - $renderedTags - </ul> -</div> -HTML; - } -} diff --git a/vendor/symfony/var-dumper/Command/ServerDumpCommand.php b/vendor/symfony/var-dumper/Command/ServerDumpCommand.php deleted file mode 100644 index b66301b..0000000 --- a/vendor/symfony/var-dumper/Command/ServerDumpCommand.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Command; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Style\SymfonyStyle; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; -use Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface; -use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\Server\DumpServer; - -/** - * Starts a dump server to collect and output dumps on a single place with multiple formats support. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - * - * @final - */ -class ServerDumpCommand extends Command -{ - protected static $defaultName = 'server:dump'; - - private $server; - - /** @var DumpDescriptorInterface[] */ - private $descriptors; - - public function __construct(DumpServer $server, array $descriptors = []) - { - $this->server = $server; - $this->descriptors = $descriptors + [ - 'cli' => new CliDescriptor(new CliDumper()), - 'html' => new HtmlDescriptor(new HtmlDumper()), - ]; - - parent::__construct(); - } - - protected function configure() - { - $availableFormats = implode(', ', array_keys($this->descriptors)); - - $this - ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', $availableFormats), 'cli') - ->setDescription('Start a dump server that collects and displays dumps in a single place') - ->setHelp(<<<'EOF' -<info>%command.name%</info> starts a dump server that collects and displays -dumps in a single place for debugging you application: - - <info>php %command.full_name%</info> - -You can consult dumped data in HTML format in your browser by providing the <comment>--format=html</comment> option -and redirecting the output to a file: - - <info>php %command.full_name% --format="html" > dump.html</info> - -EOF - ) - ; - } - - protected function execute(InputInterface $input, OutputInterface $output): int - { - $io = new SymfonyStyle($input, $output); - $format = $input->getOption('format'); - - if (!$descriptor = $this->descriptors[$format] ?? null) { - throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $format)); - } - - $errorIo = $io->getErrorStyle(); - $errorIo->title('Symfony Var Dumper Server'); - - $this->server->start(); - - $errorIo->success(sprintf('Server listening on %s', $this->server->getHost())); - $errorIo->comment('Quit the server with CONTROL-C.'); - - $this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) { - $descriptor->describe($io, $data, $context, $clientId); - }); - - return 0; - } -} diff --git a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php deleted file mode 100644 index 4185329..0000000 --- a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php +++ /dev/null @@ -1,210 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\DumperInterface; - -/** - * Abstract mechanism for dumping a Data object. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -abstract class AbstractDumper implements DataDumperInterface, DumperInterface -{ - public const DUMP_LIGHT_ARRAY = 1; - public const DUMP_STRING_LENGTH = 2; - public const DUMP_COMMA_SEPARATOR = 4; - public const DUMP_TRAILING_COMMA = 8; - - public static $defaultOutput = 'php://output'; - - protected $line = ''; - protected $lineDumper; - protected $outputStream; - protected $decimalPoint; // This is locale dependent - protected $indentPad = ' '; - protected $flags; - - private $charset = ''; - - /** - * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput - * @param string|null $charset The default character encoding to use for non-UTF8 strings - * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - $this->flags = $flags; - $this->setCharset($charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8'); - $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point']; - $this->setOutput($output ?: static::$defaultOutput); - if (!$output && \is_string(static::$defaultOutput)) { - static::$defaultOutput = $this->outputStream; - } - } - - /** - * Sets the output destination of the dumps. - * - * @param callable|resource|string $output A line dumper callable, an opened stream or an output path - * - * @return callable|resource|string The previous output destination - */ - public function setOutput($output) - { - $prev = $this->outputStream ?? $this->lineDumper; - - if (\is_callable($output)) { - $this->outputStream = null; - $this->lineDumper = $output; - } else { - if (\is_string($output)) { - $output = fopen($output, 'w'); - } - $this->outputStream = $output; - $this->lineDumper = [$this, 'echoLine']; - } - - return $prev; - } - - /** - * Sets the default character encoding to use for non-UTF8 strings. - * - * @param string $charset The default character encoding to use for non-UTF8 strings - * - * @return string The previous charset - */ - public function setCharset($charset) - { - $prev = $this->charset; - - $charset = strtoupper($charset); - $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; - - $this->charset = $charset; - - return $prev; - } - - /** - * Sets the indentation pad string. - * - * @param string $pad A string that will be prepended to dumped lines, repeated by nesting level - * - * @return string The previous indent pad - */ - public function setIndentPad($pad) - { - $prev = $this->indentPad; - $this->indentPad = $pad; - - return $prev; - } - - /** - * Dumps a Data object. - * - * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump - * - * @return string|null The dump as string when $output is true - */ - public function dump(Data $data, $output = null) - { - $this->decimalPoint = \PHP_VERSION_ID >= 80000 ? '.' : localeconv()['decimal_point']; - - if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) { - setlocale(\LC_NUMERIC, 'C'); - } - - if ($returnDump = true === $output) { - $output = fopen('php://memory', 'r+'); - } - if ($output) { - $prevOutput = $this->setOutput($output); - } - try { - $data->dump($this); - $this->dumpLine(-1); - - if ($returnDump) { - $result = stream_get_contents($output, -1, 0); - fclose($output); - - return $result; - } - } finally { - if ($output) { - $this->setOutput($prevOutput); - } - if ($locale) { - setlocale(\LC_NUMERIC, $locale); - } - } - - return null; - } - - /** - * Dumps the current line. - * - * @param int $depth The recursive depth in the dumped structure for the line being dumped, - * or -1 to signal the end-of-dump to the line dumper callable - */ - protected function dumpLine($depth) - { - ($this->lineDumper)($this->line, $depth, $this->indentPad); - $this->line = ''; - } - - /** - * Generic line dumper callback. - * - * @param string $line The line to write - * @param int $depth The recursive depth in the dumped structure - * @param string $indentPad The line indent pad - */ - protected function echoLine($line, $depth, $indentPad) - { - if (-1 !== $depth) { - fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); - } - } - - /** - * Converts a non-UTF-8 string to UTF-8. - * - * @param string|null $s The non-UTF-8 string to convert - * - * @return string|null The string converted to UTF-8 - */ - protected function utf8Encode($s) - { - if (null === $s || preg_match('//u', $s)) { - return $s; - } - - if (!\function_exists('iconv')) { - throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); - } - - if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { - return $c; - } - if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { - return $c; - } - - return iconv('CP850', 'UTF-8', $s); - } -} diff --git a/vendor/symfony/var-dumper/Dumper/CliDumper.php b/vendor/symfony/var-dumper/Dumper/CliDumper.php deleted file mode 100644 index e3861cd..0000000 --- a/vendor/symfony/var-dumper/Dumper/CliDumper.php +++ /dev/null @@ -1,655 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Cursor; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * CliDumper dumps variables for command line output. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class CliDumper extends AbstractDumper -{ - public static $defaultColors; - public static $defaultOutput = 'php://stdout'; - - protected $colors; - protected $maxStringWidth = 0; - protected $styles = [ - // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics - 'default' => '0;38;5;208', - 'num' => '1;38;5;38', - 'const' => '1;38;5;208', - 'str' => '1;38;5;113', - 'note' => '38;5;38', - 'ref' => '38;5;247', - 'public' => '', - 'protected' => '', - 'private' => '', - 'meta' => '38;5;170', - 'key' => '38;5;113', - 'index' => '38;5;38', - ]; - - protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; - protected static $controlCharsMap = [ - "\t" => '\t', - "\n" => '\n', - "\v" => '\v', - "\f" => '\f', - "\r" => '\r', - "\033" => '\e', - ]; - - protected $collapseNextHash = false; - protected $expandNextHash = false; - - private $displayOptions = [ - 'fileLinkFormat' => null, - ]; - - private $handlesHrefGracefully; - - /** - * {@inheritdoc} - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - parent::__construct($output, $charset, $flags); - - if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { - // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI - $this->setStyles([ - 'default' => '31', - 'num' => '1;34', - 'const' => '1;31', - 'str' => '1;32', - 'note' => '34', - 'ref' => '1;30', - 'meta' => '35', - 'key' => '32', - 'index' => '34', - ]); - } - - $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; - } - - /** - * Enables/disables colored output. - * - * @param bool $colors - */ - public function setColors($colors) - { - $this->colors = (bool) $colors; - } - - /** - * Sets the maximum number of characters per line for dumped strings. - * - * @param int $maxStringWidth - */ - public function setMaxStringWidth($maxStringWidth) - { - $this->maxStringWidth = (int) $maxStringWidth; - } - - /** - * Configures styles. - * - * @param array $styles A map of style names to style definitions - */ - public function setStyles(array $styles) - { - $this->styles = $styles + $this->styles; - } - - /** - * Configures display options. - * - * @param array $displayOptions A map of display options to customize the behavior - */ - public function setDisplayOptions(array $displayOptions) - { - $this->displayOptions = $displayOptions + $this->displayOptions; - } - - /** - * {@inheritdoc} - */ - public function dumpScalar(Cursor $cursor, $type, $value) - { - $this->dumpKey($cursor); - - $style = 'const'; - $attr = $cursor->attr; - - switch ($type) { - case 'default': - $style = 'default'; - break; - - case 'integer': - $style = 'num'; - break; - - case 'double': - $style = 'num'; - - switch (true) { - case \INF === $value: $value = 'INF'; break; - case -\INF === $value: $value = '-INF'; break; - case is_nan($value): $value = 'NAN'; break; - default: - $value = (string) $value; - if (!str_contains($value, $this->decimalPoint)) { - $value .= $this->decimalPoint.'0'; - } - break; - } - break; - - case 'NULL': - $value = 'null'; - break; - - case 'boolean': - $value = $value ? 'true' : 'false'; - break; - - default: - $attr += ['value' => $this->utf8Encode($value)]; - $value = $this->utf8Encode($type); - break; - } - - $this->line .= $this->style($style, $value, $attr); - - $this->endValue($cursor); - } - - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, $str, $bin, $cut) - { - $this->dumpKey($cursor); - $attr = $cursor->attr; - - if ($bin) { - $str = $this->utf8Encode($str); - } - if ('' === $str) { - $this->line .= '""'; - $this->endValue($cursor); - } else { - $attr += [ - 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, - 'binary' => $bin, - ]; - $str = explode("\n", $str); - if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { - unset($str[1]); - $str[0] .= "\n"; - } - $m = \count($str) - 1; - $i = $lineCut = 0; - - if (self::DUMP_STRING_LENGTH & $this->flags) { - $this->line .= '('.$attr['length'].') '; - } - if ($bin) { - $this->line .= 'b'; - } - - if ($m) { - $this->line .= '"""'; - $this->dumpLine($cursor->depth); - } else { - $this->line .= '"'; - } - - foreach ($str as $str) { - if ($i < $m) { - $str .= "\n"; - } - if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = mb_strlen($str, 'UTF-8')) { - $str = mb_substr($str, 0, $this->maxStringWidth, 'UTF-8'); - $lineCut = $len - $this->maxStringWidth; - } - if ($m && 0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - if ('' !== $str) { - $this->line .= $this->style('str', $str, $attr); - } - if ($i++ == $m) { - if ($m) { - if ('' !== $str) { - $this->dumpLine($cursor->depth); - if (0 < $cursor->depth) { - $this->line .= $this->indentPad; - } - } - $this->line .= '"""'; - } else { - $this->line .= '"'; - } - if ($cut < 0) { - $this->line .= '…'; - $lineCut = 0; - } elseif ($cut) { - $lineCut += $cut; - } - } - if ($lineCut) { - $this->line .= '…'.$lineCut; - $lineCut = 0; - } - - if ($i > $m) { - $this->endValue($cursor); - } else { - $this->dumpLine($cursor->depth); - } - } - } - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } - - $this->dumpKey($cursor); - $attr = $cursor->attr; - - if ($this->collapseNextHash) { - $cursor->skipChildren = true; - $this->collapseNextHash = $hasChild = false; - } - - $class = $this->utf8Encode($class); - if (Cursor::HASH_OBJECT === $type) { - $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class, $attr).(empty($attr['cut_hash']) ? ' {' : '') : '{'; - } elseif (Cursor::HASH_RESOURCE === $type) { - $prefix = $this->style('note', $class.' resource', $attr).($hasChild ? ' {' : ' '); - } else { - $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '['; - } - - if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) { - $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), ['count' => $cursor->softRefCount]); - } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { - $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, ['count' => $cursor->hardRefCount]); - } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { - $prefix = substr($prefix, 0, -1); - } - - $this->line .= $prefix; - - if ($hasChild) { - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) - { - if (empty($cursor->attr['cut_hash'])) { - $this->dumpEllipsis($cursor, $hasChild, $cut); - $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); - } - - $this->endValue($cursor); - } - - /** - * Dumps an ellipsis for cut children. - * - * @param bool $hasChild When the dump of the hash has child item - * @param int $cut The number of items the hash has been cut by - */ - protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut) - { - if ($cut) { - $this->line .= ' …'; - if (0 < $cut) { - $this->line .= $cut; - } - if ($hasChild) { - $this->dumpLine($cursor->depth + 1); - } - } - } - - /** - * Dumps a key in a hash structure. - */ - protected function dumpKey(Cursor $cursor) - { - if (null !== $key = $cursor->hashKey) { - if ($cursor->hashKeyIsBinary) { - $key = $this->utf8Encode($key); - } - $attr = ['binary' => $cursor->hashKeyIsBinary]; - $bin = $cursor->hashKeyIsBinary ? 'b' : ''; - $style = 'key'; - switch ($cursor->hashType) { - default: - case Cursor::HASH_INDEXED: - if (self::DUMP_LIGHT_ARRAY & $this->flags) { - break; - } - $style = 'index'; - // no break - case Cursor::HASH_ASSOC: - if (\is_int($key)) { - $this->line .= $this->style($style, $key).' => '; - } else { - $this->line .= $bin.'"'.$this->style($style, $key).'" => '; - } - break; - - case Cursor::HASH_RESOURCE: - $key = "\0~\0".$key; - // no break - case Cursor::HASH_OBJECT: - if (!isset($key[0]) || "\0" !== $key[0]) { - $this->line .= '+'.$bin.$this->style('public', $key).': '; - } elseif (0 < strpos($key, "\0", 1)) { - $key = explode("\0", substr($key, 1), 2); - - switch ($key[0][0]) { - case '+': // User inserted keys - $attr['dynamic'] = true; - $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; - break 2; - case '~': - $style = 'meta'; - if (isset($key[0][1])) { - parse_str(substr($key[0], 1), $attr); - $attr += ['binary' => $cursor->hashKeyIsBinary]; - } - break; - case '*': - $style = 'protected'; - $bin = '#'.$bin; - break; - default: - $attr['class'] = $key[0]; - $style = 'private'; - $bin = '-'.$bin; - break; - } - - if (isset($attr['collapse'])) { - if ($attr['collapse']) { - $this->collapseNextHash = true; - } else { - $this->expandNextHash = true; - } - } - - $this->line .= $bin.$this->style($style, $key[1], $attr).($attr['separator'] ?? ': '); - } else { - // This case should not happen - $this->line .= '-'.$bin.'"'.$this->style('private', $key, ['class' => '']).'": '; - } - break; - } - - if ($cursor->hardRefTo) { - $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), ['count' => $cursor->hardRefCount]).' '; - } - } - } - - /** - * Decorates a value with some style. - * - * @param string $style The type of style being applied - * @param string $value The value being styled - * @param array $attr Optional context information - * - * @return string The value with style decoration - */ - protected function style($style, $value, $attr = []) - { - if (null === $this->colors) { - $this->colors = $this->supportsColors(); - } - - if (null === $this->handlesHrefGracefully) { - $this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') - && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); - } - - if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { - $prefix = substr($value, 0, -$attr['ellipsis']); - if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && str_starts_with($prefix, $_SERVER[$pwd])) { - $prefix = '.'.substr($prefix, \strlen($_SERVER[$pwd])); - } - if (!empty($attr['ellipsis-tail'])) { - $prefix .= substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']); - $value = substr($value, -$attr['ellipsis'] + $attr['ellipsis-tail']); - } else { - $value = substr($value, -$attr['ellipsis']); - } - - $value = $this->style('default', $prefix).$this->style($style, $value); - - goto href; - } - - $map = static::$controlCharsMap; - $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; - $endCchr = $this->colors ? "\033[m\033[{$this->styles[$style]}m" : ''; - $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { - $s = $startCchr; - $c = $c[$i = 0]; - do { - $s .= $map[$c[$i]] ?? sprintf('\x%02X', \ord($c[$i])); - } while (isset($c[++$i])); - - return $s.$endCchr; - }, $value, -1, $cchrCount); - - if ($this->colors) { - if ($cchrCount && "\033" === $value[0]) { - $value = substr($value, \strlen($startCchr)); - } else { - $value = "\033[{$this->styles[$style]}m".$value; - } - if ($cchrCount && str_ends_with($value, $endCchr)) { - $value = substr($value, 0, -\strlen($endCchr)); - } else { - $value .= "\033[{$this->styles['default']}m"; - } - } - - href: - if ($this->colors && $this->handlesHrefGracefully) { - if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { - if ('note' === $style) { - $value .= "\033]8;;{$href}\033\\^\033]8;;\033\\"; - } else { - $attr['href'] = $href; - } - } - if (isset($attr['href'])) { - $value = "\033]8;;{$attr['href']}\033\\{$value}\033]8;;\033\\"; - } - } elseif ($attr['if_links'] ?? false) { - return ''; - } - - return $value; - } - - /** - * @return bool Tells if the current output stream supports ANSI colors or not - */ - protected function supportsColors() - { - if ($this->outputStream !== static::$defaultOutput) { - return $this->hasColorSupport($this->outputStream); - } - if (null !== static::$defaultColors) { - return static::$defaultColors; - } - if (isset($_SERVER['argv'][1])) { - $colors = $_SERVER['argv']; - $i = \count($colors); - while (--$i > 0) { - if (isset($colors[$i][5])) { - switch ($colors[$i]) { - case '--ansi': - case '--color': - case '--color=yes': - case '--color=force': - case '--color=always': - return static::$defaultColors = true; - - case '--no-ansi': - case '--color=no': - case '--color=none': - case '--color=never': - return static::$defaultColors = false; - } - } - } - } - - $h = stream_get_meta_data($this->outputStream) + ['wrapper_type' => null]; - $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'w') : $this->outputStream; - - return static::$defaultColors = $this->hasColorSupport($h); - } - - /** - * {@inheritdoc} - */ - protected function dumpLine($depth, $endOfValue = false) - { - if ($this->colors) { - $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); - } - parent::dumpLine($depth); - } - - protected function endValue(Cursor $cursor) - { - if (-1 === $cursor->hashType) { - return; - } - - if (Stub::ARRAY_INDEXED === $cursor->hashType || Stub::ARRAY_ASSOC === $cursor->hashType) { - if (self::DUMP_TRAILING_COMMA & $this->flags && 0 < $cursor->depth) { - $this->line .= ','; - } elseif (self::DUMP_COMMA_SEPARATOR & $this->flags && 1 < $cursor->hashLength - $cursor->hashIndex) { - $this->line .= ','; - } - } - - $this->dumpLine($cursor->depth, true); - } - - /** - * Returns true if the stream supports colorization. - * - * Reference: Composer\XdebugHandler\Process::supportsColor - * https://github.com/composer/xdebug-handler - * - * @param mixed $stream A CLI output stream - */ - private function hasColorSupport($stream): bool - { - if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { - return false; - } - - // Follow https://no-color.org/ - if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { - return false; - } - - if ('Hyper' === getenv('TERM_PROGRAM')) { - return true; - } - - if (\DIRECTORY_SEPARATOR === '\\') { - return (\function_exists('sapi_windows_vt100_support') - && @sapi_windows_vt100_support($stream)) - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - if (\function_exists('stream_isatty')) { - return @stream_isatty($stream); - } - - if (\function_exists('posix_isatty')) { - return @posix_isatty($stream); - } - - $stat = @fstat($stream); - // Check if formatted mode is S_IFCHR - return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; - } - - /** - * Returns true if the Windows terminal supports true color. - * - * Note that this does not check an output stream, but relies on environment - * variables from known implementations, or a PHP and Windows version that - * supports true color. - */ - private function isWindowsTrueColor(): bool - { - $result = 183 <= getenv('ANSICON_VER') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM') - || 'Hyper' === getenv('TERM_PROGRAM'); - - if (!$result && \PHP_VERSION_ID >= 70200) { - $version = sprintf( - '%s.%s.%s', - PHP_WINDOWS_VERSION_MAJOR, - PHP_WINDOWS_VERSION_MINOR, - PHP_WINDOWS_VERSION_BUILD - ); - $result = $version >= '10.0.15063'; - } - - return $result; - } - - private function getSourceLink(string $file, int $line) - { - if ($fmt = $this->displayOptions['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : ($fmt->format($file, $line) ?: 'file://'.$file.'#L'.$line); - } - - return false; - } -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php deleted file mode 100644 index 38f8789..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -/** - * Tries to provide context on CLI. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - */ -final class CliContextProvider implements ContextProviderInterface -{ - public function getContext(): ?array - { - if ('cli' !== \PHP_SAPI) { - return null; - } - - return [ - 'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []), - 'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']), - ]; - } -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php deleted file mode 100644 index 38ef3b0..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -/** - * Interface to provide contextual data about dump data clones sent to a server. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - */ -interface ContextProviderInterface -{ - /** - * @return array|null Context data or null if unable to provide any context - */ - public function getContext(): ?array; -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php deleted file mode 100644 index 3684a47..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -use Symfony\Component\HttpFoundation\RequestStack; -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\VarCloner; - -/** - * Tries to provide context from a request. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - */ -final class RequestContextProvider implements ContextProviderInterface -{ - private $requestStack; - private $cloner; - - public function __construct(RequestStack $requestStack) - { - $this->requestStack = $requestStack; - $this->cloner = new VarCloner(); - $this->cloner->setMaxItems(0); - $this->cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); - } - - public function getContext(): ?array - { - if (null === $request = $this->requestStack->getCurrentRequest()) { - return null; - } - - $controller = $request->attributes->get('_controller'); - - return [ - 'uri' => $request->getUri(), - 'method' => $request->getMethod(), - 'controller' => $controller ? $this->cloner->cloneVar($controller) : $controller, - 'identifier' => spl_object_hash($request), - ]; - } -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php deleted file mode 100644 index 2e2c818..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper\ContextProvider; - -use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; -use Symfony\Component\VarDumper\VarDumper; -use Twig\Template; - -/** - * Tries to provide context from sources (class name, file, line, code excerpt, ...). - * - * @author Nicolas Grekas <p@tchwork.com> - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - */ -final class SourceContextProvider implements ContextProviderInterface -{ - private $limit; - private $charset; - private $projectDir; - private $fileLinkFormatter; - - public function __construct(string $charset = null, string $projectDir = null, FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) - { - $this->charset = $charset; - $this->projectDir = $projectDir; - $this->fileLinkFormatter = $fileLinkFormatter; - $this->limit = $limit; - } - - public function getContext(): ?array - { - $trace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, $this->limit); - - $file = $trace[1]['file']; - $line = $trace[1]['line']; - $name = false; - $fileExcerpt = false; - - for ($i = 2; $i < $this->limit; ++$i) { - if (isset($trace[$i]['class'], $trace[$i]['function']) - && 'dump' === $trace[$i]['function'] - && VarDumper::class === $trace[$i]['class'] - ) { - $file = $trace[$i]['file'] ?? $file; - $line = $trace[$i]['line'] ?? $line; - - while (++$i < $this->limit) { - if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && !str_starts_with($trace[$i]['function'], 'call_user_func')) { - $file = $trace[$i]['file']; - $line = $trace[$i]['line']; - - break; - } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof Template) { - $template = $trace[$i]['object']; - $name = $template->getTemplateName(); - $src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false); - $info = $template->getDebugInfo(); - if (isset($info[$trace[$i - 1]['line']])) { - $line = $info[$trace[$i - 1]['line']]; - $file = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; - - if ($src) { - $src = explode("\n", $src); - $fileExcerpt = []; - - for ($i = max($line - 3, 1), $max = min($line + 3, \count($src)); $i <= $max; ++$i) { - $fileExcerpt[] = '<li'.($i === $line ? ' class="selected"' : '').'><code>'.$this->htmlEncode($src[$i - 1]).'</code></li>'; - } - - $fileExcerpt = '<ol start="'.max($line - 3, 1).'">'.implode("\n", $fileExcerpt).'</ol>'; - } - } - break; - } - } - break; - } - } - - if (false === $name) { - $name = str_replace('\\', '/', $file); - $name = substr($name, strrpos($name, '/') + 1); - } - - $context = ['name' => $name, 'file' => $file, 'line' => $line]; - $context['file_excerpt'] = $fileExcerpt; - - if (null !== $this->projectDir) { - $context['project_dir'] = $this->projectDir; - if (str_starts_with($file, $this->projectDir)) { - $context['file_relative'] = ltrim(substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); - } - } - - if ($this->fileLinkFormatter && $fileLink = $this->fileLinkFormatter->format($context['file'], $context['line'])) { - $context['file_link'] = $fileLink; - } - - return $context; - } - - private function htmlEncode(string $s): string - { - $html = ''; - - $dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset); - $dumper->setDumpHeader(''); - $dumper->setDumpBoundaries('', ''); - - $cloner = new VarCloner(); - $dumper->dump($cloner->cloneVar($s)); - - return substr(strip_tags($html), 1, -1); - } -} diff --git a/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php b/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php deleted file mode 100644 index 7638417..0000000 --- a/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; - -/** - * @author Kévin Thérage <therage.kevin@gmail.com> - */ -class ContextualizedDumper implements DataDumperInterface -{ - private $wrappedDumper; - private $contextProviders; - - /** - * @param ContextProviderInterface[] $contextProviders - */ - public function __construct(DataDumperInterface $wrappedDumper, array $contextProviders) - { - $this->wrappedDumper = $wrappedDumper; - $this->contextProviders = $contextProviders; - } - - public function dump(Data $data) - { - $context = []; - foreach ($this->contextProviders as $contextProvider) { - $context[\get_class($contextProvider)] = $contextProvider->getContext(); - } - - $this->wrappedDumper->dump($data->withContext($context)); - } -} diff --git a/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php b/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php deleted file mode 100644 index b173bcc..0000000 --- a/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * DataDumperInterface for dumping Data objects. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -interface DataDumperInterface -{ - public function dump(Data $data); -} diff --git a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php deleted file mode 100644 index 9b57f90..0000000 --- a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ /dev/null @@ -1,1004 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Cursor; -use Symfony\Component\VarDumper\Cloner\Data; - -/** - * HtmlDumper dumps variables as HTML. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -class HtmlDumper extends CliDumper -{ - public static $defaultOutput = 'php://output'; - - protected static $themes = [ - 'dark' => [ - 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#56DB3A', - 'note' => 'color:#1299DA', - 'ref' => 'color:#A0A0A0', - 'public' => 'color:#FFFFFF', - 'protected' => 'color:#FFFFFF', - 'private' => 'color:#FFFFFF', - 'meta' => 'color:#B729D9', - 'key' => 'color:#56DB3A', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#FF8400', - 'ns' => 'user-select:none;', - ], - 'light' => [ - 'default' => 'background:none; color:#CC7832; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#629755;', - 'note' => 'color:#6897BB', - 'ref' => 'color:#6E6E6E', - 'public' => 'color:#262626', - 'protected' => 'color:#262626', - 'private' => 'color:#262626', - 'meta' => 'color:#B729D9', - 'key' => 'color:#789339', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#CC7832', - 'ns' => 'user-select:none;', - ], - ]; - - protected $dumpHeader; - protected $dumpPrefix = '<pre class=sf-dump id=%s data-indent-pad="%s">'; - protected $dumpSuffix = '</pre><script>Sfdump(%s)</script>'; - protected $dumpId = 'sf-dump'; - protected $colors = true; - protected $headerIsDumped = false; - protected $lastDepth = -1; - protected $styles; - - private $displayOptions = [ - 'maxDepth' => 1, - 'maxStringLength' => 160, - 'fileLinkFormat' => null, - ]; - private $extraDisplayOptions = []; - - /** - * {@inheritdoc} - */ - public function __construct($output = null, string $charset = null, int $flags = 0) - { - AbstractDumper::__construct($output, $charset, $flags); - $this->dumpId = 'sf-dump-'.mt_rand(); - $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); - $this->styles = static::$themes['dark'] ?? self::$themes['dark']; - } - - /** - * {@inheritdoc} - */ - public function setStyles(array $styles) - { - $this->headerIsDumped = false; - $this->styles = $styles + $this->styles; - } - - public function setTheme(string $themeName) - { - if (!isset(static::$themes[$themeName])) { - throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist in class "%s".', $themeName, static::class)); - } - - $this->setStyles(static::$themes[$themeName]); - } - - /** - * Configures display options. - * - * @param array $displayOptions A map of display options to customize the behavior - */ - public function setDisplayOptions(array $displayOptions) - { - $this->headerIsDumped = false; - $this->displayOptions = $displayOptions + $this->displayOptions; - } - - /** - * Sets an HTML header that will be dumped once in the output stream. - * - * @param string $header An HTML string - */ - public function setDumpHeader($header) - { - $this->dumpHeader = $header; - } - - /** - * Sets an HTML prefix and suffix that will encapse every single dump. - * - * @param string $prefix The prepended HTML string - * @param string $suffix The appended HTML string - */ - public function setDumpBoundaries($prefix, $suffix) - { - $this->dumpPrefix = $prefix; - $this->dumpSuffix = $suffix; - } - - /** - * {@inheritdoc} - */ - public function dump(Data $data, $output = null, array $extraDisplayOptions = []) - { - $this->extraDisplayOptions = $extraDisplayOptions; - $result = parent::dump($data, $output); - $this->dumpId = 'sf-dump-'.mt_rand(); - - return $result; - } - - /** - * Dumps the HTML header. - */ - protected function getDumpHeader() - { - $this->headerIsDumped = $this->outputStream ?? $this->lineDumper; - - if (null !== $this->dumpHeader) { - return $this->dumpHeader; - } - - $line = str_replace('{$options}', json_encode($this->displayOptions, \JSON_FORCE_OBJECT), <<<'EOHTML' -<script> -Sfdump = window.Sfdump || (function (doc) { - -var refStyle = doc.createElement('style'), - rxEsc = /([.*+?^${}()|\[\]\/\\])/g, - idRx = /\bsf-dump-\d+-ref[012]\w+\b/, - keyHint = 0 <= navigator.platform.toUpperCase().indexOf('MAC') ? 'Cmd' : 'Ctrl', - addEventListener = function (e, n, cb) { - e.addEventListener(n, cb, false); - }; - -(doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle); - -if (!doc.addEventListener) { - addEventListener = function (element, eventName, callback) { - element.attachEvent('on' + eventName, function (e) { - e.preventDefault = function () {e.returnValue = false;}; - e.target = e.srcElement; - callback(e); - }); - }; -} - -function toggle(a, recursive) { - var s = a.nextSibling || {}, oldClass = s.className, arrow, newClass; - - if (/\bsf-dump-compact\b/.test(oldClass)) { - arrow = '▼'; - newClass = 'sf-dump-expanded'; - } else if (/\bsf-dump-expanded\b/.test(oldClass)) { - arrow = '▶'; - newClass = 'sf-dump-compact'; - } else { - return false; - } - - if (doc.createEvent && s.dispatchEvent) { - var event = doc.createEvent('Event'); - event.initEvent('sf-dump-expanded' === newClass ? 'sfbeforedumpexpand' : 'sfbeforedumpcollapse', true, false); - - s.dispatchEvent(event); - } - - a.lastChild.innerHTML = arrow; - s.className = s.className.replace(/\bsf-dump-(compact|expanded)\b/, newClass); - - if (recursive) { - try { - a = s.querySelectorAll('.'+oldClass); - for (s = 0; s < a.length; ++s) { - if (-1 == a[s].className.indexOf(newClass)) { - a[s].className = newClass; - a[s].previousSibling.lastChild.innerHTML = arrow; - } - } - } catch (e) { - } - } - - return true; -}; - -function collapse(a, recursive) { - var s = a.nextSibling || {}, oldClass = s.className; - - if (/\bsf-dump-expanded\b/.test(oldClass)) { - toggle(a, recursive); - - return true; - } - - return false; -}; - -function expand(a, recursive) { - var s = a.nextSibling || {}, oldClass = s.className; - - if (/\bsf-dump-compact\b/.test(oldClass)) { - toggle(a, recursive); - - return true; - } - - return false; -}; - -function collapseAll(root) { - var a = root.querySelector('a.sf-dump-toggle'); - if (a) { - collapse(a, true); - expand(a); - - return true; - } - - return false; -} - -function reveal(node) { - var previous, parents = []; - - while ((node = node.parentNode || {}) && (previous = node.previousSibling) && 'A' === previous.tagName) { - parents.push(previous); - } - - if (0 !== parents.length) { - parents.forEach(function (parent) { - expand(parent); - }); - - return true; - } - - return false; -} - -function highlight(root, activeNode, nodes) { - resetHighlightedNodes(root); - - Array.from(nodes||[]).forEach(function (node) { - if (!/\bsf-dump-highlight\b/.test(node.className)) { - node.className = node.className + ' sf-dump-highlight'; - } - }); - - if (!/\bsf-dump-highlight-active\b/.test(activeNode.className)) { - activeNode.className = activeNode.className + ' sf-dump-highlight-active'; - } -} - -function resetHighlightedNodes(root) { - Array.from(root.querySelectorAll('.sf-dump-str, .sf-dump-key, .sf-dump-public, .sf-dump-protected, .sf-dump-private')).forEach(function (strNode) { - strNode.className = strNode.className.replace(/\bsf-dump-highlight\b/, ''); - strNode.className = strNode.className.replace(/\bsf-dump-highlight-active\b/, ''); - }); -} - -return function (root, x) { - root = doc.getElementById(root); - - var indentRx = new RegExp('^('+(root.getAttribute('data-indent-pad') || ' ').replace(rxEsc, '\\$1')+')+', 'm'), - options = {$options}, - elt = root.getElementsByTagName('A'), - len = elt.length, - i = 0, s, h, - t = []; - - while (i < len) t.push(elt[i++]); - - for (i in x) { - options[i] = x[i]; - } - - function a(e, f) { - addEventListener(root, e, function (e, n) { - if ('A' == e.target.tagName) { - f(e.target, e); - } else if ('A' == e.target.parentNode.tagName) { - f(e.target.parentNode, e); - } else { - n = /\bsf-dump-ellipsis\b/.test(e.target.className) ? e.target.parentNode : e.target; - - if ((n = n.nextElementSibling) && 'A' == n.tagName) { - if (!/\bsf-dump-toggle\b/.test(n.className)) { - n = n.nextElementSibling || n; - } - - f(n, e, true); - } - } - }); - }; - function isCtrlKey(e) { - return e.ctrlKey || e.metaKey; - } - function xpathString(str) { - var parts = str.match(/[^'"]+|['"]/g).map(function (part) { - if ("'" == part) { - return '"\'"'; - } - if ('"' == part) { - return "'\"'"; - } - - return "'" + part + "'"; - }); - - return "concat(" + parts.join(",") + ", '')"; - } - function xpathHasClass(className) { - return "contains(concat(' ', normalize-space(@class), ' '), ' " + className +" ')"; - } - addEventListener(root, 'mouseover', function (e) { - if ('' != refStyle.innerHTML) { - refStyle.innerHTML = ''; - } - }); - a('mouseover', function (a, e, c) { - if (c) { - e.target.style.cursor = "pointer"; - } else if (a = idRx.exec(a.className)) { - try { - refStyle.innerHTML = 'pre.sf-dump .'+a[0]+'{background-color: #B729D9; color: #FFF !important; border-radius: 2px}'; - } catch (e) { - } - } - }); - a('click', function (a, e, c) { - if (/\bsf-dump-toggle\b/.test(a.className)) { - e.preventDefault(); - if (!toggle(a, isCtrlKey(e))) { - var r = doc.getElementById(a.getAttribute('href').slice(1)), - s = r.previousSibling, - f = r.parentNode, - t = a.parentNode; - t.replaceChild(r, a); - f.replaceChild(a, s); - t.insertBefore(s, r); - f = f.firstChild.nodeValue.match(indentRx); - t = t.firstChild.nodeValue.match(indentRx); - if (f && t && f[0] !== t[0]) { - r.innerHTML = r.innerHTML.replace(new RegExp('^'+f[0].replace(rxEsc, '\\$1'), 'mg'), t[0]); - } - if (/\bsf-dump-compact\b/.test(r.className)) { - toggle(s, isCtrlKey(e)); - } - } - - if (c) { - } else if (doc.getSelection) { - try { - doc.getSelection().removeAllRanges(); - } catch (e) { - doc.getSelection().empty(); - } - } else { - doc.selection.empty(); - } - } else if (/\bsf-dump-str-toggle\b/.test(a.className)) { - e.preventDefault(); - e = a.parentNode.parentNode; - e.className = e.className.replace(/\bsf-dump-str-(expand|collapse)\b/, a.parentNode.className); - } - }); - - elt = root.getElementsByTagName('SAMP'); - len = elt.length; - i = 0; - - while (i < len) t.push(elt[i++]); - len = t.length; - - for (i = 0; i < len; ++i) { - elt = t[i]; - if ('SAMP' == elt.tagName) { - a = elt.previousSibling || {}; - if ('A' != a.tagName) { - a = doc.createElement('A'); - a.className = 'sf-dump-ref'; - elt.parentNode.insertBefore(a, elt); - } else { - a.innerHTML += ' '; - } - a.title = (a.title ? a.title+'\n[' : '[')+keyHint+'+click] Expand all children'; - a.innerHTML += '<span>▼</span>'; - a.className += ' sf-dump-toggle'; - - x = 1; - if ('sf-dump' != elt.parentNode.className) { - x += elt.parentNode.getAttribute('data-depth')/1; - } - elt.setAttribute('data-depth', x); - var className = elt.className; - elt.className = 'sf-dump-expanded'; - if (className ? 'sf-dump-expanded' !== className : (x > options.maxDepth)) { - toggle(a); - } - } else if (/\bsf-dump-ref\b/.test(elt.className) && (a = elt.getAttribute('href'))) { - a = a.slice(1); - elt.className += ' '+a; - - if (/[\[{]$/.test(elt.previousSibling.nodeValue)) { - a = a != elt.nextSibling.id && doc.getElementById(a); - try { - s = a.nextSibling; - elt.appendChild(a); - s.parentNode.insertBefore(a, s); - if (/^[@#]/.test(elt.innerHTML)) { - elt.innerHTML += ' <span>▶</span>'; - } else { - elt.innerHTML = '<span>▶</span>'; - elt.className = 'sf-dump-ref'; - } - elt.className += ' sf-dump-toggle'; - } catch (e) { - if ('&' == elt.innerHTML.charAt(0)) { - elt.innerHTML = '…'; - elt.className = 'sf-dump-ref'; - } - } - } - } - } - - if (doc.evaluate && Array.from && root.children.length > 1) { - root.setAttribute('tabindex', 0); - - SearchState = function () { - this.nodes = []; - this.idx = 0; - }; - SearchState.prototype = { - next: function () { - if (this.isEmpty()) { - return this.current(); - } - this.idx = this.idx < (this.nodes.length - 1) ? this.idx + 1 : 0; - - return this.current(); - }, - previous: function () { - if (this.isEmpty()) { - return this.current(); - } - this.idx = this.idx > 0 ? this.idx - 1 : (this.nodes.length - 1); - - return this.current(); - }, - isEmpty: function () { - return 0 === this.count(); - }, - current: function () { - if (this.isEmpty()) { - return null; - } - return this.nodes[this.idx]; - }, - reset: function () { - this.nodes = []; - this.idx = 0; - }, - count: function () { - return this.nodes.length; - }, - }; - - function showCurrent(state) - { - var currentNode = state.current(), currentRect, searchRect; - if (currentNode) { - reveal(currentNode); - highlight(root, currentNode, state.nodes); - if ('scrollIntoView' in currentNode) { - currentNode.scrollIntoView(true); - currentRect = currentNode.getBoundingClientRect(); - searchRect = search.getBoundingClientRect(); - if (currentRect.top < (searchRect.top + searchRect.height)) { - window.scrollBy(0, -(searchRect.top + searchRect.height + 5)); - } - } - } - counter.textContent = (state.isEmpty() ? 0 : state.idx + 1) + ' of ' + state.count(); - } - - var search = doc.createElement('div'); - search.className = 'sf-dump-search-wrapper sf-dump-search-hidden'; - search.innerHTML = ' - <input type="text" class="sf-dump-search-input"> - <span class="sf-dump-search-count">0 of 0<\/span> - <button type="button" class="sf-dump-search-input-previous" tabindex="-1"> - <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1683 1331l-166 165q-19 19-45 19t-45-19L896 965l-531 531q-19 19-45 19t-45-19l-166-165q-19-19-19-45.5t19-45.5l742-741q19-19 45-19t45 19l742 741q19 19 19 45.5t-19 45.5z"\/><\/svg> - <\/button> - <button type="button" class="sf-dump-search-input-next" tabindex="-1"> - <svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1683 808l-742 741q-19 19-45 19t-45-19L109 808q-19-19-19-45.5t19-45.5l166-165q19-19 45-19t45 19l531 531 531-531q19-19 45-19t45 19l166 165q19 19 19 45.5t-19 45.5z"\/><\/svg> - <\/button> - '; - root.insertBefore(search, root.firstChild); - - var state = new SearchState(); - var searchInput = search.querySelector('.sf-dump-search-input'); - var counter = search.querySelector('.sf-dump-search-count'); - var searchInputTimer = 0; - var previousSearchQuery = ''; - - addEventListener(searchInput, 'keyup', function (e) { - var searchQuery = e.target.value; - /* Don't perform anything if the pressed key didn't change the query */ - if (searchQuery === previousSearchQuery) { - return; - } - previousSearchQuery = searchQuery; - clearTimeout(searchInputTimer); - searchInputTimer = setTimeout(function () { - state.reset(); - collapseAll(root); - resetHighlightedNodes(root); - if ('' === searchQuery) { - counter.textContent = '0 of 0'; - - return; - } - - var classMatches = [ - "sf-dump-str", - "sf-dump-key", - "sf-dump-public", - "sf-dump-protected", - "sf-dump-private", - ].map(xpathHasClass).join(' or '); - - var xpathResult = doc.evaluate('.//span[' + classMatches + '][contains(translate(child::text(), ' + xpathString(searchQuery.toUpperCase()) + ', ' + xpathString(searchQuery.toLowerCase()) + '), ' + xpathString(searchQuery.toLowerCase()) + ')]', root, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null); - - while (node = xpathResult.iterateNext()) state.nodes.push(node); - - showCurrent(state); - }, 400); - }); - - Array.from(search.querySelectorAll('.sf-dump-search-input-next, .sf-dump-search-input-previous')).forEach(function (btn) { - addEventListener(btn, 'click', function (e) { - e.preventDefault(); - -1 !== e.target.className.indexOf('next') ? state.next() : state.previous(); - searchInput.focus(); - collapseAll(root); - showCurrent(state); - }) - }); - - addEventListener(root, 'keydown', function (e) { - var isSearchActive = !/\bsf-dump-search-hidden\b/.test(search.className); - if ((114 === e.keyCode && !isSearchActive) || (isCtrlKey(e) && 70 === e.keyCode)) { - /* F3 or CMD/CTRL + F */ - if (70 === e.keyCode && document.activeElement === searchInput) { - /* - * If CMD/CTRL + F is hit while having focus on search input, - * the user probably meant to trigger browser search instead. - * Let the browser execute its behavior: - */ - return; - } - - e.preventDefault(); - search.className = search.className.replace(/\bsf-dump-search-hidden\b/, ''); - searchInput.focus(); - } else if (isSearchActive) { - if (27 === e.keyCode) { - /* ESC key */ - search.className += ' sf-dump-search-hidden'; - e.preventDefault(); - resetHighlightedNodes(root); - searchInput.value = ''; - } else if ( - (isCtrlKey(e) && 71 === e.keyCode) /* CMD/CTRL + G */ - || 13 === e.keyCode /* Enter */ - || 114 === e.keyCode /* F3 */ - ) { - e.preventDefault(); - e.shiftKey ? state.previous() : state.next(); - collapseAll(root); - showCurrent(state); - } - } - }); - } - - if (0 >= options.maxStringLength) { - return; - } - try { - elt = root.querySelectorAll('.sf-dump-str'); - len = elt.length; - i = 0; - t = []; - - while (i < len) t.push(elt[i++]); - len = t.length; - - for (i = 0; i < len; ++i) { - elt = t[i]; - s = elt.innerText || elt.textContent; - x = s.length - options.maxStringLength; - if (0 < x) { - h = elt.innerHTML; - elt[elt.innerText ? 'innerText' : 'textContent'] = s.substring(0, options.maxStringLength); - elt.className += ' sf-dump-str-collapse'; - elt.innerHTML = '<span class=sf-dump-str-collapse>'+h+'<a class="sf-dump-ref sf-dump-str-toggle" title="Collapse"> ◀</a></span>'+ - '<span class=sf-dump-str-expand>'+elt.innerHTML+'<a class="sf-dump-ref sf-dump-str-toggle" title="'+x+' remaining characters"> ▶</a></span>'; - } - } - } catch (e) { - } -}; - -})(document); -</script><style> -pre.sf-dump { - display: block; - white-space: pre; - padding: 5px; - overflow: initial !important; -} -pre.sf-dump:after { - content: ""; - visibility: hidden; - display: block; - height: 0; - clear: both; -} -pre.sf-dump span { - display: inline; -} -pre.sf-dump .sf-dump-compact { - display: none; -} -pre.sf-dump a { - text-decoration: none; - cursor: pointer; - border: 0; - outline: none; - color: inherit; -} -pre.sf-dump img { - max-width: 50em; - max-height: 50em; - margin: .5em 0 0 0; - padding: 0; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAHUlEQVQY02O8zAABilCaiQEN0EeA8QuUcX9g3QEAAjcC5piyhyEAAAAASUVORK5CYII=) #D3D3D3; -} -pre.sf-dump .sf-dump-ellipsis { - display: inline-block; - overflow: visible; - text-overflow: ellipsis; - max-width: 5em; - white-space: nowrap; - overflow: hidden; - vertical-align: top; -} -pre.sf-dump .sf-dump-ellipsis+.sf-dump-ellipsis { - max-width: none; -} -pre.sf-dump code { - display:inline; - padding:0; - background:none; -} -.sf-dump-str-collapse .sf-dump-str-collapse { - display: none; -} -.sf-dump-str-expand .sf-dump-str-expand { - display: none; -} -.sf-dump-public.sf-dump-highlight, -.sf-dump-protected.sf-dump-highlight, -.sf-dump-private.sf-dump-highlight, -.sf-dump-str.sf-dump-highlight, -.sf-dump-key.sf-dump-highlight { - background: rgba(111, 172, 204, 0.3); - border: 1px solid #7DA0B1; - border-radius: 3px; -} -.sf-dump-public.sf-dump-highlight-active, -.sf-dump-protected.sf-dump-highlight-active, -.sf-dump-private.sf-dump-highlight-active, -.sf-dump-str.sf-dump-highlight-active, -.sf-dump-key.sf-dump-highlight-active { - background: rgba(253, 175, 0, 0.4); - border: 1px solid #ffa500; - border-radius: 3px; -} -pre.sf-dump .sf-dump-search-hidden { - display: none !important; -} -pre.sf-dump .sf-dump-search-wrapper { - font-size: 0; - white-space: nowrap; - margin-bottom: 5px; - display: flex; - position: -webkit-sticky; - position: sticky; - top: 5px; -} -pre.sf-dump .sf-dump-search-wrapper > * { - vertical-align: top; - box-sizing: border-box; - height: 21px; - font-weight: normal; - border-radius: 0; - background: #FFF; - color: #757575; - border: 1px solid #BBB; -} -pre.sf-dump .sf-dump-search-wrapper > input.sf-dump-search-input { - padding: 3px; - height: 21px; - font-size: 12px; - border-right: none; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - color: #000; - min-width: 15px; - width: 100%; -} -pre.sf-dump .sf-dump-search-wrapper > .sf-dump-search-input-next, -pre.sf-dump .sf-dump-search-wrapper > .sf-dump-search-input-previous { - background: #F2F2F2; - outline: none; - border-left: none; - font-size: 0; - line-height: 0; -} -pre.sf-dump .sf-dump-search-wrapper > .sf-dump-search-input-next { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} -pre.sf-dump .sf-dump-search-wrapper > .sf-dump-search-input-next > svg, -pre.sf-dump .sf-dump-search-wrapper > .sf-dump-search-input-previous > svg { - pointer-events: none; - width: 12px; - height: 12px; -} -pre.sf-dump .sf-dump-search-wrapper > .sf-dump-search-count { - display: inline-block; - padding: 0 5px; - margin: 0; - border-left: none; - line-height: 21px; - font-size: 12px; -} -EOHTML - ); - - foreach ($this->styles as $class => $style) { - $line .= 'pre.sf-dump'.('default' === $class ? ', pre.sf-dump' : '').' .sf-dump-'.$class.'{'.$style.'}'; - } - $line .= 'pre.sf-dump .sf-dump-ellipsis-note{'.$this->styles['note'].'}'; - - return $this->dumpHeader = preg_replace('/\s+/', ' ', $line).'</style>'.$this->dumpHeader; - } - - /** - * {@inheritdoc} - */ - public function dumpString(Cursor $cursor, $str, $bin, $cut) - { - if ('' === $str && isset($cursor->attr['img-data'], $cursor->attr['content-type'])) { - $this->dumpKey($cursor); - $this->line .= $this->style('default', $cursor->attr['img-size'] ?? '', []).' <samp>'; - $this->endValue($cursor); - $this->line .= $this->indentPad; - $this->line .= sprintf('<img src="data:%s;base64,%s" /></samp>', $cursor->attr['content-type'], base64_encode($cursor->attr['img-data'])); - $this->endValue($cursor); - } else { - parent::dumpString($cursor, $str, $bin, $cut); - } - } - - /** - * {@inheritdoc} - */ - public function enterHash(Cursor $cursor, $type, $class, $hasChild) - { - if (Cursor::HASH_OBJECT === $type) { - $cursor->attr['depth'] = $cursor->depth; - } - parent::enterHash($cursor, $type, $class, false); - - if ($cursor->skipChildren) { - $cursor->skipChildren = false; - $eol = ' class=sf-dump-compact>'; - } elseif ($this->expandNextHash) { - $this->expandNextHash = false; - $eol = ' class=sf-dump-expanded>'; - } else { - $eol = '>'; - } - - if ($hasChild) { - $this->line .= '<samp'; - if ($cursor->refIndex) { - $r = Cursor::HASH_OBJECT !== $type ? 1 - (Cursor::HASH_RESOURCE !== $type) : 2; - $r .= $r && 0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->refIndex; - - $this->line .= sprintf(' id=%s-ref%s', $this->dumpId, $r); - } - $this->line .= $eol; - $this->dumpLine($cursor->depth); - } - } - - /** - * {@inheritdoc} - */ - public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) - { - $this->dumpEllipsis($cursor, $hasChild, $cut); - if ($hasChild) { - $this->line .= '</samp>'; - } - parent::leaveHash($cursor, $type, $class, $hasChild, 0); - } - - /** - * {@inheritdoc} - */ - protected function style($style, $value, $attr = []) - { - if ('' === $value) { - return ''; - } - - $v = esc($value); - - if ('ref' === $style) { - if (empty($attr['count'])) { - return sprintf('<a class=sf-dump-ref>%s</a>', $v); - } - $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); - - return sprintf('<a class=sf-dump-ref href=#%s-ref%s title="%d occurrences">%s</a>', $this->dumpId, $r, 1 + $attr['count'], $v); - } - - if ('const' === $style && isset($attr['value'])) { - $style .= sprintf(' title="%s"', esc(\is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); - } elseif ('public' === $style) { - $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); - } elseif ('str' === $style && 1 < $attr['length']) { - $style .= sprintf(' title="%d%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); - } elseif ('note' === $style && 0 < ($attr['depth'] ?? 0) && false !== $c = strrpos($value, '\\')) { - $style .= ' title=""'; - $attr += [ - 'ellipsis' => \strlen($value) - $c, - 'ellipsis-type' => 'note', - 'ellipsis-tail' => 1, - ]; - } elseif ('protected' === $style) { - $style .= ' title="Protected property"'; - } elseif ('meta' === $style && isset($attr['title'])) { - $style .= sprintf(' title="%s"', esc($this->utf8Encode($attr['title']))); - } elseif ('private' === $style) { - $style .= sprintf(' title="Private property defined in class:&#10;`%s`"', esc($this->utf8Encode($attr['class']))); - } - $map = static::$controlCharsMap; - - if (isset($attr['ellipsis'])) { - $class = 'sf-dump-ellipsis'; - if (isset($attr['ellipsis-type'])) { - $class = sprintf('"%s sf-dump-ellipsis-%s"', $class, $attr['ellipsis-type']); - } - $label = esc(substr($value, -$attr['ellipsis'])); - $style = str_replace(' title="', " title=\"$v\n", $style); - $v = sprintf('<span class=%s>%s</span>', $class, substr($v, 0, -\strlen($label))); - - if (!empty($attr['ellipsis-tail'])) { - $tail = \strlen(esc(substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']))); - $v .= sprintf('<span class=%s>%s</span>%s', $class, substr($label, 0, $tail), substr($label, $tail)); - } else { - $v .= $label; - } - } - - $v = "<span class=sf-dump-{$style}>".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { - $s = $b = '<span class="sf-dump-default'; - $c = $c[$i = 0]; - if ($ns = "\r" === $c[$i] || "\n" === $c[$i]) { - $s .= ' sf-dump-ns'; - } - $s .= '">'; - do { - if (("\r" === $c[$i] || "\n" === $c[$i]) !== $ns) { - $s .= '</span>'.$b; - if ($ns = !$ns) { - $s .= ' sf-dump-ns'; - } - $s .= '">'; - } - - $s .= $map[$c[$i]] ?? sprintf('\x%02X', \ord($c[$i])); - } while (isset($c[++$i])); - - return $s.'</span>'; - }, $v).'</span>'; - - if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { - $attr['href'] = $href; - } - if (isset($attr['href'])) { - $target = isset($attr['file']) ? '' : ' target="_blank"'; - $v = sprintf('<a href="%s"%s rel="noopener noreferrer">%s</a>', esc($this->utf8Encode($attr['href'])), $target, $v); - } - if (isset($attr['lang'])) { - $v = sprintf('<code class="%s">%s</code>', esc($attr['lang']), $v); - } - - return $v; - } - - /** - * {@inheritdoc} - */ - protected function dumpLine($depth, $endOfValue = false) - { - if (-1 === $this->lastDepth) { - $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; - } - if ($this->headerIsDumped !== ($this->outputStream ?? $this->lineDumper)) { - $this->line = $this->getDumpHeader().$this->line; - } - - if (-1 === $depth) { - $args = ['"'.$this->dumpId.'"']; - if ($this->extraDisplayOptions) { - $args[] = json_encode($this->extraDisplayOptions, \JSON_FORCE_OBJECT); - } - // Replace is for BC - $this->line .= sprintf(str_replace('"%s"', '%s', $this->dumpSuffix), implode(', ', $args)); - } - $this->lastDepth = $depth; - - $this->line = mb_encode_numericentity($this->line, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8'); - - if (-1 === $depth) { - AbstractDumper::dumpLine(0); - } - AbstractDumper::dumpLine($depth); - } - - private function getSourceLink(string $file, int $line) - { - $options = $this->extraDisplayOptions + $this->displayOptions; - - if ($fmt = $options['fileLinkFormat']) { - return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); - } - - return false; - } -} - -function esc(string $str) -{ - return htmlspecialchars($str, \ENT_QUOTES, 'UTF-8'); -} diff --git a/vendor/symfony/var-dumper/Dumper/ServerDumper.php b/vendor/symfony/var-dumper/Dumper/ServerDumper.php deleted file mode 100644 index 94795bf..0000000 --- a/vendor/symfony/var-dumper/Dumper/ServerDumper.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Dumper; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; -use Symfony\Component\VarDumper\Server\Connection; - -/** - * ServerDumper forwards serialized Data clones to a server. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - */ -class ServerDumper implements DataDumperInterface -{ - private $connection; - private $wrappedDumper; - - /** - * @param string $host The server host - * @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server - * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name - */ - public function __construct(string $host, DataDumperInterface $wrappedDumper = null, array $contextProviders = []) - { - $this->connection = new Connection($host, $contextProviders); - $this->wrappedDumper = $wrappedDumper; - } - - public function getContextProviders(): array - { - return $this->connection->getContextProviders(); - } - - /** - * {@inheritdoc} - */ - public function dump(Data $data) - { - if (!$this->connection->write($data) && $this->wrappedDumper) { - $this->wrappedDumper->dump($data); - } - } -} diff --git a/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php b/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php deleted file mode 100644 index 122f0d3..0000000 --- a/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Exception; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class ThrowingCasterException extends \Exception -{ - /** - * @param \Throwable $prev The exception thrown from the caster - */ - public function __construct(\Throwable $prev) - { - parent::__construct('Unexpected '.\get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); - } -} diff --git a/vendor/symfony/var-dumper/LICENSE b/vendor/symfony/var-dumper/LICENSE deleted file mode 100644 index a843ec1..0000000 --- a/vendor/symfony/var-dumper/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-2022 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/var-dumper/README.md b/vendor/symfony/var-dumper/README.md deleted file mode 100644 index a0da8c9..0000000 --- a/vendor/symfony/var-dumper/README.md +++ /dev/null @@ -1,15 +0,0 @@ -VarDumper Component -=================== - -The VarDumper component provides mechanisms for walking through any arbitrary -PHP variable. It provides a better `dump()` function that you can use instead -of `var_dump()`. - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/var-dumper/Resources/bin/var-dump-server b/vendor/symfony/var-dumper/Resources/bin/var-dump-server deleted file mode 100644 index f398fce..0000000 --- a/vendor/symfony/var-dumper/Resources/bin/var-dump-server +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env php -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -if ('cli' !== PHP_SAPI) { - throw new Exception('This script must be run from the command line.'); -} - -/** - * Starts a dump server to collect and output dumps on a single place with multiple formats support. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - */ - -use Psr\Log\LoggerInterface; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Logger\ConsoleLogger; -use Symfony\Component\Console\Output\ConsoleOutput; -use Symfony\Component\VarDumper\Command\ServerDumpCommand; -use Symfony\Component\VarDumper\Server\DumpServer; - -function includeIfExists(string $file): bool -{ - return file_exists($file) && include $file; -} - -if ( - !includeIfExists(__DIR__ . '/../../../../autoload.php') && - !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && - !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') -) { - fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); - exit(1); -} - -if (!class_exists(Application::class)) { - fwrite(STDERR, 'You need the "symfony/console" component in order to run the VarDumper server.'.PHP_EOL); - exit(1); -} - -$input = new ArgvInput(); -$output = new ConsoleOutput(); -$defaultHost = '127.0.0.1:9912'; -$host = $input->getParameterOption(['--host'], $_SERVER['VAR_DUMPER_SERVER'] ?? $defaultHost, true); -$logger = interface_exists(LoggerInterface::class) ? new ConsoleLogger($output->getErrorOutput()) : null; - -$app = new Application(); - -$app->getDefinition()->addOption( - new InputOption('--host', null, InputOption::VALUE_REQUIRED, 'The address the server should listen to', $defaultHost) -); - -$app->add($command = new ServerDumpCommand(new DumpServer($host, $logger))) - ->getApplication() - ->setDefaultCommand($command->getName(), true) - ->run($input, $output) -; diff --git a/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css b/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css deleted file mode 100644 index 8f706d6..0000000 --- a/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css +++ /dev/null @@ -1,130 +0,0 @@ -body { - display: flex; - flex-direction: column-reverse; - justify-content: flex-end; - max-width: 1140px; - margin: auto; - padding: 15px; - word-wrap: break-word; - background-color: #F9F9F9; - color: #222; - font-family: Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.4; -} -p { - margin: 0; -} -a { - color: #218BC3; - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -.text-small { - font-size: 12px !important; -} -article { - margin: 5px; - margin-bottom: 10px; -} -article > header > .row { - display: flex; - flex-direction: row; - align-items: baseline; - margin-bottom: 10px; -} -article > header > .row > .col { - flex: 1; - display: flex; - align-items: baseline; -} -article > header > .row > h2 { - font-size: 14px; - color: #222; - font-weight: normal; - font-family: "Lucida Console", monospace, sans-serif; - word-break: break-all; - margin: 20px 5px 0 0; - user-select: all; -} -article > header > .row > h2 > code { - white-space: nowrap; - user-select: none; - color: #cc2255; - background-color: #f7f7f9; - border: 1px solid #e1e1e8; - border-radius: 3px; - margin-right: 5px; - padding: 0 3px; -} -article > header > .row > time.col { - flex: 0; - text-align: right; - white-space: nowrap; - color: #999; - font-style: italic; -} -article > header ul.tags { - list-style: none; - padding: 0; - margin: 0; - font-size: 12px; -} -article > header ul.tags > li { - user-select: all; - margin-bottom: 2px; -} -article > header ul.tags > li > span.badge { - display: inline-block; - padding: .25em .4em; - margin-right: 5px; - border-radius: 4px; - background-color: #6c757d3b; - color: #524d4d; - font-size: 12px; - text-align: center; - font-weight: 700; - line-height: 1; - white-space: nowrap; - vertical-align: baseline; - user-select: none; -} -article > section.body { - border: 1px solid #d8d8d8; - background: #FFF; - padding: 10px; - border-radius: 3px; -} -pre.sf-dump { - border-radius: 3px; - margin-bottom: 0; -} -.hidden { - display: none !important; -} -.dumped-tag > .sf-dump { - display: inline-block; - margin: 0; - padding: 1px 5px; - line-height: 1.4; - vertical-align: top; - background-color: transparent; - user-select: auto; -} -.dumped-tag > pre.sf-dump, -.dumped-tag > .sf-dump-default { - color: #CC7832; - background: none; -} -.dumped-tag > .sf-dump .sf-dump-str { color: #629755; } -.dumped-tag > .sf-dump .sf-dump-private, -.dumped-tag > .sf-dump .sf-dump-protected, -.dumped-tag > .sf-dump .sf-dump-public { color: #262626; } -.dumped-tag > .sf-dump .sf-dump-note { color: #6897BB; } -.dumped-tag > .sf-dump .sf-dump-key { color: #789339; } -.dumped-tag > .sf-dump .sf-dump-ref { color: #6E6E6E; } -.dumped-tag > .sf-dump .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } -.dumped-tag > .sf-dump .sf-dump-ellipsis-path { max-width: 5em; } -.dumped-tag > .sf-dump .sf-dump-ns { user-select: none; } diff --git a/vendor/symfony/var-dumper/Resources/functions/dump.php b/vendor/symfony/var-dumper/Resources/functions/dump.php deleted file mode 100644 index a485d57..0000000 --- a/vendor/symfony/var-dumper/Resources/functions/dump.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use Symfony\Component\VarDumper\VarDumper; - -if (!function_exists('dump')) { - /** - * @author Nicolas Grekas <p@tchwork.com> - */ - function dump($var, ...$moreVars) - { - VarDumper::dump($var); - - foreach ($moreVars as $v) { - VarDumper::dump($v); - } - - if (1 < func_num_args()) { - return func_get_args(); - } - - return $var; - } -} - -if (!function_exists('dd')) { - function dd(...$vars) - { - foreach ($vars as $v) { - VarDumper::dump($v); - } - - exit(1); - } -} diff --git a/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js b/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js deleted file mode 100644 index 63101e5..0000000 --- a/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js +++ /dev/null @@ -1,10 +0,0 @@ -document.addEventListener('DOMContentLoaded', function() { - let prev = null; - Array.from(document.getElementsByTagName('article')).reverse().forEach(function (article) { - const dedupId = article.dataset.dedupId; - if (dedupId === prev) { - article.getElementsByTagName('header')[0].classList.add('hidden'); - } - prev = dedupId; - }); -}); diff --git a/vendor/symfony/var-dumper/Server/Connection.php b/vendor/symfony/var-dumper/Server/Connection.php deleted file mode 100644 index 55d9214..0000000 --- a/vendor/symfony/var-dumper/Server/Connection.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Server; - -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; - -/** - * Forwards serialized Data clones to a server. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - */ -class Connection -{ - private $host; - private $contextProviders; - private $socket; - - /** - * @param string $host The server host - * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name - */ - public function __construct(string $host, array $contextProviders = []) - { - if (!str_contains($host, '://')) { - $host = 'tcp://'.$host; - } - - $this->host = $host; - $this->contextProviders = $contextProviders; - } - - public function getContextProviders(): array - { - return $this->contextProviders; - } - - public function write(Data $data): bool - { - $socketIsFresh = !$this->socket; - if (!$this->socket = $this->socket ?: $this->createSocket()) { - return false; - } - - $context = ['timestamp' => microtime(true)]; - foreach ($this->contextProviders as $name => $provider) { - $context[$name] = $provider->getContext(); - } - $context = array_filter($context); - $encodedPayload = base64_encode(serialize([$data, $context]))."\n"; - - set_error_handler([self::class, 'nullErrorHandler']); - try { - if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { - return true; - } - if (!$socketIsFresh) { - stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR); - fclose($this->socket); - $this->socket = $this->createSocket(); - } - if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { - return true; - } - } finally { - restore_error_handler(); - } - - return false; - } - - private static function nullErrorHandler(int $t, string $m) - { - // no-op - } - - private function createSocket() - { - set_error_handler([self::class, 'nullErrorHandler']); - try { - return stream_socket_client($this->host, $errno, $errstr, 3, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT); - } finally { - restore_error_handler(); - } - } -} diff --git a/vendor/symfony/var-dumper/Server/DumpServer.php b/vendor/symfony/var-dumper/Server/DumpServer.php deleted file mode 100644 index 1c2c348..0000000 --- a/vendor/symfony/var-dumper/Server/DumpServer.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Server; - -use Psr\Log\LoggerInterface; -use Symfony\Component\VarDumper\Cloner\Data; -use Symfony\Component\VarDumper\Cloner\Stub; - -/** - * A server collecting Data clones sent by a ServerDumper. - * - * @author Maxime Steinhausser <maxime.steinhausser@gmail.com> - * - * @final - */ -class DumpServer -{ - private $host; - private $socket; - private $logger; - - public function __construct(string $host, LoggerInterface $logger = null) - { - if (!str_contains($host, '://')) { - $host = 'tcp://'.$host; - } - - $this->host = $host; - $this->logger = $logger; - } - - public function start(): void - { - if (!$this->socket = stream_socket_server($this->host, $errno, $errstr)) { - throw new \RuntimeException(sprintf('Server start failed on "%s": ', $this->host).$errstr.' '.$errno); - } - } - - public function listen(callable $callback): void - { - if (null === $this->socket) { - $this->start(); - } - - foreach ($this->getMessages() as $clientId => $message) { - $payload = @unserialize(base64_decode($message), ['allowed_classes' => [Data::class, Stub::class]]); - - // Impossible to decode the message, give up. - if (false === $payload) { - if ($this->logger) { - $this->logger->warning('Unable to decode a message from {clientId} client.', ['clientId' => $clientId]); - } - - continue; - } - - if (!\is_array($payload) || \count($payload) < 2 || !$payload[0] instanceof Data || !\is_array($payload[1])) { - if ($this->logger) { - $this->logger->warning('Invalid payload from {clientId} client. Expected an array of two elements (Data $data, array $context)', ['clientId' => $clientId]); - } - - continue; - } - - [$data, $context] = $payload; - - $callback($data, $context, $clientId); - } - } - - public function getHost(): string - { - return $this->host; - } - - private function getMessages(): iterable - { - $sockets = [(int) $this->socket => $this->socket]; - $write = []; - - while (true) { - $read = $sockets; - stream_select($read, $write, $write, null); - - foreach ($read as $stream) { - if ($this->socket === $stream) { - $stream = stream_socket_accept($this->socket); - $sockets[(int) $stream] = $stream; - } elseif (feof($stream)) { - unset($sockets[(int) $stream]); - fclose($stream); - } else { - yield (int) $stream => fgets($stream); - } - } - } - } -} diff --git a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php b/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php deleted file mode 100644 index 3d3d18e..0000000 --- a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php +++ /dev/null @@ -1,87 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Test; - -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -trait VarDumperTestTrait -{ - /** - * @internal - */ - private $varDumperConfig = [ - 'casters' => [], - 'flags' => null, - ]; - - protected function setUpVarDumper(array $casters, int $flags = null): void - { - $this->varDumperConfig['casters'] = $casters; - $this->varDumperConfig['flags'] = $flags; - } - - /** - * @after - */ - protected function tearDownVarDumper(): void - { - $this->varDumperConfig['casters'] = []; - $this->varDumperConfig['flags'] = null; - } - - public function assertDumpEquals($expected, $data, $filter = 0, $message = '') - { - $this->assertSame($this->prepareExpectation($expected, $filter), $this->getDump($data, null, $filter), $message); - } - - public function assertDumpMatchesFormat($expected, $data, $filter = 0, $message = '') - { - $this->assertStringMatchesFormat($this->prepareExpectation($expected, $filter), $this->getDump($data, null, $filter), $message); - } - - /** - * @return string|null - */ - protected function getDump($data, $key = null, $filter = 0) - { - if (null === $flags = $this->varDumperConfig['flags']) { - $flags = getenv('DUMP_LIGHT_ARRAY') ? CliDumper::DUMP_LIGHT_ARRAY : 0; - $flags |= getenv('DUMP_STRING_LENGTH') ? CliDumper::DUMP_STRING_LENGTH : 0; - $flags |= getenv('DUMP_COMMA_SEPARATOR') ? CliDumper::DUMP_COMMA_SEPARATOR : 0; - } - - $cloner = new VarCloner(); - $cloner->addCasters($this->varDumperConfig['casters']); - $cloner->setMaxItems(-1); - $dumper = new CliDumper(null, null, $flags); - $dumper->setColors(false); - $data = $cloner->cloneVar($data, $filter)->withRefHandles(false); - if (null !== $key && null === $data = $data->seek($key)) { - return null; - } - - return rtrim($dumper->dump($data, true)); - } - - private function prepareExpectation($expected, int $filter): string - { - if (!\is_string($expected)) { - $expected = $this->getDump($expected, null, $filter); - } - - return rtrim($expected); - } -} diff --git a/vendor/symfony/var-dumper/VarDumper.php b/vendor/symfony/var-dumper/VarDumper.php deleted file mode 100644 index febc1e0..0000000 --- a/vendor/symfony/var-dumper/VarDumper.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper; - -use Symfony\Component\VarDumper\Caster\ReflectionCaster; -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; -use Symfony\Component\VarDumper\Dumper\ContextualizedDumper; -use Symfony\Component\VarDumper\Dumper\HtmlDumper; - -// Load the global dump() function -require_once __DIR__.'/Resources/functions/dump.php'; - -/** - * @author Nicolas Grekas <p@tchwork.com> - */ -class VarDumper -{ - private static $handler; - - public static function dump($var) - { - if (null === self::$handler) { - $cloner = new VarCloner(); - $cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); - - if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { - $dumper = 'html' === $_SERVER['VAR_DUMPER_FORMAT'] ? new HtmlDumper() : new CliDumper(); - } else { - $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg']) ? new CliDumper() : new HtmlDumper(); - } - - $dumper = new ContextualizedDumper($dumper, [new SourceContextProvider()]); - - self::$handler = function ($var) use ($cloner, $dumper) { - $dumper->dump($cloner->cloneVar($var)); - }; - } - - return (self::$handler)($var); - } - - public static function setHandler(callable $callable = null) - { - $prevHandler = self::$handler; - - // Prevent replacing the handler with expected format as soon as the env var was set: - if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { - return $prevHandler; - } - - self::$handler = $callable; - - return $prevHandler; - } -} diff --git a/vendor/symfony/var-dumper/composer.json b/vendor/symfony/var-dumper/composer.json deleted file mode 100644 index d4e64cc..0000000 --- a/vendor/symfony/var-dumper/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "symfony/var-dumper", - "type": "library", - "description": "Provides mechanisms for walking through any arbitrary PHP variable", - "keywords": ["dump", "debug"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.1.3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "ext-iconv": "*", - "symfony/console": "^3.4|^4.0|^5.0", - "symfony/process": "^4.4|^5.0", - "twig/twig": "^1.43|^2.13|^3.0.4" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0", - "symfony/console": "<3.4" - }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, - "autoload": { - "files": [ "Resources/functions/dump.php" ], - "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "bin": [ - "Resources/bin/var-dump-server" - ], - "minimum-stability": "dev" -} diff --git a/vendor/symfony/var-exporter/CHANGELOG.md b/vendor/symfony/var-exporter/CHANGELOG.md deleted file mode 100644 index 3406c30..0000000 --- a/vendor/symfony/var-exporter/CHANGELOG.md +++ /dev/null @@ -1,12 +0,0 @@ -CHANGELOG -========= - -5.1.0 ------ - - * added argument `array &$foundClasses` to `VarExporter::export()` to ease with preloading exported values - -4.2.0 ------ - - * added the component diff --git a/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php b/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php deleted file mode 100644 index 379a765..0000000 --- a/vendor/symfony/var-exporter/Exception/ClassNotFoundException.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -class ClassNotFoundException extends \Exception implements ExceptionInterface -{ - public function __construct(string $class, ?\Throwable $previous = null) - { - parent::__construct(sprintf('Class "%s" not found.', $class), 0, $previous); - } -} diff --git a/vendor/symfony/var-exporter/Exception/ExceptionInterface.php b/vendor/symfony/var-exporter/Exception/ExceptionInterface.php deleted file mode 100644 index adfaed4..0000000 --- a/vendor/symfony/var-exporter/Exception/ExceptionInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -interface ExceptionInterface extends \Throwable -{ -} diff --git a/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php b/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php deleted file mode 100644 index b9ba225..0000000 --- a/vendor/symfony/var-exporter/Exception/NotInstantiableTypeException.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Exception; - -class NotInstantiableTypeException extends \Exception implements ExceptionInterface -{ - public function __construct(string $type, ?\Throwable $previous = null) - { - parent::__construct(sprintf('Type "%s" is not instantiable.', $type), 0, $previous); - } -} diff --git a/vendor/symfony/var-exporter/Instantiator.php b/vendor/symfony/var-exporter/Instantiator.php deleted file mode 100644 index 368c769..0000000 --- a/vendor/symfony/var-exporter/Instantiator.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter; - -use Symfony\Component\VarExporter\Exception\ExceptionInterface; -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; -use Symfony\Component\VarExporter\Internal\Hydrator; -use Symfony\Component\VarExporter\Internal\Registry; - -/** - * A utility class to create objects without calling their constructor. - * - * @author Nicolas Grekas <p@tchwork.com> - */ -final class Instantiator -{ - /** - * Creates an object and sets its properties without calling its constructor nor any other methods. - * - * For example: - * - * // creates an empty instance of Foo - * Instantiator::instantiate(Foo::class); - * - * // creates a Foo instance and sets one of its properties - * Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]); - * - * // creates a Foo instance and sets a private property defined on its parent Bar class - * Instantiator::instantiate(Foo::class, [], [ - * Bar::class => ['privateBarProperty' => $propertyValue], - * ]); - * - * Instances of ArrayObject, ArrayIterator and SplObjectStorage can be created - * by using the special "\0" property name to define their internal value: - * - * // creates an SplObjectStorage where $info1 is attached to $obj1, etc. - * Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]); - * - * // creates an ArrayObject populated with $inputArray - * Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray]]); - * - * @param string $class The class of the instance to create - * @param array $properties The properties to set on the instance - * @param array $privateProperties The private properties to set on the instance, - * keyed by their declaring class - * - * @throws ExceptionInterface When the instance cannot be created - */ - public static function instantiate(string $class, array $properties = [], array $privateProperties = []): object - { - $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class); - - if (Registry::$cloneable[$class]) { - $wrappedInstance = [clone Registry::$prototypes[$class]]; - } elseif (Registry::$instantiableWithoutConstructor[$class]) { - $wrappedInstance = [$reflector->newInstanceWithoutConstructor()]; - } elseif (null === Registry::$prototypes[$class]) { - throw new NotInstantiableTypeException($class); - } elseif ($reflector->implementsInterface('Serializable') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize'))) { - $wrappedInstance = [unserialize('C:'.\strlen($class).':"'.$class.'":0:{}')]; - } else { - $wrappedInstance = [unserialize('O:'.\strlen($class).':"'.$class.'":0:{}')]; - } - - if ($properties) { - $privateProperties[$class] = isset($privateProperties[$class]) ? $properties + $privateProperties[$class] : $properties; - } - - foreach ($privateProperties as $class => $properties) { - if (!$properties) { - continue; - } - foreach ($properties as $name => $value) { - // because they're also used for "unserialization", hydrators - // deal with array of instances, so we need to wrap values - $properties[$name] = [$value]; - } - (Hydrator::$hydrators[$class] ?? Hydrator::getHydrator($class))($properties, $wrappedInstance); - } - - return $wrappedInstance[0]; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Exporter.php b/vendor/symfony/var-exporter/Internal/Exporter.php deleted file mode 100644 index 51c29e4..0000000 --- a/vendor/symfony/var-exporter/Internal/Exporter.php +++ /dev/null @@ -1,417 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -class Exporter -{ - /** - * Prepares an array of values for VarExporter. - * - * For performance this method is public and has no type-hints. - * - * @param array &$values - * @param \SplObjectStorage $objectsPool - * @param array &$refsPool - * @param int &$objectsCount - * @param bool &$valuesAreStatic - * - * @throws NotInstantiableTypeException When a value cannot be serialized - */ - public static function prepare($values, $objectsPool, &$refsPool, &$objectsCount, &$valuesAreStatic): array - { - $refs = $values; - foreach ($values as $k => $value) { - if (\is_resource($value)) { - throw new NotInstantiableTypeException(get_resource_type($value).' resource'); - } - $refs[$k] = $objectsPool; - - if ($isRef = !$valueIsStatic = $values[$k] !== $objectsPool) { - $values[$k] = &$value; // Break hard references to make $values completely - unset($value); // independent from the original structure - $refs[$k] = $value = $values[$k]; - if ($value instanceof Reference && 0 > $value->id) { - $valuesAreStatic = false; - ++$value->count; - continue; - } - $refsPool[] = [&$refs[$k], $value, &$value]; - $refs[$k] = $values[$k] = new Reference(-\count($refsPool), $value); - } - - if (\is_array($value)) { - if ($value) { - $value = self::prepare($value, $objectsPool, $refsPool, $objectsCount, $valueIsStatic); - } - goto handle_value; - } elseif (!\is_object($value) || $value instanceof \UnitEnum) { - goto handle_value; - } - - $valueIsStatic = false; - if (isset($objectsPool[$value])) { - ++$objectsCount; - $value = new Reference($objectsPool[$value][0]); - goto handle_value; - } - - $class = \get_class($value); - $reflector = Registry::$reflectors[$class] ?? Registry::getClassReflector($class); - $properties = []; - - if ($reflector->hasMethod('__serialize')) { - if (!$reflector->getMethod('__serialize')->isPublic()) { - throw new \Error(sprintf('Call to %s method "%s::__serialize()".', $reflector->getMethod('__serialize')->isProtected() ? 'protected' : 'private', $class)); - } - - if (!\is_array($serializeProperties = $value->__serialize())) { - throw new \TypeError($class.'::__serialize() must return an array'); - } - - if ($reflector->hasMethod('__unserialize')) { - $properties = $serializeProperties; - } else { - foreach ($serializeProperties as $n => $v) { - $c = \PHP_VERSION_ID >= 80100 && $reflector->hasProperty($n) && ($p = $reflector->getProperty($n))->isReadOnly() ? $p->class : 'stdClass'; - $properties[$c][$n] = $v; - } - } - - goto prepare_value; - } - - $sleep = null; - $proto = Registry::$prototypes[$class]; - - if (($value instanceof \ArrayIterator || $value instanceof \ArrayObject) && null !== $proto) { - // ArrayIterator and ArrayObject need special care because their "flags" - // option changes the behavior of the (array) casting operator. - [$arrayValue, $properties] = self::getArrayObjectProperties($value, $proto); - - // populates Registry::$prototypes[$class] with a new instance - Registry::getClassReflector($class, Registry::$instantiableWithoutConstructor[$class], Registry::$cloneable[$class]); - } elseif ($value instanceof \SplObjectStorage && Registry::$cloneable[$class] && null !== $proto) { - // By implementing Serializable, SplObjectStorage breaks - // internal references; let's deal with it on our own. - foreach (clone $value as $v) { - $properties[] = $v; - $properties[] = $value[$v]; - } - $properties = ['SplObjectStorage' => ["\0" => $properties]]; - $arrayValue = (array) $value; - } elseif ($value instanceof \Serializable - || $value instanceof \__PHP_Incomplete_Class - || \PHP_VERSION_ID < 80200 && $value instanceof \DatePeriod - ) { - ++$objectsCount; - $objectsPool[$value] = [$id = \count($objectsPool), serialize($value), [], 0]; - $value = new Reference($id); - goto handle_value; - } else { - if (method_exists($class, '__sleep')) { - if (!\is_array($sleep = $value->__sleep())) { - trigger_error('serialize(): __sleep should return an array only containing the names of instance-variables to serialize', \E_USER_NOTICE); - $value = null; - goto handle_value; - } - $sleep = array_flip($sleep); - } - - $arrayValue = (array) $value; - } - - $proto = (array) $proto; - - foreach ($arrayValue as $name => $v) { - $i = 0; - $n = (string) $name; - if ('' === $n || "\0" !== $n[0]) { - $c = \PHP_VERSION_ID >= 80100 && $reflector->hasProperty($n) && ($p = $reflector->getProperty($n))->isReadOnly() ? $p->class : 'stdClass'; - } elseif ('*' === $n[1]) { - $n = substr($n, 3); - $c = $reflector->getProperty($n)->class; - if ('Error' === $c) { - $c = 'TypeError'; - } elseif ('Exception' === $c) { - $c = 'ErrorException'; - } - } else { - $i = strpos($n, "\0", 2); - $c = substr($n, 1, $i - 1); - $n = substr($n, 1 + $i); - } - if (null !== $sleep) { - if (!isset($sleep[$name]) && (!isset($sleep[$n]) || ($i && $c !== $class))) { - unset($arrayValue[$name]); - continue; - } - unset($sleep[$name], $sleep[$n]); - } - if (!\array_key_exists($name, $proto) || $proto[$name] !== $v || "\x00Error\x00trace" === $name || "\x00Exception\x00trace" === $name) { - $properties[$c][$n] = $v; - } - } - if ($sleep) { - foreach ($sleep as $n => $v) { - trigger_error(sprintf('serialize(): "%s" returned as member variable from __sleep() but does not exist', $n), \E_USER_NOTICE); - } - } - if (method_exists($class, '__unserialize')) { - $properties = $arrayValue; - } - - prepare_value: - $objectsPool[$value] = [$id = \count($objectsPool)]; - $properties = self::prepare($properties, $objectsPool, $refsPool, $objectsCount, $valueIsStatic); - ++$objectsCount; - $objectsPool[$value] = [$id, $class, $properties, method_exists($class, '__unserialize') ? -$objectsCount : (method_exists($class, '__wakeup') ? $objectsCount : 0)]; - - $value = new Reference($id); - - handle_value: - if ($isRef) { - unset($value); // Break the hard reference created above - } elseif (!$valueIsStatic) { - $values[$k] = $value; - } - $valuesAreStatic = $valueIsStatic && $valuesAreStatic; - } - - return $values; - } - - public static function export($value, string $indent = '') - { - switch (true) { - case \is_int($value) || \is_float($value): return var_export($value, true); - case [] === $value: return '[]'; - case false === $value: return 'false'; - case true === $value: return 'true'; - case null === $value: return 'null'; - case '' === $value: return "''"; - case $value instanceof \UnitEnum: return '\\'.ltrim(var_export($value, true), '\\'); - } - - if ($value instanceof Reference) { - if (0 <= $value->id) { - return '$o['.$value->id.']'; - } - if (!$value->count) { - return self::export($value->value, $indent); - } - $value = -$value->id; - - return '&$r['.$value.']'; - } - $subIndent = $indent.' '; - - if (\is_string($value)) { - $code = sprintf("'%s'", addcslashes($value, "'\\")); - - $code = preg_replace_callback("/((?:[\\0\\r\\n]|\u{202A}|\u{202B}|\u{202D}|\u{202E}|\u{2066}|\u{2067}|\u{2068}|\u{202C}|\u{2069})++)(.)/", function ($m) use ($subIndent) { - $m[1] = sprintf('\'."%s".\'', str_replace( - ["\0", "\r", "\n", "\u{202A}", "\u{202B}", "\u{202D}", "\u{202E}", "\u{2066}", "\u{2067}", "\u{2068}", "\u{202C}", "\u{2069}", '\n\\'], - ['\0', '\r', '\n', '\u{202A}', '\u{202B}', '\u{202D}', '\u{202E}', '\u{2066}', '\u{2067}', '\u{2068}', '\u{202C}', '\u{2069}', '\n"'."\n".$subIndent.'."\\'], - $m[1] - )); - - if ("'" === $m[2]) { - return substr($m[1], 0, -2); - } - - if ('n".\'' === substr($m[1], -4)) { - return substr_replace($m[1], "\n".$subIndent.".'".$m[2], -2); - } - - return $m[1].$m[2]; - }, $code, -1, $count); - - if ($count && str_starts_with($code, "''.")) { - $code = substr($code, 3); - } - - return $code; - } - - if (\is_array($value)) { - $j = -1; - $code = ''; - foreach ($value as $k => $v) { - $code .= $subIndent; - if (!\is_int($k) || 1 !== $k - $j) { - $code .= self::export($k, $subIndent).' => '; - } - if (\is_int($k) && $k > $j) { - $j = $k; - } - $code .= self::export($v, $subIndent).",\n"; - } - - return "[\n".$code.$indent.']'; - } - - if ($value instanceof Values) { - $code = $subIndent."\$r = [],\n"; - foreach ($value->values as $k => $v) { - $code .= $subIndent.'$r['.$k.'] = '.self::export($v, $subIndent).",\n"; - } - - return "[\n".$code.$indent.']'; - } - - if ($value instanceof Registry) { - return self::exportRegistry($value, $indent, $subIndent); - } - - if ($value instanceof Hydrator) { - return self::exportHydrator($value, $indent, $subIndent); - } - - throw new \UnexpectedValueException(sprintf('Cannot export value of type "%s".', get_debug_type($value))); - } - - private static function exportRegistry(Registry $value, string $indent, string $subIndent): string - { - $code = ''; - $serializables = []; - $seen = []; - $prototypesAccess = 0; - $factoriesAccess = 0; - $r = '\\'.Registry::class; - $j = -1; - - foreach ($value->classes as $k => $class) { - if (':' === ($class[1] ?? null)) { - $serializables[$k] = $class; - continue; - } - if (!Registry::$instantiableWithoutConstructor[$class]) { - if (is_subclass_of($class, 'Serializable') && !method_exists($class, '__unserialize')) { - $serializables[$k] = 'C:'.\strlen($class).':"'.$class.'":0:{}'; - } else { - $serializables[$k] = 'O:'.\strlen($class).':"'.$class.'":0:{}'; - } - if (is_subclass_of($class, 'Throwable')) { - $eol = is_subclass_of($class, 'Error') ? "\0Error\0" : "\0Exception\0"; - $serializables[$k] = substr_replace($serializables[$k], '1:{s:'.(5 + \strlen($eol)).':"'.$eol.'trace";a:0:{}}', -4); - } - continue; - } - $code .= $subIndent.(1 !== $k - $j ? $k.' => ' : ''); - $j = $k; - $eol = ",\n"; - $c = '['.self::export($class).']'; - - if ($seen[$class] ?? false) { - if (Registry::$cloneable[$class]) { - ++$prototypesAccess; - $code .= 'clone $p'.$c; - } else { - ++$factoriesAccess; - $code .= '$f'.$c.'()'; - } - } else { - $seen[$class] = true; - if (Registry::$cloneable[$class]) { - $code .= 'clone ('.($prototypesAccess++ ? '$p' : '($p = &'.$r.'::$prototypes)').$c.' ?? '.$r.'::p'; - } else { - $code .= '('.($factoriesAccess++ ? '$f' : '($f = &'.$r.'::$factories)').$c.' ?? '.$r.'::f'; - $eol = '()'.$eol; - } - $code .= '('.substr($c, 1, -1).'))'; - } - $code .= $eol; - } - - if (1 === $prototypesAccess) { - $code = str_replace('($p = &'.$r.'::$prototypes)', $r.'::$prototypes', $code); - } - if (1 === $factoriesAccess) { - $code = str_replace('($f = &'.$r.'::$factories)', $r.'::$factories', $code); - } - if ('' !== $code) { - $code = "\n".$code.$indent; - } - - if ($serializables) { - $code = $r.'::unserialize(['.$code.'], '.self::export($serializables, $indent).')'; - } else { - $code = '['.$code.']'; - } - - return '$o = '.$code; - } - - private static function exportHydrator(Hydrator $value, string $indent, string $subIndent): string - { - $code = ''; - foreach ($value->properties as $class => $properties) { - $code .= $subIndent.' '.self::export($class).' => '.self::export($properties, $subIndent.' ').",\n"; - } - - $code = [ - self::export($value->registry, $subIndent), - self::export($value->values, $subIndent), - '' !== $code ? "[\n".$code.$subIndent.']' : '[]', - self::export($value->value, $subIndent), - self::export($value->wakeups, $subIndent), - ]; - - return '\\'.\get_class($value)."::hydrate(\n".$subIndent.implode(",\n".$subIndent, $code)."\n".$indent.')'; - } - - /** - * @param \ArrayIterator|\ArrayObject $value - * @param \ArrayIterator|\ArrayObject $proto - */ - private static function getArrayObjectProperties($value, $proto): array - { - $reflector = $value instanceof \ArrayIterator ? 'ArrayIterator' : 'ArrayObject'; - $reflector = Registry::$reflectors[$reflector] ?? Registry::getClassReflector($reflector); - - $properties = [ - $arrayValue = (array) $value, - $reflector->getMethod('getFlags')->invoke($value), - $value instanceof \ArrayObject ? $reflector->getMethod('getIteratorClass')->invoke($value) : 'ArrayIterator', - ]; - - $reflector = $reflector->getMethod('setFlags'); - $reflector->invoke($proto, \ArrayObject::STD_PROP_LIST); - - if ($properties[1] & \ArrayObject::STD_PROP_LIST) { - $reflector->invoke($value, 0); - $properties[0] = (array) $value; - } else { - $reflector->invoke($value, \ArrayObject::STD_PROP_LIST); - $arrayValue = (array) $value; - } - $reflector->invoke($value, $properties[1]); - - if ([[], 0, 'ArrayIterator'] === $properties) { - $properties = []; - } else { - if ('ArrayIterator' === $properties[2]) { - unset($properties[2]); - } - $properties = [$reflector->class => ["\0" => $properties]]; - } - - return [$arrayValue, $properties]; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Hydrator.php b/vendor/symfony/var-exporter/Internal/Hydrator.php deleted file mode 100644 index 5ed6bdc..0000000 --- a/vendor/symfony/var-exporter/Internal/Hydrator.php +++ /dev/null @@ -1,152 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\ClassNotFoundException; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -class Hydrator -{ - public static $hydrators = []; - - public $registry; - public $values; - public $properties; - public $value; - public $wakeups; - - public function __construct(?Registry $registry, ?Values $values, array $properties, $value, array $wakeups) - { - $this->registry = $registry; - $this->values = $values; - $this->properties = $properties; - $this->value = $value; - $this->wakeups = $wakeups; - } - - public static function hydrate($objects, $values, $properties, $value, $wakeups) - { - foreach ($properties as $class => $vars) { - (self::$hydrators[$class] ?? self::getHydrator($class))($vars, $objects); - } - foreach ($wakeups as $k => $v) { - if (\is_array($v)) { - $objects[-$k]->__unserialize($v); - } else { - $objects[$v]->__wakeup(); - } - } - - return $value; - } - - public static function getHydrator($class) - { - switch ($class) { - case 'stdClass': - return self::$hydrators[$class] = static function ($properties, $objects) { - foreach ($properties as $name => $values) { - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - - case 'ErrorException': - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \ErrorException { - }); - - case 'TypeError': - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, new class() extends \Error { - }); - - case 'SplObjectStorage': - return self::$hydrators[$class] = static function ($properties, $objects) { - foreach ($properties as $name => $values) { - if ("\0" === $name) { - foreach ($values as $i => $v) { - for ($j = 0; $j < \count($v); ++$j) { - $objects[$i]->attach($v[$j], $v[++$j]); - } - } - continue; - } - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - } - - if (!class_exists($class) && !interface_exists($class, false) && !trait_exists($class, false)) { - throw new ClassNotFoundException($class); - } - $classReflector = new \ReflectionClass($class); - - switch ($class) { - case 'ArrayIterator': - case 'ArrayObject': - $constructor = \Closure::fromCallable([$classReflector->getConstructor(), 'invokeArgs']); - - return self::$hydrators[$class] = static function ($properties, $objects) use ($constructor) { - foreach ($properties as $name => $values) { - if ("\0" !== $name) { - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - } - foreach ($properties["\0"] ?? [] as $i => $v) { - $constructor($objects[$i], $v); - } - }; - } - - if (!$classReflector->isInternal()) { - return self::$hydrators[$class] = (self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'))->bindTo(null, $class); - } - - if ($classReflector->name !== $class) { - return self::$hydrators[$classReflector->name] ?? self::getHydrator($classReflector->name); - } - - $propertySetters = []; - foreach ($classReflector->getProperties() as $propertyReflector) { - if (!$propertyReflector->isStatic()) { - $propertyReflector->setAccessible(true); - $propertySetters[$propertyReflector->name] = \Closure::fromCallable([$propertyReflector, 'setValue']); - } - } - - if (!$propertySetters) { - return self::$hydrators[$class] = self::$hydrators['stdClass'] ?? self::getHydrator('stdClass'); - } - - return self::$hydrators[$class] = static function ($properties, $objects) use ($propertySetters) { - foreach ($properties as $name => $values) { - if ($setValue = $propertySetters[$name] ?? null) { - foreach ($values as $i => $v) { - $setValue($objects[$i], $v); - } - continue; - } - foreach ($values as $i => $v) { - $objects[$i]->$name = $v; - } - } - }; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Reference.php b/vendor/symfony/var-exporter/Internal/Reference.php deleted file mode 100644 index e371c07..0000000 --- a/vendor/symfony/var-exporter/Internal/Reference.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -class Reference -{ - public $id; - public $value; - public $count = 0; - - public function __construct(int $id, $value = null) - { - $this->id = $id; - $this->value = $value; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Registry.php b/vendor/symfony/var-exporter/Internal/Registry.php deleted file mode 100644 index 24b77b9..0000000 --- a/vendor/symfony/var-exporter/Internal/Registry.php +++ /dev/null @@ -1,146 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -use Symfony\Component\VarExporter\Exception\ClassNotFoundException; -use Symfony\Component\VarExporter\Exception\NotInstantiableTypeException; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -class Registry -{ - public static $reflectors = []; - public static $prototypes = []; - public static $factories = []; - public static $cloneable = []; - public static $instantiableWithoutConstructor = []; - - public $classes = []; - - public function __construct(array $classes) - { - $this->classes = $classes; - } - - public static function unserialize($objects, $serializables) - { - $unserializeCallback = ini_set('unserialize_callback_func', __CLASS__.'::getClassReflector'); - - try { - foreach ($serializables as $k => $v) { - $objects[$k] = unserialize($v); - } - } finally { - ini_set('unserialize_callback_func', $unserializeCallback); - } - - return $objects; - } - - public static function p($class) - { - self::getClassReflector($class, true, true); - - return self::$prototypes[$class]; - } - - public static function f($class) - { - $reflector = self::$reflectors[$class] ?? self::getClassReflector($class, true, false); - - return self::$factories[$class] = \Closure::fromCallable([$reflector, 'newInstanceWithoutConstructor']); - } - - public static function getClassReflector($class, $instantiableWithoutConstructor = false, $cloneable = null) - { - if (!($isClass = class_exists($class)) && !interface_exists($class, false) && !trait_exists($class, false)) { - throw new ClassNotFoundException($class); - } - $reflector = new \ReflectionClass($class); - - if ($instantiableWithoutConstructor) { - $proto = $reflector->newInstanceWithoutConstructor(); - } elseif (!$isClass || $reflector->isAbstract()) { - throw new NotInstantiableTypeException($class); - } elseif ($reflector->name !== $class) { - $reflector = self::$reflectors[$name = $reflector->name] ?? self::getClassReflector($name, false, $cloneable); - self::$cloneable[$class] = self::$cloneable[$name]; - self::$instantiableWithoutConstructor[$class] = self::$instantiableWithoutConstructor[$name]; - self::$prototypes[$class] = self::$prototypes[$name]; - - return self::$reflectors[$class] = $reflector; - } else { - try { - $proto = $reflector->newInstanceWithoutConstructor(); - $instantiableWithoutConstructor = true; - } catch (\ReflectionException $e) { - $proto = $reflector->implementsInterface('Serializable') && !method_exists($class, '__unserialize') ? 'C:' : 'O:'; - if ('C:' === $proto && !$reflector->getMethod('unserialize')->isInternal()) { - $proto = null; - } else { - try { - $proto = @unserialize($proto.\strlen($class).':"'.$class.'":0:{}'); - } catch (\Exception $e) { - if (__FILE__ !== $e->getFile()) { - throw $e; - } - throw new NotInstantiableTypeException($class, $e); - } - if (false === $proto) { - throw new NotInstantiableTypeException($class); - } - } - } - if (null !== $proto && !$proto instanceof \Throwable && !$proto instanceof \Serializable && !method_exists($class, '__sleep') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__serialize'))) { - try { - serialize($proto); - } catch (\Exception $e) { - throw new NotInstantiableTypeException($class, $e); - } - } - } - - if (null === $cloneable) { - if (($proto instanceof \Reflector || $proto instanceof \ReflectionGenerator || $proto instanceof \ReflectionType || $proto instanceof \IteratorIterator || $proto instanceof \RecursiveIteratorIterator) && (!$proto instanceof \Serializable && !method_exists($proto, '__wakeup') && (\PHP_VERSION_ID < 70400 || !method_exists($class, '__unserialize')))) { - throw new NotInstantiableTypeException($class); - } - - $cloneable = $reflector->isCloneable() && !$reflector->hasMethod('__clone'); - } - - self::$cloneable[$class] = $cloneable; - self::$instantiableWithoutConstructor[$class] = $instantiableWithoutConstructor; - self::$prototypes[$class] = $proto; - - if ($proto instanceof \Throwable) { - static $setTrace; - - if (null === $setTrace) { - $setTrace = [ - new \ReflectionProperty(\Error::class, 'trace'), - new \ReflectionProperty(\Exception::class, 'trace'), - ]; - $setTrace[0]->setAccessible(true); - $setTrace[1]->setAccessible(true); - $setTrace[0] = \Closure::fromCallable([$setTrace[0], 'setValue']); - $setTrace[1] = \Closure::fromCallable([$setTrace[1], 'setValue']); - } - - $setTrace[$proto instanceof \Exception]($proto, []); - } - - return self::$reflectors[$class] = $reflector; - } -} diff --git a/vendor/symfony/var-exporter/Internal/Values.php b/vendor/symfony/var-exporter/Internal/Values.php deleted file mode 100644 index 21ae04e..0000000 --- a/vendor/symfony/var-exporter/Internal/Values.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter\Internal; - -/** - * @author Nicolas Grekas <p@tchwork.com> - * - * @internal - */ -class Values -{ - public $values; - - public function __construct(array $values) - { - $this->values = $values; - } -} diff --git a/vendor/symfony/var-exporter/LICENSE b/vendor/symfony/var-exporter/LICENSE deleted file mode 100644 index 7536cae..0000000 --- a/vendor/symfony/var-exporter/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018-present Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/symfony/var-exporter/README.md b/vendor/symfony/var-exporter/README.md deleted file mode 100644 index a34e4c2..0000000 --- a/vendor/symfony/var-exporter/README.md +++ /dev/null @@ -1,38 +0,0 @@ -VarExporter Component -===================== - -The VarExporter component allows exporting any serializable PHP data structure to -plain PHP code. While doing so, it preserves all the semantics associated with -the serialization mechanism of PHP (`__wakeup`, `__sleep`, `Serializable`, -`__serialize`, `__unserialize`). - -It also provides an instantiator that allows creating and populating objects -without calling their constructor nor any other methods. - -The reason to use this component *vs* `serialize()` or -[igbinary](https://github.com/igbinary/igbinary) is performance: thanks to -OPcache, the resulting code is significantly faster and more memory efficient -than using `unserialize()` or `igbinary_unserialize()`. - -Unlike `var_export()`, this works on any serializable PHP value. - -It also provides a few improvements over `var_export()`/`serialize()`: - - * the output is PSR-2 compatible; - * the output can be re-indented without messing up with `\r` or `\n` in the data - * missing classes throw a `ClassNotFoundException` instead of being unserialized to - `PHP_Incomplete_Class` objects; - * references involving `SplObjectStorage`, `ArrayObject` or `ArrayIterator` - instances are preserved; - * `Reflection*`, `IteratorIterator` and `RecursiveIteratorIterator` classes - throw an exception when being serialized (their unserialized version is broken - anyway, see https://bugs.php.net/76737). - -Resources ---------- - - * [Documentation](https://symfony.com/doc/current/components/var_exporter.html) - * [Contributing](https://symfony.com/doc/current/contributing/index.html) - * [Report issues](https://github.com/symfony/symfony/issues) and - [send Pull Requests](https://github.com/symfony/symfony/pulls) - in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/var-exporter/VarExporter.php b/vendor/symfony/var-exporter/VarExporter.php deleted file mode 100644 index d4c0809..0000000 --- a/vendor/symfony/var-exporter/VarExporter.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarExporter; - -use Symfony\Component\VarExporter\Exception\ExceptionInterface; -use Symfony\Component\VarExporter\Internal\Exporter; -use Symfony\Component\VarExporter\Internal\Hydrator; -use Symfony\Component\VarExporter\Internal\Registry; -use Symfony\Component\VarExporter\Internal\Values; - -/** - * Exports serializable PHP values to PHP code. - * - * VarExporter allows serializing PHP data structures to plain PHP code (like var_export()) - * while preserving all the semantics associated with serialize() (unlike var_export()). - * - * By leveraging OPcache, the generated PHP code is faster than doing the same with unserialize(). - * - * @author Nicolas Grekas <p@tchwork.com> - */ -final class VarExporter -{ - /** - * Exports a serializable PHP value to PHP code. - * - * @param mixed $value The value to export - * @param bool &$isStaticValue Set to true after execution if the provided value is static, false otherwise - * @param array &$foundClasses Classes found in the value are added to this list as both keys and values - * - * @throws ExceptionInterface When the provided value cannot be serialized - */ - public static function export($value, ?bool &$isStaticValue = null, array &$foundClasses = []): string - { - $isStaticValue = true; - - if (!\is_object($value) && !(\is_array($value) && $value) && !\is_resource($value) || $value instanceof \UnitEnum) { - return Exporter::export($value); - } - - $objectsPool = new \SplObjectStorage(); - $refsPool = []; - $objectsCount = 0; - - try { - $value = Exporter::prepare([$value], $objectsPool, $refsPool, $objectsCount, $isStaticValue)[0]; - } finally { - $references = []; - foreach ($refsPool as $i => $v) { - if ($v[0]->count) { - $references[1 + $i] = $v[2]; - } - $v[0] = $v[1]; - } - } - - if ($isStaticValue) { - return Exporter::export($value); - } - - $classes = []; - $values = []; - $states = []; - foreach ($objectsPool as $i => $v) { - [, $class, $values[], $wakeup] = $objectsPool[$v]; - $foundClasses[$class] = $classes[] = $class; - - if (0 < $wakeup) { - $states[$wakeup] = $i; - } elseif (0 > $wakeup) { - $states[-$wakeup] = [$i, array_pop($values)]; - $values[] = []; - } - } - ksort($states); - - $wakeups = [null]; - foreach ($states as $v) { - if (\is_array($v)) { - $wakeups[-$v[0]] = $v[1]; - } else { - $wakeups[] = $v; - } - } - - if (null === $wakeups[0]) { - unset($wakeups[0]); - } - - $properties = []; - foreach ($values as $i => $vars) { - foreach ($vars as $class => $values) { - foreach ($values as $name => $v) { - $properties[$class][$name][$i] = $v; - } - } - } - - if ($classes || $references) { - $value = new Hydrator(new Registry($classes), $references ? new Values($references) : null, $properties, $value, $wakeups); - } else { - $isStaticValue = true; - } - - return Exporter::export($value); - } -} diff --git a/vendor/symfony/var-exporter/composer.json b/vendor/symfony/var-exporter/composer.json deleted file mode 100644 index 29d4901..0000000 --- a/vendor/symfony/var-exporter/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "symfony/var-exporter", - "type": "library", - "description": "Allows exporting any serializable PHP data structure to plain PHP code", - "keywords": ["export", "serialize", "instantiate", "hydrate", "construct", "clone"], - "homepage": "https://symfony.com", - "license": "MIT", - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" - }, - "require-dev": { - "symfony/var-dumper": "^4.4.9|^5.0.9|^6.0" - }, - "autoload": { - "psr-4": { "Symfony\\Component\\VarExporter\\": "" }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "minimum-stability": "dev" -} diff --git a/vendor/tightenco/collect/.github/workflows/run-tests.yml b/vendor/tightenco/collect/.github/workflows/run-tests.yml deleted file mode 100644 index 8e6c244..0000000 --- a/vendor/tightenco/collect/.github/workflows/run-tests.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Run tests - -on: [push, pull_request] - -jobs: - tests: - strategy: - matrix: - os: [Ubuntu, macOS] - php: [7.2, 7.3, 7.4, 8.0, 8.1] - - include: - - os: Ubuntu - os-version: ubuntu-latest - - - os: macOS - os-version: macos-latest - - name: ${{ matrix.os }} - PHP ${{ matrix.php }} - - runs-on: ${{ matrix.os-version }} - - steps: - - name: Checkout code - uses: actions/checkout@v1 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: posix, dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - coverage: none - - - name: Install dependencies - run: composer update --prefer-stable --prefer-dist --no-interaction - - - name: Run tests - run: bash upgrade.sh diff --git a/vendor/tightenco/collect/branch-commit-push.sh b/vendor/tightenco/collect/branch-commit-push.sh deleted file mode 100644 index 124e583..0000000 --- a/vendor/tightenco/collect/branch-commit-push.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - - -GREEN='\033[0;32m' -RED='\033[0;31m' -WHITE='\033[0;37m' -RESET='\033[0m' - -function validateVersion() -{ - echo "" - passedVersion=$1 - echo -e "${WHITE}-- Validating tag '$passedVersion'...${RESET}" - - # Todo: validate the version here using a regex; if fail, just exit - # ... expect 8.75.0, with no v in front of it - - if [[ $passedVersion == '' ]]; then - echo -e "\n-- Invalid tag. Tags should be structured without v; e.g. 8.57.0" - exit - fi - - echo -e "${WHITE}-- Tag valid.${RESET}" - echo "" -} - -# Exit script if any command fails (e.g. phpunit) -set -e - - -# Require confirmation it's set up corrctly -echo -echo -e "${WHITE}-- This script is meant to be run after running upgrade.sh, BEFORE committing to Git.${RESET}" - -while true; do - echo -e "${GREEN}-- Is that the current state of your local project?${RESET}" - read -p "-- (y/n) " yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit;; - * ) echo "Please answer y or n.";; - esac -done - -# Get the version and exit if not valid -validateVersion $1 - -# Create official v prefaced version -version="v$1" - -# Run tests (and bail if they fail) -phpunit -echo -e "\n${WHITE}-- Tests succeeded.${RESET}" - -# Branch -echo -e "\n${WHITE}-- Creating a Git branch '$version-changes'...${RESET}\n" -git checkout -b $version-changes - -# Add and commit, with "v8.57.0 changes" as the commit name -git add -A -git commit -m "$version changes" - -echo -echo -e "${WHITE}-- Git committed.${RESET}" - -# Push -git push -u origin $version-changes diff --git a/vendor/tightenco/collect/composer.json b/vendor/tightenco/collect/composer.json deleted file mode 100644 index fffeed4..0000000 --- a/vendor/tightenco/collect/composer.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "tightenco/collect", - "description": "Collect - Illuminate Collections as a separate package.", - "keywords": ["laravel", "collection"], - "license": "MIT", - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "require": { - "php": "^7.2|^8.0", - "symfony/var-dumper": "^3.4 || ^4.0 || ^5.0 || ^6.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.3", - "nesbot/carbon": "^2.23.0" - }, - "autoload": { - "files": [ - "src/Collect/Support/helpers.php", - "src/Collect/Support/alias.php" - ], - "psr-4": { - "Tightenco\\Collect\\": "src/Collect" - } - }, - "autoload-dev": { - "files": [ - "tests/files/Support/Carbon.php", - "tests/files/Support/HtmlString.php", - "tests/files/Support/HigherOrderTapProxy.php", - "tests/files/Support/Str.php", - "tests/files/Support/Traits/Conditionable.php", - "tests/files/Support/Stringable.php", - "tests/files/Support/ItemNotFoundException.php", - "tests/files/Support/MultipleItemsFoundException.php", - "tests/Support/Concerns/CountsEnumerations.php" - ] - }, - "scripts": { - "test": [ - "@composer install", - "phpunit" - ] - }, - "minimum-stability": "dev", - "prefer-stable": true -} diff --git a/vendor/tightenco/collect/src/Collect/Contracts/Support/Arrayable.php b/vendor/tightenco/collect/src/Collect/Contracts/Support/Arrayable.php deleted file mode 100644 index a205804..0000000 --- a/vendor/tightenco/collect/src/Collect/Contracts/Support/Arrayable.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -namespace Tightenco\Collect\Contracts\Support; - -interface Arrayable -{ - /** - * Get the instance as an array. - * - * @return array - */ - public function toArray(); -} diff --git a/vendor/tightenco/collect/src/Collect/Contracts/Support/CanBeEscapedWhenCastToString.php b/vendor/tightenco/collect/src/Collect/Contracts/Support/CanBeEscapedWhenCastToString.php deleted file mode 100644 index 6f3ba00..0000000 --- a/vendor/tightenco/collect/src/Collect/Contracts/Support/CanBeEscapedWhenCastToString.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Tightenco\Collect\Contracts\Support; - -interface CanBeEscapedWhenCastToString -{ - /** - * Indicate that the object's string representation should be escaped when __toString is invoked. - * - * @param bool $escape - * @return $this - */ - public function escapeWhenCastingToString($escape = true); -} diff --git a/vendor/tightenco/collect/src/Collect/Contracts/Support/Htmlable.php b/vendor/tightenco/collect/src/Collect/Contracts/Support/Htmlable.php deleted file mode 100644 index aa20e96..0000000 --- a/vendor/tightenco/collect/src/Collect/Contracts/Support/Htmlable.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -namespace Tightenco\Collect\Contracts\Support; - -interface Htmlable -{ - /** - * Get content as a string of HTML. - * - * @return string - */ - public function toHtml(); -} diff --git a/vendor/tightenco/collect/src/Collect/Contracts/Support/Jsonable.php b/vendor/tightenco/collect/src/Collect/Contracts/Support/Jsonable.php deleted file mode 100644 index 6b73730..0000000 --- a/vendor/tightenco/collect/src/Collect/Contracts/Support/Jsonable.php +++ /dev/null @@ -1,14 +0,0 @@ -<?php - -namespace Tightenco\Collect\Contracts\Support; - -interface Jsonable -{ - /** - * Convert the object to its JSON representation. - * - * @param int $options - * @return string - */ - public function toJson($options = 0); -} diff --git a/vendor/tightenco/collect/src/Collect/Support/Arr.php b/vendor/tightenco/collect/src/Collect/Support/Arr.php deleted file mode 100644 index 57350cc..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/Arr.php +++ /dev/null @@ -1,747 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support; - -use ArrayAccess; -use Tightenco\Collect\Support\Traits\Macroable; -use InvalidArgumentException; - -class Arr -{ - use Macroable; - - /** - * Determine whether the given value is array accessible. - * - * @param mixed $value - * @return bool - */ - public static function accessible($value) - { - return is_array($value) || $value instanceof ArrayAccess; - } - - /** - * Add an element to an array using "dot" notation if it doesn't exist. - * - * @param array $array - * @param string $key - * @param mixed $value - * @return array - */ - public static function add($array, $key, $value) - { - if (is_null(static::get($array, $key))) { - static::set($array, $key, $value); - } - - return $array; - } - - /** - * Collapse an array of arrays into a single array. - * - * @param iterable $array - * @return array - */ - public static function collapse($array) - { - $results = []; - - foreach ($array as $values) { - if ($values instanceof Collection) { - $values = $values->all(); - } elseif (! is_array($values)) { - continue; - } - - $results[] = $values; - } - - return array_merge([], ...$results); - } - - /** - * Cross join the given arrays, returning all possible permutations. - * - * @param iterable ...$arrays - * @return array - */ - public static function crossJoin(...$arrays) - { - $results = [[]]; - - foreach ($arrays as $index => $array) { - $append = []; - - foreach ($results as $product) { - foreach ($array as $item) { - $product[$index] = $item; - - $append[] = $product; - } - } - - $results = $append; - } - - return $results; - } - - /** - * Divide an array into two arrays. One with keys and the other with values. - * - * @param array $array - * @return array - */ - public static function divide($array) - { - return [array_keys($array), array_values($array)]; - } - - /** - * Flatten a multi-dimensional associative array with dots. - * - * @param iterable $array - * @param string $prepend - * @return array - */ - public static function dot($array, $prepend = '') - { - $results = []; - - foreach ($array as $key => $value) { - if (is_array($value) && ! empty($value)) { - $results = array_merge($results, static::dot($value, $prepend.$key.'.')); - } else { - $results[$prepend.$key] = $value; - } - } - - return $results; - } - - /** - * Convert a flatten "dot" notation array into an expanded array. - * - * @param iterable $array - * @return array - */ - public static function undot($array) - { - $results = []; - - foreach ($array as $key => $value) { - static::set($results, $key, $value); - } - - return $results; - } - - /** - * Get all of the given array except for a specified array of keys. - * - * @param array $array - * @param array|string $keys - * @return array - */ - public static function except($array, $keys) - { - static::forget($array, $keys); - - return $array; - } - - /** - * Determine if the given key exists in the provided array. - * - * @param \ArrayAccess|array $array - * @param string|int $key - * @return bool - */ - public static function exists($array, $key) - { - if ($array instanceof Enumerable) { - return $array->has($key); - } - - if ($array instanceof ArrayAccess) { - return $array->offsetExists($key); - } - - return array_key_exists($key, $array); - } - - /** - * Return the first element in an array passing a given truth test. - * - * @param iterable $array - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public static function first($array, callable $callback = null, $default = null) - { - if (is_null($callback)) { - if (empty($array)) { - return value($default); - } - - foreach ($array as $item) { - return $item; - } - } - - foreach ($array as $key => $value) { - if ($callback($value, $key)) { - return $value; - } - } - - return value($default); - } - - /** - * Return the last element in an array passing a given truth test. - * - * @param array $array - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public static function last($array, callable $callback = null, $default = null) - { - if (is_null($callback)) { - return empty($array) ? value($default) : end($array); - } - - return static::first(array_reverse($array, true), $callback, $default); - } - - /** - * Flatten a multi-dimensional array into a single level. - * - * @param iterable $array - * @param int $depth - * @return array - */ - public static function flatten($array, $depth = INF) - { - $result = []; - - foreach ($array as $item) { - $item = $item instanceof Collection ? $item->all() : $item; - - if (! is_array($item)) { - $result[] = $item; - } else { - $values = $depth === 1 - ? array_values($item) - : static::flatten($item, $depth - 1); - - foreach ($values as $value) { - $result[] = $value; - } - } - } - - return $result; - } - - /** - * Remove one or many array items from a given array using "dot" notation. - * - * @param array $array - * @param array|string $keys - * @return void - */ - public static function forget(&$array, $keys) - { - $original = &$array; - - $keys = (array) $keys; - - if (count($keys) === 0) { - return; - } - - foreach ($keys as $key) { - // if the exact key exists in the top-level, remove it - if (static::exists($array, $key)) { - unset($array[$key]); - - continue; - } - - $parts = explode('.', $key); - - // clean up before each pass - $array = &$original; - - while (count($parts) > 1) { - $part = array_shift($parts); - - if (isset($array[$part]) && is_array($array[$part])) { - $array = &$array[$part]; - } else { - continue 2; - } - } - - unset($array[array_shift($parts)]); - } - } - - /** - * Get an item from an array using "dot" notation. - * - * @param \ArrayAccess|array $array - * @param string|int|null $key - * @param mixed $default - * @return mixed - */ - public static function get($array, $key, $default = null) - { - if (! static::accessible($array)) { - return value($default); - } - - if (is_null($key)) { - return $array; - } - - if (static::exists($array, $key)) { - return $array[$key]; - } - - if (strpos($key, '.') === false) { - return $array[$key] ?? value($default); - } - - foreach (explode('.', $key) as $segment) { - if (static::accessible($array) && static::exists($array, $segment)) { - $array = $array[$segment]; - } else { - return value($default); - } - } - - return $array; - } - - /** - * Check if an item or items exist in an array using "dot" notation. - * - * @param \ArrayAccess|array $array - * @param string|array $keys - * @return bool - */ - public static function has($array, $keys) - { - $keys = (array) $keys; - - if (! $array || $keys === []) { - return false; - } - - foreach ($keys as $key) { - $subKeyArray = $array; - - if (static::exists($array, $key)) { - continue; - } - - foreach (explode('.', $key) as $segment) { - if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) { - $subKeyArray = $subKeyArray[$segment]; - } else { - return false; - } - } - } - - return true; - } - - /** - * Determine if any of the keys exist in an array using "dot" notation. - * - * @param \ArrayAccess|array $array - * @param string|array $keys - * @return bool - */ - public static function hasAny($array, $keys) - { - if (is_null($keys)) { - return false; - } - - $keys = (array) $keys; - - if (! $array) { - return false; - } - - if ($keys === []) { - return false; - } - - foreach ($keys as $key) { - if (static::has($array, $key)) { - return true; - } - } - - return false; - } - - /** - * Determines if an array is associative. - * - * An array is "associative" if it doesn't have sequential numerical keys beginning with zero. - * - * @param array $array - * @return bool - */ - public static function isAssoc(array $array) - { - $keys = array_keys($array); - - return array_keys($keys) !== $keys; - } - - /** - * Determines if an array is a list. - * - * An array is a "list" if all array keys are sequential integers starting from 0 with no gaps in between. - * - * @param array $array - * @return bool - */ - public static function isList($array) - { - return ! self::isAssoc($array); - } - - /** - * Get a subset of the items from the given array. - * - * @param array $array - * @param array|string $keys - * @return array - */ - public static function only($array, $keys) - { - return array_intersect_key($array, array_flip((array) $keys)); - } - - /** - * Pluck an array of values from an array. - * - * @param iterable $array - * @param string|array|int|null $value - * @param string|array|null $key - * @return array - */ - public static function pluck($array, $value, $key = null) - { - $results = []; - - [$value, $key] = static::explodePluckParameters($value, $key); - - foreach ($array as $item) { - $itemValue = data_get($item, $value); - - // If the key is "null", we will just append the value to the array and keep - // looping. Otherwise we will key the array using the value of the key we - // received from the developer. Then we'll return the final array form. - if (is_null($key)) { - $results[] = $itemValue; - } else { - $itemKey = data_get($item, $key); - - if (is_object($itemKey) && method_exists($itemKey, '__toString')) { - $itemKey = (string) $itemKey; - } - - $results[$itemKey] = $itemValue; - } - } - - return $results; - } - - /** - * Explode the "value" and "key" arguments passed to "pluck". - * - * @param string|array $value - * @param string|array|null $key - * @return array - */ - protected static function explodePluckParameters($value, $key) - { - $value = is_string($value) ? explode('.', $value) : $value; - - $key = is_null($key) || is_array($key) ? $key : explode('.', $key); - - return [$value, $key]; - } - - /** - * Push an item onto the beginning of an array. - * - * @param array $array - * @param mixed $value - * @param mixed $key - * @return array - */ - public static function prepend($array, $value, $key = null) - { - if (func_num_args() == 2) { - array_unshift($array, $value); - } else { - $array = [$key => $value] + $array; - } - - return $array; - } - - /** - * Get a value from the array, and remove it. - * - * @param array $array - * @param string $key - * @param mixed $default - * @return mixed - */ - public static function pull(&$array, $key, $default = null) - { - $value = static::get($array, $key, $default); - - static::forget($array, $key); - - return $value; - } - - /** - * Convert the array into a query string. - * - * @param array $array - * @return string - */ - public static function query($array) - { - return http_build_query($array, '', '&', PHP_QUERY_RFC3986); - } - - /** - * Get one or a specified number of random values from an array. - * - * @param array $array - * @param int|null $number - * @param bool|false $preserveKeys - * @return mixed - * - * @throws \InvalidArgumentException - */ - public static function random($array, $number = null, $preserveKeys = false) - { - $requested = is_null($number) ? 1 : $number; - - $count = count($array); - - if ($requested > $count) { - throw new InvalidArgumentException( - "You requested {$requested} items, but there are only {$count} items available." - ); - } - - if (is_null($number)) { - return $array[array_rand($array)]; - } - - if ((int) $number === 0) { - return []; - } - - $keys = array_rand($array, $number); - - $results = []; - - if ($preserveKeys) { - foreach ((array) $keys as $key) { - $results[$key] = $array[$key]; - } - } else { - foreach ((array) $keys as $key) { - $results[] = $array[$key]; - } - } - - return $results; - } - - /** - * Set an array item to a given value using "dot" notation. - * - * If no key is given to the method, the entire array will be replaced. - * - * @param array $array - * @param string|null $key - * @param mixed $value - * @return array - */ - public static function set(&$array, $key, $value) - { - if (is_null($key)) { - return $array = $value; - } - - $keys = explode('.', $key); - - foreach ($keys as $i => $key) { - if (count($keys) === 1) { - break; - } - - unset($keys[$i]); - - // If the key doesn't exist at this depth, we will just create an empty array - // to hold the next value, allowing us to create the arrays to hold final - // values at the correct depth. Then we'll keep digging into the array. - if (! isset($array[$key]) || ! is_array($array[$key])) { - $array[$key] = []; - } - - $array = &$array[$key]; - } - - $array[array_shift($keys)] = $value; - - return $array; - } - - /** - * Shuffle the given array and return the result. - * - * @param array $array - * @param int|null $seed - * @return array - */ - public static function shuffle($array, $seed = null) - { - if (is_null($seed)) { - shuffle($array); - } else { - mt_srand($seed); - shuffle($array); - mt_srand(); - } - - return $array; - } - - /** - * Sort the array using the given callback or "dot" notation. - * - * @param array $array - * @param callable|array|string|null $callback - * @return array - */ - public static function sort($array, $callback = null) - { - return Collection::make($array)->sortBy($callback)->all(); - } - - /** - * Recursively sort an array by keys and values. - * - * @param array $array - * @param int $options - * @param bool $descending - * @return array - */ - public static function sortRecursive($array, $options = SORT_REGULAR, $descending = false) - { - foreach ($array as &$value) { - if (is_array($value)) { - $value = static::sortRecursive($value, $options, $descending); - } - } - - if (static::isAssoc($array)) { - $descending - ? krsort($array, $options) - : ksort($array, $options); - } else { - $descending - ? rsort($array, $options) - : sort($array, $options); - } - - return $array; - } - - /** - * Conditionally compile classes from an array into a CSS class list. - * - * @param array $array - * @return string - */ - public static function toCssClasses($array) - { - $classList = static::wrap($array); - - $classes = []; - - foreach ($classList as $class => $constraint) { - if (is_numeric($class)) { - $classes[] = $constraint; - } elseif ($constraint) { - $classes[] = $class; - } - } - - return implode(' ', $classes); - } - - /** - * Filter the array using the given callback. - * - * @param array $array - * @param callable $callback - * @return array - */ - public static function where($array, callable $callback) - { - return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); - } - - /** - * Filter items where the value is not null. - * - * @param array $array - * @return array - */ - public static function whereNotNull($array) - { - return static::where($array, function ($value) { - return ! is_null($value); - }); - } - - /** - * If the given value is not an array and not null, wrap it in one. - * - * @param mixed $value - * @return array - */ - public static function wrap($value) - { - if (is_null($value)) { - return []; - } - - return is_array($value) ? $value : [$value]; - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/Collection.php b/vendor/tightenco/collect/src/Collect/Support/Collection.php deleted file mode 100644 index 9fc9bca..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/Collection.php +++ /dev/null @@ -1,1639 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support; - -use ArrayAccess; -use ArrayIterator; -use Tightenco\Collect\Contracts\Support\CanBeEscapedWhenCastToString; -use Tightenco\Collect\Support\Traits\EnumeratesValues; -use Tightenco\Collect\Support\Traits\Macroable; -use stdClass; - -class Collection implements ArrayAccess, CanBeEscapedWhenCastToString, Enumerable -{ - use EnumeratesValues, Macroable; - - /** - * The items contained in the collection. - * - * @var array - */ - protected $items = []; - - /** - * Create a new collection. - * - * @param mixed $items - * @return void - */ - public function __construct($items = []) - { - $this->items = $this->getArrayableItems($items); - } - - /** - * Create a collection with the given range. - * - * @param int $from - * @param int $to - * @return static - */ - public static function range($from, $to) - { - return new static(range($from, $to)); - } - - /** - * Get all of the items in the collection. - * - * @return array - */ - public function all() - { - return $this->items; - } - - /** - * Get a lazy collection for the items in this collection. - * - * @return \Tightenco\Collect\Support\LazyCollection - */ - public function lazy() - { - return new LazyCollection($this->items); - } - - /** - * Get the average value of a given key. - * - * @param callable|string|null $callback - * @return mixed - */ - public function avg($callback = null) - { - $callback = $this->valueRetriever($callback); - - $items = $this->map(function ($value) use ($callback) { - return $callback($value); - })->filter(function ($value) { - return ! is_null($value); - }); - - if ($count = $items->count()) { - return $items->sum() / $count; - } - } - - /** - * Get the median of a given key. - * - * @param string|array|null $key - * @return mixed - */ - public function median($key = null) - { - $values = (isset($key) ? $this->pluck($key) : $this) - ->filter(function ($item) { - return ! is_null($item); - })->sort()->values(); - - $count = $values->count(); - - if ($count === 0) { - return; - } - - $middle = (int) ($count / 2); - - if ($count % 2) { - return $values->get($middle); - } - - return (new static([ - $values->get($middle - 1), $values->get($middle), - ]))->average(); - } - - /** - * Get the mode of a given key. - * - * @param string|array|null $key - * @return array|null - */ - public function mode($key = null) - { - if ($this->count() === 0) { - return; - } - - $collection = isset($key) ? $this->pluck($key) : $this; - - $counts = new static; - - $collection->each(function ($value) use ($counts) { - $counts[$value] = isset($counts[$value]) ? $counts[$value] + 1 : 1; - }); - - $sorted = $counts->sort(); - - $highestValue = $sorted->last(); - - return $sorted->filter(function ($value) use ($highestValue) { - return $value == $highestValue; - })->sort()->keys()->all(); - } - - /** - * Collapse the collection of items into a single array. - * - * @return static - */ - public function collapse() - { - return new static(Arr::collapse($this->items)); - } - - /** - * Determine if an item exists in the collection. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function contains($key, $operator = null, $value = null) - { - if (func_num_args() === 1) { - if ($this->useAsCallable($key)) { - $placeholder = new stdClass; - - return $this->first($key, $placeholder) !== $placeholder; - } - - return in_array($key, $this->items); - } - - return $this->contains($this->operatorForWhere(...func_get_args())); - } - - /** - * Determine if an item is not contained in the collection. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function doesntContain($key, $operator = null, $value = null) - { - return ! $this->contains(...func_get_args()); - } - - /** - * Cross join with the given lists, returning all possible permutations. - * - * @param mixed ...$lists - * @return static - */ - public function crossJoin(...$lists) - { - return new static(Arr::crossJoin( - $this->items, ...array_map([$this, 'getArrayableItems'], $lists) - )); - } - - /** - * Get the items in the collection that are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diff($items) - { - return new static(array_diff($this->items, $this->getArrayableItems($items))); - } - - /** - * Get the items in the collection that are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffUsing($items, callable $callback) - { - return new static(array_udiff($this->items, $this->getArrayableItems($items), $callback)); - } - - /** - * Get the items in the collection whose keys and values are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diffAssoc($items) - { - return new static(array_diff_assoc($this->items, $this->getArrayableItems($items))); - } - - /** - * Get the items in the collection whose keys and values are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffAssocUsing($items, callable $callback) - { - return new static(array_diff_uassoc($this->items, $this->getArrayableItems($items), $callback)); - } - - /** - * Get the items in the collection whose keys are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diffKeys($items) - { - return new static(array_diff_key($this->items, $this->getArrayableItems($items))); - } - - /** - * Get the items in the collection whose keys are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffKeysUsing($items, callable $callback) - { - return new static(array_diff_ukey($this->items, $this->getArrayableItems($items), $callback)); - } - - /** - * Retrieve duplicate items from the collection. - * - * @param callable|string|null $callback - * @param bool $strict - * @return static - */ - public function duplicates($callback = null, $strict = false) - { - $items = $this->map($this->valueRetriever($callback)); - - $uniqueItems = $items->unique(null, $strict); - - $compare = $this->duplicateComparator($strict); - - $duplicates = new static; - - foreach ($items as $key => $value) { - if ($uniqueItems->isNotEmpty() && $compare($value, $uniqueItems->first())) { - $uniqueItems->shift(); - } else { - $duplicates[$key] = $value; - } - } - - return $duplicates; - } - - /** - * Retrieve duplicate items from the collection using strict comparison. - * - * @param callable|string|null $callback - * @return static - */ - public function duplicatesStrict($callback = null) - { - return $this->duplicates($callback, true); - } - - /** - * Get the comparison function to detect duplicates. - * - * @param bool $strict - * @return \Closure - */ - protected function duplicateComparator($strict) - { - if ($strict) { - return function ($a, $b) { - return $a === $b; - }; - } - - return function ($a, $b) { - return $a == $b; - }; - } - - /** - * Get all items except for those with the specified keys. - * - * @param \Tightenco\Collect\Support\Collection|mixed $keys - * @return static - */ - public function except($keys) - { - if ($keys instanceof Enumerable) { - $keys = $keys->all(); - } elseif (! is_array($keys)) { - $keys = func_get_args(); - } - - return new static(Arr::except($this->items, $keys)); - } - - /** - * Run a filter over each of the items. - * - * @param callable|null $callback - * @return static - */ - public function filter(callable $callback = null) - { - if ($callback) { - return new static(Arr::where($this->items, $callback)); - } - - return new static(array_filter($this->items)); - } - - /** - * Get the first item from the collection passing the given truth test. - * - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public function first(callable $callback = null, $default = null) - { - return Arr::first($this->items, $callback, $default); - } - - /** - * Get a flattened array of the items in the collection. - * - * @param int $depth - * @return static - */ - public function flatten($depth = INF) - { - return new static(Arr::flatten($this->items, $depth)); - } - - /** - * Flip the items in the collection. - * - * @return static - */ - public function flip() - { - return new static(array_flip($this->items)); - } - - /** - * Remove an item from the collection by key. - * - * @param string|array $keys - * @return $this - */ - public function forget($keys) - { - foreach ((array) $keys as $key) { - $this->offsetUnset($key); - } - - return $this; - } - - /** - * Get an item from the collection by key. - * - * @param mixed $key - * @param mixed $default - * @return mixed - */ - public function get($key, $default = null) - { - if (array_key_exists($key, $this->items)) { - return $this->items[$key]; - } - - return value($default); - } - - /** - * Group an associative array by a field or using a callback. - * - * @param array|callable|string $groupBy - * @param bool $preserveKeys - * @return static - */ - public function groupBy($groupBy, $preserveKeys = false) - { - if (! $this->useAsCallable($groupBy) && is_array($groupBy)) { - $nextGroups = $groupBy; - - $groupBy = array_shift($nextGroups); - } - - $groupBy = $this->valueRetriever($groupBy); - - $results = []; - - foreach ($this->items as $key => $value) { - $groupKeys = $groupBy($value, $key); - - if (! is_array($groupKeys)) { - $groupKeys = [$groupKeys]; - } - - foreach ($groupKeys as $groupKey) { - $groupKey = is_bool($groupKey) ? (int) $groupKey : $groupKey; - - if (! array_key_exists($groupKey, $results)) { - $results[$groupKey] = new static; - } - - $results[$groupKey]->offsetSet($preserveKeys ? $key : null, $value); - } - } - - $result = new static($results); - - if (! empty($nextGroups)) { - return $result->map->groupBy($nextGroups, $preserveKeys); - } - - return $result; - } - - /** - * Key an associative array by a field or using a callback. - * - * @param callable|string $keyBy - * @return static - */ - public function keyBy($keyBy) - { - $keyBy = $this->valueRetriever($keyBy); - - $results = []; - - foreach ($this->items as $key => $item) { - $resolvedKey = $keyBy($item, $key); - - if (is_object($resolvedKey)) { - $resolvedKey = (string) $resolvedKey; - } - - $results[$resolvedKey] = $item; - } - - return new static($results); - } - - /** - * Determine if an item exists in the collection by key. - * - * @param mixed $key - * @return bool - */ - public function has($key) - { - $keys = is_array($key) ? $key : func_get_args(); - - foreach ($keys as $value) { - if (! array_key_exists($value, $this->items)) { - return false; - } - } - - return true; - } - - /** - * Determine if any of the keys exist in the collection. - * - * @param mixed $key - * @return bool - */ - public function hasAny($key) - { - if ($this->isEmpty()) { - return false; - } - - $keys = is_array($key) ? $key : func_get_args(); - - foreach ($keys as $value) { - if ($this->has($value)) { - return true; - } - } - - return false; - } - - /** - * Concatenate values of a given key as a string. - * - * @param string $value - * @param string|null $glue - * @return string - */ - public function implode($value, $glue = null) - { - $first = $this->first(); - - if (is_array($first) || (is_object($first) && ! $first instanceof \Illuminate\Support\Stringable)) { - return implode($glue ?? '', $this->pluck($value)->all()); - } - - return implode($value ?? '', $this->items); - } - - /** - * Intersect the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function intersect($items) - { - return new static(array_intersect($this->items, $this->getArrayableItems($items))); - } - - /** - * Intersect the collection with the given items by key. - * - * @param mixed $items - * @return static - */ - public function intersectByKeys($items) - { - return new static(array_intersect_key( - $this->items, $this->getArrayableItems($items) - )); - } - - /** - * Determine if the collection is empty or not. - * - * @return bool - */ - public function isEmpty() - { - return empty($this->items); - } - - /** - * Determine if the collection contains a single item. - * - * @return bool - */ - public function containsOneItem() - { - return $this->count() === 1; - } - - /** - * Join all items from the collection using a string. The final items can use a separate glue string. - * - * @param string $glue - * @param string $finalGlue - * @return string - */ - public function join($glue, $finalGlue = '') - { - if ($finalGlue === '') { - return $this->implode($glue); - } - - $count = $this->count(); - - if ($count === 0) { - return ''; - } - - if ($count === 1) { - return $this->last(); - } - - $collection = new static($this->items); - - $finalItem = $collection->pop(); - - return $collection->implode($glue).$finalGlue.$finalItem; - } - - /** - * Get the keys of the collection items. - * - * @return static - */ - public function keys() - { - return new static(array_keys($this->items)); - } - - /** - * Get the last item from the collection. - * - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public function last(callable $callback = null, $default = null) - { - return Arr::last($this->items, $callback, $default); - } - - /** - * Get the values of a given key. - * - * @param string|array|int|null $value - * @param string|null $key - * @return static - */ - public function pluck($value, $key = null) - { - return new static(Arr::pluck($this->items, $value, $key)); - } - - /** - * Run a map over each of the items. - * - * @param callable $callback - * @return static - */ - public function map(callable $callback) - { - $keys = array_keys($this->items); - - $items = array_map($callback, $this->items, $keys); - - return new static(array_combine($keys, $items)); - } - - /** - * Run a dictionary map over the items. - * - * The callback should return an associative array with a single key/value pair. - * - * @param callable $callback - * @return static - */ - public function mapToDictionary(callable $callback) - { - $dictionary = []; - - foreach ($this->items as $key => $item) { - $pair = $callback($item, $key); - - $key = key($pair); - - $value = reset($pair); - - if (! isset($dictionary[$key])) { - $dictionary[$key] = []; - } - - $dictionary[$key][] = $value; - } - - return new static($dictionary); - } - - /** - * Run an associative map over each of the items. - * - * The callback should return an associative array with a single key/value pair. - * - * @param callable $callback - * @return static - */ - public function mapWithKeys(callable $callback) - { - $result = []; - - foreach ($this->items as $key => $value) { - $assoc = $callback($value, $key); - - foreach ($assoc as $mapKey => $mapValue) { - $result[$mapKey] = $mapValue; - } - } - - return new static($result); - } - - /** - * Merge the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function merge($items) - { - return new static(array_merge($this->items, $this->getArrayableItems($items))); - } - - /** - * Recursively merge the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function mergeRecursive($items) - { - return new static(array_merge_recursive($this->items, $this->getArrayableItems($items))); - } - - /** - * Create a collection by using this collection for keys and another for its values. - * - * @param mixed $values - * @return static - */ - public function combine($values) - { - return new static(array_combine($this->all(), $this->getArrayableItems($values))); - } - - /** - * Union the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function union($items) - { - return new static($this->items + $this->getArrayableItems($items)); - } - - /** - * Create a new collection consisting of every n-th element. - * - * @param int $step - * @param int $offset - * @return static - */ - public function nth($step, $offset = 0) - { - $new = []; - - $position = 0; - - foreach ($this->items as $item) { - if ($position % $step === $offset) { - $new[] = $item; - } - - $position++; - } - - return new static($new); - } - - /** - * Get the items with the specified keys. - * - * @param mixed $keys - * @return static - */ - public function only($keys) - { - if (is_null($keys)) { - return new static($this->items); - } - - if ($keys instanceof Enumerable) { - $keys = $keys->all(); - } - - $keys = is_array($keys) ? $keys : func_get_args(); - - return new static(Arr::only($this->items, $keys)); - } - - /** - * Get and remove the last N items from the collection. - * - * @param int $count - * @return mixed - */ - public function pop($count = 1) - { - if ($count === 1) { - return array_pop($this->items); - } - - if ($this->isEmpty()) { - return new static; - } - - $results = []; - - $collectionCount = $this->count(); - - foreach (range(1, min($count, $collectionCount)) as $item) { - array_push($results, array_pop($this->items)); - } - - return new static($results); - } - - /** - * Push an item onto the beginning of the collection. - * - * @param mixed $value - * @param mixed $key - * @return $this - */ - public function prepend($value, $key = null) - { - $this->items = Arr::prepend($this->items, ...func_get_args()); - - return $this; - } - - /** - * Push one or more items onto the end of the collection. - * - * @param mixed $values - * @return $this - */ - public function push(...$values) - { - foreach ($values as $value) { - $this->items[] = $value; - } - - return $this; - } - - /** - * Push all of the given items onto the collection. - * - * @param iterable $source - * @return static - */ - public function concat($source) - { - $result = new static($this); - - foreach ($source as $item) { - $result->push($item); - } - - return $result; - } - - /** - * Get and remove an item from the collection. - * - * @param mixed $key - * @param mixed $default - * @return mixed - */ - public function pull($key, $default = null) - { - return Arr::pull($this->items, $key, $default); - } - - /** - * Put an item in the collection by key. - * - * @param mixed $key - * @param mixed $value - * @return $this - */ - public function put($key, $value) - { - $this->offsetSet($key, $value); - - return $this; - } - - /** - * Get one or a specified number of items randomly from the collection. - * - * @param int|null $number - * @return static|mixed - * - * @throws \InvalidArgumentException - */ - public function random($number = null) - { - if (is_null($number)) { - return Arr::random($this->items); - } - - return new static(Arr::random($this->items, $number)); - } - - /** - * Replace the collection items with the given items. - * - * @param mixed $items - * @return static - */ - public function replace($items) - { - return new static(array_replace($this->items, $this->getArrayableItems($items))); - } - - /** - * Recursively replace the collection items with the given items. - * - * @param mixed $items - * @return static - */ - public function replaceRecursive($items) - { - return new static(array_replace_recursive($this->items, $this->getArrayableItems($items))); - } - - /** - * Reverse items order. - * - * @return static - */ - public function reverse() - { - return new static(array_reverse($this->items, true)); - } - - /** - * Search the collection for a given value and return the corresponding key if successful. - * - * @param mixed $value - * @param bool $strict - * @return mixed - */ - public function search($value, $strict = false) - { - if (! $this->useAsCallable($value)) { - return array_search($value, $this->items, $strict); - } - - foreach ($this->items as $key => $item) { - if ($value($item, $key)) { - return $key; - } - } - - return false; - } - - /** - * Get and remove the first N items from the collection. - * - * @param int $count - * @return mixed - */ - public function shift($count = 1) - { - if ($count === 1) { - return array_shift($this->items); - } - - if ($this->isEmpty()) { - return new static; - } - - $results = []; - - $collectionCount = $this->count(); - - foreach (range(1, min($count, $collectionCount)) as $item) { - array_push($results, array_shift($this->items)); - } - - return new static($results); - } - - /** - * Shuffle the items in the collection. - * - * @param int|null $seed - * @return static - */ - public function shuffle($seed = null) - { - return new static(Arr::shuffle($this->items, $seed)); - } - - /** - * Create chunks representing a "sliding window" view of the items in the collection. - * - * @param int $size - * @param int $step - * @return static - */ - public function sliding($size = 2, $step = 1) - { - $chunks = floor(($this->count() - $size) / $step) + 1; - - return static::times($chunks, function ($number) use ($size, $step) { - return $this->slice(($number - 1) * $step, $size); - }); - } - - /** - * Skip the first {$count} items. - * - * @param int $count - * @return static - */ - public function skip($count) - { - return $this->slice($count); - } - - /** - * Skip items in the collection until the given condition is met. - * - * @param mixed $value - * @return static - */ - public function skipUntil($value) - { - return new static($this->lazy()->skipUntil($value)->all()); - } - - /** - * Skip items in the collection while the given condition is met. - * - * @param mixed $value - * @return static - */ - public function skipWhile($value) - { - return new static($this->lazy()->skipWhile($value)->all()); - } - - /** - * Slice the underlying collection array. - * - * @param int $offset - * @param int|null $length - * @return static - */ - public function slice($offset, $length = null) - { - return new static(array_slice($this->items, $offset, $length, true)); - } - - /** - * Split a collection into a certain number of groups. - * - * @param int $numberOfGroups - * @return static - */ - public function split($numberOfGroups) - { - if ($this->isEmpty()) { - return new static; - } - - $groups = new static; - - $groupSize = floor($this->count() / $numberOfGroups); - - $remain = $this->count() % $numberOfGroups; - - $start = 0; - - for ($i = 0; $i < $numberOfGroups; $i++) { - $size = $groupSize; - - if ($i < $remain) { - $size++; - } - - if ($size) { - $groups->push(new static(array_slice($this->items, $start, $size))); - - $start += $size; - } - } - - return $groups; - } - - /** - * Split a collection into a certain number of groups, and fill the first groups completely. - * - * @param int $numberOfGroups - * @return static - */ - public function splitIn($numberOfGroups) - { - return $this->chunk(ceil($this->count() / $numberOfGroups)); - } - - /** - * Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return mixed - * - * @throws \Tightenco\Collect\Support\ItemNotFoundException - * @throws \Tightenco\Collect\Support\MultipleItemsFoundException - */ - public function sole($key = null, $operator = null, $value = null) - { - $filter = func_num_args() > 1 - ? $this->operatorForWhere(...func_get_args()) - : $key; - - $items = $this->when($filter)->filter($filter); - - if ($items->isEmpty()) { - throw new ItemNotFoundException; - } - - if ($items->count() > 1) { - throw new MultipleItemsFoundException; - } - - return $items->first(); - } - - /** - * Get the first item in the collection but throw an exception if no matching items exist. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return mixed - * - * @throws \Tightenco\Collect\Support\ItemNotFoundException - */ - public function firstOrFail($key = null, $operator = null, $value = null) - { - $filter = func_num_args() > 1 - ? $this->operatorForWhere(...func_get_args()) - : $key; - - $placeholder = new stdClass(); - - $item = $this->first($filter, $placeholder); - - if ($item === $placeholder) { - throw new ItemNotFoundException; - } - - return $item; - } - - /** - * Chunk the collection into chunks of the given size. - * - * @param int $size - * @return static - */ - public function chunk($size) - { - if ($size <= 0) { - return new static; - } - - $chunks = []; - - foreach (array_chunk($this->items, $size, true) as $chunk) { - $chunks[] = new static($chunk); - } - - return new static($chunks); - } - - /** - * Chunk the collection into chunks with a callback. - * - * @param callable $callback - * @return static - */ - public function chunkWhile(callable $callback) - { - return new static( - $this->lazy()->chunkWhile($callback)->mapInto(static::class) - ); - } - - /** - * Sort through each item with a callback. - * - * @param callable|int|null $callback - * @return static - */ - public function sort($callback = null) - { - $items = $this->items; - - $callback && is_callable($callback) - ? uasort($items, $callback) - : asort($items, $callback ?? SORT_REGULAR); - - return new static($items); - } - - /** - * Sort items in descending order. - * - * @param int $options - * @return static - */ - public function sortDesc($options = SORT_REGULAR) - { - $items = $this->items; - - arsort($items, $options); - - return new static($items); - } - - /** - * Sort the collection using the given callback. - * - * @param callable|array|string $callback - * @param int $options - * @param bool $descending - * @return static - */ - public function sortBy($callback, $options = SORT_REGULAR, $descending = false) - { - if (is_array($callback) && ! is_callable($callback)) { - return $this->sortByMany($callback); - } - - $results = []; - - $callback = $this->valueRetriever($callback); - - // First we will loop through the items and get the comparator from a callback - // function which we were given. Then, we will sort the returned values and - // and grab the corresponding values for the sorted keys from this array. - foreach ($this->items as $key => $value) { - $results[$key] = $callback($value, $key); - } - - $descending ? arsort($results, $options) - : asort($results, $options); - - // Once we have sorted all of the keys in the array, we will loop through them - // and grab the corresponding model so we can set the underlying items list - // to the sorted version. Then we'll just return the collection instance. - foreach (array_keys($results) as $key) { - $results[$key] = $this->items[$key]; - } - - return new static($results); - } - - /** - * Sort the collection using multiple comparisons. - * - * @param array $comparisons - * @return static - */ - protected function sortByMany(array $comparisons = []) - { - $items = $this->items; - - usort($items, function ($a, $b) use ($comparisons) { - foreach ($comparisons as $comparison) { - $comparison = Arr::wrap($comparison); - - $prop = $comparison[0]; - - $ascending = Arr::get($comparison, 1, true) === true || - Arr::get($comparison, 1, true) === 'asc'; - - $result = 0; - - if (! is_string($prop) && is_callable($prop)) { - $result = $prop($a, $b); - } else { - $values = [data_get($a, $prop), data_get($b, $prop)]; - - if (! $ascending) { - $values = array_reverse($values); - } - - $result = $values[0] <=> $values[1]; - } - - if ($result === 0) { - continue; - } - - return $result; - } - }); - - return new static($items); - } - - /** - * Sort the collection in descending order using the given callback. - * - * @param callable|string $callback - * @param int $options - * @return static - */ - public function sortByDesc($callback, $options = SORT_REGULAR) - { - return $this->sortBy($callback, $options, true); - } - - /** - * Sort the collection keys. - * - * @param int $options - * @param bool $descending - * @return static - */ - public function sortKeys($options = SORT_REGULAR, $descending = false) - { - $items = $this->items; - - $descending ? krsort($items, $options) : ksort($items, $options); - - return new static($items); - } - - /** - * Sort the collection keys in descending order. - * - * @param int $options - * @return static - */ - public function sortKeysDesc($options = SORT_REGULAR) - { - return $this->sortKeys($options, true); - } - - /** - * Splice a portion of the underlying collection array. - * - * @param int $offset - * @param int|null $length - * @param mixed $replacement - * @return static - */ - public function splice($offset, $length = null, $replacement = []) - { - if (func_num_args() === 1) { - return new static(array_splice($this->items, $offset)); - } - - return new static(array_splice($this->items, $offset, $length, $this->getArrayableItems($replacement))); - } - - /** - * Take the first or last {$limit} items. - * - * @param int $limit - * @return static - */ - public function take($limit) - { - if ($limit < 0) { - return $this->slice($limit, abs($limit)); - } - - return $this->slice(0, $limit); - } - - /** - * Take items in the collection until the given condition is met. - * - * @param mixed $value - * @return static - */ - public function takeUntil($value) - { - return new static($this->lazy()->takeUntil($value)->all()); - } - - /** - * Take items in the collection while the given condition is met. - * - * @param mixed $value - * @return static - */ - public function takeWhile($value) - { - return new static($this->lazy()->takeWhile($value)->all()); - } - - /** - * Transform each item in the collection using a callback. - * - * @param callable $callback - * @return $this - */ - public function transform(callable $callback) - { - $this->items = $this->map($callback)->all(); - - return $this; - } - - /** - * Convert a flatten "dot" notation array into an expanded array. - * - * @return static - */ - public function undot() - { - return new static(Arr::undot($this->all())); - } - - /** - * Return only unique items from the collection array. - * - * @param string|callable|null $key - * @param bool $strict - * @return static - */ - public function unique($key = null, $strict = false) - { - if (is_null($key) && $strict === false) { - return new static(array_unique($this->items, SORT_REGULAR)); - } - - $callback = $this->valueRetriever($key); - - $exists = []; - - return $this->reject(function ($item, $key) use ($callback, $strict, &$exists) { - if (in_array($id = $callback($item, $key), $exists, $strict)) { - return true; - } - - $exists[] = $id; - }); - } - - /** - * Reset the keys on the underlying array. - * - * @return static - */ - public function values() - { - return new static(array_values($this->items)); - } - - /** - * Zip the collection together with one or more arrays. - * - * e.g. new Collection([1, 2, 3])->zip([4, 5, 6]); - * => [[1, 4], [2, 5], [3, 6]] - * - * @param mixed ...$items - * @return static - */ - public function zip($items) - { - $arrayableItems = array_map(function ($items) { - return $this->getArrayableItems($items); - }, func_get_args()); - - $params = array_merge([function () { - return new static(func_get_args()); - }, $this->items], $arrayableItems); - - return new static(array_map(...$params)); - } - - /** - * Pad collection to the specified length with a value. - * - * @param int $size - * @param mixed $value - * @return static - */ - public function pad($size, $value) - { - return new static(array_pad($this->items, $size, $value)); - } - - /** - * Get an iterator for the items. - * - * @return \ArrayIterator - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return new ArrayIterator($this->items); - } - - /** - * Count the number of items in the collection. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - return count($this->items); - } - - /** - * Count the number of items in the collection by a field or using a callback. - * - * @param callable|string $countBy - * @return static - */ - public function countBy($countBy = null) - { - return new static($this->lazy()->countBy($countBy)->all()); - } - - /** - * Add an item to the collection. - * - * @param mixed $item - * @return $this - */ - public function add($item) - { - $this->items[] = $item; - - return $this; - } - - /** - * Get a base Support collection instance from this collection. - * - * @return \Tightenco\Collect\Support\Collection - */ - public function toBase() - { - return new self($this); - } - - /** - * Determine if an item exists at an offset. - * - * @param mixed $key - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($key) - { - return isset($this->items[$key]); - } - - /** - * Get an item at a given offset. - * - * @param mixed $key - * @return mixed - */ - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->items[$key]; - } - - /** - * Set the item at a given offset. - * - * @param mixed $key - * @param mixed $value - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - if (is_null($key)) { - $this->items[] = $value; - } else { - $this->items[$key] = $value; - } - } - - /** - * Unset the item at a given offset. - * - * @param string $key - * @return void - */ - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - unset($this->items[$key]); - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/Enumerable.php b/vendor/tightenco/collect/src/Collect/Support/Enumerable.php deleted file mode 100644 index 60af386..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/Enumerable.php +++ /dev/null @@ -1,1027 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support; - -use Countable; -use Tightenco\Collect\Contracts\Support\Arrayable; -use Tightenco\Collect\Contracts\Support\Jsonable; -use IteratorAggregate; -use JsonSerializable; - -interface Enumerable extends Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable -{ - /** - * Create a new collection instance if the value isn't one already. - * - * @param mixed $items - * @return static - */ - public static function make($items = []); - - /** - * Create a new instance by invoking the callback a given amount of times. - * - * @param int $number - * @param callable|null $callback - * @return static - */ - public static function times($number, callable $callback = null); - - /** - * Create a collection with the given range. - * - * @param int $from - * @param int $to - * @return static - */ - public static function range($from, $to); - - /** - * Wrap the given value in a collection if applicable. - * - * @param mixed $value - * @return static - */ - public static function wrap($value); - - /** - * Get the underlying items from the given collection if applicable. - * - * @param array|static $value - * @return array - */ - public static function unwrap($value); - - /** - * Create a new instance with no items. - * - * @return static - */ - public static function empty(); - - /** - * Get all items in the enumerable. - * - * @return array - */ - public function all(); - - /** - * Alias for the "avg" method. - * - * @param callable|string|null $callback - * @return mixed - */ - public function average($callback = null); - - /** - * Get the median of a given key. - * - * @param string|array|null $key - * @return mixed - */ - public function median($key = null); - - /** - * Get the mode of a given key. - * - * @param string|array|null $key - * @return array|null - */ - public function mode($key = null); - - /** - * Collapse the items into a single enumerable. - * - * @return static - */ - public function collapse(); - - /** - * Alias for the "contains" method. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function some($key, $operator = null, $value = null); - - /** - * Determine if an item exists, using strict comparison. - * - * @param mixed $key - * @param mixed $value - * @return bool - */ - public function containsStrict($key, $value = null); - - /** - * Get the average value of a given key. - * - * @param callable|string|null $callback - * @return mixed - */ - public function avg($callback = null); - - /** - * Determine if an item exists in the enumerable. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function contains($key, $operator = null, $value = null); - - /** - * Cross join with the given lists, returning all possible permutations. - * - * @param mixed ...$lists - * @return static - */ - public function crossJoin(...$lists); - - /** - * Dump the collection and end the script. - * - * @param mixed ...$args - * @return void - */ - public function dd(...$args); - - /** - * Dump the collection. - * - * @return $this - */ - public function dump(); - - /** - * Get the items that are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diff($items); - - /** - * Get the items that are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffUsing($items, callable $callback); - - /** - * Get the items whose keys and values are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diffAssoc($items); - - /** - * Get the items whose keys and values are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffAssocUsing($items, callable $callback); - - /** - * Get the items whose keys are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diffKeys($items); - - /** - * Get the items whose keys are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffKeysUsing($items, callable $callback); - - /** - * Retrieve duplicate items. - * - * @param callable|string|null $callback - * @param bool $strict - * @return static - */ - public function duplicates($callback = null, $strict = false); - - /** - * Retrieve duplicate items using strict comparison. - * - * @param callable|string|null $callback - * @return static - */ - public function duplicatesStrict($callback = null); - - /** - * Execute a callback over each item. - * - * @param callable $callback - * @return $this - */ - public function each(callable $callback); - - /** - * Execute a callback over each nested chunk of items. - * - * @param callable $callback - * @return static - */ - public function eachSpread(callable $callback); - - /** - * Determine if all items pass the given truth test. - * - * @param string|callable $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function every($key, $operator = null, $value = null); - - /** - * Get all items except for those with the specified keys. - * - * @param mixed $keys - * @return static - */ - public function except($keys); - - /** - * Run a filter over each of the items. - * - * @param callable|null $callback - * @return static - */ - public function filter(callable $callback = null); - - /** - * Apply the callback if the value is truthy. - * - * @param bool $value - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function when($value, callable $callback, callable $default = null); - - /** - * Apply the callback if the collection is empty. - * - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function whenEmpty(callable $callback, callable $default = null); - - /** - * Apply the callback if the collection is not empty. - * - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function whenNotEmpty(callable $callback, callable $default = null); - - /** - * Apply the callback if the value is falsy. - * - * @param bool $value - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function unless($value, callable $callback, callable $default = null); - - /** - * Apply the callback unless the collection is empty. - * - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function unlessEmpty(callable $callback, callable $default = null); - - /** - * Apply the callback unless the collection is not empty. - * - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function unlessNotEmpty(callable $callback, callable $default = null); - - /** - * Filter items by the given key value pair. - * - * @param string $key - * @param mixed $operator - * @param mixed $value - * @return static - */ - public function where($key, $operator = null, $value = null); - - /** - * Filter items where the value for the given key is null. - * - * @param string|null $key - * @return static - */ - public function whereNull($key = null); - - /** - * Filter items where the value for the given key is not null. - * - * @param string|null $key - * @return static - */ - public function whereNotNull($key = null); - - /** - * Filter items by the given key value pair using strict comparison. - * - * @param string $key - * @param mixed $value - * @return static - */ - public function whereStrict($key, $value); - - /** - * Filter items by the given key value pair. - * - * @param string $key - * @param mixed $values - * @param bool $strict - * @return static - */ - public function whereIn($key, $values, $strict = false); - - /** - * Filter items by the given key value pair using strict comparison. - * - * @param string $key - * @param mixed $values - * @return static - */ - public function whereInStrict($key, $values); - - /** - * Filter items such that the value of the given key is between the given values. - * - * @param string $key - * @param array $values - * @return static - */ - public function whereBetween($key, $values); - - /** - * Filter items such that the value of the given key is not between the given values. - * - * @param string $key - * @param array $values - * @return static - */ - public function whereNotBetween($key, $values); - - /** - * Filter items by the given key value pair. - * - * @param string $key - * @param mixed $values - * @param bool $strict - * @return static - */ - public function whereNotIn($key, $values, $strict = false); - - /** - * Filter items by the given key value pair using strict comparison. - * - * @param string $key - * @param mixed $values - * @return static - */ - public function whereNotInStrict($key, $values); - - /** - * Filter the items, removing any items that don't match the given type(s). - * - * @param string|string[] $type - * @return static - */ - public function whereInstanceOf($type); - - /** - * Get the first item from the enumerable passing the given truth test. - * - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public function first(callable $callback = null, $default = null); - - /** - * Get the first item by the given key value pair. - * - * @param string $key - * @param mixed $operator - * @param mixed $value - * @return mixed - */ - public function firstWhere($key, $operator = null, $value = null); - - /** - * Get a flattened array of the items in the collection. - * - * @param int $depth - * @return static - */ - public function flatten($depth = INF); - - /** - * Flip the values with their keys. - * - * @return static - */ - public function flip(); - - /** - * Get an item from the collection by key. - * - * @param mixed $key - * @param mixed $default - * @return mixed - */ - public function get($key, $default = null); - - /** - * Group an associative array by a field or using a callback. - * - * @param array|callable|string $groupBy - * @param bool $preserveKeys - * @return static - */ - public function groupBy($groupBy, $preserveKeys = false); - - /** - * Key an associative array by a field or using a callback. - * - * @param callable|string $keyBy - * @return static - */ - public function keyBy($keyBy); - - /** - * Determine if an item exists in the collection by key. - * - * @param mixed $key - * @return bool - */ - public function has($key); - - /** - * Concatenate values of a given key as a string. - * - * @param string $value - * @param string|null $glue - * @return string - */ - public function implode($value, $glue = null); - - /** - * Intersect the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function intersect($items); - - /** - * Intersect the collection with the given items by key. - * - * @param mixed $items - * @return static - */ - public function intersectByKeys($items); - - /** - * Determine if the collection is empty or not. - * - * @return bool - */ - public function isEmpty(); - - /** - * Determine if the collection is not empty. - * - * @return bool - */ - public function isNotEmpty(); - - /** - * Join all items from the collection using a string. The final items can use a separate glue string. - * - * @param string $glue - * @param string $finalGlue - * @return string - */ - public function join($glue, $finalGlue = ''); - - /** - * Get the keys of the collection items. - * - * @return static - */ - public function keys(); - - /** - * Get the last item from the collection. - * - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public function last(callable $callback = null, $default = null); - - /** - * Run a map over each of the items. - * - * @param callable $callback - * @return static - */ - public function map(callable $callback); - - /** - * Run a map over each nested chunk of items. - * - * @param callable $callback - * @return static - */ - public function mapSpread(callable $callback); - - /** - * Run a dictionary map over the items. - * - * The callback should return an associative array with a single key/value pair. - * - * @param callable $callback - * @return static - */ - public function mapToDictionary(callable $callback); - - /** - * Run a grouping map over the items. - * - * The callback should return an associative array with a single key/value pair. - * - * @param callable $callback - * @return static - */ - public function mapToGroups(callable $callback); - - /** - * Run an associative map over each of the items. - * - * The callback should return an associative array with a single key/value pair. - * - * @param callable $callback - * @return static - */ - public function mapWithKeys(callable $callback); - - /** - * Map a collection and flatten the result by a single level. - * - * @param callable $callback - * @return static - */ - public function flatMap(callable $callback); - - /** - * Map the values into a new class. - * - * @param string $class - * @return static - */ - public function mapInto($class); - - /** - * Merge the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function merge($items); - - /** - * Recursively merge the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function mergeRecursive($items); - - /** - * Create a collection by using this collection for keys and another for its values. - * - * @param mixed $values - * @return static - */ - public function combine($values); - - /** - * Union the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function union($items); - - /** - * Get the min value of a given key. - * - * @param callable|string|null $callback - * @return mixed - */ - public function min($callback = null); - - /** - * Get the max value of a given key. - * - * @param callable|string|null $callback - * @return mixed - */ - public function max($callback = null); - - /** - * Create a new collection consisting of every n-th element. - * - * @param int $step - * @param int $offset - * @return static - */ - public function nth($step, $offset = 0); - - /** - * Get the items with the specified keys. - * - * @param mixed $keys - * @return static - */ - public function only($keys); - - /** - * "Paginate" the collection by slicing it into a smaller collection. - * - * @param int $page - * @param int $perPage - * @return static - */ - public function forPage($page, $perPage); - - /** - * Partition the collection into two arrays using the given callback or key. - * - * @param callable|string $key - * @param mixed $operator - * @param mixed $value - * @return static - */ - public function partition($key, $operator = null, $value = null); - - /** - * Push all of the given items onto the collection. - * - * @param iterable $source - * @return static - */ - public function concat($source); - - /** - * Get one or a specified number of items randomly from the collection. - * - * @param int|null $number - * @return static|mixed - * - * @throws \InvalidArgumentException - */ - public function random($number = null); - - /** - * Reduce the collection to a single value. - * - * @param callable $callback - * @param mixed $initial - * @return mixed - */ - public function reduce(callable $callback, $initial = null); - - /** - * Replace the collection items with the given items. - * - * @param mixed $items - * @return static - */ - public function replace($items); - - /** - * Recursively replace the collection items with the given items. - * - * @param mixed $items - * @return static - */ - public function replaceRecursive($items); - - /** - * Reverse items order. - * - * @return static - */ - public function reverse(); - - /** - * Search the collection for a given value and return the corresponding key if successful. - * - * @param mixed $value - * @param bool $strict - * @return mixed - */ - public function search($value, $strict = false); - - /** - * Shuffle the items in the collection. - * - * @param int|null $seed - * @return static - */ - public function shuffle($seed = null); - - /** - * Skip the first {$count} items. - * - * @param int $count - * @return static - */ - public function skip($count); - - /** - * Skip items in the collection until the given condition is met. - * - * @param mixed $value - * @return static - */ - public function skipUntil($value); - - /** - * Skip items in the collection while the given condition is met. - * - * @param mixed $value - * @return static - */ - public function skipWhile($value); - - /** - * Get a slice of items from the enumerable. - * - * @param int $offset - * @param int|null $length - * @return static - */ - public function slice($offset, $length = null); - - /** - * Split a collection into a certain number of groups. - * - * @param int $numberOfGroups - * @return static - */ - public function split($numberOfGroups); - - /** - * Chunk the collection into chunks of the given size. - * - * @param int $size - * @return static - */ - public function chunk($size); - - /** - * Chunk the collection into chunks with a callback. - * - * @param callable $callback - * @return static - */ - public function chunkWhile(callable $callback); - - /** - * Sort through each item with a callback. - * - * @param callable|null|int $callback - * @return static - */ - public function sort($callback = null); - - /** - * Sort items in descending order. - * - * @param int $options - * @return static - */ - public function sortDesc($options = SORT_REGULAR); - - /** - * Sort the collection using the given callback. - * - * @param callable|string $callback - * @param int $options - * @param bool $descending - * @return static - */ - public function sortBy($callback, $options = SORT_REGULAR, $descending = false); - - /** - * Sort the collection in descending order using the given callback. - * - * @param callable|string $callback - * @param int $options - * @return static - */ - public function sortByDesc($callback, $options = SORT_REGULAR); - - /** - * Sort the collection keys. - * - * @param int $options - * @param bool $descending - * @return static - */ - public function sortKeys($options = SORT_REGULAR, $descending = false); - - /** - * Sort the collection keys in descending order. - * - * @param int $options - * @return static - */ - public function sortKeysDesc($options = SORT_REGULAR); - - /** - * Get the sum of the given values. - * - * @param callable|string|null $callback - * @return mixed - */ - public function sum($callback = null); - - /** - * Take the first or last {$limit} items. - * - * @param int $limit - * @return static - */ - public function take($limit); - - /** - * Take items in the collection until the given condition is met. - * - * @param mixed $value - * @return static - */ - public function takeUntil($value); - - /** - * Take items in the collection while the given condition is met. - * - * @param mixed $value - * @return static - */ - public function takeWhile($value); - - /** - * Pass the collection to the given callback and then return it. - * - * @param callable $callback - * @return $this - */ - public function tap(callable $callback); - - /** - * Pass the enumerable to the given callback and return the result. - * - * @param callable $callback - * @return mixed - */ - public function pipe(callable $callback); - - /** - * Get the values of a given key. - * - * @param string|array $value - * @param string|null $key - * @return static - */ - public function pluck($value, $key = null); - - /** - * Create a collection of all elements that do not pass a given truth test. - * - * @param callable|mixed $callback - * @return static - */ - public function reject($callback = true); - - /** - * Return only unique items from the collection array. - * - * @param string|callable|null $key - * @param bool $strict - * @return static - */ - public function unique($key = null, $strict = false); - - /** - * Return only unique items from the collection array using strict comparison. - * - * @param string|callable|null $key - * @return static - */ - public function uniqueStrict($key = null); - - /** - * Reset the keys on the underlying array. - * - * @return static - */ - public function values(); - - /** - * Pad collection to the specified length with a value. - * - * @param int $size - * @param mixed $value - * @return static - */ - public function pad($size, $value); - - /** - * Count the number of items in the collection using a given truth test. - * - * @param callable|null $callback - * @return static - */ - public function countBy($callback = null); - - /** - * Zip the collection together with one or more arrays. - * - * e.g. new Collection([1, 2, 3])->zip([4, 5, 6]); - * => [[1, 4], [2, 5], [3, 6]] - * - * @param mixed ...$items - * @return static - */ - public function zip($items); - - /** - * Collect the values into a collection. - * - * @return \Tightenco\Collect\Support\Collection - */ - public function collect(); - - /** - * Convert the collection to its string representation. - * - * @return string - */ - public function __toString(); - - /** - * Add a method to the list of proxied methods. - * - * @param string $method - * @return void - */ - public static function proxy($method); - - /** - * Dynamically access collection proxies. - * - * @param string $key - * @return mixed - * - * @throws \Exception - */ - public function __get($key); -} diff --git a/vendor/tightenco/collect/src/Collect/Support/HigherOrderCollectionProxy.php b/vendor/tightenco/collect/src/Collect/Support/HigherOrderCollectionProxy.php deleted file mode 100644 index 01ac43f..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/HigherOrderCollectionProxy.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support; - -/** - * @mixin \Tightenco\Collect\Support\Enumerable - */ -class HigherOrderCollectionProxy -{ - /** - * The collection being operated on. - * - * @var \Tightenco\Collect\Support\Enumerable - */ - protected $collection; - - /** - * The method being proxied. - * - * @var string - */ - protected $method; - - /** - * Create a new proxy instance. - * - * @param \Tightenco\Collect\Support\Enumerable $collection - * @param string $method - * @return void - */ - public function __construct(Enumerable $collection, $method) - { - $this->method = $method; - $this->collection = $collection; - } - - /** - * Proxy accessing an attribute onto the collection items. - * - * @param string $key - * @return mixed - */ - public function __get($key) - { - return $this->collection->{$this->method}(function ($value) use ($key) { - return is_array($value) ? $value[$key] : $value->{$key}; - }); - } - - /** - * Proxy a method call onto the collection items. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - return $this->collection->{$this->method}(function ($value) use ($method, $parameters) { - return $value->{$method}(...$parameters); - }); - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/HigherOrderWhenProxy.php b/vendor/tightenco/collect/src/Collect/Support/HigherOrderWhenProxy.php deleted file mode 100644 index ea48c7c..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/HigherOrderWhenProxy.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support; - -/** - * @mixin \Tightenco\Collect\Support\Enumerable - */ -class HigherOrderWhenProxy -{ - /** - * The collection being operated on. - * - * @var \Tightenco\Collect\Support\Enumerable - */ - protected $collection; - - /** - * The condition for proxying. - * - * @var bool - */ - protected $condition; - - /** - * Create a new proxy instance. - * - * @param \Tightenco\Collect\Support\Enumerable $collection - * @param bool $condition - * @return void - */ - public function __construct(Enumerable $collection, $condition) - { - $this->condition = $condition; - $this->collection = $collection; - } - - /** - * Proxy accessing an attribute onto the collection. - * - * @param string $key - * @return mixed - */ - public function __get($key) - { - return $this->condition - ? $this->collection->{$key} - : $this->collection; - } - - /** - * Proxy a method call onto the collection. - * - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - return $this->condition - ? $this->collection->{$method}(...$parameters) - : $this->collection; - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php b/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php deleted file mode 100644 index a5ef739..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php +++ /dev/null @@ -1,1574 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support; - -use ArrayIterator; -use Closure; -use DateTimeInterface; -use Tightenco\Collect\Contracts\Support\CanBeEscapedWhenCastToString; -use Tightenco\Collect\Support\Traits\EnumeratesValues; -use Tightenco\Collect\Support\Traits\Macroable; -use IteratorAggregate; -use stdClass; - -class LazyCollection implements CanBeEscapedWhenCastToString, Enumerable -{ - use EnumeratesValues, Macroable; - - /** - * The source from which to generate items. - * - * @var callable|static - */ - public $source; - - /** - * Create a new lazy collection instance. - * - * @param mixed $source - * @return void - */ - public function __construct($source = null) - { - if ($source instanceof Closure || $source instanceof self) { - $this->source = $source; - } elseif (is_null($source)) { - $this->source = static::empty(); - } else { - $this->source = $this->getArrayableItems($source); - } - } - - /** - * Create a collection with the given range. - * - * @param int $from - * @param int $to - * @return static - */ - public static function range($from, $to) - { - return new static(function () use ($from, $to) { - if ($from <= $to) { - for (; $from <= $to; $from++) { - yield $from; - } - } else { - for (; $from >= $to; $from--) { - yield $from; - } - } - }); - } - - /** - * Get all items in the enumerable. - * - * @return array - */ - public function all() - { - if (is_array($this->source)) { - return $this->source; - } - - return iterator_to_array($this->getIterator()); - } - - /** - * Eager load all items into a new lazy collection backed by an array. - * - * @return static - */ - public function eager() - { - return new static($this->all()); - } - - /** - * Cache values as they're enumerated. - * - * @return static - */ - public function remember() - { - $iterator = $this->getIterator(); - - $iteratorIndex = 0; - - $cache = []; - - return new static(function () use ($iterator, &$iteratorIndex, &$cache) { - for ($index = 0; true; $index++) { - if (array_key_exists($index, $cache)) { - yield $cache[$index][0] => $cache[$index][1]; - - continue; - } - - if ($iteratorIndex < $index) { - $iterator->next(); - - $iteratorIndex++; - } - - if (! $iterator->valid()) { - break; - } - - $cache[$index] = [$iterator->key(), $iterator->current()]; - - yield $cache[$index][0] => $cache[$index][1]; - } - }); - } - - /** - * Get the average value of a given key. - * - * @param callable|string|null $callback - * @return mixed - */ - public function avg($callback = null) - { - return $this->collect()->avg($callback); - } - - /** - * Get the median of a given key. - * - * @param string|array|null $key - * @return mixed - */ - public function median($key = null) - { - return $this->collect()->median($key); - } - - /** - * Get the mode of a given key. - * - * @param string|array|null $key - * @return array|null - */ - public function mode($key = null) - { - return $this->collect()->mode($key); - } - - /** - * Collapse the collection of items into a single array. - * - * @return static - */ - public function collapse() - { - return new static(function () { - foreach ($this as $values) { - if (is_array($values) || $values instanceof Enumerable) { - foreach ($values as $value) { - yield $value; - } - } - } - }); - } - - /** - * Determine if an item exists in the enumerable. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function contains($key, $operator = null, $value = null) - { - if (func_num_args() === 1 && $this->useAsCallable($key)) { - $placeholder = new stdClass; - - return $this->first($key, $placeholder) !== $placeholder; - } - - if (func_num_args() === 1) { - $needle = $key; - - foreach ($this as $value) { - if ($value == $needle) { - return true; - } - } - - return false; - } - - return $this->contains($this->operatorForWhere(...func_get_args())); - } - - /** - * Determine if an item is not contained in the enumerable. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function doesntContain($key, $operator = null, $value = null) - { - return ! $this->contains(...func_get_args()); - } - - /** - * Cross join the given iterables, returning all possible permutations. - * - * @param array ...$arrays - * @return static - */ - public function crossJoin(...$arrays) - { - return $this->passthru('crossJoin', func_get_args()); - } - - /** - * Count the number of items in the collection by a field or using a callback. - * - * @param callable|string $countBy - * @return static - */ - public function countBy($countBy = null) - { - $countBy = is_null($countBy) - ? $this->identity() - : $this->valueRetriever($countBy); - - return new static(function () use ($countBy) { - $counts = []; - - foreach ($this as $key => $value) { - $group = $countBy($value, $key); - - if (empty($counts[$group])) { - $counts[$group] = 0; - } - - $counts[$group]++; - } - - yield from $counts; - }); - } - - /** - * Get the items that are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diff($items) - { - return $this->passthru('diff', func_get_args()); - } - - /** - * Get the items that are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffUsing($items, callable $callback) - { - return $this->passthru('diffUsing', func_get_args()); - } - - /** - * Get the items whose keys and values are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diffAssoc($items) - { - return $this->passthru('diffAssoc', func_get_args()); - } - - /** - * Get the items whose keys and values are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffAssocUsing($items, callable $callback) - { - return $this->passthru('diffAssocUsing', func_get_args()); - } - - /** - * Get the items whose keys are not present in the given items. - * - * @param mixed $items - * @return static - */ - public function diffKeys($items) - { - return $this->passthru('diffKeys', func_get_args()); - } - - /** - * Get the items whose keys are not present in the given items, using the callback. - * - * @param mixed $items - * @param callable $callback - * @return static - */ - public function diffKeysUsing($items, callable $callback) - { - return $this->passthru('diffKeysUsing', func_get_args()); - } - - /** - * Retrieve duplicate items. - * - * @param callable|string|null $callback - * @param bool $strict - * @return static - */ - public function duplicates($callback = null, $strict = false) - { - return $this->passthru('duplicates', func_get_args()); - } - - /** - * Retrieve duplicate items using strict comparison. - * - * @param callable|string|null $callback - * @return static - */ - public function duplicatesStrict($callback = null) - { - return $this->passthru('duplicatesStrict', func_get_args()); - } - - /** - * Get all items except for those with the specified keys. - * - * @param mixed $keys - * @return static - */ - public function except($keys) - { - return $this->passthru('except', func_get_args()); - } - - /** - * Run a filter over each of the items. - * - * @param callable|null $callback - * @return static - */ - public function filter(callable $callback = null) - { - if (is_null($callback)) { - $callback = function ($value) { - return (bool) $value; - }; - } - - return new static(function () use ($callback) { - foreach ($this as $key => $value) { - if ($callback($value, $key)) { - yield $key => $value; - } - } - }); - } - - /** - * Get the first item from the enumerable passing the given truth test. - * - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public function first(callable $callback = null, $default = null) - { - $iterator = $this->getIterator(); - - if (is_null($callback)) { - if (! $iterator->valid()) { - return value($default); - } - - return $iterator->current(); - } - - foreach ($iterator as $key => $value) { - if ($callback($value, $key)) { - return $value; - } - } - - return value($default); - } - - /** - * Get a flattened list of the items in the collection. - * - * @param int $depth - * @return static - */ - public function flatten($depth = INF) - { - $instance = new static(function () use ($depth) { - foreach ($this as $item) { - if (! is_array($item) && ! $item instanceof Enumerable) { - yield $item; - } elseif ($depth === 1) { - yield from $item; - } else { - yield from (new static($item))->flatten($depth - 1); - } - } - }); - - return $instance->values(); - } - - /** - * Flip the items in the collection. - * - * @return static - */ - public function flip() - { - return new static(function () { - foreach ($this as $key => $value) { - yield $value => $key; - } - }); - } - - /** - * Get an item by key. - * - * @param mixed $key - * @param mixed $default - * @return mixed - */ - public function get($key, $default = null) - { - if (is_null($key)) { - return; - } - - foreach ($this as $outerKey => $outerValue) { - if ($outerKey == $key) { - return $outerValue; - } - } - - return value($default); - } - - /** - * Group an associative array by a field or using a callback. - * - * @param array|callable|string $groupBy - * @param bool $preserveKeys - * @return static - */ - public function groupBy($groupBy, $preserveKeys = false) - { - return $this->passthru('groupBy', func_get_args()); - } - - /** - * Key an associative array by a field or using a callback. - * - * @param callable|string $keyBy - * @return static - */ - public function keyBy($keyBy) - { - return new static(function () use ($keyBy) { - $keyBy = $this->valueRetriever($keyBy); - - foreach ($this as $key => $item) { - $resolvedKey = $keyBy($item, $key); - - if (is_object($resolvedKey)) { - $resolvedKey = (string) $resolvedKey; - } - - yield $resolvedKey => $item; - } - }); - } - - /** - * Determine if an item exists in the collection by key. - * - * @param mixed $key - * @return bool - */ - public function has($key) - { - $keys = array_flip(is_array($key) ? $key : func_get_args()); - $count = count($keys); - - foreach ($this as $key => $value) { - if (array_key_exists($key, $keys) && --$count == 0) { - return true; - } - } - - return false; - } - - /** - * Determine if any of the keys exist in the collection. - * - * @param mixed $key - * @return bool - */ - public function hasAny($key) - { - $keys = array_flip(is_array($key) ? $key : func_get_args()); - - foreach ($this as $key => $value) { - if (array_key_exists($key, $keys)) { - return true; - } - } - - return false; - } - - /** - * Concatenate values of a given key as a string. - * - * @param string $value - * @param string|null $glue - * @return string - */ - public function implode($value, $glue = null) - { - return $this->collect()->implode(...func_get_args()); - } - - /** - * Intersect the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function intersect($items) - { - return $this->passthru('intersect', func_get_args()); - } - - /** - * Intersect the collection with the given items by key. - * - * @param mixed $items - * @return static - */ - public function intersectByKeys($items) - { - return $this->passthru('intersectByKeys', func_get_args()); - } - - /** - * Determine if the items are empty or not. - * - * @return bool - */ - public function isEmpty() - { - return ! $this->getIterator()->valid(); - } - - /** - * Determine if the collection contains a single item. - * - * @return bool - */ - public function containsOneItem() - { - return $this->take(2)->count() === 1; - } - - /** - * Join all items from the collection using a string. The final items can use a separate glue string. - * - * @param string $glue - * @param string $finalGlue - * @return string - */ - public function join($glue, $finalGlue = '') - { - return $this->collect()->join(...func_get_args()); - } - - /** - * Get the keys of the collection items. - * - * @return static - */ - public function keys() - { - return new static(function () { - foreach ($this as $key => $value) { - yield $key; - } - }); - } - - /** - * Get the last item from the collection. - * - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public function last(callable $callback = null, $default = null) - { - $needle = $placeholder = new stdClass; - - foreach ($this as $key => $value) { - if (is_null($callback) || $callback($value, $key)) { - $needle = $value; - } - } - - return $needle === $placeholder ? value($default) : $needle; - } - - /** - * Get the values of a given key. - * - * @param string|array $value - * @param string|null $key - * @return static - */ - public function pluck($value, $key = null) - { - return new static(function () use ($value, $key) { - [$value, $key] = $this->explodePluckParameters($value, $key); - - foreach ($this as $item) { - $itemValue = data_get($item, $value); - - if (is_null($key)) { - yield $itemValue; - } else { - $itemKey = data_get($item, $key); - - if (is_object($itemKey) && method_exists($itemKey, '__toString')) { - $itemKey = (string) $itemKey; - } - - yield $itemKey => $itemValue; - } - } - }); - } - - /** - * Run a map over each of the items. - * - * @param callable $callback - * @return static - */ - public function map(callable $callback) - { - return new static(function () use ($callback) { - foreach ($this as $key => $value) { - yield $key => $callback($value, $key); - } - }); - } - - /** - * Run a dictionary map over the items. - * - * The callback should return an associative array with a single key/value pair. - * - * @param callable $callback - * @return static - */ - public function mapToDictionary(callable $callback) - { - return $this->passthru('mapToDictionary', func_get_args()); - } - - /** - * Run an associative map over each of the items. - * - * The callback should return an associative array with a single key/value pair. - * - * @param callable $callback - * @return static - */ - public function mapWithKeys(callable $callback) - { - return new static(function () use ($callback) { - foreach ($this as $key => $value) { - yield from $callback($value, $key); - } - }); - } - - /** - * Merge the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function merge($items) - { - return $this->passthru('merge', func_get_args()); - } - - /** - * Recursively merge the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function mergeRecursive($items) - { - return $this->passthru('mergeRecursive', func_get_args()); - } - - /** - * Create a collection by using this collection for keys and another for its values. - * - * @param mixed $values - * @return static - */ - public function combine($values) - { - return new static(function () use ($values) { - $values = $this->makeIterator($values); - - $errorMessage = 'Both parameters should have an equal number of elements'; - - foreach ($this as $key) { - if (! $values->valid()) { - trigger_error($errorMessage, E_USER_WARNING); - - break; - } - - yield $key => $values->current(); - - $values->next(); - } - - if ($values->valid()) { - trigger_error($errorMessage, E_USER_WARNING); - } - }); - } - - /** - * Union the collection with the given items. - * - * @param mixed $items - * @return static - */ - public function union($items) - { - return $this->passthru('union', func_get_args()); - } - - /** - * Create a new collection consisting of every n-th element. - * - * @param int $step - * @param int $offset - * @return static - */ - public function nth($step, $offset = 0) - { - return new static(function () use ($step, $offset) { - $position = 0; - - foreach ($this as $item) { - if ($position % $step === $offset) { - yield $item; - } - - $position++; - } - }); - } - - /** - * Get the items with the specified keys. - * - * @param mixed $keys - * @return static - */ - public function only($keys) - { - if ($keys instanceof Enumerable) { - $keys = $keys->all(); - } elseif (! is_null($keys)) { - $keys = is_array($keys) ? $keys : func_get_args(); - } - - return new static(function () use ($keys) { - if (is_null($keys)) { - yield from $this; - } else { - $keys = array_flip($keys); - - foreach ($this as $key => $value) { - if (array_key_exists($key, $keys)) { - yield $key => $value; - - unset($keys[$key]); - - if (empty($keys)) { - break; - } - } - } - } - }); - } - - /** - * Push all of the given items onto the collection. - * - * @param iterable $source - * @return static - */ - public function concat($source) - { - return (new static(function () use ($source) { - yield from $this; - yield from $source; - }))->values(); - } - - /** - * Get one or a specified number of items randomly from the collection. - * - * @param int|null $number - * @return static|mixed - * - * @throws \InvalidArgumentException - */ - public function random($number = null) - { - $result = $this->collect()->random(...func_get_args()); - - return is_null($number) ? $result : new static($result); - } - - /** - * Replace the collection items with the given items. - * - * @param mixed $items - * @return static - */ - public function replace($items) - { - return new static(function () use ($items) { - $items = $this->getArrayableItems($items); - - foreach ($this as $key => $value) { - if (array_key_exists($key, $items)) { - yield $key => $items[$key]; - - unset($items[$key]); - } else { - yield $key => $value; - } - } - - foreach ($items as $key => $value) { - yield $key => $value; - } - }); - } - - /** - * Recursively replace the collection items with the given items. - * - * @param mixed $items - * @return static - */ - public function replaceRecursive($items) - { - return $this->passthru('replaceRecursive', func_get_args()); - } - - /** - * Reverse items order. - * - * @return static - */ - public function reverse() - { - return $this->passthru('reverse', func_get_args()); - } - - /** - * Search the collection for a given value and return the corresponding key if successful. - * - * @param mixed $value - * @param bool $strict - * @return mixed - */ - public function search($value, $strict = false) - { - $predicate = $this->useAsCallable($value) - ? $value - : function ($item) use ($value, $strict) { - return $strict ? $item === $value : $item == $value; - }; - - foreach ($this as $key => $item) { - if ($predicate($item, $key)) { - return $key; - } - } - - return false; - } - - /** - * Shuffle the items in the collection. - * - * @param int|null $seed - * @return static - */ - public function shuffle($seed = null) - { - return $this->passthru('shuffle', func_get_args()); - } - - /** - * Create chunks representing a "sliding window" view of the items in the collection. - * - * @param int $size - * @param int $step - * @return static - */ - public function sliding($size = 2, $step = 1) - { - return new static(function () use ($size, $step) { - $iterator = $this->getIterator(); - - $chunk = []; - - while ($iterator->valid()) { - $chunk[$iterator->key()] = $iterator->current(); - - if (count($chunk) == $size) { - yield tap(new static($chunk), function () use (&$chunk, $step) { - $chunk = array_slice($chunk, $step, null, true); - }); - - // If the $step between chunks is bigger than each chunk's $size - // we will skip the extra items (which should never be in any - // chunk) before we continue to the next chunk in the loop. - if ($step > $size) { - $skip = $step - $size; - - for ($i = 0; $i < $skip && $iterator->valid(); $i++) { - $iterator->next(); - } - } - } - - $iterator->next(); - } - }); - } - - /** - * Skip the first {$count} items. - * - * @param int $count - * @return static - */ - public function skip($count) - { - return new static(function () use ($count) { - $iterator = $this->getIterator(); - - while ($iterator->valid() && $count--) { - $iterator->next(); - } - - while ($iterator->valid()) { - yield $iterator->key() => $iterator->current(); - - $iterator->next(); - } - }); - } - - /** - * Skip items in the collection until the given condition is met. - * - * @param mixed $value - * @return static - */ - public function skipUntil($value) - { - $callback = $this->useAsCallable($value) ? $value : $this->equality($value); - - return $this->skipWhile($this->negate($callback)); - } - - /** - * Skip items in the collection while the given condition is met. - * - * @param mixed $value - * @return static - */ - public function skipWhile($value) - { - $callback = $this->useAsCallable($value) ? $value : $this->equality($value); - - return new static(function () use ($callback) { - $iterator = $this->getIterator(); - - while ($iterator->valid() && $callback($iterator->current(), $iterator->key())) { - $iterator->next(); - } - - while ($iterator->valid()) { - yield $iterator->key() => $iterator->current(); - - $iterator->next(); - } - }); - } - - /** - * Get a slice of items from the enumerable. - * - * @param int $offset - * @param int|null $length - * @return static - */ - public function slice($offset, $length = null) - { - if ($offset < 0 || $length < 0) { - return $this->passthru('slice', func_get_args()); - } - - $instance = $this->skip($offset); - - return is_null($length) ? $instance : $instance->take($length); - } - - /** - * Split a collection into a certain number of groups. - * - * @param int $numberOfGroups - * @return static - */ - public function split($numberOfGroups) - { - return $this->passthru('split', func_get_args()); - } - - /** - * Get the first item in the collection, but only if exactly one item exists. Otherwise, throw an exception. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return mixed - * - * @throws \Tightenco\Collect\Support\ItemNotFoundException - * @throws \Tightenco\Collect\Support\MultipleItemsFoundException - */ - public function sole($key = null, $operator = null, $value = null) - { - $filter = func_num_args() > 1 - ? $this->operatorForWhere(...func_get_args()) - : $key; - - return $this - ->when($filter) - ->filter($filter) - ->take(2) - ->collect() - ->sole(); - } - - /** - * Get the first item in the collection but throw an exception if no matching items exist. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return mixed - * - * @throws \Tightenco\Collect\Support\ItemNotFoundException - */ - public function firstOrFail($key = null, $operator = null, $value = null) - { - $filter = func_num_args() > 1 - ? $this->operatorForWhere(...func_get_args()) - : $key; - - return $this - ->when($filter) - ->filter($filter) - ->take(1) - ->collect() - ->firstOrFail(); - } - - /** - * Chunk the collection into chunks of the given size. - * - * @param int $size - * @return static - */ - public function chunk($size) - { - if ($size <= 0) { - return static::empty(); - } - - return new static(function () use ($size) { - $iterator = $this->getIterator(); - - while ($iterator->valid()) { - $chunk = []; - - while (true) { - $chunk[$iterator->key()] = $iterator->current(); - - if (count($chunk) < $size) { - $iterator->next(); - - if (! $iterator->valid()) { - break; - } - } else { - break; - } - } - - yield new static($chunk); - - $iterator->next(); - } - }); - } - - /** - * Split a collection into a certain number of groups, and fill the first groups completely. - * - * @param int $numberOfGroups - * @return static - */ - public function splitIn($numberOfGroups) - { - return $this->chunk(ceil($this->count() / $numberOfGroups)); - } - - /** - * Chunk the collection into chunks with a callback. - * - * @param callable $callback - * @return static - */ - public function chunkWhile(callable $callback) - { - return new static(function () use ($callback) { - $iterator = $this->getIterator(); - - $chunk = new Collection; - - if ($iterator->valid()) { - $chunk[$iterator->key()] = $iterator->current(); - - $iterator->next(); - } - - while ($iterator->valid()) { - if (! $callback($iterator->current(), $iterator->key(), $chunk)) { - yield new static($chunk); - - $chunk = new Collection; - } - - $chunk[$iterator->key()] = $iterator->current(); - - $iterator->next(); - } - - if ($chunk->isNotEmpty()) { - yield new static($chunk); - } - }); - } - - /** - * Sort through each item with a callback. - * - * @param callable|null|int $callback - * @return static - */ - public function sort($callback = null) - { - return $this->passthru('sort', func_get_args()); - } - - /** - * Sort items in descending order. - * - * @param int $options - * @return static - */ - public function sortDesc($options = SORT_REGULAR) - { - return $this->passthru('sortDesc', func_get_args()); - } - - /** - * Sort the collection using the given callback. - * - * @param callable|string $callback - * @param int $options - * @param bool $descending - * @return static - */ - public function sortBy($callback, $options = SORT_REGULAR, $descending = false) - { - return $this->passthru('sortBy', func_get_args()); - } - - /** - * Sort the collection in descending order using the given callback. - * - * @param callable|string $callback - * @param int $options - * @return static - */ - public function sortByDesc($callback, $options = SORT_REGULAR) - { - return $this->passthru('sortByDesc', func_get_args()); - } - - /** - * Sort the collection keys. - * - * @param int $options - * @param bool $descending - * @return static - */ - public function sortKeys($options = SORT_REGULAR, $descending = false) - { - return $this->passthru('sortKeys', func_get_args()); - } - - /** - * Sort the collection keys in descending order. - * - * @param int $options - * @return static - */ - public function sortKeysDesc($options = SORT_REGULAR) - { - return $this->passthru('sortKeysDesc', func_get_args()); - } - - /** - * Take the first or last {$limit} items. - * - * @param int $limit - * @return static - */ - public function take($limit) - { - if ($limit < 0) { - return $this->passthru('take', func_get_args()); - } - - return new static(function () use ($limit) { - $iterator = $this->getIterator(); - - while ($limit--) { - if (! $iterator->valid()) { - break; - } - - yield $iterator->key() => $iterator->current(); - - if ($limit) { - $iterator->next(); - } - } - }); - } - - /** - * Take items in the collection until the given condition is met. - * - * @param mixed $value - * @return static - */ - public function takeUntil($value) - { - $callback = $this->useAsCallable($value) ? $value : $this->equality($value); - - return new static(function () use ($callback) { - foreach ($this as $key => $item) { - if ($callback($item, $key)) { - break; - } - - yield $key => $item; - } - }); - } - - /** - * Take items in the collection until a given point in time. - * - * @param \DateTimeInterface $timeout - * @return static - */ - public function takeUntilTimeout(DateTimeInterface $timeout) - { - $timeout = $timeout->getTimestamp(); - - return $this->takeWhile(function () use ($timeout) { - return $this->now() < $timeout; - }); - } - - /** - * Take items in the collection while the given condition is met. - * - * @param mixed $value - * @return static - */ - public function takeWhile($value) - { - $callback = $this->useAsCallable($value) ? $value : $this->equality($value); - - return $this->takeUntil(function ($item, $key) use ($callback) { - return ! $callback($item, $key); - }); - } - - /** - * Pass each item in the collection to the given callback, lazily. - * - * @param callable $callback - * @return static - */ - public function tapEach(callable $callback) - { - return new static(function () use ($callback) { - foreach ($this as $key => $value) { - $callback($value, $key); - - yield $key => $value; - } - }); - } - - /** - * Convert a flatten "dot" notation array into an expanded array. - * - * @return static - */ - public function undot() - { - return $this->passthru('undot', []); - } - - /** - * Return only unique items from the collection array. - * - * @param string|callable|null $key - * @param bool $strict - * @return static - */ - public function unique($key = null, $strict = false) - { - $callback = $this->valueRetriever($key); - - return new static(function () use ($callback, $strict) { - $exists = []; - - foreach ($this as $key => $item) { - if (! in_array($id = $callback($item, $key), $exists, $strict)) { - yield $key => $item; - - $exists[] = $id; - } - } - }); - } - - /** - * Reset the keys on the underlying array. - * - * @return static - */ - public function values() - { - return new static(function () { - foreach ($this as $item) { - yield $item; - } - }); - } - - /** - * Zip the collection together with one or more arrays. - * - * e.g. new LazyCollection([1, 2, 3])->zip([4, 5, 6]); - * => [[1, 4], [2, 5], [3, 6]] - * - * @param mixed ...$items - * @return static - */ - public function zip($items) - { - $iterables = func_get_args(); - - return new static(function () use ($iterables) { - $iterators = Collection::make($iterables)->map(function ($iterable) { - return $this->makeIterator($iterable); - })->prepend($this->getIterator()); - - while ($iterators->contains->valid()) { - yield new static($iterators->map->current()); - - $iterators->each->next(); - } - }); - } - - /** - * Pad collection to the specified length with a value. - * - * @param int $size - * @param mixed $value - * @return static - */ - public function pad($size, $value) - { - if ($size < 0) { - return $this->passthru('pad', func_get_args()); - } - - return new static(function () use ($size, $value) { - $yielded = 0; - - foreach ($this as $index => $item) { - yield $index => $item; - - $yielded++; - } - - while ($yielded++ < $size) { - yield $value; - } - }); - } - - /** - * Get the values iterator. - * - * @return \Traversable - */ - #[\ReturnTypeWillChange] - public function getIterator() - { - return $this->makeIterator($this->source); - } - - /** - * Count the number of items in the collection. - * - * @return int - */ - #[\ReturnTypeWillChange] - public function count() - { - if (is_array($this->source)) { - return count($this->source); - } - - return iterator_count($this->getIterator()); - } - - /** - * Make an iterator from the given source. - * - * @param mixed $source - * @return \Traversable - */ - protected function makeIterator($source) - { - if ($source instanceof IteratorAggregate) { - return $source->getIterator(); - } - - if (is_array($source)) { - return new ArrayIterator($source); - } - - return $source(); - } - - /** - * Explode the "value" and "key" arguments passed to "pluck". - * - * @param string|array $value - * @param string|array|null $key - * @return array - */ - protected function explodePluckParameters($value, $key) - { - $value = is_string($value) ? explode('.', $value) : $value; - - $key = is_null($key) || is_array($key) ? $key : explode('.', $key); - - return [$value, $key]; - } - - /** - * Pass this lazy collection through a method on the collection class. - * - * @param string $method - * @param array $params - * @return static - */ - protected function passthru($method, array $params) - { - return new static(function () use ($method, $params) { - yield from $this->collect()->$method(...$params); - }); - } - - /** - * Get the current time. - * - * @return int - */ - protected function now() - { - return time(); - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/Traits/EnumeratesValues.php b/vendor/tightenco/collect/src/Collect/Support/Traits/EnumeratesValues.php deleted file mode 100644 index facb5ea..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/Traits/EnumeratesValues.php +++ /dev/null @@ -1,1095 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support\Traits; - -use CachingIterator; -use Closure; -use Exception; -use Tightenco\Collect\Contracts\Support\Arrayable; -use Tightenco\Collect\Contracts\Support\Jsonable; -use Tightenco\Collect\Support\Arr; -use Tightenco\Collect\Support\Collection; -use Tightenco\Collect\Support\Enumerable; -use Tightenco\Collect\Support\HigherOrderCollectionProxy; -use Tightenco\Collect\Support\HigherOrderWhenProxy; -use JsonSerializable; -use Symfony\Component\VarDumper\VarDumper; -use Traversable; -use UnexpectedValueException; - -/** - * @property-read HigherOrderCollectionProxy $average - * @property-read HigherOrderCollectionProxy $avg - * @property-read HigherOrderCollectionProxy $contains - * @property-read HigherOrderCollectionProxy $each - * @property-read HigherOrderCollectionProxy $every - * @property-read HigherOrderCollectionProxy $filter - * @property-read HigherOrderCollectionProxy $first - * @property-read HigherOrderCollectionProxy $flatMap - * @property-read HigherOrderCollectionProxy $groupBy - * @property-read HigherOrderCollectionProxy $keyBy - * @property-read HigherOrderCollectionProxy $map - * @property-read HigherOrderCollectionProxy $max - * @property-read HigherOrderCollectionProxy $min - * @property-read HigherOrderCollectionProxy $partition - * @property-read HigherOrderCollectionProxy $reject - * @property-read HigherOrderCollectionProxy $some - * @property-read HigherOrderCollectionProxy $sortBy - * @property-read HigherOrderCollectionProxy $sortByDesc - * @property-read HigherOrderCollectionProxy $skipUntil - * @property-read HigherOrderCollectionProxy $skipWhile - * @property-read HigherOrderCollectionProxy $sum - * @property-read HigherOrderCollectionProxy $takeUntil - * @property-read HigherOrderCollectionProxy $takeWhile - * @property-read HigherOrderCollectionProxy $unique - * @property-read HigherOrderCollectionProxy $until - */ -trait EnumeratesValues -{ - /** - * Indicates that the object's string representation should be escaped when __toString is invoked. - * - * @var bool - */ - protected $escapeWhenCastingToString = false; - - /** - * The methods that can be proxied. - * - * @var string[] - */ - protected static $proxies = [ - 'average', - 'avg', - 'contains', - 'each', - 'every', - 'filter', - 'first', - 'flatMap', - 'groupBy', - 'keyBy', - 'map', - 'max', - 'min', - 'partition', - 'reject', - 'skipUntil', - 'skipWhile', - 'some', - 'sortBy', - 'sortByDesc', - 'sum', - 'takeUntil', - 'takeWhile', - 'unique', - 'until', - ]; - - /** - * Create a new collection instance if the value isn't one already. - * - * @param mixed $items - * @return static - */ - public static function make($items = []) - { - return new static($items); - } - - /** - * Wrap the given value in a collection if applicable. - * - * @param mixed $value - * @return static - */ - public static function wrap($value) - { - return $value instanceof Enumerable - ? new static($value) - : new static(Arr::wrap($value)); - } - - /** - * Get the underlying items from the given collection if applicable. - * - * @param array|static $value - * @return array - */ - public static function unwrap($value) - { - return $value instanceof Enumerable ? $value->all() : $value; - } - - /** - * Create a new instance with no items. - * - * @return static - */ - public static function empty() - { - return new static([]); - } - - /** - * Create a new collection by invoking the callback a given amount of times. - * - * @param int $number - * @param callable|null $callback - * @return static - */ - public static function times($number, callable $callback = null) - { - if ($number < 1) { - return new static; - } - - return static::range(1, $number) - ->when($callback) - ->map($callback); - } - - /** - * Alias for the "avg" method. - * - * @param callable|string|null $callback - * @return mixed - */ - public function average($callback = null) - { - return $this->avg($callback); - } - - /** - * Alias for the "contains" method. - * - * @param mixed $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function some($key, $operator = null, $value = null) - { - return $this->contains(...func_get_args()); - } - - /** - * Determine if an item exists, using strict comparison. - * - * @param mixed $key - * @param mixed $value - * @return bool - */ - public function containsStrict($key, $value = null) - { - if (func_num_args() === 2) { - return $this->contains(function ($item) use ($key, $value) { - return data_get($item, $key) === $value; - }); - } - - if ($this->useAsCallable($key)) { - return ! is_null($this->first($key)); - } - - foreach ($this as $item) { - if ($item === $key) { - return true; - } - } - - return false; - } - - /** - * Dump the items and end the script. - * - * @param mixed ...$args - * @return void - */ - public function dd(...$args) - { - $this->dump(...$args); - - exit(1); - } - - /** - * Dump the items. - * - * @return $this - */ - public function dump() - { - (new Collection(func_get_args())) - ->push($this->all()) - ->each(function ($item) { - VarDumper::dump($item); - }); - - return $this; - } - - /** - * Execute a callback over each item. - * - * @param callable $callback - * @return $this - */ - public function each(callable $callback) - { - foreach ($this as $key => $item) { - if ($callback($item, $key) === false) { - break; - } - } - - return $this; - } - - /** - * Execute a callback over each nested chunk of items. - * - * @param callable $callback - * @return static - */ - public function eachSpread(callable $callback) - { - return $this->each(function ($chunk, $key) use ($callback) { - $chunk[] = $key; - - return $callback(...$chunk); - }); - } - - /** - * Determine if all items pass the given truth test. - * - * @param string|callable $key - * @param mixed $operator - * @param mixed $value - * @return bool - */ - public function every($key, $operator = null, $value = null) - { - if (func_num_args() === 1) { - $callback = $this->valueRetriever($key); - - foreach ($this as $k => $v) { - if (! $callback($v, $k)) { - return false; - } - } - - return true; - } - - return $this->every($this->operatorForWhere(...func_get_args())); - } - - /** - * Get the first item by the given key value pair. - * - * @param string $key - * @param mixed $operator - * @param mixed $value - * @return mixed - */ - public function firstWhere($key, $operator = null, $value = null) - { - return $this->first($this->operatorForWhere(...func_get_args())); - } - - /** - * Determine if the collection is not empty. - * - * @return bool - */ - public function isNotEmpty() - { - return ! $this->isEmpty(); - } - - /** - * Run a map over each nested chunk of items. - * - * @param callable $callback - * @return static - */ - public function mapSpread(callable $callback) - { - return $this->map(function ($chunk, $key) use ($callback) { - $chunk[] = $key; - - return $callback(...$chunk); - }); - } - - /** - * Run a grouping map over the items. - * - * The callback should return an associative array with a single key/value pair. - * - * @param callable $callback - * @return static - */ - public function mapToGroups(callable $callback) - { - $groups = $this->mapToDictionary($callback); - - return $groups->map([$this, 'make']); - } - - /** - * Map a collection and flatten the result by a single level. - * - * @param callable $callback - * @return static - */ - public function flatMap(callable $callback) - { - return $this->map($callback)->collapse(); - } - - /** - * Map the values into a new class. - * - * @param string $class - * @return static - */ - public function mapInto($class) - { - return $this->map(function ($value, $key) use ($class) { - return new $class($value, $key); - }); - } - - /** - * Get the min value of a given key. - * - * @param callable|string|null $callback - * @return mixed - */ - public function min($callback = null) - { - $callback = $this->valueRetriever($callback); - - return $this->map(function ($value) use ($callback) { - return $callback($value); - })->filter(function ($value) { - return ! is_null($value); - })->reduce(function ($result, $value) { - return is_null($result) || $value < $result ? $value : $result; - }); - } - - /** - * Get the max value of a given key. - * - * @param callable|string|null $callback - * @return mixed - */ - public function max($callback = null) - { - $callback = $this->valueRetriever($callback); - - return $this->filter(function ($value) { - return ! is_null($value); - })->reduce(function ($result, $item) use ($callback) { - $value = $callback($item); - - return is_null($result) || $value > $result ? $value : $result; - }); - } - - /** - * "Paginate" the collection by slicing it into a smaller collection. - * - * @param int $page - * @param int $perPage - * @return static - */ - public function forPage($page, $perPage) - { - $offset = max(0, ($page - 1) * $perPage); - - return $this->slice($offset, $perPage); - } - - /** - * Partition the collection into two arrays using the given callback or key. - * - * @param callable|string $key - * @param mixed $operator - * @param mixed $value - * @return static - */ - public function partition($key, $operator = null, $value = null) - { - $passed = []; - $failed = []; - - $callback = func_num_args() === 1 - ? $this->valueRetriever($key) - : $this->operatorForWhere(...func_get_args()); - - foreach ($this as $key => $item) { - if ($callback($item, $key)) { - $passed[$key] = $item; - } else { - $failed[$key] = $item; - } - } - - return new static([new static($passed), new static($failed)]); - } - - /** - * Get the sum of the given values. - * - * @param callable|string|null $callback - * @return mixed - */ - public function sum($callback = null) - { - $callback = is_null($callback) - ? $this->identity() - : $this->valueRetriever($callback); - - return $this->reduce(function ($result, $item) use ($callback) { - return $result + $callback($item); - }, 0); - } - - /** - * Apply the callback if the value is truthy. - * - * @param bool|mixed $value - * @param callable|null $callback - * @param callable|null $default - * @return static|mixed - */ - public function when($value, callable $callback = null, callable $default = null) - { - if (! $callback) { - return new HigherOrderWhenProxy($this, $value); - } - - if ($value) { - return $callback($this, $value); - } elseif ($default) { - return $default($this, $value); - } - - return $this; - } - - /** - * Apply the callback if the collection is empty. - * - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function whenEmpty(callable $callback, callable $default = null) - { - return $this->when($this->isEmpty(), $callback, $default); - } - - /** - * Apply the callback if the collection is not empty. - * - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function whenNotEmpty(callable $callback, callable $default = null) - { - return $this->when($this->isNotEmpty(), $callback, $default); - } - - /** - * Apply the callback if the value is falsy. - * - * @param bool $value - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function unless($value, callable $callback, callable $default = null) - { - return $this->when(! $value, $callback, $default); - } - - /** - * Apply the callback unless the collection is empty. - * - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function unlessEmpty(callable $callback, callable $default = null) - { - return $this->whenNotEmpty($callback, $default); - } - - /** - * Apply the callback unless the collection is not empty. - * - * @param callable $callback - * @param callable|null $default - * @return static|mixed - */ - public function unlessNotEmpty(callable $callback, callable $default = null) - { - return $this->whenEmpty($callback, $default); - } - - /** - * Filter items by the given key value pair. - * - * @param string $key - * @param mixed $operator - * @param mixed $value - * @return static - */ - public function where($key, $operator = null, $value = null) - { - return $this->filter($this->operatorForWhere(...func_get_args())); - } - - /** - * Filter items where the value for the given key is null. - * - * @param string|null $key - * @return static - */ - public function whereNull($key = null) - { - return $this->whereStrict($key, null); - } - - /** - * Filter items where the value for the given key is not null. - * - * @param string|null $key - * @return static - */ - public function whereNotNull($key = null) - { - return $this->where($key, '!==', null); - } - - /** - * Filter items by the given key value pair using strict comparison. - * - * @param string $key - * @param mixed $value - * @return static - */ - public function whereStrict($key, $value) - { - return $this->where($key, '===', $value); - } - - /** - * Filter items by the given key value pair. - * - * @param string $key - * @param mixed $values - * @param bool $strict - * @return static - */ - public function whereIn($key, $values, $strict = false) - { - $values = $this->getArrayableItems($values); - - return $this->filter(function ($item) use ($key, $values, $strict) { - return in_array(data_get($item, $key), $values, $strict); - }); - } - - /** - * Filter items by the given key value pair using strict comparison. - * - * @param string $key - * @param mixed $values - * @return static - */ - public function whereInStrict($key, $values) - { - return $this->whereIn($key, $values, true); - } - - /** - * Filter items such that the value of the given key is between the given values. - * - * @param string $key - * @param array $values - * @return static - */ - public function whereBetween($key, $values) - { - return $this->where($key, '>=', reset($values))->where($key, '<=', end($values)); - } - - /** - * Filter items such that the value of the given key is not between the given values. - * - * @param string $key - * @param array $values - * @return static - */ - public function whereNotBetween($key, $values) - { - return $this->filter(function ($item) use ($key, $values) { - return data_get($item, $key) < reset($values) || data_get($item, $key) > end($values); - }); - } - - /** - * Filter items by the given key value pair. - * - * @param string $key - * @param mixed $values - * @param bool $strict - * @return static - */ - public function whereNotIn($key, $values, $strict = false) - { - $values = $this->getArrayableItems($values); - - return $this->reject(function ($item) use ($key, $values, $strict) { - return in_array(data_get($item, $key), $values, $strict); - }); - } - - /** - * Filter items by the given key value pair using strict comparison. - * - * @param string $key - * @param mixed $values - * @return static - */ - public function whereNotInStrict($key, $values) - { - return $this->whereNotIn($key, $values, true); - } - - /** - * Filter the items, removing any items that don't match the given type(s). - * - * @param string|string[] $type - * @return static - */ - public function whereInstanceOf($type) - { - return $this->filter(function ($value) use ($type) { - if (is_array($type)) { - foreach ($type as $classType) { - if ($value instanceof $classType) { - return true; - } - } - - return false; - } - - return $value instanceof $type; - }); - } - - /** - * Pass the collection to the given callback and return the result. - * - * @param callable $callback - * @return mixed - */ - public function pipe(callable $callback) - { - return $callback($this); - } - - /** - * Pass the collection into a new class. - * - * @param string $class - * @return mixed - */ - public function pipeInto($class) - { - return new $class($this); - } - - /** - * Pass the collection to the given callback and then return it. - * - * @param callable $callback - * @return $this - */ - public function tap(callable $callback) - { - $callback(clone $this); - - return $this; - } - - /** - * Reduce the collection to a single value. - * - * @param callable $callback - * @param mixed $initial - * @return mixed - */ - public function reduce(callable $callback, $initial = null) - { - $result = $initial; - - foreach ($this as $key => $value) { - $result = $callback($result, $value, $key); - } - - return $result; - } - - /** - * Reduce the collection to multiple aggregate values. - * - * @param callable $callback - * @param mixed ...$initial - * @return array - * - * @deprecated Use "reduceSpread" instead - * - * @throws \UnexpectedValueException - */ - public function reduceMany(callable $callback, ...$initial) - { - return $this->reduceSpread($callback, ...$initial); - } - - /** - * Reduce the collection to multiple aggregate values. - * - * @param callable $callback - * @param mixed ...$initial - * @return array - * - * @throws \UnexpectedValueException - */ - public function reduceSpread(callable $callback, ...$initial) - { - $result = $initial; - - foreach ($this as $key => $value) { - $result = call_user_func_array($callback, array_merge($result, [$value, $key])); - - if (! is_array($result)) { - throw new UnexpectedValueException(sprintf( - "%s::reduceMany expects reducer to return an array, but got a '%s' instead.", - class_basename(static::class), gettype($result) - )); - } - } - - return $result; - } - - /** - * Reduce an associative collection to a single value. - * - * @param callable $callback - * @param mixed $initial - * @return mixed - */ - public function reduceWithKeys(callable $callback, $initial = null) - { - return $this->reduce($callback, $initial); - } - - /** - * Create a collection of all elements that do not pass a given truth test. - * - * @param callable|mixed $callback - * @return static - */ - public function reject($callback = true) - { - $useAsCallable = $this->useAsCallable($callback); - - return $this->filter(function ($value, $key) use ($callback, $useAsCallable) { - return $useAsCallable - ? ! $callback($value, $key) - : $value != $callback; - }); - } - - /** - * Return only unique items from the collection array using strict comparison. - * - * @param string|callable|null $key - * @return static - */ - public function uniqueStrict($key = null) - { - return $this->unique($key, true); - } - - /** - * Collect the values into a collection. - * - * @return \Tightenco\Collect\Support\Collection - */ - public function collect() - { - return new Collection($this->all()); - } - - /** - * Get the collection of items as a plain array. - * - * @return array - */ - public function toArray() - { - return $this->map(function ($value) { - return $value instanceof Arrayable ? $value->toArray() : $value; - })->all(); - } - - /** - * Convert the object into something JSON serializable. - * - * @return array - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return array_map(function ($value) { - if ($value instanceof JsonSerializable) { - return $value->jsonSerialize(); - } elseif ($value instanceof Jsonable) { - return json_decode($value->toJson(), true); - } elseif ($value instanceof Arrayable) { - return $value->toArray(); - } - - return $value; - }, $this->all()); - } - - /** - * Get the collection of items as JSON. - * - * @param int $options - * @return string - */ - public function toJson($options = 0) - { - return json_encode($this->jsonSerialize(), $options); - } - - /** - * Get a CachingIterator instance. - * - * @param int $flags - * @return \CachingIterator - */ - public function getCachingIterator($flags = CachingIterator::CALL_TOSTRING) - { - return new CachingIterator($this->getIterator(), $flags); - } - - /** - * Convert the collection to its string representation. - * - * @return string - */ - public function __toString() - { - return $this->escapeWhenCastingToString - ? e($this->toJson()) - : $this->toJson(); - } - - /** - * Indicate that the model's string representation should be escaped when __toString is invoked. - * - * @param bool $escape - * @return $this - */ - public function escapeWhenCastingToString($escape = true) - { - $this->escapeWhenCastingToString = $escape; - - return $this; - } - - /** - * Add a method to the list of proxied methods. - * - * @param string $method - * @return void - */ - public static function proxy($method) - { - static::$proxies[] = $method; - } - - /** - * Dynamically access collection proxies. - * - * @param string $key - * @return mixed - * - * @throws \Exception - */ - public function __get($key) - { - if (! in_array($key, static::$proxies)) { - throw new Exception("Property [{$key}] does not exist on this collection instance."); - } - - return new HigherOrderCollectionProxy($this, $key); - } - - /** - * Results array of items from Collection or Arrayable. - * - * @param mixed $items - * @return array - */ - protected function getArrayableItems($items) - { - if (is_array($items)) { - return $items; - } elseif ($items instanceof Enumerable) { - return $items->all(); - } elseif ($items instanceof Arrayable) { - return $items->toArray(); - } elseif ($items instanceof Jsonable) { - return json_decode($items->toJson(), true); - } elseif ($items instanceof JsonSerializable) { - return (array) $items->jsonSerialize(); - } elseif ($items instanceof Traversable) { - return iterator_to_array($items); - } - - return (array) $items; - } - - /** - * Get an operator checker callback. - * - * @param string $key - * @param string|null $operator - * @param mixed $value - * @return \Closure - */ - protected function operatorForWhere($key, $operator = null, $value = null) - { - if (func_num_args() === 1) { - $value = true; - - $operator = '='; - } - - if (func_num_args() === 2) { - $value = $operator; - - $operator = '='; - } - - return function ($item) use ($key, $operator, $value) { - $retrieved = data_get($item, $key); - - $strings = array_filter([$retrieved, $value], function ($value) { - return is_string($value) || (is_object($value) && method_exists($value, '__toString')); - }); - - if (count($strings) < 2 && count(array_filter([$retrieved, $value], 'is_object')) == 1) { - return in_array($operator, ['!=', '<>', '!==']); - } - - switch ($operator) { - default: - case '=': - case '==': return $retrieved == $value; - case '!=': - case '<>': return $retrieved != $value; - case '<': return $retrieved < $value; - case '>': return $retrieved > $value; - case '<=': return $retrieved <= $value; - case '>=': return $retrieved >= $value; - case '===': return $retrieved === $value; - case '!==': return $retrieved !== $value; - } - }; - } - - /** - * Determine if the given value is callable, but not a string. - * - * @param mixed $value - * @return bool - */ - protected function useAsCallable($value) - { - return ! is_string($value) && is_callable($value); - } - - /** - * Get a value retrieving callback. - * - * @param callable|string|null $value - * @return callable - */ - protected function valueRetriever($value) - { - if ($this->useAsCallable($value)) { - return $value; - } - - return function ($item) use ($value) { - return data_get($item, $value); - }; - } - - /** - * Make a function to check an item's equality. - * - * @param mixed $value - * @return \Closure - */ - protected function equality($value) - { - return function ($item) use ($value) { - return $item === $value; - }; - } - - /** - * Make a function using another function, by negating its result. - * - * @param \Closure $callback - * @return \Closure - */ - protected function negate(Closure $callback) - { - return function (...$params) use ($callback) { - return ! $callback(...$params); - }; - } - - /** - * Make a function that returns what's passed to it. - * - * @return \Closure - */ - protected function identity() - { - return function ($value) { - return $value; - }; - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/Traits/Macroable.php b/vendor/tightenco/collect/src/Collect/Support/Traits/Macroable.php deleted file mode 100644 index 7e9fbd5..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/Traits/Macroable.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support\Traits; - -use BadMethodCallException; -use Closure; -use ReflectionClass; -use ReflectionMethod; - -trait Macroable -{ - /** - * The registered string macros. - * - * @var array - */ - protected static $macros = []; - - /** - * Register a custom macro. - * - * @param string $name - * @param object|callable $macro - * @return void - */ - public static function macro($name, $macro) - { - static::$macros[$name] = $macro; - } - - /** - * Mix another object into the class. - * - * @param object $mixin - * @param bool $replace - * @return void - * - * @throws \ReflectionException - */ - public static function mixin($mixin, $replace = true) - { - $methods = (new ReflectionClass($mixin))->getMethods( - ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED - ); - - foreach ($methods as $method) { - if ($replace || ! static::hasMacro($method->name)) { - $method->setAccessible(true); - static::macro($method->name, $method->invoke($mixin)); - } - } - } - - /** - * Checks if macro is registered. - * - * @param string $name - * @return bool - */ - public static function hasMacro($name) - { - return isset(static::$macros[$name]); - } - - /** - * Flush the existing macros. - * - * @return void - */ - public static function flushMacros() - { - static::$macros = []; - } - - /** - * Dynamically handle calls to the class. - * - * @param string $method - * @param array $parameters - * @return mixed - * - * @throws \BadMethodCallException - */ - public static function __callStatic($method, $parameters) - { - if (! static::hasMacro($method)) { - throw new BadMethodCallException(sprintf( - 'Method %s::%s does not exist.', static::class, $method - )); - } - - $macro = static::$macros[$method]; - - if ($macro instanceof Closure) { - $macro = $macro->bindTo(null, static::class); - } - - return $macro(...$parameters); - } - - /** - * Dynamically handle calls to the class. - * - * @param string $method - * @param array $parameters - * @return mixed - * - * @throws \BadMethodCallException - */ - public function __call($method, $parameters) - { - if (! static::hasMacro($method)) { - throw new BadMethodCallException(sprintf( - 'Method %s::%s does not exist.', static::class, $method - )); - } - - $macro = static::$macros[$method]; - - if ($macro instanceof Closure) { - $macro = $macro->bindTo($this, static::class); - } - - return $macro(...$parameters); - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/Traits/Tappable.php b/vendor/tightenco/collect/src/Collect/Support/Traits/Tappable.php deleted file mode 100644 index 9d75d26..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/Traits/Tappable.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -namespace Tightenco\Collect\Support\Traits; - -trait Tappable -{ - /** - * Call the given Closure with this instance then return the instance. - * - * @param callable|null $callback - * @return $this|\Tightenco\Collect\Support\HigherOrderTapProxy - */ - public function tap($callback = null) - { - return tap($this, $callback); - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/alias.php b/vendor/tightenco/collect/src/Collect/Support/alias.php deleted file mode 100644 index a9c0406..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/alias.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -$aliases = [ - Tightenco\Collect\Contracts\Support\Arrayable::class => Illuminate\Contracts\Support\Arrayable::class, - Tightenco\Collect\Contracts\Support\Jsonable::class => Illuminate\Contracts\Support\Jsonable::class, - Tightenco\Collect\Contracts\Support\Htmlable::class => Illuminate\Contracts\Support\Htmlable::class, - Tightenco\Collect\Contracts\Support\CanBeEscapedWhenCastToString::class => Illuminate\Contracts\Support\CanBeEscapedWhenCastToString::class, - Tightenco\Collect\Support\Arr::class => Illuminate\Support\Arr::class, - Tightenco\Collect\Support\Collection::class => Illuminate\Support\Collection::class, - Tightenco\Collect\Support\Enumerable::class => Illuminate\Support\Enumerable::class, - Tightenco\Collect\Support\HigherOrderCollectionProxy::class => Illuminate\Support\HigherOrderCollectionProxy::class, - Tightenco\Collect\Support\HigherOrderWhenProxy::class => Illuminate\Support\HigherOrderWhenProxy::class, - Tightenco\Collect\Support\LazyCollection::class => Illuminate\Support\LazyCollection::class, - Tightenco\Collect\Support\Traits\EnumeratesValues::class => Illuminate\Support\Traits\EnumeratesValues::class, -]; - -# echo "\n\n-- Aliasing....\n---------------------------------------------\n\n"; - -foreach ($aliases as $tighten => $illuminate) { - if (! class_exists($illuminate) && ! interface_exists($illuminate) && ! trait_exists($illuminate)) { - # echo "Aliasing {$tighten} to {$illuminate}.\n"; - class_alias($tighten, $illuminate); - } -} diff --git a/vendor/tightenco/collect/src/Collect/Support/helpers.php b/vendor/tightenco/collect/src/Collect/Support/helpers.php deleted file mode 100644 index aa0270c..0000000 --- a/vendor/tightenco/collect/src/Collect/Support/helpers.php +++ /dev/null @@ -1,154 +0,0 @@ -<?php - -use Tightenco\Collect\Support\Arr; -use Tightenco\Collect\Support\Collection; -use Tightenco\Collect\Support\HigherOrderTapProxy; -use Symfony\Component\VarDumper\VarDumper; - -if (! class_exists(Illuminate\Support\Collection::class)) { - if (! function_exists('array_wrap')) { - /** - * If the given value is not an array, wrap it in one. - * - * @param mixed $value - * @return array - */ - function array_wrap($value) - { - return ! is_array($value) ? [$value] : $value; - } - } - - if (! function_exists('collect')) { - /** - * Create a collection from the given value. - * - * @param mixed $value - * @return \Tightenco\Collect\Support\Collection - */ - function collect($value = null) - { - return new Collection($value); - } - } - - if (! function_exists('value')) { - /** - * Return the default value of the given value. - * - * @param mixed $value - * @return mixed - */ - function value($value) - { - return $value instanceof Closure ? $value() : $value; - } - } - - if (! function_exists('data_get')) { - /** - * Get an item from an array or object using "dot" notation. - * - * @param mixed $target - * @param string|array $key - * @param mixed $default - * @return mixed - */ - function data_get($target, $key, $default = null) - { - if (is_null($key)) { - return $target; - } - - $key = is_array($key) ? $key : explode('.', $key); - - while (($segment = array_shift($key)) !== null) { - if ($segment === '*') { - if ($target instanceof Collection) { - $target = $target->all(); - } elseif (! is_array($target)) { - return value($default); - } - - $result = Arr::pluck($target, $key); - - return in_array('*', $key) ? Arr::collapse($result) : $result; - } - - if (Arr::accessible($target) && Arr::exists($target, $segment)) { - $target = $target[$segment]; - } elseif (is_object($target) && isset($target->{$segment})) { - $target = $target->{$segment}; - } else { - return value($default); - } - } - - return $target; - } - } - - if (! function_exists('tap')) { - /** - * Call the given Closure with the given value then return the value. - * - * @param mixed $value - * @param callable|null $callback - * @return mixed - */ - function tap($value, $callback = null) - { - if (is_null($callback)) { - return new HigherOrderTapProxy($value); - } - - $callback($value); - - return $value; - } - } - - if (! function_exists('with')) { - /** - * Return the given object. Useful for chaining. - * - * @param mixed $object - * @return mixed - */ - function with($object) - { - return $object; - } - } - - if (! function_exists('dd')) { - /** - * Dump the passed variables and end the script. - * - * @param mixed - * @return void - */ - function dd(...$args) - { - foreach ($args as $x) { - VarDumper::dump($x); - } - die(1); - } - } - - if (! function_exists('class_basename')) { - /** - * Get the class "basename" of the given object / class. - * - * @param string|object $class - * @return string - */ - function class_basename($class) - { - $class = is_object($class) ? get_class($class) : $class; - - return basename(str_replace('\\', '/', $class)); - } - } -} diff --git a/vendor/topthink/framework/.gitignore b/vendor/topthink/framework/.gitignore deleted file mode 100644 index b2fd3b9..0000000 --- a/vendor/topthink/framework/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -/vendor -composer.phar -composer.lock -.DS_Store -Thumbs.db -/.idea -/.vscode -/.settings -/.buildpath -/.project \ No newline at end of file diff --git a/vendor/topthink/framework/.travis.yml b/vendor/topthink/framework/.travis.yml deleted file mode 100644 index abaa271..0000000 --- a/vendor/topthink/framework/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -dist: xenial -language: php - -matrix: - fast_finish: true - include: - - php: 7.2 - - php: 7.3 - - php: 8.0 - -cache: - directories: - - $HOME/.composer/cache - -services: - - memcached - - redis-server - - mysql - -before_install: - - echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - echo 'xdebug.mode = coverage' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - printf "\n" | pecl install -f redis - - travis_retry composer self-update - - mysql -e 'CREATE DATABASE test;' - -install: - - travis_retry composer update --prefer-dist --no-interaction --prefer-stable --no-suggest - -script: - - vendor/bin/phpunit --coverage-clover build/logs/coverage.xml - -after_script: - - travis_retry wget https://scrutinizer-ci.com/ocular.phar - - php ocular.phar code-coverage:upload --format=php-clover build/logs/coverage.xml diff --git a/vendor/topthink/framework/CONTRIBUTING.md b/vendor/topthink/framework/CONTRIBUTING.md deleted file mode 100644 index efa3ad9..0000000 --- a/vendor/topthink/framework/CONTRIBUTING.md +++ /dev/null @@ -1,119 +0,0 @@ -如何贡献我的源代码 -=== - -此文档介绍了 ThinkPHP 团队的组成以及运转机制,您提交的代码将给 ThinkPHP 项目带来什么好处,以及如何才能加入我们的行列。 - -## 通过 Github 贡献代码 - -ThinkPHP 目前使用 Git 来控制程序版本,如果你想为 ThinkPHP 贡献源代码,请先大致了解 Git 的使用方法。我们目前把项目托管在 GitHub 上,任何 GitHub 用户都可以向我们贡献代码。 - -参与的方式很简单,`fork`一份 ThinkPHP 的代码到你的仓库中,修改后提交,并向我们发起`pull request`申请,我们会及时对代码进行审查并处理你的申请并。审查通过后,你的代码将被`merge`进我们的仓库中,这样你就会自动出现在贡献者名单里了,非常方便。 - -我们希望你贡献的代码符合: - -* ThinkPHP 的编码规范 -* 适当的注释,能让其他人读懂 -* 遵循 Apache2 开源协议 - -**如果想要了解更多细节或有任何疑问,请继续阅读下面的内容** - -### 注意事项 - -* 本项目代码格式化标准选用 [**PSR-2**](http://www.kancloud.cn/thinkphp/php-fig-psr/3141); -* 类名和类文件名遵循 [**PSR-4**](http://www.kancloud.cn/thinkphp/php-fig-psr/3144); -* 对于 Issues 的处理,请使用诸如 `fix #xxx(Issue ID)` 的 commit title 直接关闭 issue。 -* 系统会自动在 PHP 7.1 ~ 7.3 上测试修改,请确保你的修改符合 PHP 7.1 ~ 7.3 的语法规范; -* 管理员不会合并造成 CI faild 的修改,若出现 CI faild 请检查自己的源代码或修改相应的[单元测试文件](tests); - -## GitHub Issue - -GitHub 提供了 Issue 功能,该功能可以用于: - -* 提出 bug -* 提出功能改进 -* 反馈使用体验 - -该功能不应该用于: - - * 提出修改意见(涉及代码署名和修订追溯问题) - * 不友善的言论 - -## 快速修改 - -**GitHub 提供了快速编辑文件的功能** - -1. 登录 GitHub 帐号; -2. 浏览项目文件,找到要进行修改的文件; -3. 点击右上角铅笔图标进行修改; -4. 填写 `Commit changes` 相关内容(Title 必填); -5. 提交修改,等待 CI 验证和管理员合并。 - -**若您需要一次提交大量修改,请继续阅读下面的内容** - -## 完整流程 - -1. `fork`本项目; -2. 克隆(`clone`)你 `fork` 的项目到本地; -3. 新建分支(`branch`)并检出(`checkout`)新分支; -4. 添加本项目到你的本地 git 仓库作为上游(`upstream`); -5. 进行修改,若你的修改包含方法或函数的增减,请记得修改[单元测试文件](tests); -6. 变基(衍合 `rebase`)你的分支到上游 master 分支; -7. `push` 你的本地仓库到 GitHub; -8. 提交 `pull request`; -9. 等待 CI 验证(若不通过则重复 5~7,GitHub 会自动更新你的 `pull request`); -10. 等待管理员处理,并及时 `rebase` 你的分支到上游 master 分支(若上游 master 分支有修改)。 - -*若有必要,可以 `git push -f` 强行推送 rebase 后的分支到自己的 `fork`* - -*绝对不可以使用 `git push -f` 强行推送修改到上游* - -### 注意事项 - -* 若对上述流程有任何不清楚的地方,请查阅 GIT 教程,如 [这个](http://backlogtool.com/git-guide/cn/); -* 对于代码**不同方面**的修改,请在自己 `fork` 的项目中**创建不同的分支**(原因参见`完整流程`第9条备注部分); -* 变基及交互式变基操作参见 [Git 交互式变基](http://pakchoi.me/2015/03/17/git-interactive-rebase/) - -## 推荐资源 - -### 开发环境 - -* XAMPP for Windows 5.5.x -* WampServer (for Windows) -* upupw Apache PHP5.4 ( for Windows) - -或自行安装 - -- Apache / Nginx -- PHP 7.1 ~ 7.3 -- MySQL / MariaDB - -*Windows 用户推荐添加 PHP bin 目录到 PATH,方便使用 composer* - -*Linux 用户自行配置环境, Mac 用户推荐使用内置 Apache 配合 Homebrew 安装 PHP 和 MariaDB* - -### 编辑器 - -Sublime Text 3 + phpfmt 插件 - -phpfmt 插件参数 - -```json -{ - "autocomplete": true, - "enable_auto_align": true, - "format_on_save": true, - "indent_with_space": true, - "psr1_naming": false, - "psr2": true, - "version": 4 -} -``` - -或其他 编辑器 / IDE 配合 PSR2 自动格式化工具 - -### Git GUI - -* SourceTree -* GitHub Desktop - -或其他 Git 图形界面客户端 diff --git a/vendor/topthink/framework/LICENSE.txt b/vendor/topthink/framework/LICENSE.txt deleted file mode 100644 index 4e910bb..0000000 --- a/vendor/topthink/framework/LICENSE.txt +++ /dev/null @@ -1,32 +0,0 @@ - -ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 -版权所有Copyright © 2006-2019 by ThinkPHP (http://thinkphp.cn) -All rights reserved。 -ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 - -Apache Licence是著名的非盈利开源组织Apache采用的协议。 -该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, -允许代码修改,再作为开源或商业软件发布。需要满足 -的条件: -1. 需要给代码的用户一份Apache Licence ; -2. 如果你修改了代码,需要在被修改的文件中说明; -3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 -带有原来代码中的协议,商标,专利声明和其他原来作者规 -定需要包含的说明; -4. 如果再发布的产品中包含一个Notice文件,则在Notice文 -件中需要带有本协议内容。你可以在Notice中增加自己的 -许可,但不可以表现为对Apache Licence构成更改。 -具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/topthink/framework/README.md b/vendor/topthink/framework/README.md deleted file mode 100644 index 8781de0..0000000 --- a/vendor/topthink/framework/README.md +++ /dev/null @@ -1,84 +0,0 @@ -![](https://box.kancloud.cn/5a0aaa69a5ff42657b5c4715f3d49221) - -ThinkPHP 6.1 -=============== - -[![Build Status](https://travis-ci.org/top-think/framework.svg?branch=6.0)](https://travis-ci.org/top-think/framework) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/top-think/framework/badges/quality-score.png?b=6.0)](https://scrutinizer-ci.com/g/top-think/framework/?branch=6.0) -[![Code Coverage](https://scrutinizer-ci.com/g/top-think/framework/badges/coverage.png?b=6.0)](https://scrutinizer-ci.com/g/top-think/framework/?branch=6.0) -[![Total Downloads](https://poser.pugx.org/topthink/framework/downloads)](https://packagist.org/packages/topthink/framework) -[![Latest Stable Version](https://poser.pugx.org/topthink/framework/v/stable)](https://packagist.org/packages/topthink/framework) -[![PHP Version](https://img.shields.io/badge/php-%3E%3D7.1-8892BF.svg)](http://www.php.net/) -[![License](https://poser.pugx.org/topthink/framework/license)](https://packagist.org/packages/topthink/framework) - - -[官方服务](https://www.topthink.com) | [`ThinkAPI`——官方统一API](https://doc.topthink.com/think-api) - -## 主要新特性 - -* 采用`PHP7`强类型(严格模式) -* 支持更多的`PSR`规范 -* 原生多应用支持 -* 系统服务注入支持 -* ORM作为独立组件使用 -* 全新的事件系统 -* 模板引擎分离出核心 -* 内部功能中间件化 -* SESSION机制改进 -* 日志多通道支持 -* 规范扩展接口 -* 更强大的控制台 -* 对Swoole以及协程支持改进 -* 对IDE更加友好 -* 统一和精简大量用法 - - -> ThinkPHP6.1的运行环境要求PHP7.2.5+,最高兼容PHP8.2 - -## 安装 - -~~~ -composer create-project topthink/think tp -~~~ - -启动服务 - -~~~ -cd tp -php think run -~~~ - -然后就可以在浏览器中访问 - -~~~ -http://localhost:8000 -~~~ - -如果需要更新框架使用 -~~~ -composer update topthink/framework -~~~ - -## 文档 - -[完全开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content) - -## 命名规范 - -`ThinkPHP6`遵循PSR-2命名规范和PSR-4自动加载规范。 - -## 参与开发 - -直接提交PR或者Issue即可 - -## 版权信息 - -ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 - -本项目包含的第三方源码和二进制文件之版权信息另行标注。 - -版权所有Copyright © 2006-2023 by ThinkPHP (http://thinkphp.cn) All rights reserved。 - -ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 - -更多细节参阅 [LICENSE.txt](LICENSE.txt) diff --git a/vendor/topthink/framework/composer.json b/vendor/topthink/framework/composer.json deleted file mode 100644 index 2d9685e..0000000 --- a/vendor/topthink/framework/composer.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "topthink/framework", - "description": "The ThinkPHP Framework.", - "keywords": [ - "framework", - "thinkphp", - "ORM" - ], - "homepage": "http://thinkphp.cn/", - "license": "Apache-2.0", - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - }, - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "require": { - "php": ">=7.2.5", - "ext-json": "*", - "ext-mbstring": "*", - "psr/log": "~1.0", - "psr/container": "~1.0", - "psr/simple-cache": "^1.0", - "psr/http-message": "^1.0", - "topthink/think-orm": "^2.0|^3.0", - "topthink/think-helper": "^3.1.1" - }, - "require-dev": { - "mikey179/vfsstream": "^1.6", - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^7.0", - "guzzlehttp/psr7": "^2.1.0" - }, - "autoload": { - "files": [], - "psr-4": { - "think\\": "src/think/" - } - }, - "autoload-dev": { - "psr-4": { - "think\\tests\\": "tests/" - } - }, - "minimum-stability": "dev", - "prefer-stable": true, - "config": { - "sort-packages": true - } -} diff --git a/vendor/topthink/framework/logo.png b/vendor/topthink/framework/logo.png deleted file mode 100644 index 25fd059..0000000 Binary files a/vendor/topthink/framework/logo.png and /dev/null differ diff --git a/vendor/topthink/framework/phpunit.xml.dist b/vendor/topthink/framework/phpunit.xml.dist deleted file mode 100644 index e20a133..0000000 --- a/vendor/topthink/framework/phpunit.xml.dist +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<phpunit backupGlobals="false" - backupStaticAttributes="false" - beStrictAboutTestsThatDoNotTestAnything="false" - bootstrap="tests/bootstrap.php" - colors="true" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - processIsolation="false" - stopOnError="false" - stopOnFailure="false" - verbose="true" -> - <testsuites> - <testsuite name="ThinkPHP Test Suite"> - <directory suffix="Test.php">./tests</directory> - </testsuite> - </testsuites> - <filter> - <whitelist processUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">./src/think</directory> - </whitelist> - </filter> -</phpunit> diff --git a/vendor/topthink/framework/src/helper.php b/vendor/topthink/framework/src/helper.php deleted file mode 100644 index caba0ae..0000000 --- a/vendor/topthink/framework/src/helper.php +++ /dev/null @@ -1,664 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -//------------------------ -// ThinkPHP 助手函数 -//------------------------- - -use think\App; -use think\Container; -use think\exception\HttpException; -use think\exception\HttpResponseException; -use think\facade\Cache; -use think\facade\Config; -use think\facade\Cookie; -use think\facade\Env; -use think\facade\Event; -use think\facade\Lang; -use think\facade\Log; -use think\facade\Request; -use think\facade\Route; -use think\facade\Session; -use think\Response; -use think\response\File; -use think\response\Json; -use think\response\Jsonp; -use think\response\Redirect; -use think\response\View; -use think\response\Xml; -use think\route\Url as UrlBuild; -use think\Validate; - -if (!function_exists('abort')) { - /** - * 抛出HTTP异常 - * @param integer|Response $code 状态码 或者 Response对象实例 - * @param string $message 错误信息 - * @param array $header 参数 - */ - function abort($code, string $message = '', array $header = []) - { - if ($code instanceof Response) { - throw new HttpResponseException($code); - } else { - throw new HttpException($code, $message, null, $header); - } - } -} - -if (!function_exists('app')) { - /** - * 快速获取容器中的实例 支持依赖注入 - * @template T - * @param string|class-string<T> $name 类名或标识 默认获取当前应用实例 - * @param array $args 参数 - * @param bool $newInstance 是否每次创建新的实例 - * @return T|object|App - */ - function app(string $name = '', array $args = [], bool $newInstance = false) - { - return Container::getInstance()->make($name ?: App::class, $args, $newInstance); - } -} - -if (!function_exists('bind')) { - /** - * 绑定一个类到容器 - * @param string|array $abstract 类标识、接口(支持批量绑定) - * @param mixed $concrete 要绑定的类、闭包或者实例 - * @return Container - */ - function bind($abstract, $concrete = null) - { - return Container::getInstance()->bind($abstract, $concrete); - } -} - -if (!function_exists('cache')) { - /** - * 缓存管理 - * @param string $name 缓存名称 - * @param mixed $value 缓存值 - * @param mixed $options 缓存参数 - * @param string $tag 缓存标签 - * @return mixed - */ - function cache(string $name = null, $value = '', $options = null, $tag = null) - { - if (is_null($name)) { - return app('cache'); - } - - if ('' === $value) { - // 获取缓存 - return 0 === strpos($name, '?') ? Cache::has(substr($name, 1)) : Cache::get($name); - } elseif (is_null($value)) { - // 删除缓存 - return Cache::delete($name); - } - - // 缓存数据 - if (is_array($options)) { - $expire = $options['expire'] ?? null; //修复查询缓存无法设置过期时间 - } else { - $expire = $options; - } - - if (is_null($tag)) { - return Cache::set($name, $value, $expire); - } else { - return Cache::tag($tag)->set($name, $value, $expire); - } - } -} - -if (!function_exists('config')) { - /** - * 获取和设置配置参数 - * @param string|array $name 参数名 - * @param mixed $value 参数值 - * @return mixed - */ - function config($name = '', $value = null) - { - if (is_array($name)) { - return Config::set($name, $value); - } - - return 0 === strpos($name, '?') ? Config::has(substr($name, 1)) : Config::get($name, $value); - } -} - -if (!function_exists('cookie')) { - /** - * Cookie管理 - * @param string $name cookie名称 - * @param mixed $value cookie值 - * @param mixed $option 参数 - * @return mixed - */ - function cookie(string $name, $value = '', $option = null) - { - if (is_null($value)) { - // 删除 - Cookie::delete($name, $option ?: []); - } elseif ('' === $value) { - // 获取 - return 0 === strpos($name, '?') ? Cookie::has(substr($name, 1)) : Cookie::get($name); - } else { - // 设置 - return Cookie::set($name, $value, $option); - } - } -} - -if (!function_exists('download')) { - /** - * 获取\think\response\Download对象实例 - * @param string $filename 要下载的文件 - * @param string $name 显示文件名 - * @param bool $content 是否为内容 - * @param int $expire 有效期(秒) - * @return \think\response\File - */ - function download(string $filename, string $name = '', bool $content = false, int $expire = 180): File - { - return Response::create($filename, 'file')->name($name)->isContent($content)->expire($expire); - } -} - -if (!function_exists('dump')) { - /** - * 浏览器友好的变量输出 - * @param mixed $vars 要输出的变量 - * @return void - */ - function dump(...$vars) - { - ob_start(); - var_dump(...$vars); - - $output = ob_get_clean(); - $output = preg_replace('/\]\=\>\n(\s+)/m', '] => ', $output); - - if (PHP_SAPI == 'cli') { - $output = PHP_EOL . $output . PHP_EOL; - } else { - if (!extension_loaded('xdebug')) { - $output = htmlspecialchars($output, ENT_SUBSTITUTE); - } - $output = '<pre>' . $output . '</pre>'; - } - - echo $output; - } -} - -if (!function_exists('env')) { - /** - * 获取环境变量值 - * @access public - * @param string $name 环境变量名(支持二级 .号分割) - * @param string $default 默认值 - * @return mixed - */ - function env(string $name = null, $default = null) - { - return Env::get($name, $default); - } -} - -if (!function_exists('event')) { - /** - * 触发事件 - * @param mixed $event 事件名(或者类名) - * @param mixed $args 参数 - * @return mixed - */ - function event($event, $args = null) - { - return Event::trigger($event, $args); - } -} - -if (!function_exists('halt')) { - /** - * 调试变量并且中断输出 - * @param mixed $vars 调试变量或者信息 - */ - function halt(...$vars) - { - dump(...$vars); - - throw new HttpResponseException(Response::create()); - } -} - -if (!function_exists('input')) { - /** - * 获取输入数据 支持默认值和过滤 - * @param string $key 获取的变量名 - * @param mixed $default 默认值 - * @param string $filter 过滤方法 - * @return mixed - */ - function input(string $key = '', $default = null, $filter = '') - { - if (0 === strpos($key, '?')) { - $key = substr($key, 1); - $has = true; - } - - if ($pos = strpos($key, '.')) { - // 指定参数来源 - $method = substr($key, 0, $pos); - if (in_array($method, ['get', 'post', 'put', 'patch', 'delete', 'route', 'param', 'request', 'session', 'cookie', 'server', 'env', 'path', 'file'])) { - $key = substr($key, $pos + 1); - if ('server' == $method && is_null($default)) { - $default = ''; - } - } else { - $method = 'param'; - } - } else { - // 默认为自动判断 - $method = 'param'; - } - - return isset($has) ? - request()->has($key, $method) : - request()->$method($key, $default, $filter); - } -} - -if (!function_exists('invoke')) { - /** - * 调用反射实例化对象或者执行方法 支持依赖注入 - * @param mixed $call 类名或者callable - * @param array $args 参数 - * @return mixed - */ - function invoke($call, array $args = []) - { - if (is_callable($call)) { - return Container::getInstance()->invoke($call, $args); - } - - return Container::getInstance()->invokeClass($call, $args); - } -} - -if (!function_exists('json')) { - /** - * 获取\think\response\Json对象实例 - * @param mixed $data 返回的数据 - * @param int $code 状态码 - * @param array $header 头部 - * @param array $options 参数 - * @return \think\response\Json - */ - function json($data = [], $code = 200, $header = [], $options = []): Json - { - return Response::create($data, 'json', $code)->header($header)->options($options); - } -} - -if (!function_exists('jsonp')) { - /** - * 获取\think\response\Jsonp对象实例 - * @param mixed $data 返回的数据 - * @param int $code 状态码 - * @param array $header 头部 - * @param array $options 参数 - * @return \think\response\Jsonp - */ - function jsonp($data = [], $code = 200, $header = [], $options = []): Jsonp - { - return Response::create($data, 'jsonp', $code)->header($header)->options($options); - } -} - -if (!function_exists('lang')) { - /** - * 获取语言变量值 - * @param string $name 语言变量名 - * @param array $vars 动态变量值 - * @param string $lang 语言 - * @return mixed - */ - function lang(string $name, array $vars = [], string $lang = '') - { - return Lang::get($name, $vars, $lang); - } -} - -if (!function_exists('parse_name')) { - /** - * 字符串命名风格转换 - * type 0 将Java风格转换为C的风格 1 将C风格转换为Java的风格 - * @param string $name 字符串 - * @param int $type 转换类型 - * @param bool $ucfirst 首字母是否大写(驼峰规则) - * @return string - */ - function parse_name(string $name, int $type = 0, bool $ucfirst = true): string - { - if ($type) { - $name = preg_replace_callback('/_([a-zA-Z])/', function ($match) { - return strtoupper($match[1]); - }, $name); - - return $ucfirst ? ucfirst($name) : lcfirst($name); - } - - return strtolower(trim(preg_replace('/[A-Z]/', '_\\0', $name), '_')); - } -} - -if (!function_exists('redirect')) { - /** - * 获取\think\response\Redirect对象实例 - * @param string $url 重定向地址 - * @param int $code 状态码 - * @return \think\response\Redirect - */ - function redirect(string $url = '', int $code = 302): Redirect - { - return Response::create($url, 'redirect', $code); - } -} - -if (!function_exists('request')) { - /** - * 获取当前Request对象实例 - * @return Request - */ - function request(): \think\Request - { - return app('request'); - } -} - -if (!function_exists('response')) { - /** - * 创建普通 Response 对象实例 - * @param mixed $data 输出数据 - * @param int|string $code 状态码 - * @param array $header 头信息 - * @param string $type - * @return Response - */ - function response($data = '', $code = 200, $header = [], $type = 'html'): Response - { - return Response::create($data, $type, $code)->header($header); - } -} - -if (!function_exists('session')) { - /** - * Session管理 - * @param string $name session名称 - * @param mixed $value session值 - * @return mixed - */ - function session($name = '', $value = '') - { - if (is_null($name)) { - // 清除 - Session::clear(); - } elseif ('' === $name) { - return Session::all(); - } elseif (is_null($value)) { - // 删除 - Session::delete($name); - } elseif ('' === $value) { - // 判断或获取 - return 0 === strpos($name, '?') ? Session::has(substr($name, 1)) : Session::get($name); - } else { - // 设置 - Session::set($name, $value); - } - } -} - -if (!function_exists('token')) { - /** - * 获取Token令牌 - * @param string $name 令牌名称 - * @param mixed $type 令牌生成方法 - * @return string - */ - function token(string $name = '__token__', string $type = 'md5'): string - { - return Request::buildToken($name, $type); - } -} - -if (!function_exists('token_field')) { - /** - * 生成令牌隐藏表单 - * @param string $name 令牌名称 - * @param mixed $type 令牌生成方法 - * @return string - */ - function token_field(string $name = '__token__', string $type = 'md5'): string - { - $token = Request::buildToken($name, $type); - - return '<input type="hidden" name="' . $name . '" value="' . $token . '" />'; - } -} - -if (!function_exists('token_meta')) { - /** - * 生成令牌meta - * @param string $name 令牌名称 - * @param mixed $type 令牌生成方法 - * @return string - */ - function token_meta(string $name = '__token__', string $type = 'md5'): string - { - $token = Request::buildToken($name, $type); - - return '<meta name="csrf-token" content="' . $token . '">'; - } -} - -if (!function_exists('trace')) { - /** - * 记录日志信息 - * @param mixed $log log信息 支持字符串和数组 - * @param string $level 日志级别 - * @return array|void - */ - function trace($log = '[think]', string $level = 'log') - { - if ('[think]' === $log) { - return Log::getLog(); - } - - Log::record($log, $level); - } -} - -if (!function_exists('url')) { - /** - * Url生成 - * @param string $url 路由地址 - * @param array $vars 变量 - * @param bool|string $suffix 生成的URL后缀 - * @param bool|string $domain 域名 - * @return UrlBuild - */ - function url(string $url = '', array $vars = [], $suffix = true, $domain = false): UrlBuild - { - return Route::buildUrl($url, $vars)->suffix($suffix)->domain($domain); - } -} - -if (!function_exists('validate')) { - /** - * 生成验证对象 - * @param string|array $validate 验证器类名或者验证规则数组 - * @param array $message 错误提示信息 - * @param bool $batch 是否批量验证 - * @param bool $failException 是否抛出异常 - * @return Validate - */ - function validate($validate = '', array $message = [], bool $batch = false, bool $failException = true): Validate - { - if (is_array($validate) || '' === $validate) { - $v = new Validate(); - if (is_array($validate)) { - $v->rule($validate); - } - } else { - if (strpos($validate, '.')) { - // 支持场景 - [$validate, $scene] = explode('.', $validate); - } - - $class = false !== strpos($validate, '\\') ? $validate : app()->parseClass('validate', $validate); - - $v = new $class(); - - if (!empty($scene)) { - $v->scene($scene); - } - } - - return $v->message($message)->batch($batch)->failException($failException); - } -} - -if (!function_exists('view')) { - /** - * 渲染模板输出 - * @param string $template 模板文件 - * @param array $vars 模板变量 - * @param int $code 状态码 - * @param callable $filter 内容过滤 - * @return \think\response\View - */ - function view(string $template = '', $vars = [], $code = 200, $filter = null): View - { - return Response::create($template, 'view', $code)->assign($vars)->filter($filter); - } -} - -if (!function_exists('display')) { - /** - * 渲染模板输出 - * @param string $content 渲染内容 - * @param array $vars 模板变量 - * @param int $code 状态码 - * @param callable $filter 内容过滤 - * @return \think\response\View - */ - function display(string $content, $vars = [], $code = 200, $filter = null): View - { - return Response::create($content, 'view', $code)->isContent(true)->assign($vars)->filter($filter); - } -} - -if (!function_exists('xml')) { - /** - * 获取\think\response\Xml对象实例 - * @param mixed $data 返回的数据 - * @param int $code 状态码 - * @param array $header 头部 - * @param array $options 参数 - * @return \think\response\Xml - */ - function xml($data = [], $code = 200, $header = [], $options = []): Xml - { - return Response::create($data, 'xml', $code)->header($header)->options($options); - } -} - -if (!function_exists('app_path')) { - /** - * 获取当前应用目录 - * - * @param string $path - * @return string - */ - function app_path($path = '') - { - return app()->getAppPath() . ($path ? $path . DIRECTORY_SEPARATOR : $path); - } -} - -if (!function_exists('base_path')) { - /** - * 获取应用基础目录 - * - * @param string $path - * @return string - */ - function base_path($path = '') - { - return app()->getBasePath() . ($path ? $path . DIRECTORY_SEPARATOR : $path); - } -} - -if (!function_exists('config_path')) { - /** - * 获取应用配置目录 - * - * @param string $path - * @return string - */ - function config_path($path = '') - { - return app()->getConfigPath() . ($path ? $path . DIRECTORY_SEPARATOR : $path); - } -} - -if (!function_exists('public_path')) { - /** - * 获取web根目录 - * - * @param string $path - * @return string - */ - function public_path($path = '') - { - return app()->getRootPath() . 'public' . DIRECTORY_SEPARATOR . ($path ? ltrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : $path); - } -} - -if (!function_exists('runtime_path')) { - /** - * 获取应用运行时目录 - * - * @param string $path - * @return string - */ - function runtime_path($path = '') - { - return app()->getRuntimePath() . ($path ? $path . DIRECTORY_SEPARATOR : $path); - } -} - -if (!function_exists('root_path')) { - /** - * 获取项目根目录 - * - * @param string $path - * @return string - */ - function root_path($path = '') - { - return app()->getRootPath() . ($path ? $path . DIRECTORY_SEPARATOR : $path); - } -} diff --git a/vendor/topthink/framework/src/lang/zh-cn.php b/vendor/topthink/framework/src/lang/zh-cn.php deleted file mode 100644 index a546330..0000000 --- a/vendor/topthink/framework/src/lang/zh-cn.php +++ /dev/null @@ -1,148 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -// 核心中文语言包 -return [ - // 系统错误提示 - 'Undefined variable' => '未定义变量', - 'Undefined index' => '未定义数组索引', - 'Undefined offset' => '未定义数组下标', - 'Parse error' => '语法解析错误', - 'Type error' => '类型错误', - 'Fatal error' => '致命错误', - 'syntax error' => '语法错误', - - // 框架核心错误提示 - 'dispatch type not support' => '不支持的调度类型', - 'method param miss' => '方法参数错误', - 'method not exists' => '方法不存在', - 'function not exists' => '函数不存在', - 'app not exists' => '应用不存在', - 'controller not exists' => '控制器不存在', - 'class not exists' => '类不存在', - 'property not exists' => '类的属性不存在', - 'template not exists' => '模板文件不存在', - 'illegal controller name' => '非法的控制器名称', - 'illegal action name' => '非法的操作名称', - 'url suffix deny' => '禁止的URL后缀访问', - 'Undefined cache config' => '缓存配置未定义', - 'Route Not Found' => '当前访问路由未定义或不匹配', - 'Undefined db config' => '数据库配置未定义', - 'Undefined log config' => '日志配置未定义', - 'Undefined db type' => '未定义数据库类型', - 'variable type error' => '变量类型错误', - 'PSR-4 error' => 'PSR-4 规范错误', - 'not support type' => '不支持的分页索引字段类型', - 'not support total' => '简洁模式下不能获取数据总数', - 'not support last' => '简洁模式下不能获取最后一页', - 'error session handler' => '错误的SESSION处理器类', - 'not allow php tag' => '模板不允许使用PHP语法', - 'not support' => '不支持', - 'database config error' => '数据库配置信息错误', - 'redisd master' => 'Redisd 主服务器错误', - 'redisd slave' => 'Redisd 从服务器错误', - 'must run at sae' => '必须在SAE运行', - 'memcache init error' => '未开通Memcache服务,请在SAE管理平台初始化Memcache服务', - 'KVDB init error' => '没有初始化KVDB,请在SAE管理平台初始化KVDB服务', - 'fields not exists' => '数据表字段不存在', - 'where express error' => '查询表达式错误', - 'no data to update' => '没有任何数据需要更新', - 'miss data to insert' => '缺少需要写入的数据', - 'miss complex primary data' => '缺少复合主键数据', - 'miss update condition' => '缺少更新条件', - 'model data Not Found' => '模型数据不存在', - 'table data not Found' => '表数据不存在', - 'delete without condition' => '没有条件不会执行删除操作', - 'miss relation data' => '缺少关联表数据', - 'tag attr must' => '模板标签属性必须', - 'tag error' => '模板标签错误', - 'cache write error' => '缓存写入失败', - 'sae mc write error' => 'SAE mc 写入错误', - 'route name not exists' => '路由标识不存在(或参数不够)', - 'invalid request' => '非法请求', - 'bind attr has exists' => '模型的属性已经存在', - 'relation data not exists' => '关联数据不存在', - 'relation not support' => '关联不支持', - 'chunk not support order' => 'Chunk不支持调用order方法', - 'route pattern error' => '路由变量规则定义错误', - 'route behavior will not support' => '路由行为废弃(使用中间件替代)', - 'closure not support cache(true)' => '使用闭包查询不支持cache(true),请指定缓存Key', - - // 上传错误信息 - 'unknown upload error' => '未知上传错误!', - 'file write error' => '文件写入失败!', - 'upload temp dir not found' => '找不到临时文件夹!', - 'no file to uploaded' => '没有文件被上传!', - 'only the portion of file is uploaded' => '文件只有部分被上传!', - 'upload File size exceeds the maximum value' => '上传文件大小超过了最大值!', - 'upload write error' => '文件上传保存错误!', - 'has the same filename: {:filename}' => '存在同名文件:{:filename}', - 'upload illegal files' => '非法上传文件', - 'illegal image files' => '非法图片文件', - 'extensions to upload is not allowed' => '上传文件后缀不允许', - 'mimetype to upload is not allowed' => '上传文件MIME类型不允许!', - 'filesize not match' => '上传文件大小不符!', - 'directory {:path} creation failed' => '目录 {:path} 创建失败!', - - 'The middleware must return Response instance' => '中间件方法必须返回Response对象实例', - 'The queue was exhausted, with no response returned' => '中间件队列为空', - // Validate Error Message - ':attribute require' => ':attribute不能为空', - ':attribute must' => ':attribute必须', - ':attribute must be numeric' => ':attribute必须是数字', - ':attribute must be integer' => ':attribute必须是整数', - ':attribute must be float' => ':attribute必须是浮点数', - ':attribute must be bool' => ':attribute必须是布尔值', - ':attribute not a valid email address' => ':attribute格式不符', - ':attribute not a valid mobile' => ':attribute格式不符', - ':attribute must be a array' => ':attribute必须是数组', - ':attribute must be yes,on or 1' => ':attribute必须是yes、on或者1', - ':attribute not a valid datetime' => ':attribute不是一个有效的日期或时间格式', - ':attribute not a valid file' => ':attribute不是有效的上传文件', - ':attribute not a valid image' => ':attribute不是有效的图像文件', - ':attribute must be alpha' => ':attribute只能是字母', - ':attribute must be alpha-numeric' => ':attribute只能是字母和数字', - ':attribute must be alpha-numeric, dash, underscore' => ':attribute只能是字母、数字和下划线_及破折号-', - ':attribute not a valid domain or ip' => ':attribute不是有效的域名或者IP', - ':attribute must be chinese' => ':attribute只能是汉字', - ':attribute must be chinese or alpha' => ':attribute只能是汉字、字母', - ':attribute must be chinese,alpha-numeric' => ':attribute只能是汉字、字母和数字', - ':attribute must be chinese,alpha-numeric,underscore, dash' => ':attribute只能是汉字、字母、数字和下划线_及破折号-', - ':attribute not a valid url' => ':attribute不是有效的URL地址', - ':attribute not a valid ip' => ':attribute不是有效的IP地址', - ':attribute must be dateFormat of :rule' => ':attribute必须使用日期格式 :rule', - ':attribute must be in :rule' => ':attribute必须在 :rule 范围内', - ':attribute be notin :rule' => ':attribute不能在 :rule 范围内', - ':attribute must between :1 - :2' => ':attribute只能在 :1 - :2 之间', - ':attribute not between :1 - :2' => ':attribute不能在 :1 - :2 之间', - 'size of :attribute must be :rule' => ':attribute长度不符合要求 :rule', - 'max size of :attribute must be :rule' => ':attribute长度不能超过 :rule', - 'min size of :attribute must be :rule' => ':attribute长度不能小于 :rule', - ':attribute cannot be less than :rule' => ':attribute日期不能小于 :rule', - ':attribute cannot exceed :rule' => ':attribute日期不能超过 :rule', - ':attribute not within :rule' => '不在有效期内 :rule', - 'access IP is not allowed' => '不允许的IP访问', - 'access IP denied' => '禁止的IP访问', - ':attribute out of accord with :2' => ':attribute和确认字段:2不一致', - ':attribute cannot be same with :2' => ':attribute和比较字段:2不能相同', - ':attribute must greater than or equal :rule' => ':attribute必须大于等于 :rule', - ':attribute must greater than :rule' => ':attribute必须大于 :rule', - ':attribute must less than or equal :rule' => ':attribute必须小于等于 :rule', - ':attribute must less than :rule' => ':attribute必须小于 :rule', - ':attribute must equal :rule' => ':attribute必须等于 :rule', - ':attribute has exists' => ':attribute已存在', - ':attribute not conform to the rules' => ':attribute不符合指定规则', - 'invalid Request method' => '无效的请求类型', - 'invalid token' => '令牌数据无效', - 'not conform to the rules' => '规则错误', - - 'record has update' => '记录已经被更新了', -]; diff --git a/vendor/topthink/framework/src/think/App.php b/vendor/topthink/framework/src/think/App.php deleted file mode 100644 index 597cf87..0000000 --- a/vendor/topthink/framework/src/think/App.php +++ /dev/null @@ -1,620 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use think\event\AppInit; -use think\helper\Str; -use think\initializer\BootService; -use think\initializer\Error; -use think\initializer\RegisterService; - -/** - * App 基础类 - * @property Route $route - * @property Config $config - * @property Cache $cache - * @property Request $request - * @property Http $http - * @property Console $console - * @property Env $env - * @property Event $event - * @property Middleware $middleware - * @property Log $log - * @property Lang $lang - * @property Db $db - * @property Cookie $cookie - * @property Session $session - * @property Validate $validate - */ -class App extends Container -{ - const VERSION = '6.1.4'; - - /** - * 应用调试模式 - * @var bool - */ - protected $appDebug = false; - - /** - * 环境变量标识 - * @var string - */ - protected $envName = ''; - - /** - * 应用开始时间 - * @var float - */ - protected $beginTime; - - /** - * 应用内存初始占用 - * @var integer - */ - protected $beginMem; - - /** - * 当前应用类库命名空间 - * @var string - */ - protected $namespace = 'app'; - - /** - * 应用根目录 - * @var string - */ - protected $rootPath = ''; - - /** - * 框架目录 - * @var string - */ - protected $thinkPath = ''; - - /** - * 应用目录 - * @var string - */ - protected $appPath = ''; - - /** - * Runtime目录 - * @var string - */ - protected $runtimePath = ''; - - /** - * 路由定义目录 - * @var string - */ - protected $routePath = ''; - - /** - * 配置后缀 - * @var string - */ - protected $configExt = '.php'; - - /** - * 应用初始化器 - * @var array - */ - protected $initializers = [ - Error::class, - RegisterService::class, - BootService::class, - ]; - - /** - * 注册的系统服务 - * @var array - */ - protected $services = []; - - /** - * 初始化 - * @var bool - */ - protected $initialized = false; - - /** - * 容器绑定标识 - * @var array - */ - protected $bind = [ - 'app' => App::class, - 'cache' => Cache::class, - 'config' => Config::class, - 'console' => Console::class, - 'cookie' => Cookie::class, - 'db' => Db::class, - 'env' => Env::class, - 'event' => Event::class, - 'http' => Http::class, - 'lang' => Lang::class, - 'log' => Log::class, - 'middleware' => Middleware::class, - 'request' => Request::class, - 'response' => Response::class, - 'route' => Route::class, - 'session' => Session::class, - 'validate' => Validate::class, - 'view' => View::class, - 'think\DbManager' => Db::class, - 'think\LogManager' => Log::class, - 'think\CacheManager' => Cache::class, - - // 接口依赖注入 - 'Psr\Log\LoggerInterface' => Log::class, - ]; - - /** - * 架构方法 - * @access public - * @param string $rootPath 应用根目录 - */ - public function __construct(string $rootPath = '') - { - $this->thinkPath = realpath(dirname(__DIR__)) . DIRECTORY_SEPARATOR; - $this->rootPath = $rootPath ? rtrim($rootPath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : $this->getDefaultRootPath(); - $this->appPath = $this->rootPath . 'app' . DIRECTORY_SEPARATOR; - $this->runtimePath = $this->rootPath . 'runtime' . DIRECTORY_SEPARATOR; - - if (is_file($this->appPath . 'provider.php')) { - $this->bind(include $this->appPath . 'provider.php'); - } - - static::setInstance($this); - - $this->instance('app', $this); - $this->instance('think\Container', $this); - } - - /** - * 注册服务 - * @access public - * @param Service|string $service 服务 - * @param bool $force 强制重新注册 - * @return Service|null - */ - public function register($service, bool $force = false) - { - $registered = $this->getService($service); - - if ($registered && !$force) { - return $registered; - } - - if (is_string($service)) { - $service = new $service($this); - } - - if (method_exists($service, 'register')) { - $service->register(); - } - - if (property_exists($service, 'bind')) { - $this->bind($service->bind); - } - - $this->services[] = $service; - } - - /** - * 执行服务 - * @access public - * @param Service $service 服务 - * @return mixed - */ - public function bootService($service) - { - if (method_exists($service, 'boot')) { - return $this->invoke([$service, 'boot']); - } - } - - /** - * 获取服务 - * @param string|Service $service - * @return Service|null - */ - public function getService($service) - { - $name = is_string($service) ? $service : get_class($service); - return array_values(array_filter($this->services, function ($value) use ($name) { - return $value instanceof $name; - }, ARRAY_FILTER_USE_BOTH))[0] ?? null; - } - - /** - * 开启应用调试模式 - * @access public - * @param bool $debug 开启应用调试模式 - * @return $this - */ - public function debug(bool $debug = true) - { - $this->appDebug = $debug; - return $this; - } - - /** - * 是否为调试模式 - * @access public - * @return bool - */ - public function isDebug(): bool - { - return $this->appDebug; - } - - /** - * 设置应用命名空间 - * @access public - * @param string $namespace 应用命名空间 - * @return $this - */ - public function setNamespace(string $namespace) - { - $this->namespace = $namespace; - return $this; - } - - /** - * 获取应用类库命名空间 - * @access public - * @return string - */ - public function getNamespace(): string - { - return $this->namespace; - } - - /** - * 设置环境变量标识 - * @access public - * @param string $name 环境标识 - * @return $this - */ - public function setEnvName(string $name) - { - $this->envName = $name; - return $this; - } - - /** - * 获取框架版本 - * @access public - * @return string - */ - public function version(): string - { - return static::VERSION; - } - - /** - * 获取应用根目录 - * @access public - * @return string - */ - public function getRootPath(): string - { - return $this->rootPath; - } - - /** - * 获取应用基础目录 - * @access public - * @return string - */ - public function getBasePath(): string - { - return $this->rootPath . 'app' . DIRECTORY_SEPARATOR; - } - - /** - * 获取当前应用目录 - * @access public - * @return string - */ - public function getAppPath(): string - { - return $this->appPath; - } - - /** - * 设置应用目录 - * @param string $path 应用目录 - */ - public function setAppPath(string $path) - { - $this->appPath = $path; - } - - /** - * 获取应用运行时目录 - * @access public - * @return string - */ - public function getRuntimePath(): string - { - return $this->runtimePath; - } - - /** - * 设置runtime目录 - * @param string $path 定义目录 - */ - public function setRuntimePath(string $path): void - { - $this->runtimePath = $path; - } - - /** - * 获取核心框架目录 - * @access public - * @return string - */ - public function getThinkPath(): string - { - return $this->thinkPath; - } - - /** - * 获取应用配置目录 - * @access public - * @return string - */ - public function getConfigPath(): string - { - return $this->rootPath . 'config' . DIRECTORY_SEPARATOR; - } - - /** - * 获取配置后缀 - * @access public - * @return string - */ - public function getConfigExt(): string - { - return $this->configExt; - } - - /** - * 获取应用开启时间 - * @access public - * @return float - */ - public function getBeginTime(): float - { - return $this->beginTime; - } - - /** - * 获取应用初始内存占用 - * @access public - * @return integer - */ - public function getBeginMem(): int - { - return $this->beginMem; - } - - /** - * 加载环境变量定义 - * @access public - * @param string $envName 环境标识 - * @return void - */ - public function loadEnv(string $envName = ''): void - { - // 加载环境变量 - $envFile = $envName ? $this->rootPath . '.env.' . $envName : $this->rootPath . '.env'; - - if (is_file($envFile)) { - $this->env->load($envFile); - } - } - - /** - * 初始化应用 - * @access public - * @return $this - */ - public function initialize() - { - $this->initialized = true; - - $this->beginTime = microtime(true); - $this->beginMem = memory_get_usage(); - - $this->loadEnv($this->envName); - - $this->configExt = $this->env->get('config_ext', '.php'); - - $this->debugModeInit(); - - // 加载全局初始化文件 - $this->load(); - - // 加载应用默认语言包 - $this->loadLangPack(); - - // 监听AppInit - $this->event->trigger(AppInit::class); - - date_default_timezone_set($this->config->get('app.default_timezone', 'Asia/Shanghai')); - - // 初始化 - foreach ($this->initializers as $initializer) { - $this->make($initializer)->init($this); - } - - return $this; - } - - /** - * 是否初始化过 - * @return bool - */ - public function initialized() - { - return $this->initialized; - } - - /** - * 加载语言包 - * @return void - */ - public function loadLangPack() - { - // 加载默认语言包 - $langSet = $this->lang->defaultLangSet(); - $this->lang->switchLangSet($langSet); - } - - /** - * 引导应用 - * @access public - * @return void - */ - public function boot(): void - { - array_walk($this->services, function ($service) { - $this->bootService($service); - }); - } - - /** - * 加载应用文件和配置 - * @access protected - * @return void - */ - protected function load(): void - { - $appPath = $this->getAppPath(); - - if (is_file($appPath . 'common.php')) { - include_once $appPath . 'common.php'; - } - - include_once $this->thinkPath . 'helper.php'; - - $configPath = $this->getConfigPath(); - - $files = []; - - if (is_dir($configPath)) { - $files = glob($configPath . '*' . $this->configExt); - } - - foreach ($files as $file) { - $this->config->load($file, pathinfo($file, PATHINFO_FILENAME)); - } - - if (is_file($appPath . 'event.php')) { - $this->loadEvent(include $appPath . 'event.php'); - } - - if (is_file($appPath . 'service.php')) { - $services = include $appPath . 'service.php'; - foreach ($services as $service) { - $this->register($service); - } - } - } - - /** - * 调试模式设置 - * @access protected - * @return void - */ - protected function debugModeInit(): void - { - // 应用调试模式 - if (!$this->appDebug) { - $this->appDebug = $this->env->get('app_debug') ? true : false; - ini_set('display_errors', 'Off'); - } - - if (!$this->runningInConsole()) { - //重新申请一块比较大的buffer - if (ob_get_level() > 0) { - $output = ob_get_clean(); - } - ob_start(); - if (!empty($output)) { - echo $output; - } - } - } - - /** - * 注册应用事件 - * @access protected - * @param array $event 事件数据 - * @return void - */ - public function loadEvent(array $event): void - { - if (isset($event['bind'])) { - $this->event->bind($event['bind']); - } - - if (isset($event['listen'])) { - $this->event->listenEvents($event['listen']); - } - - if (isset($event['subscribe'])) { - $this->event->subscribe($event['subscribe']); - } - } - - /** - * 解析应用类的类名 - * @access public - * @param string $layer 层名 controller model ... - * @param string $name 类名 - * @return string - */ - public function parseClass(string $layer, string $name): string - { - $name = str_replace(['/', '.'], '\\', $name); - $array = explode('\\', $name); - $class = Str::studly(array_pop($array)); - $path = $array ? implode('\\', $array) . '\\' : ''; - - return $this->namespace . '\\' . $layer . '\\' . $path . $class; - } - - /** - * 是否运行在命令行下 - * @return bool - */ - public function runningInConsole(): bool - { - return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg'; - } - - /** - * 获取应用根目录 - * @access protected - * @return string - */ - protected function getDefaultRootPath(): string - { - return dirname($this->thinkPath, 4) . DIRECTORY_SEPARATOR; - } - -} diff --git a/vendor/topthink/framework/src/think/Cache.php b/vendor/topthink/framework/src/think/Cache.php deleted file mode 100644 index f802b55..0000000 --- a/vendor/topthink/framework/src/think/Cache.php +++ /dev/null @@ -1,197 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use Psr\SimpleCache\CacheInterface; -use think\cache\Driver; -use think\cache\TagSet; -use think\exception\InvalidArgumentException; -use think\helper\Arr; - -/** - * 缓存管理类 - * @mixin Driver - * @mixin \think\cache\driver\File - */ -class Cache extends Manager implements CacheInterface -{ - - protected $namespace = '\\think\\cache\\driver\\'; - - /** - * 默认驱动 - * @return string|null - */ - public function getDefaultDriver() - { - return $this->getConfig('default'); - } - - /** - * 获取缓存配置 - * @access public - * @param null|string $name 名称 - * @param mixed $default 默认值 - * @return mixed - */ - public function getConfig(string $name = null, $default = null) - { - if (!is_null($name)) { - return $this->app->config->get('cache.' . $name, $default); - } - - return $this->app->config->get('cache'); - } - - /** - * 获取驱动配置 - * @param string $store - * @param string $name - * @param null $default - * @return array - */ - public function getStoreConfig(string $store, string $name = null, $default = null) - { - if ($config = $this->getConfig("stores.{$store}")) { - return Arr::get($config, $name, $default); - } - - throw new \InvalidArgumentException("Store [$store] not found."); - } - - protected function resolveType(string $name) - { - return $this->getStoreConfig($name, 'type', 'file'); - } - - protected function resolveConfig(string $name) - { - return $this->getStoreConfig($name); - } - - /** - * 连接或者切换缓存 - * @access public - * @param string $name 连接配置名 - * @return Driver - */ - public function store(string $name = null) - { - return $this->driver($name); - } - - /** - * 清空缓冲池 - * @access public - * @return bool - */ - public function clear(): bool - { - return $this->store()->clear(); - } - - /** - * 读取缓存 - * @access public - * @param string $key 缓存变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function get($key, $default = null) - { - return $this->store()->get($key, $default); - } - - /** - * 写入缓存 - * @access public - * @param string $key 缓存变量名 - * @param mixed $value 存储数据 - * @param int|\DateTime $ttl 有效时间 0为永久 - * @return bool - */ - public function set($key, $value, $ttl = null): bool - { - return $this->store()->set($key, $value, $ttl); - } - - /** - * 删除缓存 - * @access public - * @param string $key 缓存变量名 - * @return bool - */ - public function delete($key): bool - { - return $this->store()->delete($key); - } - - /** - * 读取缓存 - * @access public - * @param iterable $keys 缓存变量名 - * @param mixed $default 默认值 - * @return iterable - * @throws InvalidArgumentException - */ - public function getMultiple($keys, $default = null): iterable - { - return $this->store()->getMultiple($keys, $default); - } - - /** - * 写入缓存 - * @access public - * @param iterable $values 缓存数据 - * @param null|int|\DateInterval $ttl 有效时间 0为永久 - * @return bool - */ - public function setMultiple($values, $ttl = null): bool - { - return $this->store()->setMultiple($values, $ttl); - } - - /** - * 删除缓存 - * @access public - * @param iterable $keys 缓存变量名 - * @return bool - * @throws InvalidArgumentException - */ - public function deleteMultiple($keys): bool - { - return $this->store()->deleteMultiple($keys); - } - - /** - * 判断缓存是否存在 - * @access public - * @param string $key 缓存变量名 - * @return bool - */ - public function has($key): bool - { - return $this->store()->has($key); - } - - /** - * 缓存标签 - * @access public - * @param string|array $name 标签名 - * @return TagSet - */ - public function tag($name): TagSet - { - return $this->store()->tag($name); - } -} diff --git a/vendor/topthink/framework/src/think/Config.php b/vendor/topthink/framework/src/think/Config.php deleted file mode 100644 index 9162e82..0000000 --- a/vendor/topthink/framework/src/think/Config.php +++ /dev/null @@ -1,197 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -/** - * 配置管理类 - * @package think - */ -class Config -{ - /** - * 配置参数 - * @var array - */ - protected $config = []; - - /** - * 配置文件目录 - * @var string - */ - protected $path; - - /** - * 配置文件后缀 - * @var string - */ - protected $ext; - - /** - * 构造方法 - * @access public - */ - public function __construct(string $path = null, string $ext = '.php') - { - $this->path = $path ?: ''; - $this->ext = $ext; - } - - public static function __make(App $app) - { - $path = $app->getConfigPath(); - $ext = $app->getConfigExt(); - - return new static($path, $ext); - } - - /** - * 加载配置文件(多种格式) - * @access public - * @param string $file 配置文件名 - * @param string $name 一级配置名 - * @return array - */ - public function load(string $file, string $name = ''): array - { - if (is_file($file)) { - $filename = $file; - } elseif (is_file($this->path . $file . $this->ext)) { - $filename = $this->path . $file . $this->ext; - } - - if (isset($filename)) { - return $this->parse($filename, $name); - } - - return $this->config; - } - - /** - * 解析配置文件 - * @access public - * @param string $file 配置文件名 - * @param string $name 一级配置名 - * @return array - */ - protected function parse(string $file, string $name): array - { - $type = pathinfo($file, PATHINFO_EXTENSION); - $config = []; - switch ($type) { - case 'php': - $config = include $file; - break; - case 'yml': - case 'yaml': - if (function_exists('yaml_parse_file')) { - $config = yaml_parse_file($file); - } - break; - case 'ini': - $config = parse_ini_file($file, true, INI_SCANNER_TYPED) ?: []; - break; - case 'json': - $config = json_decode(file_get_contents($file), true); - break; - } - - return is_array($config) ? $this->set($config, strtolower($name)) : []; - } - - /** - * 检测配置是否存在 - * @access public - * @param string $name 配置参数名(支持多级配置 .号分割) - * @return bool - */ - public function has(string $name): bool - { - if (false === strpos($name, '.') && !isset($this->config[strtolower($name)])) { - return false; - } - - return !is_null($this->get($name)); - } - - /** - * 获取一级配置 - * @access protected - * @param string $name 一级配置名 - * @return array - */ - protected function pull(string $name): array - { - $name = strtolower($name); - - return $this->config[$name] ?? []; - } - - /** - * 获取配置参数 为空则获取所有配置 - * @access public - * @param string $name 配置参数名(支持多级配置 .号分割) - * @param mixed $default 默认值 - * @return mixed - */ - public function get(string $name = null, $default = null) - { - // 无参数时获取所有 - if (empty($name)) { - return $this->config; - } - - if (false === strpos($name, '.')) { - return $this->pull($name); - } - - $name = explode('.', $name); - $name[0] = strtolower($name[0]); - $config = $this->config; - - // 按.拆分成多维数组进行判断 - foreach ($name as $val) { - if (isset($config[$val])) { - $config = $config[$val]; - } else { - return $default; - } - } - - return $config; - } - - /** - * 设置配置参数 name为数组则为批量设置 - * @access public - * @param array $config 配置参数 - * @param string $name 配置名 - * @return array - */ - public function set(array $config, string $name = null): array - { - if (!empty($name)) { - if (isset($this->config[$name])) { - $result = array_merge($this->config[$name], $config); - } else { - $result = $config; - } - - $this->config[$name] = $result; - } else { - $result = $this->config = array_merge($this->config, array_change_key_case($config)); - } - - return $result; - } - -} diff --git a/vendor/topthink/framework/src/think/Console.php b/vendor/topthink/framework/src/think/Console.php deleted file mode 100644 index 27f12ba..0000000 --- a/vendor/topthink/framework/src/think/Console.php +++ /dev/null @@ -1,786 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | TopThink [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2015 http://www.topthink.com All rights reserved. -// +---------------------------------------------------------------------- -// | Author: zhangyajun <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use Closure; -use InvalidArgumentException; -use LogicException; -use think\console\Command; -use think\console\command\Clear; -use think\console\command\Help; -use think\console\command\Help as HelpCommand; -use think\console\command\Lists; -use think\console\command\make\Command as MakeCommand; -use think\console\command\make\Controller; -use think\console\command\make\Event; -use think\console\command\make\Listener; -use think\console\command\make\Middleware; -use think\console\command\make\Model; -use think\console\command\make\Service; -use think\console\command\make\Subscribe; -use think\console\command\make\Validate; -use think\console\command\optimize\Route; -use think\console\command\optimize\Schema; -use think\console\command\RouteList; -use think\console\command\RunServer; -use think\console\command\ServiceDiscover; -use think\console\command\VendorPublish; -use think\console\command\Version; -use think\console\Input; -use think\console\input\Argument as InputArgument; -use think\console\input\Definition as InputDefinition; -use think\console\input\Option as InputOption; -use think\console\Output; -use think\console\output\driver\Buffer; - -/** - * 控制台应用管理类 - */ -class Console -{ - - protected $app; - - /** @var Command[] */ - protected $commands = []; - - protected $wantHelps = false; - - protected $catchExceptions = true; - protected $autoExit = true; - protected $definition; - protected $defaultCommand = 'list'; - - protected $defaultCommands = [ - 'help' => Help::class, - 'list' => Lists::class, - 'clear' => Clear::class, - 'make:command' => MakeCommand::class, - 'make:controller' => Controller::class, - 'make:model' => Model::class, - 'make:middleware' => Middleware::class, - 'make:validate' => Validate::class, - 'make:event' => Event::class, - 'make:listener' => Listener::class, - 'make:service' => Service::class, - 'make:subscribe' => Subscribe::class, - 'optimize:route' => Route::class, - 'optimize:schema' => Schema::class, - 'run' => RunServer::class, - 'version' => Version::class, - 'route:list' => RouteList::class, - 'service:discover' => ServiceDiscover::class, - 'vendor:publish' => VendorPublish::class, - ]; - - /** - * 启动器 - * @var array - */ - protected static $startCallbacks = []; - - public function __construct(App $app) - { - $this->app = $app; - - $this->initialize(); - - $this->definition = $this->getDefaultInputDefinition(); - - //加载指令 - $this->loadCommands(); - - $this->start(); - } - - /** - * 初始化 - */ - protected function initialize() - { - if (!$this->app->initialized()) { - $this->app->initialize(); - } - $this->makeRequest(); - } - - /** - * 构造request - */ - protected function makeRequest() - { - $url = $this->app->config->get('app.url', 'http://localhost'); - - $components = parse_url($url); - - $server = $_SERVER; - - if (isset($components['path'])) { - $server = array_merge($server, [ - 'SCRIPT_FILENAME' => $components['path'], - 'SCRIPT_NAME' => $components['path'], - 'REQUEST_URI' => $components['path'], - ]); - } - - if (isset($components['host'])) { - $server['SERVER_NAME'] = $components['host']; - $server['HTTP_HOST'] = $components['host']; - } - - if (isset($components['scheme'])) { - if ('https' === $components['scheme']) { - $server['HTTPS'] = 'on'; - $server['SERVER_PORT'] = 443; - } else { - unset($server['HTTPS']); - $server['SERVER_PORT'] = 80; - } - } - - if (isset($components['port'])) { - $server['SERVER_PORT'] = $components['port']; - $server['HTTP_HOST'] .= ':' . $components['port']; - } - - /** @var Request $request */ - $request = $this->app->make('request'); - - $request->withServer($server); - } - - /** - * 添加初始化器 - * @param Closure $callback - */ - public static function starting(Closure $callback): void - { - static::$startCallbacks[] = $callback; - } - - /** - * 清空启动器 - */ - public static function flushStartCallbacks(): void - { - static::$startCallbacks = []; - } - - /** - * 设置执行用户 - * @param $user - */ - public static function setUser(string $user): void - { - if (extension_loaded('posix')) { - $user = posix_getpwnam($user); - - if (!empty($user)) { - posix_setgid($user['gid']); - posix_setuid($user['uid']); - } - } - } - - /** - * 启动 - */ - protected function start(): void - { - foreach (static::$startCallbacks as $callback) { - $callback($this); - } - } - - /** - * 加载指令 - * @access protected - */ - protected function loadCommands(): void - { - $commands = $this->app->config->get('console.commands', []); - $commands = array_merge($this->defaultCommands, $commands); - - $this->addCommands($commands); - } - - /** - * @access public - * @param string $command - * @param array $parameters - * @param string $driver - * @return Output|Buffer - */ - public function call(string $command, array $parameters = [], string $driver = 'buffer') - { - array_unshift($parameters, $command); - - $input = new Input($parameters); - $output = new Output($driver); - - $this->setCatchExceptions(false); - $this->find($command)->run($input, $output); - - return $output; - } - - /** - * 执行当前的指令 - * @access public - * @return int - * @throws \Exception - * @api - */ - public function run() - { - $input = new Input(); - $output = new Output(); - - $this->configureIO($input, $output); - - try { - $exitCode = $this->doRun($input, $output); - } catch (\Exception $e) { - if (!$this->catchExceptions) { - throw $e; - } - - $output->renderException($e); - - $exitCode = $e->getCode(); - if (is_numeric($exitCode)) { - $exitCode = (int) $exitCode; - if (0 === $exitCode) { - $exitCode = 1; - } - } else { - $exitCode = 1; - } - } - - if ($this->autoExit) { - if ($exitCode > 255) { - $exitCode = 255; - } - - exit($exitCode); - } - - return $exitCode; - } - - /** - * 执行指令 - * @access public - * @param Input $input - * @param Output $output - * @return int - */ - public function doRun(Input $input, Output $output) - { - if (true === $input->hasParameterOption(['--version', '-V'])) { - $output->writeln($this->getLongVersion()); - - return 0; - } - - $name = $this->getCommandName($input); - - if (true === $input->hasParameterOption(['--help', '-h'])) { - if (!$name) { - $name = 'help'; - $input = new Input(['help']); - } else { - $this->wantHelps = true; - } - } - - if (!$name) { - $name = $this->defaultCommand; - $input = new Input([$this->defaultCommand]); - } - - $command = $this->find($name); - - return $this->doRunCommand($command, $input, $output); - } - - /** - * 设置输入参数定义 - * @access public - * @param InputDefinition $definition - */ - public function setDefinition(InputDefinition $definition): void - { - $this->definition = $definition; - } - - /** - * 获取输入参数定义 - * @access public - * @return InputDefinition The InputDefinition instance - */ - public function getDefinition(): InputDefinition - { - return $this->definition; - } - - /** - * Gets the help message. - * @access public - * @return string A help message. - */ - public function getHelp(): string - { - return $this->getLongVersion(); - } - - /** - * 是否捕获异常 - * @access public - * @param bool $boolean - * @api - */ - public function setCatchExceptions(bool $boolean): void - { - $this->catchExceptions = $boolean; - } - - /** - * 是否自动退出 - * @access public - * @param bool $boolean - * @api - */ - public function setAutoExit(bool $boolean): void - { - $this->autoExit = $boolean; - } - - /** - * 获取完整的版本号 - * @access public - * @return string - */ - public function getLongVersion(): string - { - if ($this->app->version()) { - return sprintf('version <comment>%s</comment>', $this->app->version()); - } - - return '<info>Console Tool</info>'; - } - - /** - * 添加指令集 - * @access public - * @param array $commands - */ - public function addCommands(array $commands): void - { - foreach ($commands as $key => $command) { - if (is_subclass_of($command, Command::class)) { - // 注册指令 - $this->addCommand($command, is_numeric($key) ? '' : $key); - } - } - } - - /** - * 添加一个指令 - * @access public - * @param string|Command $command 指令对象或者指令类名 - * @param string $name 指令名 留空则自动获取 - * @return Command|void - */ - public function addCommand($command, string $name = '') - { - if ($name) { - $this->commands[$name] = $command; - return; - } - - if (is_string($command)) { - $command = $this->app->invokeClass($command); - } - - $command->setConsole($this); - - if (!$command->isEnabled()) { - $command->setConsole(null); - return; - } - - $command->setApp($this->app); - - if (null === $command->getDefinition()) { - throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command))); - } - - $this->commands[$command->getName()] = $command; - - foreach ($command->getAliases() as $alias) { - $this->commands[$alias] = $command; - } - - return $command; - } - - /** - * 获取指令 - * @access public - * @param string $name 指令名称 - * @return Command - * @throws InvalidArgumentException - */ - public function getCommand(string $name): Command - { - if (!isset($this->commands[$name])) { - throw new InvalidArgumentException(sprintf('The command "%s" does not exist.', $name)); - } - - $command = $this->commands[$name]; - - if (is_string($command)) { - $command = $this->app->invokeClass($command); - /** @var Command $command */ - $command->setConsole($this); - $command->setApp($this->app); - } - - if ($this->wantHelps) { - $this->wantHelps = false; - - /** @var HelpCommand $helpCommand */ - $helpCommand = $this->getCommand('help'); - $helpCommand->setCommand($command); - - return $helpCommand; - } - - return $command; - } - - /** - * 某个指令是否存在 - * @access public - * @param string $name 指令名称 - * @return bool - */ - public function hasCommand(string $name): bool - { - return isset($this->commands[$name]); - } - - /** - * 获取所有的命名空间 - * @access public - * @return array - */ - public function getNamespaces(): array - { - $namespaces = []; - foreach ($this->commands as $key => $command) { - if (is_string($command)) { - $namespaces = array_merge($namespaces, $this->extractAllNamespaces($key)); - } else { - $namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName())); - - foreach ($command->getAliases() as $alias) { - $namespaces = array_merge($namespaces, $this->extractAllNamespaces($alias)); - } - } - } - - return array_values(array_unique(array_filter($namespaces))); - } - - /** - * 查找注册命名空间中的名称或缩写。 - * @access public - * @param string $namespace - * @return string - * @throws InvalidArgumentException - */ - public function findNamespace(string $namespace): string - { - $allNamespaces = $this->getNamespaces(); - $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { - return preg_quote($matches[1]) . '[^:]*'; - }, $namespace); - $namespaces = preg_grep('{^' . $expr . '}', $allNamespaces); - - if (empty($namespaces)) { - $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); - - if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) { - if (1 == count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - - $message .= implode("\n ", $alternatives); - } - - throw new InvalidArgumentException($message); - } - - $exact = in_array($namespace, $namespaces, true); - if (count($namespaces) > 1 && !$exact) { - throw new InvalidArgumentException(sprintf('The namespace "%s" is ambiguous (%s).', $namespace, $this->getAbbreviationSuggestions(array_values($namespaces)))); - } - - return $exact ? $namespace : reset($namespaces); - } - - /** - * 查找指令 - * @access public - * @param string $name 名称或者别名 - * @return Command - * @throws InvalidArgumentException - */ - public function find(string $name): Command - { - $allCommands = array_keys($this->commands); - - $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { - return preg_quote($matches[1]) . '[^:]*'; - }, $name); - - $commands = preg_grep('{^' . $expr . '}', $allCommands); - - if (empty($commands) || count(preg_grep('{^' . $expr . '$}', $commands)) < 1) { - if (false !== $pos = strrpos($name, ':')) { - $this->findNamespace(substr($name, 0, $pos)); - } - - $message = sprintf('Command "%s" is not defined.', $name); - - if ($alternatives = $this->findAlternatives($name, $allCommands)) { - if (1 == count($alternatives)) { - $message .= "\n\nDid you mean this?\n "; - } else { - $message .= "\n\nDid you mean one of these?\n "; - } - $message .= implode("\n ", $alternatives); - } - - throw new InvalidArgumentException($message); - } - - $exact = in_array($name, $commands, true); - if (count($commands) > 1 && !$exact) { - $suggestions = $this->getAbbreviationSuggestions(array_values($commands)); - - throw new InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $name, $suggestions)); - } - - return $this->getCommand($exact ? $name : reset($commands)); - } - - /** - * 获取所有的指令 - * @access public - * @param string $namespace 命名空间 - * @return Command[] - * @api - */ - public function all(string $namespace = null): array - { - if (null === $namespace) { - return $this->commands; - } - - $commands = []; - foreach ($this->commands as $name => $command) { - if ($this->extractNamespace($name, substr_count($namespace, ':') + 1) === $namespace) { - $commands[$name] = $command; - } - } - - return $commands; - } - - /** - * 配置基于用户的参数和选项的输入和输出实例。 - * @access protected - * @param Input $input 输入实例 - * @param Output $output 输出实例 - */ - protected function configureIO(Input $input, Output $output): void - { - if (true === $input->hasParameterOption(['--ansi'])) { - $output->setDecorated(true); - } elseif (true === $input->hasParameterOption(['--no-ansi'])) { - $output->setDecorated(false); - } - - if (true === $input->hasParameterOption(['--no-interaction', '-n'])) { - $input->setInteractive(false); - } - - if (true === $input->hasParameterOption(['--quiet', '-q'])) { - $output->setVerbosity(Output::VERBOSITY_QUIET); - } elseif ($input->hasParameterOption('-vvv') || $input->hasParameterOption('--verbose=3') || $input->getParameterOption('--verbose') === 3) { - $output->setVerbosity(Output::VERBOSITY_DEBUG); - } elseif ($input->hasParameterOption('-vv') || $input->hasParameterOption('--verbose=2') || $input->getParameterOption('--verbose') === 2) { - $output->setVerbosity(Output::VERBOSITY_VERY_VERBOSE); - } elseif ($input->hasParameterOption('-v') || $input->hasParameterOption('--verbose=1') || $input->hasParameterOption('--verbose') || $input->getParameterOption('--verbose')) { - $output->setVerbosity(Output::VERBOSITY_VERBOSE); - } - } - - /** - * 执行指令 - * @access protected - * @param Command $command 指令实例 - * @param Input $input 输入实例 - * @param Output $output 输出实例 - * @return int - * @throws \Exception - */ - protected function doRunCommand(Command $command, Input $input, Output $output) - { - return $command->run($input, $output); - } - - /** - * 获取指令的基础名称 - * @access protected - * @param Input $input - * @return string - */ - protected function getCommandName(Input $input): string - { - return $input->getFirstArgument() ?: ''; - } - - /** - * 获取默认输入定义 - * @access protected - * @return InputDefinition - */ - protected function getDefaultInputDefinition(): InputDefinition - { - return new InputDefinition([ - new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), - new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), - new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this console version'), - new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), - new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), - new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), - new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), - new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), - ]); - } - - /** - * 获取可能的建议 - * @access private - * @param array $abbrevs - * @return string - */ - private function getAbbreviationSuggestions(array $abbrevs): string - { - return sprintf('%s, %s%s', $abbrevs[0], $abbrevs[1], count($abbrevs) > 2 ? sprintf(' and %d more', count($abbrevs) - 2) : ''); - } - - /** - * 返回命名空间部分 - * @access public - * @param string $name 指令 - * @param int $limit 部分的命名空间的最大数量 - * @return string - */ - public function extractNamespace(string $name, int $limit = 0): string - { - $parts = explode(':', $name); - array_pop($parts); - - return implode(':', 0 === $limit ? $parts : array_slice($parts, 0, $limit)); - } - - /** - * 查找可替代的建议 - * @access private - * @param string $name - * @param array|\Traversable $collection - * @return array - */ - private function findAlternatives(string $name, $collection): array - { - $threshold = 1e3; - $alternatives = []; - - $collectionParts = []; - foreach ($collection as $item) { - $collectionParts[$item] = explode(':', $item); - } - - foreach (explode(':', $name) as $i => $subname) { - foreach ($collectionParts as $collectionName => $parts) { - $exists = isset($alternatives[$collectionName]); - if (!isset($parts[$i]) && $exists) { - $alternatives[$collectionName] += $threshold; - continue; - } elseif (!isset($parts[$i])) { - continue; - } - - $lev = levenshtein($subname, $parts[$i]); - if ($lev <= strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) { - $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev; - } elseif ($exists) { - $alternatives[$collectionName] += $threshold; - } - } - } - - foreach ($collection as $item) { - $lev = levenshtein($name, $item); - if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) { - $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; - } - } - - $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { - return $lev < 2 * $threshold; - }); - asort($alternatives); - - return array_keys($alternatives); - } - - /** - * 返回所有的命名空间 - * @access private - * @param string $name - * @return array - */ - private function extractAllNamespaces(string $name): array - { - $parts = explode(':', $name, -1); - $namespaces = []; - - foreach ($parts as $part) { - if (count($namespaces)) { - $namespaces[] = end($namespaces) . ':' . $part; - } else { - $namespaces[] = $part; - } - } - - return $namespaces; - } - -} diff --git a/vendor/topthink/framework/src/think/Container.php b/vendor/topthink/framework/src/think/Container.php deleted file mode 100644 index f286c73..0000000 --- a/vendor/topthink/framework/src/think/Container.php +++ /dev/null @@ -1,561 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use ArrayAccess; -use ArrayIterator; -use Closure; -use Countable; -use InvalidArgumentException; -use IteratorAggregate; -use Psr\Container\ContainerInterface; -use ReflectionClass; -use ReflectionException; -use ReflectionFunction; -use ReflectionFunctionAbstract; -use ReflectionMethod; -use think\exception\ClassNotFoundException; -use think\exception\FuncNotFoundException; -use think\helper\Str; -use Traversable; - -/** - * 容器管理类 支持PSR-11 - */ -class Container implements ContainerInterface, ArrayAccess, IteratorAggregate, Countable -{ - /** - * 容器对象实例 - * @var Container|Closure - */ - protected static $instance; - - /** - * 容器中的对象实例 - * @var array - */ - protected $instances = []; - - /** - * 容器绑定标识 - * @var array - */ - protected $bind = []; - - /** - * 容器回调 - * @var array - */ - protected $invokeCallback = []; - - /** - * 获取当前容器的实例(单例) - * @access public - * @return static - */ - public static function getInstance() - { - if (is_null(static::$instance)) { - static::$instance = new static; - } - - if (static::$instance instanceof Closure) { - return (static::$instance)(); - } - - return static::$instance; - } - - /** - * 设置当前容器的实例 - * @access public - * @param object|Closure $instance - * @return void - */ - public static function setInstance($instance): void - { - static::$instance = $instance; - } - - /** - * 注册一个容器对象回调 - * - * @param string|Closure $abstract - * @param Closure|null $callback - * @return void - */ - public function resolving($abstract, Closure $callback = null): void - { - if ($abstract instanceof Closure) { - $this->invokeCallback['*'][] = $abstract; - return; - } - - $abstract = $this->getAlias($abstract); - - $this->invokeCallback[$abstract][] = $callback; - } - - /** - * 获取容器中的对象实例 不存在则创建 - * @template T - * @param string|class-string<T> $abstract 类名或者标识 - * @param array $vars 变量 - * @param bool $newInstance 是否每次创建新的实例 - * @return T|object - */ - public static function pull(string $abstract, array $vars = [], bool $newInstance = false) - { - return static::getInstance()->make($abstract, $vars, $newInstance); - } - - /** - * 获取容器中的对象实例 - * @template T - * @param string|class-string<T> $abstract 类名或者标识 - * @return T|object - */ - public function get($abstract) - { - if ($this->has($abstract)) { - return $this->make($abstract); - } - - throw new ClassNotFoundException('class not exists: ' . $abstract, $abstract); - } - - /** - * 绑定一个类、闭包、实例、接口实现到容器 - * @access public - * @param string|array $abstract 类标识、接口 - * @param mixed $concrete 要绑定的类、闭包或者实例 - * @return $this - */ - public function bind($abstract, $concrete = null) - { - if (is_array($abstract)) { - foreach ($abstract as $key => $val) { - $this->bind($key, $val); - } - } elseif ($concrete instanceof Closure) { - $this->bind[$abstract] = $concrete; - } elseif (is_object($concrete)) { - $this->instance($abstract, $concrete); - } else { - $abstract = $this->getAlias($abstract); - if ($abstract != $concrete) { - $this->bind[$abstract] = $concrete; - } - } - - return $this; - } - - /** - * 根据别名获取真实类名 - * @param string $abstract - * @return string - */ - public function getAlias(string $abstract): string - { - if (isset($this->bind[$abstract])) { - $bind = $this->bind[$abstract]; - - if (is_string($bind)) { - return $this->getAlias($bind); - } - } - - return $abstract; - } - - /** - * 绑定一个类实例到容器 - * @access public - * @param string $abstract 类名或者标识 - * @param object $instance 类的实例 - * @return $this - */ - public function instance(string $abstract, $instance) - { - $abstract = $this->getAlias($abstract); - - $this->instances[$abstract] = $instance; - - return $this; - } - - /** - * 判断容器中是否存在类及标识 - * @access public - * @param string $abstract 类名或者标识 - * @return bool - */ - public function bound(string $abstract): bool - { - return isset($this->bind[$abstract]) || isset($this->instances[$abstract]); - } - - /** - * 判断容器中是否存在类及标识 - * @access public - * @param string $name 类名或者标识 - * @return bool - */ - public function has($name): bool - { - return $this->bound($name); - } - - /** - * 判断容器中是否存在对象实例 - * @access public - * @param string $abstract 类名或者标识 - * @return bool - */ - public function exists(string $abstract): bool - { - $abstract = $this->getAlias($abstract); - - return isset($this->instances[$abstract]); - } - - /** - * 创建类的实例 已经存在则直接获取 - * @template T - * @param string|class-string<T> $abstract 类名或者标识 - * @param array $vars 变量 - * @param bool $newInstance 是否每次创建新的实例 - * @return T|object - */ - public function make(string $abstract, array $vars = [], bool $newInstance = false) - { - $abstract = $this->getAlias($abstract); - - if (isset($this->instances[$abstract]) && !$newInstance) { - return $this->instances[$abstract]; - } - - if (isset($this->bind[$abstract]) && $this->bind[$abstract] instanceof Closure) { - $object = $this->invokeFunction($this->bind[$abstract], $vars); - } else { - $object = $this->invokeClass($abstract, $vars); - } - - if (!$newInstance) { - $this->instances[$abstract] = $object; - } - - return $object; - } - - /** - * 删除容器中的对象实例 - * @access public - * @param string $name 类名或者标识 - * @return void - */ - public function delete($name) - { - $name = $this->getAlias($name); - - if (isset($this->instances[$name])) { - unset($this->instances[$name]); - } - } - - /** - * 执行函数或者闭包方法 支持参数调用 - * @access public - * @param string|Closure $function 函数或者闭包 - * @param array $vars 参数 - * @return mixed - */ - public function invokeFunction($function, array $vars = []) - { - try { - $reflect = new ReflectionFunction($function); - } catch (ReflectionException $e) { - throw new FuncNotFoundException("function not exists: {$function}()", $function, $e); - } - - $args = $this->bindParams($reflect, $vars); - - return $function(...$args); - } - - /** - * 调用反射执行类的方法 支持参数绑定 - * @access public - * @param mixed $method 方法 - * @param array $vars 参数 - * @param bool $accessible 设置是否可访问 - * @return mixed - */ - public function invokeMethod($method, array $vars = [], bool $accessible = false) - { - if (is_array($method)) { - [$class, $method] = $method; - - $class = is_object($class) ? $class : $this->invokeClass($class); - } else { - // 静态方法 - [$class, $method] = explode('::', $method); - } - - try { - $reflect = new ReflectionMethod($class, $method); - } catch (ReflectionException $e) { - $class = is_object($class) ? get_class($class) : $class; - throw new FuncNotFoundException('method not exists: ' . $class . '::' . $method . '()', "{$class}::{$method}", $e); - } - - $args = $this->bindParams($reflect, $vars); - - if ($accessible) { - $reflect->setAccessible($accessible); - } - - return $reflect->invokeArgs(is_object($class) ? $class : null, $args); - } - - /** - * 调用反射执行类的方法 支持参数绑定 - * @access public - * @param object $instance 对象实例 - * @param mixed $reflect 反射类 - * @param array $vars 参数 - * @return mixed - */ - public function invokeReflectMethod($instance, $reflect, array $vars = []) - { - $args = $this->bindParams($reflect, $vars); - - return $reflect->invokeArgs($instance, $args); - } - - /** - * 调用反射执行callable 支持参数绑定 - * @access public - * @param mixed $callable - * @param array $vars 参数 - * @param bool $accessible 设置是否可访问 - * @return mixed - */ - public function invoke($callable, array $vars = [], bool $accessible = false) - { - if ($callable instanceof Closure) { - return $this->invokeFunction($callable, $vars); - } elseif (is_string($callable) && false === strpos($callable, '::')) { - return $this->invokeFunction($callable, $vars); - } else { - return $this->invokeMethod($callable, $vars, $accessible); - } - } - - /** - * 调用反射执行类的实例化 支持依赖注入 - * @access public - * @param string $class 类名 - * @param array $vars 参数 - * @return mixed - */ - public function invokeClass(string $class, array $vars = []) - { - try { - $reflect = new ReflectionClass($class); - } catch (ReflectionException $e) { - throw new ClassNotFoundException('class not exists: ' . $class, $class, $e); - } - - if ($reflect->hasMethod('__make')) { - $method = $reflect->getMethod('__make'); - if ($method->isPublic() && $method->isStatic()) { - $args = $this->bindParams($method, $vars); - $object = $method->invokeArgs(null, $args); - $this->invokeAfter($class, $object); - return $object; - } - } - - $constructor = $reflect->getConstructor(); - - $args = $constructor ? $this->bindParams($constructor, $vars) : []; - - $object = $reflect->newInstanceArgs($args); - - $this->invokeAfter($class, $object); - - return $object; - } - - /** - * 执行invokeClass回调 - * @access protected - * @param string $class 对象类名 - * @param object $object 容器对象实例 - * @return void - */ - protected function invokeAfter(string $class, $object): void - { - if (isset($this->invokeCallback['*'])) { - foreach ($this->invokeCallback['*'] as $callback) { - $callback($object, $this); - } - } - - if (isset($this->invokeCallback[$class])) { - foreach ($this->invokeCallback[$class] as $callback) { - $callback($object, $this); - } - } - } - - /** - * 绑定参数 - * @access protected - * @param ReflectionFunctionAbstract $reflect 反射类 - * @param array $vars 参数 - * @return array - */ - protected function bindParams(ReflectionFunctionAbstract $reflect, array $vars = []): array - { - if ($reflect->getNumberOfParameters() == 0) { - return []; - } - - // 判断数组类型 数字数组时按顺序绑定参数 - reset($vars); - $type = key($vars) === 0 ? 1 : 0; - $params = $reflect->getParameters(); - $args = []; - - foreach ($params as $param) { - $name = $param->getName(); - $lowerName = Str::snake($name); - $reflectionType = $param->getType(); - - if ($param->isVariadic()) { - return array_merge($args, array_values($vars)); - } elseif ($reflectionType && $reflectionType instanceof \ReflectionNamedType && $reflectionType->isBuiltin() === false) { - $args[] = $this->getObjectParam($reflectionType->getName(), $vars); - } elseif (1 == $type && !empty($vars)) { - $args[] = array_shift($vars); - } elseif (0 == $type && array_key_exists($name, $vars)) { - $args[] = $vars[$name]; - } elseif (0 == $type && array_key_exists($lowerName, $vars)) { - $args[] = $vars[$lowerName]; - } elseif ($param->isDefaultValueAvailable()) { - $args[] = $param->getDefaultValue(); - } else { - throw new InvalidArgumentException('method param miss:' . $name); - } - } - - return $args; - } - - /** - * 创建工厂对象实例 - * @param string $name 工厂类名 - * @param string $namespace 默认命名空间 - * @param array $args - * @return mixed - * @deprecated - * @access public - */ - public static function factory(string $name, string $namespace = '', ...$args) - { - $class = false !== strpos($name, '\\') ? $name : $namespace . ucwords($name); - - return Container::getInstance()->invokeClass($class, $args); - } - - /** - * 获取对象类型的参数值 - * @access protected - * @param string $className 类名 - * @param array $vars 参数 - * @return mixed - */ - protected function getObjectParam(string $className, array &$vars) - { - $array = $vars; - $value = array_shift($array); - - if ($value instanceof $className) { - $result = $value; - array_shift($vars); - } else { - $result = $this->make($className); - } - - return $result; - } - - public function __set($name, $value) - { - $this->bind($name, $value); - } - - public function __get($name) - { - return $this->get($name); - } - - public function __isset($name): bool - { - return $this->exists($name); - } - - public function __unset($name) - { - $this->delete($name); - } - - #[\ReturnTypeWillChange] - public function offsetExists($key): bool - { - return $this->exists($key); - } - - #[\ReturnTypeWillChange] - public function offsetGet($key) - { - return $this->make($key); - } - - #[\ReturnTypeWillChange] - public function offsetSet($key, $value) - { - $this->bind($key, $value); - } - - #[\ReturnTypeWillChange] - public function offsetUnset($key) - { - $this->delete($key); - } - - //Countable - public function count(): int - { - return count($this->instances); - } - - //IteratorAggregate - public function getIterator(): Traversable - { - return new ArrayIterator($this->instances); - } -} diff --git a/vendor/topthink/framework/src/think/Cookie.php b/vendor/topthink/framework/src/think/Cookie.php deleted file mode 100644 index 04774a6..0000000 --- a/vendor/topthink/framework/src/think/Cookie.php +++ /dev/null @@ -1,232 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use DateTimeInterface; - -/** - * Cookie管理类 - * @package think - */ -class Cookie -{ - /** - * 配置参数 - * @var array - */ - protected $config = [ - // cookie 保存时间 - 'expire' => 0, - // cookie 保存路径 - 'path' => '/', - // cookie 有效域名 - 'domain' => '', - // cookie 启用安全传输 - 'secure' => false, - // httponly设置 - 'httponly' => false, - // samesite 设置,支持 'strict' 'lax' - 'samesite' => '', - ]; - - /** - * Cookie写入数据 - * @var array - */ - protected $cookie = []; - - /** - * 当前Request对象 - * @var Request - */ - protected $request; - - /** - * 构造方法 - * @access public - */ - public function __construct(Request $request, array $config = []) - { - $this->request = $request; - $this->config = array_merge($this->config, array_change_key_case($config)); - } - - public static function __make(Request $request, Config $config) - { - return new static($request, $config->get('cookie')); - } - - /** - * 获取cookie - * @access public - * @param mixed $name 数据名称 - * @param string $default 默认值 - * @return mixed - */ - public function get(string $name = '', $default = null) - { - return $this->request->cookie($name, $default); - } - - /** - * 是否存在Cookie参数 - * @access public - * @param string $name 变量名 - * @return bool - */ - public function has(string $name): bool - { - return $this->request->has($name, 'cookie'); - } - - /** - * Cookie 设置 - * - * @access public - * @param string $name cookie名称 - * @param string $value cookie值 - * @param mixed $option 可选参数 - * @return void - */ - public function set(string $name, string $value, $option = null): void - { - // 参数设置(会覆盖黙认设置) - if (!is_null($option)) { - if (is_numeric($option) || $option instanceof DateTimeInterface) { - $option = ['expire' => $option]; - } - - $config = array_merge($this->config, array_change_key_case($option)); - } else { - $config = $this->config; - } - - if ($config['expire'] instanceof DateTimeInterface) { - $expire = $config['expire']->getTimestamp(); - } else { - $expire = !empty($config['expire']) ? time() + intval($config['expire']) : 0; - } - - $this->setCookie($name, $value, $expire, $config); - } - - /** - * Cookie 保存 - * - * @access public - * @param string $name cookie名称 - * @param string $value cookie值 - * @param int $expire 有效期 - * @param array $option 可选参数 - * @return void - */ - protected function setCookie(string $name, string $value, int $expire, array $option = []): void - { - $this->cookie[$name] = [$value, $expire, $option]; - } - - /** - * 永久保存Cookie数据 - * @access public - * @param string $name cookie名称 - * @param string $value cookie值 - * @param mixed $option 可选参数 可能会是 null|integer|string - * @return void - */ - public function forever(string $name, string $value = '', $option = null): void - { - if (is_null($option) || is_numeric($option)) { - $option = []; - } - - $option['expire'] = 315360000; - - $this->set($name, $value, $option); - } - - /** - * Cookie删除 - * @access public - * @param string $name cookie名称 - * @param array $options cookie参数 - * @return void - */ - public function delete(string $name, array $options = []): void - { - $config = array_merge($this->config, array_change_key_case($options)); - $this->setCookie($name, '', time() - 3600, $config); - } - - /** - * 获取cookie保存数据 - * @access public - * @return array - */ - public function getCookie(): array - { - return $this->cookie; - } - - /** - * 保存Cookie - * @access public - * @return void - */ - public function save(): void - { - foreach ($this->cookie as $name => $val) { - [$value, $expire, $option] = $val; - - $this->saveCookie( - $name, - $value, - $expire, - $option['path'], - $option['domain'], - $option['secure'] ? true : false, - $option['httponly'] ? true : false, - $option['samesite'] - ); - } - } - - /** - * 保存Cookie - * @access public - * @param string $name cookie名称 - * @param string $value cookie值 - * @param int $expire cookie过期时间 - * @param string $path 有效的服务器路径 - * @param string $domain 有效域名/子域名 - * @param bool $secure 是否仅仅通过HTTPS - * @param bool $httponly 仅可通过HTTP访问 - * @param string $samesite 防止CSRF攻击和用户追踪 - * @return void - */ - protected function saveCookie(string $name, string $value, int $expire, string $path, string $domain, bool $secure, bool $httponly, string $samesite): void - { - if (version_compare(PHP_VERSION, '7.3.0', '>=')) { - setcookie($name, $value, [ - 'expires' => $expire, - 'path' => $path, - 'domain' => $domain, - 'secure' => $secure, - 'httponly' => $httponly, - 'samesite' => $samesite, - ]); - } else { - setcookie($name, $value, $expire, $path, $domain, $secure, $httponly); - } - } - -} diff --git a/vendor/topthink/framework/src/think/Db.php b/vendor/topthink/framework/src/think/Db.php deleted file mode 100644 index 0048874..0000000 --- a/vendor/topthink/framework/src/think/Db.php +++ /dev/null @@ -1,117 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -/** - * 数据库管理类 - * @package think - * @property Config $config - */ -class Db extends DbManager -{ - /** - * @param Event $event - * @param Config $config - * @param Log $log - * @param Cache $cache - * @return Db - * @codeCoverageIgnore - */ - public static function __make(Event $event, Config $config, Log $log, Cache $cache) - { - $db = new static(); - $db->setConfig($config); - $db->setEvent($event); - $db->setLog($log); - - $store = $db->getConfig('cache_store'); - $db->setCache($cache->store($store)); - $db->triggerSql(); - - return $db; - } - - /** - * 注入模型对象 - * @access public - * @return void - */ - protected function modelMaker() - { - } - - /** - * 设置配置对象 - * @access public - * @param Config $config 配置对象 - * @return void - */ - public function setConfig($config): void - { - $this->config = $config; - } - - /** - * 获取配置参数 - * @access public - * @param string $name 配置参数 - * @param mixed $default 默认值 - * @return mixed - */ - public function getConfig(string $name = '', $default = null) - { - if ('' !== $name) { - return $this->config->get('database.' . $name, $default); - } - - return $this->config->get('database', []); - } - - /** - * 设置Event对象 - * @param Event $event - */ - public function setEvent(Event $event): void - { - $this->event = $event; - } - - /** - * 注册回调方法 - * @access public - * @param string $event 事件名 - * @param callable $callback 回调方法 - * @return void - */ - public function event(string $event, callable $callback): void - { - if ($this->event) { - $this->event->listen('db.' . $event, $callback); - } - } - - /** - * 触发事件 - * @access public - * @param string $event 事件名 - * @param mixed $params 传入参数 - * @param bool $once - * @return mixed - */ - public function trigger(string $event, $params = null, bool $once = false) - { - if ($this->event) { - return $this->event->trigger('db.' . $event, $params, $once); - } - } -} diff --git a/vendor/topthink/framework/src/think/Env.php b/vendor/topthink/framework/src/think/Env.php deleted file mode 100644 index 9e1b7f4..0000000 --- a/vendor/topthink/framework/src/think/Env.php +++ /dev/null @@ -1,201 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use ArrayAccess; - -/** - * Env管理类 - * @package think - */ -class Env implements ArrayAccess -{ - /** - * 环境变量数据 - * @var array - */ - protected $data = []; - - /** - * 数据转换映射 - * @var array - */ - protected $convert = [ - 'true' => true, - 'false' => false, - 'off' => false, - 'on' => true, - ]; - - public function __construct() - { - $this->data = $_ENV; - } - - /** - * 读取环境变量定义文件 - * @access public - * @param string $file 环境变量定义文件 - * @return void - */ - public function load(string $file): void - { - $env = parse_ini_file($file, true, INI_SCANNER_RAW) ?: []; - $this->set($env); - } - - /** - * 获取环境变量值 - * @access public - * @param string $name 环境变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function get(string $name = null, $default = null) - { - if (is_null($name)) { - return $this->data; - } - - $name = strtoupper(str_replace('.', '_', $name)); - if (isset($this->data[$name])) { - $result = $this->data[$name]; - - if (is_string($result) && isset($this->convert[$result])) { - return $this->convert[$result]; - } - - return $result; - } - - return $this->getEnv($name, $default); - } - - protected function getEnv(string $name, $default = null) - { - $result = getenv('PHP_' . $name); - - if (false === $result) { - return $default; - } - - if ('false' === $result) { - $result = false; - } elseif ('true' === $result) { - $result = true; - } - - if (!isset($this->data[$name])) { - $this->data[$name] = $result; - } - - return $result; - } - - /** - * 设置环境变量值 - * @access public - * @param string|array $env 环境变量 - * @param mixed $value 值 - * @return void - */ - public function set($env, $value = null): void - { - if (is_array($env)) { - $env = array_change_key_case($env, CASE_UPPER); - - foreach ($env as $key => $val) { - if (is_array($val)) { - foreach ($val as $k => $v) { - $this->data[$key . '_' . strtoupper($k)] = $v; - } - } else { - $this->data[$key] = $val; - } - } - } else { - $name = strtoupper(str_replace('.', '_', $env)); - - $this->data[$name] = $value; - } - } - - /** - * 检测是否存在环境变量 - * @access public - * @param string $name 参数名 - * @return bool - */ - public function has(string $name): bool - { - return !is_null($this->get($name)); - } - - /** - * 设置环境变量 - * @access public - * @param string $name 参数名 - * @param mixed $value 值 - */ - public function __set(string $name, $value): void - { - $this->set($name, $value); - } - - /** - * 获取环境变量 - * @access public - * @param string $name 参数名 - * @return mixed - */ - public function __get(string $name) - { - return $this->get($name); - } - - /** - * 检测是否存在环境变量 - * @access public - * @param string $name 参数名 - * @return bool - */ - public function __isset(string $name): bool - { - return $this->has($name); - } - - // ArrayAccess - #[\ReturnTypeWillChange] - public function offsetSet($name, $value): void - { - $this->set($name, $value); - } - - #[\ReturnTypeWillChange] - public function offsetExists($name): bool - { - return $this->__isset($name); - } - - #[\ReturnTypeWillChange] - public function offsetUnset($name): void - { - throw new Exception('not support: unset'); - } - - #[\ReturnTypeWillChange] - public function offsetGet($name) - { - return $this->get($name); - } -} diff --git a/vendor/topthink/framework/src/think/Event.php b/vendor/topthink/framework/src/think/Event.php deleted file mode 100644 index 3c70aad..0000000 --- a/vendor/topthink/framework/src/think/Event.php +++ /dev/null @@ -1,272 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use ReflectionClass; -use ReflectionMethod; - -/** - * 事件管理类 - * @package think - */ -class Event -{ - /** - * 监听者 - * @var array - */ - protected $listener = []; - - /** - * 事件别名 - * @var array - */ - protected $bind = [ - 'AppInit' => event\AppInit::class, - 'HttpRun' => event\HttpRun::class, - 'HttpEnd' => event\HttpEnd::class, - 'RouteLoaded' => event\RouteLoaded::class, - 'LogWrite' => event\LogWrite::class, - 'LogRecord' => event\LogRecord::class, - ]; - - /** - * 应用对象 - * @var App - */ - protected $app; - - public function __construct(App $app) - { - $this->app = $app; - } - - /** - * 批量注册事件监听 - * @access public - * @param array $events 事件定义 - * @return $this - */ - public function listenEvents(array $events) - { - foreach ($events as $event => $listeners) { - if (isset($this->bind[$event])) { - $event = $this->bind[$event]; - } - - $this->listener[$event] = array_merge($this->listener[$event] ?? [], $listeners); - } - - return $this; - } - - /** - * 注册事件监听 - * @access public - * @param string $event 事件名称 - * @param mixed $listener 监听操作(或者类名) - * @param bool $first 是否优先执行 - * @return $this - */ - public function listen(string $event, $listener, bool $first = false) - { - if (isset($this->bind[$event])) { - $event = $this->bind[$event]; - } - - if ($first && isset($this->listener[$event])) { - array_unshift($this->listener[$event], $listener); - } else { - $this->listener[$event][] = $listener; - } - - return $this; - } - - /** - * 是否存在事件监听 - * @access public - * @param string $event 事件名称 - * @return bool - */ - public function hasListener(string $event): bool - { - if (isset($this->bind[$event])) { - $event = $this->bind[$event]; - } - - return isset($this->listener[$event]); - } - - /** - * 移除事件监听 - * @access public - * @param string $event 事件名称 - * @return void - */ - public function remove(string $event): void - { - if (isset($this->bind[$event])) { - $event = $this->bind[$event]; - } - - unset($this->listener[$event]); - } - - /** - * 指定事件别名标识 便于调用 - * @access public - * @param array $events 事件别名 - * @return $this - */ - public function bind(array $events) - { - $this->bind = array_merge($this->bind, $events); - - return $this; - } - - /** - * 注册事件订阅者 - * @access public - * @param mixed $subscriber 订阅者 - * @return $this - */ - public function subscribe($subscriber) - { - $subscribers = (array) $subscriber; - - foreach ($subscribers as $subscriber) { - if (is_string($subscriber)) { - $subscriber = $this->app->make($subscriber); - } - - if (method_exists($subscriber, 'subscribe')) { - // 手动订阅 - $subscriber->subscribe($this); - } else { - // 智能订阅 - $this->observe($subscriber); - } - } - - return $this; - } - - /** - * 自动注册事件观察者 - * @access public - * @param string|object $observer 观察者 - * @param null|string $prefix 事件名前缀 - * @return $this - */ - public function observe($observer, string $prefix = '') - { - if (is_string($observer)) { - $observer = $this->app->make($observer); - } - - $reflect = new ReflectionClass($observer); - $methods = $reflect->getMethods(ReflectionMethod::IS_PUBLIC); - - if (empty($prefix) && $reflect->hasProperty('eventPrefix')) { - $reflectProperty = $reflect->getProperty('eventPrefix'); - $reflectProperty->setAccessible(true); - $prefix = $reflectProperty->getValue($observer); - } - - foreach ($methods as $method) { - $name = $method->getName(); - if (0 === strpos($name, 'on')) { - $this->listen($prefix . substr($name, 2), [$observer, $name]); - } - } - - return $this; - } - - /** - * 触发事件 - * @access public - * @param string|object $event 事件名称 - * @param mixed $params 传入参数 - * @param bool $once 只获取一个有效返回值 - * @return mixed - */ - public function trigger($event, $params = null, bool $once = false) - { - if (is_object($event)) { - $params = $event; - $event = get_class($event); - } - - if (isset($this->bind[$event])) { - $event = $this->bind[$event]; - } - - $result = []; - $listeners = $this->listener[$event] ?? []; - - if (strpos($event, '.')) { - [$prefix, $event] = explode('.', $event, 2); - if (isset($this->listener[$prefix . '.*'])) { - $listeners = array_merge($listeners, $this->listener[$prefix . '.*']); - } - } - - $listeners = array_unique($listeners, SORT_REGULAR); - - foreach ($listeners as $key => $listener) { - $result[$key] = $this->dispatch($listener, $params); - - if (false === $result[$key] || (!is_null($result[$key]) && $once)) { - break; - } - } - - return $once ? end($result) : $result; - } - - /** - * 触发事件(只获取一个有效返回值) - * @param $event - * @param null $params - * @return mixed - */ - public function until($event, $params = null) - { - return $this->trigger($event, $params, true); - } - - /** - * 执行事件调度 - * @access protected - * @param mixed $event 事件方法 - * @param mixed $params 参数 - * @return mixed - */ - protected function dispatch($event, $params = null) - { - if (!is_string($event)) { - $call = $event; - } elseif (strpos($event, '::')) { - $call = $event; - } else { - $obj = $this->app->make($event); - $call = [$obj, 'handle']; - } - - return $this->app->invoke($call, [$params]); - } - -} diff --git a/vendor/topthink/framework/src/think/Exception.php b/vendor/topthink/framework/src/think/Exception.php deleted file mode 100644 index 5cf7954..0000000 --- a/vendor/topthink/framework/src/think/Exception.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -/** - * 异常基础类 - * @package think - */ -class Exception extends \Exception -{ - /** - * 保存异常页面显示的额外Debug数据 - * @var array - */ - protected $data = []; - - /** - * 设置异常额外的Debug数据 - * 数据将会显示为下面的格式 - * - * Exception Data - * -------------------------------------------------- - * Label 1 - * key1 value1 - * key2 value2 - * Label 2 - * key1 value1 - * key2 value2 - * - * @access protected - * @param string $label 数据分类,用于异常页面显示 - * @param array $data 需要显示的数据,必须为关联数组 - */ - final protected function setData(string $label, array $data) - { - $this->data[$label] = $data; - } - - /** - * 获取异常额外Debug数据 - * 主要用于输出到异常页面便于调试 - * @access public - * @return array 由setData设置的Debug数据 - */ - final public function getData() - { - return $this->data; - } - -} diff --git a/vendor/topthink/framework/src/think/Facade.php b/vendor/topthink/framework/src/think/Facade.php deleted file mode 100644 index 9a0e333..0000000 --- a/vendor/topthink/framework/src/think/Facade.php +++ /dev/null @@ -1,98 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -namespace think; - -/** - * Facade管理类 - */ -class Facade -{ - /** - * 始终创建新的对象实例 - * @var bool - */ - protected static $alwaysNewInstance; - - /** - * 创建Facade实例 - * @static - * @access protected - * @param string $class 类名或标识 - * @param array $args 变量 - * @param bool $newInstance 是否每次创建新的实例 - * @return object - */ - protected static function createFacade(string $class = '', array $args = [], bool $newInstance = false) - { - $class = $class ?: static::class; - - $facadeClass = static::getFacadeClass(); - - if ($facadeClass) { - $class = $facadeClass; - } - - if (static::$alwaysNewInstance) { - $newInstance = true; - } - - return Container::getInstance()->make($class, $args, $newInstance); - } - - /** - * 获取当前Facade对应类名 - * @access protected - * @return string - */ - protected static function getFacadeClass() - {} - - /** - * 带参数实例化当前Facade类 - * @access public - * @return object - */ - public static function instance(...$args) - { - if (__CLASS__ != static::class) { - return self::createFacade('', $args); - } - } - - /** - * 调用类的实例 - * @access public - * @param string $class 类名或者标识 - * @param array|true $args 变量 - * @param bool $newInstance 是否每次创建新的实例 - * @return object - */ - public static function make(string $class, $args = [], $newInstance = false) - { - if (__CLASS__ != static::class) { - return self::__callStatic('make', func_get_args()); - } - - if (true === $args) { - // 总是创建新的实例化对象 - $newInstance = true; - $args = []; - } - - return self::createFacade($class, $args, $newInstance); - } - - // 调用实际类的方法 - public static function __callStatic($method, $params) - { - return call_user_func_array([static::createFacade(), $method], $params); - } -} diff --git a/vendor/topthink/framework/src/think/File.php b/vendor/topthink/framework/src/think/File.php deleted file mode 100644 index 59230b5..0000000 --- a/vendor/topthink/framework/src/think/File.php +++ /dev/null @@ -1,204 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use SplFileInfo; -use think\exception\FileException; - -/** - * 文件上传类 - * @package think - */ -class File extends SplFileInfo -{ - - /** - * 文件hash规则 - * @var array - */ - protected $hash = []; - - protected $hashName; - - /** - * 保存的文件后缀 - * @var string - */ - protected $extension; - - public function __construct(string $path, bool $checkPath = true) - { - if ($checkPath && !is_file($path)) { - throw new FileException(sprintf('The file "%s" does not exist', $path)); - } - - parent::__construct($path); - } - - /** - * 获取文件的哈希散列值 - * @access public - * @param string $type - * @return string - */ - public function hash(string $type = 'sha1'): string - { - if (!isset($this->hash[$type])) { - $this->hash[$type] = hash_file($type, $this->getPathname()); - } - - return $this->hash[$type]; - } - - /** - * 获取文件的MD5值 - * @access public - * @return string - */ - public function md5(): string - { - return $this->hash('md5'); - } - - /** - * 获取文件的SHA1值 - * @access public - * @return string - */ - public function sha1(): string - { - return $this->hash('sha1'); - } - - /** - * 获取文件类型信息 - * @access public - * @return string - */ - public function getMime(): string - { - $finfo = finfo_open(FILEINFO_MIME_TYPE); - - return finfo_file($finfo, $this->getPathname()); - } - - /** - * 移动文件 - * @access public - * @param string $directory 保存路径 - * @param string|null $name 保存的文件名 - * @return File - */ - public function move(string $directory, string $name = null): File - { - $target = $this->getTargetFile($directory, $name); - - set_error_handler(function ($type, $msg) use (&$error) { - $error = $msg; - }); - $renamed = rename($this->getPathname(), (string) $target); - restore_error_handler(); - if (!$renamed) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error))); - } - - @chmod((string) $target, 0666 & ~umask()); - - return $target; - } - - /** - * 实例化一个新文件 - * @param string $directory - * @param null|string $name - * @return File - */ - protected function getTargetFile(string $directory, string $name = null): File - { - if (!is_dir($directory)) { - if (false === @mkdir($directory, 0777, true) && !is_dir($directory)) { - throw new FileException(sprintf('Unable to create the "%s" directory', $directory)); - } - } elseif (!is_writable($directory)) { - throw new FileException(sprintf('Unable to write in the "%s" directory', $directory)); - } - - $target = rtrim($directory, '/\\') . \DIRECTORY_SEPARATOR . (null === $name ? $this->getBasename() : $this->getName($name)); - - return new self($target, false); - } - - /** - * 获取文件名 - * @param string $name - * @return string - */ - protected function getName(string $name): string - { - $originalName = str_replace('\\', '/', $name); - $pos = strrpos($originalName, '/'); - $originalName = false === $pos ? $originalName : substr($originalName, $pos + 1); - - return $originalName; - } - - /** - * 文件扩展名 - * @return string - */ - public function extension(): string - { - return $this->getExtension(); - } - - /** - * 指定保存文件的扩展名 - * @param string $extension - * @return void - */ - public function setExtension(string $extension): void - { - $this->extension = $extension; - } - - /** - * 自动生成文件名 - * @access public - * @param string|\Closure $rule - * @return string - */ - public function hashName($rule = ''): string - { - if (!$this->hashName) { - if ($rule instanceof \Closure) { - $this->hashName = call_user_func_array($rule, [$this]); - } else { - switch (true) { - case in_array($rule, hash_algos()): - $hash = $this->hash($rule); - $this->hashName = substr($hash, 0, 2) . DIRECTORY_SEPARATOR . substr($hash, 2); - break; - case is_callable($rule): - $this->hashName = call_user_func($rule); - break; - default: - $this->hashName = date('Ymd') . DIRECTORY_SEPARATOR . md5(microtime(true) . $this->getPathname()); - break; - } - } - } - - $extension = $this->extension ?? $this->extension(); - return $this->hashName . ($extension ? '.' . $extension : ''); - } -} diff --git a/vendor/topthink/framework/src/think/Http.php b/vendor/topthink/framework/src/think/Http.php deleted file mode 100644 index 4e49c88..0000000 --- a/vendor/topthink/framework/src/think/Http.php +++ /dev/null @@ -1,288 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use think\event\HttpEnd; -use think\event\HttpRun; -use think\event\RouteLoaded; -use think\exception\Handle; -use Throwable; - -/** - * Web应用管理类 - * @package think - */ -class Http -{ - - /** - * @var App - */ - protected $app; - - /** - * 应用名称 - * @var string - */ - protected $name; - - /** - * 应用路径 - * @var string - */ - protected $path; - - /** - * 路由路径 - * @var string - */ - protected $routePath; - - /** - * 是否绑定应用 - * @var bool - */ - protected $isBind = false; - - public function __construct(App $app) - { - $this->app = $app; - - $this->routePath = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR; - } - - /** - * 设置应用名称 - * @access public - * @param string $name 应用名称 - * @return $this - */ - public function name(string $name) - { - $this->name = $name; - return $this; - } - - /** - * 获取应用名称 - * @access public - * @return string - */ - public function getName(): string - { - return $this->name ?: ''; - } - - /** - * 设置应用目录 - * @access public - * @param string $path 应用目录 - * @return $this - */ - public function path(string $path) - { - if (substr($path, -1) != DIRECTORY_SEPARATOR) { - $path .= DIRECTORY_SEPARATOR; - } - - $this->path = $path; - return $this; - } - - /** - * 获取应用路径 - * @access public - * @return string - */ - public function getPath(): string - { - return $this->path ?: ''; - } - - /** - * 获取路由目录 - * @access public - * @return string - */ - public function getRoutePath(): string - { - return $this->routePath; - } - - /** - * 设置路由目录 - * @access public - * @param string $path 路由定义目录 - */ - public function setRoutePath(string $path): void - { - $this->routePath = $path; - } - - /** - * 设置应用绑定 - * @access public - * @param bool $bind 是否绑定 - * @return $this - */ - public function setBind(bool $bind = true) - { - $this->isBind = $bind; - return $this; - } - - /** - * 是否绑定应用 - * @access public - * @return bool - */ - public function isBind(): bool - { - return $this->isBind; - } - - /** - * 执行应用程序 - * @access public - * @param Request|null $request - * @return Response - */ - public function run(Request $request = null): Response - { - //初始化 - $this->initialize(); - - //自动创建request对象 - $request = $request ?? $this->app->make('request', [], true); - $this->app->instance('request', $request); - - try { - $response = $this->runWithRequest($request); - } catch (Throwable $e) { - $this->reportException($e); - - $response = $this->renderException($request, $e); - } - - return $response; - } - - /** - * 初始化 - */ - protected function initialize() - { - if (!$this->app->initialized()) { - $this->app->initialize(); - } - } - - /** - * 执行应用程序 - * @param Request $request - * @return mixed - */ - protected function runWithRequest(Request $request) - { - // 加载全局中间件 - $this->loadMiddleware(); - - // 监听HttpRun - $this->app->event->trigger(HttpRun::class); - - return $this->app->middleware->pipeline() - ->send($request) - ->then(function ($request) { - return $this->dispatchToRoute($request); - }); - } - - protected function dispatchToRoute($request) - { - $withRoute = $this->app->config->get('app.with_route', true) ? function () { - $this->loadRoutes(); - } : null; - - return $this->app->route->dispatch($request, $withRoute); - } - - /** - * 加载全局中间件 - */ - protected function loadMiddleware(): void - { - if (is_file($this->app->getBasePath() . 'middleware.php')) { - $this->app->middleware->import(include $this->app->getBasePath() . 'middleware.php'); - } - } - - /** - * 加载路由 - * @access protected - * @return void - */ - protected function loadRoutes(): void - { - // 加载路由定义 - $routePath = $this->getRoutePath(); - - if (is_dir($routePath)) { - $files = glob($routePath . '*.php'); - foreach ($files as $file) { - include $file; - } - } - - $this->app->event->trigger(RouteLoaded::class); - } - - /** - * Report the exception to the exception handler. - * - * @param Throwable $e - * @return void - */ - protected function reportException(Throwable $e) - { - $this->app->make(Handle::class)->report($e); - } - - /** - * Render the exception to a response. - * - * @param Request $request - * @param Throwable $e - * @return Response - */ - protected function renderException($request, Throwable $e) - { - return $this->app->make(Handle::class)->render($request, $e); - } - - /** - * HttpEnd - * @param Response $response - * @return void - */ - public function end(Response $response): void - { - $this->app->event->trigger(HttpEnd::class, $response); - - //执行中间件 - $this->app->middleware->end($response); - - // 写入日志 - $this->app->log->save(); - } - -} diff --git a/vendor/topthink/framework/src/think/Lang.php b/vendor/topthink/framework/src/think/Lang.php deleted file mode 100644 index b891084..0000000 --- a/vendor/topthink/framework/src/think/Lang.php +++ /dev/null @@ -1,290 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -/** - * 多语言管理类 - * @package think - */ -class Lang -{ - protected $app; - - /** - * 配置参数 - * @var array - */ - protected $config = [ - // 默认语言 - 'default_lang' => 'zh-cn', - // 允许的语言列表 - 'allow_lang_list' => [], - // 是否使用Cookie记录 - 'use_cookie' => true, - // 扩展语言包 - 'extend_list' => [], - // 多语言cookie变量 - 'cookie_var' => 'think_lang', - // 多语言header变量 - 'header_var' => 'think-lang', - // 多语言自动侦测变量名 - 'detect_var' => 'lang', - // Accept-Language转义为对应语言包名称 - 'accept_language' => [ - 'zh-hans-cn' => 'zh-cn', - ], - // 是否支持语言分组 - 'allow_group' => false, - ]; - - /** - * 多语言信息 - * @var array - */ - private $lang = []; - - /** - * 当前语言 - * @var string - */ - private $range = 'zh-cn'; - - /** - * 构造方法 - * @access public - * @param array $config - */ - public function __construct(App $app, array $config = []) - { - $this->config = array_merge($this->config, array_change_key_case($config)); - $this->range = $this->config['default_lang']; - $this->app = $app; - } - - public static function __make(App $app, Config $config) - { - return new static($app, $config->get('lang')); - } - - /** - * 获取当前语言配置 - * @access public - * @return array - */ - public function getConfig(): array - { - return $this->config; - } - - /** - * 设置当前语言 - * @access public - * @param string $lang 语言 - * @return void - */ - public function setLangSet(string $lang): void - { - $this->range = $lang; - } - - /** - * 获取当前语言 - * @access public - * @return string - */ - public function getLangSet(): string - { - return $this->range; - } - - /** - * 获取默认语言 - * @access public - * @return string - */ - public function defaultLangSet() - { - return $this->config['default_lang']; - } - - /** - * 切换语言 - * @access public - * @param string $langset 语言 - * @return void - */ - public function switchLangSet(string $langset) - { - if (empty($langset)) { - return; - } - - $this->setLangSet($langset); - - // 加载系统语言包 - $this->load([ - $this->app->getThinkPath() . 'lang' . DIRECTORY_SEPARATOR . $langset . '.php', - ]); - - // 加载系统语言包 - $files = glob($this->app->getAppPath() . 'lang' . DIRECTORY_SEPARATOR . $langset . '.*'); - $this->load($files); - - // 加载扩展(自定义)语言包 - $list = $this->app->config->get('lang.extend_list', []); - - if (isset($list[$langset])) { - $this->load($list[$langset]); - } - } - - /** - * 加载语言定义(不区分大小写) - * @access public - * @param string|array $file 语言文件 - * @param string $range 语言作用域 - * @return array - */ - public function load($file, $range = ''): array - { - $range = $range ?: $this->range; - if (!isset($this->lang[$range])) { - $this->lang[$range] = []; - } - - $lang = []; - - foreach ((array) $file as $name) { - if (is_file($name)) { - $result = $this->parse($name); - $lang = array_change_key_case($result) + $lang; - } - } - - if (!empty($lang)) { - $this->lang[$range] = $lang + $this->lang[$range]; - } - - return $this->lang[$range]; - } - - /** - * 解析语言文件 - * @access protected - * @param string $file 语言文件名 - * @return array - */ - protected function parse(string $file): array - { - $type = pathinfo($file, PATHINFO_EXTENSION); - - switch ($type) { - case 'php': - $result = include $file; - break; - case 'yml': - case 'yaml': - if (function_exists('yaml_parse_file')) { - $result = yaml_parse_file($file); - } - break; - case 'json': - $data = file_get_contents($file); - - if (false !== $data) { - $data = json_decode($data, true); - - if (json_last_error() === JSON_ERROR_NONE) { - $result = $data; - } - } - - break; - } - - return isset($result) && is_array($result) ? $result : []; - } - - /** - * 判断是否存在语言定义(不区分大小写) - * @access public - * @param string|null $name 语言变量 - * @param string $range 语言作用域 - * @return bool - */ - public function has(string $name, string $range = ''): bool - { - $range = $range ?: $this->range; - - if ($this->config['allow_group'] && strpos($name, '.')) { - [$name1, $name2] = explode('.', $name, 2); - return isset($this->lang[$range][strtolower($name1)][$name2]); - } - - return isset($this->lang[$range][strtolower($name)]); - } - - /** - * 获取语言定义(不区分大小写) - * @access public - * @param string|null $name 语言变量 - * @param array $vars 变量替换 - * @param string $range 语言作用域 - * @return mixed - */ - public function get(string $name = null, array $vars = [], string $range = '') - { - $range = $range ?: $this->range; - - if (!isset($this->lang[$range])) { - $this->switchLangSet($range); - } - - // 空参数返回所有定义 - if (is_null($name)) { - return $this->lang[$range] ?? []; - } - - if ($this->config['allow_group'] && strpos($name, '.')) { - [$name1, $name2] = explode('.', $name, 2); - - $value = $this->lang[$range][strtolower($name1)][$name2] ?? $name; - } else { - $value = $this->lang[$range][strtolower($name)] ?? $name; - } - - // 变量解析 - if (!empty($vars) && is_array($vars)) { - /** - * Notes: - * 为了检测的方便,数字索引的判断仅仅是参数数组的第一个元素的key为数字0 - * 数字索引采用的是系统的 sprintf 函数替换,用法请参考 sprintf 函数 - */ - if (key($vars) === 0) { - // 数字索引解析 - array_unshift($vars, $value); - $value = call_user_func_array('sprintf', $vars); - } else { - // 关联索引解析 - $replace = array_keys($vars); - foreach ($replace as &$v) { - $v = "{:{$v}}"; - } - $value = str_replace($replace, $vars, $value); - } - } - - return $value; - } - -} diff --git a/vendor/topthink/framework/src/think/Log.php b/vendor/topthink/framework/src/think/Log.php deleted file mode 100644 index c31210c..0000000 --- a/vendor/topthink/framework/src/think/Log.php +++ /dev/null @@ -1,342 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use InvalidArgumentException; -use Psr\Log\LoggerInterface; -use think\event\LogWrite; -use think\helper\Arr; -use think\log\Channel; -use think\log\ChannelSet; - -/** - * 日志管理类 - * @package think - * @mixin Channel - */ -class Log extends Manager implements LoggerInterface -{ - const EMERGENCY = 'emergency'; - const ALERT = 'alert'; - const CRITICAL = 'critical'; - const ERROR = 'error'; - const WARNING = 'warning'; - const NOTICE = 'notice'; - const INFO = 'info'; - const DEBUG = 'debug'; - const SQL = 'sql'; - - protected $namespace = '\\think\\log\\driver\\'; - - /** - * 默认驱动 - * @return string|null - */ - public function getDefaultDriver() - { - return $this->getConfig('default'); - } - - /** - * 获取日志配置 - * @access public - * @param null|string $name 名称 - * @param mixed $default 默认值 - * @return mixed - */ - public function getConfig(string $name = null, $default = null) - { - if (!is_null($name)) { - return $this->app->config->get('log.' . $name, $default); - } - - return $this->app->config->get('log'); - } - - /** - * 获取渠道配置 - * @param string $channel - * @param null $name - * @param null $default - * @return array - */ - public function getChannelConfig($channel, $name = null, $default = null) - { - if ($config = $this->getConfig("channels.{$channel}")) { - return Arr::get($config, $name, $default); - } - - throw new InvalidArgumentException("Channel [$channel] not found."); - } - - /** - * driver()的别名 - * @param string|array $name 渠道名 - * @return Channel|ChannelSet - */ - public function channel($name = null) - { - if (is_array($name)) { - return new ChannelSet($this, $name); - } - - return $this->driver($name); - } - - protected function resolveType(string $name) - { - return $this->getChannelConfig($name, 'type', 'file'); - } - - public function createDriver(string $name) - { - $driver = parent::createDriver($name); - - $lazy = !$this->getChannelConfig($name, "realtime_write", false) && !$this->app->runningInConsole(); - $allow = array_merge($this->getConfig("level", []), $this->getChannelConfig($name, "level", [])); - - return new Channel($name, $driver, $allow, $lazy, $this->app->event); - } - - protected function resolveConfig(string $name) - { - return $this->getChannelConfig($name); - } - - /** - * 清空日志信息 - * @access public - * @param string|array $channel 日志通道名 - * @return $this - */ - public function clear($channel = '*') - { - if ('*' == $channel) { - $channel = array_keys($this->drivers); - } - - $this->channel($channel)->clear(); - - return $this; - } - - /** - * 关闭本次请求日志写入 - * @access public - * @param string|array $channel 日志通道名 - * @return $this - */ - public function close($channel = '*') - { - if ('*' == $channel) { - $channel = array_keys($this->drivers); - } - - $this->channel($channel)->close(); - - return $this; - } - - /** - * 获取日志信息 - * @access public - * @param string $channel 日志通道名 - * @return array - */ - public function getLog(string $channel = null): array - { - return $this->channel($channel)->getLog(); - } - - /** - * 保存日志信息 - * @access public - * @return bool - */ - public function save(): bool - { - /** @var Channel $channel */ - foreach ($this->drivers as $channel) { - $channel->save(); - } - - return true; - } - - /** - * 记录日志信息 - * @access public - * @param mixed $msg 日志信息 - * @param string $type 日志级别 - * @param array $context 替换内容 - * @param bool $lazy - * @return $this - */ - public function record($msg, string $type = 'info', array $context = [], bool $lazy = true) - { - $channel = $this->getConfig('type_channel.' . $type); - - $this->channel($channel)->record($msg, $type, $context, $lazy); - - return $this; - } - - /** - * 实时写入日志信息 - * @access public - * @param mixed $msg 调试信息 - * @param string $type 日志级别 - * @param array $context 替换内容 - * @return $this - */ - public function write($msg, string $type = 'info', array $context = []) - { - return $this->record($msg, $type, $context, false); - } - - /** - * 注册日志写入事件监听 - * @param $listener - * @return Event - */ - public function listen($listener) - { - return $this->app->event->listen(LogWrite::class, $listener); - } - - /** - * 记录日志信息 - * @access public - * @param string $level 日志级别 - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function log($level, $message, array $context = []): void - { - $this->record($message, $level, $context); - } - - /** - * 记录emergency信息 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function emergency($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * 记录警报信息 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function alert($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * 记录紧急情况 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function critical($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * 记录错误信息 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function error($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * 记录warning信息 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function warning($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * 记录notice信息 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function notice($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * 记录一般信息 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function info($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * 记录调试信息 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function debug($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * 记录sql信息 - * @access public - * @param mixed $message 日志信息 - * @param array $context 替换内容 - * @return void - */ - public function sql($message, array $context = []): void - { - $this->log(__FUNCTION__, $message, $context); - } - - public function __call($method, $parameters) - { - $this->log($method, ...$parameters); - } -} diff --git a/vendor/topthink/framework/src/think/Manager.php b/vendor/topthink/framework/src/think/Manager.php deleted file mode 100644 index ca3f6a5..0000000 --- a/vendor/topthink/framework/src/think/Manager.php +++ /dev/null @@ -1,177 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use InvalidArgumentException; -use think\helper\Str; - -abstract class Manager -{ - /** @var App */ - protected $app; - - /** - * 驱动 - * @var array - */ - protected $drivers = []; - - /** - * 驱动的命名空间 - * @var string - */ - protected $namespace = null; - - public function __construct(App $app) - { - $this->app = $app; - } - - /** - * 获取驱动实例 - * @param null|string $name - * @return mixed - */ - protected function driver(string $name = null) - { - $name = $name ?: $this->getDefaultDriver(); - - if (is_null($name)) { - throw new InvalidArgumentException(sprintf( - 'Unable to resolve NULL driver for [%s].', - static::class - )); - } - - return $this->drivers[$name] = $this->getDriver($name); - } - - /** - * 获取驱动实例 - * @param string $name - * @return mixed - */ - protected function getDriver(string $name) - { - return $this->drivers[$name] ?? $this->createDriver($name); - } - - /** - * 获取驱动类型 - * @param string $name - * @return mixed - */ - protected function resolveType(string $name) - { - return $name; - } - - /** - * 获取驱动配置 - * @param string $name - * @return mixed - */ - protected function resolveConfig(string $name) - { - return $name; - } - - /** - * 获取驱动类 - * @param string $type - * @return string - */ - protected function resolveClass(string $type): string - { - if ($this->namespace || false !== strpos($type, '\\')) { - $class = false !== strpos($type, '\\') ? $type : $this->namespace . Str::studly($type); - - if (class_exists($class)) { - return $class; - } - } - - throw new InvalidArgumentException("Driver [$type] not supported."); - } - - /** - * 获取驱动参数 - * @param $name - * @return array - */ - protected function resolveParams($name): array - { - $config = $this->resolveConfig($name); - return [$config]; - } - - /** - * 创建驱动 - * - * @param string $name - * @return mixed - * - */ - protected function createDriver(string $name) - { - $type = $this->resolveType($name); - - $method = 'create' . Str::studly($type) . 'Driver'; - - $params = $this->resolveParams($name); - - if (method_exists($this, $method)) { - return $this->$method(...$params); - } - - $class = $this->resolveClass($type); - - return $this->app->invokeClass($class, $params); - } - - /** - * 移除一个驱动实例 - * - * @param array|string|null $name - * @return $this - */ - public function forgetDriver($name = null) - { - $name = $name ?? $this->getDefaultDriver(); - - foreach ((array) $name as $cacheName) { - if (isset($this->drivers[$cacheName])) { - unset($this->drivers[$cacheName]); - } - } - - return $this; - } - - /** - * 默认驱动 - * @return string|null - */ - abstract public function getDefaultDriver(); - - /** - * 动态调用 - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - return $this->driver()->$method(...$parameters); - } -} diff --git a/vendor/topthink/framework/src/think/Middleware.php b/vendor/topthink/framework/src/think/Middleware.php deleted file mode 100644 index a3db0f2..0000000 --- a/vendor/topthink/framework/src/think/Middleware.php +++ /dev/null @@ -1,257 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: Slince <taosikai@yeah.net> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use Closure; -use InvalidArgumentException; -use LogicException; -use think\exception\Handle; -use Throwable; - -/** - * 中间件管理类 - * @package think - */ -class Middleware -{ - /** - * 中间件执行队列 - * @var array - */ - protected $queue = []; - - /** - * 应用对象 - * @var App - */ - protected $app; - - public function __construct(App $app) - { - $this->app = $app; - } - - /** - * 导入中间件 - * @access public - * @param array $middlewares - * @param string $type 中间件类型 - * @return void - */ - public function import(array $middlewares = [], string $type = 'global'): void - { - foreach ($middlewares as $middleware) { - $this->add($middleware, $type); - } - } - - /** - * 注册中间件 - * @access public - * @param mixed $middleware - * @param string $type 中间件类型 - * @return void - */ - public function add($middleware, string $type = 'global'): void - { - $middleware = $this->buildMiddleware($middleware, $type); - - if (!empty($middleware)) { - $this->queue[$type][] = $middleware; - $this->queue[$type] = array_unique($this->queue[$type], SORT_REGULAR); - } - } - - /** - * 注册路由中间件 - * @access public - * @param mixed $middleware - * @return void - */ - public function route($middleware): void - { - $this->add($middleware, 'route'); - } - - /** - * 注册控制器中间件 - * @access public - * @param mixed $middleware - * @return void - */ - public function controller($middleware): void - { - $this->add($middleware, 'controller'); - } - - /** - * 注册中间件到开始位置 - * @access public - * @param mixed $middleware - * @param string $type 中间件类型 - */ - public function unshift($middleware, string $type = 'global') - { - $middleware = $this->buildMiddleware($middleware, $type); - - if (!empty($middleware)) { - if (!isset($this->queue[$type])) { - $this->queue[$type] = []; - } - - array_unshift($this->queue[$type], $middleware); - } - } - - /** - * 获取注册的中间件 - * @access public - * @param string $type 中间件类型 - * @return array - */ - public function all(string $type = 'global'): array - { - return $this->queue[$type] ?? []; - } - - /** - * 调度管道 - * @access public - * @param string $type 中间件类型 - * @return Pipeline - */ - public function pipeline(string $type = 'global') - { - return (new Pipeline()) - ->through(array_map(function ($middleware) { - return function ($request, $next) use ($middleware) { - [$call, $params] = $middleware; - if (is_array($call) && is_string($call[0])) { - $call = [$this->app->make($call[0]), $call[1]]; - } - $response = call_user_func($call, $request, $next, ...$params); - - if (!$response instanceof Response) { - throw new LogicException('The middleware must return Response instance'); - } - return $response; - }; - }, $this->sortMiddleware($this->queue[$type] ?? []))) - ->whenException([$this, 'handleException']); - } - - /** - * 结束调度 - * @param Response $response - */ - public function end(Response $response) - { - foreach ($this->queue as $queue) { - foreach ($queue as $middleware) { - [$call] = $middleware; - if (is_array($call) && is_string($call[0])) { - $instance = $this->app->make($call[0]); - if (method_exists($instance, 'end')) { - $instance->end($response); - } - } - } - } - } - - /** - * 异常处理 - * @param Request $passable - * @param Throwable $e - * @return Response - */ - public function handleException($passable, Throwable $e) - { - /** @var Handle $handler */ - $handler = $this->app->make(Handle::class); - - $handler->report($e); - - return $handler->render($passable, $e); - } - - /** - * 解析中间件 - * @access protected - * @param mixed $middleware - * @param string $type 中间件类型 - * @return array - */ - protected function buildMiddleware($middleware, string $type): array - { - if (is_array($middleware)) { - [$middleware, $params] = $middleware; - } - - if ($middleware instanceof Closure) { - return [$middleware, $params ?? []]; - } - - if (!is_string($middleware)) { - throw new InvalidArgumentException('The middleware is invalid'); - } - - //中间件别名检查 - $alias = $this->app->config->get('middleware.alias', []); - - if (isset($alias[$middleware])) { - $middleware = $alias[$middleware]; - } - - if (is_array($middleware)) { - $this->import($middleware, $type); - return []; - } - - return [[$middleware, 'handle'], $params ?? []]; - } - - /** - * 中间件排序 - * @param array $middlewares - * @return array - */ - protected function sortMiddleware(array $middlewares) - { - $priority = $this->app->config->get('middleware.priority', []); - uasort($middlewares, function ($a, $b) use ($priority) { - $aPriority = $this->getMiddlewarePriority($priority, $a); - $bPriority = $this->getMiddlewarePriority($priority, $b); - return $bPriority - $aPriority; - }); - - return $middlewares; - } - - /** - * 获取中间件优先级 - * @param $priority - * @param $middleware - * @return int - */ - protected function getMiddlewarePriority($priority, $middleware) - { - [$call] = $middleware; - if (is_array($call) && is_string($call[0])) { - $index = array_search($call[0], array_reverse($priority)); - return false === $index ? -1 : $index; - } - return -1; - } - -} diff --git a/vendor/topthink/framework/src/think/Pipeline.php b/vendor/topthink/framework/src/think/Pipeline.php deleted file mode 100644 index 77151f3..0000000 --- a/vendor/topthink/framework/src/think/Pipeline.php +++ /dev/null @@ -1,107 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think; - -use Closure; -use Exception; -use Throwable; - -class Pipeline -{ - protected $passable; - - protected $pipes = []; - - protected $exceptionHandler; - - /** - * 初始数据 - * @param $passable - * @return $this - */ - public function send($passable) - { - $this->passable = $passable; - return $this; - } - - /** - * 调用栈 - * @param $pipes - * @return $this - */ - public function through($pipes) - { - $this->pipes = is_array($pipes) ? $pipes : func_get_args(); - return $this; - } - - /** - * 执行 - * @param Closure $destination - * @return mixed - */ - public function then(Closure $destination) - { - $pipeline = array_reduce( - array_reverse($this->pipes), - $this->carry(), - function ($passable) use ($destination) { - try { - return $destination($passable); - } catch (Throwable | Exception $e) { - return $this->handleException($passable, $e); - } - } - ); - - return $pipeline($this->passable); - } - - /** - * 设置异常处理器 - * @param callable $handler - * @return $this - */ - public function whenException($handler) - { - $this->exceptionHandler = $handler; - return $this; - } - - protected function carry() - { - return function ($stack, $pipe) { - return function ($passable) use ($stack, $pipe) { - try { - return $pipe($passable, $stack); - } catch (Throwable | Exception $e) { - return $this->handleException($passable, $e); - } - }; - }; - } - - /** - * 异常处理 - * @param $passable - * @param $e - * @return mixed - */ - protected function handleException($passable, Throwable $e) - { - if ($this->exceptionHandler) { - return call_user_func($this->exceptionHandler, $passable, $e); - } - throw $e; - } - -} diff --git a/vendor/topthink/framework/src/think/Request.php b/vendor/topthink/framework/src/think/Request.php deleted file mode 100644 index 99f4f80..0000000 --- a/vendor/topthink/framework/src/think/Request.php +++ /dev/null @@ -1,2178 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use ArrayAccess; -use think\facade\Lang; -use think\file\UploadedFile; -use think\route\Rule; - -/** - * 请求管理类 - * @package think - */ -class Request implements ArrayAccess -{ - /** - * 兼容PATH_INFO获取 - * @var array - */ - protected $pathinfoFetch = ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL']; - - /** - * PATHINFO变量名 用于兼容模式 - * @var string - */ - protected $varPathinfo = 's'; - - /** - * 请求类型 - * @var string - */ - protected $varMethod = '_method'; - - /** - * 表单ajax伪装变量 - * @var string - */ - protected $varAjax = '_ajax'; - - /** - * 表单pjax伪装变量 - * @var string - */ - protected $varPjax = '_pjax'; - - /** - * 域名根 - * @var string - */ - protected $rootDomain = ''; - - /** - * HTTPS代理标识 - * @var string - */ - protected $httpsAgentName = ''; - - /** - * 前端代理服务器IP - * @var array - */ - protected $proxyServerIp = []; - - /** - * 前端代理服务器真实IP头 - * @var array - */ - protected $proxyServerIpHeader = ['HTTP_X_REAL_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_X_CLIENT_IP', 'HTTP_X_CLUSTER_CLIENT_IP']; - - /** - * 请求类型 - * @var string - */ - protected $method; - - /** - * 域名(含协议及端口) - * @var string - */ - protected $domain; - - /** - * HOST(含端口) - * @var string - */ - protected $host; - - /** - * 子域名 - * @var string - */ - protected $subDomain; - - /** - * 泛域名 - * @var string - */ - protected $panDomain; - - /** - * 当前URL地址 - * @var string - */ - protected $url; - - /** - * 基础URL - * @var string - */ - protected $baseUrl; - - /** - * 当前执行的文件 - * @var string - */ - protected $baseFile; - - /** - * 访问的ROOT地址 - * @var string - */ - protected $root; - - /** - * pathinfo - * @var string - */ - protected $pathinfo; - - /** - * pathinfo(不含后缀) - * @var string - */ - protected $path; - - /** - * 当前请求的IP地址 - * @var string - */ - protected $realIP; - - /** - * 当前控制器名 - * @var string - */ - protected $controller; - - /** - * 当前操作名 - * @var string - */ - protected $action; - - /** - * 当前请求参数 - * @var array - */ - protected $param = []; - - /** - * 当前GET参数 - * @var array - */ - protected $get = []; - - /** - * 当前POST参数 - * @var array - */ - protected $post = []; - - /** - * 当前REQUEST参数 - * @var array - */ - protected $request = []; - - /** - * 当前路由对象 - * @var Rule - */ - protected $rule; - - /** - * 当前ROUTE参数 - * @var array - */ - protected $route = []; - - /** - * 中间件传递的参数 - * @var array - */ - protected $middleware = []; - - /** - * 当前PUT参数 - * @var array - */ - protected $put; - - /** - * SESSION对象 - * @var Session - */ - protected $session; - - /** - * COOKIE数据 - * @var array - */ - protected $cookie = []; - - /** - * ENV对象 - * @var Env - */ - protected $env; - - /** - * 当前SERVER参数 - * @var array - */ - protected $server = []; - - /** - * 当前FILE参数 - * @var array - */ - protected $file = []; - - /** - * 当前HEADER参数 - * @var array - */ - protected $header = []; - - /** - * 资源类型定义 - * @var array - */ - protected $mimeType = [ - 'xml' => 'application/xml,text/xml,application/x-xml', - 'json' => 'application/json,text/x-json,application/jsonrequest,text/json', - 'js' => 'text/javascript,application/javascript,application/x-javascript', - 'css' => 'text/css', - 'rss' => 'application/rss+xml', - 'yaml' => 'application/x-yaml,text/yaml', - 'atom' => 'application/atom+xml', - 'pdf' => 'application/pdf', - 'text' => 'text/plain', - 'image' => 'image/png,image/jpg,image/jpeg,image/pjpeg,image/gif,image/webp,image/*', - 'csv' => 'text/csv', - 'html' => 'text/html,application/xhtml+xml,*/*', - ]; - - /** - * 当前请求内容 - * @var string - */ - protected $content; - - /** - * 全局过滤规则 - * @var array - */ - protected $filter; - - /** - * php://input内容 - * @var string - */ - // php://input - protected $input; - - /** - * 请求安全Key - * @var string - */ - protected $secureKey; - - /** - * 是否合并Param - * @var bool - */ - protected $mergeParam = false; - - /** - * 架构函数 - * @access public - */ - public function __construct() - { - // 保存 php://input - $this->input = file_get_contents('php://input'); - } - - public static function __make(App $app) - { - $request = new static(); - - if (function_exists('apache_request_headers') && $result = apache_request_headers()) { - $header = $result; - } else { - $header = []; - $server = $_SERVER; - foreach ($server as $key => $val) { - if (0 === strpos($key, 'HTTP_')) { - $key = str_replace('_', '-', strtolower(substr($key, 5))); - $header[$key] = $val; - } - } - if (isset($server['CONTENT_TYPE'])) { - $header['content-type'] = $server['CONTENT_TYPE']; - } - if (isset($server['CONTENT_LENGTH'])) { - $header['content-length'] = $server['CONTENT_LENGTH']; - } - } - - $request->header = array_change_key_case($header); - $request->server = $_SERVER; - $request->env = $app->env; - - $inputData = $request->getInputData($request->input); - - $request->get = $_GET; - $request->post = $_POST ?: $inputData; - $request->put = $inputData; - $request->request = $_REQUEST; - $request->cookie = $_COOKIE; - $request->file = $_FILES ?? []; - - return $request; - } - - /** - * 设置当前包含协议的域名 - * @access public - * @param string $domain 域名 - * @return $this - */ - public function setDomain(string $domain) - { - $this->domain = $domain; - return $this; - } - - /** - * 获取当前包含协议的域名 - * @access public - * @param bool $port 是否需要去除端口号 - * @return string - */ - public function domain(bool $port = false): string - { - return $this->scheme() . '://' . $this->host($port); - } - - /** - * 获取当前根域名 - * @access public - * @return string - */ - public function rootDomain(): string - { - $root = $this->rootDomain; - - if (!$root) { - $item = explode('.', $this->host()); - $count = count($item); - $root = $count > 1 ? $item[$count - 2] . '.' . $item[$count - 1] : $item[0]; - } - - return $root; - } - - /** - * 设置当前泛域名的值 - * @access public - * @param string $domain 域名 - * @return $this - */ - public function setSubDomain(string $domain) - { - $this->subDomain = $domain; - return $this; - } - - /** - * 获取当前子域名 - * @access public - * @return string - */ - public function subDomain(): string - { - if (is_null($this->subDomain)) { - // 获取当前主域名 - $rootDomain = $this->rootDomain(); - - if ($rootDomain) { - $sub = stristr($this->host(), $rootDomain, true); - $this->subDomain = $sub ? rtrim($sub, '.') : ''; - } else { - $this->subDomain = ''; - } - } - - return $this->subDomain; - } - - /** - * 设置当前泛域名的值 - * @access public - * @param string $domain 域名 - * @return $this - */ - public function setPanDomain(string $domain) - { - $this->panDomain = $domain; - return $this; - } - - /** - * 获取当前泛域名的值 - * @access public - * @return string - */ - public function panDomain(): string - { - return $this->panDomain ?: ''; - } - - /** - * 设置当前完整URL 包括QUERY_STRING - * @access public - * @param string $url URL地址 - * @return $this - */ - public function setUrl(string $url) - { - $this->url = $url; - return $this; - } - - /** - * 获取当前完整URL 包括QUERY_STRING - * @access public - * @param bool $complete 是否包含完整域名 - * @return string - */ - public function url(bool $complete = false): string - { - if ($this->url) { - $url = $this->url; - } elseif ($this->server('HTTP_X_REWRITE_URL')) { - $url = $this->server('HTTP_X_REWRITE_URL'); - } elseif ($this->server('REQUEST_URI')) { - $url = $this->server('REQUEST_URI'); - } elseif ($this->server('ORIG_PATH_INFO')) { - $url = $this->server('ORIG_PATH_INFO') . (!empty($this->server('QUERY_STRING')) ? '?' . $this->server('QUERY_STRING') : ''); - } elseif (isset($_SERVER['argv'][1])) { - $url = $_SERVER['argv'][1]; - } else { - $url = ''; - } - - return $complete ? $this->domain() . $url : $url; - } - - /** - * 设置当前URL 不含QUERY_STRING - * @access public - * @param string $url URL地址 - * @return $this - */ - public function setBaseUrl(string $url) - { - $this->baseUrl = $url; - return $this; - } - - /** - * 获取当前URL 不含QUERY_STRING - * @access public - * @param bool $complete 是否包含完整域名 - * @return string - */ - public function baseUrl(bool $complete = false): string - { - if (!$this->baseUrl) { - $str = $this->url(); - $this->baseUrl = strpos($str, '?') ? strstr($str, '?', true) : $str; - } - - return $complete ? $this->domain() . $this->baseUrl : $this->baseUrl; - } - - /** - * 获取当前执行的文件 SCRIPT_NAME - * @access public - * @param bool $complete 是否包含完整域名 - * @return string - */ - public function baseFile(bool $complete = false): string - { - if (!$this->baseFile) { - $url = ''; - if (!$this->isCli()) { - $script_name = basename($this->server('SCRIPT_FILENAME')); - if (basename($this->server('SCRIPT_NAME')) === $script_name) { - $url = $this->server('SCRIPT_NAME'); - } elseif (basename($this->server('PHP_SELF')) === $script_name) { - $url = $this->server('PHP_SELF'); - } elseif (basename($this->server('ORIG_SCRIPT_NAME')) === $script_name) { - $url = $this->server('ORIG_SCRIPT_NAME'); - } elseif (($pos = strpos($this->server('PHP_SELF'), '/' . $script_name)) !== false) { - $url = substr($this->server('SCRIPT_NAME'), 0, $pos) . '/' . $script_name; - } elseif ($this->server('DOCUMENT_ROOT') && strpos($this->server('SCRIPT_FILENAME'), $this->server('DOCUMENT_ROOT')) === 0) { - $url = str_replace('\\', '/', str_replace($this->server('DOCUMENT_ROOT'), '', $this->server('SCRIPT_FILENAME'))); - } - } - $this->baseFile = $url; - } - - return $complete ? $this->domain() . $this->baseFile : $this->baseFile; - } - - /** - * 设置URL访问根地址 - * @access public - * @param string $url URL地址 - * @return $this - */ - public function setRoot(string $url) - { - $this->root = $url; - return $this; - } - - /** - * 获取URL访问根地址 - * @access public - * @param bool $complete 是否包含完整域名 - * @return string - */ - public function root(bool $complete = false): string - { - if (!$this->root) { - $file = $this->baseFile(); - if ($file && 0 !== strpos($this->url(), $file)) { - $file = str_replace('\\', '/', dirname($file)); - } - $this->root = rtrim($file, '/'); - } - - return $complete ? $this->domain() . $this->root : $this->root; - } - - /** - * 获取URL访问根目录 - * @access public - * @return string - */ - public function rootUrl(): string - { - $base = $this->root(); - $root = strpos($base, '.') ? ltrim(dirname($base), DIRECTORY_SEPARATOR) : $base; - - if ('' != $root) { - $root = '/' . ltrim($root, '/'); - } - - return $root; - } - - /** - * 设置当前请求的pathinfo - * @access public - * @param string $pathinfo - * @return $this - */ - public function setPathinfo(string $pathinfo) - { - $this->pathinfo = $pathinfo; - return $this; - } - - /** - * 获取当前请求URL的pathinfo信息(含URL后缀) - * @access public - * @return string - */ - public function pathinfo(): string - { - if (is_null($this->pathinfo)) { - if (isset($_GET[$this->varPathinfo])) { - // 判断URL里面是否有兼容模式参数 - $pathinfo = $_GET[$this->varPathinfo]; - unset($_GET[$this->varPathinfo]); - unset($this->get[$this->varPathinfo]); - } elseif ($this->server('PATH_INFO')) { - $pathinfo = $this->server('PATH_INFO'); - } elseif (false !== strpos(PHP_SAPI, 'cli')) { - $pathinfo = strpos($this->server('REQUEST_URI'), '?') ? strstr($this->server('REQUEST_URI'), '?', true) : $this->server('REQUEST_URI'); - } - - // 分析PATHINFO信息 - if (!isset($pathinfo)) { - foreach ($this->pathinfoFetch as $type) { - if ($this->server($type)) { - $pathinfo = (0 === strpos($this->server($type), $this->server('SCRIPT_NAME'))) ? - substr($this->server($type), strlen($this->server('SCRIPT_NAME'))) : $this->server($type); - break; - } - } - } - - if (!empty($pathinfo)) { - unset($this->get[$pathinfo], $this->request[$pathinfo]); - } - - $this->pathinfo = empty($pathinfo) || '/' == $pathinfo ? '' : ltrim($pathinfo, '/'); - } - - return $this->pathinfo; - } - - /** - * 当前URL的访问后缀 - * @access public - * @return string - */ - public function ext(): string - { - return pathinfo($this->pathinfo(), PATHINFO_EXTENSION); - } - - /** - * 获取当前请求的时间 - * @access public - * @param bool $float 是否使用浮点类型 - * @return integer|float - */ - public function time(bool $float = false) - { - return $float ? $this->server('REQUEST_TIME_FLOAT') : $this->server('REQUEST_TIME'); - } - - /** - * 当前请求的资源类型 - * @access public - * @return string - */ - public function type(): string - { - $accept = $this->server('HTTP_ACCEPT'); - - if (empty($accept)) { - return ''; - } - - foreach ($this->mimeType as $key => $val) { - $array = explode(',', $val); - foreach ($array as $k => $v) { - if (stristr($accept, $v)) { - return $key; - } - } - } - - return ''; - } - - /** - * 设置资源类型 - * @access public - * @param string|array $type 资源类型名 - * @param string $val 资源类型 - * @return void - */ - public function mimeType($type, $val = ''): void - { - if (is_array($type)) { - $this->mimeType = array_merge($this->mimeType, $type); - } else { - $this->mimeType[$type] = $val; - } - } - - /** - * 设置请求类型 - * @access public - * @param string $method 请求类型 - * @return $this - */ - public function setMethod(string $method) - { - $this->method = strtoupper($method); - return $this; - } - - /** - * 当前的请求类型 - * @access public - * @param bool $origin 是否获取原始请求类型 - * @return string - */ - public function method(bool $origin = false): string - { - if ($origin) { - // 获取原始请求类型 - return $this->server('REQUEST_METHOD') ?: 'GET'; - } elseif (!$this->method) { - if (isset($this->post[$this->varMethod])) { - $method = strtolower($this->post[$this->varMethod]); - if (in_array($method, ['get', 'post', 'put', 'patch', 'delete'])) { - $this->method = strtoupper($method); - $this->{$method} = $this->post; - } else { - $this->method = 'POST'; - } - unset($this->post[$this->varMethod]); - } elseif ($this->server('HTTP_X_HTTP_METHOD_OVERRIDE')) { - $this->method = strtoupper($this->server('HTTP_X_HTTP_METHOD_OVERRIDE')); - } else { - $this->method = $this->server('REQUEST_METHOD') ?: 'GET'; - } - } - - return $this->method; - } - - /** - * 是否为GET请求 - * @access public - * @return bool - */ - public function isGet(): bool - { - return $this->method() == 'GET'; - } - - /** - * 是否为POST请求 - * @access public - * @return bool - */ - public function isPost(): bool - { - return $this->method() == 'POST'; - } - - /** - * 是否为PUT请求 - * @access public - * @return bool - */ - public function isPut(): bool - { - return $this->method() == 'PUT'; - } - - /** - * 是否为DELTE请求 - * @access public - * @return bool - */ - public function isDelete(): bool - { - return $this->method() == 'DELETE'; - } - - /** - * 是否为HEAD请求 - * @access public - * @return bool - */ - public function isHead(): bool - { - return $this->method() == 'HEAD'; - } - - /** - * 是否为PATCH请求 - * @access public - * @return bool - */ - public function isPatch(): bool - { - return $this->method() == 'PATCH'; - } - - /** - * 是否为OPTIONS请求 - * @access public - * @return bool - */ - public function isOptions(): bool - { - return $this->method() == 'OPTIONS'; - } - - /** - * 是否为cli - * @access public - * @return bool - */ - public function isCli(): bool - { - return PHP_SAPI == 'cli'; - } - - /** - * 是否为cgi - * @access public - * @return bool - */ - public function isCgi(): bool - { - return strpos(PHP_SAPI, 'cgi') === 0; - } - - /** - * 获取当前请求的参数 - * @access public - * @param string|array $name 变量名 - * @param mixed $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function param($name = '', $default = null, $filter = '') - { - if (empty($this->mergeParam)) { - $method = $this->method(true); - - // 自动获取请求变量 - switch ($method) { - case 'POST': - $vars = $this->post(false); - break; - case 'PUT': - case 'DELETE': - case 'PATCH': - $vars = $this->put(false); - break; - default: - $vars = []; - } - - // 当前请求参数和URL地址中的参数合并 - $this->param = array_merge($this->param, $this->get(false), $vars, $this->route(false)); - - $this->mergeParam = true; - } - - if (is_array($name)) { - return $this->only($name, $this->param, $filter); - } - - return $this->input($this->param, $name, $default, $filter); - } - - /** - * 获取包含文件在内的请求参数 - * @access public - * @param string|array $name 变量名 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function all($name = '', $filter = '') - { - $data = array_merge($this->param(), $this->file() ?: []); - - if (is_array($name)) { - $data = $this->only($name, $data, $filter); - } elseif ($name) { - $data = $data[$name] ?? null; - } - - return $data; - } - - /** - * 设置路由变量 - * @access public - * @param Rule $rule 路由对象 - * @return $this - */ - public function setRule(Rule $rule) - { - $this->rule = $rule; - return $this; - } - - /** - * 获取当前路由对象 - * @access public - * @return Rule|null - */ - public function rule() - { - return $this->rule; - } - - /** - * 设置路由变量 - * @access public - * @param array $route 路由变量 - * @return $this - */ - public function setRoute(array $route) - { - $this->route = array_merge($this->route, $route); - $this->mergeParam = false; - return $this; - } - - /** - * 获取路由参数 - * @access public - * @param string|array $name 变量名 - * @param mixed $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function route($name = '', $default = null, $filter = '') - { - if (is_array($name)) { - return $this->only($name, $this->route, $filter); - } - - return $this->input($this->route, $name, $default, $filter); - } - - /** - * 获取GET参数 - * @access public - * @param string|array $name 变量名 - * @param mixed $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function get($name = '', $default = null, $filter = '') - { - if (is_array($name)) { - return $this->only($name, $this->get, $filter); - } - - return $this->input($this->get, $name, $default, $filter); - } - - /** - * 获取中间件传递的参数 - * @access public - * @param mixed $name 变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function middleware($name, $default = null) - { - return $this->middleware[$name] ?? $default; - } - - /** - * 获取POST参数 - * @access public - * @param string|array $name 变量名 - * @param mixed $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function post($name = '', $default = null, $filter = '') - { - if (is_array($name)) { - return $this->only($name, $this->post, $filter); - } - - return $this->input($this->post, $name, $default, $filter); - } - - /** - * 获取PUT参数 - * @access public - * @param string|array $name 变量名 - * @param mixed $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function put($name = '', $default = null, $filter = '') - { - if (is_array($name)) { - return $this->only($name, $this->put, $filter); - } - - return $this->input($this->put, $name, $default, $filter); - } - - protected function getInputData($content): array - { - $contentType = $this->contentType(); - if ('application/x-www-form-urlencoded' == $contentType) { - parse_str($content, $data); - return $data; - } elseif (false !== strpos($contentType, 'json')) { - return (array) json_decode($content, true); - } - - return []; - } - - /** - * 设置获取DELETE参数 - * @access public - * @param mixed $name 变量名 - * @param mixed $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function delete($name = '', $default = null, $filter = '') - { - return $this->put($name, $default, $filter); - } - - /** - * 设置获取PATCH参数 - * @access public - * @param mixed $name 变量名 - * @param mixed $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function patch($name = '', $default = null, $filter = '') - { - return $this->put($name, $default, $filter); - } - - /** - * 获取request变量 - * @access public - * @param string|array $name 数据名称 - * @param mixed $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function request($name = '', $default = null, $filter = '') - { - if (is_array($name)) { - return $this->only($name, $this->request, $filter); - } - - return $this->input($this->request, $name, $default, $filter); - } - - /** - * 获取环境变量 - * @access public - * @param string $name 数据名称 - * @param string $default 默认值 - * @return mixed - */ - public function env(string $name = '', string $default = null) - { - if (empty($name)) { - return $this->env->get(); - } else { - $name = strtoupper($name); - } - - return $this->env->get($name, $default); - } - - /** - * 获取session数据 - * @access public - * @param string $name 数据名称 - * @param string $default 默认值 - * @return mixed - */ - public function session(string $name = '', $default = null) - { - if ('' === $name) { - return $this->session->all(); - } - return $this->session->get($name, $default); - } - - /** - * 获取cookie参数 - * @access public - * @param mixed $name 数据名称 - * @param string $default 默认值 - * @param string|array $filter 过滤方法 - * @return mixed - */ - public function cookie(string $name = '', $default = null, $filter = '') - { - if (!empty($name)) { - $data = $this->getData($this->cookie, $name, $default); - } else { - $data = $this->cookie; - } - - // 解析过滤器 - $filter = $this->getFilter($filter, $default); - - if (is_array($data)) { - array_walk_recursive($data, [$this, 'filterValue'], $filter); - } else { - $this->filterValue($data, $name, $filter); - } - - return $data; - } - - /** - * 获取server参数 - * @access public - * @param string $name 数据名称 - * @param string $default 默认值 - * @return mixed - */ - public function server(string $name = '', string $default = '') - { - if (empty($name)) { - return $this->server; - } else { - $name = strtoupper($name); - } - - return $this->server[$name] ?? $default; - } - - /** - * 获取上传的文件信息 - * @access public - * @param string $name 名称 - * @return null|array|UploadedFile - */ - public function file(string $name = '') - { - $files = $this->file; - if (!empty($files)) { - if (strpos($name, '.')) { - [$name, $sub] = explode('.', $name); - } - - // 处理上传文件 - $array = $this->dealUploadFile($files, $name); - - if ('' === $name) { - // 获取全部文件 - return $array; - } elseif (isset($sub) && isset($array[$name][$sub])) { - return $array[$name][$sub]; - } elseif (isset($array[$name])) { - return $array[$name]; - } - } - } - - protected function dealUploadFile(array $files, string $name): array - { - $array = []; - foreach ($files as $key => $file) { - if (is_array($file['name'])) { - $item = []; - $keys = array_keys($file); - $count = count($file['name']); - - for ($i = 0; $i < $count; $i++) { - if ($file['error'][$i] > 0) { - if ($name == $key) { - $this->throwUploadFileError($file['error'][$i]); - } else { - continue; - } - } - - $temp['key'] = $key; - - foreach ($keys as $_key) { - $temp[$_key] = $file[$_key][$i]; - } - - $item[] = new UploadedFile($temp['tmp_name'], $temp['name'], $temp['type'], $temp['error']); - } - - $array[$key] = $item; - } else { - if ($file instanceof File) { - $array[$key] = $file; - } else { - if ($file['error'] > 0) { - if ($key == $name) { - $this->throwUploadFileError($file['error']); - } else { - continue; - } - } - - $array[$key] = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['error']); - } - } - } - - return $array; - } - - protected function throwUploadFileError($error) - { - static $fileUploadErrors = [ - 1 => 'upload File size exceeds the maximum value', - 2 => 'upload File size exceeds the maximum value', - 3 => 'only the portion of file is uploaded', - 4 => 'no file to uploaded', - 6 => 'upload temp dir not found', - 7 => 'file write error', - ]; - - $msg = Lang::get($fileUploadErrors[$error]); - throw new Exception($msg, $error); - } - - /** - * 设置或者获取当前的Header - * @access public - * @param string $name header名称 - * @param string $default 默认值 - * @return string|array|null - */ - public function header(string $name = '', string $default = null) - { - if ('' === $name) { - return $this->header; - } - - $name = str_replace('_', '-', strtolower($name)); - - return $this->header[$name] ?? $default; - } - - /** - * 获取变量 支持过滤和默认值 - * @access public - * @param array $data 数据源 - * @param string|false $name 字段名 - * @param mixed $default 默认值 - * @param string|array $filter 过滤函数 - * @return mixed - */ - public function input(array $data = [], $name = '', $default = null, $filter = '') - { - if (false === $name) { - // 获取原始数据 - return $data; - } - - $name = (string) $name; - if ('' != $name) { - // 解析name - if (strpos($name, '/')) { - [$name, $type] = explode('/', $name); - } - - $data = $this->getData($data, $name); - - if (is_null($data)) { - return $default; - } - - if (is_object($data)) { - return $data; - } - } - - $data = $this->filterData($data, $filter, $name, $default); - - if (isset($type) && $data !== $default) { - // 强制类型转换 - $this->typeCast($data, $type); - } - - return $data; - } - - protected function filterData($data, $filter, $name, $default) - { - // 解析过滤器 - $filter = $this->getFilter($filter, $default); - - if (is_array($data)) { - array_walk_recursive($data, [$this, 'filterValue'], $filter); - } else { - $this->filterValue($data, $name, $filter); - } - - return $data; - } - - /** - * 强制类型转换 - * @access protected - * @param mixed $data - * @param string $type - * @return mixed - */ - protected function typeCast(&$data, string $type) - { - switch (strtolower($type)) { - // 数组 - case 'a': - $data = (array) $data; - break; - // 数字 - case 'd': - $data = (int) $data; - break; - // 浮点 - case 'f': - $data = (float) $data; - break; - // 布尔 - case 'b': - $data = (boolean) $data; - break; - // 字符串 - case 's': - if (is_scalar($data)) { - $data = (string) $data; - } else { - throw new \InvalidArgumentException('variable type error:' . gettype($data)); - } - break; - } - } - - /** - * 获取数据 - * @access protected - * @param array $data 数据源 - * @param string $name 字段名 - * @param mixed $default 默认值 - * @return mixed - */ - protected function getData(array $data, string $name, $default = null) - { - foreach (explode('.', $name) as $val) { - if (isset($data[$val])) { - $data = $data[$val]; - } else { - return $default; - } - } - - return $data; - } - - /** - * 设置或获取当前的过滤规则 - * @access public - * @param mixed $filter 过滤规则 - * @return mixed - */ - public function filter($filter = null) - { - if (is_null($filter)) { - return $this->filter; - } - - $this->filter = $filter; - - return $this; - } - - protected function getFilter($filter, $default): array - { - if (is_null($filter)) { - $filter = []; - } else { - $filter = $filter ?: $this->filter; - if (is_string($filter) && false === strpos($filter, '/')) { - $filter = explode(',', $filter); - } else { - $filter = (array) $filter; - } - } - - $filter[] = $default; - - return $filter; - } - - /** - * 递归过滤给定的值 - * @access public - * @param mixed $value 键值 - * @param mixed $key 键名 - * @param array $filters 过滤方法+默认值 - * @return mixed - */ - public function filterValue(&$value, $key, $filters) - { - $default = array_pop($filters); - - foreach ($filters as $filter) { - if (is_callable($filter)) { - // 调用函数或者方法过滤 - if (is_null($value)) { - continue; - } - - $value = call_user_func($filter, $value); - } elseif (is_scalar($value)) { - if (is_string($filter) && false !== strpos($filter, '/')) { - // 正则过滤 - if (!preg_match($filter, $value)) { - // 匹配不成功返回默认值 - $value = $default; - break; - } - } elseif (!empty($filter)) { - // filter函数不存在时, 则使用filter_var进行过滤 - // filter为非整形值时, 调用filter_id取得过滤id - $value = filter_var($value, is_int($filter) ? $filter : filter_id($filter)); - if (false === $value) { - $value = $default; - break; - } - } - } - } - - return $value; - } - - /** - * 是否存在某个请求参数 - * @access public - * @param string $name 变量名 - * @param string $type 变量类型 - * @param bool $checkEmpty 是否检测空值 - * @return bool - */ - public function has(string $name, string $type = 'param', bool $checkEmpty = false): bool - { - if (!in_array($type, ['param', 'get', 'post', 'put', 'patch', 'route', 'delete', 'cookie', 'session', 'env', 'request', 'server', 'header', 'file'])) { - return false; - } - - $param = empty($this->$type) ? $this->$type() : $this->$type; - - if (is_object($param)) { - return $param->has($name); - } - - // 按.拆分成多维数组进行判断 - foreach (explode('.', $name) as $val) { - if (isset($param[$val])) { - $param = $param[$val]; - } else { - return false; - } - } - - return ($checkEmpty && '' === $param) ? false : true; - } - - /** - * 获取指定的参数 - * @access public - * @param array $name 变量名 - * @param mixed $data 数据或者变量类型 - * @param string|array $filter 过滤方法 - * @return array - */ - public function only(array $name, $data = 'param', $filter = ''): array - { - $data = is_array($data) ? $data : $this->$data(); - - $item = []; - foreach ($name as $key => $val) { - - if (is_int($key)) { - $default = null; - $key = $val; - if (!key_exists($key, $data)) { - continue; - } - } else { - $default = $val; - } - - $item[$key] = $this->filterData($data[$key] ?? $default, $filter, $key, $default); - } - - return $item; - } - - /** - * 排除指定参数获取 - * @access public - * @param array $name 变量名 - * @param string $type 变量类型 - * @return mixed - */ - public function except(array $name, string $type = 'param'): array - { - $param = $this->$type(); - - foreach ($name as $key) { - if (isset($param[$key])) { - unset($param[$key]); - } - } - - return $param; - } - - /** - * 当前是否ssl - * @access public - * @return bool - */ - public function isSsl(): bool - { - if ($this->server('HTTPS') && ('1' == $this->server('HTTPS') || 'on' == strtolower($this->server('HTTPS')))) { - return true; - } elseif ('https' == $this->server('REQUEST_SCHEME')) { - return true; - } elseif ('443' == $this->server('SERVER_PORT')) { - return true; - } elseif ('https' == $this->server('HTTP_X_FORWARDED_PROTO')) { - return true; - } elseif ($this->httpsAgentName && $this->server($this->httpsAgentName)) { - return true; - } - - return false; - } - - /** - * 当前是否JSON请求 - * @access public - * @return bool - */ - public function isJson(): bool - { - $acceptType = $this->type(); - - return false !== strpos($acceptType, 'json'); - } - - /** - * 当前是否Ajax请求 - * @access public - * @param bool $ajax true 获取原始ajax请求 - * @return bool - */ - public function isAjax(bool $ajax = false): bool - { - $value = $this->server('HTTP_X_REQUESTED_WITH'); - $result = $value && 'xmlhttprequest' == strtolower($value) ? true : false; - - if (true === $ajax) { - return $result; - } - - return $this->param($this->varAjax) ? true : $result; - } - - /** - * 当前是否Pjax请求 - * @access public - * @param bool $pjax true 获取原始pjax请求 - * @return bool - */ - public function isPjax(bool $pjax = false): bool - { - $result = !empty($this->server('HTTP_X_PJAX')) ? true : false; - - if (true === $pjax) { - return $result; - } - - return $this->param($this->varPjax) ? true : $result; - } - - /** - * 获取客户端IP地址 - * @access public - * @return string - */ - public function ip(): string - { - if (!empty($this->realIP)) { - return $this->realIP; - } - - $this->realIP = $this->server('REMOTE_ADDR', ''); - - // 如果指定了前端代理服务器IP以及其会发送的IP头 - // 则尝试获取前端代理服务器发送过来的真实IP - $proxyIp = $this->proxyServerIp; - $proxyIpHeader = $this->proxyServerIpHeader; - - if (count($proxyIp) > 0 && count($proxyIpHeader) > 0) { - // 从指定的HTTP头中依次尝试获取IP地址 - // 直到获取到一个合法的IP地址 - foreach ($proxyIpHeader as $header) { - $tempIP = $this->server($header); - - if (empty($tempIP)) { - continue; - } - - $tempIP = trim(explode(',', $tempIP)[0]); - - if (!$this->isValidIP($tempIP)) { - $tempIP = null; - } else { - break; - } - } - - // tempIP不为空,说明获取到了一个IP地址 - // 这时我们检查 REMOTE_ADDR 是不是指定的前端代理服务器之一 - // 如果是的话说明该 IP头 是由前端代理服务器设置的 - // 否则则是伪装的 - if (!empty($tempIP)) { - $realIPBin = $this->ip2bin($this->realIP); - - foreach ($proxyIp as $ip) { - $serverIPElements = explode('/', $ip); - $serverIP = $serverIPElements[0]; - $serverIPPrefix = $serverIPElements[1] ?? 128; - $serverIPBin = $this->ip2bin($serverIP); - - // IP类型不符 - if (strlen($realIPBin) !== strlen($serverIPBin)) { - continue; - } - - if (strncmp($realIPBin, $serverIPBin, (int) $serverIPPrefix) === 0) { - $this->realIP = $tempIP; - break; - } - } - } - } - - if (!$this->isValidIP($this->realIP)) { - $this->realIP = '0.0.0.0'; - } - - return $this->realIP; - } - - /** - * 检测是否是合法的IP地址 - * - * @param string $ip IP地址 - * @param string $type IP地址类型 (ipv4, ipv6) - * - * @return boolean - */ - public function isValidIP(string $ip, string $type = ''): bool - { - switch (strtolower($type)) { - case 'ipv4': - $flag = FILTER_FLAG_IPV4; - break; - case 'ipv6': - $flag = FILTER_FLAG_IPV6; - break; - default: - $flag = 0; - break; - } - - return boolval(filter_var($ip, FILTER_VALIDATE_IP, $flag)); - } - - /** - * 将IP地址转换为二进制字符串 - * - * @param string $ip - * - * @return string - */ - public function ip2bin(string $ip): string - { - if ($this->isValidIP($ip, 'ipv6')) { - $IPHex = str_split(bin2hex(inet_pton($ip)), 4); - foreach ($IPHex as $key => $value) { - $IPHex[$key] = intval($value, 16); - } - $IPBin = vsprintf('%016b%016b%016b%016b%016b%016b%016b%016b', $IPHex); - } else { - $IPHex = str_split(bin2hex(inet_pton($ip)), 2); - foreach ($IPHex as $key => $value) { - $IPHex[$key] = intval($value, 16); - } - $IPBin = vsprintf('%08b%08b%08b%08b', $IPHex); - } - - return $IPBin; - } - - /** - * 检测是否使用手机访问 - * @access public - * @return bool - */ - public function isMobile(): bool - { - if ($this->server('HTTP_VIA') && stristr($this->server('HTTP_VIA'), "wap")) { - return true; - } elseif ($this->server('HTTP_ACCEPT') && strpos(strtoupper($this->server('HTTP_ACCEPT')), "VND.WAP.WML")) { - return true; - } elseif ($this->server('HTTP_X_WAP_PROFILE') || $this->server('HTTP_PROFILE')) { - return true; - } elseif ($this->server('HTTP_USER_AGENT') && preg_match('/(blackberry|configuration\/cldc|hp |hp-|htc |htc_|htc-|iemobile|kindle|midp|mmp|motorola|mobile|nokia|opera mini|opera |Googlebot-Mobile|YahooSeeker\/M1A1-R2D2|android|iphone|ipod|mobi|palm|palmos|pocket|portalmmm|ppc;|smartphone|sonyericsson|sqh|spv|symbian|treo|up.browser|up.link|vodafone|windows ce|xda |xda_)/i', $this->server('HTTP_USER_AGENT'))) { - return true; - } - - return false; - } - - /** - * 当前URL地址中的scheme参数 - * @access public - * @return string - */ - public function scheme(): string - { - return $this->isSsl() ? 'https' : 'http'; - } - - /** - * 当前请求URL地址中的query参数 - * @access public - * @return string - */ - public function query(): string - { - return $this->server('QUERY_STRING', ''); - } - - /** - * 设置当前请求的host(包含端口) - * @access public - * @param string $host 主机名(含端口) - * @return $this - */ - public function setHost(string $host) - { - $this->host = $host; - - return $this; - } - - /** - * 当前请求的host - * @access public - * @param bool $strict true 仅仅获取HOST - * @return string - */ - public function host(bool $strict = false): string - { - if ($this->host) { - $host = $this->host; - } else { - $host = strval($this->server('HTTP_X_FORWARDED_HOST') ?: $this->server('HTTP_HOST')); - } - - return true === $strict && strpos($host, ':') ? strstr($host, ':', true) : $host; - } - - /** - * 当前请求URL地址中的port参数 - * @access public - * @return int - */ - public function port(): int - { - return (int) ($this->server('HTTP_X_FORWARDED_PORT') ?: $this->server('SERVER_PORT', '')); - } - - /** - * 当前请求 SERVER_PROTOCOL - * @access public - * @return string - */ - public function protocol(): string - { - return $this->server('SERVER_PROTOCOL', ''); - } - - /** - * 当前请求 REMOTE_PORT - * @access public - * @return int - */ - public function remotePort(): int - { - return (int) $this->server('REMOTE_PORT', ''); - } - - /** - * 当前请求 HTTP_CONTENT_TYPE - * @access public - * @return string - */ - public function contentType(): string - { - $contentType = $this->header('Content-Type'); - - if ($contentType) { - if (strpos($contentType, ';')) { - [$type] = explode(';', $contentType); - } else { - $type = $contentType; - } - return trim($type); - } - - return ''; - } - - /** - * 获取当前请求的安全Key - * @access public - * @return string - */ - public function secureKey(): string - { - if (is_null($this->secureKey)) { - $this->secureKey = uniqid('', true); - } - - return $this->secureKey; - } - - /** - * 设置当前的控制器名 - * @access public - * @param string $controller 控制器名 - * @return $this - */ - public function setController(string $controller) - { - $this->controller = $controller; - return $this; - } - - /** - * 设置当前的操作名 - * @access public - * @param string $action 操作名 - * @return $this - */ - public function setAction(string $action) - { - $this->action = $action; - return $this; - } - - /** - * 获取当前的控制器名 - * @access public - * @param bool $convert 转换为小写 - * @return string - */ - public function controller(bool $convert = false): string - { - $name = $this->controller ?: ''; - return $convert ? strtolower($name) : $name; - } - - /** - * 获取当前的操作名 - * @access public - * @param bool $convert 转换为小写 - * @return string - */ - public function action(bool $convert = false): string - { - $name = $this->action ?: ''; - return $convert ? strtolower($name) : $name; - } - - /** - * 设置或者获取当前请求的content - * @access public - * @return string - */ - public function getContent(): string - { - if (is_null($this->content)) { - $this->content = $this->input; - } - - return $this->content; - } - - /** - * 获取当前请求的php://input - * @access public - * @return string - */ - public function getInput(): string - { - return $this->input; - } - - /** - * 生成请求令牌 - * @access public - * @param string $name 令牌名称 - * @param mixed $type 令牌生成方法 - * @return string - */ - public function buildToken(string $name = '__token__', $type = 'md5'): string - { - $type = is_callable($type) ? $type : 'md5'; - $token = call_user_func($type, $this->server('REQUEST_TIME_FLOAT')); - - $this->session->set($name, $token); - - return $token; - } - - /** - * 检查请求令牌 - * @access public - * @param string $token 令牌名称 - * @param array $data 表单数据 - * @return bool - */ - public function checkToken(string $token = '__token__', array $data = []): bool - { - if (in_array($this->method(), ['GET', 'HEAD', 'OPTIONS'], true)) { - return true; - } - - if (!$this->session->has($token)) { - // 令牌数据无效 - return false; - } - - // Header验证 - if ($this->header('X-CSRF-TOKEN') && $this->session->get($token) === $this->header('X-CSRF-TOKEN')) { - // 防止重复提交 - $this->session->delete($token); // 验证完成销毁session - return true; - } - - if (empty($data)) { - $data = $this->post(); - } - - // 令牌验证 - if (isset($data[$token]) && $this->session->get($token) === $data[$token]) { - // 防止重复提交 - $this->session->delete($token); // 验证完成销毁session - return true; - } - - // 开启TOKEN重置 - $this->session->delete($token); - return false; - } - - /** - * 设置在中间件传递的数据 - * @access public - * @param array $middleware 数据 - * @return $this - */ - public function withMiddleware(array $middleware) - { - $this->middleware = array_merge($this->middleware, $middleware); - return $this; - } - - /** - * 设置GET数据 - * @access public - * @param array $get 数据 - * @return $this - */ - public function withGet(array $get) - { - $this->get = $get; - return $this; - } - - /** - * 设置POST数据 - * @access public - * @param array $post 数据 - * @return $this - */ - public function withPost(array $post) - { - $this->post = $post; - return $this; - } - - /** - * 设置COOKIE数据 - * @access public - * @param array $cookie 数据 - * @return $this - */ - public function withCookie(array $cookie) - { - $this->cookie = $cookie; - return $this; - } - - /** - * 设置SESSION数据 - * @access public - * @param Session $session 数据 - * @return $this - */ - public function withSession(Session $session) - { - $this->session = $session; - return $this; - } - - /** - * 设置SERVER数据 - * @access public - * @param array $server 数据 - * @return $this - */ - public function withServer(array $server) - { - $this->server = array_change_key_case($server, CASE_UPPER); - return $this; - } - - /** - * 设置HEADER数据 - * @access public - * @param array $header 数据 - * @return $this - */ - public function withHeader(array $header) - { - $this->header = array_change_key_case($header); - return $this; - } - - /** - * 设置ENV数据 - * @access public - * @param Env $env 数据 - * @return $this - */ - public function withEnv(Env $env) - { - $this->env = $env; - return $this; - } - - /** - * 设置php://input数据 - * @access public - * @param string $input RAW数据 - * @return $this - */ - public function withInput(string $input) - { - $this->input = $input; - if (!empty($input)) { - $inputData = $this->getInputData($input); - if (!empty($inputData)) { - $this->post = $inputData; - $this->put = $inputData; - } - } - return $this; - } - - /** - * 设置文件上传数据 - * @access public - * @param array $files 上传信息 - * @return $this - */ - public function withFiles(array $files) - { - $this->file = $files; - return $this; - } - - /** - * 设置ROUTE变量 - * @access public - * @param array $route 数据 - * @return $this - */ - public function withRoute(array $route) - { - $this->route = $route; - return $this; - } - - /** - * 设置中间传递数据 - * @access public - * @param string $name 参数名 - * @param mixed $value 值 - */ - public function __set(string $name, $value) - { - $this->middleware[$name] = $value; - } - - /** - * 获取中间传递数据的值 - * @access public - * @param string $name 名称 - * @return mixed - */ - public function __get(string $name) - { - return $this->middleware($name); - } - - /** - * 检测中间传递数据的值 - * @access public - * @param string $name 名称 - * @return boolean - */ - public function __isset(string $name): bool - { - return isset($this->middleware[$name]); - } - - // ArrayAccess - #[\ReturnTypeWillChange] - public function offsetExists($name): bool - { - return $this->has($name); - } - - #[\ReturnTypeWillChange] - public function offsetGet($name) - { - return $this->param($name); - } - - #[\ReturnTypeWillChange] - public function offsetSet($name, $value) - {} - - #[\ReturnTypeWillChange] - public function offsetUnset($name) - {} - -} diff --git a/vendor/topthink/framework/src/think/Response.php b/vendor/topthink/framework/src/think/Response.php deleted file mode 100644 index 49f26dc..0000000 --- a/vendor/topthink/framework/src/think/Response.php +++ /dev/null @@ -1,413 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -/** - * 响应输出基础类 - * @package think - */ -abstract class Response -{ - /** - * 原始数据 - * @var mixed - */ - protected $data; - - /** - * 当前contentType - * @var string - */ - protected $contentType = 'text/html'; - - /** - * 字符集 - * @var string - */ - protected $charset = 'utf-8'; - - /** - * 状态码 - * @var integer - */ - protected $code = 200; - - /** - * 是否允许请求缓存 - * @var bool - */ - protected $allowCache = true; - - /** - * 输出参数 - * @var array - */ - protected $options = []; - - /** - * header参数 - * @var array - */ - protected $header = []; - - /** - * 输出内容 - * @var string - */ - protected $content = null; - - /** - * Cookie对象 - * @var Cookie - */ - protected $cookie; - - /** - * Session对象 - * @var Session - */ - protected $session; - - /** - * 初始化 - * @access protected - * @param mixed $data 输出数据 - * @param int $code 状态码 - */ - protected function init($data = '', int $code = 200) - { - $this->data($data); - $this->code = $code; - - $this->contentType($this->contentType, $this->charset); - } - - /** - * 创建Response对象 - * @access public - * @param mixed $data 输出数据 - * @param string $type 输出类型 - * @param int $code 状态码 - * @return Response - */ - public static function create($data = '', string $type = 'html', int $code = 200): Response - { - $class = false !== strpos($type, '\\') ? $type : '\\think\\response\\' . ucfirst(strtolower($type)); - - return Container::getInstance()->invokeClass($class, [$data, $code]); - } - - /** - * 设置Session对象 - * @access public - * @param Session $session Session对象 - * @return $this - */ - public function setSession(Session $session) - { - $this->session = $session; - return $this; - } - - /** - * 发送数据到客户端 - * @access public - * @return void - * @throws \InvalidArgumentException - */ - public function send(): void - { - // 处理输出数据 - $data = $this->getContent(); - - if (!headers_sent()) { - if (!empty($this->header)) { - // 发送状态码 - http_response_code($this->code); - // 发送头部信息 - foreach ($this->header as $name => $val) { - header($name . (!is_null($val) ? ':' . $val : '')); - } - } - - if ($this->cookie) { - $this->cookie->save(); - } - } - - $this->sendData($data); - - if (function_exists('fastcgi_finish_request')) { - // 提高页面响应 - fastcgi_finish_request(); - } - } - - /** - * 处理数据 - * @access protected - * @param mixed $data 要处理的数据 - * @return mixed - */ - protected function output($data) - { - return $data; - } - - /** - * 输出数据 - * @access protected - * @param string $data 要处理的数据 - * @return void - */ - protected function sendData(string $data): void - { - echo $data; - } - - /** - * 输出的参数 - * @access public - * @param mixed $options 输出参数 - * @return $this - */ - public function options(array $options = []) - { - $this->options = array_merge($this->options, $options); - - return $this; - } - - /** - * 输出数据设置 - * @access public - * @param mixed $data 输出数据 - * @return $this - */ - public function data($data) - { - $this->data = $data; - - return $this; - } - - /** - * 是否允许请求缓存 - * @access public - * @param bool $cache 允许请求缓存 - * @return $this - */ - public function allowCache(bool $cache) - { - $this->allowCache = $cache; - - return $this; - } - - /** - * 是否允许请求缓存 - * @access public - * @return bool - */ - public function isAllowCache() - { - return $this->allowCache; - } - - /** - * 设置Cookie - * @access public - * @param string $name cookie名称 - * @param string $value cookie值 - * @param mixed $option 可选参数 - * @return $this - */ - public function cookie(string $name, string $value, $option = null) - { - $this->cookie->set($name, $value, $option); - - return $this; - } - - /** - * 设置响应头 - * @access public - * @param array $header 参数 - * @return $this - */ - public function header(array $header = []) - { - $this->header = array_merge($this->header, $header); - - return $this; - } - - /** - * 设置页面输出内容 - * @access public - * @param mixed $content - * @return $this - */ - public function content($content) - { - if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable([ - $content, - '__toString', - ]) - ) { - throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content))); - } - - $this->content = (string) $content; - - return $this; - } - - /** - * 发送HTTP状态 - * @access public - * @param integer $code 状态码 - * @return $this - */ - public function code(int $code) - { - $this->code = $code; - - return $this; - } - - /** - * LastModified - * @access public - * @param string $time - * @return $this - */ - public function lastModified(string $time) - { - $this->header['Last-Modified'] = $time; - - return $this; - } - - /** - * Expires - * @access public - * @param string $time - * @return $this - */ - public function expires(string $time) - { - $this->header['Expires'] = $time; - - return $this; - } - - /** - * ETag - * @access public - * @param string $eTag - * @return $this - */ - public function eTag(string $eTag) - { - $this->header['ETag'] = $eTag; - - return $this; - } - - /** - * 页面缓存控制 - * @access public - * @param string $cache 状态码 - * @return $this - */ - public function cacheControl(string $cache) - { - $this->header['Cache-control'] = $cache; - - return $this; - } - - /** - * 页面输出类型 - * @access public - * @param string $contentType 输出类型 - * @param string $charset 输出编码 - * @return $this - */ - public function contentType(string $contentType, string $charset = 'utf-8') - { - $this->header['Content-Type'] = $contentType . '; charset=' . $charset; - - return $this; - } - - /** - * 获取头部信息 - * @access public - * @param string $name 头部名称 - * @return mixed - */ - public function getHeader(string $name = '') - { - if (!empty($name)) { - return $this->header[$name] ?? null; - } - - return $this->header; - } - - /** - * 获取原始数据 - * @access public - * @return mixed - */ - public function getData() - { - return $this->data; - } - - /** - * 获取输出数据 - * @access public - * @return string - */ - public function getContent(): string - { - if (null == $this->content) { - $content = $this->output($this->data); - - if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable([ - $content, - '__toString', - ]) - ) { - throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content))); - } - - $this->content = (string) $content; - } - - return $this->content; - } - - /** - * 获取状态码 - * @access public - * @return integer - */ - public function getCode(): int - { - return $this->code; - } -} diff --git a/vendor/topthink/framework/src/think/Route.php b/vendor/topthink/framework/src/think/Route.php deleted file mode 100644 index 60eba4a..0000000 --- a/vendor/topthink/framework/src/think/Route.php +++ /dev/null @@ -1,947 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use Closure; -use think\exception\RouteNotFoundException; -use think\route\Dispatch; -use think\route\dispatch\Callback; -use think\route\dispatch\Url as UrlDispatch; -use think\route\Domain; -use think\route\Resource; -use think\route\ResourceRegister; -use think\route\Rule; -use think\route\RuleGroup; -use think\route\RuleItem; -use think\route\RuleName; -use think\route\Url as UrlBuild; - -/** - * 路由管理类 - * @package think - */ -class Route -{ - /** - * REST定义 - * @var array - */ - protected $rest = [ - 'index' => ['get', '', 'index'], - 'create' => ['get', '/create', 'create'], - 'edit' => ['get', '/<id>/edit', 'edit'], - 'read' => ['get', '/<id>', 'read'], - 'save' => ['post', '', 'save'], - 'update' => ['put', '/<id>', 'update'], - 'delete' => ['delete', '/<id>', 'delete'], - ]; - - /** - * 配置参数 - * @var array - */ - protected $config = [ - // pathinfo分隔符 - 'pathinfo_depr' => '/', - // 是否开启路由延迟解析 - 'url_lazy_route' => false, - // 是否强制使用路由 - 'url_route_must' => false, - // 合并路由规则 - 'route_rule_merge' => false, - // 路由是否完全匹配 - 'route_complete_match' => false, - // 去除斜杠 - 'remove_slash' => false, - // 使用注解路由 - 'route_annotation' => false, - // 默认的路由变量规则 - 'default_route_pattern' => '[\w\.]+', - // URL伪静态后缀 - 'url_html_suffix' => 'html', - // 访问控制器层名称 - 'controller_layer' => 'controller', - // 空控制器名 - 'empty_controller' => 'Error', - // 是否使用控制器后缀 - 'controller_suffix' => false, - // 默认控制器名 - 'default_controller' => 'Index', - // 默认操作名 - 'default_action' => 'index', - // 操作方法后缀 - 'action_suffix' => '', - // 非路由变量是否使用普通参数方式(用于URL生成) - 'url_common_param' => true, - ]; - - /** - * 当前应用 - * @var App - */ - protected $app; - - /** - * 请求对象 - * @var Request - */ - protected $request; - - /** - * @var RuleName - */ - protected $ruleName; - - /** - * 当前HOST - * @var string - */ - protected $host; - - /** - * 当前分组对象 - * @var RuleGroup - */ - protected $group; - - /** - * 路由绑定 - * @var array - */ - protected $bind = []; - - /** - * 域名对象 - * @var Domain[] - */ - protected $domains = []; - - /** - * 跨域路由规则 - * @var RuleGroup - */ - protected $cross; - - /** - * 路由是否延迟解析 - * @var bool - */ - protected $lazy = false; - - /** - * 路由是否测试模式 - * @var bool - */ - protected $isTest = false; - - /** - * (分组)路由规则是否合并解析 - * @var bool - */ - protected $mergeRuleRegex = false; - - /** - * 是否去除URL最后的斜线 - * @var bool - */ - protected $removeSlash = false; - - public function __construct(App $app) - { - $this->app = $app; - $this->ruleName = new RuleName(); - $this->setDefaultDomain(); - - if (is_file($this->app->getRuntimePath() . 'route.php')) { - // 读取路由映射文件 - $this->import(include $this->app->getRuntimePath() . 'route.php'); - } - - $this->config = array_merge($this->config, $this->app->config->get('route')); - - $this->init(); - } - - protected function init() - { - if (!empty($this->config['middleware'])) { - $this->app->middleware->import($this->config['middleware'], 'route'); - } - - $this->lazy($this->config['url_lazy_route']); - $this->mergeRuleRegex = $this->config['route_rule_merge']; - $this->removeSlash = $this->config['remove_slash']; - - $this->group->removeSlash($this->removeSlash); - - // 注册全局MISS路由 - $this->miss(function () { - return Response::create('', 'html', 204)->header(['Allow' => 'GET, POST, PUT, DELETE']); - }, 'options')->allowCrossDomain(); - } - - public function config(string $name = null) - { - if (is_null($name)) { - return $this->config; - } - - return $this->config[$name] ?? null; - } - - /** - * 设置路由域名及分组(包括资源路由)是否延迟解析 - * @access public - * @param bool $lazy 路由是否延迟解析 - * @return $this - */ - public function lazy(bool $lazy = true) - { - $this->lazy = $lazy; - return $this; - } - - /** - * 设置路由为测试模式 - * @access public - * @param bool $test 路由是否测试模式 - * @return void - */ - public function setTestMode(bool $test): void - { - $this->isTest = $test; - } - - /** - * 检查路由是否为测试模式 - * @access public - * @return bool - */ - public function isTest(): bool - { - return $this->isTest; - } - - /** - * 设置路由域名及分组(包括资源路由)是否合并解析 - * @access public - * @param bool $merge 路由是否合并解析 - * @return $this - */ - public function mergeRuleRegex(bool $merge = true) - { - $this->mergeRuleRegex = $merge; - $this->group->mergeRuleRegex($merge); - - return $this; - } - - /** - * 初始化默认域名 - * @access protected - * @return void - */ - protected function setDefaultDomain(): void - { - // 注册默认域名 - $domain = new Domain($this); - - $this->domains['-'] = $domain; - - // 默认分组 - $this->group = $domain; - } - - /** - * 设置当前分组 - * @access public - * @param RuleGroup $group 域名 - * @return void - */ - public function setGroup(RuleGroup $group): void - { - $this->group = $group; - } - - /** - * 获取指定标识的路由分组 不指定则获取当前分组 - * @access public - * @param string $name 分组标识 - * @return RuleGroup - */ - public function getGroup(string $name = null) - { - return $name ? $this->ruleName->getGroup($name) : $this->group; - } - - /** - * 注册变量规则 - * @access public - * @param array $pattern 变量规则 - * @return $this - */ - public function pattern(array $pattern) - { - $this->group->pattern($pattern); - - return $this; - } - - /** - * 注册路由参数 - * @access public - * @param array $option 参数 - * @return $this - */ - public function option(array $option) - { - $this->group->option($option); - - return $this; - } - - /** - * 注册域名路由 - * @access public - * @param string|array $name 子域名 - * @param mixed $rule 路由规则 - * @return Domain - */ - public function domain($name, $rule = null): Domain - { - // 支持多个域名使用相同路由规则 - $domainName = is_array($name) ? array_shift($name) : $name; - - if (!isset($this->domains[$domainName])) { - $domain = (new Domain($this, $domainName, $rule, $this->lazy)) - ->removeSlash($this->removeSlash) - ->mergeRuleRegex($this->mergeRuleRegex); - - $this->domains[$domainName] = $domain; - } else { - $domain = $this->domains[$domainName]; - $domain->parseGroupRule($rule); - } - - if (is_array($name) && !empty($name)) { - foreach ($name as $item) { - $this->domains[$item] = $domainName; - } - } - - // 返回域名对象 - return $domain; - } - - /** - * 获取域名 - * @access public - * @return array - */ - public function getDomains(): array - { - return $this->domains; - } - - /** - * 获取RuleName对象 - * @access public - * @return RuleName - */ - public function getRuleName(): RuleName - { - return $this->ruleName; - } - - /** - * 设置路由绑定 - * @access public - * @param string $bind 绑定信息 - * @param string $domain 域名 - * @return $this - */ - public function bind(string $bind, string $domain = null) - { - $domain = is_null($domain) ? '-' : $domain; - - $this->bind[$domain] = $bind; - - return $this; - } - - /** - * 读取路由绑定信息 - * @access public - * @return array - */ - public function getBind(): array - { - return $this->bind; - } - - /** - * 读取路由绑定 - * @access public - * @param string $domain 域名 - * @return string|null - */ - public function getDomainBind(string $domain = null) - { - if (is_null($domain)) { - $domain = $this->host; - } elseif (false === strpos($domain, '.') && $this->request) { - $domain .= '.' . $this->request->rootDomain(); - } - - if ($this->request) { - $subDomain = $this->request->subDomain(); - - if (strpos($subDomain, '.')) { - $name = '*' . strstr($subDomain, '.'); - } - } - - if (isset($this->bind[$domain])) { - $result = $this->bind[$domain]; - } elseif (isset($name) && isset($this->bind[$name])) { - $result = $this->bind[$name]; - } elseif (!empty($subDomain) && isset($this->bind['*'])) { - $result = $this->bind['*']; - } else { - $result = null; - } - - return $result; - } - - /** - * 读取路由标识 - * @access public - * @param string $name 路由标识 - * @param string $domain 域名 - * @param string $method 请求类型 - * @return array - */ - public function getName(string $name = null, string $domain = null, string $method = '*'): array - { - return $this->ruleName->getName($name, $domain, $method); - } - - /** - * 批量导入路由标识 - * @access public - * @param array $name 路由标识 - * @return void - */ - public function import(array $name): void - { - $this->ruleName->import($name); - } - - /** - * 注册路由标识 - * @access public - * @param string $name 路由标识 - * @param RuleItem $ruleItem 路由规则 - * @param bool $first 是否优先 - * @return void - */ - public function setName(string $name, RuleItem $ruleItem, bool $first = false): void - { - $this->ruleName->setName($name, $ruleItem, $first); - } - - /** - * 保存路由规则 - * @access public - * @param string $rule 路由规则 - * @param RuleItem $ruleItem RuleItem对象 - * @return void - */ - public function setRule(string $rule, RuleItem $ruleItem = null): void - { - $this->ruleName->setRule($rule, $ruleItem); - } - - /** - * 读取路由 - * @access public - * @param string $rule 路由规则 - * @return RuleItem[] - */ - public function getRule(string $rule): array - { - return $this->ruleName->getRule($rule); - } - - /** - * 读取路由列表 - * @access public - * @return array - */ - public function getRuleList(): array - { - return $this->ruleName->getRuleList(); - } - - /** - * 清空路由规则 - * @access public - * @return void - */ - public function clear(): void - { - $this->ruleName->clear(); - - if ($this->group) { - $this->group->clear(); - } - } - - /** - * 注册路由规则 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @param string $method 请求类型 - * @return RuleItem - */ - public function rule(string $rule, $route = null, string $method = '*'): RuleItem - { - if ($route instanceof Response) { - // 兼容之前的路由到响应对象,感觉不需要,使用场景很少,闭包就能实现 - $route = function () use ($route) { - return $route; - }; - } - return $this->group->addRule($rule, $route, $method); - } - - /** - * 设置路由规则全局有效 - * @access public - * @param Rule $rule 路由规则 - * @return $this - */ - public function setCrossDomainRule(Rule $rule) - { - if (!isset($this->cross)) { - $this->cross = (new RuleGroup($this))->mergeRuleRegex($this->mergeRuleRegex); - } - - $this->cross->addRuleItem($rule); - - return $this; - } - - /** - * 注册路由分组 - * @access public - * @param string|\Closure $name 分组名称或者参数 - * @param mixed $route 分组路由 - * @return RuleGroup - */ - public function group($name, $route = null): RuleGroup - { - if ($name instanceof Closure) { - $route = $name; - $name = ''; - } - - return (new RuleGroup($this, $this->group, $name, $route, $this->lazy)) - ->removeSlash($this->removeSlash) - ->mergeRuleRegex($this->mergeRuleRegex); - } - - /** - * 注册路由 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @return RuleItem - */ - public function any(string $rule, $route): RuleItem - { - return $this->rule($rule, $route, '*'); - } - - /** - * 注册GET路由 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @return RuleItem - */ - public function get(string $rule, $route): RuleItem - { - return $this->rule($rule, $route, 'GET'); - } - - /** - * 注册POST路由 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @return RuleItem - */ - public function post(string $rule, $route): RuleItem - { - return $this->rule($rule, $route, 'POST'); - } - - /** - * 注册PUT路由 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @return RuleItem - */ - public function put(string $rule, $route): RuleItem - { - return $this->rule($rule, $route, 'PUT'); - } - - /** - * 注册DELETE路由 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @return RuleItem - */ - public function delete(string $rule, $route): RuleItem - { - return $this->rule($rule, $route, 'DELETE'); - } - - /** - * 注册PATCH路由 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @return RuleItem - */ - public function patch(string $rule, $route): RuleItem - { - return $this->rule($rule, $route, 'PATCH'); - } - - /** - * 注册HEAD路由 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @return RuleItem - */ - public function head(string $rule, $route): RuleItem - { - return $this->rule($rule, $route, 'HEAD'); - } - - /** - * 注册OPTIONS路由 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @return RuleItem - */ - public function options(string $rule, $route): RuleItem - { - return $this->rule($rule, $route, 'OPTIONS'); - } - - /** - * 注册资源路由 - * @access public - * @param string $rule 路由规则 - * @param string $route 路由地址 - * @return Resource|ResourceRegister - */ - public function resource(string $rule, string $route) - { - $resource = new Resource($this, $this->group, $rule, $route, $this->rest); - - if (!$this->lazy) { - return new ResourceRegister($resource); - } - - return $resource; - } - - /** - * 注册视图路由 - * @access public - * @param string $rule 路由规则 - * @param string $template 路由模板地址 - * @param array $vars 模板变量 - * @return RuleItem - */ - public function view(string $rule, string $template = '', array $vars = []): RuleItem - { - return $this->rule($rule, function () use ($vars, $template) { - return Response::create($template, 'view')->assign($vars); - }, 'GET'); - } - - /** - * 注册重定向路由 - * @access public - * @param string $rule 路由规则 - * @param string $route 路由地址 - * @param int $status 状态码 - * @return RuleItem - */ - public function redirect(string $rule, string $route = '', int $status = 301): RuleItem - { - return $this->rule($rule, function (Request $request) use ($status, $route) { - $search = $replace = []; - $matches = $request->rule()->getVars(); - - foreach ($matches as $key => $value) { - $search[] = '<' . $key . '>'; - $replace[] = $value; - - $search[] = ':' . $key; - $replace[] = $value; - } - - $route = str_replace($search, $replace, $route); - return Response::create($route, 'redirect')->code($status); - }, '*'); - } - - /** - * rest方法定义和修改 - * @access public - * @param string|array $name 方法名称 - * @param array|bool $resource 资源 - * @return $this - */ - public function rest($name, $resource = []) - { - if (is_array($name)) { - $this->rest = $resource ? $name : array_merge($this->rest, $name); - } else { - $this->rest[$name] = $resource; - } - - return $this; - } - - /** - * 获取rest方法定义的参数 - * @access public - * @param string $name 方法名称 - * @return array|null - */ - public function getRest(string $name = null) - { - if (is_null($name)) { - return $this->rest; - } - - return $this->rest[$name] ?? null; - } - - /** - * 注册未匹配路由规则后的处理 - * @access public - * @param string|Closure $route 路由地址 - * @param string $method 请求类型 - * @return RuleItem - */ - public function miss($route, string $method = '*'): RuleItem - { - return $this->group->miss($route, $method); - } - - /** - * 路由调度 - * @param Request $request - * @param Closure|bool $withRoute - * @return Response - */ - public function dispatch(Request $request, $withRoute = true) - { - $this->request = $request; - $this->host = $this->request->host(true); - - if ($withRoute) { - //加载路由 - if ($withRoute instanceof Closure) { - $withRoute(); - } - $dispatch = $this->check(); - } else { - $dispatch = $this->url($this->path()); - } - - $dispatch->init($this->app); - - return $this->app->middleware->pipeline('route') - ->send($request) - ->then(function () use ($dispatch) { - return $dispatch->run(); - }); - } - - /** - * 检测URL路由 - * @access public - * @return Dispatch|false - * @throws RouteNotFoundException - */ - public function check() - { - // 自动检测域名路由 - $url = str_replace($this->config['pathinfo_depr'], '|', $this->path()); - - $completeMatch = $this->config['route_complete_match']; - - $result = $this->checkDomain()->check($this->request, $url, $completeMatch); - - if (false === $result && !empty($this->cross)) { - // 检测跨域路由 - $result = $this->cross->check($this->request, $url, $completeMatch); - } - - if (false !== $result) { - return $result; - } elseif ($this->config['url_route_must']) { - throw new RouteNotFoundException(); - } - - return $this->url($url); - } - - /** - * 获取当前请求URL的pathinfo信息(不含URL后缀) - * @access protected - * @return string - */ - protected function path(): string - { - $suffix = $this->config['url_html_suffix']; - $pathinfo = $this->request->pathinfo(); - - if (false === $suffix) { - // 禁止伪静态访问 - $path = $pathinfo; - } elseif ($suffix) { - // 去除正常的URL后缀 - $path = preg_replace('/\.(' . ltrim($suffix, '.') . ')$/i', '', $pathinfo); - } else { - // 允许任何后缀访问 - $path = preg_replace('/\.' . $this->request->ext() . '$/i', '', $pathinfo); - } - - return $path; - } - - /** - * 默认URL解析 - * @access public - * @param string $url URL地址 - * @return Dispatch - */ - public function url(string $url): Dispatch - { - if ($this->request->method() == 'OPTIONS') { - // 自动响应options请求 - return new Callback($this->request, $this->group, function () { - return Response::create('', 'html', 204)->header(['Allow' => 'GET, POST, PUT, DELETE']); - }); - } - - return new UrlDispatch($this->request, $this->group, $url); - } - - /** - * 检测域名的路由规则 - * @access protected - * @return Domain - */ - protected function checkDomain(): Domain - { - $item = false; - - if (count($this->domains) > 1) { - // 获取当前子域名 - $subDomain = $this->request->subDomain(); - - $domain = $subDomain ? explode('.', $subDomain) : []; - $domain2 = $domain ? array_pop($domain) : ''; - - if ($domain) { - // 存在三级域名 - $domain3 = array_pop($domain); - } - - if (isset($this->domains[$this->host])) { - // 子域名配置 - $item = $this->domains[$this->host]; - } elseif (isset($this->domains[$subDomain])) { - $item = $this->domains[$subDomain]; - } elseif (isset($this->domains['*.' . $domain2]) && !empty($domain3)) { - // 泛三级域名 - $item = $this->domains['*.' . $domain2]; - $panDomain = $domain3; - } elseif (isset($this->domains['*']) && !empty($domain2)) { - // 泛二级域名 - if ('www' != $domain2) { - $item = $this->domains['*']; - $panDomain = $domain2; - } - } - - if (isset($panDomain)) { - // 保存当前泛域名 - $this->request->setPanDomain($panDomain); - } - } - - if (false === $item) { - // 检测全局域名规则 - $item = $this->domains['-']; - } - - if (is_string($item)) { - $item = $this->domains[$item]; - } - - return $item; - } - - /** - * URL生成 支持路由反射 - * @access public - * @param string $url 路由地址 - * @param array $vars 参数 ['a'=>'val1', 'b'=>'val2'] - * @return UrlBuild - */ - public function buildUrl(string $url = '', array $vars = []): UrlBuild - { - return $this->app->make(UrlBuild::class, [$this, $this->app, $url, $vars], true); - } - - /** - * 设置全局的路由分组参数 - * @access public - * @param string $method 方法名 - * @param array $args 调用参数 - * @return RuleGroup - */ - public function __call($method, $args) - { - return call_user_func_array([$this->group, $method], $args); - } -} diff --git a/vendor/topthink/framework/src/think/Service.php b/vendor/topthink/framework/src/think/Service.php deleted file mode 100644 index d9e8960..0000000 --- a/vendor/topthink/framework/src/think/Service.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use Closure; -use think\event\RouteLoaded; - -/** - * 系统服务基础类 - * @method void register() - * @method void boot() - */ -abstract class Service -{ - protected $app; - - public function __construct(App $app) - { - $this->app = $app; - } - - /** - * 加载路由 - * @access protected - * @param string $path 路由路径 - */ - protected function loadRoutesFrom($path) - { - $this->registerRoutes(function () use ($path) { - include $path; - }); - } - - /** - * 注册路由 - * @param Closure $closure - */ - protected function registerRoutes(Closure $closure) - { - $this->app->event->listen(RouteLoaded::class, $closure); - } - - /** - * 添加指令 - * @access protected - * @param array|string $commands 指令 - */ - protected function commands($commands) - { - $commands = is_array($commands) ? $commands : func_get_args(); - - Console::starting(function (Console $console) use ($commands) { - $console->addCommands($commands); - }); - } -} diff --git a/vendor/topthink/framework/src/think/Session.php b/vendor/topthink/framework/src/think/Session.php deleted file mode 100644 index 6c84faf..0000000 --- a/vendor/topthink/framework/src/think/Session.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use think\helper\Arr; -use think\session\Store; - -/** - * Session管理类 - * @package think - * @mixin Store - */ -class Session extends Manager -{ - protected $namespace = '\\think\\session\\driver\\'; - - protected function createDriver(string $name) - { - $handler = parent::createDriver($name); - - return new Store($this->getConfig('name') ?: 'PHPSESSID', $handler, $this->getConfig('serialize')); - } - - /** - * 获取Session配置 - * @access public - * @param null|string $name 名称 - * @param mixed $default 默认值 - * @return mixed - */ - public function getConfig(string $name = null, $default = null) - { - if (!is_null($name)) { - return $this->app->config->get('session.' . $name, $default); - } - - return $this->app->config->get('session'); - } - - protected function resolveConfig(string $name) - { - $config = $this->app->config->get('session', []); - Arr::forget($config, 'type'); - return $config; - } - - /** - * 默认驱动 - * @return string|null - */ - public function getDefaultDriver() - { - return $this->app->config->get('session.type', 'file'); - } -} diff --git a/vendor/topthink/framework/src/think/Validate.php b/vendor/topthink/framework/src/think/Validate.php deleted file mode 100644 index 0788406..0000000 --- a/vendor/topthink/framework/src/think/Validate.php +++ /dev/null @@ -1,1688 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use Closure; -use think\exception\ValidateException; -use think\helper\Str; -use think\validate\ValidateRule; - -/** - * 数据验证类 - * @package think - */ -class Validate -{ - /** - * 自定义验证类型 - * @var array - */ - protected $type = []; - - /** - * 验证类型别名 - * @var array - */ - protected $alias = [ - '>' => 'gt', '>=' => 'egt', '<' => 'lt', '<=' => 'elt', '=' => 'eq', 'same' => 'eq', - ]; - - /** - * 当前验证规则 - * @var array - */ - protected $rule = []; - - /** - * 验证提示信息 - * @var array - */ - protected $message = []; - - /** - * 验证字段描述 - * @var array - */ - protected $field = []; - - /** - * 默认规则提示 - * @var array - */ - protected $typeMsg = [ - 'require' => ':attribute require', - 'must' => ':attribute must', - 'number' => ':attribute must be numeric', - 'integer' => ':attribute must be integer', - 'float' => ':attribute must be float', - 'boolean' => ':attribute must be bool', - 'email' => ':attribute not a valid email address', - 'mobile' => ':attribute not a valid mobile', - 'array' => ':attribute must be a array', - 'accepted' => ':attribute must be yes,on or 1', - 'date' => ':attribute not a valid datetime', - 'file' => ':attribute not a valid file', - 'image' => ':attribute not a valid image', - 'alpha' => ':attribute must be alpha', - 'alphaNum' => ':attribute must be alpha-numeric', - 'alphaDash' => ':attribute must be alpha-numeric, dash, underscore', - 'activeUrl' => ':attribute not a valid domain or ip', - 'chs' => ':attribute must be chinese', - 'chsAlpha' => ':attribute must be chinese or alpha', - 'chsAlphaNum' => ':attribute must be chinese,alpha-numeric', - 'chsDash' => ':attribute must be chinese,alpha-numeric,underscore, dash', - 'url' => ':attribute not a valid url', - 'ip' => ':attribute not a valid ip', - 'dateFormat' => ':attribute must be dateFormat of :rule', - 'in' => ':attribute must be in :rule', - 'notIn' => ':attribute be notin :rule', - 'between' => ':attribute must between :1 - :2', - 'notBetween' => ':attribute not between :1 - :2', - 'length' => 'size of :attribute must be :rule', - 'max' => 'max size of :attribute must be :rule', - 'min' => 'min size of :attribute must be :rule', - 'after' => ':attribute cannot be less than :rule', - 'before' => ':attribute cannot exceed :rule', - 'expire' => ':attribute not within :rule', - 'allowIp' => 'access IP is not allowed', - 'denyIp' => 'access IP denied', - 'confirm' => ':attribute out of accord with :2', - 'different' => ':attribute cannot be same with :2', - 'egt' => ':attribute must greater than or equal :rule', - 'gt' => ':attribute must greater than :rule', - 'elt' => ':attribute must less than or equal :rule', - 'lt' => ':attribute must less than :rule', - 'eq' => ':attribute must equal :rule', - 'unique' => ':attribute has exists', - 'regex' => ':attribute not conform to the rules', - 'method' => 'invalid Request method', - 'token' => 'invalid token', - 'fileSize' => 'filesize not match', - 'fileExt' => 'extensions to upload is not allowed', - 'fileMime' => 'mimetype to upload is not allowed', - ]; - - /** - * 当前验证场景 - * @var string - */ - protected $currentScene; - - /** - * 内置正则验证规则 - * @var array - */ - protected $defaultRegex = [ - 'alpha' => '/^[A-Za-z]+$/', - 'alphaNum' => '/^[A-Za-z0-9]+$/', - 'alphaDash' => '/^[A-Za-z0-9\-\_]+$/', - 'chs' => '/^[\x{4e00}-\x{9fa5}\x{9fa6}-\x{9fef}\x{3400}-\x{4db5}\x{20000}-\x{2ebe0}]+$/u', - 'chsAlpha' => '/^[\x{4e00}-\x{9fa5}\x{9fa6}-\x{9fef}\x{3400}-\x{4db5}\x{20000}-\x{2ebe0}a-zA-Z]+$/u', - 'chsAlphaNum' => '/^[\x{4e00}-\x{9fa5}\x{9fa6}-\x{9fef}\x{3400}-\x{4db5}\x{20000}-\x{2ebe0}a-zA-Z0-9]+$/u', - 'chsDash' => '/^[\x{4e00}-\x{9fa5}\x{9fa6}-\x{9fef}\x{3400}-\x{4db5}\x{20000}-\x{2ebe0}a-zA-Z0-9\_\-]+$/u', - 'mobile' => '/^1[3-9]\d{9}$/', - 'idCard' => '/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/', - 'zip' => '/\d{6}/', - ]; - - /** - * Filter_var 规则 - * @var array - */ - protected $filter = [ - 'email' => FILTER_VALIDATE_EMAIL, - 'ip' => [FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6], - 'integer' => FILTER_VALIDATE_INT, - 'url' => FILTER_VALIDATE_URL, - 'macAddr' => FILTER_VALIDATE_MAC, - 'float' => FILTER_VALIDATE_FLOAT, - ]; - - /** - * 验证场景定义 - * @var array - */ - protected $scene = []; - - /** - * 验证失败错误信息 - * @var string|array - */ - protected $error = []; - - /** - * 是否批量验证 - * @var bool - */ - protected $batch = false; - - /** - * 验证失败是否抛出异常 - * @var bool - */ - protected $failException = false; - - /** - * 场景需要验证的规则 - * @var array - */ - protected $only = []; - - /** - * 场景需要移除的验证规则 - * @var array - */ - protected $remove = []; - - /** - * 场景需要追加的验证规则 - * @var array - */ - protected $append = []; - - /** - * 验证正则定义 - * @var array - */ - protected $regex = []; - - /** - * Db对象 - * @var Db - */ - protected $db; - - /** - * 语言对象 - * @var Lang - */ - protected $lang; - - /** - * 请求对象 - * @var Request - */ - protected $request; - - /** - * @var Closure[] - */ - protected static $maker = []; - - /** - * 构造方法 - * @access public - */ - public function __construct() - { - if (!empty(static::$maker)) { - foreach (static::$maker as $maker) { - call_user_func($maker, $this); - } - } - } - - /** - * 设置服务注入 - * @access public - * @param Closure $maker - * @return void - */ - public static function maker(Closure $maker) - { - static::$maker[] = $maker; - } - - /** - * 设置Lang对象 - * @access public - * @param Lang $lang Lang对象 - * @return void - */ - public function setLang(Lang $lang) - { - $this->lang = $lang; - } - - /** - * 设置Db对象 - * @access public - * @param Db $db Db对象 - * @return void - */ - public function setDb(Db $db) - { - $this->db = $db; - } - - /** - * 设置Request对象 - * @access public - * @param Request $request Request对象 - * @return void - */ - public function setRequest(Request $request) - { - $this->request = $request; - } - - /** - * 添加字段验证规则 - * @access protected - * @param string|array $name 字段名称或者规则数组 - * @param mixed $rule 验证规则或者字段描述信息 - * @return $this - */ - public function rule($name, $rule = '') - { - if (is_array($name)) { - $this->rule = $name + $this->rule; - if (is_array($rule)) { - $this->field = array_merge($this->field, $rule); - } - } else { - $this->rule[$name] = $rule; - } - - return $this; - } - - /** - * 注册验证(类型)规则 - * @access public - * @param string $type 验证规则类型 - * @param callable $callback callback方法(或闭包) - * @param string $message 验证失败提示信息 - * @return $this - */ - public function extend(string $type, callable $callback = null, string $message = null) - { - $this->type[$type] = $callback; - - if ($message) { - $this->typeMsg[$type] = $message; - } - - return $this; - } - - /** - * 设置验证规则的默认提示信息 - * @access public - * @param string|array $type 验证规则类型名称或者数组 - * @param string $msg 验证提示信息 - * @return void - */ - public function setTypeMsg($type, string $msg = null): void - { - if (is_array($type)) { - $this->typeMsg = array_merge($this->typeMsg, $type); - } else { - $this->typeMsg[$type] = $msg; - } - } - - /** - * 设置提示信息 - * @access public - * @param array $message 错误信息 - * @return Validate - */ - public function message(array $message) - { - $this->message = array_merge($this->message, $message); - - return $this; - } - - /** - * 设置验证场景 - * @access public - * @param string $name 场景名 - * @return $this - */ - public function scene(string $name) - { - // 设置当前场景 - $this->currentScene = $name; - - return $this; - } - - /** - * 判断是否存在某个验证场景 - * @access public - * @param string $name 场景名 - * @return bool - */ - public function hasScene(string $name): bool - { - return isset($this->scene[$name]) || method_exists($this, 'scene' . $name); - } - - /** - * 设置批量验证 - * @access public - * @param bool $batch 是否批量验证 - * @return $this - */ - public function batch(bool $batch = true) - { - $this->batch = $batch; - - return $this; - } - - /** - * 设置验证失败后是否抛出异常 - * @access protected - * @param bool $fail 是否抛出异常 - * @return $this - */ - public function failException(bool $fail = true) - { - $this->failException = $fail; - - return $this; - } - - /** - * 指定需要验证的字段列表 - * @access public - * @param array $fields 字段名 - * @return $this - */ - public function only(array $fields) - { - $this->only = $fields; - - return $this; - } - - /** - * 移除某个字段的验证规则 - * @access public - * @param string|array $field 字段名 - * @param mixed $rule 验证规则 true 移除所有规则 - * @return $this - */ - public function remove($field, $rule = null) - { - if (is_array($field)) { - foreach ($field as $key => $rule) { - if (is_int($key)) { - $this->remove($rule); - } else { - $this->remove($key, $rule); - } - } - } else { - if (is_string($rule)) { - $rule = explode('|', $rule); - } - - $this->remove[$field] = $rule; - } - - return $this; - } - - /** - * 追加某个字段的验证规则 - * @access public - * @param string|array $field 字段名 - * @param mixed $rule 验证规则 - * @return $this - */ - public function append($field, $rule = null) - { - if (is_array($field)) { - foreach ($field as $key => $rule) { - $this->append($key, $rule); - } - } else { - if (is_string($rule)) { - $rule = explode('|', $rule); - } - - $this->append[$field] = $rule; - } - - return $this; - } - - /** - * 数据自动验证 - * @access public - * @param array $data 数据 - * @param array $rules 验证规则 - * @return bool - */ - public function check(array $data, array $rules = []): bool - { - $this->error = []; - - if ($this->currentScene) { - $this->getScene($this->currentScene); - } - - if (empty($rules)) { - // 读取验证规则 - $rules = $this->rule; - } - - foreach ($this->append as $key => $rule) { - if (!isset($rules[$key])) { - $rules[$key] = $rule; - unset($this->append[$key]); - } - } - - foreach ($rules as $key => $rule) { - // field => 'rule1|rule2...' field => ['rule1','rule2',...] - if (strpos($key, '|')) { - // 字段|描述 用于指定属性名称 - [$key, $title] = explode('|', $key); - } else { - $title = $this->field[$key] ?? $key; - } - - // 场景检测 - if (!empty($this->only) && !in_array($key, $this->only)) { - continue; - } - - // 获取数据 支持二维数组 - $value = $this->getDataValue($data, $key); - - // 字段验证 - if ($rule instanceof Closure) { - $result = call_user_func_array($rule, [$value, $data]); - } elseif ($rule instanceof ValidateRule) { - // 验证因子 - $result = $this->checkItem($key, $value, $rule->getRule(), $data, $rule->getTitle() ?: $title, $rule->getMsg()); - } else { - $result = $this->checkItem($key, $value, $rule, $data, $title); - } - - if (true !== $result) { - // 没有返回true 则表示验证失败 - if (!empty($this->batch)) { - // 批量验证 - $this->error[$key] = $result; - } elseif ($this->failException) { - throw new ValidateException($result); - } else { - $this->error = $result; - return false; - } - } - } - - if (!empty($this->error)) { - if ($this->failException) { - throw new ValidateException($this->error); - } - return false; - } - - return true; - } - - /** - * 根据验证规则验证数据 - * @access public - * @param mixed $value 字段值 - * @param mixed $rules 验证规则 - * @return bool - */ - public function checkRule($value, $rules): bool - { - if ($rules instanceof Closure) { - return call_user_func_array($rules, [$value]); - } elseif ($rules instanceof ValidateRule) { - $rules = $rules->getRule(); - } elseif (is_string($rules)) { - $rules = explode('|', $rules); - } - - foreach ($rules as $key => $rule) { - if ($rule instanceof Closure) { - $result = call_user_func_array($rule, [$value]); - } else { - // 判断验证类型 - [$type, $rule] = $this->getValidateType($key, $rule); - - $callback = $this->type[$type] ?? [$this, $type]; - - $result = call_user_func_array($callback, [$value, $rule]); - } - - if (true !== $result) { - if ($this->failException) { - throw new ValidateException($result); - } - - return $result; - } - } - - return true; - } - - /** - * 验证单个字段规则 - * @access protected - * @param string $field 字段名 - * @param mixed $value 字段值 - * @param mixed $rules 验证规则 - * @param array $data 数据 - * @param string $title 字段描述 - * @param array $msg 提示信息 - * @return mixed - */ - protected function checkItem(string $field, $value, $rules, $data, string $title = '', array $msg = []) - { - if (isset($this->remove[$field]) && true === $this->remove[$field] && empty($this->append[$field])) { - // 字段已经移除 无需验证 - return true; - } - - // 支持多规则验证 require|in:a,b,c|... 或者 ['require','in'=>'a,b,c',...] - if (is_string($rules)) { - $rules = explode('|', $rules); - } - - if (isset($this->append[$field])) { - // 追加额外的验证规则 - $rules = array_unique(array_merge($rules, $this->append[$field]), SORT_REGULAR); - unset($this->append[$field]); - } - - if (empty($rules)) { - return true; - } - - $i = 0; - foreach ($rules as $key => $rule) { - if ($rule instanceof Closure) { - $result = call_user_func_array($rule, [$value, $data]); - $info = is_numeric($key) ? '' : $key; - } else { - // 判断验证类型 - [$type, $rule, $info] = $this->getValidateType($key, $rule); - - if (isset($this->append[$field]) && in_array($info, $this->append[$field])) { - } elseif (isset($this->remove[$field]) && in_array($info, $this->remove[$field])) { - // 规则已经移除 - $i++; - continue; - } - - if (isset($this->type[$type])) { - $result = call_user_func_array($this->type[$type], [$value, $rule, $data, $field, $title]); - } elseif ('must' == $info || 0 === strpos($info, 'require') || (!is_null($value) && '' !== $value)) { - $result = call_user_func_array([$this, $type], [$value, $rule, $data, $field, $title]); - } else { - $result = true; - } - } - - if (false === $result) { - // 验证失败 返回错误信息 - if (!empty($msg[$i])) { - $message = $msg[$i]; - if (is_string($message) && strpos($message, '{%') === 0) { - $message = $this->lang->get(substr($message, 2, -1)); - } - } else { - $message = $this->getRuleMsg($field, $title, $info, $rule); - } - - return $message; - } elseif (true !== $result) { - // 返回自定义错误信息 - if (is_string($result) && false !== strpos($result, ':')) { - $result = str_replace(':attribute', $title, $result); - - if (strpos($result, ':rule') && is_scalar($rule)) { - $result = str_replace(':rule', (string) $rule, $result); - } - } - - return $result; - } - $i++; - } - - return $result ?? true; - } - - /** - * 获取当前验证类型及规则 - * @access public - * @param mixed $key - * @param mixed $rule - * @return array - */ - protected function getValidateType($key, $rule): array - { - // 判断验证类型 - if (!is_numeric($key)) { - if (isset($this->alias[$key])) { - // 判断别名 - $key = $this->alias[$key]; - } - return [$key, $rule, $key]; - } - - if (strpos($rule, ':')) { - [$type, $rule] = explode(':', $rule, 2); - if (isset($this->alias[$type])) { - // 判断别名 - $type = $this->alias[$type]; - } - $info = $type; - } elseif (method_exists($this, $rule)) { - $type = $rule; - $info = $rule; - $rule = ''; - } else { - $type = 'is'; - $info = $rule; - } - - return [$type, $rule, $info]; - } - - /** - * 验证是否和某个字段的值一致 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @param string $field 字段名 - * @return bool - */ - public function confirm($value, $rule, array $data = [], string $field = ''): bool - { - if ('' == $rule) { - if (strpos($field, '_confirm')) { - $rule = strstr($field, '_confirm', true); - } else { - $rule = $field . '_confirm'; - } - } - - return $this->getDataValue($data, $rule) === $value; - } - - /** - * 验证是否和某个字段的值是否不同 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function different($value, $rule, array $data = []): bool - { - return $this->getDataValue($data, $rule) != $value; - } - - /** - * 验证是否大于等于某个值 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function egt($value, $rule, array $data = []): bool - { - return $value >= $this->getDataValue($data, $rule); - } - - /** - * 验证是否大于某个值 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function gt($value, $rule, array $data = []): bool - { - return $value > $this->getDataValue($data, $rule); - } - - /** - * 验证是否小于等于某个值 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function elt($value, $rule, array $data = []): bool - { - return $value <= $this->getDataValue($data, $rule); - } - - /** - * 验证是否小于某个值 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function lt($value, $rule, array $data = []): bool - { - return $value < $this->getDataValue($data, $rule); - } - - /** - * 验证是否等于某个值 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function eq($value, $rule): bool - { - return $value == $rule; - } - - /** - * 必须验证 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function must($value, $rule = null): bool - { - return !empty($value) || '0' == $value; - } - - /** - * 验证字段值是否为有效格式 - * @access public - * @param mixed $value 字段值 - * @param string $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function is($value, string $rule, array $data = []): bool - { - switch (Str::camel($rule)) { - case 'require': - // 必须 - $result = !empty($value) || '0' == $value; - break; - case 'accepted': - // 接受 - $result = in_array($value, ['1', 'on', 'yes']); - break; - case 'date': - // 是否是一个有效日期 - $result = false !== strtotime($value); - break; - case 'activeUrl': - // 是否为有效的网址 - $result = checkdnsrr($value); - break; - case 'boolean': - case 'bool': - // 是否为布尔值 - $result = in_array($value, [true, false, 0, 1, '0', '1'], true); - break; - case 'number': - $result = ctype_digit((string) $value); - break; - case 'alphaNum': - $result = ctype_alnum($value); - break; - case 'array': - // 是否为数组 - $result = is_array($value); - break; - case 'file': - $result = $value instanceof File; - break; - case 'image': - $result = $value instanceof File && in_array($this->getImageType($value->getRealPath()), [1, 2, 3, 6]); - break; - case 'token': - $result = $this->token($value, '__token__', $data); - break; - default: - if (isset($this->type[$rule])) { - // 注册的验证规则 - $result = call_user_func_array($this->type[$rule], [$value]); - } elseif (function_exists('ctype_' . $rule)) { - // ctype验证规则 - $ctypeFun = 'ctype_' . $rule; - $result = $ctypeFun($value); - } elseif (isset($this->filter[$rule])) { - // Filter_var验证规则 - $result = $this->filter($value, $this->filter[$rule]); - } else { - // 正则验证 - $result = $this->regex($value, $rule); - } - } - - return $result; - } - - // 判断图像类型 - protected function getImageType($image) - { - if (function_exists('exif_imagetype')) { - return exif_imagetype($image); - } - - try { - $info = getimagesize($image); - return $info ? $info[2] : false; - } catch (\Exception $e) { - return false; - } - } - - /** - * 验证表单令牌 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function token($value, string $rule, array $data): bool - { - $rule = !empty($rule) ? $rule : '__token__'; - return $this->request->checkToken($rule, $data); - } - - /** - * 验证是否为合格的域名或者IP 支持A,MX,NS,SOA,PTR,CNAME,AAAA,A6, SRV,NAPTR,TXT 或者 ANY类型 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function activeUrl(string $value, string $rule = 'MX'): bool - { - if (!in_array($rule, ['A', 'MX', 'NS', 'SOA', 'PTR', 'CNAME', 'AAAA', 'A6', 'SRV', 'NAPTR', 'TXT', 'ANY'])) { - $rule = 'MX'; - } - - return checkdnsrr($value, $rule); - } - - /** - * 验证是否有效IP - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 ipv4 ipv6 - * @return bool - */ - public function ip($value, string $rule = 'ipv4'): bool - { - if (!in_array($rule, ['ipv4', 'ipv6'])) { - $rule = 'ipv4'; - } - - return $this->filter($value, [FILTER_VALIDATE_IP, 'ipv6' == $rule ? FILTER_FLAG_IPV6 : FILTER_FLAG_IPV4]); - } - - /** - * 检测上传文件后缀 - * @access public - * @param File $file - * @param array|string $ext 允许后缀 - * @return bool - */ - protected function checkExt(File $file, $ext): bool - { - if (is_string($ext)) { - $ext = explode(',', $ext); - } - - return in_array(strtolower($file->extension()), $ext); - } - - /** - * 检测上传文件大小 - * @access public - * @param File $file - * @param integer $size 最大大小 - * @return bool - */ - protected function checkSize(File $file, $size): bool - { - return $file->getSize() <= (int) $size; - } - - /** - * 检测上传文件类型 - * @access public - * @param File $file - * @param array|string $mime 允许类型 - * @return bool - */ - protected function checkMime(File $file, $mime): bool - { - if (is_string($mime)) { - $mime = explode(',', $mime); - } - - return in_array(strtolower($file->getMime()), $mime); - } - - /** - * 验证上传文件后缀 - * @access public - * @param mixed $file 上传文件 - * @param mixed $rule 验证规则 - * @return bool - */ - public function fileExt($file, $rule): bool - { - if (is_array($file)) { - foreach ($file as $item) { - if (!($item instanceof File) || !$this->checkExt($item, $rule)) { - return false; - } - } - return true; - } elseif ($file instanceof File) { - return $this->checkExt($file, $rule); - } - - return false; - } - - /** - * 验证上传文件类型 - * @access public - * @param mixed $file 上传文件 - * @param mixed $rule 验证规则 - * @return bool - */ - public function fileMime($file, $rule): bool - { - if (is_array($file)) { - foreach ($file as $item) { - if (!($item instanceof File) || !$this->checkMime($item, $rule)) { - return false; - } - } - return true; - } elseif ($file instanceof File) { - return $this->checkMime($file, $rule); - } - - return false; - } - - /** - * 验证上传文件大小 - * @access public - * @param mixed $file 上传文件 - * @param mixed $rule 验证规则 - * @return bool - */ - public function fileSize($file, $rule): bool - { - if (is_array($file)) { - foreach ($file as $item) { - if (!($item instanceof File) || !$this->checkSize($item, $rule)) { - return false; - } - } - return true; - } elseif ($file instanceof File) { - return $this->checkSize($file, $rule); - } - - return false; - } - - /** - * 验证图片的宽高及类型 - * @access public - * @param mixed $file 上传文件 - * @param mixed $rule 验证规则 - * @return bool - */ - public function image($file, $rule): bool - { - if (!($file instanceof File)) { - return false; - } - - if ($rule) { - $rule = explode(',', $rule); - - [$width, $height, $type] = getimagesize($file->getRealPath()); - - if (isset($rule[2])) { - $imageType = strtolower($rule[2]); - - if ('jpg' == $imageType) { - $imageType = 'jpeg'; - } - - if (image_type_to_extension($type, false) != $imageType) { - return false; - } - } - - [$w, $h] = $rule; - - return $w == $width && $h == $height; - } - - return in_array($this->getImageType($file->getRealPath()), [1, 2, 3, 6]); - } - - /** - * 验证时间和日期是否符合指定格式 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function dateFormat($value, $rule): bool - { - $info = date_parse_from_format($rule, $value); - return 0 == $info['warning_count'] && 0 == $info['error_count']; - } - - /** - * 验证是否唯一 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 格式:数据表,字段名,排除ID,主键名 - * @param array $data 数据 - * @param string $field 验证字段名 - * @return bool - */ - public function unique($value, $rule, array $data = [], string $field = ''): bool - { - if (is_string($rule)) { - $rule = explode(',', $rule); - } - - if (false !== strpos($rule[0], '\\')) { - // 指定模型类 - $db = new $rule[0]; - } else { - $db = $this->db->name($rule[0]); - } - - $key = $rule[1] ?? $field; - $map = []; - - if (strpos($key, '^')) { - // 支持多个字段验证 - $fields = explode('^', $key); - foreach ($fields as $key) { - if (isset($data[$key])) { - $map[] = [$key, '=', $data[$key]]; - } - } - } elseif (isset($data[$field])) { - $map[] = [$key, '=', $data[$field]]; - } else { - $map = []; - } - - $pk = !empty($rule[3]) ? $rule[3] : $db->getPk(); - - if (is_string($pk)) { - if (isset($rule[2])) { - $map[] = [$pk, '<>', $rule[2]]; - } elseif (isset($data[$pk])) { - $map[] = [$pk, '<>', $data[$pk]]; - } - } - - if ($db->where($map)->field($pk)->find()) { - return false; - } - - return true; - } - - /** - * 使用filter_var方式验证 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function filter($value, $rule): bool - { - if (is_string($rule) && strpos($rule, ',')) { - [$rule, $param] = explode(',', $rule); - } elseif (is_array($rule)) { - $param = $rule[1] ?? 0; - $rule = $rule[0]; - } else { - $param = 0; - } - - return false !== filter_var($value, is_int($rule) ? $rule : filter_id($rule), $param); - } - - /** - * 验证某个字段等于某个值的时候必须 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function requireIf($value, $rule, array $data = []): bool - { - [$field, $val] = explode(',', $rule); - - if ($this->getDataValue($data, $field) == $val) { - return !empty($value) || '0' == $value; - } - - return true; - } - - /** - * 通过回调方法验证某个字段是否必须 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function requireCallback($value, $rule, array $data = []): bool - { - $result = call_user_func_array([$this, $rule], [$value, $data]); - - if ($result) { - return !empty($value) || '0' == $value; - } - - return true; - } - - /** - * 验证某个字段有值的情况下必须 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function requireWith($value, $rule, array $data = []): bool - { - $val = $this->getDataValue($data, $rule); - - if (!empty($val)) { - return !empty($value) || '0' == $value; - } - - return true; - } - - /** - * 验证某个字段没有值的情况下必须 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function requireWithout($value, $rule, array $data = []): bool - { - $val = $this->getDataValue($data, $rule); - - if (empty($val)) { - return !empty($value) || '0' == $value; - } - - return true; - } - - /** - * 验证是否在范围内 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function in($value, $rule): bool - { - return in_array($value, is_array($rule) ? $rule : explode(',', $rule)); - } - - /** - * 验证是否不在某个范围 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function notIn($value, $rule): bool - { - return !in_array($value, is_array($rule) ? $rule : explode(',', $rule)); - } - - /** - * between验证数据 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function between($value, $rule): bool - { - if (is_string($rule)) { - $rule = explode(',', $rule); - } - [$min, $max] = $rule; - - return $value >= $min && $value <= $max; - } - - /** - * 使用notbetween验证数据 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function notBetween($value, $rule): bool - { - if (is_string($rule)) { - $rule = explode(',', $rule); - } - [$min, $max] = $rule; - - return $value < $min || $value > $max; - } - - /** - * 验证数据长度 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function length($value, $rule): bool - { - if (is_array($value)) { - $length = count($value); - } elseif ($value instanceof File) { - $length = $value->getSize(); - } else { - $length = mb_strlen((string) $value); - } - - if (is_string($rule) && strpos($rule, ',')) { - // 长度区间 - [$min, $max] = explode(',', $rule); - return $length >= $min && $length <= $max; - } - - // 指定长度 - return $length == $rule; - } - - /** - * 验证数据最大长度 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function max($value, $rule): bool - { - if (is_array($value)) { - $length = count($value); - } elseif ($value instanceof File) { - $length = $value->getSize(); - } else { - $length = mb_strlen((string) $value); - } - - return $length <= $rule; - } - - /** - * 验证数据最小长度 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function min($value, $rule): bool - { - if (is_array($value)) { - $length = count($value); - } elseif ($value instanceof File) { - $length = $value->getSize(); - } else { - $length = mb_strlen((string) $value); - } - - return $length >= $rule; - } - - /** - * 验证日期 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function after($value, $rule, array $data = []): bool - { - return strtotime($value) >= strtotime($rule); - } - - /** - * 验证日期 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function before($value, $rule, array $data = []): bool - { - return strtotime($value) <= strtotime($rule); - } - - /** - * 验证日期 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function afterWith($value, $rule, array $data = []): bool - { - $rule = $this->getDataValue($data, $rule); - return !is_null($rule) && strtotime($value) >= strtotime($rule); - } - - /** - * 验证日期 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @param array $data 数据 - * @return bool - */ - public function beforeWith($value, $rule, array $data = []): bool - { - $rule = $this->getDataValue($data, $rule); - return !is_null($rule) && strtotime($value) <= strtotime($rule); - } - - /** - * 验证有效期 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function expire($value, $rule): bool - { - if (is_string($rule)) { - $rule = explode(',', $rule); - } - - [$start, $end] = $rule; - - if (!is_numeric($start)) { - $start = strtotime($start); - } - - if (!is_numeric($end)) { - $end = strtotime($end); - } - - return time() >= $start && time() <= $end; - } - - /** - * 验证IP许可 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function allowIp($value, $rule): bool - { - return in_array($value, is_array($rule) ? $rule : explode(',', $rule)); - } - - /** - * 验证IP禁用 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 - * @return bool - */ - public function denyIp($value, $rule): bool - { - return !in_array($value, is_array($rule) ? $rule : explode(',', $rule)); - } - - /** - * 使用正则验证数据 - * @access public - * @param mixed $value 字段值 - * @param mixed $rule 验证规则 正则规则或者预定义正则名 - * @return bool - */ - public function regex($value, $rule): bool - { - if (isset($this->regex[$rule])) { - $rule = $this->regex[$rule]; - } elseif (isset($this->defaultRegex[$rule])) { - $rule = $this->defaultRegex[$rule]; - } - - if (is_string($rule) && 0 !== strpos($rule, '/') && !preg_match('/\/[imsU]{0,4}$/', $rule)) { - // 不是正则表达式则两端补上/ - $rule = '/^' . $rule . '$/'; - } - - return is_scalar($value) && 1 === preg_match($rule, (string) $value); - } - - /** - * 获取错误信息 - * @return array|string - */ - public function getError() - { - return $this->error; - } - - /** - * 获取数据值 - * @access protected - * @param array $data 数据 - * @param string $key 数据标识 支持二维 - * @return mixed - */ - protected function getDataValue(array $data, $key) - { - if (is_numeric($key)) { - $value = $key; - } elseif (is_string($key) && strpos($key, '.')) { - // 支持多维数组验证 - foreach (explode('.', $key) as $key) { - if (!isset($data[$key])) { - $value = null; - break; - } - $value = $data = $data[$key]; - } - } else { - $value = $data[$key] ?? null; - } - - return $value; - } - - /** - * 获取验证规则的错误提示信息 - * @access protected - * @param string $attribute 字段英文名 - * @param string $title 字段描述名 - * @param string $type 验证规则名称 - * @param mixed $rule 验证规则数据 - * @return string|array - */ - protected function getRuleMsg(string $attribute, string $title, string $type, $rule) - { - if (isset($this->message[$attribute . '.' . $type])) { - $msg = $this->message[$attribute . '.' . $type]; - } elseif (isset($this->message[$attribute][$type])) { - $msg = $this->message[$attribute][$type]; - } elseif (isset($this->message[$attribute])) { - $msg = $this->message[$attribute]; - } elseif (isset($this->typeMsg[$type])) { - $msg = $this->typeMsg[$type]; - } elseif (0 === strpos($type, 'require')) { - $msg = $this->typeMsg['require']; - } else { - $msg = $title . $this->lang->get('not conform to the rules'); - } - - if (is_array($msg)) { - return $this->errorMsgIsArray($msg, $rule, $title); - } - - return $this->parseErrorMsg($msg, $rule, $title); - } - - /** - * 获取验证规则的错误提示信息 - * @access protected - * @param string $msg 错误信息 - * @param mixed $rule 验证规则数据 - * @param string $title 字段描述名 - * @return string|array - */ - protected function parseErrorMsg(string $msg, $rule, string $title) - { - if (0 === strpos($msg, '{%')) { - $msg = $this->lang->get(substr($msg, 2, -1)); - } elseif ($this->lang->has($msg)) { - $msg = $this->lang->get($msg); - } - - if (is_array($msg)) { - return $this->errorMsgIsArray($msg, $rule, $title); - } - - // rule若是数组则转为字符串 - if (is_array($rule)) { - $rule = implode(',', $rule); - } - - if (is_scalar($rule) && false !== strpos($msg, ':')) { - // 变量替换 - if (is_string($rule) && strpos($rule, ',')) { - $array = array_pad(explode(',', $rule), 3, ''); - } else { - $array = array_pad([], 3, ''); - } - - $msg = str_replace( - [':attribute', ':1', ':2', ':3'], - [$title, $array[0], $array[1], $array[2]], - $msg - ); - - if (strpos($msg, ':rule')) { - $msg = str_replace(':rule', (string) $rule, $msg); - } - } - - return $msg; - } - - /** - * 错误信息数组处理 - * @access protected - * @param array $msg 错误信息 - * @param mixed $rule 验证规则数据 - * @param string $title 字段描述名 - * @return array - */ - protected function errorMsgIsArray(array $msg, $rule, string $title) - { - foreach ($msg as $key => $val) { - if (is_string($val)) { - $msg[$key] = $this->parseErrorMsg($val, $rule, $title); - } - } - return $msg; - } - - /** - * 获取数据验证的场景 - * @access protected - * @param string $scene 验证场景 - * @return void - */ - protected function getScene(string $scene): void - { - $this->only = $this->append = $this->remove = []; - - if (method_exists($this, 'scene' . $scene)) { - call_user_func([$this, 'scene' . $scene]); - } elseif (isset($this->scene[$scene])) { - // 如果设置了验证适用场景 - $this->only = $this->scene[$scene]; - } - } - - /** - * 动态方法 直接调用is方法进行验证 - * @access public - * @param string $method 方法名 - * @param array $args 调用参数 - * @return bool - */ - public function __call($method, $args) - { - if ('is' == strtolower(substr($method, 0, 2))) { - $method = substr($method, 2); - } - - array_push($args, lcfirst($method)); - - return call_user_func_array([$this, 'is'], $args); - } -} diff --git a/vendor/topthink/framework/src/think/View.php b/vendor/topthink/framework/src/think/View.php deleted file mode 100644 index 2e71088..0000000 --- a/vendor/topthink/framework/src/think/View.php +++ /dev/null @@ -1,191 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use think\helper\Arr; - -/** - * 视图类 - * @package think - */ -class View extends Manager -{ - - protected $namespace = '\\think\\view\\driver\\'; - - /** - * 模板变量 - * @var array - */ - protected $data = []; - - /** - * 内容过滤 - * @var mixed - */ - protected $filter; - - /** - * 获取模板引擎 - * @access public - * @param string $type 模板引擎类型 - * @return $this - */ - public function engine(string $type = null) - { - return $this->driver($type); - } - - /** - * 模板变量赋值 - * @access public - * @param string|array $name 模板变量 - * @param mixed $value 变量值 - * @return $this - */ - public function assign($name, $value = null) - { - if (is_array($name)) { - $this->data = array_merge($this->data, $name); - } else { - $this->data[$name] = $value; - } - - return $this; - } - - /** - * 视图过滤 - * @access public - * @param Callable $filter 过滤方法或闭包 - * @return $this - */ - public function filter(callable $filter = null) - { - $this->filter = $filter; - return $this; - } - - /** - * 解析和获取模板内容 用于输出 - * @access public - * @param string $template 模板文件名或者内容 - * @param array $vars 模板变量 - * @return string - * @throws \Exception - */ - public function fetch(string $template = '', array $vars = []): string - { - return $this->getContent(function () use ($vars, $template) { - $this->engine()->fetch($template, array_merge($this->data, $vars)); - }); - } - - /** - * 渲染内容输出 - * @access public - * @param string $content 内容 - * @param array $vars 模板变量 - * @return string - */ - public function display(string $content, array $vars = []): string - { - return $this->getContent(function () use ($vars, $content) { - $this->engine()->display($content, array_merge($this->data, $vars)); - }); - } - - /** - * 获取模板引擎渲染内容 - * @param $callback - * @return string - * @throws \Exception - */ - protected function getContent($callback): string - { - // 页面缓存 - ob_start(); - if (PHP_VERSION > 8.0) { - ob_implicit_flush(false); - } else { - ob_implicit_flush(0); - } - - // 渲染输出 - try { - $callback(); - } catch (\Exception $e) { - ob_end_clean(); - throw $e; - } - - // 获取并清空缓存 - $content = ob_get_clean(); - - if ($this->filter) { - $content = call_user_func_array($this->filter, [$content]); - } - - return $content; - } - - /** - * 模板变量赋值 - * @access public - * @param string $name 变量名 - * @param mixed $value 变量值 - */ - public function __set($name, $value) - { - $this->data[$name] = $value; - } - - /** - * 取得模板显示变量的值 - * @access protected - * @param string $name 模板变量 - * @return mixed - */ - public function __get($name) - { - return $this->data[$name]; - } - - /** - * 检测模板变量是否设置 - * @access public - * @param string $name 模板变量名 - * @return bool - */ - public function __isset($name) - { - return isset($this->data[$name]); - } - - protected function resolveConfig(string $name) - { - $config = $this->app->config->get('view', []); - Arr::forget($config, 'type'); - return $config; - } - - /** - * 默认驱动 - * @return string|null - */ - public function getDefaultDriver() - { - return $this->app->config->get('view.type', 'php'); - } - -} diff --git a/vendor/topthink/framework/src/think/cache/Driver.php b/vendor/topthink/framework/src/think/cache/Driver.php deleted file mode 100644 index 7dc0d30..0000000 --- a/vendor/topthink/framework/src/think/cache/Driver.php +++ /dev/null @@ -1,359 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\cache; - -use Closure; -use DateInterval; -use DateTime; -use DateTimeInterface; -use Exception; -use Psr\SimpleCache\CacheInterface; -use think\Container; -use think\contract\CacheHandlerInterface; -use think\exception\InvalidArgumentException; -use throwable; - -/** - * 缓存基础类 - */ -abstract class Driver implements CacheInterface, CacheHandlerInterface -{ - /** - * 驱动句柄 - * @var object - */ - protected $handler = null; - - /** - * 缓存读取次数 - * @var integer - */ - protected $readTimes = 0; - - /** - * 缓存写入次数 - * @var integer - */ - protected $writeTimes = 0; - - /** - * 缓存参数 - * @var array - */ - protected $options = []; - - /** - * 缓存标签 - * @var array - */ - protected $tag = []; - - /** - * 获取有效期 - * @access protected - * @param integer|DateTimeInterface|DateInterval $expire 有效期 - * @return int - */ - protected function getExpireTime($expire): int - { - if ($expire instanceof DateTimeInterface) { - $expire = $expire->getTimestamp() - time(); - } elseif ($expire instanceof DateInterval) { - $expire = DateTime::createFromFormat('U', (string) time()) - ->add($expire) - ->format('U') - time(); - } - - return (int) $expire; - } - - /** - * 获取实际的缓存标识 - * @access public - * @param string $name 缓存名 - * @return string - */ - public function getCacheKey(string $name): string - { - return $this->options['prefix'] . $name; - } - - /** - * 读取缓存并删除 - * @access public - * @param string $name 缓存变量名 - * @return mixed - */ - public function pull(string $name) - { - $result = $this->get($name, false); - - if ($result) { - $this->delete($name); - return $result; - } - } - - /** - * 追加(数组)缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @return void - */ - public function push(string $name, $value): void - { - $item = $this->get($name, []); - - if (!is_array($item)) { - throw new InvalidArgumentException('only array cache can be push'); - } - - $item[] = $value; - - if (count($item) > 1000) { - array_shift($item); - } - - $item = array_unique($item); - - $this->set($name, $item); - } - - /** - * 追加TagSet数据 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @return void - */ - public function append(string $name, $value): void - { - $this->push($name, $value); - } - - /** - * 如果不存在则写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param int $expire 有效时间 0为永久 - * @return mixed - */ - public function remember(string $name, $value, $expire = null) - { - if ($this->has($name)) { - if (($hit = $this->get($name)) !== null) { - return $hit; - } - } - - $time = time(); - - while ($time + 5 > time() && $this->has($name . '_lock')) { - // 存在锁定则等待 - usleep(200000); - } - - try { - // 锁定 - $this->set($name . '_lock', true); - - if ($value instanceof Closure) { - // 获取缓存数据 - $value = Container::getInstance()->invokeFunction($value); - } - - // 缓存数据 - $this->set($name, $value, $expire); - - // 解锁 - $this->delete($name . '_lock'); - } catch (Exception | throwable $e) { - $this->delete($name . '_lock'); - throw $e; - } - - return $value; - } - - /** - * 缓存标签 - * @access public - * @param string|array $name 标签名 - * @return TagSet - */ - public function tag($name): TagSet - { - $name = (array) $name; - $key = implode('-', $name); - - if (!isset($this->tag[$key])) { - $this->tag[$key] = new TagSet($name, $this); - } - - return $this->tag[$key]; - } - - /** - * 获取标签包含的缓存标识 - * @access public - * @param string $tag 标签标识 - * @return array - */ - public function getTagItems(string $tag): array - { - $name = $this->getTagKey($tag); - return $this->get($name, []); - } - - /** - * 获取实际标签名 - * @access public - * @param string $tag 标签名 - * @return string - */ - public function getTagKey(string $tag): string - { - return $this->options['tag_prefix'] . md5($tag); - } - - /** - * 序列化数据 - * @access protected - * @param mixed $data 缓存数据 - * @return string - */ - protected function serialize($data): string - { - if (is_numeric($data)) { - return (string) $data; - } - - $serialize = $this->options['serialize'][0] ?? "serialize"; - - return $serialize($data); - } - - /** - * 反序列化数据 - * @access protected - * @param string $data 缓存数据 - * @return mixed - */ - protected function unserialize($data) - { - if (is_numeric($data)) { - return $data; - } - - $unserialize = $this->options['serialize'][1] ?? "unserialize"; - - return $unserialize($data); - } - - /** - * 返回句柄对象,可执行其它高级方法 - * - * @access public - * @return object - */ - public function handler() - { - return $this->handler; - } - - /** - * 返回缓存读取次数 - * @access public - * @return int - */ - public function getReadTimes(): int - { - return $this->readTimes; - } - - /** - * 返回缓存写入次数 - * @access public - * @return int - */ - public function getWriteTimes(): int - { - return $this->writeTimes; - } - - /** - * 读取缓存 - * @access public - * @param iterable $keys 缓存变量名 - * @param mixed $default 默认值 - * @return iterable - * @throws InvalidArgumentException - */ - public function getMultiple($keys, $default = null): iterable - { - $result = []; - - foreach ($keys as $key) { - $result[$key] = $this->get($key, $default); - } - - return $result; - } - - /** - * 写入缓存 - * @access public - * @param iterable $values 缓存数据 - * @param null|int|\DateInterval $ttl 有效时间 0为永久 - * @return bool - */ - public function setMultiple($values, $ttl = null): bool - { - foreach ($values as $key => $val) { - $result = $this->set($key, $val, $ttl); - - if (false === $result) { - return false; - } - } - - return true; - } - - /** - * 删除缓存 - * @access public - * @param iterable $keys 缓存变量名 - * @return bool - * @throws InvalidArgumentException - */ - public function deleteMultiple($keys): bool - { - foreach ($keys as $key) { - $result = $this->delete($key); - - if (false === $result) { - return false; - } - } - - return true; - } - - public function __call($method, $args) - { - return call_user_func_array([$this->handler, $method], $args); - } -} diff --git a/vendor/topthink/framework/src/think/cache/TagSet.php b/vendor/topthink/framework/src/think/cache/TagSet.php deleted file mode 100644 index 5ba2076..0000000 --- a/vendor/topthink/framework/src/think/cache/TagSet.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\cache; - -/** - * 标签集合 - */ -class TagSet -{ - /** - * 标签的缓存Key - * @var array - */ - protected $tag; - - /** - * 缓存句柄 - * @var Driver - */ - protected $handler; - - /** - * 架构函数 - * @access public - * @param array $tag 缓存标签 - * @param Driver $cache 缓存对象 - */ - public function __construct(array $tag, Driver $cache) - { - $this->tag = $tag; - $this->handler = $cache; - } - - /** - * 写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param integer|\DateTime $expire 有效时间(秒) - * @return bool - */ - public function set(string $name, $value, $expire = null): bool - { - $this->handler->set($name, $value, $expire); - - $this->append($name); - - return true; - } - - /** - * 追加缓存标识到标签 - * @access public - * @param string $name 缓存变量名 - * @return void - */ - public function append(string $name): void - { - $name = $this->handler->getCacheKey($name); - - foreach ($this->tag as $tag) { - $key = $this->handler->getTagKey($tag); - $this->handler->append($key, $name); - } - } - - /** - * 写入缓存 - * @access public - * @param iterable $values 缓存数据 - * @param null|int|\DateInterval $ttl 有效时间 0为永久 - * @return bool - */ - public function setMultiple($values, $ttl = null): bool - { - foreach ($values as $key => $val) { - $result = $this->set($key, $val, $ttl); - - if (false === $result) { - return false; - } - } - - return true; - } - - /** - * 如果不存在则写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param int $expire 有效时间 0为永久 - * @return mixed - */ - public function remember(string $name, $value, $expire = null) - { - $result = $this->handler->remember($name, $value, $expire); - - $this->append($name); - - return $result; - } - - /** - * 清除缓存 - * @access public - * @return bool - */ - public function clear(): bool - { - // 指定标签清除 - foreach ($this->tag as $tag) { - $names = $this->handler->getTagItems($tag); - $this->handler->clearTag($names); - - $key = $this->handler->getTagKey($tag); - $this->handler->delete($key); - } - - return true; - } -} diff --git a/vendor/topthink/framework/src/think/cache/driver/File.php b/vendor/topthink/framework/src/think/cache/driver/File.php deleted file mode 100644 index 70a4757..0000000 --- a/vendor/topthink/framework/src/think/cache/driver/File.php +++ /dev/null @@ -1,305 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\cache\driver; - -use FilesystemIterator; -use think\App; -use think\cache\Driver; - -/** - * 文件缓存类 - */ -class File extends Driver -{ - /** - * 配置参数 - * @var array - */ - protected $options = [ - 'expire' => 0, - 'cache_subdir' => true, - 'prefix' => '', - 'path' => '', - 'hash_type' => 'md5', - 'data_compress' => false, - 'tag_prefix' => 'tag:', - 'serialize' => [], - ]; - - /** - * 架构函数 - * @param App $app - * @param array $options 参数 - */ - public function __construct(App $app, array $options = []) - { - if (!empty($options)) { - $this->options = array_merge($this->options, $options); - } - - if (empty($this->options['path'])) { - $this->options['path'] = $app->getRuntimePath() . 'cache'; - } - - if (substr($this->options['path'], -1) != DIRECTORY_SEPARATOR) { - $this->options['path'] .= DIRECTORY_SEPARATOR; - } - } - - /** - * 取得变量的存储文件名 - * @access public - * @param string $name 缓存变量名 - * @return string - */ - public function getCacheKey(string $name): string - { - $name = hash($this->options['hash_type'], $name); - - if ($this->options['cache_subdir']) { - // 使用子目录 - $name = substr($name, 0, 2) . DIRECTORY_SEPARATOR . substr($name, 2); - } - - if ($this->options['prefix']) { - $name = $this->options['prefix'] . DIRECTORY_SEPARATOR . $name; - } - - return $this->options['path'] . $name . '.php'; - } - - /** - * 获取缓存数据 - * @param string $name 缓存标识名 - * @return array|null - */ - protected function getRaw(string $name) - { - $filename = $this->getCacheKey($name); - - if (!is_file($filename)) { - return; - } - - $content = @file_get_contents($filename); - - if (false !== $content) { - $expire = (int) substr($content, 8, 12); - if (0 != $expire && time() - $expire > filemtime($filename)) { - //缓存过期删除缓存文件 - $this->unlink($filename); - return; - } - - $content = substr($content, 32); - - if ($this->options['data_compress'] && function_exists('gzcompress')) { - //启用数据压缩 - $content = gzuncompress($content); - } - - return is_string($content) ? ['content' => $content, 'expire' => $expire] : null; - } - } - - /** - * 判断缓存是否存在 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function has($name): bool - { - return $this->getRaw($name) !== null; - } - - /** - * 读取缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function get($name, $default = null) - { - $this->readTimes++; - - $raw = $this->getRaw($name); - - return is_null($raw) ? $default : $this->unserialize($raw['content']); - } - - /** - * 写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param int|\DateTime $expire 有效时间 0为永久 - * @return bool - */ - public function set($name, $value, $expire = null): bool - { - $this->writeTimes++; - - if (is_null($expire)) { - $expire = $this->options['expire']; - } - - $expire = $this->getExpireTime($expire); - $filename = $this->getCacheKey($name); - - $dir = dirname($filename); - - if (!is_dir($dir)) { - try { - mkdir($dir, 0755, true); - } catch (\Exception $e) { - // 创建失败 - } - } - - $data = $this->serialize($value); - - if ($this->options['data_compress'] && function_exists('gzcompress')) { - //数据压缩 - $data = gzcompress($data, 3); - } - - $data = "<?php\n//" . sprintf('%012d', $expire) . "\n exit();?>\n" . $data; - - $result = file_put_contents($filename, $data, LOCK_EX); - - if ($result) { - clearstatcache(); - return true; - } - - return false; - } - - /** - * 自增缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function inc(string $name, int $step = 1) - { - if ($raw = $this->getRaw($name)) { - $value = $this->unserialize($raw['content']) + $step; - $expire = $raw['expire']; - } else { - $value = $step; - $expire = 0; - } - - return $this->set($name, $value, $expire) ? $value : false; - } - - /** - * 自减缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function dec(string $name, int $step = 1) - { - return $this->inc($name, -$step); - } - - /** - * 删除缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function delete($name): bool - { - $this->writeTimes++; - - return $this->unlink($this->getCacheKey($name)); - } - - /** - * 清除缓存 - * @access public - * @return bool - */ - public function clear(): bool - { - $this->writeTimes++; - - $dirname = $this->options['path'] . $this->options['prefix']; - - $this->rmdir($dirname); - - return true; - } - - /** - * 删除缓存标签 - * @access public - * @param array $keys 缓存标识列表 - * @return void - */ - public function clearTag(array $keys): void - { - foreach ($keys as $key) { - $this->unlink($key); - } - } - - /** - * 判断文件是否存在后,删除 - * @access private - * @param string $path - * @return bool - */ - private function unlink(string $path): bool - { - try { - return is_file($path) && unlink($path); - } catch (\Exception $e) { - return false; - } - } - - /** - * 删除文件夹 - * @param $dirname - * @return bool - */ - private function rmdir($dirname) - { - if (!is_dir($dirname)) { - return false; - } - - $items = new FilesystemIterator($dirname); - - foreach ($items as $item) { - if ($item->isDir() && !$item->isLink()) { - $this->rmdir($item->getPathname()); - } else { - $this->unlink($item->getPathname()); - } - } - - @rmdir($dirname); - - return true; - } - -} diff --git a/vendor/topthink/framework/src/think/cache/driver/Memcache.php b/vendor/topthink/framework/src/think/cache/driver/Memcache.php deleted file mode 100644 index 2fbbb9c..0000000 --- a/vendor/topthink/framework/src/think/cache/driver/Memcache.php +++ /dev/null @@ -1,209 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\cache\driver; - -use think\cache\Driver; - -/** - * Memcache缓存类 - */ -class Memcache extends Driver -{ - /** - * 配置参数 - * @var array - */ - protected $options = [ - 'host' => '127.0.0.1', - 'port' => 11211, - 'expire' => 0, - 'timeout' => 0, // 超时时间(单位:毫秒) - 'persistent' => true, - 'prefix' => '', - 'tag_prefix' => 'tag:', - 'serialize' => [], - ]; - - /** - * 架构函数 - * @access public - * @param array $options 缓存参数 - * @throws \BadFunctionCallException - */ - public function __construct(array $options = []) - { - if (!extension_loaded('memcache')) { - throw new \BadFunctionCallException('not support: memcache'); - } - - if (!empty($options)) { - $this->options = array_merge($this->options, $options); - } - - $this->handler = new \Memcache; - - // 支持集群 - $hosts = (array) $this->options['host']; - $ports = (array) $this->options['port']; - - if (empty($ports[0])) { - $ports[0] = 11211; - } - - // 建立连接 - foreach ($hosts as $i => $host) { - $port = $ports[$i] ?? $ports[0]; - $this->options['timeout'] > 0 ? - $this->handler->addServer($host, (int) $port, $this->options['persistent'], 1, (int) $this->options['timeout']) : - $this->handler->addServer($host, (int) $port, $this->options['persistent'], 1); - } - } - - /** - * 判断缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function has($name): bool - { - $key = $this->getCacheKey($name); - - return false !== $this->handler->get($key); - } - - /** - * 读取缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function get($name, $default = null) - { - $this->readTimes++; - - $result = $this->handler->get($this->getCacheKey($name)); - - return false !== $result ? $this->unserialize($result) : $default; - } - - /** - * 写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param int|\DateTime $expire 有效时间(秒) - * @return bool - */ - public function set($name, $value, $expire = null): bool - { - $this->writeTimes++; - - if (is_null($expire)) { - $expire = $this->options['expire']; - } - - $key = $this->getCacheKey($name); - $expire = $this->getExpireTime($expire); - $value = $this->serialize($value); - - if ($this->handler->set($key, $value, 0, $expire)) { - return true; - } - - return false; - } - - /** - * 自增缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function inc(string $name, int $step = 1) - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - - if ($this->handler->get($key)) { - return $this->handler->increment($key, $step); - } - - return $this->handler->set($key, $step); - } - - /** - * 自减缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function dec(string $name, int $step = 1) - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - $value = $this->handler->get($key) - $step; - $res = $this->handler->set($key, $value); - - return !$res ? false : $value; - } - - /** - * 删除缓存 - * @access public - * @param string $name 缓存变量名 - * @param bool|false $ttl - * @return bool - */ - public function delete($name, $ttl = false): bool - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - - return false === $ttl ? - $this->handler->delete($key) : - $this->handler->delete($key, $ttl); - } - - /** - * 清除缓存 - * @access public - * @return bool - */ - public function clear(): bool - { - $this->writeTimes++; - - return $this->handler->flush(); - } - - /** - * 删除缓存标签 - * @access public - * @param array $keys 缓存标识列表 - * @return void - */ - public function clearTag(array $keys): void - { - foreach ($keys as $key) { - $this->handler->delete($key); - } - } - -} diff --git a/vendor/topthink/framework/src/think/cache/driver/Memcached.php b/vendor/topthink/framework/src/think/cache/driver/Memcached.php deleted file mode 100644 index 71edb05..0000000 --- a/vendor/topthink/framework/src/think/cache/driver/Memcached.php +++ /dev/null @@ -1,221 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\cache\driver; - -use think\cache\Driver; - -/** - * Memcached缓存类 - */ -class Memcached extends Driver -{ - /** - * 配置参数 - * @var array - */ - protected $options = [ - 'host' => '127.0.0.1', - 'port' => 11211, - 'expire' => 0, - 'timeout' => 0, // 超时时间(单位:毫秒) - 'prefix' => '', - 'username' => '', //账号 - 'password' => '', //密码 - 'option' => [], - 'tag_prefix' => 'tag:', - 'serialize' => [], - ]; - - /** - * 架构函数 - * @access public - * @param array $options 缓存参数 - */ - public function __construct(array $options = []) - { - if (!extension_loaded('memcached')) { - throw new \BadFunctionCallException('not support: memcached'); - } - - if (!empty($options)) { - $this->options = array_merge($this->options, $options); - } - - $this->handler = new \Memcached; - - if (!empty($this->options['option'])) { - $this->handler->setOptions($this->options['option']); - } - - // 设置连接超时时间(单位:毫秒) - if ($this->options['timeout'] > 0) { - $this->handler->setOption(\Memcached::OPT_CONNECT_TIMEOUT, $this->options['timeout']); - } - - // 支持集群 - $hosts = (array) $this->options['host']; - $ports = (array) $this->options['port']; - if (empty($ports[0])) { - $ports[0] = 11211; - } - - // 建立连接 - $servers = []; - foreach ($hosts as $i => $host) { - $servers[] = [$host, $ports[$i] ?? $ports[0], 1]; - } - - $this->handler->addServers($servers); - - if ('' != $this->options['username']) { - $this->handler->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); - $this->handler->setSaslAuthData($this->options['username'], $this->options['password']); - } - } - - /** - * 判断缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function has($name): bool - { - $key = $this->getCacheKey($name); - - return $this->handler->get($key) ? true : false; - } - - /** - * 读取缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function get($name, $default = null) - { - $this->readTimes++; - - $result = $this->handler->get($this->getCacheKey($name)); - - return false !== $result ? $this->unserialize($result) : $default; - } - - /** - * 写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param integer|\DateTime $expire 有效时间(秒) - * @return bool - */ - public function set($name, $value, $expire = null): bool - { - $this->writeTimes++; - - if (is_null($expire)) { - $expire = $this->options['expire']; - } - - $key = $this->getCacheKey($name); - $expire = $this->getExpireTime($expire); - $value = $this->serialize($value); - - if ($this->handler->set($key, $value, $expire)) { - return true; - } - - return false; - } - - /** - * 自增缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function inc(string $name, int $step = 1) - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - - if ($this->handler->get($key)) { - return $this->handler->increment($key, $step); - } - - return $this->handler->set($key, $step); - } - - /** - * 自减缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function dec(string $name, int $step = 1) - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - $value = $this->handler->get($key) - $step; - $res = $this->handler->set($key, $value); - - return !$res ? false : $value; - } - - /** - * 删除缓存 - * @access public - * @param string $name 缓存变量名 - * @param bool|false $ttl - * @return bool - */ - public function delete($name, $ttl = false): bool - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - - return false === $ttl ? - $this->handler->delete($key) : - $this->handler->delete($key, $ttl); - } - - /** - * 清除缓存 - * @access public - * @return bool - */ - public function clear(): bool - { - $this->writeTimes++; - - return $this->handler->flush(); - } - - /** - * 删除缓存标签 - * @access public - * @param array $keys 缓存标识列表 - * @return void - */ - public function clearTag(array $keys): void - { - $this->handler->deleteMulti($keys); - } - -} diff --git a/vendor/topthink/framework/src/think/cache/driver/Redis.php b/vendor/topthink/framework/src/think/cache/driver/Redis.php deleted file mode 100644 index 791b27b..0000000 --- a/vendor/topthink/framework/src/think/cache/driver/Redis.php +++ /dev/null @@ -1,249 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\cache\driver; - -use think\cache\Driver; - -/** - * Redis缓存驱动,适合单机部署、有前端代理实现高可用的场景,性能最好 - * 有需要在业务层实现读写分离、或者使用RedisCluster的需求,请使用Redisd驱动 - * - * 要求安装phpredis扩展:https://github.com/nicolasff/phpredis - * @author 尘缘 <130775@qq.com> - */ -class Redis extends Driver -{ - /** @var \Predis\Client|\Redis */ - protected $handler; - - /** - * 配置参数 - * @var array - */ - protected $options = [ - 'host' => '127.0.0.1', - 'port' => 6379, - 'password' => '', - 'select' => 0, - 'timeout' => 0, - 'expire' => 0, - 'persistent' => false, - 'prefix' => '', - 'tag_prefix' => 'tag:', - 'serialize' => [], - ]; - - /** - * 架构函数 - * @access public - * @param array $options 缓存参数 - */ - public function __construct(array $options = []) - { - if (!empty($options)) { - $this->options = array_merge($this->options, $options); - } - - if (extension_loaded('redis')) { - $this->handler = new \Redis; - - if ($this->options['persistent']) { - $this->handler->pconnect($this->options['host'], (int) $this->options['port'], (int) $this->options['timeout'], 'persistent_id_' . $this->options['select']); - } else { - $this->handler->connect($this->options['host'], (int) $this->options['port'], (int) $this->options['timeout']); - } - - if ('' != $this->options['password']) { - $this->handler->auth($this->options['password']); - } - } elseif (class_exists('\Predis\Client')) { - $params = []; - foreach ($this->options as $key => $val) { - if (in_array($key, ['aggregate', 'cluster', 'connections', 'exceptions', 'prefix', 'profile', 'replication', 'parameters'])) { - $params[$key] = $val; - unset($this->options[$key]); - } - } - - if ('' == $this->options['password']) { - unset($this->options['password']); - } - - $this->handler = new \Predis\Client($this->options, $params); - - $this->options['prefix'] = ''; - } else { - throw new \BadFunctionCallException('not support: redis'); - } - - if (0 != $this->options['select']) { - $this->handler->select((int) $this->options['select']); - } - } - - /** - * 判断缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function has($name): bool - { - return $this->handler->exists($this->getCacheKey($name)) ? true : false; - } - - /** - * 读取缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function get($name, $default = null) - { - $this->readTimes++; - $key = $this->getCacheKey($name); - $value = $this->handler->get($key); - - if (false === $value || is_null($value)) { - return $default; - } - - return $this->unserialize($value); - } - - /** - * 写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param integer|\DateTime $expire 有效时间(秒) - * @return bool - */ - public function set($name, $value, $expire = null): bool - { - $this->writeTimes++; - - if (is_null($expire)) { - $expire = $this->options['expire']; - } - - $key = $this->getCacheKey($name); - $expire = $this->getExpireTime($expire); - $value = $this->serialize($value); - - if ($expire) { - $this->handler->setex($key, $expire, $value); - } else { - $this->handler->set($key, $value); - } - - return true; - } - - /** - * 自增缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function inc(string $name, int $step = 1) - { - $this->writeTimes++; - $key = $this->getCacheKey($name); - - return $this->handler->incrby($key, $step); - } - - /** - * 自减缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function dec(string $name, int $step = 1) - { - $this->writeTimes++; - $key = $this->getCacheKey($name); - - return $this->handler->decrby($key, $step); - } - - /** - * 删除缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function delete($name): bool - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - $result = $this->handler->del($key); - return $result > 0; - } - - /** - * 清除缓存 - * @access public - * @return bool - */ - public function clear(): bool - { - $this->writeTimes++; - $this->handler->flushDB(); - return true; - } - - /** - * 删除缓存标签 - * @access public - * @param array $keys 缓存标识列表 - * @return void - */ - public function clearTag(array $keys): void - { - // 指定标签清除 - $this->handler->del($keys); - } - - /** - * 追加TagSet数据 - * @access public - * @param string $name 缓存标识 - * @param mixed $value 数据 - * @return void - */ - public function append(string $name, $value): void - { - $key = $this->getCacheKey($name); - $this->handler->sAdd($key, $value); - } - - /** - * 获取标签包含的缓存标识 - * @access public - * @param string $tag 缓存标签 - * @return array - */ - public function getTagItems(string $tag): array - { - $name = $this->getTagKey($tag); - $key = $this->getCacheKey($name); - return $this->handler->sMembers($key); - } - -} diff --git a/vendor/topthink/framework/src/think/cache/driver/Wincache.php b/vendor/topthink/framework/src/think/cache/driver/Wincache.php deleted file mode 100644 index 8b3e8b8..0000000 --- a/vendor/topthink/framework/src/think/cache/driver/Wincache.php +++ /dev/null @@ -1,175 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\cache\driver; - -use think\cache\Driver; - -/** - * Wincache缓存驱动 - */ -class Wincache extends Driver -{ - /** - * 配置参数 - * @var array - */ - protected $options = [ - 'prefix' => '', - 'expire' => 0, - 'tag_prefix' => 'tag:', - 'serialize' => [], - ]; - - /** - * 架构函数 - * @access public - * @param array $options 缓存参数 - * @throws \BadFunctionCallException - */ - public function __construct(array $options = []) - { - if (!function_exists('wincache_ucache_info')) { - throw new \BadFunctionCallException('not support: WinCache'); - } - - if (!empty($options)) { - $this->options = array_merge($this->options, $options); - } - } - - /** - * 判断缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function has($name): bool - { - $this->readTimes++; - - $key = $this->getCacheKey($name); - - return wincache_ucache_exists($key); - } - - /** - * 读取缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function get($name, $default = null) - { - $this->readTimes++; - - $key = $this->getCacheKey($name); - - return wincache_ucache_exists($key) ? $this->unserialize(wincache_ucache_get($key)) : $default; - } - - /** - * 写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param integer|\DateTime $expire 有效时间(秒) - * @return bool - */ - public function set($name, $value, $expire = null): bool - { - $this->writeTimes++; - - if (is_null($expire)) { - $expire = $this->options['expire']; - } - - $key = $this->getCacheKey($name); - $expire = $this->getExpireTime($expire); - $value = $this->serialize($value); - - if (wincache_ucache_set($key, $value, $expire)) { - return true; - } - - return false; - } - - /** - * 自增缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function inc(string $name, int $step = 1) - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - - return wincache_ucache_inc($key, $step); - } - - /** - * 自减缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function dec(string $name, int $step = 1) - { - $this->writeTimes++; - - $key = $this->getCacheKey($name); - - return wincache_ucache_dec($key, $step); - } - - /** - * 删除缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function delete($name): bool - { - $this->writeTimes++; - - return wincache_ucache_delete($this->getCacheKey($name)); - } - - /** - * 清除缓存 - * @access public - * @return bool - */ - public function clear(): bool - { - $this->writeTimes++; - return wincache_ucache_clear(); - } - - /** - * 删除缓存标签 - * @access public - * @param array $keys 缓存标识列表 - * @return void - */ - public function clearTag(array $keys): void - { - wincache_ucache_delete($keys); - } - -} diff --git a/vendor/topthink/framework/src/think/console/Command.php b/vendor/topthink/framework/src/think/console/Command.php deleted file mode 100644 index bd3fb20..0000000 --- a/vendor/topthink/framework/src/think/console/Command.php +++ /dev/null @@ -1,504 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\console; - -use Exception; -use InvalidArgumentException; -use LogicException; -use think\App; -use think\Console; -use think\console\input\Argument; -use think\console\input\Definition; -use think\console\input\Option; - -abstract class Command -{ - - /** @var Console */ - private $console; - private $name; - private $processTitle; - private $aliases = []; - private $definition; - private $help; - private $description; - private $ignoreValidationErrors = false; - private $consoleDefinitionMerged = false; - private $consoleDefinitionMergedWithArgs = false; - private $synopsis = []; - private $usages = []; - - /** @var Input */ - protected $input; - - /** @var Output */ - protected $output; - - /** @var App */ - protected $app; - - /** - * 构造方法 - * @throws LogicException - * @api - */ - public function __construct() - { - $this->definition = new Definition(); - - $this->configure(); - - if (!$this->name) { - throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this))); - } - } - - /** - * 忽略验证错误 - */ - public function ignoreValidationErrors(): void - { - $this->ignoreValidationErrors = true; - } - - /** - * 设置控制台 - * @param Console $console - */ - public function setConsole(Console $console = null): void - { - $this->console = $console; - } - - /** - * 获取控制台 - * @return Console - * @api - */ - public function getConsole(): Console - { - return $this->console; - } - - /** - * 设置app - * @param App $app - */ - public function setApp(App $app) - { - $this->app = $app; - } - - /** - * 获取app - * @return App - */ - public function getApp() - { - return $this->app; - } - - /** - * 是否有效 - * @return bool - */ - public function isEnabled(): bool - { - return true; - } - - /** - * 配置指令 - */ - protected function configure() - { - } - - /** - * 执行指令 - * @param Input $input - * @param Output $output - * @return null|int - * @throws LogicException - * @see setCode() - */ - protected function execute(Input $input, Output $output) - { - return $this->app->invoke([$this, 'handle']); - } - - /** - * 用户验证 - * @param Input $input - * @param Output $output - */ - protected function interact(Input $input, Output $output) - { - } - - /** - * 初始化 - * @param Input $input An InputInterface instance - * @param Output $output An OutputInterface instance - */ - protected function initialize(Input $input, Output $output) - { - } - - /** - * 执行 - * @param Input $input - * @param Output $output - * @return int - * @throws Exception - * @see setCode() - * @see execute() - */ - public function run(Input $input, Output $output): int - { - $this->input = $input; - $this->output = $output; - - $this->getSynopsis(true); - $this->getSynopsis(false); - - $this->mergeConsoleDefinition(); - - try { - $input->bind($this->definition); - } catch (Exception $e) { - if (!$this->ignoreValidationErrors) { - throw $e; - } - } - - $this->initialize($input, $output); - - if (null !== $this->processTitle) { - if (function_exists('cli_set_process_title')) { - if (false === @cli_set_process_title($this->processTitle)) { - if ('Darwin' === PHP_OS) { - $output->writeln('<comment>Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.</comment>'); - } else { - $error = error_get_last(); - trigger_error($error['message'], E_USER_WARNING); - } - } - } elseif (function_exists('setproctitle')) { - setproctitle($this->processTitle); - } elseif (Output::VERBOSITY_VERY_VERBOSE === $output->getVerbosity()) { - $output->writeln('<comment>Install the proctitle PECL to be able to change the process title.</comment>'); - } - } - - if ($input->isInteractive()) { - $this->interact($input, $output); - } - - $input->validate(); - - $statusCode = $this->execute($input, $output); - - return is_numeric($statusCode) ? (int) $statusCode : 0; - } - - /** - * 合并参数定义 - * @param bool $mergeArgs - */ - public function mergeConsoleDefinition(bool $mergeArgs = true) - { - if (null === $this->console - || (true === $this->consoleDefinitionMerged - && ($this->consoleDefinitionMergedWithArgs || !$mergeArgs)) - ) { - return; - } - - if ($mergeArgs) { - $currentArguments = $this->definition->getArguments(); - $this->definition->setArguments($this->console->getDefinition()->getArguments()); - $this->definition->addArguments($currentArguments); - } - - $this->definition->addOptions($this->console->getDefinition()->getOptions()); - - $this->consoleDefinitionMerged = true; - if ($mergeArgs) { - $this->consoleDefinitionMergedWithArgs = true; - } - } - - /** - * 设置参数定义 - * @param array|Definition $definition - * @return Command - * @api - */ - public function setDefinition($definition) - { - if ($definition instanceof Definition) { - $this->definition = $definition; - } else { - $this->definition->setDefinition($definition); - } - - $this->consoleDefinitionMerged = false; - - return $this; - } - - /** - * 获取参数定义 - * @return Definition - * @api - */ - public function getDefinition(): Definition - { - return $this->definition; - } - - /** - * 获取当前指令的参数定义 - * @return Definition - */ - public function getNativeDefinition(): Definition - { - return $this->getDefinition(); - } - - /** - * 添加参数 - * @param string $name 名称 - * @param int $mode 类型 - * @param string $description 描述 - * @param mixed $default 默认值 - * @return Command - */ - public function addArgument(string $name, int $mode = null, string $description = '', $default = null) - { - $this->definition->addArgument(new Argument($name, $mode, $description, $default)); - - return $this; - } - - /** - * 添加选项 - * @param string $name 选项名称 - * @param string $shortcut 别名 - * @param int $mode 类型 - * @param string $description 描述 - * @param mixed $default 默认值 - * @return Command - */ - public function addOption(string $name, string $shortcut = null, int $mode = null, string $description = '', $default = null) - { - $this->definition->addOption(new Option($name, $shortcut, $mode, $description, $default)); - - return $this; - } - - /** - * 设置指令名称 - * @param string $name - * @return Command - * @throws InvalidArgumentException - */ - public function setName(string $name) - { - $this->validateName($name); - - $this->name = $name; - - return $this; - } - - /** - * 设置进程名称 - * - * PHP 5.5+ or the proctitle PECL library is required - * - * @param string $title The process title - * - * @return $this - */ - public function setProcessTitle($title) - { - $this->processTitle = $title; - - return $this; - } - - /** - * 获取指令名称 - * @return string - */ - public function getName(): string - { - return $this->name ?: ''; - } - - /** - * 设置描述 - * @param string $description - * @return Command - */ - public function setDescription(string $description) - { - $this->description = $description; - - return $this; - } - - /** - * 获取描述 - * @return string - */ - public function getDescription(): string - { - return $this->description ?: ''; - } - - /** - * 设置帮助信息 - * @param string $help - * @return Command - */ - public function setHelp(string $help) - { - $this->help = $help; - - return $this; - } - - /** - * 获取帮助信息 - * @return string - */ - public function getHelp(): string - { - return $this->help ?: ''; - } - - /** - * 描述信息 - * @return string - */ - public function getProcessedHelp(): string - { - $name = $this->name; - - $placeholders = [ - '%command.name%', - '%command.full_name%', - ]; - $replacements = [ - $name, - $_SERVER['PHP_SELF'] . ' ' . $name, - ]; - - return str_replace($placeholders, $replacements, $this->getHelp()); - } - - /** - * 设置别名 - * @param string[] $aliases - * @return Command - * @throws InvalidArgumentException - */ - public function setAliases(iterable $aliases) - { - foreach ($aliases as $alias) { - $this->validateName($alias); - } - - $this->aliases = $aliases; - - return $this; - } - - /** - * 获取别名 - * @return array - */ - public function getAliases(): array - { - return $this->aliases; - } - - /** - * 获取简介 - * @param bool $short 是否简单的 - * @return string - */ - public function getSynopsis(bool $short = false): string - { - $key = $short ? 'short' : 'long'; - - if (!isset($this->synopsis[$key])) { - $this->synopsis[$key] = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis($short))); - } - - return $this->synopsis[$key]; - } - - /** - * 添加用法介绍 - * @param string $usage - * @return $this - */ - public function addUsage(string $usage) - { - if (0 !== strpos($usage, $this->name)) { - $usage = sprintf('%s %s', $this->name, $usage); - } - - $this->usages[] = $usage; - - return $this; - } - - /** - * 获取用法介绍 - * @return array - */ - public function getUsages(): array - { - return $this->usages; - } - - /** - * 验证指令名称 - * @param string $name - * @throws InvalidArgumentException - */ - private function validateName(string $name) - { - if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) { - throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); - } - } - - /** - * 输出表格 - * @param Table $table - * @return string - */ - protected function table(Table $table): string - { - $content = $table->render(); - $this->output->writeln($content); - return $content; - } - -} diff --git a/vendor/topthink/framework/src/think/console/Input.php b/vendor/topthink/framework/src/think/console/Input.php deleted file mode 100644 index 9ae9077..0000000 --- a/vendor/topthink/framework/src/think/console/Input.php +++ /dev/null @@ -1,465 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\console; - -use think\console\input\Argument; -use think\console\input\Definition; -use think\console\input\Option; - -class Input -{ - - /** - * @var Definition - */ - protected $definition; - - /** - * @var Option[] - */ - protected $options = []; - - /** - * @var Argument[] - */ - protected $arguments = []; - - protected $interactive = true; - - private $tokens; - private $parsed; - - public function __construct($argv = null) - { - if (null === $argv) { - $argv = $_SERVER['argv']; - // 去除命令名 - array_shift($argv); - } - - $this->tokens = $argv; - - $this->definition = new Definition(); - } - - protected function setTokens(array $tokens) - { - $this->tokens = $tokens; - } - - /** - * 绑定实例 - * @param Definition $definition A InputDefinition instance - */ - public function bind(Definition $definition): void - { - $this->arguments = []; - $this->options = []; - $this->definition = $definition; - - $this->parse(); - } - - /** - * 解析参数 - */ - protected function parse(): void - { - $parseOptions = true; - $this->parsed = $this->tokens; - while (null !== $token = array_shift($this->parsed)) { - if ($parseOptions && '' == $token) { - $this->parseArgument($token); - } elseif ($parseOptions && '--' == $token) { - $parseOptions = false; - } elseif ($parseOptions && 0 === strpos($token, '--')) { - $this->parseLongOption($token); - } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) { - $this->parseShortOption($token); - } else { - $this->parseArgument($token); - } - } - } - - /** - * 解析短选项 - * @param string $token 当前的指令. - */ - private function parseShortOption(string $token): void - { - $name = substr($token, 1); - - if (strlen($name) > 1) { - if ($this->definition->hasShortcut($name[0]) - && $this->definition->getOptionForShortcut($name[0])->acceptValue() - ) { - $this->addShortOption($name[0], substr($name, 1)); - } else { - $this->parseShortOptionSet($name); - } - } else { - $this->addShortOption($name, null); - } - } - - /** - * 解析短选项 - * @param string $name 当前指令 - * @throws \RuntimeException - */ - private function parseShortOptionSet(string $name): void - { - $len = strlen($name); - for ($i = 0; $i < $len; ++$i) { - if (!$this->definition->hasShortcut($name[$i])) { - throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i])); - } - - $option = $this->definition->getOptionForShortcut($name[$i]); - if ($option->acceptValue()) { - $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1)); - - break; - } else { - $this->addLongOption($option->getName(), null); - } - } - } - - /** - * 解析完整选项 - * @param string $token 当前指令 - */ - private function parseLongOption(string $token): void - { - $name = substr($token, 2); - - if (false !== $pos = strpos($name, '=')) { - $this->addLongOption(substr($name, 0, $pos), substr($name, $pos + 1)); - } else { - $this->addLongOption($name, null); - } - } - - /** - * 解析参数 - * @param string $token 当前指令 - * @throws \RuntimeException - */ - private function parseArgument(string $token): void - { - $c = count($this->arguments); - - if ($this->definition->hasArgument($c)) { - $arg = $this->definition->getArgument($c); - - $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token; - - } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { - $arg = $this->definition->getArgument($c - 1); - - $this->arguments[$arg->getName()][] = $token; - } else { - throw new \RuntimeException('Too many arguments.'); - } - } - - /** - * 添加一个短选项的值 - * @param string $shortcut 短名称 - * @param mixed $value 值 - * @throws \RuntimeException - */ - private function addShortOption(string $shortcut, $value): void - { - if (!$this->definition->hasShortcut($shortcut)) { - throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); - } - - /** - * 添加一个完整选项的值 - * @param string $name 选项名 - * @param mixed $value 值 - * @throws \RuntimeException - */ - private function addLongOption(string $name, $value): void - { - if (!$this->definition->hasOption($name)) { - throw new \RuntimeException(sprintf('The "--%s" option does not exist.', $name)); - } - - $option = $this->definition->getOption($name); - - if (false === $value) { - $value = null; - } - - if (null !== $value && !$option->acceptValue()) { - throw new \RuntimeException(sprintf('The "--%s" option does not accept a value.', $name, $value)); - } - - if (null === $value && $option->acceptValue() && count($this->parsed)) { - $next = array_shift($this->parsed); - if (isset($next[0]) && '-' !== $next[0]) { - $value = $next; - } elseif (empty($next)) { - $value = ''; - } else { - array_unshift($this->parsed, $next); - } - } - - if (null === $value) { - if ($option->isValueRequired()) { - throw new \RuntimeException(sprintf('The "--%s" option requires a value.', $name)); - } - - if (!$option->isArray()) { - $value = $option->isValueOptional() ? $option->getDefault() : true; - } - } - - if ($option->isArray()) { - $this->options[$name][] = $value; - } else { - $this->options[$name] = $value; - } - } - - /** - * 获取第一个参数 - * @return string|null - */ - public function getFirstArgument() - { - foreach ($this->tokens as $token) { - if ($token && '-' === $token[0]) { - continue; - } - - return $token; - } - return; - } - - /** - * 检查原始参数是否包含某个值 - * @param string|array $values 需要检查的值 - * @return bool - */ - public function hasParameterOption($values): bool - { - $values = (array) $values; - - foreach ($this->tokens as $token) { - foreach ($values as $value) { - if ($token === $value || 0 === strpos($token, $value . '=')) { - return true; - } - } - } - - return false; - } - - /** - * 获取原始选项的值 - * @param string|array $values 需要检查的值 - * @param mixed $default 默认值 - * @return mixed The option value - */ - public function getParameterOption($values, $default = false) - { - $values = (array) $values; - $tokens = $this->tokens; - - while (0 < count($tokens)) { - $token = array_shift($tokens); - - foreach ($values as $value) { - if ($token === $value || 0 === strpos($token, $value . '=')) { - if (false !== $pos = strpos($token, '=')) { - return substr($token, $pos + 1); - } - - return array_shift($tokens); - } - } - } - - return $default; - } - - /** - * 验证输入 - * @throws \RuntimeException - */ - public function validate() - { - if (count($this->arguments) < $this->definition->getArgumentRequiredCount()) { - throw new \RuntimeException('Not enough arguments.'); - } - } - - /** - * 检查输入是否是交互的 - * @return bool - */ - public function isInteractive(): bool - { - return $this->interactive; - } - - /** - * 设置输入的交互 - * @param bool - */ - public function setInteractive(bool $interactive): void - { - $this->interactive = $interactive; - } - - /** - * 获取所有的参数 - * @return Argument[] - */ - public function getArguments(): array - { - return array_merge($this->definition->getArgumentDefaults(), $this->arguments); - } - - /** - * 根据名称获取参数 - * @param string $name 参数名 - * @return mixed - * @throws \InvalidArgumentException - */ - public function getArgument(string $name) - { - if (!$this->definition->hasArgument($name)) { - throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - return $this->arguments[$name] ?? $this->definition->getArgument($name) - ->getDefault(); - } - - /** - * 设置参数的值 - * @param string $name 参数名 - * @param string $value 值 - * @throws \InvalidArgumentException - */ - public function setArgument(string $name, $value) - { - if (!$this->definition->hasArgument($name)) { - throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $this->arguments[$name] = $value; - } - - /** - * 检查是否存在某个参数 - * @param string|int $name 参数名或位置 - * @return bool - */ - public function hasArgument($name): bool - { - return $this->definition->hasArgument($name); - } - - /** - * 获取所有的选项 - * @return Option[] - */ - public function getOptions(): array - { - return array_merge($this->definition->getOptionDefaults(), $this->options); - } - - /** - * 获取选项值 - * @param string $name 选项名称 - * @return mixed - * @throws \InvalidArgumentException - */ - public function getOption(string $name) - { - if (!$this->definition->hasOption($name)) { - throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); - } - - return $this->options[$name] ?? $this->definition->getOption($name)->getDefault(); - } - - /** - * 设置选项值 - * @param string $name 选项名 - * @param string|bool $value 值 - * @throws \InvalidArgumentException - */ - public function setOption(string $name, $value): void - { - if (!$this->definition->hasOption($name)) { - throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); - } - - $this->options[$name] = $value; - } - - /** - * 是否有某个选项 - * @param string $name 选项名 - * @return bool - */ - public function hasOption(string $name): bool - { - return $this->definition->hasOption($name) && isset($this->options[$name]); - } - - /** - * 转义指令 - * @param string $token - * @return string - */ - public function escapeToken(string $token): string - { - return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token); - } - - /** - * 返回传递给命令的参数的字符串 - * @return string - */ - public function __toString() - { - $tokens = array_map(function ($token) { - if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) { - return $match[1] . $this->escapeToken($match[2]); - } - - if ($token && '-' !== $token[0]) { - return $this->escapeToken($token); - } - - return $token; - }, $this->tokens); - - return implode(' ', $tokens); - } -} diff --git a/vendor/topthink/framework/src/think/console/LICENSE b/vendor/topthink/framework/src/think/console/LICENSE deleted file mode 100644 index 0abe056..0000000 --- a/vendor/topthink/framework/src/think/console/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004-2016 Fabien Potencier - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/vendor/topthink/framework/src/think/console/Output.php b/vendor/topthink/framework/src/think/console/Output.php deleted file mode 100644 index 294c4b8..0000000 --- a/vendor/topthink/framework/src/think/console/Output.php +++ /dev/null @@ -1,231 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2020 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\console; - -use Exception; -use think\console\output\Ask; -use think\console\output\Descriptor; -use think\console\output\driver\Buffer; -use think\console\output\driver\Console; -use think\console\output\driver\Nothing; -use think\console\output\Question; -use think\console\output\question\Choice; -use think\console\output\question\Confirmation; -use Throwable; - -/** - * Class Output - * @package think\console - * - * @see \think\console\output\driver\Console::setDecorated - * @method void setDecorated($decorated) - * - * @see \think\console\output\driver\Buffer::fetch - * @method string fetch() - * - * @method void info($message) - * @method void error($message) - * @method void comment($message) - * @method void warning($message) - * @method void highlight($message) - * @method void question($message) - */ -class Output -{ - // 不显示信息(静默) - const VERBOSITY_QUIET = 0; - // 正常信息 - const VERBOSITY_NORMAL = 1; - // 详细信息 - const VERBOSITY_VERBOSE = 2; - // 非常详细的信息 - const VERBOSITY_VERY_VERBOSE = 3; - // 调试信息 - const VERBOSITY_DEBUG = 4; - - const OUTPUT_NORMAL = 0; - const OUTPUT_RAW = 1; - const OUTPUT_PLAIN = 2; - - // 输出信息级别 - private $verbosity = self::VERBOSITY_NORMAL; - - /** @var Buffer|Console|Nothing */ - private $handle = null; - - protected $styles = [ - 'info', - 'error', - 'comment', - 'question', - 'highlight', - 'warning', - ]; - - public function __construct($driver = 'console') - { - $class = '\\think\\console\\output\\driver\\' . ucwords($driver); - - $this->handle = new $class($this); - } - - public function ask(Input $input, $question, $default = null, $validator = null) - { - $question = new Question($question, $default); - $question->setValidator($validator); - - return $this->askQuestion($input, $question); - } - - public function askHidden(Input $input, $question, $validator = null) - { - $question = new Question($question); - - $question->setHidden(true); - $question->setValidator($validator); - - return $this->askQuestion($input, $question); - } - - public function confirm(Input $input, $question, $default = true) - { - return $this->askQuestion($input, new Confirmation($question, $default)); - } - - /** - * {@inheritdoc} - */ - public function choice(Input $input, $question, array $choices, $default = null) - { - if (null !== $default) { - $values = array_flip($choices); - $default = $values[$default]; - } - - return $this->askQuestion($input, new Choice($question, $choices, $default)); - } - - protected function askQuestion(Input $input, Question $question) - { - $ask = new Ask($input, $this, $question); - $answer = $ask->run(); - - if ($input->isInteractive()) { - $this->newLine(); - } - - return $answer; - } - - protected function block(string $style, string $message): void - { - $this->writeln("<{$style}>{$message}</$style>"); - } - - /** - * 输出空行 - * @param int $count - */ - public function newLine(int $count = 1): void - { - $this->write(str_repeat(PHP_EOL, $count)); - } - - /** - * 输出信息并换行 - * @param string $messages - * @param int $type - */ - public function writeln(string $messages, int $type = 0): void - { - $this->write($messages, true, $type); - } - - /** - * 输出信息 - * @param string $messages - * @param bool $newline - * @param int $type - */ - public function write(string $messages, bool $newline = false, int $type = 0): void - { - $this->handle->write($messages, $newline, $type); - } - - public function renderException(Throwable $e): void - { - $this->handle->renderException($e); - } - - /** - * 设置输出信息级别 - * @param int $level 输出信息级别 - */ - public function setVerbosity(int $level) - { - $this->verbosity = $level; - } - - /** - * 获取输出信息级别 - * @return int - */ - public function getVerbosity(): int - { - return $this->verbosity; - } - - public function isQuiet(): bool - { - return self::VERBOSITY_QUIET === $this->verbosity; - } - - public function isVerbose(): bool - { - return self::VERBOSITY_VERBOSE <= $this->verbosity; - } - - public function isVeryVerbose(): bool - { - return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; - } - - public function isDebug(): bool - { - return self::VERBOSITY_DEBUG <= $this->verbosity; - } - - public function describe($object, array $options = []): void - { - $descriptor = new Descriptor(); - $options = array_merge([ - 'raw_text' => false, - ], $options); - - $descriptor->describe($this, $object, $options); - } - - public function __call($method, $args) - { - if (in_array($method, $this->styles)) { - array_unshift($args, $method); - return call_user_func_array([$this, 'block'], $args); - } - - if ($this->handle && method_exists($this->handle, $method)) { - return call_user_func_array([$this->handle, $method], $args); - } else { - throw new Exception('method not exists:' . __CLASS__ . '->' . $method); - } - } -} diff --git a/vendor/topthink/framework/src/think/console/Table.php b/vendor/topthink/framework/src/think/console/Table.php deleted file mode 100644 index 5a861d7..0000000 --- a/vendor/topthink/framework/src/think/console/Table.php +++ /dev/null @@ -1,300 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\console; - -class Table -{ - const ALIGN_LEFT = 1; - const ALIGN_RIGHT = 0; - const ALIGN_CENTER = 2; - - /** - * 头信息数据 - * @var array - */ - protected $header = []; - - /** - * 头部对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER - * @var int - */ - protected $headerAlign = 1; - - /** - * 表格数据(二维数组) - * @var array - */ - protected $rows = []; - - /** - * 单元格对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER - * @var int - */ - protected $cellAlign = 1; - - /** - * 单元格宽度信息 - * @var array - */ - protected $colWidth = []; - - /** - * 表格输出样式 - * @var string - */ - protected $style = 'default'; - - /** - * 表格样式定义 - * @var array - */ - protected $format = [ - 'compact' => [], - 'default' => [ - 'top' => ['+', '-', '+', '+'], - 'cell' => ['|', ' ', '|', '|'], - 'middle' => ['+', '-', '+', '+'], - 'bottom' => ['+', '-', '+', '+'], - 'cross-top' => ['+', '-', '-', '+'], - 'cross-bottom' => ['+', '-', '-', '+'], - ], - 'markdown' => [ - 'top' => [' ', ' ', ' ', ' '], - 'cell' => ['|', ' ', '|', '|'], - 'middle' => ['|', '-', '|', '|'], - 'bottom' => [' ', ' ', ' ', ' '], - 'cross-top' => ['|', ' ', ' ', '|'], - 'cross-bottom' => ['|', ' ', ' ', '|'], - ], - 'borderless' => [ - 'top' => ['=', '=', ' ', '='], - 'cell' => [' ', ' ', ' ', ' '], - 'middle' => ['=', '=', ' ', '='], - 'bottom' => ['=', '=', ' ', '='], - 'cross-top' => ['=', '=', ' ', '='], - 'cross-bottom' => ['=', '=', ' ', '='], - ], - 'box' => [ - 'top' => ['┌', '─', '┬', '┐'], - 'cell' => ['│', ' ', '│', '│'], - 'middle' => ['├', '─', '┼', '┤'], - 'bottom' => ['└', '─', '┴', '┘'], - 'cross-top' => ['├', '─', '┴', '┤'], - 'cross-bottom' => ['├', '─', '┬', '┤'], - ], - 'box-double' => [ - 'top' => ['╔', '═', '╤', '╗'], - 'cell' => ['║', ' ', '│', '║'], - 'middle' => ['╠', '─', '╪', '╣'], - 'bottom' => ['╚', '═', '╧', '╝'], - 'cross-top' => ['╠', '═', '╧', '╣'], - 'cross-bottom' => ['╠', '═', '╤', '╣'], - ], - ]; - - /** - * 设置表格头信息 以及对齐方式 - * @access public - * @param array $header 要输出的Header信息 - * @param int $align 对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER - * @return void - */ - public function setHeader(array $header, int $align = 1): void - { - $this->header = $header; - $this->headerAlign = $align; - - $this->checkColWidth($header); - } - - /** - * 设置输出表格数据 及对齐方式 - * @access public - * @param array $rows 要输出的表格数据(二维数组) - * @param int $align 对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER - * @return void - */ - public function setRows(array $rows, int $align = 1): void - { - $this->rows = $rows; - $this->cellAlign = $align; - - foreach ($rows as $row) { - $this->checkColWidth($row); - } - } - - /** - * 设置全局单元格对齐方式 - * @param int $align 对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER - * @return $this - */ - public function setCellAlign(int $align = 1) - { - $this->cellAlign = $align; - return $this; - } - - /** - * 检查列数据的显示宽度 - * @access public - * @param mixed $row 行数据 - * @return void - */ - protected function checkColWidth($row): void - { - if (is_array($row)) { - foreach ($row as $key => $cell) { - $width = mb_strwidth((string) $cell); - if (!isset($this->colWidth[$key]) || $width > $this->colWidth[$key]) { - $this->colWidth[$key] = $width; - } - } - } - } - - /** - * 增加一行表格数据 - * @access public - * @param mixed $row 行数据 - * @param bool $first 是否在开头插入 - * @return void - */ - public function addRow($row, bool $first = false): void - { - if ($first) { - array_unshift($this->rows, $row); - } else { - $this->rows[] = $row; - } - - $this->checkColWidth($row); - } - - /** - * 设置输出表格的样式 - * @access public - * @param string $style 样式名 - * @return void - */ - public function setStyle(string $style): void - { - $this->style = isset($this->format[$style]) ? $style : 'default'; - } - - /** - * 输出分隔行 - * @access public - * @param string $pos 位置 - * @return string - */ - protected function renderSeparator(string $pos): string - { - $style = $this->getStyle($pos); - $array = []; - - foreach ($this->colWidth as $width) { - $array[] = str_repeat($style[1], $width + 2); - } - - return $style[0] . implode($style[2], $array) . $style[3] . PHP_EOL; - } - - /** - * 输出表格头部 - * @access public - * @return string - */ - protected function renderHeader(): string - { - $style = $this->getStyle('cell'); - $content = $this->renderSeparator('top'); - - foreach ($this->header as $key => $header) { - $array[] = ' ' . str_pad($header, $this->colWidth[$key], $style[1], $this->headerAlign); - } - - if (!empty($array)) { - $content .= $style[0] . implode(' ' . $style[2], $array) . ' ' . $style[3] . PHP_EOL; - - if (!empty($this->rows)) { - $content .= $this->renderSeparator('middle'); - } - } - - return $content; - } - - protected function getStyle(string $style): array - { - if ($this->format[$this->style]) { - $style = $this->format[$this->style][$style]; - } else { - $style = [' ', ' ', ' ', ' ']; - } - - return $style; - } - - /** - * 输出表格 - * @access public - * @param array $dataList 表格数据 - * @return string - */ - public function render(array $dataList = []): string - { - if (!empty($dataList)) { - $this->setRows($dataList); - } - - // 输出头部 - $content = $this->renderHeader(); - $style = $this->getStyle('cell'); - - if (!empty($this->rows)) { - foreach ($this->rows as $row) { - if (is_string($row) && '-' === $row) { - $content .= $this->renderSeparator('middle'); - } elseif (is_scalar($row)) { - $content .= $this->renderSeparator('cross-top'); - $width = 3 * (count($this->colWidth) - 1) + array_reduce($this->colWidth, function ($a, $b) { - return $a + $b; - }); - $array = str_pad($row, $width); - - $content .= $style[0] . ' ' . $array . ' ' . $style[3] . PHP_EOL; - $content .= $this->renderSeparator('cross-bottom'); - } else { - $array = []; - - foreach ($row as $key => $val) { - $width = $this->colWidth[$key]; - // form https://github.com/symfony/console/blob/20c9821c8d1c2189f287dcee709b2f86353ea08f/Helper/Table.php#L467 - // str_pad won't work properly with multi-byte strings, we need to fix the padding - if (false !== $encoding = mb_detect_encoding((string) $val, null, true)) { - $width += strlen((string) $val) - mb_strwidth((string) $val, $encoding); - } - $array[] = ' ' . str_pad((string) $val, $width, ' ', $this->cellAlign); - } - - $content .= $style[0] . implode(' ' . $style[2], $array) . ' ' . $style[3] . PHP_EOL; - } - } - } - - $content .= $this->renderSeparator('bottom'); - - return $content; - } -} diff --git a/vendor/topthink/framework/src/think/console/bin/README.md b/vendor/topthink/framework/src/think/console/bin/README.md deleted file mode 100644 index 9acc52f..0000000 --- a/vendor/topthink/framework/src/think/console/bin/README.md +++ /dev/null @@ -1 +0,0 @@ -console 工具使用 hiddeninput.exe 在 windows 上隐藏密码输入,该二进制文件由第三方提供,相关源码和其他细节可以在 [Hidden Input](https://github.com/Seldaek/hidden-input) 找到。 diff --git a/vendor/topthink/framework/src/think/console/bin/hiddeninput.exe b/vendor/topthink/framework/src/think/console/bin/hiddeninput.exe deleted file mode 100644 index c8cf65e..0000000 Binary files a/vendor/topthink/framework/src/think/console/bin/hiddeninput.exe and /dev/null differ diff --git a/vendor/topthink/framework/src/think/console/command/Clear.php b/vendor/topthink/framework/src/think/console/command/Clear.php deleted file mode 100644 index da70b35..0000000 --- a/vendor/topthink/framework/src/think/console/command/Clear.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -namespace think\console\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Option; -use think\console\Output; - -class Clear extends Command -{ - protected function configure() - { - // 指令配置 - $this->setName('clear') - ->addOption('path', 'd', Option::VALUE_OPTIONAL, 'path to clear', null) - ->addOption('cache', 'c', Option::VALUE_NONE, 'clear cache file') - ->addOption('log', 'l', Option::VALUE_NONE, 'clear log file') - ->addOption('dir', 'r', Option::VALUE_NONE, 'clear empty dir') - ->addOption('expire', 'e', Option::VALUE_NONE, 'clear cache file if cache has expired') - ->setDescription('Clear runtime file'); - } - - protected function execute(Input $input, Output $output) - { - $runtimePath = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR; - - if ($input->getOption('cache')) { - $path = $runtimePath . 'cache'; - } elseif ($input->getOption('log')) { - $path = $runtimePath . 'log'; - } else { - $path = $input->getOption('path') ?: $runtimePath; - } - - $rmdir = $input->getOption('dir') ? true : false; - // --expire 仅当 --cache 时生效 - $cache_expire = $input->getOption('expire') && $input->getOption('cache') ? true : false; - $this->clear(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR, $rmdir, $cache_expire); - - $output->writeln("<info>Clear Successed</info>"); - } - - protected function clear(string $path, bool $rmdir, bool $cache_expire): void - { - $files = is_dir($path) ? scandir($path) : []; - - foreach ($files as $file) { - if ('.' != $file && '..' != $file && is_dir($path . $file)) { - $this->clear($path . $file . DIRECTORY_SEPARATOR, $rmdir, $cache_expire); - if ($rmdir) { - @rmdir($path . $file); - } - } elseif ('.gitignore' != $file && is_file($path . $file)) { - if ($cache_expire) { - if ($this->cacheHasExpired($path . $file)) { - unlink($path . $file); - } - } else { - unlink($path . $file); - } - } - } - } - - /** - * 缓存文件是否已过期 - * @param $filename string 文件路径 - * @return bool - */ - protected function cacheHasExpired($filename) { - $content = file_get_contents($filename); - $expire = (int) substr($content, 8, 12); - return 0 != $expire && time() - $expire > filemtime($filename); - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/Help.php b/vendor/topthink/framework/src/think/console/command/Help.php deleted file mode 100644 index 2e4f2ca..0000000 --- a/vendor/topthink/framework/src/think/console/command/Help.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument as InputArgument; -use think\console\input\Option as InputOption; -use think\console\Output; - -class Help extends Command -{ - - private $command; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this->ignoreValidationErrors(); - - $this->setName('help')->setDefinition([ - new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), - ])->setDescription('Displays help for a command')->setHelp( - <<<EOF -The <info>%command.name%</info> command displays help for a given command: - - <info>php %command.full_name% list</info> - -To display the list of available commands, please use the <info>list</info> command. -EOF - ); - } - - /** - * Sets the command. - * @param Command $command The command to set - */ - public function setCommand(Command $command): void - { - $this->command = $command; - } - - /** - * {@inheritdoc} - */ - protected function execute(Input $input, Output $output) - { - if (null === $this->command) { - $this->command = $this->getConsole()->find($input->getArgument('command_name')); - } - - $output->describe($this->command, [ - 'raw_text' => $input->getOption('raw'), - ]); - - $this->command = null; - } -} diff --git a/vendor/topthink/framework/src/think/console/command/Lists.php b/vendor/topthink/framework/src/think/console/command/Lists.php deleted file mode 100644 index d20fc75..0000000 --- a/vendor/topthink/framework/src/think/console/command/Lists.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument as InputArgument; -use think\console\input\Definition as InputDefinition; -use think\console\input\Option as InputOption; -use think\console\Output; - -class Lists extends Command -{ - /** - * {@inheritdoc} - */ - protected function configure() - { - $this->setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp( - <<<EOF -The <info>%command.name%</info> command lists all commands: - - <info>php %command.full_name%</info> - -You can also display the commands for a specific namespace: - - <info>php %command.full_name% test</info> - -It's also possible to get raw list of commands (useful for embedding command runner): - - <info>php %command.full_name% --raw</info> -EOF - ); - } - - /** - * {@inheritdoc} - */ - public function getNativeDefinition(): InputDefinition - { - return $this->createDefinition(); - } - - /** - * {@inheritdoc} - */ - protected function execute(Input $input, Output $output) - { - $output->describe($this->getConsole(), [ - 'raw_text' => $input->getOption('raw'), - 'namespace' => $input->getArgument('namespace'), - ]); - } - - /** - * {@inheritdoc} - */ - private function createDefinition(): InputDefinition - { - return new InputDefinition([ - new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), - new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), - ]); - } -} diff --git a/vendor/topthink/framework/src/think/console/command/Make.php b/vendor/topthink/framework/src/think/console/command/Make.php deleted file mode 100644 index a74e9e8..0000000 --- a/vendor/topthink/framework/src/think/console/command/Make.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 刘志淳 <chun@engineer.com> -// +---------------------------------------------------------------------- - -namespace think\console\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\Output; - -abstract class Make extends Command -{ - protected $type; - - abstract protected function getStub(); - - protected function configure() - { - $this->addArgument('name', Argument::REQUIRED, "The name of the class"); - } - - protected function execute(Input $input, Output $output) - { - $name = trim($input->getArgument('name')); - - $classname = $this->getClassName($name); - - $pathname = $this->getPathName($classname); - - if (is_file($pathname)) { - $output->writeln('<error>' . $this->type . ':' . $classname . ' already exists!</error>'); - return false; - } - - if (!is_dir(dirname($pathname))) { - mkdir(dirname($pathname), 0755, true); - } - - file_put_contents($pathname, $this->buildClass($classname)); - - $output->writeln('<info>' . $this->type . ':' . $classname . ' created successfully.</info>'); - } - - protected function buildClass(string $name) - { - $stub = file_get_contents($this->getStub()); - - $namespace = trim(implode('\\', array_slice(explode('\\', $name), 0, -1)), '\\'); - - $class = str_replace($namespace . '\\', '', $name); - - return str_replace(['{%className%}', '{%actionSuffix%}', '{%namespace%}', '{%app_namespace%}'], [ - $class, - $this->app->config->get('route.action_suffix'), - $namespace, - $this->app->getNamespace(), - ], $stub); - } - - protected function getPathName(string $name): string - { - $name = substr($name, 4); - - return $this->app->getBasePath() . ltrim(str_replace('\\', '/', $name), '/') . '.php'; - } - - protected function getClassName(string $name): string - { - if (strpos($name, '\\') !== false) { - return $name; - } - - if (strpos($name, '@')) { - [$app, $name] = explode('@', $name); - } else { - $app = ''; - } - - if (strpos($name, '/') !== false) { - $name = str_replace('/', '\\', $name); - } - - return $this->getNamespace($app) . '\\' . $name; - } - - protected function getNamespace(string $app): string - { - return 'app' . ($app ? '\\' . $app : ''); - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/RouteList.php b/vendor/topthink/framework/src/think/console/command/RouteList.php deleted file mode 100644 index cfc7293..0000000 --- a/vendor/topthink/framework/src/think/console/command/RouteList.php +++ /dev/null @@ -1,128 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\console\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\input\Option; -use think\console\Output; -use think\console\Table; -use think\event\RouteLoaded; - -class RouteList extends Command -{ - protected $sortBy = [ - 'rule' => 0, - 'route' => 1, - 'method' => 2, - 'name' => 3, - 'domain' => 4, - ]; - - protected function configure() - { - $this->setName('route:list') - ->addArgument('dir', Argument::OPTIONAL, 'dir name .') - ->addArgument('style', Argument::OPTIONAL, "the style of the table.", 'default') - ->addOption('sort', 's', Option::VALUE_OPTIONAL, 'order by rule name.', 0) - ->addOption('more', 'm', Option::VALUE_NONE, 'show route options.') - ->setDescription('show route list.'); - } - - protected function execute(Input $input, Output $output) - { - $dir = $input->getArgument('dir') ?: ''; - - $filename = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . ($dir ? $dir . DIRECTORY_SEPARATOR : '') . 'route_list.php'; - - if (is_file($filename)) { - unlink($filename); - } elseif (!is_dir(dirname($filename))) { - mkdir(dirname($filename), 0755); - } - - $content = $this->getRouteList($dir); - file_put_contents($filename, 'Route List' . PHP_EOL . $content); - } - - protected function getRouteList(string $dir = null): string - { - $this->app->route->clear(); - $this->app->route->lazy(false); - - if ($dir) { - $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; - } else { - $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR; - } - - $files = is_dir($path) ? scandir($path) : []; - - foreach ($files as $file) { - if (strpos($file, '.php')) { - include $path . $file; - } - } - - //触发路由载入完成事件 - $this->app->event->trigger(RouteLoaded::class); - - $table = new Table(); - - if ($this->input->hasOption('more')) { - $header = ['Rule', 'Route', 'Method', 'Name', 'Domain', 'Option', 'Pattern']; - } else { - $header = ['Rule', 'Route', 'Method', 'Name']; - } - - $table->setHeader($header); - - $routeList = $this->app->route->getRuleList(); - $rows = []; - - foreach ($routeList as $item) { - $item['route'] = $item['route'] instanceof \Closure ? '<Closure>' : $item['route']; - $row = [$item['rule'], $item['route'], $item['method'], $item['name']]; - - if ($this->input->hasOption('more')) { - array_push($row, $item['domain'], json_encode($item['option']), json_encode($item['pattern'])); - } - - $rows[] = $row; - } - - if ($this->input->getOption('sort')) { - $sort = strtolower($this->input->getOption('sort')); - - if (isset($this->sortBy[$sort])) { - $sort = $this->sortBy[$sort]; - } - - uasort($rows, function ($a, $b) use ($sort) { - $itemA = $a[$sort] ?? null; - $itemB = $b[$sort] ?? null; - - return strcasecmp($itemA, $itemB); - }); - } - - $table->setRows($rows); - - if ($this->input->getArgument('style')) { - $style = $this->input->getArgument('style'); - $table->setStyle($style); - } - - return $this->table($table); - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/RunServer.php b/vendor/topthink/framework/src/think/console/command/RunServer.php deleted file mode 100644 index d507c1d..0000000 --- a/vendor/topthink/framework/src/think/console/command/RunServer.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: Slince <taosikai@yeah.net> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\console\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Option; -use think\console\Output; - -class RunServer extends Command -{ - public function configure() - { - $this->setName('run') - ->addOption( - 'host', - 'H', - Option::VALUE_OPTIONAL, - 'The host to server the application on', - '0.0.0.0' - ) - ->addOption( - 'port', - 'p', - Option::VALUE_OPTIONAL, - 'The port to server the application on', - 8000 - ) - ->addOption( - 'root', - 'r', - Option::VALUE_OPTIONAL, - 'The document root of the application', - '' - ) - ->setDescription('PHP Built-in Server for ThinkPHP'); - } - - public function execute(Input $input, Output $output) - { - $host = $input->getOption('host'); - $port = $input->getOption('port'); - $root = $input->getOption('root'); - if (empty($root)) { - $root = $this->app->getRootPath() . 'public'; - } - - $command = sprintf( - 'php -S %s:%d -t %s %s', - $host, - $port, - escapeshellarg($root), - escapeshellarg($root . DIRECTORY_SEPARATOR . 'router.php') - ); - - $output->writeln(sprintf('ThinkPHP Development server is started On <http://%s:%s/>', $host, $port)); - $output->writeln(sprintf('You can exit with <info>`CTRL-C`</info>')); - $output->writeln(sprintf('Document root is: %s', $root)); - passthru($command); - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/ServiceDiscover.php b/vendor/topthink/framework/src/think/console/command/ServiceDiscover.php deleted file mode 100644 index e90f433..0000000 --- a/vendor/topthink/framework/src/think/console/command/ServiceDiscover.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\console\command; - -use think\console\Command; -use think\console\Input; -use think\console\Output; - -class ServiceDiscover extends Command -{ - public function configure() - { - $this->setName('service:discover') - ->setDescription('Discover Services for ThinkPHP'); - } - - public function execute(Input $input, Output $output) - { - if (is_file($path = $this->app->getRootPath() . 'vendor/composer/installed.json')) { - $packages = json_decode(@file_get_contents($path), true); - // Compatibility with Composer 2.0 - if (isset($packages['packages'])) { - $packages = $packages['packages']; - } - - $services = []; - foreach ($packages as $package) { - if (!empty($package['extra']['think']['services'])) { - $services = array_merge($services, (array) $package['extra']['think']['services']); - } - } - - $header = '// This file is automatically generated at:' . date('Y-m-d H:i:s') . PHP_EOL . 'declare (strict_types = 1);' . PHP_EOL; - - $content = '<?php ' . PHP_EOL . $header . "return " . var_export($services, true) . ';'; - - file_put_contents($this->app->getRootPath() . 'vendor/services.php', $content); - - $output->writeln('<info>Succeed!</info>'); - } - } -} diff --git a/vendor/topthink/framework/src/think/console/command/VendorPublish.php b/vendor/topthink/framework/src/think/console/command/VendorPublish.php deleted file mode 100644 index 3998765..0000000 --- a/vendor/topthink/framework/src/think/console/command/VendorPublish.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\console\command; - -use think\console\Command; -use think\console\input\Option; - -class VendorPublish extends Command -{ - public function configure() - { - $this->setName('vendor:publish') - ->addOption('force', 'f', Option::VALUE_NONE, 'Overwrite any existing files') - ->setDescription('Publish any publishable assets from vendor packages'); - } - - public function handle() - { - - $force = $this->input->getOption('force'); - - if (is_file($path = $this->app->getRootPath() . 'vendor/composer/installed.json')) { - $packages = json_decode(@file_get_contents($path), true); - // Compatibility with Composer 2.0 - if (isset($packages['packages'])) { - $packages = $packages['packages']; - } - foreach ($packages as $package) { - //配置 - $configDir = $this->app->getConfigPath(); - - if (!empty($package['extra']['think']['config'])) { - - $installPath = $this->app->getRootPath() . 'vendor/' . $package['name'] . DIRECTORY_SEPARATOR; - - foreach ((array) $package['extra']['think']['config'] as $name => $file) { - - $target = $configDir . $name . '.php'; - $source = $installPath . $file; - - if (is_file($target) && !$force) { - $this->output->info("File {$target} exist!"); - continue; - } - - if (!is_file($source)) { - $this->output->info("File {$source} not exist!"); - continue; - } - - copy($source, $target); - } - } - } - - $this->output->writeln('<info>Succeed!</info>'); - } - } -} diff --git a/vendor/topthink/framework/src/think/console/command/Version.php b/vendor/topthink/framework/src/think/console/command/Version.php deleted file mode 100644 index beb49d2..0000000 --- a/vendor/topthink/framework/src/think/console/command/Version.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\console\command; - -use think\console\Command; -use think\console\Input; -use think\console\Output; - -class Version extends Command -{ - protected function configure() - { - // 指令配置 - $this->setName('version') - ->setDescription('show thinkphp framework version'); - } - - protected function execute(Input $input, Output $output) - { - $output->writeln('v' . $this->app->version()); - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Command.php b/vendor/topthink/framework/src/think/console/command/make/Command.php deleted file mode 100644 index 9549a02..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Command.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\console\command\make; - -use think\console\command\Make; -use think\console\input\Argument; - -class Command extends Make -{ - protected $type = "Command"; - - protected function configure() - { - parent::configure(); - $this->setName('make:command') - ->addArgument('commandName', Argument::OPTIONAL, "The name of the command") - ->setDescription('Create a new command class'); - } - - protected function buildClass(string $name): string - { - $commandName = $this->input->getArgument('commandName') ?: strtolower(basename($name)); - $namespace = trim(implode('\\', array_slice(explode('\\', $name), 0, -1)), '\\'); - - $class = str_replace($namespace . '\\', '', $name); - $stub = file_get_contents($this->getStub()); - - return str_replace(['{%commandName%}', '{%className%}', '{%namespace%}', '{%app_namespace%}'], [ - $commandName, - $class, - $namespace, - $this->app->getNamespace(), - ], $stub); - } - - protected function getStub(): string - { - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'command.stub'; - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\command'; - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Controller.php b/vendor/topthink/framework/src/think/console/command/make/Controller.php deleted file mode 100644 index 4a8d226..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Controller.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\console\command\make; - -use think\console\command\Make; -use think\console\input\Option; - -class Controller extends Make -{ - - protected $type = "Controller"; - - protected function configure() - { - parent::configure(); - $this->setName('make:controller') - ->addOption('api', null, Option::VALUE_NONE, 'Generate an api controller class.') - ->addOption('plain', null, Option::VALUE_NONE, 'Generate an empty controller class.') - ->setDescription('Create a new resource controller class'); - } - - protected function getStub(): string - { - $stubPath = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR; - - if ($this->input->getOption('api')) { - return $stubPath . 'controller.api.stub'; - } - - if ($this->input->getOption('plain')) { - return $stubPath . 'controller.plain.stub'; - } - - return $stubPath . 'controller.stub'; - } - - protected function getClassName(string $name): string - { - return parent::getClassName($name) . ($this->app->config->get('route.controller_suffix') ? 'Controller' : ''); - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\controller'; - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Event.php b/vendor/topthink/framework/src/think/console/command/make/Event.php deleted file mode 100644 index 6b16689..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Event.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -namespace think\console\command\make; - -use think\console\command\Make; - -class Event extends Make -{ - protected $type = "Event"; - - protected function configure() - { - parent::configure(); - $this->setName('make:event') - ->setDescription('Create a new event class'); - } - - protected function getStub(): string - { - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'event.stub'; - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\event'; - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Listener.php b/vendor/topthink/framework/src/think/console/command/make/Listener.php deleted file mode 100644 index 5c92673..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Listener.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -namespace think\console\command\make; - -use think\console\command\Make; - -class Listener extends Make -{ - protected $type = "Listener"; - - protected function configure() - { - parent::configure(); - $this->setName('make:listener') - ->setDescription('Create a new listener class'); - } - - protected function getStub(): string - { - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'listener.stub'; - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\listener'; - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Middleware.php b/vendor/topthink/framework/src/think/console/command/make/Middleware.php deleted file mode 100644 index 3b68b4a..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Middleware.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\console\command\make; - -use think\console\command\Make; - -class Middleware extends Make -{ - protected $type = "Middleware"; - - protected function configure() - { - parent::configure(); - $this->setName('make:middleware') - ->setDescription('Create a new middleware class'); - } - - protected function getStub(): string - { - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'middleware.stub'; - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\middleware'; - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Model.php b/vendor/topthink/framework/src/think/console/command/make/Model.php deleted file mode 100644 index cb7a23c..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Model.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\console\command\make; - -use think\console\command\Make; - -class Model extends Make -{ - protected $type = "Model"; - - protected function configure() - { - parent::configure(); - $this->setName('make:model') - ->setDescription('Create a new model class'); - } - - protected function getStub(): string - { - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'model.stub'; - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\model'; - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Service.php b/vendor/topthink/framework/src/think/console/command/make/Service.php deleted file mode 100644 index c4bbaa0..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Service.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\console\command\make; - -use think\console\command\Make; - -class Service extends Make -{ - protected $type = "Service"; - - protected function configure() - { - parent::configure(); - $this->setName('make:service') - ->setDescription('Create a new Service class'); - } - - protected function getStub(): string - { - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'service.stub'; - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\service'; - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Subscribe.php b/vendor/topthink/framework/src/think/console/command/make/Subscribe.php deleted file mode 100644 index a1dc2a8..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Subscribe.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -namespace think\console\command\make; - -use think\console\command\Make; - -class Subscribe extends Make -{ - protected $type = "Subscribe"; - - protected function configure() - { - parent::configure(); - $this->setName('make:subscribe') - ->setDescription('Create a new subscribe class'); - } - - protected function getStub(): string - { - return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'subscribe.stub'; - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\subscribe'; - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/Validate.php b/vendor/topthink/framework/src/think/console/command/make/Validate.php deleted file mode 100644 index 8d36431..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/Validate.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\console\command\make; - -use think\console\command\Make; - -class Validate extends Make -{ - protected $type = "Validate"; - - protected function configure() - { - parent::configure(); - $this->setName('make:validate') - ->setDescription('Create a validate class'); - } - - protected function getStub(): string - { - $stubPath = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR; - - return $stubPath . 'validate.stub'; - } - - protected function getNamespace(string $app): string - { - return parent::getNamespace($app) . '\\validate'; - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub deleted file mode 100644 index 3ee2b1c..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/command.stub +++ /dev/null @@ -1,26 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\input\Option; -use think\console\Output; - -class {%className%} extends Command -{ - protected function configure() - { - // 指令配置 - $this->setName('{%commandName%}') - ->setDescription('the {%commandName%} command'); - } - - protected function execute(Input $input, Output $output) - { - // 指令输出 - $output->writeln('{%commandName%}'); - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/controller.api.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/controller.api.stub deleted file mode 100644 index 5d3383d..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/controller.api.stub +++ /dev/null @@ -1,64 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -use think\Request; - -class {%className%} -{ - /** - * 显示资源列表 - * - * @return \think\Response - */ - public function index{%actionSuffix%}() - { - // - } - - /** - * 保存新建的资源 - * - * @param \think\Request $request - * @return \think\Response - */ - public function save{%actionSuffix%}(Request $request) - { - // - } - - /** - * 显示指定的资源 - * - * @param int $id - * @return \think\Response - */ - public function read{%actionSuffix%}($id) - { - // - } - - /** - * 保存更新的资源 - * - * @param \think\Request $request - * @param int $id - * @return \think\Response - */ - public function update{%actionSuffix%}(Request $request, $id) - { - // - } - - /** - * 删除指定资源 - * - * @param int $id - * @return \think\Response - */ - public function delete{%actionSuffix%}($id) - { - // - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/controller.plain.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/controller.plain.stub deleted file mode 100644 index 347c209..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/controller.plain.stub +++ /dev/null @@ -1,9 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -class {%className%} -{ - // -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/controller.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/controller.stub deleted file mode 100644 index 8e5d82d..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/controller.stub +++ /dev/null @@ -1,85 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -use think\Request; - -class {%className%} -{ - /** - * 显示资源列表 - * - * @return \think\Response - */ - public function index{%actionSuffix%}() - { - // - } - - /** - * 显示创建资源表单页. - * - * @return \think\Response - */ - public function create{%actionSuffix%}() - { - // - } - - /** - * 保存新建的资源 - * - * @param \think\Request $request - * @return \think\Response - */ - public function save{%actionSuffix%}(Request $request) - { - // - } - - /** - * 显示指定的资源 - * - * @param int $id - * @return \think\Response - */ - public function read{%actionSuffix%}($id) - { - // - } - - /** - * 显示编辑资源表单页. - * - * @param int $id - * @return \think\Response - */ - public function edit{%actionSuffix%}($id) - { - // - } - - /** - * 保存更新的资源 - * - * @param \think\Request $request - * @param int $id - * @return \think\Response - */ - public function update{%actionSuffix%}(Request $request, $id) - { - // - } - - /** - * 删除指定资源 - * - * @param int $id - * @return \think\Response - */ - public function delete{%actionSuffix%}($id) - { - // - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/event.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/event.stub deleted file mode 100644 index a173089..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/event.stub +++ /dev/null @@ -1,8 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -class {%className%} -{ -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub deleted file mode 100644 index 0372438..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/listener.stub +++ /dev/null @@ -1,17 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -class {%className%} -{ - /** - * 事件监听处理 - * - * @return mixed - */ - public function handle($event) - { - // - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/middleware.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/middleware.stub deleted file mode 100644 index 38cf5f2..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/middleware.stub +++ /dev/null @@ -1,19 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -class {%className%} -{ - /** - * 处理请求 - * - * @param \think\Request $request - * @param \Closure $next - * @return Response - */ - public function handle($request, \Closure $next) - { - // - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/model.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/model.stub deleted file mode 100644 index bb94a38..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/model.stub +++ /dev/null @@ -1,14 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -use think\Model; - -/** - * @mixin \think\Model - */ -class {%className%} extends Model -{ - // -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub deleted file mode 100644 index 5d74d15..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/service.stub +++ /dev/null @@ -1,27 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -class {%className%} extends \think\Service -{ - /** - * 注册服务 - * - * @return mixed - */ - public function register() - { - // - } - - /** - * 执行服务 - * - * @return mixed - */ - public function boot() - { - // - } -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/subscribe.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/subscribe.stub deleted file mode 100644 index a173089..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/subscribe.stub +++ /dev/null @@ -1,8 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -class {%className%} -{ -} diff --git a/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub b/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub deleted file mode 100644 index d1fedd8..0000000 --- a/vendor/topthink/framework/src/think/console/command/make/stubs/validate.stub +++ /dev/null @@ -1,25 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%namespace%}; - -use think\Validate; - -class {%className%} extends Validate -{ - /** - * 定义验证规则 - * 格式:'字段名' => ['规则1','规则2'...] - * - * @var array - */ - protected $rule = []; - - /** - * 定义错误信息 - * 格式:'字段名.规则名' => '错误信息' - * - * @var array - */ - protected $message = []; -} diff --git a/vendor/topthink/framework/src/think/console/command/optimize/Route.php b/vendor/topthink/framework/src/think/console/command/optimize/Route.php deleted file mode 100644 index 56f7f5a..0000000 --- a/vendor/topthink/framework/src/think/console/command/optimize/Route.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\console\command\optimize; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\Output; -use think\event\RouteLoaded; - -class Route extends Command -{ - protected function configure() - { - $this->setName('optimize:route') - ->addArgument('dir', Argument::OPTIONAL, 'dir name .') - ->setDescription('Build app route cache.'); - } - - protected function execute(Input $input, Output $output) - { - $dir = $input->getArgument('dir') ?: ''; - - $path = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . ($dir ? $dir . DIRECTORY_SEPARATOR : ''); - - $filename = $path . 'route.php'; - if (is_file($filename)) { - unlink($filename); - } - - file_put_contents($filename, $this->buildRouteCache($dir)); - $output->writeln('<info>Succeed!</info>'); - } - - protected function buildRouteCache(string $dir = null): string - { - $this->app->route->clear(); - $this->app->route->lazy(false); - - // 路由检测 - $path = $this->app->getRootPath() . ($dir ? 'app' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR : '') . 'route' . DIRECTORY_SEPARATOR; - - $files = is_dir($path) ? scandir($path) : []; - - foreach ($files as $file) { - if (strpos($file, '.php')) { - include $path . $file; - } - } - - //触发路由载入完成事件 - $this->app->event->trigger(RouteLoaded::class); - $rules = $this->app->route->getName(); - - return '<?php ' . PHP_EOL . 'return unserialize(\'' . serialize($rules) . '\');'; - } - -} diff --git a/vendor/topthink/framework/src/think/console/command/optimize/Schema.php b/vendor/topthink/framework/src/think/console/command/optimize/Schema.php deleted file mode 100644 index 424daaf..0000000 --- a/vendor/topthink/framework/src/think/console/command/optimize/Schema.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\console\command\optimize; - -use Exception; -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\input\Option; -use think\console\Output; -use think\db\PDOConnection; - -class Schema extends Command -{ - protected function configure() - { - $this->setName('optimize:schema') - ->addArgument('dir', Argument::OPTIONAL, 'dir name .') - ->addOption('connection', null, Option::VALUE_REQUIRED, 'connection name .') - ->addOption('table', null, Option::VALUE_REQUIRED, 'table name .') - ->setDescription('Build database schema cache.'); - } - - protected function execute(Input $input, Output $output) - { - $dir = $input->getArgument('dir') ?: ''; - - if ($input->hasOption('table')) { - $connection = $this->app->db->connect($input->getOption('connection')); - if (!$connection instanceof PDOConnection) { - $output->error("only PDO connection support schema cache!"); - return; - } - $table = $input->getOption('table'); - if (false === strpos($table, '.')) { - $dbName = $connection->getConfig('database'); - } else { - [$dbName, $table] = explode('.', $table); - } - - if ($table == '*') { - $table = $connection->getTables($dbName); - } - - $this->buildDataBaseSchema($connection, (array) $table, $dbName); - } else { - if ($dir) { - $appPath = $this->app->getBasePath() . $dir . DIRECTORY_SEPARATOR; - $namespace = 'app\\' . $dir; - } else { - $appPath = $this->app->getBasePath(); - $namespace = 'app'; - } - - $path = $appPath . 'model'; - $list = is_dir($path) ? scandir($path) : []; - - foreach ($list as $file) { - if (0 === strpos($file, '.')) { - continue; - } - - $class = '\\' . $namespace . '\\model\\' . pathinfo($file, PATHINFO_FILENAME); - if (!class_exists($class)) { - continue; - } - - $this->buildModelSchema($class); - } - } - - $output->writeln('<info>Succeed!</info>'); - } - - protected function buildModelSchema(string $class): void - { - $reflect = new \ReflectionClass($class); - if (!$reflect->isAbstract() && $reflect->isSubclassOf('\think\Model')) { - try { - /** @var \think\Model $model */ - $model = new $class; - $connection = $model->db()->getConnection(); - if ($connection instanceof PDOConnection) { - $table = $model->getTable(); - //预读字段信息 - $connection->getSchemaInfo($table, true); - } - } catch (Exception $e) { - - } - } - } - - protected function buildDataBaseSchema(PDOConnection $connection, array $tables, string $dbName): void - { - foreach ($tables as $table) { - //预读字段信息 - $connection->getSchemaInfo("{$dbName}.{$table}", true); - } - } -} diff --git a/vendor/topthink/framework/src/think/console/input/Argument.php b/vendor/topthink/framework/src/think/console/input/Argument.php deleted file mode 100644 index 86cca36..0000000 --- a/vendor/topthink/framework/src/think/console/input/Argument.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\input; - -class Argument -{ - // 必传参数 - const REQUIRED = 1; - - // 可选参数 - const OPTIONAL = 2; - - // 数组参数 - const IS_ARRAY = 4; - - /** - * 参数名 - * @var string - */ - private $name; - - /** - * 参数类型 - * @var int - */ - private $mode; - - /** - * 参数默认值 - * @var mixed - */ - private $default; - - /** - * 参数描述 - * @var string - */ - private $description; - - /** - * 构造方法 - * @param string $name 参数名 - * @param int $mode 参数类型: self::REQUIRED 或者 self::OPTIONAL - * @param string $description 描述 - * @param mixed $default 默认值 (仅 self::OPTIONAL 类型有效) - * @throws \InvalidArgumentException - */ - public function __construct(string $name, int $mode = null, string $description = '', $default = null) - { - if (null === $mode) { - $mode = self::OPTIONAL; - } elseif (!is_int($mode) || $mode > 7 || $mode < 1) { - throw new \InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); - } - - $this->name = $name; - $this->mode = $mode; - $this->description = $description; - - $this->setDefault($default); - } - - /** - * 获取参数名 - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * 是否必须 - * @return bool - */ - public function isRequired(): bool - { - return self::REQUIRED === (self::REQUIRED & $this->mode); - } - - /** - * 该参数是否接受数组 - * @return bool - */ - public function isArray(): bool - { - return self::IS_ARRAY === (self::IS_ARRAY & $this->mode); - } - - /** - * 设置默认值 - * @param mixed $default 默认值 - * @throws \LogicException - */ - public function setDefault($default = null): void - { - if (self::REQUIRED === $this->mode && null !== $default) { - throw new \LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.'); - } - - if ($this->isArray()) { - if (null === $default) { - $default = []; - } elseif (!is_array($default)) { - throw new \LogicException('A default value for an array argument must be an array.'); - } - } - - $this->default = $default; - } - - /** - * 获取默认值 - * @return mixed - */ - public function getDefault() - { - return $this->default; - } - - /** - * 获取描述 - * @return string - */ - public function getDescription(): string - { - return $this->description; - } -} diff --git a/vendor/topthink/framework/src/think/console/input/Definition.php b/vendor/topthink/framework/src/think/console/input/Definition.php deleted file mode 100644 index ccf02a0..0000000 --- a/vendor/topthink/framework/src/think/console/input/Definition.php +++ /dev/null @@ -1,375 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\input; - -class Definition -{ - - /** - * @var Argument[] - */ - private $arguments; - - private $requiredCount; - private $hasAnArrayArgument = false; - private $hasOptional; - - /** - * @var Option[] - */ - private $options; - private $shortcuts; - - /** - * 构造方法 - * @param array $definition - * @api - */ - public function __construct(array $definition = []) - { - $this->setDefinition($definition); - } - - /** - * 设置指令的定义 - * @param array $definition 定义的数组 - */ - public function setDefinition(array $definition): void - { - $arguments = []; - $options = []; - foreach ($definition as $item) { - if ($item instanceof Option) { - $options[] = $item; - } else { - $arguments[] = $item; - } - } - - $this->setArguments($arguments); - $this->setOptions($options); - } - - /** - * 设置参数 - * @param Argument[] $arguments 参数数组 - */ - public function setArguments(array $arguments = []): void - { - $this->arguments = []; - $this->requiredCount = 0; - $this->hasOptional = false; - $this->hasAnArrayArgument = false; - $this->addArguments($arguments); - } - - /** - * 添加参数 - * @param Argument[] $arguments 参数数组 - * @api - */ - public function addArguments(array $arguments = []): void - { - if (null !== $arguments) { - foreach ($arguments as $argument) { - $this->addArgument($argument); - } - } - } - - /** - * 添加一个参数 - * @param Argument $argument 参数 - * @throws \LogicException - */ - public function addArgument(Argument $argument): void - { - if (isset($this->arguments[$argument->getName()])) { - throw new \LogicException(sprintf('An argument with name "%s" already exists.', $argument->getName())); - } - - if ($this->hasAnArrayArgument) { - throw new \LogicException('Cannot add an argument after an array argument.'); - } - - if ($argument->isRequired() && $this->hasOptional) { - throw new \LogicException('Cannot add a required argument after an optional one.'); - } - - if ($argument->isArray()) { - $this->hasAnArrayArgument = true; - } - - if ($argument->isRequired()) { - ++$this->requiredCount; - } else { - $this->hasOptional = true; - } - - $this->arguments[$argument->getName()] = $argument; - } - - /** - * 根据名称或者位置获取参数 - * @param string|int $name 参数名或者位置 - * @return Argument 参数 - * @throws \InvalidArgumentException - */ - public function getArgument($name): Argument - { - if (!$this->hasArgument($name)) { - throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); - } - - $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; - - return $arguments[$name]; - } - - /** - * 根据名称或位置检查是否具有某个参数 - * @param string|int $name 参数名或者位置 - * @return bool - * @api - */ - public function hasArgument($name): bool - { - $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; - - return isset($arguments[$name]); - } - - /** - * 获取所有的参数 - * @return Argument[] 参数数组 - */ - public function getArguments(): array - { - return $this->arguments; - } - - /** - * 获取参数数量 - * @return int - */ - public function getArgumentCount(): int - { - return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments); - } - - /** - * 获取必填的参数的数量 - * @return int - */ - public function getArgumentRequiredCount(): int - { - return $this->requiredCount; - } - - /** - * 获取参数默认值 - * @return array - */ - public function getArgumentDefaults(): array - { - $values = []; - foreach ($this->arguments as $argument) { - $values[$argument->getName()] = $argument->getDefault(); - } - - return $values; - } - - /** - * 设置选项 - * @param Option[] $options 选项数组 - */ - public function setOptions(array $options = []): void - { - $this->options = []; - $this->shortcuts = []; - $this->addOptions($options); - } - - /** - * 添加选项 - * @param Option[] $options 选项数组 - * @api - */ - public function addOptions(array $options = []): void - { - foreach ($options as $option) { - $this->addOption($option); - } - } - - /** - * 添加一个选项 - * @param Option $option 选项 - * @throws \LogicException - * @api - */ - public function addOption(Option $option): void - { - if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) { - throw new \LogicException(sprintf('An option named "%s" already exists.', $option->getName())); - } - - if ($option->getShortcut()) { - foreach (explode('|', $option->getShortcut()) as $shortcut) { - if (isset($this->shortcuts[$shortcut]) - && !$option->equals($this->options[$this->shortcuts[$shortcut]]) - ) { - throw new \LogicException(sprintf('An option with shortcut "%s" already exists.', $shortcut)); - } - } - } - - $this->options[$option->getName()] = $option; - if ($option->getShortcut()) { - foreach (explode('|', $option->getShortcut()) as $shortcut) { - $this->shortcuts[$shortcut] = $option->getName(); - } - } - } - - /** - * 根据名称获取选项 - * @param string $name 选项名 - * @return Option - * @throws \InvalidArgumentException - * @api - */ - public function getOption(string $name): Option - { - if (!$this->hasOption($name)) { - throw new \InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name)); - } - - return $this->options[$name]; - } - - /** - * 根据名称检查是否有这个选项 - * @param string $name 选项名 - * @return bool - * @api - */ - public function hasOption(string $name): bool - { - return isset($this->options[$name]); - } - - /** - * 获取所有选项 - * @return Option[] - * @api - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * 根据名称检查某个选项是否有短名称 - * @param string $name 短名称 - * @return bool - */ - public function hasShortcut(string $name): bool - { - return isset($this->shortcuts[$name]); - } - - /** - * 根据短名称获取选项 - * @param string $shortcut 短名称 - * @return Option - */ - public function getOptionForShortcut(string $shortcut): Option - { - return $this->getOption($this->shortcutToName($shortcut)); - } - - /** - * 获取所有选项的默认值 - * @return array - */ - public function getOptionDefaults(): array - { - $values = []; - foreach ($this->options as $option) { - $values[$option->getName()] = $option->getDefault(); - } - - return $values; - } - - /** - * 根据短名称获取选项名 - * @param string $shortcut 短名称 - * @return string - * @throws \InvalidArgumentException - */ - private function shortcutToName(string $shortcut): string - { - if (!isset($this->shortcuts[$shortcut])) { - throw new \InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); - } - - return $this->shortcuts[$shortcut]; - } - - /** - * 获取该指令的介绍 - * @param bool $short 是否简洁介绍 - * @return string - */ - public function getSynopsis(bool $short = false): string - { - $elements = []; - - if ($short && $this->getOptions()) { - $elements[] = '[options]'; - } elseif (!$short) { - foreach ($this->getOptions() as $option) { - $value = ''; - if ($option->acceptValue()) { - $value = sprintf(' %s%s%s', $option->isValueOptional() ? '[' : '', strtoupper($option->getName()), $option->isValueOptional() ? ']' : ''); - } - - $shortcut = $option->getShortcut() ? sprintf('-%s|', $option->getShortcut()) : ''; - $elements[] = sprintf('[%s--%s%s]', $shortcut, $option->getName(), $value); - } - } - - if (count($elements) && $this->getArguments()) { - $elements[] = '[--]'; - } - - foreach ($this->getArguments() as $argument) { - $element = '<' . $argument->getName() . '>'; - if (!$argument->isRequired()) { - $element = '[' . $element . ']'; - } elseif ($argument->isArray()) { - $element .= ' (' . $element . ')'; - } - - if ($argument->isArray()) { - $element .= '...'; - } - - $elements[] = $element; - } - - return implode(' ', $elements); - } -} diff --git a/vendor/topthink/framework/src/think/console/input/Option.php b/vendor/topthink/framework/src/think/console/input/Option.php deleted file mode 100644 index d7e6514..0000000 --- a/vendor/topthink/framework/src/think/console/input/Option.php +++ /dev/null @@ -1,221 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\input; - -/** - * 命令行选项 - * @package think\console\input - */ -class Option -{ - // 无需传值 - const VALUE_NONE = 1; - // 必须传值 - const VALUE_REQUIRED = 2; - // 可选传值 - const VALUE_OPTIONAL = 4; - // 传数组值 - const VALUE_IS_ARRAY = 8; - - /** - * 选项名 - * @var string - */ - private $name = ''; - - /** - * 选项短名称 - * @var string - */ - private $shortcut = ''; - - /** - * 选项类型 - * @var int - */ - private $mode; - - /** - * 选项默认值 - * @var mixed - */ - private $default; - - /** - * 选项描述 - * @var string - */ - private $description = ''; - - /** - * 构造方法 - * @param string $name 选项名 - * @param string|array $shortcut 短名称,多个用|隔开或者使用数组 - * @param int $mode 选项类型(可选类型为 self::VALUE_*) - * @param string $description 描述 - * @param mixed $default 默认值 (类型为 self::VALUE_REQUIRED 或者 self::VALUE_NONE 的时候必须为null) - * @throws \InvalidArgumentException - */ - public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null) - { - if (0 === strpos($name, '--')) { - $name = substr($name, 2); - } - - if (empty($name)) { - throw new \InvalidArgumentException('An option name cannot be empty.'); - } - - if (empty($shortcut)) { - $shortcut = ''; - } - - if ('' !== $shortcut) { - if (is_array($shortcut)) { - $shortcut = implode('|', $shortcut); - } - $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-')); - $shortcuts = array_filter($shortcuts); - $shortcut = implode('|', $shortcuts); - - if (empty($shortcut)) { - throw new \InvalidArgumentException('An option shortcut cannot be empty.'); - } - } - - if (null === $mode) { - $mode = self::VALUE_NONE; - } elseif (!is_int($mode) || $mode > 15 || $mode < 1) { - throw new \InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); - } - - $this->name = $name; - $this->shortcut = $shortcut; - $this->mode = $mode; - $this->description = $description; - - if ($this->isArray() && !$this->acceptValue()) { - throw new \InvalidArgumentException('Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value.'); - } - - $this->setDefault($default); - } - - /** - * 获取短名称 - * @return string - */ - public function getShortcut(): string - { - return $this->shortcut; - } - - /** - * 获取选项名 - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * 是否可以设置值 - * @return bool 类型不是 self::VALUE_NONE 的时候返回true,其他均返回false - */ - public function acceptValue(): bool - { - return $this->isValueRequired() || $this->isValueOptional(); - } - - /** - * 是否必须 - * @return bool 类型是 self::VALUE_REQUIRED 的时候返回true,其他均返回false - */ - public function isValueRequired(): bool - { - return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode); - } - - /** - * 是否可选 - * @return bool 类型是 self::VALUE_OPTIONAL 的时候返回true,其他均返回false - */ - public function isValueOptional(): bool - { - return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode); - } - - /** - * 选项值是否接受数组 - * @return bool 类型是 self::VALUE_IS_ARRAY 的时候返回true,其他均返回false - */ - public function isArray(): bool - { - return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode); - } - - /** - * 设置默认值 - * @param mixed $default 默认值 - * @throws \LogicException - */ - public function setDefault($default = null) - { - if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) { - throw new \LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.'); - } - - if ($this->isArray()) { - if (null === $default) { - $default = []; - } elseif (!is_array($default)) { - throw new \LogicException('A default value for an array option must be an array.'); - } - } - - $this->default = $this->acceptValue() ? $default : false; - } - - /** - * 获取默认值 - * @return mixed - */ - public function getDefault() - { - return $this->default; - } - - /** - * 获取描述文字 - * @return string - */ - public function getDescription(): string - { - return $this->description; - } - - /** - * 检查所给选项是否是当前这个 - * @param Option $option - * @return bool - */ - public function equals(Option $option): bool - { - return $option->getName() === $this->getName() - && $option->getShortcut() === $this->getShortcut() - && $option->getDefault() === $this->getDefault() - && $option->isArray() === $this->isArray() - && $option->isValueRequired() === $this->isValueRequired() - && $option->isValueOptional() === $this->isValueOptional(); - } -} diff --git a/vendor/topthink/framework/src/think/console/output/Ask.php b/vendor/topthink/framework/src/think/console/output/Ask.php deleted file mode 100644 index 0058d05..0000000 --- a/vendor/topthink/framework/src/think/console/output/Ask.php +++ /dev/null @@ -1,336 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output; - -use think\console\Input; -use think\console\Output; -use think\console\output\question\Choice; -use think\console\output\question\Confirmation; - -class Ask -{ - private static $stty; - - private static $shell; - - /** @var Input */ - protected $input; - - /** @var Output */ - protected $output; - - /** @var Question */ - protected $question; - - public function __construct(Input $input, Output $output, Question $question) - { - $this->input = $input; - $this->output = $output; - $this->question = $question; - } - - public function run() - { - if (!$this->input->isInteractive()) { - return $this->question->getDefault(); - } - - if (!$this->question->getValidator()) { - return $this->doAsk(); - } - - $that = $this; - - $interviewer = function () use ($that) { - return $that->doAsk(); - }; - - return $this->validateAttempts($interviewer); - } - - protected function doAsk() - { - $this->writePrompt(); - - $inputStream = STDIN; - $autocomplete = $this->question->getAutocompleterValues(); - - if (null === $autocomplete || !$this->hasSttyAvailable()) { - $ret = false; - if ($this->question->isHidden()) { - try { - $ret = trim($this->getHiddenResponse($inputStream)); - } catch (\RuntimeException $e) { - if (!$this->question->isHiddenFallback()) { - throw $e; - } - } - } - - if (false === $ret) { - $ret = fgets($inputStream, 4096); - if (false === $ret) { - throw new \RuntimeException('Aborted'); - } - $ret = trim($ret); - } - } else { - $ret = trim($this->autocomplete($inputStream)); - } - - $ret = strlen($ret) > 0 ? $ret : $this->question->getDefault(); - - if ($normalizer = $this->question->getNormalizer()) { - return $normalizer($ret); - } - - return $ret; - } - - private function autocomplete($inputStream) - { - $autocomplete = $this->question->getAutocompleterValues(); - $ret = ''; - - $i = 0; - $ofs = -1; - $matches = $autocomplete; - $numMatches = count($matches); - - $sttyMode = shell_exec('stty -g'); - - shell_exec('stty -icanon -echo'); - - while (!feof($inputStream)) { - $c = fread($inputStream, 1); - - if ("\177" === $c) { - if (0 === $numMatches && 0 !== $i) { - --$i; - $this->output->write("\033[1D"); - } - - if ($i === 0) { - $ofs = -1; - $matches = $autocomplete; - $numMatches = count($matches); - } else { - $numMatches = 0; - } - - $ret = substr($ret, 0, $i); - } elseif ("\033" === $c) { - $c .= fread($inputStream, 2); - - if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) { - if ('A' === $c[2] && -1 === $ofs) { - $ofs = 0; - } - - if (0 === $numMatches) { - continue; - } - - $ofs += ('A' === $c[2]) ? -1 : 1; - $ofs = ($numMatches + $ofs) % $numMatches; - } - } elseif (ord($c) < 32) { - if ("\t" === $c || "\n" === $c) { - if ($numMatches > 0 && -1 !== $ofs) { - $ret = $matches[$ofs]; - $this->output->write(substr($ret, $i)); - $i = strlen($ret); - } - - if ("\n" === $c) { - $this->output->write($c); - break; - } - - $numMatches = 0; - } - - continue; - } else { - $this->output->write($c); - $ret .= $c; - ++$i; - - $numMatches = 0; - $ofs = 0; - - foreach ($autocomplete as $value) { - if (0 === strpos($value, $ret) && $i !== strlen($value)) { - $matches[$numMatches++] = $value; - } - } - } - - $this->output->write("\033[K"); - - if ($numMatches > 0 && -1 !== $ofs) { - $this->output->write("\0337"); - $this->output->highlight(substr($matches[$ofs], $i)); - $this->output->write("\0338"); - } - } - - shell_exec(sprintf('stty %s', $sttyMode)); - - return $ret; - } - - protected function getHiddenResponse($inputStream) - { - if ('\\' === DIRECTORY_SEPARATOR) { - $exe = __DIR__ . '/../bin/hiddeninput.exe'; - - $value = rtrim(shell_exec($exe)); - $this->output->writeln(''); - - return $value; - } - - if ($this->hasSttyAvailable()) { - $sttyMode = shell_exec('stty -g'); - - shell_exec('stty -echo'); - $value = fgets($inputStream, 4096); - shell_exec(sprintf('stty %s', $sttyMode)); - - if (false === $value) { - throw new \RuntimeException('Aborted'); - } - - $value = trim($value); - $this->output->writeln(''); - - return $value; - } - - if (false !== $shell = $this->getShell()) { - $readCmd = $shell === 'csh' ? 'set mypassword = $<' : 'read -r mypassword'; - $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd); - $value = rtrim(shell_exec($command)); - $this->output->writeln(''); - - return $value; - } - - throw new \RuntimeException('Unable to hide the response.'); - } - - protected function validateAttempts($interviewer) - { - /** @var \Exception $error */ - $error = null; - $attempts = $this->question->getMaxAttempts(); - while (null === $attempts || $attempts--) { - if (null !== $error) { - $this->output->error($error->getMessage()); - } - - try { - return call_user_func($this->question->getValidator(), $interviewer()); - } catch (\Exception $error) { - } - } - - throw $error; - } - - /** - * 显示问题的提示信息 - */ - protected function writePrompt() - { - $text = $this->question->getQuestion(); - $default = $this->question->getDefault(); - - switch (true) { - case null === $default: - $text = sprintf(' <info>%s</info>:', $text); - - break; - - case $this->question instanceof Confirmation: - $text = sprintf(' <info>%s (yes/no)</info> [<comment>%s</comment>]:', $text, $default ? 'yes' : 'no'); - - break; - - case $this->question instanceof Choice && $this->question->isMultiselect(): - $choices = $this->question->getChoices(); - $default = explode(',', $default); - - foreach ($default as $key => $value) { - $default[$key] = $choices[trim($value)]; - } - - $text = sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, implode(', ', $default)); - - break; - - case $this->question instanceof Choice: - $choices = $this->question->getChoices(); - $text = sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, $choices[$default]); - - break; - - default: - $text = sprintf(' <info>%s</info> [<comment>%s</comment>]:', $text, $default); - } - - $this->output->writeln($text); - - if ($this->question instanceof Choice) { - $width = max(array_map('strlen', array_keys($this->question->getChoices()))); - - foreach ($this->question->getChoices() as $key => $value) { - $this->output->writeln(sprintf(" [<comment>%-{$width}s</comment>] %s", $key, $value)); - } - } - - $this->output->write(' > '); - } - - private function getShell() - { - if (null !== self::$shell) { - return self::$shell; - } - - self::$shell = false; - - if (file_exists('/usr/bin/env')) { - $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; - foreach (['bash', 'zsh', 'ksh', 'csh'] as $sh) { - if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) { - self::$shell = $sh; - break; - } - } - } - - return self::$shell; - } - - private function hasSttyAvailable() - { - if (null !== self::$stty) { - return self::$stty; - } - - exec('stty 2>&1', $output, $exitcode); - - return self::$stty = $exitcode === 0; - } -} diff --git a/vendor/topthink/framework/src/think/console/output/Descriptor.php b/vendor/topthink/framework/src/think/console/output/Descriptor.php deleted file mode 100644 index 84d487c..0000000 --- a/vendor/topthink/framework/src/think/console/output/Descriptor.php +++ /dev/null @@ -1,323 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output; - -use think\Console; -use think\console\Command; -use think\console\input\Argument as InputArgument; -use think\console\input\Definition as InputDefinition; -use think\console\input\Option as InputOption; -use think\console\Output; -use think\console\output\descriptor\Console as ConsoleDescription; - -class Descriptor -{ - - /** - * @var Output - */ - protected $output; - - /** - * {@inheritdoc} - */ - public function describe(Output $output, $object, array $options = []) - { - $this->output = $output; - - switch (true) { - case $object instanceof InputArgument: - $this->describeInputArgument($object, $options); - break; - case $object instanceof InputOption: - $this->describeInputOption($object, $options); - break; - case $object instanceof InputDefinition: - $this->describeInputDefinition($object, $options); - break; - case $object instanceof Command: - $this->describeCommand($object, $options); - break; - case $object instanceof Console: - $this->describeConsole($object, $options); - break; - default: - throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object))); - } - } - - /** - * 输出内容 - * @param string $content - * @param bool $decorated - */ - protected function write($content, $decorated = false) - { - $this->output->write($content, false, $decorated ? Output::OUTPUT_NORMAL : Output::OUTPUT_RAW); - } - - /** - * 描述参数 - * @param InputArgument $argument - * @param array $options - * @return string|mixed - */ - protected function describeInputArgument(InputArgument $argument, array $options = []) - { - if (null !== $argument->getDefault() - && (!is_array($argument->getDefault()) - || count($argument->getDefault())) - ) { - $default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($argument->getDefault())); - } else { - $default = ''; - } - - $totalWidth = $options['total_width'] ?? strlen($argument->getName()); - $spacingWidth = $totalWidth - strlen($argument->getName()) + 2; - - $this->writeText(sprintf(" <info>%s</info>%s%s%s", $argument->getName(), str_repeat(' ', $spacingWidth), // + 17 = 2 spaces + <info> + </info> + 2 spaces - preg_replace('/\s*\R\s*/', PHP_EOL . str_repeat(' ', $totalWidth + 17), $argument->getDescription()), $default), $options); - } - - /** - * 描述选项 - * @param InputOption $option - * @param array $options - * @return string|mixed - */ - protected function describeInputOption(InputOption $option, array $options = []) - { - if ($option->acceptValue() && null !== $option->getDefault() - && (!is_array($option->getDefault()) - || count($option->getDefault())) - ) { - $default = sprintf('<comment> [default: %s]</comment>', $this->formatDefaultValue($option->getDefault())); - } else { - $default = ''; - } - - $value = ''; - if ($option->acceptValue()) { - $value = '=' . strtoupper($option->getName()); - - if ($option->isValueOptional()) { - $value = '[' . $value . ']'; - } - } - - $totalWidth = $options['total_width'] ?? $this->calculateTotalWidthForOptions([$option]); - $synopsis = sprintf('%s%s', $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ', sprintf('--%s%s', $option->getName(), $value)); - - $spacingWidth = $totalWidth - strlen($synopsis) + 2; - - $this->writeText(sprintf(" <info>%s</info>%s%s%s%s", $synopsis, str_repeat(' ', $spacingWidth), // + 17 = 2 spaces + <info> + </info> + 2 spaces - preg_replace('/\s*\R\s*/', "\n" . str_repeat(' ', $totalWidth + 17), $option->getDescription()), $default, $option->isArray() ? '<comment> (multiple values allowed)</comment>' : ''), $options); - } - - /** - * 描述输入 - * @param InputDefinition $definition - * @param array $options - * @return string|mixed - */ - protected function describeInputDefinition(InputDefinition $definition, array $options = []) - { - $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); - foreach ($definition->getArguments() as $argument) { - $totalWidth = max($totalWidth, strlen($argument->getName())); - } - - if ($definition->getArguments()) { - $this->writeText('<comment>Arguments:</comment>', $options); - $this->writeText("\n"); - foreach ($definition->getArguments() as $argument) { - $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth])); - $this->writeText("\n"); - } - } - - if ($definition->getArguments() && $definition->getOptions()) { - $this->writeText("\n"); - } - - if ($definition->getOptions()) { - $laterOptions = []; - - $this->writeText('<comment>Options:</comment>', $options); - foreach ($definition->getOptions() as $option) { - if (strlen($option->getShortcut()) > 1) { - $laterOptions[] = $option; - continue; - } - $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); - } - foreach ($laterOptions as $option) { - $this->writeText("\n"); - $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); - } - } - } - - /** - * 描述指令 - * @param Command $command - * @param array $options - * @return string|mixed - */ - protected function describeCommand(Command $command, array $options = []) - { - $command->getSynopsis(true); - $command->getSynopsis(false); - $command->mergeConsoleDefinition(false); - - $this->writeText('<comment>Usage:</comment>', $options); - foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) { - $this->writeText("\n"); - $this->writeText(' ' . $usage, $options); - } - $this->writeText("\n"); - - $definition = $command->getNativeDefinition(); - if ($definition->getOptions() || $definition->getArguments()) { - $this->writeText("\n"); - $this->describeInputDefinition($definition, $options); - $this->writeText("\n"); - } - - if ($help = $command->getProcessedHelp()) { - $this->writeText("\n"); - $this->writeText('<comment>Help:</comment>', $options); - $this->writeText("\n"); - $this->writeText(' ' . str_replace("\n", "\n ", $help), $options); - $this->writeText("\n"); - } - } - - /** - * 描述控制台 - * @param Console $console - * @param array $options - * @return string|mixed - */ - protected function describeConsole(Console $console, array $options = []) - { - $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; - $description = new ConsoleDescription($console, $describedNamespace); - - if (isset($options['raw_text']) && $options['raw_text']) { - $width = $this->getColumnWidth($description->getNamespaces()); - - foreach ($description->getCommands() as $command) { - $this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options); - $this->writeText("\n"); - } - } else { - if ('' != $help = $console->getHelp()) { - $this->writeText("$help\n\n", $options); - } - - $this->writeText("<comment>Usage:</comment>\n", $options); - $this->writeText(" command [options] [arguments]\n\n", $options); - - $this->describeInputDefinition(new InputDefinition($console->getDefinition()->getOptions()), $options); - - $this->writeText("\n"); - $this->writeText("\n"); - - $width = $this->getColumnWidth($description->getNamespaces()); - - if ($describedNamespace) { - $this->writeText(sprintf('<comment>Available commands for the "%s" namespace:</comment>', $describedNamespace), $options); - } else { - $this->writeText('<comment>Available commands:</comment>', $options); - } - - // add commands by namespace - foreach ($description->getNamespaces() as $namespace) { - if (!$describedNamespace && ConsoleDescription::GLOBAL_NAMESPACE !== $namespace['id']) { - $this->writeText("\n"); - $this->writeText(' <comment>' . $namespace['id'] . '</comment>', $options); - } - - foreach ($namespace['commands'] as $name) { - $this->writeText("\n"); - $spacingWidth = $width - strlen($name); - $this->writeText(sprintf(" <info>%s</info>%s%s", $name, str_repeat(' ', $spacingWidth), $description->getCommand($name) - ->getDescription()), $options); - } - } - - $this->writeText("\n"); - } - } - - /** - * {@inheritdoc} - */ - private function writeText($content, array $options = []) - { - $this->write(isset($options['raw_text']) - && $options['raw_text'] ? strip_tags($content) : $content, isset($options['raw_output']) ? !$options['raw_output'] : true); - } - - /** - * 格式化 - * @param mixed $default - * @return string - */ - private function formatDefaultValue($default) - { - return json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); - } - - /** - * @param Namespaces[] $namespaces - * @return int - */ - private function getColumnWidth(array $namespaces) - { - $width = 0; - foreach ($namespaces as $namespace) { - foreach ($namespace['commands'] as $name) { - if (strlen($name) > $width) { - $width = strlen($name); - } - } - } - - return $width + 2; - } - - /** - * @param InputOption[] $options - * @return int - */ - private function calculateTotalWidthForOptions($options) - { - $totalWidth = 0; - foreach ($options as $option) { - $nameLength = 4 + strlen($option->getName()) + 2; // - + shortcut + , + whitespace + name + -- - - if ($option->acceptValue()) { - $valueLength = 1 + strlen($option->getName()); // = + value - $valueLength += $option->isValueOptional() ? 2 : 0; // [ + ] - - $nameLength += $valueLength; - } - $totalWidth = max($totalWidth, $nameLength); - } - - return $totalWidth; - } -} diff --git a/vendor/topthink/framework/src/think/console/output/Formatter.php b/vendor/topthink/framework/src/think/console/output/Formatter.php deleted file mode 100644 index 1b97ca3..0000000 --- a/vendor/topthink/framework/src/think/console/output/Formatter.php +++ /dev/null @@ -1,198 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\console\output; - -use think\console\output\formatter\Stack as StyleStack; -use think\console\output\formatter\Style; - -class Formatter -{ - - private $decorated = false; - private $styles = []; - private $styleStack; - - /** - * 转义 - * @param string $text - * @return string - */ - public static function escape($text) - { - return preg_replace('/([^\\\\]?)</is', '$1\\<', $text); - } - - /** - * 初始化命令行输出格式 - */ - public function __construct() - { - $this->setStyle('error', new Style('white', 'red')); - $this->setStyle('info', new Style('green')); - $this->setStyle('comment', new Style('yellow')); - $this->setStyle('question', new Style('black', 'cyan')); - $this->setStyle('highlight', new Style('red')); - $this->setStyle('warning', new Style('black', 'yellow')); - - $this->styleStack = new StyleStack(); - } - - /** - * 设置外观标识 - * @param bool $decorated 是否美化文字 - */ - public function setDecorated($decorated) - { - $this->decorated = (bool) $decorated; - } - - /** - * 获取外观标识 - * @return bool - */ - public function isDecorated() - { - return $this->decorated; - } - - /** - * 添加一个新样式 - * @param string $name 样式名 - * @param Style $style 样式实例 - */ - public function setStyle($name, Style $style) - { - $this->styles[strtolower($name)] = $style; - } - - /** - * 是否有这个样式 - * @param string $name - * @return bool - */ - public function hasStyle($name) - { - return isset($this->styles[strtolower($name)]); - } - - /** - * 获取样式 - * @param string $name - * @return Style - * @throws \InvalidArgumentException - */ - public function getStyle($name) - { - if (!$this->hasStyle($name)) { - throw new \InvalidArgumentException(sprintf('Undefined style: %s', $name)); - } - - return $this->styles[strtolower($name)]; - } - - /** - * 使用所给的样式格式化文字 - * @param string $message 文字 - * @return string - */ - public function format($message) - { - $offset = 0; - $output = ''; - $tagRegex = '[a-z][a-z0-9_=;-]*'; - preg_match_all("#<(($tagRegex) | /($tagRegex)?)>#isx", $message, $matches, PREG_OFFSET_CAPTURE); - foreach ($matches[0] as $i => $match) { - $pos = $match[1]; - $text = $match[0]; - - if (0 != $pos && '\\' == $message[$pos - 1]) { - continue; - } - - $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset)); - $offset = $pos + strlen($text); - - if ($open = '/' != $text[1]) { - $tag = $matches[1][$i][0]; - } else { - $tag = $matches[3][$i][0] ?? ''; - } - - if (!$open && !$tag) { - // </> - $this->styleStack->pop(); - } elseif (false === $style = $this->createStyleFromString(strtolower($tag))) { - $output .= $this->applyCurrentStyle($text); - } elseif ($open) { - $this->styleStack->push($style); - } else { - $this->styleStack->pop($style); - } - } - - $output .= $this->applyCurrentStyle(substr($message, $offset)); - - return str_replace('\\<', '<', $output); - } - - /** - * @return StyleStack - */ - public function getStyleStack() - { - return $this->styleStack; - } - - /** - * 根据字符串创建新的样式实例 - * @param string $string - * @return Style|bool - */ - private function createStyleFromString($string) - { - if (isset($this->styles[$string])) { - return $this->styles[$string]; - } - - if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', strtolower($string), $matches, PREG_SET_ORDER)) { - return false; - } - - $style = new Style(); - foreach ($matches as $match) { - array_shift($match); - - if ('fg' == $match[0]) { - $style->setForeground($match[1]); - } elseif ('bg' == $match[0]) { - $style->setBackground($match[1]); - } else { - try { - $style->setOption($match[1]); - } catch (\InvalidArgumentException $e) { - return false; - } - } - } - - return $style; - } - - /** - * 从堆栈应用样式到文字 - * @param string $text 文字 - * @return string - */ - private function applyCurrentStyle($text) - { - return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text; - } -} diff --git a/vendor/topthink/framework/src/think/console/output/Question.php b/vendor/topthink/framework/src/think/console/output/Question.php deleted file mode 100644 index 03975f2..0000000 --- a/vendor/topthink/framework/src/think/console/output/Question.php +++ /dev/null @@ -1,211 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output; - -class Question -{ - - private $question; - private $attempts; - private $hidden = false; - private $hiddenFallback = true; - private $autocompleterValues; - private $validator; - private $default; - private $normalizer; - - /** - * 构造方法 - * @param string $question 问题 - * @param mixed $default 默认答案 - */ - public function __construct($question, $default = null) - { - $this->question = $question; - $this->default = $default; - } - - /** - * 获取问题 - * @return string - */ - public function getQuestion() - { - return $this->question; - } - - /** - * 获取默认答案 - * @return mixed - */ - public function getDefault() - { - return $this->default; - } - - /** - * 是否隐藏答案 - * @return bool - */ - public function isHidden() - { - return $this->hidden; - } - - /** - * 隐藏答案 - * @param bool $hidden - * @return Question - */ - public function setHidden($hidden) - { - if ($this->autocompleterValues) { - throw new \LogicException('A hidden question cannot use the autocompleter.'); - } - - $this->hidden = (bool) $hidden; - - return $this; - } - - /** - * 不能被隐藏是否撤销 - * @return bool - */ - public function isHiddenFallback() - { - return $this->hiddenFallback; - } - - /** - * 设置不能被隐藏的时候的操作 - * @param bool $fallback - * @return Question - */ - public function setHiddenFallback($fallback) - { - $this->hiddenFallback = (bool) $fallback; - - return $this; - } - - /** - * 获取自动完成 - * @return null|array|\Traversable - */ - public function getAutocompleterValues() - { - return $this->autocompleterValues; - } - - /** - * 设置自动完成的值 - * @param null|array|\Traversable $values - * @return Question - * @throws \InvalidArgumentException - * @throws \LogicException - */ - public function setAutocompleterValues($values) - { - if (is_array($values) && $this->isAssoc($values)) { - $values = array_merge(array_keys($values), array_values($values)); - } - - if (null !== $values && !is_array($values)) { - if (!$values instanceof \Traversable || $values instanceof \Countable) { - throw new \InvalidArgumentException('Autocompleter values can be either an array, `null` or an object implementing both `Countable` and `Traversable` interfaces.'); - } - } - - if ($this->hidden) { - throw new \LogicException('A hidden question cannot use the autocompleter.'); - } - - $this->autocompleterValues = $values; - - return $this; - } - - /** - * 设置答案的验证器 - * @param null|callable $validator - * @return Question The current instance - */ - public function setValidator($validator) - { - $this->validator = $validator; - - return $this; - } - - /** - * 获取验证器 - * @return null|callable - */ - public function getValidator() - { - return $this->validator; - } - - /** - * 设置最大重试次数 - * @param null|int $attempts - * @return Question - * @throws \InvalidArgumentException - */ - public function setMaxAttempts($attempts) - { - if (null !== $attempts && $attempts < 1) { - throw new \InvalidArgumentException('Maximum number of attempts must be a positive value.'); - } - - $this->attempts = $attempts; - - return $this; - } - - /** - * 获取最大重试次数 - * @return null|int - */ - public function getMaxAttempts() - { - return $this->attempts; - } - - /** - * 设置响应的回调 - * @param string|\Closure $normalizer - * @return Question - */ - public function setNormalizer($normalizer) - { - $this->normalizer = $normalizer; - - return $this; - } - - /** - * 获取响应回调 - * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. - * @return string|\Closure - */ - public function getNormalizer() - { - return $this->normalizer; - } - - protected function isAssoc($array) - { - return (bool) count(array_filter(array_keys($array), 'is_string')); - } -} diff --git a/vendor/topthink/framework/src/think/console/output/descriptor/Console.php b/vendor/topthink/framework/src/think/console/output/descriptor/Console.php deleted file mode 100644 index ff9f464..0000000 --- a/vendor/topthink/framework/src/think/console/output/descriptor/Console.php +++ /dev/null @@ -1,153 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output\descriptor; - -use think\Console as ThinkConsole; -use think\console\Command; - -class Console -{ - - const GLOBAL_NAMESPACE = '_global'; - - /** - * @var ThinkConsole - */ - private $console; - - /** - * @var null|string - */ - private $namespace; - - /** - * @var array - */ - private $namespaces; - - /** - * @var Command[] - */ - private $commands; - - /** - * @var Command[] - */ - private $aliases; - - /** - * 构造方法 - * @param ThinkConsole $console - * @param string|null $namespace - */ - public function __construct(ThinkConsole $console, $namespace = null) - { - $this->console = $console; - $this->namespace = $namespace; - } - - /** - * @return array - */ - public function getNamespaces(): array - { - if (null === $this->namespaces) { - $this->inspectConsole(); - } - - return $this->namespaces; - } - - /** - * @return Command[] - */ - public function getCommands(): array - { - if (null === $this->commands) { - $this->inspectConsole(); - } - - return $this->commands; - } - - /** - * @param string $name - * @return Command - * @throws \InvalidArgumentException - */ - public function getCommand(string $name): Command - { - if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) { - throw new \InvalidArgumentException(sprintf('Command %s does not exist.', $name)); - } - - return $this->commands[$name] ?? $this->aliases[$name]; - } - - private function inspectConsole(): void - { - $this->commands = []; - $this->namespaces = []; - - $all = $this->console->all($this->namespace ? $this->console->findNamespace($this->namespace) : null); - foreach ($this->sortCommands($all) as $namespace => $commands) { - $names = []; - - /** @var Command $command */ - foreach ($commands as $name => $command) { - if (is_string($command)) { - $command = new $command(); - } - - if (!$command->getName()) { - continue; - } - - if ($command->getName() === $name) { - $this->commands[$name] = $command; - } else { - $this->aliases[$name] = $command; - } - - $names[] = $name; - } - - $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names]; - } - } - - /** - * @param array $commands - * @return array - */ - private function sortCommands(array $commands): array - { - $namespacedCommands = []; - foreach ($commands as $name => $command) { - $key = $this->console->extractNamespace($name, 1); - if (!$key) { - $key = self::GLOBAL_NAMESPACE; - } - - $namespacedCommands[$key][$name] = $command; - } - ksort($namespacedCommands); - - foreach ($namespacedCommands as &$commandsSet) { - ksort($commandsSet); - } - // unset reference to keep scope clear - unset($commandsSet); - - return $namespacedCommands; - } -} diff --git a/vendor/topthink/framework/src/think/console/output/driver/Buffer.php b/vendor/topthink/framework/src/think/console/output/driver/Buffer.php deleted file mode 100644 index 576f31a..0000000 --- a/vendor/topthink/framework/src/think/console/output/driver/Buffer.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output\driver; - -use think\console\Output; - -class Buffer -{ - /** - * @var string - */ - private $buffer = ''; - - public function __construct(Output $output) - { - // do nothing - } - - public function fetch() - { - $content = $this->buffer; - $this->buffer = ''; - return $content; - } - - public function write($messages, bool $newline = false, int $options = 0) - { - $messages = (array) $messages; - - foreach ($messages as $message) { - $this->buffer .= $message; - } - if ($newline) { - $this->buffer .= "\n"; - } - } - - public function renderException(\Throwable $e) - { - // do nothing - } - -} diff --git a/vendor/topthink/framework/src/think/console/output/driver/Console.php b/vendor/topthink/framework/src/think/console/output/driver/Console.php deleted file mode 100644 index 3061f55..0000000 --- a/vendor/topthink/framework/src/think/console/output/driver/Console.php +++ /dev/null @@ -1,369 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output\driver; - -use think\console\Output; -use think\console\output\Formatter; - -class Console -{ - - /** @var Resource */ - private $stdout; - - /** @var Formatter */ - private $formatter; - - private $terminalDimensions; - - /** @var Output */ - private $output; - - public function __construct(Output $output) - { - $this->output = $output; - $this->formatter = new Formatter(); - $this->stdout = $this->openOutputStream(); - $decorated = $this->hasColorSupport($this->stdout); - $this->formatter->setDecorated($decorated); - } - - public function setDecorated($decorated) - { - $this->formatter->setDecorated($decorated); - } - - public function write($messages, bool $newline = false, int $type = 0, $stream = null) - { - if (Output::VERBOSITY_QUIET === $this->output->getVerbosity()) { - return; - } - - $messages = (array) $messages; - - foreach ($messages as $message) { - switch ($type) { - case Output::OUTPUT_NORMAL: - $message = $this->formatter->format($message); - break; - case Output::OUTPUT_RAW: - break; - case Output::OUTPUT_PLAIN: - $message = strip_tags($this->formatter->format($message)); - break; - default: - throw new \InvalidArgumentException(sprintf('Unknown output type given (%s)', $type)); - } - - $this->doWrite($message, $newline, $stream); - } - } - - public function renderException(\Throwable $e) - { - $stderr = $this->openErrorStream(); - $decorated = $this->hasColorSupport($stderr); - $this->formatter->setDecorated($decorated); - - do { - $title = sprintf(' [%s] ', get_class($e)); - - $len = $this->stringWidth($title); - - $width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : PHP_INT_MAX; - - if (defined('HHVM_VERSION') && $width > 1 << 31) { - $width = 1 << 31; - } - $lines = []; - foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) { - foreach ($this->splitStringByWidth($line, $width - 4) as $line) { - - $lineLength = $this->stringWidth(preg_replace('/\[[^m]*m/', '', $line)) + 4; - $lines[] = [$line, $lineLength]; - - $len = max($lineLength, $len); - } - } - - $messages = ['', '']; - $messages[] = $emptyLine = sprintf('<error>%s</error>', str_repeat(' ', $len)); - $messages[] = sprintf('<error>%s%s</error>', $title, str_repeat(' ', max(0, $len - $this->stringWidth($title)))); - foreach ($lines as $line) { - $messages[] = sprintf('<error> %s %s</error>', $line[0], str_repeat(' ', $len - $line[1])); - } - $messages[] = $emptyLine; - $messages[] = ''; - $messages[] = ''; - - $this->write($messages, true, Output::OUTPUT_NORMAL, $stderr); - - if (Output::VERBOSITY_VERBOSE <= $this->output->getVerbosity()) { - $this->write('<comment>Exception trace:</comment>', true, Output::OUTPUT_NORMAL, $stderr); - - // exception related properties - $trace = $e->getTrace(); - array_unshift($trace, [ - 'function' => '', - 'file' => $e->getFile() !== null ? $e->getFile() : 'n/a', - 'line' => $e->getLine() !== null ? $e->getLine() : 'n/a', - 'args' => [], - ]); - - for ($i = 0, $count = count($trace); $i < $count; ++$i) { - $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; - $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; - $function = $trace[$i]['function']; - $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a'; - $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; - - $this->write(sprintf(' %s%s%s() at <info>%s:%s</info>', $class, $type, $function, $file, $line), true, Output::OUTPUT_NORMAL, $stderr); - } - - $this->write('', true, Output::OUTPUT_NORMAL, $stderr); - $this->write('', true, Output::OUTPUT_NORMAL, $stderr); - } - } while ($e = $e->getPrevious()); - - } - - /** - * 获取终端宽度 - * @return int|null - */ - protected function getTerminalWidth() - { - $dimensions = $this->getTerminalDimensions(); - - return $dimensions[0]; - } - - /** - * 获取终端高度 - * @return int|null - */ - protected function getTerminalHeight() - { - $dimensions = $this->getTerminalDimensions(); - - return $dimensions[1]; - } - - /** - * 获取当前终端的尺寸 - * @return array - */ - public function getTerminalDimensions(): array - { - if ($this->terminalDimensions) { - return $this->terminalDimensions; - } - - if ('\\' === DIRECTORY_SEPARATOR) { - if (preg_match('/^(\d+)x\d+ \(\d+x(\d+)\)$/', trim(getenv('ANSICON')), $matches)) { - return [(int) $matches[1], (int) $matches[2]]; - } - if (preg_match('/^(\d+)x(\d+)$/', $this->getMode(), $matches)) { - return [(int) $matches[1], (int) $matches[2]]; - } - } - - if ($sttyString = $this->getSttyColumns()) { - if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { - return [(int) $matches[2], (int) $matches[1]]; - } - if (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) { - return [(int) $matches[2], (int) $matches[1]]; - } - } - - return [null, null]; - } - - /** - * 获取stty列数 - * @return string - */ - private function getSttyColumns() - { - if (!function_exists('proc_open')) { - return; - } - - $descriptorspec = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']]; - $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); - if (is_resource($process)) { - $info = stream_get_contents($pipes[1]); - fclose($pipes[1]); - fclose($pipes[2]); - proc_close($process); - - return $info; - } - return; - } - - /** - * 获取终端模式 - * @return string <width>x<height> - */ - private function getMode() - { - if (!function_exists('proc_open')) { - return ''; - } - - $descriptorspec = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']]; - $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); - if (is_resource($process)) { - $info = stream_get_contents($pipes[1]); - fclose($pipes[1]); - fclose($pipes[2]); - proc_close($process); - - if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { - return $matches[2] . 'x' . $matches[1]; - } - } - - return ''; - } - - private function stringWidth(string $string): int - { - if (!function_exists('mb_strwidth')) { - return strlen($string); - } - - if (false === $encoding = mb_detect_encoding($string)) { - return strlen($string); - } - - return mb_strwidth($string, $encoding); - } - - private function splitStringByWidth(string $string, int $width): array - { - if (!function_exists('mb_strwidth')) { - return str_split($string, $width); - } - - if (false === $encoding = mb_detect_encoding($string)) { - return str_split($string, $width); - } - - $utf8String = mb_convert_encoding($string, 'utf8', $encoding); - $lines = []; - $line = ''; - foreach (preg_split('//u', $utf8String) as $char) { - if (mb_strwidth($line . $char, 'utf8') <= $width) { - $line .= $char; - continue; - } - $lines[] = str_pad($line, $width); - $line = $char; - } - if (strlen($line)) { - $lines[] = count($lines) ? str_pad($line, $width) : $line; - } - - mb_convert_variables($encoding, 'utf8', $lines); - - return $lines; - } - - private function isRunningOS400(): bool - { - $checks = [ - function_exists('php_uname') ? php_uname('s') : '', - getenv('OSTYPE'), - PHP_OS, - ]; - return false !== stripos(implode(';', $checks), 'OS400'); - } - - /** - * 当前环境是否支持写入控制台输出到stdout. - * - * @return bool - */ - protected function hasStdoutSupport(): bool - { - return false === $this->isRunningOS400(); - } - - /** - * 当前环境是否支持写入控制台输出到stderr. - * - * @return bool - */ - protected function hasStderrSupport(): bool - { - return false === $this->isRunningOS400(); - } - - /** - * @return resource - */ - private function openOutputStream() - { - if (!$this->hasStdoutSupport()) { - return fopen('php://output', 'w'); - } - return @fopen('php://stdout', 'w') ?: fopen('php://output', 'w'); - } - - /** - * @return resource - */ - private function openErrorStream() - { - return fopen($this->hasStderrSupport() ? 'php://stderr' : 'php://output', 'w'); - } - - /** - * 将消息写入到输出。 - * @param string $message 消息 - * @param bool $newline 是否另起一行 - * @param null $stream - */ - protected function doWrite($message, $newline, $stream = null) - { - if (null === $stream) { - $stream = $this->stdout; - } - if (false === @fwrite($stream, $message . ($newline ? PHP_EOL : ''))) { - throw new \RuntimeException('Unable to write output.'); - } - - fflush($stream); - } - - /** - * 是否支持着色 - * @param $stream - * @return bool - */ - protected function hasColorSupport($stream): bool - { - if (DIRECTORY_SEPARATOR === '\\') { - return - '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD - || false !== getenv('ANSICON') - || 'ON' === getenv('ConEmuANSI') - || 'xterm' === getenv('TERM'); - } - - return function_exists('posix_isatty') && @posix_isatty($stream); - } - -} diff --git a/vendor/topthink/framework/src/think/console/output/driver/Nothing.php b/vendor/topthink/framework/src/think/console/output/driver/Nothing.php deleted file mode 100644 index a7cc49e..0000000 --- a/vendor/topthink/framework/src/think/console/output/driver/Nothing.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output\driver; - -use think\console\Output; - -class Nothing -{ - - public function __construct(Output $output) - { - // do nothing - } - - public function write($messages, bool $newline = false, int $options = 0) - { - // do nothing - } - - public function renderException(\Throwable $e) - { - // do nothing - } -} diff --git a/vendor/topthink/framework/src/think/console/output/formatter/Stack.php b/vendor/topthink/framework/src/think/console/output/formatter/Stack.php deleted file mode 100644 index 5366259..0000000 --- a/vendor/topthink/framework/src/think/console/output/formatter/Stack.php +++ /dev/null @@ -1,116 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output\formatter; - -class Stack -{ - - /** - * @var Style[] - */ - private $styles; - - /** - * @var Style - */ - private $emptyStyle; - - /** - * 构造方法 - * @param Style|null $emptyStyle - */ - public function __construct(Style $emptyStyle = null) - { - $this->emptyStyle = $emptyStyle ?: new Style(); - $this->reset(); - } - - /** - * 重置堆栈 - */ - public function reset(): void - { - $this->styles = []; - } - - /** - * 推一个样式进入堆栈 - * @param Style $style - */ - public function push(Style $style): void - { - $this->styles[] = $style; - } - - /** - * 从堆栈中弹出一个样式 - * @param Style|null $style - * @return Style - * @throws \InvalidArgumentException - */ - public function pop(Style $style = null): Style - { - if (empty($this->styles)) { - return $this->emptyStyle; - } - - if (null === $style) { - return array_pop($this->styles); - } - - /** - * @var int $index - * @var Style $stackedStyle - */ - foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { - if ($style->apply('') === $stackedStyle->apply('')) { - $this->styles = array_slice($this->styles, 0, $index); - - return $stackedStyle; - } - } - - throw new \InvalidArgumentException('Incorrectly nested style tag found.'); - } - - /** - * 计算堆栈的当前样式。 - * @return Style - */ - public function getCurrent(): Style - { - if (empty($this->styles)) { - return $this->emptyStyle; - } - - return $this->styles[count($this->styles) - 1]; - } - - /** - * @param Style $emptyStyle - * @return Stack - */ - public function setEmptyStyle(Style $emptyStyle) - { - $this->emptyStyle = $emptyStyle; - - return $this; - } - - /** - * @return Style - */ - public function getEmptyStyle(): Style - { - return $this->emptyStyle; - } -} diff --git a/vendor/topthink/framework/src/think/console/output/formatter/Style.php b/vendor/topthink/framework/src/think/console/output/formatter/Style.php deleted file mode 100644 index 2aae768..0000000 --- a/vendor/topthink/framework/src/think/console/output/formatter/Style.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output\formatter; - -class Style -{ - protected static $availableForegroundColors = [ - 'black' => ['set' => 30, 'unset' => 39], - 'red' => ['set' => 31, 'unset' => 39], - 'green' => ['set' => 32, 'unset' => 39], - 'yellow' => ['set' => 33, 'unset' => 39], - 'blue' => ['set' => 34, 'unset' => 39], - 'magenta' => ['set' => 35, 'unset' => 39], - 'cyan' => ['set' => 36, 'unset' => 39], - 'white' => ['set' => 37, 'unset' => 39], - ]; - - protected static $availableBackgroundColors = [ - 'black' => ['set' => 40, 'unset' => 49], - 'red' => ['set' => 41, 'unset' => 49], - 'green' => ['set' => 42, 'unset' => 49], - 'yellow' => ['set' => 43, 'unset' => 49], - 'blue' => ['set' => 44, 'unset' => 49], - 'magenta' => ['set' => 45, 'unset' => 49], - 'cyan' => ['set' => 46, 'unset' => 49], - 'white' => ['set' => 47, 'unset' => 49], - ]; - - protected static $availableOptions = [ - 'bold' => ['set' => 1, 'unset' => 22], - 'underscore' => ['set' => 4, 'unset' => 24], - 'blink' => ['set' => 5, 'unset' => 25], - 'reverse' => ['set' => 7, 'unset' => 27], - 'conceal' => ['set' => 8, 'unset' => 28], - ]; - - private $foreground; - private $background; - private $options = []; - - /** - * 初始化输出的样式 - * @param string|null $foreground 字体颜色 - * @param string|null $background 背景色 - * @param array $options 格式 - * @api - */ - public function __construct($foreground = null, $background = null, array $options = []) - { - if (null !== $foreground) { - $this->setForeground($foreground); - } - if (null !== $background) { - $this->setBackground($background); - } - if (count($options)) { - $this->setOptions($options); - } - } - - /** - * 设置字体颜色 - * @param string|null $color 颜色名 - * @throws \InvalidArgumentException - * @api - */ - public function setForeground($color = null) - { - if (null === $color) { - $this->foreground = null; - - return; - } - - if (!isset(static::$availableForegroundColors[$color])) { - throw new \InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableForegroundColors)))); - } - - $this->foreground = static::$availableForegroundColors[$color]; - } - - /** - * 设置背景色 - * @param string|null $color 颜色名 - * @throws \InvalidArgumentException - * @api - */ - public function setBackground($color = null) - { - if (null === $color) { - $this->background = null; - - return; - } - - if (!isset(static::$availableBackgroundColors[$color])) { - throw new \InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableBackgroundColors)))); - } - - $this->background = static::$availableBackgroundColors[$color]; - } - - /** - * 设置字体格式 - * @param string $option 格式名 - * @throws \InvalidArgumentException When the option name isn't defined - * @api - */ - public function setOption(string $option): void - { - if (!isset(static::$availableOptions[$option])) { - throw new \InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions)))); - } - - if (!in_array(static::$availableOptions[$option], $this->options)) { - $this->options[] = static::$availableOptions[$option]; - } - } - - /** - * 重置字体格式 - * @param string $option 格式名 - * @throws \InvalidArgumentException - */ - public function unsetOption(string $option): void - { - if (!isset(static::$availableOptions[$option])) { - throw new \InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions)))); - } - - $pos = array_search(static::$availableOptions[$option], $this->options); - if (false !== $pos) { - unset($this->options[$pos]); - } - } - - /** - * 批量设置字体格式 - * @param array $options - */ - public function setOptions(array $options) - { - $this->options = []; - - foreach ($options as $option) { - $this->setOption($option); - } - } - - /** - * 应用样式到文字 - * @param string $text 文字 - * @return string - */ - public function apply(string $text): string - { - $setCodes = []; - $unsetCodes = []; - - if (null !== $this->foreground) { - $setCodes[] = $this->foreground['set']; - $unsetCodes[] = $this->foreground['unset']; - } - if (null !== $this->background) { - $setCodes[] = $this->background['set']; - $unsetCodes[] = $this->background['unset']; - } - if (count($this->options)) { - foreach ($this->options as $option) { - $setCodes[] = $option['set']; - $unsetCodes[] = $option['unset']; - } - } - - if (0 === count($setCodes)) { - return $text; - } - - return sprintf("\033[%sm%s\033[%sm", implode(';', $setCodes), $text, implode(';', $unsetCodes)); - } -} diff --git a/vendor/topthink/framework/src/think/console/output/question/Choice.php b/vendor/topthink/framework/src/think/console/output/question/Choice.php deleted file mode 100644 index 1da1750..0000000 --- a/vendor/topthink/framework/src/think/console/output/question/Choice.php +++ /dev/null @@ -1,163 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output\question; - -use think\console\output\Question; - -class Choice extends Question -{ - - private $choices; - private $multiselect = false; - private $prompt = ' > '; - private $errorMessage = 'Value "%s" is invalid'; - - /** - * 构造方法 - * @param string $question 问题 - * @param array $choices 选项 - * @param mixed $default 默认答案 - */ - public function __construct($question, array $choices, $default = null) - { - parent::__construct($question, $default); - - $this->choices = $choices; - $this->setValidator($this->getDefaultValidator()); - $this->setAutocompleterValues($choices); - } - - /** - * 可选项 - * @return array - */ - public function getChoices(): array - { - return $this->choices; - } - - /** - * 设置可否多选 - * @param bool $multiselect - * @return self - */ - public function setMultiselect(bool $multiselect) - { - $this->multiselect = $multiselect; - $this->setValidator($this->getDefaultValidator()); - - return $this; - } - - public function isMultiselect(): bool - { - return $this->multiselect; - } - - /** - * 获取提示 - * @return string - */ - public function getPrompt(): string - { - return $this->prompt; - } - - /** - * 设置提示 - * @param string $prompt - * @return self - */ - public function setPrompt(string $prompt) - { - $this->prompt = $prompt; - - return $this; - } - - /** - * 设置错误提示信息 - * @param string $errorMessage - * @return self - */ - public function setErrorMessage(string $errorMessage) - { - $this->errorMessage = $errorMessage; - $this->setValidator($this->getDefaultValidator()); - - return $this; - } - - /** - * 获取默认的验证方法 - * @return callable - */ - private function getDefaultValidator() - { - $choices = $this->choices; - $errorMessage = $this->errorMessage; - $multiselect = $this->multiselect; - $isAssoc = $this->isAssoc($choices); - - return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { - // Collapse all spaces. - $selectedChoices = str_replace(' ', '', $selected); - - if ($multiselect) { - // Check for a separated comma values - if (!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) { - throw new \InvalidArgumentException(sprintf($errorMessage, $selected)); - } - $selectedChoices = explode(',', $selectedChoices); - } else { - $selectedChoices = [$selected]; - } - - $multiselectChoices = []; - foreach ($selectedChoices as $value) { - $results = []; - foreach ($choices as $key => $choice) { - if ($choice === $value) { - $results[] = $key; - } - } - - if (count($results) > 1) { - throw new \InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results))); - } - - $result = array_search($value, $choices); - - if (!$isAssoc) { - if (!empty($result)) { - $result = $choices[$result]; - } elseif (isset($choices[$value])) { - $result = $choices[$value]; - } - } elseif (empty($result) && array_key_exists($value, $choices)) { - $result = $value; - } - - if (false === $result) { - throw new \InvalidArgumentException(sprintf($errorMessage, $value)); - } - array_push($multiselectChoices, $result); - } - - if ($multiselect) { - return $multiselectChoices; - } - - return current($multiselectChoices); - }; - } -} diff --git a/vendor/topthink/framework/src/think/console/output/question/Confirmation.php b/vendor/topthink/framework/src/think/console/output/question/Confirmation.php deleted file mode 100644 index bf71b5d..0000000 --- a/vendor/topthink/framework/src/think/console/output/question/Confirmation.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\console\output\question; - -use think\console\output\Question; - -class Confirmation extends Question -{ - - private $trueAnswerRegex; - - /** - * 构造方法 - * @param string $question 问题 - * @param bool $default 默认答案 - * @param string $trueAnswerRegex 验证正则 - */ - public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i') - { - parent::__construct($question, (bool) $default); - - $this->trueAnswerRegex = $trueAnswerRegex; - $this->setNormalizer($this->getDefaultNormalizer()); - } - - /** - * 获取默认的答案回调 - * @return callable - */ - private function getDefaultNormalizer() - { - $default = $this->getDefault(); - $regex = $this->trueAnswerRegex; - - return function ($answer) use ($default, $regex) { - if (is_bool($answer)) { - return $answer; - } - - $answerIsTrue = (bool) preg_match($regex, $answer); - if (false === $default) { - return $answer && $answerIsTrue; - } - - return !$answer || $answerIsTrue; - }; - } -} diff --git a/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php b/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php deleted file mode 100644 index da5e696..0000000 --- a/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\contract; - -/** - * 缓存驱动接口 - */ -interface CacheHandlerInterface -{ - /** - * 判断缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function has($name); - - /** - * 读取缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $default 默认值 - * @return mixed - */ - public function get($name, $default = null); - - /** - * 写入缓存 - * @access public - * @param string $name 缓存变量名 - * @param mixed $value 存储数据 - * @param integer|\DateTime $expire 有效时间(秒) - * @return bool - */ - public function set($name, $value, $expire = null); - - /** - * 自增缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function inc(string $name, int $step = 1); - - /** - * 自减缓存(针对数值缓存) - * @access public - * @param string $name 缓存变量名 - * @param int $step 步长 - * @return false|int - */ - public function dec(string $name, int $step = 1); - - /** - * 删除缓存 - * @access public - * @param string $name 缓存变量名 - * @return bool - */ - public function delete($name); - - /** - * 清除缓存 - * @access public - * @return bool - */ - public function clear(); - - /** - * 删除缓存标签 - * @access public - * @param array $keys 缓存标识列表 - * @return void - */ - public function clearTag(array $keys); - -} diff --git a/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php b/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php deleted file mode 100644 index 896ac29..0000000 --- a/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\contract; - -/** - * 日志驱动接口 - */ -interface LogHandlerInterface -{ - /** - * 日志写入接口 - * @access public - * @param array $log 日志信息 - * @return bool - */ - public function save(array $log): bool; - -} diff --git a/vendor/topthink/framework/src/think/contract/ModelRelationInterface.php b/vendor/topthink/framework/src/think/contract/ModelRelationInterface.php deleted file mode 100644 index 1f6f994..0000000 --- a/vendor/topthink/framework/src/think/contract/ModelRelationInterface.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\contract; - -use Closure; -use think\Collection; -use think\db\Query; -use think\Model; - -/** - * 模型关联接口 - */ -interface ModelRelationInterface -{ - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联 - * @param Closure $closure 闭包查询条件 - * @return Collection - */ - public function getRelation(array $subRelation = [], Closure $closure = null): Collection; - - /** - * 预载入关联查询 - * @access public - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包条件 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation, Closure $closure = null): void; - - /** - * 预载入关联查询 - * @access public - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包条件 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null): void; - - /** - * 关联统计 - * @access public - * @param Model $result 模型对象 - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return integer - */ - public function relationCount(Model $result, Closure $closure, string $aggregate = 'count', string $field = '*', string &$name = null); - - /** - * 创建关联统计子查询 - * @access public - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return string - */ - public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): string; - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @return Query - */ - public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = 'INNER'): Query; - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @return Query - */ - public function hasWhere($where = [], $fields = null, string $joinType = ''): Query; -} diff --git a/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php b/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php deleted file mode 100644 index 0b2e414..0000000 --- a/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\contract; - -/** - * Session驱动接口 - */ -interface SessionHandlerInterface -{ - public function read(string $sessionId): string; - public function delete(string $sessionId): bool; - public function write(string $sessionId, string $data): bool; -} diff --git a/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php b/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php deleted file mode 100644 index 9be93d2..0000000 --- a/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\contract; - -/** - * 视图驱动接口 - */ -interface TemplateHandlerInterface -{ - /** - * 检测是否存在模板文件 - * @access public - * @param string $template 模板文件或者模板规则 - * @return bool - */ - public function exists(string $template): bool; - - /** - * 渲染模板文件 - * @access public - * @param string $template 模板文件 - * @param array $data 模板变量 - * @return void - */ - public function fetch(string $template, array $data = []): void; - - /** - * 渲染模板内容 - * @access public - * @param string $content 模板内容 - * @param array $data 模板变量 - * @return void - */ - public function display(string $content, array $data = []): void; - - /** - * 配置模板引擎 - * @access private - * @param array $config 参数 - * @return void - */ - public function config(array $config): void; - - /** - * 获取模板引擎配置 - * @access public - * @param string $name 参数名 - * @return void - */ - public function getConfig(string $name); -} diff --git a/vendor/topthink/framework/src/think/event/AppInit.php b/vendor/topthink/framework/src/think/event/AppInit.php deleted file mode 100644 index dda820b..0000000 --- a/vendor/topthink/framework/src/think/event/AppInit.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\event; - -/** - * AppInit事件类 - */ -class AppInit -{} diff --git a/vendor/topthink/framework/src/think/event/HttpEnd.php b/vendor/topthink/framework/src/think/event/HttpEnd.php deleted file mode 100644 index c40da57..0000000 --- a/vendor/topthink/framework/src/think/event/HttpEnd.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\event; - -/** - * HttpEnd事件类 - */ -class HttpEnd -{} diff --git a/vendor/topthink/framework/src/think/event/HttpRun.php b/vendor/topthink/framework/src/think/event/HttpRun.php deleted file mode 100644 index ce67e93..0000000 --- a/vendor/topthink/framework/src/think/event/HttpRun.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\event; - -/** - * HttpRun事件类 - */ -class HttpRun -{} diff --git a/vendor/topthink/framework/src/think/event/LogRecord.php b/vendor/topthink/framework/src/think/event/LogRecord.php deleted file mode 100644 index 237468d..0000000 --- a/vendor/topthink/framework/src/think/event/LogRecord.php +++ /dev/null @@ -1,29 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\event; - -/** - * LogRecord事件类 - */ -class LogRecord -{ - /** @var string */ - public $type; - - /** @var string */ - public $message; - - public function __construct($type, $message) - { - $this->type = $type; - $this->message = $message; - } -} diff --git a/vendor/topthink/framework/src/think/event/LogWrite.php b/vendor/topthink/framework/src/think/event/LogWrite.php deleted file mode 100644 index a787301..0000000 --- a/vendor/topthink/framework/src/think/event/LogWrite.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\event; - -/** - * LogWrite事件类 - */ -class LogWrite -{ - /** @var string */ - public $channel; - - /** @var array */ - public $log; - - public function __construct($channel, $log) - { - $this->channel = $channel; - $this->log = $log; - } -} diff --git a/vendor/topthink/framework/src/think/event/RouteLoaded.php b/vendor/topthink/framework/src/think/event/RouteLoaded.php deleted file mode 100644 index ace7992..0000000 --- a/vendor/topthink/framework/src/think/event/RouteLoaded.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\event; - -/** - * 路由加载完成事件 - */ -class RouteLoaded -{ - -} diff --git a/vendor/topthink/framework/src/think/exception/ClassNotFoundException.php b/vendor/topthink/framework/src/think/exception/ClassNotFoundException.php deleted file mode 100644 index c4cda77..0000000 --- a/vendor/topthink/framework/src/think/exception/ClassNotFoundException.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\exception; - -use Psr\Container\NotFoundExceptionInterface; -use RuntimeException; -use Throwable; - -class ClassNotFoundException extends RuntimeException implements NotFoundExceptionInterface -{ - protected $class; - - public function __construct(string $message, string $class = '', Throwable $previous = null) - { - $this->message = $message; - $this->class = $class; - - parent::__construct($message, 0, $previous); - } - - /** - * 获取类名 - * @access public - * @return string - */ - public function getClass() - { - return $this->class; - } -} diff --git a/vendor/topthink/framework/src/think/exception/ErrorException.php b/vendor/topthink/framework/src/think/exception/ErrorException.php deleted file mode 100644 index d1a2378..0000000 --- a/vendor/topthink/framework/src/think/exception/ErrorException.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\exception; - -use think\Exception; - -/** - * ThinkPHP错误异常 - * 主要用于封装 set_error_handler 和 register_shutdown_function 得到的错误 - * 除开从 think\Exception 继承的功能 - * 其他和PHP系统\ErrorException功能基本一样 - */ -class ErrorException extends Exception -{ - /** - * 用于保存错误级别 - * @var integer - */ - protected $severity; - - /** - * 错误异常构造函数 - * @access public - * @param integer $severity 错误级别 - * @param string $message 错误详细信息 - * @param string $file 出错文件路径 - * @param integer $line 出错行号 - */ - public function __construct(int $severity, string $message, string $file, int $line) - { - $this->severity = $severity; - $this->message = $message; - $this->file = $file; - $this->line = $line; - $this->code = 0; - } - - /** - * 获取错误级别 - * @access public - * @return integer 错误级别 - */ - final public function getSeverity() - { - return $this->severity; - } -} diff --git a/vendor/topthink/framework/src/think/exception/FileException.php b/vendor/topthink/framework/src/think/exception/FileException.php deleted file mode 100644 index 228a189..0000000 --- a/vendor/topthink/framework/src/think/exception/FileException.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\exception; - -class FileException extends \RuntimeException -{ -} diff --git a/vendor/topthink/framework/src/think/exception/FuncNotFoundException.php b/vendor/topthink/framework/src/think/exception/FuncNotFoundException.php deleted file mode 100644 index ee2bcad..0000000 --- a/vendor/topthink/framework/src/think/exception/FuncNotFoundException.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace think\exception; - -use Psr\Container\NotFoundExceptionInterface; -use RuntimeException; -use Throwable; - -class FuncNotFoundException extends RuntimeException implements NotFoundExceptionInterface -{ - protected $func; - - public function __construct(string $message, string $func = '', Throwable $previous = null) - { - $this->message = $message; - $this->func = $func; - - parent::__construct($message, 0, $previous); - } - - /** - * 获取方法名 - * @access public - * @return string - */ - public function getFunc() - { - return $this->func; - } -} diff --git a/vendor/topthink/framework/src/think/exception/Handle.php b/vendor/topthink/framework/src/think/exception/Handle.php deleted file mode 100644 index 1f783bc..0000000 --- a/vendor/topthink/framework/src/think/exception/Handle.php +++ /dev/null @@ -1,332 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\exception; - -use Exception; -use think\App; -use think\console\Output; -use think\db\exception\DataNotFoundException; -use think\db\exception\ModelNotFoundException; -use think\Request; -use think\Response; -use Throwable; - -/** - * 系统异常处理类 - */ -class Handle -{ - /** @var App */ - protected $app; - - protected $ignoreReport = [ - HttpException::class, - HttpResponseException::class, - ModelNotFoundException::class, - DataNotFoundException::class, - ValidateException::class, - ]; - - protected $isJson = false; - - public function __construct(App $app) - { - $this->app = $app; - } - - /** - * Report or log an exception. - * - * @access public - * @param Throwable $exception - * @return void - */ - public function report(Throwable $exception): void - { - if (!$this->isIgnoreReport($exception)) { - // 收集异常数据 - if ($this->app->isDebug()) { - $data = [ - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), - 'message' => $this->getMessage($exception), - 'code' => $this->getCode($exception), - ]; - $log = "[{$data['code']}]{$data['message']}[{$data['file']}:{$data['line']}]"; - } else { - $data = [ - 'code' => $this->getCode($exception), - 'message' => $this->getMessage($exception), - ]; - $log = "[{$data['code']}]{$data['message']}"; - } - - if ($this->app->config->get('log.record_trace')) { - $log .= PHP_EOL . $exception->getTraceAsString(); - } - - try { - $this->app->log->record($log, 'error'); - } catch (Exception $e) {} - } - } - - protected function isIgnoreReport(Throwable $exception): bool - { - foreach ($this->ignoreReport as $class) { - if ($exception instanceof $class) { - return true; - } - } - - return false; - } - - /** - * Render an exception into an HTTP response. - * - * @access public - * @param Request $request - * @param Throwable $e - * @return Response - */ - public function render($request, Throwable $e): Response - { - $this->isJson = $request->isJson(); - if ($e instanceof HttpResponseException) { - return $e->getResponse(); - } elseif ($e instanceof HttpException) { - return $this->renderHttpException($e); - } else { - return $this->convertExceptionToResponse($e); - } - } - - /** - * @access public - * @param Output $output - * @param Throwable $e - */ - public function renderForConsole(Output $output, Throwable $e): void - { - if ($this->app->isDebug()) { - $output->setVerbosity(Output::VERBOSITY_DEBUG); - } - - $output->renderException($e); - } - - /** - * @access protected - * @param HttpException $e - * @return Response - */ - protected function renderHttpException(HttpException $e): Response - { - $status = $e->getStatusCode(); - $template = $this->app->config->get('app.http_exception_template'); - - if (!$this->app->isDebug() && !empty($template[$status])) { - return Response::create($template[$status], 'view', $status)->assign(['e' => $e]); - } else { - return $this->convertExceptionToResponse($e); - } - } - - /** - * 收集异常数据 - * @param Throwable $exception - * @return array - */ - protected function convertExceptionToArray(Throwable $exception): array - { - if ($this->app->isDebug()) { - // 调试模式,获取详细的错误信息 - $traces = []; - $nextException = $exception; - do { - $traces[] = [ - 'name' => get_class($nextException), - 'file' => $nextException->getFile(), - 'line' => $nextException->getLine(), - 'code' => $this->getCode($nextException), - 'message' => $this->getMessage($nextException), - 'trace' => $nextException->getTrace(), - 'source' => $this->getSourceCode($nextException), - ]; - } while ($nextException = $nextException->getPrevious()); - $data = [ - 'code' => $this->getCode($exception), - 'message' => $this->getMessage($exception), - 'traces' => $traces, - 'datas' => $this->getExtendData($exception), - 'tables' => [ - 'GET Data' => $this->app->request->get(), - 'POST Data' => $this->app->request->post(), - 'Files' => $this->app->request->file(), - 'Cookies' => $this->app->request->cookie(), - 'Session' => $this->app->exists('session') ? $this->app->session->all() : [], - 'Server/Request Data' => $this->app->request->server(), - ], - ]; - } else { - // 部署模式仅显示 Code 和 Message - $data = [ - 'code' => $this->getCode($exception), - 'message' => $this->getMessage($exception), - ]; - - if (!$this->app->config->get('app.show_error_msg')) { - // 不显示详细错误信息 - $data['message'] = $this->app->config->get('app.error_message'); - } - } - - return $data; - } - - /** - * @access protected - * @param Throwable $exception - * @return Response - */ - protected function convertExceptionToResponse(Throwable $exception): Response - { - if (!$this->isJson) { - $response = Response::create($this->renderExceptionContent($exception)); - } else { - $response = Response::create($this->convertExceptionToArray($exception), 'json'); - } - - if ($exception instanceof HttpException) { - $statusCode = $exception->getStatusCode(); - $response->header($exception->getHeaders()); - } - - return $response->code($statusCode ?? 500); - } - - protected function renderExceptionContent(Throwable $exception): string - { - ob_start(); - $data = $this->convertExceptionToArray($exception); - extract($data); - include $this->app->config->get('app.exception_tmpl') ?: __DIR__ . '/../../tpl/think_exception.tpl'; - - return ob_get_clean(); - } - - /** - * 获取错误编码 - * ErrorException则使用错误级别作为错误编码 - * @access protected - * @param Throwable $exception - * @return integer 错误编码 - */ - protected function getCode(Throwable $exception) - { - $code = $exception->getCode(); - - if (!$code && $exception instanceof ErrorException) { - $code = $exception->getSeverity(); - } - - return $code; - } - - /** - * 获取错误信息 - * ErrorException则使用错误级别作为错误编码 - * @access protected - * @param Throwable $exception - * @return string 错误信息 - */ - protected function getMessage(Throwable $exception): string - { - $message = $exception->getMessage(); - - if ($this->app->runningInConsole()) { - return $message; - } - - $lang = $this->app->lang; - - if (strpos($message, ':')) { - $name = strstr($message, ':', true); - $message = $lang->has($name) ? $lang->get($name) . strstr($message, ':') : $message; - } elseif (strpos($message, ',')) { - $name = strstr($message, ',', true); - $message = $lang->has($name) ? $lang->get($name) . ':' . substr(strstr($message, ','), 1) : $message; - } elseif ($lang->has($message)) { - $message = $lang->get($message); - } - - return $message; - } - - /** - * 获取出错文件内容 - * 获取错误的前9行和后9行 - * @access protected - * @param Throwable $exception - * @return array 错误文件内容 - */ - protected function getSourceCode(Throwable $exception): array - { - // 读取前9行和后9行 - $line = $exception->getLine(); - $first = ($line - 9 > 0) ? $line - 9 : 1; - - try { - $contents = file($exception->getFile()) ?: []; - $source = [ - 'first' => $first, - 'source' => array_slice($contents, $first - 1, 19), - ]; - } catch (Exception $e) { - $source = []; - } - - return $source; - } - - /** - * 获取异常扩展信息 - * 用于非调试模式html返回类型显示 - * @access protected - * @param Throwable $exception - * @return array 异常类定义的扩展数据 - */ - protected function getExtendData(Throwable $exception): array - { - $data = []; - - if ($exception instanceof \think\Exception) { - $data = $exception->getData(); - } - - return $data; - } - - /** - * 获取常量列表 - * @access protected - * @return array 常量列表 - */ - protected function getConst(): array - { - $const = get_defined_constants(true); - - return $const['user'] ?? []; - } -} diff --git a/vendor/topthink/framework/src/think/exception/HttpException.php b/vendor/topthink/framework/src/think/exception/HttpException.php deleted file mode 100644 index 45302e5..0000000 --- a/vendor/topthink/framework/src/think/exception/HttpException.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\exception; - -use Exception; - -/** - * HTTP异常 - */ -class HttpException extends \RuntimeException -{ - private $statusCode; - private $headers; - - public function __construct(int $statusCode, string $message = '', Exception $previous = null, array $headers = [], $code = 0) - { - $this->statusCode = $statusCode; - $this->headers = $headers; - - parent::__construct($message, $code, $previous); - } - - public function getStatusCode() - { - return $this->statusCode; - } - - public function getHeaders() - { - return $this->headers; - } -} diff --git a/vendor/topthink/framework/src/think/exception/HttpResponseException.php b/vendor/topthink/framework/src/think/exception/HttpResponseException.php deleted file mode 100644 index 607813d..0000000 --- a/vendor/topthink/framework/src/think/exception/HttpResponseException.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\exception; - -use think\Response; - -/** - * HTTP响应异常 - */ -class HttpResponseException extends \RuntimeException -{ - /** - * @var Response - */ - protected $response; - - public function __construct(Response $response) - { - $this->response = $response; - } - - public function getResponse() - { - return $this->response; - } - -} diff --git a/vendor/topthink/framework/src/think/exception/InvalidArgumentException.php b/vendor/topthink/framework/src/think/exception/InvalidArgumentException.php deleted file mode 100644 index 8ccd6f6..0000000 --- a/vendor/topthink/framework/src/think/exception/InvalidArgumentException.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); -namespace think\exception; - -use Psr\Cache\InvalidArgumentException as Psr6CacheInvalidArgumentInterface; -use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInvalidArgumentInterface; - -/** - * 非法数据异常 - */ -class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInvalidArgumentInterface, SimpleCacheInvalidArgumentInterface -{ -} diff --git a/vendor/topthink/framework/src/think/exception/RouteNotFoundException.php b/vendor/topthink/framework/src/think/exception/RouteNotFoundException.php deleted file mode 100644 index 7a2ee87..0000000 --- a/vendor/topthink/framework/src/think/exception/RouteNotFoundException.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\exception; - -/** - * 路由未定义异常 - */ -class RouteNotFoundException extends HttpException -{ - - public function __construct() - { - parent::__construct(404, 'Route Not Found'); - } - -} diff --git a/vendor/topthink/framework/src/think/exception/ValidateException.php b/vendor/topthink/framework/src/think/exception/ValidateException.php deleted file mode 100644 index 89b4e4d..0000000 --- a/vendor/topthink/framework/src/think/exception/ValidateException.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\exception; - -/** - * 数据验证异常 - */ -class ValidateException extends \RuntimeException -{ - protected $error; - - public function __construct($error) - { - $this->error = $error; - $this->message = is_array($error) ? implode(PHP_EOL, $error) : $error; - } - - /** - * 获取验证错误信息 - * @access public - * @return array|string - */ - public function getError() - { - return $this->error; - } -} diff --git a/vendor/topthink/framework/src/think/facade/App.php b/vendor/topthink/framework/src/think/facade/App.php deleted file mode 100644 index e9f8105..0000000 --- a/vendor/topthink/framework/src/think/facade/App.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\App - * @package think\facade - * @mixin \think\App - * @method static \think\Service|null register(\think\Service|string $service, bool $force = false) 注册服务 - * @method static mixed bootService(\think\Service $service) 执行服务 - * @method static \think\Service|null getService(string|\think\Service $service) 获取服务 - * @method static \think\App debug(bool $debug = true) 开启应用调试模式 - * @method static bool isDebug() 是否为调试模式 - * @method static \think\App setNamespace(string $namespace) 设置应用命名空间 - * @method static string getNamespace() 获取应用类库命名空间 - * @method static string version() 获取框架版本 - * @method static string getRootPath() 获取应用根目录 - * @method static string getBasePath() 获取应用基础目录 - * @method static string getAppPath() 获取当前应用目录 - * @method static mixed setAppPath(string $path) 设置应用目录 - * @method static string getRuntimePath() 获取应用运行时目录 - * @method static void setRuntimePath(string $path) 设置runtime目录 - * @method static string getThinkPath() 获取核心框架目录 - * @method static string getConfigPath() 获取应用配置目录 - * @method static string getConfigExt() 获取配置后缀 - * @method static float getBeginTime() 获取应用开启时间 - * @method static integer getBeginMem() 获取应用初始内存占用 - * @method static \think\App initialize() 初始化应用 - * @method static bool initialized() 是否初始化过 - * @method static void loadLangPack(string $langset) 加载语言包 - * @method static void boot() 引导应用 - * @method static void loadEvent(array $event) 注册应用事件 - * @method static string parseClass(string $layer, string $name) 解析应用类的类名 - * @method static bool runningInConsole() 是否运行在命令行下 - */ -class App extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'app'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Cache.php b/vendor/topthink/framework/src/think/facade/Cache.php deleted file mode 100644 index aac105d..0000000 --- a/vendor/topthink/framework/src/think/facade/Cache.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\cache\Driver; -use think\cache\TagSet; -use think\Facade; - -/** - * @see \think\Cache - * @package think\facade - * @mixin \think\Cache - * @method static string|null getDefaultDriver() 默认驱动 - * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取缓存配置 - * @method static array getStoreConfig(string $store, string $name = null, null $default = null) 获取驱动配置 - * @method static Driver store(string $name = null) 连接或者切换缓存 - * @method static bool clear() 清空缓冲池 - * @method static mixed get(string $key, mixed $default = null) 读取缓存 - * @method static bool set(string $key, mixed $value, int|\DateTime $ttl = null) 写入缓存 - * @method static bool delete(string $key) 删除缓存 - * @method static iterable getMultiple(iterable $keys, mixed $default = null) 读取缓存 - * @method static bool setMultiple(iterable $values, null|int|\DateInterval $ttl = null) 写入缓存 - * @method static bool deleteMultiple(iterable $keys) 删除缓存 - * @method static bool has(string $key) 判断缓存是否存在 - * @method static TagSet tag(string|array $name) 缓存标签 - */ -class Cache extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'cache'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Config.php b/vendor/topthink/framework/src/think/facade/Config.php deleted file mode 100644 index 4ce73dd..0000000 --- a/vendor/topthink/framework/src/think/facade/Config.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\Config - * @package think\facade - * @mixin \think\Config - * @method static array load(string $file, string $name = '') 加载配置文件(多种格式) - * @method static bool has(string $name) 检测配置是否存在 - * @method static mixed get(string $name = null, mixed $default = null) 获取配置参数 为空则获取所有配置 - * @method static array set(array $config, string $name = null) 设置配置参数 name为数组则为批量设置 - */ -class Config extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'config'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Console.php b/vendor/topthink/framework/src/think/facade/Console.php deleted file mode 100644 index 30dd935..0000000 --- a/vendor/topthink/framework/src/think/facade/Console.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\console\Command; -use think\console\Input; -use think\console\input\Definition as InputDefinition; -use think\console\Output; -use think\console\output\driver\Buffer; -use think\Facade; - -/** - * Class Console - * @package think\facade - * @mixin \think\Console - * @method static Output|Buffer call(string $command, array $parameters = [], string $driver = 'buffer') - * @method static int run() 执行当前的指令 - * @method static int doRun(Input $input, Output $output) 执行指令 - * @method static void setDefinition(InputDefinition $definition) 设置输入参数定义 - * @method static InputDefinition The InputDefinition instance getDefinition() 获取输入参数定义 - * @method static string A help message. getHelp() Gets the help message. - * @method static void setCatchExceptions(bool $boolean) 是否捕获异常 - * @method static void setAutoExit(bool $boolean) 是否自动退出 - * @method static string getLongVersion() 获取完整的版本号 - * @method static void addCommands(array $commands) 添加指令集 - * @method static Command|void addCommand(string|Command $command, string $name = '') 添加一个指令 - * @method static Command getCommand(string $name) 获取指令 - * @method static bool hasCommand(string $name) 某个指令是否存在 - * @method static array getNamespaces() 获取所有的命名空间 - * @method static string findNamespace(string $namespace) 查找注册命名空间中的名称或缩写。 - * @method static Command find(string $name) 查找指令 - * @method static Command[] all(string $namespace = null) 获取所有的指令 - * @method static string extractNamespace(string $name, int $limit = 0) 返回命名空间部分 - */ -class Console extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'console'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Cookie.php b/vendor/topthink/framework/src/think/facade/Cookie.php deleted file mode 100644 index 960f4a3..0000000 --- a/vendor/topthink/framework/src/think/facade/Cookie.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\Cookie - * @package think\facade - * @mixin \think\Cookie - * @method static mixed get(mixed $name = '', string $default = null) 获取cookie - * @method static bool has(string $name) 是否存在Cookie参数 - * @method static void set(string $name, string $value, mixed $option = null) Cookie 设置 - * @method static void forever(string $name, string $value = '', mixed $option = null) 永久保存Cookie数据 - * @method static void delete(string $name) Cookie删除 - * @method static array getCookie() 获取cookie保存数据 - * @method static void save() 保存Cookie - */ -class Cookie extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'cookie'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Env.php b/vendor/topthink/framework/src/think/facade/Env.php deleted file mode 100644 index bed2538..0000000 --- a/vendor/topthink/framework/src/think/facade/Env.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\Env - * @package think\facade - * @mixin \think\Env - * @method static void load(string $file) 读取环境变量定义文件 - * @method static mixed get(string $name = null, mixed $default = null) 获取环境变量值 - * @method static void set(string|array $env, mixed $value = null) 设置环境变量值 - * @method static bool has(string $name) 检测是否存在环境变量 - * @method static void __set(string $name, mixed $value) 设置环境变量 - * @method static mixed __get(string $name) 获取环境变量 - * @method static bool __isset(string $name) 检测是否存在环境变量 - * @method static void offsetSet($name, $value) - * @method static bool offsetExists($name) - * @method static mixed offsetUnset($name) - * @method static mixed offsetGet($name) - */ -class Env extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'env'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Event.php b/vendor/topthink/framework/src/think/facade/Event.php deleted file mode 100644 index c09d816..0000000 --- a/vendor/topthink/framework/src/think/facade/Event.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\Event - * @package think\facade - * @mixin \think\Event - * @method static \think\Event listenEvents(array $events) 批量注册事件监听 - * @method static \think\Event listen(string $event, mixed $listener, bool $first = false) 注册事件监听 - * @method static bool hasListener(string $event) 是否存在事件监听 - * @method static void remove(string $event) 移除事件监听 - * @method static \think\Event bind(array $events) 指定事件别名标识 便于调用 - * @method static \think\Event subscribe(mixed $subscriber) 注册事件订阅者 - * @method static \think\Event observe(string|object $observer, null|string $prefix = '') 自动注册事件观察者 - * @method static mixed trigger(string|object $event, mixed $params = null, bool $once = false) 触发事件 - * @method static mixed until($event, $params = null) 触发事件(只获取一个有效返回值) - */ -class Event extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'event'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Lang.php b/vendor/topthink/framework/src/think/facade/Lang.php deleted file mode 100644 index b460fe2..0000000 --- a/vendor/topthink/framework/src/think/facade/Lang.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\Lang - * @package think\facade - * @mixin \think\Lang - * @method static void setLangSet(string $lang) 设置当前语言 - * @method static string getLangSet() 获取当前语言 - * @method static string defaultLangSet() 获取默认语言 - * @method static array load(string|array $file, string $range = '') 加载语言定义(不区分大小写) - * @method static bool has(string|null $name, string $range = '') 判断是否存在语言定义(不区分大小写) - * @method static mixed get(string|null $name = null, array $vars = [], string $range = '') 获取语言定义(不区分大小写) - * @method static string detect(\think\Request $request) 自动侦测设置获取语言选择 - * @method static void saveToCookie(\think\Cookie $cookie) 保存当前语言到Cookie - */ -class Lang extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'lang'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Log.php b/vendor/topthink/framework/src/think/facade/Log.php deleted file mode 100644 index 7c43d37..0000000 --- a/vendor/topthink/framework/src/think/facade/Log.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; -use think\log\Channel; -use think\log\ChannelSet; - -/** - * @see \think\Log - * @package think\facade - * @mixin \think\Log - * @method static string|null getDefaultDriver() 默认驱动 - * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取日志配置 - * @method static array getChannelConfig(string $channel, null $name = null, null $default = null) 获取渠道配置 - * @method static Channel|ChannelSet channel(string|array $name = null) driver() 的别名 - * @method static mixed createDriver(string $name) - * @method static \think\Log clear(string|array $channel = '*') 清空日志信息 - * @method static \think\Log close(string|array $channel = '*') 关闭本次请求日志写入 - * @method static array getLog(string $channel = null) 获取日志信息 - * @method static bool save() 保存日志信息 - * @method static \think\Log record(mixed $msg, string $type = 'info', array $context = [], bool $lazy = true) 记录日志信息 - * @method static \think\Log write(mixed $msg, string $type = 'info', array $context = []) 实时写入日志信息 - * @method static Event listen($listener) 注册日志写入事件监听 - * @method static void log(string $level, mixed $message, array $context = []) 记录日志信息 - * @method static void emergency(mixed $message, array $context = []) 记录emergency信息 - * @method static void alert(mixed $message, array $context = []) 记录警报信息 - * @method static void critical(mixed $message, array $context = []) 记录紧急情况 - * @method static void error(mixed $message, array $context = []) 记录错误信息 - * @method static void warning(mixed $message, array $context = []) 记录warning信息 - * @method static void notice(mixed $message, array $context = []) 记录notice信息 - * @method static void info(mixed $message, array $context = []) 记录一般信息 - * @method static void debug(mixed $message, array $context = []) 记录调试信息 - * @method static void sql(mixed $message, array $context = []) 记录sql信息 - * @method static mixed __call($method, $parameters) - */ -class Log extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'log'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Middleware.php b/vendor/topthink/framework/src/think/facade/Middleware.php deleted file mode 100644 index 4203f82..0000000 --- a/vendor/topthink/framework/src/think/facade/Middleware.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\Middleware - * @package think\facade - * @mixin \think\Middleware - * @method static void import(array $middlewares = [], string $type = 'global') 导入中间件 - * @method static void add(mixed $middleware, string $type = 'global') 注册中间件 - * @method static void route(mixed $middleware) 注册路由中间件 - * @method static void controller(mixed $middleware) 注册控制器中间件 - * @method static mixed unshift(mixed $middleware, string $type = 'global') 注册中间件到开始位置 - * @method static array all(string $type = 'global') 获取注册的中间件 - * @method static Pipeline pipeline(string $type = 'global') 调度管道 - * @method static mixed end(\think\Response $response) 结束调度 - * @method static \think\Response handleException(\think\Request $passable, \Throwable $e) 异常处理 - */ -class Middleware extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'middleware'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Request.php b/vendor/topthink/framework/src/think/facade/Request.php deleted file mode 100644 index 6531f46..0000000 --- a/vendor/topthink/framework/src/think/facade/Request.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; -use think\file\UploadedFile; -use think\route\Rule; - -/** - * @see \think\Request - * @package think\facade - * @mixin \think\Request - * @method static \think\Request setDomain(string $domain) 设置当前包含协议的域名 - * @method static string domain(bool $port = false) 获取当前包含协议的域名 - * @method static string rootDomain() 获取当前根域名 - * @method static \think\Request setSubDomain(string $domain) 设置当前泛域名的值 - * @method static string subDomain() 获取当前子域名 - * @method static \think\Request setPanDomain(string $domain) 设置当前泛域名的值 - * @method static string panDomain() 获取当前泛域名的值 - * @method static \think\Request setUrl(string $url) 设置当前完整URL 包括QUERY_STRING - * @method static string url(bool $complete = false) 获取当前完整URL 包括QUERY_STRING - * @method static \think\Request setBaseUrl(string $url) 设置当前URL 不含QUERY_STRING - * @method static string baseUrl(bool $complete = false) 获取当前URL 不含QUERY_STRING - * @method static string baseFile(bool $complete = false) 获取当前执行的文件 SCRIPT_NAME - * @method static \think\Request setRoot(string $url) 设置URL访问根地址 - * @method static string root(bool $complete = false) 获取URL访问根地址 - * @method static string rootUrl() 获取URL访问根目录 - * @method static \think\Request setPathinfo(string $pathinfo) 设置当前请求的pathinfo - * @method static string pathinfo() 获取当前请求URL的pathinfo信息(含URL后缀) - * @method static string ext() 当前URL的访问后缀 - * @method static integer|float time(bool $float = false) 获取当前请求的时间 - * @method static string type() 当前请求的资源类型 - * @method static void mimeType(string|array $type, string $val = '') 设置资源类型 - * @method static \think\Request setMethod(string $method) 设置请求类型 - * @method static string method(bool $origin = false) 当前的请求类型 - * @method static bool isGet() 是否为GET请求 - * @method static bool isPost() 是否为POST请求 - * @method static bool isPut() 是否为PUT请求 - * @method static bool isDelete() 是否为DELTE请求 - * @method static bool isHead() 是否为HEAD请求 - * @method static bool isPatch() 是否为PATCH请求 - * @method static bool isOptions() 是否为OPTIONS请求 - * @method static bool isCli() 是否为cli - * @method static bool isCgi() 是否为cgi - * @method static mixed param(string|array $name = '', mixed $default = null, string|array $filter = '') 获取当前请求的参数 - * @method static \think\Request setRule(Rule $rule) 设置路由变量 - * @method static Rule|null rule() 获取当前路由对象 - * @method static \think\Request setRoute(array $route) 设置路由变量 - * @method static mixed route(string|array $name = '', mixed $default = null, string|array $filter = '') 获取路由参数 - * @method static mixed get(string|array $name = '', mixed $default = null, string|array $filter = '') 获取GET参数 - * @method static mixed middleware(mixed $name, mixed $default = null) 获取中间件传递的参数 - * @method static mixed post(string|array $name = '', mixed $default = null, string|array $filter = '') 获取POST参数 - * @method static mixed put(string|array $name = '', mixed $default = null, string|array $filter = '') 获取PUT参数 - * @method static mixed delete(mixed $name = '', mixed $default = null, string|array $filter = '') 设置获取DELETE参数 - * @method static mixed patch(mixed $name = '', mixed $default = null, string|array $filter = '') 设置获取PATCH参数 - * @method static mixed request(string|array $name = '', mixed $default = null, string|array $filter = '') 获取request变量 - * @method static mixed env(string $name = '', string $default = null) 获取环境变量 - * @method static mixed session(string $name = '', string $default = null) 获取session数据 - * @method static mixed cookie(mixed $name = '', string $default = null, string|array $filter = '') 获取cookie参数 - * @method static mixed server(string $name = '', string $default = '') 获取server参数 - * @method static null|array|UploadedFile file(string $name = '') 获取上传的文件信息 - * @method static string|array header(string $name = '', string $default = null) 设置或者获取当前的Header - * @method static mixed input(array $data = [], string|false $name = '', mixed $default = null, string|array $filter = '') 获取变量 支持过滤和默认值 - * @method static mixed filter(mixed $filter = null) 设置或获取当前的过滤规则 - * @method static mixed filterValue(mixed &$value, mixed $key, array $filters) 递归过滤给定的值 - * @method static bool has(string $name, string $type = 'param', bool $checkEmpty = false) 是否存在某个请求参数 - * @method static array only(array $name, mixed $data = 'param', string|array $filter = '') 获取指定的参数 - * @method static mixed except(array $name, string $type = 'param') 排除指定参数获取 - * @method static bool isSsl() 当前是否ssl - * @method static bool isJson() 当前是否JSON请求 - * @method static bool isAjax(bool $ajax = false) 当前是否Ajax请求 - * @method static bool isPjax(bool $pjax = false) 当前是否Pjax请求 - * @method static string ip() 获取客户端IP地址 - * @method static boolean isValidIP(string $ip, string $type = '') 检测是否是合法的IP地址 - * @method static string ip2bin(string $ip) 将IP地址转换为二进制字符串 - * @method static bool isMobile() 检测是否使用手机访问 - * @method static string scheme() 当前URL地址中的scheme参数 - * @method static string query() 当前请求URL地址中的query参数 - * @method static \think\Request setHost(string $host) 设置当前请求的host(包含端口) - * @method static string host(bool $strict = false) 当前请求的host - * @method static int port() 当前请求URL地址中的port参数 - * @method static string protocol() 当前请求 SERVER_PROTOCOL - * @method static int remotePort() 当前请求 REMOTE_PORT - * @method static string contentType() 当前请求 HTTP_CONTENT_TYPE - * @method static string secureKey() 获取当前请求的安全Key - * @method static \think\Request setController(string $controller) 设置当前的控制器名 - * @method static \think\Request setAction(string $action) 设置当前的操作名 - * @method static string controller(bool $convert = false) 获取当前的控制器名 - * @method static string action(bool $convert = false) 获取当前的操作名 - * @method static string getContent() 设置或者获取当前请求的content - * @method static string getInput() 获取当前请求的php://input - * @method static string buildToken(string $name = '__token__', mixed $type = 'md5') 生成请求令牌 - * @method static bool checkToken(string $token = '__token__', array $data = []) 检查请求令牌 - * @method static \think\Request withMiddleware(array $middleware) 设置在中间件传递的数据 - * @method static \think\Request withGet(array $get) 设置GET数据 - * @method static \think\Request withPost(array $post) 设置POST数据 - * @method static \think\Request withCookie(array $cookie) 设置COOKIE数据 - * @method static \think\Request withSession(Session $session) 设置SESSION数据 - * @method static \think\Request withServer(array $server) 设置SERVER数据 - * @method static \think\Request withHeader(array $header) 设置HEADER数据 - * @method static \think\Request withEnv(Env $env) 设置ENV数据 - * @method static \think\Request withInput(string $input) 设置php://input数据 - * @method static \think\Request withFiles(array $files) 设置文件上传数据 - * @method static \think\Request withRoute(array $route) 设置ROUTE变量 - * @method static mixed __set(string $name, mixed $value) 设置中间传递数据 - * @method static mixed __get(string $name) 获取中间传递数据的值 - * @method static boolean __isset(string $name) 检测中间传递数据的值 - * @method static bool offsetExists($name) - * @method static mixed offsetGet($name) - * @method static mixed offsetSet($name, $value) - * @method static mixed offsetUnset($name) - */ -class Request extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'request'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Route.php b/vendor/topthink/framework/src/think/facade/Route.php deleted file mode 100644 index 1b9a872..0000000 --- a/vendor/topthink/framework/src/think/facade/Route.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; -use think\Response; -use think\route\Dispatch; -use think\route\Domain; -use think\route\Rule; -use think\route\RuleGroup; -use think\route\RuleItem; -use think\route\RuleName; -use think\route\Url as UrlBuild; -use think\route\ResourceRegister as Resource; - -/** - * @see \think\Route - * @package think\facade - * @mixin \think\Route - * @method static mixed config(string $name = null) - * @method static \think\Route lazy(bool $lazy = true) 设置路由域名及分组(包括资源路由)是否延迟解析 - * @method static void setTestMode(bool $test) 设置路由为测试模式 - * @method static bool isTest() 检查路由是否为测试模式 - * @method static \think\Route mergeRuleRegex(bool $merge = true) 设置路由域名及分组(包括资源路由)是否合并解析 - * @method static void setGroup(RuleGroup $group) 设置当前分组 - * @method static RuleGroup getGroup(string $name = null) 获取指定标识的路由分组 不指定则获取当前分组 - * @method static \think\Route pattern(array $pattern) 注册变量规则 - * @method static \think\Route option(array $option) 注册路由参数 - * @method static Domain domain(string|array $name, mixed $rule = null) 注册域名路由 - * @method static array getDomains() 获取域名 - * @method static RuleName getRuleName() 获取RuleName对象 - * @method static \think\Route bind(string $bind, string $domain = null) 设置路由绑定 - * @method static array getBind() 读取路由绑定信息 - * @method static string|null getDomainBind(string $domain = null) 读取路由绑定 - * @method static RuleItem[] getName(string $name = null, string $domain = null, string $method = '*') 读取路由标识 - * @method static void import(array $name) 批量导入路由标识 - * @method static void setName(string $name, RuleItem $ruleItem, bool $first = false) 注册路由标识 - * @method static void setRule(string $rule, RuleItem $ruleItem = null) 保存路由规则 - * @method static RuleItem[] getRule(string $rule) 读取路由 - * @method static array getRuleList() 读取路由列表 - * @method static void clear() 清空路由规则 - * @method static RuleItem rule(string $rule, mixed $route = null, string $method = '*') 注册路由规则 - * @method static \think\Route setCrossDomainRule(Rule $rule) 设置跨域有效路由规则 - * @method static RuleGroup group(string|\Closure $name, mixed $route = null) 注册路由分组 - * @method static RuleItem any(string $rule, mixed $route) 注册路由 - * @method static RuleItem get(string $rule, mixed $route) 注册GET路由 - * @method static RuleItem post(string $rule, mixed $route) 注册POST路由 - * @method static RuleItem put(string $rule, mixed $route) 注册PUT路由 - * @method static RuleItem delete(string $rule, mixed $route) 注册DELETE路由 - * @method static RuleItem patch(string $rule, mixed $route) 注册PATCH路由 - * @method static RuleItem head(string $rule, mixed $route) 注册HEAD路由 - * @method static RuleItem options(string $rule, mixed $route) 注册OPTIONS路由 - * @method static Resource resource(string $rule, string $route) 注册资源路由 - * @method static RuleItem view(string $rule, string $template = '', array $vars = []) 注册视图路由 - * @method static RuleItem redirect(string $rule, string $route = '', int $status = 301) 注册重定向路由 - * @method static \think\Route rest(string|array $name, array|bool $resource = []) rest方法定义和修改 - * @method static array|null getRest(string $name = null) 获取rest方法定义的参数 - * @method static RuleItem miss(string|\Closure $route, string $method = '*') 注册未匹配路由规则后的处理 - * @method static Response dispatch(\think\Request $request, \Closure|bool $withRoute = true) 路由调度 - * @method static Dispatch|false check() 检测URL路由 - * @method static Dispatch url(string $url) 默认URL解析 - * @method static UrlBuild buildUrl(string $url = '', array $vars = []) URL生成 支持路由反射 - * @method static RuleGroup __call(string $method, array $args) 设置全局的路由分组参数 - */ -class Route extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'route'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Session.php b/vendor/topthink/framework/src/think/facade/Session.php deleted file mode 100644 index 68bf993..0000000 --- a/vendor/topthink/framework/src/think/facade/Session.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\Session - * @package think\facade - * @mixin \think\Session - * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取Session配置 - * @method static string|null getDefaultDriver() 默认驱动 - */ -class Session extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'session'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/Validate.php b/vendor/topthink/framework/src/think/facade/Validate.php deleted file mode 100644 index 6db6d34..0000000 --- a/vendor/topthink/framework/src/think/facade/Validate.php +++ /dev/null @@ -1,95 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\Validate - * @package think\facade - * @mixin \think\Validate - * @method static void setLang(\think\Lang $lang) 设置Lang对象 - * @method static void setDb(\think\Db $db) 设置Db对象 - * @method static void setRequest(\think\Request $request) 设置Request对象 - * @method static \think\Validate rule(string|array $name, mixed $rule = '') 添加字段验证规则 - * @method static \think\Validate extend(string $type, callable $callback = null, string $message = null) 注册验证(类型)规则 - * @method static void setTypeMsg(string|array $type, string $msg = null) 设置验证规则的默认提示信息 - * @method static Validate message(array $message) 设置提示信息 - * @method static \think\Validate scene(string $name) 设置验证场景 - * @method static bool hasScene(string $name) 判断是否存在某个验证场景 - * @method static \think\Validate batch(bool $batch = true) 设置批量验证 - * @method static \think\Validate failException(bool $fail = true) 设置验证失败后是否抛出异常 - * @method static \think\Validate only(array $fields) 指定需要验证的字段列表 - * @method static \think\Validate remove(string|array $field, mixed $rule = null) 移除某个字段的验证规则 - * @method static \think\Validate append(string|array $field, mixed $rule = null) 追加某个字段的验证规则 - * @method static bool check(array $data, array $rules = []) 数据自动验证 - * @method static bool checkRule(mixed $value, mixed $rules) 根据验证规则验证数据 - * @method static bool confirm(mixed $value, mixed $rule, array $data = [], string $field = '') 验证是否和某个字段的值一致 - * @method static bool different(mixed $value, mixed $rule, array $data = []) 验证是否和某个字段的值是否不同 - * @method static bool egt(mixed $value, mixed $rule, array $data = []) 验证是否大于等于某个值 - * @method static bool gt(mixed $value, mixed $rule, array $data = []) 验证是否大于某个值 - * @method static bool elt(mixed $value, mixed $rule, array $data = []) 验证是否小于等于某个值 - * @method static bool lt(mixed $value, mixed $rule, array $data = []) 验证是否小于某个值 - * @method static bool eq(mixed $value, mixed $rule) 验证是否等于某个值 - * @method static bool must(mixed $value, mixed $rule = null) 必须验证 - * @method static bool is(mixed $value, string $rule, array $data = []) 验证字段值是否为有效格式 - * @method static bool token(mixed $value, mixed $rule, array $data) 验证表单令牌 - * @method static bool activeUrl(mixed $value, mixed $rule = 'MX') 验证是否为合格的域名或者IP 支持A,MX,NS,SOA,PTR,CNAME,AAAA,A6, SRV,NAPTR,TXT 或者 ANY类型 - * @method static bool ip(mixed $value, mixed $rule = 'ipv4') 验证是否有效IP - * @method static bool fileExt(mixed $file, mixed $rule) 验证上传文件后缀 - * @method static bool fileMime(mixed $file, mixed $rule) 验证上传文件类型 - * @method static bool fileSize(mixed $file, mixed $rule) 验证上传文件大小 - * @method static bool image(mixed $file, mixed $rule) 验证图片的宽高及类型 - * @method static bool dateFormat(mixed $value, mixed $rule) 验证时间和日期是否符合指定格式 - * @method static bool unique(mixed $value, mixed $rule, array $data = [], string $field = '') 验证是否唯一 - * @method static bool filter(mixed $value, mixed $rule) 使用filter_var方式验证 - * @method static bool requireIf(mixed $value, mixed $rule, array $data = []) 验证某个字段等于某个值的时候必须 - * @method static bool requireCallback(mixed $value, mixed $rule, array $data = []) 通过回调方法验证某个字段是否必须 - * @method static bool requireWith(mixed $value, mixed $rule, array $data = []) 验证某个字段有值的情况下必须 - * @method static bool requireWithout(mixed $value, mixed $rule, array $data = []) 验证某个字段没有值的情况下必须 - * @method static bool in(mixed $value, mixed $rule) 验证是否在范围内 - * @method static bool notIn(mixed $value, mixed $rule) 验证是否不在某个范围 - * @method static bool between(mixed $value, mixed $rule) between验证数据 - * @method static bool notBetween(mixed $value, mixed $rule) 使用notbetween验证数据 - * @method static bool length(mixed $value, mixed $rule) 验证数据长度 - * @method static bool max(mixed $value, mixed $rule) 验证数据最大长度 - * @method static bool min(mixed $value, mixed $rule) 验证数据最小长度 - * @method static bool after(mixed $value, mixed $rule, array $data = []) 验证日期 - * @method static bool before(mixed $value, mixed $rule, array $data = []) 验证日期 - * @method static bool afterWith(mixed $value, mixed $rule, array $data = []) 验证日期 - * @method static bool beforeWith(mixed $value, mixed $rule, array $data = []) 验证日期 - * @method static bool expire(mixed $value, mixed $rule) 验证有效期 - * @method static bool allowIp(mixed $value, mixed $rule) 验证IP许可 - * @method static bool denyIp(mixed $value, mixed $rule) 验证IP禁用 - * @method static bool regex(mixed $value, mixed $rule) 使用正则验证数据 - * @method static array|string getError() 获取错误信息 - * @method static bool __call(string $method, array $args) 动态方法 直接调用is方法进行验证 - */ -class Validate extends Facade -{ - /** - * 始终创建新的对象实例 - * @var bool - */ - protected static $alwaysNewInstance = true; - - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'validate'; - } -} diff --git a/vendor/topthink/framework/src/think/facade/View.php b/vendor/topthink/framework/src/think/facade/View.php deleted file mode 100644 index acde3b5..0000000 --- a/vendor/topthink/framework/src/think/facade/View.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\View - * @package think\facade - * @mixin \think\View - * @method static \think\View engine(string $type = null) 获取模板引擎 - * @method static \think\View assign(string|array $name, mixed $value = null) 模板变量赋值 - * @method static \think\View filter(\think\Callable $filter = null) 视图过滤 - * @method static string fetch(string $template = '', array $vars = []) 解析和获取模板内容 用于输出 - * @method static string display(string $content, array $vars = []) 渲染内容输出 - * @method static mixed __set(string $name, mixed $value) 模板变量赋值 - * @method static mixed __get(string $name) 取得模板显示变量的值 - * @method static bool __isset(string $name) 检测模板变量是否设置 - * @method static string|null getDefaultDriver() 默认驱动 - */ -class View extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'view'; - } -} diff --git a/vendor/topthink/framework/src/think/file/UploadedFile.php b/vendor/topthink/framework/src/think/file/UploadedFile.php deleted file mode 100644 index 7dff766..0000000 --- a/vendor/topthink/framework/src/think/file/UploadedFile.php +++ /dev/null @@ -1,143 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\file; - -use think\exception\FileException; -use think\File; - -class UploadedFile extends File -{ - - private $test = false; - private $originalName; - private $mimeType; - private $error; - - public function __construct(string $path, string $originalName, string $mimeType = null, int $error = null, bool $test = false) - { - $this->originalName = $originalName; - $this->mimeType = $mimeType ?: 'application/octet-stream'; - $this->test = $test; - $this->error = $error ?: UPLOAD_ERR_OK; - - parent::__construct($path, UPLOAD_ERR_OK === $this->error); - } - - public function isValid(): bool - { - $isOk = UPLOAD_ERR_OK === $this->error; - - return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname()); - } - - /** - * 上传文件 - * @access public - * @param string $directory 保存路径 - * @param string|null $name 保存的文件名 - * @return File - */ - public function move(string $directory, string $name = null): File - { - if ($this->isValid()) { - if ($this->test) { - return parent::move($directory, $name); - } - - $target = $this->getTargetFile($directory, $name); - - set_error_handler(function ($type, $msg) use (&$error) { - $error = $msg; - }); - - $moved = move_uploaded_file($this->getPathname(), (string) $target); - restore_error_handler(); - if (!$moved) { - throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error))); - } - - @chmod((string) $target, 0666 & ~umask()); - - return $target; - } - - throw new FileException($this->getErrorMessage()); - } - - /** - * 获取错误信息 - * @access public - * @return string - */ - protected function getErrorMessage(): string - { - switch ($this->error) { - case 1: - case 2: - $message = 'upload File size exceeds the maximum value'; - break; - case 3: - $message = 'only the portion of file is uploaded'; - break; - case 4: - $message = 'no file to uploaded'; - break; - case 6: - $message = 'upload temp dir not found'; - break; - case 7: - $message = 'file write error'; - break; - default: - $message = 'unknown upload error'; - } - - return $message; - } - - /** - * 获取上传文件类型信息 - * @return string - */ - public function getOriginalMime(): string - { - return $this->mimeType; - } - - /** - * 上传文件名 - * @return string - */ - public function getOriginalName(): string - { - return $this->originalName; - } - - /** - * 获取上传文件扩展名 - * @return string - */ - public function getOriginalExtension(): string - { - return pathinfo($this->originalName, PATHINFO_EXTENSION); - } - - /** - * 获取文件扩展名 - * @return string - */ - public function extension(): string - { - return $this->getOriginalExtension(); - } -} diff --git a/vendor/topthink/framework/src/think/initializer/BootService.php b/vendor/topthink/framework/src/think/initializer/BootService.php deleted file mode 100644 index bab6d39..0000000 --- a/vendor/topthink/framework/src/think/initializer/BootService.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\initializer; - -use think\App; - -/** - * 启动系统服务 - */ -class BootService -{ - public function init(App $app) - { - $app->boot(); - } -} diff --git a/vendor/topthink/framework/src/think/initializer/Error.php b/vendor/topthink/framework/src/think/initializer/Error.php deleted file mode 100644 index 5018b1e..0000000 --- a/vendor/topthink/framework/src/think/initializer/Error.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\initializer; - -use think\App; -use think\console\Output as ConsoleOutput; -use think\exception\ErrorException; -use think\exception\Handle; -use Throwable; - -/** - * 错误和异常处理 - */ -class Error -{ - /** @var App */ - protected $app; - - /** - * 注册异常处理 - * @access public - * @param App $app - * @return void - */ - public function init(App $app) - { - $this->app = $app; - error_reporting(E_ALL); - set_error_handler([$this, 'appError']); - set_exception_handler([$this, 'appException']); - register_shutdown_function([$this, 'appShutdown']); - } - - /** - * Exception Handler - * @access public - * @param \Throwable $e - */ - public function appException(Throwable $e): void - { - $handler = $this->getExceptionHandler(); - - $handler->report($e); - - if ($this->app->runningInConsole()) { - $handler->renderForConsole(new ConsoleOutput, $e); - } else { - $response = $handler->render($this->app->request, $e); - $response->send(); - $this->app->http->end($response); - } - } - - /** - * Error Handler - * @access public - * @param integer $errno 错误编号 - * @param string $errstr 详细错误信息 - * @param string $errfile 出错的文件 - * @param integer $errline 出错行号 - * @throws ErrorException - */ - public function appError(int $errno, string $errstr, string $errfile = '', int $errline = 0): void - { - $exception = new ErrorException($errno, $errstr, $errfile, $errline); - - if (error_reporting() & $errno) { - // 将错误信息托管至 think\exception\ErrorException - throw $exception; - } - } - - /** - * Shutdown Handler - * @access public - */ - public function appShutdown(): void - { - if (!is_null($error = error_get_last()) && $this->isFatal($error['type'])) { - // 将错误信息托管至think\ErrorException - $exception = new ErrorException($error['type'], $error['message'], $error['file'], $error['line']); - - $this->appException($exception); - } - } - - /** - * 确定错误类型是否致命 - * - * @access protected - * @param int $type - * @return bool - */ - protected function isFatal(int $type): bool - { - return in_array($type, [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE]); - } - - /** - * Get an instance of the exception handler. - * - * @access protected - * @return Handle - */ - protected function getExceptionHandler() - { - return $this->app->make(Handle::class); - } -} diff --git a/vendor/topthink/framework/src/think/initializer/RegisterService.php b/vendor/topthink/framework/src/think/initializer/RegisterService.php deleted file mode 100644 index b682a0b..0000000 --- a/vendor/topthink/framework/src/think/initializer/RegisterService.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\initializer; - -use think\App; -use think\service\ModelService; -use think\service\PaginatorService; -use think\service\ValidateService; - -/** - * 注册系统服务 - */ -class RegisterService -{ - - protected $services = [ - PaginatorService::class, - ValidateService::class, - ModelService::class, - ]; - - public function init(App $app) - { - $file = $app->getRootPath() . 'vendor/services.php'; - - $services = $this->services; - - if (is_file($file)) { - $services = array_merge($services, include $file); - } - - foreach ($services as $service) { - if (class_exists($service)) { - $app->register($service); - } - } - } -} diff --git a/vendor/topthink/framework/src/think/log/Channel.php b/vendor/topthink/framework/src/think/log/Channel.php deleted file mode 100644 index 1de96f1..0000000 --- a/vendor/topthink/framework/src/think/log/Channel.php +++ /dev/null @@ -1,286 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\log; - -use Psr\Log\LoggerInterface; -use think\contract\LogHandlerInterface; -use think\Event; -use think\event\LogRecord; -use think\event\LogWrite; - -class Channel implements LoggerInterface -{ - protected $name; - protected $logger; - protected $event; - - protected $lazy = true; - /** - * 日志信息 - * @var array - */ - protected $log = []; - - /** - * 关闭日志 - * @var array - */ - protected $close = false; - - /** - * 允许写入类型 - * @var array - */ - protected $allow = []; - - public function __construct(string $name, LogHandlerInterface $logger, array $allow, bool $lazy = true, Event $event = null) - { - $this->name = $name; - $this->logger = $logger; - $this->allow = $allow; - $this->lazy = $lazy; - $this->event = $event; - } - - /** - * 关闭通道 - */ - public function close() - { - $this->clear(); - $this->close = true; - } - - /** - * 清空日志 - */ - public function clear() - { - $this->log = []; - } - - /** - * 记录日志信息 - * @access public - * @param mixed $msg 日志信息 - * @param string $type 日志级别 - * @param array $context 替换内容 - * @param bool $lazy - * @return $this - */ - public function record($msg, string $type = 'info', array $context = [], bool $lazy = true) - { - if ($this->close || (!empty($this->allow) && !in_array($type, $this->allow))) { - return $this; - } - - if (is_string($msg) && !empty($context)) { - $replace = []; - foreach ($context as $key => $val) { - $replace['{' . $key . '}'] = $val; - } - - $msg = strtr($msg, $replace); - } - - if (!empty($msg) || 0 === $msg) { - $this->log[$type][] = $msg; - if ($this->event) { - $this->event->trigger(new LogRecord($type, $msg)); - } - } - - if (!$this->lazy || !$lazy) { - $this->save(); - } - - return $this; - } - - /** - * 实时写入日志信息 - * @access public - * @param mixed $msg 调试信息 - * @param string $type 日志级别 - * @param array $context 替换内容 - * @return $this - */ - public function write($msg, string $type = 'info', array $context = []) - { - return $this->record($msg, $type, $context, false); - } - - /** - * 获取日志信息 - * @return array - */ - public function getLog(): array - { - return $this->log; - } - - /** - * 保存日志 - * @return bool - */ - public function save(): bool - { - $log = $this->log; - if ($this->event) { - $event = new LogWrite($this->name, $log); - $this->event->trigger($event); - $log = $event->log; - } - - if ($this->logger->save($log)) { - $this->clear(); - return true; - } - - return false; - } - - /** - * System is unusable. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function emergency($message, array $context = []) - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function alert($message, array $context = []) - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function critical($message, array $context = []) - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function error($message, array $context = []) - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function warning($message, array $context = []) - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function notice($message, array $context = []) - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function info($message, array $context = []) - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string $message - * @param array $context - * - * @return void - */ - public function debug($message, array $context = []) - { - $this->log(__FUNCTION__, $message, $context); - } - - /** - * Logs with an arbitrary level. - * - * @param mixed $level - * @param string $message - * @param array $context - * - * @return void - */ - public function log($level, $message, array $context = []) - { - $this->record($message, $level, $context); - } - - public function __call($method, $parameters) - { - $this->log($method, ...$parameters); - } -} diff --git a/vendor/topthink/framework/src/think/log/ChannelSet.php b/vendor/topthink/framework/src/think/log/ChannelSet.php deleted file mode 100644 index 6dcb0bd..0000000 --- a/vendor/topthink/framework/src/think/log/ChannelSet.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\log; - -use think\Log; - -/** - * Class ChannelSet - * @package think\log - * @mixin Channel - */ -class ChannelSet -{ - protected $log; - protected $channels; - - public function __construct(Log $log, array $channels) - { - $this->log = $log; - $this->channels = $channels; - } - - public function __call($method, $arguments) - { - foreach ($this->channels as $channel) { - $this->log->channel($channel)->{$method}(...$arguments); - } - } -} diff --git a/vendor/topthink/framework/src/think/log/driver/File.php b/vendor/topthink/framework/src/think/log/driver/File.php deleted file mode 100644 index 1f726b0..0000000 --- a/vendor/topthink/framework/src/think/log/driver/File.php +++ /dev/null @@ -1,207 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\log\driver; - -use think\App; -use think\contract\LogHandlerInterface; - -/** - * 本地化调试输出到文件 - */ -class File implements LogHandlerInterface -{ - /** - * 配置参数 - * @var array - */ - protected $config = [ - 'time_format' => 'c', - 'single' => false, - 'file_size' => 2097152, - 'path' => '', - 'apart_level' => [], - 'max_files' => 0, - 'json' => false, - 'json_options' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES, - 'format' => '[%s][%s] %s', - ]; - - // 实例化并传入参数 - public function __construct(App $app, $config = []) - { - if (is_array($config)) { - $this->config = array_merge($this->config, $config); - } - - if (empty($this->config['format'])) { - $this->config['format'] = '[%s][%s] %s'; - } - - if (empty($this->config['path'])) { - $this->config['path'] = $app->getRuntimePath() . 'log'; - } - - if (substr($this->config['path'], -1) != DIRECTORY_SEPARATOR) { - $this->config['path'] .= DIRECTORY_SEPARATOR; - } - } - - /** - * 日志写入接口 - * @access public - * @param array $log 日志信息 - * @return bool - */ - public function save(array $log): bool - { - $destination = $this->getMasterLogFile(); - - $path = dirname($destination); - !is_dir($path) && mkdir($path, 0755, true); - - $info = []; - - // 日志信息封装 - $time = \DateTime::createFromFormat('0.u00 U', microtime())->setTimezone(new \DateTimeZone(date_default_timezone_get()))->format($this->config['time_format']); - - foreach ($log as $type => $val) { - $message = []; - foreach ($val as $msg) { - if (!is_string($msg)) { - $msg = var_export($msg, true); - } - - $message[] = $this->config['json'] ? - json_encode(['time' => $time, 'type' => $type, 'msg' => $msg], $this->config['json_options']) : - sprintf($this->config['format'], $time, $type, $msg); - } - - if (true === $this->config['apart_level'] || in_array($type, $this->config['apart_level'])) { - // 独立记录的日志级别 - $filename = $this->getApartLevelFile($path, $type); - $this->write($message, $filename); - continue; - } - - $info[$type] = $message; - } - - if ($info) { - return $this->write($info, $destination); - } - - return true; - } - - /** - * 日志写入 - * @access protected - * @param array $message 日志信息 - * @param string $destination 日志文件 - * @return bool - */ - protected function write(array $message, string $destination): bool - { - // 检测日志文件大小,超过配置大小则备份日志文件重新生成 - $this->checkLogSize($destination); - - $info = []; - - foreach ($message as $type => $msg) { - $info[$type] = is_array($msg) ? implode(PHP_EOL, $msg) : $msg; - } - - $message = implode(PHP_EOL, $info) . PHP_EOL; - - return error_log($message, 3, $destination); - } - - /** - * 获取主日志文件名 - * @access public - * @return string - */ - protected function getMasterLogFile(): string - { - - if ($this->config['max_files']) { - $files = glob($this->config['path'] . '*.log'); - - try { - if (count($files) > $this->config['max_files']) { - set_error_handler(function ($errno, $errstr, $errfile, $errline) {}); - unlink($files[0]); - restore_error_handler(); - } - } catch (\Exception $e) { - // - } - } - - if ($this->config['single']) { - $name = is_string($this->config['single']) ? $this->config['single'] : 'single'; - $destination = $this->config['path'] . $name . '.log'; - } else { - - if ($this->config['max_files']) { - $filename = date('Ymd') . '.log'; - } else { - $filename = date('Ym') . DIRECTORY_SEPARATOR . date('d') . '.log'; - } - - $destination = $this->config['path'] . $filename; - } - - return $destination; - } - - /** - * 获取独立日志文件名 - * @access public - * @param string $path 日志目录 - * @param string $type 日志类型 - * @return string - */ - protected function getApartLevelFile(string $path, string $type): string - { - - if ($this->config['single']) { - $name = is_string($this->config['single']) ? $this->config['single'] : 'single'; - - $name .= '_' . $type; - } elseif ($this->config['max_files']) { - $name = date('Ymd') . '_' . $type; - } else { - $name = date('d') . '_' . $type; - } - - return $path . DIRECTORY_SEPARATOR . $name . '.log'; - } - - /** - * 检查日志文件大小并自动生成备份文件 - * @access protected - * @param string $destination 日志文件 - * @return void - */ - protected function checkLogSize(string $destination): void - { - if (is_file($destination) && floor($this->config['file_size']) <= filesize($destination)) { - try { - rename($destination, dirname($destination) . DIRECTORY_SEPARATOR . time() . '-' . basename($destination)); - } catch (\Exception $e) { - // - } - } - } -} diff --git a/vendor/topthink/framework/src/think/log/driver/Socket.php b/vendor/topthink/framework/src/think/log/driver/Socket.php deleted file mode 100644 index 2cfb943..0000000 --- a/vendor/topthink/framework/src/think/log/driver/Socket.php +++ /dev/null @@ -1,311 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: luofei614 <weibo.com/luofei614> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\log\driver; - -use Psr\Container\NotFoundExceptionInterface; -use think\App; -use think\contract\LogHandlerInterface; - -/** - * github: https://github.com/luofei614/SocketLog - * @author luofei614<weibo.com/luofei614> - */ -class Socket implements LogHandlerInterface -{ - protected $app; - - protected $config = [ - // socket服务器地址 - 'host' => 'localhost', - // socket服务器端口 - 'port' => 1116, - // 是否显示加载的文件列表 - 'show_included_files' => false, - // 日志强制记录到配置的client_id - 'force_client_ids' => [], - // 限制允许读取日志的client_id - 'allow_client_ids' => [], - // 调试开关 - 'debug' => false, - // 输出到浏览器时默认展开的日志级别 - 'expand_level' => ['debug'], - // 日志头渲染回调 - 'format_head' => null, - // curl opt - 'curl_opt' => [ - CURLOPT_CONNECTTIMEOUT => 1, - CURLOPT_TIMEOUT => 10, - ], - ]; - - protected $css = [ - 'sql' => 'color:#009bb4;', - 'sql_warn' => 'color:#009bb4;font-size:14px;', - 'error' => 'color:#f4006b;font-size:14px;', - 'page' => 'color:#40e2ff;background:#171717;', - 'big' => 'font-size:20px;color:red;', - ]; - - protected $allowForceClientIds = []; //配置强制推送且被授权的client_id - - protected $clientArg = []; - - /** - * 架构函数 - * @access public - * @param App $app - * @param array $config 缓存参数 - */ - public function __construct(App $app, array $config = []) - { - $this->app = $app; - - if (!empty($config)) { - $this->config = array_merge($this->config, $config); - } - - if (!isset($config['debug'])) { - $this->config['debug'] = $app->isDebug(); - } - } - - /** - * 调试输出接口 - * @access public - * @param array $log 日志信息 - * @return bool - */ - public function save(array $log = []): bool - { - if (!$this->check()) { - return false; - } - - $trace = []; - - if ($this->config['debug']) { - if ($this->app->exists('request')) { - $currentUri = $this->app->request->url(true); - } else { - $currentUri = 'cmd:' . implode(' ', $_SERVER['argv'] ?? []); - } - - if (!empty($this->config['format_head'])) { - try { - $currentUri = $this->app->invoke($this->config['format_head'], [$currentUri]); - } catch (NotFoundExceptionInterface $notFoundException) { - // Ignore exception - } - } - - // 基本信息 - $trace[] = [ - 'type' => 'group', - 'msg' => $currentUri, - 'css' => $this->css['page'], - ]; - } - - $expandLevel = array_flip($this->config['expand_level']); - - foreach ($log as $type => $val) { - $trace[] = [ - 'type' => isset($expandLevel[$type]) ? 'group' : 'groupCollapsed', - 'msg' => '[ ' . $type . ' ]', - 'css' => $this->css[$type] ?? '', - ]; - - foreach ($val as $msg) { - if (!is_string($msg)) { - $msg = var_export($msg, true); - } - $trace[] = [ - 'type' => 'log', - 'msg' => $msg, - 'css' => '', - ]; - } - - $trace[] = [ - 'type' => 'groupEnd', - 'msg' => '', - 'css' => '', - ]; - } - - if ($this->config['show_included_files']) { - $trace[] = [ - 'type' => 'groupCollapsed', - 'msg' => '[ file ]', - 'css' => '', - ]; - - $trace[] = [ - 'type' => 'log', - 'msg' => implode("\n", get_included_files()), - 'css' => '', - ]; - - $trace[] = [ - 'type' => 'groupEnd', - 'msg' => '', - 'css' => '', - ]; - } - - $trace[] = [ - 'type' => 'groupEnd', - 'msg' => '', - 'css' => '', - ]; - - $tabid = $this->getClientArg('tabid'); - - if (!$clientId = $this->getClientArg('client_id')) { - $clientId = ''; - } - - if (!empty($this->allowForceClientIds)) { - //强制推送到多个client_id - foreach ($this->allowForceClientIds as $forceClientId) { - $clientId = $forceClientId; - $this->sendToClient($tabid, $clientId, $trace, $forceClientId); - } - } else { - $this->sendToClient($tabid, $clientId, $trace, ''); - } - - return true; - } - - /** - * 发送给指定客户端 - * @access protected - * @author Zjmainstay - * @param $tabid - * @param $clientId - * @param $logs - * @param $forceClientId - */ - protected function sendToClient($tabid, $clientId, $logs, $forceClientId) - { - $logs = [ - 'tabid' => $tabid, - 'client_id' => $clientId, - 'logs' => $logs, - 'force_client_id' => $forceClientId, - ]; - - $msg = json_encode($logs, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR); - $address = '/' . $clientId; //将client_id作为地址, server端通过地址判断将日志发布给谁 - - $this->send($this->config['host'], $this->config['port'], $msg, $address); - } - - /** - * 检测客户授权 - * @access protected - * @return bool - */ - protected function check() - { - $tabid = $this->getClientArg('tabid'); - - //是否记录日志的检查 - if (!$tabid && !$this->config['force_client_ids']) { - return false; - } - - //用户认证 - $allowClientIds = $this->config['allow_client_ids']; - - if (!empty($allowClientIds)) { - //通过数组交集得出授权强制推送的client_id - $this->allowForceClientIds = array_intersect($allowClientIds, $this->config['force_client_ids']); - if (!$tabid && count($this->allowForceClientIds)) { - return true; - } - - $clientId = $this->getClientArg('client_id'); - if (!in_array($clientId, $allowClientIds)) { - return false; - } - } else { - $this->allowForceClientIds = $this->config['force_client_ids']; - } - - return true; - } - - /** - * 获取客户参数 - * @access protected - * @param string $name - * @return string - */ - protected function getClientArg(string $name) - { - if (!$this->app->exists('request')) { - return ''; - } - - if (empty($this->clientArg)) { - if (empty($socketLog = $this->app->request->header('socketlog'))) { - if (empty($socketLog = $this->app->request->header('User-Agent'))) { - return ''; - } - } - - if (!preg_match('/SocketLog\((.*?)\)/', $socketLog, $match)) { - $this->clientArg = ['tabid' => null, 'client_id' => null]; - return ''; - } - parse_str($match[1] ?? '', $this->clientArg); - } - - if (isset($this->clientArg[$name])) { - return $this->clientArg[$name]; - } - - return ''; - } - - /** - * @access protected - * @param string $host - $host of socket server - * @param int $port - $port of socket server - * @param string $message - 发送的消息 - * @param string $address - 地址 - * @return bool - */ - protected function send($host, $port, $message = '', $address = '/') - { - $url = 'http://' . $host . ':' . $port . $address; - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $message); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->config['curl_opt'][CURLOPT_CONNECTTIMEOUT] ?? 1); - curl_setopt($ch, CURLOPT_TIMEOUT, $this->config['curl_opt'][CURLOPT_TIMEOUT] ?? 10); - - $headers = [ - "Content-Type: application/json;charset=UTF-8", - ]; - - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //设置header - - return curl_exec($ch); - } -} diff --git a/vendor/topthink/framework/src/think/middleware/AllowCrossDomain.php b/vendor/topthink/framework/src/think/middleware/AllowCrossDomain.php deleted file mode 100644 index b7ab842..0000000 --- a/vendor/topthink/framework/src/think/middleware/AllowCrossDomain.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\middleware; - -use Closure; -use think\Config; -use think\Request; -use think\Response; - -/** - * 跨域请求支持 - */ -class AllowCrossDomain -{ - protected $cookieDomain; - - protected $header = [ - 'Access-Control-Allow-Credentials' => 'true', - 'Access-Control-Max-Age' => 1800, - 'Access-Control-Allow-Methods' => 'GET, POST, PATCH, PUT, DELETE, OPTIONS', - 'Access-Control-Allow-Headers' => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With', - ]; - - public function __construct(Config $config) - { - $this->cookieDomain = $config->get('cookie.domain', ''); - } - - /** - * 允许跨域请求 - * @access public - * @param Request $request - * @param Closure $next - * @param array $header - * @return Response - */ - public function handle($request, Closure $next, ? array $header = []) - { - $header = !empty($header) ? array_merge($this->header, $header) : $this->header; - - if (!isset($header['Access-Control-Allow-Origin'])) { - $origin = $request->header('origin'); - - if ($origin && ('' == $this->cookieDomain || strpos($origin, $this->cookieDomain))) { - $header['Access-Control-Allow-Origin'] = $origin; - } else { - $header['Access-Control-Allow-Origin'] = '*'; - } - } - - return $next($request)->header($header); - } -} diff --git a/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php b/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php deleted file mode 100644 index b114351..0000000 --- a/vendor/topthink/framework/src/think/middleware/CheckRequestCache.php +++ /dev/null @@ -1,183 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\middleware; - -use Closure; -use think\Cache; -use think\Config; -use think\Request; -use think\Response; - -/** - * 请求缓存处理 - */ -class CheckRequestCache -{ - /** - * 缓存对象 - * @var Cache - */ - protected $cache; - - /** - * 配置参数 - * @var array - */ - protected $config = [ - // 请求缓存规则 true为自动规则 - 'request_cache_key' => true, - // 请求缓存有效期 - 'request_cache_expire' => null, - // 全局请求缓存排除规则 - 'request_cache_except' => [], - // 请求缓存的Tag - 'request_cache_tag' => '', - ]; - - public function __construct(Cache $cache, Config $config) - { - $this->cache = $cache; - $this->config = array_merge($this->config, $config->get('route')); - } - - /** - * 设置当前地址的请求缓存 - * @access public - * @param Request $request - * @param Closure $next - * @param mixed $cache - * @return Response - */ - public function handle($request, Closure $next, $cache = null) - { - if ($request->isGet() && false !== $cache) { - if (false === $this->config['request_cache_key']) { - // 关闭当前缓存 - $cache = false; - } - - $cache = $cache ?? $this->getRequestCache($request); - - if ($cache) { - if (is_array($cache)) { - [$key, $expire, $tag] = array_pad($cache, 3, null); - } else { - $key = md5($request->url(true)); - $expire = $cache; - $tag = null; - } - - $key = $this->parseCacheKey($request, $key); - - if (strtotime($request->server('HTTP_IF_MODIFIED_SINCE', '')) + $expire > $request->server('REQUEST_TIME')) { - // 读取缓存 - return Response::create()->code(304); - } elseif (($hit = $this->cache->get($key)) !== null) { - [$content, $header, $when] = $hit; - if (null === $expire || $when + $expire > $request->server('REQUEST_TIME')) { - return Response::create($content)->header($header); - } - } - } - } - - $response = $next($request); - - if (isset($key) && 200 == $response->getCode() && $response->isAllowCache()) { - $header = $response->getHeader(); - $header['Cache-Control'] = 'max-age=' . $expire . ',must-revalidate'; - $header['Last-Modified'] = gmdate('D, d M Y H:i:s') . ' GMT'; - $header['Expires'] = gmdate('D, d M Y H:i:s', time() + $expire) . ' GMT'; - - $this->cache->tag($tag)->set($key, [$response->getContent(), $header, time()], $expire); - } - - return $response; - } - - /** - * 读取当前地址的请求缓存信息 - * @access protected - * @param Request $request - * @return mixed - */ - protected function getRequestCache($request) - { - $key = $this->config['request_cache_key']; - $expire = $this->config['request_cache_expire']; - $except = $this->config['request_cache_except']; - $tag = $this->config['request_cache_tag']; - - foreach ($except as $rule) { - if (0 === stripos($request->url(), $rule)) { - return; - } - } - - return [$key, $expire, $tag]; - } - - /** - * 读取当前地址的请求缓存信息 - * @access protected - * @param Request $request - * @param mixed $key - * @return null|string - */ - protected function parseCacheKey($request, $key) - { - if ($key instanceof \Closure) { - $key = call_user_func($key, $request); - } - - if (false === $key) { - // 关闭当前缓存 - return; - } - - if (true === $key) { - // 自动缓存功能 - $key = '__URL__'; - } elseif (strpos($key, '|')) { - [$key, $fun] = explode('|', $key); - } - - // 特殊规则替换 - if (false !== strpos($key, '__')) { - $key = str_replace(['__CONTROLLER__', '__ACTION__', '__URL__'], [$request->controller(), $request->action(), md5($request->url(true))], $key); - } - - if (false !== strpos($key, ':')) { - $param = $request->param(); - - foreach ($param as $item => $val) { - if (is_string($val) && false !== strpos($key, ':' . $item)) { - $key = str_replace(':' . $item, (string) $val, $key); - } - } - } elseif (strpos($key, ']')) { - if ('[' . $request->ext() . ']' == $key) { - // 缓存某个后缀的请求 - $key = md5($request->url()); - } else { - return; - } - } - - if (isset($fun)) { - $key = $fun($key); - } - - return $key; - } -} diff --git a/vendor/topthink/framework/src/think/middleware/FormTokenCheck.php b/vendor/topthink/framework/src/think/middleware/FormTokenCheck.php deleted file mode 100644 index efbb77b..0000000 --- a/vendor/topthink/framework/src/think/middleware/FormTokenCheck.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\middleware; - -use Closure; -use think\exception\ValidateException; -use think\Request; -use think\Response; - -/** - * 表单令牌支持 - */ -class FormTokenCheck -{ - - /** - * 表单令牌检测 - * @access public - * @param Request $request - * @param Closure $next - * @param string $token 表单令牌Token名称 - * @return Response - */ - public function handle(Request $request, Closure $next, string $token = null) - { - $check = $request->checkToken($token ?: '__token__'); - - if (false === $check) { - throw new ValidateException('invalid token'); - } - - return $next($request); - } - -} diff --git a/vendor/topthink/framework/src/think/middleware/LoadLangPack.php b/vendor/topthink/framework/src/think/middleware/LoadLangPack.php deleted file mode 100644 index af0324b..0000000 --- a/vendor/topthink/framework/src/think/middleware/LoadLangPack.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\middleware; - -use Closure; -use think\App; -use think\Config; -use think\Cookie; -use think\Lang; -use think\Request; -use think\Response; - -/** - * 多语言加载 - */ -class LoadLangPack -{ - protected $app; - protected $lang; - protected $config; - - public function __construct(App $app, Lang $lang, Config $config) - { - $this->app = $app; - $this->lang = $lang; - $this->config = $lang->getConfig(); - } - - /** - * 路由初始化(路由规则注册) - * @access public - * @param Request $request - * @param Closure $next - * @return Response - */ - public function handle($request, Closure $next) - { - // 自动侦测当前语言 - $langset = $this->detect($request); - - if ($this->lang->defaultLangSet() != $langset) { - $this->lang->switchLangSet($langset); - } - - $this->saveToCookie($this->app->cookie, $langset); - - return $next($request); - } - - /** - * 自动侦测设置获取语言选择 - * @access protected - * @param Request $request - * @return string - */ - protected function detect(Request $request): string - { - // 自动侦测设置获取语言选择 - $langSet = ''; - - if ($request->get($this->config['detect_var'])) { - // url中设置了语言变量 - $langSet = $request->get($this->config['detect_var']); - } elseif ($request->header($this->config['header_var'])) { - // Header中设置了语言变量 - $langSet = $request->header($this->config['header_var']); - } elseif ($request->cookie($this->config['cookie_var'])) { - // Cookie中设置了语言变量 - $langSet = $request->cookie($this->config['cookie_var']); - } elseif ($request->server('HTTP_ACCEPT_LANGUAGE')) { - // 自动侦测浏览器语言 - $langSet = $request->server('HTTP_ACCEPT_LANGUAGE'); - } - - if (preg_match('/^([a-z\d\-]+)/i', $langSet, $matches)) { - $langSet = strtolower($matches[1]); - if (isset($this->config['accept_language'][$langSet])) { - $langSet = $this->config['accept_language'][$langSet]; - } - } else { - $langSet = $this->lang->getLangSet(); - } - - if (empty($this->config['allow_lang_list']) || in_array($langSet, $this->config['allow_lang_list'])) { - // 合法的语言 - $this->lang->setLangSet($langSet); - } else { - $langSet = $this->lang->getLangSet(); - } - - return $langSet; - } - - /** - * 保存当前语言到Cookie - * @access protected - * @param Cookie $cookie Cookie对象 - * @param string $langSet 语言 - * @return void - */ - protected function saveToCookie(Cookie $cookie, string $langSet) - { - if ($this->config['use_cookie']) { - $cookie->set($this->config['cookie_var'], $langSet); - } - } - -} diff --git a/vendor/topthink/framework/src/think/middleware/SessionInit.php b/vendor/topthink/framework/src/think/middleware/SessionInit.php deleted file mode 100644 index 55cea3b..0000000 --- a/vendor/topthink/framework/src/think/middleware/SessionInit.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\middleware; - -use Closure; -use think\App; -use think\Request; -use think\Response; -use think\Session; - -/** - * Session初始化 - */ -class SessionInit -{ - - /** @var App */ - protected $app; - - /** @var Session */ - protected $session; - - public function __construct(App $app, Session $session) - { - $this->app = $app; - $this->session = $session; - } - - /** - * Session初始化 - * @access public - * @param Request $request - * @param Closure $next - * @return Response - */ - public function handle($request, Closure $next) - { - // Session初始化 - $varSessionId = $this->app->config->get('session.var_session_id'); - $cookieName = $this->session->getName(); - - if ($varSessionId && $request->request($varSessionId)) { - $sessionId = $request->request($varSessionId); - } else { - $sessionId = $request->cookie($cookieName); - } - - if ($sessionId) { - $this->session->setId($sessionId); - } - - $this->session->init(); - - $request->withSession($this->session); - - /** @var Response $response */ - $response = $next($request); - - $response->setSession($this->session); - - $this->app->cookie->set($cookieName, $this->session->getId(), $this->session->getConfig('expire')); - - return $response; - } - - public function end(Response $response) - { - $this->session->save(); - } -} diff --git a/vendor/topthink/framework/src/think/response/File.php b/vendor/topthink/framework/src/think/response/File.php deleted file mode 100644 index 1e45f2f..0000000 --- a/vendor/topthink/framework/src/think/response/File.php +++ /dev/null @@ -1,160 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\response; - -use think\Exception; -use think\Response; - -/** - * File Response - */ -class File extends Response -{ - protected $expire = 360; - protected $name; - protected $mimeType; - protected $isContent = false; - protected $force = true; - - public function __construct($data = '', int $code = 200) - { - $this->init($data, $code); - } - - /** - * 处理数据 - * @access protected - * @param mixed $data 要处理的数据 - * @return mixed - * @throws \Exception - */ - protected function output($data) - { - if (!$this->isContent && !is_file($data)) { - throw new Exception('file not exists:' . $data); - } - - while (ob_get_level() > 0) { - ob_end_clean(); - } - - if (!empty($this->name)) { - $name = $this->name; - } else { - $name = !$this->isContent ? pathinfo($data, PATHINFO_BASENAME) : ''; - } - - if ($this->isContent) { - $mimeType = $this->mimeType; - $size = strlen($data); - } else { - $mimeType = $this->getMimeType($data); - $size = filesize($data); - } - - $this->header['Pragma'] = 'public'; - $this->header['Content-Type'] = $mimeType ?: 'application/octet-stream'; - $this->header['Cache-control'] = 'max-age=' . $this->expire; - $this->header['Content-Disposition'] = ($this->force ? 'attachment; ' : '') . 'filename="' . $name . '"'; - $this->header['Content-Length'] = $size; - $this->header['Content-Transfer-Encoding'] = 'binary'; - $this->header['Expires'] = gmdate("D, d M Y H:i:s", time() + $this->expire) . ' GMT'; - - $this->lastModified(gmdate('D, d M Y H:i:s', time()) . ' GMT'); - - return $this->isContent ? $data : file_get_contents($data); - } - - /** - * 设置是否为内容 必须配合mimeType方法使用 - * @access public - * @param bool $content - * @return $this - */ - public function isContent(bool $content = true) - { - $this->isContent = $content; - return $this; - } - - /** - * 设置有效期 - * @access public - * @param integer $expire 有效期 - * @return $this - */ - public function expire(int $expire) - { - $this->expire = $expire; - return $this; - } - - /** - * 设置文件类型 - * @access public - * @param string $filename 文件名 - * @return $this - */ - public function mimeType(string $mimeType) - { - $this->mimeType = $mimeType; - return $this; - } - - /** - * 设置文件强制下载 - * @access public - * @param bool $force 强制浏览器下载 - * @return $this - */ - public function force(bool $force) - { - $this->force = $force; - return $this; - } - - /** - * 获取文件类型信息 - * @access public - * @param string $filename 文件名 - * @return string - */ - protected function getMimeType(string $filename): string - { - if (!empty($this->mimeType)) { - return $this->mimeType; - } - - $finfo = finfo_open(FILEINFO_MIME_TYPE); - - return finfo_file($finfo, $filename); - } - - /** - * 设置下载文件的显示名称 - * @access public - * @param string $filename 文件名 - * @param bool $extension 后缀自动识别 - * @return $this - */ - public function name(string $filename, bool $extension = true) - { - $this->name = $filename; - - if ($extension && false === strpos($filename, '.')) { - $this->name .= '.' . pathinfo($this->data, PATHINFO_EXTENSION); - } - - return $this; - } -} diff --git a/vendor/topthink/framework/src/think/response/Html.php b/vendor/topthink/framework/src/think/response/Html.php deleted file mode 100644 index c158f78..0000000 --- a/vendor/topthink/framework/src/think/response/Html.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\response; - -use think\Cookie; -use think\Response; - -/** - * Html Response - */ -class Html extends Response -{ - /** - * 输出type - * @var string - */ - protected $contentType = 'text/html'; - - public function __construct(Cookie $cookie, $data = '', int $code = 200) - { - $this->init($data, $code); - $this->cookie = $cookie; - } -} diff --git a/vendor/topthink/framework/src/think/response/Json.php b/vendor/topthink/framework/src/think/response/Json.php deleted file mode 100644 index a84501f..0000000 --- a/vendor/topthink/framework/src/think/response/Json.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\response; - -use think\Cookie; -use think\Response; - -/** - * Json Response - */ -class Json extends Response -{ - // 输出参数 - protected $options = [ - 'json_encode_param' => JSON_UNESCAPED_UNICODE, - ]; - - protected $contentType = 'application/json'; - - public function __construct(Cookie $cookie, $data = '', int $code = 200) - { - $this->init($data, $code); - $this->cookie = $cookie; - } - - /** - * 处理数据 - * @access protected - * @param mixed $data 要处理的数据 - * @return string - * @throws \Exception - */ - protected function output($data): string - { - try { - // 返回JSON数据格式到客户端 包含状态信息 - $data = json_encode($data, $this->options['json_encode_param']); - - if (false === $data) { - throw new \InvalidArgumentException(json_last_error_msg()); - } - - return $data; - } catch (\Exception $e) { - if ($e->getPrevious()) { - throw $e->getPrevious(); - } - throw $e; - } - } - -} diff --git a/vendor/topthink/framework/src/think/response/Jsonp.php b/vendor/topthink/framework/src/think/response/Jsonp.php deleted file mode 100644 index 81d3a06..0000000 --- a/vendor/topthink/framework/src/think/response/Jsonp.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\response; - -use think\Cookie; -use think\Request; -use think\Response; - -/** - * Jsonp Response - */ -class Jsonp extends Response -{ - // 输出参数 - protected $options = [ - 'var_jsonp_handler' => 'callback', - 'default_jsonp_handler' => 'jsonpReturn', - 'json_encode_param' => JSON_UNESCAPED_UNICODE, - ]; - - protected $contentType = 'application/javascript'; - - protected $request; - - public function __construct(Cookie $cookie, Request $request, $data = '', int $code = 200) - { - $this->init($data, $code); - - $this->cookie = $cookie; - $this->request = $request; - } - - /** - * 处理数据 - * @access protected - * @param mixed $data 要处理的数据 - * @return string - * @throws \Exception - */ - protected function output($data): string - { - try { - // 返回JSON数据格式到客户端 包含状态信息 [当url_common_param为false时是无法获取到$_GET的数据的,故使用Request来获取<xiaobo.sun@qq.com>] - $varJsonpHandler = $this->request->param($this->options['var_jsonp_handler'], ""); - $handler = !empty($varJsonpHandler) ? $varJsonpHandler : $this->options['default_jsonp_handler']; - - $data = json_encode($data, $this->options['json_encode_param']); - - if (false === $data) { - throw new \InvalidArgumentException(json_last_error_msg()); - } - - $data = $handler . '(' . $data . ');'; - - return $data; - } catch (\Exception $e) { - if ($e->getPrevious()) { - throw $e->getPrevious(); - } - throw $e; - } - } - -} diff --git a/vendor/topthink/framework/src/think/response/Redirect.php b/vendor/topthink/framework/src/think/response/Redirect.php deleted file mode 100644 index c6d71ae..0000000 --- a/vendor/topthink/framework/src/think/response/Redirect.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\response; - -use think\Cookie; -use think\Request; -use think\Response; -use think\Session; - -/** - * Redirect Response - */ -class Redirect extends Response -{ - - protected $request; - - public function __construct(Cookie $cookie, Request $request, Session $session, $data = '', int $code = 302) - { - $this->init((string) $data, $code); - - $this->cookie = $cookie; - $this->request = $request; - $this->session = $session; - - $this->cacheControl('no-cache,must-revalidate'); - } - - public function data($data) - { - $this->header['Location'] = $data; - return parent::data($data); - } - - /** - * 处理数据 - * @access protected - * @param mixed $data 要处理的数据 - * @return string - */ - protected function output($data): string - { - return ''; - } - - /** - * 重定向传值(通过Session) - * @access protected - * @param string|array $name 变量名或者数组 - * @param mixed $value 值 - * @return $this - */ - public function with($name, $value = null) - { - if (is_array($name)) { - foreach ($name as $key => $val) { - $this->session->flash($key, $val); - } - } else { - $this->session->flash($name, $value); - } - - return $this; - } - - /** - * 记住当前url后跳转 - * @access public - * @return $this - */ - public function remember($complete = false) - { - $this->session->set('redirect_url', $this->request->url($complete)); - - return $this; - } - - /** - * 跳转到上次记住的url - * @access public - * @return $this - */ - public function restore() - { - if ($this->session->has('redirect_url')) { - $this->data = $this->session->get('redirect_url'); - $this->session->delete('redirect_url'); - } - - return $this; - } -} diff --git a/vendor/topthink/framework/src/think/response/View.php b/vendor/topthink/framework/src/think/response/View.php deleted file mode 100644 index 2c116c7..0000000 --- a/vendor/topthink/framework/src/think/response/View.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\response; - -use think\Cookie; -use think\Response; -use think\View as BaseView; - -/** - * View Response - */ -class View extends Response -{ - /** - * 输出参数 - * @var array - */ - protected $options = []; - - /** - * 输出变量 - * @var array - */ - protected $vars = []; - - /** - * 输出过滤 - * @var mixed - */ - protected $filter; - - /** - * 输出type - * @var string - */ - protected $contentType = 'text/html'; - - /** - * View对象 - * @var BaseView - */ - protected $view; - - /** - * 是否内容渲染 - * @var bool - */ - protected $isContent = false; - - public function __construct(Cookie $cookie, BaseView $view, $data = '', int $code = 200) - { - $this->init($data, $code); - - $this->cookie = $cookie; - $this->view = $view; - } - - /** - * 设置是否为内容渲染 - * @access public - * @param bool $content - * @return $this - */ - public function isContent(bool $content = true) - { - $this->isContent = $content; - return $this; - } - - /** - * 处理数据 - * @access protected - * @param mixed $data 要处理的数据 - * @return string - */ - protected function output($data): string - { - // 渲染模板输出 - $this->view->filter($this->filter); - return $this->isContent ? - $this->view->display($data, $this->vars) : - $this->view->fetch($data, $this->vars); - } - - /** - * 获取视图变量 - * @access public - * @param string $name 模板变量 - * @return mixed - */ - public function getVars(string $name = null) - { - if (is_null($name)) { - return $this->vars; - } else { - return $this->vars[$name] ?? null; - } - } - - /** - * 模板变量赋值 - * @access public - * @param string|array $name 模板变量 - * @param mixed $value 变量值 - * @return $this - */ - public function assign($name, $value = null) - { - if (is_array($name)) { - $this->vars = array_merge($this->vars, $name); - } else { - $this->vars[$name] = $value; - } - - return $this; - } - - /** - * 视图内容过滤 - * @access public - * @param callable $filter - * @return $this - */ - public function filter(callable $filter = null) - { - $this->filter = $filter; - return $this; - } - - /** - * 检查模板是否存在 - * @access public - * @param string $name 模板名 - * @return bool - */ - public function exists(string $name): bool - { - return $this->view->exists($name); - } - -} diff --git a/vendor/topthink/framework/src/think/response/Xml.php b/vendor/topthink/framework/src/think/response/Xml.php deleted file mode 100644 index bddbb48..0000000 --- a/vendor/topthink/framework/src/think/response/Xml.php +++ /dev/null @@ -1,127 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\response; - -use think\Collection; -use think\Cookie; -use think\Model; -use think\Response; - -/** - * XML Response - */ -class Xml extends Response -{ - // 输出参数 - protected $options = [ - // 根节点名 - 'root_node' => 'think', - // 根节点属性 - 'root_attr' => '', - //数字索引的子节点名 - 'item_node' => 'item', - // 数字索引子节点key转换的属性名 - 'item_key' => 'id', - // 数据编码 - 'encoding' => 'utf-8', - ]; - - protected $contentType = 'text/xml'; - - public function __construct(Cookie $cookie, $data = '', int $code = 200) - { - $this->init($data, $code); - $this->cookie = $cookie; - } - - /** - * 处理数据 - * @access protected - * @param mixed $data 要处理的数据 - * @return mixed - */ - protected function output($data): string - { - if (is_string($data)) { - if (0 !== strpos($data, '<?xml')) { - $encoding = $this->options['encoding']; - $xml = "<?xml version=\"1.0\" encoding=\"{$encoding}\"?>"; - $data = $xml . $data; - } - return $data; - } - - // XML数据转换 - return $this->xmlEncode($data, $this->options['root_node'], $this->options['item_node'], $this->options['root_attr'], $this->options['item_key'], $this->options['encoding']); - } - - /** - * XML编码 - * @access protected - * @param mixed $data 数据 - * @param string $root 根节点名 - * @param string $item 数字索引的子节点名 - * @param mixed $attr 根节点属性 - * @param string $id 数字索引子节点key转换的属性名 - * @param string $encoding 数据编码 - * @return string - */ - protected function xmlEncode($data, string $root, string $item, $attr, string $id, string $encoding): string - { - if (is_array($attr)) { - $array = []; - foreach ($attr as $key => $value) { - $array[] = "{$key}=\"{$value}\""; - } - $attr = implode(' ', $array); - } - - $attr = trim($attr); - $attr = empty($attr) ? '' : " {$attr}"; - $xml = "<?xml version=\"1.0\" encoding=\"{$encoding}\"?>"; - $xml .= "<{$root}{$attr}>"; - $xml .= $this->dataToXml($data, $item, $id); - $xml .= "</{$root}>"; - - return $xml; - } - - /** - * 数据XML编码 - * @access protected - * @param mixed $data 数据 - * @param string $item 数字索引时的节点名称 - * @param string $id 数字索引key转换为的属性名 - * @return string - */ - protected function dataToXml($data, string $item, string $id): string - { - $xml = $attr = ''; - - if ($data instanceof Collection || $data instanceof Model) { - $data = $data->toArray(); - } - - foreach ($data as $key => $val) { - if (is_numeric($key)) { - $id && $attr = " {$id}=\"{$key}\""; - $key = $item; - } - $xml .= "<{$key}{$attr}>"; - $xml .= (is_array($val) || is_object($val)) ? $this->dataToXml($val, $item, $id) : $val; - $xml .= "</{$key}>"; - } - - return $xml; - } -} diff --git a/vendor/topthink/framework/src/think/route/Dispatch.php b/vendor/topthink/framework/src/think/route/Dispatch.php deleted file mode 100644 index e0baad9..0000000 --- a/vendor/topthink/framework/src/think/route/Dispatch.php +++ /dev/null @@ -1,254 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -use Psr\Http\Message\ResponseInterface; -use think\App; -use think\Container; -use think\Request; -use think\Response; -use think\Validate; - -/** - * 路由调度基础类 - */ -abstract class Dispatch -{ - /** - * 应用对象 - * @var \think\App - */ - protected $app; - - /** - * 请求对象 - * @var Request - */ - protected $request; - - /** - * 路由规则 - * @var Rule - */ - protected $rule; - - /** - * 调度信息 - * @var mixed - */ - protected $dispatch; - - /** - * 路由变量 - * @var array - */ - protected $param; - - public function __construct(Request $request, Rule $rule, $dispatch, array $param = []) - { - $this->request = $request; - $this->rule = $rule; - $this->dispatch = $dispatch; - $this->param = $param; - } - - public function init(App $app) - { - $this->app = $app; - - // 执行路由后置操作 - $this->doRouteAfter(); - } - - /** - * 执行路由调度 - * @access public - * @return mixed - */ - public function run(): Response - { - $data = $this->exec(); - return $this->autoResponse($data); - } - - protected function autoResponse($data): Response - { - if ($data instanceof Response) { - $response = $data; - } elseif ($data instanceof ResponseInterface) { - $response = Response::create((string) $data->getBody(), 'html', $data->getStatusCode()); - - foreach ($data->getHeaders() as $header => $values) { - $response->header([$header => implode(", ", $values)]); - } - } elseif (!is_null($data)) { - // 默认自动识别响应输出类型 - $type = $this->request->isJson() ? 'json' : 'html'; - $response = Response::create($data, $type); - } else { - $data = ob_get_clean(); - - $content = false === $data ? '' : $data; - $status = '' === $content && $this->request->isJson() ? 204 : 200; - $response = Response::create($content, 'html', $status); - } - - return $response; - } - - /** - * 检查路由后置操作 - * @access protected - * @return void - */ - protected function doRouteAfter(): void - { - $option = $this->rule->getOption(); - - // 添加中间件 - if (!empty($option['middleware'])) { - $this->app->middleware->import($option['middleware'], 'route'); - } - - if (!empty($option['append'])) { - $this->param = array_merge($this->param, $option['append']); - } - - // 绑定模型数据 - if (!empty($option['model'])) { - $this->createBindModel($option['model'], $this->param); - } - - // 记录当前请求的路由规则 - $this->request->setRule($this->rule); - - // 记录路由变量 - $this->request->setRoute($this->param); - - // 数据自动验证 - if (isset($option['validate'])) { - $this->autoValidate($option['validate']); - } - } - - /** - * 路由绑定模型实例 - * @access protected - * @param array $bindModel 绑定模型 - * @param array $matches 路由变量 - * @return void - */ - protected function createBindModel(array $bindModel, array $matches): void - { - foreach ($bindModel as $key => $val) { - if ($val instanceof \Closure) { - $result = $this->app->invokeFunction($val, $matches); - } else { - $fields = explode('&', $key); - - if (is_array($val)) { - [$model, $exception] = $val; - } else { - $model = $val; - $exception = true; - } - - $where = []; - $match = true; - - foreach ($fields as $field) { - if (!isset($matches[$field])) { - $match = false; - break; - } else { - $where[] = [$field, '=', $matches[$field]]; - } - } - - if ($match) { - $result = $model::where($where)->failException($exception)->find(); - } - } - - if (!empty($result)) { - // 注入容器 - $this->app->instance(get_class($result), $result); - } - } - } - - /** - * 验证数据 - * @access protected - * @param array $option - * @return void - * @throws \think\exception\ValidateException - */ - protected function autoValidate(array $option): void - { - [$validate, $scene, $message, $batch] = $option; - - if (is_array($validate)) { - // 指定验证规则 - $v = new Validate(); - $v->rule($validate); - } else { - // 调用验证器 - $class = false !== strpos($validate, '\\') ? $validate : $this->app->parseClass('validate', $validate); - - $v = new $class(); - - if (!empty($scene)) { - $v->scene($scene); - } - } - - /** @var Validate $v */ - $v->message($message) - ->batch($batch) - ->failException(true) - ->check($this->request->param()); - } - - public function getDispatch() - { - return $this->dispatch; - } - - public function getParam(): array - { - return $this->param; - } - - abstract public function exec(); - - public function __sleep() - { - return ['rule', 'dispatch', 'param', 'controller', 'actionName']; - } - - public function __wakeup() - { - $this->app = Container::pull('app'); - $this->request = $this->app->request; - } - - public function __debugInfo() - { - return [ - 'dispatch' => $this->dispatch, - 'param' => $this->param, - 'rule' => $this->rule, - ]; - } -} diff --git a/vendor/topthink/framework/src/think/route/Domain.php b/vendor/topthink/framework/src/think/route/Domain.php deleted file mode 100644 index 4cf03cf..0000000 --- a/vendor/topthink/framework/src/think/route/Domain.php +++ /dev/null @@ -1,188 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -use think\helper\Str; -use think\Request; -use think\Route; -use think\route\dispatch\Callback as CallbackDispatch; -use think\route\dispatch\Controller as ControllerDispatch; - -/** - * 域名路由 - */ -class Domain extends RuleGroup -{ - /** - * 架构函数 - * @access public - * @param Route $router 路由对象 - * @param string $name 路由域名 - * @param mixed $rule 域名路由 - * @param bool $lazy 延迟解析 - */ - public function __construct(Route $router, string $name = null, $rule = null, bool $lazy = false) - { - $this->router = $router; - $this->domain = $name; - $this->rule = $rule; - - if (!$lazy) { - $this->parseGroupRule($rule); - } - } - - /** - * 检测域名路由 - * @access public - * @param Request $request 请求对象 - * @param string $url 访问地址 - * @param bool $completeMatch 路由是否完全匹配 - * @return Dispatch|false - */ - public function check(Request $request, string $url, bool $completeMatch = false) - { - // 检测URL绑定 - $result = $this->checkUrlBind($request, $url); - - if (!empty($this->option['append'])) { - $request->setRoute($this->option['append']); - unset($this->option['append']); - } - - if (false !== $result) { - return $result; - } - - return parent::check($request, $url, $completeMatch); - } - - /** - * 设置路由绑定 - * @access public - * @param string $bind 绑定信息 - * @return $this - */ - public function bind(string $bind) - { - $this->router->bind($bind, $this->domain); - - return $this; - } - - /** - * 检测URL绑定 - * @access private - * @param Request $request - * @param string $url URL地址 - * @return Dispatch|false - */ - private function checkUrlBind(Request $request, string $url) - { - $bind = $this->router->getDomainBind($this->domain); - - if ($bind) { - $this->parseBindAppendParam($bind); - - // 如果有URL绑定 则进行绑定检测 - $type = substr($bind, 0, 1); - $bind = substr($bind, 1); - - $bindTo = [ - '\\' => 'bindToClass', - '@' => 'bindToController', - ':' => 'bindToNamespace', - ]; - - if (isset($bindTo[$type])) { - return $this->{$bindTo[$type]}($request, $url, $bind); - } - } - - return false; - } - - protected function parseBindAppendParam(string &$bind): void - { - if (false !== strpos($bind, '?')) { - [$bind, $query] = explode('?', $bind); - parse_str($query, $vars); - $this->append($vars); - } - } - - /** - * 绑定到类 - * @access protected - * @param Request $request - * @param string $url URL地址 - * @param string $class 类名(带命名空间) - * @return CallbackDispatch - */ - protected function bindToClass(Request $request, string $url, string $class): CallbackDispatch - { - $array = explode('|', $url, 2); - $action = !empty($array[0]) ? $array[0] : $this->router->config('default_action'); - $param = []; - - if (!empty($array[1])) { - $this->parseUrlParams($array[1], $param); - } - - return new CallbackDispatch($request, $this, [$class, $action], $param); - } - - /** - * 绑定到命名空间 - * @access protected - * @param Request $request - * @param string $url URL地址 - * @param string $namespace 命名空间 - * @return CallbackDispatch - */ - protected function bindToNamespace(Request $request, string $url, string $namespace): CallbackDispatch - { - $array = explode('|', $url, 3); - $class = !empty($array[0]) ? $array[0] : $this->router->config('default_controller'); - $method = !empty($array[1]) ? $array[1] : $this->router->config('default_action'); - $param = []; - - if (!empty($array[2])) { - $this->parseUrlParams($array[2], $param); - } - - return new CallbackDispatch($request, $this, [$namespace . '\\' . Str::studly($class), $method], $param); - } - - /** - * 绑定到控制器 - * @access protected - * @param Request $request - * @param string $url URL地址 - * @param string $controller 控制器名 - * @return ControllerDispatch - */ - protected function bindToController(Request $request, string $url, string $controller): ControllerDispatch - { - $array = explode('|', $url, 2); - $action = !empty($array[0]) ? $array[0] : $this->router->config('default_action'); - $param = []; - - if (!empty($array[1])) { - $this->parseUrlParams($array[1], $param); - } - - return new ControllerDispatch($request, $this, $controller . '/' . $action, $param); - } - -} diff --git a/vendor/topthink/framework/src/think/route/Resource.php b/vendor/topthink/framework/src/think/route/Resource.php deleted file mode 100644 index 33cd824..0000000 --- a/vendor/topthink/framework/src/think/route/Resource.php +++ /dev/null @@ -1,236 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -use think\Route; - -/** - * 资源路由类 - */ -class Resource extends RuleGroup -{ - /** - * REST方法定义 - * @var array - */ - protected $rest = []; - - /** - * 模型绑定 - * @var array - */ - protected $model = []; - - /** - * 数据验证 - * @var array - */ - protected $validate = []; - - /** - * 中间件 - * @var array - */ - protected $middleware = []; - - /** - * 架构函数 - * @access public - * @param Route $router 路由对象 - * @param RuleGroup|null $parent 上级对象 - * @param string $name 资源名称 - * @param string $route 路由地址 - * @param array $rest 资源定义 - */ - public function __construct(Route $router, RuleGroup $parent = null, string $name = '', string $route = '', array $rest = []) - { - $name = ltrim($name, '/'); - $this->router = $router; - $this->parent = $parent; - $this->rule = $name; - $this->route = $route; - $this->name = strpos($name, '.') ? strstr($name, '.', true) : $name; - - $this->setFullName(); - - // 资源路由默认为完整匹配 - $this->option['complete_match'] = true; - - $this->rest = $rest; - - if ($this->parent) { - $this->domain = $this->parent->getDomain(); - $this->parent->addRuleItem($this); - } - } - - /** - * 解析资源路由规则 - * @access public - * @param mixed $rule 路由规则 - * @return void - */ - public function parseGroupRule($rule): void - { - $option = $this->option; - $origin = $this->router->getGroup(); - $this->router->setGroup($this); - - if (strpos($rule, '.')) { - // 注册嵌套资源路由 - $array = explode('.', $rule); - $last = array_pop($array); - $item = []; - - foreach ($array as $val) { - $item[] = $val . '/<' . ($option['var'][$val] ?? $val . '_id') . '>'; - } - - $rule = implode('/', $item) . '/' . $last; - } - - $prefix = substr($rule, strlen($this->name) + 1); - - // 注册资源路由 - foreach ($this->rest as $key => $val) { - if ((isset($option['only']) && !in_array($key, $option['only'])) - || (isset($option['except']) && in_array($key, $option['except']))) { - continue; - } - - if (isset($last) && strpos($val[1], '<id>') && isset($option['var'][$last])) { - $val[1] = str_replace('<id>', '<' . $option['var'][$last] . '>', $val[1]); - } elseif (strpos($val[1], '<id>') && isset($option['var'][$rule])) { - $val[1] = str_replace('<id>', '<' . $option['var'][$rule] . '>', $val[1]); - } - - $ruleItem = $this->addRule(trim($prefix . $val[1], '/'), $this->route . '/' . $val[2], $val[0]); - - foreach (['model', 'validate', 'middleware', 'pattern'] as $name) { - if (isset($this->$name[$key])) { - call_user_func_array([$ruleItem, $name], (array) $this->$name[$key]); - } - - } - } - - $this->router->setGroup($origin); - $this->hasParsed = true; - } - - /** - * 设置资源允许 - * @access public - * @param array $only 资源允许 - * @return $this - */ - public function only(array $only) - { - return $this->setOption('only', $only); - } - - /** - * 设置资源排除 - * @access public - * @param array $except 排除资源 - * @return $this - */ - public function except(array $except) - { - return $this->setOption('except', $except); - } - - /** - * 设置资源路由的变量 - * @access public - * @param array $vars 资源变量 - * @return $this - */ - public function vars(array $vars) - { - return $this->setOption('var', $vars); - } - - /** - * 绑定资源验证 - * @access public - * @param array|string $name 资源类型或者验证信息 - * @param array|string $validate 验证信息 - * @return $this - */ - public function withValidate($name, $validate = []) - { - if (is_array($name)) { - $this->validate = array_merge($this->validate, $name); - } else { - $this->validate[$name] = $validate; - } - - return $this; - } - - /** - * 绑定资源模型 - * @access public - * @param array|string $name 资源类型或者模型绑定 - * @param array|string $model 模型绑定 - * @return $this - */ - public function withModel($name, $model = []) - { - if (is_array($name)) { - $this->model = array_merge($this->model, $name); - } else { - $this->model[$name] = $model; - } - - return $this; - } - - /** - * 绑定资源中间件 - * @access public - * @param array|string $name 资源类型或者中间件定义 - * @param array|string $middleware 中间件定义 - * @return $this - */ - public function withMiddleware($name, $middleware = []) - { - if (is_array($name)) { - $this->middleware = array_merge($this->middleware, $name); - } else { - $this->middleware[$name] = $middleware; - } - - return $this; - } - - /** - * rest方法定义和修改 - * @access public - * @param array|string $name 方法名称 - * @param array|bool $resource 资源 - * @return $this - */ - public function rest($name, $resource = []) - { - if (is_array($name)) { - $this->rest = $resource ? $name : array_merge($this->rest, $name); - } else { - $this->rest[$name] = $resource; - } - - return $this; - } - -} diff --git a/vendor/topthink/framework/src/think/route/ResourceRegister.php b/vendor/topthink/framework/src/think/route/ResourceRegister.php deleted file mode 100644 index 6a34787..0000000 --- a/vendor/topthink/framework/src/think/route/ResourceRegister.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -/** - * 资源路由注册类 - */ -class ResourceRegister -{ - /** - * 资源路由 - * @var Resource - */ - protected $resource; - - /** - * 是否注册过 - * @var bool - */ - protected $registered = false; - - /** - * 架构函数 - * @access public - * @param Resource $resource 资源路由 - */ - public function __construct(Resource $resource) - { - $this->resource = $resource; - } - - /** - * 注册资源路由 - * @access protected - * @return void - */ - protected function register() - { - $this->registered = true; - - $this->resource->parseGroupRule($this->resource->getRule()); - } - - /** - * 动态方法 - * @access public - * @param string $method 方法名 - * @param array $args 调用参数 - * @return mixed - */ - public function __call($method, $args) - { - return call_user_func_array([$this->resource, $method], $args); - } - - public function __destruct() - { - if (!$this->registered) { - $this->register(); - } - } -} diff --git a/vendor/topthink/framework/src/think/route/Rule.php b/vendor/topthink/framework/src/think/route/Rule.php deleted file mode 100644 index e909e78..0000000 --- a/vendor/topthink/framework/src/think/route/Rule.php +++ /dev/null @@ -1,916 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -use Closure; -use think\Container; -use think\middleware\AllowCrossDomain; -use think\middleware\CheckRequestCache; -use think\middleware\FormTokenCheck; -use think\Request; -use think\Route; -use think\route\dispatch\Callback as CallbackDispatch; -use think\route\dispatch\Controller as ControllerDispatch; - -/** - * 路由规则基础类 - */ -abstract class Rule -{ - /** - * 路由标识 - * @var string - */ - protected $name; - - /** - * 所在域名 - * @var string - */ - protected $domain; - - /** - * 路由对象 - * @var Route - */ - protected $router; - - /** - * 路由所属分组 - * @var RuleGroup - */ - protected $parent; - - /** - * 路由规则 - * @var mixed - */ - protected $rule; - - /** - * 路由地址 - * @var string|Closure - */ - protected $route; - - /** - * 请求类型 - * @var string - */ - protected $method = '*'; - - /** - * 路由变量 - * @var array - */ - protected $vars = []; - - /** - * 路由参数 - * @var array - */ - protected $option = []; - - /** - * 路由变量规则 - * @var array - */ - protected $pattern = []; - - /** - * 需要和分组合并的路由参数 - * @var array - */ - protected $mergeOptions = ['model', 'append', 'middleware']; - - abstract public function check(Request $request, string $url, bool $completeMatch = false); - - /** - * 设置路由参数 - * @access public - * @param array $option 参数 - * @return $this - */ - public function option(array $option) - { - $this->option = array_merge($this->option, $option); - - return $this; - } - - /** - * 设置单个路由参数 - * @access public - * @param string $name 参数名 - * @param mixed $value 值 - * @return $this - */ - public function setOption(string $name, $value) - { - $this->option[$name] = $value; - - return $this; - } - - /** - * 注册变量规则 - * @access public - * @param array $pattern 变量规则 - * @return $this - */ - public function pattern(array $pattern) - { - $this->pattern = array_merge($this->pattern, $pattern); - - return $this; - } - - /** - * 设置标识 - * @access public - * @param string $name 标识名 - * @return $this - */ - public function name(string $name) - { - $this->name = $name; - - return $this; - } - - /** - * 获取路由对象 - * @access public - * @return Route - */ - public function getRouter(): Route - { - return $this->router; - } - - /** - * 获取Name - * @access public - * @return string - */ - public function getName(): string - { - return $this->name ?: ''; - } - - /** - * 获取当前路由规则 - * @access public - * @return mixed - */ - public function getRule() - { - return $this->rule; - } - - /** - * 获取当前路由地址 - * @access public - * @return mixed - */ - public function getRoute() - { - return $this->route; - } - - /** - * 获取当前路由的变量 - * @access public - * @return array - */ - public function getVars(): array - { - return $this->vars; - } - - /** - * 获取Parent对象 - * @access public - * @return $this|null - */ - public function getParent() - { - return $this->parent; - } - - /** - * 获取路由所在域名 - * @access public - * @return string - */ - public function getDomain(): string - { - return $this->domain ?: $this->parent->getDomain(); - } - - /** - * 获取路由参数 - * @access public - * @param string $name 变量名 - * @return mixed - */ - public function config(string $name = '') - { - return $this->router->config($name); - } - - /** - * 获取变量规则定义 - * @access public - * @param string $name 变量名 - * @return mixed - */ - public function getPattern(string $name = '') - { - $pattern = $this->pattern; - - if ($this->parent) { - $pattern = array_merge($this->parent->getPattern(), $pattern); - } - - if ('' === $name) { - return $pattern; - } - - return $pattern[$name] ?? null; - } - - /** - * 获取路由参数定义 - * @access public - * @param string $name 参数名 - * @param mixed $default 默认值 - * @return mixed - */ - public function getOption(string $name = '', $default = null) - { - $option = $this->option; - - if ($this->parent) { - $parentOption = $this->parent->getOption(); - - // 合并分组参数 - foreach ($this->mergeOptions as $item) { - if (isset($parentOption[$item]) && isset($option[$item])) { - $option[$item] = array_merge($parentOption[$item], $option[$item]); - } - } - - $option = array_merge($parentOption, $option); - } - - if ('' === $name) { - return $option; - } - - return $option[$name] ?? $default; - } - - /** - * 获取当前路由的请求类型 - * @access public - * @return string - */ - public function getMethod(): string - { - return strtolower($this->method); - } - - /** - * 设置路由请求类型 - * @access public - * @param string $method 请求类型 - * @return $this - */ - public function method(string $method) - { - return $this->setOption('method', strtolower($method)); - } - - /** - * 检查后缀 - * @access public - * @param string $ext URL后缀 - * @return $this - */ - public function ext(string $ext = '') - { - return $this->setOption('ext', $ext); - } - - /** - * 检查禁止后缀 - * @access public - * @param string $ext URL后缀 - * @return $this - */ - public function denyExt(string $ext = '') - { - return $this->setOption('deny_ext', $ext); - } - - /** - * 检查域名 - * @access public - * @param string $domain 域名 - * @return $this - */ - public function domain(string $domain) - { - $this->domain = $domain; - return $this->setOption('domain', $domain); - } - - /** - * 设置参数过滤检查 - * @access public - * @param array $filter 参数过滤 - * @return $this - */ - public function filter(array $filter) - { - $this->option['filter'] = $filter; - - return $this; - } - - /** - * 绑定模型 - * @access public - * @param array|string|Closure $var 路由变量名 多个使用 & 分割 - * @param string|Closure $model 绑定模型类 - * @param bool $exception 是否抛出异常 - * @return $this - */ - public function model($var, $model = null, bool $exception = true) - { - if ($var instanceof Closure) { - $this->option['model'][] = $var; - } elseif (is_array($var)) { - $this->option['model'] = $var; - } elseif (is_null($model)) { - $this->option['model']['id'] = [$var, true]; - } else { - $this->option['model'][$var] = [$model, $exception]; - } - - return $this; - } - - /** - * 附加路由隐式参数 - * @access public - * @param array $append 追加参数 - * @return $this - */ - public function append(array $append = []) - { - $this->option['append'] = $append; - - return $this; - } - - /** - * 绑定验证 - * @access public - * @param mixed $validate 验证器类 - * @param string $scene 验证场景 - * @param array $message 验证提示 - * @param bool $batch 批量验证 - * @return $this - */ - public function validate($validate, string $scene = null, array $message = [], bool $batch = false) - { - $this->option['validate'] = [$validate, $scene, $message, $batch]; - - return $this; - } - - /** - * 指定路由中间件 - * @access public - * @param string|array|Closure $middleware 中间件 - * @param mixed $params 参数 - * @return $this - */ - public function middleware($middleware, ...$params) - { - if (empty($params) && is_array($middleware)) { - $this->option['middleware'] = $middleware; - } else { - foreach ((array) $middleware as $item) { - $this->option['middleware'][] = [$item, $params]; - } - } - - return $this; - } - - /** - * 允许跨域 - * @access public - * @param array $header 自定义Header - * @return $this - */ - public function allowCrossDomain(array $header = []) - { - return $this->middleware(AllowCrossDomain::class, $header); - } - - /** - * 表单令牌验证 - * @access public - * @param string $token 表单令牌token名称 - * @return $this - */ - public function token(string $token = '__token__') - { - return $this->middleware(FormTokenCheck::class, $token); - } - - /** - * 设置路由缓存 - * @access public - * @param array|string $cache 缓存 - * @return $this - */ - public function cache($cache) - { - return $this->middleware(CheckRequestCache::class, $cache); - } - - /** - * 检查URL分隔符 - * @access public - * @param string $depr URL分隔符 - * @return $this - */ - public function depr(string $depr) - { - return $this->setOption('param_depr', $depr); - } - - /** - * 设置需要合并的路由参数 - * @access public - * @param array $option 路由参数 - * @return $this - */ - public function mergeOptions(array $option = []) - { - $this->mergeOptions = array_merge($this->mergeOptions, $option); - return $this; - } - - /** - * 检查是否为HTTPS请求 - * @access public - * @param bool $https 是否为HTTPS - * @return $this - */ - public function https(bool $https = true) - { - return $this->setOption('https', $https); - } - - /** - * 检查是否为JSON请求 - * @access public - * @param bool $json 是否为JSON - * @return $this - */ - public function json(bool $json = true) - { - return $this->setOption('json', $json); - } - - /** - * 检查是否为AJAX请求 - * @access public - * @param bool $ajax 是否为AJAX - * @return $this - */ - public function ajax(bool $ajax = true) - { - return $this->setOption('ajax', $ajax); - } - - /** - * 检查是否为PJAX请求 - * @access public - * @param bool $pjax 是否为PJAX - * @return $this - */ - public function pjax(bool $pjax = true) - { - return $this->setOption('pjax', $pjax); - } - - /** - * 路由到一个模板地址 需要额外传入的模板变量 - * @access public - * @param array $view 视图 - * @return $this - */ - public function view(array $view = []) - { - return $this->setOption('view', $view); - } - - /** - * 通过闭包检查路由是否匹配 - * @access public - * @param callable $match 闭包 - * @return $this - */ - public function match(callable $match) - { - return $this->setOption('match', $match); - } - - /** - * 设置路由完整匹配 - * @access public - * @param bool $match 是否完整匹配 - * @return $this - */ - public function completeMatch(bool $match = true) - { - return $this->setOption('complete_match', $match); - } - - /** - * 是否去除URL最后的斜线 - * @access public - * @param bool $remove 是否去除最后斜线 - * @return $this - */ - public function removeSlash(bool $remove = true) - { - return $this->setOption('remove_slash', $remove); - } - - /** - * 设置路由规则全局有效 - * @access public - * @return $this - */ - public function crossDomainRule() - { - $this->router->setCrossDomainRule($this); - return $this; - } - - /** - * 解析匹配到的规则路由 - * @access public - * @param Request $request 请求对象 - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @param string $url URL地址 - * @param array $option 路由参数 - * @param array $matches 匹配的变量 - * @return Dispatch - */ - public function parseRule(Request $request, string $rule, $route, string $url, array $option = [], array $matches = []): Dispatch - { - if (is_string($route) && isset($option['prefix'])) { - // 路由地址前缀 - $route = $option['prefix'] . $route; - } - - // 替换路由地址中的变量 - $extraParams = true; - $search = $replace = []; - $depr = $this->router->config('pathinfo_depr'); - foreach ($matches as $key => $value) { - $search[] = '<' . $key . '>'; - $replace[] = $value; - - $search[] = ':' . $key; - $replace[] = $value; - - if (strpos($value, $depr)) { - $extraParams = false; - } - } - - if (is_string($route)) { - $route = str_replace($search, $replace, $route); - } - - // 解析额外参数 - if ($extraParams) { - $count = substr_count($rule, '/'); - $url = array_slice(explode('|', $url), $count + 1); - $this->parseUrlParams(implode('|', $url), $matches); - } - - $this->vars = $matches; - - // 发起路由调度 - return $this->dispatch($request, $route, $option); - } - - /** - * 发起路由调度 - * @access protected - * @param Request $request Request对象 - * @param mixed $route 路由地址 - * @param array $option 路由参数 - * @return Dispatch - */ - protected function dispatch(Request $request, $route, array $option): Dispatch - { - if (is_subclass_of($route, Dispatch::class)) { - $result = new $route($request, $this, $route, $this->vars); - } elseif ($route instanceof Closure) { - // 执行闭包 - $result = new CallbackDispatch($request, $this, $route, $this->vars); - } elseif (false !== strpos($route, '@') || false !== strpos($route, '::') || false !== strpos($route, '\\')) { - // 路由到类的方法 - $route = str_replace('::', '@', $route); - $result = $this->dispatchMethod($request, $route); - } else { - // 路由到控制器/操作 - $result = $this->dispatchController($request, $route); - } - - return $result; - } - - /** - * 解析URL地址为 模块/控制器/操作 - * @access protected - * @param Request $request Request对象 - * @param string $route 路由地址 - * @return CallbackDispatch - */ - protected function dispatchMethod(Request $request, string $route): CallbackDispatch - { - $path = $this->parseUrlPath($route); - - $route = str_replace('/', '@', implode('/', $path)); - $method = strpos($route, '@') ? explode('@', $route) : $route; - - return new CallbackDispatch($request, $this, $method, $this->vars); - } - - /** - * 解析URL地址为 模块/控制器/操作 - * @access protected - * @param Request $request Request对象 - * @param string $route 路由地址 - * @return ControllerDispatch - */ - protected function dispatchController(Request $request, string $route): ControllerDispatch - { - $path = $this->parseUrlPath($route); - - $action = array_pop($path); - $controller = !empty($path) ? array_pop($path) : null; - - // 路由到模块/控制器/操作 - return new ControllerDispatch($request, $this, [$controller, $action], $this->vars); - } - - /** - * 路由检查 - * @access protected - * @param array $option 路由参数 - * @param Request $request Request对象 - * @return bool - */ - protected function checkOption(array $option, Request $request): bool - { - // 检查当前路由是否匹配 - if (isset($option['match']) && is_callable($option['match'])) { - if (false === $option['match']($this, $request)) { - return false; - } - } - - // 请求类型检测 - if (!empty($option['method'])) { - if (is_string($option['method']) && false === stripos($option['method'], $request->method())) { - return false; - } - } - - // AJAX PJAX 请求检查 - foreach (['ajax', 'pjax', 'json'] as $item) { - if (isset($option[$item])) { - $call = 'is' . $item; - if ($option[$item] && !$request->$call() || !$option[$item] && $request->$call()) { - return false; - } - } - } - - // 伪静态后缀检测 - if ($request->url() != '/' && ((isset($option['ext']) && false === stripos('|' . $option['ext'] . '|', '|' . $request->ext() . '|')) - || (isset($option['deny_ext']) && false !== stripos('|' . $option['deny_ext'] . '|', '|' . $request->ext() . '|')))) { - return false; - } - - // 域名检查 - if ((isset($option['domain']) && !in_array($option['domain'], [$request->host(true), $request->subDomain()]))) { - return false; - } - - // HTTPS检查 - if ((isset($option['https']) && $option['https'] && !$request->isSsl()) - || (isset($option['https']) && !$option['https'] && $request->isSsl())) { - return false; - } - - // 请求参数检查 - if (isset($option['filter'])) { - foreach ($option['filter'] as $name => $value) { - if ($request->param($name, '', null) != $value) { - return false; - } - } - } - - return true; - } - - /** - * 解析URL地址中的参数Request对象 - * @access protected - * @param string $rule 路由规则 - * @param array $var 变量 - * @return void - */ - protected function parseUrlParams(string $url, array &$var = []): void - { - if ($url) { - preg_replace_callback('/(\w+)\|([^\|]+)/', function ($match) use (&$var) { - $var[$match[1]] = strip_tags($match[2]); - }, $url); - } - } - - /** - * 解析URL的pathinfo参数 - * @access public - * @param string $url URL地址 - * @return array - */ - public function parseUrlPath(string $url): array - { - // 分隔符替换 确保路由定义使用统一的分隔符 - $url = str_replace('|', '/', $url); - $url = trim($url, '/'); - - if (strpos($url, '/')) { - // [控制器/操作] - $path = explode('/', $url); - } else { - $path = [$url]; - } - - return $path; - } - - /** - * 生成路由的正则规则 - * @access protected - * @param string $rule 路由规则 - * @param array $match 匹配的变量 - * @param array $pattern 路由变量规则 - * @param array $option 路由参数 - * @param bool $completeMatch 路由是否完全匹配 - * @param string $suffix 路由正则变量后缀 - * @return string - */ - protected function buildRuleRegex(string $rule, array $match, array $pattern = [], array $option = [], bool $completeMatch = false, string $suffix = ''): string - { - foreach ($match as $name) { - $value = $this->buildNameRegex($name, $pattern, $suffix); - if ($value) { - $origin[] = $name; - $replace[] = $value; - } - } - - // 是否区分 / 地址访问 - if ('/' != $rule) { - if (!empty($option['remove_slash'])) { - $rule = rtrim($rule, '/'); - } elseif (substr($rule, -1) == '/') { - $rule = rtrim($rule, '/'); - $hasSlash = true; - } - } - - $regex = isset($replace) ? str_replace($origin, $replace, $rule) : $rule; - $regex = str_replace([')?/', ')?-'], [')/', ')-'], $regex); - - if (isset($hasSlash)) { - $regex .= '/'; - } - - return $regex . ($completeMatch ? '$' : ''); - } - - /** - * 生成路由变量的正则规则 - * @access protected - * @param string $name 路由变量 - * @param array $pattern 变量规则 - * @param string $suffix 路由正则变量后缀 - * @return string - */ - protected function buildNameRegex(string $name, array $pattern, string $suffix): string - { - $optional = ''; - $slash = substr($name, 0, 1); - - if (in_array($slash, ['/', '-'])) { - $prefix = $slash; - $name = substr($name, 1); - $slash = substr($name, 0, 1); - } else { - $prefix = ''; - } - - if ('<' != $slash) { - return ''; - } - - if (strpos($name, '?')) { - $name = substr($name, 1, -2); - $optional = '?'; - } elseif (strpos($name, '>')) { - $name = substr($name, 1, -1); - } - - if (isset($pattern[$name])) { - $nameRule = $pattern[$name]; - if (0 === strpos($nameRule, '/') && '/' == substr($nameRule, -1)) { - $nameRule = substr($nameRule, 1, -1); - } - } else { - $nameRule = $this->router->config('default_route_pattern'); - } - - return '(' . $prefix . '(?<' . $name . $suffix . '>' . $nameRule . '))' . $optional; - } - - /** - * 设置路由参数 - * @access public - * @param string $method 方法名 - * @param array $args 调用参数 - * @return $this - */ - public function __call($method, $args) - { - if (count($args) > 1) { - $args[0] = $args; - } - array_unshift($args, $method); - - return call_user_func_array([$this, 'setOption'], $args); - } - - public function __sleep() - { - return ['name', 'rule', 'route', 'method', 'vars', 'option', 'pattern']; - } - - public function __wakeup() - { - $this->router = Container::pull('route'); - } - - public function __debugInfo() - { - return [ - 'name' => $this->name, - 'rule' => $this->rule, - 'route' => $this->route, - 'method' => $this->method, - 'vars' => $this->vars, - 'option' => $this->option, - 'pattern' => $this->pattern, - ]; - } -} diff --git a/vendor/topthink/framework/src/think/route/RuleGroup.php b/vendor/topthink/framework/src/think/route/RuleGroup.php deleted file mode 100644 index f8fbc1e..0000000 --- a/vendor/topthink/framework/src/think/route/RuleGroup.php +++ /dev/null @@ -1,508 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -use Closure; -use think\Container; -use think\Exception; -use think\Request; -use think\Route; - -/** - * 路由分组类 - */ -class RuleGroup extends Rule -{ - /** - * 分组路由(包括子分组) - * @var Rule[] - */ - protected $rules = []; - - /** - * 是否已经解析 - * @var bool - */ - protected $hasParsed; - - /** - * MISS路由 - * @var RuleItem - */ - protected $miss; - - /** - * 完整名称 - * @var string - */ - protected $fullName; - - /** - * 分组别名 - * @var string - */ - protected $alias; - - /** - * 架构函数 - * @access public - * @param Route $router 路由对象 - * @param RuleGroup|null $parent 上级对象 - * @param string $name 分组名称 - * @param mixed $rule 分组路由 - * @param bool $lazy 延迟解析 - */ - public function __construct(Route $router, RuleGroup $parent = null, string $name = '', $rule = null, bool $lazy = false) - { - $this->router = $router; - $this->parent = $parent; - $this->rule = $rule; - $this->name = trim($name, '/'); - - $this->setFullName(); - - if ($this->parent) { - $this->domain = $this->parent->getDomain(); - $this->parent->addRuleItem($this); - } - - if (!$lazy) { - $this->parseGroupRule($rule); - } - } - - /** - * 设置分组的路由规则 - * @access public - * @return void - */ - protected function setFullName(): void - { - if (false !== strpos($this->name, ':')) { - $this->name = preg_replace(['/\[\:(\w+)\]/', '/\:(\w+)/'], ['<\1?>', '<\1>'], $this->name); - } - - if ($this->parent && $this->parent->getFullName()) { - $this->fullName = $this->parent->getFullName() . ($this->name ? '/' . $this->name : ''); - } else { - $this->fullName = $this->name; - } - - if ($this->name) { - $this->router->getRuleName()->setGroup($this->name, $this); - } - } - - /** - * 获取所属域名 - * @access public - * @return string - */ - public function getDomain(): string - { - return $this->domain ?: '-'; - } - - /** - * 获取分组别名 - * @access public - * @return string - */ - public function getAlias(): string - { - return $this->alias ?: ''; - } - - /** - * 检测分组路由 - * @access public - * @param Request $request 请求对象 - * @param string $url 访问地址 - * @param bool $completeMatch 路由是否完全匹配 - * @return Dispatch|false - */ - public function check(Request $request, string $url, bool $completeMatch = false) - { - // 检查分组有效性 - if (!$this->checkOption($this->option, $request) || !$this->checkUrl($url)) { - return false; - } - - // 解析分组路由 - if (!$this->hasParsed) { - $this->parseGroupRule($this->rule); - } - - // 获取当前路由规则 - $method = strtolower($request->method()); - $rules = $this->getRules($method); - $option = $this->getOption(); - - if (isset($option['complete_match'])) { - $completeMatch = $option['complete_match']; - } - - if (!empty($option['merge_rule_regex'])) { - // 合并路由正则规则进行路由匹配检查 - $result = $this->checkMergeRuleRegex($request, $rules, $url, $completeMatch); - - if (false !== $result) { - return $result; - } - } - - // 检查分组路由 - foreach ($rules as $item) { - $result = $item->check($request, $url, $completeMatch); - - if (false !== $result) { - return $result; - } - } - - if (!empty($option['dispatcher'])) { - $result = $this->parseRule($request, '', $option['dispatcher'], $url, $option); - } elseif ($miss = $this->getMissRule($method)) { - // 未匹配所有路由的路由规则处理 - $result = $miss->parseRule($request, '', $miss->getRoute(), $url, $miss->getOption()); - } else { - $result = false; - } - - return $result; - } - - /** - * 分组URL匹配检查 - * @access protected - * @param string $url URL - * @return bool - */ - protected function checkUrl(string $url): bool - { - if ($this->fullName) { - $pos = strpos($this->fullName, '<'); - - if (false !== $pos) { - $str = substr($this->fullName, 0, $pos); - } else { - $str = $this->fullName; - } - - if ($str && 0 !== stripos(str_replace('|', '/', $url), $str)) { - return false; - } - } - - return true; - } - - /** - * 设置路由分组别名 - * @access public - * @param string $alias 路由分组别名 - * @return $this - */ - public function alias(string $alias) - { - $this->alias = $alias; - $this->router->getRuleName()->setGroup($alias, $this); - - return $this; - } - - /** - * 解析分组和域名的路由规则及绑定 - * @access public - * @param mixed $rule 路由规则 - * @return void - */ - public function parseGroupRule($rule): void - { - if (is_null($rule)) { - return; - } - - if (is_string($rule) && is_subclass_of($rule, Dispatch::class)) { - $this->dispatcher($rule); - return; - } - - $origin = $this->router->getGroup(); - $this->router->setGroup($this); - - if ($rule instanceof Closure) { - Container::getInstance()->invokeFunction($rule); - } elseif (is_string($rule) && $rule) { - $this->router->bind($rule, $this->domain); - } - - $this->router->setGroup($origin); - $this->hasParsed = true; - } - - /** - * 检测分组路由 - * @access public - * @param Request $request 请求对象 - * @param array $rules 路由规则 - * @param string $url 访问地址 - * @param bool $completeMatch 路由是否完全匹配 - * @return Dispatch|false - */ - protected function checkMergeRuleRegex(Request $request, array &$rules, string $url, bool $completeMatch) - { - $depr = $this->router->config('pathinfo_depr'); - $url = $depr . str_replace('|', $depr, $url); - $regex = []; - $items = []; - - foreach ($rules as $key => $item) { - if ($item instanceof RuleItem) { - $rule = $depr . str_replace('/', $depr, $item->getRule()); - if ($depr == $rule && $depr != $url) { - unset($rules[$key]); - continue; - } - - $complete = $item->getOption('complete_match', $completeMatch); - - if (false === strpos($rule, '<')) { - if (0 === strcasecmp($rule, $url) || (!$complete && 0 === strncasecmp($rule, $url, strlen($rule)))) { - return $item->checkRule($request, $url, []); - } - - unset($rules[$key]); - continue; - } - - $slash = preg_quote('/-' . $depr, '/'); - - if ($matchRule = preg_split('/[' . $slash . ']<\w+\??>/', $rule, 2)) { - if ($matchRule[0] && 0 !== strncasecmp($rule, $url, strlen($matchRule[0]))) { - unset($rules[$key]); - continue; - } - } - - if (preg_match_all('/[' . $slash . ']?<?\w+\??>?/', $rule, $matches)) { - unset($rules[$key]); - $pattern = array_merge($this->getPattern(), $item->getPattern()); - $option = array_merge($this->getOption(), $item->getOption()); - - $regex[$key] = $this->buildRuleRegex($rule, $matches[0], $pattern, $option, $complete, '_THINK_' . $key); - $items[$key] = $item; - } - } - } - - if (empty($regex)) { - return false; - } - - try { - $result = preg_match('~^(?:' . implode('|', $regex) . ')~u', $url, $match); - } catch (\Exception $e) { - throw new Exception('route pattern error'); - } - - if ($result) { - $var = []; - foreach ($match as $key => $val) { - if (is_string($key) && '' !== $val) { - [$name, $pos] = explode('_THINK_', $key); - - $var[$name] = $val; - } - } - - if (!isset($pos)) { - foreach ($regex as $key => $item) { - if (0 === strpos(str_replace(['\/', '\-', '\\' . $depr], ['/', '-', $depr], $item), $match[0])) { - $pos = $key; - break; - } - } - } - - $rule = $items[$pos]->getRule(); - $array = $this->router->getRule($rule); - - foreach ($array as $item) { - if (in_array($item->getMethod(), ['*', strtolower($request->method())])) { - $result = $item->checkRule($request, $url, $var); - - if (false !== $result) { - return $result; - } - } - } - } - - return false; - } - - /** - * 获取分组的MISS路由 - * @access public - * @param string $method 请求类型 - * @return RuleItem|null - */ - public function getMissRule(string $method = '*'): ?RuleItem - { - if (isset($this->miss[$method])) { - $miss = $this->miss[$method]; - } elseif (isset($this->miss['*'])) { - $miss = $this->miss['*']; - } else { - return null; - } - return $miss; - } - - /** - * 注册MISS路由 - * @access public - * @param string|Closure $route 路由地址 - * @param string $method 请求类型 - * @return RuleItem - */ - public function miss($route, string $method = '*') : RuleItem - { - // 创建路由规则实例 - $ruleItem = new RuleItem($this->router, $this, null, '', $route, strtolower($method)); - - $this->miss[$method] = $ruleItem->setMiss(); - - return $ruleItem; - } - - /** - * 添加分组下的路由规则 - * @access public - * @param string $rule 路由规则 - * @param mixed $route 路由地址 - * @param string $method 请求类型 - * @return RuleItem - */ - public function addRule(string $rule, $route = null, string $method = '*'): RuleItem - { - // 读取路由标识 - if (is_string($route)) { - $name = $route; - } else { - $name = null; - } - - $method = strtolower($method); - - if ('' === $rule || '/' === $rule) { - $rule .= '$'; - } - - // 创建路由规则实例 - $ruleItem = new RuleItem($this->router, $this, $name, $rule, $route, $method); - - $this->addRuleItem($ruleItem); - - return $ruleItem; - } - - /** - * 注册分组下的路由规则 - * @access public - * @param Rule $rule 路由规则 - * @return $this - */ - public function addRuleItem(Rule $rule) - { - $this->rules[] = $rule; - - return $this; - } - - /** - * 设置分组的路由前缀 - * @access public - * @param string $prefix 路由前缀 - * @return $this - */ - public function prefix(string $prefix) - { - if ($this->parent && $this->parent->getOption('prefix')) { - $prefix = $this->parent->getOption('prefix') . $prefix; - } - - return $this->setOption('prefix', $prefix); - } - - /** - * 合并分组的路由规则正则 - * @access public - * @param bool $merge 是否合并 - * @return $this - */ - public function mergeRuleRegex(bool $merge = true) - { - return $this->setOption('merge_rule_regex', $merge); - } - - /** - * 设置分组的Dispatch调度 - * @access public - * @param string $dispatch 调度类 - * @return $this - */ - public function dispatcher(string $dispatch) - { - return $this->setOption('dispatcher', $dispatch); - } - - /** - * 获取完整分组Name - * @access public - * @return string - */ - public function getFullName(): string - { - return $this->fullName ?: ''; - } - - /** - * 获取分组的路由规则 - * @access public - * @param string $method 请求类型 - * @return array - */ - public function getRules(string $method = ''): array - { - if ('' === $method) { - return $this->rules; - } - - return array_filter($this->rules, function ($item) use ($method) { - $ruleMethod = $item->getMethod(); - return '*' == $ruleMethod || false !== strpos($ruleMethod, $method); - }); - } - - /** - * 清空分组下的路由规则 - * @access public - * @return void - */ - public function clear(): void - { - $this->rules = []; - } -} diff --git a/vendor/topthink/framework/src/think/route/RuleItem.php b/vendor/topthink/framework/src/think/route/RuleItem.php deleted file mode 100644 index cdde273..0000000 --- a/vendor/topthink/framework/src/think/route/RuleItem.php +++ /dev/null @@ -1,309 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -use think\Exception; -use think\Request; -use think\Route; - -/** - * 路由规则类 - */ -class RuleItem extends Rule -{ - /** - * 是否为MISS规则 - * @var bool - */ - protected $miss = false; - - /** - * 是否为额外自动注册的OPTIONS规则 - * @var bool - */ - protected $autoOption = false; - - /** - * 架构函数 - * @access public - * @param Route $router 路由实例 - * @param RuleGroup $parent 上级对象 - * @param string|null $name 路由标识 - * @param string $rule 路由规则 - * @param string|\Closure $route 路由地址 - * @param string $method 请求类型 - */ - public function __construct(Route $router, RuleGroup $parent, string $name = null, string $rule = '', $route = null, string $method = '*') - { - $this->router = $router; - $this->parent = $parent; - $this->name = $name; - $this->route = $route; - $this->method = $method; - - $this->setRule($rule); - - $this->router->setRule($this->rule, $this); - } - - /** - * 设置当前路由规则为MISS路由 - * @access public - * @return $this - */ - public function setMiss() - { - $this->miss = true; - return $this; - } - - /** - * 判断当前路由规则是否为MISS路由 - * @access public - * @return bool - */ - public function isMiss(): bool - { - return $this->miss; - } - - /** - * 获取当前路由的URL后缀 - * @access public - * @return string|null - */ - public function getSuffix() - { - if (isset($this->option['ext'])) { - $suffix = $this->option['ext']; - } elseif ($this->parent->getOption('ext')) { - $suffix = $this->parent->getOption('ext'); - } else { - $suffix = null; - } - - return $suffix; - } - - /** - * 路由规则预处理 - * @access public - * @param string $rule 路由规则 - * @return void - */ - public function setRule(string $rule): void - { - if ('$' == substr($rule, -1, 1)) { - // 是否完整匹配 - $rule = substr($rule, 0, -1); - - $this->option['complete_match'] = true; - } - - $rule = '/' != $rule ? ltrim($rule, '/') : ''; - - if ($this->parent && $prefix = $this->parent->getFullName()) { - $rule = $prefix . ($rule ? '/' . ltrim($rule, '/') : ''); - } - - if (false !== strpos($rule, ':')) { - $this->rule = preg_replace(['/\[\:(\w+)\]/', '/\:(\w+)/'], ['<\1?>', '<\1>'], $rule); - } else { - $this->rule = $rule; - } - - // 生成路由标识的快捷访问 - $this->setRuleName(); - } - - /** - * 设置别名 - * @access public - * @param string $name - * @return $this - */ - public function name(string $name) - { - $this->name = $name; - $this->setRuleName(true); - - return $this; - } - - /** - * 设置路由标识 用于URL反解生成 - * @access protected - * @param bool $first 是否插入开头 - * @return void - */ - protected function setRuleName(bool $first = false): void - { - if ($this->name) { - $this->router->setName($this->name, $this, $first); - } - } - - /** - * 检测路由 - * @access public - * @param Request $request 请求对象 - * @param string $url 访问地址 - * @param array $match 匹配路由变量 - * @param bool $completeMatch 路由是否完全匹配 - * @return Dispatch|false - */ - public function checkRule(Request $request, string $url, $match = null, bool $completeMatch = false) - { - // 检查参数有效性 - if (!$this->checkOption($this->option, $request)) { - return false; - } - - // 合并分组参数 - $option = $this->getOption(); - $pattern = $this->getPattern(); - $url = $this->urlSuffixCheck($request, $url, $option); - - if (is_null($match)) { - $match = $this->checkMatch($url, $option, $pattern, $completeMatch); - } - - if (false !== $match) { - return $this->parseRule($request, $this->rule, $this->route, $url, $option, $match); - } - - return false; - } - - /** - * 检测路由(含路由匹配) - * @access public - * @param Request $request 请求对象 - * @param string $url 访问地址 - * @param bool $completeMatch 路由是否完全匹配 - * @return Dispatch|false - */ - public function check(Request $request, string $url, bool $completeMatch = false) - { - return $this->checkRule($request, $url, null, $completeMatch); - } - - /** - * URL后缀及Slash检查 - * @access protected - * @param Request $request 请求对象 - * @param string $url 访问地址 - * @param array $option 路由参数 - * @return string - */ - protected function urlSuffixCheck(Request $request, string $url, array $option = []): string - { - // 是否区分 / 地址访问 - if (!empty($option['remove_slash']) && '/' != $this->rule) { - $this->rule = rtrim($this->rule, '/'); - $url = rtrim($url, '|'); - } - - if (isset($option['ext'])) { - // 路由ext参数 优先于系统配置的URL伪静态后缀参数 - $url = preg_replace('/\.(' . $request->ext() . ')$/i', '', $url); - } - - return $url; - } - - /** - * 检测URL和规则路由是否匹配 - * @access private - * @param string $url URL地址 - * @param array $option 路由参数 - * @param array $pattern 变量规则 - * @param bool $completeMatch 是否完全匹配 - * @return array|false - */ - private function checkMatch(string $url, array $option, array $pattern, bool $completeMatch) - { - if (isset($option['complete_match'])) { - $completeMatch = $option['complete_match']; - } - - $depr = $this->router->config('pathinfo_depr'); - - // 检查完整规则定义 - if (isset($pattern['__url__']) && !preg_match(0 === strpos($pattern['__url__'], '/') ? $pattern['__url__'] : '/^' . $pattern['__url__'] . ($completeMatch ? '$' : '') . '/', str_replace('|', $depr, $url))) { - return false; - } - - $var = []; - $url = $depr . str_replace('|', $depr, $url); - $rule = $depr . str_replace('/', $depr, $this->rule); - - if ($depr == $rule && $depr != $url) { - return false; - } - - if (false === strpos($rule, '<')) { - if (0 === strcasecmp($rule, $url) || (!$completeMatch && 0 === strncasecmp($rule . $depr, $url . $depr, strlen($rule . $depr)))) { - return $var; - } - return false; - } - - $slash = preg_quote('/-' . $depr, '/'); - - if ($matchRule = preg_split('/[' . $slash . ']?<\w+\??>/', $rule, 2)) { - if ($matchRule[0] && 0 !== strncasecmp($rule, $url, strlen($matchRule[0]))) { - return false; - } - } - - if (preg_match_all('/[' . $slash . ']?<?\w+\??>?/', $rule, $matches)) { - $regex = $this->buildRuleRegex($rule, $matches[0], $pattern, $option, $completeMatch); - - try { - if (!preg_match('~^' . $regex . '~u', $url, $match)) { - return false; - } - } catch (\Exception $e) { - throw new Exception('route pattern error'); - } - - foreach ($match as $key => $val) { - if (is_string($key)) { - $var[$key] = $val; - } - } - } - - // 成功匹配后返回URL中的动态变量数组 - return $var; - } - - /** - * 设置路由所属分组(用于注解路由) - * @access public - * @param string $name 分组名称或者标识 - * @return $this - */ - public function group(string $name) - { - $group = $this->router->getRuleName()->getGroup($name); - - if ($group) { - $this->parent = $group; - $this->setRule($this->rule); - } - - return $this; - } -} diff --git a/vendor/topthink/framework/src/think/route/RuleName.php b/vendor/topthink/framework/src/think/route/RuleName.php deleted file mode 100644 index dd93a0d..0000000 --- a/vendor/topthink/framework/src/think/route/RuleName.php +++ /dev/null @@ -1,212 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -/** - * 路由标识管理类 - */ -class RuleName -{ - /** - * 路由标识 - * @var array - */ - protected $item = []; - - /** - * 路由规则 - * @var array - */ - protected $rule = []; - - /** - * 路由分组 - * @var array - */ - protected $group = []; - - /** - * 注册路由标识 - * @access public - * @param string $name 路由标识 - * @param RuleItem $ruleItem 路由规则 - * @param bool $first 是否优先 - * @return void - */ - public function setName(string $name, RuleItem $ruleItem, bool $first = false): void - { - $name = strtolower($name); - $item = $this->getRuleItemInfo($ruleItem); - if ($first && isset($this->item[$name])) { - array_unshift($this->item[$name], $item); - } else { - $this->item[$name][] = $item; - } - } - - /** - * 注册路由分组标识 - * @access public - * @param string $name 路由分组标识 - * @param RuleGroup $group 路由分组 - * @return void - */ - public function setGroup(string $name, RuleGroup $group): void - { - $this->group[strtolower($name)] = $group; - } - - /** - * 注册路由规则 - * @access public - * @param string $rule 路由规则 - * @param RuleItem $ruleItem 路由 - * @return void - */ - public function setRule(string $rule, RuleItem $ruleItem): void - { - $route = $ruleItem->getRoute(); - - if (is_string($route)) { - $this->rule[$rule][$route] = $ruleItem; - } else { - $this->rule[$rule][] = $ruleItem; - } - } - - /** - * 根据路由规则获取路由对象(列表) - * @access public - * @param string $rule 路由标识 - * @return RuleItem[] - */ - public function getRule(string $rule): array - { - return $this->rule[$rule] ?? []; - } - - /** - * 根据路由分组标识获取分组 - * @access public - * @param string $name 路由分组标识 - * @return RuleGroup|null - */ - public function getGroup(string $name) - { - return $this->group[strtolower($name)] ?? null; - } - - /** - * 清空路由规则 - * @access public - * @return void - */ - public function clear(): void - { - $this->item = []; - $this->rule = []; - $this->group = []; - } - - /** - * 获取全部路由列表 - * @access public - * @return array - */ - public function getRuleList(): array - { - $list = []; - - foreach ($this->rule as $rule => $rules) { - foreach ($rules as $item) { - $val = []; - - foreach (['method', 'rule', 'name', 'route', 'domain', 'pattern', 'option'] as $param) { - $call = 'get' . $param; - $val[$param] = $item->$call(); - } - - if ($item->isMiss()) { - $val['rule'] .= '<MISS>'; - } - - $list[] = $val; - } - } - - return $list; - } - - /** - * 导入路由标识 - * @access public - * @param array $item 路由标识 - * @return void - */ - public function import(array $item): void - { - $this->item = $item; - } - - /** - * 根据路由标识获取路由信息(用于URL生成) - * @access public - * @param string $name 路由标识 - * @param string $domain 域名 - * @param string $method 请求类型 - * @return array - */ - public function getName(string $name = null, string $domain = null, string $method = '*'): array - { - if (is_null($name)) { - return $this->item; - } - - $name = strtolower($name); - $method = strtolower($method); - $result = []; - - if (isset($this->item[$name])) { - if (is_null($domain)) { - $result = $this->item[$name]; - } else { - foreach ($this->item[$name] as $item) { - $itemDomain = $item['domain']; - $itemMethod = $item['method']; - - if (($itemDomain == $domain || '-' == $itemDomain) && ('*' == $itemMethod || '*' == $method || $method == $itemMethod)) { - $result[] = $item; - } - } - } - } - - return $result; - } - - /** - * 获取路由信息 - * @access protected - * @param RuleItem $item 路由规则 - * @return array - */ - protected function getRuleItemInfo(RuleItem $item): array - { - return [ - 'rule' => $item->getRule(), - 'domain' => $item->getDomain(), - 'method' => $item->getMethod(), - 'suffix' => $item->getSuffix(), - ]; - } -} diff --git a/vendor/topthink/framework/src/think/route/Url.php b/vendor/topthink/framework/src/think/route/Url.php deleted file mode 100644 index 9e60fca..0000000 --- a/vendor/topthink/framework/src/think/route/Url.php +++ /dev/null @@ -1,517 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route; - -use think\App; -use think\Route; - -/** - * 路由地址生成 - */ -class Url -{ - /** - * 应用对象 - * @var App - */ - protected $app; - - /** - * 路由对象 - * @var Route - */ - protected $route; - - /** - * URL变量 - * @var array - */ - protected $vars = []; - - /** - * 路由URL - * @var string - */ - protected $url; - - /** - * URL 根地址 - * @var string - */ - protected $root = ''; - - /** - * HTTPS - * @var bool - */ - protected $https; - - /** - * URL后缀 - * @var string|bool - */ - protected $suffix = true; - - /** - * URL域名 - * @var string|bool - */ - protected $domain = false; - - /** - * 架构函数 - * @access public - * @param string $url URL地址 - * @param array $vars 参数 - */ - public function __construct(Route $route, App $app, string $url = '', array $vars = []) - { - $this->route = $route; - $this->app = $app; - $this->url = $url; - $this->vars = $vars; - } - - /** - * 设置URL参数 - * @access public - * @param array $vars URL参数 - * @return $this - */ - public function vars(array $vars = []) - { - $this->vars = $vars; - return $this; - } - - /** - * 设置URL后缀 - * @access public - * @param string|bool $suffix URL后缀 - * @return $this - */ - public function suffix($suffix) - { - $this->suffix = $suffix; - return $this; - } - - /** - * 设置URL域名(或者子域名) - * @access public - * @param string|bool $domain URL域名 - * @return $this - */ - public function domain($domain) - { - $this->domain = $domain; - return $this; - } - - /** - * 设置URL 根地址 - * @access public - * @param string $root URL root - * @return $this - */ - public function root(string $root) - { - $this->root = $root; - return $this; - } - - /** - * 设置是否使用HTTPS - * @access public - * @param bool $https - * @return $this - */ - public function https(bool $https = true) - { - $this->https = $https; - return $this; - } - - /** - * 检测域名 - * @access protected - * @param string $url URL - * @param string|true $domain 域名 - * @return string - */ - protected function parseDomain(string &$url, $domain): string - { - if (!$domain) { - return ''; - } - - $request = $this->app->request; - $rootDomain = $request->rootDomain(); - - if (true === $domain) { - // 自动判断域名 - $domain = $request->host(); - $domains = $this->route->getDomains(); - - if (!empty($domains)) { - $routeDomain = array_keys($domains); - foreach ($routeDomain as $domainPrefix) { - if (0 === strpos($domainPrefix, '*.') && strpos($domain, ltrim($domainPrefix, '*.')) !== false) { - foreach ($domains as $key => $rule) { - $rule = is_array($rule) ? $rule[0] : $rule; - if (is_string($rule) && false === strpos($key, '*') && 0 === strpos($url, $rule)) { - $url = ltrim($url, $rule); - $domain = $key; - - // 生成对应子域名 - if (!empty($rootDomain)) { - $domain .= $rootDomain; - } - break; - } elseif (false !== strpos($key, '*')) { - if (!empty($rootDomain)) { - $domain .= $rootDomain; - } - - break; - } - } - } - } - } - } elseif (false === strpos($domain, '.') && 0 !== strpos($domain, $rootDomain)) { - $domain .= '.' . $rootDomain; - } - - if (false !== strpos($domain, '://')) { - $scheme = ''; - } else { - $scheme = $this->https || $request->isSsl() ? 'https://' : 'http://'; - } - - return $scheme . $domain; - } - - /** - * 解析URL后缀 - * @access protected - * @param string|bool $suffix 后缀 - * @return string - */ - protected function parseSuffix($suffix): string - { - if ($suffix) { - $suffix = true === $suffix ? $this->route->config('url_html_suffix') : $suffix; - - if (is_string($suffix) && $pos = strpos($suffix, '|')) { - $suffix = substr($suffix, 0, $pos); - } - } - - return (empty($suffix) || 0 === strpos($suffix, '.')) ? (string) $suffix : '.' . $suffix; - } - - /** - * 直接解析URL地址 - * @access protected - * @param string $url URL - * @param string|bool $domain Domain - * @return string - */ - protected function parseUrl(string $url, &$domain): string - { - $request = $this->app->request; - - if (0 === strpos($url, '/')) { - // 直接作为路由地址解析 - $url = substr($url, 1); - } elseif (false !== strpos($url, '\\')) { - // 解析到类 - $url = ltrim(str_replace('\\', '/', $url), '/'); - } elseif (0 === strpos($url, '@')) { - // 解析到控制器 - $url = substr($url, 1); - } elseif ('' === $url) { - $url = $request->controller() . '/' . $request->action(); - } else { - $controller = $request->controller(); - - $path = explode('/', $url); - $action = array_pop($path); - $controller = empty($path) ? $controller : array_pop($path); - - $url = $controller . '/' . $action; - } - - return $url; - } - - /** - * 分析路由规则中的变量 - * @access protected - * @param string $rule 路由规则 - * @return array - */ - protected function parseVar(string $rule): array - { - // 提取路由规则中的变量 - $var = []; - - if (preg_match_all('/<\w+\??>/', $rule, $matches)) { - foreach ($matches[0] as $name) { - $optional = false; - - if (strpos($name, '?')) { - $name = substr($name, 1, -2); - $optional = true; - } else { - $name = substr($name, 1, -1); - } - - $var[$name] = $optional ? 2 : 1; - } - } - - return $var; - } - - /** - * 匹配路由地址 - * @access protected - * @param array $rule 路由规则 - * @param array $vars 路由变量 - * @param mixed $allowDomain 允许域名 - * @return array - */ - protected function getRuleUrl(array $rule, array &$vars = [], $allowDomain = ''): array - { - $request = $this->app->request; - if (is_string($allowDomain) && false === strpos($allowDomain, '.')) { - $allowDomain .= '.' . $request->rootDomain(); - } - $port = $request->port(); - - foreach ($rule as $item) { - $url = $item['rule']; - $pattern = $this->parseVar($url); - $domain = $item['domain']; - $suffix = $item['suffix']; - - if ('-' == $domain) { - $domain = is_string($allowDomain) ? $allowDomain : $request->host(true); - } - - if (is_string($allowDomain) && $domain != $allowDomain) { - continue; - } - - if ($port && !in_array($port, [80, 443])) { - $domain .= ':' . $port; - } - - if (empty($pattern)) { - return [rtrim($url, '?-'), $domain, $suffix]; - } - - $type = $this->route->config('url_common_param'); - $keys = []; - - foreach ($pattern as $key => $val) { - if (isset($vars[$key])) { - $url = str_replace(['[:' . $key . ']', '<' . $key . '?>', ':' . $key, '<' . $key . '>'], $type ? (string) $vars[$key] : urlencode((string) $vars[$key]), $url); - $keys[] = $key; - $url = str_replace(['/?', '-?'], ['/', '-'], $url); - $result = [rtrim($url, '?-'), $domain, $suffix]; - } elseif (2 == $val) { - $url = str_replace(['/[:' . $key . ']', '[:' . $key . ']', '<' . $key . '?>'], '', $url); - $url = str_replace(['/?', '-?'], ['/', '-'], $url); - $result = [rtrim($url, '?-'), $domain, $suffix]; - } else { - $result = null; - $keys = []; - break; - } - } - - $vars = array_diff_key($vars, array_flip($keys)); - - if (isset($result)) { - return $result; - } - } - - return []; - } - - /** - * 生成URL地址 - * @access public - * @return string - */ - public function build(): string - { - // 解析URL - $url = $this->url; - $suffix = $this->suffix; - $domain = $this->domain; - $request = $this->app->request; - $vars = $this->vars; - - if (0 === strpos($url, '[') && $pos = strpos($url, ']')) { - // [name] 表示使用路由命名标识生成URL - $name = substr($url, 1, $pos - 1); - $url = 'name' . substr($url, $pos + 1); - } - - if (false === strpos($url, '://') && 0 !== strpos($url, '/')) { - $info = parse_url($url); - $url = !empty($info['path']) ? $info['path'] : ''; - - if (isset($info['fragment'])) { - // 解析锚点 - $anchor = $info['fragment']; - - if (false !== strpos($anchor, '?')) { - // 解析参数 - [$anchor, $info['query']] = explode('?', $anchor, 2); - } - - if (false !== strpos($anchor, '@')) { - // 解析域名 - [$anchor, $domain] = explode('@', $anchor, 2); - } - } elseif (strpos($url, '@') && false === strpos($url, '\\')) { - // 解析域名 - [$url, $domain] = explode('@', $url, 2); - } - } - - if ($url) { - $checkName = isset($name) ? $name : $url . (isset($info['query']) ? '?' . $info['query'] : ''); - $checkDomain = $domain && is_string($domain) ? $domain : null; - - $rule = $this->route->getName($checkName, $checkDomain); - - if (empty($rule) && isset($info['query'])) { - $rule = $this->route->getName($url, $checkDomain); - // 解析地址里面参数 合并到vars - parse_str($info['query'], $params); - $vars = array_merge($params, $vars); - unset($info['query']); - } - } - - if (!empty($rule) && $match = $this->getRuleUrl($rule, $vars, $domain)) { - // 匹配路由命名标识 - $url = $match[0]; - - if ($domain && !empty($match[1])) { - $domain = $match[1]; - } - - if (!is_null($match[2])) { - $suffix = $match[2]; - } - } elseif (!empty($rule) && isset($name)) { - throw new \InvalidArgumentException('route name not exists:' . $name); - } else { - // 检测URL绑定 - $bind = $this->route->getDomainBind($domain && is_string($domain) ? $domain : null); - - if ($bind && 0 === strpos($url, $bind)) { - $url = substr($url, strlen($bind) + 1); - } else { - $binds = $this->route->getBind(); - - foreach ($binds as $key => $val) { - if (is_string($val) && 0 === strpos($url, $val) && substr_count($val, '/') > 1) { - $url = substr($url, strlen($val) + 1); - $domain = $key; - break; - } - } - } - - // 路由标识不存在 直接解析 - $url = $this->parseUrl($url, $domain); - - if (isset($info['query'])) { - // 解析地址里面参数 合并到vars - parse_str($info['query'], $params); - $vars = array_merge($params, $vars); - } - } - - // 还原URL分隔符 - $depr = $this->route->config('pathinfo_depr'); - $url = str_replace('/', $depr, $url); - - $file = $request->baseFile(); - if ($file && 0 !== strpos($request->url(), $file)) { - $file = str_replace('\\', '/', dirname($file)); - } - - $url = rtrim($file, '/') . '/' . $url; - - // URL后缀 - if ('/' == substr($url, -1) || '' == $url) { - $suffix = ''; - } else { - $suffix = $this->parseSuffix($suffix); - } - - // 锚点 - $anchor = !empty($anchor) ? '#' . $anchor : ''; - - // 参数组装 - if (!empty($vars)) { - // 添加参数 - if ($this->route->config('url_common_param')) { - $vars = http_build_query($vars); - $url .= $suffix . ($vars ? '?' . $vars : '') . $anchor; - } else { - foreach ($vars as $var => $val) { - $val = (string) $val; - if ('' !== $val) { - $url .= $depr . $var . $depr . urlencode($val); - } - } - - $url .= $suffix . $anchor; - } - } else { - $url .= $suffix . $anchor; - } - - // 检测域名 - $domain = $this->parseDomain($url, $domain); - - // URL组装 - return $domain . rtrim($this->root, '/') . '/' . ltrim($url, '/'); - } - - public function __toString() - { - return $this->build(); - } - - public function __debugInfo() - { - return [ - 'url' => $this->url, - 'vars' => $this->vars, - 'suffix' => $this->suffix, - 'domain' => $this->domain, - ]; - } -} diff --git a/vendor/topthink/framework/src/think/route/dispatch/Callback.php b/vendor/topthink/framework/src/think/route/dispatch/Callback.php deleted file mode 100644 index 2044ef8..0000000 --- a/vendor/topthink/framework/src/think/route/dispatch/Callback.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route\dispatch; - -use think\route\Dispatch; - -/** - * Callback Dispatcher - */ -class Callback extends Dispatch -{ - public function exec() - { - // 执行回调方法 - $vars = array_merge($this->request->param(), $this->param); - - return $this->app->invoke($this->dispatch, $vars); - } - -} diff --git a/vendor/topthink/framework/src/think/route/dispatch/Controller.php b/vendor/topthink/framework/src/think/route/dispatch/Controller.php deleted file mode 100644 index f18512c..0000000 --- a/vendor/topthink/framework/src/think/route/dispatch/Controller.php +++ /dev/null @@ -1,194 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route\dispatch; - -use ReflectionClass; -use ReflectionException; -use ReflectionMethod; -use think\App; -use think\exception\ClassNotFoundException; -use think\exception\HttpException; -use think\helper\Str; -use think\route\Dispatch; - -/** - * Controller Dispatcher - */ -class Controller extends Dispatch -{ - /** - * 控制器名 - * @var string - */ - protected $controller; - - /** - * 操作名 - * @var string - */ - protected $actionName; - - public function init(App $app) - { - parent::init($app); - - $result = $this->dispatch; - - if (is_string($result)) { - $result = explode('/', $result); - } - - // 获取控制器名 - $controller = strip_tags($result[0] ?: $this->rule->config('default_controller')); - - if (strpos($controller, '.')) { - $pos = strrpos($controller, '.'); - $this->controller = substr($controller, 0, $pos) . '.' . Str::studly(substr($controller, $pos + 1)); - } else { - $this->controller = Str::studly($controller); - } - - // 获取操作名 - $this->actionName = strip_tags($result[1] ?: $this->rule->config('default_action')); - - // 设置当前请求的控制器、操作 - $this->request - ->setController($this->controller) - ->setAction($this->actionName); - } - - public function exec() - { - try { - // 实例化控制器 - $instance = $this->controller($this->controller); - } catch (ClassNotFoundException $e) { - throw new HttpException(404, 'controller not exists:' . $e->getClass()); - } - - // 注册控制器中间件 - $this->registerControllerMiddleware($instance); - - return $this->app->middleware->pipeline('controller') - ->send($this->request) - ->then(function () use ($instance) { - // 获取当前操作名 - $suffix = $this->rule->config('action_suffix'); - $action = $this->actionName . $suffix; - - if (is_callable([$instance, $action])) { - $vars = $this->request->param(); - try { - $reflect = new ReflectionMethod($instance, $action); - // 严格获取当前操作方法名 - $actionName = $reflect->getName(); - if ($suffix) { - $actionName = substr($actionName, 0, -strlen($suffix)); - } - - $this->request->setAction($actionName); - } catch (ReflectionException $e) { - $reflect = new ReflectionMethod($instance, '__call'); - $vars = [$action, $vars]; - $this->request->setAction($action); - } - } else { - // 操作不存在 - throw new HttpException(404, 'method not exists:' . get_class($instance) . '->' . $action . '()'); - } - - $data = $this->app->invokeReflectMethod($instance, $reflect, $vars); - - return $this->autoResponse($data); - }); - } - - protected function parseActions($actions) - { - return array_map(function ($item) { - return strtolower($item); - }, is_string($actions) ? explode(",", $actions) : $actions); - } - - /** - * 使用反射机制注册控制器中间件 - * @access public - * @param object $controller 控制器实例 - * @return void - */ - protected function registerControllerMiddleware($controller): void - { - $class = new ReflectionClass($controller); - - if ($class->hasProperty('middleware')) { - $reflectionProperty = $class->getProperty('middleware'); - $reflectionProperty->setAccessible(true); - - $middlewares = $reflectionProperty->getValue($controller); - $action = $this->request->action(true); - - foreach ($middlewares as $key => $val) { - if (!is_int($key)) { - $middleware = $key; - $options = $val; - } elseif (isset($val['middleware'])) { - $middleware = $val['middleware']; - $options = $val['options'] ?? []; - } else { - $middleware = $val; - $options = []; - } - - if (isset($options['only']) && !in_array($action, $this->parseActions($options['only']))) { - continue; - } elseif (isset($options['except']) && in_array($action, $this->parseActions($options['except']))) { - continue; - } - - if (is_string($middleware) && strpos($middleware, ':')) { - $middleware = explode(':', $middleware); - if (count($middleware) > 1) { - $middleware = [$middleware[0], array_slice($middleware, 1)]; - } - } - - $this->app->middleware->controller($middleware); - } - } - } - - /** - * 实例化访问控制器 - * @access public - * @param string $name 资源地址 - * @return object - * @throws ClassNotFoundException - */ - public function controller(string $name) - { - $suffix = $this->rule->config('controller_suffix') ? 'Controller' : ''; - - $controllerLayer = $this->rule->config('controller_layer') ?: 'controller'; - $emptyController = $this->rule->config('empty_controller') ?: 'Error'; - - $class = $this->app->parseClass($controllerLayer, $name . $suffix); - - if (class_exists($class)) { - return $this->app->make($class, [], true); - } elseif ($emptyController && class_exists($emptyClass = $this->app->parseClass($controllerLayer, $emptyController . $suffix))) { - return $this->app->make($emptyClass, [], true); - } - - throw new ClassNotFoundException('class not exists:' . $class, $class); - } -} diff --git a/vendor/topthink/framework/src/think/route/dispatch/Url.php b/vendor/topthink/framework/src/think/route/dispatch/Url.php deleted file mode 100644 index 147f5cb..0000000 --- a/vendor/topthink/framework/src/think/route/dispatch/Url.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\route\dispatch; - -use think\exception\HttpException; -use think\helper\Str; -use think\Request; -use think\route\Rule; - -/** - * Url Dispatcher - */ -class Url extends Controller -{ - - public function __construct(Request $request, Rule $rule, $dispatch) - { - $this->request = $request; - $this->rule = $rule; - // 解析默认的URL规则 - $dispatch = $this->parseUrl($dispatch); - - parent::__construct($request, $rule, $dispatch, $this->param); - } - - /** - * 解析URL地址 - * @access protected - * @param string $url URL - * @return array - */ - protected function parseUrl(string $url): array - { - $depr = $this->rule->config('pathinfo_depr'); - $bind = $this->rule->getRouter()->getDomainBind(); - - if ($bind && preg_match('/^[a-z]/is', $bind)) { - $bind = str_replace('/', $depr, $bind); - // 如果有域名绑定 - $url = $bind . ('.' != substr($bind, -1) ? $depr : '') . ltrim($url, $depr); - } - - $path = $this->rule->parseUrlPath($url); - if (empty($path)) { - return [null, null]; - } - - // 解析控制器 - $controller = !empty($path) ? array_shift($path) : null; - - if ($controller && !preg_match('/^[A-Za-z0-9][\w|\.]*$/', $controller)) { - throw new HttpException(404, 'controller not exists:' . $controller); - } - - // 解析操作 - $action = !empty($path) ? array_shift($path) : null; - $var = []; - - // 解析额外参数 - if ($path) { - preg_replace_callback('/(\w+)\|([^\|]+)/', function ($match) use (&$var) { - $var[$match[1]] = strip_tags($match[2]); - }, implode('|', $path)); - } - - $panDomain = $this->request->panDomain(); - if ($panDomain && $key = array_search('*', $var)) { - // 泛域名赋值 - $var[$key] = $panDomain; - } - - // 设置当前请求的参数 - $this->param = $var; - - // 封装路由 - $route = [$controller, $action]; - - if ($this->hasDefinedRoute($route)) { - throw new HttpException(404, 'invalid request:' . str_replace('|', $depr, $url)); - } - - return $route; - } - - /** - * 检查URL是否已经定义过路由 - * @access protected - * @param array $route 路由信息 - * @return bool - */ - protected function hasDefinedRoute(array $route): bool - { - [$controller, $action] = $route; - - // 检查地址是否被定义过路由 - $name = strtolower(Str::studly($controller) . '/' . $action); - - $host = $this->request->host(true); - $method = $this->request->method(); - - if ($this->rule->getRouter()->getName($name, $host, $method)) { - return true; - } - - return false; - } - -} diff --git a/vendor/topthink/framework/src/think/service/ModelService.php b/vendor/topthink/framework/src/think/service/ModelService.php deleted file mode 100644 index b517c4e..0000000 --- a/vendor/topthink/framework/src/think/service/ModelService.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\service; - -use think\Model; -use think\Service; - -/** - * 模型服务类 - */ -class ModelService extends Service -{ - public function boot() - { - Model::setDb($this->app->db); - Model::setEvent($this->app->event); - Model::setInvoker([$this->app, 'invoke']); - Model::maker(function (Model $model) { - $config = $this->app->config; - - $isAutoWriteTimestamp = $model->getAutoWriteTimestamp(); - - if (is_null($isAutoWriteTimestamp)) { - // 自动写入时间戳 - $model->isAutoWriteTimestamp($config->get('database.auto_timestamp', 'timestamp')); - } - - $dateFormat = $model->getDateFormat(); - - if (is_null($dateFormat)) { - // 设置时间戳格式 - $model->setDateFormat($config->get('database.datetime_format', 'Y-m-d H:i:s')); - } - - $timeField = $config->get('database.datetime_field'); - if (!empty($timeField)) { - [$createTime, $updateTime] = explode(',', $timeField); - $model->setTimeField($createTime, $updateTime); - } - - }); - } -} diff --git a/vendor/topthink/framework/src/think/service/PaginatorService.php b/vendor/topthink/framework/src/think/service/PaginatorService.php deleted file mode 100644 index a01977d..0000000 --- a/vendor/topthink/framework/src/think/service/PaginatorService.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\service; - -use think\Paginator; -use think\paginator\driver\Bootstrap; -use think\Service; - -/** - * 分页服务类 - */ -class PaginatorService extends Service -{ - public function register() - { - if (!$this->app->bound(Paginator::class)) { - $this->app->bind(Paginator::class, Bootstrap::class); - } - } - - public function boot() - { - Paginator::maker(function (...$args) { - return $this->app->make(Paginator::class, $args, true); - }); - - Paginator::currentPathResolver(function () { - return $this->app->request->baseUrl(); - }); - - Paginator::currentPageResolver(function ($varPage = 'page') { - - $page = $this->app->request->param($varPage); - - if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) { - return (int) $page; - } - - return 1; - }); - } -} diff --git a/vendor/topthink/framework/src/think/service/ValidateService.php b/vendor/topthink/framework/src/think/service/ValidateService.php deleted file mode 100644 index 94d7638..0000000 --- a/vendor/topthink/framework/src/think/service/ValidateService.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\service; - -use think\Service; -use think\Validate; - -/** - * 验证服务类 - */ -class ValidateService extends Service -{ - public function boot() - { - Validate::maker(function (Validate $validate) { - $validate->setLang($this->app->lang); - $validate->setDb($this->app->db); - $validate->setRequest($this->app->request); - }); - } -} diff --git a/vendor/topthink/framework/src/think/session/Store.php b/vendor/topthink/framework/src/think/session/Store.php deleted file mode 100644 index 49e1ba9..0000000 --- a/vendor/topthink/framework/src/think/session/Store.php +++ /dev/null @@ -1,340 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\session; - -use think\contract\SessionHandlerInterface; -use think\helper\Arr; - -class Store -{ - - /** - * Session数据 - * @var array - */ - protected $data = []; - - /** - * 是否初始化 - * @var bool - */ - protected $init = null; - - /** - * 记录Session name - * @var string - */ - protected $name = 'PHPSESSID'; - - /** - * 记录Session Id - * @var string - */ - protected $id; - - /** - * @var SessionHandlerInterface - */ - protected $handler; - - /** @var array */ - protected $serialize = []; - - public function __construct($name, SessionHandlerInterface $handler, array $serialize = null) - { - $this->name = $name; - $this->handler = $handler; - - if (!empty($serialize)) { - $this->serialize = $serialize; - } - - $this->setId(); - } - - /** - * 设置数据 - * @access public - * @param array $data - * @return void - */ - public function setData(array $data): void - { - $this->data = $data; - } - - /** - * session初始化 - * @access public - * @return void - */ - public function init(): void - { - // 读取缓存数据 - $data = $this->handler->read($this->getId()); - - if (!empty($data)) { - $this->data = array_merge($this->data, $this->unserialize($data)); - } - - $this->init = true; - } - - /** - * 设置SessionName - * @access public - * @param string $name session_name - * @return void - */ - public function setName(string $name): void - { - $this->name = $name; - } - - /** - * 获取sessionName - * @access public - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * session_id设置 - * @access public - * @param string $id session_id - * @return void - */ - public function setId($id = null): void - { - $this->id = is_string($id) && strlen($id) === 32 && ctype_alnum($id) ? $id : md5(microtime(true) . session_create_id()); - } - - /** - * 获取session_id - * @access public - * @return string - */ - public function getId(): string - { - return $this->id; - } - - /** - * 获取所有数据 - * @return array - */ - public function all(): array - { - return $this->data; - } - - /** - * session设置 - * @access public - * @param string $name session名称 - * @param mixed $value session值 - * @return void - */ - public function set(string $name, $value): void - { - Arr::set($this->data, $name, $value); - } - - /** - * session获取 - * @access public - * @param string $name session名称 - * @param mixed $default 默认值 - * @return mixed - */ - public function get(string $name, $default = null) - { - return Arr::get($this->data, $name, $default); - } - - /** - * session获取并删除 - * @access public - * @param string $name session名称 - * @return mixed - */ - public function pull(string $name) - { - return Arr::pull($this->data, $name); - } - - /** - * 添加数据到一个session数组 - * @access public - * @param string $key - * @param mixed $value - * @return void - */ - public function push(string $key, $value): void - { - $array = $this->get($key, []); - - $array[] = $value; - - $this->set($key, $array); - } - - /** - * 判断session数据 - * @access public - * @param string $name session名称 - * @return bool - */ - public function has(string $name): bool - { - return Arr::has($this->data, $name); - } - - /** - * 删除session数据 - * @access public - * @param string $name session名称 - * @return void - */ - public function delete(string $name): void - { - Arr::forget($this->data, $name); - } - - /** - * 清空session数据 - * @access public - * @return void - */ - public function clear(): void - { - $this->data = []; - } - - /** - * 销毁session - */ - public function destroy(): void - { - $this->clear(); - - $this->regenerate(true); - } - - /** - * 重新生成session id - * @param bool $destroy - */ - public function regenerate(bool $destroy = false): void - { - if ($destroy) { - $this->handler->delete($this->getId()); - } - - $this->setId(); - } - - /** - * 保存session数据 - * @access public - * @return void - */ - public function save(): void - { - $this->clearFlashData(); - - $sessionId = $this->getId(); - - if (!empty($this->data)) { - $data = $this->serialize($this->data); - - $this->handler->write($sessionId, $data); - } else { - $this->handler->delete($sessionId); - } - - $this->init = false; - } - - /** - * session设置 下一次请求有效 - * @access public - * @param string $name session名称 - * @param mixed $value session值 - * @return void - */ - public function flash(string $name, $value): void - { - $this->set($name, $value); - $this->push('__flash__.__next__', $name); - $this->set('__flash__.__current__', Arr::except($this->get('__flash__.__current__', []), $name)); - } - - /** - * 将本次闪存数据推迟到下次请求 - * - * @return void - */ - public function reflash(): void - { - $keys = $this->get('__flash__.__current__', []); - $values = array_unique(array_merge($this->get('__flash__.__next__', []), $keys)); - $this->set('__flash__.__next__', $values); - $this->set('__flash__.__current__', []); - } - - /** - * 清空当前请求的session数据 - * @access public - * @return void - */ - public function clearFlashData(): void - { - Arr::forget($this->data, $this->get('__flash__.__current__', [])); - if (!empty($next = $this->get('__flash__.__next__', []))) { - $this->set('__flash__.__current__', $next); - } else { - $this->delete('__flash__.__current__'); - } - $this->delete('__flash__.__next__'); - } - - /** - * 序列化数据 - * @access protected - * @param mixed $data - * @return string - */ - protected function serialize($data): string - { - $serialize = $this->serialize[0] ?? 'serialize'; - - return $serialize($data); - } - - /** - * 反序列化数据 - * @access protected - * @param string $data - * @return array - */ - protected function unserialize(string $data): array - { - $unserialize = $this->serialize[1] ?? 'unserialize'; - - return (array) $unserialize($data); - } - -} diff --git a/vendor/topthink/framework/src/think/session/driver/Cache.php b/vendor/topthink/framework/src/think/session/driver/Cache.php deleted file mode 100644 index 4fabc79..0000000 --- a/vendor/topthink/framework/src/think/session/driver/Cache.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\session\driver; - -use Psr\SimpleCache\CacheInterface; -use think\contract\SessionHandlerInterface; -use think\helper\Arr; - -class Cache implements SessionHandlerInterface -{ - - /** @var CacheInterface */ - protected $handler; - - /** @var integer */ - protected $expire; - - /** @var string */ - protected $prefix; - - public function __construct(\think\Cache $cache, array $config = []) - { - $this->handler = $cache->store(Arr::get($config, 'store')); - $this->expire = Arr::get($config, 'expire', 1440); - $this->prefix = Arr::get($config, 'prefix', ''); - } - - public function read(string $sessionId): string - { - return (string) $this->handler->get($this->prefix . $sessionId); - } - - public function delete(string $sessionId): bool - { - return $this->handler->delete($this->prefix . $sessionId); - } - - public function write(string $sessionId, string $data): bool - { - return $this->handler->set($this->prefix . $sessionId, $data, $this->expire); - } -} diff --git a/vendor/topthink/framework/src/think/session/driver/File.php b/vendor/topthink/framework/src/think/session/driver/File.php deleted file mode 100644 index 788f323..0000000 --- a/vendor/topthink/framework/src/think/session/driver/File.php +++ /dev/null @@ -1,249 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\session\driver; - -use Closure; -use Exception; -use FilesystemIterator; -use Generator; -use SplFileInfo; -use think\App; -use think\contract\SessionHandlerInterface; - -/** - * Session 文件驱动 - */ -class File implements SessionHandlerInterface -{ - protected $config = [ - 'path' => '', - 'expire' => 1440, - 'prefix' => '', - 'data_compress' => false, - 'gc_probability' => 1, - 'gc_divisor' => 100, - ]; - - public function __construct(App $app, array $config = []) - { - $this->config = array_merge($this->config, $config); - - if (empty($this->config['path'])) { - $this->config['path'] = $app->getRuntimePath() . 'session' . DIRECTORY_SEPARATOR; - } elseif (substr($this->config['path'], -1) != DIRECTORY_SEPARATOR) { - $this->config['path'] .= DIRECTORY_SEPARATOR; - } - - $this->init(); - } - - /** - * 打开Session - * @access protected - * @throws Exception - */ - protected function init(): void - { - try { - !is_dir($this->config['path']) && mkdir($this->config['path'], 0755, true); - } catch (\Exception $e) { - // 写入失败 - } - - // 垃圾回收 - if (random_int(1, $this->config['gc_divisor']) <= $this->config['gc_probability']) { - $this->gc(); - } - } - - /** - * Session 垃圾回收 - * @access public - * @return void - */ - public function gc(): void - { - $lifetime = $this->config['expire']; - $now = time(); - - $files = $this->findFiles($this->config['path'], function (SplFileInfo $item) use ($lifetime, $now) { - return $now - $lifetime > $item->getMTime(); - }); - - foreach ($files as $file) { - $this->unlink($file->getPathname()); - } - } - - /** - * 查找文件 - * @param string $root - * @param Closure $filter - * @return Generator - */ - protected function findFiles(string $root, Closure $filter) - { - $items = new FilesystemIterator($root); - - /** @var SplFileInfo $item */ - foreach ($items as $item) { - if ($item->isDir() && !$item->isLink()) { - yield from $this->findFiles($item->getPathname(), $filter); - } else { - if ($filter($item)) { - yield $item; - } - } - } - } - - /** - * 取得变量的存储文件名 - * @access protected - * @param string $name 缓存变量名 - * @param bool $auto 是否自动创建目录 - * @return string - */ - protected function getFileName(string $name, bool $auto = false): string - { - if ($this->config['prefix']) { - // 使用子目录 - $name = $this->config['prefix'] . DIRECTORY_SEPARATOR . 'sess_' . $name; - } else { - $name = 'sess_' . $name; - } - - $filename = $this->config['path'] . $name; - $dir = dirname($filename); - - if ($auto && !is_dir($dir)) { - try { - mkdir($dir, 0755, true); - } catch (\Exception $e) { - // 创建失败 - } - } - - return $filename; - } - - /** - * 读取Session - * @access public - * @param string $sessID - * @return string - */ - public function read(string $sessID): string - { - $filename = $this->getFileName($sessID); - - if (is_file($filename) && filemtime($filename) >= time() - $this->config['expire']) { - $content = $this->readFile($filename); - - if ($this->config['data_compress'] && function_exists('gzcompress')) { - //启用数据压缩 - $content = (string) gzuncompress($content); - } - - return $content; - } - - return ''; - } - - /** - * 写文件(加锁) - * @param $path - * @param $content - * @return bool - */ - protected function writeFile($path, $content): bool - { - return (bool) file_put_contents($path, $content, LOCK_EX); - } - - /** - * 读取文件内容(加锁) - * @param $path - * @return string - */ - protected function readFile($path): string - { - $contents = ''; - - $handle = fopen($path, 'rb'); - - if ($handle) { - try { - if (flock($handle, LOCK_SH)) { - clearstatcache(true, $path); - - $contents = fread($handle, filesize($path) ?: 1); - - flock($handle, LOCK_UN); - } - } finally { - fclose($handle); - } - } - - return $contents; - } - - /** - * 写入Session - * @access public - * @param string $sessID - * @param string $sessData - * @return bool - */ - public function write(string $sessID, string $sessData): bool - { - $filename = $this->getFileName($sessID, true); - $data = $sessData; - - if ($this->config['data_compress'] && function_exists('gzcompress')) { - //数据压缩 - $data = gzcompress($data, 3); - } - - return $this->writeFile($filename, $data); - } - - /** - * 删除Session - * @access public - * @param string $sessID - * @return bool - */ - public function delete(string $sessID): bool - { - try { - return $this->unlink($this->getFileName($sessID)); - } catch (\Exception $e) { - return false; - } - } - - /** - * 判断文件是否存在后,删除 - * @access private - * @param string $file - * @return bool - */ - private function unlink(string $file): bool - { - return is_file($file) && unlink($file); - } - -} diff --git a/vendor/topthink/framework/src/think/validate/ValidateRule.php b/vendor/topthink/framework/src/think/validate/ValidateRule.php deleted file mode 100644 index 18e5ea3..0000000 --- a/vendor/topthink/framework/src/think/validate/ValidateRule.php +++ /dev/null @@ -1,172 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\validate; - -/** - * Class ValidateRule - * @package think\validate - * @method static ValidateRule confirm(mixed $rule, string $msg = '') 验证是否和某个字段的值一致 - * @method static ValidateRule different(mixed $rule, string $msg = '') 验证是否和某个字段的值是否不同 - * @method static ValidateRule egt(mixed $rule, string $msg = '') 验证是否大于等于某个值 - * @method static ValidateRule gt(mixed $rule, string $msg = '') 验证是否大于某个值 - * @method static ValidateRule elt(mixed $rule, string $msg = '') 验证是否小于等于某个值 - * @method static ValidateRule lt(mixed $rule, string $msg = '') 验证是否小于某个值 - * @method static ValidateRule eg(mixed $rule, string $msg = '') 验证是否等于某个值 - * @method static ValidateRule in(mixed $rule, string $msg = '') 验证是否在范围内 - * @method static ValidateRule notIn(mixed $rule, string $msg = '') 验证是否不在某个范围 - * @method static ValidateRule between(mixed $rule, string $msg = '') 验证是否在某个区间 - * @method static ValidateRule notBetween(mixed $rule, string $msg = '') 验证是否不在某个区间 - * @method static ValidateRule length(mixed $rule, string $msg = '') 验证数据长度 - * @method static ValidateRule max(mixed $rule, string $msg = '') 验证数据最大长度 - * @method static ValidateRule min(mixed $rule, string $msg = '') 验证数据最小长度 - * @method static ValidateRule after(mixed $rule, string $msg = '') 验证日期 - * @method static ValidateRule before(mixed $rule, string $msg = '') 验证日期 - * @method static ValidateRule expire(mixed $rule, string $msg = '') 验证有效期 - * @method static ValidateRule allowIp(mixed $rule, string $msg = '') 验证IP许可 - * @method static ValidateRule denyIp(mixed $rule, string $msg = '') 验证IP禁用 - * @method static ValidateRule regex(mixed $rule, string $msg = '') 使用正则验证数据 - * @method static ValidateRule token(mixed $rule='__token__', string $msg = '') 验证表单令牌 - * @method static ValidateRule is(mixed $rule, string $msg = '') 验证字段值是否为有效格式 - * @method static ValidateRule isRequire(mixed $rule = null, string $msg = '') 验证字段必须 - * @method static ValidateRule isNumber(mixed $rule = null, string $msg = '') 验证字段值是否为数字 - * @method static ValidateRule isArray(mixed $rule = null, string $msg = '') 验证字段值是否为数组 - * @method static ValidateRule isInteger(mixed $rule = null, string $msg = '') 验证字段值是否为整形 - * @method static ValidateRule isFloat(mixed $rule = null, string $msg = '') 验证字段值是否为浮点数 - * @method static ValidateRule isMobile(mixed $rule = null, string $msg = '') 验证字段值是否为手机 - * @method static ValidateRule isIdCard(mixed $rule = null, string $msg = '') 验证字段值是否为身份证号码 - * @method static ValidateRule isChs(mixed $rule = null, string $msg = '') 验证字段值是否为中文 - * @method static ValidateRule isChsDash(mixed $rule = null, string $msg = '') 验证字段值是否为中文字母及下划线 - * @method static ValidateRule isChsAlpha(mixed $rule = null, string $msg = '') 验证字段值是否为中文和字母 - * @method static ValidateRule isChsAlphaNum(mixed $rule = null, string $msg = '') 验证字段值是否为中文字母和数字 - * @method static ValidateRule isDate(mixed $rule = null, string $msg = '') 验证字段值是否为有效格式 - * @method static ValidateRule isBool(mixed $rule = null, string $msg = '') 验证字段值是否为布尔值 - * @method static ValidateRule isAlpha(mixed $rule = null, string $msg = '') 验证字段值是否为字母 - * @method static ValidateRule isAlphaDash(mixed $rule = null, string $msg = '') 验证字段值是否为字母和下划线 - * @method static ValidateRule isAlphaNum(mixed $rule = null, string $msg = '') 验证字段值是否为字母和数字 - * @method static ValidateRule isAccepted(mixed $rule = null, string $msg = '') 验证字段值是否为yes, on, 或是 1 - * @method static ValidateRule isEmail(mixed $rule = null, string $msg = '') 验证字段值是否为有效邮箱格式 - * @method static ValidateRule isUrl(mixed $rule = null, string $msg = '') 验证字段值是否为有效URL地址 - * @method static ValidateRule activeUrl(mixed $rule, string $msg = '') 验证是否为合格的域名或者IP - * @method static ValidateRule ip(mixed $rule, string $msg = '') 验证是否有效IP - * @method static ValidateRule fileExt(mixed $rule, string $msg = '') 验证文件后缀 - * @method static ValidateRule fileMime(mixed $rule, string $msg = '') 验证文件类型 - * @method static ValidateRule fileSize(mixed $rule, string $msg = '') 验证文件大小 - * @method static ValidateRule image(mixed $rule, string $msg = '') 验证图像文件 - * @method static ValidateRule method(mixed $rule, string $msg = '') 验证请求类型 - * @method static ValidateRule dateFormat(mixed $rule, string $msg = '') 验证时间和日期是否符合指定格式 - * @method static ValidateRule unique(mixed $rule, string $msg = '') 验证是否唯一 - * @method static ValidateRule behavior(mixed $rule, string $msg = '') 使用行为类验证 - * @method static ValidateRule filter(mixed $rule, string $msg = '') 使用filter_var方式验证 - * @method static ValidateRule requireIf(mixed $rule, string $msg = '') 验证某个字段等于某个值的时候必须 - * @method static ValidateRule requireCallback(mixed $rule, string $msg = '') 通过回调方法验证某个字段是否必须 - * @method static ValidateRule requireWith(mixed $rule, string $msg = '') 验证某个字段有值的情况下必须 - * @method static ValidateRule must(mixed $rule = null, string $msg = '') 必须验证 - */ -class ValidateRule -{ - // 验证字段的名称 - protected $title; - - // 当前验证规则 - protected $rule = []; - - // 验证提示信息 - protected $message = []; - - /** - * 添加验证因子 - * @access protected - * @param string $name 验证名称 - * @param mixed $rule 验证规则 - * @param string $msg 提示信息 - * @return $this - */ - protected function addItem(string $name, $rule = null, string $msg = '') - { - if ($rule || 0 === $rule) { - $this->rule[$name] = $rule; - } else { - $this->rule[] = $name; - } - - $this->message[] = $msg; - - return $this; - } - - /** - * 获取验证规则 - * @access public - * @return array - */ - public function getRule(): array - { - return $this->rule; - } - - /** - * 获取验证字段名称 - * @access public - * @return string - */ - public function getTitle(): string - { - return $this->title ?: ''; - } - - /** - * 获取验证提示 - * @access public - * @return array - */ - public function getMsg(): array - { - return $this->message; - } - - /** - * 设置验证字段名称 - * @access public - * @return $this - */ - public function title(string $title) - { - $this->title = $title; - - return $this; - } - - public function __call($method, $args) - { - if ('is' == strtolower(substr($method, 0, 2))) { - $method = substr($method, 2); - } - - array_unshift($args, lcfirst($method)); - - return call_user_func_array([$this, 'addItem'], $args); - } - - public static function __callStatic($method, $args) - { - $rule = new static(); - - if ('is' == strtolower(substr($method, 0, 2))) { - $method = substr($method, 2); - } - - array_unshift($args, lcfirst($method)); - - return call_user_func_array([$rule, 'addItem'], $args); - } -} diff --git a/vendor/topthink/framework/src/think/view/driver/Php.php b/vendor/topthink/framework/src/think/view/driver/Php.php deleted file mode 100644 index 9e6e54a..0000000 --- a/vendor/topthink/framework/src/think/view/driver/Php.php +++ /dev/null @@ -1,191 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\view\driver; - -use RuntimeException; -use think\App; -use think\contract\TemplateHandlerInterface; -use think\helper\Str; - -/** - * PHP原生模板驱动 - */ -class Php implements TemplateHandlerInterface -{ - protected $template; - protected $content; - protected $app; - - // 模板引擎参数 - protected $config = [ - // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 - 'auto_rule' => 1, - // 视图目录名 - 'view_dir_name' => 'view', - // 应用模板路径 - 'view_path' => '', - // 模板文件后缀 - 'view_suffix' => 'php', - // 模板文件名分隔符 - 'view_depr' => DIRECTORY_SEPARATOR, - ]; - - public function __construct(App $app, array $config = []) - { - $this->app = $app; - $this->config = array_merge($this->config, (array) $config); - } - - /** - * 检测是否存在模板文件 - * @access public - * @param string $template 模板文件或者模板规则 - * @return bool - */ - public function exists(string $template): bool - { - if ('' == pathinfo($template, PATHINFO_EXTENSION)) { - // 获取模板文件名 - $template = $this->parseTemplate($template); - } - - return is_file($template); - } - - /** - * 渲染模板文件 - * @access public - * @param string $template 模板文件 - * @param array $data 模板变量 - * @return void - */ - public function fetch(string $template, array $data = []): void - { - if ('' == pathinfo($template, PATHINFO_EXTENSION)) { - // 获取模板文件名 - $template = $this->parseTemplate($template); - } - - // 模板不存在 抛出异常 - if (!is_file($template)) { - throw new RuntimeException('template not exists:' . $template); - } - - $this->template = $template; - - extract($data, EXTR_OVERWRITE); - - include $this->template; - } - - /** - * 渲染模板内容 - * @access public - * @param string $content 模板内容 - * @param array $data 模板变量 - * @return void - */ - public function display(string $content, array $data = []): void - { - $this->content = $content; - - extract($data, EXTR_OVERWRITE); - eval('?>' . $this->content); - } - - /** - * 自动定位模板文件 - * @access private - * @param string $template 模板文件规则 - * @return string - */ - private function parseTemplate(string $template): string - { - $request = $this->app->request; - - // 获取视图根目录 - if (strpos($template, '@')) { - // 跨应用调用 - [$app, $template] = explode('@', $template); - } - - if ($this->config['view_path'] && !isset($app)) { - $path = $this->config['view_path']; - } else { - $appName = isset($app) ? $app : $this->app->http->getName(); - $view = $this->config['view_dir_name']; - - if (is_dir($this->app->getAppPath() . $view)) { - $path = isset($app) ? $this->app->getBasePath() . ($appName ? $appName . DIRECTORY_SEPARATOR : '') . $view . DIRECTORY_SEPARATOR : $this->app->getAppPath() . $view . DIRECTORY_SEPARATOR; - } else { - $path = $this->app->getRootPath() . $view . DIRECTORY_SEPARATOR . ($appName ? $appName . DIRECTORY_SEPARATOR : ''); - } - } - - $depr = $this->config['view_depr']; - - if (0 !== strpos($template, '/')) { - $template = str_replace(['/', ':'], $depr, $template); - $controller = $request->controller(); - if (strpos($controller, '.')) { - $pos = strrpos($controller, '.'); - $controller = substr($controller, 0, $pos) . '.' . Str::snake(substr($controller, $pos + 1)); - } else { - $controller = Str::snake($controller); - } - - if ($controller) { - if ('' == $template) { - // 如果模板文件名为空 按照默认规则定位 - if (2 == $this->config['auto_rule']) { - $template = $request->action(true); - } elseif (3 == $this->config['auto_rule']) { - $template = $request->action(); - } else { - $template = Str::snake($request->action()); - } - - $template = str_replace('.', DIRECTORY_SEPARATOR, $controller) . $depr . $template; - } elseif (false === strpos($template, $depr)) { - $template = str_replace('.', DIRECTORY_SEPARATOR, $controller) . $depr . $template; - } - } - } else { - $template = str_replace(['/', ':'], $depr, substr($template, 1)); - } - - return $path . ltrim($template, '/') . '.' . ltrim($this->config['view_suffix'], '.'); - } - - /** - * 配置模板引擎 - * @access private - * @param array $config 参数 - * @return void - */ - public function config(array $config): void - { - $this->config = array_merge($this->config, $config); - } - - /** - * 获取模板引擎配置 - * @access public - * @param string $name 参数名 - * @return mixed - */ - public function getConfig(string $name) - { - return $this->config[$name] ?? null; - } -} diff --git a/vendor/topthink/framework/src/tpl/think_exception.tpl b/vendor/topthink/framework/src/tpl/think_exception.tpl deleted file mode 100644 index 6ea9677..0000000 --- a/vendor/topthink/framework/src/tpl/think_exception.tpl +++ /dev/null @@ -1,502 +0,0 @@ -<?php -/** @var array $traces */ -if (!function_exists('parse_padding')) { - function parse_padding($source) - { - $length = strlen(strval(count($source['source']) + $source['first'])); - return 40 + ($length - 1) * 8; - } -} - -if (!function_exists('parse_class')) { - function parse_class($name) - { - $names = explode('\\', $name); - return '<abbr title="'.$name.'">'.end($names).'</abbr>'; - } -} - -if (!function_exists('parse_file')) { - function parse_file($file, $line) - { - return '<a class="toggle" title="'."{$file} line {$line}".'">'.basename($file)." line {$line}".'</a>'; - } -} - -if (!function_exists('parse_args')) { - function parse_args($args) - { - $result = []; - foreach ($args as $key => $item) { - switch (true) { - case is_object($item): - $value = sprintf('<em>object</em>(%s)', parse_class(get_class($item))); - break; - case is_array($item): - if (count($item) > 3) { - $value = sprintf('[%s, ...]', parse_args(array_slice($item, 0, 3))); - } else { - $value = sprintf('[%s]', parse_args($item)); - } - break; - case is_string($item): - if (strlen($item) > 20) { - $value = sprintf( - '\'<a class="toggle" title="%s">%s...</a>\'', - htmlentities($item), - htmlentities(substr($item, 0, 20)) - ); - } else { - $value = sprintf("'%s'", htmlentities($item)); - } - break; - case is_int($item): - case is_float($item): - $value = $item; - break; - case is_null($item): - $value = '<em>null</em>'; - break; - case is_bool($item): - $value = '<em>' . ($item ? 'true' : 'false') . '</em>'; - break; - case is_resource($item): - $value = '<em>resource</em>'; - break; - default: - $value = htmlentities(str_replace("\n", '', var_export(strval($item), true))); - break; - } - - $result[] = is_int($key) ? $value : "'{$key}' => {$value}"; - } - - return implode(', ', $result); - } -} -if (!function_exists('echo_value')) { - function echo_value($val) - { - if (is_array($val) || is_object($val)) { - echo htmlentities(json_encode($val, JSON_PRETTY_PRINT)); - } elseif (is_bool($val)) { - echo $val ? 'true' : 'false'; - } elseif (is_scalar($val)) { - echo htmlentities($val); - } else { - echo 'Resource'; - } - } -} -?> -<!DOCTYPE html> -<html> -<head> - <meta charset="UTF-8"> - <title>系统发生错误</title> - <meta name="robots" content="noindex,nofollow" /> - <style> - /* Base */ - body { - color: #333; - font: 16px Verdana, "Helvetica Neue", helvetica, Arial, 'Microsoft YaHei', sans-serif; - margin: 0; - padding: 0 20px 20px; - } - h1{ - margin: 10px 0 0; - font-size: 28px; - font-weight: 500; - line-height: 32px; - } - h2{ - color: #4288ce; - font-weight: 400; - padding: 6px 0; - margin: 6px 0 0; - font-size: 18px; - border-bottom: 1px solid #eee; - } - h3{ - margin: 12px; - font-size: 16px; - font-weight: bold; - } - abbr{ - cursor: help; - text-decoration: underline; - text-decoration-style: dotted; - } - a{ - color: #868686; - cursor: pointer; - } - a:hover{ - text-decoration: underline; - } - .line-error{ - background: #f8cbcb; - } - .echo table { - width: 100%; - } - .echo pre { - padding: 16px; - overflow: auto; - font-size: 85%; - line-height: 1.45; - background-color: #f7f7f7; - border: 0; - border-radius: 3px; - font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; - } - .echo pre > pre { - padding: 0; - margin: 0; - } - /* Exception Info */ - .exception { - margin-top: 20px; - } - .exception .message{ - padding: 12px; - border: 1px solid #ddd; - border-bottom: 0 none; - line-height: 18px; - font-size:16px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑",serif; - } - .exception .code{ - float: left; - text-align: center; - color: #fff; - margin-right: 12px; - padding: 16px; - border-radius: 4px; - background: #999; - } - .exception .source-code{ - padding: 6px; - border: 1px solid #ddd; - - background: #f9f9f9; - overflow-x: auto; - - } - .exception .source-code pre{ - margin: 0; - } - .exception .source-code pre ol{ - margin: 0; - color: #4288ce; - display: inline-block; - min-width: 100%; - box-sizing: border-box; - font-size:14px; - font-family: "Century Gothic",Consolas,"Liberation Mono",Courier,Verdana,serif; - padding-left: <?php echo (isset($source) && !empty($source)) ? parse_padding($source) : 40; ?>px; - } - .exception .source-code pre li{ - border-left: 1px solid #ddd; - height: 18px; - line-height: 18px; - } - .exception .source-code pre code{ - color: #333; - height: 100%; - display: inline-block; - border-left: 1px solid #fff; - font-size:14px; - font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑",serif; - } - .exception .trace{ - padding: 6px; - border: 1px solid #ddd; - border-top: 0 none; - line-height: 16px; - font-size:14px; - font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑",serif; - } - .exception .trace h2:hover { - text-decoration: underline; - cursor: pointer; - } - .exception .trace ol{ - margin: 12px; - } - .exception .trace ol li{ - padding: 2px 4px; - } - .exception div:last-child{ - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - } - - /* Exception Variables */ - .exception-var table{ - width: 100%; - margin: 12px 0; - box-sizing: border-box; - table-layout:fixed; - word-wrap:break-word; - } - .exception-var table caption{ - text-align: left; - font-size: 16px; - font-weight: bold; - padding: 6px 0; - } - .exception-var table caption small{ - font-weight: 300; - display: inline-block; - margin-left: 10px; - color: #ccc; - } - .exception-var table tbody{ - font-size: 13px; - font-family: Consolas, "Liberation Mono", Courier, "微软雅黑",serif; - } - .exception-var table td{ - padding: 0 6px; - vertical-align: top; - word-break: break-all; - } - .exception-var table td:first-child{ - width: 28%; - font-weight: bold; - white-space: nowrap; - } - .exception-var table td pre{ - margin: 0; - } - - /* Copyright Info */ - .copyright{ - margin-top: 24px; - padding: 12px 0; - border-top: 1px solid #eee; - } - - /* SPAN elements with the classes below are added by prettyprint. */ - pre.prettyprint .pln { color: #000 } /* plain text */ - pre.prettyprint .str { color: #080 } /* string content */ - pre.prettyprint .kwd { color: #008 } /* a keyword */ - pre.prettyprint .com { color: #800 } /* a comment */ - pre.prettyprint .typ { color: #606 } /* a type name */ - pre.prettyprint .lit { color: #066 } /* a literal value */ - /* punctuation, lisp open bracket, lisp close bracket */ - pre.prettyprint .pun, pre.prettyprint .opn, pre.prettyprint .clo { color: #660 } - pre.prettyprint .tag { color: #008 } /* a markup tag name */ - pre.prettyprint .atn { color: #606 } /* a markup attribute name */ - pre.prettyprint .atv { color: #080 } /* a markup attribute value */ - pre.prettyprint .dec, pre.prettyprint .var { color: #606 } /* a declaration; a variable name */ - pre.prettyprint .fun { color: red } /* a function name */ - </style> -</head> -<body> - <?php if (\think\facade\App::isDebug()) { ?> - <?php foreach ($traces as $index => $trace) { ?> - <div class="exception"> - <div class="message"> - <div class="info"> - <div> - <h2><?php echo "#{$index} [{$trace['code']}]" . sprintf('%s in %s', parse_class($trace['name']), parse_file($trace['file'], $trace['line'])); ?></h2> - </div> - <div><h1><?php echo nl2br(htmlentities($trace['message'])); ?></h1></div> - </div> - </div> - <?php if (!empty($trace['source'])) { ?> - <div class="source-code"> - <pre class="prettyprint lang-php"><ol start="<?php echo $trace['source']['first']; ?>"><?php foreach ((array) $trace['source']['source'] as $key => $value) { ?><li class="line-<?php echo "{$index}-"; echo $key + $trace['source']['first']; echo $trace['line'] === $key + $trace['source']['first'] ? ' line-error' : ''; ?>"><code><?php echo htmlentities($value); ?></code></li><?php } ?></ol></pre> - </div> - <?php }?> - <div class="trace"> - <h2 data-expand="<?php echo 0 === $index ? '1' : '0'; ?>">Call Stack</h2> - <ol> - <li><?php echo sprintf('in %s', parse_file($trace['file'], $trace['line'])); ?></li> - <?php foreach ((array) $trace['trace'] as $value) { ?> - <li> - <?php - // Show Function - if ($value['function']) { - echo sprintf( - 'at %s%s%s(%s)', - isset($value['class']) ? parse_class($value['class']) : '', - isset($value['type']) ? $value['type'] : '', - $value['function'], - isset($value['args'])?parse_args($value['args']):'' - ); - } - - // Show line - if (isset($value['file']) && isset($value['line'])) { - echo sprintf(' in %s', parse_file($value['file'], $value['line'])); - } - ?> - </li> - <?php } ?> - </ol> - </div> - </div> - <?php } ?> - <?php } else { ?> - <div class="exception"> - <div class="info"><h1><?php echo htmlentities($message); ?></h1></div> - </div> - <?php } ?> - - <?php if (!empty($datas)) { ?> - <div class="exception-var"> - <h2>Exception Datas</h2> - <?php foreach ((array) $datas as $label => $value) { ?> - <table> - <?php if (empty($value)) { ?> - <caption><?php echo $label; ?><small>empty</small></caption> - <?php } else { ?> - <caption><?php echo $label; ?></caption> - <tbody> - <?php foreach ((array) $value as $key => $val) { ?> - <tr> - <td><?php echo htmlentities($key); ?></td> - <td><?php echo_value($val); ?></td> - </tr> - <?php } ?> - </tbody> - <?php } ?> - </table> - <?php } ?> - </div> - <?php } ?> - - <?php if (!empty($tables)) { ?> - <div class="exception-var"> - <h2>Environment Variables</h2> - <?php foreach ((array) $tables as $label => $value) { ?> - <table> - <?php if (empty($value)) { ?> - <caption><?php echo $label; ?><small>empty</small></caption> - <?php } else { ?> - <caption><?php echo $label; ?></caption> - <tbody> - <?php foreach ((array) $value as $key => $val) { ?> - <tr> - <td><?php echo htmlentities($key); ?></td> - <td><?php echo_value($val); ?></td> - </tr> - <?php } ?> - </tbody> - <?php } ?> - </table> - <?php } ?> - </div> - <?php } ?> - - <div class="copyright"> - <a title="官方网站" href="http://www.thinkphp.cn">ThinkPHP</a> - <span>V<?php echo \think\facade\App::version(); ?></span> - <span>{ 十年磨一剑-为API开发设计的高性能框架 }</span> - <span>- <a title="官方手册" href="https://www.kancloud.cn/manual/thinkphp6_0/content">官方手册</a></span> - </div> - <?php if (\think\facade\App::isDebug()) { ?> - <script> - function $(selector, node){ - var elements; - - node = node || document; - if(document.querySelectorAll){ - elements = node.querySelectorAll(selector); - } else { - switch(selector.substr(0, 1)){ - case '#': - elements = [node.getElementById(selector.substr(1))]; - break; - case '.': - if(document.getElementsByClassName){ - elements = node.getElementsByClassName(selector.substr(1)); - } else { - elements = get_elements_by_class(selector.substr(1), node); - } - break; - default: - elements = node.getElementsByTagName(); - } - } - return elements; - - function get_elements_by_class(search_class, node, tag) { - var elements = [], eles, - pattern = new RegExp('(^|\\s)' + search_class + '(\\s|$)'); - - node = node || document; - tag = tag || '*'; - - eles = node.getElementsByTagName(tag); - for(var i = 0; i < eles.length; i++) { - if(pattern.test(eles[i].className)) { - elements.push(eles[i]) - } - } - - return elements; - } - } - - $.getScript = function(src, func){ - var script = document.createElement('script'); - - script.async = 'async'; - script.src = src; - script.onload = func || function(){}; - - $('head')[0].appendChild(script); - } - - ;(function(){ - var files = $('.toggle'); - var ol = $('ol', $('.prettyprint')[0]); - var li = $('li', ol[0]); - - // 短路径和长路径变换 - for(var i = 0; i < files.length; i++){ - files[i].ondblclick = function(){ - var title = this.title; - - this.title = this.innerHTML; - this.innerHTML = title; - } - } - - (function () { - var expand = function (dom, expand) { - var ol = $('ol', dom.parentNode)[0]; - expand = undefined === expand ? dom.attributes['data-expand'].value === '0' : undefined; - if (expand) { - dom.attributes['data-expand'].value = '1'; - ol.style.display = 'none'; - dom.innerText = 'Call Stack (展开)'; - } else { - dom.attributes['data-expand'].value = '0'; - ol.style.display = 'block'; - dom.innerText = 'Call Stack (折叠)'; - } - }; - var traces = $('.trace'); - for (var i = 0; i < traces.length; i ++) { - var h2 = $('h2', traces[i])[0]; - expand(h2); - h2.onclick = function () { - expand(this); - }; - } - })(); - - $.getScript('//cdn.bootcdn.net/ajax/libs/prettify/r298/prettify.min.js', function(){ - prettyPrint(); - }); - })(); - </script> - <?php } ?> -</body> -</html> diff --git a/vendor/topthink/framework/tests/AppTest.php b/vendor/topthink/framework/tests/AppTest.php deleted file mode 100644 index 6b86015..0000000 --- a/vendor/topthink/framework/tests/AppTest.php +++ /dev/null @@ -1,215 +0,0 @@ -<?php - -namespace think\tests; - -use Mockery as m; -use org\bovigo\vfs\vfsStream; -use org\bovigo\vfs\vfsStreamDirectory; -use PHPUnit\Framework\TestCase; -use stdClass; -use think\App; -use think\Env; -use think\Event; -use think\event\AppInit; -use think\exception\ClassNotFoundException; -use think\Service; - -class SomeService extends Service -{ - public $bind = [ - 'some' => 'class', - ]; - - public function register() - { - - } - - public function boot() - { - - } -} - -/** - * @property array initializers - */ -class AppTest extends TestCase -{ - /** @var App */ - protected $app; - - protected function setUp() - { - $this->app = new App(); - } - - protected function tearDown(): void - { - m::close(); - } - - public function testService() - { - $this->app->register(stdClass::class); - - $this->assertInstanceOf(stdClass::class, $this->app->getService(stdClass::class)); - - $service = m::mock(SomeService::class); - - $service->shouldReceive('register')->once(); - - $this->app->register($service); - - $this->assertEquals($service, $this->app->getService(SomeService::class)); - - $service2 = m::mock(SomeService::class); - - $service2->shouldReceive('register')->once(); - - $this->app->register($service2); - - $this->assertEquals($service, $this->app->getService(SomeService::class)); - - $this->app->register($service2, true); - - $this->assertEquals($service2, $this->app->getService(SomeService::class)); - - $service->shouldReceive('boot')->once(); - $service2->shouldReceive('boot')->once(); - - $this->app->boot(); - } - - public function testDebug() - { - $this->app->debug(false); - - $this->assertFalse($this->app->isDebug()); - - $this->app->debug(true); - - $this->assertTrue($this->app->isDebug()); - } - - public function testNamespace() - { - $namespace = 'test'; - - $this->app->setNamespace($namespace); - - $this->assertEquals($namespace, $this->app->getNamespace()); - } - - public function testVersion() - { - $this->assertEquals(App::VERSION, $this->app->version()); - } - - public function testPath() - { - $rootPath = __DIR__ . DIRECTORY_SEPARATOR; - - $app = new App($rootPath); - - $this->assertEquals($rootPath, $app->getRootPath()); - - $this->assertEquals(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR, $app->getThinkPath()); - - $this->assertEquals($rootPath . 'app' . DIRECTORY_SEPARATOR, $app->getAppPath()); - - $appPath = $rootPath . 'app' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR; - $app->setAppPath($appPath); - $this->assertEquals($appPath, $app->getAppPath()); - - $this->assertEquals($rootPath . 'app' . DIRECTORY_SEPARATOR, $app->getBasePath()); - - $this->assertEquals($rootPath . 'config' . DIRECTORY_SEPARATOR, $app->getConfigPath()); - - $this->assertEquals($rootPath . 'runtime' . DIRECTORY_SEPARATOR, $app->getRuntimePath()); - - $runtimePath = $rootPath . 'runtime' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR; - $app->setRuntimePath($runtimePath); - $this->assertEquals($runtimePath, $app->getRuntimePath()); - } - - /** - * @param vfsStreamDirectory $root - * @param bool $debug - * @return App - */ - protected function prepareAppForInitialize(vfsStreamDirectory $root, $debug = true) - { - $rootPath = $root->url() . DIRECTORY_SEPARATOR; - - $app = new App($rootPath); - - $initializer = m::mock(); - $initializer->shouldReceive('init')->once()->with($app); - - $app->instance($initializer->mockery_getName(), $initializer); - - (function () use ($initializer) { - $this->initializers = [$initializer->mockery_getName()]; - })->call($app); - - $env = m::mock(Env::class); - $env->shouldReceive('load')->once()->with($rootPath . '.env'); - $env->shouldReceive('get')->once()->with('config_ext', '.php')->andReturn('.php'); - $env->shouldReceive('get')->once()->with('app_debug')->andReturn($debug); - - $event = m::mock(Event::class); - $event->shouldReceive('trigger')->once()->with(AppInit::class); - $event->shouldReceive('bind')->once()->with([]); - $event->shouldReceive('listenEvents')->once()->with([]); - $event->shouldReceive('subscribe')->once()->with([]); - - $app->instance('env', $env); - $app->instance('event', $event); - - return $app; - } - - public function testInitialize() - { - $root = vfsStream::setup('rootDir', null, [ - '.env' => '', - 'app' => [ - 'common.php' => '', - 'event.php' => '<?php return ["bind"=>[],"listen"=>[],"subscribe"=>[]];', - 'provider.php' => '<?php return [];', - ], - 'config' => [ - 'app.php' => '<?php return [];', - ], - ]); - - $app = $this->prepareAppForInitialize($root, true); - - $app->debug(false); - - $app->initialize(); - - $this->assertIsInt($app->getBeginMem()); - $this->assertIsFloat($app->getBeginTime()); - - $this->assertTrue($app->initialized()); - } - - public function testFactory() - { - $this->assertInstanceOf(stdClass::class, App::factory(stdClass::class)); - - $this->expectException(ClassNotFoundException::class); - - App::factory('SomeClass'); - } - - public function testParseClass() - { - $this->assertEquals('app\\controller\\SomeClass', $this->app->parseClass('controller', 'some_class')); - $this->app->setNamespace('app2'); - $this->assertEquals('app2\\controller\\SomeClass', $this->app->parseClass('controller', 'some_class')); - } - -} diff --git a/vendor/topthink/framework/tests/CacheTest.php b/vendor/topthink/framework/tests/CacheTest.php deleted file mode 100644 index 5b5a13c..0000000 --- a/vendor/topthink/framework/tests/CacheTest.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php - -namespace think\tests; - -use InvalidArgumentException; -use Mockery as m; -use Mockery\MockInterface; -use org\bovigo\vfs\vfsStream; -use PHPUnit\Framework\TestCase; -use think\App; -use think\Cache; -use think\Config; -use think\Container; - -class CacheTest extends TestCase -{ - /** @var App|MockInterface */ - protected $app; - - /** @var Cache|MockInterface */ - protected $cache; - - /** @var Config|MockInterface */ - protected $config; - - protected function tearDown(): void - { - m::close(); - } - - protected function setUp() - { - $this->app = m::mock(App::class)->makePartial(); - - Container::setInstance($this->app); - $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); - $this->config = m::mock(Config::class)->makePartial(); - $this->app->shouldReceive('get')->with('config')->andReturn($this->config); - - $this->cache = new Cache($this->app); - } - - public function testGetConfig() - { - $config = [ - 'default' => 'file', - ]; - - $this->config->shouldReceive('get')->with('cache')->andReturn($config); - - $this->assertEquals($config, $this->cache->getConfig()); - - $this->expectException(InvalidArgumentException::class); - $this->cache->getStoreConfig('foo'); - } - - public function testCacheManagerInstances() - { - $this->config->shouldReceive('get')->with("cache.stores.single", null)->andReturn(['type' => 'file']); - - $channel1 = $this->cache->store('single'); - $channel2 = $this->cache->store('single'); - - $this->assertSame($channel1, $channel2); - } - - public function testFileCache() - { - $root = vfsStream::setup(); - - $this->config->shouldReceive('get')->with("cache.default", null)->andReturn('file'); - - $this->config->shouldReceive('get')->with("cache.stores.file", null)->andReturn(['type' => 'file', 'path' => $root->url()]); - - $this->cache->set('foo', 5); - $this->cache->inc('foo'); - $this->assertEquals(6, $this->cache->get('foo')); - $this->cache->dec('foo', 2); - $this->assertEquals(4, $this->cache->get('foo')); - - $this->cache->set('bar', true); - $this->assertTrue($this->cache->get('bar')); - - $this->cache->set('baz', null); - $this->assertNull($this->cache->get('baz')); - - $this->assertTrue($this->cache->has('baz')); - $this->cache->delete('baz'); - $this->assertFalse($this->cache->has('baz')); - $this->assertNull($this->cache->get('baz')); - $this->assertFalse($this->cache->get('baz', false)); - - $this->assertTrue($root->hasChildren()); - $this->cache->clear(); - $this->assertFalse($root->hasChildren()); - - //tags - $this->cache->tag('foo')->set('bar', 'foobar'); - $this->assertEquals('foobar', $this->cache->get('bar')); - $this->cache->tag('foo')->clear(); - $this->assertFalse($this->cache->has('bar')); - - //multiple - $this->cache->setMultiple(['foo' => ['foobar', 'bar'], 'foobar' => ['foo', 'bar']]); - $this->assertEquals(['foo' => ['foobar', 'bar'], 'foobar' => ['foo', 'bar']], $this->cache->getMultiple(['foo', 'foobar'])); - $this->assertTrue($this->cache->deleteMultiple(['foo', 'foobar'])); - } - - public function testRedisCache() - { - if (extension_loaded('redis')) { - return; - } - $this->config->shouldReceive('get')->with("cache.default", null)->andReturn('redis'); - $this->config->shouldReceive('get')->with("cache.stores.redis", null)->andReturn(['type' => 'redis']); - - $redis = m::mock('overload:\Predis\Client'); - - $redis->shouldReceive("set")->once()->with('foo', 5)->andReturnTrue(); - $redis->shouldReceive("incrby")->once()->with('foo', 1)->andReturnTrue(); - $redis->shouldReceive("decrby")->once()->with('foo', 2)->andReturnTrue(); - $redis->shouldReceive("get")->once()->with('foo')->andReturn('6'); - $redis->shouldReceive("get")->once()->with('foo')->andReturn('4'); - $redis->shouldReceive("set")->once()->with('bar', serialize(true))->andReturnTrue(); - $redis->shouldReceive("set")->once()->with('baz', serialize(null))->andReturnTrue(); - $redis->shouldReceive("del")->once()->with('baz')->andReturnTrue(); - $redis->shouldReceive("flushDB")->once()->andReturnTrue(); - $redis->shouldReceive("set")->once()->with('bar', serialize('foobar'))->andReturnTrue(); - $redis->shouldReceive("sAdd")->once()->with('tag:' . md5('foo'), 'bar')->andReturnTrue(); - $redis->shouldReceive("sMembers")->once()->with('tag:' . md5('foo'))->andReturn(['bar']); - $redis->shouldReceive("del")->once()->with(['bar'])->andReturnTrue(); - $redis->shouldReceive("del")->once()->with('tag:' . md5('foo'))->andReturnTrue(); - - $this->cache->set('foo', 5); - $this->cache->inc('foo'); - $this->assertEquals(6, $this->cache->get('foo')); - $this->cache->dec('foo', 2); - $this->assertEquals(4, $this->cache->get('foo')); - - $this->cache->set('bar', true); - $this->cache->set('baz', null); - $this->cache->delete('baz'); - $this->cache->clear(); - - //tags - $this->cache->tag('foo')->set('bar', 'foobar'); - $this->cache->tag('foo')->clear(); - } -} diff --git a/vendor/topthink/framework/tests/ConfigTest.php b/vendor/topthink/framework/tests/ConfigTest.php deleted file mode 100644 index 271a34f..0000000 --- a/vendor/topthink/framework/tests/ConfigTest.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace think\tests; - -use org\bovigo\vfs\vfsStream; -use PHPUnit\Framework\TestCase; -use think\Config; - -class ConfigTest extends TestCase -{ - public function testLoad() - { - $root = vfsStream::setup(); - $file = vfsStream::newFile('test.php')->setContent("<?php return ['key1'=> 'value1','key2'=>'value2'];"); - $root->addChild($file); - - $config = new Config(); - - $config->load($file->url(), 'test'); - - $this->assertEquals('value1', $config->get('test.key1')); - $this->assertEquals('value2', $config->get('test.key2')); - - $this->assertSame(['key1' => 'value1', 'key2' => 'value2'], $config->get('test')); - } - - public function testSetAndGet() - { - $config = new Config(); - - $config->set([ - 'key1' => 'value1', - 'key2' => [ - 'key3' => 'value3', - ], - ], 'test'); - - $this->assertTrue($config->has('test.key1')); - $this->assertEquals('value1', $config->get('test.key1')); - $this->assertEquals('value3', $config->get('test.key2.key3')); - - $this->assertEquals(['key3' => 'value3'], $config->get('test.key2')); - $this->assertFalse($config->has('test.key3')); - $this->assertEquals('none', $config->get('test.key3', 'none')); - } -} diff --git a/vendor/topthink/framework/tests/ContainerTest.php b/vendor/topthink/framework/tests/ContainerTest.php deleted file mode 100644 index e27deb0..0000000 --- a/vendor/topthink/framework/tests/ContainerTest.php +++ /dev/null @@ -1,314 +0,0 @@ -<?php - -namespace think\tests; - -use PHPUnit\Framework\TestCase; -use ReflectionMethod; -use stdClass; -use think\Container; -use think\exception\ClassNotFoundException; -use think\exception\FuncNotFoundException; - -class Taylor -{ - public $name; - - public function __construct($name) - { - $this->name = $name; - } - - public function some(Container $container) - { - } - - protected function protectionFun() - { - return true; - } - - public static function test(Container $container) - { - return $container; - } - - public static function __make() - { - return new self('Taylor'); - } -} - -class SomeClass -{ - public $container; - - public $count = 0; - - public function __construct(Container $container) - { - $this->container = $container; - } -} - -class ContainerTest extends TestCase -{ - protected function tearDown(): void - { - Container::setInstance(null); - } - - public function testClosureResolution() - { - $container = new Container; - - Container::setInstance($container); - - $container->bind('name', function () { - return 'Taylor'; - }); - - $this->assertEquals('Taylor', $container->make('name')); - - $this->assertEquals('Taylor', Container::pull('name')); - } - - public function testGet() - { - $container = new Container; - - $this->expectException(ClassNotFoundException::class); - $this->expectExceptionMessage('class not exists: name'); - $container->get('name'); - - $container->bind('name', function () { - return 'Taylor'; - }); - - $this->assertSame('Taylor', $container->get('name')); - } - - public function testExist() - { - $container = new Container; - - $container->bind('name', function () { - return 'Taylor'; - }); - - $this->assertFalse($container->exists("name")); - - $container->make('name'); - - $this->assertTrue($container->exists('name')); - } - - public function testInstance() - { - $container = new Container; - - $container->bind('name', function () { - return 'Taylor'; - }); - - $this->assertEquals('Taylor', $container->get('name')); - - $container->bind('name2', Taylor::class); - - $object = new stdClass(); - - $this->assertFalse($container->exists('name2')); - - $container->instance('name2', $object); - - $this->assertTrue($container->exists('name2')); - - $this->assertTrue($container->exists(Taylor::class)); - - $this->assertEquals($object, $container->make(Taylor::class)); - - unset($container->name1); - - $this->assertFalse($container->exists('name1')); - - $container->delete('name2'); - - $this->assertFalse($container->exists('name2')); - - foreach ($container as $class => $instance) { - - } - } - - public function testBind() - { - $container = new Container; - - $object = new stdClass(); - - $container->bind(['name' => Taylor::class]); - - $container->bind('name2', $object); - - $container->bind('name3', Taylor::class); - $container->bind('name3', Taylor::class); - - $container->name4 = $object; - - $container['name5'] = $object; - - $this->assertTrue(isset($container->name4)); - - $this->assertTrue(isset($container['name5'])); - - $this->assertInstanceOf(Taylor::class, $container->get('name')); - - $this->assertSame($object, $container->get('name2')); - - $this->assertSame($object, $container->name4); - - $this->assertSame($object, $container['name5']); - - $this->assertInstanceOf(Taylor::class, $container->get('name3')); - - unset($container['name']); - - $this->assertFalse(isset($container['name'])); - - unset($container->name3); - - $this->assertFalse(isset($container->name3)); - } - - public function testAutoConcreteResolution() - { - $container = new Container; - - $taylor = $container->make(Taylor::class); - - $this->assertInstanceOf(Taylor::class, $taylor); - $this->assertAttributeSame('Taylor', 'name', $taylor); - } - - public function testGetAndSetInstance() - { - $this->assertInstanceOf(Container::class, Container::getInstance()); - - $object = new stdClass(); - - Container::setInstance($object); - - $this->assertSame($object, Container::getInstance()); - - Container::setInstance(function () { - return $this; - }); - - $this->assertSame($this, Container::getInstance()); - } - - public function testResolving() - { - $container = new Container(); - $container->bind(Container::class, $container); - - $container->resolving(function (SomeClass $taylor, Container $container) { - $taylor->count++; - }); - $container->resolving(SomeClass::class, function (SomeClass $taylor, Container $container) { - $taylor->count++; - }); - - /** @var SomeClass $someClass */ - $someClass = $container->invokeClass(SomeClass::class); - $this->assertEquals(2, $someClass->count); - } - - public function testInvokeFunctionWithoutMethodThrowsException() - { - $this->expectException(FuncNotFoundException::class); - $this->expectExceptionMessage('function not exists: ContainerTestCallStub()'); - $container = new Container(); - $container->invokeFunction('ContainerTestCallStub', []); - } - - public function testInvokeProtectionMethod() - { - $container = new Container(); - $this->assertTrue($container->invokeMethod([Taylor::class, 'protectionFun'], [], true)); - } - - public function testInvoke() - { - $container = new Container(); - - Container::setInstance($container); - - $container->bind(Container::class, $container); - - $stub = $this->createMock(Taylor::class); - - $stub->expects($this->once())->method('some')->with($container)->will($this->returnSelf()); - - $container->invokeMethod([$stub, 'some']); - - $this->assertEquals('48', $container->invoke('ord', ['0'])); - - $this->assertSame($container, $container->invoke(Taylor::class . '::test', [])); - - $this->assertSame($container, $container->invokeMethod(Taylor::class . '::test')); - - $reflect = new ReflectionMethod($container, 'exists'); - - $this->assertTrue($container->invokeReflectMethod($container, $reflect, [Container::class])); - - $this->assertSame($container, $container->invoke(function (Container $container) { - return $container; - })); - - $this->assertSame($container, $container->invoke(Taylor::class . '::test')); - - $object = $container->invokeClass(SomeClass::class); - $this->assertInstanceOf(SomeClass::class, $object); - $this->assertSame($container, $object->container); - - $stdClass = new stdClass(); - - $container->invoke(function (Container $container, stdClass $stdObject, $key1, $lowKey, $key2 = 'default') use ($stdClass) { - $this->assertEquals('value1', $key1); - $this->assertEquals('default', $key2); - $this->assertEquals('value2', $lowKey); - $this->assertSame($stdClass, $stdObject); - return $container; - }, ['some' => $stdClass, 'key1' => 'value1', 'low_key' => 'value2']); - } - - public function testInvokeMethodNotExists() - { - $container = $this->resolveContainer(); - $this->expectException(FuncNotFoundException::class); - - $container->invokeMethod([SomeClass::class, 'any']); - } - - public function testInvokeClassNotExists() - { - $container = new Container(); - - Container::setInstance($container); - - $container->bind(Container::class, $container); - - $this->expectExceptionObject(new ClassNotFoundException('class not exists: SomeClass')); - - $container->invokeClass('SomeClass'); - } - - protected function resolveContainer() - { - $container = new Container(); - - Container::setInstance($container); - return $container; - } - -} diff --git a/vendor/topthink/framework/tests/DbTest.php b/vendor/topthink/framework/tests/DbTest.php deleted file mode 100644 index 3bd0c1e..0000000 --- a/vendor/topthink/framework/tests/DbTest.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -namespace think\tests; - -use Mockery as m; -use PHPUnit\Framework\TestCase; -use think\Cache; -use think\cache\Driver; -use think\Config; -use think\Db; -use think\Event; -use think\Log; - -class DbTest extends TestCase -{ - protected function tearDown(): void - { - m::close(); - } - - public function testMake() - { - $event = m::mock(Event::class); - $config = m::mock(Config::class); - $log = m::mock(Log::class); - $cache = m::mock(Cache::class); - $store = m::mock(Driver::class); - - $config->shouldReceive('get')->with('database.cache_store', null)->andReturn(null); - $cache->shouldReceive('store')->with(null)->andReturn($store); - - $db = Db::__make($event, $config, $log, $cache); - - $config->shouldReceive('get')->with('database.foo', null)->andReturn('foo'); - $this->assertEquals('foo', $db->getConfig('foo')); - - $config->shouldReceive('get')->with('database', [])->andReturn([]); - $this->assertEquals([], $db->getConfig()); - - $callback = function () { - }; - $event->shouldReceive('listen')->with('db.some', $callback); - $db->event('some', $callback); - - $event->shouldReceive('trigger')->with('db.some', null, false); - $db->trigger('some'); - } - -} diff --git a/vendor/topthink/framework/tests/DispatchTest.php b/vendor/topthink/framework/tests/DispatchTest.php deleted file mode 100644 index 2b9e413..0000000 --- a/vendor/topthink/framework/tests/DispatchTest.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - -namespace think\tests; - -use GuzzleHttp\Psr7\Response; -use Mockery; -use PHPUnit\Framework\TestCase; -use think\Request; -use think\route\Dispatch; -use think\route\Rule; - -class DispatchTest extends TestCase -{ - public function testPsr7Response() - { - $request = Mockery::mock(Request::class); - $rule = Mockery::mock(Rule::class); - $dispatch = new class($request, $rule, '') extends Dispatch { - public function exec() - { - return new Response(200, ['framework' => ['tp', 'thinkphp'], 'psr' => 'psr-7'], '123'); - } - }; - - $response = $dispatch->run(); - - $this->assertInstanceOf(\think\Response::class, $response); - $this->assertEquals('123', $response->getContent()); - $this->assertEquals('tp, thinkphp', $response->getHeader('framework')); - $this->assertEquals('psr-7', $response->getHeader('psr')); - } -} diff --git a/vendor/topthink/framework/tests/EnvTest.php b/vendor/topthink/framework/tests/EnvTest.php deleted file mode 100644 index 9b3b615..0000000 --- a/vendor/topthink/framework/tests/EnvTest.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - -namespace think\tests; - -use org\bovigo\vfs\vfsStream; -use PHPUnit\Framework\TestCase; -use think\Env; -use think\Exception; - -class EnvTest extends TestCase -{ - public function testEnvFile() - { - $root = vfsStream::setup(); - $envFile = vfsStream::newFile('.env')->setContent("key1=value1\nkey2=value2"); - $root->addChild($envFile); - - $env = new Env(); - - $env->load($envFile->url()); - - $this->assertEquals('value1', $env->get('key1')); - $this->assertEquals('value2', $env->get('key2')); - } - - public function testServerEnv() - { - $env = new Env(); - - $this->assertEquals('value2', $env->get('key2', 'value2')); - - putenv('PHP_KEY7=value7'); - putenv('PHP_KEY8=false'); - putenv('PHP_KEY9=true'); - - $this->assertEquals('value7', $env->get('key7')); - $this->assertFalse($env->get('KEY8')); - $this->assertTrue($env->get('key9')); - } - - public function testSetEnv() - { - $env = new Env(); - - $env->set([ - 'key1' => 'value1', - 'key2' => [ - 'key1' => 'value1-2', - ], - ]); - - $env->set('key3', 'value3'); - - $env->key4 = 'value4'; - - $env['key5'] = 'value5'; - - $this->assertEquals('value1', $env->get('key1')); - $this->assertEquals('value1-2', $env->get('key2.key1')); - - $this->assertEquals('value3', $env->get('key3')); - - $this->assertEquals('value4', $env->key4); - - $this->assertEquals('value5', $env['key5']); - - $this->expectException(Exception::class); - - unset($env['key5']); - } - - public function testHasEnv() - { - $env = new Env(); - $env->set(['foo' => 'bar']); - $this->assertTrue($env->has('foo')); - $this->assertTrue(isset($env->foo)); - $this->assertTrue($env->offsetExists('foo')); - } -} diff --git a/vendor/topthink/framework/tests/EventTest.php b/vendor/topthink/framework/tests/EventTest.php deleted file mode 100644 index ded5a36..0000000 --- a/vendor/topthink/framework/tests/EventTest.php +++ /dev/null @@ -1,134 +0,0 @@ -<?php - -namespace think\tests; - -use Mockery as m; -use Mockery\MockInterface; -use PHPUnit\Framework\TestCase; -use think\App; -use think\Config; -use think\Container; -use think\Event; - -class EventTest extends TestCase -{ - /** @var App|MockInterface */ - protected $app; - - /** @var Event|MockInterface */ - protected $event; - - /** @var Config|MockInterface */ - protected $config; - - protected function tearDown(): void - { - m::close(); - } - - protected function setUp() - { - $this->app = m::mock(App::class)->makePartial(); - - Container::setInstance($this->app); - $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); - $this->config = m::mock(Config::class)->makePartial(); - $this->app->shouldReceive('get')->with('config')->andReturn($this->config); - - $this->event = new Event($this->app); - } - - public function testBasic() - { - $this->event->bind(['foo' => 'baz']); - - $this->event->listen('foo', function ($bar) { - $this->assertEquals('bar', $bar); - }); - - $this->assertTrue($this->event->hasListener('foo')); - - $this->event->trigger('baz', 'bar'); - - $this->event->remove('foo'); - - $this->assertFalse($this->event->hasListener('foo')); - } - - public function testOnceEvent() - { - $this->event->listen('AppInit', function ($bar) { - $this->assertEquals('bar', $bar); - return 'foo'; - }); - - $this->assertEquals('foo', $this->event->trigger('AppInit', 'bar', true)); - $this->assertEquals(['foo'], $this->event->trigger('AppInit', 'bar')); - } - - public function testClassListener() - { - $listener = m::mock("overload:SomeListener", TestListener::class); - - $listener->shouldReceive('handle')->andReturnTrue(); - - $this->event->listen('some', "SomeListener"); - - $this->assertTrue($this->event->until('some')); - } - - public function testSubscribe() - { - $listener = m::mock("overload:SomeListener", TestListener::class); - - $listener->shouldReceive('subscribe')->andReturnUsing(function (Event $event) use ($listener) { - - $listener->shouldReceive('onBar')->once()->andReturnFalse(); - - $event->listenEvents(['SomeListener::onBar' => [[$listener, 'onBar']]]); - }); - - $this->event->subscribe('SomeListener'); - - $this->assertTrue($this->event->hasListener('SomeListener::onBar')); - - $this->event->trigger('SomeListener::onBar'); - } - - public function testAutoObserve() - { - $listener = m::mock("overload:SomeListener", TestListener::class); - - $listener->shouldReceive('onBar')->once(); - - $this->app->shouldReceive('make')->with('SomeListener')->andReturn($listener); - - $this->event->observe('SomeListener'); - - $this->event->trigger('bar'); - } - -} - -class TestListener -{ - public function handle() - { - - } - - public function onBar() - { - - } - - public function onFoo() - { - - } - - public function subscribe() - { - - } -} diff --git a/vendor/topthink/framework/tests/HttpTest.php b/vendor/topthink/framework/tests/HttpTest.php deleted file mode 100644 index c3e0abd..0000000 --- a/vendor/topthink/framework/tests/HttpTest.php +++ /dev/null @@ -1,155 +0,0 @@ -<?php - -namespace think\tests; - -use Mockery as m; -use Mockery\MockInterface; -use org\bovigo\vfs\vfsStream; -use PHPUnit\Framework\TestCase; -use think\App; -use think\Console; -use think\Event; -use think\event\HttpEnd; -use think\Exception; -use think\exception\Handle; -use think\Http; -use think\Log; -use think\Request; -use think\Response; -use think\Route; - -class HttpTest extends TestCase -{ - /** @var App|MockInterface */ - protected $app; - - /** @var Http|MockInterface */ - protected $http; - - protected function tearDown(): void - { - m::close(); - } - - protected function setUp() - { - $this->app = m::mock(App::class)->makePartial(); - - $this->http = m::mock(Http::class, [$this->app])->shouldAllowMockingProtectedMethods()->makePartial(); - } - - protected function prepareApp($request, $response) - { - $this->app->shouldReceive('instance')->once()->with('request', $request); - $this->app->shouldReceive('initialized')->once()->andReturnFalse(); - $this->app->shouldReceive('initialize')->once(); - $this->app->shouldReceive('get')->with('request')->andReturn($request); - - $route = m::mock(Route::class); - - $route->shouldReceive('dispatch')->withArgs(function ($req, $withRoute) use ($request) { - if ($withRoute) { - $withRoute(); - } - return $req === $request; - })->andReturn($response); - - $route->shouldReceive('config')->with('route_annotation')->andReturn(true); - - $this->app->shouldReceive('get')->with('route')->andReturn($route); - - $console = m::mock(Console::class); - - $console->shouldReceive('call'); - - $this->app->shouldReceive('get')->with('console')->andReturn($console); - } - - public function testRun() - { - $root = vfsStream::setup('rootDir', null, [ - 'app' => [ - 'controller' => [], - 'middleware.php' => '<?php return [];', - ], - 'route' => [ - 'route.php' => '<?php return [];', - ], - ]); - - $this->app->shouldReceive('getBasePath')->andReturn($root->getChild('app')->url() . DIRECTORY_SEPARATOR); - $this->app->shouldReceive('getRootPath')->andReturn($root->url() . DIRECTORY_SEPARATOR); - - $request = m::mock(Request::class)->makePartial(); - $response = m::mock(Response::class)->makePartial(); - - $this->prepareApp($request, $response); - - $this->assertEquals($response, $this->http->run($request)); - } - - public function multiAppRunProvider() - { - $request1 = m::mock(Request::class)->makePartial(); - $request1->shouldReceive('subDomain')->andReturn('www'); - $request1->shouldReceive('host')->andReturn('www.domain.com'); - - $request2 = m::mock(Request::class)->makePartial(); - $request2->shouldReceive('subDomain')->andReturn('app2'); - $request2->shouldReceive('host')->andReturn('app2.domain.com'); - - $request3 = m::mock(Request::class)->makePartial(); - $request3->shouldReceive('pathinfo')->andReturn('some1/a/b/c'); - - $request4 = m::mock(Request::class)->makePartial(); - $request4->shouldReceive('pathinfo')->andReturn('app3/a/b/c'); - - $request5 = m::mock(Request::class)->makePartial(); - $request5->shouldReceive('pathinfo')->andReturn('some2/a/b/c'); - - return [ - [$request1, true, 'app1'], - [$request2, true, 'app2'], - [$request3, true, 'app3'], - [$request4, true, null], - [$request5, true, 'some2', 'path'], - [$request1, false, 'some3'], - ]; - } - - public function testRunWithException() - { - $request = m::mock(Request::class); - $response = m::mock(Response::class); - - $this->app->shouldReceive('instance')->once()->with('request', $request); - $this->app->shouldReceive('initialize')->once(); - - $exception = new Exception(); - - $this->http->shouldReceive('runWithRequest')->once()->with($request)->andThrow($exception); - - $handle = m::mock(Handle::class); - - $handle->shouldReceive('report')->once()->with($exception); - $handle->shouldReceive('render')->once()->with($request, $exception)->andReturn($response); - - $this->app->shouldReceive('make')->with(Handle::class)->andReturn($handle); - - $this->assertEquals($response, $this->http->run($request)); - } - - public function testEnd() - { - $response = m::mock(Response::class); - $event = m::mock(Event::class); - $event->shouldReceive('trigger')->once()->with(HttpEnd::class, $response); - $this->app->shouldReceive('get')->once()->with('event')->andReturn($event); - $log = m::mock(Log::class); - $log->shouldReceive('save')->once(); - $this->app->shouldReceive('get')->once()->with('log')->andReturn($log); - - $this->http->end($response); - } - -} diff --git a/vendor/topthink/framework/tests/InteractsWithApp.php b/vendor/topthink/framework/tests/InteractsWithApp.php deleted file mode 100644 index f4fcf73..0000000 --- a/vendor/topthink/framework/tests/InteractsWithApp.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - -namespace think\tests; - -use Mockery as m; -use Mockery\MockInterface; -use think\App; -use think\Config; -use think\Container; - -trait InteractsWithApp -{ - /** @var App|MockInterface */ - protected $app; - - /** @var Config|MockInterface */ - protected $config; - - protected function prepareApp() - { - $this->app = m::mock(App::class)->makePartial(); - Container::setInstance($this->app); - $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); - $this->app->shouldReceive('isDebug')->andReturnTrue(); - $this->config = m::mock(Config::class)->makePartial(); - $this->config->shouldReceive('get')->with('app.show_error_msg')->andReturnTrue(); - $this->app->shouldReceive('get')->with('config')->andReturn($this->config); - $this->app->shouldReceive('runningInConsole')->andReturn(false); - } -} diff --git a/vendor/topthink/framework/tests/LogTest.php b/vendor/topthink/framework/tests/LogTest.php deleted file mode 100644 index 981110f..0000000 --- a/vendor/topthink/framework/tests/LogTest.php +++ /dev/null @@ -1,130 +0,0 @@ -<?php - -namespace think\tests; - -use InvalidArgumentException; -use Mockery as m; -use Mockery\MockInterface; -use org\bovigo\vfs\vfsStream; -use PHPUnit\Framework\TestCase; -use think\Log; -use think\log\ChannelSet; - -class LogTest extends TestCase -{ - use InteractsWithApp; - - /** @var Log|MockInterface */ - protected $log; - - protected function tearDown(): void - { - m::close(); - } - - protected function setUp() - { - $this->prepareApp(); - - $this->log = new Log($this->app); - } - - public function testGetConfig() - { - $config = [ - 'default' => 'file', - ]; - - $this->config->shouldReceive('get')->with('log')->andReturn($config); - - $this->assertEquals($config, $this->log->getConfig()); - - $this->expectException(InvalidArgumentException::class); - $this->log->getChannelConfig('foo'); - } - - public function testChannel() - { - $this->assertInstanceOf(ChannelSet::class, $this->log->channel(['file', 'mail'])); - } - - public function testLogManagerInstances() - { - $this->config->shouldReceive('get')->with("log.channels.single", null)->andReturn(['type' => 'file']); - - $channel1 = $this->log->channel('single'); - $channel2 = $this->log->channel('single'); - - $this->assertSame($channel1, $channel2); - } - - public function testFileLog() - { - $root = vfsStream::setup(); - - $this->config->shouldReceive('get')->with("log.default", null)->andReturn('file'); - - $this->config->shouldReceive('get')->with("log.channels.file", null)->andReturn(['type' => 'file', 'path' => $root->url()]); - - $this->log->info('foo'); - - $this->assertEquals($this->log->getLog(), ['info' => ['foo']]); - - $this->log->clear(); - - $this->assertEmpty($this->log->getLog()); - - $this->log->error('foo'); - $this->assertArrayHasKey('error', $this->log->getLog()); - - $this->log->emergency('foo'); - $this->assertArrayHasKey('emergency', $this->log->getLog()); - - $this->log->alert('foo'); - $this->assertArrayHasKey('alert', $this->log->getLog()); - - $this->log->critical('foo'); - $this->assertArrayHasKey('critical', $this->log->getLog()); - - $this->log->warning('foo'); - $this->assertArrayHasKey('warning', $this->log->getLog()); - - $this->log->notice('foo'); - $this->assertArrayHasKey('notice', $this->log->getLog()); - - $this->log->debug('foo'); - $this->assertArrayHasKey('debug', $this->log->getLog()); - - $this->log->sql('foo'); - $this->assertArrayHasKey('sql', $this->log->getLog()); - - $this->log->custom('foo'); - $this->assertArrayHasKey('custom', $this->log->getLog()); - - $this->log->write('foo'); - $this->assertTrue($root->hasChildren()); - $this->assertEmpty($this->log->getLog()); - - $this->log->close(); - - $this->log->info('foo'); - - $this->assertEmpty($this->log->getLog()); - } - - public function testSave() - { - $root = vfsStream::setup(); - - $this->config->shouldReceive('get')->with("log.default", null)->andReturn('file'); - - $this->config->shouldReceive('get')->with("log.channels.file", null)->andReturn(['type' => 'file', 'path' => $root->url()]); - - $this->log->info('foo'); - - $this->log->save(); - - $this->assertTrue($root->hasChildren()); - } - -} diff --git a/vendor/topthink/framework/tests/MiddlewareTest.php b/vendor/topthink/framework/tests/MiddlewareTest.php deleted file mode 100644 index aa53059..0000000 --- a/vendor/topthink/framework/tests/MiddlewareTest.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php - -namespace think\tests; - -use Mockery as m; -use Mockery\MockInterface; -use PHPUnit\Framework\TestCase; -use think\Exception; -use think\exception\Handle; -use think\Middleware; -use think\Pipeline; -use think\Request; -use think\Response; - -class MiddlewareTest extends TestCase -{ - use InteractsWithApp; - - /** @var Middleware|MockInterface */ - protected $middleware; - - protected function tearDown(): void - { - m::close(); - } - - protected function setUp() - { - $this->prepareApp(); - - $this->middleware = new Middleware($this->app); - } - - public function testSetMiddleware() - { - $this->middleware->add('BarMiddleware', 'bar'); - - $this->assertEquals(1, count($this->middleware->all('bar'))); - - $this->middleware->controller('BarMiddleware'); - $this->assertEquals(1, count($this->middleware->all('controller'))); - - $this->middleware->import(['FooMiddleware']); - $this->assertEquals(1, count($this->middleware->all())); - - $this->middleware->unshift(['BazMiddleware', 'baz']); - $this->assertEquals(2, count($this->middleware->all())); - $this->assertEquals([['BazMiddleware', 'handle'], 'baz'], $this->middleware->all()[0]); - - $this->config->shouldReceive('get')->with('middleware.alias', [])->andReturn(['foo' => ['FooMiddleware', 'FarMiddleware']]); - - $this->middleware->add('foo'); - $this->assertEquals(3, count($this->middleware->all())); - $this->middleware->add(function () { - }); - $this->middleware->add(function () { - }); - $this->assertEquals(5, count($this->middleware->all())); - } - - public function testPipelineAndEnd() - { - $bar = m::mock("overload:BarMiddleware"); - $foo = m::mock("overload:FooMiddleware", Foo::class); - - $request = m::mock(Request::class); - $response = m::mock(Response::class); - - $e = new Exception(); - - $handle = m::mock(Handle::class); - $handle->shouldReceive('report')->with($e)->andReturnNull(); - $handle->shouldReceive('render')->with($request, $e)->andReturn($response); - - $foo->shouldReceive('handle')->once()->andReturnUsing(function ($request, $next) { - return $next($request); - }); - $bar->shouldReceive('handle')->once()->andReturnUsing(function ($request, $next) use ($e) { - $next($request); - throw $e; - }); - - $foo->shouldReceive('end')->once()->with($response)->andReturnNull(); - - $this->app->shouldReceive('make')->with(Handle::class)->andReturn($handle); - - $this->config->shouldReceive('get')->once()->with('middleware.priority', [])->andReturn(['FooMiddleware', 'BarMiddleware']); - - $this->middleware->import([function ($request, $next) { - return $next($request); - }, 'BarMiddleware', 'FooMiddleware']); - - $this->assertInstanceOf(Pipeline::class, $pipeline = $this->middleware->pipeline()); - - $pipeline->send($request)->then(function ($request) use ($e, $response) { - throw $e; - }); - - $this->middleware->end($response); - } -} - -class Foo -{ - public function end(Response $response) - { - } -} diff --git a/vendor/topthink/framework/tests/RouteTest.php b/vendor/topthink/framework/tests/RouteTest.php deleted file mode 100644 index 6a7f8ee..0000000 --- a/vendor/topthink/framework/tests/RouteTest.php +++ /dev/null @@ -1,291 +0,0 @@ -<?php - -namespace think\tests; - -use Closure; -use Mockery as m; -use Mockery\MockInterface; -use PHPUnit\Framework\TestCase; -use think\helper\Str; -use think\Request; -use think\response\Redirect; -use think\response\View; -use think\Route; - -class RouteTest extends TestCase -{ - use InteractsWithApp; - - /** @var Route|MockInterface */ - protected $route; - - protected function tearDown(): void - { - m::close(); - } - - protected function setUp() - { - $this->prepareApp(); - $this->route = new Route($this->app); - } - - /** - * @param $path - * @param string $method - * @param string $host - * @return m\Mock|Request - */ - protected function makeRequest($path, $method = 'GET', $host = 'localhost') - { - $request = m::mock(Request::class)->makePartial(); - $request->shouldReceive('host')->andReturn($host); - $request->shouldReceive('pathinfo')->andReturn($path); - $request->shouldReceive('url')->andReturn('/' . $path); - $request->shouldReceive('method')->andReturn(strtoupper($method)); - return $request; - } - - public function testSimpleRequest() - { - $this->route->get('foo', function () { - return 'get-foo'; - }); - - $this->route->put('foo', function () { - return 'put-foo'; - }); - - $this->route->group(function () { - $this->route->post('foo', function () { - return 'post-foo'; - }); - }); - - $request = $this->makeRequest('foo', 'post'); - $response = $this->route->dispatch($request); - $this->assertEquals(200, $response->getCode()); - $this->assertEquals('post-foo', $response->getContent()); - - $request = $this->makeRequest('foo', 'get'); - $response = $this->route->dispatch($request); - $this->assertEquals(200, $response->getCode()); - $this->assertEquals('get-foo', $response->getContent()); - } - - public function testOptionsRequest() - { - $this->route->get('foo', function () { - return 'get-foo'; - }); - - $this->route->put('foo', function () { - return 'put-foo'; - }); - - $this->route->group(function () { - $this->route->post('foo', function () { - return 'post-foo'; - }); - }); - $this->route->group('abc', function () { - $this->route->post('foo/:id', function () { - return 'post-abc-foo'; - }); - }); - - $this->route->post('foo/:id', function () { - return 'post-abc-foo'; - }); - - $this->route->resource('bar', 'SomeClass'); - - $request = $this->makeRequest('foo', 'options'); - $response = $this->route->dispatch($request); - $this->assertEquals(204, $response->getCode()); - $this->assertEquals('GET, PUT, POST', $response->getHeader('Allow')); - - $request = $this->makeRequest('bar', 'options'); - $response = $this->route->dispatch($request); - $this->assertEquals(204, $response->getCode()); - $this->assertEquals('GET, POST', $response->getHeader('Allow')); - - $request = $this->makeRequest('bar/1', 'options'); - $response = $this->route->dispatch($request); - $this->assertEquals(204, $response->getCode()); - $this->assertEquals('GET, PUT, DELETE', $response->getHeader('Allow')); - - $request = $this->makeRequest('xxxx', 'options'); - $response = $this->route->dispatch($request); - $this->assertEquals(204, $response->getCode()); - $this->assertEquals('GET, POST, PUT, DELETE', $response->getHeader('Allow')); - } - - public function testAllowCrossDomain() - { - $this->route->get('foo', function () { - return 'get-foo'; - })->allowCrossDomain(['some' => 'bar']); - - $request = $this->makeRequest('foo', 'get'); - $response = $this->route->dispatch($request); - - $this->assertEquals('bar', $response->getHeader('some')); - $this->assertArrayHasKey('Access-Control-Allow-Credentials', $response->getHeader()); - - $request = $this->makeRequest('foo2', 'options'); - $response = $this->route->dispatch($request); - - $this->assertEquals(204, $response->getCode()); - $this->assertArrayHasKey('Access-Control-Allow-Credentials', $response->getHeader()); - $this->assertEquals('GET, POST, PUT, DELETE', $response->getHeader('Allow')); - } - - public function testControllerDispatch() - { - $this->route->get('foo', 'foo/bar'); - - $controller = m::Mock(\stdClass::class); - - $this->app->shouldReceive('parseClass')->with('controller', 'Foo')->andReturn($controller->mockery_getName()); - $this->app->shouldReceive('make')->with($controller->mockery_getName(), [], true)->andReturn($controller); - - $controller->shouldReceive('bar')->andReturn('bar'); - - $request = $this->makeRequest('foo'); - $response = $this->route->dispatch($request); - $this->assertEquals('bar', $response->getContent()); - } - - public function testEmptyControllerDispatch() - { - $this->route->get('foo', 'foo/bar'); - - $controller = m::Mock(\stdClass::class); - - $this->app->shouldReceive('parseClass')->with('controller', 'Error')->andReturn($controller->mockery_getName()); - $this->app->shouldReceive('make')->with($controller->mockery_getName(), [], true)->andReturn($controller); - - $controller->shouldReceive('bar')->andReturn('bar'); - - $request = $this->makeRequest('foo'); - $response = $this->route->dispatch($request); - $this->assertEquals('bar', $response->getContent()); - } - - protected function createMiddleware($times = 1) - { - $middleware = m::mock(Str::random(5)); - $middleware->shouldReceive('handle')->times($times)->andReturnUsing(function ($request, Closure $next) { - return $next($request); - }); - $this->app->shouldReceive('make')->with($middleware->mockery_getName())->andReturn($middleware); - - return $middleware; - } - - public function testControllerWithMiddleware() - { - $this->route->get('foo', 'foo/bar'); - - $controller = m::mock(FooClass::class); - - $controller->middleware = [ - $this->createMiddleware()->mockery_getName() . ":params1:params2", - $this->createMiddleware(0)->mockery_getName() => ['except' => 'bar'], - $this->createMiddleware()->mockery_getName() => ['only' => 'bar'], - [ - 'middleware' => [$this->createMiddleware()->mockery_getName(), [new \stdClass()]], - 'options' => ['only' => 'bar'], - ], - ]; - - $this->app->shouldReceive('parseClass')->with('controller', 'Foo')->andReturn($controller->mockery_getName()); - $this->app->shouldReceive('make')->with($controller->mockery_getName(), [], true)->andReturn($controller); - - $controller->shouldReceive('bar')->once()->andReturn('bar'); - - $request = $this->makeRequest('foo'); - $response = $this->route->dispatch($request); - $this->assertEquals('bar', $response->getContent()); - } - - public function testUrlDispatch() - { - $controller = m::mock(FooClass::class); - $controller->shouldReceive('index')->andReturn('bar'); - - $this->app->shouldReceive('parseClass')->once()->with('controller', 'Foo') - ->andReturn($controller->mockery_getName()); - $this->app->shouldReceive('make')->with($controller->mockery_getName(), [], true)->andReturn($controller); - - $request = $this->makeRequest('foo'); - $response = $this->route->dispatch($request); - $this->assertEquals('bar', $response->getContent()); - } - - public function testRedirectDispatch() - { - $this->route->redirect('foo', 'http://localhost', 302); - - $request = $this->makeRequest('foo'); - $this->app->shouldReceive('make')->with(Request::class)->andReturn($request); - $response = $this->route->dispatch($request); - - $this->assertInstanceOf(Redirect::class, $response); - $this->assertEquals(302, $response->getCode()); - $this->assertEquals('http://localhost', $response->getData()); - } - - public function testViewDispatch() - { - $this->route->view('foo', 'index/hello', ['city' => 'shanghai']); - - $request = $this->makeRequest('foo'); - $response = $this->route->dispatch($request); - - $this->assertInstanceOf(View::class, $response); - $this->assertEquals(['city' => 'shanghai'], $response->getVars()); - $this->assertEquals('index/hello', $response->getData()); - } - - public function testResponseDispatch() - { - $this->route->get('hello/:name', response() - ->data('Hello,ThinkPHP') - ->code(200) - ->contentType('text/plain')); - - $request = $this->makeRequest('hello/some'); - $response = $this->route->dispatch($request); - - $this->assertEquals('Hello,ThinkPHP', $response->getContent()); - $this->assertEquals(200, $response->getCode()); - } - - public function testDomainBindResponse() - { - $this->route->domain('test', function () { - $this->route->get('/', function () { - return 'Hello,ThinkPHP'; - }); - }); - - $request = $this->makeRequest('', 'get', 'test.domain.com'); - $response = $this->route->dispatch($request); - - $this->assertEquals('Hello,ThinkPHP', $response->getContent()); - $this->assertEquals(200, $response->getCode()); - } - -} - -class FooClass -{ - public $middleware = []; - - public function bar() - { - - } -} diff --git a/vendor/topthink/framework/tests/SessionTest.php b/vendor/topthink/framework/tests/SessionTest.php deleted file mode 100644 index b3b48a7..0000000 --- a/vendor/topthink/framework/tests/SessionTest.php +++ /dev/null @@ -1,225 +0,0 @@ -<?php - -namespace think\tests; - -use Mockery as m; -use Mockery\MockInterface; -use org\bovigo\vfs\vfsStream; -use PHPUnit\Framework\TestCase; -use think\App; -use think\cache\Driver; -use think\Config; -use think\Container; -use think\contract\SessionHandlerInterface; -use think\helper\Str; -use think\Session; -use think\session\driver\Cache; -use think\session\driver\File; - -class SessionTest extends TestCase -{ - /** @var App|MockInterface */ - protected $app; - - /** @var Session|MockInterface */ - protected $session; - - /** @var Config|MockInterface */ - protected $config; - - protected $handler; - - protected function tearDown(): void - { - m::close(); - } - - protected function setUp() - { - $this->app = m::mock(App::class)->makePartial(); - Container::setInstance($this->app); - - $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); - $this->config = m::mock(Config::class)->makePartial(); - - $this->app->shouldReceive('get')->with('config')->andReturn($this->config); - $handlerClass = "\\think\\session\\driver\\Test" . Str::random(10); - $this->config->shouldReceive("get")->with("session.type", "file")->andReturn($handlerClass); - $this->session = new Session($this->app); - - $this->handler = m::mock('overload:' . $handlerClass, SessionHandlerInterface::class); - } - - public function testLoadData() - { - $data = [ - "bar" => 'foo', - ]; - - $id = md5(uniqid()); - - $this->handler->shouldReceive("read")->once()->with($id)->andReturn(serialize($data)); - - $this->session->setId($id); - $this->session->init(); - - $this->assertEquals('foo', $this->session->get('bar')); - $this->assertTrue($this->session->has('bar')); - $this->assertFalse($this->session->has('foo')); - - $this->session->set('foo', 'bar'); - $this->assertTrue($this->session->has('foo')); - - $this->assertEquals('bar', $this->session->pull('foo')); - $this->assertFalse($this->session->has('foo')); - } - - public function testSave() - { - - $id = md5(uniqid()); - - $this->handler->shouldReceive('read')->once()->with($id)->andReturn(""); - - $this->handler->shouldReceive('write')->once()->with($id, serialize([ - "bar" => 'foo', - ]))->andReturnTrue(); - - $this->session->setId($id); - $this->session->init(); - - $this->session->set('bar', 'foo'); - - $this->session->save(); - } - - public function testFlash() - { - $this->session->flash('foo', 'bar'); - $this->session->flash('bar', 0); - $this->session->flash('baz', true); - - $this->assertTrue($this->session->has('foo')); - $this->assertEquals('bar', $this->session->get('foo')); - $this->assertEquals(0, $this->session->get('bar')); - $this->assertTrue($this->session->get('baz')); - - $this->session->clearFlashData(); - - $this->assertTrue($this->session->has('foo')); - $this->assertEquals('bar', $this->session->get('foo')); - $this->assertEquals(0, $this->session->get('bar')); - - $this->session->clearFlashData(); - - $this->assertFalse($this->session->has('foo')); - $this->assertNull($this->session->get('foo')); - - $this->session->flash('foo', 'bar'); - $this->assertTrue($this->session->has('foo')); - $this->session->clearFlashData(); - $this->session->reflash(); - $this->session->clearFlashData(); - - $this->assertTrue($this->session->has('foo')); - } - - public function testClear() - { - $this->session->set('bar', 'foo'); - $this->assertEquals('foo', $this->session->get('bar')); - $this->session->clear(); - $this->assertFalse($this->session->has('foo')); - } - - public function testSetName() - { - $this->session->setName('foo'); - $this->assertEquals('foo', $this->session->getName()); - } - - public function testDestroy() - { - $id = md5(uniqid()); - - $this->handler->shouldReceive('read')->once()->with($id)->andReturn(""); - $this->handler->shouldReceive('delete')->once()->with($id)->andReturnTrue(); - - $this->session->setId($id); - $this->session->init(); - - $this->session->set('bar', 'foo'); - - $this->session->destroy(); - - $this->assertFalse($this->session->has('bar')); - - $this->assertNotEquals($id, $this->session->getId()); - } - - public function testFileHandler() - { - $root = vfsStream::setup(); - - vfsStream::newFile('bar') - ->at($root) - ->lastModified(time()); - - vfsStream::newFile('bar') - ->at(vfsStream::newDirectory("foo")->at($root)) - ->lastModified(100); - - $this->assertTrue($root->hasChild("bar")); - $this->assertTrue($root->hasChild("foo/bar")); - - $handler = new TestFileHandle($this->app, [ - 'path' => $root->url(), - 'gc_probability' => 1, - 'gc_divisor' => 1, - ]); - - $this->assertTrue($root->hasChild("bar")); - $this->assertFalse($root->hasChild("foo/bar")); - - $id = md5(uniqid()); - $handler->write($id, "bar"); - - $this->assertTrue($root->hasChild("sess_{$id}")); - - $this->assertEquals("bar", $handler->read($id)); - - $handler->delete($id); - - $this->assertFalse($root->hasChild("sess_{$id}")); - } - - public function testCacheHandler() - { - $id = md5(uniqid()); - - $cache = m::mock(\think\Cache::class); - - $store = m::mock(Driver::class); - - $cache->shouldReceive('store')->once()->with('redis')->andReturn($store); - - $handler = new Cache($cache, ['store' => 'redis']); - - $store->shouldReceive("set")->with($id, "bar", 1440)->once()->andReturnTrue(); - $handler->write($id, "bar"); - - $store->shouldReceive("get")->with($id)->once()->andReturn("bar"); - $this->assertEquals("bar", $handler->read($id)); - - $store->shouldReceive("delete")->with($id)->once()->andReturnTrue(); - $handler->delete($id); - } -} - -class TestFileHandle extends File -{ - protected function writeFile($path, $content): bool - { - return (bool) file_put_contents($path, $content); - } -} diff --git a/vendor/topthink/framework/tests/ViewTest.php b/vendor/topthink/framework/tests/ViewTest.php deleted file mode 100644 index e413510..0000000 --- a/vendor/topthink/framework/tests/ViewTest.php +++ /dev/null @@ -1,127 +0,0 @@ -<?php - -namespace think\tests; - -use Mockery\MockInterface; -use PHPUnit\Framework\TestCase; -use think\App; -use think\Config; -use think\Container; -use think\contract\TemplateHandlerInterface; -use think\View; -use Mockery as m; - -class ViewTest extends TestCase -{ - /** @var App|MockInterface */ - protected $app; - - /** @var View|MockInterface */ - protected $view; - - /** @var Config|MockInterface */ - protected $config; - - protected function tearDown(): void - { - m::close(); - } - - protected function setUp() - { - $this->app = m::mock(App::class)->makePartial(); - Container::setInstance($this->app); - - $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); - $this->config = m::mock(Config::class)->makePartial(); - $this->app->shouldReceive('get')->with('config')->andReturn($this->config); - - $this->view = new View($this->app); - } - - public function testAssignData() - { - $this->view->assign('foo', 'bar'); - $this->view->assign(['baz' => 'boom']); - $this->view->qux = "corge"; - - $this->assertEquals('bar', $this->view->foo); - $this->assertEquals('boom', $this->view->baz); - $this->assertEquals('corge', $this->view->qux); - $this->assertTrue(isset($this->view->qux)); - } - - public function testRender() - { - $this->config->shouldReceive("get")->with("view.type", 'php')->andReturn(TestTemplate::class); - - $this->view->filter(function ($content) { - return $content; - }); - - $this->assertEquals("fetch", $this->view->fetch('foo')); - $this->assertEquals("display", $this->view->display('foo')); - } - -} - -class TestTemplate implements TemplateHandlerInterface -{ - - /** - * 检测是否存在模板文件 - * @access public - * @param string $template 模板文件或者模板规则 - * @return bool - */ - public function exists(string $template): bool - { - return true; - } - - /** - * 渲染模板文件 - * @access public - * @param string $template 模板文件 - * @param array $data 模板变量 - * @return void - */ - public function fetch(string $template, array $data = []): void - { - echo "fetch"; - } - - /** - * 渲染模板内容 - * @access public - * @param string $content 模板内容 - * @param array $data 模板变量 - * @return void - */ - public function display(string $content, array $data = []): void - { - echo "display"; - } - - /** - * 配置模板引擎 - * @access private - * @param array $config 参数 - * @return void - */ - public function config(array $config): void - { - // TODO: Implement config() method. - } - - /** - * 获取模板引擎配置 - * @access public - * @param string $name 参数名 - * @return void - */ - public function getConfig(string $name) - { - // TODO: Implement getConfig() method. - } -} diff --git a/vendor/topthink/framework/tests/bootstrap.php b/vendor/topthink/framework/tests/bootstrap.php deleted file mode 100644 index 3459061..0000000 --- a/vendor/topthink/framework/tests/bootstrap.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -include __DIR__.'/../src/helper.php'; diff --git a/vendor/topthink/think-factory/.gitignore b/vendor/topthink/think-factory/.gitignore deleted file mode 100644 index 1ff7691..0000000 --- a/vendor/topthink/think-factory/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Created by .ignore support plugin (hsz.mobi) -vendor -composer.lock -.idea \ No newline at end of file diff --git a/vendor/topthink/think-factory/LICENSE b/vendor/topthink/think-factory/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/vendor/topthink/think-factory/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/topthink/think-factory/composer.json b/vendor/topthink/think-factory/composer.json deleted file mode 100644 index a764082..0000000 --- a/vendor/topthink/think-factory/composer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "topthink/think-factory", - "type": "library", - "license": "Apache-2.0", - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "require": { - "topthink/think-helper": "^3.0.0", - "topthink/framework": "^6.0.0" - }, - "autoload": { - "psr-4": { - "think\\": "src" - } - }, - "minimum-stability": "dev", - "prefer-stable": true -} diff --git a/vendor/topthink/think-factory/src/Factory.php b/vendor/topthink/think-factory/src/Factory.php deleted file mode 100644 index 18d0a10..0000000 --- a/vendor/topthink/think-factory/src/Factory.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use InvalidArgumentException; -use think\helper\Str; - -abstract class Factory -{ - protected $app; - - /** - * 驱动 - * @var array - */ - protected $drivers = []; - - /** - * 驱动的命名空间 - * @var string - */ - protected $namespace = ""; - - public function __construct(App $app) - { - $this->app = $app; - } - - /** - * 获取驱动实例 - * @param null $driver - * @return mixed - */ - public function driver($driver = null) - { - $driver = $driver ?: $this->getDefaultDriver(); - - if (is_null($driver)) { - throw new InvalidArgumentException(sprintf( - 'Unable to resolve NULL driver for [%s].', static::class - )); - } - - if (!isset($this->drivers[$driver])) { - $this->drivers[$driver] = $this->createDriver($driver); - } - - return $this->drivers[$driver]; - } - - /** - * 获取驱动类 - * @param $driver - * @return string - */ - protected function resolveClass($driver) - { - if ($this->namespace || false !== strpos($driver, '\\')) { - $class = false !== strpos($driver, '\\') ? $driver : $this->namespace . Str::studly($driver); - - if (class_exists($class)) { - return $class; - } - } - - throw new InvalidArgumentException("Driver [$driver] not supported."); - } - - /** - * 创建驱动 - * - * @param string $driver - * @return mixed - * - */ - protected function createDriver($driver) - { - $method = 'create' . Str::studly($driver) . 'Driver'; - - if (method_exists($this, $method)) { - return $this->$method(); - } - - $class = $this->resolveClass($driver); - - return $this->app->make($class); - } - - /** - * 默认驱动 - * @return string - */ - abstract public function getDefaultDriver(); - - /** - * 动态调用 - * @param string $method - * @param array $parameters - * @return mixed - */ - public function __call($method, $parameters) - { - return $this->driver()->$method(...$parameters); - } -} diff --git a/vendor/topthink/think-filesystem/.gitignore b/vendor/topthink/think-filesystem/.gitignore deleted file mode 100644 index 25ad74d..0000000 --- a/vendor/topthink/think-filesystem/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -composer.lock -/.idea -/vendor diff --git a/vendor/topthink/think-filesystem/README.md b/vendor/topthink/think-filesystem/README.md deleted file mode 100644 index 90977dd..0000000 --- a/vendor/topthink/think-filesystem/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# think-filesystem for ThinkPHP6.1 - -## 安装 - -> composer require topthink/think-filesystem diff --git a/vendor/topthink/think-filesystem/composer.json b/vendor/topthink/think-filesystem/composer.json deleted file mode 100644 index 040f4a3..0000000 --- a/vendor/topthink/think-filesystem/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "topthink/think-filesystem", - "description": "The ThinkPHP6.1 Filesystem Package", - "type": "library", - "license": "Apache-2.0", - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "autoload": { - "psr-4": { - "think\\": "src" - } - }, - "autoload-dev": { - "psr-4": { - "think\\tests\\": "tests/" - } - }, - "require": { - "php": ">=7.2.5", - "topthink/framework": "^6.1", - "league/flysystem": "^1.1.4", - "league/flysystem-cached-adapter": "^1.0" - }, - "require-dev": { - "mikey179/vfsstream": "^1.6", - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^8.0" - }, - "minimum-stability": "dev", - "prefer-stable": true -} diff --git a/vendor/topthink/think-filesystem/phpunit.xml.dist b/vendor/topthink/think-filesystem/phpunit.xml.dist deleted file mode 100644 index e20a133..0000000 --- a/vendor/topthink/think-filesystem/phpunit.xml.dist +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<phpunit backupGlobals="false" - backupStaticAttributes="false" - beStrictAboutTestsThatDoNotTestAnything="false" - bootstrap="tests/bootstrap.php" - colors="true" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - processIsolation="false" - stopOnError="false" - stopOnFailure="false" - verbose="true" -> - <testsuites> - <testsuite name="ThinkPHP Test Suite"> - <directory suffix="Test.php">./tests</directory> - </testsuite> - </testsuites> - <filter> - <whitelist processUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">./src/think</directory> - </whitelist> - </filter> -</phpunit> diff --git a/vendor/topthink/think-filesystem/src/Filesystem.php b/vendor/topthink/think-filesystem/src/Filesystem.php deleted file mode 100644 index 0aee929..0000000 --- a/vendor/topthink/think-filesystem/src/Filesystem.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use InvalidArgumentException; -use think\filesystem\Driver; -use think\filesystem\driver\Local; -use think\helper\Arr; - -/** - * Class Filesystem - * @package think - * @mixin Driver - * @mixin Local - */ -class Filesystem extends Manager -{ - protected $namespace = '\\think\\filesystem\\driver\\'; - - /** - * @param null|string $name - * @return Driver - */ - public function disk(string $name = null): Driver - { - return $this->driver($name); - } - - protected function resolveType(string $name) - { - return $this->getDiskConfig($name, 'type', 'local'); - } - - protected function resolveConfig(string $name) - { - return $this->getDiskConfig($name); - } - - /** - * 获取缓存配置 - * @access public - * @param null|string $name 名称 - * @param mixed $default 默认值 - * @return mixed - */ - public function getConfig(string $name = null, $default = null) - { - if (!is_null($name)) { - return $this->app->config->get('filesystem.' . $name, $default); - } - - return $this->app->config->get('filesystem'); - } - - /** - * 获取磁盘配置 - * @param string $disk - * @param null $name - * @param null $default - * @return array - */ - public function getDiskConfig($disk, $name = null, $default = null) - { - if ($config = $this->getConfig("disks.{$disk}")) { - return Arr::get($config, $name, $default); - } - - throw new InvalidArgumentException("Disk [$disk] not found."); - } - - /** - * 默认驱动 - * @return string|null - */ - public function getDefaultDriver() - { - return $this->getConfig('default'); - } -} diff --git a/vendor/topthink/think-filesystem/src/facade/Filesystem.php b/vendor/topthink/think-filesystem/src/facade/Filesystem.php deleted file mode 100644 index 0e32c2c..0000000 --- a/vendor/topthink/think-filesystem/src/facade/Filesystem.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\facade; - -use think\Facade; -use think\filesystem\Driver; - -/** - * Class Filesystem - * @package think\facade - * @mixin \think\Filesystem - * @method static Driver disk(string $name = null) , null|string - * @method static mixed getConfig(null|string $name = null, mixed $default = null) 获取缓存配置 - * @method static array getDiskConfig(string $disk, null $name = null, null $default = null) 获取磁盘配置 - * @method static string|null getDefaultDriver() 默认驱动 - */ -class Filesystem extends Facade -{ - protected static function getFacadeClass() - { - return \think\Filesystem::class; - } -} diff --git a/vendor/topthink/think-filesystem/src/filesystem/CacheStore.php b/vendor/topthink/think-filesystem/src/filesystem/CacheStore.php deleted file mode 100644 index 0a62399..0000000 --- a/vendor/topthink/think-filesystem/src/filesystem/CacheStore.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\filesystem; - -use League\Flysystem\Cached\Storage\AbstractCache; -use Psr\SimpleCache\CacheInterface; - -class CacheStore extends AbstractCache -{ - protected $store; - - protected $key; - - protected $expire; - - public function __construct(CacheInterface $store, $key = 'flysystem', $expire = null) - { - $this->key = $key; - $this->store = $store; - $this->expire = $expire; - } - - /** - * Store the cache. - */ - public function save() - { - $contents = $this->getForStorage(); - - $this->store->set($this->key, $contents, $this->expire); - } - - /** - * Load the cache. - */ - public function load() - { - $contents = $this->store->get($this->key); - - if (!is_null($contents)) { - $this->setFromStorage($contents); - } - } -} diff --git a/vendor/topthink/think-filesystem/src/filesystem/Driver.php b/vendor/topthink/think-filesystem/src/filesystem/Driver.php deleted file mode 100644 index 0e61cf4..0000000 --- a/vendor/topthink/think-filesystem/src/filesystem/Driver.php +++ /dev/null @@ -1,144 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\filesystem; - -use League\Flysystem\AdapterInterface; -use League\Flysystem\Adapter\AbstractAdapter; -use League\Flysystem\Cached\CachedAdapter; -use League\Flysystem\Cached\Storage\Memory as MemoryStore; -use League\Flysystem\Filesystem; -use RuntimeException; -use think\Cache; -use think\File; - -/** - * Class Driver - * @package think\filesystem - * @mixin Filesystem - */ -abstract class Driver -{ - - /** @var Cache */ - protected $cache; - - /** @var Filesystem */ - protected $filesystem; - - /** - * 配置参数 - * @var array - */ - protected $config = []; - - public function __construct(Cache $cache, array $config) - { - $this->cache = $cache; - $this->config = array_merge($this->config, $config); - - $adapter = $this->createAdapter(); - $this->filesystem = $this->createFilesystem($adapter); - } - - protected function createCacheStore($config) - { - if (true === $config) { - return new MemoryStore; - } - - return new CacheStore( - $this->cache->store($config['store']), - $config['prefix'] ?? 'flysystem', - $config['expire'] ?? null - ); - } - - abstract protected function createAdapter(): AdapterInterface; - - protected function createFilesystem(AdapterInterface $adapter): Filesystem - { - if (!empty($this->config['cache'])) { - $adapter = new CachedAdapter($adapter, $this->createCacheStore($this->config['cache'])); - } - - $config = array_intersect_key($this->config, array_flip(['visibility', 'disable_asserts', 'url'])); - - return new Filesystem($adapter, count($config) > 0 ? $config : null); - } - - /** - * 获取文件完整路径 - * @param string $path - * @return string - */ - public function path(string $path): string - { - $adapter = $this->filesystem->getAdapter(); - - if ($adapter instanceof AbstractAdapter) { - return $adapter->applyPathPrefix($path); - } - - return $path; - } - - protected function concatPathToUrl($url, $path) - { - return rtrim($url, '/') . '/' . ltrim($path, '/'); - } - - public function url(string $path): string - { - throw new RuntimeException('This driver does not support retrieving URLs.'); - } - - /** - * 保存文件 - * @param string $path 路径 - * @param File $file 文件 - * @param null|string|\Closure $rule 文件名规则 - * @param array $options 参数 - * @return bool|string - */ - public function putFile(string $path, File $file, $rule = null, array $options = []) - { - return $this->putFileAs($path, $file, $file->hashName($rule), $options); - } - - /** - * 指定文件名保存文件 - * @param string $path 路径 - * @param File $file 文件 - * @param string $name 文件名 - * @param array $options 参数 - * @return bool|string - */ - public function putFileAs(string $path, File $file, string $name, array $options = []) - { - $stream = fopen($file->getRealPath(), 'r'); - $path = trim($path . '/' . $name, '/'); - - $result = $this->putStream($path, $stream, $options); - - if (is_resource($stream)) { - fclose($stream); - } - - return $result ? $path : false; - } - - public function __call($method, $parameters) - { - return $this->filesystem->$method(...$parameters); - } -} diff --git a/vendor/topthink/think-filesystem/src/filesystem/driver/Local.php b/vendor/topthink/think-filesystem/src/filesystem/driver/Local.php deleted file mode 100644 index 5749335..0000000 --- a/vendor/topthink/think-filesystem/src/filesystem/driver/Local.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\filesystem\driver; - -use League\Flysystem\AdapterInterface; -use League\Flysystem\Adapter\Local as LocalAdapter; -use think\filesystem\Driver; - -class Local extends Driver -{ - /** - * 配置参数 - * @var array - */ - protected $config = [ - 'root' => '', - ]; - - protected function createAdapter(): AdapterInterface - { - $permissions = $this->config['permissions'] ?? []; - - $links = ($this->config['links'] ?? null) === 'skip' - ? LocalAdapter::SKIP_LINKS - : LocalAdapter::DISALLOW_LINKS; - - return new LocalAdapter( - $this->config['root'], - LOCK_EX, - $links, - $permissions - ); - } - - /** - * 获取文件访问地址 - * @param string $path 文件路径 - * @return string - */ - public function url(string $path): string - { - $path = str_replace('\\', '/', $path); - - if (isset($this->config['url'])) { - return $this->concatPathToUrl($this->config['url'], $path); - } - return parent::url($path); - } -} diff --git a/vendor/topthink/think-filesystem/tests/FilesystemTest.php b/vendor/topthink/think-filesystem/tests/FilesystemTest.php deleted file mode 100644 index a589771..0000000 --- a/vendor/topthink/think-filesystem/tests/FilesystemTest.php +++ /dev/null @@ -1,131 +0,0 @@ -<?php - -namespace think\tests; - -use League\Flysystem\Adapter\NullAdapter; -use League\Flysystem\AdapterInterface; -use Mockery as m; -use Mockery\MockInterface; -use org\bovigo\vfs\vfsStream; -use org\bovigo\vfs\vfsStreamDirectory; -use PHPUnit\Framework\TestCase; -use think\App; -use think\Cache; -use think\cache\driver\File; -use think\Config; -use think\Container; -use think\Filesystem; -use think\filesystem\Driver; -use think\filesystem\driver\Local; - -class FilesystemTest extends TestCase -{ - /** @var App|MockInterface */ - protected $app; - - /** @var Filesystem */ - protected $filesystem; - - /** @var Config|MockInterface */ - protected $config; - - /** @var vfsStreamDirectory */ - protected $root; - - protected function setUp(): void - { - $this->app = m::mock(App::class)->makePartial(); - Container::setInstance($this->app); - $this->app->shouldReceive('make')->with(App::class)->andReturn($this->app); - $this->config = m::mock(Config::class); - $this->config->shouldReceive('get')->with('filesystem.default', null)->andReturn('local'); - $this->app->shouldReceive('get')->with('config')->andReturn($this->config); - $this->filesystem = new Filesystem($this->app); - - $this->root = vfsStream::setup('rootDir'); - } - - protected function tearDown(): void - { - m::close(); - } - - public function testDisk() - { - $this->config->shouldReceive('get')->with('filesystem.disks.local', null)->andReturn([ - 'type' => 'local', - 'root' => $this->root->url(), - ]); - - $this->config->shouldReceive('get')->with('filesystem.disks.foo', null)->andReturn([ - 'type' => 'local', - 'root' => $this->root->url(), - ]); - - $this->assertInstanceOf(Local::class, $this->filesystem->disk()); - - $this->assertInstanceOf(Local::class, $this->filesystem->disk('foo')); - } - - public function testCache() - { - $this->config->shouldReceive('get')->with('filesystem.disks.local', null)->andReturn([ - 'type' => 'local', - 'root' => $this->root->url(), - 'cache' => true, - ]); - - $this->assertInstanceOf(Local::class, $this->filesystem->disk()); - - $this->config->shouldReceive('get')->with('filesystem.disks.cache', null)->andReturn([ - 'type' => NullDriver::class, - 'root' => $this->root->url(), - 'cache' => [ - 'store' => 'flysystem', - ], - ]); - - $cache = m::mock(Cache::class); - - $cacheDriver = m::mock(File::class); - - $cache->shouldReceive('store')->once()->with('flysystem')->andReturn($cacheDriver); - - $this->app->shouldReceive('make')->with(Cache::class)->andReturn($cache); - - $cacheDriver->shouldReceive('get')->with('flysystem')->once()->andReturn(null); - - $cacheDriver->shouldReceive('set')->withAnyArgs(); - - $this->filesystem->disk('cache')->put('test.txt', 'aa'); - } - - public function testPutFile() - { - $root = vfsStream::setup('rootDir', null, [ - 'foo.jpg' => 'hello', - ]); - - $this->config->shouldReceive('get')->with('filesystem.disks.local', null)->andReturn([ - 'type' => NullDriver::class, - 'root' => $root->url(), - 'cache' => true, - ]); - - $file = m::mock(\think\File::class); - - $file->shouldReceive('hashName')->with(null)->once()->andReturn('foo.jpg'); - - $file->shouldReceive('getRealPath')->once()->andReturn($root->getChild('foo.jpg')->url()); - - $this->filesystem->putFile('test', $file); - } -} - -class NullDriver extends Driver -{ - protected function createAdapter(): AdapterInterface - { - return new NullAdapter(); - } -} diff --git a/vendor/topthink/think-filesystem/tests/bootstrap.php b/vendor/topthink/think-filesystem/tests/bootstrap.php deleted file mode 100644 index a4abe2d..0000000 --- a/vendor/topthink/think-filesystem/tests/bootstrap.php +++ /dev/null @@ -1,2 +0,0 @@ -<?php - diff --git a/vendor/topthink/think-helper/.github/workflows/ci.yml b/vendor/topthink/think-helper/.github/workflows/ci.yml deleted file mode 100644 index c63b5d4..0000000 --- a/vendor/topthink/think-helper/.github/workflows/ci.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - - -jobs: - phpcs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup PHP environment - uses: shivammathur/setup-php@v2 - - name: Install dependencies - run: composer install - - name: PHPCSFixer check - run: composer check-style - phpunit: - strategy: - matrix: - php_version: [7.3, 7.4, 8.0] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup PHP environment - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php_version }} - coverage: xdebug - - name: Install dependencies - run: composer install - - name: PHPUnit check - run: ./vendor/bin/phpunit --coverage-text diff --git a/vendor/topthink/think-helper/.github/workflows/php.yml b/vendor/topthink/think-helper/.github/workflows/php.yml deleted file mode 100644 index 01d5b63..0000000 --- a/vendor/topthink/think-helper/.github/workflows/php.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: PHP Composer - -on: - push: - branches: [ 3.0 ] - pull_request: - branches: [ 3.0 ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate --strict - - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- - - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" - # Docs: https://getcomposer.org/doc/articles/scripts.md - - - name: Run test suite - run: composer test diff --git a/vendor/topthink/think-helper/.gitignore b/vendor/topthink/think-helper/.gitignore deleted file mode 100644 index 5ea11e9..0000000 --- a/vendor/topthink/think-helper/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/vendor/ -/.idea/ -composer.lock -.phpunit.result.cache \ No newline at end of file diff --git a/vendor/topthink/think-helper/LICENSE b/vendor/topthink/think-helper/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/vendor/topthink/think-helper/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/topthink/think-helper/README.md b/vendor/topthink/think-helper/README.md deleted file mode 100644 index f8f226d..0000000 --- a/vendor/topthink/think-helper/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# thinkphp6 常用的一些扩展类库 - -基于PHP7.1+ - -[![PHP Composer](https://github.com/larvatecn/think-helper/actions/workflows/php.yml/badge.svg)](https://github.com/larvatecn/think-helper/actions/workflows/php.yml) - -> 以下类库都在`\\think\\helper`命名空间下 - -## Str - -> 字符串操作 - -``` -// 检查字符串中是否包含某些字符串 -Str::contains($haystack, $needles) - -// 检查字符串是否以某些字符串结尾 -Str::endsWith($haystack, $needles) - -// 获取指定长度的随机字母数字组合的字符串 -Str::random($length = 16) - -// 字符串转小写 -Str::lower($value) - -// 字符串转大写 -Str::upper($value) - -// 获取字符串的长度 -Str::length($value) - -// 截取字符串 -Str::substr($string, $start, $length = null) - -``` \ No newline at end of file diff --git a/vendor/topthink/think-helper/composer.json b/vendor/topthink/think-helper/composer.json deleted file mode 100644 index 0892fa6..0000000 --- a/vendor/topthink/think-helper/composer.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "topthink/think-helper", - "description": "The ThinkPHP6 Helper Package", - "license": "Apache-2.0", - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "require": { - "php": ">=7.1.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "autoload": { - "psr-4": { - "think\\": "src" - }, - "files": [ - "src/helper.php" - ] - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests" - } - }, - "scripts": { - "test": "./vendor/bin/phpunit --colors" - }, - "scripts-descriptions": { - "test": "Run all tests." - } -} diff --git a/vendor/topthink/think-helper/phpunit.xml.dist b/vendor/topthink/think-helper/phpunit.xml.dist deleted file mode 100644 index c083f14..0000000 --- a/vendor/topthink/think-helper/phpunit.xml.dist +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" - bootstrap="vendor/autoload.php" - colors="true" -> - <testsuites> - <testsuite name="Application Test Suite"> - <directory>./tests/</directory> - </testsuite> - </testsuites> - <coverage processUncoveredFiles="true"> - <include> - <directory suffix=".php">./src</directory> - </include> - </coverage> -</phpunit> diff --git a/vendor/topthink/think-helper/src/Collection.php b/vendor/topthink/think-helper/src/Collection.php deleted file mode 100644 index 5b19ffc..0000000 --- a/vendor/topthink/think-helper/src/Collection.php +++ /dev/null @@ -1,662 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: zhangyajun <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use ArrayAccess; -use ArrayIterator; -use Countable; -use IteratorAggregate; -use JsonSerializable; -use think\contract\Arrayable; -use think\contract\Jsonable; -use think\helper\Arr; -use Traversable; - -/** - * 数据集管理类 - */ -class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable, Arrayable, Jsonable -{ - /** - * 数据集数据 - * @var array - */ - protected $items = []; - - public function __construct($items = []) - { - $this->items = $this->convertToArray($items); - } - - public static function make($items = []) - { - return new static($items); - } - - /** - * 是否为空 - * @access public - * @return bool - */ - public function isEmpty(): bool - { - return empty($this->items); - } - - public function toArray(): array - { - return array_map(function ($value) { - return $value instanceof Arrayable ? $value->toArray() : $value; - }, $this->items); - } - - public function all(): array - { - return $this->items; - } - - /** - * 合并数组 - * - * @access public - * @param mixed $items 数据 - * @return static - */ - public function merge($items) - { - return new static(array_merge($this->items, $this->convertToArray($items))); - } - - /** - * 按指定键整理数据 - * - * @access public - * @param mixed $items 数据 - * @param string $indexKey 键名 - * @return array - */ - public function dictionary($items = null, string &$indexKey = null) - { - if ($items instanceof self) { - $items = $items->all(); - } - - $items = is_null($items) ? $this->items : $items; - - if ($items && empty($indexKey)) { - $indexKey = is_array($items[0]) ? 'id' : $items[0]->getPk(); - } - - if (isset($indexKey) && is_string($indexKey)) { - return array_column($items, null, $indexKey); - } - - return $items; - } - - /** - * 比较数组,返回差集 - * - * @access public - * @param mixed $items 数据 - * @param string $indexKey 指定比较的键名 - * @return static - */ - public function diff($items, string $indexKey = null) - { - if ($this->isEmpty() || is_scalar($this->items[0])) { - return new static(array_diff($this->items, $this->convertToArray($items))); - } - - $diff = []; - $dictionary = $this->dictionary($items, $indexKey); - - if (is_string($indexKey)) { - foreach ($this->items as $item) { - if (!isset($dictionary[$item[$indexKey]])) { - $diff[] = $item; - } - } - } - - return new static($diff); - } - - /** - * 比较数组,返回交集 - * - * @access public - * @param mixed $items 数据 - * @param string $indexKey 指定比较的键名 - * @return static - */ - public function intersect($items, string $indexKey = null) - { - if ($this->isEmpty() || is_scalar($this->items[0])) { - return new static(array_intersect($this->items, $this->convertToArray($items))); - } - - $intersect = []; - $dictionary = $this->dictionary($items, $indexKey); - - if (is_string($indexKey)) { - foreach ($this->items as $item) { - if (isset($dictionary[$item[$indexKey]])) { - $intersect[] = $item; - } - } - } - - return new static($intersect); - } - - /** - * 交换数组中的键和值 - * - * @access public - * @return static - */ - public function flip() - { - return new static(array_flip($this->items)); - } - - /** - * 返回数组中所有的键名 - * - * @access public - * @return static - */ - public function keys() - { - return new static(array_keys($this->items)); - } - - /** - * 返回数组中所有的值组成的新 Collection 实例 - * @access public - * @return static - */ - public function values() - { - return new static(array_values($this->items)); - } - - /** - * 删除数组的最后一个元素(出栈) - * - * @access public - * @return mixed - */ - public function pop() - { - return array_pop($this->items); - } - - /** - * 通过使用用户自定义函数,以字符串返回数组 - * - * @access public - * @param callable $callback 调用方法 - * @param mixed $initial - * @return mixed - */ - public function reduce(callable $callback, $initial = null) - { - return array_reduce($this->items, $callback, $initial); - } - - /** - * 以相反的顺序返回数组。 - * - * @access public - * @return static - */ - public function reverse() - { - return new static(array_reverse($this->items)); - } - - /** - * 删除数组中首个元素,并返回被删除元素的值 - * - * @access public - * @return mixed - */ - public function shift() - { - return array_shift($this->items); - } - - /** - * 在数组结尾插入一个元素 - * @access public - * @param mixed $value 元素 - * @param string $key KEY - * @return $this - */ - public function push($value, string $key = null) - { - if (is_null($key)) { - $this->items[] = $value; - } else { - $this->items[$key] = $value; - } - - return $this; - } - - /** - * 把一个数组分割为新的数组块. - * - * @access public - * @param int $size 块大小 - * @param bool $preserveKeys - * @return static - */ - public function chunk(int $size, bool $preserveKeys = false) - { - $chunks = []; - - foreach (array_chunk($this->items, $size, $preserveKeys) as $chunk) { - $chunks[] = new static($chunk); - } - - return new static($chunks); - } - - /** - * 在数组开头插入一个元素 - * @access public - * @param mixed $value 元素 - * @param string $key KEY - * @return $this - */ - public function unshift($value, string $key = null) - { - if (is_null($key)) { - array_unshift($this->items, $value); - } else { - $this->items = [$key => $value] + $this->items; - } - - return $this; - } - - /** - * 给每个元素执行个回调 - * - * @access public - * @param callable $callback 回调 - * @return $this - */ - public function each(callable $callback) - { - foreach ($this->items as $key => $item) { - $result = $callback($item, $key); - - if (false === $result) { - break; - } elseif (!is_object($item)) { - $this->items[$key] = $result; - } - } - - return $this; - } - - /** - * 用回调函数处理数组中的元素 - * @access public - * @param callable|null $callback 回调 - * @return static - */ - public function map(callable $callback) - { - return new static(array_map($callback, $this->items)); - } - - /** - * 用回调函数过滤数组中的元素 - * @access public - * @param callable|null $callback 回调 - * @return static - */ - public function filter(callable $callback = null) - { - if ($callback) { - return new static(array_filter($this->items, $callback)); - } - - return new static(array_filter($this->items)); - } - - /** - * 根据字段条件过滤数组中的元素 - * @access public - * @param string $field 字段名 - * @param mixed $operator 操作符 - * @param mixed $value 数据 - * @return static - */ - public function where(string $field, $operator, $value = null) - { - if (is_null($value)) { - $value = $operator; - $operator = '='; - } - - return $this->filter(function ($data) use ($field, $operator, $value) { - if (strpos($field, '.')) { - [$field, $relation] = explode('.', $field); - - $result = $data[$field][$relation] ?? null; - } else { - $result = $data[$field] ?? null; - } - - switch (strtolower($operator)) { - case '===': - return $result === $value; - case '!==': - return $result !== $value; - case '!=': - case '<>': - return $result != $value; - case '>': - return $result > $value; - case '>=': - return $result >= $value; - case '<': - return $result < $value; - case '<=': - return $result <= $value; - case 'like': - return is_string($result) && false !== strpos($result, $value); - case 'not like': - return is_string($result) && false === strpos($result, $value); - case 'in': - return is_scalar($result) && in_array($result, $value, true); - case 'not in': - return is_scalar($result) && !in_array($result, $value, true); - case 'between': - [$min, $max] = is_string($value) ? explode(',', $value) : $value; - return is_scalar($result) && $result >= $min && $result <= $max; - case 'not between': - [$min, $max] = is_string($value) ? explode(',', $value) : $value; - return is_scalar($result) && $result > $max || $result < $min; - case '==': - case '=': - default: - return $result == $value; - } - }); - } - - /** - * LIKE过滤 - * @access public - * @param string $field 字段名 - * @param string $value 数据 - * @return static - */ - public function whereLike(string $field, string $value) - { - return $this->where($field, 'like', $value); - } - - /** - * NOT LIKE过滤 - * @access public - * @param string $field 字段名 - * @param string $value 数据 - * @return static - */ - public function whereNotLike(string $field, string $value) - { - return $this->where($field, 'not like', $value); - } - - /** - * IN过滤 - * @access public - * @param string $field 字段名 - * @param array $value 数据 - * @return static - */ - public function whereIn(string $field, array $value) - { - return $this->where($field, 'in', $value); - } - - /** - * NOT IN过滤 - * @access public - * @param string $field 字段名 - * @param array $value 数据 - * @return static - */ - public function whereNotIn(string $field, array $value) - { - return $this->where($field, 'not in', $value); - } - - /** - * BETWEEN 过滤 - * @access public - * @param string $field 字段名 - * @param mixed $value 数据 - * @return static - */ - public function whereBetween(string $field, $value) - { - return $this->where($field, 'between', $value); - } - - /** - * NOT BETWEEN 过滤 - * @access public - * @param string $field 字段名 - * @param mixed $value 数据 - * @return static - */ - public function whereNotBetween(string $field, $value) - { - return $this->where($field, 'not between', $value); - } - - /** - * 返回数据中指定的一列 - * @access public - * @param string|null $columnKey 键名 - * @param string|null $indexKey 作为索引值的列 - * @return array - */ - public function column( ? string $columnKey, string $indexKey = null) - { - return array_column($this->items, $columnKey, $indexKey); - } - - /** - * 对数组排序 - * - * @access public - * @param callable|null $callback 回调 - * @return static - */ - public function sort(callable $callback = null) - { - $items = $this->items; - - $callback = $callback ?: function ($a, $b) { - return $a == $b ? 0 : (($a < $b) ? -1 : 1); - }; - - uasort($items, $callback); - - return new static($items); - } - - /** - * 指定字段排序 - * @access public - * @param string $field 排序字段 - * @param string $order 排序 - * @return $this - */ - public function order(string $field, string $order = 'asc') - { - return $this->sort(function ($a, $b) use ($field, $order) { - $fieldA = $a[$field] ?? null; - $fieldB = $b[$field] ?? null; - - return 'desc' == strtolower($order) ? intval($fieldB > $fieldA) : intval($fieldA > $fieldB); - }); - } - - /** - * 将数组打乱 - * - * @access public - * @return static - */ - public function shuffle() - { - $items = $this->items; - - shuffle($items); - - return new static($items); - } - - /** - * 获取第一个单元数据 - * - * @access public - * @param callable|null $callback - * @param null $default - * @return mixed - */ - public function first(callable $callback = null, $default = null) - { - return Arr::first($this->items, $callback, $default); - } - - /** - * 获取最后一个单元数据 - * - * @access public - * @param callable|null $callback - * @param null $default - * @return mixed - */ - public function last(callable $callback = null, $default = null) - { - return Arr::last($this->items, $callback, $default); - } - - /** - * 截取数组 - * - * @access public - * @param int $offset 起始位置 - * @param int $length 截取长度 - * @param bool $preserveKeys preserveKeys - * @return static - */ - public function slice(int $offset, int $length = null, bool $preserveKeys = false) - { - return new static(array_slice($this->items, $offset, $length, $preserveKeys)); - } - - // ArrayAccess - #[\ReturnTypeWillChange] - public function offsetExists($offset) : bool - { - return array_key_exists($offset, $this->items); - } - - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->items[$offset]; - } - - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->items[] = $value; - } else { - $this->items[$offset] = $value; - } - } - - #[\ReturnTypeWillChange] - public function offsetUnset($offset) - { - unset($this->items[$offset]); - } - - //Countable - public function count(): int - { - return count($this->items); - } - - //IteratorAggregate - #[\ReturnTypeWillChange] - public function getIterator(): Traversable - { - return new ArrayIterator($this->items); - } - - //JsonSerializable - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return $this->toArray(); - } - - /** - * 转换当前数据集为JSON字符串 - * @access public - * @param integer $options json参数 - * @return string - */ - public function toJson(int $options = JSON_UNESCAPED_UNICODE): string - { - return json_encode($this->toArray(), $options); - } - - public function __toString() - { - return $this->toJson(); - } - - /** - * 转换成数组 - * - * @access public - * @param mixed $items 数据 - * @return array - */ - protected function convertToArray($items): array - { - if ($items instanceof self) { - return $items->all(); - } - - return (array) $items; - } -} diff --git a/vendor/topthink/think-helper/src/contract/Arrayable.php b/vendor/topthink/think-helper/src/contract/Arrayable.php deleted file mode 100644 index 7c6b992..0000000 --- a/vendor/topthink/think-helper/src/contract/Arrayable.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace think\contract; - -interface Arrayable -{ - public function toArray(): array; -} diff --git a/vendor/topthink/think-helper/src/contract/Jsonable.php b/vendor/topthink/think-helper/src/contract/Jsonable.php deleted file mode 100644 index d86122d..0000000 --- a/vendor/topthink/think-helper/src/contract/Jsonable.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -namespace think\contract; - -interface Jsonable -{ - public function toJson(int $options = JSON_UNESCAPED_UNICODE): string; -} diff --git a/vendor/topthink/think-helper/src/helper.php b/vendor/topthink/think-helper/src/helper.php deleted file mode 100644 index 0a14735..0000000 --- a/vendor/topthink/think-helper/src/helper.php +++ /dev/null @@ -1,279 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -use think\Collection; -use think\helper\Arr; - -if (!function_exists('throw_if')) { - /** - * 按条件抛异常 - * - * @param mixed $condition - * @param Throwable|string $exception - * @param array ...$parameters - * @return mixed - * - * @throws Throwable - */ - function throw_if($condition, $exception, ...$parameters) - { - if ($condition) { - throw (is_string($exception) ? new $exception(...$parameters) : $exception); - } - - return $condition; - } -} - -if (!function_exists('throw_unless')) { - /** - * 按条件抛异常 - * - * @param mixed $condition - * @param Throwable|string $exception - * @param array ...$parameters - * @return mixed - * @throws Throwable - */ - function throw_unless($condition, $exception, ...$parameters) - { - if (!$condition) { - throw (is_string($exception) ? new $exception(...$parameters) : $exception); - } - - return $condition; - } -} - -if (!function_exists('tap')) { - /** - * 对一个值调用给定的闭包,然后返回该值 - * - * @param mixed $value - * @param callable|null $callback - * @return mixed - */ - function tap($value, $callback = null) - { - if (is_null($callback)) { - return $value; - } - - $callback($value); - - return $value; - } -} - -if (!function_exists('value')) { - /** - * Return the default value of the given value. - * - * @param mixed $value - * @return mixed - */ - function value($value) - { - return $value instanceof Closure ? $value() : $value; - } -} - -if (!function_exists('collect')) { - /** - * Create a collection from the given value. - * - * @param mixed $value - * @return Collection - */ - function collect($value = null) - { - return new Collection($value); - } -} - -if (!function_exists('data_fill')) { - /** - * Fill in data where it's missing. - * - * @param mixed $target - * @param string|array $key - * @param mixed $value - * @return mixed - */ - function data_fill(&$target, $key, $value) - { - return data_set($target, $key, $value, false); - } -} - -if (!function_exists('data_get')) { - /** - * Get an item from an array or object using "dot" notation. - * - * @param mixed $target - * @param string|array|int $key - * @param mixed $default - * @return mixed - */ - function data_get($target, $key, $default = null) - { - if (is_null($key)) { - return $target; - } - - $key = is_array($key) ? $key : explode('.', $key); - - while (!is_null($segment = array_shift($key))) { - if ('*' === $segment) { - if ($target instanceof Collection) { - $target = $target->all(); - } elseif (!is_array($target)) { - return value($default); - } - - $result = []; - - foreach ($target as $item) { - $result[] = data_get($item, $key); - } - - return in_array('*', $key) ? Arr::collapse($result) : $result; - } - - if (Arr::accessible($target) && Arr::exists($target, $segment)) { - $target = $target[$segment]; - } elseif (is_object($target) && isset($target->{$segment})) { - $target = $target->{$segment}; - } else { - return value($default); - } - } - - return $target; - } -} - -if (!function_exists('data_set')) { - /** - * Set an item on an array or object using dot notation. - * - * @param mixed $target - * @param string|array $key - * @param mixed $value - * @param bool $overwrite - * @return mixed - */ - function data_set(&$target, $key, $value, $overwrite = true) - { - $segments = is_array($key) ? $key : explode('.', $key); - - if (($segment = array_shift($segments)) === '*') { - if (!Arr::accessible($target)) { - $target = []; - } - - if ($segments) { - foreach ($target as &$inner) { - data_set($inner, $segments, $value, $overwrite); - } - } elseif ($overwrite) { - foreach ($target as &$inner) { - $inner = $value; - } - } - } elseif (Arr::accessible($target)) { - if ($segments) { - if (!Arr::exists($target, $segment)) { - $target[$segment] = []; - } - - data_set($target[$segment], $segments, $value, $overwrite); - } elseif ($overwrite || !Arr::exists($target, $segment)) { - $target[$segment] = $value; - } - } elseif (is_object($target)) { - if ($segments) { - if (!isset($target->{$segment})) { - $target->{$segment} = []; - } - - data_set($target->{$segment}, $segments, $value, $overwrite); - } elseif ($overwrite || !isset($target->{$segment})) { - $target->{$segment} = $value; - } - } else { - $target = []; - - if ($segments) { - data_set($target[$segment], $segments, $value, $overwrite); - } elseif ($overwrite) { - $target[$segment] = $value; - } - } - - return $target; - } -} - -if (!function_exists('trait_uses_recursive')) { - /** - * 获取一个trait里所有引用到的trait - * - * @param string $trait Trait - * @return array - */ - function trait_uses_recursive(string $trait): array - { - $traits = class_uses($trait); - foreach ($traits as $trait) { - $traits += trait_uses_recursive($trait); - } - - return $traits; - } -} - -if (!function_exists('class_basename')) { - /** - * 获取类名(不包含命名空间) - * - * @param mixed $class 类名 - * @return string - */ - function class_basename($class): string - { - $class = is_object($class) ? get_class($class) : $class; - return basename(str_replace('\\', '/', $class)); - } -} - -if (!function_exists('class_uses_recursive')) { - /** - *获取一个类里所有用到的trait,包括父类的 - * - * @param mixed $class 类名 - * @return array - */ - function class_uses_recursive($class): array - { - if (is_object($class)) { - $class = get_class($class); - } - - $results = []; - $classes = array_merge([$class => $class], class_parents($class)); - foreach ($classes as $class) { - $results += trait_uses_recursive($class); - } - - return array_unique($results); - } -} diff --git a/vendor/topthink/think-helper/src/helper/Arr.php b/vendor/topthink/think-helper/src/helper/Arr.php deleted file mode 100644 index ed4d6a9..0000000 --- a/vendor/topthink/think-helper/src/helper/Arr.php +++ /dev/null @@ -1,634 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\helper; - -use ArrayAccess; -use InvalidArgumentException; -use think\Collection; - -class Arr -{ - - /** - * Determine whether the given value is array accessible. - * - * @param mixed $value - * @return bool - */ - public static function accessible($value) - { - return is_array($value) || $value instanceof ArrayAccess; - } - - /** - * Add an element to an array using "dot" notation if it doesn't exist. - * - * @param array $array - * @param string $key - * @param mixed $value - * @return array - */ - public static function add($array, $key, $value) - { - if (is_null(static::get($array, $key))) { - static::set($array, $key, $value); - } - - return $array; - } - - /** - * Collapse an array of arrays into a single array. - * - * @param array $array - * @return array - */ - public static function collapse($array) - { - $results = []; - - foreach ($array as $values) { - if ($values instanceof Collection) { - $values = $values->all(); - } elseif (!is_array($values)) { - continue; - } - - $results = array_merge($results, $values); - } - - return $results; - } - - /** - * Cross join the given arrays, returning all possible permutations. - * - * @param array ...$arrays - * @return array - */ - public static function crossJoin(...$arrays) - { - $results = [[]]; - - foreach ($arrays as $index => $array) { - $append = []; - - foreach ($results as $product) { - foreach ($array as $item) { - $product[$index] = $item; - - $append[] = $product; - } - } - - $results = $append; - } - - return $results; - } - - /** - * Divide an array into two arrays. One with keys and the other with values. - * - * @param array $array - * @return array - */ - public static function divide($array) - { - return [array_keys($array), array_values($array)]; - } - - /** - * Flatten a multi-dimensional associative array with dots. - * - * @param array $array - * @param string $prepend - * @return array - */ - public static function dot($array, $prepend = '') - { - $results = []; - - foreach ($array as $key => $value) { - if (is_array($value) && !empty($value)) { - $results = array_merge($results, static::dot($value, $prepend . $key . '.')); - } else { - $results[$prepend . $key] = $value; - } - } - - return $results; - } - - /** - * Get all of the given array except for a specified array of keys. - * - * @param array $array - * @param array|string $keys - * @return array - */ - public static function except($array, $keys) - { - static::forget($array, $keys); - - return $array; - } - - /** - * Determine if the given key exists in the provided array. - * - * @param \ArrayAccess|array $array - * @param string|int $key - * @return bool - */ - public static function exists($array, $key) - { - if ($array instanceof ArrayAccess) { - return $array->offsetExists($key); - } - - return array_key_exists($key, $array); - } - - /** - * Return the first element in an array passing a given truth test. - * - * @param array $array - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public static function first($array, callable $callback = null, $default = null) - { - if (is_null($callback)) { - if (empty($array)) { - return value($default); - } - - foreach ($array as $item) { - return $item; - } - } - - foreach ($array as $key => $value) { - if (call_user_func($callback, $value, $key)) { - return $value; - } - } - - return value($default); - } - - /** - * Return the last element in an array passing a given truth test. - * - * @param array $array - * @param callable|null $callback - * @param mixed $default - * @return mixed - */ - public static function last($array, callable $callback = null, $default = null) - { - if (is_null($callback)) { - return empty($array) ? value($default) : end($array); - } - - return static::first(array_reverse($array, true), $callback, $default); - } - - /** - * Flatten a multi-dimensional array into a single level. - * - * @param array $array - * @param int $depth - * @return array - */ - public static function flatten($array, $depth = INF) - { - $result = []; - - foreach ($array as $item) { - $item = $item instanceof Collection ? $item->all() : $item; - - if (!is_array($item)) { - $result[] = $item; - } elseif ($depth === 1) { - $result = array_merge($result, array_values($item)); - } else { - $result = array_merge($result, static::flatten($item, $depth - 1)); - } - } - - return $result; - } - - /** - * Remove one or many array items from a given array using "dot" notation. - * - * @param array $array - * @param array|string $keys - * @return void - */ - public static function forget(&$array, $keys) - { - $original = &$array; - - $keys = (array) $keys; - - if (count($keys) === 0) { - return; - } - - foreach ($keys as $key) { - // if the exact key exists in the top-level, remove it - if (static::exists($array, $key)) { - unset($array[$key]); - - continue; - } - - $parts = explode('.', $key); - - // clean up before each pass - $array = &$original; - - while (count($parts) > 1) { - $part = array_shift($parts); - - if (isset($array[$part]) && is_array($array[$part])) { - $array = &$array[$part]; - } else { - continue 2; - } - } - - unset($array[array_shift($parts)]); - } - } - - /** - * Get an item from an array using "dot" notation. - * - * @param \ArrayAccess|array $array - * @param string $key - * @param mixed $default - * @return mixed - */ - public static function get($array, $key, $default = null) - { - if (!static::accessible($array)) { - return value($default); - } - - if (is_null($key)) { - return $array; - } - - if (static::exists($array, $key)) { - return $array[$key]; - } - - if (strpos($key, '.') === false) { - return $array[$key] ?? value($default); - } - - foreach (explode('.', $key) as $segment) { - if (static::accessible($array) && static::exists($array, $segment)) { - $array = $array[$segment]; - } else { - return value($default); - } - } - - return $array; - } - - /** - * Check if an item or items exist in an array using "dot" notation. - * - * @param \ArrayAccess|array $array - * @param string|array $keys - * @return bool - */ - public static function has($array, $keys) - { - $keys = (array) $keys; - - if (!$array || $keys === []) { - return false; - } - - foreach ($keys as $key) { - $subKeyArray = $array; - - if (static::exists($array, $key)) { - continue; - } - - foreach (explode('.', $key) as $segment) { - if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) { - $subKeyArray = $subKeyArray[$segment]; - } else { - return false; - } - } - } - - return true; - } - - /** - * Determines if an array is associative. - * - * An array is "associative" if it doesn't have sequential numerical keys beginning with zero. - * - * @param array $array - * @return bool - */ - public static function isAssoc(array $array) - { - $keys = array_keys($array); - - return array_keys($keys) !== $keys; - } - - /** - * Get a subset of the items from the given array. - * - * @param array $array - * @param array|string $keys - * @return array - */ - public static function only($array, $keys) - { - return array_intersect_key($array, array_flip((array) $keys)); - } - - /** - * Pluck an array of values from an array. - * - * @param array $array - * @param string|array $value - * @param string|array|null $key - * @return array - */ - public static function pluck($array, $value, $key = null) - { - $results = []; - - [$value, $key] = static::explodePluckParameters($value, $key); - - foreach ($array as $item) { - $itemValue = data_get($item, $value); - - // If the key is "null", we will just append the value to the array and keep - // looping. Otherwise we will key the array using the value of the key we - // received from the developer. Then we'll return the final array form. - if (is_null($key)) { - $results[] = $itemValue; - } else { - $itemKey = data_get($item, $key); - - if (is_object($itemKey) && method_exists($itemKey, '__toString')) { - $itemKey = (string) $itemKey; - } - - $results[$itemKey] = $itemValue; - } - } - - return $results; - } - - /** - * Explode the "value" and "key" arguments passed to "pluck". - * - * @param string|array $value - * @param string|array|null $key - * @return array - */ - protected static function explodePluckParameters($value, $key) - { - $value = is_string($value) ? explode('.', $value) : $value; - - $key = is_null($key) || is_array($key) ? $key : explode('.', $key); - - return [$value, $key]; - } - - /** - * Push an item onto the beginning of an array. - * - * @param array $array - * @param mixed $value - * @param mixed $key - * @return array - */ - public static function prepend($array, $value, $key = null) - { - if (is_null($key)) { - array_unshift($array, $value); - } else { - $array = [$key => $value] + $array; - } - - return $array; - } - - /** - * Get a value from the array, and remove it. - * - * @param array $array - * @param string $key - * @param mixed $default - * @return mixed - */ - public static function pull(&$array, $key, $default = null) - { - $value = static::get($array, $key, $default); - - static::forget($array, $key); - - return $value; - } - - /** - * Get one or a specified number of random values from an array. - * - * @param array $array - * @param int|null $number - * @return mixed - * - * @throws \InvalidArgumentException - */ - public static function random($array, $number = null) - { - $requested = is_null($number) ? 1 : $number; - - $count = count($array); - - if ($requested > $count) { - throw new InvalidArgumentException( - "You requested {$requested} items, but there are only {$count} items available." - ); - } - - if (is_null($number)) { - return $array[array_rand($array)]; - } - - if ((int) $number === 0) { - return []; - } - - $keys = array_rand($array, $number); - - $results = []; - - foreach ((array) $keys as $key) { - $results[] = $array[$key]; - } - - return $results; - } - - /** - * Set an array item to a given value using "dot" notation. - * - * If no key is given to the method, the entire array will be replaced. - * - * @param array $array - * @param string $key - * @param mixed $value - * @return array - */ - public static function set(&$array, $key, $value) - { - if (is_null($key)) { - return $array = $value; - } - - $keys = explode('.', $key); - - while (count($keys) > 1) { - $key = array_shift($keys); - - // If the key doesn't exist at this depth, we will just create an empty array - // to hold the next value, allowing us to create the arrays to hold final - // values at the correct depth. Then we'll keep digging into the array. - if (!isset($array[$key]) || !is_array($array[$key])) { - $array[$key] = []; - } - - $array = &$array[$key]; - } - - $array[array_shift($keys)] = $value; - - return $array; - } - - /** - * Shuffle the given array and return the result. - * - * @param array $array - * @param int|null $seed - * @return array - */ - public static function shuffle($array, $seed = null) - { - if (is_null($seed)) { - shuffle($array); - } else { - srand($seed); - - usort($array, function () { - return rand(-1, 1); - }); - } - - return $array; - } - - /** - * Sort the array using the given callback or "dot" notation. - * - * @param array $array - * @param callable|string|null $callback - * @return array - */ - public static function sort($array, $callback = null) - { - return Collection::make($array)->sort($callback)->all(); - } - - /** - * Recursively sort an array by keys and values. - * - * @param array $array - * @return array - */ - public static function sortRecursive($array) - { - foreach ($array as &$value) { - if (is_array($value)) { - $value = static::sortRecursive($value); - } - } - - if (static::isAssoc($array)) { - ksort($array); - } else { - sort($array); - } - - return $array; - } - - /** - * Convert the array into a query string. - * - * @param array $array - * @return string - */ - public static function query($array) - { - return http_build_query($array, null, '&', PHP_QUERY_RFC3986); - } - - /** - * Filter the array using the given callback. - * - * @param array $array - * @param callable $callback - * @return array - */ - public static function where($array, callable $callback) - { - return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); - } - - /** - * If the given value is not an array and not null, wrap it in one. - * - * @param mixed $value - * @return array - */ - public static function wrap($value) - { - if (is_null($value)) { - return []; - } - - return is_array($value) ? $value : [$value]; - } -} \ No newline at end of file diff --git a/vendor/topthink/think-helper/src/helper/Str.php b/vendor/topthink/think-helper/src/helper/Str.php deleted file mode 100644 index 664dba2..0000000 --- a/vendor/topthink/think-helper/src/helper/Str.php +++ /dev/null @@ -1,234 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\helper; - -class Str -{ - - protected static $snakeCache = []; - - protected static $camelCache = []; - - protected static $studlyCache = []; - - /** - * 检查字符串中是否包含某些字符串 - * @param string $haystack - * @param string|array $needles - * @return bool - */ - public static function contains(string $haystack, $needles): bool - { - foreach ((array) $needles as $needle) { - if ('' != $needle && mb_strpos($haystack, $needle) !== false) { - return true; - } - } - - return false; - } - - /** - * 检查字符串是否以某些字符串结尾 - * - * @param string $haystack - * @param string|array $needles - * @return bool - */ - public static function endsWith(string $haystack, $needles): bool - { - foreach ((array) $needles as $needle) { - if ((string) $needle === static::substr($haystack, -static::length($needle))) { - return true; - } - } - - return false; - } - - /** - * 检查字符串是否以某些字符串开头 - * - * @param string $haystack - * @param string|array $needles - * @return bool - */ - public static function startsWith(string $haystack, $needles): bool - { - foreach ((array) $needles as $needle) { - if ('' != $needle && mb_strpos($haystack, $needle) === 0) { - return true; - } - } - - return false; - } - - /** - * 获取指定长度的随机字母数字组合的字符串 - * - * @param int $length - * @param int $type - * @param string $addChars - * @return string - */ - public static function random(int $length = 6, int $type = null, string $addChars = ''): string - { - $str = ''; - switch ($type) { - case 0: - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' . $addChars; - break; - case 1: - $chars = str_repeat('0123456789', 3); - break; - case 2: - $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' . $addChars; - break; - case 3: - $chars = 'abcdefghijklmnopqrstuvwxyz' . $addChars; - break; - case 4: - $chars = "们以我到他会作时要动国产的一是工就年阶义发成部民可出能方进在了不和有大这主中人上为来分生对于学下级地个用同行面说种过命度革而多子后自社加小机也经力线本电高量长党得实家定深法表着水理化争现所二起政三好十战无农使性前等反体合斗路图把结第里正新开论之物从当两些还天资事队批点育重其思与间内去因件日利相由压员气业代全组数果期导平各基或月毛然如应形想制心样干都向变关问比展那它最及外没看治提五解系林者米群头意只明四道马认次文通但条较克又公孔领军流入接席位情运器并飞原油放立题质指建区验活众很教决特此常石强极土少已根共直团统式转别造切九你取西持总料连任志观调七么山程百报更见必真保热委手改管处己将修支识病象几先老光专什六型具示复安带每东增则完风回南广劳轮科北打积车计给节做务被整联步类集号列温装即毫知轴研单色坚据速防史拉世设达尔场织历花受求传口断况采精金界品判参层止边清至万确究书" . $addChars; - break; - default: - $chars = 'ABCDEFGHIJKMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789' . $addChars; - break; - } - if ($length > 10) { - $chars = $type == 1 ? str_repeat($chars, $length) : str_repeat($chars, 5); - } - if ($type != 4) { - $chars = str_shuffle($chars); - $str = substr($chars, 0, $length); - } else { - for ($i = 0; $i < $length; $i++) { - $str .= mb_substr($chars, floor(mt_rand(0, mb_strlen($chars, 'utf-8') - 1)), 1); - } - } - return $str; - } - - /** - * 字符串转小写 - * - * @param string $value - * @return string - */ - public static function lower(string $value): string - { - return mb_strtolower($value, 'UTF-8'); - } - - /** - * 字符串转大写 - * - * @param string $value - * @return string - */ - public static function upper(string $value): string - { - return mb_strtoupper($value, 'UTF-8'); - } - - /** - * 获取字符串的长度 - * - * @param string $value - * @return int - */ - public static function length(string $value): int - { - return mb_strlen($value); - } - - /** - * 截取字符串 - * - * @param string $string - * @param int $start - * @param int|null $length - * @return string - */ - public static function substr(string $string, int $start, int $length = null): string - { - return mb_substr($string, $start, $length, 'UTF-8'); - } - - /** - * 驼峰转下划线 - * - * @param string $value - * @param string $delimiter - * @return string - */ - public static function snake(string $value, string $delimiter = '_'): string - { - $key = $value; - - if (isset(static::$snakeCache[$key][$delimiter])) { - return static::$snakeCache[$key][$delimiter]; - } - - if (!ctype_lower($value)) { - $value = preg_replace('/\s+/u', '', ucwords($value)); - - $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1' . $delimiter, $value)); - } - - return static::$snakeCache[$key][$delimiter] = $value; - } - - /** - * 下划线转驼峰(首字母小写) - * - * @param string $value - * @return string - */ - public static function camel(string $value): string - { - if (isset(static::$camelCache[$value])) { - return static::$camelCache[$value]; - } - - return static::$camelCache[$value] = lcfirst(static::studly($value)); - } - - /** - * 下划线转驼峰(首字母大写) - * - * @param string $value - * @return string - */ - public static function studly(string $value): string - { - $key = $value; - - if (isset(static::$studlyCache[$key])) { - return static::$studlyCache[$key]; - } - - $value = ucwords(str_replace(['-', '_'], ' ', $value)); - - return static::$studlyCache[$key] = str_replace(' ', '', $value); - } - - /** - * 转为首字母大写的标题格式 - * - * @param string $value - * @return string - */ - public static function title(string $value): string - { - return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); - } -} diff --git a/vendor/topthink/think-helper/tests/ArrTest.php b/vendor/topthink/think-helper/tests/ArrTest.php deleted file mode 100644 index a8effe7..0000000 --- a/vendor/topthink/think-helper/tests/ArrTest.php +++ /dev/null @@ -1,342 +0,0 @@ -<?php - -namespace Tests; - -use stdClass; -use think\Collection; -use think\helper\Arr; - -class ArrTest extends TestCase -{ - public function testAdd() - { - $array = Arr::add(['name' => 'ThinkPHP'], 'price', 100); - $this->assertSame(['name' => 'ThinkPHP', 'price' => 100], $array); - } - - public function testCrossJoin() - { - // Single dimension - $this->assertSame( - [[1, 'a'], [1, 'b'], [1, 'c']], - Arr::crossJoin([1], ['a', 'b', 'c']) - ); - // Square matrix - $this->assertSame( - [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']], - Arr::crossJoin([1, 2], ['a', 'b']) - ); - // Rectangular matrix - $this->assertSame( - [[1, 'a'], [1, 'b'], [1, 'c'], [2, 'a'], [2, 'b'], [2, 'c']], - Arr::crossJoin([1, 2], ['a', 'b', 'c']) - ); - // 3D matrix - $this->assertSame( - [ - [1, 'a', 'I'], [1, 'a', 'II'], [1, 'a', 'III'], - [1, 'b', 'I'], [1, 'b', 'II'], [1, 'b', 'III'], - [2, 'a', 'I'], [2, 'a', 'II'], [2, 'a', 'III'], - [2, 'b', 'I'], [2, 'b', 'II'], [2, 'b', 'III'], - ], - Arr::crossJoin([1, 2], ['a', 'b'], ['I', 'II', 'III']) - ); - // With 1 empty dimension - $this->assertSame([], Arr::crossJoin([], ['a', 'b'], ['I', 'II', 'III'])); - $this->assertSame([], Arr::crossJoin([1, 2], [], ['I', 'II', 'III'])); - $this->assertSame([], Arr::crossJoin([1, 2], ['a', 'b'], [])); - // With empty arrays - $this->assertSame([], Arr::crossJoin([], [], [])); - $this->assertSame([], Arr::crossJoin([], [])); - $this->assertSame([], Arr::crossJoin([])); - // Not really a proper usage, still, test for preserving BC - $this->assertSame([[]], Arr::crossJoin()); - } - - public function testDivide() - { - list($keys, $values) = Arr::divide(['name' => 'ThinkPHP']); - $this->assertSame(['name'], $keys); - $this->assertSame(['ThinkPHP'], $values); - } - - public function testDot() - { - $array = Arr::dot(['foo' => ['bar' => 'baz']]); - $this->assertSame(['foo.bar' => 'baz'], $array); - $array = Arr::dot([]); - $this->assertSame([], $array); - $array = Arr::dot(['foo' => []]); - $this->assertSame(['foo' => []], $array); - $array = Arr::dot(['foo' => ['bar' => []]]); - $this->assertSame(['foo.bar' => []], $array); - } - - public function testExcept() - { - $array = ['name' => 'ThinkPHP', 'price' => 100]; - $array = Arr::except($array, ['price']); - $this->assertSame(['name' => 'ThinkPHP'], $array); - } - - public function testExists() - { - $this->assertTrue(Arr::exists([1], 0)); - $this->assertTrue(Arr::exists([null], 0)); - $this->assertTrue(Arr::exists(['a' => 1], 'a')); - $this->assertTrue(Arr::exists(['a' => null], 'a')); - $this->assertFalse(Arr::exists([1], 1)); - $this->assertFalse(Arr::exists([null], 1)); - $this->assertFalse(Arr::exists(['a' => 1], 0)); - } - - public function testFirst() - { - $array = [100, 200, 300]; - $value = Arr::first($array, function ($value) { - return $value >= 150; - }); - $this->assertSame(200, $value); - $this->assertSame(100, Arr::first($array)); - - $this->assertSame('default', Arr::first([], null, 'default')); - - $this->assertSame('default', Arr::first([], function () { - return false; - }, 'default')); - } - - public function testLast() - { - $array = [100, 200, 300]; - $last = Arr::last($array, function ($value) { - return $value < 250; - }); - $this->assertSame(200, $last); - $last = Arr::last($array, function ($value, $key) { - return $key < 2; - }); - $this->assertSame(200, $last); - $this->assertSame(300, Arr::last($array)); - } - - public function testFlatten() - { - // Flat arrays are unaffected - $array = ['#foo', '#bar', '#baz']; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten(['#foo', '#bar', '#baz'])); - // Nested arrays are flattened with existing flat items - $array = [['#foo', '#bar'], '#baz']; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Flattened array includes "null" items - $array = [['#foo', null], '#baz', null]; - $this->assertSame(['#foo', null, '#baz', null], Arr::flatten($array)); - // Sets of nested arrays are flattened - $array = [['#foo', '#bar'], ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Deeply nested arrays are flattened - $array = [['#foo', ['#bar']], ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Nested arrays are flattened alongside arrays - $array = [new Collection(['#foo', '#bar']), ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Nested arrays containing plain arrays are flattened - $array = [new Collection(['#foo', ['#bar']]), ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Nested arrays containing arrays are flattened - $array = [['#foo', new Collection(['#bar'])], ['#baz']]; - $this->assertSame(['#foo', '#bar', '#baz'], Arr::flatten($array)); - // Nested arrays containing arrays containing arrays are flattened - $array = [['#foo', new Collection(['#bar', ['#zap']])], ['#baz']]; - $this->assertSame(['#foo', '#bar', '#zap', '#baz'], Arr::flatten($array)); - } - - public function testFlattenWithDepth() - { - // No depth flattens recursively - $array = [['#foo', ['#bar', ['#baz']]], '#zap']; - $this->assertSame(['#foo', '#bar', '#baz', '#zap'], Arr::flatten($array)); - // Specifying a depth only flattens to that depth - $array = [['#foo', ['#bar', ['#baz']]], '#zap']; - $this->assertSame(['#foo', ['#bar', ['#baz']], '#zap'], Arr::flatten($array, 1)); - $array = [['#foo', ['#bar', ['#baz']]], '#zap']; - $this->assertSame(['#foo', '#bar', ['#baz'], '#zap'], Arr::flatten($array, 2)); - } - - public function testGet() - { - $array = ['products.item' => ['price' => 100]]; - $this->assertSame(['price' => 100], Arr::get($array, 'products.item')); - $array = ['products' => ['item' => ['price' => 100]]]; - $value = Arr::get($array, 'products.item'); - $this->assertSame(['price' => 100], $value); - // Test null array values - $array = ['foo' => null, 'bar' => ['baz' => null]]; - $this->assertNull(Arr::get($array, 'foo', 'default')); - $this->assertNull(Arr::get($array, 'bar.baz', 'default')); - // Test null key returns the whole array - $array = ['foo', 'bar']; - $this->assertSame($array, Arr::get($array, null)); - // Test $array is empty and key is null - $this->assertSame([], Arr::get([], null)); - $this->assertSame([], Arr::get([], null, 'default')); - } - - public function testHas() - { - $array = ['products.item' => ['price' => 100]]; - $this->assertTrue(Arr::has($array, 'products.item')); - $array = ['products' => ['item' => ['price' => 100]]]; - $this->assertTrue(Arr::has($array, 'products.item')); - $this->assertTrue(Arr::has($array, 'products.item.price')); - $this->assertFalse(Arr::has($array, 'products.foo')); - $this->assertFalse(Arr::has($array, 'products.item.foo')); - $array = ['foo' => null, 'bar' => ['baz' => null]]; - $this->assertTrue(Arr::has($array, 'foo')); - $this->assertTrue(Arr::has($array, 'bar.baz')); - $array = ['foo', 'bar']; - $this->assertFalse(Arr::has($array, null)); - $this->assertFalse(Arr::has([], null)); - $array = ['products' => ['item' => ['price' => 100]]]; - $this->assertTrue(Arr::has($array, ['products.item'])); - $this->assertTrue(Arr::has($array, ['products.item', 'products.item.price'])); - $this->assertTrue(Arr::has($array, ['products', 'products'])); - $this->assertFalse(Arr::has($array, ['foo'])); - $this->assertFalse(Arr::has($array, [])); - $this->assertFalse(Arr::has($array, ['products.item', 'products.price'])); - $this->assertFalse(Arr::has([], [null])); - } - - public function testIsAssoc() - { - $this->assertTrue(Arr::isAssoc(['a' => 'a', 0 => 'b'])); - $this->assertTrue(Arr::isAssoc([1 => 'a', 0 => 'b'])); - $this->assertTrue(Arr::isAssoc([1 => 'a', 2 => 'b'])); - $this->assertFalse(Arr::isAssoc([0 => 'a', 1 => 'b'])); - $this->assertFalse(Arr::isAssoc(['a', 'b'])); - } - - public function testOnly() - { - $array = ['name' => 'ThinkPHP', 'price' => 100, 'orders' => 10]; - $array = Arr::only($array, ['name', 'price']); - $this->assertSame(['name' => 'ThinkPHP', 'price' => 100], $array); - } - - public function testPrepend() - { - $array = Arr::prepend(['one', 'two', 'three', 'four'], 'zero'); - $this->assertSame(['zero', 'one', 'two', 'three', 'four'], $array); - $array = Arr::prepend(['one' => 1, 'two' => 2], 0, 'zero'); - $this->assertSame(['zero' => 0, 'one' => 1, 'two' => 2], $array); - } - - public function testPull() - { - $array = ['name' => 'ThinkPHP', 'price' => 100]; - $name = Arr::pull($array, 'name'); - $this->assertSame('ThinkPHP', $name); - $this->assertSame(['price' => 100], $array); - // Only works on first level keys - $array = ['i@example.com' => 'Joe', 'jack@localhost' => 'Jane']; - $name = Arr::pull($array, 'i@example.com'); - $this->assertSame('Joe', $name); - $this->assertSame(['jack@localhost' => 'Jane'], $array); - // Does not work for nested keys - $array = ['emails' => ['i@example.com' => 'Joe', 'jack@localhost' => 'Jane']]; - $name = Arr::pull($array, 'emails.i@example.com'); - $this->assertNull($name); - $this->assertSame(['emails' => ['i@example.com' => 'Joe', 'jack@localhost' => 'Jane']], $array); - } - - public function testRandom() - { - $randomValue = Arr::random(['foo', 'bar', 'baz']); - $this->assertContains($randomValue, ['foo', 'bar', 'baz']); - $randomValues = Arr::random(['foo', 'bar', 'baz'], 1); - $this->assertIsArray($randomValues); - $this->assertCount(1, $randomValues); - $this->assertContains($randomValues[0], ['foo', 'bar', 'baz']); - $randomValues = Arr::random(['foo', 'bar', 'baz'], 2); - $this->assertIsArray($randomValues); - $this->assertCount(2, $randomValues); - $this->assertContains($randomValues[0], ['foo', 'bar', 'baz']); - $this->assertContains($randomValues[1], ['foo', 'bar', 'baz']); - } - - public function testSet() - { - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::set($array, 'products.item.price', 200); - Arr::set($array, 'goods.item.price', 200); - $this->assertSame(['products' => ['item' => ['price' => 200]], 'goods' => ['item' => ['price' => 200]]], $array); - } - - public function testWhere() - { - $array = [100, '200', 300, '400', 500]; - $array = Arr::where($array, function ($value, $key) { - return is_string($value); - }); - $this->assertSame([1 => '200', 3 => '400'], $array); - } - - public function testWhereKey() - { - $array = ['10' => 1, 'foo' => 3, 20 => 2]; - $array = Arr::where($array, function ($value, $key) { - return is_numeric($key); - }); - $this->assertSame(['10' => 1, 20 => 2], $array); - } - - public function testForget() - { - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, null); - $this->assertSame(['products' => ['item' => ['price' => 100]]], $array); - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, []); - $this->assertSame(['products' => ['item' => ['price' => 100]]], $array); - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, 'products.item'); - $this->assertSame(['products' => []], $array); - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, 'products.item.price'); - $this->assertSame(['products' => ['item' => []]], $array); - $array = ['products' => ['item' => ['price' => 100]]]; - Arr::forget($array, 'products.final.price'); - $this->assertSame(['products' => ['item' => ['price' => 100]]], $array); - $array = ['shop' => ['cart' => [150 => 0]]]; - Arr::forget($array, 'shop.final.cart'); - $this->assertSame(['shop' => ['cart' => [150 => 0]]], $array); - $array = ['products' => ['item' => ['price' => ['original' => 50, 'taxes' => 60]]]]; - Arr::forget($array, 'products.item.price.taxes'); - $this->assertSame(['products' => ['item' => ['price' => ['original' => 50]]]], $array); - $array = ['products' => ['item' => ['price' => ['original' => 50, 'taxes' => 60]]]]; - Arr::forget($array, 'products.item.final.taxes'); - $this->assertSame(['products' => ['item' => ['price' => ['original' => 50, 'taxes' => 60]]]], $array); - $array = ['products' => ['item' => ['price' => 50], null => 'something']]; - Arr::forget($array, ['products.amount.all', 'products.item.price']); - $this->assertSame(['products' => ['item' => [], null => 'something']], $array); - // Only works on first level keys - $array = ['i@example.com' => 'Joe', 'i@thinkphp.com' => 'Jane']; - Arr::forget($array, 'i@example.com'); - $this->assertSame(['i@thinkphp.com' => 'Jane'], $array); - // Does not work for nested keys - $array = ['emails' => ['i@example.com' => ['name' => 'Joe'], 'jack@localhost' => ['name' => 'Jane']]]; - Arr::forget($array, ['emails.i@example.com', 'emails.jack@localhost']); - $this->assertSame(['emails' => ['i@example.com' => ['name' => 'Joe']]], $array); - } - - public function testWrap() - { - $string = 'a'; - $array = ['a']; - $object = new stdClass(); - $object->value = 'a'; - $this->assertSame(['a'], Arr::wrap($string)); - $this->assertSame($array, Arr::wrap($array)); - $this->assertSame([$object], Arr::wrap($object)); - } -} diff --git a/vendor/topthink/think-helper/tests/CollectionTest.php b/vendor/topthink/think-helper/tests/CollectionTest.php deleted file mode 100644 index b69c175..0000000 --- a/vendor/topthink/think-helper/tests/CollectionTest.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -namespace Tests; - -use think\Collection; - -class CollectionTest extends TestCase -{ - public function testMerge() - { - $c = new Collection(['name' => 'Hello']); - $this->assertSame(['name' => 'Hello', 'id' => 1], $c->merge(['id' => 1])->all()); - } - - public function testFirst() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertSame('Hello', $c->first()); - } - - public function testLast() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertSame(25, $c->last()); - } - - public function testToArray() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertSame(['name' => 'Hello', 'age' => 25], $c->toArray()); - } - - public function testToJson() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertSame(json_encode(['name' => 'Hello', 'age' => 25]), $c->toJson()); - $this->assertSame(json_encode(['name' => 'Hello', 'age' => 25]), (string) $c); - $this->assertSame(json_encode(['name' => 'Hello', 'age' => 25]), json_encode($c)); - } - - public function testSerialize() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $sc = serialize($c); - $c = unserialize($sc); - - $this->assertSame(['name' => 'Hello', 'age' => 25], $c->all()); - } - - public function testGetIterator() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertInstanceOf(\ArrayIterator::class, $c->getIterator()); - - $this->assertSame(['name' => 'Hello', 'age' => 25], $c->getIterator()->getArrayCopy()); - } - - public function testCount() - { - $c = new Collection(['name' => 'Hello', 'age' => 25]); - - $this->assertCount(2, $c); - } -} diff --git a/vendor/topthink/think-helper/tests/StrTest.php b/vendor/topthink/think-helper/tests/StrTest.php deleted file mode 100644 index 813ad4c..0000000 --- a/vendor/topthink/think-helper/tests/StrTest.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -namespace Tests; - -use think\helper\Str; - -class StrTest extends TestCase -{ - public function testCamel() - { - $this->assertSame('fooBar', Str::camel('FooBar')); - $this->assertSame('fooBar', Str::camel('FooBar')); - $this->assertSame('fooBar', Str::camel('foo_bar')); - $this->assertSame('fooBar', Str::camel('_foo_bar')); - $this->assertSame('fooBar', Str::camel('_foo_bar_')); - } - - public function testStudly() - { - $this->assertSame('FooBar', Str::studly('fooBar')); - $this->assertSame('FooBar', Str::studly('_foo_bar')); - $this->assertSame('FooBar', Str::studly('_foo_bar_')); - $this->assertSame('FooBar', Str::studly('_foo_bar_')); - } - - public function testSnake() - { - $this->assertSame('think_p_h_p_framework', Str::snake('ThinkPHPFramework')); - $this->assertSame('think_php_framework', Str::snake('ThinkPhpFramework')); - $this->assertSame('think php framework', Str::snake('ThinkPhpFramework', ' ')); - $this->assertSame('think_php_framework', Str::snake('Think Php Framework')); - $this->assertSame('think_php_framework', Str::snake('Think Php Framework ')); - // ensure cache keys don't overlap - $this->assertSame('think__php__framework', Str::snake('ThinkPhpFramework', '__')); - $this->assertSame('think_php_framework_', Str::snake('ThinkPhpFramework_', '_')); - $this->assertSame('think_php_framework', Str::snake('think php Framework')); - $this->assertSame('think_php_frame_work', Str::snake('think php FrameWork')); - // prevent breaking changes - $this->assertSame('foo-bar', Str::snake('foo-bar')); - $this->assertSame('foo-_bar', Str::snake('Foo-Bar')); - $this->assertSame('foo__bar', Str::snake('Foo_Bar')); - $this->assertSame('żółtałódka', Str::snake('ŻółtaŁódka')); - } - - public function testTitle() - { - $this->assertSame('Welcome Back', Str::title('welcome back')); - } - - public function testRandom() - { - $this->assertIsString(Str::random(10)); - } - - public function testUpper() - { - $this->assertSame('USERNAME', Str::upper('username')); - $this->assertSame('USERNAME', Str::upper('userNaMe')); - } -} diff --git a/vendor/topthink/think-helper/tests/TestCase.php b/vendor/topthink/think-helper/tests/TestCase.php deleted file mode 100644 index 87f6cb3..0000000 --- a/vendor/topthink/think-helper/tests/TestCase.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -namespace Tests; - -use PHPUnit\Framework\TestCase as BaseTestCase; - -/** - * Class TestCase - * @author Tongle Xu <xutongle@gmail.com> - */ -class TestCase extends BaseTestCase -{ -} diff --git a/vendor/topthink/think-multi-app/LICENSE b/vendor/topthink/think-multi-app/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/vendor/topthink/think-multi-app/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/topthink/think-multi-app/README.md b/vendor/topthink/think-multi-app/README.md deleted file mode 100644 index a746fa7..0000000 --- a/vendor/topthink/think-multi-app/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# think-multi-app - -用于ThinkPHP6+的多应用支持 - -## 安装 - -~~~ -composer require topthink/think-multi-app -~~~ - -## 使用 - -用法参考ThinkPHP6完全开发手册[多应用模式](https://www.kancloud.cn/manual/thinkphp6_0/1297876)章节。 - diff --git a/vendor/topthink/think-multi-app/composer.json b/vendor/topthink/think-multi-app/composer.json deleted file mode 100644 index df25420..0000000 --- a/vendor/topthink/think-multi-app/composer.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "topthink/think-multi-app", - "description": "thinkphp multi app support", - "license": "Apache-2.0", - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "require": { - "php": ">=7.1.0", - "topthink/framework": "^6.0|^8.0" - }, - "autoload": { - "psr-4": { - "think\\app\\": "src" - } - }, - "extra": { - "think":{ - "services":[ - "think\\app\\Service" - ] - } - }, - "minimum-stability": "dev" -} diff --git a/vendor/topthink/think-multi-app/src/MultiApp.php b/vendor/topthink/think-multi-app/src/MultiApp.php deleted file mode 100644 index 130d25c..0000000 --- a/vendor/topthink/think-multi-app/src/MultiApp.php +++ /dev/null @@ -1,224 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\app; - -use Closure; -use think\App; -use think\exception\HttpException; -use think\Request; -use think\Response; - -/** - * 多应用模式支持 - */ -class MultiApp -{ - - /** @var App */ - protected $app; - - public function __construct(App $app) - { - $this->app = $app; - } - - /** - * 多应用解析 - * @access public - * @param Request $request - * @param Closure $next - * @return Response - */ - public function handle($request, Closure $next) - { - if (!$this->parseMultiApp()) { - return $next($request); - } - - return $this->app->middleware->pipeline('app') - ->send($request) - ->then(function ($request) use ($next) { - return $next($request); - }); - } - - /** - * 获取路由目录 - * @access protected - * @return string - */ - protected function getRoutePath(): string - { - return $this->app->getAppPath() . 'route' . DIRECTORY_SEPARATOR; - } - - /** - * 解析多应用 - * @return bool - */ - protected function parseMultiApp(): bool - { - $scriptName = $this->getScriptName(); - $defaultApp = $this->app->config->get('app.default_app') ?: 'index'; - $appName = $this->app->http->getName(); - - if ($appName || ($scriptName && !in_array($scriptName, ['index', 'router', 'think']))) { - $appName = $appName ?: $scriptName; - $this->app->http->setBind(); - } else { - // 自动多应用识别 - $this->app->http->setBind(false); - $appName = null; - - $bind = $this->app->config->get('app.domain_bind', []); - - if (!empty($bind)) { - // 获取当前子域名 - $subDomain = $this->app->request->subDomain(); - $domain = $this->app->request->host(true); - - if (isset($bind[$domain])) { - $appName = $bind[$domain]; - $this->app->http->setBind(); - } elseif (isset($bind[$subDomain])) { - $appName = $bind[$subDomain]; - $this->app->http->setBind(); - } elseif (isset($bind['*'])) { - $appName = $bind['*']; - $this->app->http->setBind(); - } - } - - if (!$this->app->http->isBind()) { - $path = $this->app->request->pathinfo(); - $map = $this->app->config->get('app.app_map', []); - $deny = $this->app->config->get('app.deny_app_list', []); - $name = current(explode('/', $path)); - - if (strpos($name, '.')) { - $name = strstr($name, '.', true); - } - - if (isset($map[$name])) { - if ($map[$name] instanceof Closure) { - $result = call_user_func_array($map[$name], [$this->app]); - $appName = $result ?: $name; - } else { - $appName = $map[$name]; - } - } elseif ($name && (false !== array_search($name, $map) || in_array($name, $deny))) { - throw new HttpException(404, 'app not exists:' . $name); - } elseif ($name && isset($map['*'])) { - $appName = $map['*']; - } else { - $appName = $name ?: $defaultApp; - $appPath = $this->app->http->getPath() ?: $this->app->getBasePath() . $appName . DIRECTORY_SEPARATOR; - - if (!is_dir($appPath)) { - $express = $this->app->config->get('app.app_express', false); - if ($express) { - $this->setApp($defaultApp); - return true; - } else { - return false; - } - } - } - - if ($name) { - $this->app->request->setRoot('/' . $name); - $this->app->request->setPathinfo(strpos($path, '/') ? ltrim(strstr($path, '/'), '/') : ''); - } - } - } - - $this->setApp($appName ?: $defaultApp); - return true; - } - - /** - * 获取当前运行入口名称 - * @access protected - * @codeCoverageIgnore - * @return string - */ - protected function getScriptName(): string - { - if (isset($_SERVER['SCRIPT_FILENAME'])) { - $file = $_SERVER['SCRIPT_FILENAME']; - } elseif (isset($_SERVER['argv'][0])) { - $file = realpath($_SERVER['argv'][0]); - } - - return isset($file) ? pathinfo($file, PATHINFO_FILENAME) : ''; - } - - /** - * 设置应用 - * @param string $appName - */ - protected function setApp(string $appName): void - { - $this->app->http->name($appName); - - $appPath = $this->app->http->getPath() ?: $this->app->getBasePath() . $appName . DIRECTORY_SEPARATOR; - - $this->app->setAppPath($appPath); - // 设置应用命名空间 - $this->app->setNamespace($this->app->config->get('app.app_namespace') ?: 'app\\' . $appName); - - if (is_dir($appPath)) { - $this->app->setRuntimePath($this->app->getRuntimePath() . $appName . DIRECTORY_SEPARATOR); - $this->app->http->setRoutePath($this->getRoutePath()); - - //加载应用 - $this->loadApp($appName, $appPath); - } - } - - /** - * 加载应用文件 - * @param string $appName 应用名 - * @return void - */ - protected function loadApp(string $appName, string $appPath): void - { - if (is_file($appPath . 'common.php')) { - include_once $appPath . 'common.php'; - } - - $files = []; - - $files = array_merge($files, glob($appPath . 'config' . DIRECTORY_SEPARATOR . '*' . $this->app->getConfigExt())); - - foreach ($files as $file) { - $this->app->config->load($file, pathinfo($file, PATHINFO_FILENAME)); - } - - if (is_file($appPath . 'event.php')) { - $this->app->loadEvent(include $appPath . 'event.php'); - } - - if (is_file($appPath . 'middleware.php')) { - $this->app->middleware->import(include $appPath . 'middleware.php', 'app'); - } - - if (is_file($appPath . 'provider.php')) { - $this->app->bind(include $appPath . 'provider.php'); - } - - // 加载应用默认语言包 - $this->app->loadLangPack($this->app->lang->defaultLangSet()); - } - -} diff --git a/vendor/topthink/think-multi-app/src/Service.php b/vendor/topthink/think-multi-app/src/Service.php deleted file mode 100644 index cdc90b4..0000000 --- a/vendor/topthink/think-multi-app/src/Service.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -namespace think\app; - -use think\Service as BaseService; - -class Service extends BaseService -{ - public function boot() - { - $this->app->event->listen('HttpRun', function () { - $this->app->middleware->add(MultiApp::class); - }); - - $this->commands([ - 'build' => command\Build::class, - 'clear' => command\Clear::class, - ]); - - $this->app->bind([ - 'think\route\Url' => Url::class, - ]); - } -} diff --git a/vendor/topthink/think-multi-app/src/Url.php b/vendor/topthink/think-multi-app/src/Url.php deleted file mode 100644 index 34bf8da..0000000 --- a/vendor/topthink/think-multi-app/src/Url.php +++ /dev/null @@ -1,234 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\app; - -use think\App; -use think\Route; -use think\route\Url as UrlBuild; - -/** - * 路由地址生成 - */ -class Url extends UrlBuild -{ - /** - * 直接解析URL地址 - * @access protected - * @param string $url URL - * @param string|bool $domain Domain - * @return string - */ - protected function parseUrl(string $url, &$domain): string - { - $request = $this->app->request; - - if (0 === strpos($url, '/')) { - // 直接作为路由地址解析 - $url = substr($url, 1); - } elseif (false !== strpos($url, '\\')) { - // 解析到类 - $url = ltrim(str_replace('\\', '/', $url), '/'); - } elseif (0 === strpos($url, '@')) { - // 解析到控制器 - $url = substr($url, 1); - } elseif ('' === $url) { - $url = $request->controller() . '/' . $request->action(); - if (!$this->app->http->isBind()) { - $url = $this->getAppName() . '/' . $url; - } - } else { - // 解析到 应用/控制器/操作 - $controller = $request->controller(); - $path = explode('/', $url); - $action = array_pop($path); - $controller = empty($path) ? $controller : array_pop($path); - $app = empty($path) ? $this->getAppName() : array_pop($path); - $url = $controller . '/' . $action; - $bind = $this->app->config->get('app.domain_bind', []); - - if ($key = array_search($this->app->http->getName(), $bind)) { - isset($bind[$_SERVER['SERVER_NAME']]) && $domain = $_SERVER['SERVER_NAME']; - - $domain = is_bool($domain) ? $key : $domain; - } elseif (!$this->app->http->isBind()) { - $url = $app . '/' . $url; - } - } - - return $url; - } - - public function build(): string - { - // 解析URL - $url = $this->url; - $suffix = $this->suffix; - $domain = $this->domain; - $request = $this->app->request; - $vars = $this->vars; - - if (0 === strpos($url, '[') && $pos = strpos($url, ']')) { - // [name] 表示使用路由命名标识生成URL - $name = substr($url, 1, $pos - 1); - $url = 'name' . substr($url, $pos + 1); - } - - if (false === strpos($url, '://') && 0 !== strpos($url, '/')) { - $info = parse_url($url); - $url = !empty($info['path']) ? $info['path'] : ''; - - if (isset($info['fragment'])) { - // 解析锚点 - $anchor = $info['fragment']; - - if (false !== strpos($anchor, '?')) { - // 解析参数 - list($anchor, $info['query']) = explode('?', $anchor, 2); - } - - if (false !== strpos($anchor, '@')) { - // 解析域名 - list($anchor, $domain) = explode('@', $anchor, 2); - } - } elseif (strpos($url, '@') && false === strpos($url, '\\')) { - // 解析域名 - list($url, $domain) = explode('@', $url, 2); - } - } - - if ($url) { - $checkName = isset($name) ? $name : $url . (isset($info['query']) ? '?' . $info['query'] : ''); - $checkDomain = $domain && is_string($domain) ? $domain : null; - - $rule = $this->route->getName($checkName, $checkDomain); - - if (empty($rule) && isset($info['query'])) { - $rule = $this->route->getName($url, $checkDomain); - // 解析地址里面参数 合并到vars - parse_str($info['query'], $params); - $vars = array_merge($params, $vars); - unset($info['query']); - } - } - - if (!empty($rule) && $match = $this->getRuleUrl($rule, $vars, $domain)) { - // 匹配路由命名标识 - $url = $match[0]; - - if ($domain && !empty($match[1])) { - $domain = $match[1]; - } - - if (!is_null($match[2])) { - $suffix = $match[2]; - } - - if (!$this->app->http->isBind()) { - $app = $this->getAppName(); - $url = $app . '/' . $url; - } - } elseif (!empty($rule) && isset($name)) { - throw new \InvalidArgumentException('route name not exists:' . $name); - } else { - // 检测URL绑定 - $bind = $this->route->getDomainBind($domain && is_string($domain) ? $domain : null); - - if ($bind && 0 === strpos($url, $bind)) { - $url = substr($url, strlen($bind) + 1); - } else { - $binds = $this->route->getBind(); - - foreach ($binds as $key => $val) { - if (is_string($val) && 0 === strpos($url, $val) && substr_count($val, '/') > 1) { - $url = substr($url, strlen($val) + 1); - $domain = $key; - break; - } - } - } - - // 路由标识不存在 直接解析 - $url = $this->parseUrl($url, $domain); - - if (isset($info['query'])) { - // 解析地址里面参数 合并到vars - parse_str($info['query'], $params); - $vars = array_merge($params, $vars); - } - } - - // 还原URL分隔符 - $depr = $this->route->config('pathinfo_depr'); - $url = str_replace('/', $depr, $url); - - $file = $request->baseFile(); - if ($file && 0 !== strpos($request->url(), $file)) { - $file = str_replace('\\', '/', dirname($file)); - } - - $url = rtrim($file, '/') . '/' . ltrim($url, '/'); - - // URL后缀 - if ('/' == substr($url, -1) || '' == $url) { - $suffix = ''; - } else { - $suffix = $this->parseSuffix($suffix); - } - - // 锚点 - $anchor = !empty($anchor) ? '#' . $anchor : ''; - - // 参数组装 - if (!empty($vars)) { - // 添加参数 - if ($this->route->config('url_common_param')) { - $vars = http_build_query($vars); - $url .= $suffix . '?' . $vars . $anchor; - } else { - foreach ($vars as $var => $val) { - $val = (string) $val; - if ('' !== $val) { - $url .= $depr . $var . $depr . urlencode($val); - } - } - - $url .= $suffix . $anchor; - } - } else { - $url .= $suffix . $anchor; - } - - // 检测域名 - $domain = $this->parseDomain($url, $domain); - - // URL组装 - return $domain . rtrim($this->root, '/') . '/' . ltrim($url, '/'); - } - - /** - * 获取URL的应用名 - * @access protected - * @return string - */ - protected function getAppName() - { - $app = $this->app->http->getName(); - $map = $this->app->config->get('app.app_map', []); - - if ($key = array_search($app, $map)) { - $app = $key; - } - - return $app; - } -} diff --git a/vendor/topthink/think-multi-app/src/command/Build.php b/vendor/topthink/think-multi-app/src/command/Build.php deleted file mode 100644 index 65b2f87..0000000 --- a/vendor/topthink/think-multi-app/src/command/Build.php +++ /dev/null @@ -1,180 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\app\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\Output; - -class Build extends Command -{ - /** - * 应用基础目录 - * @var string - */ - protected $basePath; - - /** - * {@inheritdoc} - */ - protected function configure() - { - $this->setName('build') - ->addArgument('app', Argument::OPTIONAL, 'app name .') - ->setDescription('Build App Dirs'); - } - - protected function execute(Input $input, Output $output) - { - $this->basePath = $this->app->getBasePath(); - $app = $input->getArgument('app') ?: ''; - - if (is_file($this->basePath . 'build.php')) { - $list = include $this->basePath . 'build.php'; - } else { - $list = [ - '__dir__' => ['controller', 'model', 'view'], - ]; - } - - $this->buildApp($app, $list); - $output->writeln("<info>Successed</info>"); - - } - - /** - * 创建应用 - * @access protected - * @param string $app 应用名 - * @param array $list 目录结构 - * @return void - */ - protected function buildApp(string $app, array $list = []): void - { - if (!is_dir($this->basePath . $app)) { - // 创建应用目录 - mkdir($this->basePath . $app); - } - - $appPath = $this->basePath . ($app ? $app . DIRECTORY_SEPARATOR : ''); - $namespace = 'app' . ($app ? '\\' . $app : ''); - - // 创建配置文件和公共文件 - $this->buildCommon($app); - // 创建模块的默认页面 - $this->buildHello($app, $namespace); - - foreach ($list as $path => $file) { - if ('__dir__' == $path) { - // 生成子目录 - foreach ($file as $dir) { - $this->checkDirBuild($appPath . $dir); - } - } elseif ('__file__' == $path) { - // 生成(空白)文件 - foreach ($file as $name) { - if (!is_file($appPath . $name)) { - file_put_contents($appPath . $name, 'php' == pathinfo($name, PATHINFO_EXTENSION) ? '<?php' . PHP_EOL : ''); - } - } - } else { - // 生成相关MVC文件 - foreach ($file as $val) { - $val = trim($val); - $filename = $appPath . $path . DIRECTORY_SEPARATOR . $val . '.php'; - $space = $namespace . '\\' . $path; - $class = $val; - switch ($path) { - case 'controller': // 控制器 - if ($this->app->config->get('route.controller_suffix')) { - $filename = $appPath . $path . DIRECTORY_SEPARATOR . $val . 'Controller.php'; - $class = $val . 'Controller'; - } - $content = "<?php" . PHP_EOL . "namespace {$space};" . PHP_EOL . PHP_EOL . "class {$class}" . PHP_EOL . "{" . PHP_EOL . PHP_EOL . "}"; - break; - case 'model': // 模型 - $content = "<?php" . PHP_EOL . "namespace {$space};" . PHP_EOL . PHP_EOL . "use think\Model;" . PHP_EOL . PHP_EOL . "class {$class} extends Model" . PHP_EOL . "{" . PHP_EOL . PHP_EOL . "}"; - break; - case 'view': // 视图 - $filename = $appPath . $path . DIRECTORY_SEPARATOR . $val . '.html'; - $this->checkDirBuild(dirname($filename)); - $content = ''; - break; - default: - // 其他文件 - $content = "<?php" . PHP_EOL . "namespace {$space};" . PHP_EOL . PHP_EOL . "class {$class}" . PHP_EOL . "{" . PHP_EOL . PHP_EOL . "}"; - } - - if (!is_file($filename)) { - file_put_contents($filename, $content); - } - } - } - } - } - - /** - * 创建应用的欢迎页面 - * @access protected - * @param string $app 目录 - * @param string $namespace 类库命名空间 - * @return void - */ - protected function buildHello(string $app, string $namespace): void - { - $suffix = $this->app->config->get('route.controller_suffix') ? 'Controller' : ''; - $filename = $this->basePath . ($app ? $app . DIRECTORY_SEPARATOR : '') . 'controller' . DIRECTORY_SEPARATOR . 'Index' . $suffix . '.php'; - - if (!is_file($filename)) { - $content = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'controller.stub'); - $content = str_replace(['{%name%}', '{%app%}', '{%layer%}', '{%suffix%}'], [$app, $namespace, 'controller', $suffix], $content); - $this->checkDirBuild(dirname($filename)); - - file_put_contents($filename, $content); - } - } - - /** - * 创建应用的公共文件 - * @access protected - * @param string $app 目录 - * @return void - */ - protected function buildCommon(string $app): void - { - $appPath = $this->basePath . ($app ? $app . DIRECTORY_SEPARATOR : ''); - - if (!is_file($appPath . 'common.php')) { - file_put_contents($appPath . 'common.php', "<?php" . PHP_EOL . "// 这是系统自动生成的公共文件" . PHP_EOL); - } - - foreach (['event', 'middleware', 'common'] as $name) { - if (!is_file($appPath . $name . '.php')) { - file_put_contents($appPath . $name . '.php', "<?php" . PHP_EOL . "// 这是系统自动生成的{$name}定义文件" . PHP_EOL . "return [" . PHP_EOL . PHP_EOL . "];" . PHP_EOL); - } - } - } - - /** - * 创建目录 - * @access protected - * @param string $dirname 目录名称 - * @return void - */ - protected function checkDirBuild(string $dirname): void - { - if (!is_dir($dirname)) { - mkdir($dirname, 0755, true); - } - } -} diff --git a/vendor/topthink/think-multi-app/src/command/Clear.php b/vendor/topthink/think-multi-app/src/command/Clear.php deleted file mode 100644 index f5283a3..0000000 --- a/vendor/topthink/think-multi-app/src/command/Clear.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -namespace think\app\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\input\Option; -use think\console\Output; - -class Clear extends Command -{ - protected function configure() - { - // 指令配置 - $this->setName('clear') - ->addArgument('app', Argument::OPTIONAL, 'app name .') - ->addOption('cache', 'c', Option::VALUE_NONE, 'clear cache file') - ->addOption('log', 'l', Option::VALUE_NONE, 'clear log file') - ->addOption('dir', 'r', Option::VALUE_NONE, 'clear empty dir') - ->setDescription('Clear runtime file'); - } - - protected function execute(Input $input, Output $output) - { - $app = $input->getArgument('app') ?: ''; - $runtimePath = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . ($app ? $app . DIRECTORY_SEPARATOR : ''); - - if ($input->getOption('cache')) { - $path = $runtimePath . 'cache'; - } elseif ($input->getOption('log')) { - $path = $runtimePath . 'log'; - } else { - $path = $runtimePath; - } - - $rmdir = $input->getOption('dir') ? true : false; - $this->clear(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR, $rmdir); - - $output->writeln("<info>Clear Successed</info>"); - } - - protected function clear(string $path, bool $rmdir): void - { - $files = is_dir($path) ? scandir($path) : []; - - foreach ($files as $file) { - if ('.' != $file && '..' != $file && is_dir($path . $file)) { - array_map('unlink', glob($path . $file . DIRECTORY_SEPARATOR . '*.*')); - if ($rmdir) { - rmdir($path . $file); - } - } elseif ('.gitignore' != $file && is_file($path . $file)) { - unlink($path . $file); - } - } - } -} diff --git a/vendor/topthink/think-multi-app/src/command/stubs/controller.stub b/vendor/topthink/think-multi-app/src/command/stubs/controller.stub deleted file mode 100644 index 263c4c6..0000000 --- a/vendor/topthink/think-multi-app/src/command/stubs/controller.stub +++ /dev/null @@ -1,12 +0,0 @@ -<?php -declare (strict_types = 1); - -namespace {%app%}\{%layer%}; - -class Index{%suffix%} -{ - public function index() - { - return '您好!这是一个[{%name%}]示例应用'; - } -} diff --git a/vendor/topthink/think-orm/.gitattributes b/vendor/topthink/think-orm/.gitattributes deleted file mode 100644 index 36c9cd1..0000000 --- a/vendor/topthink/think-orm/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -/.github export-ignore -/tests export-ignore -/phpunit.xml export-ignore \ No newline at end of file diff --git a/vendor/topthink/think-orm/.gitignore b/vendor/topthink/think-orm/.gitignore deleted file mode 100644 index 82cfc4e..0000000 --- a/vendor/topthink/think-orm/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.idea -composer.lock -vendor diff --git a/vendor/topthink/think-orm/LICENSE b/vendor/topthink/think-orm/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/vendor/topthink/think-orm/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/topthink/think-orm/README.md b/vendor/topthink/think-orm/README.md deleted file mode 100644 index c65afe9..0000000 --- a/vendor/topthink/think-orm/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# ThinkORM - -基于PHP7.1+ 和PDO实现的ORM,支持多数据库,2.0版本主要特性包括: - -* 基于PDO和PHP强类型实现 -* 支持原生查询和查询构造器 -* 自动参数绑定和预查询 -* 简洁易用的查询功能 -* 强大灵活的模型用法 -* 支持预载入关联查询和延迟关联查询 -* 支持多数据库及动态切换 -* 支持`MongoDb` -* 支持分布式及事务 -* 支持断点重连 -* 支持`JSON`查询 -* 支持数据库日志 -* 支持`PSR-16`缓存及`PSR-3`日志规范 - - -## 安装 -~~~ -composer require topthink/think-orm -~~~ - -## 文档 - -详细参考 [ThinkORM开发指南](https://www.kancloud.cn/manual/think-orm/content) diff --git a/vendor/topthink/think-orm/composer.json b/vendor/topthink/think-orm/composer.json deleted file mode 100644 index 097d924..0000000 --- a/vendor/topthink/think-orm/composer.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "topthink/think-orm", - "description": "think orm", - "keywords": [ - "orm", - "database" - ], - "license": "Apache-2.0", - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "require": { - "php": ">=7.1.0", - "ext-json": "*", - "ext-pdo": "*", - "psr/simple-cache": "^1.0|^2.0", - "psr/log": "^1.0|^2.0", - "topthink/think-helper":"^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^7|^8|^9.5" - }, - "autoload": { - "psr-4": { - "think\\": "src" - }, - "files": [ - "stubs/load_stubs.php" - ] - }, - "autoload-dev": { - "psr-4": { - "tests\\": "tests" - } - }, - "config": { - "sort-packages": true - } -} diff --git a/vendor/topthink/think-orm/src/DbManager.php b/vendor/topthink/think-orm/src/DbManager.php deleted file mode 100644 index 1c1314e..0000000 --- a/vendor/topthink/think-orm/src/DbManager.php +++ /dev/null @@ -1,386 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use InvalidArgumentException; -use Psr\Log\LoggerInterface; -use Psr\SimpleCache\CacheInterface; -use think\db\BaseQuery; -use think\db\ConnectionInterface; -use think\db\Query; -use think\db\Raw; - -/** - * Class DbManager - * @package think - * @mixin BaseQuery - * @mixin Query - */ -class DbManager -{ - /** - * 数据库连接实例 - * @var array - */ - protected $instance = []; - - /** - * 数据库配置 - * @var array - */ - protected $config = []; - - /** - * Event对象或者数组 - * @var array|object - */ - protected $event; - - /** - * SQL监听 - * @var array - */ - protected $listen = []; - - /** - * SQL日志 - * @var array - */ - protected $dbLog = []; - - /** - * 查询次数 - * @var int - */ - protected $queryTimes = 0; - - /** - * 查询缓存对象 - * @var CacheInterface - */ - protected $cache; - - /** - * 查询日志对象 - * @var LoggerInterface - */ - protected $log; - - /** - * 架构函数 - * @access public - */ - public function __construct() - { - $this->modelMaker(); - } - - /** - * 注入模型对象 - * @access public - * @return void - */ - protected function modelMaker() - { - Model::setDb($this); - - if (is_object($this->event)) { - Model::setEvent($this->event); - } - - Model::maker(function (Model $model) { - $isAutoWriteTimestamp = $model->getAutoWriteTimestamp(); - - if (is_null($isAutoWriteTimestamp)) { - // 自动写入时间戳 - $model->isAutoWriteTimestamp($this->getConfig('auto_timestamp', true)); - } - - $dateFormat = $model->getDateFormat(); - - if (is_null($dateFormat)) { - // 设置时间戳格式 - $model->setDateFormat($this->getConfig('datetime_format', 'Y-m-d H:i:s')); - } - }); - } - - /** - * 监听SQL - * @access protected - * @return void - */ - public function triggerSql(): void - {} - - /** - * 初始化配置参数 - * @access public - * @param array $config 连接配置 - * @return void - */ - public function setConfig($config): void - { - $this->config = $config; - } - - /** - * 设置缓存对象 - * @access public - * @param CacheInterface $cache 缓存对象 - * @return void - */ - public function setCache(CacheInterface $cache): void - { - $this->cache = $cache; - } - - /** - * 设置日志对象 - * @access public - * @param LoggerInterface $log 日志对象 - * @return void - */ - public function setLog(LoggerInterface $log): void - { - $this->log = $log; - } - - /** - * 记录SQL日志 - * @access protected - * @param string $log SQL日志信息 - * @param string $type 日志类型 - * @return void - */ - public function log(string $log, string $type = 'sql') - { - if ($this->log) { - $this->log->log($type, $log); - } else { - $this->dbLog[$type][] = $log; - } - } - - /** - * 获得查询日志(没有设置日志对象使用) - * @access public - * @param bool $clear 是否清空 - * @return array - */ - public function getDbLog(bool $clear = false): array - { - $logs = $this->dbLog; - if ($clear) { - $this->dbLog = []; - } - - return $logs; - } - - /** - * 获取配置参数 - * @access public - * @param string $name 配置参数 - * @param mixed $default 默认值 - * @return mixed - */ - public function getConfig(string $name = '', $default = null) - { - if ('' === $name) { - return $this->config; - } - - return $this->config[$name] ?? $default; - } - - /** - * 创建/切换数据库连接查询 - * @access public - * @param string|null $name 连接配置标识 - * @param bool $force 强制重新连接 - * @return ConnectionInterface - */ - public function connect(string $name = null, bool $force = false) - { - return $this->instance($name, $force); - } - - /** - * 创建数据库连接实例 - * @access protected - * @param string|null $name 连接标识 - * @param bool $force 强制重新连接 - * @return ConnectionInterface - */ - protected function instance(string $name = null, bool $force = false): ConnectionInterface - { - if (empty($name)) { - $name = $this->getConfig('default', 'mysql'); - } - - if ($force || !isset($this->instance[$name])) { - $this->instance[$name] = $this->createConnection($name); - } - - return $this->instance[$name]; - } - - /** - * 获取连接配置 - * @param string $name - * @return array - */ - protected function getConnectionConfig(string $name): array - { - $connections = $this->getConfig('connections'); - if (!isset($connections[$name])) { - throw new InvalidArgumentException('Undefined db config:' . $name); - } - - return $connections[$name]; - } - - /** - * 创建连接 - * @param $name - * @return ConnectionInterface - */ - protected function createConnection(string $name): ConnectionInterface - { - $config = $this->getConnectionConfig($name); - - $type = !empty($config['type']) ? $config['type'] : 'mysql'; - - if (false !== strpos($type, '\\')) { - $class = $type; - } else { - $class = '\\think\\db\\connector\\' . ucfirst($type); - } - - /** @var ConnectionInterface $connection */ - $connection = new $class($config); - $connection->setDb($this); - - if ($this->cache) { - $connection->setCache($this->cache); - } - - return $connection; - } - - /** - * 使用表达式设置数据 - * @access public - * @param string $value 表达式 - * @return Raw - */ - public function raw(string $value): Raw - { - return new Raw($value); - } - - /** - * 更新查询次数 - * @access public - * @return void - */ - public function updateQueryTimes(): void - { - $this->queryTimes++; - } - - /** - * 重置查询次数 - * @access public - * @return void - */ - public function clearQueryTimes(): void - { - $this->queryTimes = 0; - } - - /** - * 获得查询次数 - * @access public - * @return integer - */ - public function getQueryTimes(): int - { - return $this->queryTimes; - } - - /** - * 监听SQL执行 - * @access public - * @param callable $callback 回调方法 - * @return void - */ - public function listen(callable $callback): void - { - $this->listen[] = $callback; - } - - /** - * 获取监听SQL执行 - * @access public - * @return array - */ - public function getListen(): array - { - return $this->listen; - } - - /** - * 获取所有连接实列 - * @access public - * @return array - */ - public function getInstance(): array - { - return $this->instance; - } - - /** - * 注册回调方法 - * @access public - * @param string $event 事件名 - * @param callable $callback 回调方法 - * @return void - */ - public function event(string $event, callable $callback): void - { - $this->event[$event][] = $callback; - } - - /** - * 触发事件 - * @access public - * @param string $event 事件名 - * @param mixed $params 传入参数 - * @return mixed - */ - public function trigger(string $event, $params = null) - { - if (isset($this->event[$event])) { - foreach ($this->event[$event] as $callback) { - call_user_func_array($callback, [$params]); - } - } - } - - public function __call($method, $args) - { - return call_user_func_array([$this->connect(), $method], $args); - } -} diff --git a/vendor/topthink/think-orm/src/Model.php b/vendor/topthink/think-orm/src/Model.php deleted file mode 100644 index a8332e9..0000000 --- a/vendor/topthink/think-orm/src/Model.php +++ /dev/null @@ -1,1073 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use ArrayAccess; -use Closure; -use JsonSerializable; -use think\contract\Arrayable; -use think\contract\Jsonable; -use think\db\BaseQuery as Query; - -/** - * Class Model - * @package think - * @mixin Query - * @method void onAfterRead(Model $model) static after_read事件定义 - * @method mixed onBeforeInsert(Model $model) static before_insert事件定义 - * @method void onAfterInsert(Model $model) static after_insert事件定义 - * @method mixed onBeforeUpdate(Model $model) static before_update事件定义 - * @method void onAfterUpdate(Model $model) static after_update事件定义 - * @method mixed onBeforeWrite(Model $model) static before_write事件定义 - * @method void onAfterWrite(Model $model) static after_write事件定义 - * @method mixed onBeforeDelete(Model $model) static before_write事件定义 - * @method void onAfterDelete(Model $model) static after_delete事件定义 - * @method void onBeforeRestore(Model $model) static before_restore事件定义 - * @method void onAfterRestore(Model $model) static after_restore事件定义 - */ -abstract class Model implements JsonSerializable, ArrayAccess, Arrayable, Jsonable -{ - use model\concern\Attribute; - use model\concern\RelationShip; - use model\concern\ModelEvent; - use model\concern\TimeStamp; - use model\concern\Conversion; - - /** - * 数据是否存在 - * @var bool - */ - private $exists = false; - - /** - * 是否强制更新所有数据 - * @var bool - */ - private $force = false; - - /** - * 是否Replace - * @var bool - */ - private $replace = false; - - /** - * 数据表后缀 - * @var string - */ - protected $suffix; - - /** - * 更新条件 - * @var array - */ - private $updateWhere; - - /** - * 数据库配置 - * @var string - */ - protected $connection; - - /** - * 模型名称 - * @var string - */ - protected $name; - - /** - * 主键值 - * @var string - */ - protected $key; - - /** - * 数据表名称 - * @var string - */ - protected $table; - - /** - * 初始化过的模型. - * @var array - */ - protected static $initialized = []; - - /** - * 软删除字段默认值 - * @var mixed - */ - protected $defaultSoftDelete; - - /** - * 全局查询范围 - * @var array - */ - protected $globalScope = []; - - /** - * 延迟保存信息 - * @var bool - */ - private $lazySave = false; - - /** - * Db对象 - * @var DbManager - */ - protected static $db; - - /** - * 容器对象的依赖注入方法 - * @var callable - */ - protected static $invoker; - - /** - * 服务注入 - * @var Closure[] - */ - protected static $maker = []; - - /** - * 方法注入 - * @var Closure[][] - */ - protected static $macro = []; - - /** - * 设置服务注入 - * @access public - * @param Closure $maker - * @return void - */ - public static function maker(Closure $maker) - { - static::$maker[] = $maker; - } - - /** - * 设置方法注入 - * @access public - * @param string $method - * @param Closure $closure - * @return void - */ - public static function macro(string $method, Closure $closure) - { - if (!isset(static::$macro[static::class])) { - static::$macro[static::class] = []; - } - static::$macro[static::class][$method] = $closure; - } - - /** - * 设置Db对象 - * @access public - * @param DbManager $db Db对象 - * @return void - */ - public static function setDb(DbManager $db) - { - self::$db = $db; - } - - /** - * 设置容器对象的依赖注入方法 - * @access public - * @param callable $callable 依赖注入方法 - * @return void - */ - public static function setInvoker(callable $callable): void - { - self::$invoker = $callable; - } - - /** - * 调用反射执行模型方法 支持参数绑定 - * @access public - * @param mixed $method - * @param array $vars 参数 - * @return mixed - */ - public function invoke($method, array $vars = []) - { - if (self::$invoker) { - $call = self::$invoker; - return $call($method instanceof Closure ? $method : Closure::fromCallable([$this, $method]), $vars); - } - - return call_user_func_array($method instanceof Closure ? $method : [$this, $method], $vars); - } - - /** - * 架构函数 - * @access public - * @param array $data 数据 - */ - public function __construct(array $data = []) - { - $this->data = $data; - - if (!empty($this->data)) { - // 废弃字段 - foreach ((array) $this->disuse as $key) { - if (array_key_exists($key, $this->data)) { - unset($this->data[$key]); - } - } - } - - // 记录原始数据 - $this->origin = $this->data; - - if (empty($this->name)) { - // 当前模型名 - $name = str_replace('\\', '/', static::class); - $this->name = basename($name); - } - - if (!empty(static::$maker)) { - foreach (static::$maker as $maker) { - call_user_func($maker, $this); - } - } - - // 执行初始化操作 - $this->initialize(); - } - - /** - * 获取当前模型名称 - * @access public - * @return string - */ - public function getName(): string - { - return $this->name; - } - - /** - * 创建新的模型实例 - * @access public - * @param array $data 数据 - * @param mixed $where 更新条件 - * @param array $options 参数 - * @return Model - */ - public function newInstance(array $data = [], $where = null, array $options = []): Model - { - $model = new static($data); - - if ($this->connection) { - $model->setConnection($this->connection); - } - - if ($this->suffix) { - $model->setSuffix($this->suffix); - } - - if (empty($data)) { - return $model; - } - - $model->exists(true); - - $model->setUpdateWhere($where); - - $model->trigger('AfterRead'); - - return $model; - } - - /** - * 设置模型的更新条件 - * @access protected - * @param mixed $where 更新条件 - * @return void - */ - protected function setUpdateWhere($where): void - { - $this->updateWhere = $where; - } - - /** - * 设置当前模型的数据库连接 - * @access public - * @param string $connection 数据表连接标识 - * @return $this - */ - public function setConnection(string $connection) - { - $this->connection = $connection; - return $this; - } - - /** - * 获取当前模型的数据库连接标识 - * @access public - * @return string - */ - public function getConnection(): string - { - return $this->connection ?: ''; - } - - /** - * 设置当前模型数据表的后缀 - * @access public - * @param string $suffix 数据表后缀 - * @return $this - */ - public function setSuffix(string $suffix) - { - $this->suffix = $suffix; - return $this; - } - - /** - * 获取当前模型的数据表后缀 - * @access public - * @return string - */ - public function getSuffix(): string - { - return $this->suffix ?: ''; - } - - /** - * 获取当前模型的数据库查询对象 - * @access public - * @param array $scope 设置不使用的全局查询范围 - * @return Query - */ - public function db($scope = []): Query - { - /** @var Query $query */ - $query = self::$db->connect($this->connection) - ->name($this->name . $this->suffix) - ->pk($this->pk); - - if (!empty($this->table)) { - $query->table($this->table . $this->suffix); - } - - $query->model($this) - ->json($this->json, $this->jsonAssoc) - ->setFieldType(array_merge($this->schema, $this->jsonType)); - - // 软删除 - if (property_exists($this, 'withTrashed') && !$this->withTrashed) { - $this->withNoTrashed($query); - } - - // 全局作用域 - if (is_array($scope)) { - $globalScope = array_diff($this->globalScope, $scope); - $query->scope($globalScope); - } - - // 返回当前模型的数据库查询对象 - return $query; - } - - /** - * 初始化模型 - * @access private - * @return void - */ - private function initialize(): void - { - if (!isset(static::$initialized[static::class])) { - static::$initialized[static::class] = true; - static::init(); - } - } - - /** - * 初始化处理 - * @access protected - * @return void - */ - protected static function init() - { - } - - protected function checkData(): void - { - } - - protected function checkResult($result): void - { - } - - /** - * 更新是否强制写入数据 而不做比较(亦可用于软删除的强制删除) - * @access public - * @param bool $force - * @return $this - */ - public function force(bool $force = true) - { - $this->force = $force; - return $this; - } - - /** - * 判断force - * @access public - * @return bool - */ - public function isForce(): bool - { - return $this->force; - } - - /** - * 新增数据是否使用Replace - * @access public - * @param bool $replace - * @return $this - */ - public function replace(bool $replace = true) - { - $this->replace = $replace; - return $this; - } - - /** - * 刷新模型数据 - * @access public - * @param bool $relation 是否刷新关联数据 - * @return $this - */ - public function refresh(bool $relation = false) - { - if ($this->exists) { - $this->data = $this->db()->find($this->getKey())->getData(); - $this->origin = $this->data; - $this->get = []; - - if ($relation) { - $this->relation = []; - } - } - - return $this; - } - - /** - * 设置数据是否存在 - * @access public - * @param bool $exists - * @return $this - */ - public function exists(bool $exists = true) - { - $this->exists = $exists; - return $this; - } - - /** - * 判断数据是否存在数据库 - * @access public - * @return bool - */ - public function isExists(): bool - { - return $this->exists; - } - - /** - * 判断模型是否为空 - * @access public - * @return bool - */ - public function isEmpty(): bool - { - return empty($this->data); - } - - /** - * 延迟保存当前数据对象 - * @access public - * @param array|bool $data 数据 - * @return void - */ - public function lazySave($data = []): void - { - if (false === $data) { - $this->lazySave = false; - } else { - if (is_array($data)) { - $this->setAttrs($data); - } - - $this->lazySave = true; - } - } - - /** - * 保存当前数据对象 - * @access public - * @param array $data 数据 - * @param string $sequence 自增序列名 - * @return bool - */ - public function save(array $data = [], string $sequence = null): bool - { - // 数据对象赋值 - $this->setAttrs($data); - - if ($this->isEmpty() || false === $this->trigger('BeforeWrite')) { - return false; - } - - $result = $this->exists ? $this->updateData() : $this->insertData($sequence); - - if (false === $result) { - return false; - } - - // 写入回调 - $this->trigger('AfterWrite'); - - // 重新记录原始数据 - $this->origin = $this->data; - $this->get = []; - $this->lazySave = false; - - return true; - } - - /** - * 检查数据是否允许写入 - * @access protected - * @return array - */ - protected function checkAllowFields(): array - { - // 检测字段 - if (empty($this->field)) { - if (!empty($this->schema)) { - $this->field = array_keys(array_merge($this->schema, $this->jsonType)); - } else { - $query = $this->db(); - $table = $this->table ? $this->table . $this->suffix : $query->getTable(); - - $this->field = $query->getConnection()->getTableFields($table); - } - - return $this->field; - } - - $field = $this->field; - - if ($this->autoWriteTimestamp) { - array_push($field, $this->createTime, $this->updateTime); - } - - if (!empty($this->disuse)) { - // 废弃字段 - $field = array_diff($field, $this->disuse); - } - - return $field; - } - - /** - * 保存写入数据 - * @access protected - * @return bool - */ - protected function updateData(): bool - { - // 事件回调 - if (false === $this->trigger('BeforeUpdate')) { - return false; - } - - $this->checkData(); - - // 获取有更新的数据 - $data = $this->getChangedData(); - - if (empty($data)) { - // 关联更新 - if (!empty($this->relationWrite)) { - $this->autoRelationUpdate(); - } - - return true; - } - - if ($this->autoWriteTimestamp && $this->updateTime) { - // 自动写入更新时间 - $data[$this->updateTime] = $this->autoWriteTimestamp(); - $this->data[$this->updateTime] = $data[$this->updateTime]; - } - - // 检查允许字段 - $allowFields = $this->checkAllowFields(); - - foreach ($this->relationWrite as $name => $val) { - if (!is_array($val)) { - continue; - } - - foreach ($val as $key) { - if (isset($data[$key])) { - unset($data[$key]); - } - } - } - - // 模型更新 - $db = $this->db(); - - $db->transaction(function () use ($data, $allowFields, $db) { - $this->key = null; - $where = $this->getWhere(); - - $result = $db->where($where) - ->strict(false) - ->cache(true) - ->setOption('key', $this->key) - ->field($allowFields) - ->update($data); - - $this->checkResult($result); - - // 关联更新 - if (!empty($this->relationWrite)) { - $this->autoRelationUpdate(); - } - }); - - // 更新回调 - $this->trigger('AfterUpdate'); - - return true; - } - - /** - * 新增写入数据 - * @access protected - * @param string $sequence 自增名 - * @return bool - */ - protected function insertData(string $sequence = null): bool - { - if (false === $this->trigger('BeforeInsert')) { - return false; - } - - $this->checkData(); - $data = $this->data; - - // 时间戳自动写入 - if ($this->autoWriteTimestamp) { - if ($this->createTime && !isset($data[$this->createTime])) { - $data[$this->createTime] = $this->autoWriteTimestamp(); - $this->data[$this->createTime] = $data[$this->createTime]; - } - - if ($this->updateTime && !isset($data[$this->updateTime])) { - $data[$this->updateTime] = $this->autoWriteTimestamp(); - $this->data[$this->updateTime] = $data[$this->updateTime]; - } - } - - // 检查允许字段 - $allowFields = $this->checkAllowFields(); - - $db = $this->db(); - - $db->transaction(function () use ($data, $sequence, $allowFields, $db) { - $result = $db->strict(false) - ->field($allowFields) - ->replace($this->replace) - ->sequence($sequence) - ->insert($data, true); - - // 获取自动增长主键 - if ($result) { - $pk = $this->getPk(); - - if (is_string($pk) && (!isset($this->data[$pk]) || '' == $this->data[$pk])) { - unset($this->get[$pk]); - $this->data[$pk] = $result; - } - } - - // 关联写入 - if (!empty($this->relationWrite)) { - $this->autoRelationInsert(); - } - }); - - // 标记数据已经存在 - $this->exists = true; - $this->origin = $this->data; - - // 新增回调 - $this->trigger('AfterInsert'); - - return true; - } - - /** - * 获取当前的更新条件 - * @access public - * @return mixed - */ - public function getWhere() - { - $pk = $this->getPk(); - - if (is_string($pk) && isset($this->origin[$pk])) { - $where = [[$pk, '=', $this->origin[$pk]]]; - $this->key = $this->origin[$pk]; - } elseif (is_array($pk)) { - foreach ($pk as $field) { - if (isset($this->origin[$field])) { - $where[] = [$field, '=', $this->origin[$field]]; - } - } - } - - if (empty($where)) { - $where = empty($this->updateWhere) ? null : $this->updateWhere; - } - - return $where; - } - - /** - * 保存多个数据到当前数据对象 - * @access public - * @param iterable $dataSet 数据 - * @param boolean $replace 是否自动识别更新和写入 - * @return Collection - * @throws \Exception - */ - public function saveAll(iterable $dataSet, bool $replace = true): Collection - { - $db = $this->db(); - - $result = $db->transaction(function () use ($replace, $dataSet) { - - $pk = $this->getPk(); - - $result = []; - $suffix = $this->getSuffix(); - - foreach ($dataSet as $key => $data) { - if ($replace) { - $exists = true; - foreach ((array) $pk as $field) { - if (!isset($data[$field])) { - $exists = false; - } - } - } - - if ($replace && !empty($exists)) { - $result[$key] = static::update($data, [], [], $suffix); - } else { - $result[$key] = static::create($data, $this->field, $this->replace, $suffix); - } - } - - return $result; - }); - - return $this->toCollection($result); - } - - /** - * 删除当前的记录 - * @access public - * @return bool - */ - public function delete(): bool - { - if (!$this->exists || $this->isEmpty() || false === $this->trigger('BeforeDelete')) { - return false; - } - - // 读取更新条件 - $where = $this->getWhere(); - - $db = $this->db(); - - $db->transaction(function () use ($where, $db) { - // 删除当前模型数据 - $db->where($where)->delete(); - - // 关联删除 - if (!empty($this->relationWrite)) { - $this->autoRelationDelete(); - } - }); - - $this->trigger('AfterDelete'); - - $this->exists = false; - $this->lazySave = false; - - return true; - } - - /** - * 写入数据 - * @access public - * @param array $data 数据数组 - * @param array $allowField 允许字段 - * @param bool $replace 使用Replace - * @param string $suffix 数据表后缀 - * @return static - */ - public static function create(array $data, array $allowField = [], bool $replace = false, string $suffix = ''): Model - { - $model = new static(); - - if (!empty($allowField)) { - $model->allowField($allowField); - } - - if (!empty($suffix)) { - $model->setSuffix($suffix); - } - - $model->replace($replace)->save($data); - - return $model; - } - - /** - * 更新数据 - * @access public - * @param array $data 数据数组 - * @param mixed $where 更新条件 - * @param array $allowField 允许字段 - * @param string $suffix 数据表后缀 - * @return static - */ - public static function update(array $data, $where = [], array $allowField = [], string $suffix = '') - { - $model = new static(); - - if (!empty($allowField)) { - $model->allowField($allowField); - } - - if (!empty($where)) { - $model->setUpdateWhere($where); - } - - if (!empty($suffix)) { - $model->setSuffix($suffix); - } - - $model->exists(true)->save($data); - - return $model; - } - - /** - * 删除记录 - * @access public - * @param mixed $data 主键列表 支持闭包查询条件 - * @param bool $force 是否强制删除 - * @return bool - */ - public static function destroy($data, bool $force = false): bool - { - if (empty($data) && 0 !== $data) { - return false; - } - - $model = new static(); - - $query = $model->db(); - - if (is_array($data) && key($data) !== 0) { - $query->where($data); - $data = null; - } elseif ($data instanceof \Closure) { - $data($query); - $data = null; - } - - $resultSet = $query->select($data); - - foreach ($resultSet as $result) { - $result->force($force)->delete(); - } - - return true; - } - - /** - * 解序列化后处理 - */ - public function __wakeup() - { - $this->initialize(); - } - - /** - * 修改器 设置数据对象的值 - * @access public - * @param string $name 名称 - * @param mixed $value 值 - * @return void - */ - public function __set(string $name, $value): void - { - $this->setAttr($name, $value); - } - - /** - * 获取器 获取数据对象的值 - * @access public - * @param string $name 名称 - * @return mixed - */ - public function __get(string $name) - { - return $this->getAttr($name); - } - - /** - * 检测数据对象的值 - * @access public - * @param string $name 名称 - * @return bool - */ - public function __isset(string $name): bool - { - return !is_null($this->getAttr($name)); - } - - /** - * 销毁数据对象的值 - * @access public - * @param string $name 名称 - * @return void - */ - public function __unset(string $name): void - { - unset($this->data[$name], - $this->get[$name], - $this->relation[$name]); - } - - // ArrayAccess - #[\ReturnTypeWillChange] - public function offsetSet($name, $value) - { - $this->setAttr($name, $value); - } - - #[\ReturnTypeWillChange] - public function offsetExists($name): bool - { - return $this->__isset($name); - } - - #[\ReturnTypeWillChange] - public function offsetUnset($name) - { - $this->__unset($name); - } - - #[\ReturnTypeWillChange] - public function offsetGet($name) - { - return $this->getAttr($name); - } - - /** - * 设置不使用的全局查询范围 - * @access public - * @param array $scope 不启用的全局查询范围 - * @return Query - */ - public static function withoutGlobalScope(array $scope = null) - { - $model = new static(); - - return $model->db($scope); - } - - /** - * 切换后缀进行查询 - * @access public - * @param string $suffix 切换的表后缀 - * @return Model - */ - public static function suffix(string $suffix) - { - $model = new static(); - $model->setSuffix($suffix); - - return $model; - } - - /** - * 切换数据库连接进行查询 - * @access public - * @param string $connection 数据库连接标识 - * @return Model - */ - public static function connect(string $connection) - { - $model = new static(); - $model->setConnection($connection); - - return $model; - } - - public function __call($method, $args) - { - if (isset(static::$macro[static::class][$method])) { - return call_user_func_array(static::$macro[static::class][$method]->bindTo($this, static::class), $args); - } - - return call_user_func_array([$this->db(), $method], $args); - } - - public static function __callStatic($method, $args) - { - if (isset(static::$macro[static::class][$method])) { - return call_user_func_array(static::$macro[static::class][$method]->bindTo(null, static::class), $args); - } - - $model = new static(); - - return call_user_func_array([$model->db(), $method], $args); - } - - /** - * 析构方法 - * @access public - */ - public function __destruct() - { - if ($this->lazySave) { - $this->save(); - } - } -} diff --git a/vendor/topthink/think-orm/src/Paginator.php b/vendor/topthink/think-orm/src/Paginator.php deleted file mode 100644 index eace6ba..0000000 --- a/vendor/topthink/think-orm/src/Paginator.php +++ /dev/null @@ -1,537 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: zhangyajun <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use ArrayAccess; -use ArrayIterator; -use Closure; -use Countable; -use DomainException; -use IteratorAggregate; -use JsonSerializable; -use think\paginator\driver\Bootstrap; -use Traversable; - -/** - * 分页基础类 - * @mixin Collection - */ -abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable -{ - /** - * 是否简洁模式 - * @var bool - */ - protected $simple = false; - - /** - * 数据集 - * @var Collection - */ - protected $items; - - /** - * 当前页 - * @var int - */ - protected $currentPage; - - /** - * 最后一页 - * @var int - */ - protected $lastPage; - - /** - * 数据总数 - * @var integer|null - */ - protected $total; - - /** - * 每页数量 - * @var int - */ - protected $listRows; - - /** - * 是否有下一页 - * @var bool - */ - protected $hasMore; - - /** - * 分页配置 - * @var array - */ - protected $options = [ - 'var_page' => 'page', - 'path' => '/', - 'query' => [], - 'fragment' => '', - ]; - - /** - * 获取当前页码 - * @var Closure - */ - protected static $currentPageResolver; - - /** - * 获取当前路径 - * @var Closure - */ - protected static $currentPathResolver; - - /** - * @var Closure - */ - protected static $maker; - - public function __construct($items, int $listRows, int $currentPage = 1, int $total = null, bool $simple = false, array $options = []) - { - $this->options = array_merge($this->options, $options); - - $this->options['path'] = '/' != $this->options['path'] ? rtrim($this->options['path'], '/') : $this->options['path']; - - $this->simple = $simple; - $this->listRows = $listRows; - - if (!$items instanceof Collection) { - $items = Collection::make($items); - } - - if ($simple) { - $this->currentPage = $this->setCurrentPage($currentPage); - $this->hasMore = count($items) > ($this->listRows); - $items = $items->slice(0, $this->listRows); - } else { - $this->total = $total; - $this->lastPage = (int) ceil($total / $listRows); - $this->currentPage = $this->setCurrentPage($currentPage); - $this->hasMore = $this->currentPage < $this->lastPage; - } - $this->items = $items; - } - - /** - * @access public - * @param mixed $items - * @param int $listRows - * @param int $currentPage - * @param int $total - * @param bool $simple - * @param array $options - * @return Paginator - */ - public static function make($items, int $listRows, int $currentPage = 1, int $total = null, bool $simple = false, array $options = []) - { - if (isset(static::$maker)) { - return call_user_func(static::$maker, $items, $listRows, $currentPage, $total, $simple, $options); - } - - return new Bootstrap($items, $listRows, $currentPage, $total, $simple, $options); - } - - public static function maker(Closure $resolver) - { - static::$maker = $resolver; - } - - protected function setCurrentPage(int $currentPage): int - { - if (!$this->simple && $currentPage > $this->lastPage) { - return $this->lastPage > 0 ? $this->lastPage : 1; - } - - return $currentPage; - } - - /** - * 获取页码对应的链接 - * - * @access protected - * @param int $page - * @return string - */ - protected function url(int $page): string - { - if ($page <= 0) { - $page = 1; - } - - if (strpos($this->options['path'], '[PAGE]') === false) { - $parameters = [$this->options['var_page'] => $page]; - $path = $this->options['path']; - } else { - $parameters = []; - $path = str_replace('[PAGE]', (string) $page, $this->options['path']); - } - - if (count($this->options['query']) > 0) { - $parameters = array_merge($this->options['query'], $parameters); - } - - $url = $path; - if (!empty($parameters)) { - $url .= '?' . http_build_query($parameters, '', '&'); - } - - return $url . $this->buildFragment(); - } - - /** - * 自动获取当前页码 - * @access public - * @param string $varPage - * @param int $default - * @return int - */ - public static function getCurrentPage(string $varPage = 'page', int $default = 1): int - { - if (isset(static::$currentPageResolver)) { - return call_user_func(static::$currentPageResolver, $varPage); - } - - return $default; - } - - /** - * 设置获取当前页码闭包 - * @param Closure $resolver - */ - public static function currentPageResolver(Closure $resolver) - { - static::$currentPageResolver = $resolver; - } - - /** - * 自动获取当前的path - * @access public - * @param string $default - * @return string - */ - public static function getCurrentPath($default = '/'): string - { - if (isset(static::$currentPathResolver)) { - return call_user_func(static::$currentPathResolver); - } - - return $default; - } - - /** - * 设置获取当前路径闭包 - * @param Closure $resolver - */ - public static function currentPathResolver(Closure $resolver) - { - static::$currentPathResolver = $resolver; - } - - /** - * 获取数据总条数 - * @return int - */ - public function total(): int - { - if ($this->simple) { - throw new DomainException('not support total'); - } - - return $this->total; - } - - /** - * 获取每页数量 - * @return int - */ - public function listRows(): int - { - return $this->listRows; - } - - /** - * 获取当前页页码 - * @return int - */ - public function currentPage(): int - { - return $this->currentPage; - } - - /** - * 获取最后一页页码 - * @return int - */ - public function lastPage(): int - { - if ($this->simple) { - throw new DomainException('not support last'); - } - - return $this->lastPage; - } - - /** - * 数据是否足够分页 - * @access public - * @return bool - */ - public function hasPages(): bool - { - return !(1 == $this->currentPage && !$this->hasMore); - } - - /** - * 创建一组分页链接 - * - * @access public - * @param int $start - * @param int $end - * @return array - */ - public function getUrlRange(int $start, int $end): array - { - $urls = []; - - for ($page = $start; $page <= $end; $page++) { - $urls[$page] = $this->url($page); - } - - return $urls; - } - - /** - * 设置URL锚点 - * - * @access public - * @param string|null $fragment - * @return $this - */ - public function fragment(string $fragment = null) - { - $this->options['fragment'] = $fragment; - - return $this; - } - - /** - * 添加URL参数 - * - * @access public - * @param array $append - * @return $this - */ - public function appends(array $append) - { - foreach ($append as $k => $v) { - if ($k !== $this->options['var_page']) { - $this->options['query'][$k] = $v; - } - } - - return $this; - } - - /** - * 构造锚点字符串 - * - * @access public - * @return string - */ - protected function buildFragment(): string - { - return $this->options['fragment'] ? '#' . $this->options['fragment'] : ''; - } - - /** - * 渲染分页html - * @access public - * @return mixed - */ - abstract public function render(); - - public function items() - { - return $this->items->all(); - } - - /** - * 获取数据集 - * - * @return Collection|\think\model\Collection - */ - public function getCollection() - { - return $this->items; - } - - /** - * 设置数据集 - * - * @param Collection $items - * @return $this - */ - public function setCollection(Collection $items) - { - $this->items = $items; - - return $this; - } - - public function isEmpty(): bool - { - return $this->items->isEmpty(); - } - - /** - * 给每个元素执行个回调 - * - * @access public - * @param callable $callback - * @return $this - */ - public function each(callable $callback) - { - foreach ($this->items as $key => $item) { - $result = $callback($item, $key); - - if (false === $result) { - break; - } elseif (!is_object($item)) { - $this->items[$key] = $result; - } - } - - return $this; - } - - /** - * Retrieve an external iterator - * @access public - * @return Traversable An instance of an object implementing <b>Iterator</b> or - * <b>Traversable</b> - */ - #[\ReturnTypeWillChange] - public function getIterator(): Traversable - { - return new ArrayIterator($this->items->all()); - } - - /** - * Whether a offset exists - * @access public - * @param mixed $offset - * @return bool - */ - #[\ReturnTypeWillChange] - public function offsetExists($offset): bool - { - return $this->items->offsetExists($offset); - } - - /** - * Offset to retrieve - * @access public - * @param mixed $offset - * @return mixed - */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) - { - return $this->items->offsetGet($offset); - } - - /** - * Offset to set - * @access public - * @param mixed $offset - * @param mixed $value - */ - #[\ReturnTypeWillChange] - public function offsetSet($offset, $value) - { - $this->items->offsetSet($offset, $value); - } - - /** - * Offset to unset - * @access public - * @param mixed $offset - * @return void - * @since 5.0.0 - */ - #[\ReturnTypeWillChange] - public function offsetUnset($offset) - { - $this->items->offsetUnset($offset); - } - - /** - * 统计数据集条数 - * @return int - */ - public function count(): int - { - return $this->items->count(); - } - - public function __toString() - { - return (string) $this->render(); - } - - /** - * 转换为数组 - * @return array - */ - public function toArray(): array - { - try { - $total = $this->total(); - } catch (DomainException $e) { - $total = null; - } - - return [ - 'total' => $total, - 'per_page' => $this->listRows(), - 'current_page' => $this->currentPage(), - 'last_page' => $this->lastPage, - 'data' => $this->items->toArray(), - ]; - } - - /** - * Specify data which should be serialized to JSON - */ - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return $this->toArray(); - } - - public function __call($name, $arguments) - { - $result = call_user_func_array([$this->items, $name], $arguments); - - if ($result instanceof Collection) { - $this->items = $result; - return $this; - } - - return $result; - } - -} diff --git a/vendor/topthink/think-orm/src/db/BaseQuery.php b/vendor/topthink/think-orm/src/db/BaseQuery.php deleted file mode 100644 index 60aa21e..0000000 --- a/vendor/topthink/think-orm/src/db/BaseQuery.php +++ /dev/null @@ -1,1344 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db; - -use think\Collection; -use think\db\exception\DataNotFoundException; -use think\db\exception\DbException as Exception; -use think\db\exception\ModelNotFoundException; -use think\helper\Str; -use think\Model; -use think\Paginator; - -/** - * 数据查询基础类 - */ -abstract class BaseQuery -{ - use concern\TimeFieldQuery; - use concern\AggregateQuery; - use concern\ModelRelationQuery; - use concern\ResultOperation; - use concern\Transaction; - use concern\WhereQuery; - - /** - * 当前数据库连接对象 - * @var Connection - */ - protected $connection; - - /** - * 当前数据表名称(不含前缀) - * @var string - */ - protected $name = ''; - - /** - * 当前数据表主键 - * @var string|array - */ - protected $pk; - - /** - * 当前数据表自增主键 - * @var string - */ - protected $autoinc; - - /** - * 当前数据表前缀 - * @var string - */ - protected $prefix = ''; - - /** - * 当前查询参数 - * @var array - */ - protected $options = []; - - /** - * 架构函数 - * @access public - * @param ConnectionInterface $connection 数据库连接对象 - */ - public function __construct(ConnectionInterface $connection) - { - $this->connection = $connection; - - $this->prefix = $this->connection->getConfig('prefix'); - } - - /** - * 利用__call方法实现一些特殊的Model方法 - * @access public - * @param string $method 方法名称 - * @param array $args 调用参数 - * @return mixed - * @throws Exception - */ - public function __call(string $method, array $args) - { - if (strtolower(substr($method, 0, 5)) == 'getby') { - // 根据某个字段获取记录 - $field = Str::snake(substr($method, 5)); - return $this->where($field, '=', $args[0])->find(); - } elseif (strtolower(substr($method, 0, 10)) == 'getfieldby') { - // 根据某个字段获取记录的某个值 - $name = Str::snake(substr($method, 10)); - return $this->where($name, '=', $args[0])->value($args[1]); - } elseif (strtolower(substr($method, 0, 7)) == 'whereor') { - $name = Str::snake(substr($method, 7)); - array_unshift($args, $name); - return call_user_func_array([$this, 'whereOr'], $args); - } elseif (strtolower(substr($method, 0, 5)) == 'where') { - $name = Str::snake(substr($method, 5)); - array_unshift($args, $name); - return call_user_func_array([$this, 'where'], $args); - } elseif ($this->model && method_exists($this->model, 'scope' . $method)) { - // 动态调用命名范围 - $method = 'scope' . $method; - array_unshift($args, $this); - - call_user_func_array([$this->model, $method], $args); - return $this; - } else { - throw new Exception('method not exist:' . static::class . '->' . $method); - } - } - - /** - * 创建一个新的查询对象 - * @access public - * @return BaseQuery - */ - public function newQuery(): BaseQuery - { - $query = new static($this->connection); - - if ($this->model) { - $query->model($this->model); - } - - if (isset($this->options['table'])) { - $query->table($this->options['table']); - } else { - $query->name($this->name); - } - - if (!empty($this->options['json'])) { - $query->json($this->options['json'], $this->options['json_assoc']); - } - - if (isset($this->options['field_type'])) { - $query->setFieldType($this->options['field_type']); - } - - return $query; - } - - /** - * 获取当前的数据库Connection对象 - * @access public - * @return ConnectionInterface - */ - public function getConnection() - { - return $this->connection; - } - - /** - * 指定当前数据表名(不含前缀) - * @access public - * @param string $name 不含前缀的数据表名字 - * @return $this - */ - public function name(string $name) - { - $this->name = $name; - return $this; - } - - /** - * 获取当前的数据表名称 - * @access public - * @return string - */ - public function getName(): string - { - return $this->name ?: $this->model->getName(); - } - - /** - * 获取数据库的配置参数 - * @access public - * @param string $name 参数名称 - * @return mixed - */ - public function getConfig(string $name = '') - { - return $this->connection->getConfig($name); - } - - /** - * 得到当前或者指定名称的数据表 - * @access public - * @param string $name 不含前缀的数据表名字 - * @return mixed - */ - public function getTable(string $name = '') - { - if (empty($name) && isset($this->options['table'])) { - return $this->options['table']; - } - - $name = $name ?: $this->name; - - return $this->prefix . Str::snake($name); - } - - /** - * 设置字段类型信息 - * @access public - * @param array $type 字段类型信息 - * @return $this - */ - public function setFieldType(array $type) - { - $this->options['field_type'] = $type; - return $this; - } - - /** - * 获取最近一次查询的sql语句 - * @access public - * @return string - */ - public function getLastSql(): string - { - return $this->connection->getLastSql(); - } - - /** - * 获取返回或者影响的记录数 - * @access public - * @return integer - */ - public function getNumRows(): int - { - return $this->connection->getNumRows(); - } - - /** - * 获取最近插入的ID - * @access public - * @param string $sequence 自增序列名 - * @return mixed - */ - public function getLastInsID(string $sequence = null) - { - return $this->connection->getLastInsID($this, $sequence); - } - - /** - * 得到某个字段的值 - * @access public - * @param string $field 字段名 - * @param mixed $default 默认值 - * @return mixed - */ - public function value(string $field, $default = null) - { - $result = $this->connection->value($this, $field, $default); - - $array[$field] = $result; - $this->result($array); - - return $array[$field]; - } - - /** - * 得到某个列的数组 - * @access public - * @param string|array $field 字段名 多个字段用逗号分隔 - * @param string $key 索引 - * @return array - */ - public function column($field, string $key = ''): array - { - $result = $this->connection->column($this, $field, $key); - - if (count($result) != count($result, 1)) { - $this->resultSet($result, false); - } - - return $result; - } - - /** - * 查询SQL组装 union - * @access public - * @param mixed $union UNION - * @param boolean $all 是否适用UNION ALL - * @return $this - */ - public function union($union, bool $all = false) - { - $this->options['union']['type'] = $all ? 'UNION ALL' : 'UNION'; - - if (is_array($union)) { - $this->options['union'] = array_merge($this->options['union'], $union); - } else { - $this->options['union'][] = $union; - } - - return $this; - } - - /** - * 查询SQL组装 union all - * @access public - * @param mixed $union UNION数据 - * @return $this - */ - public function unionAll($union) - { - return $this->union($union, true); - } - - /** - * 指定查询字段 - * @access public - * @param mixed $field 字段信息 - * @return $this - */ - public function field($field) - { - if (empty($field)) { - return $this; - } elseif ($field instanceof Raw) { - $this->options['field'][] = $field; - return $this; - } - - if (is_string($field)) { - if (preg_match('/[\<\'\"\(]/', $field)) { - return $this->fieldRaw($field); - } - - $field = array_map('trim', explode(',', $field)); - } - - if (true === $field) { - // 获取全部字段 - $fields = $this->getTableFields(); - $field = $fields ?: ['*']; - } - - if (isset($this->options['field'])) { - $field = array_merge((array) $this->options['field'], $field); - } - - $this->options['field'] = array_unique($field, SORT_REGULAR); - - return $this; - } - - /** - * 指定要排除的查询字段 - * @access public - * @param array|string $field 要排除的字段 - * @return $this - */ - public function withoutField($field) - { - if (empty($field)) { - return $this; - } - - if (is_string($field)) { - $field = array_map('trim', explode(',', $field)); - } - - // 字段排除 - $fields = $this->getTableFields(); - $field = $fields ? array_diff($fields, $field) : $field; - - if (isset($this->options['field'])) { - $field = array_merge((array) $this->options['field'], $field); - } - - $this->options['field'] = array_unique($field, SORT_REGULAR); - - return $this; - } - - /** - * 指定其它数据表的查询字段 - * @access public - * @param mixed $field 字段信息 - * @param string $tableName 数据表名 - * @param string $prefix 字段前缀 - * @param string $alias 别名前缀 - * @return $this - */ - public function tableField($field, string $tableName, string $prefix = '', string $alias = '') - { - if (empty($field)) { - return $this; - } - - if (is_string($field)) { - $field = array_map('trim', explode(',', $field)); - } - - if (true === $field) { - // 获取全部字段 - $fields = $this->getTableFields($tableName); - $field = $fields ?: ['*']; - } - - // 添加统一的前缀 - $prefix = $prefix ?: $tableName; - foreach ($field as $key => &$val) { - if (is_numeric($key) && $alias) { - $field[$prefix . '.' . $val] = $alias . $val; - unset($field[$key]); - } elseif (is_numeric($key)) { - $val = $prefix . '.' . $val; - } - } - - if (isset($this->options['field'])) { - $field = array_merge((array) $this->options['field'], $field); - } - - $this->options['field'] = array_unique($field, SORT_REGULAR); - - return $this; - } - - /** - * 设置数据 - * @access public - * @param array $data 数据 - * @return $this - */ - public function data(array $data) - { - $this->options['data'] = $data; - - return $this; - } - - /** - * 去除查询参数 - * @access public - * @param string $option 参数名 留空去除所有参数 - * @return $this - */ - public function removeOption(string $option = '') - { - if ('' === $option) { - $this->options = []; - $this->bind = []; - } elseif (isset($this->options[$option])) { - unset($this->options[$option]); - } - - return $this; - } - - /** - * 指定查询数量 - * @access public - * @param int $offset 起始位置 - * @param int $length 查询数量 - * @return $this - */ - public function limit(int $offset, int $length = null) - { - $this->options['limit'] = $offset . ($length ? ',' . $length : ''); - - return $this; - } - - /** - * 指定分页 - * @access public - * @param int $page 页数 - * @param int $listRows 每页数量 - * @return $this - */ - public function page(int $page, int $listRows = null) - { - $this->options['page'] = [$page, $listRows]; - - return $this; - } - - /** - * 指定当前操作的数据表 - * @access public - * @param mixed $table 表名 - * @return $this - */ - public function table($table) - { - if (is_string($table)) { - if (strpos($table, ')')) { - // 子查询 - } elseif (false === strpos($table, ',')) { - if (strpos($table, ' ')) { - [$item, $alias] = explode(' ', $table); - $table = []; - $this->alias([$item => $alias]); - $table[$item] = $alias; - } - } else { - $tables = explode(',', $table); - $table = []; - - foreach ($tables as $item) { - $item = trim($item); - if (strpos($item, ' ')) { - [$item, $alias] = explode(' ', $item); - $this->alias([$item => $alias]); - $table[$item] = $alias; - } else { - $table[] = $item; - } - } - } - } elseif (is_array($table)) { - $tables = $table; - $table = []; - - foreach ($tables as $key => $val) { - if (is_numeric($key)) { - $table[] = $val; - } else { - $this->alias([$key => $val]); - $table[$key] = $val; - } - } - } - - $this->options['table'] = $table; - - return $this; - } - - /** - * 指定排序 order('id','desc') 或者 order(['id'=>'desc','create_time'=>'desc']) - * @access public - * @param string|array|Raw $field 排序字段 - * @param string $order 排序 - * @return $this - */ - public function order($field, string $order = '') - { - if (empty($field)) { - return $this; - } elseif ($field instanceof Raw) { - $this->options['order'][] = $field; - return $this; - } - - if (is_string($field)) { - if (!empty($this->options['via'])) { - $field = $this->options['via'] . '.' . $field; - } - if (strpos($field, ',')) { - $field = array_map('trim', explode(',', $field)); - } else { - $field = empty($order) ? $field : [$field => $order]; - } - } elseif (!empty($this->options['via'])) { - foreach ($field as $key => $val) { - if (is_numeric($key)) { - $field[$key] = $this->options['via'] . '.' . $val; - } else { - $field[$this->options['via'] . '.' . $key] = $val; - unset($field[$key]); - } - } - } - - if (!isset($this->options['order'])) { - $this->options['order'] = []; - } - - if (is_array($field)) { - $this->options['order'] = array_merge($this->options['order'], $field); - } else { - $this->options['order'][] = $field; - } - - return $this; - } - - /** - * 分页查询 - * @access public - * @param int|array $listRows 每页数量 数组表示配置参数 - * @param int|bool $simple 是否简洁模式或者总记录数 - * @return Paginator - * @throws Exception - */ - public function paginate($listRows = null, $simple = false): Paginator - { - if (is_int($simple)) { - $total = $simple; - $simple = false; - } - - $defaultConfig = [ - 'query' => [], //url额外参数 - 'fragment' => '', //url锚点 - 'var_page' => 'page', //分页变量 - 'list_rows' => 15, //每页数量 - ]; - - if (is_array($listRows)) { - $config = array_merge($defaultConfig, $listRows); - $listRows = intval($config['list_rows']); - } else { - $config = $defaultConfig; - $listRows = intval($listRows ?: $config['list_rows']); - } - - $page = isset($config['page']) ? (int) $config['page'] : Paginator::getCurrentPage($config['var_page']); - - $page = $page < 1 ? 1 : $page; - - $config['path'] = $config['path'] ?? Paginator::getCurrentPath(); - - if (!isset($total) && !$simple) { - $options = $this->getOptions(); - - unset($this->options['order'], $this->options['cache'], $this->options['limit'], $this->options['page'], $this->options['field']); - - $bind = $this->bind; - $total = $this->count(); - if ($total > 0) { - $results = $this->options($options)->bind($bind)->page($page, $listRows)->select(); - } else { - if (!empty($this->model)) { - $results = new \think\model\Collection([]); - } else { - $results = new \think\Collection([]); - } - } - } elseif ($simple) { - $results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select(); - $total = null; - } else { - $results = $this->page($page, $listRows)->select(); - } - - $this->removeOption('limit'); - $this->removeOption('page'); - - return Paginator::make($results, $listRows, $page, $total, $simple, $config); - } - - /** - * 根据数字类型字段进行分页查询(大数据) - * @access public - * @param int|array $listRows 每页数量或者分页配置 - * @param string $key 分页索引键 - * @param string $sort 索引键排序 asc|desc - * @return Paginator - * @throws Exception - */ - public function paginateX($listRows = null, string $key = null, string $sort = null): Paginator - { - $defaultConfig = [ - 'query' => [], //url额外参数 - 'fragment' => '', //url锚点 - 'var_page' => 'page', //分页变量 - 'list_rows' => 15, //每页数量 - ]; - - $config = is_array($listRows) ? array_merge($defaultConfig, $listRows) : $defaultConfig; - $listRows = is_int($listRows) ? $listRows : (int) $config['list_rows']; - $page = isset($config['page']) ? (int) $config['page'] : Paginator::getCurrentPage($config['var_page']); - $page = $page < 1 ? 1 : $page; - - $config['path'] = $config['path'] ?? Paginator::getCurrentPath(); - - $key = $key ?: $this->getPk(); - $options = $this->getOptions(); - - if (is_null($sort)) { - $order = $options['order'] ?? ''; - if (!empty($order)) { - $sort = $order[$key] ?? 'desc'; - } else { - $this->order($key, 'desc'); - $sort = 'desc'; - } - } else { - $this->order($key, $sort); - } - - $newOption = $options; - unset($newOption['field'], $newOption['page']); - - $data = $this->newQuery() - ->options($newOption) - ->field($key) - ->where(true) - ->order($key, $sort) - ->limit(1) - ->find(); - - $result = $data[$key] ?? 0; - - if (is_numeric($result)) { - $lastId = 'asc' == $sort ? ($result - 1) + ($page - 1) * $listRows : ($result + 1) - ($page - 1) * $listRows; - } else { - throw new Exception('not support type'); - } - - $results = $this->when($lastId, function ($query) use ($key, $sort, $lastId) { - $query->where($key, 'asc' == $sort ? '>' : '<', $lastId); - }) - ->limit($listRows) - ->select(); - - $this->options($options); - - return Paginator::make($results, $listRows, $page, null, true, $config); - } - - /** - * 根据最后ID查询更多N个数据 - * @access public - * @param int $limit LIMIT - * @param int|string $lastId LastId - * @param string $key 分页索引键 默认为主键 - * @param string $sort 索引键排序 asc|desc - * @return array - * @throws Exception - */ - public function more(int $limit, $lastId = null, string $key = null, string $sort = null): array - { - $key = $key ?: $this->getPk(); - - if (is_null($sort)) { - $order = $this->getOptions('order'); - if (!empty($order)) { - $sort = $order[$key] ?? 'desc'; - } else { - $this->order($key, 'desc'); - $sort = 'desc'; - } - } else { - $this->order($key, $sort); - } - - $result = $this->when($lastId, function ($query) use ($key, $sort, $lastId) { - $query->where($key, 'asc' == $sort ? '>' : '<', $lastId); - })->limit($limit)->select(); - - $last = $result->last(); - - $result->first(); - - return [ - 'data' => $result, - 'lastId' => $last ? $last[$key] : null, - ]; - } - - /** - * 查询缓存 数据为空不缓存 - * @access public - * @param mixed $key 缓存key - * @param integer|\DateTime $expire 缓存有效期 - * @param string|array $tag 缓存标签 - * @return $this - */ - public function cache($key = true, $expire = null, $tag = null) - { - if (false === $key || !$this->getConnection()->getCache()) { - return $this; - } - - if ($key instanceof \DateTimeInterface || $key instanceof \DateInterval || (is_int($key) && is_null($expire))) { - $expire = $key; - $key = true; - } - - $this->options['cache'] = [$key, $expire, $tag ?: $this->getTable()]; - - return $this; - } - - /** - * 查询缓存 允许缓存空数据 - * @access public - * @param mixed $key 缓存key - * @param integer|\DateTime $expire 缓存有效期 - * @param string|array $tag 缓存标签 - * @return $this - */ - public function cacheAlways($key = true, $expire = null, $tag = null) - { - $this->options['cache_always'] = true; - return $this->cache($key, $expire, $tag); - } - - /** - * 强制更新缓存 - * - * @param mixed $key 缓存key - * @param int|\DateTime $expire 缓存有效期 - * @param string|array $tag 缓存标签 - * - * @return $this - */ - public function cacheForce($key = true, $expire = null, $tag = null) - { - $this->options['force_cache'] = true; - return $this->cache($key, $expire, $tag); - } - - /** - * 指定查询lock - * @access public - * @param bool|string $lock 是否lock - * @return $this - */ - public function lock($lock = false) - { - $this->options['lock'] = $lock; - - if ($lock) { - $this->options['master'] = true; - } - - return $this; - } - - /** - * 指定数据表别名 - * @access public - * @param array|string $alias 数据表别名 - * @return $this - */ - public function alias($alias) - { - if (is_array($alias)) { - $this->options['alias'] = $alias; - } else { - $table = $this->getTable(); - - $this->options['alias'][$table] = $alias; - } - - return $this; - } - - /** - * 设置从主服务器读取数据 - * @access public - * @param bool $readMaster 是否从主服务器读取 - * @return $this - */ - public function master(bool $readMaster = true) - { - $this->options['master'] = $readMaster; - return $this; - } - - /** - * 设置是否严格检查字段名 - * @access public - * @param bool $strict 是否严格检查字段 - * @return $this - */ - public function strict(bool $strict = true) - { - $this->options['strict'] = $strict; - return $this; - } - - /** - * 设置自增序列名 - * @access public - * @param string $sequence 自增序列名 - * @return $this - */ - public function sequence(string $sequence = null) - { - $this->options['sequence'] = $sequence; - return $this; - } - - /** - * 设置JSON字段信息 - * @access public - * @param array $json JSON字段 - * @param bool $assoc 是否取出数组 - * @return $this - */ - public function json(array $json = [], bool $assoc = false) - { - $this->options['json'] = $json; - $this->options['json_assoc'] = $assoc; - - return $this; - } - - /** - * 指定数据表主键 - * @access public - * @param string|array $pk 主键 - * @return $this - */ - public function pk($pk) - { - $this->pk = $pk; - return $this; - } - - /** - * 查询参数批量赋值 - * @access protected - * @param array $options 表达式参数 - * @return $this - */ - protected function options(array $options) - { - $this->options = $options; - return $this; - } - - /** - * 获取当前的查询参数 - * @access public - * @param string $name 参数名 - * @return mixed - */ - public function getOptions(string $name = '') - { - if ('' === $name) { - return $this->options; - } - - return $this->options[$name] ?? null; - } - - /** - * 设置当前的查询参数 - * @access public - * @param string $option 参数名 - * @param mixed $value 参数值 - * @return $this - */ - public function setOption(string $option, $value) - { - $this->options[$option] = $value; - return $this; - } - - /** - * 设置当前字段添加的表别名 - * @access public - * @param string $via 临时表别名 - * @return $this - */ - public function via(string $via = '') - { - $this->options['via'] = $via; - - return $this; - } - - /** - * 保存记录 自动判断insert或者update - * @access public - * @param array $data 数据 - * @param bool $forceInsert 是否强制insert - * @return integer - */ - public function save(array $data = [], bool $forceInsert = false) - { - if ($forceInsert) { - return $this->insert($data); - } - - $this->options['data'] = array_merge($this->options['data'] ?? [], $data); - - if (!empty($this->options['where'])) { - $isUpdate = true; - } else { - $isUpdate = $this->parseUpdateData($this->options['data']); - } - - return $isUpdate ? $this->update() : $this->insert(); - } - - /** - * 插入记录 - * @access public - * @param array $data 数据 - * @param boolean $getLastInsID 返回自增主键 - * @return integer|string - */ - public function insert(array $data = [], bool $getLastInsID = false) - { - if (!empty($data)) { - $this->options['data'] = $data; - } - - return $this->connection->insert($this, $getLastInsID); - } - - /** - * 插入记录并获取自增ID - * @access public - * @param array $data 数据 - * @return integer|string - */ - public function insertGetId(array $data) - { - return $this->insert($data, true); - } - - /** - * 批量插入记录 - * @access public - * @param array $dataSet 数据集 - * @param integer $limit 每次写入数据限制 - * @return integer - */ - public function insertAll(array $dataSet = [], int $limit = 0): int - { - if (empty($dataSet)) { - $dataSet = $this->options['data'] ?? []; - } - - if (empty($limit) && !empty($this->options['limit']) && is_numeric($this->options['limit'])) { - $limit = (int) $this->options['limit']; - } - - return $this->connection->insertAll($this, $dataSet, $limit); - } - - /** - * 批量插入记录 - * @access public - * @param array $keys 键值 - * @param array $values 数据 - * @param integer $limit 每次写入数据限制 - * @return integer - */ - public function insertAllByKeys(array $keys, array $values, int $limit = 0): int - { - if (empty($limit) && !empty($this->options['limit']) && is_numeric($this->options['limit'])) { - $limit = (int) $this->options['limit']; - } - - return $this->connection->insertAllByKeys($this, $keys, $values, $limit); - } - - /** - * 通过Select方式插入记录 - * @access public - * @param array $fields 要插入的数据表字段名 - * @param string $table 要插入的数据表名 - * @return integer - */ - public function selectInsert(array $fields, string $table): int - { - return $this->connection->selectInsert($this, $fields, $table); - } - - /** - * 更新记录 - * @access public - * @param mixed $data 数据 - * @return integer - * @throws Exception - */ - public function update(array $data = []): int - { - if (!empty($data)) { - $this->options['data'] = array_merge($this->options['data'] ?? [], $data); - } - - if (empty($this->options['where'])) { - $this->parseUpdateData($this->options['data']); - } - - if (empty($this->options['where']) && $this->model) { - $this->where($this->model->getWhere()); - } - - if (empty($this->options['where'])) { - // 如果没有任何更新条件则不执行 - throw new Exception('miss update condition'); - } - - return $this->connection->update($this); - } - - /** - * 删除记录 - * @access public - * @param mixed $data 表达式 true 表示强制删除 - * @return int - * @throws Exception - */ - public function delete($data = null): int - { - if (!is_null($data) && true !== $data) { - // AR模式分析主键条件 - $this->parsePkWhere($data); - } - - if (empty($this->options['where']) && $this->model) { - $this->where($this->model->getWhere()); - } - - if (true !== $data && empty($this->options['where'])) { - // 如果条件为空 不进行删除操作 除非设置 1=1 - throw new Exception('delete without condition'); - } - - if (!empty($this->options['soft_delete'])) { - // 软删除 - list($field, $condition) = $this->options['soft_delete']; - if ($condition) { - unset($this->options['soft_delete']); - $this->options['data'] = [$field => $condition]; - - return $this->connection->update($this); - } - } - - $this->options['data'] = $data; - - return $this->connection->delete($this); - } - - /** - * 查找记录 - * @access public - * @param mixed $data 数据 - * @return Collection|array|static[] - * @throws Exception - * @throws ModelNotFoundException - * @throws DataNotFoundException - */ - public function select($data = null): Collection - { - if (!is_null($data)) { - // 主键条件分析 - $this->parsePkWhere($data); - } - - $resultSet = $this->connection->select($this); - - // 返回结果处理 - if (!empty($this->options['fail']) && count($resultSet) == 0) { - $this->throwNotFound(); - } - - // 数据列表读取后的处理 - if (!empty($this->model)) { - // 生成模型对象 - $resultSet = $this->resultSetToModelCollection($resultSet); - } else { - $this->resultSet($resultSet); - } - - return $resultSet; - } - - /** - * 查找单条记录 - * @access public - * @param mixed $data 查询数据 - * @return array|Model|null|static|mixed - * @throws Exception - * @throws ModelNotFoundException - * @throws DataNotFoundException - */ - public function find($data = null) - { - if (!is_null($data)) { - // AR模式分析主键条件 - $this->parsePkWhere($data); - } - - if (empty($this->options['where']) && empty($this->options['order'])) { - $result = []; - } else { - $result = $this->connection->find($this); - } - - // 数据处理 - if (empty($result)) { - return $this->resultToEmpty(); - } - - if (!empty($this->model)) { - // 返回模型对象 - $this->resultToModel($result); - } else { - $this->result($result); - } - - return $result; - } - - /** - * 分析表达式(可用于查询或者写入操作) - * @access public - * @return array - */ - public function parseOptions(): array - { - $options = $this->getOptions(); - - // 获取数据表 - if (empty($options['table'])) { - $options['table'] = $this->getTable(); - } - - if (!isset($options['where'])) { - $options['where'] = []; - } elseif (isset($options['view'])) { - // 视图查询条件处理 - $this->parseView($options); - } - - foreach (['data', 'order', 'join', 'union', 'filter', 'json', 'with_attr', 'with_relation_attr'] as $name) { - if (!isset($options[$name])) { - $options[$name] = []; - } - } - - if (!isset($options['strict'])) { - $options['strict'] = $this->connection->getConfig('fields_strict'); - } - - foreach (['master', 'lock', 'fetch_sql', 'array', 'distinct', 'procedure', 'with_cache'] as $name) { - if (!isset($options[$name])) { - $options[$name] = false; - } - } - - foreach (['group', 'having', 'limit', 'force', 'comment', 'partition', 'duplicate', 'extra'] as $name) { - if (!isset($options[$name])) { - $options[$name] = ''; - } - } - - if (isset($options['page'])) { - // 根据页数计算limit - [$page, $listRows] = $options['page']; - $page = $page > 0 ? $page : 1; - $listRows = $listRows ?: (is_numeric($options['limit']) ? $options['limit'] : 20); - $offset = $listRows * ($page - 1); - $options['limit'] = $offset . ',' . $listRows; - } - - $this->options = $options; - - return $options; - } - - /** - * 分析数据是否存在更新条件 - * @access public - * @param array $data 数据 - * @return bool - * @throws Exception - */ - public function parseUpdateData(&$data): bool - { - $pk = $this->getPk(); - $isUpdate = false; - // 如果存在主键数据 则自动作为更新条件 - if (is_string($pk) && isset($data[$pk])) { - $this->where($pk, '=', $data[$pk]); - $this->options['key'] = $data[$pk]; - unset($data[$pk]); - $isUpdate = true; - } elseif (is_array($pk)) { - foreach ($pk as $field) { - if (isset($data[$field])) { - $this->where($field, '=', $data[$field]); - $isUpdate = true; - } else { - // 如果缺少复合主键数据则不执行 - throw new Exception('miss complex primary data'); - } - unset($data[$field]); - } - } - - return $isUpdate; - } - - /** - * 把主键值转换为查询条件 支持复合主键 - * @access public - * @param array|string $data 主键数据 - * @return void - * @throws Exception - */ - public function parsePkWhere($data): void - { - $pk = $this->getPk(); - - if (is_string($pk)) { - // 获取数据表 - if (empty($this->options['table'])) { - $this->options['table'] = $this->getTable(); - } - - $table = is_array($this->options['table']) ? key($this->options['table']) : $this->options['table']; - - if (!empty($this->options['alias'][$table])) { - $alias = $this->options['alias'][$table]; - } - - $key = isset($alias) ? $alias . '.' . $pk : $pk; - // 根据主键查询 - if (is_array($data)) { - $this->where($key, 'in', $data); - } else { - $this->where($key, '=', $data); - $this->options['key'] = $data; - } - } - } - - /** - * 获取模型的更新条件 - * @access protected - * @param array $options 查询参数 - */ - protected function getModelUpdateCondition(array $options) - { - return $options['where']['AND'] ?? null; - } -} diff --git a/vendor/topthink/think-orm/src/db/Builder.php b/vendor/topthink/think-orm/src/db/Builder.php deleted file mode 100644 index 2bde77c..0000000 --- a/vendor/topthink/think-orm/src/db/Builder.php +++ /dev/null @@ -1,1369 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db; - -use Closure; -use PDO; -use think\db\exception\DbException as Exception; - -/** - * Db Builder - */ -abstract class Builder -{ - /** - * Connection对象 - * @var ConnectionInterface - */ - protected $connection; - - /** - * 查询表达式映射 - * @var array - */ - protected $exp = ['NOTLIKE' => 'NOT LIKE', 'NOTIN' => 'NOT IN', 'NOTBETWEEN' => 'NOT BETWEEN', 'NOTEXISTS' => 'NOT EXISTS', 'NOTNULL' => 'NOT NULL', 'NOTBETWEEN TIME' => 'NOT BETWEEN TIME']; - - /** - * 查询表达式解析 - * @var array - */ - protected $parser = [ - 'parseCompare' => ['=', '<>', '>', '>=', '<', '<='], - 'parseLike' => ['LIKE', 'NOT LIKE'], - 'parseBetween' => ['NOT BETWEEN', 'BETWEEN'], - 'parseIn' => ['NOT IN', 'IN'], - 'parseExp' => ['EXP'], - 'parseNull' => ['NOT NULL', 'NULL'], - 'parseBetweenTime' => ['BETWEEN TIME', 'NOT BETWEEN TIME'], - 'parseTime' => ['< TIME', '> TIME', '<= TIME', '>= TIME'], - 'parseExists' => ['NOT EXISTS', 'EXISTS'], - 'parseColumn' => ['COLUMN'], - ]; - - /** - * SELECT SQL表达式 - * @var string - */ - protected $selectSql = 'SELECT%DISTINCT%%EXTRA% %FIELD% FROM %TABLE%%FORCE%%JOIN%%WHERE%%GROUP%%HAVING%%UNION%%ORDER%%LIMIT% %LOCK%%COMMENT%'; - - /** - * INSERT SQL表达式 - * @var string - */ - protected $insertSql = '%INSERT%%EXTRA% INTO %TABLE% (%FIELD%) VALUES (%DATA%) %COMMENT%'; - - /** - * INSERT ALL SQL表达式 - * @var string - */ - protected $insertAllSql = '%INSERT%%EXTRA% INTO %TABLE% (%FIELD%) %DATA% %COMMENT%'; - - /** - * UPDATE SQL表达式 - * @var string - */ - protected $updateSql = 'UPDATE%EXTRA% %TABLE% SET %SET%%JOIN%%WHERE%%ORDER%%LIMIT% %LOCK%%COMMENT%'; - - /** - * DELETE SQL表达式 - * @var string - */ - protected $deleteSql = 'DELETE%EXTRA% FROM %TABLE%%USING%%JOIN%%WHERE%%ORDER%%LIMIT% %LOCK%%COMMENT%'; - - /** - * 架构函数 - * @access public - * @param ConnectionInterface $connection 数据库连接对象实例 - */ - public function __construct(ConnectionInterface $connection) - { - $this->connection = $connection; - } - - /** - * 获取当前的连接对象实例 - * @access public - * @return ConnectionInterface - */ - public function getConnection(): ConnectionInterface - { - return $this->connection; - } - - /** - * 注册查询表达式解析 - * @access public - * @param string $name 解析方法 - * @param array $parser 匹配表达式数据 - * @return $this - */ - public function bindParser(string $name, array $parser) - { - $this->parser[$name] = $parser; - return $this; - } - - /** - * 数据分析 - * @access protected - * @param Query $query 查询对象 - * @param array $data 数据 - * @param array $fields 字段信息 - * @param array $bind 参数绑定 - * @return array - */ - protected function parseData(Query $query, array $data = [], array $fields = [], array $bind = []): array - { - if (empty($data)) { - return []; - } - - $options = $query->getOptions(); - - // 获取绑定信息 - if (empty($bind)) { - $bind = $query->getFieldsBindType(); - } - - if (empty($fields)) { - if (empty($options['field']) || '*' == $options['field']) { - $fields = array_keys($bind); - } else { - $fields = $options['field']; - } - } - - $result = []; - - foreach ($data as $key => $val) { - $item = $this->parseKey($query, $key, true); - - if ($val instanceof Raw) { - $result[$item] = $this->parseRaw($query, $val); - continue; - } elseif (!is_scalar($val) && (in_array($key, (array) $query->getOptions('json')) || 'json' == $query->getFieldType($key))) { - $val = json_encode($val); - } - - if (false !== strpos($key, '->')) { - [$key, $name] = explode('->', $key, 2); - $item = $this->parseKey($query, $key); - - $result[$item . '->' . $name] = 'json_set(' . $item . ', \'$.' . $name . '\', ' . $this->parseDataBind($query, $key . '->' . $name, $val, $bind) . ')'; - } elseif (false === strpos($key, '.') && !in_array($key, $fields, true)) { - if ($options['strict']) { - throw new Exception('fields not exists:[' . $key . ']'); - } - } elseif (is_null($val)) { - $result[$item] = 'NULL'; - } elseif (is_array($val) && !empty($val) && is_string($val[0])) { - switch (strtoupper($val[0])) { - case 'INC': - $result[$item] = $item . ' + ' . floatval($val[1]); - break; - case 'DEC': - $result[$item] = $item . ' - ' . floatval($val[1]); - break; - } - } elseif (is_scalar($val)) { - // 过滤非标量数据 - if (!$query->isAutoBind() && PDO::PARAM_STR == $bind[$key]) { - $val = '\'' . $val . '\''; - } - - $result[$item] = !$query->isAutoBind() ? $val : $this->parseDataBind($query, $key, $val, $bind); - } - } - - return $result; - } - - /** - * 数据绑定处理 - * @access protected - * @param Query $query 查询对象 - * @param string $key 字段名 - * @param mixed $data 数据 - * @param array $bind 绑定数据 - * @return string - */ - protected function parseDataBind(Query $query, string $key, $data, array $bind = []): string - { - if ($data instanceof Raw) { - return $this->parseRaw($query, $data); - } - - $name = $query->bindValue($data, $bind[$key] ?? PDO::PARAM_STR); - - return ':' . $name; - } - - /** - * 字段名分析 - * @access public - * @param Query $query 查询对象 - * @param mixed $key 字段名 - * @param bool $strict 严格检测 - * @return string - */ - public function parseKey(Query $query, $key, bool $strict = false): string - { - return $key; - } - - /** - * 查询额外参数分析 - * @access protected - * @param Query $query 查询对象 - * @param string $extra 额外参数 - * @return string - */ - protected function parseExtra(Query $query, string $extra): string - { - return preg_match('/^[\w]+$/i', $extra) ? ' ' . strtoupper($extra) : ''; - } - - /** - * field分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $fields 字段名 - * @return string - */ - protected function parseField(Query $query, $fields): string - { - if (is_array($fields)) { - // 支持 'field1'=>'field2' 这样的字段别名定义 - $array = []; - - foreach ($fields as $key => $field) { - if ($field instanceof Raw) { - $array[] = $this->parseRaw($query, $field); - } elseif (!is_numeric($key)) { - $array[] = $this->parseKey($query, $key) . ' AS ' . $this->parseKey($query, $field, true); - } else { - $array[] = $this->parseKey($query, $field); - } - } - - $fieldsStr = implode(',', $array); - } else { - $fieldsStr = '*'; - } - - return $fieldsStr; - } - - /** - * table分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $tables 表名 - * @return string - */ - protected function parseTable(Query $query, $tables): string - { - $item = []; - $options = $query->getOptions(); - - foreach ((array) $tables as $key => $table) { - if ($table instanceof Raw) { - $item[] = $this->parseRaw($query, $table); - } elseif (!is_numeric($key)) { - $item[] = $this->parseKey($query, $key) . ' ' . $this->parseKey($query, $table); - } elseif (isset($options['alias'][$table])) { - $item[] = $this->parseKey($query, $table) . ' ' . $this->parseKey($query, $options['alias'][$table]); - } else { - $item[] = $this->parseKey($query, $table); - } - } - - return implode(',', $item); - } - - /** - * where分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $where 查询条件 - * @return string - */ - protected function parseWhere(Query $query, array $where): string - { - $options = $query->getOptions(); - $whereStr = $this->buildWhere($query, $where); - - if (!empty($options['soft_delete'])) { - // 附加软删除条件 - [$field, $condition] = $options['soft_delete']; - - $binds = $query->getFieldsBindType(); - $whereStr = $whereStr ? '( ' . $whereStr . ' ) AND ' : ''; - $whereStr = $whereStr . $this->parseWhereItem($query, $field, $condition, $binds); - } - - return empty($whereStr) ? '' : ' WHERE ' . $whereStr; - } - - /** - * 生成查询条件SQL - * @access public - * @param Query $query 查询对象 - * @param mixed $where 查询条件 - * @return string - */ - public function buildWhere(Query $query, array $where): string - { - if (empty($where)) { - $where = []; - } - - $whereStr = ''; - - $binds = $query->getFieldsBindType(); - - foreach ($where as $logic => $val) { - $str = $this->parseWhereLogic($query, $logic, $val, $binds); - - $whereStr .= empty($whereStr) ? substr(implode(' ', $str), strlen($logic) + 1) : implode(' ', $str); - } - - return $whereStr; - } - - /** - * 不同字段使用相同查询条件(AND) - * @access protected - * @param Query $query 查询对象 - * @param string $logic Logic - * @param array $val 查询条件 - * @param array $binds 参数绑定 - * @return array - */ - protected function parseWhereLogic(Query $query, string $logic, array $val, array $binds = []): array - { - $where = []; - foreach ($val as $value) { - if ($value instanceof Raw) { - $where[] = ' ' . $logic . ' ( ' . $this->parseRaw($query, $value) . ' )'; - continue; - } - - if (is_array($value)) { - if (key($value) !== 0) { - throw new Exception('where express error:' . var_export($value, true)); - } - $field = array_shift($value); - } elseif (true === $value) { - $where[] = ' ' . $logic . ' 1 '; - continue; - } elseif (!($value instanceof Closure)) { - throw new Exception('where express error:' . var_export($value, true)); - } - - if ($value instanceof Closure) { - // 使用闭包查询 - $whereClosureStr = $this->parseClosureWhere($query, $value, $logic); - if ($whereClosureStr) { - $where[] = $whereClosureStr; - } - } elseif (is_array($field)) { - $where[] = $this->parseMultiWhereField($query, $value, $field, $logic, $binds); - } elseif ($field instanceof Raw) { - $where[] = ' ' . $logic . ' ' . $this->parseWhereItem($query, $field, $value, $binds); - } elseif (strpos($field, '|')) { - $where[] = $this->parseFieldsOr($query, $value, $field, $logic, $binds); - } elseif (strpos($field, '&')) { - $where[] = $this->parseFieldsAnd($query, $value, $field, $logic, $binds); - } else { - // 对字段使用表达式查询 - $field = is_string($field) ? $field : ''; - $where[] = ' ' . $logic . ' ' . $this->parseWhereItem($query, $field, $value, $binds); - } - } - - return $where; - } - - /** - * 不同字段使用相同查询条件(AND) - * @access protected - * @param Query $query 查询对象 - * @param mixed $value 查询条件 - * @param string $field 查询字段 - * @param string $logic Logic - * @param array $binds 参数绑定 - * @return string - */ - protected function parseFieldsAnd(Query $query, $value, string $field, string $logic, array $binds): string - { - $item = []; - - foreach (explode('&', $field) as $k) { - $item[] = $this->parseWhereItem($query, $k, $value, $binds); - } - - return ' ' . $logic . ' ( ' . implode(' AND ', $item) . ' )'; - } - - /** - * 不同字段使用相同查询条件(OR) - * @access protected - * @param Query $query 查询对象 - * @param mixed $value 查询条件 - * @param string $field 查询字段 - * @param string $logic Logic - * @param array $binds 参数绑定 - * @return string - */ - protected function parseFieldsOr(Query $query, $value, string $field, string $logic, array $binds): string - { - $item = []; - - foreach (explode('|', $field) as $k) { - $item[] = $this->parseWhereItem($query, $k, $value, $binds); - } - - return ' ' . $logic . ' ( ' . implode(' OR ', $item) . ' )'; - } - - /** - * 闭包查询 - * @access protected - * @param Query $query 查询对象 - * @param Closure $value 查询条件 - * @param string $logic Logic - * @return string - */ - protected function parseClosureWhere(Query $query, Closure $value, string $logic): string - { - $newQuery = $query->newQuery(); - $value($newQuery); - $whereClosure = $this->buildWhere($newQuery, $newQuery->getOptions('where') ?: []); - - if (!empty($whereClosure)) { - $query->bind($newQuery->getBind(false)); - $where = ' ' . $logic . ' ( ' . $whereClosure . ' )'; - } - - return $where ?? ''; - } - - /** - * 复合条件查询 - * @access protected - * @param Query $query 查询对象 - * @param mixed $value 查询条件 - * @param mixed $field 查询字段 - * @param string $logic Logic - * @param array $binds 参数绑定 - * @return string - */ - protected function parseMultiWhereField(Query $query, $value, $field, string $logic, array $binds): string - { - array_unshift($value, $field); - - $where = []; - foreach ($value as $item) { - $where[] = $this->parseWhereItem($query, array_shift($item), $item, $binds); - } - - return ' ' . $logic . ' ( ' . implode(' AND ', $where) . ' )'; - } - - /** - * where子单元分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $field 查询字段 - * @param array $val 查询条件 - * @param array $binds 参数绑定 - * @return string - */ - protected function parseWhereItem(Query $query, $field, array $val, array $binds = []): string - { - // 字段分析 - $key = $field ? $this->parseKey($query, $field, true) : ''; - - [$exp, $value] = $val; - - // 检测操作符 - if (!is_string($exp)) { - throw new Exception('where express error:' . var_export($exp, true)); - } - - $exp = strtoupper($exp); - if (isset($this->exp[$exp])) { - $exp = $this->exp[$exp]; - } - - if (is_string($field) && 'LIKE' != $exp) { - $bindType = $binds[$field] ?? PDO::PARAM_STR; - } else { - $bindType = PDO::PARAM_STR; - } - - if ($value instanceof Raw) { - - } elseif (is_object($value) && method_exists($value, '__toString')) { - // 对象数据写入 - $value = $value->__toString(); - } - - if (is_scalar($value) && !in_array($exp, ['EXP', 'NOT NULL', 'NULL', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === false) { - if (is_string($value) && 0 === strpos($value, ':') && $query->isBind(substr($value, 1))) { - } else { - $name = $query->bindValue($value, $bindType); - $value = ':' . $name; - } - } - - // 解析查询表达式 - foreach ($this->parser as $fun => $parse) { - if (in_array($exp, $parse)) { - return $this->$fun($query, $key, $exp, $value, $field, $bindType, $val[2] ?? 'AND'); - } - } - - throw new Exception('where express error:' . $exp); - } - - /** - * 模糊查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param array $value - * @param string $field - * @param integer $bindType - * @param string $logic - * @return string - */ - protected function parseLike(Query $query, string $key, string $exp, $value, $field, int $bindType, string $logic): string - { - // 模糊匹配 - if (is_array($value)) { - $array = []; - foreach ($value as $item) { - $name = $query->bindValue($item, PDO::PARAM_STR); - $array[] = $key . ' ' . $exp . ' :' . $name; - } - - $whereStr = '(' . implode(' ' . strtoupper($logic) . ' ', $array) . ')'; - } else { - $whereStr = $key . ' ' . $exp . ' ' . $value; - } - - return $whereStr; - } - - /** - * 表达式查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param array $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseExp(Query $query, string $key, string $exp, Raw $value, string $field, int $bindType): string - { - // 表达式查询 - return '( ' . $key . ' ' . $this->parseRaw($query, $value) . ' )'; - } - - /** - * 表达式查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param array $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseColumn(Query $query, string $key, $exp, array $value, string $field, int $bindType): string - { - // 字段比较查询 - [$op, $field] = $value; - - if (!in_array(trim($op), ['=', '<>', '>', '>=', '<', '<='])) { - throw new Exception('where express error:' . var_export($value, true)); - } - - return '( ' . $key . ' ' . $op . ' ' . $this->parseKey($query, $field, true) . ' )'; - } - - /** - * Null查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseNull(Query $query, string $key, string $exp, $value, $field, int $bindType): string - { - // NULL 查询 - return $key . ' IS ' . $exp; - } - - /** - * 范围查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseBetween(Query $query, string $key, string $exp, $value, $field, int $bindType): string - { - // BETWEEN 查询 - $data = is_array($value) ? $value : explode(',', $value); - - $min = $query->bindValue($data[0], $bindType); - $max = $query->bindValue($data[1], $bindType); - - return $key . ' ' . $exp . ' :' . $min . ' AND :' . $max . ' '; - } - - /** - * Exists查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseExists(Query $query, string $key, string $exp, $value, string $field, int $bindType): string - { - // EXISTS 查询 - if ($value instanceof Closure) { - $value = $this->parseClosure($query, $value, false); - } elseif ($value instanceof Raw) { - $value = $this->parseRaw($query, $value); - } else { - throw new Exception('where express error:' . $value); - } - - return $exp . ' ( ' . $value . ' )'; - } - - /** - * 时间比较查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseTime(Query $query, string $key, string $exp, $value, $field, int $bindType): string - { - return $key . ' ' . substr($exp, 0, 2) . ' ' . $this->parseDateTime($query, $value, $field, $bindType); - } - - /** - * 大小比较查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseCompare(Query $query, string $key, string $exp, $value, $field, int $bindType): string - { - if (is_array($value)) { - throw new Exception('where express error:' . $exp . var_export($value, true)); - } - - // 比较运算 - if ($value instanceof Closure) { - $value = $this->parseClosure($query, $value); - } elseif ($value instanceof Raw) { - $value = $this->parseRaw($query, $value); - } - - if ('=' == $exp && is_null($value)) { - return $key . ' IS NULL'; - } - - return $key . ' ' . $exp . ' ' . $value; - } - - /** - * 时间范围查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseBetweenTime(Query $query, string $key, string $exp, $value, $field, int $bindType): string - { - if (is_string($value)) { - $value = explode(',', $value); - } - - return $key . ' ' . substr($exp, 0, -4) - . $this->parseDateTime($query, $value[0], $field, $bindType) - . ' AND ' - . $this->parseDateTime($query, $value[1], $field, $bindType); - - } - - /** - * IN查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @param integer $bindType - * @return string - */ - protected function parseIn(Query $query, string $key, string $exp, $value, $field, int $bindType): string - { - // IN 查询 - if ($value instanceof Closure) { - $value = $this->parseClosure($query, $value, false); - } elseif ($value instanceof Raw) { - $value = $this->parseRaw($query, $value); - } else { - $value = array_unique(is_array($value) ? $value : explode(',', (string) $value)); - if (count($value) === 0) { - return 'IN' == $exp ? '0 = 1' : '1 = 1'; - } - - if ($query->isAutoBind()) { - $array = []; - foreach ($value as $v) { - $name = $query->bindValue($v, $bindType); - $array[] = ':' . $name; - } - $value = implode(',', $array); - } elseif (PDO::PARAM_STR == $bindType) { - $value = '\'' . implode('\',\'', $value) . '\''; - } else { - $value = implode(',', $value); - } - - if (false === strpos($value, ',')) { - return $key . ('IN' == $exp ? ' = ' : ' <> ') . $value; - } - } - - return $key . ' ' . $exp . ' (' . $value . ')'; - } - - /** - * 闭包子查询 - * @access protected - * @param Query $query 查询对象 - * @param \Closure $call - * @param bool $show - * @return string - */ - protected function parseClosure(Query $query, Closure $call, bool $show = true): string - { - $newQuery = $query->newQuery()->removeOption(); - $call($newQuery); - - return $newQuery->buildSql($show); - } - - /** - * 日期时间条件解析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $value - * @param string $key - * @param integer $bindType - * @return string - */ - protected function parseDateTime(Query $query, $value, string $key, int $bindType): string - { - $options = $query->getOptions(); - - // 获取时间字段类型 - if (strpos($key, '.')) { - [$table, $key] = explode('.', $key); - - if (isset($options['alias']) && $pos = array_search($table, $options['alias'])) { - $table = $pos; - } - } else { - $table = $options['table']; - } - - $type = $query->getFieldType($key); - - if ($type) { - if (is_string($value)) { - $value = strtotime($value) ?: $value; - } - - if (is_int($value)) { - if (preg_match('/(datetime|timestamp)/is', $type)) { - // 日期及时间戳类型 - $value = date('Y-m-d H:i:s', $value); - } elseif (preg_match('/(date)/is', $type)) { - // 日期及时间戳类型 - $value = date('Y-m-d', $value); - } - } - } - - $name = $query->bindValue($value, $bindType); - - return ':' . $name; - } - - /** - * limit分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $limit - * @return string - */ - protected function parseLimit(Query $query, string $limit): string - { - return (!empty($limit) && false === strpos($limit, '(')) ? ' LIMIT ' . $limit . ' ' : ''; - } - - /** - * join分析 - * @access protected - * @param Query $query 查询对象 - * @param array $join - * @return string - */ - protected function parseJoin(Query $query, array $join): string - { - $joinStr = ''; - - foreach ($join as $item) { - [$table, $type, $on] = $item; - - if (strpos($on, '=')) { - [$val1, $val2] = explode('=', $on, 2); - - $condition = $this->parseKey($query, $val1) . '=' . $this->parseKey($query, $val2); - } else { - $condition = $on; - } - - $table = $this->parseTable($query, $table); - - $joinStr .= ' ' . $type . ' JOIN ' . $table . ' ON ' . $condition; - } - - return $joinStr; - } - - /** - * order分析 - * @access protected - * @param Query $query 查询对象 - * @param array $order - * @return string - */ - protected function parseOrder(Query $query, array $order): string - { - $array = []; - foreach ($order as $key => $val) { - if ($val instanceof Raw) { - $array[] = $this->parseRaw($query, $val); - } elseif (is_array($val) && preg_match('/^[\w\.]+$/', $key)) { - $array[] = $this->parseOrderField($query, $key, $val); - } elseif ('[rand]' == $val) { - $array[] = $this->parseRand($query); - } elseif (is_string($val)) { - if (is_numeric($key)) { - [$key, $sort] = explode(' ', strpos($val, ' ') ? $val : $val . ' '); - } else { - $sort = $val; - } - - if (preg_match('/^[\w\.]+$/', $key)) { - $sort = strtoupper($sort); - $sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : ''; - $array[] = $this->parseKey($query, $key, true) . $sort; - } else { - throw new Exception('order express error:' . $key); - } - } - } - - return empty($array) ? '' : ' ORDER BY ' . implode(',', $array); - } - - /** - * 分析Raw对象 - * @access protected - * @param Query $query 查询对象 - * @param Raw $raw Raw对象 - * @return string - */ - protected function parseRaw(Query $query, Raw $raw): string - { - $sql = $raw->getValue(); - $bind = $raw->getBind(); - - if ($bind) { - $query->bindParams($sql, $bind); - } - - return $sql; - } - - /** - * 随机排序 - * @access protected - * @param Query $query 查询对象 - * @return string - */ - protected function parseRand(Query $query): string - { - return ''; - } - - /** - * orderField分析 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param array $val - * @return string - */ - protected function parseOrderField(Query $query, string $key, array $val): string - { - if (isset($val['sort'])) { - $sort = $val['sort']; - unset($val['sort']); - } else { - $sort = ''; - } - - $sort = strtoupper($sort); - $sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : ''; - $bind = $query->getFieldsBindType(); - - foreach ($val as $k => $item) { - $val[$k] = $this->parseDataBind($query, $key, $item, $bind); - } - - return 'field(' . $this->parseKey($query, $key, true) . ',' . implode(',', $val) . ')' . $sort; - } - - /** - * group分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $group - * @return string - */ - protected function parseGroup(Query $query, $group): string - { - if (empty($group)) { - return ''; - } - - if (is_string($group)) { - $group = explode(',', $group); - } - - $val = []; - foreach ($group as $key) { - $val[] = $this->parseKey($query, $key); - } - - return ' GROUP BY ' . implode(',', $val); - } - - /** - * having分析 - * @access protected - * @param Query $query 查询对象 - * @param string $having - * @return string - */ - protected function parseHaving(Query $query, string $having): string - { - return !empty($having) ? ' HAVING ' . $having : ''; - } - - /** - * comment分析 - * @access protected - * @param Query $query 查询对象 - * @param string $comment - * @return string - */ - protected function parseComment(Query $query, string $comment): string - { - if (false !== strpos($comment, '*/')) { - $comment = strstr($comment, '*/', true); - } - - return !empty($comment) ? ' /* ' . $comment . ' */' : ''; - } - - /** - * distinct分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $distinct - * @return string - */ - protected function parseDistinct(Query $query, bool $distinct): string - { - return !empty($distinct) ? ' DISTINCT ' : ''; - } - - /** - * union分析 - * @access protected - * @param Query $query 查询对象 - * @param array $union - * @return string - */ - protected function parseUnion(Query $query, array $union): string - { - if (empty($union)) { - return ''; - } - - $type = $union['type']; - unset($union['type']); - - foreach ($union as $u) { - if ($u instanceof Closure) { - $sql[] = $type . ' ' . $this->parseClosure($query, $u); - } elseif (is_string($u)) { - $sql[] = $type . ' ( ' . $u . ' )'; - } - } - - return ' ' . implode(' ', $sql); - } - - /** - * index分析,可在操作链中指定需要强制使用的索引 - * @access protected - * @param Query $query 查询对象 - * @param mixed $index - * @return string - */ - protected function parseForce(Query $query, $index): string - { - if (empty($index)) { - return ''; - } - - if (is_array($index)) { - $index = join(',', $index); - } - - return sprintf(" FORCE INDEX ( %s ) ", $index); - } - - /** - * 设置锁机制 - * @access protected - * @param Query $query 查询对象 - * @param bool|string $lock - * @return string - */ - protected function parseLock(Query $query, $lock = false): string - { - if (is_bool($lock)) { - return $lock ? ' FOR UPDATE ' : ''; - } - - if (is_string($lock) && !empty($lock)) { - return ' ' . trim($lock) . ' '; - } else { - return ''; - } - } - - /** - * 生成查询SQL - * @access public - * @param Query $query 查询对象 - * @param bool $one 是否仅获取一个记录 - * @return string - */ - public function select(Query $query, bool $one = false): string - { - $options = $query->getOptions(); - - return str_replace( - ['%TABLE%', '%DISTINCT%', '%EXTRA%', '%FIELD%', '%JOIN%', '%WHERE%', '%GROUP%', '%HAVING%', '%ORDER%', '%LIMIT%', '%UNION%', '%LOCK%', '%COMMENT%', '%FORCE%'], - [ - $this->parseTable($query, $options['table']), - $this->parseDistinct($query, $options['distinct']), - $this->parseExtra($query, $options['extra']), - $this->parseField($query, $options['field'] ?? '*'), - $this->parseJoin($query, $options['join']), - $this->parseWhere($query, $options['where']), - $this->parseGroup($query, $options['group']), - $this->parseHaving($query, $options['having']), - $this->parseOrder($query, $options['order']), - $this->parseLimit($query, $one ? '1' : $options['limit']), - $this->parseUnion($query, $options['union']), - $this->parseLock($query, $options['lock']), - $this->parseComment($query, $options['comment']), - $this->parseForce($query, $options['force']), - ], - $this->selectSql - ); - } - - /** - * 生成Insert SQL - * @access public - * @param Query $query 查询对象 - * @return string - */ - public function insert(Query $query): string - { - $options = $query->getOptions(); - - // 分析并处理数据 - $data = $this->parseData($query, $options['data']); - if (empty($data)) { - return ''; - } - - $fields = array_keys($data); - $values = array_values($data); - - return str_replace( - ['%INSERT%', '%TABLE%', '%EXTRA%', '%FIELD%', '%DATA%', '%COMMENT%'], - [ - !empty($options['replace']) ? 'REPLACE' : 'INSERT', - $this->parseTable($query, $options['table']), - $this->parseExtra($query, $options['extra']), - implode(' , ', $fields), - implode(' , ', $values), - $this->parseComment($query, $options['comment']), - ], - $this->insertSql - ); - } - - /** - * 生成insertall SQL - * @access public - * @param Query $query 查询对象 - * @param array $dataSet 数据集 - * @return string - */ - public function insertAll(Query $query, array $dataSet): string - { - $options = $query->getOptions(); - - // 获取绑定信息 - $bind = $query->getFieldsBindType(); - - // 获取合法的字段 - if (empty($options['field']) || '*' == $options['field']) { - $allowFields = array_keys($bind); - } else { - $allowFields = $options['field']; - } - - $fields = []; - $values = []; - - foreach ($dataSet as $k => $data) { - $data = $this->parseData($query, $data, $allowFields, $bind); - - $values[] = 'SELECT ' . implode(',', array_values($data)); - - if (!isset($insertFields)) { - $insertFields = array_keys($data); - } - } - - foreach ($insertFields as $field) { - $fields[] = $this->parseKey($query, $field); - } - - return str_replace( - ['%INSERT%', '%TABLE%', '%EXTRA%', '%FIELD%', '%DATA%', '%COMMENT%'], - [ - !empty($options['replace']) ? 'REPLACE' : 'INSERT', - $this->parseTable($query, $options['table']), - $this->parseExtra($query, $options['extra']), - implode(' , ', $fields), - implode(' UNION ALL ', $values), - $this->parseComment($query, $options['comment']), - ], - $this->insertAllSql - ); - } - - /** - * 生成insertall SQL - * @access public - * @param Query $query 查询对象 - * @param array $keys 字段名 - * @param array $datas 数据 - * @return string - */ - public function insertAllByKeys(Query $query, array $keys, array $datas): string - { - $options = $query->getOptions(); - - // 获取绑定信息 - $bind = $query->getFieldsBindType(); - $fields = []; - $values = []; - - foreach ($keys as $field) { - $fields[] = $this->parseKey($query, $field); - } - - foreach ($datas as $data) { - foreach ($data as $key => &$val) { - if (!$query->isAutoBind()) { - $val = PDO::PARAM_STR == $bind[$keys[$key]] ? '\'' . $val . '\'' : $val; - } else { - $val = $this->parseDataBind($query, $keys[$key], $val, $bind); - } - } - - $values[] = 'SELECT ' . implode(',', $data); - } - - return str_replace( - ['%INSERT%', '%TABLE%', '%EXTRA%', '%FIELD%', '%DATA%', '%COMMENT%'], - [ - !empty($options['replace']) ? 'REPLACE' : 'INSERT', - $this->parseTable($query, $options['table']), - $this->parseExtra($query, $options['extra']), - implode(' , ', $fields), - implode(' UNION ALL ', $values), - $this->parseComment($query, $options['comment']), - ], - $this->insertAllSql - ); - } - - /** - * 生成slect insert SQL - * @access public - * @param Query $query 查询对象 - * @param array $fields 数据 - * @param string $table 数据表 - * @return string - */ - public function selectInsert(Query $query, array $fields, string $table): string - { - foreach ($fields as &$field) { - $field = $this->parseKey($query, $field, true); - } - - return 'INSERT INTO ' . $this->parseTable($query, $table) . ' (' . implode(',', $fields) . ') ' . $this->select($query); - } - - /** - * 生成update SQL - * @access public - * @param Query $query 查询对象 - * @return string - */ - public function update(Query $query): string - { - $options = $query->getOptions(); - - $data = $this->parseData($query, $options['data']); - - if (empty($data)) { - return ''; - } - - $set = []; - foreach ($data as $key => $val) { - $set[] = $key . ' = ' . $val; - } - - return str_replace( - ['%TABLE%', '%EXTRA%', '%SET%', '%JOIN%', '%WHERE%', '%ORDER%', '%LIMIT%', '%LOCK%', '%COMMENT%'], - [ - $this->parseTable($query, $options['table']), - $this->parseExtra($query, $options['extra']), - implode(' , ', $set), - $this->parseJoin($query, $options['join']), - $this->parseWhere($query, $options['where']), - $this->parseOrder($query, $options['order']), - $this->parseLimit($query, $options['limit']), - $this->parseLock($query, $options['lock']), - $this->parseComment($query, $options['comment']), - ], - $this->updateSql - ); - } - - /** - * 生成delete SQL - * @access public - * @param Query $query 查询对象 - * @return string - */ - public function delete(Query $query): string - { - $options = $query->getOptions(); - - return str_replace( - ['%TABLE%', '%EXTRA%', '%USING%', '%JOIN%', '%WHERE%', '%ORDER%', '%LIMIT%', '%LOCK%', '%COMMENT%'], - [ - $this->parseTable($query, $options['table']), - $this->parseExtra($query, $options['extra']), - !empty($options['using']) ? ' USING ' . $this->parseTable($query, $options['using']) . ' ' : '', - $this->parseJoin($query, $options['join']), - $this->parseWhere($query, $options['where']), - $this->parseOrder($query, $options['order']), - $this->parseLimit($query, $options['limit']), - $this->parseLock($query, $options['lock']), - $this->parseComment($query, $options['comment']), - ], - $this->deleteSql - ); - } -} diff --git a/vendor/topthink/think-orm/src/db/CacheItem.php b/vendor/topthink/think-orm/src/db/CacheItem.php deleted file mode 100644 index 839f384..0000000 --- a/vendor/topthink/think-orm/src/db/CacheItem.php +++ /dev/null @@ -1,209 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db; - -use DateInterval; -use DateTime; -use DateTimeInterface; -use think\db\exception\InvalidArgumentException; - -/** - * CacheItem实现类 - */ -class CacheItem -{ - /** - * 缓存Key - * @var string - */ - protected $key; - - /** - * 缓存内容 - * @var mixed - */ - protected $value; - - /** - * 过期时间 - * @var int|DateTimeInterface - */ - protected $expire; - - /** - * 缓存tag - * @var string - */ - protected $tag; - - /** - * 缓存是否命中 - * @var bool - */ - protected $isHit = false; - - public function __construct(string $key = null) - { - $this->key = $key; - } - - /** - * 为此缓存项设置「键」 - * @access public - * @param string $key - * @return $this - */ - public function setKey(string $key) - { - $this->key = $key; - return $this; - } - - /** - * 返回当前缓存项的「键」 - * @access public - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * 返回当前缓存项的有效期 - * @access public - * @return DateTimeInterface|int|null - */ - public function getExpire() - { - if ($this->expire instanceof DateTimeInterface) { - return $this->expire; - } - - return $this->expire ? $this->expire - time() : null; - } - - /** - * 获取缓存Tag - * @access public - * @return string|array - */ - public function getTag() - { - return $this->tag; - } - - /** - * 凭借此缓存项的「键」从缓存系统里面取出缓存项 - * @access public - * @return mixed - */ - public function get() - { - return $this->value; - } - - /** - * 确认缓存项的检查是否命中 - * @access public - * @return bool - */ - public function isHit(): bool - { - return $this->isHit; - } - - /** - * 为此缓存项设置「值」 - * @access public - * @param mixed $value - * @return $this - */ - public function set($value) - { - $this->value = $value; - $this->isHit = true; - return $this; - } - - /** - * 为此缓存项设置所属标签 - * @access public - * @param string|array $tag - * @return $this - */ - public function tag($tag = null) - { - $this->tag = $tag; - return $this; - } - - /** - * 设置缓存项的有效期 - * @access public - * @param mixed $expire - * @return $this - */ - public function expire($expire) - { - if (is_null($expire)) { - $this->expire = null; - } elseif (is_numeric($expire) || $expire instanceof DateInterval) { - $this->expiresAfter($expire); - } elseif ($expire instanceof DateTimeInterface) { - $this->expire = $expire; - } else { - throw new InvalidArgumentException('not support datetime'); - } - - return $this; - } - - /** - * 设置缓存项的准确过期时间点 - * @access public - * @param DateTimeInterface $expiration - * @return $this - */ - public function expiresAt($expiration) - { - if ($expiration instanceof DateTimeInterface) { - $this->expire = $expiration; - } else { - throw new InvalidArgumentException('not support datetime'); - } - - return $this; - } - - /** - * 设置缓存项的过期时间 - * @access public - * @param int|DateInterval $timeInterval - * @return $this - * @throws InvalidArgumentException - */ - public function expiresAfter($timeInterval) - { - if ($timeInterval instanceof DateInterval) { - $this->expire = (int) DateTime::createFromFormat('U', (string) time())->add($timeInterval)->format('U'); - } elseif (is_numeric($timeInterval)) { - $this->expire = $timeInterval + time(); - } else { - throw new InvalidArgumentException('not support datetime'); - } - - return $this; - } - -} diff --git a/vendor/topthink/think-orm/src/db/Connection.php b/vendor/topthink/think-orm/src/db/Connection.php deleted file mode 100644 index 015cf44..0000000 --- a/vendor/topthink/think-orm/src/db/Connection.php +++ /dev/null @@ -1,347 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare(strict_types=1); - -namespace think\db; - -use Psr\SimpleCache\CacheInterface; -use think\DbManager; - -/** - * 数据库连接基础类 - */ -abstract class Connection implements ConnectionInterface -{ - - /** - * 当前SQL指令 - * @var string - */ - protected $queryStr = ''; - - /** - * 返回或者影响记录数 - * @var int - */ - protected $numRows = 0; - - /** - * 事务指令数 - * @var int - */ - protected $transTimes = 0; - - /** - * 错误信息 - * @var string - */ - protected $error = ''; - - /** - * 数据库连接ID 支持多个连接 - * @var array - */ - protected $links = []; - - /** - * 当前连接ID - * @var object - */ - protected $linkID; - - /** - * 当前读连接ID - * @var object - */ - protected $linkRead; - - /** - * 当前写连接ID - * @var object - */ - protected $linkWrite; - - /** - * 数据表信息 - * @var array - */ - protected $info = []; - - /** - * 查询开始时间 - * @var float - */ - protected $queryStartTime; - - /** - * Builder对象 - * @var Builder - */ - protected $builder; - - /** - * Db对象 - * @var DbManager - */ - protected $db; - - /** - * 是否读取主库 - * @var bool - */ - protected $readMaster = false; - - /** - * 数据库连接参数配置 - * @var array - */ - protected $config = []; - - /** - * 缓存对象 - * @var CacheInterface - */ - protected $cache; - - /** - * 架构函数 读取数据库配置信息 - * @access public - * @param array $config 数据库配置数组 - */ - public function __construct(array $config = []) - { - if (!empty($config)) { - $this->config = array_merge($this->config, $config); - } - - // 创建Builder对象 - $class = $this->getBuilderClass(); - - $this->builder = new $class($this); - } - - /** - * 获取当前的builder实例对象 - * @access public - * @return Builder - */ - public function getBuilder() - { - return $this->builder; - } - - /** - * 创建查询对象 - */ - public function newQuery() - { - $class = $this->getQueryClass(); - - /** @var BaseQuery $query */ - $query = new $class($this); - - $timeRule = $this->db->getConfig('time_query_rule'); - if (!empty($timeRule)) { - $query->timeRule($timeRule); - } - - return $query; - } - - /** - * 指定表名开始查询 - * @param $table - * @return BaseQuery - */ - public function table($table) - { - return $this->newQuery()->table($table); - } - - /** - * 指定表名开始查询(不带前缀) - * @param $name - * @return BaseQuery - */ - public function name($name) - { - return $this->newQuery()->name($name); - } - - /** - * 设置当前的数据库Db对象 - * @access public - * @param DbManager $db - * @return void - */ - public function setDb(DbManager $db) - { - $this->db = $db; - } - - /** - * 设置当前的缓存对象 - * @access public - * @param CacheInterface $cache - * @return void - */ - public function setCache(CacheInterface $cache) - { - $this->cache = $cache; - } - - /** - * 获取当前的缓存对象 - * @access public - * @return CacheInterface|null - */ - public function getCache() - { - return $this->cache; - } - - /** - * 获取数据库的配置参数 - * @access public - * @param string $config 配置名称 - * @return mixed - */ - public function getConfig(string $config = '') - { - if ('' === $config) { - return $this->config; - } - - return $this->config[$config] ?? null; - } - - /** - * 数据库SQL监控 - * @access protected - * @param string $sql 执行的SQL语句 留空自动获取 - * @param bool $master 主从标记 - * @return void - */ - protected function trigger(string $sql = '', bool $master = false): void - { - $listen = $this->db->getListen(); - if (empty($listen)) { - $listen[] = function ($sql, $time, $master) { - if (0 === strpos($sql, 'CONNECT:')) { - $this->db->log($sql); - return; - } - - // 记录SQL - if (is_bool($master)) { - // 分布式记录当前操作的主从 - $master = $master ? 'master|' : 'slave|'; - } else { - $master = ''; - } - - $this->db->log($sql . ' [ ' . $master . 'RunTime:' . $time . 's ]'); - }; - } - - $runtime = number_format((microtime(true) - $this->queryStartTime), 6); - $sql = $sql ?: $this->getLastsql(); - - if (empty($this->config['deploy'])) { - $master = null; - } - - foreach ($listen as $callback) { - if (is_callable($callback)) { - $callback($sql, $runtime, $master); - } - } - } - - /** - * 缓存数据 - * @access protected - * @param CacheItem $cacheItem 缓存Item - */ - protected function cacheData(CacheItem $cacheItem) - { - if ($cacheItem->getTag() && method_exists($this->cache, 'tag')) { - $this->cache->tag($cacheItem->getTag())->set($cacheItem->getKey(), $cacheItem->get(), $cacheItem->getExpire()); - } else { - $this->cache->set($cacheItem->getKey(), $cacheItem->get(), $cacheItem->getExpire()); - } - } - - /** - * 分析缓存Key - * @access protected - * @param BaseQuery $query 查询对象 - * @param string $method 查询方法 - * @return string - */ - protected function getCacheKey(BaseQuery $query, string $method = ''): string - { - if (!empty($query->getOptions('key')) && empty($method)) { - $key = 'think_' . $this->getConfig('database') . '.' . $query->getTable() . '|' . $query->getOptions('key'); - } else { - $key = $query->getQueryGuid(); - } - - return $key; - } - - /** - * 分析缓存 - * @access protected - * @param BaseQuery $query 查询对象 - * @param array $cache 缓存信息 - * @param string $method 查询方法 - * @return CacheItem - */ - protected function parseCache(BaseQuery $query, array $cache, string $method = ''): CacheItem - { - [$key, $expire, $tag] = $cache; - - if ($key instanceof CacheItem) { - $cacheItem = $key; - } else { - if (true === $key) { - $key = $this->getCacheKey($query, $method); - } - - $cacheItem = new CacheItem($key); - $cacheItem->expire($expire); - $cacheItem->tag($tag); - } - - return $cacheItem; - } - - /** - * 获取返回或者影响的记录数 - * @access public - * @return integer - */ - public function getNumRows(): int - { - return $this->numRows; - } - - /** - * 析构方法 - * @access public - */ - public function __destruct() - { - // 关闭连接 - $this->close(); - } -} diff --git a/vendor/topthink/think-orm/src/db/ConnectionInterface.php b/vendor/topthink/think-orm/src/db/ConnectionInterface.php deleted file mode 100644 index 18fe131..0000000 --- a/vendor/topthink/think-orm/src/db/ConnectionInterface.php +++ /dev/null @@ -1,190 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db; - -use Psr\SimpleCache\CacheInterface; -use think\DbManager; - -/** - * Connection interface - */ -interface ConnectionInterface -{ - /** - * 获取当前连接器类对应的Query类 - * @access public - * @return string - */ - public function getQueryClass(): string; - - /** - * 指定表名开始查询 - * @param $table - * @return BaseQuery - */ - public function table($table); - - /** - * 指定表名开始查询(不带前缀) - * @param $name - * @return BaseQuery - */ - public function name($name); - - /** - * 连接数据库方法 - * @access public - * @param array $config 接参数 - * @param integer $linkNum 连接序号 - * @return mixed - */ - public function connect(array $config = [], $linkNum = 0); - - /** - * 设置当前的数据库Db对象 - * @access public - * @param DbManager $db - * @return void - */ - public function setDb(DbManager $db); - - /** - * 设置当前的缓存对象 - * @access public - * @param CacheInterface $cache - * @return void - */ - public function setCache(CacheInterface $cache); - - /** - * 获取数据库的配置参数 - * @access public - * @param string $config 配置名称 - * @return mixed - */ - public function getConfig(string $config = ''); - - /** - * 关闭数据库(或者重新连接) - * @access public - * @return $this - */ - public function close(); - - /** - * 查找单条记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return array - */ - public function find(BaseQuery $query): array; - - /** - * 查找记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return array - */ - public function select(BaseQuery $query): array; - - /** - * 插入记录 - * @access public - * @param BaseQuery $query 查询对象 - * @param boolean $getLastInsID 返回自增主键 - * @return mixed - */ - public function insert(BaseQuery $query, bool $getLastInsID = false); - - /** - * 批量插入记录 - * @access public - * @param BaseQuery $query 查询对象 - * @param mixed $dataSet 数据集 - * @return integer - */ - public function insertAll(BaseQuery $query, array $dataSet = []): int; - - /** - * 更新记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return integer - */ - public function update(BaseQuery $query): int; - - /** - * 删除记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return int - */ - public function delete(BaseQuery $query): int; - - /** - * 得到某个字段的值 - * @access public - * @param BaseQuery $query 查询对象 - * @param string $field 字段名 - * @param mixed $default 默认值 - * @return mixed - */ - public function value(BaseQuery $query, string $field, $default = null); - - /** - * 得到某个列的数组 - * @access public - * @param BaseQuery $query 查询对象 - * @param string|array $column 字段名 多个字段用逗号分隔 - * @param string $key 索引 - * @return array - */ - public function column(BaseQuery $query, $column, string $key = ''): array; - - /** - * 执行数据库事务 - * @access public - * @param callable $callback 数据操作方法回调 - * @return mixed - */ - public function transaction(callable $callback); - - /** - * 启动事务 - * @access public - * @return void - */ - public function startTrans(); - - /** - * 用于非自动提交状态下面的查询提交 - * @access public - * @return void - */ - public function commit(); - - /** - * 事务回滚 - * @access public - * @return void - */ - public function rollback(); - - /** - * 获取最近一次查询的sql语句 - * @access public - * @return string - */ - public function getLastSql(): string; - -} diff --git a/vendor/topthink/think-orm/src/db/Fetch.php b/vendor/topthink/think-orm/src/db/Fetch.php deleted file mode 100644 index a997a85..0000000 --- a/vendor/topthink/think-orm/src/db/Fetch.php +++ /dev/null @@ -1,492 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db; - -use think\db\exception\DbException as Exception; -use think\helper\Str; - -/** - * SQL获取类 - */ -class Fetch -{ - /** - * 查询对象 - * @var Query - */ - protected $query; - - /** - * Connection对象 - * @var Connection - */ - protected $connection; - - /** - * Builder对象 - * @var Builder - */ - protected $builder; - - /** - * 创建一个查询SQL获取对象 - * - * @param Query $query 查询对象 - */ - public function __construct(Query $query) - { - $this->query = $query; - $this->connection = $query->getConnection(); - $this->builder = $this->connection->getBuilder(); - } - - /** - * 聚合查询 - * @access protected - * @param string $aggregate 聚合方法 - * @param string $field 字段名 - * @return string - */ - protected function aggregate(string $aggregate, string $field): string - { - $this->query->parseOptions(); - - $field = $aggregate . '(' . $this->builder->parseKey($this->query, $field) . ') AS think_' . strtolower($aggregate); - - return $this->value($field, 0, false); - } - - /** - * 得到某个字段的值 - * @access public - * @param string $field 字段名 - * @param mixed $default 默认值 - * @param bool $one - * @return string - */ - public function value(string $field, $default = null, bool $one = true): string - { - $options = $this->query->parseOptions(); - - if (isset($options['field'])) { - $this->query->removeOption('field'); - } - - $this->query->setOption('field', (array) $field); - - // 生成查询SQL - $sql = $this->builder->select($this->query, $one); - - if (isset($options['field'])) { - $this->query->setOption('field', $options['field']); - } else { - $this->query->removeOption('field'); - } - - return $this->fetch($sql); - } - - /** - * 得到某个列的数组 - * @access public - * @param string $field 字段名 多个字段用逗号分隔 - * @param string $key 索引 - * @return string - */ - public function column(string $field, string $key = ''): string - { - $options = $this->query->parseOptions(); - - if (isset($options['field'])) { - $this->query->removeOption('field'); - } - - if ($key && '*' != $field) { - $field = $key . ',' . $field; - } - - $field = array_map('trim', explode(',', $field)); - - $this->query->setOption('field', $field); - - // 生成查询SQL - $sql = $this->builder->select($this->query); - - if (isset($options['field'])) { - $this->query->setOption('field', $options['field']); - } else { - $this->query->removeOption('field'); - } - - return $this->fetch($sql); - } - - /** - * 插入记录 - * @access public - * @param array $data 数据 - * @return string - */ - public function insert(array $data = []): string - { - $options = $this->query->parseOptions(); - - if (!empty($data)) { - $this->query->setOption('data', $data); - } - - $sql = $this->builder->insert($this->query); - - return $this->fetch($sql); - } - - /** - * 插入记录并获取自增ID - * @access public - * @param array $data 数据 - * @return string - */ - public function insertGetId(array $data = []): string - { - return $this->insert($data); - } - - /** - * 保存数据 自动判断insert或者update - * @access public - * @param array $data 数据 - * @param bool $forceInsert 是否强制insert - * @return string - */ - public function save(array $data = [], bool $forceInsert = false): string - { - if ($forceInsert) { - return $this->insert($data); - } - - $data = array_merge($this->query->getOptions('data') ?: [], $data); - - $this->query->setOption('data', $data); - - if ($this->query->getOptions('where')) { - $isUpdate = true; - } else { - $isUpdate = $this->query->parseUpdateData($data); - } - - return $isUpdate ? $this->update() : $this->insert(); - } - - /** - * 批量插入记录 - * @access public - * @param array $dataSet 数据集 - * @param integer $limit 每次写入数据限制 - * @return string - */ - public function insertAll(array $dataSet = [], int $limit = null): string - { - $options = $this->query->parseOptions(); - - if (empty($dataSet)) { - $dataSet = $options['data']; - } - - if (empty($limit) && !empty($options['limit'])) { - $limit = $options['limit']; - } - - if ($limit) { - $array = array_chunk($dataSet, $limit, true); - $fetchSql = []; - foreach ($array as $item) { - $sql = $this->builder->insertAll($this->query, $item); - $bind = $this->query->getBind(); - - $fetchSql[] = $this->connection->getRealSql($sql, $bind); - } - - return implode(';', $fetchSql); - } - - $sql = $this->builder->insertAll($this->query, $dataSet); - - return $this->fetch($sql); - } - - /** - * 通过Select方式插入记录 - * @access public - * @param array $fields 要插入的数据表字段名 - * @param string $table 要插入的数据表名 - * @return string - */ - public function selectInsert(array $fields, string $table): string - { - $this->query->parseOptions(); - - $sql = $this->builder->selectInsert($this->query, $fields, $table); - - return $this->fetch($sql); - } - - /** - * 更新记录 - * @access public - * @param mixed $data 数据 - * @return string - */ - public function update(array $data = []): string - { - $options = $this->query->parseOptions(); - - $data = !empty($data) ? $data : $options['data']; - - $pk = $this->query->getPk(); - - if (empty($options['where'])) { - // 如果存在主键数据 则自动作为更新条件 - if (is_string($pk) && isset($data[$pk])) { - $this->query->where($pk, '=', $data[$pk]); - unset($data[$pk]); - } elseif (is_array($pk)) { - // 增加复合主键支持 - foreach ($pk as $field) { - if (isset($data[$field])) { - $this->query->where($field, '=', $data[$field]); - } else { - // 如果缺少复合主键数据则不执行 - throw new Exception('miss complex primary data'); - } - unset($data[$field]); - } - } - - if (empty($this->query->getOptions('where'))) { - // 如果没有任何更新条件则不执行 - throw new Exception('miss update condition'); - } - } - - // 更新数据 - $this->query->setOption('data', $data); - - // 生成UPDATE SQL语句 - $sql = $this->builder->update($this->query); - - return $this->fetch($sql); - } - - /** - * 删除记录 - * @access public - * @param mixed $data 表达式 true 表示强制删除 - * @return string - */ - public function delete($data = null): string - { - $options = $this->query->parseOptions(); - - if (!is_null($data) && true !== $data) { - // AR模式分析主键条件 - $this->query->parsePkWhere($data); - } - - if (!empty($options['soft_delete'])) { - // 软删除 - [$field, $condition] = $options['soft_delete']; - if ($condition) { - $this->query->setOption('soft_delete', null); - $this->query->setOption('data', [$field => $condition]); - // 生成删除SQL语句 - $sql = $this->builder->delete($this->query); - return $this->fetch($sql); - } - } - - // 生成删除SQL语句 - $sql = $this->builder->delete($this->query); - - return $this->fetch($sql); - } - - /** - * 查找记录 返回SQL - * @access public - * @param mixed $data - * @return string - */ - public function select($data = null): string - { - $this->query->parseOptions(); - - if (!is_null($data)) { - // 主键条件分析 - $this->query->parsePkWhere($data); - } - - // 生成查询SQL - $sql = $this->builder->select($this->query); - - return $this->fetch($sql); - } - - /** - * 查找单条记录 返回SQL语句 - * @access public - * @param mixed $data - * @return string - */ - public function find($data = null): string - { - $this->query->parseOptions(); - - if (!is_null($data)) { - // AR模式分析主键条件 - $this->query->parsePkWhere($data); - } - - // 生成查询SQL - $sql = $this->builder->select($this->query, true); - - // 获取实际执行的SQL语句 - return $this->fetch($sql); - } - - /** - * 查找多条记录 如果不存在则抛出异常 - * @access public - * @param mixed $data - * @return string - */ - public function selectOrFail($data = null): string - { - return $this->select($data); - } - - /** - * 查找单条记录 如果不存在则抛出异常 - * @access public - * @param mixed $data - * @return string - */ - public function findOrFail($data = null): string - { - return $this->find($data); - } - - /** - * 查找单条记录 不存在返回空数据(或者空模型) - * @access public - * @param mixed $data 数据 - * @return string - */ - public function findOrEmpty($data = null) - { - return $this->find($data); - } - - /** - * 获取实际的SQL语句 - * @access public - * @param string $sql - * @return string - */ - public function fetch(string $sql): string - { - $bind = $this->query->getBind(); - - return $this->connection->getRealSql($sql, $bind); - } - - /** - * COUNT查询 - * @access public - * @param string $field 字段名 - * @return string - */ - public function count(string $field = '*'): string - { - $options = $this->query->parseOptions(); - - if (!empty($options['group'])) { - // 支持GROUP - $subSql = $this->query->field('count(' . $field . ') AS think_count')->buildSql(); - $query = $this->query->newQuery()->table([$subSql => '_group_count_']); - - return $query->fetchsql()->aggregate('COUNT', '*'); - } else { - return $this->aggregate('COUNT', $field); - } - } - - /** - * SUM查询 - * @access public - * @param string $field 字段名 - * @return string - */ - public function sum(string $field): string - { - return $this->aggregate('SUM', $field); - } - - /** - * MIN查询 - * @access public - * @param string $field 字段名 - * @return string - */ - public function min(string $field): string - { - return $this->aggregate('MIN', $field); - } - - /** - * MAX查询 - * @access public - * @param string $field 字段名 - * @return string - */ - public function max(string $field): string - { - return $this->aggregate('MAX', $field); - } - - /** - * AVG查询 - * @access public - * @param string $field 字段名 - * @return string - */ - public function avg(string $field): string - { - return $this->aggregate('AVG', $field); - } - - public function __call($method, $args) - { - if (strtolower(substr($method, 0, 5)) == 'getby') { - // 根据某个字段获取记录 - $field = Str::snake(substr($method, 5)); - return $this->where($field, '=', $args[0])->find(); - } elseif (strtolower(substr($method, 0, 10)) == 'getfieldby') { - // 根据某个字段获取记录的某个值 - $name = Str::snake(substr($method, 10)); - return $this->where($name, '=', $args[0])->value($args[1]); - } - - $result = call_user_func_array([$this->query, $method], $args); - return $result === $this->query ? $this : $result; - } -} diff --git a/vendor/topthink/think-orm/src/db/Mongo.php b/vendor/topthink/think-orm/src/db/Mongo.php deleted file mode 100644 index cf6e9c4..0000000 --- a/vendor/topthink/think-orm/src/db/Mongo.php +++ /dev/null @@ -1,708 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); -namespace think\db; - -use MongoDB\Driver\Command; -use MongoDB\Driver\Cursor; -use MongoDB\Driver\Exception\AuthenticationException; -use MongoDB\Driver\Exception\ConnectionException; -use MongoDB\Driver\Exception\InvalidArgumentException; -use MongoDB\Driver\Exception\RuntimeException; -use MongoDB\Driver\ReadPreference; -use MongoDB\Driver\WriteConcern; -use think\db\exception\DbException as Exception; -use think\Paginator; - -class Mongo extends BaseQuery -{ - /** - * 当前数据库连接对象 - * @var \think\db\connector\Mongo - */ - protected $connection; - - /** - * 执行指令 返回数据集 - * @access public - * @param Command $command 指令 - * @param string $dbName - * @param ReadPreference $readPreference readPreference - * @param string|array $typeMap 指定返回的typeMap - * @return mixed - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - */ - public function command(Command $command, string $dbName = '', ReadPreference $readPreference = null, $typeMap = null) - { - return $this->connection->command($command, $dbName, $readPreference, $typeMap); - } - - /** - * 执行command - * @access public - * @param string|array|object $command 指令 - * @param mixed $extra 额外参数 - * @param string $db 数据库名 - * @return array - */ - public function cmd($command, $extra = null, string $db = ''): array - { - $this->parseOptions(); - return $this->connection->cmd($this, $command, $extra, $db); - } - - /** - * 指定distinct查询 - * @access public - * @param string $field 字段名 - * @return array - */ - public function getDistinct(string $field) - { - $result = $this->cmd('distinct', $field); - return $result[0]['values']; - } - - /** - * 获取数据库的所有collection - * @access public - * @param string $db 数据库名称 留空为当前数据库 - * @throws Exception - */ - public function listCollections(string $db = '') - { - $cursor = $this->cmd('listCollections', null, $db); - $result = []; - foreach ($cursor as $collection) { - $result[] = $collection['name']; - } - - return $result; - } - - /** - * COUNT查询 - * @access public - * @param string $field 字段名 - * @return integer - */ - public function count(string $field = null): int - { - $result = $this->cmd('count'); - - return $result[0]['n']; - } - - /** - * 聚合查询 - * @access public - * @param string $aggregate 聚合指令 - * @param string $field 字段名 - * @param bool $force 强制转为数字类型 - * @return mixed - */ - public function aggregate(string $aggregate, $field, bool $force = false) - { - $result = $this->cmd('aggregate', [strtolower($aggregate), $field]); - $value = $result[0]['aggregate'] ?? 0; - - if ($force) { - $value += 0; - } - - return $value; - } - - /** - * 多聚合操作 - * - * @param array $aggregate 聚合指令, 可以聚合多个参数, 如 ['sum' => 'field1', 'avg' => 'field2'] - * @param array $groupBy 类似mysql里面的group字段, 可以传入多个字段, 如 ['field_a', 'field_b', 'field_c'] - * @return array 查询结果 - */ - public function multiAggregate(array $aggregate, array $groupBy): array - { - $result = $this->cmd('multiAggregate', [$aggregate, $groupBy]); - - foreach ($result as &$row) { - if (isset($row['_id']) && !empty($row['_id'])) { - foreach ($row['_id'] as $k => $v) { - $row[$k] = $v; - } - unset($row['_id']); - } - } - - return $result; - } - - /** - * 字段值增长 - * @access public - * @param string $field 字段名 - * @param float $step 增长值 - * @return $this - */ - public function inc(string $field, float $step = 1) - { - $this->options['data'][$field] = ['$inc', $step]; - - return $this; - } - - /** - * 字段值减少 - * @access public - * @param string $field 字段名 - * @param float $step 减少值 - * @return $this - */ - public function dec(string $field, float $step = 1) - { - return $this->inc($field, -1 * $step); - } - - /** - * 指定当前操作的Collection - * @access public - * @param string $table 表名 - * @return $this - */ - public function table($table) - { - $this->options['table'] = $table; - - return $this; - } - - /** - * table方法的别名 - * @access public - * @param string $collection - * @return $this - */ - public function collection(string $collection) - { - return $this->table($collection); - } - - /** - * 设置typeMap - * @access public - * @param string|array $typeMap - * @return $this - */ - public function typeMap($typeMap) - { - $this->options['typeMap'] = $typeMap; - return $this; - } - - /** - * awaitData - * @access public - * @param bool $awaitData - * @return $this - */ - public function awaitData(bool $awaitData) - { - $this->options['awaitData'] = $awaitData; - return $this; - } - - /** - * batchSize - * @access public - * @param integer $batchSize - * @return $this - */ - public function batchSize(int $batchSize) - { - $this->options['batchSize'] = $batchSize; - return $this; - } - - /** - * exhaust - * @access public - * @param bool $exhaust - * @return $this - */ - public function exhaust(bool $exhaust) - { - $this->options['exhaust'] = $exhaust; - return $this; - } - - /** - * 设置modifiers - * @access public - * @param array $modifiers - * @return $this - */ - public function modifiers(array $modifiers) - { - $this->options['modifiers'] = $modifiers; - return $this; - } - - /** - * 设置noCursorTimeout - * @access public - * @param bool $noCursorTimeout - * @return $this - */ - public function noCursorTimeout(bool $noCursorTimeout) - { - $this->options['noCursorTimeout'] = $noCursorTimeout; - return $this; - } - - /** - * 设置oplogReplay - * @access public - * @param bool $oplogReplay - * @return $this - */ - public function oplogReplay(bool $oplogReplay) - { - $this->options['oplogReplay'] = $oplogReplay; - return $this; - } - - /** - * 设置partial - * @access public - * @param bool $partial - * @return $this - */ - public function partial(bool $partial) - { - $this->options['partial'] = $partial; - return $this; - } - - /** - * maxTimeMS - * @access public - * @param string $maxTimeMS - * @return $this - */ - public function maxTimeMS(string $maxTimeMS) - { - $this->options['maxTimeMS'] = $maxTimeMS; - return $this; - } - - /** - * collation - * @access public - * @param array $collation - * @return $this - */ - public function collation(array $collation) - { - $this->options['collation'] = $collation; - return $this; - } - - /** - * 设置是否REPLACE - * @access public - * @param bool $replace 是否使用REPLACE写入数据 - * @return $this - */ - public function replace(bool $replace = true) - { - return $this; - } - - /** - * 设置返回字段 - * @access public - * @param mixed $field 字段信息 - * @return $this - */ - public function field($field) - { - if (empty($field) || '*' == $field) { - return $this; - } - - if (is_string($field)) { - $field = array_map('trim', explode(',', $field)); - } - - $projection = []; - foreach ($field as $key => $val) { - if (is_numeric($key)) { - $projection[$val] = 1; - } else { - $projection[$key] = $val; - } - } - - $this->options['projection'] = $projection; - - return $this; - } - - /** - * 指定要排除的查询字段 - * @access public - * @param array|string $field 要排除的字段 - * @return $this - */ - public function withoutField($field) - { - if (empty($field) || '*' == $field) { - return $this; - } - - if (is_string($field)) { - $field = array_map('trim', explode(',', $field)); - } - - $projection = []; - foreach ($field as $key => $val) { - if (is_numeric($key)) { - $projection[$val] = 0; - } else { - $projection[$key] = $val; - } - } - - $this->options['projection'] = $projection; - return $this; - } - - /** - * 设置skip - * @access public - * @param integer $skip - * @return $this - */ - public function skip(int $skip) - { - $this->options['skip'] = $skip; - return $this; - } - - /** - * 设置slaveOk - * @access public - * @param bool $slaveOk - * @return $this - */ - public function slaveOk(bool $slaveOk) - { - $this->options['slaveOk'] = $slaveOk; - return $this; - } - - /** - * 指定查询数量 - * @access public - * @param int $offset 起始位置 - * @param int $length 查询数量 - * @return $this - */ - public function limit(int $offset, int $length = null) - { - if (is_null($length)) { - $length = $offset; - $offset = 0; - } - - $this->options['skip'] = $offset; - $this->options['limit'] = $length; - - return $this; - } - - /** - * 设置sort - * @access public - * @param array|string $field - * @param string $order - * @return $this - */ - public function order($field, string $order = '') - { - if (is_array($field)) { - $this->options['sort'] = $field; - } else { - $this->options['sort'][$field] = 'asc' == strtolower($order) ? 1 : -1; - } - return $this; - } - - /** - * 设置tailable - * @access public - * @param bool $tailable - * @return $this - */ - public function tailable(bool $tailable) - { - $this->options['tailable'] = $tailable; - return $this; - } - - /** - * 设置writeConcern对象 - * @access public - * @param WriteConcern $writeConcern - * @return $this - */ - public function writeConcern(WriteConcern $writeConcern) - { - $this->options['writeConcern'] = $writeConcern; - return $this; - } - - /** - * 获取当前数据表的主键 - * @access public - * @return string|array - */ - public function getPk() - { - return $this->pk ?: $this->connection->getConfig('pk'); - } - - /** - * 执行查询但只返回Cursor对象 - * @access public - * @return Cursor - */ - public function getCursor(): Cursor - { - $this->parseOptions(); - - return $this->connection->getCursor($this); - } - - /** - * 获取当前的查询标识 - * @access public - * @param mixed $data 要序列化的数据 - * @return string - */ - public function getQueryGuid($data = null): string - { - return md5($this->getConfig('database') . serialize(var_export($data ?: $this->options, true))); - } - - /** - * 分页查询 - * @access public - * @param int|array $listRows 每页数量 数组表示配置参数 - * @param int|bool $simple 是否简洁模式或者总记录数 - * @return Paginator - * @throws Exception - */ - public function paginate($listRows = null, $simple = false): Paginator - { - if (is_int($simple)) { - $total = $simple; - $simple = false; - } - - $defaultConfig = [ - 'query' => [], //url额外参数 - 'fragment' => '', //url锚点 - 'var_page' => 'page', //分页变量 - 'list_rows' => 15, //每页数量 - ]; - - if (is_array($listRows)) { - $config = array_merge($defaultConfig, $listRows); - $listRows = intval($config['list_rows']); - } else { - $config = $defaultConfig; - $listRows = intval($listRows ?: $config['list_rows']); - } - - $page = isset($config['page']) ? (int) $config['page'] : Paginator::getCurrentPage($config['var_page']); - - $page = $page < 1 ? 1 : $page; - - $config['path'] = $config['path'] ?? Paginator::getCurrentPath(); - - if (!isset($total) && !$simple) { - $options = $this->getOptions(); - - unset($this->options['order'], $this->options['limit'], $this->options['page'], $this->options['field']); - - $total = $this->count(); - $results = $this->options($options)->page($page, $listRows)->select(); - } elseif ($simple) { - $results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select(); - $total = null; - } else { - $results = $this->page($page, $listRows)->select(); - } - - $this->removeOption('limit'); - $this->removeOption('page'); - - return Paginator::make($results, $listRows, $page, $total, $simple, $config); - } - - /** - * 分批数据返回处理 - * @access public - * @param integer $count 每次处理的数据数量 - * @param callable $callback 处理回调方法 - * @param string|array $column 分批处理的字段名 - * @param string $order 字段排序 - * @return bool - * @throws Exception - */ - public function chunk(int $count, callable $callback, $column = null, string $order = 'asc'): bool - { - $options = $this->getOptions(); - $column = $column ?: $this->getPk(); - - if (isset($options['order'])) { - unset($options['order']); - } - - if (is_array($column)) { - $times = 1; - $query = $this->options($options)->page($times, $count); - } else { - $query = $this->options($options)->limit($count); - - if (strpos($column, '.')) { - [$alias, $key] = explode('.', $column); - } else { - $key = $column; - } - } - - $resultSet = $query->order($column, $order)->select(); - - while (count($resultSet) > 0) { - if (false === call_user_func($callback, $resultSet)) { - return false; - } - - if (isset($times)) { - $times++; - $query = $this->options($options)->page($times, $count); - } else { - $end = $resultSet->pop(); - $lastId = is_array($end) ? $end[$key] : $end->getData($key); - - $query = $this->options($options) - ->limit($count) - ->where($column, 'asc' == strtolower($order) ? '>' : '<', $lastId); - } - - $resultSet = $query->order($column, $order)->select(); - } - - return true; - } - - /** - * 分析表达式(可用于查询或者写入操作) - * @access public - * @return array - */ - public function parseOptions(): array - { - $options = $this->options; - - // 获取数据表 - if (empty($options['table'])) { - $options['table'] = $this->getTable(); - } - - foreach (['where', 'data', 'projection', 'filter', 'json', 'with_attr', 'with_relation_attr'] as $name) { - if (!isset($options[$name])) { - $options[$name] = []; - } - } - - $modifiers = empty($options['modifiers']) ? [] : $options['modifiers']; - if (isset($options['comment'])) { - $modifiers['$comment'] = $options['comment']; - } - - if (isset($options['maxTimeMS'])) { - $modifiers['$maxTimeMS'] = $options['maxTimeMS']; - } - - if (!empty($modifiers)) { - $options['modifiers'] = $modifiers; - } - - if (!isset($options['typeMap'])) { - $options['typeMap'] = $this->getConfig('type_map'); - } - - if (!isset($options['limit'])) { - $options['limit'] = 0; - } - - foreach (['master', 'fetch_sql', 'fetch_cursor'] as $name) { - if (!isset($options[$name])) { - $options[$name] = false; - } - } - - if (isset($options['page'])) { - // 根据页数计算limit - [$page, $listRows] = $options['page']; - - $page = $page > 0 ? $page : 1; - $listRows = $listRows > 0 ? $listRows : (is_numeric($options['limit']) ? $options['limit'] : 20); - $offset = $listRows * ($page - 1); - $options['skip'] = intval($offset); - $options['limit'] = intval($listRows); - } - - $this->options = $options; - - return $options; - } - - /** - * 获取字段类型信息 - * @access public - * @return array - */ - public function getFieldsType(): array - { - if (!empty($this->options['field_type'])) { - return $this->options['field_type']; - } - - return []; - } - - /** - * 获取字段类型信息 - * @access public - * @param string $field 字段名 - * @return string|null - */ - public function getFieldType(string $field) - { - $fieldType = $this->getFieldsType(); - - return $fieldType[$field] ?? null; - } -} diff --git a/vendor/topthink/think-orm/src/db/PDOConnection.php b/vendor/topthink/think-orm/src/db/PDOConnection.php deleted file mode 100644 index 8f89fe3..0000000 --- a/vendor/topthink/think-orm/src/db/PDOConnection.php +++ /dev/null @@ -1,1915 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare(strict_types=1); - -namespace think\db; - -use Closure; -use PDO; -use PDOStatement; -use think\db\exception\BindParamException; -use think\db\exception\DbEventException; -use think\db\exception\DbException; -use think\db\exception\PDOException; -use think\Model; - -/** - * 数据库连接基础类 - * @property PDO[] $links - * @property PDO $linkID - * @property PDO $linkRead - * @property PDO $linkWrite - */ -abstract class PDOConnection extends Connection -{ - const PARAM_FLOAT = 21; - - /** - * 数据库连接参数配置 - * @var array - */ - protected $config = [ - // 数据库类型 - 'type' => '', - // 服务器地址 - 'hostname' => '', - // 数据库名 - 'database' => '', - // 用户名 - 'username' => '', - // 密码 - 'password' => '', - // 端口 - 'hostport' => '', - // 连接dsn - 'dsn' => '', - // 数据库连接参数 - 'params' => [], - // 数据库编码默认采用utf8 - 'charset' => 'utf8', - // 数据库表前缀 - 'prefix' => '', - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) - 'deploy' => 0, - // 数据库读写是否分离 主从式有效 - 'rw_separate' => false, - // 读写分离后 主服务器数量 - 'master_num' => 1, - // 指定从服务器序号 - 'slave_no' => '', - // 模型写入后自动读取主服务器 - 'read_master' => false, - // 是否严格检查字段是否存在 - 'fields_strict' => true, - // 开启字段缓存 - 'fields_cache' => false, - // 监听SQL - 'trigger_sql' => true, - // Builder类 - 'builder' => '', - // Query类 - 'query' => '', - // 是否需要断线重连 - 'break_reconnect' => false, - // 断线标识字符串 - 'break_match_str' => [], - // 自动参数绑定 - 'auto_param_bind' => true, - ]; - - /** - * PDO操作实例 - * @var PDOStatement - */ - protected $PDOStatement; - - /** - * 当前SQL指令 - * @var string - */ - protected $queryStr = ''; - - /** - * 事务指令数 - * @var int - */ - protected $transTimes = 0; - - /** - * 重连次数 - * @var int - */ - protected $reConnectTimes = 0; - - /** - * 查询结果类型 - * @var int - */ - protected $fetchType = PDO::FETCH_ASSOC; - - /** - * 字段属性大小写 - * @var int - */ - protected $attrCase = PDO::CASE_LOWER; - - /** - * 数据表信息 - * @var array - */ - protected $info = []; - - /** - * 查询开始时间 - * @var float - */ - protected $queryStartTime; - - /** - * PDO连接参数 - * @var array - */ - protected $params = [ - PDO::ATTR_CASE => PDO::CASE_NATURAL, - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, - PDO::ATTR_STRINGIFY_FETCHES => false, - PDO::ATTR_EMULATE_PREPARES => false, - ]; - - /** - * 参数绑定类型映射 - * @var array - */ - protected $bindType = [ - 'string' => PDO::PARAM_STR, - 'str' => PDO::PARAM_STR, - 'integer' => PDO::PARAM_INT, - 'int' => PDO::PARAM_INT, - 'boolean' => PDO::PARAM_BOOL, - 'bool' => PDO::PARAM_BOOL, - 'float' => self::PARAM_FLOAT, - 'datetime' => PDO::PARAM_STR, - 'timestamp' => PDO::PARAM_STR, - ]; - - /** - * 服务器断线标识字符 - * @var array - */ - protected $breakMatchStr = [ - 'server has gone away', - 'no connection to the server', - 'Lost connection', - 'is dead or not enabled', - 'Error while sending', - 'decryption failed or bad record mac', - 'server closed the connection unexpectedly', - 'SSL connection has been closed unexpectedly', - 'Error writing data to the connection', - 'Resource deadlock avoided', - 'failed with errno', - 'child connection forced to terminate due to client_idle_limit', - 'query_wait_timeout', - 'reset by peer', - 'Physical connection is not usable', - 'TCP Provider: Error code 0x68', - 'ORA-03114', - 'Packets out of order. Expected', - 'Adaptive Server connection failed', - 'Communication link failure', - 'connection is no longer usable', - 'Login timeout expired', - 'SQLSTATE[HY000] [2002] Connection refused', - 'running with the --read-only option so it cannot execute this statement', - 'The connection is broken and recovery is not possible. The connection is marked by the client driver as unrecoverable. No attempt was made to restore the connection.', - 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again', - 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known', - 'SQLSTATE[HY000]: General error: 7 SSL SYSCALL error: EOF detected', - 'SQLSTATE[HY000] [2002] Connection timed out', - 'SSL: Connection timed out', - 'SQLSTATE[HY000]: General error: 1105 The last transaction was aborted due to Seamless Scaling. Please retry.', - ]; - - /** - * 绑定参数 - * @var array - */ - protected $bind = []; - - /** - * 获取当前连接器类对应的Query类 - * @access public - * @return string - */ - public function getQueryClass(): string - { - return $this->getConfig('query') ?: Query::class; - } - - /** - * 获取当前连接器类对应的Builder类 - * @access public - * @return string - */ - public function getBuilderClass(): string - { - return $this->getConfig('builder') ?: '\\think\\db\\builder\\' . ucfirst($this->getConfig('type')); - } - - /** - * 解析pdo连接的dsn信息 - * @access protected - * @param array $config 连接信息 - * @return string - */ - abstract protected function parseDsn(array $config): string; - - /** - * 取得数据表的字段信息 - * @access public - * @param string $tableName 数据表名称 - * @return array - */ - abstract public function getFields(string $tableName): array; - - /** - * 取得数据库的表信息 - * @access public - * @param string $dbName 数据库名称 - * @return array - */ - abstract public function getTables(string $dbName = ''): array; - - /** - * 对返数据表字段信息进行大小写转换出来 - * @access public - * @param array $info 字段信息 - * @return array - */ - public function fieldCase(array $info): array - { - // 字段大小写转换 - switch ($this->attrCase) { - case PDO::CASE_LOWER: - $info = array_change_key_case($info); - break; - case PDO::CASE_UPPER: - $info = array_change_key_case($info, CASE_UPPER); - break; - case PDO::CASE_NATURAL: - default: - // 不做转换 - } - - return $info; - } - - /** - * 获取字段类型 - * @access protected - * @param string $type 字段类型 - * @return string - */ - protected function getFieldType(string $type): string - { - if (0 === stripos($type, 'set') || 0 === stripos($type, 'enum')) { - $result = 'string'; - } elseif (preg_match('/(double|float|decimal|real|numeric)/is', $type)) { - $result = 'float'; - } elseif (preg_match('/(int|serial|bit)/is', $type)) { - $result = 'int'; - } elseif (preg_match('/bool/is', $type)) { - $result = 'bool'; - } elseif (0 === stripos($type, 'timestamp')) { - $result = 'timestamp'; - } elseif (0 === stripos($type, 'datetime')) { - $result = 'datetime'; - } elseif (0 === stripos($type, 'date')) { - $result = 'date'; - } else { - $result = 'string'; - } - - return $result; - } - - /** - * 获取字段绑定类型 - * @access public - * @param string $type 字段类型 - * @return integer - */ - public function getFieldBindType(string $type): int - { - if (in_array($type, ['integer', 'string', 'float', 'boolean', 'bool', 'int', 'str'])) { - $bind = $this->bindType[$type]; - } elseif (0 === strpos($type, 'set') || 0 === strpos($type, 'enum')) { - $bind = PDO::PARAM_STR; - } elseif (preg_match('/(double|float|decimal|real|numeric)/is', $type)) { - $bind = self::PARAM_FLOAT; - } elseif (preg_match('/(int|serial|bit)/is', $type)) { - $bind = PDO::PARAM_INT; - } elseif (preg_match('/bool/is', $type)) { - $bind = PDO::PARAM_BOOL; - } else { - $bind = PDO::PARAM_STR; - } - - return $bind; - } - - /** - * 获取数据表信息缓存key - * @access protected - * @param string $schema 数据表名称 - * @return string - */ - protected function getSchemaCacheKey(string $schema): string - { - return $this->getConfig('hostname') . ':' . $this->getConfig('hostport') . '@' . $schema; - } - - /** - * @param string $tableName 数据表名称 - * @param bool $force 强制从数据库获取 - * @return array - */ - public function getSchemaInfo(string $tableName, $force = false) - { - if (!strpos($tableName, '.')) { - $schema = $this->getConfig('database') . '.' . $tableName; - } else { - $schema = $tableName; - } - - if (!isset($this->info[$schema]) || $force) { - // 读取字段缓存 - $cacheKey = $this->getSchemaCacheKey($schema); - if ($this->config['fields_cache'] && !empty($this->cache) && !$force) { - $info = $this->cache->get($cacheKey); - } - - if (empty($info)) { - $info = $this->getTableFieldsInfo($tableName); - if (!empty($this->cache) && ($this->config['fields_cache'] || $force)) { - $this->cache->set($cacheKey, $info); - } - } - - $pk = $info['_pk'] ?? null; - $autoinc = $info['_autoinc'] ?? null; - unset($info['_pk'], $info['_autoinc']); - - $bind = []; - foreach ($info as $name => $val) { - $bind[$name] = $this->getFieldBindType($val); - } - - $this->info[$schema] = [ - 'fields' => array_keys($info), - 'type' => $info, - 'bind' => $bind, - 'pk' => $pk, - 'autoinc' => $autoinc, - ]; - } - - return $this->info[$schema]; - } - - /** - * 获取数据表信息 - * @access public - * @param mixed $tableName 数据表名 留空自动获取 - * @param string $fetch 获取信息类型 包括 fields type bind pk - * @return mixed - */ - public function getTableInfo($tableName, string $fetch = '') - { - if (is_array($tableName)) { - $tableName = key($tableName) ?: current($tableName); - } - - if (strpos($tableName, ',') || strpos($tableName, ')')) { - // 多表不获取字段信息 - return []; - } - - [$tableName] = explode(' ', $tableName); - - $info = $this->getSchemaInfo($tableName); - - return $fetch ? $info[$fetch] : $info; - } - - /** - * 获取数据表的字段信息 - * @access public - * @param string $tableName 数据表名 - * @return array - */ - public function getTableFieldsInfo(string $tableName): array - { - $fields = $this->getFields($tableName); - $info = []; - - foreach ($fields as $key => $val) { - // 记录字段类型 - $info[$key] = $this->getFieldType($val['type']); - - if (!empty($val['primary'])) { - $pk[] = $key; - } - - if (!empty($val['autoinc'])) { - $autoinc = $key; - } - } - - if (isset($pk)) { - // 设置主键 - $pk = count($pk) > 1 ? $pk : $pk[0]; - $info['_pk'] = $pk; - } - - if (isset($autoinc)) { - $info['_autoinc'] = $autoinc; - } - - return $info; - } - - /** - * 获取数据表的主键 - * @access public - * @param mixed $tableName 数据表名 - * @return string|array - */ - public function getPk($tableName) - { - return $this->getTableInfo($tableName, 'pk'); - } - - /** - * 获取数据表的自增主键 - * @access public - * @param mixed $tableName 数据表名 - * @return string - */ - public function getAutoInc($tableName) - { - return $this->getTableInfo($tableName, 'autoinc'); - } - - /** - * 获取数据表字段信息 - * @access public - * @param mixed $tableName 数据表名 - * @return array - */ - public function getTableFields($tableName): array - { - return $this->getTableInfo($tableName, 'fields'); - } - - /** - * 获取数据表字段类型 - * @access public - * @param mixed $tableName 数据表名 - * @param string $field 字段名 - * @return array|string - */ - public function getFieldsType($tableName, string $field = null) - { - $result = $this->getTableInfo($tableName, 'type'); - - if ($field && isset($result[$field])) { - return $result[$field]; - } - - return $result; - } - - /** - * 获取数据表绑定信息 - * @access public - * @param mixed $tableName 数据表名 - * @return array - */ - public function getFieldsBind($tableName): array - { - return $this->getTableInfo($tableName, 'bind'); - } - - /** - * 连接数据库方法 - * @access public - * @param array $config 连接参数 - * @param integer $linkNum 连接序号 - * @param array|bool $autoConnection 是否自动连接主数据库(用于分布式) - * @return PDO - * @throws PDOException - */ - public function connect(array $config = [], $linkNum = 0, $autoConnection = false): PDO - { - if (isset($this->links[$linkNum])) { - return $this->links[$linkNum]; - } - - if (empty($config)) { - $config = $this->config; - } else { - $config = array_merge($this->config, $config); - } - - // 连接参数 - if (isset($config['params']) && is_array($config['params'])) { - $params = $config['params'] + $this->params; - } else { - $params = $this->params; - } - - // 记录当前字段属性大小写设置 - $this->attrCase = $params[PDO::ATTR_CASE]; - - if (!empty($config['break_match_str'])) { - $this->breakMatchStr = array_merge($this->breakMatchStr, (array) $config['break_match_str']); - } - - try { - if (empty($config['dsn'])) { - $config['dsn'] = $this->parseDsn($config); - } - - $startTime = microtime(true); - - $this->links[$linkNum] = $this->createPdo($config['dsn'], $config['username'], $config['password'], $params); - - // SQL监控 - if (!empty($config['trigger_sql'])) { - $this->trigger('CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn']); - } - - return $this->links[$linkNum]; - } catch (\PDOException $e) { - if ($autoConnection) { - $this->db->log($e->getMessage(), 'error'); - return $this->connect($autoConnection, $linkNum); - } else { - throw $e; - } - } - } - - /** - * 视图查询 - * @access public - * @param array $args - * @return BaseQuery - */ - public function view(...$args) - { - return $this->newQuery()->view(...$args); - } - - /** - * 创建PDO实例 - * @param $dsn - * @param $username - * @param $password - * @param $params - * @return PDO - */ - protected function createPdo($dsn, $username, $password, $params) - { - return new PDO($dsn, $username, $password, $params); - } - - /** - * 释放查询结果 - * @access public - */ - public function free(): void - { - $this->PDOStatement = null; - } - - /** - * 获取PDO对象 - * @access public - * @return PDO|false - */ - public function getPdo() - { - if (!$this->linkID) { - return false; - } - - return $this->linkID; - } - - /** - * 执行查询 使用生成器返回数据 - * @access public - * @param BaseQuery $query 查询对象 - * @param string $sql sql指令 - * @param Model|null $model 模型对象实例 - * @param null $condition 查询条件 - * @return \Generator - * @throws DbException - */ - public function getCursor(BaseQuery $query, string $sql, $model = null, $condition = null) - { - $this->queryPDOStatement($query, $sql); - - // 返回结果集 - while ($result = $this->PDOStatement->fetch($this->fetchType)) { - if ($model) { - yield $model->newInstance($result, $condition); - } else { - yield $result; - } - } - } - - /** - * 执行查询 返回数据集 - * @access public - * @param string $sql sql指令 - * @param array $bind 参数绑定 - * @param bool $master 主库读取 - * @return array - * @throws DbException - */ - public function query(string $sql, array $bind = [], bool $master = false): array - { - return $this->pdoQuery($this->newQuery()->bind($bind), $sql, $master); - } - - /** - * 执行语句 - * @access public - * @param string $sql sql指令 - * @param array $bind 参数绑定 - * @return int - * @throws DbException - */ - public function execute(string $sql, array $bind = []): int - { - return $this->pdoExecute($this->newQuery()->bind($bind), $sql, true); - } - - /** - * 执行查询 返回数据集 - * @access protected - * @param BaseQuery $query 查询对象 - * @param mixed $sql sql指令 - * @param bool $master 主库读取 - * @return array - * @throws DbException - */ - protected function pdoQuery(BaseQuery $query, $sql, bool $master = null): array - { - // 分析查询表达式 - $query->parseOptions(); - $bind = $query->getBind(); - - if ($query->getOptions('cache')) { - // 检查查询缓存 - $cacheItem = $this->parseCache($query, $query->getOptions('cache')); - if (!$query->getOptions('force_cache')) { - $key = $cacheItem->getKey(); - - $data = $this->cache->get($key); - - if (null !== $data) { - return $data; - } - } - } - - if ($sql instanceof Closure) { - $sql = $sql($query); - $bind = $query->getBind(); - } - - if (!isset($master)) { - $master = $query->getOptions('master') ? true : false; - } - - $procedure = $query->getOptions('procedure') ? true : in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']); - - $this->getPDOStatement($sql, $bind, $master, $procedure); - - $resultSet = $this->getResult($procedure); - $requireCache = $query->getOptions('cache_always') || !empty($resultSet); - - if (isset($cacheItem) && $requireCache) { - // 缓存数据集 - $cacheItem->set($resultSet); - $this->cacheData($cacheItem); - } - - return $resultSet; - } - - /** - * 执行查询但只返回PDOStatement对象 - * @access public - * @param BaseQuery $query 查询对象 - * @return \PDOStatement - * @throws DbException - */ - public function pdo(BaseQuery $query): PDOStatement - { - // 生成查询SQL - $sql = $this->builder->select($query); - - return $this->queryPDOStatement($query, $sql); - } - - /** - * 执行查询但只返回PDOStatement对象 - * @access public - * @param string $sql sql指令 - * @param array $bind 参数绑定 - * @param bool $master 是否在主服务器读操作 - * @param bool $procedure 是否为存储过程调用 - * @return PDOStatement - * @throws DbException - */ - public function getPDOStatement(string $sql, array $bind = [], bool $master = false, bool $procedure = false): PDOStatement - { - try { - $this->initConnect($this->readMaster ?: $master); - // 记录SQL语句 - $this->queryStr = $sql; - $this->bind = $bind; - - $this->db->updateQueryTimes(); - $this->queryStartTime = microtime(true); - - // 预处理 - $this->PDOStatement = $this->linkID->prepare($sql); - - // 参数绑定 - if ($procedure) { - $this->bindParam($bind); - } else { - $this->bindValue($bind); - } - - // 执行查询 - $this->PDOStatement->execute(); - - // SQL监控 - if (!empty($this->config['trigger_sql'])) { - $this->trigger('', $master); - } - - $this->reConnectTimes = 0; - - return $this->PDOStatement; - } catch (\Throwable | \Exception $e) { - if ($this->transTimes > 0) { - // 事务活动中时不应该进行重试,应直接中断执行,防止造成污染。 - if ($this->isBreak($e)) { - // 尝试对事务计数进行重置 - $this->transTimes = 0; - } - } else { - if ($this->reConnectTimes < 4 && $this->isBreak($e)) { - ++$this->reConnectTimes; - return $this->close()->getPDOStatement($sql, $bind, $master, $procedure); - } - } - - if ($e instanceof \PDOException) { - throw new PDOException($e, $this->config, $this->getLastsql()); - } else { - throw $e; - } - } - } - - /** - * 执行语句 - * @access protected - * @param BaseQuery $query 查询对象 - * @param string $sql sql指令 - * @param bool $origin 是否原生查询 - * @return int - * @throws DbException - */ - protected function pdoExecute(BaseQuery $query, string $sql, bool $origin = false): int - { - if ($origin) { - $query->parseOptions(); - } - - $this->queryPDOStatement($query->master(true), $sql); - - if (!$origin && !empty($this->config['deploy']) && !empty($this->config['read_master'])) { - $this->readMaster = true; - } - - $this->numRows = $this->PDOStatement->rowCount(); - - if ($query->getOptions('cache')) { - // 清理缓存数据 - $cacheItem = $this->parseCache($query, $query->getOptions('cache')); - $key = $cacheItem->getKey(); - $tag = $cacheItem->getTag(); - - if (isset($key) && $this->cache->has($key)) { - $this->cache->delete($key); - } elseif (!empty($tag) && method_exists($this->cache, 'tag')) { - $this->cache->tag($tag)->clear(); - } - } - - return $this->numRows; - } - - /** - * @param BaseQuery $query - * @param string $sql - * @return PDOStatement - * @throws DbException - */ - protected function queryPDOStatement(BaseQuery $query, string $sql): PDOStatement - { - $options = $query->getOptions(); - $bind = $query->getBind(); - $master = !empty($options['master']) ? true : false; - $procedure = !empty($options['procedure']) ? true : in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']); - - return $this->getPDOStatement($sql, $bind, $master, $procedure); - } - - /** - * 查找单条记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return array - * @throws DbException - */ - public function find(BaseQuery $query): array - { - // 事件回调 - try { - $this->db->trigger('before_find', $query); - } catch (DbEventException $e) { - return []; - } - - // 执行查询 - $resultSet = $this->pdoQuery($query, function ($query) { - return $this->builder->select($query, true); - }); - - return $resultSet[0] ?? []; - } - - /** - * 使用游标查询记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return \Generator - */ - public function cursor(BaseQuery $query) - { - // 分析查询表达式 - $options = $query->parseOptions(); - - // 生成查询SQL - $sql = $this->builder->select($query); - - $condition = $options['where']['AND'] ?? null; - - // 执行查询操作 - return $this->getCursor($query, $sql, $query->getModel(), $condition); - } - - /** - * 查找记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return array - * @throws DbException - */ - public function select(BaseQuery $query): array - { - try { - $this->db->trigger('before_select', $query); - } catch (DbEventException $e) { - return []; - } - - // 执行查询操作 - return $this->pdoQuery($query, function ($query) { - return $this->builder->select($query); - }); - } - - /** - * 插入记录 - * @access public - * @param BaseQuery $query 查询对象 - * @param boolean $getLastInsID 返回自增主键 - * @return mixed - */ - public function insert(BaseQuery $query, bool $getLastInsID = false) - { - // 分析查询表达式 - $options = $query->parseOptions(); - - // 生成SQL语句 - $sql = $this->builder->insert($query); - - // 执行操作 - $result = '' == $sql ? 0 : $this->pdoExecute($query, $sql); - - if ($result) { - $sequence = $options['sequence'] ?? null; - $lastInsId = $this->getLastInsID($query, $sequence); - - $data = $options['data']; - - if ($lastInsId) { - $pk = $query->getAutoInc(); - if ($pk) { - $data[$pk] = $lastInsId; - } - } - - $query->setOption('data', $data); - - $this->db->trigger('after_insert', $query); - - if ($getLastInsID && $lastInsId) { - return $lastInsId; - } - } - - return $result; - } - - /** - * 批量插入记录 - * @access public - * @param BaseQuery $query 查询对象 - * @param mixed $dataSet 数据集 - * @param integer $limit 每次写入数据限制 - * @return integer - * @throws \Exception - * @throws \Throwable - */ - public function insertAll(BaseQuery $query, array $dataSet = [], int $limit = 0): int - { - $query->parseOptions(); - - if (!is_array(reset($dataSet))) { - return 0; - } - - if (0 === $limit && count($dataSet) >= 5000) { - $limit = 1000; - } - - if ($limit) { - // 分批写入 自动启动事务支持 - $this->startTrans(); - - try { - $array = array_chunk($dataSet, $limit, true); - $count = 0; - - foreach ($array as $item) { - $sql = $this->builder->insertAll($query, $item); - $count += $this->pdoExecute($query, $sql); - } - - // 提交事务 - $this->commit(); - } catch (\Exception | \Throwable $e) { - $this->rollback(); - throw $e; - } - - return $count; - } - - $sql = $this->builder->insertAll($query, $dataSet); - - return $this->pdoExecute($query, $sql); - } - - /** - * 批量插入记录 - * @access public - * @param BaseQuery $query 查询对象 - * @param array $keys 键值 - * @param array $values 数据 - * @param integer $limit 每次写入数据限制 - * @return integer - * @throws \Exception - * @throws \Throwable - */ - public function insertAllByKeys(BaseQuery $query, array $keys, array $values, int $limit = 0): int - { - $query->parseOptions(); - - if (0 === $limit && count($values) >= 5000) { - $limit = 1000; - } - - if ($limit) { - // 分批写入 自动启动事务支持 - $this->startTrans(); - - try { - $array = array_chunk($values, $limit, true); - $count = 0; - - foreach ($array as $item) { - $sql = $this->builder->insertAllByKeys($query, $keys, $item); - $count += $this->pdoExecute($query, $sql); - } - - // 提交事务 - $this->commit(); - } catch (\Exception | \Throwable $e) { - $this->rollback(); - throw $e; - } - - return $count; - } - - $sql = $this->builder->insertAllByKeys($query, $keys, $values); - - return $this->pdoExecute($query, $sql); - } - - /** - * 通过Select方式插入记录 - * @access public - * @param BaseQuery $query 查询对象 - * @param array $fields 要插入的数据表字段名 - * @param string $table 要插入的数据表名 - * @return integer - * @throws PDOException - */ - public function selectInsert(BaseQuery $query, array $fields, string $table): int - { - // 分析查询表达式 - $query->parseOptions(); - - $sql = $this->builder->selectInsert($query, $fields, $table); - - return $this->pdoExecute($query, $sql); - } - - /** - * 更新记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return integer - * @throws PDOException - */ - public function update(BaseQuery $query): int - { - $query->parseOptions(); - - // 生成UPDATE SQL语句 - $sql = $this->builder->update($query); - - // 执行操作 - $result = '' == $sql ? 0 : $this->pdoExecute($query, $sql); - - if ($result) { - $this->db->trigger('after_update', $query); - } - - return $result; - } - - /** - * 删除记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return int - * @throws PDOException - */ - public function delete(BaseQuery $query): int - { - // 分析查询表达式 - $query->parseOptions(); - - // 生成删除SQL语句 - $sql = $this->builder->delete($query); - - // 执行操作 - $result = $this->pdoExecute($query, $sql); - - if ($result) { - $this->db->trigger('after_delete', $query); - } - - return $result; - } - - /** - * 得到某个字段的值 - * @access public - * @param BaseQuery $query 查询对象 - * @param string $field 字段名 - * @param mixed $default 默认值 - * @param bool $one 返回一个值 - * @return mixed - */ - public function value(BaseQuery $query, string $field, $default = null, bool $one = true) - { - $options = $query->parseOptions(); - - if (isset($options['field'])) { - $query->removeOption('field'); - } - - if (isset($options['group'])) { - $query->group(''); - } - - $query->setOption('field', (array) $field); - - if (!empty($options['cache'])) { - $cacheItem = $this->parseCache($query, $options['cache'], 'value'); - - if (!$query->getOptions('force_cache')) { - $key = $cacheItem->getKey(); - - if ($this->cache->has($key)) { - return $this->cache->get($key); - } - } - } - - // 生成查询SQL - $sql = $this->builder->select($query, $one); - - if (isset($options['field'])) { - $query->setOption('field', $options['field']); - } else { - $query->removeOption('field'); - } - - if (isset($options['group'])) { - $query->setOption('group', $options['group']); - } - - // 执行查询操作 - $pdo = $this->getPDOStatement($sql, $query->getBind(), $options['master']); - - $result = $pdo->fetchColumn(); - - if (isset($cacheItem)) { - // 缓存数据 - $cacheItem->set($result); - $this->cacheData($cacheItem); - } - - return false !== $result ? $result : $default; - } - - /** - * 得到某个字段的值 - * @access public - * @param BaseQuery $query 查询对象 - * @param string $aggregate 聚合方法 - * @param mixed $field 字段名 - * @param bool $force 强制转为数字类型 - * @return mixed - */ - public function aggregate(BaseQuery $query, string $aggregate, $field, bool $force = false) - { - if (is_string($field) && 0 === stripos($field, 'DISTINCT ')) { - [$distinct, $field] = explode(' ', $field); - } - - $field = $aggregate . '(' . (!empty($distinct) ? 'DISTINCT ' : '') . $this->builder->parseKey($query, $field, true) . ') AS think_' . strtolower($aggregate); - - $result = $this->value($query, $field, 0); - - return $force ? (float) $result : $result; - } - - /** - * 得到某个列的数组 - * @access public - * @param BaseQuery $query 查询对象 - * @param string|array $column 字段名 多个字段用逗号分隔 - * @param string $key 索引 - * @return array - */ - public function column(BaseQuery $query, $column, string $key = ''): array - { - $options = $query->parseOptions(); - - if (isset($options['field'])) { - $query->removeOption('field'); - } - - if (empty($key) || trim($key) === '') { - $key = null; - } - - if (is_string($column)) { - $column = trim($column); - if ('*' !== $column) { - $column = array_map('trim', explode(',', $column)); - } - } elseif (is_array($column)) { - if (in_array('*', $column)) { - $column = '*'; - } - } else { - throw new DbException('not support type'); - } - - $field = $column; - if ('*' !== $column && $key && !in_array($key, $column)) { - $field[] = $key; - } - - $query->setOption('field', $field); - - if (!empty($options['cache'])) { - // 判断查询缓存 - $cacheItem = $this->parseCache($query, $options['cache'], 'column'); - if (!$query->getOptions('force_cache')) { - $name = $cacheItem->getKey(); - - if ($this->cache->has($name)) { - return $this->cache->get($name); - } - } - } - - // 生成查询SQL - $sql = $this->builder->select($query); - - if (isset($options['field'])) { - $query->setOption('field', $options['field']); - } else { - $query->removeOption('field'); - } - - // 执行查询操作 - $pdo = $this->getPDOStatement($sql, $query->getBind(), $options['master']); - $resultSet = $pdo->fetchAll(PDO::FETCH_ASSOC); - - if (is_string($key) && strpos($key, '.')) { - [$alias, $key] = explode('.', $key); - } - - if (empty($resultSet)) { - $result = []; - } elseif ('*' !== $column && count($column) === 1) { - $column = array_shift($column); - if (strpos($column, ' ')) { - $column = substr(strrchr(trim($column), ' '), 1); - } - - if (strpos($column, '.')) { - [$alias, $column] = explode('.', $column); - } - - if (strpos($column, '->')) { - $column = $this->builder->parseKey($query, $column); - } - - $result = array_column($resultSet, $column, $key); - } elseif ($key) { - $result = array_column($resultSet, null, $key); - } else { - $result = $resultSet; - } - - if (isset($cacheItem)) { - // 缓存数据 - $cacheItem->set($result); - $this->cacheData($cacheItem); - } - - return $result; - } - - /** - * 根据参数绑定组装最终的SQL语句 便于调试 - * @access public - * @param string $sql 带参数绑定的sql语句 - * @param array $bind 参数绑定列表 - * @return string - */ - public function getRealSql(string $sql, array $bind = []): string - { - foreach ($bind as $key => $val) { - $value = strval(is_array($val) ? $val[0] : $val); - $type = is_array($val) ? $val[1] : PDO::PARAM_STR; - - if (self::PARAM_FLOAT == $type || PDO::PARAM_STR == $type) { - $value = '\'' . addslashes($value) . '\''; - } elseif (PDO::PARAM_INT == $type && '' === $value) { - $value = '0'; - } - - // 判断占位符 - $sql = is_numeric($key) ? - substr_replace($sql, $value, strpos($sql, '?'), 1) : - substr_replace($sql, $value, strpos($sql, ':' . $key), strlen(':' . $key)); - } - - return rtrim($sql); - } - - /** - * 参数绑定 - * 支持 ['name'=>'value','id'=>123] 对应命名占位符 - * 或者 ['value',123] 对应问号占位符 - * @access public - * @param array $bind 要绑定的参数列表 - * @return void - * @throws BindParamException - */ - protected function bindValue(array $bind = []): void - { - foreach ($bind as $key => $val) { - // 占位符 - $param = is_numeric($key) ? $key + 1 : ':' . $key; - - if (is_array($val)) { - if (PDO::PARAM_INT == $val[1] && '' === $val[0]) { - $val[0] = 0; - } elseif (self::PARAM_FLOAT == $val[1]) { - $val[0] = is_string($val[0]) ? (float) $val[0] : $val[0]; - $val[1] = PDO::PARAM_STR; - } - - $result = $this->PDOStatement->bindValue($param, $val[0], $val[1]); - } else { - $result = $this->PDOStatement->bindValue($param, $val); - } - - if (!$result) { - throw new BindParamException( - "Error occurred when binding parameters '{$param}'", - $this->config, - $this->getLastsql(), - $bind - ); - } - } - } - - /** - * 存储过程的输入输出参数绑定 - * @access public - * @param array $bind 要绑定的参数列表 - * @return void - * @throws BindParamException - */ - protected function bindParam(array $bind): void - { - foreach ($bind as $key => $val) { - $param = is_numeric($key) ? $key + 1 : ':' . $key; - - if (is_array($val)) { - array_unshift($val, $param); - $result = call_user_func_array([$this->PDOStatement, 'bindParam'], $val); - } else { - $result = $this->PDOStatement->bindValue($param, $val); - } - - if (!$result) { - $param = array_shift($val); - - throw new BindParamException( - "Error occurred when binding parameters '{$param}'", - $this->config, - $this->getLastsql(), - $bind - ); - } - } - } - - /** - * 获得数据集数组 - * @access protected - * @param bool $procedure 是否存储过程 - * @return array - */ - protected function getResult(bool $procedure = false): array - { - if ($procedure) { - // 存储过程返回结果 - return $this->procedure(); - } - - $result = $this->PDOStatement->fetchAll($this->fetchType); - - $this->numRows = count($result); - - return $result; - } - - /** - * 获得存储过程数据集 - * @access protected - * @return array - */ - protected function procedure(): array - { - $item = []; - - do { - $result = $this->getResult(); - if (!empty($result)) { - $item[] = $result; - } - } while ($this->PDOStatement->nextRowset()); - - $this->numRows = count($item); - - return $item; - } - - /** - * 执行数据库事务 - * @access public - * @param callable $callback 数据操作方法回调 - * @return mixed - * @throws PDOException - * @throws \Exception - * @throws \Throwable - */ - public function transaction(callable $callback) - { - $this->startTrans(); - - try { - $result = null; - if (is_callable($callback)) { - $result = $callback($this); - } - - $this->commit(); - return $result; - } catch (\Exception | \Throwable $e) { - $this->rollback(); - throw $e; - } - } - - /** - * 启动事务 - * @access public - * @return void - * @throws \PDOException - * @throws \Exception - */ - public function startTrans(): void - { - try { - $this->initConnect(true); - - ++$this->transTimes; - - if (1 == $this->transTimes) { - $this->linkID->beginTransaction(); - } elseif ($this->transTimes > 1 && $this->supportSavepoint() && $this->linkID->inTransaction()) { - $this->linkID->exec( - $this->parseSavepoint('trans' . $this->transTimes) - ); - } - $this->reConnectTimes = 0; - } catch (\Throwable | \Exception $e) { - if (1 === $this->transTimes && $this->reConnectTimes < 4 && $this->isBreak($e)) { - --$this->transTimes; - ++$this->reConnectTimes; - $this->close()->startTrans(); - } else { - if ($this->isBreak($e)) { - // 尝试对事务计数进行重置 - $this->transTimes = 0; - } - throw $e; - } - } - } - - /** - * 用于非自动提交状态下面的查询提交 - * @access public - * @return void - * @throws \PDOException - */ - public function commit(): void - { - $this->initConnect(true); - - if (1 == $this->transTimes && $this->linkID->inTransaction()) { - $this->linkID->commit(); - } - - --$this->transTimes; - } - - /** - * 事务回滚 - * @access public - * @return void - * @throws \PDOException - */ - public function rollback(): void - { - $this->initConnect(true); - - if ($this->linkID->inTransaction()) { - if (1 == $this->transTimes) { - $this->linkID->rollBack(); - } elseif ($this->transTimes > 1 && $this->supportSavepoint()) { - $this->linkID->exec( - $this->parseSavepointRollBack('trans' . $this->transTimes) - ); - } - } - - $this->transTimes = max(0, $this->transTimes - 1); - } - - /** - * 是否支持事务嵌套 - * @return bool - */ - protected function supportSavepoint(): bool - { - return false; - } - - /** - * 生成定义保存点的SQL - * @access protected - * @param string $name 标识 - * @return string - */ - protected function parseSavepoint(string $name): string - { - return 'SAVEPOINT ' . $name; - } - - /** - * 生成回滚到保存点的SQL - * @access protected - * @param string $name 标识 - * @return string - */ - protected function parseSavepointRollBack(string $name): string - { - return 'ROLLBACK TO SAVEPOINT ' . $name; - } - - /** - * 批处理执行SQL语句 - * 批处理的指令都认为是execute操作 - * @access public - * @param BaseQuery $query 查询对象 - * @param array $sqlArray SQL批处理指令 - * @return bool - */ - public function batchQuery(BaseQuery $query, array $sqlArray = []): bool - { - // 自动启动事务支持 - $this->startTrans(); - - try { - foreach ($sqlArray as $sql) { - $this->pdoExecute($query, $sql); - } - // 提交事务 - $this->commit(); - } catch (\Exception $e) { - $this->rollback(); - throw $e; - } - - return true; - } - - /** - * 关闭数据库(或者重新连接) - * @access public - * @return $this - */ - public function close() - { - $this->linkID = null; - $this->linkWrite = null; - $this->linkRead = null; - $this->links = []; - $this->transTimes = 0; - - $this->free(); - - return $this; - } - - /** - * 是否断线 - * @access protected - * @param \PDOException|\Exception $e 异常对象 - * @return bool - */ - protected function isBreak($e): bool - { - if (!$this->config['break_reconnect']) { - return false; - } - - $error = $e->getMessage(); - - foreach ($this->breakMatchStr as $msg) { - if (false !== stripos($error, $msg)) { - return true; - } - } - - return false; - } - - /** - * 获取最近一次查询的sql语句 - * @access public - * @return string - */ - public function getLastSql(): string - { - return $this->getRealSql($this->queryStr, $this->bind); - } - - /** - * 获取最近插入的ID - * @access public - * @param BaseQuery $query 查询对象 - * @param string $sequence 自增序列名 - * @return mixed - */ - public function getLastInsID(BaseQuery $query, string $sequence = null) - { - try { - $insertId = $this->linkID->lastInsertId($sequence); - } catch (\Exception $e) { - $insertId = ''; - } - - return $this->autoInsIDType($query, $insertId); - } - - /** - * 获取最近插入的ID - * @access public - * @param BaseQuery $query 查询对象 - * @param string $insertId 自增ID - * @return mixed - */ - protected function autoInsIDType(BaseQuery $query, string $insertId) - { - $pk = $query->getAutoInc(); - - if ($pk) { - $type = $this->getFieldsBind($query->getTable())[$pk]; - - if (PDO::PARAM_INT == $type) { - $insertId = (int) $insertId; - } elseif (self::PARAM_FLOAT == $type) { - $insertId = (float) $insertId; - } - } - - return $insertId; - } - - /** - * 获取最近的错误信息 - * @access public - * @return string - */ - public function getError(): string - { - if ($this->PDOStatement) { - $error = $this->PDOStatement->errorInfo(); - $error = $error[1] . ':' . $error[2]; - } else { - $error = ''; - } - - if ('' != $this->queryStr) { - $error .= "\n [ SQL语句 ] : " . $this->getLastsql(); - } - - return $error; - } - - /** - * 初始化数据库连接 - * @access protected - * @param boolean $master 是否主服务器 - * @return void - */ - protected function initConnect(bool $master = true): void - { - if (!empty($this->config['deploy'])) { - // 采用分布式数据库 - if ($master || $this->transTimes) { - if (!$this->linkWrite) { - $this->linkWrite = $this->multiConnect(true); - } - - $this->linkID = $this->linkWrite; - } else { - if (!$this->linkRead) { - $this->linkRead = $this->multiConnect(false); - } - - $this->linkID = $this->linkRead; - } - } elseif (!$this->linkID) { - // 默认单数据库 - $this->linkID = $this->connect(); - } - } - - /** - * 连接分布式服务器 - * @access protected - * @param boolean $master 主服务器 - * @return PDO - */ - protected function multiConnect(bool $master = false): PDO - { - $config = []; - - // 分布式数据库配置解析 - foreach (['username', 'password', 'hostname', 'hostport', 'database', 'dsn', 'charset'] as $name) { - $config[$name] = is_string($this->config[$name]) ? explode(',', $this->config[$name]) : $this->config[$name]; - } - - // 主服务器序号 - $m = floor(mt_rand(0, $this->config['master_num'] - 1)); - - if ($this->config['rw_separate']) { - // 主从式采用读写分离 - if ($master) // 主服务器写入 - { - $r = $m; - } elseif (is_numeric($this->config['slave_no'])) { - // 指定服务器读 - $r = $this->config['slave_no']; - } else { - // 读操作连接从服务器 每次随机连接的数据库 - $r = floor(mt_rand($this->config['master_num'], count($config['hostname']) - 1)); - } - } else { - // 读写操作不区分服务器 每次随机连接的数据库 - $r = floor(mt_rand(0, count($config['hostname']) - 1)); - } - $dbMaster = false; - - if ($m != $r) { - $dbMaster = []; - foreach (['username', 'password', 'hostname', 'hostport', 'database', 'dsn', 'charset'] as $name) { - $dbMaster[$name] = $config[$name][$m] ?? $config[$name][0]; - } - } - - $dbConfig = []; - - foreach (['username', 'password', 'hostname', 'hostport', 'database', 'dsn', 'charset'] as $name) { - $dbConfig[$name] = $config[$name][$r] ?? $config[$name][0]; - } - - return $this->connect($dbConfig, $r, $r == $m ? false : $dbMaster); - } - - /** - * 获取数据库的唯一标识 - * @access public - * @param string $suffix 标识后缀 - * @return string - */ - public function getUniqueXid(string $suffix = ''): string - { - return $this->config['hostname'] . '_' . $this->config['database'] . $suffix; - } - - /** - * 执行数据库Xa事务 - * @access public - * @param callable $callback 数据操作方法回调 - * @param array $dbs 多个查询对象或者连接对象 - * @return mixed - * @throws PDOException - * @throws \Exception - * @throws \Throwable - */ - public function transactionXa(callable $callback, array $dbs = []) - { - $xid = uniqid('xa'); - - if (empty($dbs)) { - $dbs[] = $this; - } - - foreach ($dbs as $key => $db) { - if ($db instanceof BaseQuery) { - $db = $db->getConnection(); - - $dbs[$key] = $db; - } - - $db->startTransXa($db->getUniqueXid('_' . $xid) ); - } - - try { - $result = null; - if (is_callable($callback)) { - $result = $callback($this); - } - - foreach ($dbs as $db) { - $db->prepareXa($db->getUniqueXid('_' . $xid)); - } - - foreach ($dbs as $db) { - $db->commitXa($db->getUniqueXid('_' . $xid) ); - } - - return $result; - } catch (\Exception | \Throwable $e) { - foreach ($dbs as $db) { - $db->rollbackXa($db->getUniqueXid('_' . $xid) ); - } - throw $e; - } - } - - /** - * 启动XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function startTransXa(string $xid): void - { - } - - /** - * 预编译XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function prepareXa(string $xid): void - { - } - - /** - * 提交XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function commitXa(string $xid): void - { - } - - /** - * 回滚XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function rollbackXa(string $xid): void - { - } -} diff --git a/vendor/topthink/think-orm/src/db/Query.php b/vendor/topthink/think-orm/src/db/Query.php deleted file mode 100644 index 35e66bc..0000000 --- a/vendor/topthink/think-orm/src/db/Query.php +++ /dev/null @@ -1,450 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db; - -use PDOStatement; - -/** - * PDO数据查询类 - */ -class Query extends BaseQuery -{ - use concern\JoinAndViewQuery; - use concern\ParamsBind; - use concern\TableFieldInfo; - - /** - * 表达式方式指定Field排序 - * @access public - * @param string $field 排序字段 - * @param array $bind 参数绑定 - * @return $this - */ - public function orderRaw(string $field, array $bind = []) - { - $this->options['order'][] = new Raw($field, $bind); - - return $this; - } - - /** - * 表达式方式指定查询字段 - * @access public - * @param string $field 字段名 - * @return $this - */ - public function fieldRaw(string $field) - { - $this->options['field'][] = new Raw($field); - - return $this; - } - - /** - * 指定Field排序 orderField('id',[1,2,3],'desc') - * @access public - * @param string $field 排序字段 - * @param array $values 排序值 - * @param string $order 排序 desc/asc - * @return $this - */ - public function orderField(string $field, array $values, string $order = '') - { - if (!empty($values)) { - $values['sort'] = $order; - - $this->options['order'][$field] = $values; - } - - return $this; - } - - /** - * 随机排序 - * @access public - * @return $this - */ - public function orderRand() - { - $this->options['order'][] = '[rand]'; - return $this; - } - - /** - * 使用表达式设置数据 - * @access public - * @param string $field 字段名 - * @param string $value 字段值 - * @return $this - */ - public function exp(string $field, string $value) - { - $this->options['data'][$field] = new Raw($value); - return $this; - } - - /** - * 表达式方式指定当前操作的数据表 - * @access public - * @param mixed $table 表名 - * @return $this - */ - public function tableRaw(string $table) - { - $this->options['table'] = new Raw($table); - - return $this; - } - - /** - * 获取执行的SQL语句而不进行实际的查询 - * @access public - * @param bool $fetch 是否返回sql - * @return $this|Fetch - */ - public function fetchSql(bool $fetch = true) - { - $this->options['fetch_sql'] = $fetch; - - if ($fetch) { - return new Fetch($this); - } - - return $this; - } - - /** - * 批处理执行SQL语句 - * 批处理的指令都认为是execute操作 - * @access public - * @param array $sql SQL批处理指令 - * @return bool - */ - public function batchQuery(array $sql = []): bool - { - return $this->connection->batchQuery($this, $sql); - } - - /** - * USING支持 用于多表删除 - * @access public - * @param mixed $using USING - * @return $this - */ - public function using($using) - { - $this->options['using'] = $using; - return $this; - } - - /** - * 存储过程调用 - * @access public - * @param bool $procedure 是否为存储过程查询 - * @return $this - */ - public function procedure(bool $procedure = true) - { - $this->options['procedure'] = $procedure; - return $this; - } - - /** - * 指定group查询 - * @access public - * @param string|array $group GROUP - * @return $this - */ - public function group($group) - { - $this->options['group'] = $group; - return $this; - } - - /** - * 指定having查询 - * @access public - * @param string $having having - * @return $this - */ - public function having(string $having) - { - $this->options['having'] = $having; - return $this; - } - - /** - * 指定distinct查询 - * @access public - * @param bool $distinct 是否唯一 - * @return $this - */ - public function distinct(bool $distinct = true) - { - $this->options['distinct'] = $distinct; - return $this; - } - - /** - * 指定强制索引 - * @access public - * @param string $force 索引名称 - * @return $this - */ - public function force(string $force) - { - $this->options['force'] = $force; - return $this; - } - - /** - * 查询注释 - * @access public - * @param string $comment 注释 - * @return $this - */ - public function comment(string $comment) - { - $this->options['comment'] = $comment; - return $this; - } - - /** - * 设置是否REPLACE - * @access public - * @param bool $replace 是否使用REPLACE写入数据 - * @return $this - */ - public function replace(bool $replace = true) - { - $this->options['replace'] = $replace; - return $this; - } - - /** - * 设置当前查询所在的分区 - * @access public - * @param string|array $partition 分区名称 - * @return $this - */ - public function partition($partition) - { - $this->options['partition'] = $partition; - return $this; - } - - /** - * 设置DUPLICATE - * @access public - * @param array|string|Raw $duplicate DUPLICATE信息 - * @return $this - */ - public function duplicate($duplicate) - { - $this->options['duplicate'] = $duplicate; - return $this; - } - - /** - * 设置查询的额外参数 - * @access public - * @param string $extra 额外信息 - * @return $this - */ - public function extra(string $extra) - { - $this->options['extra'] = $extra; - return $this; - } - - /** - * 创建子查询SQL - * @access public - * @param bool $sub 是否添加括号 - * @return string - * @throws Exception - */ - public function buildSql(bool $sub = true): string - { - return $sub ? '( ' . $this->fetchSql()->select() . ' )' : $this->fetchSql()->select(); - } - - /** - * 获取当前数据表的主键 - * @access public - * @return string|array - */ - public function getPk() - { - if (empty($this->pk)) { - $this->pk = $this->connection->getPk($this->getTable()); - } - - return $this->pk; - } - - /** - * 指定数据表自增主键 - * @access public - * @param string $autoinc 自增键 - * @return $this - */ - public function autoinc(string $autoinc) - { - $this->autoinc = $autoinc; - return $this; - } - - /** - * 获取当前数据表的自增主键 - * @access public - * @return string|null - */ - public function getAutoInc() - { - $tableName = $this->getTable(); - - if (empty($this->autoinc) && $tableName) { - $this->autoinc = $this->connection->getAutoInc($tableName); - } - - return $this->autoinc; - } - - /** - * 字段值增长 - * @access public - * @param string $field 字段名 - * @param float $step 增长值 - * @return $this - */ - public function inc(string $field, float $step = 1) - { - $this->options['data'][$field] = ['INC', $step]; - - return $this; - } - - /** - * 字段值减少 - * @access public - * @param string $field 字段名 - * @param float $step 增长值 - * @return $this - */ - public function dec(string $field, float $step = 1) - { - $this->options['data'][$field] = ['DEC', $step]; - return $this; - } - - /** - * 获取当前的查询标识 - * @access public - * @param mixed $data 要序列化的数据 - * @return string - */ - public function getQueryGuid($data = null): string - { - return md5($this->getConfig('database') . serialize(var_export($data ?: $this->options, true)) . serialize($this->getBind(false))); - } - - /** - * 执行查询但只返回PDOStatement对象 - * @access public - * @return PDOStatement - */ - public function getPdo(): PDOStatement - { - return $this->connection->pdo($this); - } - - /** - * 使用游标查找记录 - * @access public - * @param mixed $data 数据 - * @return \Generator - */ - public function cursor($data = null) - { - if (!is_null($data)) { - // 主键条件分析 - $this->parsePkWhere($data); - } - - $this->options['data'] = $data; - - $connection = clone $this->connection; - - return $connection->cursor($this); - } - - /** - * 分批数据返回处理 - * @access public - * @param integer $count 每次处理的数据数量 - * @param callable $callback 处理回调方法 - * @param string|array $column 分批处理的字段名 - * @param string $order 字段排序 - * @return bool - * @throws Exception - */ - public function chunk(int $count, callable $callback, $column = null, string $order = 'asc'): bool - { - $options = $this->getOptions(); - $column = $column ?: $this->getPk(); - - if (isset($options['order'])) { - unset($options['order']); - } - - $bind = $this->bind; - - if (is_array($column)) { - $times = 1; - $query = $this->options($options)->page($times, $count); - } else { - $query = $this->options($options)->limit($count); - - if (strpos($column, '.')) { - [$alias, $key] = explode('.', $column); - } else { - $key = $column; - } - } - - $resultSet = $query->order($column, $order)->select(); - - while (count($resultSet) > 0) { - if (false === call_user_func($callback, $resultSet)) { - return false; - } - - if (isset($times)) { - $times++; - $query = $this->options($options)->page($times, $count); - } else { - $end = $resultSet->pop(); - $lastId = is_array($end) ? $end[$key] : $end->getData($key); - - $query = $this->options($options) - ->limit($count) - ->where($column, 'asc' == strtolower($order) ? '>' : '<', $lastId); - } - - $resultSet = $query->bind($bind)->order($column, $order)->select(); - } - - return true; - } -} diff --git a/vendor/topthink/think-orm/src/db/Raw.php b/vendor/topthink/think-orm/src/db/Raw.php deleted file mode 100644 index b956ff6..0000000 --- a/vendor/topthink/think-orm/src/db/Raw.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db; - -/** - * SQL Raw - */ -class Raw -{ - /** - * 查询表达式 - * - * @var string - */ - protected $value; - - /** - * 参数绑定 - * - * @var array - */ - protected $bind = []; - - /** - * 创建一个查询表达式 - * - * @param string $value - * @param array $bind - * @return void - */ - public function __construct(string $value, array $bind = []) - { - $this->value = $value; - $this->bind = $bind; - } - - /** - * 获取表达式 - * - * @return string - */ - public function getValue(): string - { - return $this->value; - } - - /** - * 获取参数绑定 - * - * @return string - */ - public function getBind(): array - { - return $this->bind; - } - -} diff --git a/vendor/topthink/think-orm/src/db/Where.php b/vendor/topthink/think-orm/src/db/Where.php deleted file mode 100644 index 0880460..0000000 --- a/vendor/topthink/think-orm/src/db/Where.php +++ /dev/null @@ -1,182 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db; - -use ArrayAccess; - -/** - * 数组查询对象 - */ -class Where implements ArrayAccess -{ - /** - * 查询表达式 - * @var array - */ - protected $where = []; - - /** - * 是否需要把查询条件两边增加括号 - * @var bool - */ - protected $enclose = false; - - /** - * 创建一个查询表达式 - * - * @param array $where 查询条件数组 - * @param bool $enclose 是否增加括号 - */ - public function __construct(array $where = [], bool $enclose = false) - { - $this->where = $where; - $this->enclose = $enclose; - } - - /** - * 设置是否添加括号 - * @access public - * @param bool $enclose - * @return $this - */ - public function enclose(bool $enclose = true) - { - $this->enclose = $enclose; - return $this; - } - - /** - * 解析为Query对象可识别的查询条件数组 - * @access public - * @return array - */ - public function parse(): array - { - $where = []; - - foreach ($this->where as $key => $val) { - if ($val instanceof Raw) { - $where[] = [$key, 'exp', $val]; - } elseif (is_null($val)) { - $where[] = [$key, 'NULL', '']; - } elseif (is_array($val)) { - $where[] = $this->parseItem($key, $val); - } else { - $where[] = [$key, '=', $val]; - } - } - - return $this->enclose ? [$where] : $where; - } - - /** - * 分析查询表达式 - * @access protected - * @param string $field 查询字段 - * @param array $where 查询条件 - * @return array - */ - protected function parseItem(string $field, array $where = []): array - { - $op = $where[0]; - $condition = $where[1] ?? null; - - if (is_array($op)) { - // 同一字段多条件查询 - array_unshift($where, $field); - } elseif (is_null($condition)) { - if (is_string($op) && in_array(strtoupper($op), ['NULL', 'NOTNULL', 'NOT NULL'], true)) { - // null查询 - $where = [$field, $op, '']; - } elseif (is_null($op) || '=' == $op) { - $where = [$field, 'NULL', '']; - } elseif ('<>' == $op) { - $where = [$field, 'NOTNULL', '']; - } else { - // 字段相等查询 - $where = [$field, '=', $op]; - } - } else { - $where = [$field, $op, $condition]; - } - - return $where; - } - - /** - * 修改器 设置数据对象的值 - * @access public - * @param string $name 名称 - * @param mixed $value 值 - * @return void - */ - public function __set($name, $value) - { - $this->where[$name] = $value; - } - - /** - * 获取器 获取数据对象的值 - * @access public - * @param string $name 名称 - * @return mixed - */ - public function __get($name) - { - return $this->where[$name] ?? null; - } - - /** - * 检测数据对象的值 - * @access public - * @param string $name 名称 - * @return bool - */ - public function __isset($name) - { - return isset($this->where[$name]); - } - - /** - * 销毁数据对象的值 - * @access public - * @param string $name 名称 - * @return void - */ - public function __unset($name) - { - unset($this->where[$name]); - } - - // ArrayAccess - public function offsetSet($name, $value) - { - $this->__set($name, $value); - } - - public function offsetExists($name) - { - return $this->__isset($name); - } - - public function offsetUnset($name) - { - $this->__unset($name); - } - - public function offsetGet($name) - { - return $this->__get($name); - } - -} diff --git a/vendor/topthink/think-orm/src/db/builder/Mongo.php b/vendor/topthink/think-orm/src/db/builder/Mongo.php deleted file mode 100644 index 85ee551..0000000 --- a/vendor/topthink/think-orm/src/db/builder/Mongo.php +++ /dev/null @@ -1,673 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); -namespace think\db\builder; - -use MongoDB\BSON\Javascript; -use MongoDB\BSON\ObjectID; -use MongoDB\BSON\Regex; -use MongoDB\Driver\BulkWrite; -use MongoDB\Driver\Command; -use MongoDB\Driver\Exception\InvalidArgumentException; -use MongoDB\Driver\Query as MongoQuery; -use think\db\connector\Mongo as Connection; -use think\db\exception\DbException as Exception; -use think\db\Mongo as Query; - -class Mongo -{ - // connection对象实例 - protected $connection; - // 最后插入ID - protected $insertId = []; - // 查询表达式 - protected $exp = ['<>' => 'ne', '=' => 'eq', '>' => 'gt', '>=' => 'gte', '<' => 'lt', '<=' => 'lte', 'in' => 'in', 'not in' => 'nin', 'nin' => 'nin', 'mod' => 'mod', 'exists' => 'exists', 'null' => 'null', 'notnull' => 'not null', 'not null' => 'not null', 'regex' => 'regex', 'type' => 'type', 'all' => 'all', '> time' => '> time', '< time' => '< time', 'between' => 'between', 'not between' => 'not between', 'between time' => 'between time', 'not between time' => 'not between time', 'notbetween time' => 'not between time', 'like' => 'like', 'near' => 'near', 'size' => 'size']; - - /** - * 架构函数 - * @access public - * @param Connection $connection 数据库连接对象实例 - */ - public function __construct(Connection $connection) - { - $this->connection = $connection; - } - - /** - * 获取当前的连接对象实例 - * @access public - * @return Connection - */ - public function getConnection(): Connection - { - return $this->connection; - } - - /** - * key分析 - * @access protected - * @param string $key - * @return string - */ - protected function parseKey(Query $query, string $key): string - { - if (0 === strpos($key, '__TABLE__.')) { - [$collection, $key] = explode('.', $key, 2); - } - - if ('id' == $key && $this->connection->getConfig('pk_convert_id')) { - $key = '_id'; - } - - return trim($key); - } - - /** - * value分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $value - * @param string $field - * @return string - */ - protected function parseValue(Query $query, $value, $field = '') - { - if ('_id' == $field && 'ObjectID' == $this->connection->getConfig('pk_type') && is_string($value)) { - try { - return new ObjectID($value); - } catch (InvalidArgumentException $e) { - return new ObjectID(); - } - } - - return $value; - } - - /** - * insert数据分析 - * @access protected - * @param Query $query 查询对象 - * @param array $data 数据 - * @return array - */ - protected function parseData(Query $query, array $data): array - { - if (empty($data)) { - return []; - } - - $result = []; - - foreach ($data as $key => $val) { - $item = $this->parseKey($query, $key); - - if (is_object($val)) { - $result[$item] = $val; - } elseif (isset($val[0]) && 'exp' == $val[0]) { - $result[$item] = $val[1]; - } else { - $result[$item] = $this->parseValue($query, $val, $key); - } - } - - return $result; - } - - /** - * Set数据分析 - * @access protected - * @param Query $query 查询对象 - * @param array $data 数据 - * @return array - */ - protected function parseSet(Query $query, array $data): array - { - if (empty($data)) { - return []; - } - - $result = []; - - foreach ($data as $key => $val) { - $item = $this->parseKey($query, $key); - - if (is_array($val) && isset($val[0]) && is_string($val[0]) && 0 === strpos($val[0], '$')) { - $result[$val[0]][$item] = $this->parseValue($query, $val[1], $key); - } else { - $result['$set'][$item] = $this->parseValue($query, $val, $key); - } - } - - return $result; - } - - /** - * 生成查询过滤条件 - * @access public - * @param Query $query 查询对象 - * @param mixed $where - * @return array - */ - public function parseWhere(Query $query, array $where): array - { - if (empty($where)) { - $where = []; - } - - $filter = []; - foreach ($where as $logic => $val) { - $logic = '$' . strtolower($logic); - foreach ($val as $field => $value) { - if (is_array($value)) { - if (key($value) !== 0) { - throw new Exception('where express error:' . var_export($value, true)); - } - $field = array_shift($value); - } elseif (!($value instanceof \Closure)) { - throw new Exception('where express error:' . var_export($value, true)); - } - - if ($value instanceof \Closure) { - // 使用闭包查询 - $query = new Query($this->connection); - call_user_func_array($value, [ & $query]); - $filter[$logic][] = $this->parseWhere($query, $query->getOptions('where')); - } else { - if (strpos($field, '|')) { - // 不同字段使用相同查询条件(OR) - $array = explode('|', $field); - foreach ($array as $k) { - $filter['$or'][] = $this->parseWhereItem($query, $k, $value); - } - } elseif (strpos($field, '&')) { - // 不同字段使用相同查询条件(AND) - $array = explode('&', $field); - foreach ($array as $k) { - $filter['$and'][] = $this->parseWhereItem($query, $k, $value); - } - } else { - // 对字段使用表达式查询 - $field = is_string($field) ? $field : ''; - $filter[$logic][] = $this->parseWhereItem($query, $field, $value); - } - } - } - } - - $options = $query->getOptions(); - if (!empty($options['soft_delete'])) { - // 附加软删除条件 - [$field, $condition] = $options['soft_delete']; - $filter['$and'][] = $this->parseWhereItem($query, $field, $condition); - } - - return $filter; - } - - // where子单元分析 - protected function parseWhereItem(Query $query, $field, $val): array - { - $key = $field ? $this->parseKey($query, $field) : ''; - // 查询规则和条件 - if (!is_array($val)) { - $val = ['=', $val]; - } - [$exp, $value] = $val; - - // 对一个字段使用多个查询条件 - if (is_array($exp)) { - $data = []; - foreach ($val as $value) { - $exp = $value[0]; - $value = $value[1]; - if (!in_array($exp, $this->exp)) { - $exp = strtolower($exp); - if (isset($this->exp[$exp])) { - $exp = $this->exp[$exp]; - } - } - $k = '$' . $exp; - $data[$k] = $value; - } - $result[$key] = $data; - return $result; - } elseif (!in_array($exp, $this->exp)) { - $exp = strtolower($exp); - if (isset($this->exp[$exp])) { - $exp = $this->exp[$exp]; - } else { - throw new Exception('where express error:' . $exp); - } - } - - $result = []; - if ('=' == $exp) { - // 普通查询 - $result[$key] = $this->parseValue($query, $value, $key); - } elseif (in_array($exp, ['neq', 'ne', 'gt', 'egt', 'gte', 'lt', 'lte', 'elt', 'mod'])) { - // 比较运算 - $k = '$' . $exp; - $result[$key] = [$k => $this->parseValue($query, $value, $key)]; - } elseif ('null' == $exp) { - // NULL 查询 - $result[$key] = null; - } elseif ('not null' == $exp) { - $result[$key] = ['$ne' => null]; - } elseif ('all' == $exp) { - // 满足所有指定条件 - $result[$key] = ['$all', $this->parseValue($query, $value, $key)]; - } elseif ('between' == $exp) { - // 区间查询 - $value = is_array($value) ? $value : explode(',', $value); - $result[$key] = ['$gte' => $this->parseValue($query, $value[0], $key), '$lte' => $this->parseValue($query, $value[1], $key)]; - } elseif ('not between' == $exp) { - // 范围查询 - $value = is_array($value) ? $value : explode(',', $value); - $result[$key] = ['$lt' => $this->parseValue($query, $value[0], $key), '$gt' => $this->parseValue($query, $value[1], $key)]; - } elseif ('exists' == $exp) { - // 字段是否存在 - $result[$key] = ['$exists' => (bool) $value]; - } elseif ('type' == $exp) { - // 类型查询 - $result[$key] = ['$type' => intval($value)]; - } elseif ('exp' == $exp) { - // 表达式查询 - $result['$where'] = $value instanceof Javascript ? $value : new Javascript($value); - } elseif ('like' == $exp) { - // 模糊查询 采用正则方式 - $result[$key] = $value instanceof Regex ? $value : new Regex($value, 'i'); - } elseif (in_array($exp, ['nin', 'in'])) { - // IN 查询 - $value = is_array($value) ? $value : explode(',', $value); - foreach ($value as $k => $val) { - $value[$k] = $this->parseValue($query, $val, $key); - } - $result[$key] = ['$' . $exp => $value]; - } elseif ('regex' == $exp) { - $result[$key] = $value instanceof Regex ? $value : new Regex($value, 'i'); - } elseif ('< time' == $exp) { - $result[$key] = ['$lt' => $this->parseDateTime($query, $value, $field)]; - } elseif ('> time' == $exp) { - $result[$key] = ['$gt' => $this->parseDateTime($query, $value, $field)]; - } elseif ('between time' == $exp) { - // 区间查询 - $value = is_array($value) ? $value : explode(',', $value); - $result[$key] = ['$gte' => $this->parseDateTime($query, $value[0], $field), '$lte' => $this->parseDateTime($query, $value[1], $field)]; - } elseif ('not between time' == $exp) { - // 范围查询 - $value = is_array($value) ? $value : explode(',', $value); - $result[$key] = ['$lt' => $this->parseDateTime($query, $value[0], $field), '$gt' => $this->parseDateTime($query, $value[1], $field)]; - } elseif ('near' == $exp) { - // 经纬度查询 - $result[$key] = ['$near' => $this->parseValue($query, $value, $key)]; - } elseif ('size' == $exp) { - // 元素长度查询 - $result[$key] = ['$size' => intval($value)]; - } else { - // 普通查询 - $result[$key] = $this->parseValue($query, $value, $key); - } - - return $result; - } - - /** - * 日期时间条件解析 - * @access protected - * @param Query $query 查询对象 - * @param string $value - * @param string $key - * @return string - */ - protected function parseDateTime(Query $query, $value, $key) - { - // 获取时间字段类型 - $type = $query->getFieldType($key); - - if ($type) { - if (is_string($value)) { - $value = strtotime($value) ?: $value; - } - - if (is_int($value)) { - if (preg_match('/(datetime|timestamp)/is', $type)) { - // 日期及时间戳类型 - $value = date('Y-m-d H:i:s', $value); - } elseif (preg_match('/(date)/is', $type)) { - // 日期及时间戳类型 - $value = date('Y-m-d', $value); - } - } - } - - return $value; - } - - /** - * 获取最后写入的ID 如果是insertAll方法的话 返回所有写入的ID - * @access public - * @return mixed - */ - public function getLastInsID() - { - return $this->insertId; - } - - /** - * 生成insert BulkWrite对象 - * @access public - * @param Query $query 查询对象 - * @return BulkWrite - */ - public function insert(Query $query): BulkWrite - { - // 分析并处理数据 - $options = $query->getOptions(); - - $data = $this->parseData($query, $options['data']); - - $bulk = new BulkWrite; - - if ($insertId = $bulk->insert($data)) { - $this->insertId = $insertId; - } - - $this->log('insert', $data, $options); - - return $bulk; - } - - /** - * 生成insertall BulkWrite对象 - * @access public - * @param Query $query 查询对象 - * @param array $dataSet 数据集 - * @return BulkWrite - */ - public function insertAll(Query $query, array $dataSet): BulkWrite - { - $bulk = new BulkWrite; - $options = $query->getOptions(); - - $this->insertId = []; - foreach ($dataSet as $data) { - // 分析并处理数据 - $data = $this->parseData($query, $data); - if ($insertId = $bulk->insert($data)) { - $this->insertId[] = $insertId; - } - } - - $this->log('insert', $dataSet, $options); - - return $bulk; - } - - /** - * 生成update BulkWrite对象 - * @access public - * @param Query $query 查询对象 - * @return BulkWrite - */ - public function update(Query $query): BulkWrite - { - $options = $query->getOptions(); - - $data = $this->parseSet($query, $options['data']); - $where = $this->parseWhere($query, $options['where']); - - if (1 == $options['limit']) { - $updateOptions = ['multi' => false]; - } else { - $updateOptions = ['multi' => true]; - } - - $bulk = new BulkWrite; - - $bulk->update($where, $data, $updateOptions); - - $this->log('update', $data, $where); - - return $bulk; - } - - /** - * 生成delete BulkWrite对象 - * @access public - * @param Query $query 查询对象 - * @return BulkWrite - */ - public function delete(Query $query): BulkWrite - { - $options = $query->getOptions(); - $where = $this->parseWhere($query, $options['where']); - - $bulk = new BulkWrite; - - if (1 == $options['limit']) { - $deleteOptions = ['limit' => 1]; - } else { - $deleteOptions = ['limit' => 0]; - } - - $bulk->delete($where, $deleteOptions); - - $this->log('remove', $where, $deleteOptions); - - return $bulk; - } - - /** - * 生成Mongo查询对象 - * @access public - * @param Query $query 查询对象 - * @param bool $one 是否仅获取一个记录 - * @return MongoQuery - */ - public function select(Query $query, bool $one = false): MongoQuery - { - $options = $query->getOptions(); - - $where = $this->parseWhere($query, $options['where']); - - if ($one) { - $options['limit'] = 1; - } - - $query = new MongoQuery($where, $options); - - $this->log('find', $where, $options); - - return $query; - } - - /** - * 生成Count命令 - * @access public - * @param Query $query 查询对象 - * @return Command - */ - public function count(Query $query): Command - { - $options = $query->getOptions(); - - $cmd['count'] = $options['table']; - $cmd['query'] = (object) $this->parseWhere($query, $options['where']); - - foreach (['hint', 'limit', 'maxTimeMS', 'skip'] as $option) { - if (isset($options[$option])) { - $cmd[$option] = $options[$option]; - } - } - - $command = new Command($cmd); - $this->log('cmd', 'count', $cmd); - - return $command; - } - - /** - * 聚合查询命令 - * @access public - * @param Query $query 查询对象 - * @param array $extra 指令和字段 - * @return Command - */ - public function aggregate(Query $query, array $extra): Command - { - $options = $query->getOptions(); - [$fun, $field] = $extra; - - if ('id' == $field && $this->connection->getConfig('pk_convert_id')) { - $field = '_id'; - } - - $group = isset($options['group']) ? '$' . $options['group'] : null; - - $pipeline = [ - ['$match' => (object) $this->parseWhere($query, $options['where'])], - ['$group' => ['_id' => $group, 'aggregate' => ['$' . $fun => '$' . $field]]], - ]; - - $cmd = [ - 'aggregate' => $options['table'], - 'allowDiskUse' => true, - 'pipeline' => $pipeline, - 'cursor' => new \stdClass, - ]; - - foreach (['explain', 'collation', 'bypassDocumentValidation', 'readConcern'] as $option) { - if (isset($options[$option])) { - $cmd[$option] = $options[$option]; - } - } - - $command = new Command($cmd); - - $this->log('aggregate', $cmd); - - return $command; - } - - /** - * 多聚合查询命令, 可以对多个字段进行 group by 操作 - * - * @param Query $query 查询对象 - * @param array $extra 指令和字段 - * @return Command - */ - public function multiAggregate(Query $query, $extra): Command - { - $options = $query->getOptions(); - - [$aggregate, $groupBy] = $extra; - - $groups = ['_id' => []]; - - foreach ($groupBy as $field) { - $groups['_id'][$field] = '$' . $field; - } - - foreach ($aggregate as $fun => $field) { - $groups[$field . '_' . $fun] = ['$' . $fun => '$' . $field]; - } - - $pipeline = [ - ['$match' => (object) $this->parseWhere($query, $options['where'])], - ['$group' => $groups], - ]; - - $cmd = [ - 'aggregate' => $options['table'], - 'allowDiskUse' => true, - 'pipeline' => $pipeline, - 'cursor' => new \stdClass, - ]; - - foreach (['explain', 'collation', 'bypassDocumentValidation', 'readConcern'] as $option) { - if (isset($options[$option])) { - $cmd[$option] = $options[$option]; - } - } - - $command = new Command($cmd); - $this->log('group', $cmd); - - return $command; - } - - /** - * 生成distinct命令 - * @access public - * @param Query $query 查询对象 - * @param string $field 字段名 - * @return Command - */ - public function distinct(Query $query, $field): Command - { - $options = $query->getOptions(); - - $cmd = [ - 'distinct' => $options['table'], - 'key' => $field, - ]; - - if (!empty($options['where'])) { - $cmd['query'] = (object) $this->parseWhere($query, $options['where']); - } - - if (isset($options['maxTimeMS'])) { - $cmd['maxTimeMS'] = $options['maxTimeMS']; - } - - $command = new Command($cmd); - - $this->log('cmd', 'distinct', $cmd); - - return $command; - } - - /** - * 查询所有的collection - * @access public - * @return Command - */ - public function listcollections(): Command - { - $cmd = ['listCollections' => 1]; - $command = new Command($cmd); - - $this->log('cmd', 'listCollections', $cmd); - - return $command; - } - - /** - * 查询数据表的状态信息 - * @access public - * @param Query $query 查询对象 - * @return Command - */ - public function collStats(Query $query): Command - { - $options = $query->getOptions(); - - $cmd = ['collStats' => $options['table']]; - $command = new Command($cmd); - - $this->log('cmd', 'collStats', $cmd); - - return $command; - } - - protected function log($type, $data, $options = []) - { - $this->connection->mongoLog($type, $data, $options); - } -} diff --git a/vendor/topthink/think-orm/src/db/builder/Mysql.php b/vendor/topthink/think-orm/src/db/builder/Mysql.php deleted file mode 100644 index 7dda33a..0000000 --- a/vendor/topthink/think-orm/src/db/builder/Mysql.php +++ /dev/null @@ -1,480 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\builder; - -use PDO; -use think\db\Builder; -use think\db\exception\DbException as Exception; -use think\db\Query; -use think\db\Raw; - -/** - * mysql数据库驱动 - */ -class Mysql extends Builder -{ - /** - * 查询表达式解析 - * @var array - */ - protected $parser = [ - 'parseCompare' => ['=', '<>', '>', '>=', '<', '<='], - 'parseLike' => ['LIKE', 'NOT LIKE'], - 'parseBetween' => ['NOT BETWEEN', 'BETWEEN'], - 'parseIn' => ['NOT IN', 'IN'], - 'parseExp' => ['EXP'], - 'parseRegexp' => ['REGEXP', 'NOT REGEXP'], - 'parseNull' => ['NOT NULL', 'NULL'], - 'parseBetweenTime' => ['BETWEEN TIME', 'NOT BETWEEN TIME'], - 'parseTime' => ['< TIME', '> TIME', '<= TIME', '>= TIME'], - 'parseExists' => ['NOT EXISTS', 'EXISTS'], - 'parseColumn' => ['COLUMN'], - 'parseFindInSet' => ['FIND IN SET'], - ]; - - /** - * SELECT SQL表达式 - * @var string - */ - protected $selectSql = 'SELECT%DISTINCT%%EXTRA% %FIELD% FROM %TABLE%%PARTITION%%FORCE%%JOIN%%WHERE%%GROUP%%HAVING%%UNION%%ORDER%%LIMIT% %LOCK%%COMMENT%'; - - /** - * INSERT SQL表达式 - * @var string - */ - protected $insertSql = '%INSERT%%EXTRA% INTO %TABLE%%PARTITION% SET %SET% %DUPLICATE%%COMMENT%'; - - /** - * INSERT ALL SQL表达式 - * @var string - */ - protected $insertAllSql = '%INSERT%%EXTRA% INTO %TABLE%%PARTITION% (%FIELD%) VALUES %DATA% %DUPLICATE%%COMMENT%'; - - /** - * UPDATE SQL表达式 - * @var string - */ - protected $updateSql = 'UPDATE%EXTRA% %TABLE%%PARTITION% %JOIN% SET %SET% %WHERE% %ORDER%%LIMIT% %LOCK%%COMMENT%'; - - /** - * DELETE SQL表达式 - * @var string - */ - protected $deleteSql = 'DELETE%EXTRA% FROM %TABLE%%PARTITION%%USING%%JOIN%%WHERE%%ORDER%%LIMIT% %LOCK%%COMMENT%'; - - /** - * 生成查询SQL - * @access public - * @param Query $query 查询对象 - * @param bool $one 是否仅获取一个记录 - * @return string - */ - public function select(Query $query, bool $one = false): string - { - $options = $query->getOptions(); - - return str_replace( - ['%TABLE%', '%PARTITION%', '%DISTINCT%', '%EXTRA%', '%FIELD%', '%JOIN%', '%WHERE%', '%GROUP%', '%HAVING%', '%ORDER%', '%LIMIT%', '%UNION%', '%LOCK%', '%COMMENT%', '%FORCE%'], - [ - $this->parseTable($query, $options['table']), - $this->parsePartition($query, $options['partition']), - $this->parseDistinct($query, $options['distinct']), - $this->parseExtra($query, $options['extra']), - $this->parseField($query, $options['field'] ?? '*'), - $this->parseJoin($query, $options['join']), - $this->parseWhere($query, $options['where']), - $this->parseGroup($query, $options['group']), - $this->parseHaving($query, $options['having']), - $this->parseOrder($query, $options['order']), - $this->parseLimit($query, $one ? '1' : $options['limit']), - $this->parseUnion($query, $options['union']), - $this->parseLock($query, $options['lock']), - $this->parseComment($query, $options['comment']), - $this->parseForce($query, $options['force']), - ], - $this->selectSql - ); - } - - /** - * 生成Insert SQL - * @access public - * @param Query $query 查询对象 - * @return string - */ - public function insert(Query $query): string - { - $options = $query->getOptions(); - - // 分析并处理数据 - $data = $this->parseData($query, $options['data']); - if (empty($data)) { - return ''; - } - - $set = []; - foreach ($data as $key => $val) { - $set[] = $key . ' = ' . $val; - } - - return str_replace( - ['%INSERT%', '%EXTRA%', '%TABLE%', '%PARTITION%', '%SET%', '%DUPLICATE%', '%COMMENT%'], - [ - !empty($options['replace']) ? 'REPLACE' : 'INSERT', - $this->parseExtra($query, $options['extra']), - $this->parseTable($query, $options['table']), - $this->parsePartition($query, $options['partition']), - implode(' , ', $set), - $this->parseDuplicate($query, $options['duplicate']), - $this->parseComment($query, $options['comment']), - ], - $this->insertSql - ); - } - - /** - * 生成insertall SQL - * @access public - * @param Query $query 查询对象 - * @param array $dataSet 数据集 - * @return string - */ - public function insertAll(Query $query, array $dataSet): string - { - $options = $query->getOptions(); - - // 获取绑定信息 - $bind = $query->getFieldsBindType(); - - // 获取合法的字段 - if (empty($options['field']) || '*' == $options['field']) { - $allowFields = array_keys($bind); - } else { - $allowFields = $options['field']; - } - - $fields = []; - $values = []; - - foreach ($dataSet as $data) { - $data = $this->parseData($query, $data, $allowFields, $bind); - - $values[] = '( ' . implode(',', array_values($data)) . ' )'; - - if (!isset($insertFields)) { - $insertFields = array_keys($data); - } - } - - foreach ($insertFields as $field) { - $fields[] = $this->parseKey($query, $field); - } - - return str_replace( - ['%INSERT%', '%EXTRA%', '%TABLE%', '%PARTITION%', '%FIELD%', '%DATA%', '%DUPLICATE%', '%COMMENT%'], - [ - !empty($options['replace']) ? 'REPLACE' : 'INSERT', - $this->parseExtra($query, $options['extra']), - $this->parseTable($query, $options['table']), - $this->parsePartition($query, $options['partition']), - implode(' , ', $fields), - implode(' , ', $values), - $this->parseDuplicate($query, $options['duplicate']), - $this->parseComment($query, $options['comment']), - ], - $this->insertAllSql - ); - } - - /** - * 生成insertall SQL - * @access public - * @param Query $query 查询对象 - * @param array $keys 键值 - * @param array $values 数据 - * @return string - */ - public function insertAllByKeys(Query $query, array $keys, array $datas): string - { - $options = $query->getOptions(); - - // 获取绑定信息 - $bind = $query->getFieldsBindType(); - $fields = []; - $values = []; - - foreach ($keys as $field) { - $fields[] = $this->parseKey($query, $field); - } - - foreach ($datas as $data) { - foreach ($data as $key => &$val) { - if (!$query->isAutoBind()) { - $val = PDO::PARAM_STR == $bind[$keys[$key]] ? '\'' . $val . '\'' : $val; - } else { - $val = $this->parseDataBind($query, $keys[$key], $val, $bind); - } - } - $values[] = '( ' . implode(',', $data) . ' )'; - } - - return str_replace( - ['%INSERT%', '%EXTRA%', '%TABLE%', '%PARTITION%', '%FIELD%', '%DATA%', '%DUPLICATE%', '%COMMENT%'], - [ - !empty($options['replace']) ? 'REPLACE' : 'INSERT', - $this->parseExtra($query, $options['extra']), - $this->parseTable($query, $options['table']), - $this->parsePartition($query, $options['partition']), - implode(' , ', $fields), - implode(' , ', $values), - $this->parseDuplicate($query, $options['duplicate']), - $this->parseComment($query, $options['comment']), - ], - $this->insertAllSql - ); - } - - /** - * 生成update SQL - * @access public - * @param Query $query 查询对象 - * @return string - */ - public function update(Query $query): string - { - $options = $query->getOptions(); - - $data = $this->parseData($query, $options['data']); - - if (empty($data)) { - return ''; - } - - $set = []; - foreach ($data as $key => $val) { - $set[] = (strpos($key, '->') ? strstr($key, '->', true) : $key) . ' = ' . $val; - } - - return str_replace( - ['%TABLE%', '%PARTITION%', '%EXTRA%', '%SET%', '%JOIN%', '%WHERE%', '%ORDER%', '%LIMIT%', '%LOCK%', '%COMMENT%'], - [ - $this->parseTable($query, $options['table']), - $this->parsePartition($query, $options['partition']), - $this->parseExtra($query, $options['extra']), - implode(' , ', $set), - $this->parseJoin($query, $options['join']), - $this->parseWhere($query, $options['where']), - $this->parseOrder($query, $options['order']), - $this->parseLimit($query, $options['limit']), - $this->parseLock($query, $options['lock']), - $this->parseComment($query, $options['comment']), - ], - $this->updateSql - ); - } - - /** - * 生成delete SQL - * @access public - * @param Query $query 查询对象 - * @return string - */ - public function delete(Query $query): string - { - $options = $query->getOptions(); - - return str_replace( - ['%TABLE%', '%PARTITION%', '%EXTRA%', '%USING%', '%JOIN%', '%WHERE%', '%ORDER%', '%LIMIT%', '%LOCK%', '%COMMENT%'], - [ - $this->parseTable($query, $options['table']), - $this->parsePartition($query, $options['partition']), - $this->parseExtra($query, $options['extra']), - !empty($options['using']) ? ' USING ' . $this->parseTable($query, $options['using']) . ' ' : '', - $this->parseJoin($query, $options['join']), - $this->parseWhere($query, $options['where']), - $this->parseOrder($query, $options['order']), - $this->parseLimit($query, $options['limit']), - $this->parseLock($query, $options['lock']), - $this->parseComment($query, $options['comment']), - ], - $this->deleteSql - ); - } - - /** - * 正则查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @return string - */ - protected function parseRegexp(Query $query, string $key, string $exp, $value, string $field): string - { - if ($value instanceof Raw) { - $value = $this->parseRaw($query, $value); - } - - return $key . ' ' . $exp . ' ' . $value; - } - - /** - * FIND_IN_SET 查询 - * @access protected - * @param Query $query 查询对象 - * @param string $key - * @param string $exp - * @param mixed $value - * @param string $field - * @return string - */ - protected function parseFindInSet(Query $query, string $key, string $exp, $value, string $field): string - { - if ($value instanceof Raw) { - $value = $this->parseRaw($query, $value); - } - - return 'FIND_IN_SET(' . $value . ', ' . $key . ')'; - } - - /** - * 字段和表名处理 - * @access public - * @param Query $query 查询对象 - * @param mixed $key 字段名 - * @param bool $strict 严格检测 - * @return string - */ - public function parseKey(Query $query, $key, bool $strict = false): string - { - if (is_int($key)) { - return (string) $key; - } elseif ($key instanceof Raw) { - return $this->parseRaw($query, $key); - } - - $key = trim($key); - - if (strpos($key, '->>') && false === strpos($key, '(')) { - // JSON字段支持 - [$field, $name] = explode('->>', $key, 2); - - return $this->parseKey($query, $field, true) . '->>\'$' . (strpos($name, '[') === 0 ? '' : '.') . str_replace('->>', '.', $name) . '\''; - } elseif (strpos($key, '->') && false === strpos($key, '(')) { - // JSON字段支持 - [$field, $name] = explode('->', $key, 2); - return 'json_extract(' . $this->parseKey($query, $field, true) . ', \'$' . (strpos($name, '[') === 0 ? '' : '.') . str_replace('->', '.', $name) . '\')'; - } elseif (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) { - [$table, $key] = explode('.', $key, 2); - - $alias = $query->getOptions('alias'); - - if ('__TABLE__' == $table) { - $table = $query->getOptions('table'); - $table = is_array($table) ? array_shift($table) : $table; - } - - if (isset($alias[$table])) { - $table = $alias[$table]; - } - } - - if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) { - throw new Exception('not support data:' . $key); - } - - if ('*' != $key && !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { - $key = '`' . $key . '`'; - } - - if (isset($table)) { - if (strpos($table, '.')) { - $table = str_replace('.', '`.`', $table); - } - - $key = '`' . $table . '`.' . $key; - } - - return $key; - } - - /** - * 随机排序 - * @access protected - * @param Query $query 查询对象 - * @return string - */ - protected function parseRand(Query $query): string - { - return 'rand()'; - } - - /** - * Partition 分析 - * @access protected - * @param Query $query 查询对象 - * @param string|array $partition 分区 - * @return string - */ - protected function parsePartition(Query $query, $partition): string - { - if ('' == $partition) { - return ''; - } - - if (is_string($partition)) { - $partition = explode(',', $partition); - } - - return ' PARTITION (' . implode(' , ', $partition) . ') '; - } - - /** - * ON DUPLICATE KEY UPDATE 分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $duplicate - * @return string - */ - protected function parseDuplicate(Query $query, $duplicate): string - { - if ('' == $duplicate) { - return ''; - } - - if ($duplicate instanceof Raw) { - return ' ON DUPLICATE KEY UPDATE ' . $this->parseRaw($query, $duplicate) . ' '; - } - - if (is_string($duplicate)) { - $duplicate = explode(',', $duplicate); - } - - $updates = []; - foreach ($duplicate as $key => $val) { - if (is_numeric($key)) { - $val = $this->parseKey($query, $val); - $updates[] = $val . ' = VALUES(' . $val . ')'; - } elseif ($val instanceof Raw) { - $updates[] = $this->parseKey($query, $key) . " = " . $this->parseRaw($query, $val); - } else { - $name = $query->bindValue($val, $query->getConnection()->getFieldBindType($key)); - $updates[] = $this->parseKey($query, $key) . " = :" . $name; - } - } - - return ' ON DUPLICATE KEY UPDATE ' . implode(' , ', $updates) . ' '; - } -} diff --git a/vendor/topthink/think-orm/src/db/builder/Oracle.php b/vendor/topthink/think-orm/src/db/builder/Oracle.php deleted file mode 100644 index 38feb5d..0000000 --- a/vendor/topthink/think-orm/src/db/builder/Oracle.php +++ /dev/null @@ -1,129 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\builder; - -use think\db\Builder; -use think\db\Query; -use think\db\exception\DbException as Exception; -use think\db\Raw; - -/** - * Oracle数据库驱动 - */ -class Oracle extends Builder -{ - protected $selectSql = 'SELECT * FROM (SELECT thinkphp.*, rownum AS numrow FROM (SELECT %DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%%ORDER%) thinkphp ) %LIMIT%%COMMENT%'; - - /** - * limit分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $limit - * @return string - */ - protected function parseLimit(Query $query, string $limit): string - { - $limitStr = ''; - - if (!empty($limit)) { - $limit = explode(',', $limit); - - if (count($limit) > 1) { - $limitStr = "(numrow>" . $limit[0] . ") AND (numrow<=" . ($limit[0] + $limit[1]) . ")"; - } else { - $limitStr = "(numrow>0 AND numrow<=" . $limit[0] . ")"; - } - - } - - return $limitStr ? ' WHERE ' . $limitStr : ''; - } - - /** - * 设置锁机制 - * @access protected - * @param Query $query 查询对象 - * @param bool|false $lock - * @return string - */ - protected function parseLock(Query $query, $lock = false): string - { - if (!$lock) { - return ''; - } - - return ' FOR UPDATE NOWAIT '; - } - - /** - * 字段和表名处理 - * @access public - * @param Query $query 查询对象 - * @param string $key - * @param bool $strict - * @return string - * @throws Exception - */ - public function parseKey(Query $query, $key, bool $strict = false): string - { - if (is_int($key)) { - return (string) $key; - } elseif ($key instanceof Raw) { - return $this->parseRaw($query, $key); - } - - $key = trim($key); - - if (strpos($key, '->') && false === strpos($key, '(')) { - // JSON字段支持 - [$field, $name] = explode($key, '->'); - $key = $field . '."' . $name . '"'; - } elseif (strpos($key, '.') && !preg_match('/[,\'\"\(\)\[\s]/', $key)) { - [$table, $key] = explode('.', $key, 2); - - $alias = $query->getOptions('alias'); - - if ('__TABLE__' == $table) { - $table = $query->getOptions('table'); - $table = is_array($table) ? array_shift($table) : $table; - } - - if (isset($alias[$table])) { - $table = $alias[$table]; - } - } - - if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) { - throw new Exception('not support data:' . $key); - } - - if ('*' != $key && !preg_match('/[,\'\"\*\(\)\[.\s]/', $key)) { - $key = '"' . $key . '"'; - } - - if (isset($table)) { - $key = '"' . $table . '".' . $key; - } - - return $key; - } - - /** - * 随机排序 - * @access protected - * @param Query $query 查询对象 - * @return string - */ - protected function parseRand(Query $query): string - { - return 'DBMS_RANDOM.value'; - } -} diff --git a/vendor/topthink/think-orm/src/db/builder/Pgsql.php b/vendor/topthink/think-orm/src/db/builder/Pgsql.php deleted file mode 100644 index 4eace0a..0000000 --- a/vendor/topthink/think-orm/src/db/builder/Pgsql.php +++ /dev/null @@ -1,118 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\builder; - -use think\db\Builder; -use think\db\Query; -use think\db\Raw; - -/** - * Pgsql数据库驱动 - */ -class Pgsql extends Builder -{ - /** - * INSERT SQL表达式 - * @var string - */ - protected $insertSql = 'INSERT INTO %TABLE% (%FIELD%) VALUES (%DATA%) %COMMENT%'; - - /** - * INSERT ALL SQL表达式 - * @var string - */ - protected $insertAllSql = 'INSERT INTO %TABLE% (%FIELD%) %DATA% %COMMENT%'; - - /** - * limit分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $limit - * @return string - */ - public function parseLimit(Query $query, string $limit): string - { - $limitStr = ''; - - if (!empty($limit)) { - $limit = explode(',', $limit); - if (count($limit) > 1) { - $limitStr .= ' LIMIT ' . $limit[1] . ' OFFSET ' . $limit[0] . ' '; - } else { - $limitStr .= ' LIMIT ' . $limit[0] . ' '; - } - } - - return $limitStr; - } - - /** - * 字段和表名处理 - * @access public - * @param Query $query 查询对象 - * @param mixed $key 字段名 - * @param bool $strict 严格检测 - * @return string - */ - public function parseKey(Query $query, $key, bool $strict = false): string - { - if (is_int($key)) { - return (string) $key; - } elseif ($key instanceof Raw) { - return $this->parseRaw($query, $key); - } - - $key = trim($key); - - if (strpos($key, '->') && false === strpos($key, '(')) { - // JSON字段支持 - [$field, $name] = explode('->', $key); - $key = '"' . $field . '"' . '->>\'' . $name . '\''; - } elseif (strpos($key, '.')) { - [$table, $key] = explode('.', $key, 2); - - $alias = $query->getOptions('alias'); - - if ('__TABLE__' == $table) { - $table = $query->getOptions('table'); - $table = is_array($table) ? array_shift($table) : $table; - } - - if (isset($alias[$table])) { - $table = $alias[$table]; - } - - if ('*' != $key && !preg_match('/[,\"\*\(\).\s]/', $key)) { - $key = '"' . $key . '"'; - } - } - - if (isset($table)) { - $key = $table . '.' . $key; - } - - return $key; - } - - /** - * 随机排序 - * @access protected - * @param Query $query 查询对象 - * @return string - */ - protected function parseRand(Query $query): string - { - return 'RANDOM()'; - } - -} diff --git a/vendor/topthink/think-orm/src/db/builder/Sqlite.php b/vendor/topthink/think-orm/src/db/builder/Sqlite.php deleted file mode 100644 index ff17c5d..0000000 --- a/vendor/topthink/think-orm/src/db/builder/Sqlite.php +++ /dev/null @@ -1,113 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\builder; - -use think\db\Builder; -use think\db\Query; -use think\db\Raw; - -/** - * Sqlite数据库驱动 - */ -class Sqlite extends Builder -{ - /** - * limit - * @access public - * @param Query $query 查询对象 - * @param mixed $limit - * @return string - */ - public function parseLimit(Query $query, string $limit): string - { - $limitStr = ''; - - if (!empty($limit)) { - $limit = explode(',', $limit); - if (count($limit) > 1) { - $limitStr .= ' LIMIT ' . $limit[1] . ' OFFSET ' . $limit[0] . ' '; - } else { - $limitStr .= ' LIMIT ' . $limit[0] . ' '; - } - } - - return $limitStr; - } - - /** - * 随机排序 - * @access protected - * @param Query $query 查询对象 - * @return string - */ - protected function parseRand(Query $query): string - { - return 'RANDOM()'; - } - - /** - * 字段和表名处理 - * @access public - * @param Query $query 查询对象 - * @param mixed $key 字段名 - * @param bool $strict 严格检测 - * @return string - */ - public function parseKey(Query $query, $key, bool $strict = false): string - { - if (is_int($key)) { - return (string) $key; - } elseif ($key instanceof Raw) { - return $this->parseRaw($query, $key); - } - - $key = trim($key); - - if (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) { - [$table, $key] = explode('.', $key, 2); - - $alias = $query->getOptions('alias'); - - if ('__TABLE__' == $table) { - $table = $query->getOptions('table'); - $table = is_array($table) ? array_shift($table) : $table; - } - - if (isset($alias[$table])) { - $table = $alias[$table]; - } - } - - if ('*' != $key && !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { - $key = '`' . $key . '`'; - } - - if (isset($table)) { - $key = '`' . $table . '`.' . $key; - } - - return $key; - } - - /** - * 设置锁机制 - * @access protected - * @param Query $query 查询对象 - * @param bool|string $lock - * @return string - */ - protected function parseLock(Query $query, $lock = false): string - { - return ''; - } -} diff --git a/vendor/topthink/think-orm/src/db/builder/Sqlsrv.php b/vendor/topthink/think-orm/src/db/builder/Sqlsrv.php deleted file mode 100644 index 779b5e3..0000000 --- a/vendor/topthink/think-orm/src/db/builder/Sqlsrv.php +++ /dev/null @@ -1,184 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\db\builder; - -use think\db\Builder; -use think\db\exception\DbException as Exception; -use think\db\Query; -use think\db\Raw; - -/** - * Sqlsrv数据库驱动 - */ -class Sqlsrv extends Builder -{ - /** - * SELECT SQL表达式 - * @var string - */ - protected $selectSql = 'SELECT T1.* FROM (SELECT thinkphp.*, ROW_NUMBER() OVER (%ORDER%) AS ROW_NUMBER FROM (SELECT %DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%) AS thinkphp) AS T1 %LIMIT%%COMMENT%'; - /** - * SELECT INSERT SQL表达式 - * @var string - */ - protected $selectInsertSql = 'SELECT %DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%'; - - /** - * UPDATE SQL表达式 - * @var string - */ - protected $updateSql = 'UPDATE %TABLE% SET %SET% FROM %TABLE% %JOIN% %WHERE% %LIMIT% %LOCK%%COMMENT%'; - - /** - * DELETE SQL表达式 - * @var string - */ - protected $deleteSql = 'DELETE FROM %TABLE% %USING% FROM %TABLE% %JOIN% %WHERE% %LIMIT% %LOCK%%COMMENT%'; - - /** - * INSERT SQL表达式 - * @var string - */ - protected $insertSql = 'INSERT INTO %TABLE% (%FIELD%) VALUES (%DATA%) %COMMENT%'; - - /** - * INSERT ALL SQL表达式 - * @var string - */ - protected $insertAllSql = 'INSERT INTO %TABLE% (%FIELD%) %DATA% %COMMENT%'; - - /** - * order分析 - * @access protected - * @param Query $query 查询对象 - * @param mixed $order - * @return string - */ - protected function parseOrder(Query $query, array $order): string - { - if (empty($order)) { - return ' ORDER BY rand()'; - } - - $array = []; - - foreach ($order as $key => $val) { - if ($val instanceof Raw) { - $array[] = $this->parseRaw($query, $val); - } elseif ('[rand]' == $val) { - $array[] = $this->parseRand($query); - } else { - if (is_numeric($key)) { - [$key, $sort] = explode(' ', strpos($val, ' ') ? $val : $val . ' '); - } else { - $sort = $val; - } - - $sort = in_array(strtolower($sort), ['asc', 'desc'], true) ? ' ' . $sort : ''; - $array[] = $this->parseKey($query, $key, true) . $sort; - } - } - - return ' ORDER BY ' . implode(',', $array); - } - - /** - * 随机排序 - * @access protected - * @param Query $query 查询对象 - * @return string - */ - protected function parseRand(Query $query): string - { - return 'rand()'; - } - - /** - * 字段和表名处理 - * @access public - * @param Query $query 查询对象 - * @param mixed $key 字段名 - * @param bool $strict 严格检测 - * @return string - */ - public function parseKey(Query $query, $key, bool $strict = false): string - { - if (is_int($key)) { - return (string) $key; - } elseif ($key instanceof Raw) { - return $this->parseRaw($query, $key); - } - - $key = trim($key); - - if (strpos($key, '.') && !preg_match('/[,\'\"\(\)\[\s]/', $key)) { - [$table, $key] = explode('.', $key, 2); - - $alias = $query->getOptions('alias'); - - if ('__TABLE__' == $table) { - $table = $query->getOptions('table'); - $table = is_array($table) ? array_shift($table) : $table; - } - - if (isset($alias[$table])) { - $table = $alias[$table]; - } - } - - if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) { - throw new Exception('not support data:' . $key); - } - - if ('*' != $key && !preg_match('/[,\'\"\*\(\)\[.\s]/', $key)) { - $key = '[' . $key . ']'; - } - - if (isset($table)) { - $key = '[' . $table . '].' . $key; - } - - return $key; - } - - /** - * limit - * @access protected - * @param Query $query 查询对象 - * @param mixed $limit - * @return string - */ - protected function parseLimit(Query $query, string $limit): string - { - if (empty($limit)) { - return ''; - } - - $limit = explode(',', $limit); - - if (count($limit) > 1) { - $limitStr = '(T1.ROW_NUMBER BETWEEN ' . $limit[0] . ' + 1 AND ' . $limit[0] . ' + ' . $limit[1] . ')'; - } else { - $limitStr = '(T1.ROW_NUMBER BETWEEN 1 AND ' . $limit[0] . ")"; - } - - return 'WHERE ' . $limitStr; - } - - public function selectInsert(Query $query, array $fields, string $table): string - { - $this->selectSql = $this->selectInsertSql; - - return parent::selectInsert($query, $fields, $table); - } - -} diff --git a/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php b/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php deleted file mode 100644 index d137d05..0000000 --- a/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -use think\db\exception\DbException; -use think\db\Raw; - -/** - * 聚合查询 - */ -trait AggregateQuery -{ - /** - * 聚合查询 - * @access protected - * @param string $aggregate 聚合方法 - * @param string|Raw $field 字段名 - * @param bool $force 强制转为数字类型 - * @return mixed - */ - protected function aggregate(string $aggregate, $field, bool $force = false) - { - return $this->connection->aggregate($this, $aggregate, $field, $force); - } - - /** - * COUNT查询 - * @access public - * @param string|Raw $field 字段名 - * @return int - */ - public function count(string $field = '*'): int - { - if (!empty($this->options['group'])) { - // 支持GROUP - - if (!preg_match('/^[\w\.\*]+$/', $field)) { - throw new DbException('not support data:' . $field); - } - - $options = $this->getOptions(); - if (isset($options['cache'])) { - $cache = $options['cache']; - unset($options['cache']); - } - - $subSql = $this->options($options) - ->field('count(' . $field . ') AS think_count') - ->bind($this->bind) - ->buildSql(); - - $query = $this->newQuery(); - if (isset($cache)) { - $query->setOption('cache', $cache); - } - $query->table([$subSql => '_group_count_']); - - $count = $query->aggregate('COUNT', '*'); - } else { - $count = $this->aggregate('COUNT', $field); - } - - return (int) $count; - } - - /** - * SUM查询 - * @access public - * @param string|Raw $field 字段名 - * @return float - */ - public function sum($field): float - { - return $this->aggregate('SUM', $field, true); - } - - /** - * MIN查询 - * @access public - * @param string|Raw $field 字段名 - * @param bool $force 强制转为数字类型 - * @return mixed - */ - public function min($field, bool $force = true) - { - return $this->aggregate('MIN', $field, $force); - } - - /** - * MAX查询 - * @access public - * @param string|Raw $field 字段名 - * @param bool $force 强制转为数字类型 - * @return mixed - */ - public function max($field, bool $force = true) - { - return $this->aggregate('MAX', $field, $force); - } - - /** - * AVG查询 - * @access public - * @param string|Raw $field 字段名 - * @return float - */ - public function avg($field): float - { - return $this->aggregate('AVG', $field, true); - } - -} diff --git a/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php b/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php deleted file mode 100644 index 2828949..0000000 --- a/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php +++ /dev/null @@ -1,228 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -use think\db\Raw; - -/** - * JOIN和VIEW查询 - */ -trait JoinAndViewQuery -{ - - /** - * 查询SQL组装 join - * @access public - * @param mixed $join 关联的表名 - * @param mixed $condition 条件 - * @param string $type JOIN类型 - * @param array $bind 参数绑定 - * @return $this - */ - public function join($join, string $condition = null, string $type = 'INNER', array $bind = []) - { - $table = $this->getJoinTable($join); - - if (!empty($bind) && $condition) { - $this->bindParams($condition, $bind); - } - - $this->options['join'][] = [$table, strtoupper($type), $condition]; - - return $this; - } - - /** - * LEFT JOIN - * @access public - * @param mixed $join 关联的表名 - * @param mixed $condition 条件 - * @param array $bind 参数绑定 - * @return $this - */ - public function leftJoin($join, string $condition = null, array $bind = []) - { - return $this->join($join, $condition, 'LEFT', $bind); - } - - /** - * RIGHT JOIN - * @access public - * @param mixed $join 关联的表名 - * @param mixed $condition 条件 - * @param array $bind 参数绑定 - * @return $this - */ - public function rightJoin($join, string $condition = null, array $bind = []) - { - return $this->join($join, $condition, 'RIGHT', $bind); - } - - /** - * FULL JOIN - * @access public - * @param mixed $join 关联的表名 - * @param mixed $condition 条件 - * @param array $bind 参数绑定 - * @return $this - */ - public function fullJoin($join, string $condition = null, array $bind = []) - { - return $this->join($join, $condition, 'FULL'); - } - - /** - * 获取Join表名及别名 支持 - * ['prefix_table或者子查询'=>'alias'] 'table alias' - * @access protected - * @param array|string|Raw $join JION表名 - * @param string $alias 别名 - * @return string|array - */ - protected function getJoinTable($join, &$alias = null) - { - if (is_array($join)) { - $table = $join; - $alias = array_shift($join); - return $table; - } elseif ($join instanceof Raw) { - return $join; - } - - $join = trim($join); - - if (false !== strpos($join, '(')) { - // 使用子查询 - $table = $join; - } else { - // 使用别名 - if (strpos($join, ' ')) { - // 使用别名 - [$table, $alias] = explode(' ', $join); - } else { - $table = $join; - if (false === strpos($join, '.')) { - $alias = $join; - } - } - - if ($this->prefix && false === strpos($table, '.') && 0 !== strpos($table, $this->prefix)) { - $table = $this->getTable($table); - } - } - - if (!empty($alias) && $table != $alias) { - $table = [$table => $alias]; - } - - return $table; - } - - /** - * 指定JOIN查询字段 - * @access public - * @param string|array $join 数据表 - * @param string|array $field 查询字段 - * @param string $on JOIN条件 - * @param string $type JOIN类型 - * @param array $bind 参数绑定 - * @return $this - */ - public function view($join, $field = true, $on = null, string $type = 'INNER', array $bind = []) - { - $this->options['view'] = true; - - $fields = []; - $table = $this->getJoinTable($join, $alias); - - if (true === $field) { - $fields = $alias . '.*'; - } else { - if (is_string($field)) { - $field = explode(',', $field); - } - - foreach ($field as $key => $val) { - if (is_numeric($key)) { - $fields[] = $alias . '.' . $val; - - $this->options['map'][$val] = $alias . '.' . $val; - } else { - if (preg_match('/[,=\.\'\"\(\s]/', $key)) { - $name = $key; - } else { - $name = $alias . '.' . $key; - } - - $fields[] = $name . ' AS ' . $val; - - $this->options['map'][$val] = $name; - } - } - } - - $this->field($fields); - - if ($on) { - $this->join($table, $on, $type, $bind); - } else { - $this->table($table); - } - - return $this; - } - - /** - * 视图查询处理 - * @access protected - * @param array $options 查询参数 - * @return void - */ - protected function parseView(array &$options): void - { - foreach (['AND', 'OR'] as $logic) { - if (isset($options['where'][$logic])) { - foreach ($options['where'][$logic] as $key => $val) { - if (array_key_exists($key, $options['map'])) { - array_shift($val); - array_unshift($val, $options['map'][$key]); - $options['where'][$logic][$options['map'][$key]] = $val; - unset($options['where'][$logic][$key]); - } - } - } - } - - if (isset($options['order'])) { - // 视图查询排序处理 - foreach ($options['order'] as $key => $val) { - if (is_numeric($key) && is_string($val)) { - if (strpos($val, ' ')) { - [$field, $sort] = explode(' ', $val); - if (array_key_exists($field, $options['map'])) { - $options['order'][$options['map'][$field]] = $sort; - unset($options['order'][$key]); - } - } elseif (array_key_exists($val, $options['map'])) { - $options['order'][$options['map'][$val]] = 'asc'; - unset($options['order'][$key]); - } - } elseif (array_key_exists($key, $options['map'])) { - $options['order'][$options['map'][$key]] = $val; - unset($options['order'][$key]); - } - } - } - } - -} diff --git a/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php b/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php deleted file mode 100644 index cabd65b..0000000 --- a/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php +++ /dev/null @@ -1,562 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -use Closure; -use think\helper\Str; -use think\Model; -use think\model\Collection as ModelCollection; - -/** - * 模型及关联查询 - */ -trait ModelRelationQuery -{ - - /** - * 当前模型对象 - * @var Model - */ - protected $model; - - /** - * 指定模型 - * @access public - * @param Model $model 模型对象实例 - * @return $this - */ - public function model(Model $model) - { - $this->model = $model; - return $this; - } - - /** - * 获取当前的模型对象 - * @access public - * @return Model|null - */ - public function getModel() - { - return $this->model; - } - - /** - * 设置需要隐藏的输出属性 - * @access public - * @param array $hidden 属性列表 - * @return $this - */ - public function hidden(array $hidden = []) - { - $this->options['hidden'] = $hidden; - - return $this; - } - - /** - * 设置需要输出的属性 - * @access public - * @param array $visible - * @return $this - */ - public function visible(array $visible = []) - { - $this->options['visible'] = $visible; - - return $this; - } - - /** - * 设置需要附加的输出属性 - * @access public - * @param array $append 属性列表 - * @return $this - */ - public function append(array $append = []) - { - $this->options['append'] = $append; - - return $this; - } - - /** - * 添加查询范围 - * @access public - * @param array|string|Closure $scope 查询范围定义 - * @param array $args 参数 - * @return $this - */ - public function scope($scope, ...$args) - { - // 查询范围的第一个参数始终是当前查询对象 - array_unshift($args, $this); - - if ($scope instanceof Closure) { - call_user_func_array($scope, $args); - return $this; - } - - if (is_string($scope)) { - $scope = explode(',', $scope); - } - - if ($this->model) { - // 检查模型类的查询范围方法 - foreach ($scope as $name) { - $method = 'scope' . trim($name); - - if (method_exists($this->model, $method)) { - call_user_func_array([$this->model, $method], $args); - } - } - } - - return $this; - } - - /** - * 设置关联查询 - * @access public - * @param array $relation 关联名称 - * @return $this - */ - public function relation(array $relation) - { - if (empty($this->model) || empty($relation)) { - return $this; - } - - $this->options['relation'] = $relation; - return $this; - } - - /** - * 使用搜索器条件搜索字段 - * @access public - * @param string|array $fields 搜索字段 - * @param mixed $data 搜索数据 - * @param string $prefix 字段前缀标识 - * @return $this - */ - public function withSearch($fields, $data = [], string $prefix = '') - { - if (is_string($fields)) { - $fields = explode(',', $fields); - } - - $likeFields = $this->getConfig('match_like_fields') ?: []; - - foreach ($fields as $key => $field) { - if ($field instanceof Closure) { - $field($this, $data[$key] ?? null, $data, $prefix); - } elseif ($this->model) { - // 检测搜索器 - $fieldName = is_numeric($key) ? $field : $key; - $method = 'search' . Str::studly($fieldName) . 'Attr'; - - if (method_exists($this->model, $method)) { - $this->model->$method($this, $data[$field] ?? null, $data, $prefix); - } elseif (isset($data[$field])) { - $this->where($fieldName, in_array($fieldName, $likeFields) ? 'like' : '=', in_array($fieldName, $likeFields) ? '%' . $data[$field] . '%' : $data[$field]); - } - } - } - - return $this; - } - - /** - * 设置数据字段获取器 - * @access public - * @param string|array $name 字段名 - * @param callable $callback 闭包获取器 - * @return $this - */ - public function withAttr($name, callable $callback = null) - { - if (is_array($name)) { - foreach ($name as $key => $val) { - $this->withAttr($key, $val); - } - return $this; - } - - $this->options['with_attr'][$name] = $callback; - - if (strpos($name, '.')) { - [$relation, $field] = explode('.', $name); - - if (!empty($this->options['json']) && in_array($relation, $this->options['json'])) { - - } else { - $this->options['with_relation_attr'][$relation][$field] = $callback; - unset($this->options['with_attr'][$name]); - } - } - - return $this; - } - - /** - * 关联预载入 In方式 - * @access public - * @param array|string $with 关联方法名称 - * @return $this - */ - public function with($with) - { - if (empty($this->model) || empty($with)) { - return $this; - } - - $this->options['with'] = (array) $with; - return $this; - } - - /** - * 关联预载入 JOIN方式 - * @access protected - * @param array|string $with 关联方法名 - * @param string $joinType JOIN方式 - * @return $this - */ - public function withJoin($with, string $joinType = '') - { - if (empty($this->model) || empty($with)) { - return $this; - } - - $with = (array) $with; - $first = true; - - foreach ($with as $key => $relation) { - $closure = null; - $field = true; - - if ($relation instanceof Closure) { - // 支持闭包查询过滤关联条件 - $closure = $relation; - $relation = $key; - } elseif (is_array($relation)) { - $field = $relation; - $relation = $key; - } elseif (is_string($relation) && strpos($relation, '.')) { - $relation = strstr($relation, '.', true); - } - - $result = $this->model->eagerly($this, $relation, $field, $joinType, $closure, $first); - - if (!$result) { - unset($with[$key]); - } else { - $first = false; - } - } - - $this->via(); - $this->options['with_join'] = $with; - - return $this; - } - - /** - * 关联统计 - * @access protected - * @param array|string $relations 关联方法名 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param bool $subQuery 是否使用子查询 - * @return $this - */ - protected function withAggregate($relations, string $aggregate = 'count', $field = '*', bool $subQuery = true) - { - if (empty($this->model)) { - return $this; - } - - if (!$subQuery) { - $this->options['with_aggregate'][] = [(array) $relations, $aggregate, $field]; - return $this; - } - - if (!isset($this->options['field'])) { - $this->field('*'); - } - - $this->model->relationCount($this, (array) $relations, $aggregate, $field, true); - return $this; - } - - /** - * 关联缓存 - * @access public - * @param string|array|bool $relation 关联方法名 - * @param mixed $key 缓存key - * @param integer|\DateTime $expire 缓存有效期 - * @param string $tag 缓存标签 - * @return $this - */ - public function withCache($relation = true, $key = true, $expire = null, string $tag = null) - { - if (empty($this->model)) { - return $this; - } - - if (false === $relation || false === $key || !$this->getConnection()->getCache()) { - return $this; - } - - if ($key instanceof \DateTimeInterface || $key instanceof \DateInterval || (is_int($key) && is_null($expire))) { - $expire = $key; - $key = true; - } - - if (true === $relation || is_numeric($relation)) { - $this->options['with_cache'] = $relation; - return $this; - } - - $relations = (array) $relation; - foreach ($relations as $name => $relation) { - if (!is_numeric($name)) { - $this->options['with_cache'][$name] = is_array($relation) ? $relation : [$key, $relation, $tag]; - } else { - $this->options['with_cache'][$relation] = [$key, $expire, $tag]; - } - } - - return $this; - } - - /** - * 关联统计 - * @access public - * @param string|array $relation 关联方法名 - * @param bool $subQuery 是否使用子查询 - * @return $this - */ - public function withCount($relation, bool $subQuery = true) - { - return $this->withAggregate($relation, 'count', '*', $subQuery); - } - - /** - * 关联统计Sum - * @access public - * @param string|array $relation 关联方法名 - * @param string $field 字段 - * @param bool $subQuery 是否使用子查询 - * @return $this - */ - public function withSum($relation, string $field, bool $subQuery = true) - { - return $this->withAggregate($relation, 'sum', $field, $subQuery); - } - - /** - * 关联统计Max - * @access public - * @param string|array $relation 关联方法名 - * @param string $field 字段 - * @param bool $subQuery 是否使用子查询 - * @return $this - */ - public function withMax($relation, string $field, bool $subQuery = true) - { - return $this->withAggregate($relation, 'max', $field, $subQuery); - } - - /** - * 关联统计Min - * @access public - * @param string|array $relation 关联方法名 - * @param string $field 字段 - * @param bool $subQuery 是否使用子查询 - * @return $this - */ - public function withMin($relation, string $field, bool $subQuery = true) - { - return $this->withAggregate($relation, 'min', $field, $subQuery); - } - - /** - * 关联统计Avg - * @access public - * @param string|array $relation 关联方法名 - * @param string $field 字段 - * @param bool $subQuery 是否使用子查询 - * @return $this - */ - public function withAvg($relation, string $field, bool $subQuery = true) - { - return $this->withAggregate($relation, 'avg', $field, $subQuery); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $relation 关联方法名 - * @param mixed $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @return $this - */ - public function has(string $relation, string $operator = '>=', int $count = 1, string $id = '*', string $joinType = '') - { - return $this->model->has($relation, $operator, $count, $id, $joinType, $this); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $relation 关联方法名 - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @return $this - */ - public function hasWhere(string $relation, $where = [], string $fields = '*', string $joinType = '') - { - return $this->model->hasWhere($relation, $where, $fields, $joinType, $this); - } - - /** - * JSON字段数据转换 - * @access protected - * @param array $result 查询数据 - * @return void - */ - protected function jsonModelResult(array &$result): void - { - $withAttr = $this->options['with_attr']; - foreach ($this->options['json'] as $name) { - if (!isset($result[$name])) { - continue; - } - - $jsonData = json_decode($result[$name], true); - - if (isset($withAttr[$name])) { - foreach ($withAttr[$name] as $key => $closure) { - $jsonData[$key] = $closure($jsonData[$key] ?? null, $jsonData); - } - } - - $result[$name] = !$this->options['json_assoc'] ? (object) $jsonData : $jsonData; - } - } - - /** - * 查询数据转换为模型数据集对象 - * @access protected - * @param array $resultSet 数据集 - * @return ModelCollection - */ - protected function resultSetToModelCollection(array $resultSet): ModelCollection - { - if (empty($resultSet)) { - return $this->model->toCollection(); - } - - $this->options['is_resultSet'] = true; - - foreach ($resultSet as $key => &$result) { - // 数据转换为模型对象 - $this->resultToModel($result); - } - - foreach (['with', 'with_join'] as $with) { - // 关联预载入 - if (!empty($this->options[$with])) { - $result->eagerlyResultSet( - $resultSet, - $this->options[$with], - $this->options['with_relation_attr'], - 'with_join' == $with ? true : false, - $this->options['with_cache'] ?? false - ); - } - } - - // 模型数据集转换 - return $this->model->toCollection($resultSet); - } - - /** - * 查询数据转换为模型对象 - * @access protected - * @param array $result 查询数据 - * @return void - */ - protected function resultToModel(array &$result): void - { - // JSON数据处理 - if (!empty($this->options['json'])) { - $this->jsonModelResult($result); - } - - $result = $this->model->newInstance( - $result, - !empty($this->options['is_resultSet']) ? null : $this->getModelUpdateCondition($this->options), - $this->options - ); - - // 模型数据处理 - foreach ($this->options['filter'] as $filter) { - call_user_func_array($filter, [$result, $this->options]); - } - - // 关联查询 - if (!empty($this->options['relation'])) { - $result->relationQuery($this->options['relation'], $this->options['with_relation_attr']); - } - - // 关联预载入查询 - if (empty($this->options['is_resultSet'])) { - foreach (['with', 'with_join'] as $with) { - if (!empty($this->options[$with])) { - $result->eagerlyResult( - $this->options[$with], - $this->options['with_relation_attr'], - 'with_join' == $with ? true : false, - $this->options['with_cache'] ?? false - ); - } - } - } - - // 关联统计查询 - if (!empty($this->options['with_aggregate'])) { - foreach ($this->options['with_aggregate'] as $val) { - $result->relationCount($this, $val[0], $val[1], $val[2], false); - } - } - - // 动态获取器 - if (!empty($this->options['with_attr'])) { - $result->withAttr($this->options['with_attr']); - } - - foreach (['hidden', 'visible', 'append'] as $name) { - if (!empty($this->options[$name])) { - $result->$name($this->options[$name]); - } - } - - // 刷新原始数据 - $result->refreshOrigin(); - } - -} diff --git a/vendor/topthink/think-orm/src/db/concern/ParamsBind.php b/vendor/topthink/think-orm/src/db/concern/ParamsBind.php deleted file mode 100644 index 88293fa..0000000 --- a/vendor/topthink/think-orm/src/db/concern/ParamsBind.php +++ /dev/null @@ -1,133 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -use PDO; - -/** - * 参数绑定支持 - */ -trait ParamsBind -{ - /** - * 当前参数绑定 - * @var array - */ - protected $bind = []; - - /** - * 批量参数绑定 - * @access public - * @param array $value 绑定变量值 - * @return $this - */ - public function bind(array $value) - { - $this->bind = array_merge($this->bind, $value); - return $this; - } - - /** - * 单个参数绑定 - * @access public - * @param mixed $value 绑定变量值 - * @param integer $type 绑定类型 - * @param string $name 绑定标识 - * @return string - */ - public function bindValue($value, int $type = null, string $name = null) - { - $name = $name ?: 'ThinkBind_' . (count($this->bind) + 1) . '_' . mt_rand() . '_'; - - $this->bind[$name] = [$value, $type ?: PDO::PARAM_STR]; - return $name; - } - - /** - * 检测参数是否已经绑定 - * @access public - * @param string $key 参数名 - * @return bool - */ - public function isBind($key) - { - return isset($this->bind[$key]); - } - - /** - * 设置自动参数绑定 - * @access public - * @param bool $bind 是否自动参数绑定 - * @return $this - */ - public function autoBind(bool $bind) - { - $this->options['auto_bind'] = $bind; - return $this; - } - - /** - * 检测是否开启自动参数绑定 - * @access public - * @return bool - */ - public function isAutoBind(): bool - { - $autoBind = $this->getConfig('auto_param_bind'); - if (null !== $this->getOptions('auto_bind')) { - $autoBind = $this->getOptions('auto_bind'); - } - - return (bool) $autoBind; - } - - /** - * 参数绑定 - * @access public - * @param string $sql 绑定的sql表达式 - * @param array $bind 参数绑定 - * @return void - */ - public function bindParams(string &$sql, array $bind = []): void - { - foreach ($bind as $key => $value) { - if (is_array($value)) { - $name = $this->bindValue($value[0], $value[1], $value[2] ?? null); - } else { - $name = $this->bindValue($value); - } - - if (is_numeric($key)) { - $sql = substr_replace($sql, ':' . $name, strpos($sql, '?'), 1); - } else { - $sql = str_replace(':' . $key, ':' . $name, $sql); - } - } - } - - /** - * 获取绑定的参数 并清空 - * @access public - * @param bool $clear 是否清空绑定数据 - * @return array - */ - public function getBind(bool $clear = true): array - { - $bind = $this->bind; - if ($clear) { - $this->bind = []; - } - - return $bind; - } -} diff --git a/vendor/topthink/think-orm/src/db/concern/ResultOperation.php b/vendor/topthink/think-orm/src/db/concern/ResultOperation.php deleted file mode 100644 index ea26916..0000000 --- a/vendor/topthink/think-orm/src/db/concern/ResultOperation.php +++ /dev/null @@ -1,227 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -use Closure; -use think\Collection; -use think\db\exception\DataNotFoundException; -use think\db\exception\DbException; -use think\db\exception\ModelNotFoundException; -use think\db\Query; -use think\helper\Str; -use think\Model; - -/** - * 查询数据处理 - */ -trait ResultOperation -{ - /** - * 设置数据处理(支持模型) - * @access public - * @param callable $filter 数据处理Callable - * @param string $index 索引(唯一) - * @return $this - */ - public function filter(callable $filter, string $index = null) - { - if ($index) { - $this->options['filter'][$index] = $filter; - } else { - $this->options['filter'][] = $filter; - } - return $this; - } - - /** - * 是否允许返回空数据(或空模型) - * @access public - * @param bool $allowEmpty 是否允许为空 - * @return $this - */ - public function allowEmpty(bool $allowEmpty = true) - { - $this->options['allow_empty'] = $allowEmpty; - return $this; - } - - /** - * 设置查询数据不存在是否抛出异常 - * @access public - * @param bool $fail 数据不存在是否抛出异常 - * @return $this - */ - public function failException(bool $fail = true) - { - $this->options['fail'] = $fail; - return $this; - } - - /** - * 处理数据 - * @access protected - * @param array $result 查询数据 - * @return void - */ - protected function result(array &$result): void - { - // JSON数据处理 - if (!empty($this->options['json'])) { - $this->jsonResult($result); - } - - // 查询数据处理 - foreach ($this->options['filter'] as $filter) { - $result = call_user_func_array($filter, [$result, $this->options]); - } - - // 获取器 - if (!empty($this->options['with_attr'])) { - $this->getResultAttr($result, $this->options['with_attr']); - } - } - - /** - * 处理数据集 - * @access public - * @param array $resultSet 数据集 - * @param bool $toCollection 是否转为对象 - * @return void - */ - protected function resultSet(array &$resultSet, bool $toCollection = true): void - { - foreach ($resultSet as &$result) { - $this->result($result); - } - - // 返回Collection对象 - if ($toCollection) { - $resultSet = new Collection($resultSet); - } - } - - /** - * 使用获取器处理数据 - * @access protected - * @param array $result 查询数据 - * @param array $withAttr 字段获取器 - * @return void - */ - protected function getResultAttr(array &$result, array $withAttr = []): void - { - foreach ($withAttr as $name => $closure) { - $name = Str::snake($name); - - if (strpos($name, '.')) { - // 支持JSON字段 获取器定义 - [$key, $field] = explode('.', $name); - - if (isset($result[$key])) { - $result[$key][$field] = $closure($result[$key][$field] ?? null, $result[$key]); - } - } else { - $result[$name] = $closure($result[$name] ?? null, $result); - } - } - } - - /** - * 处理空数据 - * @access protected - * @return array|Model|null|static - * @throws DbException - * @throws ModelNotFoundException - * @throws DataNotFoundException - */ - protected function resultToEmpty() - { - if (!empty($this->options['fail'])) { - $this->throwNotFound(); - } elseif (!empty($this->options['allow_empty'])) { - return !empty($this->model) ? $this->model->newInstance() : []; - } - } - - /** - * 查找单条记录 不存在返回空数据(或者空模型) - * @access public - * @param mixed $data 数据 - * @return array|Model|static|mixed - */ - public function findOrEmpty($data = null) - { - return $this->allowEmpty(true)->find($data); - } - - /** - * JSON字段数据转换 - * @access protected - * @param array $result 查询数据 - * @return void - */ - protected function jsonResult(array &$result): void - { - foreach ($this->options['json'] as $name) { - if (!isset($result[$name])) { - continue; - } - - $result[$name] = json_decode($result[$name], true); - } - } - - /** - * 查询失败 抛出异常 - * @access protected - * @return void - * @throws ModelNotFoundException - * @throws DataNotFoundException - */ - protected function throwNotFound(): void - { - if (!empty($this->model)) { - $class = get_class($this->model); - throw new ModelNotFoundException('model data Not Found:' . $class, $class, $this->options); - } - - $table = $this->getTable(); - throw new DataNotFoundException('table data not Found:' . $table, $table, $this->options); - } - - /** - * 查找多条记录 如果不存在则抛出异常 - * @access public - * @param array|string|Query|Closure $data 数据 - * @return array|Collection|static[] - * @throws ModelNotFoundException - * @throws DataNotFoundException - */ - public function selectOrFail($data = null) - { - return $this->failException(true)->select($data); - } - - /** - * 查找单条记录 如果不存在则抛出异常 - * @access public - * @param array|string|Query|Closure $data 数据 - * @return array|Model|static|mixed - * @throws ModelNotFoundException - * @throws DataNotFoundException - */ - public function findOrFail($data = null) - { - return $this->failException(true)->find($data); - } - -} diff --git a/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php b/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php deleted file mode 100644 index 9070bef..0000000 --- a/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -/** - * 数据字段信息 - */ -trait TableFieldInfo -{ - - /** - * 获取数据表字段信息 - * @access public - * @param string $tableName 数据表名 - * @return array - */ - public function getTableFields($tableName = ''): array - { - if ('' == $tableName) { - $tableName = $this->getTable(); - } - - return $this->connection->getTableFields($tableName); - } - - /** - * 获取详细字段类型信息 - * @access public - * @param string $tableName 数据表名称 - * @return array - */ - public function getFields(string $tableName = ''): array - { - return $this->connection->getFields($tableName ?: $this->getTable()); - } - - /** - * 获取字段类型信息 - * @access public - * @return array - */ - public function getFieldsType(): array - { - if (!empty($this->options['field_type'])) { - return $this->options['field_type']; - } - - return $this->connection->getFieldsType($this->getTable()); - } - - /** - * 获取字段类型信息 - * @access public - * @param string $field 字段名 - * @return string|null - */ - public function getFieldType(string $field) - { - $fieldType = $this->getFieldsType(); - - return $fieldType[$field] ?? null; - } - - /** - * 获取字段类型信息 - * @access public - * @return array - */ - public function getFieldsBindType(): array - { - $fieldType = $this->getFieldsType(); - - return array_map([$this->connection, 'getFieldBindType'], $fieldType); - } - - /** - * 获取字段类型信息 - * @access public - * @param string $field 字段名 - * @return int - */ - public function getFieldBindType(string $field): int - { - $fieldType = $this->getFieldType($field); - - return $this->connection->getFieldBindType($fieldType ?: ''); - } - -} diff --git a/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php b/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php deleted file mode 100644 index 69b7eae..0000000 --- a/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php +++ /dev/null @@ -1,214 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -/** - * 时间查询支持 - */ -trait TimeFieldQuery -{ - /** - * 日期查询表达式 - * @var array - */ - protected $timeRule = [ - 'today' => ['today', 'tomorrow -1second'], - 'yesterday' => ['yesterday', 'today -1second'], - 'week' => ['this week 00:00:00', 'next week 00:00:00 -1second'], - 'last week' => ['last week 00:00:00', 'this week 00:00:00 -1second'], - 'month' => ['first Day of this month 00:00:00', 'first Day of next month 00:00:00 -1second'], - 'last month' => ['first Day of last month 00:00:00', 'first Day of this month 00:00:00 -1second'], - 'year' => ['this year 1/1', 'next year 1/1 -1second'], - 'last year' => ['last year 1/1', 'this year 1/1 -1second'], - ]; - - /** - * 添加日期或者时间查询规则 - * @access public - * @param array $rule 时间表达式 - * @return $this - */ - public function timeRule(array $rule) - { - $this->timeRule = array_merge($this->timeRule, $rule); - return $this; - } - - /** - * 查询日期或者时间 - * @access public - * @param string $field 日期字段名 - * @param string $op 比较运算符或者表达式 - * @param string|array $range 比较范围 - * @param string $logic AND OR - * @return $this - */ - public function whereTime(string $field, string $op, $range = null, string $logic = 'AND') - { - if (is_null($range)) { - if (isset($this->timeRule[$op])) { - $range = $this->timeRule[$op]; - } else { - $range = $op; - } - $op = is_array($range) ? 'between' : '>='; - } - - return $this->parseWhereExp($logic, $field, strtolower($op) . ' time', $range, [], true); - } - - /** - * 查询某个时间间隔数据 - * @access public - * @param string $field 日期字段名 - * @param string $start 开始时间 - * @param string $interval 时间间隔单位 day/month/year/week/hour/minute/second - * @param int $step 间隔 - * @param string $logic AND OR - * @return $this - */ - public function whereTimeInterval(string $field, string $start, string $interval = 'day', int $step = 1, string $logic = 'AND') - { - $startTime = strtotime($start); - $endTime = strtotime(($step > 0 ? '+' : '-') . abs($step) . ' ' . $interval . (abs($step) > 1 ? 's' : ''), $startTime); - - return $this->whereTime($field, 'between', $step > 0 ? [$startTime, $endTime - 1] : [$endTime, $startTime - 1], $logic); - } - - /** - * 查询月数据 whereMonth('time_field', '2018-1') - * @access public - * @param string $field 日期字段名 - * @param string $month 月份信息 - * @param int $step 间隔 - * @param string $logic AND OR - * @return $this - */ - public function whereMonth(string $field, string $month = 'this month', int $step = 1, string $logic = 'AND') - { - if (in_array($month, ['this month', 'last month'])) { - $month = date('Y-m', strtotime($month)); - } - - return $this->whereTimeInterval($field, $month, 'month', $step, $logic); - } - - /** - * 查询周数据 whereWeek('time_field', '2018-1-1') 从2018-1-1开始的一周数据 - * @access public - * @param string $field 日期字段名 - * @param string $week 周信息 - * @param int $step 间隔 - * @param string $logic AND OR - * @return $this - */ - public function whereWeek(string $field, string $week = 'this week', int $step = 1, string $logic = 'AND') - { - if (in_array($week, ['this week', 'last week'])) { - $week = date('Y-m-d', strtotime($week)); - } - - return $this->whereTimeInterval($field, $week, 'week', $step, $logic); - } - - /** - * 查询年数据 whereYear('time_field', '2018') - * @access public - * @param string $field 日期字段名 - * @param string $year 年份信息 - * @param int $step 间隔 - * @param string $logic AND OR - * @return $this - */ - public function whereYear(string $field, string $year = 'this year', int $step = 1, string $logic = 'AND') - { - if (in_array($year, ['this year', 'last year'])) { - $year = date('Y', strtotime($year)); - } - - return $this->whereTimeInterval($field, $year . '-1-1', 'year', $step, $logic); - } - - /** - * 查询日数据 whereDay('time_field', '2018-1-1') - * @access public - * @param string $field 日期字段名 - * @param string $day 日期信息 - * @param int $step 间隔 - * @param string $logic AND OR - * @return $this - */ - public function whereDay(string $field, string $day = 'today', int $step = 1, string $logic = 'AND') - { - if (in_array($day, ['today', 'yesterday'])) { - $day = date('Y-m-d', strtotime($day)); - } - - return $this->whereTimeInterval($field, $day, 'day', $step, $logic); - } - - /** - * 查询日期或者时间范围 whereBetweenTime('time_field', '2018-1-1','2018-1-15') - * @access public - * @param string $field 日期字段名 - * @param string|int $startTime 开始时间 - * @param string|int $endTime 结束时间 - * @param string $logic AND OR - * @return $this - */ - public function whereBetweenTime(string $field, $startTime, $endTime, string $logic = 'AND') - { - return $this->whereTime($field, 'between', [$startTime, $endTime], $logic); - } - - /** - * 查询日期或者时间范围 whereNotBetweenTime('time_field', '2018-1-1','2018-1-15') - * @access public - * @param string $field 日期字段名 - * @param string|int $startTime 开始时间 - * @param string|int $endTime 结束时间 - * @return $this - */ - public function whereNotBetweenTime(string $field, $startTime, $endTime) - { - return $this->whereTime($field, '<', $startTime) - ->whereTime($field, '>', $endTime, 'OR'); - } - - /** - * 查询当前时间在两个时间字段范围 whereBetweenTimeField('start_time', 'end_time') - * @access public - * @param string $startField 开始时间字段 - * @param string $endField 结束时间字段 - * @return $this - */ - public function whereBetweenTimeField(string $startField, string $endField) - { - return $this->whereTime($startField, '<=', time()) - ->whereTime($endField, '>=', time()); - } - - /** - * 查询当前时间不在两个时间字段范围 whereNotBetweenTimeField('start_time', 'end_time') - * @access public - * @param string $startField 开始时间字段 - * @param string $endField 结束时间字段 - * @return $this - */ - public function whereNotBetweenTimeField(string $startField, string $endField) - { - return $this->whereTime($startField, '>', time()) - ->whereTime($endField, '<', time(), 'OR'); - } - -} diff --git a/vendor/topthink/think-orm/src/db/concern/Transaction.php b/vendor/topthink/think-orm/src/db/concern/Transaction.php deleted file mode 100644 index b586132..0000000 --- a/vendor/topthink/think-orm/src/db/concern/Transaction.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -/** - * 事务支持 - */ -trait Transaction -{ - - /** - * 执行数据库Xa事务 - * @access public - * @param callable $callback 数据操作方法回调 - * @param array $dbs 多个查询对象或者连接对象 - * @return mixed - * @throws PDOException - * @throws \Exception - * @throws \Throwable - */ - public function transactionXa(callable $callback, array $dbs = []) - { - return $this->connection->transactionXa($callback, $dbs); - } - - /** - * 执行数据库事务 - * @access public - * @param callable $callback 数据操作方法回调 - * @return mixed - */ - public function transaction(callable $callback) - { - return $this->connection->transaction($callback); - } - - /** - * 启动事务 - * @access public - * @return void - */ - public function startTrans(): void - { - $this->connection->startTrans(); - } - - /** - * 用于非自动提交状态下面的查询提交 - * @access public - * @return void - * @throws PDOException - */ - public function commit(): void - { - $this->connection->commit(); - } - - /** - * 事务回滚 - * @access public - * @return void - * @throws PDOException - */ - public function rollback(): void - { - $this->connection->rollback(); - } - - /** - * 启动XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function startTransXa(string $xid): void - { - $this->connection->startTransXa($xid); - } - - /** - * 预编译XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function prepareXa(string $xid): void - { - $this->connection->prepareXa($xid); - } - - /** - * 提交XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function commitXa(string $xid): void - { - $this->connection->commitXa($xid); - } - - /** - * 回滚XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function rollbackXa(string $xid): void - { - $this->connection->rollbackXa($xid); - } -} diff --git a/vendor/topthink/think-orm/src/db/concern/WhereQuery.php b/vendor/topthink/think-orm/src/db/concern/WhereQuery.php deleted file mode 100644 index f1b49db..0000000 --- a/vendor/topthink/think-orm/src/db/concern/WhereQuery.php +++ /dev/null @@ -1,529 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\concern; - -use Closure; -use think\db\BaseQuery; -use think\db\Raw; - -trait WhereQuery -{ - /** - * 指定AND查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $op 查询表达式 - * @param mixed $condition 查询条件 - * @return $this - */ - public function where($field, $op = null, $condition = null) - { - if ($field instanceof $this) { - $this->parseQueryWhere($field); - return $this; - } elseif (true === $field || 1 === $field) { - $this->options['where']['AND'][] = true; - return $this; - } - - $param = func_get_args(); - array_shift($param); - return $this->parseWhereExp('AND', $field, $op, $condition, $param); - } - - /** - * 解析Query对象查询条件 - * @access public - * @param BaseQuery $query 查询对象 - * @return void - */ - protected function parseQueryWhere(BaseQuery $query): void - { - $this->options['where'] = $query->getOptions('where') ?? []; - - if ($query->getOptions('via')) { - $via = $query->getOptions('via'); - foreach ($this->options['where'] as $logic => &$where) { - foreach ($where as $key => &$val) { - if (is_array($val) && !strpos($val[0], '.')) { - $val[0] = $via . '.' . $val[0]; - } - } - } - } - - $this->bind($query->getBind(false)); - } - - /** - * 指定OR查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $op 查询表达式 - * @param mixed $condition 查询条件 - * @return $this - */ - public function whereOr($field, $op = null, $condition = null) - { - $param = func_get_args(); - array_shift($param); - return $this->parseWhereExp('OR', $field, $op, $condition, $param); - } - - /** - * 指定XOR查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $op 查询表达式 - * @param mixed $condition 查询条件 - * @return $this - */ - public function whereXor($field, $op = null, $condition = null) - { - $param = func_get_args(); - array_shift($param); - return $this->parseWhereExp('XOR', $field, $op, $condition, $param); - } - - /** - * 指定Null查询条件 - * @access public - * @param mixed $field 查询字段 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereNull(string $field, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'NULL', null, [], true); - } - - /** - * 指定NotNull查询条件 - * @access public - * @param mixed $field 查询字段 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereNotNull(string $field, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'NOTNULL', null, [], true); - } - - /** - * 指定Exists查询条件 - * @access public - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereExists($condition, string $logic = 'AND') - { - if (is_string($condition)) { - $condition = new Raw($condition); - } - - $this->options['where'][strtoupper($logic)][] = ['', 'EXISTS', $condition]; - return $this; - } - - /** - * 指定NotExists查询条件 - * @access public - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereNotExists($condition, string $logic = 'AND') - { - if (is_string($condition)) { - $condition = new Raw($condition); - } - - $this->options['where'][strtoupper($logic)][] = ['', 'NOT EXISTS', $condition]; - return $this; - } - - /** - * 指定In查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereIn(string $field, $condition, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'IN', $condition, [], true); - } - - /** - * 指定NotIn查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereNotIn(string $field, $condition, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'NOT IN', $condition, [], true); - } - - /** - * 指定Like查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereLike(string $field, $condition, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'LIKE', $condition, [], true); - } - - /** - * 指定NotLike查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereNotLike(string $field, $condition, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'NOT LIKE', $condition, [], true); - } - - /** - * 指定Between查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereBetween(string $field, $condition, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'BETWEEN', $condition, [], true); - } - - /** - * 指定NotBetween查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereNotBetween(string $field, $condition, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'NOT BETWEEN', $condition, [], true); - } - - /** - * 指定FIND_IN_SET查询条件 - * @access public - * @param mixed $field 查询字段 - * @param mixed $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereFindInSet(string $field, $condition, string $logic = 'AND') - { - return $this->parseWhereExp($logic, $field, 'FIND IN SET', $condition, [], true); - } - - /** - * 比较两个字段 - * @access public - * @param string $field1 查询字段 - * @param string $operator 比较操作符 - * @param string $field2 比较字段 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereColumn(string $field1, string $operator, string $field2 = null, string $logic = 'AND') - { - if (is_null($field2)) { - $field2 = $operator; - $operator = '='; - } - - return $this->parseWhereExp($logic, $field1, 'COLUMN', [$operator, $field2], [], true); - } - - /** - * 设置软删除字段及条件 - * @access public - * @param string $field 查询字段 - * @param mixed $condition 查询条件 - * @return $this - */ - public function useSoftDelete(string $field, $condition = null) - { - if ($field) { - $this->options['soft_delete'] = [$field, $condition]; - } - - return $this; - } - - /** - * 指定Exp查询条件 - * @access public - * @param mixed $field 查询字段 - * @param string $where 查询条件 - * @param array $bind 参数绑定 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereExp(string $field, string $where, array $bind = [], string $logic = 'AND') - { - $this->options['where'][$logic][] = [$field, 'EXP', new Raw($where, $bind)]; - - return $this; - } - - /** - * 指定字段Raw查询 - * @access public - * @param string $field 查询字段表达式 - * @param mixed $op 查询表达式 - * @param string $condition 查询条件 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereFieldRaw(string $field, $op, $condition = null, string $logic = 'AND') - { - if (is_null($condition)) { - $condition = $op; - $op = '='; - } - - $this->options['where'][$logic][] = [new Raw($field), $op, $condition]; - return $this; - } - - /** - * 指定表达式查询条件 - * @access public - * @param string $where 查询条件 - * @param array $bind 参数绑定 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function whereRaw(string $where, array $bind = [], string $logic = 'AND') - { - $this->options['where'][$logic][] = new Raw($where, $bind); - - return $this; - } - - /** - * 指定表达式查询条件 OR - * @access public - * @param string $where 查询条件 - * @param array $bind 参数绑定 - * @return $this - */ - public function whereOrRaw(string $where, array $bind = []) - { - return $this->whereRaw($where, $bind, 'OR'); - } - - /** - * 分析查询表达式 - * @access protected - * @param string $logic 查询逻辑 and or xor - * @param mixed $field 查询字段 - * @param mixed $op 查询表达式 - * @param mixed $condition 查询条件 - * @param array $param 查询参数 - * @param bool $strict 严格模式 - * @return $this - */ - protected function parseWhereExp(string $logic, $field, $op, $condition, array $param = [], bool $strict = false) - { - $logic = strtoupper($logic); - - if (is_string($field) && !empty($this->options['via']) && false === strpos($field, '.')) { - $field = $this->options['via'] . '.' . $field; - } - - if ($strict) { - // 使用严格模式查询 - if ('=' == $op) { - $where = $this->whereEq($field, $condition); - } else { - $where = [$field, $op, $condition, $logic]; - } - } elseif (is_array($field)) { - // 解析数组批量查询 - return $this->parseArrayWhereItems($field, $logic); - } elseif ($field instanceof Closure) { - $where = $field; - } elseif (is_string($field)) { - if ($condition instanceof Raw) { - - } elseif (preg_match('/[,=\<\'\"\(\s]/', $field)) { - return $this->whereRaw($field, is_array($op) ? $op : [], $logic); - } elseif (is_string($op) && strtolower($op) == 'exp' && !is_null($condition)) { - $bind = isset($param[2]) && is_array($param[2]) ? $param[2] : []; - return $this->whereExp($field, $condition, $bind, $logic); - } - - $where = $this->parseWhereItem($logic, $field, $op, $condition, $param); - } - - if (!empty($where)) { - $this->options['where'][$logic][] = $where; - } - - return $this; - } - - /** - * 分析查询表达式 - * @access protected - * @param string $logic 查询逻辑 and or xor - * @param mixed $field 查询字段 - * @param mixed $op 查询表达式 - * @param mixed $condition 查询条件 - * @param array $param 查询参数 - * @return array - */ - protected function parseWhereItem(string $logic, $field, $op, $condition, array $param = []): array - { - if (is_array($op)) { - // 同一字段多条件查询 - array_unshift($param, $field); - $where = $param; - } elseif ($field && is_null($condition)) { - if (is_string($op) && in_array(strtoupper($op), ['NULL', 'NOTNULL', 'NOT NULL'], true)) { - // null查询 - $where = [$field, $op, '']; - } elseif ('=' === $op || is_null($op)) { - $where = [$field, 'NULL', '']; - } elseif ('<>' === $op) { - $where = [$field, 'NOTNULL', '']; - } else { - // 字段相等查询 - $where = $this->whereEq($field, $op); - } - } elseif (is_string($op) && in_array(strtoupper($op), ['EXISTS', 'NOT EXISTS', 'NOTEXISTS'], true)) { - $where = [$field, $op, is_string($condition) ? new Raw($condition) : $condition]; - } else { - $where = $field ? [$field, $op, $condition, $param[2] ?? null] : []; - } - - return $where; - } - - /** - * 相等查询的主键处理 - * @access protected - * @param string $field 字段名 - * @param mixed $value 字段值 - * @return array - */ - protected function whereEq(string $field, $value): array - { - if ($this->getPk() == $field) { - $this->options['key'] = $value; - } - - return [$field, '=', $value]; - } - - /** - * 数组批量查询 - * @access protected - * @param array $field 批量查询 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - protected function parseArrayWhereItems(array $field, string $logic) - { - $where = []; - foreach ($field as $key => $val) { - if (is_int($key)) { - $where[] = $val; - } elseif ($val instanceof Raw) { - $where[] = [$key, 'exp', $val]; - } else { - $where[] = is_null($val) ? [$key, 'NULL', ''] : [$key, is_array($val) ? 'IN' : '=', $val]; - } - } - - if (!empty($where)) { - $this->options['where'][$logic] = isset($this->options['where'][$logic]) ? - array_merge($this->options['where'][$logic], $where) : $where; - } - - return $this; - } - - /** - * 去除某个查询条件 - * @access public - * @param string $field 查询字段 - * @param string $logic 查询逻辑 and or xor - * @return $this - */ - public function removeWhereField(string $field, string $logic = 'AND') - { - $logic = strtoupper($logic); - - if (isset($this->options['where'][$logic])) { - foreach ($this->options['where'][$logic] as $key => $val) { - if (is_array($val) && $val[0] == $field) { - unset($this->options['where'][$logic][$key]); - } - } - } - - return $this; - } - - /** - * 条件查询 - * @access public - * @param mixed $condition 满足条件(支持闭包) - * @param Closure|array $query 满足条件后执行的查询表达式(闭包或数组) - * @param Closure|array $otherwise 不满足条件后执行 - * @return $this - */ - public function when($condition, $query, $otherwise = null) - { - if ($condition instanceof Closure) { - $condition = $condition($this); - } - - if ($condition) { - if ($query instanceof Closure) { - $query($this, $condition); - } elseif (is_array($query)) { - $this->where($query); - } - } elseif ($otherwise) { - if ($otherwise instanceof Closure) { - $otherwise($this, $condition); - } elseif (is_array($otherwise)) { - $this->where($otherwise); - } - } - - return $this; - } -} diff --git a/vendor/topthink/think-orm/src/db/connector/Mongo.php b/vendor/topthink/think-orm/src/db/connector/Mongo.php deleted file mode 100644 index 418dc50..0000000 --- a/vendor/topthink/think-orm/src/db/connector/Mongo.php +++ /dev/null @@ -1,1175 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\connector; - -use Closure; -use MongoDB\BSON\ObjectID; -use MongoDB\Driver\BulkWrite; -use MongoDB\Driver\Command; -use MongoDB\Driver\Cursor; -use MongoDB\Driver\Exception\AuthenticationException; -use MongoDB\Driver\Exception\BulkWriteException; -use MongoDB\Driver\Exception\ConnectionException; -use MongoDB\Driver\Exception\InvalidArgumentException; -use MongoDB\Driver\Exception\RuntimeException; -use MongoDB\Driver\Manager; -use MongoDB\Driver\Query as MongoQuery; -use MongoDB\Driver\ReadPreference; -use MongoDB\Driver\WriteConcern; -use think\db\BaseQuery; -use think\db\builder\Mongo as Builder; -use think\db\Connection; -use think\db\exception\DbEventException; -use think\db\exception\DbException as Exception; -use think\db\Mongo as Query; - -/** - * Mongo数据库驱动 - * @property Manager[] $links - * @property Manager $linkRead - * @property Manager $linkWrite - */ -class Mongo extends Connection -{ - - // 查询数据类型 - protected $dbName = ''; - protected $typeMap = 'array'; - protected $mongo; // MongoDb Object - protected $cursor; // MongoCursor Object - protected $session_uuid; // sessions会话列表当前会话数组key 随机生成 - protected $sessions = []; // 会话列表 - - /** @var Builder */ - protected $builder; - - // 数据库连接参数配置 - protected $config = [ - // 数据库类型 - 'type' => '', - // 服务器地址 - 'hostname' => '', - // 数据库名 - 'database' => '', - // 是否是复制集 - 'is_replica_set' => false, - // 用户名 - 'username' => '', - // 密码 - 'password' => '', - // 端口 - 'hostport' => '', - // 连接dsn - 'dsn' => '', - // 数据库连接参数 - 'params' => [], - // 数据库编码默认采用utf8 - 'charset' => 'utf8', - // 主键名 - 'pk' => '_id', - // 主键类型 - 'pk_type' => 'ObjectID', - // 数据库表前缀 - 'prefix' => '', - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) - 'deploy' => 0, - // 数据库读写是否分离 主从式有效 - 'rw_separate' => false, - // 读写分离后 主服务器数量 - 'master_num' => 1, - // 指定从服务器序号 - 'slave_no' => '', - // 是否严格检查字段是否存在 - 'fields_strict' => true, - // 开启字段缓存 - 'fields_cache' => false, - // 监听SQL - 'trigger_sql' => true, - // 自动写入时间戳字段 - 'auto_timestamp' => false, - // 时间字段取出后的默认时间格式 - 'datetime_format' => 'Y-m-d H:i:s', - // 是否_id转换为id - 'pk_convert_id' => false, - // typeMap - 'type_map' => ['root' => 'array', 'document' => 'array'], - ]; - - /** - * 获取当前连接器类对应的Query类 - * @access public - * @return string - */ - public function getQueryClass(): string - { - return Query::class; - } - - /** - * 获取当前的builder实例对象 - * @access public - * @return Builder - */ - public function getBuilder() - { - return $this->builder; - } - - /** - * 获取当前连接器类对应的Builder类 - * @access public - * @return string - */ - public function getBuilderClass(): string - { - return Builder::class; - } - - /** - * 连接数据库方法 - * @access public - * @param array $config 连接参数 - * @param integer $linkNum 连接序号 - * @return Manager - * @throws InvalidArgumentException - * @throws RuntimeException - */ - public function connect(array $config = [], $linkNum = 0) - { - if (!isset($this->links[$linkNum])) { - if (empty($config)) { - $config = $this->config; - } else { - $config = array_merge($this->config, $config); - } - - $this->dbName = $config['database']; - $this->typeMap = $config['type_map']; - - if ($config['pk_convert_id'] && '_id' == $config['pk']) { - $this->config['pk'] = 'id'; - } - - if (empty($config['dsn'])) { - $config['dsn'] = 'mongodb://' . ($config['username'] ? "{$config['username']}" : '') . ($config['password'] ? ":{$config['password']}@" : '') . $config['hostname'] . ($config['hostport'] ? ":{$config['hostport']}" : ''); - } - - $startTime = microtime(true); - - $this->links[$linkNum] = new Manager($config['dsn'], $config['params']); - - if (!empty($config['trigger_sql'])) { - // 记录数据库连接信息 - $this->trigger('CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn']); - } - - } - - return $this->links[$linkNum]; - } - - /** - * 获取Mongo Manager对象 - * @access public - * @return Manager|null - */ - public function getMongo() - { - return $this->mongo ?: null; - } - - /** - * 设置/获取当前操作的database - * @access public - * @param string $db db - * @return string - */ - public function db(string $db = null) - { - if (is_null($db)) { - return $this->dbName; - } else { - $this->dbName = $db; - } - } - - /** - * 执行查询但只返回Cursor对象 - * @access public - * @param Query $query 查询对象 - * @return Cursor - */ - public function cursor($query) - { - // 分析查询表达式 - $options = $query->parseOptions(); - - // 生成MongoQuery对象 - $mongoQuery = $this->builder->select($query); - - $master = $query->getOptions('master') ? true : false; - - // 执行查询操作 - return $this->getCursor($query, $mongoQuery, $master); - } - - /** - * 执行查询并返回Cursor对象 - * @access public - * @param BaseQuery $query 查询对象 - * @param MongoQuery|Closure $mongoQuery Mongo查询对象 - * @param bool $master 是否主库操作 - * @return Cursor - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - */ - public function getCursor(BaseQuery $query, $mongoQuery, bool $master = false): Cursor - { - $this->initConnect($master); - $this->db->updateQueryTimes(); - - $options = $query->getOptions(); - $namespace = $options['table']; - - if (false === strpos($namespace, '.')) { - $namespace = $this->dbName . '.' . $namespace; - } - - if (!empty($this->queryStr)) { - // 记录执行指令 - $this->queryStr = 'db' . strstr($namespace, '.') . '.' . $this->queryStr; - } - - if ($mongoQuery instanceof Closure) { - $mongoQuery = $mongoQuery($query); - } - - $readPreference = $options['readPreference'] ?? null; - $this->queryStartTime = microtime(true); - - if ($session = $this->getSession()) { - $this->cursor = $this->mongo->executeQuery($namespace, $query, [ - 'readPreference' => is_null($readPreference) ? new ReadPreference(ReadPreference::RP_PRIMARY) : $readPreference, - 'session' => $session, - ]); - } else { - $this->cursor = $this->mongo->executeQuery($namespace, $mongoQuery, $readPreference); - } - - // SQL监控 - if (!empty($this->config['trigger_sql'])) { - $this->trigger('', $master); - } - - return $this->cursor; - } - - /** - * 执行查询 返回数据集 - * @access public - * @param MongoQuery $query 查询对象 - * @return mixed - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - */ - public function query(MongoQuery $query) - { - return $this->mongoQuery($this->newQuery(), $query); - } - - /** - * 执行语句 - * @access public - * @param BulkWrite $bulk - * @return int - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - * @throws BulkWriteException - */ - public function execute(BulkWrite $bulk) - { - return $this->mongoExecute($this->newQuery(), $bulk); - } - - /** - * 执行查询 - * @access protected - * @param BaseQuery $query 查询对象 - * @param MongoQuery|Closure $mongoQuery Mongo查询对象 - * @return array - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - */ - protected function mongoQuery(BaseQuery $query, $mongoQuery): array - { - $options = $query->parseOptions(); - - if ($query->getOptions('cache')) { - // 检查查询缓存 - $cacheItem = $this->parseCache($query, $query->getOptions('cache')); - $key = $cacheItem->getKey(); - - if ($this->cache->has($key)) { - return $this->cache->get($key); - } - } - - if ($mongoQuery instanceof Closure) { - $mongoQuery = $mongoQuery($query); - } - - $master = $query->getOptions('master') ? true : false; - $this->getCursor($query, $mongoQuery, $master); - - $resultSet = $this->getResult($options['typeMap']); - - if (isset($cacheItem) && $resultSet) { - // 缓存数据集 - $cacheItem->set($resultSet); - $this->cacheData($cacheItem); - } - - return $resultSet; - } - - /** - * 执行写操作 - * @access protected - * @param BaseQuery $query - * @param BulkWrite $bulk - * - * @return WriteResult - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - * @throws BulkWriteException - */ - protected function mongoExecute(BaseQuery $query, BulkWrite $bulk) - { - $this->initConnect(true); - $this->db->updateQueryTimes(); - - $options = $query->getOptions(); - - $namespace = $options['table']; - if (false === strpos($namespace, '.')) { - $namespace = $this->dbName . '.' . $namespace; - } - - if (!empty($this->queryStr)) { - // 记录执行指令 - $this->queryStr = 'db' . strstr($namespace, '.') . '.' . $this->queryStr; - } - - $writeConcern = $options['writeConcern'] ?? null; - $this->queryStartTime = microtime(true); - - if ($session = $this->getSession()) { - $writeResult = $this->mongo->executeBulkWrite($namespace, $bulk, [ - 'session' => $session, - 'writeConcern' => is_null($writeConcern) ? new WriteConcern(1) : $writeConcern, - ]); - } else { - $writeResult = $this->mongo->executeBulkWrite($namespace, $bulk, $writeConcern); - } - - // SQL监控 - if (!empty($this->config['trigger_sql'])) { - $this->trigger(); - } - - $this->numRows = $writeResult->getMatchedCount(); - - if ($query->getOptions('cache')) { - // 清理缓存数据 - $cacheItem = $this->parseCache($query, $query->getOptions('cache')); - $key = $cacheItem->getKey(); - $tag = $cacheItem->getTag(); - - if (isset($key) && $this->cache->has($key)) { - $this->cache->delete($key); - } elseif (!empty($tag) && method_exists($this->cache, 'tag')) { - $this->cache->tag($tag)->clear(); - } - } - - return $writeResult; - } - - /** - * 执行指令 - * @access public - * @param Command $command 指令 - * @param string $dbName 当前数据库名 - * @param ReadPreference $readPreference readPreference - * @param string|array $typeMap 指定返回的typeMap - * @param bool $master 是否主库操作 - * @return array - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - */ - public function command(Command $command, string $dbName = '', ReadPreference $readPreference = null, $typeMap = null, bool $master = false): array - { - $this->initConnect($master); - $this->db->updateQueryTimes(); - - $this->queryStartTime = microtime(true); - - $dbName = $dbName ?: $this->dbName; - - if (!empty($this->queryStr)) { - $this->queryStr = 'db.' . $this->queryStr; - } - - if ($session = $this->getSession()) { - $this->cursor = $this->mongo->executeCommand($dbName, $command, [ - 'readPreference' => is_null($readPreference) ? new ReadPreference(ReadPreference::RP_PRIMARY) : $readPreference, - 'session' => $session, - ]); - } else { - $this->cursor = $this->mongo->executeCommand($dbName, $command, $readPreference); - } - - // SQL监控 - if (!empty($this->config['trigger_sql'])) { - $this->trigger('', $master); - } - - return $this->getResult($typeMap); - } - - /** - * 获得数据集 - * @access protected - * @param string|array $typeMap 指定返回的typeMap - * @return mixed - */ - protected function getResult($typeMap = null): array - { - // 设置结果数据类型 - if (is_null($typeMap)) { - $typeMap = $this->typeMap; - } - - $typeMap = is_string($typeMap) ? ['root' => $typeMap] : $typeMap; - - $this->cursor->setTypeMap($typeMap); - - // 获取数据集 - $result = $this->cursor->toArray(); - - if ($this->getConfig('pk_convert_id')) { - // 转换ObjectID 字段 - foreach ($result as &$data) { - $this->convertObjectID($data); - } - } - - $this->numRows = count($result); - - return $result; - } - - /** - * ObjectID处理 - * @access protected - * @param array $data 数据 - * @return void - */ - protected function convertObjectID(array &$data): void - { - if (isset($data['_id']) && is_object($data['_id'])) { - $data['id'] = $data['_id']->__toString(); - unset($data['_id']); - } - } - - /** - * 数据库日志记录(仅供参考) - * @access public - * @param string $type 类型 - * @param mixed $data 数据 - * @param array $options 参数 - * @return void - */ - public function mongoLog(string $type, $data, array $options = []) - { - if (!$this->config['trigger_sql']) { - return; - } - - if (is_array($data)) { - array_walk_recursive($data, function (&$value) { - if ($value instanceof ObjectID) { - $value = $value->__toString(); - } - }); - } - - switch (strtolower($type)) { - case 'aggregate': - $this->queryStr = 'runCommand(' . ($data ? json_encode($data) : '') . ');'; - break; - case 'find': - $this->queryStr = $type . '(' . ($data ? json_encode($data) : '') . ')'; - - if (isset($options['sort'])) { - $this->queryStr .= '.sort(' . json_encode($options['sort']) . ')'; - } - - if (isset($options['skip'])) { - $this->queryStr .= '.skip(' . $options['skip'] . ')'; - } - - if (isset($options['limit'])) { - $this->queryStr .= '.limit(' . $options['limit'] . ')'; - } - - $this->queryStr .= ';'; - break; - case 'insert': - case 'remove': - $this->queryStr = $type . '(' . ($data ? json_encode($data) : '') . ');'; - break; - case 'update': - $this->queryStr = $type . '(' . json_encode($options) . ',' . json_encode($data) . ');'; - break; - case 'cmd': - $this->queryStr = $data . '(' . json_encode($options) . ');'; - break; - } - - $this->options = $options; - } - - /** - * 获取最近执行的指令 - * @access public - * @return string - */ - public function getLastSql(): string - { - return $this->queryStr; - } - - /** - * 关闭数据库 - * @access public - */ - public function close() - { - $this->mongo = null; - $this->cursor = null; - $this->linkRead = null; - $this->linkWrite = null; - $this->links = []; - } - - /** - * 初始化数据库连接 - * @access protected - * @param boolean $master 是否主服务器 - * @return void - */ - protected function initConnect(bool $master = true): void - { - if (!empty($this->config['deploy'])) { - // 采用分布式数据库 - if ($master) { - if (!$this->linkWrite) { - $this->linkWrite = $this->multiConnect(true); - } - - $this->mongo = $this->linkWrite; - } else { - if (!$this->linkRead) { - $this->linkRead = $this->multiConnect(false); - } - - $this->mongo = $this->linkRead; - } - } elseif (!$this->mongo) { - // 默认单数据库 - $this->mongo = $this->connect(); - } - } - - /** - * 连接分布式服务器 - * @access protected - * @param boolean $master 主服务器 - * @return Manager - */ - protected function multiConnect(bool $master = false): Manager - { - $config = []; - // 分布式数据库配置解析 - foreach (['username', 'password', 'hostname', 'hostport', 'database', 'dsn'] as $name) { - $config[$name] = is_string($this->config[$name]) ? explode(',', $this->config[$name]) : $this->config[$name]; - } - - // 主服务器序号 - $m = floor(mt_rand(0, $this->config['master_num'] - 1)); - - if ($this->config['rw_separate']) { - // 主从式采用读写分离 - if ($master) // 主服务器写入 - { - if ($this->config['is_replica_set']) { - return $this->replicaSetConnect(); - } else { - $r = $m; - } - } elseif (is_numeric($this->config['slave_no'])) { - // 指定服务器读 - $r = $this->config['slave_no']; - } else { - // 读操作连接从服务器 每次随机连接的数据库 - $r = floor(mt_rand($this->config['master_num'], count($config['hostname']) - 1)); - } - } else { - // 读写操作不区分服务器 每次随机连接的数据库 - $r = floor(mt_rand(0, count($config['hostname']) - 1)); - } - - $dbConfig = []; - - foreach (['username', 'password', 'hostname', 'hostport', 'database', 'dsn'] as $name) { - $dbConfig[$name] = $config[$name][$r] ?? $config[$name][0]; - } - - return $this->connect($dbConfig, $r); - } - - /** - * 创建基于复制集的连接 - * @return Manager - */ - public function replicaSetConnect(): Manager - { - $this->dbName = $this->config['database']; - $this->typeMap = $this->config['type_map']; - - $startTime = microtime(true); - - $this->config['params']['replicaSet'] = $this->config['database']; - - $manager = new Manager($this->buildUrl(), $this->config['params']); - - // 记录数据库连接信息 - if (!empty($config['trigger_sql'])) { - $this->trigger('CONNECT:ReplicaSet[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $this->config['dsn']); - } - - return $manager; - } - - /** - * 根据配置信息 生成适用于连接复制集的 URL - * @return string - */ - private function buildUrl(): string - { - $url = 'mongodb://' . ($this->config['username'] ? "{$this->config['username']}" : '') . ($this->config['password'] ? ":{$this->config['password']}@" : ''); - - $hostList = is_string($this->config['hostname']) ? explode(',', $this->config['hostname']) : $this->config['hostname']; - $portList = is_string($this->config['hostport']) ? explode(',', $this->config['hostport']) : $this->config['hostport']; - - for ($i = 0; $i < count($hostList); $i++) { - $url = $url . $hostList[$i] . ':' . $portList[0] . ','; - } - - return rtrim($url, ",") . '/'; - } - - /** - * 插入记录 - * @access public - * @param BaseQuery $query 查询对象 - * @param boolean $getLastInsID 返回自增主键 - * @return mixed - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - * @throws BulkWriteException - */ - public function insert(BaseQuery $query, bool $getLastInsID = false) - { - // 分析查询表达式 - $options = $query->parseOptions(); - - if (empty($options['data'])) { - throw new Exception('miss data to insert'); - } - - // 生成bulk对象 - $bulk = $this->builder->insert($query); - - $writeResult = $this->mongoExecute($query, $bulk); - $result = $writeResult->getInsertedCount(); - - if ($result) { - $data = $options['data']; - $lastInsId = $this->getLastInsID($query); - - if ($lastInsId) { - $pk = $query->getPk(); - $data[$pk] = $lastInsId; - } - - $query->setOption('data', $data); - - $this->db->trigger('after_insert', $query); - - if ($getLastInsID) { - return $lastInsId; - } - } - - return $result; - } - - /** - * 获取最近插入的ID - * @access public - * @param BaseQuery $query 查询对象 - * @return mixed - */ - public function getLastInsID(BaseQuery $query) - { - $id = $this->builder->getLastInsID(); - - if (is_array($id)) { - array_walk($id, function (&$item, $key) { - if ($item instanceof ObjectID) { - $item = $item->__toString(); - } - }); - } elseif ($id instanceof ObjectID) { - $id = $id->__toString(); - } - - return $id; - } - - /** - * 批量插入记录 - * @access public - * @param BaseQuery $query 查询对象 - * @param array $dataSet 数据集 - * @return integer - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - * @throws BulkWriteException - */ - public function insertAll(BaseQuery $query, array $dataSet = []): int - { - // 分析查询表达式 - $query->parseOptions(); - - if (!is_array(reset($dataSet))) { - return 0; - } - - // 生成bulkWrite对象 - $bulk = $this->builder->insertAll($query, $dataSet); - - $writeResult = $this->mongoExecute($query, $bulk); - - return $writeResult->getInsertedCount(); - } - - /** - * 更新记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return int - * @throws Exception - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - * @throws BulkWriteException - */ - public function update(BaseQuery $query): int - { - $query->parseOptions(); - - // 生成bulkWrite对象 - $bulk = $this->builder->update($query); - - $writeResult = $this->mongoExecute($query, $bulk); - - $result = $writeResult->getModifiedCount(); - - if ($result) { - $this->db->trigger('after_update', $query); - } - - return $result; - } - - /** - * 删除记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return int - * @throws Exception - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - * @throws BulkWriteException - */ - public function delete(BaseQuery $query): int - { - // 分析查询表达式 - $query->parseOptions(); - - // 生成bulkWrite对象 - $bulk = $this->builder->delete($query); - - // 执行操作 - $writeResult = $this->mongoExecute($query, $bulk); - - $result = $writeResult->getDeletedCount(); - - if ($result) { - $this->db->trigger('after_delete', $query); - } - - return $result; - } - - /** - * 查找记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return array - * @throws ModelNotFoundException - * @throws DataNotFoundException - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - */ - public function select(BaseQuery $query): array - { - try { - $this->db->trigger('before_select', $query); - } catch (DbEventException $e) { - return []; - } - - return $this->mongoQuery($query, function ($query) { - return $this->builder->select($query); - }); - } - - /** - * 查找单条记录 - * @access public - * @param BaseQuery $query 查询对象 - * @return array - * @throws ModelNotFoundException - * @throws DataNotFoundException - * @throws AuthenticationException - * @throws InvalidArgumentException - * @throws ConnectionException - * @throws RuntimeException - */ - public function find(BaseQuery $query): array - { - // 事件回调 - try { - $this->db->trigger('before_find', $query); - } catch (DbEventException $e) { - return []; - } - - // 执行查询 - $resultSet = $this->mongoQuery($query, function ($query) { - return $this->builder->select($query, true); - }); - - return $resultSet[0] ?? []; - } - - /** - * 得到某个字段的值 - * @access public - * @param string $field 字段名 - * @param mixed $default 默认值 - * @return mixed - */ - public function value(BaseQuery $query, string $field, $default = null) - { - $options = $query->parseOptions(); - - if (isset($options['projection'])) { - $query->removeOption('projection'); - } - - $query->setOption('projection', (array) $field); - - if (!empty($options['cache'])) { - $cacheItem = $this->parseCache($query, $options['cache']); - $key = $cacheItem->getKey(); - - if ($this->cache->has($key)) { - return $this->cache->get($key); - } - } - - $mongoQuery = $this->builder->select($query, true); - - if (isset($options['projection'])) { - $query->setOption('projection', $options['projection']); - } else { - $query->removeOption('projection'); - } - - // 执行查询操作 - $resultSet = $this->mongoQuery($query, $mongoQuery); - - if (!empty($resultSet)) { - $data = array_shift($resultSet); - $result = $data[$field]; - } else { - $result = false; - } - - if (isset($cacheItem) && false !== $result) { - // 缓存数据 - $cacheItem->set($result); - $this->cacheData($cacheItem); - } - - return false !== $result ? $result : $default; - } - - /** - * 得到某个列的数组 - * @access public - * @param BaseQuery $query - * @param string|array $field 字段名 多个字段用逗号分隔 - * @param string $key 索引 - * @return array - */ - public function column(BaseQuery $query, $field, string $key = ''): array - { - $options = $query->parseOptions(); - - if (isset($options['projection'])) { - $query->removeOption('projection'); - } - - if (is_array($field)) { - $field = implode(',', $field); - } - if ($key && '*' != $field) { - $projection = $key . ',' . $field; - } else { - $projection = $field; - } - - $query->field($projection); - - if (!empty($options['cache'])) { - // 判断查询缓存 - $cacheItem = $this->parseCache($query, $options['cache']); - $key = $cacheItem->getKey(); - - if ($this->cache->has($key)) { - return $this->cache->get($key); - } - } - - $mongoQuery = $this->builder->select($query); - - if (isset($options['projection'])) { - $query->setOption('projection', $options['projection']); - } else { - $query->removeOption('projection'); - } - - // 执行查询操作 - $resultSet = $this->mongoQuery($query, $mongoQuery); - - if (('*' == $field || strpos($field, ',')) && $key) { - $result = array_column($resultSet, null, $key); - } elseif (!empty($resultSet)) { - $result = array_column($resultSet, $field, $key); - } else { - $result = []; - } - - if (isset($cacheItem)) { - // 缓存数据 - $cacheItem->set($result); - $this->cacheData($cacheItem); - } - - return $result; - } - - /** - * 执行command - * @access public - * @param BaseQuery $query 查询对象 - * @param string|array|object $command 指令 - * @param mixed $extra 额外参数 - * @param string $db 数据库名 - * @return array - */ - public function cmd(BaseQuery $query, $command, $extra = null, string $db = ''): array - { - if (is_array($command) || is_object($command)) { - - $this->mongoLog('cmd', 'cmd', $command); - - // 直接创建Command对象 - $command = new Command($command); - } else { - // 调用Builder封装的Command对象 - $command = $this->builder->$command($query, $extra); - } - - return $this->command($command, $db); - } - - /** - * 获取数据库字段 - * @access public - * @param mixed $tableName 数据表名 - * @return array - */ - public function getTableFields($tableName): array - { - return []; - } - - /** - * 执行数据库事务 - * @access public - * @param callable $callback 数据操作方法回调 - * @return mixed - * @throws PDOException - * @throws \Exception - * @throws \Throwable - */ - public function transaction(callable $callback) - { - $this->startTrans(); - try { - $result = null; - if (is_callable($callback)) { - $result = call_user_func_array($callback, [$this]); - } - $this->commit(); - return $result; - } catch (\Exception $e) { - $this->rollback(); - throw $e; - } catch (\Throwable $e) { - $this->rollback(); - throw $e; - } - } - - /** - * 启动事务 - * @access public - * @return void - * @throws \PDOException - * @throws \Exception - */ - public function startTrans() - { - $this->initConnect(true); - $this->session_uuid = uniqid(); - $this->sessions[$this->session_uuid] = $this->getMongo()->startSession(); - - $this->sessions[$this->session_uuid]->startTransaction([]); - } - - /** - * 用于非自动提交状态下面的查询提交 - * @access public - * @return void - * @throws PDOException - */ - public function commit() - { - if ($session = $this->getSession()) { - $session->commitTransaction(); - $this->setLastSession(); - } - } - - /** - * 事务回滚 - * @access public - * @return void - * @throws PDOException - */ - public function rollback() - { - if ($session = $this->getSession()) { - $session->abortTransaction(); - $this->setLastSession(); - } - } - - /** - * 结束当前会话,设置上一个会话为当前会话 - * @author klinson <klinson@163.com> - */ - protected function setLastSession() - { - if ($session = $this->getSession()) { - $session->endSession(); - unset($this->sessions[$this->session_uuid]); - if (empty($this->sessions)) { - $this->session_uuid = null; - } else { - end($this->sessions); - $this->session_uuid = key($this->sessions); - } - } - } - - /** - * 获取当前会话 - * @return \MongoDB\Driver\Session|null - * @author klinson <klinson@163.com> - */ - public function getSession() - { - return ($this->session_uuid && isset($this->sessions[$this->session_uuid])) - ? $this->sessions[$this->session_uuid] - : null; - } -} diff --git a/vendor/topthink/think-orm/src/db/connector/Mysql.php b/vendor/topthink/think-orm/src/db/connector/Mysql.php deleted file mode 100644 index fd9e63a..0000000 --- a/vendor/topthink/think-orm/src/db/connector/Mysql.php +++ /dev/null @@ -1,162 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\connector; - -use PDO; -use think\db\PDOConnection; - -/** - * mysql数据库驱动 - */ -class Mysql extends PDOConnection -{ - - /** - * 解析pdo连接的dsn信息 - * @access protected - * @param array $config 连接信息 - * @return string - */ - protected function parseDsn(array $config): string - { - if (!empty($config['socket'])) { - $dsn = 'mysql:unix_socket=' . $config['socket']; - } elseif (!empty($config['hostport'])) { - $dsn = 'mysql:host=' . $config['hostname'] . ';port=' . $config['hostport']; - } else { - $dsn = 'mysql:host=' . $config['hostname']; - } - $dsn .= ';dbname=' . $config['database']; - - if (!empty($config['charset'])) { - $dsn .= ';charset=' . $config['charset']; - } - - return $dsn; - } - - /** - * 取得数据表的字段信息 - * @access public - * @param string $tableName - * @return array - */ - public function getFields(string $tableName): array - { - [$tableName] = explode(' ', $tableName); - - if (false === strpos($tableName, '`')) { - if (strpos($tableName, '.')) { - $tableName = str_replace('.', '`.`', $tableName); - } - $tableName = '`' . $tableName . '`'; - } - - $sql = 'SHOW FULL COLUMNS FROM ' . $tableName; - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - if (!empty($result)) { - foreach ($result as $key => $val) { - $val = array_change_key_case($val); - - $info[$val['field']] = [ - 'name' => $val['field'], - 'type' => $val['type'], - 'notnull' => 'NO' == $val['null'], - 'default' => $val['default'], - 'primary' => strtolower($val['key']) == 'pri', - 'autoinc' => strtolower($val['extra']) == 'auto_increment', - 'comment' => $val['comment'], - ]; - } - } - - return $this->fieldCase($info); - } - - /** - * 取得数据库的表信息 - * @access public - * @param string $dbName - * @return array - */ - public function getTables(string $dbName = ''): array - { - $sql = !empty($dbName) ? 'SHOW TABLES FROM ' . $dbName : 'SHOW TABLES '; - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - foreach ($result as $key => $val) { - $info[$key] = current($val); - } - - return $info; - } - - protected function supportSavepoint(): bool - { - return true; - } - - /** - * 启动XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function startTransXa(string $xid): void - { - $this->initConnect(true); - $this->linkID->exec("XA START '$xid'"); - } - - /** - * 预编译XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function prepareXa(string $xid): void - { - $this->initConnect(true); - $this->linkID->exec("XA END '$xid'"); - $this->linkID->exec("XA PREPARE '$xid'"); - } - - /** - * 提交XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function commitXa(string $xid): void - { - $this->initConnect(true); - $this->linkID->exec("XA COMMIT '$xid'"); - } - - /** - * 回滚XA事务 - * @access public - * @param string $xid XA事务id - * @return void - */ - public function rollbackXa(string $xid): void - { - $this->initConnect(true); - $this->linkID->exec("XA ROLLBACK '$xid'"); - } -} diff --git a/vendor/topthink/think-orm/src/db/connector/Oracle.php b/vendor/topthink/think-orm/src/db/connector/Oracle.php deleted file mode 100644 index c8e957a..0000000 --- a/vendor/topthink/think-orm/src/db/connector/Oracle.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\db\connector; - -use PDO; -use think\db\BaseQuery; -use think\db\PDOConnection; - -/** - * Oracle数据库驱动 - */ -class Oracle extends PDOConnection -{ - /** - * 解析pdo连接的dsn信息 - * @access protected - * @param array $config 连接信息 - * @return string - */ - protected function parseDsn(array $config): string - { - $dsn = 'oci:dbname='; - - if (!empty($config['hostname'])) { - // Oracle Instant Client - $dsn .= '//' . $config['hostname'] . ($config['hostport'] ? ':' . $config['hostport'] : '') . '/'; - } - - $dsn .= $config['database']; - - if (!empty($config['charset'])) { - $dsn .= ';charset=' . $config['charset']; - } - - return $dsn; - } - - /** - * 取得数据表的字段信息 - * @access public - * @param string $tableName - * @return array - */ - public function getFields(string $tableName): array - { - [$tableName] = explode(' ', $tableName); - $sql = "select a.column_name,data_type,DECODE (nullable, 'Y', 0, 1) notnull,data_default, DECODE (A .column_name,b.column_name,1,0) pk from all_tab_columns a,(select column_name from all_constraints c, all_cons_columns col where c.constraint_name = col.constraint_name and c.constraint_type = 'P' and c.table_name = '" . $tableName . "' ) b where table_name = '" . $tableName . "' and a.column_name = b.column_name (+)"; - - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - if ($result) { - foreach ($result as $key => $val) { - $val = array_change_key_case($val); - - $info[$val['column_name']] = [ - 'name' => $val['column_name'], - 'type' => $val['data_type'], - 'notnull' => $val['notnull'], - 'default' => $val['data_default'], - 'primary' => $val['pk'], - 'autoinc' => $val['pk'], - ]; - } - } - - return $this->fieldCase($info); - } - - /** - * 取得数据库的表信息(暂时实现取得用户表信息) - * @access public - * @param string $dbName - * @return array - */ - public function getTables(string $dbName = ''): array - { - $sql = 'select table_name from all_tables'; - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - foreach ($result as $key => $val) { - $info[$key] = current($val); - } - - return $info; - } - - /** - * 获取最近插入的ID - * @access public - * @param BaseQuery $query 查询对象 - * @param string|null $sequence 自增序列名 - * @return mixed - */ - public function getLastInsID(BaseQuery $query, string $sequence = null) - { - if(!is_null($sequence)) { - $pdo = $this->linkID->query("select {$sequence}.currval as id from dual"); - $result = $pdo->fetchColumn(); - } - - return $result ?? null; - } - - protected function supportSavepoint(): bool - { - return true; - } -} diff --git a/vendor/topthink/think-orm/src/db/connector/Pgsql.php b/vendor/topthink/think-orm/src/db/connector/Pgsql.php deleted file mode 100644 index fec8f84..0000000 --- a/vendor/topthink/think-orm/src/db/connector/Pgsql.php +++ /dev/null @@ -1,108 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\db\connector; - -use PDO; -use think\db\PDOConnection; - -/** - * Pgsql数据库驱动 - */ -class Pgsql extends PDOConnection -{ - - /** - * 默认PDO连接参数 - * @var array - */ - protected $params = [ - PDO::ATTR_CASE => PDO::CASE_NATURAL, - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, - PDO::ATTR_STRINGIFY_FETCHES => false, - ]; - - /** - * 解析pdo连接的dsn信息 - * @access protected - * @param array $config 连接信息 - * @return string - */ - protected function parseDsn(array $config): string - { - $dsn = 'pgsql:dbname=' . $config['database'] . ';host=' . $config['hostname']; - - if (!empty($config['hostport'])) { - $dsn .= ';port=' . $config['hostport']; - } - - return $dsn; - } - - /** - * 取得数据表的字段信息 - * @access public - * @param string $tableName - * @return array - */ - public function getFields(string $tableName): array - { - [$tableName] = explode(' ', $tableName); - $sql = 'select fields_name as "field",fields_type as "type",fields_not_null as "null",fields_key_name as "key",fields_default as "default",fields_default as "extra" from table_msg(\'' . $tableName . '\');'; - - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - if (!empty($result)) { - foreach ($result as $key => $val) { - $val = array_change_key_case($val); - - $info[$val['field']] = [ - 'name' => $val['field'], - 'type' => $val['type'], - 'notnull' => (bool) ('' !== $val['null']), - 'default' => $val['default'], - 'primary' => !empty($val['key']), - 'autoinc' => (0 === strpos($val['extra'], 'nextval(')), - ]; - } - } - - return $this->fieldCase($info); - } - - /** - * 取得数据库的表信息 - * @access public - * @param string $dbName - * @return array - */ - public function getTables(string $dbName = ''): array - { - $sql = "select tablename as Tables_in_test from pg_tables where schemaname ='public'"; - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - foreach ($result as $key => $val) { - $info[$key] = current($val); - } - - return $info; - } - - protected function supportSavepoint(): bool - { - return true; - } -} diff --git a/vendor/topthink/think-orm/src/db/connector/Sqlite.php b/vendor/topthink/think-orm/src/db/connector/Sqlite.php deleted file mode 100644 index 3e42a90..0000000 --- a/vendor/topthink/think-orm/src/db/connector/Sqlite.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\db\connector; - -use PDO; -use think\db\PDOConnection; - -/** - * Sqlite数据库驱动 - */ -class Sqlite extends PDOConnection -{ - - /** - * 解析pdo连接的dsn信息 - * @access protected - * @param array $config 连接信息 - * @return string - */ - protected function parseDsn(array $config): string - { - $dsn = 'sqlite:' . $config['database']; - - return $dsn; - } - - /** - * 取得数据表的字段信息 - * @access public - * @param string $tableName - * @return array - */ - public function getFields(string $tableName): array - { - [$tableName] = explode(' ', $tableName); - $sql = 'PRAGMA table_info( \'' . $tableName . '\' )'; - - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - if (!empty($result)) { - foreach ($result as $key => $val) { - $val = array_change_key_case($val); - - $info[$val['name']] = [ - 'name' => $val['name'], - 'type' => $val['type'], - 'notnull' => 1 === $val['notnull'], - 'default' => $val['dflt_value'], - 'primary' => '1' == $val['pk'], - 'autoinc' => '1' == $val['pk'], - ]; - } - } - - return $this->fieldCase($info); - } - - /** - * 取得数据库的表信息 - * @access public - * @param string $dbName - * @return array - */ - public function getTables(string $dbName = ''): array - { - $sql = "SELECT name FROM sqlite_master WHERE type='table' " - . "UNION ALL SELECT name FROM sqlite_temp_master " - . "WHERE type='table' ORDER BY name"; - - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - foreach ($result as $key => $val) { - $info[$key] = current($val); - } - - return $info; - } - - protected function supportSavepoint(): bool - { - return true; - } -} diff --git a/vendor/topthink/think-orm/src/db/connector/Sqlsrv.php b/vendor/topthink/think-orm/src/db/connector/Sqlsrv.php deleted file mode 100644 index 835605d..0000000 --- a/vendor/topthink/think-orm/src/db/connector/Sqlsrv.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\db\connector; - -use PDO; -use think\db\PDOConnection; - -/** - * Sqlsrv数据库驱动 - */ -class Sqlsrv extends PDOConnection -{ - /** - * 默认PDO连接参数 - * @var array - */ - protected $params = [ - PDO::ATTR_CASE => PDO::CASE_NATURAL, - PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, - PDO::ATTR_STRINGIFY_FETCHES => false, - ]; - - /** - * 解析pdo连接的dsn信息 - * @access protected - * @param array $config 连接信息 - * @return string - */ - protected function parseDsn(array $config): string - { - $dsn = 'sqlsrv:Database=' . $config['database'] . ';Server=' . $config['hostname']; - - if (!empty($config['hostport'])) { - $dsn .= ',' . $config['hostport']; - } - - if (!empty($config['trust_server_certificate'])) { - $dsn .= ';TrustServerCertificate=' . $config['trust_server_certificate']; - } - - return $dsn; - } - - /** - * 取得数据表的字段信息 - * @access public - * @param string $tableName - * @return array - */ - public function getFields(string $tableName): array - { - [$tableName] = explode(' ', $tableName); - strpos($tableName, '.') && $tableName = substr($tableName, strpos($tableName, '.') + 1); - $sql = "SELECT column_name, data_type, column_default, is_nullable - FROM information_schema.tables AS t - JOIN information_schema.columns AS c - ON t.table_catalog = c.table_catalog - AND t.table_schema = c.table_schema - AND t.table_name = c.table_name - WHERE t.table_name = '$tableName'"; - - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - if (!empty($result)) { - foreach ($result as $key => $val) { - $val = array_change_key_case($val); - - $info[$val['column_name']] = [ - 'name' => $val['column_name'], - 'type' => $val['data_type'], - 'notnull' => (bool) ('' === $val['is_nullable']), // not null is empty, null is yes - 'default' => $val['column_default'], - 'primary' => false, - 'autoinc' => false, - ]; - } - } - - $sql = "SELECT column_name FROM information_schema.key_column_usage WHERE table_name='$tableName'"; - $pdo = $this->linkID->query($sql); - $result = $pdo->fetch(PDO::FETCH_ASSOC); - - if ($result) { - $info[$result['column_name']]['primary'] = true; - } - - return $this->fieldCase($info); - } - - /** - * 取得数据表的字段信息 - * @access public - * @param string $dbName - * @return array - */ - public function getTables(string $dbName = ''): array - { - $sql = "SELECT TABLE_NAME - FROM INFORMATION_SCHEMA.TABLES - WHERE TABLE_TYPE = 'BASE TABLE' - "; - - $pdo = $this->getPDOStatement($sql); - $result = $pdo->fetchAll(PDO::FETCH_ASSOC); - $info = []; - - foreach ($result as $key => $val) { - $info[$key] = current($val); - } - - return $info; - } - -} diff --git a/vendor/topthink/think-orm/src/db/connector/pgsql.sql b/vendor/topthink/think-orm/src/db/connector/pgsql.sql deleted file mode 100644 index e1a09a3..0000000 --- a/vendor/topthink/think-orm/src/db/connector/pgsql.sql +++ /dev/null @@ -1,117 +0,0 @@ -CREATE OR REPLACE FUNCTION pgsql_type(a_type varchar) RETURNS varchar AS -$BODY$ -DECLARE - v_type varchar; -BEGIN - IF a_type='int8' THEN - v_type:='bigint'; - ELSIF a_type='int4' THEN - v_type:='integer'; - ELSIF a_type='int2' THEN - v_type:='smallint'; - ELSIF a_type='bpchar' THEN - v_type:='char'; - ELSE - v_type:=a_type; - END IF; - RETURN v_type; -END; -$BODY$ -LANGUAGE PLPGSQL; - -CREATE TYPE "public"."tablestruct" AS ( - "fields_key_name" varchar(100), - "fields_name" VARCHAR(200), - "fields_type" VARCHAR(20), - "fields_length" BIGINT, - "fields_not_null" VARCHAR(10), - "fields_default" VARCHAR(500), - "fields_comment" VARCHAR(1000) -); - -CREATE OR REPLACE FUNCTION "public"."table_msg" (a_schema_name varchar, a_table_name varchar) RETURNS SETOF "public"."tablestruct" AS -$body$ -DECLARE - v_ret tablestruct; - v_oid oid; - v_sql varchar; - v_rec RECORD; - v_key varchar; -BEGIN - SELECT - pg_class.oid INTO v_oid - FROM - pg_class - INNER JOIN pg_namespace ON (pg_class.relnamespace = pg_namespace.oid AND lower(pg_namespace.nspname) = a_schema_name) - WHERE - pg_class.relname=a_table_name; - IF NOT FOUND THEN - RETURN; - END IF; - - v_sql=' - SELECT - pg_attribute.attname AS fields_name, - pg_attribute.attnum AS fields_index, - pgsql_type(pg_type.typname::varchar) AS fields_type, - pg_attribute.atttypmod-4 as fields_length, - CASE WHEN pg_attribute.attnotnull THEN ''not null'' - ELSE '''' - END AS fields_not_null, - pg_attrdef.adsrc AS fields_default, - pg_description.description AS fields_comment - FROM - pg_attribute - INNER JOIN pg_class ON pg_attribute.attrelid = pg_class.oid - INNER JOIN pg_type ON pg_attribute.atttypid = pg_type.oid - LEFT OUTER JOIN pg_attrdef ON pg_attrdef.adrelid = pg_class.oid AND pg_attrdef.adnum = pg_attribute.attnum - LEFT OUTER JOIN pg_description ON pg_description.objoid = pg_class.oid AND pg_description.objsubid = pg_attribute.attnum - WHERE - pg_attribute.attnum > 0 - AND attisdropped <> ''t'' - AND pg_class.oid = ' || v_oid || ' - ORDER BY pg_attribute.attnum' ; - - FOR v_rec IN EXECUTE v_sql LOOP - v_ret.fields_name=v_rec.fields_name; - v_ret.fields_type=v_rec.fields_type; - IF v_rec.fields_length > 0 THEN - v_ret.fields_length:=v_rec.fields_length; - ELSE - v_ret.fields_length:=NULL; - END IF; - v_ret.fields_not_null=v_rec.fields_not_null; - v_ret.fields_default=v_rec.fields_default; - v_ret.fields_comment=v_rec.fields_comment; - SELECT constraint_name INTO v_key FROM information_schema.key_column_usage WHERE table_schema=a_schema_name AND table_name=a_table_name AND column_name=v_rec.fields_name; - IF FOUND THEN - v_ret.fields_key_name=v_key; - ELSE - v_ret.fields_key_name=''; - END IF; - RETURN NEXT v_ret; - END LOOP; - RETURN ; -END; -$body$ -LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; - -COMMENT ON FUNCTION "public"."table_msg"(a_schema_name varchar, a_table_name varchar) -IS '获得表信息'; - ----重载一个函数 -CREATE OR REPLACE FUNCTION "public"."table_msg" (a_table_name varchar) RETURNS SETOF "public"."tablestruct" AS -$body$ -DECLARE - v_ret tablestruct; -BEGIN - FOR v_ret IN SELECT * FROM table_msg('public',a_table_name) LOOP - RETURN NEXT v_ret; - END LOOP; - RETURN; -END; -$body$ -LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; - -COMMENT ON FUNCTION "public"."table_msg"(a_table_name varchar) -IS '获得表信息'; \ No newline at end of file diff --git a/vendor/topthink/think-orm/src/db/exception/BindParamException.php b/vendor/topthink/think-orm/src/db/exception/BindParamException.php deleted file mode 100644 index 08bb388..0000000 --- a/vendor/topthink/think-orm/src/db/exception/BindParamException.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\exception; - -/** - * PDO参数绑定异常 - */ -class BindParamException extends DbException -{ - - /** - * BindParamException constructor. - * @access public - * @param string $message - * @param array $config - * @param string $sql - * @param array $bind - * @param int $code - */ - public function __construct(string $message, array $config, string $sql, array $bind, int $code = 10502) - { - $this->setData('Bind Param', $bind); - parent::__construct($message, $config, $sql, $code); - } -} diff --git a/vendor/topthink/think-orm/src/db/exception/DataNotFoundException.php b/vendor/topthink/think-orm/src/db/exception/DataNotFoundException.php deleted file mode 100644 index d10dd43..0000000 --- a/vendor/topthink/think-orm/src/db/exception/DataNotFoundException.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\exception; - -class DataNotFoundException extends DbException -{ - protected $table; - - /** - * DbException constructor. - * @access public - * @param string $message - * @param string $table - * @param array $config - */ - public function __construct(string $message, string $table = '', array $config = []) - { - $this->message = $message; - $this->table = $table; - - $this->setData('Database Config', $config); - } - - /** - * 获取数据表名 - * @access public - * @return string - */ - public function getTable() - { - return $this->table; - } -} diff --git a/vendor/topthink/think-orm/src/db/exception/DbEventException.php b/vendor/topthink/think-orm/src/db/exception/DbEventException.php deleted file mode 100644 index 394a1e8..0000000 --- a/vendor/topthink/think-orm/src/db/exception/DbEventException.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\db\exception; - -/** - * Db事件异常 - */ -class DbEventException extends DbException -{ -} diff --git a/vendor/topthink/think-orm/src/db/exception/DbException.php b/vendor/topthink/think-orm/src/db/exception/DbException.php deleted file mode 100644 index f68b21c..0000000 --- a/vendor/topthink/think-orm/src/db/exception/DbException.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\exception; - -use think\Exception; - -/** - * Database相关异常处理类 - */ -class DbException extends Exception -{ - /** - * DbException constructor. - * @access public - * @param string $message - * @param array $config - * @param string $sql - * @param int $code - */ - public function __construct(string $message, array $config = [], string $sql = '', int $code = 10500) - { - $this->message = $message; - $this->code = $code; - - $this->setData('Database Status', [ - 'Error Code' => $code, - 'Error Message' => $message, - 'Error SQL' => $sql, - ]); - - unset($config['username'], $config['password']); - $this->setData('Database Config', $config); - } -} diff --git a/vendor/topthink/think-orm/src/db/exception/InvalidArgumentException.php b/vendor/topthink/think-orm/src/db/exception/InvalidArgumentException.php deleted file mode 100644 index 047e45e..0000000 --- a/vendor/topthink/think-orm/src/db/exception/InvalidArgumentException.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); -namespace think\db\exception; - -use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInvalidArgumentInterface; - -/** - * 非法数据异常 - */ -class InvalidArgumentException extends \InvalidArgumentException implements SimpleCacheInvalidArgumentInterface -{ -} diff --git a/vendor/topthink/think-orm/src/db/exception/ModelEventException.php b/vendor/topthink/think-orm/src/db/exception/ModelEventException.php deleted file mode 100644 index 767bc1a..0000000 --- a/vendor/topthink/think-orm/src/db/exception/ModelEventException.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\db\exception; - -/** - * 模型事件异常 - */ -class ModelEventException extends DbException -{ -} diff --git a/vendor/topthink/think-orm/src/db/exception/ModelNotFoundException.php b/vendor/topthink/think-orm/src/db/exception/ModelNotFoundException.php deleted file mode 100644 index 84a1525..0000000 --- a/vendor/topthink/think-orm/src/db/exception/ModelNotFoundException.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\exception; - -class ModelNotFoundException extends DbException -{ - protected $model; - - /** - * 构造方法 - * @access public - * @param string $message - * @param string $model - * @param array $config - */ - public function __construct(string $message, string $model = '', array $config = []) - { - $this->message = $message; - $this->model = $model; - - $this->setData('Database Config', $config); - } - - /** - * 获取模型类名 - * @access public - * @return string - */ - public function getModel() - { - return $this->model; - } - -} diff --git a/vendor/topthink/think-orm/src/db/exception/PDOException.php b/vendor/topthink/think-orm/src/db/exception/PDOException.php deleted file mode 100644 index efe78b9..0000000 --- a/vendor/topthink/think-orm/src/db/exception/PDOException.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://zjzit.cn> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\db\exception; - -/** - * PDO异常处理类 - * 重新封装了系统的\PDOException类 - */ -class PDOException extends DbException -{ - /** - * PDOException constructor. - * @access public - * @param \PDOException $exception - * @param array $config - * @param string $sql - * @param int $code - */ - public function __construct(\PDOException $exception, array $config = [], string $sql = '', int $code = 10501) - { - $error = $exception->errorInfo; - $message = $exception->getMessage(); - - if (!empty($error)) { - $this->setData('PDO Error Info', [ - 'SQLSTATE' => $error[0], - 'Driver Error Code' => isset($error[1]) ? $error[1] : 0, - 'Driver Error Message' => isset($error[2]) ? $error[2] : '', - ]); - } - - parent::__construct($message, $config, $sql, $code); - } -} diff --git a/vendor/topthink/think-orm/src/facade/Db.php b/vendor/topthink/think-orm/src/facade/Db.php deleted file mode 100644 index b0296c6..0000000 --- a/vendor/topthink/think-orm/src/facade/Db.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\facade; - -use think\Facade; - -/** - * @see \think\DbManager - * @mixin \think\DbManager - */ -class Db extends Facade -{ - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'think\DbManager'; - } -} diff --git a/vendor/topthink/think-orm/src/model/Collection.php b/vendor/topthink/think-orm/src/model/Collection.php deleted file mode 100644 index 079e856..0000000 --- a/vendor/topthink/think-orm/src/model/Collection.php +++ /dev/null @@ -1,273 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: zhangyajun <448901948@qq.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model; - -use think\Collection as BaseCollection; -use think\Model; -use think\Paginator; - -/** - * 模型数据集类 - * - * @template TKey of array-key - * @template TModel of \think\Model - * - * @extends BaseCollection<TKey, TModel> - */ -class Collection extends BaseCollection -{ - /** - * 延迟预载入关联查询 - * @access public - * @param array|string $relation 关联 - * @param mixed $cache 关联缓存 - * @return $this - */ - public function load($relation, $cache = false) - { - if (!$this->isEmpty()) { - $item = current($this->items); - $item->eagerlyResultSet($this->items, (array) $relation, [], false, $cache); - } - - return $this; - } - - /** - * 删除数据集的数据 - * @access public - * @return bool - */ - public function delete(): bool - { - $this->each(function (Model $model) { - $model->delete(); - }); - - return true; - } - - /** - * 更新数据 - * @access public - * @param array $data 数据数组 - * @param array $allowField 允许字段 - * @return bool - */ - public function update(array $data, array $allowField = []): bool - { - $this->each(function (Model $model) use ($data, $allowField) { - if (!empty($allowField)) { - $model->allowField($allowField); - } - - $model->save($data); - }); - - return true; - } - - /** - * 设置需要隐藏的输出属性 - * @access public - * @param array $hidden 属性列表 - * @param bool $merge 是否合并 - * @return $this - */ - public function hidden(array $hidden, bool $merge = false) - { - $this->each(function (Model $model) use ($hidden, $merge) { - $model->hidden($hidden, $merge); - }); - - return $this; - } - - /** - * 设置需要输出的属性 - * @access public - * @param array $visible - * @param bool $merge 是否合并 - * @return $this - */ - public function visible(array $visible, bool $merge = false) - { - $this->each(function (Model $model) use ($visible, $merge) { - $model->visible($visible, $merge); - }); - - return $this; - } - - /** - * 设置需要追加的输出属性 - * @access public - * @param array $append 属性列表 - * @param bool $merge 是否合并 - * @return $this - */ - public function append(array $append, bool $merge = false) - { - $this->each(function (Model $model) use ($append, $merge) { - $model->append($append, $merge); - }); - - return $this; - } - - /** - * 设置模型输出场景 - * @access public - * @param string $scene 场景名称 - * @return $this - */ - public function scene(string $scene) - { - $this->each(function (Model $model) use ($scene) { - $model->scene($scene); - }); - - return $this; - } - - /** - * 设置父模型 - * @access public - * @param Model $parent 父模型 - * @return $this - */ - public function setParent(Model $parent) - { - $this->each(function (Model $model) use ($parent) { - $model->setParent($parent); - }); - - return $this; - } - - /** - * 设置数据字段获取器 - * @access public - * @param string|array $name 字段名 - * @param callable $callback 闭包获取器 - * @return $this - */ - public function withAttr($name, $callback = null) - { - $this->each(function (Model $model) use ($name, $callback) { - $model->withAttr($name, $callback); - }); - - return $this; - } - - /** - * 绑定(一对一)关联属性到当前模型 - * @access protected - * @param string $relation 关联名称 - * @param array $attrs 绑定属性 - * @return $this - * @throws Exception - */ - public function bindAttr(string $relation, array $attrs = []) - { - $this->each(function (Model $model) use ($relation, $attrs) { - $model->bindAttr($relation, $attrs); - }); - - return $this; - } - - /** - * 按指定键整理数据 - * - * @access public - * @param mixed $items 数据 - * @param string|null $indexKey 键名 - * @return array - */ - public function dictionary($items = null, string &$indexKey = null) - { - if ($items instanceof self || $items instanceof Paginator) { - $items = $items->all(); - } - - $items = is_null($items) ? $this->items : $items; - - if ($items && empty($indexKey)) { - $indexKey = $items[0]->getPk(); - } - - if (isset($indexKey) && is_string($indexKey)) { - return array_column($items, null, $indexKey); - } - - return $items; - } - - /** - * 比较数据集,返回差集 - * - * @access public - * @param mixed $items 数据 - * @param string|null $indexKey 指定比较的键名 - * @return static - */ - public function diff($items, string $indexKey = null) - { - if ($this->isEmpty()) { - return new static($items); - } - - $diff = []; - $dictionary = $this->dictionary($items, $indexKey); - - if (is_string($indexKey)) { - foreach ($this->items as $item) { - if (!isset($dictionary[$item[$indexKey]])) { - $diff[] = $item; - } - } - } - - return new static($diff); - } - - /** - * 比较数据集,返回交集 - * - * @access public - * @param mixed $items 数据 - * @param string|null $indexKey 指定比较的键名 - * @return static - */ - public function intersect($items, string $indexKey = null) - { - if ($this->isEmpty()) { - return new static([]); - } - - $intersect = []; - $dictionary = $this->dictionary($items, $indexKey); - - if (is_string($indexKey)) { - foreach ($this->items as $item) { - if (isset($dictionary[$item[$indexKey]])) { - $intersect[] = $item; - } - } - } - - return new static($intersect); - } -} diff --git a/vendor/topthink/think-orm/src/model/Pivot.php b/vendor/topthink/think-orm/src/model/Pivot.php deleted file mode 100644 index ac16d9e..0000000 --- a/vendor/topthink/think-orm/src/model/Pivot.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model; - -use think\Model; - -/** - * 多对多中间表模型类 - */ -class Pivot extends Model -{ - - /** - * 父模型 - * @var Model - */ - public $parent; - - /** - * 是否时间自动写入 - * @var bool - */ - protected $autoWriteTimestamp = false; - - /** - * 架构函数 - * @access public - * @param array $data 数据 - * @param Model|null $parent 上级模型 - * @param string $table 中间数据表名 - */ - public function __construct(array $data = [], Model $parent = null, string $table = '') - { - $this->parent = $parent; - - if (is_null($this->name)) { - $this->name = $table; - } - - parent::__construct($data); - } - - /** - * 创建新的模型实例 - * @access public - * @param array $data 数据 - * @param mixed $where 更新条件 - * @param array $options 参数 - * @return Model - */ - public function newInstance(array $data = [], $where = null, array $options = []): Model - { - $model = parent::newInstance($data, $where, $options); - - $model->parent = $this->parent; - $model->name = $this->name; - - return $model; - } -} diff --git a/vendor/topthink/think-orm/src/model/Relation.php b/vendor/topthink/think-orm/src/model/Relation.php deleted file mode 100644 index 7bb6d9f..0000000 --- a/vendor/topthink/think-orm/src/model/Relation.php +++ /dev/null @@ -1,313 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model; - -use Closure; -use ReflectionFunction; -use think\db\BaseQuery as Query; -use think\db\exception\DbException as Exception; -use think\Model; - -/** - * 模型关联基础类 - * @package think\model - * @mixin Query - */ -abstract class Relation -{ - /** - * 父模型对象 - * @var Model - */ - protected $parent; - - /** - * 当前关联的模型类名 - * @var string - */ - protected $model; - - /** - * 关联模型查询对象 - * @var Query - */ - protected $query; - - /** - * 关联表外键 - * @var string - */ - protected $foreignKey; - - /** - * 关联表主键 - * @var string - */ - protected $localKey; - - /** - * 是否执行关联基础查询 - * @var bool - */ - protected $baseQuery; - - /** - * 是否为自关联 - * @var bool - */ - protected $selfRelation = false; - - /** - * 关联数据字段限制 - * @var array - */ - protected $withField; - - /** - * 排除关联数据字段 - * @var array - */ - protected $withoutField; - - /** - * 默认数据 - * @var mixed - */ - protected $default; - - /** - * 获取关联的所属模型 - * @access public - * @return Model - */ - public function getParent(): Model - { - return $this->parent; - } - - /** - * 获取当前的关联模型类的Query实例 - * @access public - * @return Query - */ - public function getQuery() - { - return $this->query; - } - - /** - * 获取关联表外键 - * @access public - * @return string - */ - public function getForeignKey() - { - return $this->foreignKey; - } - - /** - * 获取关联表主键 - * @access public - * @return string - */ - public function getLocalKey() - { - return $this->localKey; - } - - /** - * 获取当前的关联模型类的实例 - * @access public - * @return Model - */ - public function getModel(): Model - { - return $this->query->getModel(); - } - - /** - * 当前关联是否为自关联 - * @access public - * @return bool - */ - public function isSelfRelation(): bool - { - return $this->selfRelation; - } - - /** - * 封装关联数据集 - * @access public - * @param array $resultSet 数据集 - * @param Model $parent 父模型 - * @return mixed - */ - protected function resultSetBuild(array $resultSet, Model $parent = null) - { - return (new $this->model)->toCollection($resultSet)->setParent($parent); - } - - protected function getQueryFields(string $model) - { - $fields = $this->query->getOptions('field'); - return $this->getRelationQueryFields($fields, $model); - } - - protected function getRelationQueryFields($fields, string $model) - { - if (empty($fields) || '*' == $fields) { - return $model . '.*'; - } - - if (is_string($fields)) { - $fields = explode(',', $fields); - } - - foreach ($fields as &$field) { - if (false === strpos($field, '.')) { - $field = $model . '.' . $field; - } - } - - return $fields; - } - - protected function getQueryWhere(array &$where, string $relation): void - { - foreach ($where as $key => &$val) { - if (is_string($key)) { - $where[] = [false === strpos($key, '.') ? $relation . '.' . $key : $key, '=', $val]; - unset($where[$key]); - } elseif (isset($val[0]) && false === strpos($val[0], '.')) { - $val[0] = $relation . '.' . $val[0]; - } - } - } - - /** - * 限制关联数据的字段 - * @access public - * @param array|string $field 关联字段限制 - * @return $this - */ - public function withField($field) - { - if (is_string($field)) { - $field = array_map('trim', explode(',', $field)); - } - - $this->withField = $field; - return $this; - } - - /** - * 排除关联数据的字段 - * @access public - * @param array|string $field 关联字段限制 - * @return $this - */ - public function withoutField($field) - { - if (is_string($field)) { - $field = array_map('trim', explode(',', $field)); - } - - $this->withoutField = $field; - return $this; - } - - /** - * 限制关联数据的数量 - * @access public - * @param int $limit 关联数量限制 - * @return $this - */ - public function withLimit(int $limit) - { - $this->query->limit($limit); - return $this; - } - - /** - * 设置关联数据不存在的时候默认值 - * @access public - * @param mixed $data 默认值 - * @return $this - */ - public function withDefault($data = null) - { - $this->default = $data; - return $this; - } - - /** - * 获取关联数据默认值 - * @access protected - * @return mixed - */ - protected function getDefaultModel() - { - if (is_array($this->default)) { - $model = (new $this->model)->data($this->default); - } elseif ($this->default instanceof Closure) { - $closure = $this->default; - $model = new $this->model; - $closure($model); - } else { - $model = $this->default; - } - - return $model; - } - - /** - * 判断闭包的参数类型 - * @access protected - * @return mixed - */ - protected function getClosureType(Closure $closure, $query = null) - { - $reflect = new ReflectionFunction($closure); - $params = $reflect->getParameters(); - - if (!empty($params)) { - $type = $params[0]->getType(); - $query = $query ?: $this->query; - return is_null($type) || Relation::class == $type->getName() ? $this : $query; - } - - return $this; - } - - /** - * 执行基础查询(仅执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - {} - - public function __call($method, $args) - { - if ($this->query) { - // 执行基础查询 - $this->baseQuery(); - - $result = call_user_func_array([$this->query, $method], $args); - - return $result === $this->query ? $this : $result; - } - - throw new Exception('method not exists:' . __CLASS__ . '->' . $method); - } -} diff --git a/vendor/topthink/think-orm/src/model/concern/Attribute.php b/vendor/topthink/think-orm/src/model/concern/Attribute.php deleted file mode 100644 index 4359a4c..0000000 --- a/vendor/topthink/think-orm/src/model/concern/Attribute.php +++ /dev/null @@ -1,678 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\concern; - -use InvalidArgumentException; -use think\db\Raw; -use think\helper\Str; -use think\model\Relation; - -/** - * 模型数据处理 - */ -trait Attribute -{ - /** - * 数据表主键 复合主键使用数组定义 - * @var string|array - */ - protected $pk = 'id'; - - /** - * 数据表字段信息 留空则自动获取 - * @var array - */ - protected $schema = []; - - /** - * 当前允许写入的字段 - * @var array - */ - protected $field = []; - - /** - * 字段自动类型转换 - * @var array - */ - protected $type = []; - - /** - * 数据表废弃字段 - * @var array - */ - protected $disuse = []; - - /** - * 数据表只读字段 - * @var array - */ - protected $readonly = []; - - /** - * 当前模型数据 - * @var array - */ - private $data = []; - - /** - * 原始数据 - * @var array - */ - private $origin = []; - - /** - * JSON数据表字段 - * @var array - */ - protected $json = []; - - /** - * JSON数据表字段类型 - * @var array - */ - protected $jsonType = []; - - /** - * JSON数据取出是否需要转换为数组 - * @var bool - */ - protected $jsonAssoc = false; - - /** - * 是否严格字段大小写 - * @var bool - */ - protected $strict = true; - - /** - * 获取器数据 - * @var array - */ - private $get = []; - - /** - * 动态获取器 - * @var array - */ - private $withAttr = []; - - /** - * 获取模型对象的主键 - * @access public - * @return string|array - */ - public function getPk() - { - return $this->pk; - } - - /** - * 判断一个字段名是否为主键字段 - * @access public - * @param string $key 名称 - * @return bool - */ - protected function isPk(string $key): bool - { - $pk = $this->getPk(); - - if (is_string($pk) && $pk == $key) { - return true; - } elseif (is_array($pk) && in_array($key, $pk)) { - return true; - } - - return false; - } - - /** - * 获取模型对象的主键值 - * @access public - * @return mixed - */ - public function getKey() - { - $pk = $this->getPk(); - - if (is_string($pk) && array_key_exists($pk, $this->data)) { - return $this->data[$pk]; - } - - return; - } - - /** - * 设置允许写入的字段 - * @access public - * @param array $field 允许写入的字段 - * @return $this - */ - public function allowField(array $field) - { - $this->field = $field; - - return $this; - } - - /** - * 设置只读字段 - * @access public - * @param array $field 只读字段 - * @return $this - */ - public function readOnly(array $field) - { - $this->readonly = $field; - - return $this; - } - - /** - * 获取实际的字段名 - * @access protected - * @param string $name 字段名 - * @return string - */ - protected function getRealFieldName(string $name): string - { - if ($this->convertNameToCamel || !$this->strict) { - return Str::snake($name); - } - - return $name; - } - - /** - * 设置数据对象值 - * @access public - * @param array $data 数据 - * @param bool $set 是否调用修改器 - * @param array $allow 允许的字段名 - * @return $this - */ - public function data(array $data, bool $set = false, array $allow = []) - { - // 清空数据 - $this->data = []; - - // 废弃字段 - foreach ($this->disuse as $key) { - if (array_key_exists($key, $data)) { - unset($data[$key]); - } - } - - if (!empty($allow)) { - $result = []; - foreach ($allow as $name) { - if (isset($data[$name])) { - $result[$name] = $data[$name]; - } - } - $data = $result; - } - - if ($set) { - // 数据对象赋值 - $this->setAttrs($data); - } else { - $this->data = $data; - } - - return $this; - } - - /** - * 批量追加数据对象值 - * @access public - * @param array $data 数据 - * @param bool $set 是否需要进行数据处理 - * @return $this - */ - public function appendData(array $data, bool $set = false) - { - if ($set) { - $this->setAttrs($data); - } else { - $this->data = array_merge($this->data, $data); - } - - return $this; - } - - /** - * 刷新对象原始数据(为当前数据) - * @access public - * @return $this - */ - public function refreshOrigin() - { - $this->origin = $this->data; - return $this; - } - - /** - * 获取对象原始数据 如果不存在指定字段返回null - * @access public - * @param string $name 字段名 留空获取全部 - * @return mixed - */ - public function getOrigin(string $name = null) - { - if (is_null($name)) { - return $this->origin; - } - - $fieldName = $this->getRealFieldName($name); - - return array_key_exists($fieldName, $this->origin) ? $this->origin[$fieldName] : null; - } - - /** - * 获取当前对象数据 如果不存在指定字段返回false - * @access public - * @param string $name 字段名 留空获取全部 - * @return mixed - * @throws InvalidArgumentException - */ - public function getData(string $name = null) - { - if (is_null($name)) { - return $this->data; - } - - $fieldName = $this->getRealFieldName($name); - - if (array_key_exists($fieldName, $this->data)) { - return $this->data[$fieldName]; - } elseif (array_key_exists($fieldName, $this->relation)) { - return $this->relation[$fieldName]; - } - - throw new InvalidArgumentException('property not exists:' . static::class . '->' . $name); - } - - /** - * 获取变化的数据 并排除只读数据 - * @access public - * @return array - */ - public function getChangedData(): array - { - $data = $this->force ? $this->data : array_udiff_assoc($this->data, $this->origin, function ($a, $b) { - if ((empty($a) || empty($b)) && $a !== $b) { - return 1; - } - - return is_object($a) || $a != $b ? 1 : 0; - }); - - // 只读字段不允许更新 - foreach ($this->readonly as $key => $field) { - if (array_key_exists($field, $data)) { - unset($data[$field]); - } - } - - return $data; - } - - /** - * 直接设置数据对象值 - * @access public - * @param string $name 属性名 - * @param mixed $value 值 - * @return void - */ - public function set(string $name, $value): void - { - $name = $this->getRealFieldName($name); - - $this->data[$name] = $value; - unset($this->get[$name]); - } - - /** - * 通过修改器 批量设置数据对象值 - * @access public - * @param array $data 数据 - * @return void - */ - public function setAttrs(array $data): void - { - // 进行数据处理 - foreach ($data as $key => $value) { - $this->setAttr($key, $value, $data); - } - } - - /** - * 通过修改器 设置数据对象值 - * @access public - * @param string $name 属性名 - * @param mixed $value 属性值 - * @param array $data 数据 - * @return void - */ - public function setAttr(string $name, $value, array $data = []): void - { - $name = $this->getRealFieldName($name); - - // 检测修改器 - $method = 'set' . Str::studly($name) . 'Attr'; - - if (method_exists($this, $method)) { - $array = $this->data; - - $value = $this->$method($value, array_merge($this->data, $data)); - - if (is_null($value) && $array !== $this->data) { - return; - } - } elseif (isset($this->type[$name])) { - // 类型转换 - $value = $this->writeTransform($value, $this->type[$name]); - } elseif ($this->isRelationAttr($name)) { - $this->relation[$name] = $value; - } elseif ((array_key_exists($name, $this->origin) || empty($this->origin)) && is_object($value) && method_exists($value, '__toString')) { - // 对象类型 - $value = $value->__toString(); - } - - // 设置数据对象属性 - $this->data[$name] = $value; - unset($this->get[$name]); - } - - /** - * 数据写入 类型转换 - * @access protected - * @param mixed $value 值 - * @param string|array $type 要转换的类型 - * @return mixed - */ - protected function writeTransform($value, $type) - { - if (is_null($value)) { - return; - } - - if ($value instanceof Raw) { - return $value; - } - - if (is_array($type)) { - [$type, $param] = $type; - } elseif (strpos($type, ':')) { - [$type, $param] = explode(':', $type, 2); - } - - switch ($type) { - case 'integer': - $value = (int) $value; - break; - case 'float': - if (empty($param)) { - $value = (float) $value; - } else { - $value = (float) number_format($value, (int) $param, '.', ''); - } - break; - case 'boolean': - $value = (bool) $value; - break; - case 'timestamp': - if (!is_numeric($value)) { - $value = strtotime($value); - } - break; - case 'datetime': - $value = is_numeric($value) ? $value : strtotime($value); - $value = $this->formatDateTime('Y-m-d H:i:s.u', $value, true); - break; - case 'object': - if (is_object($value)) { - $value = json_encode($value, JSON_FORCE_OBJECT); - } - break; - case 'array': - $value = (array) $value; - // no break - case 'json': - $option = !empty($param) ? (int) $param : JSON_UNESCAPED_UNICODE; - $value = json_encode($value, $option); - break; - case 'serialize': - $value = serialize($value); - break; - default: - if (is_object($value) && false !== strpos($type, '\\') && method_exists($value, '__toString')) { - // 对象类型 - $value = $value->__toString(); - } - } - - return $value; - } - - /** - * 获取器 获取数据对象的值 - * @access public - * @param string $name 名称 - * @return mixed - * @throws InvalidArgumentException - */ - public function getAttr(string $name) - { - try { - $relation = false; - $value = $this->getData($name); - } catch (InvalidArgumentException $e) { - $relation = $this->isRelationAttr($name); - $value = null; - } - - return $this->getValue($name, $value, $relation); - } - - /** - * 获取经过获取器处理后的数据对象的值 - * @access protected - * @param string $name 字段名称 - * @param mixed $value 字段值 - * @param bool|string $relation 是否为关联属性或者关联名 - * @return mixed - * @throws InvalidArgumentException - */ - protected function getValue(string $name, $value, $relation = false) - { - // 检测属性获取器 - $fieldName = $this->getRealFieldName($name); - - if (array_key_exists($fieldName, $this->get)) { - return $this->get[$fieldName]; - } - - $method = 'get' . Str::studly($name) . 'Attr'; - if (isset($this->withAttr[$fieldName])) { - if ($relation) { - $value = $this->getRelationValue($relation); - } - - if (in_array($fieldName, $this->json) && is_array($this->withAttr[$fieldName])) { - $value = $this->getJsonValue($fieldName, $value); - } else { - $closure = $this->withAttr[$fieldName]; - if ($closure instanceof \Closure) { - $value = $closure($value, $this->data); - } - } - } elseif (method_exists($this, $method)) { - if ($relation) { - $value = $this->getRelationValue($relation); - } - - $value = $this->$method($value, $this->data); - } elseif (isset($this->type[$fieldName])) { - // 类型转换 - $value = $this->readTransform($value, $this->type[$fieldName]); - } elseif ($this->autoWriteTimestamp && in_array($fieldName, [$this->createTime, $this->updateTime])) { - $value = $this->getTimestampValue($value); - } elseif ($relation) { - $value = $this->getRelationValue($relation); - // 保存关联对象值 - $this->relation[$name] = $value; - } - - $this->get[$fieldName] = $value; - - return $value; - } - - /** - * 获取JSON字段属性值 - * @access protected - * @param string $name 属性名 - * @param mixed $value JSON数据 - * @return mixed - */ - protected function getJsonValue($name, $value) - { - if (is_null($value)) { - return $value; - } - - foreach ($this->withAttr[$name] as $key => $closure) { - if ($this->jsonAssoc) { - $value[$key] = $closure($value[$key], $value); - } else { - $value->$key = $closure($value->$key, $value); - } - } - - return $value; - } - - /** - * 获取关联属性值 - * @access protected - * @param string $relation 关联名 - * @return mixed - */ - protected function getRelationValue(string $relation) - { - $modelRelation = $this->$relation(); - - return $modelRelation instanceof Relation ? $this->getRelationData($modelRelation) : null; - } - - /** - * 数据读取 类型转换 - * @access protected - * @param mixed $value 值 - * @param string|array $type 要转换的类型 - * @return mixed - */ - protected function readTransform($value, $type) - { - if (is_null($value)) { - return; - } - - if (is_array($type)) { - [$type, $param] = $type; - } elseif (strpos($type, ':')) { - [$type, $param] = explode(':', $type, 2); - } - - switch ($type) { - case 'integer': - $value = (int) $value; - break; - case 'float': - if (empty($param)) { - $value = (float) $value; - } else { - $value = (float) number_format($value, (int) $param, '.', ''); - } - break; - case 'boolean': - $value = (bool) $value; - break; - case 'timestamp': - if (!is_null($value)) { - $format = !empty($param) ? $param : $this->dateFormat; - $value = $this->formatDateTime($format, $value, true); - } - break; - case 'datetime': - if (!is_null($value)) { - $format = !empty($param) ? $param : $this->dateFormat; - $value = $this->formatDateTime($format, $value); - } - break; - case 'json': - $value = json_decode($value, true); - break; - case 'array': - $value = empty($value) ? [] : json_decode($value, true); - break; - case 'object': - $value = empty($value) ? new \stdClass() : json_decode($value); - break; - case 'serialize': - try { - $value = unserialize($value); - } catch (\Exception $e) { - $value = null; - } - break; - default: - if (false !== strpos($type, '\\')) { - // 对象类型 - $value = new $type($value); - } - } - - return $value; - } - - /** - * 设置数据字段获取器 - * @access public - * @param string|array $name 字段名 - * @param callable $callback 闭包获取器 - * @return $this - */ - public function withAttr($name, callable $callback = null) - { - if (is_array($name)) { - foreach ($name as $key => $val) { - $this->withAttr($key, $val); - } - } else { - $name = $this->getRealFieldName($name); - - if (strpos($name, '.')) { - [$name, $key] = explode('.', $name); - - $this->withAttr[$name][$key] = $callback; - } else { - $this->withAttr[$name] = $callback; - } - } - - return $this; - } - -} diff --git a/vendor/topthink/think-orm/src/model/concern/Conversion.php b/vendor/topthink/think-orm/src/model/concern/Conversion.php deleted file mode 100644 index 136a90f..0000000 --- a/vendor/topthink/think-orm/src/model/concern/Conversion.php +++ /dev/null @@ -1,383 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\concern; - -use think\Collection; -use think\db\exception\DbException as Exception; -use think\helper\Str; -use think\Model; -use think\model\Collection as ModelCollection; -use think\model\relation\OneToOne; - -/** - * 模型数据转换处理 - */ -trait Conversion -{ - /** - * 数据输出显示的属性 - * @var array - */ - protected $visible = []; - - /** - * 数据输出隐藏的属性 - * @var array - */ - protected $hidden = []; - - /** - * 数据输出需要追加的属性 - * @var array - */ - protected $append = []; - - /** - * 场景 - * @var array - */ - protected $scene = []; - - /** - * 数据输出字段映射 - * @var array - */ - protected $mapping = []; - - /** - * 数据集对象名 - * @var string - */ - protected $resultSetType; - - /** - * 数据命名是否自动转为驼峰 - * @var bool - */ - protected $convertNameToCamel; - - /** - * 转换数据为驼峰命名(用于输出) - * @access public - * @param bool $toCamel 是否自动驼峰命名 - * @return $this - */ - public function convertNameToCamel(bool $toCamel = true) - { - $this->convertNameToCamel = $toCamel; - return $this; - } - - /** - * 设置需要附加的输出属性 - * @access public - * @param array $append 属性列表 - * @param bool $merge 是否合并 - * @return $this - */ - public function append(array $append = [], bool $merge = false) - { - if ($merge) { - $this->append = array_merge($this->append, $append); - } else { - $this->append = $append; - } - - return $this; - } - - /** - * 设置输出层场景 - * @access public - * @param string $scene 场景名称 - * @return $this - */ - public function scene(string $scene) - { - if (isset($this->scene[$scene])) { - $data = $this->scene[$scene]; - foreach (['append', 'hidden', 'visible'] as $name) { - if (isset($data[$name])) { - $this->$name($data[$name]); - } - } - } - - return $this; - } - - /** - * 设置附加关联对象的属性 - * @access public - * @param string $attr 关联属性 - * @param string|array $append 追加属性名 - * @return $this - * @throws Exception - */ - public function appendRelationAttr(string $attr, array $append) - { - $relation = Str::camel($attr); - - if (isset($this->relation[$relation])) { - $model = $this->relation[$relation]; - } else { - $model = $this->getRelationData($this->$relation()); - } - - if ($model instanceof Model) { - foreach ($append as $key => $attr) { - $key = is_numeric($key) ? $attr : $key; - if (isset($this->data[$key])) { - throw new Exception('bind attr has exists:' . $key); - } - - $this->data[$key] = $model->$attr; - } - } - - return $this; - } - - /** - * 设置需要隐藏的输出属性 - * @access public - * @param array $hidden 属性列表 - * @param bool $merge 是否合并 - * @return $this - */ - public function hidden(array $hidden = [], bool $merge = false) - { - if ($merge) { - $this->hidden = array_merge($this->hidden, $hidden); - } else { - $this->hidden = $hidden; - } - - return $this; - } - - /** - * 设置需要输出的属性 - * @access public - * @param array $visible - * @param bool $merge 是否合并 - * @return $this - */ - public function visible(array $visible = [], bool $merge = false) - { - if ($merge) { - $this->visible = array_merge($this->visible, $visible); - } else { - $this->visible = $visible; - } - - return $this; - } - - /** - * 设置属性的映射输出 - * @access public - * @param array $map - * @return $this - */ - public function mapping(array $map) - { - $this->mapping = $map; - - return $this; - } - - /** - * 转换当前模型对象为数组 - * @access public - * @return array - */ - public function toArray(): array - { - $item = $visible = $hidden = []; - $hasVisible = false; - - foreach ($this->visible as $key => $val) { - if (is_string($val)) { - if (strpos($val, '.')) { - [$relation, $name] = explode('.', $val); - $visible[$relation][] = $name; - } else { - $visible[$val] = true; - $hasVisible = true; - } - } - } - - foreach ($this->hidden as $key => $val) { - if (is_string($val)) { - if (strpos($val, '.')) { - [$relation, $name] = explode('.', $val); - $hidden[$relation][] = $name; - } else { - $hidden[$val] = true; - } - } - } - - // 追加属性(必须定义获取器) - foreach ($this->append as $key => $name) { - $this->appendAttrToArray($item, $key, $name, $visible, $hidden); - } - - // 合并关联数据 - $data = array_merge($this->data, $this->relation); - - foreach ($data as $key => $val) { - if ($val instanceof Model || $val instanceof ModelCollection) { - // 关联模型对象 - if (isset($visible[$key]) && is_array($visible[$key])) { - $val->visible($visible[$key]); - } elseif (isset($hidden[$key]) && is_array($hidden[$key])) { - $val->hidden($hidden[$key], true); - } - // 关联模型对象 - if (!isset($hidden[$key]) || true !== $hidden[$key]) { - $item[$key] = $val->toArray(); - } - } elseif (isset($visible[$key])) { - $item[$key] = $this->getAttr($key); - } elseif (!isset($hidden[$key]) && !$hasVisible) { - $item[$key] = $this->getAttr($key); - } - - if (isset($this->mapping[$key])) { - // 检查字段映射 - $mapName = $this->mapping[$key]; - $item[$mapName] = $item[$key]; - unset($item[$key]); - } - } - - if ($this->convertNameToCamel) { - foreach ($item as $key => $val) { - $name = Str::camel($key); - if ($name !== $key) { - $item[$name] = $val; - unset($item[$key]); - } - } - } - - return $item; - } - - protected function appendAttrToArray(array &$item, $key, $name, array $visible, array $hidden) - { - if (is_array($name)) { - // 批量追加关联对象属性 - $relation = $this->getRelationWith($key, $hidden, $visible); - $item[$key] = $relation ? $relation->append($name)->toArray() : []; - } elseif (strpos($name, '.')) { - // 追加单个关联对象属性 - [$key, $attr] = explode('.', $name); - $relation = $this->getRelationWith($key, $hidden, $visible); - $item[$key] = $relation ? $relation->append([$attr])->toArray() : []; - } else { - $value = $this->getAttr($name); - $item[$name] = $value; - - $this->getBindAttrValue($name, $value, $item); - } - } - - protected function getRelationWith(string $key, array $hidden, array $visible) - { - $relation = $this->getRelation($key, true); - if ($relation) { - if (isset($visible[$key])) { - $relation->visible($visible[$key]); - } elseif (isset($hidden[$key])) { - $relation->hidden($hidden[$key]); - } - } - return $relation; - } - - protected function getBindAttrValue(string $name, $value, array &$item = []) - { - $relation = $this->isRelationAttr($name); - if (!$relation) { - return false; - } - - $modelRelation = $this->$relation(); - - if ($modelRelation instanceof OneToOne) { - $bindAttr = $modelRelation->getBindAttr(); - - if (!empty($bindAttr)) { - unset($item[$name]); - } - - foreach ($bindAttr as $key => $attr) { - $key = is_numeric($key) ? $attr : $key; - - if (isset($item[$key])) { - throw new Exception('bind attr has exists:' . $key); - } - - $item[$key] = $value ? $value->getAttr($attr) : null; - } - } - } - - /** - * 转换当前模型对象为JSON字符串 - * @access public - * @param integer $options json参数 - * @return string - */ - public function toJson(int $options = JSON_UNESCAPED_UNICODE): string - { - return json_encode($this->toArray(), $options); - } - - public function __toString() - { - return $this->toJson(); - } - - // JsonSerializable - #[\ReturnTypeWillChange] - public function jsonSerialize() - { - return $this->toArray(); - } - - /** - * 转换数据集为数据集对象 - * @access public - * @param array|Collection $collection 数据集 - * @param string $resultSetType 数据集类 - * @return Collection - */ - public function toCollection(iterable $collection = [], string $resultSetType = null): Collection - { - $resultSetType = $resultSetType ?: $this->resultSetType; - - if ($resultSetType && false !== strpos($resultSetType, '\\')) { - $collection = new $resultSetType($collection); - } else { - $collection = new ModelCollection($collection); - } - - return $collection; - } - -} diff --git a/vendor/topthink/think-orm/src/model/concern/ModelEvent.php b/vendor/topthink/think-orm/src/model/concern/ModelEvent.php deleted file mode 100644 index d2388ab..0000000 --- a/vendor/topthink/think-orm/src/model/concern/ModelEvent.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\concern; - -use think\db\exception\ModelEventException; -use think\helper\Str; - -/** - * 模型事件处理 - */ -trait ModelEvent -{ - - /** - * Event对象 - * @var object - */ - protected static $event; - - /** - * 是否需要事件响应 - * @var bool - */ - protected $withEvent = true; - - /** - * 设置Event对象 - * @access public - * @param object $event Event对象 - * @return void - */ - public static function setEvent($event) - { - self::$event = $event; - } - - /** - * 当前操作的事件响应 - * @access protected - * @param bool $event 是否需要事件响应 - * @return $this - */ - public function withEvent(bool $event) - { - $this->withEvent = $event; - return $this; - } - - /** - * 触发事件 - * @access protected - * @param string $event 事件名 - * @return bool - */ - protected function trigger(string $event): bool - { - if (!$this->withEvent) { - return true; - } - - $call = 'on' . Str::studly($event); - - try { - if (method_exists(static::class, $call)) { - $result = call_user_func([static::class, $call], $this); - } elseif (is_object(self::$event) && method_exists(self::$event, 'trigger')) { - $result = self::$event->trigger('model.' . static::class . '.' . $event, $this); - $result = empty($result) ? true : end($result); - } else { - $result = true; - } - - return false === $result ? false : true; - } catch (ModelEventException $e) { - return false; - } - } -} diff --git a/vendor/topthink/think-orm/src/model/concern/OptimLock.php b/vendor/topthink/think-orm/src/model/concern/OptimLock.php deleted file mode 100644 index 5e61318..0000000 --- a/vendor/topthink/think-orm/src/model/concern/OptimLock.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\concern; - -use think\db\exception\DbException as Exception; - -/** - * 乐观锁 - */ -trait OptimLock -{ - protected function getOptimLockField() - { - return property_exists($this, 'optimLock') && isset($this->optimLock) ? $this->optimLock : 'lock_version'; - } - - /** - * 数据检查 - * @access protected - * @return void - */ - protected function checkData(): void - { - $this->isExists() ? $this->updateLockVersion() : $this->recordLockVersion(); - } - - /** - * 记录乐观锁 - * @access protected - * @return void - */ - protected function recordLockVersion(): void - { - $optimLock = $this->getOptimLockField(); - - if ($optimLock) { - $this->set($optimLock, 0); - } - } - - /** - * 更新乐观锁 - * @access protected - * @return void - */ - protected function updateLockVersion(): void - { - $optimLock = $this->getOptimLockField(); - - if ($optimLock && $lockVer = $this->getOrigin($optimLock)) { - // 更新乐观锁 - $this->set($optimLock, $lockVer + 1); - } - } - - public function getWhere() - { - $where = parent::getWhere(); - $optimLock = $this->getOptimLockField(); - - if ($optimLock && $lockVer = $this->getOrigin($optimLock)) { - $where[] = [$optimLock, '=', $lockVer]; - } - - return $where; - } - - protected function checkResult($result): void - { - if (!$result) { - throw new Exception('record has update'); - } - } - -} diff --git a/vendor/topthink/think-orm/src/model/concern/RelationShip.php b/vendor/topthink/think-orm/src/model/concern/RelationShip.php deleted file mode 100644 index 37b8af8..0000000 --- a/vendor/topthink/think-orm/src/model/concern/RelationShip.php +++ /dev/null @@ -1,843 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\concern; - -use Closure; -use think\Collection; -use think\db\BaseQuery as Query; -use think\db\exception\DbException as Exception; -use think\helper\Str; -use think\Model; -use think\model\Relation; -use think\model\relation\BelongsTo; -use think\model\relation\BelongsToMany; -use think\model\relation\HasMany; -use think\model\relation\HasManyThrough; -use think\model\relation\HasOne; -use think\model\relation\HasOneThrough; -use think\model\relation\MorphMany; -use think\model\relation\MorphOne; -use think\model\relation\MorphTo; -use think\model\relation\MorphToMany; -use think\model\relation\OneToOne; - -/** - * 模型关联处理 - */ -trait RelationShip -{ - /** - * 父关联模型对象 - * @var object - */ - private $parent; - - /** - * 模型关联数据 - * @var array - */ - private $relation = []; - - /** - * 关联写入定义信息 - * @var array - */ - private $together = []; - - /** - * 关联自动写入信息 - * @var array - */ - protected $relationWrite = []; - - /** - * 设置父关联对象 - * @access public - * @param Model $model 模型对象 - * @return $this - */ - public function setParent(Model $model) - { - $this->parent = $model; - - return $this; - } - - /** - * 获取父关联对象 - * @access public - * @return Model - */ - public function getParent(): Model - { - return $this->parent; - } - - /** - * 获取当前模型的关联模型数据 - * @access public - * @param string $name 关联方法名 - * @param bool $auto 不存在是否自动获取 - * @return mixed - */ - public function getRelation(string $name = null, bool $auto = false) - { - if (is_null($name)) { - return $this->relation; - } - - if (array_key_exists($name, $this->relation)) { - return $this->relation[$name]; - } elseif ($auto) { - $relation = Str::camel($name); - return $this->getRelationValue($relation); - } - } - - /** - * 设置关联数据对象值 - * @access public - * @param string $name 属性名 - * @param mixed $value 属性值 - * @param array $data 数据 - * @return $this - */ - public function setRelation(string $name, $value, array $data = []) - { - // 检测修改器 - $method = 'set' . Str::studly($name) . 'Attr'; - - if (method_exists($this, $method)) { - $value = $this->$method($value, array_merge($this->data, $data)); - } - - $this->relation[$this->getRealFieldName($name)] = $value; - - return $this; - } - - /** - * 查询当前模型的关联数据 - * @access public - * @param array $relations 关联名 - * @param array $withRelationAttr 关联获取器 - * @return void - */ - public function relationQuery(array $relations, array $withRelationAttr = []): void - { - foreach ($relations as $key => $relation) { - $subRelation = []; - $closure = null; - - if ($relation instanceof Closure) { - // 支持闭包查询过滤关联条件 - $closure = $relation; - $relation = $key; - } - - if (is_array($relation)) { - $subRelation = $relation; - $relation = $key; - } elseif (strpos($relation, '.')) { - [$relation, $subRelation] = explode('.', $relation, 2); - } - - $method = Str::camel($relation); - $relationName = Str::snake($relation); - - $relationResult = $this->$method(); - - if (isset($withRelationAttr[$relationName])) { - $relationResult->withAttr($withRelationAttr[$relationName]); - } - - $this->relation[$relation] = $relationResult->getRelation((array) $subRelation, $closure); - } - } - - /** - * 关联数据写入 - * @access public - * @param array $relation 关联 - * @return $this - */ - public function together(array $relation) - { - $this->together = $relation; - - $this->checkAutoRelationWrite(); - - return $this; - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $relation 关联方法名 - * @param mixed $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public static function has(string $relation, string $operator = '>=', int $count = 1, string $id = '*', string $joinType = '', Query $query = null): Query - { - return (new static()) - ->$relation() - ->has($operator, $count, $id, $joinType, $query); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $relation 关联方法名 - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public static function hasWhere(string $relation, $where = [], string $fields = '*', string $joinType = '', Query $query = null): Query - { - return (new static()) - ->$relation() - ->hasWhere($where, $fields, $joinType, $query); - } - - /** - * 预载入关联查询 JOIN方式 - * @access public - * @param Query $query Query对象 - * @param string $relation 关联方法名 - * @param mixed $field 字段 - * @param string $joinType JOIN类型 - * @param Closure $closure 闭包 - * @param bool $first - * @return bool - */ - public function eagerly(Query $query, string $relation, $field, string $joinType = '', Closure $closure = null, bool $first = false): bool - { - $relation = Str::camel($relation); - $class = $this->$relation(); - - if ($class instanceof OneToOne) { - $class->eagerly($query, $relation, $field, $joinType, $closure, $first); - return true; - } else { - return false; - } - } - - /** - * 预载入关联查询 返回数据集 - * @access public - * @param array $resultSet 数据集 - * @param string $relation 关联名 - * @param array $withRelationAttr 关联获取器 - * @param bool $join 是否为JOIN方式 - * @param mixed $cache 关联缓存 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, array $relations, array $withRelationAttr = [], bool $join = false, $cache = false): void - { - foreach ($relations as $key => $relation) { - $subRelation = []; - $closure = null; - - if ($relation instanceof Closure) { - $closure = $relation; - $relation = $key; - } - - if (is_array($relation)) { - $subRelation = $relation; - $relation = $key; - } elseif (strpos($relation, '.')) { - [$relation, $subRelation] = explode('.', $relation, 2); - - $subRelation = [$subRelation]; - } - - $relationName = $relation; - $relation = Str::camel($relation); - - $relationResult = $this->$relation(); - - if (isset($withRelationAttr[$relationName])) { - $relationResult->withAttr($withRelationAttr[$relationName]); - } - - if (is_scalar($cache)) { - $relationCache = [$cache]; - } else { - $relationCache = $cache[$relationName] ?? $cache; - } - - $relationResult->eagerlyResultSet($resultSet, $relationName, $subRelation, $closure, $relationCache, $join); - } - } - - /** - * 预载入关联查询 返回模型对象 - * @access public - * @param array $relations 关联 - * @param array $withRelationAttr 关联获取器 - * @param bool $join 是否为JOIN方式 - * @param mixed $cache 关联缓存 - * @return void - */ - public function eagerlyResult(array $relations, array $withRelationAttr = [], bool $join = false, $cache = false): void - { - foreach ($relations as $key => $relation) { - $subRelation = []; - $closure = null; - - if ($relation instanceof Closure) { - $closure = $relation; - $relation = $key; - } - - if (is_array($relation)) { - $subRelation = $relation; - $relation = $key; - } elseif (strpos($relation, '.')) { - [$relation, $subRelation] = explode('.', $relation, 2); - - $subRelation = [$subRelation]; - } - - $relationName = $relation; - $relation = Str::camel($relation); - - $relationResult = $this->$relation(); - - if (isset($withRelationAttr[$relationName])) { - $relationResult->withAttr($withRelationAttr[$relationName]); - } - - if (is_scalar($cache)) { - $relationCache = [$cache]; - } else { - $relationCache = $cache[$relationName] ?? []; - } - - $relationResult->eagerlyResult($this, $relationName, $subRelation, $closure, $relationCache, $join); - } - } - - /** - * 绑定(一对一)关联属性到当前模型 - * @access protected - * @param string $relation 关联名称 - * @param array $attrs 绑定属性 - * @return $this - * @throws Exception - */ - public function bindAttr(string $relation, array $attrs = []) - { - $relation = $this->getRelation($relation, true); - - foreach ($attrs as $key => $attr) { - $key = is_numeric($key) ? $attr : $key; - $value = $this->getOrigin($key); - - if (!is_null($value)) { - throw new Exception('bind attr has exists:' . $key); - } - - $this->set($key, $relation ? $relation->$attr : null); - } - - return $this; - } - - /** - * 关联统计 - * @access public - * @param Query $query 查询对象 - * @param array $relations 关联名 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param bool $useSubQuery 子查询 - * @return void - */ - public function relationCount(Query $query, array $relations, string $aggregate = 'sum', string $field = '*', bool $useSubQuery = true): void - { - foreach ($relations as $key => $relation) { - $closure = $name = null; - - if ($relation instanceof Closure) { - $closure = $relation; - $relation = $key; - } elseif (is_string($key)) { - $name = $relation; - $relation = $key; - } - - $relation = Str::camel($relation); - - if ($useSubQuery) { - $count = $this->$relation()->getRelationCountQuery($closure, $aggregate, $field, $name); - } else { - $count = $this->$relation()->relationCount($this, $closure, $aggregate, $field, $name); - } - - if (empty($name)) { - $name = Str::snake($relation) . '_' . $aggregate; - } - - if ($useSubQuery) { - $query->field(['(' . $count . ')' => $name]); - } else { - $this->setAttr($name, $count); - } - } - } - - /** - * HAS ONE 关联定义 - * @access public - * @param string $model 模型名 - * @param string $foreignKey 关联外键 - * @param string $localKey 当前主键 - * @return HasOne - */ - public function hasOne(string $model, string $foreignKey = '', string $localKey = ''): HasOne - { - // 记录当前关联信息 - $model = $this->parseModel($model); - $localKey = $localKey ?: $this->getPk(); - $foreignKey = $foreignKey ?: $this->getForeignKey($this->name); - - return new HasOne($this, $model, $foreignKey, $localKey); - } - - /** - * BELONGS TO 关联定义 - * @access public - * @param string $model 模型名 - * @param string $foreignKey 关联外键 - * @param string $localKey 关联主键 - * @return BelongsTo - */ - public function belongsTo(string $model, string $foreignKey = '', string $localKey = ''): BelongsTo - { - // 记录当前关联信息 - $model = $this->parseModel($model); - $foreignKey = $foreignKey ?: $this->getForeignKey((new $model)->getName()); - $localKey = $localKey ?: (new $model)->getPk(); - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); - $relation = Str::snake($trace[1]['function']); - - return new BelongsTo($this, $model, $foreignKey, $localKey, $relation); - } - - /** - * HAS MANY 关联定义 - * @access public - * @param string $model 模型名 - * @param string $foreignKey 关联外键 - * @param string $localKey 当前主键 - * @return HasMany - */ - public function hasMany(string $model, string $foreignKey = '', string $localKey = ''): HasMany - { - // 记录当前关联信息 - $model = $this->parseModel($model); - $localKey = $localKey ?: $this->getPk(); - $foreignKey = $foreignKey ?: $this->getForeignKey($this->name); - - return new HasMany($this, $model, $foreignKey, $localKey); - } - - /** - * HAS MANY 远程关联定义 - * @access public - * @param string $model 模型名 - * @param string $through 中间模型名 - * @param string $foreignKey 关联外键 - * @param string $throughKey 关联外键 - * @param string $localKey 当前主键 - * @param string $throughPk 中间表主键 - * @return HasManyThrough - */ - public function hasManyThrough(string $model, string $through, string $foreignKey = '', string $throughKey = '', string $localKey = '', string $throughPk = ''): HasManyThrough - { - // 记录当前关联信息 - $model = $this->parseModel($model); - $through = $this->parseModel($through); - $localKey = $localKey ?: $this->getPk(); - $foreignKey = $foreignKey ?: $this->getForeignKey($this->name); - $throughKey = $throughKey ?: $this->getForeignKey((new $through)->getName()); - $throughPk = $throughPk ?: (new $through)->getPk(); - - return new HasManyThrough($this, $model, $through, $foreignKey, $throughKey, $localKey, $throughPk); - } - - /** - * HAS ONE 远程关联定义 - * @access public - * @param string $model 模型名 - * @param string $through 中间模型名 - * @param string $foreignKey 关联外键 - * @param string $throughKey 关联外键 - * @param string $localKey 当前主键 - * @param string $throughPk 中间表主键 - * @return HasOneThrough - */ - public function hasOneThrough(string $model, string $through, string $foreignKey = '', string $throughKey = '', string $localKey = '', string $throughPk = ''): HasOneThrough - { - // 记录当前关联信息 - $model = $this->parseModel($model); - $through = $this->parseModel($through); - $localKey = $localKey ?: $this->getPk(); - $foreignKey = $foreignKey ?: $this->getForeignKey($this->name); - $throughKey = $throughKey ?: $this->getForeignKey((new $through)->getName()); - $throughPk = $throughPk ?: (new $through)->getPk(); - - return new HasOneThrough($this, $model, $through, $foreignKey, $throughKey, $localKey, $throughPk); - } - - /** - * BELONGS TO MANY 关联定义 - * @access public - * @param string $model 模型名 - * @param string $middle 中间表/模型名 - * @param string $foreignKey 关联外键 - * @param string $localKey 当前模型关联键 - * @return BelongsToMany - */ - public function belongsToMany(string $model, string $middle = '', string $foreignKey = '', string $localKey = ''): BelongsToMany - { - // 记录当前关联信息 - $model = $this->parseModel($model); - $name = Str::snake(class_basename($model)); - $middle = $middle ?: Str::snake($this->name) . '_' . $name; - $foreignKey = $foreignKey ?: $name . '_id'; - $localKey = $localKey ?: $this->getForeignKey($this->name); - - return new BelongsToMany($this, $model, $middle, $foreignKey, $localKey); - } - - /** - * MORPH One 关联定义 - * @access public - * @param string $model 模型名 - * @param string|array $morph 多态字段信息 - * @param string $type 多态类型 - * @return MorphOne - */ - public function morphOne(string $model, $morph = null, string $type = ''): MorphOne - { - // 记录当前关联信息 - $model = $this->parseModel($model); - - if (is_null($morph)) { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); - $morph = Str::snake($trace[1]['function']); - } - - if (is_array($morph)) { - [$morphType, $foreignKey] = $morph; - } else { - $morphType = $morph . '_type'; - $foreignKey = $morph . '_id'; - } - - $type = $type ?: get_class($this); - - return new MorphOne($this, $model, $foreignKey, $morphType, $type); - } - - /** - * MORPH MANY 关联定义 - * @access public - * @param string $model 模型名 - * @param string|array $morph 多态字段信息 - * @param string $type 多态类型 - * @return MorphMany - */ - public function morphMany(string $model, $morph = null, string $type = ''): MorphMany - { - // 记录当前关联信息 - $model = $this->parseModel($model); - - if (is_null($morph)) { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); - $morph = Str::snake($trace[1]['function']); - } - - $type = $type ?: get_class($this); - - if (is_array($morph)) { - [$morphType, $foreignKey] = $morph; - } else { - $morphType = $morph . '_type'; - $foreignKey = $morph . '_id'; - } - - return new MorphMany($this, $model, $foreignKey, $morphType, $type); - } - - /** - * MORPH TO 关联定义 - * @access public - * @param string|array $morph 多态字段信息 - * @param array $alias 多态别名定义 - * @return MorphTo - */ - public function morphTo($morph = null, array $alias = []): MorphTo - { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); - $relation = Str::snake($trace[1]['function']); - - if (is_null($morph)) { - $morph = $relation; - } - - // 记录当前关联信息 - if (is_array($morph)) { - [$morphType, $foreignKey] = $morph; - } else { - $morphType = $morph . '_type'; - $foreignKey = $morph . '_id'; - } - - return new MorphTo($this, $morphType, $foreignKey, $alias, $relation); - } - - /** - * MORPH TO MANY关联定义 - * @access public - * @param string $model 模型名 - * @param string $middle 中间表名/模型名 - * @param string|array $morph 多态字段信息 - * @param string $localKey 当前模型关联键 - * @return MorphToMany - */ - public function morphToMany(string $model, string $middle, $morph = null, string $localKey = null): MorphToMany - { - if (is_null($morph)) { - $morph = $middle; - } - - // 记录当前关联信息 - if (is_array($morph)) { - [$morphType, $morphKey] = $morph; - } else { - $morphType = $morph . '_type'; - $morphKey = $morph . '_id'; - } - - $model = $this->parseModel($model); - $name = Str::snake(class_basename($model)); - $localKey = $localKey ?: $this->getForeignKey($name); - - return new MorphToMany($this, $model, $middle, $morphType, $morphKey, $localKey); - } - - /** - * MORPH BY MANY关联定义 - * @access public - * @param string $model 模型名 - * @param string $middle 中间表名/模型名 - * @param string|array $morph 多态字段信息 - * @param string $foreignKey 关联外键 - * @return MorphToMany - */ - public function morphByMany(string $model, string $middle, $morph = null, string $foreignKey = null): MorphToMany - { - if (is_null($morph)) { - $morph = $middle; - } - - // 记录当前关联信息 - if (is_array($morph)) { - [$morphType, $morphKey] = $morph; - } else { - $morphType = $morph . '_type'; - $morphKey = $morph . '_id'; - } - - $model = $this->parseModel($model); - $foreignKey = $foreignKey ?: $this->getForeignKey($this->name); - - return new MorphToMany($this, $model, $middle, $morphType, $morphKey, $foreignKey, true); - } - - /** - * 解析模型的完整命名空间 - * @access protected - * @param string $model 模型名(或者完整类名) - * @return string - */ - protected function parseModel(string $model): string - { - if (false === strpos($model, '\\')) { - $path = explode('\\', static::class); - array_pop($path); - array_push($path, Str::studly($model)); - $model = implode('\\', $path); - } - - return $model; - } - - /** - * 获取模型的默认外键名 - * @access protected - * @param string $name 模型名 - * @return string - */ - protected function getForeignKey(string $name): string - { - if (strpos($name, '\\')) { - $name = class_basename($name); - } - - return Str::snake($name) . '_id'; - } - - /** - * 检查属性是否为关联属性 如果是则返回关联方法名 - * @access protected - * @param string $attr 关联属性名 - * @return string|false - */ - protected function isRelationAttr(string $attr) - { - $relation = Str::camel($attr); - - if ((method_exists($this, $relation) && !method_exists('think\Model', $relation)) || isset(static::$macro[static::class][$relation])) { - return $relation; - } - - return false; - } - - /** - * 智能获取关联模型数据 - * @access protected - * @param Relation $modelRelation 模型关联对象 - * @return mixed - */ - protected function getRelationData(Relation $modelRelation) - { - if ($this->parent && !$modelRelation->isSelfRelation() - && get_class($this->parent) == get_class($modelRelation->getModel()) - && $modelRelation instanceof OneToOne - ) { - return $this->parent; - } - - // 获取关联数据 - return $modelRelation->getRelation(); - } - - /** - * 关联数据自动写入检查 - * @access protected - * @return void - */ - protected function checkAutoRelationWrite(): void - { - foreach ($this->together as $key => $name) { - if (is_array($name)) { - if (key($name) === 0) { - $this->relationWrite[$key] = []; - // 绑定关联属性 - foreach ($name as $val) { - if (isset($this->data[$val])) { - $this->relationWrite[$key][$val] = $this->data[$val]; - } - } - } else { - // 直接传入关联数据 - $this->relationWrite[$key] = $name; - } - } elseif (isset($this->relation[$name])) { - $this->relationWrite[$name] = $this->relation[$name]; - } elseif (isset($this->data[$name])) { - $this->relationWrite[$name] = $this->data[$name]; - unset($this->data[$name]); - } - } - } - - /** - * 自动关联数据更新(针对一对一关联) - * @access protected - * @return void - */ - protected function autoRelationUpdate(): void - { - foreach ($this->relationWrite as $name => $val) { - if ($val instanceof Model) { - $val->exists(true)->save(); - } else { - $model = $this->getRelation($name, true); - - if ($model instanceof Model) { - $model->exists(true)->save($val); - } - } - } - } - - /** - * 自动关联数据写入(针对一对一关联) - * @access protected - * @return void - */ - protected function autoRelationInsert(): void - { - foreach ($this->relationWrite as $name => $val) { - $method = Str::camel($name); - $this->$method()->save($val); - } - } - - /** - * 自动关联数据删除(支持一对一及一对多关联) - * @access protected - * @param bool $force 强制删除 - * @return void - */ - protected function autoRelationDelete($force = false): void - { - foreach ($this->relationWrite as $key => $name) { - $name = is_numeric($key) ? $name : $key; - $result = $this->getRelation($name, true); - - if ($result instanceof Model) { - $result->force($force)->delete(); - } elseif ($result instanceof Collection) { - foreach ($result as $model) { - $model->force($force)->delete(); - } - } - } - } - - /** - * 移除当前模型的关联属性 - * @access public - * @return $this - */ - public function removeRelation() - { - $this->relation = []; - return $this; - } -} diff --git a/vendor/topthink/think-orm/src/model/concern/SoftDelete.php b/vendor/topthink/think-orm/src/model/concern/SoftDelete.php deleted file mode 100644 index b7b1092..0000000 --- a/vendor/topthink/think-orm/src/model/concern/SoftDelete.php +++ /dev/null @@ -1,235 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\concern; - -use think\db\BaseQuery as Query; -use think\Model; - -/** - * 数据软删除 - * @mixin Model - * @method $this withTrashed() - * @method $this onlyTrashed() - */ -trait SoftDelete -{ - - public function db($scope = []): Query - { - $query = parent::db($scope); - $this->withNoTrashed($query); - return $query; - } - - /** - * 判断当前实例是否被软删除 - * @access public - * @return bool - */ - public function trashed(): bool - { - $field = $this->getDeleteTimeField(); - - if ($field && !empty($this->getOrigin($field))) { - return true; - } - - return false; - } - - public function scopeWithTrashed(Query $query) - { - $query->removeOption('soft_delete'); - } - - public function scopeOnlyTrashed(Query $query) - { - $field = $this->getDeleteTimeField(true); - - if ($field) { - $query->useSoftDelete($field, $this->getWithTrashedExp()); - } - } - - /** - * 获取软删除数据的查询条件 - * @access protected - * @return array - */ - protected function getWithTrashedExp(): array - { - return is_null($this->defaultSoftDelete) ? ['notnull', ''] : ['<>', $this->defaultSoftDelete]; - } - - /** - * 删除当前的记录 - * @access public - * @return bool - */ - public function delete(): bool - { - if (!$this->isExists() || $this->isEmpty() || false === $this->trigger('BeforeDelete')) { - return false; - } - - $name = $this->getDeleteTimeField(); - $force = $this->isForce(); - - if ($name && !$force) { - // 软删除 - $this->set($name, $this->autoWriteTimestamp()); - - $this->exists()->withEvent(false)->save(); - - $this->withEvent(true); - } else { - // 读取更新条件 - $where = $this->getWhere(); - - // 删除当前模型数据 - $this->db() - ->where($where) - ->removeOption('soft_delete') - ->delete(); - - $this->lazySave(false); - } - - // 关联删除 - if (!empty($this->relationWrite)) { - $this->autoRelationDelete($force); - } - - $this->trigger('AfterDelete'); - - $this->exists(false); - - return true; - } - - /** - * 删除记录 - * @access public - * @param mixed $data 主键列表 支持闭包查询条件 - * @param bool $force 是否强制删除 - * @return bool - */ - public static function destroy($data, bool $force = false): bool - { - // 传入空值(包括空字符串和空数组)的时候不会做任何的数据删除操作,但传入0则是有效的 - if (empty($data) && 0 !== $data) { - return false; - } - $model = (new static()); - - $query = $model->db(false); - - // 仅当强制删除时包含软删除数据 - if ($force) { - $query->removeOption('soft_delete'); - } - - if (is_array($data) && key($data) !== 0) { - $query->where($data); - $data = null; - } elseif ($data instanceof \Closure) { - call_user_func_array($data, [&$query]); - $data = null; - } elseif (is_null($data)) { - return false; - } - - $resultSet = $query->select($data); - - foreach ($resultSet as $result) { - /** @var Model $result */ - $result->force($force)->delete(); - } - - return true; - } - - /** - * 恢复被软删除的记录 - * @access public - * @param array $where 更新条件 - * @return bool - */ - public function restore($where = []): bool - { - $name = $this->getDeleteTimeField(); - - if (!$name || false === $this->trigger('BeforeRestore')) { - return false; - } - - if (empty($where)) { - $pk = $this->getPk(); - if (is_string($pk)) { - $where[] = [$pk, '=', $this->getData($pk)]; - } - } - - // 恢复删除 - $this->db(false) - ->where($where) - ->useSoftDelete($name, $this->getWithTrashedExp()) - ->update([$name => $this->defaultSoftDelete]); - - $this->trigger('AfterRestore'); - - return true; - } - - /** - * 获取软删除字段 - * @access protected - * @param bool $read 是否查询操作 写操作的时候会自动去掉表别名 - * @return string|false - */ - protected function getDeleteTimeField(bool $read = false) - { - $field = property_exists($this, 'deleteTime') && isset($this->deleteTime) ? $this->deleteTime : 'delete_time'; - - if (false === $field) { - return false; - } - - if (false === strpos($field, '.')) { - $field = '__TABLE__.' . $field; - } - - if (!$read && strpos($field, '.')) { - $array = explode('.', $field); - $field = array_pop($array); - } - - return $field; - } - - /** - * 查询的时候默认排除软删除数据 - * @access protected - * @param Query $query - * @return void - */ - protected function withNoTrashed(Query $query): void - { - $field = $this->getDeleteTimeField(true); - - if ($field) { - $condition = is_null($this->defaultSoftDelete) ? ['null', ''] : ['=', $this->defaultSoftDelete]; - $query->useSoftDelete($field, $condition); - } - } -} diff --git a/vendor/topthink/think-orm/src/model/concern/TimeStamp.php b/vendor/topthink/think-orm/src/model/concern/TimeStamp.php deleted file mode 100644 index 9440c3e..0000000 --- a/vendor/topthink/think-orm/src/model/concern/TimeStamp.php +++ /dev/null @@ -1,223 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\concern; - -use DateTime; - -/** - * 自动时间戳 - */ -trait TimeStamp -{ - /** - * 是否需要自动写入时间戳 如果设置为字符串 则表示时间字段的类型 - * @var bool|string - */ - protected $autoWriteTimestamp; - - /** - * 创建时间字段 false表示关闭 - * @var false|string - */ - protected $createTime = 'create_time'; - - /** - * 更新时间字段 false表示关闭 - * @var false|string - */ - protected $updateTime = 'update_time'; - - /** - * 时间字段显示格式 - * @var string - */ - protected $dateFormat; - - /** - * 是否需要自动写入时间字段 - * @access public - * @param bool|string $auto - * @return $this - */ - public function isAutoWriteTimestamp($auto) - { - $this->autoWriteTimestamp = $this->checkTimeFieldType($auto); - - return $this; - } - - /** - * 检测时间字段的实际类型 - * @access public - * @param bool|string $type - * @return mixed - */ - protected function checkTimeFieldType($type) - { - if (true === $type) { - if (isset($this->type[$this->createTime])) { - $type = $this->type[$this->createTime]; - } elseif (isset($this->schema[$this->createTime]) && in_array($this->schema[$this->createTime], ['datetime', 'date', 'timestamp', 'int'])) { - $type = $this->schema[$this->createTime]; - } else { - $type = $this->getFieldType($this->createTime); - } - } - - return $type; - } - - /** - * 设置时间字段名称 - * @access public - * @param string $createTime - * @param string $updateTime - * @return $this - */ - public function setTimeField(string $createTime, string $updateTime) - { - $this->createTime = $createTime; - $this->updateTime = $updateTime; - - return $this; - } - - /** - * 获取自动写入时间字段 - * @access public - * @return bool|string - */ - public function getAutoWriteTimestamp() - { - return $this->autoWriteTimestamp; - } - - /** - * 设置时间字段格式化 - * @access public - * @param string|false $format - * @return $this - */ - public function setDateFormat($format) - { - $this->dateFormat = $format; - - return $this; - } - - /** - * 获取自动写入时间字段 - * @access public - * @return string|false - */ - public function getDateFormat() - { - return $this->dateFormat; - } - - /** - * 自动写入时间戳 - * @access protected - * @return mixed - */ - protected function autoWriteTimestamp() - { - // 检测时间字段类型 - $type = $this->checkTimeFieldType($this->autoWriteTimestamp); - - return is_string($type) ? $this->getTimeTypeValue($type) : time(); - } - - /** - * 获取指定类型的时间字段值 - * @access protected - * @param string $type 时间字段类型 - * @return mixed - */ - protected function getTimeTypeValue(string $type) - { - $value = time(); - - switch ($type) { - case 'datetime': - case 'date': - case 'timestamp': - $value = $this->formatDateTime('Y-m-d H:i:s.u'); - break; - default: - if (false !== strpos($type, '\\')) { - // 对象数据写入 - $obj = new $type(); - if (method_exists($obj, '__toString')) { - // 对象数据写入 - $value = $obj->__toString(); - } - } - } - - return $value; - } - - /** - * 时间日期字段格式化处理 - * @access protected - * @param mixed $format 日期格式 - * @param mixed $time 时间日期表达式 - * @param bool $timestamp 时间表达式是否为时间戳 - * @return mixed - */ - protected function formatDateTime($format, $time = 'now', bool $timestamp = false) - { - if (empty($time)) { - return $time; - } - - if (false === $format) { - return $time; - } elseif (false !== strpos($format, '\\')) { - return new $format($time); - } - - if ($time instanceof DateTime) { - $dateTime = $time; - } elseif ($timestamp) { - $dateTime = new DateTime(); - $dateTime->setTimestamp((int) $time); - } else { - $dateTime = new DateTime($time); - } - - return $dateTime->format($format); - } - - /** - * 获取时间字段值 - * @access protected - * @param mixed $value - * @return mixed - */ - protected function getTimestampValue($value) - { - $type = $this->checkTimeFieldType($this->autoWriteTimestamp); - - if (is_string($type) && in_array(strtolower($type), [ - 'datetime', 'date', 'timestamp', - ])) { - $value = $this->formatDateTime($this->dateFormat, $value); - } else { - $value = $this->formatDateTime($this->dateFormat, $value, true); - } - - return $value; - } -} diff --git a/vendor/topthink/think-orm/src/model/concern/Virtual.php b/vendor/topthink/think-orm/src/model/concern/Virtual.php deleted file mode 100644 index 66cdfb7..0000000 --- a/vendor/topthink/think-orm/src/model/concern/Virtual.php +++ /dev/null @@ -1,90 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\concern; - -use think\db\BaseQuery as Query; -use think\db\exception\DbException as Exception; - -/** - * 虚拟模型 - */ -trait Virtual -{ - /** - * 获取当前模型的数据库查询对象 - * @access public - * @param array $scope 设置不使用的全局查询范围 - * @return Query - */ - public function db($scope = []): Query - { - throw new Exception('virtual model not support db query'); - } - - /** - * 获取字段类型信息 - * @access public - * @param string $field 字段名 - * @return string|null - */ - public function getFieldType(string $field) - {} - - /** - * 保存当前数据对象 - * @access public - * @param array $data 数据 - * @param string $sequence 自增序列名 - * @return bool - */ - public function save(array $data = [], string $sequence = null): bool - { - // 数据对象赋值 - $this->setAttrs($data); - - if ($this->isEmpty() || false === $this->trigger('BeforeWrite')) { - return false; - } - - // 写入回调 - $this->trigger('AfterWrite'); - - $this->exists(true); - - return true; - } - - /** - * 删除当前的记录 - * @access public - * @return bool - */ - public function delete(): bool - { - if (!$this->isExists() || $this->isEmpty() || false === $this->trigger('BeforeDelete')) { - return false; - } - - // 关联删除 - if (!empty($this->relationWrite)) { - $this->autoRelationDelete(); - } - - $this->trigger('AfterDelete'); - - $this->exists(false); - - return true; - } - -} diff --git a/vendor/topthink/think-orm/src/model/relation/BelongsTo.php b/vendor/topthink/think-orm/src/model/relation/BelongsTo.php deleted file mode 100644 index dfac254..0000000 --- a/vendor/topthink/think-orm/src/model/relation/BelongsTo.php +++ /dev/null @@ -1,334 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\relation; - -use Closure; -use think\db\BaseQuery as Query; -use think\Model; - -/** - * BelongsTo关联类 - */ -class BelongsTo extends OneToOne -{ - /** - * 架构函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $model 模型名 - * @param string $foreignKey 关联外键 - * @param string $localKey 关联主键 - * @param string $relation 关联名 - */ - public function __construct(Model $parent, string $model, string $foreignKey, string $localKey, string $relation = null) - { - $this->parent = $parent; - $this->model = $model; - $this->foreignKey = $foreignKey; - $this->localKey = $localKey; - $this->query = (new $model)->db(); - $this->relation = $relation; - - if (get_class($parent) == $model) { - $this->selfRelation = true; - } - } - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包查询条件 - * @return Model - */ - public function getRelation(array $subRelation = [], Closure $closure = null) - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - $foreignKey = $this->foreignKey; - - $relationModel = $this->query - ->removeWhereField($this->localKey) - ->where($this->localKey, $this->parent->$foreignKey) - ->relation($subRelation) - ->find(); - - if ($relationModel) { - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($this->parent, $relationModel); - } - - $relationModel->setParent(clone $this->parent); - } else { - $relationModel = $this->getDefaultModel(); - } - - return $relationModel; - } - - /** - * 创建关联统计子查询 - * @access public - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 聚合字段别名 - * @return string - */ - public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', &$name = ''): string - { - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->query - ->whereExp($this->localKey, '=' . $this->parent->getTable() . '.' . $this->foreignKey) - ->fetchSql() - ->$aggregate($field); - } - - /** - * 关联统计 - * @access public - * @param Model $result 数据对象 - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return integer - */ - public function relationCount(Model $result, Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null) - { - $foreignKey = $this->foreignKey; - - if (!isset($result->$foreignKey)) { - return 0; - } - - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->query - ->where($this->localKey, '=', $result->$foreignKey) - ->$aggregate($field); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = '', Query $query = null): Query - { - $table = $this->query->getTable(); - $model = class_basename($this->parent); - $relation = class_basename($this->model); - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - $softDelete = $this->query->getOptions('soft_delete'); - $query = $query ?: $this->parent->db()->alias($model); - - return $query->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey, $softDelete) { - $query->table([$table => $relation]) - ->field($relation . '.' . $localKey) - ->whereExp($model . '.' . $foreignKey, '=' . $relation . '.' . $localKey) - ->when($softDelete, function ($query) use ($softDelete, $relation) { - $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); - }); - }); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function hasWhere($where = [], $fields = null, string $joinType = '', Query $query = null): Query - { - $table = $this->query->getTable(); - $model = class_basename($this->parent); - $relation = class_basename($this->model); - - if (is_array($where)) { - $this->getQueryWhere($where, $relation); - } elseif ($where instanceof Query) { - $where->via($relation); - } elseif ($where instanceof Closure) { - $where($this->query->via($relation)); - $where = $this->query; - } - - $fields = $this->getRelationQueryFields($fields, $model); - $softDelete = $this->query->getOptions('soft_delete'); - $query = $query ?: $this->parent->db(); - - return $query->alias($model) - ->field($fields) - ->join([$table => $relation], $model . '.' . $this->foreignKey . '=' . $relation . '.' . $this->localKey, $joinType ?: $this->joinType) - ->when($softDelete, function ($query) use ($softDelete, $relation) { - $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); - }) - ->where($where); - } - - /** - * 预载入关联查询(数据集) - * @access protected - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - protected function eagerlySet(array &$resultSet, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - - $range = []; - foreach ($resultSet as $result) { - // 获取关联外键列表 - if (isset($result->$foreignKey)) { - $range[] = $result->$foreignKey; - } - } - - if (!empty($range)) { - $this->query->removeWhereField($localKey); - - $data = $this->eagerlyWhere([ - [$localKey, 'in', $range], - ], $localKey, $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - // 关联模型 - if (!isset($data[$result->$foreignKey])) { - $relationModel = $this->getDefaultModel(); - } else { - $relationModel = $data[$result->$foreignKey]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - - // 设置关联属性 - $result->setRelation($relation, $relationModel); - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($result, $relationModel); - $result->hidden([$relation], true); - } - } - } - } - - /** - * 预载入关联查询(数据) - * @access protected - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - protected function eagerlyOne(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - - $this->query->removeWhereField($localKey); - - $data = $this->eagerlyWhere([ - [$localKey, '=', $result->$foreignKey], - ], $localKey, $subRelation, $closure, $cache); - - // 关联模型 - if (!isset($data[$result->$foreignKey])) { - $relationModel = $this->getDefaultModel(); - } else { - $relationModel = $data[$result->$foreignKey]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - - // 设置关联属性 - $result->setRelation($relation, $relationModel); - - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($result, $relationModel); - $result->hidden([$relation], true); - } - } - - /** - * 添加关联数据 - * @access public - * @param Model $model关联模型对象 - * @return Model - */ - public function associate(Model $model): Model - { - $this->parent->setAttr($this->foreignKey, $model->getKey()); - $this->parent->save(); - - return $this->parent->setRelation($this->relation, $model); - } - - /** - * 注销关联数据 - * @access public - * @return Model - */ - public function dissociate(): Model - { - $foreignKey = $this->foreignKey; - - $this->parent->setAttr($foreignKey, null); - $this->parent->save(); - - return $this->parent->setRelation($this->relation, null); - } - - /** - * 执行基础查询(仅执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - { - if (empty($this->baseQuery)) { - if (isset($this->parent->{$this->foreignKey})) { - // 关联查询带入关联条件 - $this->query->where($this->localKey, '=', $this->parent->{$this->foreignKey}); - } - - $this->baseQuery = true; - } - } -} diff --git a/vendor/topthink/think-orm/src/model/relation/BelongsToMany.php b/vendor/topthink/think-orm/src/model/relation/BelongsToMany.php deleted file mode 100644 index 8c74f34..0000000 --- a/vendor/topthink/think-orm/src/model/relation/BelongsToMany.php +++ /dev/null @@ -1,633 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\model\relation; - -use Closure; -use think\Collection; -use think\db\BaseQuery as Query; -use think\db\exception\DbException as Exception; -use think\db\Raw; -use think\Model; -use think\model\Pivot; -use think\model\Relation; - -/** - * 多对多关联类 - */ -class BelongsToMany extends Relation -{ - /** - * 中间表表名 - * @var string - */ - protected $middle; - - /** - * 中间表模型名称 - * @var string - */ - protected $pivotName; - - /** - * 中间表模型对象 - * @var Pivot - */ - protected $pivot; - - /** - * 中间表数据名称 - * @var string - */ - protected $pivotDataName = 'pivot'; - - /** - * 架构函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $model 模型名 - * @param string $middle 中间表/模型名 - * @param string $foreignKey 关联模型外键 - * @param string $localKey 当前模型关联键 - */ - public function __construct(Model $parent, string $model, string $middle, string $foreignKey, string $localKey) - { - $this->parent = $parent; - $this->model = $model; - $this->foreignKey = $foreignKey; - $this->localKey = $localKey; - - if (false !== strpos($middle, '\\')) { - $this->pivotName = $middle; - $this->middle = class_basename($middle); - } else { - $this->middle = $middle; - } - - $this->query = (new $model)->db(); - $this->pivot = $this->newPivot(); - } - - /** - * 设置中间表模型 - * @access public - * @param $pivot - * @return $this - */ - public function pivot(string $pivot) - { - $this->pivotName = $pivot; - return $this; - } - - /** - * 设置中间表数据名称 - * @access public - * @param string $name - * @return $this - */ - public function name(string $name) - { - $this->pivotDataName = $name; - return $this; - } - - /** - * 实例化中间表模型 - * @access public - * @param $data - * @return Pivot - * @throws Exception - */ - protected function newPivot(array $data = []): Pivot - { - $class = $this->pivotName ?: Pivot::class; - $pivot = new $class($data, $this->parent, $this->middle); - - if ($pivot instanceof Pivot) { - return $pivot; - } else { - throw new Exception('pivot model must extends: \think\model\Pivot'); - } - } - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包查询条件 - * @return Collection - */ - public function getRelation(array $subRelation = [], Closure $closure = null): Collection - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - return $this->relation($subRelation) - ->select() - ->setParent(clone $this->parent); - } - - /** - * 组装Pivot模型 - * @access public - * @param Model $result 模型对象 - * @return array - */ - protected function matchPivot(Model $result): array - { - $pivot = []; - foreach ($result->getData() as $key => $val) { - if (strpos($key, '__')) { - [$name, $attr] = explode('__', $key, 2); - - if ('pivot' == $name) { - $pivot[$attr] = $val; - unset($result->$key); - } - } - } - - $pivotData = $this->pivot->newInstance($pivot, [ - [$this->localKey, '=', $this->parent->getKey(), null], - [$this->foreignKey, '=', $result->getKey(), null], - ]); - - $result->setRelation($this->pivotDataName, $pivotData); - return $pivot; - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Model - */ - public function has(string $operator = '>=', $count = 1, $id = '*', string $joinType = 'INNER', Query $query = null) - { - return $this->parent; - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - * @throws Exception - */ - public function hasWhere($where = [], $fields = null, string $joinType = '', Query $query = null) - { - throw new Exception('relation not support: hasWhere'); - } - - /** - * 设置中间表的查询条件 - * @access public - * @param string $field - * @param string $op - * @param mixed $condition - * @return $this - */ - public function wherePivot($field, $op = null, $condition = null) - { - $this->query->where('pivot.' . $field, $op, $condition); - return $this; - } - - /** - * 预载入关联查询(数据集) - * @access public - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation, Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $pk = $resultSet[0]->getPk(); - $range = []; - - foreach ($resultSet as $result) { - // 获取关联外键列表 - if (isset($result->$pk)) { - $range[] = $result->$pk; - } - } - - if (!empty($range)) { - // 查询关联数据 - $data = $this->eagerlyManyToMany([ - ['pivot.' . $localKey, 'in', $range], - ], $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - if (!isset($data[$result->$pk])) { - $data[$result->$pk] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$result->$pk], clone $this->parent)); - } - } - } - - /** - * 预载入关联查询(单个数据) - * @access public - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation, Closure $closure = null, array $cache = []): void - { - $pk = $result->getPk(); - - if (isset($result->$pk)) { - $pk = $result->$pk; - // 查询管理数据 - $data = $this->eagerlyManyToMany([ - ['pivot.' . $this->localKey, '=', $pk], - ], $subRelation, $closure, $cache); - - // 关联数据封装 - if (!isset($data[$pk])) { - $data[$pk] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$pk], clone $this->parent)); - } - } - - /** - * 关联统计 - * @access public - * @param Model $result 数据对象 - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return integer - */ - public function relationCount(Model $result, Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): float - { - $pk = $result->getPk(); - - if (!isset($result->$pk)) { - return 0; - } - - $pk = $result->$pk; - - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [ - ['pivot.' . $this->localKey, '=', $pk], - ])->$aggregate($field); - } - - /** - * 获取关联统计子查询 - * @access public - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return string - */ - public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): string - { - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [ - [ - 'pivot.' . $this->localKey, 'exp', new Raw('=' . $this->parent->db(false)->getTable() . '.' . $this->parent->getPk()), - ], - ])->fetchSql()->$aggregate($field); - } - - /** - * 多对多 关联模型预查询 - * @access protected - * @param array $where 关联预查询条件 - * @param array $subRelation 子关联 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return array - */ - protected function eagerlyManyToMany(array $where, array $subRelation = [], Closure $closure = null, array $cache = []): array - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - $withLimit = $this->query->getOptions('limit'); - if ($withLimit) { - $this->query->removeOption('limit'); - } - - // 预载入关联查询 支持嵌套预载入 - $list = $this->belongsToManyQuery($this->foreignKey, $this->localKey, $where) - ->with($subRelation) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->select(); - - // 组装模型数据 - $data = []; - foreach ($list as $set) { - $pivot = $this->matchPivot($set); - $key = $pivot[$this->localKey]; - - if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) { - continue; - } - - $data[$key][] = $set; - } - - return $data; - } - - /** - * BELONGS TO MANY 关联查询 - * @access protected - * @param string $foreignKey 关联模型关联键 - * @param string $localKey 当前模型关联键 - * @param array $condition 关联查询条件 - * @return Query - */ - protected function belongsToManyQuery(string $foreignKey, string $localKey, array $condition = []): Query - { - // 关联查询封装 - if (empty($this->baseQuery)) { - $tableName = $this->query->getTable(); - $table = $this->pivot->db()->getTable(); - - if ($this->withoutField) { - $this->query->withoutField($this->withoutField); - } - - $fields = $this->getQueryFields($tableName); - - $this->query - ->field($fields) - ->tableField(true, $table, 'pivot', 'pivot__') - ->join([$table => 'pivot'], 'pivot.' . $foreignKey . '=' . $tableName . '.' . $this->query->getPk()) - ->where($condition); - - } - - return $this->query; - } - - /** - * 保存(新增)当前关联数据对象 - * @access public - * @param mixed $data 数据 可以使用数组 关联模型对象 和 关联对象的主键 - * @param array $pivot 中间表额外数据 - * @return array|Pivot - */ - public function save($data, array $pivot = []) - { - // 保存关联表/中间表数据 - return $this->attach($data, $pivot); - } - - /** - * 批量保存当前关联数据对象 - * @access public - * @param iterable $dataSet 数据集 - * @param array $pivot 中间表额外数据 - * @param bool $samePivot 额外数据是否相同 - * @return array|false - */ - public function saveAll(iterable $dataSet, array $pivot = [], bool $samePivot = false) - { - $result = []; - - foreach ($dataSet as $key => $data) { - if (!$samePivot) { - $pivotData = $pivot[$key] ?? []; - } else { - $pivotData = $pivot; - } - - $result[] = $this->attach($data, $pivotData); - } - - return empty($result) ? false : $result; - } - - /** - * 附加关联的一个中间表数据 - * @access public - * @param mixed $data 数据 可以使用数组、关联模型对象 或者 关联对象的主键 - * @param array $pivot 中间表额外数据 - * @return array|Pivot - * @throws Exception - */ - public function attach($data, array $pivot = []) - { - if (is_array($data)) { - if (key($data) === 0) { - $id = $data; - } else { - // 保存关联表数据 - $model = new $this->model; - $id = $model->insertGetId($data); - } - } elseif (is_numeric($data) || is_string($data)) { - // 根据关联表主键直接写入中间表 - $id = $data; - } elseif ($data instanceof Model) { - // 根据关联表主键直接写入中间表 - $id = $data->getKey(); - } - - if (!empty($id)) { - // 保存中间表数据 - $pivot[$this->localKey] = $this->parent->getKey(); - - $ids = (array) $id; - foreach ($ids as $id) { - $pivot[$this->foreignKey] = $id; - $this->pivot->replace() - ->exists(false) - ->data([]) - ->save($pivot); - $result[] = $this->newPivot($pivot); - } - - if (count($result) == 1) { - // 返回中间表模型对象 - $result = $result[0]; - } - - return $result; - } else { - throw new Exception('miss relation data'); - } - } - - /** - * 判断是否存在关联数据 - * @access public - * @param mixed $data 数据 可以使用关联模型对象 或者 关联对象的主键 - * @return Pivot|false - */ - public function attached($data) - { - if ($data instanceof Model) { - $id = $data->getKey(); - } else { - $id = $data; - } - - $pivot = $this->pivot - ->where($this->localKey, $this->parent->getKey()) - ->where($this->foreignKey, $id) - ->find(); - - return $pivot ?: false; - } - - /** - * 解除关联的一个中间表数据 - * @access public - * @param integer|array $data 数据 可以使用关联对象的主键 - * @param bool $relationDel 是否同时删除关联表数据 - * @return integer - */ - public function detach($data = null, bool $relationDel = false): int - { - if (is_array($data)) { - $id = $data; - } elseif (is_numeric($data) || is_string($data)) { - // 根据关联表主键直接写入中间表 - $id = $data; - } elseif ($data instanceof Model) { - // 根据关联表主键直接写入中间表 - $id = $data->getKey(); - } - - // 删除中间表数据 - $pivot = []; - $pivot[] = [$this->localKey, '=', $this->parent->getKey()]; - - if (isset($id)) { - $pivot[] = [$this->foreignKey, is_array($id) ? 'in' : '=', $id]; - } - - $result = $this->pivot->where($pivot)->delete(); - - // 删除关联表数据 - if (isset($id) && $relationDel) { - $model = $this->model; - $model::destroy($id); - } - - return $result; - } - - /** - * 数据同步 - * @access public - * @param array $ids - * @param bool $detaching - * @return array - */ - public function sync(array $ids, bool $detaching = true): array - { - $changes = [ - 'attached' => [], - 'detached' => [], - 'updated' => [], - ]; - - $current = $this->pivot - ->where($this->localKey, $this->parent->getKey()) - ->column($this->foreignKey); - - $records = []; - - foreach ($ids as $key => $value) { - if (!is_array($value)) { - $records[$value] = []; - } else { - $records[$key] = $value; - } - } - - $detach = array_diff($current, array_keys($records)); - - if ($detaching && count($detach) > 0) { - $this->detach($detach); - $changes['detached'] = $detach; - } - - foreach ($records as $id => $attributes) { - if (!in_array($id, $current)) { - $this->attach($id, $attributes); - $changes['attached'][] = $id; - } elseif (count($attributes) > 0 && $this->attach($id, $attributes)) { - $changes['updated'][] = $id; - } - } - - return $changes; - } - - /** - * 执行基础查询(仅执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - { - if (empty($this->baseQuery)) { - $foreignKey = $this->foreignKey; - $localKey = $this->localKey; - - $this->query->filter(function ($result, $options) { - $this->matchPivot($result); - }); - - // 关联查询 - if (null === $this->parent->getKey()) { - $condition = ['pivot.' . $localKey, 'exp', new Raw('=' . $this->parent->getTable() . '.' . $this->parent->getPk())]; - } else { - $condition = ['pivot.' . $localKey, '=', $this->parent->getKey()]; - } - - $this->belongsToManyQuery($foreignKey, $localKey, [$condition]); - - $this->baseQuery = true; - } - } - -} diff --git a/vendor/topthink/think-orm/src/model/relation/HasMany.php b/vendor/topthink/think-orm/src/model/relation/HasMany.php deleted file mode 100644 index 4624955..0000000 --- a/vendor/topthink/think-orm/src/model/relation/HasMany.php +++ /dev/null @@ -1,376 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\relation; - -use Closure; -use think\Collection; -use think\db\BaseQuery as Query; -use think\Model; -use think\model\Relation; - -/** - * 一对多关联类 - */ -class HasMany extends Relation -{ - /** - * 架构函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $model 模型名 - * @param string $foreignKey 关联外键 - * @param string $localKey 当前模型主键 - */ - public function __construct(Model $parent, string $model, string $foreignKey, string $localKey) - { - $this->parent = $parent; - $this->model = $model; - $this->foreignKey = $foreignKey; - $this->localKey = $localKey; - $this->query = (new $model)->db(); - - if (get_class($parent) == $model) { - $this->selfRelation = true; - } - } - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包查询条件 - * @return Collection - */ - public function getRelation(array $subRelation = [], Closure $closure = null): Collection - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - return $this->query - ->where($this->foreignKey, $this->parent->{$this->localKey}) - ->relation($subRelation) - ->select() - ->setParent(clone $this->parent); - } - - /** - * 预载入关联查询 - * @access public - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation, Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $range = []; - - foreach ($resultSet as $result) { - // 获取关联外键列表 - if (isset($result->$localKey)) { - $range[] = $result->$localKey; - } - } - - if (!empty($range)) { - $data = $this->eagerlyOneToMany([ - [$this->foreignKey, 'in', $range], - ], $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - $pk = $result->$localKey; - if (!isset($data[$pk])) { - $data[$pk] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$pk], clone $this->parent)); - } - } - } - - /** - * 预载入关联查询 - * @access public - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - - if (isset($result->$localKey)) { - $pk = $result->$localKey; - $data = $this->eagerlyOneToMany([ - [$this->foreignKey, '=', $pk], - ], $subRelation, $closure, $cache); - - // 关联数据封装 - if (!isset($data[$pk])) { - $data[$pk] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$pk], clone $this->parent)); - } - } - - /** - * 关联统计 - * @access public - * @param Model $result 数据对象 - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return integer - */ - public function relationCount(Model $result, Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null) - { - $localKey = $this->localKey; - - if (!isset($result->$localKey)) { - return 0; - } - - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->query - ->where($this->foreignKey, '=', $result->$localKey) - ->$aggregate($field); - } - - /** - * 创建关联统计子查询 - * @access public - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return string - */ - public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): string - { - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->query->alias($aggregate . '_table') - ->whereExp($aggregate . '_table.' . $this->foreignKey, '=' . $this->parent->getTable() . '.' . $this->localKey) - ->fetchSql() - ->$aggregate($field); - } - - /** - * 一对多 关联模型预查询 - * @access public - * @param array $where 关联预查询条件 - * @param array $subRelation 子关联 - * @param Closure $closure - * @param array $cache 关联缓存 - * @return array - */ - protected function eagerlyOneToMany(array $where, array $subRelation = [], Closure $closure = null, array $cache = []): array - { - $foreignKey = $this->foreignKey; - - $this->query->removeWhereField($this->foreignKey); - - // 预载入关联查询 支持嵌套预载入 - if ($closure) { - $this->baseQuery = true; - $closure($this->getClosureType($closure)); - } - - if ($this->withoutField) { - $this->query->withoutField($this->withoutField); - } - - $withLimit = $this->query->getOptions('limit'); - if ($withLimit) { - $this->query->removeOption('limit'); - } - - $list = $this->query - ->where($where) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->with($subRelation) - ->select(); - - // 组装模型数据 - $data = []; - - foreach ($list as $set) { - $key = $set->$foreignKey; - - if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) { - continue; - } - - $data[$key][] = $set; - } - - return $data; - } - - /** - * 保存(新增)当前关联数据对象 - * @access public - * @param mixed $data 数据 可以使用数组 关联模型对象 - * @param boolean $replace 是否自动识别更新和写入 - * @return Model|false - */ - public function save($data, bool $replace = true) - { - if ($data instanceof Model) { - $data = $data->getData(); - } - - $model = $this->make(); - - return $model->replace($replace)->save($data) ? $model : false; - } - - /** - * 创建关联对象实例 - * @param array|Model $data - * @return Model - */ - public function make($data = []): Model - { - if ($data instanceof Model) { - $data = $data->getData(); - } - - // 保存关联表数据 - $data[$this->foreignKey] = $this->parent->{$this->localKey}; - - return new $this->model($data); - } - - /** - * 批量保存当前关联数据对象 - * @access public - * @param iterable $dataSet 数据集 - * @param boolean $replace 是否自动识别更新和写入 - * @return array|false - */ - public function saveAll(iterable $dataSet, bool $replace = true) - { - $result = []; - - foreach ($dataSet as $key => $data) { - $result[] = $this->save($data, $replace); - } - - return empty($result) ? false : $result; - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = 'INNER', Query $query = null): Query - { - $table = $this->query->getTable(); - - $model = class_basename($this->parent); - $relation = class_basename($this->model); - - if ('*' != $id) { - $id = $relation . '.' . (new $this->model)->getPk(); - } - - $softDelete = $this->query->getOptions('soft_delete'); - $query = $query ?: $this->parent->db()->alias($model); - - return $query->field($model . '.*') - ->join([$table => $relation], $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $joinType) - ->when($softDelete, function ($query) use ($softDelete, $relation) { - $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); - }) - ->group($relation . '.' . $this->foreignKey) - ->having('count(' . $id . ')' . $operator . $count); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function hasWhere($where = [], $fields = null, string $joinType = '', Query $query = null): Query - { - $table = $this->query->getTable(); - $model = class_basename($this->parent); - $relation = class_basename($this->model); - - if (is_array($where)) { - $this->getQueryWhere($where, $relation); - } elseif ($where instanceof Query) { - $where->via($relation); - } elseif ($where instanceof Closure) { - $where($this->query->via($relation)); - $where = $this->query; - } - - $fields = $this->getRelationQueryFields($fields, $model); - $softDelete = $this->query->getOptions('soft_delete'); - $query = $query ?: $this->parent->db(); - - return $query->alias($model) - ->group($model . '.' . $this->localKey) - ->field($fields) - ->join([$table => $relation], $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $joinType) - ->when($softDelete, function ($query) use ($softDelete, $relation) { - $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); - }) - ->where($where); - } - - /** - * 执行基础查询(仅执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - { - if (empty($this->baseQuery)) { - if (isset($this->parent->{$this->localKey})) { - // 关联查询带入关联条件 - $this->query->where($this->foreignKey, '=', $this->parent->{$this->localKey}); - } - - $this->baseQuery = true; - } - } - -} diff --git a/vendor/topthink/think-orm/src/model/relation/HasManyThrough.php b/vendor/topthink/think-orm/src/model/relation/HasManyThrough.php deleted file mode 100644 index 4f14399..0000000 --- a/vendor/topthink/think-orm/src/model/relation/HasManyThrough.php +++ /dev/null @@ -1,395 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\model\relation; - -use Closure; -use think\Collection; -use think\db\BaseQuery as Query; -use think\helper\Str; -use think\Model; -use think\model\Relation; - -/** - * 远程一对多关联类 - */ -class HasManyThrough extends Relation -{ - /** - * 中间关联表外键 - * @var string - */ - protected $throughKey; - - /** - * 中间主键 - * @var string - */ - protected $throughPk; - - /** - * 中间表查询对象 - * @var Query - */ - protected $through; - - /** - * 架构函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $model 关联模型名 - * @param string $through 中间模型名 - * @param string $foreignKey 关联外键 - * @param string $throughKey 中间关联外键 - * @param string $localKey 当前模型主键 - * @param string $throughPk 中间模型主键 - */ - public function __construct(Model $parent, string $model, string $through, string $foreignKey, string $throughKey, string $localKey, string $throughPk) - { - $this->parent = $parent; - $this->model = $model; - $this->through = (new $through)->db(); - $this->foreignKey = $foreignKey; - $this->throughKey = $throughKey; - $this->localKey = $localKey; - $this->throughPk = $throughPk; - $this->query = (new $model)->db(); - } - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包查询条件 - * @return Collection - */ - public function getRelation(array $subRelation = [], Closure $closure = null) - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - $this->baseQuery(); - - return $this->query->relation($subRelation) - ->select() - ->setParent(clone $this->parent); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = '', Query $query = null): Query - { - $model = Str::snake(class_basename($this->parent)); - $throughTable = $this->through->getTable(); - $pk = $this->throughPk; - $throughKey = $this->throughKey; - $relation = new $this->model; - $relationTable = $relation->getTable(); - $softDelete = $this->query->getOptions('soft_delete'); - - if ('*' != $id) { - $id = $relationTable . '.' . $relation->getPk(); - } - $query = $query ?: $this->parent->db()->alias($model); - - return $query->field($model . '.*') - ->join($throughTable, $throughTable . '.' . $this->foreignKey . '=' . $model . '.' . $this->localKey) - ->join($relationTable, $relationTable . '.' . $throughKey . '=' . $throughTable . '.' . $this->throughPk) - ->when($softDelete, function ($query) use ($softDelete, $relationTable) { - $query->where($relationTable . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); - }) - ->group($relationTable . '.' . $this->throughKey) - ->having('count(' . $id . ')' . $operator . $count); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function hasWhere($where = [], $fields = null, $joinType = '', Query $query = null): Query - { - $model = Str::snake(class_basename($this->parent)); - $throughTable = $this->through->getTable(); - $pk = $this->throughPk; - $throughKey = $this->throughKey; - $modelTable = (new $this->model)->getTable(); - - if (is_array($where)) { - $this->getQueryWhere($where, $modelTable); - } elseif ($where instanceof Query) { - $where->via($modelTable); - } elseif ($where instanceof Closure) { - $where($this->query->via($modelTable)); - $where = $this->query; - } - - $fields = $this->getRelationQueryFields($fields, $model); - $softDelete = $this->query->getOptions('soft_delete'); - $query = $query ?: $this->parent->db(); - - return $query->alias($model) - ->join($throughTable, $throughTable . '.' . $this->foreignKey . '=' . $model . '.' . $this->localKey) - ->join($modelTable, $modelTable . '.' . $throughKey . '=' . $throughTable . '.' . $this->throughPk, $joinType) - ->when($softDelete, function ($query) use ($softDelete, $modelTable) { - $query->where($modelTable . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); - }) - ->group($modelTable . '.' . $this->throughKey) - ->where($where) - ->field($fields); - } - - /** - * 预载入关联查询(数据集) - * @access protected - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - - $range = []; - foreach ($resultSet as $result) { - // 获取关联外键列表 - if (isset($result->$localKey)) { - $range[] = $result->$localKey; - } - } - - if (!empty($range)) { - $this->query->removeWhereField($foreignKey); - - $data = $this->eagerlyWhere([ - [$this->foreignKey, 'in', $range], - ], $foreignKey, $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - $pk = $result->$localKey; - if (!isset($data[$pk])) { - $data[$pk] = []; - } - - // 设置关联属性 - $result->setRelation($relation, $this->resultSetBuild($data[$pk], clone $this->parent)); - } - } - } - - /** - * 预载入关联查询(数据) - * @access protected - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - $pk = $result->$localKey; - - $this->query->removeWhereField($foreignKey); - - $data = $this->eagerlyWhere([ - [$foreignKey, '=', $pk], - ], $foreignKey, $subRelation, $closure, $cache); - - // 关联数据封装 - if (!isset($data[$pk])) { - $data[$pk] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$pk], clone $this->parent)); - } - - /** - * 关联模型预查询 - * @access public - * @param array $where 关联预查询条件 - * @param string $key 关联键名 - * @param array $subRelation 子关联 - * @param Closure $closure - * @param array $cache 关联缓存 - * @return array - */ - protected function eagerlyWhere(array $where, string $key, array $subRelation = [], Closure $closure = null, array $cache = []): array - { - // 预载入关联查询 支持嵌套预载入 - $throughList = $this->through->where($where)->select(); - $keys = $throughList->column($this->throughPk, $this->throughPk); - - if ($closure) { - $this->baseQuery = true; - $closure($this->getClosureType($closure)); - } - - $throughKey = $this->throughKey; - - if ($this->baseQuery) { - $throughKey = Str::snake(class_basename($this->model)) . "." . $this->throughKey; - } - - $withLimit = $this->query->getOptions('limit'); - if ($withLimit) { - $this->query->removeOption('limit'); - } - - $list = $this->query - ->where($throughKey, 'in', $keys) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->select(); - - // 组装模型数据 - $data = []; - $keys = $throughList->column($this->foreignKey, $this->throughPk); - - foreach ($list as $set) { - $key = $keys[$set->{$this->throughKey}]; - - if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) { - continue; - } - - $data[$key][] = $set; - } - - return $data; - } - - /** - * 关联统计 - * @access public - * @param Model $result 数据对象 - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return mixed - */ - public function relationCount(Model $result, Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null) - { - $localKey = $this->localKey; - - if (!isset($result->$localKey)) { - return 0; - } - - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - $alias = Str::snake(class_basename($this->model)); - $throughTable = $this->through->getTable(); - $pk = $this->throughPk; - $throughKey = $this->throughKey; - $modelTable = $this->parent->getTable(); - - if (false === strpos($field, '.')) { - $field = $alias . '.' . $field; - } - - return $this->query - ->alias($alias) - ->join($throughTable, $throughTable . '.' . $pk . '=' . $alias . '.' . $throughKey) - ->join($modelTable, $modelTable . '.' . $this->localKey . '=' . $throughTable . '.' . $this->foreignKey) - ->where($throughTable . '.' . $this->foreignKey, $result->$localKey) - ->$aggregate($field); - } - - /** - * 创建关联统计子查询 - * @access public - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return string - */ - public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): string - { - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - $alias = Str::snake(class_basename($this->model)); - $throughTable = $this->through->getTable(); - $pk = $this->throughPk; - $throughKey = $this->throughKey; - $modelTable = $this->parent->getTable(); - - if (false === strpos($field, '.')) { - $field = $alias . '.' . $field; - } - - return $this->query - ->alias($alias) - ->join($throughTable, $throughTable . '.' . $pk . '=' . $alias . '.' . $throughKey) - ->join($modelTable, $modelTable . '.' . $this->localKey . '=' . $throughTable . '.' . $this->foreignKey) - ->whereExp($throughTable . '.' . $this->foreignKey, '=' . $this->parent->getTable() . '.' . $this->localKey) - ->fetchSql() - ->$aggregate($field); - } - - /** - * 执行基础查询(仅执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - { - if (empty($this->baseQuery) && $this->parent->getData()) { - $alias = Str::snake(class_basename($this->model)); - $throughTable = $this->through->getTable(); - $pk = $this->throughPk; - $throughKey = $this->throughKey; - $modelTable = $this->parent->getTable(); - - if ($this->withoutField) { - $this->query->withoutField($this->withoutField); - } - - $fields = $this->getQueryFields($alias); - - $this->query - ->field($fields) - ->alias($alias) - ->join($throughTable, $throughTable . '.' . $pk . '=' . $alias . '.' . $throughKey) - ->join($modelTable, $modelTable . '.' . $this->localKey . '=' . $throughTable . '.' . $this->foreignKey) - ->where($throughTable . '.' . $this->foreignKey, $this->parent->{$this->localKey}); - - $this->baseQuery = true; - } - } - -} diff --git a/vendor/topthink/think-orm/src/model/relation/HasOne.php b/vendor/topthink/think-orm/src/model/relation/HasOne.php deleted file mode 100644 index b941f6e..0000000 --- a/vendor/topthink/think-orm/src/model/relation/HasOne.php +++ /dev/null @@ -1,304 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\model\relation; - -use Closure; -use think\db\BaseQuery as Query; -use think\Model; - -/** - * HasOne 关联类 - */ -class HasOne extends OneToOne -{ - /** - * 架构函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $model 模型名 - * @param string $foreignKey 关联外键 - * @param string $localKey 当前模型主键 - */ - public function __construct(Model $parent, string $model, string $foreignKey, string $localKey) - { - $this->parent = $parent; - $this->model = $model; - $this->foreignKey = $foreignKey; - $this->localKey = $localKey; - $this->query = (new $model)->db(); - - if (get_class($parent) == $model) { - $this->selfRelation = true; - } - } - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包查询条件 - * @return Model - */ - public function getRelation(array $subRelation = [], Closure $closure = null) - { - $localKey = $this->localKey; - - if ($closure) { - $closure($this->getClosureType($closure)); - } - - // 判断关联类型执行查询 - $relationModel = $this->query - ->removeWhereField($this->foreignKey) - ->where($this->foreignKey, $this->parent->$localKey) - ->relation($subRelation) - ->find(); - - if ($relationModel) { - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($this->parent, $relationModel); - } - - $relationModel->setParent(clone $this->parent); - } else { - $relationModel = $this->getDefaultModel(); - } - - return $relationModel; - } - - /** - * 创建关联统计子查询 - * @access public - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return string - */ - public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): string - { - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->query - ->whereExp($this->foreignKey, '=' . $this->parent->getTable() . '.' . $this->localKey) - ->fetchSql() - ->$aggregate($field); - } - - /** - * 关联统计 - * @access public - * @param Model $result 数据对象 - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return integer - */ - public function relationCount(Model $result, Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null) - { - $localKey = $this->localKey; - - if (!isset($result->$localKey)) { - return 0; - } - - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->query - ->where($this->foreignKey, '=', $result->$localKey) - ->$aggregate($field); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = '', Query $query = null): Query - { - $table = $this->query->getTable(); - $model = class_basename($this->parent); - $relation = class_basename($this->model); - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - $softDelete = $this->query->getOptions('soft_delete'); - $query = $query ?: $this->parent->db()->alias($model); - - return $query->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey, $softDelete) { - $query->table([$table => $relation]) - ->field($relation . '.' . $foreignKey) - ->whereExp($model . '.' . $localKey, '=' . $relation . '.' . $foreignKey) - ->when($softDelete, function ($query) use ($softDelete, $relation) { - $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); - }); - }); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function hasWhere($where = [], $fields = null, string $joinType = '', Query $query = null): Query - { - $table = $this->query->getTable(); - $model = class_basename($this->parent); - $relation = class_basename($this->model); - - if (is_array($where)) { - $this->getQueryWhere($where, $relation); - } elseif ($where instanceof Query) { - $where->via($relation); - } elseif ($where instanceof Closure) { - $where($this->query->via($relation)); - $where = $this->query; - } - - $fields = $this->getRelationQueryFields($fields, $model); - $softDelete = $this->query->getOptions('soft_delete'); - $query = $query ?: $this->parent->db(); - - return $query->alias($model) - ->field($fields) - ->join([$table => $relation], $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $joinType ?: $this->joinType) - ->when($softDelete, function ($query) use ($softDelete, $relation) { - $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); - }) - ->where($where); - } - - /** - * 预载入关联查询(数据集) - * @access protected - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - protected function eagerlySet(array &$resultSet, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - - $range = []; - foreach ($resultSet as $result) { - // 获取关联外键列表 - if (isset($result->$localKey)) { - $range[] = $result->$localKey; - } - } - - if (!empty($range)) { - $this->query->removeWhereField($foreignKey); - - $data = $this->eagerlyWhere([ - [$foreignKey, 'in', $range], - ], $foreignKey, $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - // 关联模型 - if (!isset($data[$result->$localKey])) { - $relationModel = $this->getDefaultModel(); - } else { - $relationModel = $data[$result->$localKey]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - // 设置关联属性 - $result->setRelation($relation, $relationModel); - - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($result, $relationModel); - $result->hidden([$relation], true); - } - } - } - } - - /** - * 预载入关联查询(数据) - * @access protected - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - protected function eagerlyOne(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - - $this->query->removeWhereField($foreignKey); - - $data = $this->eagerlyWhere([ - [$foreignKey, '=', $result->$localKey], - ], $foreignKey, $subRelation, $closure, $cache); - - // 关联模型 - if (!isset($data[$result->$localKey])) { - $relationModel = $this->getDefaultModel(); - } else { - $relationModel = $data[$result->$localKey]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - - // 设置关联属性 - $result->setRelation($relation, $relationModel); - - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($result, $relationModel); - $result->hidden([$relation], true); - } - } - - /** - * 执行基础查询(仅执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - { - if (empty($this->baseQuery)) { - if (isset($this->parent->{$this->localKey})) { - // 关联查询带入关联条件 - $this->query->where($this->foreignKey, '=', $this->parent->{$this->localKey}); - } - - $this->baseQuery = true; - } - } -} diff --git a/vendor/topthink/think-orm/src/model/relation/HasOneThrough.php b/vendor/topthink/think-orm/src/model/relation/HasOneThrough.php deleted file mode 100644 index 2734c13..0000000 --- a/vendor/topthink/think-orm/src/model/relation/HasOneThrough.php +++ /dev/null @@ -1,164 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\model\relation; - -use Closure; -use think\Model; - -/** - * 远程一对一关联类 - */ -class HasOneThrough extends HasManyThrough -{ - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包查询条件 - * @return Model - */ - public function getRelation(array $subRelation = [], Closure $closure = null) - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - $this->baseQuery(); - - $relationModel = $this->query->relation($subRelation)->find(); - - if ($relationModel) { - $relationModel->setParent(clone $this->parent); - } else { - $relationModel = $this->getDefaultModel(); - } - - return $relationModel; - } - - /** - * 预载入关联查询(数据集) - * @access protected - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - - $range = []; - foreach ($resultSet as $result) { - // 获取关联外键列表 - if (isset($result->$localKey)) { - $range[] = $result->$localKey; - } - } - - if (!empty($range)) { - $this->query->removeWhereField($foreignKey); - - $data = $this->eagerlyWhere([ - [$this->foreignKey, 'in', $range], - ], $foreignKey, $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - // 关联模型 - if (!isset($data[$result->$localKey])) { - $relationModel = $this->getDefaultModel(); - } else { - $relationModel = $data[$result->$localKey]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - - // 设置关联属性 - $result->setRelation($relation, $relationModel); - } - } - } - - /** - * 预载入关联查询(数据) - * @access protected - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $localKey = $this->localKey; - $foreignKey = $this->foreignKey; - - $this->query->removeWhereField($foreignKey); - - $data = $this->eagerlyWhere([ - [$foreignKey, '=', $result->$localKey], - ], $foreignKey, $subRelation, $closure, $cache); - - // 关联模型 - if (!isset($data[$result->$localKey])) { - $relationModel = $this->getDefaultModel(); - } else { - $relationModel = $data[$result->$localKey]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - - $result->setRelation($relation, $relationModel); - } - - /** - * 关联模型预查询 - * @access public - * @param array $where 关联预查询条件 - * @param string $key 关联键名 - * @param array $subRelation 子关联 - * @param Closure $closure - * @param array $cache 关联缓存 - * @return array - */ - protected function eagerlyWhere(array $where, string $key, array $subRelation = [], Closure $closure = null, array $cache = []): array - { - // 预载入关联查询 支持嵌套预载入 - $keys = $this->through->where($where)->column($this->throughPk, $this->foreignKey); - - if ($closure) { - $closure($this->getClosureType($closure)); - } - - $list = $this->query - ->where($this->throughKey, 'in', $keys) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->select(); - - // 组装模型数据 - $data = []; - $keys = array_flip($keys); - - foreach ($list as $set) { - $data[$keys[$set->{$this->throughKey}]] = $set; - } - - return $data; - } - -} diff --git a/vendor/topthink/think-orm/src/model/relation/MorphMany.php b/vendor/topthink/think-orm/src/model/relation/MorphMany.php deleted file mode 100644 index ed0dd40..0000000 --- a/vendor/topthink/think-orm/src/model/relation/MorphMany.php +++ /dev/null @@ -1,385 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\model\relation; - -use Closure; -use think\Collection; -use think\db\BaseQuery as Query; -use think\db\exception\DbException as Exception; -use think\Model; -use think\model\Relation; - -/** - * 多态一对多关联 - */ -class MorphMany extends Relation -{ - - /** - * 多态关联外键 - * @var string - */ - protected $morphKey; - - /** - * 多态字段名 - * @var string - */ - protected $morphType; - - /** - * 多态类型 - * @var string - */ - protected $type; - - /** - * 架构函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $model 模型名 - * @param string $morphKey 关联外键 - * @param string $morphType 多态字段名 - * @param string $type 多态类型 - */ - public function __construct(Model $parent, string $model, string $morphKey, string $morphType, string $type) - { - $this->parent = $parent; - $this->model = $model; - $this->type = $type; - $this->morphKey = $morphKey; - $this->morphType = $morphType; - $this->query = (new $model)->db(); - } - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包查询条件 - * @return Collection - */ - public function getRelation(array $subRelation = [], Closure $closure = null): Collection - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - $this->baseQuery(); - - return $this->query->relation($subRelation) - ->select() - ->setParent(clone $this->parent); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = '', Query $query = null) - { - throw new Exception('relation not support: has'); - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function hasWhere($where = [], $fields = null, string $joinType = '', Query $query = null) - { - throw new Exception('relation not support: hasWhere'); - } - - /** - * 预载入关联查询 - * @access public - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation, Closure $closure = null, array $cache = []): void - { - $morphType = $this->morphType; - $morphKey = $this->morphKey; - $type = $this->type; - $range = []; - - foreach ($resultSet as $result) { - $pk = $result->getPk(); - // 获取关联外键列表 - if (isset($result->$pk)) { - $range[] = $result->$pk; - } - } - - if (!empty($range)) { - $where = [ - [$morphKey, 'in', $range], - [$morphType, '=', $type], - ]; - $data = $this->eagerlyMorphToMany($where, $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - if (!isset($data[$result->$pk])) { - $data[$result->$pk] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$result->$pk], clone $this->parent)); - } - } - } - - /** - * 预载入关联查询 - * @access public - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $pk = $result->getPk(); - - if (isset($result->$pk)) { - $key = $result->$pk; - $data = $this->eagerlyMorphToMany([ - [$this->morphKey, '=', $key], - [$this->morphType, '=', $this->type], - ], $subRelation, $closure, $cache); - - if (!isset($data[$key])) { - $data[$key] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$key], clone $this->parent)); - } - } - - /** - * 关联统计 - * @access public - * @param Model $result 数据对象 - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return mixed - */ - public function relationCount(Model $result, Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null) - { - $pk = $result->getPk(); - - if (!isset($result->$pk)) { - return 0; - } - - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->query - ->where([ - [$this->morphKey, '=', $result->$pk], - [$this->morphType, '=', $this->type], - ]) - ->$aggregate($field); - } - - /** - * 获取关联统计子查询 - * @access public - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return string - */ - public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): string - { - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->query - ->whereExp($this->morphKey, '=' . $this->parent->getTable() . '.' . $this->parent->getPk()) - ->where($this->morphType, '=', $this->type) - ->fetchSql() - ->$aggregate($field); - } - - /** - * 多态一对多 关联模型预查询 - * @access protected - * @param array $where 关联预查询条件 - * @param array $subRelation 子关联 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return array - */ - protected function eagerlyMorphToMany(array $where, array $subRelation = [], Closure $closure = null, array $cache = []): array - { - // 预载入关联查询 支持嵌套预载入 - $this->query->removeOption('where'); - - if ($closure) { - $this->baseQuery = true; - $closure($this->getClosureType($closure)); - } - - $withLimit = $this->query->getOptions('limit'); - if ($withLimit) { - $this->query->removeOption('limit'); - } - - $list = $this->query - ->where($where) - ->with($subRelation) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->select(); - $morphKey = $this->morphKey; - - // 组装模型数据 - $data = []; - foreach ($list as $set) { - $key = $set->$morphKey; - - if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) { - continue; - } - - $data[$key][] = $set; - } - - return $data; - } - - /** - * 保存(新增)当前关联数据对象 - * @access public - * @param mixed $data 数据 可以使用数组 关联模型对象 - * @param bool $replace 是否自动识别更新和写入 - * @return Model|false - */ - public function save($data, bool $replace = true) - { - if ($data instanceof Model) { - $data = $data->getData(); - } - - $model = $this->make(); - - return $model->replace($replace)->save($data) ? $model : false; - } - - /** - * 创建关联对象实例 - * @param array|Model $data - * @return Model - */ - public function make($data = []): Model - { - if ($data instanceof Model) { - $data = $data->getData(); - } - - // 保存关联表数据 - $pk = $this->parent->getPk(); - - $data[$this->morphKey] = $this->parent->$pk; - $data[$this->morphType] = $this->type; - - return new $this->model($data); - } - - /** - * 批量保存当前关联数据对象 - * @access public - * @param iterable $dataSet 数据集 - * @param boolean $replace 是否自动识别更新和写入 - * @return array|false - */ - public function saveAll(iterable $dataSet, bool $replace = true) - { - $result = []; - - foreach ($dataSet as $key => $data) { - $result[] = $this->save($data, $replace); - } - - return empty($result) ? false : $result; - } - - /** - * 获取多态关联外键 - * @return string - */ - public function getMorphKey() - { - return $this->morphKey; - } - - /** - * 获取多态字段名 - * @return string - */ - public function getMorphType() - { - return $this->morphType; - } - - /** - * 获取多态类型 - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * 执行基础查询(仅执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - { - if (empty($this->baseQuery) && $this->parent->getData()) { - $pk = $this->parent->getPk(); - - $this->query->where([ - [$this->morphKey, '=', $this->parent->$pk], - [$this->morphType, '=', $this->type], - ]); - - $this->baseQuery = true; - } - } - -} diff --git a/vendor/topthink/think-orm/src/model/relation/MorphOne.php b/vendor/topthink/think-orm/src/model/relation/MorphOne.php deleted file mode 100644 index d63966f..0000000 --- a/vendor/topthink/think-orm/src/model/relation/MorphOne.php +++ /dev/null @@ -1,352 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\model\relation; - -use Closure; -use think\db\BaseQuery as Query; -use think\db\exception\DbException as Exception; -use think\Model; -use think\model\Relation; - -/** - * 多态一对一关联类 - */ -class MorphOne extends Relation -{ - /** - * 多态关联外键 - * @var string - */ - protected $morphKey; - - /** - * 多态字段 - * @var string - */ - protected $morphType; - - /** - * 多态类型 - * @var string - */ - protected $type; - - /** - * 绑定的关联属性 - * @var array - */ - protected $bindAttr = []; - - /** - * 构造函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $model 模型名 - * @param string $morphKey 关联外键 - * @param string $morphType 多态字段名 - * @param string $type 多态类型 - */ - public function __construct(Model $parent, string $model, string $morphKey, string $morphType, string $type) - { - $this->parent = $parent; - $this->model = $model; - $this->type = $type; - $this->morphKey = $morphKey; - $this->morphType = $morphType; - $this->query = (new $model)->db(); - } - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包查询条件 - * @return Model - */ - public function getRelation(array $subRelation = [], Closure $closure = null) - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - $this->baseQuery(); - - $relationModel = $this->query->relation($subRelation)->find(); - - if ($relationModel) { - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($this->parent, $relationModel); - } - - $relationModel->setParent(clone $this->parent); - } else { - $relationModel = $this->getDefaultModel(); - } - - return $relationModel; - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = '', Query $query = null) - { - return $this->parent; - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function hasWhere($where = [], $fields = null, string $joinType = '', Query $query = null) - { - throw new Exception('relation not support: hasWhere'); - } - - /** - * 预载入关联查询 - * @access public - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation, Closure $closure = null, array $cache = []): void - { - $morphType = $this->morphType; - $morphKey = $this->morphKey; - $type = $this->type; - $range = []; - - foreach ($resultSet as $result) { - $pk = $result->getPk(); - // 获取关联外键列表 - if (isset($result->$pk)) { - $range[] = $result->$pk; - } - } - - if (!empty($range)) { - $data = $this->eagerlyMorphToOne([ - [$morphKey, 'in', $range], - [$morphType, '=', $type], - ], $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - if (!isset($data[$result->$pk])) { - $relationModel = $this->getDefaultModel(); - } else { - $relationModel = $data[$result->$pk]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($result, $relationModel); - } else { - // 设置关联属性 - $result->setRelation($relation, $relationModel); - } - } - } - } - - /** - * 预载入关联查询 - * @access public - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - $pk = $result->getPk(); - - if (isset($result->$pk)) { - $pk = $result->$pk; - $data = $this->eagerlyMorphToOne([ - [$this->morphKey, '=', $pk], - [$this->morphType, '=', $this->type], - ], $subRelation, $closure, $cache); - - if (isset($data[$pk])) { - $relationModel = $data[$pk]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } else { - $relationModel = $this->getDefaultModel(); - } - - if (!empty($this->bindAttr)) { - // 绑定关联属性 - $this->bindAttr($result, $relationModel); - } else { - // 设置关联属性 - $result->setRelation($relation, $relationModel); - } - } - } - - /** - * 多态一对一 关联模型预查询 - * @access protected - * @param array $where 关联预查询条件 - * @param array $subRelation 子关联 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return array - */ - protected function eagerlyMorphToOne(array $where, array $subRelation = [], $closure = null, array $cache = []): array - { - // 预载入关联查询 支持嵌套预载入 - if ($closure) { - $this->baseQuery = true; - $closure($this->getClosureType($closure)); - } - - $list = $this->query - ->where($where) - ->with($subRelation) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->select(); - $morphKey = $this->morphKey; - - // 组装模型数据 - $data = []; - - foreach ($list as $set) { - $data[$set->$morphKey] = $set; - } - - return $data; - } - - /** - * 保存(新增)当前关联数据对象 - * @access public - * @param mixed $data 数据 可以使用数组 关联模型对象 - * @param boolean $replace 是否自动识别更新和写入 - * @return Model|false - */ - public function save($data, bool $replace = true) - { - if ($data instanceof Model) { - $data = $data->getData(); - } - - $model = $this->make(); - return $model->replace($replace)->save($data) ? $model : false; - } - - /** - * 创建关联对象实例 - * @param array|Model $data - * @return Model - */ - public function make($data = []): Model - { - if ($data instanceof Model) { - $data = $data->getData(); - } - - // 保存关联表数据 - $pk = $this->parent->getPk(); - - $data[$this->morphKey] = $this->parent->$pk; - $data[$this->morphType] = $this->type; - - return new $this->model($data); - } - - /** - * 执行基础查询(进执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - { - if (empty($this->baseQuery) && $this->parent->getData()) { - $pk = $this->parent->getPk(); - - $this->query->where([ - [$this->morphKey, '=', $this->parent->$pk], - [$this->morphType, '=', $this->type], - ]); - $this->baseQuery = true; - } - } - - /** - * 绑定关联表的属性到父模型属性 - * @access public - * @param array $attr 要绑定的属性列表 - * @return $this - */ - public function bind(array $attr) - { - $this->bindAttr = $attr; - - return $this; - } - - /** - * 获取绑定属性 - * @access public - * @return array - */ - public function getBindAttr(): array - { - return $this->bindAttr; - } - - /** - * 绑定关联属性到父模型 - * @access protected - * @param Model $result 父模型对象 - * @param Model $model 关联模型对象 - * @return void - * @throws Exception - */ - protected function bindAttr(Model $result, Model $model = null): void - { - foreach ($this->bindAttr as $key => $attr) { - $key = is_numeric($key) ? $attr : $key; - $value = $result->getOrigin($key); - - if (!is_null($value)) { - throw new Exception('bind attr has exists:' . $key); - } - - $result->setAttr($key, $model ? $model->$attr : null); - } - } -} diff --git a/vendor/topthink/think-orm/src/model/relation/MorphTo.php b/vendor/topthink/think-orm/src/model/relation/MorphTo.php deleted file mode 100644 index d24c082..0000000 --- a/vendor/topthink/think-orm/src/model/relation/MorphTo.php +++ /dev/null @@ -1,382 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\model\relation; - -use Closure; -use think\db\exception\DbException as Exception; -use think\db\Query; -use think\helper\Str; -use think\Model; -use think\model\Relation; - -/** - * 多态关联类 - */ -class MorphTo extends Relation -{ - /** - * 多态关联外键 - * @var string - */ - protected $morphKey; - - /** - * 多态字段 - * @var string - */ - protected $morphType; - - /** - * 多态别名 - * @var array - */ - protected $alias = []; - - /** - * 关联名 - * @var string - */ - protected $relation; - - protected $queryCaller = []; - - /** - * 架构函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $morphType 多态字段名 - * @param string $morphKey 外键名 - * @param array $alias 多态别名定义 - * @param ?string $relation 关联名 - */ - public function __construct(Model $parent, string $morphType, string $morphKey, array $alias = [], string $relation = null) - { - $this->parent = $parent; - $this->morphType = $morphType; - $this->morphKey = $morphKey; - $this->alias = $alias; - $this->relation = $relation; - } - - /** - * 获取当前的关联模型类的实例 - * @access public - * @return Model - */ - public function getModel(): Model - { - $morphType = $this->morphType; - $model = $this->parseModel($this->parent->$morphType); - - return (new $model); - } - - /** - * 延迟获取关联数据 - * @access public - * @param array $subRelation 子关联名 - * @param ?Closure $closure 闭包查询条件 - * @return Model - */ - public function getRelation(array $subRelation = [], Closure $closure = null) - { - $morphKey = $this->morphKey; - $morphType = $this->morphType; - - // 多态模型 - $model = $this->parseModel($this->parent->$morphType); - - // 主键数据 - $pk = $this->parent->$morphKey; - - $relationModel = $this->buildQuery((new $model)->relation($subRelation))->find($pk); - - if ($relationModel) { - $relationModel->setParent(clone $this->parent); - } - - return $relationModel; - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param string $operator 比较操作符 - * @param integer $count 个数 - * @param string $id 关联表的统计字段 - * @param string $joinType JOIN类型 - * @param Query $query Query对象 - * @return Query - */ - public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = '', Query $query = null) - { - return $this->parent; - } - - /** - * 根据关联条件查询当前模型 - * @access public - * @param mixed $where 查询条件(数组或者闭包) - * @param mixed $fields 字段 - * @param string $joinType JOIN类型 - * @param ?Query $query Query对象 - * @return Query - */ - public function hasWhere($where = [], $fields = null, string $joinType = '', Query $query = null) - { - $alias = class_basename($this->parent); - - $types = $this->parent->distinct()->column($this->morphType); - - $query = $query ?: $this->parent->db(); - - return $query->alias($alias) - ->where(function (Query $query) use ($types, $where, $alias) { - foreach ($types as $type) { - if ($type) { - $query->whereExists(function (Query $query) use ($type, $where, $alias) { - $class = $this->parseModel($type); - /** @var Model $model */ - $model = new $class(); - - $table = $model->getTable(); - $query - ->table($table) - ->where($alias . '.' . $this->morphType, $type) - ->whereRaw("`{$alias}`.`{$this->morphKey}`=`{$table}`.`{$model->getPk()}`") - ->where($where); - }, 'OR'); - } - } - }); - } - - /** - * 解析模型的完整命名空间 - * @access protected - * @param string $model 模型名(或者完整类名) - * @return Model - */ - protected function parseModel(string $model): string - { - if (isset($this->alias[$model])) { - $model = $this->alias[$model]; - } - - if (false === strpos($model, '\\')) { - $path = explode('\\', get_class($this->parent)); - array_pop($path); - array_push($path, Str::studly($model)); - $model = implode('\\', $path); - } - - return $model; - } - - /** - * 设置多态别名 - * @access public - * @param array $alias 别名定义 - * @return $this - */ - public function setAlias(array $alias) - { - $this->alias = $alias; - - return $this; - } - - /** - * 移除关联查询参数 - * @access public - * @return $this - */ - public function removeOption(string $option = '') - { - return $this; - } - - /** - * 预载入关联查询 - * @access public - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param ?Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - * @throws Exception - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation, Closure $closure = null, array $cache = []): void - { - $morphKey = $this->morphKey; - $morphType = $this->morphType; - $range = []; - - foreach ($resultSet as $result) { - // 获取关联外键列表 - if (!empty($result->$morphKey)) { - $range[$result->$morphType][] = $result->$morphKey; - } - } - - if (!empty($range)) { - - foreach ($range as $key => $val) { - // 多态类型映射 - $model = $this->parseModel($key); - $obj = new $model; - if (!\is_null($closure)) { - $obj = $closure($obj); - } - $pk = $obj->getPk(); - $list = $obj->with($subRelation) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->select($val); - $data = []; - - foreach ($list as $k => $vo) { - $data[$vo->$pk] = $vo; - } - - foreach ($resultSet as $result) { - if ($key == $result->$morphType) { - // 关联模型 - if (!isset($data[$result->$morphKey])) { - $relationModel = null; - } else { - $relationModel = $data[$result->$morphKey]; - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - - $result->setRelation($relation, $relationModel); - } - } - } - } - } - - /** - * 预载入关联查询 - * @access public - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param ?Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = []): void - { - // 多态类型映射 - $model = $this->parseModel($result->{$this->morphType}); - - $this->eagerlyMorphToOne($model, $relation, $result, $subRelation, $cache); - } - - /** - * 关联统计 - * @access public - * @param Model $result 数据对象 - * @param ?Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @return integer - */ - public function relationCount(Model $result, Closure $closure = null, string $aggregate = 'count', string $field = '*') - { - } - - /** - * 多态MorphTo 关联模型预查询 - * @access protected - * @param string $model 关联模型对象 - * @param string $relation 关联名 - * @param Model $result - * @param array $subRelation 子关联 - * @param array $cache 关联缓存 - * @return void - */ - protected function eagerlyMorphToOne(string $model, string $relation, Model $result, array $subRelation = [], array $cache = []): void - { - // 预载入关联查询 支持嵌套预载入 - $pk = $this->parent->{$this->morphKey}; - - $data = null; - - if (\class_exists($model)) { - $data = (new $model)->with($subRelation) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->find($pk); - - if ($data) { - $data->setParent(clone $result); - $data->exists(true); - } - } - - $result->setRelation($relation, $data ?: null); - } - - /** - * 添加关联数据 - * @access public - * @param Model $model 关联模型对象 - * @param string $type 多态类型 - * @return Model - */ - public function associate(Model $model, string $type = ''): Model - { - $morphKey = $this->morphKey; - $morphType = $this->morphType; - $pk = $model->getPk(); - - $this->parent->setAttr($morphKey, $model->$pk); - $this->parent->setAttr($morphType, $type ?: get_class($model)); - $this->parent->save(); - - return $this->parent->setRelation($this->relation, $model); - } - - /** - * 注销关联数据 - * @access public - * @return Model - */ - public function dissociate(): Model - { - $morphKey = $this->morphKey; - $morphType = $this->morphType; - - $this->parent->setAttr($morphKey, null); - $this->parent->setAttr($morphType, null); - $this->parent->save(); - - return $this->parent->setRelation($this->relation, null); - } - - protected function buildQuery(Query $query) - { - foreach ($this->queryCaller as $caller) { - call_user_func_array([$query, $caller[0]], $caller[1]); - } - - return $query; - } - - public function __call($method, $args) - { - $this->queryCaller[] = [$method, $args]; - return $this; - } -} diff --git a/vendor/topthink/think-orm/src/model/relation/MorphToMany.php b/vendor/topthink/think-orm/src/model/relation/MorphToMany.php deleted file mode 100644 index c9d8583..0000000 --- a/vendor/topthink/think-orm/src/model/relation/MorphToMany.php +++ /dev/null @@ -1,490 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\model\relation; - -use Closure; -use Exception; -use think\db\BaseQuery as Query; -use think\db\Raw; -use think\Model; -use think\model\Pivot; - -/** - * 多态多对多关联 - */ -class MorphToMany extends BelongsToMany -{ - - /** - * 多态关系的模型名映射别名的数组 - * - * @var array - */ - protected static $morphMap = []; - - /** - * 多态字段名 - * @var string - */ - protected $morphType; - - /** - * 多态模型名 - * @var string - */ - protected $morphClass; - - /** - * 是否反向关联 - * @var bool - */ - protected $inverse; - - /** - * 架构函数 - * @access public - * @param Model $parent 上级模型对象 - * @param string $model 模型名 - * @param string $middle 中间表名/模型名 - * @param string $morphKey 关联外键 - * @param string $morphType 多态字段名 - * @param string $localKey 当前模型关联键 - * @param bool $inverse 反向关联 - */ - public function __construct(Model $parent, string $model, string $middle, string $morphType, string $morphKey, string $localKey, bool $inverse = false) - { - $this->morphType = $morphType; - $this->inverse = $inverse; - $this->morphClass = $inverse ? $model : get_class($parent); - if (isset(static::$morphMap[$this->morphClass])) { - $this->morphClass = static::$morphMap[$this->morphClass]; - } - - $foreignKey = $inverse ? $morphKey : $localKey; - $localKey = $inverse ? $localKey : $morphKey; - - parent::__construct($parent, $model, $middle, $foreignKey, $localKey); - } - - /** - * 预载入关联查询(数据集) - * @access public - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation, Closure $closure = null, array $cache = []): void - { - $pk = $resultSet[0]->getPk(); - $range = []; - - foreach ($resultSet as $result) { - // 获取关联外键列表 - if (isset($result->$pk)) { - $range[] = $result->$pk; - } - } - - if (!empty($range)) { - // 查询关联数据 - $data = $this->eagerlyManyToMany([ - ['pivot.' . $this->localKey, 'in', $range], - ['pivot.' . $this->morphType, '=', $this->morphClass], - ], $subRelation, $closure, $cache); - - // 关联数据封装 - foreach ($resultSet as $result) { - if (!isset($data[$result->$pk])) { - $data[$result->$pk] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$result->$pk], clone $this->parent)); - } - } - } - - /** - * 预载入关联查询(单个数据) - * @access public - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation, Closure $closure = null, array $cache = []): void - { - $pk = $result->getPk(); - - if (isset($result->$pk)) { - $pk = $result->$pk; - // 查询管理数据 - $data = $this->eagerlyManyToMany([ - ['pivot.' . $this->localKey, '=', $pk], - ['pivot.' . $this->morphType, '=', $this->morphClass], - ], $subRelation, $closure, $cache); - - // 关联数据封装 - if (!isset($data[$pk])) { - $data[$pk] = []; - } - - $result->setRelation($relation, $this->resultSetBuild($data[$pk], clone $this->parent)); - } - } - - /** - * 关联统计 - * @access public - * @param Model $result 数据对象 - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return integer - */ - public function relationCount(Model $result, Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): float - { - $pk = $result->getPk(); - - if (!isset($result->$pk)) { - return 0; - } - - $pk = $result->$pk; - - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [ - ['pivot.' . $this->localKey, '=', $pk], - ['pivot.' . $this->morphType, '=', $this->morphClass], - ])->$aggregate($field); - } - - /** - * 获取关联统计子查询 - * @access public - * @param Closure $closure 闭包 - * @param string $aggregate 聚合查询方法 - * @param string $field 字段 - * @param string $name 统计字段别名 - * @return string - */ - public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): string - { - if ($closure) { - $closure($this->getClosureType($closure), $name); - } - - return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [ - ['pivot.' . $this->localKey, 'exp', new Raw('=' . $this->parent->db(false)->getTable() . '.' . $this->parent->getPk())], - ['pivot.' . $this->morphType, '=', $this->morphClass], - ])->fetchSql()->$aggregate($field); - } - - /** - * BELONGS TO MANY 关联查询 - * @access protected - * @param string $foreignKey 关联模型关联键 - * @param string $localKey 当前模型关联键 - * @param array $condition 关联查询条件 - * @return Query - */ - protected function belongsToManyQuery(string $foreignKey, string $localKey, array $condition = []): Query - { - // 关联查询封装 - $tableName = $this->query->getTable(); - $table = $this->pivot->db()->getTable(); - - if ($this->withoutField) { - $this->query->withoutField($this->withoutField); - } - - $fields = $this->getQueryFields($tableName); - $query = $this->query - ->field($fields) - ->tableField(true, $table, 'pivot', 'pivot__'); - - if (empty($this->baseQuery)) { - $relationFk = $this->query->getPk(); - $query->join([$table => 'pivot'], 'pivot.' . $foreignKey . '=' . $tableName . '.' . $relationFk) - ->where($condition); - } - - return $query; - } - - /** - * 多对多 关联模型预查询 - * @access protected - * @param array $where 关联预查询条件 - * @param array $subRelation 子关联 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @return array - */ - protected function eagerlyManyToMany(array $where, array $subRelation = [], Closure $closure = null, array $cache = []): array - { - if ($closure) { - $closure($this->getClosureType($closure)); - } - - $withLimit = $this->query->getOptions('limit'); - if ($withLimit) { - $this->query->removeOption('limit'); - } - - // 预载入关联查询 支持嵌套预载入 - $list = $this->belongsToManyQuery($this->foreignKey, $this->localKey, $where) - ->with($subRelation) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->select(); - - // 组装模型数据 - $data = []; - foreach ($list as $set) { - $pivot = []; - foreach ($set->getData() as $key => $val) { - if (strpos($key, '__')) { - [$name, $attr] = explode('__', $key, 2); - if ('pivot' == $name) { - $pivot[$attr] = $val; - unset($set->$key); - } - } - } - - $key = $pivot[$this->localKey]; - - if ($withLimit && isset($data[$key]) && count($data[$key]) >= $withLimit) { - continue; - } - - $set->setRelation($this->pivotDataName, $this->newPivot($pivot)); - - $data[$key][] = $set; - } - - return $data; - } - - /** - * 附加关联的一个中间表数据 - * @access public - * @param mixed $data 数据 可以使用数组、关联模型对象 或者 关联对象的主键 - * @param array $pivot 中间表额外数据 - * @return array|Pivot - */ - public function attach($data, array $pivot = []) - { - if (is_array($data)) { - if (key($data) === 0) { - $id = $data; - } else { - // 保存关联表数据 - $model = new $this->model; - $id = $model->insertGetId($data); - } - } elseif (is_numeric($data) || is_string($data)) { - // 根据关联表主键直接写入中间表 - $id = $data; - } elseif ($data instanceof Model) { - // 根据关联表主键直接写入中间表 - $id = $data->getKey(); - } - - if (!empty($id)) { - // 保存中间表数据 - $pivot[$this->localKey] = $this->parent->getKey(); - $pivot[$this->morphType] = $this->morphClass; - $ids = (array) $id; - - $result = []; - - foreach ($ids as $id) { - $pivot[$this->foreignKey] = $id; - - $this->pivot->replace() - ->exists(false) - ->data([]) - ->save($pivot); - $result[] = $this->newPivot($pivot); - } - - if (count($result) == 1) { - // 返回中间表模型对象 - $result = $result[0]; - } - - return $result; - } else { - throw new Exception('miss relation data'); - } - } - - /** - * 判断是否存在关联数据 - * @access public - * @param mixed $data 数据 可以使用关联模型对象 或者 关联对象的主键 - * @return Pivot|false - */ - public function attached($data) - { - if ($data instanceof Model) { - $id = $data->getKey(); - } else { - $id = $data; - } - - $pivot = $this->pivot - ->where($this->localKey, $this->parent->getKey()) - ->where($this->morphType, $this->morphClass) - ->where($this->foreignKey, $id) - ->find(); - - return $pivot ?: false; - } - - /** - * 解除关联的一个中间表数据 - * @access public - * @param integer|array $data 数据 可以使用关联对象的主键 - * @param bool $relationDel 是否同时删除关联表数据 - * @return integer - */ - public function detach($data = null, bool $relationDel = false): int - { - if (is_array($data)) { - $id = $data; - } elseif (is_numeric($data) || is_string($data)) { - // 根据关联表主键直接写入中间表 - $id = $data; - } elseif ($data instanceof Model) { - // 根据关联表主键直接写入中间表 - $id = $data->getKey(); - } - - // 删除中间表数据 - $pivot = [ - [$this->localKey, '=', $this->parent->getKey()], - [$this->morphType, '=', $this->morphClass], - ]; - - if (isset($id)) { - $pivot[] = [$this->foreignKey, is_array($id) ? 'in' : '=', $id]; - } - - $result = $this->pivot->where($pivot)->delete(); - - // 删除关联表数据 - if (isset($id) && $relationDel) { - $model = $this->model; - $model::destroy($id); - } - - return $result; - } - - /** - * 数据同步 - * @access public - * @param array $ids - * @param bool $detaching - * @return array - */ - public function sync(array $ids, bool $detaching = true): array - { - $changes = [ - 'attached' => [], - 'detached' => [], - 'updated' => [], - ]; - - $current = $this->pivot - ->where($this->localKey, $this->parent->getKey()) - ->where($this->morphType, $this->morphClass) - ->column($this->foreignKey); - - $records = []; - - foreach ($ids as $key => $value) { - if (!is_array($value)) { - $records[$value] = []; - } else { - $records[$key] = $value; - } - } - - $detach = array_diff($current, array_keys($records)); - - if ($detaching && count($detach) > 0) { - $this->detach($detach); - $changes['detached'] = $detach; - } - - foreach ($records as $id => $attributes) { - if (!in_array($id, $current)) { - $this->attach($id, $attributes); - $changes['attached'][] = $id; - } elseif (count($attributes) > 0 && $this->attach($id, $attributes)) { - $changes['updated'][] = $id; - } - } - - return $changes; - } - - /** - * 执行基础查询(仅执行一次) - * @access protected - * @return void - */ - protected function baseQuery(): void - { - if (empty($this->baseQuery)) { - $foreignKey = $this->foreignKey; - $localKey = $this->localKey; - - // 关联查询 - $this->belongsToManyQuery($foreignKey, $localKey, [ - ['pivot.' . $localKey, '=', $this->parent->getKey()], - ['pivot.' . $this->morphType, '=', $this->morphClass], - ]); - - $this->baseQuery = true; - } - } - - /** - * 设置或获取多态关系的模型名映射别名的数组 - * - * @param array|null $map - * @param bool $merge - * @return array - */ - public static function morphMap(array $map = null, $merge = true): array - { - if (is_array($map)) { - static::$morphMap = $merge && static::$morphMap - ? $map + static::$morphMap : $map; - } - - return static::$morphMap; - } - -} diff --git a/vendor/topthink/think-orm/src/model/relation/OneToOne.php b/vendor/topthink/think-orm/src/model/relation/OneToOne.php deleted file mode 100644 index d62692a..0000000 --- a/vendor/topthink/think-orm/src/model/relation/OneToOne.php +++ /dev/null @@ -1,359 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\model\relation; - -use Closure; -use think\db\BaseQuery as Query; -use think\db\exception\DbException as Exception; -use think\helper\Str; -use think\Model; -use think\model\Relation; - -/** - * 一对一关联基础类 - * @package think\model\relation - */ -abstract class OneToOne extends Relation -{ - /** - * JOIN类型 - * @var string - */ - protected $joinType = 'INNER'; - - /** - * 绑定的关联属性 - * @var array - */ - protected $bindAttr = []; - - /** - * 关联名 - * @var string - */ - protected $relation; - - /** - * 设置join类型 - * @access public - * @param string $type JOIN类型 - * @return $this - */ - public function joinType(string $type) - { - $this->joinType = $type; - return $this; - } - - /** - * 预载入关联查询(JOIN方式) - * @access public - * @param Query $query 查询对象 - * @param string $relation 关联名 - * @param mixed $field 关联字段 - * @param string $joinType JOIN方式 - * @param Closure $closure 闭包条件 - * @param bool $first - * @return void - */ - public function eagerly(Query $query, string $relation, $field = true, string $joinType = '', Closure $closure = null, bool $first = false): void - { - $name = Str::snake(class_basename($this->parent)); - - if ($first) { - $table = $query->getTable(); - $query->table([$table => $name]); - - if ($query->getOptions('field')) { - $masterField = $query->getOptions('field'); - $query->removeOption('field'); - } else { - $masterField = true; - } - - $query->tableField($masterField, $table, $name); - } - - // 预载入封装 - $joinTable = $this->query->getTable(); - $joinAlias = $relation; - $joinType = $joinType ?: $this->joinType; - - $query->via($joinAlias); - - if ($this instanceof BelongsTo) { - - $foreignKeyExp = $this->foreignKey; - - if (strpos($foreignKeyExp, '.') === false) { - $foreignKeyExp = $name . '.' . $this->foreignKey; - } - - $joinOn = $foreignKeyExp . '=' . $joinAlias . '.' . $this->localKey; - } else { - - $foreignKeyExp = $this->foreignKey; - - if (strpos($foreignKeyExp, '.') === false) { - $foreignKeyExp = $joinAlias . '.' . $this->foreignKey; - } - - $joinOn = $name . '.' . $this->localKey . '=' . $foreignKeyExp; - } - - if ($closure) { - // 执行闭包查询 - $closure($this->getClosureType($closure, $query)); - - // 使用withField指定获取关联的字段 - if ($this->withField) { - $field = $this->withField; - } - } - - $query->join([$joinTable => $joinAlias], $joinOn, $joinType) - ->tableField($field, $joinTable, $joinAlias, $relation . '__'); - } - - /** - * 预载入关联查询(数据集) - * @access protected - * @param array $resultSet - * @param string $relation - * @param array $subRelation - * @param Closure $closure - * @return mixed - */ - abstract protected function eagerlySet(array &$resultSet, string $relation, array $subRelation = [], Closure $closure = null); - - /** - * 预载入关联查询(数据) - * @access protected - * @param Model $result - * @param string $relation - * @param array $subRelation - * @param Closure $closure - * @return mixed - */ - abstract protected function eagerlyOne(Model $result, string $relation, array $subRelation = [], Closure $closure = null); - - /** - * 预载入关联查询(数据集) - * @access public - * @param array $resultSet 数据集 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @param bool $join 是否为JOIN方式 - * @return void - */ - public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation = [], Closure $closure = null, array $cache = [], bool $join = false): void - { - if ($join) { - // 模型JOIN关联组装 - foreach ($resultSet as $result) { - $this->match($this->model, $relation, $result); - } - } else { - // IN查询 - $this->eagerlySet($resultSet, $relation, $subRelation, $closure, $cache); - } - } - - /** - * 预载入关联查询(数据) - * @access public - * @param Model $result 数据对象 - * @param string $relation 当前关联名 - * @param array $subRelation 子关联名 - * @param Closure $closure 闭包 - * @param array $cache 关联缓存 - * @param bool $join 是否为JOIN方式 - * @return void - */ - public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null, array $cache = [], bool $join = false): void - { - if ($join) { - // 模型JOIN关联组装 - $this->match($this->model, $relation, $result); - } else { - // IN查询 - $this->eagerlyOne($result, $relation, $subRelation, $closure, $cache); - } - } - - /** - * 保存(新增)当前关联数据对象 - * @access public - * @param mixed $data 数据 可以使用数组 关联模型对象 - * @param boolean $replace 是否自动识别更新和写入 - * @return Model|false - */ - public function save($data, bool $replace = true) - { - if ($data instanceof Model) { - $data = $data->getData(); - } - - $model = $this->make(); - - return $model->replace($replace)->save($data) ? $model : false; - } - - /** - * 创建关联对象实例 - * @param array|Model $data - * @return Model - */ - public function make($data = []): Model - { - if ($data instanceof Model) { - $data = $data->getData(); - } - - // 保存关联表数据 - $data[$this->foreignKey] = $this->parent->{$this->localKey}; - - return new $this->model($data); - } - - /** - * 绑定关联表的属性到父模型属性 - * @access public - * @param array $attr 要绑定的属性列表 - * @return $this - */ - public function bind(array $attr) - { - $this->bindAttr = $attr; - - return $this; - } - - /** - * 获取绑定属性 - * @access public - * @return array - */ - public function getBindAttr(): array - { - return $this->bindAttr; - } - - /** - * 一对一 关联模型预查询拼装 - * @access public - * @param string $model 模型名称 - * @param string $relation 关联名 - * @param Model $result 模型对象实例 - * @return void - */ - protected function match(string $model, string $relation, Model $result): void - { - // 重新组装模型数据 - foreach ($result->getData() as $key => $val) { - if (strpos($key, '__')) { - [$name, $attr] = explode('__', $key, 2); - if ($name == $relation) { - $list[$name][$attr] = $val; - unset($result->$key); - } - } - } - - if (isset($list[$relation])) { - $array = array_unique($list[$relation]); - - if (count($array) == 1 && null === current($array)) { - $relationModel = null; - } else { - $relationModel = new $model($list[$relation]); - $relationModel->setParent(clone $result); - $relationModel->exists(true); - } - - if (!empty($this->bindAttr)) { - $this->bindAttr($result, $relationModel); - } - } else { - $relationModel = null; - } - - $result->setRelation($relation, $relationModel); - } - - /** - * 绑定关联属性到父模型 - * @access protected - * @param Model $result 父模型对象 - * @param Model $model 关联模型对象 - * @return void - * @throws Exception - */ - protected function bindAttr(Model $result, Model $model = null): void - { - foreach ($this->bindAttr as $key => $attr) { - $key = is_numeric($key) ? $attr : $key; - $value = $result->getOrigin($key); - - if (!is_null($value)) { - throw new Exception('bind attr has exists:' . $key); - } - - $result->setAttr($key, $model ? $model->$attr : null); - } - } - - /** - * 一对一 关联模型预查询(IN方式) - * @access public - * @param array $where 关联预查询条件 - * @param string $key 关联键名 - * @param array $subRelation 子关联 - * @param Closure $closure - * @param array $cache 关联缓存 - * @return array - */ - protected function eagerlyWhere(array $where, string $key, array $subRelation = [], Closure $closure = null, array $cache = []) - { - // 预载入关联查询 支持嵌套预载入 - if ($closure) { - $this->baseQuery = true; - $closure($this->getClosureType($closure)); - } - - if ($this->withField) { - $this->query->field($this->withField); - } elseif ($this->withoutField) { - $this->query->withoutField($this->withoutField); - } - - $list = $this->query - ->where($where) - ->with($subRelation) - ->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null) - ->select(); - - // 组装模型数据 - $data = []; - - foreach ($list as $set) { - if (!isset($data[$set->$key])) { - $data[$set->$key] = $set; - } - } - - return $data; - } - -} diff --git a/vendor/topthink/think-orm/src/paginator/driver/Bootstrap.php b/vendor/topthink/think-orm/src/paginator/driver/Bootstrap.php deleted file mode 100644 index 6d55c39..0000000 --- a/vendor/topthink/think-orm/src/paginator/driver/Bootstrap.php +++ /dev/null @@ -1,209 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: zhangyajun <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\paginator\driver; - -use think\Paginator; - -/** - * Bootstrap 分页驱动 - */ -class Bootstrap extends Paginator -{ - - /** - * 上一页按钮 - * @param string $text - * @return string - */ - protected function getPreviousButton(string $text = "&laquo;"): string - { - - if ($this->currentPage() <= 1) { - return $this->getDisabledTextWrapper($text); - } - - $url = $this->url( - $this->currentPage() - 1 - ); - - return $this->getPageLinkWrapper($url, $text); - } - - /** - * 下一页按钮 - * @param string $text - * @return string - */ - protected function getNextButton(string $text = '&raquo;'): string - { - if (!$this->hasMore) { - return $this->getDisabledTextWrapper($text); - } - - $url = $this->url($this->currentPage() + 1); - - return $this->getPageLinkWrapper($url, $text); - } - - /** - * 页码按钮 - * @return string - */ - protected function getLinks(): string - { - if ($this->simple) { - return ''; - } - - $block = [ - 'first' => null, - 'slider' => null, - 'last' => null, - ]; - - $side = 3; - $window = $side * 2; - - if ($this->lastPage < $window + 6) { - $block['first'] = $this->getUrlRange(1, $this->lastPage); - } elseif ($this->currentPage <= $window) { - $block['first'] = $this->getUrlRange(1, $window + 2); - $block['last'] = $this->getUrlRange($this->lastPage - 1, $this->lastPage); - } elseif ($this->currentPage > ($this->lastPage - $window)) { - $block['first'] = $this->getUrlRange(1, 2); - $block['last'] = $this->getUrlRange($this->lastPage - ($window + 2), $this->lastPage); - } else { - $block['first'] = $this->getUrlRange(1, 2); - $block['slider'] = $this->getUrlRange($this->currentPage - $side, $this->currentPage + $side); - $block['last'] = $this->getUrlRange($this->lastPage - 1, $this->lastPage); - } - - $html = ''; - - if (is_array($block['first'])) { - $html .= $this->getUrlLinks($block['first']); - } - - if (is_array($block['slider'])) { - $html .= $this->getDots(); - $html .= $this->getUrlLinks($block['slider']); - } - - if (is_array($block['last'])) { - $html .= $this->getDots(); - $html .= $this->getUrlLinks($block['last']); - } - - return $html; - } - - /** - * 渲染分页html - * @return mixed - */ - public function render() - { - if ($this->hasPages()) { - if ($this->simple) { - return sprintf( - '<ul class="pager">%s %s</ul>', - $this->getPreviousButton(), - $this->getNextButton() - ); - } else { - return sprintf( - '<ul class="pagination">%s %s %s</ul>', - $this->getPreviousButton(), - $this->getLinks(), - $this->getNextButton() - ); - } - } - } - - /** - * 生成一个可点击的按钮 - * - * @param string $url - * @param string $page - * @return string - */ - protected function getAvailablePageWrapper(string $url, string $page): string - { - return '<li><a href="' . htmlentities($url) . '">' . $page . '</a></li>'; - } - - /** - * 生成一个禁用的按钮 - * - * @param string $text - * @return string - */ - protected function getDisabledTextWrapper(string $text): string - { - return '<li class="disabled"><span>' . $text . '</span></li>'; - } - - /** - * 生成一个激活的按钮 - * - * @param string $text - * @return string - */ - protected function getActivePageWrapper(string $text): string - { - return '<li class="active"><span>' . $text . '</span></li>'; - } - - /** - * 生成省略号按钮 - * - * @return string - */ - protected function getDots(): string - { - return $this->getDisabledTextWrapper('...'); - } - - /** - * 批量生成页码按钮. - * - * @param array $urls - * @return string - */ - protected function getUrlLinks(array $urls): string - { - $html = ''; - - foreach ($urls as $page => $url) { - $html .= $this->getPageLinkWrapper($url, $page); - } - - return $html; - } - - /** - * 生成普通页码按钮 - * - * @param string $url - * @param string $page - * @return string - */ - protected function getPageLinkWrapper(string $url, string $page): string - { - if ($this->currentPage() == $page) { - return $this->getActivePageWrapper($page); - } - - return $this->getAvailablePageWrapper($url, $page); - } -} diff --git a/vendor/topthink/think-orm/stubs/Exception.php b/vendor/topthink/think-orm/stubs/Exception.php deleted file mode 100644 index 0fdba9c..0000000 --- a/vendor/topthink/think-orm/stubs/Exception.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types=1); - -namespace think; - -/** - * 异常基础类 - * @package think - */ -class Exception extends \Exception -{ - /** - * 保存异常页面显示的额外Debug数据 - * @var array - */ - protected $data = []; - - /** - * 设置异常额外的Debug数据 - * 数据将会显示为下面的格式 - * - * Exception Data - * -------------------------------------------------- - * Label 1 - * key1 value1 - * key2 value2 - * Label 2 - * key1 value1 - * key2 value2 - * - * @access protected - * @param string $label 数据分类,用于异常页面显示 - * @param array $data 需要显示的数据,必须为关联数组 - */ - final protected function setData(string $label, array $data) - { - $this->data[$label] = $data; - } - - /** - * 获取异常额外Debug数据 - * 主要用于输出到异常页面便于调试 - * @access public - * @return array 由setData设置的Debug数据 - */ - final public function getData() - { - return $this->data; - } -} diff --git a/vendor/topthink/think-orm/stubs/Facade.php b/vendor/topthink/think-orm/stubs/Facade.php deleted file mode 100644 index d801d8b..0000000 --- a/vendor/topthink/think-orm/stubs/Facade.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2021 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare(strict_types=1); - -namespace think; - -class Facade -{ - /** - * 始终创建新的对象实例 - * @var bool - */ - protected static $alwaysNewInstance; - - protected static $instance; - - /** - * 获取当前Facade对应类名 - * @access protected - * @return string - */ - protected static function getFacadeClass() - {} - - /** - * 创建Facade实例 - * @static - * @access protected - * @param bool $newInstance 是否每次创建新的实例 - * @return object - */ - protected static function createFacade(bool $newInstance = false) - { - $class = static::getFacadeClass() ?: 'think\DbManager'; - - if (static::$alwaysNewInstance) { - $newInstance = true; - } - - if ($newInstance) { - return new $class(); - } - - if (!self::$instance) { - self::$instance = new $class(); - } - - return self::$instance; - - } - - // 调用实际类的方法 - public static function __callStatic($method, $params) - { - return call_user_func_array([static::createFacade(), $method], $params); - } -} diff --git a/vendor/topthink/think-orm/stubs/load_stubs.php b/vendor/topthink/think-orm/stubs/load_stubs.php deleted file mode 100644 index 734507e..0000000 --- a/vendor/topthink/think-orm/stubs/load_stubs.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -if (!\class_exists('think\Exception')) { - require __DIR__ . '/Exception.php'; -} - -if (!\class_exists('think\Facade')) { - require __DIR__ . '/Facade.php'; -} diff --git a/vendor/topthink/think-queue/.gitignore b/vendor/topthink/think-queue/.gitignore deleted file mode 100644 index 4aec782..0000000 --- a/vendor/topthink/think-queue/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/vendor/ -/.idea/ -/composer.lock -/thinkphp/ diff --git a/vendor/topthink/think-queue/LICENSE b/vendor/topthink/think-queue/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/vendor/topthink/think-queue/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/topthink/think-queue/README.md b/vendor/topthink/think-queue/README.md deleted file mode 100644 index 08266d8..0000000 --- a/vendor/topthink/think-queue/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# think-queue for ThinkPHP6 - -## 安装 - -> composer require topthink/think-queue - -## 配置 - -> 配置文件位于 `config/queue.php` - -### 公共配置 - -``` -[ - 'default'=>'sync' //驱动类型,可选择 sync(默认):同步执行,database:数据库驱动,redis:Redis驱动,topthink:Topthink驱动 - //或其他自定义的完整的类名 -] -``` - -### 驱动配置 -> 各个驱动的具体可用配置项在`think\queue\connector`目录下各个驱动类里的`options`属性中,写在上面的`queue`配置里即可覆盖 - - -## 创建任务类 -> 单模块项目推荐使用 `app\job` 作为任务类的命名空间 -> 多模块项目可用使用 `app\module\job` 作为任务类的命名空间 -> 也可以放在任意可以自动加载到的地方 - -任务类不需继承任何类,如果这个类只有一个任务,那么就只需要提供一个`fire`方法就可以了,如果有多个小任务,就写多个方法,下面发布任务的时候会有区别 -每个方法会传入两个参数 `think\queue\Job $job`(当前的任务对象) 和 `$data`(发布任务时自定义的数据) - -还有个可选的任务失败执行的方法 `failed` 传入的参数为`$data`(发布任务时自定义的数据) - -### 下面写两个例子 - -``` -namespace app\job; - -use think\queue\Job; - -class Job1{ - - public function fire(Job $job, $data){ - - //....这里执行具体的任务 - - if ($job->attempts() > 3) { - //通过这个方法可以检查这个任务已经重试了几次了 - } - - - //如果任务执行成功后 记得删除任务,不然这个任务会重复执行,直到达到最大重试次数后失败后,执行failed方法 - $job->delete(); - - // 也可以重新发布这个任务 - $job->release($delay); //$delay为延迟时间 - - } - - public function failed($data){ - - // ...任务达到最大重试次数后,失败了 - } - -} - -``` - -``` - -namespace app\lib\job; - -use think\queue\Job; - -class Job2{ - - public function task1(Job $job, $data){ - - - } - - public function task2(Job $job, $data){ - - - } - - public function failed($data){ - - - } - -} - -``` - - -## 发布任务 -> `think\Queue::push($job, $data = '', $queue = null)` 和 `think\Queue::later($delay, $job, $data = '', $queue = null)` 两个方法,前者是立即执行,后者是在`$delay`秒后执行 - -`$job` 是任务名 -单模块的,且命名空间是`app\job`的,比如上面的例子一,写`Job1`类名即可 -多模块的,且命名空间是`app\module\job`的,写`model/Job1`即可 -其他的需要些完整的类名,比如上面的例子二,需要写完整的类名`app\lib\job\Job2` -如果一个任务类里有多个小任务的话,如上面的例子二,需要用@+方法名`app\lib\job\Job2@task1`、`app\lib\job\Job2@task2` - -`$data` 是你要传到任务里的参数 - -`$queue` 队列名,指定这个任务是在哪个队列上执行,同下面监控队列的时候指定的队列名,可不填 - -## 监听任务并执行 - -> php think queue:listen - -> php think queue:work - -两种,具体的可选参数可以输入命令加 --help 查看 - ->可配合supervisor使用,保证进程常驻 diff --git a/vendor/topthink/think-queue/composer.json b/vendor/topthink/think-queue/composer.json deleted file mode 100644 index c128c25..0000000 --- a/vendor/topthink/think-queue/composer.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "topthink/think-queue", - "description": "The ThinkPHP5 Queue Package", - "authors": [ - { - "name": "yunwuxin", - "email": "448901948@qq.com" - } - ], - "license": "Apache-2.0", - "autoload": { - "psr-4": { - "think\\": "src" - }, - "files": [ - "src/common.php" - ] - }, - "autoload-dev": { - "psr-4": { - "think\\test\\queue\\": "tests" - } - }, - "minimum-stability": "dev", - "require": { - "topthink/think-helper": "^3.0.4", - "topthink/framework": "^6.0.0", - "topthink/think-factory": "^1.0.0", - "symfony/process": "^4.2", - "nesbot/carbon": "^2.16" - }, - "extra": { - "think": { - "services": [ - "think\\queue\\Service" - ], - "config": { - "queue": "src/config.php" - } - } - }, - "require-dev": { - "phpunit/phpunit": "^6.2", - "mockery/mockery": "^1.2", - "topthink/think-migration": "^3.0.0" - } -} diff --git a/vendor/topthink/think-queue/phpunit.xml.dist b/vendor/topthink/think-queue/phpunit.xml.dist deleted file mode 100644 index 0234fbc..0000000 --- a/vendor/topthink/think-queue/phpunit.xml.dist +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<phpunit backupGlobals="false" - backupStaticAttributes="false" - beStrictAboutTestsThatDoNotTestAnything="false" - bootstrap="tests/bootstrap.php" - colors="true" - convertErrorsToExceptions="true" - convertNoticesToExceptions="true" - convertWarningsToExceptions="true" - processIsolation="false" - stopOnError="false" - stopOnFailure="false" - verbose="true" -> - <testsuites> - <testsuite name="Think Queue Test Suite"> - <directory suffix="Test.php">./tests</directory> - </testsuite> - </testsuites> - <filter> - <whitelist processUncoveredFilesFromWhitelist="true"> - <directory suffix=".php">./src</directory> - <exclude> - <file>./src/queue/Service.php</file> - <file>./src/common.php</file> - <file>./src/config.php</file> - </exclude> - </whitelist> - </filter> -</phpunit> diff --git a/vendor/topthink/think-queue/src/Queue.php b/vendor/topthink/think-queue/src/Queue.php deleted file mode 100644 index 30a130b..0000000 --- a/vendor/topthink/think-queue/src/Queue.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think; - -use InvalidArgumentException; -use think\helper\Str; -use think\queue\Connector; - -/** - * Class Queue - * @package think\queue - * - * @method Connector driver($driver = null) - */ -class Queue extends Factory -{ - protected $namespace = '\\think\\queue\\connector\\'; - - /** - * Get the queue connector configuration. - * - * @param string $name - * @return array - */ - protected function getConfig($name) - { - return $this->app->config->get("queue.connectors.{$name}", ['driver' => 'sync']); - } - - protected function createDriver($name) - { - $driver = $this->getConfig($name)['driver']; - - $class = false !== strpos($driver, '\\') ? $driver : $this->namespace . Str::studly($driver); - - /** @var Connector $driver */ - if (class_exists($class)) { - $driver = $this->app->invokeClass($class, [$this->getConfig($driver)]); - - return $driver->setApp($this->app) - ->setConnectorName($name); - } - - throw new InvalidArgumentException("Driver [$driver] not supported."); - } - - /** - * 默认驱动 - * @return string - */ - public function getDefaultDriver() - { - return $this->app->config->get('queue.default', 'sync'); - } -} diff --git a/vendor/topthink/think-queue/src/common.php b/vendor/topthink/think-queue/src/common.php deleted file mode 100644 index 207b0b8..0000000 --- a/vendor/topthink/think-queue/src/common.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -use think\facade\Queue; - -if (!function_exists('queue')) { - - /** - * 添加到队列 - * @param $job - * @param string $data - * @param int $delay - * @param null $queue - */ - function queue($job, $data = '', $delay = 0, $queue = null) - { - if ($delay > 0) { - Queue::later($delay, $job, $data, $queue); - } else { - Queue::push($job, $data, $queue); - } - } -} diff --git a/vendor/topthink/think-queue/src/config.php b/vendor/topthink/think-queue/src/config.php deleted file mode 100644 index 2122a31..0000000 --- a/vendor/topthink/think-queue/src/config.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -return [ - 'default' => 'sync', - 'connectors' => [ - 'sync' => [ - 'driver' => 'sync', - ], - 'database' => [ - 'driver' => 'database', - 'queue' => 'default', - 'table' => 'jobs', - ], - 'redis' => [ - 'driver' => 'redis', - 'queue' => 'default', - 'host' => '127.0.0.1', - 'port' => 6379, - 'password' => '', - 'select' => 0, - 'timeout' => 0, - 'persistent' => false, - ], - ], - 'failed' => [ - 'type' => 'none', - 'table' => 'failed_jobs', - ], -]; diff --git a/vendor/topthink/think-queue/src/facade/Queue.php b/vendor/topthink/think-queue/src/facade/Queue.php deleted file mode 100644 index 23c2c30..0000000 --- a/vendor/topthink/think-queue/src/facade/Queue.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -namespace think\facade; - -use think\Facade; - -/** - * Class Queue - * @package think\facade - * @mixin \think\Queue - */ -class Queue extends Facade -{ - protected static function getFacadeClass() - { - return 'queue'; - } -} diff --git a/vendor/topthink/think-queue/src/queue/CallQueuedHandler.php b/vendor/topthink/think-queue/src/queue/CallQueuedHandler.php deleted file mode 100644 index 0f1a627..0000000 --- a/vendor/topthink/think-queue/src/queue/CallQueuedHandler.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue; - -class CallQueuedHandler -{ - - public function call(Job $job, array $data) - { - $command = unserialize($data['command']); - - call_user_func([$command, 'handle']); - - if (!$job->isDeletedOrReleased()) { - $job->delete(); - } - } - - public function failed(array $data) - { - $command = unserialize($data['command']); - - if (method_exists($command, 'failed')) { - $command->failed(); - } - } -} diff --git a/vendor/topthink/think-queue/src/queue/Connector.php b/vendor/topthink/think-queue/src/queue/Connector.php deleted file mode 100644 index 7fedd74..0000000 --- a/vendor/topthink/think-queue/src/queue/Connector.php +++ /dev/null @@ -1,163 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue; - -use DateTimeInterface; -use InvalidArgumentException; -use think\App; - -abstract class Connector -{ - /** @var App */ - protected $app; - - /** - * The connector name for the queue. - * - * @var string - */ - protected $connectorName; - - protected $options = []; - - abstract public function size($queue); - - abstract public function push($job, $data = '', $queue = null); - - public function pushOn($queue, $job, $data = '') - { - return $this->push($job, $data, $queue); - } - - abstract public function pushRaw($payload, $queue = null, array $options = []); - - abstract public function later($delay, $job, $data = '', $queue = null); - - public function laterOn($queue, $delay, $job, $data = '') - { - return $this->later($delay, $job, $data, $queue); - } - - public function bulk($jobs, $data = '', $queue = null) - { - foreach ((array) $jobs as $job) { - $this->push($job, $data, $queue); - } - } - - abstract public function pop($queue = null); - - protected function createPayload($job, $data = '') - { - $payload = $this->createPayloadArray($job, $data); - - $payload = json_encode($payload); - - if (JSON_ERROR_NONE !== json_last_error()) { - throw new InvalidArgumentException('Unable to create payload: ' . json_last_error_msg()); - } - - return $payload; - } - - protected function createPayloadArray($job, $data = '') - { - return is_object($job) - ? $this->createObjectPayload($job) - : $this->createPlainPayload($job, $data); - } - - protected function createPlainPayload($job, $data) - { - return [ - 'job' => $job, - 'maxTries' => null, - 'timeout' => null, - 'data' => $data, - ]; - } - - protected function createObjectPayload($job) - { - $payload = [ - 'job' => 'think\queue\CallQueuedHandler@call', - 'maxTries' => $job->tries ?? null, - 'timeout' => $job->timeout ?? null, - 'timeoutAt' => $this->getJobExpiration($job), - 'data' => [ - 'commandName' => $job, - 'command' => $job, - ], - ]; - - return array_merge($payload, [ - 'data' => [ - 'commandName' => get_class($job), - 'command' => serialize(clone $job), - ], - ]); - } - - public function getJobExpiration($job) - { - if (!method_exists($job, 'retryUntil') && !isset($job->timeoutAt)) { - return; - } - - $expiration = $job->timeoutAt ?? $job->retryUntil(); - - return $expiration instanceof DateTimeInterface - ? $expiration->getTimestamp() : $expiration; - } - - protected function setMeta($payload, $key, $value) - { - $payload = json_decode($payload, true); - $payload[$key] = $value; - $payload = json_encode($payload); - - if (JSON_ERROR_NONE !== json_last_error()) { - throw new InvalidArgumentException('Unable to create payload: ' . json_last_error_msg()); - } - - return $payload; - } - - public function setApp(App $app) - { - $this->app = $app; - return $this; - } - - /** - * Get the connector name for the queue. - * - * @return string - */ - public function getConnectorName() - { - return $this->connectorName; - } - - /** - * Set the connector name for the queue. - * - * @param string $name - * @return $this - */ - public function setConnectorName($name) - { - $this->connectorName = $name; - - return $this; - } -} diff --git a/vendor/topthink/think-queue/src/queue/FailedJob.php b/vendor/topthink/think-queue/src/queue/FailedJob.php deleted file mode 100644 index e03f816..0000000 --- a/vendor/topthink/think-queue/src/queue/FailedJob.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php - -namespace think\queue; - -abstract class FailedJob -{ - /** - * Log a failed job into storage. - * - * @param string $connection - * @param string $queue - * @param string $payload - * @param \Exception $exception - * @return int|null - */ - abstract public function log($connection, $queue, $payload, $exception); - - /** - * Get a list of all of the failed jobs. - * - * @return array - */ - abstract public function all(); - - /** - * Get a single failed job. - * - * @param mixed $id - * @return object|null - */ - abstract public function find($id); - - /** - * Delete a single failed job from storage. - * - * @param mixed $id - * @return bool - */ - abstract public function forget($id); - - /** - * Flush all of the failed jobs from storage. - * - * @return void - */ - abstract public function flush(); -} diff --git a/vendor/topthink/think-queue/src/queue/InteractsWithTime.php b/vendor/topthink/think-queue/src/queue/InteractsWithTime.php deleted file mode 100644 index 04602c9..0000000 --- a/vendor/topthink/think-queue/src/queue/InteractsWithTime.php +++ /dev/null @@ -1,65 +0,0 @@ -<?php - -namespace think\queue; - -use Carbon\Carbon; -use DateInterval; -use DateTimeInterface; - -trait InteractsWithTime -{ - /** - * Get the number of seconds until the given DateTime. - * - * @param DateTimeInterface|DateInterval|int $delay - * @return int - */ - protected function secondsUntil($delay) - { - $delay = $this->parseDateInterval($delay); - - return $delay instanceof DateTimeInterface - ? max(0, $delay->getTimestamp() - $this->currentTime()) - : (int) $delay; - } - - /** - * Get the "available at" UNIX timestamp. - * - * @param DateTimeInterface|DateInterval|int $delay - * @return int - */ - protected function availableAt($delay = 0) - { - $delay = $this->parseDateInterval($delay); - - return $delay instanceof DateTimeInterface - ? $delay->getTimestamp() - : Carbon::now()->addRealSeconds($delay)->getTimestamp(); - } - - /** - * If the given value is an interval, convert it to a DateTime instance. - * - * @param DateTimeInterface|DateInterval|int $delay - * @return DateTimeInterface|int - */ - protected function parseDateInterval($delay) - { - if ($delay instanceof DateInterval) { - $delay = Carbon::now()->add($delay); - } - - return $delay; - } - - /** - * Get the current system time as a UNIX timestamp. - * - * @return int - */ - protected function currentTime() - { - return Carbon::now()->getTimestamp(); - } -} diff --git a/vendor/topthink/think-queue/src/queue/Job.php b/vendor/topthink/think-queue/src/queue/Job.php deleted file mode 100644 index 40e37eb..0000000 --- a/vendor/topthink/think-queue/src/queue/Job.php +++ /dev/null @@ -1,282 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue; - -use Exception; -use think\App; - -abstract class Job -{ - - /** - * The job handler instance. - * @var mixed - */ - protected $instance; - - /** - * @var App - */ - protected $app; - - /** - * The name of the queue the job belongs to. - * @var string - */ - protected $queue; - - /** - * The name of the connection the job belongs to. - */ - protected $connector; - - /** - * Indicates if the job has been deleted. - * @var bool - */ - protected $deleted = false; - - /** - * Indicates if the job has been released. - * @var bool - */ - protected $released = false; - - /** - * Indicates if the job has failed. - * - * @var bool - */ - protected $failed = false; - - /** - * Get the decoded body of the job. - * - * @return array - */ - public function payload() - { - return json_decode($this->getRawBody(), true); - } - - /** - * Fire the job. - * @return void - */ - public function fire() - { - $payload = $this->payload(); - - list($class, $method) = $this->parseJob($payload['job']); - - $this->instance = $this->resolve($class); - if ($this->instance) { - $this->instance->{$method}($this, $payload['data']); - } - } - - /** - * Delete the job from the queue. - * @return void - */ - public function delete() - { - $this->deleted = true; - } - - /** - * Determine if the job has been deleted. - * @return bool - */ - public function isDeleted() - { - return $this->deleted; - } - - /** - * Release the job back into the queue. - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - $this->released = true; - } - - /** - * Determine if the job was released back into the queue. - * @return bool - */ - public function isReleased() - { - return $this->released; - } - - /** - * Determine if the job has been deleted or released. - * @return bool - */ - public function isDeletedOrReleased() - { - return $this->isDeleted() || $this->isReleased(); - } - - /** - * Get the job identifier. - * - * @return string - */ - abstract public function getJobId(); - - /** - * Get the number of times the job has been attempted. - * @return int - */ - abstract public function attempts(); - - /** - * Get the raw body string for the job. - * @return string - */ - abstract public function getRawBody(); - - /** - * Parse the job declaration into class and method. - * @param string $job - * @return array - */ - protected function parseJob($job) - { - $segments = explode('@', $job); - - return count($segments) > 1 ? $segments : [$segments[0], 'fire']; - } - - /** - * Resolve the given job handler. - * @param string $name - * @return mixed - */ - protected function resolve($name) - { - if (strpos($name, '\\') === false) { - - if (strpos($name, '/') === false) { - $app = ''; - } else { - list($app, $name) = explode('/', $name, 2); - } - - $name = ($this->app->config->get('app.app_namespace') ?: 'app\\') . ($app ? strtolower($app) . '\\' : '') . 'job\\' . $name; - } - - return $this->app->make($name); - } - - /** - * Determine if the job has been marked as a failure. - * - * @return bool - */ - public function hasFailed() - { - return $this->failed; - } - - /** - * Mark the job as "failed". - * - * @return void - */ - public function markAsFailed() - { - $this->failed = true; - } - - /** - * Process an exception that caused the job to fail. - * - * @param Exception $e - * @return void - */ - public function failed($e) - { - $this->markAsFailed(); - - $payload = $this->payload(); - - list($class, $method) = $this->parseJob($payload['job']); - - if (method_exists($this->instance = $this->resolve($class), 'failed')) { - $this->instance->failed($payload['data'], $e); - } - } - - /** - * Get the number of times to attempt a job. - * - * @return int|null - */ - public function maxTries() - { - return $this->payload()['maxTries'] ?? null; - } - - /** - * Get the number of seconds the job can run. - * - * @return int|null - */ - public function timeout() - { - return $this->payload()['timeout'] ?? null; - } - - /** - * Get the timestamp indicating when the job should timeout. - * - * @return int|null - */ - public function timeoutAt() - { - return $this->payload()['timeoutAt'] ?? null; - } - - /** - * Get the name of the queued job class. - * - * @return string - */ - public function getName() - { - return $this->payload()['job']; - } - - /** - * Get the name of the connection the job belongs to. - * - * @return string - */ - public function getConnector() - { - return $this->connector; - } - - /** - * Get the name of the queue the job belongs to. - * @return string - */ - public function getQueue() - { - return $this->queue; - } -} diff --git a/vendor/topthink/think-queue/src/queue/Listener.php b/vendor/topthink/think-queue/src/queue/Listener.php deleted file mode 100644 index 4731791..0000000 --- a/vendor/topthink/think-queue/src/queue/Listener.php +++ /dev/null @@ -1,162 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue; - -use Closure; -use Symfony\Component\Process\PhpExecutableFinder; -use Symfony\Component\Process\Process; -use think\App; - -class Listener -{ - - /** - * @var string - */ - protected $commandPath; - - /** - * @var string - */ - protected $workerCommand; - - /** - * @var \Closure|null - */ - protected $outputHandler; - - /** - * @param string $commandPath - */ - public function __construct($commandPath) - { - $this->commandPath = $commandPath; - } - - public static function __make(App $app) - { - return new self($app->getRootPath()); - } - - /** - * Get the PHP binary. - * - * @return string - */ - protected function phpBinary() - { - return (new PhpExecutableFinder)->find(false); - } - - /** - * @param string $connector - * @param string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries - * @param int $memory - * @param int $timeout - * @return void - */ - public function listen($connector, $queue, $delay = 0, $sleep = 3, $maxTries = 0, $memory = 128, $timeout = 60) - { - $process = $this->makeProcess($connector, $queue, $delay, $sleep, $maxTries, $memory, $timeout); - - while (true) { - $this->runProcess($process, $memory); - } - } - - /** - * @param string $connector - * @param string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries - * @param int $memory - * @param int $timeout - * @return Process - */ - public function makeProcess($connector, $queue, $delay, $sleep, $maxTries, $memory, $timeout) - { - $command = array_filter([ - $this->phpBinary(), - 'think', - 'queue:work', - $connector, - '--once', - "--queue={$queue}", - "--delay={$delay}", - "--memory={$memory}", - "--sleep={$sleep}", - "--tries={$maxTries}", - ], function ($value) { - return !is_null($value); - }); - - return new Process($command, $this->commandPath, null, null, $timeout); - } - - /** - * @param Process $process - * @param int $memory - */ - public function runProcess(Process $process, $memory) - { - $process->run(function ($type, $line) { - $this->handleWorkerOutput($type, $line); - }); - - if ($this->memoryExceeded($memory)) { - $this->stop(); - } - } - - /** - * @param int $type - * @param string $line - * @return void - */ - protected function handleWorkerOutput($type, $line) - { - if (isset($this->outputHandler)) { - call_user_func($this->outputHandler, $type, $line); - } - } - - /** - * @param int $memoryLimit - * @return bool - */ - public function memoryExceeded($memoryLimit) - { - return (memory_get_usage() / 1024 / 1024) >= $memoryLimit; - } - - /** - * @return void - */ - public function stop() - { - die; - } - - /** - * @param \Closure $outputHandler - * @return void - */ - public function setOutputHandler(Closure $outputHandler) - { - $this->outputHandler = $outputHandler; - } - -} diff --git a/vendor/topthink/think-queue/src/queue/Queueable.php b/vendor/topthink/think-queue/src/queue/Queueable.php deleted file mode 100644 index 2a6ec4e..0000000 --- a/vendor/topthink/think-queue/src/queue/Queueable.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue; - -trait Queueable -{ - - /** @var string 队列名称 */ - public $queue; - - /** @var integer 延迟时间 */ - public $delay; - - /** - * 设置队列名 - * @param $queue - * @return $this - */ - public function queue($queue) - { - $this->queue = $queue; - - return $this; - } - - /** - * 设置延迟时间 - * @param $delay - * @return $this - */ - public function delay($delay) - { - $this->delay = $delay; - - return $this; - } -} diff --git a/vendor/topthink/think-queue/src/queue/Service.php b/vendor/topthink/think-queue/src/queue/Service.php deleted file mode 100644 index a6b3f4c..0000000 --- a/vendor/topthink/think-queue/src/queue/Service.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -namespace think\queue; - -use think\helper\Arr; -use think\helper\Str; -use think\Queue; -use think\queue\command\FailedTable; -use think\queue\command\FlushFailed; -use think\queue\command\ForgetFailed; -use think\queue\command\Listen; -use think\queue\command\ListFailed; -use think\queue\command\Restart; -use think\queue\command\Retry; -use think\queue\command\Table; -use think\queue\command\Work; - -class Service extends \think\Service -{ - public function register() - { - $this->app->bind('queue', Queue::class); - $this->app->bind('queue.failer', function () { - - $config = $this->app->config->get('queue.failed', []); - - $type = Arr::pull($config, 'type', 'none'); - - $class = false !== strpos($type, '\\') ? $type : '\\think\\queue\\failed\\' . Str::studly($type); - - return $this->app->invokeClass($class, [$config]); - }); - } - - public function boot() - { - $this->commands([ - FailedJob::class, - Table::class, - FlushFailed::class, - ForgetFailed::class, - ListFailed::class, - Retry::class, - Work::class, - Restart::class, - Listen::class, - FailedTable::class, - ]); - } -} diff --git a/vendor/topthink/think-queue/src/queue/ShouldQueue.php b/vendor/topthink/think-queue/src/queue/ShouldQueue.php deleted file mode 100644 index cb49c12..0000000 --- a/vendor/topthink/think-queue/src/queue/ShouldQueue.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue; - -interface ShouldQueue -{ - -} diff --git a/vendor/topthink/think-queue/src/queue/Worker.php b/vendor/topthink/think-queue/src/queue/Worker.php deleted file mode 100644 index 25e98b4..0000000 --- a/vendor/topthink/think-queue/src/queue/Worker.php +++ /dev/null @@ -1,408 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue; - -use Exception; -use RuntimeException; -use think\Cache; -use think\Event; -use think\exception\Handle; -use think\Queue; -use think\queue\event\JobExceptionOccurred; -use think\queue\event\JobFailed; -use think\queue\event\JobProcessed; -use think\queue\event\JobProcessing; -use think\queue\event\WorkerStopping; -use Throwable; - -class Worker -{ - /** @var Event */ - protected $event; - /** @var Handle */ - protected $handle; - /** @var Queue */ - protected $queue; - - /** @var Cache */ - protected $cache; - - /** - * Indicates if the worker should exit. - * - * @var bool - */ - public $shouldQuit = false; - - /** - * Indicates if the worker is paused. - * - * @var bool - */ - public $paused = false; - - public function __construct(Queue $queue, Event $event, Handle $handle, Cache $cache) - { - $this->queue = $queue; - $this->event = $event; - $this->handle = $handle; - $this->cache = $cache; - } - - /** - * @param string $connector - * @param string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries - * @param int $memory - * @param int $timeout - */ - public function daemon($connector, $queue, $delay = 0, $sleep = 3, $maxTries = 0, $memory = 128, $timeout = 60) - { - if ($this->supportsAsyncSignals()) { - $this->listenForSignals(); - } - - $lastRestart = $this->getTimestampOfLastQueueRestart(); - - while (true) { - - $job = $this->getNextJob( - $this->queue->driver($connector), $queue - ); - - if ($this->supportsAsyncSignals()) { - $this->registerTimeoutHandler($job, $timeout); - } - - if ($job) { - $this->runJob($job, $connector, $maxTries, $delay); - } else { - $this->sleep($sleep); - } - - if ($this->shouldQuit || $this->queueShouldRestart($lastRestart)) { - $this->stop(); - } elseif ($this->memoryExceeded($memory)) { - $this->stop(12); - } - } - } - - /** - * Determine if the queue worker should restart. - * - * @param int|null $lastRestart - * @return bool - */ - protected function queueShouldRestart($lastRestart) - { - return $this->getTimestampOfLastQueueRestart() != $lastRestart; - } - - /** - * Determine if the memory limit has been exceeded. - * - * @param int $memoryLimit - * @return bool - */ - public function memoryExceeded($memoryLimit) - { - return (memory_get_usage(true) / 1024 / 1024) >= $memoryLimit; - } - - /** - * 获取队列重启时间 - * @return mixed - */ - protected function getTimestampOfLastQueueRestart() - { - if ($this->cache) { - return $this->cache->get('think:queue:restart'); - } - } - - /** - * Register the worker timeout handler. - * - * @param Job|null $job - * @param int $timeout - * @return void - */ - protected function registerTimeoutHandler($job, $timeout) - { - pcntl_signal(SIGALRM, function () { - $this->kill(1); - }); - - pcntl_alarm( - max($this->timeoutForJob($job, $timeout), 0) - ); - } - - /** - * Stop listening and bail out of the script. - * - * @param int $status - * @return void - */ - public function stop($status = 0) - { - $this->event->trigger(new WorkerStopping($status)); - - exit($status); - } - - /** - * Kill the process. - * - * @param int $status - * @return void - */ - public function kill($status = 0) - { - $this->event->trigger(new WorkerStopping($status)); - - if (extension_loaded('posix')) { - posix_kill(getmypid(), SIGKILL); - } - - exit($status); - } - - /** - * Get the appropriate timeout for the given job. - * - * @param Job|null $job - * @param int $timeout - * @return int - */ - protected function timeoutForJob($job, $timeout) - { - return $job && !is_null($job->timeout()) ? $job->timeout() : $timeout; - } - - /** - * Determine if "async" signals are supported. - * - * @return bool - */ - protected function supportsAsyncSignals() - { - return extension_loaded('pcntl'); - } - - /** - * Enable async signals for the process. - * - * @return void - */ - protected function listenForSignals() - { - pcntl_async_signals(true); - - pcntl_signal(SIGTERM, function () { - $this->shouldQuit = true; - }); - - pcntl_signal(SIGUSR2, function () { - $this->paused = true; - }); - - pcntl_signal(SIGCONT, function () { - $this->paused = false; - }); - } - - /** - * 执行下个任务 - * @param string $connectorName - * @param string $queue - * @param int $delay - * @param int $sleep - * @param int $maxTries - * @return void - * @throws Exception - */ - public function runNextJob($connectorName, $queue, $delay = 0, $sleep = 3, $maxTries = 0) - { - - $job = $this->getNextJob($this->queue->driver($connectorName), $queue); - - if (!$job) { - $this->runJob($job, $connectorName, $maxTries, $delay); - return; - } - - $this->sleep($sleep); - } - - /** - * 执行任务 - * @param Job $job - * @param string $connectorName - * @param int $maxTries - * @param int $delay - * @return void - */ - protected function runJob($job, $connectorName, $maxTries, $delay) - { - try { - $this->process($connectorName, $job, $maxTries, $delay); - } catch (Exception | Throwable $e) { - $this->handle->report($e); - } - } - - /** - * 获取下个任务 - * @param Connector $connector - * @param string $queue - * @return Job - */ - protected function getNextJob($connector, $queue) - { - try { - foreach (explode(',', $queue) as $queue) { - if (!is_null($job = $connector->pop($queue))) { - return $job; - } - } - } catch (Exception | Throwable $e) { - $this->handle->report($e); - $this->sleep(1); - } - } - - /** - * Process a given job from the queue. - * @param string $connector - * @param Job $job - * @param int $maxTries - * @param int $delay - * @return void - * @throws Exception - */ - public function process($connector, Job $job, $maxTries = 0, $delay = 0) - { - try { - $this->event->trigger(new JobProcessing($connector, $job)); - - $this->markJobAsFailedIfAlreadyExceedsMaxAttempts( - $connector, $job, (int) $maxTries - ); - - $job->fire(); - - $this->event->trigger(new JobProcessed($connector, $job)); - } catch (Exception | Throwable $e) { - try { - if (!$job->hasFailed()) { - $this->markJobAsFailedIfWillExceedMaxAttempts($connector, $job, (int) $maxTries, $e); - } - - $this->event->trigger(new JobExceptionOccurred($connector, $job, $e)); - } finally { - if (!$job->isDeleted() && !$job->isReleased() && !$job->hasFailed()) { - $job->release($delay); - } - } - - throw $e; - } - } - - /** - * @param string $connector - * @param Job $job - * @param int $maxTries - */ - protected function markJobAsFailedIfAlreadyExceedsMaxAttempts($connector, $job, $maxTries) - { - $maxTries = !is_null($job->maxTries()) ? $job->maxTries() : $maxTries; - - $timeoutAt = $job->timeoutAt(); - - if ($timeoutAt && time() <= $timeoutAt) { - return; - } - - if (!$timeoutAt && ($maxTries === 0 || $job->attempts() <= $maxTries)) { - return; - } - - $this->failJob($connector, $job, $e = new RuntimeException( - $job->getName() . ' has been attempted too many times or run too long. The job may have previously timed out.' - )); - - throw $e; - } - - /** - * @param string $connector - * @param Job $job - * @param int $maxTries - * @param Exception $e - */ - protected function markJobAsFailedIfWillExceedMaxAttempts($connector, $job, $maxTries, $e) - { - $maxTries = !is_null($job->maxTries()) ? $job->maxTries() : $maxTries; - - if ($job->timeoutAt() && $job->timeoutAt() <= time()) { - $this->failJob($connector, $job, $e); - } - - if ($maxTries > 0 && $job->attempts() >= $maxTries) { - $this->failJob($connector, $job, $e); - } - } - - /** - * @param string $connector - * @param Job $job - * @param Exception $e - */ - protected function failJob($connector, $job, $e) - { - $job->markAsFailed(); - - if ($job->isDeleted()) { - return; - } - - try { - $job->delete(); - - $job->failed($e); - } finally { - $this->event->trigger(new JobFailed( - $connector, $job, $e ?: new RuntimeException('ManuallyFailed') - )); - } - } - - /** - * Sleep the script for a given number of seconds. - * @param int $seconds - * @return void - */ - public function sleep($seconds) - { - if ($seconds < 1) { - usleep($seconds * 1000000); - } else { - sleep($seconds); - } - } - -} diff --git a/vendor/topthink/think-queue/src/queue/command/FailedTable.php b/vendor/topthink/think-queue/src/queue/command/FailedTable.php deleted file mode 100644 index 620af93..0000000 --- a/vendor/topthink/think-queue/src/queue/command/FailedTable.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace think\queue\command; - -use think\console\Command; -use think\helper\Str; -use think\migration\Creator; - -class FailedTable extends Command -{ - protected function configure() - { - $this->setName('queue:failed-table') - ->setDescription('Create a migration for the failed queue jobs database table'); - } - - public function handle() - { - if (!$this->app->has('migration.creator')) { - $this->output->error('Install think-migration first please'); - return; - } - - $table = $this->app->config->get('queue.failed.table'); - - $className = Str::studly("create_{$table}_table"); - - /** @var Creator $creator */ - $creator = $this->app->get('migration.creator'); - - $path = $creator->create($className); - - // Load the alternative template if it is defined. - $contents = file_get_contents(__DIR__ . '/stubs/failed_jobs.stub'); - - // inject the class names appropriate to this migration - $contents = strtr($contents, [ - 'CreateFailedJobsTable' => $className, - '{{table}}' => $table, - ]); - - file_put_contents($path, $contents); - - $this->output->info('Migration created successfully!'); - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/FlushFailed.php b/vendor/topthink/think-queue/src/queue/command/FlushFailed.php deleted file mode 100644 index 69ea8b4..0000000 --- a/vendor/topthink/think-queue/src/queue/command/FlushFailed.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - -namespace think\queue\command; - -use think\console\Command; - -class FlushFailed extends Command -{ - protected function configure() - { - $this->setName('queue:flush') - ->setDescription('Flush all of the failed queue jobs'); - } - - public function handle() - { - $this->app->get('queue.failer')->flush(); - - $this->output->info('All failed jobs deleted successfully!'); - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/ForgetFailed.php b/vendor/topthink/think-queue/src/queue/command/ForgetFailed.php deleted file mode 100644 index 37d175d..0000000 --- a/vendor/topthink/think-queue/src/queue/command/ForgetFailed.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - -namespace think\queue\command; - -use think\console\Command; -use think\console\input\Argument; - -class ForgetFailed extends Command -{ - protected function configure() - { - $this->setName('queue:forget') - ->addArgument('id', Argument::REQUIRED, 'The ID of the failed job') - ->setDescription('Delete a failed queue job'); - } - - public function handle() - { - if ($this->app['queue.failer']->forget($this->input->getArgument('id'))) { - $this->output->info('Failed job deleted successfully!'); - } else { - $this->output->error('No failed job matches the given ID.'); - } - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/ListFailed.php b/vendor/topthink/think-queue/src/queue/command/ListFailed.php deleted file mode 100644 index 0604d72..0000000 --- a/vendor/topthink/think-queue/src/queue/command/ListFailed.php +++ /dev/null @@ -1,110 +0,0 @@ -<?php - -namespace think\queue\command; - -use think\console\Command; -use think\console\Table; -use think\helper\Arr; - -class ListFailed extends Command -{ - /** - * The table headers for the command. - * - * @var array - */ - protected $headers = ['ID', 'Connection', 'Queue', 'Class', 'Failed At']; - - protected function configure() - { - $this->setName('queue:failed') - ->setDescription('List all of the failed queue jobs'); - } - - public function handle() - { - if (count($jobs = $this->getFailedJobs()) === 0) { - $this->output->info('No failed jobs!'); - return; - } - $this->displayFailedJobs($jobs); - } - - /** - * Display the failed jobs in the console. - * - * @param array $jobs - * @return void - */ - protected function displayFailedJobs(array $jobs) - { - $table = new Table(); - $table->setHeader($this->headers); - $table->setRows($jobs); - - $this->table($table); - } - - /** - * Compile the failed jobs into a displayable format. - * - * @return array - */ - protected function getFailedJobs() - { - $failed = $this->app['queue.failer']->all(); - - return collect($failed)->map(function ($failed) { - return $this->parseFailedJob((array) $failed); - })->filter()->all(); - } - - /** - * Parse the failed job row. - * - * @param array $failed - * @return array - */ - protected function parseFailedJob(array $failed) - { - $row = array_values(Arr::except($failed, ['payload', 'exception'])); - - array_splice($row, 3, 0, $this->extractJobName($failed['payload'])); - - return $row; - } - - /** - * Extract the failed job name from payload. - * - * @param string $payload - * @return string|null - */ - private function extractJobName($payload) - { - $payload = json_decode($payload, true); - - if ($payload && (!isset($payload['data']['command']))) { - return $payload['job'] ?? null; - } elseif ($payload && isset($payload['data']['command'])) { - return $this->matchJobName($payload); - } - } - - /** - * Match the job name from the payload. - * - * @param array $payload - * @return string - */ - protected function matchJobName($payload) - { - preg_match('/"([^"]+)"/', $payload['data']['command'], $matches); - - if (isset($matches[1])) { - return $matches[1]; - } - - return $payload['job'] ?? null; - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/Listen.php b/vendor/topthink/think-queue/src/queue/command/Listen.php deleted file mode 100644 index 4c16135..0000000 --- a/vendor/topthink/think-queue/src/queue/command/Listen.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\input\Option; -use think\console\Output; -use think\queue\Listener; - -class Listen extends Command -{ - /** @var Listener */ - protected $listener; - - public function __construct(Listener $listener) - { - parent::__construct(); - $this->listener = $listener; - $this->listener->setOutputHandler(function ($type, $line) { - $this->output->write($line); - }); - } - - protected function configure() - { - $this->setName('queue:listen') - ->addArgument('connector', Argument::OPTIONAL, 'The name of the queue connector to work', null) - ->addOption('queue', null, Option::VALUE_OPTIONAL, 'The queue to listen on', null) - ->addOption('delay', null, Option::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0) - ->addOption('memory', null, Option::VALUE_OPTIONAL, 'The memory limit in megabytes', 128) - ->addOption('timeout', null, Option::VALUE_OPTIONAL, 'Seconds a job may run before timing out', 60) - ->addOption('sleep', null, Option::VALUE_OPTIONAL, 'Seconds to wait before checking queue for jobs', 3) - ->addOption('tries', null, Option::VALUE_OPTIONAL, 'Number of times to attempt a job before logging it failed', 0) - ->setDescription('Listen to a given queue'); - } - - public function execute(Input $input, Output $output) - { - $connector = $input->getArgument('connector') ?: $this->app->config->get('queue.connector', 'sync'); - - $queue = $input->getOption('queue') ?: $this->app->config->get("queue.{$connector}", 'default'); - $delay = $input->getOption('delay'); - $memory = $input->getOption('memory'); - $timeout = $input->getOption('timeout'); - $sleep = $input->getOption('sleep'); - $tries = $input->getOption('tries'); - - $this->listener->listen($connector, $queue, $delay, $sleep, $tries, $memory, $timeout); - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/Restart.php b/vendor/topthink/think-queue/src/queue/command/Restart.php deleted file mode 100644 index dd6eae5..0000000 --- a/vendor/topthink/think-queue/src/queue/command/Restart.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue\command; - -use think\Cache; -use think\console\Command; - -class Restart extends Command -{ - protected function configure() - { - $this->setName('queue:restart') - ->setDescription('Restart queue worker daemons after their current job'); - } - - public function handle(Cache $cache) - { - $cache->set('think:queue:restart', time()); - $this->output->info("Broadcasting queue restart signal."); - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/Retry.php b/vendor/topthink/think-queue/src/queue/command/Retry.php deleted file mode 100644 index 121c1c2..0000000 --- a/vendor/topthink/think-queue/src/queue/command/Retry.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - -namespace think\queue\command; - -use stdClass; -use think\console\Command; -use think\console\input\Argument; -use think\helper\Arr; - -class Retry extends Command -{ - protected function configure() - { - $this->setName('queue:retry') - ->addArgument('id', Argument::IS_ARRAY | Argument::REQUIRED, 'The ID of the failed job or "all" to retry all jobs') - ->setDescription('Retry a failed queue job'); - } - - public function handle() - { - foreach ($this->getJobIds() as $id) { - $job = $this->app['queue.failer']->find($id); - - if (is_null($job)) { - $this->output->error("Unable to find failed job with ID [{$id}]."); - } else { - $this->retryJob($job); - - $this->output->info("The failed job [{$id}] has been pushed back onto the queue!"); - - $this->app['queue.failer']->forget($id); - } - } - } - - /** - * Retry the queue job. - * - * @param stdClass $job - * @return void - */ - protected function retryJob($job) - { - $this->app['queue']->driver($job->connector)->pushRaw( - $this->resetAttempts($job->payload), $job->queue - ); - } - - /** - * Reset the payload attempts. - * - * Applicable to Redis jobs which store attempts in their payload. - * - * @param string $payload - * @return string - */ - protected function resetAttempts($payload) - { - $payload = json_decode($payload, true); - - if (isset($payload['attempts'])) { - $payload['attempts'] = 0; - } - - return json_encode($payload); - } - - /** - * Get the job IDs to be retried. - * - * @return array - */ - protected function getJobIds() - { - $ids = (array) $this->input->getArgument('id'); - - if (count($ids) === 1 && $ids[0] === 'all') { - $ids = Arr::pluck($this->app['queue.failer']->all(), 'id'); - } - - return $ids; - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/Table.php b/vendor/topthink/think-queue/src/queue/command/Table.php deleted file mode 100644 index 815cc48..0000000 --- a/vendor/topthink/think-queue/src/queue/command/Table.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -namespace think\queue\command; - -use think\console\Command; -use think\helper\Str; -use think\migration\Creator; - -class Table extends Command -{ - protected function configure() - { - $this->setName('queue:table') - ->setDescription('Create a migration for the queue jobs database table'); - } - - public function handle() - { - if (!$this->app->has('migration.creator')) { - $this->output->error('Install think-migration first please'); - return; - } - - $table = $this->app->config->get('queue.connectors.database.table'); - - $className = Str::studly("create_{$table}_table"); - - /** @var Creator $creator */ - $creator = $this->app->get('migration.creator'); - - $path = $creator->create($className); - - // Load the alternative template if it is defined. - $contents = file_get_contents(__DIR__ . '/stubs/jobs.stub'); - - // inject the class names appropriate to this migration - $contents = strtr($contents, [ - 'CreateJobsTable' => $className, - '{{table}}' => $table, - ]); - - file_put_contents($path, $contents); - - $this->output->info('Migration created successfully!'); - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/Work.php b/vendor/topthink/think-queue/src/queue/command/Work.php deleted file mode 100644 index aa4dda1..0000000 --- a/vendor/topthink/think-queue/src/queue/command/Work.php +++ /dev/null @@ -1,151 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\queue\command; - -use think\console\Command; -use think\console\Input; -use think\console\input\Argument; -use think\console\input\Option; -use think\console\Output; -use think\queue\event\JobFailed; -use think\queue\event\JobProcessed; -use think\queue\event\JobProcessing; -use think\queue\Job; -use think\queue\Worker; - -class Work extends Command -{ - - /** - * The queue worker instance. - * @var Worker - */ - protected $worker; - - public function __construct(Worker $worker) - { - parent::__construct(); - $this->worker = $worker; - } - - protected function configure() - { - $this->setName('queue:work') - ->addArgument('connector', Argument::OPTIONAL, 'The name of the queue connector to work', null) - ->addOption('queue', null, Option::VALUE_OPTIONAL, 'The queue to listen on') - ->addOption('once', null, Option::VALUE_NONE, 'Only process the next job on the queue') - ->addOption('delay', null, Option::VALUE_OPTIONAL, 'Amount of time to delay failed jobs', 0) - ->addOption('force', null, Option::VALUE_NONE, 'Force the worker to run even in maintenance mode') - ->addOption('memory', null, Option::VALUE_OPTIONAL, 'The memory limit in megabytes', 128) - ->addOption('timeout', null, Option::VALUE_OPTIONAL, 'The number of seconds a child process can run', 60) - ->addOption('sleep', null, Option::VALUE_OPTIONAL, 'Number of seconds to sleep when no job is available', 3) - ->addOption('tries', null, Option::VALUE_OPTIONAL, 'Number of times to attempt a job before logging it failed', 0) - ->setDescription('Process the next job on a queue'); - } - - /** - * Execute the console command. - * @param Input $input - * @param Output $output - * @return int|null|void - */ - public function execute(Input $input, Output $output) - { - $connector = $input->getArgument('connector') ?: $this->app->config->get('queue.connector', 'sync'); - - $queue = $input->getOption('queue') ?: $this->app->config->get("queue.{$connector}", 'default'); - $delay = $input->getOption('delay'); - $sleep = $input->getOption('sleep'); - $tries = $input->getOption('tries'); - - $this->listenForEvents(); - - if ($input->getOption('once')) { - $this->worker->runNextJob($connector, $queue, $delay, $sleep, $tries); - } else { - $memory = $input->getOption('memory'); - $timeout = $input->getOption('timeout'); - $this->worker->daemon($connector, $queue, $delay, $sleep, $tries, $memory, $timeout); - } - } - - /** - * 注册事件 - */ - protected function listenForEvents() - { - $this->app->event->listen(JobProcessing::class, function ($event) { - $this->writeOutput($event->job, 'starting'); - }); - - $this->app->event->listen(JobProcessed::class, function ($event) { - $this->writeOutput($event->job, 'success'); - }); - - $this->app->event->listen(JobFailed::class, function ($event) { - $this->writeOutput($event->job, 'failed'); - - $this->logFailedJob($event); - }); - } - - /** - * Write the status output for the queue worker. - * - * @param Job $job - * @param $status - */ - protected function writeOutput(Job $job, $status) - { - switch ($status) { - case 'starting': - $this->writeStatus($job, 'Processing', 'comment'); - break; - case 'success': - $this->writeStatus($job, 'Processed', 'info'); - break; - case 'failed': - $this->writeStatus($job, 'Failed', 'error'); - break; - } - } - - /** - * Format the status output for the queue worker. - * - * @param Job $job - * @param string $status - * @param string $type - * @return void - */ - protected function writeStatus(Job $job, $status, $type) - { - $this->output->writeln(sprintf( - "<{$type}>[%s][%s] %s</{$type}> %s", - date('Y-m-d H:i:s'), - $job->getJobId(), - str_pad("{$status}:", 11), $job->getName() - )); - } - - /** - * 记录失败任务 - * @param JobFailed $event - */ - protected function logFailedJob(JobFailed $event) - { - $this->app['queue.failer']->log( - $event->connector, $event->job->getQueue(), - $event->job->getRawBody(), $event->exception - ); - } - -} diff --git a/vendor/topthink/think-queue/src/queue/command/stubs/failed_jobs.stub b/vendor/topthink/think-queue/src/queue/command/stubs/failed_jobs.stub deleted file mode 100644 index d44ebcd..0000000 --- a/vendor/topthink/think-queue/src/queue/command/stubs/failed_jobs.stub +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -use think\migration\db\Column; -use think\migration\Migrator; - -class CreateFailedJobsTable extends Migrator -{ - public function change() - { - $this->table('{{table}}') - ->addColumn(Column::text('connection')) - ->addColumn(Column::text('queue')) - ->addColumn(Column::longText('payload')) - ->addColumn(Column::longText('exception')) - ->addColumn(Column::timestamp('failed_at')->setDefault('CURRENT_TIMESTAMP')) - ->create(); - } -} diff --git a/vendor/topthink/think-queue/src/queue/command/stubs/jobs.stub b/vendor/topthink/think-queue/src/queue/command/stubs/jobs.stub deleted file mode 100644 index 6691c90..0000000 --- a/vendor/topthink/think-queue/src/queue/command/stubs/jobs.stub +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -use think\migration\db\Column; -use think\migration\Migrator; - -class CreateJobsTable extends Migrator -{ - public function change() - { - $this->table('{{table}}') - ->addColumn(Column::string('queue')) - ->addColumn(Column::longText('payload')) - ->addColumn(Column::tinyInteger('attempts')->setUnsigned()) - ->addColumn(Column::unsignedInteger('reserved_at')->setNullable()) - ->addColumn(Column::unsignedInteger('available_at')) - ->addColumn(Column::unsignedInteger('create_at')) - ->addIndex('queue') - ->create(); - } -} diff --git a/vendor/topthink/think-queue/src/queue/connector/Database.php b/vendor/topthink/think-queue/src/queue/connector/Database.php deleted file mode 100644 index 6adc3e7..0000000 --- a/vendor/topthink/think-queue/src/queue/connector/Database.php +++ /dev/null @@ -1,202 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue\connector; - -use Carbon\Carbon; -use stdClass; -use think\Db; -use think\db\Query; -use think\queue\Connector; -use think\queue\InteractsWithTime; -use think\queue\job\Database as DatabaseJob; - -class Database extends Connector -{ - - use InteractsWithTime; - - protected $db; - - /** - * The database table that holds the jobs. - * - * @var string - */ - protected $table; - - /** - * The name of the default queue. - * - * @var string - */ - protected $default; - - /** - * The expiration time of a job. - * - * @var int|null - */ - protected $retryAfter = 60; - - public function __construct(Db $db, $table, $default = 'default', $retryAfter = 60) - { - $this->db = $db; - $this->table = $table; - $this->default = $default; - $this->retryAfter = $retryAfter; - } - - public static function __make(Db $db, $config) - { - return new self($db, $config['table'], $config['queue'], $config['retry_after'] ?? 60); - } - - public function size($queue = null) - { - $this->db->name($this->table) - ->where('queue', $this->getQueue($queue)) - ->count(); - } - - public function push($job, $data = '', $queue = null) - { - return $this->pushToDatabase($queue, $this->createPayload($job, $data)); - } - - public function pushRaw($payload, $queue = null, array $options = []) - { - return $this->pushToDatabase($queue, $payload); - } - - public function later($delay, $job, $data = '', $queue = null) - { - return $this->pushToDatabase($queue, $this->createPayload($job, $data), $delay); - } - - /** - * 重新发布任务 - * - * @param string $queue - * @param StdClass $job - * @param int $delay - * @return mixed - */ - public function release($queue, $job, $delay) - { - return $this->pushToDatabase($queue, $job->payload, $delay, $job->attempts); - } - - /** - * Push a raw payload to the database with a given delay. - * - * @param \DateTime|int $delay - * @param string|null $queue - * @param string $payload - * @param int $attempts - * @return mixed - */ - protected function pushToDatabase($queue, $payload, $delay = 0, $attempts = 0) - { - return $this->db->name($this->table)->insertGetId([ - 'queue' => $this->getQueue($queue), - 'attempts' => $attempts, - 'reserved_at' => null, - 'available_at' => $this->availableAt($delay), - 'created_at' => $this->currentTime(), - 'payload' => $payload, - ]); - } - - public function pop($queue = null) - { - $queue = $this->getQueue($queue); - - return $this->db->transaction(function () use ($queue) { - - if ($job = $this->getNextAvailableJob($queue)) { - - $job = $this->markJobAsReserved($job); - - return new DatabaseJob($this->app, $this, $job, $this->connectorName, $queue); - } - - return; - }); - } - - /** - * 获取下个有效任务 - * - * @param string|null $queue - * @return StdClass|null - */ - protected function getNextAvailableJob($queue) - { - - $job = $this->db->name($this->table) - ->lock(true) - ->where('queue', $this->getQueue($queue)) - ->where(function (Query $query) { - $query->where(function (Query $query) { - $query->whereNull('reserved_at') - ->where('available_at', '<=', $this->currentTime()); - }); - - //超时任务重试 - $expiration = Carbon::now()->subSeconds($this->retryAfter)->getTimestamp(); - - $query->whereOr(function (Query $query) use ($expiration) { - $query->where('reserved_at', '<=', $expiration); - }); - }) - ->order('id', 'asc') - ->find(); - - return $job ? (object) $job : null; - } - - /** - * 标记任务正在执行. - * - * @param stdClass $job - * @return stdClass - */ - protected function markJobAsReserved($job) - { - $this->db->name($this->table)->where('id', $job->id)->update([ - 'reserved_at' => $job->reserved_at = $this->currentTime(), - 'attempts' => ++$job->attempts, - ]); - - return $job; - } - - /** - * 删除任务 - * - * @param string $id - * @return void - */ - public function deleteReserved($id) - { - $this->db->transaction(function () use ($id) { - if ($this->db->name($this->table)->lock(true)->find($id)) { - $this->db->name($this->table)->where('id', $id)->delete(); - } - }); - } - - protected function getQueue($queue) - { - return $queue ?: $this->default; - } -} diff --git a/vendor/topthink/think-queue/src/queue/connector/Redis.php b/vendor/topthink/think-queue/src/queue/connector/Redis.php deleted file mode 100644 index b29f813..0000000 --- a/vendor/topthink/think-queue/src/queue/connector/Redis.php +++ /dev/null @@ -1,298 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue\connector; - -use Closure; -use Exception; -use think\helper\Str; -use think\queue\Connector; -use think\queue\InteractsWithTime; -use think\queue\job\Redis as RedisJob; - -class Redis extends Connector -{ - use InteractsWithTime; - - /** @var \Redis */ - protected $redis; - - /** - * The name of the default queue. - * - * @var string - */ - protected $default; - - /** - * The expiration time of a job. - * - * @var int|null - */ - protected $retryAfter = 60; - - /** - * The maximum number of seconds to block for a job. - * - * @var int|null - */ - protected $blockFor = null; - - public function __construct(\Redis $redis, $default = 'default', $retryAfter = 60, $blockFor = null) - { - $this->redis = $redis; - $this->default = $default; - $this->retryAfter = $retryAfter; - $this->blockFor = $blockFor; - } - - public static function __make($config) - { - if (!extension_loaded('redis')) { - throw new Exception('redis扩展未安装'); - } - - $func = $config['persistent'] ? 'pconnect' : 'connect'; - - $redis = new \Redis; - $redis->$func($config['host'], $config['port'], $config['timeout']); - - if ('' != $config['password']) { - $redis->auth($config['password']); - } - - if (0 != $config['select']) { - $redis->select($config['select']); - } - - return new self($redis, $config['queue'], $config['retry_after'] ?? 60, $config['block_for'] ?? null); - } - - public function size($queue) - { - $queue = $this->getQueue($queue); - - return $this->redis->lLen($queue) + $this->redis->zCard("{$queue}:delayed") + $this->redis->zCard("{$queue}:reserved"); - } - - public function push($job, $data = '', $queue = null) - { - return $this->pushRaw($this->createPayload($job, $data), $queue); - } - - public function pushRaw($payload, $queue = null, array $options = []) - { - $this->redis->rPush($this->getQueue($queue), $payload); - - return json_decode($payload, true)['id'] ?? null; - } - - public function later($delay, $job, $data = '', $queue = null) - { - return $this->laterRaw($delay, $this->createPayload($job, $data), $queue); - } - - protected function laterRaw($delay, $payload, $queue = null) - { - $this->redis->zadd( - $this->getQueue($queue) . ':delayed', $this->availableAt($delay), $payload - ); - - return json_decode($payload, true)['id'] ?? null; - } - - public function pop($queue = null) - { - $this->migrate($prefixed = $this->getQueue($queue)); - - if (empty($nextJob = $this->retrieveNextJob($prefixed))) { - return; - } - - [$job, $reserved] = $nextJob; - - if ($reserved) { - return new RedisJob($this->app, $this, $job, $reserved, $this->connectorName, $queue); - } - } - - /** - * Migrate any delayed or expired jobs onto the primary queue. - * - * @param string $queue - * @return void - */ - protected function migrate($queue) - { - $this->migrateExpiredJobs($queue . ':delayed', $queue); - - if (!is_null($this->retryAfter)) { - $this->migrateExpiredJobs($queue . ':reserved', $queue); - } - } - - /** - * 移动延迟任务 - * - * @param string $from - * @param string $to - * @param bool $attempt - */ - public function migrateExpiredJobs($from, $to, $attempt = true) - { - $this->redis->watch($from); - - $jobs = $this->redis->zRangeByScore($from, '-inf', $this->currentTime()); - - if (!empty($jobs)) { - $this->transaction(function () use ($from, $to, $jobs, $attempt) { - - $this->redis->zRemRangeByRank($from, 0, count($jobs) - 1); - - for ($i = 0; $i < count($jobs); $i += 100) { - - $values = array_slice($jobs, $i, 100); - - $this->redis->rPush($to, ...$values); - } - }); - } - - $this->redis->unwatch(); - } - - /** - * Retrieve the next job from the queue. - * - * @param string $queue - * @return array - */ - protected function retrieveNextJob($queue) - { - if (!is_null($this->blockFor)) { - return $this->blockingPop($queue); - } - - $job = $this->redis->lpop($queue); - $reserved = false; - - if ($job) { - $reserved = json_decode($job); - $reserved['attempts']++; - $reserved = json_encode($reserved); - $this->redis->zAdd($queue . ':reserved', $this->availableAt($this->retryAfter), $reserved); - } - - return [$job, $reserved]; - } - - /** - * Retrieve the next job by blocking-pop. - * - * @param string $queue - * @return array - */ - protected function blockingPop($queue) - { - $rawBody = $this->redis->blpop($queue, $this->blockFor); - - if (!empty($rawBody)) { - $payload = json_decode($rawBody[1], true); - - $payload['attempts']++; - - $reserved = json_encode($payload); - - $this->redis->zadd($queue . ':reserved', $this->availableAt($this->retryAfter), $reserved); - - return [$rawBody[1], $reserved]; - } - - return [null, null]; - } - - /** - * 删除任务 - * - * @param string $queue - * @param RedisJob $job - * @return void - */ - public function deleteReserved($queue, $job) - { - $this->redis->zRem($this->getQueue($queue) . ':reserved', $job->getReservedJob()); - } - - /** - * Delete a reserved job from the reserved queue and release it. - * - * @param string $queue - * @param RedisJob $job - * @param int $delay - * @return void - */ - public function deleteAndRelease($queue, $job, $delay) - { - $queue = $this->getQueue($queue); - - $reserved = $job->getReservedJob(); - - $this->redis->zRem($queue . ':reserved', $reserved); - - $this->redis->zAdd($queue . ':delayed', $this->availableAt($delay), $reserved); - } - - /** - * redis事务 - * @param Closure $closure - */ - protected function transaction(Closure $closure) - { - $this->redis->multi(); - try { - call_user_func($closure); - if (!$this->redis->exec()) { - $this->redis->discard(); - } - } catch (Exception $e) { - $this->redis->discard(); - } - } - - protected function createPayloadArray($job, $data = '') - { - return array_merge(parent::createPayloadArray($job, $data), [ - 'id' => $this->getRandomId(), - 'attempts' => 0, - ]); - } - - /** - * 随机id - * - * @return string - */ - protected function getRandomId() - { - return Str::random(32); - } - - /** - * 获取队列名 - * - * @param string|null $queue - * @return string - */ - protected function getQueue($queue) - { - return 'queues:' . ($queue ?: $this->default); - } -} diff --git a/vendor/topthink/think-queue/src/queue/connector/Sync.php b/vendor/topthink/think-queue/src/queue/connector/Sync.php deleted file mode 100644 index 4f1265c..0000000 --- a/vendor/topthink/think-queue/src/queue/connector/Sync.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue\connector; - -use Exception; -use think\queue\Connector; -use think\queue\event\JobFailed; -use think\queue\event\JobProcessed; -use think\queue\event\JobProcessing; -use think\queue\job\Sync as SyncJob; -use Throwable; - -class Sync extends Connector -{ - - public function size($queue = null) - { - return 0; - } - - public function push($job, $data = '', $queue = null) - { - $queueJob = $this->resolveJob($this->createPayload($job, $data), $queue); - - try { - $this->triggerEvent(new JobProcessing($this->connectorName, $job)); - - $queueJob->fire(); - - $this->triggerEvent(new JobProcessed($this->connectorName, $job)); - } catch (Exception | Throwable $e) { - - $this->triggerEvent(new JobFailed($this->connectorName, $job, $e)); - - throw $e; - } - - return 0; - } - - protected function triggerEvent($event) - { - $this->app->event->trigger($event); - } - - public function pop($queue = null) - { - - } - - protected function resolveJob($payload, $queue) - { - return new SyncJob($this->app, $payload, $this->connectorName, $queue); - } - - public function pushRaw($payload, $queue = null, array $options = []) - { - - } - - public function later($delay, $job, $data = '', $queue = null) - { - return $this->push($job, $data, $queue); - } -} diff --git a/vendor/topthink/think-queue/src/queue/event/JobExceptionOccurred.php b/vendor/topthink/think-queue/src/queue/event/JobExceptionOccurred.php deleted file mode 100644 index 2e7d1eb..0000000 --- a/vendor/topthink/think-queue/src/queue/event/JobExceptionOccurred.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php - -namespace think\queue\event; - -use Exception; -use think\queue\Job; - -class JobExceptionOccurred -{ - /** - * The connection name. - * - * @var string - */ - public $connectionName; - - /** - * The job instance. - * - * @var Job - */ - public $job; - - /** - * The exception instance. - * - * @var Exception - */ - public $exception; - - /** - * Create a new event instance. - * - * @param string $connectionName - * @param Job $job - * @param Exception $exception - * @return void - */ - public function __construct($connectionName, $job, $exception) - { - $this->job = $job; - $this->exception = $exception; - $this->connectionName = $connectionName; - } -} diff --git a/vendor/topthink/think-queue/src/queue/event/JobFailed.php b/vendor/topthink/think-queue/src/queue/event/JobFailed.php deleted file mode 100644 index 30b9369..0000000 --- a/vendor/topthink/think-queue/src/queue/event/JobFailed.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace think\queue\event; - -use think\queue\Job; - -class JobFailed -{ - /** @var string */ - public $connector; - - /** @var Job */ - public $job; - - /** @var \Exception */ - public $exception; - - public function __construct($connector, $job, $exception) - { - $this->connector = $connector; - $this->job = $job; - $this->exception = $exception; - } -} diff --git a/vendor/topthink/think-queue/src/queue/event/JobProcessed.php b/vendor/topthink/think-queue/src/queue/event/JobProcessed.php deleted file mode 100644 index 6c9c799..0000000 --- a/vendor/topthink/think-queue/src/queue/event/JobProcessed.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace think\queue\event; - -use think\queue\Job; - -class JobProcessed -{ - /** @var string */ - public $connector; - - /** @var Job */ - public $job; - - public function __construct($connector, $job) - { - $this->connector = $connector; - $this->job = $job; - } -} diff --git a/vendor/topthink/think-queue/src/queue/event/JobProcessing.php b/vendor/topthink/think-queue/src/queue/event/JobProcessing.php deleted file mode 100644 index 87a03c3..0000000 --- a/vendor/topthink/think-queue/src/queue/event/JobProcessing.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -namespace think\queue\event; - -use think\queue\Job; - -class JobProcessing -{ - /** @var string */ - public $connector; - - /** @var Job */ - public $job; - - public function __construct($connector, $job) - { - $this->connector = $connector; - $this->job = $job; - } -} diff --git a/vendor/topthink/think-queue/src/queue/event/WorkerStopping.php b/vendor/topthink/think-queue/src/queue/event/WorkerStopping.php deleted file mode 100644 index 5f1fc75..0000000 --- a/vendor/topthink/think-queue/src/queue/event/WorkerStopping.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -namespace think\queue\event; - -class WorkerStopping -{ - /** - * The exit status. - * - * @var int - */ - public $status; - - /** - * Create a new event instance. - * - * @param int $status - * @return void - */ - public function __construct($status = 0) - { - $this->status = $status; - } -} diff --git a/vendor/topthink/think-queue/src/queue/failed/Database.php b/vendor/topthink/think-queue/src/queue/failed/Database.php deleted file mode 100644 index 4b2e7f1..0000000 --- a/vendor/topthink/think-queue/src/queue/failed/Database.php +++ /dev/null @@ -1,99 +0,0 @@ -<?php - -namespace think\queue\failed; - -use Carbon\Carbon; -use think\Db; -use think\queue\FailedJob; - -class Database extends FailedJob -{ - - /** @var Db */ - protected $db; - - /** - * The database table. - * - * @var string - */ - protected $table; - - public function __construct(Db $db, $table) - { - $this->db = $db; - $this->table = $table; - } - - public static function __make(Db $db, $config) - { - return new self($db, $config['table']); - } - - /** - * Log a failed job into storage. - * - * @param string $connector - * @param string $queue - * @param string $payload - * @param \Exception $exception - * @return int|null - */ - public function log($connector, $queue, $payload, $exception) - { - $failed_at = Carbon::now(); - - $exception = (string) $exception; - - return $this->getTable()->insertGetId(compact( - 'connector', 'queue', 'payload', 'exception', 'failed_at' - )); - } - - /** - * Get a list of all of the failed jobs. - * - * @return array - */ - public function all() - { - return $this->getTable()->order('id', 'desc')->select()->all(); - } - - /** - * Get a single failed job. - * - * @param mixed $id - * @return object|null - */ - public function find($id) - { - return $this->getTable()->find($id); - } - - /** - * Delete a single failed job from storage. - * - * @param mixed $id - * @return bool - */ - public function forget($id) - { - return $this->getTable()->where('id', $id)->delete() > 0; - } - - /** - * Flush all of the failed jobs from storage. - * - * @return void - */ - public function flush() - { - $this->getTable()->delete(true); - } - - protected function getTable() - { - return $this->db->name($this->table); - } -} diff --git a/vendor/topthink/think-queue/src/queue/failed/None.php b/vendor/topthink/think-queue/src/queue/failed/None.php deleted file mode 100644 index 205dd2f..0000000 --- a/vendor/topthink/think-queue/src/queue/failed/None.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php - -namespace think\queue\failed; - -use think\queue\FailedJob; - -class None extends FailedJob -{ - - /** - * Log a failed job into storage. - * - * @param string $connection - * @param string $queue - * @param string $payload - * @param \Exception $exception - */ - public function log($connection, $queue, $payload, $exception) - { - - } - - /** - * Get a list of all of the failed jobs. - * - * @return array - */ - public function all() - { - return []; - } - - /** - * Get a single failed job. - * - * @param mixed $id - */ - public function find($id) - { - - } - - /** - * Delete a single failed job from storage. - * - * @param mixed $id - * @return bool - */ - public function forget($id) - { - return true; - } - - /** - * Flush all of the failed jobs from storage. - * - * @return void - */ - public function flush() - { - - } -} diff --git a/vendor/topthink/think-queue/src/queue/job/Database.php b/vendor/topthink/think-queue/src/queue/job/Database.php deleted file mode 100644 index 4be7f30..0000000 --- a/vendor/topthink/think-queue/src/queue/job/Database.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- -namespace think\queue\job; - -use think\App; -use think\queue\connector\Database as DatabaseQueue; -use think\queue\Job; - -class Database extends Job -{ - /** - * The database queue instance. - * @var DatabaseQueue - */ - protected $database; - - /** - * The database job payload. - * @var Object - */ - protected $job; - - public function __construct(App $app, DatabaseQueue $database, $job, $connector, $queue) - { - $this->app = $app; - $this->job = $job; - $this->queue = $queue; - $this->database = $database; - $this->connector = $connector; - } - - /** - * 删除任务 - * @return void - */ - public function delete() - { - parent::delete(); - $this->database->deleteReserved($this->job->id); - } - - /** - * 重新发布任务 - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - parent::release($delay); - - $this->delete(); - - $this->database->release($this->queue, $this->job, $delay); - } - - /** - * 获取当前任务尝试次数 - * @return int - */ - public function attempts() - { - return (int) $this->job->attempts; - } - - /** - * Get the raw body string for the job. - * @return string - */ - public function getRawBody() - { - return $this->job->payload; - } - - /** - * Get the job identifier. - * - * @return string - */ - public function getJobId() - { - return $this->job->id; - } -} diff --git a/vendor/topthink/think-queue/src/queue/job/Redis.php b/vendor/topthink/think-queue/src/queue/job/Redis.php deleted file mode 100644 index 4afabe5..0000000 --- a/vendor/topthink/think-queue/src/queue/job/Redis.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue\job; - -use think\App; -use think\queue\connector\Redis as RedisQueue; -use think\queue\Job; - -class Redis extends Job -{ - - /** - * The redis queue instance. - * @var RedisQueue - */ - protected $redis; - - /** - * The database job payload. - * @var Object - */ - protected $job; - - /** - * The JSON decoded version of "$job". - * - * @var array - */ - protected $decoded; - - /** - * The Redis job payload inside the reserved queue. - * - * @var string - */ - protected $reserved; - - public function __construct(App $app, RedisQueue $redis, $job, $reserved, $connector, $queue) - { - $this->app = $app; - $this->job = $job; - $this->queue = $queue; - $this->connector = $connector; - $this->redis = $redis; - $this->reserved = $reserved; - - $this->decoded = $this->payload(); - } - - /** - * Get the number of times the job has been attempted. - * @return int - */ - public function attempts() - { - return ($this->decoded['attempts'] ?? null) + 1; - } - - /** - * Get the raw body string for the job. - * @return string - */ - public function getRawBody() - { - return $this->job; - } - - /** - * 删除任务 - * - * @return void - */ - public function delete() - { - parent::delete(); - - $this->redis->deleteReserved($this->queue, $this); - } - - /** - * 重新发布任务 - * - * @param int $delay - * @return void - */ - public function release($delay = 0) - { - parent::release($delay); - - $this->redis->deleteAndRelease($this->queue, $this, $delay); - } - - /** - * Get the job identifier. - * - * @return string - */ - public function getJobId() - { - return $this->decoded['id'] ?? null; - } - - /** - * Get the underlying reserved Redis job. - * - * @return string - */ - public function getReservedJob() - { - return $this->reserved; - } -} diff --git a/vendor/topthink/think-queue/src/queue/job/Sync.php b/vendor/topthink/think-queue/src/queue/job/Sync.php deleted file mode 100644 index 84d002b..0000000 --- a/vendor/topthink/think-queue/src/queue/job/Sync.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yunwuxin <448901948@qq.com> -// +---------------------------------------------------------------------- - -namespace think\queue\job; - -use think\App; -use think\queue\Job; - -class Sync extends Job -{ - /** - * The queue message data. - * - * @var string - */ - protected $payload; - - public function __construct(App $app, $payload, $connector, $queue) - { - $this->app = $app; - $this->connector = $connector; - $this->queue = $queue; - $this->payload = $payload; - } - - /** - * Get the number of times the job has been attempted. - * @return int - */ - public function attempts() - { - return 1; - } - - /** - * Get the raw body string for the job. - * @return string - */ - public function getRawBody() - { - return $this->payload; - } - - /** - * Get the job identifier. - * - * @return string - */ - public function getJobId() - { - return ''; - } - - public function getQueue() - { - return 'sync'; - } -} diff --git a/vendor/topthink/think-queue/tests/QueueTest.php b/vendor/topthink/think-queue/tests/QueueTest.php deleted file mode 100644 index 6e8ceb8..0000000 --- a/vendor/topthink/think-queue/tests/QueueTest.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - -namespace think\test\queue; - -use Mockery as m; -use PHPUnit\Framework\TestCase; -use think\App; -use think\Config; -use think\Queue; -use think\queue\connector\Sync; - -class QueueTest extends TestCase -{ - public function tearDown() - { - m::close(); - } - - public function testDefaultConnectionCanBeResolved() - { - $app = m::mock(App::class); - - $sync = new Sync(); - - $app->shouldReceive('make')->once()->with('\think\queue\connector\Sync')->andReturn($sync); - - $config = m::mock(Config::class); - - $config->shouldReceive('get')->once()->with('queue.connector', 'Sync')->andReturn('sync'); - - $app->shouldReceive('get')->once()->with('config')->andReturn($config); - - $queue = new Queue($app); - - $this->assertSame($sync, $queue->driver('sync')); - $this->assertSame($sync, $queue->driver()); - } -} diff --git a/vendor/topthink/think-queue/tests/bootstrap.php b/vendor/topthink/think-queue/tests/bootstrap.php deleted file mode 100644 index 401013c..0000000 --- a/vendor/topthink/think-queue/tests/bootstrap.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -include __DIR__.'/../vendor/autoload.php'; diff --git a/vendor/topthink/think-template/.gitignore b/vendor/topthink/think-template/.gitignore deleted file mode 100644 index 485dee6..0000000 --- a/vendor/topthink/think-template/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea diff --git a/vendor/topthink/think-template/LICENSE b/vendor/topthink/think-template/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/vendor/topthink/think-template/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/topthink/think-template/README.md b/vendor/topthink/think-template/README.md deleted file mode 100644 index 1d19064..0000000 --- a/vendor/topthink/think-template/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# ThinkTemplate - -基于XML和标签库的编译型模板引擎 - -## 主要特性 - -- 支持XML标签库和普通标签的混合定义; -- 支持直接使用PHP代码书写; -- 支持文件包含; -- 支持多级标签嵌套; -- 支持布局模板功能; -- 一次编译多次运行,编译和运行效率非常高; -- 模板文件和布局模板更新,自动更新模板缓存; -- 系统变量无需赋值直接输出; -- 支持多维数组的快速输出; -- 支持模板变量的默认值; -- 支持页面代码去除Html空白; -- 支持变量组合调节器和格式化功能; -- 允许定义模板禁用函数和禁用PHP语法; -- 通过标签库方式扩展; - -## 安装 - -~~~php -composer require topthink/think-template -~~~ - -## 用法示例 - - -~~~php -<?php -namespace think; - -require __DIR__.'/vendor/autoload.php'; - -// 设置模板引擎参数 -$config = [ - 'view_path' => './template/', - 'cache_path' => './runtime/', - 'view_suffix' => 'html', -]; - -$template = new Template($config); -// 模板变量赋值 -$template->assign(['name' => 'think']); -// 读取模板文件渲染输出 -$template->fetch('index'); -// 完整模板文件渲染 -$template->fetch('./template/test.php'); -// 渲染内容输出 -$template->display($content); -~~~ - -支持静态调用 - -~~~ -use think\facade\Template; - -Template::config([ - 'view_path' => './template/', - 'cache_path' => './runtime/', - 'view_suffix' => 'html', -]); -Template::assign(['name' => 'think']); -Template::fetch('index',['name' => 'think']); -Template::display($content,['name' => 'think']); -~~~ - -详细用法参考[开发手册](https://www.kancloud.cn/manual/think-template/content) \ No newline at end of file diff --git a/vendor/topthink/think-template/composer.json b/vendor/topthink/think-template/composer.json deleted file mode 100644 index f4e1205..0000000 --- a/vendor/topthink/think-template/composer.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "topthink/think-template", - "description": "the php template engine", - "license": "Apache-2.0", - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "require": { - "php": ">=7.1.0", - "psr/simple-cache": "^1.0" - }, - "autoload": { - "psr-4": { - "think\\": "src" - } - } -} \ No newline at end of file diff --git a/vendor/topthink/think-template/src/Template.php b/vendor/topthink/think-template/src/Template.php deleted file mode 100644 index befa114..0000000 --- a/vendor/topthink/think-template/src/Template.php +++ /dev/null @@ -1,1330 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think; - -use Exception; -use Psr\SimpleCache\CacheInterface; - -/** - * ThinkPHP分离出来的模板引擎 - * 支持XML标签和普通标签的模板解析 - * 编译型模板引擎 支持动态缓存 - */ -class Template -{ - /** - * 模板变量 - * @var array - */ - protected $data = []; - - /** - * 模板配置参数 - * @var array - */ - protected $config = [ - 'view_path' => '', // 模板路径 - 'view_suffix' => 'html', // 默认模板文件后缀 - 'view_depr' => DIRECTORY_SEPARATOR, - 'cache_path' => '', - 'cache_suffix' => 'php', // 默认模板缓存后缀 - 'tpl_deny_func_list' => 'echo,exit', // 模板引擎禁用函数 - 'tpl_deny_php' => false, // 默认模板引擎是否禁用PHP原生代码 - 'tpl_begin' => '{', // 模板引擎普通标签开始标记 - 'tpl_end' => '}', // 模板引擎普通标签结束标记 - 'strip_space' => false, // 是否去除模板文件里面的html空格与换行 - 'tpl_cache' => true, // 是否开启模板编译缓存,设为false则每次都会重新编译 - 'compile_type' => 'file', // 模板编译类型 - 'cache_prefix' => '', // 模板缓存前缀标识,可以动态改变 - 'cache_time' => 0, // 模板缓存有效期 0 为永久,(以数字为值,单位:秒) - 'layout_on' => false, // 布局模板开关 - 'layout_name' => 'layout', // 布局模板入口文件 - 'layout_item' => '{__CONTENT__}', // 布局模板的内容替换标识 - 'taglib_begin' => '{', // 标签库标签开始标记 - 'taglib_end' => '}', // 标签库标签结束标记 - 'taglib_load' => true, // 是否使用内置标签库之外的其它标签库,默认自动检测 - 'taglib_build_in' => 'cx', // 内置标签库名称(标签使用不必指定标签库名称),以逗号分隔 注意解析顺序 - 'taglib_pre_load' => '', // 需要额外加载的标签库(须指定标签库名称),多个以逗号分隔 - 'display_cache' => false, // 模板渲染缓存 - 'cache_id' => '', // 模板缓存ID - 'tpl_replace_string' => [], - 'tpl_var_identify' => 'array', // .语法变量识别,array|object|'', 为空时自动识别 - 'default_filter' => 'htmlentities', // 默认过滤方法 用于普通标签输出 - ]; - - /** - * 保留内容信息 - * @var array - */ - private $literal = []; - - /** - * 扩展解析规则 - * @var array - */ - private $extend = []; - - /** - * 模板包含信息 - * @var array - */ - private $includeFile = []; - - /** - * 模板存储对象 - * @var object - */ - protected $storage; - - /** - * 查询缓存对象 - * @var CacheInterface - */ - protected $cache; - - /** - * 架构函数 - * @access public - * @param array $config - */ - public function __construct(array $config = []) - { - $this->config = array_merge($this->config, $config); - - $this->config['taglib_begin_origin'] = $this->config['taglib_begin']; - $this->config['taglib_end_origin'] = $this->config['taglib_end']; - - $this->config['taglib_begin'] = preg_quote($this->config['taglib_begin'], '/'); - $this->config['taglib_end'] = preg_quote($this->config['taglib_end'], '/'); - $this->config['tpl_begin'] = preg_quote($this->config['tpl_begin'], '/'); - $this->config['tpl_end'] = preg_quote($this->config['tpl_end'], '/'); - - // 初始化模板编译存储器 - $type = $this->config['compile_type'] ? $this->config['compile_type'] : 'File'; - $class = false !== strpos($type, '\\') ? $type : '\\think\\template\\driver\\' . ucwords($type); - - $this->storage = new $class(); - } - - /** - * 模板变量赋值 - * @access public - * @param array $vars 模板变量 - * @return $this - */ - public function assign(array $vars = []) - { - $this->data = array_merge($this->data, $vars); - return $this; - } - - /** - * 模板引擎参数赋值 - * @access public - * @param string $name - * @param mixed $value - */ - public function __set($name, $value) - { - $this->config[$name] = $value; - } - - /** - * 设置缓存对象 - * @access public - * @param CacheInterface $cache 缓存对象 - * @return void - */ - public function setCache(CacheInterface $cache): void - { - $this->cache = $cache; - } - - /** - * 模板引擎配置 - * @access public - * @param array $config - * @return $this - */ - public function config(array $config) - { - $this->config = array_merge($this->config, $config); - return $this; - } - - /** - * 获取模板引擎配置项 - * @access public - * @param string $name - * @return mixed - */ - public function getConfig(string $name) - { - return $this->config[$name] ?? null; - } - - /** - * 模板变量获取 - * @access public - * @param string $name 变量名 - * @return mixed - */ - public function get(string $name = '') - { - if ('' == $name) { - return $this->data; - } - - $data = $this->data; - - foreach (explode('.', $name) as $key => $val) { - if (isset($data[$val])) { - $data = $data[$val]; - } else { - $data = null; - break; - } - } - - return $data; - } - - /** - * 扩展模板解析规则 - * @access public - * @param string $rule 解析规则 - * @param callable $callback 解析规则 - * @return void - */ - public function extend(string $rule, callable $callback = null): void - { - $this->extend[$rule] = $callback; - } - - /** - * 渲染模板文件 - * @access public - * @param string $template 模板文件 - * @param array $vars 模板变量 - * @return void - */ - public function fetch(string $template, array $vars = []): void - { - if ($vars) { - $this->data = array_merge($this->data, $vars); - } - - if (!empty($this->config['cache_id']) && $this->config['display_cache'] && $this->cache) { - // 读取渲染缓存 - if ($this->cache->has($this->config['cache_id'])) { - echo $this->cache->get($this->config['cache_id']); - return; - } - } - - $template = $this->parseTemplateFile($template); - - if ($template) { - $cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] . md5($this->config['layout_on'] . $this->config['layout_name'] . $template) . '.' . ltrim($this->config['cache_suffix'], '.'); - - if (!$this->checkCache($cacheFile)) { - // 缓存无效 重新模板编译 - $content = file_get_contents($template); - $this->compiler($content, $cacheFile); - } - - // 页面缓存 - ob_start(); - if (version_compare(PHP_VERSION, '8.0', '>=')) { - ob_implicit_flush(false); - } else { - ob_implicit_flush(0); - } - - // 读取编译存储 - $this->storage->read($cacheFile, $this->data); - - // 获取并清空缓存 - $content = ob_get_clean(); - - if (!empty($this->config['cache_id']) && $this->config['display_cache'] && $this->cache) { - // 缓存页面输出 - $this->cache->set($this->config['cache_id'], $content, $this->config['cache_time']); - } - - echo $content; - } - } - - /** - * 检查编译缓存是否存在 - * @access public - * @param string $cacheId 缓存的id - * @return boolean - */ - public function isCache(string $cacheId): bool - { - if ($cacheId && $this->cache && $this->config['display_cache']) { - // 缓存页面输出 - return $this->cache->has($cacheId); - } - - return false; - } - - /** - * 渲染模板内容 - * @access public - * @param string $content 模板内容 - * @param array $vars 模板变量 - * @return void - */ - public function display(string $content, array $vars = []): void - { - if ($vars) { - $this->data = array_merge($this->data, $vars); - } - - $cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] . md5($content) . '.' . ltrim($this->config['cache_suffix'], '.'); - - if (!$this->checkCache($cacheFile)) { - // 缓存无效 模板编译 - $this->compiler($content, $cacheFile); - } - - // 读取编译存储 - $this->storage->read($cacheFile, $this->data); - } - - /** - * 设置布局 - * @access public - * @param mixed $name 布局模板名称 false 则关闭布局 - * @param string $replace 布局模板内容替换标识 - * @return $this - */ - public function layout($name, string $replace = '') - { - if (false === $name) { - // 关闭布局 - $this->config['layout_on'] = false; - } else { - // 开启布局 - $this->config['layout_on'] = true; - - // 名称必须为字符串 - if (is_string($name)) { - $this->config['layout_name'] = $name; - } - - if (!empty($replace)) { - $this->config['layout_item'] = $replace; - } - } - - return $this; - } - - /** - * 检查编译缓存是否有效 - * 如果无效则需要重新编译 - * @access private - * @param string $cacheFile 缓存文件名 - * @return bool - */ - private function checkCache(string $cacheFile): bool - { - if (!$this->config['tpl_cache'] || !is_file($cacheFile) || !$handle = @fopen($cacheFile, "r")) { - return false; - } - - // 读取第一行 - $line = fgets($handle); - - if (false === $line) { - return false; - } - - preg_match('/\/\*(.+?)\*\//', $line, $matches); - - if (!isset($matches[1])) { - return false; - } - - $includeFile = unserialize($matches[1]); - - if (!is_array($includeFile)) { - return false; - } - - // 检查模板文件是否有更新 - foreach ($includeFile as $path => $time) { - if (is_file($path) && filemtime($path) > $time) { - // 模板文件如果有更新则缓存需要更新 - return false; - } - } - - // 检查编译存储是否有效 - return $this->storage->check($cacheFile, $this->config['cache_time']); - } - - /** - * 编译模板文件内容 - * @access private - * @param string $content 模板内容 - * @param string $cacheFile 缓存文件名 - * @return void - */ - private function compiler(string &$content, string $cacheFile): void - { - // 判断是否启用布局 - if ($this->config['layout_on']) { - if (false !== strpos($content, '{__NOLAYOUT__}')) { - // 可以单独定义不使用布局 - $content = str_replace('{__NOLAYOUT__}', '', $content); - } else { - // 读取布局模板 - $layoutFile = $this->parseTemplateFile($this->config['layout_name']); - - if ($layoutFile) { - // 替换布局的主体内容 - $content = str_replace($this->config['layout_item'], $content, file_get_contents($layoutFile)); - } - } - } else { - $content = str_replace('{__NOLAYOUT__}', '', $content); - } - - // 模板解析 - $this->parse($content); - - if ($this->config['strip_space']) { - /* 去除html空格与换行 */ - $find = ['~>\s+<~', '~>(\s+\n|\r)~']; - $replace = ['><', '>']; - $content = preg_replace($find, $replace, $content); - } - - // 优化生成的php代码 - $content = preg_replace('/\?>\s*<\?php\s(?!echo\b|\bend)/s', '', $content); - - // 模板过滤输出 - $replace = $this->config['tpl_replace_string']; - $content = str_replace(array_keys($replace), array_values($replace), $content); - - // 添加安全代码及模板引用记录 - $content = '<?php /*' . serialize($this->includeFile) . '*/ ?>' . "\n" . $content; - // 编译存储 - $this->storage->write($cacheFile, $content); - - $this->includeFile = []; - } - - /** - * 模板解析入口 - * 支持普通标签和TagLib解析 支持自定义标签库 - * @access public - * @param string $content 要解析的模板内容 - * @return void - */ - public function parse(string &$content): void - { - // 内容为空不解析 - if (empty($content)) { - return; - } - - // 替换literal标签内容 - $this->parseLiteral($content); - - // 解析继承 - $this->parseExtend($content); - - // 解析布局 - $this->parseLayout($content); - - // 检查include语法 - $this->parseInclude($content); - - // 替换包含文件中literal标签内容 - $this->parseLiteral($content); - - // 检查PHP语法 - $this->parsePhp($content); - - // 获取需要引入的标签库列表 - // 标签库只需要定义一次,允许引入多个一次 - // 一般放在文件的最前面 - // 格式:<taglib name="html,mytag..." /> - // 当TAGLIB_LOAD配置为true时才会进行检测 - if ($this->config['taglib_load']) { - $tagLibs = $this->getIncludeTagLib($content); - - if (!empty($tagLibs)) { - // 对导入的TagLib进行解析 - foreach ($tagLibs as $tagLibName) { - $this->parseTagLib($tagLibName, $content); - } - } - } - - // 预先加载的标签库 无需在每个模板中使用taglib标签加载 但必须使用标签库XML前缀 - if ($this->config['taglib_pre_load']) { - $tagLibs = explode(',', $this->config['taglib_pre_load']); - - foreach ($tagLibs as $tag) { - $this->parseTagLib($tag, $content); - } - } - - // 内置标签库 无需使用taglib标签导入就可以使用 并且不需使用标签库XML前缀 - $tagLibs = explode(',', $this->config['taglib_build_in']); - - foreach ($tagLibs as $tag) { - $this->parseTagLib($tag, $content, true); - } - - // 解析普通模板标签 {$tagName} - $this->parseTag($content); - - // 还原被替换的Literal标签 - $this->parseLiteral($content, true); - } - - /** - * 检查PHP语法 - * @access private - * @param string $content 要解析的模板内容 - * @return void - * @throws Exception - */ - private function parsePhp(string &$content): void - { - // 短标签的情况要将<?标签用echo方式输出 否则无法正常输出xml标识 - $content = preg_replace('/(<\?(?!php|=|$))/i', '<?php echo \'\\1\'; ?>' . "\n", $content); - - // PHP语法检查 - if ($this->config['tpl_deny_php'] && false !== strpos($content, '<?php')) { - throw new Exception('not allow php tag'); - } - } - - /** - * 解析模板中的布局标签 - * @access private - * @param string $content 要解析的模板内容 - * @return void - */ - private function parseLayout(string &$content): void - { - // 读取模板中的布局标签 - if (preg_match($this->getRegex('layout'), $content, $matches)) { - // 替换Layout标签 - $content = str_replace($matches[0], '', $content); - // 解析Layout标签 - $array = $this->parseAttr($matches[0]); - - if (!$this->config['layout_on'] || $this->config['layout_name'] != $array['name']) { - // 读取布局模板 - $layoutFile = $this->parseTemplateFile($array['name']); - - if ($layoutFile) { - $replace = isset($array['replace']) ? $array['replace'] : $this->config['layout_item']; - // 替换布局的主体内容 - $content = str_replace($replace, $content, file_get_contents($layoutFile)); - } - } - } else { - $content = str_replace('{__NOLAYOUT__}', '', $content); - } - } - - /** - * 解析模板中的include标签 - * @access private - * @param string $content 要解析的模板内容 - * @return void - */ - private function parseInclude(string &$content): void - { - $regex = $this->getRegex('include'); - $func = function ($template) use (&$func, &$regex, &$content) { - if (preg_match_all($regex, $template, $matches, PREG_SET_ORDER)) { - foreach ($matches as $match) { - $array = $this->parseAttr($match[0]); - $file = $array['file']; - unset($array['file']); - - // 分析模板文件名并读取内容 - $parseStr = $this->parseTemplateName($file); - - foreach ($array as $k => $v) { - // 以$开头字符串转换成模板变量 - if (0 === strpos($v, '$')) { - $v = $this->get(substr($v, 1)); - } - - $parseStr = str_replace('[' . $k . ']', $v, $parseStr); - } - - $content = str_replace($match[0], $parseStr, $content); - // 再次对包含文件进行模板分析 - $func($parseStr); - } - unset($matches); - } - }; - - // 替换模板中的include标签 - $func($content); - } - - /** - * 解析模板中的extend标签 - * @access private - * @param string $content 要解析的模板内容 - * @return void - */ - private function parseExtend(string &$content): void - { - $regex = $this->getRegex('extend'); - $array = $blocks = $baseBlocks = []; - $extend = ''; - - $func = function ($template) use (&$func, &$regex, &$array, &$extend, &$blocks, &$baseBlocks) { - if (preg_match($regex, $template, $matches)) { - if (!isset($array[$matches['name']])) { - $array[$matches['name']] = 1; - // 读取继承模板 - $extend = $this->parseTemplateName($matches['name']); - - // 递归检查继承 - $func($extend); - - // 取得block标签内容 - $blocks = array_merge($blocks, $this->parseBlock($template)); - - return; - } - } else { - // 取得顶层模板block标签内容 - $baseBlocks = $this->parseBlock($template, true); - - if (empty($extend)) { - // 无extend标签但有block标签的情况 - $extend = $template; - } - } - }; - - $func($content); - - if (!empty($extend)) { - if ($baseBlocks) { - $children = []; - foreach ($baseBlocks as $name => $val) { - $replace = $val['content']; - - if (!empty($children[$name])) { - // 如果包含有子block标签 - foreach ($children[$name] as $key) { - $replace = str_replace($baseBlocks[$key]['begin'] . $baseBlocks[$key]['content'] . $baseBlocks[$key]['end'], $blocks[$key]['content'], $replace); - } - } - - if (isset($blocks[$name])) { - // 带有{__block__}表示与所继承模板的相应标签合并,而不是覆盖 - $replace = str_replace(['{__BLOCK__}', '{__block__}'], $replace, $blocks[$name]['content']); - - if (!empty($val['parent'])) { - // 如果不是最顶层的block标签 - $parent = $val['parent']; - - if (isset($blocks[$parent])) { - $blocks[$parent]['content'] = str_replace($blocks[$name]['begin'] . $blocks[$name]['content'] . $blocks[$name]['end'], $replace, $blocks[$parent]['content']); - } - - $blocks[$name]['content'] = $replace; - $children[$parent][] = $name; - - continue; - } - } elseif (!empty($val['parent'])) { - // 如果子标签没有被继承则用原值 - $children[$val['parent']][] = $name; - $blocks[$name] = $val; - } - - if (!$val['parent']) { - // 替换模板中的顶级block标签 - $extend = str_replace($val['begin'] . $val['content'] . $val['end'], $replace, $extend); - } - } - } - - $content = $extend; - unset($blocks, $baseBlocks); - } - } - - /** - * 替换页面中的literal标签 - * @access private - * @param string $content 模板内容 - * @param boolean $restore 是否为还原 - * @return void - */ - private function parseLiteral(string &$content, bool $restore = false): void - { - $regex = $this->getRegex($restore ? 'restoreliteral' : 'literal'); - - if (preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { - if (!$restore) { - $count = count($this->literal); - - // 替换literal标签 - foreach ($matches as $match) { - $this->literal[] = substr($match[0], strlen($match[1]), -strlen($match[2])); - $content = str_replace($match[0], "<!--###literal{$count}###-->", $content); - $count++; - } - } else { - // 还原literal标签 - foreach ($matches as $match) { - $content = str_replace($match[0], $this->literal[$match[1]], $content); - } - - // 清空literal记录 - $this->literal = []; - } - - unset($matches); - } - } - - /** - * 获取模板中的block标签 - * @access private - * @param string $content 模板内容 - * @param boolean $sort 是否排序 - * @return array - */ - private function parseBlock(string &$content, bool $sort = false): array - { - $regex = $this->getRegex('block'); - $result = []; - - if (preg_match_all($regex, $content, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { - $right = $keys = []; - - foreach ($matches as $match) { - if (empty($match['name'][0])) { - if (count($right) > 0) { - $tag = array_pop($right); - $start = $tag['offset'] + strlen($tag['tag']); - $length = $match[0][1] - $start; - - $result[$tag['name']] = [ - 'begin' => $tag['tag'], - 'content' => substr($content, $start, $length), - 'end' => $match[0][0], - 'parent' => count($right) ? end($right)['name'] : '', - ]; - - $keys[$tag['name']] = $match[0][1]; - } - } else { - // 标签头压入栈 - $right[] = [ - 'name' => $match[2][0], - 'offset' => $match[0][1], - 'tag' => $match[0][0], - ]; - } - } - - unset($right, $matches); - - if ($sort) { - // 按block标签结束符在模板中的位置排序 - array_multisort($keys, $result); - } - } - - return $result; - } - - /** - * 搜索模板页面中包含的TagLib库 - * 并返回列表 - * @access private - * @param string $content 模板内容 - * @return array|null - */ - private function getIncludeTagLib(string &$content) - { - // 搜索是否有TagLib标签 - if (preg_match($this->getRegex('taglib'), $content, $matches)) { - // 替换TagLib标签 - $content = str_replace($matches[0], '', $content); - - return explode(',', $matches['name']); - } - } - - /** - * TagLib库解析 - * @access public - * @param string $tagLib 要解析的标签库 - * @param string $content 要解析的模板内容 - * @param boolean $hide 是否隐藏标签库前缀 - * @return void - */ - public function parseTagLib(string $tagLib, string &$content, bool $hide = false): void - { - if (false !== strpos($tagLib, '\\')) { - // 支持指定标签库的命名空间 - $className = $tagLib; - $tagLib = substr($tagLib, strrpos($tagLib, '\\') + 1); - } else { - $className = '\\think\\template\\taglib\\' . ucwords($tagLib); - } - - $tLib = new $className($this); - - $tLib->parseTag($content, $hide ? '' : $tagLib); - } - - /** - * 分析标签属性 - * @access public - * @param string $str 属性字符串 - * @param string $name 不为空时返回指定的属性名 - * @return array - */ - public function parseAttr(string $str, string $name = null): array - { - $regex = '/\s+(?>(?P<name>[\w-]+)\s*)=(?>\s*)([\"\'])(?P<value>(?:(?!\\2).)*)\\2/is'; - $array = []; - - if (preg_match_all($regex, $str, $matches, PREG_SET_ORDER)) { - foreach ($matches as $match) { - $array[$match['name']] = $match['value']; - } - unset($matches); - } - - if (!empty($name) && isset($array[$name])) { - return $array[$name]; - } - - return $array; - } - - /** - * 模板标签解析 - * 格式: {TagName:args [|content] } - * @access private - * @param string $content 要解析的模板内容 - * @return void - */ - private function parseTag(string &$content): void - { - $regex = $this->getRegex('tag'); - - if (preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { - foreach ($matches as $match) { - $str = stripslashes($match[1]); - $flag = substr($str, 0, 1); - - switch ($flag) { - case '$': - // 解析模板变量 格式 {$varName} - // 是否带有?号 - if (false !== $pos = strpos($str, '?')) { - $array = preg_split('/([!=]={1,2}|(?<!-)[><]={0,1})/', substr($str, 0, $pos), 2, PREG_SPLIT_DELIM_CAPTURE); - $name = $array[0]; - - $this->parseVar($name); - //$this->parseVarFunction($name); - - $str = trim(substr($str, $pos + 1)); - $this->parseVar($str); - $first = substr($str, 0, 1); - - if (strpos($name, ')')) { - // $name为对象或是自动识别,或者含有函数 - if (isset($array[1])) { - $this->parseVar($array[2]); - $name .= $array[1] . $array[2]; - } - - switch ($first) { - case '?': - $this->parseVarFunction($name); - $str = '<?php echo (' . $name . ') ? ' . $name . ' : ' . substr($str, 1) . '; ?>'; - break; - case '=': - $str = '<?php if(' . $name . ') echo ' . substr($str, 1) . '; ?>'; - break; - default: - $str = '<?php echo ' . $name . '?' . $str . '; ?>'; - } - } else { - if (isset($array[1])) { - $express = true; - $this->parseVar($array[2]); - $express = $name . $array[1] . $array[2]; - } else { - $express = false; - } - - if (in_array($first, ['?', '=', ':'])) { - $str = trim(substr($str, 1)); - if ('$' == substr($str, 0, 1)) { - $str = $this->parseVarFunction($str); - } - } - - // $name为数组 - switch ($first) { - case '?': - // {$varname??'xxx'} $varname有定义则输出$varname,否则输出xxx - $str = '<?php echo ' . ($express ?: 'isset(' . $name . ')') . ' ? ' . $this->parseVarFunction($name) . ' : ' . $str . '; ?>'; - break; - case '=': - // {$varname?='xxx'} $varname为真时才输出xxx - $str = '<?php if(' . ($express ?: '!empty(' . $name . ')') . ') echo ' . $str . '; ?>'; - break; - case ':': - // {$varname?:'xxx'} $varname为真时输出$varname,否则输出xxx - $str = '<?php echo ' . ($express ?: '!empty(' . $name . ')') . ' ? ' . $this->parseVarFunction($name) . ' : ' . $str . '; ?>'; - break; - default: - if (strpos($str, ':')) { - // {$varname ? 'a' : 'b'} $varname为真时输出a,否则输出b - $array = explode(':', $str, 2); - - $array[0] = '$' == substr(trim($array[0]), 0, 1) ? $this->parseVarFunction($array[0]) : $array[0]; - $array[1] = '$' == substr(trim($array[1]), 0, 1) ? $this->parseVarFunction($array[1]) : $array[1]; - - $str = implode(' : ', $array); - } - $str = '<?php echo ' . ($express ?: '!empty(' . $name . ')') . ' ? ' . $str . '; ?>'; - } - } - } else { - $this->parseVar($str); - $this->parseVarFunction($str); - $str = '<?php echo ' . $str . '; ?>'; - } - break; - case ':': - // 输出某个函数的结果 - $str = substr($str, 1); - $this->parseVar($str); - $str = '<?php echo ' . $str . '; ?>'; - break; - case '~': - // 执行某个函数 - $str = substr($str, 1); - $this->parseVar($str); - $str = '<?php ' . $str . '; ?>'; - break; - case '-': - case '+': - // 输出计算 - $this->parseVar($str); - $str = '<?php echo ' . $str . '; ?>'; - break; - case '/': - // 注释标签 - $flag2 = substr($str, 1, 1); - if ('/' == $flag2 || ('*' == $flag2 && substr(rtrim($str), -2) == '*/')) { - $str = ''; - } - break; - default: - // 未识别的标签直接返回 - $str = $this->config['tpl_begin'] . $str . $this->config['tpl_end']; - break; - } - - $content = str_replace($match[0], $str, $content); - } - - unset($matches); - } - } - - /** - * 模板变量解析,支持使用函数 - * 格式: {$varname|function1|function2=arg1,arg2} - * @access public - * @param string $varStr 变量数据 - * @return void - */ - public function parseVar(string &$varStr): void - { - $varStr = trim($varStr); - - if (preg_match_all('/\$[a-zA-Z_](?>\w*)(?:[:\.][0-9a-zA-Z_](?>\w*))+/', $varStr, $matches, PREG_OFFSET_CAPTURE)) { - static $_varParseList = []; - - while ($matches[0]) { - $match = array_pop($matches[0]); - - //如果已经解析过该变量字串,则直接返回变量值 - if (isset($_varParseList[$match[0]])) { - $parseStr = $_varParseList[$match[0]]; - } else { - if (strpos($match[0], '.')) { - $vars = explode('.', $match[0]); - $first = array_shift($vars); - - if (isset($this->extend[$first])) { - $callback = $this->extend[$first]; - $parseStr = $callback($vars); - } elseif ('$Request' == $first) { - // 输出请求变量 - $parseStr = $this->parseRequestVar($vars); - } elseif ('$Think' == $first) { - // 所有以Think.打头的以特殊变量对待 无需模板赋值就可以输出 - $parseStr = $this->parseThinkVar($vars); - } else { - switch ($this->config['tpl_var_identify']) { - case 'array': // 识别为数组 - $parseStr = $first . '[\'' . implode('\'][\'', $vars) . '\']'; - break; - case 'obj': // 识别为对象 - $parseStr = $first . '->' . implode('->', $vars); - break; - default: // 自动判断数组或对象 - $parseStr = '(is_array(' . $first . ')?' . $first . '[\'' . implode('\'][\'', $vars) . '\']:' . $first . '->' . implode('->', $vars) . ')'; - } - } - } else { - $parseStr = str_replace(':', '->', $match[0]); - } - - $_varParseList[$match[0]] = $parseStr; - } - - $varStr = substr_replace($varStr, $parseStr, $match[1], strlen($match[0])); - } - unset($matches); - } - } - - /** - * 对模板中使用了函数的变量进行解析 - * 格式 {$varname|function1|function2=arg1,arg2} - * @access public - * @param string $varStr 变量字符串 - * @param bool $autoescape 自动转义 - * @return string - */ - public function parseVarFunction(string &$varStr, bool $autoescape = true): string - { - if (!$autoescape && false === strpos($varStr, '|')) { - return $varStr; - } elseif ($autoescape && !preg_match('/\|(\s)?raw(\||\s)?/i', $varStr)) { - $varStr .= '|' . $this->config['default_filter']; - } - - static $_varFunctionList = []; - - $_key = md5($varStr); - - //如果已经解析过该变量字串,则直接返回变量值 - if (isset($_varFunctionList[$_key])) { - $varStr = $_varFunctionList[$_key]; - } else { - $varArray = explode('|', $varStr); - - // 取得变量名称 - $name = trim(array_shift($varArray)); - - // 对变量使用函数 - $length = count($varArray); - - // 取得模板禁止使用函数列表 - $template_deny_funs = explode(',', $this->config['tpl_deny_func_list']); - - for ($i = 0; $i < $length; $i++) { - $args = explode('=', $varArray[$i], 2); - - // 模板函数过滤 - $fun = trim($args[0]); - if (in_array($fun, $template_deny_funs)) { - continue; - } - - switch (strtolower($fun)) { - case 'raw': - break; - case 'date': - $name = 'date(' . $args[1] . ',!is_numeric(' . $name . ')? strtotime(' . $name . ') : ' . $name . ')'; - break; - case 'first': - $name = 'current(' . $name . ')'; - break; - case 'last': - $name = 'end(' . $name . ')'; - break; - case 'upper': - $name = 'strtoupper(' . $name . ')'; - break; - case 'lower': - $name = 'strtolower(' . $name . ')'; - break; - case 'format': - $name = 'sprintf(' . $args[1] . ',' . $name . ')'; - break; - case 'default': // 特殊模板函数 - if (false === strpos($name, '(')) { - $name = '(isset(' . $name . ') && (' . $name . ' !== \'\')?' . $name . ':' . $args[1] . ')'; - } else { - $name = '(' . $name . ' ?: ' . $args[1] . ')'; - } - break; - default: // 通用模板函数 - if (isset($args[1])) { - if (strstr($args[1], '###')) { - $args[1] = str_replace('###', $name, $args[1]); - $name = "$fun($args[1])"; - } else { - $name = "$fun($name,$args[1])"; - } - } else { - if (!empty($args[0])) { - $name = "$fun($name)"; - } - } - } - } - - $_varFunctionList[$_key] = $name; - $varStr = $name; - } - return $varStr; - } - - /** - * 请求变量解析 - * 格式 以 $Request. 打头的变量属于请求变量 - * @access public - * @param array $vars 变量数组 - * @return string - */ - public function parseRequestVar(array $vars): string - { - $type = strtoupper(trim(array_shift($vars))); - $param = implode('.', $vars); - - switch ($type) { - case 'SERVER': - $parseStr = '$_SERVER[\'' . $param . '\']'; - break; - case 'GET': - $parseStr = '$_GET[\'' . $param . '\']'; - break; - case 'POST': - $parseStr = '$_POST[\'' . $param . '\']'; - break; - case 'COOKIE': - $parseStr = '$_COOKIE[\'' . $param . '\']'; - break; - case 'SESSION': - $parseStr = '$_SESSION[\'' . $param . '\']'; - break; - case 'ENV': - $parseStr = '$_ENV[\'' . $param . '\']'; - break; - case 'REQUEST': - $parseStr = '$_REQUEST[\'' . $param . '\']'; - break; - default: - $parseStr = '\'\''; - } - - return $parseStr; - } - - /** - * 特殊模板变量解析 - * 格式 以 $Think. 打头的变量属于特殊模板变量 - * @access public - * @param array $vars 变量数组 - * @return string - */ - public function parseThinkVar(array $vars): string - { - $type = strtoupper(trim(array_shift($vars))); - $param = implode('.', $vars); - - switch ($type) { - case 'CONST': - $parseStr = strtoupper($param); - break; - case 'NOW': - $parseStr = "date('Y-m-d g:i a',time())"; - break; - case 'LDELIM': - $parseStr = '\'' . ltrim($this->config['tpl_begin'], '\\') . '\''; - break; - case 'RDELIM': - $parseStr = '\'' . ltrim($this->config['tpl_end'], '\\') . '\''; - break; - default: - $parseStr = defined($type) ? $type : '\'\''; - } - - return $parseStr; - } - - /** - * 分析加载的模板文件并读取内容 支持多个模板文件读取 - * @access private - * @param string $templateName 模板文件名 - * @return string - */ - private function parseTemplateName(string $templateName): string - { - $array = explode(',', $templateName); - $parseStr = ''; - - foreach ($array as $templateName) { - if (empty($templateName)) { - continue; - } - - if (0 === strpos($templateName, '$')) { - //支持加载变量文件名 - $templateName = $this->get(substr($templateName, 1)); - } - - $template = $this->parseTemplateFile($templateName); - - if ($template) { - // 获取模板文件内容 - $parseStr .= file_get_contents($template); - } - } - - return $parseStr; - } - - /** - * 解析模板文件名 - * @access private - * @param string $template 文件名 - * @return string - */ - private function parseTemplateFile(string $template): string - { - if ('' == pathinfo($template, PATHINFO_EXTENSION)) { - - if (0 !== strpos($template, '/')) { - $template = str_replace(['/', ':'], $this->config['view_depr'], $template); - } else { - $template = str_replace(['/', ':'], $this->config['view_depr'], substr($template, 1)); - } - - $template = $this->config['view_path'] . $template . '.' . ltrim($this->config['view_suffix'], '.'); - } - - if (is_file($template)) { - // 记录模板文件的更新时间 - $this->includeFile[$template] = filemtime($template); - - return $template; - } - - throw new Exception('template not exists:' . $template); - } - - /** - * 按标签生成正则 - * @access private - * @param string $tagName 标签名 - * @return string - */ - private function getRegex(string $tagName): string - { - $regex = ''; - if ('tag' == $tagName) { - $begin = $this->config['tpl_begin']; - $end = $this->config['tpl_end']; - - if (strlen(ltrim($begin, '\\')) == 1 && strlen(ltrim($end, '\\')) == 1) { - $regex = $begin . '((?:[\$]{1,2}[a-wA-w_]|[\:\~][\$a-wA-w_]|[+]{2}[\$][a-wA-w_]|[-]{2}[\$][a-wA-w_]|\/[\*\/])(?>[^' . $end . ']*))' . $end; - } else { - $regex = $begin . '((?:[\$]{1,2}[a-wA-w_]|[\:\~][\$a-wA-w_]|[+]{2}[\$][a-wA-w_]|[-]{2}[\$][a-wA-w_]|\/[\*\/])(?>(?:(?!' . $end . ').)*))' . $end; - } - } else { - $begin = $this->config['taglib_begin']; - $end = $this->config['taglib_end']; - $single = strlen(ltrim($begin, '\\')) == 1 && strlen(ltrim($end, '\\')) == 1 ? true : false; - - switch ($tagName) { - case 'block': - if ($single) { - $regex = $begin . '(?:' . $tagName . '\b\s+(?>(?:(?!name=).)*)\bname=([\'\"])(?P<name>[\$\w\-\/\.]+)\\1(?>[^' . $end . ']*)|\/' . $tagName . ')' . $end; - } else { - $regex = $begin . '(?:' . $tagName . '\b\s+(?>(?:(?!name=).)*)\bname=([\'\"])(?P<name>[\$\w\-\/\.]+)\\1(?>(?:(?!' . $end . ').)*)|\/' . $tagName . ')' . $end; - } - break; - case 'literal': - if ($single) { - $regex = '(' . $begin . $tagName . '\b(?>[^' . $end . ']*)' . $end . ')'; - $regex .= '(?:(?>[^' . $begin . ']*)(?>(?!' . $begin . '(?>' . $tagName . '\b[^' . $end . ']*|\/' . $tagName . ')' . $end . ')' . $begin . '[^' . $begin . ']*)*)'; - $regex .= '(' . $begin . '\/' . $tagName . $end . ')'; - } else { - $regex = '(' . $begin . $tagName . '\b(?>(?:(?!' . $end . ').)*)' . $end . ')'; - $regex .= '(?:(?>(?:(?!' . $begin . ').)*)(?>(?!' . $begin . '(?>' . $tagName . '\b(?>(?:(?!' . $end . ').)*)|\/' . $tagName . ')' . $end . ')' . $begin . '(?>(?:(?!' . $begin . ').)*))*)'; - $regex .= '(' . $begin . '\/' . $tagName . $end . ')'; - } - break; - case 'restoreliteral': - $regex = '<!--###literal(\d+)###-->'; - break; - case 'include': - $name = 'file'; - case 'taglib': - case 'layout': - case 'extend': - if (empty($name)) { - $name = 'name'; - } - if ($single) { - $regex = $begin . $tagName . '\b\s+(?>(?:(?!' . $name . '=).)*)\b' . $name . '=([\'\"])(?P<name>[\$\w\-\/\.\:@,\\\\]+)\\1(?>[^' . $end . ']*)' . $end; - } else { - $regex = $begin . $tagName . '\b\s+(?>(?:(?!' . $name . '=).)*)\b' . $name . '=([\'\"])(?P<name>[\$\w\-\/\.\:@,\\\\]+)\\1(?>(?:(?!' . $end . ').)*)' . $end; - } - break; - } - } - - return '/' . $regex . '/is'; - } - - public function __debugInfo() - { - $data = get_object_vars($this); - unset($data['storage']); - - return $data; - } -} diff --git a/vendor/topthink/think-template/src/facade/Template.php b/vendor/topthink/think-template/src/facade/Template.php deleted file mode 100644 index 665a180..0000000 --- a/vendor/topthink/think-template/src/facade/Template.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\facade; - -if (class_exists('think\Facade')) { - class Facade extends \think\Facade - {} -} else { - class Facade - { - /** - * 始终创建新的对象实例 - * @var bool - */ - protected static $alwaysNewInstance; - - protected static $instance; - - /** - * 获取当前Facade对应类名 - * @access protected - * @return string - */ - protected static function getFacadeClass() - {} - - /** - * 创建Facade实例 - * @static - * @access protected - * @return object - */ - protected static function createFacade() - { - $class = static::getFacadeClass() ?: 'think\Template'; - - if (static::$alwaysNewInstance) { - return new $class(); - } - - if (!self::$instance) { - self::$instance = new $class(); - } - - return self::$instance; - - } - - // 调用实际类的方法 - public static function __callStatic($method, $params) - { - return call_user_func_array([static::createFacade(), $method], $params); - } - } -} - -/** - * @see \think\Template - * @mixin \think\Template - */ -class Template extends Facade -{ - protected static $alwaysNewInstance = true; - - /** - * 获取当前Facade对应类名(或者已经绑定的容器对象标识) - * @access protected - * @return string - */ - protected static function getFacadeClass() - { - return 'think\Template'; - } -} diff --git a/vendor/topthink/think-template/src/template/TagLib.php b/vendor/topthink/think-template/src/template/TagLib.php deleted file mode 100644 index f6c8fbb..0000000 --- a/vendor/topthink/think-template/src/template/TagLib.php +++ /dev/null @@ -1,349 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\template; - -use Exception; -use think\Template; - -/** - * ThinkPHP标签库TagLib解析基类 - * @category Think - * @package Think - * @subpackage Template - * @author liu21st <liu21st@gmail.com> - */ -class TagLib -{ - - /** - * 标签库定义XML文件 - * @var string - * @access protected - */ - protected $xml = ''; - protected $tags = []; // 标签定义 - /** - * 标签库名称 - * @var string - * @access protected - */ - protected $tagLib = ''; - - /** - * 标签库标签列表 - * @var array - * @access protected - */ - protected $tagList = []; - - /** - * 标签库分析数组 - * @var array - * @access protected - */ - protected $parse = []; - - /** - * 标签库是否有效 - * @var bool - * @access protected - */ - protected $valid = false; - - /** - * 当前模板对象 - * @var object - * @access protected - */ - protected $tpl; - - protected $comparison = [' nheq ' => ' !== ', ' heq ' => ' === ', ' neq ' => ' != ', ' eq ' => ' == ', ' egt ' => ' >= ', ' gt ' => ' > ', ' elt ' => ' <= ', ' lt ' => ' < ']; - - /** - * 架构函数 - * @access public - * @param Template $template 模板引擎对象 - */ - public function __construct(Template $template) - { - $this->tpl = $template; - } - - /** - * 按签标库替换页面中的标签 - * @access public - * @param string $content 模板内容 - * @param string $lib 标签库名 - * @return void - */ - public function parseTag(string &$content, string $lib = ''): void - { - $tags = []; - $lib = $lib ? strtolower($lib) . ':' : ''; - - foreach ($this->tags as $name => $val) { - $close = !isset($val['close']) || $val['close'] ? 1 : 0; - $tags[$close][$lib . $name] = $name; - if (isset($val['alias'])) { - // 别名设置 - $array = (array) $val['alias']; - foreach (explode(',', $array[0]) as $v) { - $tags[$close][$lib . $v] = $name; - } - } - } - - // 闭合标签 - if (!empty($tags[1])) { - $nodes = []; - $regex = $this->getRegex(array_keys($tags[1]), 1); - if (preg_match_all($regex, $content, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { - $right = []; - foreach ($matches as $match) { - if ('' == $match[1][0]) { - $name = strtolower($match[2][0]); - // 如果有没闭合的标签头则取出最后一个 - if (!empty($right[$name])) { - // $match[0][1]为标签结束符在模板中的位置 - $nodes[$match[0][1]] = [ - 'name' => $name, - 'begin' => array_pop($right[$name]), // 标签开始符 - 'end' => $match[0], // 标签结束符 - ]; - } - } else { - // 标签头压入栈 - $right[strtolower($match[1][0])][] = $match[0]; - } - } - unset($right, $matches); - // 按标签在模板中的位置从后向前排序 - krsort($nodes); - } - - $break = '<!--###break###--!>'; - if ($nodes) { - $beginArray = []; - // 标签替换 从后向前 - foreach ($nodes as $pos => $node) { - // 对应的标签名 - $name = $tags[1][$node['name']]; - $alias = $lib . $name != $node['name'] ? ($lib ? strstr($node['name'], $lib) : $node['name']) : ''; - - // 解析标签属性 - $attrs = $this->parseAttr($node['begin'][0], $name, $alias); - $method = 'tag' . $name; - - // 读取标签库中对应的标签内容 replace[0]用来替换标签头,replace[1]用来替换标签尾 - $replace = explode($break, $this->$method($attrs, $break)); - - if (count($replace) > 1) { - while ($beginArray) { - $begin = end($beginArray); - // 判断当前标签尾的位置是否在栈中最后一个标签头的后面,是则为子标签 - if ($node['end'][1] > $begin['pos']) { - break; - } else { - // 不为子标签时,取出栈中最后一个标签头 - $begin = array_pop($beginArray); - // 替换标签头部 - $content = substr_replace($content, $begin['str'], $begin['pos'], $begin['len']); - } - } - // 替换标签尾部 - $content = substr_replace($content, $replace[1], $node['end'][1], strlen($node['end'][0])); - // 把标签头压入栈 - $beginArray[] = ['pos' => $node['begin'][1], 'len' => strlen($node['begin'][0]), 'str' => $replace[0]]; - } - } - - while ($beginArray) { - $begin = array_pop($beginArray); - // 替换标签头部 - $content = substr_replace($content, $begin['str'], $begin['pos'], $begin['len']); - } - } - } - // 自闭合标签 - if (!empty($tags[0])) { - $regex = $this->getRegex(array_keys($tags[0]), 0); - $content = preg_replace_callback($regex, function ($matches) use (&$tags, &$lib) { - // 对应的标签名 - $name = $tags[0][strtolower($matches[1])]; - $alias = $lib . $name != $matches[1] ? ($lib ? strstr($matches[1], $lib) : $matches[1]) : ''; - // 解析标签属性 - $attrs = $this->parseAttr($matches[0], $name, $alias); - $method = 'tag' . $name; - return $this->$method($attrs, ''); - }, $content); - } - } - - /** - * 按标签生成正则 - * @access public - * @param array|string $tags 标签名 - * @param boolean $close 是否为闭合标签 - * @return string - */ - public function getRegex($tags, bool $close): string - { - $begin = $this->tpl->getConfig('taglib_begin'); - $end = $this->tpl->getConfig('taglib_end'); - $single = strlen(ltrim($begin, '\\')) == 1 && strlen(ltrim($end, '\\')) == 1 ? true : false; - $tagName = is_array($tags) ? implode('|', $tags) : $tags; - - if ($single) { - if ($close) { - // 如果是闭合标签 - $regex = $begin . '(?:(' . $tagName . ')\b(?>[^' . $end . ']*)|\/(' . $tagName . '))' . $end; - } else { - $regex = $begin . '(' . $tagName . ')\b(?>[^' . $end . ']*)' . $end; - } - } else { - if ($close) { - // 如果是闭合标签 - $regex = $begin . '(?:(' . $tagName . ')\b(?>(?:(?!' . $end . ').)*)|\/(' . $tagName . '))' . $end; - } else { - $regex = $begin . '(' . $tagName . ')\b(?>(?:(?!' . $end . ').)*)' . $end; - } - } - - return '/' . $regex . '/is'; - } - - /** - * 分析标签属性 正则方式 - * @access public - * @param string $str 标签属性字符串 - * @param string $name 标签名 - * @param string $alias 别名 - * @return array - */ - public function parseAttr(string $str, string $name, string $alias = ''): array - { - $regex = '/\s+(?>(?P<name>[\w-]+)\s*)=(?>\s*)([\"\'])(?P<value>(?:(?!\\2).)*)\\2/is'; - $result = []; - - if (preg_match_all($regex, $str, $matches)) { - foreach ($matches['name'] as $key => $val) { - $result[$val] = $matches['value'][$key]; - } - - if (!isset($this->tags[$name])) { - // 检测是否存在别名定义 - foreach ($this->tags as $key => $val) { - if (isset($val['alias'])) { - $array = (array) $val['alias']; - if (in_array($name, explode(',', $array[0]))) { - $tag = $val; - $type = !empty($array[1]) ? $array[1] : 'type'; - $result[$type] = $name; - break; - } - } - } - } else { - $tag = $this->tags[$name]; - // 设置了标签别名 - if (!empty($alias) && isset($tag['alias'])) { - $type = !empty($tag['alias'][1]) ? $tag['alias'][1] : 'type'; - $result[$type] = $alias; - } - } - - if (!empty($tag['must'])) { - $must = explode(',', $tag['must']); - foreach ($must as $name) { - if (!isset($result[$name])) { - throw new Exception('tag attr must:' . $name); - } - } - } - } else { - // 允许直接使用表达式的标签 - if (!empty($this->tags[$name]['expression'])) { - static $_taglibs; - if (!isset($_taglibs[$name])) { - $_taglibs[$name][0] = strlen($this->tpl->getConfig('taglib_begin_origin') . $name); - $_taglibs[$name][1] = strlen($this->tpl->getConfig('taglib_end_origin')); - } - $result['expression'] = substr($str, $_taglibs[$name][0], -$_taglibs[$name][1]); - // 清除自闭合标签尾部/ - $result['expression'] = rtrim($result['expression'], '/'); - $result['expression'] = trim($result['expression']); - } elseif (empty($this->tags[$name]) || !empty($this->tags[$name]['attr'])) { - throw new Exception('tag error:' . $name); - } - } - - return $result; - } - - /** - * 解析条件表达式 - * @access public - * @param string $condition 表达式标签内容 - * @return string - */ - public function parseCondition(string $condition): string - { - if (strpos($condition, ':')) { - $condition = ' ' . substr(strstr($condition, ':'), 1); - } - - $condition = str_ireplace(array_keys($this->comparison), array_values($this->comparison), $condition); - $this->tpl->parseVar($condition); - - return $condition; - } - - /** - * 自动识别构建变量 - * @access public - * @param string $name 变量描述 - * @return string - */ - public function autoBuildVar(string &$name): string - { - $flag = substr($name, 0, 1); - - if (':' == $flag) { - // 以:开头为函数调用,解析前去掉: - $name = substr($name, 1); - } elseif ('$' != $flag && preg_match('/[a-zA-Z_]/', $flag)) { - // XXX: 这句的写法可能还需要改进 - // 常量不需要解析 - if (defined($name)) { - return $name; - } - - // 不以$开头并且也不是常量,自动补上$前缀 - $name = '$' . $name; - } - - $this->tpl->parseVar($name); - $this->tpl->parseVarFunction($name, false); - - return $name; - } - - /** - * 获取标签列表 - * @access public - * @return array - */ - public function getTags(): array - { - return $this->tags; - } -} diff --git a/vendor/topthink/think-template/src/template/driver/File.php b/vendor/topthink/think-template/src/template/driver/File.php deleted file mode 100644 index 510d10a..0000000 --- a/vendor/topthink/think-template/src/template/driver/File.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\template\driver; - -use Exception; - -class File -{ - protected $cacheFile; - - /** - * 写入编译缓存 - * @access public - * @param string $cacheFile 缓存的文件名 - * @param string $content 缓存的内容 - * @return void - */ - public function write(string $cacheFile, string $content): void - { - // 检测模板目录 - $dir = dirname($cacheFile); - - if (!is_dir($dir)) { - mkdir($dir, 0755, true); - } - - // 生成模板缓存文件 - if (false === file_put_contents($cacheFile, $content)) { - throw new Exception('cache write error:' . $cacheFile, 11602); - } - } - - /** - * 读取编译编译 - * @access public - * @param string $cacheFile 缓存的文件名 - * @param array $vars 变量数组 - * @return void - */ - public function read(string $cacheFile, array $vars = []): void - { - $this->cacheFile = $cacheFile; - - if (!empty($vars) && is_array($vars)) { - // 模板阵列变量分解成为独立变量 - extract($vars, EXTR_OVERWRITE); - } - - //载入模版缓存文件 - include $this->cacheFile; - } - - /** - * 检查编译缓存是否有效 - * @access public - * @param string $cacheFile 缓存的文件名 - * @param int $cacheTime 缓存时间 - * @return bool - */ - public function check(string $cacheFile, int $cacheTime): bool - { - // 缓存文件不存在, 直接返回false - if (!file_exists($cacheFile)) { - return false; - } - - if (0 != $cacheTime && time() > filemtime($cacheFile) + $cacheTime) { - // 缓存是否在有效期 - return false; - } - - return true; - } -} diff --git a/vendor/topthink/think-template/src/template/exception/TemplateNotFoundException.php b/vendor/topthink/think-template/src/template/exception/TemplateNotFoundException.php deleted file mode 100644 index dd88b32..0000000 --- a/vendor/topthink/think-template/src/template/exception/TemplateNotFoundException.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\template\exception; - -class TemplateNotFoundException extends \RuntimeException -{ - protected $template; - - public function __construct(string $message, string $template = '') - { - $this->message = $message; - $this->template = $template; - } - - /** - * 获取模板文件 - * @access public - * @return string - */ - public function getTemplate(): string - { - return $this->template; - } -} diff --git a/vendor/topthink/think-template/src/template/taglib/Cx.php b/vendor/topthink/think-template/src/template/taglib/Cx.php deleted file mode 100644 index bccafc1..0000000 --- a/vendor/topthink/think-template/src/template/taglib/Cx.php +++ /dev/null @@ -1,715 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- - -namespace think\template\taglib; - -use think\template\TagLib; - -/** - * CX标签库解析类 - * @category Think - * @package Think - * @subpackage Driver.Taglib - * @author liu21st <liu21st@gmail.com> - */ -class Cx extends Taglib -{ - - // 标签定义 - protected $tags = [ - // 标签定义: attr 属性列表 close 是否闭合(0 或者1 默认1) alias 标签别名 level 嵌套层次 - 'php' => ['attr' => ''], - 'volist' => ['attr' => 'name,id,offset,length,key,mod', 'alias' => 'iterate'], - 'foreach' => ['attr' => 'name,id,item,key,offset,length,mod', 'expression' => true], - 'if' => ['attr' => 'condition', 'expression' => true], - 'elseif' => ['attr' => 'condition', 'close' => 0, 'expression' => true], - 'else' => ['attr' => '', 'close' => 0], - 'switch' => ['attr' => 'name', 'expression' => true], - 'case' => ['attr' => 'value,break', 'expression' => true], - 'default' => ['attr' => '', 'close' => 0], - 'compare' => ['attr' => 'name,value,type', 'alias' => ['eq,equal,notequal,neq,gt,lt,egt,elt,heq,nheq', 'type']], - 'range' => ['attr' => 'name,value,type', 'alias' => ['in,notin,between,notbetween', 'type']], - 'empty' => ['attr' => 'name'], - 'notempty' => ['attr' => 'name'], - 'present' => ['attr' => 'name'], - 'notpresent' => ['attr' => 'name'], - 'defined' => ['attr' => 'name'], - 'notdefined' => ['attr' => 'name'], - 'load' => ['attr' => 'file,href,type,value,basepath', 'close' => 0, 'alias' => ['import,css,js', 'type']], - 'assign' => ['attr' => 'name,value', 'close' => 0], - 'define' => ['attr' => 'name,value', 'close' => 0], - 'for' => ['attr' => 'start,end,name,comparison,step'], - 'url' => ['attr' => 'link,vars,suffix,domain', 'close' => 0, 'expression' => true], - 'function' => ['attr' => 'name,vars,use,call'], - ]; - - /** - * php标签解析 - * 格式: - * {php}echo $name{/php} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagPhp(array $tag, string $content): string - { - $parseStr = '<?php ' . $content . ' ?>'; - return $parseStr; - } - - /** - * volist标签解析 循环输出数据集 - * 格式: - * {volist name="userList" id="user" empty=""} - * {user.username} - * {user.email} - * {/volist} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagVolist(array $tag, string $content): string - { - $name = $tag['name']; - $id = $tag['id']; - $empty = isset($tag['empty']) ? $tag['empty'] : ''; - $key = !empty($tag['key']) ? $tag['key'] : 'i'; - $mod = isset($tag['mod']) ? $tag['mod'] : '2'; - $offset = !empty($tag['offset']) && is_numeric($tag['offset']) ? intval($tag['offset']) : 0; - $length = !empty($tag['length']) && is_numeric($tag['length']) ? intval($tag['length']) : 'null'; - // 允许使用函数设定数据集 <volist name=":fun('arg')" id="vo">{$vo.name}</volist> - $parseStr = '<?php '; - $flag = substr($name, 0, 1); - - if (':' == $flag) { - $name = $this->autoBuildVar($name); - $parseStr .= '$_result=' . $name . ';'; - $name = '$_result'; - } else { - $name = $this->autoBuildVar($name); - } - - $parseStr .= 'if(is_array(' . $name . ') || ' . $name . ' instanceof \think\Collection || ' . $name . ' instanceof \think\Paginator): $' . $key . ' = 0;'; - - // 设置了输出数组长度 - if (0 != $offset || 'null' != $length) { - $parseStr .= '$__LIST__ = is_array(' . $name . ') ? array_slice(' . $name . ',' . $offset . ',' . $length . ', true) : ' . $name . '->slice(' . $offset . ',' . $length . ', true); '; - } else { - $parseStr .= ' $__LIST__ = ' . $name . ';'; - } - - $parseStr .= 'if( count($__LIST__)==0 ) : echo "' . $empty . '" ;'; - $parseStr .= 'else: '; - $parseStr .= 'foreach($__LIST__ as $key=>$' . $id . '): '; - $parseStr .= '$mod = ($' . $key . ' % ' . $mod . ' );'; - $parseStr .= '++$' . $key . ';?>'; - $parseStr .= $content; - $parseStr .= '<?php endforeach; endif; else: echo "' . $empty . '" ;endif; ?>'; - - return $parseStr; - } - - /** - * foreach标签解析 循环输出数据集 - * 格式: - * {foreach name="userList" id="user" key="key" index="i" mod="2" offset="3" length="5" empty=""} - * {user.username} - * {/foreach} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagForeach(array $tag, string $content): string - { - // 直接使用表达式 - if (!empty($tag['expression'])) { - $expression = ltrim(rtrim($tag['expression'], ')'), '('); - $expression = $this->autoBuildVar($expression); - $parseStr = '<?php foreach(' . $expression . '): ?>'; - $parseStr .= $content; - $parseStr .= '<?php endforeach; ?>'; - return $parseStr; - } - - $name = $tag['name']; - $key = !empty($tag['key']) ? $tag['key'] : 'key'; - $item = !empty($tag['id']) ? $tag['id'] : $tag['item']; - $empty = isset($tag['empty']) ? $tag['empty'] : ''; - $offset = !empty($tag['offset']) && is_numeric($tag['offset']) ? intval($tag['offset']) : 0; - $length = !empty($tag['length']) && is_numeric($tag['length']) ? intval($tag['length']) : 'null'; - - $parseStr = '<?php '; - - // 支持用函数传数组 - if (':' == substr($name, 0, 1)) { - $var = '$_' . uniqid(); - $name = $this->autoBuildVar($name); - $parseStr .= $var . '=' . $name . '; '; - $name = $var; - } else { - $name = $this->autoBuildVar($name); - } - - $parseStr .= 'if(is_array(' . $name . ') || ' . $name . ' instanceof \think\Collection || ' . $name . ' instanceof \think\Paginator): '; - - // 设置了输出数组长度 - if (0 != $offset || 'null' != $length) { - if (!isset($var)) { - $var = '$_' . uniqid(); - } - $parseStr .= $var . ' = is_array(' . $name . ') ? array_slice(' . $name . ',' . $offset . ',' . $length . ', true) : ' . $name . '->slice(' . $offset . ',' . $length . ', true); '; - } else { - $var = &$name; - } - - $parseStr .= 'if( count(' . $var . ')==0 ) : echo "' . $empty . '" ;'; - $parseStr .= 'else: '; - - // 设置了索引项 - if (isset($tag['index'])) { - $index = $tag['index']; - $parseStr .= '$' . $index . '=0; '; - } - - $parseStr .= 'foreach(' . $var . ' as $' . $key . '=>$' . $item . '): '; - - // 设置了索引项 - if (isset($tag['index'])) { - $index = $tag['index']; - if (isset($tag['mod'])) { - $mod = (int) $tag['mod']; - $parseStr .= '$mod = ($' . $index . ' % ' . $mod . '); '; - } - $parseStr .= '++$' . $index . '; '; - } - - $parseStr .= '?>'; - // 循环体中的内容 - $parseStr .= $content; - $parseStr .= '<?php endforeach; endif; else: echo "' . $empty . '" ;endif; ?>'; - - return $parseStr; - } - - /** - * if标签解析 - * 格式: - * {if condition=" $a eq 1"} - * {elseif condition="$a eq 2" /} - * {else /} - * {/if} - * 表达式支持 eq neq gt egt lt elt == > >= < <= or and || && - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagIf(array $tag, string $content): string - { - $condition = !empty($tag['expression']) ? $tag['expression'] : $tag['condition']; - $condition = $this->parseCondition($condition); - $parseStr = '<?php if(' . $condition . '): ?>' . $content . '<?php endif; ?>'; - - return $parseStr; - } - - /** - * elseif标签解析 - * 格式:见if标签 - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagElseif(array $tag, string $content): string - { - $condition = !empty($tag['expression']) ? $tag['expression'] : $tag['condition']; - $condition = $this->parseCondition($condition); - $parseStr = '<?php elseif(' . $condition . '): ?>'; - - return $parseStr; - } - - /** - * else标签解析 - * 格式:见if标签 - * @access public - * @param array $tag 标签属性 - * @return string - */ - public function tagElse(array $tag): string - { - $parseStr = '<?php else: ?>'; - - return $parseStr; - } - - /** - * switch标签解析 - * 格式: - * {switch name="a.name"} - * {case value="1" break="false"}1{/case} - * {case value="2" }2{/case} - * {default /}other - * {/switch} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagSwitch(array $tag, string $content): string - { - $name = !empty($tag['expression']) ? $tag['expression'] : $tag['name']; - $name = $this->autoBuildVar($name); - $parseStr = '<?php switch(' . $name . '): ?>' . $content . '<?php endswitch; ?>'; - - return $parseStr; - } - - /** - * case标签解析 需要配合switch才有效 - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagCase(array $tag, string $content): string - { - $value = isset($tag['expression']) ? $tag['expression'] : $tag['value']; - $flag = substr($value, 0, 1); - - if ('$' == $flag || ':' == $flag) { - $value = $this->autoBuildVar($value); - $value = 'case ' . $value . ':'; - } elseif (strpos($value, '|')) { - $values = explode('|', $value); - $value = ''; - foreach ($values as $val) { - $value .= 'case "' . addslashes($val) . '":'; - } - } else { - $value = 'case "' . $value . '":'; - } - - $parseStr = '<?php ' . $value . ' ?>' . $content; - $isBreak = isset($tag['break']) ? $tag['break'] : ''; - - if ('' == $isBreak || $isBreak) { - $parseStr .= '<?php break; ?>'; - } - - return $parseStr; - } - - /** - * default标签解析 需要配合switch才有效 - * 使用: {default /}ddfdf - * @access public - * @param array $tag 标签属性 - * @return string - */ - public function tagDefault(array $tag): string - { - $parseStr = '<?php default: ?>'; - - return $parseStr; - } - - /** - * compare标签解析 - * 用于值的比较 支持 eq neq gt lt egt elt heq nheq 默认是eq - * 格式: {compare name="" type="eq" value="" }content{/compare} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagCompare(array $tag, string $content): string - { - $name = $tag['name']; - $value = $tag['value']; - $type = isset($tag['type']) ? $tag['type'] : 'eq'; // 比较类型 - $name = $this->autoBuildVar($name); - $flag = substr($value, 0, 1); - - if ('$' == $flag || ':' == $flag) { - $value = $this->autoBuildVar($value); - } else { - $value = '\'' . $value . '\''; - } - - switch ($type) { - case 'equal': - $type = 'eq'; - break; - case 'notequal': - $type = 'neq'; - break; - } - $type = $this->parseCondition(' ' . $type . ' '); - $parseStr = '<?php if(' . $name . ' ' . $type . ' ' . $value . '): ?>' . $content . '<?php endif; ?>'; - - return $parseStr; - } - - /** - * range标签解析 - * 如果某个变量存在于某个范围 则输出内容 type= in 表示在范围内 否则表示在范围外 - * 格式: {range name="var|function" value="val" type='in|notin' }content{/range} - * example: {range name="a" value="1,2,3" type='in' }content{/range} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagRange(array $tag, string $content): string - { - $name = $tag['name']; - $value = $tag['value']; - $type = isset($tag['type']) ? $tag['type'] : 'in'; // 比较类型 - - $name = $this->autoBuildVar($name); - $flag = substr($value, 0, 1); - - if ('$' == $flag || ':' == $flag) { - $value = $this->autoBuildVar($value); - $str = 'is_array(' . $value . ')?' . $value . ':explode(\',\',' . $value . ')'; - } else { - $value = '"' . $value . '"'; - $str = 'explode(\',\',' . $value . ')'; - } - - if ('between' == $type) { - $parseStr = '<?php $_RANGE_VAR_=' . $str . ';if(' . $name . '>= $_RANGE_VAR_[0] && ' . $name . '<= $_RANGE_VAR_[1]):?>' . $content . '<?php endif; ?>'; - } elseif ('notbetween' == $type) { - $parseStr = '<?php $_RANGE_VAR_=' . $str . ';if(' . $name . '<$_RANGE_VAR_[0] || ' . $name . '>$_RANGE_VAR_[1]):?>' . $content . '<?php endif; ?>'; - } else { - $fun = ('in' == $type) ? 'in_array' : '!in_array'; - $parseStr = '<?php if(' . $fun . '((' . $name . '), ' . $str . ')): ?>' . $content . '<?php endif; ?>'; - } - - return $parseStr; - } - - /** - * present标签解析 - * 如果某个变量已经设置 则输出内容 - * 格式: {present name="" }content{/present} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagPresent(array $tag, string $content): string - { - $name = $tag['name']; - $name = $this->autoBuildVar($name); - $parseStr = '<?php if(isset(' . $name . ')): ?>' . $content . '<?php endif; ?>'; - - return $parseStr; - } - - /** - * notpresent标签解析 - * 如果某个变量没有设置,则输出内容 - * 格式: {notpresent name="" }content{/notpresent} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagNotpresent(array $tag, string $content): string - { - $name = $tag['name']; - $name = $this->autoBuildVar($name); - $parseStr = '<?php if(!isset(' . $name . ')): ?>' . $content . '<?php endif; ?>'; - - return $parseStr; - } - - /** - * empty标签解析 - * 如果某个变量为empty 则输出内容 - * 格式: {empty name="" }content{/empty} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagEmpty(array $tag, string $content): string - { - $name = $tag['name']; - $name = $this->autoBuildVar($name); - $parseStr = '<?php if(empty(' . $name . ') || ((' . $name . ' instanceof \think\Collection || ' . $name . ' instanceof \think\Paginator ) && ' . $name . '->isEmpty())): ?>' . $content . '<?php endif; ?>'; - - return $parseStr; - } - - /** - * notempty标签解析 - * 如果某个变量不为empty 则输出内容 - * 格式: {notempty name="" }content{/notempty} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagNotempty(array $tag, string $content): string - { - $name = $tag['name']; - $name = $this->autoBuildVar($name); - $parseStr = '<?php if(!(empty(' . $name . ') || ((' . $name . ' instanceof \think\Collection || ' . $name . ' instanceof \think\Paginator ) && ' . $name . '->isEmpty()))): ?>' . $content . '<?php endif; ?>'; - - return $parseStr; - } - - /** - * 判断是否已经定义了该常量 - * {defined name='TXT'}已定义{/defined} - * @access public - * @param array $tag - * @param string $content - * @return string - */ - public function tagDefined(array $tag, string $content): string - { - $name = $tag['name']; - $parseStr = '<?php if(defined("' . $name . '")): ?>' . $content . '<?php endif; ?>'; - - return $parseStr; - } - - /** - * 判断是否没有定义了该常量 - * {notdefined name='TXT'}已定义{/notdefined} - * @access public - * @param array $tag - * @param string $content - * @return string - */ - public function tagNotdefined(array $tag, string $content): string - { - $name = $tag['name']; - $parseStr = '<?php if(!defined("' . $name . '")): ?>' . $content . '<?php endif; ?>'; - - return $parseStr; - } - - /** - * load 标签解析 {load file="/static/js/base.js" /} - * 格式:{load file="/static/css/base.css" /} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagLoad(array $tag, string $content): string - { - $file = isset($tag['file']) ? $tag['file'] : $tag['href']; - $type = isset($tag['type']) ? strtolower($tag['type']) : ''; - - $parseStr = ''; - $endStr = ''; - - // 判断是否存在加载条件 允许使用函数判断(默认为isset) - if (isset($tag['value'])) { - $name = $tag['value']; - $name = $this->autoBuildVar($name); - $name = 'isset(' . $name . ')'; - $parseStr .= '<?php if(' . $name . '): ?>'; - $endStr = '<?php endif; ?>'; - } - - // 文件方式导入 - $array = explode(',', $file); - - foreach ($array as $val) { - $type = strtolower(substr(strrchr($val, '.'), 1)); - switch ($type) { - case 'js': - $parseStr .= '<script type="text/javascript" src="' . $val . '"></script>'; - break; - case 'css': - $parseStr .= '<link rel="stylesheet" type="text/css" href="' . $val . '" />'; - break; - case 'php': - $parseStr .= '<?php include "' . $val . '"; ?>'; - break; - } - } - - return $parseStr . $endStr; - } - - /** - * assign标签解析 - * 在模板中给某个变量赋值 支持变量赋值 - * 格式: {assign name="" value="" /} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagAssign(array $tag, string $content): string - { - $name = $this->autoBuildVar($tag['name']); - $flag = substr($tag['value'], 0, 1); - - if ('$' == $flag || ':' == $flag) { - $value = $this->autoBuildVar($tag['value']); - } else { - $value = '\'' . $tag['value'] . '\''; - } - - $parseStr = '<?php ' . $name . ' = ' . $value . '; ?>'; - - return $parseStr; - } - - /** - * define标签解析 - * 在模板中定义常量 支持变量赋值 - * 格式: {define name="" value="" /} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagDefine(array $tag, string $content): string - { - $name = '\'' . $tag['name'] . '\''; - $flag = substr($tag['value'], 0, 1); - - if ('$' == $flag || ':' == $flag) { - $value = $this->autoBuildVar($tag['value']); - } else { - $value = '\'' . $tag['value'] . '\''; - } - - $parseStr = '<?php define(' . $name . ', ' . $value . '); ?>'; - - return $parseStr; - } - - /** - * for标签解析 - * 格式: - * {for start="" end="" comparison="" step="" name=""} - * content - * {/for} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagFor(array $tag, string $content): string - { - //设置默认值 - $start = 0; - $end = 0; - $step = 1; - $comparison = 'lt'; - $name = 'i'; - $rand = rand(); //添加随机数,防止嵌套变量冲突 - - //获取属性 - foreach ($tag as $key => $value) { - $value = trim($value); - $flag = substr($value, 0, 1); - if ('$' == $flag || ':' == $flag) { - $value = $this->autoBuildVar($value); - } - - switch ($key) { - case 'start': - $start = $value; - break; - case 'end': - $end = $value; - break; - case 'step': - $step = $value; - break; - case 'comparison': - $comparison = $value; - break; - case 'name': - $name = $value; - break; - } - } - - $parseStr = '<?php $__FOR_START_' . $rand . '__=' . $start . ';$__FOR_END_' . $rand . '__=' . $end . ';'; - $parseStr .= 'for($' . $name . '=$__FOR_START_' . $rand . '__;' . $this->parseCondition('$' . $name . ' ' . $comparison . ' $__FOR_END_' . $rand . '__') . ';$' . $name . '+=' . $step . '){ ?>'; - $parseStr .= $content; - $parseStr .= '<?php } ?>'; - - return $parseStr; - } - - /** - * url函数的tag标签 - * 格式:{url link="模块/控制器/方法" vars="参数" suffix="true或者false 是否带有后缀" domain="true或者false 是否携带域名" /} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagUrl(array $tag, string $content): string - { - $url = isset($tag['link']) ? $tag['link'] : ''; - $vars = isset($tag['vars']) ? $tag['vars'] : ''; - $suffix = isset($tag['suffix']) ? $tag['suffix'] : 'true'; - $domain = isset($tag['domain']) ? $tag['domain'] : 'false'; - - return '<?php echo url("' . $url . '","' . $vars . '",' . $suffix . ',' . $domain . ');?>'; - } - - /** - * function标签解析 匿名函数,可实现递归 - * 使用: - * {function name="func" vars="$data" call="$list" use="&$a,&$b"} - * {if is_array($data)} - * {foreach $data as $val} - * {~func($val) /} - * {/foreach} - * {else /} - * {$data} - * {/if} - * {/function} - * @access public - * @param array $tag 标签属性 - * @param string $content 标签内容 - * @return string - */ - public function tagFunction(array $tag, string $content): string - { - $name = !empty($tag['name']) ? $tag['name'] : 'func'; - $vars = !empty($tag['vars']) ? $tag['vars'] : ''; - $call = !empty($tag['call']) ? $tag['call'] : ''; - $use = ['&$' . $name]; - - if (!empty($tag['use'])) { - foreach (explode(',', $tag['use']) as $val) { - $use[] = '&' . ltrim(trim($val), '&'); - } - } - - $parseStr = '<?php $' . $name . '=function(' . $vars . ') use(' . implode(',', $use) . ') {'; - $parseStr .= ' ?>' . $content . '<?php }; '; - $parseStr .= $call ? '$' . $name . '(' . $call . '); ?>' : '?>'; - - return $parseStr; - } -} diff --git a/vendor/topthink/think-trace/.gitignore b/vendor/topthink/think-trace/.gitignore deleted file mode 100644 index 485dee6..0000000 --- a/vendor/topthink/think-trace/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea diff --git a/vendor/topthink/think-trace/LICENSE b/vendor/topthink/think-trace/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/vendor/topthink/think-trace/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/topthink/think-trace/README.md b/vendor/topthink/think-trace/README.md deleted file mode 100644 index 6ed63ec..0000000 --- a/vendor/topthink/think-trace/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# think-trace - -用于ThinkPHP6+的页面Trace扩展,支持Html页面和浏览器控制台两种方式输出。 - -## 安装 - -~~~ -composer require topthink/think-trace -~~~ - -## 配置 - -安装后config目录下会自带trace.php配置文件。 - -type参数用于指定trace类型,支持html和console两种方式。 \ No newline at end of file diff --git a/vendor/topthink/think-trace/composer.json b/vendor/topthink/think-trace/composer.json deleted file mode 100644 index e6cd16b..0000000 --- a/vendor/topthink/think-trace/composer.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "topthink/think-trace", - "description": "thinkphp debug trace", - "license": "Apache-2.0", - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "require": { - "php": ">=7.1.0", - "topthink/framework": "^6.0|^8.0" - }, - "autoload": { - "psr-4": { - "think\\trace\\": "src" - } - }, - "extra": { - "think":{ - "services":[ - "think\\trace\\Service" - ], - "config":{ - "trace": "src/config.php" - } - } - }, - "minimum-stability": "dev" -} diff --git a/vendor/topthink/think-trace/src/Console.php b/vendor/topthink/think-trace/src/Console.php deleted file mode 100644 index c97d1e0..0000000 --- a/vendor/topthink/think-trace/src/Console.php +++ /dev/null @@ -1,173 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: yangweijie <yangweijiester@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); -namespace think\trace; - -use think\App; -use think\Response; - -/** - * 浏览器调试输出 - */ -class Console -{ - protected $config = [ - 'tabs' => ['base' => '基本', 'file' => '文件', 'info' => '流程', 'notice|error' => '错误', 'sql' => 'SQL', 'debug|log' => '调试'], - ]; - - // 实例化并传入参数 - public function __construct(array $config = []) - { - $this->config = array_merge($this->config, $config); - } - - /** - * 调试输出接口 - * @access public - * @param Response $response Response对象 - * @param array $log 日志信息 - * @return string|bool - */ - public function output(App $app, Response $response, array $log = []) - { - $request = $app->request; - $contentType = $response->getHeader('Content-Type'); - - if ($request->isJson() || $request->isAjax()) { - return false; - } elseif (!empty($contentType) && strpos($contentType, 'html') === false) { - return false; - } elseif ($response->getCode() == 204) { - return false; - } - - // 获取基本信息 - $runtime = number_format(microtime(true) - $app->getBeginTime(), 10, '.', ''); - $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; - $mem = number_format((memory_get_usage() - $app->getBeginMem()) / 1024, 2); - - if ($request->host()) { - $uri = $request->protocol() . ' ' . $request->method() . ' : ' . $request->url(true); - } else { - $uri = 'cmd:' . implode(' ', $_SERVER['argv']); - } - - // 页面Trace信息 - $base = [ - '请求信息' => date('Y-m-d H:i:s', $request->time() ?: time()) . ' ' . $uri, - '运行时间' => number_format((float) $runtime, 6) . 's [ 吞吐率:' . $reqs . 'req/s ] 内存消耗:' . $mem . 'kb 文件加载:' . count(get_included_files()), - '查询信息' => $app->db->getQueryTimes() . ' queries', - '缓存信息' => $app->cache->getReadTimes() . ' reads,' . $app->cache->getWriteTimes() . ' writes', - ]; - - if (isset($app->session)) { - $base['会话信息'] = 'SESSION_ID=' . $app->session->getId(); - } - - $info = $this->getFileInfo(); - - // 页面Trace信息 - $trace = []; - foreach ($this->config['tabs'] as $name => $title) { - $name = strtolower($name); - switch ($name) { - case 'base': // 基本信息 - $trace[$title] = $base; - break; - case 'file': // 文件信息 - $trace[$title] = $info; - break; - default: // 调试信息 - if (strpos($name, '|')) { - // 多组信息 - $names = explode('|', $name); - $result = []; - foreach ($names as $item) { - $result = array_merge($result, $log[$item] ?? []); - } - $trace[$title] = $result; - } else { - $trace[$title] = $log[$name] ?? ''; - } - } - } - - //输出到控制台 - $lines = ''; - foreach ($trace as $type => $msg) { - $lines .= $this->console($type, empty($msg) ? [] : $msg); - } - $js = <<<JS - -<script type='text/javascript'> -{$lines} -</script> -JS; - return $js; - } - - protected function console(string $type, $msg) - { - $type = strtolower($type); - $trace_tabs = array_values($this->config['tabs']); - $line = []; - $line[] = ($type == $trace_tabs[0] || '调试' == $type || '错误' == $type) - ? "console.group('{$type}');" - : "console.groupCollapsed('{$type}');"; - - foreach ((array) $msg as $key => $m) { - switch ($type) { - case '调试': - $var_type = gettype($m); - if (in_array($var_type, ['array', 'string'])) { - $line[] = "console.log(" . json_encode($m) . ");"; - } else { - $line[] = "console.log(" . json_encode(var_export($m, true)) . ");"; - } - break; - case '错误': - $msg = str_replace("\n", '\n', addslashes(is_scalar($m) ? $m : json_encode($m))); - $style = 'color:#F4006B;font-size:14px;'; - $line[] = "console.error(\"%c{$msg}\", \"{$style}\");"; - break; - case 'sql': - $msg = str_replace("\n", '\n', addslashes($m)); - $style = "color:#009bb4;"; - $line[] = "console.log(\"%c{$msg}\", \"{$style}\");"; - break; - default: - $m = is_string($key) ? $key . ' ' . $m : $key + 1 . ' ' . $m; - $msg = json_encode($m); - $line[] = "console.log({$msg});"; - break; - } - } - $line[] = "console.groupEnd();"; - return implode(PHP_EOL, $line); - } - - /** - * 获取文件加载信息 - * @access protected - * @return integer|array - */ - protected function getFileInfo() - { - $files = get_included_files(); - $info = []; - - foreach ($files as $key => $file) { - $info[] = $file . ' ( ' . number_format(filesize($file) / 1024, 2) . ' KB )'; - } - - return $info; - } -} diff --git a/vendor/topthink/think-trace/src/Html.php b/vendor/topthink/think-trace/src/Html.php deleted file mode 100644 index 35b3146..0000000 --- a/vendor/topthink/think-trace/src/Html.php +++ /dev/null @@ -1,126 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); -namespace think\trace; - -use think\App; -use think\Response; - -/** - * 页面Trace调试 - */ -class Html -{ - protected $config = [ - 'file' => '', - 'tabs' => ['base' => '基本', 'file' => '文件', 'info' => '流程', 'notice|error' => '错误', 'sql' => 'SQL', 'debug|log' => '调试'], - ]; - - // 实例化并传入参数 - public function __construct(array $config = []) - { - $this->config = array_merge($this->config, $config); - } - - /** - * 调试输出接口 - * @access public - * @param App $app 应用实例 - * @param Response $response Response对象 - * @param array $log 日志信息 - * @return bool|string - */ - public function output(App $app, Response $response, array $log = []) - { - $request = $app->request; - $contentType = $response->getHeader('Content-Type'); - - if ($request->isJson() || $request->isAjax()) { - return false; - } elseif (!empty($contentType) && strpos($contentType, 'html') === false) { - return false; - } elseif ($response->getCode() == 204) { - return false; - } - - // 获取基本信息 - $runtime = number_format(microtime(true) - $app->getBeginTime(), 10, '.', ''); - $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; - $mem = number_format((memory_get_usage() - $app->getBeginMem()) / 1024, 2); - - // 页面Trace信息 - if ($request->host()) { - $uri = $request->protocol() . ' ' . $request->method() . ' : ' . $request->url(true); - } else { - $uri = 'cmd:' . implode(' ', $_SERVER['argv']); - } - - $base = [ - '请求信息' => date('Y-m-d H:i:s', $request->time() ?: time()) . ' ' . $uri, - '运行时间' => number_format((float) $runtime, 6) . 's [ 吞吐率:' . $reqs . 'req/s ] 内存消耗:' . $mem . 'kb 文件加载:' . count(get_included_files()), - '查询信息' => $app->db->getQueryTimes() . ' queries', - '缓存信息' => $app->cache->getReadTimes() . ' reads,' . $app->cache->getWriteTimes() . ' writes', - ]; - - if (isset($app->session)) { - $base['会话信息'] = 'SESSION_ID=' . $app->session->getId(); - } - - $info = $this->getFileInfo(); - - // 页面Trace信息 - $trace = []; - foreach ($this->config['tabs'] as $name => $title) { - $name = strtolower($name); - switch ($name) { - case 'base': // 基本信息 - $trace[$title] = $base; - break; - case 'file': // 文件信息 - $trace[$title] = $info; - break; - default: // 调试信息 - if (strpos($name, '|')) { - // 多组信息 - $names = explode('|', $name); - $result = []; - foreach ($names as $item) { - $result = array_merge($result, $log[$item] ?? []); - } - $trace[$title] = $result; - } else { - $trace[$title] = $log[$name] ?? ''; - } - } - } - // 调用Trace页面模板 - ob_start(); - include $this->config['file'] ?: __DIR__ . '/tpl/page_trace.tpl'; - return ob_get_clean(); - } - - /** - * 获取文件加载信息 - * @access protected - * @return integer|array - */ - protected function getFileInfo() - { - $files = get_included_files(); - $info = []; - - foreach ($files as $key => $file) { - $info[] = $file . ' ( ' . number_format(filesize($file) / 1024, 2) . ' KB )'; - } - - return $info; - } -} diff --git a/vendor/topthink/think-trace/src/Service.php b/vendor/topthink/think-trace/src/Service.php deleted file mode 100644 index 3e78ecc..0000000 --- a/vendor/topthink/think-trace/src/Service.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK IT ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -namespace think\trace; - -use think\Service as BaseService; - -class Service extends BaseService -{ - public function register() - { - $this->app->middleware->add(TraceDebug::class); - } -} diff --git a/vendor/topthink/think-trace/src/TraceDebug.php b/vendor/topthink/think-trace/src/TraceDebug.php deleted file mode 100644 index 5ed9cbf..0000000 --- a/vendor/topthink/think-trace/src/TraceDebug.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\trace; - -use Closure; -use think\App; -use think\Config; -use think\event\LogWrite; -use think\Request; -use think\Response; -use think\response\Redirect; - -/** - * 页面Trace中间件 - */ -class TraceDebug -{ - - /** - * Trace日志 - * @var array - */ - protected $log = []; - - /** - * 配置参数 - * @var array - */ - protected $config = []; - - /** @var App */ - protected $app; - - public function __construct(App $app, Config $config) - { - $this->app = $app; - $this->config = $config->get('trace'); - } - - /** - * 页面Trace调试 - * @access public - * @param Request $request - * @param Closure $next - * @return void - */ - public function handle($request, Closure $next) - { - $debug = $this->app->isDebug(); - - // 注册日志监听 - if ($debug) { - $this->log = []; - $this->app->event->listen(LogWrite::class, function ($event) { - if (empty($this->config['channel']) || $this->config['channel'] == $event->channel) { - $this->log = array_merge_recursive($this->log, $event->log); - } - }); - } - - $response = $next($request); - - // Trace调试注入 - if ($debug) { - $data = $response->getContent(); - $this->traceDebug($response, $data); - $response->content($data); - } - - return $response; - } - - public function traceDebug(Response $response, &$content) - { - $config = $this->config; - $type = $config['type'] ?? 'Html'; - - unset($config['type']); - - $trace = App::factory($type, '\\think\\trace\\', $config); - - if ($response instanceof Redirect) { - //TODO 记录 - } else { - $log = $this->app->log->getLog($config['channel'] ?? ''); - $log = array_merge_recursive($this->log, $log); - $output = $trace->output($this->app, $response, $log); - if (is_string($output)) { - // trace调试信息注入 - $pos = strripos($content, '</body>'); - if (false !== $pos) { - $content = substr($content, 0, $pos) . $output . substr($content, $pos); - } else { - $content = $content . $output; - } - } - } - } -} diff --git a/vendor/topthink/think-trace/src/config.php b/vendor/topthink/think-trace/src/config.php deleted file mode 100644 index fad2392..0000000 --- a/vendor/topthink/think-trace/src/config.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | Trace设置 开启调试模式后有效 -// +---------------------------------------------------------------------- -return [ - // 内置Html和Console两种方式 支持扩展 - 'type' => 'Html', - // 读取的日志通道名 - 'channel' => '', -]; diff --git a/vendor/topthink/think-trace/src/tpl/page_trace.tpl b/vendor/topthink/think-trace/src/tpl/page_trace.tpl deleted file mode 100644 index 6b1b9a1..0000000 --- a/vendor/topthink/think-trace/src/tpl/page_trace.tpl +++ /dev/null @@ -1,71 +0,0 @@ -<div id="think_page_trace" style="position: fixed;bottom:0;right:0;font-size:14px;width:100%;z-index: 999999;color: #000;text-align:left;font-family:'微软雅黑';"> - <div id="think_page_trace_tab" style="display: none;background:white;margin:0;height: 250px;"> - <div id="think_page_trace_tab_tit" style="height:30px;padding: 6px 12px 0;border-bottom:1px solid #ececec;border-top:1px solid #ececec;font-size:16px"> - <?php foreach ($trace as $key => $value) {?> - <span style="color:#000;padding-right:12px;height:30px;line-height:30px;display:inline-block;margin-right:3px;cursor:pointer;font-weight:700"><?php echo $key ?></span> - <?php }?> - </div> - <div id="think_page_trace_tab_cont" style="overflow:auto;height:212px;padding:0;line-height: 24px"> - <?php foreach ($trace as $info) {?> - <div style="display:none;"> - <ol style="padding: 0; margin:0"> - <?php - if (is_array($info)) { - foreach ($info as $k => $val) { - echo '<li style="border-bottom:1px solid #EEE;font-size:14px;padding:0 12px">' . (is_numeric($k) ? '' : $k.' : ') . htmlentities(print_r($val,true), ENT_COMPAT, 'utf-8') . '</li>'; - } - } - ?> - </ol> - </div> - <?php }?> - </div> - </div> - <div id="think_page_trace_close" style="display:none;text-align:right;height:15px;position:absolute;top:10px;right:12px;cursor:pointer;"><img style="vertical-align:top;" src="data:image/gif;base64,R0lGODlhDwAPAJEAAAAAAAMDA////wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MUQxMjc1MUJCQUJDMTFFMTk0OUVGRjc3QzU4RURFNkEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MUQxMjc1MUNCQUJDMTFFMTk0OUVGRjc3QzU4RURFNkEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxRDEyNzUxOUJBQkMxMUUxOTQ5RUZGNzdDNThFREU2QSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoxRDEyNzUxQUJBQkMxMUUxOTQ5RUZGNzdDNThFREU2QSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAAAAAAALAAAAAAPAA8AAAIdjI6JZqotoJPR1fnsgRR3C2jZl3Ai9aWZZooV+RQAOw==" /></div> -</div> -<div id="think_page_trace_open" style="height:30px;float:right;text-align:right;overflow:hidden;position:fixed;bottom:0;right:0;color:#000;line-height:30px;cursor:pointer;"> - <div style="background:#232323;color:#FFF;padding:0 6px;float:right;line-height:30px;font-size:14px"><?php echo number_format(microtime(true)-\think\facade\App::getBeginTime(), 6, '.', '').'s ';?></div> - <img width="30" style="" title="ShowPageTrace" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjVERDVENkZGQjkyNDExRTE5REY3RDQ5RTQ2RTRDQUJCIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjVERDVENzAwQjkyNDExRTE5REY3RDQ5RTQ2RTRDQUJCIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NURENUQ2RkRCOTI0MTFFMTlERjdENDlFNDZFNENBQkIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NURENUQ2RkVCOTI0MTFFMTlERjdENDlFNDZFNENBQkIiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fx6IRAAAMCElEQVR42sxae3BU1Rk/9+69+8xuNtkHJAFCSIAkhMgjCCJQUi0GtEIVbP8Qq9LH2No6TmfaztjO2OnUdvqHFMfOVFTqIK0vUEEeqUBARCsEeYQkEPJoEvIiELLvvc9z+p27u2F3s5tsBB1OZiebu5dzf7/v/L7f952zMM8cWIwY+Mk2ulCp92Fnq3XvnzArr2NZnYNldDp0Gw+/OEQ4+obQn5D+4Ubb22+YOGsWi/Todh8AHglKEGkEsnHBQ162511GZFgW6ZCBM9/W4H3iNSQqIe09O196dLKX7d1O39OViP/wthtkND62if/wj/DbMpph8BY/m9xy8BoBmQk+mHqZQGNy4JYRwCoRbwa8l4JXw6M+orJxpU0U6ToKy/5bQsAiTeokGKkTx46RRxxEUgrwGgF4MWNNEJCGgYTvpgnY1IJWg5RzfqLgvcIgktX0i8dmMlFA8qCQ5L0Z/WObPLUxT1i4lWSYDISoEfBYGvM+LlMQQdkLHoWRRZ8zYQI62Thswe5WTORGwNXDcGjqeOA9AF7B8rhzsxMBEoJ8oJKaqPu4hblHMCMPwl9XeNWyb8xkB/DDGYKfMAE6aFL7xesZ389JlgG3XHEMI6UPDOP6JHHu67T2pwNPI69mCP4rEaBDUAJaKc/AOuXiwH07VCS3w5+UQMAuF/WqGI+yFIwVNBwemBD4r0wgQiKoFZa00sEYTwss32lA1tPwVxtc8jQ5/gWCwmGCyUD8vRT0sHBFW4GJDvZmrJFWRY1EkrGA6ZB8/10fOZSSj0E6F+BSP7xidiIzhBmKB09lEwHPkG+UQIyEN44EBiT5vrv2uJXyPQqSqO930fxvcvwbR/+JAkD9EfASgI9EHlp6YiHO4W+cAB20SnrFqxBbNljiXf1Pl1K2S0HCWfiog3YlAD5RGwwxK6oUjTweuVigLjyB0mX410mAFnMoVK1lvvUvgt8fUJH0JVyjuvcmg4dE5mUiFtD24AZ4qBVELxXKS+pMxN43kSdzNwudJ+bQbLlmnxvPOQoCugSap1GnSRoG8KOiKbH+rIA0lEeSAg3y6eeQ6XI2nrYnrPM89bUTgI0Pdqvl50vlNbtZxDUBcLBK0kPd5jPziyLdojJIN0pq5/mdzwL4UVvVInV5ncQEPNOUxa9d0TU+CW5l+FoI0GSDKHVVSOs+0KOsZoxwOzSZNFGv0mQ9avyLCh2Hpm+70Y0YJoJVgmQv822wnDC8Miq6VjJ5IFed0QD1YiAbT+nQE8v/RMZfmgmcCRHIIu7Bmcp39oM9fqEychcA747KxQ/AEyqQonl7hATtJmnhO2XYtgcia01aSbVMenAXrIomPcLgEBA4liGBzFZAT8zBYqW6brI67wg8sFVhxBhwLwBP2+tqBQqqK7VJKGh/BRrfTr6nWL7nYBaZdBJHqrX3kPEPap56xwE/GvjJTRMADeMCdcGpGXL1Xh4ZL8BDOlWkUpegfi0CeDzeA5YITzEnddv+IXL+UYCmqIvqC9UlUC/ki9FipwVjunL3yX7dOTLeXmVMAhbsGporPfyOBTm/BJ23gTVehsvXRnSewagUfpBXF3p5pygKS7OceqTjb7h2vjr/XKm0ZofKSI2Q/J102wHzatZkJPYQ5JoKsuK+EoHJakVzubzuLQDepCKllTZi9AG0DYg9ZLxhFaZsOu7bvlmVI5oPXJMQJcHxHClSln1apFTvAimeg48u0RWFeZW4lVcjbQWZuIQK1KozZfIDO6CSQmQQXdpBaiKZyEWThVK1uEc6v7V7uK0ysduExPZx4vysDR+4SelhBYm0R6LBuR4PXts8MYMcJPsINo4YZCDLj0sgB0/vLpPXvA2Tn42Cv5rsLulGubzW0sEd3d4W/mJt2Kck+DzDMijfPLOjyrDhXSh852B+OvflqAkoyXO1cYfujtc/i3jJSAwhgfFlp20laMLOku/bC7prgqW7lCn4auE5NhcXPd3M7x70+IceSgZvNljCd9k3fLjYsPElqLR14PXQZqD2ZNkkrAB79UeJUebFQmXpf8ZcAQt2XrMQdyNUVBqZoUzAFyp3V3xi/MubUA/mCT4Fhf038PC8XplhWnCmnK/ZzyC2BSTRSqKVOuY2kB8Jia0lvvRIVoP+vVWJbYarf6p655E2/nANBMCWkgD49DA0VAMyI1OLFMYCXiU9bmzi9/y5i/vsaTpHPHidTofzLbM65vMPva9HlovgXp0AvjtaqYMfDD0/4mAsYE92pxa+9k1QgCnRVObCpojpzsKTPvayPetTEgBdwnssjuc0kOBFX+q3HwRQxdrOLAqeYRjkMk/trTSu2Z9Lik7CfF0AvjtqAhS4NHobGXUnB5DQs8hG8p/wMX1r4+8xkmyvQ50JVq72TVeXbz3HvpWaQJi57hJYTw4kGbtS+C2TigQUtZUX+X27QQq2ePBZBru/0lxTm8fOOQ5yaZOZMAV+he4FqIMB+LQB0UgMSajANX29j+vbmly8ipRvHeSQoQOkM5iFXcPQCVwDMs5RBCQmaPOyvbNd6uwvQJ183BZQG3Zc+Eiv7vQOKu8YeDmMcJlt2ckyftVeMIGLBCmdMHl/tFILYwGPjXWO3zOfSq/+om+oa7Mlh2fpSsRGLp7RAW3FUVjNHgiMhyE6zBFjM2BdkdJGO7nP1kJXWAtBuBpPIAu7f+hhu7bFXIuC5xWrf0X2xreykOsUyKkF2gwadbrXDcXrfKxR43zGcSj4t/cCgr+a1iy6EjE5GYktUCl9fwfMeylyooGF48bN2IGLTw8x7StS7sj8TF9FmPGWQhm3rRR+o9lhvjJvSYAdfDUevI1M6bnX/OwWaDMOQ8RPgKRo0eulBTdT8AW2kl8e9L7UHghHwMfLiZPNoSpx0yugpQZaFqKWqxVSM3a2pN1SAhC2jf94I7ybBI7EL5A2Wvu5ht3xsoEt4+Ay/abXgCQAxyOeDsDlTCQzy75ohcGgv9Tra9uiymRUYTLrswOLlCdfAQf7HPDQQ4ErAH5EDXB9cMxWYpjtXApRncojS0sbV/cCgHTHwGNBJy+1PQE2x56FpaVR7wfQGZ37V+V+19EiHNvR6q1fRUjqvbjbMq1/qfHxbTrE10ePY2gPFk48D2CVMTf1AF4PXvyYR9dV6Wf7H413m3xTWQvYGhQ7mfYwA5mAX+18Vue05v/8jG/fZX/IW5MKPKtjSYlt0ellxh+/BOCPAwYaeVr0QofZFxJWVWC8znG70au6llVmktsF0bfHF6k8fvZ5esZJbwHwwnjg59tXz6sL/P0NUZDuSNu1mnJ8Vab17+cy005A9wtOpp3i0bZdpJLUil00semAwN45LgEViZYe3amNye0B6A9chviSlzXVsFtyN5/1H3gaNmMpn8Fz0GpYFp6Zw615H/LpUuRQQDMCL82n5DpBSawkvzIdN2ypiT8nSLth8Pk9jnjwdFzH3W4XW6KMBfwB569NdcGX93mC16tTflcArcYUc/mFuYbV+8zY0SAjAVoNErNgWjtwumJ3wbn/HlBFYdxHvSkJJEc+Ngal9opSwyo9YlITX2C/P/+gf8sxURSLR+mcZUmeqaS9wrh6vxW5zxFCOqFi90RbDWq/YwZmnu1+a6OvdpvRqkNxxe44lyl4OobEnpKA6Uox5EfH9xzPs/HRKrTPWdIQrK1VZDU7ETiD3Obpl+8wPPCRBbkbwNtpW9AbBe5L1SMlj3tdTxk/9W47JUmqS5HU+JzYymUKXjtWVmT9RenIhgXc+nroWLyxXJhmL112OdB8GCsk4f8oZJucnvmmtR85mBn10GZ0EKSCMUSAR3ukcXd5s7LvLD3me61WkuTCpJzYAyRurMB44EdEJzTfU271lUJC03YjXJXzYOGZwN4D8eB5jlfLrdWfzGRW7icMPfiSO6Oe7s20bmhdgLX4Z23B+s3JgQESzUDiMboSzDMHFpNMwccGePauhfwjzwnI2wu9zKGgEFg80jcZ7MHllk07s1H+5yojtUQTlH4nFdLKTGwDmPbIklOb1L1zO4T6N8NCuDLFLS/C63c0eNRimZ++s5BMBHxU11jHchI9oFVUxRh/eMDzHEzGYu0Lg8gJ7oS/tFCwoic44fyUtix0n/46vP4bf+//BRgAYwDDar4ncHIAAAAASUVORK5CYII="> -</div> - -<script type="text/javascript"> - (function(){ - var tab_tit = document.getElementById('think_page_trace_tab_tit').getElementsByTagName('span'); - var tab_cont = document.getElementById('think_page_trace_tab_cont').getElementsByTagName('div'); - var open = document.getElementById('think_page_trace_open'); - var close = document.getElementById('think_page_trace_close').children[0]; - var trace = document.getElementById('think_page_trace_tab'); - var cookie = document.cookie.match(/thinkphp_show_page_trace=(\d\|\d)/); - var history = (cookie && typeof cookie[1] != 'undefined' && cookie[1].split('|')) || [0,0]; - open.onclick = function(){ - trace.style.display = 'block'; - this.style.display = 'none'; - close.parentNode.style.display = 'block'; - history[0] = 1; - document.cookie = 'thinkphp_show_page_trace='+history.join('|') - } - close.onclick = function(){ - trace.style.display = 'none'; - this.parentNode.style.display = 'none'; - open.style.display = 'block'; - history[0] = 0; - document.cookie = 'thinkphp_show_page_trace='+history.join('|') - } - for(var i = 0; i < tab_tit.length; i++){ - tab_tit[i].onclick = (function(i){ - return function(){ - for(var j = 0; j < tab_cont.length; j++){ - tab_cont[j].style.display = 'none'; - tab_tit[j].style.color = '#999'; - } - tab_cont[i].style.display = 'block'; - tab_tit[i].style.color = '#000'; - history[1] = i; - document.cookie = 'thinkphp_show_page_trace='+history.join('|') - } - })(i) - } - parseInt(history[0]) && open.click(); - tab_tit[history[1]].click(); - })(); -</script> diff --git a/vendor/topthink/think-view/.gitignore b/vendor/topthink/think-view/.gitignore deleted file mode 100644 index 485dee6..0000000 --- a/vendor/topthink/think-view/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea diff --git a/vendor/topthink/think-view/LICENSE b/vendor/topthink/think-view/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/vendor/topthink/think-view/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/topthink/think-view/README.md b/vendor/topthink/think-view/README.md deleted file mode 100644 index 4e52def..0000000 --- a/vendor/topthink/think-view/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# think-view - -ThinkPHP6.0 Think-Template模板引擎驱动 - - -## 安装 - -~~~php -composer require topthink/think-view -~~~ - -## 用法示例 - -本扩展不能单独使用,依赖ThinkPHP6.0+ - -首先配置config目录下的template.php配置文件,然后可以按照下面的用法使用。 - -~~~php - -use think\facade\View; - -// 模板变量赋值和渲染输出 -View::assign(['name' => 'think']) - // 输出过滤 - ->filter(function($content){ - return str_replace('search', 'replace', $content); - }) - // 读取模板文件渲染输出 - ->fetch('index'); - - -// 或者使用助手函数 -view('index', ['name' => 'think']); -~~~ - -具体的模板引擎配置请参考think-template库。 \ No newline at end of file diff --git a/vendor/topthink/think-view/composer.json b/vendor/topthink/think-view/composer.json deleted file mode 100644 index f4e6431..0000000 --- a/vendor/topthink/think-view/composer.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "topthink/think-view", - "description": "thinkphp template driver", - "license": "Apache-2.0", - "authors": [ - { - "name": "liu21st", - "email": "liu21st@gmail.com" - } - ], - "require": { - "php": ">=7.1.0", - "topthink/think-template": "^2.0" - }, - "autoload": { - "psr-4": { - "think\\view\\driver\\": "src" - } - } -} diff --git a/vendor/topthink/think-view/src/Think.php b/vendor/topthink/think-view/src/Think.php deleted file mode 100644 index 562b54a..0000000 --- a/vendor/topthink/think-view/src/Think.php +++ /dev/null @@ -1,259 +0,0 @@ -<?php -// +---------------------------------------------------------------------- -// | ThinkPHP [ WE CAN DO IT JUST THINK ] -// +---------------------------------------------------------------------- -// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved. -// +---------------------------------------------------------------------- -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) -// +---------------------------------------------------------------------- -// | Author: liu21st <liu21st@gmail.com> -// +---------------------------------------------------------------------- -declare (strict_types = 1); - -namespace think\view\driver; - -use think\App; -use think\helper\Str; -use think\Template; -use think\template\exception\TemplateNotFoundException; - -class Think -{ - // 模板引擎实例 - private $template; - private $app; - - // 模板引擎参数 - protected $config = [ - // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 - 'auto_rule' => 1, - // 视图目录名 - 'view_dir_name' => 'view', - // 模板起始路径 - 'view_path' => '', - // 模板文件后缀 - 'view_suffix' => 'html', - // 模板文件名分隔符 - 'view_depr' => DIRECTORY_SEPARATOR, - // 是否开启模板编译缓存,设为false则每次都会重新编译 - 'tpl_cache' => true, - ]; - - public function __construct(App $app, array $config = []) - { - $this->app = $app; - - $this->config = array_merge($this->config, (array) $config); - - if (empty($this->config['cache_path'])) { - $this->config['cache_path'] = $app->getRuntimePath() . 'temp' . DIRECTORY_SEPARATOR; - } - - $this->template = new Template($this->config); - $this->template->setCache($app->cache); - $this->template->extend('$Think', function (array $vars) { - $type = strtoupper(trim(array_shift($vars))); - $param = implode('.', $vars); - - switch ($type) { - case 'CONST': - $parseStr = strtoupper($param); - break; - case 'CONFIG': - $parseStr = 'config(\'' . $param . '\')'; - break; - case 'LANG': - $parseStr = 'lang(\'' . $param . '\')'; - break; - case 'NOW': - $parseStr = "date('Y-m-d g:i a',time())"; - break; - case 'LDELIM': - $parseStr = '\'' . ltrim($this->getConfig('tpl_begin'), '\\') . '\''; - break; - case 'RDELIM': - $parseStr = '\'' . ltrim($this->getConfig('tpl_end'), '\\') . '\''; - break; - default: - $parseStr = defined($type) ? $type : '\'\''; - } - - return $parseStr; - }); - - $this->template->extend('$Request', function (array $vars) { - // 获取Request请求对象参数 - $method = array_shift($vars); - if (!empty($vars)) { - $params = implode('.', $vars); - if ('true' != $params) { - $params = '\'' . $params . '\''; - } - } else { - $params = ''; - } - - return 'app(\'request\')->' . $method . '(' . $params . ')'; - }); - } - - /** - * 检测是否存在模板文件 - * @access public - * @param string $template 模板文件或者模板规则 - * @return bool - */ - public function exists(string $template): bool - { - if ('' == pathinfo($template, PATHINFO_EXTENSION)) { - // 获取模板文件名 - $template = $this->parseTemplate($template); - } - - return is_file($template); - } - - /** - * 渲染模板文件 - * @access public - * @param string $template 模板文件 - * @param array $data 模板变量 - * @return void - */ - public function fetch(string $template, array $data = []): void - { - if (empty($this->config['view_path'])) { - $view = $this->config['view_dir_name']; - - if (is_dir($this->app->getAppPath() . $view)) { - $path = $this->app->getAppPath() . $view . DIRECTORY_SEPARATOR; - } else { - $appName = $this->app->http->getName(); - $path = $this->app->getRootPath() . $view . DIRECTORY_SEPARATOR . ($appName ? $appName . DIRECTORY_SEPARATOR : ''); - } - - $this->config['view_path'] = $path; - $this->template->view_path = $path; - } - - if ('' == pathinfo($template, PATHINFO_EXTENSION)) { - // 获取模板文件名 - $template = $this->parseTemplate($template); - } - - // 模板不存在 抛出异常 - if (!is_file($template)) { - throw new TemplateNotFoundException('template not exists:' . $template, $template); - } - - $this->template->fetch($template, $data); - } - - /** - * 渲染模板内容 - * @access public - * @param string $template 模板内容 - * @param array $data 模板变量 - * @return void - */ - public function display(string $template, array $data = []): void - { - $this->template->display($template, $data); - } - - /** - * 自动定位模板文件 - * @access private - * @param string $template 模板文件规则 - * @return string - */ - private function parseTemplate(string $template): string - { - // 分析模板文件规则 - $request = $this->app['request']; - - // 获取视图根目录 - if (strpos($template, '@')) { - // 跨模块调用 - list($app, $template) = explode('@', $template); - } - - if (isset($app)) { - $view = $this->config['view_dir_name']; - $viewPath = $this->app->getBasePath() . $app . DIRECTORY_SEPARATOR . $view . DIRECTORY_SEPARATOR; - - if (is_dir($viewPath)) { - $path = $viewPath; - } else { - $path = $this->app->getRootPath() . $view . DIRECTORY_SEPARATOR . $app . DIRECTORY_SEPARATOR; - } - - $this->template->view_path = $path; - } else { - $path = $this->config['view_path']; - } - - $depr = $this->config['view_depr']; - - if (0 !== strpos($template, '/')) { - $template = str_replace(['/', ':'], $depr, $template); - $controller = $request->controller(); - - if (strpos($controller, '.')) { - $pos = strrpos($controller, '.'); - $controller = substr($controller, 0, $pos) . '.' . Str::snake(substr($controller, $pos + 1)); - } else { - $controller = Str::snake($controller); - } - - if ($controller) { - if ('' == $template) { - // 如果模板文件名为空 按照默认模板渲染规则定位 - if (2 == $this->config['auto_rule']) { - $template = $request->action(true); - } elseif (3 == $this->config['auto_rule']) { - $template = $request->action(); - } else { - $template = Str::snake($request->action()); - } - - $template = str_replace('.', DIRECTORY_SEPARATOR, $controller) . $depr . $template; - } elseif (false === strpos($template, $depr)) { - $template = str_replace('.', DIRECTORY_SEPARATOR, $controller) . $depr . $template; - } - } - } else { - $template = str_replace(['/', ':'], $depr, substr($template, 1)); - } - - return $path . ltrim($template, '/') . '.' . ltrim($this->config['view_suffix'], '.'); - } - - /** - * 配置模板引擎 - * @access private - * @param array $config 参数 - * @return void - */ - public function config(array $config): void - { - $this->template->config($config); - $this->config = array_merge($this->config, $config); - } - - /** - * 获取模板引擎配置 - * @access public - * @param string $name 参数名 - * @return void - */ - public function getConfig(string $name) - { - return $this->template->getConfig($name); - } - - public function __call($method, $params) - { - return call_user_func_array([$this->template, $method], $params); - } -} diff --git a/版本更新 b/版本更新 deleted file mode 100644 index 303a755..0000000 --- a/版本更新 +++ /dev/null @@ -1,30 +0,0 @@ -5.1 -更新数据库 -记得先备份!记得先备份!记得先备份! -执行以下sql语句 -ALTER TABLE `qf_source` ADD COLUMN `is_time` int(11) NOT NULL DEFAULT 0 COMMENT '是否临时文件', -ADD COLUMN `fid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '网盘文件标识'; - -文件替换整个app文件(除了app/index这个文件夹不要替换,如果替换了重新传前端文件即可) - - - -6.17 更新资源分类 -更新数据库 -记得先备份!记得先备份!记得先备份! -执行以下sql语句 -ALTER TABLE `qf_source` ADD COLUMN `source_category_id` int(11) NOT NULL DEFAULT 0 COMMENT '分类ID'; -ALTER TABLE `qf_source` ADD COLUMN `sort` int(11) NOT NULL DEFAULT 99 COMMENT '排序'; -ALTER TABLE `qf_source` ADD COLUMN `is_top` int(11) NOT NULL DEFAULT 0 COMMENT '是否置顶'; -INSERT INTO `qf_node` VALUES (118, '分类管理', '', 'qfadmin', 'source', 'category', 108, 0, 1, 'el-icon-s-operation', NULL, 0, 0, 0); -CREATE TABLE `qf_source_category` ( - `source_category_id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分类名称', - `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序', - `status` int(11) NOT NULL DEFAULT 0 COMMENT '状态', - `create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间', - `update_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间', - PRIMARY KEY (`source_category_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分类表' ROW_FORMAT = Dynamic; - -文件替换整个app文件(除了app/index这个文件夹不要替换,如果替换了重新传前端文件即可) \ No newline at end of file